@scbt-ecom/ui 0.109.1 → 0.110.1

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.
Files changed (33) hide show
  1. package/dist/lib/shared/style.css +1 -1
  2. package/dist/lib/shared/ui/formElements/controlled/autocomplete/Autocomplete.js +1 -1
  3. package/dist/lib/shared/ui/formElements/controlled/autocomplete/Autocomplete.js.map +1 -1
  4. package/dist/lib/shared/ui/formElements/controlled/combobox/ComboboxControl.js +1 -1
  5. package/dist/lib/shared/ui/formElements/controlled/combobox/ComboboxControl.js.map +1 -1
  6. package/dist/lib/shared/ui/formElements/ui/fieldAttachment/FieldAttachment.js +1 -1
  7. package/dist/lib/shared/ui/formElements/ui/fieldAttachment/FieldAttachment.js.map +1 -1
  8. package/dist/lib/shared/ui/formElements/uncontrolled/combobox/combobox.js +1 -1
  9. package/dist/lib/shared/ui/formElements/uncontrolled/combobox/combobox.js.map +1 -1
  10. package/dist/lib/shared/ui/icon/allowedIcons.js +1 -1
  11. package/dist/lib/shared/ui/icon/allowedIcons.js.map +1 -1
  12. package/dist/lib/shared/ui/icon/iconsMap.js +1 -1
  13. package/dist/lib/shared/ui/icon/iconsMap.js.map +1 -1
  14. package/dist/lib/widgets/model/helpers.js +1 -1
  15. package/dist/lib/widgets/usefulInfo/ui/subEntities/documents/ui/document/Document.js +1 -1
  16. package/dist/lib/widgets/usefulInfo/ui/subEntities/documents/ui/document/Document.js.map +1 -1
  17. package/dist/lib/widgets/usefulInfo/ui/subEntities/documents/ui/document/model/utils.js.map +1 -1
  18. package/dist/node_modules/@date-fns/tz/date/index.js.map +1 -1
  19. package/dist/node_modules/@date-fns/tz/date/mini.js +1 -1
  20. package/dist/node_modules/@date-fns/tz/date/mini.js.map +1 -1
  21. package/dist/node_modules/@date-fns/tz/tzOffset/index.js +1 -1
  22. package/dist/node_modules/@date-fns/tz/tzOffset/index.js.map +1 -1
  23. package/dist/stats.html +1 -1
  24. package/dist/types/lib/shared/ui/formElements/uncontrolled/combobox/combobox.d.ts +1 -1
  25. package/dist/types/lib/shared/ui/icon/allowedIcons.d.ts +12 -11
  26. package/dist/types/lib/shared/ui/icon/iconsMap.d.ts +60 -60
  27. package/dist/types/lib/shared/ui/icon/index.d.ts +0 -1
  28. package/dist/types/lib/widgets/footer/model/types.d.ts +2 -2
  29. package/dist/types/lib/widgets/usefulInfo/ui/subEntities/documents/ui/document/model/utils.d.ts +1 -2
  30. package/package.json +3 -3
  31. package/dist/lib/shared/ui/icon/sprite.gen.js +0 -2
  32. package/dist/lib/shared/ui/icon/sprite.gen.js.map +0 -1
  33. package/dist/types/lib/shared/ui/icon/sprite.gen.d.ts +0 -23
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../node_modules/@date-fns/tz/date/index.js"],"sourcesContent":["import { tzName } from \"../tzName/index.js\";\nimport { TZDateMini } from \"./mini.js\";\n\n/**\n * UTC date class. It maps getters and setters to corresponding UTC methods,\n * forcing all calculations in the UTC time zone.\n *\n * Combined with date-fns, it allows using the class the same way as\n * the original date class.\n *\n * This complete version provides not only getters, setters,\n * and `getTimezoneOffset`, but also the formatter functions, mirroring\n * all original `Date` functionality. Use this version when you need to format\n * a string or in an environment you don't fully control (a library).\n * For a minimal version, see `UTCDateMini`.\n */\nexport class TZDate extends TZDateMini {\n //#region static\n\n static tz(tz, ...args) {\n return args.length ? new TZDate(...args, tz) : new TZDate(Date.now(), tz);\n }\n\n //#endregion\n\n //#region representation\n\n toISOString() {\n const [sign, hours, minutes] = this.tzComponents();\n const tz = `${sign}${hours}:${minutes}`;\n return this.internal.toISOString().slice(0, -1) + tz;\n }\n toString() {\n // \"Tue Aug 13 2024 07:50:19 GMT+0800 (Singapore Standard Time)\";\n return `${this.toDateString()} ${this.toTimeString()}`;\n }\n toDateString() {\n // toUTCString returns RFC 7231 (\"Mon, 12 Aug 2024 23:36:08 GMT\")\n const [day, date, month, year] = this.internal.toUTCString().split(\" \");\n // \"Tue Aug 13 2024\"\n return `${day?.slice(0, -1) /* Remove \",\" */} ${month} ${date} ${year}`;\n }\n toTimeString() {\n // toUTCString returns RFC 7231 (\"Mon, 12 Aug 2024 23:36:08 GMT\")\n const time = this.internal.toUTCString().split(\" \")[4];\n const [sign, hours, minutes] = this.tzComponents();\n // \"07:42:23 GMT+0800 (Singapore Standard Time)\"\n return `${time} GMT${sign}${hours}${minutes} (${tzName(this.timeZone, this)})`;\n }\n toLocaleString(locales, options) {\n return Date.prototype.toLocaleString.call(this, locales, {\n ...options,\n timeZone: options?.timeZone || this.timeZone\n });\n }\n toLocaleDateString(locales, options) {\n return Date.prototype.toLocaleDateString.call(this, locales, {\n ...options,\n timeZone: options?.timeZone || this.timeZone\n });\n }\n toLocaleTimeString(locales, options) {\n return Date.prototype.toLocaleTimeString.call(this, locales, {\n ...options,\n timeZone: options?.timeZone || this.timeZone\n });\n }\n\n //#endregion\n\n //#region private\n\n tzComponents() {\n const offset = this.getTimezoneOffset();\n const sign = offset > 0 ? \"-\" : \"+\";\n const hours = String(Math.floor(Math.abs(offset) / 60)).padStart(2, \"0\");\n const minutes = String(Math.abs(offset) % 60).padStart(2, \"0\");\n return [sign, hours, minutes];\n }\n\n //#endregion\n\n withTimeZone(timeZone) {\n return new TZDate(+this, timeZone);\n }\n\n //#region date-fns integration\n\n [Symbol.for(\"constructDateFrom\")](date) {\n return new TZDate(+new Date(date), this.timeZone);\n }\n\n //#endregion\n}"],"names":["TZDate","TZDateMini","tz","args","sign","hours","minutes","day","date","month","year","time","tzName","locales","options","offset","timeZone"],"mappings":"mFAgBO,MAAMA,UAAeC,CAAW,CAGrC,OAAO,GAAGC,KAAOC,EAAM,CACrB,OAAOA,EAAK,OAAS,IAAIH,EAAO,GAAGG,EAAMD,CAAE,EAAI,IAAIF,EAAO,KAAK,IAAG,EAAIE,CAAE,CAC1E,CAMA,aAAc,CACZ,KAAM,CAACE,EAAMC,EAAOC,CAAO,EAAI,KAAK,aAAY,EAC1CJ,EAAK,GAAGE,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EAAG,GAAG,EACjET,EAAU,OAAO,KAAK,IAAIS,CAAM,EAAI,EAAE,EAAE,SAAS,EAAG,GAAG,EAC7D,MAAO,CAACX,EAAMC,EAAOC,CAAO,CAC9B,CAIA,aAAaU,EAAU,CACrB,OAAO,IAAIhB,EAAO,CAAC,KAAMgB,CAAQ,CACnC,CAIA,CAAC,OAAO,IAAI,mBAAmB,CAAC,EAAER,EAAM,CACtC,OAAO,IAAIR,EAAO,CAAC,IAAI,KAAKQ,CAAI,EAAG,KAAK,QAAQ,CAClD,CAGF","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.js","sources":["../../../../../node_modules/@date-fns/tz/date/index.js"],"sourcesContent":["import { tzName } from \"../tzName/index.js\";\nimport { TZDateMini } from \"./mini.js\";\nexport class TZDate extends TZDateMini {\n //#region static\n\n static tz(tz, ...args) {\n return args.length ? new TZDate(...args, tz) : new TZDate(Date.now(), tz);\n }\n\n //#endregion\n\n //#region representation\n\n toISOString() {\n const [sign, hours, minutes] = this.tzComponents();\n const tz = `${sign}${hours}:${minutes}`;\n return this.internal.toISOString().slice(0, -1) + tz;\n }\n toString() {\n // \"Tue Aug 13 2024 07:50:19 GMT+0800 (Singapore Standard Time)\";\n return `${this.toDateString()} ${this.toTimeString()}`;\n }\n toDateString() {\n // toUTCString returns RFC 7231 (\"Mon, 12 Aug 2024 23:36:08 GMT\")\n const [day, date, month, year] = this.internal.toUTCString().split(\" \");\n // \"Tue Aug 13 2024\"\n return `${day?.slice(0, -1) /* Remove \",\" */} ${month} ${date} ${year}`;\n }\n toTimeString() {\n // toUTCString returns RFC 7231 (\"Mon, 12 Aug 2024 23:36:08 GMT\")\n const time = this.internal.toUTCString().split(\" \")[4];\n const [sign, hours, minutes] = this.tzComponents();\n // \"07:42:23 GMT+0800 (Singapore Standard Time)\"\n return `${time} GMT${sign}${hours}${minutes} (${tzName(this.timeZone, this)})`;\n }\n toLocaleString(locales, options) {\n return Date.prototype.toLocaleString.call(this, locales, {\n ...options,\n timeZone: options?.timeZone || this.timeZone\n });\n }\n toLocaleDateString(locales, options) {\n return Date.prototype.toLocaleDateString.call(this, locales, {\n ...options,\n timeZone: options?.timeZone || this.timeZone\n });\n }\n toLocaleTimeString(locales, options) {\n return Date.prototype.toLocaleTimeString.call(this, locales, {\n ...options,\n timeZone: options?.timeZone || this.timeZone\n });\n }\n\n //#endregion\n\n //#region private\n\n tzComponents() {\n const offset = this.getTimezoneOffset();\n const sign = offset > 0 ? \"-\" : \"+\";\n const hours = String(Math.floor(Math.abs(offset) / 60)).padStart(2, \"0\");\n const minutes = String(Math.abs(offset) % 60).padStart(2, \"0\");\n return [sign, hours, minutes];\n }\n\n //#endregion\n\n withTimeZone(timeZone) {\n return new TZDate(+this, timeZone);\n }\n\n //#region date-fns integration\n\n [Symbol.for(\"constructDateFrom\")](date) {\n return new TZDate(+new Date(date), this.timeZone);\n }\n\n //#endregion\n}"],"names":["TZDate","TZDateMini","tz","args","sign","hours","minutes","day","date","month","year","time","tzName","locales","options","offset","timeZone"],"mappings":"mFAEO,MAAMA,UAAeC,CAAW,CAGrC,OAAO,GAAGC,KAAOC,EAAM,CACrB,OAAOA,EAAK,OAAS,IAAIH,EAAO,GAAGG,EAAMD,CAAE,EAAI,IAAIF,EAAO,KAAK,IAAG,EAAIE,CAAE,CAC1E,CAMA,aAAc,CACZ,KAAM,CAACE,EAAMC,EAAOC,CAAO,EAAI,KAAK,aAAY,EAC1CJ,EAAK,GAAGE,CAAI,GAAGC,CAAK,IAAIC,CAAO,GACrC,OAAO,KAAK,SAAS,YAAW,EAAG,MAAM,EAAG,EAAE,EAAIJ,CACpD,CACA,UAAW,CAET,MAAO,GAAG,KAAK,aAAY,CAAE,IAAI,KAAK,aAAY,CAAE,EACtD,CACA,cAAe,CAEb,KAAM,CAACK,EAAKC,EAAMC,EAAOC,CAAI,EAAI,KAAK,SAAS,cAAc,MAAM,GAAG,EAEtE,MAAO,GAAGH,GAAA,YAAAA,EAAK,MAAM,EAAG,GAAG,I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AClD,CAGF","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- import{tzOffset as o}from"../tzOffset/index.js";class n extends Date{constructor(...e){super(),e.length>1&&typeof e[e.length-1]=="string"&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(o(this.timeZone,this))?this.setTime(NaN):e.length?typeof e[0]=="number"&&(e.length===1||e.length===2&&typeof e[1]!="number")?this.setTime(e[0]):typeof e[0]=="string"?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),h(this),l(this)):this.setTime(Date.now())}static tz(e,...s){return s.length?new n(...s,e):new n(Date.now(),e)}withTimeZone(e){return new n(+this,e)}getTimezoneOffset(){return-o(this.timeZone,this)}setTime(e){return Date.prototype.setTime.apply(this,arguments),l(this),+this}[Symbol.for("constructDateFrom")](e){return new n(+new Date(e),this.timeZone)}}const T=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(t=>{if(!T.test(t))return;const e=t.replace(T,"$1UTC");n.prototype[e]&&(t.startsWith("get")?n.prototype[t]=function(){return this.internal[e]()}:(n.prototype[t]=function(){return Date.prototype[e].apply(this.internal,arguments),U(this),+this},n.prototype[e]=function(){return Date.prototype[e].apply(this,arguments),l(this),+this}))});function l(t){t.internal.setTime(+t),t.internal.setUTCMinutes(t.internal.getUTCMinutes()-t.getTimezoneOffset())}function U(t){Date.prototype.setFullYear.call(t,t.internal.getUTCFullYear(),t.internal.getUTCMonth(),t.internal.getUTCDate()),Date.prototype.setHours.call(t,t.internal.getUTCHours(),t.internal.getUTCMinutes(),t.internal.getUTCSeconds(),t.internal.getUTCMilliseconds()),h(t)}function h(t){const e=o(t.timeZone,t),s=new Date(+t);s.setUTCHours(s.getUTCHours()-1);const p=-new Date(+t).getTimezoneOffset(),m=-new Date(+s).getTimezoneOffset(),u=p-m,y=Date.prototype.getHours.apply(t)!==t.internal.getUTCHours();u&&y&&t.internal.setUTCMinutes(t.internal.getUTCMinutes()+u);const i=p-e;i&&Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+i);const r=o(t.timeZone,t),D=-new Date(+t).getTimezoneOffset()-r,C=r!==e,c=D-i;if(C&&c){Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+c);const a=o(t.timeZone,t),f=r-a;f&&(t.internal.setUTCMinutes(t.internal.getUTCMinutes()+f),Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+f))}}export{n as TZDateMini};
1
+ import{tzOffset as s}from"../tzOffset/index.js";class n extends Date{constructor(...e){super(),e.length>1&&typeof e[e.length-1]=="string"&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(s(this.timeZone,this))?this.setTime(NaN):e.length?typeof e[0]=="number"&&(e.length===1||e.length===2&&typeof e[1]!="number")?this.setTime(e[0]):typeof e[0]=="string"?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),U(this),a(this)):this.setTime(Date.now())}static tz(e,...o){return o.length?new n(...o,e):new n(Date.now(),e)}withTimeZone(e){return new n(+this,e)}getTimezoneOffset(){const e=-s(this.timeZone,this);return e>0?Math.floor(e):Math.ceil(e)}setTime(e){return Date.prototype.setTime.apply(this,arguments),a(this),+this}[Symbol.for("constructDateFrom")](e){return new n(+new Date(e),this.timeZone)}}const D=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(t=>{if(!D.test(t))return;const e=t.replace(D,"$1UTC");n.prototype[e]&&(t.startsWith("get")?n.prototype[t]=function(){return this.internal[e]()}:(n.prototype[t]=function(){return Date.prototype[e].apply(this.internal,arguments),H(this),+this},n.prototype[e]=function(){return Date.prototype[e].apply(this,arguments),a(this),+this}))});function a(t){t.internal.setTime(+t),t.internal.setUTCSeconds(t.internal.getUTCSeconds()-Math.round(-s(t.timeZone,t)*60))}function H(t){Date.prototype.setFullYear.call(t,t.internal.getUTCFullYear(),t.internal.getUTCMonth(),t.internal.getUTCDate()),Date.prototype.setHours.call(t,t.internal.getUTCHours(),t.internal.getUTCMinutes(),t.internal.getUTCSeconds(),t.internal.getUTCMilliseconds()),U(t)}function U(t){const e=s(t.timeZone,t),o=e>0?Math.floor(e):Math.ceil(e),i=new Date(+t);i.setUTCHours(i.getUTCHours()-1);const r=-new Date(+t).getTimezoneOffset(),g=-new Date(+i).getTimezoneOffset(),m=r-g,M=Date.prototype.getHours.apply(t)!==t.internal.getUTCHours();m&&M&&t.internal.setUTCMinutes(t.internal.getUTCMinutes()+m);const f=r-o;f&&Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+f);const l=new Date(+t);l.setUTCSeconds(0);const y=r>0?l.getSeconds():(l.getSeconds()-60)%60,c=Math.round(-(s(t.timeZone,t)*60))%60;(c||y)&&(t.internal.setUTCSeconds(t.internal.getUTCSeconds()+c),Date.prototype.setUTCSeconds.call(t,Date.prototype.getUTCSeconds.call(t)+c+y));const p=s(t.timeZone,t),u=p>0?Math.floor(p):Math.ceil(p),w=-new Date(+t).getTimezoneOffset()-u,O=u!==o,C=w-f;if(O&&C){Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+C);const h=s(t.timeZone,t),S=h>0?Math.floor(h):Math.ceil(h),T=u-S;T&&(t.internal.setUTCMinutes(t.internal.getUTCMinutes()+T),Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+T))}}export{n as TZDateMini};
2
2
  //# sourceMappingURL=mini.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mini.js","sources":["../../../../../node_modules/@date-fns/tz/date/mini.js"],"sourcesContent":["import { tzOffset } from \"../tzOffset/index.js\";\nexport class TZDateMini extends Date {\n //#region static\n\n constructor(...args) {\n super();\n if (args.length > 1 && typeof args[args.length - 1] === \"string\") {\n this.timeZone = args.pop();\n }\n this.internal = new Date();\n if (isNaN(tzOffset(this.timeZone, this))) {\n this.setTime(NaN);\n } else {\n if (!args.length) {\n this.setTime(Date.now());\n } else if (typeof args[0] === \"number\" && (args.length === 1 || args.length === 2 && typeof args[1] !== \"number\")) {\n this.setTime(args[0]);\n } else if (typeof args[0] === \"string\") {\n this.setTime(+new Date(args[0]));\n } else if (args[0] instanceof Date) {\n this.setTime(+args[0]);\n } else {\n this.setTime(+new Date(...args));\n adjustToSystemTZ(this, NaN);\n syncToInternal(this);\n }\n }\n }\n static tz(tz, ...args) {\n return args.length ? new TZDateMini(...args, tz) : new TZDateMini(Date.now(), tz);\n }\n\n //#endregion\n\n //#region time zone\n\n withTimeZone(timeZone) {\n return new TZDateMini(+this, timeZone);\n }\n getTimezoneOffset() {\n return -tzOffset(this.timeZone, this);\n }\n\n //#endregion\n\n //#region time\n\n setTime(time) {\n Date.prototype.setTime.apply(this, arguments);\n syncToInternal(this);\n return +this;\n }\n\n //#endregion\n\n //#region date-fns integration\n\n [Symbol.for(\"constructDateFrom\")](date) {\n return new TZDateMini(+new Date(date), this.timeZone);\n }\n\n //#endregion\n}\n\n// Assign getters and setters\nconst re = /^(get|set)(?!UTC)/;\nObject.getOwnPropertyNames(Date.prototype).forEach(method => {\n if (!re.test(method)) return;\n const utcMethod = method.replace(re, \"$1UTC\");\n // Filter out methods without UTC counterparts\n if (!TZDateMini.prototype[utcMethod]) return;\n if (method.startsWith(\"get\")) {\n // Delegate to internal date's UTC method\n TZDateMini.prototype[method] = function () {\n return this.internal[utcMethod]();\n };\n } else {\n // Assign regular setter\n TZDateMini.prototype[method] = function () {\n Date.prototype[utcMethod].apply(this.internal, arguments);\n syncFromInternal(this);\n return +this;\n };\n\n // Assign UTC setter\n TZDateMini.prototype[utcMethod] = function () {\n Date.prototype[utcMethod].apply(this, arguments);\n syncToInternal(this);\n return +this;\n };\n }\n});\n\n/**\n * Function syncs time to internal date, applying the time zone offset.\n *\n * @param {Date} date - Date to sync\n */\nfunction syncToInternal(date) {\n date.internal.setTime(+date);\n date.internal.setUTCMinutes(date.internal.getUTCMinutes() - date.getTimezoneOffset());\n}\n\n/**\n * Function syncs the internal date UTC values to the date. It allows to get\n * accurate timestamp value.\n *\n * @param {Date} date - The date to sync\n */\nfunction syncFromInternal(date) {\n // First we transpose the internal values\n Date.prototype.setFullYear.call(date, date.internal.getUTCFullYear(), date.internal.getUTCMonth(), date.internal.getUTCDate());\n Date.prototype.setHours.call(date, date.internal.getUTCHours(), date.internal.getUTCMinutes(), date.internal.getUTCSeconds(), date.internal.getUTCMilliseconds());\n\n // Now we have to adjust the date to the system time zone\n adjustToSystemTZ(date);\n}\n\n/**\n * Function adjusts the date to the system time zone. It uses the time zone\n * differences to calculate the offset and adjust the date.\n *\n * @param {Date} date - Date to adjust\n */\nfunction adjustToSystemTZ(date) {\n // Save the time zone offset before all the adjustments\n const offset = tzOffset(date.timeZone, date);\n\n //#region System DST adjustment\n\n // The biggest problem with using the system time zone is that when we create\n // a date from internal values stored in UTC, the system time zone might end\n // up on the DST hour:\n //\n // $ TZ=America/New_York node\n // > new Date(2020, 2, 8, 1).toString()\n // 'Sun Mar 08 2020 01:00:00 GMT-0500 (Eastern Standard Time)'\n // > new Date(2020, 2, 8, 2).toString()\n // 'Sun Mar 08 2020 03:00:00 GMT-0400 (Eastern Daylight Time)'\n // > new Date(2020, 2, 8, 3).toString()\n // 'Sun Mar 08 2020 03:00:00 GMT-0400 (Eastern Daylight Time)'\n // > new Date(2020, 2, 8, 4).toString()\n // 'Sun Mar 08 2020 04:00:00 GMT-0400 (Eastern Daylight Time)'\n //\n // Here we get the same hour for both 2 and 3, because the system time zone\n // has DST beginning at 8 March 2020, 2 a.m. and jumps to 3 a.m. So we have\n // to adjust the internal date to reflect that.\n //\n // However we want to adjust only if that's the DST hour the change happenes,\n // not the hour where DST moves to.\n\n // We calculate the previous hour to see if the time zone offset has changed\n // and we have landed on the DST hour.\n const prevHour = new Date(+date);\n // We use UTC methods here as we don't want to land on the same hour again\n // in case of DST.\n prevHour.setUTCHours(prevHour.getUTCHours() - 1);\n\n // Calculate if we are on the system DST hour.\n const systemOffset = -new Date(+date).getTimezoneOffset();\n const prevHourSystemOffset = -new Date(+prevHour).getTimezoneOffset();\n const systemDSTChange = systemOffset - prevHourSystemOffset;\n // Detect the DST shift. System DST change will occur both on\n const dstShift = Date.prototype.getHours.apply(date) !== date.internal.getUTCHours();\n\n // Move the internal date when we are on the system DST hour.\n if (systemDSTChange && dstShift) date.internal.setUTCMinutes(date.internal.getUTCMinutes() + systemDSTChange);\n\n //#endregion\n\n //#region System diff adjustment\n\n // Now we need to adjust the date, since we just applied internal values.\n // We need to calculate the difference between the system and date time zones\n // and apply it to the date.\n\n const offsetDiff = systemOffset - offset;\n if (offsetDiff) Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + offsetDiff);\n\n //#endregion\n\n //#region Post-adjustment DST fix\n\n const postOffset = tzOffset(date.timeZone, date);\n const postSystemOffset = -new Date(+date).getTimezoneOffset();\n const postOffsetDiff = postSystemOffset - postOffset;\n const offsetChanged = postOffset !== offset;\n const postDiff = postOffsetDiff - offsetDiff;\n if (offsetChanged && postDiff) {\n Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + postDiff);\n\n // Now we need to check if got offset change during the post-adjustment.\n // If so, we also need both dates to reflect that.\n\n const newOffset = tzOffset(date.timeZone, date);\n const offsetChange = postOffset - newOffset;\n if (offsetChange) {\n date.internal.setUTCMinutes(date.internal.getUTCMinutes() + offsetChange);\n Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + offsetChange);\n }\n }\n\n //#endregion\n}"],"names":["TZDateMini","args","tzOffset","adjustToSystemTZ","syncToInternal","tz","timeZone","time","date","re","method","utcMethod","syncFromInternal","offset","prevHour","systemOffset","prevHourSystemOffset","systemDSTChange","dstShift","offsetDiff","postOffset","postOffsetDiff","offsetChanged","postDiff","newOffset","offsetChange"],"mappings":"gDACO,MAAMA,UAAmB,IAAK,CAGnC,eAAeC,EAAM,CACnB,MAAK,EACDA,EAAK,OAAS,GAAK,OAAOA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AMV,CAAI,IAAMA,EAAK,SAAS,YAAW,EAG9ES,GAAmBC,GAAUV,EAAK,SAAS,cAAcA,EAAK,SAAS,cAAa,EAAKS,CAAe,EAU5G,MAAME,EAAaJ,EAAeF,EAC9BM,GAAY,KAAK,UAAU,cAAc,KAAKX,EAAM,KAAK,UAAU,cAAc,KAAKA,CAAI,EAAIW,CAAU,EAM5G,MAAMC,EAAalB,EAASM,EAAK,SAAUA,CAAI,EAEzCa,EADmB,CAAC,IAAI,KAAK,CAACb,CAAI,EAAE,kBAAiB,EACjBY,EACpCE,EAAgBF,IAAeP,EAC/BU,EAAWF,EAAiBF,EAClC,GAAIG,GAAiBC,EAAU,CAC7B,KAAK,UAAU,cAAc,KAAKf,EAAM,KAAK,UAAU,cAAc,KAAKA,CAAI,EAAIe,CAAQ,EAK1F,MAAMC,EAAYtB,EAASM,EAAK,SAAUA,CAAI,EACxCiB,EAAeL,EAAaI,EAC9BC,IACFjB,EAAK,SAAS,cAAcA,EAAK,SAAS,cAAa,EAAKiB,CAAY,EACxE,KAAK,UAAU,cAAc,KAAKjB,EAAM,KAAK,UAAU,cAAc,KAAKA,CAAI,EAAIiB,CAAY,EAElG,CAGF","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"mini.js","sources":["../../../../../node_modules/@date-fns/tz/date/mini.js"],"sourcesContent":["import { tzOffset } from \"../tzOffset/index.js\";\nexport class TZDateMini extends Date {\n //#region static\n\n constructor(...args) {\n super();\n if (args.length > 1 && typeof args[args.length - 1] === \"string\") {\n this.timeZone = args.pop();\n }\n this.internal = new Date();\n if (isNaN(tzOffset(this.timeZone, this))) {\n this.setTime(NaN);\n } else {\n if (!args.length) {\n this.setTime(Date.now());\n } else if (typeof args[0] === \"number\" && (args.length === 1 || args.length === 2 && typeof args[1] !== \"number\")) {\n this.setTime(args[0]);\n } else if (typeof args[0] === \"string\") {\n this.setTime(+new Date(args[0]));\n } else if (args[0] instanceof Date) {\n this.setTime(+args[0]);\n } else {\n this.setTime(+new Date(...args));\n adjustToSystemTZ(this, NaN);\n syncToInternal(this);\n }\n }\n }\n static tz(tz, ...args) {\n return args.length ? new TZDateMini(...args, tz) : new TZDateMini(Date.now(), tz);\n }\n\n //#endregion\n\n //#region time zone\n\n withTimeZone(timeZone) {\n return new TZDateMini(+this, timeZone);\n }\n getTimezoneOffset() {\n const offset = -tzOffset(this.timeZone, this);\n // Remove the seconds offset\n // use Math.floor for negative GMT timezones and Math.ceil for positive GMT timezones.\n return offset > 0 ? Math.floor(offset) : Math.ceil(offset);\n }\n\n //#endregion\n\n //#region time\n\n setTime(time) {\n Date.prototype.setTime.apply(this, arguments);\n syncToInternal(this);\n return +this;\n }\n\n //#endregion\n\n //#region date-fns integration\n\n [Symbol.for(\"constructDateFrom\")](date) {\n return new TZDateMini(+new Date(date), this.timeZone);\n }\n\n //#endregion\n}\n\n// Assign getters and setters\nconst re = /^(get|set)(?!UTC)/;\nObject.getOwnPropertyNames(Date.prototype).forEach(method => {\n if (!re.test(method)) return;\n const utcMethod = method.replace(re, \"$1UTC\");\n // Filter out methods without UTC counterparts\n if (!TZDateMini.prototype[utcMethod]) return;\n if (method.startsWith(\"get\")) {\n // Delegate to internal date's UTC method\n TZDateMini.prototype[method] = function () {\n return this.internal[utcMethod]();\n };\n } else {\n // Assign regular setter\n TZDateMini.prototype[method] = function () {\n Date.prototype[utcMethod].apply(this.internal, arguments);\n syncFromInternal(this);\n return +this;\n };\n\n // Assign UTC setter\n TZDateMini.prototype[utcMethod] = function () {\n Date.prototype[utcMethod].apply(this, arguments);\n syncToInternal(this);\n return +this;\n };\n }\n});\n\n/**\n * Function syncs time to internal date, applying the time zone offset.\n *\n * @param {Date} date - Date to sync\n */\nfunction syncToInternal(date) {\n date.internal.setTime(+date);\n date.internal.setUTCSeconds(date.internal.getUTCSeconds() - Math.round(-tzOffset(date.timeZone, date) * 60));\n}\n\n/**\n * Function syncs the internal date UTC values to the date. It allows to get\n * accurate timestamp value.\n *\n * @param {Date} date - The date to sync\n */\nfunction syncFromInternal(date) {\n // First we transpose the internal values\n Date.prototype.setFullYear.call(date, date.internal.getUTCFullYear(), date.internal.getUTCMonth(), date.internal.getUTCDate());\n Date.prototype.setHours.call(date, date.internal.getUTCHours(), date.internal.getUTCMinutes(), date.internal.getUTCSeconds(), date.internal.getUTCMilliseconds());\n\n // Now we have to adjust the date to the system time zone\n adjustToSystemTZ(date);\n}\n\n/**\n * Function adjusts the date to the system time zone. It uses the time zone\n * differences to calculate the offset and adjust the date.\n *\n * @param {Date} date - Date to adjust\n */\nfunction adjustToSystemTZ(date) {\n // Save the time zone offset before all the adjustments\n const baseOffset = tzOffset(date.timeZone, date);\n // Remove the seconds offset\n // use Math.floor for negative GMT timezones and Math.ceil for positive GMT timezones.\n const offset = baseOffset > 0 ? Math.floor(baseOffset) : Math.ceil(baseOffset);\n //#region System DST adjustment\n\n // The biggest problem with using the system time zone is that when we create\n // a date from internal values stored in UTC, the system time zone might end\n // up on the DST hour:\n //\n // $ TZ=America/New_York node\n // > new Date(2020, 2, 8, 1).toString()\n // 'Sun Mar 08 2020 01:00:00 GMT-0500 (Eastern Standard Time)'\n // > new Date(2020, 2, 8, 2).toString()\n // 'Sun Mar 08 2020 03:00:00 GMT-0400 (Eastern Daylight Time)'\n // > new Date(2020, 2, 8, 3).toString()\n // 'Sun Mar 08 2020 03:00:00 GMT-0400 (Eastern Daylight Time)'\n // > new Date(2020, 2, 8, 4).toString()\n // 'Sun Mar 08 2020 04:00:00 GMT-0400 (Eastern Daylight Time)'\n //\n // Here we get the same hour for both 2 and 3, because the system time zone\n // has DST beginning at 8 March 2020, 2 a.m. and jumps to 3 a.m. So we have\n // to adjust the internal date to reflect that.\n //\n // However we want to adjust only if that's the DST hour the change happenes,\n // not the hour where DST moves to.\n\n // We calculate the previous hour to see if the time zone offset has changed\n // and we have landed on the DST hour.\n const prevHour = new Date(+date);\n // We use UTC methods here as we don't want to land on the same hour again\n // in case of DST.\n prevHour.setUTCHours(prevHour.getUTCHours() - 1);\n\n // Calculate if we are on the system DST hour.\n const systemOffset = -new Date(+date).getTimezoneOffset();\n const prevHourSystemOffset = -new Date(+prevHour).getTimezoneOffset();\n const systemDSTChange = systemOffset - prevHourSystemOffset;\n // Detect the DST shift. System DST change will occur both on\n const dstShift = Date.prototype.getHours.apply(date) !== date.internal.getUTCHours();\n\n // Move the internal date when we are on the system DST hour.\n if (systemDSTChange && dstShift) date.internal.setUTCMinutes(date.internal.getUTCMinutes() + systemDSTChange);\n\n //#endregion\n\n //#region System diff adjustment\n\n // Now we need to adjust the date, since we just applied internal values.\n // We need to calculate the difference between the system and date time zones\n // and apply it to the date.\n\n const offsetDiff = systemOffset - offset;\n if (offsetDiff) Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + offsetDiff);\n\n //#endregion\n\n //#region Seconds System diff adjustment\n\n const systemDate = new Date(+date);\n // Set the UTC seconds to 0 to isolate the timezone offset in seconds.\n systemDate.setUTCSeconds(0);\n // For negative systemOffset, invert the seconds.\n const systemSecondsOffset = systemOffset > 0 ? systemDate.getSeconds() : (systemDate.getSeconds() - 60) % 60;\n\n // Calculate the seconds offset based on the timezone offset.\n const secondsOffset = Math.round(-(tzOffset(date.timeZone, date) * 60)) % 60;\n if (secondsOffset || systemSecondsOffset) {\n date.internal.setUTCSeconds(date.internal.getUTCSeconds() + secondsOffset);\n Date.prototype.setUTCSeconds.call(date, Date.prototype.getUTCSeconds.call(date) + secondsOffset + systemSecondsOffset);\n }\n\n //#endregion\n\n //#region Post-adjustment DST fix\n\n const postBaseOffset = tzOffset(date.timeZone, date);\n // Remove the seconds offset\n // use Math.floor for negative GMT timezones and Math.ceil for positive GMT timezones.\n const postOffset = postBaseOffset > 0 ? Math.floor(postBaseOffset) : Math.ceil(postBaseOffset);\n const postSystemOffset = -new Date(+date).getTimezoneOffset();\n const postOffsetDiff = postSystemOffset - postOffset;\n const offsetChanged = postOffset !== offset;\n const postDiff = postOffsetDiff - offsetDiff;\n if (offsetChanged && postDiff) {\n Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + postDiff);\n\n // Now we need to check if got offset change during the post-adjustment.\n // If so, we also need both dates to reflect that.\n\n const newBaseOffset = tzOffset(date.timeZone, date);\n // Remove the seconds offset\n // use Math.floor for negative GMT timezones and Math.ceil for positive GMT timezones.\n const newOffset = newBaseOffset > 0 ? Math.floor(newBaseOffset) : Math.ceil(newBaseOffset);\n const offsetChange = postOffset - newOffset;\n if (offsetChange) {\n date.internal.setUTCMinutes(date.internal.getUTCMinutes() + offsetChange);\n Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + offsetChange);\n }\n }\n\n //#endregion\n}"],"names":["TZDateMini","args","tzOffset","adjustToSystemTZ","syncToInternal","tz","timeZone","offset","time","date","re","method","utcMethod","syncFromInternal","baseOffset","prevHour","systemOffset","prevHourSystemOffset","systemDSTChange","dstShift","offsetDiff","systemDate","systemSecondsOffset","secondsOffset","postBaseOffset","postOffset","postOffsetDiff","offsetChanged","postDiff","newBaseOffset","newOffset","offsetChange"],"mappings":"gDACO,MAAMA,UAAmB,IAAK,CAGnC,eAAeC,EAAM,CACnB,MAAK,EACDA,EAAK,OAAS,GAAK,OAAOA,EAAKA,EAAK,OAAS,CAAC,GAAM,WACtD,KAAK,SAAWA,EAAK,IAAG,GAE1B,KAAK,SAAW,IAAI,KAChB,MAAMC,EAAS,KAAK,SAAU,IAAI,CAAC,EACrC,KAAK,QAAQ,GAAG,EAEXD,EAAK,OAEC,OAAOA,EAAK,CAAC,GAAM,WAAaA,EAAK,SAAW,GAAKA,EAAK,SAAW,GAAK,OAAOA,EAAK,CAAC,GAAM,UACtG,KAAK,QAAQA,EAAK,CAAC,CAAC,EACX,OAAOA,EAAK,CAAC,GAAM,SAC5B,KAAK,QAAQ,CAAC,IAAI,KAAKA,EAAK,CAAC,CAAC,CAAC,EACtBA,EAAK,CAAC,YAAa,KAC5B,KAAK,QAAQ,CAACA,EAAK,CAAC,CAAC,GA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EAEjCY,EAAW,cAAc,CAAC,EAE1B,MAAMC,EAAsBN,EAAe,EAAIK,EAAW,cAAgBA,EAAW,aAAe,IAAM,GAGpGE,EAAgB,KAAK,MAAM,EAAErB,EAASO,EAAK,SAAUA,CAAI,EAAI,GAAG,EAAI,IACtEc,GAAiBD,KACnBb,EAAK,SAAS,cAAcA,EAAK,SAAS,cAAa,EAAKc,CAAa,EACzE,KAAK,UAAU,cAAc,KAAKd,EAAM,KAAK,UAAU,cAAc,KAAKA,CAAI,EAAIc,EAAgBD,CAAmB,GAOvH,MAAME,EAAiBtB,EAASO,EAAK,SAAUA,CAAI,EAG7CgB,EAAaD,EAAiB,EAAI,KAAK,MAAMA,CAAc,EAAI,KAAK,KAAKA,CAAc,EAEvFE,EADmB,CAAC,IAAI,KAAK,CAACjB,CAAI,EAAE,kBAAiB,EACjBgB,EACpCE,EAAgBF,IAAelB,EAC/BqB,EAAWF,EAAiBN,EAClC,GAAIO,GAAiBC,EAAU,CAC7B,KAAK,UAAU,cAAc,KAAKnB,EAAM,KAAK,UAAU,cAAc,KAAKA,CAAI,EAAImB,CAAQ,EAK1F,MAAMC,EAAgB3B,EAASO,EAAK,SAAUA,CAAI,EAG5CqB,EAAYD,EAAgB,EAAI,KAAK,MAAMA,CAAa,EAAI,KAAK,KAAKA,CAAa,EACnFE,EAAeN,EAAaK,EAC9BC,IACFtB,EAAK,SAAS,cAAcA,EAAK,SAAS,cAAa,EAAKsB,CAAY,EACxE,KAAK,UAAU,cAAc,KAAKtB,EAAM,KAAK,UAAU,cAAc,KAAKA,CAAI,EAAIsB,CAAY,EAElG,CAGF","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- const n={},s={};function o(t,c){try{const f=(n[t]||(n[t]=new Intl.DateTimeFormat("en-US",{timeZone:t,timeZoneName:"longOffset"}).format))(c).split("GMT")[1];return f in s?s[f]:u(f,f.split(":"))}catch{if(t in s)return s[t];const r=t==null?void 0:t.match(a);return r?u(t,r.slice(1)):NaN}}const a=/([+-]\d\d):?(\d\d)?/;function u(t,c){const r=+(c[0]||0),f=+(c[1]||0);return s[t]=r>0?r*60+f:r*60-f}export{o as tzOffset};
