@absoluteui/helpers 0.13.2 → 0.13.3

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 (109) hide show
  1. package/dist/array/compare.js +1 -1
  2. package/dist/array/index.js +1 -1
  3. package/dist/array/tree.js +1 -1
  4. package/dist/async/batch.js +1 -1
  5. package/dist/async/concurrency.js +1 -1
  6. package/dist/async/control.js +1 -1
  7. package/dist/async/index.js +1 -1
  8. package/dist/async/signal.js +1 -1
  9. package/dist/boolean/index.js +1 -1
  10. package/dist/business-calendar/days.js +1 -1
  11. package/dist/business-calendar/describe.js +1 -1
  12. package/dist/business-calendar/engine.js +1 -1
  13. package/dist/business-calendar/hours.js +1 -1
  14. package/dist/business-calendar/index.js +1 -1
  15. package/dist/business-calendar/internal.js +1 -1
  16. package/dist/business-calendar/rules.js +1 -1
  17. package/dist/color/index.js +1 -1
  18. package/dist/color/named.js +1 -1
  19. package/dist/compare/index.js +1 -1
  20. package/dist/convert/index.js +1 -1
  21. package/dist/csv/index.js +1 -1
  22. package/dist/csv/parse.js +1 -1
  23. package/dist/csv/stringify.js +1 -1
  24. package/dist/date/calendar.js +1 -1
  25. package/dist/date/format.js +1 -1
  26. package/dist/date/index.js +1 -1
  27. package/dist/date/intervals.js +1 -1
  28. package/dist/date/intl-cache.js +1 -1
  29. package/dist/date/locale.js +1 -1
  30. package/dist/date/plain-date.js +1 -1
  31. package/dist/date/plain-time.js +1 -1
  32. package/dist/date/zone.js +1 -1
  33. package/dist/decimal/index.js +1 -1
  34. package/dist/ds/avl.js +1 -1
  35. package/dist/ds/bitset.js +1 -1
  36. package/dist/ds/bloom.js +1 -1
  37. package/dist/ds/caches.js +1 -1
  38. package/dist/ds/disjoint-set.js +1 -1
  39. package/dist/ds/emitter.js +1 -1
  40. package/dist/ds/graph.js +1 -1
  41. package/dist/ds/heap.js +1 -1
  42. package/dist/ds/index.js +1 -1
  43. package/dist/ds/internal.js +1 -1
  44. package/dist/ds/interval-tree.js +1 -1
  45. package/dist/ds/linked-list.js +1 -1
  46. package/dist/ds/maps.js +1 -1
  47. package/dist/ds/ring.js +1 -1
  48. package/dist/ds/sorted.js +1 -1
  49. package/dist/ds/stack.js +1 -1
  50. package/dist/ds/trie.js +1 -1
  51. package/dist/duration/index.js +1 -1
  52. package/dist/encoding/index.js +1 -1
  53. package/dist/error/index.js +1 -1
  54. package/dist/fn/index.js +1 -1
  55. package/dist/fn/memo.js +1 -1
  56. package/dist/fn/timing.js +1 -1
  57. package/dist/http/headers.js +1 -1
  58. package/dist/http/index.js +1 -1
  59. package/dist/http/problem.js +1 -1
  60. package/dist/http/response.js +1 -1
  61. package/dist/http/status.js +1 -1
  62. package/dist/index.js +1 -1
  63. package/dist/internal/keys.js +1 -1
  64. package/dist/is/index.js +1 -1
  65. package/dist/json/index.js +1 -1
  66. package/dist/json/internal.js +1 -1
  67. package/dist/json/ndjson.js +1 -1
  68. package/dist/json/parse.js +1 -1
  69. package/dist/json/patch.js +1 -1
  70. package/dist/json/pointer.js +1 -1
  71. package/dist/json/stringify.js +1 -1
  72. package/dist/linq/enumerable.js +1 -1
  73. package/dist/linq/index.js +1 -1
  74. package/dist/linq/operators.js +1 -1
  75. package/dist/number/core.js +1 -1
  76. package/dist/number/format.js +1 -1
  77. package/dist/number/index.js +1 -1
  78. package/dist/number/internal.js +1 -1
  79. package/dist/number/parse.js +1 -1
  80. package/dist/number/words.js +1 -1
  81. package/dist/object/basic.js +1 -1
  82. package/dist/object/deep.js +1 -1
  83. package/dist/object/diff.js +1 -1
  84. package/dist/object/index.js +1 -1
  85. package/dist/object/internal.js +1 -1
  86. package/dist/object/path.js +1 -1
  87. package/dist/random/core.js +1 -1
  88. package/dist/random/index.js +1 -1
  89. package/dist/random/seeded.js +1 -1
  90. package/dist/sanitize/index.js +1 -1
  91. package/dist/sanitize/pii.js +1 -1
  92. package/dist/sanitize/records.js +1 -1
  93. package/dist/sanitize/text.js +1 -1
  94. package/dist/set/index.js +1 -1
  95. package/dist/stats/index.js +1 -1
  96. package/dist/string/index.js +1 -1
  97. package/dist/string/internal.js +1 -1
  98. package/dist/string/words.js +1 -1
  99. package/dist/timezone/index.js +1 -1
  100. package/dist/url/index.js +1 -1
  101. package/dist/validate/builders.js +1 -1
  102. package/dist/validate/formats.js +1 -1
  103. package/dist/validate/index.js +1 -1
  104. package/dist/validate/schema.js +1 -1
  105. package/dist/zip/index.js +1 -1
  106. package/dist/zip/internal.js +1 -1
  107. package/dist/zip/reader.js +1 -1
  108. package/dist/zip/writer.js +1 -1
  109. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/helpers v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/helpers v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  import{LimitError as _,ValidationError as y}from"../error/index.js";import{isPlainObject as w}from"../is/index.js";import{assertSafeKey as b,hasOwn as h}from"../internal/keys.js";import{at as g,circular as k,copyContainer as I,isContainer as O,put as R}from"./internal.js";import{deepEqual as P}from"./deep.js";function E(u,p){const s=[],c=new Set,i=(e,r,o)=>{if(Array.isArray(e)&&Array.isArray(r)){c.has(e)&&k(),c.add(e);const n=Math.min(e.length,r.length);for(let t=0;t<n;t++)i(e[t],r[t],[...o,t]);for(let t=n;t<r.length;t++)s.push({op:"add",path:[...o,t],value:r[t]});for(let t=e.length-1;t>=n;t--)s.push({op:"remove",path:[...o,t],from:e[t]});c.delete(e);return}if(w(e)&&w(r)){c.has(e)&&k(),c.add(e);for(const n of Object.keys(e))h(r,n)?i(e[n],r[n],[...o,n]):s.push({op:"remove",path:[...o,n],from:e[n]});for(const n of Object.keys(r))h(e,n)||s.push({op:"add",path:[...o,n],value:r[n]});c.delete(e);return}P(e,r)||s.push({op:"replace",path:o,from:e,value:r})};return i(u,p,[]),s}const m=()=>{throw new y("HLP_OBJECT_PATH_NOT_FOUND","A change refers to a path that does not exist.")};function F(u,p){const s=new WeakSet,c=e=>{if(!O(e))return m();if(s.has(e))return e;const r=I(e);return s.add(r),r};let i=u;for(const e of p){const r=e.path;if(!Array.isArray(r))throw new y("HLP_OBJECT_DIFF_INVALID","A change is not valid.");for(const l of r){if(typeof l!="string"&&(typeof l!="number"||!Number.isSafeInteger(l)||l<0))throw new y("HLP_OBJECT_DIFF_INVALID","A change is not valid.");b(l)}const o=r;if(o.length===0){i=e.op==="remove"?void 0:e.value;continue}i=c(i);let n=i;for(let l=0;l<o.length-1;l++){const f=g(o,l);h(n,f)||m();const A=c(n[f]);n[f]=A,n=A}const t=g(o,o.length-1),a=Array.isArray(n)&&typeof t=="number",d=n;switch(e.op){case"add":a?(t>d.length&&m(),d.splice(t,0,e.value)):n[t]=e.value;break;case"remove":h(n,t)||m(),a?d.splice(t,1):Reflect.deleteProperty(n,t);break;case"replace":h(n,t)||m(),n[t]=e.value;break;default:throw new y("HLP_OBJECT_DIFF_INVALID","A change is not valid.")}}return i}function v(u,p={}){const{separator:s=".",arrays:c=!0}=p,i={},e=new Set,r=(o,n)=>{const t=w(o)||c&&Array.isArray(o);if(!t||n!==void 0&&Object.keys(o).length===0){n!==void 0&&R(i,n,t?Array.isArray(o)?[]:{}:o);return}e.has(o)&&k(),e.add(o);for(const a of Object.keys(o))r(o[a],n===void 0?a:`${n}${s}${a}`);e.delete(o)};return r(u,void 0),i}const T=/^(?:0|[1-9]\d{0,14})$/;function N(u,p={}){const{separator:s=".",arrays:c=!0,maxArrayIndex:i=1e4}=p;if(s==="")throw new y("HLP_OBJECT_INVALID_SEPARATOR","The separator must not be empty.");const e={};for(const[r,o]of Object.entries(u)){const n=r.split(s).map(a=>{if(b(a),!c||!T.test(a))return a;const d=Number(a);if(d>i)throw new _("HLP_OBJECT_ARRAY_INDEX_LIMIT","An array index exceeds the limit.");return d});let t=e;for(let a=0;a<n.length-1;a++){const d=g(n,a),l=g(n,a+1);let f=h(t,d)?t[d]:void 0;Array.isArray(f)&&typeof l=="string"?f=Object.assign({},f):O(f)||(f=typeof l=="number"?[]:{}),t[d]=f,t=f}t[g(n,n.length-1)]=o}return e}export{F as applyDiff,E as diff,v as flattenObject,N as unflattenObject};
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/helpers v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/helpers v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  import{MAX_PATH_LENGTH as p,parsePath as a,formatPath as o}from"./path.js";import{pick as s,omit as y,pickBy as r,omitBy as i,mapKeys as l,mapValues as d,mapEntries as f,filterKeys as m,filterValues as c,invert as O,invertBy as u,renameKeys as E,compactObject as b,defaults as g,typedKeys as h,typedValues as j,typedEntries as D,typedFromEntries as K,isShallowEqual as P,getOwn as M,size as S,countValuesBy as x,sortKeys as B,objectToMap as C,mapToObject as T}from"./basic.js";import{deepGet as q,deepHas as A,deepSet as F,deepSetInPlace as H,deepUnset as k,deepMerge as v,deepMergeAll as w,deepClone as z,deepFreeze as G,deepEqual as U}from"./deep.js";import{diff as I,applyDiff as L,flattenObject as N,unflattenObject as R}from"./diff.js";export{p as MAX_PATH_LENGTH,L as applyDiff,b as compactObject,x as countValuesBy,z as deepClone,U as deepEqual,G as deepFreeze,q as deepGet,A as deepHas,v as deepMerge,w as deepMergeAll,F as deepSet,H as deepSetInPlace,k as deepUnset,g as defaults,I as diff,m as filterKeys,c as filterValues,N as flattenObject,o as formatPath,M as getOwn,O as invert,u as invertBy,P as isShallowEqual,f as mapEntries,l as mapKeys,T as mapToObject,d as mapValues,C as objectToMap,y as omit,i as omitBy,a as parsePath,s as pick,r as pickBy,E as renameKeys,S as size,B as sortKeys,D as typedEntries,K as typedFromEntries,h as typedKeys,j as typedValues,R as unflattenObject};
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/helpers v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/helpers v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  import{ValidationError as o}from"../error/index.js";import{isPlainObject as c}from"../is/index.js";const t=Symbol("missing");function s(n,r,e){r==="__proto__"?Object.defineProperty(n,r,{value:e,writable:!0,enumerable:!0,configurable:!0}):n[r]=e}function y(n,r){return typeof n!="object"&&typeof n!="function"||n===null?t:Object.prototype.hasOwnProperty.call(n,r)?n[r]:t}function u(n){return Object.getPrototypeOf(n)===null?Object.assign(Object.create(null),n):{...n}}function a(n){return Array.isArray(n)||c(n)}function l(n){return Array.isArray(n)?n.slice():u(n)}const f=()=>{throw new o("HLP_OBJECT_CIRCULAR","The value contains a circular reference.")};function w(n){const r=Object.keys(n);for(const e of Object.getOwnPropertySymbols(n))Object.prototype.propertyIsEnumerable.call(n,e)&&r.push(e);return r}function O(n,r){if(r<0||r>=n.length)throw new o("HLP_OBJECT_INVALID_PATH","The property path is not valid.");return n[r]}export{t as MISSING,O as at,f as circular,l as copyContainer,u as copyPlain,a as isContainer,w as ownEnumerableKeys,y as ownValue,s as put};
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/helpers v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/helpers v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  import{LimitError as g,ValidationError as m}from"../error/index.js";const c=4096,o=()=>{throw new m("HLP_OBJECT_INVALID_PATH","The property path is not valid.")},h=e=>e>=48&&e<=57;function d(e){if(!(e.length===0||e.length>15)){for(let t=0;t<e.length;t++)if(!h(e.charCodeAt(t)))return;if(!(e.length>1&&e.startsWith("0")))return Number(e)}}function T(e){if(typeof e!="string"){if(e.length>c)throw new g("HLP_OBJECT_PATH_TOO_LONG","The property path is too long.");const l=[];for(const i of e)typeof i=="number"?((!Number.isSafeInteger(i)||i<0)&&o(),l.push(i)):typeof i=="string"?l.push(i):o();return l}if(e.length>c)throw new g("HLP_OBJECT_PATH_TOO_LONG","The property path is too long.");const t=[],r=e.length;let s=0,n=0;for(;n<r;){const l=e[n];if(l==="["){s===1&&o(),n++;const i=e[n];if(i==='"'||i==="'"){n++;let f="";for(;;){n>=r&&o();const u=e[n];if(u==="\\")n+1>=r&&o(),f+=e[n+1]??"",n+=2;else if(u===i){n++;break}else f+=u??"",n++}e[n]!=="]"&&o(),t.push(f)}else{const f=n;for(;n<r&&h(e.charCodeAt(n));)n++;e[n]!=="]"&&o();const u=d(e.slice(f,n));u===void 0?o():t.push(u)}n++,s=2}else if(l===".")s!==2&&o(),n++,s=1;else{s===2&&o();const i=n;for(;n<r&&e[n]!=="."&&e[n]!=="[";)e[n]==="]"&&o(),n++;const f=e.slice(i,n);t.push(d(f)??f),s=2}}return s===1&&o(),t}const P=/^[A-Z_$][\w$]*$/i;function _(e){let t="";for(const r of e)typeof r=="number"?t+=`[${r}]`:P.test(r)?t+=t===""?r:`.${r}`:t+=`["${r.replace(/["\\]/g,s=>`\\${s}`)}"]`;return t}export{c as MAX_PATH_LENGTH,_ as formatPath,T as parsePath};
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/helpers v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/helpers v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  import{HelperError as m,ValidationError as u}from"../error/index.js";const i=65536,c=4294967296;function s(){const e=globalThis.crypto;if(typeof e?.getRandomValues!="function")throw new m("HLP_RANDOM_UNAVAILABLE","A cryptographic random source (crypto.getRandomValues) is not available.",{kind:"unsupported"});return e}function h(e){const r=s();for(let t=0;t<e.length;t+=i)r.getRandomValues(e.subarray(t,Math.min(e.length,t+i)));return e}function _(e=1){const r=Math.max(1,Math.min(i/4,e)),t=s(),n=new Uint32Array(r);let o=r;return()=>(o>=r&&(t.getRandomValues(n),o=0),n[o++]??0)}function l(e,r){if(r<=1)return 0;if(r<=c){let o=0;for(;2**o<r;)o++;const a=o>=32?4294967295:2**o-1;for(;;){const f=(e()&a)>>>0;if(f<r)return f}}let t=0;for(;2**t*c<r;)t++;const n=2**t-1;for(;;){const o=(e()&n)*c+e();if(o<r)return o}}function A(e){return((e()>>>5)*67108864+(e()>>>6))/9007199254740992}function g(e,r){if(!Number.isSafeInteger(e)||!Number.isSafeInteger(r))throw new u("HLP_RANDOM_RANGE","Bounds must be safe integers.");if(e>r)throw new u("HLP_RANDOM_RANGE","The minimum must not exceed the maximum.");const t=r-e+1;if(t>2**53)throw new u("HLP_RANDOM_RANGE","The range must not exceed 2^53 values.");return t}function b(e,r){for(let t=e.length-1;t>0;t--){const n=l(r,t+1),o=e[t];e[t]=e[n],e[n]=o}return e}export{_ as cryptoSource,h as fillRandom,b as fisherYates,g as rangeSize,l as uniformBelow,A as unitFloat};
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/helpers v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/helpers v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  import{LimitError as N,ValidationError as s}from"../error/index.js";import{cryptoSource as l,fillRandom as d,fisherYates as A,rangeSize as D,uniformBelow as m,unitFloat as T}from"./core.js";import{createSeededRandom as ue}from"./seeded.js";const E=16*1024*1024,H=65536;function z(e,n){const t=D(e,n);return e+m(l(2),t)}function X(e=0,n=1){if(!Number.isFinite(e)||!Number.isFinite(n)||!(e<n)||!Number.isFinite(n-e))throw new s("HLP_RANDOM_RANGE","Expected finite bounds with min < max.");const t=l(4);for(;;){const r=e+T(t)*(n-e);if(r<n)return r}}function Y(e=.5){if(!(e>=0&&e<=1))throw new s("HLP_RANDOM_PROBABILITY","The probability must be between 0 and 1.");return T(l(2))<e}function j(e){if(!Number.isInteger(e)||e<0)throw new s("HLP_RANDOM_LENGTH","The length must be a non-negative integer.");if(e>E)throw new N("HLP_RANDOM_TOO_LARGE","The requested byte count exceeds the limit.");return d(new Uint8Array(e))}function k(e){return e.length?e[m(l(2),e.length)]:void 0}function Z(e,n){if(e.length!==n.length)throw new s("HLP_RANDOM_WEIGHTS","Items and weights must have the same length.");if(!e.length)return;let t=0;for(const i of n){if(!Number.isFinite(i)||i<0)throw new s("HLP_RANDOM_WEIGHTS","Weights must be finite and non-negative.");t+=i}if(!(t>0)||!Number.isFinite(t))throw new s("HLP_RANDOM_WEIGHTS","The total weight must be positive and finite.");const r=T(l(2))*t;let o=0,f=-1;for(let i=0;i<n.length;i++){const u=n[i]??0;if(!(u<=0)&&(o+=u,f=i,r<o))return e[i]}return e[f]}function J(e,n){if(!Number.isInteger(n)||n<0||n>e.length)throw new s("HLP_RANDOM_SAMPLE_SIZE","The sample size must be an integer between 0 and the array length.");const t=e.slice(),r=l(n*2);for(let o=0;o<n;o++){const f=o+m(r,t.length-o),i=t[o];t[o]=t[f],t[f]=i}return t.length=n,t}function K(e){return A(e.slice(),l(e.length))}function Q(e){return A(e,l(e.length))}const I=Array.from({length:256},(e,n)=>n.toString(16).padStart(2,"0"));function P(e){let n="";for(let t=0;t<16;t++)(t===4||t===6||t===8||t===10)&&(n+="-"),n+=I[e[t]??0]??"00";return n}function $(){const e=globalThis.crypto;if(typeof e?.randomUUID=="function")return e.randomUUID();const n=d(new Uint8Array(16));return n[6]=(n[6]??0)&15|64,n[8]=(n[8]??0)&63|128,P(n)}const U=2**48-1;function L(e,n,t){const r=new Uint8Array(16);let o=e;for(let f=5;f>=0;f--)r[f]=o%256,o=Math.floor(o/256);return r[6]=112|n>>>8&15,r[7]=n&255,r.set(t.subarray(0,8),8),r[8]=(r[8]??0)&63|128,P(r)}function _(e){if(!Number.isInteger(e)||e<0||e>U)throw new s("HLP_RANDOM_TIMESTAMP","The timestamp must be an integer millisecond value within 48 bits.")}function ee(e=Date.now()){_(e);const n=d(new Uint8Array(10));return L(e,(n[8]??0)<<8|(n[9]??0),n)}function ne(e=Date.now){let n=-1,t=0;return()=>{let r=e();_(r);const o=d(new Uint8Array(10));return r>n?t=((o[8]??0)<<8|(o[9]??0))&2047:(r=n,t++,t>4095&&(r=n+1,t=((o[8]??0)<<8|(o[9]??0))&2047,_(r))),n=r,L(r,t,o)}}function te(e){if(B(e,7))return Number.parseInt(e.slice(0,8)+e.slice(9,13),16)}const G=/^[\da-f]{8}-[\da-f]{4}-([1-8])[\da-f]{3}-[89ab][\da-f]{3}-[\da-f]{12}$/i;function B(e,n){if(typeof e!="string"||e.length!==36)return!1;if(n===void 0&&(e==="00000000-0000-0000-0000-000000000000"||e.toLowerCase()==="ffffffff-ffff-ffff-ffff-ffffffffffff"))return!0;const t=G.exec(e);return t!==null&&(n===void 0||Number(t[1])===n)}const W="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";function y(e){if(!Number.isInteger(e)||e<0)throw new s("HLP_RANDOM_LENGTH","The length must be a non-negative integer.");if(e>H)throw new N("HLP_RANDOM_TOO_LARGE","The requested length exceeds the limit.")}function M(e){const n=Array.from(e);if(n.length<2||n.length>256||new Set(n).size!==n.length)throw new s("HLP_RANDOM_ALPHABET","The alphabet must have 2 to 256 unique characters.");return n}function x(e,n){let t=0;for(;2**t<e.length;)t++;const r=2**t-1,o=Math.min(65536,Math.ceil(1.6*r*n/e.length)+8);let f="",i=0;for(;i<n;){const u=d(new Uint8Array(o));for(let c=0;c<o&&i<n;c++){const a=e[(u[c]??0)&r];a!==void 0&&(f+=a,i++)}}return f}function re(e=21,n=W){return y(e),x(M(n),e)}const R="abcdefghijklmnopqrstuvwxyz",O="ABCDEFGHIJKLMNOPQRSTUVWXYZ",p="0123456789",F={alpha:R+O,numeric:p,alphanumeric:p+O+R,hex:"0123456789abcdef"};function oe(e,n={}){return y(e),x(M(n.alphabet??F[n.charset??"alphanumeric"]),e)}const C="Il1|O0o`'\"",V="!@#$%^&*()-_=+[]{};:,.<>?/~";function ie(e={}){const{length:n=16,lower:t=!0,upper:r=!0,digits:o=!0,symbols:f=!0,excludeAmbiguous:i=!1,minEach:u=1}=e;if(y(n),n<4)throw new s("HLP_RANDOM_PASSWORD","The password length must be at least 4.");if(!Number.isInteger(u)||u<0)throw new s("HLP_RANDOM_PASSWORD","minEach must be a non-negative integer.");const c=h=>Array.from(new Set(Array.from(h))).filter(b=>!i||!C.includes(b)),a=[];if(t&&a.push(c(R)),r&&a.push(c(O)),o&&a.push(c(p)),f!==!1&&a.push(c(f===!0?V:f)),!a.length||a.some(h=>h.length===0))throw new s("HLP_RANDOM_PASSWORD","Enable at least one non-empty character class.");if(u*a.length>n)throw new s("HLP_RANDOM_PASSWORD","The length is too short for the required characters.");const S=Array.from(new Set(a.flat())),w=l(n*3),g=[];for(const h of a)for(let b=0;b<u;b++)g.push(h[m(w,h.length)]??"");for(;g.length<n;)g.push(S[m(w,S.length)]??"");return A(g,w).join("")}function fe(e=6){if(!Number.isInteger(e)||e<4||e>12)throw new s("HLP_RANDOM_OTP","OTP length must be an integer between 4 and 12.");return x(Array.from(p),e)}export{C as AMBIGUOUS_CHARACTERS,E as MAX_RANDOM_BYTES,H as MAX_RANDOM_LENGTH,W as URL_ALPHABET,ue as createSeededRandom,ne as createUuidV7Generator,ie as generatePassword,B as isUuid,Y as randomBool,j as randomBytes,X as randomFloat,re as randomId,z as randomInt,fe as randomOtp,k as randomPick,Z as randomPickWeighted,oe as randomString,J as sample,K as shuffle,Q as shuffleInPlace,$ as uuidV4,ee as uuidV7,te as uuidV7Timestamp};
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/helpers v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/helpers v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  import{ValidationError as b}from"../error/index.js";import{fisherYates as h,rangeSize as T,uniformBelow as s,unitFloat as a}from"./core.js";function d(r){let i=r>>>0;return()=>{i=i+2654435769>>>0;let n=i;return n=Math.imul(n^n>>>16,2246822507),n=Math.imul(n^n>>>13,3266489909),(n^n>>>16)>>>0}}function x(r){if(typeof r=="string"){let n=2166136261;for(let o=0;o<r.length;o++)n=Math.imul(n^r.charCodeAt(o),16777619);return n>>>0}if(!Number.isFinite(r))throw new b("HLP_RANDOM_SEED","The seed must be a finite number or a string.");const i=Math.floor(r/4294967296);return r>>>0^d(i>>>0)()}function M(r){const i=d(x(r));let n=i(),o=i(),l=i(),m=i();(n|o|l|m)===0&&(n=1);const f=(e,t)=>e<<t|e>>>32-t,u=()=>{const e=Math.imul(f(Math.imul(o,5),7),9)>>>0,t=o<<9;return l^=n,m^=o,o^=l,n^=m,l^=t,m=f(m,11),e};return{next:()=>a(u),nextUint32:u,int:(e,t)=>e+s(u,T(e,t)),float:(e=0,t=1)=>{if(!Number.isFinite(e)||!Number.isFinite(t)||!(e<t))throw new b("HLP_RANDOM_RANGE","Expected finite bounds with min < max.");for(;;){const c=e+a(u)*(t-e);if(c<t)return c}},bool:(e=.5)=>{if(!(e>=0&&e<=1))throw new b("HLP_RANDOM_PROBABILITY","The probability must be between 0 and 1.");return a(u)<e},pick:e=>e.length?e[s(u,e.length)]:void 0,shuffle:e=>h(e.slice(),u)}}export{M as createSeededRandom};
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/helpers v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/helpers v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  import{trimStrings as t,removeNullish as i,removeEmpty as p,normalizeRecord as r,dedupeBy as n,cleanRecords as s,coerceRecordTypes as a}from"./records.js";import{stripInvisible as m,stripControl as y,normalizeUnicode as c,collapseWhitespace as O,safeFileName as d,normalizeEmail as z,normalizePhone as R,sanitizeSearchQuery as u,truncateForLog as E}from"./text.js";import{maskPii as h,redact as N,DEFAULT_REDACT_KEYS as f}from"./pii.js";export{f as DEFAULT_REDACT_KEYS,s as cleanRecords,a as coerceRecordTypes,O as collapseWhitespace,n as dedupeBy,h as maskPii,z as normalizeEmail,R as normalizePhone,r as normalizeRecord,c as normalizeUnicode,N as redact,p as removeEmpty,i as removeNullish,d as safeFileName,u as sanitizeSearchQuery,y as stripControl,m as stripInvisible,t as trimStrings,E as truncateForLog};
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/helpers v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/helpers v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  import{isUnsafeKey as x}from"../internal/keys.js";import{isPlainObject as C}from"../is/index.js";const E=/[\w%+.-]{1,64}@[a-z\d-]{1,63}(?:\.[a-z\d-]{1,63}){1,10}/gi,O=/\b[A-Z]{2}\d{2}[A-Z\d]{11,30}\b/g,D=/\b[A-Z]{2}\d{2}(?: [A-Z\d]{4}){2,7}(?: [A-Z\d]{1,4})?\b/g,R=/\b\d(?:[ -]?\d){11,18}\b/g,M=/\b\d{3}-\d{2}-\d{4}\b/g,P=/(?<![\w+])\+?(?:\(\d{1,4}\)|\d)(?:[ ().-]{0,2}\d){6,16}\b/g;function S(c){let u=0,r=!1;for(let a=c.length-1;a>=0;a--){let o=c.charCodeAt(a)-48;r&&(o*=2,o>9&&(o-=9)),u+=o,r=!r}return u%10===0}function T(c){const u=c.slice(4)+c.slice(0,4);let r=0;for(const a of u){const o=a.charCodeAt(0),l=o>=65?o-55:o-48;r=l>9?(r*100+l)%97:(r*10+l)%97}return r===1}function h(c,u,r){let a=0;for(const i of c)i>="0"&&i<="9"&&a++;let o=0,l="";for(const i of c)i>="0"&&i<="9"?(o++,l+=o>a-u?i:r):l+=i;return l}function _(c,u={}){const{email:r=!0,phone:a=!0,card:o=!0,iban:l=!0,ssn:i=!0,maskChar:b="*",maxLength:k=1e6}=u,d=b===""?"*":Array.from(b)[0]??"*";let t=c;if(t.length>k&&(t=t.slice(0,k)),r&&(t=t.replace(E,n=>{const s=n.indexOf("@");return`${Array.from(n.slice(0,s))[0]??""}${d.repeat(3)}${n.slice(s)}`})),l){const n=s=>{const e=s.replaceAll(" ","");if(!T(e))return s;let f=0,y="";const m=e.length;for(const g of s){if(g===" "){y+=g;continue}f++,y+=f<=2||f>m-4?g:d}return y};t=t.replace(D,n).replace(O,n)}return o&&(t=t.replace(R,n=>S(n.replace(/\D/g,""))?h(n,4,d):n)),i&&(t=t.replace(M,n=>h(n,4,d))),a&&(t=t.replace(P,n=>{const s=n.replace(/\D/g,"").length;return s>=7&&s<=15?h(n,2,d):n})),t}const L=[/pass|pwd|secret|token|authori[sz]ation|api[-_]?key|cookie|session|credential|private[-_]?key/i];function I(c,u={}){const{keys:r=L,replacement:a="[REDACTED]",deep:o=!0,maxDepth:l=20,maskStrings:i=!1}=u,b=new Set(r.filter(e=>typeof e=="string").map(e=>e.toLowerCase())),k=r.filter(e=>e instanceof RegExp).map(e=>new RegExp(e.source,e.flags.replace(/[gy]/g,""))),d=e=>b.has(e.toLowerCase())||k.some(f=>f.test(e)),t=i===!1?void 0:i===!0?{}:i,n=new Set,s=(e,f)=>{if(typeof e=="string")return t?_(e,t):e;if(typeof e!="object"||e===null||!(Array.isArray(e)||C(e)||e instanceof Map))return e;if(n.has(e))return"[Circular]";if(f>0&&!o)return e;if(f>=l)return"[Truncated]";n.add(e);try{if(Array.isArray(e))return e.map(p=>s(p,f+1));if(e instanceof Map){const p=new Map;for(const[A,w]of e)p.set(A,typeof A=="string"&&d(A)?a:s(w,f+1));return p}const m=e,g={};for(const p of Object.keys(m))x(p)||(g[p]=d(p)?a:s(m[p],f+1));return g}finally{n.delete(e)}};return s(c,0)}export{L as DEFAULT_REDACT_KEYS,_ as maskPii,I as redact};
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/helpers v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/helpers v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  import{LimitError as x}from"../error/index.js";import{isUnsafeKey as b}from"../internal/keys.js";import{isPlainObject as w}from"../is/index.js";import{collapseWhitespace as D,stripInvisible as h}from"./text.js";const S=e=>Array.isArray(e)||w(e);function g(e,n,r,u){const s=new WeakMap,t=(o,l)=>{s.set(o,l)},i=(o,l)=>{if(l>r)throw new x("HLP_SANITIZE_TOO_DEEP","Input nesting exceeds the limit.",{details:{maxDepth:r}});return u(o,y=>{if(S(y)){if(!n)return y;const m=s.get(y);if(m!==void 0)return m}return i(y,l+1)},t)};return i(e,0)}function R(e,n,r,u){if(Array.isArray(e)){const s=[];r(e,s);for(const t of e){const i=n(t);u(i)&&s.push(i)}return s}if(w(e)){const s={};r(e,s);for(const t of Object.keys(e)){if(b(t))continue;const i=n(e[t]);u(i)&&(s[t]=i)}return s}return e}function W(e,n={}){const{deep:r=!0,maxDepth:u=100}=n;return g(e,r,u,(s,t,i)=>typeof s=="string"?s.trim():R(s,t,i,()=>!0))}function M(e,n={}){const{deep:r=!1,maxDepth:u=100}=n;return g(e,r,u,(s,t,i)=>R(s,t,i,o=>o!=null))}function P(e,n={}){const{deep:r=!1,maxDepth:u=100,whitespace:s=!0,nullish:t=!0}=n,i=o=>o==null?!t:typeof o=="string"?(s?o.trim():o)!=="":Array.isArray(o)?o.length>0:w(o)?Object.keys(o).length>0:!0;return g(e,r,u,(o,l,p)=>R(o,l,p,i))}const E=new Set(["true","yes","y","1","on"]),I=new Set(["false","no","n","0","off"]);function O(e){if(typeof e=="boolean")return e;if(typeof e=="number")return e===1?!0:e===0?!1:null;if(typeof e!="string")return null;const n=e.trim().toLowerCase();return E.has(n)?!0:I.has(n)?!1:null}const j=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i;function T(e){if(typeof e=="number")return Number.isFinite(e)?e:null;if(typeof e!="string")return null;const n=e.trim();if(n.length===0||n.length>400||!j.test(n))return null;const r=Number(n);return Number.isFinite(r)?r:null}function N(e,n={}){const{trim:r=!0,collapseWhitespace:u=!1,stripInvisible:s=!0,emptyToNull:t=!1,lowercaseKeys:i=!1,trimKeys:o=!0}=n,l=new Set(n.toNumber),p=new Set(n.toBoolean),y=new Set(n.lowercase),m={};for(const k of Object.keys(e)){let f=s?h(k):k;if(o&&(f=f.trim()),i&&(f=f.toLowerCase()),b(f)||b(k))continue;let a=e[k];if(typeof a=="string"){let d=s?h(a):a;u?d=D(d):r&&(d=d.trim()),y.has(f)&&(d=d.toLowerCase()),a=t&&d===""?null:d}l.has(f)&&a!==null&&a!==void 0?a=T(a):p.has(f)&&a!==null&&a!==void 0&&(a=O(a)),m[f]=a}return m}function C(e,n,r={}){const u=r.keep==="last",s=new Map;e.forEach((i,o)=>{const l=n(i,o);(u||!s.has(l))&&s.set(l,o)});const t=new Set(s.values());return e.filter((i,o)=>t.has(o))}function F(e,n={}){const{normalize:r={},dropEmpty:u=!0,keep:s="first"}=n;let t=e.map(o=>r===!1?N(o,{trim:!1,stripInvisible:!1,trimKeys:!1}):N(o,r));u&&(t=t.filter(o=>Object.values(o).some(l=>l!=null&&l!==""))),n.dedupeBy&&(t=C(t,n.dedupeBy,{keep:s})),n.filter&&(t=t.filter(n.filter));const i=n.map;return i?t.map(i):t}function V(e,n,r={}){const{onInvalid:u="null",strip:s=!1}=r,t={};for(const i of Object.keys(e)){if(b(i))continue;const o=e[i],l=Object.prototype.hasOwnProperty.call(n,i)?n[i]:void 0;if(l===void 0){s||(t[i]=o);continue}if(o==null||o===""){t[i]=null;continue}const p=L(o,l);p!==c?t[i]=p:u==="null"?t[i]=null:u==="keep"&&(t[i]=o)}return t}const c=Symbol("invalid"),A=/^\d{4}-\d{2}-\d{2}(?:[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d{1,9})?)?(?:Z|[+-]\d{2}:?\d{2})?)?$/;function L(e,n){switch(n){case"string":return typeof e=="string"?e:typeof e=="number"||typeof e=="boolean"||typeof e=="bigint"?String(e):c;case"number":return T(e)??c;case"integer":{const r=T(e);return r!==null&&Number.isSafeInteger(r)?r:c}case"boolean":return O(e)??c;case"date":{if(e instanceof Date)return Number.isNaN(e.getTime())?c:new Date(e.getTime());if(typeof e!="string"||e.length>40||!A.test(e.trim()))return c;const r=new Date(e.trim());return Number.isNaN(r.getTime())?c:r}case"json":{if(typeof e!="string"||e.length>1e5)return c;try{return JSON.parse(e,(r,u)=>b(r)?void 0:u)}catch{return c}}}}export{F as cleanRecords,V as coerceRecordTypes,C as dedupeBy,N as normalizeRecord,P as removeEmpty,M as removeNullish,W as trimStrings};
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/helpers v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/helpers v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  import{ValidationError as m}from"../error/index.js";function O(e,r){return e<173?!1:e===8204||e===8205?!r:e===173||e===1564||e===4447||e===4448||e===6068||e===6069||e===12644||e===65440||e>=6155&&e<=6159||e>=8203&&e<=8207||e>=8234&&e<=8238||e>=8288&&e<=8303||e===65279||e>=65529&&e<=65531}const h=e=>e<=31||e>=127&&e<=159;function u(e,r){let i="",t=0;for(let n=0;n<e.length;n++)r(e.charCodeAt(n))&&(i+=e.slice(t,n),t=n+1);return t===0?e:i+e.slice(t)}function f(e,r={}){const i=r.keepJoiners===!0;return u(e,t=>O(t,i))}function N(e,r={}){const i=r.keepWhitespace!==!1;return u(e,t=>h(t)&&!(i&&(t===9||t===10||t===13)))}function A(e,r="NFC"){return e.normalize(r)}function w(e){return e.trim().replace(/\s+/g," ")}const F='"*/:<>?\\|',x=e=>h(e)||F.includes(String.fromCharCode(e)),k=e=>u(e,x)!==e;function E(e,r){let i="";for(let t=0;t<e.length;t++)i+=x(e.charCodeAt(t))?r:e.charAt(t);return i}const $=/^(?:con|prn|aux|nul|com[\d\u00b9\u00b2\u00b3]|lpt[\d\u00b9\u00b2\u00b3]|conin\$|conout\$)$/i,I=new TextEncoder,b=e=>e==="."||e.trim()==="";function c(e){let r=e.length;for(;r>0&&b(e.charAt(r-1));)r--;return e.slice(0,r)}function L(e){let r=0;for(;r<e.length&&b(e.charAt(r));)r++;return e.slice(r)}const y=e=>I.encode(e).length;function d(e,r){let i=0,t="";for(const n of e){const s=n.codePointAt(0)??0,a=s<128?1:s<2048?2:s<65536?3:4;if(i+a>r)break;i+=a,t+=n}return t}function P(e,r={}){const{maxLength:i=255,replacement:t="_",allowLeadingDot:n=!1,fallback:s="file"}=r;if(k(t)||/[.\s]/.test(t)||f(t)!==t)throw new m("HLP_SANITIZE_REPLACEMENT","The replacement must not contain forbidden file name characters.");if(!Number.isInteger(i)||i<1)throw new m("HLP_SANITIZE_OPTION","maxLength must be a positive integer.");const a=f(e.normalize("NFC")).split(/[/\\]/).filter(l=>l!==""&&l!=="."&&l!=="..");let o=E(a.join(t),t);if(t!==""){const l=t+t;for(;o.includes(l);)o=o.replaceAll(l,t)}o=c(o.trim()),n||(o=L(o)),(o===""||o==="."||o==="..")&&(o=s);const g=o.indexOf(".");$.test((g>0?o.slice(0,g):o).trim())&&(o=`${t===""?"_":t}${o}`);const C=o.lastIndexOf(".");if(y(o)>i){const l=C>0?o.slice(o.lastIndexOf(".")):"",p=y(l);l!==""&&p<i/2?o=c(d(o.slice(0,o.length-l.length),i-p))+l:o=c(d(o,i)),o===""&&(o=d(s,i))}return o}const S=e=>{const r=e.indexOf("+");return r<0?e:e.slice(0,r)};function D(e,r={}){const i=f(e).trim();if(i.length>254)return;const t=i.lastIndexOf("@");if(t<=0||t===i.length-1)return;let n=i.slice(0,t),s=i.slice(t+1).toLowerCase();if(s.endsWith(".")&&(s=s.slice(0,-1)),!(n.includes("@")&&!(n.startsWith('"')&&n.endsWith('"')))&&(r.lowercaseLocal===!0&&(n=n.toLowerCase()),r.stripPlusTag===!0&&(n=S(n)),r.gmail===!0&&(s==="gmail.com"||s==="googlemail.com")&&(n=S(n.toLowerCase()).replaceAll(".",""),s="gmail.com"),n!==""))return`${n}@${s}`}function T(e,r={}){const i=e.trim();if(i.length===0||i.length>64)return;const t=i.replace(/(?:ext\.?|x|#) ?\d{1,6}$/i,"").trimEnd();if(/[^\d\s().+\-/]/.test(t))return;let n=t.replace(/\D/g,"");const s=t.startsWith("+");if(!(s&&t.lastIndexOf("+")!==0)&&!(!s&&t.includes("+"))){if(!s)if(n.startsWith("00"))n=n.slice(2);else{const a=r.defaultCountryCode?.replace(/^\+/,"");if(a===void 0||!/^[1-9]\d{0,2}$/.test(a))return;r.stripTrunkZero!==!1&&n.startsWith("0")&&(n=n.slice(1)),n=a+n}if(/^[1-9]\d{7,14}$/.test(n))return`+${n}`}}function _(e,r={}){const{maxLength:i=200,fold:t=!0}=r;let n=e.slice(0,i*4+16);n=f(N(n,{keepWhitespace:!1})),t&&(n=n.normalize("NFKC")),n=w(n);const s=Array.from(n);return s.length>i?s.slice(0,i).join("").trimEnd():n}function W(e){if(typeof e=="string")return e;if(e===void 0)return"undefined";if(typeof e=="bigint")return`${e.toString()}n`;if(typeof e=="symbol"||typeof e=="function")return e.toString();if(e instanceof Error)return`${e.name}: ${e.message}`;const r=new WeakSet;try{return JSON.stringify(e,(t,n)=>{if(typeof n=="bigint")return`${n.toString()}n`;if(typeof n=="object"&&n!==null){if(r.has(n))return"[Circular]";r.add(n)}return n})??Object.prototype.toString.call(e)}catch{return Object.prototype.toString.call(e)}}function j(e,r=1e3){const i=W(e);if(i.length<=r)return i;let t=`\u2026[+${i.length-r}]`,n=Math.max(0,r-t.length);t=`\u2026[+${i.length-n}]`,n=Math.max(0,r-t.length);const s=i.charCodeAt(n-1);return n>0&&s>=55296&&s<=56319&&(n-=1),i.slice(0,n)+t}export{w as collapseWhitespace,D as normalizeEmail,T as normalizePhone,A as normalizeUnicode,P as safeFileName,_ as sanitizeSearchQuery,N as stripControl,f as stripInvisible,j as truncateForLog};
package/dist/set/index.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/helpers v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/helpers v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  import{LimitError as m}from"../error/index.js";const a=e=>e,s=e=>e instanceof Set,f=e=>s(e)?e:new Set(e);function u(e,n){return s(e)?new Set(n):[...n]}function S(e,n){const o=new Map;for(const t of e){const i=n(t);o.has(i)||o.set(i,t)}return o}function p(e,n){const o=new Set;for(const t of e)o.add(n(t));return o}function K(e,n){if(s(e)&&s(n)){const t=a(e).union;if(t)return t.call(e,n)}const o=new Set(e);for(const t of n)o.add(t);return u(e,o)}function R(e,n,o){const t=S(e,o);for(const i of n){const c=o(i);t.has(c)||t.set(c,i)}return u(e,t.values())}function B(e,n){if(s(e)&&s(n)&&e.size<=n.size){const t=a(e).intersection;if(t)return t.call(e,n)}const o=f(n);return u(e,[...new Set(e)].filter(t=>o.has(t)))}function M(e,n,o){const t=p(n,o);return u(e,[...S(e,o)].filter(([i])=>t.has(i)).map(([,i])=>i))}function _(e,n){if(s(e)&&s(n)){const t=a(e).difference;if(t)return t.call(e,n)}const o=f(n);return u(e,[...new Set(e)].filter(t=>!o.has(t)))}function E(e,n,o){const t=p(n,o);return u(e,[...S(e,o)].filter(([i])=>!t.has(i)).map(([,i])=>i))}function O(e,n){if(s(e)&&s(n)){const i=a(e).symmetricDifference;if(i)return i.call(e,n)}const o=f(e),t=f(n);return u(e,[...[...o].filter(i=>!t.has(i)),...[...t].filter(i=>!o.has(i))])}function z(e,n,o){const t=S(e,o),i=S(n,o),c=[];for(const[r,l]of t)i.has(r)||c.push(l);for(const[r,l]of i)t.has(r)||c.push(l);return u(e,c)}function b(e,n){const o=f(e),t=f(n),i=a(o).isSubsetOf;if(i)return i.call(o,t);if(o.size>t.size)return!1;for(const c of o)if(!t.has(c))return!1;return!0}function d(e,n,o){const t=p(n,o);for(const i of e)if(!t.has(o(i)))return!1;return!0}function D(e,n){return b(n,e)}function I(e,n,o){return d(n,e,o)}function g(e,n){const o=f(e),t=f(n),i=a(o).isDisjointFrom;if(i)return i.call(o,t);const[c,r]=o.size<=t.size?[o,t]:[t,o];for(const l of c)if(r.has(l))return!1;return!0}function P(e,n,o){const t=p(n,o);for(const i of e)if(t.has(o(i)))return!1;return!0}function v(e,n){const o=f(e),t=f(n);return o.size===t.size&&b(o,t)}function A(e,n,o){const t=p(e,o),i=p(n,o);if(t.size!==i.size)return!1;for(const c of t)if(!i.has(c))return!1;return!0}const h=1e6,w=20;function L(e,n={}){const o=n.maxSize??h,t=e.map(l=>[...l]);if(t.length===0)return[];const i=t.reduce((l,T)=>l*T.length,1);if(i>o)throw new m("HLP_SET_PRODUCT_TOO_LARGE","The cartesian product exceeds the size limit.",{details:{limit:o}});const c=[],r=t.map(()=>0);for(let l=0;l<i;l++){c.push(t.map((T,x)=>T[r[x]??0]));for(let T=t.length-1;T>=0;T--){const x=(r[T]??0)+1;if(x<(t[T]?.length??0)){r[T]=x;break}r[T]=0}}return c}function j(e,n={}){const o=Math.min(n.maxItems??w,30),t=[...new Set(e)];if(t.length>o)throw new m("HLP_SET_POWERSET_TOO_LARGE","The power set input exceeds the item limit.",{details:{limit:o}});const i=2**t.length,c=[];for(let r=0;r<i;r++)c.push(t.filter((l,T)=>(r&1<<T)!==0));return c}function y(e){const n=new Map;for(const o of e)n.set(o,(n.get(o)??0)+1);return n}function C(e){const n=[];for(const[o,t]of e)for(let i=0;i<t;i++)n.push(o);return n}function N(e,n){const o=y(e);for(const[t,i]of y(n))o.set(t,Math.max(o.get(t)??0,i));return C(o)}function q(e,n){const o=y(n),t=new Map;for(const[i,c]of y(e)){const r=Math.min(c,o.get(i)??0);r>0&&t.set(i,r)}return C(t)}function F(e,n){const o=y(n),t=new Map;for(const[i,c]of y(e)){const r=c-(o.get(i)??0);r>0&&t.set(i,r)}return C(t)}export{h as MAX_CARTESIAN_SIZE,w as MAX_POWER_SET_ITEMS,L as cartesianProduct,y as countOccurrences,_ as except,E as exceptBy,B as intersect,M as intersectBy,g as isDisjoint,P as isDisjointBy,b as isSubset,d as isSubsetBy,D as isSuperset,I as isSupersetBy,F as multisetExcept,q as multisetIntersect,N as multisetUnion,j as powerSet,v as setEquals,A as setEqualsBy,O as symmetricDifference,z as symmetricDifferenceBy,K as union,R as unionBy};
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/helpers v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/helpers v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  import{LimitError as N,ValidationError as f}from"../error/index.js";import{kahanSum as p}from"../number/index.js";function d(t,n={}){let e=!1;for(const r of t)if(!Number.isFinite(r)){e=!0;break}if(!e)return t;if(n.nonFinite==="ignore")return t.filter(r=>Number.isFinite(r));throw new f("HLP_STATS_NOT_FINITE","Values must be finite numbers.")}function h(t,n,e={}){if(t.length!==n.length)throw new f("HLP_STATS_LENGTH","Both series must have the same length.");const r=u=>Number.isFinite(t[u])&&Number.isFinite(n[u]);let o=!1;for(let u=0;u<t.length;u++)if(!r(u)){o=!0;break}if(!o)return[t,n];if(e.nonFinite!=="ignore")throw new f("HLP_STATS_NOT_FINITE","Values must be finite numbers.");const i=[],s=[];for(let u=0;u<t.length;u++)r(u)&&(i.push(t[u]??0),s.push(n[u]??0));return[i,s]}const y=t=>Float64Array.from(t).sort();function F(t,n){const e=d(t,n);return e.length?p(e)/e.length:void 0}function q(t,n,e){const[r,o]=h(t,n,e);let i=0;const s=[];for(let u=0;u<r.length;u++){const m=o[u]??0;if(m<0)throw new f("HLP_STATS_WEIGHT","Weights must not be negative.");i+=m,s.push((r[u]??0)*m)}return i>0?p(s)/p(o):void 0}function W(t,n){return x(y(d(t,n)),.5,"linear")}function k(t,n){const e=d(t,n);if(!e.length)return;const r=new Map;let o=0;for(const s of e){const u=(r.get(s)??0)+1;r.set(s,u),u>o&&(o=u)}const i=[];for(const[s,u]of r)u===o&&i.push(s);return i.sort((s,u)=>s-u)}function g(t,n){const e=d(t,n);if(!e.length)return;let r=1/0,o=-1/0;for(const i of e)i<r&&(r=i),i>o&&(o=i);return[r,o]}function V(t,n){const e=g(t,n);return e?e[1]-e[0]:void 0}function P(t){let n=0,e=0,r=0;for(const o of t){n++;const i=o-e;e+=i/n,r+=i*(o-e)}return{n,mean:e,m2:r}}function A(t,n={}){const{n:e,m2:r}=P(d(t,n)),o=n.population?e:e-1;return o>0?r/o:void 0}function I(t,n={}){const e=A(t,n);return e===void 0?void 0:Math.sqrt(e)}function x(t,n,e){const r=t.length;if(!r)return;const o=(r-1)*n,i=Math.floor(o),s=Math.ceil(o),u=t[i]??0,m=t[s]??0;switch(e){case"lower":return u;case"higher":return m;case"midpoint":return(u+m)/2;case"nearest":{const a=o-i;return a<.5?u:a>.5?m:i%2===0?u:m}case"linear":return u+(m-u)*(o-i)}}function O(t,n){if(!(t>=0&&t<=n))throw new f("HLP_STATS_PERCENTILE","The percentile is out of range.")}function B(t,n,e={}){return O(n,100),x(y(d(t,e)),n/100,e.method??"linear")}function R(t,n,e={}){return O(n,1),x(y(d(t,e)),n,e.method??"linear")}function v(t,n,e={}){if(!Number.isInteger(n)||n<2||n>1e3)throw new f("HLP_STATS_QUANTILES","The group count must be an integer between 2 and 1000.");const r=y(d(t,e));if(!r.length)return;const o=[];for(let i=1;i<n;i++)o.push(x(r,i/n,e.method??"linear")??0);return o}function T(t,n={}){const e=v(t,4,n);return e?[e[0]??0,e[1]??0,e[2]??0]:void 0}function z(t,n={}){const e=T(t,n);return e?e[2]-e[0]:void 0}function G(t,n={}){const{k:e=1.5}=n,r=T(t,n);if(!r)return;const o=r[2]-r[0],i=r[0]-e*o,s=r[2]+e*o,u=[],m=[];return t.forEach((a,c)=>{Number.isFinite(a)&&(a<i||a>s)&&(u.push(a),m.push(c))}),{lowerFence:i,upperFence:s,outliers:u,indexes:m}}function U(t,n,e){return e===0||!Number.isFinite(e)?void 0:(t-n)/e}function j(t,n={}){const e=d(t,n),r=F(e),o=I(e,n);if(!(r===void 0||o===void 0||o===0))return e.map(i=>(i-r)/o)}function C(t,n){const e=d(t,n),r=g(e);if(!r)return;const[o,i]=r;return e.map(s=>i===o?0:(s-o)/(i-o))}const H=1e4;function D(t,n={}){const e=d(t,n),r=n.domain??g(e);if(!r)return[];const[o,i]=r;if(!Number.isFinite(o)||!Number.isFinite(i)||o>i)throw new f("HLP_STATS_DOMAIN","The domain must be a finite [min, max] pair.");let s=o,u,m;if(n.binWidth!==void 0){if(!(n.binWidth>0)||!Number.isFinite(n.binWidth))throw new f("HLP_STATS_BINS","The bin width must be a positive finite number.");u=n.binWidth,s=Math.floor(o/u)*u,m=Math.max(1,Math.floor((i-s)/u)+1)}else{if(m=n.bins??(i===o?1:Math.ceil(Math.log2(Math.max(e.length,1)))+1),!Number.isInteger(m)||m<1)throw new f("HLP_STATS_BINS","The bin count must be a positive integer.");u=i===o?1:(i-o)/m}if(m>H)throw new N("HLP_STATS_TOO_MANY_BINS","The bin count exceeds the limit.");const a=new Array(m).fill(0);for(const c of e){if(c<o||c>i)continue;const l=(c-s)/u,b=Number.isFinite(l)?Math.min(m-1,Math.floor(l)):c>s?m-1:0;a[b]=(a[b]??0)+1}return a.map((c,l)=>({x0:s+l*u,x1:l===m-1&&n.binWidth===void 0&&i!==o?i:s+(l+1)*u,count:c}))}function Q(t){const n=new Map;for(const e of t)n.set(e,(n.get(e)??0)+1);return n}function S(t,n){let e=0,r=0,o=0,i=0,s=0,u=0;for(let m=0;m<t.length;m++){const a=t[m]??0,c=n[m]??0;e++;const l=a-r;r+=l/e;const b=c-o;o+=b/e,i+=l*(c-o),s+=l*(a-r),u+=b*(c-o)}return{n:e,mx:r,my:o,cxy:i,m2x:s,m2y:u}}function X(t,n,e={}){const[r,o]=h(t,n,e),{n:i,cxy:s}=S(r,o),u=e.population?i:i-1;return u>0?s/u:void 0}function Y(t,n,e){const[r,o]=h(t,n,e),{n:i,cxy:s,m2x:u,m2y:m}=S(r,o);if(!(i<2||u===0||m===0))return Math.max(-1,Math.min(1,s/Math.sqrt(u*m)))}function J(t,n,e){const[r,o]=h(t,n,e),{n:i,mx:s,my:u,cxy:m,m2x:a,m2y:c}=S(r,o);if(i<2||a===0)return;const l=m/a,b=u-l*s,w=c===0?1:Math.min(1,m*m/(a*c));return Object.freeze({slope:l,intercept:b,r2:w,predict:_=>l*_+b})}function K(t,n,e){if(!Number.isInteger(n)||n<1)throw new f("HLP_STATS_WINDOW","The window must be a positive integer.");const r=d(t,e),o=[];let i=0,s=0;const u=m=>{const a=i+m;s+=Math.abs(i)>=Math.abs(m)?i-a+m:m-a+i,i=a};for(let m=0;m<r.length;m++)u(r[m]??0),m>=n&&u(-(r[m-n]??0)),m>=n-1&&o.push((i+s)/n);return o}function Z(t,n){const e=d(t,n),r=[];let o=0,i=0;for(const s of e){const u=o+s;i+=Math.abs(o)>=Math.abs(s)?o-u+s:s-u+o,o=u,r.push(o+i)}return r}function $(t,n){const e=d(t,n);if(!(!e.length||e.some(r=>r<0)))return e.includes(0)?0:Math.exp(p(e.map(Math.log))/e.length)}function ee(t,n){const e=d(t,n);if(!(!e.length||e.some(r=>r<0)))return e.includes(0)?0:e.length/p(e.map(r=>1/r))}function M(t){const n=t.length,e=p(t)/n;let r=0,o=0,i=0;for(const s of t){const u=s-e,m=u*u;r+=m,o+=m*u,i+=m*m}return{n,m2:r/n,m3:o/n,m4:i/n}}function ne(t,n={}){const e=d(t,n),{n:r,m2:o,m3:i}=M(e);if(r<(n.population?1:3)||o===0)return;const s=i/o**1.5;return n.population?s:Math.sqrt(r*(r-1))/(r-2)*s}function te(t,n={}){const e=d(t,n),{n:r,m2:o,m4:i}=M(e);if(r<(n.population?1:4)||o===0)return;const s=i/(o*o)-3;return n.population?s:(r-1)/((r-2)*(r-3))*((r+1)*s+6)}export{H as MAX_HISTOGRAM_BINS,Y as correlation,X as covariance,Z as cumulativeSum,g as extent,Q as frequencies,$ as geometricMean,ee as harmonicMean,D as histogram,z as iqr,te as kurtosis,J as linearRegression,F as mean,W as median,k as mode,K as movingAverage,C as normalize,G as outliers,B as percentile,R as quantile,v as quantiles,T as quartiles,V as rangeOf,ne as skewness,j as standardize,I as stdDev,A as variance,q as weightedMean,U as zScore};
@@ -1,4 +1,4 @@
1
- /*! AbsoluteUI @absoluteui/helpers v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/helpers v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  import{ValidationError as $}from"../error/index.js";import{hasOwn as D,isUnsafeKey as U}from"../internal/keys.js";import{cached as C,fold as A,foldWithMap as R,graphemeArray as m,iterGraphemes as j,localeKey as L,lower as x,stripDiacritics as v,upper as M}from"./internal.js";import{splitWords as K}from"./words.js";import{splitWords as ue}from"./words.js";const G=/['\u2019]/gu;function w(t){return K(t).map(n=>n.replace(G,""))}function S(t,n){const e=String.fromCodePoint(t.codePointAt(0)??0);return M(e,n)+x(t.slice(e.length),n)}function pt(t,n={}){return w(t).map((e,r)=>r===0?x(e,n.locale):S(e,n.locale)).join("")}function dt(t,n={}){return w(t).map(e=>S(e,n.locale)).join("")}function T(t,n,e){return w(t).map(r=>x(r,e)).join(n)}function ht(t,n={}){return T(t,"-",n.locale)}function mt(t,n={}){return T(t,"_",n.locale)}function xt(t,n={}){return T(t,".",n.locale)}function yt(t,n={}){return w(t).map(e=>M(e,n.locale)).join("_")}const bt=["a","an","and","as","at","but","by","for","from","in","into","nor","of","on","or","over","per","the","to","up","via","vs","with"];function Ot(t,n={}){const{locale:e}=n,r=new Set;if(n.minorWords)for(const i of n.minorWords)r.add(x(i,e));const o=w(t);return o.map((i,s)=>{const l=x(i,e);return s>0&&s<o.length-1&&r.has(l)?l:S(i,e)}).join(" ")}function At(t,n={}){return w(t).map((e,r)=>r===0?S(e,n.locale):x(e,n.locale)).join(" ")}function wt(t,n={}){if(t==="")return t;const e=String.fromCodePoint(t.codePointAt(0)??0),r=t.slice(e.length);return M(e,n.locale)+(n.lowerRest===!0?x(r,n.locale):r)}function Ct(t,n={}){if(t==="")return t;const e=String.fromCodePoint(t.codePointAt(0)??0);return x(e,n.locale)+t.slice(e.length)}function Lt(t){return v(t)}const B={\u00DF:"ss","\u1E9E":"SS",\u00E6:"ae",\u00C6:"AE",\u0153:"oe",\u0152:"OE",\u00FE:"th",\u00DE:"TH",\u00F0:"d",\u00D0:"D",\u0131:"i"},V=/[\p{L}\p{N}]/u,X=/\p{M}/u;function Mt(t,n={}){const{separator:e="-",lowercase:r=!0,ascii:o=!1,maxLength:i,locale:s}=n;let l=r?x(t,s):t;l=Array.from(v(l,"NFKD"),u=>B[u]??u).join(""),r&&(l=x(l,s));let a=[],c=!1,f=!1;for(const u of l){if(u==="'"||u==="\u2019")continue;(V.test(u)||f&&X.test(u))&&(!o||u.charCodeAt(0)<128)?(c&&a.length&&a.push(e),c=!1,a.push(u),f=!0):(c=!0,f=!1)}if(i!==void 0&&i>=0){const u=Array.from(a.join(""));if(u.length>i){let g=u.slice(0,i).join("");const p=e?g.lastIndexOf(e):-1;for(!(e!==""&&u.slice(i).join("").startsWith(e))&&p>g.length/2&&(g=g.slice(0,p));e!==""&&g.endsWith(e);)g=g.slice(0,-e.length);a=[g]}}return a.join("")}function St(t){return m(t)}function z(t){let n=0;for(const e=j(t);e.next().done!==!0;)n++;return n}function It(t){return m(t).reverse().join("")}function W(t,n={}){const e=n.unit??"grapheme";if(e==="codeUnit")return t.length;if(e==="codePoint"){let r=0;for(const o=t[Symbol.iterator]();o.next().done!==!0;)r++;return r}return z(t)}const k=t=>/^\s+$/u.test(t),J=new Set([",",";",":","-","\u2013","\u2014"]);function Tt(t,n,e={}){const{omission:r="\u2026",wordBoundary:o=!1}=e,i=Math.max(0,Math.floor(n)),s=m(t,i+1);if(s.length<=i)return t;const l=m(r);if(l.length>=i)return l.slice(0,i).join("");let a=s.slice(0,i-l.length);if(o&&!k(s[a.length]??" ")){let c=a.length-1;for(;c>=0&&!k(a[c]??"");)c--;c>0&&(a=a.slice(0,c))}for(;a.length&&(k(a[a.length-1]??"")||J.has(a[a.length-1]??""));)a.pop();return a.join("")+r}function kt(t,n,e={}){const r=e.omission??"\u2026",o=Math.max(0,Math.floor(n)),i=m(t);if(i.length<=o)return t;const s=m(r);if(s.length>=o)return s.slice(0,o).join("");const l=o-s.length,a=Math.ceil(l/2),c=l-a;return i.slice(0,a).join("")+r+(c>0?i.slice(i.length-c).join(""):"")}function Rt(t,n,e=" "){const r=z(t),o=m(e);if(r>=n||o.length===0)return t;const i=a=>Array.from({length:a},(c,f)=>o[f%o.length]??" ").join(""),s=n-r,l=Math.floor(s/2);return i(l)+t+i(s-l)}function I(t,n={}){const{visibleStart:e=0,visibleEnd:r=0,maskChar:o="\u2022",preserve:i=""}=n,s=m(t),l=new Set(m(i)),a=[];s.forEach((g,p)=>{l.has(g)||a.push(p)});const c=Math.max(0,Math.floor(e)),f=Math.max(0,Math.floor(r)),u=new Set;if(c+f<a.length){for(let g=0;g<c;g++)u.add(a[g]??-1);for(let g=a.length-f;g<a.length;g++)u.add(a[g]??-1)}return s.map((g,p)=>l.has(g)||u.has(p)?g:o).join("")}function jt(t,n={}){const{maskChar:e="\u2022",visible:r=1,maskDomain:o=!1}=n,i=t.lastIndexOf("@");if(i<=0)return I(t,{maskChar:e});const s=I(t.slice(0,i),{visibleStart:r,maskChar:e});let l=t.slice(i+1);if(o){const a=l.lastIndexOf(".");l=a>0?I(l.slice(0,a),{visibleStart:1,maskChar:e})+l.slice(a):I(l,{visibleStart:1,maskChar:e})}return`${s}@${l}`}function vt(t){return t.replace(/\r\n?|[\u2028\u2029]/gu,`
3
3
  `).replace(/[\u200b\ufeff]/gu,"").replace(/[^\S\n]/gu," ")}function zt(t){return t.trim().replace(/\s+/gu," ")}function Wt(t,n={}){const e=n.keepWhitespace??!0,r=n.stripBidi??!0;let o="";for(const i of t){const s=i.charCodeAt(0);(s<32||s>=127&&s<=159)&&!(e&&(s===9||s===10||s===13))||r&&(s>=8234&&s<=8238||s>=8294&&s<=8297)||(o+=i)}return o}function Q(t){return t.split(/\r\n|[\n\r\u2028\u2029]/u)}function Et(t,n=2,e={}){const r=typeof n=="number"?" ".repeat(Math.max(0,Math.floor(n))):n;return t.split(`
4
4
  `).map(o=>o.trim()===""&&e.indentEmpty!==!0?o:r+o).join(`
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/helpers v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/helpers v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  const E=32;function R(e,t,n){let r=e.get(t);return r===void 0&&(e.size>=32&&e.clear(),r=n(),e.set(t,r)),r}function S(e){return e===void 0?"":typeof e=="string"?e:e instanceof Intl.Locale?e.toString():e.map(t=>typeof t=="string"?t:t.toString()).join(",")}const a=(e,t)=>t===void 0?e.toLowerCase():e.toLocaleLowerCase(t),T=(e,t)=>t===void 0?e.toUpperCase():e.toLocaleUpperCase(t);let l;const x=typeof Intl.Segmenter=="function",p=/[\p{Grapheme_Extend}\p{Mc}]/u,h=new Set([2381,2509,2765,2893,3149,3405]),m=/\p{L}/u,g=e=>e>=127462&&e<=127487,b=e=>e>=127995&&e<=127999||e>=917536&&e<=917631||e>=65024&&e<=65039||e===8205;function*y(e){let t="",n=-1,r=0;for(const u of e){const o=u.codePointAt(0)??0;!(t!==""&&(n===13&&o===10||p.test(u)||b(o)||n===8205||h.has(n)&&m.test(u)||g(o)&&g(n)&&r%2===1))&&t!==""&&(yield t,t="",r=0),t+=u,r=g(o)?r+1:0,n=o}t!==""&&(yield t)}function*A(e){if(!x){yield*y(e);return}l??=new Intl.Segmenter(void 0,{granularity:"grapheme"});for(const t of l.segment(e))yield t.segment}function _(e,t=1/0){const n=[];if(t<=0)return n;for(const r of A(e))if(n.push(r),n.length>=t)break;return n}const I=/[\u0300-\u036f\u1ab0-\u1aff\u1dc0-\u1dff\u20d0-\u20ff\ufe20-\ufe2f]/gu,L={\u00F8:"o",\u00D8:"O",\u0142:"l",\u0141:"L",\u0111:"d",\u0110:"D",\u0127:"h",\u0126:"H",\u0167:"t",\u0166:"T",\u0180:"b",\u0268:"i",\u0289:"u"},C=/[\u00f8\u00d8\u0142\u0141\u0111\u0110\u0127\u0126\u0167\u0166\u0180\u0268\u0289]/gu;function c(e,t="NFD"){return e.normalize(t).replace(I,"").normalize("NFC").replace(C,n=>L[n]??n)}function F(e,t,n){let r="";const u=[],o=[];let i=0;for(const f of e){let s=a(f,t);n&&(s=c(s)),s===""&&o.length&&(o[o.length-1]=i+f.length);for(let d=s.length;d>0;d--)u.push(i),o.push(i+f.length);r+=s,i+=f.length}return{text:r,starts:u,ends:o}}function M(e,t,n){const r=a(e,t);return n?c(r):r}export{I as DIACRITICS_RE,L as STROKE_MAP,C as STROKE_RE,R as cached,M as fold,F as foldWithMap,_ as graphemeArray,y as graphemesFallback,A as iterGraphemes,S as localeKey,a as lower,c as stripDiacritics,T as upper};
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/helpers v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/helpers v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  const d=/[\p{Lu}\p{Lt}]/u,c=/\p{Ll}/u,g=/\p{L}/u,D=/\p{N}/u,U=/\p{M}/u;var k=(t=>(t[t.Upper=0]="Upper",t[t.Lower=1]="Lower",t[t.Other=2]="Other",t[t.Digit=3]="Digit",t[t.Mark=4]="Mark",t[t.Apostrophe=5]="Apostrophe",t[t.Sep=6]="Sep",t))(k||{});function E(n){return d.test(n)?0:c.test(n)?1:g.test(n)?2:D.test(n)?3:U.test(n)?4:n==="'"||n==="\u2019"?5:6}function R(n,K={}){const h=K.splitDigits===!0,f=[];let e=[];const o=()=>{e.length&&f.push(e.map(t=>t.text).join("")),e=[]},p=Array.from(n);for(let t=0;t<p.length;t++){const u=p[t]??"",i=E(u);if(i===6){o();continue}const s=e[e.length-1];if(i===4){s&&(s.text+=u);continue}if(i===5){const r=p[t+1];s&&s.k!==3&&r!==void 0&&g.test(r)?s.text+=u:o();continue}if(s){const r=s.k,L=i===0||i===1||i===2,a=r===0||r===1||r===2;if(i===0&&(r===1||r===2||r===3&&c.test(p[t+1]??"")))o();else if(i===1&&r===0&&e.length>=2&&e[e.length-2]?.k===0){const l=e.pop();o(),l&&e.push(l)}else h&&(i===3&&a||L&&r===3)&&o()}e.push({text:u,k:i})}return o(),f}export{R as splitWords};
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/helpers v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/helpers v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  import{ValidationError as h}from"../error/index.js";import{formatPlainDateTime as y,plainDate as l,toEpochDay as A}from"../date/index.js";import{dateTimeFormat as f}from"../date/intl-cache.js";import{parseOffsetText as T}from"../date/plain-time.js";import{instantToZoned as u,isValidTimeZone as b,offsetAtMs as c,resolveTimeZone as s,toEpochMs as m,zonedToInstant as Z}from"../date/zone.js";import{getLocalTimeZone as j,isValidTimeZone as v,offsetAt as w,instantToZoned as B,getPossibleInstants as H,getWallTimeStatus as V,zonedToInstant as $,nextTransition as J,previousTransition as R}from"../date/zone.js";function O(n){if(!Number.isFinite(n))throw new h("HLP_TZ_INVALID_OFFSET","Offset must be a finite number.");const a=Math.round(n/1e3),e=Math.abs(a),t=Math.floor(e/3600),o=Math.floor(e%3600/60),r=e%60,i=g=>String(g).padStart(2,"0");return`${a<0?"-":"+"}${i(t)}:${i(o)}${r?`:${i(r)}`:""}`}function C(n){return T(n)}function D(n,a,e,t={}){return u(Z(n,a,t),e)}const d=Object.freeze(["UTC","Africa/Cairo","Africa/Johannesburg","Africa/Lagos","Africa/Nairobi","America/Anchorage","America/Bogota","America/Chicago","America/Denver","America/Halifax","America/Los_Angeles","America/Mexico_City","America/New_York","America/Phoenix","America/Santiago","America/Sao_Paulo","America/St_Johns","America/Toronto","Asia/Bangkok","Asia/Dhaka","Asia/Dubai","Asia/Hong_Kong","Asia/Jakarta","Asia/Jerusalem","Asia/Karachi","Asia/Kathmandu","Asia/Kolkata","Asia/Riyadh","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Tehran","Asia/Tokyo","Atlantic/Reykjavik","Australia/Adelaide","Australia/Brisbane","Australia/Lord_Howe","Australia/Perth","Australia/Sydney","Europe/Amsterdam","Europe/Berlin","Europe/Istanbul","Europe/London","Europe/Madrid","Europe/Moscow","Europe/Paris","Pacific/Auckland","Pacific/Chatham","Pacific/Honolulu"]),p=Object.freeze({"Africa/Asmera":"Africa/Asmara","America/Buenos_Aires":"America/Argentina/Buenos_Aires","America/Catamarca":"America/Argentina/Catamarca","America/Coral_Harbour":"America/Atikokan","America/Cordoba":"America/Argentina/Cordoba","America/Godthab":"America/Nuuk","America/Indianapolis":"America/Indiana/Indianapolis","America/Jujuy":"America/Argentina/Jujuy","America/Louisville":"America/Kentucky/Louisville","America/Mendoza":"America/Argentina/Mendoza","Asia/Calcutta":"Asia/Kolkata","Asia/Katmandu":"Asia/Kathmandu","Asia/Rangoon":"Asia/Yangon","Asia/Saigon":"Asia/Ho_Chi_Minh","Atlantic/Faeroe":"Atlantic/Faroe","Europe/Kiev":"Europe/Kyiv","Pacific/Enderbury":"Pacific/Kanton","Pacific/Ponape":"Pacific/Pohnpei","Pacific/Truk":"Pacific/Chuuk"});function N(n={}){const a=Intl;let e;try{e=typeof a.supportedValuesOf=="function"?a.supportedValuesOf("timeZone"):[...d]}catch{e=[...d]}return(n.modernNames??!0)&&(e=e.map(t=>{const o=Object.prototype.hasOwnProperty.call(p,t)?p[t]:void 0;return o!==void 0&&b(o)?o:t})),e.push("UTC"),[...new Set(e)].sort()}function k(n,a={}){const e=s(n),t=a.at===void 0?Date.now():m(a.at);return f(a.locale,{timeZone:e,timeZoneName:a.style??"long"}).formatToParts(t).find(r=>r.type==="timeZoneName")?.value??e}function I(n,a){const e=s(a),t=c(A(l(n,1,1))*864e5,e),o=c(A(l(n,7,1))*864e5,e);return Math.min(t,o)}function M(n,a){const e=m(n),t=s(a),o=u(e,t).date.year;return c(e,t)>I(o,t)}function K(n,a={}){const e=m(n),t=s(a.timeZone),{locale:o}=a,r=Object.keys(a).some(i=>i!=="locale"&&i!=="timeZone"&&i!=="calendar"&&i!=="numberingSystem"&&i!=="hour12"&&i!=="hourCycle");return f(o,{...a,...r?{}:{dateStyle:"medium",timeStyle:"short"},timeZone:t}).format(e)}function z(n,a){const e=m(n),t=s(a);return`${y(u(e,t))}${O(c(e,t))}`}export{D as convertWallTime,K as formatInZone,O as formatOffset,z as formatZonedIso,j as getLocalTimeZone,H as getPossibleInstants,V as getWallTimeStatus,B as instantToZoned,M as isDstAt,v as isValidTimeZone,N as listTimeZones,J as nextTransition,w as offsetAt,C as parseOffset,R as previousTransition,I as standardOffset,k as timeZoneName,$ as zonedToInstant};
package/dist/url/index.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/helpers v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/helpers v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  import{LimitError as A,ValidationError as E}from"../error/index.js";import{hasOwn as T,isUnsafeKey as $}from"../internal/keys.js";const L=encodeURIComponent,H=32;function I(e){if(e instanceof Date){if(Number.isNaN(e.getTime()))throw new E("HLP_URL_INVALID_DATE","A query value is an invalid date.");return e.toISOString()}return String(e)}const W=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof Date);function z(e,n={}){const{arrayFormat:t="repeat",skipNull:r=!1,sort:i=!1}=n,o=[],s=(d,g,c)=>{if(c>H)throw new A("HLP_URL_TOO_DEEP","Query nesting exceeds the limit.");const f=Object.keys(d);i&&f.sort();for(const x of f){if($(x))throw new E("HLP_UNSAFE_KEY","Refusing to use an unsafe object key.");const h=d[x],a=g===""?L(x):`${g}%5B${L(x)}%5D`;if(h!==void 0){if(h===null){r||o.push(`${a}=`);continue}if(Array.isArray(h)){const y=h.filter(u=>u!==void 0&&!(r&&u===null));if(t==="comma")y.length&&o.push(`${a}=${y.map(u=>u===null?"":L(I(u))).join(",")}`);else{const u=t==="brackets"?`${a}%5B%5D`:a;for(const p of y)o.push(`${u}=${p===null?"":L(I(p))}`)}continue}if(W(h)){s(h,a,c+1);continue}o.push(`${a}=${L(I(h))}`)}}};s(e,"",0);const l=o.join("&");return n.prefix===!0&&l?`?${l}`:l}function w(e){const n=e.includes("+")?e.replaceAll("+"," "):e;if(!n.includes("%"))return n;try{return decodeURIComponent(n)}catch{return n}}function V(e){const n=e.indexOf("[");if(n<=0||!e.endsWith("]"))return[e];const t=[e.slice(0,n)];let r=n;for(;r<e.length;){if(e.charCodeAt(r)!==91)return[e];const i=e.indexOf("]",r+1);if(i<0)return[e];const o=e.slice(r+1,i);if(o.includes("["))return[e];t.push(o),r=i+1}return t}const D=()=>Object.create(null);function G(e,n={}){const{arrayFormat:t="repeat",maxParams:r=1e3,maxDepth:i=5,maxLength:o=65536}=n;if(e.length>o)throw new A("HLP_URL_QUERY_TOO_LONG","The query string exceeds the length limit.");const s=D();let l=e.startsWith("?")?e.slice(1):e;const d=l.indexOf("#");if(d>=0&&(l=l.slice(0,d)),l==="")return s;let g=0;for(const c of l.split("&")){if(c==="")continue;if(++g>r)throw new A("HLP_URL_TOO_MANY_PARAMS","The query string has too many parameters.");const f=c.indexOf("="),x=w(f<0?c:c.slice(0,f)),h=f<0?"":w(c.slice(f+1));if(x==="")continue;const a=V(x);if(a.length-1>i)throw new A("HLP_URL_TOO_DEEP","Query nesting exceeds the limit.");if(a.some($)||a.slice(1,-1).includes(""))continue;const y=a.length>1&&a[a.length-1]==="",u=y?a.slice(0,-1):a,p=t==="comma"&&f>=0?c.slice(f+1).split(",").map(w):[h];let m=s,U=!0;for(let _=0;_<u.length-1;_++){const S=u[_]??"",R=T(m,S)?m[S]:void 0;if(R===void 0){const v=D();m[S]=v,m=v}else if(typeof R=="object"&&!Array.isArray(R))m=R;else{U=!1;break}}if(!U)continue;const b=u[u.length-1]??"",Q=T(m,b)?m[b]:void 0,F=y||p.length>1;Q===void 0?m[b]=F?p:p[0]??"":typeof Q=="string"?m[b]=[Q,...p]:Array.isArray(Q)&&Q.push(...p)}return s}function B(e){const n=e.search(/[?#]/);return n<0?[e,""]:[e.slice(0,n),e.slice(n)]}function K(e){const n=/^(?:[a-z][\d+.a-z-]*:)?\/\/[^/]*/i.exec(e);if(n)return[n[0],e.slice(n[0].length)];const t=/^[a-z][\d+.a-z-]*:/i.exec(e);return t?[t[0],e.slice(t[0].length)]:["",e]}function X(e,...n){const t=n[n.length-1],r=typeof t=="object"?t:{},i=n.filter(u=>typeof u!="object"),[o,s]=B(e),[l,d]=K(o),g=r.confine===!0,c=d.split("/").filter(u=>u!==""),f=[];let x=d.endsWith("/");for(const u of i){let p=String(u);g&&(p=p.replaceAll("\\","/"));const m=p.split("/");for(const U of m)if(U!==""){if(g){const b=U.toLowerCase().replaceAll("%2e",".");if(b===".")continue;if(b===".."){if(f.length===0)throw new E("HLP_URL_PATH_TRAVERSAL","The path escapes the base URL.");f.pop();continue}}f.push(U)}p!==""&&(x=p.endsWith("/"))}const h=[...c,...f].join("/"),a=l!==""||d.startsWith("/")?"/":"";let y=l+(h===""?a&&l===""?"/":"":a+h);return x&&y!==""&&!y.endsWith("/")&&(y+="/"),y+s}function Z(e){const n=String(e);return n==="."||n===".."?n.replaceAll(".","%2E"):encodeURIComponent(n)}function j(e){const n=e.indexOf("#"),t=n<0?"":e.slice(n),r=n<0?e:e.slice(0,n),i=r.indexOf("?");return i<0?{head:r,query:"",hash:t}:{head:r.slice(0,i),query:r.slice(i+1),hash:t}}function k(e){const n=e.indexOf("=");return w(n<0?e:e.slice(0,n))}const q=(e,n)=>e===n||e.startsWith(`${n}[`);function ee(e,n,t={}){const{head:r,query:i,hash:o}=j(e),s=Object.keys(n),l=i.split("&").filter(c=>c!==""&&!s.some(f=>q(k(c),f))),d=z(n,{...t,prefix:!1}),g=[...l,...d?[d]:[]].join("&");return r+(g?`?${g}`:"")+o}function ne(e,n){const{head:t,query:r,hash:i}=j(e);if(n===void 0)return t+i;const o=r.split("&").filter(s=>s!==""&&!n.some(l=>q(k(s),l)));return t+(o.length?`?${o.join("&")}`:"")+i}function te(e,n){const{query:t}=j(e);for(const r of t.split("&")){if(r==="")continue;const i=r.indexOf("=");if(w(i<0?r:r.slice(0,i))===n)return i<0?"":w(r.slice(i+1))}}const C=/[\u0000-\u001f\u007f-\u009f\u2028\u2029\ufeff]/,N=/^([a-z][\d+.a-z-]*):/i,P="https://probe.invalid/";function re(e,n={}){const{allowedSchemes:t=["http","https","mailto","tel"],allowRelative:r=!0,maxLength:i=8192}=n;if(e.length>i||C.test(e))return!1;const o=e.trim();if(o==="")return!1;const s=t.map(c=>c.toLowerCase()),l=N.exec(o);let d;try{d=new URL(o,P)}catch{return!1}const g=d.protocol.slice(0,-1).toLowerCase();return l?s.includes((l[1]??"").toLowerCase())&&s.includes(g):r?s.includes(g):!1}function ie(e){return N.test(e.trim())}function O(e,n){try{return n===void 0?new URL(e):new URL(e,n)}catch{return}}function oe(e,n){const t=O(e),r=O(n);return!t||!r||t.origin==="null"||r.origin==="null"?!1:t.origin===r.origin}function se(e,n={}){const t=n.fallback??"/";if(typeof e!="string"||e.length>8192||C.test(e))return t;const r=e.trim();if(r===""||r.includes("\\"))return t;if(r.startsWith("/"))return r.startsWith("//")||O(r,P)?.origin!==new URL(P).origin?t:r;const i=O(r);return!i||i.protocol!=="https:"&&i.protocol!=="http:"||i.username!==""||i.password!==""?t:(n.allowedOrigins??[]).map(s=>O(s)?.origin).filter(s=>s!==void 0&&s!=="null").includes(i.origin)?i.href:t}function le(e,n={}){const t=O(e.trim());if(!t)return;if(n.removeFragment===!0&&(t.hash=""),n.removeTrailingSlash===!0){let i=t.pathname;for(;i.length>1&&i.endsWith("/");)i=i.slice(0,-1);t.pathname=i}let r=t.search.slice(1);return n.sortQuery===!0&&r&&(r=r.split("&").filter(o=>o!=="").map((o,s)=>({p:o,i:s,k:k(o)})).sort((o,s)=>o.k<s.k?-1:o.k>s.k?1:o.i-s.i).map(o=>o.p).join("&")),t.search=r?`?${r}`:"",t.href}function ae(e){const n=O(e.trim());return n&&n.hostname!==""?n.hostname:void 0}function M(e){const n=O(e.trim(),P);if(!n)return;const t=n.pathname.slice(n.pathname.lastIndexOf("/")+1);if(t!=="")try{return decodeURIComponent(t)}catch{return t}}function ue(e){const n=M(e.replaceAll("\\","/"));if(n===void 0)return;const t=n.lastIndexOf(".");if(!(t<=0||t===n.length-1))return n.slice(t+1).toLowerCase()}export{z as buildQuery,Z as encodePathSegment,ae as getDomain,ue as getExtension,M as getFileNameFromUrl,te as getQueryParam,ie as isAbsoluteUrl,re as isSafeUrl,oe as isSameOrigin,X as joinUrl,le as normalizeUrl,G as parseQuery,O as parseUrl,ne as removeQuery,se as safeRedirectTarget,ee as withQuery};
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/helpers v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/helpers v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  import{string as r,number as o,boolean as a,date as l,literal as t,enumOf as i,array as b,object as f,optional as m,nullable as u,union as p,refine as s,transform as c}from"./schema.js";export{b as array,a as boolean,l as date,i as enumOf,t as literal,u as nullable,o as number,f as object,m as optional,s as refine,r as string,c as transform,p as union};
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/helpers v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/helpers v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  import{ValidationError as Z}from"../error/index.js";const f=(e,n)=>typeof e=="string"&&e.length>0&&e.length<=n,E=e=>e>=48&&e<=57,k=e=>e>=65&&e<=90||e>=97&&e<=122,I=(e,n)=>{for(let t=0;t<e.length;t++)if(n(e.charCodeAt(t)))return!0;return!1},G="!#$%&'*+/=?^_`{|}~-",V=new TextEncoder;function _(e,n){return k(e)||E(e)?!0:e<128?G.includes(String.fromCharCode(e)):n&&e>159&&e!==160&&e!==173&&!(e>=8192&&e<=8303)&&e!==65279&&e!==12288}function j(e,n,t){let s=e;if(n&&I(e,o=>o>126)){try{s=new URL(`http://${e}/`).hostname}catch{return!1}if(s.startsWith("["))return!1}if(s.length>253||s.length===0)return!1;const r=s.split(".");if(t&&r.length<2)return!1;for(const o of r){if(o.length===0||o.length>63||o.startsWith("-")||o.endsWith("-"))return!1;for(let u=0;u<o.length;u++){const a=o.charCodeAt(u);if(!k(a)&&!E(a)&&a!==45)return!1}}const i=r[r.length-1]??"";return!(t&&/^\d+$/.test(i))}function te(e,n={}){const{allowIdn:t=!1,requireTld:s=!0}=n;if(!f(e,254))return!1;const r=e.lastIndexOf("@");if(r<1||r===e.length-1)return!1;const i=e.slice(0,r),o=e.slice(r+1);if(V.encode(i).length>64||i.startsWith(".")||i.endsWith(".")||i.includes(".."))return!1;for(let u=0;u<i.length;u++){const a=i.charCodeAt(u);if(a!==46&&!_(a,t))return!1}return j(o,t,s)}function K(e,n={}){const{schemes:t=["http","https"],requireHost:s=!0,allowCredentials:r=!1,maxLength:i=2048}=n;if(!f(e,i)||I(e,a=>a<=32||a===127)||/\s/.test(e))return!1;let o;try{o=new URL(e)}catch{return!1}const u=o.protocol.slice(0,-1).toLowerCase();return!(!t.some(a=>a.toLowerCase()===u)||s&&o.hostname===""||!r&&(o.username!==""||o.password!==""))}function re(e){return K(e)}function se(e){return f(e,16)&&/^\+[1-9]\d{6,14}$/.test(e)}function oe(e){if(!f(e,32)||!/^\+?[\d\s().-]+$/.test(e))return!1;const n=e.replace(/\D/g,"").length;return n>=7&&n<=15}const O={AD:24,AE:23,AL:28,AT:20,AZ:28,BA:20,BE:16,BG:22,BH:22,BI:27,BR:29,BY:28,CH:21,CR:22,CY:28,CZ:24,DE:22,DJ:27,DK:18,DO:28,EE:20,EG:29,ES:24,FI:18,FK:18,FO:18,FR:27,GB:22,GE:22,GI:23,GL:18,GR:27,GT:28,HR:21,HU:28,IE:22,IL:23,IQ:23,IS:26,IT:27,JO:30,KW:30,KZ:20,LB:28,LC:32,LI:21,LT:20,LU:20,LV:21,LY:25,MC:27,MD:24,ME:22,MK:19,MN:20,MR:27,MT:31,MU:30,NI:28,NL:18,NO:15,OM:23,PK:24,PL:28,PS:29,PT:25,QA:29,RO:24,RS:22,RU:33,SA:24,SC:31,SD:18,SE:24,SI:19,SK:24,SM:27,SO:23,ST:25,SV:28,TL:23,TN:24,TR:26,UA:29,VA:22,VG:24,XK:20,YE:30},ie=Object.freeze(Object.keys(O));function J(e){let n=0;for(let t=0;t<e.length;t++){const s=e.charCodeAt(t),r=s>=65?s-55:s-48;n=r>9?(n*100+r)%97:(n*10+r)%97}return n}function ue(e){if(!f(e,50))return!1;const n=e.replaceAll(" ","").toUpperCase();if(!/^[A-Z]{2}\d{2}[A-Z\d]{11,30}$/.test(n))return!1;const t=O[n.slice(0,2)];return t===void 0||t!==n.length?!1:J(n.slice(4)+n.slice(0,4))===1}function ae(e){return f(e,11)&&/^[A-Z]{6}[A-Z\d]{2}(?:[A-Z\d]{3})?$/i.test(e)}function F(e){if(e.length===0||e.length>64)return!1;let n=0,t=!1;for(let s=e.length-1;s>=0;s--){let r=e.charCodeAt(s)-48;if(r<0||r>9)return!1;t&&(r*=2,r>9&&(r-=9)),n+=r,t=!t}return n%10===0}const R=e=>{if(!(!f(e,30)||!/^\d[\d -]*$/.test(e)))return e.replace(/[ -]/g,"")};function fe(e){const n=R(e);return n!==void 0&&n.length>=12&&n.length<=19&&F(n)}const p=(e,n,t,s)=>{if(e.length<n)return!1;const r=Number(e.slice(0,n));return r>=t&&r<=s};function le(e){const n=R(e);if(n===void 0)return;const t=n.length;if(p(n,2,34,34)||p(n,2,37,37))return t===15?"amex":void 0;if(n.startsWith("4"))return t===13||t===16||t===19?"visa":void 0;if(p(n,2,51,55)||p(n,4,2221,2720))return t===16?"mastercard":void 0;if(p(n,3,300,305)||p(n,2,36,36)||p(n,2,38,39))return t>=14&&t<=19?"diners":void 0;if(p(n,4,3528,3589))return t>=16&&t<=19?"jcb":void 0;if(n.startsWith("6011")||p(n,3,644,649)||n.startsWith("65")||p(n,6,622126,622925))return t>=16&&t<=19?"discover":void 0;if(n.startsWith("62")||n.startsWith("81"))return t>=16&&t<=19?"unionpay":void 0;if(["5018","5020","5038","5893","6304","6759","6761","6762","6763"].some(s=>n.startsWith(s))||p(n,2,56,58)||n.startsWith("50")||n.startsWith("6"))return t>=12&&t<=19?"maestro":void 0}const Y=/^[\da-f]{8}-[\da-f]{4}-([1-8])[\da-f]{3}-[89ab][\da-f]{3}-[\da-f]{12}$/i;function de(e,n){if(!f(e,36)||e.length!==36)return!1;if(n===void 0&&(e==="00000000-0000-0000-0000-000000000000"||e.toLowerCase()==="ffffffff-ffff-ffff-ffff-ffffffffffff"))return!0;const t=Y.exec(e);return t!==null&&(n===void 0||Number(t[1])===n)}function ce(e){return f(e,26)&&/^[0-7][\dA-HJKMNP-TV-Z]{25}$/i.test(e)}function P(e){if(!f(e,15))return!1;const n=e.split(".");return n.length!==4?!1:n.every(t=>/^(?:0|[1-9]\d{0,2})$/.test(t)&&Number(t)<=255)}function X(e){if(!f(e,45))return!1;const n=e.split("::");if(n.length>2)return!1;const t=i=>{if(i==="")return 0;const o=i.split(":");let u=0;for(let a=0;a<o.length;a++){const c=o[a]??"";if(a===o.length-1&&c.includes(".")){if(!P(c))return;u+=2}else if(/^[\da-f]{1,4}$/i.test(c))u+=1;else return}return u},s=t(n[0]??"");if(s===void 0)return!1;if(n.length===1)return s===8;const r=t(n[1]??"");return r===void 0||(n[0]??"").includes(".")?!1:s+r<=7}function pe(e,n){if(!f(e,49))return!1;const t=e.lastIndexOf("/");if(t<0)return!1;const s=e.slice(0,t),r=e.slice(t+1);if(!/^(?:0|[1-9]\d{0,2})$/.test(r))return!1;const i=Number(r);return n!==6&&P(s)?i<=32:n!==4&&X(s)?i<=128:!1}function ge(e){return f(e,17)?/^[\da-f]{2}(?::[\da-f]{2}){5}$/i.test(e)||/^[\da-f]{2}(?:-[\da-f]{2}){5}$/i.test(e)||/^[\da-f]{4}(?:\.[\da-f]{4}){2}$/i.test(e):!1}function he(e,n={}){const{alpha:t=!0,requireHash:s=!0}=n;if(!f(e,9))return!1;const r=e.startsWith("#")?e.slice(1):s?"":e;return/^[\da-f]+$/i.test(r)?r.length===3||r.length===6||t&&(r.length===4||r.length===8):!1}function me(e){return f(e,200)&&/^[a-z\d]+(?:-[a-z\d]+)*$/.test(e)}const T=new Set(["password","passw0rd","p@ssw0rd","p@ssword","123456","12345678","123456789","1234567890","qwerty","qwertyuiop","abc123","letmein","welcome","admin","administrator","iloveyou","monkey","dragon","football","baseball","sunshine","princess","master","login","trustno1","changeme","secret","qazwsx","111111","000000","default","root","test","guest","summer","winter","spring","autumn"]);function be(e,n={}){const{minLength:t=12,maxLength:s=128,requireLowercase:r=!0,requireUppercase:i=!0,requireDigit:o=!0,requireSymbol:u=!0,minClasses:a=0,allowSpaces:c=!1,rejectCommon:g=!0}=n,l=[],h=typeof e=="string"?e:"";let d=0;for(let b=0;b<h.length&&d<=s;b++){const x=h.charCodeAt(b);(x<56320||x>57343)&&d++}d<t&&l.push("too-short"),d>s&&l.push("too-long");const m=d>s?h.slice(0,s*2):h,$=/\p{Ll}/u.test(m),C=/\p{Lu}/u.test(m),S=/\p{Nd}/u.test(m),L=/[^\p{L}\p{Nd}\s]/u.test(m);if(r&&!$&&l.push("missing-lowercase"),i&&!C&&l.push("missing-uppercase"),o&&!S&&l.push("missing-digit"),u&&!L&&l.push("missing-symbol"),[$,C,S,L].filter(Boolean).length<a&&l.push("too-few-classes"),!c&&/\s/.test(m)&&l.push("contains-space"),g&&m.length<=256){const b=m.toLowerCase(),x=b.replace(/^[\d\W_]{1,8}/,"").replace(/[\d\W_]{1,8}$/,""),N=new Set((n.extraCommon??[]).map(M=>M.toLowerCase()));(T.has(b)||T.has(x)||N.has(b)||N.has(x))&&l.push("common")}return{valid:l.length===0,failures:l}}const y={US:/^\d{5}(?:-\d{4})?$/,CA:/^[ABCEGHJ-NPRSTVXY]\d[ABCEGHJ-NPRSTV-Z] ?\d[ABCEGHJ-NPRSTV-Z]\d$/i,GB:/^(?:GIR ?0AA|[A-PR-UWYZ](?:\d[\dA-HJKPSTUW]?|[A-HK-Y]\d[\dABEHMNPRV-Y]?) ?\d[ABD-HJLNP-UW-Z]{2})$/i,IE:/^(?:[AC-FHKNPRTV-Y]\d{2}|D6W) ?[\dAC-FHKNPRTV-Y]{4}$/i,IN:/^[1-9]\d{2} ?\d{3}$/,DE:/^\d{5}$/,FR:/^\d{5}$/,IT:/^\d{5}$/,ES:/^(?:0[1-9]|[1-4]\d|5[0-2])\d{3}$/,NL:/^[1-9]\d{3} ?(?!SA|SD|SS)[A-Z]{2}$/i,BE:/^[1-9]\d{3}$/,CH:/^[1-9]\d{3}$/,AT:/^[1-9]\d{3}$/,DK:/^\d{4}$/,NO:/^\d{4}$/,SE:/^[1-9]\d{2} ?\d{2}$/,FI:/^\d{5}$/,PL:/^\d{2}-\d{3}$/,PT:/^\d{4}-\d{3}$/,CZ:/^\d{3} ?\d{2}$/,AU:/^\d{4}$/,NZ:/^\d{4}$/,JP:/^\d{3}-?\d{4}$/,CN:/^\d{6}$/,SG:/^\d{6}$/,KR:/^\d{5}$/,BR:/^\d{5}-?\d{3}$/,MX:/^\d{5}$/,ZA:/^\d{4}$/,AE:/^\d{5,6}$/},we=Object.freeze(Object.keys(y));function xe(e,n){const t=Object.prototype.hasOwnProperty.call(y,n.toUpperCase())?y[n.toUpperCase()]:void 0;return t!==void 0&&f(e,10)&&t.test(e.trim())&&e.trim()===e}const z=(e,n)=>n===2?e%4===0&&e%100!==0||e%400===0?29:28:[31,28,31,30,31,30,31,31,30,31,30,31][n-1]??0;function Q(e){if(!f(e,10))return!1;const n=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!n)return!1;const t=Number(n[2]),s=Number(n[3]);return t>=1&&t<=12&&s>=1&&s<=z(Number(n[1]),t)}function ye(e,n={}){const{requireOffset:t=!0,requireSeconds:s=!1}=n;if(!f(e,35))return!1;const r=/^(\d{4}-\d{2}-\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.\d{1,9})?)?(Z|[+-](\d{2}):(\d{2}))?$/.exec(e);return!r?.[1]||!Q(r[1])||Number(r[2])>23||Number(r[3])>59||(r[4]===void 0?s:Number(r[4])>59)?!1:r[5]===void 0?!t:r[5]==="Z"||Number(r[6])<=23&&Number(r[7])<=59}function U(e){const n=e.replaceAll("-","+").replaceAll("_","/"),t=atob(n+"=".repeat((4-n.length%4)%4)),s=Uint8Array.from(t,r=>r.charCodeAt(0));return JSON.parse(new TextDecoder("utf-8",{fatal:!0}).decode(s))}const D=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function Ae(e,n={}){if(!f(e,n.maxLength??16384))return!1;const t=e.split(".");if(t.length!==3)return!1;const[s="",r="",i=""]=t,o=/^[\w-]+$/;if(!o.test(s)||!o.test(r)||i!==""&&!o.test(i)||s.length%4===1||r.length%4===1||i.length%4===1)return!1;try{const u=U(s);return!D(u)||typeof u.alg!="string"?!1:D(U(r))}catch{return!1}}const B=/^(?:0|[1-9]\d*)$/,W=/^[\da-z-]+$/i;function A(e){if(!f(e,256))return;const n=e.indexOf("+"),t=n<0?e:e.slice(0,n),s=n<0?void 0:e.slice(n+1),r=t.indexOf("-"),i=r<0?t:t.slice(0,r),o=r<0?void 0:t.slice(r+1),u=i.split(".");if(u.length!==3||!u.every(d=>B.test(d)&&d.length<=16))return;const[a=0,c=0,g=0]=u.map(Number);if(![a,c,g].every(Number.isSafeInteger))return;const l=o===void 0?[]:o.split(".");if(o!==void 0&&!l.every(d=>W.test(d)&&(!/^\d+$/.test(d)||B.test(d))))return;const h=s===void 0?[]:s.split(".");if(!(s!==void 0&&!h.every(d=>W.test(d))))return{major:a,minor:c,patch:g,prerelease:l,build:h}}function $e(e){return A(e)!==void 0}const w=(e,n)=>e<n?-1:e>n?1:0;function Ce(e,n){const t=A(e),s=A(n);if(!t||!s)throw new v;const r=w(t.major,s.major)||w(t.minor,s.minor)||w(t.patch,s.patch);if(r!==0)return r;if(t.prerelease.length===0||s.prerelease.length===0)return w(s.prerelease.length,t.prerelease.length);const i=Math.min(t.prerelease.length,s.prerelease.length);for(let o=0;o<i;o++){const u=t.prerelease[o]??"",a=s.prerelease[o]??"";if(u===a)continue;const c=/^\d+$/.test(u),g=/^\d+$/.test(a);return c&&g?u.length!==a.length?w(u.length,a.length):u<a?-1:1:c?-1:g?1:u<a?-1:1}return w(t.prerelease.length,s.prerelease.length)}class v extends Z{constructor(){super("HLP_VALIDATE_SEMVER","Expected a Semantic Versioning 2.0.0 string.")}}const ee=/^[+-]?\d{1,3}(?:\.\d{1,15})?$/,H=e=>{if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(typeof e=="string"&&e.length<=20&&ee.test(e))return Number(e)};function Se(e){const n=H(e);return n!==void 0&&n>=-90&&n<=90}function Le(e){const n=H(e);return n!==void 0&&n>=-180&&n<=180}function q(e){let n=0;for(let t=0;t<12;t++)n+=(e.charCodeAt(t)-48)*(t%2===0?1:3);return(10-n%10)%10===e.charCodeAt(12)-48}function Ne(e){return f(e,13)&&/^\d{13}$/.test(e)&&q(e)}function Ee(e,n){if(!f(e,20)||!/^[\d -]+X?$/i.test(e))return!1;const t=e.replace(/[ -]/g,"").toUpperCase();if(t.length===13&&n!==10)return(t.startsWith("978")||t.startsWith("979"))&&/^\d{13}$/.test(t)&&q(t);if(t.length===10&&n!==13){if(!/^\d{9}[\dX]$/.test(t))return!1;let s=0;for(let r=0;r<10;r++){const i=t.charAt(r);s+=(i==="X"?10:Number(i))*(10-r)}return s%11===0}return!1}export{ie as IBAN_COUNTRIES,we as POSTAL_CODE_COUNTRIES,le as cardBrand,Ce as compareSemver,ae as isBic,pe as isCidr,fe as isCreditCard,Ne as isEan13,te as isEmail,he as isHexColor,re as isHttpUrl,ue as isIban,P as isIpv4,X as isIpv6,Ee as isIsbn,Q as isIsoDate,ye as isIsoDateTime,Ae as isJwtShape,Se as isLatitude,Le as isLongitude,ge as isMacAddress,oe as isPhone,se as isPhoneE164,xe as isPostalCode,$e as isSemver,me as isSlug,be as isStrongPassword,ce as isUlid,K as isUrl,de as isUuid,F as luhnCheck,A as parseSemver};
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/helpers v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/helpers v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  import*as s from"./builders.js";import{validate as i,createValidator as a,defaultMessages as p}from"./schema.js";import{isEmail as o,isUrl as d,isHttpUrl as n,isPhoneE164 as y,isPhone as l,isIban as m,IBAN_COUNTRIES as O,isBic as S,luhnCheck as C,isCreditCard as c,cardBrand as I,isUuid as u,isUlid as P,isIpv4 as h,isIpv6 as g,isCidr as v,isMacAddress as E,isHexColor as U,isSlug as f,isStrongPassword as w,isPostalCode as x,POSTAL_CODE_COUNTRIES as b,isIsoDate as B,isIsoDateTime as D,isJwtShape as N,parseSemver as T,isSemver as A,compareSemver as L,isLatitude as M,isLongitude as V,isEan13 as _,isIsbn as k}from"./formats.js";export{O as IBAN_COUNTRIES,b as POSTAL_CODE_COUNTRIES,I as cardBrand,L as compareSemver,a as createValidator,p as defaultMessages,S as isBic,v as isCidr,c as isCreditCard,_ as isEan13,o as isEmail,U as isHexColor,n as isHttpUrl,m as isIban,h as isIpv4,g as isIpv6,k as isIsbn,B as isIsoDate,D as isIsoDateTime,N as isJwtShape,M as isLatitude,V as isLongitude,E as isMacAddress,l as isPhone,y as isPhoneE164,x as isPostalCode,A as isSemver,f as isSlug,w as isStrongPassword,P as isUlid,d as isUrl,u as isUuid,C as luhnCheck,T as parseSemver,s as v,i as validate};
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/helpers v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/helpers v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  import{ValidationError as C,err as P,ok as D}from"../error/index.js";import{assertSafeKey as I,hasOwn as k,isUnsafeKey as R}from"../internal/keys.js";import{isPlainObject as j}from"../is/index.js";import{formatPlainDate as T,isPlainDate as K,parsePlainDate as O,plainDateFromInstant as v,toEpochDay as S,toPlainDate as w}from"../date/plain-date.js";import{isEmail as $,isUrl as N}from"./formats.js";const h=Object.freeze({ok:!1}),y=e=>({ok:!0,value:e});function i(e,n,r,o={}){return e.issues.length<e.maxIssues?e.issues.push({path:n,code:r,params:o}):e.stopped=!0,h}function z(e,n){return e.nodes++,e.nodes>e.maxNodes?(e.stopped||i(e,"","limit.size",{max:e.maxNodes}),e.stopped=!0,!1):e.depth>e.maxDepth?(i(e,n,"limit.depth",{max:e.maxDepth}),!1):!e.stopped}const q=/^[a-z_$][\w$]*$/i,x=(e,n)=>{const r=n.length>100?n.slice(0,100):n,o=q.test(r)?r:`[${JSON.stringify(r)}]`;return e===""||o.startsWith("[")?e+o:`${e}.${o}`},A=(e,n)=>`${e}[${n}]`;function b(e,n){return Object.freeze({kind:e,optional:!1,run:(r,o,a)=>z(o,a)?n(r,o,a):h})}const L=e=>{let n=0;for(let r=0;r<e.length;r++){const o=e.charCodeAt(r);(o<56320||o>57343)&&n++}return n};function G(e={}){const{min:n,max:r,trim:o=!1,lowercase:a=!1,patternCode:t="string.pattern"}=e,u=e.pattern?new RegExp(e.pattern.source,e.pattern.flags.replace(/[gy]/g,"")):void 0,s=e.email===!0?{}:e.email===!1?void 0:e.email,d=e.url===!0?{}:e.url===!1?void 0:e.url;return b("string",(m,l,c)=>{if(m==null)return i(l,c,"required");if(typeof m!="string")return i(l,c,"type.string");if(m.length>l.maxStringLength)return i(l,c,"limit.size",{max:l.maxStringLength});let f=o?m.trim():m;if(a&&(f=f.toLowerCase()),f===""&&n!==void 0&&n>0)return i(l,c,"required");const p=n!==void 0||r!==void 0?L(f):0;return n!==void 0&&p<n?i(l,c,"string.min",{min:n}):r!==void 0&&p>r?i(l,c,"string.max",{max:r}):s&&!$(f,s)?i(l,c,"string.email"):d&&!N(f,d)?i(l,c,"string.url"):u&&!u.test(f)?i(l,c,t):y(f)})}const M=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i;function H(e={}){const{min:n,max:r,integer:o=!1,coerce:a=!1}=e;return b("number",(t,u,s)=>{let d=t;if(a&&typeof d=="string"){const m=d.trim();if(m==="")return i(u,s,"required");d=m.length<=400&&M.test(m)?Number(m):Number.NaN}return d==null?i(u,s,"required"):typeof d!="number"||!Number.isFinite(d)?i(u,s,"type.number"):o&&!Number.isSafeInteger(d)?i(u,s,"number.integer"):n!==void 0&&d<n?i(u,s,"number.min",{min:n}):r!==void 0&&d>r?i(u,s,"number.max",{max:r}):y(d)})}function J(e={}){const n=e.coerce===!0;return b("boolean",(r,o,a)=>{if(typeof r=="boolean")return y(r);if(n&&typeof r=="string"){const t=r.trim().toLowerCase();if(t==="true"||t==="on"||t==="yes"||t==="1")return y(!0);if(t==="false"||t==="off"||t==="no"||t==="0")return y(!1)}return r==null?i(o,a,"required"):i(o,a,"type.boolean")})}function B(e={}){const n=e.min===void 0?void 0:w(e.min),r=e.max===void 0?void 0:w(e.max),{timeZone:o}=e;return b("date",(a,t,u)=>{if(a==null||a==="")return i(t,u,"required");let s;return typeof a=="string"?s=O(a.trim()):K(a)?s=O(T(a)):a instanceof Date&&!Number.isNaN(a.getTime())&&(s=v(a,o)),s?n&&S(s)<S(n)?i(t,u,"date.min",{min:T(n)}):r&&S(s)>S(r)?i(t,u,"date.max",{max:T(r)}):y(s):i(t,u,"type.date")})}function Q(e){return b("literal",(n,r,o)=>Object.is(n,e)?y(e):n===void 0?i(r,o,"required"):i(r,o,"literal",{expected:e}))}function X(e){const n=new Set(e),r=Object.freeze([...e]);return b("enum",(o,a,t)=>n.has(o)?y(o):o==null||o===""?i(a,t,"required"):i(a,t,"enum",{options:r}))}function ee(e,n={}){const{min:r,max:o}=n;return b("array",(a,t,u)=>{if(a==null)return i(t,u,"required");if(!Array.isArray(a))return i(t,u,"type.array");if(a.length>t.maxNodes)return i(t,u,"limit.size",{max:t.maxNodes});if(r!==void 0&&a.length<r)return i(t,u,"array.min",{min:r});if(o!==void 0&&a.length>o)return i(t,u,"array.max",{max:o});const s=[];let d=!0;t.depth++;try{for(let m=0;m<a.length;m++){if(t.stopped)return h;const l=e.run(a[m],t,A(u,m));l.ok?s.push(l.value):d=!1}}finally{t.depth--}return d?y(s):h})}function ne(e,n={}){const r=n.unknownKeys??"strip",o=Object.keys(e);for(const t of o)I(t);const a=new Set(o);return b("object",(t,u,s)=>{if(t==null)return i(u,s,"required");if(!j(t))return i(u,s,"type.object");const d={};let m=!0;u.depth++;try{for(const l of o){if(u.stopped)return h;const c=e[l];if(!c)continue;const f=k(t,l),p=c.run(f?t[l]:void 0,u,x(s,l));p.ok?(f||p.value!==void 0)&&(d[l]=p.value):m=!1}for(const l of Object.keys(t))a.has(l)||(R(l)?(m=!1,i(u,x(s,l),"object.unsafeKey")):r==="error"?(m=!1,i(u,x(s,l),"object.unknownKey")):r==="keep"&&(d[l]=t[l]))}finally{u.depth--}return m?y(d):h})}function re(e){return Object.freeze({kind:"optional",optional:!0,run:(n,r,o)=>n===void 0?y(void 0):e.run(n,r,o)})}function te(e){return Object.freeze({kind:"nullable",optional:e.optional,run:(n,r,o)=>n===null?y(null):e.run(n,r,o)})}function oe(...e){return b("union",(n,r,o)=>{for(const a of e){const t={...r,issues:[],stopped:!1},u=a.run(n,t,o);if(r.nodes=t.nodes,u.ok)return u;if(t.issues.some(s=>s.code.startsWith("limit."))){for(const s of t.issues)i(r,s.path,s.code,s.params);return h}}return n==null?i(r,o,"required"):i(r,o,"union")})}function ae(e,n,r="custom",o={}){return Object.freeze({kind:e.kind,optional:e.optional,run:(a,t,u)=>{const s=e.run(a,t,u);if(!s.ok)return s;let d;try{d=n(s.value)}catch{d=!1}return d?s:i(t,u,r,o)}})}function ie(e,n){return Object.freeze({kind:e.kind,optional:e.optional,run:(r,o,a)=>{const t=e.run(r,o,a);if(!t.ok)return t;try{return y(n(t.value))}catch{return i(o,a,"invalid")}}})}const g=e=>typeof e=="string"?e:typeof e=="number"||typeof e=="boolean"?String(e):e===null?"null":"",E={required:()=>"Enter a value for this field.","type.string":()=>"Enter text.","type.number":()=>"Enter a number, for example 42 or 3.5.","type.boolean":()=>"Choose yes or no.","type.date":()=>"Enter a date in the format YYYY-MM-DD.","type.array":()=>"Provide a list of values.","type.object":()=>"Provide the details for this section.","string.min":e=>`Enter at least ${g(e.min)} characters.`,"string.max":e=>`Enter no more than ${g(e.max)} characters.`,"string.pattern":()=>"Enter a value in the required format.","string.email":()=>"Enter an email address in the format name@example.com.","string.url":()=>"Enter a web address in the format https://example.com.","number.integer":()=>"Enter a whole number without decimals.","number.min":e=>`Enter a number that is ${g(e.min)} or more.`,"number.max":e=>`Enter a number that is ${g(e.max)} or less.`,"date.min":e=>`Enter a date on or after ${g(e.min)}.`,"date.max":e=>`Enter a date on or before ${g(e.max)}.`,literal:e=>`Enter ${g(e.expected)}.`,enum:e=>{const n=Array.isArray(e.options)?e.options:[];return n.length>0&&n.length<=10?`Choose one of: ${n.map(g).join(", ")}.`:"Choose one of the available options."},"array.min":e=>`Add at least ${g(e.min)} ${e.min===1?"item":"items"}.`,"array.max":e=>`Add no more than ${g(e.max)} ${e.max===1?"item":"items"}.`,"object.unknownKey":()=>"Remove this field; it is not recognized.","object.unsafeKey":()=>"Remove this field; its name is not allowed.",union:()=>"Enter a value in one of the accepted formats.",invalid:()=>"Check this value and correct it.",custom:()=>"Check this value and correct it.","limit.depth":()=>"The data is nested too deeply. Simplify it and try again.","limit.size":()=>"The data is too large. Reduce its size and try again."},V=(e,n)=>{const r=k(E,e)?E[e]:void 0;return r?r(n):"Check this value and correct it."};function U(e,n,r={}){const{messages:o=V,maxDepth:a=32,maxNodes:t=1e5,maxIssues:u=100,maxStringLength:s=1e6,formKey:d="_form"}=r,m={issues:[],depth:0,nodes:0,stopped:!1,maxDepth:a,maxNodes:t,maxIssues:u,maxStringLength:s},l=e.run(n,m,"");if(l.ok&&m.issues.length===0)return D(l.value);const c={};for(const f of m.issues){const p=f.path===""?d:f.path;k(c,p)||Object.defineProperty(c,p,{value:o(f.code,f.params),enumerable:!0,writable:!0,configurable:!0})}return P(new C("HLP_VALIDATE_FAILED","The input is not valid.",{fields:c,details:{issues:m.issues.map(f=>({path:f.path,code:f.code,params:f.params}))}}))}function se(e,n={}){return(r,o,a={})=>U(r,o,{...n,...a,messages:e})}export{ee as array,J as boolean,se as createValidator,B as date,V as defaultMessages,X as enumOf,Q as literal,te as nullable,H as number,ne as object,re as optional,ae as refine,G as string,ie as transform,oe as union,U as validate};
package/dist/zip/index.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/helpers v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/helpers v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  import{createZipWriter as i,zipFiles as t}from"./writer.js";import{readZip as y}from"./reader.js";export{i as createZipWriter,y as readZip,t as zipFiles};
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/helpers v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/helpers v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  import{HelperError as p,ValidationError as a}from"../error/index.js";import{utf8Encode as h}from"../encoding/index.js";const A=67324752,y=33639248,_=101010256,T=101075792,w=117853008,g=134695760,l=65535,E=4294967295,I=1,P=8,D=64,S=2048,L=0,C=8,N=99,R=1,M=21589,x=l;class U{bytes;view;p=0;constructor(e){this.bytes=new Uint8Array(e),this.view=new DataView(this.bytes.buffer)}u16(e){return this.view.setUint16(this.p,e,!0),this.p+=2,this}u32(e){return this.view.setUint32(this.p,e>>>0,!0),this.p+=4,this}u64(e){return this.view.setUint32(this.p,e%4294967296,!0),this.view.setUint32(this.p+4,Math.floor(e/4294967296),!0),this.p+=8,this}raw(e){return this.bytes.set(e,this.p),this.p+=e.length,this}}function H(t,e){const r=t.getUint32(e,!0),u=t.getUint32(e+4,!0)*4294967296+r;if(!Number.isSafeInteger(u))throw b();return u}const b=t=>new a("HLP_ZIP_CORRUPT","The ZIP archive is damaged or not a ZIP file.",t===void 0?{}:{cause:t}),O=(t,e)=>new p(t,e,{kind:"unsupported"});function G(t){const e=t.getTime(),r=Number.isNaN(e)?new Date(1980,0,1):t,n=r.getFullYear();return n<1980?{date:33,time:0}:n>2107?{date:65439,time:49021}:{date:n-1980<<9|r.getMonth()+1<<5|r.getDate(),time:r.getHours()<<11|r.getMinutes()<<5|Math.floor(r.getSeconds()/2)}}function v(t,e){const r=(t>>>9&127)+1980,n=Math.max(1,t>>>5&15)-1,u=Math.max(1,t&31);return new Date(r,n,u,e>>>11&31,e>>>5&63,(e&31)*2)}const i=t=>t<32||t===127,c=t=>/^[a-z]:/i.test(t);function Z(t,e){if(typeof t!="string")throw new a("HLP_ZIP_INVALID_NAME","The entry name must be a string.");const r=t.replaceAll("\\","/");for(let o=0;o<r.length;o++)if(i(r.charCodeAt(o)))throw new a("HLP_ZIP_INVALID_NAME","The entry name must not contain control characters.");if(r.startsWith("/")||c(r))throw new a("HLP_ZIP_ABSOLUTE_PATH","The entry name must be a relative path.");const n=[];for(const o of r.split("/"))if(!(o===""||o===".")){if(o==="..")throw new a("HLP_ZIP_PATH_TRAVERSAL",'The entry name must not contain ".." segments.');n.push(o)}if(n.length===0)throw new a("HLP_ZIP_INVALID_NAME","The entry name is empty.");const u=n.join("/")+(e?"/":"");if(h(u).length>x)throw new a("HLP_ZIP_INVALID_NAME","The entry name is too long.");return u}function V(t,e){let r="";for(let u=0;u<t.length;u++){const o=t.charCodeAt(u);i(o)||(r+=o===92?"/":t.charAt(u))}for(;c(r);)r=r.slice(2);const n=[];for(const u of r.split("/"))u===""||u==="."||(u===".."?n.pop():n.push(u));return n.join("/")+(e&&n.length>0?"/":"")}const f="\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0";function B(t){let e="";for(const r of t)e+=r<128?String.fromCharCode(r):f.charAt(r-128);return e}const F=f.length;function X(t){return t.buffer instanceof ArrayBuffer?t:t.slice()}let s;function k(){if(s===void 0)try{s=typeof CompressionStream=="function"&&typeof DecompressionStream=="function"&&new CompressionStream("deflate-raw")instanceof CompressionStream}catch{s=!1}return s}function Y(t){return new ReadableStream({async pull(e){const r=await t.next();r.done===!0?e.close():e.enqueue(r.value)},async cancel(e){await t.return?.(e)}},{highWaterMark:0})}async function*z(t){const e=t.getReader();let r=!1;try{for(;;){const n=await e.read();if(n.done){r=!0;return}yield n.value}}finally{r||await e.cancel().catch(()=>{}),e.releaseLock()}}export{U as ByteWriter,F as CP437_TABLE_LENGTH,M as EXTRA_TIMESTAMP,R as EXTRA_ZIP64,P as FLAG_DESCRIPTOR,I as FLAG_ENCRYPTED,D as FLAG_STRONG_ENCRYPTION,S as FLAG_UTF8,x as MAX_NAME_BYTES,N as METHOD_AES,C as METHOD_DEFLATE,L as METHOD_STORE,y as SIG_CENTRAL,g as SIG_DESCRIPTOR,_ as SIG_EOCD,A as SIG_LOCAL,T as SIG_ZIP64_EOCD,w as SIG_ZIP64_LOCATOR,l as U16_MAX,E as U32_MAX,b as corrupt,B as decodeCp437,v as fromDosDateTime,Y as iteratorToStream,Z as normalizeEntryName,X as ownBytes,H as readU64,V as sanitizeEntryName,z as streamToIterator,k as supportsDeflateRaw,G as toDosDateTime,O as unsupported};
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/helpers v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/helpers v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  import{AbortError as q,HelperError as V,LimitError as T,ValidationError as x}from"../error/index.js";import{crc32 as W}from"../encoding/index.js";import{EXTRA_TIMESTAMP as K,EXTRA_ZIP64 as j,FLAG_ENCRYPTED as J,FLAG_STRONG_ENCRYPTION as Q,FLAG_UTF8 as $,METHOD_AES as ee,METHOD_DEFLATE as k,METHOD_STORE as L,SIG_CENTRAL as te,SIG_EOCD as re,SIG_LOCAL as ne,SIG_ZIP64_EOCD as ie,SIG_ZIP64_LOCATOR as oe,U16_MAX as ae,U32_MAX as N,corrupt as f,decodeCp437 as se,fromDosDateTime as ce,ownBytes as G,readU64 as _,sanitizeEntryName as de,streamToIterator as fe,unsupported as I}from"./internal.js";const me=1024*1024,le=ae;async function b(e,t,s){if(t<0||s>e.size||s<t)throw f();return new Uint8Array(await e.slice(t,s).arrayBuffer())}const S=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);function P(e){if(e?.aborted===!0)throw new q("HLP_ZIP_ABORTED","Reading the ZIP archive was aborted.",{cause:e.reason})}async function ue(e){if(e.size<22)throw f();const t=Math.max(0,e.size-22-le),s=await b(e,t,e.size),r=S(s);let a=-1,i=-1;for(let n=s.length-22;n>=0;n--){if(r.getUint32(n,!0)!==re)continue;const p=n+22+r.getUint16(n+20,!0);if(p===s.length){a=n;break}i<0&&p<s.length&&(i=n)}if(a<0&&(a=i),a<0)throw f();const l=t+a,c=r.getUint16(a+4,!0),o=r.getUint16(a+6,!0);let d=r.getUint16(a+10,!0),m=r.getUint32(a+12,!0),u=r.getUint32(a+16,!0);const g=s.subarray(a+22,a+22+r.getUint16(a+20,!0));let y=l;if(l>=20){const n=await b(e,l-20,l),p=S(n);if(p.getUint32(0,!0)===oe){const A=_(p,8);if(A+56>l-20)throw f();const z=await b(e,A,A+56),h=S(z);if(h.getUint32(0,!0)!==ie)throw f();if(h.getUint32(16,!0)!==0||h.getUint32(20,!0)!==0)throw I("HLP_ZIP_MULTI_DISK","Split (multi-disk) archives are not supported.");d=_(h,32),m=_(h,40),u=_(h,48),y=A}}if(c!==0||o!==0)throw I("HLP_ZIP_MULTI_DISK","Split (multi-disk) archives are not supported.");if(u>y)throw f();return u+m>y&&(m=y-u),{count:d,cdOffset:u,cdSize:m,comment:g}}let F;function C(e,t){return t?(F??=new TextDecoder("utf-8"),F.decode(e)):se(e)}function ye(e,t,s){const r=S(e),a=[];let i=0;for(let l=0;l<t;l++){if(i+46>e.length||r.getUint32(i,!0)!==te)throw f();const c=r.getUint16(i+8,!0),o=r.getUint16(i+10,!0),d=r.getUint16(i+12,!0),m=r.getUint16(i+14,!0),u=r.getUint32(i+16,!0);let g=r.getUint32(i+20,!0),y=r.getUint32(i+24,!0);const n=r.getUint16(i+28,!0),p=r.getUint16(i+30,!0),A=r.getUint16(i+32,!0),z=r.getUint32(i+38,!0);let h=r.getUint32(i+42,!0);const D=i+46+n+p+A;if(D>e.length)throw f();const v=(c&$)!==0,R=C(e.subarray(i+46,i+46+n),v);let B=ce(m,d),U=i+46+n;const O=U+p;for(;U+4<=O;){const H=r.getUint16(U,!0),E=r.getUint16(U+2,!0),w=U+4;if(w+E>O)throw f();if(H===j){let M=w;const Z=()=>{if(M+8>w+E)throw f();const Y=_(r,M);return M+=8,Y};y===N&&(y=Z()),g===N&&(g=Z()),h===N&&(h=Z())}else H===K&&E>=5&&(r.getUint8(w)&1)===1&&(B=new Date(r.getUint32(w+1,!0)*1e3));U=w+E}const X=C(e.subarray(O,D),v);if(h+30>s)throw f();a.push({rawName:R,flags:c,method:o,crc:u,compressedSize:g,size:y,offset:h,lastModified:B,isDirectory:R.endsWith("/")||R.endsWith("\\")||(z&16)!==0,comment:X}),i=D}return a}function he(e,t){let s=0,r=0;return new TransformStream({transform(a,i){if(s+=a.length,s>e)throw new T("HLP_ZIP_SIZE_MISMATCH","An entry is larger than its declared size.");r=W(a,r),i.enqueue(G(a))},flush(){if(s!==e)throw new x("HLP_ZIP_SIZE_MISMATCH","An entry is smaller than its declared size.");if(r!==t)throw new x("HLP_ZIP_CRC_MISMATCH","An entry failed its CRC-32 check; the archive is damaged.")}})}const ge=e=>e instanceof V?e:f(e);function pe(e,t,s,r){const a=(t.flags&(J|Q))!==0||t.method===ee,i=async()=>{if(a)throw I("HLP_ZIP_ENCRYPTED","Encrypted ZIP entries are not supported.");if(t.method!==L&&t.method!==k)throw I("HLP_ZIP_UNSUPPORTED_METHOD","The entry uses an unsupported compression method.");if(t.method===L&&t.compressedSize!==t.size)throw f();const c=await b(e,t.offset,t.offset+30),o=S(c);if(o.getUint32(0,!0)!==ne)throw f();const d=t.offset+30+o.getUint16(26,!0)+o.getUint16(28,!0),m=d+t.compressedSize;if(m>r)throw f();const u=e.slice(d,m).stream();return(t.method===k?u.pipeThrough(new DecompressionStream("deflate-raw")):u).pipeThrough(he(t.size,t.crc))},l=()=>{let c;return new ReadableStream({async pull(o){try{c??=(await i()).getReader();const d=await c.read();d.done?o.close():o.enqueue(d.value)}catch(d){o.error(ge(d))}},async cancel(o){await c?.cancel(o)}},{highWaterMark:0})};return{name:s,rawName:t.rawName,size:t.size,compressedSize:t.compressedSize,lastModified:t.lastModified,isDirectory:t.isDirectory,encrypted:a,method:t.method,crc32:t.crc,comment:t.comment,stream:l,async read(c={}){if(P(c.signal),t.isDirectory&&t.size===0)return new Uint8Array(0);const o=new Uint8Array(t.size);let d=0;for await(const m of fe(l()))P(c.signal),o.set(m,d),d+=m.length;return o}}}async function _e(e,t={}){const{maxEntries:s=1e4,maxTotalUncompressed:r=1024*1024*1024,maxCompressionRatio:a=100,rawNames:i=!1,signal:l}=t;P(l);const c=e instanceof Blob?e:new Blob([e instanceof Uint8Array?G(e):e]),o=await ue(c);if(o.count>s)throw new T("HLP_ZIP_TOO_MANY_ENTRIES","The archive has too many entries.",{details:{limit:s}});if(o.count*46>o.cdSize)throw f();P(l);const d=await b(c,o.cdOffset,o.cdOffset+o.cdSize),m=ye(d,o.count,o.cdOffset);let u=0;for(const n of m){if(u+=n.size,u>r)throw new T("HLP_ZIP_TOO_LARGE","The archive expands beyond the allowed size.",{details:{limit:r}});if(n.size>0&&n.compressedSize===0&&n.method!==L)throw f();if(n.size>=me&&n.compressedSize>0&&n.size/n.compressedSize>a)throw new T("HLP_ZIP_RATIO","The archive has a suspicious compression ratio (possible zip bomb).",{details:{limit:a}})}const g=m.map(n=>pe(c,n,i?n.rawName:de(n.rawName,n.isDirectory),o.cdOffset)),y=new Map;for(const n of g)y.has(n.name)||y.set(n.name,n);return{entries:g,comment:C(o.comment,!0),get:n=>y.get(n)}}export{_e as readZip};
@@ -1,2 +1,2 @@
1
- /*! AbsoluteUI @absoluteui/helpers v0.13.2 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
1
+ /*! AbsoluteUI @absoluteui/helpers v0.13.3 | (c) Kasadara Technology Solutions Pvt Ltd | Apache-2.0 | https://aui.kasadara.com/license/ */
2
2
  import{LimitError as D,ValidationError as h}from"../error/index.js";import{crc32 as H,utf8Encode as E}from"../encoding/index.js";import{ByteWriter as A,EXTRA_TIMESTAMP as G,EXTRA_ZIP64 as P,FLAG_DESCRIPTOR as Z,FLAG_UTF8 as z,MAX_NAME_BYTES as W,METHOD_DEFLATE as S,METHOD_STORE as v,SIG_CENTRAL as F,SIG_DESCRIPTOR as B,SIG_EOCD as V,SIG_LOCAL as X,SIG_ZIP64_EOCD as Y,SIG_ZIP64_LOCATOR as K,U16_MAX as U,U32_MAX as y,iteratorToStream as O,normalizeEntryName as j,ownBytes as R,streamToIterator as T,supportsDeflateRaw as L,toDosDateTime as C,unsupported as q}from"./internal.js";const N=64*1024,J=4278190080,x=20,w=45,Q=16;function $(e){if(typeof e!="string"){if(e instanceof Uint8Array||e instanceof ArrayBuffer)return e.byteLength;if(e instanceof Blob)return e.size}}function M(e){const r=E(e??"");if(r.length>W)throw new h("HLP_ZIP_COMMENT_TOO_LONG","The comment is longer than 65535 bytes.");return r}async function*ee(e){if(typeof e=="string"){yield E(e);return}if(e instanceof Uint8Array||e instanceof ArrayBuffer){const n=e instanceof Uint8Array?e:new Uint8Array(e);for(let t=0;t<n.length;t+=N)yield n.subarray(t,t+N);return}const r=e instanceof Blob?e.stream():e;for await(const n of T(r)){if(!(n instanceof Uint8Array))throw new h("HLP_ZIP_INVALID_CHUNK","Entry streams must produce Uint8Array chunks.");yield n}}async function*ne(e,r){for await(const n of e)r.crc=H(n,r.crc),r.size+=n.length,yield R(n)}function k(e){const r=Math.floor(e.getTime()/1e3);return!Number.isFinite(r)||r<0||r>y?new Uint8Array(0):new A(9).u16(G).u16(5).raw(Uint8Array.of(1)).u32(r).bytes}function re(e,r,n,t,u){const i=n?new A(20).u16(P).u16(16).u64(0).u64(0).bytes:new Uint8Array(0),a=new A(30+e.name.length+i.length+u.length);return a.u32(X).u16(n?w:x).u16(Z|z).u16(r).u16(t.time).u16(t.date).u32(0).u32(n?y:0).u32(n?y:0).u16(e.name.length).u16(i.length+u.length).raw(e.name).raw(i).raw(u),a.bytes}function te(e,r,n,t){return t?new A(24).u32(B).u32(e).u64(r).u64(n).bytes:new A(16).u32(B).u32(e).u32(r).u32(n).bytes}function oe(e,r){const{entry:n}=e,t=r||e.zip64||e.size>=y,u=r||e.zip64||e.compressedSize>=y,i=r||e.offset>=y,a=[t?e.size:-1,u?e.compressedSize:-1,i?e.offset:-1].filter(s=>s>=0);let o=new Uint8Array(0);if(a.length>0){const s=new A(4+a.length*8).u16(P).u16(a.length*8);for(const l of a)s.u64(l);o=s.bytes}const d=k(n.date),m=C(n.date),c=a.length>0||e.zip64?w:x,f=new A(46+n.name.length+o.length+d.length+n.comment.length);return f.u32(F).u16(c).u16(c).u16(Z|z).u16(e.method).u16(m.time).u16(m.date).u32(e.crc).u32(u?y:e.compressedSize).u32(t?y:e.size).u16(n.name.length).u16(o.length+d.length).u16(n.comment.length).u16(0).u16(0).u32(n.isDirectory?Q:0).u32(i?y:e.offset).raw(n.name).raw(o).raw(d).raw(n.comment),f.bytes}function ie(e,r,n,t,u){const i=u||e>U-1||r>=y||n>=y,a=new A(22+t.length);if(a.u32(V).u16(0).u16(0).u16(i?U:e).u16(i?U:e).u32(i?y:n).u32(i?y:r).u16(t.length).raw(t),!i)return a.bytes;const o=new A(76+a.bytes.length);return o.u32(Y).u64(44).u16(w).u16(w).u32(0).u32(0).u64(e).u64(e).u64(n).u64(r).u32(K).u32(0).u64(r+n).u32(1).raw(a.bytes),o.bytes}async function*ae(e,r,n){let t=0;const u=[];for(const o of e){const d=!o.isDirectory&&o.data!==void 0&&o.knownSize!==0,m=d&&o.compression==="deflate"?S:v,c=n||o.knownSize!==void 0&&o.knownSize>=J,f=re(o,m,c,C(o.date),k(o.date)),s=t;yield f,t+=f.length;const l={crc:0,size:0};let p=0;if(d){const g=ne(ee(o.data),l),_=m===S?T(O(g).pipeThrough(new CompressionStream("deflate-raw"))):g;for await(const I of _)p+=I.length,yield R(I);t+=p}if(!c&&(l.size>=y||p>=y))throw new D("HLP_ZIP_ENTRY_TOO_LARGE","An entry of unknown size exceeded 4 GiB. Create the writer with zip64: 'always'.");const b=te(l.crc,p,l.size,c);yield b,t+=b.length,u.push({entry:o,method:m,zip64:c,offset:s,crc:l.crc,size:l.size,compressedSize:p})}const i=t;let a=0;for(const o of u){const d=oe(o,n);a+=d.length,yield d}yield ie(u.length,i,a,r,n)}function se(e={}){const r=e.compression??(L()?"deflate":"store"),n=M(e.comment),t=e.maxEntries??1e6,u=e.zip64==="always",i=[],a=new Set;let o=!1;const d=(c,f,s,l)=>{if(o)throw new h("HLP_ZIP_WRITER_CLOSED","Entries cannot be added after the archive has started.");if(i.length>=t)throw new D("HLP_ZIP_TOO_MANY_ENTRIES","The archive has too many entries.");const p=j(c,f),b=f?p.slice(0,-1):p;if(a.has(b))throw new h("HLP_ZIP_DUPLICATE_NAME","The archive already contains an entry with this name.");const g=l.compression??r;if(g==="deflate"&&!L())throw q("HLP_ZIP_DEFLATE_UNSUPPORTED",'This browser cannot compress; use compression: "store".');if(s!==void 0&&!(typeof s=="string"||s instanceof Uint8Array||s instanceof ArrayBuffer||s instanceof Blob||s instanceof ReadableStream))throw new h("HLP_ZIP_INVALID_DATA","Entry data must be a string, bytes, a Blob, or a ReadableStream.");const _=s instanceof File?new Date(s.lastModified):void 0;a.add(b),i.push({name:E(p),isDirectory:f,data:s,knownSize:s===void 0?0:$(s),compression:g,date:l.lastModified??_??new Date,comment:M(l.comment)})},m=()=>{if(o)throw new h("HLP_ZIP_WRITER_CLOSED","The archive can be produced only once.");return o=!0,O(ae(i.slice(),n,u))};return{add(c,f,s={}){d(c,!1,f,s)},addDirectory(c,f={}){d(c,!0,void 0,f)},get size(){return i.length},stream:m,async toBlob(){const c=[];for await(const f of T(m()))c.push(f);return new Blob(c,{type:"application/zip"})}}}async function ye(e,r={}){const n=se(r);for(const t of e){const{name:u,data:i,...a}=t;n.add(u,i,a)}return n.toBlob()}export{se as createZipWriter,ie as endRecords,ye as zipFiles};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absoluteui/helpers",
3
- "version": "0.13.2",
3
+ "version": "0.13.3",
4
4
  "description": "AbsoluteUI helpers: pure, zero-dependency functions and data structures (collections, dates, business calendar, strings, numbers, JSON, LINQ, validation).",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",