@opencitylabs/formio-custom-components 0.2.6 → 0.2.7
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/dist/index.cjs +10 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +160 -156
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var an;function ul(){return an||(an=1,process.env.NODE_ENV!=="production"&&(function(){var y=q,i=Symbol.for("react.element"),g=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),$=Symbol.for("react.profiler"),X=Symbol.for("react.provider"),o=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),a=Symbol.for("react.suspense"),s=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),f=Symbol.iterator,j="@@iterator";function _(w){if(w===null||typeof w!="object")return null;var U=f&&w[f]||w[j];return typeof U=="function"?U:null}var D=y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function Y(w){{for(var U=arguments.length,K=new Array(U>1?U-1:0),oe=1;oe<U;oe++)K[oe-1]=arguments[oe];O("error",w,K)}}function O(w,U,K){{var oe=D.ReactDebugCurrentFrame,Me=oe.getStackAddendum();Me!==""&&(U+="%s",K=K.concat([Me]));var Oe=K.map(function(ke){return String(ke)});Oe.unshift("Warning: "+U),Function.prototype.apply.call(console[w],console,Oe)}}var I=!1,N=!1,S=!1,v=!1,T=!1,L;L=Symbol.for("react.module.reference");function m(w){return!!(typeof w=="string"||typeof w=="function"||w===d||w===$||T||w===z||w===a||w===s||v||w===p||I||N||S||typeof w=="object"&&w!==null&&(w.$$typeof===c||w.$$typeof===u||w.$$typeof===X||w.$$typeof===o||w.$$typeof===x||w.$$typeof===L||w.getModuleId!==void 0))}function P(w,U,K){var oe=w.displayName;if(oe)return oe;var Me=U.displayName||U.name||"";return Me!==""?K+"("+Me+")":K}function B(w){return w.displayName||"Context"}function R(w){if(w==null)return null;if(typeof w.tag=="number"&&Y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof w=="function")return w.displayName||w.name||null;if(typeof w=="string")return w;switch(w){case d:return"Fragment";case g:return"Portal";case $:return"Profiler";case z:return"StrictMode";case a:return"Suspense";case s:return"SuspenseList"}if(typeof w=="object")switch(w.$$typeof){case o:var U=w;return B(U)+".Consumer";case X:var K=w;return B(K._context)+".Provider";case x:return P(w,w.render,"ForwardRef");case u:var oe=w.displayName||null;return oe!==null?oe:R(w.type)||"Memo";case c:{var Me=w,Oe=Me._payload,ke=Me._init;try{return R(ke(Oe))}catch{return null}}}return null}var A=Object.assign,H=0,J,
|
|
17
|
+
*/var an;function ul(){return an||(an=1,process.env.NODE_ENV!=="production"&&(function(){var y=q,i=Symbol.for("react.element"),g=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),$=Symbol.for("react.profiler"),X=Symbol.for("react.provider"),o=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),a=Symbol.for("react.suspense"),s=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),f=Symbol.iterator,j="@@iterator";function _(w){if(w===null||typeof w!="object")return null;var U=f&&w[f]||w[j];return typeof U=="function"?U:null}var D=y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function Y(w){{for(var U=arguments.length,K=new Array(U>1?U-1:0),oe=1;oe<U;oe++)K[oe-1]=arguments[oe];O("error",w,K)}}function O(w,U,K){{var oe=D.ReactDebugCurrentFrame,Me=oe.getStackAddendum();Me!==""&&(U+="%s",K=K.concat([Me]));var Oe=K.map(function(ke){return String(ke)});Oe.unshift("Warning: "+U),Function.prototype.apply.call(console[w],console,Oe)}}var I=!1,N=!1,S=!1,v=!1,T=!1,L;L=Symbol.for("react.module.reference");function m(w){return!!(typeof w=="string"||typeof w=="function"||w===d||w===$||T||w===z||w===a||w===s||v||w===p||I||N||S||typeof w=="object"&&w!==null&&(w.$$typeof===c||w.$$typeof===u||w.$$typeof===X||w.$$typeof===o||w.$$typeof===x||w.$$typeof===L||w.getModuleId!==void 0))}function P(w,U,K){var oe=w.displayName;if(oe)return oe;var Me=U.displayName||U.name||"";return Me!==""?K+"("+Me+")":K}function B(w){return w.displayName||"Context"}function R(w){if(w==null)return null;if(typeof w.tag=="number"&&Y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof w=="function")return w.displayName||w.name||null;if(typeof w=="string")return w;switch(w){case d:return"Fragment";case g:return"Portal";case $:return"Profiler";case z:return"StrictMode";case a:return"Suspense";case s:return"SuspenseList"}if(typeof w=="object")switch(w.$$typeof){case o:var U=w;return B(U)+".Consumer";case X:var K=w;return B(K._context)+".Provider";case x:return P(w,w.render,"ForwardRef");case u:var oe=w.displayName||null;return oe!==null?oe:R(w.type)||"Memo";case c:{var Me=w,Oe=Me._payload,ke=Me._init;try{return R(ke(Oe))}catch{return null}}}return null}var A=Object.assign,H=0,J,ie,ee,he,Z,ue,ae;function ye(){}ye.__reactDisabledLog=!0;function ce(){{if(H===0){J=console.log,ie=console.info,ee=console.warn,he=console.error,Z=console.group,ue=console.groupCollapsed,ae=console.groupEnd;var w={configurable:!0,enumerable:!0,value:ye,writable:!0};Object.defineProperties(console,{info:w,log:w,warn:w,error:w,group:w,groupCollapsed:w,groupEnd:w})}H++}}function Q(){{if(H--,H===0){var w={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:A({},w,{value:J}),info:A({},w,{value:ie}),warn:A({},w,{value:ee}),error:A({},w,{value:he}),group:A({},w,{value:Z}),groupCollapsed:A({},w,{value:ue}),groupEnd:A({},w,{value:ae})})}H<0&&Y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ve=D.ReactCurrentDispatcher,Ne;function _e(w,U,K){{if(Ne===void 0)try{throw Error()}catch(Me){var oe=Me.stack.trim().match(/\n( *(at )?)/);Ne=oe&&oe[1]||""}return`
|
|
18
18
|
`+Ne+w}}var Ce=!1,Re;{var ze=typeof WeakMap=="function"?WeakMap:Map;Re=new ze}function C(w,U){if(!w||Ce)return"";{var K=Re.get(w);if(K!==void 0)return K}var oe;Ce=!0;var Me=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Oe;Oe=ve.current,ve.current=null,ce();try{if(U){var ke=function(){throw Error()};if(Object.defineProperty(ke.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ke,[])}catch(et){oe=et}Reflect.construct(w,[],ke)}else{try{ke.call()}catch(et){oe=et}w.call(ke.prototype)}}else{try{throw Error()}catch(et){oe=et}w()}}catch(et){if(et&&oe&&typeof et.stack=="string"){for(var De=et.stack.split(`
|
|
19
19
|
`),qe=oe.stack.split(`
|
|
20
20
|
`),We=De.length-1,Be=qe.length-1;We>=1&&Be>=0&&De[We]!==qe[Be];)Be--;for(;We>=1&&Be>=0;We--,Be--)if(De[We]!==qe[Be]){if(We!==1||Be!==1)do if(We--,Be--,Be<0||De[We]!==qe[Be]){var Ke=`
|
|
21
21
|
`+De[We].replace(" at new "," at ");return w.displayName&&Ke.includes("<anonymous>")&&(Ke=Ke.replace("<anonymous>",w.displayName)),typeof w=="function"&&Re.set(w,Ke),Ke}while(We>=1&&Be>=0);break}}}finally{Ce=!1,ve.current=Oe,Q(),Error.prepareStackTrace=Me}var dt=w?w.displayName||w.name:"",yt=dt?_e(dt):"";return typeof w=="function"&&Re.set(w,yt),yt}function b(w,U,K){return C(w,!1)}function V(w){var U=w.prototype;return!!(U&&U.isReactComponent)}function k(w,U,K){if(w==null)return"";if(typeof w=="function")return C(w,V(w));if(typeof w=="string")return _e(w);switch(w){case a:return _e("Suspense");case s:return _e("SuspenseList")}if(typeof w=="object")switch(w.$$typeof){case x:return b(w.render);case u:return k(w.type,U,K);case c:{var oe=w,Me=oe._payload,Oe=oe._init;try{return k(Oe(Me),U,K)}catch{}}}return""}var E=Object.prototype.hasOwnProperty,F={},te=D.ReactDebugCurrentFrame;function se(w){if(w){var U=w._owner,K=k(w.type,w._source,U?U.type:null);te.setExtraStackFrame(K)}else te.setExtraStackFrame(null)}function be(w,U,K,oe,Me){{var Oe=Function.call.bind(E);for(var ke in w)if(Oe(w,ke)){var De=void 0;try{if(typeof w[ke]!="function"){var qe=Error((oe||"React class")+": "+K+" type `"+ke+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof w[ke]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw qe.name="Invariant Violation",qe}De=w[ke](U,ke,oe,K,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(We){De=We}De&&!(De instanceof Error)&&(se(Me),Y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",oe||"React class",K,ke,typeof De),se(null)),De instanceof Error&&!(De.message in F)&&(F[De.message]=!0,se(Me),Y("Failed %s type: %s",K,De.message),se(null))}}}var de=Array.isArray;function me(w){return de(w)}function xe(w){{var U=typeof Symbol=="function"&&Symbol.toStringTag,K=U&&w[Symbol.toStringTag]||w.constructor.name||"Object";return K}}function Ae(w){try{return $e(w),!1}catch{return!0}}function $e(w){return""+w}function Ie(w){if(Ae(w))return Y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",xe(w)),$e(w)}var Ge=D.ReactCurrentOwner,Qe={key:!0,ref:!0,__self:!0,__source:!0},ge,we;function Ze(w){if(E.call(w,"ref")){var U=Object.getOwnPropertyDescriptor(w,"ref").get;if(U&&U.isReactWarning)return!1}return w.ref!==void 0}function tt(w){if(E.call(w,"key")){var U=Object.getOwnPropertyDescriptor(w,"key").get;if(U&&U.isReactWarning)return!1}return w.key!==void 0}function ht(w,U){typeof w.ref=="string"&&Ge.current}function vt(w,U){{var K=function(){ge||(ge=!0,Y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",U))};K.isReactWarning=!0,Object.defineProperty(w,"key",{get:K,configurable:!0})}}function pt(w,U){{var K=function(){we||(we=!0,Y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",U))};K.isReactWarning=!0,Object.defineProperty(w,"ref",{get:K,configurable:!0})}}var lt=function(w,U,K,oe,Me,Oe,ke){var De={$$typeof:i,type:w,key:U,ref:K,props:ke,_owner:Oe};return De._store={},Object.defineProperty(De._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(De,"_self",{configurable:!1,enumerable:!1,writable:!1,value:oe}),Object.defineProperty(De,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Me}),Object.freeze&&(Object.freeze(De.props),Object.freeze(De)),De};function _t(w,U,K,oe,Me){{var Oe,ke={},De=null,qe=null;K!==void 0&&(Ie(K),De=""+K),tt(U)&&(Ie(U.key),De=""+U.key),Ze(U)&&(qe=U.ref,ht(U,Me));for(Oe in U)E.call(U,Oe)&&!Qe.hasOwnProperty(Oe)&&(ke[Oe]=U[Oe]);if(w&&w.defaultProps){var We=w.defaultProps;for(Oe in We)ke[Oe]===void 0&&(ke[Oe]=We[Oe])}if(De||qe){var Be=typeof w=="function"?w.displayName||w.name||"Unknown":w;De&&vt(ke,Be),qe&&pt(ke,Be)}return lt(w,De,qe,Me,oe,Ge.current,ke)}}var bt=D.ReactCurrentOwner,Ue=D.ReactDebugCurrentFrame;function gt(w){if(w){var U=w._owner,K=k(w.type,w._source,U?U.type:null);Ue.setExtraStackFrame(K)}else Ue.setExtraStackFrame(null)}var ft;ft=!1;function ut(w){return typeof w=="object"&&w!==null&&w.$$typeof===i}function it(){{if(bt.current){var w=R(bt.current.type);if(w)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+w+"`."}return""}}function zt(w){return""}var
|
|
23
|
+
Check the render method of \``+w+"`."}return""}}function zt(w){return""}var re={};function Na(w){{var U=it();if(!U){var K=typeof w=="string"?w:w.displayName||w.name;K&&(U=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+K+">.")}return U}}function ra(w,U){{if(!w._store||w._store.validated||w.key!=null)return;w._store.validated=!0;var K=Na(U);if(
|
|
25
|
+
Check the top-level render call using <`+K+">.")}return U}}function ra(w,U){{if(!w._store||w._store.validated||w.key!=null)return;w._store.validated=!0;var K=Na(U);if(re[K])return;re[K]=!0;var oe="";w&&w._owner&&w._owner!==bt.current&&(oe=" It was passed a child from "+R(w._owner.type)+"."),gt(w),Y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',K,oe),gt(null)}}function ct(w,U){{if(typeof w!="object")return;if(me(w))for(var K=0;K<w.length;K++){var oe=w[K];ut(oe)&&ra(oe,U)}else if(ut(w))w._store&&(w._store.validated=!0);else if(w){var Me=_(w);if(typeof Me=="function"&&Me!==w.entries)for(var Oe=Me.call(w),ke;!(ke=Oe.next()).done;)ut(ke.value)&&ra(ke.value,U)}}}function st(w){{var U=w.type;if(U==null||typeof U=="string")return;var K;if(typeof U=="function")K=U.propTypes;else if(typeof U=="object"&&(U.$$typeof===x||U.$$typeof===u))K=U.propTypes;else return;if(K){var oe=R(U);be(K,w.props,"prop",oe,w)}else if(U.PropTypes!==void 0&&!ft){ft=!0;var Me=R(U);Y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Me||"Unknown")}typeof U.getDefaultProps=="function"&&!U.getDefaultProps.isReactClassApproved&&Y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Se(w){{for(var U=Object.keys(w.props),K=0;K<U.length;K++){var oe=U[K];if(oe!=="children"&&oe!=="key"){gt(w),Y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",oe),gt(null);break}}w.ref!==null&&(gt(w),Y("Invalid attribute `ref` supplied to `React.Fragment`."),gt(null))}}var Lt={};function Ee(w,U,K,oe,Me,Oe){{var ke=m(w);if(!ke){var De="";(w===void 0||typeof w=="object"&&w!==null&&Object.keys(w).length===0)&&(De+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var qe=zt();qe?De+=qe:De+=it();var We;w===null?We="null":me(w)?We="array":w!==void 0&&w.$$typeof===i?(We="<"+(R(w.type)||"Unknown")+" />",De=" Did you accidentally export a JSX literal instead of a component?"):We=typeof w,Y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",We,De)}var Be=_t(w,U,K,Me,Oe);if(Be==null)return Be;if(ke){var Ke=U.children;if(Ke!==void 0)if(oe)if(me(Ke)){for(var dt=0;dt<Ke.length;dt++)ct(Ke[dt],w);Object.freeze&&Object.freeze(Ke)}else Y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ct(Ke,w)}if(E.call(U,"key")){var yt=R(w),et=Object.keys(U).filter(function(He){return He!=="key"}),Jt=et.length>0?"{key: someKey, "+et.join(": ..., ")+": ...}":"{key: someKey}";if(!Lt[yt+Jt]){var Ea=et.length>0?"{"+et.join(": ..., ")+": ...}":"{}";Y(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
@@ -58,14 +58,14 @@ if(data.calendarId && data.api_url){
|
|
|
58
58
|
data.overlaps_validation = -1; document.querySelector("input[name^='data[overlaps_validation]']").value = -1;
|
|
59
59
|
}
|
|
60
60
|
);
|
|
61
|
-
}`,validateOn:"change",validate:{customMessage:"Vi sono sovrapposizioni negli orari di apertura",custom:`if (document.querySelector("input[name^='data[overlaps_validation]']").value === '0') {valid=true} else {valid = 'Sovrapposizione';}`},key:"overlaps_validation",attributes:{readonly:"true"},required:!0,type:"number",input:!0,weight:1},{label:"Precisione minima (minuti)",defaultValue:1,required:!0,inputFormat:"plain",key:"range_step",type:"number",input:!0,weight:1}];function fl(...y){return ot.Components.baseEditForm([{key:"display",components:hl}],...y)}function Yt(y){return(i={})=>{const g=i.width?String(i.width):y.defaultWidth;return y.formats[g]||y.formats[y.defaultWidth]}}function rt(y){return(i,g)=>{const d=g!=null&&g.context?String(g.context):"standalone";let z;if(d==="formatting"&&y.formattingValues){const X=y.defaultFormattingWidth||y.defaultWidth,o=g!=null&&g.width?String(g.width):X;z=y.formattingValues[o]||y.formattingValues[X]}else{const X=y.defaultWidth,o=g!=null&&g.width?String(g.width):y.defaultWidth;z=y.values[o]||y.values[X]}const $=y.argumentCallback?y.argumentCallback(i):i;return z[$]}}function nt(y){return(i,g={})=>{const d=g.width,z=d&&y.matchPatterns[d]||y.matchPatterns[y.defaultMatchWidth],$=i.match(z);if(!$)return null;const X=$[0],o=d&&y.parsePatterns[d]||y.parsePatterns[y.defaultParseWidth],x=Array.isArray(o)?pl(o,u=>u.test(X)):ml(o,u=>u.test(X));let a;a=y.valueCallback?y.valueCallback(x):x,a=g.valueCallback?g.valueCallback(a):a;const s=i.slice(X.length);return{value:a,rest:s}}}function ml(y,i){for(const g in y)if(Object.prototype.hasOwnProperty.call(y,g)&&i(y[g]))return g}function pl(y,i){for(let g=0;g<y.length;g++)if(i(y[g]))return g}function dr(y){return(i,g={})=>{const d=i.match(y.matchPattern);if(!d)return null;const z=d[0],$=i.match(y.parsePattern);if(!$)return null;let X=y.valueCallback?y.valueCallback($[0]):$[0];X=g.valueCallback?g.valueCallback(X):X;const o=i.slice(z.length);return{value:X,rest:o}}}const nn=Symbol.for("constructDateFrom");function Sn(y,i){return typeof y=="function"?y(i):y&&typeof y=="object"&&nn in y?y[nn](i):y instanceof Date?new y.constructor(i):new Date(i)}function gl(y,...i){const g=Sn.bind(null,y||i.find(d=>typeof d=="object"));return i.map(g)}let yl={};function vl(){return yl}function _l(y,i){return Sn(i||y,y)}function sn(y,i){var o,x,a,s;const g=vl(),d=(i==null?void 0:i.weekStartsOn)??((x=(o=i==null?void 0:i.locale)==null?void 0:o.options)==null?void 0:x.weekStartsOn)??g.weekStartsOn??((s=(a=g.locale)==null?void 0:a.options)==null?void 0:s.weekStartsOn)??0,z=_l(y,i==null?void 0:i.in),$=z.getDay(),X=($<d?7:0)+$-d;return z.setDate(z.getDate()-X),z.setHours(0,0,0,0),z}function on(y,i,g){const[d,z]=gl(g==null?void 0:g.in,y,i);return+sn(d,g)==+sn(z,g)}const ln={lessThanXSeconds:{standalone:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"},withPreposition:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"}},xSeconds:{standalone:{one:"1 Sekunde",other:"{{count}} Sekunden"},withPreposition:{one:"1 Sekunde",other:"{{count}} Sekunden"}},halfAMinute:{standalone:"eine halbe Minute",withPreposition:"einer halben Minute"},lessThanXMinutes:{standalone:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"},withPreposition:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"}},xMinutes:{standalone:{one:"1 Minute",other:"{{count}} Minuten"},withPreposition:{one:"1 Minute",other:"{{count}} Minuten"}},aboutXHours:{standalone:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"},withPreposition:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"}},xHours:{standalone:{one:"1 Stunde",other:"{{count}} Stunden"},withPreposition:{one:"1 Stunde",other:"{{count}} Stunden"}},xDays:{standalone:{one:"1 Tag",other:"{{count}} Tage"},withPreposition:{one:"1 Tag",other:"{{count}} Tagen"}},aboutXWeeks:{standalone:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"},withPreposition:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"}},xWeeks:{standalone:{one:"1 Woche",other:"{{count}} Wochen"},withPreposition:{one:"1 Woche",other:"{{count}} Wochen"}},aboutXMonths:{standalone:{one:"etwa 1 Monat",other:"etwa {{count}} Monate"},withPreposition:{one:"etwa 1 Monat",other:"etwa {{count}} Monaten"}},xMonths:{standalone:{one:"1 Monat",other:"{{count}} Monate"},withPreposition:{one:"1 Monat",other:"{{count}} Monaten"}},aboutXYears:{standalone:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahre"},withPreposition:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahren"}},xYears:{standalone:{one:"1 Jahr",other:"{{count}} Jahre"},withPreposition:{one:"1 Jahr",other:"{{count}} Jahren"}},overXYears:{standalone:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahre"},withPreposition:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahren"}},almostXYears:{standalone:{one:"fast 1 Jahr",other:"fast {{count}} Jahre"},withPreposition:{one:"fast 1 Jahr",other:"fast {{count}} Jahren"}}},bl=(y,i,g)=>{let d;const z=g!=null&&g.addSuffix?ln[y].withPreposition:ln[y].standalone;return typeof z=="string"?d=z:i===1?d=z.one:d=z.other.replace("{{count}}",String(i)),g!=null&&g.addSuffix?g.comparison&&g.comparison>0?"in "+d:"vor "+d:d},wl={full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},xl={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Ml={full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},Sl={date:Yt({formats:wl,defaultWidth:"full"}),time:Yt({formats:xl,defaultWidth:"full"}),dateTime:Yt({formats:Ml,defaultWidth:"full"})},Dl={lastWeek:"'letzten' eeee 'um' p",yesterday:"'gestern um' p",today:"'heute um' p",tomorrow:"'morgen um' p",nextWeek:"eeee 'um' p",other:"P"},kl=(y,i,g,d)=>Dl[y],Yl={narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},Ol={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},nr={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],wide:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},jl={narrow:nr.narrow,abbreviated:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:nr.wide},Tl={narrow:["S","M","D","M","D","F","S"],short:["So","Mo","Di","Mi","Do","Fr","Sa"],abbreviated:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],wide:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},Cl={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachm.",evening:"Abend",night:"Nacht"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"}},Nl={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachm.",evening:"abends",night:"nachts"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"}},Pl=y=>Number(y)+".",El={ordinalNumber:Pl,era:rt({values:Yl,defaultWidth:"wide"}),quarter:rt({values:Ol,defaultWidth:"wide",argumentCallback:y=>y-1}),month:rt({values:nr,formattingValues:jl,defaultWidth:"wide"}),day:rt({values:Tl,defaultWidth:"wide"}),dayPeriod:rt({values:Cl,defaultWidth:"wide",formattingValues:Nl,defaultFormattingWidth:"wide"})},Al=/^(\d+)(\.)?/i,Rl=/\d+/i,Il={narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},Fl={any:[/^v/i,/^n/i]},zl={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},Ll={any:[/1/i,/2/i,/3/i,/4/i]},Wl={narrow:/^[jfmasond]/i,abbreviated:/^(j[aä]n|feb|mär[z]?|apr|mai|jun[i]?|jul[i]?|aug|sep|okt|nov|dez)\.?/i,wide:/^(januar|februar|märz|april|mai|juni|juli|august|september|oktober|november|dezember)/i},Vl={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^j[aä]/i,/^f/i,/^mär/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Hl={narrow:/^[smdmf]/i,short:/^(so|mo|di|mi|do|fr|sa)/i,abbreviated:/^(son?|mon?|die?|mit?|don?|fre?|sam?)\.?/i,wide:/^(sonntag|montag|dienstag|mittwoch|donnerstag|freitag|samstag)/i},$l={any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},Bl={narrow:/^(vm\.?|nm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,abbreviated:/^(vorm\.?|nachm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,wide:/^(vormittags|nachmittags|Mitternacht|Mittag|morgens|nachmittags|abends|nachts)/i},Ul={any:{am:/^v/i,pm:/^n/i,midnight:/^Mitte/i,noon:/^Mitta/i,morning:/morgens/i,afternoon:/nachmittags/i,evening:/abends/i,night:/nachts/i}},ql={ordinalNumber:dr({matchPattern:Al,parsePattern:Rl,valueCallback:y=>parseInt(y)}),era:nt({matchPatterns:Il,defaultMatchWidth:"wide",parsePatterns:Fl,defaultParseWidth:"any"}),quarter:nt({matchPatterns:zl,defaultMatchWidth:"wide",parsePatterns:Ll,defaultParseWidth:"any",valueCallback:y=>y+1}),month:nt({matchPatterns:Wl,defaultMatchWidth:"wide",parsePatterns:Vl,defaultParseWidth:"any"}),day:nt({matchPatterns:Hl,defaultMatchWidth:"wide",parsePatterns:$l,defaultParseWidth:"any"}),dayPeriod:nt({matchPatterns:Bl,defaultMatchWidth:"wide",parsePatterns:Ul,defaultParseWidth:"any"})},Dn={code:"de",formatDistance:bl,formatLong:Sl,formatRelative:kl,localize:El,match:ql,options:{weekStartsOn:1,firstWeekContainsDate:4}},Jl={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Gl=(y,i,g)=>{let d;const z=Jl[y];return typeof z=="string"?d=z:i===1?d=z.one:d=z.other.replace("{{count}}",i.toString()),g!=null&&g.addSuffix?g.comparison&&g.comparison>0?"in "+d:d+" ago":d},Kl={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Xl=(y,i,g,d)=>Kl[y],Ql={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Zl={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},eu={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},tu={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},au={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ru={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},nu=(y,i)=>{const g=Number(y),d=g%100;if(d>20||d<10)switch(d%10){case 1:return g+"st";case 2:return g+"nd";case 3:return g+"rd"}return g+"th"},iu={ordinalNumber:nu,era:rt({values:Ql,defaultWidth:"wide"}),quarter:rt({values:Zl,defaultWidth:"wide",argumentCallback:y=>y-1}),month:rt({values:eu,defaultWidth:"wide"}),day:rt({values:tu,defaultWidth:"wide"}),dayPeriod:rt({values:au,defaultWidth:"wide",formattingValues:ru,defaultFormattingWidth:"wide"})},su=/^(\d+)(th|st|nd|rd)?/i,ou=/\d+/i,lu={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},uu={any:[/^b/i,/^(a|c)/i]},cu={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},du={any:[/1/i,/2/i,/3/i,/4/i]},hu={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},fu={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},mu={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},pu={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},gu={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},yu={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},vu={ordinalNumber:dr({matchPattern:su,parsePattern:ou,valueCallback:y=>parseInt(y,10)}),era:nt({matchPatterns:lu,defaultMatchWidth:"wide",parsePatterns:uu,defaultParseWidth:"any"}),quarter:nt({matchPatterns:cu,defaultMatchWidth:"wide",parsePatterns:du,defaultParseWidth:"any",valueCallback:y=>y+1}),month:nt({matchPatterns:hu,defaultMatchWidth:"wide",parsePatterns:fu,defaultParseWidth:"any"}),day:nt({matchPatterns:mu,defaultMatchWidth:"wide",parsePatterns:pu,defaultParseWidth:"any"}),dayPeriod:nt({matchPatterns:gu,defaultMatchWidth:"any",parsePatterns:yu,defaultParseWidth:"any"})},_u={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},bu={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},wu={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},xu={date:Yt({formats:_u,defaultWidth:"full"}),time:Yt({formats:bu,defaultWidth:"full"}),dateTime:Yt({formats:wu,defaultWidth:"full"})},kn={code:"en-GB",formatDistance:Gl,formatLong:xu,formatRelative:Xl,localize:iu,match:vu,options:{weekStartsOn:1,firstWeekContainsDate:4}},Mu={lessThanXSeconds:{one:"meno di un secondo",other:"meno di {{count}} secondi"},xSeconds:{one:"un secondo",other:"{{count}} secondi"},halfAMinute:"alcuni secondi",lessThanXMinutes:{one:"meno di un minuto",other:"meno di {{count}} minuti"},xMinutes:{one:"un minuto",other:"{{count}} minuti"},aboutXHours:{one:"circa un'ora",other:"circa {{count}} ore"},xHours:{one:"un'ora",other:"{{count}} ore"},xDays:{one:"un giorno",other:"{{count}} giorni"},aboutXWeeks:{one:"circa una settimana",other:"circa {{count}} settimane"},xWeeks:{one:"una settimana",other:"{{count}} settimane"},aboutXMonths:{one:"circa un mese",other:"circa {{count}} mesi"},xMonths:{one:"un mese",other:"{{count}} mesi"},aboutXYears:{one:"circa un anno",other:"circa {{count}} anni"},xYears:{one:"un anno",other:"{{count}} anni"},overXYears:{one:"più di un anno",other:"più di {{count}} anni"},almostXYears:{one:"quasi un anno",other:"quasi {{count}} anni"}},Su=(y,i,g)=>{let d;const z=Mu[y];return typeof z=="string"?d=z:i===1?d=z.one:d=z.other.replace("{{count}}",i.toString()),g!=null&&g.addSuffix?g.comparison&&g.comparison>0?"tra "+d:d+" fa":d},Du={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},ku={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Yu={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},Ou={date:Yt({formats:Du,defaultWidth:"full"}),time:Yt({formats:ku,defaultWidth:"full"}),dateTime:Yt({formats:Yu,defaultWidth:"full"})},hr=["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"];function ju(y){switch(y){case 0:return"'domenica scorsa alle' p";default:return"'"+hr[y]+" scorso alle' p"}}function un(y){return"'"+hr[y]+" alle' p"}function Tu(y){switch(y){case 0:return"'domenica prossima alle' p";default:return"'"+hr[y]+" prossimo alle' p"}}const Cu={lastWeek:(y,i,g)=>{const d=y.getDay();return on(y,i,g)?un(d):ju(d)},yesterday:"'ieri alle' p",today:"'oggi alle' p",tomorrow:"'domani alle' p",nextWeek:(y,i,g)=>{const d=y.getDay();return on(y,i,g)?un(d):Tu(d)},other:"P"},Nu=(y,i,g,d)=>{const z=Cu[y];return typeof z=="function"?z(i,g,d):z},Pu={narrow:["aC","dC"],abbreviated:["a.C.","d.C."],wide:["avanti Cristo","dopo Cristo"]},Eu={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},Au={narrow:["G","F","M","A","M","G","L","A","S","O","N","D"],abbreviated:["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],wide:["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"]},Ru={narrow:["D","L","M","M","G","V","S"],short:["dom","lun","mar","mer","gio","ven","sab"],abbreviated:["dom","lun","mar","mer","gio","ven","sab"],wide:["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"]},Iu={narrow:{am:"m.",pm:"p.",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"},abbreviated:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"},wide:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"}},Fu={narrow:{am:"m.",pm:"p.",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"},abbreviated:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"},wide:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"}},zu=(y,i)=>{const g=Number(y);return String(g)},Lu={ordinalNumber:zu,era:rt({values:Pu,defaultWidth:"wide"}),quarter:rt({values:Eu,defaultWidth:"wide",argumentCallback:y=>y-1}),month:rt({values:Au,defaultWidth:"wide"}),day:rt({values:Ru,defaultWidth:"wide"}),dayPeriod:rt({values:Iu,defaultWidth:"wide",formattingValues:Fu,defaultFormattingWidth:"wide"})},Wu=/^(\d+)(º)?/i,Vu=/\d+/i,Hu={narrow:/^(aC|dC)/i,abbreviated:/^(a\.?\s?C\.?|a\.?\s?e\.?\s?v\.?|d\.?\s?C\.?|e\.?\s?v\.?)/i,wide:/^(avanti Cristo|avanti Era Volgare|dopo Cristo|Era Volgare)/i},$u={any:[/^a/i,/^(d|e)/i]},Bu={narrow:/^[1234]/i,abbreviated:/^t[1234]/i,wide:/^[1234](º)? trimestre/i},Uu={any:[/1/i,/2/i,/3/i,/4/i]},qu={narrow:/^[gfmalsond]/i,abbreviated:/^(gen|feb|mar|apr|mag|giu|lug|ago|set|ott|nov|dic)/i,wide:/^(gennaio|febbraio|marzo|aprile|maggio|giugno|luglio|agosto|settembre|ottobre|novembre|dicembre)/i},Ju={narrow:[/^g/i,/^f/i,/^m/i,/^a/i,/^m/i,/^g/i,/^l/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ge/i,/^f/i,/^mar/i,/^ap/i,/^mag/i,/^gi/i,/^l/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},Gu={narrow:/^[dlmgvs]/i,short:/^(do|lu|ma|me|gi|ve|sa)/i,abbreviated:/^(dom|lun|mar|mer|gio|ven|sab)/i,wide:/^(domenica|luned[i|ì]|marted[i|ì]|mercoled[i|ì]|gioved[i|ì]|venerd[i|ì]|sabato)/i},Ku={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^g/i,/^v/i,/^s/i],any:[/^d/i,/^l/i,/^ma/i,/^me/i,/^g/i,/^v/i,/^s/i]},Xu={narrow:/^(a|m\.|p|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i,any:/^([ap]\.?\s?m\.?|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i},Qu={any:{am:/^a/i,pm:/^p/i,midnight:/^mezza/i,noon:/^mezzo/i,morning:/mattina/i,afternoon:/pomeriggio/i,evening:/sera/i,night:/notte/i}},Zu={ordinalNumber:dr({matchPattern:Wu,parsePattern:Vu,valueCallback:y=>parseInt(y,10)}),era:nt({matchPatterns:Hu,defaultMatchWidth:"wide",parsePatterns:$u,defaultParseWidth:"any"}),quarter:nt({matchPatterns:Bu,defaultMatchWidth:"wide",parsePatterns:Uu,defaultParseWidth:"any",valueCallback:y=>y+1}),month:nt({matchPatterns:qu,defaultMatchWidth:"wide",parsePatterns:Ju,defaultParseWidth:"any"}),day:nt({matchPatterns:Gu,defaultMatchWidth:"wide",parsePatterns:Ku,defaultParseWidth:"any"}),dayPeriod:nt({matchPatterns:Xu,defaultMatchWidth:"any",parsePatterns:Qu,defaultParseWidth:"any"})},Yn={code:"it",formatDistance:Su,formatLong:Ou,formatRelative:Nu,localize:Lu,match:Zu,options:{weekStartsOn:1,firstWeekContainsDate:4}};function Ca(y){throw new Error('Could not dynamically require "'+y+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ir={exports:{}},ga={exports:{}},ec=ga.exports,cn;function fr(){return cn||(cn=1,(function(y,i){(function(g,d){y.exports=d()})(ec,(function(){var g;function d(){return g.apply(null,arguments)}function z(e){g=e}function $(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function X(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function x(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(o(e,t))return!1;return!0}function a(e){return e===void 0}function s(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function u(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function c(e,t){var r=[],n,l=e.length;for(n=0;n<l;++n)r.push(t(e[n],n));return r}function p(e,t){for(var r in t)o(t,r)&&(e[r]=t[r]);return o(t,"toString")&&(e.toString=t.toString),o(t,"valueOf")&&(e.valueOf=t.valueOf),e}function f(e,t,r,n){return Tr(e,t,r,n,!0).utc()}function j(){return{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}}function _(e){return e._pf==null&&(e._pf=j()),e._pf}var D;Array.prototype.some?D=Array.prototype.some:D=function(e){var t=Object(this),r=t.length>>>0,n;for(n=0;n<r;n++)if(n in t&&e.call(this,t[n],n,t))return!0;return!1};function Y(e){var t=null,r=!1,n=e._d&&!isNaN(e._d.getTime());if(n&&(t=_(e),r=D.call(t.parsedDateParts,function(l){return l!=null}),n=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&&(n=n&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=n;else return n;return e._isValid}function O(e){var t=f(NaN);return e!=null?p(_(t),e):_(t).userInvalidated=!0,t}var I=d.momentProperties=[],N=!1;function S(e,t){var r,n,l,M=I.length;if(a(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),a(t._i)||(e._i=t._i),a(t._f)||(e._f=t._f),a(t._l)||(e._l=t._l),a(t._strict)||(e._strict=t._strict),a(t._tzm)||(e._tzm=t._tzm),a(t._isUTC)||(e._isUTC=t._isUTC),a(t._offset)||(e._offset=t._offset),a(t._pf)||(e._pf=_(t)),a(t._locale)||(e._locale=t._locale),M>0)for(r=0;r<M;r++)n=I[r],l=t[n],a(l)||(e[n]=l);return e}function v(e){S(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),N===!1&&(N=!0,d.updateOffset(this),N=!1)}function T(e){return e instanceof v||e!=null&&e._isAMomentObject!=null}function L(e){d.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function m(e,t){var r=!0;return p(function(){if(d.deprecationHandler!=null&&d.deprecationHandler(null,e),r){var n=[],l,M,W,re=arguments.length;for(M=0;M<re;M++){if(l="",typeof arguments[M]=="object"){l+=`
|
|
61
|
+
}`,validateOn:"change",validate:{customMessage:"Vi sono sovrapposizioni negli orari di apertura",custom:`if (document.querySelector("input[name^='data[overlaps_validation]']").value === '0') {valid=true} else {valid = 'Sovrapposizione';}`},key:"overlaps_validation",attributes:{readonly:"true"},required:!0,type:"number",input:!0,weight:1},{label:"Precisione minima (minuti)",defaultValue:1,required:!0,inputFormat:"plain",key:"range_step",type:"number",input:!0,weight:1}];function fl(...y){return ot.Components.baseEditForm([{key:"display",components:hl}],...y)}function Yt(y){return(i={})=>{const g=i.width?String(i.width):y.defaultWidth;return y.formats[g]||y.formats[y.defaultWidth]}}function rt(y){return(i,g)=>{const d=g!=null&&g.context?String(g.context):"standalone";let z;if(d==="formatting"&&y.formattingValues){const X=y.defaultFormattingWidth||y.defaultWidth,o=g!=null&&g.width?String(g.width):X;z=y.formattingValues[o]||y.formattingValues[X]}else{const X=y.defaultWidth,o=g!=null&&g.width?String(g.width):y.defaultWidth;z=y.values[o]||y.values[X]}const $=y.argumentCallback?y.argumentCallback(i):i;return z[$]}}function nt(y){return(i,g={})=>{const d=g.width,z=d&&y.matchPatterns[d]||y.matchPatterns[y.defaultMatchWidth],$=i.match(z);if(!$)return null;const X=$[0],o=d&&y.parsePatterns[d]||y.parsePatterns[y.defaultParseWidth],x=Array.isArray(o)?pl(o,u=>u.test(X)):ml(o,u=>u.test(X));let a;a=y.valueCallback?y.valueCallback(x):x,a=g.valueCallback?g.valueCallback(a):a;const s=i.slice(X.length);return{value:a,rest:s}}}function ml(y,i){for(const g in y)if(Object.prototype.hasOwnProperty.call(y,g)&&i(y[g]))return g}function pl(y,i){for(let g=0;g<y.length;g++)if(i(y[g]))return g}function dr(y){return(i,g={})=>{const d=i.match(y.matchPattern);if(!d)return null;const z=d[0],$=i.match(y.parsePattern);if(!$)return null;let X=y.valueCallback?y.valueCallback($[0]):$[0];X=g.valueCallback?g.valueCallback(X):X;const o=i.slice(z.length);return{value:X,rest:o}}}const nn=Symbol.for("constructDateFrom");function Sn(y,i){return typeof y=="function"?y(i):y&&typeof y=="object"&&nn in y?y[nn](i):y instanceof Date?new y.constructor(i):new Date(i)}function gl(y,...i){const g=Sn.bind(null,y||i.find(d=>typeof d=="object"));return i.map(g)}let yl={};function vl(){return yl}function _l(y,i){return Sn(i||y,y)}function sn(y,i){var o,x,a,s;const g=vl(),d=(i==null?void 0:i.weekStartsOn)??((x=(o=i==null?void 0:i.locale)==null?void 0:o.options)==null?void 0:x.weekStartsOn)??g.weekStartsOn??((s=(a=g.locale)==null?void 0:a.options)==null?void 0:s.weekStartsOn)??0,z=_l(y,i==null?void 0:i.in),$=z.getDay(),X=($<d?7:0)+$-d;return z.setDate(z.getDate()-X),z.setHours(0,0,0,0),z}function on(y,i,g){const[d,z]=gl(g==null?void 0:g.in,y,i);return+sn(d,g)==+sn(z,g)}const ln={lessThanXSeconds:{standalone:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"},withPreposition:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"}},xSeconds:{standalone:{one:"1 Sekunde",other:"{{count}} Sekunden"},withPreposition:{one:"1 Sekunde",other:"{{count}} Sekunden"}},halfAMinute:{standalone:"eine halbe Minute",withPreposition:"einer halben Minute"},lessThanXMinutes:{standalone:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"},withPreposition:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"}},xMinutes:{standalone:{one:"1 Minute",other:"{{count}} Minuten"},withPreposition:{one:"1 Minute",other:"{{count}} Minuten"}},aboutXHours:{standalone:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"},withPreposition:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"}},xHours:{standalone:{one:"1 Stunde",other:"{{count}} Stunden"},withPreposition:{one:"1 Stunde",other:"{{count}} Stunden"}},xDays:{standalone:{one:"1 Tag",other:"{{count}} Tage"},withPreposition:{one:"1 Tag",other:"{{count}} Tagen"}},aboutXWeeks:{standalone:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"},withPreposition:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"}},xWeeks:{standalone:{one:"1 Woche",other:"{{count}} Wochen"},withPreposition:{one:"1 Woche",other:"{{count}} Wochen"}},aboutXMonths:{standalone:{one:"etwa 1 Monat",other:"etwa {{count}} Monate"},withPreposition:{one:"etwa 1 Monat",other:"etwa {{count}} Monaten"}},xMonths:{standalone:{one:"1 Monat",other:"{{count}} Monate"},withPreposition:{one:"1 Monat",other:"{{count}} Monaten"}},aboutXYears:{standalone:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahre"},withPreposition:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahren"}},xYears:{standalone:{one:"1 Jahr",other:"{{count}} Jahre"},withPreposition:{one:"1 Jahr",other:"{{count}} Jahren"}},overXYears:{standalone:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahre"},withPreposition:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahren"}},almostXYears:{standalone:{one:"fast 1 Jahr",other:"fast {{count}} Jahre"},withPreposition:{one:"fast 1 Jahr",other:"fast {{count}} Jahren"}}},bl=(y,i,g)=>{let d;const z=g!=null&&g.addSuffix?ln[y].withPreposition:ln[y].standalone;return typeof z=="string"?d=z:i===1?d=z.one:d=z.other.replace("{{count}}",String(i)),g!=null&&g.addSuffix?g.comparison&&g.comparison>0?"in "+d:"vor "+d:d},wl={full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},xl={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Ml={full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},Sl={date:Yt({formats:wl,defaultWidth:"full"}),time:Yt({formats:xl,defaultWidth:"full"}),dateTime:Yt({formats:Ml,defaultWidth:"full"})},Dl={lastWeek:"'letzten' eeee 'um' p",yesterday:"'gestern um' p",today:"'heute um' p",tomorrow:"'morgen um' p",nextWeek:"eeee 'um' p",other:"P"},kl=(y,i,g,d)=>Dl[y],Yl={narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},Ol={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},nr={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],wide:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},jl={narrow:nr.narrow,abbreviated:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:nr.wide},Tl={narrow:["S","M","D","M","D","F","S"],short:["So","Mo","Di","Mi","Do","Fr","Sa"],abbreviated:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],wide:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},Cl={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachm.",evening:"Abend",night:"Nacht"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"}},Nl={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachm.",evening:"abends",night:"nachts"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"}},Pl=y=>Number(y)+".",El={ordinalNumber:Pl,era:rt({values:Yl,defaultWidth:"wide"}),quarter:rt({values:Ol,defaultWidth:"wide",argumentCallback:y=>y-1}),month:rt({values:nr,formattingValues:jl,defaultWidth:"wide"}),day:rt({values:Tl,defaultWidth:"wide"}),dayPeriod:rt({values:Cl,defaultWidth:"wide",formattingValues:Nl,defaultFormattingWidth:"wide"})},Al=/^(\d+)(\.)?/i,Rl=/\d+/i,Il={narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},Fl={any:[/^v/i,/^n/i]},zl={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},Ll={any:[/1/i,/2/i,/3/i,/4/i]},Wl={narrow:/^[jfmasond]/i,abbreviated:/^(j[aä]n|feb|mär[z]?|apr|mai|jun[i]?|jul[i]?|aug|sep|okt|nov|dez)\.?/i,wide:/^(januar|februar|märz|april|mai|juni|juli|august|september|oktober|november|dezember)/i},Vl={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^j[aä]/i,/^f/i,/^mär/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Hl={narrow:/^[smdmf]/i,short:/^(so|mo|di|mi|do|fr|sa)/i,abbreviated:/^(son?|mon?|die?|mit?|don?|fre?|sam?)\.?/i,wide:/^(sonntag|montag|dienstag|mittwoch|donnerstag|freitag|samstag)/i},$l={any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},Bl={narrow:/^(vm\.?|nm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,abbreviated:/^(vorm\.?|nachm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,wide:/^(vormittags|nachmittags|Mitternacht|Mittag|morgens|nachmittags|abends|nachts)/i},Ul={any:{am:/^v/i,pm:/^n/i,midnight:/^Mitte/i,noon:/^Mitta/i,morning:/morgens/i,afternoon:/nachmittags/i,evening:/abends/i,night:/nachts/i}},ql={ordinalNumber:dr({matchPattern:Al,parsePattern:Rl,valueCallback:y=>parseInt(y)}),era:nt({matchPatterns:Il,defaultMatchWidth:"wide",parsePatterns:Fl,defaultParseWidth:"any"}),quarter:nt({matchPatterns:zl,defaultMatchWidth:"wide",parsePatterns:Ll,defaultParseWidth:"any",valueCallback:y=>y+1}),month:nt({matchPatterns:Wl,defaultMatchWidth:"wide",parsePatterns:Vl,defaultParseWidth:"any"}),day:nt({matchPatterns:Hl,defaultMatchWidth:"wide",parsePatterns:$l,defaultParseWidth:"any"}),dayPeriod:nt({matchPatterns:Bl,defaultMatchWidth:"wide",parsePatterns:Ul,defaultParseWidth:"any"})},Dn={code:"de",formatDistance:bl,formatLong:Sl,formatRelative:kl,localize:El,match:ql,options:{weekStartsOn:1,firstWeekContainsDate:4}},Jl={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Gl=(y,i,g)=>{let d;const z=Jl[y];return typeof z=="string"?d=z:i===1?d=z.one:d=z.other.replace("{{count}}",i.toString()),g!=null&&g.addSuffix?g.comparison&&g.comparison>0?"in "+d:d+" ago":d},Kl={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Xl=(y,i,g,d)=>Kl[y],Ql={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Zl={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},eu={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},tu={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},au={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ru={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},nu=(y,i)=>{const g=Number(y),d=g%100;if(d>20||d<10)switch(d%10){case 1:return g+"st";case 2:return g+"nd";case 3:return g+"rd"}return g+"th"},iu={ordinalNumber:nu,era:rt({values:Ql,defaultWidth:"wide"}),quarter:rt({values:Zl,defaultWidth:"wide",argumentCallback:y=>y-1}),month:rt({values:eu,defaultWidth:"wide"}),day:rt({values:tu,defaultWidth:"wide"}),dayPeriod:rt({values:au,defaultWidth:"wide",formattingValues:ru,defaultFormattingWidth:"wide"})},su=/^(\d+)(th|st|nd|rd)?/i,ou=/\d+/i,lu={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},uu={any:[/^b/i,/^(a|c)/i]},cu={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},du={any:[/1/i,/2/i,/3/i,/4/i]},hu={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},fu={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},mu={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},pu={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},gu={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},yu={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},vu={ordinalNumber:dr({matchPattern:su,parsePattern:ou,valueCallback:y=>parseInt(y,10)}),era:nt({matchPatterns:lu,defaultMatchWidth:"wide",parsePatterns:uu,defaultParseWidth:"any"}),quarter:nt({matchPatterns:cu,defaultMatchWidth:"wide",parsePatterns:du,defaultParseWidth:"any",valueCallback:y=>y+1}),month:nt({matchPatterns:hu,defaultMatchWidth:"wide",parsePatterns:fu,defaultParseWidth:"any"}),day:nt({matchPatterns:mu,defaultMatchWidth:"wide",parsePatterns:pu,defaultParseWidth:"any"}),dayPeriod:nt({matchPatterns:gu,defaultMatchWidth:"any",parsePatterns:yu,defaultParseWidth:"any"})},_u={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},bu={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},wu={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},xu={date:Yt({formats:_u,defaultWidth:"full"}),time:Yt({formats:bu,defaultWidth:"full"}),dateTime:Yt({formats:wu,defaultWidth:"full"})},kn={code:"en-GB",formatDistance:Gl,formatLong:xu,formatRelative:Xl,localize:iu,match:vu,options:{weekStartsOn:1,firstWeekContainsDate:4}},Mu={lessThanXSeconds:{one:"meno di un secondo",other:"meno di {{count}} secondi"},xSeconds:{one:"un secondo",other:"{{count}} secondi"},halfAMinute:"alcuni secondi",lessThanXMinutes:{one:"meno di un minuto",other:"meno di {{count}} minuti"},xMinutes:{one:"un minuto",other:"{{count}} minuti"},aboutXHours:{one:"circa un'ora",other:"circa {{count}} ore"},xHours:{one:"un'ora",other:"{{count}} ore"},xDays:{one:"un giorno",other:"{{count}} giorni"},aboutXWeeks:{one:"circa una settimana",other:"circa {{count}} settimane"},xWeeks:{one:"una settimana",other:"{{count}} settimane"},aboutXMonths:{one:"circa un mese",other:"circa {{count}} mesi"},xMonths:{one:"un mese",other:"{{count}} mesi"},aboutXYears:{one:"circa un anno",other:"circa {{count}} anni"},xYears:{one:"un anno",other:"{{count}} anni"},overXYears:{one:"più di un anno",other:"più di {{count}} anni"},almostXYears:{one:"quasi un anno",other:"quasi {{count}} anni"}},Su=(y,i,g)=>{let d;const z=Mu[y];return typeof z=="string"?d=z:i===1?d=z.one:d=z.other.replace("{{count}}",i.toString()),g!=null&&g.addSuffix?g.comparison&&g.comparison>0?"tra "+d:d+" fa":d},Du={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},ku={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Yu={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},Ou={date:Yt({formats:Du,defaultWidth:"full"}),time:Yt({formats:ku,defaultWidth:"full"}),dateTime:Yt({formats:Yu,defaultWidth:"full"})},hr=["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"];function ju(y){switch(y){case 0:return"'domenica scorsa alle' p";default:return"'"+hr[y]+" scorso alle' p"}}function un(y){return"'"+hr[y]+" alle' p"}function Tu(y){switch(y){case 0:return"'domenica prossima alle' p";default:return"'"+hr[y]+" prossimo alle' p"}}const Cu={lastWeek:(y,i,g)=>{const d=y.getDay();return on(y,i,g)?un(d):ju(d)},yesterday:"'ieri alle' p",today:"'oggi alle' p",tomorrow:"'domani alle' p",nextWeek:(y,i,g)=>{const d=y.getDay();return on(y,i,g)?un(d):Tu(d)},other:"P"},Nu=(y,i,g,d)=>{const z=Cu[y];return typeof z=="function"?z(i,g,d):z},Pu={narrow:["aC","dC"],abbreviated:["a.C.","d.C."],wide:["avanti Cristo","dopo Cristo"]},Eu={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},Au={narrow:["G","F","M","A","M","G","L","A","S","O","N","D"],abbreviated:["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],wide:["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"]},Ru={narrow:["D","L","M","M","G","V","S"],short:["dom","lun","mar","mer","gio","ven","sab"],abbreviated:["dom","lun","mar","mer","gio","ven","sab"],wide:["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"]},Iu={narrow:{am:"m.",pm:"p.",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"},abbreviated:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"},wide:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"mattina",afternoon:"pomeriggio",evening:"sera",night:"notte"}},Fu={narrow:{am:"m.",pm:"p.",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"},abbreviated:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"},wide:{am:"AM",pm:"PM",midnight:"mezzanotte",noon:"mezzogiorno",morning:"di mattina",afternoon:"del pomeriggio",evening:"di sera",night:"di notte"}},zu=(y,i)=>{const g=Number(y);return String(g)},Lu={ordinalNumber:zu,era:rt({values:Pu,defaultWidth:"wide"}),quarter:rt({values:Eu,defaultWidth:"wide",argumentCallback:y=>y-1}),month:rt({values:Au,defaultWidth:"wide"}),day:rt({values:Ru,defaultWidth:"wide"}),dayPeriod:rt({values:Iu,defaultWidth:"wide",formattingValues:Fu,defaultFormattingWidth:"wide"})},Wu=/^(\d+)(º)?/i,Vu=/\d+/i,Hu={narrow:/^(aC|dC)/i,abbreviated:/^(a\.?\s?C\.?|a\.?\s?e\.?\s?v\.?|d\.?\s?C\.?|e\.?\s?v\.?)/i,wide:/^(avanti Cristo|avanti Era Volgare|dopo Cristo|Era Volgare)/i},$u={any:[/^a/i,/^(d|e)/i]},Bu={narrow:/^[1234]/i,abbreviated:/^t[1234]/i,wide:/^[1234](º)? trimestre/i},Uu={any:[/1/i,/2/i,/3/i,/4/i]},qu={narrow:/^[gfmalsond]/i,abbreviated:/^(gen|feb|mar|apr|mag|giu|lug|ago|set|ott|nov|dic)/i,wide:/^(gennaio|febbraio|marzo|aprile|maggio|giugno|luglio|agosto|settembre|ottobre|novembre|dicembre)/i},Ju={narrow:[/^g/i,/^f/i,/^m/i,/^a/i,/^m/i,/^g/i,/^l/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ge/i,/^f/i,/^mar/i,/^ap/i,/^mag/i,/^gi/i,/^l/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},Gu={narrow:/^[dlmgvs]/i,short:/^(do|lu|ma|me|gi|ve|sa)/i,abbreviated:/^(dom|lun|mar|mer|gio|ven|sab)/i,wide:/^(domenica|luned[i|ì]|marted[i|ì]|mercoled[i|ì]|gioved[i|ì]|venerd[i|ì]|sabato)/i},Ku={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^g/i,/^v/i,/^s/i],any:[/^d/i,/^l/i,/^ma/i,/^me/i,/^g/i,/^v/i,/^s/i]},Xu={narrow:/^(a|m\.|p|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i,any:/^([ap]\.?\s?m\.?|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i},Qu={any:{am:/^a/i,pm:/^p/i,midnight:/^mezza/i,noon:/^mezzo/i,morning:/mattina/i,afternoon:/pomeriggio/i,evening:/sera/i,night:/notte/i}},Zu={ordinalNumber:dr({matchPattern:Wu,parsePattern:Vu,valueCallback:y=>parseInt(y,10)}),era:nt({matchPatterns:Hu,defaultMatchWidth:"wide",parsePatterns:$u,defaultParseWidth:"any"}),quarter:nt({matchPatterns:Bu,defaultMatchWidth:"wide",parsePatterns:Uu,defaultParseWidth:"any",valueCallback:y=>y+1}),month:nt({matchPatterns:qu,defaultMatchWidth:"wide",parsePatterns:Ju,defaultParseWidth:"any"}),day:nt({matchPatterns:Gu,defaultMatchWidth:"wide",parsePatterns:Ku,defaultParseWidth:"any"}),dayPeriod:nt({matchPatterns:Xu,defaultMatchWidth:"any",parsePatterns:Qu,defaultParseWidth:"any"})},Yn={code:"it",formatDistance:Su,formatLong:Ou,formatRelative:Nu,localize:Lu,match:Zu,options:{weekStartsOn:1,firstWeekContainsDate:4}};function Ca(y){throw new Error('Could not dynamically require "'+y+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ir={exports:{}},ga={exports:{}},ec=ga.exports,cn;function fr(){return cn||(cn=1,(function(y,i){(function(g,d){y.exports=d()})(ec,(function(){var g;function d(){return g.apply(null,arguments)}function z(e){g=e}function $(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function X(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function x(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(o(e,t))return!1;return!0}function a(e){return e===void 0}function s(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function u(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function c(e,t){var r=[],n,l=e.length;for(n=0;n<l;++n)r.push(t(e[n],n));return r}function p(e,t){for(var r in t)o(t,r)&&(e[r]=t[r]);return o(t,"toString")&&(e.toString=t.toString),o(t,"valueOf")&&(e.valueOf=t.valueOf),e}function f(e,t,r,n){return Tr(e,t,r,n,!0).utc()}function j(){return{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}}function _(e){return e._pf==null&&(e._pf=j()),e._pf}var D;Array.prototype.some?D=Array.prototype.some:D=function(e){var t=Object(this),r=t.length>>>0,n;for(n=0;n<r;n++)if(n in t&&e.call(this,t[n],n,t))return!0;return!1};function Y(e){var t=null,r=!1,n=e._d&&!isNaN(e._d.getTime());if(n&&(t=_(e),r=D.call(t.parsedDateParts,function(l){return l!=null}),n=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&&(n=n&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=n;else return n;return e._isValid}function O(e){var t=f(NaN);return e!=null?p(_(t),e):_(t).userInvalidated=!0,t}var I=d.momentProperties=[],N=!1;function S(e,t){var r,n,l,M=I.length;if(a(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),a(t._i)||(e._i=t._i),a(t._f)||(e._f=t._f),a(t._l)||(e._l=t._l),a(t._strict)||(e._strict=t._strict),a(t._tzm)||(e._tzm=t._tzm),a(t._isUTC)||(e._isUTC=t._isUTC),a(t._offset)||(e._offset=t._offset),a(t._pf)||(e._pf=_(t)),a(t._locale)||(e._locale=t._locale),M>0)for(r=0;r<M;r++)n=I[r],l=t[n],a(l)||(e[n]=l);return e}function v(e){S(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),N===!1&&(N=!0,d.updateOffset(this),N=!1)}function T(e){return e instanceof v||e!=null&&e._isAMomentObject!=null}function L(e){d.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function m(e,t){var r=!0;return p(function(){if(d.deprecationHandler!=null&&d.deprecationHandler(null,e),r){var n=[],l,M,W,ne=arguments.length;for(M=0;M<ne;M++){if(l="",typeof arguments[M]=="object"){l+=`
|
|
62
62
|
[`+M+"] ";for(W in arguments[0])o(arguments[0],W)&&(l+=W+": "+arguments[0][W]+", ");l=l.slice(0,-2)}else l=arguments[M];n.push(l)}L(e+`
|
|
63
63
|
Arguments: `+Array.prototype.slice.call(n).join("")+`
|
|
64
|
-
`+new Error().stack),r=!1}return t.apply(this,arguments)},t)}var P={};function B(e,t){d.deprecationHandler!=null&&d.deprecationHandler(e,t),P[e]||(L(t),P[e]=!0)}d.suppressDeprecationWarnings=!1,d.deprecationHandler=null;function R(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function A(e){var t,r;for(r in e)o(e,r)&&(t=e[r],R(t)?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function H(e,t){var r=p({},e),n;for(n in t)o(t,n)&&(X(e[n])&&X(t[n])?(r[n]={},p(r[n],e[n]),p(r[n],t[n])):t[n]!=null?r[n]=t[n]:delete r[n]);for(n in e)o(e,n)&&!o(t,n)&&X(e[n])&&(r[n]=p({},r[n]));return r}function J(e){e!=null&&this.set(e)}var ne;Object.keys?ne=Object.keys:ne=function(e){var t,r=[];for(t in e)o(e,t)&&r.push(t);return r};var ee={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function he(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return R(n)?n.call(t,r):n}function Z(e,t,r){var n=""+Math.abs(e),l=t-n.length,M=e>=0;return(M?r?"+":"":"-")+Math.pow(10,Math.max(0,l)).toString().substr(1)+n}var ue=/(\[[^\[]*\])|(\\)?([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,ie=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ye={},ce={};function Q(e,t,r,n){var l=n;typeof n=="string"&&(l=function(){return this[n]()}),e&&(ce[e]=l),t&&(ce[t[0]]=function(){return Z(l.apply(this,arguments),t[1],t[2])}),r&&(ce[r]=function(){return this.localeData().ordinal(l.apply(this,arguments),e)})}function ve(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function Ne(e){var t=e.match(ue),r,n;for(r=0,n=t.length;r<n;r++)ce[t[r]]?t[r]=ce[t[r]]:t[r]=ve(t[r]);return function(l){var M="",W;for(W=0;W<n;W++)M+=R(t[W])?t[W].call(l,e):t[W];return M}}function _e(e,t){return e.isValid()?(t=Ce(t,e.localeData()),ye[t]=ye[t]||Ne(t),ye[t](e)):e.localeData().invalidDate()}function Ce(e,t){var r=5;function n(l){return t.longDateFormat(l)||l}for(ie.lastIndex=0;r>=0&&ie.test(e);)e=e.replace(ie,n),ie.lastIndex=0,r-=1;return e}var Re={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"};function ze(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(ue).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[e])}var C="Invalid date";function b(){return this._invalidDate}var V="%d",k=/\d{1,2}/;function E(e){return this._ordinal.replace("%d",e)}var F={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"};function te(e,t,r,n){var l=this._relativeTime[r];return R(l)?l(e,t,r,n):l.replace(/%d/i,e)}function se(e,t){var r=this._relativeTime[e>0?"future":"past"];return R(r)?r(t):r.replace(/%s/i,t)}var be={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 de(e){return typeof e=="string"?be[e]||be[e.toLowerCase()]:void 0}function me(e){var t={},r,n;for(n in e)o(e,n)&&(r=de(n),r&&(t[r]=e[n]));return t}var xe={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};function Ae(e){var t=[],r;for(r in e)o(e,r)&&t.push({unit:r,priority:xe[r]});return t.sort(function(n,l){return n.priority-l.priority}),t}var $e=/\d/,Ie=/\d\d/,Ge=/\d{3}/,Qe=/\d{4}/,ge=/[+-]?\d{6}/,we=/\d\d?/,Ze=/\d\d\d\d?/,tt=/\d\d\d\d\d\d?/,ht=/\d{1,3}/,vt=/\d{1,4}/,pt=/[+-]?\d{1,6}/,lt=/\d+/,_t=/[+-]?\d+/,bt=/Z|[+-]\d\d:?\d\d/gi,Ue=/Z|[+-]\d\d(?::?\d\d)?/gi,gt=/[+-]?\d+(\.\d{1,3})?/,ft=/[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,ut=/^[1-9]\d?/,it=/^([1-9]\d|\d)/,zt;zt={};function ae(e,t,r){zt[e]=R(t)?t:function(n,l){return n&&r?r:t}}function Na(e,t){return o(zt,e)?zt[e](t._strict,t._locale):new RegExp(ra(e))}function ra(e){return ct(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,r,n,l,M){return r||n||l||M}))}function ct(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function st(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Se(e){var t=+e,r=0;return t!==0&&isFinite(t)&&(r=st(t)),r}var Lt={};function Ee(e,t){var r,n=t,l;for(typeof e=="string"&&(e=[e]),s(t)&&(n=function(M,W){W[t]=Se(M)}),l=e.length,r=0;r<l;r++)Lt[e[r]]=n}function Pt(e,t){Ee(e,function(r,n,l,M){l._w=l._w||{},t(r,l._w,l,M)})}function Pa(e,t,r){t!=null&&o(Lt,e)&&Lt[e](t,r._a,r,e)}function Wt(e){return e%4===0&&e%100!==0||e%400===0}var Xe=0,w=1,U=2,K=3,oe=4,Me=5,Oe=6,ke=7,De=8;Q("Y",0,0,function(){var e=this.year();return e<=9999?Z(e,4):"+"+e}),Q(0,["YY",2],0,function(){return this.year()%100}),Q(0,["YYYY",4],0,"year"),Q(0,["YYYYY",5],0,"year"),Q(0,["YYYYYY",6,!0],0,"year"),ae("Y",_t),ae("YY",we,Ie),ae("YYYY",vt,Qe),ae("YYYYY",pt,ge),ae("YYYYYY",pt,ge),Ee(["YYYYY","YYYYYY"],Xe),Ee("YYYY",function(e,t){t[Xe]=e.length===2?d.parseTwoDigitYear(e):Se(e)}),Ee("YY",function(e,t){t[Xe]=d.parseTwoDigitYear(e)}),Ee("Y",function(e,t){t[Xe]=parseInt(e,10)});function qe(e){return Wt(e)?366:365}d.parseTwoDigitYear=function(e){return Se(e)+(Se(e)>68?1900:2e3)};var We=Ke("FullYear",!0);function Be(){return Wt(this.year())}function Ke(e,t){return function(r){return r!=null?(yt(this,e,r),d.updateOffset(this,t),this):dt(this,e)}}function dt(e,t){if(!e.isValid())return NaN;var r=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return n?r.getUTCSeconds():r.getSeconds();case"Minutes":return n?r.getUTCMinutes():r.getMinutes();case"Hours":return n?r.getUTCHours():r.getHours();case"Date":return n?r.getUTCDate():r.getDate();case"Day":return n?r.getUTCDay():r.getDay();case"Month":return n?r.getUTCMonth():r.getMonth();case"FullYear":return n?r.getUTCFullYear():r.getFullYear();default:return NaN}}function yt(e,t,r){var n,l,M,W,re;if(!(!e.isValid()||isNaN(r))){switch(n=e._d,l=e._isUTC,t){case"Milliseconds":return void(l?n.setUTCMilliseconds(r):n.setMilliseconds(r));case"Seconds":return void(l?n.setUTCSeconds(r):n.setSeconds(r));case"Minutes":return void(l?n.setUTCMinutes(r):n.setMinutes(r));case"Hours":return void(l?n.setUTCHours(r):n.setHours(r));case"Date":return void(l?n.setUTCDate(r):n.setDate(r));case"FullYear":break;default:return}M=r,W=e.month(),re=e.date(),re=re===29&&W===1&&!Wt(M)?28:re,l?n.setUTCFullYear(M,W,re):n.setFullYear(M,W,re)}}function et(e){return e=de(e),R(this[e])?this[e]():this}function Jt(e,t){if(typeof e=="object"){e=me(e);var r=Ae(e),n,l=r.length;for(n=0;n<l;n++)this[r[n].unit](e[r[n].unit])}else if(e=de(e),R(this[e]))return this[e](t);return this}function Ea(e,t){return(e%t+t)%t}var He;Array.prototype.indexOf?He=Array.prototype.indexOf:He=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function Aa(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=Ea(t,12);return e+=(t-r)/12,r===1?Wt(e)?29:28:31-r%7%2}Q("M",["MM",2],"Mo",function(){return this.month()+1}),Q("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),Q("MMMM",0,0,function(e){return this.localeData().months(this,e)}),ae("M",we,ut),ae("MM",we,Ie),ae("MMM",function(e,t){return t.monthsShortRegex(e)}),ae("MMMM",function(e,t){return t.monthsRegex(e)}),Ee(["M","MM"],function(e,t){t[w]=Se(e)-1}),Ee(["MMM","MMMM"],function(e,t,r,n){var l=r._locale.monthsParse(e,n,r._strict);l!=null?t[w]=l:_(r).invalidMonth=e});var Cn="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),gr="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),yr=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Nn=ft,Pn=ft;function En(e,t){return e?$(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||yr).test(t)?"format":"standalone"][e.month()]:$(this._months)?this._months:this._months.standalone}function An(e,t){return e?$(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[yr.test(t)?"format":"standalone"][e.month()]:$(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Rn(e,t,r){var n,l,M,W=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)M=f([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(M,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(M,"").toLocaleLowerCase();return r?t==="MMM"?(l=He.call(this._shortMonthsParse,W),l!==-1?l:null):(l=He.call(this._longMonthsParse,W),l!==-1?l:null):t==="MMM"?(l=He.call(this._shortMonthsParse,W),l!==-1?l:(l=He.call(this._longMonthsParse,W),l!==-1?l:null)):(l=He.call(this._longMonthsParse,W),l!==-1?l:(l=He.call(this._shortMonthsParse,W),l!==-1?l:null))}function In(e,t,r){var n,l,M;if(this._monthsParseExact)return Rn.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(l=f([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(l,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(l,"").replace(".","")+"$","i")),!r&&!this._monthsParse[n]&&(M="^"+this.months(l,"")+"|^"+this.monthsShort(l,""),this._monthsParse[n]=new RegExp(M.replace(".",""),"i")),r&&t==="MMMM"&&this._longMonthsParse[n].test(e))return n;if(r&&t==="MMM"&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}}function vr(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=Se(t);else if(t=e.localeData().monthsParse(t),!s(t))return e}var r=t,n=e.date();return n=n<29?n:Math.min(n,Aa(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,n):e._d.setMonth(r,n),e}function _r(e){return e!=null?(vr(this,e),d.updateOffset(this,!0),this):dt(this,"Month")}function Fn(){return Aa(this.year(),this.month())}function zn(e){return this._monthsParseExact?(o(this,"_monthsRegex")||br.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(o(this,"_monthsShortRegex")||(this._monthsShortRegex=Nn),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function Ln(e){return this._monthsParseExact?(o(this,"_monthsRegex")||br.call(this),e?this._monthsStrictRegex:this._monthsRegex):(o(this,"_monthsRegex")||(this._monthsRegex=Pn),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function br(){function e(pe,je){return je.length-pe.length}var t=[],r=[],n=[],l,M,W,re;for(l=0;l<12;l++)M=f([2e3,l]),W=ct(this.monthsShort(M,"")),re=ct(this.months(M,"")),t.push(W),r.push(re),n.push(re),n.push(W);t.sort(e),r.sort(e),n.sort(e),this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Wn(e,t,r,n,l,M,W){var re;return e<100&&e>=0?(re=new Date(e+400,t,r,n,l,M,W),isFinite(re.getFullYear())&&re.setFullYear(e)):re=new Date(e,t,r,n,l,M,W),re}function Gt(e){var t,r;return e<100&&e>=0?(r=Array.prototype.slice.call(arguments),r[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function na(e,t,r){var n=7+t-r,l=(7+Gt(e,0,n).getUTCDay()-t)%7;return-l+n-1}function wr(e,t,r,n,l){var M=(7+r-n)%7,W=na(e,n,l),re=1+7*(t-1)+M+W,pe,je;return re<=0?(pe=e-1,je=qe(pe)+re):re>qe(e)?(pe=e+1,je=re-qe(e)):(pe=e,je=re),{year:pe,dayOfYear:je}}function Kt(e,t,r){var n=na(e.year(),t,r),l=Math.floor((e.dayOfYear()-n-1)/7)+1,M,W;return l<1?(W=e.year()-1,M=l+wt(W,t,r)):l>wt(e.year(),t,r)?(M=l-wt(e.year(),t,r),W=e.year()+1):(W=e.year(),M=l),{week:M,year:W}}function wt(e,t,r){var n=na(e,t,r),l=na(e+1,t,r);return(qe(e)-n+l)/7}Q("w",["ww",2],"wo","week"),Q("W",["WW",2],"Wo","isoWeek"),ae("w",we,ut),ae("ww",we,Ie),ae("W",we,ut),ae("WW",we,Ie),Pt(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=Se(e)});function Vn(e){return Kt(e,this._week.dow,this._week.doy).week}var Hn={dow:0,doy:6};function $n(){return this._week.dow}function Bn(){return this._week.doy}function Un(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function qn(e){var t=Kt(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Q("d",0,"do","day"),Q("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),Q("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),Q("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),Q("e",0,0,"weekday"),Q("E",0,0,"isoWeekday"),ae("d",we),ae("e",we),ae("E",we),ae("dd",function(e,t){return t.weekdaysMinRegex(e)}),ae("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ae("dddd",function(e,t){return t.weekdaysRegex(e)}),Pt(["dd","ddd","dddd"],function(e,t,r,n){var l=r._locale.weekdaysParse(e,n,r._strict);l!=null?t.d=l:_(r).invalidWeekday=e}),Pt(["d","e","E"],function(e,t,r,n){t[n]=Se(e)});function Jn(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function Gn(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Ra(e,t){return e.slice(t,7).concat(e.slice(0,t))}var Kn="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),xr="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Xn="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Qn=ft,Zn=ft,ei=ft;function ti(e,t){var r=$(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Ra(r,this._week.dow):e?r[e.day()]:r}function ai(e){return e===!0?Ra(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function ri(e){return e===!0?Ra(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function ni(e,t,r){var n,l,M,W=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)M=f([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(M,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(M,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(M,"").toLocaleLowerCase();return r?t==="dddd"?(l=He.call(this._weekdaysParse,W),l!==-1?l:null):t==="ddd"?(l=He.call(this._shortWeekdaysParse,W),l!==-1?l:null):(l=He.call(this._minWeekdaysParse,W),l!==-1?l:null):t==="dddd"?(l=He.call(this._weekdaysParse,W),l!==-1||(l=He.call(this._shortWeekdaysParse,W),l!==-1)?l:(l=He.call(this._minWeekdaysParse,W),l!==-1?l:null)):t==="ddd"?(l=He.call(this._shortWeekdaysParse,W),l!==-1||(l=He.call(this._weekdaysParse,W),l!==-1)?l:(l=He.call(this._minWeekdaysParse,W),l!==-1?l:null)):(l=He.call(this._minWeekdaysParse,W),l!==-1||(l=He.call(this._weekdaysParse,W),l!==-1)?l:(l=He.call(this._shortWeekdaysParse,W),l!==-1?l:null))}function ii(e,t,r){var n,l,M;if(this._weekdaysParseExact)return ni.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(l=f([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(l,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(l,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(l,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(M="^"+this.weekdays(l,"")+"|^"+this.weekdaysShort(l,"")+"|^"+this.weekdaysMin(l,""),this._weekdaysParse[n]=new RegExp(M.replace(".",""),"i")),r&&t==="dddd"&&this._fullWeekdaysParse[n].test(e))return n;if(r&&t==="ddd"&&this._shortWeekdaysParse[n].test(e))return n;if(r&&t==="dd"&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function si(e){if(!this.isValid())return e!=null?this:NaN;var t=dt(this,"Day");return e!=null?(e=Jn(e,this.localeData()),this.add(e-t,"d")):t}function oi(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function li(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=Gn(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function ui(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Ia.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,"_weekdaysRegex")||(this._weekdaysRegex=Qn),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function ci(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Ia.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Zn),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function di(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Ia.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ei),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Ia(){function e(at,kt){return kt.length-at.length}var t=[],r=[],n=[],l=[],M,W,re,pe,je;for(M=0;M<7;M++)W=f([2e3,1]).day(M),re=ct(this.weekdaysMin(W,"")),pe=ct(this.weekdaysShort(W,"")),je=ct(this.weekdays(W,"")),t.push(re),r.push(pe),n.push(je),l.push(re),l.push(pe),l.push(je);t.sort(e),r.sort(e),n.sort(e),l.sort(e),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Fa(){return this.hours()%12||12}function hi(){return this.hours()||24}Q("H",["HH",2],0,"hour"),Q("h",["hh",2],0,Fa),Q("k",["kk",2],0,hi),Q("hmm",0,0,function(){return""+Fa.apply(this)+Z(this.minutes(),2)}),Q("hmmss",0,0,function(){return""+Fa.apply(this)+Z(this.minutes(),2)+Z(this.seconds(),2)}),Q("Hmm",0,0,function(){return""+this.hours()+Z(this.minutes(),2)}),Q("Hmmss",0,0,function(){return""+this.hours()+Z(this.minutes(),2)+Z(this.seconds(),2)});function Mr(e,t){Q(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Mr("a",!0),Mr("A",!1);function Sr(e,t){return t._meridiemParse}ae("a",Sr),ae("A",Sr),ae("H",we,it),ae("h",we,ut),ae("k",we,ut),ae("HH",we,Ie),ae("hh",we,Ie),ae("kk",we,Ie),ae("hmm",Ze),ae("hmmss",tt),ae("Hmm",Ze),ae("Hmmss",tt),Ee(["H","HH"],K),Ee(["k","kk"],function(e,t,r){var n=Se(e);t[K]=n===24?0:n}),Ee(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e}),Ee(["h","hh"],function(e,t,r){t[K]=Se(e),_(r).bigHour=!0}),Ee("hmm",function(e,t,r){var n=e.length-2;t[K]=Se(e.substr(0,n)),t[oe]=Se(e.substr(n)),_(r).bigHour=!0}),Ee("hmmss",function(e,t,r){var n=e.length-4,l=e.length-2;t[K]=Se(e.substr(0,n)),t[oe]=Se(e.substr(n,2)),t[Me]=Se(e.substr(l)),_(r).bigHour=!0}),Ee("Hmm",function(e,t,r){var n=e.length-2;t[K]=Se(e.substr(0,n)),t[oe]=Se(e.substr(n))}),Ee("Hmmss",function(e,t,r){var n=e.length-4,l=e.length-2;t[K]=Se(e.substr(0,n)),t[oe]=Se(e.substr(n,2)),t[Me]=Se(e.substr(l))});function fi(e){return(e+"").toLowerCase().charAt(0)==="p"}var mi=/[ap]\.?m?\.?/i,pi=Ke("Hours",!0);function gi(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var Dr={calendar:ee,longDateFormat:Re,invalidDate:C,ordinal:V,dayOfMonthOrdinalParse:k,relativeTime:F,months:Cn,monthsShort:gr,week:Hn,weekdays:Kn,weekdaysMin:Xn,weekdaysShort:xr,meridiemParse:mi},Ve={},Xt={},Qt;function yi(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r+=1)if(e[r]!==t[r])return r;return n}function kr(e){return e&&e.toLowerCase().replace("_","-")}function vi(e){for(var t=0,r,n,l,M;t<e.length;){for(M=kr(e[t]).split("-"),r=M.length,n=kr(e[t+1]),n=n?n.split("-"):null;r>0;){if(l=ia(M.slice(0,r).join("-")),l)return l;if(n&&n.length>=r&&yi(M,n)>=r-1)break;r--}t++}return Qt}function _i(e){return!!(e&&e.match("^[^/\\\\]*$"))}function ia(e){var t=null,r;if(Ve[e]===void 0&&y&&y.exports&&_i(e))try{t=Qt._abbr,r=Ca,r("./locale/"+e),Ot(t)}catch{Ve[e]=null}return Ve[e]}function Ot(e,t){var r;return e&&(a(t)?r=xt(e):r=za(e,t),r?Qt=r:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Qt._abbr}function za(e,t){if(t!==null){var r,n=Dr;if(t.abbr=e,Ve[e]!=null)B("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."),n=Ve[e]._config;else if(t.parentLocale!=null)if(Ve[t.parentLocale]!=null)n=Ve[t.parentLocale]._config;else if(r=ia(t.parentLocale),r!=null)n=r._config;else return Xt[t.parentLocale]||(Xt[t.parentLocale]=[]),Xt[t.parentLocale].push({name:e,config:t}),null;return Ve[e]=new J(H(n,t)),Xt[e]&&Xt[e].forEach(function(l){za(l.name,l.config)}),Ot(e),Ve[e]}else return delete Ve[e],null}function bi(e,t){if(t!=null){var r,n,l=Dr;Ve[e]!=null&&Ve[e].parentLocale!=null?Ve[e].set(H(Ve[e]._config,t)):(n=ia(e),n!=null&&(l=n._config),t=H(l,t),n==null&&(t.abbr=e),r=new J(t),r.parentLocale=Ve[e],Ve[e]=r),Ot(e)}else Ve[e]!=null&&(Ve[e].parentLocale!=null?(Ve[e]=Ve[e].parentLocale,e===Ot()&&Ot(e)):Ve[e]!=null&&delete Ve[e]);return Ve[e]}function xt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Qt;if(!$(e)){if(t=ia(e),t)return t;e=[e]}return vi(e)}function wi(){return ne(Ve)}function La(e){var t,r=e._a;return r&&_(e).overflow===-2&&(t=r[w]<0||r[w]>11?w:r[U]<1||r[U]>Aa(r[Xe],r[w])?U:r[K]<0||r[K]>24||r[K]===24&&(r[oe]!==0||r[Me]!==0||r[Oe]!==0)?K:r[oe]<0||r[oe]>59?oe:r[Me]<0||r[Me]>59?Me:r[Oe]<0||r[Oe]>999?Oe:-1,_(e)._overflowDayOfYear&&(t<Xe||t>U)&&(t=U),_(e)._overflowWeeks&&t===-1&&(t=ke),_(e)._overflowWeekday&&t===-1&&(t=De),_(e).overflow=t),e}var xi=/^\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)?)?$/,Mi=/^\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)?)?$/,Si=/Z|[+-]\d\d(?::?\d\d)?/,sa=[["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]],Wa=[["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/]],Di=/^\/?Date\((-?\d+)/i,ki=/^(?:(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}))$/,Yi={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Yr(e){var t,r,n=e._i,l=xi.exec(n)||Mi.exec(n),M,W,re,pe,je=sa.length,at=Wa.length;if(l){for(_(e).iso=!0,t=0,r=je;t<r;t++)if(sa[t][1].exec(l[1])){W=sa[t][0],M=sa[t][2]!==!1;break}if(W==null){e._isValid=!1;return}if(l[3]){for(t=0,r=at;t<r;t++)if(Wa[t][1].exec(l[3])){re=(l[2]||" ")+Wa[t][0];break}if(re==null){e._isValid=!1;return}}if(!M&&re!=null){e._isValid=!1;return}if(l[4])if(Si.exec(l[4]))pe="Z";else{e._isValid=!1;return}e._f=W+(re||"")+(pe||""),Ha(e)}else e._isValid=!1}function Oi(e,t,r,n,l,M){var W=[ji(e),gr.indexOf(t),parseInt(r,10),parseInt(n,10),parseInt(l,10)];return M&&W.push(parseInt(M,10)),W}function ji(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Ti(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Ci(e,t,r){if(e){var n=xr.indexOf(e),l=new Date(t[0],t[1],t[2]).getDay();if(n!==l)return _(r).weekdayMismatch=!0,r._isValid=!1,!1}return!0}function Ni(e,t,r){if(e)return Yi[e];if(t)return 0;var n=parseInt(r,10),l=n%100,M=(n-l)/100;return M*60+l}function Or(e){var t=ki.exec(Ti(e._i)),r;if(t){if(r=Oi(t[4],t[3],t[2],t[5],t[6],t[7]),!Ci(t[1],r,e))return;e._a=r,e._tzm=Ni(t[8],t[9],t[10]),e._d=Gt.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),_(e).rfc2822=!0}else e._isValid=!1}function Pi(e){var t=Di.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(Yr(e),e._isValid===!1)delete e._isValid;else return;if(Or(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:d.createFromInputFallback(e)}d.createFromInputFallback=m("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":""))});function Vt(e,t,r){return e??t??r}function Ei(e){var t=new Date(d.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Va(e){var t,r,n=[],l,M,W;if(!e._d){for(l=Ei(e),e._w&&e._a[U]==null&&e._a[w]==null&&Ai(e),e._dayOfYear!=null&&(W=Vt(e._a[Xe],l[Xe]),(e._dayOfYear>qe(W)||e._dayOfYear===0)&&(_(e)._overflowDayOfYear=!0),r=Gt(W,0,e._dayOfYear),e._a[w]=r.getUTCMonth(),e._a[U]=r.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=n[t]=l[t];for(;t<7;t++)e._a[t]=n[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[K]===24&&e._a[oe]===0&&e._a[Me]===0&&e._a[Oe]===0&&(e._nextDay=!0,e._a[K]=0),e._d=(e._useUTC?Gt:Wn).apply(null,n),M=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[K]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==M&&(_(e).weekdayMismatch=!0)}}function Ai(e){var t,r,n,l,M,W,re,pe,je;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(M=1,W=4,r=Vt(t.GG,e._a[Xe],Kt(Le(),1,4).year),n=Vt(t.W,1),l=Vt(t.E,1),(l<1||l>7)&&(pe=!0)):(M=e._locale._week.dow,W=e._locale._week.doy,je=Kt(Le(),M,W),r=Vt(t.gg,e._a[Xe],je.year),n=Vt(t.w,je.week),t.d!=null?(l=t.d,(l<0||l>6)&&(pe=!0)):t.e!=null?(l=t.e+M,(t.e<0||t.e>6)&&(pe=!0)):l=M),n<1||n>wt(r,M,W)?_(e)._overflowWeeks=!0:pe!=null?_(e)._overflowWeekday=!0:(re=wr(r,n,l,M,W),e._a[Xe]=re.year,e._dayOfYear=re.dayOfYear)}d.ISO_8601=function(){},d.RFC_2822=function(){};function Ha(e){if(e._f===d.ISO_8601){Yr(e);return}if(e._f===d.RFC_2822){Or(e);return}e._a=[],_(e).empty=!0;var t=""+e._i,r,n,l,M,W,re=t.length,pe=0,je,at;for(l=Ce(e._f,e._locale).match(ue)||[],at=l.length,r=0;r<at;r++)M=l[r],n=(t.match(Na(M,e))||[])[0],n&&(W=t.substr(0,t.indexOf(n)),W.length>0&&_(e).unusedInput.push(W),t=t.slice(t.indexOf(n)+n.length),pe+=n.length),ce[M]?(n?_(e).empty=!1:_(e).unusedTokens.push(M),Pa(M,n,e)):e._strict&&!n&&_(e).unusedTokens.push(M);_(e).charsLeftOver=re-pe,t.length>0&&_(e).unusedInput.push(t),e._a[K]<=12&&_(e).bigHour===!0&&e._a[K]>0&&(_(e).bigHour=void 0),_(e).parsedDateParts=e._a.slice(0),_(e).meridiem=e._meridiem,e._a[K]=Ri(e._locale,e._a[K],e._meridiem),je=_(e).era,je!==null&&(e._a[Xe]=e._locale.erasConvertYear(je,e._a[Xe])),Va(e),La(e)}function Ri(e,t,r){var n;return r==null?t:e.meridiemHour!=null?e.meridiemHour(t,r):(e.isPM!=null&&(n=e.isPM(r),n&&t<12&&(t+=12),!n&&t===12&&(t=0)),t)}function Ii(e){var t,r,n,l,M,W,re=!1,pe=e._f.length;if(pe===0){_(e).invalidFormat=!0,e._d=new Date(NaN);return}for(l=0;l<pe;l++)M=0,W=!1,t=S({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[l],Ha(t),Y(t)&&(W=!0),M+=_(t).charsLeftOver,M+=_(t).unusedTokens.length*10,_(t).score=M,re?M<n&&(n=M,r=t):(n==null||M<n||W)&&(n=M,r=t,W&&(re=!0));p(e,r||t)}function Fi(e){if(!e._d){var t=me(e._i),r=t.day===void 0?t.date:t.day;e._a=c([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)}),Va(e)}}function zi(e){var t=new v(La(jr(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function jr(e){var t=e._i,r=e._f;return e._locale=e._locale||xt(e._l),t===null||r===void 0&&t===""?O({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),T(t)?new v(La(t)):(u(t)?e._d=t:$(r)?Ii(e):r?Ha(e):Li(e),Y(e)||(e._d=null),e))}function Li(e){var t=e._i;a(t)?e._d=new Date(d.now()):u(t)?e._d=new Date(t.valueOf()):typeof t=="string"?Pi(e):$(t)?(e._a=c(t.slice(0),function(r){return parseInt(r,10)}),Va(e)):X(t)?Fi(e):s(t)?e._d=new Date(t):d.createFromInputFallback(e)}function Tr(e,t,r,n,l){var M={};return(t===!0||t===!1)&&(n=t,t=void 0),(r===!0||r===!1)&&(n=r,r=void 0),(X(e)&&x(e)||$(e)&&e.length===0)&&(e=void 0),M._isAMomentObject=!0,M._useUTC=M._isUTC=l,M._l=r,M._i=e,M._f=t,M._strict=n,zi(M)}function Le(e,t,r,n){return Tr(e,t,r,n,!1)}var Wi=m("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Le.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:O()}),Vi=m("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Le.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:O()});function Cr(e,t){var r,n;if(t.length===1&&$(t[0])&&(t=t[0]),!t.length)return Le();for(r=t[0],n=1;n<t.length;++n)(!t[n].isValid()||t[n][e](r))&&(r=t[n]);return r}function Hi(){var e=[].slice.call(arguments,0);return Cr("isBefore",e)}function $i(){var e=[].slice.call(arguments,0);return Cr("isAfter",e)}var Bi=function(){return Date.now?Date.now():+new Date},Zt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ui(e){var t,r=!1,n,l=Zt.length;for(t in e)if(o(e,t)&&!(He.call(Zt,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(n=0;n<l;++n)if(e[Zt[n]]){if(r)return!1;parseFloat(e[Zt[n]])!==Se(e[Zt[n]])&&(r=!0)}return!0}function qi(){return this._isValid}function Ji(){return mt(NaN)}function oa(e){var t=me(e),r=t.year||0,n=t.quarter||0,l=t.month||0,M=t.week||t.isoWeek||0,W=t.day||0,re=t.hour||0,pe=t.minute||0,je=t.second||0,at=t.millisecond||0;this._isValid=Ui(t),this._milliseconds=+at+je*1e3+pe*6e4+re*1e3*60*60,this._days=+W+M*7,this._months=+l+n*3+r*12,this._data={},this._locale=xt(),this._bubble()}function la(e){return e instanceof oa}function $a(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function Gi(e,t,r){var n=Math.min(e.length,t.length),l=Math.abs(e.length-t.length),M=0,W;for(W=0;W<n;W++)Se(e[W])!==Se(t[W])&&M++;return M+l}function Nr(e,t){Q(e,0,0,function(){var r=this.utcOffset(),n="+";return r<0&&(r=-r,n="-"),n+Z(~~(r/60),2)+t+Z(~~r%60,2)})}Nr("Z",":"),Nr("ZZ",""),ae("Z",Ue),ae("ZZ",Ue),Ee(["Z","ZZ"],function(e,t,r){r._useUTC=!0,r._tzm=Ba(Ue,e)});var Ki=/([\+\-]|\d\d)/gi;function Ba(e,t){var r=(t||"").match(e),n,l,M;return r===null?null:(n=r[r.length-1]||[],l=(n+"").match(Ki)||["-",0,0],M=+(l[1]*60)+Se(l[2]),M===0?0:l[0]==="+"?M:-M)}function Ua(e,t){var r,n;return t._isUTC?(r=t.clone(),n=(T(e)||u(e)?e.valueOf():Le(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+n),d.updateOffset(r,!1),r):Le(e).local()}function qa(e){return-Math.round(e._d.getTimezoneOffset())}d.updateOffset=function(){};function Xi(e,t,r){var n=this._offset||0,l;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=Ba(Ue,e),e===null)return this}else Math.abs(e)<16&&!r&&(e=e*60);return!this._isUTC&&t&&(l=qa(this)),this._offset=e,this._isUTC=!0,l!=null&&this.add(l,"m"),n!==e&&(!t||this._changeInProgress?Rr(this,mt(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,d.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?n:qa(this)}function Qi(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function Zi(e){return this.utcOffset(0,e)}function es(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(qa(this),"m")),this}function ts(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=Ba(bt,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function as(e){return this.isValid()?(e=e?Le(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function rs(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function ns(){if(!a(this._isDSTShifted))return this._isDSTShifted;var e={},t;return S(e,this),e=jr(e),e._a?(t=e._isUTC?f(e._a):Le(e._a),this._isDSTShifted=this.isValid()&&Gi(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function is(){return this.isValid()?!this._isUTC:!1}function ss(){return this.isValid()?this._isUTC:!1}function Pr(){return this.isValid()?this._isUTC&&this._offset===0:!1}var os=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,ls=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function mt(e,t){var r=e,n=null,l,M,W;return la(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:s(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(n=os.exec(e))?(l=n[1]==="-"?-1:1,r={y:0,d:Se(n[U])*l,h:Se(n[K])*l,m:Se(n[oe])*l,s:Se(n[Me])*l,ms:Se($a(n[Oe]*1e3))*l}):(n=ls.exec(e))?(l=n[1]==="-"?-1:1,r={y:Et(n[2],l),M:Et(n[3],l),w:Et(n[4],l),d:Et(n[5],l),h:Et(n[6],l),m:Et(n[7],l),s:Et(n[8],l)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(W=us(Le(r.from),Le(r.to)),r={},r.ms=W.milliseconds,r.M=W.months),M=new oa(r),la(e)&&o(e,"_locale")&&(M._locale=e._locale),la(e)&&o(e,"_isValid")&&(M._isValid=e._isValid),M}mt.fn=oa.prototype,mt.invalid=Ji;function Et(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function Er(e,t){var r={};return r.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function us(e,t){var r;return e.isValid()&&t.isValid()?(t=Ua(t,e),e.isBefore(t)?r=Er(e,t):(r=Er(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function Ar(e,t){return function(r,n){var l,M;return n!==null&&!isNaN(+n)&&(B(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."),M=r,r=n,n=M),l=mt(r,n),Rr(this,l,e),this}}function Rr(e,t,r,n){var l=t._milliseconds,M=$a(t._days),W=$a(t._months);e.isValid()&&(n=n??!0,W&&vr(e,dt(e,"Month")+W*r),M&&yt(e,"Date",dt(e,"Date")+M*r),l&&e._d.setTime(e._d.valueOf()+l*r),n&&d.updateOffset(e,M||W))}var cs=Ar(1,"add"),ds=Ar(-1,"subtract");function Ir(e){return typeof e=="string"||e instanceof String}function hs(e){return T(e)||u(e)||Ir(e)||s(e)||ms(e)||fs(e)||e===null||e===void 0}function fs(e){var t=X(e)&&!x(e),r=!1,n=["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,M,W=n.length;for(l=0;l<W;l+=1)M=n[l],r=r||o(e,M);return t&&r}function ms(e){var t=$(e),r=!1;return t&&(r=e.filter(function(n){return!s(n)&&Ir(e)}).length===0),t&&r}function ps(e){var t=X(e)&&!x(e),r=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],l,M;for(l=0;l<n.length;l+=1)M=n[l],r=r||o(e,M);return t&&r}function gs(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"}function ys(e,t){arguments.length===1&&(arguments[0]?hs(arguments[0])?(e=arguments[0],t=void 0):ps(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||Le(),n=Ua(r,this).startOf("day"),l=d.calendarFormat(this,n)||"sameElse",M=t&&(R(t[l])?t[l].call(this,r):t[l]);return this.format(M||this.localeData().calendar(l,this,Le(r)))}function vs(){return new v(this)}function _s(e,t){var r=T(e)?e:Le(e);return this.isValid()&&r.isValid()?(t=de(t)||"millisecond",t==="millisecond"?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf()):!1}function bs(e,t){var r=T(e)?e:Le(e);return this.isValid()&&r.isValid()?(t=de(t)||"millisecond",t==="millisecond"?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf()):!1}function ws(e,t,r,n){var l=T(e)?e:Le(e),M=T(t)?t:Le(t);return this.isValid()&&l.isValid()&&M.isValid()?(n=n||"()",(n[0]==="("?this.isAfter(l,r):!this.isBefore(l,r))&&(n[1]===")"?this.isBefore(M,r):!this.isAfter(M,r))):!1}function xs(e,t){var r=T(e)?e:Le(e),n;return this.isValid()&&r.isValid()?(t=de(t)||"millisecond",t==="millisecond"?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf())):!1}function Ms(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Ss(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Ds(e,t,r){var n,l,M;if(!this.isValid())return NaN;if(n=Ua(e,this),!n.isValid())return NaN;switch(l=(n.utcOffset()-this.utcOffset())*6e4,t=de(t),t){case"year":M=ua(this,n)/12;break;case"month":M=ua(this,n);break;case"quarter":M=ua(this,n)/3;break;case"second":M=(this-n)/1e3;break;case"minute":M=(this-n)/6e4;break;case"hour":M=(this-n)/36e5;break;case"day":M=(this-n-l)/864e5;break;case"week":M=(this-n-l)/6048e5;break;default:M=this-n}return r?M:st(M)}function ua(e,t){if(e.date()<t.date())return-ua(t,e);var r=(t.year()-e.year())*12+(t.month()-e.month()),n=e.clone().add(r,"months"),l,M;return t-n<0?(l=e.clone().add(r-1,"months"),M=(t-n)/(n-l)):(l=e.clone().add(r+1,"months"),M=(t-n)/(l-n)),-(r+M)||0}d.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",d.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function ks(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Ys(e){if(!this.isValid())return null;var t=e!==!0,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?_e(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):R(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",_e(r,"Z")):_e(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Os(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,n,l,M;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),r="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",l="-MM-DD[T]HH:mm:ss.SSS",M=t+'[")]',this.format(r+n+l+M)}function js(e){e||(e=this.isUtc()?d.defaultFormatUtc:d.defaultFormat);var t=_e(this,e);return this.localeData().postformat(t)}function Ts(e,t){return this.isValid()&&(T(e)&&e.isValid()||Le(e).isValid())?mt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Cs(e){return this.from(Le(),e)}function Ns(e,t){return this.isValid()&&(T(e)&&e.isValid()||Le(e).isValid())?mt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Ps(e){return this.to(Le(),e)}function Fr(e){var t;return e===void 0?this._locale._abbr:(t=xt(e),t!=null&&(this._locale=t),this)}var zr=m("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Lr(){return this._locale}var ca=1e3,Ht=60*ca,da=60*Ht,Wr=(365*400+97)*24*da;function $t(e,t){return(e%t+t)%t}function Vr(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-Wr:new Date(e,t,r).valueOf()}function Hr(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-Wr:Date.UTC(e,t,r)}function Es(e){var t,r;if(e=de(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?Hr:Vr,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=$t(t+(this._isUTC?0:this.utcOffset()*Ht),da);break;case"minute":t=this._d.valueOf(),t-=$t(t,Ht);break;case"second":t=this._d.valueOf(),t-=$t(t,ca);break}return this._d.setTime(t),d.updateOffset(this,!0),this}function As(e){var t,r;if(e=de(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?Hr:Vr,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=da-$t(t+(this._isUTC?0:this.utcOffset()*Ht),da)-1;break;case"minute":t=this._d.valueOf(),t+=Ht-$t(t,Ht)-1;break;case"second":t=this._d.valueOf(),t+=ca-$t(t,ca)-1;break}return this._d.setTime(t),d.updateOffset(this,!0),this}function Rs(){return this._d.valueOf()-(this._offset||0)*6e4}function Is(){return Math.floor(this.valueOf()/1e3)}function Fs(){return new Date(this.valueOf())}function zs(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Ls(){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()}}function Ws(){return this.isValid()?this.toISOString():null}function Vs(){return Y(this)}function Hs(){return p({},_(this))}function $s(){return _(this).overflow}function Bs(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Q("N",0,0,"eraAbbr"),Q("NN",0,0,"eraAbbr"),Q("NNN",0,0,"eraAbbr"),Q("NNNN",0,0,"eraName"),Q("NNNNN",0,0,"eraNarrow"),Q("y",["y",1],"yo","eraYear"),Q("y",["yy",2],0,"eraYear"),Q("y",["yyy",3],0,"eraYear"),Q("y",["yyyy",4],0,"eraYear"),ae("N",Ja),ae("NN",Ja),ae("NNN",Ja),ae("NNNN",ao),ae("NNNNN",ro),Ee(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,n){var l=r._locale.erasParse(e,n,r._strict);l?_(r).era=l:_(r).invalidEra=e}),ae("y",lt),ae("yy",lt),ae("yyy",lt),ae("yyyy",lt),ae("yo",no),Ee(["y","yy","yyy","yyyy"],Xe),Ee(["yo"],function(e,t,r,n){var l;r._locale._eraYearOrdinalRegex&&(l=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[Xe]=r._locale.eraYearOrdinalParse(e,l):t[Xe]=parseInt(e,10)});function Us(e,t){var r,n,l,M=this._eras||xt("en")._eras;for(r=0,n=M.length;r<n;++r){switch(typeof M[r].since){case"string":l=d(M[r].since).startOf("day"),M[r].since=l.valueOf();break}switch(typeof M[r].until){case"undefined":M[r].until=1/0;break;case"string":l=d(M[r].until).startOf("day").valueOf(),M[r].until=l.valueOf();break}}return M}function qs(e,t,r){var n,l,M=this.eras(),W,re,pe;for(e=e.toUpperCase(),n=0,l=M.length;n<l;++n)if(W=M[n].name.toUpperCase(),re=M[n].abbr.toUpperCase(),pe=M[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(re===e)return M[n];break;case"NNNN":if(W===e)return M[n];break;case"NNNNN":if(pe===e)return M[n];break}else if([W,re,pe].indexOf(e)>=0)return M[n]}function Js(e,t){var r=e.since<=e.until?1:-1;return t===void 0?d(e.since).year():d(e.since).year()+(t-e.offset)*r}function Gs(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].name;return""}function Ks(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].narrow;return""}function Xs(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].abbr;return""}function Qs(){var e,t,r,n,l=this.localeData().eras();for(e=0,t=l.length;e<t;++e)if(r=l[e].since<=l[e].until?1:-1,n=this.clone().startOf("day").valueOf(),l[e].since<=n&&n<=l[e].until||l[e].until<=n&&n<=l[e].since)return(this.year()-d(l[e].since).year())*r+l[e].offset;return this.year()}function Zs(e){return o(this,"_erasNameRegex")||Ga.call(this),e?this._erasNameRegex:this._erasRegex}function eo(e){return o(this,"_erasAbbrRegex")||Ga.call(this),e?this._erasAbbrRegex:this._erasRegex}function to(e){return o(this,"_erasNarrowRegex")||Ga.call(this),e?this._erasNarrowRegex:this._erasRegex}function Ja(e,t){return t.erasAbbrRegex(e)}function ao(e,t){return t.erasNameRegex(e)}function ro(e,t){return t.erasNarrowRegex(e)}function no(e,t){return t._eraYearOrdinalRegex||lt}function Ga(){var e=[],t=[],r=[],n=[],l,M,W,re,pe,je=this.eras();for(l=0,M=je.length;l<M;++l)W=ct(je[l].name),re=ct(je[l].abbr),pe=ct(je[l].narrow),t.push(W),e.push(re),r.push(pe),n.push(W),n.push(re),n.push(pe);this._erasRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}Q(0,["gg",2],0,function(){return this.weekYear()%100}),Q(0,["GG",2],0,function(){return this.isoWeekYear()%100});function ha(e,t){Q(0,[e,e.length],0,t)}ha("gggg","weekYear"),ha("ggggg","weekYear"),ha("GGGG","isoWeekYear"),ha("GGGGG","isoWeekYear"),ae("G",_t),ae("g",_t),ae("GG",we,Ie),ae("gg",we,Ie),ae("GGGG",vt,Qe),ae("gggg",vt,Qe),ae("GGGGG",pt,ge),ae("ggggg",pt,ge),Pt(["gggg","ggggg","GGGG","GGGGG"],function(e,t,r,n){t[n.substr(0,2)]=Se(e)}),Pt(["gg","GG"],function(e,t,r,n){t[n]=d.parseTwoDigitYear(e)});function io(e){return $r.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function so(e){return $r.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function oo(){return wt(this.year(),1,4)}function lo(){return wt(this.isoWeekYear(),1,4)}function uo(){var e=this.localeData()._week;return wt(this.year(),e.dow,e.doy)}function co(){var e=this.localeData()._week;return wt(this.weekYear(),e.dow,e.doy)}function $r(e,t,r,n,l){var M;return e==null?Kt(this,n,l).year:(M=wt(e,n,l),t>M&&(t=M),ho.call(this,e,t,r,n,l))}function ho(e,t,r,n,l){var M=wr(e,t,r,n,l),W=Gt(M.year,0,M.dayOfYear);return this.year(W.getUTCFullYear()),this.month(W.getUTCMonth()),this.date(W.getUTCDate()),this}Q("Q",0,"Qo","quarter"),ae("Q",$e),Ee("Q",function(e,t){t[w]=(Se(e)-1)*3});function fo(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Q("D",["DD",2],"Do","date"),ae("D",we,ut),ae("DD",we,Ie),ae("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),Ee(["D","DD"],U),Ee("Do",function(e,t){t[U]=Se(e.match(we)[0])});var Br=Ke("Date",!0);Q("DDD",["DDDD",3],"DDDo","dayOfYear"),ae("DDD",ht),ae("DDDD",Ge),Ee(["DDD","DDDD"],function(e,t,r){r._dayOfYear=Se(e)});function mo(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Q("m",["mm",2],0,"minute"),ae("m",we,it),ae("mm",we,Ie),Ee(["m","mm"],oe);var po=Ke("Minutes",!1);Q("s",["ss",2],0,"second"),ae("s",we,it),ae("ss",we,Ie),Ee(["s","ss"],Me);var go=Ke("Seconds",!1);Q("S",0,0,function(){return~~(this.millisecond()/100)}),Q(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Q(0,["SSS",3],0,"millisecond"),Q(0,["SSSS",4],0,function(){return this.millisecond()*10}),Q(0,["SSSSS",5],0,function(){return this.millisecond()*100}),Q(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),Q(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),Q(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),Q(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),ae("S",ht,$e),ae("SS",ht,Ie),ae("SSS",ht,Ge);var jt,Ur;for(jt="SSSS";jt.length<=9;jt+="S")ae(jt,lt);function yo(e,t){t[Oe]=Se(("0."+e)*1e3)}for(jt="S";jt.length<=9;jt+="S")Ee(jt,yo);Ur=Ke("Milliseconds",!1),Q("z",0,0,"zoneAbbr"),Q("zz",0,0,"zoneName");function vo(){return this._isUTC?"UTC":""}function _o(){return this._isUTC?"Coordinated Universal Time":""}var G=v.prototype;G.add=cs,G.calendar=ys,G.clone=vs,G.diff=Ds,G.endOf=As,G.format=js,G.from=Ts,G.fromNow=Cs,G.to=Ns,G.toNow=Ps,G.get=et,G.invalidAt=$s,G.isAfter=_s,G.isBefore=bs,G.isBetween=ws,G.isSame=xs,G.isSameOrAfter=Ms,G.isSameOrBefore=Ss,G.isValid=Vs,G.lang=zr,G.locale=Fr,G.localeData=Lr,G.max=Vi,G.min=Wi,G.parsingFlags=Hs,G.set=Jt,G.startOf=Es,G.subtract=ds,G.toArray=zs,G.toObject=Ls,G.toDate=Fs,G.toISOString=Ys,G.inspect=Os,typeof Symbol<"u"&&Symbol.for!=null&&(G[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),G.toJSON=Ws,G.toString=ks,G.unix=Is,G.valueOf=Rs,G.creationData=Bs,G.eraName=Gs,G.eraNarrow=Ks,G.eraAbbr=Xs,G.eraYear=Qs,G.year=We,G.isLeapYear=Be,G.weekYear=io,G.isoWeekYear=so,G.quarter=G.quarters=fo,G.month=_r,G.daysInMonth=Fn,G.week=G.weeks=Un,G.isoWeek=G.isoWeeks=qn,G.weeksInYear=uo,G.weeksInWeekYear=co,G.isoWeeksInYear=oo,G.isoWeeksInISOWeekYear=lo,G.date=Br,G.day=G.days=si,G.weekday=oi,G.isoWeekday=li,G.dayOfYear=mo,G.hour=G.hours=pi,G.minute=G.minutes=po,G.second=G.seconds=go,G.millisecond=G.milliseconds=Ur,G.utcOffset=Xi,G.utc=Zi,G.local=es,G.parseZone=ts,G.hasAlignedHourOffset=as,G.isDST=rs,G.isLocal=is,G.isUtcOffset=ss,G.isUtc=Pr,G.isUTC=Pr,G.zoneAbbr=vo,G.zoneName=_o,G.dates=m("dates accessor is deprecated. Use date instead.",Br),G.months=m("months accessor is deprecated. Use month instead",_r),G.years=m("years accessor is deprecated. Use year instead",We),G.zone=m("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Qi),G.isDSTShifted=m("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",ns);function bo(e){return Le(e*1e3)}function wo(){return Le.apply(null,arguments).parseZone()}function qr(e){return e}var Pe=J.prototype;Pe.calendar=he,Pe.longDateFormat=ze,Pe.invalidDate=b,Pe.ordinal=E,Pe.preparse=qr,Pe.postformat=qr,Pe.relativeTime=te,Pe.pastFuture=se,Pe.set=A,Pe.eras=Us,Pe.erasParse=qs,Pe.erasConvertYear=Js,Pe.erasAbbrRegex=eo,Pe.erasNameRegex=Zs,Pe.erasNarrowRegex=to,Pe.months=En,Pe.monthsShort=An,Pe.monthsParse=In,Pe.monthsRegex=Ln,Pe.monthsShortRegex=zn,Pe.week=Vn,Pe.firstDayOfYear=Bn,Pe.firstDayOfWeek=$n,Pe.weekdays=ti,Pe.weekdaysMin=ri,Pe.weekdaysShort=ai,Pe.weekdaysParse=ii,Pe.weekdaysRegex=ui,Pe.weekdaysShortRegex=ci,Pe.weekdaysMinRegex=di,Pe.isPM=fi,Pe.meridiem=gi;function fa(e,t,r,n){var l=xt(),M=f().set(n,t);return l[r](M,e)}function Jr(e,t,r){if(s(e)&&(t=e,e=void 0),e=e||"",t!=null)return fa(e,t,r,"month");var n,l=[];for(n=0;n<12;n++)l[n]=fa(e,n,r,"month");return l}function Ka(e,t,r,n){typeof e=="boolean"?(s(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,s(t)&&(r=t,t=void 0),t=t||"");var l=xt(),M=e?l._week.dow:0,W,re=[];if(r!=null)return fa(t,(r+M)%7,n,"day");for(W=0;W<7;W++)re[W]=fa(t,(W+M)%7,n,"day");return re}function xo(e,t){return Jr(e,t,"months")}function Mo(e,t){return Jr(e,t,"monthsShort")}function So(e,t,r){return Ka(e,t,r,"weekdays")}function Do(e,t,r){return Ka(e,t,r,"weekdaysShort")}function ko(e,t,r){return Ka(e,t,r,"weekdaysMin")}Ot("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,r=Se(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+r}}),d.lang=m("moment.lang is deprecated. Use moment.locale instead.",Ot),d.langData=m("moment.langData is deprecated. Use moment.localeData instead.",xt);var Mt=Math.abs;function Yo(){var e=this._data;return this._milliseconds=Mt(this._milliseconds),this._days=Mt(this._days),this._months=Mt(this._months),e.milliseconds=Mt(e.milliseconds),e.seconds=Mt(e.seconds),e.minutes=Mt(e.minutes),e.hours=Mt(e.hours),e.months=Mt(e.months),e.years=Mt(e.years),this}function Gr(e,t,r,n){var l=mt(t,r);return e._milliseconds+=n*l._milliseconds,e._days+=n*l._days,e._months+=n*l._months,e._bubble()}function Oo(e,t){return Gr(this,e,t,1)}function jo(e,t){return Gr(this,e,t,-1)}function Kr(e){return e<0?Math.floor(e):Math.ceil(e)}function To(){var e=this._milliseconds,t=this._days,r=this._months,n=this._data,l,M,W,re,pe;return e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0||(e+=Kr(Xa(r)+t)*864e5,t=0,r=0),n.milliseconds=e%1e3,l=st(e/1e3),n.seconds=l%60,M=st(l/60),n.minutes=M%60,W=st(M/60),n.hours=W%24,t+=st(W/24),pe=st(Xr(t)),r+=pe,t-=Kr(Xa(pe)),re=st(r/12),r%=12,n.days=t,n.months=r,n.years=re,this}function Xr(e){return e*4800/146097}function Xa(e){return e*146097/4800}function Co(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if(e=de(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+n/864e5,r=this._months+Xr(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(Xa(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return t*24+n/36e5;case"minute":return t*1440+n/6e4;case"second":return t*86400+n/1e3;case"millisecond":return Math.floor(t*864e5)+n;default:throw new Error("Unknown unit "+e)}}function St(e){return function(){return this.as(e)}}var Qr=St("ms"),No=St("s"),Po=St("m"),Eo=St("h"),Ao=St("d"),Ro=St("w"),Io=St("M"),Fo=St("Q"),zo=St("y"),Lo=Qr;function Wo(){return mt(this)}function Vo(e){return e=de(e),this.isValid()?this[e+"s"]():NaN}function At(e){return function(){return this.isValid()?this._data[e]:NaN}}var Ho=At("milliseconds"),$o=At("seconds"),Bo=At("minutes"),Uo=At("hours"),qo=At("days"),Jo=At("months"),Go=At("years");function Ko(){return st(this.days()/7)}var Dt=Math.round,Bt={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Xo(e,t,r,n,l){return l.relativeTime(t||1,!!r,e,n)}function Qo(e,t,r,n){var l=mt(e).abs(),M=Dt(l.as("s")),W=Dt(l.as("m")),re=Dt(l.as("h")),pe=Dt(l.as("d")),je=Dt(l.as("M")),at=Dt(l.as("w")),kt=Dt(l.as("y")),Tt=M<=r.ss&&["s",M]||M<r.s&&["ss",M]||W<=1&&["m"]||W<r.m&&["mm",W]||re<=1&&["h"]||re<r.h&&["hh",re]||pe<=1&&["d"]||pe<r.d&&["dd",pe];return r.w!=null&&(Tt=Tt||at<=1&&["w"]||at<r.w&&["ww",at]),Tt=Tt||je<=1&&["M"]||je<r.M&&["MM",je]||kt<=1&&["y"]||["yy",kt],Tt[2]=t,Tt[3]=+e>0,Tt[4]=n,Xo.apply(null,Tt)}function Zo(e){return e===void 0?Dt:typeof e=="function"?(Dt=e,!0):!1}function el(e,t){return Bt[e]===void 0?!1:t===void 0?Bt[e]:(Bt[e]=t,e==="s"&&(Bt.ss=t-1),!0)}function tl(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,n=Bt,l,M;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(r=e),typeof t=="object"&&(n=Object.assign({},Bt,t),t.s!=null&&t.ss==null&&(n.ss=t.s-1)),l=this.localeData(),M=Qo(this,!r,n,l),r&&(M=l.pastFuture(+this,M)),l.postformat(M)}var Qa=Math.abs;function Ut(e){return(e>0)-(e<0)||+e}function ma(){if(!this.isValid())return this.localeData().invalidDate();var e=Qa(this._milliseconds)/1e3,t=Qa(this._days),r=Qa(this._months),n,l,M,W,re=this.asSeconds(),pe,je,at,kt;return re?(n=st(e/60),l=st(n/60),e%=60,n%=60,M=st(r/12),r%=12,W=e?e.toFixed(3).replace(/\.?0+$/,""):"",pe=re<0?"-":"",je=Ut(this._months)!==Ut(re)?"-":"",at=Ut(this._days)!==Ut(re)?"-":"",kt=Ut(this._milliseconds)!==Ut(re)?"-":"",pe+"P"+(M?je+M+"Y":"")+(r?je+r+"M":"")+(t?at+t+"D":"")+(l||n||e?"T":"")+(l?kt+l+"H":"")+(n?kt+n+"M":"")+(e?kt+W+"S":"")):"P0D"}var Te=oa.prototype;Te.isValid=qi,Te.abs=Yo,Te.add=Oo,Te.subtract=jo,Te.as=Co,Te.asMilliseconds=Qr,Te.asSeconds=No,Te.asMinutes=Po,Te.asHours=Eo,Te.asDays=Ao,Te.asWeeks=Ro,Te.asMonths=Io,Te.asQuarters=Fo,Te.asYears=zo,Te.valueOf=Lo,Te._bubble=To,Te.clone=Wo,Te.get=Vo,Te.milliseconds=Ho,Te.seconds=$o,Te.minutes=Bo,Te.hours=Uo,Te.days=qo,Te.weeks=Ko,Te.months=Jo,Te.years=Go,Te.humanize=tl,Te.toISOString=ma,Te.toString=ma,Te.toJSON=ma,Te.locale=Fr,Te.localeData=Lr,Te.toIsoString=m("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ma),Te.lang=zr,Q("X",0,0,"unix"),Q("x",0,0,"valueOf"),ae("x",_t),ae("X",gt),Ee("X",function(e,t,r){r._d=new Date(parseFloat(e)*1e3)}),Ee("x",function(e,t,r){r._d=new Date(Se(e))});//! moment.js
|
|
64
|
+
`+new Error().stack),r=!1}return t.apply(this,arguments)},t)}var P={};function B(e,t){d.deprecationHandler!=null&&d.deprecationHandler(e,t),P[e]||(L(t),P[e]=!0)}d.suppressDeprecationWarnings=!1,d.deprecationHandler=null;function R(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function A(e){var t,r;for(r in e)o(e,r)&&(t=e[r],R(t)?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function H(e,t){var r=p({},e),n;for(n in t)o(t,n)&&(X(e[n])&&X(t[n])?(r[n]={},p(r[n],e[n]),p(r[n],t[n])):t[n]!=null?r[n]=t[n]:delete r[n]);for(n in e)o(e,n)&&!o(t,n)&&X(e[n])&&(r[n]=p({},r[n]));return r}function J(e){e!=null&&this.set(e)}var ie;Object.keys?ie=Object.keys:ie=function(e){var t,r=[];for(t in e)o(e,t)&&r.push(t);return r};var ee={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function he(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return R(n)?n.call(t,r):n}function Z(e,t,r){var n=""+Math.abs(e),l=t-n.length,M=e>=0;return(M?r?"+":"":"-")+Math.pow(10,Math.max(0,l)).toString().substr(1)+n}var ue=/(\[[^\[]*\])|(\\)?([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,ae=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ye={},ce={};function Q(e,t,r,n){var l=n;typeof n=="string"&&(l=function(){return this[n]()}),e&&(ce[e]=l),t&&(ce[t[0]]=function(){return Z(l.apply(this,arguments),t[1],t[2])}),r&&(ce[r]=function(){return this.localeData().ordinal(l.apply(this,arguments),e)})}function ve(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function Ne(e){var t=e.match(ue),r,n;for(r=0,n=t.length;r<n;r++)ce[t[r]]?t[r]=ce[t[r]]:t[r]=ve(t[r]);return function(l){var M="",W;for(W=0;W<n;W++)M+=R(t[W])?t[W].call(l,e):t[W];return M}}function _e(e,t){return e.isValid()?(t=Ce(t,e.localeData()),ye[t]=ye[t]||Ne(t),ye[t](e)):e.localeData().invalidDate()}function Ce(e,t){var r=5;function n(l){return t.longDateFormat(l)||l}for(ae.lastIndex=0;r>=0&&ae.test(e);)e=e.replace(ae,n),ae.lastIndex=0,r-=1;return e}var Re={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"};function ze(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(ue).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[e])}var C="Invalid date";function b(){return this._invalidDate}var V="%d",k=/\d{1,2}/;function E(e){return this._ordinal.replace("%d",e)}var F={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"};function te(e,t,r,n){var l=this._relativeTime[r];return R(l)?l(e,t,r,n):l.replace(/%d/i,e)}function se(e,t){var r=this._relativeTime[e>0?"future":"past"];return R(r)?r(t):r.replace(/%s/i,t)}var be={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 de(e){return typeof e=="string"?be[e]||be[e.toLowerCase()]:void 0}function me(e){var t={},r,n;for(n in e)o(e,n)&&(r=de(n),r&&(t[r]=e[n]));return t}var xe={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};function Ae(e){var t=[],r;for(r in e)o(e,r)&&t.push({unit:r,priority:xe[r]});return t.sort(function(n,l){return n.priority-l.priority}),t}var $e=/\d/,Ie=/\d\d/,Ge=/\d{3}/,Qe=/\d{4}/,ge=/[+-]?\d{6}/,we=/\d\d?/,Ze=/\d\d\d\d?/,tt=/\d\d\d\d\d\d?/,ht=/\d{1,3}/,vt=/\d{1,4}/,pt=/[+-]?\d{1,6}/,lt=/\d+/,_t=/[+-]?\d+/,bt=/Z|[+-]\d\d:?\d\d/gi,Ue=/Z|[+-]\d\d(?::?\d\d)?/gi,gt=/[+-]?\d+(\.\d{1,3})?/,ft=/[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,ut=/^[1-9]\d?/,it=/^([1-9]\d|\d)/,zt;zt={};function re(e,t,r){zt[e]=R(t)?t:function(n,l){return n&&r?r:t}}function Na(e,t){return o(zt,e)?zt[e](t._strict,t._locale):new RegExp(ra(e))}function ra(e){return ct(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,r,n,l,M){return r||n||l||M}))}function ct(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function st(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Se(e){var t=+e,r=0;return t!==0&&isFinite(t)&&(r=st(t)),r}var Lt={};function Ee(e,t){var r,n=t,l;for(typeof e=="string"&&(e=[e]),s(t)&&(n=function(M,W){W[t]=Se(M)}),l=e.length,r=0;r<l;r++)Lt[e[r]]=n}function Pt(e,t){Ee(e,function(r,n,l,M){l._w=l._w||{},t(r,l._w,l,M)})}function Pa(e,t,r){t!=null&&o(Lt,e)&&Lt[e](t,r._a,r,e)}function Wt(e){return e%4===0&&e%100!==0||e%400===0}var Xe=0,w=1,U=2,K=3,oe=4,Me=5,Oe=6,ke=7,De=8;Q("Y",0,0,function(){var e=this.year();return e<=9999?Z(e,4):"+"+e}),Q(0,["YY",2],0,function(){return this.year()%100}),Q(0,["YYYY",4],0,"year"),Q(0,["YYYYY",5],0,"year"),Q(0,["YYYYYY",6,!0],0,"year"),re("Y",_t),re("YY",we,Ie),re("YYYY",vt,Qe),re("YYYYY",pt,ge),re("YYYYYY",pt,ge),Ee(["YYYYY","YYYYYY"],Xe),Ee("YYYY",function(e,t){t[Xe]=e.length===2?d.parseTwoDigitYear(e):Se(e)}),Ee("YY",function(e,t){t[Xe]=d.parseTwoDigitYear(e)}),Ee("Y",function(e,t){t[Xe]=parseInt(e,10)});function qe(e){return Wt(e)?366:365}d.parseTwoDigitYear=function(e){return Se(e)+(Se(e)>68?1900:2e3)};var We=Ke("FullYear",!0);function Be(){return Wt(this.year())}function Ke(e,t){return function(r){return r!=null?(yt(this,e,r),d.updateOffset(this,t),this):dt(this,e)}}function dt(e,t){if(!e.isValid())return NaN;var r=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return n?r.getUTCSeconds():r.getSeconds();case"Minutes":return n?r.getUTCMinutes():r.getMinutes();case"Hours":return n?r.getUTCHours():r.getHours();case"Date":return n?r.getUTCDate():r.getDate();case"Day":return n?r.getUTCDay():r.getDay();case"Month":return n?r.getUTCMonth():r.getMonth();case"FullYear":return n?r.getUTCFullYear():r.getFullYear();default:return NaN}}function yt(e,t,r){var n,l,M,W,ne;if(!(!e.isValid()||isNaN(r))){switch(n=e._d,l=e._isUTC,t){case"Milliseconds":return void(l?n.setUTCMilliseconds(r):n.setMilliseconds(r));case"Seconds":return void(l?n.setUTCSeconds(r):n.setSeconds(r));case"Minutes":return void(l?n.setUTCMinutes(r):n.setMinutes(r));case"Hours":return void(l?n.setUTCHours(r):n.setHours(r));case"Date":return void(l?n.setUTCDate(r):n.setDate(r));case"FullYear":break;default:return}M=r,W=e.month(),ne=e.date(),ne=ne===29&&W===1&&!Wt(M)?28:ne,l?n.setUTCFullYear(M,W,ne):n.setFullYear(M,W,ne)}}function et(e){return e=de(e),R(this[e])?this[e]():this}function Jt(e,t){if(typeof e=="object"){e=me(e);var r=Ae(e),n,l=r.length;for(n=0;n<l;n++)this[r[n].unit](e[r[n].unit])}else if(e=de(e),R(this[e]))return this[e](t);return this}function Ea(e,t){return(e%t+t)%t}var He;Array.prototype.indexOf?He=Array.prototype.indexOf:He=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function Aa(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=Ea(t,12);return e+=(t-r)/12,r===1?Wt(e)?29:28:31-r%7%2}Q("M",["MM",2],"Mo",function(){return this.month()+1}),Q("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),Q("MMMM",0,0,function(e){return this.localeData().months(this,e)}),re("M",we,ut),re("MM",we,Ie),re("MMM",function(e,t){return t.monthsShortRegex(e)}),re("MMMM",function(e,t){return t.monthsRegex(e)}),Ee(["M","MM"],function(e,t){t[w]=Se(e)-1}),Ee(["MMM","MMMM"],function(e,t,r,n){var l=r._locale.monthsParse(e,n,r._strict);l!=null?t[w]=l:_(r).invalidMonth=e});var Cn="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),gr="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),yr=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Nn=ft,Pn=ft;function En(e,t){return e?$(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||yr).test(t)?"format":"standalone"][e.month()]:$(this._months)?this._months:this._months.standalone}function An(e,t){return e?$(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[yr.test(t)?"format":"standalone"][e.month()]:$(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Rn(e,t,r){var n,l,M,W=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)M=f([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(M,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(M,"").toLocaleLowerCase();return r?t==="MMM"?(l=He.call(this._shortMonthsParse,W),l!==-1?l:null):(l=He.call(this._longMonthsParse,W),l!==-1?l:null):t==="MMM"?(l=He.call(this._shortMonthsParse,W),l!==-1?l:(l=He.call(this._longMonthsParse,W),l!==-1?l:null)):(l=He.call(this._longMonthsParse,W),l!==-1?l:(l=He.call(this._shortMonthsParse,W),l!==-1?l:null))}function In(e,t,r){var n,l,M;if(this._monthsParseExact)return Rn.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(l=f([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(l,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(l,"").replace(".","")+"$","i")),!r&&!this._monthsParse[n]&&(M="^"+this.months(l,"")+"|^"+this.monthsShort(l,""),this._monthsParse[n]=new RegExp(M.replace(".",""),"i")),r&&t==="MMMM"&&this._longMonthsParse[n].test(e))return n;if(r&&t==="MMM"&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}}function vr(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=Se(t);else if(t=e.localeData().monthsParse(t),!s(t))return e}var r=t,n=e.date();return n=n<29?n:Math.min(n,Aa(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,n):e._d.setMonth(r,n),e}function _r(e){return e!=null?(vr(this,e),d.updateOffset(this,!0),this):dt(this,"Month")}function Fn(){return Aa(this.year(),this.month())}function zn(e){return this._monthsParseExact?(o(this,"_monthsRegex")||br.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(o(this,"_monthsShortRegex")||(this._monthsShortRegex=Nn),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function Ln(e){return this._monthsParseExact?(o(this,"_monthsRegex")||br.call(this),e?this._monthsStrictRegex:this._monthsRegex):(o(this,"_monthsRegex")||(this._monthsRegex=Pn),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function br(){function e(pe,je){return je.length-pe.length}var t=[],r=[],n=[],l,M,W,ne;for(l=0;l<12;l++)M=f([2e3,l]),W=ct(this.monthsShort(M,"")),ne=ct(this.months(M,"")),t.push(W),r.push(ne),n.push(ne),n.push(W);t.sort(e),r.sort(e),n.sort(e),this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Wn(e,t,r,n,l,M,W){var ne;return e<100&&e>=0?(ne=new Date(e+400,t,r,n,l,M,W),isFinite(ne.getFullYear())&&ne.setFullYear(e)):ne=new Date(e,t,r,n,l,M,W),ne}function Gt(e){var t,r;return e<100&&e>=0?(r=Array.prototype.slice.call(arguments),r[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function na(e,t,r){var n=7+t-r,l=(7+Gt(e,0,n).getUTCDay()-t)%7;return-l+n-1}function wr(e,t,r,n,l){var M=(7+r-n)%7,W=na(e,n,l),ne=1+7*(t-1)+M+W,pe,je;return ne<=0?(pe=e-1,je=qe(pe)+ne):ne>qe(e)?(pe=e+1,je=ne-qe(e)):(pe=e,je=ne),{year:pe,dayOfYear:je}}function Kt(e,t,r){var n=na(e.year(),t,r),l=Math.floor((e.dayOfYear()-n-1)/7)+1,M,W;return l<1?(W=e.year()-1,M=l+wt(W,t,r)):l>wt(e.year(),t,r)?(M=l-wt(e.year(),t,r),W=e.year()+1):(W=e.year(),M=l),{week:M,year:W}}function wt(e,t,r){var n=na(e,t,r),l=na(e+1,t,r);return(qe(e)-n+l)/7}Q("w",["ww",2],"wo","week"),Q("W",["WW",2],"Wo","isoWeek"),re("w",we,ut),re("ww",we,Ie),re("W",we,ut),re("WW",we,Ie),Pt(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=Se(e)});function Vn(e){return Kt(e,this._week.dow,this._week.doy).week}var Hn={dow:0,doy:6};function $n(){return this._week.dow}function Bn(){return this._week.doy}function Un(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function qn(e){var t=Kt(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Q("d",0,"do","day"),Q("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),Q("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),Q("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),Q("e",0,0,"weekday"),Q("E",0,0,"isoWeekday"),re("d",we),re("e",we),re("E",we),re("dd",function(e,t){return t.weekdaysMinRegex(e)}),re("ddd",function(e,t){return t.weekdaysShortRegex(e)}),re("dddd",function(e,t){return t.weekdaysRegex(e)}),Pt(["dd","ddd","dddd"],function(e,t,r,n){var l=r._locale.weekdaysParse(e,n,r._strict);l!=null?t.d=l:_(r).invalidWeekday=e}),Pt(["d","e","E"],function(e,t,r,n){t[n]=Se(e)});function Jn(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function Gn(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Ra(e,t){return e.slice(t,7).concat(e.slice(0,t))}var Kn="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),xr="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Xn="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Qn=ft,Zn=ft,ei=ft;function ti(e,t){var r=$(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Ra(r,this._week.dow):e?r[e.day()]:r}function ai(e){return e===!0?Ra(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function ri(e){return e===!0?Ra(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function ni(e,t,r){var n,l,M,W=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)M=f([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(M,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(M,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(M,"").toLocaleLowerCase();return r?t==="dddd"?(l=He.call(this._weekdaysParse,W),l!==-1?l:null):t==="ddd"?(l=He.call(this._shortWeekdaysParse,W),l!==-1?l:null):(l=He.call(this._minWeekdaysParse,W),l!==-1?l:null):t==="dddd"?(l=He.call(this._weekdaysParse,W),l!==-1||(l=He.call(this._shortWeekdaysParse,W),l!==-1)?l:(l=He.call(this._minWeekdaysParse,W),l!==-1?l:null)):t==="ddd"?(l=He.call(this._shortWeekdaysParse,W),l!==-1||(l=He.call(this._weekdaysParse,W),l!==-1)?l:(l=He.call(this._minWeekdaysParse,W),l!==-1?l:null)):(l=He.call(this._minWeekdaysParse,W),l!==-1||(l=He.call(this._weekdaysParse,W),l!==-1)?l:(l=He.call(this._shortWeekdaysParse,W),l!==-1?l:null))}function ii(e,t,r){var n,l,M;if(this._weekdaysParseExact)return ni.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(l=f([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(l,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(l,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(l,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(M="^"+this.weekdays(l,"")+"|^"+this.weekdaysShort(l,"")+"|^"+this.weekdaysMin(l,""),this._weekdaysParse[n]=new RegExp(M.replace(".",""),"i")),r&&t==="dddd"&&this._fullWeekdaysParse[n].test(e))return n;if(r&&t==="ddd"&&this._shortWeekdaysParse[n].test(e))return n;if(r&&t==="dd"&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function si(e){if(!this.isValid())return e!=null?this:NaN;var t=dt(this,"Day");return e!=null?(e=Jn(e,this.localeData()),this.add(e-t,"d")):t}function oi(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function li(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=Gn(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function ui(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Ia.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,"_weekdaysRegex")||(this._weekdaysRegex=Qn),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function ci(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Ia.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Zn),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function di(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Ia.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ei),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Ia(){function e(at,kt){return kt.length-at.length}var t=[],r=[],n=[],l=[],M,W,ne,pe,je;for(M=0;M<7;M++)W=f([2e3,1]).day(M),ne=ct(this.weekdaysMin(W,"")),pe=ct(this.weekdaysShort(W,"")),je=ct(this.weekdays(W,"")),t.push(ne),r.push(pe),n.push(je),l.push(ne),l.push(pe),l.push(je);t.sort(e),r.sort(e),n.sort(e),l.sort(e),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Fa(){return this.hours()%12||12}function hi(){return this.hours()||24}Q("H",["HH",2],0,"hour"),Q("h",["hh",2],0,Fa),Q("k",["kk",2],0,hi),Q("hmm",0,0,function(){return""+Fa.apply(this)+Z(this.minutes(),2)}),Q("hmmss",0,0,function(){return""+Fa.apply(this)+Z(this.minutes(),2)+Z(this.seconds(),2)}),Q("Hmm",0,0,function(){return""+this.hours()+Z(this.minutes(),2)}),Q("Hmmss",0,0,function(){return""+this.hours()+Z(this.minutes(),2)+Z(this.seconds(),2)});function Mr(e,t){Q(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Mr("a",!0),Mr("A",!1);function Sr(e,t){return t._meridiemParse}re("a",Sr),re("A",Sr),re("H",we,it),re("h",we,ut),re("k",we,ut),re("HH",we,Ie),re("hh",we,Ie),re("kk",we,Ie),re("hmm",Ze),re("hmmss",tt),re("Hmm",Ze),re("Hmmss",tt),Ee(["H","HH"],K),Ee(["k","kk"],function(e,t,r){var n=Se(e);t[K]=n===24?0:n}),Ee(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e}),Ee(["h","hh"],function(e,t,r){t[K]=Se(e),_(r).bigHour=!0}),Ee("hmm",function(e,t,r){var n=e.length-2;t[K]=Se(e.substr(0,n)),t[oe]=Se(e.substr(n)),_(r).bigHour=!0}),Ee("hmmss",function(e,t,r){var n=e.length-4,l=e.length-2;t[K]=Se(e.substr(0,n)),t[oe]=Se(e.substr(n,2)),t[Me]=Se(e.substr(l)),_(r).bigHour=!0}),Ee("Hmm",function(e,t,r){var n=e.length-2;t[K]=Se(e.substr(0,n)),t[oe]=Se(e.substr(n))}),Ee("Hmmss",function(e,t,r){var n=e.length-4,l=e.length-2;t[K]=Se(e.substr(0,n)),t[oe]=Se(e.substr(n,2)),t[Me]=Se(e.substr(l))});function fi(e){return(e+"").toLowerCase().charAt(0)==="p"}var mi=/[ap]\.?m?\.?/i,pi=Ke("Hours",!0);function gi(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var Dr={calendar:ee,longDateFormat:Re,invalidDate:C,ordinal:V,dayOfMonthOrdinalParse:k,relativeTime:F,months:Cn,monthsShort:gr,week:Hn,weekdays:Kn,weekdaysMin:Xn,weekdaysShort:xr,meridiemParse:mi},Ve={},Xt={},Qt;function yi(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r+=1)if(e[r]!==t[r])return r;return n}function kr(e){return e&&e.toLowerCase().replace("_","-")}function vi(e){for(var t=0,r,n,l,M;t<e.length;){for(M=kr(e[t]).split("-"),r=M.length,n=kr(e[t+1]),n=n?n.split("-"):null;r>0;){if(l=ia(M.slice(0,r).join("-")),l)return l;if(n&&n.length>=r&&yi(M,n)>=r-1)break;r--}t++}return Qt}function _i(e){return!!(e&&e.match("^[^/\\\\]*$"))}function ia(e){var t=null,r;if(Ve[e]===void 0&&y&&y.exports&&_i(e))try{t=Qt._abbr,r=Ca,r("./locale/"+e),Ot(t)}catch{Ve[e]=null}return Ve[e]}function Ot(e,t){var r;return e&&(a(t)?r=xt(e):r=za(e,t),r?Qt=r:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Qt._abbr}function za(e,t){if(t!==null){var r,n=Dr;if(t.abbr=e,Ve[e]!=null)B("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."),n=Ve[e]._config;else if(t.parentLocale!=null)if(Ve[t.parentLocale]!=null)n=Ve[t.parentLocale]._config;else if(r=ia(t.parentLocale),r!=null)n=r._config;else return Xt[t.parentLocale]||(Xt[t.parentLocale]=[]),Xt[t.parentLocale].push({name:e,config:t}),null;return Ve[e]=new J(H(n,t)),Xt[e]&&Xt[e].forEach(function(l){za(l.name,l.config)}),Ot(e),Ve[e]}else return delete Ve[e],null}function bi(e,t){if(t!=null){var r,n,l=Dr;Ve[e]!=null&&Ve[e].parentLocale!=null?Ve[e].set(H(Ve[e]._config,t)):(n=ia(e),n!=null&&(l=n._config),t=H(l,t),n==null&&(t.abbr=e),r=new J(t),r.parentLocale=Ve[e],Ve[e]=r),Ot(e)}else Ve[e]!=null&&(Ve[e].parentLocale!=null?(Ve[e]=Ve[e].parentLocale,e===Ot()&&Ot(e)):Ve[e]!=null&&delete Ve[e]);return Ve[e]}function xt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Qt;if(!$(e)){if(t=ia(e),t)return t;e=[e]}return vi(e)}function wi(){return ie(Ve)}function La(e){var t,r=e._a;return r&&_(e).overflow===-2&&(t=r[w]<0||r[w]>11?w:r[U]<1||r[U]>Aa(r[Xe],r[w])?U:r[K]<0||r[K]>24||r[K]===24&&(r[oe]!==0||r[Me]!==0||r[Oe]!==0)?K:r[oe]<0||r[oe]>59?oe:r[Me]<0||r[Me]>59?Me:r[Oe]<0||r[Oe]>999?Oe:-1,_(e)._overflowDayOfYear&&(t<Xe||t>U)&&(t=U),_(e)._overflowWeeks&&t===-1&&(t=ke),_(e)._overflowWeekday&&t===-1&&(t=De),_(e).overflow=t),e}var xi=/^\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)?)?$/,Mi=/^\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)?)?$/,Si=/Z|[+-]\d\d(?::?\d\d)?/,sa=[["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]],Wa=[["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/]],Di=/^\/?Date\((-?\d+)/i,ki=/^(?:(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}))$/,Yi={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Yr(e){var t,r,n=e._i,l=xi.exec(n)||Mi.exec(n),M,W,ne,pe,je=sa.length,at=Wa.length;if(l){for(_(e).iso=!0,t=0,r=je;t<r;t++)if(sa[t][1].exec(l[1])){W=sa[t][0],M=sa[t][2]!==!1;break}if(W==null){e._isValid=!1;return}if(l[3]){for(t=0,r=at;t<r;t++)if(Wa[t][1].exec(l[3])){ne=(l[2]||" ")+Wa[t][0];break}if(ne==null){e._isValid=!1;return}}if(!M&&ne!=null){e._isValid=!1;return}if(l[4])if(Si.exec(l[4]))pe="Z";else{e._isValid=!1;return}e._f=W+(ne||"")+(pe||""),Ha(e)}else e._isValid=!1}function Oi(e,t,r,n,l,M){var W=[ji(e),gr.indexOf(t),parseInt(r,10),parseInt(n,10),parseInt(l,10)];return M&&W.push(parseInt(M,10)),W}function ji(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Ti(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Ci(e,t,r){if(e){var n=xr.indexOf(e),l=new Date(t[0],t[1],t[2]).getDay();if(n!==l)return _(r).weekdayMismatch=!0,r._isValid=!1,!1}return!0}function Ni(e,t,r){if(e)return Yi[e];if(t)return 0;var n=parseInt(r,10),l=n%100,M=(n-l)/100;return M*60+l}function Or(e){var t=ki.exec(Ti(e._i)),r;if(t){if(r=Oi(t[4],t[3],t[2],t[5],t[6],t[7]),!Ci(t[1],r,e))return;e._a=r,e._tzm=Ni(t[8],t[9],t[10]),e._d=Gt.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),_(e).rfc2822=!0}else e._isValid=!1}function Pi(e){var t=Di.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(Yr(e),e._isValid===!1)delete e._isValid;else return;if(Or(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:d.createFromInputFallback(e)}d.createFromInputFallback=m("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":""))});function Vt(e,t,r){return e??t??r}function Ei(e){var t=new Date(d.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Va(e){var t,r,n=[],l,M,W;if(!e._d){for(l=Ei(e),e._w&&e._a[U]==null&&e._a[w]==null&&Ai(e),e._dayOfYear!=null&&(W=Vt(e._a[Xe],l[Xe]),(e._dayOfYear>qe(W)||e._dayOfYear===0)&&(_(e)._overflowDayOfYear=!0),r=Gt(W,0,e._dayOfYear),e._a[w]=r.getUTCMonth(),e._a[U]=r.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=n[t]=l[t];for(;t<7;t++)e._a[t]=n[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[K]===24&&e._a[oe]===0&&e._a[Me]===0&&e._a[Oe]===0&&(e._nextDay=!0,e._a[K]=0),e._d=(e._useUTC?Gt:Wn).apply(null,n),M=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[K]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==M&&(_(e).weekdayMismatch=!0)}}function Ai(e){var t,r,n,l,M,W,ne,pe,je;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(M=1,W=4,r=Vt(t.GG,e._a[Xe],Kt(Le(),1,4).year),n=Vt(t.W,1),l=Vt(t.E,1),(l<1||l>7)&&(pe=!0)):(M=e._locale._week.dow,W=e._locale._week.doy,je=Kt(Le(),M,W),r=Vt(t.gg,e._a[Xe],je.year),n=Vt(t.w,je.week),t.d!=null?(l=t.d,(l<0||l>6)&&(pe=!0)):t.e!=null?(l=t.e+M,(t.e<0||t.e>6)&&(pe=!0)):l=M),n<1||n>wt(r,M,W)?_(e)._overflowWeeks=!0:pe!=null?_(e)._overflowWeekday=!0:(ne=wr(r,n,l,M,W),e._a[Xe]=ne.year,e._dayOfYear=ne.dayOfYear)}d.ISO_8601=function(){},d.RFC_2822=function(){};function Ha(e){if(e._f===d.ISO_8601){Yr(e);return}if(e._f===d.RFC_2822){Or(e);return}e._a=[],_(e).empty=!0;var t=""+e._i,r,n,l,M,W,ne=t.length,pe=0,je,at;for(l=Ce(e._f,e._locale).match(ue)||[],at=l.length,r=0;r<at;r++)M=l[r],n=(t.match(Na(M,e))||[])[0],n&&(W=t.substr(0,t.indexOf(n)),W.length>0&&_(e).unusedInput.push(W),t=t.slice(t.indexOf(n)+n.length),pe+=n.length),ce[M]?(n?_(e).empty=!1:_(e).unusedTokens.push(M),Pa(M,n,e)):e._strict&&!n&&_(e).unusedTokens.push(M);_(e).charsLeftOver=ne-pe,t.length>0&&_(e).unusedInput.push(t),e._a[K]<=12&&_(e).bigHour===!0&&e._a[K]>0&&(_(e).bigHour=void 0),_(e).parsedDateParts=e._a.slice(0),_(e).meridiem=e._meridiem,e._a[K]=Ri(e._locale,e._a[K],e._meridiem),je=_(e).era,je!==null&&(e._a[Xe]=e._locale.erasConvertYear(je,e._a[Xe])),Va(e),La(e)}function Ri(e,t,r){var n;return r==null?t:e.meridiemHour!=null?e.meridiemHour(t,r):(e.isPM!=null&&(n=e.isPM(r),n&&t<12&&(t+=12),!n&&t===12&&(t=0)),t)}function Ii(e){var t,r,n,l,M,W,ne=!1,pe=e._f.length;if(pe===0){_(e).invalidFormat=!0,e._d=new Date(NaN);return}for(l=0;l<pe;l++)M=0,W=!1,t=S({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[l],Ha(t),Y(t)&&(W=!0),M+=_(t).charsLeftOver,M+=_(t).unusedTokens.length*10,_(t).score=M,ne?M<n&&(n=M,r=t):(n==null||M<n||W)&&(n=M,r=t,W&&(ne=!0));p(e,r||t)}function Fi(e){if(!e._d){var t=me(e._i),r=t.day===void 0?t.date:t.day;e._a=c([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)}),Va(e)}}function zi(e){var t=new v(La(jr(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function jr(e){var t=e._i,r=e._f;return e._locale=e._locale||xt(e._l),t===null||r===void 0&&t===""?O({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),T(t)?new v(La(t)):(u(t)?e._d=t:$(r)?Ii(e):r?Ha(e):Li(e),Y(e)||(e._d=null),e))}function Li(e){var t=e._i;a(t)?e._d=new Date(d.now()):u(t)?e._d=new Date(t.valueOf()):typeof t=="string"?Pi(e):$(t)?(e._a=c(t.slice(0),function(r){return parseInt(r,10)}),Va(e)):X(t)?Fi(e):s(t)?e._d=new Date(t):d.createFromInputFallback(e)}function Tr(e,t,r,n,l){var M={};return(t===!0||t===!1)&&(n=t,t=void 0),(r===!0||r===!1)&&(n=r,r=void 0),(X(e)&&x(e)||$(e)&&e.length===0)&&(e=void 0),M._isAMomentObject=!0,M._useUTC=M._isUTC=l,M._l=r,M._i=e,M._f=t,M._strict=n,zi(M)}function Le(e,t,r,n){return Tr(e,t,r,n,!1)}var Wi=m("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Le.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:O()}),Vi=m("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Le.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:O()});function Cr(e,t){var r,n;if(t.length===1&&$(t[0])&&(t=t[0]),!t.length)return Le();for(r=t[0],n=1;n<t.length;++n)(!t[n].isValid()||t[n][e](r))&&(r=t[n]);return r}function Hi(){var e=[].slice.call(arguments,0);return Cr("isBefore",e)}function $i(){var e=[].slice.call(arguments,0);return Cr("isAfter",e)}var Bi=function(){return Date.now?Date.now():+new Date},Zt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ui(e){var t,r=!1,n,l=Zt.length;for(t in e)if(o(e,t)&&!(He.call(Zt,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(n=0;n<l;++n)if(e[Zt[n]]){if(r)return!1;parseFloat(e[Zt[n]])!==Se(e[Zt[n]])&&(r=!0)}return!0}function qi(){return this._isValid}function Ji(){return mt(NaN)}function oa(e){var t=me(e),r=t.year||0,n=t.quarter||0,l=t.month||0,M=t.week||t.isoWeek||0,W=t.day||0,ne=t.hour||0,pe=t.minute||0,je=t.second||0,at=t.millisecond||0;this._isValid=Ui(t),this._milliseconds=+at+je*1e3+pe*6e4+ne*1e3*60*60,this._days=+W+M*7,this._months=+l+n*3+r*12,this._data={},this._locale=xt(),this._bubble()}function la(e){return e instanceof oa}function $a(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function Gi(e,t,r){var n=Math.min(e.length,t.length),l=Math.abs(e.length-t.length),M=0,W;for(W=0;W<n;W++)Se(e[W])!==Se(t[W])&&M++;return M+l}function Nr(e,t){Q(e,0,0,function(){var r=this.utcOffset(),n="+";return r<0&&(r=-r,n="-"),n+Z(~~(r/60),2)+t+Z(~~r%60,2)})}Nr("Z",":"),Nr("ZZ",""),re("Z",Ue),re("ZZ",Ue),Ee(["Z","ZZ"],function(e,t,r){r._useUTC=!0,r._tzm=Ba(Ue,e)});var Ki=/([\+\-]|\d\d)/gi;function Ba(e,t){var r=(t||"").match(e),n,l,M;return r===null?null:(n=r[r.length-1]||[],l=(n+"").match(Ki)||["-",0,0],M=+(l[1]*60)+Se(l[2]),M===0?0:l[0]==="+"?M:-M)}function Ua(e,t){var r,n;return t._isUTC?(r=t.clone(),n=(T(e)||u(e)?e.valueOf():Le(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+n),d.updateOffset(r,!1),r):Le(e).local()}function qa(e){return-Math.round(e._d.getTimezoneOffset())}d.updateOffset=function(){};function Xi(e,t,r){var n=this._offset||0,l;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=Ba(Ue,e),e===null)return this}else Math.abs(e)<16&&!r&&(e=e*60);return!this._isUTC&&t&&(l=qa(this)),this._offset=e,this._isUTC=!0,l!=null&&this.add(l,"m"),n!==e&&(!t||this._changeInProgress?Rr(this,mt(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,d.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?n:qa(this)}function Qi(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function Zi(e){return this.utcOffset(0,e)}function es(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(qa(this),"m")),this}function ts(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=Ba(bt,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function as(e){return this.isValid()?(e=e?Le(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function rs(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function ns(){if(!a(this._isDSTShifted))return this._isDSTShifted;var e={},t;return S(e,this),e=jr(e),e._a?(t=e._isUTC?f(e._a):Le(e._a),this._isDSTShifted=this.isValid()&&Gi(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function is(){return this.isValid()?!this._isUTC:!1}function ss(){return this.isValid()?this._isUTC:!1}function Pr(){return this.isValid()?this._isUTC&&this._offset===0:!1}var os=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,ls=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function mt(e,t){var r=e,n=null,l,M,W;return la(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:s(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(n=os.exec(e))?(l=n[1]==="-"?-1:1,r={y:0,d:Se(n[U])*l,h:Se(n[K])*l,m:Se(n[oe])*l,s:Se(n[Me])*l,ms:Se($a(n[Oe]*1e3))*l}):(n=ls.exec(e))?(l=n[1]==="-"?-1:1,r={y:Et(n[2],l),M:Et(n[3],l),w:Et(n[4],l),d:Et(n[5],l),h:Et(n[6],l),m:Et(n[7],l),s:Et(n[8],l)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(W=us(Le(r.from),Le(r.to)),r={},r.ms=W.milliseconds,r.M=W.months),M=new oa(r),la(e)&&o(e,"_locale")&&(M._locale=e._locale),la(e)&&o(e,"_isValid")&&(M._isValid=e._isValid),M}mt.fn=oa.prototype,mt.invalid=Ji;function Et(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function Er(e,t){var r={};return r.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function us(e,t){var r;return e.isValid()&&t.isValid()?(t=Ua(t,e),e.isBefore(t)?r=Er(e,t):(r=Er(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function Ar(e,t){return function(r,n){var l,M;return n!==null&&!isNaN(+n)&&(B(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."),M=r,r=n,n=M),l=mt(r,n),Rr(this,l,e),this}}function Rr(e,t,r,n){var l=t._milliseconds,M=$a(t._days),W=$a(t._months);e.isValid()&&(n=n??!0,W&&vr(e,dt(e,"Month")+W*r),M&&yt(e,"Date",dt(e,"Date")+M*r),l&&e._d.setTime(e._d.valueOf()+l*r),n&&d.updateOffset(e,M||W))}var cs=Ar(1,"add"),ds=Ar(-1,"subtract");function Ir(e){return typeof e=="string"||e instanceof String}function hs(e){return T(e)||u(e)||Ir(e)||s(e)||ms(e)||fs(e)||e===null||e===void 0}function fs(e){var t=X(e)&&!x(e),r=!1,n=["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,M,W=n.length;for(l=0;l<W;l+=1)M=n[l],r=r||o(e,M);return t&&r}function ms(e){var t=$(e),r=!1;return t&&(r=e.filter(function(n){return!s(n)&&Ir(e)}).length===0),t&&r}function ps(e){var t=X(e)&&!x(e),r=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],l,M;for(l=0;l<n.length;l+=1)M=n[l],r=r||o(e,M);return t&&r}function gs(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"}function ys(e,t){arguments.length===1&&(arguments[0]?hs(arguments[0])?(e=arguments[0],t=void 0):ps(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||Le(),n=Ua(r,this).startOf("day"),l=d.calendarFormat(this,n)||"sameElse",M=t&&(R(t[l])?t[l].call(this,r):t[l]);return this.format(M||this.localeData().calendar(l,this,Le(r)))}function vs(){return new v(this)}function _s(e,t){var r=T(e)?e:Le(e);return this.isValid()&&r.isValid()?(t=de(t)||"millisecond",t==="millisecond"?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf()):!1}function bs(e,t){var r=T(e)?e:Le(e);return this.isValid()&&r.isValid()?(t=de(t)||"millisecond",t==="millisecond"?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf()):!1}function ws(e,t,r,n){var l=T(e)?e:Le(e),M=T(t)?t:Le(t);return this.isValid()&&l.isValid()&&M.isValid()?(n=n||"()",(n[0]==="("?this.isAfter(l,r):!this.isBefore(l,r))&&(n[1]===")"?this.isBefore(M,r):!this.isAfter(M,r))):!1}function xs(e,t){var r=T(e)?e:Le(e),n;return this.isValid()&&r.isValid()?(t=de(t)||"millisecond",t==="millisecond"?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf())):!1}function Ms(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Ss(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Ds(e,t,r){var n,l,M;if(!this.isValid())return NaN;if(n=Ua(e,this),!n.isValid())return NaN;switch(l=(n.utcOffset()-this.utcOffset())*6e4,t=de(t),t){case"year":M=ua(this,n)/12;break;case"month":M=ua(this,n);break;case"quarter":M=ua(this,n)/3;break;case"second":M=(this-n)/1e3;break;case"minute":M=(this-n)/6e4;break;case"hour":M=(this-n)/36e5;break;case"day":M=(this-n-l)/864e5;break;case"week":M=(this-n-l)/6048e5;break;default:M=this-n}return r?M:st(M)}function ua(e,t){if(e.date()<t.date())return-ua(t,e);var r=(t.year()-e.year())*12+(t.month()-e.month()),n=e.clone().add(r,"months"),l,M;return t-n<0?(l=e.clone().add(r-1,"months"),M=(t-n)/(n-l)):(l=e.clone().add(r+1,"months"),M=(t-n)/(l-n)),-(r+M)||0}d.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",d.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function ks(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Ys(e){if(!this.isValid())return null;var t=e!==!0,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?_e(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):R(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",_e(r,"Z")):_e(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Os(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,n,l,M;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),r="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",l="-MM-DD[T]HH:mm:ss.SSS",M=t+'[")]',this.format(r+n+l+M)}function js(e){e||(e=this.isUtc()?d.defaultFormatUtc:d.defaultFormat);var t=_e(this,e);return this.localeData().postformat(t)}function Ts(e,t){return this.isValid()&&(T(e)&&e.isValid()||Le(e).isValid())?mt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Cs(e){return this.from(Le(),e)}function Ns(e,t){return this.isValid()&&(T(e)&&e.isValid()||Le(e).isValid())?mt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Ps(e){return this.to(Le(),e)}function Fr(e){var t;return e===void 0?this._locale._abbr:(t=xt(e),t!=null&&(this._locale=t),this)}var zr=m("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Lr(){return this._locale}var ca=1e3,Ht=60*ca,da=60*Ht,Wr=(365*400+97)*24*da;function $t(e,t){return(e%t+t)%t}function Vr(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-Wr:new Date(e,t,r).valueOf()}function Hr(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-Wr:Date.UTC(e,t,r)}function Es(e){var t,r;if(e=de(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?Hr:Vr,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=$t(t+(this._isUTC?0:this.utcOffset()*Ht),da);break;case"minute":t=this._d.valueOf(),t-=$t(t,Ht);break;case"second":t=this._d.valueOf(),t-=$t(t,ca);break}return this._d.setTime(t),d.updateOffset(this,!0),this}function As(e){var t,r;if(e=de(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?Hr:Vr,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=da-$t(t+(this._isUTC?0:this.utcOffset()*Ht),da)-1;break;case"minute":t=this._d.valueOf(),t+=Ht-$t(t,Ht)-1;break;case"second":t=this._d.valueOf(),t+=ca-$t(t,ca)-1;break}return this._d.setTime(t),d.updateOffset(this,!0),this}function Rs(){return this._d.valueOf()-(this._offset||0)*6e4}function Is(){return Math.floor(this.valueOf()/1e3)}function Fs(){return new Date(this.valueOf())}function zs(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Ls(){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()}}function Ws(){return this.isValid()?this.toISOString():null}function Vs(){return Y(this)}function Hs(){return p({},_(this))}function $s(){return _(this).overflow}function Bs(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Q("N",0,0,"eraAbbr"),Q("NN",0,0,"eraAbbr"),Q("NNN",0,0,"eraAbbr"),Q("NNNN",0,0,"eraName"),Q("NNNNN",0,0,"eraNarrow"),Q("y",["y",1],"yo","eraYear"),Q("y",["yy",2],0,"eraYear"),Q("y",["yyy",3],0,"eraYear"),Q("y",["yyyy",4],0,"eraYear"),re("N",Ja),re("NN",Ja),re("NNN",Ja),re("NNNN",ao),re("NNNNN",ro),Ee(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,n){var l=r._locale.erasParse(e,n,r._strict);l?_(r).era=l:_(r).invalidEra=e}),re("y",lt),re("yy",lt),re("yyy",lt),re("yyyy",lt),re("yo",no),Ee(["y","yy","yyy","yyyy"],Xe),Ee(["yo"],function(e,t,r,n){var l;r._locale._eraYearOrdinalRegex&&(l=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[Xe]=r._locale.eraYearOrdinalParse(e,l):t[Xe]=parseInt(e,10)});function Us(e,t){var r,n,l,M=this._eras||xt("en")._eras;for(r=0,n=M.length;r<n;++r){switch(typeof M[r].since){case"string":l=d(M[r].since).startOf("day"),M[r].since=l.valueOf();break}switch(typeof M[r].until){case"undefined":M[r].until=1/0;break;case"string":l=d(M[r].until).startOf("day").valueOf(),M[r].until=l.valueOf();break}}return M}function qs(e,t,r){var n,l,M=this.eras(),W,ne,pe;for(e=e.toUpperCase(),n=0,l=M.length;n<l;++n)if(W=M[n].name.toUpperCase(),ne=M[n].abbr.toUpperCase(),pe=M[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(ne===e)return M[n];break;case"NNNN":if(W===e)return M[n];break;case"NNNNN":if(pe===e)return M[n];break}else if([W,ne,pe].indexOf(e)>=0)return M[n]}function Js(e,t){var r=e.since<=e.until?1:-1;return t===void 0?d(e.since).year():d(e.since).year()+(t-e.offset)*r}function Gs(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].name;return""}function Ks(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].narrow;return""}function Xs(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].abbr;return""}function Qs(){var e,t,r,n,l=this.localeData().eras();for(e=0,t=l.length;e<t;++e)if(r=l[e].since<=l[e].until?1:-1,n=this.clone().startOf("day").valueOf(),l[e].since<=n&&n<=l[e].until||l[e].until<=n&&n<=l[e].since)return(this.year()-d(l[e].since).year())*r+l[e].offset;return this.year()}function Zs(e){return o(this,"_erasNameRegex")||Ga.call(this),e?this._erasNameRegex:this._erasRegex}function eo(e){return o(this,"_erasAbbrRegex")||Ga.call(this),e?this._erasAbbrRegex:this._erasRegex}function to(e){return o(this,"_erasNarrowRegex")||Ga.call(this),e?this._erasNarrowRegex:this._erasRegex}function Ja(e,t){return t.erasAbbrRegex(e)}function ao(e,t){return t.erasNameRegex(e)}function ro(e,t){return t.erasNarrowRegex(e)}function no(e,t){return t._eraYearOrdinalRegex||lt}function Ga(){var e=[],t=[],r=[],n=[],l,M,W,ne,pe,je=this.eras();for(l=0,M=je.length;l<M;++l)W=ct(je[l].name),ne=ct(je[l].abbr),pe=ct(je[l].narrow),t.push(W),e.push(ne),r.push(pe),n.push(W),n.push(ne),n.push(pe);this._erasRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}Q(0,["gg",2],0,function(){return this.weekYear()%100}),Q(0,["GG",2],0,function(){return this.isoWeekYear()%100});function ha(e,t){Q(0,[e,e.length],0,t)}ha("gggg","weekYear"),ha("ggggg","weekYear"),ha("GGGG","isoWeekYear"),ha("GGGGG","isoWeekYear"),re("G",_t),re("g",_t),re("GG",we,Ie),re("gg",we,Ie),re("GGGG",vt,Qe),re("gggg",vt,Qe),re("GGGGG",pt,ge),re("ggggg",pt,ge),Pt(["gggg","ggggg","GGGG","GGGGG"],function(e,t,r,n){t[n.substr(0,2)]=Se(e)}),Pt(["gg","GG"],function(e,t,r,n){t[n]=d.parseTwoDigitYear(e)});function io(e){return $r.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function so(e){return $r.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function oo(){return wt(this.year(),1,4)}function lo(){return wt(this.isoWeekYear(),1,4)}function uo(){var e=this.localeData()._week;return wt(this.year(),e.dow,e.doy)}function co(){var e=this.localeData()._week;return wt(this.weekYear(),e.dow,e.doy)}function $r(e,t,r,n,l){var M;return e==null?Kt(this,n,l).year:(M=wt(e,n,l),t>M&&(t=M),ho.call(this,e,t,r,n,l))}function ho(e,t,r,n,l){var M=wr(e,t,r,n,l),W=Gt(M.year,0,M.dayOfYear);return this.year(W.getUTCFullYear()),this.month(W.getUTCMonth()),this.date(W.getUTCDate()),this}Q("Q",0,"Qo","quarter"),re("Q",$e),Ee("Q",function(e,t){t[w]=(Se(e)-1)*3});function fo(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Q("D",["DD",2],"Do","date"),re("D",we,ut),re("DD",we,Ie),re("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),Ee(["D","DD"],U),Ee("Do",function(e,t){t[U]=Se(e.match(we)[0])});var Br=Ke("Date",!0);Q("DDD",["DDDD",3],"DDDo","dayOfYear"),re("DDD",ht),re("DDDD",Ge),Ee(["DDD","DDDD"],function(e,t,r){r._dayOfYear=Se(e)});function mo(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Q("m",["mm",2],0,"minute"),re("m",we,it),re("mm",we,Ie),Ee(["m","mm"],oe);var po=Ke("Minutes",!1);Q("s",["ss",2],0,"second"),re("s",we,it),re("ss",we,Ie),Ee(["s","ss"],Me);var go=Ke("Seconds",!1);Q("S",0,0,function(){return~~(this.millisecond()/100)}),Q(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Q(0,["SSS",3],0,"millisecond"),Q(0,["SSSS",4],0,function(){return this.millisecond()*10}),Q(0,["SSSSS",5],0,function(){return this.millisecond()*100}),Q(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),Q(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),Q(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),Q(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),re("S",ht,$e),re("SS",ht,Ie),re("SSS",ht,Ge);var jt,Ur;for(jt="SSSS";jt.length<=9;jt+="S")re(jt,lt);function yo(e,t){t[Oe]=Se(("0."+e)*1e3)}for(jt="S";jt.length<=9;jt+="S")Ee(jt,yo);Ur=Ke("Milliseconds",!1),Q("z",0,0,"zoneAbbr"),Q("zz",0,0,"zoneName");function vo(){return this._isUTC?"UTC":""}function _o(){return this._isUTC?"Coordinated Universal Time":""}var G=v.prototype;G.add=cs,G.calendar=ys,G.clone=vs,G.diff=Ds,G.endOf=As,G.format=js,G.from=Ts,G.fromNow=Cs,G.to=Ns,G.toNow=Ps,G.get=et,G.invalidAt=$s,G.isAfter=_s,G.isBefore=bs,G.isBetween=ws,G.isSame=xs,G.isSameOrAfter=Ms,G.isSameOrBefore=Ss,G.isValid=Vs,G.lang=zr,G.locale=Fr,G.localeData=Lr,G.max=Vi,G.min=Wi,G.parsingFlags=Hs,G.set=Jt,G.startOf=Es,G.subtract=ds,G.toArray=zs,G.toObject=Ls,G.toDate=Fs,G.toISOString=Ys,G.inspect=Os,typeof Symbol<"u"&&Symbol.for!=null&&(G[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),G.toJSON=Ws,G.toString=ks,G.unix=Is,G.valueOf=Rs,G.creationData=Bs,G.eraName=Gs,G.eraNarrow=Ks,G.eraAbbr=Xs,G.eraYear=Qs,G.year=We,G.isLeapYear=Be,G.weekYear=io,G.isoWeekYear=so,G.quarter=G.quarters=fo,G.month=_r,G.daysInMonth=Fn,G.week=G.weeks=Un,G.isoWeek=G.isoWeeks=qn,G.weeksInYear=uo,G.weeksInWeekYear=co,G.isoWeeksInYear=oo,G.isoWeeksInISOWeekYear=lo,G.date=Br,G.day=G.days=si,G.weekday=oi,G.isoWeekday=li,G.dayOfYear=mo,G.hour=G.hours=pi,G.minute=G.minutes=po,G.second=G.seconds=go,G.millisecond=G.milliseconds=Ur,G.utcOffset=Xi,G.utc=Zi,G.local=es,G.parseZone=ts,G.hasAlignedHourOffset=as,G.isDST=rs,G.isLocal=is,G.isUtcOffset=ss,G.isUtc=Pr,G.isUTC=Pr,G.zoneAbbr=vo,G.zoneName=_o,G.dates=m("dates accessor is deprecated. Use date instead.",Br),G.months=m("months accessor is deprecated. Use month instead",_r),G.years=m("years accessor is deprecated. Use year instead",We),G.zone=m("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Qi),G.isDSTShifted=m("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",ns);function bo(e){return Le(e*1e3)}function wo(){return Le.apply(null,arguments).parseZone()}function qr(e){return e}var Pe=J.prototype;Pe.calendar=he,Pe.longDateFormat=ze,Pe.invalidDate=b,Pe.ordinal=E,Pe.preparse=qr,Pe.postformat=qr,Pe.relativeTime=te,Pe.pastFuture=se,Pe.set=A,Pe.eras=Us,Pe.erasParse=qs,Pe.erasConvertYear=Js,Pe.erasAbbrRegex=eo,Pe.erasNameRegex=Zs,Pe.erasNarrowRegex=to,Pe.months=En,Pe.monthsShort=An,Pe.monthsParse=In,Pe.monthsRegex=Ln,Pe.monthsShortRegex=zn,Pe.week=Vn,Pe.firstDayOfYear=Bn,Pe.firstDayOfWeek=$n,Pe.weekdays=ti,Pe.weekdaysMin=ri,Pe.weekdaysShort=ai,Pe.weekdaysParse=ii,Pe.weekdaysRegex=ui,Pe.weekdaysShortRegex=ci,Pe.weekdaysMinRegex=di,Pe.isPM=fi,Pe.meridiem=gi;function fa(e,t,r,n){var l=xt(),M=f().set(n,t);return l[r](M,e)}function Jr(e,t,r){if(s(e)&&(t=e,e=void 0),e=e||"",t!=null)return fa(e,t,r,"month");var n,l=[];for(n=0;n<12;n++)l[n]=fa(e,n,r,"month");return l}function Ka(e,t,r,n){typeof e=="boolean"?(s(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,s(t)&&(r=t,t=void 0),t=t||"");var l=xt(),M=e?l._week.dow:0,W,ne=[];if(r!=null)return fa(t,(r+M)%7,n,"day");for(W=0;W<7;W++)ne[W]=fa(t,(W+M)%7,n,"day");return ne}function xo(e,t){return Jr(e,t,"months")}function Mo(e,t){return Jr(e,t,"monthsShort")}function So(e,t,r){return Ka(e,t,r,"weekdays")}function Do(e,t,r){return Ka(e,t,r,"weekdaysShort")}function ko(e,t,r){return Ka(e,t,r,"weekdaysMin")}Ot("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,r=Se(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+r}}),d.lang=m("moment.lang is deprecated. Use moment.locale instead.",Ot),d.langData=m("moment.langData is deprecated. Use moment.localeData instead.",xt);var Mt=Math.abs;function Yo(){var e=this._data;return this._milliseconds=Mt(this._milliseconds),this._days=Mt(this._days),this._months=Mt(this._months),e.milliseconds=Mt(e.milliseconds),e.seconds=Mt(e.seconds),e.minutes=Mt(e.minutes),e.hours=Mt(e.hours),e.months=Mt(e.months),e.years=Mt(e.years),this}function Gr(e,t,r,n){var l=mt(t,r);return e._milliseconds+=n*l._milliseconds,e._days+=n*l._days,e._months+=n*l._months,e._bubble()}function Oo(e,t){return Gr(this,e,t,1)}function jo(e,t){return Gr(this,e,t,-1)}function Kr(e){return e<0?Math.floor(e):Math.ceil(e)}function To(){var e=this._milliseconds,t=this._days,r=this._months,n=this._data,l,M,W,ne,pe;return e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0||(e+=Kr(Xa(r)+t)*864e5,t=0,r=0),n.milliseconds=e%1e3,l=st(e/1e3),n.seconds=l%60,M=st(l/60),n.minutes=M%60,W=st(M/60),n.hours=W%24,t+=st(W/24),pe=st(Xr(t)),r+=pe,t-=Kr(Xa(pe)),ne=st(r/12),r%=12,n.days=t,n.months=r,n.years=ne,this}function Xr(e){return e*4800/146097}function Xa(e){return e*146097/4800}function Co(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if(e=de(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+n/864e5,r=this._months+Xr(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(Xa(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return t*24+n/36e5;case"minute":return t*1440+n/6e4;case"second":return t*86400+n/1e3;case"millisecond":return Math.floor(t*864e5)+n;default:throw new Error("Unknown unit "+e)}}function St(e){return function(){return this.as(e)}}var Qr=St("ms"),No=St("s"),Po=St("m"),Eo=St("h"),Ao=St("d"),Ro=St("w"),Io=St("M"),Fo=St("Q"),zo=St("y"),Lo=Qr;function Wo(){return mt(this)}function Vo(e){return e=de(e),this.isValid()?this[e+"s"]():NaN}function At(e){return function(){return this.isValid()?this._data[e]:NaN}}var Ho=At("milliseconds"),$o=At("seconds"),Bo=At("minutes"),Uo=At("hours"),qo=At("days"),Jo=At("months"),Go=At("years");function Ko(){return st(this.days()/7)}var Dt=Math.round,Bt={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Xo(e,t,r,n,l){return l.relativeTime(t||1,!!r,e,n)}function Qo(e,t,r,n){var l=mt(e).abs(),M=Dt(l.as("s")),W=Dt(l.as("m")),ne=Dt(l.as("h")),pe=Dt(l.as("d")),je=Dt(l.as("M")),at=Dt(l.as("w")),kt=Dt(l.as("y")),Tt=M<=r.ss&&["s",M]||M<r.s&&["ss",M]||W<=1&&["m"]||W<r.m&&["mm",W]||ne<=1&&["h"]||ne<r.h&&["hh",ne]||pe<=1&&["d"]||pe<r.d&&["dd",pe];return r.w!=null&&(Tt=Tt||at<=1&&["w"]||at<r.w&&["ww",at]),Tt=Tt||je<=1&&["M"]||je<r.M&&["MM",je]||kt<=1&&["y"]||["yy",kt],Tt[2]=t,Tt[3]=+e>0,Tt[4]=n,Xo.apply(null,Tt)}function Zo(e){return e===void 0?Dt:typeof e=="function"?(Dt=e,!0):!1}function el(e,t){return Bt[e]===void 0?!1:t===void 0?Bt[e]:(Bt[e]=t,e==="s"&&(Bt.ss=t-1),!0)}function tl(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,n=Bt,l,M;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(r=e),typeof t=="object"&&(n=Object.assign({},Bt,t),t.s!=null&&t.ss==null&&(n.ss=t.s-1)),l=this.localeData(),M=Qo(this,!r,n,l),r&&(M=l.pastFuture(+this,M)),l.postformat(M)}var Qa=Math.abs;function Ut(e){return(e>0)-(e<0)||+e}function ma(){if(!this.isValid())return this.localeData().invalidDate();var e=Qa(this._milliseconds)/1e3,t=Qa(this._days),r=Qa(this._months),n,l,M,W,ne=this.asSeconds(),pe,je,at,kt;return ne?(n=st(e/60),l=st(n/60),e%=60,n%=60,M=st(r/12),r%=12,W=e?e.toFixed(3).replace(/\.?0+$/,""):"",pe=ne<0?"-":"",je=Ut(this._months)!==Ut(ne)?"-":"",at=Ut(this._days)!==Ut(ne)?"-":"",kt=Ut(this._milliseconds)!==Ut(ne)?"-":"",pe+"P"+(M?je+M+"Y":"")+(r?je+r+"M":"")+(t?at+t+"D":"")+(l||n||e?"T":"")+(l?kt+l+"H":"")+(n?kt+n+"M":"")+(e?kt+W+"S":"")):"P0D"}var Te=oa.prototype;Te.isValid=qi,Te.abs=Yo,Te.add=Oo,Te.subtract=jo,Te.as=Co,Te.asMilliseconds=Qr,Te.asSeconds=No,Te.asMinutes=Po,Te.asHours=Eo,Te.asDays=Ao,Te.asWeeks=Ro,Te.asMonths=Io,Te.asQuarters=Fo,Te.asYears=zo,Te.valueOf=Lo,Te._bubble=To,Te.clone=Wo,Te.get=Vo,Te.milliseconds=Ho,Te.seconds=$o,Te.minutes=Bo,Te.hours=Uo,Te.days=qo,Te.weeks=Ko,Te.months=Jo,Te.years=Go,Te.humanize=tl,Te.toISOString=ma,Te.toString=ma,Te.toJSON=ma,Te.locale=Fr,Te.localeData=Lr,Te.toIsoString=m("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ma),Te.lang=zr,Q("X",0,0,"unix"),Q("x",0,0,"valueOf"),re("x",_t),re("X",gt),Ee("X",function(e,t,r){r._d=new Date(parseFloat(e)*1e3)}),Ee("x",function(e,t,r){r._d=new Date(Se(e))});//! moment.js
|
|
65
65
|
return d.version="2.30.1",z(Le),d.fn=G,d.min=Hi,d.max=$i,d.now=Bi,d.utc=f,d.unix=bo,d.months=xo,d.isDate=u,d.locale=Ot,d.invalid=O,d.duration=mt,d.isMoment=T,d.weekdays=So,d.parseZone=wo,d.localeData=xt,d.isDuration=la,d.monthsShort=Mo,d.weekdaysMin=ko,d.defineLocale=za,d.updateLocale=bi,d.locales=wi,d.weekdaysShort=Do,d.normalizeUnits=de,d.relativeTimeRounding=Zo,d.relativeTimeThreshold=el,d.calendarFormat=gs,d.prototype=G,d.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"},d}))})(ga)),ga.exports}var tc=ir.exports,dn;function ac(){return dn||(dn=1,(function(y,i){(function(g,d){d(typeof Ca=="function"?fr():g.moment)})(tc,(function(g){//! moment.js locale configuration
|
|
66
66
|
var d=g.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:function(){return"[Oggi a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT"},nextDay:function(){return"[Domani a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT"},nextWeek:function(){return"dddd [a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT"},lastDay:function(){return"[Ieri a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT"},lastWeek:function(){switch(this.day()){case 0:return"[La scorsa] dddd [a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT";default:return"[Lo scorso] dddd [a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT"}},sameElse:"L"},relativeTime:{future:"tra %s",past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",w:"una settimana",ww:"%d settimane",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return d}))})()),ir.exports}ac();var sr={exports:{}},rc=sr.exports,hn;function nc(){return hn||(hn=1,(function(y,i){(function(g,d){d(typeof Ca=="function"?fr():g.moment)})(rc,(function(g){//! moment.js locale configuration
|
|
67
67
|
var d=g.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},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",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(z){var $=z%10,X=~~(z%100/10)===1?"th":$===1?"st":$===2?"nd":$===3?"rd":"th";return z+X},week:{dow:1,doy:4}});return d}))})()),sr.exports}nc();var or={exports:{}},ic=or.exports,fn;function sc(){return fn||(fn=1,(function(y,i){(function(g,d){d(typeof Ca=="function"?fr():g.moment)})(ic,(function(g){//! moment.js locale configuration
|
|
68
|
-
function d($,X,o,x){var a={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[$+" Tage",$+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[$+" Monate",$+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[$+" Jahre",$+" Jahren"]};return X?a[o][0]:a[o][1]}var z=g.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:d,mm:"%d Minuten",h:d,hh:"%d Stunden",d,dd:d,w:d,ww:"%d Wochen",M:d,MM:d,y:d,yy:d},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return z}))})()),or.exports}sc();const Nt=y=>{let i="";return y.split(":").forEach(g=>{i+=g}),parseInt(i)},mn=y=>y.toString().padStart(4,"0").match(/.{1,2}/g).join(":"),Za=y=>{const i=y.address;if(y.addresstype==="county"&&i.country)return i.county;if(y.addresstype==="village"&&i.village)return i.village;const g=[];["emergency","historic","military","natural","landuse","place","railway","man_made","aerialway","boundary","amenity","aeroway","club","craft","leisure","office","mountain_pass","shop","tourism","bridge","tunnel","waterway","name"].forEach($=>{i.hasOwnProperty($)&&i[$]&&g.push(i[$])}),i.road?g.push(i.road):i.pedestrian?g.push(i.pedestrian):i.suburb?g.push(i.suburb):i.square?g.push(i.square):(i.neighbourhood&&g.push(i.neighbourhood),i.hamlet?g.push(i.hamlet):i.isolated_dwelling?g.push(i.isolated_dwelling):i.locality?g.push(i.locality):i.croft&&g.push(i.croft)),i.house_number&&g.push(i.house_number),i.postcode&&g.push(i.postcode),i.village&&g.push(i.village),i.town?g.push(i.town):i.city&&g.push(i.city);var z=g.join(", ").substr(0,150);return z};function aa(y){let i=window.sessionStorage.getItem(y);if(i!==null){let g=JSON.parse(i);if(new Date(g.expirationDate)>new Date)return g.value;window.sessionStorage.removeItem(y)}return null}function oc(y,i,g){let d=g?new Date(g*1e3):null;if(d){let z={value:i,expirationDate:d.toISOString()};window.sessionStorage.setItem(y,JSON.stringify(z))}}function pn({day:y,slot:i,i18next:g}){return h.jsx("li",{className:"it-list-item",children:h.jsx("div",{className:"list-item",children:h.jsx("div",{className:"it-right-zone",children:h.jsxs("span",{className:"text pl-4",children:[h.jsx("b",{children:y})," ",g.t("alle")," ",g.t("ore")," ",h.jsx("b",{children:i})]})})})})}const lc=({component:y,current:i,onChange:g,i18next:d})=>{const[z,$]=q.useState(),[X,o]=q.useState([]),[x,a]=q.useState([]),[s,u]=q.useState(!1),[c,p]=q.useState(null),[f,j]=q.useState(null),[_,D]=q.useState(null),[Y,O]=q.useState(null),[I,N]=q.useState({}),[S,v]=q.useState(null),[T,L]=q.useState(!1),[m,P]=q.useState([]),[B,R]=q.useState(!1),A=q.useRef(),H=y.calendarId;fe.locale(d.language);const J=k=>{let E=fe(k).format("YYYY-MM-DD");fetch(Z(E)).then(F=>F.json()).then(F=>{let te=he(k||new Date);const se=F.filter(Ae=>Ae.available==!0);se.length===0&&C();let de=[];te.forEach(Ae=>{F.some($e=>$e.date===Ae&&$e.available==!0)?de.push({available:!0,date:Ae}):de.push({available:!1,date:Ae})});const me=de.map(Ae=>{if(Ae.available===!1)return fe(Ae.date,"YYYY-MM-DD").toDate()});o(me);const xe=se.length?se[0].date:k;ne(xe)}).catch(F=>console.error(F))},ne=k=>{O(null),D(null),a([]);let E=fe(k).format("YYYY-MM-DD");fetch(ue(E)).then(F=>F.json()).then(F=>{const te=F.filter(se=>se.availability==!0);N(te[0]),te.length>0?(a(F),u(!1),D(fe(k).format("L")),$(fe(k,"YYYY-MM-DD").toDate())):(F.length>0&&$(fe(F[0].date,"YYYY-MM-DD").toDate()),a([]),C())})},ee=()=>{if(H!==""&&H!=null)if(!i.dataValue)J(new Date);else if(y.multiple&&Array.isArray(i.dataValue)){if(i.dataValue.length>0){v(i.dataValue);let k=[];i.dataValue.map(E=>{k.push({...E,date:fe(E.date,"YYYY-MM-DD").format("DD-MM-YYYY")})}),P(k)}}else if(!y.multiple&&typeof i.dataValue=="object"){const k={date:i.dataValue.date,slot:i.dataValue.slot},E={...i.dataValue,date:fe(i.dataValue.date,"YYYY-MM-DD").format("DD-MM-YYYY")};P([E]),v(k)}else{let k=i.dataValue.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),E=k[2].split("#");const F={date:fe(k[0],"DD-MM-YYYY").format("YYYY-MM-DD"),slot:k[1]};y.multiple?(g([{date:k[0],slot:k[1],calendar_id:E[0],meeting_id:E[1],opening_hour_id:E.length===3?E[2]:""}]),P([{date:k[0],slot:k[1],calendar_id:E[0],meeting_id:E[1],opening_hour_id:E.length===3?E[2]:""}])):(g({date:k[0],slot:k[1],calendar_id:E[0],meeting_id:E[1],opening_hour_id:E.length===3?E[2]:""}),P([{date:k[0],slot:k[1],calendar_id:E[0],meeting_id:E[1],opening_hour_id:E.length===3?E[2]:""}])),v(F)}};q.useEffect(()=>{var k;(k=window.FormioInstance)==null||k.formReady.then(()=>{setTimeout(()=>{ee()},1e3)})},[]);const he=k=>{let F=fe(k,"YYYY-MM").daysInMonth(),te=[];for(;F;){let se=fe(k).date(F);te.push(se.format("YYYY-MM-DD")),F--}return te},Z=(k,E=!1)=>{let F=y.calendarId,te=y.select_opening_hours,se=y.select_opening_hours?y.opening_hours:[];window.location.pathname.split("/");let de=`${Fe()}/api/calendars/${F}/availabilities`,me=[`from_time=${fe(k).startOf("month").format("YYYY-MM-DD")}`,`to_time=${fe(k).endOf("month").format("YYYY-MM-DD")}`];return E&&me.push(`available=${E}`),te&&se&&me.push(`opening_hours=${se.join()}`),`${de}?${me.join("&")}`},ue=(k,E=!1)=>{let F=y.calendarId,te=y.select_opening_hours,se=y.select_opening_hours?y.opening_hours:[];window.location.pathname.split("/");const de=fe(k).format("YYYY-MM-DD");let me=`${Fe()}/api/calendars/${F}/availabilities/${de}`,xe=[];return E&&xe.push(`available=${E}`),te&&se&&xe.push(`opening_hours=${se.join()}`),xe&&(me=`${me}?${xe.join("&")}`),me},ie=k=>{J(k)},ye=k=>{setTimeout(()=>{L(!T)},1e3),ne(k)},ce=k=>{O(null),setTimeout(()=>{k&&(j(k.target.dataset),O(k.target.id))},300)},Q=k=>{p(null);let E=`${Fe()}/it/meetings/new-draft`,F={date:f!=null&&f.date?fe(f==null?void 0:f.date).format("DD-MM-YYYY"):fe(k.target.dataset.date).format("DD-MM-YYYY"),slot:f!=null&&f.value_start&&(f!=null&&f.value_end)?f.value_start+"-"+f.value_end:k.target.dataset.slots,calendar:y.calendarId,opening_hour:f!=null&&f.opening_hour?f==null?void 0:f.opening_hour:k.target.dataset.opening_hour,meeting:c?c.id:"",first_available_date:I.date,first_available_start_time:I.start_time,first_available_end_time:I.end_time,first_availability_updated_at:fe().format()};fetch(E,{method:"POST",body:JSON.stringify(F),headers:{"Content-Type":"application/json; charset=utf-8"},strictErrors:!0}).then(te=>{if(!te.ok)throw new Error(d.t("Intervallo selezionato non disponibile!"));return te.json()}).then(te=>{p(te);const se={date:F.date,slot:F.slot,calendar_id:F.calendar[0],opening_hour_id:F.opening_hour||F.opening_hour_id,meeting_id:te.id};P([...m,se])}).catch(te=>{console.log(te),Je.fire({title:"",html:"<p>"+te+"</p>",icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},ve=()=>{f&&(Q(),L(!T))},Ne=()=>h.jsx("span",{children:d.t("Tempo prenotazione scaduto!")}),_e=({minutes:k,seconds:E,completed:F})=>F?h.jsx(Ne,{}):h.jsx("div",{children:h.jsxs("div",{children:[" ",h.jsxs("span",{children:[" ",h.jsxs("i",{children:[d.t("Per confermare la prenotazione che ti abbiamo riservato procedi con l’invio di questa pratica e con il pagamento (se richiesto) di quanto previsto entro"),":"]})," ",h.jsxs("b",{children:[k," ",d.t("minuti")," ",E," ",d.t("secondi")]})]})]})}),Ce=k=>{const E=Nt(k.target.value),F=Nt(k.target.min),te=Nt(k.target.max);E<F||E>te||E>Nt(f.end)?(Je.fire({title:"",html:`<p>${d.t("l'orario")} <b>${mn(E)}</b> ${d.t("non è valido")}</p>`,icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),ze("")):j({...f,value_start:k.target.value})},Re=k=>{const E=Nt(k.target.value),F=Nt(k.target.min),te=Nt(k.target.max);E<F||E>te||E<Nt(f.start)?(Je.fire({title:"",html:`<p>${d.t("l'orario")} <b>${mn(E)}</b> ${d.t("non è valido")}</p>`,icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),ze("")):j({...f,value_end:k.target.value})},ze=k=>{if(k===null||k==="")g("");else if(Array.isArray(k)&&k.length>0){let E=[];m.map(F=>{E.push({date:fe(F.date,"DD-MM-YYYY").format("YYYY-MM-DD"),slot:F.slot,calendar_id:F.calendar_id||F.calendar[0],meeting_id:F.meeting_id,opening_hour_id:F.opening_hour||F.opening_hour_id})}),y.multiple?g(E):g(E[0])}else g("")},C=()=>{u(!0),p(null),D(null),ze(null)},b=()=>{if(d.language==="it")return Yn;if(d.language==="en")return kn;if(d.language==="de")return Dn};q.useEffect(()=>{ze(m)},[m]),q.useEffect(()=>{document.querySelector(".formio-read-only")&&B===!1?(R(!0),setTimeout(()=>{ee()},1e3)):(R(!1),setTimeout(()=>{ee()},1e3))},[]);const V=(k,E)=>{let F=`${Fe()}/api/meetings/${E.meeting_id}`;fetch(F,{method:"DELETE",headers:{"Content-Type":"application/json; charset=utf-8",Authorization:`Bearer ${aa("auth-token")}`},strictErrors:!0}).then(te=>{if(te&&te.status>400)Je.fire({title:"",html:`<p>${d.t("Ci sono stati degli errori durante la cancellazione dello slot")}</p>`,icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1});else{const se=[...m.slice(0,k),...m.slice(k+1)];P(se),J(new Date)}})};return h.jsxs(h.Fragment,{children:[B&&S?h.jsxs("div",{className:"my-5 mx-2 d-print-block d-preview-calendar d-preview-calendar-none",children:[h.jsxs("b",{children:[Array.isArray(S)&&S.length>1?d.t("Giorni selezionati per la prenotazione"):d.t("Giorno selezionato per la prenotazione"),":"]}),h.jsx("div",{className:"mb-5",children:h.jsx("div",{className:"it-list-wrapper",children:h.jsx("ul",{className:"it-list",children:Array.isArray(S)?S.map(k=>h.jsx(pn,{day:fe(k.date,"DD-MM-YYYY").format("DD/MM/YYYY"),i18next:d,slot:k.slot})):h.jsx(pn,{day:fe(S.date,"DD-MM-YYYY").format("DD/MM/YYYY"),i18next:d,slot:S.slot})})})})]}):h.jsx("div",{className:"slot-calendar ",children:h.jsxs("div",{className:"row",children:[y.multiple?h.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:h.jsxs("div",{className:"m-2",children:[h.jsx("h6",{children:d.t(y.label)}),h.jsx(va.DayPicker,{mode:"single",selected:z,locale:b(),disabled:X,onMonthChange:ie,onDayClick:ye}),h.jsx("p",{children:d.t("Seleziona un'altra data nel calendario per aggiungere una nuova prenotazione")})]})}):m.length!==1?h.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:h.jsxs("div",{className:"m-2",children:[h.jsx("h6",{children:d.t(y.label)}),h.jsx(va.DayPicker,{mode:"single",selected:z,locale:b(),disabled:X,onMonthChange:ie,onDayClick:ye}),h.jsxs("p",{children:[" ",d.t("Seleziona un'altra data nel calendario per aggiungere una nuova prenotazione")]})]})}):null,h.jsx("div",{className:"col-12",children:m.length?h.jsx("div",{className:"row m-2",children:h.jsxs("div",{className:"col-12 mb-4",children:[h.jsxs("b",{children:[m.length>1?d.t("Giorni selezionati per la prenotazione"):d.t("Giorno selezionato per la prenotazione"),":"," "]}),h.jsx("div",{className:"mb-5",children:h.jsx("div",{className:"it-list-wrapper",children:h.jsx("ul",{className:"it-list",children:m.map((k,E)=>h.jsx("li",{children:h.jsx("div",{className:"list-item",children:h.jsxs("div",{className:"it-right-zone",children:[h.jsxs("span",{className:"text pl-4",children:[k.date," ",f||k.slot?`${d.t("alle")} ${k.slot}`:""]}),h.jsx(le.Icon,{icon:"it-delete",onClick:()=>V(E,k),role:"button"})]})})},"li"+E))})})}),c?h.jsx(le.Alert,{color:"info",defaultValue:"string",className:"d-print-none d-preview-calendar-none",children:h.jsx(xn,{date:c.expiration_time,renderer:_e})}):null]})}):null})]})}),h.jsxs(le.Modal,{isOpen:T,toggle:()=>L(!T),labelledBy:"daySelected",size:"lg",centered:!0,container:document.body,children:[h.jsx(le.ModalHeader,{toggle:()=>L(!T),id:"daySelected",children:d.t("Seleziona una fascia oraria")}),s?null:h.jsxs("div",{className:"title-xsmall u-grey-dark px-4",children:[" ",d.t("Seleziona una fascia oraria e, se necessario, utilizza l'apposito controllo per accorciare la durata della prenotazione, Poi clicca su Conferma")]}),h.jsx(le.ModalBody,{children:h.jsxs("div",{className:"row",children:[m.length>=1?h.jsxs("div",{children:[_&&!s?h.jsxs("h6",{children:[d.t("Orari disponibili del")," ",Ye(_).format("DD/MM/YYYY")]}):null,h.jsxs("div",{className:"calendar-last-selection col-12 pt-2 mb-5",children:[h.jsx("small",{className:"pl-2 mb-2 d-flex px-2",children:h.jsxs("b",{children:[h.jsx(le.Icon,{icon:"it-clock",className:"mr-1",size:"sm"})," ",d.t("Ultimo orario selezionato")]})}),h.jsx("div",{className:"col-6 px-2",children:h.jsx("button",{type:"button",id:"slot-last-selection",onClick:ce,tabIndex:"1",className:Y==="slot-last-selection"?"active btn btn-slot p-0":"btn btn-slot p-0","data-date":fe(_,"DD/MM/YYYY").format("YYYY-MM-DD"),"data-slots":m[m.length-1].slot,"data-opening_hour":m[m.length-1].opening_hour_id,"data-start":m[m.length-1].slot.split("-")[0],"data-end":m[m.length-1].slot.split("-")[1],"data-value_start":m[m.length-1].slot.split("-")[0],"data-value_end":m[m.length-1].slot.split("-")[1],disabled:s,children:m[m.length-1].slot})})]})]}):null,h.jsx("div",{children:_&&m.length>=1?h.jsx("h6",{children:d.t("Seleziona altri orari")}):s?null:h.jsxs("h6",{children:[d.t("Orari disponibili del")," ",Ye(_).format("DD/MM/YYYY")]})}),x.map((k,E)=>h.jsx("div",{className:"col-6",children:h.jsxs("button",{type:"button",id:"slot-"+E,onClick:ce,ref:A,className:Y==="slot-"+E?"active btn btn-slot p-0":"btn btn-slot p-0",tabIndex:"1","data-date":k.date,"data-start":k.start_time,"data-end":k.end_time,"data-value_start":k.start_time,"data-value_end":k.end_time,"data-slots":k.start_time+"-"+k.end_time,"data-opening_hour":k.opening_hour,"data-min_duration":k.min_duration,disabled:k.slots_available==0,children:[k.start_time," - ",k.end_time]})},"slot-"+E)),s?h.jsxs("div",{className:"callout callout-highlight warning",children:[h.jsxs("div",{className:"callout-title",children:[h.jsx(le.Icon,{"aria-hidden":!0,icon:"it-help-circle"}),d.t("Attenzione")]}),h.jsxs("p",{children:[" ",d.t("Non è possibile prenotare per la data selezionata"),"."]})]}):null,h.jsx("div",{className:"col-12",children:f!=null&&f.value_start&&Y?h.jsxs("div",{className:"row",children:[h.jsx("div",{className:"col-12 mb-3",children:h.jsx("p",{className:"mb-3",children:h.jsx("b",{children:d.t("Se necessario, utilizza il controllo che segue per accorciare la durata della prenotazione")})})}),h.jsx("div",{className:"col-12 col-md-6 mb-4",children:h.jsx(le.Input,{type:"time",label:d.t("Dalle"),className:"active",defaultValue:f.value_start||f.start,min:f.start,max:f.end,onBlur:Ce})}),h.jsx("div",{className:"col-12 col-md-6 mb-4",children:h.jsx(le.Input,{type:"time",label:d.t("alle"),className:"active",defaultValue:f.value_end||f.end,onBlur:Re,min:f.start,max:f.end})})]}):null})]})}),h.jsx(le.ModalFooter,{children:h.jsx(le.Button,{color:"primary",onClick:()=>ve(),disabled:!_||!(f!=null&&f.value_start),children:d.t("Conferma")})})]})]})};var It;let On=(It=class extends ot.ReactComponent{constructor(i,g,d){super(i,g,d)}static get builderInfo(){return{title:"Dynamic Calendar",group:"basic",icon:"bi bi-calendar-plus",documentation:"",weight:70,schema:It.schema()}}static schema(){return ot.ReactComponent.schema({type:"dynamic_calendar"})}attachReact(i,g){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(lc,{ref:g,component:this.component,value:this.dataValue,onChange:d=>this.setValue(d),...this,current:this}))}setValue(i){if(i)if(Array.isArray(i))this.selectedNextSlots=i,this.updateValue(i),this.shouldSetValue=!0;else if(typeof i=="object")this.date=i.date,this.slot=i.slot,this.meeting=i.meeting_id,this.meeting_expiration_time=null,this.opening_hour=i.opening_hour_id,this.calendar_id=i.calendar_id,this.updateValue(i),this.shouldSetValue=!0;else{let g=i.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),d=g[2].split("#");this.date=g[0],this.slot=g[1],this.meeting=d[1],this.meeting_expiration_time=null,this.opening_hour=d.length===3?d[2]:"",this.updateValue({date:this.date,slot:this.slot,calendar_id:this.calendar_id,meeting_id:this.meeting,opening_hour_id:this.opening_hour})}}getValue(){if(!(this.date&&this.slot&&this.meeting&&this.opening_hour)&&!(this.selectedNextSlots&&this.selectedNextSlots.length>0))return null;let i=this.meeting?this.meeting:"",g=this.opening_hour?this.opening_hour:"";return this.component.multiple?this.selectedNextSlots:{date:this.date,slot:this.slot,calendar_id:this.calendar_id,meeting_id:i,opening_hour_id:g}}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}},Ct(It,"editForm",fl),It);const uc=[{key:"labelPosition",ignore:!0},{key:"placeholder",ignore:!0},{key:"description",ignore:!0},{key:"hideLabel",ignore:!0},{key:"autofocus",ignore:!0},{key:"tooltip",ignore:!0},{key:"tabindex",ignore:!0},{key:"disabled",ignore:!0},{type:"select",label:"Nome Calendario",key:"calendarId",input:!0,weight:1,placeholder:"Nome Calendario",tooltip:"Inserisci il nome del calendario",dataSrc:"url",defaultValue:"",data:{url:Fe()+"/api/calendars?type=time_fixed_slots"},valueProperty:"id",template:"<span>{{ item.title }}</span>",selectValues:"Results"},{type:"checkbox",label:"Seleziona orari di apertura",key:"select_opening_hours",input:!0,weight:1,tooltip:"Abilita per selezionare i singoli orari di apertura",defaultValue:!1},{label:"Base url",calculateValue:"let url = '"+Fe()+"'; data.url = url; value=url;",key:"url",type:"hidden",input:!0,weight:1},{type:"select",label:"Orari di apertura",key:"opening_hours",input:!0,weight:1,placeholder:"Seleziona gli orari di apertura",tooltip:"Seleziona gli orari di apertura",multiple:!0,dataSrc:"url",defaultValue:"",data:{url:Fe()+"/api/calendars/{{data.calendarId}}/opening-hours"},valueProperty:"id",template:"<span>{{ item.name }}</span>",selectValues:"results",conditional:{show:!0,when:"select_opening_hours",eq:"true"}},{label:"Api Url",redrawOn:"data",calculateValue:`if (data.calendarId) {
|
|
68
|
+
function d($,X,o,x){var a={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[$+" Tage",$+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[$+" Monate",$+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[$+" Jahre",$+" Jahren"]};return X?a[o][0]:a[o][1]}var z=g.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:d,mm:"%d Minuten",h:d,hh:"%d Stunden",d,dd:d,w:d,ww:"%d Wochen",M:d,MM:d,y:d,yy:d},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return z}))})()),or.exports}sc();const Nt=y=>{let i="";return y.split(":").forEach(g=>{i+=g}),parseInt(i)},mn=y=>y.toString().padStart(4,"0").match(/.{1,2}/g).join(":"),Za=y=>{const i=y.address;if(y.addresstype==="county"&&i.country)return i.county;if(y.addresstype==="village"&&i.village)return i.village;const g=[];["emergency","historic","military","natural","landuse","place","railway","man_made","aerialway","boundary","amenity","aeroway","club","craft","leisure","office","mountain_pass","shop","tourism","bridge","tunnel","waterway","name"].forEach($=>{i.hasOwnProperty($)&&i[$]&&g.push(i[$])}),i.road?g.push(i.road):i.pedestrian?g.push(i.pedestrian):i.suburb?g.push(i.suburb):i.square?g.push(i.square):(i.neighbourhood&&g.push(i.neighbourhood),i.hamlet?g.push(i.hamlet):i.isolated_dwelling?g.push(i.isolated_dwelling):i.locality?g.push(i.locality):i.croft&&g.push(i.croft)),i.house_number&&g.push(i.house_number),i.postcode&&g.push(i.postcode),i.village&&g.push(i.village),i.town?g.push(i.town):i.city&&g.push(i.city);var z=g.join(", ").substr(0,150);return z};function aa(y){let i=window.sessionStorage.getItem(y);if(i!==null){let g=JSON.parse(i);if(new Date(g.expirationDate)>new Date)return g.value;window.sessionStorage.removeItem(y)}return null}function oc(y,i,g){let d=g?new Date(g*1e3):null;if(d){let z={value:i,expirationDate:d.toISOString()};window.sessionStorage.setItem(y,JSON.stringify(z))}}function pn({day:y,slot:i,i18next:g}){return h.jsx("li",{className:"it-list-item",children:h.jsx("div",{className:"list-item",children:h.jsx("div",{className:"it-right-zone",children:h.jsxs("span",{className:"text pl-4",children:[h.jsx("b",{children:y})," ",g.t("alle")," ",g.t("ore")," ",h.jsx("b",{children:i})]})})})})}const lc=({component:y,current:i,onChange:g,i18next:d})=>{const[z,$]=q.useState(),[X,o]=q.useState([]),[x,a]=q.useState([]),[s,u]=q.useState(!1),[c,p]=q.useState(null),[f,j]=q.useState(null),[_,D]=q.useState(null),[Y,O]=q.useState(null),[I,N]=q.useState({}),[S,v]=q.useState(null),[T,L]=q.useState(!1),[m,P]=q.useState([]),[B,R]=q.useState(!1),A=q.useRef(),H=y.calendarId;fe.locale(d.language);const J=k=>{let E=fe(k).format("YYYY-MM-DD");fetch(Z(E)).then(F=>F.json()).then(F=>{let te=he(k||new Date);const se=F.filter(Ae=>Ae.available==!0);se.length===0&&C();let de=[];te.forEach(Ae=>{F.some($e=>$e.date===Ae&&$e.available==!0)?de.push({available:!0,date:Ae}):de.push({available:!1,date:Ae})});const me=de.map(Ae=>{if(Ae.available===!1)return fe(Ae.date,"YYYY-MM-DD").toDate()});o(me);const xe=se.length?se[0].date:k;ie(xe)}).catch(F=>console.error(F))},ie=k=>{O(null),D(null),a([]);let E=fe(k).format("YYYY-MM-DD");fetch(ue(E)).then(F=>F.json()).then(F=>{const te=F.filter(se=>se.availability==!0);N(te[0]),te.length>0?(a(F),u(!1),D(fe(k).format("L")),$(fe(k,"YYYY-MM-DD").toDate())):(F.length>0&&$(fe(F[0].date,"YYYY-MM-DD").toDate()),a([]),C())})},ee=()=>{if(H!==""&&H!=null)if(!i.dataValue)J(new Date);else if(y.multiple&&Array.isArray(i.dataValue)){if(i.dataValue.length>0){v(i.dataValue);let k=[];i.dataValue.map(E=>{k.push({...E,date:fe(E.date,"YYYY-MM-DD").format("DD-MM-YYYY")})}),P(k)}}else if(!y.multiple&&typeof i.dataValue=="object"){const k={date:i.dataValue.date,slot:i.dataValue.slot},E={...i.dataValue,date:fe(i.dataValue.date,"YYYY-MM-DD").format("DD-MM-YYYY")};P([E]),v(k)}else{let k=i.dataValue.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),E=k[2].split("#");const F={date:fe(k[0],"DD-MM-YYYY").format("YYYY-MM-DD"),slot:k[1]};y.multiple?(g([{date:k[0],slot:k[1],calendar_id:E[0],meeting_id:E[1],opening_hour_id:E.length===3?E[2]:""}]),P([{date:k[0],slot:k[1],calendar_id:E[0],meeting_id:E[1],opening_hour_id:E.length===3?E[2]:""}])):(g({date:k[0],slot:k[1],calendar_id:E[0],meeting_id:E[1],opening_hour_id:E.length===3?E[2]:""}),P([{date:k[0],slot:k[1],calendar_id:E[0],meeting_id:E[1],opening_hour_id:E.length===3?E[2]:""}])),v(F)}};q.useEffect(()=>{var k;(k=window.FormioInstance)==null||k.formReady.then(()=>{setTimeout(()=>{ee()},1e3)})},[]);const he=k=>{let F=fe(k,"YYYY-MM").daysInMonth(),te=[];for(;F;){let se=fe(k).date(F);te.push(se.format("YYYY-MM-DD")),F--}return te},Z=(k,E=!1)=>{let F=y.calendarId,te=y.select_opening_hours,se=y.select_opening_hours?y.opening_hours:[];window.location.pathname.split("/");let de=`${Fe()}/api/calendars/${F}/availabilities`,me=[`from_time=${fe(k).startOf("month").format("YYYY-MM-DD")}`,`to_time=${fe(k).endOf("month").format("YYYY-MM-DD")}`];return E&&me.push(`available=${E}`),te&&se&&me.push(`opening_hours=${se.join()}`),`${de}?${me.join("&")}`},ue=(k,E=!1)=>{let F=y.calendarId,te=y.select_opening_hours,se=y.select_opening_hours?y.opening_hours:[];window.location.pathname.split("/");const de=fe(k).format("YYYY-MM-DD");let me=`${Fe()}/api/calendars/${F}/availabilities/${de}`,xe=[];return E&&xe.push(`available=${E}`),te&&se&&xe.push(`opening_hours=${se.join()}`),xe&&(me=`${me}?${xe.join("&")}`),me},ae=k=>{J(k)},ye=k=>{setTimeout(()=>{L(!T)},1e3),ie(k)},ce=k=>{O(null),setTimeout(()=>{k&&(j(k.target.dataset),O(k.target.id))},300)},Q=k=>{p(null);let E=`${Fe()}/it/meetings/new-draft`,F={date:f!=null&&f.date?fe(f==null?void 0:f.date).format("DD-MM-YYYY"):fe(k.target.dataset.date).format("DD-MM-YYYY"),slot:f!=null&&f.value_start&&(f!=null&&f.value_end)?f.value_start+"-"+f.value_end:k.target.dataset.slots,calendar:y.calendarId,opening_hour:f!=null&&f.opening_hour?f==null?void 0:f.opening_hour:k.target.dataset.opening_hour,meeting:c?c.id:"",first_available_date:I.date,first_available_start_time:I.start_time,first_available_end_time:I.end_time,first_availability_updated_at:fe().format()};fetch(E,{method:"POST",body:JSON.stringify(F),headers:{"Content-Type":"application/json; charset=utf-8"},strictErrors:!0}).then(te=>{if(!te.ok)throw new Error(d.t("Intervallo selezionato non disponibile!"));return te.json()}).then(te=>{p(te);const se={date:F.date,slot:F.slot,calendar_id:F.calendar[0],opening_hour_id:F.opening_hour||F.opening_hour_id,meeting_id:te.id};P([...m,se])}).catch(te=>{console.log(te),Je.fire({title:"",html:"<p>"+te+"</p>",icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},ve=()=>{f&&(Q(),L(!T))},Ne=()=>h.jsx("span",{children:d.t("Tempo prenotazione scaduto!")}),_e=({minutes:k,seconds:E,completed:F})=>F?h.jsx(Ne,{}):h.jsx("div",{children:h.jsxs("div",{children:[" ",h.jsxs("span",{children:[" ",h.jsxs("i",{children:[d.t("Per confermare la prenotazione che ti abbiamo riservato procedi con l’invio di questa pratica e con il pagamento (se richiesto) di quanto previsto entro"),":"]})," ",h.jsxs("b",{children:[k," ",d.t("minuti")," ",E," ",d.t("secondi")]})]})]})}),Ce=k=>{const E=Nt(k.target.value),F=Nt(k.target.min),te=Nt(k.target.max);E<F||E>te||E>Nt(f.end)?(Je.fire({title:"",html:`<p>${d.t("l'orario")} <b>${mn(E)}</b> ${d.t("non è valido")}</p>`,icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),ze("")):j({...f,value_start:k.target.value})},Re=k=>{const E=Nt(k.target.value),F=Nt(k.target.min),te=Nt(k.target.max);E<F||E>te||E<Nt(f.start)?(Je.fire({title:"",html:`<p>${d.t("l'orario")} <b>${mn(E)}</b> ${d.t("non è valido")}</p>`,icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),ze("")):j({...f,value_end:k.target.value})},ze=k=>{if(k===null||k==="")g("");else if(Array.isArray(k)&&k.length>0){let E=[];m.map(F=>{E.push({date:fe(F.date,"DD-MM-YYYY").format("YYYY-MM-DD"),slot:F.slot,calendar_id:F.calendar_id||F.calendar[0],meeting_id:F.meeting_id,opening_hour_id:F.opening_hour||F.opening_hour_id})}),y.multiple?g(E):g(E[0])}else g("")},C=()=>{u(!0),p(null),D(null),ze(null)},b=()=>{if(d.language==="it")return Yn;if(d.language==="en")return kn;if(d.language==="de")return Dn};q.useEffect(()=>{ze(m)},[m]),q.useEffect(()=>{document.querySelector(".formio-read-only")&&B===!1?(R(!0),setTimeout(()=>{ee()},1e3)):(R(!1),setTimeout(()=>{ee()},1e3))},[]);const V=(k,E)=>{let F=`${Fe()}/api/meetings/${E.meeting_id}`;fetch(F,{method:"DELETE",headers:{"Content-Type":"application/json; charset=utf-8",Authorization:`Bearer ${aa("auth-token")}`},strictErrors:!0}).then(te=>{if(te&&te.status>400)Je.fire({title:"",html:`<p>${d.t("Ci sono stati degli errori durante la cancellazione dello slot")}</p>`,icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1});else{const se=[...m.slice(0,k),...m.slice(k+1)];P(se),J(new Date)}})};return h.jsxs(h.Fragment,{children:[B&&S?h.jsxs("div",{className:"my-5 mx-2 d-print-block d-preview-calendar d-preview-calendar-none",children:[h.jsxs("b",{children:[Array.isArray(S)&&S.length>1?d.t("Giorni selezionati per la prenotazione"):d.t("Giorno selezionato per la prenotazione"),":"]}),h.jsx("div",{className:"mb-5",children:h.jsx("div",{className:"it-list-wrapper",children:h.jsx("ul",{className:"it-list",children:Array.isArray(S)?S.map(k=>h.jsx(pn,{day:fe(k.date,"DD-MM-YYYY").format("DD/MM/YYYY"),i18next:d,slot:k.slot})):h.jsx(pn,{day:fe(S.date,"DD-MM-YYYY").format("DD/MM/YYYY"),i18next:d,slot:S.slot})})})})]}):h.jsx("div",{className:"slot-calendar ",children:h.jsxs("div",{className:"row",children:[y.multiple?h.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:h.jsxs("div",{className:"m-2",children:[h.jsx("h6",{children:d.t(y.label)}),h.jsx(va.DayPicker,{mode:"single",selected:z,locale:b(),disabled:X,onMonthChange:ae,onDayClick:ye}),h.jsx("p",{children:d.t("Seleziona un'altra data nel calendario per aggiungere una nuova prenotazione")})]})}):m.length!==1?h.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:h.jsxs("div",{className:"m-2",children:[h.jsx("h6",{children:d.t(y.label)}),h.jsx(va.DayPicker,{mode:"single",selected:z,locale:b(),disabled:X,onMonthChange:ae,onDayClick:ye}),h.jsxs("p",{children:[" ",d.t("Seleziona un'altra data nel calendario per aggiungere una nuova prenotazione")]})]})}):null,h.jsx("div",{className:"col-12",children:m.length?h.jsx("div",{className:"row m-2",children:h.jsxs("div",{className:"col-12 mb-4",children:[h.jsxs("b",{children:[m.length>1?d.t("Giorni selezionati per la prenotazione"):d.t("Giorno selezionato per la prenotazione"),":"," "]}),h.jsx("div",{className:"mb-5",children:h.jsx("div",{className:"it-list-wrapper",children:h.jsx("ul",{className:"it-list",children:m.map((k,E)=>h.jsx("li",{children:h.jsx("div",{className:"list-item",children:h.jsxs("div",{className:"it-right-zone",children:[h.jsxs("span",{className:"text pl-4",children:[k.date," ",f||k.slot?`${d.t("alle")} ${k.slot}`:""]}),h.jsx(le.Icon,{icon:"it-delete",onClick:()=>V(E,k),role:"button"})]})})},"li"+E))})})}),c?h.jsx(le.Alert,{color:"info",defaultValue:"string",className:"d-print-none d-preview-calendar-none",children:h.jsx(xn,{date:c.expiration_time,renderer:_e})}):null]})}):null})]})}),h.jsxs(le.Modal,{isOpen:T,toggle:()=>L(!T),labelledBy:"daySelected",size:"lg",centered:!0,container:document.body,children:[h.jsx(le.ModalHeader,{toggle:()=>L(!T),id:"daySelected",children:d.t("Seleziona una fascia oraria")}),s?null:h.jsxs("div",{className:"title-xsmall u-grey-dark px-4",children:[" ",d.t("Seleziona una fascia oraria e, se necessario, utilizza l'apposito controllo per accorciare la durata della prenotazione, Poi clicca su Conferma")]}),h.jsx(le.ModalBody,{children:h.jsxs("div",{className:"row",children:[m.length>=1?h.jsxs("div",{children:[_&&!s?h.jsxs("h6",{children:[d.t("Orari disponibili del")," ",Ye(_).format("DD/MM/YYYY")]}):null,h.jsxs("div",{className:"calendar-last-selection col-12 pt-2 mb-5",children:[h.jsx("small",{className:"pl-2 mb-2 d-flex px-2",children:h.jsxs("b",{children:[h.jsx(le.Icon,{icon:"it-clock",className:"mr-1",size:"sm"})," ",d.t("Ultimo orario selezionato")]})}),h.jsx("div",{className:"col-6 px-2",children:h.jsx("button",{type:"button",id:"slot-last-selection",onClick:ce,tabIndex:"1",className:Y==="slot-last-selection"?"active btn btn-slot p-0":"btn btn-slot p-0","data-date":fe(_,"DD/MM/YYYY").format("YYYY-MM-DD"),"data-slots":m[m.length-1].slot,"data-opening_hour":m[m.length-1].opening_hour_id,"data-start":m[m.length-1].slot.split("-")[0],"data-end":m[m.length-1].slot.split("-")[1],"data-value_start":m[m.length-1].slot.split("-")[0],"data-value_end":m[m.length-1].slot.split("-")[1],disabled:s,children:m[m.length-1].slot})})]})]}):null,h.jsx("div",{children:_&&m.length>=1?h.jsx("h6",{children:d.t("Seleziona altri orari")}):s?null:h.jsxs("h6",{children:[d.t("Orari disponibili del")," ",Ye(_).format("DD/MM/YYYY")]})}),x.map((k,E)=>h.jsx("div",{className:"col-6",children:h.jsxs("button",{type:"button",id:"slot-"+E,onClick:ce,ref:A,className:Y==="slot-"+E?"active btn btn-slot p-0":"btn btn-slot p-0",tabIndex:"1","data-date":k.date,"data-start":k.start_time,"data-end":k.end_time,"data-value_start":k.start_time,"data-value_end":k.end_time,"data-slots":k.start_time+"-"+k.end_time,"data-opening_hour":k.opening_hour,"data-min_duration":k.min_duration,disabled:k.slots_available==0,children:[k.start_time," - ",k.end_time]})},"slot-"+E)),s?h.jsxs("div",{className:"callout callout-highlight warning",children:[h.jsxs("div",{className:"callout-title",children:[h.jsx(le.Icon,{"aria-hidden":!0,icon:"it-help-circle"}),d.t("Attenzione")]}),h.jsxs("p",{children:[" ",d.t("Non è possibile prenotare per la data selezionata"),"."]})]}):null,h.jsx("div",{className:"col-12",children:f!=null&&f.value_start&&Y?h.jsxs("div",{className:"row",children:[h.jsx("div",{className:"col-12 mb-3",children:h.jsx("p",{className:"mb-3",children:h.jsx("b",{children:d.t("Se necessario, utilizza il controllo che segue per accorciare la durata della prenotazione")})})}),h.jsx("div",{className:"col-12 col-md-6 mb-4",children:h.jsx(le.Input,{type:"time",label:d.t("Dalle"),className:"active",defaultValue:f.value_start||f.start,min:f.start,max:f.end,onBlur:Ce})}),h.jsx("div",{className:"col-12 col-md-6 mb-4",children:h.jsx(le.Input,{type:"time",label:d.t("alle"),className:"active",defaultValue:f.value_end||f.end,onBlur:Re,min:f.start,max:f.end})})]}):null})]})}),h.jsx(le.ModalFooter,{children:h.jsx(le.Button,{color:"primary",onClick:()=>ve(),disabled:!_||!(f!=null&&f.value_start),children:d.t("Conferma")})})]})]})};var It;let On=(It=class extends ot.ReactComponent{constructor(i,g,d){super(i,g,d)}static get builderInfo(){return{title:"Dynamic Calendar",group:"basic",icon:"bi bi-calendar-plus",documentation:"",weight:70,schema:It.schema()}}static schema(){return ot.ReactComponent.schema({type:"dynamic_calendar"})}attachReact(i,g){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(lc,{ref:g,component:this.component,value:this.dataValue,onChange:d=>this.setValue(d),...this,current:this}))}setValue(i){if(i)if(Array.isArray(i))this.selectedNextSlots=i,this.updateValue(i),this.shouldSetValue=!0;else if(typeof i=="object")this.date=i.date,this.slot=i.slot,this.meeting=i.meeting_id,this.meeting_expiration_time=null,this.opening_hour=i.opening_hour_id,this.calendar_id=i.calendar_id,this.updateValue(i),this.shouldSetValue=!0;else{let g=i.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),d=g[2].split("#");this.date=g[0],this.slot=g[1],this.meeting=d[1],this.meeting_expiration_time=null,this.opening_hour=d.length===3?d[2]:"",this.updateValue({date:this.date,slot:this.slot,calendar_id:this.calendar_id,meeting_id:this.meeting,opening_hour_id:this.opening_hour})}}getValue(){if(!(this.date&&this.slot&&this.meeting&&this.opening_hour)&&!(this.selectedNextSlots&&this.selectedNextSlots.length>0))return null;let i=this.meeting?this.meeting:"",g=this.opening_hour?this.opening_hour:"";return this.component.multiple?this.selectedNextSlots:{date:this.date,slot:this.slot,calendar_id:this.calendar_id,meeting_id:i,opening_hour_id:g}}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}},Ct(It,"editForm",fl),It);const uc=[{key:"labelPosition",ignore:!0},{key:"placeholder",ignore:!0},{key:"description",ignore:!0},{key:"hideLabel",ignore:!0},{key:"autofocus",ignore:!0},{key:"tooltip",ignore:!0},{key:"tabindex",ignore:!0},{key:"disabled",ignore:!0},{type:"select",label:"Nome Calendario",key:"calendarId",input:!0,weight:1,placeholder:"Nome Calendario",tooltip:"Inserisci il nome del calendario",dataSrc:"url",defaultValue:"",data:{url:Fe()+"/api/calendars?type=time_fixed_slots"},valueProperty:"id",template:"<span>{{ item.title }}</span>",selectValues:"Results"},{type:"checkbox",label:"Seleziona orari di apertura",key:"select_opening_hours",input:!0,weight:1,tooltip:"Abilita per selezionare i singoli orari di apertura",defaultValue:!1},{label:"Base url",calculateValue:"let url = '"+Fe()+"'; data.url = url; value=url;",key:"url",type:"hidden",input:!0,weight:1},{type:"select",label:"Orari di apertura",key:"opening_hours",input:!0,weight:1,placeholder:"Seleziona gli orari di apertura",tooltip:"Seleziona gli orari di apertura",multiple:!0,dataSrc:"url",defaultValue:"",data:{url:Fe()+"/api/calendars/{{data.calendarId}}/opening-hours"},valueProperty:"id",template:"<span>{{ item.name }}</span>",selectValues:"results",conditional:{show:!0,when:"select_opening_hours",eq:"true"}},{label:"Api Url",redrawOn:"data",calculateValue:`if (data.calendarId) {
|
|
69
69
|
let url = data.url + '/api/calendars/' + data.calendarId + '/overlaps';
|
|
70
70
|
if (data.select_opening_hours && data.opening_hours.length > 0) {
|
|
71
71
|
let qs = "?opening_hours=" + data.opening_hours.join();
|
|
@@ -96,12 +96,12 @@ if(data.calendarId && data.api_url){
|
|
|
96
96
|
data.overlaps_validation = -1; document.querySelector("input[name^='data[overlaps_validation]']").value = -1;
|
|
97
97
|
}
|
|
98
98
|
);
|
|
99
|
-
}`,validateOn:"change",validate:{customMessage:"Vi sono sovrapposizioni negli orari di apertura",custom:`if (document.querySelector("input[name^='data[overlaps_validation]']").value === '0') {valid=true} else {valid = 'Sovrapposizione';}`},key:"overlaps_validation",attributes:{readonly:"true"},required:!0,type:"number",input:!0,weight:1},{label:"Precisione minima (minuti)",defaultValue:1,required:!0,inputFormat:"plain",key:"range_step",type:"number",input:!0,weight:1}];function cc(...y){return ot.Components.baseEditForm([{key:"display",components:uc}],...y)}function gn({day:y,slot:i,i18next:g}){return h.jsx("li",{className:"it-list-item",children:h.jsx("div",{className:"list-item",children:h.jsx("div",{className:"it-right-zone",children:h.jsxs("span",{className:"text pl-4",children:[h.jsx("b",{children:y})," ",g.t("alle")," ",g.t("ore")," ",h.jsx("b",{children:i})]})})})})}const dc=({component:y,current:i,onChange:g,i18next:d})=>{const[z,$]=q.useState(),[X,o]=q.useState([]),[x,a]=q.useState([]),[s,u]=q.useState(!1),[c,p]=q.useState(null),[f,j]=q.useState(null),[_,D]=q.useState(null),[Y,O]=q.useState(null),[I,N]=q.useState({}),[S,v]=q.useState(null),[T,L]=q.useState(!1),[m,P]=q.useState([]),[B,R]=q.useState(!1),A=q.useRef(),H=y.calendarId;fe.locale(d.language);const J=b=>{let V=fe(b).format("YYYY-MM-DD");fetch(Z(V)).then(k=>k.json()).then(k=>{let E=he(b||new Date);const F=k.filter(me=>me.available==!0);F.length===0&&Re();let se=[];E.forEach(me=>{k.some(xe=>xe.date===me&&xe.available==!0)?se.push({available:!0,date:me}):se.push({available:!1,date:me})});const be=se.map(me=>{if(me.available===!1)return fe(me.date,"YYYY-MM-DD").toDate()});o(be);const de=F.length?F[0].date:b;ne(de)}).catch(k=>console.error(k))},ne=b=>{O(null),D(null),a([]);let V=fe(b).format("YYYY-MM-DD");fetch(ue(V)).then(k=>k.json()).then(k=>{const E=k.filter(F=>F.availability==!0);N(E[0]),E.length>0?(a(k),u(!1),D(fe(b).format("L")),$(fe(b,"YYYY-MM-DD").toDate())):(k.length>0&&$(fe(k[0].date,"YYYY-MM-DD").toDate()),a([]),Re())})},ee=()=>{if(H!==""&&H!=null)if(!i.dataValue)J(new Date);else if(y.multiple&&Array.isArray(i.dataValue)){if(i.dataValue.length>0){v(i.dataValue);let b=[];i.dataValue.map(V=>{b.push({...V,date:fe(V.date,"YYYY-MM-DD").format("DD-MM-YYYY")})}),P(b)}}else if(!y.multiple&&typeof i.dataValue=="object"){const b={date:i.dataValue.date,slot:i.dataValue.slot},V={...i.dataValue,date:fe(i.dataValue.date,"YYYY-MM-DD").format("DD-MM-YYYY")};P([V]),v(b)}else{let b=i.dataValue.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),V=b[2].split("#");const k={date:fe(b[0],"DD-MM-YYYY").format("YYYY-MM-DD"),slot:b[1]};y.multiple?(g([{date:b[0],slot:b[1],calendar_id:V[0],meeting_id:V[1],opening_hour_id:V.length===3?V[2]:""}]),P([{date:b[0],slot:b[1],calendar_id:V[0],meeting_id:V[1],opening_hour_id:V.length===3?V[2]:""}])):(g({date:b[0],slot:b[1],calendar_id:V[0],meeting_id:V[1],opening_hour_id:V.length===3?V[2]:""}),P([{date:b[0],slot:b[1],calendar_id:V[0],meeting_id:V[1],opening_hour_id:V.length===3?V[2]:""}])),v(k)}};q.useEffect(()=>{var b;(b=window.FormioInstance)==null||b.formReady.then(()=>{setTimeout(()=>{ee()},1e3)})},[]);const he=b=>{let k=fe(b,"YYYY-MM").daysInMonth(),E=[];for(;k;){let F=fe(b).date(k);E.push(F.format("YYYY-MM-DD")),k--}return E},Z=(b,V=!1)=>{let k=y.calendarId,E=y.select_opening_hours,F=y.select_opening_hours?y.opening_hours:[];window.location.pathname.split("/");let se=`${Fe()}/api/calendars/${k}/availabilities`,be=[`from_time=${fe(b).startOf("month").format("YYYY-MM-DD")}`,`to_time=${fe(b).endOf("month").format("YYYY-MM-DD")}`];return V&&be.push(`available=${V}`),E&&F&&be.push(`opening_hours=${F.join()}`),`${se}?${be.join("&")}`},ue=(b,V=!1)=>{let k=y.calendarId,E=y.select_opening_hours,F=y.select_opening_hours?y.opening_hours:[];window.location.pathname.split("/");const se=fe(b).format("YYYY-MM-DD");let be=`${Fe()}/api/calendars/${k}/availabilities/${se}`,de=[];return V&&de.push(`available=${V}`),E&&F&&de.push(`opening_hours=${F.join()}`),de&&(be=`${be}?${de.join("&")}`),be},ie=b=>{J(b)},ye=b=>{setTimeout(()=>{L(!T)},1e3),ne(b)},ce=b=>{O(null),setTimeout(()=>{b&&(j(b.target.dataset),O(b.target.id))},300)},Q=b=>{p(null);let V=`${Fe()}/it/meetings/new-draft`,k={date:f!=null&&f.date?fe(f==null?void 0:f.date).format("DD-MM-YYYY"):fe(b.target.dataset.date).format("DD-MM-YYYY"),slot:f!=null&&f.value_start&&(f!=null&&f.value_end)?f.value_start+"-"+f.value_end:b.target.dataset.slots,calendar:y.calendarId,opening_hour:f!=null&&f.opening_hour?f==null?void 0:f.opening_hour:b.target.dataset.opening_hour,meeting:c?c.id:"",first_available_date:I.date,first_available_start_time:I.start_time,first_available_end_time:I.end_time,first_availability_updated_at:fe().format()};fetch(V,{method:"POST",body:JSON.stringify(k),headers:{"Content-Type":"application/json; charset=utf-8"},strictErrors:!0}).then(E=>{if(!E.ok)throw new Error(d.t("Intervallo selezionato non disponibile!"));return E.json()}).then(E=>{p(E);const F={date:k.date,slot:k.slot,calendar_id:k.calendar[0],opening_hour_id:k.opening_hour||k.opening_hour_id,meeting_id:E.id};P([...m,F])}).catch(E=>{console.log(E),Je.fire({title:"",html:"<p>"+E+"</p>",icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},ve=()=>{f&&(Q(),L(!T))},Ne=()=>h.jsx("span",{children:d.t("Tempo prenotazione scaduto!")}),_e=({minutes:b,seconds:V,completed:k})=>k?h.jsx(Ne,{}):h.jsx("div",{children:h.jsxs("div",{children:[" ",h.jsxs("span",{children:[" ",h.jsxs("i",{children:[d.t("Per confermare la prenotazione che ti abbiamo riservato procedi con l’invio di questa pratica e con il pagamento (se richiesto) di quanto previsto entro"),":"]})," ",h.jsxs("b",{children:[b," ",d.t("minuti")," ",V," ",d.t("secondi")]})]})]})}),Ce=b=>{if(b===null||b==="")g("");else if(Array.isArray(b)&&b.length>0){let V=[];m.map(k=>{V.push({date:fe(k.date,"DD-MM-YYYY").format("YYYY-MM-DD"),slot:k.slot,calendar_id:k.calendar_id||k.calendar[0],meeting_id:k.meeting_id,opening_hour_id:k.opening_hour||k.opening_hour_id})}),y.multiple?g(V):g(V[0])}else g("")},Re=()=>{u(!0),p(null),D(null),Ce(null)},ze=()=>{if(d.language==="it")return Yn;if(d.language==="en")return kn;if(d.language==="de")return Dn};q.useEffect(()=>{Ce(m)},[m]),q.useEffect(()=>{document.querySelector(".formio-read-only")&&B===!1?(R(!0),setTimeout(()=>{ee()},1e3)):(R(!1),setTimeout(()=>{ee()},1e3))},[]);const C=(b,V)=>{let k=`${Fe()}/api/meetings/${V.meeting_id}`;fetch(k,{method:"DELETE",headers:{"Content-Type":"application/json; charset=utf-8",Authorization:`Bearer ${aa("auth-token")}`},strictErrors:!0}).then(E=>{if(E&&E.status>400)Je.fire({title:"",html:`<p>${d.t("Ci sono stati degli errori durante la cancellazione dello slot")}</p>`,icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1});else{const F=[...m.slice(0,b),...m.slice(b+1)];P(F),J(new Date)}})};return h.jsxs(h.Fragment,{children:[B&&S?h.jsxs("div",{className:"my-5 mx-2 d-print-block d-preview-calendar d-preview-calendar-none",children:[h.jsxs("b",{children:[Array.isArray(S)&&S.length>1?d.t("Giorni selezionati per la prenotazione"):d.t("Giorno selezionato per la prenotazione"),":"]}),h.jsx("div",{className:"mb-5",children:h.jsx("div",{className:"it-list-wrapper",children:h.jsx("ul",{className:"it-list",children:Array.isArray(S)?S.map(b=>h.jsx(gn,{day:fe(b.date,"DD-MM-YYYY").format("DD/MM/YYYY"),i18next:d,slot:b.slot})):h.jsx(gn,{day:Ye(S.date).format("DD/MM/YYYY"),i18next:d,slot:S.slot})})})})]}):h.jsx("div",{className:"slot-calendar ",children:h.jsxs("div",{className:"row",children:[y.multiple?h.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:h.jsxs("div",{className:"m-2",children:[h.jsx("h6",{children:d.t(y.label)}),h.jsx(va.DayPicker,{mode:"single",selected:z,locale:ze(),disabled:X,onMonthChange:ie,onDayClick:ye})]})}):m.length!==1?h.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:h.jsxs("div",{className:"m-2",children:[h.jsx("h6",{children:d.t(y.label)}),h.jsx(va.DayPicker,{mode:"single",selected:z,locale:ze(),disabled:X,onMonthChange:ie,onDayClick:ye})]})}):null,h.jsx("div",{className:"col-12",children:m.length?h.jsx("div",{className:"row m-2",children:h.jsxs("div",{className:"col-12 mb-4",children:[h.jsxs("b",{children:[m.length>1?d.t("Giorni selezionati per la prenotazione"):d.t("Giorno selezionato per la prenotazione"),":"," "]}),h.jsx("div",{className:"mb-5",children:h.jsx("div",{className:"it-list-wrapper",children:h.jsx("ul",{className:"it-list",children:m.map((b,V)=>h.jsx("li",{children:h.jsx("div",{className:"list-item",children:h.jsxs("div",{className:"it-right-zone",children:[h.jsxs("span",{className:"text pl-4",children:[b.date," ",f||b.slot?`${d.t("alle")} ${b.slot}`:""]}),h.jsx(le.Icon,{icon:"it-delete",onClick:()=>C(V,b),role:"button"})]})})},"li"+V))})})}),c?h.jsx(le.Alert,{color:"info",defaultValue:"string",className:"d-print-none d-preview-calendar-none",children:h.jsx(xn,{date:c.expiration_time,renderer:_e})}):null]})}):null})]})}),h.jsxs(le.Modal,{isOpen:T,toggle:()=>L(!T),labelledBy:"daySelected",size:"lg",centered:!0,container:document.body,children:[h.jsx(le.ModalHeader,{toggle:()=>L(!T),id:"daySelected",children:d.t("Seleziona una fascia oraria")}),h.jsx(le.ModalBody,{children:h.jsxs("div",{className:"row",children:[m.length>=1?h.jsxs("div",{children:[_&&!s?h.jsxs("h6",{children:[d.t("Orari disponibili del")," ",Ye(_).format("DD/MM/YYYY")]}):null,h.jsxs("div",{className:"calendar-last-selection col-12 pt-2 mb-5",children:[h.jsx("small",{className:"pl-2 mb-2 d-flex px-2",children:h.jsxs("b",{children:[h.jsx(le.Icon,{icon:"it-clock",className:"mr-1",size:"sm"})," ",d.t("Ultimo orario selezionato")]})}),h.jsx("div",{className:"col-6 px-2",children:h.jsx("button",{type:"button",id:"slot-last-selection",onClick:ce,tabIndex:"1",className:Y==="slot-last-selection"?"active btn btn-slot p-0":"btn btn-slot p-0","data-date":fe(_,"DD/MM/YYYY").format("YYYY-MM-DD"),"data-slots":m[m.length-1].slot,"data-opening_hour":m[m.length-1].opening_hour_id,"data-start":m[m.length-1].slot.split("-")[0],"data-end":m[m.length-1].slot.split("-")[1],"data-value_start":m[m.length-1].slot.split("-")[0],"data-value_end":m[m.length-1].slot.split("-")[1],disabled:s,children:m[m.length-1].slot})})]})]}):null,h.jsx("div",{children:_&&m.length>=1?h.jsx("h6",{children:d.t("Seleziona altri orari")}):s?null:h.jsxs("h6",{children:[d.t("Orari disponibili del")," ",Ye(_).format("DD/MM/YYYY")]})}),x.map((b,V)=>h.jsx("div",{className:"col-6",children:h.jsxs("button",{type:"button",id:"slot-"+V,onClick:ce,ref:A,className:Y==="slot-"+V?"active btn btn-slot p-0":"btn btn-slot p-0",tabIndex:"1","data-date":b.date,"data-start":b.start_time,"data-end":b.end_time,"data-value_start":b.start_time,"data-value_end":b.end_time,"data-slots":b.start_time+"-"+b.end_time,"data-opening_hour":b.opening_hour,"data-min_duration":b.min_duration,disabled:b.slots_available==0,children:[b.start_time," - ",b.end_time]})},"slot-"+V)),s?h.jsxs("div",{className:"callout callout-highlight warning",children:[h.jsxs("div",{className:"callout-title",children:[h.jsx(le.Icon,{"aria-hidden":!0,icon:"it-help-circle"}),d.t("Attenzione")]}),h.jsxs("p",{children:[" ",d.t("Non è possibile prenotare per la data selezionata"),"."]})]}):null]})}),h.jsx(le.ModalFooter,{children:h.jsx(le.Button,{color:"primary",onClick:()=>ve(),disabled:!_||!(f!=null&&f.value_start),children:d.t("Conferma")})})]})]})},ka=class ka extends ot.ReactComponent{constructor(i,g,d){super(i,g,d)}static get builderInfo(){return{title:"Calendar",group:"basic",icon:"bi bi-calendar-plus",documentation:"",weight:70,schema:ka.schema()}}static schema(){return ot.ReactComponent.schema({type:"calendar"})}attachReact(i,g){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(dc,{ref:g,component:this.component,value:this.dataValue,onChange:d=>this.setValue(d),...this,current:this}))}setValue(i){if(i)if(Array.isArray(i))this.selectedNextSlots=i,this.updateValue(i),this.shouldSetValue=!0;else if(typeof i=="object")this.date=i.date,this.slot=i.slot,this.meeting=i.meeting_id,this.meeting_expiration_time=null,this.opening_hour=i.opening_hour_id,this.calendar_id=i.calendar_id,this.updateValue(i),this.shouldSetValue=!0;else{let g=i.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),d=g[2].split("#");this.date=g[0],this.slot=g[1],this.meeting=d[1],this.meeting_expiration_time=null,this.opening_hour=d.length===3?d[2]:"",this.updateValue({date:this.date,slot:this.slot,calendar_id:this.calendar_id,meeting_id:this.meeting,opening_hour_id:this.opening_hour})}}getValue(){if(!(this.date&&this.slot&&this.meeting&&this.opening_hour)&&!(this.selectedNextSlots&&this.selectedNextSlots.length>0))return null;let i=this.meeting?this.meeting:"",g=this.opening_hour?this.opening_hour:"";return this.component.multiple?this.selectedNextSlots:{date:this.date,slot:this.slot,calendar_id:this.calendar_id,meeting_id:i,opening_hour_id:g}}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}};Ct(ka,"editForm",cc);let ba=ka;const hc=[{key:"labelPosition",ignore:!0},{key:"placeholder",ignore:!0},{key:"description",ignore:!0},{key:"hideLabel",ignore:!0},{key:"autofocus",ignore:!0},{key:"tooltip",ignore:!0},{key:"tabindex",ignore:!0},{key:"disabled",ignore:!0},{label:"Base url",calculateValue:"let url = '"+Fe()+"'; data.url = url; value=url;",key:"url",type:"hidden",input:!0,weight:1}];function fc(...y){return ot.Components.baseEditForm([{key:"display",components:hc}],...y)}function mc({day:y,slot:i,i18next:g}){return h.jsx("li",{className:"it-list-item",children:h.jsx("div",{className:"list-item",children:h.jsx("div",{className:"it-right-zone",children:h.jsxs("span",{className:"text-paragraph pl-4",children:[h.jsx("b",{children:y})," ",g.t("alle")," ",g.t("ore")," ",h.jsx("b",{children:i})]})})})})}function pc(y,i){if(!i||i.length===0)return;const g=i.map(X=>{const o=new Date(X.start);return(new Date(X.end)-o)/6e4}),d=Math.min(...g),z=g.reduce((X,o)=>X+o,0)/g.length;let $=0;d<=30&&d>15?$=z*1:d<=15?$=z*24:$=z*4,y.setOption("slotHeight",$),document.documentElement.style.setProperty("--slot-height",`${$}px`)}const jn={AVAILABILITY:{key:"availability_data_cache_",duration:10},SLOTS:{key:"availability_slots_cache_",duration:10},SUBMISSION:{key:"submission_cache_",duration:30}},er=(y,i,g)=>{const d={data:g,timestamp:Ye().toISOString()};sessionStorage.setItem(i,JSON.stringify(d)),console.log(`✅ Cache salvato: ${y}`)},tr=(y,i)=>{try{const g=sessionStorage.getItem(i);if(!g)return null;const d=JSON.parse(g),z=Ye().diff(Ye(d.timestamp),"minutes");return z>jn[y].duration?(sessionStorage.removeItem(i),console.log(`⏰ Cache scaduto: ${y}`),null):(console.log(`✅ Cache letto: ${y} (${z} minuti fa)`),d.data)}catch(g){return console.error(`Errore nel leggere il cache (${y}):`,g),null}},ar=(y,...i)=>jn[y].key+btoa(i),mr="calendar_view_state",pr="calendar_view_date",gc=(y,i)=>{try{sessionStorage.setItem(mr,y),sessionStorage.setItem(pr,i||new Date().toISOString())}catch(g){console.error("Errore nel salvare lo stato della view:",g)}},yc=()=>{try{const y=sessionStorage.getItem(mr),i=sessionStorage.getItem(pr);return{viewType:y||"timeGridWeek",date:i?new Date(i):new Date}}catch(y){return console.error("Errore nel leggere lo stato della view:",y),{viewType:"timeGridWeek",date:new Date}}},Tn=()=>{try{sessionStorage.removeItem(mr),sessionStorage.removeItem(pr)}catch(y){console.error("Errore nel pulire lo stato della view:",y)}},yn=cr.Formio.Components.components.field,vc=({component:y,current:i,onChange:g,i18next:d})=>{var Re,ze;const[z,$]=q.useState(null),[X,o]=q.useState(null),[x,a]=q.useState([]),[s,u]=q.useState(!1),[c,p]=q.useState(!1),[f,j]=q.useState(null),[_,D]=q.useState([]),[Y,O]=q.useState([]),[I,N]=q.useState([]),[S,v]=q.useState(null),[T,L]=q.useState(null),[m,P]=q.useState(null),B=q.useRef(null),R=q.useRef(null);d.language,fe.locale(d.language),Ye.locale(d.language);function A(C){if(!C||C.length===0)return null;const b=C.map(E=>({start:E.start_time,end:E.end_time})),V=b.reduce((E,F)=>F.start<E?F.start:E,b[0].start),k=b.reduce((E,F)=>F.end>E?F.end:E,b[0].end);return{earliestStartTime:V,latestEndTime:k}}function H(C){const b=C.map(E=>fe(E.date).isoWeekday()),k=[1,2,3,4,5,6,7].filter(E=>!b.includes(E));k.length>0?R.current.setOption("hiddenDays",k):R.current.setOption("hiddenDays",[])}function J(C,b,V){const k=new URL(C),F=`${k.pathname.split("/").slice(0,4).join("/")}/${b}/${V}`;return`${k.origin}${F}${k.search}`}function ne(C,b,V){const k=new URL(C),F=`${k.pathname.split("/").slice(0,4).join("/")}`;return`${k.origin}${F}${k.search}&from_to=${b}&to_date=${V}`}function ee(C,b,V){return`${Fe()}/api/availabilities/${C}/${b}?calendar_ids=${V}&available=true`}const he=C=>{N([]),O([]),g({}),C&&O(z.filter(b=>b.date.startsWith(C)))},Z=async(C,b)=>{const V=JSON.parse(C),k=ar("SLOTS",V.date,V.calendar_ids);if(b==="manual")N([]),P(null),j(null),g({});else{const E=tr("SLOTS",k);if(E){N(E);return}}try{const E=await window.FormioHelper.anonymousCall(`availabilities/${V.date}?calendar_ids=${V.calendar_ids}`);er("SLOTS",k,E.data),N(E.data)}catch(E){console.error("Errore nel caricamento degli slot:",E),Je.fire({icon:"error",title:d.t("Errore"),text:d.t("Errore nel caricamento degli orari")})}},ue=C=>{var k,E,F,te,se,be,de,me;const b=JSON.parse(C),V={status:6,calendar:b.calendar_id,opening_hour:b.opening_hour_id,user:null,email:null,fiscal_code:null,name:" ",phone_number:null,from_time:Ye(`${b.date}T${b.start_time}`).toISOString(),to_time:Ye(`${b.date}T${b.end_time}`).toISOString(),user_message:null,reason:null,location:null,motivation_outcome:null,calendar_group_config_id:(E=(k=i==null?void 0:i.data)==null?void 0:k.service_data)==null?void 0:E.id,calendar_group_office_id:(te=(F=i==null?void 0:i.data)==null?void 0:F.user_group)==null?void 0:te.id,calendar_group_place_id:(be=(se=i==null?void 0:i.data)==null?void 0:se.place)==null?void 0:be.id};window.FormioHelper.authenticatedRequest((de=i==null?void 0:i.dataValue)!=null&&de.id?"PATCH":"POST",(me=i==null?void 0:i.dataValue)!=null&&me.id?`meetings/${i.dataValue.id}`:"meetings",V).then(xe=>{j({day:Ye(b.date).format("dddd, DD MMMM YYYY"),startDate:b.start_time,endDate:b.end_time}),g(xe!=null&&xe.id?xe:xe?{...xe,id:i.dataValue.id}:i.dataValue.id?{...V,id:i.dataValue.id}:{...V})}).catch(xe=>{var Ae,$e;console.error(xe),xe.status===400&&(($e=(Ae=xe==null?void 0:xe.response)==null?void 0:Ae.data)==null?void 0:$e.type)==="validation_error"?Je.fire({title:"",html:"<p>"+d.t("Lo slot orario selezionato non è disponibile perché già prenotato Seleziona un altro orario o una data diversa")+"</p>",icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}):Je.fire({title:"",html:"<p>"+xe+"</p>",icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},ie=C=>{const b=new Set,V=[];return C.forEach(k=>{const E=Ye(k.date),F=E.format("YYYY-MM");b.has(F)||(b.add(F),V.push({value:F,label:E.format("MMMM YYYY").replace(/^\w/,te=>te.toUpperCase())}))}),V},ye=async()=>{var se,be,de,me,xe,Ae,$e,Ie,Ge,Qe;const C=(de=(be=(se=i==null?void 0:i.root)==null?void 0:se.data)==null?void 0:be.place)!=null&&de.merge_availabilities?(Ae=(xe=(me=i==null?void 0:i.root)==null?void 0:me.data)==null?void 0:xe.place)==null?void 0:Ae.merged_availabilities_link:null,b=fe().format("YYYY-MM-DD"),V=fe().add(1,"month").format("YYYY-MM-DD"),k=((Qe=(Ge=(Ie=($e=i==null?void 0:i.root)==null?void 0:$e.data)==null?void 0:Ie.place)==null?void 0:Ge.calendars[0])==null?void 0:Qe.id)||null,E=C?ne(C,b,V):ee(b,V,k),F=ar("AVAILABILITY",E),te=tr("AVAILABILITY",F);if(te){$(te),D(ie(te));return}else g({});u(!0);try{const ge=await window.FormioHelper.fetchAPIUrlLimit(E);if(u(!1),!(ge!=null&&ge.length)){Je.fire({icon:"warning",title:d.t("warning"),html:d.t("no_meetings")});return}er("AVAILABILITY",F,ge),$(ge),D(ie(ge))}catch(ge){u(!1),console.error("Errore nel caricamento disponibilità:",ge)}};q.useEffect(()=>{if(z!=null&&z.length){const C=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());if(C!=null&&C.from_time&&(C!=null&&C.to_time)&&!Ye().isAfter(C==null?void 0:C.draft_expiration)){const b=Ye(C.from_time).format("YYYY-MM");v(b),b&&O&&(O(z.filter(V=>V.date.startsWith(b))),L(Ye(C.from_time).format("YYYY-MM-DD")))}else C!=null&&C.draft_expiration&&Ye().isAfter(C==null?void 0:C.draft_expiration)&&Je.fire({icon:"warning",title:d.t("warning"),html:d.t("expired_meeting")})}},[z]),q.useEffect(()=>{const C=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());if(!_.length||S||C!=null&&C.from_time||C!=null&&C.to_time)return;const b=_[0];b&&(v(b.value),he(b.value))},[_,S,i==null?void 0:i.dataValue]),q.useEffect(()=>{if(T&&c===!1){const C=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());Z(JSON.stringify({date:T,calendar_ids:C.calendar.id}))}},[T]);const ce=()=>window.innerWidth>768?"timeGridWeek":"timeGridDay";q.useEffect(()=>{const C=()=>{const b=R.current;if(!b)return;const V=ce(),k=b.getView().type;V!==k&&b.setOption("view",V)};return window.addEventListener("resize",C),()=>window.removeEventListener("resize",C)},[]),q.useEffect(()=>{const C=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());I!=null&&I.length&&(C!=null&&C.from_time)&&(P(Ye(C.from_time).format("HH:mm")+" - "+Ye(C.to_time).format("HH:mm")),j({day:Ye(C.from_time).format("dddd D MMM YYYY"),startDate:Ye(C.from_time).format("HH:mm"),endDate:Ye(C.to_time).format("HH:mm")}))},[I]);const Q=()=>{const C=yc();R.current=Zr.createCalendar(B.current,[Zr.TimeGrid],{events:[],buttonText:{today:d.t("Oggi")},allDaySlot:!1,firstDay:1,date:C.date,slotEventOverlap:!1,view:ce(),height:"400px",views:{timeGridWeek:{allDaySlot:!1,firstDay:1,slotHeight:48},timeGridDay:{allDaySlot:!1,firstDay:1,slotHeight:48}},datesSet:b=>{gc(b.view.type,b.start)},eventClick({event:b,el:V}){var de,me,xe,Ae,$e,Ie,Ge,Qe;document.querySelectorAll(".ec-event").forEach(ge=>{ge.classList.remove("highlighted-event")}),V.classList.add("highlighted-event");const k=new Date(b.start),E=new Date(b.end),F=k.toLocaleDateString("it-IT",{weekday:"long",day:"numeric",month:"long",year:"numeric"}),te=k.toLocaleTimeString("it-IT",{hour:"2-digit",minute:"2-digit"}),se=E.toLocaleTimeString("it-IT",{hour:"2-digit",minute:"2-digit"}),be={status:6,calendar:b.extendedProps.calendar_id,opening_hour:b.extendedProps.opening_hour_id,user:null,email:null,fiscal_code:null,name:" ",phone_number:null,from_time:k,to_time:E,user_message:null,reason:null,location:null,motivation_outcome:null,calendar_group_config_id:(me=(de=i==null?void 0:i.data)==null?void 0:de.service_data)==null?void 0:me.id,calendar_group_office_id:(Ae=(xe=i==null?void 0:i.data)==null?void 0:xe.user_group)==null?void 0:Ae.id,calendar_group_place_id:(Ie=($e=i==null?void 0:i.data)==null?void 0:$e.place)==null?void 0:Ie.id};window.FormioHelper.authenticatedRequest((Ge=i==null?void 0:i.dataValue)!=null&&Ge.id?"PATCH":"POST",(Qe=i==null?void 0:i.dataValue)!=null&&Qe.id?`meetings/${i.dataValue.id}`:"meetings",be).then(ge=>{var Ze;let we;!ge||ge===""?we={...be,code:null,id:(Ze=i==null?void 0:i.dataValue)==null?void 0:Ze.id}:typeof ge=="object"&&(we=ge),j({day:F,startDate:te,endDate:se}),g(we)}).catch(ge=>{var we,Ze;console.error(ge),ge.status===400&&((Ze=(we=ge==null?void 0:ge.response)==null?void 0:we.data)==null?void 0:Ze.type)==="validation_error"?Je.fire({title:"",html:"<p>"+d.t("Lo slot orario selezionato non è disponibile perché già prenotato Seleziona un altro orario o una data diversa")+"</p>",icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}):Je.fire({title:"",html:"<p>"+ge+"</p>",icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},viewDidMount:ve,eventDidMount:b=>{const{event:V,el:k}=b,E=V.extendedProps;k.setAttribute("data-event-id",V.id+"-"+E.date+"-"+E.start_time)},loading:b=>{u(b)}})},ve=C=>{var b,V;(V=(b=i==null?void 0:i.root)==null?void 0:b.data)!=null&&V.place&&R.current.setOption("eventSources",[{events:Ne}])};async function Ne(C,b,V){var k,E,F,te,se,be;try{R.current.setOption("events",[]);const de=fe(C.start).format("YYYY-MM-DD"),me=new Date(C.end);me.setDate(me.getDate()-1);const xe=fe(me).format("YYYY-MM-DD"),Ae=null,$e=(F=(E=(k=i==null?void 0:i.root)==null?void 0:k.data)==null?void 0:E.place)!=null&&F.merge_availabilities?(be=(se=(te=i==null?void 0:i.root)==null?void 0:te.data)==null?void 0:se.place)==null?void 0:be.merged_availabilities_link:null,Ie=$e?J($e,de,xe):ee(de,xe,Ae),Ge=ar("AVAILABILITY",Ie),Qe=tr("AVAILABILITY",Ge);let ge;if(Qe?(ge=Qe,u(!1)):(ge=await window.FormioHelper.fetchAPIUrlLimit(Ie),er("AVAILABILITY",Ge,ge)),!(ge!=null&&ge.length)){b([]),Je.fire({icon:"warning",title:d.t("warning"),html:d.t("no_meetings")});return}const we=ge.map(tt=>({id:tt.opening_hour_id,allDay:!1,start:`${tt.date}T${tt.start_time}:00`,end:`${tt.date}T${tt.end_time}:00`,title:`${tt.start_time} - ${tt.end_time}`,editable:!1,display:"auto",color:"#ebeef0",textColor:"#000",className:"event-slot",extendedProps:{...tt}})),Ze=A(ge);R.current.setOption("slotMinTime",Ze.earliestStartTime),R.current.setOption("slotMaxTime",Ze.latestEndTime),H(ge),pc(R.current,we),b(we),setTimeout(()=>{_e(we)},500)}catch(de){console.error("Errore nel caricamento disponibilità:",de),V==null||V(de)}}q.useEffect(()=>{let C,b=!1;async function V(){var k,E,F,te,se;try{if(await((k=window.FormioInstance)==null?void 0:k.formReady),b)return;if(!B.current){console.warn("Elemento calendario non trovato");return}const be=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());be&&(be!=null&&be.draft_expiration)&&Ye().isAfter(be.draft_expiration)&&(g({}),Tn()),((F=(E=i==null?void 0:i.data)==null?void 0:E.service_data)==null?void 0:F.view_type)==="calendar"?R!=null&&R.current||Q():((se=(te=i==null?void 0:i.data)==null?void 0:te.service_data)==null?void 0:se.view_type)==="select"?ye():alert(d.t("Il componente non è configurato per la visualizzazione a calendario"))}catch(be){console.error("Errore durante l'inizializzazione del calendario:",be)}}return C=setTimeout(V,500),()=>{var k,E;b=!0,C&&clearTimeout(C),R.current&&((E=(k=B.current)==null?void 0:k.destroy)==null||E.call(k),R.current=null)}},[(ze=(Re=i==null?void 0:i.root)==null?void 0:Re.data)==null?void 0:ze.place]);function _e(C){const b=i==null?void 0:i.dataValue;if(!(b!=null&&b.from_time))return;const V=Ye(b.from_time).format("DD-MM-YYYY HH:mm"),k=Ye(b.to_time).format("DD-MM-YYYY HH:mm"),E=C.find(te=>Ye(te.start).format("DD-MM-YYYY HH:mm")===V&&Ye(te.end).format("DD-MM-YYYY HH:mm")===k);if(!E)return;const F=document.querySelector(`.ec-event[data-event-id="${E.id}-${Ye(b==null?void 0:b.from_time).format("YYYY-MM-DD")}-${Ye(b==null?void 0:b.from_time).format("HH:mm")}"]`);F&&(F.classList.add("highlighted-event"),F.scrollIntoView({behavior:"smooth",block:"center"}),j({day:Ye(b==null?void 0:b.from_time).format("dddd, DD MMMM YYYY"),startDate:Ye(b==null?void 0:b.from_time).format("HH:mm"),endDate:Ye(b==null?void 0:b.to_time).format("HH:mm")}))}const Ce=({day:C,startDate:b,endDate:V})=>h.jsx("div",{className:"mt-3",children:h.jsxs("div",{className:"row align-items-center gy-3",children:[h.jsxs("div",{className:"col-12 col-md border-light mx-md-3",children:[h.jsx("div",{className:"text-paragraph-small",children:d.t("Data")}),h.jsx("p",{className:"data-text",children:h.jsx("strong",{children:C})})]}),h.jsxs("div",{className:"col-12 col-md border-light mx-md-3",children:[h.jsx("div",{className:"text-paragraph-small",children:d.t("Ora")}),h.jsx("p",{className:"data-text",children:h.jsxs("strong",{children:[b," - ",V]})})]})]})});return q.useEffect(()=>{var C,b,V,k;document.querySelector(".formio-read-only")&&c===!1?p(!0):(((b=(C=i==null?void 0:i.data)==null?void 0:C.service_data)==null?void 0:b.view_type)==="select"?ye():((k=(V=i==null?void 0:i.data)==null?void 0:V.service_data)==null?void 0:k.view_type)==="calendar"&&Q(),p(!1))},[]),q.useEffect(()=>{c&&setTimeout(()=>{const C=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());console.log("savedValue",C,c),C&&o(C)},500)},[c]),h.jsx(h.Fragment,{children:c&&X?h.jsxs("div",{className:"mx-2",children:[h.jsxs("p",{className:"text-paragraph",children:[d.t("Giorno selezionato per la prenotazione"),":"]}),h.jsx("div",{className:"",children:h.jsx("div",{className:"it-list-wrapper",children:h.jsx("ul",{className:"it-list",children:h.jsx(mc,{day:Ye(X.from_time).format("dddd D MMM YYYY"),i18next:d,slot:`${Ye(X.from_time).format("HH:mm")} - ${Ye(X.to_time).format("HH:mm")}`})})})})]}):h.jsxs("div",{className:"",children:[h.jsx("div",{ref:B}),_.length>0?h.jsxs(h.Fragment,{children:[h.jsxs(le.Select,{label:"Mese",id:"selectMonthYear",onChange:he,children:[h.jsx("option",{value:"",children:d.t("Scegli un'opzione")}),_.map(C=>h.jsx("option",{value:C.value,selected:C.value===S,children:C.label},C.value))]}),h.jsxs(le.Select,{label:"Giorno",id:"selectDay",onChange:C=>Z(C,"manual"),disabled:Y.length===0,children:[h.jsx("option",{value:"",children:d.t("Scegli un'opzione")}),Y.map(C=>h.jsx("option",{value:JSON.stringify(C),selected:C.date===T,children:Ye(C.date).format("dddd,DD MMMM YYYY")},C.date))]}),h.jsxs(le.Select,{label:"Orario",id:"selectSlot",onChange:ue,disabled:I.length===0,children:[h.jsx("option",{value:"",children:d.t("Scegli un'opzione")}),I.map(C=>h.jsx("option",{value:JSON.stringify(C),selected:C.start_time+" - "+C.end_time===m,children:C.start_time+" - "+C.end_time},C.start_time+" - "+C.end_time))]})]}):null,f?Ce({day:f.day,startDate:f.startDate,endDate:f.endDate}):null,s?h.jsx("div",{className:"d-flex align-items-center justify-content-center position-absolute-center",children:h.jsx(le.Spinner,{active:!0})}):null]})})},Ya=class Ya extends yn{constructor(i,g,d){super(i,g,d)}static get builderInfo(){return{title:"Calendar Advanced",group:"basic",icon:"bi bi-calendar-plus",documentation:"",weight:70,schema:Ya.schema()}}static schema(){return yn.schema({type:"calendar-advanced"})}attach(i,g){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(vc,{ref:g,component:this.component,value:this.dataValue,onChange:d=>this.setValue(d),...this,current:this}))}setValue(i){i&&(this.updateValue(i),this.shouldSetValue=!0)}getValue(){return this.dataValue}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}};Ct(Ya,"editForm",fc);let wa=Ya;const _c=[{key:"defaultValue",ignore:!0}],bc=[{key:"placeholder",ignore:!0},{type:"checkbox",label:"Files Synchronization feature",tooltip:"Enable ability to control files synchronization. Files will be auto synced before submit.",key:"autoSync",input:!0,conditional:{json:{in:[{var:"data.storage"},["s3","azure","googledrive"]]}}}],wc=[{type:"select",input:!0,key:"storage",label:"Storage",placeholder:"Select your file storage provider",weight:0,tooltip:"Which storage to save the files in.",valueProperty:"value",dataSrc:"custom",hidden:!0,data:{custom:function(){return[{label:"url",value:"url"}]}}},{type:"checkbox",input:!0,defaultValue:!0,key:"protocol_required",label:"Richiede protocollazione?",tooltip:"",weight:10},{type:"checkbox",input:!0,defaultValue:!1,key:"check_signature",label:"Effettuare il controllo della firma?",tooltip:"",weight:15},{type:"checkbox",input:!0,key:"useMultipartUpload",label:"Use the S3 Multipart Upload API",tooltip:"The <a href='https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html'>S3 Multipart Upload API</a> is designed to improve the upload experience for larger objects (> 5GB).",conditional:{json:{"===":[{var:"data.storage"},"s3"]}}},{label:"Multipart Upload",tableView:!1,key:"multipart",type:"container",input:!0,components:[{label:"Part Size (MB)",applyMaskOn:"change",mask:!1,tableView:!1,delimiter:!1,requireDecimal:!1,inputFormat:"plain",truncateMultipleSpaces:!1,validate:{min:5,max:5e3},key:"partSize",type:"number",input:!0,defaultValue:500}],conditional:{json:{"===":[{var:"data.useMultipartUpload"},!0]}}},{type:"textfield",input:!0,key:"options.indexeddb",label:"Database",weight:10,placeholder:"Enter the indexeddb database name",conditional:{json:{in:[{var:"data.storage"},["indexeddb"]]}}},{type:"textfield",input:!0,label:"Table",key:"options.indexeddbTable",weight:10,placeholder:"Enter the name for indexeddb table",conditional:{json:{in:[{var:"data.storage"},["indexeddb"]]}}},{type:"textarea",key:"options",label:"Custom request options",tooltip:"Pass your custom xhr options(optional)",rows:5,editor:"ace",input:!0,weight:15,placeholder:`{
|
|
99
|
+
}`,validateOn:"change",validate:{customMessage:"Vi sono sovrapposizioni negli orari di apertura",custom:`if (document.querySelector("input[name^='data[overlaps_validation]']").value === '0') {valid=true} else {valid = 'Sovrapposizione';}`},key:"overlaps_validation",attributes:{readonly:"true"},required:!0,type:"number",input:!0,weight:1},{label:"Precisione minima (minuti)",defaultValue:1,required:!0,inputFormat:"plain",key:"range_step",type:"number",input:!0,weight:1}];function cc(...y){return ot.Components.baseEditForm([{key:"display",components:uc}],...y)}function gn({day:y,slot:i,i18next:g}){return h.jsx("li",{className:"it-list-item",children:h.jsx("div",{className:"list-item",children:h.jsx("div",{className:"it-right-zone",children:h.jsxs("span",{className:"text pl-4",children:[h.jsx("b",{children:y})," ",g.t("alle")," ",g.t("ore")," ",h.jsx("b",{children:i})]})})})})}const dc=({component:y,current:i,onChange:g,i18next:d})=>{const[z,$]=q.useState(),[X,o]=q.useState([]),[x,a]=q.useState([]),[s,u]=q.useState(!1),[c,p]=q.useState(null),[f,j]=q.useState(null),[_,D]=q.useState(null),[Y,O]=q.useState(null),[I,N]=q.useState({}),[S,v]=q.useState(null),[T,L]=q.useState(!1),[m,P]=q.useState([]),[B,R]=q.useState(!1),A=q.useRef(),H=y.calendarId;fe.locale(d.language);const J=b=>{let V=fe(b).format("YYYY-MM-DD");fetch(Z(V)).then(k=>k.json()).then(k=>{let E=he(b||new Date);const F=k.filter(me=>me.available==!0);F.length===0&&Re();let se=[];E.forEach(me=>{k.some(xe=>xe.date===me&&xe.available==!0)?se.push({available:!0,date:me}):se.push({available:!1,date:me})});const be=se.map(me=>{if(me.available===!1)return fe(me.date,"YYYY-MM-DD").toDate()});o(be);const de=F.length?F[0].date:b;ie(de)}).catch(k=>console.error(k))},ie=b=>{O(null),D(null),a([]);let V=fe(b).format("YYYY-MM-DD");fetch(ue(V)).then(k=>k.json()).then(k=>{const E=k.filter(F=>F.availability==!0);N(E[0]),E.length>0?(a(k),u(!1),D(fe(b).format("L")),$(fe(b,"YYYY-MM-DD").toDate())):(k.length>0&&$(fe(k[0].date,"YYYY-MM-DD").toDate()),a([]),Re())})},ee=()=>{if(H!==""&&H!=null)if(!i.dataValue)J(new Date);else if(y.multiple&&Array.isArray(i.dataValue)){if(i.dataValue.length>0){v(i.dataValue);let b=[];i.dataValue.map(V=>{b.push({...V,date:fe(V.date,"YYYY-MM-DD").format("DD-MM-YYYY")})}),P(b)}}else if(!y.multiple&&typeof i.dataValue=="object"){const b={date:i.dataValue.date,slot:i.dataValue.slot},V={...i.dataValue,date:fe(i.dataValue.date,"YYYY-MM-DD").format("DD-MM-YYYY")};P([V]),v(b)}else{let b=i.dataValue.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),V=b[2].split("#");const k={date:fe(b[0],"DD-MM-YYYY").format("YYYY-MM-DD"),slot:b[1]};y.multiple?(g([{date:b[0],slot:b[1],calendar_id:V[0],meeting_id:V[1],opening_hour_id:V.length===3?V[2]:""}]),P([{date:b[0],slot:b[1],calendar_id:V[0],meeting_id:V[1],opening_hour_id:V.length===3?V[2]:""}])):(g({date:b[0],slot:b[1],calendar_id:V[0],meeting_id:V[1],opening_hour_id:V.length===3?V[2]:""}),P([{date:b[0],slot:b[1],calendar_id:V[0],meeting_id:V[1],opening_hour_id:V.length===3?V[2]:""}])),v(k)}};q.useEffect(()=>{var b;(b=window.FormioInstance)==null||b.formReady.then(()=>{setTimeout(()=>{ee()},1e3)})},[]);const he=b=>{let k=fe(b,"YYYY-MM").daysInMonth(),E=[];for(;k;){let F=fe(b).date(k);E.push(F.format("YYYY-MM-DD")),k--}return E},Z=(b,V=!1)=>{let k=y.calendarId,E=y.select_opening_hours,F=y.select_opening_hours?y.opening_hours:[];window.location.pathname.split("/");let se=`${Fe()}/api/calendars/${k}/availabilities`,be=[`from_time=${fe(b).startOf("month").format("YYYY-MM-DD")}`,`to_time=${fe(b).endOf("month").format("YYYY-MM-DD")}`];return V&&be.push(`available=${V}`),E&&F&&be.push(`opening_hours=${F.join()}`),`${se}?${be.join("&")}`},ue=(b,V=!1)=>{let k=y.calendarId,E=y.select_opening_hours,F=y.select_opening_hours?y.opening_hours:[];window.location.pathname.split("/");const se=fe(b).format("YYYY-MM-DD");let be=`${Fe()}/api/calendars/${k}/availabilities/${se}`,de=[];return V&&de.push(`available=${V}`),E&&F&&de.push(`opening_hours=${F.join()}`),de&&(be=`${be}?${de.join("&")}`),be},ae=b=>{J(b)},ye=b=>{setTimeout(()=>{L(!T)},1e3),ie(b)},ce=b=>{O(null),setTimeout(()=>{b&&(j(b.target.dataset),O(b.target.id))},300)},Q=b=>{p(null);let V=`${Fe()}/it/meetings/new-draft`,k={date:f!=null&&f.date?fe(f==null?void 0:f.date).format("DD-MM-YYYY"):fe(b.target.dataset.date).format("DD-MM-YYYY"),slot:f!=null&&f.value_start&&(f!=null&&f.value_end)?f.value_start+"-"+f.value_end:b.target.dataset.slots,calendar:y.calendarId,opening_hour:f!=null&&f.opening_hour?f==null?void 0:f.opening_hour:b.target.dataset.opening_hour,meeting:c?c.id:"",first_available_date:I.date,first_available_start_time:I.start_time,first_available_end_time:I.end_time,first_availability_updated_at:fe().format()};fetch(V,{method:"POST",body:JSON.stringify(k),headers:{"Content-Type":"application/json; charset=utf-8"},strictErrors:!0}).then(E=>{if(!E.ok)throw new Error(d.t("Intervallo selezionato non disponibile!"));return E.json()}).then(E=>{p(E);const F={date:k.date,slot:k.slot,calendar_id:k.calendar[0],opening_hour_id:k.opening_hour||k.opening_hour_id,meeting_id:E.id};P([...m,F])}).catch(E=>{console.log(E),Je.fire({title:"",html:"<p>"+E+"</p>",icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},ve=()=>{f&&(Q(),L(!T))},Ne=()=>h.jsx("span",{children:d.t("Tempo prenotazione scaduto!")}),_e=({minutes:b,seconds:V,completed:k})=>k?h.jsx(Ne,{}):h.jsx("div",{children:h.jsxs("div",{children:[" ",h.jsxs("span",{children:[" ",h.jsxs("i",{children:[d.t("Per confermare la prenotazione che ti abbiamo riservato procedi con l’invio di questa pratica e con il pagamento (se richiesto) di quanto previsto entro"),":"]})," ",h.jsxs("b",{children:[b," ",d.t("minuti")," ",V," ",d.t("secondi")]})]})]})}),Ce=b=>{if(b===null||b==="")g("");else if(Array.isArray(b)&&b.length>0){let V=[];m.map(k=>{V.push({date:fe(k.date,"DD-MM-YYYY").format("YYYY-MM-DD"),slot:k.slot,calendar_id:k.calendar_id||k.calendar[0],meeting_id:k.meeting_id,opening_hour_id:k.opening_hour||k.opening_hour_id})}),y.multiple?g(V):g(V[0])}else g("")},Re=()=>{u(!0),p(null),D(null),Ce(null)},ze=()=>{if(d.language==="it")return Yn;if(d.language==="en")return kn;if(d.language==="de")return Dn};q.useEffect(()=>{Ce(m)},[m]),q.useEffect(()=>{document.querySelector(".formio-read-only")&&B===!1?(R(!0),setTimeout(()=>{ee()},1e3)):(R(!1),setTimeout(()=>{ee()},1e3))},[]);const C=(b,V)=>{let k=`${Fe()}/api/meetings/${V.meeting_id}`;fetch(k,{method:"DELETE",headers:{"Content-Type":"application/json; charset=utf-8",Authorization:`Bearer ${aa("auth-token")}`},strictErrors:!0}).then(E=>{if(E&&E.status>400)Je.fire({title:"",html:`<p>${d.t("Ci sono stati degli errori durante la cancellazione dello slot")}</p>`,icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1});else{const F=[...m.slice(0,b),...m.slice(b+1)];P(F),J(new Date)}})};return h.jsxs(h.Fragment,{children:[B&&S?h.jsxs("div",{className:"my-5 mx-2 d-print-block d-preview-calendar d-preview-calendar-none",children:[h.jsxs("b",{children:[Array.isArray(S)&&S.length>1?d.t("Giorni selezionati per la prenotazione"):d.t("Giorno selezionato per la prenotazione"),":"]}),h.jsx("div",{className:"mb-5",children:h.jsx("div",{className:"it-list-wrapper",children:h.jsx("ul",{className:"it-list",children:Array.isArray(S)?S.map(b=>h.jsx(gn,{day:fe(b.date,"DD-MM-YYYY").format("DD/MM/YYYY"),i18next:d,slot:b.slot})):h.jsx(gn,{day:Ye(S.date).format("DD/MM/YYYY"),i18next:d,slot:S.slot})})})})]}):h.jsx("div",{className:"slot-calendar ",children:h.jsxs("div",{className:"row",children:[y.multiple?h.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:h.jsxs("div",{className:"m-2",children:[h.jsx("h6",{children:d.t(y.label)}),h.jsx(va.DayPicker,{mode:"single",selected:z,locale:ze(),disabled:X,onMonthChange:ae,onDayClick:ye})]})}):m.length!==1?h.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:h.jsxs("div",{className:"m-2",children:[h.jsx("h6",{children:d.t(y.label)}),h.jsx(va.DayPicker,{mode:"single",selected:z,locale:ze(),disabled:X,onMonthChange:ae,onDayClick:ye})]})}):null,h.jsx("div",{className:"col-12",children:m.length?h.jsx("div",{className:"row m-2",children:h.jsxs("div",{className:"col-12 mb-4",children:[h.jsxs("b",{children:[m.length>1?d.t("Giorni selezionati per la prenotazione"):d.t("Giorno selezionato per la prenotazione"),":"," "]}),h.jsx("div",{className:"mb-5",children:h.jsx("div",{className:"it-list-wrapper",children:h.jsx("ul",{className:"it-list",children:m.map((b,V)=>h.jsx("li",{children:h.jsx("div",{className:"list-item",children:h.jsxs("div",{className:"it-right-zone",children:[h.jsxs("span",{className:"text pl-4",children:[b.date," ",f||b.slot?`${d.t("alle")} ${b.slot}`:""]}),h.jsx(le.Icon,{icon:"it-delete",onClick:()=>C(V,b),role:"button"})]})})},"li"+V))})})}),c?h.jsx(le.Alert,{color:"info",defaultValue:"string",className:"d-print-none d-preview-calendar-none",children:h.jsx(xn,{date:c.expiration_time,renderer:_e})}):null]})}):null})]})}),h.jsxs(le.Modal,{isOpen:T,toggle:()=>L(!T),labelledBy:"daySelected",size:"lg",centered:!0,container:document.body,children:[h.jsx(le.ModalHeader,{toggle:()=>L(!T),id:"daySelected",children:d.t("Seleziona una fascia oraria")}),h.jsx(le.ModalBody,{children:h.jsxs("div",{className:"row",children:[m.length>=1?h.jsxs("div",{children:[_&&!s?h.jsxs("h6",{children:[d.t("Orari disponibili del")," ",Ye(_).format("DD/MM/YYYY")]}):null,h.jsxs("div",{className:"calendar-last-selection col-12 pt-2 mb-5",children:[h.jsx("small",{className:"pl-2 mb-2 d-flex px-2",children:h.jsxs("b",{children:[h.jsx(le.Icon,{icon:"it-clock",className:"mr-1",size:"sm"})," ",d.t("Ultimo orario selezionato")]})}),h.jsx("div",{className:"col-6 px-2",children:h.jsx("button",{type:"button",id:"slot-last-selection",onClick:ce,tabIndex:"1",className:Y==="slot-last-selection"?"active btn btn-slot p-0":"btn btn-slot p-0","data-date":fe(_,"DD/MM/YYYY").format("YYYY-MM-DD"),"data-slots":m[m.length-1].slot,"data-opening_hour":m[m.length-1].opening_hour_id,"data-start":m[m.length-1].slot.split("-")[0],"data-end":m[m.length-1].slot.split("-")[1],"data-value_start":m[m.length-1].slot.split("-")[0],"data-value_end":m[m.length-1].slot.split("-")[1],disabled:s,children:m[m.length-1].slot})})]})]}):null,h.jsx("div",{children:_&&m.length>=1?h.jsx("h6",{children:d.t("Seleziona altri orari")}):s?null:h.jsxs("h6",{children:[d.t("Orari disponibili del")," ",Ye(_).format("DD/MM/YYYY")]})}),x.map((b,V)=>h.jsx("div",{className:"col-6",children:h.jsxs("button",{type:"button",id:"slot-"+V,onClick:ce,ref:A,className:Y==="slot-"+V?"active btn btn-slot p-0":"btn btn-slot p-0",tabIndex:"1","data-date":b.date,"data-start":b.start_time,"data-end":b.end_time,"data-value_start":b.start_time,"data-value_end":b.end_time,"data-slots":b.start_time+"-"+b.end_time,"data-opening_hour":b.opening_hour,"data-min_duration":b.min_duration,disabled:b.slots_available==0,children:[b.start_time," - ",b.end_time]})},"slot-"+V)),s?h.jsxs("div",{className:"callout callout-highlight warning",children:[h.jsxs("div",{className:"callout-title",children:[h.jsx(le.Icon,{"aria-hidden":!0,icon:"it-help-circle"}),d.t("Attenzione")]}),h.jsxs("p",{children:[" ",d.t("Non è possibile prenotare per la data selezionata"),"."]})]}):null]})}),h.jsx(le.ModalFooter,{children:h.jsx(le.Button,{color:"primary",onClick:()=>ve(),disabled:!_||!(f!=null&&f.value_start),children:d.t("Conferma")})})]})]})},ka=class ka extends ot.ReactComponent{constructor(i,g,d){super(i,g,d)}static get builderInfo(){return{title:"Calendar",group:"basic",icon:"bi bi-calendar-plus",documentation:"",weight:70,schema:ka.schema()}}static schema(){return ot.ReactComponent.schema({type:"calendar"})}attachReact(i,g){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(dc,{ref:g,component:this.component,value:this.dataValue,onChange:d=>this.setValue(d),...this,current:this}))}setValue(i){if(i)if(Array.isArray(i))this.selectedNextSlots=i,this.updateValue(i),this.shouldSetValue=!0;else if(typeof i=="object")this.date=i.date,this.slot=i.slot,this.meeting=i.meeting_id,this.meeting_expiration_time=null,this.opening_hour=i.opening_hour_id,this.calendar_id=i.calendar_id,this.updateValue(i),this.shouldSetValue=!0;else{let g=i.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),d=g[2].split("#");this.date=g[0],this.slot=g[1],this.meeting=d[1],this.meeting_expiration_time=null,this.opening_hour=d.length===3?d[2]:"",this.updateValue({date:this.date,slot:this.slot,calendar_id:this.calendar_id,meeting_id:this.meeting,opening_hour_id:this.opening_hour})}}getValue(){if(!(this.date&&this.slot&&this.meeting&&this.opening_hour)&&!(this.selectedNextSlots&&this.selectedNextSlots.length>0))return null;let i=this.meeting?this.meeting:"",g=this.opening_hour?this.opening_hour:"";return this.component.multiple?this.selectedNextSlots:{date:this.date,slot:this.slot,calendar_id:this.calendar_id,meeting_id:i,opening_hour_id:g}}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}};Ct(ka,"editForm",cc);let ba=ka;const hc=[{key:"labelPosition",ignore:!0},{key:"placeholder",ignore:!0},{key:"description",ignore:!0},{key:"hideLabel",ignore:!0},{key:"autofocus",ignore:!0},{key:"tooltip",ignore:!0},{key:"tabindex",ignore:!0},{key:"disabled",ignore:!0},{label:"Base url",calculateValue:"let url = '"+Fe()+"'; data.url = url; value=url;",key:"url",type:"hidden",input:!0,weight:1}];function fc(...y){return ot.Components.baseEditForm([{key:"display",components:hc}],...y)}function mc({day:y,slot:i,i18next:g}){return h.jsx("li",{className:"it-list-item",children:h.jsx("div",{className:"list-item",children:h.jsx("div",{className:"it-right-zone",children:h.jsxs("span",{className:"text-paragraph pl-4",children:[h.jsx("b",{children:y})," ",g.t("alle")," ",g.t("ore")," ",h.jsx("b",{children:i})]})})})})}function pc(y,i){if(!i||i.length===0)return;const g=i.map(X=>{const o=new Date(X.start);return(new Date(X.end)-o)/6e4}),d=Math.min(...g),z=g.reduce((X,o)=>X+o,0)/g.length;let $=0;d<=30&&d>15?$=z*1:d<=15?$=z*24:$=z*4,y.setOption("slotHeight",$),document.documentElement.style.setProperty("--slot-height",`${$}px`)}const jn={AVAILABILITY:{key:"availability_data_cache_",duration:10},SLOTS:{key:"availability_slots_cache_",duration:10},SUBMISSION:{key:"submission_cache_",duration:30}},er=(y,i,g)=>{const d={data:g,timestamp:Ye().toISOString()};sessionStorage.setItem(i,JSON.stringify(d)),console.log(`✅ Cache salvato: ${y}`)},tr=(y,i)=>{try{const g=sessionStorage.getItem(i);if(!g)return null;const d=JSON.parse(g),z=Ye().diff(Ye(d.timestamp),"minutes");return z>jn[y].duration?(sessionStorage.removeItem(i),console.log(`⏰ Cache scaduto: ${y}`),null):(console.log(`✅ Cache letto: ${y} (${z} minuti fa)`),d.data)}catch(g){return console.error(`Errore nel leggere il cache (${y}):`,g),null}},ar=(y,...i)=>jn[y].key+btoa(i),mr="calendar_view_state",pr="calendar_view_date",gc=(y,i)=>{try{sessionStorage.setItem(mr,y),sessionStorage.setItem(pr,i||new Date().toISOString())}catch(g){console.error("Errore nel salvare lo stato della view:",g)}},yc=()=>{try{const y=sessionStorage.getItem(mr),i=sessionStorage.getItem(pr);return{viewType:y||"timeGridWeek",date:i?new Date(i):new Date}}catch(y){return console.error("Errore nel leggere lo stato della view:",y),{viewType:"timeGridWeek",date:new Date}}},Tn=()=>{try{sessionStorage.removeItem(mr),sessionStorage.removeItem(pr)}catch(y){console.error("Errore nel pulire lo stato della view:",y)}},yn=cr.Formio.Components.components.field,vc=({component:y,current:i,onChange:g,i18next:d})=>{var Re,ze;const[z,$]=q.useState(null),[X,o]=q.useState(null),[x,a]=q.useState([]),[s,u]=q.useState(!1),[c,p]=q.useState(!1),[f,j]=q.useState(null),[_,D]=q.useState([]),[Y,O]=q.useState([]),[I,N]=q.useState([]),[S,v]=q.useState(null),[T,L]=q.useState(null),[m,P]=q.useState(null),B=q.useRef(null),R=q.useRef(null);d.language,fe.locale(d.language),Ye.locale(d.language);function A(C){if(!C||C.length===0)return null;const b=C.map(E=>({start:E.start_time,end:E.end_time})),V=b.reduce((E,F)=>F.start<E?F.start:E,b[0].start),k=b.reduce((E,F)=>F.end>E?F.end:E,b[0].end);return{earliestStartTime:V,latestEndTime:k}}function H(C){const b=C.map(E=>fe(E.date).isoWeekday()),k=[1,2,3,4,5,6,7].filter(E=>!b.includes(E));k.length>0?R.current.setOption("hiddenDays",k):R.current.setOption("hiddenDays",[])}function J(C,b,V){const k=new URL(C),F=`${k.pathname.split("/").slice(0,4).join("/")}/${b}/${V}`;return`${k.origin}${F}${k.search}`}function ie(C,b,V){const k=new URL(C),F=`${k.pathname.split("/").slice(0,4).join("/")}`;return`${k.origin}${F}${k.search}&from_to=${b}&to_date=${V}`}function ee(C,b,V){return`${Fe()}/api/availabilities/${C}/${b}?calendar_ids=${V}&available=true`}const he=C=>{N([]),O([]),g({}),C&&O(z.filter(b=>b.date.startsWith(C)))},Z=async(C,b)=>{const V=JSON.parse(C),k=ar("SLOTS",V.date,V.calendar_ids);if(b==="manual")N([]),P(null),j(null),g({});else{const E=tr("SLOTS",k);if(E){N(E);return}}try{const E=await window.FormioHelper.anonymousCall(`availabilities/${V.date}?calendar_ids=${V.calendar_ids}`);er("SLOTS",k,E.data),N(E.data)}catch(E){console.error("Errore nel caricamento degli slot:",E),Je.fire({icon:"error",title:d.t("Errore"),text:d.t("Errore nel caricamento degli orari")})}},ue=C=>{var k,E,F,te,se,be,de,me;const b=JSON.parse(C),V={status:6,calendar:b.calendar_id,opening_hour:b.opening_hour_id,user:null,email:null,fiscal_code:null,name:" ",phone_number:null,from_time:Ye(`${b.date}T${b.start_time}`).toISOString(),to_time:Ye(`${b.date}T${b.end_time}`).toISOString(),user_message:null,reason:null,location:null,motivation_outcome:null,calendar_group_config_id:(E=(k=i==null?void 0:i.data)==null?void 0:k.service_data)==null?void 0:E.id,calendar_group_office_id:(te=(F=i==null?void 0:i.data)==null?void 0:F.user_group)==null?void 0:te.id,calendar_group_place_id:(be=(se=i==null?void 0:i.data)==null?void 0:se.place)==null?void 0:be.id};window.FormioHelper.authenticatedRequest((de=i==null?void 0:i.dataValue)!=null&&de.id?"PATCH":"POST",(me=i==null?void 0:i.dataValue)!=null&&me.id?`meetings/${i.dataValue.id}`:"meetings",V).then(xe=>{j({day:Ye(b.date).format("dddd, DD MMMM YYYY"),startDate:b.start_time,endDate:b.end_time}),g(xe!=null&&xe.id?xe:xe?{...xe,id:i.dataValue.id}:i.dataValue.id?{...V,id:i.dataValue.id}:{...V})}).catch(xe=>{var Ae,$e;console.error(xe),xe.status===400&&(($e=(Ae=xe==null?void 0:xe.response)==null?void 0:Ae.data)==null?void 0:$e.type)==="validation_error"?Je.fire({title:"",html:"<p>"+d.t("Lo slot orario selezionato non è disponibile perché già prenotato Seleziona un altro orario o una data diversa")+"</p>",icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}):Je.fire({title:"",html:"<p>"+xe+"</p>",icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},ae=C=>{const b=new Set,V=[];return C.forEach(k=>{const E=Ye(k.date),F=E.format("YYYY-MM");b.has(F)||(b.add(F),V.push({value:F,label:E.format("MMMM YYYY").replace(/^\w/,te=>te.toUpperCase())}))}),V},ye=async()=>{var se,be,de,me,xe,Ae,$e,Ie,Ge,Qe;const C=(de=(be=(se=i==null?void 0:i.root)==null?void 0:se.data)==null?void 0:be.place)!=null&&de.merge_availabilities?(Ae=(xe=(me=i==null?void 0:i.root)==null?void 0:me.data)==null?void 0:xe.place)==null?void 0:Ae.merged_availabilities_link:null,b=fe().format("YYYY-MM-DD"),V=fe().add(1,"month").format("YYYY-MM-DD"),k=((Qe=(Ge=(Ie=($e=i==null?void 0:i.root)==null?void 0:$e.data)==null?void 0:Ie.place)==null?void 0:Ge.calendars[0])==null?void 0:Qe.id)||null,E=C?ie(C,b,V):ee(b,V,k),F=ar("AVAILABILITY",E),te=tr("AVAILABILITY",F);if(te){$(te),D(ae(te));return}else g({});u(!0);try{const ge=await window.FormioHelper.fetchAPIUrlLimit(E);if(u(!1),!(ge!=null&&ge.length)){Je.fire({icon:"warning",title:d.t("warning"),html:d.t("no_meetings")});return}er("AVAILABILITY",F,ge),$(ge),D(ae(ge))}catch(ge){u(!1),console.error("Errore nel caricamento disponibilità:",ge)}};q.useEffect(()=>{if(z!=null&&z.length){const C=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());if(C!=null&&C.from_time&&(C!=null&&C.to_time)&&!Ye().isAfter(C==null?void 0:C.draft_expiration)){const b=Ye(C.from_time).format("YYYY-MM");v(b),b&&O&&(O(z.filter(V=>V.date.startsWith(b))),L(Ye(C.from_time).format("YYYY-MM-DD")))}else C!=null&&C.draft_expiration&&Ye().isAfter(C==null?void 0:C.draft_expiration)&&Je.fire({icon:"warning",title:d.t("warning"),html:d.t("expired_meeting")})}},[z]),q.useEffect(()=>{const C=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());if(!_.length||S||C!=null&&C.from_time||C!=null&&C.to_time)return;const b=_[0];b&&(v(b.value),he(b.value))},[_,S,i==null?void 0:i.dataValue]),q.useEffect(()=>{if(T&&c===!1){const C=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());Z(JSON.stringify({date:T,calendar_ids:C.calendar.id}))}},[T]);const ce=()=>window.innerWidth>768?"timeGridWeek":"timeGridDay";q.useEffect(()=>{const C=()=>{const b=R.current;if(!b)return;const V=ce(),k=b.getView().type;V!==k&&b.setOption("view",V)};return window.addEventListener("resize",C),()=>window.removeEventListener("resize",C)},[]),q.useEffect(()=>{const C=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());I!=null&&I.length&&(C!=null&&C.from_time)&&(P(Ye(C.from_time).format("HH:mm")+" - "+Ye(C.to_time).format("HH:mm")),j({day:Ye(C.from_time).format("dddd D MMM YYYY"),startDate:Ye(C.from_time).format("HH:mm"),endDate:Ye(C.to_time).format("HH:mm")}))},[I]);const Q=()=>{const C=yc();R.current=Zr.createCalendar(B.current,[Zr.TimeGrid],{events:[],buttonText:{today:d.t("Oggi")},allDaySlot:!1,firstDay:1,date:C.date,slotEventOverlap:!1,view:ce(),height:"400px",views:{timeGridWeek:{allDaySlot:!1,firstDay:1,slotHeight:48},timeGridDay:{allDaySlot:!1,firstDay:1,slotHeight:48}},datesSet:b=>{gc(b.view.type,b.start)},eventClick({event:b,el:V}){var de,me,xe,Ae,$e,Ie,Ge,Qe;document.querySelectorAll(".ec-event").forEach(ge=>{ge.classList.remove("highlighted-event")}),V.classList.add("highlighted-event");const k=new Date(b.start),E=new Date(b.end),F=k.toLocaleDateString("it-IT",{weekday:"long",day:"numeric",month:"long",year:"numeric"}),te=k.toLocaleTimeString("it-IT",{hour:"2-digit",minute:"2-digit"}),se=E.toLocaleTimeString("it-IT",{hour:"2-digit",minute:"2-digit"}),be={status:6,calendar:b.extendedProps.calendar_id,opening_hour:b.extendedProps.opening_hour_id,user:null,email:null,fiscal_code:null,name:" ",phone_number:null,from_time:k,to_time:E,user_message:null,reason:null,location:null,motivation_outcome:null,calendar_group_config_id:(me=(de=i==null?void 0:i.data)==null?void 0:de.service_data)==null?void 0:me.id,calendar_group_office_id:(Ae=(xe=i==null?void 0:i.data)==null?void 0:xe.user_group)==null?void 0:Ae.id,calendar_group_place_id:(Ie=($e=i==null?void 0:i.data)==null?void 0:$e.place)==null?void 0:Ie.id};window.FormioHelper.authenticatedRequest((Ge=i==null?void 0:i.dataValue)!=null&&Ge.id?"PATCH":"POST",(Qe=i==null?void 0:i.dataValue)!=null&&Qe.id?`meetings/${i.dataValue.id}`:"meetings",be).then(ge=>{var Ze;let we;!ge||ge===""?we={...be,code:null,id:(Ze=i==null?void 0:i.dataValue)==null?void 0:Ze.id}:typeof ge=="object"&&(we=ge),j({day:F,startDate:te,endDate:se}),g(we)}).catch(ge=>{var we,Ze;console.error(ge),ge.status===400&&((Ze=(we=ge==null?void 0:ge.response)==null?void 0:we.data)==null?void 0:Ze.type)==="validation_error"?Je.fire({title:"",html:"<p>"+d.t("Lo slot orario selezionato non è disponibile perché già prenotato Seleziona un altro orario o una data diversa")+"</p>",icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}):Je.fire({title:"",html:"<p>"+ge+"</p>",icon:"error",cancelButtonText:d.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},viewDidMount:ve,eventDidMount:b=>{const{event:V,el:k}=b,E=V.extendedProps;k.setAttribute("data-event-id",V.id+"-"+E.date+"-"+E.start_time)},loading:b=>{u(b)}})},ve=C=>{var b,V;(V=(b=i==null?void 0:i.root)==null?void 0:b.data)!=null&&V.place&&R.current.setOption("eventSources",[{events:Ne}])};async function Ne(C,b,V){var k,E,F,te,se,be;try{R.current.setOption("events",[]);const de=fe(C.start).format("YYYY-MM-DD"),me=new Date(C.end);me.setDate(me.getDate()-1);const xe=fe(me).format("YYYY-MM-DD"),Ae=null,$e=(F=(E=(k=i==null?void 0:i.root)==null?void 0:k.data)==null?void 0:E.place)!=null&&F.merge_availabilities?(be=(se=(te=i==null?void 0:i.root)==null?void 0:te.data)==null?void 0:se.place)==null?void 0:be.merged_availabilities_link:null,Ie=$e?J($e,de,xe):ee(de,xe,Ae),Ge=ar("AVAILABILITY",Ie),Qe=tr("AVAILABILITY",Ge);let ge;if(Qe?(ge=Qe,u(!1)):(ge=await window.FormioHelper.fetchAPIUrlLimit(Ie),er("AVAILABILITY",Ge,ge)),!(ge!=null&&ge.length)){b([]),Je.fire({icon:"warning",title:d.t("warning"),html:d.t("no_meetings")});return}const we=ge.map(tt=>({id:tt.opening_hour_id,allDay:!1,start:`${tt.date}T${tt.start_time}:00`,end:`${tt.date}T${tt.end_time}:00`,title:`${tt.start_time} - ${tt.end_time}`,editable:!1,display:"auto",color:"#ebeef0",textColor:"#000",className:"event-slot",extendedProps:{...tt}})),Ze=A(ge);R.current.setOption("slotMinTime",Ze.earliestStartTime),R.current.setOption("slotMaxTime",Ze.latestEndTime),H(ge),pc(R.current,we),b(we),setTimeout(()=>{_e(we)},500)}catch(de){console.error("Errore nel caricamento disponibilità:",de),V==null||V(de)}}q.useEffect(()=>{let C,b=!1;async function V(){var k,E,F,te,se;try{if(await((k=window.FormioInstance)==null?void 0:k.formReady),b)return;if(!B.current){console.warn("Elemento calendario non trovato");return}const be=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());be&&(be!=null&&be.draft_expiration)&&Ye().isAfter(be.draft_expiration)&&(g({}),Tn()),((F=(E=i==null?void 0:i.data)==null?void 0:E.service_data)==null?void 0:F.view_type)==="calendar"?R!=null&&R.current||Q():((se=(te=i==null?void 0:i.data)==null?void 0:te.service_data)==null?void 0:se.view_type)==="select"?ye():alert(d.t("Il componente non è configurato per la visualizzazione a calendario"))}catch(be){console.error("Errore durante l'inizializzazione del calendario:",be)}}return C=setTimeout(V,500),()=>{var k,E;b=!0,C&&clearTimeout(C),R.current&&((E=(k=B.current)==null?void 0:k.destroy)==null||E.call(k),R.current=null)}},[(ze=(Re=i==null?void 0:i.root)==null?void 0:Re.data)==null?void 0:ze.place]);function _e(C){const b=i==null?void 0:i.dataValue;if(!(b!=null&&b.from_time))return;const V=Ye(b.from_time).format("DD-MM-YYYY HH:mm"),k=Ye(b.to_time).format("DD-MM-YYYY HH:mm"),E=C.find(te=>Ye(te.start).format("DD-MM-YYYY HH:mm")===V&&Ye(te.end).format("DD-MM-YYYY HH:mm")===k);if(!E)return;const F=document.querySelector(`.ec-event[data-event-id="${E.id}-${Ye(b==null?void 0:b.from_time).format("YYYY-MM-DD")}-${Ye(b==null?void 0:b.from_time).format("HH:mm")}"]`);F&&(F.classList.add("highlighted-event"),F.scrollIntoView({behavior:"smooth",block:"center"}),j({day:Ye(b==null?void 0:b.from_time).format("dddd, DD MMMM YYYY"),startDate:Ye(b==null?void 0:b.from_time).format("HH:mm"),endDate:Ye(b==null?void 0:b.to_time).format("HH:mm")}))}const Ce=({day:C,startDate:b,endDate:V})=>h.jsx("div",{className:"mt-3",children:h.jsxs("div",{className:"row align-items-center gy-3",children:[h.jsxs("div",{className:"col-12 col-md border-light mx-md-3",children:[h.jsx("div",{className:"text-paragraph-small",children:d.t("Data")}),h.jsx("p",{className:"data-text",children:h.jsx("strong",{children:C})})]}),h.jsxs("div",{className:"col-12 col-md border-light mx-md-3",children:[h.jsx("div",{className:"text-paragraph-small",children:d.t("Ora")}),h.jsx("p",{className:"data-text",children:h.jsxs("strong",{children:[b," - ",V]})})]})]})});return q.useEffect(()=>{var C,b,V,k;document.querySelector(".formio-read-only")&&c===!1?p(!0):(((b=(C=i==null?void 0:i.data)==null?void 0:C.service_data)==null?void 0:b.view_type)==="select"?ye():((k=(V=i==null?void 0:i.data)==null?void 0:V.service_data)==null?void 0:k.view_type)==="calendar"&&Q(),p(!1))},[]),q.useEffect(()=>{c&&setTimeout(()=>{const C=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());console.log("savedValue",C,c),C&&o(C)},500)},[c]),h.jsx(h.Fragment,{children:c&&X?h.jsxs("div",{className:"mx-2",children:[h.jsxs("p",{className:"text-paragraph",children:[d.t("Giorno selezionato per la prenotazione"),":"]}),h.jsx("div",{className:"",children:h.jsx("div",{className:"it-list-wrapper",children:h.jsx("ul",{className:"it-list",children:h.jsx(mc,{day:Ye(X.from_time).format("dddd D MMM YYYY"),i18next:d,slot:`${Ye(X.from_time).format("HH:mm")} - ${Ye(X.to_time).format("HH:mm")}`})})})})]}):h.jsxs("div",{className:"",children:[h.jsx("div",{ref:B}),_.length>0?h.jsxs(h.Fragment,{children:[h.jsxs(le.Select,{label:"Mese",id:"selectMonthYear",onChange:he,children:[h.jsx("option",{value:"",children:d.t("Scegli un'opzione")}),_.map(C=>h.jsx("option",{value:C.value,selected:C.value===S,children:C.label},C.value))]}),h.jsxs(le.Select,{label:"Giorno",id:"selectDay",onChange:C=>Z(C,"manual"),disabled:Y.length===0,children:[h.jsx("option",{value:"",children:d.t("Scegli un'opzione")}),Y.map(C=>h.jsx("option",{value:JSON.stringify(C),selected:C.date===T,children:Ye(C.date).format("dddd,DD MMMM YYYY")},C.date))]}),h.jsxs(le.Select,{label:"Orario",id:"selectSlot",onChange:ue,disabled:I.length===0,children:[h.jsx("option",{value:"",children:d.t("Scegli un'opzione")}),I.map(C=>h.jsx("option",{value:JSON.stringify(C),selected:C.start_time+" - "+C.end_time===m,children:C.start_time+" - "+C.end_time},C.start_time+" - "+C.end_time))]})]}):null,f?Ce({day:f.day,startDate:f.startDate,endDate:f.endDate}):null,s?h.jsx("div",{className:"d-flex align-items-center justify-content-center position-absolute-center",children:h.jsx(le.Spinner,{active:!0})}):null]})})},Ya=class Ya extends yn{constructor(i,g,d){super(i,g,d)}static get builderInfo(){return{title:"Calendar Advanced",group:"basic",icon:"bi bi-calendar-plus",documentation:"",weight:70,schema:Ya.schema()}}static schema(){return yn.schema({type:"calendar-advanced"})}attach(i,g){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(vc,{ref:g,component:this.component,value:this.dataValue,onChange:d=>this.setValue(d),...this,current:this}))}setValue(i){i&&(this.updateValue(i),this.shouldSetValue=!0)}getValue(){return this.dataValue}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}};Ct(Ya,"editForm",fc);let wa=Ya;const _c=[{key:"defaultValue",ignore:!0}],bc=[{key:"placeholder",ignore:!0},{type:"checkbox",label:"Files Synchronization feature",tooltip:"Enable ability to control files synchronization. Files will be auto synced before submit.",key:"autoSync",input:!0,conditional:{json:{in:[{var:"data.storage"},["s3","azure","googledrive"]]}}}],wc=[{type:"select",input:!0,key:"storage",label:"Storage",placeholder:"Select your file storage provider",weight:0,tooltip:"Which storage to save the files in.",valueProperty:"value",dataSrc:"custom",hidden:!0,data:{custom:function(){return[{label:"url",value:"url"}]}}},{type:"checkbox",input:!0,defaultValue:!0,key:"protocol_required",label:"Richiede protocollazione?",tooltip:"",weight:10},{type:"checkbox",input:!0,defaultValue:!1,key:"check_signature",label:"Effettuare il controllo della firma?",tooltip:"",weight:15},{type:"checkbox",input:!0,key:"useMultipartUpload",label:"Use the S3 Multipart Upload API",tooltip:"The <a href='https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html'>S3 Multipart Upload API</a> is designed to improve the upload experience for larger objects (> 5GB).",conditional:{json:{"===":[{var:"data.storage"},"s3"]}}},{label:"Multipart Upload",tableView:!1,key:"multipart",type:"container",input:!0,components:[{label:"Part Size (MB)",applyMaskOn:"change",mask:!1,tableView:!1,delimiter:!1,requireDecimal:!1,inputFormat:"plain",truncateMultipleSpaces:!1,validate:{min:5,max:5e3},key:"partSize",type:"number",input:!0,defaultValue:500}],conditional:{json:{"===":[{var:"data.useMultipartUpload"},!0]}}},{type:"textfield",input:!0,key:"options.indexeddb",label:"Database",weight:10,placeholder:"Enter the indexeddb database name",conditional:{json:{in:[{var:"data.storage"},["indexeddb"]]}}},{type:"textfield",input:!0,label:"Table",key:"options.indexeddbTable",weight:10,placeholder:"Enter the name for indexeddb table",conditional:{json:{in:[{var:"data.storage"},["indexeddb"]]}}},{type:"textarea",key:"options",label:"Custom request options",tooltip:"Pass your custom xhr options(optional)",rows:5,editor:"ace",input:!0,weight:15,placeholder:`{
|
|
100
100
|
"withCredentials": true,
|
|
101
101
|
"headers": {
|
|
102
102
|
"Authorization": "Basic <key>"
|
|
103
103
|
}
|
|
104
|
-
}`,conditional:{json:{"===":[{var:"data.storage"},"url"]}}},{type:"textfield",input:!0,key:"fileKey",label:"File form-data key",weight:17,placeholder:"Enter the key name of a file for form data.",tooltip:"Key name that you would like to modify for the file while calling API request.",conditional:{json:{"===":[{var:"data.storage"},"url"]}}},{type:"textfield",input:!0,key:"dir",label:"Directory",placeholder:"(optional) Enter a directory for the files",tooltip:"This will place all the files uploaded in this field in the directory",weight:20,conditional:{json:{"!==":[{var:"data.storage"},"googledrive"]}}},{type:"textfield",input:!0,key:"dir",label:"Folder ID",placeholder:"(optional) Enter an ID of the folder for the files",tooltip:"This will place all the files uploaded in this field in the folder",weight:20,conditional:{json:{"===":[{var:"data.storage"},"googledrive"]}}},{type:"textfield",input:!0,key:"fileNameTemplate",label:"File Name Template",placeholder:'(optional) { {name} }-{ {guid} }"',tooltip:"Specify template for name of uploaded file(s). Regular template variables are available (`data`, `component`, `user`, `value`, `moment` etc.), also `fileName`, `guid` variables are available. `guid` part must be present, if not found in template, will be added at the end.",weight:25},{type:"checkbox",input:!0,key:"image",label:"Display as image(s)",tooltip:"Instead of a list of linked files, images will be rendered in the view.",weight:30},{type:"checkbox",input:!0,key:"uploadOnly",label:"Upload Only",tooltip:"When this is checked, will only allow you to upload file(s) and consequently the download, in this component, will be unavailable.",weight:33},{type:"checkbox",input:!0,key:"privateDownload",label:"Private Download",tooltip:"When this is checked, the file download will send a POST request to the download URL with the x-jwt-token header. This will allow your endpoint to create a Private download system.",weight:31,conditional:{json:{"===":[{var:"data.storage"},"url"]}}},{type:"textfield",input:!0,key:"imageSize",label:"Image Size",placeholder:"100",tooltip:"The image size for previewing images.",weight:40,conditional:{json:{"==":[{var:"data.image"},!0]}}},{type:"textfield",input:!0,key:"maxFiles",label:"Numero massimo di file",placeholder:"100",tooltip:"Numero massimo di file caricabilii, default è 100.",weight:40},{type:"checkbox",input:!0,key:"webcam",label:"Enable web camera",tooltip:"This will allow using an attached camera to directly take a picture instead of uploading an existing file.",weight:32},{type:"textfield",input:!0,key:"webcamSize",label:"Webcam Width",placeholder:"320",tooltip:"The webcam size for taking pictures.",weight:38,conditional:{json:{"==":[{var:"data.webcam"},!0]}}},{type:"datagrid",input:!0,label:"File Types",key:"fileTypes",tooltip:"Specify file types to classify the uploads. This is useful if you allow multiple types of uploads but want to allow the user to specify which type of file each is.",weight:11,components:[{label:"Label",key:"label",input:!0,type:"textfield"},{label:"Value",key:"value",input:!0,type:"textfield"}]},{type:"textfield",input:!0,key:"filePattern",label:"File Pattern",placeholder:".jpg,video/*,application/pdf",tooltip:"See <a href='https://github.com/danialfarid/ng-file-upload#full-reference' target='_blank'>https://github.com/danialfarid/ng-file-upload#full-reference</a> for how to specify file patterns.",weight:50},{type:"textfield",input:!0,key:"fileMinSize",label:"File Minimum Size",placeholder:"1MB",tooltip:"See <a href='https://github.com/danialfarid/ng-file-upload#full-reference' target='_blank'>https://github.com/danialfarid/ng-file-upload#full-reference</a> for how to specify file sizes.",weight:60},{type:"textfield",input:!0,key:"fileMaxSize",label:"File Maximum Size",placeholder:"10MB",tooltip:"See <a href='https://github.com/danialfarid/ng-file-upload#full-reference' target='_blank'>https://github.com/danialfarid/ng-file-upload#full-reference</a> for how to specify file sizes.",weight:70},{type:"textfield",input:!0,key:"maxFiles",label:"Numero massimo di file",placeholder:"100",tooltip:"Numero massimo di file caricabilii, default è 100.",weight:40}],xc=[{key:"unique",ignore:!0},{key:"validateOn",ignore:!0}];function Mc(...y){return ot.Components.baseEditForm([{key:"display",components:bc},{key:"data",components:_c},{label:"File",key:"file",weight:5,components:wc},{key:"validation",components:xc}],...y)}document.documentElement.lang.toString();class Sc{constructor(){this.token=null,this.basePath=null,this.init()}init(){this.token=null,this.basePath=Fe()}async getSessionAuthToken(){let i=this;await qt.get(i.basePath+"/api/session-auth").then(g=>{i.token=g.data.token}).catch(g=>{Je.fire("'error_message_detail","'auth_error'","error")})}getSessionAuthTokenPromise(){let i=this;return new Promise(async(g,d)=>{aa("auth-token")?g({token:aa("auth-token")}):await qt.get(i.basePath+"/api/session-auth?with-cookie=true",{withCredentials:!0,headers:{"Content-Type":"application/json; charset=utf-8"}}).then(z=>{const $=sl.jwtDecode(z.data.token);$.exp&&oc("auth-token",z.data.token,$.exp)}).catch(z=>{console.log(z)})})}getToken(){return this.token}execAuthenticatedCall(i){this.token?i(this.token):this.getSessionAuthTokenPromise().then(g=>{this.token=g.token,i(this.token)})}}const vn=cr.Formio.Components.components.field;let lr=null;document.querySelector("widget-formio")!==null&&(lr=document.querySelector("widget-formio").getAttribute("signature-check-ws-url"));const Dc=y=>{const{component:i,current:g,onChange:d,i18next:z}=y,[$,X]=q.useState([]),[o,x]=q.useState(new Map),[a,s]=q.useState(!1),u=new Sc;q.useEffect(()=>{u.getSessionAuthTokenPromise()},[]);const c=(m,P)=>{x(B=>{const R=new Map(B);return R.set(m,P),R})};function p(m){return m.size>(T(i.fileMaxSize)||T("1GB"))?{code:"size-files",message:`${z.t("I file non possono superare le dimensioni di")} ${i.fileMaxSize?i.fileMaxSize:"1GB"}`}:$.length>=(i.maxFiles?parseInt(i.maxFiles):i.multiple?100:1)?{code:"too-many-files",message:`${z.t("Puoi caricare massimo ")} ${i.maxFiles||100} ${z.t("file")}`}:m.size<T(i.fileMinSize)?{code:"file-too-small",message:`${z.t("I file devono avare una dimensione superiore a ")} ${i.fileMinSize}`}:null}function f(){if(i.filePattern){const m=i.filePattern.split(",");let P={};return m.map(B=>{const R=il.getType(B);P[R]=[],P[R].push(B)}),P}else return!0}const j=m=>{let P={};return P.originalName=m.originalName?m.originalName:m.name,P.name=m.name,P.url=m.url,P.data=m.data,P.signature_validation=m.signature_validation,P.mime_type=m.mime_type,P.storage="url",P.size=m.size,P},{getRootProps:_,getInputProps:D,fileRejections:Y,isDragActive:O,open:I}=nl.useDropzone({onDrop:m=>{m.map(P=>{v(P).then(B=>{})})},maxFiles:i.maxFiles?parseInt(i.maxFiles)-$.length:i.multiple?100:1,validator:p,accept:f()}),N=m=>{const P=Fe()+"/api/attachments/"+m.data.id;fetch(P,{method:"DELETE",headers:{"Content-Type":"application/json; charset=utf-8",Authorization:`Bearer ${aa("auth-token")}`},strictErrors:!0}).then(()=>{X(B=>{let R=B.filter(A=>A.data.id!==m.data.id);return d(R),R})}).catch(B=>{Je.fire({title:"",html:`<p>${z.t("Ci sono stati degli errori durante l'eliminazione del file")}</p>`,icon:"error",cancelButtonText:z.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),console.error(B)})},S=()=>{const m=g!=null&&g.dataValue?g.dataValue:null;(m==null?void 0:m.length)>0&&(X(m),setTimeout(()=>{d(m)},100))};q.useEffect(()=>{document.querySelector(".formio-read-only")&&a===!1?(s(!0),setTimeout(()=>{S()},1e3)):(s(!1),setTimeout(()=>{S()},1e3))},[]);async function v(m){let P;const B=Fe()+"/it/upload";let R={mime_type:m.type,name:m.name,original_filename:m.name,protocol_required:i.protocol_required,size:m.size};return await qt.post(B,R,{maxContentLength:1/0,maxBodyLength:1/0}).then(async A=>(P=A.data.id,m.url=Fe()+"/it/allegati/"+P,m.storage="url",m.mime_type=m.type,m.protocol_required=i.protocol_required,m.data={...A.data,baseUrl:Fe()+"/it/allegati/"+P},c(P,m),await qt.put(A.data.uri,m,{onUploadProgress:H=>{let J=Math.round(H.loaded*100/H.total);x(ne=>{const ee=new Map(ne),he=m;return he.progress=parseInt(J),ee.has(P)&&ee.set(P,he),ee})},maxContentLength:1/0,maxBodyLength:1/0,headers:{"Content-Type":"multipart/form-data"}}).then(async H=>{const J=/\\|"/gi,ne=H.headers.etag.replace(J,"")||null;return await qt.put(Fe()+"/it/upload/"+P,{file_hash:ne,check_signature:i.check_signature}).then(async ee=>{x(ue=>{const ie=new Map(ue);return ie.delete(P),ie});let he=g.dataValue||[],Z=null;if(X(ue=>(Z=ue.push(j(m))-1,d(ue),ue)),i.check_signature&&ee.data.url&&lr)return await qt.post(lr,{url:ee.data.url,content:null},{headers:{"Content-Type":"application/json"}}).then(ue=>{m.signature_validation=ue.data.sign,he[Z].signature_validation=ue.data.sign}).catch(ue=>{he[Z].signature_validation="File validation error: "+ue});x(ue=>{const ie=new Map(ue);return ie.delete(P),ie})}).catch(ee=>{x(he=>{const Z=new Map(he);return Z.delete(P),Z}),console.log(ee),Je.fire({title:"",html:`<p>${z.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:z.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})}).catch(H=>{x(J=>{const ne=new Map(J);return ne.delete(P),ne}),console.log(H),Je.fire({title:"",html:`<p>${z.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:z.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})}))).catch(A=>{console.log(A),Je.fire({title:"",html:`<p>${z.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:z.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),x(H=>{const J=new Map(H);return J.delete(P),J})})}function T(m){if(typeof m=="string"){if(m.search(/kb/i)===m.length-2)return parseFloat(m.substring(0,m.length-2)*1024);if(m.search(/mb/i)===m.length-2)return parseFloat(m.substring(0,m.length-2)*1024*1024);if(m.search(/gb/i)===m.length-2)return parseFloat(m.substring(0,m.length-2)*1024*1024*1024);if(m.search(/b/i)===m.length-1||m.search(/s/i)===m.length-1)return parseFloat(m.substring(0,m.length-1));if(m.search(/m/i)===m.length-1)return parseFloat(m.substring(0,m.length-1)*60);if(m.search(/h/i)===m.length-1)return parseFloat(m.substring(0,m.length-1)*3600)}return m}function L(m,P=2){if(!+m)return"0 Bytes";const B=1024,R=P<0?0:P,A=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],H=Math.floor(Math.log(m)/Math.log(B));return`${parseFloat((m/Math.pow(B,H)).toFixed(R))} ${A[H]}`}return g.conditionallyHidden()||g.visible===!1?null:h.jsx(h.Fragment,{children:a?h.jsx("div",{children:h.jsxs("ul",{className:"upload-file-list",children:[$.map((m,P)=>h.jsxs("li",{className:"upload-file success mw-100",children:[h.jsx(le.Icon,{"aria-hidden":"true",color:"primary",icon:"it-file",title:"Icona file",size:"sm"}),h.jsxs("p",{children:[h.jsx("span",{className:"visually-hidden",children:z.t("File caricato:")}),m.name,h.jsx("span",{className:"upload-file-weight",children:L(m.size)})]})]},m.size+P)),$.length<1&&h.jsxs("li",{className:"upload-file text-secondary mw-100",children:[h.jsx(le.Icon,{"aria-hidden":"true",color:"light",icon:"it-files",title:"Icona file",size:"sm"}),h.jsx("p",{children:z.t("Nessun elemento")})]})]})}):h.jsxs(h.Fragment,{children:[i.hideLabel||i.hidden?"":h.jsxs("label",{className:"col-form-label floating-label",htmlFor:`${i.id}-${i.key}`,title:i.tooltip||void 0,children:[i.label,i.validate.required&&h.jsx("span",{className:"text-danger"}),i.tooltip&&h.jsx("i",{tabIndex:0,className:"bi bi-question-circle text-muted ms-1","data-tooltip":i.tooltip,"aria-expanded":"false"})]}),h.jsxs("div",{className:`my-1 border-2 border-light file-uploader-box rounded p-3 text-secondary${O?" dragover":""}`,style:{border:"dashed"},..._({onClick:m=>m.stopPropagation()}),children:[h.jsx("input",{id:`${i.id}-${i.key}`,"aria-describedby":`file-uploader-description-${i.id}-${i.key}`,...D()}),h.jsxs("div",{className:`upload-dragdrop${O?" dragover":""}`,children:[h.jsx("div",{className:"ms-1 me-3",children:h.jsx(le.Icon,{color:"secondary",icon:"it-upload",title:z.t("Carica file"),size:"_sm"})}),h.jsxs("div",{className:"upload-dragdrop-text",children:[h.jsx("div",{className:"h5",id:`file-uploader-description-${i.id}-${i.key}`,children:z.t("Trascina il file per caricarlo")}),h.jsxs("p",{className:"d-inline-flex",children:[z.t("oppure"),h.jsx(le.Button,{tag:"input",type:"button",value:z.t("selezionalo dal dispositivo"),onClick:I,className:"px-1 py-0 text-decoration-underline primary-color",size:"xs"})]})]})]})]}),h.jsx("div",{dangerouslySetInnerHTML:{__html:Mn.sanitize(i.description||"")}}),h.jsxs("ul",{className:"upload-file-list my-0",children:[$.map((m,P)=>h.jsxs("li",{className:"upload-file success",children:[h.jsx(le.Icon,{"aria-hidden":"true",color:"primary",icon:"it-file",title:"Icona file",size:"sm"}),h.jsxs("p",{children:[h.jsx("span",{className:"visually-hidden",children:z.t("File caricato:")}),m.name,h.jsx("span",{className:"upload-file-weight",children:L(m.size)})]}),h.jsx(le.Button,{className:"px-1",onClick:()=>N(m),children:h.jsx(le.Icon,{title:`${z.t("Elimina file caricato")} ${m.name}`,color:"secondary",icon:"it-delete",className:"ms-auto pointer",size:"sm"})})]},m.size+P)),Array.from(o.entries()).map(([m,P])=>h.jsxs("li",{className:"upload-file success",children:[h.jsx(le.Icon,{"aria-hidden":"true",color:"primary",icon:"it-file",title:"Icona file",size:"sm"}),h.jsxs("p",{children:[h.jsx("span",{className:"visually-hidden",children:z.t("Caricamento file:")}),P.name,h.jsx("span",{className:"upload-file-weight",children:L(P.size)})]}),h.jsx(le.Progress,{value:P.progress})]},m))]}),!!(Y&&Y.length)&&h.jsx("div",{className:"formio-error-wrapper",children:h.jsx("ul",{className:"formio-errors upload-file-list my-0 ",children:Y.map(({file:m,errors:P},B)=>h.jsxs("li",{className:"upload-file error",children:[h.jsxs("div",{className:"upload-file-name-error-wrapper",children:[h.jsx(le.Icon,{"aria-hidden":"true",color:"error",icon:"it-error",title:"Icona file",size:"sm"}),h.jsxs("p",{className:"text-wrap error",children:[h.jsx("span",{className:"visually-hidden",children:z.t("Errore caricamento file:")}),m.name,h.jsx("span",{className:"upload-file-weight",children:L(m.size)})]})]}),h.jsx("div",{children:P.map(R=>R.code==="file-invalid-type"?h.jsxs("p",{className:"text-wrap ms-0",children:[z.t("I file possono essere di tipo "),i.filePattern]}):R.code==="too-many-files"?h.jsxs("p",{className:"text-wrap ms-0",children:[z.t("Puoi caricare massimo ")," ",i.maxFiles?i.maxFiles:i.multiple?100:1," ",z.t("file")]}):h.jsx("p",{className:"text-wrap ms-0",children:R.message}))})]},m.size+B))})})]})})},Oa=class Oa extends vn{constructor(i,g,d){super({...i,multiple:i.multiple},g,d),this.reactRef=null,this.lastRenderedVisible=void 0}static get builderInfo(){return{title:"File Sdc",group:"basic",icon:"bi bi-file-earmark-text",documentation:"",weight:70,schema:Oa.schema()}}static schema(){return vn.schema({type:"sdcfile"})}renderReact(i=this.reactRef){this.rootComponent&&this.rootComponent.render(h.jsx(Dc,{ref:i,component:this.component,onChange:g=>this.setValue(g),...this,current:this}))}attach(i,g){this.reactRef=g,this.rootComponent=Ft.createRoot(i),this.lastRenderedVisible=this.visible,this.renderReact(g)}setValue(i){i&&(this.updateValue(i),this.shouldSetValue=!0)}getValue(){return super.getValue()}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}checkCondition(i,g){const d=super.checkCondition(i,g),z=this.visible;return this.lastRenderedVisible!==z&&(this.lastRenderedVisible=z,this.renderReact()),d}};Ct(Oa,"editForm",Mc);let xa=Oa;const kc=[{key:"labelPosition",ignore:!0},{key:"labelPosition",ignore:!0},{key:"placeholder",ignore:!0},{key:"description",ignore:!0},{key:"hideLabel",ignore:!0},{key:"autofocus",ignore:!0},{key:"tooltip",ignore:!0},{key:"tabindex",ignore:!0},{key:"disabled",ignore:!0}];function Yc(...y){return ot.Components.baseEditForm([{key:"display",components:kc}],...y)}var ya={exports:{}},Oc=ya.exports,_n;function jc(){return _n||(_n=1,(function(y,i){(function(g,d){y.exports=d(q)})(Oc,(function(g){return(function(){var d={680:function(o){o.exports=g},8952:function(o,x,a){var s=a(4328),u=a(36),c=TypeError;o.exports=function(p){if(s(p))return p;throw new c(u(p)+" is not a function")}},2096:function(o,x,a){var s=a(2424),u=String,c=TypeError;o.exports=function(p){if(s(p))return p;throw new c("Can't set "+u(p)+" as a prototype")}},4764:function(o,x,a){var s=a(9764).charAt;o.exports=function(u,c,p){return c+(p?s(u,c).length:1)}},6100:function(o,x,a){var s=a(7e3),u=TypeError;o.exports=function(c,p){if(s(p,c))return c;throw new u("Incorrect invocation")}},3951:function(o,x,a){var s=a(1632),u=String,c=TypeError;o.exports=function(p){if(s(p))return p;throw new c(u(p)+" is not an object")}},2504:function(o,x,a){var s=a(4096),u=a(2495),c=a(3556),p=function(f){return function(j,_,D){var Y=s(j),O=c(Y);if(O===0)return!f&&-1;var I,N=u(D,O);if(f&&_!=_){for(;O>N;)if((I=Y[N++])!=I)return!0}else for(;O>N;N++)if((f||N in Y)&&Y[N]===_)return f||N||0;return!f&&-1}};o.exports={includes:p(!0),indexOf:p(!1)}},3364:function(o,x,a){var s=a(8992),u=a(1664),c=a(5712),p=a(4356),f=a(3556),j=a(2568),_=u([].push),D=function(Y){var O=Y===1,I=Y===2,N=Y===3,S=Y===4,v=Y===6,T=Y===7,L=Y===5||v;return function(m,P,B,R){for(var A,H,J=p(m),ne=c(J),ee=f(ne),he=s(P,B),Z=0,ue=R||j,ie=O?ue(m,ee):I||T?ue(m,0):void 0;ee>Z;Z++)if((L||Z in ne)&&(H=he(A=ne[Z],Z,J),Y))if(O)ie[Z]=H;else if(H)switch(Y){case 3:return!0;case 5:return A;case 6:return Z;case 2:_(ie,A)}else switch(Y){case 4:return!1;case 7:_(ie,A)}return v?-1:N||S?S:ie}};o.exports={forEach:D(0),map:D(1),filter:D(2),some:D(3),every:D(4),find:D(5),findIndex:D(6),filterReject:D(7)}},953:function(o,x,a){var s=a(9957),u=a(9972),c=a(8504),p=u("species");o.exports=function(f){return c>=51||!s((function(){var j=[];return(j.constructor={})[p]=function(){return{foo:1}},j[f](Boolean).foo!==1}))}},1496:function(o,x,a){var s=a(9957);o.exports=function(u,c){var p=[][u];return!!p&&s((function(){p.call(null,c||function(){return 1},1)}))}},6728:function(o,x,a){var s=a(3476),u=a(1432),c=TypeError,p=Object.getOwnPropertyDescriptor,f=s&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(j){return j instanceof TypeError}})();o.exports=f?function(j,_){if(u(j)&&!p(j,"length").writable)throw new c("Cannot set read only .length");return j.length=_}:function(j,_){return j.length=_}},6736:function(o,x,a){var s=a(1432),u=a(6072),c=a(1632),p=a(9972)("species"),f=Array;o.exports=function(j){var _;return s(j)&&(_=j.constructor,(u(_)&&(_===f||s(_.prototype))||c(_)&&(_=_[p])===null)&&(_=void 0)),_===void 0?f:_}},2568:function(o,x,a){var s=a(6736);o.exports=function(u,c){return new(s(u))(c===0?0:c)}},8696:function(o,x,a){var s=a(3951),u=a(3112);o.exports=function(c,p,f,j){try{return j?p(s(f)[0],f[1]):p(f)}catch(_){u(c,"throw",_)}}},1888:function(o,x,a){var s=a(1664),u=s({}.toString),c=s("".slice);o.exports=function(p){return c(u(p),8,-1)}},4427:function(o,x,a){var s=a(16),u=a(4328),c=a(1888),p=a(9972)("toStringTag"),f=Object,j=c((function(){return arguments})())==="Arguments";o.exports=s?c:function(_){var D,Y,O;return _===void 0?"Undefined":_===null?"Null":typeof(Y=(function(I,N){try{return I[N]}catch{}})(D=f(_),p))=="string"?Y:j?c(D):(O=c(D))==="Object"&&u(D.callee)?"Arguments":O}},9968:function(o,x,a){var s=a(5152),u=a(9252),c=a(9444),p=a(8352);o.exports=function(f,j,_){for(var D=u(j),Y=p.f,O=c.f,I=0;I<D.length;I++){var N=D[I];s(f,N)||_&&s(_,N)||Y(f,N,O(j,N))}}},2272:function(o,x,a){var s=a(9957);o.exports=!s((function(){function u(){}return u.prototype.constructor=null,Object.getPrototypeOf(new u)!==u.prototype}))},3336:function(o){o.exports=function(x,a){return{value:x,done:a}}},3440:function(o,x,a){var s=a(3476),u=a(8352),c=a(9728);o.exports=s?function(p,f,j){return u.f(p,f,c(1,j))}:function(p,f,j){return p[f]=j,p}},9728:function(o){o.exports=function(x,a){return{enumerable:!(1&x),configurable:!(2&x),writable:!(4&x),value:a}}},92:function(o,x,a){var s=a(3476),u=a(8352),c=a(9728);o.exports=function(p,f,j){s?u.f(p,f,c(0,j)):p[f]=j}},2544:function(o,x,a){var s=a(5312),u=a(8352);o.exports=function(c,p,f){return f.get&&s(f.get,p,{getter:!0}),f.set&&s(f.set,p,{setter:!0}),u.f(c,p,f)}},6076:function(o,x,a){var s=a(4328),u=a(8352),c=a(5312),p=a(4636);o.exports=function(f,j,_,D){D||(D={});var Y=D.enumerable,O=D.name!==void 0?D.name:j;if(s(_)&&c(_,O,D),D.global)Y?f[j]=_:p(j,_);else{try{D.unsafe?f[j]&&(Y=!0):delete f[j]}catch{}Y?f[j]=_:u.f(f,j,{value:_,enumerable:!1,configurable:!D.nonConfigurable,writable:!D.nonWritable})}return f}},4036:function(o,x,a){var s=a(6076);o.exports=function(u,c,p){for(var f in c)s(u,f,c[f],p);return u}},4636:function(o,x,a){var s=a(6420),u=Object.defineProperty;o.exports=function(c,p){try{u(s,c,{value:p,configurable:!0,writable:!0})}catch{s[c]=p}return p}},3476:function(o,x,a){var s=a(9957);o.exports=!s((function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}))},8168:function(o,x,a){var s=a(6420),u=a(1632),c=s.document,p=u(c)&&u(c.createElement);o.exports=function(f){return p?c.createElement(f):{}}},4316:function(o){var x=TypeError;o.exports=function(a){if(a>9007199254740991)throw x("Maximum allowed index exceeded");return a}},6064:function(o){o.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},8504:function(o,x,a){var s,u,c=a(6420),p=a(6064),f=c.process,j=c.Deno,_=f&&f.versions||j&&j.version,D=_&&_.v8;D&&(u=(s=D.split("."))[0]>0&&s[0]<4?1:+(s[0]+s[1])),!u&&p&&(!(s=p.match(/Edge\/(\d+)/))||s[1]>=74)&&(s=p.match(/Chrome\/(\d+)/))&&(u=+s[1]),o.exports=u},8256:function(o){o.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6520:function(o,x,a){var s=a(1664),u=Error,c=s("".replace),p=String(new u("zxcasd").stack),f=/\n\s*at [^:]*:[^\n]*/,j=f.test(p);o.exports=function(_,D){if(j&&typeof _=="string"&&!u.prepareStackTrace)for(;D--;)_=c(_,f,"");return _}},3696:function(o,x,a){var s=a(3440),u=a(6520),c=a(9184),p=Error.captureStackTrace;o.exports=function(f,j,_,D){c&&(p?p(f,j):s(f,"stack",u(_,D)))}},9184:function(o,x,a){var s=a(9957),u=a(9728);o.exports=!s((function(){var c=new Error("a");return!("stack"in c)||(Object.defineProperty(c,"stack",u(1,7)),c.stack!==7)}))},9160:function(o,x,a){var s=a(6420),u=a(9444).f,c=a(3440),p=a(6076),f=a(4636),j=a(9968),_=a(6704);o.exports=function(D,Y){var O,I,N,S,v,T=D.target,L=D.global,m=D.stat;if(O=L?s:m?s[T]||f(T,{}):s[T]&&s[T].prototype)for(I in Y){if(S=Y[I],N=D.dontCallGetSet?(v=u(O,I))&&v.value:O[I],!_(L?I:T+(m?".":"#")+I,D.forced)&&N!==void 0){if(typeof S==typeof N)continue;j(S,N)}(D.sham||N&&N.sham)&&c(S,"sham",!0),p(O,I,S,D)}}},9957:function(o){o.exports=function(x){try{return!!x()}catch{return!0}}},7176:function(o,x,a){a(880);var s=a(8448),u=a(6076),c=a(7680),p=a(9957),f=a(9972),j=a(3440),_=f("species"),D=RegExp.prototype;o.exports=function(Y,O,I,N){var S=f(Y),v=!p((function(){var P={};return P[S]=function(){return 7},""[Y](P)!==7})),T=v&&!p((function(){var P=!1,B=/a/;return Y==="split"&&((B={}).constructor={},B.constructor[_]=function(){return B},B.flags="",B[S]=/./[S]),B.exec=function(){return P=!0,null},B[S](""),!P}));if(!v||!T||I){var L=/./[S],m=O(S,""[Y],(function(P,B,R,A,H){var J=B.exec;return J===c||J===D.exec?v&&!H?{done:!0,value:s(L,B,R,A)}:{done:!0,value:s(P,R,B,A)}:{done:!1}}));u(String.prototype,Y,m[0]),u(D,S,m[1])}N&&j(D[S],"sham",!0)}},908:function(o,x,a){var s=a(7332),u=Function.prototype,c=u.apply,p=u.call;o.exports=typeof Reflect=="object"&&Reflect.apply||(s?p.bind(c):function(){return p.apply(c,arguments)})},8992:function(o,x,a){var s=a(3180),u=a(8952),c=a(7332),p=s(s.bind);o.exports=function(f,j){return u(f),j===void 0?f:c?p(f,j):function(){return f.apply(j,arguments)}}},7332:function(o,x,a){var s=a(9957);o.exports=!s((function(){var u=(function(){}).bind();return typeof u!="function"||u.hasOwnProperty("prototype")}))},8448:function(o,x,a){var s=a(7332),u=Function.prototype.call;o.exports=s?u.bind(u):function(){return u.apply(u,arguments)}},6208:function(o,x,a){var s=a(3476),u=a(5152),c=Function.prototype,p=s&&Object.getOwnPropertyDescriptor,f=u(c,"name"),j=f&&(function(){}).name==="something",_=f&&(!s||s&&p(c,"name").configurable);o.exports={EXISTS:f,PROPER:j,CONFIGURABLE:_}},5288:function(o,x,a){var s=a(1664),u=a(8952);o.exports=function(c,p,f){try{return s(u(Object.getOwnPropertyDescriptor(c,p)[f]))}catch{}}},3180:function(o,x,a){var s=a(1888),u=a(1664);o.exports=function(c){if(s(c)==="Function")return u(c)}},1664:function(o,x,a){var s=a(7332),u=Function.prototype,c=u.call,p=s&&u.bind.bind(c,c);o.exports=s?p:function(f){return function(){return c.apply(f,arguments)}}},5232:function(o,x,a){var s=a(6420),u=a(4328);o.exports=function(c,p){return arguments.length<2?(f=s[c],u(f)?f:void 0):s[c]&&s[c][p];var f}},6752:function(o){o.exports=function(x){return{iterator:x,next:x.next,done:!1}}},4504:function(o,x,a){var s=a(8952),u=a(9760);o.exports=function(c,p){var f=c[p];return u(f)?void 0:s(f)}},6420:function(o,x,a){var s=function(u){return u&&u.Math===Math&&u};o.exports=s(typeof globalThis=="object"&&globalThis)||s(typeof window=="object"&&window)||s(typeof self=="object"&&self)||s(typeof a.g=="object"&&a.g)||s(typeof this=="object"&&this)||(function(){return this})()||Function("return this")()},5152:function(o,x,a){var s=a(1664),u=a(4356),c=s({}.hasOwnProperty);o.exports=Object.hasOwn||function(p,f){return c(u(p),f)}},2560:function(o){o.exports={}},4168:function(o,x,a){var s=a(5232);o.exports=s("document","documentElement")},9888:function(o,x,a){var s=a(3476),u=a(9957),c=a(8168);o.exports=!s&&!u((function(){return Object.defineProperty(c("div"),"a",{get:function(){return 7}}).a!==7}))},5712:function(o,x,a){var s=a(1664),u=a(9957),c=a(1888),p=Object,f=s("".split);o.exports=u((function(){return!p("z").propertyIsEnumerable(0)}))?function(j){return c(j)==="String"?f(j,""):p(j)}:p},7512:function(o,x,a){var s=a(4328),u=a(1632),c=a(4024);o.exports=function(p,f,j){var _,D;return c&&s(_=f.constructor)&&_!==j&&u(D=_.prototype)&&D!==j.prototype&&c(p,D),p}},9112:function(o,x,a){var s=a(1664),u=a(4328),c=a(3976),p=s(Function.toString);u(c.inspectSource)||(c.inspectSource=function(f){return p(f)}),o.exports=c.inspectSource},3480:function(o,x,a){var s=a(1632),u=a(3440);o.exports=function(c,p){s(p)&&"cause"in p&&u(c,"cause",p.cause)}},9104:function(o,x,a){var s,u,c,p=a(4288),f=a(6420),j=a(1632),_=a(3440),D=a(5152),Y=a(3976),O=a(6504),I=a(2560),N="Object already initialized",S=f.TypeError,v=f.WeakMap;if(p||Y.state){var T=Y.state||(Y.state=new v);T.get=T.get,T.has=T.has,T.set=T.set,s=function(m,P){if(T.has(m))throw new S(N);return P.facade=m,T.set(m,P),P},u=function(m){return T.get(m)||{}},c=function(m){return T.has(m)}}else{var L=O("state");I[L]=!0,s=function(m,P){if(D(m,L))throw new S(N);return P.facade=m,_(m,L,P),P},u=function(m){return D(m,L)?m[L]:{}},c=function(m){return D(m,L)}}o.exports={set:s,get:u,has:c,enforce:function(m){return c(m)?u(m):s(m,{})},getterFor:function(m){return function(P){var B;if(!j(P)||(B=u(P)).type!==m)throw new S("Incompatible receiver, "+m+" required");return B}}}},1432:function(o,x,a){var s=a(1888);o.exports=Array.isArray||function(u){return s(u)==="Array"}},4328:function(o){var x=typeof document=="object"&&document.all;o.exports=x===void 0&&x!==void 0?function(a){return typeof a=="function"||a===x}:function(a){return typeof a=="function"}},6072:function(o,x,a){var s=a(1664),u=a(9957),c=a(4328),p=a(4427),f=a(5232),j=a(9112),_=function(){},D=f("Reflect","construct"),Y=/^\s*(?:class|function)\b/,O=s(Y.exec),I=!Y.test(_),N=function(v){if(!c(v))return!1;try{return D(_,[],v),!0}catch{return!1}},S=function(v){if(!c(v))return!1;switch(p(v)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return I||!!O(Y,j(v))}catch{return!0}};S.sham=!0,o.exports=!D||u((function(){var v;return N(N.call)||!N(Object)||!N((function(){v=!0}))||v}))?S:N},6704:function(o,x,a){var s=a(9957),u=a(4328),c=/#|\.prototype\./,p=function(Y,O){var I=j[f(Y)];return I===D||I!==_&&(u(O)?s(O):!!O)},f=p.normalize=function(Y){return String(Y).replace(c,".").toLowerCase()},j=p.data={},_=p.NATIVE="N",D=p.POLYFILL="P";o.exports=p},9760:function(o){o.exports=function(x){return x==null}},1632:function(o,x,a){var s=a(4328);o.exports=function(u){return typeof u=="object"?u!==null:s(u)}},2424:function(o,x,a){var s=a(1632);o.exports=function(u){return s(u)||u===null}},7048:function(o){o.exports=!1},7728:function(o,x,a){var s=a(5232),u=a(4328),c=a(7e3),p=a(6536),f=Object;o.exports=p?function(j){return typeof j=="symbol"}:function(j){var _=s("Symbol");return u(_)&&c(_.prototype,f(j))}},3112:function(o,x,a){var s=a(8448),u=a(3951),c=a(4504);o.exports=function(p,f,j){var _,D;u(p);try{if(!(_=c(p,"return"))){if(f==="throw")throw j;return j}_=s(_,p)}catch(Y){D=!0,_=Y}if(f==="throw")throw j;if(D)throw _;return u(_),j}},9724:function(o,x,a){var s=a(8448),u=a(9368),c=a(3440),p=a(4036),f=a(9972),j=a(9104),_=a(4504),D=a(336).IteratorPrototype,Y=a(3336),O=a(3112),I=f("toStringTag"),N="IteratorHelper",S="WrapForValidIterator",v=j.set,T=function(P){var B=j.getterFor(P?S:N);return p(u(D),{next:function(){var R=B(this);if(P)return R.nextHandler();try{var A=R.done?void 0:R.nextHandler();return Y(A,R.done)}catch(H){throw R.done=!0,H}},return:function(){var R=B(this),A=R.iterator;if(R.done=!0,P){var H=_(A,"return");return H?s(H,A):Y(void 0,!0)}if(R.inner)try{O(R.inner.iterator,"normal")}catch(J){return O(A,"throw",J)}return O(A,"normal"),Y(void 0,!0)}})},L=T(!0),m=T(!1);c(m,I,"Iterator Helper"),o.exports=function(P,B){var R=function(A,H){H?(H.iterator=A.iterator,H.next=A.next):H=A,H.type=B?S:N,H.nextHandler=P,H.counter=0,H.done=!1,v(this,H)};return R.prototype=B?L:m,R}},5792:function(o,x,a){var s=a(8448),u=a(8952),c=a(3951),p=a(6752),f=a(9724),j=a(8696),_=f((function(){var D=this.iterator,Y=c(s(this.next,D));if(!(this.done=!!Y.done))return j(D,this.mapper,[Y.value,this.counter++],!0)}));o.exports=function(D){return c(this),u(D),new _(p(this),{mapper:D})}},336:function(o,x,a){var s,u,c,p=a(9957),f=a(4328),j=a(1632),_=a(9368),D=a(7796),Y=a(6076),O=a(9972),I=a(7048),N=O("iterator"),S=!1;[].keys&&("next"in(c=[].keys())?(u=D(D(c)))!==Object.prototype&&(s=u):S=!0),!j(s)||p((function(){var v={};return s[N].call(v)!==v}))?s={}:I&&(s=_(s)),f(s[N])||Y(s,N,(function(){return this})),o.exports={IteratorPrototype:s,BUGGY_SAFARI_ITERATORS:S}},3556:function(o,x,a){var s=a(7584);o.exports=function(u){return s(u.length)}},5312:function(o,x,a){var s=a(1664),u=a(9957),c=a(4328),p=a(5152),f=a(3476),j=a(6208).CONFIGURABLE,_=a(9112),D=a(9104),Y=D.enforce,O=D.get,I=String,N=Object.defineProperty,S=s("".slice),v=s("".replace),T=s([].join),L=f&&!u((function(){return N((function(){}),"length",{value:8}).length!==8})),m=String(String).split("String"),P=o.exports=function(B,R,A){S(I(R),0,7)==="Symbol("&&(R="["+v(I(R),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),A&&A.getter&&(R="get "+R),A&&A.setter&&(R="set "+R),(!p(B,"name")||j&&B.name!==R)&&(f?N(B,"name",{value:R,configurable:!0}):B.name=R),L&&A&&p(A,"arity")&&B.length!==A.arity&&N(B,"length",{value:A.arity});try{A&&p(A,"constructor")&&A.constructor?f&&N(B,"prototype",{writable:!1}):B.prototype&&(B.prototype=void 0)}catch{}var H=Y(B);return p(H,"source")||(H.source=T(m,typeof R=="string"?R:"")),B};Function.prototype.toString=P((function(){return c(this)&&O(this).source||_(this)}),"toString")},1748:function(o){var x=Math.ceil,a=Math.floor;o.exports=Math.trunc||function(s){var u=+s;return(u>0?a:x)(u)}},8948:function(o,x,a){var s=a(5016);o.exports=function(u,c){return u===void 0?arguments.length<2?"":c:s(u)}},9292:function(o,x,a){var s=a(3476),u=a(1664),c=a(8448),p=a(9957),f=a(1531),j=a(9392),_=a(8912),D=a(4356),Y=a(5712),O=Object.assign,I=Object.defineProperty,N=u([].concat);o.exports=!O||p((function(){if(s&&O({b:1},O(I({},"a",{enumerable:!0,get:function(){I(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var S={},v={},T=Symbol("assign detection"),L="abcdefghijklmnopqrst";return S[T]=7,L.split("").forEach((function(m){v[m]=m})),O({},S)[T]!==7||f(O({},v)).join("")!==L}))?function(S,v){for(var T=D(S),L=arguments.length,m=1,P=j.f,B=_.f;L>m;)for(var R,A=Y(arguments[m++]),H=P?N(f(A),P(A)):f(A),J=H.length,ne=0;J>ne;)R=H[ne++],s&&!c(B,A,R)||(T[R]=A[R]);return T}:O},9368:function(o,x,a){var s,u=a(3951),c=a(2056),p=a(8256),f=a(2560),j=a(4168),_=a(8168),D=a(6504),Y="prototype",O="script",I=D("IE_PROTO"),N=function(){},S=function(L){return"<"+O+">"+L+"</"+O+">"},v=function(L){L.write(S("")),L.close();var m=L.parentWindow.Object;return L=null,m},T=function(){try{s=new ActiveXObject("htmlfile")}catch{}var L,m,P;T=typeof document<"u"?document.domain&&s?v(s):(m=_("iframe"),P="java"+O+":",m.style.display="none",j.appendChild(m),m.src=String(P),(L=m.contentWindow.document).open(),L.write(S("document.F=Object")),L.close(),L.F):v(s);for(var B=p.length;B--;)delete T[Y][p[B]];return T()};f[I]=!0,o.exports=Object.create||function(L,m){var P;return L!==null?(N[Y]=u(L),P=new N,N[Y]=null,P[I]=L):P=T(),m===void 0?P:c.f(P,m)}},2056:function(o,x,a){var s=a(3476),u=a(1576),c=a(8352),p=a(3951),f=a(4096),j=a(1531);x.f=s&&!u?Object.defineProperties:function(_,D){p(_);for(var Y,O=f(D),I=j(D),N=I.length,S=0;N>S;)c.f(_,Y=I[S++],O[Y]);return _}},8352:function(o,x,a){var s=a(3476),u=a(9888),c=a(1576),p=a(3951),f=a(88),j=TypeError,_=Object.defineProperty,D=Object.getOwnPropertyDescriptor,Y="enumerable",O="configurable",I="writable";x.f=s?c?function(N,S,v){if(p(N),S=f(S),p(v),typeof N=="function"&&S==="prototype"&&"value"in v&&I in v&&!v[I]){var T=D(N,S);T&&T[I]&&(N[S]=v.value,v={configurable:O in v?v[O]:T[O],enumerable:Y in v?v[Y]:T[Y],writable:!1})}return _(N,S,v)}:_:function(N,S,v){if(p(N),S=f(S),p(v),u)try{return _(N,S,v)}catch{}if("get"in v||"set"in v)throw new j("Accessors not supported");return"value"in v&&(N[S]=v.value),N}},9444:function(o,x,a){var s=a(3476),u=a(8448),c=a(8912),p=a(9728),f=a(4096),j=a(88),_=a(5152),D=a(9888),Y=Object.getOwnPropertyDescriptor;x.f=s?Y:function(O,I){if(O=f(O),I=j(I),D)try{return Y(O,I)}catch{}if(_(O,I))return p(!u(c.f,O,I),O[I])}},5048:function(o,x,a){var s=a(9008),u=a(8256).concat("length","prototype");x.f=Object.getOwnPropertyNames||function(c){return s(c,u)}},9392:function(o,x){x.f=Object.getOwnPropertySymbols},7796:function(o,x,a){var s=a(5152),u=a(4328),c=a(4356),p=a(6504),f=a(2272),j=p("IE_PROTO"),_=Object,D=_.prototype;o.exports=f?_.getPrototypeOf:function(Y){var O=c(Y);if(s(O,j))return O[j];var I=O.constructor;return u(I)&&O instanceof I?I.prototype:O instanceof _?D:null}},7e3:function(o,x,a){var s=a(1664);o.exports=s({}.isPrototypeOf)},9008:function(o,x,a){var s=a(1664),u=a(5152),c=a(4096),p=a(2504).indexOf,f=a(2560),j=s([].push);o.exports=function(_,D){var Y,O=c(_),I=0,N=[];for(Y in O)!u(f,Y)&&u(O,Y)&&j(N,Y);for(;D.length>I;)u(O,Y=D[I++])&&(~p(N,Y)||j(N,Y));return N}},1531:function(o,x,a){var s=a(9008),u=a(8256);o.exports=Object.keys||function(c){return s(c,u)}},8912:function(o,x){var a={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,u=s&&!a.call({1:2},1);x.f=u?function(c){var p=s(this,c);return!!p&&p.enumerable}:a},4024:function(o,x,a){var s=a(5288),u=a(3951),c=a(2096);o.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var p,f=!1,j={};try{(p=s(Object.prototype,"__proto__","set"))(j,[]),f=j instanceof Array}catch{}return function(_,D){return u(_),c(D),f?p(_,D):_.__proto__=D,_}})():void 0)},7032:function(o,x,a){var s=a(16),u=a(4427);o.exports=s?{}.toString:function(){return"[object "+u(this)+"]"}},2104:function(o,x,a){var s=a(8448),u=a(4328),c=a(1632),p=TypeError;o.exports=function(f,j){var _,D;if(j==="string"&&u(_=f.toString)&&!c(D=s(_,f))||u(_=f.valueOf)&&!c(D=s(_,f))||j!=="string"&&u(_=f.toString)&&!c(D=s(_,f)))return D;throw new p("Can't convert object to primitive value")}},9252:function(o,x,a){var s=a(5232),u=a(1664),c=a(5048),p=a(9392),f=a(3951),j=u([].concat);o.exports=s("Reflect","ownKeys")||function(_){var D=c.f(f(_)),Y=p.f;return Y?j(D,Y(_)):D}},584:function(o,x,a){var s=a(8352).f;o.exports=function(u,c,p){p in u||s(u,p,{configurable:!0,get:function(){return c[p]},set:function(f){c[p]=f}})}},9092:function(o,x,a){var s=a(8448),u=a(3951),c=a(4328),p=a(1888),f=a(7680),j=TypeError;o.exports=function(_,D){var Y=_.exec;if(c(Y)){var O=s(Y,_,D);return O!==null&&u(O),O}if(p(_)==="RegExp")return s(f,_,D);throw new j("RegExp#exec called on incompatible receiver")}},7680:function(o,x,a){var s,u,c=a(8448),p=a(1664),f=a(5016),j=a(8872),_=a(3548),D=a(4696),Y=a(9368),O=a(9104).get,I=a(8e3),N=a(9124),S=D("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,T=v,L=p("".charAt),m=p("".indexOf),P=p("".replace),B=p("".slice),R=(u=/b*/g,c(v,s=/a/,"a"),c(v,u,"a"),s.lastIndex!==0||u.lastIndex!==0),A=_.BROKEN_CARET,H=/()??/.exec("")[1]!==void 0;(R||H||A||I||N)&&(T=function(J){var ne,ee,he,Z,ue,ie,ye,ce=this,Q=O(ce),ve=f(J),Ne=Q.raw;if(Ne)return Ne.lastIndex=ce.lastIndex,ne=c(T,Ne,ve),ce.lastIndex=Ne.lastIndex,ne;var _e=Q.groups,Ce=A&&ce.sticky,Re=c(j,ce),ze=ce.source,C=0,b=ve;if(Ce&&(Re=P(Re,"y",""),m(Re,"g")===-1&&(Re+="g"),b=B(ve,ce.lastIndex),ce.lastIndex>0&&(!ce.multiline||ce.multiline&&L(ve,ce.lastIndex-1)!==`
|
|
105
|
-
`)&&(ze="(?: "+ze+")",b=" "+b,C++),ee=new RegExp("^(?:"+ze+")",Re)),H&&(ee=new RegExp("^"+ze+"$(?!\\s)",Re)),R&&(he=ce.lastIndex),Z=c(v,Ce?ee:ce,b),Ce?Z?(Z.input=B(Z.input,C),Z[0]=B(Z[0],C),Z.index=ce.lastIndex,ce.lastIndex+=Z[0].length):ce.lastIndex=0:R&&Z&&(ce.lastIndex=ce.global?Z.index+Z[0].length:he),H&&Z&&Z.length>1&&c(S,Z[0],ee,(function(){for(ue=1;ue<arguments.length-2;ue++)arguments[ue]===void 0&&(Z[ue]=void 0)})),Z&&_e)for(Z.groups=
|
|
106
|
-
`)&&c.flags==="s")}))},9124:function(o,x,a){var s=a(9957),u=a(6420).RegExp;o.exports=s((function(){var c=u("(?<a>b)","g");return c.exec("b").groups.a!=="b"||"b".replace(c,"$<a>c")!=="bc"}))},5436:function(o,x,a){var s=a(9760),u=TypeError;o.exports=function(c){if(s(c))throw new u("Can't call method on "+c);return c}},6504:function(o,x,a){var s=a(4696),u=a(7776),c=s("keys");o.exports=function(p){return c[p]||(c[p]=u(p))}},3976:function(o,x,a){var s=a(7048),u=a(6420),c=a(4636),p="__core-js_shared__",f=o.exports=u[p]||c(p,{});(f.versions||(f.versions=[])).push({version:"3.36.0",mode:s?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.36.0/LICENSE",source:"https://github.com/zloirock/core-js"})},4696:function(o,x,a){var s=a(3976);o.exports=function(u,c){return s[u]||(s[u]=c||{})}},9764:function(o,x,a){var s=a(1664),u=a(6180),c=a(5016),p=a(5436),f=s("".charAt),j=s("".charCodeAt),_=s("".slice),D=function(Y){return function(O,I){var N,S,v=c(p(O)),T=u(I),L=v.length;return T<0||T>=L?Y?"":void 0:(N=j(v,T))<55296||N>56319||T+1===L||(S=j(v,T+1))<56320||S>57343?Y?f(v,T):N:Y?_(v,T,T+2):S-56320+(N-55296<<10)+65536}};o.exports={codeAt:D(!1),charAt:D(!0)}},772:function(o,x,a){var s=a(8504),u=a(9957),c=a(6420).String;o.exports=!!Object.getOwnPropertySymbols&&!u((function(){var p=Symbol("symbol detection");return!c(p)||!(Object(p)instanceof Symbol)||!Symbol.sham&&s&&s<41}))},2495:function(o,x,a){var s=a(6180),u=Math.max,c=Math.min;o.exports=function(p,f){var j=s(p);return j<0?u(j+f,0):c(j,f)}},4096:function(o,x,a){var s=a(5712),u=a(5436);o.exports=function(c){return s(u(c))}},6180:function(o,x,a){var s=a(1748);o.exports=function(u){var c=+u;return c!=c||c===0?0:s(c)}},7584:function(o,x,a){var s=a(6180),u=Math.min;o.exports=function(c){var p=s(c);return p>0?u(p,9007199254740991):0}},4356:function(o,x,a){var s=a(5436),u=Object;o.exports=function(c){return u(s(c))}},7024:function(o,x,a){var s=a(8448),u=a(1632),c=a(7728),p=a(4504),f=a(2104),j=a(9972),_=TypeError,D=j("toPrimitive");o.exports=function(Y,O){if(!u(Y)||c(Y))return Y;var I,N=p(Y,D);if(N){if(O===void 0&&(O="default"),I=s(N,Y,O),!u(I)||c(I))return I;throw new _("Can't convert object to primitive value")}return O===void 0&&(O="number"),f(Y,O)}},88:function(o,x,a){var s=a(7024),u=a(7728);o.exports=function(c){var p=s(c,"string");return u(p)?p:p+""}},16:function(o,x,a){var s={};s[a(9972)("toStringTag")]="z",o.exports=String(s)==="[object z]"},5016:function(o,x,a){var s=a(4427),u=String;o.exports=function(c){if(s(c)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return u(c)}},36:function(o){var x=String;o.exports=function(a){try{return x(a)}catch{return"Object"}}},7776:function(o,x,a){var s=a(1664),u=0,c=Math.random(),p=s(1 .toString);o.exports=function(f){return"Symbol("+(f===void 0?"":f)+")_"+p(++u+c,36)}},6536:function(o,x,a){var s=a(772);o.exports=s&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},1576:function(o,x,a){var s=a(3476),u=a(9957);o.exports=s&&u((function(){return Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype!==42}))},4288:function(o,x,a){var s=a(6420),u=a(4328),c=s.WeakMap;o.exports=u(c)&&/native code/.test(String(c))},9972:function(o,x,a){var s=a(6420),u=a(4696),c=a(5152),p=a(7776),f=a(772),j=a(6536),_=s.Symbol,D=u("wks"),Y=j?_.for||_:_&&_.withoutSetter||p;o.exports=function(O){return c(D,O)||(D[O]=f&&c(_,O)?_[O]:Y("Symbol."+O)),D[O]}},6488:function(o,x,a){var s=a(5232),u=a(5152),c=a(3440),p=a(7e3),f=a(4024),j=a(9968),_=a(584),D=a(7512),Y=a(8948),O=a(3480),I=a(3696),N=a(3476),S=a(7048);o.exports=function(v,T,L,m){var P="stackTraceLimit",B=m?2:1,R=v.split("."),A=R[R.length-1],H=s.apply(null,R);if(H){var J=H.prototype;if(!S&&u(J,"cause")&&delete J.cause,!L)return H;var ne=s("Error"),ee=T((function(he,Z){var ue=Y(m?Z:he,void 0),ie=m?new H(he):new H;return ue!==void 0&&c(ie,"message",ue),I(ie,ee,ie.stack,2),this&&p(J,this)&&D(ie,this,ee),arguments.length>B&&O(ie,arguments[B]),ie}));if(ee.prototype=J,A!=="Error"?f?f(ee,ne):j(ee,ne,{name:!0}):N&&P in H&&(_(ee,H,P),_(ee,H,"prepareStackTrace")),j(ee,H),!S)try{J.name!==A&&c(J,"name",A),J.constructor=ee}catch{}return ee}}},7476:function(o,x,a){var s=a(9160),u=a(9957),c=a(1432),p=a(1632),f=a(4356),j=a(3556),_=a(4316),D=a(92),Y=a(2568),O=a(953),I=a(9972),N=a(8504),S=I("isConcatSpreadable"),v=N>=51||!u((function(){var L=[];return L[S]=!1,L.concat()[0]!==L})),T=function(L){if(!p(L))return!1;var m=L[S];return m!==void 0?!!m:c(L)};s({target:"Array",proto:!0,arity:1,forced:!v||!O("concat")},{concat:function(L){var m,P,B,R,A,H=f(this),J=Y(H,0),ne=0;for(m=-1,B=arguments.length;m<B;m++)if(T(A=m===-1?H:arguments[m]))for(R=j(A),_(ne+R),P=0;P<R;P++,ne++)P in A&&D(J,ne,A[P]);else _(ne+1),D(J,ne++,A);return J.length=ne,J}})},6932:function(o,x,a){var s=a(9160),u=a(3364).filter;s({target:"Array",proto:!0,forced:!a(953)("filter")},{filter:function(c){return u(this,c,arguments.length>1?arguments[1]:void 0)}})},700:function(o,x,a){var s=a(9160),u=a(1664),c=a(5712),p=a(4096),f=a(1496),j=u([].join);s({target:"Array",proto:!0,forced:c!==Object||!f("join",",")},{join:function(_){return j(p(this),_===void 0?",":_)}})},4456:function(o,x,a){var s=a(9160),u=a(3364).map;s({target:"Array",proto:!0,forced:!a(953)("map")},{map:function(c){return u(this,c,arguments.length>1?arguments[1]:void 0)}})},4728:function(o,x,a){var s=a(9160),u=a(4356),c=a(3556),p=a(6728),f=a(4316);s({target:"Array",proto:!0,arity:1,forced:a(9957)((function(){return[].push.call({length:4294967296},1)!==4294967297}))||!(function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(j){return j instanceof TypeError}})()},{push:function(j){var _=u(this),D=c(_),Y=arguments.length;f(D+Y);for(var O=0;O<Y;O++)_[D]=arguments[O],D++;return p(_,D),D}})},8752:function(o,x,a){var s=a(9160),u=a(6420),c=a(908),p=a(6488),f="WebAssembly",j=u[f],_=new Error("e",{cause:7}).cause!==7,D=function(O,I){var N={};N[O]=p(O,I,_),s({global:!0,constructor:!0,arity:1,forced:_},N)},Y=function(O,I){if(j&&j[O]){var N={};N[O]=p(f+"."+O,I,_),s({target:f,stat:!0,constructor:!0,arity:1,forced:_},N)}};D("Error",(function(O){return function(I){return c(O,this,arguments)}})),D("EvalError",(function(O){return function(I){return c(O,this,arguments)}})),D("RangeError",(function(O){return function(I){return c(O,this,arguments)}})),D("ReferenceError",(function(O){return function(I){return c(O,this,arguments)}})),D("SyntaxError",(function(O){return function(I){return c(O,this,arguments)}})),D("TypeError",(function(O){return function(I){return c(O,this,arguments)}})),D("URIError",(function(O){return function(I){return c(O,this,arguments)}})),Y("CompileError",(function(O){return function(I){return c(O,this,arguments)}})),Y("LinkError",(function(O){return function(I){return c(O,this,arguments)}})),Y("RuntimeError",(function(O){return function(I){return c(O,this,arguments)}}))},508:function(o,x,a){var s=a(3476),u=a(6208).EXISTS,c=a(1664),p=a(2544),f=Function.prototype,j=c(f.toString),_=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,D=c(_.exec);s&&!u&&p(f,"name",{configurable:!0,get:function(){try{return D(_,j(this))[1]}catch{return""}}})},232:function(o,x,a){var s=a(9160),u=a(9292);s({target:"Object",stat:!0,arity:2,forced:Object.assign!==u},{assign:u})},5443:function(o,x,a){var s=a(16),u=a(6076),c=a(7032);s||u(Object.prototype,"toString",c,{unsafe:!0})},880:function(o,x,a){var s=a(9160),u=a(7680);s({target:"RegExp",proto:!0,forced:/./.exec!==u},{exec:u})},9836:function(o,x,a){var s=a(8448),u=a(7176),c=a(3951),p=a(9760),f=a(7584),j=a(5016),_=a(5436),D=a(4504),Y=a(4764),O=a(9092);u("match",(function(I,N,S){return[function(v){var T=_(this),L=p(v)?void 0:D(v,I);return L?s(L,v,T):new RegExp(v)[I](j(T))},function(v){var T=c(this),L=j(v),m=S(N,T,L);if(m.done)return m.value;if(!T.global)return O(T,L);var P=T.unicode;T.lastIndex=0;for(var B,R=[],A=0;(B=O(T,L))!==null;){var H=j(B[0]);R[A]=H,H===""&&(T.lastIndex=Y(L,f(T.lastIndex),P)),A++}return A===0?null:R}]}))},3536:function(o,x,a){var s=a(9160),u=a(6420),c=a(6100),p=a(3951),f=a(4328),j=a(7796),_=a(2544),D=a(92),Y=a(9957),O=a(5152),I=a(9972),N=a(336).IteratorPrototype,S=a(3476),v=a(7048),T="constructor",L="Iterator",m=I("toStringTag"),P=TypeError,B=u[L],R=v||!f(B)||B.prototype!==N||!Y((function(){B({})})),A=function(){if(c(this,N),j(this)===N)throw new P("Abstract class Iterator not directly constructable")},H=function(J,ne){S?_(N,J,{configurable:!0,get:function(){return ne},set:function(ee){if(p(this),this===N)throw new P("You can't redefine this property");O(this,J)?this[J]=ee:D(this,J,ee)}}):N[J]=ne};O(N,m)||H(m,L),!R&&O(N,T)&&N[T]!==Object||H(T,A),A.prototype=N,s({global:!0,constructor:!0,forced:R},{Iterator:A})},2144:function(o,x,a){var s=a(9160),u=a(8448),c=a(8952),p=a(3951),f=a(6752),j=a(9724),_=a(8696),D=a(7048),Y=j((function(){for(var O,I,N=this.iterator,S=this.predicate,v=this.next;;){if(O=p(u(v,N)),this.done=!!O.done)return;if(I=O.value,_(N,S,[I,this.counter++],!0))return I}}));s({target:"Iterator",proto:!0,real:!0,forced:D},{filter:function(O){return p(this),c(O),new Y(f(this),{predicate:O})}})},9080:function(o,x,a){var s=a(9160),u=a(5792);s({target:"Iterator",proto:!0,real:!0,forced:a(7048)},{map:u})}},z={};function $(o){var x=z[o];if(x!==void 0)return x.exports;var a=z[o]={exports:{}};return d[o].call(a.exports,a,a.exports,$),a.exports}$.d=function(o,x){for(var a in x)$.o(x,a)&&!$.o(o,a)&&Object.defineProperty(o,a,{enumerable:!0,get:x[a]})},$.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),$.o=function(o,x){return Object.prototype.hasOwnProperty.call(o,x)},$.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})};var X={};return(function(){$.r(X),$.d(X,{default:function(){return _}}),$(8752),$(6932),$(700),$(4456),$(4728),$(508),$(232),$(5443),$(880),$(9836),$(3536),$(2144),$(9080);var o=$(680);$(7476);function x(D,Y){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(O,I){return O.__proto__=I,O},x(D,Y)}var a=(function(D){var Y,O;function I(){for(var S,v=arguments.length,T=new Array(v),L=0;L<v;L++)T[L]=arguments[L];return(S=D.call.apply(D,[this].concat(T))||this).state={bump:!1,debounced:!1},S}O=D,(Y=I).prototype=Object.create(O.prototype),Y.prototype.constructor=Y,x(Y,O);var N=I.prototype;return N.componentWillMount=function(){var S,v,T,L=this;this.debounceStatusUpdate=(S=function(){if(!L.state.debounced){var m=!L.props.isInFocus||L.props.validChoiceMade;L.setState((function(P){return{bump:!P.bump,debounced:!0,silenced:m}}))}},v=1400,function(){var m=this,P=arguments;clearTimeout(T),T=setTimeout((function(){T=null,S.apply(m,P)}),v)})},N.componentWillReceiveProps=function(S){S.queryLength,this.setState({debounced:!1})},N.render=function(){var S=this.props,v=S.id,T=S.length,L=S.queryLength,m=S.minQueryLength,P=S.selectedOption,B=S.selectedOptionIndex,R=S.tQueryTooShort,A=S.tNoResults,H=S.tSelectedOption,J=S.tResults,ne=S.className,ee=this.state,he=ee.bump,Z=ee.debounced,ue=ee.silenced,ie=L<m,ye=T===0,ce=P?H(P,T,B):"",Q=null;return Q=ie?R(m):ye?A():J(T,ce),this.debounceStatusUpdate(),(0,o.createElement)("div",{className:ne,style:{border:"0",clip:"rect(0 0 0 0)",height:"1px",marginBottom:"-1px",marginRight:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}},(0,o.createElement)("div",{id:v+"__status--A",role:"status","aria-atomic":"true","aria-live":"polite"},!ue&&Z&&he?Q:""),(0,o.createElement)("div",{id:v+"__status--B",role:"status","aria-atomic":"true","aria-live":"polite"},ue||!Z||he?"":Q))},I})(o.Component);a.defaultProps={tQueryTooShort:function(D){return"Type in "+D+" or more characters for results"},tNoResults:function(){return"No search results"},tSelectedOption:function(D,Y,O){return D+" "+(O+1)+" of "+Y+" is highlighted"},tResults:function(D,Y){return D+" "+(D===1?"result":"results")+" "+(D===1?"is":"are")+" available. "+Y}};var s=function(D){var Y=D.className;return(0,o.createElement)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:Y,focusable:"false"},(0,o.createElement)("g",{stroke:"none",fill:"none","fill-rule":"evenodd"},(0,o.createElement)("polygon",{fill:"#000000",points:"0 0 22 0 11 17"})))};function u(){return u=Object.assign?Object.assign.bind():function(D){for(var Y=1;Y<arguments.length;Y++){var O=arguments[Y];for(var I in O)Object.prototype.hasOwnProperty.call(O,I)&&(D[I]=O[I])}return D},u.apply(this,arguments)}function c(D){if(D===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return D}function p(D,Y){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(O,I){return O.__proto__=I,O},p(D,Y)}var f={13:"enter",27:"escape",32:"space",38:"up",40:"down"};function j(){return typeof navigator<"u"&&!(!navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||!navigator.userAgent.match(/AppleWebKit/g))}var _=(function(D){var Y,O;function I(S){var v;return(v=D.call(this,S)||this).elementReferences={},v.state={focused:null,hovered:null,menuOpen:!1,options:S.defaultValue?[S.defaultValue]:[],query:S.defaultValue,validChoiceMade:!1,selected:null,ariaHint:!0},v.handleComponentBlur=v.handleComponentBlur.bind(c(v)),v.handleKeyDown=v.handleKeyDown.bind(c(v)),v.handleUpArrow=v.handleUpArrow.bind(c(v)),v.handleDownArrow=v.handleDownArrow.bind(c(v)),v.handleEnter=v.handleEnter.bind(c(v)),v.handlePrintableKey=v.handlePrintableKey.bind(c(v)),v.handleListMouseLeave=v.handleListMouseLeave.bind(c(v)),v.handleOptionBlur=v.handleOptionBlur.bind(c(v)),v.handleOptionClick=v.handleOptionClick.bind(c(v)),v.handleOptionFocus=v.handleOptionFocus.bind(c(v)),v.handleOptionMouseDown=v.handleOptionMouseDown.bind(c(v)),v.handleOptionMouseEnter=v.handleOptionMouseEnter.bind(c(v)),v.handleInputBlur=v.handleInputBlur.bind(c(v)),v.handleInputChange=v.handleInputChange.bind(c(v)),v.handleInputClick=v.handleInputClick.bind(c(v)),v.handleInputFocus=v.handleInputFocus.bind(c(v)),v.pollInputElement=v.pollInputElement.bind(c(v)),v.getDirectInputChanges=v.getDirectInputChanges.bind(c(v)),v}O=D,(Y=I).prototype=Object.create(O.prototype),Y.prototype.constructor=Y,p(Y,O);var N=I.prototype;return N.isQueryAnOption=function(S,v){var T=this;return v.map((function(L){return T.templateInputValue(L).toLowerCase()})).indexOf(S.toLowerCase())!==-1},N.componentDidMount=function(){this.pollInputElement()},N.componentWillUnmount=function(){clearTimeout(this.$pollInput)},N.pollInputElement=function(){var S=this;this.getDirectInputChanges(),this.$pollInput=setTimeout((function(){S.pollInputElement()}),100)},N.getDirectInputChanges=function(){var S=this.elementReferences[-1];S&&S.value!==this.state.query&&this.handleInputChange({target:{value:S.value}})},N.componentDidUpdate=function(S,v){var T=this.state.focused,L=T===null,m=v.focused!==T;m&&!L&&this.elementReferences[T].focus();var P=T===-1,B=m&&v.focused===null;if(P&&B){var R=this.elementReferences[T];R.setSelectionRange(0,R.value.length)}},N.hasAutoselect=function(){return!j()&&this.props.autoselect},N.templateInputValue=function(S){var v=this.props.templates&&this.props.templates.inputValue;return v?v(S):S},N.templateSuggestion=function(S){var v=this.props.templates&&this.props.templates.suggestion;return v?v(S):S},N.handleComponentBlur=function(S){var v,T=this.state,L=T.options,m=T.query,P=T.selected;this.props.confirmOnBlur?(v=S.query||m,this.props.onConfirm(L[P])):v=m,this.setState({focused:null,menuOpen:S.menuOpen||!1,query:v,selected:null,validChoiceMade:this.isQueryAnOption(v,L)})},N.handleListMouseLeave=function(S){this.setState({hovered:null})},N.handleOptionBlur=function(S,v){var T=this.state,L=T.focused,m=T.menuOpen,P=T.options,B=T.selected,R=S.relatedTarget===null,A=S.relatedTarget===this.elementReferences[-1],H=L!==v&&L!==-1;if(!H&&R||!(H||A)){var J=m&&j();this.handleComponentBlur({menuOpen:J,query:this.templateInputValue(P[B])})}},N.handleInputBlur=function(S){var v=this.state,T=v.focused,L=v.menuOpen,m=v.options,P=v.query,B=v.selected;if(T===-1){var R=L&&j(),A=j()?P:this.templateInputValue(m[B]);this.handleComponentBlur({menuOpen:R,query:A})}},N.handleInputChange=function(S){var v=this,T=this.props,L=T.minLength,m=T.source,P=T.showAllValues,B=this.hasAutoselect(),R=S.target.value,A=R.length===0,H=this.state.query!==R,J=R.length>=L;this.setState({query:R,ariaHint:A}),P||!A&&H&&J?m(R,(function(ne){var ee=ne.length>0;v.setState({menuOpen:ee,options:ne,selected:B&&ee?0:-1,validChoiceMade:!1})})):!A&&J||this.setState({menuOpen:!1,options:[]})},N.handleInputClick=function(S){this.handleInputChange(S)},N.handleInputFocus=function(S){var v=this.state,T=v.query,L=v.validChoiceMade,m=v.options,P=this.props.minLength,B=!L&&T.length>=P&&m.length>0;B?this.setState((function(R){var A=R.menuOpen;return{focused:-1,menuOpen:B||A,selected:-1}})):this.setState({focused:-1})},N.handleOptionFocus=function(S){this.setState({focused:S,hovered:null,selected:S})},N.handleOptionMouseEnter=function(S,v){j()||this.setState({hovered:v})},N.handleOptionClick=function(S,v){var T=this.state.options[v],L=this.templateInputValue(T);this.props.onConfirm(T),this.setState({focused:-1,hovered:null,menuOpen:!1,query:L,selected:-1,validChoiceMade:!0}),this.forceUpdate()},N.handleOptionMouseDown=function(S){S.preventDefault()},N.handleUpArrow=function(S){S.preventDefault();var v=this.state,T=v.menuOpen,L=v.selected;L!==-1&&T&&this.handleOptionFocus(L-1)},N.handleDownArrow=function(S){var v=this;if(S.preventDefault(),this.props.showAllValues&&this.state.menuOpen===!1)S.preventDefault(),this.props.source("",(function(B){v.setState({menuOpen:!0,options:B,selected:0,focused:0,hovered:null})}));else if(this.state.menuOpen===!0){var T=this.state,L=T.menuOpen,m=T.options,P=T.selected;P!==m.length-1&&L&&this.handleOptionFocus(P+1)}},N.handleSpace=function(S){var v=this;this.props.showAllValues&&this.state.menuOpen===!1&&this.state.query===""&&(S.preventDefault(),this.props.source("",(function(T){v.setState({menuOpen:!0,options:T})}))),this.state.focused!==-1&&(S.preventDefault(),this.handleOptionClick(S,this.state.focused))},N.handleEnter=function(S){this.state.menuOpen&&(S.preventDefault(),this.state.selected>=0&&this.handleOptionClick(S,this.state.selected))},N.handlePrintableKey=function(S){var v=this.elementReferences[-1];S.target===v||v.focus()},N.handleKeyDown=function(S){switch(f[S.keyCode]){case"up":this.handleUpArrow(S);break;case"down":this.handleDownArrow(S);break;case"space":this.handleSpace(S);break;case"enter":this.handleEnter(S);break;case"escape":this.handleComponentBlur({query:this.state.query});break;default:((v=S.keyCode)>47&&v<58||v===32||v===8||v>64&&v<91||v>95&&v<112||v>185&&v<193||v>218&&v<223)&&this.handlePrintableKey(S)}var v},N.render=function(){var S,v=this,T=this.props,L=T.cssNamespace,m=T.displayMenu,P=T.id,B=T.minLength,R=T.name,A=T.placeholder,H=T.required,J=T.showAllValues,ne=T.tNoResults,ee=T.tStatusQueryTooShort,he=T.tStatusNoResults,Z=T.tStatusSelectedOption,ue=T.tStatusResults,ie=T.tAssistiveHint,ye=T.dropdownArrow,ce=T.menuAttributes,Q=T.inputClasses,ve=T.hintClasses,Ne=T.menuClasses,_e=this.state,Ce=_e.focused,Re=_e.hovered,ze=_e.menuOpen,C=_e.options,b=_e.query,V=_e.selected,k=_e.ariaHint,E=_e.validChoiceMade,F=this.hasAutoselect(),te=Ce===-1,se=C.length===0,be=b.length!==0,de=b.length>=B,me=this.props.showNoOptionsFound&&te&&se&&be&&de,xe=L+"__wrapper",Ae=L+"__status",$e=L+"__dropdown-arrow-down",Ie=Ce!==-1&&Ce!==null,Ge=L+"__option",Qe=L+"__hint",ge=this.templateInputValue(C[V]),we=ge&&ge.toLowerCase().indexOf(b.toLowerCase())===0&&F?b+ge.substr(b.length):"",Ze=P+"__assistiveHint",tt={"aria-describedby":k?Ze:null,"aria-expanded":ze?"true":"false","aria-activedescendant":Ie?P+"__option--"+Ce:null,"aria-controls":P+"__listbox","aria-autocomplete":this.hasAutoselect()?"both":"list"};J&&typeof(S=ye({className:$e}))=="string"&&(S=(0,o.createElement)("div",{className:L+"__dropdown-arrow-down-wrapper",dangerouslySetInnerHTML:{__html:S}}));var ht=L+"__input",vt=[ht,this.props.showAllValues?ht+"--show-all-values":ht+"--default"];Ce!==null&&vt.push(ht+"--focused"),Q&&vt.push(Q);var pt=L+"__menu",lt=[pt,pt+"--"+m,pt+"--"+(ze||me?"visible":"hidden")];Ne&<.push(Ne),(ce!=null&&ce.class||ce!=null&&ce.className)&<.push((ce==null?void 0:ce.class)||(ce==null?void 0:ce.className));var _t=Object.assign({"aria-labelledby":P},ce,{id:P+"__listbox",role:"listbox",className:lt.join(" "),onMouseLeave:this.handleListMouseLeave});return delete _t.class,(0,o.createElement)("div",{className:xe,onKeyDown:this.handleKeyDown},(0,o.createElement)(a,{id:P,length:C.length,queryLength:b.length,minQueryLength:B,selectedOption:this.templateInputValue(C[V]),selectedOptionIndex:V,validChoiceMade:E,isInFocus:this.state.focused!==null,tQueryTooShort:ee,tNoResults:he,tSelectedOption:Z,tResults:ue,className:Ae}),we&&(0,o.createElement)("span",null,(0,o.createElement)("input",{className:[Qe,ve===null?Q:ve].filter(Boolean).join(" "),readonly:!0,tabIndex:"-1",value:we})),(0,o.createElement)("input",u({},tt,{autoComplete:"off",className:vt.join(" "),id:P,onClick:this.handleInputClick,onBlur:this.handleInputBlur},{onChange:this.handleInputChange},{onFocus:this.handleInputFocus,name:R,placeholder:A,ref:function(bt){v.elementReferences[-1]=bt},type:"text",role:"combobox",required:H,value:b})),S,(0,o.createElement)("ul",_t,C.map((function(bt,Ue){var gt=(Ce===-1?V===Ue:Ce===Ue)&&Re===null?" "+Ge+"--focused":"",ft=Ue%2?" "+Ge+"--odd":"",ut=j()?"<span id="+P+"__option-suffix--"+Ue+' style="border:0;clip:rect(0 0 0 0);height:1px;marginBottom:-1px;marginRight:-1px;overflow:hidden;padding:0;position:absolute;whiteSpace:nowrap;width:1px"> '+(Ue+1)+" of "+C.length+"</span>":"";return(0,o.createElement)("li",{"aria-selected":Ce===Ue?"true":"false",className:""+Ge+gt+ft,dangerouslySetInnerHTML:{__html:v.templateSuggestion(bt)+ut},id:P+"__option--"+Ue,key:Ue,onBlur:function(it){return v.handleOptionBlur(it,Ue)},onClick:function(it){return v.handleOptionClick(it,Ue)},onMouseDown:v.handleOptionMouseDown,onMouseEnter:function(it){return v.handleOptionMouseEnter(it,Ue)},ref:function(it){v.elementReferences[Ue]=it},role:"option",tabIndex:"-1","aria-posinset":Ue+1,"aria-setsize":C.length})})),me&&(0,o.createElement)("li",{className:Ge+" "+Ge+"--no-results",role:"option","aria-disabled":"true"},ne())),(0,o.createElement)("span",{id:Ze,style:{display:"none"}},ie()))},I})(o.Component);_.defaultProps={autoselect:!1,cssNamespace:"autocomplete",defaultValue:"",displayMenu:"inline",minLength:0,name:"input-autocomplete",placeholder:"",onConfirm:function(){},confirmOnBlur:!0,showNoOptionsFound:!0,showAllValues:!1,required:!1,tNoResults:function(){return"No results found"},tAssistiveHint:function(){return"When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures."},dropdownArrow:s,menuAttributes:{},inputClasses:null,hintClasses:null,menuClasses:null}})(),X})()}))})(ya)),ya.exports}var rr,bn;function Tc(){return bn||(bn=1,rr=jc()),rr}var Cc=Tc();const Nc=ol(Cc),Pc=({value:y,defaultValue:i="",onConfirm:g,source:d,disabled:z,onClear:$,tClearInput:X=()=>"Clear input",...o})=>{const x=q.useRef(null),a=p=>{setTimeout(()=>{x.current&&(x.current.elementReferences[-1].value=p)},0)};q.useEffect(()=>{y!==void 0&&a(y)},[y]),q.useEffect(()=>{z?x.current&&(x.current.elementReferences[-1].disabled=!0):x.current&&(x.current.elementReferences[-1].disabled=!1)},[z]);const s=()=>{$&&$()},u=(p,f)=>{x.current.elementReferences[-1].classList.contains("autocomplete__input--focused")&&d(p,f)},c=p=>{p?g(p):a(y)};return h.jsxs("div",{style:{position:"relative",width:"100%"},children:[h.jsx(Nc,{ref:x,...o,defaultValue:i,onConfirm:c,source:u}),!!(y&&y.length>0&&!z)&&h.jsx("button",{onClick:s,style:{position:"absolute",right:"0px",top:"50%",transform:"translateY(-50%)",background:"transparent",border:"none",cursor:"pointer",padding:0},"aria-label":X(),children:h.jsx(le.Icon,{icon:"it-close",size:"sm",title:X()})})]})},Ec="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==",Ac="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=",Rc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",Ic=({position:y,areasLayer:i,bounds:g,onMarkedMoved:d})=>{const z=q.useRef(null);let $=null;const[X,o]=q.useState([]),x=Rt.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'}),a=[41.9,12.5],s=()=>{const u=Rt.map(z.current,{keyboard:!1,minZoom:6,maxZoom:17}).setView(a,10);x.addTo(u),i&&i.map(p=>{p.addTo(u)});const c=y?[`${y.lat}`,`${y.lon}`]:g?g.getCenter():a;if(delete Rt.Icon.Default.prototype._getIconUrl,Rt.Icon.Default.mergeOptions({iconRetinaUrl:Ec,iconUrl:Ac,shadowUrl:Rc}),$=Rt.marker(c,{draggable:!0}).addTo(u),$.on("moveend",function(p){const f=p.target.getLatLng();d(f,$)}),!y&&g)u.fitBounds(g);else{const p=y?[y.lat,y.lon]:a;$&&($.setLatLng(p).update(),u.setView(p,15))}};return q.useEffect(()=>{z.current&&s()},[z]),h.jsx("div",{className:"d-block",style:{height:"60vh",width:"100%",display:"block"},children:h.jsx("div",{ref:z,style:{height:"100%",width:"100%"},"aria-hidden":!0})})},Fc=({component:y,value:i,current:g,onChange:d,i18next:z})=>{const[$,X]=q.useState(null),[o,x]=q.useState([]),[a,s]=q.useState(),[u,c]=q.useState(),[p,f]=q.useState(!1),[j,_]=q.useState(),[D,Y]=q.useState(!1),[O,I]=q.useState(),[N,S]=q.useState(),[v,T]=q.useState(!1),[L,m]=q.useState(""),[P,B]=q.useState(""),[R,A]=q.useState(!1),[H,J]=q.useState(!1),ee=new URLSearchParams(window.location.search).get("area"),{geographic_areas_id:he}=window.OC_SERVICE_DETAILS,Z=q.useRef(),ue=z.language;let ie=Rt.latLngBounds();const ye=ee||(he&&he.length>0?he:void 0),ce=(C,b)=>{Z.current=C;const V=`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(C)}&countrycodes=it&viewbox=${a}&bounded=1&addressdetails=1&limit=14&format=jsonv2&accept-language=${ue}`;let k=[],E=[];Y(!0),fetch(V).then(F=>F.json()).then(F=>{if(F.length&&Z.current===C){Y(!0);const te=F.map((se,be)=>{const{lat:de,lon:me}=se,xe=`${Fe()}/api/geographic-areas/contains?lat=${de}&lon=${me}&geographic_areas_ids=${j.join(",")}`;return fetch(xe).then(Ae=>Ae.json()).then(Ae=>Ae.result?(se.label=Za(se),se):null)});return Promise.all(te)}else Z.current===C&&(b([]),Y(!1))}).then(F=>{F=F?F.filter(te=>te!==null):[],F.length>0?(F.forEach((te,se)=>{F[se].label=Za(te)}),F=en.uniqWith(F,(te,se)=>te.label===se.label),F.forEach((te,se)=>{E.push(te.label),k.push(te)}),Z.current===C&&(b(E),x(k),Y(!1))):Z.current===C&&(b([]),Y(!1))}).catch(F=>{console.error("Error fetching locations:",F),Y(!1)})},Q=(C,b)=>{ce(C,b)},ve=(C,b)=>{const{lat:V,lng:k}=C,E=`https://nominatim.openstreetmap.org/reverse?format=jsonv2&lat=${V}&lon=${k}&accept-language=${ue}`;fetch(E).then(F=>F.json()).then(F=>{if(F&&F.display_name)if(F.label=Za(F),F.lat=V,F.lon=k,b)b.bindPopup(`${F.label}`).openPopup(),S(F);else{S(F);return}}).catch(F=>console.error("Error with reverse geocoding:",F))};function Ne(){navigator.geolocation.getCurrentPosition(C=>{let b=C.coords.latitude,V=C.coords.longitude;if((j||[]).length>0){const E=`${Fe()}/api/geographic-areas/contains?lat=${b}&lon=${V}&geographic_areas_ids=${j.join(",")}`;fetch(E).then(F=>F.json()).then(F=>{F.result&&(X({lat:b,lon:V}),ve({lat:b,lng:V})),J(!H)})}else X({lat:b,lon:V}),ve({lat:b,lng:V}),J(!H)},C=>{(C==null?void 0:C.code)===1?(A(!R),B(z.t("error_message_code_1"))):(C==null?void 0:C.code)===2?(A(!R),B(z.t("error_message_code_2"))):(C==null?void 0:C.code)===3?(A(!R),B(z.t("error_message_code_3"))):(A(!R),B(z.t("error_message_generic")))})}q.useEffect(()=>{i&&X(i),g.valuePosition&&X(g.valuePosition)},[i,g]);const _e=()=>{i&&X(i),g.valuePosition&&X(g.valuePosition)};q.useEffect(()=>{var C;(C=window==null?void 0:window.Formio)==null||C.formioReady.then(()=>{setTimeout(()=>{_e(),Ce()},1)})},[]);const Ce=()=>{let b=`${Fe()}/api/geographic-areas`,V=[],k=[];fetch(b).then(E=>E.json()).then(E=>{if(Array.isArray(E)&&E.length>0){E.filter(se=>ye?Array.isArray(ye)?ye.includes(se.id):se.id===ye:!0).forEach(se=>{V.push(se.id);const be=JSON.parse(se.geofence),de=Rt.geoJSON(be,{style:{color:"#3478bd",fillColor:"#87CEEB",fillOpacity:.2,weight:1.5},filter:function(me){return me.geometry.type==="Polygon"||me.geometry.type==="MultiPolygon"}});ie.extend(de.getBounds()),k.push(de)}),c(k),_(V),I(ie);const F=ie.getNorthEast(),te=ie.getSouthWest();s([F.lng,F.lat,te.lng,te.lat])}else console.log("No geographic_areas_ids found.")}).catch(E=>{console.error("Error with reverse geocoding:",E)})},Re=()=>{m($!=null&&$.label?$.label:"")};q.useEffect(()=>{Re(),d($)},[$]),q.useEffect(()=>{document.querySelector(".formio-read-only")&&v===!1?T(!0):T(!1)},[]);const ze=()=>{if(N){const C=`${Fe()}/api/geographic-areas/contains?lat=${N.lat}&lon=${N.lon}&geographic_areas_ids=${j.join(",")}`;f(!0),fetch(C).then(b=>b.json()).then(b=>{f(!1),b?b.result===!1?Je.fire({title:"",html:"<p>"+z.t("Attenzione: Il luogo selezionato si trova al di fuori dell’area coperta dal servizio. Per favore, scegli un luogo all'interno dell'area evidenziata nella mappa.")+"</p>",icon:"error",cancelButtonText:z.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}):b.result===!0&&(J(!H),X(N)):(f(!1),console.log("No geographic-areas/contains ."))}).catch(b=>{console.error("Error with geographic-areas/contains:",b),Je.fire({title:"",html:"<p>"+b+"</p>",icon:"error",cancelButtonText:z.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})}};return h.jsx("div",{children:h.jsxs("div",{id:`address-map-container-${y.key}`,className:"address-map-container",children:[h.jsx("div",{children:h.jsxs(le.Modal,{wrapClassName:"formio-component-address_map",isOpen:H,size:"lg",scrollable:!0,toggle:()=>J(!H),labelledBy:"esempio2",container:document.body,children:[h.jsx(le.ModalHeader,{toggle:()=>J(!H),id:"esempio2",children:z.t("Individua il luogo sulla mappa")}),h.jsxs(le.ModalBody,{children:[h.jsx("p",{children:h.jsx("small",{children:z.t("Trascina l’icona nel punto preciso in cui si verifica l’evento che vuoi segnalare e fai click su Salva indirizzo")})}),h.jsx(Ic,{position:$,areasLayer:u,bounds:O,onMarkedMoved:(C,b)=>{ve(C,b)}})]}),h.jsxs(le.ModalFooter,{children:[h.jsx(le.Button,{color:"secondary",onClick:()=>J(!H),children:z.t("Chiudi")}),h.jsx(le.Button,{color:"primary",onClick:()=>{ze()},disabled:!N||p,children:z.t("Salva indirizzo")})]})]})}),h.jsx("div",{children:h.jsxs(le.Modal,{isOpen:R,toggle:()=>A(!R),withIcon:!0,labelledBy:"error-modal-message",container:document.body,children:[h.jsx(le.ModalHeader,{icon:"it-info-circle",id:"error-modal-message",children:z.t("warning")}),h.jsx(le.ModalBody,{children:h.jsx("p",{children:P})}),h.jsx(le.ModalFooter,{children:h.jsx(le.Button,{color:"primary",onClick:()=>A(!R),children:z.t("close")})})]})}),h.jsxs("div",{className:"position-relative",children:[h.jsx(Pc,{id:`${y.id}-${y.key}`,inputClasses:"form-control",source:en.debounce(Q,520),onConfirm:C=>{if(Y(!1),Z.current="",C){C===""&&X(null);let b=o.find(V=>V.label===C);X(b)}},onClear:()=>{Y(!1),Z.current="",X(null)},dropdownArrow:()=>null,minLength:3,disabled:v,confirmOnBlur:!0,showNoOptionsFound:!D,defaultValue:$==null?void 0:$.label,value:L,tNoResults:()=>z.t("Nessun risultato trovato, prova a inserire l'indirizzo completo"),tClearInput:()=>z.t("Clear input")}),D&&h.jsx("div",{className:"position-absolute",style:{width:"100%",bottom:"0px"},children:h.jsx(le.Progress,{indeterminate:!0,label:"In elaborazione..."})})]}),!v&&h.jsxs(le.Button,{type:"button",value:z.t("Individua con precisione sulla mappa"),onClick:()=>{/Mobi|Android/i.test(navigator.userAgent)?Ne():(J(!0),S(!1))},icon:!0,className:"px-0 primary-color",children:[h.jsx(le.Icon,{color:"primary",icon:"it-map-marker-circle",role:"presentation"}),h.jsx("span",{children:z.t("Individua con precisione sulla mappa")})]})]})})},ja=class ja extends ot.ReactComponent{constructor(i,g,d){super(i,g,d)}static get builderInfo(){return{title:"Address Map",group:"basic",icon:"fa fa-map-location-dot",documentation:"",weight:70,schema:ja.schema()}}static schema(){return ot.ReactComponent.schema({type:"address_map"})}attachReact(i,g){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(Fc,{ref:g,component:this.component,value:this.dataValue,onChange:d=>this.setValue(d),...this,current:this},this.dataValue))}setValue(i){this.valuePosition=i,this.updateValue(i)}getValue(){return this.valuePosition}init(){super.init()}render(){return super.render(`<div id="react-${this.id} ref="react-${this.id}"></div>`)}};Ct(ja,"editForm",Yc);let Ma=ja;const zc=[{key:"labelPosition",ignore:!0},{key:"placeholder",ignore:!0},{key:"description",ignore:!0},{key:"hideLabel",ignore:!0},{key:"autofocus",ignore:!0},{key:"tooltip",ignore:!0},{key:"tabindex",ignore:!0},{key:"disabled",ignore:!0},{label:"Base url",calculateValue:"let url = '"+Fe()+"'; data.url = url; value=url;",key:"url",type:"hidden",input:!0,weight:1}];function Lc(...y){return ot.Components.baseEditForm([{key:"display",components:zc}],...y)}const wn=cr.Formio.Components.components.input,Wc=({component:y,current:i,onChange:g,i18next:d})=>{var B,R;const z="list-services",$="selected-category",[X,o]=q.useState([]),[x,a]=q.useState([]),[s,u]=q.useState(null),[c,p]=q.useState(null),[f,j]=q.useState(""),[_,D]=q.useState(!1),[Y,O]=q.useState(!1),I=q.useRef(!1),N=q.useRef(),S=q.useMemo(()=>{if(!s)return null;const A=x.find(J=>J.name===s);return A||X.find(J=>J.name===s)||null},[s,x,X]),v=q.useMemo(()=>(S==null?void 0:S.services)||[],[S]),T=async()=>{var Z,ue;O(!0);const A=sessionStorage.getItem(z),H=sessionStorage.getItem($);if(A)try{const ie=JSON.parse(A);if(Array.isArray(ie)&&ie.length>0){o(ie),a(ie);const ye=ie.find(ce=>ce.name===H)||ie[0];return u((ye==null?void 0:ye.name)||null),O(!1),ie}}catch{console.warn("⚠️ Cache corrotta, rigenerazione...")}const J=await window.FormioHelper.getBookingConfig(),ne={};J.forEach(ie=>{(ie.categories??[]).forEach(ye=>{ne[ye]||(ne[ye]={name:ye,services:[]}),ne[ye].services.push(ie)})});const ee=Object.fromEntries(Object.entries(ne).sort(([ie],[ye])=>ie.localeCompare(ye,"it",{sensitivity:"base"}))),he=Object.values(ee).filter(ie=>(ie.name??"").trim()!=="");return o(he),a(he),u(((Z=he[0])==null?void 0:Z.name)||null),sessionStorage.setItem(z,JSON.stringify(he)),sessionStorage.setItem($,((ue=he[0])==null?void 0:ue.name)||""),O(!1),he};q.useEffect(()=>{s&&sessionStorage.setItem($,s)},[s]),q.useEffect(()=>{I.current||(I.current=!0,T())},[]);const L=A=>{var Q;const H=(ve="")=>ve.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),J=(ve="")=>ve.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g," ").trim(),ne=(ve="")=>ve.replace(/<[^>]*>/g," "),ee=(ve,Ne)=>new RegExp(`\\b${H(Ne)}`,"i").test(ve),he=(ve,Ne)=>{const _e=J(ve.name),Ce=J((ve.categories??[]).join(" ")),Re=J(ne(ve.abstract??""));if(!Ne.every(b=>ee(_e,b)||ee(Ce,b)||ee(Re,b)))return-1;let C=0;for(const b of Ne)ee(_e,b)?C+=3:ee(Ce,b)?C+=2:ee(Re,b)&&(C+=1);return C},Z=A.target.value;j(Z);const ue=J(Z);if(!ue){a(X),u(ve=>{var Ne;return ve??((Ne=X[0])==null?void 0:Ne.name)??null});return}const ie=ue.split(" ").filter(Boolean),ye=X.map(ve=>{const Ne=ve.services.map(_e=>({service:_e,score:he(_e,ie)})).filter(_e=>_e.score>=0).sort((_e,Ce)=>Ce.score-_e.score).map(_e=>_e.service);return Ne.length?{...ve,services:Ne}:null}).filter(Boolean);a(ye);const ce=ye.some(ve=>ve.name===s);u(ce?s:((Q=ye[0])==null?void 0:Q.name)??null)},m=A=>{p(A);const H=X.find(J=>J.services.some(ne=>ne.id===A.id));H&&u(H.name),g({id:A.id,link:A.link,name:A.name,show_howto_in_motivation:A.show_howto_in_motivation,categories:A.categories,offices:A.offices,abstract:A.abstract,view_type:A.view_type}),i.data.user_group=null,Tn()},P=A=>{u(A.name),p(null),j(""),a(X),g({})};return q.useEffect(()=>{const A=!!document.querySelector(".formio-read-only");D(A)},[]),q.useEffect(()=>{const A=setTimeout(()=>{const H=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());if(H!=null&&H.id&&(p(H),X.length>0)){const J=X.find(ne=>ne.services.some(ee=>ee.id===H.id));J&&u(J.name)}},500);return()=>clearTimeout(A)},[i==null?void 0:i.dataValue,i==null?void 0:i.data,X]),q.useEffect(()=>{const A=window.FormioInstance;if(!A)return;const H=()=>{var ne,ee,he;const J=(he=(ne=A.submission)==null?void 0:ne.data)==null?void 0:he[(ee=i==null?void 0:i.component)==null?void 0:ee.key];if(J!=null&&J.id&&(p(J),X.length>0)){const Z=X.find(ue=>ue.services.some(ie=>ie.id===J.id));Z&&u(Z.name)}};return A.on("change",H),()=>A.off("change",H)},[X,(B=i==null?void 0:i.component)==null?void 0:B.key]),Y?h.jsx("div",{className:"services-booking",ref:N,children:h.jsxs("div",{children:[d.t("Caricamento in corso"),"..."]})}):h.jsx("div",{className:"services-booking",ref:N,children:X&&!_?h.jsxs(le.Container,{children:[h.jsx(le.Row,{className:"mb-3",children:h.jsx(le.Col,{children:h.jsx("h3",{className:"h6 fw-bold text-uppercase mb-3",children:d.t("Seleziona il servizio per cui stai richiedendo un appuntamento")})})}),h.jsx(le.Row,{className:"mb-3",children:h.jsx(le.Col,{children:h.jsx("div",{className:"search-container",children:h.jsx(le.Input,{id:"search",label:d.t("Cerca"),type:"text",value:f,onChange:L,onInput:L,infoText:d.t("Cerca per categoria, servizio o descrizione")})})})}),h.jsxs(le.Row,{className:"mb-3",children:[S?h.jsx(le.Col,{lg:3,md:4,className:"mb-4 mb-lg-0",children:h.jsxs("div",{className:"categories-list",children:[h.jsx("h3",{className:"h6 fw-bold text-uppercase mb-3",children:d.t("Categorie")}),x.length>0&&x.map(A=>{const H=s===A.name;return h.jsxs("button",{onClick:()=>P(A),className:`category-item w-100 text-start p-3 mb-2 border-0 rounded ${H?"category-active bg-primary text-white":"bg-light text-dark"}`,children:[h.jsx("span",{className:"fw-500 d-block",children:A.name}),h.jsxs("small",{className:`d-block mt-1 ${H?"text-white":"text-muted"}`,children:[A.services.length," ",A.services.length>1?d.t("servizi"):d.t("servizio")]})]},A.name)})]})}):null,h.jsx(le.Col,{lg:S?9:12,md:S?8:12,children:h.jsxs("div",{className:"services-container",children:[v.length>0?h.jsxs("div",{className:"services-header mb-4",children:[h.jsx("h3",{className:"h5 fw-bold text-primary mb-0",children:S==null?void 0:S.name}),h.jsx("div",{className:"border-bottom border-primary mt-3 mb-4"})]}):null,v.length>0?h.jsx("div",{className:"services-list",children:v.map(A=>{const H=(c==null?void 0:c.id)===A.id,J=Mn.sanitize(A==null?void 0:A.abstract);return h.jsx("button",{onClick:()=>m(A),className:`service-card mb-4 p-4 rounded border cursor-pointer transition text-start w-100 ${H?"border-primary border-2 bg-light":"border-light border-1 bg-white"}`,style:{cursor:"pointer"},tabindex:"0",role:"button","aria-label":`${A.name}`,"aria-pressed":H,children:h.jsx("div",{className:"d-flex justify-content-between align-items-start",children:h.jsxs("div",{className:"flex-grow-1",children:[h.jsx("h5",{className:"h6 fw-bold mb-2 text-dark",children:A.name}),(A==null?void 0:A.abstract)&&h.jsx("p",{className:"text-muted small mb-0",dangerouslySetInnerHTML:{__html:J}})]})})},A.id)})}):h.jsx("div",{className:"alert alert-info text-italic",children:d.t("Il servizio che stai cercando non è disponibile per la prenotazione appuntamento")})]})})]})]}):_?h.jsx("fieldset",{className:"it-page-section",children:h.jsx("div",{className:"cmp-card mt-2",children:h.jsxs("div",{className:"card has-bkg-grey shadow-sm p-big",children:[h.jsx("div",{className:"card-header border-0 p-0 mb-lg-30",children:h.jsx("div",{className:"d-flex",children:h.jsx("h2",{className:"title-xxlarge mb-1",children:S==null?void 0:S.name})})}),h.jsx("div",{className:"card p-3 p-lg-4 fieldset-body",children:(R=i==null?void 0:i.dataValue)!=null&&R.id?h.jsx("div",{className:"services-list",children:h.jsx("div",{className:"service-card p-4 rounded border transition border-light border-1 bg-white",children:h.jsx("div",{className:"d-flex justify-content-between align-items-start",children:h.jsx("div",{className:"flex-grow-1",children:h.jsx("p",{className:"mb-2 text-dark text-paragraph",children:i.dataValue.name})})})},i.dataValue.id)}):null})]})})}):null})},Ta=class Ta extends wn{constructor(i,g,d){super(i,g,d)}static get builderInfo(){return{title:"Lista Servizi",group:"basic",icon:"bi bi-list",documentation:"",weight:70,schema:Ta.schema()}}static schema(){return wn.schema({type:"list-services"})}attach(i,g){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(Wc,{ref:g,component:this.component,onChange:d=>this.setValue(d),...this,current:this}))}setValue(i){i&&(this.shouldSetValue=!0,this.updateValue(i))}getValue(){return this.dataValue}init(){super.init()}render(){return super.render()}};Ct(Ta,"editForm",Lc);let Sa=Ta;const ur={pagebreak:_a,dynamic_calendar:On,calendar:ba,"calendar-advanced":wa,sdcfile:xa,address_map:Ma,"list-services":Sa};function Vc(y){if(!y||typeof y.addComponent!="function")throw new Error("registerFormioComponents requires Formio Components with addComponent(name, component)");return Object.entries(ur).forEach(([i,g])=>{y.addComponent(i,g)}),ur}exports.Calendar=ba;exports.CalendarAdvanced=wa;exports.FormioAddressMap=Ma;exports.FormioDynamicCalendar=On;exports.FormioListServices=Sa;exports.FormioPageBreak=_a;exports.SdcFile=xa;exports.formioCustomComponents=ur;exports.registerFormioComponents=Vc;
|
|
104
|
+
}`,conditional:{json:{"===":[{var:"data.storage"},"url"]}}},{type:"textfield",input:!0,key:"fileKey",label:"File form-data key",weight:17,placeholder:"Enter the key name of a file for form data.",tooltip:"Key name that you would like to modify for the file while calling API request.",conditional:{json:{"===":[{var:"data.storage"},"url"]}}},{type:"textfield",input:!0,key:"dir",label:"Directory",placeholder:"(optional) Enter a directory for the files",tooltip:"This will place all the files uploaded in this field in the directory",weight:20,conditional:{json:{"!==":[{var:"data.storage"},"googledrive"]}}},{type:"textfield",input:!0,key:"dir",label:"Folder ID",placeholder:"(optional) Enter an ID of the folder for the files",tooltip:"This will place all the files uploaded in this field in the folder",weight:20,conditional:{json:{"===":[{var:"data.storage"},"googledrive"]}}},{type:"textfield",input:!0,key:"fileNameTemplate",label:"File Name Template",placeholder:'(optional) { {name} }-{ {guid} }"',tooltip:"Specify template for name of uploaded file(s). Regular template variables are available (`data`, `component`, `user`, `value`, `moment` etc.), also `fileName`, `guid` variables are available. `guid` part must be present, if not found in template, will be added at the end.",weight:25},{type:"checkbox",input:!0,key:"image",label:"Display as image(s)",tooltip:"Instead of a list of linked files, images will be rendered in the view.",weight:30},{type:"checkbox",input:!0,key:"uploadOnly",label:"Upload Only",tooltip:"When this is checked, will only allow you to upload file(s) and consequently the download, in this component, will be unavailable.",weight:33},{type:"checkbox",input:!0,key:"privateDownload",label:"Private Download",tooltip:"When this is checked, the file download will send a POST request to the download URL with the x-jwt-token header. This will allow your endpoint to create a Private download system.",weight:31,conditional:{json:{"===":[{var:"data.storage"},"url"]}}},{type:"textfield",input:!0,key:"imageSize",label:"Image Size",placeholder:"100",tooltip:"The image size for previewing images.",weight:40,conditional:{json:{"==":[{var:"data.image"},!0]}}},{type:"textfield",input:!0,key:"maxFiles",label:"Numero massimo di file",placeholder:"100",tooltip:"Numero massimo di file caricabilii, default è 100.",weight:40},{type:"checkbox",input:!0,key:"webcam",label:"Enable web camera",tooltip:"This will allow using an attached camera to directly take a picture instead of uploading an existing file.",weight:32},{type:"textfield",input:!0,key:"webcamSize",label:"Webcam Width",placeholder:"320",tooltip:"The webcam size for taking pictures.",weight:38,conditional:{json:{"==":[{var:"data.webcam"},!0]}}},{type:"datagrid",input:!0,label:"File Types",key:"fileTypes",tooltip:"Specify file types to classify the uploads. This is useful if you allow multiple types of uploads but want to allow the user to specify which type of file each is.",weight:11,components:[{label:"Label",key:"label",input:!0,type:"textfield"},{label:"Value",key:"value",input:!0,type:"textfield"}]},{type:"textfield",input:!0,key:"filePattern",label:"File Pattern",placeholder:".jpg,video/*,application/pdf",tooltip:"See <a href='https://github.com/danialfarid/ng-file-upload#full-reference' target='_blank'>https://github.com/danialfarid/ng-file-upload#full-reference</a> for how to specify file patterns.",weight:50},{type:"textfield",input:!0,key:"fileMinSize",label:"File Minimum Size",placeholder:"1MB",tooltip:"See <a href='https://github.com/danialfarid/ng-file-upload#full-reference' target='_blank'>https://github.com/danialfarid/ng-file-upload#full-reference</a> for how to specify file sizes.",weight:60},{type:"textfield",input:!0,key:"fileMaxSize",label:"File Maximum Size",placeholder:"10MB",tooltip:"See <a href='https://github.com/danialfarid/ng-file-upload#full-reference' target='_blank'>https://github.com/danialfarid/ng-file-upload#full-reference</a> for how to specify file sizes.",weight:70},{type:"textfield",input:!0,key:"maxFiles",label:"Numero massimo di file",placeholder:"100",tooltip:"Numero massimo di file caricabilii, default è 100.",weight:40}],xc=[{key:"unique",ignore:!0},{key:"validateOn",ignore:!0}];function Mc(...y){return ot.Components.baseEditForm([{key:"display",components:bc},{key:"data",components:_c},{label:"File",key:"file",weight:5,components:wc},{key:"validation",components:xc}],...y)}document.documentElement.lang.toString();class Sc{constructor(){this.token=null,this.basePath=null,this.init()}init(){this.token=null,this.basePath=Fe()}async getSessionAuthToken(){let i=this;await qt.get(i.basePath+"/api/session-auth").then(g=>{i.token=g.data.token}).catch(g=>{Je.fire("'error_message_detail","'auth_error'","error")})}getSessionAuthTokenPromise(){let i=this;return new Promise(async(g,d)=>{aa("auth-token")?g({token:aa("auth-token")}):await qt.get(i.basePath+"/api/session-auth?with-cookie=true",{withCredentials:!0,headers:{"Content-Type":"application/json; charset=utf-8"}}).then(z=>{const $=sl.jwtDecode(z.data.token);$.exp&&oc("auth-token",z.data.token,$.exp)}).catch(z=>{console.log(z)})})}getToken(){return this.token}execAuthenticatedCall(i){this.token?i(this.token):this.getSessionAuthTokenPromise().then(g=>{this.token=g.token,i(this.token)})}}const vn=cr.Formio.Components.components.file;let lr=null;document.querySelector("widget-formio")!==null&&(lr=document.querySelector("widget-formio").getAttribute("signature-check-ws-url"));const Dc=y=>{const{component:i,current:g,onChange:d,i18next:z}=y,[$,X]=q.useState([]),[o,x]=q.useState(new Map),[a,s]=q.useState(!1),u=new Sc;q.useEffect(()=>{u.getSessionAuthTokenPromise()},[]);const c=(m,P)=>{x(B=>{const R=new Map(B);return R.set(m,P),R})};function p(m){return m.size>(T(i.fileMaxSize)||T("1GB"))?{code:"size-files",message:`${z.t("I file non possono superare le dimensioni di")} ${i.fileMaxSize?i.fileMaxSize:"1GB"}`}:$.length>=(i.maxFiles?parseInt(i.maxFiles):i.multiple?100:1)?{code:"too-many-files",message:`${z.t("Puoi caricare massimo ")} ${i.maxFiles||100} ${z.t("file")}`}:m.size<T(i.fileMinSize)?{code:"file-too-small",message:`${z.t("I file devono avare una dimensione superiore a ")} ${i.fileMinSize}`}:null}function f(){if(i.filePattern){const m=i.filePattern.split(",");let P={};return m.map(B=>{const R=il.getType(B);P[R]=[],P[R].push(B)}),P}else return!0}const j=m=>{let P={};return P.originalName=m.originalName?m.originalName:m.name,P.name=m.name,P.url=m.url,P.data=m.data,P.signature_validation=m.signature_validation,P.mime_type=m.mime_type,P.storage="url",P.size=m.size,P},{getRootProps:_,getInputProps:D,fileRejections:Y,isDragActive:O,open:I}=nl.useDropzone({onDrop:m=>{m.map(P=>{v(P).then(B=>{})})},maxFiles:i.maxFiles?parseInt(i.maxFiles)-$.length:i.multiple?100:1,validator:p,accept:f()}),N=m=>{const P=Fe()+"/api/attachments/"+m.data.id;fetch(P,{method:"DELETE",headers:{"Content-Type":"application/json; charset=utf-8",Authorization:`Bearer ${aa("auth-token")}`},strictErrors:!0}).then(()=>{X(B=>{let R=B.filter(A=>A.data.id!==m.data.id);return d(R),R})}).catch(B=>{Je.fire({title:"",html:`<p>${z.t("Ci sono stati degli errori durante l'eliminazione del file")}</p>`,icon:"error",cancelButtonText:z.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),console.error(B)})},S=()=>{const m=g!=null&&g.dataValue?g.dataValue:null;(m==null?void 0:m.length)>0&&(X(m),setTimeout(()=>{d(m)},100))};q.useEffect(()=>{document.querySelector(".formio-read-only")&&a===!1?(s(!0),setTimeout(()=>{S()},1e3)):(s(!1),setTimeout(()=>{S()},1e3))},[]);async function v(m){let P;const B=Fe()+"/it/upload";let R={mime_type:m.type,name:m.name,original_filename:m.name,protocol_required:i.protocol_required,size:m.size};return await qt.post(B,R,{maxContentLength:1/0,maxBodyLength:1/0}).then(async A=>(P=A.data.id,m.url=Fe()+"/it/allegati/"+P,m.storage="url",m.mime_type=m.type,m.protocol_required=i.protocol_required,m.data={...A.data,baseUrl:Fe()+"/it/allegati/"+P},c(P,m),await qt.put(A.data.uri,m,{onUploadProgress:H=>{let J=Math.round(H.loaded*100/H.total);x(ie=>{const ee=new Map(ie),he=m;return he.progress=parseInt(J),ee.has(P)&&ee.set(P,he),ee})},maxContentLength:1/0,maxBodyLength:1/0,headers:{"Content-Type":"multipart/form-data"}}).then(async H=>{const J=/\\|"/gi,ie=H.headers.etag.replace(J,"")||null;return await qt.put(Fe()+"/it/upload/"+P,{file_hash:ie,check_signature:i.check_signature}).then(async ee=>{x(ue=>{const ae=new Map(ue);return ae.delete(P),ae});let he=g.dataValue||[],Z=null;if(X(ue=>{const ae=[...ue,j(m)];return Z=ae.length-1,d(ae),ae}),i.check_signature&&ee.data.url&&lr)return await qt.post(lr,{url:ee.data.url,content:null},{headers:{"Content-Type":"application/json"}}).then(ue=>{m.signature_validation=ue.data.sign,he[Z].signature_validation=ue.data.sign}).catch(ue=>{he[Z].signature_validation="File validation error: "+ue});x(ue=>{const ae=new Map(ue);return ae.delete(P),ae})}).catch(ee=>{x(he=>{const Z=new Map(he);return Z.delete(P),Z}),console.log(ee),Je.fire({title:"",html:`<p>${z.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:z.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})}).catch(H=>{x(J=>{const ie=new Map(J);return ie.delete(P),ie}),console.log(H),Je.fire({title:"",html:`<p>${z.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:z.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})}))).catch(A=>{console.log(A),Je.fire({title:"",html:`<p>${z.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:z.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),x(H=>{const J=new Map(H);return J.delete(P),J})})}function T(m){if(typeof m=="string"){if(m.search(/kb/i)===m.length-2)return parseFloat(m.substring(0,m.length-2)*1024);if(m.search(/mb/i)===m.length-2)return parseFloat(m.substring(0,m.length-2)*1024*1024);if(m.search(/gb/i)===m.length-2)return parseFloat(m.substring(0,m.length-2)*1024*1024*1024);if(m.search(/b/i)===m.length-1||m.search(/s/i)===m.length-1)return parseFloat(m.substring(0,m.length-1));if(m.search(/m/i)===m.length-1)return parseFloat(m.substring(0,m.length-1)*60);if(m.search(/h/i)===m.length-1)return parseFloat(m.substring(0,m.length-1)*3600)}return m}function L(m,P=2){if(!+m)return"0 Bytes";const B=1024,R=P<0?0:P,A=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],H=Math.floor(Math.log(m)/Math.log(B));return`${parseFloat((m/Math.pow(B,H)).toFixed(R))} ${A[H]}`}return g.conditionallyHidden()||g.visible===!1?null:h.jsx(h.Fragment,{children:a?h.jsx("div",{children:h.jsxs("ul",{className:"upload-file-list",children:[$.map((m,P)=>h.jsxs("li",{className:"upload-file success mw-100",children:[h.jsx(le.Icon,{"aria-hidden":"true",color:"primary",icon:"it-file",title:"Icona file",size:"sm"}),h.jsxs("p",{children:[h.jsx("span",{className:"visually-hidden",children:z.t("File caricato:")}),m.name,h.jsx("span",{className:"upload-file-weight",children:L(m.size)})]})]},m.size+P)),$.length<1&&h.jsxs("li",{className:"upload-file text-secondary mw-100",children:[h.jsx(le.Icon,{"aria-hidden":"true",color:"light",icon:"it-files",title:"Icona file",size:"sm"}),h.jsx("p",{children:z.t("Nessun elemento")})]})]})}):h.jsxs(h.Fragment,{children:[i.hideLabel||i.hidden?"":h.jsxs("label",{className:"col-form-label floating-label",htmlFor:`${i.id}-${i.key}`,title:i.tooltip||void 0,children:[i.label,i.validate.required&&h.jsx("span",{className:"text-danger"}),i.tooltip&&h.jsx("i",{tabIndex:0,className:"bi bi-question-circle text-muted ms-1","data-tooltip":i.tooltip,"aria-expanded":"false"})]}),h.jsxs("div",{className:`my-1 border-2 border-light file-uploader-box rounded p-3 text-secondary${O?" dragover":""}`,style:{border:"dashed"},..._({onClick:m=>m.stopPropagation()}),children:[h.jsx("input",{id:`${i.id}-${i.key}`,"aria-describedby":`file-uploader-description-${i.id}-${i.key}`,...D()}),h.jsxs("div",{className:`upload-dragdrop${O?" dragover":""}`,children:[h.jsx("div",{className:"ms-1 me-3",children:h.jsx(le.Icon,{color:"secondary",icon:"it-upload",title:z.t("Carica file"),size:"_sm"})}),h.jsxs("div",{className:"upload-dragdrop-text",children:[h.jsx("div",{className:"h5",id:`file-uploader-description-${i.id}-${i.key}`,children:z.t("Trascina il file per caricarlo")}),h.jsxs("p",{className:"d-inline-flex",children:[z.t("oppure"),h.jsx(le.Button,{tag:"input",type:"button",value:z.t("selezionalo dal dispositivo"),onClick:I,className:"px-1 py-0 text-decoration-underline primary-color",size:"xs"})]})]})]})]}),h.jsx("div",{dangerouslySetInnerHTML:{__html:Mn.sanitize(i.description||"")}}),h.jsxs("ul",{className:"upload-file-list my-0",children:[$.map((m,P)=>h.jsxs("li",{className:"upload-file success",children:[h.jsx(le.Icon,{"aria-hidden":"true",color:"primary",icon:"it-file",title:"Icona file",size:"sm"}),h.jsxs("p",{children:[h.jsx("span",{className:"visually-hidden",children:z.t("File caricato:")}),m.name,h.jsx("span",{className:"upload-file-weight",children:L(m.size)})]}),h.jsx(le.Button,{className:"px-1",onClick:()=>N(m),children:h.jsx(le.Icon,{title:`${z.t("Elimina file caricato")} ${m.name}`,color:"secondary",icon:"it-delete",className:"ms-auto pointer",size:"sm"})})]},m.size+P)),Array.from(o.entries()).map(([m,P])=>h.jsxs("li",{className:"upload-file success",children:[h.jsx(le.Icon,{"aria-hidden":"true",color:"primary",icon:"it-file",title:"Icona file",size:"sm"}),h.jsxs("p",{children:[h.jsx("span",{className:"visually-hidden",children:z.t("Caricamento file:")}),P.name,h.jsx("span",{className:"upload-file-weight",children:L(P.size)})]}),h.jsx(le.Progress,{value:P.progress})]},m))]}),!!(Y&&Y.length)&&h.jsx("div",{className:"formio-error-wrapper",children:h.jsx("ul",{className:"formio-errors upload-file-list my-0 ",children:Y.map(({file:m,errors:P},B)=>h.jsxs("li",{className:"upload-file error",children:[h.jsxs("div",{className:"upload-file-name-error-wrapper",children:[h.jsx(le.Icon,{"aria-hidden":"true",color:"error",icon:"it-error",title:"Icona file",size:"sm"}),h.jsxs("p",{className:"text-wrap error",children:[h.jsx("span",{className:"visually-hidden",children:z.t("Errore caricamento file:")}),m.name,h.jsx("span",{className:"upload-file-weight",children:L(m.size)})]})]}),h.jsx("div",{children:P.map(R=>R.code==="file-invalid-type"?h.jsxs("p",{className:"text-wrap ms-0",children:[z.t("I file possono essere di tipo "),i.filePattern]}):R.code==="too-many-files"?h.jsxs("p",{className:"text-wrap ms-0",children:[z.t("Puoi caricare massimo ")," ",i.maxFiles?i.maxFiles:i.multiple?100:1," ",z.t("file")]}):h.jsx("p",{className:"text-wrap ms-0",children:R.message}))})]},m.size+B))})})]})})},Oa=class Oa extends vn{constructor(i,g,d){super({...i,multiple:i.multiple},g,d),this.reactRef=null,this.lastRenderedVisible=void 0}static get builderInfo(){return{title:"File Sdc",group:"basic",icon:"bi bi-file-earmark-text",documentation:"",weight:70,schema:Oa.schema()}}static schema(){return vn.schema({type:"sdcfile"})}renderReact(i=this.reactRef){this.rootComponent&&this.rootComponent.render(h.jsx(Dc,{ref:i,component:this.component,onChange:g=>this.setValue(g),...this,current:this}))}attach(i,g){this.reactRef=g,this.rootComponent=Ft.createRoot(i),this.lastRenderedVisible=this.visible,this.renderReact(g)}setValue(i,g={}){const d=this.updateValue(i,g);return this.shouldSetValue=!0,d}getValue(){return super.getValue()}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}checkCondition(i,g){const d=super.checkCondition(i,g),z=this.visible;return this.lastRenderedVisible!==z&&(this.lastRenderedVisible=z,this.renderReact()),d}};Ct(Oa,"editForm",Mc);let xa=Oa;const kc=[{key:"labelPosition",ignore:!0},{key:"labelPosition",ignore:!0},{key:"placeholder",ignore:!0},{key:"description",ignore:!0},{key:"hideLabel",ignore:!0},{key:"autofocus",ignore:!0},{key:"tooltip",ignore:!0},{key:"tabindex",ignore:!0},{key:"disabled",ignore:!0}];function Yc(...y){return ot.Components.baseEditForm([{key:"display",components:kc}],...y)}var ya={exports:{}},Oc=ya.exports,_n;function jc(){return _n||(_n=1,(function(y,i){(function(g,d){y.exports=d(q)})(Oc,(function(g){return(function(){var d={680:function(o){o.exports=g},8952:function(o,x,a){var s=a(4328),u=a(36),c=TypeError;o.exports=function(p){if(s(p))return p;throw new c(u(p)+" is not a function")}},2096:function(o,x,a){var s=a(2424),u=String,c=TypeError;o.exports=function(p){if(s(p))return p;throw new c("Can't set "+u(p)+" as a prototype")}},4764:function(o,x,a){var s=a(9764).charAt;o.exports=function(u,c,p){return c+(p?s(u,c).length:1)}},6100:function(o,x,a){var s=a(7e3),u=TypeError;o.exports=function(c,p){if(s(p,c))return c;throw new u("Incorrect invocation")}},3951:function(o,x,a){var s=a(1632),u=String,c=TypeError;o.exports=function(p){if(s(p))return p;throw new c(u(p)+" is not an object")}},2504:function(o,x,a){var s=a(4096),u=a(2495),c=a(3556),p=function(f){return function(j,_,D){var Y=s(j),O=c(Y);if(O===0)return!f&&-1;var I,N=u(D,O);if(f&&_!=_){for(;O>N;)if((I=Y[N++])!=I)return!0}else for(;O>N;N++)if((f||N in Y)&&Y[N]===_)return f||N||0;return!f&&-1}};o.exports={includes:p(!0),indexOf:p(!1)}},3364:function(o,x,a){var s=a(8992),u=a(1664),c=a(5712),p=a(4356),f=a(3556),j=a(2568),_=u([].push),D=function(Y){var O=Y===1,I=Y===2,N=Y===3,S=Y===4,v=Y===6,T=Y===7,L=Y===5||v;return function(m,P,B,R){for(var A,H,J=p(m),ie=c(J),ee=f(ie),he=s(P,B),Z=0,ue=R||j,ae=O?ue(m,ee):I||T?ue(m,0):void 0;ee>Z;Z++)if((L||Z in ie)&&(H=he(A=ie[Z],Z,J),Y))if(O)ae[Z]=H;else if(H)switch(Y){case 3:return!0;case 5:return A;case 6:return Z;case 2:_(ae,A)}else switch(Y){case 4:return!1;case 7:_(ae,A)}return v?-1:N||S?S:ae}};o.exports={forEach:D(0),map:D(1),filter:D(2),some:D(3),every:D(4),find:D(5),findIndex:D(6),filterReject:D(7)}},953:function(o,x,a){var s=a(9957),u=a(9972),c=a(8504),p=u("species");o.exports=function(f){return c>=51||!s((function(){var j=[];return(j.constructor={})[p]=function(){return{foo:1}},j[f](Boolean).foo!==1}))}},1496:function(o,x,a){var s=a(9957);o.exports=function(u,c){var p=[][u];return!!p&&s((function(){p.call(null,c||function(){return 1},1)}))}},6728:function(o,x,a){var s=a(3476),u=a(1432),c=TypeError,p=Object.getOwnPropertyDescriptor,f=s&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(j){return j instanceof TypeError}})();o.exports=f?function(j,_){if(u(j)&&!p(j,"length").writable)throw new c("Cannot set read only .length");return j.length=_}:function(j,_){return j.length=_}},6736:function(o,x,a){var s=a(1432),u=a(6072),c=a(1632),p=a(9972)("species"),f=Array;o.exports=function(j){var _;return s(j)&&(_=j.constructor,(u(_)&&(_===f||s(_.prototype))||c(_)&&(_=_[p])===null)&&(_=void 0)),_===void 0?f:_}},2568:function(o,x,a){var s=a(6736);o.exports=function(u,c){return new(s(u))(c===0?0:c)}},8696:function(o,x,a){var s=a(3951),u=a(3112);o.exports=function(c,p,f,j){try{return j?p(s(f)[0],f[1]):p(f)}catch(_){u(c,"throw",_)}}},1888:function(o,x,a){var s=a(1664),u=s({}.toString),c=s("".slice);o.exports=function(p){return c(u(p),8,-1)}},4427:function(o,x,a){var s=a(16),u=a(4328),c=a(1888),p=a(9972)("toStringTag"),f=Object,j=c((function(){return arguments})())==="Arguments";o.exports=s?c:function(_){var D,Y,O;return _===void 0?"Undefined":_===null?"Null":typeof(Y=(function(I,N){try{return I[N]}catch{}})(D=f(_),p))=="string"?Y:j?c(D):(O=c(D))==="Object"&&u(D.callee)?"Arguments":O}},9968:function(o,x,a){var s=a(5152),u=a(9252),c=a(9444),p=a(8352);o.exports=function(f,j,_){for(var D=u(j),Y=p.f,O=c.f,I=0;I<D.length;I++){var N=D[I];s(f,N)||_&&s(_,N)||Y(f,N,O(j,N))}}},2272:function(o,x,a){var s=a(9957);o.exports=!s((function(){function u(){}return u.prototype.constructor=null,Object.getPrototypeOf(new u)!==u.prototype}))},3336:function(o){o.exports=function(x,a){return{value:x,done:a}}},3440:function(o,x,a){var s=a(3476),u=a(8352),c=a(9728);o.exports=s?function(p,f,j){return u.f(p,f,c(1,j))}:function(p,f,j){return p[f]=j,p}},9728:function(o){o.exports=function(x,a){return{enumerable:!(1&x),configurable:!(2&x),writable:!(4&x),value:a}}},92:function(o,x,a){var s=a(3476),u=a(8352),c=a(9728);o.exports=function(p,f,j){s?u.f(p,f,c(0,j)):p[f]=j}},2544:function(o,x,a){var s=a(5312),u=a(8352);o.exports=function(c,p,f){return f.get&&s(f.get,p,{getter:!0}),f.set&&s(f.set,p,{setter:!0}),u.f(c,p,f)}},6076:function(o,x,a){var s=a(4328),u=a(8352),c=a(5312),p=a(4636);o.exports=function(f,j,_,D){D||(D={});var Y=D.enumerable,O=D.name!==void 0?D.name:j;if(s(_)&&c(_,O,D),D.global)Y?f[j]=_:p(j,_);else{try{D.unsafe?f[j]&&(Y=!0):delete f[j]}catch{}Y?f[j]=_:u.f(f,j,{value:_,enumerable:!1,configurable:!D.nonConfigurable,writable:!D.nonWritable})}return f}},4036:function(o,x,a){var s=a(6076);o.exports=function(u,c,p){for(var f in c)s(u,f,c[f],p);return u}},4636:function(o,x,a){var s=a(6420),u=Object.defineProperty;o.exports=function(c,p){try{u(s,c,{value:p,configurable:!0,writable:!0})}catch{s[c]=p}return p}},3476:function(o,x,a){var s=a(9957);o.exports=!s((function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}))},8168:function(o,x,a){var s=a(6420),u=a(1632),c=s.document,p=u(c)&&u(c.createElement);o.exports=function(f){return p?c.createElement(f):{}}},4316:function(o){var x=TypeError;o.exports=function(a){if(a>9007199254740991)throw x("Maximum allowed index exceeded");return a}},6064:function(o){o.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},8504:function(o,x,a){var s,u,c=a(6420),p=a(6064),f=c.process,j=c.Deno,_=f&&f.versions||j&&j.version,D=_&&_.v8;D&&(u=(s=D.split("."))[0]>0&&s[0]<4?1:+(s[0]+s[1])),!u&&p&&(!(s=p.match(/Edge\/(\d+)/))||s[1]>=74)&&(s=p.match(/Chrome\/(\d+)/))&&(u=+s[1]),o.exports=u},8256:function(o){o.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6520:function(o,x,a){var s=a(1664),u=Error,c=s("".replace),p=String(new u("zxcasd").stack),f=/\n\s*at [^:]*:[^\n]*/,j=f.test(p);o.exports=function(_,D){if(j&&typeof _=="string"&&!u.prepareStackTrace)for(;D--;)_=c(_,f,"");return _}},3696:function(o,x,a){var s=a(3440),u=a(6520),c=a(9184),p=Error.captureStackTrace;o.exports=function(f,j,_,D){c&&(p?p(f,j):s(f,"stack",u(_,D)))}},9184:function(o,x,a){var s=a(9957),u=a(9728);o.exports=!s((function(){var c=new Error("a");return!("stack"in c)||(Object.defineProperty(c,"stack",u(1,7)),c.stack!==7)}))},9160:function(o,x,a){var s=a(6420),u=a(9444).f,c=a(3440),p=a(6076),f=a(4636),j=a(9968),_=a(6704);o.exports=function(D,Y){var O,I,N,S,v,T=D.target,L=D.global,m=D.stat;if(O=L?s:m?s[T]||f(T,{}):s[T]&&s[T].prototype)for(I in Y){if(S=Y[I],N=D.dontCallGetSet?(v=u(O,I))&&v.value:O[I],!_(L?I:T+(m?".":"#")+I,D.forced)&&N!==void 0){if(typeof S==typeof N)continue;j(S,N)}(D.sham||N&&N.sham)&&c(S,"sham",!0),p(O,I,S,D)}}},9957:function(o){o.exports=function(x){try{return!!x()}catch{return!0}}},7176:function(o,x,a){a(880);var s=a(8448),u=a(6076),c=a(7680),p=a(9957),f=a(9972),j=a(3440),_=f("species"),D=RegExp.prototype;o.exports=function(Y,O,I,N){var S=f(Y),v=!p((function(){var P={};return P[S]=function(){return 7},""[Y](P)!==7})),T=v&&!p((function(){var P=!1,B=/a/;return Y==="split"&&((B={}).constructor={},B.constructor[_]=function(){return B},B.flags="",B[S]=/./[S]),B.exec=function(){return P=!0,null},B[S](""),!P}));if(!v||!T||I){var L=/./[S],m=O(S,""[Y],(function(P,B,R,A,H){var J=B.exec;return J===c||J===D.exec?v&&!H?{done:!0,value:s(L,B,R,A)}:{done:!0,value:s(P,R,B,A)}:{done:!1}}));u(String.prototype,Y,m[0]),u(D,S,m[1])}N&&j(D[S],"sham",!0)}},908:function(o,x,a){var s=a(7332),u=Function.prototype,c=u.apply,p=u.call;o.exports=typeof Reflect=="object"&&Reflect.apply||(s?p.bind(c):function(){return p.apply(c,arguments)})},8992:function(o,x,a){var s=a(3180),u=a(8952),c=a(7332),p=s(s.bind);o.exports=function(f,j){return u(f),j===void 0?f:c?p(f,j):function(){return f.apply(j,arguments)}}},7332:function(o,x,a){var s=a(9957);o.exports=!s((function(){var u=(function(){}).bind();return typeof u!="function"||u.hasOwnProperty("prototype")}))},8448:function(o,x,a){var s=a(7332),u=Function.prototype.call;o.exports=s?u.bind(u):function(){return u.apply(u,arguments)}},6208:function(o,x,a){var s=a(3476),u=a(5152),c=Function.prototype,p=s&&Object.getOwnPropertyDescriptor,f=u(c,"name"),j=f&&(function(){}).name==="something",_=f&&(!s||s&&p(c,"name").configurable);o.exports={EXISTS:f,PROPER:j,CONFIGURABLE:_}},5288:function(o,x,a){var s=a(1664),u=a(8952);o.exports=function(c,p,f){try{return s(u(Object.getOwnPropertyDescriptor(c,p)[f]))}catch{}}},3180:function(o,x,a){var s=a(1888),u=a(1664);o.exports=function(c){if(s(c)==="Function")return u(c)}},1664:function(o,x,a){var s=a(7332),u=Function.prototype,c=u.call,p=s&&u.bind.bind(c,c);o.exports=s?p:function(f){return function(){return c.apply(f,arguments)}}},5232:function(o,x,a){var s=a(6420),u=a(4328);o.exports=function(c,p){return arguments.length<2?(f=s[c],u(f)?f:void 0):s[c]&&s[c][p];var f}},6752:function(o){o.exports=function(x){return{iterator:x,next:x.next,done:!1}}},4504:function(o,x,a){var s=a(8952),u=a(9760);o.exports=function(c,p){var f=c[p];return u(f)?void 0:s(f)}},6420:function(o,x,a){var s=function(u){return u&&u.Math===Math&&u};o.exports=s(typeof globalThis=="object"&&globalThis)||s(typeof window=="object"&&window)||s(typeof self=="object"&&self)||s(typeof a.g=="object"&&a.g)||s(typeof this=="object"&&this)||(function(){return this})()||Function("return this")()},5152:function(o,x,a){var s=a(1664),u=a(4356),c=s({}.hasOwnProperty);o.exports=Object.hasOwn||function(p,f){return c(u(p),f)}},2560:function(o){o.exports={}},4168:function(o,x,a){var s=a(5232);o.exports=s("document","documentElement")},9888:function(o,x,a){var s=a(3476),u=a(9957),c=a(8168);o.exports=!s&&!u((function(){return Object.defineProperty(c("div"),"a",{get:function(){return 7}}).a!==7}))},5712:function(o,x,a){var s=a(1664),u=a(9957),c=a(1888),p=Object,f=s("".split);o.exports=u((function(){return!p("z").propertyIsEnumerable(0)}))?function(j){return c(j)==="String"?f(j,""):p(j)}:p},7512:function(o,x,a){var s=a(4328),u=a(1632),c=a(4024);o.exports=function(p,f,j){var _,D;return c&&s(_=f.constructor)&&_!==j&&u(D=_.prototype)&&D!==j.prototype&&c(p,D),p}},9112:function(o,x,a){var s=a(1664),u=a(4328),c=a(3976),p=s(Function.toString);u(c.inspectSource)||(c.inspectSource=function(f){return p(f)}),o.exports=c.inspectSource},3480:function(o,x,a){var s=a(1632),u=a(3440);o.exports=function(c,p){s(p)&&"cause"in p&&u(c,"cause",p.cause)}},9104:function(o,x,a){var s,u,c,p=a(4288),f=a(6420),j=a(1632),_=a(3440),D=a(5152),Y=a(3976),O=a(6504),I=a(2560),N="Object already initialized",S=f.TypeError,v=f.WeakMap;if(p||Y.state){var T=Y.state||(Y.state=new v);T.get=T.get,T.has=T.has,T.set=T.set,s=function(m,P){if(T.has(m))throw new S(N);return P.facade=m,T.set(m,P),P},u=function(m){return T.get(m)||{}},c=function(m){return T.has(m)}}else{var L=O("state");I[L]=!0,s=function(m,P){if(D(m,L))throw new S(N);return P.facade=m,_(m,L,P),P},u=function(m){return D(m,L)?m[L]:{}},c=function(m){return D(m,L)}}o.exports={set:s,get:u,has:c,enforce:function(m){return c(m)?u(m):s(m,{})},getterFor:function(m){return function(P){var B;if(!j(P)||(B=u(P)).type!==m)throw new S("Incompatible receiver, "+m+" required");return B}}}},1432:function(o,x,a){var s=a(1888);o.exports=Array.isArray||function(u){return s(u)==="Array"}},4328:function(o){var x=typeof document=="object"&&document.all;o.exports=x===void 0&&x!==void 0?function(a){return typeof a=="function"||a===x}:function(a){return typeof a=="function"}},6072:function(o,x,a){var s=a(1664),u=a(9957),c=a(4328),p=a(4427),f=a(5232),j=a(9112),_=function(){},D=f("Reflect","construct"),Y=/^\s*(?:class|function)\b/,O=s(Y.exec),I=!Y.test(_),N=function(v){if(!c(v))return!1;try{return D(_,[],v),!0}catch{return!1}},S=function(v){if(!c(v))return!1;switch(p(v)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return I||!!O(Y,j(v))}catch{return!0}};S.sham=!0,o.exports=!D||u((function(){var v;return N(N.call)||!N(Object)||!N((function(){v=!0}))||v}))?S:N},6704:function(o,x,a){var s=a(9957),u=a(4328),c=/#|\.prototype\./,p=function(Y,O){var I=j[f(Y)];return I===D||I!==_&&(u(O)?s(O):!!O)},f=p.normalize=function(Y){return String(Y).replace(c,".").toLowerCase()},j=p.data={},_=p.NATIVE="N",D=p.POLYFILL="P";o.exports=p},9760:function(o){o.exports=function(x){return x==null}},1632:function(o,x,a){var s=a(4328);o.exports=function(u){return typeof u=="object"?u!==null:s(u)}},2424:function(o,x,a){var s=a(1632);o.exports=function(u){return s(u)||u===null}},7048:function(o){o.exports=!1},7728:function(o,x,a){var s=a(5232),u=a(4328),c=a(7e3),p=a(6536),f=Object;o.exports=p?function(j){return typeof j=="symbol"}:function(j){var _=s("Symbol");return u(_)&&c(_.prototype,f(j))}},3112:function(o,x,a){var s=a(8448),u=a(3951),c=a(4504);o.exports=function(p,f,j){var _,D;u(p);try{if(!(_=c(p,"return"))){if(f==="throw")throw j;return j}_=s(_,p)}catch(Y){D=!0,_=Y}if(f==="throw")throw j;if(D)throw _;return u(_),j}},9724:function(o,x,a){var s=a(8448),u=a(9368),c=a(3440),p=a(4036),f=a(9972),j=a(9104),_=a(4504),D=a(336).IteratorPrototype,Y=a(3336),O=a(3112),I=f("toStringTag"),N="IteratorHelper",S="WrapForValidIterator",v=j.set,T=function(P){var B=j.getterFor(P?S:N);return p(u(D),{next:function(){var R=B(this);if(P)return R.nextHandler();try{var A=R.done?void 0:R.nextHandler();return Y(A,R.done)}catch(H){throw R.done=!0,H}},return:function(){var R=B(this),A=R.iterator;if(R.done=!0,P){var H=_(A,"return");return H?s(H,A):Y(void 0,!0)}if(R.inner)try{O(R.inner.iterator,"normal")}catch(J){return O(A,"throw",J)}return O(A,"normal"),Y(void 0,!0)}})},L=T(!0),m=T(!1);c(m,I,"Iterator Helper"),o.exports=function(P,B){var R=function(A,H){H?(H.iterator=A.iterator,H.next=A.next):H=A,H.type=B?S:N,H.nextHandler=P,H.counter=0,H.done=!1,v(this,H)};return R.prototype=B?L:m,R}},5792:function(o,x,a){var s=a(8448),u=a(8952),c=a(3951),p=a(6752),f=a(9724),j=a(8696),_=f((function(){var D=this.iterator,Y=c(s(this.next,D));if(!(this.done=!!Y.done))return j(D,this.mapper,[Y.value,this.counter++],!0)}));o.exports=function(D){return c(this),u(D),new _(p(this),{mapper:D})}},336:function(o,x,a){var s,u,c,p=a(9957),f=a(4328),j=a(1632),_=a(9368),D=a(7796),Y=a(6076),O=a(9972),I=a(7048),N=O("iterator"),S=!1;[].keys&&("next"in(c=[].keys())?(u=D(D(c)))!==Object.prototype&&(s=u):S=!0),!j(s)||p((function(){var v={};return s[N].call(v)!==v}))?s={}:I&&(s=_(s)),f(s[N])||Y(s,N,(function(){return this})),o.exports={IteratorPrototype:s,BUGGY_SAFARI_ITERATORS:S}},3556:function(o,x,a){var s=a(7584);o.exports=function(u){return s(u.length)}},5312:function(o,x,a){var s=a(1664),u=a(9957),c=a(4328),p=a(5152),f=a(3476),j=a(6208).CONFIGURABLE,_=a(9112),D=a(9104),Y=D.enforce,O=D.get,I=String,N=Object.defineProperty,S=s("".slice),v=s("".replace),T=s([].join),L=f&&!u((function(){return N((function(){}),"length",{value:8}).length!==8})),m=String(String).split("String"),P=o.exports=function(B,R,A){S(I(R),0,7)==="Symbol("&&(R="["+v(I(R),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),A&&A.getter&&(R="get "+R),A&&A.setter&&(R="set "+R),(!p(B,"name")||j&&B.name!==R)&&(f?N(B,"name",{value:R,configurable:!0}):B.name=R),L&&A&&p(A,"arity")&&B.length!==A.arity&&N(B,"length",{value:A.arity});try{A&&p(A,"constructor")&&A.constructor?f&&N(B,"prototype",{writable:!1}):B.prototype&&(B.prototype=void 0)}catch{}var H=Y(B);return p(H,"source")||(H.source=T(m,typeof R=="string"?R:"")),B};Function.prototype.toString=P((function(){return c(this)&&O(this).source||_(this)}),"toString")},1748:function(o){var x=Math.ceil,a=Math.floor;o.exports=Math.trunc||function(s){var u=+s;return(u>0?a:x)(u)}},8948:function(o,x,a){var s=a(5016);o.exports=function(u,c){return u===void 0?arguments.length<2?"":c:s(u)}},9292:function(o,x,a){var s=a(3476),u=a(1664),c=a(8448),p=a(9957),f=a(1531),j=a(9392),_=a(8912),D=a(4356),Y=a(5712),O=Object.assign,I=Object.defineProperty,N=u([].concat);o.exports=!O||p((function(){if(s&&O({b:1},O(I({},"a",{enumerable:!0,get:function(){I(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var S={},v={},T=Symbol("assign detection"),L="abcdefghijklmnopqrst";return S[T]=7,L.split("").forEach((function(m){v[m]=m})),O({},S)[T]!==7||f(O({},v)).join("")!==L}))?function(S,v){for(var T=D(S),L=arguments.length,m=1,P=j.f,B=_.f;L>m;)for(var R,A=Y(arguments[m++]),H=P?N(f(A),P(A)):f(A),J=H.length,ie=0;J>ie;)R=H[ie++],s&&!c(B,A,R)||(T[R]=A[R]);return T}:O},9368:function(o,x,a){var s,u=a(3951),c=a(2056),p=a(8256),f=a(2560),j=a(4168),_=a(8168),D=a(6504),Y="prototype",O="script",I=D("IE_PROTO"),N=function(){},S=function(L){return"<"+O+">"+L+"</"+O+">"},v=function(L){L.write(S("")),L.close();var m=L.parentWindow.Object;return L=null,m},T=function(){try{s=new ActiveXObject("htmlfile")}catch{}var L,m,P;T=typeof document<"u"?document.domain&&s?v(s):(m=_("iframe"),P="java"+O+":",m.style.display="none",j.appendChild(m),m.src=String(P),(L=m.contentWindow.document).open(),L.write(S("document.F=Object")),L.close(),L.F):v(s);for(var B=p.length;B--;)delete T[Y][p[B]];return T()};f[I]=!0,o.exports=Object.create||function(L,m){var P;return L!==null?(N[Y]=u(L),P=new N,N[Y]=null,P[I]=L):P=T(),m===void 0?P:c.f(P,m)}},2056:function(o,x,a){var s=a(3476),u=a(1576),c=a(8352),p=a(3951),f=a(4096),j=a(1531);x.f=s&&!u?Object.defineProperties:function(_,D){p(_);for(var Y,O=f(D),I=j(D),N=I.length,S=0;N>S;)c.f(_,Y=I[S++],O[Y]);return _}},8352:function(o,x,a){var s=a(3476),u=a(9888),c=a(1576),p=a(3951),f=a(88),j=TypeError,_=Object.defineProperty,D=Object.getOwnPropertyDescriptor,Y="enumerable",O="configurable",I="writable";x.f=s?c?function(N,S,v){if(p(N),S=f(S),p(v),typeof N=="function"&&S==="prototype"&&"value"in v&&I in v&&!v[I]){var T=D(N,S);T&&T[I]&&(N[S]=v.value,v={configurable:O in v?v[O]:T[O],enumerable:Y in v?v[Y]:T[Y],writable:!1})}return _(N,S,v)}:_:function(N,S,v){if(p(N),S=f(S),p(v),u)try{return _(N,S,v)}catch{}if("get"in v||"set"in v)throw new j("Accessors not supported");return"value"in v&&(N[S]=v.value),N}},9444:function(o,x,a){var s=a(3476),u=a(8448),c=a(8912),p=a(9728),f=a(4096),j=a(88),_=a(5152),D=a(9888),Y=Object.getOwnPropertyDescriptor;x.f=s?Y:function(O,I){if(O=f(O),I=j(I),D)try{return Y(O,I)}catch{}if(_(O,I))return p(!u(c.f,O,I),O[I])}},5048:function(o,x,a){var s=a(9008),u=a(8256).concat("length","prototype");x.f=Object.getOwnPropertyNames||function(c){return s(c,u)}},9392:function(o,x){x.f=Object.getOwnPropertySymbols},7796:function(o,x,a){var s=a(5152),u=a(4328),c=a(4356),p=a(6504),f=a(2272),j=p("IE_PROTO"),_=Object,D=_.prototype;o.exports=f?_.getPrototypeOf:function(Y){var O=c(Y);if(s(O,j))return O[j];var I=O.constructor;return u(I)&&O instanceof I?I.prototype:O instanceof _?D:null}},7e3:function(o,x,a){var s=a(1664);o.exports=s({}.isPrototypeOf)},9008:function(o,x,a){var s=a(1664),u=a(5152),c=a(4096),p=a(2504).indexOf,f=a(2560),j=s([].push);o.exports=function(_,D){var Y,O=c(_),I=0,N=[];for(Y in O)!u(f,Y)&&u(O,Y)&&j(N,Y);for(;D.length>I;)u(O,Y=D[I++])&&(~p(N,Y)||j(N,Y));return N}},1531:function(o,x,a){var s=a(9008),u=a(8256);o.exports=Object.keys||function(c){return s(c,u)}},8912:function(o,x){var a={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,u=s&&!a.call({1:2},1);x.f=u?function(c){var p=s(this,c);return!!p&&p.enumerable}:a},4024:function(o,x,a){var s=a(5288),u=a(3951),c=a(2096);o.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var p,f=!1,j={};try{(p=s(Object.prototype,"__proto__","set"))(j,[]),f=j instanceof Array}catch{}return function(_,D){return u(_),c(D),f?p(_,D):_.__proto__=D,_}})():void 0)},7032:function(o,x,a){var s=a(16),u=a(4427);o.exports=s?{}.toString:function(){return"[object "+u(this)+"]"}},2104:function(o,x,a){var s=a(8448),u=a(4328),c=a(1632),p=TypeError;o.exports=function(f,j){var _,D;if(j==="string"&&u(_=f.toString)&&!c(D=s(_,f))||u(_=f.valueOf)&&!c(D=s(_,f))||j!=="string"&&u(_=f.toString)&&!c(D=s(_,f)))return D;throw new p("Can't convert object to primitive value")}},9252:function(o,x,a){var s=a(5232),u=a(1664),c=a(5048),p=a(9392),f=a(3951),j=u([].concat);o.exports=s("Reflect","ownKeys")||function(_){var D=c.f(f(_)),Y=p.f;return Y?j(D,Y(_)):D}},584:function(o,x,a){var s=a(8352).f;o.exports=function(u,c,p){p in u||s(u,p,{configurable:!0,get:function(){return c[p]},set:function(f){c[p]=f}})}},9092:function(o,x,a){var s=a(8448),u=a(3951),c=a(4328),p=a(1888),f=a(7680),j=TypeError;o.exports=function(_,D){var Y=_.exec;if(c(Y)){var O=s(Y,_,D);return O!==null&&u(O),O}if(p(_)==="RegExp")return s(f,_,D);throw new j("RegExp#exec called on incompatible receiver")}},7680:function(o,x,a){var s,u,c=a(8448),p=a(1664),f=a(5016),j=a(8872),_=a(3548),D=a(4696),Y=a(9368),O=a(9104).get,I=a(8e3),N=a(9124),S=D("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,T=v,L=p("".charAt),m=p("".indexOf),P=p("".replace),B=p("".slice),R=(u=/b*/g,c(v,s=/a/,"a"),c(v,u,"a"),s.lastIndex!==0||u.lastIndex!==0),A=_.BROKEN_CARET,H=/()??/.exec("")[1]!==void 0;(R||H||A||I||N)&&(T=function(J){var ie,ee,he,Z,ue,ae,ye,ce=this,Q=O(ce),ve=f(J),Ne=Q.raw;if(Ne)return Ne.lastIndex=ce.lastIndex,ie=c(T,Ne,ve),ce.lastIndex=Ne.lastIndex,ie;var _e=Q.groups,Ce=A&&ce.sticky,Re=c(j,ce),ze=ce.source,C=0,b=ve;if(Ce&&(Re=P(Re,"y",""),m(Re,"g")===-1&&(Re+="g"),b=B(ve,ce.lastIndex),ce.lastIndex>0&&(!ce.multiline||ce.multiline&&L(ve,ce.lastIndex-1)!==`
|
|
105
|
+
`)&&(ze="(?: "+ze+")",b=" "+b,C++),ee=new RegExp("^(?:"+ze+")",Re)),H&&(ee=new RegExp("^"+ze+"$(?!\\s)",Re)),R&&(he=ce.lastIndex),Z=c(v,Ce?ee:ce,b),Ce?Z?(Z.input=B(Z.input,C),Z[0]=B(Z[0],C),Z.index=ce.lastIndex,ce.lastIndex+=Z[0].length):ce.lastIndex=0:R&&Z&&(ce.lastIndex=ce.global?Z.index+Z[0].length:he),H&&Z&&Z.length>1&&c(S,Z[0],ee,(function(){for(ue=1;ue<arguments.length-2;ue++)arguments[ue]===void 0&&(Z[ue]=void 0)})),Z&&_e)for(Z.groups=ae=Y(null),ue=0;ue<_e.length;ue++)ae[(ye=_e[ue])[0]]=Z[ye[1]];return Z}),o.exports=T},8872:function(o,x,a){var s=a(3951);o.exports=function(){var u=s(this),c="";return u.hasIndices&&(c+="d"),u.global&&(c+="g"),u.ignoreCase&&(c+="i"),u.multiline&&(c+="m"),u.dotAll&&(c+="s"),u.unicode&&(c+="u"),u.unicodeSets&&(c+="v"),u.sticky&&(c+="y"),c}},3548:function(o,x,a){var s=a(9957),u=a(6420).RegExp,c=s((function(){var j=u("a","y");return j.lastIndex=2,j.exec("abcd")!==null})),p=c||s((function(){return!u("a","y").sticky})),f=c||s((function(){var j=u("^r","gy");return j.lastIndex=2,j.exec("str")!==null}));o.exports={BROKEN_CARET:f,MISSED_STICKY:p,UNSUPPORTED_Y:c}},8e3:function(o,x,a){var s=a(9957),u=a(6420).RegExp;o.exports=s((function(){var c=u(".","s");return!(c.dotAll&&c.test(`
|
|
106
|
+
`)&&c.flags==="s")}))},9124:function(o,x,a){var s=a(9957),u=a(6420).RegExp;o.exports=s((function(){var c=u("(?<a>b)","g");return c.exec("b").groups.a!=="b"||"b".replace(c,"$<a>c")!=="bc"}))},5436:function(o,x,a){var s=a(9760),u=TypeError;o.exports=function(c){if(s(c))throw new u("Can't call method on "+c);return c}},6504:function(o,x,a){var s=a(4696),u=a(7776),c=s("keys");o.exports=function(p){return c[p]||(c[p]=u(p))}},3976:function(o,x,a){var s=a(7048),u=a(6420),c=a(4636),p="__core-js_shared__",f=o.exports=u[p]||c(p,{});(f.versions||(f.versions=[])).push({version:"3.36.0",mode:s?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.36.0/LICENSE",source:"https://github.com/zloirock/core-js"})},4696:function(o,x,a){var s=a(3976);o.exports=function(u,c){return s[u]||(s[u]=c||{})}},9764:function(o,x,a){var s=a(1664),u=a(6180),c=a(5016),p=a(5436),f=s("".charAt),j=s("".charCodeAt),_=s("".slice),D=function(Y){return function(O,I){var N,S,v=c(p(O)),T=u(I),L=v.length;return T<0||T>=L?Y?"":void 0:(N=j(v,T))<55296||N>56319||T+1===L||(S=j(v,T+1))<56320||S>57343?Y?f(v,T):N:Y?_(v,T,T+2):S-56320+(N-55296<<10)+65536}};o.exports={codeAt:D(!1),charAt:D(!0)}},772:function(o,x,a){var s=a(8504),u=a(9957),c=a(6420).String;o.exports=!!Object.getOwnPropertySymbols&&!u((function(){var p=Symbol("symbol detection");return!c(p)||!(Object(p)instanceof Symbol)||!Symbol.sham&&s&&s<41}))},2495:function(o,x,a){var s=a(6180),u=Math.max,c=Math.min;o.exports=function(p,f){var j=s(p);return j<0?u(j+f,0):c(j,f)}},4096:function(o,x,a){var s=a(5712),u=a(5436);o.exports=function(c){return s(u(c))}},6180:function(o,x,a){var s=a(1748);o.exports=function(u){var c=+u;return c!=c||c===0?0:s(c)}},7584:function(o,x,a){var s=a(6180),u=Math.min;o.exports=function(c){var p=s(c);return p>0?u(p,9007199254740991):0}},4356:function(o,x,a){var s=a(5436),u=Object;o.exports=function(c){return u(s(c))}},7024:function(o,x,a){var s=a(8448),u=a(1632),c=a(7728),p=a(4504),f=a(2104),j=a(9972),_=TypeError,D=j("toPrimitive");o.exports=function(Y,O){if(!u(Y)||c(Y))return Y;var I,N=p(Y,D);if(N){if(O===void 0&&(O="default"),I=s(N,Y,O),!u(I)||c(I))return I;throw new _("Can't convert object to primitive value")}return O===void 0&&(O="number"),f(Y,O)}},88:function(o,x,a){var s=a(7024),u=a(7728);o.exports=function(c){var p=s(c,"string");return u(p)?p:p+""}},16:function(o,x,a){var s={};s[a(9972)("toStringTag")]="z",o.exports=String(s)==="[object z]"},5016:function(o,x,a){var s=a(4427),u=String;o.exports=function(c){if(s(c)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return u(c)}},36:function(o){var x=String;o.exports=function(a){try{return x(a)}catch{return"Object"}}},7776:function(o,x,a){var s=a(1664),u=0,c=Math.random(),p=s(1 .toString);o.exports=function(f){return"Symbol("+(f===void 0?"":f)+")_"+p(++u+c,36)}},6536:function(o,x,a){var s=a(772);o.exports=s&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},1576:function(o,x,a){var s=a(3476),u=a(9957);o.exports=s&&u((function(){return Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype!==42}))},4288:function(o,x,a){var s=a(6420),u=a(4328),c=s.WeakMap;o.exports=u(c)&&/native code/.test(String(c))},9972:function(o,x,a){var s=a(6420),u=a(4696),c=a(5152),p=a(7776),f=a(772),j=a(6536),_=s.Symbol,D=u("wks"),Y=j?_.for||_:_&&_.withoutSetter||p;o.exports=function(O){return c(D,O)||(D[O]=f&&c(_,O)?_[O]:Y("Symbol."+O)),D[O]}},6488:function(o,x,a){var s=a(5232),u=a(5152),c=a(3440),p=a(7e3),f=a(4024),j=a(9968),_=a(584),D=a(7512),Y=a(8948),O=a(3480),I=a(3696),N=a(3476),S=a(7048);o.exports=function(v,T,L,m){var P="stackTraceLimit",B=m?2:1,R=v.split("."),A=R[R.length-1],H=s.apply(null,R);if(H){var J=H.prototype;if(!S&&u(J,"cause")&&delete J.cause,!L)return H;var ie=s("Error"),ee=T((function(he,Z){var ue=Y(m?Z:he,void 0),ae=m?new H(he):new H;return ue!==void 0&&c(ae,"message",ue),I(ae,ee,ae.stack,2),this&&p(J,this)&&D(ae,this,ee),arguments.length>B&&O(ae,arguments[B]),ae}));if(ee.prototype=J,A!=="Error"?f?f(ee,ie):j(ee,ie,{name:!0}):N&&P in H&&(_(ee,H,P),_(ee,H,"prepareStackTrace")),j(ee,H),!S)try{J.name!==A&&c(J,"name",A),J.constructor=ee}catch{}return ee}}},7476:function(o,x,a){var s=a(9160),u=a(9957),c=a(1432),p=a(1632),f=a(4356),j=a(3556),_=a(4316),D=a(92),Y=a(2568),O=a(953),I=a(9972),N=a(8504),S=I("isConcatSpreadable"),v=N>=51||!u((function(){var L=[];return L[S]=!1,L.concat()[0]!==L})),T=function(L){if(!p(L))return!1;var m=L[S];return m!==void 0?!!m:c(L)};s({target:"Array",proto:!0,arity:1,forced:!v||!O("concat")},{concat:function(L){var m,P,B,R,A,H=f(this),J=Y(H,0),ie=0;for(m=-1,B=arguments.length;m<B;m++)if(T(A=m===-1?H:arguments[m]))for(R=j(A),_(ie+R),P=0;P<R;P++,ie++)P in A&&D(J,ie,A[P]);else _(ie+1),D(J,ie++,A);return J.length=ie,J}})},6932:function(o,x,a){var s=a(9160),u=a(3364).filter;s({target:"Array",proto:!0,forced:!a(953)("filter")},{filter:function(c){return u(this,c,arguments.length>1?arguments[1]:void 0)}})},700:function(o,x,a){var s=a(9160),u=a(1664),c=a(5712),p=a(4096),f=a(1496),j=u([].join);s({target:"Array",proto:!0,forced:c!==Object||!f("join",",")},{join:function(_){return j(p(this),_===void 0?",":_)}})},4456:function(o,x,a){var s=a(9160),u=a(3364).map;s({target:"Array",proto:!0,forced:!a(953)("map")},{map:function(c){return u(this,c,arguments.length>1?arguments[1]:void 0)}})},4728:function(o,x,a){var s=a(9160),u=a(4356),c=a(3556),p=a(6728),f=a(4316);s({target:"Array",proto:!0,arity:1,forced:a(9957)((function(){return[].push.call({length:4294967296},1)!==4294967297}))||!(function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(j){return j instanceof TypeError}})()},{push:function(j){var _=u(this),D=c(_),Y=arguments.length;f(D+Y);for(var O=0;O<Y;O++)_[D]=arguments[O],D++;return p(_,D),D}})},8752:function(o,x,a){var s=a(9160),u=a(6420),c=a(908),p=a(6488),f="WebAssembly",j=u[f],_=new Error("e",{cause:7}).cause!==7,D=function(O,I){var N={};N[O]=p(O,I,_),s({global:!0,constructor:!0,arity:1,forced:_},N)},Y=function(O,I){if(j&&j[O]){var N={};N[O]=p(f+"."+O,I,_),s({target:f,stat:!0,constructor:!0,arity:1,forced:_},N)}};D("Error",(function(O){return function(I){return c(O,this,arguments)}})),D("EvalError",(function(O){return function(I){return c(O,this,arguments)}})),D("RangeError",(function(O){return function(I){return c(O,this,arguments)}})),D("ReferenceError",(function(O){return function(I){return c(O,this,arguments)}})),D("SyntaxError",(function(O){return function(I){return c(O,this,arguments)}})),D("TypeError",(function(O){return function(I){return c(O,this,arguments)}})),D("URIError",(function(O){return function(I){return c(O,this,arguments)}})),Y("CompileError",(function(O){return function(I){return c(O,this,arguments)}})),Y("LinkError",(function(O){return function(I){return c(O,this,arguments)}})),Y("RuntimeError",(function(O){return function(I){return c(O,this,arguments)}}))},508:function(o,x,a){var s=a(3476),u=a(6208).EXISTS,c=a(1664),p=a(2544),f=Function.prototype,j=c(f.toString),_=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,D=c(_.exec);s&&!u&&p(f,"name",{configurable:!0,get:function(){try{return D(_,j(this))[1]}catch{return""}}})},232:function(o,x,a){var s=a(9160),u=a(9292);s({target:"Object",stat:!0,arity:2,forced:Object.assign!==u},{assign:u})},5443:function(o,x,a){var s=a(16),u=a(6076),c=a(7032);s||u(Object.prototype,"toString",c,{unsafe:!0})},880:function(o,x,a){var s=a(9160),u=a(7680);s({target:"RegExp",proto:!0,forced:/./.exec!==u},{exec:u})},9836:function(o,x,a){var s=a(8448),u=a(7176),c=a(3951),p=a(9760),f=a(7584),j=a(5016),_=a(5436),D=a(4504),Y=a(4764),O=a(9092);u("match",(function(I,N,S){return[function(v){var T=_(this),L=p(v)?void 0:D(v,I);return L?s(L,v,T):new RegExp(v)[I](j(T))},function(v){var T=c(this),L=j(v),m=S(N,T,L);if(m.done)return m.value;if(!T.global)return O(T,L);var P=T.unicode;T.lastIndex=0;for(var B,R=[],A=0;(B=O(T,L))!==null;){var H=j(B[0]);R[A]=H,H===""&&(T.lastIndex=Y(L,f(T.lastIndex),P)),A++}return A===0?null:R}]}))},3536:function(o,x,a){var s=a(9160),u=a(6420),c=a(6100),p=a(3951),f=a(4328),j=a(7796),_=a(2544),D=a(92),Y=a(9957),O=a(5152),I=a(9972),N=a(336).IteratorPrototype,S=a(3476),v=a(7048),T="constructor",L="Iterator",m=I("toStringTag"),P=TypeError,B=u[L],R=v||!f(B)||B.prototype!==N||!Y((function(){B({})})),A=function(){if(c(this,N),j(this)===N)throw new P("Abstract class Iterator not directly constructable")},H=function(J,ie){S?_(N,J,{configurable:!0,get:function(){return ie},set:function(ee){if(p(this),this===N)throw new P("You can't redefine this property");O(this,J)?this[J]=ee:D(this,J,ee)}}):N[J]=ie};O(N,m)||H(m,L),!R&&O(N,T)&&N[T]!==Object||H(T,A),A.prototype=N,s({global:!0,constructor:!0,forced:R},{Iterator:A})},2144:function(o,x,a){var s=a(9160),u=a(8448),c=a(8952),p=a(3951),f=a(6752),j=a(9724),_=a(8696),D=a(7048),Y=j((function(){for(var O,I,N=this.iterator,S=this.predicate,v=this.next;;){if(O=p(u(v,N)),this.done=!!O.done)return;if(I=O.value,_(N,S,[I,this.counter++],!0))return I}}));s({target:"Iterator",proto:!0,real:!0,forced:D},{filter:function(O){return p(this),c(O),new Y(f(this),{predicate:O})}})},9080:function(o,x,a){var s=a(9160),u=a(5792);s({target:"Iterator",proto:!0,real:!0,forced:a(7048)},{map:u})}},z={};function $(o){var x=z[o];if(x!==void 0)return x.exports;var a=z[o]={exports:{}};return d[o].call(a.exports,a,a.exports,$),a.exports}$.d=function(o,x){for(var a in x)$.o(x,a)&&!$.o(o,a)&&Object.defineProperty(o,a,{enumerable:!0,get:x[a]})},$.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),$.o=function(o,x){return Object.prototype.hasOwnProperty.call(o,x)},$.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})};var X={};return(function(){$.r(X),$.d(X,{default:function(){return _}}),$(8752),$(6932),$(700),$(4456),$(4728),$(508),$(232),$(5443),$(880),$(9836),$(3536),$(2144),$(9080);var o=$(680);$(7476);function x(D,Y){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(O,I){return O.__proto__=I,O},x(D,Y)}var a=(function(D){var Y,O;function I(){for(var S,v=arguments.length,T=new Array(v),L=0;L<v;L++)T[L]=arguments[L];return(S=D.call.apply(D,[this].concat(T))||this).state={bump:!1,debounced:!1},S}O=D,(Y=I).prototype=Object.create(O.prototype),Y.prototype.constructor=Y,x(Y,O);var N=I.prototype;return N.componentWillMount=function(){var S,v,T,L=this;this.debounceStatusUpdate=(S=function(){if(!L.state.debounced){var m=!L.props.isInFocus||L.props.validChoiceMade;L.setState((function(P){return{bump:!P.bump,debounced:!0,silenced:m}}))}},v=1400,function(){var m=this,P=arguments;clearTimeout(T),T=setTimeout((function(){T=null,S.apply(m,P)}),v)})},N.componentWillReceiveProps=function(S){S.queryLength,this.setState({debounced:!1})},N.render=function(){var S=this.props,v=S.id,T=S.length,L=S.queryLength,m=S.minQueryLength,P=S.selectedOption,B=S.selectedOptionIndex,R=S.tQueryTooShort,A=S.tNoResults,H=S.tSelectedOption,J=S.tResults,ie=S.className,ee=this.state,he=ee.bump,Z=ee.debounced,ue=ee.silenced,ae=L<m,ye=T===0,ce=P?H(P,T,B):"",Q=null;return Q=ae?R(m):ye?A():J(T,ce),this.debounceStatusUpdate(),(0,o.createElement)("div",{className:ie,style:{border:"0",clip:"rect(0 0 0 0)",height:"1px",marginBottom:"-1px",marginRight:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}},(0,o.createElement)("div",{id:v+"__status--A",role:"status","aria-atomic":"true","aria-live":"polite"},!ue&&Z&&he?Q:""),(0,o.createElement)("div",{id:v+"__status--B",role:"status","aria-atomic":"true","aria-live":"polite"},ue||!Z||he?"":Q))},I})(o.Component);a.defaultProps={tQueryTooShort:function(D){return"Type in "+D+" or more characters for results"},tNoResults:function(){return"No search results"},tSelectedOption:function(D,Y,O){return D+" "+(O+1)+" of "+Y+" is highlighted"},tResults:function(D,Y){return D+" "+(D===1?"result":"results")+" "+(D===1?"is":"are")+" available. "+Y}};var s=function(D){var Y=D.className;return(0,o.createElement)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:Y,focusable:"false"},(0,o.createElement)("g",{stroke:"none",fill:"none","fill-rule":"evenodd"},(0,o.createElement)("polygon",{fill:"#000000",points:"0 0 22 0 11 17"})))};function u(){return u=Object.assign?Object.assign.bind():function(D){for(var Y=1;Y<arguments.length;Y++){var O=arguments[Y];for(var I in O)Object.prototype.hasOwnProperty.call(O,I)&&(D[I]=O[I])}return D},u.apply(this,arguments)}function c(D){if(D===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return D}function p(D,Y){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(O,I){return O.__proto__=I,O},p(D,Y)}var f={13:"enter",27:"escape",32:"space",38:"up",40:"down"};function j(){return typeof navigator<"u"&&!(!navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||!navigator.userAgent.match(/AppleWebKit/g))}var _=(function(D){var Y,O;function I(S){var v;return(v=D.call(this,S)||this).elementReferences={},v.state={focused:null,hovered:null,menuOpen:!1,options:S.defaultValue?[S.defaultValue]:[],query:S.defaultValue,validChoiceMade:!1,selected:null,ariaHint:!0},v.handleComponentBlur=v.handleComponentBlur.bind(c(v)),v.handleKeyDown=v.handleKeyDown.bind(c(v)),v.handleUpArrow=v.handleUpArrow.bind(c(v)),v.handleDownArrow=v.handleDownArrow.bind(c(v)),v.handleEnter=v.handleEnter.bind(c(v)),v.handlePrintableKey=v.handlePrintableKey.bind(c(v)),v.handleListMouseLeave=v.handleListMouseLeave.bind(c(v)),v.handleOptionBlur=v.handleOptionBlur.bind(c(v)),v.handleOptionClick=v.handleOptionClick.bind(c(v)),v.handleOptionFocus=v.handleOptionFocus.bind(c(v)),v.handleOptionMouseDown=v.handleOptionMouseDown.bind(c(v)),v.handleOptionMouseEnter=v.handleOptionMouseEnter.bind(c(v)),v.handleInputBlur=v.handleInputBlur.bind(c(v)),v.handleInputChange=v.handleInputChange.bind(c(v)),v.handleInputClick=v.handleInputClick.bind(c(v)),v.handleInputFocus=v.handleInputFocus.bind(c(v)),v.pollInputElement=v.pollInputElement.bind(c(v)),v.getDirectInputChanges=v.getDirectInputChanges.bind(c(v)),v}O=D,(Y=I).prototype=Object.create(O.prototype),Y.prototype.constructor=Y,p(Y,O);var N=I.prototype;return N.isQueryAnOption=function(S,v){var T=this;return v.map((function(L){return T.templateInputValue(L).toLowerCase()})).indexOf(S.toLowerCase())!==-1},N.componentDidMount=function(){this.pollInputElement()},N.componentWillUnmount=function(){clearTimeout(this.$pollInput)},N.pollInputElement=function(){var S=this;this.getDirectInputChanges(),this.$pollInput=setTimeout((function(){S.pollInputElement()}),100)},N.getDirectInputChanges=function(){var S=this.elementReferences[-1];S&&S.value!==this.state.query&&this.handleInputChange({target:{value:S.value}})},N.componentDidUpdate=function(S,v){var T=this.state.focused,L=T===null,m=v.focused!==T;m&&!L&&this.elementReferences[T].focus();var P=T===-1,B=m&&v.focused===null;if(P&&B){var R=this.elementReferences[T];R.setSelectionRange(0,R.value.length)}},N.hasAutoselect=function(){return!j()&&this.props.autoselect},N.templateInputValue=function(S){var v=this.props.templates&&this.props.templates.inputValue;return v?v(S):S},N.templateSuggestion=function(S){var v=this.props.templates&&this.props.templates.suggestion;return v?v(S):S},N.handleComponentBlur=function(S){var v,T=this.state,L=T.options,m=T.query,P=T.selected;this.props.confirmOnBlur?(v=S.query||m,this.props.onConfirm(L[P])):v=m,this.setState({focused:null,menuOpen:S.menuOpen||!1,query:v,selected:null,validChoiceMade:this.isQueryAnOption(v,L)})},N.handleListMouseLeave=function(S){this.setState({hovered:null})},N.handleOptionBlur=function(S,v){var T=this.state,L=T.focused,m=T.menuOpen,P=T.options,B=T.selected,R=S.relatedTarget===null,A=S.relatedTarget===this.elementReferences[-1],H=L!==v&&L!==-1;if(!H&&R||!(H||A)){var J=m&&j();this.handleComponentBlur({menuOpen:J,query:this.templateInputValue(P[B])})}},N.handleInputBlur=function(S){var v=this.state,T=v.focused,L=v.menuOpen,m=v.options,P=v.query,B=v.selected;if(T===-1){var R=L&&j(),A=j()?P:this.templateInputValue(m[B]);this.handleComponentBlur({menuOpen:R,query:A})}},N.handleInputChange=function(S){var v=this,T=this.props,L=T.minLength,m=T.source,P=T.showAllValues,B=this.hasAutoselect(),R=S.target.value,A=R.length===0,H=this.state.query!==R,J=R.length>=L;this.setState({query:R,ariaHint:A}),P||!A&&H&&J?m(R,(function(ie){var ee=ie.length>0;v.setState({menuOpen:ee,options:ie,selected:B&&ee?0:-1,validChoiceMade:!1})})):!A&&J||this.setState({menuOpen:!1,options:[]})},N.handleInputClick=function(S){this.handleInputChange(S)},N.handleInputFocus=function(S){var v=this.state,T=v.query,L=v.validChoiceMade,m=v.options,P=this.props.minLength,B=!L&&T.length>=P&&m.length>0;B?this.setState((function(R){var A=R.menuOpen;return{focused:-1,menuOpen:B||A,selected:-1}})):this.setState({focused:-1})},N.handleOptionFocus=function(S){this.setState({focused:S,hovered:null,selected:S})},N.handleOptionMouseEnter=function(S,v){j()||this.setState({hovered:v})},N.handleOptionClick=function(S,v){var T=this.state.options[v],L=this.templateInputValue(T);this.props.onConfirm(T),this.setState({focused:-1,hovered:null,menuOpen:!1,query:L,selected:-1,validChoiceMade:!0}),this.forceUpdate()},N.handleOptionMouseDown=function(S){S.preventDefault()},N.handleUpArrow=function(S){S.preventDefault();var v=this.state,T=v.menuOpen,L=v.selected;L!==-1&&T&&this.handleOptionFocus(L-1)},N.handleDownArrow=function(S){var v=this;if(S.preventDefault(),this.props.showAllValues&&this.state.menuOpen===!1)S.preventDefault(),this.props.source("",(function(B){v.setState({menuOpen:!0,options:B,selected:0,focused:0,hovered:null})}));else if(this.state.menuOpen===!0){var T=this.state,L=T.menuOpen,m=T.options,P=T.selected;P!==m.length-1&&L&&this.handleOptionFocus(P+1)}},N.handleSpace=function(S){var v=this;this.props.showAllValues&&this.state.menuOpen===!1&&this.state.query===""&&(S.preventDefault(),this.props.source("",(function(T){v.setState({menuOpen:!0,options:T})}))),this.state.focused!==-1&&(S.preventDefault(),this.handleOptionClick(S,this.state.focused))},N.handleEnter=function(S){this.state.menuOpen&&(S.preventDefault(),this.state.selected>=0&&this.handleOptionClick(S,this.state.selected))},N.handlePrintableKey=function(S){var v=this.elementReferences[-1];S.target===v||v.focus()},N.handleKeyDown=function(S){switch(f[S.keyCode]){case"up":this.handleUpArrow(S);break;case"down":this.handleDownArrow(S);break;case"space":this.handleSpace(S);break;case"enter":this.handleEnter(S);break;case"escape":this.handleComponentBlur({query:this.state.query});break;default:((v=S.keyCode)>47&&v<58||v===32||v===8||v>64&&v<91||v>95&&v<112||v>185&&v<193||v>218&&v<223)&&this.handlePrintableKey(S)}var v},N.render=function(){var S,v=this,T=this.props,L=T.cssNamespace,m=T.displayMenu,P=T.id,B=T.minLength,R=T.name,A=T.placeholder,H=T.required,J=T.showAllValues,ie=T.tNoResults,ee=T.tStatusQueryTooShort,he=T.tStatusNoResults,Z=T.tStatusSelectedOption,ue=T.tStatusResults,ae=T.tAssistiveHint,ye=T.dropdownArrow,ce=T.menuAttributes,Q=T.inputClasses,ve=T.hintClasses,Ne=T.menuClasses,_e=this.state,Ce=_e.focused,Re=_e.hovered,ze=_e.menuOpen,C=_e.options,b=_e.query,V=_e.selected,k=_e.ariaHint,E=_e.validChoiceMade,F=this.hasAutoselect(),te=Ce===-1,se=C.length===0,be=b.length!==0,de=b.length>=B,me=this.props.showNoOptionsFound&&te&&se&&be&&de,xe=L+"__wrapper",Ae=L+"__status",$e=L+"__dropdown-arrow-down",Ie=Ce!==-1&&Ce!==null,Ge=L+"__option",Qe=L+"__hint",ge=this.templateInputValue(C[V]),we=ge&&ge.toLowerCase().indexOf(b.toLowerCase())===0&&F?b+ge.substr(b.length):"",Ze=P+"__assistiveHint",tt={"aria-describedby":k?Ze:null,"aria-expanded":ze?"true":"false","aria-activedescendant":Ie?P+"__option--"+Ce:null,"aria-controls":P+"__listbox","aria-autocomplete":this.hasAutoselect()?"both":"list"};J&&typeof(S=ye({className:$e}))=="string"&&(S=(0,o.createElement)("div",{className:L+"__dropdown-arrow-down-wrapper",dangerouslySetInnerHTML:{__html:S}}));var ht=L+"__input",vt=[ht,this.props.showAllValues?ht+"--show-all-values":ht+"--default"];Ce!==null&&vt.push(ht+"--focused"),Q&&vt.push(Q);var pt=L+"__menu",lt=[pt,pt+"--"+m,pt+"--"+(ze||me?"visible":"hidden")];Ne&<.push(Ne),(ce!=null&&ce.class||ce!=null&&ce.className)&<.push((ce==null?void 0:ce.class)||(ce==null?void 0:ce.className));var _t=Object.assign({"aria-labelledby":P},ce,{id:P+"__listbox",role:"listbox",className:lt.join(" "),onMouseLeave:this.handleListMouseLeave});return delete _t.class,(0,o.createElement)("div",{className:xe,onKeyDown:this.handleKeyDown},(0,o.createElement)(a,{id:P,length:C.length,queryLength:b.length,minQueryLength:B,selectedOption:this.templateInputValue(C[V]),selectedOptionIndex:V,validChoiceMade:E,isInFocus:this.state.focused!==null,tQueryTooShort:ee,tNoResults:he,tSelectedOption:Z,tResults:ue,className:Ae}),we&&(0,o.createElement)("span",null,(0,o.createElement)("input",{className:[Qe,ve===null?Q:ve].filter(Boolean).join(" "),readonly:!0,tabIndex:"-1",value:we})),(0,o.createElement)("input",u({},tt,{autoComplete:"off",className:vt.join(" "),id:P,onClick:this.handleInputClick,onBlur:this.handleInputBlur},{onChange:this.handleInputChange},{onFocus:this.handleInputFocus,name:R,placeholder:A,ref:function(bt){v.elementReferences[-1]=bt},type:"text",role:"combobox",required:H,value:b})),S,(0,o.createElement)("ul",_t,C.map((function(bt,Ue){var gt=(Ce===-1?V===Ue:Ce===Ue)&&Re===null?" "+Ge+"--focused":"",ft=Ue%2?" "+Ge+"--odd":"",ut=j()?"<span id="+P+"__option-suffix--"+Ue+' style="border:0;clip:rect(0 0 0 0);height:1px;marginBottom:-1px;marginRight:-1px;overflow:hidden;padding:0;position:absolute;whiteSpace:nowrap;width:1px"> '+(Ue+1)+" of "+C.length+"</span>":"";return(0,o.createElement)("li",{"aria-selected":Ce===Ue?"true":"false",className:""+Ge+gt+ft,dangerouslySetInnerHTML:{__html:v.templateSuggestion(bt)+ut},id:P+"__option--"+Ue,key:Ue,onBlur:function(it){return v.handleOptionBlur(it,Ue)},onClick:function(it){return v.handleOptionClick(it,Ue)},onMouseDown:v.handleOptionMouseDown,onMouseEnter:function(it){return v.handleOptionMouseEnter(it,Ue)},ref:function(it){v.elementReferences[Ue]=it},role:"option",tabIndex:"-1","aria-posinset":Ue+1,"aria-setsize":C.length})})),me&&(0,o.createElement)("li",{className:Ge+" "+Ge+"--no-results",role:"option","aria-disabled":"true"},ie())),(0,o.createElement)("span",{id:Ze,style:{display:"none"}},ae()))},I})(o.Component);_.defaultProps={autoselect:!1,cssNamespace:"autocomplete",defaultValue:"",displayMenu:"inline",minLength:0,name:"input-autocomplete",placeholder:"",onConfirm:function(){},confirmOnBlur:!0,showNoOptionsFound:!0,showAllValues:!1,required:!1,tNoResults:function(){return"No results found"},tAssistiveHint:function(){return"When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures."},dropdownArrow:s,menuAttributes:{},inputClasses:null,hintClasses:null,menuClasses:null}})(),X})()}))})(ya)),ya.exports}var rr,bn;function Tc(){return bn||(bn=1,rr=jc()),rr}var Cc=Tc();const Nc=ol(Cc),Pc=({value:y,defaultValue:i="",onConfirm:g,source:d,disabled:z,onClear:$,tClearInput:X=()=>"Clear input",...o})=>{const x=q.useRef(null),a=p=>{setTimeout(()=>{x.current&&(x.current.elementReferences[-1].value=p)},0)};q.useEffect(()=>{y!==void 0&&a(y)},[y]),q.useEffect(()=>{z?x.current&&(x.current.elementReferences[-1].disabled=!0):x.current&&(x.current.elementReferences[-1].disabled=!1)},[z]);const s=()=>{$&&$()},u=(p,f)=>{x.current.elementReferences[-1].classList.contains("autocomplete__input--focused")&&d(p,f)},c=p=>{p?g(p):a(y)};return h.jsxs("div",{style:{position:"relative",width:"100%"},children:[h.jsx(Nc,{ref:x,...o,defaultValue:i,onConfirm:c,source:u}),!!(y&&y.length>0&&!z)&&h.jsx("button",{onClick:s,style:{position:"absolute",right:"0px",top:"50%",transform:"translateY(-50%)",background:"transparent",border:"none",cursor:"pointer",padding:0},"aria-label":X(),children:h.jsx(le.Icon,{icon:"it-close",size:"sm",title:X()})})]})},Ec="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==",Ac="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=",Rc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",Ic=({position:y,areasLayer:i,bounds:g,onMarkedMoved:d})=>{const z=q.useRef(null);let $=null;const[X,o]=q.useState([]),x=Rt.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'}),a=[41.9,12.5],s=()=>{const u=Rt.map(z.current,{keyboard:!1,minZoom:6,maxZoom:17}).setView(a,10);x.addTo(u),i&&i.map(p=>{p.addTo(u)});const c=y?[`${y.lat}`,`${y.lon}`]:g?g.getCenter():a;if(delete Rt.Icon.Default.prototype._getIconUrl,Rt.Icon.Default.mergeOptions({iconRetinaUrl:Ec,iconUrl:Ac,shadowUrl:Rc}),$=Rt.marker(c,{draggable:!0}).addTo(u),$.on("moveend",function(p){const f=p.target.getLatLng();d(f,$)}),!y&&g)u.fitBounds(g);else{const p=y?[y.lat,y.lon]:a;$&&($.setLatLng(p).update(),u.setView(p,15))}};return q.useEffect(()=>{z.current&&s()},[z]),h.jsx("div",{className:"d-block",style:{height:"60vh",width:"100%",display:"block"},children:h.jsx("div",{ref:z,style:{height:"100%",width:"100%"},"aria-hidden":!0})})},Fc=({component:y,value:i,current:g,onChange:d,i18next:z})=>{const[$,X]=q.useState(null),[o,x]=q.useState([]),[a,s]=q.useState(),[u,c]=q.useState(),[p,f]=q.useState(!1),[j,_]=q.useState(),[D,Y]=q.useState(!1),[O,I]=q.useState(),[N,S]=q.useState(),[v,T]=q.useState(!1),[L,m]=q.useState(""),[P,B]=q.useState(""),[R,A]=q.useState(!1),[H,J]=q.useState(!1),ee=new URLSearchParams(window.location.search).get("area"),{geographic_areas_id:he}=window.OC_SERVICE_DETAILS,Z=q.useRef(),ue=z.language;let ae=Rt.latLngBounds();const ye=ee||(he&&he.length>0?he:void 0),ce=(C,b)=>{Z.current=C;const V=`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(C)}&countrycodes=it&viewbox=${a}&bounded=1&addressdetails=1&limit=14&format=jsonv2&accept-language=${ue}`;let k=[],E=[];Y(!0),fetch(V).then(F=>F.json()).then(F=>{if(F.length&&Z.current===C){Y(!0);const te=F.map((se,be)=>{const{lat:de,lon:me}=se,xe=`${Fe()}/api/geographic-areas/contains?lat=${de}&lon=${me}&geographic_areas_ids=${j.join(",")}`;return fetch(xe).then(Ae=>Ae.json()).then(Ae=>Ae.result?(se.label=Za(se),se):null)});return Promise.all(te)}else Z.current===C&&(b([]),Y(!1))}).then(F=>{F=F?F.filter(te=>te!==null):[],F.length>0?(F.forEach((te,se)=>{F[se].label=Za(te)}),F=en.uniqWith(F,(te,se)=>te.label===se.label),F.forEach((te,se)=>{E.push(te.label),k.push(te)}),Z.current===C&&(b(E),x(k),Y(!1))):Z.current===C&&(b([]),Y(!1))}).catch(F=>{console.error("Error fetching locations:",F),Y(!1)})},Q=(C,b)=>{ce(C,b)},ve=(C,b)=>{const{lat:V,lng:k}=C,E=`https://nominatim.openstreetmap.org/reverse?format=jsonv2&lat=${V}&lon=${k}&accept-language=${ue}`;fetch(E).then(F=>F.json()).then(F=>{if(F&&F.display_name)if(F.label=Za(F),F.lat=V,F.lon=k,b)b.bindPopup(`${F.label}`).openPopup(),S(F);else{S(F);return}}).catch(F=>console.error("Error with reverse geocoding:",F))};function Ne(){navigator.geolocation.getCurrentPosition(C=>{let b=C.coords.latitude,V=C.coords.longitude;if((j||[]).length>0){const E=`${Fe()}/api/geographic-areas/contains?lat=${b}&lon=${V}&geographic_areas_ids=${j.join(",")}`;fetch(E).then(F=>F.json()).then(F=>{F.result&&(X({lat:b,lon:V}),ve({lat:b,lng:V})),J(!H)})}else X({lat:b,lon:V}),ve({lat:b,lng:V}),J(!H)},C=>{(C==null?void 0:C.code)===1?(A(!R),B(z.t("error_message_code_1"))):(C==null?void 0:C.code)===2?(A(!R),B(z.t("error_message_code_2"))):(C==null?void 0:C.code)===3?(A(!R),B(z.t("error_message_code_3"))):(A(!R),B(z.t("error_message_generic")))})}q.useEffect(()=>{i&&X(i),g.valuePosition&&X(g.valuePosition)},[i,g]);const _e=()=>{i&&X(i),g.valuePosition&&X(g.valuePosition)};q.useEffect(()=>{var C;(C=window==null?void 0:window.Formio)==null||C.formioReady.then(()=>{setTimeout(()=>{_e(),Ce()},1)})},[]);const Ce=()=>{let b=`${Fe()}/api/geographic-areas`,V=[],k=[];fetch(b).then(E=>E.json()).then(E=>{if(Array.isArray(E)&&E.length>0){E.filter(se=>ye?Array.isArray(ye)?ye.includes(se.id):se.id===ye:!0).forEach(se=>{V.push(se.id);const be=JSON.parse(se.geofence),de=Rt.geoJSON(be,{style:{color:"#3478bd",fillColor:"#87CEEB",fillOpacity:.2,weight:1.5},filter:function(me){return me.geometry.type==="Polygon"||me.geometry.type==="MultiPolygon"}});ae.extend(de.getBounds()),k.push(de)}),c(k),_(V),I(ae);const F=ae.getNorthEast(),te=ae.getSouthWest();s([F.lng,F.lat,te.lng,te.lat])}else console.log("No geographic_areas_ids found.")}).catch(E=>{console.error("Error with reverse geocoding:",E)})},Re=()=>{m($!=null&&$.label?$.label:"")};q.useEffect(()=>{Re(),d($)},[$]),q.useEffect(()=>{document.querySelector(".formio-read-only")&&v===!1?T(!0):T(!1)},[]);const ze=()=>{if(N){const C=`${Fe()}/api/geographic-areas/contains?lat=${N.lat}&lon=${N.lon}&geographic_areas_ids=${j.join(",")}`;f(!0),fetch(C).then(b=>b.json()).then(b=>{f(!1),b?b.result===!1?Je.fire({title:"",html:"<p>"+z.t("Attenzione: Il luogo selezionato si trova al di fuori dell’area coperta dal servizio. Per favore, scegli un luogo all'interno dell'area evidenziata nella mappa.")+"</p>",icon:"error",cancelButtonText:z.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}):b.result===!0&&(J(!H),X(N)):(f(!1),console.log("No geographic-areas/contains ."))}).catch(b=>{console.error("Error with geographic-areas/contains:",b),Je.fire({title:"",html:"<p>"+b+"</p>",icon:"error",cancelButtonText:z.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})}};return h.jsx("div",{children:h.jsxs("div",{id:`address-map-container-${y.key}`,className:"address-map-container",children:[h.jsx("div",{children:h.jsxs(le.Modal,{wrapClassName:"formio-component-address_map",isOpen:H,size:"lg",scrollable:!0,toggle:()=>J(!H),labelledBy:"esempio2",container:document.body,children:[h.jsx(le.ModalHeader,{toggle:()=>J(!H),id:"esempio2",children:z.t("Individua il luogo sulla mappa")}),h.jsxs(le.ModalBody,{children:[h.jsx("p",{children:h.jsx("small",{children:z.t("Trascina l’icona nel punto preciso in cui si verifica l’evento che vuoi segnalare e fai click su Salva indirizzo")})}),h.jsx(Ic,{position:$,areasLayer:u,bounds:O,onMarkedMoved:(C,b)=>{ve(C,b)}})]}),h.jsxs(le.ModalFooter,{children:[h.jsx(le.Button,{color:"secondary",onClick:()=>J(!H),children:z.t("Chiudi")}),h.jsx(le.Button,{color:"primary",onClick:()=>{ze()},disabled:!N||p,children:z.t("Salva indirizzo")})]})]})}),h.jsx("div",{children:h.jsxs(le.Modal,{isOpen:R,toggle:()=>A(!R),withIcon:!0,labelledBy:"error-modal-message",container:document.body,children:[h.jsx(le.ModalHeader,{icon:"it-info-circle",id:"error-modal-message",children:z.t("warning")}),h.jsx(le.ModalBody,{children:h.jsx("p",{children:P})}),h.jsx(le.ModalFooter,{children:h.jsx(le.Button,{color:"primary",onClick:()=>A(!R),children:z.t("close")})})]})}),h.jsxs("div",{className:"position-relative",children:[h.jsx(Pc,{id:`${y.id}-${y.key}`,inputClasses:"form-control",source:en.debounce(Q,520),onConfirm:C=>{if(Y(!1),Z.current="",C){C===""&&X(null);let b=o.find(V=>V.label===C);X(b)}},onClear:()=>{Y(!1),Z.current="",X(null)},dropdownArrow:()=>null,minLength:3,disabled:v,confirmOnBlur:!0,showNoOptionsFound:!D,defaultValue:$==null?void 0:$.label,value:L,tNoResults:()=>z.t("Nessun risultato trovato, prova a inserire l'indirizzo completo"),tClearInput:()=>z.t("Clear input")}),D&&h.jsx("div",{className:"position-absolute",style:{width:"100%",bottom:"0px"},children:h.jsx(le.Progress,{indeterminate:!0,label:"In elaborazione..."})})]}),!v&&h.jsxs(le.Button,{type:"button",value:z.t("Individua con precisione sulla mappa"),onClick:()=>{/Mobi|Android/i.test(navigator.userAgent)?Ne():(J(!0),S(!1))},icon:!0,className:"px-0 primary-color",children:[h.jsx(le.Icon,{color:"primary",icon:"it-map-marker-circle",role:"presentation"}),h.jsx("span",{children:z.t("Individua con precisione sulla mappa")})]})]})})},ja=class ja extends ot.ReactComponent{constructor(i,g,d){super(i,g,d)}static get builderInfo(){return{title:"Address Map",group:"basic",icon:"fa fa-map-location-dot",documentation:"",weight:70,schema:ja.schema()}}static schema(){return ot.ReactComponent.schema({type:"address_map"})}attachReact(i,g){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(Fc,{ref:g,component:this.component,value:this.dataValue,onChange:d=>this.setValue(d),...this,current:this},this.dataValue))}setValue(i){this.valuePosition=i,this.updateValue(i)}getValue(){return this.valuePosition}init(){super.init()}render(){return super.render(`<div id="react-${this.id} ref="react-${this.id}"></div>`)}};Ct(ja,"editForm",Yc);let Ma=ja;const zc=[{key:"labelPosition",ignore:!0},{key:"placeholder",ignore:!0},{key:"description",ignore:!0},{key:"hideLabel",ignore:!0},{key:"autofocus",ignore:!0},{key:"tooltip",ignore:!0},{key:"tabindex",ignore:!0},{key:"disabled",ignore:!0},{label:"Base url",calculateValue:"let url = '"+Fe()+"'; data.url = url; value=url;",key:"url",type:"hidden",input:!0,weight:1}];function Lc(...y){return ot.Components.baseEditForm([{key:"display",components:zc}],...y)}const wn=cr.Formio.Components.components.input,Wc=({component:y,current:i,onChange:g,i18next:d})=>{var B,R;const z="list-services",$="selected-category",[X,o]=q.useState([]),[x,a]=q.useState([]),[s,u]=q.useState(null),[c,p]=q.useState(null),[f,j]=q.useState(""),[_,D]=q.useState(!1),[Y,O]=q.useState(!1),I=q.useRef(!1),N=q.useRef(),S=q.useMemo(()=>{if(!s)return null;const A=x.find(J=>J.name===s);return A||X.find(J=>J.name===s)||null},[s,x,X]),v=q.useMemo(()=>(S==null?void 0:S.services)||[],[S]),T=async()=>{var Z,ue;O(!0);const A=sessionStorage.getItem(z),H=sessionStorage.getItem($);if(A)try{const ae=JSON.parse(A);if(Array.isArray(ae)&&ae.length>0){o(ae),a(ae);const ye=ae.find(ce=>ce.name===H)||ae[0];return u((ye==null?void 0:ye.name)||null),O(!1),ae}}catch{console.warn("⚠️ Cache corrotta, rigenerazione...")}const J=await window.FormioHelper.getBookingConfig(),ie={};J.forEach(ae=>{(ae.categories??[]).forEach(ye=>{ie[ye]||(ie[ye]={name:ye,services:[]}),ie[ye].services.push(ae)})});const ee=Object.fromEntries(Object.entries(ie).sort(([ae],[ye])=>ae.localeCompare(ye,"it",{sensitivity:"base"}))),he=Object.values(ee).filter(ae=>(ae.name??"").trim()!=="");return o(he),a(he),u(((Z=he[0])==null?void 0:Z.name)||null),sessionStorage.setItem(z,JSON.stringify(he)),sessionStorage.setItem($,((ue=he[0])==null?void 0:ue.name)||""),O(!1),he};q.useEffect(()=>{s&&sessionStorage.setItem($,s)},[s]),q.useEffect(()=>{I.current||(I.current=!0,T())},[]);const L=A=>{var Q;const H=(ve="")=>ve.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),J=(ve="")=>ve.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g," ").trim(),ie=(ve="")=>ve.replace(/<[^>]*>/g," "),ee=(ve,Ne)=>new RegExp(`\\b${H(Ne)}`,"i").test(ve),he=(ve,Ne)=>{const _e=J(ve.name),Ce=J((ve.categories??[]).join(" ")),Re=J(ie(ve.abstract??""));if(!Ne.every(b=>ee(_e,b)||ee(Ce,b)||ee(Re,b)))return-1;let C=0;for(const b of Ne)ee(_e,b)?C+=3:ee(Ce,b)?C+=2:ee(Re,b)&&(C+=1);return C},Z=A.target.value;j(Z);const ue=J(Z);if(!ue){a(X),u(ve=>{var Ne;return ve??((Ne=X[0])==null?void 0:Ne.name)??null});return}const ae=ue.split(" ").filter(Boolean),ye=X.map(ve=>{const Ne=ve.services.map(_e=>({service:_e,score:he(_e,ae)})).filter(_e=>_e.score>=0).sort((_e,Ce)=>Ce.score-_e.score).map(_e=>_e.service);return Ne.length?{...ve,services:Ne}:null}).filter(Boolean);a(ye);const ce=ye.some(ve=>ve.name===s);u(ce?s:((Q=ye[0])==null?void 0:Q.name)??null)},m=A=>{p(A);const H=X.find(J=>J.services.some(ie=>ie.id===A.id));H&&u(H.name),g({id:A.id,link:A.link,name:A.name,show_howto_in_motivation:A.show_howto_in_motivation,categories:A.categories,offices:A.offices,abstract:A.abstract,view_type:A.view_type}),i.data.user_group=null,Tn()},P=A=>{u(A.name),p(null),j(""),a(X),g({})};return q.useEffect(()=>{const A=!!document.querySelector(".formio-read-only");D(A)},[]),q.useEffect(()=>{const A=setTimeout(()=>{const H=(i==null?void 0:i.dataValue)??(i==null?void 0:i.getValue());if(H!=null&&H.id&&(p(H),X.length>0)){const J=X.find(ie=>ie.services.some(ee=>ee.id===H.id));J&&u(J.name)}},500);return()=>clearTimeout(A)},[i==null?void 0:i.dataValue,i==null?void 0:i.data,X]),q.useEffect(()=>{const A=window.FormioInstance;if(!A)return;const H=()=>{var ie,ee,he;const J=(he=(ie=A.submission)==null?void 0:ie.data)==null?void 0:he[(ee=i==null?void 0:i.component)==null?void 0:ee.key];if(J!=null&&J.id&&(p(J),X.length>0)){const Z=X.find(ue=>ue.services.some(ae=>ae.id===J.id));Z&&u(Z.name)}};return A.on("change",H),()=>A.off("change",H)},[X,(B=i==null?void 0:i.component)==null?void 0:B.key]),Y?h.jsx("div",{className:"services-booking",ref:N,children:h.jsxs("div",{children:[d.t("Caricamento in corso"),"..."]})}):h.jsx("div",{className:"services-booking",ref:N,children:X&&!_?h.jsxs(le.Container,{children:[h.jsx(le.Row,{className:"mb-3",children:h.jsx(le.Col,{children:h.jsx("h3",{className:"h6 fw-bold text-uppercase mb-3",children:d.t("Seleziona il servizio per cui stai richiedendo un appuntamento")})})}),h.jsx(le.Row,{className:"mb-3",children:h.jsx(le.Col,{children:h.jsx("div",{className:"search-container",children:h.jsx(le.Input,{id:"search",label:d.t("Cerca"),type:"text",value:f,onChange:L,onInput:L,infoText:d.t("Cerca per categoria, servizio o descrizione")})})})}),h.jsxs(le.Row,{className:"mb-3",children:[S?h.jsx(le.Col,{lg:3,md:4,className:"mb-4 mb-lg-0",children:h.jsxs("div",{className:"categories-list",children:[h.jsx("h3",{className:"h6 fw-bold text-uppercase mb-3",children:d.t("Categorie")}),x.length>0&&x.map(A=>{const H=s===A.name;return h.jsxs("button",{onClick:()=>P(A),className:`category-item w-100 text-start p-3 mb-2 border-0 rounded ${H?"category-active bg-primary text-white":"bg-light text-dark"}`,children:[h.jsx("span",{className:"fw-500 d-block",children:A.name}),h.jsxs("small",{className:`d-block mt-1 ${H?"text-white":"text-muted"}`,children:[A.services.length," ",A.services.length>1?d.t("servizi"):d.t("servizio")]})]},A.name)})]})}):null,h.jsx(le.Col,{lg:S?9:12,md:S?8:12,children:h.jsxs("div",{className:"services-container",children:[v.length>0?h.jsxs("div",{className:"services-header mb-4",children:[h.jsx("h3",{className:"h5 fw-bold text-primary mb-0",children:S==null?void 0:S.name}),h.jsx("div",{className:"border-bottom border-primary mt-3 mb-4"})]}):null,v.length>0?h.jsx("div",{className:"services-list",children:v.map(A=>{const H=(c==null?void 0:c.id)===A.id,J=Mn.sanitize(A==null?void 0:A.abstract);return h.jsx("button",{onClick:()=>m(A),className:`service-card mb-4 p-4 rounded border cursor-pointer transition text-start w-100 ${H?"border-primary border-2 bg-light":"border-light border-1 bg-white"}`,style:{cursor:"pointer"},tabindex:"0",role:"button","aria-label":`${A.name}`,"aria-pressed":H,children:h.jsx("div",{className:"d-flex justify-content-between align-items-start",children:h.jsxs("div",{className:"flex-grow-1",children:[h.jsx("h5",{className:"h6 fw-bold mb-2 text-dark",children:A.name}),(A==null?void 0:A.abstract)&&h.jsx("p",{className:"text-muted small mb-0",dangerouslySetInnerHTML:{__html:J}})]})})},A.id)})}):h.jsx("div",{className:"alert alert-info text-italic",children:d.t("Il servizio che stai cercando non è disponibile per la prenotazione appuntamento")})]})})]})]}):_?h.jsx("fieldset",{className:"it-page-section",children:h.jsx("div",{className:"cmp-card mt-2",children:h.jsxs("div",{className:"card has-bkg-grey shadow-sm p-big",children:[h.jsx("div",{className:"card-header border-0 p-0 mb-lg-30",children:h.jsx("div",{className:"d-flex",children:h.jsx("h2",{className:"title-xxlarge mb-1",children:S==null?void 0:S.name})})}),h.jsx("div",{className:"card p-3 p-lg-4 fieldset-body",children:(R=i==null?void 0:i.dataValue)!=null&&R.id?h.jsx("div",{className:"services-list",children:h.jsx("div",{className:"service-card p-4 rounded border transition border-light border-1 bg-white",children:h.jsx("div",{className:"d-flex justify-content-between align-items-start",children:h.jsx("div",{className:"flex-grow-1",children:h.jsx("p",{className:"mb-2 text-dark text-paragraph",children:i.dataValue.name})})})},i.dataValue.id)}):null})]})})}):null})},Ta=class Ta extends wn{constructor(i,g,d){super(i,g,d)}static get builderInfo(){return{title:"Lista Servizi",group:"basic",icon:"bi bi-list",documentation:"",weight:70,schema:Ta.schema()}}static schema(){return wn.schema({type:"list-services"})}attach(i,g){this.rootComponent=Ft.createRoot(i),this.rootComponent.render(h.jsx(Wc,{ref:g,component:this.component,onChange:d=>this.setValue(d),...this,current:this}))}setValue(i){i&&(this.shouldSetValue=!0,this.updateValue(i))}getValue(){return this.dataValue}init(){super.init()}render(){return super.render()}};Ct(Ta,"editForm",Lc);let Sa=Ta;const ur={pagebreak:_a,dynamic_calendar:On,calendar:ba,"calendar-advanced":wa,sdcfile:xa,address_map:Ma,"list-services":Sa};function Vc(y){if(!y||typeof y.addComponent!="function")throw new Error("registerFormioComponents requires Formio Components with addComponent(name, component)");return Object.entries(ur).forEach(([i,g])=>{y.addComponent(i,g)}),ur}exports.Calendar=ba;exports.CalendarAdvanced=wa;exports.FormioAddressMap=Ma;exports.FormioDynamicCalendar=On;exports.FormioListServices=Sa;exports.FormioPageBreak=_a;exports.SdcFile=xa;exports.formioCustomComponents=ur;exports.registerFormioComponents=Vc;
|
|
107
107
|
//# sourceMappingURL=index.cjs.map
|