@untemps/utils 1.7.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/async/standby.js +1 -0
- package/dist/cjs/dom/createElement.js +1 -0
- package/dist/cjs/dom/getElement.js +1 -0
- package/dist/cjs/dom/isElement.js +1 -0
- package/dist/cjs/dom/modifyElement.js +1 -0
- package/dist/cjs/dom/removeElement.js +1 -0
- package/dist/cjs/dom/resolveClassName.js +1 -0
- package/dist/cjs/function/isFunction.js +1 -0
- package/dist/cjs/number/getRandomInteger.js +1 -0
- package/dist/cjs/number/normalizeMinMax.js +1 -0
- package/dist/cjs/string/generateText.js +1 -0
- package/dist/cjs/string/generateTokenizedText.js +1 -0
- package/dist/cjs/string/interpolate.js +1 -0
- package/dist/cjs/string/interpolateLiteral.js +1 -0
- package/dist/cjs/string/isString.js +1 -0
- package/dist/esm/async/standby.js +1 -0
- package/dist/esm/dom/createElement.js +1 -0
- package/dist/esm/dom/{getElement.mjs → getElement.js} +1 -1
- package/dist/esm/dom/isElement.js +1 -0
- package/dist/esm/dom/modifyElement.js +1 -0
- package/dist/esm/dom/removeElement.js +1 -0
- package/dist/esm/dom/resolveClassName.js +1 -0
- package/dist/esm/function/isFunction.js +1 -0
- package/dist/esm/number/getRandomInteger.js +1 -0
- package/dist/esm/number/normalizeMinMax.js +1 -0
- package/dist/esm/string/generateText.js +1 -0
- package/dist/esm/string/generateTokenizedText.js +1 -0
- package/dist/esm/string/{interpolate.mjs → interpolate.js} +1 -1
- package/dist/esm/string/interpolateLiteral.js +1 -0
- package/dist/esm/string/{isString.mjs → isString.js} +1 -1
- package/package.json +16 -11
- package/dist/cjs/_rollupPluginBabelHelpers-ff3cb692.js +0 -1
- package/dist/cjs/async/standby.cjs +0 -1
- package/dist/cjs/dom/createElement.cjs +0 -1
- package/dist/cjs/dom/getElement.cjs +0 -1
- package/dist/cjs/dom/isElement.cjs +0 -1
- package/dist/cjs/dom/modifyElement.cjs +0 -1
- package/dist/cjs/dom/removeElement.cjs +0 -1
- package/dist/cjs/dom/resolveClassName.cjs +0 -1
- package/dist/cjs/function/isFunction.cjs +0 -1
- package/dist/cjs/number/getRandomInteger.cjs +0 -1
- package/dist/cjs/number/normalizeMinMax.cjs +0 -1
- package/dist/cjs/string/generateText.cjs +0 -1
- package/dist/cjs/string/generateTokenizedText.cjs +0 -1
- package/dist/cjs/string/interpolate.cjs +0 -1
- package/dist/cjs/string/interpolateLiteral.cjs +0 -1
- package/dist/cjs/string/isString.cjs +0 -1
- package/dist/esm/_rollupPluginBabelHelpers-2b6ee930.js +0 -1
- package/dist/esm/async/standby.mjs +0 -1
- package/dist/esm/dom/createElement.mjs +0 -1
- package/dist/esm/dom/isElement.mjs +0 -1
- package/dist/esm/dom/modifyElement.mjs +0 -1
- package/dist/esm/dom/removeElement.mjs +0 -1
- package/dist/esm/dom/resolveClassName.mjs +0 -1
- package/dist/esm/function/isFunction.mjs +0 -1
- package/dist/esm/number/getRandomInteger.mjs +0 -1
- package/dist/esm/number/normalizeMinMax.mjs +0 -1
- package/dist/esm/string/generateText.mjs +0 -1
- package/dist/esm/string/generateTokenizedText.mjs +0 -1
- package/dist/esm/string/interpolateLiteral.mjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.standby=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:128;return new Promise((function(t){return setTimeout(t,e)}))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.createElement=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.tag,n=void 0===t?"div":t,d=e.attributes,o=void 0===d?{}:d,r=e.content,l=void 0===r?null:r,i=e.textContent,a=void 0===i?null:i,u=e.parent,c=void 0===u?null:u,v=e.parentSelector,p=void 0===v?null:v,s=document.createElement(n);for(var h in o)s.setAttribute(h,o[h]);l&&s.appendChild(l),a&&!s.hasChildNodes()&&s.appendChild(document.createTextNode(a));var m=c||document.querySelector(p);return m&&m.appendChild(s),s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.getElement=function(e){return document.querySelector(e)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.isElement=function(e){return 1===(null==e?void 0:e.nodeType)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../string/isString.js");exports.modifyElement=function(r){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r;for(var n in e.isString(r)&&(i=document.querySelector(r)),t){var o,u;if(void 0===t[n]||null===t[n])null===(o=i)||void 0===o||o.removeAttribute(n);else null===(u=i)||void 0===u||u.setAttribute(n,t[n])}return i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../string/isString.js");exports.removeElement=function(r){var t,i,o=r;return e.isString(r)&&(o=document.querySelector(r)),null===(t=o)||void 0===t||null===(i=t.parentNode)||void 0===i?void 0:i.removeChild(o)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/toConsumableArray"),r=require("@babel/runtime/helpers/slicedToArray");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=t(e),a=t(r);exports.resolveClassName=function(e){return e.reduce((function(e,r){var t=a.default(r,3),n=t[0],o=t[1],l=t[2];return n&&o?[].concat(u.default(e),[o]):!n&&l?[].concat(u.default(e),[l]):e}),[]).join(" ")};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.isFunction=function(e){return"function"==typeof e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./normalizeMinMax.js");exports.getRandomInteger=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-Number.MAX_SAFE_INTEGER,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_SAFE_INTEGER,t=e.normalizeMinMax(r,n),a=t.min,i=t.max;return a+Math.random()*(i-a)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.normalizeMinMax=function(e,t){return{min:Math.min(e,t),max:Math.max(e,t)}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../number/getRandomInteger.js"),r=require("../number/normalizeMinMax.js"),a=["year","learn","key","cook","crosswalk","script","chief","plan","meat","vague","demonstrator","dictionary","visible","bomber","variation","leader","channel","litigation","royalty","impulse","package","oppose","privilege","begin","operation","herd","hemisphere","incongruous","horror","pipe","start","vertical","worry","reform","unlike","exhibition","disagree","allow","patrol","combine","impress","invisible","cage","log","snow","undertake","division","ethics","damage","responsible"],i=function(e,a){var i=r.normalizeMinMax(Math.abs(e),Math.abs(a)),o=i.min,n=i.max,t=Math.max(o,1);return{min:t,max:Math.max(n,t)}};exports.generateText=function(){for(var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=r.minWords,n=void 0===o?10:o,t=r.maxWords,s=void 0===t?50:t,m=r.dictionary,l=void 0===m?a:m,c="",d=i(n,s),g=d.min,p=d.max,u=e.getRandomInteger(g,p),h=0;h<u;h++){var v=l[Math.floor(Math.random()*l.length)];c+="".concat(h>0?" ":"").concat(v)}return c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./generateText.js");require("../number/getRandomInteger.js"),require("../number/normalizeMinMax.js");exports.generateTokenizedText=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.tokens,n=void 0===r?[]:r,o=t.divider,i=void 0===o?"%":o,a=t.minWords,d=void 0===a?10:a,s=t.maxWords,h=void 0===s?50:s,l=t.dictionary,c=void 0===l?void 0:l,g=e.generateText({minWords:Math.max(d,n.length),maxWords:Math.max(h,n.length),dictionary:c}),m=g.split(" "),v=Math.max(Math.floor((m.length-n.length)/n.length),1),x=[],u=0;u<n.length;u++){var M=Math.floor(Math.random()*v)+v*u;m[M]="".concat(i).concat(n[u]).concat(i),x.push(M)}return{indices:x,text:m.join(" ")}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=function(n){var e=new RegExp("([\\[\\^\\$\\.|\\?\\*\\+\\(\\)])+","g");return n.replace(e,(function(n){return n.split("").map((function(n){return"\\"+n})).join("")}))},e=function(n){return Object.keys(n).reduce((function(n,e,t){return"".concat(n).concat(t>0?"|":"").concat(e)}),"")};exports.interpolate=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"%",o=n(c),u=e(r),a=new RegExp("".concat(o,"(").concat(u,")").concat(o),"g");return t.replace(a,(function(n,e){return r[e]?r[e]:e}))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/construct"),t=require("@babel/runtime/helpers/toConsumableArray");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=r(e),a=r(t);exports.interpolateLiteral=function(e,t){return u.default(Function,a.default(Object.keys(t)).concat(["return `".concat(e,"`")])).apply(void 0,a.default(Object.values(t)))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.isString=function(t){return"string"==typeof t||"[object String]"===Object.prototype.toString.call(t)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:128;return new Promise((function(n){return setTimeout(n,e)}))};export{e as standby};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.tag,n=void 0===t?"div":t,d=e.attributes,o=void 0===d?{}:d,r=e.content,i=void 0===r?null:r,l=e.textContent,a=void 0===l?null:l,u=e.parent,v=void 0===u?null:u,c=e.parentSelector,p=void 0===c?null:c,h=document.createElement(n);for(var C in o)h.setAttribute(C,o[C]);i&&h.appendChild(i),a&&!h.hasChildNodes()&&h.appendChild(document.createTextNode(a));var m=v||document.querySelector(p);return m&&m.appendChild(h),h};export{e as createElement};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=function(e){return document.querySelector(e)};export{e as
|
|
1
|
+
var e=function(e){return document.querySelector(e)};export{e as getElement};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var n=function(n){return 1===(null==n?void 0:n.nodeType)};export{n as isElement};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isString as r}from"../string/isString.js";var t=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t;for(var o in r(t)&&(i=document.querySelector(t)),e){var n,l;if(void 0===e[o]||null===e[o])null===(n=i)||void 0===n||n.removeAttribute(o);else null===(l=i)||void 0===l||l.setAttribute(o,e[o])}return i};export{t as modifyElement};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isString as r}from"../string/isString.js";var o=function(o){var e,i,n=o;return r(o)&&(n=document.querySelector(o)),null===(e=n)||void 0===e||null===(i=e.parentNode)||void 0===i?void 0:i.removeChild(n)};export{o as removeElement};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import r from"@babel/runtime/helpers/toConsumableArray";import e from"@babel/runtime/helpers/slicedToArray";var o=function(o){return o.reduce((function(o,n){var t=e(n,3),a=t[0],c=t[1],i=t[2];return a&&c?[].concat(r(o),[c]):!a&&i?[].concat(r(o),[i]):o}),[]).join(" ")};export{o as resolveClassName};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var n=function(n){return"function"==typeof n};export{n as isFunction};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{normalizeMinMax as r}from"./normalizeMinMax.js";var n=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-Number.MAX_SAFE_INTEGER,m=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_SAFE_INTEGER,o=r(n,m),a=o.min,e=o.max;return a+Math.random()*(e-a)};export{n as getRandomInteger};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a=function(a,n){return{min:Math.min(a,n),max:Math.max(a,n)}};export{a as normalizeMinMax};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getRandomInteger as r}from"../number/getRandomInteger.js";import{normalizeMinMax as a}from"../number/normalizeMinMax.js";var e=["year","learn","key","cook","crosswalk","script","chief","plan","meat","vague","demonstrator","dictionary","visible","bomber","variation","leader","channel","litigation","royalty","impulse","package","oppose","privilege","begin","operation","herd","hemisphere","incongruous","horror","pipe","start","vertical","worry","reform","unlike","exhibition","disagree","allow","patrol","combine","impress","invisible","cage","log","snow","undertake","division","ethics","damage","responsible"],i=function(r,e){var i=a(Math.abs(r),Math.abs(e)),o=i.min,n=i.max,t=Math.max(o,1);return{min:t,max:Math.max(n,t)}},o=function(){for(var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=a.minWords,n=void 0===o?10:o,t=a.maxWords,m=void 0===t?50:t,s=a.dictionary,l=void 0===s?e:s,c="",d=i(n,m),p=d.min,h=d.max,v=r(p,h),g=0;g<v;g++){var b=l[Math.floor(Math.random()*l.length)];c+="".concat(g>0?" ":"").concat(b)}return c};export{o as generateText};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{generateText as o}from"./generateText.js";import"../number/getRandomInteger.js";import"../number/normalizeMinMax.js";var t=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.tokens,r=void 0===n?[]:n,i=t.divider,a=void 0===i?"%":i,e=t.minWords,d=void 0===e?10:e,m=t.maxWords,h=void 0===m?50:m,l=t.dictionary,s=void 0===l?void 0:l,v=o({minWords:Math.max(d,r.length),maxWords:Math.max(h,r.length),dictionary:s}),c=v.split(" "),g=Math.max(Math.floor((c.length-r.length)/r.length),1),x=[],M=0;M<r.length;M++){var p=Math.floor(Math.random()*g)+g*M;c[p]="".concat(a).concat(r[M]).concat(a),x.push(p)}return{indices:x,text:c.join(" ")}};export{t as generateTokenizedText};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var n=function(n){var t=new RegExp("([\\[\\^\\$\\.|\\?\\*\\+\\(\\)])+","g");return n.replace(t,(function(n){return n.split("").map((function(n){return"\\"+n})).join("")}))},t=function(n){return Object.keys(n).reduce((function(n,t,c){return"".concat(n).concat(c>0?"|":"").concat(t)}),"")},c=function(c){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"%",o=n(r),u=t(e),a=new RegExp("".concat(o,"(").concat(u,")").concat(o),"g");return c.replace(a,(function(n,t){return e[t]?e[t]:t}))};export{c as
|
|
1
|
+
var n=function(n){var t=new RegExp("([\\[\\^\\$\\.|\\?\\*\\+\\(\\)])+","g");return n.replace(t,(function(n){return n.split("").map((function(n){return"\\"+n})).join("")}))},t=function(n){return Object.keys(n).reduce((function(n,t,c){return"".concat(n).concat(c>0?"|":"").concat(t)}),"")},c=function(c){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"%",o=n(r),u=t(e),a=new RegExp("".concat(o,"(").concat(u,")").concat(o),"g");return c.replace(a,(function(n,t){return e[t]?e[t]:t}))};export{c as interpolate};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import r from"@babel/runtime/helpers/construct";import e from"@babel/runtime/helpers/toConsumableArray";var t=function(t,o){return r(Function,e(Object.keys(o)).concat(["return `".concat(t,"`")])).apply(void 0,e(Object.values(o)))};export{t as interpolateLiteral};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var t=function(t){return"string"==typeof t||"[object String]"===Object.prototype.toString.call(t)};export{t as
|
|
1
|
+
var t=function(t){return"string"==typeof t||"[object String]"===Object.prototype.toString.call(t)};export{t as isString};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@untemps/utils",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": "git@github.com:untemps/utils.git",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
],
|
|
16
16
|
"exports": {
|
|
17
17
|
"./*": {
|
|
18
|
-
"import": "./dist/esm/*.
|
|
19
|
-
"require": "./dist/cjs/*.
|
|
18
|
+
"import": "./dist/esm/*.js",
|
|
19
|
+
"require": "./dist/cjs/*.js"
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"engines": {
|
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
"@babel/core": "^7.17.5",
|
|
28
28
|
"@babel/plugin-transform-runtime": "^7.17.0",
|
|
29
29
|
"@babel/preset-env": "^7.16.11",
|
|
30
|
-
"@
|
|
30
|
+
"@commitlint/cli": "^16.2.3",
|
|
31
|
+
"@commitlint/config-conventional": "^16.2.1",
|
|
31
32
|
"@rollup/plugin-babel": "^5.3.1",
|
|
32
33
|
"@rollup/plugin-node-resolve": "^13.1.3",
|
|
33
34
|
"@rollup/plugin-strip": "^2.1.0",
|
|
@@ -37,9 +38,10 @@
|
|
|
37
38
|
"@testing-library/dom": "^8.11.3",
|
|
38
39
|
"@testing-library/jest-dom": "^5.16.2",
|
|
39
40
|
"babel-jest": "^27.5.1",
|
|
41
|
+
"commitlint": "^16.2.3",
|
|
40
42
|
"cross-env": "^7.0.2",
|
|
41
43
|
"fast-check": "^2.22.0",
|
|
42
|
-
"husky": "^7.0.
|
|
44
|
+
"husky": "^7.0.0",
|
|
43
45
|
"jest": "^27.5.1",
|
|
44
46
|
"prettier": "^2.5.1",
|
|
45
47
|
"rimraf": "^3.0.2",
|
|
@@ -50,10 +52,8 @@
|
|
|
50
52
|
"rollup-plugin-terser": "^7.0.2",
|
|
51
53
|
"semantic-release": "^19.0.2"
|
|
52
54
|
},
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"pre-commit": "yarn test:ci && yarn prettier"
|
|
56
|
-
}
|
|
55
|
+
"dependencies": {
|
|
56
|
+
"@babel/runtime": "^7.17.8"
|
|
57
57
|
},
|
|
58
58
|
"jest": {
|
|
59
59
|
"setupFilesAfterEnv": [
|
|
@@ -65,7 +65,11 @@
|
|
|
65
65
|
},
|
|
66
66
|
"release": {
|
|
67
67
|
"branches": [
|
|
68
|
-
"main"
|
|
68
|
+
"main",
|
|
69
|
+
{
|
|
70
|
+
"name": "beta",
|
|
71
|
+
"prerelease": true
|
|
72
|
+
}
|
|
69
73
|
],
|
|
70
74
|
"plugins": [
|
|
71
75
|
[
|
|
@@ -93,6 +97,7 @@
|
|
|
93
97
|
"build": "rimraf dist && yarn build:cjs && yarn build:esm",
|
|
94
98
|
"build:cjs": "cross-env NODE_ENV=production BABEL_ENV=cjs rollup -c",
|
|
95
99
|
"build:esm": "cross-env NODE_ENV=production BABEL_ENV=esm rollup -c",
|
|
96
|
-
"prettier": "prettier \"*/**/*.js\" --ignore-path ./.prettierignore --write && git add . && git status"
|
|
100
|
+
"prettier": "prettier \"*/**/*.js\" --ignore-path ./.prettierignore --write && git add . && git status",
|
|
101
|
+
"prepare": "husky install"
|
|
97
102
|
}
|
|
98
103
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";function t(r,n){return t=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t},t(r,n)}function r(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function n(e,o,u){return n=r()?Reflect.construct:function(r,n,e){var o=[null];o.push.apply(o,n);var u=new(Function.bind.apply(r,o));return e&&t(u,e.prototype),u},n.apply(null,arguments)}function e(t,r){if(t){if("string"==typeof t)return o(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,r):void 0}}function o(t,r){(null==r||r>t.length)&&(r=t.length);for(var n=0,e=new Array(r);n<r;n++)e[n]=t[n];return e}exports._construct=n,exports._slicedToArray=function(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var e,o,u=[],a=!0,l=!1;try{for(n=n.call(t);!(a=(e=n.next()).done)&&(u.push(e.value),!r||u.length!==r);a=!0);}catch(t){l=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return u}(t,r)||e(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},exports._toConsumableArray=function(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||e(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";module.exports=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:128;return new Promise((function(t){return setTimeout(t,e)}))};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";module.exports=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.tag,n=void 0===t?"div":t,d=e.attributes,o=void 0===d?{}:d,i=e.content,l=void 0===i?null:i,r=e.textContent,u=void 0===r?null:r,a=e.parent,v=void 0===a?null:a,c=e.parentSelector,p=void 0===c?null:c,s=document.createElement(n);for(var h in o)s.setAttribute(h,o[h]);l&&s.appendChild(l),u&&!s.hasChildNodes()&&s.appendChild(document.createTextNode(u));var m=v||document.querySelector(p);return m&&m.appendChild(s),s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";module.exports=function(e){return document.querySelector(e)};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";module.exports=function(e){return 1===(null==e?void 0:e.nodeType)};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require('../string/isString.cjs');module.exports=function(r){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r;for(var u in e(r)&&(i=document.querySelector(r)),t){var n,o;if(void 0===t[u]||null===t[u])null===(n=i)||void 0===n||n.removeAttribute(u);else null===(o=i)||void 0===o||o.setAttribute(u,t[u])}return i};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require('../string/isString.cjs');module.exports=function(r){var i,o,t=r;return e(r)&&(t=document.querySelector(r)),null===(i=t)||void 0===i||null===(o=i.parentNode)||void 0===o?void 0:o.removeChild(t)};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var r=require('../_rollupPluginBabelHelpers-ff3cb692.cjs');module.exports=function(e){return e.reduce((function(e,o){var n=r._slicedToArray(o,3),u=n[0],t=n[1],a=n[2];return u&&t?[].concat(r._toConsumableArray(e),[t]):!u&&a?[].concat(r._toConsumableArray(e),[a]):e}),[]).join(" ")};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";module.exports=function(t){return"function"==typeof t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var r=require('./normalizeMinMax.cjs');module.exports=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-Number.MAX_SAFE_INTEGER,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_SAFE_INTEGER,i=r(e,n),t=i.min,a=i.max;return t+Math.random()*(a-t)};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";module.exports=function(t,m){return{min:Math.min(t,m),max:Math.max(t,m)}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require('../number/normalizeMinMax.cjs'),r=require('../number/getRandomInteger.cjs'),i=["year","learn","key","cook","crosswalk","script","chief","plan","meat","vague","demonstrator","dictionary","visible","bomber","variation","leader","channel","litigation","royalty","impulse","package","oppose","privilege","begin","operation","herd","hemisphere","incongruous","horror","pipe","start","vertical","worry","reform","unlike","exhibition","disagree","allow","patrol","combine","impress","invisible","cage","log","snow","undertake","division","ethics","damage","responsible"],a=function(r,i){var a=e(Math.abs(r),Math.abs(i)),o=a.min,n=a.max,t=Math.max(o,1);return{min:t,max:Math.max(n,t)}};module.exports=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=e.minWords,n=void 0===o?10:o,t=e.maxWords,s=void 0===t?50:t,m=e.dictionary,l=void 0===m?i:m,c="",d=a(n,s),h=d.min,u=d.max,p=r(h,u),v=0;v<p;v++){var g=l[Math.floor(Math.random()*l.length)];c+="".concat(v>0?" ":"").concat(g)}return c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require('./generateText.cjs');require('../number/normalizeMinMax.cjs'),require('../number/getRandomInteger.cjs');module.exports=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=t.tokens,r=void 0===o?[]:o,n=t.divider,i=void 0===n?"%":n,a=t.minWords,d=void 0===a?10:a,h=t.maxWords,s=void 0===h?50:h,m=t.dictionary,l=void 0===m?void 0:m,c=e({minWords:Math.max(d,r.length),maxWords:Math.max(s,r.length),dictionary:l}),v=c.split(" "),g=Math.max(Math.floor((v.length-r.length)/r.length),1),u=[],x=0;x<r.length;x++){var M=Math.floor(Math.random()*g)+g*x;v[M]="".concat(i).concat(r[x]).concat(i),u.push(M)}return{indices:u,text:v.join(" ")}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var n=function(n){var t=new RegExp("([\\[\\^\\$\\.|\\?\\*\\+\\(\\)])+","g");return n.replace(t,(function(n){return n.split("").map((function(n){return"\\"+n})).join("")}))},t=function(n){return Object.keys(n).reduce((function(n,t,c){return"".concat(n).concat(c>0?"|":"").concat(t)}),"")};module.exports=function(c){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"%",o=n(r),u=t(e),a=new RegExp("".concat(o,"(").concat(u,")").concat(o),"g");return c.replace(a,(function(n,t){return e[t]?e[t]:t}))};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require('../_rollupPluginBabelHelpers-ff3cb692.cjs');module.exports=function(r,t){return e._construct(Function,e._toConsumableArray(Object.keys(t)).concat(["return `".concat(r,"`")])).apply(void 0,e._toConsumableArray(Object.values(t)))};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";module.exports=function(t){return"string"==typeof t||"[object String]"===Object.prototype.toString.call(t)};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function t(r,n){return t=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t},t(r,n)}function r(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function n(e,o,u){return n=r()?Reflect.construct:function(r,n,e){var o=[null];o.push.apply(o,n);var u=new(Function.bind.apply(r,o));return e&&t(u,e.prototype),u},n.apply(null,arguments)}function e(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var e,o,u=[],a=!0,l=!1;try{for(n=n.call(t);!(a=(e=n.next()).done)&&(u.push(e.value),!r||u.length!==r);a=!0);}catch(t){l=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return u}(t,r)||u(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||u(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,r){if(t){if("string"==typeof t)return a(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,r):void 0}}function a(t,r){(null==r||r>t.length)&&(r=t.length);for(var n=0,e=new Array(r);n<r;n++)e[n]=t[n];return e}export{e as _,o as a,n as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:128;return new Promise((function(t){return setTimeout(t,e)}))};export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.tag,n=void 0===t?"div":t,d=e.attributes,o=void 0===d?{}:d,l=e.content,r=void 0===l?null:l,a=e.textContent,i=void 0===a?null:a,u=e.parent,v=void 0===u?null:u,c=e.parentSelector,p=void 0===c?null:c,h=document.createElement(n);for(var s in o)h.setAttribute(s,o[s]);r&&h.appendChild(r),i&&!h.hasChildNodes()&&h.appendChild(document.createTextNode(i));var C=v||document.querySelector(p);return C&&C.appendChild(h),h};export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=function(e){return 1===(null==e?void 0:e.nodeType)};export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import r from'../string/isString.mjs';var t=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t;for(var o in r(t)&&(i=document.querySelector(t)),e){var n,l;if(void 0===e[o]||null===e[o])null===(n=i)||void 0===n||n.removeAttribute(o);else null===(l=i)||void 0===l||l.setAttribute(o,e[o])}return i};export{t as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import r from'../string/isString.mjs';var e=function(e){var o,t,i=e;return r(e)&&(i=document.querySelector(e)),null===(o=i)||void 0===o||null===(t=o.parentNode)||void 0===t?void 0:t.removeChild(i)};export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as r,a as e}from'../_rollupPluginBabelHelpers-2b6ee930.mjs';var a=function(a){return a.reduce((function(a,n){var o=r(n,3),t=o[0],u=o[1],c=o[2];return t&&u?[].concat(e(a),[u]):!t&&c?[].concat(e(a),[c]):a}),[]).join(" ")};export{a as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t=function(t){return"function"==typeof t};export{t as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import r from'./normalizeMinMax.mjs';var a=function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-Number.MAX_SAFE_INTEGER,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_SAFE_INTEGER,e=r(a,n),m=e.min,o=e.max;return m+Math.random()*(o-m)};export{a as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var a=function(a,t){return{min:Math.min(a,t),max:Math.max(a,t)}};export{a as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import a from'../number/normalizeMinMax.mjs';import r from'../number/getRandomInteger.mjs';var e=["year","learn","key","cook","crosswalk","script","chief","plan","meat","vague","demonstrator","dictionary","visible","bomber","variation","leader","channel","litigation","royalty","impulse","package","oppose","privilege","begin","operation","herd","hemisphere","incongruous","horror","pipe","start","vertical","worry","reform","unlike","exhibition","disagree","allow","patrol","combine","impress","invisible","cage","log","snow","undertake","division","ethics","damage","responsible"],i=function(r,e){var i=a(Math.abs(r),Math.abs(e)),o=i.min,n=i.max,t=Math.max(o,1);return{min:t,max:Math.max(n,t)}},o=function(){for(var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=a.minWords,n=void 0===o?10:o,t=a.maxWords,m=void 0===t?50:t,s=a.dictionary,l=void 0===s?e:s,c="",d=i(n,m),p=d.min,h=d.max,v=r(p,h),g=0;g<v;g++){var u=l[Math.floor(Math.random()*l.length)];c+="".concat(g>0?" ":"").concat(u)}return c};export{o as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import t from'./generateText.mjs';import'../number/normalizeMinMax.mjs';import'../number/getRandomInteger.mjs';var o=function(){for(var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=o.tokens,a=void 0===n?[]:n,r=o.divider,i=void 0===r?"%":r,e=o.minWords,d=void 0===e?10:e,m=o.maxWords,h=void 0===m?50:m,l=o.dictionary,s=void 0===l?void 0:l,v=t({minWords:Math.max(d,a.length),maxWords:Math.max(h,a.length),dictionary:s}),c=v.split(" "),g=Math.max(Math.floor((c.length-a.length)/a.length),1),x=[],M=0;M<a.length;M++){var f=Math.floor(Math.random()*g)+g*M;c[f]="".concat(i).concat(a[M]).concat(i),x.push(f)}return{indices:x,text:c.join(" ")}};export{o as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as e,a}from'../_rollupPluginBabelHelpers-2b6ee930.mjs';var t=function(t,r){return e(Function,a(Object.keys(r)).concat(["return `".concat(t,"`")])).apply(void 0,a(Object.values(r)))};export{t as default};
|