@buildplease/core 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 BuildPlease
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
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,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},s=(n,r,s)=>(s=n==null?{}:e(i(n)),o(r||!n||!n.__esModule||!a.call(n,`default`)?t(s,`default`,{value:n,enumerable:!0}):s,n));require("reflect-metadata");let c=require("inversify"),l=require("date-fns"),u=require("date-fns-tz"),d=require("ms");d=s(d,1);let f=require("async-mutex"),p=require("bcryptjs");p=s(p,1);let m=require("zod");const h=`${{name:`buildplease`,displayName:`BuildPlease`,scope:`@buildplease`}.name}.Core.DI`,g={DI:{Formatter:{UnitController:Symbol.for(`${h}.Formatter.UnitController`)},Logger:Symbol.for(`${h}.Logger`)}};var ee=class{_container;constructor(){this._container=new c.Container}get container(){return this._container}getInstance(e){return this.container.get(e)}async registerAssemblies(e){e.forEach(e=>e.assemble(this.container))}};function te(e,t,n){if(typeof e!=`string`&&typeof e!=`number`)return null;let r=n?.normalize??(e=>e.trim().toUpperCase()),i=String(e),a=r(i);for(let[e,n]of Object.entries(t))if(Number.isNaN(Number(e))){if(typeof n==`number`){if(!Number.isNaN(Number(i))&&Number(i)===n||r(e)===a)return n}else if(r(n)===a||r(e)===a)return n}return null}function ne(e){return e instanceof Error}function _(e,t={}){if(e==null)return{};let{filterNull:n=!0,filterUndefined:r=!0,filterEmptyString:i=!1,filterEmptyObject:a=!1,filterEmptyArray:o=!1}=t;return Object.keys(e).reduce((s,c)=>{let l=e[c];return v(l)&&Object.getPrototypeOf(l)===null&&(l=void 0),b(l)&&(l=_(l,t)),n&&l===null||r&&l===void 0||i&&l===``||a&&y(l)||o&&Array.isArray(l)&&l.length===0||(s[c]=l),s},{})}function v(e){return typeof e==`object`&&!!e}function y(e){return v(e)&&Object.keys(e).length===0}function re(e){return v(e)&&Object.keys(e).length>0}function b(e){return v(e)&&Object.getPrototypeOf(e)===Object.prototype}var x=class e{value;constructor(e){this.value=e}get isNil(){return this.value==null}map(t){return this.isNil?new e(null):new e(t(this.value))}flatMap(t){return this.isNil?new e(null):t(this.value)}or(e){return this.isNil?e():this.value}orThrow(e){if(this.isNil)throw e||Error(`Conversion Error`);return this.value}orDefault(e){return this.isNil?e:this.value}ifPresent(e){return this.isNil||e(this.value),this}ifAbsent(e){return this.isNil&&e(),this}};function ie(e){return new x(e)}function ae(e){return e!==void 0}function oe(e){return e!==null}function se(e){return e!=null}function ce(e){try{return new x(e())}catch{return new x(null)}}async function le(e,t){try{await e()}catch(e){t&&t(e)}}async function ue(e,t){try{return new x(await e())}catch(e){return t&&t(e),new x(null)}}function de(e){return new Promise(t=>setTimeout(t,e))}function fe(e){return typeof e==`string`&&e.trim().length>0}function pe(e){return e==null||typeof e==`string`&&e.trim().length===0}function me(e){return typeof e==`string`?e===``?null:e:null}function he(e){return typeof e!=`string`||e.trim().length===0?null:e.charAt(0).toUpperCase()+e.slice(1)}function ge(e){return e===null||typeof e==`string`||typeof e==`number`||typeof e==`boolean`}function _e(e){return typeof e==`object`&&!!e&&typeof e.toJSON==`function`}function ve(e){return e==null||[`string`,`number`,`boolean`,`bigint`,`symbol`].includes(typeof e)}Array.prototype.isEmpty=function(){return this==null||this.length===0},String.prototype.capitalized=function(){let e=this==null?``:this.toString();return e.trim()?e.charAt(0).toUpperCase()+e.slice(1):``};var S=class{streetLine1;streetLine2;postalCode;state;city;country;countryCode;constructor(e){this.streetLine1=e.streetLine1,this.streetLine2=e.streetLine2,this.postalCode=e.postalCode,this.state=e.state,this.city=e.city,this.country=e.country,this.countryCode=e.countryCode}toJSON(){return _({streetLine1:this.streetLine1,streetLine2:this.streetLine2,postalCode:this.postalCode,city:this.city,state:this.state,country:this.country,countryCode:this.countryCode},{filterNull:!0,filterUndefined:!0,filterEmptyString:!0})}formatted(){let e=(e,t)=>e.map(e=>e?.trim()).filter(e=>e&&e.length>0).join(t).trim(),t=this.streetLine1;return e([t,e([this.postalCode,this.city],` `),e([this.country],`, `)],`, `)}},C=class{email;fb;ig;phone;web;constructor({email:e,fb:t,ig:n,phone:r,web:i}){this.email=e,this.fb=t,this.ig=n,this.phone=r,this.web=i}toJSON(){return _({email:this.email,fb:this.fb,ig:this.ig,phone:this.phone,web:this.web},{filterNull:!0,filterUndefined:!0,filterEmptyString:!0})}},w=class e{date;constructor(e){if(!e){this.date=new Date;return}if(e instanceof Date){if(!(0,l.isValid)(e))throw Error(`Invalid date object`);this.date=e;return}let t=(0,l.parseISO)(e);if(!(0,l.isValid)(t))throw Error(`Invalid date string`);this.date=t}static fromUnixTimestamp(t,n){return new e((0,l.fromUnixTime)(t,n))}static now(){return new e(new Date)}toJSON(){return this.toISOString()}toDate(){return this.date}toUnixTimestamp(){return(0,l.getUnixTime)(this.date)}getTime(){return this.date.getTime()}toISOString(){return(0,l.formatISO)(this.date)}format(e,t){return(0,l.format)(this.date,e,t)}addingDuration(t){return new e((0,l.add)(this.date,t))}addingMilliseconds(t){return new e((0,l.addMilliseconds)(this.date,t))}addingSeconds(t){return new e((0,l.addSeconds)(this.date,t))}addingMinutes(t){return new e((0,l.addMinutes)(this.date,t))}addingHours(t){return new e((0,l.addHours)(this.date,t))}addingDays(t){return new e((0,l.addDays)(this.date,t))}addingWeeks(t){return new e((0,l.addWeeks)(this.date,t))}addingMonths(t){return new e((0,l.addMonths)(this.date,t))}addingYears(t){return new e((0,l.addYears)(this.date,t))}subtractingDuration(t){return new e((0,l.sub)(this.date,t))}subtractingMilliseconds(t){return new e((0,l.subMilliseconds)(this.date,t))}subtractingSeconds(t){return new e((0,l.subSeconds)(this.date,t))}subtractingMinutes(t){return new e((0,l.subMinutes)(this.date,t))}subtractingHours(t){return new e((0,l.subHours)(this.date,t))}subtractingDays(t){return new e((0,l.subDays)(this.date,t))}subtractingWeeks(t){return new e((0,l.subWeeks)(this.date,t))}subtractingMonths(t){return new e((0,l.subMonths)(this.date,t))}subtractingYears(t){return new e((0,l.subYears)(this.date,t))}differenceInMilliseconds(e){return(0,l.differenceInMilliseconds)(this.date,e.date)}differenceInSeconds(e){return(0,l.differenceInSeconds)(this.date,e.date)}differenceInMinutes(e){return(0,l.differenceInMinutes)(this.date,e.date)}differenceInHours(e){return(0,l.differenceInHours)(this.date,e.date)}differenceInDays(e){return(0,l.differenceInDays)(this.date,e.date)}differenceInWeeks(e){return(0,l.differenceInWeeks)(this.date,e.date)}differenceInMonths(e){return(0,l.differenceInMonths)(this.date,e.date)}differenceInYears(e){return(0,l.differenceInYears)(this.date,e.date)}isEqualTo(e){return(0,l.isEqual)(this.date,e.date)}isBefore(e){return(0,l.isBefore)(this.date,e.date)}isAfter(e){return(0,l.isAfter)(this.date,e.date)}compareTo(e){return(0,l.compareAsc)(this.date,e.date)}isSameDayAs(e){return(0,l.isSameDay)(this.date,e.date)}startOfDay(){return new e((0,l.startOfDay)(this.date))}endOfDay(){return new e((0,l.endOfDay)(this.date))}startOfWeek(){return new e((0,l.startOfWeek)(this.date))}endOfWeek(){return new e((0,l.endOfWeek)(this.date))}startOfMonth(){return new e((0,l.startOfMonth)(this.date))}endOfMonth(){return new e((0,l.endOfMonth)(this.date))}startOfYear(){return new e((0,l.startOfYear)(this.date))}endOfYear(){return new e((0,l.endOfYear)(this.date))}get dayOfMonth(){return(0,l.getDate)(this.date)}get dayOfWeek(){return(0,l.getDay)(this.date)}get month(){return(0,l.getMonth)(this.date)}get year(){return(0,l.getYear)(this.date)}get hours(){return(0,l.getHours)(this.date)}get minutes(){return(0,l.getMinutes)(this.date)}get seconds(){return(0,l.getSeconds)(this.date)}settingDayOfMonth(t){return new e((0,l.setDate)(this.date,t))}settingDayOfWeek(t){return new e((0,l.setDay)(this.date,t))}settingMonth(t){return new e((0,l.setMonth)(this.date,t))}settingYear(t){return new e((0,l.setYear)(this.date,t))}settingHours(t){return new e((0,l.setHours)(this.date,t))}settingMinutes(t){return new e((0,l.setMinutes)(this.date,t))}settingSeconds(t){return new e((0,l.setSeconds)(this.date,t))}};let ye=function(e){return e.ISO_DATE=`yyyy-MM-dd`,e.ISO_DATETIME=`yyyy-MM-dd'T'HH:mm:ssXXX`,e.MM_DD_YYYY=`MM/dd/yyyy`,e.FULL_MONTH_DAY_YEAR=`MMMM d, yyyy`,e.ABBR_MONTH_DAY_YEAR=`MMM d, yyyy`,e.RFC_3339=`yyyy-MM-dd'T'HH:mm:ss.SSSxxx`,e.ALT_RSS=`d MMM yyyy HH:mm:ss ZZZ`,e.RSS=`EEE, d MMM yyyy HH:mm:ss ZZZ`,e.HTTP_HEADER=`EEE, dd MMM yyyy HH:mm:ss zzz`,e.STANDARD=`EEE MMM dd HH:mm:ss Z yyyy`,e.EXTENDED=`eee dd-MMM-yyyy GG HH:mm:ss.SSS zzz`,e}({});var be=class e{utc;timeZone;constructor(e,t){this.timeZone=e,this.utc=t??new Date}static fromUtc(t,n){return new e(n,t)}static fromLocalIso(t,n){let r=(0,u.fromZonedTime)(t,n);return new e(n,r)}format(e,t){return(0,u.formatInTimeZone)(this.utc,this.timeZone,e,t)}toLocalIsoMinutes(e){return this.format(`yyyy-MM-dd'T'HH:mm`,e)}toLocalIsoSeconds(e){return this.format(`yyyy-MM-dd'T'HH:mm:ss`,e)}toISOString(){return this.utc.toISOString()}toUnixTimestamp(){return Math.floor(this.utc.getTime()/1e3)}toZonedDate(){return(0,u.toZonedTime)(this.utc,this.timeZone)}timezoneOffsetMs(e){return(0,u.getTimezoneOffset)(this.timeZone,e??this.utc)}},T=class{value;constructor([e,t]){if(e<-180||e>180)throw Error(`Longitude must be between -180 and 180.`);if(t<-90||t>90)throw Error(`Latitude must be between -90 and 90.`);this.value=[e,t]}get longitude(){return this.value[0]}get latitude(){return this.value[1]}toJSON(){return this.value}},E=class{type=`Point`;coordinates;bbox;constructor(e,t){this.coordinates=e,this.bbox=t}toJSON(){return{type:this.type,coordinates:this.coordinates.toJSON(),...this.bbox&&{bbox:this.bbox}}}},D=class{type=`MultiPoint`;coordinates;bbox;constructor(e,t){this.coordinates=e,this.bbox=t}toJSON(){return{type:this.type,coordinates:this.coordinates.map(e=>e.toJSON()),...this.bbox&&{bbox:this.bbox}}}},O=class{type=`LineString`;coordinates;bbox;constructor(e,t){this.coordinates=e,this.bbox=t}toJSON(){return{type:this.type,coordinates:this.coordinates.map(e=>e.toJSON()),...this.bbox&&{bbox:this.bbox}}}},k=class{type=`MultiLineString`;coordinates;bbox;constructor(e,t){this.coordinates=e,this.bbox=t}toJSON(){return{type:this.type,coordinates:this.coordinates.map(e=>e.map(e=>e.toJSON())),...this.bbox&&{bbox:this.bbox}}}},A=class{type=`Polygon`;coordinates;bbox;constructor(e,t){this.coordinates=e,this.bbox=t}toJSON(){return{type:this.type,coordinates:this.coordinates.map(e=>e.map(e=>e.toJSON())),...this.bbox&&{bbox:this.bbox}}}},j=class{type=`MultiPolygon`;coordinates;bbox;constructor(e,t){this.coordinates=e,this.bbox=t}toJSON(){return{type:this.type,coordinates:this.coordinates.map(e=>e.map(e=>e.map(e=>e.toJSON()))),...this.bbox&&{bbox:this.bbox}}}};let xe=function(e){return e.Point=`Point`,e.MultiPoint=`MultiPoint`,e.LineString=`LineString`,e.MultiLineString=`MultiLineString`,e.Polygon=`Polygon`,e.MultiPolygon=`MultiPolygon`,e}({});function M(e){return Error(`Invalid ObjectId value: ${String(e)}`)}var N=class e{value;constructor(e){if(e==null)throw M(e);let t=e.trim();if(t.length===0)throw M(e);this.value=t,Object.freeze(this)}get asString(){return this.value}equals(t){return this.value===e.from(t).value}compare(t){let n=e.from(t).value;return this.value===n?0:this.value<n?-1:1}hash(){return this.value}toJSON(){return this.value}toString(){return this.value}[Symbol.toPrimitive](){return this.value}static from(t){return t instanceof e?t:new e(t)}static isValid(e){return typeof e==`string`&&e.trim().length>0}static toValueSet(t){let n=new Set;for(let r of t)n.add(e.from(r).value);return n}},P=class{day;intervals;constructor(e,t){this.day=e,this.intervals=t}toJSON(){return _({day:this.day,intervals:this.intervals},{filterNull:!0,filterUndefined:!0,filterEmptyString:!0})}},Se=class{_milliseconds;_long;constructor(e,t){if(this._long=t?.long===!0,e==null)throw Error(`Invalid interval format: ${e}`);if(typeof e==`number`)this._milliseconds=e;else{let t=(0,d.default)(e);if(t===void 0)throw Error(`Invalid interval format: ${e}`);this._milliseconds=t}}get milliseconds(){return this._milliseconds}get seconds(){return Math.floor(this._milliseconds/1e3)}get minutes(){return Math.floor(this._milliseconds/6e4)}get hours(){return Math.floor(this._milliseconds/36e5)}get days(){return Math.floor(this._milliseconds/864e5)}get weeks(){return Math.floor(this._milliseconds/6048e5)}get formatted(){return(0,d.default)(this._milliseconds,{long:this._long})}toString(){return(0,d.default)(this._milliseconds,{long:this._long})}toObject(){return{milliseconds:this._milliseconds,seconds:this.seconds,minutes:this.minutes,hours:this.hours,days:this.days,weeks:this.weeks}}};let Ce=function(e){return e.Byte=`B`,e.Kilobyte=`KB`,e.Megabyte=`MB`,e.Gigabyte=`GB`,e.Terabyte=`TB`,e}({}),we=function(e){return e.Millimeter=`mm`,e.Centimeter=`cm`,e.Meter=`m`,e.Kilometer=`km`,e}({}),Te=function(e){return e.Milligram=`mg`,e.Gram=`g`,e.Kilogram=`kg`,e.Tonne=`t`,e}({});function Ee(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}let F=class{formatBytes(e,t){let{inputUnit:n=`B`,outputUnit:r=`auto`,decimals:i=1}=t??{},a=e=>e===`B`?1:e===`KB`?1024:e===`MB`?1048576:e===`GB`?1073741824:1099511627776,o=e*a(n),s=r===`auto`?(()=>{for(let e of[`TB`,`GB`,`MB`,`KB`])if(o/a(e)>=1)return e;return`B`})():r,c=o/a(s),l=10**i;return{value:Math.round(c*l)/l,unit:s,bytes:o}}};F=Ee([(0,c.injectable)()],F);var De=class{assemble(e){e.bind(g.DI.Formatter.UnitController).to(F)}};function Oe(){return[new De]}var ke=class{async convertArray(e){return Promise.all(e.map(e=>this.convert(e)))}async convertArrayIgnoreInvalid(e){let t=[];for(let n of e)try{let e=await this.convert(n);t.push(e)}catch{}return t}},Ae=class{convertArray(e){return e.map(e=>this.convert(e))}convertArrayIgnoreInvalid(e){return e.reduce((e,t)=>{try{e.push(this.convert(t))}catch{}return e},[])}};let je=function(e){return e.MOBILE=`MOBILE`,e.DESKTOP=`DESKTOP`,e.WEB=`WEB`,e.TABLET=`TABLET`,e}({}),Me=function(e){return e.IOS=`IOS`,e.ANDROID=`ANDROID`,e.WINDOWS=`WINDOWS`,e.MACOS=`MACOS`,e.LINUX=`LINUX`,e}({}),Ne=function(e){return e.UNKNOWN=`UNKNOWN`,e.ON=`ON`,e.OFF=`OFF`,e}({});var Pe=class extends Error{code=`CANCELED`;constructor(e={}){let{message:t=`Request canceled`,cause:n}=e;super(t),this.name=`CanceledError`,n!==void 0&&(this.cause=n)}},Fe=class extends Error{code=`MALFORMED_DATA`;field;constructor(e={}){let{message:t=`Malformed data`,field:n,cause:r}=e;super(t),this.name=`ConversionError`,this.field=n,r!==void 0&&(this.cause=r)}},Ie=class extends Error{code=`NETWORK_ERROR`;constructor(e={}){let{message:t=`Network error`,cause:n}=e;super(t),this.name=`NetworkError`,n!==void 0&&(this.cause=n)}},Le=class extends Error{code=`TIMEOUT`;constructor(e={}){let{message:t=`Request timeout`,cause:n}=e;super(t),this.name=`TimeoutError`,n!==void 0&&(this.cause=n)}},Re=class extends Error{code=`UNKNOWN`;constructor(e={}){let{message:t=`Unknown error`,cause:n}=e;super(t),this.name=`UnknownError`,n!==void 0&&(this.cause=n)}};function I(e){return L(Object.values(e.resources))}function L(e,t=[]){let n={},r=new Set(e.flatMap(e=>Object.keys(e)));for(let i of r){let r=[...t,i],a=R(i);if(Object.hasOwn(n,a))throw Error(`Duplicate L10n key property: ${[...t.map(R),a].join(`.`)}`);let o=e.map(e=>e[i]).filter(ze);n[a]=o.length>0?L(o,r):r.join(`.`)}return n}function R(e){return e.split(/[^a-zA-Z0-9]+/u).filter(e=>!!e).map(e=>`${e.charAt(0).toUpperCase()}${e.slice(1)}`).join(``)}function ze(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var z=class e{resources;constructor(e){this.resources=e}extend(t){let n=Be(this.resources,t.resources);return new e(n)}};function B(e){return new z(e.resources)}function Be(e,t){let n={};return V(n,e),V(n,t),n}function V(e,t){for(let[n,r]of Object.entries(t)){let t=e[n];if(U(t)&&U(r)){V(t,r);continue}e[n]=H(r)}}function H(e){if(Array.isArray(e))return e.map(e=>H(e));if(U(e)){let t={};return V(t,e),t}return e}function U(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}const W=B({resources:{en:{core:{common:{actions:{save:`Save`,cancel:`Cancel`,delete:`Delete`,confirm:`Confirm`,close:`Close`,back:`Back`,next:`Next`},date_time:{relative:{today:`Today`,tomorrow:`Tomorrow`,yesterday:`Yesterday`},interval:{second:{one:`second`,few:`seconds`,many:`seconds`,other:`seconds`},minute:{one:`minute`,few:`minutes`,many:`minutes`,other:`minutes`},hour:{one:`hour`,few:`hours`,many:`hours`,other:`hours`},day:{one:`day`,few:`days`,many:`days`,other:`days`},week:{one:`week`,few:`weeks`,many:`weeks`,other:`weeks`},month:{one:`month`,few:`months`,many:`months`,other:`months`},year:{one:`year`,few:`years`,many:`years`,other:`years`}},weekday:{monday:`Monday`,tuesday:`Tuesday`,wednesday:`Wednesday`,thursday:`Thursday`,friday:`Friday`,saturday:`Saturday`,sunday:`Sunday`},month:{january:`January`,february:`February`,march:`March`,april:`April`,may:`May`,june:`June`,july:`July`,august:`August`,september:`September`,october:`October`,november:`November`,december:`December`}},validation:{opening_hours:{time_required:`Please specify both opening and closing time, or remove the interval.`,time_range_incomplete:`This interval is incomplete. Please fill in both opening and closing time.`}}}}},sk:{core:{common:{actions:{save:`Uložiť`,cancel:`Zrušiť`,delete:`Odstrániť`,confirm:`Potvrdiť`,close:`Zavrieť`,back:`Späť`,next:`Ďalej`},date_time:{relative:{today:`Dnes`,tomorrow:`Zajtra`,yesterday:`Včera`},interval:{second:{one:`sekunda`,few:`sekundy`,many:`sekundy`,other:`sekúnd`},minute:{one:`minúta`,few:`minúty`,many:`minúty`,other:`minút`},hour:{one:`hodina`,few:`hodiny`,many:`hodiny`,other:`hodín`},day:{one:`deň`,few:`dni`,many:`dni`,other:`dní`},week:{one:`týždeň`,few:`týždne`,many:`týždne`,other:`týždňov`},month:{one:`mesiac`,few:`mesiace`,many:`mesiace`,other:`mesiacov`},year:{one:`rok`,few:`roky`,many:`roky`,other:`rokov`}},weekday:{monday:`Pondelok`,tuesday:`Utorok`,wednesday:`Streda`,thursday:`Štvrtok`,friday:`Piatok`,saturday:`Sobota`,sunday:`Nedeľa`},month:{january:`Január`,february:`Február`,march:`Marec`,april:`Apríl`,may:`Máj`,june:`Jún`,july:`Júl`,august:`August`,september:`September`,october:`Október`,november:`November`,december:`December`}},validation:{opening_hours:{time_required:`Zadajte čas otvorenia aj zatvorenia alebo interval odstráňte.`,time_range_incomplete:`Interval je neúplný. Vyplňte čas otvorenia aj zatvorenia.`}}}}},cs:{core:{common:{actions:{save:`Uložit`,cancel:`Zrušit`,delete:`Odstranit`,confirm:`Potvrdit`,close:`Zavřít`,back:`Zpět`,next:`Další`},date_time:{relative:{today:`Dnes`,tomorrow:`Zítra`,yesterday:`Včera`},interval:{second:{one:`sekunda`,few:`sekundy`,many:`sekundy`,other:`sekund`},minute:{one:`minuta`,few:`minuty`,many:`minuty`,other:`minut`},hour:{one:`hodina`,few:`hodiny`,many:`hodiny`,other:`hodin`},day:{one:`den`,few:`dny`,many:`dny`,other:`dní`},week:{one:`týden`,few:`týdny`,many:`týdny`,other:`týdnů`},month:{one:`měsíc`,few:`měsíce`,many:`měsíce`,other:`měsíců`},year:{one:`rok`,few:`roky`,many:`roky`,other:`let`}},weekday:{monday:`Pondělí`,tuesday:`Úterý`,wednesday:`Středa`,thursday:`Čtvrtek`,friday:`Pátek`,saturday:`Sobota`,sunday:`Neděle`},month:{january:`Leden`,february:`Únor`,march:`Březen`,april:`Duben`,may:`Květen`,june:`Červen`,july:`Červenec`,august:`Srpen`,september:`Září`,october:`Říjen`,november:`Listopad`,december:`Prosinec`}},validation:{opening_hours:{time_required:`Zadejte čas otevření i zavření nebo interval odstraňte.`,time_range_incomplete:`Interval je neúplný. Vyplňte čas otevření i zavření.`}}}}}}}),G=I(W);var Ve=class{values;constructor(e){this.values=e}getLocalized(e){return this.values[e]||null}toJSON(){return this.values}};async function He(e,t=10){return p.default.hash(e,t)}async function Ue(e,t){return p.default.compare(e,t)}const We=m.z.uuid(),Ge=m.z.iso.datetime().transform(e=>new w(e)),Ke=m.z.string().trim().min(1).transform(e=>new N(e)),K=m.z.number().min(-180).max(180),q=m.z.number().min(-90).max(90),J=m.z.tuple([K,q]).transform(([e,t])=>new T([e,t])),Y=m.z.union([m.z.tuple([m.z.number(),m.z.number(),m.z.number(),m.z.number()]),m.z.tuple([m.z.number(),m.z.number(),m.z.number(),m.z.number(),m.z.number(),m.z.number()])]),X=m.z.object({type:m.z.literal(`Point`),coordinates:J,bbox:Y.optional()}).transform(e=>new E(e.coordinates,e.bbox)),Z=m.z.object({type:m.z.literal(`MultiPoint`),coordinates:m.z.array(J).nonempty(),bbox:Y.optional()}).transform(e=>new D(e.coordinates,e.bbox)),Q=m.z.object({type:m.z.literal(`LineString`),coordinates:m.z.array(J).min(2),bbox:Y.optional()}).transform(e=>new O(e.coordinates,e.bbox)),qe=m.z.object({type:m.z.literal(`MultiLineString`),coordinates:m.z.array(m.z.array(J).min(2)).nonempty(),bbox:Y.optional()}).transform(e=>new k(e.coordinates,e.bbox)),Je=m.z.object({type:m.z.literal(`Polygon`),coordinates:m.z.array(m.z.array(J).min(4)).min(1),bbox:Y.optional()}).transform(e=>new A(e.coordinates,e.bbox)),Ye=m.z.object({type:m.z.literal(`MultiPolygon`),coordinates:m.z.array(m.z.array(m.z.array(J).min(4)).min(1)).min(1),bbox:Y.optional()}).transform(e=>new j(e.coordinates,e.bbox)),Xe=m.z.union([X,Z,Q,qe,Je,Ye]),Ze=m.z.object({open:m.z.string(),close:m.z.string()}).superRefine((e,t)=>{let n=e.open.trim(),r=e.close.trim(),i=n.length>0,a=r.length>0,o=(e,n,r)=>{let i={i18n:{key:e,values:r}};t.addIssue({code:`custom`,path:n,params:i})};if(!i&&!a){o(G.Core.Common.Validation.OpeningHours.TimeRequired,[`open`]);return}if(i!==a){let e=i?[`close`]:[`open`];o(G.Core.Common.Validation.OpeningHours.TimeRangeIncomplete,e)}}),$=m.z.object({day:m.z.number().int().min(1).max(7),intervals:m.z.array(Ze).default([])}).transform(e=>new P(e.day,e.intervals)),Qe={UUID:We,DateTime:Ge,ObjectId:Ke,Longitude:K,Latitude:q,Coordinates:J,BBox:Y,PointGeometry:X,MultiPointGeometry:Z,LineStringGeometry:Q,MultiLineStringGeometry:qe,PolygonGeometry:Je,MultiPolygonGeometry:Ye,Geometry:Xe,OpeningHour:$,OpeningHours:m.z.array($),Contacts:m.z.object({email:m.z.email().optional().nullable(),fb:m.z.string().optional().nullable(),ig:m.z.string().optional().nullable(),phone:m.z.string().optional().nullable(),web:m.z.string().optional().nullable()}).transform(e=>new C({email:e.email,fb:e.fb,ig:e.ig,phone:e.phone,web:e.web})),Address:m.z.object({streetLine1:m.z.string().min(1),streetLine2:m.z.string().optional().nullable(),postalCode:m.z.string().optional().nullable(),city:m.z.string().optional().nullable(),state:m.z.string().optional().nullable(),country:m.z.string().min(1),countryCode:m.z.string().optional().nullable()}).transform(e=>new S({streetLine1:e.streetLine1,streetLine2:e.streetLine2,postalCode:e.postalCode,state:e.state,city:e.city,country:e.country,countryCode:e.countryCode}))};function $e(){return Oe()}exports.Address=S,exports.AsyncConverter=ke,exports.ByteUnit=Ce,exports.CanceledError=Pe,exports.Contacts=C,exports.ConversionError=Fe,exports.Converter=Ae,exports.Coordinates=T,exports.CoreL10n=G,exports.CoreL10nResource=W,exports.CoreSymbols=g,exports.DateFormat=ye,exports.DateTime=w,exports.DeviceType=je,exports.DistanceUnit=we,exports.GeoJsonType=xe,exports.L10nResource=z,exports.LineString=O,exports.LocalizableText=Ve,exports.MultiLineString=k,exports.MultiPoint=D,exports.MultiPolygon=j,Object.defineProperty(exports,"Mutex",{enumerable:!0,get:function(){return f.Mutex}}),exports.NetworkError=Ie,exports.OSType=Me,exports.ObjectId=N,exports.OpeningHour=P,exports.Optional=x,exports.Point=E,exports.Polygon=A,exports.PushNotificationStatus=Ne,exports.ScopeController=ee,Object.defineProperty(exports,"Semaphore",{enumerable:!0,get:function(){return f.Semaphore}}),exports.TimeInterval=Se,exports.TimeoutError=Le,Object.defineProperty(exports,"UnitFormatterControllerImpl",{enumerable:!0,get:function(){return F}}),exports.UnknownError=Re,exports.ValidationSchemas=Qe,exports.WeightUnit=Te,exports.ZonedDateTime=be,exports.capitalized=he,exports.compareHash=Ue,exports.coreAssembly=$e,exports.defineL10n=I,exports.defineL10nResource=B,exports.delay=de,exports.emptyOrUndefinedStringToNull=me,exports.filterObject=_,exports.ignoreError=ce,exports.ignoreErrorAsync=le,exports.ignoreErrorOptionalAsync=ue,exports.isDefined=ae,exports.isDefinedAndNotNull=se,exports.isEmptyObject=y,exports.isError=ne,exports.isJSONPrimitive=ge,exports.isJSONSerializable=_e,exports.isNonEmptyObject=re,exports.isNonEmptyString=fe,exports.isNotNull=oe,exports.isNullOrEmpty=pe,exports.isObject=v,exports.isPlainObject=b,exports.isPrimitive=ve,exports.makeHash=He,exports.mapToEnum=te,exports.optional=ie,Object.defineProperty(exports,"tryAcquire",{enumerable:!0,get:function(){return f.tryAcquire}}),Object.defineProperty(exports,"withTimeout",{enumerable:!0,get:function(){return f.withTimeout}}),Object.keys(l).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:function(){return l[e]}})});