1
+ const n={},f={};function d(t,c){try{const r=(n[t]||(n[t]=new Intl.DateTimeFormat("en-US",{timeZone:t,timeZoneName:"longOffset"}).format))(c).split("GMT")[1];return r in f?f[r]:a(r,r.split(":"))}catch{if(t in f)return f[t];const s=t==null?void 0:t.match(o);return s?a(t,s.slice(1)):NaN}}const o=/([+-]\d\d):?(\d\d)?/;function a(t,c){const s=+(c[0]||0),r=+(c[1]||0),u=+(c[2]||0)/60;return f[t]=s*60+r>0?s*60+r+u:s*60-r-u}export{d as tzOffset};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../node_modules/@date-fns/tz/tzOffset/index.js"],"sourcesContent":["const offsetFormatCache = {};\nconst offsetCache = {};\n\n/**\n * The function extracts UTC offset in minutes from the given date in specified\n * time zone.\n *\n * Unlike `Date.prototype.getTimezoneOffset`, this function returns the value\n * mirrored to the sign of the offset in the time zone. For Asia/Singapore\n * (UTC+8), `tzOffset` returns 480, while `getTimezoneOffset` returns -480.\n *\n * @param timeZone - Time zone name (IANA or UTC offset)\n * @param date - Date to check the offset for\n *\n * @returns UTC offset in minutes\n */\nexport function tzOffset(timeZone, date) {\n try {\n const format = offsetFormatCache[timeZone] ||= new Intl.DateTimeFormat(\"en-US\", {\n timeZone,\n timeZoneName: \"longOffset\"\n }).format;\n const offsetStr = format(date).split(\"GMT\")[1];\n if (offsetStr in offsetCache) return offsetCache[offsetStr];\n return calcOffset(offsetStr, offsetStr.split(\":\"));\n } catch {\n // Fallback to manual parsing if the runtime doesn't support ±HH:MM/±HHMM/±HH\n // See: https://github.com/nodejs/node/issues/53419\n if (timeZone in offsetCache) return offsetCache[timeZone];\n const captures = timeZone?.match(offsetRe);\n if (captures) return calcOffset(timeZone, captures.slice(1));\n return NaN;\n }\n}\nconst offsetRe = /([+-]\\d\\d):?(\\d\\d)?/;\nfunction calcOffset(cacheStr, values) {\n const hours = +(values[0] || 0);\n const minutes = +(values[1] || 0);\n return offsetCache[cacheStr] = hours > 0 ? hours * 60 + minutes : hours * 60 - minutes;\n}"],"names":["offsetFormatCache","offsetCache","tzOffset","timeZone","date","offsetStr","calcOffset","captures","offsetRe","cacheStr","values","hours","minutes"],"mappings":"AAAA,MAAMA,EAAoB,CAAA,EACpBC,EAAc,CAAA,EAeb,SAASC,EAASC,EAAUC,EAAM,CACvC,GAAI,CAKF,MAAMC,GAJSL,EAAAG,KAAAH,EAAAG,GAAgC,IAAI,KAAK,eAAe,QAAS,CAC9E,SAAAA,EACA,aAAc,YACpB,CAAK,EAAE,SACsBC,CAAI,EAAE,MAAM,KAAK,EAAE,CAAC,EAC7C,OAAIC,KAAaJ,EAAoBA,EAAYI,CAAS,EACnDC,EAAWD,EAAWA,EAAU,MAAM,GAAG,CAAC,CACnD,MAAQ,CAGN,GAAIF,KAAYF,EAAa,OAAOA,EAAYE,CAAQ,EACxD,MAAMI,EAAWJ,GAAA,YAAAA,EAAU,MAAMK,GACjC,OAAID,EAAiBD,EAAWH,EAAUI,EAAS,MAAM,CAAC,CAAC,EACpD,GACT,CACF,CACA,MAAMC,EAAW,sBACjB,SAASF,EAAWG,EAAUC,EAAQ,CACpC,MAAMC,EAAQ,EAAED,EAAO,CAAC,GAAK,GACvBE,EAAU,EAAEF,EAAO,CAAC,GAAK,GAC/B,OAAOT,EAAYQ,CAAQ,EAAIE,EAAQ,EAAIA,EAAQ,GAAKC,EAAUD,EAAQ,GAAKC,CACjF","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.js","sources":["../../../../../node_modules/@date-fns/tz/tzOffset/index.js"],"sourcesContent":["const offsetFormatCache = {};\nconst offsetCache = {};\n\n/**\n * The function extracts UTC offset in minutes from the given date in specified\n * time zone.\n *\n * Unlike `Date.prototype.getTimezoneOffset`, this function returns the value\n * mirrored to the sign of the offset in the time zone. For Asia/Singapore\n * (UTC+8), `tzOffset` returns 480, while `getTimezoneOffset` returns -480.\n *\n * @param timeZone - Time zone name (IANA or UTC offset)\n * @param date - Date to check the offset for\n *\n * @returns UTC offset in minutes\n */\nexport function tzOffset(timeZone, date) {\n try {\n const format = offsetFormatCache[timeZone] ||= new Intl.DateTimeFormat(\"en-US\", {\n timeZone,\n timeZoneName: \"longOffset\"\n }).format;\n const offsetStr = format(date).split(\"GMT\")[1];\n if (offsetStr in offsetCache) return offsetCache[offsetStr];\n return calcOffset(offsetStr, offsetStr.split(\":\"));\n } catch {\n // Fallback to manual parsing if the runtime doesn't support ±HH:MM/±HHMM/±HH\n // See: https://github.com/nodejs/node/issues/53419\n if (timeZone in offsetCache) return offsetCache[timeZone];\n const captures = timeZone?.match(offsetRe);\n if (captures) return calcOffset(timeZone, captures.slice(1));\n return NaN;\n }\n}\nconst offsetRe = /([+-]\\d\\d):?(\\d\\d)?/;\nfunction calcOffset(cacheStr, values) {\n const hours = +(values[0] || 0);\n const minutes = +(values[1] || 0);\n // Convert seconds to minutes by dividing by 60 to keep the function return in minutes.\n const seconds = +(values[2] || 0) / 60;\n return offsetCache[cacheStr] = hours * 60 + minutes > 0 ? hours * 60 + minutes + seconds : hours * 60 - minutes - seconds;\n}"],"names":["offsetFormatCache","offsetCache","tzOffset","timeZone","date","offsetStr","calcOffset","captures","offsetRe","cacheStr","values","hours","minutes","seconds"],"mappings":"AAAA,MAAMA,EAAoB,CAAA,EACpBC,EAAc,CAAA,EAeb,SAASC,EAASC,EAAUC,EAAM,CACvC,GAAI,CAKF,MAAMC,GAJSL,EAAAG,KAAAH,EAAAG,GAAgC,IAAI,KAAK,eAAe,QAAS,CAC9E,SAAAA,EACA,aAAc,YACpB,CAAK,EAAE,SACsBC,CAAI,EAAE,MAAM,KAAK,EAAE,CAAC,EAC7C,OAAIC,KAAaJ,EAAoBA,EAAYI,CAAS,EACnDC,EAAWD,EAAWA,EAAU,MAAM,GAAG,CAAC,CACnD,MAAQ,CAGN,GAAIF,KAAYF,EAAa,OAAOA,EAAYE,CAAQ,EACxD,MAAMI,EAAWJ,GAAA,YAAAA,EAAU,MAAMK,GACjC,OAAID,EAAiBD,EAAWH,EAAUI,EAAS,MAAM,CAAC,CAAC,EACpD,GACT,CACF,CACA,MAAMC,EAAW,sBACjB,SAASF,EAAWG,EAAUC,EAAQ,CACpC,MAAMC,EAAQ,EAAED,EAAO,CAAC,GAAK,GACvBE,EAAU,EAAEF,EAAO,CAAC,GAAK,GAEzBG,EAAU,EAAEH,EAAO,CAAC,GAAK,GAAK,GACpC,OAAOT,EAAYQ,CAAQ,EAAIE,EAAQ,GAAKC,EAAU,EAAID,EAAQ,GAAKC,EAAUC,EAAUF,EAAQ,GAAKC,EAAUC,CACpH","x_google_ignoreList":[0]}