1import{a2 as G,r as E,a3 as Y,c as Z,a4 as dt,A as m,a5 as D,a6 as mt,a7 as gt,a8 as vt,a9 as Et,aa as Dt,ab as F,ac as yt,ad as At,ae as Tt,k as p,i as q,N as bt,af as W,u as Ct,v as pt,ag as wt,x as St,a as Mt,z as Ft,n as j}from"./8Yht-gTw.js";import{_ as xt}from"./assets/booking-pt2ctFRd.js";class K{static newGuid(){for(var t=new Array,e=0;e<8;e++){var n=Math.floor((1+Math.random())*65536).toString(16).substring(1);t.push(n)}var r=t[0]+t[1]+"-"+t[2]+"-"+t[3]+"-"+t[4]+"-"+t[5]+t[6]+t[7];return r}static isGuid(t){return/^[{]?[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}[}]?$/.test(t)}}class L{constructor(){this.emitter=new G.EventEmitter,this.EVENT_NAME=K.newGuid(),this.onfirstregistration=()=>{},this.onlastunregistration=()=>{},this.emitter.setMaxListeners(1/0)}register(t){this.emitter.on(this.EVENT_NAME,t),this.emitter.listeners(this.EVENT_NAME).length===1&&this.onfirstregistration()}unregister(t){this.emitter.removeListener(this.EVENT_NAME,t),this.emitter.listeners(this.EVENT_NAME).length===0&&this.onlastunregistration()}emit(t){this.emitter.emit(this.EVENT_NAME,t)}}class nt{constructor(){this.emitter=new G.EventEmitter,this.EVENT_NAME=K.newGuid(),this.onfirstregistration=()=>{},this.onlastunregistration=()=>{},this.emitter.setMaxListeners(1/0)}register(t){this.emitter.on(this.EVENT_NAME,t),this.emitter.listeners(this.EVENT_NAME).length===1&&this.onfirstregistration()}unregister(t){this.emitter.removeListener(this.EVENT_NAME,t),this.emitter.listeners(this.EVENT_NAME).length===0&&this.onlastunregistration()}emit(){this.emitter.emit(this.EVENT_NAME)}}var Ot=function(i,t,e,n){function r(s){return s instanceof e?s:new e(function(a){a(s)})}return new(e||(e=Promise))(function(s,a){function u(h){try{c(n.next(h))}catch(f){a(f)}}function o(h){try{c(n.throw(h))}catch(f){a(f)}}function c(h){h.done?s(h.value):r(h.value).then(u,o)}c((n=n.apply(i,t||[])).next())})};function It(i,t){if(typeof t=="string"){var e=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)(Z|([+\-])(\d{2}):(\d{2}))$/.exec(t);if(e)return new Date(Date.UTC(+e[1],+e[2]-1,+e[3],+e[4],+e[5],+e[6]))}return t}class k{constructor(){this._value=null}save(){}get(){return this._value}set(t){this._value=t}}class ee{constructor(t,e,n=60){this._storage=t,this._key=e,this._minutes=n,this._value=null}save(){this._date=new Date,this._storage.setItem(this._key,JSON.stringify({date:this._date,obj:this._value}))}get(){if(!this._value){var t=this._storage.getItem(this._key);if(t){var e=JSON.parse(t,It);this._date=e.date,this._date.valueOf()+this._minutes*6e4<new Date().valueOf()?(delete this._date,this._value=null):this._value=e.obj}else this._value=null}return this._value}getAsync(){return Ot(this,void 0,void 0,function*(){return this.get()})}set(t){this._value=t,this._date=new Date,this._storage.setItem(this._key,JSON.stringify({date:this._date,obj:t}))}clear(){this._value=null,this._date=new Date,this._storage.removeItem(this._key)}}let C={serverUrl:void 0,environmentName:void 0,environmentReadableName:void 0,albatrossVersion:void 0,facebookClientId:void 0,localStorage:void 0,token:void 0,jwtToken:void 0,language:void 0,googleAPIKey:void 0,recaptchaSiteKey:void 0,cookieBotId:void 0,facebookEventsId:void 0,googleAnalyticsIdentifier:void 0,googleGTagConversionId:void 0,bookingThirdLevel:void 0,maxEndUserPassengers:0,live:!1,useCriteo:!1,homepage:void 0,subscriptionEnabled:!1,zendeskChat:!1,useGoogleTagManager:!1,useKwanko:!1,frontendVersion:void 0,defaultSendSms:!1,defaultSendChangeDateSms:!1,luggageSlotThreshold:0,googleLoginClientId:void 0,canLimitStopsOnSubscriptionsSale:!1,liveStatusDisabled:!1,flixbusPartnerId:void 0};class H{constructor(t,e={useLocalReplica:!0}){this.name=t,this.options=e,this.onReceiveBroadcastMessage=n=>{var r;n.data.source!=this._channelId&&this.canDispatch(n.data.type)&&((r=this.onMessageReceived)===null||r===void 0||r.call(this,n.data))},this._channelId=K.newGuid(),e!=null&&e.useLocalReplica&&(this._syncChannel=new BroadcastChannel(`${C.environmentName}.${this.name}`),this._syncChannel.addEventListener("message",this.onReceiveBroadcastMessage))}sendChanges(t,e){var n;const r={source:this._channelId,type:t,changes:e};(n=this._syncChannel)===null||n===void 0||n.postMessage(r)}canDispatch(t){return this.options&&this.options.allowedChanges&&this.options.allowedChanges.length?this.options.allowedChanges.indexOf(t)>=0:!0}
1}class rt{constructor(){this.Changed=new nt,this.useStore=t=>{E.useEffect(()=>(this.Changed.register(t),()=>this.Changed.unregister(t)))},this.useState=t=>{const e=E.useState(t());return this.useStore(()=>{const n=t();e[1](n)}),e},this.useWithActionBase=(t,e)=>{const[n,r]=E.useState(e());return this.useStore(()=>{r(e())}),E.useEffect(()=>{e()==null&&t()},[]),n}}}class st extends rt{constructor(t,e=new k,n=!1){super(),this.idSelector=t,this._saved=new L,this.useWithAction=(r,s,a)=>{const[u,o]=E.useState(s?this.get(s):null);return this.useStore(()=>{let c=s?this.get(s):null;c&&!(a!=null&&a(c))&&o(c)}),E.useEffect(()=>{var c;if(s){const h=this.get(s);!h||(c=a==null?void 0:a(h))!==null&&c!==void 0&&c?r():o(h)}else o(null)},[s]),u},this.useManyWithAction=(r,s,a)=>{const[u,o]=E.useState(()=>{const c=this.getall().filter(h=>s.indexOf(this.idSelector(h))!=-1);return c.length===s.length?c:null});return this.useStore(()=>{let c=this.getall();o(c)}),E.useEffect(()=>{const c=s.filter(h=>this.get(h)==null);c.length>0&&r(c)},a??[]),u==null?void 0:u.filter(c=>s.indexOf(this.idSelector(c))!=-1)},this._storage=e??new k,n!=null&&(typeof n=="boolean"?this._activeReplica=n===!0?new H(this.constructor.name):void 0:this._activeReplica=new H(this.constructor.name,n)),this._activeReplica!=null&&(this._activeReplica.onMessageReceived=r=>this.onReceiveChanges(r))}allByKey(){const t={};for(const e of this.getall())t[this.idSelector(e)]=e;return t}get(t){var e=this._storage.get();return e&&e[t]||null}add(t,e=!1){this._storage.get()===null&&this._storage.set({});var n=this.idSelector(t);if(!n)throw"invalid item";this._storage.get()[n]=t,this._storage.save(),this.dispatchChanges("add",t,e),this._saved.emit(t)}getall(){var t=[];for(var e in this._storage.get())t.push(this._storage.get()[e]);return t}delete(t,e=!1){this._storage.get()!==null&&(delete this._storage.get()[t],this._storage.save(),this.dispatchChanges("delete",t,e))}deleteMany(t,e=!1){this._storage.get()!==null&&(t.forEach(n=>delete this._storage.get()[n],this),this._storage.save(),this.dispatchChanges("deleteMany",t,e))}setAll(t,e=!1){var n={};for(let r of t)n[this.idSelector(r)]=r;this._storage.set(n),this.dispatchChanges("setAll",t,!0)}update(t,e=!1){this._storage.get()===null&&this._storage.set({});var n=this.idSelector(t);if(!n)throw"invalid item";this._storage.get()[n]=t,this._storage.save(),this.dispatchChanges("update",t,e),this._saved.emit(t)}updateOrAddAll(t,e=!1){this._storage.get()===null&&this._storage.set({});var n=this._storage.get();t.forEach(r=>n[this.idSelector(r)]=r,this),this._storage.save(),this.dispatchChanges("updateOrAddAll",t,e)}updateOrAdd(t,e=!1){this._storage.get()===null&&this._storage.set({}),this._storage.get()[this.idSelector(t)]=t,this._storage.save(),this.dispatchChanges("updateOrAdd",t,e),this._saved.emit(t)}extendOrAddAll(t,e=!1){this._storage.get()===null&&this._storage.set({});var n=this._storage.get();t.forEach(r=>{var s=this.idSelector(r),a=n[s];a?n[s]=Y(a,r):n[s]=r},this),this._storage.save(),this.dispatchChanges("extendOrAddAll",t,e)}extendOrAdd(t,e=!1){this._storage.get()===null&&this._storage.set({});var n=this.idSelector(t),r=this._storage.get()[n];r?this._storage.get()[n]=Y(r,t):this._storage.get()[n]=t,this._storage.save(),this.dispatchChanges("extendOrAdd",t,e)}dispatchChanges(t,e,n=!1){var r;this.Changed.emit(),this._activeReplica!=null&&!n&&((r=this._activeReplica)===null||r===void 0||r.sendChanges(t,e))}onReceiveChanges(t){switch(t.type){case"add":this.add(t.changes,!0);break;case"delete":this.delete(t.changes,!0);break;case"deleteMany":this.deleteMany(t.changes,!0);break;case"update":this.update(t.changes,!0);break;case"updateOrAddAll":this.updateOrAddAll(t.changes,!0);break;case"updateOrAdd":this.updateOrAdd(t.changes,!0);break;case"extendOrAddAll":this.extendOrAddAll(t.changes,!0);break;case"extendOrAdd":this.extendOrAdd(t.changes,!0);break}}}class ne extends st{constructor(){super(...arguments),this.useAllWithAction=(t,e,n)=>{const[r,s]=E.useState(this.isInitialized()?n?this.getall().filter(n):this.getall():null);return this.useStore(()=>{let a=n?this.getall().filter(n):this.getall();
1a&&e&&(a=Z(a,e)),s(a)}),E.useEffect(()=>{this.isInitialized()||t()},[]),r}}isInitialized(){return this._storage.get()!==null}clear(){this._storage.get()!=null&&this._storage.set(null)}}class re extends st{constructor(){super(...arguments),this.initialized=!1,this.useAllWithAction=(t,e)=>{const[n,r]=E.useState(this.isInitialized()?this.getall():null);return this.useStore(()=>{let s=this.getall();s&&e&&(s=Z(s,e)),r(s)}),E.useEffect(()=>{this.isInitialized()||t()},[]),n}}isInitialized(){return this.initialized}clear(){this._storage.get()!=null&&this._storage.set(null)}}class se extends rt{constructor(t=new k){super(),this._saved=new L,this.useStoreWithAction=(e,n,r)=>{const[s,a]=E.useState(e?this.get(e):null);return this.useStore(()=>{let u=e?this.get(e):null;a(u)}),E.useEffect(()=>{if(e){const u=this.get(e);u?a(u):n(e)}else a(null)},[e]),s},this.useStoreManyWithAction=(e,n,r)=>{const s=e.filter(h=>!!h),a=s.join(","),u=()=>{const h={};for(const f of s){const g=this.get(f);if(!g)return null;h[f]=r?Z(g,r):g}return h},[o,c]=E.useState(u);return this.useStore(()=>{c(u())}),E.useEffect(()=>{const h=this.diff(s);h.length>0?n(h):c(u())},[a]),o},this._storage=t}get(t){var e=this._storage.get();return e&&e[t]}set(t,e){if(this._storage.get()===null&&this._storage.set({}),!t)throw"invalid item";this._storage.get()[t]=e,this._storage.save(),this.Changed.emit(),this._saved.emit(e)}setMany(t){this._storage.get()===null&&this._storage.set({});for(const e of t)e.key&&(this._storage.get()[e.key]=e.items);this._storage.save(),this.Changed.emit(),this._saved.emit(t.flatMap(e=>e.items))}delete(t){this._storage.get()!==null&&(delete this._storage.get()[t],this._storage.save(),this.Changed.emit())}deleteAll(){this._storage.set({}),this._storage.save(),this.Changed.emit()}flatten(){const t=this._storage.get();if(t==null)return[];const e=[];for(const n of Object.getOwnPropertyNames(t)){const r=t[n];e.push(...r)}return e}diff(t){const e=Object.keys(this._storage.get()||[]);return dt(t,...e)}}class Rt{constructor(t,e=new k){this.idSelector=t,this.Changed=new nt,this._storage=e}items(){var t=this._storage.get();return t&&Object.keys(t.items).map(e=>t.items[e])||[]}get(t){var e=this._storage.get();return e&&e.items[t]}hasQuery(t){const e=this._storage.get();return e&&(e.queries.indexOf(t)>-1||e.queries.indexOf("")>-1)||!1}setMany(t){this._storage.get()===null&&this._storage.set({items:{},queries:[]});const e=this._storage.get().items;for(const n of t)e[this.idSelector(n)]=n;this._storage.save(),this.Changed.emit()}set(t){this._storage.get()===null&&this._storage.set({items:{},queries:[]});const e=this._storage.get().items;e[this.idSelector(t)]=t,this._storage.save(),this.Changed.emit()}addQueryAll(){this._storage.get()===null&&this._storage.set({items:{},queries:[]}),this._storage.get().queries.push(""),this._storage.save()}addQuery(t){if(this._storage.get()===null&&this._storage.set({items:{},queries:[]}),!t||t==="")throw"argument exception";this._storage.get().queries.push(t),this._storage.save()}delete(t){this._storage.get()!==null&&(delete this._storage.get().items[t],this._storage.save(),this.Changed.emit())}hasQueryAll(){return this.hasQuery("")}clear(){this._storage.get()!=null&&this._storage.set({items:{},queries:[]})}}class $t{constructor(){this.events=[],this.broadcast=new L}onfunction(t,e){const n=t.actionType;return this.events[n]==null&&(this.events[n]=new L),this.events[n].register(r=>e(r)),this}dispatch(t){var e;(e=this.events[t.actionType])===null||e===void 0||e.emit(t.data),this.broadcast.emit(t)}register(t){this.broadcast.register(e=>t(e))}}var $=new $t;let at=100;function ae(i){const t=at++,e=it(function(){var n=i(...Array.prototype.slice.call(arguments));return n.then(r=>($.dispatch({actionType:t,data:r}),r)).catch(r=>($.dispatch({actionType:-t,data:r}),Promise.reject(r)))});return e.actionType=t,e}function ie(i,t,e){const n=e.value;return n.actionType=at++,e.value=it(function(){var r=n.apply(i,arguments);return r.then(s=>($.dispatch({actionType:n.actionType,data:s}),s)).catch(s=>($.dispatch({actionType:-n.actionType,data:s}),Promise.reject(s)))}).bind(this),e.value.actionType=n.actionType,e}function it(i){var t={},e=function(){var n=JSON.stringify(arguments),r=t[n];return r||(t[n]=i.apply(this,arguments),t[n].then(s=>delete t[n]).catch(s=>delete t[n]),t[n])};return e}class w{static ForMinutes(t){return new w(0,0,t)}static ForSeconds(t){return new w(0,0,0,t)}constructor(t,e,n,r){var s,a,u,o;let c,h,f,g;if(t!=null&&typeof t=="object")c=(s=t.days)!==null&&s!==void 0?s:0,h=(a=t.hours)!==null&&a!==void 0?a:0,f=(u=t.minutes)!==null&&u!==void 0?u:0,g=(o=t.seconds)!==null&&o!==void 0?o:0;else if(e===void 0&&n===void 0){const A=t;c=Math.floor(A/(24*60)),h=Math.floor(A%(24*60)/60),f=A%60,g=0}else c=t,h=e??0,f=n??0,g=r??0;for(h||(h=0),f||(f=0),g==null&&(g=0);g>=60;)g-=60,f+=1;for(;g<0;
1)g+=60,f-=1;for(;f>=60;)f-=60,h+=1;for(;f<0;)f+=60,h-=1;for(;h>=24;)h-=24,c+=1;for(;h<0;)h+=24,c-=1;this.days=c,this.hours=h,this.minutes=f,this.seconds=g}duration(t){var e=this.differenceInHoursAndMinutes(t);return new w(0,Math.abs(e.hours),Math.abs(e.minutes))}differenceInHoursAndMinutes(t){const e=this;let n,r;e.valueOf()<t.valueOf()?(n=t,r=e):(n=e,r=t);const s=n.valueOf()-r.valueOf();let a=Math.floor(Math.abs(s)/3600),u=Math.floor(Math.abs(s)%3600/60);return e.valueOf()<t.valueOf()&&(a=-a,u=-u),{hours:a,minutes:u}}add(t){let e=this;return t&&(t.days!=null&&(e=e.addDays(t.days)),t.hours!=null&&(e=e.addHours(t.hours)),t.minutes!=null&&(e=e.addMinutes(t.minutes)),t.seconds!=null&&(e=e.addSeconds(t.seconds))),e}addDays(t){return new w(this.days+t,this.hours,this.minutes,this.seconds)}addHours(t){return new w(this.days,this.hours+t,this.minutes,this.seconds)}addMinutes(t){return new w(this.days,this.hours,this.minutes+t,this.seconds)}addSeconds(t){return new w(this.days,this.hours,this.minutes,this.seconds+t)}valueOf(){return this.seconds+this.minutes*60+this.hours*60*60+this.days*24*60*60}toTimeString(){return`${m(this.hours.toString(),2,"0")}:${m(this.minutes.toString(),2,"0")}${this.seconds>0?":"+m(this.seconds.toString(),2,"0"):""}`}toHoursAndMinutes(t){let e="";return this.days*24+this.hours>0?e+=`${m((this.days*24+this.hours).toString(),2,"0")}${t?":":"h"}`:t&&(e+="00:"),this.minutes>0?e+=`${m(this.minutes.toString(),2,"0")}${t?"":"'"}`:t&&(e+="00"),e||"0"}toHoursAndMinutesExtended(t=!1){let e,n=this.minutes;if(n=this.minutes,this.days*24+this.hours>0&&(e=this.days*24+this.hours),(e??0)+n==0)return t?"0 minuti":"";let r="";return(e??0)>0&&(r+=`${e} ${e==1?"ora":"ore"} `),n>0&&(r+=`${n} ${n==1?"minuto":"minuti"}`),r||"0"}toRelative(t){return this.add(t.negative())}toAbsolute(t){return this.add(t)}toString(){let t=this.days?this.days+" giorni ":"";return t+=this.hours?this.hours+" ore ":"",t+=this.minutes?this.minutes+" minuti ":"",t+=this.seconds?this.seconds+" secondi ":"",t.trim()}negative(){return new w({days:-this.days,hours:-this.hours,minutes:-this.minutes,seconds:-this.seconds})}}w.Zero=new w(0,0,0,0);class l{static ToPlainDate(t){return new Temporal.PlainDate(t.getFullYear(),t.getMonth()+1,t.getDate())}static PlainDateToDate(t){return new Date(t.year,t.month-1,t.day)}static ToPlainDateInTimezone(t,e){return Temporal.Instant.fromEpochMilliseconds(t.getTime()).toZonedDateTimeISO(e).toPlainDate()}static temporalToDate(t){return t instanceof Temporal.PlainDate?new Date(t.year,t.month-1,t.day):t instanceof Temporal.PlainDateTime?new Date(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond):new Date(t.epochMilliseconds)}static getZonedDate(t,e){var n,r,s=D.utcToZonedTime(t,(n=e==null?void 0:e.timezone)!==null&&n!==void 0?n:"Europe/Rome");return isNaN(s.valueOf())?t:D.utcToZonedTime(t,(r=e==null?void 0:e.timezone)!==null&&r!==void 0?r:"Europe/Rome")}static getLocale(t){return(t==null?void 0:t.toLocaleLowerCase())=="it"?mt:(t==null?void 0:t.toLocaleLowerCase())=="de"?gt:(t==null?void 0:t.toLocaleLowerCase())=="fr"?vt:(t==null?void 0:t.toLocaleLowerCase())=="es"?Et:Dt}static ToInputDateFormat(t){const e=t instanceof Date?t:l.temporalToDate(t);return`${e.getFullYear()}-${m((e.getMonth()+1).toString(),2,"0")}-${m(e.getDate().toString(),2,"0")}`}static ToDate(t){if(t instanceof Temporal.PlainDate)return t;if(t instanceof Temporal.ZonedDateTime)return t.with({hour:0,minute:0,second:0,millisecond:0});const e=new Date(t);return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),e}static Min(t){if(!t||t.length===0)throw new Error("Date Array is empty");if(t[0]instanceof Temporal.Instant)return t.reduce((r,s)=>Temporal.Instant.compare(s,r)<0?s:r);if(t[0]instanceof Temporal.PlainDate)return t.reduce((r,s)=>Temporal.PlainDate.compare(s,r)<0?s:r);const e=t;var n=Number.MAX_VALUE;return e.forEach(r=>{r.valueOf()<n&&(n=r.valueOf())}),new Date(n)}static Max(t){if(!t||t.length===0)throw new Error("Date Array is empty");if(t[0]instanceof Temporal.Instant)return t.reduce((r,s)=>Temporal.Instant.compare(s,r)>0?s:r);if(t[0]instanceof Temporal.PlainDate)return t.reduce((r,s)=>Temporal.PlainDate.compare(s,r)>0?s:r);const e=t;var n=Number.MIN_VALUE;return e.forEach(r=>{r.valueOf()>n&&(n=r.valueOf())}),new Date(n)}static MinOrNull(t){if(!t||t.length===0)return null;const e=t.find(s=>
1s!=null);if(!e)return null;if(e instanceof Temporal.Instant)return t.filter(a=>a instanceof Temporal.Instant).reduce((a,u)=>Temporal.Instant.compare(u,a)<0?u:a);if(e instanceof Temporal.PlainDate)return t.filter(a=>a instanceof Temporal.PlainDate).reduce((a,u)=>Temporal.PlainDate.compare(u,a)<0?u:a);const n=t.filter(s=>s!=null&&s instanceof Date&&!isNaN(s.getTime()));if(n.length===0)return null;const r=Math.min(...n.map(s=>s.valueOf()));return new Date(r)}static MaxOrNull(t){if(!t||t.length===0)return null;const e=t.find(s=>s!=null);if(!e)return null;if(e instanceof Temporal.Instant)return t.filter(a=>a instanceof Temporal.Instant).reduce((a,u)=>Temporal.Instant.compare(u,a)>0?u:a);if(e instanceof Temporal.PlainDate)return t.filter(a=>a instanceof Temporal.PlainDate).reduce((a,u)=>Temporal.PlainDate.compare(u,a)>0?u:a);const n=t.filter(s=>s!=null&&s instanceof Date&&!isNaN(s.getTime()));if(n.length===0)return null;const r=Math.max(...n.map(s=>s.valueOf()));return new Date(r)}static Today(){return l.ToDate(new Date)}static AreDateDtosEquivalent(t,e){return t.day===e.day&&t.month===e.month&&t.year===e.year}static ToDateDto(t){if(t instanceof Date)return{year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()};if(t instanceof Temporal.PlainDate||t instanceof Temporal.PlainDateTime)return{year:t.year,month:t.month,day:t.day};if(t instanceof Temporal.ZonedDateTime)return{year:t.year,month:t.month,day:t.day};const e=new Date(t.epochMilliseconds);return{year:e.getUTCFullYear(),month:e.getUTCMonth()+1,day:e.getUTCDate()}}static ToDateTimeDto(t){return{y:t.getFullYear(),m:t.getMonth()+1,d:t.getDate(),hrs:t.getHours(),min:t.getMinutes(),sec:t.getSeconds(),mil:t.getMilliseconds(),off:t.getTimezoneOffset()}}static FromDateTimeDto(t){return new Date(t.y,t.m-1,t.d,t.hrs,t.min,t.sec,t.mil)}static EndOfDay(t){return t instanceof Temporal.PlainDate?t.toPlainDateTime(Temporal.PlainTime.from({hour:23,minute:59,second:59,millisecond:999})):t instanceof Temporal.ZonedDateTime?t.with({hour:23,minute:59,second:59,millisecond:999}):new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59,999)}static BeginOfDay(t){return t instanceof Temporal.PlainDate?t.toPlainDateTime(Temporal.PlainTime.from({hour:0,minute:0,second:0,millisecond:0})):t instanceof Temporal.ZonedDateTime?t.with({hour:0,minute:0,second:0,millisecond:0}):new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)}static EndOfHour(t){return t instanceof Temporal.PlainDateTime?t.with({minute:59,second:59,millisecond:999}):t instanceof Temporal.ZonedDateTime?t.with({minute:59,second:59,millisecond:999}):new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),59,59,999)}static BeginOfHour(t){return t instanceof Temporal.PlainDateTime?t.with({minute:0,second:0,millisecond:0}):t instanceof Temporal.ZonedDateTime?t.with({minute:0,second:0,millisecond:0}):new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),0,0,0)}static BeginOfMinute(t){return t instanceof Temporal.PlainDateTime?t.with({second:0,millisecond:0}):t instanceof Temporal.ZonedDateTime?t.with({second:0,millisecond:0}):new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),0,0)}static EndOfMinute(t){return t instanceof Temporal.PlainDateTime?t.with({second:59,millisecond:999}):t instanceof Temporal.ZonedDateTime?t.with({second:59,millisecond:999}):new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),59,999)}static FirstOfMonthByDate(t){return t instanceof Temporal.PlainDate?t.with({day:1}):t instanceof Temporal.ZonedDateTime?t.with({day:1,hour:0,minute:0,second:0,millisecond:0}):l.FirstOfMonth(t.getFullYear(),t.getMonth())}static FirstOfMonth(t,e){return new Date(t,e,1)}static EndOfMonthByDate(t){if(t instanceof Temporal.PlainDate){const e=t.daysInMonth;return t.with({day:e})}if(t instanceof Temporal.ZonedDateTime){const e=t.daysInMonth;return t.with({day:e,hour:23,minute:59,second:59,millisecond:999})}return l.EndOfMonth(t.getFullYear(),t.getMonth())}static EndOfMonth(t,e){return new Date(t,e+1,0,23,59,59,999)}static GetTimeOnly(t){var e=new Date(0);return e.setHours(t.getHours()),e.setMinutes(t.getMinutes()),e.setSeconds(t.getSeconds()),e.setMilliseconds(t.getMilliseconds()),e}static AddMonths(t,e){if(t instanceof Temporal.PlainDate)return t.add({months:e});if(t instanceof Temporal.ZonedDateTime)return t.add({months:e});var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());return n.setMonth(n.getMonth()+e),n}static AddYears(t,e){if(t instanceof Temporal.PlainDate)return t.add({
1years:e});if(t instanceof Temporal.ZonedDateTime)return t.add({years:e});var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());return n.setFullYear(n.getFullYear()+e),n}static AddDays(t,e){if(t instanceof Temporal.PlainDate)return t.add({days:e});if(t instanceof Temporal.ZonedDateTime)return t.add({days:e});if(t instanceof Temporal.Instant)return t.add({hours:e*24});var n=new Date(t.valueOf());return n.setDate(n.getDate()+e),n}static SubtractDays(t,e){if(t instanceof Temporal.PlainDate)return t.subtract({days:e});if(t instanceof Temporal.ZonedDateTime)return t.subtract({days:e});if(t instanceof Temporal.Instant)return t.subtract({hours:e*24});var n=new Date(t.valueOf());return n.setDate(n.getDate()-e),n}static AddHours(t,e,n){if(t instanceof Temporal.ZonedDateTime)return t.add({hours:e,minutes:n??0});if(t instanceof Temporal.Instant)return t.add({hours:e,minutes:n??0});var r=new Date(t.valueOf());return r.setHours(r.getHours()+e,r.getMinutes()+(n??0)),r}static AddTimeWithOffset(t,e){return l.AddHours(t,e.hours+e.days*24,e.minutes)}static AddMinutes(t,e){if(t instanceof Temporal.ZonedDateTime)return t.add({minutes:e});if(t instanceof Temporal.Instant)return t.add({minutes:e});const n=new Date(t);return n.setMinutes(t.getMinutes()+e),n}static AddSeconds(t,e){if(t instanceof Temporal.ZonedDateTime)return t.add({seconds:e});if(t instanceof Temporal.Instant)return t.add({seconds:e});const n=new Date(t);return n.setSeconds(t.getSeconds()+e),n}static AddTicks(t,e){return t instanceof Temporal.Instant?t.add({milliseconds:e}):new Date(t.valueOf()+e)}static GetUnixTimestamp(t){var e;if(t instanceof Temporal.Instant)return Math.floor(t.epochMilliseconds/1e3);const n=(e=t==null?void 0:t.getTime())!==null&&e!==void 0?e:Date.now();return Math.floor(n/1e3)}static GetDate(t){var e=new Date(0);return t.year&&e.setFullYear(t.year),t.month&&e.setMonth(t.month||0),e.setDate(t.day||1),e.setHours(t.hours||0),e.setMinutes(t.minutes||0),e.setSeconds(t.seconds||0),e}static compactDateStringWithoutDay(t,e){var n;const r=t instanceof Date?t:l.temporalToDate(t);return D.format(l.getZonedDate(r,e),"yyMM",{timeZone:(n=e==null?void 0:e.timezone)!==null&&n!==void 0?n:"Europe/Rome"})}static compactDateString(t,e){var n;const r=t instanceof Date?t:l.temporalToDate(t);return D.format(l.getZonedDate(r,e),"yyMMdd",{timeZone:(n=e==null?void 0:e.timezone)!==null&&n!==void 0?n:"Europe/Rome"})}static fullCompactDateString(t){if(t instanceof Temporal.PlainDate||t instanceof Temporal.PlainDateTime||t instanceof Temporal.ZonedDateTime)return`${t.year.toString()}${m(t.month.toString(),2,"0")}${m(t.day.toString(),2,"0")}`;const e=t instanceof Date?t:l.temporalToDate(t);return`${e.getFullYear().toString()}${m((e.getMonth()+1).toString(),2,"0")}${m(e.getDate().toString(),2,"0")}`}static fromCompactDateString(t){return t=="today"?l.Today():new Date(2e3+ +t.substr(0,2),+t.substr(2,2)-1,+t.substr(4,2))}static compactUTCDateWithMinutesString(t){if(t instanceof Temporal.Instant){const e=t.toZonedDateTimeISO("UTC");return`${m((e.year%100).toString(),2,"0")}${m(e.month.toString(),2,"0")}${m(e.day.toString(),2,"0")}${m(e.hour.toString(),2,"0")}${m(e.minute.toString(),2,"0")}`}return`${m((t.getUTCFullYear()%100).toString(),2,"0")}${m((t.getUTCMonth()+1).toString(),2,"0")}${m(t.getUTCDate().toString(),2,"0")}${m(t.getUTCHours().toString(),2,"0")}${m(t.getUTCMinutes().toString(),2,"0")}`}static fromCompactUTCDateWithMinutesString(t){return new Date(Date.UTC(2e3+ +t.substr(0,2),+t.substr(2,2)-1,+t.substr(4,2),+t.substr(6,2),+t.substr(8,2)))}static dateOnlyString(t){if(t instanceof Temporal.PlainDate||t instanceof Temporal.PlainDateTime||t instanceof Temporal.ZonedDateTime)return`${m(t.year.toString(),4,"0")}${m(t.month.toString(),2,"0")}${m(t.day.toString(),2,"0")}`;const e=t instanceof Date?t:l.temporalToDate(t);return`${m(e.getFullYear().toString(),4,"0")}${m((e.getMonth()+1).toString(),2,"0")}${m(e.getDate().toString(),2,"0")}`}static fromDateOnlyString(t){return new Date(+t.substr(0,4),+t.substr(4,2)-1,+t.substr(6,2))}static getDateString(t){if(t){if(t instanceof Temporal.PlainDate)return`${t.year}-${t.month}-${t.day}`;if(t instanceof Temporal.ZonedDateTime)return`${t.year}-${t.month}-${t.day}`;if(t instanceof Temporal.Instant){const e=l.temporalToDate(t);return e.getFullYear()+"-"+(e.getMonth()+1)+"-"+e.getDate()}return t.getFullYear()+"-"+(t.getMonth()+1)+"-"+t.getDate()}}static getTimeWithDaysOffset(t,e,n){var r=`${m((t%24).toString(),2,"0")}:${m(e.toString(),2,"0")}`;return n>0?r+="+"+n:n<0&&(r+="-"+(-n).toString()),r}static formatHoursAndMinutes(t,e){return`${m((t%24).toString(),2,"0")}:${m(e.toString(),2,"0")}`}static getDaysOffset(t,e){if(t instanceof Temporal.PlainDate&&e instanceof Temporal.PlainDate)return e.since(t,{largestUnit:"day"}).days;const n=t,r=e;if(n==null)throw new Error("start date can't be null");if(r==null)throw new Error("date can't be null");var s,a;n<r?(s=l.ToDate(n),a=l.ToDate(r)):(s=l.ToDate(r),a=l.ToDate(n));let u=0;for(;s.getFullYear()!==a.getFullYear()||s.getMonth()!==a.getMonth()||s.getDate()!==a.getDate();)u++,s.setDate(s.getDate()+1);return n<r?u:-u}static getTimeWithDaysOffset1(t,e,n){var r;let s=l.getDaysOffset(t,e);var a=D.utcToZonedTime(e,(r=n==null?void 0:n.timezone)!==null&&r!==void 0?r:"Europe/Rome");return l.getTimeWithDaysOffset(a.getHours(),a.getMinutes(),s)}static getTimeString(t,e){var n;const r=t instanceof Date?t:l.temporalToDate(t);return D.format(l.getZonedDate(r,e),"HH:mm",{timeZone:(n=e==null?void 0:e.timezone)!==null&&n!==void 0?n:"Europe/Rome"})}static getTimeStringWithSeconds(t,e){var n;const r=t instanceof Date?t:l.temporalToDate(t);return D.format(l.getZonedDate(r,e),"HH:mm:ss",{timeZone:(n=e==null?void 0:e.timezone)!==null&&n!==void 0?n:"Europe/Rome"})}static getReadableDateTimeString(t,e){var n;const r=t instanceof Date?t:l.temporalToDate(t);return D.format(l.getZonedDate(r,e),"dd/MM/yyyy HH:mm",{timeZone:(n=e==null?void 0:e.timezone)!==null&&n!==void 0?n:"Europe/Rome"})}static getFormattedDateTime(t,e,n){var r;const s=t instanceof Date?t:l.temporalToDate(t);return D.format(l.getZonedDate(s,n),e,{timeZone:(r=n==null?void 0:n.timezone)!==null&&r!==void 0?r:"Europe/Rome"})}static getReadableTimeString(t,e){var n;const r=t instanceof Date?t:l.temporalToDate(t);return D.format(l.getZonedDate(r,e),"HH:mm",{timeZone:(n=e==null?void 0:e.timezone)!==null&&n!==void 0?n:"Europe/Rome"})}static getReadableDateTimeStringWithSeconds(t){if(t instanceof Temporal.ZonedDateTime)return l.getReadableDateTimeString(t)+":"+m(t.second.toString(),2,"0");if(t instanceof Temporal.Instant){const e=l.temporalToDate(t);return l.getReadableDateTimeString(e)+":"+m(e.getSeconds().toString(),2,"0")}return l.getReadableDateTimeString(t)+":"+m(t.getSeconds().toString(),2,"0")}static getReadableDateString(t,e){var n;if(t instanceof Temporal.PlainDate)return F(new Date(t.year,t.month-1,t.day),"dd/MM/yyyy");const r=t instanceof Date?t:l.temporalToDate(t);var s=l.getZonedDate(r,e);return isNaN(s.valueOf())?"":D.format(s,"dd/MM/yyyy",{timeZone:(n=e==null?void 0:e.timezone)!==null&&n!==void 0?n:"Europe/Rome"})}static format(t,e,n){var r;const s=t instanceof Date?t:l.temporalToDate(t);return D.format(l.getZonedDate(s,n),e,{timeZone:(r=n==null?void 0:n.timezone)!==null&&r!==void 0?r:"Europe/Rome"})}static getStandardDateString(t,e){var n;if(t instanceof Temporal.PlainDate)return`${t.year}-${m(t.month.toString(),2,"0")}-${m(t.day.toString(),2,"0")}`;const r=t instanceof Date?t:l.temporalToDate(t);return D.format(l.getZonedDate(r,e),"yyyy-MM-dd",{timeZone:(n=e==null?void 0:e.timezone)!==null&&n!==void 0?n:"Europe/Rome"})}static fromUTCDateString(t){return new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0))}static getReadableCompactDateString(t,e){var n;const r=t instanceof Date?t:l.temporalToDate(t);return D.format(l.getZonedDate(r,e),"dd/MM/yy",{timeZone:(n=e==null?void 0:e.timezone)!==null&&n!==void 0?n:"Europe/Rome"})}static getReadableDateDtoString(t){return F(l.fromDateDto(t),"dd/MM/yyyy")}static getDateOnlyString(t){if(t instanceof Temporal.PlainDate||t instanceof Temporal.ZonedDateTime)return F(new Date(t.year,t.month-1,t.day),"yyyy/MM/dd");const e=t instanceof Date?t:l.temporalToDate(t);return F(e,"yyyy/MM/dd")}static fromDateDto(t){return t&&new Date(t.year,t.month-1,t.day)}static getReadableDateDayMonthStringNoTimeZone(t){return t instanceof Temporal.PlainDate||t instanceof Temporal.PlainDateTime?F(new Date(t.year,t.month-1,t.day),"dd/MM"):F(t,"dd/MM")}static getReadableDateDayMonthString(t,e){var n;const r=t instanceof Date?t:l.temporalToDate(t);return D.format(l.getZonedDate(r,e),"dd/MM",{timeZone:(n=e==null?void 0:e.timezone)!==null&&n!==void 0?n:"Europe/Rome"})}static differenceInMinutes(t,e){if(t instanceof Temporal.Instant||t instanceof Temporal.ZonedDateTime){const u=t.epochMilliseconds,o=e.epochMilliseconds;return Math.abs(u-o)/6e4}const n=t,r=e;var s,a;return n<r?(s=r,a=n):(s=n,a=r),(s.valueOf()-a.valueOf())/6e4}static differenceInHoursAndMinutes(t,e){if(t instanceof Temporal.Instant||t instanceof Temporal.ZonedDateTime){const h=t.epochMilliseconds,f=e.epochMilliseconds,g=(h-f)/6e4,A=Math.abs(g),y=Math.floor(A/60)
1*Math.sign(g),S=Math.ceil(A%60)*Math.sign(g);return{hours:y,minutes:S}}const n=t,r=e;var s,a;n<r?(s=r,a=n):(s=n,a=r);var u=(s.valueOf()-a.valueOf())/6e4,o=Math.floor(u/60),c=Math.ceil(u%60);return n<r&&(o=-o,c=-c),{hours:o,minutes:c}}static differenceInTimeithOffset(t,e){let n=Math.abs(e.valueOf()-t.valueOf()),r=Math.floor(n/(1e3*60*60*24)),s=Math.floor(n%(1e3*60*60*24)/(1e3*60*60)),a=Math.floor(n%(1e3*60*60)/(1e3*60));return new w({days:r,hours:s,minutes:a})}static daysInMonth(t,e){return t!=null&&e!=null?yt(new Date(t,e,1)):null}static getMonthNameLocal(t,e){return F(new Date(2017,t,1),"MMM",{locale:l.getLocale(e)})}static getMonthName(t,e,n){var r;const s=t instanceof Date?t:l.temporalToDate(t);return D.format(l.getZonedDate(s,n),"MMM",{timeZone:(r=n==null?void 0:n.timezone)!==null&&r!==void 0?r:"Europe/Rome",locale:l.getLocale(e)})}static getDayOfMonth(t,e,n){var r;const s=t instanceof Date?t:l.temporalToDate(t);return D.format(l.getZonedDate(s,n),"dd",{timeZone:(r=n==null?void 0:n.timezone)!==null&&r!==void 0?r:"Europe/Rome",locale:l.getLocale(e)})}static getYear(t,e,n){var r;const s=t instanceof Date?t:l.temporalToDate(t);return D.format(l.getZonedDate(s,n),"yyyy",{timeZone:(r=n==null?void 0:n.timezone)!==null&&r!==void 0?r:"Europe/Rome",locale:l.getLocale(e)})}static getDayOfWeekName(t,e,n){var r;const s=t instanceof Date?t:l.temporalToDate(t);return D.format(l.getZonedDate(s,n),"EE",{timeZone:(r=n==null?void 0:n.timezone)!==null&&r!==void 0?r:"Europe/Rome",locale:l.getLocale(e??"it")})}static getDayOfWeekFullName(t,e,n){var r;const s=t instanceof Date?t:l.temporalToDate(t);return D.format(l.getZonedDate(s,n),"EEEE",{timeZone:(r=n==null?void 0:n.timezone)!==null&&r!==void 0?r:"Europe/Rome",locale:l.getLocale(e??"it")})}static getShortFriendlyDate2(t,e,n){var r;const s=t instanceof Date?t:l.temporalToDate(t);return D.format(l.getZonedDate(s,n),"d MMM",{timeZone:(r=n==null?void 0:n.timezone)!==null&&r!==void 0?r:"Europe/Rome",locale:l.getLocale(e)})}static getShortFriendlyDate(t,e,n){var r;const s=t instanceof Date?t:l.temporalToDate(t);return D.format(l.getZonedDate(s,n),"EEE d MMM",{timeZone:(r=n==null?void 0:n.timezone)!==null&&r!==void 0?r:"Europe/Rome",locale:l.getLocale(e)})}static getShortFriendlyDateWithMonthName(t,e,n){const r=t instanceof Date?t:l.temporalToDate(t);var s=D.format(l.getZonedDate(r,{timezone:n??"Europe/Rome"}),"dd",{timeZone:n??"Europe/Rome",locale:l.getLocale(e)}),a=D.format(l.getZonedDate(r,{timezone:n??"Europe/Rome"}),"MMMM",{timeZone:n??"Europe/Rome",locale:l.getLocale(e)});return`${s} ${a.substring(0,3)}`}static getShortFriendlyDateWithMonthNameAndYear(t,e,n){const r=t instanceof Date?t:l.temporalToDate(t);var s=D.format(l.getZonedDate(r,{timezone:n??"Europe/Rome"}),"dd",{timeZone:n??"Europe/Rome",locale:l.getLocale(e)}),a=D.format(l.getZonedDate(r,{timezone:n??"Europe/Rome"}),"MMMM",{timeZone:n??"Europe/Rome",locale:l.getLocale(e)}),u=D.format(l.getZonedDate(r,{timezone:n??"Europe/Rome"}),"yyyy",{timeZone:n??"Europe/Rome",locale:l.getLocale(e)});return`${s} ${a.substring(0,3)} ${u}`}static distanceInWords(t,e){const n=t instanceof Date?t:l.temporalToDate(t),r=e instanceof Date?e:l.temporalToDate(e),s=l.differenceInHoursAndMinutes(n,r);let a="";return s.hours>0&&(a+=s.hours+" ore"),s.minutes>0&&(a.length>0&&(a+=" "),a+=s.minutes+" minuti"),a}static differenceInDays(t,e){if(t instanceof Temporal.PlainDate&&e instanceof Temporal.PlainDate){const o=t.since(e,{largestUnit:"day"});return{days:Math.abs(o.days)}}const n=t,r=e;var s,a;n<r?(s=new Date(r.getFullYear(),r.getMonth(),r.getDate(),23,59,59),a=new Date(n.getFullYear(),n.getMonth(),n.getDate(),0,0,0)):(s=new Date(n.getFullYear(),n.getMonth(),n.getDate(),23,59,59),a=new Date(r.getFullYear(),r.getMonth(),r.getDate(),0,0,0));var u=Math.round((s.valueOf()-a.valueOf())/(1e3*60*60*24));return{days:u}}static getMinDate(t){if(!t||t.length===0)return;if(t[0]instanceof Temporal.Instant)return t.reduce((r,s)=>Temporal.Instant.compare(s,r)<0?s:r);if(t[0]instanceof Temporal.PlainDate)return t.reduce((r,s)=>Temporal.PlainDate.compare(s,r)<0?s:r);const e=t;var n=Number.MAX_VALUE;return e.forEach(r=>{r.valueOf()<n&&(n=r.valueOf())}),new Date(n)}static getMaxDate(t){if(!t||t.length===0)return;if(t[0]instanceof Temporal.Instant)return t.reduce((r,s)=>Temporal.Instant.compare(s,r)>0?s:r);if(t[0]instanceof Temporal.PlainDate)return t.reduce((r,s)=>Temporal.PlainDate.compare(s,r)>0?s:r);const e=t;var n=0;return e.forEach(r=>{r.valueOf()>n&&(n=r.valueOf())}),new Date(n)}static greaterThan(t,e,n=!0){if(t instanceof Temporal.Instant&&e instanceof Temporal.Instant)return Temporal.Instant.compare(t,e)>0;if(t instanceof Temporal.PlainDate&&e instanceof Temporal.PlainDate)return Temporal.PlainDate.compare(t,e)>0;const r=n?t:this.ToDate(t),s=n?e:this.ToDate(e);return r.valueOf()>s.valueOf()}static greaterOrEqualThan(t,e,n=!0){if(t instanceof Temporal.Instant&&e instanceof Temporal.Instant)return Temporal.Instant.compare(t,e)>=0;if(t instanceof Temporal.PlainDate&&e instanceof Temporal.PlainDate)return Temporal.PlainDate.compare(t,e)>=0;const r=n?t:this.ToDate(t),s=n?e:this.ToDate(e);return r.valueOf()>=s.valueOf()}static getNearDates(t,e,n){if(t instanceof Temporal.PlainDate){const u=[t];for(let o=0;o<e;o++)u.splice(0,0,u[0].subtract({days:1}));for(let o=u.length-1;u.length<=n;o++)u.push(u[o].add({days:1}));return u}var r=[];r.push(l.ToDate(t));for(var s=0;s<e;s++){let u=l.AddDays(r[0],-1);r.splice(0,0,u)}for(var a=r.length-1;r.length<=n;a++){let u=r[a];r.push(l.AddDays(u,1))}return r}static enumerateFullDates(t,e){if(t instanceof Temporal.PlainDate&&e instanceof Temporal.PlainDate){const u=[];let o=t;for(;Temporal.PlainDate.compare(o,e)<=0;)u.push(o),o=o.add({days:1});return u}var n=[];let r=l.ToDate(t),s=l.ToDate(e);for(var a=0;r.valueOf()<=s.valueOf();a++)n.push(r),r=new Date(r.valueOf()),r.setDate(r.getDate()+1);return n}static getAge(t){if(t instanceof Temporal.PlainDate)return Temporal.Now.plainDateISO().since(t,{largestUnit:"year"}).years;var e=new Date,n=e.getFullYear()-t.getFullYear(),r=e.getMonth()-t.getMonth();return(r<0||r===0&&e.getDate()<t.getDate())&&n--,n}static NowWithMinutePrecision(){const t=new Date;return new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),0,0)}static ToMinutePrecision(t){return t instanceof Temporal.ZonedDateTime?t.with({second:0,millisecond:0}):new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),0,0)}static IsDayOfWeek(t,e){if(t instanceof Temporal.PlainDate||t instanceof Temporal.ZonedDateTime){const r=t.dayOfWeek;return r===1&&e.monday||r===2&&e.tuesday||r===3&&e.wednesday||r===4&&e.thursday||r===5&&e.friday||r===6&&e.saturday||r===7&&e.sunday}if(t instanceof Temporal.Instant){const s=t.toZonedDateTimeISO("UTC").dayOfWeek;return s===1&&e.monday||s===2&&e.tuesday||s===3&&e.wednesday||s===4&&e.thursday||s===5&&e.friday||s===6&&e.saturday||s===7&&e.sunday}const n=t.getDay();return n===1&&e.monday||n===2&&e.tuesday||n===3&&e.wednesday||n===4&&e.thursday||n===5&&e.friday||n===6&&e.saturday||n===0&&e.sunday}static getPeriodDurationString(t,e,n){const r=t instanceof Date?t:l.temporalToDate(t),s=At({start:r,end:l.Today()});return Tt(s,{format:["years","months","days"],locale:l.getLocale(n??"it")})}}l.MinDateDto={day:1,month:1,year:1901};l.MaxDateDto={day:31,month:12,year:2099};l.MinSitrapDate=new Date(2017,1,1,0,0,0);l.MinDate=new Date(1970,1,1,0,0,0);l.MaxDate=new Date(2099,12,31,23,59,59);class ue{asServerError(t){return $.dispatch({actionType:-1,response:t}),Promise.reject(t)}toDateString(t){return t instanceof Temporal.PlainDate?t.toJSON():l.getDateString(t)}jsonToQueryString(t,e){var n="";if(t==null)return n;if(Array.isArray(t)&&e)for(let r=0;r<t.length;++r)n+=this.jsonToQueryString(t[r],`${e}[${r}]`)+"&";else Object.keys(t).map(r=>{let s=t[r];
1if(s instanceof Array){let a="";for(let u of s){if(u instanceof Date)a=l.getDateString(u);else{if(u==null)continue;u instanceof Object?Object.keys(u).map(o=>{var c;if(u[o]instanceof Date)c=l.getDateString(u[o]);else{if(u[o]==null)return;c=encodeURIComponent(u[o])}n+=encodeURIComponent(r)+"."+encodeURIComponent(o)+"="+c+"&"}):a=encodeURIComponent(u)}n+=(e?`${e}.`:"")+encodeURIComponent(r)+"="+a+"&"}}else if(s instanceof Date)n+=(e?`${e}.`:"")+encodeURIComponent(r)+"="+l.getDateString(s)+"&";else if(typeof s=="boolean")n+=(e?`${e}.`:"")+encodeURIComponent(r)+"="+(s?"true":"false")+"&";else if(s instanceof Object)Object.keys(s).map(a=>{var u;if(s[a]instanceof Date)u=l.getDateString(s[a]);else{if(s[a]==null||typeof s[a]=="function")return;u=encodeURIComponent(s[a])}n+=(e?`${e}.`:"")+encodeURIComponent(r)+"."+encodeURIComponent(a)+"="+u+"&"});else{if(s==null)return;n+=(e?`${e}.`:"")+encodeURIComponent(r)+"="+encodeURIComponent(s)+"&"}});return n}}function ut(i,t,e){return class extends E.Component{constructor(r){super(r),this.listener=()=>this.setState({data:t.getFromStore(this.props)}),this.state={data:t.getFromStore(r)}}componentDidMount(){t.store.Changed.register(this.listener),t.needsAction()&&t.getAll()}componentWillUnmount(){t.store.Changed.unregister(this.listener)}render(){const r=e;if(t.needsAction())return r?p.jsx(r,{}):null;var s=i;const a=bt(this.props);return a[t.key]=this.state.data,p.jsx(s,Object.assign({},a))}}}function ce(i,t,e,n){return class extends E.Component{constructor(){super(...arguments),this.listener=()=>{this.forceUpdate()}}isInitialized(){if(t instanceof Rt){if(!t.hasQueryAll())return!1}else if(!t.isInitialized())return!1;return!0}componentDidMount(){t.Changed.register(this.listener),this.isInitialized()||e()}componentWillUnmount(){t.Changed.unregister(this.listener)}render(){const s=n;
1if(!this.isInitialized())return s?p.jsx(s,{}):null;var a=i;return p.jsx(a,Object.assign({},this.props))}}}let he=(i,t,e,n)=>(r,s)=>ut(i,{getAll:()=>e(),key:s,getFromStore:a=>r(t,a),needsAction:()=>!t.isInitialized(),store:t},n),fe=(i,t,e,n,r)=>s=>ut(i,{getAll:()=>n(),key:s,getFromStore:()=>t(),needsAction:()=>t()===void 0,store:{Changed:e}},r);function de(i,t,e){const n=class ot extends E.Component{constructor(s){super(s),this.listener=()=>{const a=e(t,this.props);q(this.state.data,a)||this.setState({data:a})},this.state=ot.getDerivedStateFromProps(s),t.Changed.register(this.listener)}static getDerivedStateFromProps(s){return{data:e(t,s)}}componentWillUnmount(){t.Changed.unregister(this.listener)}render(){if(this.state.data==null)return null;var s=i;return p.jsx(s,Object.assign({ref:this.props.forwardedRef},this.props,this.state.data))}};return E.forwardRef((r,s)=>p.jsx(n,Object.assign({forwardedRef:s},r)))}class me{static ToDictionary(t,e){const n={};for(let r=0;r<t.length;r++){const s=t[r][e];n[s]=t[r]}return n}static ToArray(t){return Object.values(t)}}class J{static taxCodeRegexRepository(t){switch(t==null?void 0:t.toUpperCase()){case"AT":return/^(AT)?U[0-9]{8}$/;case"BE":return/^(BE)?0[0-9]{9}$/;case"BG":return/^(BG)?[0-9]{9,10}$/;case"CY":return/^(CY)?[0-9]{8}L$/;case"CZ":return/^(CZ)?[0-9]{8,10}$/;case"DE":return/^(DE)?[0-9]{9}$/;case"DK":return/^(DK)?[0-9]{8}$/;case"EE":return/^(EE)?[0-9]{9}$/;case"EL":return/^(EL)?[0-9]{9}$/;case"GR":return/^(GR)?[0-9]{9}$/;case"ES":return/^(ES)?[0-9A-Z][0-9]{7}[0-9A-Z]$/;case"FI":return/^(FI)?[0-9]{8}$/;case"GB":return/^(GB)?([0-9]{9}([0-9]{3})?|[A-Z]{2}[0-9]{3})$/;case"HU":return/^(HU)?[0-9]{8}$/;case"IE":return/^(IE)?[0-9]S[0-9]{5}L$/;case"IT":return/^(IT)?[0-9]{11}$/;case"LT":return/^(LT)?([0-9]{9}|[0-9]{12})$/;case"LU":return/^(LU)?[0-9]{8}$/;case"LV":return/^(LV)?[0-9]{11}$/;case"MT":return/^(MT)?[0-9]{8}$/;case"NL":return/^(NL)?[0-9]{9}B[0-9]{2}$/;case"PL":return/^(PL)?[0-9]{10}$/;case"PT":return/^(PT)?[0-9]{9}$/;case"RO":return/^(RO)?[0-9]{2,10}$/;case"SE":return/^(SE)?[0-9]{12}$/;case"SI":return/^(SI)?[0-9]{8}$/;case"SK":return/^(SK)?[0-9]{10}$/;default:return/^[A-Za-z0-9]{4}/}}static fiscalCodeRegexRepository(t){switch(t){case"IT":return/^[A-Z]{6}[0-9LMNPQRSTUV]{2}[ABCDEHLMPRST]{1}(0[1-9]|[12][0-9]|3[01]|4[1-9]|[56][0-9]|7[01])[A-Z0-9]{4}[A-Z]{1}$/;default:return/^[A-Za-z0-9]{4}/}}static codeLength(t){switch(t){case"AD":return 24;case"AE":return 23;case"AL":return 28;case"AT":return 20;case"AZ":return 28;case"BA":return 20;case"BE":return 16;case"BG":return 22;case"BH":return 22;case"BI":return 28;case"BR":return 29;case"BY":return 28;case"CH":return 21;case"CR":return 22;case"CY":return 28;case"CZ":return 24;case"DE":return 22;case"DK":return 18;case"DO":return 28;case"EE":return 20;case"EG":return 29;case"ES":return 24;case"LC":return 32;case"FI":return 18;case"FO":return 18;case"FR":return 27;case"GB":return 22;case"GE":return 22;case"GI":return 23;case"GL":return 18;case"GR":return 27;case"GT":return 28;case"HR":return 21;case"HU":return 28;case"IE":return 22;case"IL":return 23;case"IQ":return 23;case"IS":return 26;case"IT":return 27;case"JO":return 30;case"KW":return 30;case"KZ":return 20;case"LB":return 28;case"LI":return 21;case"LT":return 20;case"LU":return 20;case"LV":return 21;case"LY":return 25;case"MC":return 27;case"MD":return 24;case"ME":return 22;case"MK":return 19;case"MR":return 27;case"MT":return 31;case"MU":return 30;case"NL":return 18;case"NO":return 15;case"PK":return 24;case"PL":return 28;case"PS":return 29;case"PT":return 25;case"QA":return 29;case"RO":return 24;case"RS":return 22;case"SA":return 24;case"SC":return 31;case"SD":return 18;case"SE":return 24;case"SI":return 19;case"SK":return 24;case"SM":return 27;case"ST":return 25;case"SV":return 28;case"TL":return 23;case"TN":return 24;case"TR":return 26;case"UA":return 29;case"VA":return 22;case"VG":return 24;case"XK":return 20;default:return 0}}static GetIntegerRegex(){return/^[-]?\d+$/}static GetUnsignedIntegerRegex(){return/^\d+$/}}class ge{static checksum(t){t=t.toUpperCase();let e=[{key:"0",value:1},{key:"1",value:0},{key:"2",value:5},{key:"3",value:7},{key:"4",value:9},{key:"5",value:13},{key:"6",value:15},{key:"7",value:17},{key:"8",value:19},{key:"9",value:21},{key:"A",value:1},{key:"B",value:0},{key:"C",value:5},{key:"D",value:7},{key:"E",value:9},{key:"F",value:13},{key:"G",value:15},{key:"H",value:17},{key:"I",value:19},{key:"J",value:21},{key:"K",value:2},{key:"L",value:4},{key:"M",value:18},{key:"N",value:20},{key:"O",value:11},{key:"P",value:3},{key:"Q",value:6},{key:"R",value:8},{key:"S",value:12},{key:"T",value:14},{key:"U",value:16},{key:"V",value:10},{key:"W",value:22},{key:"X",value:25},{key:"Y",value:24},{key:"Z",value:23}];var n=[{key:"0",value:0},{key:"1",value:1},{key:"2",value:2},{key:"3",value:3},{key:"4",value:4},{key:"5",value:5},{key:"6",value:6},{key:"7",value:7},{key:"8",value:8},{key:"9",value:9},{key:"A",value:0},{key:"B",value:1},{key:"C",value:2},{key:"D",value:3},{key:"E",value:4},{key:"F",value:5},{key:"G",value:6},{key:"H",value:7},{key:"I",value:8},{key:"J",value:9},{key:"K",value:10},{key:"L",value:11},{key:"M",value:12},{key:"N",value:13},{key:"O",value:14},{key:"P",value:15},{key:"Q",value:16},{key:"R",value:17},{key:"S",value:18},{key:"T",value:19},{key:"U",value:20},{key:"V",value:21},{key:"W",value:22},{key:"X",value:23},{key:"Y",value:24},{key:"Z",value:25}];let r=0;for(let a=0;a<15;a+=2){var s=W(e,u=>
1u.key===t[a]);s&&(r+=s.value)}for(let a=1;a<15;a+=2){var s=W(n,o=>o.key===t[a]);s&&(r+=s.value)}return t[15].charCodeAt(0)===65+r%26}static getRegEx(t){let e,n=t??"";return e=J.fiscalCodeRegexRepository(n),e}static verifyBirthDate(t,e,n){var r;if((n==null?void 0:n.toUpperCase())!="IT")return!0;t=t.toUpperCase();const s=parseInt(t.substring(6,8),10),a=t.charAt(8),u=parseInt(t.substring(9,11),10),c=(r=[{key:"A",value:1},{key:"B",value:2},{key:"C",value:3},{key:"D",value:4},{key:"E",value:5},{key:"H",value:6},{key:"L",value:7},{key:"M",value:8},{key:"P",value:9},{key:"R",value:10},{key:"S",value:11},{key:"T",value:12}].find(ft=>ft.key==a))===null||r===void 0?void 0:r.value;if(!c)return!1;const h=new Date().getFullYear(),f=s+2e3<=h?2e3+s:1900+s,A=u>40?u-40:u,y=new Date(f,c-1,A),S=y.getDate()===e.day,M=y.getMonth()+1===e.month,I=y.getFullYear()===e.year;return S&&M&&I}static extractConsonantsAndVowels(t){const e=t.toUpperCase().replace(/[^A-Z]/g,""),n=e.replace(/[AEIOU]/g,""),r=e.replace(/[^AEIOU]/g,"");return{consonants:n,vowels:r}}static encodeSurname(t){const{consonants:e,vowels:n}=this.extractConsonantsAndVowels(t);let r=e.substring(0,3);for(r.length<3&&(r+=n.substring(0,3-r.length));r.length<3;)r+="X";return r}static encodeName(t){const{consonants:e,vowels:n}=this.extractConsonantsAndVowels(t);let r="";for(e.length>=4?r=e[0]+e[2]+e[3]:r=e.substring(0,3),r.length<3&&(r+=n.substring(0,3-r.length));r.length<3;)r+="X";return r}static verifyNameAndSurname(t,e,n,r){if((r==null?void 0:r.toUpperCase())!="IT")return!0;t=t.toUpperCase();const s=this.encodeSurname(n),a=this.encodeName(e),u=t.substring(0,3),o=t.substring(3,6);return u===s&&o===a}static verify(t,e,n,r,s){return(s==null?void 0:s.toUpperCase())!="IT"?!0:this.verifyNameAndSurname(t,e,n,s)?this.verifyBirthDate(t,r,s):!1}}function ve(i,t){return Y(i,t)}function Ee(i,t,...e){return i.bind(t,...e)}const De=(i,t)=>{let e=null,n=[],r=null,s=null;const a=()=>{e=setTimeout(()=>{e=null;const o=t(n);n=[],s(o),r=null},i)},u=()=>new Promise(o=>{s=o,a()});return o=>(e&&clearTimeout(e),n.push(...o),n=Ct(n),r?a():r=u(),r)};function ye(i,t){let e=0,n;for(;n=i.next();){if(n.done)return!1;if(e++,e>=t)return!0}return!1}class Bt{static checksum(t){if(t.length<=0)return!0;let e=+t.substring(2,4);t=t.toUpperCase();let n=t.substring(4).concat("IT00"),r=0;for(let a=0;a<n.length;++a){let u=n[a];u.charCodeAt(0)>=65&&u.charCodeAt(0)<=90?r=(u.charCodeAt(0)-65+10+r*100)%97:r=(+u+r*10)%97}return 98-r-e===0}static cin(t){if(t.length<=0)return!0;let e=t.substr(4,1).toUpperCase(),n=0,r=[1,0,5,7,9,13,15,17,19,21,2,4,18,20,11,3,6,8,12,14,16,10,22,25,24,23,27,28,26];t=t.substring(5).toUpperCase();for(let u=0;u<t.length;++u){let o=t[u];u%2===0?isNaN(+o)?n+=r[o.charCodeAt(0)-65]:n+=r[+o]:isNaN(+o)?n+=o.charCodeAt(0)-65:n+=+o}let s=n%26;return String.fromCharCode(s+65)===e}static Validate(t,e){var n=t.substring(0,2).toUpperCase(),r=n.toUpperCase()==="IT";if(t.length!==J.codeLength(n))return!1;var s=!e&&t==="";return s||!r?!0:this.validator.test(t)&&this.checksum(t)&&this.cin(t)}}Bt.validator=/^([a-zA-Z]{2}[0-9]{2}[a-zA-Z0-9]{4}[0-9]{7}([a-zA-Z0-9]?){0,16})/;var P=function(i,t,e,n){function r(s){return s instanceof e?s:new e(function(a){a(s)})}return new(e||(e=Promise))(function(s,a){function u(h){try{c(n.next(h))}catch(f){a(f)}}function o(h){try{c(n.throw(h))}catch(f){a(f)}}function c(h){h.done?s(h.value):r(h.value).then(u,o)}c((n=n.apply(i,t||[])).next())})},U=[{base:"A",letters:"Aâ¶ï¼¡ÃÃÃẦẤẪẨÃÄÄáº°áº®áº´áº²È¦Ç ÃÇẢÃ
ǺÇÈÈẠẬẶá¸ÄȺⱯ"},{base:"AA",letters:"ê²"},{base:"AE",letters:"ÃǼǢ"},{base:"AO",letters:"ê´"},{base:"AU",letters:"ê¶"},{base:"AV",letters:"ê¸êº"},{base:"AY",letters:"ê¼"},{base:"B",letters:"Bâ·ï¼¢á¸á¸á¸ÉÆÆ"},{base:"C",letters:"Câ¸ï¼£ÄÄÄÄÃá¸ÆÈ»ê¾"},{base:"D",letters:"Dâ¹ï¼¤á¸Äá¸á¸á¸á¸ÄÆÆÆê¹Ã"},{base:"DZ",letters:"DZÇ"},{base:"Dz",letters:"DzÇ
"},{base:"E",letters:"Eâºï¼¥ÃÃÃá»áº¾á»á»áº¼Äá¸á¸ÄÄÃẺÄÈÈẸá»È¨á¸Äá¸á¸ÆÆ"},{base:"F",letters:"Fâ»ï¼¦á¸Æê»"},{base:"G",letters:"Gâ¼ï¼§Ç´ÄḠÄÄ Ç¦Ä¢Ç¤Æê ê½ê¾"},{base:"H",letters:"Hâ½ï¼¨Ä¤á¸¢á¸¦ÈḤḨḪĦⱧⱵê"},{base:"I",letters:"Iâ¾ï¼©ÃÃÃĨĪĬİÃḮá»ÇÈÈá»Ä®á¸¬Æ"},{base:"J",letters:"Jâ¿ï¼ªÄ´É"},{base:"K",letters:"KâKḰǨḲĶḴÆâ±©êêêê¢"},{base:"L",letters:"LâLĿĹĽḶḸĻḼḺÅȽⱢⱠêêê"},{base:"LJ",letters:"Ç"},{base:"Lj",letters:"Ç"},{base:"M",letters:"Mâï¼á¸¾á¹á¹â±®Æ"},{base:"N",letters:"NâNǸÅÃá¹Åá¹Å
á¹á¹È Æêê¤"},{base:"NJ",letters:"Ç"},{base:"Nj",letters:"Ç"},{base:"O",letters:"OâOÃÃÃá»á»á»á»Ãá¹È¬á¹Åá¹á¹ÅȮȰÃȪá»ÅÇÈÈÆ á»á»á» á»á»¢á»á»ÇªÇ¬ÃÇ¾ÆÆêê"},{base:"OI",letters:"Æ¢"},{base:"OO",letters:"ê"},{base:"OU",letters:"È¢"},{base:"OE",letters:"ÂÅ"},{base:"oe",letters:"ÂÅ"},{base:"P",letters:"Pâ
ï¼°á¹á¹Æ¤â±£êêê"},{base:"Q",letters:"Qâï¼±êêÉ"}
1,{base:"R",letters:"Râï¼²Åá¹ÅÈÈá¹á¹Åá¹ÉⱤêê¦ê"},{base:"S",letters:"Sâï¼³áºÅṤÅṠŠṦṢṨÈÅâ±¾ê¨ê"},{base:"T",letters:"TâTṪŤṬÈŢṰṮŦƬƮȾê"},{base:"TZ",letters:"ê¨"},{base:"U",letters:"Uâï¼µÃÃÃŨṸŪṺŬÃÇÇÇÇỦŮŰÇÈÈÆ¯á»ªá»¨á»®á»¬á»°á»¤á¹²Å²á¹¶á¹´É"},{base:"V",letters:"VâVṼṾƲêÉ
"},{base:"VY",letters:"ê "},{base:"W",letters:"Wâï¼·áºáºÅ´áºáºáºâ±²"},{base:"X",letters:"XâXáºáº"},{base:"Y",letters:"YâYỲÃŶỸȲáºÅ¸á»¶á»´Æ³ÉỾ"},{base:"Z",letters:"ZâZŹáºÅ»Å½áºáºÆµÈ¤â±¿â±«ê¢"},{base:"a",letters:"aâï½áºÃ áâầấẫẩãÄÄằắẵẳȧǡäÇảåǻÇÈÈạáºáº·á¸Ä
â±¥É"},{base:"aa",letters:"ê³"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"êµ"},{base:"au",letters:"ê·"},{base:"av",letters:"ê¹ê»"},{base:"ay",letters:"ê½"},{base:"b",letters:"bâï½á¸á¸
á¸ÆÆÉ"},{base:"c",letters:"câï½ÄÄÄÄÃ§á¸ÆÈ¼ê¿â"},{base:"d",letters:"dâï½á¸Äá¸á¸á¸á¸ÄÆÉÉêº"},{base:"dz",letters:"dzÇ"},{base:"e",letters:"eâï½
èéêá»áº¿á»
á»áº½Äá¸á¸ÄÄëẻÄÈ
Èẹá»È©á¸Äá¸á¸ÉÉÇ"},{base:"f",letters:"fâï½á¸Æê¼"},{base:"g",letters:"gâï½ÇµÄḡÄÄ¡Ç§Ä£Ç¥É ê¡áµ¹ê¿"},{base:"h",letters:"hâï½Ä¥á¸£á¸§ÈḥḩḫáºÄ§â±¨â±¶É¥"},{base:"hv",letters:"Æ"},{base:"i",letters:"iâï½Ã¬ÃîĩīÄïḯá»ÇÈÈá»Ä¯á¸É¨Ä±"},{base:"j",letters:"jâï½ÄµÇ°É"},{base:"k",letters:"kâï½á¸±Ç©á¸³Ä·á¸µÆâ±ªêêê
ê£"},{base:"l",letters:"lâï½ÅÄºÄ¾á¸·á¸¹Ä¼á¸½á¸»Å¿ÅÆÉ«â±¡êêê"},{base:"lj",letters:"Ç"},{base:"m",letters:"mâï½á¸¿á¹á¹É±É¯"},{base:"n",letters:"nâï½Ç¹Åñá¹
Åá¹Åá¹á¹ÆÉ²Åêê¥"},{base:"nj",letters:"Ç"},{base:"o",letters:"oâï½Ã²Ã³Ã´á»á»á»á»Ãµá¹Èá¹Åá¹á¹Åȯȱöȫá»ÅÇÈÈÆ¡á»á»á»¡á»á»£á»á»Ç«ÇøǿÉêêɵ"},{base:"oi",letters:"Æ£"},{base:"ou",letters:"È£"},{base:"oo",letters:"ê"},{base:"p",letters:"pâï½á¹á¹Æ¥áµ½êêê"},{base:"q",letters:"qâ ï½Éêê"},{base:"r",letters:"râ¡ï½Åá¹ÅÈÈá¹á¹Åá¹Éɽêê§ê"},{base:"s",letters:"sâ¢ï½ÃÅá¹¥ÅṡšṧṣṩÈÅÈ¿ê©ê
áº"},{base:"t",letters:"tâ£ï½á¹«áºÅ¥á¹ÈţṱṯŧÆÊⱦê"},{base:"tz",letters:"ê©"},{base:"u",letters:"uâ¤ï½Ã¹ÃºÃ»Å©á¹¹Å«á¹»ÅüÇÇÇÇủůűÇÈÈÆ°á»«á»©á»¯á»á»±á»¥á¹³Å³á¹·á¹µÊ"},{base:"v",letters:"vâ¥ï½á¹½á¹¿ÊêÊ"},{base:"vy",letters:"ê¡"},{base:"w",letters:"wâ¦ï½áºáºÅµáºáº
áºáºâ±³"},{base:"x",letters:"xâ§ï½áºáº"},{base:"y",letters:"yâ¨ï½á»³Ã½Å·á»¹È³áºÃ¿á»·áºá»µÆ´Éỿ"},{base:"z",letters:"zâ©ï½ÅºáºÅ¼Å¾áºáºÆ¶È¥Éⱬê£"},{base:"'",letters:"â"}],lt={};for(var B=0;B<U.length;B++)for(var tt=U[B].letters,N=0;N<tt.length;N++)lt[tt[N]]=U[B].base;class d{static indexOf(t,e,n={diacritics:!0}){let r=t.toLowerCase(),s=e.toLowerCase();return n.diacritics&&(r=d.removeDiacritics(r),s=d.removeDiacritics(s)),r.indexOf(s)}static invariantEquals(t,e){return t==e?!0:t==null||e==null?!1:this.removeDiacritics(t.toLowerCase())==this.removeDiacritics(e.toLowerCase())}static contains(t,e,n={diacritics:!0}){return d.indexOf(t,e,n)>-1}static startsWith(t,e,n={diacritics:!0}){return d.indexOf(t,e,n)==0}static getPercentageString(t){const e=t*100,n=e.toString(),r=n.indexOf(".");if(r<0)return e.toFixed(0);const s=n.substr(r+1);return e.toFixed(s.length)}
1static removeDiacritics(t){return t.replace(/[^\u0000-\u007E]/g,function(e){return lt[e]||e})}static containsInObject(t,e){for(var n in t){var r=t[n];if(r==null)return!1;if(typeof r=="string"&&d.contains(r,e))return!0;if((typeof r=="number"||typeof r=="boolean")&&d.contains(r.toString(),e))return!0;if(r instanceof Date&&d.contains(l.getReadableDateTimeString(r),e)||typeof r=="object"&&d.containsInObject(r,e))return!0}return!1}static findInObjectArray(t,e){var n=t.filter(r=>d.containsInObject(r,e));return n}static findInObject(t,e,...n){var r=t.filter(s=>n.some(a=>a(s)&&d.contains(a(s).toString(),e)));return r}static findInObjectArrayAsync(t,e,...n){return P(this,void 0,void 0,function*(){const r=[];for(const s of t)(yield d.findInObjectAsync(n,s,e))&&r.push(s);return r})}static findInObjectAsync(t,e,n){return P(this,void 0,void 0,function*(){for(const r of t){const s=yield r(e);if(s&&d.contains(s.toString(),n))return!0}return!1})}static smartSplit(t,e){return t.split(e).map(n=>pt(n)).filter(n=>n!=null&&n!="")}static Matches(t,e,n){return Z(t.map((r,s)=>{var a,u,o;const c=(a=e(r))===null||a===void 0?void 0:a.toLowerCase();return{index:s,match:(u=c==null?void 0:c.indexOf(n.toLowerCase()))!==null&&u!==void 0?u:-1,item:r,length:(o=c==null?void 0:c.length)!==null&&o!==void 0?o:-1}}).filter(r=>r.match>-1),r=>r.match,r=>r.length).map(r=>({item:r.item,index:r.index}))}static BestMatch(t,e,n){var r;
1const s=d.Matches(t,e,n)[0];return{item:s==null?void 0:s.item,index:(r=s==null?void 0:s.index)!==null&&r!==void 0?r:-1}}static filter(t,e,n){return!n||!e||e===""?t:wt(...d.smartSplit(e,",").map(r=>St(...d.smartSplit(r,"&").map(s=>d.findInObject(t,s,...n)))))}static filterAsync(t,e,n){return P(this,void 0,void 0,function*(){if(!n||n.length===0||!e||e.trim()==="")return t;const r=d.smartSplit(e,",").map(o=>d.smartSplit(o,"&").map(c=>d.removeDiacritics(c.toLowerCase()))).filter(o=>o.length>0);if(r.length===0)return t;const s=[],a=new Set,u=n.some(o=>this.isPromise(o,t[0]).isPromise);for(const o of t){if(a.has(o))continue;let c;try{u?c=yield Promise.all(n.map(g=>g(o))):c=n.map(g=>g(o))}catch(g){console.error("Error executing selectors for item:",o,g);continue}const h=c.map(g=>{const A=g==null?"":String(g);return d.removeDiacritics(A.toLowerCase())});let f=!1;for(const g of r)if(g.every(y=>h.some(S=>S.includes(y)))){f=!0;break}f&&(s.push(o),a.add(o))}return s})}static toSignedString(t,e){return e!=null&&t==0?e:t>0?`+${t}`:`-${-t}`}static toSignedDecimalString(t){return t==0?"0":t>0?`+${d.toDecimalString(t)}`:`-${d.toDecimalString(-t)}`}static isNullOrWhiteSpace(t){return t==null||t.match(/^ *$/)!=null}static generateRandomString(t){if(t<=0)return"";const e="ABCDEFGHIJKLMNPQRSTUVWXYZ123456789abcdefghijklmnpqrstuvwxyz";let n="";for(let r=0;r<t;r++){const s=Math.floor(Math.random()*e.length);n+=e[s]}return n}static to2Letter6Digits(t){const e=d.guidToByteArray(t),n=(e[3]*Math.pow(256,2)+e[4]*Math.pow(256,1)+e[5])%1e6;return`${d.toReadableLetter(e[0])}${d.toReadableLetter(e[1])}${n.toString().padStart(6,"0")}`}static guidToByteArray(t){const e=t.replace(/-/g,"").toLowerCase(),n=[];for(let r=0;r<e.length;r+=2)n.push(parseInt(e.substr(r,2),16));return n}static toReadableLetter(t){return String.fromCharCode(65+t%26)}}d.toIntegerString=i=>{if(!i)return"0";let t=i<0,e=Math.abs(Math.floor(i)).toString();if(!e||e.length<=3)return t?`-${e}`:e;let n=[],r=0;for(;e.length-r>3;){let a=e.substr(e.length-(r+3),3);n.unshift(a),r+=3}let s=e.length-r;return n.unshift(e.substr(0,s)),t?`-${n.join(".")}`:n.join(".")};d.toDecimalString=(i,t,e=!1)=>{if(!i)return"0";let n=i.toFixed(t??2).split("."),r=e?Math.abs(parseInt(n[0])).toString():d.toIntegerString(Math.abs(parseInt(n[0])));return n.length>1&&(r=`${i>0?"":"-"}${r},${n[1]}`),r};d.capitalize=i=>i.charAt(0).toUpperCase()+i.slice(1);d.EMailValidationPatten="[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*";d.EmailValidationRegex=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;d.isValidEmail=i=>d.EmailValidationRegex.test(i);d.isValidSdiCode=i=>/^[A-Za-z0-9]{6,7}$/.test(i);d.isGuid=i=>/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(i);d.toBase64=i=>new Promise((t,e)=>{const n=new FileReader;n.readAsDataURL(i),n.onload=()=>{var r,s;return t((s=(r=n.result)===null||r===void 0?void 0:r.toString())!==null&&s!==void 0?s:"")},n.onerror=r=>e(r)});d.FileExtensionIsValid=(i,t)=>{var e=i.lastIndexOf(".");if(e!=-1){const n=i.substring(e).toLowerCase();return t.indexOf(n)>=0}return!1};d.isPromise=(i,t)=>{try{const e=i(t);return e instanceof Promise?{isPromise:!0,result:e}:{isPromise:!1,result:e}}catch(e){return{isPromise:!0,result:Promise.reject(e)}}};var Lt=function(i,t){var e={};for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&t.indexOf(n)<0&&(e[n]=i[n]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(i);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(i,n[r])&&(e[n[r]]=i[n[r]]);return e};class kt{constructor(t,e,n){this.prefix=t,this.keys=e,this.intl=n,this.formatMessage=r=>{var s;const a=`${this.prefix}.${r.call(null,this.keys)}`,u=this.intl[a];return typeof u=="function"?(s=r.call(null,{[u.originalKey]:u}))!==null&&s!==void 0?s:a:u??a}}}const ct=E.createContext({locale:"it",messages:{}}),Ae=i=>p.jsx(ct.Provider,{value:{locale:i.locale,messages:i.messages},children:i.children});class Zt{constructor(t){this.messages=t,this.formatCurrency=e=>`${d.toDecimalString(e)} â¬`}get(t){const e=new t;var n=Object.keys(e).reduce((r,s)=>(r[s]=typeof e[s]=="function"?()=>s:s,r),{});return new kt(t.id,n,this.messages)}}function Te(i,t={}
1){const e=class extends E.Component{render(){const n=this.props,{forwardedRef:r}=n,s=Lt(n,["forwardedRef"]);var a=i;return p.jsx(ct.Consumer,{children:u=>p.jsx(a,Object.assign({ref:r},s,{hl:u.locale,i18n:new Zt(u.messages)}))})}};return E.forwardRef((n,r)=>p.jsx(e,Object.assign({forwardedRef:r},n)))}function be(i,t,e){const n=i||{},r=new e,s=Object.keys(r).reduce((a,u)=>{const o=`${e.id}.${u}`,c=r[u];return typeof c=="function"&&(c.originalKey=u),a[o]=c,a},{});return n[t]||(n[t]={}),Mt(n[t],s),n}class v{constructor(t){this.from=t.from,this.to=t.to}equals(t){return this.from.valueOf()===t.from.valueOf()&&this.to.valueOf()===t.to.valueOf()}join(t){return this.containsPeriod(t)?this:t.containsPeriod(this)?t:t.contains(this.from)?v.Create(t.from,this.to):t.contains(this.to)?v.Create(this.from,t.to):t.to.valueOf()+1==this.from.valueOf()?v.Create(t.from,this.to):this.to.valueOf()+1==t.from.valueOf()?v.Create(this.from,t.to):null}contains(t){return t.valueOf()>=this.from.valueOf()&&t.valueOf()<=this.to.valueOf()}containsPeriod(t){return t.from.valueOf()>=this.from.valueOf()&&t.to.valueOf()<=this.to.valueOf()}duration(){return{days:l.differenceInDays(this.from,this.to).days}}intersection(t){if(this.containsPeriod(t))return t;if(t.containsPeriod(this))return this;if(t.contains(this.from))return new v({from:this.from,to:t.to});if(t.contains(this.to))return new v({from:t.from,to:this.to})}intersectsStrict(t){const e=this.intersection(t);return e!=null&&e.from.valueOf()!=e.to.valueOf()}fullDays(){var t=new v({from:l.ToDate(this.from),to:l.EndOfDay(this.to)});return t}subtract(t){let e=[];
1if(this.containsPeriod(t)){if(t.from.valueOf()!=this.from.valueOf()){let n=new v({from:this.from,to:l.AddTicks(t.from,-1)});e.push(n)}if(t.to.valueOf()!=this.to.valueOf()){let n=new v({from:l.AddTicks(t.to,1),to:this.to});e.push(n)}return e}if(t.containsPeriod(this))return e;if(t.contains(this.from)){let n=new v({from:l.AddTicks(t.to,1),to:this.to});return e.push(n),e}if(t.contains(this.to)){let n=new v({from:this.from,to:l.AddTicks(t.from,-1)});return e.push(n),e}return[this]}*datesIterator(){for(var t=l.ToDate(this.from);t.valueOf()<=this.to.valueOf();)yield t,t=l.AddDays(t,1)}dates(){return Array.from(this.datesIterator())}toString(){return this.from.toString()+" - "+this.to.toString()}readableDatesString(){return l.getReadableDateString(this.from)+" - "+l.getReadableDateString(this.to)}static ForMonth(t,e){return v.Create(new Date(t,e-1,1),new Date(t,e,0)).fullDays()}static ForYear(t){return v.Create(new Date(t,0,1),new Date(t,11,0)).fullDays()}static ForCurrentMonth(){const t=new Date;return v.Create(new Date(t.getFullYear(),t.getMonth(),1),new Date(t.getFullYear(),t.getMonth()+1,0)).fullDays()}static ForFullDays(t,e){if(e>=0){const n=l.ToDate(t),r=new Date(n.valueOf());return r.setDate(r.getDate()+e-1),new v({from:n,to:l.EndOfDay(r)})}else{const n=new Date(t.valueOf());return n.setDate(l.ToDate(t).getDate()+e+1),new v({from:n,to:l.EndOfDay(t)})}}static FullDays(t,e){const n=l.ToDate(t);return new v({from:n,to:l.EndOfDay(e)})}static Create(t,e){return new v({from:t,to:e})}static ForDayRangeWithinMonth(t,e,n,r){if(n<1)throw Error(`minDay (${n}) lesser than 1`);if(n>r)throw Error(`minDay (${n}) greater than maxDay (${r})`);const s=v.ForMonth(t,e),a=s.to.getDate();if(r>s.to.getDate())throw Error(`maxDay (${n}) greater than month ${e} max day (${a})`);return s.from.setDate(n),s.to.setDate(r),s}static Invariant(t,e){return t>e?new v({from:e,to:t}):new v({from:t,to:e})}static Until(t){return new v({from:v.MinDate,to:t})}static StartingFrom(t){return new v({from:t,to:v.MaxDate})}static Today(){var t=new v({from:l.Today(),to:l.EndOfDay(l.Today())});return t}static FromToday(){return new v({from:l.Today(),to:this.MaxDate})}}v.FullMonth=i=>v.Create(l.FirstOfMonth(i.getFullYear(),i.getMonth()),l.EndOfMonth(i.getFullYear(),i.getMonth()));v.MinDate=new Date(1901,0,1,0,0,0,0);v.MaxDate=new Date(2099,11,31,23,59,59,0);v.Always=v.Create(v.MinDate,v.MaxDate);class T{constructor(t){this.from=t.from,this.to=t.to}equals(t){return Temporal.PlainDate.compare(this.from,t.from)===0&&Temporal.PlainDate.compare(this.to,t.to)===0}contains(t){return Temporal.PlainDate.compare(t,this.from)>=0&&Temporal.PlainDate.compare(t,this.to)<=0}containsPeriod(t){return Temporal.PlainDate.compare(t.from,this.from)>=0&&Temporal.PlainDate.compare(t.to,this.to)<=0}duration(){return{days:this.from.until(this.to).days}}join(t){return this.containsPeriod(t)?this:t.containsPeriod(this)?t:t.contains(this.from)?T.Create(t.from,this.to):t.contains(this.to)?T.Create(this.from,t.to):Temporal.PlainDate.compare(t.to.add({days:1}),this.from)===0?T.Create(t.from,this.to):Temporal.PlainDate.compare(this.to.add({days:1}),t.from)===0?T.Create(this.from,t.to):null}intersection(t){if(this.containsPeriod(t))return t;if(t.containsPeriod(this))return this;if(t.contains(this.from))return T.Create(this.from,t.to);if(t.contains(this.to))return T.Create(t.from,this.to)}intersectsStrict(t){const e=this.intersection(t);return e!=null&&Temporal.PlainDate.compare(e.from,e.to)!==0}subtract(t){const e=[];return this.containsPeriod(t)?(Temporal.PlainDate.compare(t.from,this.from)!==0&&e.push(T.Create(this.from,t.from.subtract({days:1}))),Temporal.PlainDate.compare(t.to,this.to)!==0&&e.push(T.Create(t.to.add({days:1}),this.to)),e):t.containsPeriod(this)?e:t.contains(this.from)?(e.push(T.Create(t.to.add({days:1}),this.to)),e):t.contains(this.to)?(e.push(T.Create(this.from,t.from.subtract({days:1}))),e):[this]}*datesIterator(){let t=this.from;for(;Temporal.PlainDate.compare(t,this.to)<=0;)yield t,t=t.add({days:1})}dates(){return Array.from(this.datesIterator())}toString(){return`${this.from.toString()} - ${this.to.toString()}`}static Create(t,e){return new T({from:t,to:e})}static Invariant(t,e){return Temporal.PlainDate.compare(t,e)>0?new T({from:e,to:t}):new T({from:t,to:e})}static ForMonth(t,e){const n=new Temporal.PlainDate(t,e,1),r=n.add({months:1}).subtract({days:1});return T.Create(n,r)}static ForYear(t){return T.Create(new Temporal.PlainDate(t,1,1),new Temporal.PlainDate(t,12,31))}static Today(){const t=Temporal.Now.plainDateISO();return T.Create(t,t)}}T.MinDate=new Temporal.PlainDate(1901,1,1);
1T.MaxDate=new Temporal.PlainDate(2099,12,31);T.Always=T.Create(T.MinDate,T.MaxDate);function jt(i){const t=E.useRef(void 0);return q(i,t.current)||(t.current=i),t.current}function Pt(i,t){E.useEffect(i,jt(t))}class Ce{constructor(t){this.isValid=!0,this.errors=new t}}class Ut{static checksum(t){if(t.length<=0)return!0;let e=+t.substring(t.length-1);t=t.toUpperCase();let n=t.substring(0,t.length-1);var r=0;for(let o=0;o<n.length;++o)if(o%2==0)r+=+n[o];else{var s=+n[o]*2;r+=s>9?s-9:s}let a=r%10;if(a==0)return e===0;let u=10-a;return e===u}static Validate(t,e){let n=J.taxCodeRegexRepository(e);return(e==null?void 0:e.toUpperCase())=="IT"?n.test(t)&&this.checksum(t):n.test(t)}}Ut.validator=/^[0-9]{11}$/;const Nt=32,_t=64,Vt=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function _(i,t,e,n,r){let s,a,u,o,c,h,f,g,A,y,S,M,I;for(;r>=64;){for(s=t[0],a=t[1],u=t[2],o=t[3],c=t[4],h=t[5],f=t[6],g=t[7],y=0;y<16;y++)S=n+y*4,i[y]=(e[S]&255)<<24|(e[S+1]&255)<<16|(e[S+2]&255)<<8|e[S+3]&255;for(y=16;y<64;y++)A=i[y-2],M=(A>>>17|A<<15)^(A>>>19|A<<13)^A>>>10,A=i[y-15],I=(A>>>7|A<<25)^(A>>>18|A<<14)^A>>>3,i[y]=(M+i[y-7]|0)+(I+i[y-16]|0);for(y=0;y<64;y++)M=(((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))+(c&h^~c&f)|0)+(g+(Vt[y]+i[y]|0)|0)|0,I=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&a^s&u^a&u)|0,g=f,f=h,h=c,c=o+M|0,o=u,u=a,a=s,s=M+I|0;t[0]+=s,t[1]+=a,t[2]+=u,t[3]+=o,t[4]+=c,t[5]+=h,t[6]+=f,t[7]+=g,n+=64,r-=64}return n}class V{constructor(){this.digestLength=Nt,this.blockSize=_t,this.state=new Int32Array(8),this.temp=new Int32Array(64),this.buffer=new Uint8Array(128),this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this.reset()}reset(){return this.state[0]=1779033703,this.state[1]=3144134277,this.state[2]=1013904242,this.state[3]=2773480762,this.state[4]=1359893119,this.state[5]=2600822924,this.state[6]=528734635,this.state[7]=1541459225,this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this}clean(){for(let t=0;t<this.buffer.length;t++)this.buffer[t]=0;for(let t=0;t<this.temp.length;t++)this.temp[t]=0;this.reset()}update(t,e=t.length){if(this.finished)throw new Error("SHA256: can't update because hash was finished.");let n=0;if(this.bytesHashed+=e,this.bufferLength>0){for(;this.bufferLength<64&&e>0;)this.buffer[this.bufferLength++]=t[n++],e--;this.bufferLength===64&&(_(this.temp,this.state,this.buffer,0,64),this.bufferLength=0)}for(e>=64&&(n=_(this.temp,this.state,t,n,e),e%=64);e>0;)this.buffer[this.bufferLength++]=t[n++],e--;return this}finish(t){if(!this.finished){const e=this.bytesHashed,n=this.bufferLength,r=e/536870912|0,s=e<<3,a=e%64<56?64:128;this.buffer[n]=128;for(let u=n+1;u<a-8;u++)this.buffer[u]=0;this.buffer[a-8]=r>>>24&255,this.buffer[a-7]=r>>>16&255,this.buffer[a-6]=r>>>8&255,this.buffer[a-5]=r>>>0&255,this.buffer[a-4]=s>>>24&255,this.buffer[a-3]=s>>>16&255,this.buffer[a-2]=s>>>8&255,this.buffer[a-1]=s>>>0&255,_(this.temp,this.state,this.buffer,0,a),this.finished=!0}for(let e=0;e<8;e++)t[e*4+0]=this.state[e]>>>24&255,t[e*4+1]=this.state[e]>>>16&255,t[e*4+2]=this.state[e]>>>8&255,t[e*4+3]=this.state[e]>>>0&255;return this}digest(){const t=new Uint8Array(this.digestLength);return this.finish(t),t}_saveState(t){for(let e=0;e<this.state.length;e++)t[e]=this.state[e]}_restoreState(t,e){for(let n=0;n<this.state.length;n++)this.state[n]=t[n];this.bytesHashed=e,this.finished=!1,this.bufferLength=0}}class Yt{constructor(t){this.inner=new V,this.outer=new V,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;const e=new Uint8Array(this.blockSize);if(t.length>this.blockSize)new V().update(t).finish(e).clean();else for(let n=0;n<t.length;n++)e[n]=t[n];for(let n=0;n<e.length;n++)e[n]^=54;this.inner.update(e);for(let n=0;n<e.length;n++)e[n]^=106;this.outer.update(e),this.istate=new Uint32Array(8),this.ostate=new Uint32Array(8),this.inner._saveState(this.istate),this.outer._saveState(this.ostate);for(let n=0;n<e.length;n++)e[n]=0}reset(){return this.inner._restoreState(this.istate,this.inner.blockSize),this.outer._restoreState(this.ostate,this.outer.blockSize),this}clean(){for(let t=0;t<this.istate.length;t++)this.ostate[t]=this.istate[t]=0;this.inner.clean(),this.outer.clean()}update(t){return this.inner.update(t),this}finish(t){return this.outer.finished?this.outer.finish(t):(this.inner.finish(t),this.outer.update(t,this.digestLength).finish(t)),this}
1digest(){const t=new Uint8Array(this.digestLength);return this.finish(t),t}}function z(i){if(!ArrayBuffer.isView(i))throw new TypeError("Failed to execute 'getRandomValues' on 'Crypto': parameter 1 is not of type 'ArrayBufferView'.");if(i.byteLength>65536){const e="Failed to execute 'getRandomValues' on 'Crypto': The ArrayBufferView's byte length ("+i.byteLength+") exceeds the number of bytes of entropy available via this API (65536).";throw"DOMException"in globalThis?new globalThis.DOMException(e):new Error(e)}const t=Math.pow(256,i.BYTES_PER_ELEMENT);for(let e=0;e<i.byteLength;++e)i[e]=Math.floor(t*Math.random());return i}function zt(i,t){if(typeof i!="number")throw new TypeError(`[ERR_INVALID_ARG_TYPE]: The "size" argument must be of type number. Received type ${typeof i} (${i})`);if(i<0||i>2147483647)throw new RangeError(`[ERR_OUT_OF_RANGE]: The value of "size" is out of range. It must be >= 0 && <= 2147483647. Received ${i}`);if(t&&typeof t!="function")throw new TypeError(`[ERR_INVALID_ARG_TYPE]: The "callback" argument must be of type function. Received type ${typeof t} (${t})`);if(!t){const e=new Uint8Array(i);return z(e)}return new Promise(e=>{const n=new Uint8Array(i);let r=null;try{t(null,z(n))}catch{t(r,n)}e(n)})}function Gt(){return zt(16).reduce((e,n,r)=>{let s=e+n.toString(16).padStart(2,"0");return(r===3||r===5||r===7||r===9)&&(s+="-"),s},"")}function qt(){return Gt()}function Kt(){return"2".toLowerCase()+"m".toLowerCase().split("").map(function(i){return String.fromCharCode(i.charCodeAt(0)+-39)}).join("")+"0"+"294611".toLowerCase()+"l".toLowerCase().split("").map(function(i){return String.fromCharCode(i.charCodeAt(0)+-39)}).join("")+"814".toLowerCase()+"k".toLowerCase().split("").map(function(i){return String.fromCharCode(i.charCodeAt(0)+-39)}).join("")+"0"+"7".toLowerCase()+function(...i){var t=Array.prototype.slice.call(arguments),e=t.shift();return t.reverse().map(function(n,r){return String.fromCharCode(n-e-40-r)}).join("")}(20,116,114,119,111,116).toString()+"52".toLowerCase()+"i".toLowerCase().split("").map(function(i){return String.fromCharCode(i.charCodeAt(0)+-39)}).join("")+"58".toLowerCase()+"j".toLowerCase().split("").map(function(i){return String.fromCharCode(i.charCodeAt(0)+-39)}).join("")+"324".toLowerCase()+"k".toLowerCase().split("").map(function(i){return String.fromCharCode(i.charCodeAt(0)+-39)}).join("")+function(...i){var t=Array.prototype.slice.call(arguments),e=t.shift();return t.reverse().map(function(n,r){return String.fromCharCode(n-e-24-r)}).join("")}(26,117)}class Jt{constructor(t){this.sign=(e,n,r)=>{if(!this.pk)return"";const s=Math.floor(Date.now()/1e3),a={id:r,ts:s.toString(),nonce:this.gN(s)},u=new TextEncoder().encode(`${n.toUpperCase()} 2${e} 3${this.sP(a)}`);this.pk.reset();const o=this.pk.update(u).digest(),c=this.bx(new Uint8Array(o));return`i="${a.id}", t="${a.ts}", n="${a.nonce}", m="${c}"`},this.ks=e=>Object.keys(e),this.gN=e=>{const n=new Uint8Array(16);return z(n),`${this.bx(n)}:${m(e.toString(16).toUpperCase(),16,"0")}`},this.sP=e=>this.ks(e).sort().map(n=>encodeURIComponent(n)+"="+encodeURIComponent(e[n])).join("&"),this.pk=new Yt(new TextEncoder().encode(t))}bx(t){return Array.from(t).map(e=>m(e.toString(16),2,"0")).join("")}}var x=function(i,t,e,n){function r(s){return s instanceof e?s:new e(function(a){a(s)})}return new(e||(e=Promise))(function(s,a){function u(h){try{c(n.next(h))}catch(f){a(f)}}function o(h){try{c(n.throw(h))}catch(f){a(f)}}function c(h){h.done?s(h.value):r(h.value).then(u,o)}c((n=n.apply(i,t||[])).next())})};class b{constructor(){this.parseResponse=t=>{let e=t.headers.get("Content-Disposition");if(e&&e.indexOf("attachment")!=-1){var n=/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/,r=n.exec(e),s=r&&r[1]||"file";s=s.replace(/\"/g,"");try{t.clone().blob().then(u=>{xt(()=>import("./8Yht-gTw.js").then(o=>o.F),__vite__mapDeps([0,1,2,3,4,5,6,7])).then(o=>{o.default.saveAs(u,s)})})}catch(u){console.log("Save Blob method failed with the following exception."),console.log(u)}}var a=[Promise.resolve(t.status),t.text().then(u=>{if(!u||u==="")return null;try{let o={};return JSON.parse(u,(c,h)=>b.reviver(c,h,o))}catch{return u}})];return Promise.all(a)},this.enc=new Jt(Kt()),this.cid=qt()}createRequest(t,e,n){return x(this,void 0,void 0,function*(){var r,s;const a=n!==void 0?JSON.stringify(n,b.replacer):void 0;let u={"Content-Type":"application/json",Accept:"application/json",charset
3:"utf8","Albatross-Tenant":C.environmentName,"Frontend-Version":`${C.albatrossVersion}-${C.token}`,s:this.enc.sign(e,t,this.cid),iw:((r=b.overrideWidth)!==null&&r!==void 0?r:window.innerWidth).toString(),ih:((s=b.overrideHeight)!==null&&s!==void 0?s:window.innerHeight).toString()};return b.SC!=null&&(u.SC=b.SC.toString()),C.jwtToken!=null&&C.jwtToken.length&&(u.Authorization=`Bearer ${C.jwtToken}`),C.language!=null&&(u["Accept-Language"]=C.language),{credentials:"include",method:t,mode:"cors",headers:u,body:a}})}buildAuthenticatedUrl(t){var e,n;let r=new URL(t,C.serverUrl);return r.searchParams.append("tenant",(e=C.environmentName)!==null&&e!==void 0?e:""),C.jwtToken!=null&&C.jwtToken.length&&r.searchParams.append("token",(n=C.jwtToken)!==null&&n!==void 0?n:""),r.href}createUploadRequest(t,e){return{credentials:"include",method:t,mode:"cors",headers:{"Albatross-Tenant":C.environmentName,"Frontend-Version":`${C.albatrossVersion}-${C.token}`},body:e}}static isISODate(t,e){var n;if(t.length<10)return!1;const r=t.substring(0,10);return e==null?b.testDateRegEx.test(r):(n=e[r])!==null&&n!==void 0?n:e[r]=b.testDateRegEx.test(r)}static asDate(t){var e,n,r=t.match(b.extractDateRegEx);if(r)return new Date(Date.UTC(+r[1],+r[2]-1,+r[3],+r[4]-+((n=(e=r[10])===null||e===void 0?void 0:e.concat(r[11]))!==null&&n!==void 0?n:0),+r[5],+r[6],r[8]&&+Ft(r[8].substr(0,3),3,"0")||0))}static toJSON(t){var e=-t.getTimezoneOffset()/60,n=new Date(t.valueOf()+e*36e5);let r=(e>=0?"+":"-").concat(m(Math.abs(e).toString(),2,"0"));return n.toJSON().substring(0,19).concat(r).concat(":00")}static replacer(t,e){var n=this[t];return n instanceof Date?b.toJSON(n):e}static reviver(t,e,n){if(e!=null&&typeof e=="string"&&b.isISODate(e,n)){var r=b.asDate(e);if(r)return r}return e}parseStatusCode(t){var e=t[0];return e===200||e===304||e===204?t[1]:(t[1].statusCode=e,Promise.reject(t[1]))}get(t){return x(this,void 0,void 0,function*(){return fetch(t,yield this.createRequest("get",t)).then(this.parseResponse).then(this.parseStatusCode)})}post(t,e){return x(this,void 0,void 0,function*(){return fetch(t,yield this.createRequest("post",t,e)).then(this.parseResponse).then(this.parseStatusCode)})}put(t,e){return x(this,void 0,void 0,function*(){return fetch(t,yield this.createRequest("put",t,e)).then(this.parseResponse).then(this.parseStatusCode)})}patch(t,e){return x(this,void 0,void 0,function*(){return fetch(t,yield this.createRequest("patch",t,e)).then(this.parseResponse).then(this.parseStatusCode)})}delete(t,e){return x(this,void 0,void 0,function*(){return fetch(t,yield this.createRequest("delete",t,e)).then(this.parseResponse).then(this.parseStatusCode)})}upload(t,e){return x(this,void 0,void 0,function*(){return fetch(t,this.createUploadRequest("post",e)).then(this.parseResponse).then(this.parseStatusCode)})}url(t){return this.buildAuthenticatedUrl(t)}}b.overrideHeight=void 0;b.overrideWidth=void 0;b.SC=null;b.extractDateRegEx=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})?(.)?(\d{1,8})?(Z|([+\-])(\d{2}):(\d{2}))$/;b.testDateRegEx=/^\d{4}\-\d{2}\-\d{2}/;var pe=new b;class we{static Round(t,e){var n=Math.pow(10,e||0);return Math.round(t*n)/n}static DeVatAmountByPercentage(t,e,n=2){return this.Round(t/(e/100+1),n)}static DeVatAmount(t,e,n=2){return this.Round(t/(1+e),n)}}var Q;class R{}Q=R;R.calculateDensityCenter=(i,t=.001)=>{if(i.length===0)throw new Error("Array di coordinate vuoto");const e=new Map;for(const s of i){const a=Math.round(s.lat/t),u=Math.round(s.lng/t),o=`${a},${u}`;e.has(o)?e.get(o).count++:e.set(o,{count:1,lat:a*t,lon:u*t})}let n=0,r={lat:0,lng:0,pointCount:0};return e.forEach(s=>{s.count>n&&(n=s.count,r={lat:s.lat,lng:s.lon,pointCount:s.count})}),r};R.calculateDensityCenterClustering=(i,t=.01)=>{if(i.length===0)throw new Error("Array di coordinate vuoto");const e=[],n=new Set;for(let u=0;u<i.length;u++){if(n.has(u))continue;const o=[i[u]];n.add(u);for(let c=u+1;c<i.length;c++){if(n.has(c))continue;Q.calculateDistance(i[u],i[c])<=t&&(o.push(i[c]),n.add(c))}e.push(o)}let r=e[0];for(const u of e)u.length>r.length&&(r=u);const s=r.reduce((u,o)=>u+o.lat,0)/r.length,a=r.reduce((u,o)=>u+o.lng,0)/r.length;return{lat:s,lng:a,pointCount:r.length}};R.calculateBounds=i=>{if(i.length===0)throw new Error("Array di coordinate vuoto");const t={north:i[0].lat,south:i[0].lat,east:i[0].lng,west:i[0].lng};for(const e of i)t.north=Math.max(t.north,e.lat),t.south=Math.min(t.south,e.lat),t.east=Math.max(t.east,e.lng),t.west=Math.min(t.west,e.lng);return t};R.calculateBoundingCorners=i=>{const{north:t,south:e,east:n,west:r}=Q.calculateBounds(i);return[{lat:e,lng:r},{lat:t,lng:n}]};R.calculateDistance=(i,t)=>{const n=i.lat*Math.PI/180,r=t.lat*Math.PI/180,s=(t.lat-i.lat)*Math.PI/180,a=(t.lng-i.lng)*Math.PI/180,u=Math.sin(s/2)*Math.sin(s/2)+Math.cos(n)*Math.cos(r)*Math.sin(a/2)*Math.sin(a/2);return 6371e3*(2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)))};class Se{constructor(){this.initialized=!1,this.enabled=!1}init(t){this.initialized=!0}}class X{static ToJsonObject(t,e=!0){let n={};const r=t,s=["toJSON"];return Object.keys(t).forEach((a,u)=>{e===!0&&r[a]==null||a.indexOf("_")===0||s.indexOf(a)>=0||(n[a]=r[a])}),n}constructor(t){this.toJSON=(e=!0)=>X.ToJsonObject(this),this._eventname=t}}class Qt{constructor(t){this._emitter=t||new G.EventEmitter}addHandler(t,e){const n=new t;this._emitter.addListener(n._eventname,e)}removeHandler(t,e){const n=new t;this._emitter.removeListener(n._eventname,e)}send(t,e){let n;if(typeof t=="function"){if(n=new t,e){const r=Object.getOwnPropertyNames(n);for(const s in e)r.indexOf(s)>=0&&(n[s]=e[s])}}else n=t;n&&n instanceof X&&this._emitter.emit(n._eventname,n)}}const et=new Qt,Me=i=>
3{i.forEach(t=>{t.init(et),t.enabled&&t.registerHandlers(et)})};let Fe=C;function xe(i,t){const[e,n]=E.useState(void 0);return E.useEffect(()=>{i().then(r=>n(r))},t),e}function Oe(i,t){const[e,n]=E.useState(void 0);return Pt(()=>{i().then(r=>n(r))},t),e}var O=function(i,t,e,n){function r(s){return s instanceof e?s:new e(function(a){a(s)})}return new(e||(e=Promise))(function(s,a){function u(h){try{c(n.next(h))}catch(f){a(f)}}function o(h){try{c(n.throw(h))}catch(f){a(f)}}function c(h){h.done?s(h.value):r(h.value).then(u,o)}c((n=n.apply(i,t||[])).next())})},Xt=function(i,t){var e={};for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&t.indexOf(n)<0&&(e[n]=i[n]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,n=Object.getOwnPropertySymbols(i);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(i,n[r])&&(e[n[r]]=i[n[r]]);return e};const ht=E.createContext({values:null,errors:{},handleSubmit:()=>{},set:()=>{},dirty:!1,setItem:()=>{}});class Ie extends E.Component{constructor(t){super(t),this.onError=e=>{this.setState({errors:e})},this.handleSubmit=e=>O(this,void 0,void 0,function*(){e&&(e.preventDefault(),e.stopPropagation());const{validationSchema:n}=this.props,{item:r}=this.state;if(n){const s=n(r);if(s.isValid)this.setState({originalItem:j(r)},()=>this.props.onSubmit(r));else{const a={};for(const u in s.errors)a[u]=s.errors[u];this.setState({errors:a})}}}),this.getError=(e,n)=>{var r;const{validationSchema:s}=this.props;if(s)return(r=s(n).errors[e])!==null&&r!==void 0?r:""},this.getValidationErrors=(e,n)=>O(this,void 0,void 0,function*(){const r=Object.assign({},this.state.errors);let s=!1;for(const a in this.state.touched)this.state.touched[a]==!0&&(r[a]=yield this.getError(a,n),a==e&&(s=!0));return s||(r[e]=yield this.getError(e,n)),r}),this.setItem=(e,n)=>O(this,void 0,void 0,function*(){this.setState({item:e,touched:{},originalItem:n===!0?this.state.originalItem:j(e)})}),this.set=(e,n,r,s)=>O(this,void 0,void 0,function*(){const{item:a}=this.state,u=this.props;if(s!==void 0){const o=Object.assign(Object.assign({},a),{[e]:Object.assign(Object.assign({},a[e]),{[n]:Object.assign(Object.assign({},a[e][n]),{[r]:s})})});this.setState({item:o,touched:Object.assign(Object.assign({},this.state.touched),{[e]:!0})},()=>O(this,void 0,void 0,function*(){var c;this.setState({errors:yield this.getValidationErrors(e,o)}),(c=u.onItemChanged)===null||c===void 0||c.call(u,o)}))}else if(r!==void 0){const o=Object.assign(Object.assign({},a),{[e]:Object.assign(Object.assign({},a[e]),{[n]:r})});this.setState({item:o,touched:Object.assign(Object.assign({},this.state.touched),{[e]:!0})},()=>O(this,void 0,void 0,function*(){var c;this.setState({errors:yield this.getValidationErrors(e,o)}),(c=u.onItemChanged)===null||c===void 0||c.call(u,o)}))}else{const o=Object.assign(Object.assign({},a),{[e]:n});this.setState({item:o,touched:Object.assign(Object.assign({},this.state.touched),{[e]:!0})},()=>O(this,void 0,void 0,function*(){var c;this.setState({errors:yield this.getValidationErrors(e,o)}),(c=u.onItemChanged)===null||c===void 0||c.call(u,o)}))}}),this.state={errors:{},originalItem:j(t.initialValues),item:t.initialValues,touched:{}}}render(){const t=this.props,{noPrompt:e,children:n}=t,r=Xt(t,["noPrompt","children"]),s=Object.assign(Object.assign({},r),{onError:this.onError,errors:this.state.errors,set:this.set,setItem:this.setItem,handleSubmit:this.handleSubmit,dirty:!q(this.state.originalItem,this.state.item),values:this.state.item});return p.jsx(ht.Provider,{value:s,children:typeof n=="function"?n(s):n})}}class Re extends E.PureComponent{render(){const t=this.props.children;return p.jsx(ht.Consumer,{children:e=>p.jsx(t,Object.assign({},e))})}}function $e(i,t){const[e,n]=E.useState(i);return E.useEffect(()=>{const r=setTimeout(()=>{n(i)},t);return()=>{clearTimeout(r)}},[i,t]),e}export{st as A,ue as B,ye as C,l as D,nt as E,ge as F,K as G,me as H,k as I,Oe as J,Me as K,Bt as L,ee as M,we as N,Ee as O,v as P,Rt as Q,ve as R,d as S,L as T,qt as U,Ce as V,he as W,Re as X,Ie as Y,X as Z,$e as _,ie as a,rt as b,$ as c,C as d,Fe as e,ae as f,De as g,ne as h,re as i,de as j,se as k,ce as l,fe as m,T as n,Ut as o,Te as p,w as q,Se as r,be as s,Zt as t,xe as u,et as v,pe as w,Ae as x,Pt as y,b as z};
4function __vite__mapDeps(indexes) { 5 if (!__vite__mapDeps.viteFileDeps) { 6 __vite__mapDeps.viteFileDeps = ["8Yht-gTw.js","assets/booking-pt2ctFRd.js","WuHAdAb1.js","assets/hS-CqCom.css","OKWQlYh6.js","eoMzmDS_.js","DkAH6N0u.js","assets/3dYzkm0E.css"] 7 } 8 return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) 9}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.