seqda 1.1.3 → 2.1.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/.eslintrc.cjs +95 -0
- package/README.md +220 -79
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/index.js +27 -16
- package/webpack.config.js +0 -50
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={187:e=>{var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function ReflectApply(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function ReflectOwnKeys(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function ReflectOwnKeys(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function NumberIsNaN(e){return e!=e};function EventEmitter(){EventEmitter.init.call(this)}e.exports=EventEmitter,e.exports.once=function once(e,t){return new Promise((function(n,r){function errorListener(n){e.removeListener(t,resolver),r(n)}function resolver(){"function"==typeof e.removeListener&&e.removeListener("error",errorListener),n([].slice.call(arguments))}eventTargetAgnosticAddListener(e,t,resolver,{once:!0}),"error"!==t&&function addErrorHandlerIfEventEmitter(e,t,n){"function"==typeof e.on&&eventTargetAgnosticAddListener(e,"error",t,n)}(e,errorListener,{once:!0})}))},EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._eventsCount=0,EventEmitter.prototype._maxListeners=void 0;var o=10;function checkListener(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function _getMaxListeners(e){return void 0===e._maxListeners?EventEmitter.defaultMaxListeners:e._maxListeners}function _addListener(e,t,n,r){var i,o,s;if(checkListener(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=_getMaxListeners(e))>0&&s.length>i&&!s.warned){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=e,a.type=t,a.count=s.length,function ProcessEmitWarning(e){console&&console.warn&&console.warn(e)}(a)}return e}function onceWrapper(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _onceWrap(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=onceWrapper.bind(r);return i.listener=n,r.wrapFn=i,i}function _listeners(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function unwrapListeners(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):arrayClone(i,i.length)}function listenerCount(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function arrayClone(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function eventTargetAgnosticAddListener(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function wrapListener(i){r.once&&e.removeEventListener(t,wrapListener),n(i)}))}}Object.defineProperty(EventEmitter,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),EventEmitter.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},EventEmitter.prototype.setMaxListeners=function setMaxListeners(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},EventEmitter.prototype.getMaxListeners=function getMaxListeners(){return _getMaxListeners(this)},EventEmitter.prototype.emit=function emit(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)r(u,this,t);else{var f=u.length,c=arrayClone(u,f);for(n=0;n<f;++n)r(c[n],this,t)}return!0},EventEmitter.prototype.addListener=function addListener(e,t){return _addListener(this,e,t,!1)},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.prependListener=function prependListener(e,t){return _addListener(this,e,t,!0)},EventEmitter.prototype.once=function once(e,t){return checkListener(t),this.on(e,_onceWrap(this,e,t)),this},EventEmitter.prototype.prependOnceListener=function prependOnceListener(e,t){return checkListener(t),this.prependListener(e,_onceWrap(this,e,t)),this},EventEmitter.prototype.removeListener=function removeListener(e,t){var n,r,i,o,s;if(checkListener(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function spliceOne(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},EventEmitter.prototype.off=EventEmitter.prototype.removeListener,EventEmitter.prototype.removeAllListeners=function removeAllListeners(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},EventEmitter.prototype.listeners=function listeners(e){return _listeners(this,e,!0)},EventEmitter.prototype.rawListeners=function rawListeners(e){return _listeners(this,e,!1)},EventEmitter.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):listenerCount.call(e,t)},EventEmitter.prototype.listenerCount=listenerCount,EventEmitter.prototype.eventNames=function eventNames(){return this._eventsCount>0?t(this._events):[]}},320:(e,t,n)=>{const r=n(447);function extend(){function _extend(o,s,a,u){var f,c=4;if(t)for(var l=c,p=arguments.length;l<p;l++){if((d=arguments[l])&&d instanceof Object){var v=Object.keys(d);n||(v=v.concat(Object.getOwnPropertySymbols(d)));for(var h=0,b=v.length;h<b;h++){if("__proto__"!==(g=v[h])&&"constructor"!==g&&"prototype"!==g&&(!0===i||!u.hasOwnProperty(g))){f=d[g];var y=u[g];if(!e||!1!==e(g,f,d,y,u,a,o,s)){if(f&&"object"==typeof f&&!(f instanceof String)&&!(f instanceof Number)&&(f.constructor===Object.prototype.constructor||f.constructor===Array.prototype.constructor)){var m=f instanceof Array;y||(y=m?[]:{}),f=_extend(g,d,a+1,m?[]:{},y,f)}u[g]=f}}}}}else for(l=c,p=arguments.length;l<p;l++){var d;if((d=arguments[l])&&d instanceof Object){v=Object.keys(d);n||(v=v.concat(Object.getOwnPropertySymbols(d)));for(h=0,b=v.length;h<b;h++){var g;if("__proto__"!==(g=v[h])&&"constructor"!==g&&"prototype"!==g&&(!0===i||!u.hasOwnProperty(g))){if(f=d[g],e){y=u[g];if(!1===e(g,f,d,y,u,a,o,s))continue}u[g]=f}}}}if(u._audit){var O=u._audit.base;O.modified=r.now(),O.updateCount++}return u}if(0!==arguments.length){if(1===arguments.length)return arguments[0];var e,t=!1,n=!1,i=!0,o=0,s=arguments[0];"boolean"==typeof s?(t=s,o++):"number"==typeof s&&(t=s&extend.DEEP,n=s&extend.NO_SYMBOLS,i=!(s&extend.NO_OVERWRITE),o++,e=s&extend.FILTER?arguments[o++]:void 0),(s=arguments[o++])||(s={});for(var a=[null,null,0,s],u=o,f=arguments.length;u<f;u++)a.push(arguments[u]);return _extend.apply(this,a)}}function toArray(e){return e instanceof Array?e:[e]}function arrayUnion(...e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];if(i instanceof Array)for(var o=0,s=i.length;o<s;o++){var a=i[o];t.set(a,a)}else t.set(i,i)}return Array.from(t.values())}!function extend_const(e){e.DEEP=1,e.NO_OVERWRITE=2,e.FILTER=4,e.NO_SYMBOLS=8}(extend),e.exports={arrayFlatten:function arrayFlatten(e){let t=[];for(let n=0,r=e.length;n<r;n++){let r=e[n];Array.isArray(r)?t=t.concat(arrayFlatten(r)):t.push(r)}return t},arraySubtract:function arraySubtract(...e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];if(i instanceof Array)for(var o=0,s=i.length;o<s;o++){var a=i[o];0===n?t.set(a,a):t.delete(a)}else 0===n?t.set(i,i):t.delete(i)}return Array.from(t.values())},arrayUnion,coerceValue:function coerceValue(e,t,n){var r=e,i=t?t.toLowerCase():t,o=arguments.length>2;const parseBoolean=(e,t)=>{if(null==e)return!!t&&void 0;var n=typeof e;if("boolean"===n||e instanceof Boolean)return"function"==typeof e.valueOf?e.valueOf():e;if(!t&&("number"===n||"bigint"===n||e instanceof Number)){if("bigint"===n)return!!e;if(!isFinite(e)){if(t)return;return!isNaN(e)}return!!e}if(!("string"===n||e instanceof String))return t?void 0:!!e;if(!t){var r=parseNumber(e,!0);if("number"==typeof r)return!!r}return!!(""+e).match(/^['"]*true['"]*$/i)||!(""+e).match(/^['"]*false['"]*$/i)&&void 0},parseNumber=(e,t)=>{if(null!=e){var n=typeof e;if("bigint"===n)return parseFloat(e);if("number"===n||e instanceof Number){var r=e instanceof Number?e.valueOf():e;return isFinite(r)?r:t?void 0:0}if(!t&&("boolean"===n||e instanceof Boolean))return e?1:0;if(("string"===n||e instanceof String)&&(!t||!e.match(/[^\d.e-]/))){var i=e.split(/[^\d.e-]+/g).map((e=>e.replace(/[^\d.e-]+/g,""))).filter(Boolean)[0];if(i){r=parseFloat(i);if(isFinite(r))return r}}}},parseString=(e,t)=>{if(null!=e){var n=typeof e;return"number"===n||e instanceof Number?isFinite(e)?""+e:void 0:"boolean"===n||e instanceof Boolean||"bigint"===n?""+e:"string"===n||e instanceof String?(""+e).replace(/^(['"])(.*)\1$/,"$2"):t?e:void 0}};var s,a;return i?"integer"===i||"int"===i||"number"===i||"bigint"===i?("integer"===i||"int"===i?s=Math.round:"bigint"===i&&(s=e=>BigInt(Math.round(e))),null==(a=parseNumber(r))?o?n:0:s?s(a):a):"bool"===i||"boolean"===i?null==(a=parseBoolean(r))&&o?n:a:null==(a=parseString(r))?o?n:"":a:null==r?o?n:r:"boolean"==typeof(a=parseBoolean(r,!0))||"number"==typeof(a=parseNumber(r,!0))?a:"string"==typeof r||r instanceof String?null==(a=parseString(r,!0))?o?n:"":a:r},extend,pluck:function pluck(e){for(var t=[],n=e instanceof Array,i=1,o=arguments.length;i<o;i++){var s=arguments[i];if(s)for(var a=Object.keys(s),u=0,f=a.length;u<f;u++){var c,l=s[u];if(n){c=new Array(e.length);for(var p=0,v=e.length;p<v;p++){var h=e[p];c[p]=r.get(l,h)}}else c=r.get(l,e);t.push(c)}}return t},propsDiffer:function propsDiffer(e,t,n,r=!1){if(e===t)return!1;if(typeof e!=typeof t)return!0;if(null==e||null==t)return e!==t;if("string"==typeof e||e instanceof String||"number"==typeof e||e instanceof Number||"boolean"==typeof e||e instanceof Boolean||"bigint"==typeof e||e instanceof BigInt)return e.valueOf()!==t.valueOf();var i;if(n instanceof Array)i=n;else{var o=Object.keys(e),s=Object.keys(t);if(r&&(o=o.concat(Object.getOwnPropertySymbols(e)),s=s.concat(Object.getOwnPropertySymbols(t))),o.length!==s.length)return!0;i=arrayUnion(o,s)}for(var a=0,u=i.length;a<u;a++){var f=i[a];if(e[f]!==t[f])return!0}return!1},subtractFromArray:function subtractFromArray(e,t){if(arguments.length<2)return e.slice();var n=toArray(t);return e.filter((e=>!(n.indexOf(e)>=0)))},toArray,toLookup:function toLookup(e,t){if(!t)return{};for(var n={},i=Object.keys(t),o=0,s=i.length;o<s;o++){var a=t[i[o]],u=r.get(a,e);null!=u&&(n[""+u]=a)}return n},uniq:function uniq(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];t.set(i,!0)}return Array.from(t.keys())}}},309:(e,t,n)=>{const r=n(447),i=n(590),o=n(320),s=n(827);e.exports=Object.assign(e.exports,r,i,o,s)},590:e=>{e.exports={safeJSONStringify:function safeJSONStringify(e,t,n){var r=function safeCloneObj(e,t,n){var r=t;if(null==r)return r;var i=typeof r;if("string"===i||r instanceof String||"number"===i||r instanceof Number||"boolean"===i||r instanceof Boolean)return r.valueOf();if("bigint"===i)return r;var o=n||[],s=o.findIndex((e=>e.oldValue===r));if(s>=0)return`::@${s}@::`;"function"==typeof r.toJSON&&(r=r.toJSON.call(r,""));var a=Object.keys(r),u=r instanceof Array,f=u?new Array(r.length):{};s=o.length,o.push({referenced:!1,newValue:f,oldValue:r});for(var c=0,l=a.length;c<l;c++){e=a[c];var p=r[e];if(void 0===p){if(!u)continue;p=null}p&&"function"==typeof p.toJSON&&(p=p.toJSON(e)),null!==p&&(p=safeCloneObj(e,p,o)),f[e]=p}return{"::@id@::":s,value:f}}(null,e,[]);return JSON.stringify(r,t,n)},safeJSONParse:function safeJSONParse(e){if(void 0!==e&&""!==e){if("null"===e||null===e)return null;try{var t=JSON.parse(e);if("string"==typeof t||"number"==typeof t||"boolean"==typeof t||t instanceof Array)return t;if(e.indexOf("::@id@::")<0)return t;var n={};return function buildRefs(e,t,n){if(!t)return t;if(!t.hasOwnProperty("::@id@::"))return t;var r=n||{},i=t["::@id@::"],o=t.value,s=Object.keys(o),a=o instanceof Array?new Array(o.length):{};r[i]=a;for(var u=0,f=s.length;u<f;u++)if(!(e=s[u]).match(/::@(id|\d+)@::/)){var c=buildRefs(e,o[e],r);a[e]=c}return a}(null,t,n),function unwindData(e,t,n){if(!t)return t;if("string"==typeof t){var r=t.match(/::@(\d)+@::/);return r?unwindData(e,n[r[1]],n):t}if(!t.hasOwnProperty("::@id@::"))return t;for(var i=t["::@id@::"],o=t.value,s=Object.keys(o),a=n[i],u=0,f=s.length;u<f;u++)if(!(e=s[u]).match(/::@(id|\d+)@::/)){var c=unwindData(e,o[e],n);a[e]=c}return a}(null,t,n)}catch(e){return}}}}},827:e=>{e.exports={lerp:function lerp(e,t,n){return(t-e)*n+e},clamp:function clamp(e,t,n){var r=t<n?t:n,i=n<t?t:n;return e<r?r:e>i?i:e},snapToGrid:function snapToGrid(e,t,n,r,i){var o=n,s=r||0,a=i||1e3;return o||(o=Math.round),"string"==typeof o&&"function"==typeof Math[o]&&(o=Math[o]),(o(t*a*o((s+e)*a/(t*a)))-s*a)/a}}},447:function(e){const t="undefined"!=typeof performance&&performance.now?performance.now.bind(performance):"undefined"!=typeof process&&process.hrtime?function(){var e=process.hrtime();return 1e3*e[0]+e[1]/1e6}:"undefined"!=typeof preciseTime?preciseTime:"function"==typeof Date.now?Date.now.bind(Date):function(){return(new Date).getTime()/1e3};function initAudit(e){if(!e||Object.isExtensible(e)&&!Object.isFrozen(e)){var n=t();Object.defineProperty(e,"_audit",{writable:!0,enumerable:!1,configurable:!0,value:{base:{created:n,modified:n,updateCount:0},_meta:{created:n,modified:n,updateCount:0}}})}}function prop(e,n,r){var i,o,s,a,u,f=n,c=1,l=2,p=4,v=!1,h="g"===(i=e.charAt(0))?c:"s"===i?l:p,b=[];switch(e){case"getMetaNS":case"setMetaNS":case"removeMetaNS":o=3,s=4,a=f.hasOwnProperty("_meta")&&f._meta.hasOwnProperty(r)?f._meta[r]:initMeta(f,r),b=["_meta",r];break;case"getMeta":case"setMeta":case"removeMeta":v=!0,o=2,s=3,a=f.hasOwnProperty("_meta")?f._meta:initMeta(f),b=["_meta"];break;default:o=2,s=3,a=f}if(!a||!(a instanceof Object)||"string"==typeof a||"number"==typeof a||"boolean"==typeof a||a instanceof String||a instanceof Number||a instanceof Boolean){if(h&(c|p))return arguments[s];throw new Error("Attempt to set on and empty context")}var y,m=""+arguments[o],d=[];if(!m){if(h&l)return"";if(h&p)return;return arguments[s]}if(m.indexOf(".")>-1||m.indexOf("[")>-1)for(var g=0,O=1,E=(d=m.indexOf("\\")>-1?m.replace(/([^\\])\[/g,"$1.[").replace(/([^\\])\./g,"$1..").replace(/\\([.\[])/g,"$1").split(".."):m.replace(/\[/g,".[").split(".")).length;g<E;g++,O++){var _=d[g],w=O>=E,S="["===_.charAt(0);if(S&&(_=_.substring(1,_.length-1)),a&&!a.hasOwnProperty(_)&&a.hasOwnProperty(Symbol.for(_))&&(_=Symbol.for(_)),u=a[_],h&p&&w)return!a||Object.isExtensible(a)&&!Object.isFrozen(a)?(!0===arguments[s]?delete a[_]:a[_]=void 0,u):u;if(h&l){if(w||null==u||!w&&(!(u instanceof Object)||u instanceof Number||u instanceof String||u instanceof Boolean)?(y=!w&&"["===d[O].charAt(0),u=w?arguments[s]:y?[]:{},a instanceof Array&&!_?(S=!0,a&&Object.isExtensible(a)&&!Object.isFrozen(a)&&(_=""+(a.push(u)-1),a=u)):_&&(a&&Object.isExtensible(a)&&!Object.isFrozen(a)&&(a[_]=u),a=u)):a=u,_){if("symbol"==typeof _){var j=_.toString();_=j.substring(7,j.length-1)}b.push(S?"["+_+"]":_)}}else{if(null==u||("number"==typeof u||u instanceof Number)&&(isNaN(u)||!isFinite(u)))return s>=arguments.length?u:arguments[s];a=u}}else{if(a&&!a.hasOwnProperty(m)&&a.hasOwnProperty(Symbol.for(m))&&(m=Symbol.for(m)),h&p)return!a||Object.isExtensible(a)&&!Object.isFrozen(a)?(u=a[m],!0===arguments[s]?delete a[m]:a[m]=void 0,u):u;if(h&l)return a&&Object.isExtensible(a)&&!Object.isFrozen(a)&&(a[m]=arguments[s]),m;u=a[m]}if(h&c)return null==u||("number"==typeof u||u instanceof Number)&&(isNaN(u)||!isFinite(u))?s>=arguments.length?u:arguments[s]:u;f.hasOwnProperty("_audit")||initAudit(f);var L=t();if(v&&f._audit){var x=f._audit.meta;x.modified=L,x.updateCount++}else if(f._audit){var A=f._audit.base;A.modified=L,A.updateCount++}return h&l?b.join(".").replace(/\.\[/g,"["):u}function instanceOf(e){function testType(e,t){var n=t,r=typeof e;return n===String?n="string":n===Number?n="number":n===Boolean?n="boolean":n===Function?n="function":n===Array?n="array":n===Object?n="object":n===Promise?n="promise":n===BigInt&&(n="bigint"),"object"===n&&(e.constructor===Object.prototype.constructor||"Object"===e.constructor.name)||(!("promise"!==n&&"deferred"!==n||!function isDeferredType(e){return e instanceof Promise||"function"==typeof e.then}(e))||("object"!==n&&n===r||!("number"===n&&("number"==typeof e||e instanceof Number)&&!isFinite(e))&&("number"===n&&e instanceof Number||("string"===n&&e instanceof String||("boolean"===n&&e instanceof Boolean||("function"===n&&"function"===r||("array"===n&&e instanceof Array||"function"==typeof n&&e instanceof n)))))))}if(null==e)return!1;for(var t=1,n=arguments.length;t<n;t++)if(!0===testType(e,arguments[t]))return!0;return!1}function sizeOf(e){return null==e?0:("number"==typeof e.length||e.length instanceof Number)&&isFinite(e.length)?e.length:e.constructor===Object.prototype.constructor||"Object"===e.constructor.name?Object.keys(e).length+Object.getOwnPropertySymbols(e).length:0}function isEmpty(){for(var e=0,t=arguments.length;e<t;e++){var n=arguments[e];if(null==n)return!0;if(n!==1/0){if(instanceOf(n,"string"))return!n.match(/\S/);if(!(instanceOf(n,"number")&&isFinite(n)||instanceOf(n,"boolean","bigint","function")||0!=sizeOf(n)))return!0}}return!1}function lastValue(e,t){if(!e||!e.length)return t;var n=e[e.length-1];return null==n&&arguments.length>1?t:n}function capitalize(e,t){var n=e;return isEmpty(n)?n:(""+n).replace(t?/(^|\s)(\S)/gi:/^(\s*)(\S)/i,(function(e,t,n){return t+n.toLocaleUpperCase()}))}function uncapitalize(e){var t=e;return isEmpty(t)?t:t.replace(/^./,(e=>e.toLocaleLowerCase()))}const n=prop.bind(this,"get"),r=prop.bind(this,"set"),i=prop.bind(this,"remove"),o=prop.bind(this,"getMeta"),s=prop.bind(this,"setMeta"),a=prop.bind(this,"removeMeta"),u=prop.bind(this,"getMetaNS"),f=prop.bind(this,"setMetaNS"),c=prop.bind(this,"removeMetaNS");e.exports={camelCaseToSnakeCase:function camelCaseToSnakeCase(e){if(!e)return e;for(var t=e.replace(/([A-Z])/g,"@@@$1@@@").split("@@@").filter(Boolean),n=[],r=0,i=t.length;r<i;){var o=t[r],s=t[r+1],a=lastValue(n,"");if(o.match(/^[A-Z]/)){if(s&&s.match(/^[^A-Z]/)){n.push(o+s),r+=2;continue}a.match(/^[^A-Z]/)?n.push(o):(n.length||n.push(""),n[n.length-1]=a+o)}else n.push(o);r++}return n.join("_").toLowerCase()},capitalize,createResolvable:function createResolvable(){var e,t,n="pending",r=new Promise(((n,r)=>{e=n,t=r}));return r.resolve=t=>(n="resolved",e(t)),r.reject=e=>(n="rejected",t(e)),r.status=()=>n,r},firstValue:function firstValue(e,t){if(!e||!e.length)return t;var n=e[0];return null==n&&arguments.length>1?t:n},instanceOf,isEmpty,isNotEmpty:function isNotEmpty(){return!isEmpty.apply(this,arguments)},lastValue,now:t,regexpEscape:function regexpEscape(e){return e?e.replace(/[-[\]{}()*+!<=:?./\\^$|#\s,]/g,"\\$&"):e},sizeOf,sleep:function sleep(e){return new Promise((t=>{setTimeout(t,e||0)}))},snakeCaseToCamelCase:function snakeCaseToCamelCase(e,t){var n=e;return n?(n=n.replace(/_(.)/g,((e,t)=>t.toLocaleUpperCase())).replace(/_+$/g,""),null!=t&&(n=t?capitalize(n):uncapitalize(n)),n):n},splitBy:function splitBy(e,t,n){var r=t;if(!r)return[e];r instanceof Array||(r=[r]);var i=!1;const cloneRegExp=e=>{var t;return e=e.toString().substring(1).replace(/\/(\w*)$/,((e,n)=>(t=(t||"").replace(/g/gi,""),""))),new RegExp(e,t+"g")},matchPattern=(e,t,n)=>{var r;if(t instanceof RegExp){if(t.lastIndex=n,!(r=t.exec(e)))return;return{match:r[0],offset:t.lastIndex-r[0].length}}var i=e.indexOf(t,n);if(!(i<0))return{match:e.substring(i,i+t.length),offset:i}},findNextMatch=(e,t)=>{for(var n=0,i=r.length;n<i;n++){var o=r[n],s=o.pattern,a=o.condition,u=matchPattern(e,s,t);if(("function"!=typeof a||a({parts:c,pattern:o,chunk:u}))&&u)return{match:u,pattern:o}}};r=(e=>{for(var t=[],n=0,r=e.length;n<r;n++){var o=e[n];if(o){var s=null,a=null,u=null;o.constructor===Object.prototype.constructor&&o.pattern&&(o.name?(i=!0,s=""+o.name):s=""+n,u=o.condition,a=o.process,o=o.pattern),s||(s=""+n),o instanceof RegExp?o=cloneRegExp(o):("string"==typeof o||o instanceof String)&&(o=""+o),o&&t.push({name:s,pattern:o,index:n,process:a,condition:u})}}return t})(r);for(var o,s,a,u,f,c=[],l=0;o=findNextMatch(e,l);)if(u=(s=o.match).offset,a=s.match,f=o.pattern,a.length){l<u&&(v=e.substring(l,u),c.push({source:e,part:v,processed:v,start:l,end:u,name:"_chunk"}));var p={source:e,part:a,start:l,end:u,name:f.name};c.push(p),p.processed="function"==typeof f.process?f.process(a,p):a,l=u+a.length}else l++;if(l<e.length){var v=e.substring(l);c.push({source:e,part:v,processed:v,start:l,end:e.length,name:"_tail"})}return!0!==n&&t instanceof Array?(i&&(c=c.reduce(((e,t)=>{var n=t.name;return e.hasOwnProperty(n)?e[n]instanceof Array?e[n].push(t.processed):e[n]=[e[n],t.processed]:e[n]=t.processed,e}),{})),c):c.map((e=>e.part))},uncapitalize,get:n,set:r,remove:i,getMeta:o,setMeta:s,removeMeta:a,getMetaNS:u,setMetaNS:f,removeMetaNS:c}},941:(e,t,n)=>{const r=n(309),i=n(187),o=Symbol.for("__seqdaQueueChangeEvent"),s=Symbol.for("__seqdaQueueChangeInfo"),a=Symbol.for("__seqdaInternalState"),u=Symbol.for("__seqdaUnboundMethod"),f=Symbol.for("__seqdaDisallowWrite");function cloneStore(e,t){const cloneScope=(e,t)=>{let n=Object.keys(e),r=t?{}:new i,o=t||r;t||o.setMaxListeners(1/0);for(let t=0,i=n.length;t<i;t++){let i=n[t];if("_events"===i||"_eventsCount"===i||"_maxListeners"===i)continue;let s=e[i];r[i]="function"==typeof s?storeUnboundMethod(s[u].bind(o),s[u]):cloneScope(s,o)}return r};let n=cloneScope(e),r=Object.assign({},e[a]);return Object.defineProperties(n,{[a]:{writable:!0!==t,enumberable:!1,configurable:!1,value:!0!==t?r:Object.freeze(r)}}),initializeStore(n,t)}function queueChangeEvent(e){let t=this[s];t.promise||(t.promise=Promise.resolve(),t.promise.then((()=>{let e=Array.from(Object.keys(t.eventQueue)),n=t.previousStore;t.eventQueue={},t.promise=null,t.previousStore=cloneStore(this,!0),this.emit("update",{store:this,previousStore:n,modified:e})}))),t.eventQueue||(t.eventQueue={}),t.eventQueue[e]=!0}function copyKeysToArray(e,t){let n=e;if(Array.isArray(n)&&t){let e=Object.keys(t);for(let r=0,i=e.length;r<i;r++){let i=e[r];/^\d+$/.test(i)||(n[i]=t[i])}}return n}function clone(e){return e&&e&&"object"==typeof e?Array.isArray(e)?copyKeysToArray(e.slice(),e):Object.assign({},e):e}function getPath(...e){return e.filter(Boolean).join(".")}function storeUnboundMethod(e,t){return Object.defineProperty(e,u,{writable:!1,enumerable:!1,configurable:!1,value:t}),e}function createStoreSubsection(e,t,n){function isCacheInvalid(e,t){if(this[f])return!0;let n=c[e];if(!n)return!0;let r=n.args;if(r.length!==t.length)return!0;for(let e=0,n=t.length;e<n;e++)if(r[e]!==t[e])return!0;return!1}function setCache(e,t,n){this[f]||(c[e]={args:t,result:n})}const createScopeMethod=(e,t)=>{let method=function(...n){if(isCacheInvalid.call(this,e,n)){let r=t({get:getState.bind(this),set:setState.bind(this),store:this},...n);return setCache.call(this,e,n,r),r}return c[e].result};return storeUnboundMethod(method.bind(this),method)};function getState(){return!0===e.emitOnFetch&&this.emit("fetchScope",{store:this,scopeName:n}),r.get(this[a],n)}function setState(e){if(this[f])return;let t=r.get(this[a],n);if(e&&"object"==typeof e&&e===t)throw new Error(`Error: "${getPath(n)}" the state value is the same, but it is required to be different.`);if(!r.propsDiffer(e,t))return;let i=t;return this[a]=function setPath(e,t,n){let r=clone(e),i=t.split("."),o=r;for(let e=0,t=i.length;e<t;e++){let r=i[e];if(e+1>=t){let e;e=Array.isArray(n)?copyKeysToArray(n,o[r]):n,e&&"object"==typeof e&&Object.freeze(e),o[r]=e}else o[r]=clone(o[r]);o&&"object"==typeof o&&Object.freeze(o),o=o[r]}return r}(this[a],n,e),c={},this[o]&&this[o](n,e,i),e}if(n&&!Object.prototype.hasOwnProperty.call(t,"_"))throw new Error(`Error: "${getPath}._" default value must be defined.`);const i=n?{}:this;let s=Object.keys(t||{}),u=[],c={};n&&setState.call(this,clone(t._));for(let o=0,a=s.length;o<a;o++){let a=s[o];if("_"===a)continue;let f=t[a];if(r.instanceOf(f,"object"))i[a]=createStoreSubsection.call(this,e,f,getPath(n,a)),u.push(a);else{if("function"!=typeof f)throw new TypeError(`Error: Value of "${getPath(n,a)}" is invalid. All properties must be functions, or sub scopes.`);i[a]=createScopeMethod(a,f)}}return n?Object.freeze(i):this}function initializeStore(e,t){return Object.defineProperties(e,{getState:{writable:!1,enumberable:!1,configurable:!1,value:()=>e[a]}}),!0!==t?Object.defineProperties(e,{hydrate:{writable:!1,enumberable:!1,configurable:!1,value:t=>{e[a]=Object.freeze(clone(t)),queueChangeEvent.call(e,"*")}},[o]:{writable:!1,enumberable:!1,configurable:!1,value:queueChangeEvent.bind(e)},[s]:{writable:!0,enumberable:!1,configurable:!1,value:{previousStore:cloneStore(e,!0)}}}):Object.defineProperties(e,{[f]:{writable:!1,enumberable:!1,configurable:!1,value:!0}}),e}e.exports={cloneStore,createStore:function createStore(e,t){if(!r.instanceOf(e,"object"))throw new TypeError('createStore: provided "template" must be an object.');const n=t||{},o=new i;return o.setMaxListeners(1/0),Object.defineProperty(o,a,{writable:!0,enumerable:!1,configurable:!1,value:{}}),initializeStore(createStoreSubsection.call(o,n,e))}}}},t={};(function __webpack_require__(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,__webpack_require__),i.exports})(941);
|
|
1
|
+
var e={187:e=>{var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function ReflectApply(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function ReflectOwnKeys(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function ReflectOwnKeys(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function NumberIsNaN(e){return e!=e};function EventEmitter(){EventEmitter.init.call(this)}e.exports=EventEmitter,e.exports.once=function once(e,t){return new Promise((function(r,n){function errorListener(r){e.removeListener(t,resolver),n(r)}function resolver(){"function"==typeof e.removeListener&&e.removeListener("error",errorListener),r([].slice.call(arguments))}eventTargetAgnosticAddListener(e,t,resolver,{once:!0}),"error"!==t&&function addErrorHandlerIfEventEmitter(e,t,r){"function"==typeof e.on&&eventTargetAgnosticAddListener(e,"error",t,r)}(e,errorListener,{once:!0})}))},EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._eventsCount=0,EventEmitter.prototype._maxListeners=void 0;var o=10;function checkListener(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function _getMaxListeners(e){return void 0===e._maxListeners?EventEmitter.defaultMaxListeners:e._maxListeners}function _addListener(e,t,r,n){var i,o,a;if(checkListener(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),a=o[t]),void 0===a)a=o[t]=r,++e._eventsCount;else if("function"==typeof a?a=o[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=_getMaxListeners(e))>0&&a.length>i&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,function ProcessEmitWarning(e){console&&console.warn&&console.warn(e)}(s)}return e}function onceWrapper(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _onceWrap(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=onceWrapper.bind(n);return i.listener=r,n.wrapFn=i,i}function _listeners(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function unwrapListeners(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):arrayClone(i,i.length)}function listenerCount(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function arrayClone(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function eventTargetAgnosticAddListener(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function wrapListener(i){n.once&&e.removeEventListener(t,wrapListener),r(i)}))}}Object.defineProperty(EventEmitter,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),EventEmitter.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},EventEmitter.prototype.setMaxListeners=function setMaxListeners(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},EventEmitter.prototype.getMaxListeners=function getMaxListeners(){return _getMaxListeners(this)},EventEmitter.prototype.emit=function emit(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)n(u,this,t);else{var f=u.length,c=arrayClone(u,f);for(r=0;r<f;++r)n(c[r],this,t)}return!0},EventEmitter.prototype.addListener=function addListener(e,t){return _addListener(this,e,t,!1)},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.prependListener=function prependListener(e,t){return _addListener(this,e,t,!0)},EventEmitter.prototype.once=function once(e,t){return checkListener(t),this.on(e,_onceWrap(this,e,t)),this},EventEmitter.prototype.prependOnceListener=function prependOnceListener(e,t){return checkListener(t),this.prependListener(e,_onceWrap(this,e,t)),this},EventEmitter.prototype.removeListener=function removeListener(e,t){var r,n,i,o,a;if(checkListener(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function spliceOne(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},EventEmitter.prototype.off=EventEmitter.prototype.removeListener,EventEmitter.prototype.removeAllListeners=function removeAllListeners(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},EventEmitter.prototype.listeners=function listeners(e){return _listeners(this,e,!0)},EventEmitter.prototype.rawListeners=function rawListeners(e){return _listeners(this,e,!1)},EventEmitter.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):listenerCount.call(e,t)},EventEmitter.prototype.listenerCount=listenerCount,EventEmitter.prototype.eventNames=function eventNames(){return this._eventsCount>0?t(this._events):[]}},320:(e,t,r)=>{const n=r(447);function extend(){function _extend(o,a,s,u){var f,c=4;if(t)for(var l=c,p=arguments.length;l<p;l++){if((d=arguments[l])&&d instanceof Object){var v=Object.keys(d);r||(v=v.concat(Object.getOwnPropertySymbols(d)));for(var h=0,b=v.length;h<b;h++){if("__proto__"!==(g=v[h])&&"constructor"!==g&&"prototype"!==g&&(!0===i||!u.hasOwnProperty(g))){f=d[g];var y=u[g];if(!e||!1!==e(g,f,d,y,u,s,o,a)){if(f&&"object"==typeof f&&!(f instanceof String)&&!(f instanceof Number)&&(f.constructor===Object.prototype.constructor||f.constructor===Array.prototype.constructor)){var m=f instanceof Array;y||(y=m?[]:{}),f=_extend(g,d,s+1,m?[]:{},y,f)}u[g]=f}}}}}else for(l=c,p=arguments.length;l<p;l++){var d;if((d=arguments[l])&&d instanceof Object){v=Object.keys(d);r||(v=v.concat(Object.getOwnPropertySymbols(d)));for(h=0,b=v.length;h<b;h++){var g;if("__proto__"!==(g=v[h])&&"constructor"!==g&&"prototype"!==g&&(!0===i||!u.hasOwnProperty(g))){if(f=d[g],e){y=u[g];if(!1===e(g,f,d,y,u,s,o,a))continue}u[g]=f}}}}if(u._audit){var O=u._audit.base;O.modified=n.now(),O.updateCount++}return u}if(0!==arguments.length){if(1===arguments.length)return arguments[0];var e,t=!1,r=!1,i=!0,o=0,a=arguments[0];"boolean"==typeof a?(t=a,o++):"number"==typeof a&&(t=a&extend.DEEP,r=a&extend.NO_SYMBOLS,i=!(a&extend.NO_OVERWRITE),o++,e=a&extend.FILTER?arguments[o++]:void 0),(a=arguments[o++])||(a={});for(var s=[null,null,0,a],u=o,f=arguments.length;u<f;u++)s.push(arguments[u]);return _extend.apply(this,s)}}function toArray(e){return e instanceof Array?e:[e]}function arrayUnion(...e){for(var t=new Map,r=0,n=e.length;r<n;r++){var i=e[r];if(i instanceof Array)for(var o=0,a=i.length;o<a;o++){var s=i[o];t.set(s,s)}else t.set(i,i)}return Array.from(t.values())}!function extend_const(e){e.DEEP=1,e.NO_OVERWRITE=2,e.FILTER=4,e.NO_SYMBOLS=8}(extend),e.exports={arrayFlatten:function arrayFlatten(e){let t=[];for(let r=0,n=e.length;r<n;r++){let n=e[r];Array.isArray(n)?t=t.concat(arrayFlatten(n)):t.push(n)}return t},arraySubtract:function arraySubtract(...e){for(var t=new Map,r=0,n=e.length;r<n;r++){var i=e[r];if(i instanceof Array)for(var o=0,a=i.length;o<a;o++){var s=i[o];0===r?t.set(s,s):t.delete(s)}else 0===r?t.set(i,i):t.delete(i)}return Array.from(t.values())},arrayUnion,coerceValue:function coerceValue(e,t,r){var n=e,i=t?t.toLowerCase():t,o=arguments.length>2;const parseBoolean=(e,t)=>{if(null==e)return!!t&&void 0;var r=typeof e;if("boolean"===r||e instanceof Boolean)return"function"==typeof e.valueOf?e.valueOf():e;if(!t&&("number"===r||"bigint"===r||e instanceof Number)){if("bigint"===r)return!!e;if(!isFinite(e)){if(t)return;return!isNaN(e)}return!!e}if(!("string"===r||e instanceof String))return t?void 0:!!e;if(!t){var n=parseNumber(e,!0);if("number"==typeof n)return!!n}return!!(""+e).match(/^['"]*true['"]*$/i)||!(""+e).match(/^['"]*false['"]*$/i)&&void 0},parseNumber=(e,t)=>{if(null!=e){var r=typeof e;if("bigint"===r)return parseFloat(e);if("number"===r||e instanceof Number){var n=e instanceof Number?e.valueOf():e;return isFinite(n)?n:t?void 0:0}if(!t&&("boolean"===r||e instanceof Boolean))return e?1:0;if(("string"===r||e instanceof String)&&(!t||!e.match(/[^\d.e-]/))){var i=e.split(/[^\d.e-]+/g).map((e=>e.replace(/[^\d.e-]+/g,""))).filter(Boolean)[0];if(i){n=parseFloat(i);if(isFinite(n))return n}}}},parseString=(e,t)=>{if(null!=e){var r=typeof e;return"number"===r||e instanceof Number?isFinite(e)?""+e:void 0:"boolean"===r||e instanceof Boolean||"bigint"===r?""+e:"string"===r||e instanceof String?(""+e).replace(/^(['"])(.*)\1$/,"$2"):t?e:void 0}};var a,s;return i?"integer"===i||"int"===i||"number"===i||"bigint"===i?("integer"===i||"int"===i?a=Math.round:"bigint"===i&&(a=e=>BigInt(Math.round(e))),null==(s=parseNumber(n))?o?r:0:a?a(s):s):"bool"===i||"boolean"===i?null==(s=parseBoolean(n))&&o?r:s:null==(s=parseString(n))?o?r:"":s:null==n?o?r:n:"boolean"==typeof(s=parseBoolean(n,!0))||"number"==typeof(s=parseNumber(n,!0))?s:"string"==typeof n||n instanceof String?null==(s=parseString(n,!0))?o?r:"":s:n},extend,pluck:function pluck(e){for(var t=[],r=e instanceof Array,i=1,o=arguments.length;i<o;i++){var a=arguments[i];if(a)for(var s=Object.keys(a),u=0,f=s.length;u<f;u++){var c,l=a[u];if(r){c=new Array(e.length);for(var p=0,v=e.length;p<v;p++){var h=e[p];c[p]=n.get(l,h)}}else c=n.get(l,e);t.push(c)}}return t},propsDiffer:function propsDiffer(e,t,r,n=!1){if(e===t)return!1;if(typeof e!=typeof t)return!0;if(null==e||null==t)return e!==t;if("string"==typeof e||e instanceof String||"number"==typeof e||e instanceof Number||"boolean"==typeof e||e instanceof Boolean||"bigint"==typeof e||e instanceof BigInt)return e.valueOf()!==t.valueOf();var i;if(r instanceof Array)i=r;else{var o=Object.keys(e),a=Object.keys(t);if(n&&(o=o.concat(Object.getOwnPropertySymbols(e)),a=a.concat(Object.getOwnPropertySymbols(t))),o.length!==a.length)return!0;i=arrayUnion(o,a)}for(var s=0,u=i.length;s<u;s++){var f=i[s];if(e[f]!==t[f])return!0}return!1},subtractFromArray:function subtractFromArray(e,t){if(arguments.length<2)return e.slice();var r=toArray(t);return e.filter((e=>!(r.indexOf(e)>=0)))},toArray,toLookup:function toLookup(e,t){if(!t)return{};for(var r={},i=Object.keys(t),o=0,a=i.length;o<a;o++){var s=t[i[o]],u=n.get(s,e);null!=u&&(r[""+u]=s)}return r},uniq:function uniq(e){for(var t=new Map,r=0,n=e.length;r<n;r++){var i=e[r];t.set(i,!0)}return Array.from(t.keys())}}},309:(e,t,r)=>{const n=r(447),i=r(590),o=r(320),a=r(827);e.exports=Object.assign(e.exports,n,i,o,a)},590:e=>{e.exports={safeJSONStringify:function safeJSONStringify(e,t,r){var n=function safeCloneObj(e,t,r){var n=t;if(null==n)return n;var i=typeof n;if("string"===i||n instanceof String||"number"===i||n instanceof Number||"boolean"===i||n instanceof Boolean)return n.valueOf();if("bigint"===i)return n;var o=r||[],a=o.findIndex((e=>e.oldValue===n));if(a>=0)return`::@${a}@::`;"function"==typeof n.toJSON&&(n=n.toJSON.call(n,""));var s=Object.keys(n),u=n instanceof Array,f=u?new Array(n.length):{};a=o.length,o.push({referenced:!1,newValue:f,oldValue:n});for(var c=0,l=s.length;c<l;c++){e=s[c];var p=n[e];if(void 0===p){if(!u)continue;p=null}p&&"function"==typeof p.toJSON&&(p=p.toJSON(e)),null!==p&&(p=safeCloneObj(e,p,o)),f[e]=p}return{"::@id@::":a,value:f}}(null,e,[]);return JSON.stringify(n,t,r)},safeJSONParse:function safeJSONParse(e){if(void 0!==e&&""!==e){if("null"===e||null===e)return null;try{var t=JSON.parse(e);if("string"==typeof t||"number"==typeof t||"boolean"==typeof t||t instanceof Array)return t;if(e.indexOf("::@id@::")<0)return t;var r={};return function buildRefs(e,t,r){if(!t)return t;if(!t.hasOwnProperty("::@id@::"))return t;var n=r||{},i=t["::@id@::"],o=t.value,a=Object.keys(o),s=o instanceof Array?new Array(o.length):{};n[i]=s;for(var u=0,f=a.length;u<f;u++)if(!(e=a[u]).match(/::@(id|\d+)@::/)){var c=buildRefs(e,o[e],n);s[e]=c}return s}(null,t,r),function unwindData(e,t,r){if(!t)return t;if("string"==typeof t){var n=t.match(/::@(\d)+@::/);return n?unwindData(e,r[n[1]],r):t}if(!t.hasOwnProperty("::@id@::"))return t;for(var i=t["::@id@::"],o=t.value,a=Object.keys(o),s=r[i],u=0,f=a.length;u<f;u++)if(!(e=a[u]).match(/::@(id|\d+)@::/)){var c=unwindData(e,o[e],r);s[e]=c}return s}(null,t,r)}catch(e){return}}}}},827:e=>{e.exports={lerp:function lerp(e,t,r){return(t-e)*r+e},clamp:function clamp(e,t,r){var n=t<r?t:r,i=r<t?t:r;return e<n?n:e>i?i:e},snapToGrid:function snapToGrid(e,t,r,n,i){var o=r,a=n||0,s=i||1e3;return o||(o=Math.round),"string"==typeof o&&"function"==typeof Math[o]&&(o=Math[o]),(o(t*s*o((a+e)*s/(t*s)))-a*s)/s}}},447:function(e){const t="undefined"!=typeof performance&&performance.now?performance.now.bind(performance):"undefined"!=typeof process&&process.hrtime?function(){var e=process.hrtime();return 1e3*e[0]+e[1]/1e6}:"undefined"!=typeof preciseTime?preciseTime:"function"==typeof Date.now?Date.now.bind(Date):function(){return(new Date).getTime()/1e3};function initAudit(e){if(!e||Object.isExtensible(e)&&!Object.isFrozen(e)){var r=t();Object.defineProperty(e,"_audit",{writable:!0,enumerable:!1,configurable:!0,value:{base:{created:r,modified:r,updateCount:0},_meta:{created:r,modified:r,updateCount:0}}})}}function prop(e,r,n){var i,o,a,s,u,f=r,c=1,l=2,p=4,v=!1,h="g"===(i=e.charAt(0))?c:"s"===i?l:p,b=[];switch(e){case"getMetaNS":case"setMetaNS":case"removeMetaNS":o=3,a=4,s=f.hasOwnProperty("_meta")&&f._meta.hasOwnProperty(n)?f._meta[n]:initMeta(f,n),b=["_meta",n];break;case"getMeta":case"setMeta":case"removeMeta":v=!0,o=2,a=3,s=f.hasOwnProperty("_meta")?f._meta:initMeta(f),b=["_meta"];break;default:o=2,a=3,s=f}if(!s||!(s instanceof Object)||"string"==typeof s||"number"==typeof s||"boolean"==typeof s||s instanceof String||s instanceof Number||s instanceof Boolean){if(h&(c|p))return arguments[a];throw new Error("Attempt to set on and empty context")}var y,m=""+arguments[o],d=[];if(!m){if(h&l)return"";if(h&p)return;return arguments[a]}if(m.indexOf(".")>-1||m.indexOf("[")>-1)for(var g=0,O=1,_=(d=m.indexOf("\\")>-1?m.replace(/([^\\])\[/g,"$1.[").replace(/([^\\])\./g,"$1..").replace(/\\([.\[])/g,"$1").split(".."):m.replace(/\[/g,".[").split(".")).length;g<_;g++,O++){var E=d[g],w=O>=_,S="["===E.charAt(0);if(S&&(E=E.substring(1,E.length-1)),s&&!s.hasOwnProperty(E)&&s.hasOwnProperty(Symbol.for(E))&&(E=Symbol.for(E)),u=s[E],h&p&&w)return!s||Object.isExtensible(s)&&!Object.isFrozen(s)?(!0===arguments[a]?delete s[E]:s[E]=void 0,u):u;if(h&l){if(w||null==u||!w&&(!(u instanceof Object)||u instanceof Number||u instanceof String||u instanceof Boolean)?(y=!w&&"["===d[O].charAt(0),u=w?arguments[a]:y?[]:{},s instanceof Array&&!E?(S=!0,s&&Object.isExtensible(s)&&!Object.isFrozen(s)&&(E=""+(s.push(u)-1),s=u)):E&&(s&&Object.isExtensible(s)&&!Object.isFrozen(s)&&(s[E]=u),s=u)):s=u,E){if("symbol"==typeof E){var j=E.toString();E=j.substring(7,j.length-1)}b.push(S?"["+E+"]":E)}}else{if(null==u||("number"==typeof u||u instanceof Number)&&(isNaN(u)||!isFinite(u)))return a>=arguments.length?u:arguments[a];s=u}}else{if(s&&!s.hasOwnProperty(m)&&s.hasOwnProperty(Symbol.for(m))&&(m=Symbol.for(m)),h&p)return!s||Object.isExtensible(s)&&!Object.isFrozen(s)?(u=s[m],!0===arguments[a]?delete s[m]:s[m]=void 0,u):u;if(h&l)return s&&Object.isExtensible(s)&&!Object.isFrozen(s)&&(s[m]=arguments[a]),m;u=s[m]}if(h&c)return null==u||("number"==typeof u||u instanceof Number)&&(isNaN(u)||!isFinite(u))?a>=arguments.length?u:arguments[a]:u;f.hasOwnProperty("_audit")||initAudit(f);var L=t();if(v&&f._audit){var x=f._audit.meta;x.modified=L,x.updateCount++}else if(f._audit){var A=f._audit.base;A.modified=L,A.updateCount++}return h&l?b.join(".").replace(/\.\[/g,"["):u}function instanceOf(e){function testType(e,t){var r=t,n=typeof e;return r===String?r="string":r===Number?r="number":r===Boolean?r="boolean":r===Function?r="function":r===Array?r="array":r===Object?r="object":r===Promise?r="promise":r===BigInt&&(r="bigint"),"object"===r&&(e.constructor===Object.prototype.constructor||"Object"===e.constructor.name)||(!("promise"!==r&&"deferred"!==r||!function isDeferredType(e){return e instanceof Promise||"function"==typeof e.then}(e))||("object"!==r&&r===n||!("number"===r&&("number"==typeof e||e instanceof Number)&&!isFinite(e))&&("number"===r&&e instanceof Number||("string"===r&&e instanceof String||("boolean"===r&&e instanceof Boolean||("function"===r&&"function"===n||("array"===r&&e instanceof Array||"function"==typeof r&&e instanceof r)))))))}if(null==e)return!1;for(var t=1,r=arguments.length;t<r;t++)if(!0===testType(e,arguments[t]))return!0;return!1}function sizeOf(e){return null==e?0:("number"==typeof e.length||e.length instanceof Number)&&isFinite(e.length)?e.length:e.constructor===Object.prototype.constructor||"Object"===e.constructor.name?Object.keys(e).length+Object.getOwnPropertySymbols(e).length:0}function isEmpty(){for(var e=0,t=arguments.length;e<t;e++){var r=arguments[e];if(null==r)return!0;if(r!==1/0){if(instanceOf(r,"string"))return!r.match(/\S/);if(!(instanceOf(r,"number")&&isFinite(r)||instanceOf(r,"boolean","bigint","function")||0!=sizeOf(r)))return!0}}return!1}function lastValue(e,t){if(!e||!e.length)return t;var r=e[e.length-1];return null==r&&arguments.length>1?t:r}function capitalize(e,t){var r=e;return isEmpty(r)?r:(""+r).replace(t?/(^|\s)(\S)/gi:/^(\s*)(\S)/i,(function(e,t,r){return t+r.toLocaleUpperCase()}))}function uncapitalize(e){var t=e;return isEmpty(t)?t:t.replace(/^./,(e=>e.toLocaleLowerCase()))}const r=prop.bind(this,"get"),n=prop.bind(this,"set"),i=prop.bind(this,"remove"),o=prop.bind(this,"getMeta"),a=prop.bind(this,"setMeta"),s=prop.bind(this,"removeMeta"),u=prop.bind(this,"getMetaNS"),f=prop.bind(this,"setMetaNS"),c=prop.bind(this,"removeMetaNS");e.exports={camelCaseToSnakeCase:function camelCaseToSnakeCase(e){if(!e)return e;for(var t=e.replace(/([A-Z])/g,"@@@$1@@@").split("@@@").filter(Boolean),r=[],n=0,i=t.length;n<i;){var o=t[n],a=t[n+1],s=lastValue(r,"");if(o.match(/^[A-Z]/)){if(a&&a.match(/^[^A-Z]/)){r.push(o+a),n+=2;continue}s.match(/^[^A-Z]/)?r.push(o):(r.length||r.push(""),r[r.length-1]=s+o)}else r.push(o);n++}return r.join("_").toLowerCase()},capitalize,createResolvable:function createResolvable(){var e,t,r="pending",n=new Promise(((r,n)=>{e=r,t=n}));return n.resolve=t=>(r="resolved",e(t)),n.reject=e=>(r="rejected",t(e)),n.status=()=>r,n},firstValue:function firstValue(e,t){if(!e||!e.length)return t;var r=e[0];return null==r&&arguments.length>1?t:r},instanceOf,isEmpty,isNotEmpty:function isNotEmpty(){return!isEmpty.apply(this,arguments)},lastValue,now:t,regexpEscape:function regexpEscape(e){return e?e.replace(/[-[\]{}()*+!<=:?./\\^$|#\s,]/g,"\\$&"):e},sizeOf,sleep:function sleep(e){return new Promise((t=>{setTimeout(t,e||0)}))},snakeCaseToCamelCase:function snakeCaseToCamelCase(e,t){var r=e;return r?(r=r.replace(/_(.)/g,((e,t)=>t.toLocaleUpperCase())).replace(/_+$/g,""),null!=t&&(r=t?capitalize(r):uncapitalize(r)),r):r},splitBy:function splitBy(e,t,r){var n=t;if(!n)return[e];n instanceof Array||(n=[n]);var i=!1;const cloneRegExp=e=>{var t;return e=e.toString().substring(1).replace(/\/(\w*)$/,((e,r)=>(t=(t||"").replace(/g/gi,""),""))),new RegExp(e,t+"g")},matchPattern=(e,t,r)=>{var n;if(t instanceof RegExp){if(t.lastIndex=r,!(n=t.exec(e)))return;return{match:n[0],offset:t.lastIndex-n[0].length}}var i=e.indexOf(t,r);if(!(i<0))return{match:e.substring(i,i+t.length),offset:i}},findNextMatch=(e,t)=>{for(var r=0,i=n.length;r<i;r++){var o=n[r],a=o.pattern,s=o.condition,u=matchPattern(e,a,t);if(("function"!=typeof s||s({parts:c,pattern:o,chunk:u}))&&u)return{match:u,pattern:o}}};n=(e=>{for(var t=[],r=0,n=e.length;r<n;r++){var o=e[r];if(o){var a=null,s=null,u=null;o.constructor===Object.prototype.constructor&&o.pattern&&(o.name?(i=!0,a=""+o.name):a=""+r,u=o.condition,s=o.process,o=o.pattern),a||(a=""+r),o instanceof RegExp?o=cloneRegExp(o):("string"==typeof o||o instanceof String)&&(o=""+o),o&&t.push({name:a,pattern:o,index:r,process:s,condition:u})}}return t})(n);for(var o,a,s,u,f,c=[],l=0;o=findNextMatch(e,l);)if(u=(a=o.match).offset,s=a.match,f=o.pattern,s.length){l<u&&(v=e.substring(l,u),c.push({source:e,part:v,processed:v,start:l,end:u,name:"_chunk"}));var p={source:e,part:s,start:l,end:u,name:f.name};c.push(p),p.processed="function"==typeof f.process?f.process(s,p):s,l=u+s.length}else l++;if(l<e.length){var v=e.substring(l);c.push({source:e,part:v,processed:v,start:l,end:e.length,name:"_tail"})}return!0!==r&&t instanceof Array?(i&&(c=c.reduce(((e,t)=>{var r=t.name;return e.hasOwnProperty(r)?e[r]instanceof Array?e[r].push(t.processed):e[r]=[e[r],t.processed]:e[r]=t.processed,e}),{})),c):c.map((e=>e.part))},uncapitalize,get:r,set:n,remove:i,getMeta:o,setMeta:a,removeMeta:s,getMetaNS:u,setMetaNS:f,removeMetaNS:c}}},t={};function __webpack_require__(r){var n=t[r];if(void 0!==n)return n.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,__webpack_require__),i.exports}__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r={};(()=>{__webpack_require__.d(r,{M:()=>createStore,f:()=>cloneStore});var e=__webpack_require__(309),t=__webpack_require__(187);const n=Symbol.for("@seqdaQueueChangeEvent"),i=Symbol.for("@seqdaQueueChangeInfo"),o=Symbol.for("@seqdaInternalState"),a=Symbol.for("@seqdaUnboundMethod"),s=Symbol.for("@seqdaDisallowWrite");function cloneStore(e,r){const cloneScope=(e,r)=>{let n=Object.keys(e),i=r?{}:new t,o=r||i;r||o.setMaxListeners(1/0);for(let t=0,r=n.length;t<r;t++){let r=n[t];if("_events"===r||"_eventsCount"===r||"_maxListeners"===r)continue;let s=e[r];i[r]="function"==typeof s?storeUnboundMethod(s[a].bind(o),s[a]):cloneScope(s,o)}return i};let n=cloneScope(e),i=Object.assign({},e[o]);return Object.defineProperties(n,{[o]:{writable:!0!==r,enumberable:!1,configurable:!1,value:!0!==r?i:Object.freeze(i)}}),initializeStore(n,r)}function queueChangeEvent(e){let t=this[i];t.promise||(t.promise=Promise.resolve(),t.promise.then((()=>{let e=Array.from(Object.keys(t.eventQueue)),r=t.previousStore;t.eventQueue={},t.promise=null,t.previousStore=cloneStore(this,!0),this.emit("update",{store:this,previousStore:r,modified:e})}))),t.eventQueue||(t.eventQueue={}),t.eventQueue[e]=!0}function copyKeysToArray(e,t){let r=e;if(Array.isArray(r)&&t){let e=Object.keys(t);for(let n=0,i=e.length;n<i;n++){let i=e[n];/^\d+$/.test(i)||(r[i]=t[i])}}return r}function clone(e){return e&&e&&"object"==typeof e?Array.isArray(e)?copyKeysToArray(e.slice(),e):Object.assign({},e):e}function getPath(...e){return e.filter(Boolean).join(".")}function storeUnboundMethod(e,t){return Object.defineProperty(e,a,{writable:!1,enumerable:!1,configurable:!1,value:t}),e}function createStoreSubsection(t,r,i){function isCacheInvalid(e,t){if(this[s])return!0;let r=c[e];if(!r)return!0;let n=r.args;if(n.length!==t.length)return!0;for(let e=0,r=t.length;e<r;e++)if(n[e]!==t[e])return!0;return!1}function setCache(e,t,r){this[s]||(c[e]={args:t,result:r})}const createScopeMethod=(e,t)=>{let method=function(...r){if(isCacheInvalid.call(this,e,r)){let n=t({get:getState.bind(this),set:setState.bind(this),store:this},...r);return setCache.call(this,e,r,n),n}return c[e].result};return storeUnboundMethod(method.bind(this),method)};function getState(){return!0===t.emitOnFetch&&this.emit("fetchScope",{store:this,scopeName:i}),e.get(this[o],i)}function setState(t){if(this[s])return;let r=e.get(this[o],i);if(t&&"object"==typeof t&&t===r)throw new Error(`Error: "${getPath(i)}" the state value is the same, but it is required to be different.`);if(!e.propsDiffer(t,r))return;let a=r;return this[o]=function setPath(e,t,r){let n=clone(e),i=t.split("."),o=n;for(let e=0,t=i.length;e<t;e++){let n=i[e];if(e+1>=t){let e;e=Array.isArray(r)?copyKeysToArray(r,o[n]):r,e&&"object"==typeof e&&Object.freeze(e),o[n]=e}else o[n]=clone(o[n]);o&&"object"==typeof o&&Object.freeze(o),o=o[n]}return n}(this[o],i,t),c={},this[n]&&this[n](i,t,a),t}if(i&&!Object.prototype.hasOwnProperty.call(r,"_"))throw new Error(`Error: "${getPath}._" default value must be defined.`);const a=i?{}:this;let u=Object.keys(r||{}),f=[],c={};i&&setState.call(this,clone(r._));for(let n=0,o=u.length;n<o;n++){let o=u[n];if("_"===o)continue;let s=r[o];if(e.instanceOf(s,"object"))a[o]=createStoreSubsection.call(this,t,s,getPath(i,o)),f.push(o);else{if("function"!=typeof s)throw new TypeError(`Error: Value of "${getPath(i,o)}" is invalid. All properties must be functions, or sub scopes.`);a[o]=createScopeMethod(o,s)}}return i?Object.freeze(a):this}function initializeStore(e,t){return Object.defineProperties(e,{getState:{writable:!1,enumberable:!1,configurable:!1,value:()=>e[o]}}),!0!==t?Object.defineProperties(e,{hydrate:{writable:!1,enumberable:!1,configurable:!1,value:t=>{e[o]=Object.freeze(clone(t)),queueChangeEvent.call(e,"*")}},[n]:{writable:!1,enumberable:!1,configurable:!1,value:queueChangeEvent.bind(e)},[i]:{writable:!0,enumberable:!1,configurable:!1,value:{previousStore:cloneStore(e,!0)}}}):Object.defineProperties(e,{[s]:{writable:!1,enumberable:!1,configurable:!1,value:!0}}),e}function createStore(r,n){if(!e.instanceOf(r,"object"))throw new TypeError('createStore: provided "template" must be an object.');const i=n||{},a=new t;return a.setMaxListeners(1/0),Object.defineProperty(a,o,{writable:!0,enumerable:!1,configurable:!1,value:{}}),initializeStore(createStoreSubsection.call(a,i,r))}})();var n=r.f,i=r.M;export{n as cloneStore,i as createStore};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|