@rzl-zone/utils-js 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +21 -0
- package/README.md +215 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +4309 -0
- package/dist/index.js +1 -0
- package/dist/next/index.cjs +1 -0
- package/dist/next/index.d.ts +184 -0
- package/dist/next/index.js +1 -0
- package/dist/next/server/index.cjs +1 -0
- package/dist/next/server/index.d.ts +42 -0
- package/dist/next/server/index.js +1 -0
- package/dist/rzl-utils.global.js +1 -0
- package/dist/types/index.d.ts +2057 -0
- package/package.json +148 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Rizalvin Dwiky
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<h1><strong>⚡️ <code>@rzl-zone/utils-js</code> 🚀</strong></h1>
|
|
3
|
+
</div>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
🚀 <strong>Rzl Utility JavaScript</strong> 🚀<br/>
|
|
7
|
+
A lightweight, modern TypeScript utility library for Node.js & browser (via bundlers like Webpack/Vite).<br/>
|
|
8
|
+
Provides reusable helpers to simplify your JavaScript / TypeScript projects.<br/>
|
|
9
|
+
<strong>Built with ❤️ by <a href="https://github.com/rzl-app">@rzl-app</a>.</strong>
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
<div align="center">
|
|
13
|
+
|
|
14
|
+
[](https://npmjs.com/package/@rzl-zone/utils-js)
|
|
15
|
+
[](https://npmjs.com/package/@rzl-zone/utils-js)
|
|
16
|
+
[](https://nodejs.org/en/)
|
|
17
|
+
[](https://github.com/rzl-zone/utils-js/blob/main/CONTRIBUTING.md)
|
|
18
|
+
[](https://github.com/rzl-zone/utils-js/blob/main/LICENSE.md)
|
|
19
|
+
[](https://github.com/rzl-zone/utils-js)
|
|
20
|
+
[](https://github.com/rzl-app)
|
|
21
|
+
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
<h2 id="table-of-contents">📚 Table of Contents</h2>
|
|
27
|
+
|
|
28
|
+
- 💻 [Requirements](#requirements)
|
|
29
|
+
- ⚙️ [Installation](#installation)
|
|
30
|
+
- ✨ [Features](#features)
|
|
31
|
+
- 🧬 [NextJS Support](#nextjs-support)
|
|
32
|
+
- 💎 [Detailed Features](#detailed-features)
|
|
33
|
+
- 🔥 [Usage](#usage)
|
|
34
|
+
- ❤️ [Sponsor](#sponsor-this-package)
|
|
35
|
+
- 📜 [Changelog](#changelog)
|
|
36
|
+
- 🤝 [Contributing](#contributing)
|
|
37
|
+
- 🛡 [Security](#security)
|
|
38
|
+
- 🙌 [Credits](#credits)
|
|
39
|
+
- 📄 [License](#license)
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
<h2 id="requirements">💻 Requirements</h2>
|
|
44
|
+
|
|
45
|
+
- **Node.js >= 16.0.0 or >=18.17.0**
|
|
46
|
+
This package leverages modern JavaScript & TypeScript features that require Node.js version 16.0.0 if not using nextjs and 18.17.0 or higher for nextjs.
|
|
47
|
+
|
|
48
|
+
- Works with:
|
|
49
|
+
- ✅ Node.js (16.0.0+) - Without NextJS
|
|
50
|
+
- ✅ Node.js (18.17.0+) - With NextJS
|
|
51
|
+
- ✅ Modern browsers (via bundlers like Webpack / Vite)
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
<h2 id="installation">⚙️ Installation</h2>
|
|
56
|
+
|
|
57
|
+
#### With NPM
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
npm install @rzl-zone/utils-js
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
#### With Yarn
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
yarn add @rzl-zone/utils-js
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
#### With PNPM
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
pnpm add @rzl-zone/utils-js
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
<h2 id="features">✨ Features</h2>
|
|
78
|
+
|
|
79
|
+
- 🚀 Written in **TypeScript** — fully typed & safe
|
|
80
|
+
- ⚡ Small, tree-shakable & fast
|
|
81
|
+
- 📦 Works in **Node.js** & modern browsers
|
|
82
|
+
- ❤️ Simple API, easy to extend
|
|
83
|
+
- 🧬 **Next.js support**: helpers for dynamic routes, building URLs, reading env, extracting client IP
|
|
84
|
+
- 🛠 Additional TypeScript types: `OmitStrict`, `PartialByKeys`, etc.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
<h2 id="nextjs-support">🧬 Next.js Support</h2>
|
|
89
|
+
|
|
90
|
+
This package also provides utilities specially built for Next.js environments, neatly separated into their own entry points:
|
|
91
|
+
|
|
92
|
+
- <h3 id="nextjs-support--globals">`@rzl-zone/utils-js/next`</h3>
|
|
93
|
+
Helpers for building URLs, generating dynamic routes, reading environment variables, etc.
|
|
94
|
+
|
|
95
|
+
✅ Safe to use in both Next.js pages & API routes.
|
|
96
|
+
|
|
97
|
+
[Read More Docs](/docs/next-js/global.md#docs-sub-main--title)
|
|
98
|
+
|
|
99
|
+
***
|
|
100
|
+
|
|
101
|
+
- <h3 id="nextjs-support--server-only">`@rzl-zone/utils-js/next/server`</h3>
|
|
102
|
+
Utilities meant to run in Next.js server-only contexts (like middleware or server actions) for tasks such as extracting real client IPs.
|
|
103
|
+
|
|
104
|
+
⚠️ Will throw if used outside a Next.js server environment.
|
|
105
|
+
|
|
106
|
+
[Read More Docs](/docs/next-js/server-only.md#docs-sub-main--title)
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
<h2 id="detailed-features">💎 Detailed Features</h2>
|
|
111
|
+
|
|
112
|
+
### Full documentation coming soon.
|
|
113
|
+
#### For now, explore the examples or dive into the source — all utilities are documented via **JSDoc** and typed properly.
|
|
114
|
+
|
|
115
|
+
```ts
|
|
116
|
+
import { | } from "@rzl-zone/utils-js";
|
|
117
|
+
import { | } from "@rzl-zone/utils-js\types";
|
|
118
|
+
import { | } from "@rzl-zone/utils-js\next";
|
|
119
|
+
import { | } from "@rzl-zone/utils-js\next\server";
|
|
120
|
+
|
|
121
|
+
// Just place your cursor right inside { } like the pipe ("|") above then
|
|
122
|
+
// ctrl + space, there are many functions or types and then hover to each
|
|
123
|
+
// function is complete with how to use it because I have added jsDoc.
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
<!-- - <h4 id="detailed-features--assertions">
|
|
127
|
+
Assertions -
|
|
128
|
+
<a href="/docs/detailed-features/assertions.md#docs-sub-main--title">
|
|
129
|
+
Read More Docs.
|
|
130
|
+
</a>
|
|
131
|
+
</h4>
|
|
132
|
+
|
|
133
|
+
- <h4 id="detailed-features--checkers">
|
|
134
|
+
Checkers -
|
|
135
|
+
<a href="/docs/detailed-features/checkers.md#docs-sub-main--title">
|
|
136
|
+
Read More Docs.
|
|
137
|
+
</a>
|
|
138
|
+
</h4>
|
|
139
|
+
|
|
140
|
+
- <h4 id="detailed-features--conversions">
|
|
141
|
+
Conversions -
|
|
142
|
+
<a href="/docs/detailed-features/conversions/index.md#conversions-lists">
|
|
143
|
+
Read More Docs.
|
|
144
|
+
</a>
|
|
145
|
+
</h4>
|
|
146
|
+
-->
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
<h2 id="usage">🔥 Usage</h2>
|
|
150
|
+
|
|
151
|
+
#### Easy to use, just import on your code base.
|
|
152
|
+
|
|
153
|
+
##### Example Function Import:
|
|
154
|
+
|
|
155
|
+
```ts
|
|
156
|
+
import { isServer } from "@rzl-zone/utils-js";
|
|
157
|
+
|
|
158
|
+
console.log(isServer());
|
|
159
|
+
// true if running on Node.js, false if browser
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
##### Example TypeScript Helper Import:
|
|
163
|
+
|
|
164
|
+
```ts
|
|
165
|
+
import type { OmitStrict } from "@rzl-zone/utils-js/types";
|
|
166
|
+
|
|
167
|
+
type MyType = OmitStrict<OtherType, "omitedProps">;
|
|
168
|
+
// Fully strict TS omit that requires all keys to exist in target
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
<h2 id="sponsor-this-package">❤️ Sponsor this package</h2>
|
|
174
|
+
|
|
175
|
+
Help support development:
|
|
176
|
+
[👉 Become a sponsor](https://github.com/sponsors/rzl-app)
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
<h2 id="changelog">📝 Changelog</h2>
|
|
181
|
+
|
|
182
|
+
See [CHANGELOG](CHANGELOG.md).
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
<h2 id="contributing">🤝 Contributing</h2>
|
|
187
|
+
|
|
188
|
+
See [CONTRIBUTING](CONTRIBUTING.md).
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
<h2 id="security">🛡 Security</h2>
|
|
193
|
+
|
|
194
|
+
Please report issues to [rizalvindwiky1998@gmail.com](mailto:rizalvindwiky1998@gmail.com).
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
<h2 id="credits">🙌 Credits</h2>
|
|
199
|
+
|
|
200
|
+
- [Rzl App](https://github.com/rzl-app)
|
|
201
|
+
- [All Contributors](../../contributors)
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
<h2 id="license">📜 License</h2>
|
|
206
|
+
|
|
207
|
+
The MIT License (MIT).
|
|
208
|
+
Please see [License File](LICENSE.md) for more information.
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
✅ **Enjoy using `@rzl-zone/utils-js`?**
|
|
213
|
+
Star this repo ⭐ and share it with other JavaScript developers!
|
|
214
|
+
|
|
215
|
+
---
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var locale=require('date-fns/locale'),dateFns=require('date-fns');var Pe=(e,r,t=false)=>{if(!(l(e)&&l(r)))throw new TypeError("props 'arr1' and 'arr2' must be `array` type!");if(!d(t))throw new TypeError("props 'ignoreOrder' must be `boolean` type!");if(!P(e.length,r.length))return false;let n=i=>l(i)?i.map(a=>l(a)?n(a):a).sort((a,u)=>{let p=q(a),y=q(u);return p<y?-1:p>y?1:0}):i,o=t?n(e):e,f=t?n(r):r;return P(o.length,f.length)?o.every((i,s)=>q(i)===q(f[s])):false};var Me=(e,r)=>P(e,r);var $=e=>e instanceof URL;var Be=(e,r)=>{if(!$(e)||!$(r))throw new TypeError("Both arguments to 'areURLsEqualPath' must be instances of URL.");return e.protocol+"//"+e.host+e.pathname==r.protocol+"//"+r.host+r.pathname};var We=(e,r)=>{if(!$(e)||!$(r))throw new TypeError("Both arguments to 'areURLsIdentical' must be instances of URL.");return e.protocol+"//"+e.host+e.pathname+e.search==r.protocol+"//"+r.host+r.pathname+r.search};var l=e=>Array.isArray(e);var j=e=>l(e)?e.length===0:true;var He=(e,r)=>{if(!l(e)||!l(r)||j(e)||j(r))return false;let t=new Set(e);return r.some(n=>t.has(n))};var g=e=>typeof e=="number"&&!Number.isNaN(e);var c=e=>typeof e=="string";var U=e=>typeof e=="symbol";var fe=(e,r)=>{if(!e||!O(e))return false;if(!(c(r)||g(r)||U(r)))throw new TypeError("props 'key' must be `string`,`number` or `symbol` type!");return Object.prototype.hasOwnProperty.call(e,r)?true:l(e)?e.some(t=>fe(t,r)):Object.values(e).some(t=>typeof t=="object"&&fe(t,r))};var x=(e,r)=>{if(!c(e))return true;m(r)||(r={});let{trim:t=true}=r;return t&&(e=e.trim()),e===""};var lr=e=>{if(x(e))return null;let r;try{r=decodeURIComponent(e);}catch{return null}let t=/https?:\/\/.*?(?=https?:\/\/|\s|$)/g,n=r.match(t);if(!n)return null;let o=n.map(f=>f.replace(/[.,;:!?)]*$/,"")).filter(f=>{try{let i=new URL(f);return i.protocol==="http:"||i.protocol==="https:"}catch{return false}});return o.length?o:null};var G=e=>typeof e=="bigint";var d=e=>typeof e=="boolean";function ce(e,r={removeInvalidValue:true}){if(!m(r))throw new TypeError("props 'options' must be `object` type!");let t=r&&"removeInvalidValue"in r?r.removeInvalidValue:true;if(!d(t))throw new TypeError("props 'removeInvalidValue' must be `boolean` type!");if(l(e)){let n=Array.from(e,o=>c(o)||g(o)?String(o):b(o)?null:void 0);return t?H(n):n}}function gr(e,r={removeInvalidValueNumber:true}){if(!m(r))throw new TypeError("props 'options' must be `object` type!");let t=r&&"removeInvalidValueNumber"in r?r.removeInvalidValueNumber:true;if(!d(t))throw new TypeError("props 'removeInvalidValueNumber' must be `boolean` type!");if(l(e)){let n=Array.from(e,o=>{let i=String(o).trim().match(/-?\d+(\.\d+)?/);return i?Number(i[0]):void 0});return t?H(n):n}}var H=e=>S(e)?void 0:l(e)?e.reduce((t,n)=>{if(!b(n)&&!w(n))if(l(n)){let o=H(n);o&&!j(o)&&t.push(o);}else t.push(n);return t},[]):[],hr=(e,r)=>{if(!l(e))throw new TypeError("'inputArray' must be an array");if(!m(r))throw new TypeError("'options' must be an object");let{forceToString:t=false,flatten:n=false}=r??{};if(!(t===false||t==="stringOrNumber"||t==="primitives"||t==="all"))throw new TypeError(`'forceToString' must be false | "stringOrNumber" | "primitives" | "all"`);if(!d(n))throw new TypeError("'flatten' must be boolean");let o=i=>{let s=[];return i.reduce((a,u)=>{let p=l(u)?o(u):B(u,t);return s.some(y=>P(y,p))||(s.push(p),a.push(p)),a},[])},f=i=>Array.isArray(i)?i.flatMap(f):i instanceof Set?[...i].flatMap(f):i instanceof Map?[...i.values()].flatMap(f):[i];return o(n?f(e):e)};var Tr=e=>S(e)?false:c(e)?!x(e):d(e)?e:g(e)?e!==0:l(e)||m(e)?!X(e):!!e;var ue=e=>S(e)?false:c(e)?!x(e):d(e)?e:g(e)?e!==0:l(e)?e.some(r=>ue(r)):m(e)?Object.values(e).some(r=>ue(r)):false;var Or=(e,r)=>{if(S(e))return false;let t=r&&"caseInsensitive"in r?r.caseInsensitive:false,n=r&&"trimString"in r?r.trimString:true;if(!d(t))throw new TypeError("props 'caseInsensitive' must be `boolean` type!");if(!d(n))throw new TypeError("props 'trimString' must be `boolean` type!");if(c(e)){let o=e;return n&&(o=o.trim()),t&&(o=o.toLowerCase()),["true","on","yes","1","indeterminate"].includes(o)}return g(e)?e===1:d(e)?e:false};var Ir=e=>S(e)?false:c(e)?!x(e):d(e)?e:g(e)?e!==0:l(e)?e.length>0:!!e;var vr=e=>{if(!c(e)&&!g(e))return 0;let r=String(e).trim().replace(/[^0-9]/g,"");return Number(r)||0};var Q=e=>{if(!N(e))return 0;let r=e.trim().replace(/\u00A0/g,"").replace(/\u202F/g,""),t=false;/^\(.*\)$/.test(r)&&(t=true,r=r.slice(1,-1).trim()),r=r.replace(/^[-\s]+/,a=>a.includes("-")?"-":"").replace(/[\s.,-]+$/,""),t=t||/^-/.test(r)||/^[^\d]*-/.test(r);let o=r.replace(/[^0-9.,'\s]/g,"").replace(/[\s']/g,""),f=o.match(/,\d{2}/g);if(f&&f.length>1)o=o.replace(/,/g,"");else{let a=(o.match(/\./g)||[]).length,u=(o.match(/,/g)||[]).length;if(a>1&&u===0)o=o.replace(/\./g,"");else if(u>1&&a===0)o=o.replace(/,/g,"");else{let p=o.lastIndexOf(","),y=o.lastIndexOf(".");if(p>y)o=o.replace(/\./g,"").replace(",",".");else if(y>p)o=o.replace(/,/g,"");else if(p>y){let T=o.slice(0,p).replace(/,/g,"").replace(/\./g,""),k=o.slice(p+1);o=T+"."+k;}else if(y>p){let T=o.slice(0,y).replace(/\./g,"").replace(/,/g,""),k=o.slice(y+1);o=T+"."+k;}else p!==-1?o=o.replace(/,/g,""):y!==-1&&(o=o.replace(/\./g,""));}}let s=parseFloat(o)||0;return t?-s:s};var Fr=e=>{let r={undefined:void 0,null:null,true:true,false:false,yes:true,no:false};if(c(e)){let t=e.trim().toLowerCase();if(Object.prototype.hasOwnProperty.call(r,t))return r[t];let n=t.replace(/,/g,"");return !isNaN(Number(n))&&n!==""?Number(n):t}return e};var ie=(e,r={})=>{if(!m(r))throw new TypeError("props 'options' must be `object` or empty as `undefined` type!");if(b(e))return r.removeNulls?void 0:null;if(w(e))return r.removeUndefined,void 0;if(l(e)){let t=e.map(n=>ie(n,r)).filter(n=>!w(n));return r.removeEmptyArrays&&j(t)?void 0:t}if(m(e)){let t={},n=e;for(let o in n)if(Object.prototype.hasOwnProperty.call(n,o)){let f=ie(n[o],r);w(f)||(t[o]=f);}return r.removeEmptyObjects&&Object.keys(t).length===0?void 0:t}if(c(e)){let t=e.trim();if(r.convertNumbers&&!isNaN(Number(t)))return Number(t);if(r.convertBooleans){if(t==="true")return true;if(t==="false")return false}if(r.convertDates){if(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(t))return new Date(t);if(r.customDateFormats?.length)for(let n of r.customDateFormats){let o=Ne(t,n);if(o)return o}}return r.strictMode?void 0:t}return r.strictMode?void 0:e},Ne=(e,r)=>{if(!c(e)||!c(r))throw new TypeError("props 'dateString' and 'format' must be `string` type!");let t=e.split(/[-/]/).map(Number);if(t.length!==3||t.some(isNaN))return null;let n,o,f;if(r==="DD/MM/YYYY")[n,o,f]=t;else if(r==="MM/DD/YYYY")[o,n,f]=t;else return null;o-=1;let i=new Date(f,o,n);return i.getFullYear()!==f||i.getMonth()!==o||i.getDate()!==n?null:i};function Br(e,r={}){if(b(e))return null;if(c(e)){if(!m(r))throw new TypeError("props 'options' must be `object` or empty as `undefined` type!");try{let t=r.removeUndefined?e.replace(/,\s*"[^"]*"\s*:\s*undefined(?=\s*[},])/g,"").replace(/"[^"]*"\s*:\s*undefined\s*(,)?/g,"").replace(/,(\s*[}\]])/g,"$1"):e.replace(/:\s*undefined(?=\s*[,}])/g,":null"),n=JSON.parse(t);return ie(n,r)}catch(t){r.loggingOnFail&&console.error("JSON parsing failed from `safeJsonParse`:",t),r.onError&&r.onError(t);return}}}var Se=e=>{try{if(D(structuredClone))return structuredClone(e)}catch{}return JSON.parse(JSON.stringify(e))},ke=(e,r)=>(O(e)&&!b(e)&&r in e&&delete e[r],e),se=(e,r)=>{if(!e||typeof e!="object")return e;let[t,...n]=r;if(Array.isArray(e))for(let o of e)O(o)&&!b(o)&&se(o,r);else j(n)?delete e[t]:!w(e[t])&&O(e[t])&&se(e[t],n);return e},Wr=(e,r,t=true)=>{if(!O(e)||b(e))return{};if(!l(r)||!r.every(o=>O(o)&&"key"in o))throw new TypeError("Expected keysToDelete to be an array of{key,deep?}objects");let n=t?Se(e):e;for(let{key:o,deep:f}of r){let i=o.split(".");n=f?se(n,i):ke(n,i[0]);}return n};var q=(e,r=true,t=false,n=false)=>{if(!d(r)||!d(t))throw new TypeError("Expected 'sortKeys' and 'ignoreOrder' to be boolean.");let o=new WeakSet,f=s=>b(s)||typeof s!="object"&&!D(s),i=s=>{if(!(D(s)||U(s))){if(G(s))return s.toString();if(w(s)||le(s)||s===1/0||s===-1/0)return null;if(typeof s=="object"&&!b(s)){if(o.has(s))return "[Circular]";if(o.add(s),v(s))return s.toISOString();if(s instanceof Map)return{map:Array.from(s.entries()).map(i)};if(s instanceof Set)return{set:Array.from(s.values()).map(i)};if(l(s)){let u=s.map(i);if(t){let p=u.filter(f).sort(),y=u.filter(T=>!f(T));return [...p,...y]}return u}let a=Object.keys(s);return r&&a.sort(),a.reduce((u,p)=>{let y=i(s[p]);return w(y)||(u[p]=y),u},{})}return s}};try{return JSON.stringify(i(e),null,n?2:0)}catch(s){return console.warn("Error in safeStableStringify:",s),"{}"}};var B=(e,r)=>{if(typeof e=="number"&&Number.isNaN(e))return r==="primitives"||r==="all"?"NaN":NaN;if(c(e)||g(e))return r==="stringOrNumber"||r==="primitives"||r==="all"?String(e):e;if(d(e)||G(e)||S(e))return r==="primitives"||r==="all"?String(e):e;if(U(e)||D(e))return r==="all"?e.toString():e;if(l(e))return e.map(t=>B(t,r));if(typeof e=="object"&&!b(e)){if(v(e))return r==="all"?e.toISOString():e;if(Y(e)||ee(e)||e instanceof Promise)return r==="all"?e.toString():e;if(e instanceof Set)return r==="all"?[...e].map(n=>B(n,r)):e;if(e instanceof Map)return r==="all"?[...e.entries()].map(([n,o])=>[B(n,r),B(o,r)]):e;let t={};for(let n of Object.keys(e))t[n]=B(e[n],r);return t}return e};var Hr=(e,r=false,t=false)=>{function n(o,f,i,s){if(!S(o)){if(!d(f)||!d(i))throw new TypeError("props 'removeEmptyObjects' and 'removeEmptyArrays' must be `boolean` type!");if(g(o)||c(o)&&!isNaN(Number(o))){let a=Number(o);return pe(a)?a:void 0}if(l(o)){let a=o.map(u=>n(u,f,i,false)).filter(u=>!w(u));return i&&j(a)?void 0:a}if(m(o)){let a={};for(let[u,p]of Object.entries(o)){let y=n(p,f,i,false);w(y)||(a[u]=y);}return f&&Object.keys(a).length===0?s?{}:void 0:a}}}return n(e,r,t,true)};var et=(e,r=false,t=false)=>{function n(o,f,i,s){if(!S(o)){if(!d(f)||!d(i))throw new TypeError("props 'removeEmptyObjects' and 'removeEmptyArrays' must be `boolean` type!");if(g(o)||c(o))return String(o);if(l(o)){let a=o.map(u=>n(u,f,i,false)).filter(u=>!w(u));return i&&j(a)?void 0:a}if(m(o)){let a={};for(let[u,p]of Object.entries(o)){let y=n(p,f,i,false);w(y)?l(p)&&!i&&(a[u]=[]):a[u]=y;}return f&&Object.keys(a).length===0?s?{}:void 0:a}}}return n(e,r,t,true)};var it=e=>c(e)||g(e)?Q(e.toString())!==0?true:e.toString().trim()==="0":false;var v=e=>e instanceof Date&&!isNaN(e.getTime());var Y=e=>e instanceof RegExp;var Z=(e,r)=>{if(typeof e=="number"&&typeof r=="number"&&Number.isNaN(e)&&Number.isNaN(r)||e===r)return true;if(typeof e!=typeof r)return false;if(v(e)&&v(r))return e.getTime()===r.getTime();if(Y(e)&&Y(r)||U(e)&&U(r))return e.toString()===r.toString();if(e instanceof Set&&r instanceof Set){if(e.size!==r.size)return false;let t=Array.from(r),n=new Set;for(let o of e){let f=false;for(let i=0;i<t.length;i++)if(!n.has(i)&&Z(o,t[i])){n.add(i),f=true;break}if(!f)return false}return true}if(e instanceof Map&&r instanceof Map){if(e.size!==r.size)return false;let t=Array.from(r),n=new Set;for(let[o,f]of e){let i=false;for(let s=0;s<t.length;s++){if(n.has(s))continue;let[a,u]=t[s];if(Z(o,a)&&Z(f,u)){n.add(s),i=true;break}}if(!i)return false}return true}if(l(e)&&l(r))return e.length!==r.length?false:e.every((t,n)=>Z(t,r[n]));if(O(e)&&O(r)&&e&&r){if(l(e)!==l(r))return false;let t=Object.keys(e),n=Object.keys(r);return t.length!==n.length?false:t.every(o=>Z(e[o],r[o]))}return false};var me=e=>{if(c(e))return x(e);if(g(e))return false;if(!e)return true;if(l(e))return j(e)||e.every(me);if(O(e)){let r=Object.keys(e),t=Object.getOwnPropertySymbols(e);return [...r,...t].length===0||[...r,...t].every(n=>me(e[n]))}return false};var X=e=>S(e)||e===false||typeof e=="number"&&Number.isNaN(e)?true:c(e)?x(e):l(e)?e.length===0:m(e)?Object.keys(e).length===0&&Object.getOwnPropertySymbols(e).length===0:false;var ee=e=>e instanceof Error;var D=e=>typeof e=="function";var z=e=>Array.isArray(e)&&e.length>0;var m=e=>typeof e=="object"&&!S(e)&&!l(e);var N=(e,r)=>{if(!c(e))return false;m(r)||(r={});let{trim:t=true}=r;return(t?e.trim():e).length>0};var b=e=>e===null;var w=e=>typeof e>"u";var Dt=e=>{if(!c(e)||x(e))return false;let r;try{r=decodeURIComponent(e);}catch{return false}return !r.startsWith("http://")&&!r.startsWith("https://")?false:new RegExp(/^https?:\/\/(?:localhost(?::\d+)?(?:[\/?#][^\s]*)?|(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}(?::\d+)?(?:[\/?#][^\s]*)?)$/).test(r)};var Pt=(e,r,t)=>{if(!c(e)||x(e)||!l(r))return false;if(b(t)||!m(t))throw new TypeError("props 'options' must be `object` type!");let{exactMatch:n=false,flags:o="i"}=t;if(!d(n))throw new TypeError("props 'exactMatch' must be `boolean` type!");if(!c(o))throw new TypeError("props 'flags' must be `string` type!");let f=s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=r.filter(s=>c(s)&&!x(s)).map(f);return i.length===0?false:i.every(s=>{let a=n?`(?<!\\S)${s}(?!\\S)`:s;return new RegExp(a,o.includes("u")?o:o+"u").test(e)})};var Mt=(e,r,t)=>{if(!c(e)||x(e)||!l(r))return false;if(b(t)||!m(t))throw new TypeError("props 'options' must be `object` type!");let{exactMatch:n=false,flags:o="i"}=t||{};if(!d(n))throw new TypeError("props 'exactMath' must be `boolean` type!");if(!c(o))throw new TypeError("props 'flags' must be `string` type!");let f=a=>a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=r.filter(a=>c(a)&&!x(a)).map(f);if(i.length===0)return false;let s=n?`(?<!\\S)(${i.join("|")})(?!\\S)`:`(${i.join("|")})`;return new RegExp(s,o.includes("u")?o:o+"u").test(e)};var O=e=>typeof e=="object"&&!S(e);var de=e=>Object.prototype.toString.call(e)==="[object Arguments]";function Vt(e){return e instanceof ArrayBuffer}function qt(e){return e!=null&&typeof e!="function"&&re(e?.length)}function _t(e){return O(e)&&re(e.length)}var ye=e=>Buffer.isBuffer(e);function Xt(e){return !!e&&typeof e=="object"&&e.nodeType===1&&!ge(e)}function rn(e){if(e==null)return true;let r=typeof e;return r==="boolean"||r==="number"||r==="symbol"?true:r==="function"?Object.keys(e).length===0:typeof e=="string"||Array.isArray(e)||de(e)||be(e)?e.length===0:e instanceof Map||e instanceof Set?e.size===0:ye(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:false}function V(e,r,t,n=new WeakMap){if(e===r||e!==e&&r!==r)return true;if(typeof e!="object"||e===null||typeof r!="object"||r===null)return false;if(n.get(e)===r)return true;n.set(e,r);let o=(s,a,u,p,y)=>{if(t){let T=t(s,a,u,p,y,n);if(T!==void 0)return T}return V(s,a,t,n)};if(e instanceof Date&&r instanceof Date)return e.getTime()===r.getTime();if(e instanceof RegExp&&r instanceof RegExp)return e.source===r.source&&e.flags===r.flags;if(e instanceof Error&&r instanceof Error)return e.name===r.name&&e.message===r.message;if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(r)){let s=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),a=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);if(s.length!==a.length)return false;for(let u=0;u<s.length;u++)if(s[u]!==a[u])return false;return true}if(e instanceof ArrayBuffer&&r instanceof ArrayBuffer){if(e.byteLength!==r.byteLength)return false;let s=new Uint8Array(e),a=new Uint8Array(r);for(let u=0;u<s.length;u++)if(s[u]!==a[u])return false;return true}if(e instanceof Map&&r instanceof Map){if(e.size!==r.size)return false;for(let[s,a]of e)if(!r.has(s)||!V(a,r.get(s),t,n))return false;return true}if(e instanceof Set&&r instanceof Set){if(e.size!==r.size)return false;for(let s of e){let a=false;for(let u of r)if(V(s,u,t,n)){a=true;break}if(!a)return false}return true}if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return false;for(let s=0;s<e.length;s++)if(!o(e[s],r[s],s,e,r))return false;return true}if(Object.getPrototypeOf(e)!==Object.getPrototypeOf(r))return false;let f=Reflect.ownKeys(e),i=Reflect.ownKeys(r);if(f.length!==i.length)return false;for(let s of f){let a=e[s],u=r[s];if(!o(a,u,s,e,r))return false}return true}function P(e,r){return V(e,r,void 0,new WeakMap)}function fn(e,r,t){return V(e,r,t,new WeakMap)}function pe(e){return typeof e=="number"&&Number.isFinite(e)}function M(e){return typeof e=="number"&&Number.isInteger(e)}function re(e){return typeof e=="number"&&e>-1&&Number.isInteger(e)&&e<=Number.MAX_SAFE_INTEGER}function we(e,r){return e===r||e===0&&r===0||Number.isNaN(e)&&Number.isNaN(r)}function te(e,r,t){if(e===r)return true;if(r===null||typeof r!="object")return we(e,r);if(e===null||typeof e!="object")return false;let n=Reflect.ownKeys(r).filter(o=>!(Array.isArray(r)&&o==="length"));for(let o of n){if(!(o in e))return false;let f=e[o],i=r[o],s=t?.(f,i,o,e,r);if(s!==void 0){if(!s)return false;continue}if(O(f)&&O(i)){if(!he(f,i,t))return false}else if(!we(f,i))return false}return true}function gn(e,r){return te(e,r)}function he(e,r,t){return te(e,r,t)}function le(e){return typeof e=="number"?Number.isNaN(e):Object.prototype.toString.call(e)==="[object Number]"&&Number.isNaN(e.valueOf())}var Ae=Function.prototype.toString,Oe=/\{\s*\[native code\]\s*\}/;function En(e){if(typeof e!="function")return false;try{let r=Ae.call(e);return Oe.test(r)}catch{return false}}function S(e){return e==null}function Sn(e){let r=typeof e;return e!=null&&(r=="object"||r=="function")}function ge(e){if(e===null||typeof e!="object")return false;let r=Object.getPrototypeOf(e);return r===Object.prototype||r===null}function On(e){return typeof e=="number"&&Number.isSafeInteger(e)}function jn(e){return Object.prototype.toString.call(e)==="[object Set]"||e instanceof Set}function be(e){return e!=null&&typeof e=="object"&&Re.has(Object.prototype.toString.call(e))}var Re=new Set(["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]","[object BigInt64Array]","[object BigUint64Array]"]);function Cn(e){return typeof e=="object"&&e!==null&&e instanceof WeakMap}var Un=(e,r)=>{if(!c(e)){let t=typeof e;throw new TypeError(D(r)?r(t):r?.trim()||`Expected value to be 'string',but got '${t}'`)}};var _=()=>typeof window>"u"||typeof document>"u";var Bn=(e="on_processing")=>{if(_())return;if(!c(e))throw new TypeError("Expected 'className' to be a 'string' type");let{documentElement:r}=document;r&&!r.classList.contains(e)&&r.classList.add(e);},Vn=(e="on_processing")=>{if(_())return;if(!c(e))throw new TypeError("Expected 'className' to be a 'string' type");let{documentElement:r}=document;r&&r.classList.contains(e)&&r.classList.remove(e);},Kn=()=>{if(_())return;let e=document.activeElement;e instanceof HTMLElement?e.blur():console.warn("removeElementFocus:No active element to blur or is not supported on null element.");},Wn=e=>{if(_())return;m(e)||(e={});let{behavior:r="smooth",timeout:t=1}=e;setTimeout(()=>{window.scrollTo({top:0,left:0,behavior:r});},t<1?1:t);};var Zn=(e,r={})=>{if(!c(e)&&!g(e))throw new TypeError("props 'value' must be `string` or `number` type!");if(!m(r))throw new TypeError("props 'options' must be `object` type!");let{decimal:t=false,totalDecimal:n=2,endDecimal:o=true,indianFormat:f=false,suffixCurrency:i="",suffixDecimal:s="",roundedDecimal:a="round",negativeFormat:u="dash"}=r,{separatorDecimals:p=",",separator:y="."}=r;if(!c(y)||!c(p)||!c(i)||!c(s))throw new TypeError("props 'separator','separatorDecimals','suffixCurrency' and 'suffixDecimal' must be `string` type!");if(!d(t)||!d(o)||!d(f))throw new TypeError("props 'decimal','endDecimal' and 'indianFormat' must be `boolean` type!");if(!g(n))throw new TypeError("props 'totalDecimal' must be `number` type!");if(!(a===false||a==="round"||a==="ceil"||a==="floor"))throw new TypeError("props 'roundedDecimal' must be `false` or one of:'round' | 'ceil' | 'floor'");if(!(u==="abs"||u==="brackets"||u==="dash"||m(u)))throw new TypeError("props 'negativeFormat' must be on one of:'abs' | 'brackets' | 'dash' or `object`");let T=c(e)?Q(e):e;if(isNaN(T))throw new TypeError("'value' could not be parsed into a valid number");let k=Math.abs(T),E=Math.pow(10,n);if(a){let h=k*E;switch(a){case "round":k=Math.round(h)/E;break;case "ceil":k=Math.ceil(h)/E;break;case "floor":k=Math.floor(h)/E;break}}let R="",I="";if(a){let h=k*E;switch(a){case "round":k=Math.round(h)/E;break;case "ceil":k=Math.ceil(h)/E;break;case "floor":k=Math.floor(h)/E;break}}if(a)[R,I]=k.toFixed(n).split("."),I=I??"".padEnd(n,"0");else{let h=String(k).split(".");R=h[0],I=(h[1]||"").slice(0,n).padEnd(n,"0");}let A,F=(h,C)=>{let K=h.slice(-3),ae=h.slice(0,-3);return ae?ae.replace(/\B(?=(\d{2})+(?!\d))/g,C)+C+K:K};if(f?(y=",",p=".",A=(i.trim().length?i:"")+F(R,y)):A=(i.trim().length?i:"")+R.replace(/\B(?=(\d{3})+(?!\d))/g,y),t&&!w(I)&&n>0){let h=p+I;o&&(h+=s),A+=h;}if(T<0){if(u==="dash")A="-"+A;else if(u==="brackets")A="("+A+")";else if(u!=="abs"){if(m(u))if("custom"in u){let h=u.custom;if(!D(h))throw new TypeError("props 'negativeFormat.custom' must be a function:'(formatted:string)=>string'");let C=h(A);if(!c(C))throw new TypeError("props 'negativeFormat.custom' must return a string");A=C;}else{let h=u.style||"dash",C=d(u.space)?u.space:false;if(!d(C))throw new TypeError("props 'negativeFormat.space' must be boolean");if(!(h==="abs"||h==="brackets"||h==="dash"))throw new TypeError("props 'negativeFormat.style' must be one of:'dash' | 'brackets' | 'abs'");switch(h){case "dash":A="-"+(C?" ":"")+A;break;case "brackets":A=C?`(${A})`:`(${A})`;break;}}}}return A};var Gn=(e,r=",")=>{if(!c(e)&&!g(e))throw new TypeError("props 'value' must be 'string' or 'number' type!");if(!c(r))throw new TypeError("props 'separator' must be 'string' or empty as 'undefined' type!");r=c(r)?r:",";let t=r==="."?",":".",n=e.toString().trim(),o=n.lastIndexOf("."),f=n.lastIndexOf(","),i="";o>f?i=".":f>o&&(i=",");let s=n,a="";if(i){let p=n.split(i);s=p.slice(0,-1).join(i),a=p.slice(-1)[0];}s=s.replace(/[^\d]/g,"");let u=s.replace(/\B(?=(\d{3})+(?!\d))/g,r);return a?`${u}${t}${a}`:u};function Qn(e,r={}){if(S(e))return "";if(!c(e)&&!g(e))throw new TypeError("props 'value' must be `string`,`number`,`null` or `undefined` type!");if(!m(r))throw new TypeError("props 'options' must be `object` or unset type!");let{separator:t=" ",takeNumberOnly:n=false,checkValidOnly:o=false,plusNumberCountry:f="",openingNumberCountry:i="",closingNumberCountry:s=""}=r;if(!d(n)||!d(o))throw new TypeError("props 'takeNumberOnly' and 'checkValidOnly' must be `boolean` or unset as `undefined` type!");if(!c(t)||!c(f)||!c(i)||!c(s))throw new TypeError("props 'separator','plusNumberCountry','openingNumberCountry' and 'closingNumberCountry' must be `string` or unset type!");if(c(e)||(e=String(e)),n)return e.replace(/\D/g,"");if(o)return /^(\+)?[0-9\s().-]+$/.test(e)&&e.replace(/\D/g,"").length<24;e=e.replace(/\D/g,"");let a=f.trim().replace(/\s+/g,"").replace(/[^\d+]/g,"");/^\+/.test(a)&&(a="+"+a.replace(/^\++/,""));let u="",p="",y={7:"Russia,Kazakhstan",27:"South Africa",31:"Netherlands",32:"Belgium",33:"France",34:"Spain",36:"Hungary",39:"Italy,San Marino,Vatican",44:"United Kingdom",46:"Sweden",47:"Norway",48:"Poland",49:"Germany",52:"Mexico",54:"Argentina",55:"Brazil",56:"Chile",61:"Australia",62:"Indonesia",64:"New Zealand",81:"Japan",82:"South Korea",86:"China",90:"Turkey",91:"India",92:"Pakistan",351:"Portugal",352:"Luxembourg",971:"UAE"},T=a.replace(/^\+/,"").replace(/[^\d]/g,"");y[T]&&e.startsWith("0")?(u=e.slice(1,4),p=e.slice(4)):(u=e.slice(0,4),p=e.slice(4));let k=a.trim(),E=i.trim(),R=s.trim(),I="";k?E&&R?I=`${E}${k}${R}${u}`:E&&!R?I=`${E}${k}${u}`:!E&&R?I=`${k}${R}${u}`:I=`${k}${u}`:I=`${u}`;let A={0:t,4:t,8:t,12:t,16:t,20:t,24:t};for(let F=0;F<p.length;F++){let h=F+u.length;I+=(A[h]||"")+p[F];}return I}var oo=(e,r="YYYY-MM-DD hh:mm:ss")=>{if(!c(r)||!e||!(v(e)||c(e)))return null;try{let t=new Date(e);if(isNaN(t.getTime()))return null;let n=i=>i.toString().padStart(2,"0"),o={YYYY:t.getFullYear().toString(),MM:n(t.getMonth()+1),DD:n(t.getDate()),hh:n(t.getHours()),mm:n(t.getMinutes()),ss:n(t.getSeconds())},f=Object.entries(o).reduce((i,[s,a])=>i.split(s).join(a),r);return f.includes("NaN")?null:f}catch{return null}},io=(e,r)=>{if(!e||!(v(e)||c(e)))return null;let t=new Date(e);if(isNaN(t.getTime()))return null;m(r)||(r={});let{locale:n="en-US",...o}=r;return new Intl.DateTimeFormat(n?.toString()?.trim()?.length?n:"en-US",o).format(t)},so=(e,r)=>{if(!e||!(v(e)||c(e)))return null;m(r)||(r={});let{format:t="dd MMM yyyy - HH:mm:ss",inputFormat:n,locale:o,inputLocale:f,...i}=r,s;if(c(e)&&n&&f){let u=c(f)?f==="id"?locale.id:locale.enUS:f;try{s=dateFns.parse(e,n,new Date,{locale:u});}catch{return null}}else s=new Date(e);if(isNaN(s.getTime()))return null;let a=c(o)?o==="id"?locale.id:locale.enUS:o;return dateFns.format(s,t,{...i,locale:a})},ao=e=>{try{if(!e||c(e)&&x(e))e=new Date;else if(!(v(e)||c(e)))return "0";let r=new Date(e);if(isNaN(r.getTime()))return "0";let t=f=>f.toString().padStart(2,"0"),n=r.getTimezoneOffset(),o=n<0?"+":"-";return n=Math.abs(n),`${o}${t(Math.floor(n/60))}${t(n%60)}`}catch{return "0"}};var uo=(e,r="random")=>{if(!c(e))return "";if(r!=="random"&&r!=="fixed")throw new TypeError("Expected 'mode' to be a 'string' and the valid value is 'random' and 'fixed' only!");if(!/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(e))return "";let[n,o]=e.split("@"),f=o.split(".");if(f.length<2)return "";let[i,...s]=f,a=s.join("."),u=r==="fixed"?(()=>{let E=0;for(let R=0;R<e.length;R++)E=(E<<5)-E+e.charCodeAt(R),E|=0;return Math.abs(E)})():void 0,p=(E,R,I)=>{if(E.length<=R)return "*".repeat(E.length);let A=E.split(""),F=Math.max(R,Math.ceil(E.length*I)),h=new Set,C=0;for(;h.size<F;){let K=w(u)?Math.floor(Math.random()*E.length):(u+E.length+C*31)%E.length;h.add(K),C++;}for(let K of h)A[K]="*";return A.join("")},y=p(n,n.length<4?1:2,.6),T=p(i,i.length<4?1:2,.5),k=a.length<=2?a:p(a,1,.4);return `${y}@${T}.${k}`};function mo(e,r,t=" ",n=false){if(w(e)||b(e)||r<=0)return e;if(!(c(e)&&g(r)&&c(t)&&d(n)))throw new TypeError("Expected 'subject' and 'separator' to be a 'string' type,'limiter' to be a 'number' type,'reCountAfterSpace' to be a 'boolean' type");if(e=Te(e),!n){let a="",u=0;for(let p=0;p<e.length;p++){let y=e[p];u===r&&(a+=t,u=0),a+=y,u++;}return a}let o=e.split(" "),f=[],i=[],s=0;for(let a=0;a<o.length;a++){let u=o[a],p="",y=0;for(let T=0;T<u.length;T++)p+=u[T],y++,y===r&&T<u.length-1&&(p+=t,y=0);i.push(p),s++,(s===r||a===o.length-1)&&(f.push(i.join(t)),i=[],s=0);}return f.join(" ")}var bo=(e,r=10,t="...",n=true)=>{if(!N(e)||r<1)return "";if(!(g(r)&&c(t)&&d(n)))throw new TypeError("Expected 'ending' to be a 'string' type,'length' to be a 'number' type,'trim' to be a 'boolean' type");x(t)?t="...":t=t.trim();let o=n?e.trim():e;if(o.length<=r)return o;let i=o.slice(0,r);return(n?i:i.trimEnd())+t};var xo=e=>{if(!z(e))return;let r=Math.floor(Math.random()*(e.length||0));return e[r]};var J=(e,r)=>{if(!M(e)||!M(r))throw new Error("Error function of `getRandomIntInRange` both parameter `min` and `max` must be integers.");if(e>r)throw new Error("Error function of `getRandomIntInRange` parameter `min` must be less than or equal to `max`.");return e=Math.max(1,e),r=Math.min(Number.MAX_SAFE_INTEGER,r),Math.floor(Math.random()*(r-e+1))+e};var Ao=e=>{m(e)||(e={});let{minLength:r=1,maxLength:t=16,avoidZero:n=false}=e;if(!M(r)||!M(t)||r<1||t>16||r>t)throw new Error("Invalid parameters:minLength must be \u2265 1,maxLength must be \u2264 16,and minLength \u2264 maxLength.");let o=r===t?r:J(r,t),f=10**(o-1),i=10**o-1,s=J(f,i);return n&&s===0&&(s=f),s};var Io=e=>{m(e)||(e={});let{minLength:r=40,maxLength:t=40,type:n="string",avoidWhiteSpace:o=true}=e;if(!d(o))throw new Error("Invalid parameter:`avoidWhiteSpace` must be 'boolean'.");if(!M(r)||!M(t)||r<1||t>5e3||r>t)throw new Error("Invalid parameters:`minLength` must be \u2265 1,`maxLength` must be \u2264 5000,and `minLength` \u2264 `maxLength`.");if(n!=="string"&&n!=="number")throw new Error("Invalid parameter:`type` must be either 'string' or 'number'.");let f=J(r,t),i=T=>o?T.replace(/\s|\n|\t/g,""):T,u=n==="number"?e.replaceGenInt??"0123456789":e.replaceGenStr??"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",p=i(u)+(e.addChar||"");if(!p.length)throw new Error("Character set is empty. Ensure `replaceGenInt` or `replaceGenStr` has valid characters.");let y="";for(let T=0;T<f;T++)y+=p.charAt(Math.floor(Math.random()*p.length));return y};var Co=()=>{};var W=e=>{if(!l(e))throw new TypeError("Expected 'values' to be a 'array' type");let r=[];return e.forEach((t,n)=>{for(let o=n+1;o<e.length;o++)if(P(t,e[o])){r.some(f=>P(f,t))||r.push(t);break}}),r};var Mo=(e,r)=>{if(!e||typeof e!="object")return{};if(!l(r))throw new TypeError("Expected 'keysToOmit' to be a 'array' type");let t=W(r);if(t.length>0)throw new Error(`Function "omitKeys" Error:Duplicate keys detected - ${t}`);return Object.fromEntries(Object.entries(e).filter(([n])=>!r.includes(n)))};var zo=(e,r)=>{if(!m(e))return{};if(!l(r))throw new TypeError("Expected 'keysToOmit' to be a 'array' type");let t=W(r);if(z(t))throw new Error(`Function "omitKeysDeep" Error:Duplicate keys detected - ${t}`);let n=(i,s)=>{if(!i||typeof i!="object")return i;let[a,...u]=s;if(j(u))if(l(i)){let p=parseInt(a);!isNaN(p)&&p in i&&i.splice(p,1);}else delete i[a];else{let p=i[a];(l(p)||typeof p=="object"&&!b(p))&&(i[a]=n(p,u));}return i},o=i=>l(i)?i.map(o).filter(s=>!(typeof s=="object"&&!b(s)&&Object.keys(s).length===0)):i&&typeof i=="object"?Object.fromEntries(Object.entries(i).map(([a,u])=>[a,o(u)]).filter(([,a])=>!w(a)&&!(typeof a=="object"&&!b(a)&&Object.keys(a).length===0))):i,f=JSON.parse(JSON.stringify(e));for(let i of r){let s=i.split(".");n(f,s);}return o(f)};var Ko=(e,r)=>{if(!l(r))throw new TypeError("Expected 'arrayExcept' to be a 'array' type");let t=W(r);if(z(t))throw new Error(`Function omitProps Error,cause Duplicate of arrayExcept:${String(t)}`);if(e){let n=Object.entries(e).filter(([o])=>!r.includes(o));return Object.fromEntries(n)}};var De=new Set(["txt","md","rtf","tex","doc","docx","odt","ott","pdf","djvu","epub","mobi","azw","azw3","xls","xlsx","ods","csv","tsv","ppt","pptx","odp","pps","md","bib","tex","log","jpg","jpeg","png","gif","bmp","tif","tiff","webp","svg","ico","heif","heic","raw","cr2","nef","orf","sr2","dng","dds","psd","exr","xcf","ai","eps","cdr","psd","indd","mp3","wav","ogg","flac","aac","m4a","wma","alac","aiff","amr","mid","midi","opus","au","caf","ape","opus","mp4","mkv","avi","mov","flv","wmv","webm","mpeg","mpg","3gp","3g2","m4v","ts","mts","asf","rm","rmvb","vob","f4v","ogv","m2ts","mod","dav","zip","rar","7z","tar","gz","bz2","xz","tgz","tbz2","txz","lz","lzma","z","cab","arj","ace","iso","dmg","rpm","deb","pkg","apk","jar","iso","img","vhd","vmdk","qcow2","dmg","sql","db","dbf","mdb","accdb","json","xml","yaml","yml","toml","ini","plist","yaml","pkl","msgpack","h5","hdf5","parquet","avro","orc","ndjson","db","pdb","sqlite","sqlite3","dbx","sdf","js","jsx","ts","tsx","c","cpp","h","hpp","java","py","rb","go","rs","php","pl","sh","bat","cmd","ps1","lua","swift","kt","scala","cs","vb","dart","m","r","jl","fs","vbproj","sln","pri","Makefile","html","htm","xhtml","css","scss","sass","less","xml","json","yaml","yml","xlf","xlf","po","pot","jsp","asp","aspx","php","jspf","cgi","cfm","pl","env","conf","config","xml","ini","cfg","toml","yaml","dockerfile","gitignore","gitconfig","gitattributes","npmignore","lock","gradle","pom","yaml","prettierrc","eslintrc","babelrc","editorconfig","ttf","otf","woff","woff2","eot","dwg","dxf","shp","kml","kmz","gpx","stl","step","iges","3ds","3dm","fbx","obj","exe","msi","bin","run","com","cmd","apk","app","deb","rpm","elf","dll","so","dylib","sys","pem","crt","cer","key","der","csr","p12","pfx","jks","iso","cue","bin","nes","sfc","gba","nds","nes","sav","rom","pak","vpk","bik","epub","mobi","azw","azw3","fb2","lit","lrf","cbr","cbz","cbt","cba","opds","fasta","fa","fas","ffn","faa","fna","frn","fastq","fq","gb","gbk","sam","bam","vcf","gff","bed","log","bak","tmp","old","backup","swp","part","crdownload","torrent","ics","vcf","ics","ical","ics","ical","calendar","srt","sub","idx","cue","cdf","hdf","h5","nc","grib","fits","netcdf","sdf","vtk","xmind","drawio","jar","war","ear","crx","xpi","plugin","vsix","safariextz"]),Ce=new Set(["tar.gz","tar.bz2","tar.xz","tar.lz","tar.lzma","tar.Z","tar.zst","tar.xz"]),Yo=e=>{if(x(e))return;let r=e.split("/").pop();if(r==="")return "";if(r){for(let t of Ce){let n=`.${t}`;if(r.toLowerCase().endsWith(n))return r.slice(0,-n.length)}for(;;){let t=r.lastIndexOf(".");if(t===-1)break;let n=r.slice(t+1).toLowerCase();if(De.has(n))r=r.slice(0,t);else break}return r}};var Jo=(e=1e3,r)=>{if(!g(e)||!Number.isFinite(e)||e<=0)throw new TypeError("`milliSeconds` must be a number,non-zero,non-NaN,non-negative,and non finite number.");if(b(r)||r&&!(r instanceof AbortSignal))throw new TypeError("`signal` must be an instance of AbortSignal if provided.");return new Promise((t,n)=>{let o=setTimeout(()=>{f(),t();},e),f=()=>{clearTimeout(o),r&&r.removeEventListener("abort",i);},i=()=>{f(),n(new DOMException("Delay aborted","AbortError"));};r&&(r.aborted?i():r.addEventListener("abort",i,{once:true}));})};var Xo=(e,r={lowerCaseNextRest:true,trim:false})=>{if(!N(e))return "";m(r)||(r={});let t=r.lowerCaseNextRest!==false;return r.trim===true&&(e=e.trim()),e[0].toUpperCase()+(t?e.slice(1).toLowerCase():e.slice(1))},Qo=(e,r={collapseSpaces:false,trim:false})=>{if(!N(e))return "";let t=e;m(r)||(r={});let n=r.collapseSpaces===true;if(r.trim===true&&(t=t.trim()),n){let f=t.match(/^\s*/)?.[0]??"",i=t.match(/\s*$/)?.[0]??"";t=t.trim().replace(/\s+/g," "),t=`${f}${t}${i}`;}return t.toLowerCase().split(" ").map(f=>f.charAt(0).toUpperCase()+f.slice(1)).join(" ")},ei=e=>N(e)?e.split(/[^a-zA-Z0-9]+/).filter(Boolean).map((r,t)=>t===0?r.toLowerCase():r.charAt(0).toUpperCase()+r.slice(1).toLowerCase()).join(""):"",ri=e=>N(e)?e.split(/[^a-zA-Z0-9]+/).filter(Boolean).map(r=>r.charAt(0).toUpperCase()+r.slice(1).toLowerCase()).join(""):"",ti=e=>N(e)?e.split(/[^a-zA-Z0-9]+/).filter(Boolean).map(r=>r.toLowerCase()).join("-"):"",ni=e=>N(e)?e.split(/[^a-zA-Z0-9]+/).filter(Boolean).map(r=>r.toLowerCase()).join("_"):"",oi=e=>N(e)?e.split(/[^a-zA-Z0-9]+/).filter(Boolean).map(r=>r.toLowerCase()).join("."):"",ii=e=>N(e)?e.split(/[^a-zA-Z0-9]+/).filter(Boolean).map(r=>r.toLowerCase()).join("-").replace(/^-+|-+$/g,""):"";var Te=(e,r={withTrim:true,trimOnly:false})=>{if(!N(e))return "";m(r)||(r={});let{trimOnly:t=false,withTrim:n=true}=r;return t?e.trim():(n&&(e=e.trim()),e.replace(/\s+/g," "))},fi=e=>N(e)?e.trim():"",ne=(e,r={trimOnly:false})=>{if(!N(e))return "";m(r)||(r={});let{trimOnly:t=false}=r;return t?e.trim():e.replace(/\s+/g,"")},ci=e=>c(e)?x(e)?"":e.replace(/<\/?[a-zA-Z][^<>]*\/?>/g," ").trim().replace(/\s+/g," ").trim():void 0;var pi=(e,r,t)=>{if(!g(e)||!c(t)||!c(r))throw new TypeError("Expected 'index' to be a 'number' type,'replaceTo' and 'originalString' to be a 'string' type");if(e<0||e>=r.length)throw new Error("Index parameter is out of range at function `replaceAt`");return r.slice(0,e)+t+r.slice(e+1)},mi=e=>{if(!N(e))return "";e=e.replace(/\s+/g," ").trim();let r=e.split(" ");return r.length>1?r[0][0]+r[1][0].toUpperCase():e.length>1?e.substring(0,2).toUpperCase():e[0].toUpperCase()};var gi=e=>{if(!l(e))throw new Error("Invalid argument:`props` must be an array from function `shouldForwardProp`.");return r=>!e.map(t=>t.toString()).includes(r.toString())};var hi=(e,r,t)=>{if(c(e)){if(x(e))throw new TypeError("`baseUrl` cannot be an empty string.");e=ne(e,{trimOnly:true});}else if(!$(e))throw new TypeError(`Invalid 'baseUrl'. Expected a non-empty string or a URL instance,received:${typeof e}`);if(!w(t)){if(!l(t))throw new TypeError("`removeParams` must be an array of strings.");if(!t.every(n=>c(n)))throw new TypeError("`removeParams` must only contain strings.")}try{if(!w(r)&&!D(r[Symbol.iterator]))throw new TypeError("`queryParams` must be iterable(like URLSearchParams.entries()or an array of [string,string])");let n=new URL(e);if(!w(r)){let o=Object.fromEntries(r);if(!X(o)){let f=new URLSearchParams(n.search);for(let[i,s]of Object.entries(o))f.set(i,s);t?.length&&ce(t)?.map(i=>{f.delete(i);}),n.search=f.toString();}}return t?.forEach(o=>n.searchParams.delete(o)),n}catch(n){throw new Error("Failed to construct a valid URL in `constructURL()`,Error:"+n)}};var Ti=(e,r=null,t={levels:1,removeDuplicates:true})=>{let n=[];!c(e)&&!l(e)&&n.push(`'url' must be a string or an array of strings. Received:${typeof e}`),!c(r)&&!l(r)&&!b(r)&&n.push(`'base' must be a string,array of strings,or null. Received:${typeof r}`),m(t)||n.push(`'options' must be a object. Received:${typeof t}`);let{levels:o=1,removeDuplicates:f=true}=t;if(g(o)||n.push(`'levels' must be a number. Received:${typeof o}`),d(f)||n.push(`'removeDuplicates' must be a boolean. Received:${typeof f}`),z(n))throw new TypeError(`Invalid parameter(s)in getPrefixPathname:- ${n.join(`- `)}`);function i(s){if(r){if(s=L(s),l(r)){for(let u of r)if(s.startsWith(L(u)))return L(u)}else if(s.startsWith(L(r)))return L(r);return null}return `/${s.split("/").filter(Boolean).slice(0,o).join("/")}`}if(l(e)){let s=e.map(i).filter(u=>!b(u)),a=f?[...new Set(s)]:s;return a.length===1?a[0]:a}return i(e)},Ni=(e,r="/")=>{if(!N(r))throw new TypeError(`Invalid parameter:'defaultValue' must be a string and string is non-empty string. Received:${typeof r}(${r})`);if(l(e)){if(!e.every(t=>c(t)))throw new TypeError(`Invalid parameter:'result' array must only contain strings. Received:${JSON.stringify(e)}`);for(let t of e){let n=L(t);if(n!=="/")return n}return L(r)}if(c(e)){let t=L(e);return t!=="/"?t:L(r)}if(!b(e))throw new TypeError(`Invalid parameter:'result' must be a string,array of strings,or null. Received:${JSON.stringify(e)}`);return L(r)},L=(e,r="/")=>{if(!N(r))throw new TypeError(`Invalid parameter:'defaultPath' must be a string and string is non-empty string. Received:${typeof r}(${r})`);if(!N(e))return r;try{if(e=ne(e,{trimOnly:!0}),e=e.replace(/\s+/g,""),e.startsWith("http://")||e.startsWith("https://")){let t=new URL(e);return `${t.pathname}${t.search}${t.hash}`.replace(/^\/+/,"/")}return "/"+e.replace(/^\/+/,"").replace(/\/{2,}/g,"/")}catch(t){let n=ee(t)?t:new Error("Unknown error from function `normalizePathname()`");throw new oe(`Failed to normalize pathname in function \`normalizePathname()\`:${n.message}`,n)}};var Ai=(e,r)=>{if(!N(e))return "";if(!w(r)){if(!m(r))throw new TypeError("Options must be an object.");if("prefixColon"in r&&!d(r.prefixColon))throw new TypeError("Option `prefixColon` must be a boolean.")}let t=e.replace(/\D+/g,"");return t?r?.prefixColon??false?`:${t}`:t:""};var oe=class e extends Error{constructor(t,n){super(t);this.originalError=n;this.name="NormalizePathnameError",Error.captureStackTrace&&Error.captureStackTrace(this,e);}};exports.NormalizePathnameError=oe;exports.areArraysEqual=Pe;exports.areObjectsEqual=Me;exports.areURLsEqualPath=Be;exports.areURLsIdentical=We;exports.arrayHasAnyMatch=He;exports.assertIsString=Un;exports.capitalizeFirst=Xo;exports.capitalizeWords=Qo;exports.censorEmail=uo;exports.chunkString=mo;exports.cleanParsedData=ie;exports.constructURL=hi;exports.convertType=Fr;exports.dedupeArray=hr;exports.delay=Jo;exports.disableUserInteraction=Bn;exports.doesKeyExist=fe;exports.enableUserInteraction=Vn;exports.extractDigits=vr;exports.extractFileName=Yo;exports.extractURLs=lr;exports.filterNullArray=H;exports.findDuplicates=W;exports.formatCurrency=Zn;exports.formatDateFns=so;exports.formatDateIntl=io;exports.formatDateTime=oo;exports.formatEnvPort=Ai;exports.formatNumber=Gn;exports.formatPhoneNumber=Qn;exports.getFirstPrefixPathname=Ni;exports.getGMTOffset=ao;exports.getInitialsName=mi;exports.getPrefixPathname=Ti;exports.getRandomItem=xo;exports.isArguments=de;exports.isArray=l;exports.isArrayBuffer=Vt;exports.isArrayLike=qt;exports.isArrayLikeObject=_t;exports.isBigInt=G;exports.isBoolean=d;exports.isBuffer=ye;exports.isCurrencyLike=it;exports.isDate=v;exports.isDeepEqual=Z;exports.isElement=Xt;exports.isEmpty=rn;exports.isEmptyArray=j;exports.isEmptyDeep=me;exports.isEmptyString=x;exports.isEmptyValue=X;exports.isEqual=P;exports.isEqualWith=fn;exports.isError=ee;exports.isFinite=pe;exports.isFunction=D;exports.isInteger=M;exports.isLength=re;exports.isMatch=gn;exports.isMatchWith=he;exports.isNaN=le;exports.isNative=En;exports.isNil=S;exports.isNonEmptyArray=z;exports.isNonEmptyString=N;exports.isNull=b;exports.isNumber=g;exports.isObject=m;exports.isObjectLoose=Sn;exports.isObjectOrArray=O;exports.isPlainObject=ge;exports.isRegExp=Y;exports.isSafeInteger=On;exports.isServer=_;exports.isSet=jn;exports.isString=c;exports.isSymbol=U;exports.isTypedArray=be;exports.isURL=$;exports.isUndefined=w;exports.isValidURL=Dt;exports.isWeakMap=Cn;exports.noop=Co;exports.normalizePathname=L;exports.normalizeSpaces=Te;exports.normalizeString=fi;exports.omitKeys=Mo;exports.omitKeysDeep=zo;exports.omitProps=Ko;exports.parseCurrencyString=Q;exports.parseCustomDate=Ne;exports.randomInt=J;exports.randomIntByLength=Ao;exports.randomStr=Io;exports.removeElementFocus=Kn;exports.removeObjectPaths=Wr;exports.removeSpaces=ne;exports.replaceAt=pi;exports.safeJsonParse=Br;exports.safeStableStringify=q;exports.scrollToTop=Wn;exports.shouldForwardProp=gi;exports.slugify=ii;exports.stripHtmlTags=ci;exports.textContainsAll=Pt;exports.textContainsAny=Mt;exports.toBooleanContent=Tr;exports.toBooleanContentDeep=ue;exports.toBooleanExplicit=Or;exports.toBooleanLoose=Ir;exports.toCamelCase=ei;exports.toDotCase=oi;exports.toKebabCase=ti;exports.toNumberArrayUnRecursive=gr;exports.toNumberDeep=Hr;exports.toPascalCase=ri;exports.toSnakeCase=ni;exports.toStringArrayUnRecursive=ce;exports.toStringDeep=et;exports.toStringDeepForce=B;exports.truncateString=bo;
|