@opencitylabs/formio-custom-components 0.5.0 → 0.5.2
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/formio-custom-components.css +2 -1
- package/dist/index.cjs +21 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10192 -10813
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
package/dist/index.cjs
CHANGED
|
@@ -1,24 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
`+
|
|
3
|
-
`),
|
|
4
|
-
`),
|
|
5
|
-
`+
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let l=require(`@formio/js`),u=require(`react-dom/client`),d=require(`react`);d=c(d);let f=require(`@formio/react`),p=require(`react-day-picker`),m=require(`react-countdown`);m=c(m);let h=require(`moment`);h=c(h);let g=require(`design-react-kit`),_=require(`sweetalert2`);_=c(_),require(`i18next`);let v=require(`dayjs`);v=c(v);let y=require(`@event-calendar/core`),b=require(`react-dropzone`),x=require(`axios`);x=c(x);let S=require(`mime`);S=c(S);let C=require(`dompurify`);C=c(C);let w=require(`jwt-decode`),T=require(`leaflet`);T=c(T);let E=require(`lodash`);E=c(E);var D=o((e=>{var t=require(`react`),n=Symbol.for(`react.element`),r=Symbol.for(`react.fragment`),i=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var s,c={},l=null,u=null;for(s in r!==void 0&&(l=``+r),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)i.call(t,s)&&!o.hasOwnProperty(s)&&(c[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)c[s]===void 0&&(c[s]=t[s]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:a.current}}e.Fragment=r,e.jsx=s,e.jsxs=s})),O=o((e=>{process.env.NODE_ENV!==`production`&&(function(){"use strict";var t=require(`react`),n=Symbol.for(`react.element`),r=Symbol.for(`react.portal`),i=Symbol.for(`react.fragment`),a=Symbol.for(`react.strict_mode`),o=Symbol.for(`react.profiler`),s=Symbol.for(`react.provider`),c=Symbol.for(`react.context`),l=Symbol.for(`react.forward_ref`),u=Symbol.for(`react.suspense`),d=Symbol.for(`react.suspense_list`),f=Symbol.for(`react.memo`),p=Symbol.for(`react.lazy`),m=Symbol.for(`react.offscreen`),h=Symbol.iterator,g=`@@iterator`;function _(e){if(typeof e!=`object`||!e)return null;var t=h&&e[h]||e[g];return typeof t==`function`?t:null}var v=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function y(e){b(`error`,e,[...arguments].slice(1))}function b(e,t,n){var r=v.ReactDebugCurrentFrame.getStackAddendum();r!==``&&(t+=`%s`,n=n.concat([r]));var i=n.map(function(e){return String(e)});i.unshift(`Warning: `+t),Function.prototype.apply.call(console[e],console,i)}var x=!1,S=!1,C=!1,w=!1,T=!1,E=Symbol.for(`react.module.reference`);function D(e){return!!(typeof e==`string`||typeof e==`function`||e===i||e===o||T||e===a||e===u||e===d||w||e===m||x||S||C||typeof e==`object`&&e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===s||e.$$typeof===c||e.$$typeof===l||e.$$typeof===E||e.getModuleId!==void 0))}function O(e,t,n){var r=e.displayName;if(r)return r;var i=t.displayName||t.name||``;return i===``?n:n+`(`+i+`)`}function k(e){return e.displayName||`Context`}function A(e){if(e==null)return null;if(typeof e.tag==`number`&&y(`Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.`),typeof e==`function`)return e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case i:return`Fragment`;case r:return`Portal`;case o:return`Profiler`;case a:return`StrictMode`;case u:return`Suspense`;case d:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case c:return k(e)+`.Consumer`;case s:return k(e._context)+`.Provider`;case l:return O(e,e.render,`ForwardRef`);case f:var t=e.displayName||null;return t===null?A(e.type)||`Memo`:t;case p:var n=e,m=n._payload,h=n._init;try{return A(h(m))}catch{return null}}return null}var j=Object.assign,M=0,N,ee,P,F,I,L,R;function z(){}z.__reactDisabledLog=!0;function te(){if(M===0){N=console.log,ee=console.info,P=console.warn,F=console.error,I=console.group,L=console.groupCollapsed,R=console.groupEnd;var e={configurable:!0,enumerable:!0,value:z,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}M++}function ne(){if(M--,M===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:j({},e,{value:N}),info:j({},e,{value:ee}),warn:j({},e,{value:P}),error:j({},e,{value:F}),group:j({},e,{value:I}),groupCollapsed:j({},e,{value:L}),groupEnd:j({},e,{value:R})})}M<0&&y(`disabledDepth fell below zero. This is a bug in React. Please file an issue.`)}var B=v.ReactCurrentDispatcher,re;function ie(e,t,n){if(re===void 0)try{throw Error()}catch(e){var r=e.stack.trim().match(/\n( *(at )?)/);re=r&&r[1]||``}return`
|
|
2
|
+
`+re+e}var ae=!1,oe=new(typeof WeakMap==`function`?WeakMap:Map);function se(e,t){if(!e||ae)return``;var n=oe.get(e);if(n!==void 0)return n;var r;ae=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var a=B.current;B.current=null,te();try{if(t){var o=function(){throw Error()};if(Object.defineProperty(o.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(o,[])}catch(e){r=e}Reflect.construct(e,[],o)}else{try{o.call()}catch(e){r=e}e.call(o.prototype)}}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&typeof t.stack==`string`){for(var s=t.stack.split(`
|
|
3
|
+
`),c=r.stack.split(`
|
|
4
|
+
`),l=s.length-1,u=c.length-1;l>=1&&u>=0&&s[l]!==c[u];)u--;for(;l>=1&&u>=0;l--,u--)if(s[l]!==c[u]){if(l!==1||u!==1)do if(l--,u--,u<0||s[l]!==c[u]){var d=`
|
|
5
|
+
`+s[l].replace(` at new `,` at `);return e.displayName&&d.includes(`<anonymous>`)&&(d=d.replace(`<anonymous>`,e.displayName)),typeof e==`function`&&oe.set(e,d),d}while(l>=1&&u>=0);break}}}finally{ae=!1,B.current=a,ne(),Error.prepareStackTrace=i}var f=e?e.displayName||e.name:``,p=f?ie(f):``;return typeof e==`function`&&oe.set(e,p),p}function ce(e,t,n){return se(e,!1)}function le(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function ue(e,t,n){if(e==null)return``;if(typeof e==`function`)return se(e,le(e));if(typeof e==`string`)return ie(e);switch(e){case u:return ie(`Suspense`);case d:return ie(`SuspenseList`)}if(typeof e==`object`)switch(e.$$typeof){case l:return ce(e.render);case f:return ue(e.type,t,n);case p:var r=e,i=r._payload,a=r._init;try{return ue(a(i),t,n)}catch{}}return``}var de=Object.prototype.hasOwnProperty,fe={},pe=v.ReactDebugCurrentFrame;function me(e){if(e){var t=e._owner,n=ue(e.type,e._source,t?t.type:null);pe.setExtraStackFrame(n)}else pe.setExtraStackFrame(null)}function V(e,t,n,r,i){var a=Function.call.bind(de);for(var o in e)if(a(e,o)){var s=void 0;try{if(typeof e[o]!=`function`){var c=Error((r||`React class`)+`: `+n+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw c.name=`Invariant Violation`,c}s=e[o](t,o,r,n,null,`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`)}catch(e){s=e}s&&!(s instanceof Error)&&(me(i),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).",r||`React class`,n,o,typeof s),me(null)),s instanceof Error&&!(s.message in fe)&&(fe[s.message]=!0,me(i),y(`Failed %s type: %s`,n,s.message),me(null))}}var he=Array.isArray;function ge(e){return he(e)}function _e(e){return typeof Symbol==`function`&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||`Object`}function ve(e){try{return ye(e),!1}catch{return!0}}function ye(e){return``+e}function be(e){if(ve(e))return y(`The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.`,_e(e)),ye(e)}var xe=v.ReactCurrentOwner,Se={key:!0,ref:!0,__self:!0,__source:!0},H,Ce,we={};function Te(e){if(de.call(e,`ref`)){var t=Object.getOwnPropertyDescriptor(e,`ref`).get;if(t&&t.isReactWarning)return!1}return e.ref!==void 0}function Ee(e){if(de.call(e,`key`)){var t=Object.getOwnPropertyDescriptor(e,`key`).get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function De(e,t){if(typeof e.ref==`string`&&xe.current&&t&&xe.current.stateNode!==t){var n=A(xe.current.type);we[n]||(y(`Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref`,A(xe.current.type),e.ref),we[n]=!0)}}function Oe(e,t){var n=function(){H||(H=!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)",t))};n.isReactWarning=!0,Object.defineProperty(e,`key`,{get:n,configurable:!0})}function ke(e,t){var n=function(){Ce||(Ce=!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)",t))};n.isReactWarning=!0,Object.defineProperty(e,`ref`,{get:n,configurable:!0})}var Ae=function(e,t,r,i,a,o,s){var c={$$typeof:n,type:e,key:t,ref:r,props:s,_owner:o};return c._store={},Object.defineProperty(c._store,`validated`,{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(c,`_self`,{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.defineProperty(c,`_source`,{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.freeze&&(Object.freeze(c.props),Object.freeze(c)),c};function je(e,t,n,r,i){var a,o={},s=null,c=null;for(a in n!==void 0&&(be(n),s=``+n),Ee(t)&&(be(t.key),s=``+t.key),Te(t)&&(c=t.ref,De(t,i)),t)de.call(t,a)&&!Se.hasOwnProperty(a)&&(o[a]=t[a]);if(e&&e.defaultProps){var l=e.defaultProps;for(a in l)o[a]===void 0&&(o[a]=l[a])}if(s||c){var u=typeof e==`function`?e.displayName||e.name||`Unknown`:e;s&&Oe(o,u),c&&ke(o,u)}return Ae(e,s,c,i,r,xe.current,o)}var Me=v.ReactCurrentOwner,Ne=v.ReactDebugCurrentFrame;function Pe(e){if(e){var t=e._owner,n=ue(e.type,e._source,t?t.type:null);Ne.setExtraStackFrame(n)}else Ne.setExtraStackFrame(null)}var Fe=!1;function Ie(e){return typeof e==`object`&&!!e&&e.$$typeof===n}function U(){if(Me.current){var e=A(Me.current.type);if(e)return`
|
|
6
6
|
|
|
7
|
-
Check the render method of \``+
|
|
7
|
+
Check the render method of \``+e+"`."}return``}function Le(e){if(e!==void 0){var t=e.fileName.replace(/^.*[\\\/]/,``),n=e.lineNumber;return`
|
|
8
8
|
|
|
9
|
-
Check
|
|
9
|
+
Check your code at `+t+`:`+n+`.`}return``}var Re={};function ze(e){var t=U();if(!t){var n=typeof e==`string`?e:e.displayName||e.name;n&&(t=`
|
|
10
|
+
|
|
11
|
+
Check the top-level render call using <`+n+`>.`)}return t}function W(e,t){if(!(!e._store||e._store.validated||e.key!=null)){e._store.validated=!0;var n=ze(t);if(!Re[n]){Re[n]=!0;var r=``;e&&e._owner&&e._owner!==Me.current&&(r=` It was passed a child from `+A(e._owner.type)+`.`),Pe(e),y(`Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.`,n,r),Pe(null)}}}function G(e,t){if(typeof e==`object`){if(ge(e))for(var n=0;n<e.length;n++){var r=e[n];Ie(r)&&W(r,t)}else if(Ie(e))e._store&&(e._store.validated=!0);else if(e){var i=_(e);if(typeof i==`function`&&i!==e.entries)for(var a=i.call(e),o;!(o=a.next()).done;)Ie(o.value)&&W(o.value,t)}}}function Be(e){var t=e.type;if(!(t==null||typeof t==`string`)){var n;if(typeof t==`function`)n=t.propTypes;else if(typeof t==`object`&&(t.$$typeof===l||t.$$typeof===f))n=t.propTypes;else return;if(n){var r=A(t);V(n,e.props,`prop`,r,e)}else t.PropTypes!==void 0&&!Fe&&(Fe=!0,y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",A(t)||`Unknown`));typeof t.getDefaultProps==`function`&&!t.getDefaultProps.isReactClassApproved&&y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function K(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if(r!==`children`&&r!==`key`){Pe(e),y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),Pe(null);break}}e.ref!==null&&(Pe(e),y("Invalid attribute `ref` supplied to `React.Fragment`."),Pe(null))}var Ve={};function He(e,t,r,a,o,s){var c=D(e);if(!c){var l=``;(e===void 0||typeof e==`object`&&e&&Object.keys(e).length===0)&&(l+=` 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 u=Le(o);u?l+=u:l+=U();var d;e===null?d=`null`:ge(e)?d=`array`:e!==void 0&&e.$$typeof===n?(d=`<`+(A(e.type)||`Unknown`)+` />`,l=` Did you accidentally export a JSX literal instead of a component?`):d=typeof e,y(`React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s`,d,l)}var f=je(e,t,r,o,s);if(f==null)return f;if(c){var p=t.children;if(p!==void 0)if(a)if(ge(p)){for(var m=0;m<p.length;m++)G(p[m],e);Object.freeze&&Object.freeze(p)}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 G(p,e)}if(de.call(t,`key`)){var h=A(e),g=Object.keys(t).filter(function(e){return e!==`key`}),_=g.length>0?`{key: someKey, `+g.join(`: ..., `)+`: ...}`:`{key: someKey}`;Ve[h+_]||(y(`A props object containing a "key" prop is being spread into JSX:
|
|
10
12
|
let props = %s;
|
|
11
13
|
<%s {...props} />
|
|
12
14
|
React keys must be passed directly to JSX without using spread:
|
|
13
15
|
let props = %s;
|
|
14
|
-
<%s key={someKey} {...props} />`,
|
|
16
|
+
<%s key={someKey} {...props} />`,_,h,g.length>0?`{`+g.join(`: ..., `)+`: ...}`:`{}`,h),Ve[h+_]=!0)}return e===i?K(f):Be(f),f}function Ue(e,t,n){return He(e,t,n,!0)}function We(e,t,n){return He(e,t,n,!1)}var Ge=We,Ke=Ue;e.Fragment=i,e.jsx=Ge,e.jsxs=Ke})()})),k=o(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=D():t.exports=O()}))(),A=l.Formio.Components.components.field,j=e=>(0,k.jsx)(`div`,{ref:(0,d.useRef)(),className:`row page-break-before pagebreak-container border border-info p-2 mb-2`,children:(0,k.jsx)(`div`,{className:`col-12 text-center pagebreak-component`,children:`Page break`})}),M=class e extends A{constructor(e,t,n){super(e,t,n)}static schema(){return A.schema({type:`pagebreak`})}static builderInfo={title:`PageBreak`,group:`basic`,icon:`bi bi-file-break`,weight:70,schema:e.schema()};render(){return super.render(`<div ref="react-${this.id}"></div>`)}attach(e){return super.attach(e).then(()=>{this.loadRefs(this.element,{[`react-${this.id}`]:`single`});let e=this.refs[`react-${this.id}`];return e?(this.rootComponent=(0,u.createRoot)(e),this.rootComponent.render((0,k.jsx)(j,{...this,current:this})),this):this})}detach(){return this.rootComponent&&=(this.rootComponent.unmount(),null),super.detach()}getValue(){return``}setValue(e){}},N=()=>{let e=window.location,t=RegExp(`qa.bugliano.pi.it|localhost|opencity-labs.gitlab.io|form-builder-qa.stanzadelcittadino.it`,`g`),n=null;if(t.test(e.hostname))n=`https://servizi.comune-qa.bugliano.pi.it/lang`;else if(window.BASE_URL)n=window.BASE_URL;else{let t=e.pathname.split(`/`);n=e.origin+`/`+t[1]}return n},ee=[{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:N()+`/api/calendars?type=time_variable_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 = '`+N()+`'; 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:N()+`/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) {
|
|
15
17
|
let url = data.url + '/api/calendars/' + data.calendarId + '/overlaps';
|
|
16
18
|
if (data.select_opening_hours && data.opening_hours.length > 0) {
|
|
17
19
|
let qs = "?opening_hours=" + data.opening_hours.join();
|
|
18
20
|
url = url + qs;
|
|
19
21
|
}
|
|
20
22
|
if (data.api_url !== url) value = url;
|
|
21
|
-
} else {url = ''}`,key
|
|
23
|
+
} else {url = ''}`,key:`api_url`,type:`hidden`,input:!0,weight:1},{label:`Sovrapposizioni`,inputFormat:`plain`,redrawOn:`api_url`,calculateValue:`function loadJSON(path, success, error){
|
|
22
24
|
var xhr = new XMLHttpRequest();
|
|
23
25
|
xhr.onreadystatechange = function() {
|
|
24
26
|
if (xhr.readyState === XMLHttpRequest.DONE) {
|
|
@@ -42,17 +44,17 @@ if(data.calendarId && data.api_url){
|
|
|
42
44
|
data.overlaps_validation = -1; document.querySelector("input[name^='data[overlaps_validation]']").value = -1;
|
|
43
45
|
}
|
|
44
46
|
);
|
|
45
|
-
}`,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 Rc(...o){return Bt.Components.baseEditForm([{key:"display",components:Nc}],...o)}function Mt(o){return(s={})=>{const u=s.width?String(s.width):o.defaultWidth;return o.formats[u]||o.formats[o.defaultWidth]}}function Xe(o){return(s,u)=>{const i=u?.context?String(u.context):"standalone";let b;if(i==="formatting"&&o.formattingValues){const I=o.defaultFormattingWidth||o.defaultWidth,l=u?.width?String(u.width):I;b=o.formattingValues[l]||o.formattingValues[I]}else{const I=o.defaultWidth,l=u?.width?String(u.width):o.defaultWidth;b=o.values[l]||o.values[I]}const M=o.argumentCallback?o.argumentCallback(s):s;return b[M]}}function Ze(o){return(s,u={})=>{const i=u.width,b=i&&o.matchPatterns[i]||o.matchPatterns[o.defaultMatchWidth],M=s.match(b);if(!M)return null;const I=M[0],l=i&&o.parsePatterns[i]||o.parsePatterns[o.defaultParseWidth],y=Array.isArray(l)?Ac(l,h=>h.test(I)):Ec(l,h=>h.test(I));let r;r=o.valueCallback?o.valueCallback(y):y,r=u.valueCallback?u.valueCallback(r):r;const c=s.slice(I.length);return{value:r,rest:c}}}function Ec(o,s){for(const u in o)if(Object.prototype.hasOwnProperty.call(o,u)&&s(o[u]))return u}function Ac(o,s){for(let u=0;u<o.length;u++)if(s(o[u]))return u}function vn(o){return(s,u={})=>{const i=s.match(o.matchPattern);if(!i)return null;const b=i[0],M=s.match(o.parsePattern);if(!M)return null;let I=o.valueCallback?o.valueCallback(M[0]):M[0];I=u.valueCallback?u.valueCallback(I):I;const l=s.slice(b.length);return{value:I,rest:l}}}const vi=Symbol.for("constructDateFrom");function Ws(o,s){return typeof o=="function"?o(s):o&&typeof o=="object"&&vi in o?o[vi](s):o instanceof Date?new o.constructor(s):new Date(s)}function Ic(o,...s){const u=Ws.bind(null,o||s.find(i=>typeof i=="object"));return s.map(u)}let Fc={};function Vc(){return Fc}function zc(o,s){return Ws(s||o,o)}function yi(o,s){const u=Vc(),i=s?.weekStartsOn??s?.locale?.options?.weekStartsOn??u.weekStartsOn??u.locale?.options?.weekStartsOn??0,b=zc(o,s?.in),M=b.getDay(),I=(M<i?7:0)+M-i;return b.setDate(b.getDate()-I),b.setHours(0,0,0,0),b}function _i(o,s,u){const[i,b]=Ic(u?.in,o,s);return+yi(i,u)==+yi(b,u)}const bi={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"}}},Lc=(o,s,u)=>{let i;const b=u?.addSuffix?bi[o].withPreposition:bi[o].standalone;return typeof b=="string"?i=b:s===1?i=b.one:i=b.other.replace("{{count}}",String(s)),u?.addSuffix?u.comparison&&u.comparison>0?"in "+i:"vor "+i:i},Wc={full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},qc={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Hc={full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},$c={date:Mt({formats:Wc,defaultWidth:"full"}),time:Mt({formats:qc,defaultWidth:"full"}),dateTime:Mt({formats:Hc,defaultWidth:"full"})},Bc={lastWeek:"'letzten' eeee 'um' p",yesterday:"'gestern um' p",today:"'heute um' p",tomorrow:"'morgen um' p",nextWeek:"eeee 'um' p",other:"P"},Uc=(o,s,u,i)=>Bc[o],Gc={narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},Jc={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},cn={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"]},Kc={narrow:cn.narrow,abbreviated:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:cn.wide},Xc={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"]},Zc={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"}},Qc={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"}},ed=o=>Number(o)+".",td={ordinalNumber:ed,era:Xe({values:Gc,defaultWidth:"wide"}),quarter:Xe({values:Jc,defaultWidth:"wide",argumentCallback:o=>o-1}),month:Xe({values:cn,formattingValues:Kc,defaultWidth:"wide"}),day:Xe({values:Xc,defaultWidth:"wide"}),dayPeriod:Xe({values:Zc,defaultWidth:"wide",formattingValues:Qc,defaultFormattingWidth:"wide"})},rd=/^(\d+)(\.)?/i,ad=/\d+/i,nd={narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},id={any:[/^v/i,/^n/i]},sd={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},od={any:[/1/i,/2/i,/3/i,/4/i]},ld={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},ud={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]},cd={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},dd={any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},hd={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},fd={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}},md={ordinalNumber:vn({matchPattern:rd,parsePattern:ad,valueCallback:o=>parseInt(o)}),era:Ze({matchPatterns:nd,defaultMatchWidth:"wide",parsePatterns:id,defaultParseWidth:"any"}),quarter:Ze({matchPatterns:sd,defaultMatchWidth:"wide",parsePatterns:od,defaultParseWidth:"any",valueCallback:o=>o+1}),month:Ze({matchPatterns:ld,defaultMatchWidth:"wide",parsePatterns:ud,defaultParseWidth:"any"}),day:Ze({matchPatterns:cd,defaultMatchWidth:"wide",parsePatterns:dd,defaultParseWidth:"any"}),dayPeriod:Ze({matchPatterns:hd,defaultMatchWidth:"wide",parsePatterns:fd,defaultParseWidth:"any"})},qs={code:"de",formatDistance:Lc,formatLong:$c,formatRelative:Uc,localize:td,match:md,options:{weekStartsOn:1,firstWeekContainsDate:4}},pd={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"}},gd=(o,s,u)=>{let i;const b=pd[o];return typeof b=="string"?i=b:s===1?i=b.one:i=b.other.replace("{{count}}",s.toString()),u?.addSuffix?u.comparison&&u.comparison>0?"in "+i:i+" ago":i},vd={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},yd=(o,s,u,i)=>vd[o],_d={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},bd={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},wd={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"]},Sd={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"]},Md={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"}},xd={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"}},Dd=(o,s)=>{const u=Number(o),i=u%100;if(i>20||i<10)switch(i%10){case 1:return u+"st";case 2:return u+"nd";case 3:return u+"rd"}return u+"th"},kd={ordinalNumber:Dd,era:Xe({values:_d,defaultWidth:"wide"}),quarter:Xe({values:bd,defaultWidth:"wide",argumentCallback:o=>o-1}),month:Xe({values:wd,defaultWidth:"wide"}),day:Xe({values:Sd,defaultWidth:"wide"}),dayPeriod:Xe({values:Md,defaultWidth:"wide",formattingValues:xd,defaultFormattingWidth:"wide"})},Od=/^(\d+)(th|st|nd|rd)?/i,Cd=/\d+/i,Yd={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},jd={any:[/^b/i,/^(a|c)/i]},Td={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Pd={any:[/1/i,/2/i,/3/i,/4/i]},Nd={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},Rd={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]},Ed={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},Ad={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]},Id={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},Fd={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}},Vd={ordinalNumber:vn({matchPattern:Od,parsePattern:Cd,valueCallback:o=>parseInt(o,10)}),era:Ze({matchPatterns:Yd,defaultMatchWidth:"wide",parsePatterns:jd,defaultParseWidth:"any"}),quarter:Ze({matchPatterns:Td,defaultMatchWidth:"wide",parsePatterns:Pd,defaultParseWidth:"any",valueCallback:o=>o+1}),month:Ze({matchPatterns:Nd,defaultMatchWidth:"wide",parsePatterns:Rd,defaultParseWidth:"any"}),day:Ze({matchPatterns:Ed,defaultMatchWidth:"wide",parsePatterns:Ad,defaultParseWidth:"any"}),dayPeriod:Ze({matchPatterns:Id,defaultMatchWidth:"any",parsePatterns:Fd,defaultParseWidth:"any"})},zd={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},Ld={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Wd={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},qd={date:Mt({formats:zd,defaultWidth:"full"}),time:Mt({formats:Ld,defaultWidth:"full"}),dateTime:Mt({formats:Wd,defaultWidth:"full"})},Hs={code:"en-GB",formatDistance:gd,formatLong:qd,formatRelative:yd,localize:kd,match:Vd,options:{weekStartsOn:1,firstWeekContainsDate:4}},Hd={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"}},$d=(o,s,u)=>{let i;const b=Hd[o];return typeof b=="string"?i=b:s===1?i=b.one:i=b.other.replace("{{count}}",s.toString()),u?.addSuffix?u.comparison&&u.comparison>0?"tra "+i:i+" fa":i},Bd={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},Ud={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Gd={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},Jd={date:Mt({formats:Bd,defaultWidth:"full"}),time:Mt({formats:Ud,defaultWidth:"full"}),dateTime:Mt({formats:Gd,defaultWidth:"full"})},yn=["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"];function Kd(o){return o===0?"'domenica scorsa alle' p":"'"+yn[o]+" scorso alle' p"}function wi(o){return"'"+yn[o]+" alle' p"}function Xd(o){return o===0?"'domenica prossima alle' p":"'"+yn[o]+" prossimo alle' p"}const Zd={lastWeek:(o,s,u)=>{const i=o.getDay();return _i(o,s,u)?wi(i):Kd(i)},yesterday:"'ieri alle' p",today:"'oggi alle' p",tomorrow:"'domani alle' p",nextWeek:(o,s,u)=>{const i=o.getDay();return _i(o,s,u)?wi(i):Xd(i)},other:"P"},Qd=(o,s,u,i)=>{const b=Zd[o];return typeof b=="function"?b(s,u,i):b},eh={narrow:["aC","dC"],abbreviated:["a.C.","d.C."],wide:["avanti Cristo","dopo Cristo"]},th={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},rh={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"]},ah={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"]},nh={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"}},ih={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"}},sh=(o,s)=>{const u=Number(o);return String(u)},oh={ordinalNumber:sh,era:Xe({values:eh,defaultWidth:"wide"}),quarter:Xe({values:th,defaultWidth:"wide",argumentCallback:o=>o-1}),month:Xe({values:rh,defaultWidth:"wide"}),day:Xe({values:ah,defaultWidth:"wide"}),dayPeriod:Xe({values:nh,defaultWidth:"wide",formattingValues:ih,defaultFormattingWidth:"wide"})},lh=/^(\d+)(º)?/i,uh=/\d+/i,ch={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},dh={any:[/^a/i,/^(d|e)/i]},hh={narrow:/^[1234]/i,abbreviated:/^t[1234]/i,wide:/^[1234](º)? trimestre/i},fh={any:[/1/i,/2/i,/3/i,/4/i]},mh={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},ph={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]},gh={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},vh={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]},yh={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},_h={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}},bh={ordinalNumber:vn({matchPattern:lh,parsePattern:uh,valueCallback:o=>parseInt(o,10)}),era:Ze({matchPatterns:ch,defaultMatchWidth:"wide",parsePatterns:dh,defaultParseWidth:"any"}),quarter:Ze({matchPatterns:hh,defaultMatchWidth:"wide",parsePatterns:fh,defaultParseWidth:"any",valueCallback:o=>o+1}),month:Ze({matchPatterns:mh,defaultMatchWidth:"wide",parsePatterns:ph,defaultParseWidth:"any"}),day:Ze({matchPatterns:gh,defaultMatchWidth:"wide",parsePatterns:vh,defaultParseWidth:"any"}),dayPeriod:Ze({matchPatterns:yh,defaultMatchWidth:"any",parsePatterns:_h,defaultParseWidth:"any"})},$s={code:"it",formatDistance:$d,formatLong:Jd,formatRelative:Qd,localize:oh,match:bh,options:{weekStartsOn:1,firstWeekContainsDate:4}};function wr(o){throw new Error('Could not dynamically require "'+o+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var dn={exports:{}},gr={exports:{}},wh=gr.exports,Si;function _n(){return Si||(Si=1,(function(o,s){(function(u,i){o.exports=i()})(wh,(function(){var u;function i(){return u.apply(null,arguments)}function b(e){u=e}function M(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function I(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function l(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function y(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(l(e,t))return!1;return!0}function r(e){return e===void 0}function c(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function h(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function f(e,t){var a=[],n,d=e.length;for(n=0;n<d;++n)a.push(t(e[n],n));return a}function p(e,t){for(var a in t)l(t,a)&&(e[a]=t[a]);return l(t,"toString")&&(e.toString=t.toString),l(t,"valueOf")&&(e.valueOf=t.valueOf),e}function g(e,t,a,n){return Wn(e,t,a,n,!0).utc()}function C(){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=C()),e._pf}var k;Array.prototype.some?k=Array.prototype.some:k=function(e){var t=Object(this),a=t.length>>>0,n;for(n=0;n<a;n++)if(n in t&&e.call(this,t[n],n,t))return!0;return!1};function Y(e){var t=null,a=!1,n=e._d&&!isNaN(e._d.getTime());if(n&&(t=_(e),a=k.call(t.parsedDateParts,function(d){return d!=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&&a),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 j(e){var t=g(NaN);return e!=null?p(_(t),e):_(t).userInvalidated=!0,t}var F=i.momentProperties=[],R=!1;function O(e,t){var a,n,d,D=F.length;if(r(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),r(t._i)||(e._i=t._i),r(t._f)||(e._f=t._f),r(t._l)||(e._l=t._l),r(t._strict)||(e._strict=t._strict),r(t._tzm)||(e._tzm=t._tzm),r(t._isUTC)||(e._isUTC=t._isUTC),r(t._offset)||(e._offset=t._offset),r(t._pf)||(e._pf=_(t)),r(t._locale)||(e._locale=t._locale),D>0)for(a=0;a<D;a++)n=F[a],d=t[n],r(d)||(e[n]=d);return e}function v(e){O(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),R===!1&&(R=!0,i.updateOffset(this),R=!1)}function T(e){return e instanceof v||e!=null&&e._isAMomentObject!=null}function S(e){i.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function x(e,t){var a=!0;return p(function(){if(i.deprecationHandler!=null&&i.deprecationHandler(null,e),a){var n=[],d,D,L,ne=arguments.length;for(D=0;D<ne;D++){if(d="",typeof arguments[D]=="object"){d+=`
|
|
46
|
-
[`+
|
|
47
|
-
Arguments: `+Array.prototype.slice.call(
|
|
48
|
-
`+new Error().stack),a=!1}return t.apply(this,arguments)},t)}var V={};function E(e,t){i.deprecationHandler!=null&&i.deprecationHandler(e,t),V[e]||(S(t),V[e]=!0)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null;function A(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function z(e){var t,a;for(a in e)l(e,a)&&(t=e[a],A(t)?this[a]=t:this["_"+a]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function B(e,t){var a=p({},e),n;for(n in t)l(t,n)&&(I(e[n])&&I(t[n])?(a[n]={},p(a[n],e[n]),p(a[n],t[n])):t[n]!=null?a[n]=t[n]:delete a[n]);for(n in e)l(e,n)&&!l(t,n)&&I(e[n])&&(a[n]=p({},a[n]));return a}function ee(e){e!=null&&this.set(e)}var ie;Object.keys?ie=Object.keys:ie=function(e){var t,a=[];for(t in e)l(e,t)&&a.push(t);return a};var re={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function fe(e,t,a){var n=this._calendar[e]||this._calendar.sameElse;return A(n)?n.call(t,a):n}function te(e,t,a){var n=""+Math.abs(e),d=t-n.length,D=e>=0;return(D?a?"+":"":"-")+Math.pow(10,Math.max(0,d)).toString().substr(1)+n}var de=/(\[[^\[]*\])|(\\)?([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,ve=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,me={},oe={};function Z(e,t,a,n){var d=n;typeof n=="string"&&(d=function(){return this[n]()}),e&&(oe[e]=d),t&&(oe[t[0]]=function(){return te(d.apply(this,arguments),t[1],t[2])}),a&&(oe[a]=function(){return this.localeData().ordinal(d.apply(this,arguments),e)})}function Ne(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function Ie(e){var t=e.match(de),a,n;for(a=0,n=t.length;a<n;a++)oe[t[a]]?t[a]=oe[t[a]]:t[a]=Ne(t[a]);return function(d){var D="",L;for(L=0;L<n;L++)D+=A(t[L])?t[L].call(d,e):t[L];return D}}function Ye(e,t){return e.isValid()?(t=Oe(t,e.localeData()),me[t]=me[t]||Ie(t),me[t](e)):e.localeData().invalidDate()}function Oe(e,t){var a=5;function n(d){return t.longDateFormat(d)||d}for(ve.lastIndex=0;a>=0&&ve.test(e);)e=e.replace(ve,n),ve.lastIndex=0,a-=1;return e}var $={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 J(e){var t=this._longDateFormat[e],a=this._longDateFormat[e.toUpperCase()];return t||!a?t:(this._longDateFormat[e]=a.match(de).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[e])}var X="Invalid date";function P(){return this._invalidDate}var H="%d",N=/\d{1,2}/;function W(e){return this._ordinal.replace("%d",e)}var q={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 ce(e,t,a,n){var d=this._relativeTime[a];return A(d)?d(e,t,a,n):d.replace(/%d/i,e)}function se(e,t){var a=this._relativeTime[e>0?"future":"past"];return A(a)?a(t):a.replace(/%s/i,t)}var Pe={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 ge(e){return typeof e=="string"?Pe[e]||Pe[e.toLowerCase()]:void 0}function _e(e){var t={},a,n;for(n in e)l(e,n)&&(a=ge(n),a&&(t[a]=e[n]));return t}var $e={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 Re(e){var t=[],a;for(a in e)l(e,a)&&t.push({unit:a,priority:$e[a]});return t.sort(function(n,d){return n.priority-d.priority}),t}var ct=/\d/,Ue=/\d\d/,it=/\d{3}/,Yt=/\d{4}/,st=/[+-]?\d{6}/,je=/\d\d?/,jt=/\d\d\d\d?/,At=/\d\d\d\d\d\d?/,ot=/\d{1,3}/,mt=/\d{1,4}/,dt=/[+-]?\d{1,6}/,tt=/\d+/,pt=/[+-]?\d+/,gt=/Z|[+-]\d\d:?\d\d/gi,We=/Z|[+-]\d\d(?::?\d\d)?/gi,ht=/[+-]?\d+(\.\d{1,3})?/,lt=/[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,rt=/^[1-9]\d?/,Qe=/^([1-9]\d|\d)/,It;It={};function ae(e,t,a){It[e]=A(t)?t:function(n,d){return n&&a?a:t}}function jr(e,t){return l(It,e)?It[e](t._strict,t._locale):new RegExp(rr(e))}function rr(e){return at(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,a,n,d,D){return a||n||d||D}))}function at(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function et(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function be(e){var t=+e,a=0;return t!==0&&isFinite(t)&&(a=et(t)),a}var Ft={};function Te(e,t){var a,n=t,d;for(typeof e=="string"&&(e=[e]),c(t)&&(n=function(D,L){L[t]=be(D)}),d=e.length,a=0;a<d;a++)Ft[e[a]]=n}function Tt(e,t){Te(e,function(a,n,d,D){d._w=d._w||{},t(a,d._w,d,D)})}function Tr(e,t,a){t!=null&&l(Ft,e)&&Ft[e](t,a._a,a,e)}function Vt(e){return e%4===0&&e%100!==0||e%400===0}var Ge=0,w=1,U=2,Q=3,le=4,ye=5,xe=6,Me=7,we=8;Z("Y",0,0,function(){var e=this.year();return e<=9999?te(e,4):"+"+e}),Z(0,["YY",2],0,function(){return this.year()%100}),Z(0,["YYYY",4],0,"year"),Z(0,["YYYYY",5],0,"year"),Z(0,["YYYYYY",6,!0],0,"year"),ae("Y",pt),ae("YY",je,Ue),ae("YYYY",mt,Yt),ae("YYYYY",dt,st),ae("YYYYYY",dt,st),Te(["YYYYY","YYYYYY"],Ge),Te("YYYY",function(e,t){t[Ge]=e.length===2?i.parseTwoDigitYear(e):be(e)}),Te("YY",function(e,t){t[Ge]=i.parseTwoDigitYear(e)}),Te("Y",function(e,t){t[Ge]=parseInt(e,10)});function qe(e){return Vt(e)?366:365}i.parseTwoDigitYear=function(e){return be(e)+(be(e)>68?1900:2e3)};var Fe=Be("FullYear",!0);function Le(){return Vt(this.year())}function Be(e,t){return function(a){return a!=null?(ft(this,e,a),i.updateOffset(this,t),this):nt(this,e)}}function nt(e,t){if(!e.isValid())return NaN;var a=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?a.getUTCMilliseconds():a.getMilliseconds();case"Seconds":return n?a.getUTCSeconds():a.getSeconds();case"Minutes":return n?a.getUTCMinutes():a.getMinutes();case"Hours":return n?a.getUTCHours():a.getHours();case"Date":return n?a.getUTCDate():a.getDate();case"Day":return n?a.getUTCDay():a.getDay();case"Month":return n?a.getUTCMonth():a.getMonth();case"FullYear":return n?a.getUTCFullYear():a.getFullYear();default:return NaN}}function ft(e,t,a){var n,d,D,L,ne;if(!(!e.isValid()||isNaN(a))){switch(n=e._d,d=e._isUTC,t){case"Milliseconds":return void(d?n.setUTCMilliseconds(a):n.setMilliseconds(a));case"Seconds":return void(d?n.setUTCSeconds(a):n.setSeconds(a));case"Minutes":return void(d?n.setUTCMinutes(a):n.setMinutes(a));case"Hours":return void(d?n.setUTCHours(a):n.setHours(a));case"Date":return void(d?n.setUTCDate(a):n.setDate(a));case"FullYear":break;default:return}D=a,L=e.month(),ne=e.date(),ne=ne===29&&L===1&&!Vt(D)?28:ne,d?n.setUTCFullYear(D,L,ne):n.setFullYear(D,L,ne)}}function Je(e){return e=ge(e),A(this[e])?this[e]():this}function Ut(e,t){if(typeof e=="object"){e=_e(e);var a=Re(e),n,d=a.length;for(n=0;n<d;n++)this[a[n].unit](e[a[n].unit])}else if(e=ge(e),A(this[e]))return this[e](t);return this}function Pr(e,t){return(e%t+t)%t}var ze;Array.prototype.indexOf?ze=Array.prototype.indexOf:ze=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function Nr(e,t){if(isNaN(e)||isNaN(t))return NaN;var a=Pr(t,12);return e+=(t-a)/12,a===1?Vt(e)?29:28:31-a%7%2}Z("M",["MM",2],"Mo",function(){return this.month()+1}),Z("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),Z("MMMM",0,0,function(e){return this.localeData().months(this,e)}),ae("M",je,rt),ae("MM",je,Ue),ae("MMM",function(e,t){return t.monthsShortRegex(e)}),ae("MMMM",function(e,t){return t.monthsRegex(e)}),Te(["M","MM"],function(e,t){t[w]=be(e)-1}),Te(["MMM","MMMM"],function(e,t,a,n){var d=a._locale.monthsParse(e,n,a._strict);d!=null?t[w]=d:_(a).invalidMonth=e});var to="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Cn="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Yn=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,ro=lt,ao=lt;function no(e,t){return e?M(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Yn).test(t)?"format":"standalone"][e.month()]:M(this._months)?this._months:this._months.standalone}function io(e,t){return e?M(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Yn.test(t)?"format":"standalone"][e.month()]:M(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function so(e,t,a){var n,d,D,L=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)D=g([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(D,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(D,"").toLocaleLowerCase();return a?t==="MMM"?(d=ze.call(this._shortMonthsParse,L),d!==-1?d:null):(d=ze.call(this._longMonthsParse,L),d!==-1?d:null):t==="MMM"?(d=ze.call(this._shortMonthsParse,L),d!==-1?d:(d=ze.call(this._longMonthsParse,L),d!==-1?d:null)):(d=ze.call(this._longMonthsParse,L),d!==-1?d:(d=ze.call(this._shortMonthsParse,L),d!==-1?d:null))}function oo(e,t,a){var n,d,D;if(this._monthsParseExact)return so.call(this,e,t,a);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(d=g([2e3,n]),a&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(d,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(d,"").replace(".","")+"$","i")),!a&&!this._monthsParse[n]&&(D="^"+this.months(d,"")+"|^"+this.monthsShort(d,""),this._monthsParse[n]=new RegExp(D.replace(".",""),"i")),a&&t==="MMMM"&&this._longMonthsParse[n].test(e))return n;if(a&&t==="MMM"&&this._shortMonthsParse[n].test(e))return n;if(!a&&this._monthsParse[n].test(e))return n}}function jn(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=be(t);else if(t=e.localeData().monthsParse(t),!c(t))return e}var a=t,n=e.date();return n=n<29?n:Math.min(n,Nr(e.year(),a)),e._isUTC?e._d.setUTCMonth(a,n):e._d.setMonth(a,n),e}function Tn(e){return e!=null?(jn(this,e),i.updateOffset(this,!0),this):nt(this,"Month")}function lo(){return Nr(this.year(),this.month())}function uo(e){return this._monthsParseExact?(l(this,"_monthsRegex")||Pn.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(l(this,"_monthsShortRegex")||(this._monthsShortRegex=ro),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function co(e){return this._monthsParseExact?(l(this,"_monthsRegex")||Pn.call(this),e?this._monthsStrictRegex:this._monthsRegex):(l(this,"_monthsRegex")||(this._monthsRegex=ao),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function Pn(){function e(pe,De){return De.length-pe.length}var t=[],a=[],n=[],d,D,L,ne;for(d=0;d<12;d++)D=g([2e3,d]),L=at(this.monthsShort(D,"")),ne=at(this.months(D,"")),t.push(L),a.push(ne),n.push(ne),n.push(L);t.sort(e),a.sort(e),n.sort(e),this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function ho(e,t,a,n,d,D,L){var ne;return e<100&&e>=0?(ne=new Date(e+400,t,a,n,d,D,L),isFinite(ne.getFullYear())&&ne.setFullYear(e)):ne=new Date(e,t,a,n,d,D,L),ne}function Gt(e){var t,a;return e<100&&e>=0?(a=Array.prototype.slice.call(arguments),a[0]=e+400,t=new Date(Date.UTC.apply(null,a)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function ar(e,t,a){var n=7+t-a,d=(7+Gt(e,0,n).getUTCDay()-t)%7;return-d+n-1}function Nn(e,t,a,n,d){var D=(7+a-n)%7,L=ar(e,n,d),ne=1+7*(t-1)+D+L,pe,De;return ne<=0?(pe=e-1,De=qe(pe)+ne):ne>qe(e)?(pe=e+1,De=ne-qe(e)):(pe=e,De=ne),{year:pe,dayOfYear:De}}function Jt(e,t,a){var n=ar(e.year(),t,a),d=Math.floor((e.dayOfYear()-n-1)/7)+1,D,L;return d<1?(L=e.year()-1,D=d+vt(L,t,a)):d>vt(e.year(),t,a)?(D=d-vt(e.year(),t,a),L=e.year()+1):(L=e.year(),D=d),{week:D,year:L}}function vt(e,t,a){var n=ar(e,t,a),d=ar(e+1,t,a);return(qe(e)-n+d)/7}Z("w",["ww",2],"wo","week"),Z("W",["WW",2],"Wo","isoWeek"),ae("w",je,rt),ae("ww",je,Ue),ae("W",je,rt),ae("WW",je,Ue),Tt(["w","ww","W","WW"],function(e,t,a,n){t[n.substr(0,1)]=be(e)});function fo(e){return Jt(e,this._week.dow,this._week.doy).week}var mo={dow:0,doy:6};function po(){return this._week.dow}function go(){return this._week.doy}function vo(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function yo(e){var t=Jt(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Z("d",0,"do","day"),Z("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),Z("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),Z("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),Z("e",0,0,"weekday"),Z("E",0,0,"isoWeekday"),ae("d",je),ae("e",je),ae("E",je),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)}),Tt(["dd","ddd","dddd"],function(e,t,a,n){var d=a._locale.weekdaysParse(e,n,a._strict);d!=null?t.d=d:_(a).invalidWeekday=e}),Tt(["d","e","E"],function(e,t,a,n){t[n]=be(e)});function _o(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function bo(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Rr(e,t){return e.slice(t,7).concat(e.slice(0,t))}var wo="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Rn="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),So="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Mo=lt,xo=lt,Do=lt;function ko(e,t){var a=M(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Rr(a,this._week.dow):e?a[e.day()]:a}function Oo(e){return e===!0?Rr(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Co(e){return e===!0?Rr(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Yo(e,t,a){var n,d,D,L=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)D=g([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(D,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(D,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(D,"").toLocaleLowerCase();return a?t==="dddd"?(d=ze.call(this._weekdaysParse,L),d!==-1?d:null):t==="ddd"?(d=ze.call(this._shortWeekdaysParse,L),d!==-1?d:null):(d=ze.call(this._minWeekdaysParse,L),d!==-1?d:null):t==="dddd"?(d=ze.call(this._weekdaysParse,L),d!==-1||(d=ze.call(this._shortWeekdaysParse,L),d!==-1)?d:(d=ze.call(this._minWeekdaysParse,L),d!==-1?d:null)):t==="ddd"?(d=ze.call(this._shortWeekdaysParse,L),d!==-1||(d=ze.call(this._weekdaysParse,L),d!==-1)?d:(d=ze.call(this._minWeekdaysParse,L),d!==-1?d:null)):(d=ze.call(this._minWeekdaysParse,L),d!==-1||(d=ze.call(this._weekdaysParse,L),d!==-1)?d:(d=ze.call(this._shortWeekdaysParse,L),d!==-1?d:null))}function jo(e,t,a){var n,d,D;if(this._weekdaysParseExact)return Yo.call(this,e,t,a);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(d=g([2e3,1]).day(n),a&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(d,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(d,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(d,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(D="^"+this.weekdays(d,"")+"|^"+this.weekdaysShort(d,"")+"|^"+this.weekdaysMin(d,""),this._weekdaysParse[n]=new RegExp(D.replace(".",""),"i")),a&&t==="dddd"&&this._fullWeekdaysParse[n].test(e))return n;if(a&&t==="ddd"&&this._shortWeekdaysParse[n].test(e))return n;if(a&&t==="dd"&&this._minWeekdaysParse[n].test(e))return n;if(!a&&this._weekdaysParse[n].test(e))return n}}function To(e){if(!this.isValid())return e!=null?this:NaN;var t=nt(this,"Day");return e!=null?(e=_o(e,this.localeData()),this.add(e-t,"d")):t}function Po(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 No(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=bo(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function Ro(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Er.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(l(this,"_weekdaysRegex")||(this._weekdaysRegex=Mo),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Eo(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Er.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(l(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=xo),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Ao(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Er.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(l(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Do),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Er(){function e(Ke,St){return St.length-Ke.length}var t=[],a=[],n=[],d=[],D,L,ne,pe,De;for(D=0;D<7;D++)L=g([2e3,1]).day(D),ne=at(this.weekdaysMin(L,"")),pe=at(this.weekdaysShort(L,"")),De=at(this.weekdays(L,"")),t.push(ne),a.push(pe),n.push(De),d.push(ne),d.push(pe),d.push(De);t.sort(e),a.sort(e),n.sort(e),d.sort(e),this._weekdaysRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Ar(){return this.hours()%12||12}function Io(){return this.hours()||24}Z("H",["HH",2],0,"hour"),Z("h",["hh",2],0,Ar),Z("k",["kk",2],0,Io),Z("hmm",0,0,function(){return""+Ar.apply(this)+te(this.minutes(),2)}),Z("hmmss",0,0,function(){return""+Ar.apply(this)+te(this.minutes(),2)+te(this.seconds(),2)}),Z("Hmm",0,0,function(){return""+this.hours()+te(this.minutes(),2)}),Z("Hmmss",0,0,function(){return""+this.hours()+te(this.minutes(),2)+te(this.seconds(),2)});function En(e,t){Z(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}En("a",!0),En("A",!1);function An(e,t){return t._meridiemParse}ae("a",An),ae("A",An),ae("H",je,Qe),ae("h",je,rt),ae("k",je,rt),ae("HH",je,Ue),ae("hh",je,Ue),ae("kk",je,Ue),ae("hmm",jt),ae("hmmss",At),ae("Hmm",jt),ae("Hmmss",At),Te(["H","HH"],Q),Te(["k","kk"],function(e,t,a){var n=be(e);t[Q]=n===24?0:n}),Te(["a","A"],function(e,t,a){a._isPm=a._locale.isPM(e),a._meridiem=e}),Te(["h","hh"],function(e,t,a){t[Q]=be(e),_(a).bigHour=!0}),Te("hmm",function(e,t,a){var n=e.length-2;t[Q]=be(e.substr(0,n)),t[le]=be(e.substr(n)),_(a).bigHour=!0}),Te("hmmss",function(e,t,a){var n=e.length-4,d=e.length-2;t[Q]=be(e.substr(0,n)),t[le]=be(e.substr(n,2)),t[ye]=be(e.substr(d)),_(a).bigHour=!0}),Te("Hmm",function(e,t,a){var n=e.length-2;t[Q]=be(e.substr(0,n)),t[le]=be(e.substr(n))}),Te("Hmmss",function(e,t,a){var n=e.length-4,d=e.length-2;t[Q]=be(e.substr(0,n)),t[le]=be(e.substr(n,2)),t[ye]=be(e.substr(d))});function Fo(e){return(e+"").toLowerCase().charAt(0)==="p"}var Vo=/[ap]\.?m?\.?/i,zo=Be("Hours",!0);function Lo(e,t,a){return e>11?a?"pm":"PM":a?"am":"AM"}var In={calendar:re,longDateFormat:$,invalidDate:X,ordinal:H,dayOfMonthOrdinalParse:N,relativeTime:q,months:to,monthsShort:Cn,week:mo,weekdays:wo,weekdaysMin:So,weekdaysShort:Rn,meridiemParse:Vo},Ve={},Kt={},Xt;function Wo(e,t){var a,n=Math.min(e.length,t.length);for(a=0;a<n;a+=1)if(e[a]!==t[a])return a;return n}function Fn(e){return e&&e.toLowerCase().replace("_","-")}function qo(e){for(var t=0,a,n,d,D;t<e.length;){for(D=Fn(e[t]).split("-"),a=D.length,n=Fn(e[t+1]),n=n?n.split("-"):null;a>0;){if(d=nr(D.slice(0,a).join("-")),d)return d;if(n&&n.length>=a&&Wo(D,n)>=a-1)break;a--}t++}return Xt}function Ho(e){return!!(e&&e.match("^[^/\\\\]*$"))}function nr(e){var t=null,a;if(Ve[e]===void 0&&o&&o.exports&&Ho(e))try{t=Xt._abbr,a=wr,a("./locale/"+e),xt(t)}catch{Ve[e]=null}return Ve[e]}function xt(e,t){var a;return e&&(r(t)?a=yt(e):a=Ir(e,t),a?Xt=a:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Xt._abbr}function Ir(e,t){if(t!==null){var a,n=In;if(t.abbr=e,Ve[e]!=null)E("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(a=nr(t.parentLocale),a!=null)n=a._config;else return Kt[t.parentLocale]||(Kt[t.parentLocale]=[]),Kt[t.parentLocale].push({name:e,config:t}),null;return Ve[e]=new ee(B(n,t)),Kt[e]&&Kt[e].forEach(function(d){Ir(d.name,d.config)}),xt(e),Ve[e]}else return delete Ve[e],null}function $o(e,t){if(t!=null){var a,n,d=In;Ve[e]!=null&&Ve[e].parentLocale!=null?Ve[e].set(B(Ve[e]._config,t)):(n=nr(e),n!=null&&(d=n._config),t=B(d,t),n==null&&(t.abbr=e),a=new ee(t),a.parentLocale=Ve[e],Ve[e]=a),xt(e)}else Ve[e]!=null&&(Ve[e].parentLocale!=null?(Ve[e]=Ve[e].parentLocale,e===xt()&&xt(e)):Ve[e]!=null&&delete Ve[e]);return Ve[e]}function yt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Xt;if(!M(e)){if(t=nr(e),t)return t;e=[e]}return qo(e)}function Bo(){return ie(Ve)}function Fr(e){var t,a=e._a;return a&&_(e).overflow===-2&&(t=a[w]<0||a[w]>11?w:a[U]<1||a[U]>Nr(a[Ge],a[w])?U:a[Q]<0||a[Q]>24||a[Q]===24&&(a[le]!==0||a[ye]!==0||a[xe]!==0)?Q:a[le]<0||a[le]>59?le:a[ye]<0||a[ye]>59?ye:a[xe]<0||a[xe]>999?xe:-1,_(e)._overflowDayOfYear&&(t<Ge||t>U)&&(t=U),_(e)._overflowWeeks&&t===-1&&(t=Me),_(e)._overflowWeekday&&t===-1&&(t=we),_(e).overflow=t),e}var Uo=/^\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)?)?$/,Go=/^\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)?)?$/,Jo=/Z|[+-]\d\d(?::?\d\d)?/,ir=[["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]],Vr=[["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/]],Ko=/^\/?Date\((-?\d+)/i,Xo=/^(?:(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}))$/,Zo={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Vn(e){var t,a,n=e._i,d=Uo.exec(n)||Go.exec(n),D,L,ne,pe,De=ir.length,Ke=Vr.length;if(d){for(_(e).iso=!0,t=0,a=De;t<a;t++)if(ir[t][1].exec(d[1])){L=ir[t][0],D=ir[t][2]!==!1;break}if(L==null){e._isValid=!1;return}if(d[3]){for(t=0,a=Ke;t<a;t++)if(Vr[t][1].exec(d[3])){ne=(d[2]||" ")+Vr[t][0];break}if(ne==null){e._isValid=!1;return}}if(!D&&ne!=null){e._isValid=!1;return}if(d[4])if(Jo.exec(d[4]))pe="Z";else{e._isValid=!1;return}e._f=L+(ne||"")+(pe||""),Lr(e)}else e._isValid=!1}function Qo(e,t,a,n,d,D){var L=[el(e),Cn.indexOf(t),parseInt(a,10),parseInt(n,10),parseInt(d,10)];return D&&L.push(parseInt(D,10)),L}function el(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function tl(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function rl(e,t,a){if(e){var n=Rn.indexOf(e),d=new Date(t[0],t[1],t[2]).getDay();if(n!==d)return _(a).weekdayMismatch=!0,a._isValid=!1,!1}return!0}function al(e,t,a){if(e)return Zo[e];if(t)return 0;var n=parseInt(a,10),d=n%100,D=(n-d)/100;return D*60+d}function zn(e){var t=Xo.exec(tl(e._i)),a;if(t){if(a=Qo(t[4],t[3],t[2],t[5],t[6],t[7]),!rl(t[1],a,e))return;e._a=a,e._tzm=al(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 nl(e){var t=Ko.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(Vn(e),e._isValid===!1)delete e._isValid;else return;if(zn(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:i.createFromInputFallback(e)}i.createFromInputFallback=x("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 zt(e,t,a){return e??t??a}function il(e){var t=new Date(i.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function zr(e){var t,a,n=[],d,D,L;if(!e._d){for(d=il(e),e._w&&e._a[U]==null&&e._a[w]==null&&sl(e),e._dayOfYear!=null&&(L=zt(e._a[Ge],d[Ge]),(e._dayOfYear>qe(L)||e._dayOfYear===0)&&(_(e)._overflowDayOfYear=!0),a=Gt(L,0,e._dayOfYear),e._a[w]=a.getUTCMonth(),e._a[U]=a.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=n[t]=d[t];for(;t<7;t++)e._a[t]=n[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Q]===24&&e._a[le]===0&&e._a[ye]===0&&e._a[xe]===0&&(e._nextDay=!0,e._a[Q]=0),e._d=(e._useUTC?Gt:ho).apply(null,n),D=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Q]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==D&&(_(e).weekdayMismatch=!0)}}function sl(e){var t,a,n,d,D,L,ne,pe,De;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(D=1,L=4,a=zt(t.GG,e._a[Ge],Jt(Ae(),1,4).year),n=zt(t.W,1),d=zt(t.E,1),(d<1||d>7)&&(pe=!0)):(D=e._locale._week.dow,L=e._locale._week.doy,De=Jt(Ae(),D,L),a=zt(t.gg,e._a[Ge],De.year),n=zt(t.w,De.week),t.d!=null?(d=t.d,(d<0||d>6)&&(pe=!0)):t.e!=null?(d=t.e+D,(t.e<0||t.e>6)&&(pe=!0)):d=D),n<1||n>vt(a,D,L)?_(e)._overflowWeeks=!0:pe!=null?_(e)._overflowWeekday=!0:(ne=Nn(a,n,d,D,L),e._a[Ge]=ne.year,e._dayOfYear=ne.dayOfYear)}i.ISO_8601=function(){},i.RFC_2822=function(){};function Lr(e){if(e._f===i.ISO_8601){Vn(e);return}if(e._f===i.RFC_2822){zn(e);return}e._a=[],_(e).empty=!0;var t=""+e._i,a,n,d,D,L,ne=t.length,pe=0,De,Ke;for(d=Oe(e._f,e._locale).match(de)||[],Ke=d.length,a=0;a<Ke;a++)D=d[a],n=(t.match(jr(D,e))||[])[0],n&&(L=t.substr(0,t.indexOf(n)),L.length>0&&_(e).unusedInput.push(L),t=t.slice(t.indexOf(n)+n.length),pe+=n.length),oe[D]?(n?_(e).empty=!1:_(e).unusedTokens.push(D),Tr(D,n,e)):e._strict&&!n&&_(e).unusedTokens.push(D);_(e).charsLeftOver=ne-pe,t.length>0&&_(e).unusedInput.push(t),e._a[Q]<=12&&_(e).bigHour===!0&&e._a[Q]>0&&(_(e).bigHour=void 0),_(e).parsedDateParts=e._a.slice(0),_(e).meridiem=e._meridiem,e._a[Q]=ol(e._locale,e._a[Q],e._meridiem),De=_(e).era,De!==null&&(e._a[Ge]=e._locale.erasConvertYear(De,e._a[Ge])),zr(e),Fr(e)}function ol(e,t,a){var n;return a==null?t:e.meridiemHour!=null?e.meridiemHour(t,a):(e.isPM!=null&&(n=e.isPM(a),n&&t<12&&(t+=12),!n&&t===12&&(t=0)),t)}function ll(e){var t,a,n,d,D,L,ne=!1,pe=e._f.length;if(pe===0){_(e).invalidFormat=!0,e._d=new Date(NaN);return}for(d=0;d<pe;d++)D=0,L=!1,t=O({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[d],Lr(t),Y(t)&&(L=!0),D+=_(t).charsLeftOver,D+=_(t).unusedTokens.length*10,_(t).score=D,ne?D<n&&(n=D,a=t):(n==null||D<n||L)&&(n=D,a=t,L&&(ne=!0));p(e,a||t)}function ul(e){if(!e._d){var t=_e(e._i),a=t.day===void 0?t.date:t.day;e._a=f([t.year,t.month,a,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)}),zr(e)}}function cl(e){var t=new v(Fr(Ln(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Ln(e){var t=e._i,a=e._f;return e._locale=e._locale||yt(e._l),t===null||a===void 0&&t===""?j({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),T(t)?new v(Fr(t)):(h(t)?e._d=t:M(a)?ll(e):a?Lr(e):dl(e),Y(e)||(e._d=null),e))}function dl(e){var t=e._i;r(t)?e._d=new Date(i.now()):h(t)?e._d=new Date(t.valueOf()):typeof t=="string"?nl(e):M(t)?(e._a=f(t.slice(0),function(a){return parseInt(a,10)}),zr(e)):I(t)?ul(e):c(t)?e._d=new Date(t):i.createFromInputFallback(e)}function Wn(e,t,a,n,d){var D={};return(t===!0||t===!1)&&(n=t,t=void 0),(a===!0||a===!1)&&(n=a,a=void 0),(I(e)&&y(e)||M(e)&&e.length===0)&&(e=void 0),D._isAMomentObject=!0,D._useUTC=D._isUTC=d,D._l=a,D._i=e,D._f=t,D._strict=n,cl(D)}function Ae(e,t,a,n){return Wn(e,t,a,n,!1)}var hl=x("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ae.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:j()}),fl=x("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ae.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:j()});function qn(e,t){var a,n;if(t.length===1&&M(t[0])&&(t=t[0]),!t.length)return Ae();for(a=t[0],n=1;n<t.length;++n)(!t[n].isValid()||t[n][e](a))&&(a=t[n]);return a}function ml(){var e=[].slice.call(arguments,0);return qn("isBefore",e)}function pl(){var e=[].slice.call(arguments,0);return qn("isAfter",e)}var gl=function(){return Date.now?Date.now():+new Date},Zt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function vl(e){var t,a=!1,n,d=Zt.length;for(t in e)if(l(e,t)&&!(ze.call(Zt,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(n=0;n<d;++n)if(e[Zt[n]]){if(a)return!1;parseFloat(e[Zt[n]])!==be(e[Zt[n]])&&(a=!0)}return!0}function yl(){return this._isValid}function _l(){return ut(NaN)}function sr(e){var t=_e(e),a=t.year||0,n=t.quarter||0,d=t.month||0,D=t.week||t.isoWeek||0,L=t.day||0,ne=t.hour||0,pe=t.minute||0,De=t.second||0,Ke=t.millisecond||0;this._isValid=vl(t),this._milliseconds=+Ke+De*1e3+pe*6e4+ne*1e3*60*60,this._days=+L+D*7,this._months=+d+n*3+a*12,this._data={},this._locale=yt(),this._bubble()}function or(e){return e instanceof sr}function Wr(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function bl(e,t,a){var n=Math.min(e.length,t.length),d=Math.abs(e.length-t.length),D=0,L;for(L=0;L<n;L++)be(e[L])!==be(t[L])&&D++;return D+d}function Hn(e,t){Z(e,0,0,function(){var a=this.utcOffset(),n="+";return a<0&&(a=-a,n="-"),n+te(~~(a/60),2)+t+te(~~a%60,2)})}Hn("Z",":"),Hn("ZZ",""),ae("Z",We),ae("ZZ",We),Te(["Z","ZZ"],function(e,t,a){a._useUTC=!0,a._tzm=qr(We,e)});var wl=/([\+\-]|\d\d)/gi;function qr(e,t){var a=(t||"").match(e),n,d,D;return a===null?null:(n=a[a.length-1]||[],d=(n+"").match(wl)||["-",0,0],D=+(d[1]*60)+be(d[2]),D===0?0:d[0]==="+"?D:-D)}function Hr(e,t){var a,n;return t._isUTC?(a=t.clone(),n=(T(e)||h(e)?e.valueOf():Ae(e).valueOf())-a.valueOf(),a._d.setTime(a._d.valueOf()+n),i.updateOffset(a,!1),a):Ae(e).local()}function $r(e){return-Math.round(e._d.getTimezoneOffset())}i.updateOffset=function(){};function Sl(e,t,a){var n=this._offset||0,d;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=qr(We,e),e===null)return this}else Math.abs(e)<16&&!a&&(e=e*60);return!this._isUTC&&t&&(d=$r(this)),this._offset=e,this._isUTC=!0,d!=null&&this.add(d,"m"),n!==e&&(!t||this._changeInProgress?Gn(this,ut(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?n:$r(this)}function Ml(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function xl(e){return this.utcOffset(0,e)}function Dl(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract($r(this),"m")),this}function kl(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=qr(gt,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function Ol(e){return this.isValid()?(e=e?Ae(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function Cl(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Yl(){if(!r(this._isDSTShifted))return this._isDSTShifted;var e={},t;return O(e,this),e=Ln(e),e._a?(t=e._isUTC?g(e._a):Ae(e._a),this._isDSTShifted=this.isValid()&&bl(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function jl(){return this.isValid()?!this._isUTC:!1}function Tl(){return this.isValid()?this._isUTC:!1}function $n(){return this.isValid()?this._isUTC&&this._offset===0:!1}var Pl=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Nl=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function ut(e,t){var a=e,n=null,d,D,L;return or(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:c(e)||!isNaN(+e)?(a={},t?a[t]=+e:a.milliseconds=+e):(n=Pl.exec(e))?(d=n[1]==="-"?-1:1,a={y:0,d:be(n[U])*d,h:be(n[Q])*d,m:be(n[le])*d,s:be(n[ye])*d,ms:be(Wr(n[xe]*1e3))*d}):(n=Nl.exec(e))?(d=n[1]==="-"?-1:1,a={y:Pt(n[2],d),M:Pt(n[3],d),w:Pt(n[4],d),d:Pt(n[5],d),h:Pt(n[6],d),m:Pt(n[7],d),s:Pt(n[8],d)}):a==null?a={}:typeof a=="object"&&("from"in a||"to"in a)&&(L=Rl(Ae(a.from),Ae(a.to)),a={},a.ms=L.milliseconds,a.M=L.months),D=new sr(a),or(e)&&l(e,"_locale")&&(D._locale=e._locale),or(e)&&l(e,"_isValid")&&(D._isValid=e._isValid),D}ut.fn=sr.prototype,ut.invalid=_l;function Pt(e,t){var a=e&&parseFloat(e.replace(",","."));return(isNaN(a)?0:a)*t}function Bn(e,t){var a={};return a.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(a.months,"M").isAfter(t)&&--a.months,a.milliseconds=+t-+e.clone().add(a.months,"M"),a}function Rl(e,t){var a;return e.isValid()&&t.isValid()?(t=Hr(t,e),e.isBefore(t)?a=Bn(e,t):(a=Bn(t,e),a.milliseconds=-a.milliseconds,a.months=-a.months),a):{milliseconds:0,months:0}}function Un(e,t){return function(a,n){var d,D;return n!==null&&!isNaN(+n)&&(E(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."),D=a,a=n,n=D),d=ut(a,n),Gn(this,d,e),this}}function Gn(e,t,a,n){var d=t._milliseconds,D=Wr(t._days),L=Wr(t._months);e.isValid()&&(n=n??!0,L&&jn(e,nt(e,"Month")+L*a),D&&ft(e,"Date",nt(e,"Date")+D*a),d&&e._d.setTime(e._d.valueOf()+d*a),n&&i.updateOffset(e,D||L))}var El=Un(1,"add"),Al=Un(-1,"subtract");function Jn(e){return typeof e=="string"||e instanceof String}function Il(e){return T(e)||h(e)||Jn(e)||c(e)||Vl(e)||Fl(e)||e===null||e===void 0}function Fl(e){var t=I(e)&&!y(e),a=!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"],d,D,L=n.length;for(d=0;d<L;d+=1)D=n[d],a=a||l(e,D);return t&&a}function Vl(e){var t=M(e),a=!1;return t&&(a=e.filter(function(n){return!c(n)&&Jn(e)}).length===0),t&&a}function zl(e){var t=I(e)&&!y(e),a=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],d,D;for(d=0;d<n.length;d+=1)D=n[d],a=a||l(e,D);return t&&a}function Ll(e,t){var a=e.diff(t,"days",!0);return a<-6?"sameElse":a<-1?"lastWeek":a<0?"lastDay":a<1?"sameDay":a<2?"nextDay":a<7?"nextWeek":"sameElse"}function Wl(e,t){arguments.length===1&&(arguments[0]?Il(arguments[0])?(e=arguments[0],t=void 0):zl(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var a=e||Ae(),n=Hr(a,this).startOf("day"),d=i.calendarFormat(this,n)||"sameElse",D=t&&(A(t[d])?t[d].call(this,a):t[d]);return this.format(D||this.localeData().calendar(d,this,Ae(a)))}function ql(){return new v(this)}function Hl(e,t){var a=T(e)?e:Ae(e);return this.isValid()&&a.isValid()?(t=ge(t)||"millisecond",t==="millisecond"?this.valueOf()>a.valueOf():a.valueOf()<this.clone().startOf(t).valueOf()):!1}function $l(e,t){var a=T(e)?e:Ae(e);return this.isValid()&&a.isValid()?(t=ge(t)||"millisecond",t==="millisecond"?this.valueOf()<a.valueOf():this.clone().endOf(t).valueOf()<a.valueOf()):!1}function Bl(e,t,a,n){var d=T(e)?e:Ae(e),D=T(t)?t:Ae(t);return this.isValid()&&d.isValid()&&D.isValid()?(n=n||"()",(n[0]==="("?this.isAfter(d,a):!this.isBefore(d,a))&&(n[1]===")"?this.isBefore(D,a):!this.isAfter(D,a))):!1}function Ul(e,t){var a=T(e)?e:Ae(e),n;return this.isValid()&&a.isValid()?(t=ge(t)||"millisecond",t==="millisecond"?this.valueOf()===a.valueOf():(n=a.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf())):!1}function Gl(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Jl(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Kl(e,t,a){var n,d,D;if(!this.isValid())return NaN;if(n=Hr(e,this),!n.isValid())return NaN;switch(d=(n.utcOffset()-this.utcOffset())*6e4,t=ge(t),t){case"year":D=lr(this,n)/12;break;case"month":D=lr(this,n);break;case"quarter":D=lr(this,n)/3;break;case"second":D=(this-n)/1e3;break;case"minute":D=(this-n)/6e4;break;case"hour":D=(this-n)/36e5;break;case"day":D=(this-n-d)/864e5;break;case"week":D=(this-n-d)/6048e5;break;default:D=this-n}return a?D:et(D)}function lr(e,t){if(e.date()<t.date())return-lr(t,e);var a=(t.year()-e.year())*12+(t.month()-e.month()),n=e.clone().add(a,"months"),d,D;return t-n<0?(d=e.clone().add(a-1,"months"),D=(t-n)/(n-d)):(d=e.clone().add(a+1,"months"),D=(t-n)/(d-n)),-(a+D)||0}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Xl(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Zl(e){if(!this.isValid())return null;var t=e!==!0,a=t?this.clone().utc():this;return a.year()<0||a.year()>9999?Ye(a,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):A(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Ye(a,"Z")):Ye(a,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Ql(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",a,n,d,D;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),a="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",d="-MM-DD[T]HH:mm:ss.SSS",D=t+'[")]',this.format(a+n+d+D)}function eu(e){e||(e=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var t=Ye(this,e);return this.localeData().postformat(t)}function tu(e,t){return this.isValid()&&(T(e)&&e.isValid()||Ae(e).isValid())?ut({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ru(e){return this.from(Ae(),e)}function au(e,t){return this.isValid()&&(T(e)&&e.isValid()||Ae(e).isValid())?ut({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function nu(e){return this.to(Ae(),e)}function Kn(e){var t;return e===void 0?this._locale._abbr:(t=yt(e),t!=null&&(this._locale=t),this)}var Xn=x("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 Zn(){return this._locale}var ur=1e3,Lt=60*ur,cr=60*Lt,Qn=(365*400+97)*24*cr;function Wt(e,t){return(e%t+t)%t}function ei(e,t,a){return e<100&&e>=0?new Date(e+400,t,a)-Qn:new Date(e,t,a).valueOf()}function ti(e,t,a){return e<100&&e>=0?Date.UTC(e+400,t,a)-Qn:Date.UTC(e,t,a)}function iu(e){var t,a;if(e=ge(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(a=this._isUTC?ti:ei,e){case"year":t=a(this.year(),0,1);break;case"quarter":t=a(this.year(),this.month()-this.month()%3,1);break;case"month":t=a(this.year(),this.month(),1);break;case"week":t=a(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=a(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=a(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Wt(t+(this._isUTC?0:this.utcOffset()*Lt),cr);break;case"minute":t=this._d.valueOf(),t-=Wt(t,Lt);break;case"second":t=this._d.valueOf(),t-=Wt(t,ur);break}return this._d.setTime(t),i.updateOffset(this,!0),this}function su(e){var t,a;if(e=ge(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(a=this._isUTC?ti:ei,e){case"year":t=a(this.year()+1,0,1)-1;break;case"quarter":t=a(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=a(this.year(),this.month()+1,1)-1;break;case"week":t=a(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=a(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=a(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=cr-Wt(t+(this._isUTC?0:this.utcOffset()*Lt),cr)-1;break;case"minute":t=this._d.valueOf(),t+=Lt-Wt(t,Lt)-1;break;case"second":t=this._d.valueOf(),t+=ur-Wt(t,ur)-1;break}return this._d.setTime(t),i.updateOffset(this,!0),this}function ou(){return this._d.valueOf()-(this._offset||0)*6e4}function lu(){return Math.floor(this.valueOf()/1e3)}function uu(){return new Date(this.valueOf())}function cu(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function du(){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 hu(){return this.isValid()?this.toISOString():null}function fu(){return Y(this)}function mu(){return p({},_(this))}function pu(){return _(this).overflow}function gu(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Z("N",0,0,"eraAbbr"),Z("NN",0,0,"eraAbbr"),Z("NNN",0,0,"eraAbbr"),Z("NNNN",0,0,"eraName"),Z("NNNNN",0,0,"eraNarrow"),Z("y",["y",1],"yo","eraYear"),Z("y",["yy",2],0,"eraYear"),Z("y",["yyy",3],0,"eraYear"),Z("y",["yyyy",4],0,"eraYear"),ae("N",Br),ae("NN",Br),ae("NNN",Br),ae("NNNN",Ou),ae("NNNNN",Cu),Te(["N","NN","NNN","NNNN","NNNNN"],function(e,t,a,n){var d=a._locale.erasParse(e,n,a._strict);d?_(a).era=d:_(a).invalidEra=e}),ae("y",tt),ae("yy",tt),ae("yyy",tt),ae("yyyy",tt),ae("yo",Yu),Te(["y","yy","yyy","yyyy"],Ge),Te(["yo"],function(e,t,a,n){var d;a._locale._eraYearOrdinalRegex&&(d=e.match(a._locale._eraYearOrdinalRegex)),a._locale.eraYearOrdinalParse?t[Ge]=a._locale.eraYearOrdinalParse(e,d):t[Ge]=parseInt(e,10)});function vu(e,t){var a,n,d,D=this._eras||yt("en")._eras;for(a=0,n=D.length;a<n;++a)switch(typeof D[a].since==="string"&&(d=i(D[a].since).startOf("day"),D[a].since=d.valueOf()),typeof D[a].until){case"undefined":D[a].until=1/0;break;case"string":d=i(D[a].until).startOf("day").valueOf(),D[a].until=d.valueOf();break}return D}function yu(e,t,a){var n,d,D=this.eras(),L,ne,pe;for(e=e.toUpperCase(),n=0,d=D.length;n<d;++n)if(L=D[n].name.toUpperCase(),ne=D[n].abbr.toUpperCase(),pe=D[n].narrow.toUpperCase(),a)switch(t){case"N":case"NN":case"NNN":if(ne===e)return D[n];break;case"NNNN":if(L===e)return D[n];break;case"NNNNN":if(pe===e)return D[n];break}else if([L,ne,pe].indexOf(e)>=0)return D[n]}function _u(e,t){var a=e.since<=e.until?1:-1;return t===void 0?i(e.since).year():i(e.since).year()+(t-e.offset)*a}function bu(){var e,t,a,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(a=this.clone().startOf("day").valueOf(),n[e].since<=a&&a<=n[e].until||n[e].until<=a&&a<=n[e].since)return n[e].name;return""}function wu(){var e,t,a,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(a=this.clone().startOf("day").valueOf(),n[e].since<=a&&a<=n[e].until||n[e].until<=a&&a<=n[e].since)return n[e].narrow;return""}function Su(){var e,t,a,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(a=this.clone().startOf("day").valueOf(),n[e].since<=a&&a<=n[e].until||n[e].until<=a&&a<=n[e].since)return n[e].abbr;return""}function Mu(){var e,t,a,n,d=this.localeData().eras();for(e=0,t=d.length;e<t;++e)if(a=d[e].since<=d[e].until?1:-1,n=this.clone().startOf("day").valueOf(),d[e].since<=n&&n<=d[e].until||d[e].until<=n&&n<=d[e].since)return(this.year()-i(d[e].since).year())*a+d[e].offset;return this.year()}function xu(e){return l(this,"_erasNameRegex")||Ur.call(this),e?this._erasNameRegex:this._erasRegex}function Du(e){return l(this,"_erasAbbrRegex")||Ur.call(this),e?this._erasAbbrRegex:this._erasRegex}function ku(e){return l(this,"_erasNarrowRegex")||Ur.call(this),e?this._erasNarrowRegex:this._erasRegex}function Br(e,t){return t.erasAbbrRegex(e)}function Ou(e,t){return t.erasNameRegex(e)}function Cu(e,t){return t.erasNarrowRegex(e)}function Yu(e,t){return t._eraYearOrdinalRegex||tt}function Ur(){var e=[],t=[],a=[],n=[],d,D,L,ne,pe,De=this.eras();for(d=0,D=De.length;d<D;++d)L=at(De[d].name),ne=at(De[d].abbr),pe=at(De[d].narrow),t.push(L),e.push(ne),a.push(pe),n.push(L),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("^("+a.join("|")+")","i")}Z(0,["gg",2],0,function(){return this.weekYear()%100}),Z(0,["GG",2],0,function(){return this.isoWeekYear()%100});function dr(e,t){Z(0,[e,e.length],0,t)}dr("gggg","weekYear"),dr("ggggg","weekYear"),dr("GGGG","isoWeekYear"),dr("GGGGG","isoWeekYear"),ae("G",pt),ae("g",pt),ae("GG",je,Ue),ae("gg",je,Ue),ae("GGGG",mt,Yt),ae("gggg",mt,Yt),ae("GGGGG",dt,st),ae("ggggg",dt,st),Tt(["gggg","ggggg","GGGG","GGGGG"],function(e,t,a,n){t[n.substr(0,2)]=be(e)}),Tt(["gg","GG"],function(e,t,a,n){t[n]=i.parseTwoDigitYear(e)});function ju(e){return ri.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Tu(e){return ri.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Pu(){return vt(this.year(),1,4)}function Nu(){return vt(this.isoWeekYear(),1,4)}function Ru(){var e=this.localeData()._week;return vt(this.year(),e.dow,e.doy)}function Eu(){var e=this.localeData()._week;return vt(this.weekYear(),e.dow,e.doy)}function ri(e,t,a,n,d){var D;return e==null?Jt(this,n,d).year:(D=vt(e,n,d),t>D&&(t=D),Au.call(this,e,t,a,n,d))}function Au(e,t,a,n,d){var D=Nn(e,t,a,n,d),L=Gt(D.year,0,D.dayOfYear);return this.year(L.getUTCFullYear()),this.month(L.getUTCMonth()),this.date(L.getUTCDate()),this}Z("Q",0,"Qo","quarter"),ae("Q",ct),Te("Q",function(e,t){t[w]=(be(e)-1)*3});function Iu(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Z("D",["DD",2],"Do","date"),ae("D",je,rt),ae("DD",je,Ue),ae("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),Te(["D","DD"],U),Te("Do",function(e,t){t[U]=be(e.match(je)[0])});var ai=Be("Date",!0);Z("DDD",["DDDD",3],"DDDo","dayOfYear"),ae("DDD",ot),ae("DDDD",it),Te(["DDD","DDDD"],function(e,t,a){a._dayOfYear=be(e)});function Fu(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Z("m",["mm",2],0,"minute"),ae("m",je,Qe),ae("mm",je,Ue),Te(["m","mm"],le);var Vu=Be("Minutes",!1);Z("s",["ss",2],0,"second"),ae("s",je,Qe),ae("ss",je,Ue),Te(["s","ss"],ye);var zu=Be("Seconds",!1);Z("S",0,0,function(){return~~(this.millisecond()/100)}),Z(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Z(0,["SSS",3],0,"millisecond"),Z(0,["SSSS",4],0,function(){return this.millisecond()*10}),Z(0,["SSSSS",5],0,function(){return this.millisecond()*100}),Z(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),Z(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),Z(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),Z(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),ae("S",ot,ct),ae("SS",ot,Ue),ae("SSS",ot,it);var Dt,ni;for(Dt="SSSS";Dt.length<=9;Dt+="S")ae(Dt,tt);function Lu(e,t){t[xe]=be(("0."+e)*1e3)}for(Dt="S";Dt.length<=9;Dt+="S")Te(Dt,Lu);ni=Be("Milliseconds",!1),Z("z",0,0,"zoneAbbr"),Z("zz",0,0,"zoneName");function Wu(){return this._isUTC?"UTC":""}function qu(){return this._isUTC?"Coordinated Universal Time":""}var K=v.prototype;K.add=El,K.calendar=Wl,K.clone=ql,K.diff=Kl,K.endOf=su,K.format=eu,K.from=tu,K.fromNow=ru,K.to=au,K.toNow=nu,K.get=Je,K.invalidAt=pu,K.isAfter=Hl,K.isBefore=$l,K.isBetween=Bl,K.isSame=Ul,K.isSameOrAfter=Gl,K.isSameOrBefore=Jl,K.isValid=fu,K.lang=Xn,K.locale=Kn,K.localeData=Zn,K.max=fl,K.min=hl,K.parsingFlags=mu,K.set=Ut,K.startOf=iu,K.subtract=Al,K.toArray=cu,K.toObject=du,K.toDate=uu,K.toISOString=Zl,K.inspect=Ql,typeof Symbol<"u"&&Symbol.for!=null&&(K[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),K.toJSON=hu,K.toString=Xl,K.unix=lu,K.valueOf=ou,K.creationData=gu,K.eraName=bu,K.eraNarrow=wu,K.eraAbbr=Su,K.eraYear=Mu,K.year=Fe,K.isLeapYear=Le,K.weekYear=ju,K.isoWeekYear=Tu,K.quarter=K.quarters=Iu,K.month=Tn,K.daysInMonth=lo,K.week=K.weeks=vo,K.isoWeek=K.isoWeeks=yo,K.weeksInYear=Ru,K.weeksInWeekYear=Eu,K.isoWeeksInYear=Pu,K.isoWeeksInISOWeekYear=Nu,K.date=ai,K.day=K.days=To,K.weekday=Po,K.isoWeekday=No,K.dayOfYear=Fu,K.hour=K.hours=zo,K.minute=K.minutes=Vu,K.second=K.seconds=zu,K.millisecond=K.milliseconds=ni,K.utcOffset=Sl,K.utc=xl,K.local=Dl,K.parseZone=kl,K.hasAlignedHourOffset=Ol,K.isDST=Cl,K.isLocal=jl,K.isUtcOffset=Tl,K.isUtc=$n,K.isUTC=$n,K.zoneAbbr=Wu,K.zoneName=qu,K.dates=x("dates accessor is deprecated. Use date instead.",ai),K.months=x("months accessor is deprecated. Use month instead",Tn),K.years=x("years accessor is deprecated. Use year instead",Fe),K.zone=x("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Ml),K.isDSTShifted=x("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Yl);function Hu(e){return Ae(e*1e3)}function $u(){return Ae.apply(null,arguments).parseZone()}function ii(e){return e}var Ce=ee.prototype;Ce.calendar=fe,Ce.longDateFormat=J,Ce.invalidDate=P,Ce.ordinal=W,Ce.preparse=ii,Ce.postformat=ii,Ce.relativeTime=ce,Ce.pastFuture=se,Ce.set=z,Ce.eras=vu,Ce.erasParse=yu,Ce.erasConvertYear=_u,Ce.erasAbbrRegex=Du,Ce.erasNameRegex=xu,Ce.erasNarrowRegex=ku,Ce.months=no,Ce.monthsShort=io,Ce.monthsParse=oo,Ce.monthsRegex=co,Ce.monthsShortRegex=uo,Ce.week=fo,Ce.firstDayOfYear=go,Ce.firstDayOfWeek=po,Ce.weekdays=ko,Ce.weekdaysMin=Co,Ce.weekdaysShort=Oo,Ce.weekdaysParse=jo,Ce.weekdaysRegex=Ro,Ce.weekdaysShortRegex=Eo,Ce.weekdaysMinRegex=Ao,Ce.isPM=Fo,Ce.meridiem=Lo;function hr(e,t,a,n){var d=yt(),D=g().set(n,t);return d[a](D,e)}function si(e,t,a){if(c(e)&&(t=e,e=void 0),e=e||"",t!=null)return hr(e,t,a,"month");var n,d=[];for(n=0;n<12;n++)d[n]=hr(e,n,a,"month");return d}function Gr(e,t,a,n){typeof e=="boolean"?(c(t)&&(a=t,t=void 0),t=t||""):(t=e,a=t,e=!1,c(t)&&(a=t,t=void 0),t=t||"");var d=yt(),D=e?d._week.dow:0,L,ne=[];if(a!=null)return hr(t,(a+D)%7,n,"day");for(L=0;L<7;L++)ne[L]=hr(t,(L+D)%7,n,"day");return ne}function Bu(e,t){return si(e,t,"months")}function Uu(e,t){return si(e,t,"monthsShort")}function Gu(e,t,a){return Gr(e,t,a,"weekdays")}function Ju(e,t,a){return Gr(e,t,a,"weekdaysShort")}function Ku(e,t,a){return Gr(e,t,a,"weekdaysMin")}xt("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,a=be(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+a}}),i.lang=x("moment.lang is deprecated. Use moment.locale instead.",xt),i.langData=x("moment.langData is deprecated. Use moment.localeData instead.",yt);var _t=Math.abs;function Xu(){var e=this._data;return this._milliseconds=_t(this._milliseconds),this._days=_t(this._days),this._months=_t(this._months),e.milliseconds=_t(e.milliseconds),e.seconds=_t(e.seconds),e.minutes=_t(e.minutes),e.hours=_t(e.hours),e.months=_t(e.months),e.years=_t(e.years),this}function oi(e,t,a,n){var d=ut(t,a);return e._milliseconds+=n*d._milliseconds,e._days+=n*d._days,e._months+=n*d._months,e._bubble()}function Zu(e,t){return oi(this,e,t,1)}function Qu(e,t){return oi(this,e,t,-1)}function li(e){return e<0?Math.floor(e):Math.ceil(e)}function ec(){var e=this._milliseconds,t=this._days,a=this._months,n=this._data,d,D,L,ne,pe;return e>=0&&t>=0&&a>=0||e<=0&&t<=0&&a<=0||(e+=li(Jr(a)+t)*864e5,t=0,a=0),n.milliseconds=e%1e3,d=et(e/1e3),n.seconds=d%60,D=et(d/60),n.minutes=D%60,L=et(D/60),n.hours=L%24,t+=et(L/24),pe=et(ui(t)),a+=pe,t-=li(Jr(pe)),ne=et(a/12),a%=12,n.days=t,n.months=a,n.years=ne,this}function ui(e){return e*4800/146097}function Jr(e){return e*146097/4800}function tc(e){if(!this.isValid())return NaN;var t,a,n=this._milliseconds;if(e=ge(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+n/864e5,a=this._months+ui(t),e){case"month":return a;case"quarter":return a/3;case"year":return a/12}else switch(t=this._days+Math.round(Jr(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 bt(e){return function(){return this.as(e)}}var ci=bt("ms"),rc=bt("s"),ac=bt("m"),nc=bt("h"),ic=bt("d"),sc=bt("w"),oc=bt("M"),lc=bt("Q"),uc=bt("y"),cc=ci;function dc(){return ut(this)}function hc(e){return e=ge(e),this.isValid()?this[e+"s"]():NaN}function Nt(e){return function(){return this.isValid()?this._data[e]:NaN}}var fc=Nt("milliseconds"),mc=Nt("seconds"),pc=Nt("minutes"),gc=Nt("hours"),vc=Nt("days"),yc=Nt("months"),_c=Nt("years");function bc(){return et(this.days()/7)}var wt=Math.round,qt={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function wc(e,t,a,n,d){return d.relativeTime(t||1,!!a,e,n)}function Sc(e,t,a,n){var d=ut(e).abs(),D=wt(d.as("s")),L=wt(d.as("m")),ne=wt(d.as("h")),pe=wt(d.as("d")),De=wt(d.as("M")),Ke=wt(d.as("w")),St=wt(d.as("y")),kt=D<=a.ss&&["s",D]||D<a.s&&["ss",D]||L<=1&&["m"]||L<a.m&&["mm",L]||ne<=1&&["h"]||ne<a.h&&["hh",ne]||pe<=1&&["d"]||pe<a.d&&["dd",pe];return a.w!=null&&(kt=kt||Ke<=1&&["w"]||Ke<a.w&&["ww",Ke]),kt=kt||De<=1&&["M"]||De<a.M&&["MM",De]||St<=1&&["y"]||["yy",St],kt[2]=t,kt[3]=+e>0,kt[4]=n,wc.apply(null,kt)}function Mc(e){return e===void 0?wt:typeof e=="function"?(wt=e,!0):!1}function xc(e,t){return qt[e]===void 0?!1:t===void 0?qt[e]:(qt[e]=t,e==="s"&&(qt.ss=t-1),!0)}function Dc(e,t){if(!this.isValid())return this.localeData().invalidDate();var a=!1,n=qt,d,D;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(a=e),typeof t=="object"&&(n=Object.assign({},qt,t),t.s!=null&&t.ss==null&&(n.ss=t.s-1)),d=this.localeData(),D=Sc(this,!a,n,d),a&&(D=d.pastFuture(+this,D)),d.postformat(D)}var Kr=Math.abs;function Ht(e){return(e>0)-(e<0)||+e}function fr(){if(!this.isValid())return this.localeData().invalidDate();var e=Kr(this._milliseconds)/1e3,t=Kr(this._days),a=Kr(this._months),n,d,D,L,ne=this.asSeconds(),pe,De,Ke,St;return ne?(n=et(e/60),d=et(n/60),e%=60,n%=60,D=et(a/12),a%=12,L=e?e.toFixed(3).replace(/\.?0+$/,""):"",pe=ne<0?"-":"",De=Ht(this._months)!==Ht(ne)?"-":"",Ke=Ht(this._days)!==Ht(ne)?"-":"",St=Ht(this._milliseconds)!==Ht(ne)?"-":"",pe+"P"+(D?De+D+"Y":"")+(a?De+a+"M":"")+(t?Ke+t+"D":"")+(d||n||e?"T":"")+(d?St+d+"H":"")+(n?St+n+"M":"")+(e?St+L+"S":"")):"P0D"}var ke=sr.prototype;ke.isValid=yl,ke.abs=Xu,ke.add=Zu,ke.subtract=Qu,ke.as=tc,ke.asMilliseconds=ci,ke.asSeconds=rc,ke.asMinutes=ac,ke.asHours=nc,ke.asDays=ic,ke.asWeeks=sc,ke.asMonths=oc,ke.asQuarters=lc,ke.asYears=uc,ke.valueOf=cc,ke._bubble=ec,ke.clone=dc,ke.get=hc,ke.milliseconds=fc,ke.seconds=mc,ke.minutes=pc,ke.hours=gc,ke.days=vc,ke.weeks=bc,ke.months=yc,ke.years=_c,ke.humanize=Dc,ke.toISOString=fr,ke.toString=fr,ke.toJSON=fr,ke.locale=Kn,ke.localeData=Zn,ke.toIsoString=x("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",fr),ke.lang=Xn,Z("X",0,0,"unix"),Z("x",0,0,"valueOf"),ae("x",pt),ae("X",ht),Te("X",function(e,t,a){a._d=new Date(parseFloat(e)*1e3)}),Te("x",function(e,t,a){a._d=new Date(be(e))});return i.version="2.30.1",b(Ae),i.fn=K,i.min=ml,i.max=pl,i.now=gl,i.utc=g,i.unix=Hu,i.months=Bu,i.isDate=h,i.locale=xt,i.invalid=j,i.duration=ut,i.isMoment=T,i.weekdays=Gu,i.parseZone=$u,i.localeData=yt,i.isDuration=or,i.monthsShort=Uu,i.weekdaysMin=Ku,i.defineLocale=Ir,i.updateLocale=$o,i.locales=Bo,i.weekdaysShort=Ju,i.normalizeUnits=ge,i.relativeTimeRounding=Mc,i.relativeTimeThreshold=xc,i.calendarFormat=Ll,i.prototype=K,i.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"},i}))})(gr)),gr.exports}var Sh=dn.exports,Mi;function Mh(){return Mi||(Mi=1,(function(o,s){(function(u,i){i(typeof wr=="function"?_n():u.moment)})(Sh,(function(u){var i=u.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(){return this.day()===0?"[La scorsa] dddd [a"+(this.hours()>1?"lle ":this.hours()===0?" ":"ll'")+"]LT":"[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 i}))})()),dn.exports}Mh();var hn={exports:{}},xh=hn.exports,xi;function Dh(){return xi||(xi=1,(function(o,s){(function(u,i){i(typeof wr=="function"?_n():u.moment)})(xh,(function(u){var i=u.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(b){var M=b%10,I=~~(b%100/10)===1?"th":M===1?"st":M===2?"nd":M===3?"rd":"th";return b+I},week:{dow:1,doy:4}});return i}))})()),hn.exports}Dh();var fn={exports:{}},kh=fn.exports,Di;function Oh(){return Di||(Di=1,(function(o,s){(function(u,i){i(typeof wr=="function"?_n():u.moment)})(kh,(function(u){function i(M,I,l,y){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[M+" Tage",M+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[M+" Monate",M+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[M+" Jahre",M+" Jahren"]};return I?r[l][0]:r[l][1]}var b=u.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:i,mm:"%d Minuten",h:i,hh:"%d Stunden",d:i,dd:i,w:i,ww:"%d Wochen",M:i,MM:i,y:i,yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return b}))})()),fn.exports}Oh();const Ot=o=>{let s="";return o.split(":").forEach(u=>{s+=u}),parseInt(s)},ki=o=>o.toString().padStart(4,"0").match(/.{1,2}/g).join(":"),Xr=o=>{const s=o.address;if(o.addresstype==="county"&&s.country)return s.county;if(o.addresstype==="village"&&s.village)return s.village;const u=[];["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(M=>{s.hasOwnProperty(M)&&s[M]&&u.push(s[M])}),s.road?u.push(s.road):s.pedestrian?u.push(s.pedestrian):s.suburb?u.push(s.suburb):s.square?u.push(s.square):(s.neighbourhood&&u.push(s.neighbourhood),s.hamlet?u.push(s.hamlet):s.isolated_dwelling?u.push(s.isolated_dwelling):s.locality?u.push(s.locality):s.croft&&u.push(s.croft)),s.house_number&&u.push(s.house_number),s.postcode&&u.push(s.postcode),s.village&&u.push(s.village),s.town?u.push(s.town):s.city&&u.push(s.city);var b=u.join(", ").substr(0,150);return b};function tr(o){let s=window.sessionStorage.getItem(o);if(s!==null){let u=JSON.parse(s);if(new Date(u.expirationDate)>new Date)return u.value;window.sessionStorage.removeItem(o)}return null}function Ch(o,s,u){let i=u?new Date(u*1e3):null;if(i){let b={value:s,expirationDate:i.toISOString()};window.sessionStorage.setItem(o,JSON.stringify(b))}}function Oi({day:o,slot:s,i18next:u}){return m.jsx("li",{className:"it-list-item",children:m.jsx("div",{className:"list-item",children:m.jsx("div",{className:"it-right-zone",children:m.jsxs("span",{className:"text pl-4",children:[m.jsx("b",{children:o})," ",u.t("alle")," ",u.t("ore")," ",m.jsx("b",{children:s})]})})})})}function _r(){if(typeof document>"u")return;const o=document.activeElement?.closest?.("[data-formio-widget-scope]");if(o)return o;const s=document.querySelector("[data-formio-widget-scope]");return s||document.querySelector("widget-formio")||document.body}const Ci=Ct.Formio.Components.components.field,Yh=({component:o,current:s,onChange:u,i18next:i})=>{const[b,M]=G.useState(),[I,l]=G.useState([]),[y,r]=G.useState([]),[c,h]=G.useState(!1),[f,p]=G.useState(null),[g,C]=G.useState(null),[_,k]=G.useState(null),[Y,j]=G.useState(null),[F,R]=G.useState({}),[O,v]=G.useState(null),[T,S]=G.useState(!1),[x,V]=G.useState([]),[E,A]=G.useState(!1),z=G.useRef(),B=o.calendarId;he.locale(i.language),Se.locale(i.language);const ee=N=>{let W=he(N).format("YYYY-MM-DD");fetch(te(W)).then(q=>q.json()).then(q=>{let ce=fe(N||new Date);const se=q.filter(Re=>Re.available==!0);se.length===0&&X();let ge=[];ce.forEach(Re=>{q.some(ct=>ct.date===Re&&ct.available==!0)?ge.push({available:!0,date:Re}):ge.push({available:!1,date:Re})});const _e=ge.map(Re=>{if(Re.available===!1)return he(Re.date,"YYYY-MM-DD").toDate()});l(_e);const $e=se.length?se[0].date:N;ie($e)}).catch(q=>console.error(q))},ie=N=>{j(null),k(null),r([]);let W=he(N).format("YYYY-MM-DD");fetch(de(W)).then(q=>q.json()).then(q=>{const ce=q.filter(se=>se.availability==!0);R(ce[0]),ce.length>0?(r(q),h(!1),k(he(N).format("L")),M(he(N,"YYYY-MM-DD").toDate())):(q.length>0&&M(he(q[0].date,"YYYY-MM-DD").toDate()),r([]),X())})},re=()=>{if(B!==""&&B!=null)if(!s.dataValue)ee(new Date);else if(o.multiple&&Array.isArray(s.dataValue)){if(s.dataValue.length>0){v(s.dataValue);let N=[];s.dataValue.map(W=>{N.push({...W,date:he(W.date,"YYYY-MM-DD").format("DD-MM-YYYY")})}),V(N)}}else if(!o.multiple&&typeof s.dataValue=="object"){const N={date:s.dataValue.date,slot:s.dataValue.slot},W={...s.dataValue,date:he(s.dataValue.date,"YYYY-MM-DD").format("DD-MM-YYYY")};V([W]),v(N)}else{let N=s.dataValue.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),W=N[2].split("#");const q={date:he(N[0],"DD-MM-YYYY").format("YYYY-MM-DD"),slot:N[1]};o.multiple?(u([{date:N[0],slot:N[1],calendar_id:W[0],meeting_id:W[1],opening_hour_id:W.length===3?W[2]:""}]),V([{date:N[0],slot:N[1],calendar_id:W[0],meeting_id:W[1],opening_hour_id:W.length===3?W[2]:""}])):(u({date:N[0],slot:N[1],calendar_id:W[0],meeting_id:W[1],opening_hour_id:W.length===3?W[2]:""}),V([{date:N[0],slot:N[1],calendar_id:W[0],meeting_id:W[1],opening_hour_id:W.length===3?W[2]:""}])),v(q)}};G.useEffect(()=>{window.FormioInstance?.formReady.then(()=>{setTimeout(()=>{re()},1e3)})},[]);const fe=N=>{let q=he(N,"YYYY-MM").daysInMonth(),ce=[];for(;q;){let se=he(N).date(q);ce.push(se.format("YYYY-MM-DD")),q--}return ce},te=(N,W=!1)=>{let q=o.calendarId,ce=o.select_opening_hours,se=o.select_opening_hours?o.opening_hours:[];window.location.pathname.split("/");let ge=`${Ee()}/api/calendars/${q}/availabilities`,_e=[`from_time=${he(N).startOf("month").format("YYYY-MM-DD")}`,`to_time=${he(N).endOf("month").format("YYYY-MM-DD")}`];return W&&_e.push(`available=${W}`),ce&&se&&_e.push(`opening_hours=${se.join()}`),`${ge}?${_e.join("&")}`},de=(N,W=!1)=>{let q=o.calendarId,ce=o.select_opening_hours,se=o.select_opening_hours?o.opening_hours:[];window.location.pathname.split("/");const ge=he(N).format("YYYY-MM-DD");let _e=`${Ee()}/api/calendars/${q}/availabilities/${ge}`,$e=[];return W&&$e.push(`available=${W}`),ce&&se&&$e.push(`opening_hours=${se.join()}`),$e&&(_e=`${_e}?${$e.join("&")}`),_e},ve=N=>{ee(N)},me=N=>{setTimeout(()=>{S(!T)},1e3),ie(N)},oe=N=>{j(null),setTimeout(()=>{N&&(C(N.target.dataset),j(N.target.id))},300)},Z=N=>{p(null);let W=`${Ee()}/it/meetings/new-draft`,q={date:g?.date?he(g?.date).format("DD-MM-YYYY"):he(N.target.dataset.date).format("DD-MM-YYYY"),slot:g?.value_start&&g?.value_end?g.value_start+"-"+g.value_end:N.target.dataset.slots,calendar:o.calendarId,opening_hour:g?.opening_hour?g?.opening_hour:N.target.dataset.opening_hour,meeting:f?f.id:"",first_available_date:F.date,first_available_start_time:F.start_time,first_available_end_time:F.end_time,first_availability_updated_at:he().format()};fetch(W,{method:"POST",body:JSON.stringify(q),headers:{"Content-Type":"application/json; charset=utf-8"},strictErrors:!0}).then(ce=>{if(!ce.ok)throw new Error(i.t("Intervallo selezionato non disponibile!"));return ce.json()}).then(ce=>{p(ce);const se={date:q.date,slot:q.slot,calendar_id:q.calendar[0],opening_hour_id:q.opening_hour||q.opening_hour_id,meeting_id:ce.id};V([...x,se])}).catch(ce=>{console.log(ce),He.fire({title:"",html:"<p>"+ce+"</p>",icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},Ne=()=>{g&&(Z(),S(!T))},Ie=()=>m.jsx("span",{children:i.t("Tempo prenotazione scaduto!")}),Ye=({minutes:N,seconds:W,completed:q})=>q?m.jsx(Ie,{}):m.jsx("div",{children:m.jsxs("div",{children:[" ",m.jsxs("span",{children:[" ",m.jsxs("i",{children:[i.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"),":"]})," ",m.jsxs("b",{children:[N," ",i.t("minuti")," ",W," ",i.t("secondi")]})]})]})}),Oe=N=>{const W=Ot(N.target.value),q=Ot(N.target.min),ce=Ot(N.target.max);W<q||W>ce||W>Ot(g.end)?(He.fire({title:"",html:`<p>${i.t("l'orario")} <b>${ki(W)}</b> ${i.t("non è valido")}</p>`,icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),J("")):C({...g,value_start:N.target.value})},$=N=>{const W=Ot(N.target.value),q=Ot(N.target.min),ce=Ot(N.target.max);W<q||W>ce||W<Ot(g.start)?(He.fire({title:"",html:`<p>${i.t("l'orario")} <b>${ki(W)}</b> ${i.t("non è valido")}</p>`,icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),J("")):C({...g,value_end:N.target.value})},J=N=>{if(N===null||N==="")u("");else if(Array.isArray(N)&&N.length>0){let W=[];x.map(q=>{W.push({date:he(q.date,"DD-MM-YYYY").format("YYYY-MM-DD"),slot:q.slot,calendar_id:q.calendar_id||q.calendar[0],meeting_id:q.meeting_id,opening_hour_id:q.opening_hour||q.opening_hour_id})}),o.multiple?u(W):u(W[0])}else u("")},X=()=>{h(!0),p(null),k(null),J(null)},P=()=>{if(i.language==="it")return $s;if(i.language==="en")return Hs;if(i.language==="de")return qs};G.useEffect(()=>{J(x)},[x]),G.useEffect(()=>{document.querySelector(".formio-read-only")&&E===!1?(A(!0),setTimeout(()=>{re()},1e3)):(A(!1),setTimeout(()=>{re()},1e3))},[]);const H=(N,W)=>{let q=`${Ee()}/api/meetings/${W.meeting_id}`;fetch(q,{method:"DELETE",headers:{"Content-Type":"application/json; charset=utf-8",Authorization:`Bearer ${tr("auth-token")}`},strictErrors:!0}).then(ce=>{if(ce&&ce.status>400)He.fire({title:"",html:`<p>${i.t("Ci sono stati degli errori durante la cancellazione dello slot")}</p>`,icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1});else{const se=[...x.slice(0,N),...x.slice(N+1)];V(se),ee(new Date)}})};return m.jsxs(m.Fragment,{children:[E&&O?m.jsxs("div",{className:"my-5 mx-2 d-print-block d-preview-calendar d-preview-calendar-none",children:[m.jsxs("b",{children:[Array.isArray(O)&&O.length>1?i.t("Giorni selezionati per la prenotazione"):i.t("Giorno selezionato per la prenotazione"),":"]}),m.jsx("div",{className:"mb-5",children:m.jsx("div",{className:"it-list-wrapper",children:m.jsx("ul",{className:"it-list",children:Array.isArray(O)?O.map(N=>m.jsx(Oi,{day:he(N.date,"DD-MM-YYYY").format("DD/MM/YYYY"),i18next:i,slot:N.slot})):m.jsx(Oi,{day:he(O.date,"DD-MM-YYYY").format("DD/MM/YYYY"),i18next:i,slot:O.slot})})})})]}):m.jsx("div",{className:"slot-calendar ",children:m.jsxs("div",{className:"row",children:[o.multiple?m.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:m.jsxs("div",{className:"m-2",children:[m.jsx("h6",{children:i.t(o.label)}),m.jsx(yr.DayPicker,{mode:"single",selected:b,locale:P(),disabled:I,onMonthChange:ve,onDayClick:me}),m.jsx("p",{children:i.t("Seleziona un'altra data nel calendario per aggiungere una nuova prenotazione")})]})}):x.length!==1?m.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:m.jsxs("div",{className:"m-2",children:[m.jsx("h6",{children:i.t(o.label)}),m.jsx(yr.DayPicker,{mode:"single",selected:b,locale:P(),disabled:I,onMonthChange:ve,onDayClick:me}),m.jsxs("p",{children:[" ",i.t("Seleziona un'altra data nel calendario per aggiungere una nuova prenotazione")]})]})}):null,m.jsx("div",{className:"col-12",children:x.length?m.jsx("div",{className:"row m-2",children:m.jsxs("div",{className:"col-12 mb-4",children:[m.jsxs("b",{children:[x.length>1?i.t("Giorni selezionati per la prenotazione"):i.t("Giorno selezionato per la prenotazione"),":"," "]}),m.jsx("div",{className:"mb-5",children:m.jsx("div",{className:"it-list-wrapper",children:m.jsx("ul",{className:"it-list",children:x.map((N,W)=>m.jsx("li",{children:m.jsx("div",{className:"list-item",children:m.jsxs("div",{className:"it-right-zone",children:[m.jsxs("span",{className:"text pl-4",children:[N.date," ",g||N.slot?`${i.t("alle")} ${N.slot}`:""]}),m.jsx(ue.Icon,{icon:"it-delete",onClick:()=>H(W,N),role:"button"})]})})},"li"+W))})})}),f?m.jsx(ue.Alert,{color:"info",defaultValue:"string",className:"d-print-none d-preview-calendar-none",children:m.jsx(zs,{date:f.expiration_time,renderer:Ye})}):null]})}):null})]})}),m.jsxs(ue.Modal,{isOpen:T,toggle:()=>S(!T),labelledBy:"daySelected",size:"lg",centered:!0,container:_r(),children:[m.jsx(ue.ModalHeader,{toggle:()=>S(!T),id:"daySelected",children:i.t("Seleziona una fascia oraria")}),c?null:m.jsxs("div",{className:"title-xsmall u-grey-dark px-4",children:[" ",i.t("Seleziona una fascia oraria e, se necessario, utilizza l'apposito controllo per accorciare la durata della prenotazione, Poi clicca su Conferma")]}),m.jsx(ue.ModalBody,{children:m.jsxs("div",{className:"row",children:[x.length>=1?m.jsxs("div",{children:[_&&!c?m.jsxs("h6",{children:[i.t("Orari disponibili del")," ",Se(_).format("DD/MM/YYYY")]}):null,m.jsxs("div",{className:"calendar-last-selection col-12 pt-2 mb-5",children:[m.jsx("small",{className:"pl-2 mb-2 d-flex px-2",children:m.jsxs("b",{children:[m.jsx(ue.Icon,{icon:"it-clock",className:"mr-1",size:"sm"})," ",i.t("Ultimo orario selezionato")]})}),m.jsx("div",{className:"col-6 px-2",children:m.jsx("button",{type:"button",id:"slot-last-selection",onClick:oe,tabIndex:"1",className:Y==="slot-last-selection"?"active btn btn-slot p-0":"btn btn-slot p-0","data-date":he(_,"DD/MM/YYYY").format("YYYY-MM-DD"),"data-slots":x[x.length-1].slot,"data-opening_hour":x[x.length-1].opening_hour_id,"data-start":x[x.length-1].slot.split("-")[0],"data-end":x[x.length-1].slot.split("-")[1],"data-value_start":x[x.length-1].slot.split("-")[0],"data-value_end":x[x.length-1].slot.split("-")[1],disabled:c,children:x[x.length-1].slot})})]})]}):null,m.jsx("div",{children:_&&x.length>=1?m.jsx("h6",{children:i.t("Seleziona altri orari")}):c?null:m.jsxs("h6",{children:[i.t("Orari disponibili del")," ",Se(_).format("DD/MM/YYYY")]})}),y.map((N,W)=>m.jsx("div",{className:"col-6",children:m.jsxs("button",{type:"button",id:"slot-"+W,onClick:oe,ref:z,className:Y==="slot-"+W?"active btn btn-slot p-0":"btn btn-slot p-0",tabIndex:"1","data-date":N.date,"data-start":N.start_time,"data-end":N.end_time,"data-value_start":N.start_time,"data-value_end":N.end_time,"data-slots":N.start_time+"-"+N.end_time,"data-opening_hour":N.opening_hour,"data-min_duration":N.min_duration,disabled:N.slots_available==0,children:[N.start_time," - ",N.end_time]})},"slot-"+W)),c?m.jsxs("div",{className:"callout callout-highlight warning",children:[m.jsxs("div",{className:"callout-title",children:[m.jsx(ue.Icon,{"aria-hidden":!0,icon:"it-help-circle"}),i.t("Attenzione")]}),m.jsxs("p",{children:[" ",i.t("Non è possibile prenotare per la data selezionata"),"."]})]}):null,m.jsx("div",{className:"col-12",children:g?.value_start&&Y?m.jsxs("div",{className:"row",children:[m.jsx("div",{className:"col-12 mb-3",children:m.jsx("p",{className:"mb-3",children:m.jsx("b",{children:i.t("Se necessario, utilizza il controllo che segue per accorciare la durata della prenotazione")})})}),m.jsx("div",{className:"col-12 col-md-6 mb-4",children:m.jsx(ue.Input,{type:"time",label:i.t("Dalle"),className:"active",defaultValue:g.value_start||g.start,min:g.start,max:g.end,onBlur:Oe})}),m.jsx("div",{className:"col-12 col-md-6 mb-4",children:m.jsx(ue.Input,{type:"time",label:i.t("alle"),className:"active",defaultValue:g.value_end||g.end,onBlur:$,min:g.start,max:g.end})})]}):null})]})}),m.jsx(ue.ModalFooter,{children:m.jsx(ue.Button,{color:"primary",onClick:()=>Ne(),disabled:!_||!g?.value_start,children:i.t("Conferma")})})]})]})};let Bs=class Us extends Ci{constructor(s,u,i){super(s,u,i)}static get builderInfo(){return{title:"Dynamic Calendar",group:"basic",icon:"bi bi-calendar-plus",documentation:"",weight:70,schema:Us.schema()}}static schema(){return Ci.schema({type:"dynamic_calendar"})}static editForm=Rc;attach(s){return super.attach(s).then(()=>{this.loadRefs(this.element,{[`react-${this.id}`]:"single"});const u=this.refs[`react-${this.id}`];return u?(this.rootComponent=Et.createRoot(u),this.rootComponent.render(m.jsx(Yh,{component:this.component,value:this.dataValue,onChange:i=>this.setValue(i),...this,current:this})),this):this})}detach(){return this.rootComponent&&(this.rootComponent.unmount(),this.rootComponent=null),super.detach()}setValue(s){if(s)if(Array.isArray(s))this.selectedNextSlots=s,this.updateValue(s),this.shouldSetValue=!0;else if(typeof s=="object")this.date=s.date,this.slot=s.slot,this.meeting=s.meeting_id,this.meeting_expiration_time=null,this.opening_hour=s.opening_hour_id,this.calendar_id=s.calendar_id,this.updateValue(s),this.shouldSetValue=!0;else{let u=s.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),i=u[2].split("#");this.date=u[0],this.slot=u[1],this.meeting=i[1],this.meeting_expiration_time=null,this.opening_hour=i.length===3?i[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 s=this.meeting?this.meeting:"",u=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:s,opening_hour_id:u}}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}};const jh=[{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:Ee()+"/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 = '"+Ee()+"'; 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:Ee()+"/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) {
|
|
47
|
+
}`,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 P(...e){return f.Components.baseEditForm([{key:`display`,components:ee}],...e)}function F(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function I(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}function L(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?z(s,e=>e.test(o)):R(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}}function R(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function z(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function te(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}var ne=365.2425,B=3600*24;B*7,B*ne/12*3;var re=Symbol.for(`constructDateFrom`);function ie(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&re in e?e[re](t):e instanceof Date?new e.constructor(t):new Date(t)}function ae(e,...t){let n=ie.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}var oe={};function se(){return oe}function ce(e,t){return ie(t||e,e)}function le(e,t){let n=se(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=ce(e,t?.in),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function ue(e,t,n){let[r,i]=ae(n?.in,e,t);return+le(r,n)==+le(i,n)}var de={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`}}},fe=(e,t,n)=>{let r,i=n?.addSuffix?de[e].withPreposition:de[e].standalone;return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,String(t)),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:`vor `+r:r},pe={date:F({formats:{full:`EEEE, do MMMM y`,long:`do MMMM y`,medium:`do MMM y`,short:`dd.MM.y`},defaultWidth:`full`}),time:F({formats:{full:`HH:mm:ss zzzz`,long:`HH:mm:ss z`,medium:`HH:mm:ss`,short:`HH:mm`},defaultWidth:`full`}),dateTime:F({formats:{full:`{{date}} 'um' {{time}}`,long:`{{date}} 'um' {{time}}`,medium:`{{date}} {{time}}`,short:`{{date}} {{time}}`},defaultWidth:`full`})},me={lastWeek:`'letzten' eeee 'um' p`,yesterday:`'gestern um' p`,today:`'heute um' p`,tomorrow:`'morgen um' p`,nextWeek:`eeee 'um' p`,other:`P`},V=(e,t,n,r)=>me[e],he={narrow:[`v.Chr.`,`n.Chr.`],abbreviated:[`v.Chr.`,`n.Chr.`],wide:[`vor Christus`,`nach Christus`]},ge={narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1. Quartal`,`2. Quartal`,`3. Quartal`,`4. Quartal`]},_e={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`]},ve={narrow:_e.narrow,abbreviated:[`Jan.`,`Feb.`,`März`,`Apr.`,`Mai`,`Juni`,`Juli`,`Aug.`,`Sep.`,`Okt.`,`Nov.`,`Dez.`],wide:_e.wide},ye={code:`de`,formatDistance:fe,formatLong:pe,formatRelative:V,localize:{ordinalNumber:e=>Number(e)+`.`,era:I({values:he,defaultWidth:`wide`}),quarter:I({values:ge,defaultWidth:`wide`,argumentCallback:e=>e-1}),month:I({values:_e,formattingValues:ve,defaultWidth:`wide`}),day:I({values:{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`]},defaultWidth:`wide`}),dayPeriod:I({values:{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`}},defaultWidth:`wide`,formattingValues:{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`}},defaultFormattingWidth:`wide`})},match:{ordinalNumber:te({matchPattern:/^(\d+)(\.)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e)}),era:L({matchPatterns:{narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^v/i,/^n/i]},defaultParseWidth:`any`}),quarter:L({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:L({matchPatterns:{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},defaultMatchWidth:`wide`,parsePatterns:{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]},defaultParseWidth:`any`}),day:L({matchPatterns:{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},defaultMatchWidth:`wide`,parsePatterns:{any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:L({matchPatterns:{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},defaultMatchWidth:`wide`,parsePatterns:{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}},defaultParseWidth:`any`})},options:{weekStartsOn:1,firstWeekContainsDate:4}},be={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`}},xe=(e,t,n)=>{let r,i=be[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r},Se={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},H=(e,t,n,r)=>Se[e],Ce={ordinalNumber:(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},era:I({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:I({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:I({values:{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`]},defaultWidth:`wide`}),day:I({values:{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`]},defaultWidth:`wide`}),dayPeriod:I({values:{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`}},defaultWidth:`wide`,formattingValues:{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`}},defaultFormattingWidth:`wide`})},we={ordinalNumber:te({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:L({matchPatterns:{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},defaultMatchWidth:`wide`,parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:`any`}),quarter:L({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:L({matchPatterns:{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},defaultMatchWidth:`wide`,parsePatterns:{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]},defaultParseWidth:`any`}),day:L({matchPatterns:{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},defaultMatchWidth:`wide`,parsePatterns:{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]},defaultParseWidth:`any`}),dayPeriod:L({matchPatterns:{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},defaultMatchWidth:`any`,parsePatterns:{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}},defaultParseWidth:`any`})},Te={code:`en-GB`,formatDistance:xe,formatLong:{date:F({formats:{full:`EEEE, d MMMM yyyy`,long:`d MMMM yyyy`,medium:`d MMM yyyy`,short:`dd/MM/yyyy`},defaultWidth:`full`}),time:F({formats:{full:`HH:mm:ss zzzz`,long:`HH:mm:ss z`,medium:`HH:mm:ss`,short:`HH:mm`},defaultWidth:`full`}),dateTime:F({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},formatRelative:H,localize:Ce,match:we,options:{weekStartsOn:1,firstWeekContainsDate:4}},Ee={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`}},De=(e,t,n)=>{let r,i=Ee[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`tra `+r:r+` fa`:r},Oe={date:F({formats:{full:`EEEE d MMMM y`,long:`d MMMM y`,medium:`d MMM y`,short:`dd/MM/y`},defaultWidth:`full`}),time:F({formats:{full:`HH:mm:ss zzzz`,long:`HH:mm:ss z`,medium:`HH:mm:ss`,short:`HH:mm`},defaultWidth:`full`}),dateTime:F({formats:{full:`{{date}} {{time}}`,long:`{{date}} {{time}}`,medium:`{{date}} {{time}}`,short:`{{date}} {{time}}`},defaultWidth:`full`})},ke=[`domenica`,`lunedì`,`martedì`,`mercoledì`,`giovedì`,`venerdì`,`sabato`];function Ae(e){switch(e){case 0:return`'domenica scorsa alle' p`;default:return`'`+ke[e]+` scorso alle' p`}}function je(e){return`'`+ke[e]+` alle' p`}function Me(e){switch(e){case 0:return`'domenica prossima alle' p`;default:return`'`+ke[e]+` prossimo alle' p`}}var Ne={lastWeek:(e,t,n)=>{let r=e.getDay();return ue(e,t,n)?je(r):Ae(r)},yesterday:`'ieri alle' p`,today:`'oggi alle' p`,tomorrow:`'domani alle' p`,nextWeek:(e,t,n)=>{let r=e.getDay();return ue(e,t,n)?je(r):Me(r)},other:`P`},Pe={code:`it`,formatDistance:De,formatLong:Oe,formatRelative:(e,t,n,r)=>{let i=Ne[e];return typeof i==`function`?i(t,n,r):i},localize:{ordinalNumber:(e,t)=>{let n=Number(e);return String(n)},era:I({values:{narrow:[`aC`,`dC`],abbreviated:[`a.C.`,`d.C.`],wide:[`avanti Cristo`,`dopo Cristo`]},defaultWidth:`wide`}),quarter:I({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`T1`,`T2`,`T3`,`T4`],wide:[`1º trimestre`,`2º trimestre`,`3º trimestre`,`4º trimestre`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:I({values:{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`]},defaultWidth:`wide`}),day:I({values:{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`]},defaultWidth:`wide`}),dayPeriod:I({values:{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`}},defaultWidth:`wide`,formattingValues:{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`}},defaultFormattingWidth:`wide`})},match:{ordinalNumber:te({matchPattern:/^(\d+)(º)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:L({matchPatterns:{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},defaultMatchWidth:`wide`,parsePatterns:{any:[/^a/i,/^(d|e)/i]},defaultParseWidth:`any`}),quarter:L({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^t[1234]/i,wide:/^[1234](º)? trimestre/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:L({matchPatterns:{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},defaultMatchWidth:`wide`,parsePatterns:{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]},defaultParseWidth:`any`}),day:L({matchPatterns:{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},defaultMatchWidth:`wide`,parsePatterns:{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]},defaultParseWidth:`any`}),dayPeriod:L({matchPatterns:{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},defaultMatchWidth:`any`,parsePatterns:{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}},defaultParseWidth:`any`})},options:{weekStartsOn:1,firstWeekContainsDate:4}},Fe=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):n.moment=r()})(e,(function(){"use strict";var e;function n(){return e.apply(null,arguments)}function r(t){e=t}function i(e){return e instanceof Array||Object.prototype.toString.call(e)===`[object Array]`}function a(e){return e!=null&&Object.prototype.toString.call(e)===`[object Object]`}function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function s(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;for(var t in e)if(o(e,t))return!1;return!0}function c(e){return e===void 0}function l(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 d(e,t){var n=[],r,i=e.length;for(r=0;r<i;++r)n.push(t(e[r],r));return n}function f(e,t){for(var n in t)o(t,n)&&(e[n]=t[n]);return o(t,`toString`)&&(e.toString=t.toString),o(t,`valueOf`)&&(e.valueOf=t.valueOf),e}function p(e,t,n,r){return Qn(e,t,n,r,!0).utc()}function m(){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 h(e){return e._pf??=m(),e._pf}var g=Array.prototype.some?Array.prototype.some:function(e){var t=Object(this),n=t.length>>>0,r;for(r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};function _(e){var t=null,n=!1,r=e._d&&!isNaN(e._d.getTime());if(r&&(t=h(e),n=g.call(t.parsedDateParts,function(e){return e!=null}),r=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(r=r&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=r;else return r;return e._isValid}function v(e){var t=p(NaN);return e==null?h(t).userInvalidated=!0:f(h(t),e),t}var y=n.momentProperties=[],b=!1;function x(e,t){var n,r,i,a=y.length;if(c(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),c(t._i)||(e._i=t._i),c(t._f)||(e._f=t._f),c(t._l)||(e._l=t._l),c(t._strict)||(e._strict=t._strict),c(t._tzm)||(e._tzm=t._tzm),c(t._isUTC)||(e._isUTC=t._isUTC),c(t._offset)||(e._offset=t._offset),c(t._pf)||(e._pf=h(t)),c(t._locale)||(e._locale=t._locale),a>0)for(n=0;n<a;n++)r=y[n],i=t[r],c(i)||(e[r]=i);return e}function S(e){x(this,e),this._d=new Date(e._d==null?NaN:e._d.getTime()),this.isValid()||(this._d=new Date(NaN)),b===!1&&(b=!0,n.updateOffset(this),b=!1)}function C(e){return e instanceof S||e!=null&&e._isAMomentObject!=null}function w(e){n.suppressDeprecationWarnings===!1&&typeof console<`u`&&console.warn&&console.warn(`Deprecation warning: `+e)}function T(e,t){var r=!0;return f(function(){if(n.deprecationHandler!=null&&n.deprecationHandler(null,e),r){var i=[],a,s,c,l=arguments.length;for(s=0;s<l;s++){if(a=``,typeof arguments[s]==`object`){for(c in a+=`
|
|
48
|
+
[`+s+`] `,arguments[0])o(arguments[0],c)&&(a+=c+`: `+arguments[0][c]+`, `);a=a.slice(0,-2)}else a=arguments[s];i.push(a)}w(e+`
|
|
49
|
+
Arguments: `+Array.prototype.slice.call(i).join(``)+`
|
|
50
|
+
`+Error().stack),r=!1}return t.apply(this,arguments)},t)}var E={};function D(e,t){n.deprecationHandler!=null&&n.deprecationHandler(e,t),E[e]||(w(t),E[e]=!0)}n.suppressDeprecationWarnings=!1,n.deprecationHandler=null;function O(e){return typeof Function<`u`&&e instanceof Function||Object.prototype.toString.call(e)===`[object Function]`}function k(e){var t,n;for(n in e)o(e,n)&&(t=e[n],O(t)?this[n]=t:this[`_`+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+`|\\d{1,2}`)}function A(e,t){var n=f({},e),r;for(r in t)o(t,r)&&(a(e[r])&&a(t[r])?(n[r]={},f(n[r],e[r]),f(n[r],t[r])):t[r]==null?delete n[r]:n[r]=t[r]);for(r in e)o(e,r)&&!o(t,r)&&a(e[r])&&(n[r]=f({},n[r]));return n}function j(e){e!=null&&this.set(e)}var M=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)o(e,t)&&n.push(t);return n},N={sameDay:`[Today at] LT`,nextDay:`[Tomorrow at] LT`,nextWeek:`dddd [at] LT`,lastDay:`[Yesterday at] LT`,lastWeek:`[Last] dddd [at] LT`,sameElse:`L`};function ee(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return O(r)?r.call(t,n):r}function P(e,t,n){var r=``+Math.abs(e),i=t-r.length;return(e>=0?n?`+`:``:`-`)+(10**Math.max(0,i)).toString().substr(1)+r}var F=/(\[[^\[]*\])|(\\)?([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,I=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,L={},R={};function z(e,t,n,r){var i=r;typeof r==`string`&&(i=function(){return this[r]()}),e&&(R[e]=i),t&&(R[t[0]]=function(){return P(i.apply(this,arguments),t[1],t[2])}),n&&(R[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function te(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,``):e.replace(/\\/g,``)}function ne(e){var t=e.match(F),n,r;for(n=0,r=t.length;n<r;n++)R[t[n]]?t[n]=R[t[n]]:t[n]=te(t[n]);return function(n){var i=``,a;for(a=0;a<r;a++)i+=O(t[a])?t[a].call(n,e):t[a];return i}}function B(e,t){return e.isValid()?(t=re(t,e.localeData()),L[t]=L[t]||ne(t),L[t](e)):e.localeData().invalidDate()}function re(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(I.lastIndex=0;n>=0&&I.test(e);)e=e.replace(I,r),I.lastIndex=0,--n;return e}var ie={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 ae(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(F).map(function(e){return e===`MMMM`||e===`MM`||e===`DD`||e===`dddd`?e.slice(1):e}).join(``),this._longDateFormat[e])}var oe=`Invalid date`;function se(){return this._invalidDate}var ce=`%d`,le=/\d{1,2}/;function ue(e){return this._ordinal.replace(`%d`,e)}var de={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 fe(e,t,n,r){var i=this._relativeTime[n];return O(i)?i(e,t,n,r):i.replace(/%d/i,e)}function pe(e,t){var n=this._relativeTime[e>0?`future`:`past`];return O(n)?n(t):n.replace(/%s/i,t)}var me={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 V(e){return typeof e==`string`?me[e]||me[e.toLowerCase()]:void 0}function he(e){var t={},n,r;for(r in e)o(e,r)&&(n=V(r),n&&(t[n]=e[r]));return t}var ge={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 _e(e){var t=[],n;for(n in e)o(e,n)&&t.push({unit:n,priority:ge[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}var ve=/\d/,ye=/\d\d/,be=/\d{3}/,xe=/\d{4}/,Se=/[+-]?\d{6}/,H=/\d\d?/,Ce=/\d\d\d\d?/,we=/\d\d\d\d\d\d?/,Te=/\d{1,3}/,Ee=/\d{1,4}/,De=/[+-]?\d{1,6}/,Oe=/\d+/,ke=/[+-]?\d+/,Ae=/Z|[+-]\d\d:?\d\d/gi,je=/Z|[+-]\d\d(?::?\d\d)?/gi,Me=/[+-]?\d+(\.\d{1,3})?/,Ne=/[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,Pe=/^[1-9]\d?/,Fe=/^([1-9]\d|\d)/,Ie={};function U(e,t,n){Ie[e]=O(t)?t:function(e,r){return e&&n?n:t}}function Le(e,t){return o(Ie,e)?Ie[e](t._strict,t._locale):new RegExp(Re(e))}function Re(e){return ze(e.replace(`\\`,``).replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,i){return t||n||r||i}))}function ze(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,`\\$&`)}function W(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function G(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=W(t)),n}var Be={};function K(e,t){var n,r=t,i;for(typeof e==`string`&&(e=[e]),l(t)&&(r=function(e,n){n[t]=G(e)}),i=e.length,n=0;n<i;n++)Be[e[n]]=r}function Ve(e,t){K(e,function(e,n,r,i){r._w=r._w||{},t(e,r._w,r,i)})}function He(e,t,n){t!=null&&o(Be,e)&&Be[e](t,n._a,n,e)}function Ue(e){return e%4==0&&e%100!=0||e%400==0}var We=0,Ge=1,Ke=2,q=3,qe=4,Je=5,Ye=6,Xe=7,Ze=8;z(`Y`,0,0,function(){var e=this.year();return e<=9999?P(e,4):`+`+e}),z(0,[`YY`,2],0,function(){return this.year()%100}),z(0,[`YYYY`,4],0,`year`),z(0,[`YYYYY`,5],0,`year`),z(0,[`YYYYYY`,6,!0],0,`year`),U(`Y`,ke),U(`YY`,H,ye),U(`YYYY`,Ee,xe),U(`YYYYY`,De,Se),U(`YYYYYY`,De,Se),K([`YYYYY`,`YYYYYY`],We),K(`YYYY`,function(e,t){t[We]=e.length===2?n.parseTwoDigitYear(e):G(e)}),K(`YY`,function(e,t){t[We]=n.parseTwoDigitYear(e)}),K(`Y`,function(e,t){t[We]=parseInt(e,10)});function Qe(e){return Ue(e)?366:365}n.parseTwoDigitYear=function(e){return G(e)+(G(e)>68?1900:2e3)};var $e=tt(`FullYear`,!0);function et(){return Ue(this.year())}function tt(e,t){return function(r){return r==null?nt(this,e):(rt(this,e,r),n.updateOffset(this,t),this)}}function nt(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case`Milliseconds`:return r?n.getUTCMilliseconds():n.getMilliseconds();case`Seconds`:return r?n.getUTCSeconds():n.getSeconds();case`Minutes`:return r?n.getUTCMinutes():n.getMinutes();case`Hours`:return r?n.getUTCHours():n.getHours();case`Date`:return r?n.getUTCDate():n.getDate();case`Day`:return r?n.getUTCDay():n.getDay();case`Month`:return r?n.getUTCMonth():n.getMonth();case`FullYear`:return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function rt(e,t,n){var r,i,a,o,s;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,i=e._isUTC,t){case`Milliseconds`:i?r.setUTCMilliseconds(n):r.setMilliseconds(n);return;case`Seconds`:i?r.setUTCSeconds(n):r.setSeconds(n);return;case`Minutes`:i?r.setUTCMinutes(n):r.setMinutes(n);return;case`Hours`:i?r.setUTCHours(n):r.setHours(n);return;case`Date`:i?r.setUTCDate(n):r.setDate(n);return;case`FullYear`:break;default:return}a=n,o=e.month(),s=e.date(),s=s===29&&o===1&&!Ue(a)?28:s,i?r.setUTCFullYear(a,o,s):r.setFullYear(a,o,s)}}function it(e){return e=V(e),O(this[e])?this[e]():this}function at(e,t){if(typeof e==`object`){e=he(e);var n=_e(e),r,i=n.length;for(r=0;r<i;r++)this[n[r].unit](e[n[r].unit])}else if(e=V(e),O(this[e]))return this[e](t);return this}function ot(e,t){return(e%t+t)%t}var J=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function st(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=ot(t,12);return e+=(t-n)/12,n===1?Ue(e)?29:28:31-n%7%2}z(`M`,[`MM`,2],`Mo`,function(){return this.month()+1}),z(`MMM`,0,0,function(e){return this.localeData().monthsShort(this,e)}),z(`MMMM`,0,0,function(e){return this.localeData().months(this,e)}),U(`M`,H,Pe),U(`MM`,H,ye),U(`MMM`,function(e,t){return t.monthsShortRegex(e)}),U(`MMMM`,function(e,t){return t.monthsRegex(e)}),K([`M`,`MM`],function(e,t){t[Ge]=G(e)-1}),K([`MMM`,`MMMM`],function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);i==null?h(n).invalidMonth=e:t[Ge]=i});var ct=`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),lt=`Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec`.split(`_`),ut=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,dt=Ne,ft=Ne;function pt(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||ut).test(t)?`format`:`standalone`][e.month()]:i(this._months)?this._months:this._months.standalone}function mt(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[ut.test(t)?`format`:`standalone`][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function ht(e,t,n){var r,i,a,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=p([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,``).toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,``).toLocaleLowerCase();return n?t===`MMM`?(i=J.call(this._shortMonthsParse,o),i===-1?null:i):(i=J.call(this._longMonthsParse,o),i===-1?null:i):t===`MMM`?(i=J.call(this._shortMonthsParse,o),i===-1?(i=J.call(this._longMonthsParse,o),i===-1?null:i):i):(i=J.call(this._longMonthsParse,o),i===-1?(i=J.call(this._shortMonthsParse,o),i===-1?null:i):i)}function gt(e,t,n){var r,i,a;if(this._monthsParseExact)return ht.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++)if(i=p([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=RegExp(`^`+this.months(i,``).replace(`.`,``)+`$`,`i`),this._shortMonthsParse[r]=RegExp(`^`+this.monthsShort(i,``).replace(`.`,``)+`$`,`i`)),!n&&!this._monthsParse[r]&&(a=`^`+this.months(i,``)+`|^`+this.monthsShort(i,``),this._monthsParse[r]=new RegExp(a.replace(`.`,``),`i`)),n&&t===`MMMM`&&this._longMonthsParse[r].test(e)||n&&t===`MMM`&&this._shortMonthsParse[r].test(e)||!n&&this._monthsParse[r].test(e))return r}function _t(e,t){if(!e.isValid())return e;if(typeof t==`string`){if(/^\d+$/.test(t))t=G(t);else if(t=e.localeData().monthsParse(t),!l(t))return e}var n=t,r=e.date();return r=r<29?r:Math.min(r,st(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function vt(e){return e==null?nt(this,`Month`):(_t(this,e),n.updateOffset(this,!0),this)}function yt(){return st(this.year(),this.month())}function bt(e){return this._monthsParseExact?(o(this,`_monthsRegex`)||St.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(o(this,`_monthsShortRegex`)||(this._monthsShortRegex=dt),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function xt(e){return this._monthsParseExact?(o(this,`_monthsRegex`)||St.call(this),e?this._monthsStrictRegex:this._monthsRegex):(o(this,`_monthsRegex`)||(this._monthsRegex=ft),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function St(){function e(e,t){return t.length-e.length}var t=[],n=[],r=[],i,a,o,s;for(i=0;i<12;i++)a=p([2e3,i]),o=ze(this.monthsShort(a,``)),s=ze(this.months(a,``)),t.push(o),n.push(s),r.push(s),r.push(o);t.sort(e),n.sort(e),r.sort(e),this._monthsRegex=RegExp(`^(`+r.join(`|`)+`)`,`i`),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=RegExp(`^(`+n.join(`|`)+`)`,`i`),this._monthsShortStrictRegex=RegExp(`^(`+t.join(`|`)+`)`,`i`)}function Ct(e,t,n,r,i,a,o){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,i,a,o),s}function wt(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Tt(e,t,n){var r=7+t-n;return-((7+wt(e,0,r).getUTCDay()-t)%7)+r-1}function Et(e,t,n,r,i){var a=(7+n-r)%7,o=Tt(e,r,i),s=1+7*(t-1)+a+o,c,l;return s<=0?(c=e-1,l=Qe(c)+s):s>Qe(e)?(c=e+1,l=s-Qe(e)):(c=e,l=s),{year:c,dayOfYear:l}}function Dt(e,t,n){var r=Tt(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,a,o;return i<1?(o=e.year()-1,a=i+Ot(o,t,n)):i>Ot(e.year(),t,n)?(a=i-Ot(e.year(),t,n),o=e.year()+1):(o=e.year(),a=i),{week:a,year:o}}function Ot(e,t,n){var r=Tt(e,t,n),i=Tt(e+1,t,n);return(Qe(e)-r+i)/7}z(`w`,[`ww`,2],`wo`,`week`),z(`W`,[`WW`,2],`Wo`,`isoWeek`),U(`w`,H,Pe),U(`ww`,H,ye),U(`W`,H,Pe),U(`WW`,H,ye),Ve([`w`,`ww`,`W`,`WW`],function(e,t,n,r){t[r.substr(0,1)]=G(e)});function kt(e){return Dt(e,this._week.dow,this._week.doy).week}var At={dow:0,doy:6};function jt(){return this._week.dow}function Mt(){return this._week.doy}function Nt(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,`d`)}function Pt(e){var t=Dt(this,1,4).week;return e==null?t:this.add((e-t)*7,`d`)}z(`d`,0,`do`,`day`),z(`dd`,0,0,function(e){return this.localeData().weekdaysMin(this,e)}),z(`ddd`,0,0,function(e){return this.localeData().weekdaysShort(this,e)}),z(`dddd`,0,0,function(e){return this.localeData().weekdays(this,e)}),z(`e`,0,0,`weekday`),z(`E`,0,0,`isoWeekday`),U(`d`,H),U(`e`,H),U(`E`,H),U(`dd`,function(e,t){return t.weekdaysMinRegex(e)}),U(`ddd`,function(e,t){return t.weekdaysShortRegex(e)}),U(`dddd`,function(e,t){return t.weekdaysRegex(e)}),Ve([`dd`,`ddd`,`dddd`],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i==null?h(n).invalidWeekday=e:t.d=i}),Ve([`d`,`e`,`E`],function(e,t,n,r){t[r]=G(e)});function Ft(e,t){return typeof e==`string`?isNaN(e)?(e=t.weekdaysParse(e),typeof e==`number`?e:null):parseInt(e,10):e}function It(e,t){return typeof e==`string`?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Lt(e,t){return e.slice(t,7).concat(e.slice(0,t))}var Rt=`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),zt=`Sun_Mon_Tue_Wed_Thu_Fri_Sat`.split(`_`),Bt=`Su_Mo_Tu_We_Th_Fr_Sa`.split(`_`),Vt=Ne,Ht=Ne,Ut=Ne;function Wt(e,t){var n=i(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?`format`:`standalone`];return e===!0?Lt(n,this._week.dow):e?n[e.day()]:n}function Gt(e){return e===!0?Lt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Kt(e){return e===!0?Lt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function qt(e,t,n){var r,i,a,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=p([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,``).toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,``).toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,``).toLocaleLowerCase();return n?t===`dddd`?(i=J.call(this._weekdaysParse,o),i===-1?null:i):t===`ddd`?(i=J.call(this._shortWeekdaysParse,o),i===-1?null:i):(i=J.call(this._minWeekdaysParse,o),i===-1?null:i):t===`dddd`?(i=J.call(this._weekdaysParse,o),i!==-1||(i=J.call(this._shortWeekdaysParse,o),i!==-1)?i:(i=J.call(this._minWeekdaysParse,o),i===-1?null:i)):t===`ddd`?(i=J.call(this._shortWeekdaysParse,o),i!==-1||(i=J.call(this._weekdaysParse,o),i!==-1)?i:(i=J.call(this._minWeekdaysParse,o),i===-1?null:i)):(i=J.call(this._minWeekdaysParse,o),i!==-1||(i=J.call(this._weekdaysParse,o),i!==-1)?i:(i=J.call(this._shortWeekdaysParse,o),i===-1?null:i))}function Jt(e,t,n){var r,i,a;if(this._weekdaysParseExact)return qt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++)if(i=p([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=RegExp(`^`+this.weekdays(i,``).replace(`.`,`\\.?`)+`$`,`i`),this._shortWeekdaysParse[r]=RegExp(`^`+this.weekdaysShort(i,``).replace(`.`,`\\.?`)+`$`,`i`),this._minWeekdaysParse[r]=RegExp(`^`+this.weekdaysMin(i,``).replace(`.`,`\\.?`)+`$`,`i`)),this._weekdaysParse[r]||(a=`^`+this.weekdays(i,``)+`|^`+this.weekdaysShort(i,``)+`|^`+this.weekdaysMin(i,``),this._weekdaysParse[r]=new RegExp(a.replace(`.`,``),`i`)),n&&t===`dddd`&&this._fullWeekdaysParse[r].test(e)||n&&t===`ddd`&&this._shortWeekdaysParse[r].test(e)||n&&t===`dd`&&this._minWeekdaysParse[r].test(e)||!n&&this._weekdaysParse[r].test(e))return r}function Yt(e){if(!this.isValid())return e==null?NaN:this;var t=nt(this,`Day`);return e==null?t:(e=Ft(e,this.localeData()),this.add(e-t,`d`))}function Xt(e){if(!this.isValid())return e==null?NaN:this;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,`d`)}function Zt(e){if(!this.isValid())return e==null?NaN:this;if(e!=null){var t=It(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function Qt(e){return this._weekdaysParseExact?(o(this,`_weekdaysRegex`)||tn.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,`_weekdaysRegex`)||(this._weekdaysRegex=Vt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function $t(e){return this._weekdaysParseExact?(o(this,`_weekdaysRegex`)||tn.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,`_weekdaysShortRegex`)||(this._weekdaysShortRegex=Ht),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function en(e){return this._weekdaysParseExact?(o(this,`_weekdaysRegex`)||tn.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,`_weekdaysMinRegex`)||(this._weekdaysMinRegex=Ut),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function tn(){function e(e,t){return t.length-e.length}var t=[],n=[],r=[],i=[],a,o,s,c,l;for(a=0;a<7;a++)o=p([2e3,1]).day(a),s=ze(this.weekdaysMin(o,``)),c=ze(this.weekdaysShort(o,``)),l=ze(this.weekdays(o,``)),t.push(s),n.push(c),r.push(l),i.push(s),i.push(c),i.push(l);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=RegExp(`^(`+i.join(`|`)+`)`,`i`),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=RegExp(`^(`+r.join(`|`)+`)`,`i`),this._weekdaysShortStrictRegex=RegExp(`^(`+n.join(`|`)+`)`,`i`),this._weekdaysMinStrictRegex=RegExp(`^(`+t.join(`|`)+`)`,`i`)}function nn(){return this.hours()%12||12}function rn(){return this.hours()||24}z(`H`,[`HH`,2],0,`hour`),z(`h`,[`hh`,2],0,nn),z(`k`,[`kk`,2],0,rn),z(`hmm`,0,0,function(){return``+nn.apply(this)+P(this.minutes(),2)}),z(`hmmss`,0,0,function(){return``+nn.apply(this)+P(this.minutes(),2)+P(this.seconds(),2)}),z(`Hmm`,0,0,function(){return``+this.hours()+P(this.minutes(),2)}),z(`Hmmss`,0,0,function(){return``+this.hours()+P(this.minutes(),2)+P(this.seconds(),2)});function an(e,t){z(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}an(`a`,!0),an(`A`,!1);function on(e,t){return t._meridiemParse}U(`a`,on),U(`A`,on),U(`H`,H,Fe),U(`h`,H,Pe),U(`k`,H,Pe),U(`HH`,H,ye),U(`hh`,H,ye),U(`kk`,H,ye),U(`hmm`,Ce),U(`hmmss`,we),U(`Hmm`,Ce),U(`Hmmss`,we),K([`H`,`HH`],q),K([`k`,`kk`],function(e,t,n){var r=G(e);t[q]=r===24?0:r}),K([`a`,`A`],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),K([`h`,`hh`],function(e,t,n){t[q]=G(e),h(n).bigHour=!0}),K(`hmm`,function(e,t,n){var r=e.length-2;t[q]=G(e.substr(0,r)),t[qe]=G(e.substr(r)),h(n).bigHour=!0}),K(`hmmss`,function(e,t,n){var r=e.length-4,i=e.length-2;t[q]=G(e.substr(0,r)),t[qe]=G(e.substr(r,2)),t[Je]=G(e.substr(i)),h(n).bigHour=!0}),K(`Hmm`,function(e,t,n){var r=e.length-2;t[q]=G(e.substr(0,r)),t[qe]=G(e.substr(r))}),K(`Hmmss`,function(e,t,n){var r=e.length-4,i=e.length-2;t[q]=G(e.substr(0,r)),t[qe]=G(e.substr(r,2)),t[Je]=G(e.substr(i))});function sn(e){return(e+``).toLowerCase().charAt(0)===`p`}var cn=/[ap]\.?m?\.?/i,ln=tt(`Hours`,!0);function un(e,t,n){return e>11?n?`pm`:`PM`:n?`am`:`AM`}var dn={calendar:N,longDateFormat:ie,invalidDate:oe,ordinal:ce,dayOfMonthOrdinalParse:le,relativeTime:de,months:ct,monthsShort:lt,week:At,weekdays:Rt,weekdaysMin:Bt,weekdaysShort:zt,meridiemParse:cn},Y={},fn={},pn;function mn(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function hn(e){return e&&e.toLowerCase().replace(`_`,`-`)}function gn(e){for(var t=0,n,r,i,a;t<e.length;){for(a=hn(e[t]).split(`-`),n=a.length,r=hn(e[t+1]),r=r?r.split(`-`):null;n>0;){if(i=vn(a.slice(0,n).join(`-`)),i)return i;if(r&&r.length>=n&&mn(a,r)>=n-1)break;n--}t++}return pn}function _n(e){return!!(e&&e.match(`^[^/\\\\]*$`))}function vn(e){var n=null,r;if(Y[e]===void 0&&t!==void 0&&t&&t.exports&&_n(e))try{n=pn._abbr,r=require,r(`./locale/`+e),yn(n)}catch{Y[e]=null}return Y[e]}function yn(e,t){var n;return e&&(n=c(t)?Sn(e):bn(e,t),n?pn=n:typeof console<`u`&&console.warn&&console.warn(`Locale `+e+` not found. Did you forget to load it?`)),pn._abbr}function bn(e,t){if(t!==null){var n,r=dn;if(t.abbr=e,Y[e]!=null)D(`defineLocaleOverride`,`use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.`),r=Y[e]._config;else if(t.parentLocale!=null)if(Y[t.parentLocale]!=null)r=Y[t.parentLocale]._config;else if(n=vn(t.parentLocale),n!=null)r=n._config;else return fn[t.parentLocale]||(fn[t.parentLocale]=[]),fn[t.parentLocale].push({name:e,config:t}),null;return Y[e]=new j(A(r,t)),fn[e]&&fn[e].forEach(function(e){bn(e.name,e.config)}),yn(e),Y[e]}else return delete Y[e],null}function xn(e,t){if(t!=null){var n,r,i=dn;Y[e]!=null&&Y[e].parentLocale!=null?Y[e].set(A(Y[e]._config,t)):(r=vn(e),r!=null&&(i=r._config),t=A(i,t),r??(t.abbr=e),n=new j(t),n.parentLocale=Y[e],Y[e]=n),yn(e)}else Y[e]!=null&&(Y[e].parentLocale==null?Y[e]!=null&&delete Y[e]:(Y[e]=Y[e].parentLocale,e===yn()&&yn(e)));return Y[e]}function Sn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return pn;if(!i(e)){if(t=vn(e),t)return t;e=[e]}return gn(e)}function Cn(){return M(Y)}function wn(e){var t,n=e._a;return n&&h(e).overflow===-2&&(t=n[Ge]<0||n[Ge]>11?Ge:n[Ke]<1||n[Ke]>st(n[We],n[Ge])?Ke:n[q]<0||n[q]>24||n[q]===24&&(n[qe]!==0||n[Je]!==0||n[Ye]!==0)?q:n[qe]<0||n[qe]>59?qe:n[Je]<0||n[Je]>59?Je:n[Ye]<0||n[Ye]>999?Ye:-1,h(e)._overflowDayOfYear&&(t<We||t>Ke)&&(t=Ke),h(e)._overflowWeeks&&t===-1&&(t=Xe),h(e)._overflowWeekday&&t===-1&&(t=Ze),h(e).overflow=t),e}var Tn=/^\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)?)?$/,En=/^\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)?)?$/,Dn=/Z|[+-]\d\d(?::?\d\d)?/,On=[[`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]],kn=[[`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/]],An=/^\/?Date\((-?\d+)/i,jn=/^(?:(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}))$/,Mn={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Nn(e){var t,n,r=e._i,i=Tn.exec(r)||En.exec(r),a,o,s,c,l=On.length,u=kn.length;if(i){for(h(e).iso=!0,t=0,n=l;t<n;t++)if(On[t][1].exec(i[1])){o=On[t][0],a=On[t][2]!==!1;break}if(o==null){e._isValid=!1;return}if(i[3]){for(t=0,n=u;t<n;t++)if(kn[t][1].exec(i[3])){s=(i[2]||` `)+kn[t][0];break}if(s==null){e._isValid=!1;return}}if(!a&&s!=null){e._isValid=!1;return}if(i[4])if(Dn.exec(i[4]))c=`Z`;else{e._isValid=!1;return}e._f=o+(s||``)+(c||``),Gn(e)}else e._isValid=!1}function Pn(e,t,n,r,i,a){var o=[Fn(e),lt.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return a&&o.push(parseInt(a,10)),o}function Fn(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function In(e){return e.replace(/\([^()]*\)|[\n\t]/g,` `).replace(/(\s\s+)/g,` `).replace(/^\s\s*/,``).replace(/\s\s*$/,``)}function Ln(e,t,n){return e&&zt.indexOf(e)!==new Date(t[0],t[1],t[2]).getDay()?(h(n).weekdayMismatch=!0,n._isValid=!1,!1):!0}function Rn(e,t,n){if(e)return Mn[e];if(t)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}function zn(e){var t=jn.exec(In(e._i)),n;if(t){if(n=Pn(t[4],t[3],t[2],t[5],t[6],t[7]),!Ln(t[1],n,e))return;e._a=n,e._tzm=Rn(t[8],t[9],t[10]),e._d=wt.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),h(e).rfc2822=!0}else e._isValid=!1}function Bn(e){var t=An.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(Nn(e),e._isValid===!1)delete e._isValid;else return;if(zn(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:n.createFromInputFallback(e)}n.createFromInputFallback=T(`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 Vn(e,t,n){return e??t??n}function Hn(e){var t=new Date(n.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Un(e){var t,n,r=[],i,a,o;if(!e._d){for(i=Hn(e),e._w&&e._a[Ke]==null&&e._a[Ge]==null&&Wn(e),e._dayOfYear!=null&&(o=Vn(e._a[We],i[We]),(e._dayOfYear>Qe(o)||e._dayOfYear===0)&&(h(e)._overflowDayOfYear=!0),n=wt(o,0,e._dayOfYear),e._a[Ge]=n.getUTCMonth(),e._a[Ke]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[q]===24&&e._a[qe]===0&&e._a[Je]===0&&e._a[Ye]===0&&(e._nextDay=!0,e._a[q]=0),e._d=(e._useUTC?wt:Ct).apply(null,r),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[q]=24),e._w&&e._w.d!==void 0&&e._w.d!==a&&(h(e).weekdayMismatch=!0)}}function Wn(e){var t=e._w,n,r,i,a,o,s,c,l;t.GG!=null||t.W!=null||t.E!=null?(a=1,o=4,n=Vn(t.GG,e._a[We],Dt(X(),1,4).year),r=Vn(t.W,1),i=Vn(t.E,1),(i<1||i>7)&&(c=!0)):(a=e._locale._week.dow,o=e._locale._week.doy,l=Dt(X(),a,o),n=Vn(t.gg,e._a[We],l.year),r=Vn(t.w,l.week),t.d==null?t.e==null?i=a:(i=t.e+a,(t.e<0||t.e>6)&&(c=!0)):(i=t.d,(i<0||i>6)&&(c=!0))),r<1||r>Ot(n,a,o)?h(e)._overflowWeeks=!0:c==null?(s=Et(n,r,i,a,o),e._a[We]=s.year,e._dayOfYear=s.dayOfYear):h(e)._overflowWeekday=!0}n.ISO_8601=function(){},n.RFC_2822=function(){};function Gn(e){if(e._f===n.ISO_8601){Nn(e);return}if(e._f===n.RFC_2822){zn(e);return}e._a=[],h(e).empty=!0;var t=``+e._i,r,i,a,o,s,c=t.length,l=0,u,d;for(a=re(e._f,e._locale).match(F)||[],d=a.length,r=0;r<d;r++)o=a[r],i=(t.match(Le(o,e))||[])[0],i&&(s=t.substr(0,t.indexOf(i)),s.length>0&&h(e).unusedInput.push(s),t=t.slice(t.indexOf(i)+i.length),l+=i.length),R[o]?(i?h(e).empty=!1:h(e).unusedTokens.push(o),He(o,i,e)):e._strict&&!i&&h(e).unusedTokens.push(o);h(e).charsLeftOver=c-l,t.length>0&&h(e).unusedInput.push(t),e._a[q]<=12&&h(e).bigHour===!0&&e._a[q]>0&&(h(e).bigHour=void 0),h(e).parsedDateParts=e._a.slice(0),h(e).meridiem=e._meridiem,e._a[q]=Kn(e._locale,e._a[q],e._meridiem),u=h(e).era,u!==null&&(e._a[We]=e._locale.erasConvertYear(u,e._a[We])),Un(e),wn(e)}function Kn(e,t,n){var r;return n==null?t:e.meridiemHour==null?e.isPM==null?t:(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0),t):e.meridiemHour(t,n)}function qn(e){var t,n,r,i,a,o,s=!1,c=e._f.length;if(c===0){h(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;i<c;i++)a=0,o=!1,t=x({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[i],Gn(t),_(t)&&(o=!0),a+=h(t).charsLeftOver,a+=h(t).unusedTokens.length*10,h(t).score=a,s?a<r&&(r=a,n=t):(r==null||a<r||o)&&(r=a,n=t,o&&(s=!0));f(e,n||t)}function Jn(e){if(!e._d){var t=he(e._i),n=t.day===void 0?t.date:t.day;e._a=d([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),Un(e)}}function Yn(e){var t=new S(wn(Xn(e)));return t._nextDay&&=(t.add(1,`d`),void 0),t}function Xn(e){var t=e._i,n=e._f;return e._locale=e._locale||Sn(e._l),t===null||n===void 0&&t===``?v({nullInput:!0}):(typeof t==`string`&&(e._i=t=e._locale.preparse(t)),C(t)?new S(wn(t)):(u(t)?e._d=t:i(n)?qn(e):n?Gn(e):Zn(e),_(e)||(e._d=null),e))}function Zn(e){var t=e._i;c(t)?e._d=new Date(n.now()):u(t)?e._d=new Date(t.valueOf()):typeof t==`string`?Bn(e):i(t)?(e._a=d(t.slice(0),function(e){return parseInt(e,10)}),Un(e)):a(t)?Jn(e):l(t)?e._d=new Date(t):n.createFromInputFallback(e)}function Qn(e,t,n,r,o){var c={};return(t===!0||t===!1)&&(r=t,t=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(a(e)&&s(e)||i(e)&&e.length===0)&&(e=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=o,c._l=n,c._i=e,c._f=t,c._strict=r,Yn(c)}function X(e,t,n,r){return Qn(e,t,n,r,!1)}var $n=T(`moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/`,function(){var e=X.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:v()}),er=T(`moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/`,function(){var e=X.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:v()});function tr(e,t){var n,r;if(t.length===1&&i(t[0])&&(t=t[0]),!t.length)return X();for(n=t[0],r=1;r<t.length;++r)(!t[r].isValid()||t[r][e](n))&&(n=t[r]);return n}function nr(){return tr(`isBefore`,[].slice.call(arguments,0))}function rr(){return tr(`isAfter`,[].slice.call(arguments,0))}var ir=function(){return Date.now?Date.now():+new Date},ar=[`year`,`quarter`,`month`,`week`,`day`,`hour`,`minute`,`second`,`millisecond`];function or(e){var t,n=!1,r,i=ar.length;for(t in e)if(o(e,t)&&!(J.call(ar,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(r=0;r<i;++r)if(e[ar[r]]){if(n)return!1;parseFloat(e[ar[r]])!==G(e[ar[r]])&&(n=!0)}return!0}function sr(){return this._isValid}function cr(){return jr(NaN)}function lr(e){var t=he(e),n=t.year||0,r=t.quarter||0,i=t.month||0,a=t.week||t.isoWeek||0,o=t.day||0,s=t.hour||0,c=t.minute||0,l=t.second||0,u=t.millisecond||0;this._isValid=or(t),this._milliseconds=+u+l*1e3+c*6e4+s*1e3*60*60,this._days=+o+a*7,this._months=+i+r*3+n*12,this._data={},this._locale=Sn(),this._bubble()}function ur(e){return e instanceof lr}function dr(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function fr(e,t,n){var r=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),a=0,o;for(o=0;o<r;o++)(n&&e[o]!==t[o]||!n&&G(e[o])!==G(t[o]))&&a++;return a+i}function pr(e,t){z(e,0,0,function(){var e=this.utcOffset(),n=`+`;return e<0&&(e=-e,n=`-`),n+P(~~(e/60),2)+t+P(~~e%60,2)})}pr(`Z`,`:`),pr(`ZZ`,``),U(`Z`,je),U(`ZZ`,je),K([`Z`,`ZZ`],function(e,t,n){n._useUTC=!0,n._tzm=hr(je,e)});var mr=/([\+\-]|\d\d)/gi;function hr(e,t){var n=(t||``).match(e),r,i,a;return n===null?null:(r=n[n.length-1]||[],i=(r+``).match(mr)||[`-`,0,0],a=+(i[1]*60)+G(i[2]),a===0?0:i[0]===`+`?a:-a)}function gr(e,t){var r,i;return t._isUTC?(r=t.clone(),i=(C(e)||u(e)?e.valueOf():X(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+i),n.updateOffset(r,!1),r):X(e).local()}function _r(e){return-Math.round(e._d.getTimezoneOffset())}n.updateOffset=function(){};function vr(e,t,r){var i=this._offset||0,a;if(!this.isValid())return e==null?NaN:this;if(e!=null){if(typeof e==`string`){if(e=hr(je,e),e===null)return this}else Math.abs(e)<16&&!r&&(e*=60);return!this._isUTC&&t&&(a=_r(this)),this._offset=e,this._isUTC=!0,a!=null&&this.add(a,`m`),i!==e&&(!t||this._changeInProgress?Ir(this,jr(e-i,`m`),1,!1):this._changeInProgress||=(this._changeInProgress=!0,n.updateOffset(this,!0),null)),this}else return this._isUTC?i:_r(this)}function yr(e,t){return e==null?-this.utcOffset():(typeof e!=`string`&&(e=-e),this.utcOffset(e,t),this)}function br(e){return this.utcOffset(0,e)}function xr(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(_r(this),`m`)),this}function Sr(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i==`string`){var e=hr(Ae,this._i);e==null?this.utcOffset(0,!0):this.utcOffset(e)}return this}function Cr(e){return this.isValid()?(e=e?X(e).utcOffset():0,(this.utcOffset()-e)%60==0):!1}function wr(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Tr(){if(!c(this._isDSTShifted))return this._isDSTShifted;var e={},t;return x(e,this),e=Xn(e),e._a?(t=e._isUTC?p(e._a):X(e._a),this._isDSTShifted=this.isValid()&&fr(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Er(){return this.isValid()?!this._isUTC:!1}function Dr(){return this.isValid()?this._isUTC:!1}function Or(){return this.isValid()?this._isUTC&&this._offset===0:!1}var kr=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Ar=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function jr(e,t){var n=e,r=null,i,a,s;return ur(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:l(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=kr.exec(e))?(i=r[1]===`-`?-1:1,n={y:0,d:G(r[Ke])*i,h:G(r[q])*i,m:G(r[qe])*i,s:G(r[Je])*i,ms:G(dr(r[Ye]*1e3))*i}):(r=Ar.exec(e))?(i=r[1]===`-`?-1:1,n={y:Mr(r[2],i),M:Mr(r[3],i),w:Mr(r[4],i),d:Mr(r[5],i),h:Mr(r[6],i),m:Mr(r[7],i),s:Mr(r[8],i)}):n==null?n={}:typeof n==`object`&&(`from`in n||`to`in n)&&(s=Pr(X(n.from),X(n.to)),n={},n.ms=s.milliseconds,n.M=s.months),a=new lr(n),ur(e)&&o(e,`_locale`)&&(a._locale=e._locale),ur(e)&&o(e,`_isValid`)&&(a._isValid=e._isValid),a}jr.fn=lr.prototype,jr.invalid=cr;function Mr(e,t){var n=e&&parseFloat(e.replace(`,`,`.`));return(isNaN(n)?0:n)*t}function Nr(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,`M`).isAfter(t)&&--n.months,n.milliseconds=t-+e.clone().add(n.months,`M`),n}function Pr(e,t){var n;return e.isValid()&&t.isValid()?(t=gr(t,e),e.isBefore(t)?n=Nr(e,t):(n=Nr(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Fr(e,t){return function(n,r){var i,a;return r!==null&&!isNaN(+r)&&(D(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.`),a=n,n=r,r=a),i=jr(n,r),Ir(this,i,e),this}}function Ir(e,t,r,i){var a=t._milliseconds,o=dr(t._days),s=dr(t._months);e.isValid()&&(i??=!0,s&&_t(e,nt(e,`Month`)+s*r),o&&rt(e,`Date`,nt(e,`Date`)+o*r),a&&e._d.setTime(e._d.valueOf()+a*r),i&&n.updateOffset(e,o||s))}var Lr=Fr(1,`add`),Rr=Fr(-1,`subtract`);function zr(e){return typeof e==`string`||e instanceof String}function Br(e){return C(e)||u(e)||zr(e)||l(e)||Hr(e)||Vr(e)||e==null}function Vr(e){var t=a(e)&&!s(e),n=!1,r=[`years`,`year`,`y`,`months`,`month`,`M`,`days`,`day`,`d`,`dates`,`date`,`D`,`hours`,`hour`,`h`,`minutes`,`minute`,`m`,`seconds`,`second`,`s`,`milliseconds`,`millisecond`,`ms`],i,c,l=r.length;for(i=0;i<l;i+=1)c=r[i],n||=o(e,c);return t&&n}function Hr(e){var t=i(e),n=!1;return t&&(n=e.filter(function(t){return!l(t)&&zr(e)}).length===0),t&&n}function Ur(e){var t=a(e)&&!s(e),n=!1,r=[`sameDay`,`nextDay`,`lastDay`,`nextWeek`,`lastWeek`,`sameElse`],i,c;for(i=0;i<r.length;i+=1)c=r[i],n||=o(e,c);return t&&n}function Wr(e,t){var n=e.diff(t,`days`,!0);return n<-6?`sameElse`:n<-1?`lastWeek`:n<0?`lastDay`:n<1?`sameDay`:n<2?`nextDay`:n<7?`nextWeek`:`sameElse`}function Gr(e,t){arguments.length===1&&(arguments[0]?Br(arguments[0])?(e=arguments[0],t=void 0):Ur(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||X(),i=gr(r,this).startOf(`day`),a=n.calendarFormat(this,i)||`sameElse`,o=t&&(O(t[a])?t[a].call(this,r):t[a]);return this.format(o||this.localeData().calendar(a,this,X(r)))}function Kr(){return new S(this)}function qr(e,t){var n=C(e)?e:X(e);return this.isValid()&&n.isValid()?(t=V(t)||`millisecond`,t===`millisecond`?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function Jr(e,t){var n=C(e)?e:X(e);return this.isValid()&&n.isValid()?(t=V(t)||`millisecond`,t===`millisecond`?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function Yr(e,t,n,r){var i=C(e)?e:X(e),a=C(t)?t:X(t);return this.isValid()&&i.isValid()&&a.isValid()?(r||=`()`,(r[0]===`(`?this.isAfter(i,n):!this.isBefore(i,n))&&(r[1]===`)`?this.isBefore(a,n):!this.isAfter(a,n))):!1}function Xr(e,t){var n=C(e)?e:X(e),r;return this.isValid()&&n.isValid()?(t=V(t)||`millisecond`,t===`millisecond`?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function Zr(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Qr(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function $r(e,t,n){var r,i,a;if(!this.isValid()||(r=gr(e,this),!r.isValid()))return NaN;switch(i=(r.utcOffset()-this.utcOffset())*6e4,t=V(t),t){case`year`:a=ei(this,r)/12;break;case`month`:a=ei(this,r);break;case`quarter`:a=ei(this,r)/3;break;case`second`:a=(this-r)/1e3;break;case`minute`:a=(this-r)/6e4;break;case`hour`:a=(this-r)/36e5;break;case`day`:a=(this-r-i)/864e5;break;case`week`:a=(this-r-i)/6048e5;break;default:a=this-r}return n?a:W(a)}function ei(e,t){if(e.date()<t.date())return-ei(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),r=e.clone().add(n,`months`),i,a;return t-r<0?(i=e.clone().add(n-1,`months`),a=(t-r)/(r-i)):(i=e.clone().add(n+1,`months`),a=(t-r)/(i-r)),-(n+a)||0}n.defaultFormat=`YYYY-MM-DDTHH:mm:ssZ`,n.defaultFormatUtc=`YYYY-MM-DDTHH:mm:ss[Z]`;function ti(){return this.clone().locale(`en`).format(`ddd MMM DD YYYY HH:mm:ss [GMT]ZZ`)}function ni(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?B(n,t?`YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]`:`YYYYYY-MM-DD[T]HH:mm:ss.SSSZ`):O(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace(`Z`,B(n,`Z`)):B(n,t?`YYYY-MM-DD[T]HH:mm:ss.SSS[Z]`:`YYYY-MM-DD[T]HH:mm:ss.SSSZ`)}function ri(){if(!this.isValid())return`moment.invalid(/* `+this._i+` */)`;var e=`moment`,t=``,n,r,i,a;return this.isLocal()||(e=this.utcOffset()===0?`moment.utc`:`moment.parseZone`,t=`Z`),n=`[`+e+`("]`,r=0<=this.year()&&this.year()<=9999?`YYYY`:`YYYYYY`,i=`-MM-DD[T]HH:mm:ss.SSS`,a=t+`[")]`,this.format(n+r+i+a)}function ii(e){e||=this.isUtc()?n.defaultFormatUtc:n.defaultFormat;var t=B(this,e);return this.localeData().postformat(t)}function ai(e,t){return this.isValid()&&(C(e)&&e.isValid()||X(e).isValid())?jr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function oi(e){return this.from(X(),e)}function si(e,t){return this.isValid()&&(C(e)&&e.isValid()||X(e).isValid())?jr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ci(e){return this.to(X(),e)}function li(e){var t;return e===void 0?this._locale._abbr:(t=Sn(e),t!=null&&(this._locale=t),this)}var ui=T(`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 di(){return this._locale}var fi=1e3,pi=60*fi,mi=60*pi,hi=146097*24*mi;function gi(e,t){return(e%t+t)%t}function _i(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-hi:new Date(e,t,n).valueOf()}function vi(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-hi:Date.UTC(e,t,n)}function yi(e){var t,r;if(e=V(e),e===void 0||e===`millisecond`||!this.isValid())return this;switch(r=this._isUTC?vi:_i,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-=gi(t+(this._isUTC?0:this.utcOffset()*pi),mi);break;case`minute`:t=this._d.valueOf(),t-=gi(t,pi);break;case`second`:t=this._d.valueOf(),t-=gi(t,fi);break}return this._d.setTime(t),n.updateOffset(this,!0),this}function bi(e){var t,r;if(e=V(e),e===void 0||e===`millisecond`||!this.isValid())return this;switch(r=this._isUTC?vi:_i,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+=mi-gi(t+(this._isUTC?0:this.utcOffset()*pi),mi)-1;break;case`minute`:t=this._d.valueOf(),t+=pi-gi(t,pi)-1;break;case`second`:t=this._d.valueOf(),t+=fi-gi(t,fi)-1;break}return this._d.setTime(t),n.updateOffset(this,!0),this}function xi(){return this._d.valueOf()-(this._offset||0)*6e4}function Si(){return Math.floor(this.valueOf()/1e3)}function Ci(){return new Date(this.valueOf())}function wi(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Ti(){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 Ei(){return this.isValid()?this.toISOString():null}function Di(){return _(this)}function Oi(){return f({},h(this))}function ki(){return h(this).overflow}function Ai(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}z(`N`,0,0,`eraAbbr`),z(`NN`,0,0,`eraAbbr`),z(`NNN`,0,0,`eraAbbr`),z(`NNNN`,0,0,`eraName`),z(`NNNNN`,0,0,`eraNarrow`),z(`y`,[`y`,1],`yo`,`eraYear`),z(`y`,[`yy`,2],0,`eraYear`),z(`y`,[`yyy`,3],0,`eraYear`),z(`y`,[`yyyy`,4],0,`eraYear`),U(`N`,Vi),U(`NN`,Vi),U(`NNN`,Vi),U(`NNNN`,Hi),U(`NNNNN`,Ui),K([`N`,`NN`,`NNN`,`NNNN`,`NNNNN`],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?h(n).era=i:h(n).invalidEra=e}),U(`y`,Oe),U(`yy`,Oe),U(`yyy`,Oe),U(`yyyy`,Oe),U(`yo`,Wi),K([`y`,`yy`,`yyy`,`yyyy`],We),K([`yo`],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[We]=n._locale.eraYearOrdinalParse(e,i):t[We]=parseInt(e,10)});function ji(e,t){var r,i,a,o=this._eras||Sn(`en`)._eras;for(r=0,i=o.length;r<i;++r){switch(typeof o[r].since){case`string`:a=n(o[r].since).startOf(`day`),o[r].since=a.valueOf();break}switch(typeof o[r].until){case`undefined`:o[r].until=1/0;break;case`string`:a=n(o[r].until).startOf(`day`).valueOf(),o[r].until=a.valueOf();break}}return o}function Mi(e,t,n){var r,i,a=this.eras(),o,s,c;for(e=e.toUpperCase(),r=0,i=a.length;r<i;++r)if(o=a[r].name.toUpperCase(),s=a[r].abbr.toUpperCase(),c=a[r].narrow.toUpperCase(),n)switch(t){case`N`:case`NN`:case`NNN`:if(s===e)return a[r];break;case`NNNN`:if(o===e)return a[r];break;case`NNNNN`:if(c===e)return a[r];break}else if([o,s,c].indexOf(e)>=0)return a[r]}function Ni(e,t){var r=e.since<=e.until?1:-1;return t===void 0?n(e.since).year():n(e.since).year()+(t-e.offset)*r}function Pi(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf(`day`).valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].name;return``}function Fi(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf(`day`).valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].narrow;return``}function Ii(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf(`day`).valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].abbr;return``}function Li(){var e,t,r,i,a=this.localeData().eras();for(e=0,t=a.length;e<t;++e)if(r=a[e].since<=a[e].until?1:-1,i=this.clone().startOf(`day`).valueOf(),a[e].since<=i&&i<=a[e].until||a[e].until<=i&&i<=a[e].since)return(this.year()-n(a[e].since).year())*r+a[e].offset;return this.year()}function Ri(e){return o(this,`_erasNameRegex`)||Gi.call(this),e?this._erasNameRegex:this._erasRegex}function zi(e){return o(this,`_erasAbbrRegex`)||Gi.call(this),e?this._erasAbbrRegex:this._erasRegex}function Bi(e){return o(this,`_erasNarrowRegex`)||Gi.call(this),e?this._erasNarrowRegex:this._erasRegex}function Vi(e,t){return t.erasAbbrRegex(e)}function Hi(e,t){return t.erasNameRegex(e)}function Ui(e,t){return t.erasNarrowRegex(e)}function Wi(e,t){return t._eraYearOrdinalRegex||Oe}function Gi(){var e=[],t=[],n=[],r=[],i,a,o,s,c,l=this.eras();for(i=0,a=l.length;i<a;++i)o=ze(l[i].name),s=ze(l[i].abbr),c=ze(l[i].narrow),t.push(o),e.push(s),n.push(c),r.push(o),r.push(s),r.push(c);this._erasRegex=RegExp(`^(`+r.join(`|`)+`)`,`i`),this._erasNameRegex=RegExp(`^(`+t.join(`|`)+`)`,`i`),this._erasAbbrRegex=RegExp(`^(`+e.join(`|`)+`)`,`i`),this._erasNarrowRegex=RegExp(`^(`+n.join(`|`)+`)`,`i`)}z(0,[`gg`,2],0,function(){return this.weekYear()%100}),z(0,[`GG`,2],0,function(){return this.isoWeekYear()%100});function Ki(e,t){z(0,[e,e.length],0,t)}Ki(`gggg`,`weekYear`),Ki(`ggggg`,`weekYear`),Ki(`GGGG`,`isoWeekYear`),Ki(`GGGGG`,`isoWeekYear`),U(`G`,ke),U(`g`,ke),U(`GG`,H,ye),U(`gg`,H,ye),U(`GGGG`,Ee,xe),U(`gggg`,Ee,xe),U(`GGGGG`,De,Se),U(`ggggg`,De,Se),Ve([`gggg`,`ggggg`,`GGGG`,`GGGGG`],function(e,t,n,r){t[r.substr(0,2)]=G(e)}),Ve([`gg`,`GG`],function(e,t,r,i){t[i]=n.parseTwoDigitYear(e)});function qi(e){return $i.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Ji(e){return $i.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Yi(){return Ot(this.year(),1,4)}function Xi(){return Ot(this.isoWeekYear(),1,4)}function Zi(){var e=this.localeData()._week;return Ot(this.year(),e.dow,e.doy)}function Qi(){var e=this.localeData()._week;return Ot(this.weekYear(),e.dow,e.doy)}function $i(e,t,n,r,i){var a;return e==null?Dt(this,r,i).year:(a=Ot(e,r,i),t>a&&(t=a),ea.call(this,e,t,n,r,i))}function ea(e,t,n,r,i){var a=Et(e,t,n,r,i),o=wt(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}z(`Q`,0,`Qo`,`quarter`),U(`Q`,ve),K(`Q`,function(e,t){t[Ge]=(G(e)-1)*3});function ta(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}z(`D`,[`DD`,2],`Do`,`date`),U(`D`,H,Pe),U(`DD`,H,ye),U(`Do`,function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),K([`D`,`DD`],Ke),K(`Do`,function(e,t){t[Ke]=G(e.match(H)[0])});var na=tt(`Date`,!0);z(`DDD`,[`DDDD`,3],`DDDo`,`dayOfYear`),U(`DDD`,Te),U(`DDDD`,be),K([`DDD`,`DDDD`],function(e,t,n){n._dayOfYear=G(e)});function ra(e){var t=Math.round((this.clone().startOf(`day`)-this.clone().startOf(`year`))/864e5)+1;return e==null?t:this.add(e-t,`d`)}z(`m`,[`mm`,2],0,`minute`),U(`m`,H,Fe),U(`mm`,H,ye),K([`m`,`mm`],qe);var ia=tt(`Minutes`,!1);z(`s`,[`ss`,2],0,`second`),U(`s`,H,Fe),U(`ss`,H,ye),K([`s`,`ss`],Je);var aa=tt(`Seconds`,!1);z(`S`,0,0,function(){return~~(this.millisecond()/100)}),z(0,[`SS`,2],0,function(){return~~(this.millisecond()/10)}),z(0,[`SSS`,3],0,`millisecond`),z(0,[`SSSS`,4],0,function(){return this.millisecond()*10}),z(0,[`SSSSS`,5],0,function(){return this.millisecond()*100}),z(0,[`SSSSSS`,6],0,function(){return this.millisecond()*1e3}),z(0,[`SSSSSSS`,7],0,function(){return this.millisecond()*1e4}),z(0,[`SSSSSSSS`,8],0,function(){return this.millisecond()*1e5}),z(0,[`SSSSSSSSS`,9],0,function(){return this.millisecond()*1e6}),U(`S`,Te,ve),U(`SS`,Te,ye),U(`SSS`,Te,be);var oa,sa;for(oa=`SSSS`;oa.length<=9;oa+=`S`)U(oa,Oe);function ca(e,t){t[Ye]=G((`0.`+e)*1e3)}for(oa=`S`;oa.length<=9;oa+=`S`)K(oa,ca);sa=tt(`Milliseconds`,!1),z(`z`,0,0,`zoneAbbr`),z(`zz`,0,0,`zoneName`);function la(){return this._isUTC?`UTC`:``}function ua(){return this._isUTC?`Coordinated Universal Time`:``}var Z=S.prototype;Z.add=Lr,Z.calendar=Gr,Z.clone=Kr,Z.diff=$r,Z.endOf=bi,Z.format=ii,Z.from=ai,Z.fromNow=oi,Z.to=si,Z.toNow=ci,Z.get=it,Z.invalidAt=ki,Z.isAfter=qr,Z.isBefore=Jr,Z.isBetween=Yr,Z.isSame=Xr,Z.isSameOrAfter=Zr,Z.isSameOrBefore=Qr,Z.isValid=Di,Z.lang=ui,Z.locale=li,Z.localeData=di,Z.max=er,Z.min=$n,Z.parsingFlags=Oi,Z.set=at,Z.startOf=yi,Z.subtract=Rr,Z.toArray=wi,Z.toObject=Ti,Z.toDate=Ci,Z.toISOString=ni,Z.inspect=ri,typeof Symbol<`u`&&Symbol.for!=null&&(Z[Symbol.for(`nodejs.util.inspect.custom`)]=function(){return`Moment<`+this.format()+`>`}),Z.toJSON=Ei,Z.toString=ti,Z.unix=Si,Z.valueOf=xi,Z.creationData=Ai,Z.eraName=Pi,Z.eraNarrow=Fi,Z.eraAbbr=Ii,Z.eraYear=Li,Z.year=$e,Z.isLeapYear=et,Z.weekYear=qi,Z.isoWeekYear=Ji,Z.quarter=Z.quarters=ta,Z.month=vt,Z.daysInMonth=yt,Z.week=Z.weeks=Nt,Z.isoWeek=Z.isoWeeks=Pt,Z.weeksInYear=Zi,Z.weeksInWeekYear=Qi,Z.isoWeeksInYear=Yi,Z.isoWeeksInISOWeekYear=Xi,Z.date=na,Z.day=Z.days=Yt,Z.weekday=Xt,Z.isoWeekday=Zt,Z.dayOfYear=ra,Z.hour=Z.hours=ln,Z.minute=Z.minutes=ia,Z.second=Z.seconds=aa,Z.millisecond=Z.milliseconds=sa,Z.utcOffset=vr,Z.utc=br,Z.local=xr,Z.parseZone=Sr,Z.hasAlignedHourOffset=Cr,Z.isDST=wr,Z.isLocal=Er,Z.isUtcOffset=Dr,Z.isUtc=Or,Z.isUTC=Or,Z.zoneAbbr=la,Z.zoneName=ua,Z.dates=T(`dates accessor is deprecated. Use date instead.`,na),Z.months=T(`months accessor is deprecated. Use month instead`,vt),Z.years=T(`years accessor is deprecated. Use year instead`,$e),Z.zone=T(`moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/`,yr),Z.isDSTShifted=T(`isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information`,Tr);function da(e){return X(e*1e3)}function fa(){return X.apply(null,arguments).parseZone()}function pa(e){return e}var Q=j.prototype;Q.calendar=ee,Q.longDateFormat=ae,Q.invalidDate=se,Q.ordinal=ue,Q.preparse=pa,Q.postformat=pa,Q.relativeTime=fe,Q.pastFuture=pe,Q.set=k,Q.eras=ji,Q.erasParse=Mi,Q.erasConvertYear=Ni,Q.erasAbbrRegex=zi,Q.erasNameRegex=Ri,Q.erasNarrowRegex=Bi,Q.months=pt,Q.monthsShort=mt,Q.monthsParse=gt,Q.monthsRegex=xt,Q.monthsShortRegex=bt,Q.week=kt,Q.firstDayOfYear=Mt,Q.firstDayOfWeek=jt,Q.weekdays=Wt,Q.weekdaysMin=Kt,Q.weekdaysShort=Gt,Q.weekdaysParse=Jt,Q.weekdaysRegex=Qt,Q.weekdaysShortRegex=$t,Q.weekdaysMinRegex=en,Q.isPM=sn,Q.meridiem=un;function ma(e,t,n,r){var i=Sn(),a=p().set(r,t);return i[n](a,e)}function ha(e,t,n){if(l(e)&&(t=e,e=void 0),e||=``,t!=null)return ma(e,t,n,`month`);var r,i=[];for(r=0;r<12;r++)i[r]=ma(e,r,n,`month`);return i}function ga(e,t,n,r){typeof e==`boolean`?(l(t)&&(n=t,t=void 0),t||=``):(t=e,n=t,e=!1,l(t)&&(n=t,t=void 0),t||=``);var i=Sn(),a=e?i._week.dow:0,o,s=[];if(n!=null)return ma(t,(n+a)%7,r,`day`);for(o=0;o<7;o++)s[o]=ma(t,(o+a)%7,r,`day`);return s}function _a(e,t){return ha(e,t,`months`)}function va(e,t){return ha(e,t,`monthsShort`)}function ya(e,t,n){return ga(e,t,n,`weekdays`)}function ba(e,t,n){return ga(e,t,n,`weekdaysShort`)}function xa(e,t,n){return ga(e,t,n,`weekdaysMin`)}yn(`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;return e+(G(e%100/10)===1?`th`:t===1?`st`:t===2?`nd`:t===3?`rd`:`th`)}}),n.lang=T(`moment.lang is deprecated. Use moment.locale instead.`,yn),n.langData=T(`moment.langData is deprecated. Use moment.localeData instead.`,Sn);var Sa=Math.abs;function Ca(){var e=this._data;return this._milliseconds=Sa(this._milliseconds),this._days=Sa(this._days),this._months=Sa(this._months),e.milliseconds=Sa(e.milliseconds),e.seconds=Sa(e.seconds),e.minutes=Sa(e.minutes),e.hours=Sa(e.hours),e.months=Sa(e.months),e.years=Sa(e.years),this}function wa(e,t,n,r){var i=jr(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Ta(e,t){return wa(this,e,t,1)}function Ea(e,t){return wa(this,e,t,-1)}function Da(e){return e<0?Math.floor(e):Math.ceil(e)}function Oa(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,a,o,s,c;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Da(Aa(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=W(e/1e3),r.seconds=i%60,a=W(i/60),r.minutes=a%60,o=W(a/60),r.hours=o%24,t+=W(o/24),c=W(ka(t)),n+=c,t-=Da(Aa(c)),s=W(n/12),n%=12,r.days=t,r.months=n,r.years=s,this}function ka(e){return e*4800/146097}function Aa(e){return e*146097/4800}function ja(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=V(e),e===`month`||e===`quarter`||e===`year`)switch(t=this._days+r/864e5,n=this._months+ka(t),e){case`month`:return n;case`quarter`:return n/3;case`year`:return n/12}else switch(t=this._days+Math.round(Aa(this._months)),e){case`week`:return t/7+r/6048e5;case`day`:return t+r/864e5;case`hour`:return t*24+r/36e5;case`minute`:return t*1440+r/6e4;case`second`:return t*86400+r/1e3;case`millisecond`:return Math.floor(t*864e5)+r;default:throw Error(`Unknown unit `+e)}}function Ma(e){return function(){return this.as(e)}}var Na=Ma(`ms`),Pa=Ma(`s`),Fa=Ma(`m`),Ia=Ma(`h`),La=Ma(`d`),Ra=Ma(`w`),za=Ma(`M`),Ba=Ma(`Q`),Va=Ma(`y`),Ha=Na;function Ua(){return jr(this)}function Wa(e){return e=V(e),this.isValid()?this[e+`s`]():NaN}function Ga(e){return function(){return this.isValid()?this._data[e]:NaN}}var Ka=Ga(`milliseconds`),qa=Ga(`seconds`),Ja=Ga(`minutes`),Ya=Ga(`hours`),Xa=Ga(`days`),Za=Ga(`months`),Qa=Ga(`years`);function $a(){return W(this.days()/7)}var eo=Math.round,to={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function no(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function ro(e,t,n,r){var i=jr(e).abs(),a=eo(i.as(`s`)),o=eo(i.as(`m`)),s=eo(i.as(`h`)),c=eo(i.as(`d`)),l=eo(i.as(`M`)),u=eo(i.as(`w`)),d=eo(i.as(`y`)),f=a<=n.ss&&[`s`,a]||a<n.s&&[`ss`,a]||o<=1&&[`m`]||o<n.m&&[`mm`,o]||s<=1&&[`h`]||s<n.h&&[`hh`,s]||c<=1&&[`d`]||c<n.d&&[`dd`,c];return n.w!=null&&(f=f||u<=1&&[`w`]||u<n.w&&[`ww`,u]),f=f||l<=1&&[`M`]||l<n.M&&[`MM`,l]||d<=1&&[`y`]||[`yy`,d],f[2]=t,f[3]=+e>0,f[4]=r,no.apply(null,f)}function io(e){return e===void 0?eo:typeof e==`function`?(eo=e,!0):!1}function ao(e,t){return to[e]===void 0?!1:t===void 0?to[e]:(to[e]=t,e===`s`&&(to.ss=t-1),!0)}function oo(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=to,i,a;return typeof e==`object`&&(t=e,e=!1),typeof e==`boolean`&&(n=e),typeof t==`object`&&(r=Object.assign({},to,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),a=ro(this,!n,r,i),n&&(a=i.pastFuture(+this,a)),i.postformat(a)}var so=Math.abs;function co(e){return(e>0)-(e<0)||+e}function lo(){if(!this.isValid())return this.localeData().invalidDate();var e=so(this._milliseconds)/1e3,t=so(this._days),n=so(this._months),r,i,a,o,s=this.asSeconds(),c,l,u,d;return s?(r=W(e/60),i=W(r/60),e%=60,r%=60,a=W(n/12),n%=12,o=e?e.toFixed(3).replace(/\.?0+$/,``):``,c=s<0?`-`:``,l=co(this._months)===co(s)?``:`-`,u=co(this._days)===co(s)?``:`-`,d=co(this._milliseconds)===co(s)?``:`-`,c+`P`+(a?l+a+`Y`:``)+(n?l+n+`M`:``)+(t?u+t+`D`:``)+(i||r||e?`T`:``)+(i?d+i+`H`:``)+(r?d+r+`M`:``)+(e?d+o+`S`:``)):`P0D`}var $=lr.prototype;return $.isValid=sr,$.abs=Ca,$.add=Ta,$.subtract=Ea,$.as=ja,$.asMilliseconds=Na,$.asSeconds=Pa,$.asMinutes=Fa,$.asHours=Ia,$.asDays=La,$.asWeeks=Ra,$.asMonths=za,$.asQuarters=Ba,$.asYears=Va,$.valueOf=Ha,$._bubble=Oa,$.clone=Ua,$.get=Wa,$.milliseconds=Ka,$.seconds=qa,$.minutes=Ja,$.hours=Ya,$.days=Xa,$.weeks=$a,$.months=Za,$.years=Qa,$.humanize=oo,$.toISOString=lo,$.toString=lo,$.toJSON=lo,$.locale=li,$.localeData=di,$.toIsoString=T(`toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)`,lo),$.lang=ui,z(`X`,0,0,`unix`),z(`x`,0,0,`valueOf`),U(`x`,ke),U(`X`,Me),K(`X`,function(e,t,n){n._d=new Date(parseFloat(e)*1e3)}),K(`x`,function(e,t,n){n._d=new Date(G(e))}),n.version=`2.30.1`,r(X),n.fn=Z,n.min=nr,n.max=rr,n.now=ir,n.utc=p,n.unix=da,n.months=_a,n.isDate=u,n.locale=yn,n.invalid=v,n.duration=jr,n.isMoment=C,n.weekdays=ya,n.parseZone=fa,n.localeData=Sn,n.isDuration=ur,n.monthsShort=va,n.weekdaysMin=xa,n.defineLocale=bn,n.updateLocale=xn,n.locales=Cn,n.weekdaysShort=ba,n.normalizeUnits=V,n.relativeTimeRounding=io,n.relativeTimeThreshold=ao,n.calendarFormat=Wr,n.prototype=Z,n.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`},n}))})),Ie=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0&&typeof require==`function`?r(Fe()):typeof define==`function`&&define.amd?define([`../moment`],r):r(n.moment)})(e,(function(e){"use strict";return e.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}})}))})),U=o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0&&typeof require==`function`?r(Fe()):typeof define==`function`&&define.amd?define([`../moment`],r):r(n.moment)})(e,(function(e){"use strict";return e.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(e){var t=e%10;return e+(~~(e%100/10)==1?`th`:t===1?`st`:t===2?`nd`:t===3?`rd`:`th`)},week:{dow:1,doy:4}})}))}));o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0&&typeof require==`function`?r(Fe()):typeof define==`function`&&define.amd?define([`../moment`],r):r(n.moment)})(e,(function(e){"use strict";function t(e,t,n,r){var i={m:[`eine Minute`,`einer Minute`],h:[`eine Stunde`,`einer Stunde`],d:[`ein Tag`,`einem Tag`],dd:[e+` Tage`,e+` Tagen`],w:[`eine Woche`,`einer Woche`],M:[`ein Monat`,`einem Monat`],MM:[e+` Monate`,e+` Monaten`],y:[`ein Jahr`,`einem Jahr`],yy:[e+` Jahre`,e+` Jahren`]};return t?i[n][0]:i[n][1]}return e.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:t,mm:`%d Minuten`,h:t,hh:`%d Stunden`,d:t,dd:t,w:t,ww:`%d Wochen`,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:`%d.`,week:{dow:1,doy:4}})}))}))(),U(),Ie();var Le=e=>{let t=``;return e.split(`:`).forEach(e=>{t+=e}),parseInt(t)},Re=e=>e.toString().padStart(4,`0`).match(/.{1,2}/g).join(`:`),ze=e=>{let t=e.address;if(e.addresstype===`county`&&t.country)return t.county;if(e.addresstype===`village`&&t.village)return t.village;let n=[];return[`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(e=>{t.hasOwnProperty(e)&&t[e]&&n.push(t[e])}),t.road?n.push(t.road):t.pedestrian?n.push(t.pedestrian):t.suburb?n.push(t.suburb):t.square?n.push(t.square):(t.neighbourhood&&n.push(t.neighbourhood),t.hamlet?n.push(t.hamlet):t.isolated_dwelling?n.push(t.isolated_dwelling):t.locality?n.push(t.locality):t.croft&&n.push(t.croft)),t.house_number&&n.push(t.house_number),t.postcode&&n.push(t.postcode),t.village&&n.push(t.village),t.town?n.push(t.town):t.city&&n.push(t.city),n.join(`, `).substr(0,150)};function W(e){let t=window.sessionStorage.getItem(e);if(t!==null){let n=JSON.parse(t);if(new Date(n.expirationDate)>new Date)return n.value;window.sessionStorage.removeItem(e)}return null}function G(e,t,n){let r=n?new Date(n*1e3):null;if(r){let n={value:t,expirationDate:r.toISOString()};window.sessionStorage.setItem(e,JSON.stringify(n))}}function Be({day:e,slot:t,i18next:n}){return(0,k.jsx)(`li`,{className:`it-list-item`,children:(0,k.jsx)(`div`,{className:`list-item`,children:(0,k.jsx)(`div`,{className:`it-right-zone`,children:(0,k.jsxs)(`span`,{className:`text pl-4`,children:[(0,k.jsx)(`b`,{children:e}),` `,n.t(`alle`),` `,n.t(`ore`),` `,(0,k.jsx)(`b`,{children:t})]})})})})}function K(){return typeof document>`u`?void 0:document.activeElement?.closest?.(`[data-formio-widget-scope]`)||document.querySelector(`[data-formio-widget-scope]`)||document.querySelector(`widget-formio`)||document.body}var Ve=l.Formio.Components.components.field,He=({component:e,current:t,onChange:n,i18next:r})=>{let[i,a]=(0,d.useState)(),[o,s]=(0,d.useState)([]),[c,l]=(0,d.useState)([]),[u,f]=(0,d.useState)(!1),[y,b]=(0,d.useState)(null),[x,S]=(0,d.useState)(null),[C,w]=(0,d.useState)(null),[T,E]=(0,d.useState)(null),[D,O]=(0,d.useState)({}),[A,j]=(0,d.useState)(null),[M,ee]=(0,d.useState)(!1),[P,F]=(0,d.useState)([]),[I,L]=(0,d.useState)(!1),R=(0,d.useRef)(),z=e.calendarId;h.default.locale(r.language),v.default.locale(r.language);let te=e=>{let t=(0,h.default)(e).format(`YYYY-MM-DD`);fetch(ie(t)).then(e=>e.json()).then(t=>{let n=re(e||new Date),r=t.filter(e=>e.available==1);r.length===0&&he();let i=[];n.forEach(e=>{t.some(t=>t.date===e&&t.available==1)?i.push({available:!0,date:e}):i.push({available:!1,date:e})}),s(i.map(e=>{if(e.available===!1)return(0,h.default)(e.date,`YYYY-MM-DD`).toDate()})),ne(r.length?r[0].date:e)}).catch(e=>console.error(e))},ne=e=>{E(null),w(null),l([]);let t=(0,h.default)(e).format(`YYYY-MM-DD`);fetch(ae(t)).then(e=>e.json()).then(t=>{let n=t.filter(e=>e.availability==1);O(n[0]),n.length>0?(l(t),f(!1),w((0,h.default)(e).format(`L`)),a((0,h.default)(e,`YYYY-MM-DD`).toDate())):(t.length>0&&a((0,h.default)(t[0].date,`YYYY-MM-DD`).toDate()),l([]),he())})},B=()=>{if(z!==``&&z!=null)if(!t.dataValue)te(new Date);else if(e.multiple&&Array.isArray(t.dataValue)){if(t.dataValue.length>0){j(t.dataValue);let e=[];t.dataValue.map(t=>{e.push({...t,date:(0,h.default)(t.date,`YYYY-MM-DD`).format(`DD-MM-YYYY`)})}),F(e)}}else if(!e.multiple&&typeof t.dataValue==`object`){let e={date:t.dataValue.date,slot:t.dataValue.slot};F([{...t.dataValue,date:(0,h.default)(t.dataValue.date,`YYYY-MM-DD`).format(`DD-MM-YYYY`)}]),j(e)}else{let r=t.dataValue.replace(`)`,``).replace(` (`,` @ `).replace(/\//g,`-`).split(` @ `),i=r[2].split(`#`),a={date:(0,h.default)(r[0],`DD-MM-YYYY`).format(`YYYY-MM-DD`),slot:r[1]};e.multiple?(n([{date:r[0],slot:r[1],calendar_id:i[0],meeting_id:i[1],opening_hour_id:i.length===3?i[2]:``}]),F([{date:r[0],slot:r[1],calendar_id:i[0],meeting_id:i[1],opening_hour_id:i.length===3?i[2]:``}])):(n({date:r[0],slot:r[1],calendar_id:i[0],meeting_id:i[1],opening_hour_id:i.length===3?i[2]:``}),F([{date:r[0],slot:r[1],calendar_id:i[0],meeting_id:i[1],opening_hour_id:i.length===3?i[2]:``}])),j(a)}};(0,d.useEffect)(()=>{window.FormioInstance?.formReady.then(()=>{setTimeout(()=>{B()},1e3)})},[]);let re=e=>{let t=(0,h.default)(e,`YYYY-MM`).daysInMonth(),n=[];for(;t;){let r=(0,h.default)(e).date(t);n.push(r.format(`YYYY-MM-DD`)),t--}return n},ie=(t,n=!1)=>{let r=e.calendarId,i=e.select_opening_hours,a=e.select_opening_hours?e.opening_hours:[];window.location.pathname.split(`/`);let o=`${N()}/api/calendars/${r}/availabilities`,s=[`from_time=${(0,h.default)(t).startOf(`month`).format(`YYYY-MM-DD`)}`,`to_time=${(0,h.default)(t).endOf(`month`).format(`YYYY-MM-DD`)}`];return n&&s.push(`available=${n}`),i&&a&&s.push(`opening_hours=${a.join()}`),`${o}?${s.join(`&`)}`},ae=(t,n=!1)=>{let r=e.calendarId,i=e.select_opening_hours,a=e.select_opening_hours?e.opening_hours:[];window.location.pathname.split(`/`);let o=(0,h.default)(t).format(`YYYY-MM-DD`),s=`${N()}/api/calendars/${r}/availabilities/${o}`,c=[];return n&&c.push(`available=${n}`),i&&a&&c.push(`opening_hours=${a.join()}`),c&&(s=`${s}?${c.join(`&`)}`),s},oe=e=>{te(e)},se=e=>{setTimeout(()=>{ee(!M)},1e3),ne(e)},ce=e=>{E(null),setTimeout(()=>{e&&(S(e.target.dataset),E(e.target.id))},300)},le=t=>{b(null);let n=`${N()}/it/meetings/new-draft`,i={date:x?.date?(0,h.default)(x?.date).format(`DD-MM-YYYY`):(0,h.default)(t.target.dataset.date).format(`DD-MM-YYYY`),slot:x?.value_start&&x?.value_end?x.value_start+`-`+x.value_end:t.target.dataset.slots,calendar:e.calendarId,opening_hour:x?.opening_hour?x?.opening_hour:t.target.dataset.opening_hour,meeting:y?y.id:``,first_available_date:D.date,first_available_start_time:D.start_time,first_available_end_time:D.end_time,first_availability_updated_at:(0,h.default)().format()};fetch(n,{method:`POST`,body:JSON.stringify(i),headers:{"Content-Type":`application/json; charset=utf-8`},strictErrors:!0}).then(e=>{if(!e.ok)throw Error(r.t(`Intervallo selezionato non disponibile!`));return e.json()}).then(e=>{b(e);let t={date:i.date,slot:i.slot,calendar_id:i.calendar[0],opening_hour_id:i.opening_hour||i.opening_hour_id,meeting_id:e.id};F([...P,t])}).catch(e=>{console.log(e),_.default.fire({title:``,html:`<p>`+e+`</p>`,icon:`error`,cancelButtonText:r.t(`Chiudi`),showCancelButton:!0,showConfirmButton:!1})})},ue=()=>{x&&(le(),ee(!M))},de=()=>(0,k.jsx)(`span`,{children:r.t(`Tempo prenotazione scaduto!`)}),fe=({minutes:e,seconds:t,completed:n})=>n?(0,k.jsx)(de,{}):(0,k.jsx)(`div`,{children:(0,k.jsxs)(`div`,{children:[` `,(0,k.jsxs)(`span`,{children:[` `,(0,k.jsxs)(`i`,{children:[r.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`),`:`]}),` `,(0,k.jsxs)(`b`,{children:[e,` `,r.t(`minuti`),` `,t,` `,r.t(`secondi`)]})]})]})}),pe=e=>{let t=Le(e.target.value),n=Le(e.target.min),i=Le(e.target.max);t<n||t>i||t>Le(x.end)?(_.default.fire({title:``,html:`<p>${r.t(`l'orario`)} <b>${Re(t)}</b> ${r.t(`non è valido`)}</p>`,icon:`error`,cancelButtonText:r.t(`Chiudi`),showCancelButton:!0,showConfirmButton:!1}),V(``)):S({...x,value_start:e.target.value})},me=e=>{let t=Le(e.target.value),n=Le(e.target.min),i=Le(e.target.max);t<n||t>i||t<Le(x.start)?(_.default.fire({title:``,html:`<p>${r.t(`l'orario`)} <b>${Re(t)}</b> ${r.t(`non è valido`)}</p>`,icon:`error`,cancelButtonText:r.t(`Chiudi`),showCancelButton:!0,showConfirmButton:!1}),V(``)):S({...x,value_end:e.target.value})},V=t=>{if(t===null||t===``)n(``);else if(Array.isArray(t)&&t.length>0){let t=[];P.map(e=>{t.push({date:(0,h.default)(e.date,`DD-MM-YYYY`).format(`YYYY-MM-DD`),slot:e.slot,calendar_id:e.calendar_id||e.calendar[0],meeting_id:e.meeting_id,opening_hour_id:e.opening_hour||e.opening_hour_id})}),e.multiple?n(t):n(t[0])}else n(``)},he=()=>{f(!0),b(null),w(null),V(null)},ge=()=>{if(r.language===`it`)return Pe;if(r.language===`en`)return Te;if(r.language===`de`)return ye};(0,d.useEffect)(()=>{V(P)},[P]),(0,d.useEffect)(()=>{document.querySelector(`.formio-read-only`)&&I===!1?(L(!0),setTimeout(()=>{B()},1e3)):(L(!1),setTimeout(()=>{B()},1e3))},[]);let _e=(e,t)=>{let n=`${N()}/api/meetings/${t.meeting_id}`;fetch(n,{method:`DELETE`,headers:{"Content-Type":`application/json; charset=utf-8`,Authorization:`Bearer ${W(`auth-token`)}`},strictErrors:!0}).then(t=>{t&&t.status>400?_.default.fire({title:``,html:`<p>${r.t(`Ci sono stati degli errori durante la cancellazione dello slot`)}</p>`,icon:`error`,cancelButtonText:r.t(`Chiudi`),showCancelButton:!0,showConfirmButton:!1}):(F([...P.slice(0,e),...P.slice(e+1)]),te(new Date))})};return(0,k.jsxs)(k.Fragment,{children:[I&&A?(0,k.jsxs)(`div`,{className:`my-5 mx-2 d-print-block d-preview-calendar d-preview-calendar-none`,children:[(0,k.jsxs)(`b`,{children:[Array.isArray(A)&&A.length>1?r.t(`Giorni selezionati per la prenotazione`):r.t(`Giorno selezionato per la prenotazione`),`:`]}),(0,k.jsx)(`div`,{className:`mb-5`,children:(0,k.jsx)(`div`,{className:`it-list-wrapper`,children:(0,k.jsx)(`ul`,{className:`it-list`,children:Array.isArray(A)?A.map(e=>(0,k.jsx)(Be,{day:(0,h.default)(e.date,`DD-MM-YYYY`).format(`DD/MM/YYYY`),i18next:r,slot:e.slot})):(0,k.jsx)(Be,{day:(0,h.default)(A.date,`DD-MM-YYYY`).format(`DD/MM/YYYY`),i18next:r,slot:A.slot})})})})]}):(0,k.jsx)(`div`,{className:`slot-calendar `,children:(0,k.jsxs)(`div`,{className:`row`,children:[e.multiple?(0,k.jsx)(`div`,{className:`col-12 d-print-none d-preview-calendar-none`,children:(0,k.jsxs)(`div`,{className:`m-2`,children:[(0,k.jsx)(`h6`,{children:r.t(e.label)}),(0,k.jsx)(p.DayPicker,{mode:`single`,selected:i,locale:ge(),disabled:o,onMonthChange:oe,onDayClick:se}),(0,k.jsx)(`p`,{children:r.t(`Seleziona un'altra data nel calendario per aggiungere una nuova prenotazione`)})]})}):P.length===1?null:(0,k.jsx)(`div`,{className:`col-12 d-print-none d-preview-calendar-none`,children:(0,k.jsxs)(`div`,{className:`m-2`,children:[(0,k.jsx)(`h6`,{children:r.t(e.label)}),(0,k.jsx)(p.DayPicker,{mode:`single`,selected:i,locale:ge(),disabled:o,onMonthChange:oe,onDayClick:se}),(0,k.jsxs)(`p`,{children:[` `,r.t(`Seleziona un'altra data nel calendario per aggiungere una nuova prenotazione`)]})]})}),(0,k.jsx)(`div`,{className:`col-12`,children:P.length?(0,k.jsx)(`div`,{className:`row m-2`,children:(0,k.jsxs)(`div`,{className:`col-12 mb-4`,children:[(0,k.jsxs)(`b`,{children:[P.length>1?r.t(`Giorni selezionati per la prenotazione`):r.t(`Giorno selezionato per la prenotazione`),`:`,` `]}),(0,k.jsx)(`div`,{className:`mb-5`,children:(0,k.jsx)(`div`,{className:`it-list-wrapper`,children:(0,k.jsx)(`ul`,{className:`it-list`,children:P.map((e,t)=>(0,k.jsx)(`li`,{children:(0,k.jsx)(`div`,{className:`list-item`,children:(0,k.jsxs)(`div`,{className:`it-right-zone`,children:[(0,k.jsxs)(`span`,{className:`text pl-4`,children:[e.date,` `,x||e.slot?`${r.t(`alle`)} ${e.slot}`:``]}),(0,k.jsx)(g.Icon,{icon:`it-delete`,onClick:()=>_e(t,e),role:`button`})]})})},`li`+t))})})}),y?(0,k.jsx)(g.Alert,{color:`info`,defaultValue:`string`,className:`d-print-none d-preview-calendar-none`,children:(0,k.jsx)(m.default,{date:y.expiration_time,renderer:fe})}):null]})}):null})]})}),(0,k.jsxs)(g.Modal,{isOpen:M,toggle:()=>ee(!M),labelledBy:`daySelected`,size:`lg`,centered:!0,container:K(),children:[(0,k.jsx)(g.ModalHeader,{toggle:()=>ee(!M),id:`daySelected`,children:r.t(`Seleziona una fascia oraria`)}),u?null:(0,k.jsxs)(`div`,{className:`title-xsmall u-grey-dark px-4`,children:[` `,r.t(`Seleziona una fascia oraria e, se necessario, utilizza l'apposito controllo per accorciare la durata della prenotazione, Poi clicca su Conferma`)]}),(0,k.jsx)(g.ModalBody,{children:(0,k.jsxs)(`div`,{className:`row`,children:[P.length>=1?(0,k.jsxs)(`div`,{children:[C&&!u?(0,k.jsxs)(`h6`,{children:[r.t(`Orari disponibili del`),` `,(0,v.default)(C).format(`DD/MM/YYYY`)]}):null,(0,k.jsxs)(`div`,{className:`calendar-last-selection col-12 pt-2 mb-5`,children:[(0,k.jsx)(`small`,{className:`pl-2 mb-2 d-flex px-2`,children:(0,k.jsxs)(`b`,{children:[(0,k.jsx)(g.Icon,{icon:`it-clock`,className:`mr-1`,size:`sm`}),` `,r.t(`Ultimo orario selezionato`)]})}),(0,k.jsx)(`div`,{className:`col-6 px-2`,children:(0,k.jsx)(`button`,{type:`button`,id:`slot-last-selection`,onClick:ce,tabIndex:`1`,className:T===`slot-last-selection`?`active btn btn-slot p-0`:`btn btn-slot p-0`,"data-date":(0,h.default)(C,`DD/MM/YYYY`).format(`YYYY-MM-DD`),"data-slots":P[P.length-1].slot,"data-opening_hour":P[P.length-1].opening_hour_id,"data-start":P[P.length-1].slot.split(`-`)[0],"data-end":P[P.length-1].slot.split(`-`)[1],"data-value_start":P[P.length-1].slot.split(`-`)[0],"data-value_end":P[P.length-1].slot.split(`-`)[1],disabled:u,children:P[P.length-1].slot})})]})]}):null,(0,k.jsx)(`div`,{children:C&&P.length>=1?(0,k.jsx)(`h6`,{children:r.t(`Seleziona altri orari`)}):u?null:(0,k.jsxs)(`h6`,{children:[r.t(`Orari disponibili del`),` `,(0,v.default)(C).format(`DD/MM/YYYY`)]})}),c.map((e,t)=>(0,k.jsx)(`div`,{className:`col-6`,children:(0,k.jsxs)(`button`,{type:`button`,id:`slot-`+t,onClick:ce,ref:R,className:T===`slot-`+t?`active btn btn-slot p-0`:`btn btn-slot p-0`,tabIndex:`1`,"data-date":e.date,"data-start":e.start_time,"data-end":e.end_time,"data-value_start":e.start_time,"data-value_end":e.end_time,"data-slots":e.start_time+`-`+e.end_time,"data-opening_hour":e.opening_hour,"data-min_duration":e.min_duration,disabled:e.slots_available==0,children:[e.start_time,` - `,e.end_time]})},`slot-`+t)),u?(0,k.jsxs)(`div`,{className:`callout callout-highlight warning`,children:[(0,k.jsxs)(`div`,{className:`callout-title`,children:[(0,k.jsx)(g.Icon,{"aria-hidden":!0,icon:`it-help-circle`}),r.t(`Attenzione`)]}),(0,k.jsxs)(`p`,{children:[` `,r.t(`Non è possibile prenotare per la data selezionata`),`.`]})]}):null,(0,k.jsx)(`div`,{className:`col-12`,children:x?.value_start&&T?(0,k.jsxs)(`div`,{className:`row`,children:[(0,k.jsx)(`div`,{className:`col-12 mb-3`,children:(0,k.jsx)(`p`,{className:`mb-3`,children:(0,k.jsx)(`b`,{children:r.t(`Se necessario, utilizza il controllo che segue per accorciare la durata della prenotazione`)})})}),(0,k.jsx)(`div`,{className:`col-12 col-md-6 mb-4`,children:(0,k.jsx)(g.Input,{type:`time`,label:r.t(`Dalle`),className:`active`,defaultValue:x.value_start||x.start,min:x.start,max:x.end,onBlur:pe})}),(0,k.jsx)(`div`,{className:`col-12 col-md-6 mb-4`,children:(0,k.jsx)(g.Input,{type:`time`,label:r.t(`alle`),className:`active`,defaultValue:x.value_end||x.end,onBlur:me,min:x.start,max:x.end})})]}):null})]})}),(0,k.jsx)(g.ModalFooter,{children:(0,k.jsx)(g.Button,{color:`primary`,onClick:()=>ue(),disabled:!C||!x?.value_start,children:r.t(`Conferma`)})})]})]})},Ue=class e extends Ve{constructor(e,t,n){super(e,t,n)}static get builderInfo(){return{title:`Dynamic Calendar`,group:`basic`,icon:`bi bi-calendar-plus`,documentation:``,weight:70,schema:e.schema()}}static schema(){return Ve.schema({type:`dynamic_calendar`})}static editForm=P;attach(e){return super.attach(e).then(()=>{this.loadRefs(this.element,{[`react-${this.id}`]:`single`});let e=this.refs[`react-${this.id}`];return e?(this.rootComponent=(0,u.createRoot)(e),this.rootComponent.render((0,k.jsx)(He,{component:this.component,value:this.dataValue,onChange:e=>this.setValue(e),...this,current:this})),this):this})}detach(){return this.rootComponent&&=(this.rootComponent.unmount(),null),super.detach()}setValue(e){if(e)if(Array.isArray(e))this.selectedNextSlots=e,this.updateValue(e),this.shouldSetValue=!0;else if(typeof e==`object`)this.date=e.date,this.slot=e.slot,this.meeting=e.meeting_id,this.meeting_expiration_time=null,this.opening_hour=e.opening_hour_id,this.calendar_id=e.calendar_id,this.updateValue(e),this.shouldSetValue=!0;else{let t=e.replace(`)`,``).replace(` (`,` @ `).replace(/\//g,`-`).split(` @ `),n=t[2].split(`#`);this.date=t[0],this.slot=t[1],this.meeting=n[1],this.meeting_expiration_time=null,this.opening_hour=n.length===3?n[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 e=this.meeting?this.meeting:``,t=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:e,opening_hour_id:t}}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}},We=[{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:N()+`/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 = '`+N()+`'; 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:N()+`/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) {
|
|
49
51
|
let url = data.url + '/api/calendars/' + data.calendarId + '/overlaps';
|
|
50
52
|
if (data.select_opening_hours && data.opening_hours.length > 0) {
|
|
51
53
|
let qs = "?opening_hours=" + data.opening_hours.join();
|
|
52
54
|
url = url + qs;
|
|
53
55
|
}
|
|
54
56
|
if (data.api_url !== url) value = url;
|
|
55
|
-
} else {url = ''}`,key
|
|
57
|
+
} else {url = ''}`,key:`api_url`,type:`hidden`,input:!0,weight:1},{label:`Sovrapposizioni`,inputFormat:`plain`,redrawOn:`api_url`,calculateValue:`function loadJSON(path, success, error){
|
|
56
58
|
var xhr = new XMLHttpRequest();
|
|
57
59
|
xhr.onreadystatechange = function() {
|
|
58
60
|
if (xhr.readyState === XMLHttpRequest.DONE) {
|
|
@@ -76,12 +78,12 @@ if(data.calendarId && data.api_url){
|
|
|
76
78
|
data.overlaps_validation = -1; document.querySelector("input[name^='data[overlaps_validation]']").value = -1;
|
|
77
79
|
}
|
|
78
80
|
);
|
|
79
|
-
}`,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 Th(...o){return Bt.Components.baseEditForm([{key:"display",components:jh}],...o)}function Yi({day:o,slot:s,i18next:u}){return m.jsx("li",{className:"it-list-item",children:m.jsx("div",{className:"list-item",children:m.jsx("div",{className:"it-right-zone",children:m.jsxs("span",{className:"text pl-4",children:[m.jsx("b",{children:o})," ",u.t("alle")," ",u.t("ore")," ",m.jsx("b",{children:s})]})})})})}const ji=Ct.Formio.Components.components.field,Ph=({component:o,current:s,onChange:u,i18next:i})=>{const[b,M]=G.useState(),[I,l]=G.useState([]),[y,r]=G.useState([]),[c,h]=G.useState(!1),[f,p]=G.useState(null),[g,C]=G.useState(null),[_,k]=G.useState(null),[Y,j]=G.useState(null),[F,R]=G.useState({}),[O,v]=G.useState(null),[T,S]=G.useState(!1),[x,V]=G.useState([]),[E,A]=G.useState(!1),z=G.useRef(),B=o.calendarId;he.locale(i.language),Se.locale(i.language);const ee=P=>{let H=he(P).format("YYYY-MM-DD");fetch(te(H)).then(N=>N.json()).then(N=>{let W=fe(P||new Date);const q=N.filter(_e=>_e.available==!0);q.length===0&&$();let se=[];W.forEach(_e=>{N.some($e=>$e.date===_e&&$e.available==!0)?se.push({available:!0,date:_e}):se.push({available:!1,date:_e})});const Pe=se.map(_e=>{if(_e.available===!1)return he(_e.date,"YYYY-MM-DD").toDate()});l(Pe);const ge=q.length?q[0].date:P;ie(ge)}).catch(N=>console.error(N))},ie=P=>{j(null),k(null),r([]);let H=he(P).format("YYYY-MM-DD");fetch(de(H)).then(N=>N.json()).then(N=>{const W=N.filter(q=>q.availability==!0);R(W[0]),W.length>0?(r(N),h(!1),k(he(P).format("L")),M(he(P,"YYYY-MM-DD").toDate())):(N.length>0&&M(he(N[0].date,"YYYY-MM-DD").toDate()),r([]),$())})},re=()=>{if(B!==""&&B!=null)if(!s.dataValue)ee(new Date);else if(o.multiple&&Array.isArray(s.dataValue)){if(s.dataValue.length>0){v(s.dataValue);let P=[];s.dataValue.map(H=>{P.push({...H,date:he(H.date,"YYYY-MM-DD").format("DD-MM-YYYY")})}),V(P)}}else if(!o.multiple&&typeof s.dataValue=="object"){const P={date:s.dataValue.date,slot:s.dataValue.slot},H={...s.dataValue,date:he(s.dataValue.date,"YYYY-MM-DD").format("DD-MM-YYYY")};V([H]),v(P)}else{let P=s.dataValue.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),H=P[2].split("#");const N={date:he(P[0],"DD-MM-YYYY").format("YYYY-MM-DD"),slot:P[1]};o.multiple?(u([{date:P[0],slot:P[1],calendar_id:H[0],meeting_id:H[1],opening_hour_id:H.length===3?H[2]:""}]),V([{date:P[0],slot:P[1],calendar_id:H[0],meeting_id:H[1],opening_hour_id:H.length===3?H[2]:""}])):(u({date:P[0],slot:P[1],calendar_id:H[0],meeting_id:H[1],opening_hour_id:H.length===3?H[2]:""}),V([{date:P[0],slot:P[1],calendar_id:H[0],meeting_id:H[1],opening_hour_id:H.length===3?H[2]:""}])),v(N)}};G.useEffect(()=>{window.FormioInstance?.formReady.then(()=>{setTimeout(()=>{re()},1e3)})},[]);const fe=P=>{let N=he(P,"YYYY-MM").daysInMonth(),W=[];for(;N;){let q=he(P).date(N);W.push(q.format("YYYY-MM-DD")),N--}return W},te=(P,H=!1)=>{let N=o.calendarId,W=o.select_opening_hours,q=o.select_opening_hours?o.opening_hours:[];window.location.pathname.split("/");let se=`${Ee()}/api/calendars/${N}/availabilities`,Pe=[`from_time=${he(P).startOf("month").format("YYYY-MM-DD")}`,`to_time=${he(P).endOf("month").format("YYYY-MM-DD")}`];return H&&Pe.push(`available=${H}`),W&&q&&Pe.push(`opening_hours=${q.join()}`),`${se}?${Pe.join("&")}`},de=(P,H=!1)=>{let N=o.calendarId,W=o.select_opening_hours,q=o.select_opening_hours?o.opening_hours:[];window.location.pathname.split("/");const se=he(P).format("YYYY-MM-DD");let Pe=`${Ee()}/api/calendars/${N}/availabilities/${se}`,ge=[];return H&&ge.push(`available=${H}`),W&&q&&ge.push(`opening_hours=${q.join()}`),ge&&(Pe=`${Pe}?${ge.join("&")}`),Pe},ve=P=>{ee(P)},me=P=>{setTimeout(()=>{S(!T)},1e3),ie(P)},oe=P=>{j(null),setTimeout(()=>{P&&(C(P.target.dataset),j(P.target.id))},300)},Z=P=>{p(null);let H=`${Ee()}/it/meetings/new-draft`,N={date:g?.date?he(g?.date).format("DD-MM-YYYY"):he(P.target.dataset.date).format("DD-MM-YYYY"),slot:g?.value_start&&g?.value_end?g.value_start+"-"+g.value_end:P.target.dataset.slots,calendar:o.calendarId,opening_hour:g?.opening_hour?g?.opening_hour:P.target.dataset.opening_hour,meeting:f?f.id:"",first_available_date:F.date,first_available_start_time:F.start_time,first_available_end_time:F.end_time,first_availability_updated_at:he().format()};fetch(H,{method:"POST",body:JSON.stringify(N),headers:{"Content-Type":"application/json; charset=utf-8"},strictErrors:!0}).then(W=>{if(!W.ok)throw new Error(i.t("Intervallo selezionato non disponibile!"));return W.json()}).then(W=>{p(W);const q={date:N.date,slot:N.slot,calendar_id:N.calendar[0],opening_hour_id:N.opening_hour||N.opening_hour_id,meeting_id:W.id};V([...x,q])}).catch(W=>{console.log(W),He.fire({title:"",html:"<p>"+W+"</p>",icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},Ne=()=>{g&&(Z(),S(!T))},Ie=()=>m.jsx("span",{children:i.t("Tempo prenotazione scaduto!")}),Ye=({minutes:P,seconds:H,completed:N})=>N?m.jsx(Ie,{}):m.jsx("div",{children:m.jsxs("div",{children:[" ",m.jsxs("span",{children:[" ",m.jsxs("i",{children:[i.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"),":"]})," ",m.jsxs("b",{children:[P," ",i.t("minuti")," ",H," ",i.t("secondi")]})]})]})}),Oe=P=>{if(P===null||P==="")u("");else if(Array.isArray(P)&&P.length>0){let H=[];x.map(N=>{H.push({date:he(N.date,"DD-MM-YYYY").format("YYYY-MM-DD"),slot:N.slot,calendar_id:N.calendar_id||N.calendar[0],meeting_id:N.meeting_id,opening_hour_id:N.opening_hour||N.opening_hour_id})}),o.multiple?u(H):u(H[0])}else u("")},$=()=>{h(!0),p(null),k(null),Oe(null)},J=()=>{if(i.language==="it")return $s;if(i.language==="en")return Hs;if(i.language==="de")return qs};G.useEffect(()=>{Oe(x)},[x]),G.useEffect(()=>{document.querySelector(".formio-read-only")&&E===!1?(A(!0),setTimeout(()=>{re()},1e3)):(A(!1),setTimeout(()=>{re()},1e3))},[]);const X=(P,H)=>{let N=`${Ee()}/api/meetings/${H.meeting_id}`;fetch(N,{method:"DELETE",headers:{"Content-Type":"application/json; charset=utf-8",Authorization:`Bearer ${tr("auth-token")}`},strictErrors:!0}).then(W=>{if(W&&W.status>400)He.fire({title:"",html:`<p>${i.t("Ci sono stati degli errori durante la cancellazione dello slot")}</p>`,icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1});else{const q=[...x.slice(0,P),...x.slice(P+1)];V(q),ee(new Date)}})};return m.jsxs(m.Fragment,{children:[E&&O?m.jsxs("div",{className:"my-5 mx-2 d-print-block d-preview-calendar d-preview-calendar-none",children:[m.jsxs("b",{children:[Array.isArray(O)&&O.length>1?i.t("Giorni selezionati per la prenotazione"):i.t("Giorno selezionato per la prenotazione"),":"]}),m.jsx("div",{className:"mb-5",children:m.jsx("div",{className:"it-list-wrapper",children:m.jsx("ul",{className:"it-list",children:Array.isArray(O)?O.map(P=>m.jsx(Yi,{day:he(P.date,"DD-MM-YYYY").format("DD/MM/YYYY"),i18next:i,slot:P.slot})):m.jsx(Yi,{day:Se(O.date).format("DD/MM/YYYY"),i18next:i,slot:O.slot})})})})]}):m.jsx("div",{className:"slot-calendar ",children:m.jsxs("div",{className:"row",children:[o.multiple?m.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:m.jsxs("div",{className:"m-2",children:[m.jsx("h6",{children:i.t(o.label)}),m.jsx(yr.DayPicker,{mode:"single",selected:b,locale:J(),disabled:I,onMonthChange:ve,onDayClick:me})]})}):x.length!==1?m.jsx("div",{className:"col-12 d-print-none d-preview-calendar-none",children:m.jsxs("div",{className:"m-2",children:[m.jsx("h6",{children:i.t(o.label)}),m.jsx(yr.DayPicker,{mode:"single",selected:b,locale:J(),disabled:I,onMonthChange:ve,onDayClick:me})]})}):null,m.jsx("div",{className:"col-12",children:x.length?m.jsx("div",{className:"row m-2",children:m.jsxs("div",{className:"col-12 mb-4",children:[m.jsxs("b",{children:[x.length>1?i.t("Giorni selezionati per la prenotazione"):i.t("Giorno selezionato per la prenotazione"),":"," "]}),m.jsx("div",{className:"mb-5",children:m.jsx("div",{className:"it-list-wrapper",children:m.jsx("ul",{className:"it-list",children:x.map((P,H)=>m.jsx("li",{children:m.jsx("div",{className:"list-item",children:m.jsxs("div",{className:"it-right-zone",children:[m.jsxs("span",{className:"text pl-4",children:[P.date," ",g||P.slot?`${i.t("alle")} ${P.slot}`:""]}),m.jsx(ue.Icon,{icon:"it-delete",onClick:()=>X(H,P),role:"button"})]})})},"li"+H))})})}),f?m.jsx(ue.Alert,{color:"info",defaultValue:"string",className:"d-print-none d-preview-calendar-none",children:m.jsx(zs,{date:f.expiration_time,renderer:Ye})}):null]})}):null})]})}),m.jsxs(ue.Modal,{isOpen:T,toggle:()=>S(!T),labelledBy:"daySelected",size:"lg",centered:!0,container:_r(),children:[m.jsx(ue.ModalHeader,{toggle:()=>S(!T),id:"daySelected",children:i.t("Seleziona una fascia oraria")}),m.jsx(ue.ModalBody,{children:m.jsxs("div",{className:"row",children:[x.length>=1?m.jsxs("div",{children:[_&&!c?m.jsxs("h6",{children:[i.t("Orari disponibili del")," ",Se(_).format("DD/MM/YYYY")]}):null,m.jsxs("div",{className:"calendar-last-selection col-12 pt-2 mb-5",children:[m.jsx("small",{className:"pl-2 mb-2 d-flex px-2",children:m.jsxs("b",{children:[m.jsx(ue.Icon,{icon:"it-clock",className:"mr-1",size:"sm"})," ",i.t("Ultimo orario selezionato")]})}),m.jsx("div",{className:"col-6 px-2",children:m.jsx("button",{type:"button",id:"slot-last-selection",onClick:oe,tabIndex:"1",className:Y==="slot-last-selection"?"active btn btn-slot p-0":"btn btn-slot p-0","data-date":he(_,"DD/MM/YYYY").format("YYYY-MM-DD"),"data-slots":x[x.length-1].slot,"data-opening_hour":x[x.length-1].opening_hour_id,"data-start":x[x.length-1].slot.split("-")[0],"data-end":x[x.length-1].slot.split("-")[1],"data-value_start":x[x.length-1].slot.split("-")[0],"data-value_end":x[x.length-1].slot.split("-")[1],disabled:c,children:x[x.length-1].slot})})]})]}):null,m.jsx("div",{children:_&&x.length>=1?m.jsx("h6",{children:i.t("Seleziona altri orari")}):c?null:m.jsxs("h6",{children:[i.t("Orari disponibili del")," ",Se(_).format("DD/MM/YYYY")]})}),y.map((P,H)=>m.jsx("div",{className:"col-6",children:m.jsxs("button",{type:"button",id:"slot-"+H,onClick:oe,ref:z,className:Y==="slot-"+H?"active btn btn-slot p-0":"btn btn-slot p-0",tabIndex:"1","data-date":P.date,"data-start":P.start_time,"data-end":P.end_time,"data-value_start":P.start_time,"data-value_end":P.end_time,"data-slots":P.start_time+"-"+P.end_time,"data-opening_hour":P.opening_hour,"data-min_duration":P.min_duration,disabled:P.slots_available==0,children:[P.start_time," - ",P.end_time]})},"slot-"+H)),c?m.jsxs("div",{className:"callout callout-highlight warning",children:[m.jsxs("div",{className:"callout-title",children:[m.jsx(ue.Icon,{"aria-hidden":!0,icon:"it-help-circle"}),i.t("Attenzione")]}),m.jsxs("p",{children:[" ",i.t("Non è possibile prenotare per la data selezionata"),"."]})]}):null]})}),m.jsx(ue.ModalFooter,{children:m.jsx(ue.Button,{color:"primary",onClick:()=>Ne(),disabled:!_||!g?.value_start,children:i.t("Conferma")})})]})]})};class Sr extends ji{constructor(s,u,i){super(s,u,i)}static get builderInfo(){return{title:"Calendar",group:"basic",icon:"bi bi-calendar-plus",documentation:"",weight:70,schema:Sr.schema()}}static schema(){return ji.schema({type:"calendar"})}static editForm=Th;attach(s){return super.attach(s).then(()=>{this.loadRefs(this.element,{[`react-${this.id}`]:"single"});const u=this.refs[`react-${this.id}`];return u?(this.rootComponent=Et.createRoot(u),this.rootComponent.render(m.jsx(Ph,{component:this.component,value:this.dataValue,onChange:i=>this.setValue(i),...this,current:this})),this):this})}detach(){return this.rootComponent&&(this.rootComponent.unmount(),this.rootComponent=null),super.detach()}setValue(s){if(s)if(Array.isArray(s))this.selectedNextSlots=s,this.updateValue(s),this.shouldSetValue=!0;else if(typeof s=="object")this.date=s.date,this.slot=s.slot,this.meeting=s.meeting_id,this.meeting_expiration_time=null,this.opening_hour=s.opening_hour_id,this.calendar_id=s.calendar_id,this.updateValue(s),this.shouldSetValue=!0;else{let u=s.replace(")","").replace(" ("," @ ").replace(/\//g,"-").split(" @ "),i=u[2].split("#");this.date=u[0],this.slot=u[1],this.meeting=i[1],this.meeting_expiration_time=null,this.opening_hour=i.length===3?i[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 s=this.meeting?this.meeting:"",u=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:s,opening_hour_id:u}}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}}const Nh=[{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 = '"+Ee()+"'; data.url = url; value=url;",key:"url",type:"hidden",input:!0,weight:1},{label:"Tipo di visualizazzione",widget:"choicesjs",tableView:!0,data:{values:[{label:"calendar",value:"calendar"},{label:"select",value:"select"}]},validateWhenHidden:!1,defaultValue:"calendar",key:"view",type:"select",input:!0}];function Rh(...o){return Bt.Components.baseEditForm([{key:"display",components:Nh}],...o)}function Eh({day:o,slot:s,i18next:u}){return m.jsx("li",{className:"it-list-item",children:m.jsx("div",{className:"list-item",children:m.jsx("div",{className:"it-right-zone",children:m.jsxs("span",{className:"text-paragraph pl-4",children:[m.jsx("b",{children:o})," ",u.t("alle")," ",u.t("ore")," ",m.jsx("b",{children:s})]})})})})}function Ah(o,s){if(!s||s.length===0)return;const u=s.map(I=>{const l=new Date(I.start);return(new Date(I.end)-l)/6e4}),i=Math.min(...u),b=u.reduce((I,l)=>I+l,0)/u.length;let M=0;i<=30&&i>15?M=b*1:i<=15?M=b*24:M=b*4,o.setOption("slotHeight",M),document.documentElement.style.setProperty("--slot-height",`${M}px`)}const Gs={AVAILABILITY:{key:"availability_data_cache_",duration:10},SLOTS:{key:"availability_slots_cache_",duration:10},SUBMISSION:{key:"submission_cache_",duration:30}},Zr=(o,s,u)=>{const i={data:u,timestamp:Se().toISOString()};localStorage.setItem(s,JSON.stringify(i)),console.log(`✅ Cache salvato: ${o}`)},Qr=(o,s)=>{try{const u=localStorage.getItem(s);if(!u)return null;const i=JSON.parse(u),b=Se().diff(Se(i.timestamp),"minutes");return b>Gs[o].duration?(localStorage.removeItem(s),console.log(`⏰ Cache scaduto: ${o}`),null):(console.log(`✅ Cache letto: ${o} (${b} minuti fa)`),i.data)}catch(u){return console.error(`Errore nel leggere il cache (${o}):`,u),null}},ea=(o,...s)=>Gs[o].key+btoa(s),bn="calendar_view_state",wn="calendar_view_date",Ih=(o,s)=>{try{localStorage.setItem(bn,o),localStorage.setItem(wn,s||new Date().toISOString())}catch(u){console.error("Errore nel salvare lo stato della view:",u)}},Fh=()=>{try{const o=localStorage.getItem(bn),s=localStorage.getItem(wn);return{viewType:o||"timeGridWeek",date:s?new Date(s):new Date}}catch(o){return console.error("Errore nel leggere lo stato della view:",o),{viewType:"timeGridWeek",date:new Date}}},Js=()=>{try{localStorage.removeItem(bn),localStorage.removeItem(wn)}catch(o){console.error("Errore nel pulire lo stato della view:",o)}},Ti=Ct.Formio.Components.components.field,Vh=({component:o,current:s,onChange:u,i18next:i})=>{const[b,M]=G.useState(null),[I,l]=G.useState(null),[y,r]=G.useState([]),[c,h]=G.useState(!1),[f,p]=G.useState(!1),[g,C]=G.useState(null),[_,k]=G.useState([]),[Y,j]=G.useState([]),[F,R]=G.useState([]),[O,v]=G.useState(null),[T,S]=G.useState(null),[x,V]=G.useState(null),E=G.useRef(null),A=G.useRef(null);i.language,he.locale(i.language),Se.locale(i.language);function z($){if(!$||$.length===0)return null;const J=$.map(H=>({start:H.start_time,end:H.end_time})),X=J.reduce((H,N)=>N.start<H?N.start:H,J[0].start),P=J.reduce((H,N)=>N.end>H?N.end:H,J[0].end);return{earliestStartTime:X,latestEndTime:P}}function B($){const J=$.map(H=>he(H.date).isoWeekday()),P=[1,2,3,4,5,6,7].filter(H=>!J.includes(H));P.length>0?A.current.setOption("hiddenDays",P):A.current.setOption("hiddenDays",[])}function ee($,J,X){const P=new URL($),N=`${P.pathname.split("/").slice(0,4).join("/")}/${J}/${X}`;return`${P.origin}${N}${P.search}`}function ie($,J,X){const P=new URL($),N=`${P.pathname.split("/").slice(0,4).join("/")}`;return`${P.origin}${N}${P.search}&from_to=${J}&to_date=${X}`}function re($,J,X){return`${Ee()}/api/availabilities/${$}/${J}?calendar_ids=${X}&available=true`}const fe=$=>{R([]),j([]),u({}),$&&j(b.filter(J=>J.date.startsWith($)))},te=async($,J)=>{const X=JSON.parse($),P=ea("SLOTS",X.date,X.calendar_ids);if(J==="manual")R([]),V(null),C(null),u({});else{const H=Qr("SLOTS",P);if(H){R(H);return}}try{const H=await window.FormioHelper.anonymousCall(`availabilities/${X.date}?calendar_ids=${X.calendar_ids}`);Zr("SLOTS",P,H.data),R(H.data)}catch(H){console.error("Errore nel caricamento degli slot:",H),He.fire({icon:"error",title:i.t("Errore"),text:i.t("Errore nel caricamento degli orari")})}},de=$=>{const J=JSON.parse($),X={status:6,calendar:J.calendar_id,opening_hour:J.opening_hour_id,user:null,email:null,fiscal_code:null,name:" ",phone_number:null,from_time:Se(`${J.date}T${J.start_time}`).toISOString(),to_time:Se(`${J.date}T${J.end_time}`).toISOString(),user_message:null,reason:null,location:null,motivation_outcome:null,calendar_group_config_id:s?.data?.service_data?.id,calendar_group_office_id:s?.data?.user_group?.id,calendar_group_place_id:s?.data?.place?.id};window.FormioHelper.authenticatedRequest(s?.dataValue?.id?"PATCH":"POST",s?.dataValue?.id?`meetings/${s.dataValue.id}`:"meetings",X).then(P=>{C({day:Se(J.date).format("dddd, DD MMMM YYYY"),startDate:J.start_time,endDate:J.end_time}),u(P?.id?P:P?{...P,id:s.dataValue.id}:s.dataValue.id?{...X,id:s.dataValue.id}:{...X})}).catch(P=>{console.error(P),P.status===400&&P?.response?.data?.type==="validation_error"?He.fire({title:"",html:"<p>"+i.t("Lo slot orario selezionato non è disponibile perché già prenotato Seleziona un altro orario o una data diversa")+"</p>",icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}):He.fire({title:"",html:"<p>"+P+"</p>",icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},ve=$=>{const J=new Set,X=[];return $.forEach(P=>{const H=Se(P.date),N=H.format("YYYY-MM");J.has(N)||(J.add(N),X.push({value:N,label:H.format("MMMM YYYY").replace(/^\w/,W=>W.toUpperCase())}))}),X},me=async()=>{const $=s?.root?.data?.place?.merge_availabilities?s?.root?.data?.place?.merged_availabilities_link:null,J=he().format("YYYY-MM-DD"),X=he().add(1,"month").format("YYYY-MM-DD"),P=s?.root?.data?.place?.calendars[0]?.id||null,H=$?ie($,J,X):re(J,X,P),N=ea("AVAILABILITY",H),W=Qr("AVAILABILITY",N);if(W){M(W),k(ve(W));return}else u({});h(!0);try{const q=await window.FormioHelper.fetchAPIUrlLimit(H);if(h(!1),!q?.length){He.fire({icon:"warning",title:i.t("warning"),html:i.t("no_meetings")});return}Zr("AVAILABILITY",N,q),M(q),k(ve(q))}catch(q){h(!1),console.error("Errore nel caricamento disponibilità:",q)}};G.useEffect(()=>{if(b?.length){const $=s?.dataValue??s?.getValue();if($?.from_time&&$?.to_time&&!Se().isAfter($?.draft_expiration)){const J=Se($.from_time).format("YYYY-MM");v(J),J&&j&&(j(b.filter(X=>X.date.startsWith(J))),S(Se($.from_time).format("YYYY-MM-DD")))}else $?.draft_expiration&&Se().isAfter($?.draft_expiration)&&He.fire({icon:"warning",title:i.t("warning"),html:i.t("expired_meeting")})}},[b]),G.useEffect(()=>{const $=s?.dataValue??s?.getValue();if(!_.length||O||$?.from_time||$?.to_time)return;const J=_[0];J&&(v(J.value),fe(J.value))},[_,O,s?.dataValue]),G.useEffect(()=>{if(T&&f===!1){const $=s?.dataValue??s?.getValue();te(JSON.stringify({date:T,calendar_ids:$.calendar.id}))}},[T]);const oe=()=>window.innerWidth>768?"timeGridWeek":"timeGridDay";G.useEffect(()=>{const $=()=>{const J=A.current;if(!J)return;const X=oe(),P=J.getView().type;X!==P&&J.setOption("view",X)};return window.addEventListener("resize",$),()=>window.removeEventListener("resize",$)},[]),G.useEffect(()=>{const $=s?.dataValue??s?.getValue();F?.length&&$?.from_time&&(V(Se($.from_time).format("HH:mm")+" - "+Se($.to_time).format("HH:mm")),C({day:Se($.from_time).format("dddd D MMM YYYY"),startDate:Se($.from_time).format("HH:mm"),endDate:Se($.to_time).format("HH:mm")}))},[F]);const Z=()=>{const $=Fh();A.current=di.createCalendar(E.current,[di.TimeGrid],{events:[],buttonText:{today:i.t("Oggi")},allDaySlot:!1,firstDay:1,date:$.date,slotEventOverlap:!1,view:oe(),height:"400px",views:{timeGridWeek:{allDaySlot:!1,firstDay:1,slotHeight:48},timeGridDay:{allDaySlot:!1,firstDay:1,slotHeight:48}},datesSet:J=>{Ih(J.view.type,J.start)},eventClick({event:J,el:X}){document.querySelectorAll(".ec-event").forEach(se=>{se.classList.remove("highlighted-event")}),X.classList.add("highlighted-event");const P=new Date(J.start),H=new Date(J.end),N=P.toLocaleDateString("it-IT",{weekday:"long",day:"numeric",month:"long",year:"numeric"}),W=P.toLocaleTimeString("it-IT",{hour:"2-digit",minute:"2-digit"}),q=H.toLocaleTimeString("it-IT",{hour:"2-digit",minute:"2-digit"}),ce={status:6,calendar:J.extendedProps.calendar_id,opening_hour:J.extendedProps.opening_hour_id,user:null,email:null,fiscal_code:null,name:" ",phone_number:null,from_time:P,to_time:H,user_message:null,reason:null,location:null,motivation_outcome:null,calendar_group_config_id:s?.data?.service_data?.id,calendar_group_office_id:s?.data?.user_group?.id,calendar_group_place_id:s?.data?.place?.id};window.FormioHelper.authenticatedRequest(s?.dataValue?.id?"PATCH":"POST",s?.dataValue?.id?`meetings/${s.dataValue.id}`:"meetings",ce).then(se=>{let Pe;!se||se===""?Pe={...ce,code:null,id:s?.dataValue?.id}:typeof se=="object"&&(Pe=se),C({day:N,startDate:W,endDate:q}),u(Pe)}).catch(se=>{console.error(se),se.status===400&&se?.response?.data?.type==="validation_error"?He.fire({title:"",html:"<p>"+i.t("Lo slot orario selezionato non è disponibile perché già prenotato Seleziona un altro orario o una data diversa")+"</p>",icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}):He.fire({title:"",html:"<p>"+se+"</p>",icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})},viewDidMount:Ne,eventDidMount:J=>{const{event:X,el:P}=J,H=X.extendedProps;P.setAttribute("data-event-id",X.id+"-"+H.date+"-"+H.start_time)},loading:J=>{h(J)}})},Ne=$=>{s?.root?.data?.place&&A.current.setOption("eventSources",[{events:Ie}])};async function Ie($,J,X){try{A.current.setOption("events",[]);const P=he($.start).format("YYYY-MM-DD"),H=new Date($.end);H.setDate(H.getDate()-1);const N=he(H).format("YYYY-MM-DD"),W=null,q=s?.root?.data?.place?.merge_availabilities?s?.root?.data?.place?.merged_availabilities_link:null,ce=q?ee(q,P,N):re(P,N,W),se=ea("AVAILABILITY",ce),Pe=Qr("AVAILABILITY",se);let ge;if(Pe?(ge=Pe,h(!1)):(ge=await window.FormioHelper.fetchAPIUrlLimit(ce),Zr("AVAILABILITY",se,ge)),!ge?.length){J([]),He.fire({icon:"warning",title:i.t("warning"),html:i.t("no_meetings")});return}const _e=ge.map(Re=>({id:Re.opening_hour_id,allDay:!1,start:`${Re.date}T${Re.start_time}:00`,end:`${Re.date}T${Re.end_time}:00`,title:`${Re.start_time} - ${Re.end_time}`,editable:!1,display:"auto",color:"#ebeef0",textColor:"#000",className:"event-slot",extendedProps:{...Re}})),$e=z(ge);A.current.setOption("slotMinTime",$e.earliestStartTime),A.current.setOption("slotMaxTime",$e.latestEndTime),B(ge),Ah(A.current,_e),J(_e),setTimeout(()=>{Ye(_e)},500)}catch(P){console.error("Errore nel caricamento disponibilità:",P),X?.(P)}}G.useEffect(()=>{let $,J=!1;async function X(){try{if(await window.FormioInstance?.formReady,J)return;if(!E.current){console.warn("Elemento calendario non trovato");return}const P=s?.dataValue??s?.getValue();P&&P?.draft_expiration&&Se().isAfter(P.draft_expiration)&&(u({}),Js()),s?.data?.service_data?.view_type==="calendar"||o.view==="calendar"?A?.current||Z():s?.data?.service_data?.view_type==="select"||o.view==="select"?me():alert(i.t("Il componente non è configurato per la visualizzazione a calendario"))}catch(P){console.error("Errore durante l'inizializzazione del calendario:",P)}}return $=setTimeout(X,500),()=>{J=!0,$&&clearTimeout($),A.current&&(E.current?.destroy?.(),A.current=null)}},[s?.root?.data?.place]);function Ye($){const J=s?.dataValue;if(!J?.from_time)return;const X=Se(J.from_time).format("DD-MM-YYYY HH:mm"),P=Se(J.to_time).format("DD-MM-YYYY HH:mm"),H=$.find(W=>Se(W.start).format("DD-MM-YYYY HH:mm")===X&&Se(W.end).format("DD-MM-YYYY HH:mm")===P);if(!H)return;const N=document.querySelector(`.ec-event[data-event-id="${H.id}-${Se(J?.from_time).format("YYYY-MM-DD")}-${Se(J?.from_time).format("HH:mm")}"]`);N&&(N.classList.add("highlighted-event"),N.scrollIntoView({behavior:"smooth",block:"center"}),C({day:Se(J?.from_time).format("dddd, DD MMMM YYYY"),startDate:Se(J?.from_time).format("HH:mm"),endDate:Se(J?.to_time).format("HH:mm")}))}const Oe=({day:$,startDate:J,endDate:X})=>m.jsx("div",{className:"mt-3",children:m.jsxs("div",{className:"row align-items-center gy-3",children:[m.jsxs("div",{className:"col-12 col-md border-light mx-md-3",children:[m.jsx("div",{className:"text-paragraph-small",children:i.t("Data")}),m.jsx("p",{className:"data-text",children:m.jsx("strong",{children:$})})]}),m.jsxs("div",{className:"col-12 col-md border-light mx-md-3",children:[m.jsx("div",{className:"text-paragraph-small",children:i.t("Ora")}),m.jsx("p",{className:"data-text",children:m.jsxs("strong",{children:[J," - ",X]})})]})]})});return G.useEffect(()=>{document.querySelector(".formio-read-only")&&f===!1?p(!0):(s?.data?.service_data?.view_type==="select"?me():s?.data?.service_data?.view_type==="calendar"&&Z(),p(!1))},[]),G.useEffect(()=>{f&&setTimeout(()=>{const $=s?.dataValue??s?.getValue();console.log("savedValue",$,f),$&&l($)},500)},[f]),m.jsx(m.Fragment,{children:f&&I?m.jsxs("div",{className:"mx-2",children:[m.jsxs("p",{className:"text-paragraph",children:[i.t("Giorno selezionato per la prenotazione"),":"]}),m.jsx("div",{className:"",children:m.jsx("div",{className:"it-list-wrapper",children:m.jsx("ul",{className:"it-list",children:m.jsx(Eh,{day:Se(I.from_time).format("dddd D MMM YYYY"),i18next:i,slot:`${Se(I.from_time).format("HH:mm")} - ${Se(I.to_time).format("HH:mm")}`})})})})]}):m.jsxs("div",{className:"",children:[m.jsx("div",{ref:E}),_.length>0?m.jsxs(m.Fragment,{children:[m.jsxs(ue.Select,{label:"Mese",id:"selectMonthYear",onChange:fe,children:[m.jsx("option",{value:"",children:i.t("Scegli un'opzione")}),_.map($=>m.jsx("option",{value:$.value,selected:$.value===O,children:$.label},$.value))]}),m.jsxs(ue.Select,{label:"Giorno",id:"selectDay",onChange:$=>te($,"manual"),disabled:Y.length===0,children:[m.jsx("option",{value:"",children:i.t("Scegli un'opzione")}),Y.map($=>m.jsx("option",{value:JSON.stringify($),selected:$.date===T,children:Se($.date).format("dddd,DD MMMM YYYY")},$.date))]}),m.jsxs(ue.Select,{label:"Orario",id:"selectSlot",onChange:de,disabled:F.length===0,children:[m.jsx("option",{value:"",children:i.t("Scegli un'opzione")}),F.map($=>m.jsx("option",{value:JSON.stringify($),selected:$.start_time+" - "+$.end_time===x,children:$.start_time+" - "+$.end_time},$.start_time+" - "+$.end_time))]})]}):null,g?Oe({day:g.day,startDate:g.startDate,endDate:g.endDate}):null,c?m.jsx("div",{className:"d-flex align-items-center justify-content-center position-absolute-center",children:m.jsx(ue.Spinner,{active:!0})}):null]})})};class Mr extends Ti{constructor(s,u,i){super(s,u,i)}static get builderInfo(){return{title:"Calendar Advanced",group:"basic",icon:"bi bi-calendar-plus",documentation:"",weight:70,schema:Mr.schema()}}static schema(){return Ti.schema({type:"calendar-advanced"})}static editForm=Rh;attach(s,u){return super.attach(s).then(()=>{this.loadRefs(this.element,{[`react-${this.id}`]:"single"});const i=this.refs[`react-${this.id}`];return i?(this.rootComponent&&(this.rootComponent.unmount(),this.rootComponent=null),this.rootComponent=Et.createRoot(i),this.builderMode?(this.rootComponent.render(m.jsx("div",{className:"my-1 border border-2 border-light rounded p-3 text-secondary",children:m.jsx("div",{className:"h6 mb-0",children:this.component?.label||"Calendar Advanced"})})),this):(this.rootComponent.render(m.jsx(Vh,{ref:u,component:this.component,value:this.dataValue,onChange:b=>this.setValue(b),...this,current:this})),this)):this})}detach(){return this.rootComponent&&(this.rootComponent.unmount(),this.rootComponent=null),super.detach()}setValue(s){s&&(this.updateValue(s),this.shouldSetValue=!0)}getValue(){return this.dataValue}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}}const zh=[{key:"defaultValue",ignore:!0}],Lh=[{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"]]}}}],Wh=[{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:`{
|
|
81
|
+
}`,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 Ge(...e){return f.Components.baseEditForm([{key:`display`,components:We}],...e)}function Ke({day:e,slot:t,i18next:n}){return(0,k.jsx)(`li`,{className:`it-list-item`,children:(0,k.jsx)(`div`,{className:`list-item`,children:(0,k.jsx)(`div`,{className:`it-right-zone`,children:(0,k.jsxs)(`span`,{className:`text pl-4`,children:[(0,k.jsx)(`b`,{children:e}),` `,n.t(`alle`),` `,n.t(`ore`),` `,(0,k.jsx)(`b`,{children:t})]})})})})}var q=l.Formio.Components.components.field,qe=({component:e,current:t,onChange:n,i18next:r})=>{let[i,a]=(0,d.useState)(),[o,s]=(0,d.useState)([]),[c,l]=(0,d.useState)([]),[u,f]=(0,d.useState)(!1),[y,b]=(0,d.useState)(null),[x,S]=(0,d.useState)(null),[C,w]=(0,d.useState)(null),[T,E]=(0,d.useState)(null),[D,O]=(0,d.useState)({}),[A,j]=(0,d.useState)(null),[M,ee]=(0,d.useState)(!1),[P,F]=(0,d.useState)([]),[I,L]=(0,d.useState)(!1),R=(0,d.useRef)(),z=e.calendarId;h.default.locale(r.language),v.default.locale(r.language);let te=e=>{let t=(0,h.default)(e).format(`YYYY-MM-DD`);fetch(ie(t)).then(e=>e.json()).then(t=>{let n=re(e||new Date),r=t.filter(e=>e.available==1);r.length===0&&me();let i=[];n.forEach(e=>{t.some(t=>t.date===e&&t.available==1)?i.push({available:!0,date:e}):i.push({available:!1,date:e})}),s(i.map(e=>{if(e.available===!1)return(0,h.default)(e.date,`YYYY-MM-DD`).toDate()})),ne(r.length?r[0].date:e)}).catch(e=>console.error(e))},ne=e=>{E(null),w(null),l([]);let t=(0,h.default)(e).format(`YYYY-MM-DD`);fetch(ae(t)).then(e=>e.json()).then(t=>{let n=t.filter(e=>e.availability==1);O(n[0]),n.length>0?(l(t),f(!1),w((0,h.default)(e).format(`L`)),a((0,h.default)(e,`YYYY-MM-DD`).toDate())):(t.length>0&&a((0,h.default)(t[0].date,`YYYY-MM-DD`).toDate()),l([]),me())})},B=()=>{if(z!==``&&z!=null)if(!t.dataValue)te(new Date);else if(e.multiple&&Array.isArray(t.dataValue)){if(t.dataValue.length>0){j(t.dataValue);let e=[];t.dataValue.map(t=>{e.push({...t,date:(0,h.default)(t.date,`YYYY-MM-DD`).format(`DD-MM-YYYY`)})}),F(e)}}else if(!e.multiple&&typeof t.dataValue==`object`){let e={date:t.dataValue.date,slot:t.dataValue.slot};F([{...t.dataValue,date:(0,h.default)(t.dataValue.date,`YYYY-MM-DD`).format(`DD-MM-YYYY`)}]),j(e)}else{let r=t.dataValue.replace(`)`,``).replace(` (`,` @ `).replace(/\//g,`-`).split(` @ `),i=r[2].split(`#`),a={date:(0,h.default)(r[0],`DD-MM-YYYY`).format(`YYYY-MM-DD`),slot:r[1]};e.multiple?(n([{date:r[0],slot:r[1],calendar_id:i[0],meeting_id:i[1],opening_hour_id:i.length===3?i[2]:``}]),F([{date:r[0],slot:r[1],calendar_id:i[0],meeting_id:i[1],opening_hour_id:i.length===3?i[2]:``}])):(n({date:r[0],slot:r[1],calendar_id:i[0],meeting_id:i[1],opening_hour_id:i.length===3?i[2]:``}),F([{date:r[0],slot:r[1],calendar_id:i[0],meeting_id:i[1],opening_hour_id:i.length===3?i[2]:``}])),j(a)}};(0,d.useEffect)(()=>{window.FormioInstance?.formReady.then(()=>{setTimeout(()=>{B()},1e3)})},[]);let re=e=>{let t=(0,h.default)(e,`YYYY-MM`).daysInMonth(),n=[];for(;t;){let r=(0,h.default)(e).date(t);n.push(r.format(`YYYY-MM-DD`)),t--}return n},ie=(t,n=!1)=>{let r=e.calendarId,i=e.select_opening_hours,a=e.select_opening_hours?e.opening_hours:[];window.location.pathname.split(`/`);let o=`${N()}/api/calendars/${r}/availabilities`,s=[`from_time=${(0,h.default)(t).startOf(`month`).format(`YYYY-MM-DD`)}`,`to_time=${(0,h.default)(t).endOf(`month`).format(`YYYY-MM-DD`)}`];return n&&s.push(`available=${n}`),i&&a&&s.push(`opening_hours=${a.join()}`),`${o}?${s.join(`&`)}`},ae=(t,n=!1)=>{let r=e.calendarId,i=e.select_opening_hours,a=e.select_opening_hours?e.opening_hours:[];window.location.pathname.split(`/`);let o=(0,h.default)(t).format(`YYYY-MM-DD`),s=`${N()}/api/calendars/${r}/availabilities/${o}`,c=[];return n&&c.push(`available=${n}`),i&&a&&c.push(`opening_hours=${a.join()}`),c&&(s=`${s}?${c.join(`&`)}`),s},oe=e=>{te(e)},se=e=>{setTimeout(()=>{ee(!M)},1e3),ne(e)},ce=e=>{E(null),setTimeout(()=>{e&&(S(e.target.dataset),E(e.target.id))},300)},le=t=>{b(null);let n=`${N()}/it/meetings/new-draft`,i={date:x?.date?(0,h.default)(x?.date).format(`DD-MM-YYYY`):(0,h.default)(t.target.dataset.date).format(`DD-MM-YYYY`),slot:x?.value_start&&x?.value_end?x.value_start+`-`+x.value_end:t.target.dataset.slots,calendar:e.calendarId,opening_hour:x?.opening_hour?x?.opening_hour:t.target.dataset.opening_hour,meeting:y?y.id:``,first_available_date:D.date,first_available_start_time:D.start_time,first_available_end_time:D.end_time,first_availability_updated_at:(0,h.default)().format()};fetch(n,{method:`POST`,body:JSON.stringify(i),headers:{"Content-Type":`application/json; charset=utf-8`},strictErrors:!0}).then(e=>{if(!e.ok)throw Error(r.t(`Intervallo selezionato non disponibile!`));return e.json()}).then(e=>{b(e);let t={date:i.date,slot:i.slot,calendar_id:i.calendar[0],opening_hour_id:i.opening_hour||i.opening_hour_id,meeting_id:e.id};F([...P,t])}).catch(e=>{console.log(e),_.default.fire({title:``,html:`<p>`+e+`</p>`,icon:`error`,cancelButtonText:r.t(`Chiudi`),showCancelButton:!0,showConfirmButton:!1})})},ue=()=>{x&&(le(),ee(!M))},de=()=>(0,k.jsx)(`span`,{children:r.t(`Tempo prenotazione scaduto!`)}),fe=({minutes:e,seconds:t,completed:n})=>n?(0,k.jsx)(de,{}):(0,k.jsx)(`div`,{children:(0,k.jsxs)(`div`,{children:[` `,(0,k.jsxs)(`span`,{children:[` `,(0,k.jsxs)(`i`,{children:[r.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`),`:`]}),` `,(0,k.jsxs)(`b`,{children:[e,` `,r.t(`minuti`),` `,t,` `,r.t(`secondi`)]})]})]})}),pe=t=>{if(t===null||t===``)n(``);else if(Array.isArray(t)&&t.length>0){let t=[];P.map(e=>{t.push({date:(0,h.default)(e.date,`DD-MM-YYYY`).format(`YYYY-MM-DD`),slot:e.slot,calendar_id:e.calendar_id||e.calendar[0],meeting_id:e.meeting_id,opening_hour_id:e.opening_hour||e.opening_hour_id})}),e.multiple?n(t):n(t[0])}else n(``)},me=()=>{f(!0),b(null),w(null),pe(null)},V=()=>{if(r.language===`it`)return Pe;if(r.language===`en`)return Te;if(r.language===`de`)return ye};(0,d.useEffect)(()=>{pe(P)},[P]),(0,d.useEffect)(()=>{document.querySelector(`.formio-read-only`)&&I===!1?(L(!0),setTimeout(()=>{B()},1e3)):(L(!1),setTimeout(()=>{B()},1e3))},[]);let he=(e,t)=>{let n=`${N()}/api/meetings/${t.meeting_id}`;fetch(n,{method:`DELETE`,headers:{"Content-Type":`application/json; charset=utf-8`,Authorization:`Bearer ${W(`auth-token`)}`},strictErrors:!0}).then(t=>{t&&t.status>400?_.default.fire({title:``,html:`<p>${r.t(`Ci sono stati degli errori durante la cancellazione dello slot`)}</p>`,icon:`error`,cancelButtonText:r.t(`Chiudi`),showCancelButton:!0,showConfirmButton:!1}):(F([...P.slice(0,e),...P.slice(e+1)]),te(new Date))})};return(0,k.jsxs)(k.Fragment,{children:[I&&A?(0,k.jsxs)(`div`,{className:`my-5 mx-2 d-print-block d-preview-calendar d-preview-calendar-none`,children:[(0,k.jsxs)(`b`,{children:[Array.isArray(A)&&A.length>1?r.t(`Giorni selezionati per la prenotazione`):r.t(`Giorno selezionato per la prenotazione`),`:`]}),(0,k.jsx)(`div`,{className:`mb-5`,children:(0,k.jsx)(`div`,{className:`it-list-wrapper`,children:(0,k.jsx)(`ul`,{className:`it-list`,children:Array.isArray(A)?A.map(e=>(0,k.jsx)(Ke,{day:(0,h.default)(e.date,`DD-MM-YYYY`).format(`DD/MM/YYYY`),i18next:r,slot:e.slot})):(0,k.jsx)(Ke,{day:(0,v.default)(A.date).format(`DD/MM/YYYY`),i18next:r,slot:A.slot})})})})]}):(0,k.jsx)(`div`,{className:`slot-calendar `,children:(0,k.jsxs)(`div`,{className:`row`,children:[e.multiple?(0,k.jsx)(`div`,{className:`col-12 d-print-none d-preview-calendar-none`,children:(0,k.jsxs)(`div`,{className:`m-2`,children:[(0,k.jsx)(`h6`,{children:r.t(e.label)}),(0,k.jsx)(p.DayPicker,{mode:`single`,selected:i,locale:V(),disabled:o,onMonthChange:oe,onDayClick:se})]})}):P.length===1?null:(0,k.jsx)(`div`,{className:`col-12 d-print-none d-preview-calendar-none`,children:(0,k.jsxs)(`div`,{className:`m-2`,children:[(0,k.jsx)(`h6`,{children:r.t(e.label)}),(0,k.jsx)(p.DayPicker,{mode:`single`,selected:i,locale:V(),disabled:o,onMonthChange:oe,onDayClick:se})]})}),(0,k.jsx)(`div`,{className:`col-12`,children:P.length?(0,k.jsx)(`div`,{className:`row m-2`,children:(0,k.jsxs)(`div`,{className:`col-12 mb-4`,children:[(0,k.jsxs)(`b`,{children:[P.length>1?r.t(`Giorni selezionati per la prenotazione`):r.t(`Giorno selezionato per la prenotazione`),`:`,` `]}),(0,k.jsx)(`div`,{className:`mb-5`,children:(0,k.jsx)(`div`,{className:`it-list-wrapper`,children:(0,k.jsx)(`ul`,{className:`it-list`,children:P.map((e,t)=>(0,k.jsx)(`li`,{children:(0,k.jsx)(`div`,{className:`list-item`,children:(0,k.jsxs)(`div`,{className:`it-right-zone`,children:[(0,k.jsxs)(`span`,{className:`text pl-4`,children:[e.date,` `,x||e.slot?`${r.t(`alle`)} ${e.slot}`:``]}),(0,k.jsx)(g.Icon,{icon:`it-delete`,onClick:()=>he(t,e),role:`button`})]})})},`li`+t))})})}),y?(0,k.jsx)(g.Alert,{color:`info`,defaultValue:`string`,className:`d-print-none d-preview-calendar-none`,children:(0,k.jsx)(m.default,{date:y.expiration_time,renderer:fe})}):null]})}):null})]})}),(0,k.jsxs)(g.Modal,{isOpen:M,toggle:()=>ee(!M),labelledBy:`daySelected`,size:`lg`,centered:!0,container:K(),children:[(0,k.jsx)(g.ModalHeader,{toggle:()=>ee(!M),id:`daySelected`,children:r.t(`Seleziona una fascia oraria`)}),(0,k.jsx)(g.ModalBody,{children:(0,k.jsxs)(`div`,{className:`row`,children:[P.length>=1?(0,k.jsxs)(`div`,{children:[C&&!u?(0,k.jsxs)(`h6`,{children:[r.t(`Orari disponibili del`),` `,(0,v.default)(C).format(`DD/MM/YYYY`)]}):null,(0,k.jsxs)(`div`,{className:`calendar-last-selection col-12 pt-2 mb-5`,children:[(0,k.jsx)(`small`,{className:`pl-2 mb-2 d-flex px-2`,children:(0,k.jsxs)(`b`,{children:[(0,k.jsx)(g.Icon,{icon:`it-clock`,className:`mr-1`,size:`sm`}),` `,r.t(`Ultimo orario selezionato`)]})}),(0,k.jsx)(`div`,{className:`col-6 px-2`,children:(0,k.jsx)(`button`,{type:`button`,id:`slot-last-selection`,onClick:ce,tabIndex:`1`,className:T===`slot-last-selection`?`active btn btn-slot p-0`:`btn btn-slot p-0`,"data-date":(0,h.default)(C,`DD/MM/YYYY`).format(`YYYY-MM-DD`),"data-slots":P[P.length-1].slot,"data-opening_hour":P[P.length-1].opening_hour_id,"data-start":P[P.length-1].slot.split(`-`)[0],"data-end":P[P.length-1].slot.split(`-`)[1],"data-value_start":P[P.length-1].slot.split(`-`)[0],"data-value_end":P[P.length-1].slot.split(`-`)[1],disabled:u,children:P[P.length-1].slot})})]})]}):null,(0,k.jsx)(`div`,{children:C&&P.length>=1?(0,k.jsx)(`h6`,{children:r.t(`Seleziona altri orari`)}):u?null:(0,k.jsxs)(`h6`,{children:[r.t(`Orari disponibili del`),` `,(0,v.default)(C).format(`DD/MM/YYYY`)]})}),c.map((e,t)=>(0,k.jsx)(`div`,{className:`col-6`,children:(0,k.jsxs)(`button`,{type:`button`,id:`slot-`+t,onClick:ce,ref:R,className:T===`slot-`+t?`active btn btn-slot p-0`:`btn btn-slot p-0`,tabIndex:`1`,"data-date":e.date,"data-start":e.start_time,"data-end":e.end_time,"data-value_start":e.start_time,"data-value_end":e.end_time,"data-slots":e.start_time+`-`+e.end_time,"data-opening_hour":e.opening_hour,"data-min_duration":e.min_duration,disabled:e.slots_available==0,children:[e.start_time,` - `,e.end_time]})},`slot-`+t)),u?(0,k.jsxs)(`div`,{className:`callout callout-highlight warning`,children:[(0,k.jsxs)(`div`,{className:`callout-title`,children:[(0,k.jsx)(g.Icon,{"aria-hidden":!0,icon:`it-help-circle`}),r.t(`Attenzione`)]}),(0,k.jsxs)(`p`,{children:[` `,r.t(`Non è possibile prenotare per la data selezionata`),`.`]})]}):null]})}),(0,k.jsx)(g.ModalFooter,{children:(0,k.jsx)(g.Button,{color:`primary`,onClick:()=>ue(),disabled:!C||!x?.value_start,children:r.t(`Conferma`)})})]})]})},Je=class e extends q{constructor(e,t,n){super(e,t,n)}static get builderInfo(){return{title:`Calendar`,group:`basic`,icon:`bi bi-calendar-plus`,documentation:``,weight:70,schema:e.schema()}}static schema(){return q.schema({type:`calendar`})}static editForm=Ge;attach(e){return super.attach(e).then(()=>{this.loadRefs(this.element,{[`react-${this.id}`]:`single`});let e=this.refs[`react-${this.id}`];return e?(this.rootComponent=(0,u.createRoot)(e),this.rootComponent.render((0,k.jsx)(qe,{component:this.component,value:this.dataValue,onChange:e=>this.setValue(e),...this,current:this})),this):this})}detach(){return this.rootComponent&&=(this.rootComponent.unmount(),null),super.detach()}setValue(e){if(e)if(Array.isArray(e))this.selectedNextSlots=e,this.updateValue(e),this.shouldSetValue=!0;else if(typeof e==`object`)this.date=e.date,this.slot=e.slot,this.meeting=e.meeting_id,this.meeting_expiration_time=null,this.opening_hour=e.opening_hour_id,this.calendar_id=e.calendar_id,this.updateValue(e),this.shouldSetValue=!0;else{let t=e.replace(`)`,``).replace(` (`,` @ `).replace(/\//g,`-`).split(` @ `),n=t[2].split(`#`);this.date=t[0],this.slot=t[1],this.meeting=n[1],this.meeting_expiration_time=null,this.opening_hour=n.length===3?n[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 e=this.meeting?this.meeting:``,t=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:e,opening_hour_id:t}}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}},Ye=[{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 = '`+N()+`'; data.url = url; value=url;`,key:`url`,type:`hidden`,input:!0,weight:1},{label:`Tipo di visualizazzione`,widget:`choicesjs`,tableView:!0,data:{values:[{label:`calendar`,value:`calendar`},{label:`select`,value:`select`}]},validateWhenHidden:!1,defaultValue:`calendar`,key:`view`,type:`select`,input:!0}];function Xe(...e){return f.Components.baseEditForm([{key:`display`,components:Ye}],...e)}function Ze({day:e,slot:t,i18next:n}){return(0,k.jsx)(`li`,{className:`it-list-item`,children:(0,k.jsx)(`div`,{className:`list-item`,children:(0,k.jsx)(`div`,{className:`it-right-zone`,children:(0,k.jsxs)(`span`,{className:`text-paragraph pl-4`,children:[(0,k.jsx)(`b`,{children:e}),` `,n.t(`alle`),` `,n.t(`ore`),` `,(0,k.jsx)(`b`,{children:t})]})})})})}function Qe(e,t){if(!t||t.length===0)return;let n=t.map(e=>{let t=new Date(e.start);return(new Date(e.end)-t)/6e4}),r=Math.min(...n),i=n.reduce((e,t)=>e+t,0)/n.length,a=0;a=r<=30&&r>15?i*1:r<=15?i*24:i*4,e.setOption(`slotHeight`,a),document.documentElement.style.setProperty(`--slot-height`,`${a}px`)}var $e={AVAILABILITY:{key:`availability_data_cache_`,duration:10},SLOTS:{key:`availability_slots_cache_`,duration:10},SUBMISSION:{key:`submission_cache_`,duration:30}},et=(e,t,n)=>{let r={data:n,timestamp:(0,v.default)().toISOString()};localStorage.setItem(t,JSON.stringify(r))},tt=(e,t)=>{try{let n=localStorage.getItem(t);if(!n)return null;let r=JSON.parse(n),i=(0,v.default)().diff((0,v.default)(r.timestamp),`minutes`);return i>$e[e].duration?(localStorage.removeItem(t),console.log(`⏰ Cache scaduto: ${e}`),null):(console.log(`✅ Cache letto: ${e} (${i} minuti fa)`),r.data)}catch(t){return console.error(`Errore nel leggere il cache (${e}):`,t),null}},nt=(e,...t)=>$e[e].key+btoa(t),rt=`calendar_view_state`,it=`calendar_view_date`,at=(e,t)=>{try{localStorage.setItem(rt,e),localStorage.setItem(it,t||new Date().toISOString())}catch(e){console.error(`Errore nel salvare lo stato della view:`,e)}},ot=()=>{try{let e=localStorage.getItem(rt),t=localStorage.getItem(it);return{viewType:e||`timeGridWeek`,date:t?new Date(t):new Date}}catch(e){return console.error(`Errore nel leggere lo stato della view:`,e),{viewType:`timeGridWeek`,date:new Date}}},J=()=>{try{localStorage.removeItem(rt),localStorage.removeItem(it)}catch(e){console.error(`Errore nel pulire lo stato della view:`,e)}},st=l.Formio.Components.components.field,ct=({component:e,current:t,onChange:n,i18next:r})=>{let[i,a]=(0,d.useState)(null),[o,s]=(0,d.useState)(null),[c,l]=(0,d.useState)([]),[u,f]=(0,d.useState)(!1),[p,m]=(0,d.useState)(!1),[b,x]=(0,d.useState)(null),[S,C]=(0,d.useState)([]),[w,T]=(0,d.useState)([]),[E,D]=(0,d.useState)([]),[O,A]=(0,d.useState)(null),[j,M]=(0,d.useState)(null),[ee,P]=(0,d.useState)(null),F=(0,d.useRef)(null),I=(0,d.useRef)(null);r.language,h.default.locale(r.language),v.default.locale(r.language);function L(e){if(!e||e.length===0)return null;let t=e.map(e=>({start:e.start_time,end:e.end_time}));return{earliestStartTime:t.reduce((e,t)=>t.start<e?t.start:e,t[0].start),latestEndTime:t.reduce((e,t)=>t.end>e?t.end:e,t[0].end)}}function R(e){let t=e.map(e=>(0,h.default)(e.date).isoWeekday()),n=[1,2,3,4,5,6,7].filter(e=>!t.includes(e));n.length>0?I.current.setOption(`hiddenDays`,n):I.current.setOption(`hiddenDays`,[])}function z(e,t,n){let r=new URL(e),i=`${r.pathname.split(`/`).slice(0,4).join(`/`)}/${t}/${n}`;return`${r.origin}${i}${r.search}`}function te(e,t,n){let r=new URL(e),i=`${r.pathname.split(`/`).slice(0,4).join(`/`)}`;return`${r.origin}${i}${r.search}&from_to=${t}&to_date=${n}`}function ne(e,t,n){return`${N()}/api/availabilities/${e}/${t}?calendar_ids=${n}&available=true`}let B=e=>{D([]),T([]),n({}),e&&T(i.filter(t=>t.date.startsWith(e)))},re=async(e,t)=>{let i=JSON.parse(e),a=nt(`SLOTS`,i.date,i.calendar_ids);if(t===`manual`)D([]),P(null),x(null),n({});else{let e=tt(`SLOTS`,a);if(e){D(e);return}}try{let e=await window.FormioHelper.anonymousCall(`availabilities/${i.date}?calendar_ids=${i.calendar_ids}`);et(`SLOTS`,a,e.data),D(e.data)}catch(e){console.error(`Errore nel caricamento degli slot:`,e),_.default.fire({icon:`error`,title:r.t(`Errore`),text:r.t(`Errore nel caricamento degli orari`)})}},ie=e=>{let i=JSON.parse(e),a={status:6,calendar:i.calendar_id,opening_hour:i.opening_hour_id,user:null,email:null,fiscal_code:null,name:` `,phone_number:null,from_time:(0,v.default)(`${i.date}T${i.start_time}`).toISOString(),to_time:(0,v.default)(`${i.date}T${i.end_time}`).toISOString(),user_message:null,reason:null,location:null,motivation_outcome:null,calendar_group_config_id:t?.data?.service_data?.id,calendar_group_office_id:t?.data?.user_group?.id,calendar_group_place_id:t?.data?.place?.id};window.FormioHelper.authenticatedRequest(t?.dataValue?.id?`PATCH`:`POST`,t?.dataValue?.id?`meetings/${t.dataValue.id}`:`meetings`,a).then(e=>{x({day:(0,v.default)(i.date).format(`dddd, DD MMMM YYYY`),startDate:i.start_time,endDate:i.end_time}),n(e?.id?e:e?{...e,id:t.dataValue.id}:t.dataValue.id?{...a,id:t.dataValue.id}:{...a})}).catch(e=>{console.error(e),e.status===400&&e?.response?.data?.type===`validation_error`?_.default.fire({title:``,html:`<p>`+r.t(`Lo slot orario selezionato non è disponibile perché già prenotato Seleziona un altro orario o una data diversa`)+`</p>`,icon:`error`,cancelButtonText:r.t(`Chiudi`),showCancelButton:!0,showConfirmButton:!1}):_.default.fire({title:``,html:`<p>`+e+`</p>`,icon:`error`,cancelButtonText:r.t(`Chiudi`),showCancelButton:!0,showConfirmButton:!1})})},ae=e=>{let t=new Set,n=[];return e.forEach(e=>{let r=(0,v.default)(e.date),i=r.format(`YYYY-MM`);t.has(i)||(t.add(i),n.push({value:i,label:r.format(`MMMM YYYY`).replace(/^\w/,e=>e.toUpperCase())}))}),n},oe=async()=>{let e=t?.root?.data?.place?.merge_availabilities?t?.root?.data?.place?.merged_availabilities_link:null,i=(0,h.default)().format(`YYYY-MM-DD`),o=(0,h.default)().add(1,`month`).format(`YYYY-MM-DD`),s=t?.root?.data?.place?.calendars[0]?.id||null,c=e?te(e,i,o):ne(i,o,s),l=nt(`AVAILABILITY`,c),u=tt(`AVAILABILITY`,l);if(u){a(u),C(ae(u));return}else n({});f(!0);try{let e=await window.FormioHelper.fetchAPIUrlLimit(c);if(f(!1),!e?.length){_.default.fire({icon:`warning`,title:r.t(`warning`),html:r.t(`no_meetings`)});return}et(`AVAILABILITY`,l,e),a(e),C(ae(e))}catch(e){f(!1),console.error(`Errore nel caricamento disponibilità:`,e)}};(0,d.useEffect)(()=>{if(i?.length){let e=t?.dataValue??t?.getValue();if(e?.from_time&&e?.to_time&&!(0,v.default)().isAfter(e?.draft_expiration)){let t=(0,v.default)(e.from_time).format(`YYYY-MM`);A(t),t&&T&&(T(i.filter(e=>e.date.startsWith(t))),M((0,v.default)(e.from_time).format(`YYYY-MM-DD`)))}else e?.draft_expiration&&(0,v.default)().isAfter(e?.draft_expiration)&&_.default.fire({icon:`warning`,title:r.t(`warning`),html:r.t(`expired_meeting`)})}},[i]),(0,d.useEffect)(()=>{let e=t?.dataValue??t?.getValue();if(!S.length||O||e?.from_time||e?.to_time)return;let n=S[0];n&&(A(n.value),B(n.value))},[S,O,t?.dataValue]),(0,d.useEffect)(()=>{if(j&&p===!1){let e=t?.dataValue??t?.getValue();re(JSON.stringify({date:j,calendar_ids:e.calendar.id}))}},[j]);let se=()=>window.innerWidth>768?`timeGridWeek`:`timeGridDay`;(0,d.useEffect)(()=>{let e=()=>{let e=I.current;if(!e)return;let t=se();t!==e.getView().type&&e.setOption(`view`,t)};return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),(0,d.useEffect)(()=>{let e=t?.dataValue??t?.getValue();E?.length&&e?.from_time&&(P((0,v.default)(e.from_time).format(`HH:mm`)+` - `+(0,v.default)(e.to_time).format(`HH:mm`)),x({day:(0,v.default)(e.from_time).format(`dddd D MMM YYYY`),startDate:(0,v.default)(e.from_time).format(`HH:mm`),endDate:(0,v.default)(e.to_time).format(`HH:mm`)}))},[E]);let ce=()=>{let e=ot();I.current=(0,y.createCalendar)(F.current,[y.TimeGrid],{events:[],buttonText:{today:r.t(`Oggi`)},allDaySlot:!1,firstDay:1,date:e.date,slotEventOverlap:!1,view:se(),height:`400px`,views:{timeGridWeek:{allDaySlot:!1,firstDay:1,slotHeight:48},timeGridDay:{allDaySlot:!1,firstDay:1,slotHeight:48}},datesSet:e=>{at(e.view.type,e.start)},eventClick({event:e,el:i}){document.querySelectorAll(`.ec-event`).forEach(e=>{e.classList.remove(`highlighted-event`)}),i.classList.add(`highlighted-event`);let a=new Date(e.start),o=new Date(e.end),s=a.toLocaleDateString(`it-IT`,{weekday:`long`,day:`numeric`,month:`long`,year:`numeric`}),c=a.toLocaleTimeString(`it-IT`,{hour:`2-digit`,minute:`2-digit`}),l=o.toLocaleTimeString(`it-IT`,{hour:`2-digit`,minute:`2-digit`}),u={status:6,calendar:e.extendedProps.calendar_id,opening_hour:e.extendedProps.opening_hour_id,user:null,email:null,fiscal_code:null,name:` `,phone_number:null,from_time:a,to_time:o,user_message:null,reason:null,location:null,motivation_outcome:null,calendar_group_config_id:t?.data?.service_data?.id,calendar_group_office_id:t?.data?.user_group?.id,calendar_group_place_id:t?.data?.place?.id};window.FormioHelper.authenticatedRequest(t?.dataValue?.id?`PATCH`:`POST`,t?.dataValue?.id?`meetings/${t.dataValue.id}`:`meetings`,u).then(e=>{let r;!e||e===``?r={...u,code:null,id:t?.dataValue?.id}:typeof e==`object`&&(r=e),x({day:s,startDate:c,endDate:l}),n(r)}).catch(e=>{console.error(e),e.status===400&&e?.response?.data?.type===`validation_error`?_.default.fire({title:``,html:`<p>`+r.t(`Lo slot orario selezionato non è disponibile perché già prenotato Seleziona un altro orario o una data diversa`)+`</p>`,icon:`error`,cancelButtonText:r.t(`Chiudi`),showCancelButton:!0,showConfirmButton:!1}):_.default.fire({title:``,html:`<p>`+e+`</p>`,icon:`error`,cancelButtonText:r.t(`Chiudi`),showCancelButton:!0,showConfirmButton:!1})})},viewDidMount:le,eventDidMount:e=>{let{event:t,el:n}=e,r=t.extendedProps;n.setAttribute(`data-event-id`,t.id+`-`+r.date+`-`+r.start_time)},loading:e=>{f(e)}})},le=e=>{t?.root?.data?.place&&I.current.setOption(`eventSources`,[{events:ue}])};async function ue(e,n,i){try{I.current.setOption(`events`,[]);let i=(0,h.default)(e.start).format(`YYYY-MM-DD`),a=new Date(e.end);a.setDate(a.getDate()-1);let o=(0,h.default)(a).format(`YYYY-MM-DD`),s=t?.root?.data?.place?.merge_availabilities?t?.root?.data?.place?.merged_availabilities_link:null,c=s?z(s,i,o):ne(i,o,null),l=nt(`AVAILABILITY`,c),u=tt(`AVAILABILITY`,l),d;if(u?(d=u,f(!1)):(d=await window.FormioHelper.fetchAPIUrlLimit(c),et(`AVAILABILITY`,l,d)),!d?.length){n([]),_.default.fire({icon:`warning`,title:r.t(`warning`),html:r.t(`no_meetings`)});return}let p=d.map(e=>({id:e.opening_hour_id,allDay:!1,start:`${e.date}T${e.start_time}:00`,end:`${e.date}T${e.end_time}:00`,title:`${e.start_time} - ${e.end_time}`,editable:!1,display:`auto`,color:`#ebeef0`,textColor:`#000`,className:`event-slot`,extendedProps:{...e}})),m=L(d);I.current.setOption(`slotMinTime`,m.earliestStartTime),I.current.setOption(`slotMaxTime`,m.latestEndTime),R(d),Qe(I.current,p),n(p),setTimeout(()=>{de(p)},500)}catch(e){console.error(`Errore nel caricamento disponibilità:`,e),i?.(e)}}(0,d.useEffect)(()=>{let i,a=!1;async function o(){try{if(await window.FormioInstance?.formReady,a)return;if(!F.current){console.warn(`Elemento calendario non trovato`);return}let i=t?.dataValue??t?.getValue();i&&i?.draft_expiration&&(0,v.default)().isAfter(i.draft_expiration)&&(n({}),J()),t?.data?.service_data?.view_type===`calendar`||e.view===`calendar`?I?.current||ce():t?.data?.service_data?.view_type===`select`||e.view===`select`?oe():alert(r.t(`Il componente non è configurato per la visualizzazione a calendario`))}catch(e){console.error(`Errore durante l'inizializzazione del calendario:`,e)}}return i=setTimeout(o,500),()=>{a=!0,i&&clearTimeout(i),I.current&&=(F.current?.destroy?.(),null)}},[t?.root?.data?.place]);function de(e){let n=t?.dataValue;if(!n?.from_time)return;let r=(0,v.default)(n.from_time).format(`DD-MM-YYYY HH:mm`),i=(0,v.default)(n.to_time).format(`DD-MM-YYYY HH:mm`),a=e.find(e=>(0,v.default)(e.start).format(`DD-MM-YYYY HH:mm`)===r&&(0,v.default)(e.end).format(`DD-MM-YYYY HH:mm`)===i);if(!a)return;let o=document.querySelector(`.ec-event[data-event-id="${a.id}-${(0,v.default)(n?.from_time).format(`YYYY-MM-DD`)}-${(0,v.default)(n?.from_time).format(`HH:mm`)}"]`);o&&(o.classList.add(`highlighted-event`),o.scrollIntoView({behavior:`smooth`,block:`center`}),x({day:(0,v.default)(n?.from_time).format(`dddd, DD MMMM YYYY`),startDate:(0,v.default)(n?.from_time).format(`HH:mm`),endDate:(0,v.default)(n?.to_time).format(`HH:mm`)}))}return(0,d.useEffect)(()=>{document.querySelector(`.formio-read-only`)&&p===!1?m(!0):(t?.data?.service_data?.view_type===`select`?oe():t?.data?.service_data?.view_type===`calendar`&&ce(),m(!1))},[]),(0,d.useEffect)(()=>{p&&setTimeout(()=>{let e=t?.dataValue??t?.getValue();console.log(`savedValue`,e,p),e&&s(e)},500)},[p]),(0,k.jsx)(k.Fragment,{children:p&&o?(0,k.jsxs)(`div`,{className:`mx-2`,children:[(0,k.jsxs)(`p`,{className:`text-paragraph`,children:[r.t(`Giorno selezionato per la prenotazione`),`:`]}),(0,k.jsx)(`div`,{className:``,children:(0,k.jsx)(`div`,{className:`it-list-wrapper`,children:(0,k.jsx)(`ul`,{className:`it-list`,children:(0,k.jsx)(Ze,{day:(0,v.default)(o.from_time).format(`dddd D MMM YYYY`),i18next:r,slot:`${(0,v.default)(o.from_time).format(`HH:mm`)} - ${(0,v.default)(o.to_time).format(`HH:mm`)}`})})})})]}):(0,k.jsxs)(`div`,{className:``,children:[(0,k.jsx)(`div`,{ref:F}),S.length>0?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(g.Select,{label:`Mese`,id:`selectMonthYear`,onChange:B,children:[(0,k.jsx)(`option`,{value:``,children:r.t(`Scegli un'opzione`)}),S.map(e=>(0,k.jsx)(`option`,{value:e.value,selected:e.value===O,children:e.label},e.value))]}),(0,k.jsxs)(g.Select,{label:`Giorno`,id:`selectDay`,onChange:e=>re(e,`manual`),disabled:w.length===0,children:[(0,k.jsx)(`option`,{value:``,children:r.t(`Scegli un'opzione`)}),w.map(e=>(0,k.jsx)(`option`,{value:JSON.stringify(e),selected:e.date===j,children:(0,v.default)(e.date).format(`dddd,DD MMMM YYYY`)},e.date))]}),(0,k.jsxs)(g.Select,{label:`Orario`,id:`selectSlot`,onChange:ie,disabled:E.length===0,children:[(0,k.jsx)(`option`,{value:``,children:r.t(`Scegli un'opzione`)}),E.map(e=>(0,k.jsx)(`option`,{value:JSON.stringify(e),selected:e.start_time+` - `+e.end_time===ee,children:e.start_time+` - `+e.end_time},e.start_time+` - `+e.end_time))]})]}):null,b?(({day:e,startDate:t,endDate:n})=>(0,k.jsx)(`div`,{className:`mt-3`,children:(0,k.jsxs)(`div`,{className:`row align-items-center gy-3`,children:[(0,k.jsxs)(`div`,{className:`col-12 col-md border-light mx-md-3`,children:[(0,k.jsx)(`div`,{className:`text-paragraph-small`,children:r.t(`Data`)}),(0,k.jsx)(`p`,{className:`data-text`,children:(0,k.jsx)(`strong`,{children:e})})]}),(0,k.jsxs)(`div`,{className:`col-12 col-md border-light mx-md-3`,children:[(0,k.jsx)(`div`,{className:`text-paragraph-small`,children:r.t(`Ora`)}),(0,k.jsx)(`p`,{className:`data-text`,children:(0,k.jsxs)(`strong`,{children:[t,` - `,n]})})]})]})}))({day:b.day,startDate:b.startDate,endDate:b.endDate}):null,u?(0,k.jsx)(`div`,{className:`d-flex align-items-center justify-content-center position-absolute-center`,children:(0,k.jsx)(g.Spinner,{active:!0})}):null]})})},lt=class e extends st{constructor(e,t,n){super(e,t,n)}static get builderInfo(){return{title:`Calendar Advanced`,group:`basic`,icon:`bi bi-calendar-plus`,documentation:``,weight:70,schema:e.schema()}}static schema(){return st.schema({type:`calendar-advanced`})}static editForm=Xe;attach(e,t){return super.attach(e).then(()=>{this.loadRefs(this.element,{[`react-${this.id}`]:`single`});let e=this.refs[`react-${this.id}`];return e?(this.rootComponent&&=(this.rootComponent.unmount(),null),this.rootComponent=(0,u.createRoot)(e),this.builderMode?(this.rootComponent.render((0,k.jsx)(`div`,{className:`my-1 border border-2 border-light rounded p-3 text-secondary`,children:(0,k.jsx)(`div`,{className:`h6 mb-0`,children:this.component?.label||`Calendar Advanced`})})),this):(this.rootComponent.render((0,k.jsx)(ct,{ref:t,component:this.component,value:this.dataValue,onChange:e=>this.setValue(e),...this,current:this})),this)):this})}detach(){return this.rootComponent&&=(this.rootComponent.unmount(),null),super.detach()}setValue(e){e&&(this.updateValue(e),this.shouldSetValue=!0)}getValue(){return this.dataValue}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}},ut=[{key:`defaultValue`,ignore:!0}],dt=[{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`]]}}}],ft=[{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:`{
|
|
80
82
|
"withCredentials": true,
|
|
81
83
|
"headers": {
|
|
82
84
|
"Authorization": "Basic <key>"
|
|
83
85
|
}
|
|
84
|
-
}`,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}],qh=[{key:"unique",ignore:!0},{key:"validateOn",ignore:!0}];function Hh(...o){return Bt.Components.baseEditForm([{key:"display",components:Lh},{key:"data",components:zh},{label:"File",key:"file",weight:5,components:Wh},{key:"validation",components:qh}],...o)}var ta,Pi;function Sn(){if(Pi)return ta;Pi=1;var o=Array.isArray;return ta=o,ta}var ra,Ni;function $h(){if(Ni)return ra;Ni=1;var o=typeof mr=="object"&&mr&&mr.Object===Object&&mr;return ra=o,ra}var aa,Ri;function Mn(){if(Ri)return aa;Ri=1;var o=$h(),s=typeof self=="object"&&self&&self.Object===Object&&self,u=o||s||Function("return this")();return aa=u,aa}var na,Ei;function xn(){if(Ei)return na;Ei=1;var o=Mn(),s=o.Symbol;return na=s,na}var ia,Ai;function Bh(){if(Ai)return ia;Ai=1;var o=xn(),s=Object.prototype,u=s.hasOwnProperty,i=s.toString,b=o?o.toStringTag:void 0;function M(I){var l=u.call(I,b),y=I[b];try{I[b]=void 0;var r=!0}catch{}var c=i.call(I);return r&&(l?I[b]=y:delete I[b]),c}return ia=M,ia}var sa,Ii;function Uh(){if(Ii)return sa;Ii=1;var o=Object.prototype,s=o.toString;function u(i){return s.call(i)}return sa=u,sa}var oa,Fi;function Ks(){if(Fi)return oa;Fi=1;var o=xn(),s=Bh(),u=Uh(),i="[object Null]",b="[object Undefined]",M=o?o.toStringTag:void 0;function I(l){return l==null?l===void 0?b:i:M&&M in Object(l)?s(l):u(l)}return oa=I,oa}var la,Vi;function Gh(){if(Vi)return la;Vi=1;function o(s){return s!=null&&typeof s=="object"}return la=o,la}var ua,zi;function Dn(){if(zi)return ua;zi=1;var o=Ks(),s=Gh(),u="[object Symbol]";function i(b){return typeof b=="symbol"||s(b)&&o(b)==u}return ua=i,ua}var ca,Li;function Jh(){if(Li)return ca;Li=1;var o=Sn(),s=Dn(),u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;function b(M,I){if(o(M))return!1;var l=typeof M;return l=="number"||l=="symbol"||l=="boolean"||M==null||s(M)?!0:i.test(M)||!u.test(M)||I!=null&&M in Object(I)}return ca=b,ca}var da,Wi;function kn(){if(Wi)return da;Wi=1;function o(s){var u=typeof s;return s!=null&&(u=="object"||u=="function")}return da=o,da}var ha,qi;function Kh(){if(qi)return ha;qi=1;var o=Ks(),s=kn(),u="[object AsyncFunction]",i="[object Function]",b="[object GeneratorFunction]",M="[object Proxy]";function I(l){if(!s(l))return!1;var y=o(l);return y==i||y==b||y==u||y==M}return ha=I,ha}var fa,Hi;function Xh(){if(Hi)return fa;Hi=1;var o=Mn(),s=o["__core-js_shared__"];return fa=s,fa}var ma,$i;function Zh(){if($i)return ma;$i=1;var o=Xh(),s=(function(){var i=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})();function u(i){return!!s&&s in i}return ma=u,ma}var pa,Bi;function Qh(){if(Bi)return pa;Bi=1;var o=Function.prototype,s=o.toString;function u(i){if(i!=null){try{return s.call(i)}catch{}try{return i+""}catch{}}return""}return pa=u,pa}var ga,Ui;function ef(){if(Ui)return ga;Ui=1;var o=Kh(),s=Zh(),u=kn(),i=Qh(),b=/[\\^$.*+?()[\]{}|]/g,M=/^\[object .+?Constructor\]$/,I=Function.prototype,l=Object.prototype,y=I.toString,r=l.hasOwnProperty,c=RegExp("^"+y.call(r).replace(b,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(f){if(!u(f)||s(f))return!1;var p=o(f)?c:M;return p.test(i(f))}return ga=h,ga}var va,Gi;function tf(){if(Gi)return va;Gi=1;function o(s,u){return s?.[u]}return va=o,va}var ya,Ji;function On(){if(Ji)return ya;Ji=1;var o=ef(),s=tf();function u(i,b){var M=s(i,b);return o(M)?M:void 0}return ya=u,ya}var _a,Ki;function xr(){if(Ki)return _a;Ki=1;var o=On(),s=o(Object,"create");return _a=s,_a}var ba,Xi;function rf(){if(Xi)return ba;Xi=1;var o=xr();function s(){this.__data__=o?o(null):{},this.size=0}return ba=s,ba}var wa,Zi;function af(){if(Zi)return wa;Zi=1;function o(s){var u=this.has(s)&&delete this.__data__[s];return this.size-=u?1:0,u}return wa=o,wa}var Sa,Qi;function nf(){if(Qi)return Sa;Qi=1;var o=xr(),s="__lodash_hash_undefined__",u=Object.prototype,i=u.hasOwnProperty;function b(M){var I=this.__data__;if(o){var l=I[M];return l===s?void 0:l}return i.call(I,M)?I[M]:void 0}return Sa=b,Sa}var Ma,es;function sf(){if(es)return Ma;es=1;var o=xr(),s=Object.prototype,u=s.hasOwnProperty;function i(b){var M=this.__data__;return o?M[b]!==void 0:u.call(M,b)}return Ma=i,Ma}var xa,ts;function of(){if(ts)return xa;ts=1;var o=xr(),s="__lodash_hash_undefined__";function u(i,b){var M=this.__data__;return this.size+=this.has(i)?0:1,M[i]=o&&b===void 0?s:b,this}return xa=u,xa}var Da,rs;function lf(){if(rs)return Da;rs=1;var o=rf(),s=af(),u=nf(),i=sf(),b=of();function M(I){var l=-1,y=I==null?0:I.length;for(this.clear();++l<y;){var r=I[l];this.set(r[0],r[1])}}return M.prototype.clear=o,M.prototype.delete=s,M.prototype.get=u,M.prototype.has=i,M.prototype.set=b,Da=M,Da}var ka,as;function uf(){if(as)return ka;as=1;function o(){this.__data__=[],this.size=0}return ka=o,ka}var Oa,ns;function Xs(){if(ns)return Oa;ns=1;function o(s,u){return s===u||s!==s&&u!==u}return Oa=o,Oa}var Ca,is;function Dr(){if(is)return Ca;is=1;var o=Xs();function s(u,i){for(var b=u.length;b--;)if(o(u[b][0],i))return b;return-1}return Ca=s,Ca}var Ya,ss;function cf(){if(ss)return Ya;ss=1;var o=Dr(),s=Array.prototype,u=s.splice;function i(b){var M=this.__data__,I=o(M,b);if(I<0)return!1;var l=M.length-1;return I==l?M.pop():u.call(M,I,1),--this.size,!0}return Ya=i,Ya}var ja,os;function df(){if(os)return ja;os=1;var o=Dr();function s(u){var i=this.__data__,b=o(i,u);return b<0?void 0:i[b][1]}return ja=s,ja}var Ta,ls;function hf(){if(ls)return Ta;ls=1;var o=Dr();function s(u){return o(this.__data__,u)>-1}return Ta=s,Ta}var Pa,us;function ff(){if(us)return Pa;us=1;var o=Dr();function s(u,i){var b=this.__data__,M=o(b,u);return M<0?(++this.size,b.push([u,i])):b[M][1]=i,this}return Pa=s,Pa}var Na,cs;function mf(){if(cs)return Na;cs=1;var o=uf(),s=cf(),u=df(),i=hf(),b=ff();function M(I){var l=-1,y=I==null?0:I.length;for(this.clear();++l<y;){var r=I[l];this.set(r[0],r[1])}}return M.prototype.clear=o,M.prototype.delete=s,M.prototype.get=u,M.prototype.has=i,M.prototype.set=b,Na=M,Na}var Ra,ds;function pf(){if(ds)return Ra;ds=1;var o=On(),s=Mn(),u=o(s,"Map");return Ra=u,Ra}var Ea,hs;function gf(){if(hs)return Ea;hs=1;var o=lf(),s=mf(),u=pf();function i(){this.size=0,this.__data__={hash:new o,map:new(u||s),string:new o}}return Ea=i,Ea}var Aa,fs;function vf(){if(fs)return Aa;fs=1;function o(s){var u=typeof s;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?s!=="__proto__":s===null}return Aa=o,Aa}var Ia,ms;function kr(){if(ms)return Ia;ms=1;var o=vf();function s(u,i){var b=u.__data__;return o(i)?b[typeof i=="string"?"string":"hash"]:b.map}return Ia=s,Ia}var Fa,ps;function yf(){if(ps)return Fa;ps=1;var o=kr();function s(u){var i=o(this,u).delete(u);return this.size-=i?1:0,i}return Fa=s,Fa}var Va,gs;function _f(){if(gs)return Va;gs=1;var o=kr();function s(u){return o(this,u).get(u)}return Va=s,Va}var za,vs;function bf(){if(vs)return za;vs=1;var o=kr();function s(u){return o(this,u).has(u)}return za=s,za}var La,ys;function wf(){if(ys)return La;ys=1;var o=kr();function s(u,i){var b=o(this,u),M=b.size;return b.set(u,i),this.size+=b.size==M?0:1,this}return La=s,La}var Wa,_s;function Sf(){if(_s)return Wa;_s=1;var o=gf(),s=yf(),u=_f(),i=bf(),b=wf();function M(I){var l=-1,y=I==null?0:I.length;for(this.clear();++l<y;){var r=I[l];this.set(r[0],r[1])}}return M.prototype.clear=o,M.prototype.delete=s,M.prototype.get=u,M.prototype.has=i,M.prototype.set=b,Wa=M,Wa}var qa,bs;function Mf(){if(bs)return qa;bs=1;var o=Sf(),s="Expected a function";function u(i,b){if(typeof i!="function"||b!=null&&typeof b!="function")throw new TypeError(s);var M=function(){var I=arguments,l=b?b.apply(this,I):I[0],y=M.cache;if(y.has(l))return y.get(l);var r=i.apply(this,I);return M.cache=y.set(l,r)||y,r};return M.cache=new(u.Cache||o),M}return u.Cache=o,qa=u,qa}var Ha,ws;function xf(){if(ws)return Ha;ws=1;var o=Mf(),s=500;function u(i){var b=o(i,function(I){return M.size===s&&M.clear(),I}),M=b.cache;return b}return Ha=u,Ha}var $a,Ss;function Df(){if(Ss)return $a;Ss=1;var o=xf(),s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g,i=o(function(b){var M=[];return b.charCodeAt(0)===46&&M.push(""),b.replace(s,function(I,l,y,r){M.push(y?r.replace(u,"$1"):l||I)}),M});return $a=i,$a}var Ba,Ms;function kf(){if(Ms)return Ba;Ms=1;function o(s,u){for(var i=-1,b=s==null?0:s.length,M=Array(b);++i<b;)M[i]=u(s[i],i,s);return M}return Ba=o,Ba}var Ua,xs;function Of(){if(xs)return Ua;xs=1;var o=xn(),s=kf(),u=Sn(),i=Dn(),b=o?o.prototype:void 0,M=b?b.toString:void 0;function I(l){if(typeof l=="string")return l;if(u(l))return s(l,I)+"";if(i(l))return M?M.call(l):"";var y=l+"";return y=="0"&&1/l==-1/0?"-0":y}return Ua=I,Ua}var Ga,Ds;function Cf(){if(Ds)return Ga;Ds=1;var o=Of();function s(u){return u==null?"":o(u)}return Ga=s,Ga}var Ja,ks;function Zs(){if(ks)return Ja;ks=1;var o=Sn(),s=Jh(),u=Df(),i=Cf();function b(M,I){return o(M)?M:s(M,I)?[M]:u(i(M))}return Ja=b,Ja}var Ka,Os;function Qs(){if(Os)return Ka;Os=1;var o=Dn();function s(u){if(typeof u=="string"||o(u))return u;var i=u+"";return i=="0"&&1/u==-1/0?"-0":i}return Ka=s,Ka}var Xa,Cs;function Yf(){if(Cs)return Xa;Cs=1;var o=Zs(),s=Qs();function u(i,b){b=o(b,i);for(var M=0,I=b.length;i!=null&&M<I;)i=i[s(b[M++])];return M&&M==I?i:void 0}return Xa=u,Xa}var Za,Ys;function jf(){if(Ys)return Za;Ys=1;var o=Yf();function s(u,i,b){var M=u==null?void 0:o(u,i);return M===void 0?b:M}return Za=s,Za}var Tf=jf();const Qa=gn(Tf);var en,js;function Pf(){if(js)return en;js=1;var o=On(),s=(function(){try{var u=o(Object,"defineProperty");return u({},"",{}),u}catch{}})();return en=s,en}var tn,Ts;function Nf(){if(Ts)return tn;Ts=1;var o=Pf();function s(u,i,b){i=="__proto__"&&o?o(u,i,{configurable:!0,enumerable:!0,value:b,writable:!0}):u[i]=b}return tn=s,tn}var rn,Ps;function Rf(){if(Ps)return rn;Ps=1;var o=Nf(),s=Xs(),u=Object.prototype,i=u.hasOwnProperty;function b(M,I,l){var y=M[I];(!(i.call(M,I)&&s(y,l))||l===void 0&&!(I in M))&&o(M,I,l)}return rn=b,rn}var an,Ns;function Ef(){if(Ns)return an;Ns=1;var o=9007199254740991,s=/^(?:0|[1-9]\d*)$/;function u(i,b){var M=typeof i;return b=b??o,!!b&&(M=="number"||M!="symbol"&&s.test(i))&&i>-1&&i%1==0&&i<b}return an=u,an}var nn,Rs;function Af(){if(Rs)return nn;Rs=1;var o=Rf(),s=Zs(),u=Ef(),i=kn(),b=Qs();function M(I,l,y,r){if(!i(I))return I;l=s(l,I);for(var c=-1,h=l.length,f=h-1,p=I;p!=null&&++c<h;){var g=b(l[c]),C=y;if(g==="__proto__"||g==="constructor"||g==="prototype")return I;if(c!=f){var _=p[g];C=r?r(_,g,p):void 0,C===void 0&&(C=i(_)?_:u(l[c+1])?[]:{})}o(p,g,C),p=p[g]}return I}return nn=M,nn}var sn,Es;function If(){if(Es)return sn;Es=1;var o=Af();function s(u,i,b){return u==null?u:o(u,i,b)}return sn=s,sn}var Ff=If();const on=gn(Ff);document.documentElement.lang.toString();class Vf{constructor(){this.token=null,this.basePath=null,this.init()}init(){this.token=null,this.basePath=Ee()}async getSessionAuthToken(){let s=this;await $t.get(s.basePath+"/api/session-auth").then(u=>{s.token=u.data.token}).catch(u=>{He.fire("'error_message_detail","'auth_error'","error")})}getSessionAuthTokenPromise(){let s=this;return new Promise(async(u,i)=>{tr("auth-token")?u({token:tr("auth-token")}):await $t.get(s.basePath+"/api/session-auth?with-cookie=true",{withCredentials:!0,headers:{"Content-Type":"application/json; charset=utf-8"}}).then(b=>{const M=Cc.jwtDecode(b.data.token);M.exp&&Ch("auth-token",b.data.token,M.exp)}).catch(b=>{console.log(b)})})}getToken(){return this.token}execAuthenticatedCall(s){this.token?s(this.token):this.getSessionAuthTokenPromise().then(u=>{this.token=u.token,s(this.token)})}}const ln=Ct.Formio.Components.components.file;let mn=null;document.querySelector("widget-formio")!==null&&(mn=document.querySelector("widget-formio").getAttribute("signature-check-ws-url"));const zf=({component:o,current:s,onChange:u,i18next:i})=>{const[b,M]=G.useState([]),[I,l]=G.useState(new Map),[y,r]=G.useState(!1),c=new Vf;G.useEffect(()=>{c.getSessionAuthTokenPromise()},[]);const h=(S,x)=>{l(V=>{const E=new Map(V);return E.set(S,{...x,progress:Number(x?.progress)||0}),E})};function f(S){return S.size>(v(o.fileMaxSize)||v("1GB"))?{code:"size-files",message:`${i.t("I file non possono superare le dimensioni di")} ${o.fileMaxSize?o.fileMaxSize:"1GB"}`}:b.length>=(o.maxFiles?parseInt(o.maxFiles):o.multiple?100:1)?{code:"too-many-files",message:`${i.t("Puoi caricare massimo ")} ${o.maxFiles||100} ${i.t("file")}`}:S.size<v(o.fileMinSize)?{code:"file-too-small",message:`${i.t("I file devono avare una dimensione superiore a ")} ${o.fileMinSize}`}:null}function p(){if(o.filePattern){const x=o.filePattern.split(",").map(V=>V.trim()).filter(Boolean).reduce((V,E)=>{const A=E.startsWith(".")?E:`.${E}`,z=Oc.getType(A);return z&&(V[z]||(V[z]=[]),V[z].push(A)),V},{});return Object.keys(x).length?x:void 0}else return!0}const g=S=>{let x={};return x.originalName=S.originalName?S.originalName:S.name,x.name=S.name,x.url=S.url,x.data=S.data,x.signature_validation=S.signature_validation,x.mime_type=S.mime_type,x.storage="url",x.size=S.size,x},{getRootProps:C,getInputProps:_,fileRejections:k,isDragActive:Y,open:j}=kc.useDropzone({onDrop:S=>{S.map(x=>{O(x).then(V=>{})})},maxFiles:o.maxFiles?parseInt(o.maxFiles)-b.length:o.multiple?100:1,validator:f,accept:p()}),F=S=>{const x=Ee()+"/api/attachments/"+S.data.id;fetch(x,{method:"DELETE",headers:{"Content-Type":"application/json; charset=utf-8",Authorization:`Bearer ${tr("auth-token")}`},strictErrors:!0}).then(()=>{M(V=>{let E=V.filter(A=>A.data.id!==S.data.id);return u(E),E})}).catch(V=>{He.fire({title:"",html:`<p>${i.t("Ci sono stati degli errori durante l'eliminazione del file")}</p>`,icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),console.error(V)})},R=()=>{const S=typeof s?.getCurrentValue=="function"?s.getCurrentValue():s?.dataValue;S?.length>0&&(M(S),setTimeout(()=>{u(S)},100))};G.useEffect(()=>{document.querySelector(".formio-read-only")&&y===!1?(r(!0),setTimeout(()=>{R()},1e3)):(r(!1),setTimeout(()=>{R()},1e3))},[]);async function O(S){let x;const V=Ee()+"/it/upload";let E={mime_type:S.type,name:S.name,original_filename:S.name,protocol_required:o.protocol_required,size:S.size};return await $t.post(V,E,{maxContentLength:1/0,maxBodyLength:1/0}).then(async A=>(x=A.data.id,S.url=Ee()+"/it/allegati/"+x,S.storage="url",S.mime_type=S.type,S.protocol_required=o.protocol_required,S.data={...A.data,baseUrl:Ee()+"/it/allegati/"+x},h(x,S),await $t.put(A.data.uri,S,{onUploadProgress:z=>{let B=Math.round(z.loaded*100/z.total);l(ee=>{const ie=new Map(ee),re=S;return re.progress=parseInt(B),ie.has(x)&&ie.set(x,re),ie})},maxContentLength:1/0,maxBodyLength:1/0,headers:{"Content-Type":"multipart/form-data"}}).then(async z=>{const B=/\\|"/gi,ee=z.headers.etag.replace(B,"")||null;return await $t.put(Ee()+"/it/upload/"+x,{file_hash:ee,check_signature:o.check_signature}).then(async ie=>{l(te=>{const de=new Map(te);return de.delete(x),de});let re=s.dataValue||[],fe=null;if(M(te=>{const de=[...te,g(S)];return fe=de.length-1,u(de),de}),o.check_signature&&ie.data.url&&mn)return await $t.post(mn,{url:ie.data.url,content:null},{headers:{"Content-Type":"application/json"}}).then(te=>{S.signature_validation=te.data.sign,re[fe].signature_validation=te.data.sign}).catch(te=>{re[fe].signature_validation="File validation error: "+te});l(te=>{const de=new Map(te);return de.delete(x),de})}).catch(ie=>{l(re=>{const fe=new Map(re);return fe.delete(x),fe}),console.log(ie),He.fire({title:"",html:`<p>${i.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})}).catch(z=>{l(B=>{const ee=new Map(B);return ee.delete(x),ee}),console.log(z),He.fire({title:"",html:`<p>${i.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})}))).catch(A=>{console.log(A),He.fire({title:"",html:`<p>${i.t("Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!")}</p>`,icon:"error",cancelButtonText:i.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}),l(z=>{const B=new Map(z);return B.delete(x),B})})}function v(S){if(typeof S=="string"){if(S.search(/kb/i)===S.length-2)return parseFloat(S.substring(0,S.length-2)*1024);if(S.search(/mb/i)===S.length-2)return parseFloat(S.substring(0,S.length-2)*1024*1024);if(S.search(/gb/i)===S.length-2)return parseFloat(S.substring(0,S.length-2)*1024*1024*1024);if(S.search(/b/i)===S.length-1||S.search(/s/i)===S.length-1)return parseFloat(S.substring(0,S.length-1));if(S.search(/m/i)===S.length-1)return parseFloat(S.substring(0,S.length-1)*60);if(S.search(/h/i)===S.length-1)return parseFloat(S.substring(0,S.length-1)*3600)}return S}function T(S,x=2){if(!+S)return"0 Bytes";const V=1024,E=x<0?0:x,A=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],z=Math.floor(Math.log(S)/Math.log(V));return`${parseFloat((S/Math.pow(V,z)).toFixed(E))} ${A[z]}`}return s.conditionallyHidden()||s.visible===!1?null:m.jsx(m.Fragment,{children:y?m.jsxs("div",{children:[m.jsxs("label",{className:"col-form-label floating-label",htmlFor:`${o.id}-${o.key}`,children:[o.label,o.validate.required&&m.jsx("span",{className:"text-danger"})]}),m.jsxs("ul",{className:"upload-file-list",children:[b.map((S,x)=>m.jsxs("li",{className:"upload-file success mw-100",children:[m.jsx(ue.Icon,{"aria-hidden":"true",color:"primary",icon:"it-file",title:"Icona file",size:"sm"}),m.jsxs("p",{children:[m.jsx("span",{className:"visually-hidden",children:i.t("File caricato:")}),S.name,m.jsx("span",{className:"upload-file-weight",children:T(S.size)})]})]},S.size+x)),b.length<1&&m.jsxs("li",{className:"upload-file text-secondary mw-100",children:[m.jsx(ue.Icon,{"aria-hidden":"true",color:"light",icon:"it-files",title:"Icona file",size:"sm"}),m.jsx("p",{children:i.t("Nessun elemento")})]})]})]}):m.jsxs(m.Fragment,{children:[o.hideLabel||o.hidden?"":m.jsxs("label",{className:"col-form-label floating-label",htmlFor:`${o.id}-${o.key}`,title:o.tooltip||void 0,children:[o.label,o.validate.required&&m.jsx("span",{className:"text-danger"}),o.tooltip&&m.jsx("i",{tabIndex:0,className:"bi bi-question-circle text-muted ms-1","data-tooltip":o.tooltip,"aria-expanded":"false"})]}),m.jsxs("div",{className:`my-1 border-2 border-light file-uploader-box rounded p-3 text-secondary${Y?" dragover":""}`,style:{border:"dashed"},...C({onClick:S=>S.stopPropagation()}),children:[m.jsx("input",{id:`${o.id}-${o.key}`,"aria-describedby":`file-uploader-description-${o.id}-${o.key}`,..._()}),m.jsxs("div",{className:`upload-dragdrop${Y?" dragover":""}`,children:[m.jsx("div",{className:"ms-1 me-3",children:m.jsx(ue.Icon,{color:"secondary",icon:"it-upload",title:i.t("Carica file"),size:"_sm"})}),m.jsxs("div",{className:"upload-dragdrop-text",children:[m.jsx("div",{className:"h5",id:`file-uploader-description-${o.id}-${o.key}`,children:i.t("Trascina il file per caricarlo")}),m.jsxs("p",{className:"d-inline-flex",children:[i.t("oppure"),m.jsx(ue.Button,{tag:"input",type:"button",value:i.t("selezionalo dal dispositivo"),onClick:j,className:"px-1 py-0 text-decoration-underline primary-color",size:"xs"})]})]})]})]}),m.jsx("div",{dangerouslySetInnerHTML:{__html:Ls.sanitize(o.description||"")}}),m.jsxs("ul",{className:"upload-file-list my-0",children:[b.map((S,x)=>m.jsxs("li",{className:"upload-file success",children:[m.jsx(ue.Icon,{"aria-hidden":"true",color:"primary",icon:"it-file",title:"Icona file",size:"sm"}),m.jsxs("p",{children:[m.jsx("span",{className:"visually-hidden",children:i.t("File caricato:")}),S.name,m.jsx("span",{className:"upload-file-weight",children:T(S.size)})]}),m.jsx(ue.Button,{className:"px-1",onClick:()=>F(S),children:m.jsx(ue.Icon,{title:`${i.t("Elimina file caricato")} ${S.name}`,color:"secondary",icon:"it-delete",className:"ms-auto pointer",size:"sm"})})]},S.size+x)),Array.from(I.entries()).map(([S,x])=>m.jsxs("li",{className:"upload-file success",children:[m.jsx(ue.Icon,{"aria-hidden":"true",color:"primary",icon:"it-file",title:"Icona file",size:"sm"}),m.jsxs("p",{children:[m.jsx("span",{className:"visually-hidden",children:i.t("Caricamento file:")}),x.name,m.jsx("span",{className:"upload-file-weight",children:T(x.size)})]}),m.jsx(ue.Progress,{value:Number(x?.progress)||0})]},S))]}),!!(k&&k.length)&&m.jsx("div",{className:"formio-error-wrapper",children:m.jsx("ul",{className:"formio-errors upload-file-list my-0 ",children:k.map(({file:S,errors:x},V)=>m.jsxs("li",{className:"upload-file error",children:[m.jsxs("div",{className:"upload-file-name-error-wrapper",children:[m.jsx(ue.Icon,{"aria-hidden":"true",color:"error",icon:"it-error",title:"Icona file",size:"sm"}),m.jsxs("p",{className:"text-wrap error",children:[m.jsx("span",{className:"visually-hidden",children:i.t("Errore caricamento file:")}),S.name,m.jsx("span",{className:"upload-file-weight",children:T(S.size)})]})]}),m.jsx("div",{children:x.map(E=>E.code==="file-invalid-type"?m.jsxs("p",{className:"text-wrap ms-0",children:[i.t("I file possono essere di tipo "),o.filePattern]}):E.code==="too-many-files"?m.jsxs("p",{className:"text-wrap ms-0",children:[i.t("Puoi caricare massimo ")," ",o.maxFiles?o.maxFiles:o.multiple?100:1," ",i.t("file")]}):m.jsx("p",{className:"text-wrap ms-0",children:E.message}))})]},S.size+V))})})]})})};class Or extends ln{constructor(s,u,i){super({...s,clearOnHide:!1},u,i),this.reactRef=null,this.lastRenderedVisible=void 0,this.rootComponent=null,this.mountNode=null}static get builderInfo(){return{title:"File Sdc",group:"basic",icon:"bi bi-file-earmark-text",documentation:"",weight:70,schema:Or.schema()}}get emptyValue(){return[]}init(){if(super.init(),this.component?.multiple&&!Array.isArray(this.getCurrentValue())){this.dataValue=[];const s=this.path||this.component?.key;s&&this.rootValue&&on(this.rootValue,s,[])}}static schema(){return ln.schema({type:"sdcfile",modelType:"array"})}static editForm=Hh;getI18next(){return this.i18next&&typeof this.i18next.t=="function"?this.i18next:{language:this.options?.language||document?.documentElement?.lang||"it",t:(s,u)=>this.t(s,u)}}hideFileProcessingLoader(){this.refs?.fileProcessingLoader&&(this.refs.fileProcessingLoader.style.display="none")}renderReact(){if(this.rootComponent){if(this.builderMode){this.rootComponent.render(m.jsx("div",{className:"my-1 border border-2 border-light file-uploader-box rounded p-3 text-secondary",children:m.jsx("div",{className:"upload-dragdrop",children:m.jsx("div",{className:"upload-dragdrop-text",children:m.jsx("div",{className:"h6 mb-0",children:this.component?.label||"File Sdc"})})})}));return}this.rootComponent.render(m.jsx(zf,{component:this.component,current:this,i18next:this.getI18next(),onChange:s=>this.updateValueFromReact(s)}))}}attach(s){const u=super.attach(s);this.hideFileProcessingLoader();const i=`react-${this.id}`;this.loadRefs(s,{[i]:"single"});const b=this.refs[i];return b&&(this.rootComponent&&this.mountNode!==b&&(this.rootComponent.unmount(),this.rootComponent=null),this.rootComponent||(this.rootComponent=Et.createRoot(b)),this.mountNode=b,this.lastRenderedVisible=this.visible,this.renderReact()),u}updateValueFromReact(s,u={modified:!0}){const i=this.normalizeValue(s,u),b=this.updateValue(i,u),M=this.path||this.component?.key;if(M&&this.rootValue){const I=Qa(this.rootValue,M);this.isEqual(I,i)||on(this.rootValue,M,i)}return b}setValue(s,u={}){const i=this.normalizeValue(s,u),b=super.setValue(i,u),M=this.path||this.component?.key;if(M&&this.rootValue){const I=Qa(this.rootValue,M);this.isEqual(I,i)||on(this.rootValue,M,i)}return b}normalizeValue(s,u={}){const i=super.normalizeValue(s,u);return!this.component?.multiple||Array.isArray(i)?i:i==null||i===""?[]:[i]}detach(){return this.hideFileProcessingLoader(),this.rootComponent&&(this.rootComponent.unmount(),this.rootComponent=null),this.mountNode=null,super.detach()}getValue(){return this.getCurrentValue()}get validationValue(){return this.getCurrentValue()}getCurrentValue(){const s=super.getValue(),u=this.path||this.component?.key,i=u&&this.rootValue?Qa(this.rootValue,u):void 0;return this.component?.multiple?Array.isArray(s)&&s.length>0?s:Array.isArray(i)?i:[]:s??i??null}isEmpty(s=this.validationValue){return this.component?.multiple?!Array.isArray(s)||s.length===0:s==null||s===""}checkCondition(s,u){const i=super.checkCondition(s,u),b=this.visible;return this.lastRenderedVisible!==b&&(this.lastRenderedVisible=b,this.renderReact()),i}render(){const s=`<div ref="react-${this.id}"></div>`;return Object.getPrototypeOf(Object.getPrototypeOf(ln.prototype)).render.call(this,s)}}const Lf=[{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 Wf(...o){return Bt.Components.baseEditForm([{key:"display",components:Lf}],...o)}var vr={exports:{}},qf=vr.exports,As;function Hf(){return As||(As=1,(function(o,s){(function(u,i){o.exports=i(G)})(qf,(function(u){return(function(){var i={680:function(l){l.exports=u},8952:function(l,y,r){var c=r(4328),h=r(36),f=TypeError;l.exports=function(p){if(c(p))return p;throw new f(h(p)+" is not a function")}},2096:function(l,y,r){var c=r(2424),h=String,f=TypeError;l.exports=function(p){if(c(p))return p;throw new f("Can't set "+h(p)+" as a prototype")}},4764:function(l,y,r){var c=r(9764).charAt;l.exports=function(h,f,p){return f+(p?c(h,f).length:1)}},6100:function(l,y,r){var c=r(7e3),h=TypeError;l.exports=function(f,p){if(c(p,f))return f;throw new h("Incorrect invocation")}},3951:function(l,y,r){var c=r(1632),h=String,f=TypeError;l.exports=function(p){if(c(p))return p;throw new f(h(p)+" is not an object")}},2504:function(l,y,r){var c=r(4096),h=r(2495),f=r(3556),p=function(g){return function(C,_,k){var Y=c(C),j=f(Y);if(j===0)return!g&&-1;var F,R=h(k,j);if(g&&_!=_){for(;j>R;)if((F=Y[R++])!=F)return!0}else for(;j>R;R++)if((g||R in Y)&&Y[R]===_)return g||R||0;return!g&&-1}};l.exports={includes:p(!0),indexOf:p(!1)}},3364:function(l,y,r){var c=r(8992),h=r(1664),f=r(5712),p=r(4356),g=r(3556),C=r(2568),_=h([].push),k=function(Y){var j=Y===1,F=Y===2,R=Y===3,O=Y===4,v=Y===6,T=Y===7,S=Y===5||v;return function(x,V,E,A){for(var z,B,ee=p(x),ie=f(ee),re=g(ie),fe=c(V,E),te=0,de=A||C,ve=j?de(x,re):F||T?de(x,0):void 0;re>te;te++)if((S||te in ie)&&(B=fe(z=ie[te],te,ee),Y))if(j)ve[te]=B;else if(B)switch(Y){case 3:return!0;case 5:return z;case 6:return te;case 2:_(ve,z)}else switch(Y){case 4:return!1;case 7:_(ve,z)}return v?-1:R||O?O:ve}};l.exports={forEach:k(0),map:k(1),filter:k(2),some:k(3),every:k(4),find:k(5),findIndex:k(6),filterReject:k(7)}},953:function(l,y,r){var c=r(9957),h=r(9972),f=r(8504),p=h("species");l.exports=function(g){return f>=51||!c((function(){var C=[];return(C.constructor={})[p]=function(){return{foo:1}},C[g](Boolean).foo!==1}))}},1496:function(l,y,r){var c=r(9957);l.exports=function(h,f){var p=[][h];return!!p&&c((function(){p.call(null,f||function(){return 1},1)}))}},6728:function(l,y,r){var c=r(3476),h=r(1432),f=TypeError,p=Object.getOwnPropertyDescriptor,g=c&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(C){return C instanceof TypeError}})();l.exports=g?function(C,_){if(h(C)&&!p(C,"length").writable)throw new f("Cannot set read only .length");return C.length=_}:function(C,_){return C.length=_}},6736:function(l,y,r){var c=r(1432),h=r(6072),f=r(1632),p=r(9972)("species"),g=Array;l.exports=function(C){var _;return c(C)&&(_=C.constructor,(h(_)&&(_===g||c(_.prototype))||f(_)&&(_=_[p])===null)&&(_=void 0)),_===void 0?g:_}},2568:function(l,y,r){var c=r(6736);l.exports=function(h,f){return new(c(h))(f===0?0:f)}},8696:function(l,y,r){var c=r(3951),h=r(3112);l.exports=function(f,p,g,C){try{return C?p(c(g)[0],g[1]):p(g)}catch(_){h(f,"throw",_)}}},1888:function(l,y,r){var c=r(1664),h=c({}.toString),f=c("".slice);l.exports=function(p){return f(h(p),8,-1)}},4427:function(l,y,r){var c=r(16),h=r(4328),f=r(1888),p=r(9972)("toStringTag"),g=Object,C=f((function(){return arguments})())==="Arguments";l.exports=c?f:function(_){var k,Y,j;return _===void 0?"Undefined":_===null?"Null":typeof(Y=(function(F,R){try{return F[R]}catch{}})(k=g(_),p))=="string"?Y:C?f(k):(j=f(k))==="Object"&&h(k.callee)?"Arguments":j}},9968:function(l,y,r){var c=r(5152),h=r(9252),f=r(9444),p=r(8352);l.exports=function(g,C,_){for(var k=h(C),Y=p.f,j=f.f,F=0;F<k.length;F++){var R=k[F];c(g,R)||_&&c(_,R)||Y(g,R,j(C,R))}}},2272:function(l,y,r){var c=r(9957);l.exports=!c((function(){function h(){}return h.prototype.constructor=null,Object.getPrototypeOf(new h)!==h.prototype}))},3336:function(l){l.exports=function(y,r){return{value:y,done:r}}},3440:function(l,y,r){var c=r(3476),h=r(8352),f=r(9728);l.exports=c?function(p,g,C){return h.f(p,g,f(1,C))}:function(p,g,C){return p[g]=C,p}},9728:function(l){l.exports=function(y,r){return{enumerable:!(1&y),configurable:!(2&y),writable:!(4&y),value:r}}},92:function(l,y,r){var c=r(3476),h=r(8352),f=r(9728);l.exports=function(p,g,C){c?h.f(p,g,f(0,C)):p[g]=C}},2544:function(l,y,r){var c=r(5312),h=r(8352);l.exports=function(f,p,g){return g.get&&c(g.get,p,{getter:!0}),g.set&&c(g.set,p,{setter:!0}),h.f(f,p,g)}},6076:function(l,y,r){var c=r(4328),h=r(8352),f=r(5312),p=r(4636);l.exports=function(g,C,_,k){k||(k={});var Y=k.enumerable,j=k.name!==void 0?k.name:C;if(c(_)&&f(_,j,k),k.global)Y?g[C]=_:p(C,_);else{try{k.unsafe?g[C]&&(Y=!0):delete g[C]}catch{}Y?g[C]=_:h.f(g,C,{value:_,enumerable:!1,configurable:!k.nonConfigurable,writable:!k.nonWritable})}return g}},4036:function(l,y,r){var c=r(6076);l.exports=function(h,f,p){for(var g in f)c(h,g,f[g],p);return h}},4636:function(l,y,r){var c=r(6420),h=Object.defineProperty;l.exports=function(f,p){try{h(c,f,{value:p,configurable:!0,writable:!0})}catch{c[f]=p}return p}},3476:function(l,y,r){var c=r(9957);l.exports=!c((function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}))},8168:function(l,y,r){var c=r(6420),h=r(1632),f=c.document,p=h(f)&&h(f.createElement);l.exports=function(g){return p?f.createElement(g):{}}},4316:function(l){var y=TypeError;l.exports=function(r){if(r>9007199254740991)throw y("Maximum allowed index exceeded");return r}},6064:function(l){l.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},8504:function(l,y,r){var c,h,f=r(6420),p=r(6064),g=f.process,C=f.Deno,_=g&&g.versions||C&&C.version,k=_&&_.v8;k&&(h=(c=k.split("."))[0]>0&&c[0]<4?1:+(c[0]+c[1])),!h&&p&&(!(c=p.match(/Edge\/(\d+)/))||c[1]>=74)&&(c=p.match(/Chrome\/(\d+)/))&&(h=+c[1]),l.exports=h},8256:function(l){l.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6520:function(l,y,r){var c=r(1664),h=Error,f=c("".replace),p=String(new h("zxcasd").stack),g=/\n\s*at [^:]*:[^\n]*/,C=g.test(p);l.exports=function(_,k){if(C&&typeof _=="string"&&!h.prepareStackTrace)for(;k--;)_=f(_,g,"");return _}},3696:function(l,y,r){var c=r(3440),h=r(6520),f=r(9184),p=Error.captureStackTrace;l.exports=function(g,C,_,k){f&&(p?p(g,C):c(g,"stack",h(_,k)))}},9184:function(l,y,r){var c=r(9957),h=r(9728);l.exports=!c((function(){var f=new Error("a");return!("stack"in f)||(Object.defineProperty(f,"stack",h(1,7)),f.stack!==7)}))},9160:function(l,y,r){var c=r(6420),h=r(9444).f,f=r(3440),p=r(6076),g=r(4636),C=r(9968),_=r(6704);l.exports=function(k,Y){var j,F,R,O,v,T=k.target,S=k.global,x=k.stat;if(j=S?c:x?c[T]||g(T,{}):c[T]&&c[T].prototype)for(F in Y){if(O=Y[F],R=k.dontCallGetSet?(v=h(j,F))&&v.value:j[F],!_(S?F:T+(x?".":"#")+F,k.forced)&&R!==void 0){if(typeof O==typeof R)continue;C(O,R)}(k.sham||R&&R.sham)&&f(O,"sham",!0),p(j,F,O,k)}}},9957:function(l){l.exports=function(y){try{return!!y()}catch{return!0}}},7176:function(l,y,r){r(880);var c=r(8448),h=r(6076),f=r(7680),p=r(9957),g=r(9972),C=r(3440),_=g("species"),k=RegExp.prototype;l.exports=function(Y,j,F,R){var O=g(Y),v=!p((function(){var V={};return V[O]=function(){return 7},""[Y](V)!==7})),T=v&&!p((function(){var V=!1,E=/a/;return Y==="split"&&((E={}).constructor={},E.constructor[_]=function(){return E},E.flags="",E[O]=/./[O]),E.exec=function(){return V=!0,null},E[O](""),!V}));if(!v||!T||F){var S=/./[O],x=j(O,""[Y],(function(V,E,A,z,B){var ee=E.exec;return ee===f||ee===k.exec?v&&!B?{done:!0,value:c(S,E,A,z)}:{done:!0,value:c(V,A,E,z)}:{done:!1}}));h(String.prototype,Y,x[0]),h(k,O,x[1])}R&&C(k[O],"sham",!0)}},908:function(l,y,r){var c=r(7332),h=Function.prototype,f=h.apply,p=h.call;l.exports=typeof Reflect=="object"&&Reflect.apply||(c?p.bind(f):function(){return p.apply(f,arguments)})},8992:function(l,y,r){var c=r(3180),h=r(8952),f=r(7332),p=c(c.bind);l.exports=function(g,C){return h(g),C===void 0?g:f?p(g,C):function(){return g.apply(C,arguments)}}},7332:function(l,y,r){var c=r(9957);l.exports=!c((function(){var h=(function(){}).bind();return typeof h!="function"||h.hasOwnProperty("prototype")}))},8448:function(l,y,r){var c=r(7332),h=Function.prototype.call;l.exports=c?h.bind(h):function(){return h.apply(h,arguments)}},6208:function(l,y,r){var c=r(3476),h=r(5152),f=Function.prototype,p=c&&Object.getOwnPropertyDescriptor,g=h(f,"name"),C=g&&(function(){}).name==="something",_=g&&(!c||c&&p(f,"name").configurable);l.exports={EXISTS:g,PROPER:C,CONFIGURABLE:_}},5288:function(l,y,r){var c=r(1664),h=r(8952);l.exports=function(f,p,g){try{return c(h(Object.getOwnPropertyDescriptor(f,p)[g]))}catch{}}},3180:function(l,y,r){var c=r(1888),h=r(1664);l.exports=function(f){if(c(f)==="Function")return h(f)}},1664:function(l,y,r){var c=r(7332),h=Function.prototype,f=h.call,p=c&&h.bind.bind(f,f);l.exports=c?p:function(g){return function(){return f.apply(g,arguments)}}},5232:function(l,y,r){var c=r(6420),h=r(4328);l.exports=function(f,p){return arguments.length<2?(g=c[f],h(g)?g:void 0):c[f]&&c[f][p];var g}},6752:function(l){l.exports=function(y){return{iterator:y,next:y.next,done:!1}}},4504:function(l,y,r){var c=r(8952),h=r(9760);l.exports=function(f,p){var g=f[p];return h(g)?void 0:c(g)}},6420:function(l,y,r){var c=function(h){return h&&h.Math===Math&&h};l.exports=c(typeof globalThis=="object"&&globalThis)||c(typeof window=="object"&&window)||c(typeof self=="object"&&self)||c(typeof r.g=="object"&&r.g)||c(typeof this=="object"&&this)||(function(){return this})()||Function("return this")()},5152:function(l,y,r){var c=r(1664),h=r(4356),f=c({}.hasOwnProperty);l.exports=Object.hasOwn||function(p,g){return f(h(p),g)}},2560:function(l){l.exports={}},4168:function(l,y,r){var c=r(5232);l.exports=c("document","documentElement")},9888:function(l,y,r){var c=r(3476),h=r(9957),f=r(8168);l.exports=!c&&!h((function(){return Object.defineProperty(f("div"),"a",{get:function(){return 7}}).a!==7}))},5712:function(l,y,r){var c=r(1664),h=r(9957),f=r(1888),p=Object,g=c("".split);l.exports=h((function(){return!p("z").propertyIsEnumerable(0)}))?function(C){return f(C)==="String"?g(C,""):p(C)}:p},7512:function(l,y,r){var c=r(4328),h=r(1632),f=r(4024);l.exports=function(p,g,C){var _,k;return f&&c(_=g.constructor)&&_!==C&&h(k=_.prototype)&&k!==C.prototype&&f(p,k),p}},9112:function(l,y,r){var c=r(1664),h=r(4328),f=r(3976),p=c(Function.toString);h(f.inspectSource)||(f.inspectSource=function(g){return p(g)}),l.exports=f.inspectSource},3480:function(l,y,r){var c=r(1632),h=r(3440);l.exports=function(f,p){c(p)&&"cause"in p&&h(f,"cause",p.cause)}},9104:function(l,y,r){var c,h,f,p=r(4288),g=r(6420),C=r(1632),_=r(3440),k=r(5152),Y=r(3976),j=r(6504),F=r(2560),R="Object already initialized",O=g.TypeError,v=g.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,c=function(x,V){if(T.has(x))throw new O(R);return V.facade=x,T.set(x,V),V},h=function(x){return T.get(x)||{}},f=function(x){return T.has(x)}}else{var S=j("state");F[S]=!0,c=function(x,V){if(k(x,S))throw new O(R);return V.facade=x,_(x,S,V),V},h=function(x){return k(x,S)?x[S]:{}},f=function(x){return k(x,S)}}l.exports={set:c,get:h,has:f,enforce:function(x){return f(x)?h(x):c(x,{})},getterFor:function(x){return function(V){var E;if(!C(V)||(E=h(V)).type!==x)throw new O("Incompatible receiver, "+x+" required");return E}}}},1432:function(l,y,r){var c=r(1888);l.exports=Array.isArray||function(h){return c(h)==="Array"}},4328:function(l){var y=typeof document=="object"&&document.all;l.exports=y===void 0&&y!==void 0?function(r){return typeof r=="function"||r===y}:function(r){return typeof r=="function"}},6072:function(l,y,r){var c=r(1664),h=r(9957),f=r(4328),p=r(4427),g=r(5232),C=r(9112),_=function(){},k=g("Reflect","construct"),Y=/^\s*(?:class|function)\b/,j=c(Y.exec),F=!Y.test(_),R=function(v){if(!f(v))return!1;try{return k(_,[],v),!0}catch{return!1}},O=function(v){if(!f(v))return!1;switch(p(v)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return F||!!j(Y,C(v))}catch{return!0}};O.sham=!0,l.exports=!k||h((function(){var v;return R(R.call)||!R(Object)||!R((function(){v=!0}))||v}))?O:R},6704:function(l,y,r){var c=r(9957),h=r(4328),f=/#|\.prototype\./,p=function(Y,j){var F=C[g(Y)];return F===k||F!==_&&(h(j)?c(j):!!j)},g=p.normalize=function(Y){return String(Y).replace(f,".").toLowerCase()},C=p.data={},_=p.NATIVE="N",k=p.POLYFILL="P";l.exports=p},9760:function(l){l.exports=function(y){return y==null}},1632:function(l,y,r){var c=r(4328);l.exports=function(h){return typeof h=="object"?h!==null:c(h)}},2424:function(l,y,r){var c=r(1632);l.exports=function(h){return c(h)||h===null}},7048:function(l){l.exports=!1},7728:function(l,y,r){var c=r(5232),h=r(4328),f=r(7e3),p=r(6536),g=Object;l.exports=p?function(C){return typeof C=="symbol"}:function(C){var _=c("Symbol");return h(_)&&f(_.prototype,g(C))}},3112:function(l,y,r){var c=r(8448),h=r(3951),f=r(4504);l.exports=function(p,g,C){var _,k;h(p);try{if(!(_=f(p,"return"))){if(g==="throw")throw C;return C}_=c(_,p)}catch(Y){k=!0,_=Y}if(g==="throw")throw C;if(k)throw _;return h(_),C}},9724:function(l,y,r){var c=r(8448),h=r(9368),f=r(3440),p=r(4036),g=r(9972),C=r(9104),_=r(4504),k=r(336).IteratorPrototype,Y=r(3336),j=r(3112),F=g("toStringTag"),R="IteratorHelper",O="WrapForValidIterator",v=C.set,T=function(V){var E=C.getterFor(V?O:R);return p(h(k),{next:function(){var A=E(this);if(V)return A.nextHandler();try{var z=A.done?void 0:A.nextHandler();return Y(z,A.done)}catch(B){throw A.done=!0,B}},return:function(){var A=E(this),z=A.iterator;if(A.done=!0,V){var B=_(z,"return");return B?c(B,z):Y(void 0,!0)}if(A.inner)try{j(A.inner.iterator,"normal")}catch(ee){return j(z,"throw",ee)}return j(z,"normal"),Y(void 0,!0)}})},S=T(!0),x=T(!1);f(x,F,"Iterator Helper"),l.exports=function(V,E){var A=function(z,B){B?(B.iterator=z.iterator,B.next=z.next):B=z,B.type=E?O:R,B.nextHandler=V,B.counter=0,B.done=!1,v(this,B)};return A.prototype=E?S:x,A}},5792:function(l,y,r){var c=r(8448),h=r(8952),f=r(3951),p=r(6752),g=r(9724),C=r(8696),_=g((function(){var k=this.iterator,Y=f(c(this.next,k));if(!(this.done=!!Y.done))return C(k,this.mapper,[Y.value,this.counter++],!0)}));l.exports=function(k){return f(this),h(k),new _(p(this),{mapper:k})}},336:function(l,y,r){var c,h,f,p=r(9957),g=r(4328),C=r(1632),_=r(9368),k=r(7796),Y=r(6076),j=r(9972),F=r(7048),R=j("iterator"),O=!1;[].keys&&("next"in(f=[].keys())?(h=k(k(f)))!==Object.prototype&&(c=h):O=!0),!C(c)||p((function(){var v={};return c[R].call(v)!==v}))?c={}:F&&(c=_(c)),g(c[R])||Y(c,R,(function(){return this})),l.exports={IteratorPrototype:c,BUGGY_SAFARI_ITERATORS:O}},3556:function(l,y,r){var c=r(7584);l.exports=function(h){return c(h.length)}},5312:function(l,y,r){var c=r(1664),h=r(9957),f=r(4328),p=r(5152),g=r(3476),C=r(6208).CONFIGURABLE,_=r(9112),k=r(9104),Y=k.enforce,j=k.get,F=String,R=Object.defineProperty,O=c("".slice),v=c("".replace),T=c([].join),S=g&&!h((function(){return R((function(){}),"length",{value:8}).length!==8})),x=String(String).split("String"),V=l.exports=function(E,A,z){O(F(A),0,7)==="Symbol("&&(A="["+v(F(A),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),z&&z.getter&&(A="get "+A),z&&z.setter&&(A="set "+A),(!p(E,"name")||C&&E.name!==A)&&(g?R(E,"name",{value:A,configurable:!0}):E.name=A),S&&z&&p(z,"arity")&&E.length!==z.arity&&R(E,"length",{value:z.arity});try{z&&p(z,"constructor")&&z.constructor?g&&R(E,"prototype",{writable:!1}):E.prototype&&(E.prototype=void 0)}catch{}var B=Y(E);return p(B,"source")||(B.source=T(x,typeof A=="string"?A:"")),E};Function.prototype.toString=V((function(){return f(this)&&j(this).source||_(this)}),"toString")},1748:function(l){var y=Math.ceil,r=Math.floor;l.exports=Math.trunc||function(c){var h=+c;return(h>0?r:y)(h)}},8948:function(l,y,r){var c=r(5016);l.exports=function(h,f){return h===void 0?arguments.length<2?"":f:c(h)}},9292:function(l,y,r){var c=r(3476),h=r(1664),f=r(8448),p=r(9957),g=r(1531),C=r(9392),_=r(8912),k=r(4356),Y=r(5712),j=Object.assign,F=Object.defineProperty,R=h([].concat);l.exports=!j||p((function(){if(c&&j({b:1},j(F({},"a",{enumerable:!0,get:function(){F(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var O={},v={},T=Symbol("assign detection"),S="abcdefghijklmnopqrst";return O[T]=7,S.split("").forEach((function(x){v[x]=x})),j({},O)[T]!==7||g(j({},v)).join("")!==S}))?function(O,v){for(var T=k(O),S=arguments.length,x=1,V=C.f,E=_.f;S>x;)for(var A,z=Y(arguments[x++]),B=V?R(g(z),V(z)):g(z),ee=B.length,ie=0;ee>ie;)A=B[ie++],c&&!f(E,z,A)||(T[A]=z[A]);return T}:j},9368:function(l,y,r){var c,h=r(3951),f=r(2056),p=r(8256),g=r(2560),C=r(4168),_=r(8168),k=r(6504),Y="prototype",j="script",F=k("IE_PROTO"),R=function(){},O=function(S){return"<"+j+">"+S+"</"+j+">"},v=function(S){S.write(O("")),S.close();var x=S.parentWindow.Object;return S=null,x},T=function(){try{c=new ActiveXObject("htmlfile")}catch{}var S,x,V;T=typeof document<"u"?document.domain&&c?v(c):(x=_("iframe"),V="java"+j+":",x.style.display="none",C.appendChild(x),x.src=String(V),(S=x.contentWindow.document).open(),S.write(O("document.F=Object")),S.close(),S.F):v(c);for(var E=p.length;E--;)delete T[Y][p[E]];return T()};g[F]=!0,l.exports=Object.create||function(S,x){var V;return S!==null?(R[Y]=h(S),V=new R,R[Y]=null,V[F]=S):V=T(),x===void 0?V:f.f(V,x)}},2056:function(l,y,r){var c=r(3476),h=r(1576),f=r(8352),p=r(3951),g=r(4096),C=r(1531);y.f=c&&!h?Object.defineProperties:function(_,k){p(_);for(var Y,j=g(k),F=C(k),R=F.length,O=0;R>O;)f.f(_,Y=F[O++],j[Y]);return _}},8352:function(l,y,r){var c=r(3476),h=r(9888),f=r(1576),p=r(3951),g=r(88),C=TypeError,_=Object.defineProperty,k=Object.getOwnPropertyDescriptor,Y="enumerable",j="configurable",F="writable";y.f=c?f?function(R,O,v){if(p(R),O=g(O),p(v),typeof R=="function"&&O==="prototype"&&"value"in v&&F in v&&!v[F]){var T=k(R,O);T&&T[F]&&(R[O]=v.value,v={configurable:j in v?v[j]:T[j],enumerable:Y in v?v[Y]:T[Y],writable:!1})}return _(R,O,v)}:_:function(R,O,v){if(p(R),O=g(O),p(v),h)try{return _(R,O,v)}catch{}if("get"in v||"set"in v)throw new C("Accessors not supported");return"value"in v&&(R[O]=v.value),R}},9444:function(l,y,r){var c=r(3476),h=r(8448),f=r(8912),p=r(9728),g=r(4096),C=r(88),_=r(5152),k=r(9888),Y=Object.getOwnPropertyDescriptor;y.f=c?Y:function(j,F){if(j=g(j),F=C(F),k)try{return Y(j,F)}catch{}if(_(j,F))return p(!h(f.f,j,F),j[F])}},5048:function(l,y,r){var c=r(9008),h=r(8256).concat("length","prototype");y.f=Object.getOwnPropertyNames||function(f){return c(f,h)}},9392:function(l,y){y.f=Object.getOwnPropertySymbols},7796:function(l,y,r){var c=r(5152),h=r(4328),f=r(4356),p=r(6504),g=r(2272),C=p("IE_PROTO"),_=Object,k=_.prototype;l.exports=g?_.getPrototypeOf:function(Y){var j=f(Y);if(c(j,C))return j[C];var F=j.constructor;return h(F)&&j instanceof F?F.prototype:j instanceof _?k:null}},7e3:function(l,y,r){var c=r(1664);l.exports=c({}.isPrototypeOf)},9008:function(l,y,r){var c=r(1664),h=r(5152),f=r(4096),p=r(2504).indexOf,g=r(2560),C=c([].push);l.exports=function(_,k){var Y,j=f(_),F=0,R=[];for(Y in j)!h(g,Y)&&h(j,Y)&&C(R,Y);for(;k.length>F;)h(j,Y=k[F++])&&(~p(R,Y)||C(R,Y));return R}},1531:function(l,y,r){var c=r(9008),h=r(8256);l.exports=Object.keys||function(f){return c(f,h)}},8912:function(l,y){var r={}.propertyIsEnumerable,c=Object.getOwnPropertyDescriptor,h=c&&!r.call({1:2},1);y.f=h?function(f){var p=c(this,f);return!!p&&p.enumerable}:r},4024:function(l,y,r){var c=r(5288),h=r(3951),f=r(2096);l.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var p,g=!1,C={};try{(p=c(Object.prototype,"__proto__","set"))(C,[]),g=C instanceof Array}catch{}return function(_,k){return h(_),f(k),g?p(_,k):_.__proto__=k,_}})():void 0)},7032:function(l,y,r){var c=r(16),h=r(4427);l.exports=c?{}.toString:function(){return"[object "+h(this)+"]"}},2104:function(l,y,r){var c=r(8448),h=r(4328),f=r(1632),p=TypeError;l.exports=function(g,C){var _,k;if(C==="string"&&h(_=g.toString)&&!f(k=c(_,g))||h(_=g.valueOf)&&!f(k=c(_,g))||C!=="string"&&h(_=g.toString)&&!f(k=c(_,g)))return k;throw new p("Can't convert object to primitive value")}},9252:function(l,y,r){var c=r(5232),h=r(1664),f=r(5048),p=r(9392),g=r(3951),C=h([].concat);l.exports=c("Reflect","ownKeys")||function(_){var k=f.f(g(_)),Y=p.f;return Y?C(k,Y(_)):k}},584:function(l,y,r){var c=r(8352).f;l.exports=function(h,f,p){p in h||c(h,p,{configurable:!0,get:function(){return f[p]},set:function(g){f[p]=g}})}},9092:function(l,y,r){var c=r(8448),h=r(3951),f=r(4328),p=r(1888),g=r(7680),C=TypeError;l.exports=function(_,k){var Y=_.exec;if(f(Y)){var j=c(Y,_,k);return j!==null&&h(j),j}if(p(_)==="RegExp")return c(g,_,k);throw new C("RegExp#exec called on incompatible receiver")}},7680:function(l,y,r){var c,h,f=r(8448),p=r(1664),g=r(5016),C=r(8872),_=r(3548),k=r(4696),Y=r(9368),j=r(9104).get,F=r(8e3),R=r(9124),O=k("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,T=v,S=p("".charAt),x=p("".indexOf),V=p("".replace),E=p("".slice),A=(h=/b*/g,f(v,c=/a/,"a"),f(v,h,"a"),c.lastIndex!==0||h.lastIndex!==0),z=_.BROKEN_CARET,B=/()??/.exec("")[1]!==void 0;(A||B||z||F||R)&&(T=function(ee){var ie,re,fe,te,de,ve,me,oe=this,Z=j(oe),Ne=g(ee),Ie=Z.raw;if(Ie)return Ie.lastIndex=oe.lastIndex,ie=f(T,Ie,Ne),oe.lastIndex=Ie.lastIndex,ie;var Ye=Z.groups,Oe=z&&oe.sticky,$=f(C,oe),J=oe.source,X=0,P=Ne;if(Oe&&($=V($,"y",""),x($,"g")===-1&&($+="g"),P=E(Ne,oe.lastIndex),oe.lastIndex>0&&(!oe.multiline||oe.multiline&&S(Ne,oe.lastIndex-1)!==`
|
|
85
|
-
`)&&(
|
|
86
|
-
`)&&f.flags==="s")}))},9124:function(l,y,r){var c=r(9957),h=r(6420).RegExp;l.exports=c((function(){var f=h("(?<a>b)","g");return f.exec("b").groups.a!=="b"||"b".replace(f,"$<a>c")!=="bc"}))},5436:function(l,y,r){var c=r(9760),h=TypeError;l.exports=function(f){if(c(f))throw new h("Can't call method on "+f);return f}},6504:function(l,y,r){var c=r(4696),h=r(7776),f=c("keys");l.exports=function(p){return f[p]||(f[p]=h(p))}},3976:function(l,y,r){var c=r(7048),h=r(6420),f=r(4636),p="__core-js_shared__",g=l.exports=h[p]||f(p,{});(g.versions||(g.versions=[])).push({version:"3.36.0",mode:c?"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(l,y,r){var c=r(3976);l.exports=function(h,f){return c[h]||(c[h]=f||{})}},9764:function(l,y,r){var c=r(1664),h=r(6180),f=r(5016),p=r(5436),g=c("".charAt),C=c("".charCodeAt),_=c("".slice),k=function(Y){return function(j,F){var R,O,v=f(p(j)),T=h(F),S=v.length;return T<0||T>=S?Y?"":void 0:(R=C(v,T))<55296||R>56319||T+1===S||(O=C(v,T+1))<56320||O>57343?Y?g(v,T):R:Y?_(v,T,T+2):O-56320+(R-55296<<10)+65536}};l.exports={codeAt:k(!1),charAt:k(!0)}},772:function(l,y,r){var c=r(8504),h=r(9957),f=r(6420).String;l.exports=!!Object.getOwnPropertySymbols&&!h((function(){var p=Symbol("symbol detection");return!f(p)||!(Object(p)instanceof Symbol)||!Symbol.sham&&c&&c<41}))},2495:function(l,y,r){var c=r(6180),h=Math.max,f=Math.min;l.exports=function(p,g){var C=c(p);return C<0?h(C+g,0):f(C,g)}},4096:function(l,y,r){var c=r(5712),h=r(5436);l.exports=function(f){return c(h(f))}},6180:function(l,y,r){var c=r(1748);l.exports=function(h){var f=+h;return f!=f||f===0?0:c(f)}},7584:function(l,y,r){var c=r(6180),h=Math.min;l.exports=function(f){var p=c(f);return p>0?h(p,9007199254740991):0}},4356:function(l,y,r){var c=r(5436),h=Object;l.exports=function(f){return h(c(f))}},7024:function(l,y,r){var c=r(8448),h=r(1632),f=r(7728),p=r(4504),g=r(2104),C=r(9972),_=TypeError,k=C("toPrimitive");l.exports=function(Y,j){if(!h(Y)||f(Y))return Y;var F,R=p(Y,k);if(R){if(j===void 0&&(j="default"),F=c(R,Y,j),!h(F)||f(F))return F;throw new _("Can't convert object to primitive value")}return j===void 0&&(j="number"),g(Y,j)}},88:function(l,y,r){var c=r(7024),h=r(7728);l.exports=function(f){var p=c(f,"string");return h(p)?p:p+""}},16:function(l,y,r){var c={};c[r(9972)("toStringTag")]="z",l.exports=String(c)==="[object z]"},5016:function(l,y,r){var c=r(4427),h=String;l.exports=function(f){if(c(f)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return h(f)}},36:function(l){var y=String;l.exports=function(r){try{return y(r)}catch{return"Object"}}},7776:function(l,y,r){var c=r(1664),h=0,f=Math.random(),p=c(1 .toString);l.exports=function(g){return"Symbol("+(g===void 0?"":g)+")_"+p(++h+f,36)}},6536:function(l,y,r){var c=r(772);l.exports=c&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},1576:function(l,y,r){var c=r(3476),h=r(9957);l.exports=c&&h((function(){return Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype!==42}))},4288:function(l,y,r){var c=r(6420),h=r(4328),f=c.WeakMap;l.exports=h(f)&&/native code/.test(String(f))},9972:function(l,y,r){var c=r(6420),h=r(4696),f=r(5152),p=r(7776),g=r(772),C=r(6536),_=c.Symbol,k=h("wks"),Y=C?_.for||_:_&&_.withoutSetter||p;l.exports=function(j){return f(k,j)||(k[j]=g&&f(_,j)?_[j]:Y("Symbol."+j)),k[j]}},6488:function(l,y,r){var c=r(5232),h=r(5152),f=r(3440),p=r(7e3),g=r(4024),C=r(9968),_=r(584),k=r(7512),Y=r(8948),j=r(3480),F=r(3696),R=r(3476),O=r(7048);l.exports=function(v,T,S,x){var V="stackTraceLimit",E=x?2:1,A=v.split("."),z=A[A.length-1],B=c.apply(null,A);if(B){var ee=B.prototype;if(!O&&h(ee,"cause")&&delete ee.cause,!S)return B;var ie=c("Error"),re=T((function(fe,te){var de=Y(x?te:fe,void 0),ve=x?new B(fe):new B;return de!==void 0&&f(ve,"message",de),F(ve,re,ve.stack,2),this&&p(ee,this)&&k(ve,this,re),arguments.length>E&&j(ve,arguments[E]),ve}));if(re.prototype=ee,z!=="Error"?g?g(re,ie):C(re,ie,{name:!0}):R&&V in B&&(_(re,B,V),_(re,B,"prepareStackTrace")),C(re,B),!O)try{ee.name!==z&&f(ee,"name",z),ee.constructor=re}catch{}return re}}},7476:function(l,y,r){var c=r(9160),h=r(9957),f=r(1432),p=r(1632),g=r(4356),C=r(3556),_=r(4316),k=r(92),Y=r(2568),j=r(953),F=r(9972),R=r(8504),O=F("isConcatSpreadable"),v=R>=51||!h((function(){var S=[];return S[O]=!1,S.concat()[0]!==S})),T=function(S){if(!p(S))return!1;var x=S[O];return x!==void 0?!!x:f(S)};c({target:"Array",proto:!0,arity:1,forced:!v||!j("concat")},{concat:function(S){var x,V,E,A,z,B=g(this),ee=Y(B,0),ie=0;for(x=-1,E=arguments.length;x<E;x++)if(T(z=x===-1?B:arguments[x]))for(A=C(z),_(ie+A),V=0;V<A;V++,ie++)V in z&&k(ee,ie,z[V]);else _(ie+1),k(ee,ie++,z);return ee.length=ie,ee}})},6932:function(l,y,r){var c=r(9160),h=r(3364).filter;c({target:"Array",proto:!0,forced:!r(953)("filter")},{filter:function(f){return h(this,f,arguments.length>1?arguments[1]:void 0)}})},700:function(l,y,r){var c=r(9160),h=r(1664),f=r(5712),p=r(4096),g=r(1496),C=h([].join);c({target:"Array",proto:!0,forced:f!==Object||!g("join",",")},{join:function(_){return C(p(this),_===void 0?",":_)}})},4456:function(l,y,r){var c=r(9160),h=r(3364).map;c({target:"Array",proto:!0,forced:!r(953)("map")},{map:function(f){return h(this,f,arguments.length>1?arguments[1]:void 0)}})},4728:function(l,y,r){var c=r(9160),h=r(4356),f=r(3556),p=r(6728),g=r(4316);c({target:"Array",proto:!0,arity:1,forced:r(9957)((function(){return[].push.call({length:4294967296},1)!==4294967297}))||!(function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(C){return C instanceof TypeError}})()},{push:function(C){var _=h(this),k=f(_),Y=arguments.length;g(k+Y);for(var j=0;j<Y;j++)_[k]=arguments[j],k++;return p(_,k),k}})},8752:function(l,y,r){var c=r(9160),h=r(6420),f=r(908),p=r(6488),g="WebAssembly",C=h[g],_=new Error("e",{cause:7}).cause!==7,k=function(j,F){var R={};R[j]=p(j,F,_),c({global:!0,constructor:!0,arity:1,forced:_},R)},Y=function(j,F){if(C&&C[j]){var R={};R[j]=p(g+"."+j,F,_),c({target:g,stat:!0,constructor:!0,arity:1,forced:_},R)}};k("Error",(function(j){return function(F){return f(j,this,arguments)}})),k("EvalError",(function(j){return function(F){return f(j,this,arguments)}})),k("RangeError",(function(j){return function(F){return f(j,this,arguments)}})),k("ReferenceError",(function(j){return function(F){return f(j,this,arguments)}})),k("SyntaxError",(function(j){return function(F){return f(j,this,arguments)}})),k("TypeError",(function(j){return function(F){return f(j,this,arguments)}})),k("URIError",(function(j){return function(F){return f(j,this,arguments)}})),Y("CompileError",(function(j){return function(F){return f(j,this,arguments)}})),Y("LinkError",(function(j){return function(F){return f(j,this,arguments)}})),Y("RuntimeError",(function(j){return function(F){return f(j,this,arguments)}}))},508:function(l,y,r){var c=r(3476),h=r(6208).EXISTS,f=r(1664),p=r(2544),g=Function.prototype,C=f(g.toString),_=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,k=f(_.exec);c&&!h&&p(g,"name",{configurable:!0,get:function(){try{return k(_,C(this))[1]}catch{return""}}})},232:function(l,y,r){var c=r(9160),h=r(9292);c({target:"Object",stat:!0,arity:2,forced:Object.assign!==h},{assign:h})},5443:function(l,y,r){var c=r(16),h=r(6076),f=r(7032);c||h(Object.prototype,"toString",f,{unsafe:!0})},880:function(l,y,r){var c=r(9160),h=r(7680);c({target:"RegExp",proto:!0,forced:/./.exec!==h},{exec:h})},9836:function(l,y,r){var c=r(8448),h=r(7176),f=r(3951),p=r(9760),g=r(7584),C=r(5016),_=r(5436),k=r(4504),Y=r(4764),j=r(9092);h("match",(function(F,R,O){return[function(v){var T=_(this),S=p(v)?void 0:k(v,F);return S?c(S,v,T):new RegExp(v)[F](C(T))},function(v){var T=f(this),S=C(v),x=O(R,T,S);if(x.done)return x.value;if(!T.global)return j(T,S);var V=T.unicode;T.lastIndex=0;for(var E,A=[],z=0;(E=j(T,S))!==null;){var B=C(E[0]);A[z]=B,B===""&&(T.lastIndex=Y(S,g(T.lastIndex),V)),z++}return z===0?null:A}]}))},3536:function(l,y,r){var c=r(9160),h=r(6420),f=r(6100),p=r(3951),g=r(4328),C=r(7796),_=r(2544),k=r(92),Y=r(9957),j=r(5152),F=r(9972),R=r(336).IteratorPrototype,O=r(3476),v=r(7048),T="constructor",S="Iterator",x=F("toStringTag"),V=TypeError,E=h[S],A=v||!g(E)||E.prototype!==R||!Y((function(){E({})})),z=function(){if(f(this,R),C(this)===R)throw new V("Abstract class Iterator not directly constructable")},B=function(ee,ie){O?_(R,ee,{configurable:!0,get:function(){return ie},set:function(re){if(p(this),this===R)throw new V("You can't redefine this property");j(this,ee)?this[ee]=re:k(this,ee,re)}}):R[ee]=ie};j(R,x)||B(x,S),!A&&j(R,T)&&R[T]!==Object||B(T,z),z.prototype=R,c({global:!0,constructor:!0,forced:A},{Iterator:z})},2144:function(l,y,r){var c=r(9160),h=r(8448),f=r(8952),p=r(3951),g=r(6752),C=r(9724),_=r(8696),k=r(7048),Y=C((function(){for(var j,F,R=this.iterator,O=this.predicate,v=this.next;;){if(j=p(h(v,R)),this.done=!!j.done)return;if(F=j.value,_(R,O,[F,this.counter++],!0))return F}}));c({target:"Iterator",proto:!0,real:!0,forced:k},{filter:function(j){return p(this),f(j),new Y(g(this),{predicate:j})}})},9080:function(l,y,r){var c=r(9160),h=r(5792);c({target:"Iterator",proto:!0,real:!0,forced:r(7048)},{map:h})}},b={};function M(l){var y=b[l];if(y!==void 0)return y.exports;var r=b[l]={exports:{}};return i[l].call(r.exports,r,r.exports,M),r.exports}M.d=function(l,y){for(var r in y)M.o(y,r)&&!M.o(l,r)&&Object.defineProperty(l,r,{enumerable:!0,get:y[r]})},M.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),M.o=function(l,y){return Object.prototype.hasOwnProperty.call(l,y)},M.r=function(l){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})};var I={};return(function(){M.r(I),M.d(I,{default:function(){return _}}),M(8752),M(6932),M(700),M(4456),M(4728),M(508),M(232),M(5443),M(880),M(9836),M(3536),M(2144),M(9080);var l=M(680);M(7476);function y(k,Y){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,F){return j.__proto__=F,j},y(k,Y)}var r=(function(k){var Y,j;function F(){for(var O,v=arguments.length,T=new Array(v),S=0;S<v;S++)T[S]=arguments[S];return(O=k.call.apply(k,[this].concat(T))||this).state={bump:!1,debounced:!1},O}j=k,(Y=F).prototype=Object.create(j.prototype),Y.prototype.constructor=Y,y(Y,j);var R=F.prototype;return R.componentWillMount=function(){var O,v,T,S=this;this.debounceStatusUpdate=(O=function(){if(!S.state.debounced){var x=!S.props.isInFocus||S.props.validChoiceMade;S.setState((function(V){return{bump:!V.bump,debounced:!0,silenced:x}}))}},v=1400,function(){var x=this,V=arguments;clearTimeout(T),T=setTimeout((function(){T=null,O.apply(x,V)}),v)})},R.componentWillReceiveProps=function(O){O.queryLength,this.setState({debounced:!1})},R.render=function(){var O=this.props,v=O.id,T=O.length,S=O.queryLength,x=O.minQueryLength,V=O.selectedOption,E=O.selectedOptionIndex,A=O.tQueryTooShort,z=O.tNoResults,B=O.tSelectedOption,ee=O.tResults,ie=O.className,re=this.state,fe=re.bump,te=re.debounced,de=re.silenced,ve=S<x,me=T===0,oe=V?B(V,T,E):"",Z=null;return Z=ve?A(x):me?z():ee(T,oe),this.debounceStatusUpdate(),(0,l.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,l.createElement)("div",{id:v+"__status--A",role:"status","aria-atomic":"true","aria-live":"polite"},!de&&te&&fe?Z:""),(0,l.createElement)("div",{id:v+"__status--B",role:"status","aria-atomic":"true","aria-live":"polite"},de||!te||fe?"":Z))},F})(l.Component);r.defaultProps={tQueryTooShort:function(k){return"Type in "+k+" or more characters for results"},tNoResults:function(){return"No search results"},tSelectedOption:function(k,Y,j){return k+" "+(j+1)+" of "+Y+" is highlighted"},tResults:function(k,Y){return k+" "+(k===1?"result":"results")+" "+(k===1?"is":"are")+" available. "+Y}};var c=function(k){var Y=k.className;return(0,l.createElement)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:Y,focusable:"false"},(0,l.createElement)("g",{stroke:"none",fill:"none","fill-rule":"evenodd"},(0,l.createElement)("polygon",{fill:"#000000",points:"0 0 22 0 11 17"})))};function h(){return h=Object.assign?Object.assign.bind():function(k){for(var Y=1;Y<arguments.length;Y++){var j=arguments[Y];for(var F in j)Object.prototype.hasOwnProperty.call(j,F)&&(k[F]=j[F])}return k},h.apply(this,arguments)}function f(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function p(k,Y){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,F){return j.__proto__=F,j},p(k,Y)}var g={13:"enter",27:"escape",32:"space",38:"up",40:"down"};function C(){return typeof navigator<"u"&&!(!navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||!navigator.userAgent.match(/AppleWebKit/g))}var _=(function(k){var Y,j;function F(O){var v;return(v=k.call(this,O)||this).elementReferences={},v.state={focused:null,hovered:null,menuOpen:!1,options:O.defaultValue?[O.defaultValue]:[],query:O.defaultValue,validChoiceMade:!1,selected:null,ariaHint:!0},v.handleComponentBlur=v.handleComponentBlur.bind(f(v)),v.handleKeyDown=v.handleKeyDown.bind(f(v)),v.handleUpArrow=v.handleUpArrow.bind(f(v)),v.handleDownArrow=v.handleDownArrow.bind(f(v)),v.handleEnter=v.handleEnter.bind(f(v)),v.handlePrintableKey=v.handlePrintableKey.bind(f(v)),v.handleListMouseLeave=v.handleListMouseLeave.bind(f(v)),v.handleOptionBlur=v.handleOptionBlur.bind(f(v)),v.handleOptionClick=v.handleOptionClick.bind(f(v)),v.handleOptionFocus=v.handleOptionFocus.bind(f(v)),v.handleOptionMouseDown=v.handleOptionMouseDown.bind(f(v)),v.handleOptionMouseEnter=v.handleOptionMouseEnter.bind(f(v)),v.handleInputBlur=v.handleInputBlur.bind(f(v)),v.handleInputChange=v.handleInputChange.bind(f(v)),v.handleInputClick=v.handleInputClick.bind(f(v)),v.handleInputFocus=v.handleInputFocus.bind(f(v)),v.pollInputElement=v.pollInputElement.bind(f(v)),v.getDirectInputChanges=v.getDirectInputChanges.bind(f(v)),v}j=k,(Y=F).prototype=Object.create(j.prototype),Y.prototype.constructor=Y,p(Y,j);var R=F.prototype;return R.isQueryAnOption=function(O,v){var T=this;return v.map((function(S){return T.templateInputValue(S).toLowerCase()})).indexOf(O.toLowerCase())!==-1},R.componentDidMount=function(){this.pollInputElement()},R.componentWillUnmount=function(){clearTimeout(this.$pollInput)},R.pollInputElement=function(){var O=this;this.getDirectInputChanges(),this.$pollInput=setTimeout((function(){O.pollInputElement()}),100)},R.getDirectInputChanges=function(){var O=this.elementReferences[-1];O&&O.value!==this.state.query&&this.handleInputChange({target:{value:O.value}})},R.componentDidUpdate=function(O,v){var T=this.state.focused,S=T===null,x=v.focused!==T;x&&!S&&this.elementReferences[T].focus();var V=T===-1,E=x&&v.focused===null;if(V&&E){var A=this.elementReferences[T];A.setSelectionRange(0,A.value.length)}},R.hasAutoselect=function(){return!C()&&this.props.autoselect},R.templateInputValue=function(O){var v=this.props.templates&&this.props.templates.inputValue;return v?v(O):O},R.templateSuggestion=function(O){var v=this.props.templates&&this.props.templates.suggestion;return v?v(O):O},R.handleComponentBlur=function(O){var v,T=this.state,S=T.options,x=T.query,V=T.selected;this.props.confirmOnBlur?(v=O.query||x,this.props.onConfirm(S[V])):v=x,this.setState({focused:null,menuOpen:O.menuOpen||!1,query:v,selected:null,validChoiceMade:this.isQueryAnOption(v,S)})},R.handleListMouseLeave=function(O){this.setState({hovered:null})},R.handleOptionBlur=function(O,v){var T=this.state,S=T.focused,x=T.menuOpen,V=T.options,E=T.selected,A=O.relatedTarget===null,z=O.relatedTarget===this.elementReferences[-1],B=S!==v&&S!==-1;if(!B&&A||!(B||z)){var ee=x&&C();this.handleComponentBlur({menuOpen:ee,query:this.templateInputValue(V[E])})}},R.handleInputBlur=function(O){var v=this.state,T=v.focused,S=v.menuOpen,x=v.options,V=v.query,E=v.selected;if(T===-1){var A=S&&C(),z=C()?V:this.templateInputValue(x[E]);this.handleComponentBlur({menuOpen:A,query:z})}},R.handleInputChange=function(O){var v=this,T=this.props,S=T.minLength,x=T.source,V=T.showAllValues,E=this.hasAutoselect(),A=O.target.value,z=A.length===0,B=this.state.query!==A,ee=A.length>=S;this.setState({query:A,ariaHint:z}),V||!z&&B&&ee?x(A,(function(ie){var re=ie.length>0;v.setState({menuOpen:re,options:ie,selected:E&&re?0:-1,validChoiceMade:!1})})):!z&&ee||this.setState({menuOpen:!1,options:[]})},R.handleInputClick=function(O){this.handleInputChange(O)},R.handleInputFocus=function(O){var v=this.state,T=v.query,S=v.validChoiceMade,x=v.options,V=this.props.minLength,E=!S&&T.length>=V&&x.length>0;E?this.setState((function(A){var z=A.menuOpen;return{focused:-1,menuOpen:E||z,selected:-1}})):this.setState({focused:-1})},R.handleOptionFocus=function(O){this.setState({focused:O,hovered:null,selected:O})},R.handleOptionMouseEnter=function(O,v){C()||this.setState({hovered:v})},R.handleOptionClick=function(O,v){var T=this.state.options[v],S=this.templateInputValue(T);this.props.onConfirm(T),this.setState({focused:-1,hovered:null,menuOpen:!1,query:S,selected:-1,validChoiceMade:!0}),this.forceUpdate()},R.handleOptionMouseDown=function(O){O.preventDefault()},R.handleUpArrow=function(O){O.preventDefault();var v=this.state,T=v.menuOpen,S=v.selected;S!==-1&&T&&this.handleOptionFocus(S-1)},R.handleDownArrow=function(O){var v=this;if(O.preventDefault(),this.props.showAllValues&&this.state.menuOpen===!1)O.preventDefault(),this.props.source("",(function(E){v.setState({menuOpen:!0,options:E,selected:0,focused:0,hovered:null})}));else if(this.state.menuOpen===!0){var T=this.state,S=T.menuOpen,x=T.options,V=T.selected;V!==x.length-1&&S&&this.handleOptionFocus(V+1)}},R.handleSpace=function(O){var v=this;this.props.showAllValues&&this.state.menuOpen===!1&&this.state.query===""&&(O.preventDefault(),this.props.source("",(function(T){v.setState({menuOpen:!0,options:T})}))),this.state.focused!==-1&&(O.preventDefault(),this.handleOptionClick(O,this.state.focused))},R.handleEnter=function(O){this.state.menuOpen&&(O.preventDefault(),this.state.selected>=0&&this.handleOptionClick(O,this.state.selected))},R.handlePrintableKey=function(O){var v=this.elementReferences[-1];O.target===v||v.focus()},R.handleKeyDown=function(O){switch(g[O.keyCode]){case"up":this.handleUpArrow(O);break;case"down":this.handleDownArrow(O);break;case"space":this.handleSpace(O);break;case"enter":this.handleEnter(O);break;case"escape":this.handleComponentBlur({query:this.state.query});break;default:((v=O.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(O)}var v},R.render=function(){var O,v=this,T=this.props,S=T.cssNamespace,x=T.displayMenu,V=T.id,E=T.minLength,A=T.name,z=T.placeholder,B=T.required,ee=T.showAllValues,ie=T.tNoResults,re=T.tStatusQueryTooShort,fe=T.tStatusNoResults,te=T.tStatusSelectedOption,de=T.tStatusResults,ve=T.tAssistiveHint,me=T.dropdownArrow,oe=T.menuAttributes,Z=T.inputClasses,Ne=T.hintClasses,Ie=T.menuClasses,Ye=this.state,Oe=Ye.focused,$=Ye.hovered,J=Ye.menuOpen,X=Ye.options,P=Ye.query,H=Ye.selected,N=Ye.ariaHint,W=Ye.validChoiceMade,q=this.hasAutoselect(),ce=Oe===-1,se=X.length===0,Pe=P.length!==0,ge=P.length>=E,_e=this.props.showNoOptionsFound&&ce&&se&&Pe&&ge,$e=S+"__wrapper",Re=S+"__status",ct=S+"__dropdown-arrow-down",Ue=Oe!==-1&&Oe!==null,it=S+"__option",Yt=S+"__hint",st=this.templateInputValue(X[H]),je=st&&st.toLowerCase().indexOf(P.toLowerCase())===0&&q?P+st.substr(P.length):"",jt=V+"__assistiveHint",At={"aria-describedby":N?jt:null,"aria-expanded":J?"true":"false","aria-activedescendant":Ue?V+"__option--"+Oe:null,"aria-controls":V+"__listbox","aria-autocomplete":this.hasAutoselect()?"both":"list"};ee&&typeof(O=me({className:ct}))=="string"&&(O=(0,l.createElement)("div",{className:S+"__dropdown-arrow-down-wrapper",dangerouslySetInnerHTML:{__html:O}}));var ot=S+"__input",mt=[ot,this.props.showAllValues?ot+"--show-all-values":ot+"--default"];Oe!==null&&mt.push(ot+"--focused"),Z&&mt.push(Z);var dt=S+"__menu",tt=[dt,dt+"--"+x,dt+"--"+(J||_e?"visible":"hidden")];Ie&&tt.push(Ie),(oe!=null&&oe.class||oe!=null&&oe.className)&&tt.push(oe?.class||oe?.className);var pt=Object.assign({"aria-labelledby":V},oe,{id:V+"__listbox",role:"listbox",className:tt.join(" "),onMouseLeave:this.handleListMouseLeave});return delete pt.class,(0,l.createElement)("div",{className:$e,onKeyDown:this.handleKeyDown},(0,l.createElement)(r,{id:V,length:X.length,queryLength:P.length,minQueryLength:E,selectedOption:this.templateInputValue(X[H]),selectedOptionIndex:H,validChoiceMade:W,isInFocus:this.state.focused!==null,tQueryTooShort:re,tNoResults:fe,tSelectedOption:te,tResults:de,className:Re}),je&&(0,l.createElement)("span",null,(0,l.createElement)("input",{className:[Yt,Ne===null?Z:Ne].filter(Boolean).join(" "),readonly:!0,tabIndex:"-1",value:je})),(0,l.createElement)("input",h({},At,{autoComplete:"off",className:mt.join(" "),id:V,onClick:this.handleInputClick,onBlur:this.handleInputBlur},{onChange:this.handleInputChange},{onFocus:this.handleInputFocus,name:A,placeholder:z,ref:function(gt){v.elementReferences[-1]=gt},type:"text",role:"combobox",required:B,value:P})),O,(0,l.createElement)("ul",pt,X.map((function(gt,We){var ht=(Oe===-1?H===We:Oe===We)&&$===null?" "+it+"--focused":"",lt=We%2?" "+it+"--odd":"",rt=C()?"<span id="+V+"__option-suffix--"+We+' 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"> '+(We+1)+" of "+X.length+"</span>":"";return(0,l.createElement)("li",{"aria-selected":Oe===We?"true":"false",className:""+it+ht+lt,dangerouslySetInnerHTML:{__html:v.templateSuggestion(gt)+rt},id:V+"__option--"+We,key:We,onBlur:function(Qe){return v.handleOptionBlur(Qe,We)},onClick:function(Qe){return v.handleOptionClick(Qe,We)},onMouseDown:v.handleOptionMouseDown,onMouseEnter:function(Qe){return v.handleOptionMouseEnter(Qe,We)},ref:function(Qe){v.elementReferences[We]=Qe},role:"option",tabIndex:"-1","aria-posinset":We+1,"aria-setsize":X.length})})),_e&&(0,l.createElement)("li",{className:it+" "+it+"--no-results",role:"option","aria-disabled":"true"},ie())),(0,l.createElement)("span",{id:jt,style:{display:"none"}},ve()))},F})(l.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:c,menuAttributes:{},inputClasses:null,hintClasses:null,menuClasses:null}})(),I})()}))})(vr)),vr.exports}var un,Is;function $f(){return Is||(Is=1,un=Hf()),un}var Bf=$f();const Uf=gn(Bf),Gf=({value:o,defaultValue:s="",onConfirm:u,source:i,disabled:b,onClear:M,tClearInput:I=()=>"Clear input",...l})=>{const y=G.useRef(null),r=p=>{setTimeout(()=>{y.current&&(y.current.elementReferences[-1].value=p)},0)};G.useEffect(()=>{o!==void 0&&r(o)},[o]),G.useEffect(()=>{b?y.current&&(y.current.elementReferences[-1].disabled=!0):y.current&&(y.current.elementReferences[-1].disabled=!1)},[b]);const c=()=>{M&&M()},h=(p,g)=>{y.current.elementReferences[-1].classList.contains("autocomplete__input--focused")&&i(p,g)},f=p=>{p?u(p):r(o)};return m.jsxs("div",{style:{position:"relative",width:"100%"},children:[m.jsx(Uf,{ref:y,...l,defaultValue:s,onConfirm:f,source:h}),!!(o&&o.length>0&&!b)&&m.jsx("button",{onClick:c,style:{position:"absolute",right:"0px",top:"50%",transform:"translateY(-50%)",background:"transparent",border:"none",cursor:"pointer",padding:0},"aria-label":I(),children:m.jsx(ue.Icon,{icon:"it-close",size:"sm",title:I()})})]})},Jf="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==",Kf="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=",Xf="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",Zf=({position:o,areasLayer:s,bounds:u,onMarkedMoved:i})=>{const b=G.useRef(null);let M=null;const[I,l]=G.useState([]),y=Rt.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'}),r=[41.9,12.5],c=()=>{const h=Rt.map(b.current,{keyboard:!1,minZoom:6,maxZoom:18}).setView(r,10);y.addTo(h),s&&s.map(p=>{p.addTo(h)});const f=o?[`${o.lat}`,`${o.lon}`]:u?u.getCenter():r;if(delete Rt.Icon.Default.prototype._getIconUrl,Rt.Icon.Default.mergeOptions({iconRetinaUrl:Jf,iconUrl:Kf,shadowUrl:Xf}),M=Rt.marker(f,{draggable:!0}).addTo(h),M.on("moveend",function(p){const g=p.target.getLatLng();i(g,M)}),h.on("click",function(p){const g=p.latlng;M&&M.setLatLng(g).update(),i(g,M)}),!o&&u)h.fitBounds(u);else{const p=o?[o.lat,o.lon]:r;M&&(M.setLatLng(p).update(),h.setView(p,15))}};return G.useEffect(()=>{b.current&&c()},[b]),m.jsx("div",{className:"d-block",style:{height:"60vh",width:"100%",display:"block"},children:m.jsx("div",{ref:b,style:{height:"100%",width:"100%"},"aria-hidden":!0})})},Fs=Ct.Formio.Components.components.field,Qf=({component:o,value:s,current:u,onChange:i,i18next:b})=>{const[M,I]=G.useState(null),[l,y]=G.useState([]),[r,c]=G.useState(),[h,f]=G.useState(),[p,g]=G.useState(!1),[C,_]=G.useState(),[k,Y]=G.useState(!1),[j,F]=G.useState(),[R,O]=G.useState(),[v,T]=G.useState(!1),[S,x]=G.useState(""),[V,E]=G.useState(""),[A,z]=G.useState(!1),[B,ee]=G.useState(!1),re=new URLSearchParams(window.location.search).get("area"),{geographic_areas_id:fe}=window.OC_SERVICE_DETAILS,te=G.useRef(),de=b.language;let ve=Rt.latLngBounds();const me=re||(fe&&fe.length>0?fe:void 0),oe=(X,P)=>{te.current=X;const H=`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(X)}&countrycodes=it&viewbox=${r}&bounded=1&addressdetails=1&limit=14&format=jsonv2&accept-language=${de}`;let N=[],W=[];Y(!0),fetch(H).then(q=>q.json()).then(q=>{if(q.length&&te.current===X){Y(!0);const ce=q.map((se,Pe)=>{const{lat:ge,lon:_e}=se,$e=`${Ee()}/api/geographic-areas/contains?lat=${ge}&lon=${_e}&geographic_areas_ids=${C.join(",")}`;return fetch($e).then(Re=>Re.json()).then(Re=>Re.result?(se.label=Xr(se),se):null)});return Promise.all(ce)}else te.current===X&&(P([]),Y(!1))}).then(q=>{q=q?q.filter(ce=>ce!==null):[],q.length>0?(q.forEach((ce,se)=>{q[se].label=Xr(ce)}),q=hi.uniqWith(q,(ce,se)=>ce.label===se.label),q.forEach((ce,se)=>{W.push(ce.label),N.push(ce)}),te.current===X&&(P(W),y(N),Y(!1))):te.current===X&&(P([]),Y(!1))}).catch(q=>{console.error("Error fetching locations:",q),Y(!1)})},Z=(X,P)=>{oe(X,P)},Ne=(X,P)=>{const{lat:H,lng:N}=X,W=`https://nominatim.openstreetmap.org/reverse?format=jsonv2&lat=${H}&lon=${N}&accept-language=${de}`;fetch(W).then(q=>q.json()).then(q=>{if(q&&q.display_name)if(q.label=Xr(q),q.lat=H,q.lon=N,P)P.bindPopup(`${q.label}`,{className:"address-map-popup"}).openPopup(),O(q);else{O(q);return}}).catch(q=>console.error("Error with reverse geocoding:",q))};function Ie(){navigator.geolocation.getCurrentPosition(X=>{let P=X.coords.latitude,H=X.coords.longitude;if((C||[]).length>0){const W=`${Ee()}/api/geographic-areas/contains?lat=${P}&lon=${H}&geographic_areas_ids=${C.join(",")}`;fetch(W).then(q=>q.json()).then(q=>{q.result&&(I({lat:P,lon:H}),Ne({lat:P,lng:H})),ee(!B)})}else I({lat:P,lon:H}),Ne({lat:P,lng:H}),ee(!B)},X=>{X?.code===1?(z(!A),E(b.t("error_message_code_1"))):X?.code===2?(z(!A),E(b.t("error_message_code_2"))):X?.code===3?(z(!A),E(b.t("error_message_code_3"))):(z(!A),E(b.t("error_message_generic")))})}G.useEffect(()=>{s&&I(s),u.valuePosition&&I(u.valuePosition)},[s,u]);const Ye=()=>{s&&I(s),u.valuePosition&&I(u.valuePosition)};G.useEffect(()=>{window?.Formio?.formioReady.then(()=>{setTimeout(()=>{Ye(),Oe()},1)})},[]);const Oe=()=>{let P=`${Ee()}/api/geographic-areas`,H=[],N=[];fetch(P).then(W=>W.json()).then(W=>{if(Array.isArray(W)&&W.length>0){W.filter(se=>me?Array.isArray(me)?me.includes(se.id):se.id===me:!0).forEach(se=>{H.push(se.id);const Pe=JSON.parse(se.geofence),ge=Rt.geoJSON(Pe,{style:{color:"#3478bd",fillColor:"#87CEEB",fillOpacity:.2,weight:1.5},filter:function(_e){return _e.geometry.type==="Polygon"||_e.geometry.type==="MultiPolygon"}});ve.extend(ge.getBounds()),N.push(ge)}),f(N),_(H),F(ve);const q=ve.getNorthEast(),ce=ve.getSouthWest();c([q.lng,q.lat,ce.lng,ce.lat])}else console.log("No geographic_areas_ids found.")}).catch(W=>{console.error("Error with reverse geocoding:",W)})},$=()=>{x(M?.label?M.label:"")};G.useEffect(()=>{$(),i(M)},[M]),G.useEffect(()=>{document.querySelector(".formio-read-only")&&v===!1?T(!0):T(!1)},[]);const J=()=>{if(R){const X=`${Ee()}/api/geographic-areas/contains?lat=${R.lat}&lon=${R.lon}&geographic_areas_ids=${C.join(",")}`;g(!0),fetch(X).then(P=>P.json()).then(P=>{g(!1),P?P.result===!1?He.fire({title:"",html:"<p>"+b.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:b.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1}):P.result===!0&&(ee(!B),I(R)):(g(!1),console.log("No geographic-areas/contains ."))}).catch(P=>{console.error("Error with geographic-areas/contains:",P),He.fire({title:"",html:"<p>"+P+"</p>",icon:"error",cancelButtonText:b.t("Chiudi"),showCancelButton:!0,showConfirmButton:!1})})}};return m.jsx("div",{children:m.jsxs("div",{id:`address-map-container-${o.key}`,className:"address-map-container",children:[m.jsx("div",{children:m.jsxs(ue.Modal,{wrapClassName:"formio-component-address_map",isOpen:B,size:"lg",scrollable:!0,toggle:()=>ee(!B),labelledBy:"maps-evo",container:_r(),children:[m.jsx(ue.ModalHeader,{toggle:()=>ee(!B),id:"maps-evo",children:b.t("Individua il luogo sulla mappa")}),m.jsxs(ue.ModalBody,{children:[m.jsx("p",{children:m.jsx("small",{children:b.t("Trascina l’icona nel punto preciso in cui si verifica l’evento che vuoi segnalare e fai click su Salva indirizzo")})}),m.jsx(Zf,{position:M,areasLayer:h,bounds:j,onMarkedMoved:(X,P)=>{Ne(X,P)}})]}),m.jsxs(ue.ModalFooter,{children:[m.jsx(ue.Button,{color:"secondary",onClick:()=>ee(!B),children:b.t("Chiudi")}),m.jsx(ue.Button,{color:"primary",onClick:()=>{J()},disabled:!R||p,children:b.t("Salva indirizzo")})]})]})}),m.jsx("div",{children:m.jsxs(ue.Modal,{isOpen:A,toggle:()=>z(!A),withIcon:!0,labelledBy:"error-modal-message",container:_r(),children:[m.jsx(ue.ModalHeader,{icon:"it-info-circle",id:"error-modal-message",children:b.t("warning")}),m.jsx(ue.ModalBody,{children:m.jsx("p",{children:V})}),m.jsx(ue.ModalFooter,{children:m.jsx(ue.Button,{color:"primary",onClick:()=>z(!A),children:b.t("close")})})]})}),m.jsxs("div",{className:"position-relative",children:[m.jsx(Gf,{id:`${o.id}-${o.key}`,inputClasses:"form-control",source:hi.debounce(Z,520),onConfirm:X=>{if(Y(!1),te.current="",X){X===""&&I(null);let P=l.find(H=>H.label===X);I(P)}},onClear:()=>{Y(!1),te.current="",I(null)},dropdownArrow:()=>null,minLength:3,disabled:v,confirmOnBlur:!0,showNoOptionsFound:!k,defaultValue:M?.label,value:S,tNoResults:()=>b.t("Nessun risultato trovato, prova a inserire l'indirizzo completo"),tClearInput:()=>b.t("Clear input")}),k&&m.jsx("div",{className:"position-absolute",style:{width:"100%",bottom:"0px"},children:m.jsx(ue.Progress,{indeterminate:!0,label:"In elaborazione..."})})]}),!v&&m.jsxs(ue.Button,{type:"button",value:b.t("Individua con precisione sulla mappa"),onClick:()=>{/Mobi|Android/i.test(navigator.userAgent)?Ie():(ee(!0),O(!1))},icon:!0,className:"px-0 primary-color",children:[m.jsx(ue.Icon,{color:"primary",icon:"it-map-marker-circle",role:"presentation"}),m.jsx("span",{children:b.t("Individua con precisione sulla mappa")})]})]})})};class Cr extends Fs{constructor(s,u,i){super(s,u,i)}static get builderInfo(){return{title:"Address Map",group:"basic",icon:"bi bi-map",documentation:"",weight:70,schema:Cr.schema()}}static schema(){return Fs.schema({type:"address_map"})}static editForm=Wf;attach(s){return super.attach(s).then(()=>{this.loadRefs(this.element,{[`react-${this.id}`]:"single"});const u=this.refs[`react-${this.id}`];return u?(this.rootComponent=Et.createRoot(u),this.rootComponent.render(m.jsx(Qf,{component:this.component,value:this.dataValue,onChange:i=>this.setValue(i),...this,current:this},this.dataValue)),this):this})}detach(){return this.rootComponent&&(this.rootComponent.unmount(),this.rootComponent=null),super.detach()}setValue(s){this.valuePosition=s,this.updateValue(s)}getValue(){return this.valuePosition}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}}const em=[{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 = '"+Ee()+"'; data.url = url; value=url;",key:"url",type:"hidden",input:!0,weight:1}];function tm(...o){return Bt.Components.baseEditForm([{key:"display",components:em}],...o)}const Vs=Ct.Formio.Components.components.field,rm=({component:o,current:s,onChange:u,i18next:i})=>{const b="list-services",M="selected-category",[I,l]=G.useState([]),[y,r]=G.useState([]),[c,h]=G.useState(null),[f,p]=G.useState(null),[g,C]=G.useState(""),[_,k]=G.useState(!1),[Y,j]=G.useState(!1),F=G.useRef(!1),R=G.useRef(),O=G.useMemo(()=>{if(!c)return null;const E=y.find(z=>z.name===c);return E||I.find(z=>z.name===c)||null},[c,y,I]),v=G.useMemo(()=>O?.services||[],[O]),T=async()=>{j(!0);const E=sessionStorage.getItem(b),A=sessionStorage.getItem(M);if(E)try{const re=JSON.parse(E);if(Array.isArray(re)&&re.length>0){l(re),r(re);const fe=re.find(te=>te.name===A)||re[0];return h(fe?.name||null),j(!1),re}}catch{console.warn("⚠️ Cache corrotta, rigenerazione...")}const z=await window.FormioHelper.getBookingConfig(),B={};z.forEach(re=>{(re.categories??[]).forEach(fe=>{B[fe]||(B[fe]={name:fe,services:[]}),B[fe].services.push(re)})});const ee=Object.fromEntries(Object.entries(B).sort(([re],[fe])=>re.localeCompare(fe,"it",{sensitivity:"base"}))),ie=Object.values(ee).filter(re=>(re.name??"").trim()!=="");return l(ie),r(ie),h(ie[0]?.name||null),sessionStorage.setItem(b,JSON.stringify(ie)),sessionStorage.setItem(M,ie[0]?.name||""),j(!1),ie};G.useEffect(()=>{c&&sessionStorage.setItem(M,c)},[c]),G.useEffect(()=>{F.current||(F.current=!0,T())},[]);const S=E=>{const A=(me="")=>me.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),z=(me="")=>me.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\s+/g," ").trim(),B=(me="")=>me.replace(/<[^>]*>/g," "),ee=(me,oe)=>new RegExp(`\\b${A(oe)}`,"i").test(me),ie=(me,oe)=>{const Z=z(me.name),Ne=z((me.categories??[]).join(" ")),Ie=z(B(me.abstract??""));if(!oe.every($=>ee(Z,$)||ee(Ne,$)||ee(Ie,$)))return-1;let Oe=0;for(const $ of oe)ee(Z,$)?Oe+=3:ee(Ne,$)?Oe+=2:ee(Ie,$)&&(Oe+=1);return Oe},re=E.target.value;C(re);const fe=z(re);if(!fe){r(I),h(me=>me??I[0]?.name??null);return}const te=fe.split(" ").filter(Boolean),de=I.map(me=>{const oe=me.services.map(Z=>({service:Z,score:ie(Z,te)})).filter(Z=>Z.score>=0).sort((Z,Ne)=>Ne.score-Z.score).map(Z=>Z.service);return oe.length?{...me,services:oe}:null}).filter(Boolean);r(de);const ve=de.some(me=>me.name===c);h(ve?c:de[0]?.name??null)},x=E=>{p(E);const A=I.find(z=>z.services.some(B=>B.id===E.id));A&&h(A.name),u({id:E.id,link:E.link,name:E.name,show_howto_in_motivation:E.show_howto_in_motivation,categories:E.categories,offices:E.offices,abstract:E.abstract,view_type:E.view_type}),s.data.user_group=null,Js()},V=E=>{h(E.name),p(null),C(""),r(I),u({})};return G.useEffect(()=>{const E=!!document.querySelector(".formio-read-only");k(E)},[]),G.useEffect(()=>{const E=setTimeout(()=>{const A=s?.dataValue??s?.getValue();if(A?.id&&(p(A),I.length>0)){const z=I.find(B=>B.services.some(ee=>ee.id===A.id));z&&h(z.name)}},500);return()=>clearTimeout(E)},[s?.dataValue,s?.data,I]),G.useEffect(()=>{const E=window.FormioInstance;if(!E)return;const A=()=>{const z=E.submission?.data?.[s?.component?.key];if(z?.id&&(p(z),I.length>0)){const B=I.find(ee=>ee.services.some(ie=>ie.id===z.id));B&&h(B.name)}};return E.on("change",A),()=>E.off("change",A)},[I,s?.component?.key]),Y?m.jsx("div",{className:"services-booking",ref:R,children:m.jsxs("div",{children:[i.t("Caricamento in corso"),"..."]})}):m.jsx("div",{className:"services-booking",ref:R,children:I&&!_?m.jsxs(ue.Container,{children:[m.jsx(ue.Row,{className:"mb-3",children:m.jsx(ue.Col,{children:m.jsx("h3",{className:"h6 fw-bold text-uppercase mb-3",children:i.t("Seleziona il servizio per cui stai richiedendo un appuntamento")})})}),m.jsx(ue.Row,{className:"mb-3",children:m.jsx(ue.Col,{children:m.jsx("div",{className:"search-container",children:m.jsx(ue.Input,{id:"search",label:i.t("Cerca"),type:"text",value:g,onChange:S,onInput:S,infoText:i.t("Cerca per categoria, servizio o descrizione")})})})}),m.jsxs(ue.Row,{className:"mb-3",children:[O?m.jsx(ue.Col,{lg:3,md:4,className:"mb-4 mb-lg-0",children:m.jsxs("div",{className:"categories-list",children:[m.jsx("h3",{className:"h6 fw-bold text-uppercase mb-3",children:i.t("Categorie")}),y.length>0&&y.map(E=>{const A=c===E.name;return m.jsxs("button",{onClick:()=>V(E),className:`category-item w-100 text-start p-3 mb-2 border-0 rounded ${A?"category-active bg-primary text-white":"bg-light text-dark"}`,children:[m.jsx("span",{className:"fw-500 d-block",children:E.name}),m.jsxs("small",{className:`d-block mt-1 ${A?"text-white":"text-muted"}`,children:[E.services.length," ",E.services.length>1?i.t("servizi"):i.t("servizio")]})]},E.name)})]})}):null,m.jsx(ue.Col,{lg:O?9:12,md:O?8:12,children:m.jsxs("div",{className:"services-container",children:[v.length>0?m.jsxs("div",{className:"services-header mb-4",children:[m.jsx("h3",{className:"h5 fw-bold text-primary mb-0",children:O?.name}),m.jsx("div",{className:"border-bottom border-primary mt-3 mb-4"})]}):null,v.length>0?m.jsx("div",{className:"services-list",children:v.map(E=>{const A=f?.id===E.id,z=Ls.sanitize(E?.abstract);return m.jsx("button",{onClick:()=>x(E),className:`service-card mb-4 p-4 rounded border cursor-pointer transition text-start w-100 ${A?"border-primary border-2 bg-light":"border-light border-1 bg-white"}`,style:{cursor:"pointer"},tabIndex:"0",role:"button","aria-label":`${E.name}`,"aria-pressed":A,children:m.jsx("div",{className:"d-flex justify-content-between align-items-start",children:m.jsxs("div",{className:"flex-grow-1",children:[m.jsx("h5",{className:"h6 fw-bold mb-2 text-dark",children:E.name}),E?.abstract&&m.jsx("p",{className:"text-muted small mb-0",dangerouslySetInnerHTML:{__html:z}})]})})},E.id)})}):m.jsx("div",{className:"alert alert-info text-italic",children:i.t("Il servizio che stai cercando non è disponibile per la prenotazione appuntamento")})]})})]})]}):_?m.jsx("fieldset",{className:"it-page-section",children:m.jsx("div",{className:"cmp-card mt-2",children:m.jsxs("div",{className:"card has-bkg-grey shadow-sm p-big",children:[m.jsx("div",{className:"card-header border-0 p-0 mb-lg-30",children:m.jsx("div",{className:"d-flex",children:m.jsx("h2",{className:"title-xxlarge mb-1",children:O?.name})})}),m.jsx("div",{className:"card p-3 p-lg-4 fieldset-body",children:s?.dataValue?.id?m.jsx("div",{className:"services-list",children:m.jsx("div",{className:"service-card p-4 rounded border transition border-light border-1 bg-white",children:m.jsx("div",{className:"d-flex justify-content-between align-items-start",children:m.jsx("div",{className:"flex-grow-1",children:m.jsx("p",{className:"mb-2 text-dark text-paragraph",children:s.dataValue.name})})})},s.dataValue.id)}):null})]})})}):null})};class Yr extends Vs{constructor(s,u,i){super(s,u,i)}static get builderInfo(){return{title:"Lista Servizi",group:"basic",icon:"bi bi-list",documentation:"",weight:70,schema:Yr.schema()}}static schema(){return Vs.schema({type:"list-services"})}static editForm=tm;attach(s,u){return super.attach(s).then(()=>{this.loadRefs(this.element,{[`react-${this.id}`]:"single"});const i=this.refs[`react-${this.id}`];return i?(this.rootComponent&&(this.rootComponent.unmount(),this.rootComponent=null),this.rootComponent=Et.createRoot(i),this.builderMode?(this.rootComponent.render(m.jsx("div",{className:"my-1 border border-2 border-light rounded p-3 text-secondary",children:m.jsx("div",{className:"h6 mb-0",children:this.component?.label||"Lista Servizi"})})),this):(this.rootComponent.render(m.jsx(rm,{ref:u,component:this.component,onChange:b=>this.setValue(b),...this,current:this})),this)):this})}detach(){return this.rootComponent&&(this.rootComponent.unmount(),this.rootComponent=null),super.detach()}setValue(s){s&&(this.shouldSetValue=!0,this.updateValue(s))}getValue(){return this.dataValue}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}}const am=Ct.Components.components.select;class eo extends am{attach(s){const u=super.attach(s);return(Array.isArray(this.refs.autocompleteInput)?this.refs.autocompleteInput:[this.refs.autocompleteInput]).forEach(b=>{b?.parentNode&&b.parentNode.removeChild(b)}),u}}const pn={pagebreak:br,dynamic_calendar:Bs,calendar:Sr,"calendar-advanced":Mr,sdcfile:Or,address_map:Cr,"list-services":Yr,select:eo};function nm(o){if(!o||typeof o.addComponent!="function")throw new Error("registerFormioComponents requires Formio Components with addComponent(name, component)");return Object.entries(pn).forEach(([s,u])=>{o.addComponent(s,u)}),pn}exports.Calendar=Sr;exports.CalendarAdvanced=Mr;exports.FormioAddressMap=Cr;exports.FormioDynamicCalendar=Bs;exports.FormioListServices=Yr;exports.FormioPageBreak=br;exports.SdcFile=Or;exports.Select=eo;exports.formioCustomComponents=pn;exports.registerFormioComponents=nm;
|
|
87
|
-
//# sourceMappingURL=index.cjs.map
|
|
86
|
+
}`,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}],pt=[{key:`unique`,ignore:!0},{key:`validateOn`,ignore:!0}];function mt(...e){return f.Components.baseEditForm([{key:`display`,components:dt},{key:`data`,components:ut},{label:`File`,key:`file`,weight:5,components:ft},{key:`validation`,components:pt}],...e)}var ht=o(((e,t)=>{t.exports=Array.isArray})),gt=o(((e,t)=>{t.exports=typeof global==`object`&&global&&global.Object===Object&&global})),_t=o(((e,t)=>{var n=gt(),r=typeof self==`object`&&self&&self.Object===Object&&self;t.exports=n||r||Function(`return this`)()})),vt=o(((e,t)=>{t.exports=_t().Symbol})),yt=o(((e,t)=>{var n=vt(),r=Object.prototype,i=r.hasOwnProperty,a=r.toString,o=n?n.toStringTag:void 0;function s(e){var t=i.call(e,o),n=e[o];try{e[o]=void 0;var r=!0}catch{}var s=a.call(e);return r&&(t?e[o]=n:delete e[o]),s}t.exports=s})),bt=o(((e,t)=>{var n=Object.prototype.toString;function r(e){return n.call(e)}t.exports=r})),xt=o(((e,t)=>{var n=vt(),r=yt(),i=bt(),a=`[object Null]`,o=`[object Undefined]`,s=n?n.toStringTag:void 0;function c(e){return e==null?e===void 0?o:a:s&&s in Object(e)?r(e):i(e)}t.exports=c})),St=o(((e,t)=>{function n(e){return typeof e==`object`&&!!e}t.exports=n})),Ct=o(((e,t)=>{var n=xt(),r=St(),i=`[object Symbol]`;function a(e){return typeof e==`symbol`||r(e)&&n(e)==i}t.exports=a})),wt=o(((e,t)=>{var n=ht(),r=Ct(),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;function o(e,t){if(n(e))return!1;var o=typeof e;return o==`number`||o==`symbol`||o==`boolean`||e==null||r(e)?!0:a.test(e)||!i.test(e)||t!=null&&e in Object(t)}t.exports=o})),Tt=o(((e,t)=>{function n(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}t.exports=n})),Et=o(((e,t)=>{var n=xt(),r=Tt(),i=`[object AsyncFunction]`,a=`[object Function]`,o=`[object GeneratorFunction]`,s=`[object Proxy]`;function c(e){if(!r(e))return!1;var t=n(e);return t==a||t==o||t==i||t==s}t.exports=c})),Dt=o(((e,t)=>{t.exports=_t()[`__core-js_shared__`]})),Ot=o(((e,t)=>{var n=Dt(),r=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function i(e){return!!r&&r in e}t.exports=i})),kt=o(((e,t)=>{var n=Function.prototype.toString;function r(e){if(e!=null){try{return n.call(e)}catch{}try{return e+``}catch{}}return``}t.exports=r})),At=o(((e,t)=>{var n=Et(),r=Ot(),i=Tt(),a=kt(),o=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,d=l.hasOwnProperty,f=RegExp(`^`+u.call(d).replace(o,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function p(e){return!i(e)||r(e)?!1:(n(e)?f:s).test(a(e))}t.exports=p})),jt=o(((e,t)=>{function n(e,t){return e?.[t]}t.exports=n})),Mt=o(((e,t)=>{var n=At(),r=jt();function i(e,t){var i=r(e,t);return n(i)?i:void 0}t.exports=i})),Nt=o(((e,t)=>{t.exports=Mt()(Object,`create`)})),Pt=o(((e,t)=>{var n=Nt();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r})),Ft=o(((e,t)=>{function n(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}t.exports=n})),It=o(((e,t)=>{var n=Nt(),r=`__lodash_hash_undefined__`,i=Object.prototype.hasOwnProperty;function a(e){var t=this.__data__;if(n){var a=t[e];return a===r?void 0:a}return i.call(t,e)?t[e]:void 0}t.exports=a})),Lt=o(((e,t)=>{var n=Nt(),r=Object.prototype.hasOwnProperty;function i(e){var t=this.__data__;return n?t[e]!==void 0:r.call(t,e)}t.exports=i})),Rt=o(((e,t)=>{var n=Nt(),r=`__lodash_hash_undefined__`;function i(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=n&&t===void 0?r:t,this}t.exports=i})),zt=o(((e,t)=>{var n=Pt(),r=Ft(),i=It(),a=Lt(),o=Rt();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),Bt=o(((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n})),Vt=o(((e,t)=>{function n(e,t){return e===t||e!==e&&t!==t}t.exports=n})),Ht=o(((e,t)=>{var n=Vt();function r(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}t.exports=r})),Ut=o(((e,t)=>{var n=Ht(),r=Array.prototype.splice;function i(e){var t=this.__data__,i=n(t,e);return i<0?!1:(i==t.length-1?t.pop():r.call(t,i,1),--this.size,!0)}t.exports=i})),Wt=o(((e,t)=>{var n=Ht();function r(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}t.exports=r})),Gt=o(((e,t)=>{var n=Ht();function r(e){return n(this.__data__,e)>-1}t.exports=r})),Kt=o(((e,t)=>{var n=Ht();function r(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}t.exports=r})),qt=o(((e,t)=>{var n=Bt(),r=Ut(),i=Wt(),a=Gt(),o=Kt();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),Jt=o(((e,t)=>{t.exports=Mt()(_t(),`Map`)})),Yt=o(((e,t)=>{var n=zt(),r=qt(),i=Jt();function a(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=a})),Xt=o(((e,t)=>{function n(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}t.exports=n})),Zt=o(((e,t)=>{var n=Xt();function r(e,t){var r=e.__data__;return n(t)?r[typeof t==`string`?`string`:`hash`]:r.map}t.exports=r})),Qt=o(((e,t)=>{var n=Zt();function r(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}t.exports=r})),$t=o(((e,t)=>{var n=Zt();function r(e){return n(this,e).get(e)}t.exports=r})),en=o(((e,t)=>{var n=Zt();function r(e){return n(this,e).has(e)}t.exports=r})),tn=o(((e,t)=>{var n=Zt();function r(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}t.exports=r})),nn=o(((e,t)=>{var n=Yt(),r=Qt(),i=$t(),a=en(),o=tn();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),rn=o(((e,t)=>{var n=nn(),r=`Expected a function`;function i(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(r);var a=function(){var n=arguments,r=t?t.apply(this,n):n[0],i=a.cache;if(i.has(r))return i.get(r);var o=e.apply(this,n);return a.cache=i.set(r,o)||i,o};return a.cache=new(i.Cache||n),a}i.Cache=n,t.exports=i})),an=o(((e,t)=>{var n=rn(),r=500;function i(e){var t=n(e,function(e){return i.size===r&&i.clear(),e}),i=t.cache;return t}t.exports=i})),on=o(((e,t)=>{var n=an(),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g;t.exports=n(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(r,function(e,n,r,a){t.push(r?a.replace(i,`$1`):n||e)}),t})})),sn=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}t.exports=n})),cn=o(((e,t)=>{var n=vt(),r=sn(),i=ht(),a=Ct(),o=1/0,s=n?n.prototype:void 0,c=s?s.toString:void 0;function l(e){if(typeof e==`string`)return e;if(i(e))return r(e,l)+``;if(a(e))return c?c.call(e):``;var t=e+``;return t==`0`&&1/e==-o?`-0`:t}t.exports=l})),ln=o(((e,t)=>{var n=cn();function r(e){return e==null?``:n(e)}t.exports=r})),un=o(((e,t)=>{var n=ht(),r=wt(),i=on(),a=ln();function o(e,t){return n(e)?e:r(e,t)?[e]:i(a(e))}t.exports=o})),dn=o(((e,t)=>{var n=Ct(),r=1/0;function i(e){if(typeof e==`string`||n(e))return e;var t=e+``;return t==`0`&&1/e==-r?`-0`:t}t.exports=i})),Y=o(((e,t)=>{var n=un(),r=dn();function i(e,t){t=n(t,e);for(var i=0,a=t.length;e!=null&&i<a;)e=e[r(t[i++])];return i&&i==a?e:void 0}t.exports=i})),fn=o(((e,t)=>{var n=Y();function r(e,t,r){var i=e==null?void 0:n(e,t);return i===void 0?r:i}t.exports=r})),pn=o(((e,t)=>{var n=Mt();t.exports=function(){try{var e=n(Object,`defineProperty`);return e({},``,{}),e}catch{}}()})),mn=o(((e,t)=>{var n=pn();function r(e,t,r){t==`__proto__`&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}t.exports=r})),hn=o(((e,t)=>{var n=mn(),r=Vt(),i=Object.prototype.hasOwnProperty;function a(e,t,a){var o=e[t];(!(i.call(e,t)&&r(o,a))||a===void 0&&!(t in e))&&n(e,t,a)}t.exports=a})),gn=o(((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(e,t){var i=typeof e;return t??=n,!!t&&(i==`number`||i!=`symbol`&&r.test(e))&&e>-1&&e%1==0&&e<t}t.exports=i})),_n=o(((e,t)=>{var n=hn(),r=un(),i=gn(),a=Tt(),o=dn();function s(e,t,s,c){if(!a(e))return e;t=r(t,e);for(var l=-1,u=t.length,d=u-1,f=e;f!=null&&++l<u;){var p=o(t[l]),m=s;if(p===`__proto__`||p===`constructor`||p===`prototype`)return e;if(l!=d){var h=f[p];m=c?c(h,p,f):void 0,m===void 0&&(m=a(h)?h:i(t[l+1])?[]:{})}n(f,p,m),f=f[p]}return e}t.exports=s})),vn=c(o(((e,t)=>{var n=_n();function r(e,t,r){return e==null?e:n(e,t,r)}t.exports=r}))(),1),yn=c(fn(),1);document.documentElement.lang.toString();var bn=class{constructor(){this.token=null,this.basePath=null,this.init()}init(){this.token=null,this.basePath=N()}async getSessionAuthToken(){let e=this;await x.default.get(e.basePath+`/api/session-auth`).then(t=>{e.token=t.data.token}).catch(e=>{_.default.fire(`'error_message_detail`,`'auth_error'`,`error`)})}getSessionAuthTokenPromise(){let e=this;return new Promise(async(t,n)=>{W(`auth-token`)?t({token:W(`auth-token`)}):await x.default.get(e.basePath+`/api/session-auth?with-cookie=true`,{withCredentials:!0,headers:{"Content-Type":`application/json; charset=utf-8`}}).then(e=>{let t=(0,w.jwtDecode)(e.data.token);t.exp&&G(`auth-token`,e.data.token,t.exp)}).catch(e=>{console.log(e)})})}getToken(){return this.token}execAuthenticatedCall(e){this.token?e(this.token):this.getSessionAuthTokenPromise().then(t=>{this.token=t.token,e(this.token)})}},xn=l.Formio.Components.components.file,Sn=null;document.querySelector(`widget-formio`)!==null&&(Sn=document.querySelector(`widget-formio`).getAttribute(`signature-check-ws-url`));var Cn=({component:e,current:t,onChange:n,i18next:r})=>{let[i,a]=(0,d.useState)([]),[o,s]=(0,d.useState)(new Map),[c,l]=(0,d.useState)(!1),u=new bn;(0,d.useEffect)(()=>{u.getSessionAuthTokenPromise()},[]);let f=(e,t)=>{s(n=>{let r=new Map(n);return r.set(e,{...t,progress:Number(t?.progress)||0}),r})};function p(t){return t.size>(j(e.fileMaxSize)||j(`1GB`))?{code:`size-files`,message:`${r.t(`I file non possono superare le dimensioni di`)} ${e.fileMaxSize?e.fileMaxSize:`1GB`}`}:i.length>=(e.maxFiles?parseInt(e.maxFiles):e.multiple?100:1)?{code:`too-many-files`,message:`${r.t(`Puoi caricare massimo `)} ${e.maxFiles||100} ${r.t(`file`)}`}:t.size<j(e.fileMinSize)?{code:`file-too-small`,message:`${r.t(`I file devono avare una dimensione superiore a `)} ${e.fileMinSize}`}:null}function m(){if(e.filePattern){let t=e.filePattern.split(`,`).map(e=>e.trim()).filter(Boolean).reduce((e,t)=>{let n=t.startsWith(`.`)?t:`.${t}`,r=S.default.getType(n);return r?(e[r]||(e[r]=[]),e[r].push(n),e):e},{});return Object.keys(t).length?t:void 0}else return!0}let h=e=>{let t={};return t.originalName=e.originalName?e.originalName:e.name,t.name=e.name,t.url=e.url,t.data=e.data,t.signature_validation=e.signature_validation,t.mime_type=e.mime_type,t.storage=`url`,t.size=e.size,t},{getRootProps:v,getInputProps:y,fileRejections:w,isDragActive:T,open:E}=(0,b.useDropzone)({onDrop:e=>{e.map(e=>{A(e).then(e=>{})})},maxFiles:e.maxFiles?parseInt(e.maxFiles)-i.length:e.multiple?100:1,validator:p,accept:m()}),D=e=>{let t=N()+`/api/attachments/`+e.data.id;fetch(t,{method:`DELETE`,headers:{"Content-Type":`application/json; charset=utf-8`,Authorization:`Bearer ${W(`auth-token`)}`},strictErrors:!0}).then(()=>{a(t=>{let r=t.filter(t=>t.data.id!==e.data.id);return n(r),r})}).catch(e=>{_.default.fire({title:``,html:`<p>${r.t(`Ci sono stati degli errori durante l'eliminazione del file`)}</p>`,icon:`error`,cancelButtonText:r.t(`Chiudi`),showCancelButton:!0,showConfirmButton:!1}),console.error(e)})},O=()=>{let e=typeof t?.getCurrentValue==`function`?t.getCurrentValue():t?.dataValue;e?.length>0&&(a(e),setTimeout(()=>{n(e)},100))};(0,d.useEffect)(()=>{document.querySelector(`.formio-read-only`)&&c===!1?(l(!0),setTimeout(()=>{O()},1e3)):(l(!1),setTimeout(()=>{O()},1e3))},[]);async function A(i){let o,c=N()+`/it/upload`,l={mime_type:i.type,name:i.name,original_filename:i.name,protocol_required:e.protocol_required,size:i.size};return await x.default.post(c,l,{maxContentLength:1/0,maxBodyLength:1/0}).then(async c=>(o=c.data.id,i.url=N()+`/it/allegati/`+o,i.storage=`url`,i.mime_type=i.type,i.protocol_required=e.protocol_required,i.data={...c.data,baseUrl:N()+`/it/allegati/`+o},f(o,i),await x.default.put(c.data.uri,i,{onUploadProgress:e=>{let t=Math.round(e.loaded*100/e.total);s(e=>{let n=new Map(e),r=i;return r.progress=parseInt(t),n.has(o)&&n.set(o,r),n})},maxContentLength:1/0,maxBodyLength:1/0,headers:{"Content-Type":`multipart/form-data`}}).then(async c=>{let l=c.headers.etag.replace(/\\|"/gi,``)||null;return await x.default.put(N()+`/it/upload/`+o,{file_hash:l,check_signature:e.check_signature}).then(async r=>{s(e=>{let t=new Map(e);return t.delete(o),t});let c=t.dataValue||[],l=null;if(a(e=>{let t=[...e,h(i)];return l=t.length-1,n(t),t}),e.check_signature&&r.data.url&&Sn)return await x.default.post(Sn,{url:r.data.url,content:null},{headers:{"Content-Type":`application/json`}}).then(e=>{i.signature_validation=e.data.sign,c[l].signature_validation=e.data.sign}).catch(e=>{c[l].signature_validation=`File validation error: `+e});s(e=>{let t=new Map(e);return t.delete(o),t})}).catch(e=>{s(e=>{let t=new Map(e);return t.delete(o),t}),console.log(e),_.default.fire({title:``,html:`<p>${r.t(`Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!`)}</p>`,icon:`error`,cancelButtonText:r.t(`Chiudi`),showCancelButton:!0,showConfirmButton:!1})})}).catch(e=>{s(e=>{let t=new Map(e);return t.delete(o),t}),console.log(e),_.default.fire({title:``,html:`<p>${r.t(`Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!`)}</p>`,icon:`error`,cancelButtonText:r.t(`Chiudi`),showCancelButton:!0,showConfirmButton:!1})}))).catch(e=>{console.log(e),_.default.fire({title:``,html:`<p>${r.t(`Ci sono stati degli errori dutante il caricamento dei file, riprova più tardi!`)}</p>`,icon:`error`,cancelButtonText:r.t(`Chiudi`),showCancelButton:!0,showConfirmButton:!1}),s(e=>{let t=new Map(e);return t.delete(o),t})})}function j(e){if(typeof e==`string`){if(e.search(/kb/i)===e.length-2)return parseFloat(e.substring(0,e.length-2)*1024);if(e.search(/mb/i)===e.length-2)return parseFloat(e.substring(0,e.length-2)*1024*1024);if(e.search(/gb/i)===e.length-2)return parseFloat(e.substring(0,e.length-2)*1024*1024*1024);if(e.search(/b/i)===e.length-1||e.search(/s/i)===e.length-1)return parseFloat(e.substring(0,e.length-1));if(e.search(/m/i)===e.length-1)return parseFloat(e.substring(0,e.length-1)*60);if(e.search(/h/i)===e.length-1)return parseFloat(e.substring(0,e.length-1)*3600)}return e}function M(e,t=2){if(!+e)return`0 Bytes`;let n=1024,r=t<0?0:t,i=[`Bytes`,`KB`,`MB`,`GB`,`TB`,`PB`,`EB`,`ZB`,`YB`],a=Math.floor(Math.log(e)/Math.log(n));return`${parseFloat((e/n**+a).toFixed(r))} ${i[a]}`}return t.conditionallyHidden()||t.visible===!1?null:(0,k.jsx)(k.Fragment,{children:c?(0,k.jsxs)(`div`,{children:[(0,k.jsxs)(`label`,{className:`col-form-label floating-label`,htmlFor:`${e.id}-${e.key}`,children:[e.label,e.validate.required&&(0,k.jsx)(`span`,{className:`text-danger`})]}),(0,k.jsxs)(`ul`,{className:`upload-file-list`,children:[i.map((e,t)=>(0,k.jsxs)(`li`,{className:`upload-file success mw-100`,children:[(0,k.jsx)(g.Icon,{"aria-hidden":`true`,color:`primary`,icon:`it-file`,title:`Icona file`,size:`sm`}),(0,k.jsxs)(`p`,{children:[(0,k.jsx)(`span`,{className:`visually-hidden`,children:r.t(`File caricato:`)}),e.name,(0,k.jsx)(`span`,{className:`upload-file-weight`,children:M(e.size)})]})]},e.size+t)),i.length<1&&(0,k.jsxs)(`li`,{className:`upload-file text-secondary mw-100`,children:[(0,k.jsx)(g.Icon,{"aria-hidden":`true`,color:`light`,icon:`it-files`,title:`Icona file`,size:`sm`}),(0,k.jsx)(`p`,{children:r.t(`Nessun elemento`)})]})]})]}):(0,k.jsxs)(k.Fragment,{children:[e.hideLabel||e.hidden?``:(0,k.jsxs)(`label`,{className:`col-form-label floating-label`,htmlFor:`${e.id}-${e.key}`,title:e.tooltip||void 0,children:[e.label,e.validate.required&&(0,k.jsx)(`span`,{className:`text-danger`}),e.tooltip&&(0,k.jsx)(`i`,{tabIndex:0,className:`bi bi-question-circle text-muted ms-1`,"data-tooltip":e.tooltip,"aria-expanded":`false`})]}),(0,k.jsxs)(`div`,{className:`my-1 border-2 border-light file-uploader-box rounded p-3 text-secondary${T?` dragover`:``}`,style:{border:`dashed`},...v({onClick:e=>e.stopPropagation()}),children:[(0,k.jsx)(`input`,{id:`${e.id}-${e.key}`,"aria-describedby":`file-uploader-description-${e.id}-${e.key}`,...y()}),(0,k.jsxs)(`div`,{className:`upload-dragdrop${T?` dragover`:``}`,children:[(0,k.jsx)(`div`,{className:`ms-1 me-3`,children:(0,k.jsx)(g.Icon,{color:`secondary`,icon:`it-upload`,title:r.t(`Carica file`),size:`_sm`})}),(0,k.jsxs)(`div`,{className:`upload-dragdrop-text`,children:[(0,k.jsx)(`div`,{className:`h5`,id:`file-uploader-description-${e.id}-${e.key}`,children:r.t(`Trascina il file per caricarlo`)}),(0,k.jsxs)(`p`,{className:`d-inline-flex`,children:[r.t(`oppure`),(0,k.jsx)(g.Button,{tag:`input`,type:`button`,value:r.t(`selezionalo dal dispositivo`),onClick:E,className:`px-1 py-0 text-decoration-underline primary-color`,size:`xs`})]})]})]})]}),(0,k.jsx)(`div`,{dangerouslySetInnerHTML:{__html:C.default.sanitize(e.description||``)}}),(0,k.jsxs)(`ul`,{className:`upload-file-list my-0`,children:[i.map((e,t)=>(0,k.jsxs)(`li`,{className:`upload-file success`,children:[(0,k.jsx)(g.Icon,{"aria-hidden":`true`,color:`primary`,icon:`it-file`,title:`Icona file`,size:`sm`}),(0,k.jsxs)(`p`,{children:[(0,k.jsx)(`span`,{className:`visually-hidden`,children:r.t(`File caricato:`)}),e.name,(0,k.jsx)(`span`,{className:`upload-file-weight`,children:M(e.size)})]}),(0,k.jsx)(g.Button,{className:`px-1`,onClick:()=>D(e),children:(0,k.jsx)(g.Icon,{title:`${r.t(`Elimina file caricato`)} ${e.name}`,color:`secondary`,icon:`it-delete`,className:`ms-auto pointer`,size:`sm`})})]},e.size+t)),Array.from(o.entries()).map(([e,t])=>(0,k.jsxs)(`li`,{className:`upload-file success`,children:[(0,k.jsx)(g.Icon,{"aria-hidden":`true`,color:`primary`,icon:`it-file`,title:`Icona file`,size:`sm`}),(0,k.jsxs)(`p`,{children:[(0,k.jsx)(`span`,{className:`visually-hidden`,children:r.t(`Caricamento file:`)}),t.name,(0,k.jsx)(`span`,{className:`upload-file-weight`,children:M(t.size)})]}),(0,k.jsx)(g.Progress,{value:Number(t?.progress)||0})]},e))]}),!!(w&&w.length)&&(0,k.jsx)(`div`,{className:`formio-error-wrapper`,children:(0,k.jsx)(`ul`,{className:`formio-errors upload-file-list my-0 `,children:w.map(({file:t,errors:n},i)=>(0,k.jsxs)(`li`,{className:`upload-file error`,children:[(0,k.jsxs)(`div`,{className:`upload-file-name-error-wrapper`,children:[(0,k.jsx)(g.Icon,{"aria-hidden":`true`,color:`error`,icon:`it-error`,title:`Icona file`,size:`sm`}),(0,k.jsxs)(`p`,{className:`text-wrap error`,children:[(0,k.jsx)(`span`,{className:`visually-hidden`,children:r.t(`Errore caricamento file:`)}),t.name,(0,k.jsx)(`span`,{className:`upload-file-weight`,children:M(t.size)})]})]}),(0,k.jsx)(`div`,{children:n.map(t=>t.code===`file-invalid-type`?(0,k.jsxs)(`p`,{className:`text-wrap ms-0`,children:[r.t(`I file possono essere di tipo `),e.filePattern]}):t.code===`too-many-files`?(0,k.jsxs)(`p`,{className:`text-wrap ms-0`,children:[r.t(`Puoi caricare massimo `),` `,e.maxFiles?e.maxFiles:e.multiple?100:1,` `,r.t(`file`)]}):(0,k.jsx)(`p`,{className:`text-wrap ms-0`,children:t.message}))})]},t.size+i))})})]})})},wn=class e extends xn{constructor(e,t,n){super({...e,clearOnHide:!1},t,n),this.reactRef=null,this.lastRenderedVisible=void 0,this.rootComponent=null,this.mountNode=null}static get builderInfo(){return{title:`File Sdc`,group:`basic`,icon:`bi bi-file-earmark-text`,documentation:``,weight:70,schema:e.schema()}}get emptyValue(){return[]}init(){if(super.init(),this.component?.multiple&&!Array.isArray(this.getCurrentValue())){this.dataValue=[];let e=this.path||this.component?.key;e&&this.rootValue&&(0,vn.default)(this.rootValue,e,[])}}static schema(){return xn.schema({type:`sdcfile`,modelType:`array`})}static editForm=mt;getI18next(){return this.i18next&&typeof this.i18next.t==`function`?this.i18next:{language:this.options?.language||document?.documentElement?.lang||`it`,t:(e,t)=>this.t(e,t)}}hideFileProcessingLoader(){this.refs?.fileProcessingLoader&&(this.refs.fileProcessingLoader.style.display=`none`)}renderReact(){if(this.rootComponent){if(this.builderMode){this.rootComponent.render((0,k.jsx)(`div`,{className:`my-1 border border-2 border-light file-uploader-box rounded p-3 text-secondary`,children:(0,k.jsx)(`div`,{className:`upload-dragdrop`,children:(0,k.jsx)(`div`,{className:`upload-dragdrop-text`,children:(0,k.jsx)(`div`,{className:`h6 mb-0`,children:this.component?.label||`File Sdc`})})})}));return}this.rootComponent.render((0,k.jsx)(Cn,{component:this.component,current:this,i18next:this.getI18next(),onChange:e=>this.updateValueFromReact(e)}))}}attach(e){let t=super.attach(e);this.hideFileProcessingLoader();let n=`react-${this.id}`;this.loadRefs(e,{[n]:`single`});let r=this.refs[n];return r?(this.rootComponent&&this.mountNode!==r&&(this.rootComponent.unmount(),this.rootComponent=null),this.rootComponent||=(0,u.createRoot)(r),this.mountNode=r,this.lastRenderedVisible=this.visible,this.renderReact(),t):t}updateValueFromReact(e,t={modified:!0}){let n=this.normalizeValue(e,t),r=this.updateValue(n,t),i=this.path||this.component?.key;if(i&&this.rootValue){let e=(0,yn.default)(this.rootValue,i);this.isEqual(e,n)||(0,vn.default)(this.rootValue,i,n)}return r}setValue(e,t={}){let n=this.normalizeValue(e,t),r=super.setValue(n,t),i=this.path||this.component?.key;if(i&&this.rootValue){let e=(0,yn.default)(this.rootValue,i);this.isEqual(e,n)||(0,vn.default)(this.rootValue,i,n)}return r}normalizeValue(e,t={}){let n=super.normalizeValue(e,t);return!this.component?.multiple||Array.isArray(n)?n:n==null||n===``?[]:[n]}detach(){return this.hideFileProcessingLoader(),this.rootComponent&&=(this.rootComponent.unmount(),null),this.mountNode=null,super.detach()}getValue(){return this.getCurrentValue()}get validationValue(){return this.getCurrentValue()}getCurrentValue(){let e=super.getValue(),t=this.path||this.component?.key,n=t&&this.rootValue?(0,yn.default)(this.rootValue,t):void 0;return this.component?.multiple?Array.isArray(e)&&e.length>0?e:Array.isArray(n)?n:[]:e??n??null}isEmpty(e=this.validationValue){return this.component?.multiple?!Array.isArray(e)||e.length===0:e==null||e===``}checkCondition(e,t){let n=super.checkCondition(e,t),r=this.visible;return this.lastRenderedVisible!==r&&(this.lastRenderedVisible=r,this.renderReact()),n}render(){let e=`<div ref="react-${this.id}"></div>`;return Object.getPrototypeOf(Object.getPrototypeOf(xn.prototype)).render.call(this,e)}},Tn=[{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 En(...e){return f.Components.baseEditForm([{key:`display`,components:Tn}],...e)}var Dn=o(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(require(`react`)):typeof define==`function`&&define.amd?define(`Autocomplete`,[`react`],r):typeof e==`object`?e.Autocomplete=r(require(`react`)):n.Autocomplete=r(n.React)})(e,(function(e){return function(){"use strict";var t={680:function(t){t.exports=e},8952:function(e,t,n){var r=n(4328),i=n(36),a=TypeError;e.exports=function(e){if(r(e))return e;throw new a(i(e)+` is not a function`)}},2096:function(e,t,n){var r=n(2424),i=String,a=TypeError;e.exports=function(e){if(r(e))return e;throw new a(`Can't set `+i(e)+` as a prototype`)}},4764:function(e,t,n){var r=n(9764).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},6100:function(e,t,n){var r=n(7e3),i=TypeError;e.exports=function(e,t){if(r(t,e))return e;throw new i(`Incorrect invocation`)}},3951:function(e,t,n){var r=n(1632),i=String,a=TypeError;e.exports=function(e){if(r(e))return e;throw new a(i(e)+` is not an object`)}},2504:function(e,t,n){var r=n(4096),i=n(2495),a=n(3556),o=function(e){return function(t,n,o){var s=r(t),c=a(s);if(c===0)return!e&&-1;var l,u=i(o,c);if(e&&n!=n){for(;c>u;)if((l=s[u++])!=l)return!0}else for(;c>u;u++)if((e||u in s)&&s[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:o(!0),indexOf:o(!1)}},3364:function(e,t,n){var r=n(8992),i=n(1664),a=n(5712),o=n(4356),s=n(3556),c=n(2568),l=i([].push),u=function(e){var t=e===1,n=e===2,i=e===3,u=e===4,d=e===6,f=e===7,p=e===5||d;return function(m,h,g,_){for(var v,y,b=o(m),x=a(b),S=s(x),C=r(h,g),w=0,T=_||c,E=t?T(m,S):n||f?T(m,0):void 0;S>w;w++)if((p||w in x)&&(y=C(v=x[w],w,b),e))if(t)E[w]=y;else if(y)switch(e){case 3:return!0;case 5:return v;case 6:return w;case 2:l(E,v)}else switch(e){case 4:return!1;case 7:l(E,v)}return d?-1:i||u?u:E}};e.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)}},953:function(e,t,n){var r=n(9957),i=n(9972),a=n(8504),o=i(`species`);e.exports=function(e){return a>=51||!r((function(){var t=[];return(t.constructor={})[o]=function(){return{foo:1}},t[e](Boolean).foo!==1}))}},1496:function(e,t,n){var r=n(9957);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){return 1},1)}))}},6728:function(e,t,n){var r=n(3476),i=n(1432),a=TypeError,o=Object.getOwnPropertyDescriptor;e.exports=r&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],`length`,{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,t){if(i(e)&&!o(e,`length`).writable)throw new a(`Cannot set read only .length`);return e.length=t}:function(e,t){return e.length=t}},6736:function(e,t,n){var r=n(1432),i=n(6072),a=n(1632),o=n(9972)(`species`),s=Array;e.exports=function(e){var t;return r(e)&&(t=e.constructor,(i(t)&&(t===s||r(t.prototype))||a(t)&&(t=t[o])===null)&&(t=void 0)),t===void 0?s:t}},2568:function(e,t,n){var r=n(6736);e.exports=function(e,t){return new(r(e))(t===0?0:t)}},8696:function(e,t,n){var r=n(3951),i=n(3112);e.exports=function(e,t,n,a){try{return a?t(r(n)[0],n[1]):t(n)}catch(t){i(e,`throw`,t)}}},1888:function(e,t,n){var r=n(1664),i=r({}.toString),a=r(``.slice);e.exports=function(e){return a(i(e),8,-1)}},4427:function(e,t,n){var r=n(16),i=n(4328),a=n(1888),o=n(9972)(`toStringTag`),s=Object,c=a(function(){return arguments}())===`Arguments`;e.exports=r?a:function(e){var t,n,r;return e===void 0?`Undefined`:e===null?`Null`:typeof(n=function(e,t){try{return e[t]}catch{}}(t=s(e),o))==`string`?n:c?a(t):(r=a(t))===`Object`&&i(t.callee)?`Arguments`:r}},9968:function(e,t,n){var r=n(5152),i=n(9252),a=n(9444),o=n(8352);e.exports=function(e,t,n){for(var s=i(t),c=o.f,l=a.f,u=0;u<s.length;u++){var d=s[u];r(e,d)||n&&r(n,d)||c(e,d,l(t,d))}}},2272:function(e,t,n){e.exports=!n(9957)((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},3336:function(e){e.exports=function(e,t){return{value:e,done:t}}},3440:function(e,t,n){var r=n(3476),i=n(8352),a=n(9728);e.exports=r?function(e,t,n){return i.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},9728:function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},92:function(e,t,n){var r=n(3476),i=n(8352),a=n(9728);e.exports=function(e,t,n){r?i.f(e,t,a(0,n)):e[t]=n}},2544:function(e,t,n){var r=n(5312),i=n(8352);e.exports=function(e,t,n){return n.get&&r(n.get,t,{getter:!0}),n.set&&r(n.set,t,{setter:!0}),i.f(e,t,n)}},6076:function(e,t,n){var r=n(4328),i=n(8352),a=n(5312),o=n(4636);e.exports=function(e,t,n,s){s||={};var c=s.enumerable,l=s.name===void 0?t:s.name;if(r(n)&&a(n,l,s),s.global)c?e[t]=n:o(t,n);else{try{s.unsafe?e[t]&&(c=!0):delete e[t]}catch{}c?e[t]=n:i.f(e,t,{value:n,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return e}},4036:function(e,t,n){var r=n(6076);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},4636:function(e,t,n){var r=n(6420),i=Object.defineProperty;e.exports=function(e,t){try{i(r,e,{value:t,configurable:!0,writable:!0})}catch{r[e]=t}return t}},3476:function(e,t,n){e.exports=!n(9957)((function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}))},8168:function(e,t,n){var r=n(6420),i=n(1632),a=r.document,o=i(a)&&i(a.createElement);e.exports=function(e){return o?a.createElement(e):{}}},4316:function(e){var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t(`Maximum allowed index exceeded`);return e}},6064:function(e){e.exports=typeof navigator<`u`&&String(navigator.userAgent)||``},8504:function(e,t,n){var r,i,a=n(6420),o=n(6064),s=a.process,c=a.Deno,l=s&&s.versions||c&&c.version,u=l&&l.v8;u&&(i=(r=u.split(`.`))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&o&&(!(r=o.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=o.match(/Chrome\/(\d+)/))&&(i=+r[1]),e.exports=i},8256:function(e){e.exports=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`]},6520:function(e,t,n){var r=n(1664),i=Error,a=r(``.replace),o=String(new i(`zxcasd`).stack),s=/\n\s*at [^:]*:[^\n]*/,c=s.test(o);e.exports=function(e,t){if(c&&typeof e==`string`&&!i.prepareStackTrace)for(;t--;)e=a(e,s,``);return e}},3696:function(e,t,n){var r=n(3440),i=n(6520),a=n(9184),o=Error.captureStackTrace;e.exports=function(e,t,n,s){a&&(o?o(e,t):r(e,`stack`,i(n,s)))}},9184:function(e,t,n){var r=n(9957),i=n(9728);e.exports=!r((function(){var e=Error(`a`);return!(`stack`in e)||(Object.defineProperty(e,`stack`,i(1,7)),e.stack!==7)}))},9160:function(e,t,n){var r=n(6420),i=n(9444).f,a=n(3440),o=n(6076),s=n(4636),c=n(9968),l=n(6704);e.exports=function(e,t){var n,u,d,f,p,m=e.target,h=e.global,g=e.stat;if(n=h?r:g?r[m]||s(m,{}):r[m]&&r[m].prototype)for(u in t){if(f=t[u],d=e.dontCallGetSet?(p=i(n,u))&&p.value:n[u],!l(h?u:m+(g?`.`:`#`)+u,e.forced)&&d!==void 0){if(typeof f==typeof d)continue;c(f,d)}(e.sham||d&&d.sham)&&a(f,`sham`,!0),o(n,u,f,e)}}},9957:function(e){e.exports=function(e){try{return!!e()}catch{return!0}}},7176:function(e,t,n){n(880);var r=n(8448),i=n(6076),a=n(7680),o=n(9957),s=n(9972),c=n(3440),l=s(`species`),u=RegExp.prototype;e.exports=function(e,t,n,d){var f=s(e),p=!o((function(){var t={};return t[f]=function(){return 7},``[e](t)!==7})),m=p&&!o((function(){var t=!1,n=/a/;return e===`split`&&((n={}).constructor={},n.constructor[l]=function(){return n},n.flags=``,n[f]=/./[f]),n.exec=function(){return t=!0,null},n[f](``),!t}));if(!p||!m||n){var h=/./[f],g=t(f,``[e],(function(e,t,n,i,o){var s=t.exec;return s===a||s===u.exec?p&&!o?{done:!0,value:r(h,t,n,i)}:{done:!0,value:r(e,n,t,i)}:{done:!1}}));i(String.prototype,e,g[0]),i(u,f,g[1])}d&&c(u[f],`sham`,!0)}},908:function(e,t,n){var r=n(7332),i=Function.prototype,a=i.apply,o=i.call;e.exports=typeof Reflect==`object`&&Reflect.apply||(r?o.bind(a):function(){return o.apply(a,arguments)})},8992:function(e,t,n){var r=n(3180),i=n(8952),a=n(7332),o=r(r.bind);e.exports=function(e,t){return i(e),t===void 0?e:a?o(e,t):function(){return e.apply(t,arguments)}}},7332:function(e,t,n){e.exports=!n(9957)((function(){var e=function(){}.bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)}))},8448:function(e,t,n){var r=n(7332),i=Function.prototype.call;e.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},6208:function(e,t,n){var r=n(3476),i=n(5152),a=Function.prototype,o=r&&Object.getOwnPropertyDescriptor,s=i(a,`name`);e.exports={EXISTS:s,PROPER:s&&function(){}.name===`something`,CONFIGURABLE:s&&(!r||r&&o(a,`name`).configurable)}},5288:function(e,t,n){var r=n(1664),i=n(8952);e.exports=function(e,t,n){try{return r(i(Object.getOwnPropertyDescriptor(e,t)[n]))}catch{}}},3180:function(e,t,n){var r=n(1888),i=n(1664);e.exports=function(e){if(r(e)===`Function`)return i(e)}},1664:function(e,t,n){var r=n(7332),i=Function.prototype,a=i.call,o=r&&i.bind.bind(a,a);e.exports=r?o:function(e){return function(){return a.apply(e,arguments)}}},5232:function(e,t,n){var r=n(6420),i=n(4328);e.exports=function(e,t){return arguments.length<2?(n=r[e],i(n)?n:void 0):r[e]&&r[e][t];var n}},6752:function(e){e.exports=function(e){return{iterator:e,next:e.next,done:!1}}},4504:function(e,t,n){var r=n(8952),i=n(9760);e.exports=function(e,t){var n=e[t];return i(n)?void 0:r(n)}},6420:function(e,t,n){var r=function(e){return e&&e.Math===Math&&e};e.exports=r(typeof globalThis==`object`&&globalThis)||r(typeof window==`object`&&window)||r(typeof self==`object`&&self)||r(typeof n.g==`object`&&n.g)||r(typeof this==`object`&&this)||function(){return this}()||Function(`return this`)()},5152:function(e,t,n){var r=n(1664),i=n(4356),a=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return a(i(e),t)}},2560:function(e){e.exports={}},4168:function(e,t,n){e.exports=n(5232)(`document`,`documentElement`)},9888:function(e,t,n){var r=n(3476),i=n(9957),a=n(8168);e.exports=!r&&!i((function(){return Object.defineProperty(a(`div`),`a`,{get:function(){return 7}}).a!==7}))},5712:function(e,t,n){var r=n(1664),i=n(9957),a=n(1888),o=Object,s=r(``.split);e.exports=i((function(){return!o(`z`).propertyIsEnumerable(0)}))?function(e){return a(e)===`String`?s(e,``):o(e)}:o},7512:function(e,t,n){var r=n(4328),i=n(1632),a=n(4024);e.exports=function(e,t,n){var o,s;return a&&r(o=t.constructor)&&o!==n&&i(s=o.prototype)&&s!==n.prototype&&a(e,s),e}},9112:function(e,t,n){var r=n(1664),i=n(4328),a=n(3976),o=r(Function.toString);i(a.inspectSource)||(a.inspectSource=function(e){return o(e)}),e.exports=a.inspectSource},3480:function(e,t,n){var r=n(1632),i=n(3440);e.exports=function(e,t){r(t)&&`cause`in t&&i(e,`cause`,t.cause)}},9104:function(e,t,n){var r,i,a,o=n(4288),s=n(6420),c=n(1632),l=n(3440),u=n(5152),d=n(3976),f=n(6504),p=n(2560),m=`Object already initialized`,h=s.TypeError,g=s.WeakMap;if(o||d.state){var _=d.state||=new g;_.get=_.get,_.has=_.has,_.set=_.set,r=function(e,t){if(_.has(e))throw new h(m);return t.facade=e,_.set(e,t),t},i=function(e){return _.get(e)||{}},a=function(e){return _.has(e)}}else{var v=f(`state`);p[v]=!0,r=function(e,t){if(u(e,v))throw new h(m);return t.facade=e,l(e,v,t),t},i=function(e){return u(e,v)?e[v]:{}},a=function(e){return u(e,v)}}e.exports={set:r,get:i,has:a,enforce:function(e){return a(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!c(t)||(n=i(t)).type!==e)throw new h(`Incompatible receiver, `+e+` required`);return n}}}},1432:function(e,t,n){var r=n(1888);e.exports=Array.isArray||function(e){return r(e)===`Array`}},4328:function(e){var t=typeof document==`object`&&document.all;e.exports=t===void 0&&t!==void 0?function(e){return typeof e==`function`||e===t}:function(e){return typeof e==`function`}},6072:function(e,t,n){var r=n(1664),i=n(9957),a=n(4328),o=n(4427),s=n(5232),c=n(9112),l=function(){},u=s(`Reflect`,`construct`),d=/^\s*(?:class|function)\b/,f=r(d.exec),p=!d.test(l),m=function(e){if(!a(e))return!1;try{return u(l,[],e),!0}catch{return!1}},h=function(e){if(!a(e))return!1;switch(o(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}try{return p||!!f(d,c(e))}catch{return!0}};h.sham=!0,e.exports=!u||i((function(){var e;return m(m.call)||!m(Object)||!m((function(){e=!0}))||e}))?h:m},6704:function(e,t,n){var r=n(9957),i=n(4328),a=/#|\.prototype\./,o=function(e,t){var n=c[s(e)];return n===u||n!==l&&(i(t)?r(t):!!t)},s=o.normalize=function(e){return String(e).replace(a,`.`).toLowerCase()},c=o.data={},l=o.NATIVE=`N`,u=o.POLYFILL=`P`;e.exports=o},9760:function(e){e.exports=function(e){return e==null}},1632:function(e,t,n){var r=n(4328);e.exports=function(e){return typeof e==`object`?e!==null:r(e)}},2424:function(e,t,n){var r=n(1632);e.exports=function(e){return r(e)||e===null}},7048:function(e){e.exports=!1},7728:function(e,t,n){var r=n(5232),i=n(4328),a=n(7e3),o=n(6536),s=Object;e.exports=o?function(e){return typeof e==`symbol`}:function(e){var t=r(`Symbol`);return i(t)&&a(t.prototype,s(e))}},3112:function(e,t,n){var r=n(8448),i=n(3951),a=n(4504);e.exports=function(e,t,n){var o,s;i(e);try{if(!(o=a(e,`return`))){if(t===`throw`)throw n;return n}o=r(o,e)}catch(e){s=!0,o=e}if(t===`throw`)throw n;if(s)throw o;return i(o),n}},9724:function(e,t,n){var r=n(8448),i=n(9368),a=n(3440),o=n(4036),s=n(9972),c=n(9104),l=n(4504),u=n(336).IteratorPrototype,d=n(3336),f=n(3112),p=s(`toStringTag`),m=`IteratorHelper`,h=`WrapForValidIterator`,g=c.set,_=function(e){var t=c.getterFor(e?h:m);return o(i(u),{next:function(){var n=t(this);if(e)return n.nextHandler();try{return d(n.done?void 0:n.nextHandler(),n.done)}catch(e){throw n.done=!0,e}},return:function(){var n=t(this),i=n.iterator;if(n.done=!0,e){var a=l(i,`return`);return a?r(a,i):d(void 0,!0)}if(n.inner)try{f(n.inner.iterator,`normal`)}catch(e){return f(i,`throw`,e)}return f(i,`normal`),d(void 0,!0)}})},v=_(!0),y=_(!1);a(y,p,`Iterator Helper`),e.exports=function(e,t){var n=function(n,r){r?(r.iterator=n.iterator,r.next=n.next):r=n,r.type=t?h:m,r.nextHandler=e,r.counter=0,r.done=!1,g(this,r)};return n.prototype=t?v:y,n}},5792:function(e,t,n){var r=n(8448),i=n(8952),a=n(3951),o=n(6752),s=n(9724),c=n(8696),l=s((function(){var e=this.iterator,t=a(r(this.next,e));if(!(this.done=!!t.done))return c(e,this.mapper,[t.value,this.counter++],!0)}));e.exports=function(e){return a(this),i(e),new l(o(this),{mapper:e})}},336:function(e,t,n){var r,i,a,o=n(9957),s=n(4328),c=n(1632),l=n(9368),u=n(7796),d=n(6076),f=n(9972),p=n(7048),m=f(`iterator`),h=!1;[].keys&&(`next`in(a=[].keys())?(i=u(u(a)))!==Object.prototype&&(r=i):h=!0),!c(r)||o((function(){var e={};return r[m].call(e)!==e}))?r={}:p&&(r=l(r)),s(r[m])||d(r,m,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},3556:function(e,t,n){var r=n(7584);e.exports=function(e){return r(e.length)}},5312:function(e,t,n){var r=n(1664),i=n(9957),a=n(4328),o=n(5152),s=n(3476),c=n(6208).CONFIGURABLE,l=n(9112),u=n(9104),d=u.enforce,f=u.get,p=String,m=Object.defineProperty,h=r(``.slice),g=r(``.replace),_=r([].join),v=s&&!i((function(){return m((function(){}),`length`,{value:8}).length!==8})),y=String(String).split(`String`),b=e.exports=function(e,t,n){h(p(t),0,7)===`Symbol(`&&(t=`[`+g(p(t),/^Symbol\(([^)]*)\).*$/,`$1`)+`]`),n&&n.getter&&(t=`get `+t),n&&n.setter&&(t=`set `+t),(!o(e,`name`)||c&&e.name!==t)&&(s?m(e,`name`,{value:t,configurable:!0}):e.name=t),v&&n&&o(n,`arity`)&&e.length!==n.arity&&m(e,`length`,{value:n.arity});try{n&&o(n,`constructor`)&&n.constructor?s&&m(e,`prototype`,{writable:!1}):e.prototype&&=void 0}catch{}var r=d(e);return o(r,`source`)||(r.source=_(y,typeof t==`string`?t:``)),e};Function.prototype.toString=b((function(){return a(this)&&f(this).source||l(this)}),`toString`)},1748:function(e){var t=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?n:t)(r)}},8948:function(e,t,n){var r=n(5016);e.exports=function(e,t){return e===void 0?arguments.length<2?``:t:r(e)}},9292:function(e,t,n){var r=n(3476),i=n(1664),a=n(8448),o=n(9957),s=n(1531),c=n(9392),l=n(8912),u=n(4356),d=n(5712),f=Object.assign,p=Object.defineProperty,m=i([].concat);e.exports=!f||o((function(){if(r&&f({b:1},f(p({},`a`,{enumerable:!0,get:function(){p(this,`b`,{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},n=Symbol(`assign detection`),i=`abcdefghijklmnopqrst`;return e[n]=7,i.split(``).forEach((function(e){t[e]=e})),f({},e)[n]!==7||s(f({},t)).join(``)!==i}))?function(e,t){for(var n=u(e),i=arguments.length,o=1,f=c.f,p=l.f;i>o;)for(var h,g=d(arguments[o++]),_=f?m(s(g),f(g)):s(g),v=_.length,y=0;v>y;)h=_[y++],r&&!a(p,g,h)||(n[h]=g[h]);return n}:f},9368:function(e,t,n){var r,i=n(3951),a=n(2056),o=n(8256),s=n(2560),c=n(4168),l=n(8168),u=n(6504),d=`prototype`,f=`script`,p=u(`IE_PROTO`),m=function(){},h=function(e){return`<`+f+`>`+e+`</`+f+`>`},g=function(e){e.write(h(``)),e.close();var t=e.parentWindow.Object;return e=null,t},_=function(){try{r=new ActiveXObject(`htmlfile`)}catch{}var e,t,n;_=typeof document<`u`?document.domain&&r?g(r):(t=l(`iframe`),n=`java`+f+`:`,t.style.display=`none`,c.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(h(`document.F=Object`)),e.close(),e.F):g(r);for(var i=o.length;i--;)delete _[d][o[i]];return _()};s[p]=!0,e.exports=Object.create||function(e,t){var n;return e===null?n=_():(m[d]=i(e),n=new m,m[d]=null,n[p]=e),t===void 0?n:a.f(n,t)}},2056:function(e,t,n){var r=n(3476),i=n(1576),a=n(8352),o=n(3951),s=n(4096),c=n(1531);t.f=r&&!i?Object.defineProperties:function(e,t){o(e);for(var n,r=s(t),i=c(t),l=i.length,u=0;l>u;)a.f(e,n=i[u++],r[n]);return e}},8352:function(e,t,n){var r=n(3476),i=n(9888),a=n(1576),o=n(3951),s=n(88),c=TypeError,l=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d=`enumerable`,f=`configurable`,p=`writable`;t.f=r?a?function(e,t,n){if(o(e),t=s(t),o(n),typeof e==`function`&&t===`prototype`&&`value`in n&&p in n&&!n[p]){var r=u(e,t);r&&r[p]&&(e[t]=n.value,n={configurable:f in n?n[f]:r[f],enumerable:d in n?n[d]:r[d],writable:!1})}return l(e,t,n)}:l:function(e,t,n){if(o(e),t=s(t),o(n),i)try{return l(e,t,n)}catch{}if(`get`in n||`set`in n)throw new c(`Accessors not supported`);return`value`in n&&(e[t]=n.value),e}},9444:function(e,t,n){var r=n(3476),i=n(8448),a=n(8912),o=n(9728),s=n(4096),c=n(88),l=n(5152),u=n(9888),d=Object.getOwnPropertyDescriptor;t.f=r?d:function(e,t){if(e=s(e),t=c(t),u)try{return d(e,t)}catch{}if(l(e,t))return o(!i(a.f,e,t),e[t])}},5048:function(e,t,n){var r=n(9008),i=n(8256).concat(`length`,`prototype`);t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},9392:function(e,t){t.f=Object.getOwnPropertySymbols},7796:function(e,t,n){var r=n(5152),i=n(4328),a=n(4356),o=n(6504),s=n(2272),c=o(`IE_PROTO`),l=Object,u=l.prototype;e.exports=s?l.getPrototypeOf:function(e){var t=a(e);if(r(t,c))return t[c];var n=t.constructor;return i(n)&&t instanceof n?n.prototype:t instanceof l?u:null}},7e3:function(e,t,n){e.exports=n(1664)({}.isPrototypeOf)},9008:function(e,t,n){var r=n(1664),i=n(5152),a=n(4096),o=n(2504).indexOf,s=n(2560),c=r([].push);e.exports=function(e,t){var n,r=a(e),l=0,u=[];for(n in r)!i(s,n)&&i(r,n)&&c(u,n);for(;t.length>l;)i(r,n=t[l++])&&(~o(u,n)||c(u,n));return u}},1531:function(e,t,n){var r=n(9008),i=n(8256);e.exports=Object.keys||function(e){return r(e,i)}},8912:function(e,t){var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor;t.f=r&&!n.call({1:2},1)?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},4024:function(e,t,n){var r=n(5288),i=n(3951),a=n(2096);e.exports=Object.setPrototypeOf||(`__proto__`in{}?function(){var e,t=!1,n={};try{(e=r(Object.prototype,`__proto__`,`set`))(n,[]),t=n instanceof Array}catch{}return function(n,r){return i(n),a(r),t?e(n,r):n.__proto__=r,n}}():void 0)},7032:function(e,t,n){var r=n(16),i=n(4427);e.exports=r?{}.toString:function(){return`[object `+i(this)+`]`}},2104:function(e,t,n){var r=n(8448),i=n(4328),a=n(1632),o=TypeError;e.exports=function(e,t){var n,s;if(t===`string`&&i(n=e.toString)&&!a(s=r(n,e))||i(n=e.valueOf)&&!a(s=r(n,e))||t!==`string`&&i(n=e.toString)&&!a(s=r(n,e)))return s;throw new o(`Can't convert object to primitive value`)}},9252:function(e,t,n){var r=n(5232),i=n(1664),a=n(5048),o=n(9392),s=n(3951),c=i([].concat);e.exports=r(`Reflect`,`ownKeys`)||function(e){var t=a.f(s(e)),n=o.f;return n?c(t,n(e)):t}},584:function(e,t,n){var r=n(8352).f;e.exports=function(e,t,n){n in e||r(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})}},9092:function(e,t,n){var r=n(8448),i=n(3951),a=n(4328),o=n(1888),s=n(7680),c=TypeError;e.exports=function(e,t){var n=e.exec;if(a(n)){var l=r(n,e,t);return l!==null&&i(l),l}if(o(e)===`RegExp`)return r(s,e,t);throw new c(`RegExp#exec called on incompatible receiver`)}},7680:function(e,t,n){var r,i,a=n(8448),o=n(1664),s=n(5016),c=n(8872),l=n(3548),u=n(4696),d=n(9368),f=n(9104).get,p=n(8e3),m=n(9124),h=u(`native-string-replace`,String.prototype.replace),g=RegExp.prototype.exec,_=g,v=o(``.charAt),y=o(``.indexOf),b=o(``.replace),x=o(``.slice),S=(i=/b*/g,a(g,r=/a/,`a`),a(g,i,`a`),r.lastIndex!==0||i.lastIndex!==0),C=l.BROKEN_CARET,w=/()??/.exec(``)[1]!==void 0;(S||w||C||p||m)&&(_=function(e){var t,n,r,i,o,l,u,p=this,m=f(p),T=s(e),E=m.raw;if(E)return E.lastIndex=p.lastIndex,t=a(_,E,T),p.lastIndex=E.lastIndex,t;var D=m.groups,O=C&&p.sticky,k=a(c,p),A=p.source,j=0,M=T;if(O&&(k=b(k,`y`,``),y(k,`g`)===-1&&(k+=`g`),M=x(T,p.lastIndex),p.lastIndex>0&&(!p.multiline||p.multiline&&v(T,p.lastIndex-1)!==`
|
|
87
|
+
`)&&(A=`(?: `+A+`)`,M=` `+M,j++),n=RegExp(`^(?:`+A+`)`,k)),w&&(n=RegExp(`^`+A+`$(?!\\s)`,k)),S&&(r=p.lastIndex),i=a(g,O?n:p,M),O?i?(i.input=x(i.input,j),i[0]=x(i[0],j),i.index=p.lastIndex,p.lastIndex+=i[0].length):p.lastIndex=0:S&&i&&(p.lastIndex=p.global?i.index+i[0].length:r),w&&i&&i.length>1&&a(h,i[0],n,(function(){for(o=1;o<arguments.length-2;o++)arguments[o]===void 0&&(i[o]=void 0)})),i&&D)for(i.groups=l=d(null),o=0;o<D.length;o++)l[(u=D[o])[0]]=i[u[1]];return i}),e.exports=_},8872:function(e,t,n){var r=n(3951);e.exports=function(){var e=r(this),t=``;return e.hasIndices&&(t+=`d`),e.global&&(t+=`g`),e.ignoreCase&&(t+=`i`),e.multiline&&(t+=`m`),e.dotAll&&(t+=`s`),e.unicode&&(t+=`u`),e.unicodeSets&&(t+=`v`),e.sticky&&(t+=`y`),t}},3548:function(e,t,n){var r=n(9957),i=n(6420).RegExp,a=r((function(){var e=i(`a`,`y`);return e.lastIndex=2,e.exec(`abcd`)!==null})),o=a||r((function(){return!i(`a`,`y`).sticky}));e.exports={BROKEN_CARET:a||r((function(){var e=i(`^r`,`gy`);return e.lastIndex=2,e.exec(`str`)!==null})),MISSED_STICKY:o,UNSUPPORTED_Y:a}},8e3:function(e,t,n){var r=n(9957),i=n(6420).RegExp;e.exports=r((function(){var e=i(`.`,`s`);return!(e.dotAll&&e.test(`
|
|
88
|
+
`)&&e.flags===`s`)}))},9124:function(e,t,n){var r=n(9957),i=n(6420).RegExp;e.exports=r((function(){var e=i(`(?<a>b)`,`g`);return e.exec(`b`).groups.a!==`b`||`b`.replace(e,`$<a>c`)!==`bc`}))},5436:function(e,t,n){var r=n(9760),i=TypeError;e.exports=function(e){if(r(e))throw new i(`Can't call method on `+e);return e}},6504:function(e,t,n){var r=n(4696),i=n(7776),a=r(`keys`);e.exports=function(e){return a[e]||(a[e]=i(e))}},3976:function(e,t,n){var r=n(7048),i=n(6420),a=n(4636),o=`__core-js_shared__`,s=e.exports=i[o]||a(o,{});(s.versions||=[]).push({version:`3.36.0`,mode:r?`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(e,t,n){var r=n(3976);e.exports=function(e,t){return r[e]||(r[e]=t||{})}},9764:function(e,t,n){var r=n(1664),i=n(6180),a=n(5016),o=n(5436),s=r(``.charAt),c=r(``.charCodeAt),l=r(``.slice),u=function(e){return function(t,n){var r,u,d=a(o(t)),f=i(n),p=d.length;return f<0||f>=p?e?``:void 0:(r=c(d,f))<55296||r>56319||f+1===p||(u=c(d,f+1))<56320||u>57343?e?s(d,f):r:e?l(d,f,f+2):u-56320+(r-55296<<10)+65536}};e.exports={codeAt:u(!1),charAt:u(!0)}},772:function(e,t,n){var r=n(8504),i=n(9957),a=n(6420).String;e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var e=Symbol(`symbol detection`);return!a(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},2495:function(e,t,n){var r=n(6180),i=Math.max,a=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):a(n,t)}},4096:function(e,t,n){var r=n(5712),i=n(5436);e.exports=function(e){return r(i(e))}},6180:function(e,t,n){var r=n(1748);e.exports=function(e){var t=+e;return t!=t||t===0?0:r(t)}},7584:function(e,t,n){var r=n(6180),i=Math.min;e.exports=function(e){var t=r(e);return t>0?i(t,9007199254740991):0}},4356:function(e,t,n){var r=n(5436),i=Object;e.exports=function(e){return i(r(e))}},7024:function(e,t,n){var r=n(8448),i=n(1632),a=n(7728),o=n(4504),s=n(2104),c=n(9972),l=TypeError,u=c(`toPrimitive`);e.exports=function(e,t){if(!i(e)||a(e))return e;var n,c=o(e,u);if(c){if(t===void 0&&(t=`default`),n=r(c,e,t),!i(n)||a(n))return n;throw new l(`Can't convert object to primitive value`)}return t===void 0&&(t=`number`),s(e,t)}},88:function(e,t,n){var r=n(7024),i=n(7728);e.exports=function(e){var t=r(e,`string`);return i(t)?t:t+``}},16:function(e,t,n){var r={};r[n(9972)(`toStringTag`)]=`z`,e.exports=String(r)===`[object z]`},5016:function(e,t,n){var r=n(4427),i=String;e.exports=function(e){if(r(e)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return i(e)}},36:function(e){var t=String;e.exports=function(e){try{return t(e)}catch{return`Object`}}},7776:function(e,t,n){var r=n(1664),i=0,a=Math.random(),o=r(1 .toString);e.exports=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+o(++i+a,36)}},6536:function(e,t,n){e.exports=n(772)&&!Symbol.sham&&typeof Symbol.iterator==`symbol`},1576:function(e,t,n){var r=n(3476),i=n(9957);e.exports=r&&i((function(){return Object.defineProperty((function(){}),`prototype`,{value:42,writable:!1}).prototype!==42}))},4288:function(e,t,n){var r=n(6420),i=n(4328),a=r.WeakMap;e.exports=i(a)&&/native code/.test(String(a))},9972:function(e,t,n){var r=n(6420),i=n(4696),a=n(5152),o=n(7776),s=n(772),c=n(6536),l=r.Symbol,u=i(`wks`),d=c?l.for||l:l&&l.withoutSetter||o;e.exports=function(e){return a(u,e)||(u[e]=s&&a(l,e)?l[e]:d(`Symbol.`+e)),u[e]}},6488:function(e,t,n){var r=n(5232),i=n(5152),a=n(3440),o=n(7e3),s=n(4024),c=n(9968),l=n(584),u=n(7512),d=n(8948),f=n(3480),p=n(3696),m=n(3476),h=n(7048);e.exports=function(e,t,n,g){var _=`stackTraceLimit`,v=g?2:1,y=e.split(`.`),b=y[y.length-1],x=r.apply(null,y);if(x){var S=x.prototype;if(!h&&i(S,`cause`)&&delete S.cause,!n)return x;var C=r(`Error`),w=t((function(e,t){var n=d(g?t:e,void 0),r=g?new x(e):new x;return n!==void 0&&a(r,`message`,n),p(r,w,r.stack,2),this&&o(S,this)&&u(r,this,w),arguments.length>v&&f(r,arguments[v]),r}));if(w.prototype=S,b===`Error`?m&&_ in x&&(l(w,x,_),l(w,x,`prepareStackTrace`)):s?s(w,C):c(w,C,{name:!0}),c(w,x),!h)try{S.name!==b&&a(S,`name`,b),S.constructor=w}catch{}return w}}},7476:function(e,t,n){var r=n(9160),i=n(9957),a=n(1432),o=n(1632),s=n(4356),c=n(3556),l=n(4316),u=n(92),d=n(2568),f=n(953),p=n(9972),m=n(8504),h=p(`isConcatSpreadable`),g=m>=51||!i((function(){var e=[];return e[h]=!1,e.concat()[0]!==e})),_=function(e){if(!o(e))return!1;var t=e[h];return t===void 0?a(e):!!t};r({target:`Array`,proto:!0,arity:1,forced:!g||!f(`concat`)},{concat:function(e){var t,n,r,i,a,o=s(this),f=d(o,0),p=0;for(t=-1,r=arguments.length;t<r;t++)if(_(a=t===-1?o:arguments[t]))for(i=c(a),l(p+i),n=0;n<i;n++,p++)n in a&&u(f,p,a[n]);else l(p+1),u(f,p++,a);return f.length=p,f}})},6932:function(e,t,n){var r=n(9160),i=n(3364).filter;r({target:`Array`,proto:!0,forced:!n(953)(`filter`)},{filter:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},700:function(e,t,n){var r=n(9160),i=n(1664),a=n(5712),o=n(4096),s=n(1496),c=i([].join);r({target:`Array`,proto:!0,forced:a!==Object||!s(`join`,`,`)},{join:function(e){return c(o(this),e===void 0?`,`:e)}})},4456:function(e,t,n){var r=n(9160),i=n(3364).map;r({target:`Array`,proto:!0,forced:!n(953)(`map`)},{map:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},4728:function(e,t,n){var r=n(9160),i=n(4356),a=n(3556),o=n(6728),s=n(4316);r({target:`Array`,proto:!0,arity:1,forced:n(9957)((function(){return[].push.call({length:4294967296},1)!==4294967297}))||!function(){try{Object.defineProperty([],`length`,{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=i(this),n=a(t),r=arguments.length;s(n+r);for(var c=0;c<r;c++)t[n]=arguments[c],n++;return o(t,n),n}})},8752:function(e,t,n){var r=n(9160),i=n(6420),a=n(908),o=n(6488),s=`WebAssembly`,c=i[s],l=Error(`e`,{cause:7}).cause!==7,u=function(e,t){var n={};n[e]=o(e,t,l),r({global:!0,constructor:!0,arity:1,forced:l},n)},d=function(e,t){if(c&&c[e]){var n={};n[e]=o(s+`.`+e,t,l),r({target:s,stat:!0,constructor:!0,arity:1,forced:l},n)}};u(`Error`,(function(e){return function(t){return a(e,this,arguments)}})),u(`EvalError`,(function(e){return function(t){return a(e,this,arguments)}})),u(`RangeError`,(function(e){return function(t){return a(e,this,arguments)}})),u(`ReferenceError`,(function(e){return function(t){return a(e,this,arguments)}})),u(`SyntaxError`,(function(e){return function(t){return a(e,this,arguments)}})),u(`TypeError`,(function(e){return function(t){return a(e,this,arguments)}})),u(`URIError`,(function(e){return function(t){return a(e,this,arguments)}})),d(`CompileError`,(function(e){return function(t){return a(e,this,arguments)}})),d(`LinkError`,(function(e){return function(t){return a(e,this,arguments)}})),d(`RuntimeError`,(function(e){return function(t){return a(e,this,arguments)}}))},508:function(e,t,n){var r=n(3476),i=n(6208).EXISTS,a=n(1664),o=n(2544),s=Function.prototype,c=a(s.toString),l=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,u=a(l.exec);r&&!i&&o(s,`name`,{configurable:!0,get:function(){try{return u(l,c(this))[1]}catch{return``}}})},232:function(e,t,n){var r=n(9160),i=n(9292);r({target:`Object`,stat:!0,arity:2,forced:Object.assign!==i},{assign:i})},5443:function(e,t,n){var r=n(16),i=n(6076),a=n(7032);r||i(Object.prototype,`toString`,a,{unsafe:!0})},880:function(e,t,n){var r=n(9160),i=n(7680);r({target:`RegExp`,proto:!0,forced:/./.exec!==i},{exec:i})},9836:function(e,t,n){var r=n(8448),i=n(7176),a=n(3951),o=n(9760),s=n(7584),c=n(5016),l=n(5436),u=n(4504),d=n(4764),f=n(9092);i(`match`,(function(e,t,n){return[function(t){var n=l(this),i=o(t)?void 0:u(t,e);return i?r(i,t,n):new RegExp(t)[e](c(n))},function(e){var r=a(this),i=c(e),o=n(t,r,i);if(o.done)return o.value;if(!r.global)return f(r,i);var l=r.unicode;r.lastIndex=0;for(var u,p=[],m=0;(u=f(r,i))!==null;){var h=c(u[0]);p[m]=h,h===``&&(r.lastIndex=d(i,s(r.lastIndex),l)),m++}return m===0?null:p}]}))},3536:function(e,t,n){var r=n(9160),i=n(6420),a=n(6100),o=n(3951),s=n(4328),c=n(7796),l=n(2544),u=n(92),d=n(9957),f=n(5152),p=n(9972),m=n(336).IteratorPrototype,h=n(3476),g=n(7048),_=`constructor`,v=`Iterator`,y=p(`toStringTag`),b=TypeError,x=i[v],S=g||!s(x)||x.prototype!==m||!d((function(){x({})})),C=function(){if(a(this,m),c(this)===m)throw new b(`Abstract class Iterator not directly constructable`)},w=function(e,t){h?l(m,e,{configurable:!0,get:function(){return t},set:function(t){if(o(this),this===m)throw new b(`You can't redefine this property`);f(this,e)?this[e]=t:u(this,e,t)}}):m[e]=t};f(m,y)||w(y,v),!S&&f(m,_)&&m[_]!==Object||w(_,C),C.prototype=m,r({global:!0,constructor:!0,forced:S},{Iterator:C})},2144:function(e,t,n){var r=n(9160),i=n(8448),a=n(8952),o=n(3951),s=n(6752),c=n(9724),l=n(8696),u=n(7048),d=c((function(){for(var e,t,n=this.iterator,r=this.predicate,a=this.next;;){if(e=o(i(a,n)),this.done=!!e.done)return;if(t=e.value,l(n,r,[t,this.counter++],!0))return t}}));r({target:`Iterator`,proto:!0,real:!0,forced:u},{filter:function(e){return o(this),a(e),new d(s(this),{predicate:e})}})},9080:function(e,t,n){var r=n(9160),i=n(5792);r({target:`Iterator`,proto:!0,real:!0,forced:n(7048)},{map:i})}},n={};function r(e){var i=n[e];if(i!==void 0)return i.exports;var a=n[e]={exports:{}};return t[e].call(a.exports,a,a.exports,r),a.exports}r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if(typeof globalThis==`object`)return globalThis;try{return this||Function(`return this`)()}catch{if(typeof window==`object`)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,`__esModule`,{value:!0})};var i={};return function(){r.r(i),r.d(i,{default:function(){return d}}),r(8752),r(6932),r(700),r(4456),r(4728),r(508),r(232),r(5443),r(880),r(9836),r(3536),r(2144),r(9080);var e=r(680);r(7476);function t(e,n){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},t(e,n)}var n=function(n){var r,i;function a(){for(var e,t=arguments.length,r=Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))||this).state={bump:!1,debounced:!1},e}i=n,(r=a).prototype=Object.create(i.prototype),r.prototype.constructor=r,t(r,i);var o=a.prototype;return o.componentWillMount=function(){var e,t,n,r,i=this;this.debounceStatusUpdate=(e=function(){if(!i.state.debounced){var e=!i.props.isInFocus||i.props.validChoiceMade;i.setState((function(t){return{bump:!t.bump,debounced:!0,silenced:e}}))}},t=1400,function(){var i=this,a=arguments,o=n&&!r;clearTimeout(r),r=setTimeout((function(){r=null,n||e.apply(i,a)}),t),o&&e.apply(i,a)})},o.componentWillReceiveProps=function(e){e.queryLength,this.setState({debounced:!1})},o.render=function(){var t=this.props,n=t.id,r=t.length,i=t.queryLength,a=t.minQueryLength,o=t.selectedOption,s=t.selectedOptionIndex,c=t.tQueryTooShort,l=t.tNoResults,u=t.tSelectedOption,d=t.tResults,f=t.className,p=this.state,m=p.bump,h=p.debounced,g=p.silenced,_=i<a,v=r===0,y=o?u(o,r,s):``,b=null;return b=_?c(a):v?l():d(r,y),this.debounceStatusUpdate(),(0,e.createElement)(`div`,{className:f,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,e.createElement)(`div`,{id:n+`__status--A`,role:`status`,"aria-atomic":`true`,"aria-live":`polite`},!g&&h&&m?b:``),(0,e.createElement)(`div`,{id:n+`__status--B`,role:`status`,"aria-atomic":`true`,"aria-live":`polite`},g||!h||m?``:b))},a}(e.Component);n.defaultProps={tQueryTooShort:function(e){return`Type in `+e+` or more characters for results`},tNoResults:function(){return`No search results`},tSelectedOption:function(e,t,n){return e+` `+(n+1)+` of `+t+` is highlighted`},tResults:function(e,t){return e+` `+(e===1?`result`:`results`)+` `+(e===1?`is`:`are`)+` available. `+t}};var a=function(t){var n=t.className;return(0,e.createElement)(`svg`,{version:`1.1`,xmlns:`http://www.w3.org/2000/svg`,className:n,focusable:`false`},(0,e.createElement)(`g`,{stroke:`none`,fill:`none`,"fill-rule":`evenodd`},(0,e.createElement)(`polygon`,{fill:`#000000`,points:`0 0 22 0 11 17`})))};function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(this,arguments)}function s(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}var l={13:`enter`,27:`escape`,32:`space`,38:`up`,40:`down`};function u(){return typeof navigator<`u`&&!(!navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||!navigator.userAgent.match(/AppleWebKit/g))}var d=function(t){var r,i;function a(e){var n;return(n=t.call(this,e)||this).elementReferences={},n.state={focused:null,hovered:null,menuOpen:!1,options:e.defaultValue?[e.defaultValue]:[],query:e.defaultValue,validChoiceMade:!1,selected:null,ariaHint:!0},n.handleComponentBlur=n.handleComponentBlur.bind(s(n)),n.handleKeyDown=n.handleKeyDown.bind(s(n)),n.handleUpArrow=n.handleUpArrow.bind(s(n)),n.handleDownArrow=n.handleDownArrow.bind(s(n)),n.handleEnter=n.handleEnter.bind(s(n)),n.handlePrintableKey=n.handlePrintableKey.bind(s(n)),n.handleListMouseLeave=n.handleListMouseLeave.bind(s(n)),n.handleOptionBlur=n.handleOptionBlur.bind(s(n)),n.handleOptionClick=n.handleOptionClick.bind(s(n)),n.handleOptionFocus=n.handleOptionFocus.bind(s(n)),n.handleOptionMouseDown=n.handleOptionMouseDown.bind(s(n)),n.handleOptionMouseEnter=n.handleOptionMouseEnter.bind(s(n)),n.handleInputBlur=n.handleInputBlur.bind(s(n)),n.handleInputChange=n.handleInputChange.bind(s(n)),n.handleInputClick=n.handleInputClick.bind(s(n)),n.handleInputFocus=n.handleInputFocus.bind(s(n)),n.pollInputElement=n.pollInputElement.bind(s(n)),n.getDirectInputChanges=n.getDirectInputChanges.bind(s(n)),n}i=t,(r=a).prototype=Object.create(i.prototype),r.prototype.constructor=r,c(r,i);var d=a.prototype;return d.isQueryAnOption=function(e,t){var n=this;return t.map((function(e){return n.templateInputValue(e).toLowerCase()})).indexOf(e.toLowerCase())!==-1},d.componentDidMount=function(){this.pollInputElement()},d.componentWillUnmount=function(){clearTimeout(this.$pollInput)},d.pollInputElement=function(){var e=this;this.getDirectInputChanges(),this.$pollInput=setTimeout((function(){e.pollInputElement()}),100)},d.getDirectInputChanges=function(){var e=this.elementReferences[-1];e&&e.value!==this.state.query&&this.handleInputChange({target:{value:e.value}})},d.componentDidUpdate=function(e,t){var n=this.state.focused,r=n===null,i=t.focused!==n;i&&!r&&this.elementReferences[n].focus();var a=n===-1,o=i&&t.focused===null;if(a&&o){var s=this.elementReferences[n];s.setSelectionRange(0,s.value.length)}},d.hasAutoselect=function(){return!u()&&this.props.autoselect},d.templateInputValue=function(e){var t=this.props.templates&&this.props.templates.inputValue;return t?t(e):e},d.templateSuggestion=function(e){var t=this.props.templates&&this.props.templates.suggestion;return t?t(e):e},d.handleComponentBlur=function(e){var t,n=this.state,r=n.options,i=n.query,a=n.selected;this.props.confirmOnBlur?(t=e.query||i,this.props.onConfirm(r[a])):t=i,this.setState({focused:null,menuOpen:e.menuOpen||!1,query:t,selected:null,validChoiceMade:this.isQueryAnOption(t,r)})},d.handleListMouseLeave=function(e){this.setState({hovered:null})},d.handleOptionBlur=function(e,t){var n=this.state,r=n.focused,i=n.menuOpen,a=n.options,o=n.selected,s=e.relatedTarget===null,c=e.relatedTarget===this.elementReferences[-1],l=r!==t&&r!==-1;if(!l&&s||!(l||c)){var d=i&&u();this.handleComponentBlur({menuOpen:d,query:this.templateInputValue(a[o])})}},d.handleInputBlur=function(e){var t=this.state,n=t.focused,r=t.menuOpen,i=t.options,a=t.query,o=t.selected;if(n===-1){var s=r&&u(),c=u()?a:this.templateInputValue(i[o]);this.handleComponentBlur({menuOpen:s,query:c})}},d.handleInputChange=function(e){var t=this,n=this.props,r=n.minLength,i=n.source,a=n.showAllValues,o=this.hasAutoselect(),s=e.target.value,c=s.length===0,l=this.state.query!==s,u=s.length>=r;this.setState({query:s,ariaHint:c}),a||!c&&l&&u?i(s,(function(e){var n=e.length>0;t.setState({menuOpen:n,options:e,selected:o&&n?0:-1,validChoiceMade:!1})})):!c&&u||this.setState({menuOpen:!1,options:[]})},d.handleInputClick=function(e){this.handleInputChange(e)},d.handleInputFocus=function(e){var t=this.state,n=t.query,r=t.validChoiceMade,i=t.options,a=this.props.minLength,o=!r&&n.length>=a&&i.length>0;o?this.setState((function(e){var t=e.menuOpen;return{focused:-1,menuOpen:o||t,selected:-1}})):this.setState({focused:-1})},d.handleOptionFocus=function(e){this.setState({focused:e,hovered:null,selected:e})},d.handleOptionMouseEnter=function(e,t){u()||this.setState({hovered:t})},d.handleOptionClick=function(e,t){var n=this.state.options[t],r=this.templateInputValue(n);this.props.onConfirm(n),this.setState({focused:-1,hovered:null,menuOpen:!1,query:r,selected:-1,validChoiceMade:!0}),this.forceUpdate()},d.handleOptionMouseDown=function(e){e.preventDefault()},d.handleUpArrow=function(e){e.preventDefault();var t=this.state,n=t.menuOpen,r=t.selected;r!==-1&&n&&this.handleOptionFocus(r-1)},d.handleDownArrow=function(e){var t=this;if(e.preventDefault(),this.props.showAllValues&&!1===this.state.menuOpen)e.preventDefault(),this.props.source(``,(function(e){t.setState({menuOpen:!0,options:e,selected:0,focused:0,hovered:null})}));else if(!0===this.state.menuOpen){var n=this.state,r=n.menuOpen,i=n.options,a=n.selected;a!==i.length-1&&r&&this.handleOptionFocus(a+1)}},d.handleSpace=function(e){var t=this;this.props.showAllValues&&!1===this.state.menuOpen&&this.state.query===``&&(e.preventDefault(),this.props.source(``,(function(e){t.setState({menuOpen:!0,options:e})}))),this.state.focused!==-1&&(e.preventDefault(),this.handleOptionClick(e,this.state.focused))},d.handleEnter=function(e){this.state.menuOpen&&(e.preventDefault(),this.state.selected>=0&&this.handleOptionClick(e,this.state.selected))},d.handlePrintableKey=function(e){var t=this.elementReferences[-1];e.target===t||t.focus()},d.handleKeyDown=function(e){switch(l[e.keyCode]){case`up`:this.handleUpArrow(e);break;case`down`:this.handleDownArrow(e);break;case`space`:this.handleSpace(e);break;case`enter`:this.handleEnter(e);break;case`escape`:this.handleComponentBlur({query:this.state.query});break;default:((t=e.keyCode)>47&&t<58||t===32||t===8||t>64&&t<91||t>95&&t<112||t>185&&t<193||t>218&&t<223)&&this.handlePrintableKey(e)}var t},d.render=function(){var t,r=this,i=this.props,a=i.cssNamespace,s=i.displayMenu,c=i.id,l=i.minLength,d=i.name,f=i.placeholder,p=i.required,m=i.showAllValues,h=i.tNoResults,g=i.tStatusQueryTooShort,_=i.tStatusNoResults,v=i.tStatusSelectedOption,y=i.tStatusResults,b=i.tAssistiveHint,x=i.dropdownArrow,S=i.menuAttributes,C=i.inputClasses,w=i.hintClasses,T=i.menuClasses,E=this.state,D=E.focused,O=E.hovered,k=E.menuOpen,A=E.options,j=E.query,M=E.selected,N=E.ariaHint,ee=E.validChoiceMade,P=this.hasAutoselect(),F=D===-1,I=A.length===0,L=j.length!==0,R=j.length>=l,z=this.props.showNoOptionsFound&&F&&I&&L&&R,te=a+`__wrapper`,ne=a+`__status`,B=a+`__dropdown-arrow-down`,re=D!==-1&&D!==null,ie=a+`__option`,ae=a+`__hint`,oe=this.templateInputValue(A[M]),se=oe&&oe.toLowerCase().indexOf(j.toLowerCase())===0&&P?j+oe.substr(j.length):``,ce=c+`__assistiveHint`,le={"aria-describedby":N?ce:null,"aria-expanded":k?`true`:`false`,"aria-activedescendant":re?c+`__option--`+D:null,"aria-controls":c+`__listbox`,"aria-autocomplete":this.hasAutoselect()?`both`:`list`};m&&typeof(t=x({className:B}))==`string`&&(t=(0,e.createElement)(`div`,{className:a+`__dropdown-arrow-down-wrapper`,dangerouslySetInnerHTML:{__html:t}}));var ue=a+`__input`,de=[ue,this.props.showAllValues?ue+`--show-all-values`:ue+`--default`];D!==null&&de.push(ue+`--focused`),C&&de.push(C);var fe=a+`__menu`,pe=[fe,fe+`--`+s,fe+`--`+(k||z?`visible`:`hidden`)];T&&pe.push(T),(S!=null&&S.class||S!=null&&S.className)&&pe.push(S?.class||S?.className);var me=Object.assign({"aria-labelledby":c},S,{id:c+`__listbox`,role:`listbox`,className:pe.join(` `),onMouseLeave:this.handleListMouseLeave});return delete me.class,(0,e.createElement)(`div`,{className:te,onKeyDown:this.handleKeyDown},(0,e.createElement)(n,{id:c,length:A.length,queryLength:j.length,minQueryLength:l,selectedOption:this.templateInputValue(A[M]),selectedOptionIndex:M,validChoiceMade:ee,isInFocus:this.state.focused!==null,tQueryTooShort:g,tNoResults:_,tSelectedOption:v,tResults:y,className:ne}),se&&(0,e.createElement)(`span`,null,(0,e.createElement)(`input`,{className:[ae,w===null?C:w].filter(Boolean).join(` `),readonly:!0,tabIndex:`-1`,value:se})),(0,e.createElement)(`input`,o({},le,{autoComplete:`off`,className:de.join(` `),id:c,onClick:this.handleInputClick,onBlur:this.handleInputBlur},{onChange:this.handleInputChange},{onFocus:this.handleInputFocus,name:d,placeholder:f,ref:function(e){r.elementReferences[-1]=e},type:`text`,role:`combobox`,required:p,value:j})),t,(0,e.createElement)(`ul`,me,A.map((function(t,n){var i=(D===-1?M===n:D===n)&&O===null?` `+ie+`--focused`:``,a=n%2?` `+ie+`--odd`:``,o=u()?`<span id=`+c+`__option-suffix--`+n+` 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"> `+(n+1)+` of `+A.length+`</span>`:``;return(0,e.createElement)(`li`,{"aria-selected":D===n?`true`:`false`,className:``+ie+i+a,dangerouslySetInnerHTML:{__html:r.templateSuggestion(t)+o},id:c+`__option--`+n,key:n,onBlur:function(e){return r.handleOptionBlur(e,n)},onClick:function(e){return r.handleOptionClick(e,n)},onMouseDown:r.handleOptionMouseDown,onMouseEnter:function(e){return r.handleOptionMouseEnter(e,n)},ref:function(e){r.elementReferences[n]=e},role:`option`,tabIndex:`-1`,"aria-posinset":n+1,"aria-setsize":A.length})})),z&&(0,e.createElement)(`li`,{className:ie+` `+ie+`--no-results`,role:`option`,"aria-disabled":`true`},h())),(0,e.createElement)(`span`,{id:ce,style:{display:`none`}},b()))},a}(e.Component);d.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:a,menuAttributes:{},inputClasses:null,hintClasses:null,menuClasses:null}}(),i}()}))})),On=c(o(((e,t)=>{t.exports=Dn()}))(),1),kn=({value:e,defaultValue:t=``,onConfirm:n,source:r,disabled:i,onClear:a,tClearInput:o=()=>`Clear input`,...s})=>{let c=(0,d.useRef)(null),l=e=>{setTimeout(()=>{c.current&&(c.current.elementReferences[-1].value=e)},0)};(0,d.useEffect)(()=>{e!==void 0&&l(e)},[e]),(0,d.useEffect)(()=>{i?c.current&&(c.current.elementReferences[-1].disabled=!0):c.current&&(c.current.elementReferences[-1].disabled=!1)},[i]);let u=()=>{a&&a()},f=(e,t)=>{c.current.elementReferences[-1].classList.contains(`autocomplete__input--focused`)&&r(e,t)},p=t=>{t?n(t):l(e)};return(0,k.jsxs)(`div`,{style:{position:`relative`,width:`100%`},children:[(0,k.jsx)(On.default,{ref:c,...s,defaultValue:t,onConfirm:p,source:f}),!!(e&&e.length>0&&!i)&&(0,k.jsx)(`button`,{onClick:u,style:{position:`absolute`,right:`0px`,top:`50%`,transform:`translateY(-50%)`,background:`transparent`,border:`none`,cursor:`pointer`,padding:0},"aria-label":o(),children:(0,k.jsx)(g.Icon,{icon:`it-close`,size:`sm`,title:o()})})]})},An=`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==`,jn=`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=`,Mn=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC`,Nn=({position:e,areasLayer:t,bounds:n,onMarkedMoved:r})=>{let i=(0,d.useRef)(null),a=null,[o,s]=(0,d.useState)([]),c=(0,T.tileLayer)(`https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png`,{attribution:`© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>`}),l=[41.9,12.5],u=()=>{let o=T.default.map(i.current,{keyboard:!1,minZoom:6,maxZoom:18}).setView(l,10);c.addTo(o),t&&t.map(e=>{e.addTo(o)});let s=e?[`${e.lat}`,`${e.lon}`]:n?n.getCenter():l;if(delete T.default.Icon.Default.prototype._getIconUrl,T.default.Icon.Default.mergeOptions({iconRetinaUrl:An,iconUrl:jn,shadowUrl:Mn}),a=T.default.marker(s,{draggable:!0}).addTo(o),a.on(`moveend`,function(e){r(e.target.getLatLng(),a)}),o.on(`click`,function(e){let t=e.latlng;a&&a.setLatLng(t).update(),r(t,a)}),!e&&n)o.fitBounds(n);else{let t=e?[e.lat,e.lon]:l;a&&(a.setLatLng(t).update(),o.setView(t,15))}};return(0,d.useEffect)(()=>{i.current&&u()},[i]),(0,k.jsx)(`div`,{className:`d-block`,style:{height:`60vh`,width:`100%`,display:`block`},children:(0,k.jsx)(`div`,{ref:i,style:{height:`100%`,width:`100%`},"aria-hidden":!0})})},Pn=l.Formio.Components.components.field,Fn=({component:e,value:t,current:n,onChange:r,i18next:i})=>{let[a,o]=(0,d.useState)(null),[s,c]=(0,d.useState)([]),[l,u]=(0,d.useState)(),[f,p]=(0,d.useState)(),[m,h]=(0,d.useState)(!1),[v,y]=(0,d.useState)(),[b,x]=(0,d.useState)(!1),[S,C]=(0,d.useState)(),[w,D]=(0,d.useState)(),[O,A]=(0,d.useState)(!1),[j,M]=(0,d.useState)(``),[ee,P]=(0,d.useState)(``),[F,I]=(0,d.useState)(!1),[L,R]=(0,d.useState)(!1),z=new URLSearchParams(window.location.search).get(`area`),{geographic_areas_id:te}=window.OC_SERVICE_DETAILS,ne=(0,d.useRef)(),B=i.language,re=T.default.latLngBounds(),ie=z||(te&&te.length>0?te:void 0),ae=(e,t)=>{ne.current=e;let n=`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(e)}&countrycodes=it&viewbox=${l}&bounded=1&addressdetails=1&limit=14&format=jsonv2&accept-language=${B}`,r=[],i=[];x(!0),fetch(n).then(e=>e.json()).then(n=>{if(n.length&&ne.current===e){x(!0);let e=n.map((e,t)=>{let{lat:n,lon:r}=e,i=`${N()}/api/geographic-areas/contains?lat=${n}&lon=${r}&geographic_areas_ids=${v.join(`,`)}`;return fetch(i).then(e=>e.json()).then(t=>t.result?(e.label=ze(e),e):null)});return Promise.all(e)}else ne.current===e&&(t([]),x(!1))}).then(n=>{n=n?n.filter(e=>e!==null):[],n.length>0?(n.forEach((e,t)=>{n[t].label=ze(e)}),n=E.default.uniqWith(n,(e,t)=>e.label===t.label),n.forEach((e,t)=>{i.push(e.label),r.push(e)}),ne.current===e&&(t(i),c(r),x(!1))):ne.current===e&&(t([]),x(!1))}).catch(e=>{console.error(`Error fetching locations:`,e),x(!1)})},oe=(e,t)=>{ae(e,t)},se=(e,t)=>{let{lat:n,lng:r}=e,i=`https://nominatim.openstreetmap.org/reverse?format=jsonv2&lat=${n}&lon=${r}&accept-language=${B}`;fetch(i).then(e=>e.json()).then(e=>{if(e&&e.display_name)if(e.label=ze(e),e.lat=n,e.lon=r,t)t.bindPopup(`${e.label}`,{className:`address-map-popup`}).openPopup(),D(e);else{D(e);return}}).catch(e=>console.error(`Error with reverse geocoding:`,e))};function ce(){navigator.geolocation.getCurrentPosition(e=>{let t=e.coords.latitude,n=e.coords.longitude;if((v||[]).length>0){let e=`${N()}/api/geographic-areas/contains?lat=${t}&lon=${n}&geographic_areas_ids=${v.join(`,`)}`;fetch(e).then(e=>e.json()).then(e=>{e.result?(o({lat:t,lon:n}),se({lat:t,lng:n}),R(!L)):R(!L)})}else o({lat:t,lon:n}),se({lat:t,lng:n}),R(!L)},e=>{e?.code===1?(I(!F),P(i.t(`error_message_code_1`))):e?.code===2?(I(!F),P(i.t(`error_message_code_2`))):e?.code===3?(I(!F),P(i.t(`error_message_code_3`))):(I(!F),P(i.t(`error_message_generic`)))})}(0,d.useEffect)(()=>{t&&o(t),n.valuePosition&&o(n.valuePosition)},[t,n]);let le=()=>{t&&o(t),n.valuePosition&&o(n.valuePosition)};(0,d.useEffect)(()=>{window?.Formio?.formioReady.then(()=>{setTimeout(()=>{le(),ue()},1)})},[]);let ue=()=>{let e=`${N()}/api/geographic-areas`,t=[],n=[],r=[];fetch(e).then(e=>e.json()).then(e=>{if(Array.isArray(e)&&e.length>0){e.filter(e=>ie?Array.isArray(ie)?ie.includes(e.id):e.id===ie:!0).forEach(e=>{t.push(e.id);let i=JSON.parse(e.geofence);n.push(i);let a=T.default.geoJSON(i,{style:{color:`#3478bd`,fillColor:`#87CEEB`,fillOpacity:.2,weight:1.5},filter:function(e){return e.geometry.type===`Polygon`||e.geometry.type===`MultiPolygon`}});re.extend(a.getBounds()),r.push(a)}),p(r),y(t),C(re);let i=re.getNorthEast(),a=re.getSouthWest();u([i.lng,i.lat,a.lng,a.lat])}else console.log(`No geographic_areas_ids found.`)}).catch(e=>{console.error(`Error with reverse geocoding:`,e)})},de=()=>{M(a?.label?a.label:``)};(0,d.useEffect)(()=>{de(),r(a)},[a]),(0,d.useEffect)(()=>{document.querySelector(`.formio-read-only`)&&O===!1?A(!0):A(!1)},[]);let fe=()=>{if(w){let e=`${N()}/api/geographic-areas/contains?lat=${w.lat}&lon=${w.lon}&geographic_areas_ids=${v.join(`,`)}`;h(!0),fetch(e).then(e=>e.json()).then(e=>{h(!1),e?e.result===!1?_.default.fire({title:``,html:`<p>`+i.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:i.t(`Chiudi`),showCancelButton:!0,showConfirmButton:!1}):e.result===!0&&(R(!L),o(w)):(h(!1),console.log(`No geographic-areas/contains .`))}).catch(e=>{console.error(`Error with geographic-areas/contains:`,e),_.default.fire({title:``,html:`<p>`+e+`</p>`,icon:`error`,cancelButtonText:i.t(`Chiudi`),showCancelButton:!0,showConfirmButton:!1})})}};return(0,k.jsx)(`div`,{children:(0,k.jsxs)(`div`,{id:`address-map-container-${e.key}`,className:`address-map-container`,children:[(0,k.jsx)(`div`,{children:(0,k.jsxs)(g.Modal,{wrapClassName:`formio-component-address_map`,isOpen:L,size:`lg`,scrollable:!0,toggle:()=>R(!L),labelledBy:`maps-evo`,container:K(),children:[(0,k.jsx)(g.ModalHeader,{toggle:()=>R(!L),id:`maps-evo`,children:i.t(`Individua il luogo sulla mappa`)}),(0,k.jsxs)(g.ModalBody,{children:[(0,k.jsx)(`p`,{children:(0,k.jsx)(`small`,{children:i.t(`Trascina l’icona nel punto preciso in cui si verifica l’evento che vuoi segnalare e fai click su Salva indirizzo`)})}),(0,k.jsx)(Nn,{position:a,areasLayer:f,bounds:S,onMarkedMoved:(e,t)=>{se(e,t)}})]}),(0,k.jsxs)(g.ModalFooter,{children:[(0,k.jsx)(g.Button,{color:`secondary`,onClick:()=>R(!L),children:i.t(`Chiudi`)}),(0,k.jsx)(g.Button,{color:`primary`,onClick:()=>{fe()},disabled:!w||m,children:i.t(`Salva indirizzo`)})]})]})}),(0,k.jsx)(`div`,{children:(0,k.jsxs)(g.Modal,{isOpen:F,toggle:()=>I(!F),withIcon:!0,labelledBy:`error-modal-message`,container:K(),children:[(0,k.jsx)(g.ModalHeader,{icon:`it-info-circle`,id:`error-modal-message`,children:i.t(`warning`)}),(0,k.jsx)(g.ModalBody,{children:(0,k.jsx)(`p`,{children:ee})}),(0,k.jsx)(g.ModalFooter,{children:(0,k.jsx)(g.Button,{color:`primary`,onClick:()=>I(!F),children:i.t(`close`)})})]})}),(0,k.jsxs)(`div`,{className:`position-relative`,children:[(0,k.jsx)(kn,{id:`${e.id}-${e.key}`,inputClasses:`form-control`,source:(0,E.debounce)(oe,520),onConfirm:e=>{x(!1),ne.current=``,e&&(e===``&&o(null),o(s.find(t=>t.label===e)))},onClear:()=>{x(!1),ne.current=``,o(null)},dropdownArrow:()=>null,minLength:3,disabled:O,confirmOnBlur:!0,showNoOptionsFound:!b,defaultValue:a?.label,value:j,tNoResults:()=>i.t(`Nessun risultato trovato, prova a inserire l'indirizzo completo`),tClearInput:()=>i.t(`Clear input`)}),b&&(0,k.jsx)(`div`,{className:`position-absolute`,style:{width:`100%`,bottom:`0px`},children:(0,k.jsx)(g.Progress,{indeterminate:!0,label:`In elaborazione...`})})]}),!O&&(0,k.jsxs)(g.Button,{type:`button`,value:i.t(`Individua con precisione sulla mappa`),onClick:()=>{/Mobi|Android/i.test(navigator.userAgent)?ce():(R(!0),D(!1))},icon:!0,className:`px-0 primary-color`,children:[(0,k.jsx)(g.Icon,{color:`primary`,icon:`it-map-marker-circle`,role:`presentation`}),(0,k.jsx)(`span`,{children:i.t(`Individua con precisione sulla mappa`)})]})]})})},In=class e extends Pn{constructor(e,t,n){super(e,t,n)}static get builderInfo(){return{title:`Address Map`,group:`basic`,icon:`bi bi-map`,documentation:``,weight:70,schema:e.schema()}}static schema(){return Pn.schema({type:`address_map`})}static editForm=En;attach(e){return super.attach(e).then(()=>{this.loadRefs(this.element,{[`react-${this.id}`]:`single`});let e=this.refs[`react-${this.id}`];return e?(this.rootComponent=(0,u.createRoot)(e),this.rootComponent.render((0,k.jsx)(Fn,{component:this.component,value:this.dataValue,onChange:e=>this.setValue(e),...this,current:this},this.dataValue)),this):this})}detach(){return this.rootComponent&&=(this.rootComponent.unmount(),null),super.detach()}setValue(e){this.valuePosition=e,this.updateValue(e)}getValue(){return this.valuePosition}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}},Ln=[{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 = '`+N()+`'; data.url = url; value=url;`,key:`url`,type:`hidden`,input:!0,weight:1}];function Rn(...e){return f.Components.baseEditForm([{key:`display`,components:Ln}],...e)}var zn=l.Formio.Components.components.field,Bn=({component:e,current:t,onChange:n,i18next:r})=>{let i=`list-services`,a=`selected-category`,[o,s]=(0,d.useState)([]),[c,l]=(0,d.useState)([]),[u,f]=(0,d.useState)(null),[p,m]=(0,d.useState)(null),[h,_]=(0,d.useState)(``),[v,y]=(0,d.useState)(!1),[b,x]=(0,d.useState)(!1),S=(0,d.useRef)(!1),w=(0,d.useRef)(),T=(0,d.useMemo)(()=>u&&(c.find(e=>e.name===u)||o.find(e=>e.name===u))||null,[u,c,o]),E=(0,d.useMemo)(()=>T?.services||[],[T]),D=async()=>{x(!0);let e=sessionStorage.getItem(i),t=sessionStorage.getItem(a);if(e)try{let n=JSON.parse(e);if(Array.isArray(n)&&n.length>0)return s(n),l(n),f((n.find(e=>e.name===t)||n[0])?.name||null),x(!1),n}catch{console.warn(`⚠️ Cache corrotta, rigenerazione...`)}let n=await window.FormioHelper.getBookingConfig(),r={};n.forEach(e=>{(e.categories??[]).forEach(t=>{r[t]||(r[t]={name:t,services:[]}),r[t].services.push(e)})});let o=Object.fromEntries(Object.entries(r).sort(([e],[t])=>e.localeCompare(t,`it`,{sensitivity:`base`}))),c=Object.values(o).filter(e=>(e.name??``).trim()!==``);return s(c),l(c),f(c[0]?.name||null),sessionStorage.setItem(i,JSON.stringify(c)),sessionStorage.setItem(a,c[0]?.name||``),x(!1),c};(0,d.useEffect)(()=>{u&&sessionStorage.setItem(a,u)},[u]),(0,d.useEffect)(()=>{S.current||(S.current=!0,D())},[]);let O=e=>{let t=(e=``)=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),n=(e=``)=>e.toLowerCase().normalize(`NFD`).replace(/[\u0300-\u036f]/g,``).replace(/\s+/g,` `).trim(),r=(e=``)=>e.replace(/<[^>]*>/g,` `),i=(e,n)=>RegExp(`\\b${t(n)}`,`i`).test(e),a=(e,t)=>{let a=n(e.name),o=n((e.categories??[]).join(` `)),s=n(r(e.abstract??``));if(!t.every(e=>i(a,e)||i(o,e)||i(s,e)))return-1;let c=0;for(let e of t)i(a,e)?c+=3:i(o,e)?c+=2:i(s,e)&&(c+=1);return c},s=e.target.value;_(s);let c=n(s);if(!c){l(o),f(e=>e??o[0]?.name??null);return}let d=c.split(` `).filter(Boolean),p=o.map(e=>{let t=e.services.map(e=>({service:e,score:a(e,d)})).filter(e=>e.score>=0).sort((e,t)=>t.score-e.score).map(e=>e.service);return t.length?{...e,services:t}:null}).filter(Boolean);l(p),f(p.some(e=>e.name===u)?u:p[0]?.name??null)},A=e=>{m(e);let r=o.find(t=>t.services.some(t=>t.id===e.id));r&&f(r.name),n({id:e.id,link:e.link,name:e.name,show_howto_in_motivation:e.show_howto_in_motivation,categories:e.categories,offices:e.offices,abstract:e.abstract,view_type:e.view_type}),t.data.user_group=null,J()},j=e=>{f(e.name),m(null),_(``),l(o),n({})};return(0,d.useEffect)(()=>{y(!!document.querySelector(`.formio-read-only`))},[]),(0,d.useEffect)(()=>{let e=setTimeout(()=>{let e=t?.dataValue??t?.getValue();if(e?.id&&(m(e),o.length>0)){let t=o.find(t=>t.services.some(t=>t.id===e.id));t&&f(t.name)}},500);return()=>clearTimeout(e)},[t?.dataValue,t?.data,o]),(0,d.useEffect)(()=>{let e=window.FormioInstance;if(!e)return;let n=()=>{let n=e.submission?.data?.[t?.component?.key];if(n?.id&&(m(n),o.length>0)){let e=o.find(e=>e.services.some(e=>e.id===n.id));e&&f(e.name)}};return e.on(`change`,n),()=>e.off(`change`,n)},[o,t?.component?.key]),b?(0,k.jsx)(`div`,{className:`services-booking`,ref:w,children:(0,k.jsxs)(`div`,{children:[r.t(`Caricamento in corso`),`...`]})}):(0,k.jsx)(`div`,{className:`services-booking`,ref:w,children:o&&!v?(0,k.jsxs)(g.Container,{children:[(0,k.jsx)(g.Row,{className:`mb-3`,children:(0,k.jsx)(g.Col,{children:(0,k.jsx)(`h3`,{className:`h6 fw-bold text-uppercase mb-3`,children:r.t(`Seleziona il servizio per cui stai richiedendo un appuntamento`)})})}),(0,k.jsx)(g.Row,{className:`mb-3`,children:(0,k.jsx)(g.Col,{children:(0,k.jsx)(`div`,{className:`search-container`,children:(0,k.jsx)(g.Input,{id:`search`,label:r.t(`Cerca`),type:`text`,value:h,onChange:O,onInput:O,infoText:r.t(`Cerca per categoria, servizio o descrizione`)})})})}),(0,k.jsxs)(g.Row,{className:`mb-3`,children:[T?(0,k.jsx)(g.Col,{lg:3,md:4,className:`mb-4 mb-lg-0`,children:(0,k.jsxs)(`div`,{className:`categories-list`,children:[(0,k.jsx)(`h3`,{className:`h6 fw-bold text-uppercase mb-3`,children:r.t(`Categorie`)}),c.length>0&&c.map(e=>{let t=u===e.name;return(0,k.jsxs)(`button`,{onClick:()=>j(e),className:`category-item w-100 text-start p-3 mb-2 border-0 rounded ${t?`category-active bg-primary text-white`:`bg-light text-dark`}`,children:[(0,k.jsx)(`span`,{className:`fw-500 d-block`,children:e.name}),(0,k.jsxs)(`small`,{className:`d-block mt-1 ${t?`text-white`:`text-muted`}`,children:[e.services.length,` `,e.services.length>1?r.t(`servizi`):r.t(`servizio`)]})]},e.name)})]})}):null,(0,k.jsx)(g.Col,{lg:T?9:12,md:T?8:12,children:(0,k.jsxs)(`div`,{className:`services-container`,children:[E.length>0?(0,k.jsxs)(`div`,{className:`services-header mb-4`,children:[(0,k.jsx)(`h3`,{className:`h5 fw-bold text-primary mb-0`,children:T?.name}),(0,k.jsx)(`div`,{className:`border-bottom border-primary mt-3 mb-4`})]}):null,E.length>0?(0,k.jsx)(`div`,{className:`services-list`,children:E.map(e=>{let t=p?.id===e.id,n=C.default.sanitize(e?.abstract);return(0,k.jsx)(`button`,{onClick:()=>A(e),className:`service-card mb-4 p-4 rounded border cursor-pointer transition text-start w-100 ${t?`border-primary border-2 bg-light`:`border-light border-1 bg-white`}`,style:{cursor:`pointer`},tabIndex:`0`,role:`button`,"aria-label":`${e.name}`,"aria-pressed":t,children:(0,k.jsx)(`div`,{className:`d-flex justify-content-between align-items-start`,children:(0,k.jsxs)(`div`,{className:`flex-grow-1`,children:[(0,k.jsx)(`h5`,{className:`h6 fw-bold mb-2 text-dark`,children:e.name}),e?.abstract&&(0,k.jsx)(`p`,{className:`text-muted small mb-0`,dangerouslySetInnerHTML:{__html:n}})]})})},e.id)})}):(0,k.jsx)(`div`,{className:`alert alert-info text-italic`,children:r.t(`Il servizio che stai cercando non è disponibile per la prenotazione appuntamento`)})]})})]})]}):v?(0,k.jsx)(`fieldset`,{className:`it-page-section`,children:(0,k.jsx)(`div`,{className:`cmp-card mt-2`,children:(0,k.jsxs)(`div`,{className:`card has-bkg-grey shadow-sm p-big`,children:[(0,k.jsx)(`div`,{className:`card-header border-0 p-0 mb-lg-30`,children:(0,k.jsx)(`div`,{className:`d-flex`,children:(0,k.jsx)(`h2`,{className:`title-xxlarge mb-1`,children:T?.name})})}),(0,k.jsx)(`div`,{className:`card p-3 p-lg-4 fieldset-body`,children:t?.dataValue?.id?(0,k.jsx)(`div`,{className:`services-list`,children:(0,k.jsx)(`div`,{className:`service-card p-4 rounded border transition border-light border-1 bg-white`,children:(0,k.jsx)(`div`,{className:`d-flex justify-content-between align-items-start`,children:(0,k.jsx)(`div`,{className:`flex-grow-1`,children:(0,k.jsx)(`p`,{className:`mb-2 text-dark text-paragraph`,children:t.dataValue.name})})})},t.dataValue.id)}):null})]})})}):null})},Vn=class e extends zn{constructor(e,t,n){super(e,t,n)}static get builderInfo(){return{title:`Lista Servizi`,group:`basic`,icon:`bi bi-list`,documentation:``,weight:70,schema:e.schema()}}static schema(){return zn.schema({type:`list-services`})}static editForm=Rn;attach(e,t){return super.attach(e).then(()=>{this.loadRefs(this.element,{[`react-${this.id}`]:`single`});let e=this.refs[`react-${this.id}`];return e?(this.rootComponent&&=(this.rootComponent.unmount(),null),this.rootComponent=(0,u.createRoot)(e),this.builderMode?(this.rootComponent.render((0,k.jsx)(`div`,{className:`my-1 border border-2 border-light rounded p-3 text-secondary`,children:(0,k.jsx)(`div`,{className:`h6 mb-0`,children:this.component?.label||`Lista Servizi`})})),this):(this.rootComponent.render((0,k.jsx)(Bn,{ref:t,component:this.component,onChange:e=>this.setValue(e),...this,current:this})),this)):this})}detach(){return this.rootComponent&&=(this.rootComponent.unmount(),null),super.detach()}setValue(e){e&&(this.shouldSetValue=!0,this.updateValue(e))}getValue(){return this.dataValue}init(){super.init()}render(){return super.render(`<div ref="react-${this.id}"></div>`)}},Hn=l.Components.components.select,Un=class extends Hn{attach(e){let t=super.attach(e);return(Array.isArray(this.refs.autocompleteInput)?this.refs.autocompleteInput:[this.refs.autocompleteInput]).forEach(e=>{e?.parentNode&&e.parentNode.removeChild(e)}),t}},Wn={pagebreak:M,dynamic_calendar:Ue,calendar:Je,"calendar-advanced":lt,sdcfile:wn,address_map:In,"list-services":Vn,select:Un};function Gn(e){if(!e||typeof e.addComponent!=`function`)throw Error(`registerFormioComponents requires Formio Components with addComponent(name, component)`);return Object.entries(Wn).forEach(([t,n])=>{e.addComponent(t,n)}),Wn}exports.Calendar=Je,exports.CalendarAdvanced=lt,exports.FormioAddressMap=In,exports.FormioDynamicCalendar=Ue,exports.FormioListServices=Vn,exports.FormioPageBreak=M,exports.SdcFile=wn,exports.Select=Un,exports.formioCustomComponents=Wn,exports.registerFormioComponents=Gn;
|
|
89
|
+
//# sourceMappingURL=index.cjs.map
|