pict 1.0.370 → 1.0.371

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/pict.js CHANGED
@@ -1,6 +1,6 @@
1
- "use strict";function _defineProperty2(e,r,t){return(r=_toPropertyKey2(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}function _toPropertyKey2(t){var i=_toPrimitive2(t,"string");return"symbol"==typeof i?i:i+"";}function _toPrimitive2(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f();}else if(typeof define==="function"&&define.amd){define([],f);}else{var g;if(typeof window!=="undefined"){g=window;}else if(typeof global!=="undefined"){g=global;}else if(typeof self!=="undefined"){g=self;}else{g=this;}g.Pict=f();}})(function(){var define,module,exports;return function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a;}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r);},p,p.exports,r,e,n,t);}return n[i].exports;}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o;}return r;}()({1:[function(require,module,exports){'use strict';var eachOfLimit=require('async.util.eachoflimit');var withoutIndex=require('async.util.withoutindex');module.exports=function eachLimit(arr,limit,iterator,cb){return eachOfLimit(limit)(arr,withoutIndex(iterator),cb);};},{"async.util.eachoflimit":3,"async.util.withoutindex":14}],2:[function(require,module,exports){'use strict';module.exports=function(tasks){function makeCallback(index){function fn(){if(tasks.length){tasks[index].apply(null,arguments);}return fn.next();}fn.next=function(){return index<tasks.length-1?makeCallback(index+1):null;};return fn;}return makeCallback(0);};},{}],3:[function(require,module,exports){var once=require('async.util.once');var noop=require('async.util.noop');var onlyOnce=require('async.util.onlyonce');var keyIterator=require('async.util.keyiterator');module.exports=function eachOfLimit(limit){return function(obj,iterator,cb){cb=once(cb||noop);obj=obj||[];var nextKey=keyIterator(obj);if(limit<=0){return cb(null);}var done=false;var running=0;var errored=false;(function replenish(){if(done&&running<=0){return cb(null);}while(running<limit&&!errored){var key=nextKey();if(key===null){done=true;if(running<=0){cb(null);}return;}running+=1;iterator(obj[key],key,onlyOnce(function(err){running-=1;if(err){cb(err);errored=true;}else{replenish();}}));}})();};};},{"async.util.keyiterator":7,"async.util.noop":9,"async.util.once":10,"async.util.onlyonce":11}],4:[function(require,module,exports){'use strict';var setImmediate=require('async.util.setimmediate');var restParam=require('async.util.restparam');module.exports=function(fn){return restParam(function(args){var callback=args.pop();args.push(function(){var innerArgs=arguments;if(sync){setImmediate(function(){callback.apply(null,innerArgs);});}else{callback.apply(null,innerArgs);}});var sync=true;fn.apply(this,args);sync=false;});};},{"async.util.restparam":12,"async.util.setimmediate":13}],5:[function(require,module,exports){'use strict';module.exports=Array.isArray||function isArray(obj){return Object.prototype.toString.call(obj)==='[object Array]';};},{}],6:[function(require,module,exports){'use strict';var isArray=require('async.util.isarray');module.exports=function isArrayLike(arr){return isArray(arr)||// has a positive integer length property
1
+ "use strict";function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){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 _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _defineProperty2(e,r,t){return(r=_toPropertyKey2(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}function _toPropertyKey2(t){var i=_toPrimitive2(t,"string");return"symbol"==typeof i?i:i+"";}function _toPrimitive2(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f();}else if(typeof define==="function"&&define.amd){define([],f);}else{var g;if(typeof window!=="undefined"){g=window;}else if(typeof global!=="undefined"){g=global;}else if(typeof self!=="undefined"){g=self;}else{g=this;}g.Pict=f();}})(function(){var define,module,exports;return function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a;}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r);},p,p.exports,r,e,n,t);}return n[i].exports;}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o;}return r;}()({1:[function(require,module,exports){'use strict';var eachOfLimit=require('async.util.eachoflimit');var withoutIndex=require('async.util.withoutindex');module.exports=function eachLimit(arr,limit,iterator,cb){return eachOfLimit(limit)(arr,withoutIndex(iterator),cb);};},{"async.util.eachoflimit":3,"async.util.withoutindex":14}],2:[function(require,module,exports){'use strict';module.exports=function(tasks){function makeCallback(index){function fn(){if(tasks.length){tasks[index].apply(null,arguments);}return fn.next();}fn.next=function(){return index<tasks.length-1?makeCallback(index+1):null;};return fn;}return makeCallback(0);};},{}],3:[function(require,module,exports){var once=require('async.util.once');var noop=require('async.util.noop');var onlyOnce=require('async.util.onlyonce');var keyIterator=require('async.util.keyiterator');module.exports=function eachOfLimit(limit){return function(obj,iterator,cb){cb=once(cb||noop);obj=obj||[];var nextKey=keyIterator(obj);if(limit<=0){return cb(null);}var done=false;var running=0;var errored=false;(function replenish(){if(done&&running<=0){return cb(null);}while(running<limit&&!errored){var key=nextKey();if(key===null){done=true;if(running<=0){cb(null);}return;}running+=1;iterator(obj[key],key,onlyOnce(function(err){running-=1;if(err){cb(err);errored=true;}else{replenish();}}));}})();};};},{"async.util.keyiterator":7,"async.util.noop":9,"async.util.once":10,"async.util.onlyonce":11}],4:[function(require,module,exports){'use strict';var setImmediate=require('async.util.setimmediate');var restParam=require('async.util.restparam');module.exports=function(fn){return restParam(function(args){var callback=args.pop();args.push(function(){var innerArgs=arguments;if(sync){setImmediate(function(){callback.apply(null,innerArgs);});}else{callback.apply(null,innerArgs);}});var sync=true;fn.apply(this,args);sync=false;});};},{"async.util.restparam":12,"async.util.setimmediate":13}],5:[function(require,module,exports){'use strict';module.exports=Array.isArray||function isArray(obj){return Object.prototype.toString.call(obj)==='[object Array]';};},{}],6:[function(require,module,exports){'use strict';var isArray=require('async.util.isarray');module.exports=function isArrayLike(arr){return isArray(arr)||// has a positive integer length property
2
2
  typeof arr.length==='number'&&arr.length>=0&&arr.length%1===0;};},{"async.util.isarray":5}],7:[function(require,module,exports){'use strict';var _keys=require('async.util.keys');var isArrayLike=require('async.util.isarraylike');module.exports=function keyIterator(coll){var i=-1;var len;var keys;if(isArrayLike(coll)){len=coll.length;return function next(){i++;return i<len?i:null;};}else{keys=_keys(coll);len=keys.length;return function next(){i++;return i<len?keys[i]:null;};}};},{"async.util.isarraylike":6,"async.util.keys":8}],8:[function(require,module,exports){'use strict';module.exports=Object.keys||function keys(obj){var _keys=[];for(var k in obj){if(obj.hasOwnProperty(k)){_keys.push(k);}}return _keys;};},{}],9:[function(require,module,exports){'use strict';module.exports=function noop(){};},{}],10:[function(require,module,exports){'use strict';module.exports=function once(fn){return function(){if(fn===null)return;fn.apply(this,arguments);fn=null;};};},{}],11:[function(require,module,exports){'use strict';module.exports=function only_once(fn){return function(){if(fn===null)throw new Error('Callback was already called.');fn.apply(this,arguments);fn=null;};};},{}],12:[function(require,module,exports){'use strict';module.exports=function restParam(func,startIndex){startIndex=startIndex==null?func.length-1:+startIndex;return function(){var length=Math.max(arguments.length-startIndex,0);var rest=new Array(length);for(var index=0;index<length;index++){rest[index]=arguments[index+startIndex];}switch(startIndex){case 0:return func.call(this,rest);case 1:return func.call(this,arguments[0],rest);}};};},{}],13:[function(require,module,exports){(function(setImmediate){(function(){'use strict';var _setImmediate=typeof setImmediate==='function'&&setImmediate;var fallback=function(fn){setTimeout(fn,0);};module.exports=function setImmediate(fn){// not a direct alias for IE10 compatibility
3
- return(_setImmediate||fallback)(fn);};}).call(this);}).call(this,require("timers").setImmediate);},{"timers":187}],14:[function(require,module,exports){'use strict';module.exports=function withoutIndex(iterator){return function(value,index,callback){return iterator(value,callback);};};},{}],15:[function(require,module,exports){'use strict';var once=require('async.util.once');var noop=require('async.util.noop');var isArray=require('async.util.isarray');var restParam=require('async.util.restparam');var ensureAsync=require('async.util.ensureasync');var iterator=require('async.iterator');module.exports=function(tasks,cb){cb=once(cb||noop);if(!isArray(tasks))return cb(new Error('First argument to waterfall must be an array of functions'));if(!tasks.length)return cb();function wrapIterator(iterator){return restParam(function(err,args){if(err){cb.apply(null,[err].concat(args));}else{var next=iterator.next();if(next){args.push(wrapIterator(next));}else{args.push(cb);}ensureAsync(iterator).apply(null,args);}});}wrapIterator(iterator(tasks))();};},{"async.iterator":2,"async.util.ensureasync":4,"async.util.isarray":5,"async.util.noop":9,"async.util.once":10,"async.util.restparam":12}],16:[function(require,module,exports){'use strict';exports.byteLength=byteLength;exports.toByteArray=toByteArray;exports.fromByteArray=fromByteArray;var lookup=[];var revLookup=[];var Arr=typeof Uint8Array!=='undefined'?Uint8Array:Array;var code='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';for(var i=0,len=code.length;i<len;++i){lookup[i]=code[i];revLookup[code.charCodeAt(i)]=i;}// Support decoding URL-safe base64 strings, as Node.js does.
3
+ return(_setImmediate||fallback)(fn);};}).call(this);}).call(this,require("timers").setImmediate);},{"timers":186}],14:[function(require,module,exports){'use strict';module.exports=function withoutIndex(iterator){return function(value,index,callback){return iterator(value,callback);};};},{}],15:[function(require,module,exports){'use strict';var once=require('async.util.once');var noop=require('async.util.noop');var isArray=require('async.util.isarray');var restParam=require('async.util.restparam');var ensureAsync=require('async.util.ensureasync');var iterator=require('async.iterator');module.exports=function(tasks,cb){cb=once(cb||noop);if(!isArray(tasks))return cb(new Error('First argument to waterfall must be an array of functions'));if(!tasks.length)return cb();function wrapIterator(iterator){return restParam(function(err,args){if(err){cb.apply(null,[err].concat(args));}else{var next=iterator.next();if(next){args.push(wrapIterator(next));}else{args.push(cb);}ensureAsync(iterator).apply(null,args);}});}wrapIterator(iterator(tasks))();};},{"async.iterator":2,"async.util.ensureasync":4,"async.util.isarray":5,"async.util.noop":9,"async.util.once":10,"async.util.restparam":12}],16:[function(require,module,exports){'use strict';exports.byteLength=byteLength;exports.toByteArray=toByteArray;exports.fromByteArray=fromByteArray;var lookup=[];var revLookup=[];var Arr=typeof Uint8Array!=='undefined'?Uint8Array:Array;var code='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';for(var i=0,len=code.length;i<len;++i){lookup[i]=code[i];revLookup[code.charCodeAt(i)]=i;}// Support decoding URL-safe base64 strings, as Node.js does.
4
4
  // See: https://en.wikipedia.org/wiki/Base64#URL_applications
5
5
  revLookup['-'.charCodeAt(0)]=62;revLookup['_'.charCodeAt(0)]=63;function getLens(b64){var len=b64.length;if(len%4>0){throw new Error('Invalid string. Length must be a multiple of 4');}// Trim off extra bytes after placeholder bytes are found
6
6
  // See: https://github.com/beatgammit/base64-js/issues/42
@@ -625,7 +625,7 @@ for(i=listeners.length-1;i>=0;i--){this.removeListener(type,listeners[i]);}}retu
625
625
  // EventEmitters, we do not listen for `error` events here.
626
626
  emitter.addEventListener(name,function wrapListener(arg){// IE does not have builtin `{ once: true }` support so we
627
627
  // have to do it manually.
628
- if(flags.once){emitter.removeEventListener(name,wrapListener);}listener(arg);});}else{throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof emitter);}}},{}],51:[function(require,module,exports){module.exports={"name":"fable-log","version":"3.0.18","description":"A simple logging wrapper.","main":"source/Fable-Log.js","scripts":{"start":"node source/Fable-Log.js","coverage":"npx quack coverage","test":"npx quack test","tests":"npx quack test -g"},"mocha":{"diff":true,"extension":["js"],"package":"./package.json","reporter":"spec","slow":"75","timeout":"5000","ui":"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},"browser":{"./source/Fable-Log-DefaultProviders-Node.js":"./source/Fable-Log-DefaultProviders-Web.js"},"repository":{"type":"git","url":"https://github.com/stevenvelozo/fable-log.git"},"keywords":["logging"],"author":"Steven Velozo <steven@velozo.com> (http://velozo.com/)","license":"MIT","bugs":{"url":"https://github.com/stevenvelozo/fable-log/issues"},"homepage":"https://github.com/stevenvelozo/fable-log","devDependencies":{"quackage":"^1.0.58"},"dependencies":{"fable-serviceproviderbase":"^3.0.19"}};},{}],52:[function(require,module,exports){/**
628
+ if(flags.once){emitter.removeEventListener(name,wrapListener);}listener(arg);});}else{throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof emitter);}}},{}],51:[function(require,module,exports){module.exports={"_from":"fable-log@^3.0.18","_id":"fable-log@3.0.18","_inBundle":false,"_integrity":"sha512-VGLVuqpHGd2RzohnzwN7k1IAr5kSuhaNg3i2tC/4ibPnaYJ0ICpIXXoCsnw/WABGgmfq2ICJ4I7XlB654Du4nQ==","_location":"/fable-log","_phantomChildren":{},"_requested":{"type":"range","registry":true,"raw":"fable-log@^3.0.18","name":"fable-log","escapedName":"fable-log","rawSpec":"^3.0.18","saveSpec":null,"fetchSpec":"^3.0.18"},"_requiredBy":["/fable"],"_resolved":"https://registry.npmjs.org/fable-log/-/fable-log-3.0.18.tgz","_shasum":"4f9ceb33c01b53d380d15e12fe64aa90f1ddce8c","_spec":"fable-log@^3.0.18","_where":"/Users/jacksonpollard/pict/node_modules/fable","author":{"name":"Steven Velozo","email":"steven@velozo.com","url":"http://velozo.com/"},"browser":{"./source/Fable-Log-DefaultProviders-Node.js":"./source/Fable-Log-DefaultProviders-Web.js"},"bugs":{"url":"https://github.com/stevenvelozo/fable-log/issues"},"bundleDependencies":false,"dependencies":{"fable-serviceproviderbase":"^3.0.19"},"deprecated":false,"description":"A simple logging wrapper.","devDependencies":{"quackage":"^1.0.58"},"homepage":"https://github.com/stevenvelozo/fable-log","keywords":["logging"],"license":"MIT","main":"source/Fable-Log.js","mocha":{"diff":true,"extension":["js"],"package":"./package.json","reporter":"spec","slow":"75","timeout":"5000","ui":"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},"name":"fable-log","repository":{"type":"git","url":"git+https://github.com/stevenvelozo/fable-log.git"},"scripts":{"coverage":"npx quack coverage","start":"node source/Fable-Log.js","test":"npx quack test","tests":"npx quack test -g"},"version":"3.0.18"};},{}],52:[function(require,module,exports){/**
629
629
  * Base Logger Class
630
630
  *
631
631
  *
@@ -673,7 +673,7 @@ switch(pLevel){case'trace':this.logStreamsTrace.push(pLogger);case'debug':this.l
673
673
  for(let i=0;i<this._StreamDefinitions.length;i++){let tmpStreamDefinition=Object.assign({loggertype:'default',streamtype:'console',level:'info'},this._StreamDefinitions[i]);if(!(tmpStreamDefinition.loggertype in this._Providers)){console.log(`Error initializing log stream: bad loggertype in stream definition ${JSON.stringify(tmpStreamDefinition)}`);}else{this.addLogger(new this._Providers[tmpStreamDefinition.loggertype](tmpStreamDefinition,this),tmpStreamDefinition.level);}}// Now initialize each one.
674
674
  for(let i=0;i<this.logStreams.length;i++){this.logStreams[i].initialize();}}logTime(pMessage,pDatum){let tmpMessage=typeof pMessage!=='undefined'?pMessage:'Time';let tmpTime=new Date();this.info(`${tmpMessage} ${tmpTime} (epoch ${+tmpTime})`,pDatum);}// Get a timestamp
675
675
  getTimeStamp(){return+new Date();}getTimeDelta(pTimeStamp){let tmpEndTime=+new Date();return tmpEndTime-pTimeStamp;}// Log the delta between a timestamp, and now with a message
676
- logTimeDelta(pTimeDelta,pMessage,pDatum){let tmpMessage=typeof pMessage!=='undefined'?pMessage:'Time Measurement';let tmpDatum=typeof pDatum==='object'?pDatum:{};let tmpEndTime=+new Date();this.info(`${tmpMessage} logged at (epoch ${+tmpEndTime}) took (${pTimeDelta}ms)`,pDatum);}logTimeDeltaHuman(pTimeDelta,pMessage,pDatum){let tmpMessage=typeof pMessage!=='undefined'?pMessage:'Time Measurement';let tmpEndTime=+new Date();let tmpMs=parseInt(pTimeDelta%1000);let tmpSeconds=parseInt(pTimeDelta/1000%60);let tmpMinutes=parseInt(pTimeDelta/(1000*60)%60);let tmpHours=parseInt(pTimeDelta/(1000*60*60));tmpMs=tmpMs<10?"00"+tmpMs:tmpMs<100?"0"+tmpMs:tmpMs;tmpSeconds=tmpSeconds<10?"0"+tmpSeconds:tmpSeconds;tmpMinutes=tmpMinutes<10?"0"+tmpMinutes:tmpMinutes;tmpHours=tmpHours<10?"0"+tmpHours:tmpHours;this.info(`${tmpMessage} logged at (epoch ${+tmpEndTime}) took (${pTimeDelta}ms) or (${tmpHours}:${tmpMinutes}:${tmpSeconds}.${tmpMs})`,pDatum);}logTimeDeltaRelative(pStartTime,pMessage,pDatum){this.logTimeDelta(this.getTimeDelta(pStartTime),pMessage,pDatum);}logTimeDeltaRelativeHuman(pStartTime,pMessage,pDatum){this.logTimeDeltaHuman(this.getTimeDelta(pStartTime),pMessage,pDatum);}}module.exports=FableLog;module.exports.LogProviderBase=require('./Fable-Log-BaseLogger.js');module.exports.LogProviderConsole=require('./Fable-Log-Logger-Console.js');module.exports.LogProviderFlatfile=require('./Fable-Log-Logger-SimpleFlatFile.js');},{"../package.json":51,"./Fable-Log-BaseLogger.js":52,"./Fable-Log-DefaultProviders-Node.js":53,"./Fable-Log-DefaultStreams.json":54,"./Fable-Log-Logger-Console.js":55,"./Fable-Log-Logger-SimpleFlatFile.js":56,"fable-serviceproviderbase":59}],58:[function(require,module,exports){module.exports={"name":"fable-serviceproviderbase","version":"3.0.19","description":"Simple base classes for fable services.","main":"source/Fable-ServiceProviderBase.js","scripts":{"start":"node source/Fable-ServiceProviderBase.js","test":"npx quack test","tests":"npx quack test -g","coverage":"npx quack coverage","build":"npx quack build","types":"tsc -p ./tsconfig.build.json","check":"tsc -p . --noEmit"},"types":"types/source/Fable-ServiceProviderBase.d.ts","mocha":{"diff":true,"extension":["js"],"package":"./package.json","reporter":"spec","slow":"75","timeout":"5000","ui":"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},"repository":{"type":"git","url":"https://github.com/stevenvelozo/fable-serviceproviderbase.git"},"keywords":["entity","behavior"],"author":"Steven Velozo <steven@velozo.com> (http://velozo.com/)","license":"MIT","bugs":{"url":"https://github.com/stevenvelozo/fable-serviceproviderbase/issues"},"homepage":"https://github.com/stevenvelozo/fable-serviceproviderbase","devDependencies":{"@types/mocha":"^10.0.10","fable":"^3.1.62","quackage":"^1.0.58","typescript":"^5.9.3"}};},{}],59:[function(require,module,exports){/**
676
+ logTimeDelta(pTimeDelta,pMessage,pDatum){let tmpMessage=typeof pMessage!=='undefined'?pMessage:'Time Measurement';let tmpDatum=typeof pDatum==='object'?pDatum:{};let tmpEndTime=+new Date();this.info(`${tmpMessage} logged at (epoch ${+tmpEndTime}) took (${pTimeDelta}ms)`,pDatum);}logTimeDeltaHuman(pTimeDelta,pMessage,pDatum){let tmpMessage=typeof pMessage!=='undefined'?pMessage:'Time Measurement';let tmpEndTime=+new Date();let tmpMs=parseInt(pTimeDelta%1000);let tmpSeconds=parseInt(pTimeDelta/1000%60);let tmpMinutes=parseInt(pTimeDelta/(1000*60)%60);let tmpHours=parseInt(pTimeDelta/(1000*60*60));tmpMs=tmpMs<10?"00"+tmpMs:tmpMs<100?"0"+tmpMs:tmpMs;tmpSeconds=tmpSeconds<10?"0"+tmpSeconds:tmpSeconds;tmpMinutes=tmpMinutes<10?"0"+tmpMinutes:tmpMinutes;tmpHours=tmpHours<10?"0"+tmpHours:tmpHours;this.info(`${tmpMessage} logged at (epoch ${+tmpEndTime}) took (${pTimeDelta}ms) or (${tmpHours}:${tmpMinutes}:${tmpSeconds}.${tmpMs})`,pDatum);}logTimeDeltaRelative(pStartTime,pMessage,pDatum){this.logTimeDelta(this.getTimeDelta(pStartTime),pMessage,pDatum);}logTimeDeltaRelativeHuman(pStartTime,pMessage,pDatum){this.logTimeDeltaHuman(this.getTimeDelta(pStartTime),pMessage,pDatum);}}module.exports=FableLog;module.exports.LogProviderBase=require('./Fable-Log-BaseLogger.js');module.exports.LogProviderConsole=require('./Fable-Log-Logger-Console.js');module.exports.LogProviderFlatfile=require('./Fable-Log-Logger-SimpleFlatFile.js');},{"../package.json":51,"./Fable-Log-BaseLogger.js":52,"./Fable-Log-DefaultProviders-Node.js":53,"./Fable-Log-DefaultStreams.json":54,"./Fable-Log-Logger-Console.js":55,"./Fable-Log-Logger-SimpleFlatFile.js":56,"fable-serviceproviderbase":59}],58:[function(require,module,exports){module.exports={"_from":"fable-serviceproviderbase@^3.0.19","_id":"fable-serviceproviderbase@3.0.19","_inBundle":false,"_integrity":"sha512-q/chQR1Z+sgfsDy4q0kHg09EEjUzYKLYHNUcLC0idTp08n3mzikU+ynKKDB56k2WkosZzhoAKg2YHRGi4/c3ig==","_location":"/fable-serviceproviderbase","_phantomChildren":{},"_requested":{"type":"range","registry":true,"raw":"fable-serviceproviderbase@^3.0.19","name":"fable-serviceproviderbase","escapedName":"fable-serviceproviderbase","rawSpec":"^3.0.19","saveSpec":null,"fetchSpec":"^3.0.19"},"_requiredBy":["/cachetrax","/data-arithmatic","/fable","/fable-log","/fable-settings","/fable-uuid","/manyfest","/meadow-connection-dgraph","/meadow-connection-manager","/meadow-connection-mongodb","/meadow-connection-mssql","/meadow-connection-mysql","/meadow-connection-postgresql","/meadow-connection-solr","/meadow-connection-sqlite","/meadow-endpoints","/meadow-integration","/meadow-migrationmanager/pict-section-flow","/orator","/orator-authentication","/orator-serviceserver-base","/orator-static-server","/pict-application","/pict-docuserve","/pict-provider","/pict-section-flow","/pict-section-form","/pict-service-commandlineutility","/pict-sessionmanager","/pict-template","/pict-terminalui","/pict-view","/retold-data-service","/stricture/pict-terminalui"],"_resolved":"https://registry.npmjs.org/fable-serviceproviderbase/-/fable-serviceproviderbase-3.0.19.tgz","_shasum":"e04a7f953bbd658b5e37c0a38ebbb54348a2f1d4","_spec":"fable-serviceproviderbase@^3.0.19","_where":"/Users/jacksonpollard/pict/node_modules/cachetrax","author":{"name":"Steven Velozo","email":"steven@velozo.com","url":"http://velozo.com/"},"bugs":{"url":"https://github.com/stevenvelozo/fable-serviceproviderbase/issues"},"bundleDependencies":false,"deprecated":false,"description":"Simple base classes for fable services.","devDependencies":{"@types/mocha":"^10.0.10","fable":"^3.1.62","quackage":"^1.0.58","typescript":"^5.9.3"},"homepage":"https://github.com/stevenvelozo/fable-serviceproviderbase","keywords":["entity","behavior"],"license":"MIT","main":"source/Fable-ServiceProviderBase.js","mocha":{"diff":true,"extension":["js"],"package":"./package.json","reporter":"spec","slow":"75","timeout":"5000","ui":"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},"name":"fable-serviceproviderbase","repository":{"type":"git","url":"git+https://github.com/stevenvelozo/fable-serviceproviderbase.git"},"scripts":{"build":"npx quack build","check":"tsc -p . --noEmit","coverage":"npx quack coverage","start":"node source/Fable-ServiceProviderBase.js","test":"npx quack test","tests":"npx quack test -g","types":"tsc -p ./tsconfig.build.json"},"types":"types/source/Fable-ServiceProviderBase.d.ts","version":"3.0.19"};},{}],59:[function(require,module,exports){/**
677
677
  * Fable Service Base
678
678
  * @author <steven@velozo.com>
679
679
  */const libPackage=require('../package.json');class FableServiceProviderBase{/**
@@ -694,7 +694,7 @@ this.serviceType=`Unknown-${this.UUID}`;// The service hash is used to identify
694
694
  this.Hash=typeof pServiceHash==='string'?pServiceHash:!this.fable&&typeof pOptions==='string'?pOptions:`${this.UUID}`;}/**
695
695
  * @param {import('fable')} pFable
696
696
  */connectFable(pFable){if(typeof pFable!=='object'||!pFable.isFable){let tmpErrorMessage=`Fable Service Provider Base: Cannot connect to Fable, invalid Fable object passed in. The pFable parameter was a [${typeof pFable}].}`;console.log(tmpErrorMessage);return new Error(tmpErrorMessage);}if(!this.fable){this.fable=pFable;}if(!this.log){this.log=this.fable.Logging;}if(!this.services){this.services=this.fable.services;}if(!this.servicesMap){this.servicesMap=this.fable.servicesMap;}return true;}}_defineProperty2(FableServiceProviderBase,"isFableService",true);module.exports=FableServiceProviderBase;// This is left here in case we want to go back to having different code/base class for "core" services
697
- module.exports.CoreServiceProviderBase=FableServiceProviderBase;},{"../package.json":58}],60:[function(require,module,exports){module.exports={"name":"fable-settings","version":"3.0.16","description":"A simple, tolerant configuration chain.","main":"source/Fable-Settings.js","scripts":{"start":"node source/Fable-Settings.js","coverage":"npx quack coverage","test":"npx quack test","build":"npx quack build","docker-dev-build-image":"docker build ./ -f Dockerfile_LUXURYCode -t retold/fable-settings:local","docker-dev-run":"docker run -it -d --name retold-fable-settings-dev -p 30003:8080 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/fable-settings\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" retold/fable-settings:local"},"mocha":{"diff":true,"extension":["js"],"package":"./package.json","reporter":"spec","slow":"75","timeout":"5000","ui":"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},"repository":{"type":"git","url":"https://github.com/stevenvelozo/fable-settings.git"},"keywords":["configuration"],"author":"Steven Velozo <steven@velozo.com> (http://velozo.com/)","license":"MIT","bugs":{"url":"https://github.com/stevenvelozo/fable-settings/issues"},"homepage":"https://github.com/stevenvelozo/fable-settings","devDependencies":{"quackage":"^1.0.58"},"dependencies":{"fable-serviceproviderbase":"^3.0.19","precedent":"^1.0.17"}};},{}],61:[function(require,module,exports){module.exports={"Product":"ApplicationNameHere","ProductVersion":"0.0.0","ConfigFile":false,"LogStreams":[{"level":"trace"}]};},{}],62:[function(require,module,exports){(function(process){(function(){/**
697
+ module.exports.CoreServiceProviderBase=FableServiceProviderBase;},{"../package.json":58}],60:[function(require,module,exports){module.exports={"_from":"fable-settings@^3.0.16","_id":"fable-settings@3.0.16","_inBundle":false,"_integrity":"sha512-GTcUdDdWHhhjN3c9JZPczmuTK/cbl3iJzWfkY8zkvyJjFt/b2gyTHR1jL0OBQaeVJ3xToZaH7QRFhfJxlr4mMQ==","_location":"/fable-settings","_phantomChildren":{},"_requested":{"type":"range","registry":true,"raw":"fable-settings@^3.0.16","name":"fable-settings","escapedName":"fable-settings","rawSpec":"^3.0.16","saveSpec":null,"fetchSpec":"^3.0.16"},"_requiredBy":["/fable"],"_resolved":"https://registry.npmjs.org/fable-settings/-/fable-settings-3.0.16.tgz","_shasum":"c576f75f4338a0fc4f37fe59444ce4f4124eb002","_spec":"fable-settings@^3.0.16","_where":"/Users/jacksonpollard/pict/node_modules/fable","author":{"name":"Steven Velozo","email":"steven@velozo.com","url":"http://velozo.com/"},"bugs":{"url":"https://github.com/stevenvelozo/fable-settings/issues"},"bundleDependencies":false,"dependencies":{"fable-serviceproviderbase":"^3.0.19","precedent":"^1.0.17"},"deprecated":false,"description":"A simple, tolerant configuration chain.","devDependencies":{"quackage":"^1.0.58"},"homepage":"https://github.com/stevenvelozo/fable-settings","keywords":["configuration"],"license":"MIT","main":"source/Fable-Settings.js","mocha":{"diff":true,"extension":["js"],"package":"./package.json","reporter":"spec","slow":"75","timeout":"5000","ui":"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},"name":"fable-settings","repository":{"type":"git","url":"git+https://github.com/stevenvelozo/fable-settings.git"},"scripts":{"build":"npx quack build","coverage":"npx quack coverage","docker-dev-build-image":"docker build ./ -f Dockerfile_LUXURYCode -t retold/fable-settings:local","docker-dev-run":"docker run -it -d --name retold-fable-settings-dev -p 30003:8080 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/fable-settings\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" retold/fable-settings:local","start":"node source/Fable-Settings.js","test":"npx quack test"},"version":"3.0.16"};},{}],61:[function(require,module,exports){module.exports={"Product":"ApplicationNameHere","ProductVersion":"0.0.0","ConfigFile":false,"LogStreams":[{"level":"trace"}]};},{}],62:[function(require,module,exports){(function(process){(function(){/**
698
698
  * Fable Settings Template Processor
699
699
  *
700
700
  * This class allows environment variables to come in via templated expressions, and defaults to be set.
@@ -738,7 +738,7 @@ this._configureEnvTemplating(tmpSettingsTo);return tmpSettingsTo;}// Fill in set
738
738
  fill(pSettingsFrom){// If an invalid settings from object is passed in (e.g. object constructor without passing in anything) this should still work
739
739
  let tmpSettingsFrom=typeof pSettingsFrom==='object'?pSettingsFrom:{};// do not mutate the From object property values
740
740
  let tmpSettingsFromCopy=JSON.parse(JSON.stringify(tmpSettingsFrom));this.settings=this._deepMergeObjects(tmpSettingsFromCopy,this.settings);return this.settings;}};// This is for backwards compatibility
741
- function autoConstruct(pSettings){return new FableSettings(pSettings);}module.exports=FableSettings;module.exports.new=autoConstruct;},{"../package.json":60,"./Fable-Settings-Default":61,"./Fable-Settings-TemplateProcessor.js":62,"fable-serviceproviderbase":59}],64:[function(require,module,exports){module.exports={"name":"fable-uuid","version":"3.0.14","description":"A simple UUID Generator.","main":"source/Fable-UUID.js","scripts":{"start":"node source/Fable-UUID.js","coverage":"npx quack coverage","test":"npx quack test","build":"npx quack build","docker-dev-build-image":"docker build ./ -f Dockerfile_LUXURYCode -t retold/fable-uuid:local","docker-dev-run":"docker run -it -d --name retold-fable-uuid-dev -p 30002:8080 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/fable-uuid\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" retold/fable-uuid:local"},"mocha":{"diff":true,"extension":["js"],"package":"./package.json","reporter":"spec","slow":"75","timeout":"5000","ui":"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},"repository":{"type":"git","url":"https://github.com/stevenvelozo/fable-uuid.git"},"keywords":["logging"],"author":"Steven Velozo <steven@velozo.com> (http://velozo.com/)","license":"MIT","bugs":{"url":"https://github.com/stevenvelozo/fable-uuid/issues"},"browser":{"./source/Fable-UUID-Random.js":"./source/Fable-UUID-Random-Browser.js"},"homepage":"https://github.com/stevenvelozo/fable-uuid","devDependencies":{"pict-docuserve":"^0.1.5","quackage":"^1.1.2"},"dependencies":{"fable-serviceproviderbase":"^3.0.19"}};},{}],65:[function(require,module,exports){/**
741
+ function autoConstruct(pSettings){return new FableSettings(pSettings);}module.exports=FableSettings;module.exports.new=autoConstruct;},{"../package.json":60,"./Fable-Settings-Default":61,"./Fable-Settings-TemplateProcessor.js":62,"fable-serviceproviderbase":59}],64:[function(require,module,exports){module.exports={"_from":"fable-uuid@^3.0.14","_id":"fable-uuid@3.0.14","_inBundle":false,"_integrity":"sha512-Jbr9I1/TCdxtvD9udNFsRpdoa0XIfcgx6IEo6oa8hiPEWsPdzb2MnQGGRAPqsft5kC0eEYBr/sf4P3LqeFK7Jw==","_location":"/fable-uuid","_phantomChildren":{},"_requested":{"type":"range","registry":true,"raw":"fable-uuid@^3.0.14","name":"fable-uuid","escapedName":"fable-uuid","rawSpec":"^3.0.14","saveSpec":null,"fetchSpec":"^3.0.14"},"_requiredBy":["/fable"],"_resolved":"https://registry.npmjs.org/fable-uuid/-/fable-uuid-3.0.14.tgz","_shasum":"41a4550f6245c980ab731d44fac999730e3f6678","_spec":"fable-uuid@^3.0.14","_where":"/Users/jacksonpollard/pict/node_modules/fable","author":{"name":"Steven Velozo","email":"steven@velozo.com","url":"http://velozo.com/"},"browser":{"./source/Fable-UUID-Random.js":"./source/Fable-UUID-Random-Browser.js"},"bugs":{"url":"https://github.com/stevenvelozo/fable-uuid/issues"},"bundleDependencies":false,"dependencies":{"fable-serviceproviderbase":"^3.0.19"},"deprecated":false,"description":"A simple UUID Generator.","devDependencies":{"pict-docuserve":"^0.1.5","quackage":"^1.1.2"},"homepage":"https://github.com/stevenvelozo/fable-uuid","keywords":["logging"],"license":"MIT","main":"source/Fable-UUID.js","mocha":{"diff":true,"extension":["js"],"package":"./package.json","reporter":"spec","slow":"75","timeout":"5000","ui":"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},"name":"fable-uuid","repository":{"type":"git","url":"git+https://github.com/stevenvelozo/fable-uuid.git"},"scripts":{"build":"npx quack build","coverage":"npx quack coverage","docker-dev-build-image":"docker build ./ -f Dockerfile_LUXURYCode -t retold/fable-uuid:local","docker-dev-run":"docker run -it -d --name retold-fable-uuid-dev -p 30002:8080 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/fable-uuid\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" retold/fable-uuid:local","start":"node source/Fable-UUID.js","test":"npx quack test"},"version":"3.0.14"};},{}],65:[function(require,module,exports){/**
742
742
  * Random Byte Generator - Browser version
743
743
  *
744
744
  *
@@ -771,7 +771,7 @@ generateUUIDv4(){let tmpBuffer=new Array(16);var tmpRandomBytes=this.randomByteG
771
771
  tmpRandomBytes[6]=tmpRandomBytes[6]&0x0f|0x40;tmpRandomBytes[8]=tmpRandomBytes[8]&0x3f|0x80;return this.bytesToUUID(tmpRandomBytes);}// Simple random UUID generation
772
772
  generateRandom(){let tmpUUID='';for(let i=0;i<this._UUIDLength;i++){tmpUUID+=this._UUIDRandomDictionary.charAt(Math.floor(Math.random()*(this._UUIDRandomDictionary.length-1)));}return tmpUUID;}// Adapted from node-uuid (https://github.com/kelektiv/node-uuid)
773
773
  getUUID(){if(this._UUIDModeRandom){return this.generateRandom();}else{return this.generateUUIDv4();}}}// This is for backwards compatibility
774
- function autoConstruct(pSettings){return new FableUUID(pSettings);}module.exports=FableUUID;module.exports.new=autoConstruct;},{"../package.json":64,"./Fable-UUID-Random.js":65,"fable-serviceproviderbase":59}],67:[function(require,module,exports){module.exports={"name":"fable","version":"3.1.74","description":"A service dependency injection, configuration and logging library.","main":"source/Fable.js","scripts":{"start":"node source/Fable.js","coverage":"npx quack coverage","test":"npx quack test","build":"npx quack build","prepublishOnly":"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t fable-image:local","docker-dev-run":"docker run -it -d --name fable-dev -p 30001:8080 -p 38086:8086 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/fable\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" fable-image:local","docker-dev-shell":"docker exec -it fable-dev /bin/bash","tests":"npx quack test -g"},"mocha":{"diff":true,"extension":["js"],"package":"./package.json","reporter":"spec","slow":"75","timeout":"5000","ui":"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},"browser":{"./source/service/Fable-Service-EnvironmentData.js":"./source/service/Fable-Service-EnvironmentData-Web.js","./source/service/Fable-Service-FilePersistence.js":"./source/service/Fable-Service-FilePersistence-Web.js"},"repository":{"type":"git","url":"https://github.com/stevenvelozo/fable.git"},"keywords":["entity","behavior"],"author":"Steven Velozo <steven@velozo.com> (http://velozo.com/)","license":"MIT","bugs":{"url":"https://github.com/stevenvelozo/fable/issues"},"homepage":"https://github.com/stevenvelozo/fable","devDependencies":{"pict-docuserve":"^1.3.2","quackage":"^1.2.3"},"dependencies":{"async.eachlimit":"^0.5.2","async.waterfall":"^0.5.2","big.js":"^7.0.1","cachetrax":"^1.0.6","cookie":"^1.1.1","data-arithmatic":"^1.0.7","dayjs":"^1.11.19","fable-log":"^3.0.18","fable-serviceproviderbase":"^3.0.19","fable-settings":"^3.0.16","fable-uuid":"^3.0.14","manyfest":"^1.0.49","simple-get":"^4.0.1"}};},{}],68:[function(require,module,exports){/**
774
+ function autoConstruct(pSettings){return new FableUUID(pSettings);}module.exports=FableUUID;module.exports.new=autoConstruct;},{"../package.json":64,"./Fable-UUID-Random.js":65,"fable-serviceproviderbase":59}],67:[function(require,module,exports){module.exports={"_from":"fable@^3.1.74","_id":"fable@3.1.75","_inBundle":false,"_integrity":"sha512-HHe53CNv5gXZZ0FEq2qoj0RqlF9TsIFQ1WX/V2CGj8POKJhM3JbUVIyxBcpZr5zHGbzZ+9PWZ0TUdxQWUYJ9zg==","_location":"/fable","_phantomChildren":{},"_requested":{"type":"range","registry":true,"raw":"fable@^3.1.74","name":"fable","escapedName":"fable","rawSpec":"^3.1.74","saveSpec":null,"fetchSpec":"^3.1.74"},"_requiredBy":["/","/foxhound","/meadow-endpoints","/meadow-integration","/meadow-migrationmanager","/pict","/pict-terminalui","/pict-view","/retold-data-service","/stricture","/stricture/pict-terminalui"],"_resolved":"https://registry.npmjs.org/fable/-/fable-3.1.75.tgz","_shasum":"1e61d5f1ee963e1b9810b5c28757fe1cfaff052a","_spec":"fable@^3.1.74","_where":"/Users/jacksonpollard/pict","author":{"name":"Steven Velozo","email":"steven@velozo.com","url":"http://velozo.com/"},"browser":{"./source/service/Fable-Service-EnvironmentData.js":"./source/service/Fable-Service-EnvironmentData-Web.js","./source/service/Fable-Service-FilePersistence.js":"./source/service/Fable-Service-FilePersistence-Web.js"},"bugs":{"url":"https://github.com/stevenvelozo/fable/issues"},"bundleDependencies":false,"dependencies":{"async.eachlimit":"^0.5.2","async.waterfall":"^0.5.2","big.js":"^7.0.1","cachetrax":"^1.0.6","cookie":"^1.1.1","data-arithmatic":"^1.0.7","dayjs":"^1.11.19","fable-log":"^3.0.18","fable-serviceproviderbase":"^3.0.19","fable-settings":"^3.0.16","fable-uuid":"^3.0.14","manyfest":"^1.0.49","simple-get":"^4.0.1"},"deprecated":false,"description":"A service dependency injection, configuration and logging library.","devDependencies":{"pict-docuserve":"^1.3.2","quackage":"^1.2.3"},"homepage":"https://github.com/stevenvelozo/fable","keywords":["entity","behavior"],"license":"MIT","main":"source/Fable.js","mocha":{"diff":true,"extension":["js"],"package":"./package.json","reporter":"spec","slow":"75","timeout":"5000","ui":"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},"name":"fable","repository":{"type":"git","url":"git+https://github.com/stevenvelozo/fable.git"},"scripts":{"build":"npx quack build","coverage":"npx quack coverage","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t fable-image:local","docker-dev-run":"docker run -it -d --name fable-dev -p 30001:8080 -p 38086:8086 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/fable\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" fable-image:local","docker-dev-shell":"docker exec -it fable-dev /bin/bash","prepublishOnly":"npx quack build","start":"node source/Fable.js","test":"npx quack test","tests":"npx quack test -g"},"version":"3.1.75"};},{}],68:[function(require,module,exports){/**
775
775
  * Fable Application Services Support Library
776
776
  * @author <steven@velozo.com>
777
777
  */// Pre-init services
@@ -958,7 +958,7 @@ if(!(pEndIndex<this.length)){pEndIndex=this.length;}else{pEndIndex|=0;// round p
958
958
  * @param {string} pJoin - The string to join with
959
959
  * @param {...any} pParams - Any number of parameters
960
960
  * @return {string}
961
- */joinStringsInternal(){const[pJoinOn,...pParams]=arguments;const tmpFlattenedArrays=this.fable.Utility.flattenArrayOfSolverInputs(pParams);return this.joinStrings(pJoinOn,...tmpFlattenedArrays);}/**
961
+ */joinStringsInternal(){const _arguments=Array.prototype.slice.call(arguments),pJoinOn=_arguments[0],pParams=_arrayLikeToArray(_arguments).slice(1);const tmpFlattenedArrays=this.fable.Utility.flattenArrayOfSolverInputs(pParams);return this.joinStrings(pJoinOn,...tmpFlattenedArrays);}/**
962
962
  * Concatenate a list of values together into a string.
963
963
  *
964
964
  * @param {...any} pValues - The strings to concatenate
@@ -980,7 +980,7 @@ if(!(pEndIndex<this.length)){pEndIndex=this.length;}else{pEndIndex|=0;// round p
980
980
  * @param {string} pJoin - The string to join with
981
981
  * @param {...any} pParams - Any number of parameters
982
982
  * @return {string}
983
- */joinStringsRawInternal(){const[pJoinOn,...pParams]=arguments;const tmpFlattenedArrays=this.fable.Utility.flattenArrayOfSolverInputs(pParams);return this.joinStringsRaw(pJoinOn,...tmpFlattenedArrays);}/**
983
+ */joinStringsRawInternal(){const _arguments2=Array.prototype.slice.call(arguments),pJoinOn=_arguments2[0],pParams=_arrayLikeToArray(_arguments2).slice(1);const tmpFlattenedArrays=this.fable.Utility.flattenArrayOfSolverInputs(pParams);return this.joinStringsRaw(pJoinOn,...tmpFlattenedArrays);}/**
984
984
  * Clean wrapping characters if they exist consistently around the string. If they do not, the string is returned unchanged.
985
985
  *
986
986
  * @param {string} pWrapCharacter - The character expected as the wrapping character
@@ -1426,7 +1426,7 @@ this.LogNoisiness='LogNoisiness'in this.fable?this.fable.LogNoisiness:0;}/**
1426
1426
  * @returns {any} - The result of solving the expression.
1427
1427
  */solve(pExpression,pDataSourceObject,pResultObject,pManifest,pDataDestinationObject){let tmpResultsObject=typeof pResultObject==='object'?pResultObject:{};let tmpDataSourceObject=typeof pDataSourceObject==='object'?pDataSourceObject:{};let tmpDataDestinationObject=typeof pDataDestinationObject==='object'?pDataDestinationObject:{};// This is technically a "pre-compile" and we can keep this Results Object around to reuse for better performance. Not required.
1428
1428
  this.tokenize(pExpression,tmpResultsObject);// Lint the tokenized expression to make sure it's valid
1429
- this.lintTokenizedExpression(tmpResultsObject.RawTokens,tmpResultsObject);this.buildPostfixedSolveList(tmpResultsObject.RawTokens,tmpResultsObject);const tmpManifest=typeof pManifest==='object'?pManifest:this.fable.newManyfest();if(tmpResultsObject.SolverDirectives.Code=='SERIES'){const[tmpStep,tmpFrom,tmpTo]=this._prepareDirectiveParameters([tmpResultsObject.SolverDirectives.Step,tmpResultsObject.SolverDirectives.From,tmpResultsObject.SolverDirectives.To],['1'],tmpResultsObject,tmpDataSourceObject,tmpManifest);if(isNaN(tmpFrom)||isNaN(tmpTo)){tmpResultsObject.ExpressionParserLog.push(`ExpressionParser.solve detected invalid SERIES directive parameters. FROM, TO must be numeric.`);this.log.warn(tmpResultsObject.ExpressionParserLog[tmpResultsObject.ExpressionParserLog.length-1]);return null;}// Make sure from/to are not equal
1429
+ this.lintTokenizedExpression(tmpResultsObject.RawTokens,tmpResultsObject);this.buildPostfixedSolveList(tmpResultsObject.RawTokens,tmpResultsObject);const tmpManifest=typeof pManifest==='object'?pManifest:this.fable.newManyfest();if(tmpResultsObject.SolverDirectives.Code=='SERIES'){const _this$_prepareDirecti=this._prepareDirectiveParameters([tmpResultsObject.SolverDirectives.Step,tmpResultsObject.SolverDirectives.From,tmpResultsObject.SolverDirectives.To],['1'],tmpResultsObject,tmpDataSourceObject,tmpManifest),_this$_prepareDirecti2=_slicedToArray(_this$_prepareDirecti,3),tmpStep=_this$_prepareDirecti2[0],tmpFrom=_this$_prepareDirecti2[1],tmpTo=_this$_prepareDirecti2[2];if(isNaN(tmpFrom)||isNaN(tmpTo)){tmpResultsObject.ExpressionParserLog.push(`ExpressionParser.solve detected invalid SERIES directive parameters. FROM, TO must be numeric.`);this.log.warn(tmpResultsObject.ExpressionParserLog[tmpResultsObject.ExpressionParserLog.length-1]);return null;}// Make sure from/to are not equal
1430
1430
  if(this.fable.Math.comparePrecise(tmpFrom,tmpTo)==0){tmpResultsObject.ExpressionParserLog.push(`ExpressionParser.solve detected invalid SERIES directive parameters. FROM and TO cannot be equal.`);this.log.warn(tmpResultsObject.ExpressionParserLog[tmpResultsObject.ExpressionParserLog.length-1]);return null;}// Make sure that Step is the correct positive/negative based on From and To
1431
1431
  if(this.fable.Math.comparePrecise(tmpStep,'0')==0){tmpResultsObject.ExpressionParserLog.push(`ExpressionParser.solve detected invalid SERIES directive parameters. STEP cannot be zero.`);this.log.warn(tmpResultsObject.ExpressionParserLog[tmpResultsObject.ExpressionParserLog.length-1]);return null;}if(this.fable.Math.comparePrecise(tmpFrom,tmpTo)<0){// From < To so Step must be positive
1432
1432
  if(this.fable.Math.comparePrecise(tmpStep,'0')<0){tmpResultsObject.ExpressionParserLog.push(`ExpressionParser.solve detected invalid SERIES directive parameters. STEP must be positive when FROM < TO.`);this.log.warn(tmpResultsObject.ExpressionParserLog[tmpResultsObject.ExpressionParserLog.length-1]);return null;}}else{// From >= To so Step must be negative
@@ -1456,7 +1456,7 @@ if(tmpTargetRowIndex<0||tmpTargetRowIndex>=tmpRows.length){// Out of bounds -- u
1456
1456
  tmpRowStepDataSourceObject[tmpVariableKey]=tmpVariableDescription.Default;}else{const tmpTargetRow=tmpRows[tmpTargetRowIndex];if(tmpVariableDescription.Property===null){// No property specified, use the whole row
1457
1457
  tmpRowStepDataSourceObject[tmpVariableKey]=tmpTargetRow;}else{// Look up the property on the target row
1458
1458
  let tmpValue=tmpManifest.getValueByHash(tmpTargetRow,tmpVariableDescription.Property);if(tmpValue==null){tmpValue=tmpVariableDescription.Default;}tmpRowStepDataSourceObject[tmpVariableKey]=tmpValue;}}}let tmpMutatedValues=this.substituteValuesInTokenizedObjects(tmpResultsObject.PostfixTokenObjects,tmpRowStepDataSourceObject,tmpResultsObject,tmpManifest);tmpValueArray.push(this.solvePostfixedExpression(tmpResultsObject.PostfixSolveList,tmpDataDestinationObject,tmpResultsObject,tmpManifest));for(let j=0;j<tmpMutatedValues.length;j++){tmpMutatedValues[j].Resolved=false;}tmpStepCounter++;}// Do the assignment
1459
- let tmpAssignmentManifestHash=tmpResultsObject.PostfixedAssignmentAddress;if(tmpResultsObject.OriginalRawTokens[1]==='='&&typeof tmpResultsObject.OriginalRawTokens[0]==='string'&&tmpResultsObject.OriginalRawTokens[0].length>0){tmpAssignmentManifestHash=tmpResultsObject.OriginalRawTokens[0];}tmpManifest.setValueByHash(tmpDataDestinationObject,tmpAssignmentManifestHash,tmpValueArray);return tmpValueArray;}else if(tmpResultsObject.SolverDirectives.Code=='MONTECARLO'){const[tmpSampleCount]=this._prepareDirectiveParameters([tmpResultsObject.SolverDirectives.SampleCount],['1'],tmpResultsObject,tmpDataSourceObject,tmpManifest);if(isNaN(tmpSampleCount)){tmpResultsObject.ExpressionParserLog.push(`ExpressionParser.solve detected invalid MONTECARLO directive parameters. SAMPLECOUNT must be numeric.`);this.log.warn(tmpResultsObject.ExpressionParserLog[tmpResultsObject.ExpressionParserLog.length-1]);return null;}let tmpMonteCarloOutput=JSON.parse(JSON.stringify(tmpResultsObject.SolverDirectives));tmpMonteCarloOutput.Samples=[];// Now go through each variable and prepare its object of values
1459
+ let tmpAssignmentManifestHash=tmpResultsObject.PostfixedAssignmentAddress;if(tmpResultsObject.OriginalRawTokens[1]==='='&&typeof tmpResultsObject.OriginalRawTokens[0]==='string'&&tmpResultsObject.OriginalRawTokens[0].length>0){tmpAssignmentManifestHash=tmpResultsObject.OriginalRawTokens[0];}tmpManifest.setValueByHash(tmpDataDestinationObject,tmpAssignmentManifestHash,tmpValueArray);return tmpValueArray;}else if(tmpResultsObject.SolverDirectives.Code=='MONTECARLO'){const _this$_prepareDirecti3=this._prepareDirectiveParameters([tmpResultsObject.SolverDirectives.SampleCount],['1'],tmpResultsObject,tmpDataSourceObject,tmpManifest),_this$_prepareDirecti4=_slicedToArray(_this$_prepareDirecti3,1),tmpSampleCount=_this$_prepareDirecti4[0];if(isNaN(tmpSampleCount)){tmpResultsObject.ExpressionParserLog.push(`ExpressionParser.solve detected invalid MONTECARLO directive parameters. SAMPLECOUNT must be numeric.`);this.log.warn(tmpResultsObject.ExpressionParserLog[tmpResultsObject.ExpressionParserLog.length-1]);return null;}let tmpMonteCarloOutput=JSON.parse(JSON.stringify(tmpResultsObject.SolverDirectives));tmpMonteCarloOutput.Samples=[];// Now go through each variable and prepare its object of values
1460
1460
  let tmpVariableKeys=Object.keys(tmpMonteCarloOutput.Values);for(let i=0;i<tmpVariableKeys.length;i++){let tmpVariableKey=tmpVariableKeys[i];let tmpVariableDescription=tmpMonteCarloOutput.Values[tmpVariableKey];// For each variable, generate its array of sampled values
1461
1461
  tmpVariableDescription.Distribution={};tmpVariableDescription.ValueSequence=[];// Resolve the points if they are tokenized expressions
1462
1462
  const tmpResolvedPoints=[];for(let j=0;j<tmpVariableDescription.Points.length;j++){let tmpPointToken=tmpVariableDescription.Points[j];let tmpPointValue=this.fable.Math.parsePrecise(tmpPointToken,NaN);if(isNaN(tmpPointValue)&&typeof tmpPointToken==='string'&&tmpPointToken.length>0){tmpPointValue=tmpManifest.getValueByHash(tmpDataSourceObject,tmpPointToken);if(!tmpPointValue||tmpPointValue==null){//TODO: Warn?
@@ -1618,7 +1618,7 @@ tmpCurrentTokenType='Value';tmpCurrentToken+=tmpCharacter;// continue;
1618
1618
  // tmpResults.ExpressionParserLog.push(`ExpressionParser.tokenize found an unknown character code ${tmpCharCode} character ${tmpCharacter} in the expression: ${pExpression} at index ${i}`);
1619
1619
  // this.log.warn(tmpResults.ExpressionParserLog[tmpResults.ExpressionParserLog.length-1]);
1620
1620
  }if(tmpCurrentTokenType&&tmpCurrentToken.length>0){tmpResults.RawTokens.push(tmpCurrentToken);}tmpResults.OriginalRawTokens=Array.from(tmpResults.RawTokens);// Potentially mutate the tokens based on directives in the tokenized expression
1621
- this.TokenizerDirectiveMutation.parseDirectives(tmpResults);return tmpResults.RawTokens;}}module.exports=ExpressionTokenizer;},{"./Fable-Service-ExpressionParser-Base.js":77}],80:[function(require,module,exports){module.exports={"sqrt":{"Name":"Square Root","Address":"fable.Math.sqrtPrecise"},"percent":{"Name":"Compute Percent (in IS over OF format)","Address":"fable.Math.percentagePrecise"},"compare":{"Name":"Compare","Address":"fable.Math.comparePrecise"},"abs":{"Name":"Absolute Value","Address":"fable.Math.absPrecise"},"floor":{"Name":"Floor Value","Address":"fable.Math.floorPrecise"},"ceil":{"Name":"Ceiling Value","Address":"fable.Math.ceilPrecise"},"rad":{"Name":"Degrees to Radians","Address":"fable.Math.radPrecise"},"pi":{"Name":"Pi","Address":"fable.Math.piPrecise"},"euler":{"Name":"Euler","Address":"fable.Math.eulerPrecise"},"log":{"Name":"Logarithm","Address":"fable.Math.logPrecise"},"exp":{"Name":"Eulers Number to the Power Of N","Address":"fable.Math.expPrecise"},"sin":{"Name":"Sine","Address":"fable.Math.sin"},"cos":{"Name":"Cosine","Address":"fable.Math.cos"},"tan":{"Name":"Tangent","Address":"fable.Math.tan"},"count":{"Name":"Count Set Elements","Address":"fable.Math.countSetElements"},"countset":{"Name":"Count Set Elements","Address":"fable.Math.countSetElements"},"sortset":{"Name":"Sort Set","Address":"fable.Math.sortSetPrecise"},"bucketset":{"Name":"Bucket Set","Address":"fable.Math.bucketSetPrecise"},"sorthistogram":{"Name":"Sort Histogram","Address":"fable.Math.sortHistogramPrecise"},"sorthistogrambykeys":{"Name":"Sort Histogram by Keys","Address":"fable.Math.sortHistogramByKeys"},"max":{"Name":"Maximum","Address":"fable.Math.maxPrecise"},"min":{"Name":"Minimum","Address":"fable.Math.minPrecise"},"sum":{"Name":"Sum","Address":"fable.Math.sumPrecise"},"avg":{"Name":"Average","Address":"fable.Math.averagePrecise"},"mean":{"Name":"Mean","Address":"fable.Math.meanPrecise"},"median":{"Name":"Median","Address":"fable.Math.medianPrecise"},"mode":{"Name":"Mode","Address":"fable.Math.modePrecise"},"var":{"Name":"Variance (Sample)","Address":"fable.Math.variancePrecise"},"vara":{"Name":"Variance (Sample)","Address":"fable.Math.variancePrecise"},"varp":{"Name":"Variance (Population)","Address":"fable.Math.populationVariancePrecise"},"stdev":{"Name":"Standard Deviation (Sample)","Address":"fable.Math.standardDeviationPrecise"},"stdeva":{"Name":"Standard Deviation (Sample)","Address":"fable.Math.standardDeviationPrecise"},"stdevp":{"Name":"Standard Deviation (Population)","Address":"fable.Math.populationStandardDeviationPrecise"},"round":{"Name":"Round","Address":"fable.Math.roundPrecise"},"tofixed":{"Name":"To Fixed","Address":"fable.Math.toFixedPrecise"},"cumulativesummation":{"Name":"Sum each value in a Histogram or Value Map cumulatively, creating or setting a property with the result on each row","Address":"fable.Math.cumulativeSummation"},"subtractingsummation":{"Name":"Subtract each subsequent value in a Histogram or Value Map cumulatively (by default from the first row), creating or setting a property with the result on each row.","Address":"fable.Math.subtractingSummation"},"iterativeseries":{"Name":"Perform an Iterative Series of Mathematical Operations on Set Elements","Address":"fable.Math.iterativeSeries"},"countsetelements":{"Name":"Count Set Elements in a Histogram or Value Map","Address":"fable.Math.countSetElements"},"getvalue":{"Name":"Get Value from Application State or Services (AppData, etc.)","Address":"fable.Utility.getInternalValueByHash","AddressParameterIndices":[0]},"setvalue":{"Name":"Set Value to Application State or Services (AppData, etc.)","Address":"fable.Utility.setInternalValueByHash","AddressParameterIndices":[0]},"objectkeystoarray":{"Name":"Get Array of an Object's keys","Address":"fable.Utility.objectKeysToArray"},"objectvaluestoarray":{"Name":"Get Array of an Object's values","Address":"fable.Utility.objectValuesToArray"},"generatearrayofobjectsfromsets":{"Name":"Generate Array of Objects from Sets","Address":"fable.Utility.generateArrayOfObjectsFromSets"},"objectvaluessortbyexternalobjectarray":{"Name":"Get Array of an Object's values sorted by an external array","Address":"fable.Utility.objectValuesSortByExternalArray"},"setkeystoarray":{"Name":"Get Array of an Object's keys","Address":"fable.Utility.objectKeysToArray"},"setvaluestoarray":{"Name":"Get Array of an Object's values","Address":"fable.Utility.objectValuesToArray"},"histogramkeystoarray":{"Name":"Get Array of an Object's keys","Address":"fable.Utility.objectKeysToArray"},"histogramvaluestoarray":{"Name":"Get Array of an Object's values","Address":"fable.Utility.objectValuesToArray"},"createarrayfromabsolutevalues":{"Name":"Create Array from Absolute Values","Address":"fable.Utility.createArrayFromAbsoluteValues"},"flatten":{"Name":"flatten an array of values","Address":"fable.Utility.flattenArrayOfSolverInputs"},"findfirstvaluebyexactmatch":{"Name":"find + map on array of objects","Address":"fable.Utility.findFirstValueByExactMatchInternal","AddressParameterIndices":[0,1,3]},"findfirstvaluebystringincludes":{"Name":"find + map on array of objects","Address":"fable.Utility.findFirstValueByStringIncludesInternal","AddressParameterIndices":[0,1,3]},"match":{"Name":"Implementation of sheets MATCH() function","Address":"fable.Utility.findIndexInternal","AddressParameterIndices":[1]},"resolvehtmlentities":{"Name":"resolve HTML entities","Address":"fable.DataFormat.resolveHtmlEntities"},"concat":{"Name":"concatenate an array of values and output a string","Address":"fable.DataFormat.concatenateStringsInternal"},"concatraw":{"Name":"concatenate an array of values and output a string","Address":"fable.DataFormat.concatenateStringsRawInternal"},"arrayconcat":{"Name":"concatenate two or more arrays generating a single output array","Address":"fable.Utility.concatenateArrays"},"join":{"Name":"join an array of values and output a string","Address":"fable.DataFormat.joinStringsInternal"},"joinraw":{"Name":"join an array of values and output a string","Address":"fable.DataFormat.joinStringsRawInternal"},"if":{"Name":"perform a conditional operator on two values, and choose one of two outcomes based on the result","Address":"fable.Logic.checkIf"},"when":{"Name":"perform a 'truthy' check on one value, and return one of two outcomes based on the result","Address":"fable.Logic.when"},"ternary":{"Name":"numeric-aware ternary selection (used by ? :: operator desugaring)","Address":"fable.Logic.ternary"},"entryinset":{"Name":"Entry in Set","Address":"fable.Math.entryInSet"},"smallestinset":{"Name":"Smallest in Set","Address":"fable.Math.smallestInSet"},"largestinset":{"Name":"Largest in Set","Address":"fable.Math.largestInSet"},"aggregationhistogram":{"Name":"Generate a Histogram by Exact Value Aggregation","Address":"fable.Math.histogramAggregationByExactValueFromInternalState"},"aggregationhistogrambyobject":{"Name":"Generate a Histogram by Exact Value Aggregation from Object Property","Address":"fable.Math.histogramAggregationByExactValue"},"distributionhistogram":{"Name":"Generate a Histogram Based on Value Distribution","Address":"fable.Math.histogramDistributionByExactValueFromInternalState"},"distributionhistogrambyobject":{"Name":"Generate a Histogram Based on Value Distribution from Object Property","Address":"fable.Math.histogramDistributionByExactValue"},"setconcatenate":{"Name":"Set Concatenate","Address":"fable.Math.setConcatenate"},"getvaluearray":{"Name":"Get Value Array from Application State or Services (AppData, etc.)","Address":"fable.Utility.createValueArrayByHashParametersFromInternal","AddressParameterIndices":[0,1,2,3,4,5,6,7,8,9]},"getvalueobject":{"Name":"Get Value Object from Application State or Services (AppData, etc.)","Address":"fable.Utility.createValueObjectByHashParametersFromInternal","AddressParameterIndices":[0,1,2,3,4,5,6,7,8,9]},"cleanvaluearray":{"Name":"Clean Value Array","Address":"fable.Math.cleanValueArray"},"cleanvalueobject":{"Name":"Clean Value Object","Address":"fable.Math.cleanValueObject"},"polynomialregression":{"Name":"Perform an nth degree Polynomial Regression on a Set of X and Y Values","Address":"fable.Math.polynomialRegression"},"randominteger":{"Name":"Random Integer","Address":"fable.DataGeneration.randomInteger"},"randomintegerbetween":{"Name":"Random Integer Between Two Numbers","Address":"fable.DataGeneration.randomIntegerBetween"},"randomintegerupto":{"Name":"Random Integer","Address":"fable.DataGeneration.randomIntegerUpTo"},"randomfloat":{"Name":"Random Float","Address":"fable.DataGeneration.randomFloat"},"randomfloatbetween":{"Name":"Random Float","Address":"fable.DataGeneration.randomFloatBetween"},"randomfloatupto":{"Name":"Random Float","Address":"fable.DataGeneration.randomFloatUpTo"},"datemilliseconddifference":{"Name":"Date Difference in Milliseconds","Address":"fable.Dates.dateMillisecondDifference"},"dateseconddifference":{"Name":"Date Difference in Seconds","Address":"fable.Dates.dateSecondDifference"},"dateminutedifference":{"Name":"Date Difference in Minutes","Address":"fable.Dates.dateMinuteDifference"},"datehourdifference":{"Name":"Date Difference in Hours","Address":"fable.Dates.dateHourDifference"},"datedaydifference":{"Name":"Date Difference in Days","Address":"fable.Dates.dateDayDifference"},"dateweekdifference":{"Name":"Date Difference in Weeks","Address":"fable.Dates.dateWeekDifference"},"datemonthdifference":{"Name":"Date Difference in Months","Address":"fable.Dates.dateMonthDifference"},"dateyeardifference":{"Name":"Date Difference in Years","Address":"fable.Dates.dateYearDifference"},"datemathadd":{"Name":"Date Math Add","Address":"fable.Dates.dateMath"},"dateaddmilliseconds":{"Name":"Date Add Milliseconds","Address":"fable.Dates.dateAddMilliseconds"},"dateaddseconds":{"Name":"Date Add Seconds","Address":"fable.Dates.dateAddSeconds"},"dateaddminutes":{"Name":"Date Add Minutes","Address":"fable.Dates.dateAddMinutes"},"dateaddhours":{"Name":"Date Add Hours","Address":"fable.Dates.dateAddHours"},"dateadddays":{"Name":"Date Add Days","Address":"fable.Dates.dateAddDays"},"dateaddweeks":{"Name":"Date Add Weeks","Address":"fable.Dates.dateAddWeeks"},"dateaddmonths":{"Name":"Date Add Months","Address":"fable.Dates.dateAddMonths"},"dateaddyears":{"Name":"Date Add Years","Address":"fable.Dates.dateAddYears"},"datefromparts":{"Name":"Date From Parts","Address":"fable.Dates.dateFromParts"},"slice":{"Name":"Slice Array","Address":"fable.Utility.slice"},"createvalueobjectbyhashes":{"Name":"Create Value Object by Hashes","Address":"fable.Utility.createValueObjectByHashes","AddressParameterIndices":[0,1,2,3,4,5,6,7,8,9]},"slope":{"Name":"Slope of Linear Regression Line (Excel SLOPE equivalent)","Address":"fable.Math.slopePrecise"},"intercept":{"Name":"Y-Intercept of Linear Regression Line (Excel INTERCEPT equivalent)","Address":"fable.Math.interceptPrecise"},"leastsquares":{"Name":"Perform a Least Squares Regression on a Set of Independent Variable Vectors and a Dependent Variable Vector","Address":"fable.Math.leastSquares"},"linest":{"Name":"Perform a Least Squares Regression on a Set of Independent Variable Vectors and a Dependent Variable Vector","Address":"fable.Math.leastSquares"},"matrixtranspose":{"Name":"Transpose a Matrix","Address":"fable.Math.matrixTranspose"},"matrixmultiply":{"Name":"Multiply Two Matrices","Address":"fable.Math.matrixMultiply"},"matrixvectormultiply":{"Name":"Multiply a Matrix by a Vector","Address":"fable.Math.matrixVectorMultiply"},"matrixinverse":{"Name":"Inverse a Matrix","Address":"fable.Math.matrixInverse"},"gaussianelimination":{"Name":"Solve a System of Linear Equations using Gaussian Elimination","Address":"fable.Math.gaussianElimination"},"predict":{"Name":"Predict Y Values from X Values using a Regression Model","Address":"fable.Math.predictFromRegressionModel"},"stringcountsegments":{"Name":"Count Segments in a String","Address":"fable.DataFormat.stringCountSegments"},"stringgetsegments":{"Name":"Get Segments from a String","Address":"fable.DataFormat.stringGetSegments"},"bezierpoint":{"Name":"Evaluate a Point on a Cubic Bezier Curve at Parameter t","Address":"fable.Math.bezierPoint"},"beziercurvefit":{"Name":"Fit a Cubic Bezier Curve to a Set of Data Points","Address":"fable.Math.bezierCurveFit"}};},{}],81:[function(require,module,exports){const libExpressionParserOperationBase=require('./Fable-Service-ExpressionParser-Base.js');class ExpressionParserLinter extends libExpressionParserOperationBase{constructor(pFable,pOptions,pServiceHash){super(pFable,pOptions,pServiceHash);this.serviceType='ExpressionParser-Linter';}lintTokenizedExpression(pTokenizedExpression,pResultObject){let tmpResults=typeof pResultObject==='object'?pResultObject:{ExpressionParserLog:[]};tmpResults.LinterResults=[];// Guard against bad data being passed in
1621
+ this.TokenizerDirectiveMutation.parseDirectives(tmpResults);return tmpResults.RawTokens;}}module.exports=ExpressionTokenizer;},{"./Fable-Service-ExpressionParser-Base.js":77}],80:[function(require,module,exports){module.exports={"sqrt":{"Name":"Square Root","Address":"fable.Math.sqrtPrecise"},"percent":{"Name":"Compute Percent (in IS over OF format)","Address":"fable.Math.percentagePrecise"},"compare":{"Name":"Compare","Address":"fable.Math.comparePrecise"},"abs":{"Name":"Absolute Value","Address":"fable.Math.absPrecise"},"floor":{"Name":"Floor Value","Address":"fable.Math.floorPrecise"},"ceil":{"Name":"Ceiling Value","Address":"fable.Math.ceilPrecise"},"rad":{"Name":"Degrees to Radians","Address":"fable.Math.radPrecise"},"pi":{"Name":"Pi","Address":"fable.Math.piPrecise"},"euler":{"Name":"Euler","Address":"fable.Math.eulerPrecise"},"log":{"Name":"Logarithm","Address":"fable.Math.logPrecise"},"exp":{"Name":"Eulers Number to the Power Of N","Address":"fable.Math.expPrecise"},"sin":{"Name":"Sine","Address":"fable.Math.sin"},"cos":{"Name":"Cosine","Address":"fable.Math.cos"},"tan":{"Name":"Tangent","Address":"fable.Math.tan"},"count":{"Name":"Count Set Elements","Address":"fable.Math.countSetElements"},"countset":{"Name":"Count Set Elements","Address":"fable.Math.countSetElements"},"sortset":{"Name":"Sort Set","Address":"fable.Math.sortSetPrecise"},"bucketset":{"Name":"Bucket Set","Address":"fable.Math.bucketSetPrecise"},"sorthistogram":{"Name":"Sort Histogram","Address":"fable.Math.sortHistogramPrecise"},"sorthistogrambykeys":{"Name":"Sort Histogram by Keys","Address":"fable.Math.sortHistogramByKeys"},"max":{"Name":"Maximum","Address":"fable.Math.maxPrecise"},"min":{"Name":"Minimum","Address":"fable.Math.minPrecise"},"sum":{"Name":"Sum","Address":"fable.Math.sumPrecise"},"avg":{"Name":"Average","Address":"fable.Math.averagePrecise"},"mean":{"Name":"Mean","Address":"fable.Math.meanPrecise"},"median":{"Name":"Median","Address":"fable.Math.medianPrecise"},"mode":{"Name":"Mode","Address":"fable.Math.modePrecise"},"var":{"Name":"Variance (Sample)","Address":"fable.Math.variancePrecise"},"vara":{"Name":"Variance (Sample)","Address":"fable.Math.variancePrecise"},"varp":{"Name":"Variance (Population)","Address":"fable.Math.populationVariancePrecise"},"stdev":{"Name":"Standard Deviation (Sample)","Address":"fable.Math.standardDeviationPrecise"},"stdeva":{"Name":"Standard Deviation (Sample)","Address":"fable.Math.standardDeviationPrecise"},"stdevp":{"Name":"Standard Deviation (Population)","Address":"fable.Math.populationStandardDeviationPrecise"},"round":{"Name":"Round","Address":"fable.Math.roundPrecise"},"tofixed":{"Name":"To Fixed","Address":"fable.Math.toFixedPrecise"},"cumulativesummation":{"Name":"Sum each value in a Histogram or Value Map cumulatively, creating or setting a property with the result on each row","Address":"fable.Math.cumulativeSummation"},"subtractingsummation":{"Name":"Subtract each subsequent value in a Histogram or Value Map cumulatively (by default from the first row), creating or setting a property with the result on each row.","Address":"fable.Math.subtractingSummation"},"iterativeseries":{"Name":"Perform an Iterative Series of Mathematical Operations on Set Elements","Address":"fable.Math.iterativeSeries"},"countsetelements":{"Name":"Count Set Elements in a Histogram or Value Map","Address":"fable.Math.countSetElements"},"getvalue":{"Name":"Get Value from Application State or Services (AppData, etc.)","Address":"fable.Utility.getInternalValueByHash","AddressParameterIndices":[0]},"setvalue":{"Name":"Set Value to Application State or Services (AppData, etc.)","Address":"fable.Utility.setInternalValueByHash","AddressParameterIndices":[0]},"objectkeystoarray":{"Name":"Get Array of an Object's keys","Address":"fable.Utility.objectKeysToArray"},"objectvaluestoarray":{"Name":"Get Array of an Object's values","Address":"fable.Utility.objectValuesToArray"},"generatearrayofobjectsfromsets":{"Name":"Generate Array of Objects from Sets","Address":"fable.Utility.generateArrayOfObjectsFromSets"},"objectvaluessortbyexternalobjectarray":{"Name":"Get Array of an Object's values sorted by an external array","Address":"fable.Utility.objectValuesSortByExternalArray"},"setkeystoarray":{"Name":"Get Array of an Object's keys","Address":"fable.Utility.objectKeysToArray"},"setvaluestoarray":{"Name":"Get Array of an Object's values","Address":"fable.Utility.objectValuesToArray"},"histogramkeystoarray":{"Name":"Get Array of an Object's keys","Address":"fable.Utility.objectKeysToArray"},"histogramvaluestoarray":{"Name":"Get Array of an Object's values","Address":"fable.Utility.objectValuesToArray"},"createarrayfromabsolutevalues":{"Name":"Create Array from Absolute Values","Address":"fable.Utility.createArrayFromAbsoluteValues"},"flatten":{"Name":"flatten an array of values","Address":"fable.Utility.flattenArrayOfSolverInputs"},"findfirstvaluebyexactmatch":{"Name":"find + map on array of objects","Address":"fable.Utility.findFirstValueByExactMatchInternal","AddressParameterIndices":[0,1,3]},"findfirstvaluebystringincludes":{"Name":"find + map on array of objects","Address":"fable.Utility.findFirstValueByStringIncludesInternal","AddressParameterIndices":[0,1,3]},"match":{"Name":"Implementation of sheets MATCH() function","Address":"fable.Utility.findIndexInternal","AddressParameterIndices":[1]},"resolvehtmlentities":{"Name":"resolve HTML entities","Address":"fable.DataFormat.resolveHtmlEntities"},"concat":{"Name":"concatenate an array of values and output a string","Address":"fable.DataFormat.concatenateStringsInternal"},"concatraw":{"Name":"concatenate an array of values and output a string","Address":"fable.DataFormat.concatenateStringsRawInternal"},"arrayconcat":{"Name":"concatenate two or more arrays generating a single output array","Address":"fable.Utility.concatenateArrays"},"join":{"Name":"join an array of values and output a string","Address":"fable.DataFormat.joinStringsInternal"},"joinraw":{"Name":"join an array of values and output a string","Address":"fable.DataFormat.joinStringsRawInternal"},"if":{"Name":"perform a conditional operator on two values, and choose one of two outcomes based on the result","Address":"fable.Logic.checkIf"},"when":{"Name":"perform a 'truthy' check on one value, and return one of two outcomes based on the result","Address":"fable.Logic.when"},"ternary":{"Name":"numeric-aware ternary selection (used by ? :: operator desugaring)","Address":"fable.Logic.ternary"},"entryinset":{"Name":"Entry in Set","Address":"fable.Math.entryInSet"},"smallestinset":{"Name":"Smallest in Set","Address":"fable.Math.smallestInSet"},"largestinset":{"Name":"Largest in Set","Address":"fable.Math.largestInSet"},"aggregationhistogram":{"Name":"Generate a Histogram by Exact Value Aggregation","Address":"fable.Math.histogramAggregationByExactValueFromInternalState"},"aggregationhistogrambyobject":{"Name":"Generate a Histogram by Exact Value Aggregation from Object Property","Address":"fable.Math.histogramAggregationByExactValue"},"distributionhistogram":{"Name":"Generate a Histogram Based on Value Distribution","Address":"fable.Math.histogramDistributionByExactValueFromInternalState"},"distributionhistogrambyobject":{"Name":"Generate a Histogram Based on Value Distribution from Object Property","Address":"fable.Math.histogramDistributionByExactValue"},"setconcatenate":{"Name":"Set Concatenate","Address":"fable.Math.setConcatenate"},"getvaluearray":{"Name":"Get Value Array from Application State or Services (AppData, etc.)","Address":"fable.Utility.createValueArrayByHashParametersFromInternal","AddressParameterIndices":[0,1,2,3,4,5,6,7,8,9]},"getvalueobject":{"Name":"Get Value Object from Application State or Services (AppData, etc.)","Address":"fable.Utility.createValueObjectByHashParametersFromInternal","AddressParameterIndices":[0,1,2,3,4,5,6,7,8,9]},"cleanvaluearray":{"Name":"Clean Value Array","Address":"fable.Math.cleanValueArray"},"cleanvalueobject":{"Name":"Clean Value Object","Address":"fable.Math.cleanValueObject"},"polynomialregression":{"Name":"Perform an nth degree Polynomial Regression on a Set of X and Y Values","Address":"fable.Math.polynomialRegression"},"randominteger":{"Name":"Random Integer","Address":"fable.DataGeneration.randomInteger"},"randomintegerbetween":{"Name":"Random Integer Between Two Numbers","Address":"fable.DataGeneration.randomIntegerBetween"},"randomintegerupto":{"Name":"Random Integer","Address":"fable.DataGeneration.randomIntegerUpTo"},"randomfloat":{"Name":"Random Float","Address":"fable.DataGeneration.randomFloat"},"randomfloatbetween":{"Name":"Random Float","Address":"fable.DataGeneration.randomFloatBetween"},"randomfloatupto":{"Name":"Random Float","Address":"fable.DataGeneration.randomFloatUpTo"},"datemilliseconddifference":{"Name":"Date Difference in Milliseconds","Address":"fable.Dates.dateMillisecondDifference"},"dateseconddifference":{"Name":"Date Difference in Seconds","Address":"fable.Dates.dateSecondDifference"},"dateminutedifference":{"Name":"Date Difference in Minutes","Address":"fable.Dates.dateMinuteDifference"},"datehourdifference":{"Name":"Date Difference in Hours","Address":"fable.Dates.dateHourDifference"},"datedaydifference":{"Name":"Date Difference in Days","Address":"fable.Dates.dateDayDifference"},"dateweekdifference":{"Name":"Date Difference in Weeks","Address":"fable.Dates.dateWeekDifference"},"datemonthdifference":{"Name":"Date Difference in Months","Address":"fable.Dates.dateMonthDifference"},"dateyeardifference":{"Name":"Date Difference in Years","Address":"fable.Dates.dateYearDifference"},"datemathadd":{"Name":"Date Math Add","Address":"fable.Dates.dateMath"},"dateaddmilliseconds":{"Name":"Date Add Milliseconds","Address":"fable.Dates.dateAddMilliseconds"},"dateaddseconds":{"Name":"Date Add Seconds","Address":"fable.Dates.dateAddSeconds"},"dateaddminutes":{"Name":"Date Add Minutes","Address":"fable.Dates.dateAddMinutes"},"dateaddhours":{"Name":"Date Add Hours","Address":"fable.Dates.dateAddHours"},"dateadddays":{"Name":"Date Add Days","Address":"fable.Dates.dateAddDays"},"dateaddweeks":{"Name":"Date Add Weeks","Address":"fable.Dates.dateAddWeeks"},"dateaddmonths":{"Name":"Date Add Months","Address":"fable.Dates.dateAddMonths"},"dateaddyears":{"Name":"Date Add Years","Address":"fable.Dates.dateAddYears"},"datefromparts":{"Name":"Date From Parts","Address":"fable.Dates.dateFromParts"},"slice":{"Name":"Slice Array","Address":"fable.Utility.slice"},"createvalueobjectbyhashes":{"Name":"Create Value Object by Hashes","Address":"fable.Utility.createValueObjectByHashes","AddressParameterIndices":[0,1,2,3,4,5,6,7,8,9]},"slope":{"Name":"Slope of Linear Regression Line (Excel SLOPE equivalent)","Address":"fable.Math.slopePrecise"},"intercept":{"Name":"Y-Intercept of Linear Regression Line (Excel INTERCEPT equivalent)","Address":"fable.Math.interceptPrecise"},"leastsquares":{"Name":"Perform a Least Squares Regression on a Set of Independent Variable Vectors and a Dependent Variable Vector","Address":"fable.Math.leastSquares"},"linest":{"Name":"Perform a Least Squares Regression on a Set of Independent Variable Vectors and a Dependent Variable Vector","Address":"fable.Math.leastSquares"},"matrixtranspose":{"Name":"Transpose a Matrix","Address":"fable.Math.matrixTranspose"},"matrixmultiply":{"Name":"Multiply Two Matrices","Address":"fable.Math.matrixMultiply"},"matrixvectormultiply":{"Name":"Multiply a Matrix by a Vector","Address":"fable.Math.matrixVectorMultiply"},"matrixinverse":{"Name":"Inverse a Matrix","Address":"fable.Math.matrixInverse"},"gaussianelimination":{"Name":"Solve a System of Linear Equations using Gaussian Elimination","Address":"fable.Math.gaussianElimination"},"predict":{"Name":"Predict Y Values from X Values using a Regression Model","Address":"fable.Math.predictFromRegressionModel"},"stringcountsegments":{"Name":"Count Segments in a String","Address":"fable.DataFormat.stringCountSegments"},"stringgetsegments":{"Name":"Get Segments from a String","Address":"fable.DataFormat.stringGetSegments"},"bezierpoint":{"Name":"Evaluate a Point on a Cubic Bezier Curve at Parameter t","Address":"fable.Math.bezierPoint"},"beziercurvefit":{"Name":"Fit a Cubic Bezier Curve to a Set of Data Points","Address":"fable.Math.bezierCurveFit"},"generateguid":{"Name":"Generate a GUID string","Address":"fable.getUUID"}};},{}],81:[function(require,module,exports){const libExpressionParserOperationBase=require('./Fable-Service-ExpressionParser-Base.js');class ExpressionParserLinter extends libExpressionParserOperationBase{constructor(pFable,pOptions,pServiceHash){super(pFable,pOptions,pServiceHash);this.serviceType='ExpressionParser-Linter';}lintTokenizedExpression(pTokenizedExpression,pResultObject){let tmpResults=typeof pResultObject==='object'?pResultObject:{ExpressionParserLog:[]};tmpResults.LinterResults=[];// Guard against bad data being passed in
1622
1622
  if(!Array.isArray(pTokenizedExpression)){tmpResults.ExpressionParserLog.push(`ERROR: ExpressionParser.lintTokenizedExpression was passed a non-array tokenized expression.`);tmpResults.LinterResults.push(tmpResults.ExpressionParserLog[tmpResults.ExpressionParserLog.length-1]);this.log.error(tmpResults.ExpressionParserLog[tmpResults.ExpressionParserLog.length-1]);return pTokenizedExpression;}if(pTokenizedExpression.length<1){tmpResults.ExpressionParserLog.push(`ERROR: ExpressionParser.lintTokenizedExpression was passed an empty tokenized expression.`);tmpResults.LinterResults.push(tmpResults.ExpressionParserLog[tmpResults.ExpressionParserLog.length-1]);this.log.error(tmpResults.ExpressionParserLog[tmpResults.ExpressionParserLog.length-1]);return pTokenizedExpression;}// 1. Check for balanced parenthesis
1623
1623
  let tmpParenthesisDepth=0;// If it is in a state address, we don't care about the parenthesis
1624
1624
  // State addresses are between squiggly brackets
@@ -1638,7 +1638,7 @@ this.getTokenType(pTokenizedExpression[0])==='Token.StateAddress'||this.getToken
1638
1638
  ){tmpResults.ExpressionParserLog.push(`WARNING: ExpressionParser.lintTokenizedExpression found a single equality assignment in the tokenized expression with no assignable address on the left side of the assignment.`);tmpResults.LinterResults.push(tmpResults.ExpressionParserLog[tmpResults.ExpressionParserLog.length-1]);this.log.warn(tmpResults.ExpressionParserLog[tmpResults.ExpressionParserLog.length-1]);}}}// 5. Check that there are no operators adjacent to each other
1639
1639
  // This is a simple lint check, not a full-blown syntax check
1640
1640
  let tmpTokenPrevious=false;for(let i=0;i<pTokenizedExpression.length-1;i++){if(pTokenizedExpression[i]in this.ExpressionParser.tokenMap&&this.ExpressionParser.tokenMap[pTokenizedExpression[i]].Type!='Parenthesis'&&!tmpTokenPrevious){tmpTokenPrevious=true;}else if(pTokenizedExpression[i]in this.ExpressionParser.tokenMap&&this.ExpressionParser.tokenMap[pTokenizedExpression[i]].Type!='Parenthesis'){// If this isn't a + or - positivity/negativity multiplier, it's an error.
1641
- if(pTokenizedExpression[i]!=='+'&&pTokenizedExpression[i]!=='-'){tmpResults.ExpressionParserLog.push(`ERROR: ExpressionParser.lintTokenizedExpression found an ${pTokenizedExpression[i]} operator adjacent to another operator in the tokenized expression at token index ${i}`);tmpResults.LinterResults.push(tmpResults.ExpressionParserLog[tmpResults.ExpressionParserLog.length-1]);this.log.error(tmpResults.ExpressionParserLog[tmpResults.ExpressionParserLog.length-1]);}}else{tmpTokenPrevious=false;}}return tmpResults.LinterResults;}}module.exports=ExpressionParserLinter;},{"./Fable-Service-ExpressionParser-Base.js":77}],82:[function(require,module,exports){const{PE}=require('big.js');const libExpressionParserOperationBase=require('./Fable-Service-ExpressionParser-Base.js');/**
1641
+ if(pTokenizedExpression[i]!=='+'&&pTokenizedExpression[i]!=='-'){tmpResults.ExpressionParserLog.push(`ERROR: ExpressionParser.lintTokenizedExpression found an ${pTokenizedExpression[i]} operator adjacent to another operator in the tokenized expression at token index ${i}`);tmpResults.LinterResults.push(tmpResults.ExpressionParserLog[tmpResults.ExpressionParserLog.length-1]);this.log.error(tmpResults.ExpressionParserLog[tmpResults.ExpressionParserLog.length-1]);}}else{tmpTokenPrevious=false;}}return tmpResults.LinterResults;}}module.exports=ExpressionParserLinter;},{"./Fable-Service-ExpressionParser-Base.js":77}],82:[function(require,module,exports){const _require3=require('big.js'),PE=_require3.PE;const libExpressionParserOperationBase=require('./Fable-Service-ExpressionParser-Base.js');/**
1642
1642
  * Represents a user-friendly messaging service for the ExpressionParser compiler output.
1643
1643
  * @class ExpressionParserMessaging
1644
1644
  * @extends libExpressionParserOperationBase
@@ -2366,8 +2366,8 @@ const tmpLinearCoefficients=this.gaussianElimination(tmpDependentTransposeMultip
2366
2366
  *
2367
2367
  * @return {Array<Array<number|string>>} - inverted matrix
2368
2368
  */matrixInverse(pMatrix){const n=pMatrix.length;const tmpIdentityMatrix=pMatrix.map((row,i)=>row.map((_,j)=>i===j?1:0));const tmpAugmentedMatrix=pMatrix.map((row,i)=>row.concat(tmpIdentityMatrix[i]));for(let i=0;i<n;++i){// Pivot
2369
- let maxRow=i;for(let k=i+1;k<n;++k){if(this.gtPrecise(this.absPrecise(tmpAugmentedMatrix[k][i]),this.absPrecise(tmpAugmentedMatrix[maxRow][i]))){maxRow=k;}}[tmpAugmentedMatrix[i],tmpAugmentedMatrix[maxRow]]=[tmpAugmentedMatrix[maxRow],tmpAugmentedMatrix[i]];// divide by pivot
2370
- const tmpPivotValue=tmpAugmentedMatrix[i][i];for(let j=0;j<2*n;++j){tmpAugmentedMatrix[i][j]=this.dividePrecise(tmpAugmentedMatrix[i][j],tmpPivotValue);}// Eliminate other rows
2369
+ let maxRow=i;for(let k=i+1;k<n;++k){if(this.gtPrecise(this.absPrecise(tmpAugmentedMatrix[k][i]),this.absPrecise(tmpAugmentedMatrix[maxRow][i]))){maxRow=k;}}// divide by pivot
2370
+ var _ref=[tmpAugmentedMatrix[maxRow],tmpAugmentedMatrix[i]];tmpAugmentedMatrix[i]=_ref[0];tmpAugmentedMatrix[maxRow]=_ref[1];const tmpPivotValue=tmpAugmentedMatrix[i][i];for(let j=0;j<2*n;++j){tmpAugmentedMatrix[i][j]=this.dividePrecise(tmpAugmentedMatrix[i][j],tmpPivotValue);}// Eliminate other rows
2371
2371
  for(let k=0;k<n;++k){if(k===i){continue;}const tmpFactor=tmpAugmentedMatrix[k][i];for(let j=0;j<2*n;++j){tmpAugmentedMatrix[k][j]=this.subtractPrecise(tmpAugmentedMatrix[k][j],this.multiplyPrecise(tmpFactor,tmpAugmentedMatrix[i][j]));}}}// Extract right half (inverse)
2372
2372
  return tmpAugmentedMatrix.map(row=>row.slice(n));}/**
2373
2373
  * Compute solution to linear system using Gaussian elimination.
@@ -2647,7 +2647,7 @@ if(pParserContext){tmpLeaf.ParserContext=pParserContext;}tmpLeaf.isAsync=true;re
2647
2647
  * @param {string} pPatternEnd - The ending string for the pattern (e.g. "}")
2648
2648
  * @param {function} fParser - The function to parse if this is the matched pattern, once the Pattern End is met. If this is a string, a simple replacement occurs.
2649
2649
  * @param {Object} pParserContext - The context to pass to the parser function
2650
- */addPattern(pPatternStart,pPatternEnd,fParser,pParserContext){return this.addPatternBoth(pPatternStart,pPatternEnd,fParser,null,pParserContext);}}module.exports=WordTree;},{}],93:[function(require,module,exports){module.exports={"Metadata":{"UUID":false,"Hash":false,"Name":"","Summary":"","Version":0},"Status":{"Completed":false,"StepCount":1},"Steps":[],"Errors":[],"Log":[]};},{}],94:[function(require,module,exports){const{PE}=require('big.js');const libFableServiceBase=require('fable-serviceproviderbase');const _OperationStatePrototypeString=JSON.stringify(require('./Fable-Service-Operation-DefaultSettings.js'));class FableOperation extends libFableServiceBase{constructor(pFable,pOptions,pServiceHash){super(pFable,pOptions,pServiceHash);// Timestamps will just be the long ints
2650
+ */addPattern(pPatternStart,pPatternEnd,fParser,pParserContext){return this.addPatternBoth(pPatternStart,pPatternEnd,fParser,null,pParserContext);}}module.exports=WordTree;},{}],93:[function(require,module,exports){module.exports={"Metadata":{"UUID":false,"Hash":false,"Name":"","Summary":"","Version":0},"Status":{"Completed":false,"StepCount":1},"Steps":[],"Errors":[],"Log":[]};},{}],94:[function(require,module,exports){const _require4=require('big.js'),PE=_require4.PE;const libFableServiceBase=require('fable-serviceproviderbase');const _OperationStatePrototypeString=JSON.stringify(require('./Fable-Service-Operation-DefaultSettings.js'));class FableOperation extends libFableServiceBase{constructor(pFable,pOptions,pServiceHash){super(pFable,pOptions,pServiceHash);// Timestamps will just be the long ints
2651
2651
  this.timeStamps={};this.serviceType='PhasedOperation';this.state=JSON.parse(_OperationStatePrototypeString);this.stepMap={};this.stepFunctions={};// Match the service instantiation to the operation.
2652
2652
  this.state.Metadata.Hash=this.Hash;this.state.Metadata.UUID=this.UUID;this.state.Metadata.Name=typeof this.options.Name=='string'?this.options.Name:`Unnamed Operation ${this.state.Metadata.UUID}`;this.name=this.state.Metadata.Name;this.progressTrackerSet=this.fable.instantiateServiceProviderWithoutRegistration('ProgressTrackerSet');this.state.OverallProgressTracker=this.progressTrackerSet.createProgressTracker(`Overall-${this.state.Metadata.UUID}`);// This is here to use the pass-through logging functions in the operation itself.
2653
2653
  this.log=this;}execute(fExecutionCompleteCallback){// TODO: Should the same operation be allowed to execute more than one time?
@@ -2826,7 +2826,7 @@ return this._executeBinaryUploadInternal(pOptions,fCallback,fOnProgress);}/**
2826
2826
  * @param {(pProgress: number) => void} [fOnProgress] - Optional progress callback (0.0 to 1.0); called with 1.0 on completion
2827
2827
  * @private
2828
2828
  */_executeBinaryUploadInternal(pOptions,fCallback,fOnProgress){let tmpOptions=this.preRequest(pOptions);tmpOptions.RequestStartTime=this.fable.log.getTimeStamp();if(this.TraceLog){this.fable.log.debug(`Beginning ${tmpOptions.method} binary upload to ${tmpOptions.url} at ${tmpOptions.RequestStartTime}`);}tmpOptions.json=false;return this._executeWithRedirects(tmpOptions,(pError,pResponse)=>{if(pError){return fCallback(pError,pResponse);}if(this.TraceLog){let tmpConnectTime=this.fable.log.getTimeStamp();this.fable.log.debug(`--> Binary upload ${tmpOptions.method} connected in ${this.dataFormat.formatTimeDelta(tmpOptions.RequestStartTime,tmpConnectTime)}ms code ${pResponse.statusCode}`);}let tmpData='';pResponse.on('data',pChunk=>{if(this.TraceLog){let tmpChunkTime=this.fable.log.getTimeStamp();this.fable.log.debug(`--> Binary upload ${tmpOptions.method} response chunk size ${pChunk.length}b received in ${this.dataFormat.formatTimeDelta(tmpOptions.RequestStartTime,tmpChunkTime)}ms`);}tmpData+=pChunk;});pResponse.on('end',()=>{if(this.TraceLog){let tmpCompletionTime=this.fable.log.getTimeStamp();this.fable.log.debug(`==> Binary upload ${tmpOptions.method} completed in ${this.dataFormat.formatTimeDelta(tmpOptions.RequestStartTime,tmpCompletionTime)}ms`);}// Signal completion via progress callback
2829
- if(typeof fOnProgress==='function'){fOnProgress(1.0);}return fCallback(pError,pResponse,tmpData);});});}getRawText(pOptionsOrURL,fCallback){let tmpRequestOptions=typeof pOptionsOrURL=='object'?pOptionsOrURL:{};if(typeof pOptionsOrURL=='string'){tmpRequestOptions.url=pOptionsOrURL;}tmpRequestOptions.method='GET';return this.executeChunkedRequest(tmpRequestOptions,fCallback);}}module.exports=FableServiceRestClient;}).call(this);}).call(this,require("buffer").Buffer);},{"buffer":20,"cookie":31,"fable-serviceproviderbase":59,"http":167,"https":113,"simple-get":166}],99:[function(require,module,exports){const libFableServiceBase=require('fable-serviceproviderbase');class FableServiceTemplate extends libFableServiceBase{// Underscore and lodash have a behavior, _.template, which compiles a
2829
+ if(typeof fOnProgress==='function'){fOnProgress(1.0);}return fCallback(pError,pResponse,tmpData);});});}getRawText(pOptionsOrURL,fCallback){let tmpRequestOptions=typeof pOptionsOrURL=='object'?pOptionsOrURL:{};if(typeof pOptionsOrURL=='string'){tmpRequestOptions.url=pOptionsOrURL;}tmpRequestOptions.method='GET';return this.executeChunkedRequest(tmpRequestOptions,fCallback);}}module.exports=FableServiceRestClient;}).call(this);}).call(this,require("buffer").Buffer);},{"buffer":20,"cookie":31,"fable-serviceproviderbase":59,"http":166,"https":113,"simple-get":165}],99:[function(require,module,exports){const libFableServiceBase=require('fable-serviceproviderbase');class FableServiceTemplate extends libFableServiceBase{// Underscore and lodash have a behavior, _.template, which compiles a
2830
2830
  // string-based template with code snippets into simple executable pieces,
2831
2831
  // with the added twist of returning a precompiled function ready to go.
2832
2832
  //
@@ -3036,7 +3036,7 @@ $gOPD=null;}}module.exports=$gOPD;},{"./gOPD":108}],110:[function(require,module
3036
3036
  // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
3037
3037
  var symVal=42;obj[sym]=symVal;for(var _ in obj){return false;}// eslint-disable-line no-restricted-syntax, no-unreachable-loop
3038
3038
  if(typeof Object.keys==='function'&&Object.keys(obj).length!==0){return false;}if(typeof Object.getOwnPropertyNames==='function'&&Object.getOwnPropertyNames(obj).length!==0){return false;}var syms=Object.getOwnPropertySymbols(obj);if(syms.length!==1||syms[0]!==sym){return false;}if(!Object.prototype.propertyIsEnumerable.call(obj,sym)){return false;}if(typeof Object.getOwnPropertyDescriptor==='function'){// eslint-disable-next-line no-extra-parens
3039
- var descriptor=/** @type {PropertyDescriptor} */Object.getOwnPropertyDescriptor(obj,sym);if(descriptor.value!==symVal||descriptor.enumerable!==true){return false;}}return true;};},{}],112:[function(require,module,exports){'use strict';var call=Function.prototype.call;var $hasOwn=Object.prototype.hasOwnProperty;var bind=require('function-bind');/** @type {import('.')} */module.exports=bind.call(call,$hasOwn);},{"function-bind":103}],113:[function(require,module,exports){var http=require('http');var url=require('url');var https=module.exports;for(var key in http){if(http.hasOwnProperty(key))https[key]=http[key];}https.request=function(params,cb){params=validateParams(params);return http.request.call(this,params,cb);};https.get=function(params,cb){params=validateParams(params);return http.get.call(this,params,cb);};function validateParams(params){if(typeof params==='string'){params=url.parse(params);}if(!params.protocol){params.protocol='https:';}if(params.protocol!=='https:'){throw new Error('Protocol "'+params.protocol+'" not supported. Expected "https:"');}return params;}},{"http":167,"url":188}],114:[function(require,module,exports){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m;var eLen=nBytes*8-mLen-1;var eMax=(1<<eLen)-1;var eBias=eMax>>1;var nBits=-7;var i=isLE?nBytes-1:0;var d=isLE?-1:1;var s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8){}m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8){}if(e===0){e=1-eBias;}else if(e===eMax){return m?NaN:(s?-1:1)*Infinity;}else{m=m+Math.pow(2,mLen);e=e-eBias;}return(s?-1:1)*m*Math.pow(2,e-mLen);};exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c;var eLen=nBytes*8-mLen-1;var eMax=(1<<eLen)-1;var eBias=eMax>>1;var rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0;var i=isLE?0:nBytes-1;var d=isLE?1:-1;var s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax;}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,-e))<1){e--;c*=2;}if(e+eBias>=1){value+=rt/c;}else{value+=rt*Math.pow(2,1-eBias);}if(value*c>=2){e++;c/=2;}if(e+eBias>=eMax){m=0;e=eMax;}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias;}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0;}}for(;mLen>=8;buffer[offset+i]=m&0xff,i+=d,m/=256,mLen-=8){}e=e<<mLen|m;eLen+=mLen;for(;eLen>0;buffer[offset+i]=e&0xff,i+=d,e/=256,eLen-=8){}buffer[offset+i-d]|=s*128;};},{}],115:[function(require,module,exports){if(typeof Object.create==='function'){// implementation from standard node.js 'util' module
3039
+ var descriptor=/** @type {PropertyDescriptor} */Object.getOwnPropertyDescriptor(obj,sym);if(descriptor.value!==symVal||descriptor.enumerable!==true){return false;}}return true;};},{}],112:[function(require,module,exports){'use strict';var call=Function.prototype.call;var $hasOwn=Object.prototype.hasOwnProperty;var bind=require('function-bind');/** @type {import('.')} */module.exports=bind.call(call,$hasOwn);},{"function-bind":103}],113:[function(require,module,exports){var http=require('http');var url=require('url');var https=module.exports;for(var key in http){if(http.hasOwnProperty(key))https[key]=http[key];}https.request=function(params,cb){params=validateParams(params);return http.request.call(this,params,cb);};https.get=function(params,cb){params=validateParams(params);return http.get.call(this,params,cb);};function validateParams(params){if(typeof params==='string'){params=url.parse(params);}if(!params.protocol){params.protocol='https:';}if(params.protocol!=='https:'){throw new Error('Protocol "'+params.protocol+'" not supported. Expected "https:"');}return params;}},{"http":166,"url":188}],114:[function(require,module,exports){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m;var eLen=nBytes*8-mLen-1;var eMax=(1<<eLen)-1;var eBias=eMax>>1;var nBits=-7;var i=isLE?nBytes-1:0;var d=isLE?-1:1;var s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8){}m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8){}if(e===0){e=1-eBias;}else if(e===eMax){return m?NaN:(s?-1:1)*Infinity;}else{m=m+Math.pow(2,mLen);e=e-eBias;}return(s?-1:1)*m*Math.pow(2,e-mLen);};exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c;var eLen=nBytes*8-mLen-1;var eMax=(1<<eLen)-1;var eBias=eMax>>1;var rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0;var i=isLE?0:nBytes-1;var d=isLE?1:-1;var s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax;}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,-e))<1){e--;c*=2;}if(e+eBias>=1){value+=rt/c;}else{value+=rt*Math.pow(2,1-eBias);}if(value*c>=2){e++;c/=2;}if(e+eBias>=eMax){m=0;e=eMax;}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias;}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0;}}for(;mLen>=8;buffer[offset+i]=m&0xff,i+=d,m/=256,mLen-=8){}e=e<<mLen|m;eLen+=mLen;for(;eLen>0;buffer[offset+i]=e&0xff,i+=d,e/=256,eLen-=8){}buffer[offset+i-d]|=s*128;};},{}],115:[function(require,module,exports){if(typeof Object.create==='function'){// implementation from standard node.js 'util' module
3040
3040
  module.exports=function inherits(ctor,superCtor){if(superCtor){ctor.super_=superCtor;ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:false,writable:true,configurable:true}});}};}else{// old school shim for old browsers
3041
3041
  module.exports=function inherits(ctor,superCtor){if(superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor();ctor.prototype.constructor=ctor;}};}},{}],116:[function(require,module,exports){// When a boxed property is passed in, it should have quotes of some
3042
3042
  // kind around it.
@@ -3984,7 +3984,7 @@ this.objectAddressCheckAddressExists=new libObjectAddressCheckAddressExists(this
3984
3984
  */// Reset critical manifest properties
3985
3985
  reset(){this.scope='DEFAULT';this.elementAddresses=[];this.elementHashes={};this.elementDescriptors={};}clone(){// Make a copy of the options in-place
3986
3986
  let tmpNewOptions=JSON.parse(JSON.stringify(this.options));let tmpNewManyfest=new Manyfest(this.fable,tmpNewOptions,this.Hash);tmpNewManyfest.logInfo=this.logInfo;tmpNewManyfest.logError=this.logError;//FIXME: mostly written by co-pilot
3987
- const{Scope,Descriptors,HashTranslations}=this.getManifest();tmpNewManyfest.scope=Scope;tmpNewManyfest.elementDescriptors=Descriptors;tmpNewManyfest.elementAddresses=Object.keys(Descriptors);// Rebuild the element hashes
3987
+ const _this$getManifest=this.getManifest(),Scope=_this$getManifest.Scope,Descriptors=_this$getManifest.Descriptors,HashTranslations=_this$getManifest.HashTranslations;tmpNewManyfest.scope=Scope;tmpNewManyfest.elementDescriptors=Descriptors;tmpNewManyfest.elementAddresses=Object.keys(Descriptors);// Rebuild the element hashes
3988
3988
  for(let i=0;i<tmpNewManyfest.elementAddresses.length;i++){let tmpAddress=tmpNewManyfest.elementAddresses[i];let tmpDescriptor=tmpNewManyfest.elementDescriptors[tmpAddress];tmpNewManyfest.elementHashes[tmpAddress]=tmpAddress;if('Hash'in tmpDescriptor){tmpNewManyfest.elementHashes[tmpDescriptor.Hash]=tmpAddress;}}// Import the hash translations
3989
3989
  tmpNewManyfest.hashTranslations.addTranslation(this.hashTranslations.translationTable);return tmpNewManyfest;}// Deserialize a Manifest from a string
3990
3990
  /**
@@ -4173,7 +4173,7 @@ if(startDot===-1)startDot=i;else if(preDotState!==1)preDotState=1;}else if(start
4173
4173
  // have a good chance at having a non-empty extension
4174
4174
  preDotState=-1;}}if(startDot===-1||end===-1||// We saw a non-dot character immediately before the dot
4175
4175
  preDotState===0||// The (right-most) trimmed path component is exactly '..'
4176
- preDotState===1&&startDot===end-1&&startDot===startPart+1){if(end!==-1){if(startPart===0&&isAbsolute)ret.base=ret.name=path.slice(1,end);else ret.base=ret.name=path.slice(startPart,end);}}else{if(startPart===0&&isAbsolute){ret.name=path.slice(1,startDot);ret.base=path.slice(1,end);}else{ret.name=path.slice(startPart,startDot);ret.base=path.slice(startPart,end);}ret.ext=path.slice(startDot,end);}if(startPart>0)ret.dir=path.slice(0,startPart-1);else if(isAbsolute)ret.dir='/';return ret;},sep:'/',delimiter:':',win32:null,posix:null};posix.posix=posix;module.exports=posix;}).call(this);}).call(this,require('_process'));},{"_process":150}],139:[function(require,module,exports){module.exports={"name":"pict-application","version":"1.0.34","description":"Application base class for a pict view-based application","main":"source/Pict-Application.js","scripts":{"test":"npx quack test","start":"node source/Pict-Application.js","coverage":"npx quack coverage","build":"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-application-image:local","docker-dev-run":"docker run -it -d --name pict-application-dev -p 30001:8080 -p 38086:8086 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/pict-application\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" pict-application-image:local","docker-dev-shell":"docker exec -it pict-application-dev /bin/bash","tests":"npx quack test -g","lint":"eslint source/**","types":"tsc -p ."},"types":"types/source/Pict-Application.d.ts","repository":{"type":"git","url":"git+https://github.com/stevenvelozo/pict-application.git"},"author":"steven velozo <steven@velozo.com>","license":"MIT","bugs":{"url":"https://github.com/stevenvelozo/pict-application/issues"},"homepage":"https://github.com/stevenvelozo/pict-application#readme","devDependencies":{"@eslint/js":"^9.28.0","browser-env":"^3.3.0","eslint":"^9.28.0","pict":"^1.0.348","pict-docuserve":"^0.1.5","pict-provider":"^1.0.10","pict-view":"^1.0.66","quackage":"^1.1.0","typescript":"^5.9.3"},"mocha":{"diff":true,"extension":["js"],"package":"./package.json","reporter":"spec","slow":"75","timeout":"5000","ui":"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},"dependencies":{"fable-serviceproviderbase":"^3.0.19"}};},{}],140:[function(require,module,exports){const libFableServiceBase=require('fable-serviceproviderbase');const libPackage=require('../package.json');const defaultPictSettings={Name:'DefaultPictApplication',// The main "viewport" is the view that is used to host our application
4176
+ preDotState===1&&startDot===end-1&&startDot===startPart+1){if(end!==-1){if(startPart===0&&isAbsolute)ret.base=ret.name=path.slice(1,end);else ret.base=ret.name=path.slice(startPart,end);}}else{if(startPart===0&&isAbsolute){ret.name=path.slice(1,startDot);ret.base=path.slice(1,end);}else{ret.name=path.slice(startPart,startDot);ret.base=path.slice(startPart,end);}ret.ext=path.slice(startDot,end);}if(startPart>0)ret.dir=path.slice(0,startPart-1);else if(isAbsolute)ret.dir='/';return ret;},sep:'/',delimiter:':',win32:null,posix:null};posix.posix=posix;module.exports=posix;}).call(this);}).call(this,require('_process'));},{"_process":150}],139:[function(require,module,exports){module.exports={"_from":"pict-application@^1.0.34","_id":"pict-application@1.0.34","_inBundle":false,"_integrity":"sha512-z+qyYs/kMdAk3I2Z4XDUvGjNyK/gfFM3r5zhHQcQrIxOcVqMwXMZvoMDWzCXc6SzyTJjoWHKZkdfmtRnft2RNw==","_location":"/pict-application","_phantomChildren":{},"_requested":{"type":"range","registry":true,"raw":"pict-application@^1.0.34","name":"pict-application","escapedName":"pict-application","rawSpec":"^1.0.34","saveSpec":null,"fetchSpec":"^1.0.34"},"_requiredBy":["/","/meadow-migrationmanager","/pict","/pict-docuserve","/pict-terminalui","/retold-harness","/stricture","/stricture/pict-terminalui"],"_resolved":"https://registry.npmjs.org/pict-application/-/pict-application-1.0.34.tgz","_shasum":"382dfc18e314ad1cdab3b8cd6687f441bf7521f8","_spec":"pict-application@^1.0.34","_where":"/Users/jacksonpollard/pict","author":{"name":"steven velozo","email":"steven@velozo.com"},"bugs":{"url":"https://github.com/stevenvelozo/pict-application/issues"},"bundleDependencies":false,"dependencies":{"fable-serviceproviderbase":"^3.0.19"},"deprecated":false,"description":"Application base class for a pict view-based application","devDependencies":{"@eslint/js":"^9.28.0","browser-env":"^3.3.0","eslint":"^9.28.0","pict":"^1.0.348","pict-docuserve":"^0.1.5","pict-provider":"^1.0.10","pict-view":"^1.0.66","quackage":"^1.1.0","typescript":"^5.9.3"},"homepage":"https://github.com/stevenvelozo/pict-application#readme","license":"MIT","main":"source/Pict-Application.js","mocha":{"diff":true,"extension":["js"],"package":"./package.json","reporter":"spec","slow":"75","timeout":"5000","ui":"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},"name":"pict-application","repository":{"type":"git","url":"git+https://github.com/stevenvelozo/pict-application.git"},"scripts":{"build":"npx quack build","coverage":"npx quack coverage","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-application-image:local","docker-dev-run":"docker run -it -d --name pict-application-dev -p 30001:8080 -p 38086:8086 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/pict-application\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" pict-application-image:local","docker-dev-shell":"docker exec -it pict-application-dev /bin/bash","lint":"eslint source/**","start":"node source/Pict-Application.js","test":"npx quack test","tests":"npx quack test -g","types":"tsc -p ."},"types":"types/source/Pict-Application.d.ts","version":"1.0.34"};},{}],140:[function(require,module,exports){const libFableServiceBase=require('fable-serviceproviderbase');const libPackage=require('../package.json');const defaultPictSettings={Name:'DefaultPictApplication',// The main "viewport" is the view that is used to host our application
4177
4177
  MainViewportViewIdentifier:'Default-View',MainViewportRenderableHash:false,MainViewportDestinationAddress:false,MainViewportDefaultDataAddress:false,// Whether or not we should automatically render the main viewport and other autorender views after we initialize the pict application
4178
4178
  AutoSolveAfterInitialize:true,AutoRenderMainViewportViewAfterInitialize:true,AutoRenderViewsAfterInitialize:false,AutoLoginAfterInitialize:false,AutoLoadDataAfterLogin:false,ConfigurationOnlyViews:[],Manifests:{},// The prefix to prepend on all template destination hashes
4179
4179
  IdentifierAddressPrefix:'PICT-'};/**
@@ -4375,7 +4375,7 @@ let tmpLoadedViews=Object.keys(this.pict.views);// Sort the views by their prior
4375
4375
  // If they are all the default priority 0, it will end up being add order due to JSON Object Property Key order stuff
4376
4376
  tmpLoadedViews.sort((a,b)=>{return this.pict.views[a].options.AutoRenderOrdinal-this.pict.views[b].options.AutoRenderOrdinal;});for(let i=0;i<tmpLoadedViews.length;i++){let tmpView=this.pict.views[tmpLoadedViews[i]];if(tmpView.options.AutoRender){tmpAnticipate.anticipate(tmpView.renderAsync.bind(tmpView));}}tmpAnticipate.wait(pError=>{this.lastAutoRenderTimestamp=this.fable.log.getTimeStamp();if(this.pict.LogNoisiness>0){this.log.trace(`PictApp [${this.UUID}]::[${this.Hash}] ${this.options.Name} renderAutoViewsAsync complete.`);}return tmpCallback(pError);});}/**
4377
4377
  * @return {boolean}
4378
- */get isPictApplication(){return true;}}module.exports=PictApplication;},{"../package.json":139,"fable-serviceproviderbase":59}],141:[function(require,module,exports){module.exports={"name":"pict-provider","version":"1.0.13","description":"Pict Provider Base Class","main":"source/Pict-Provider.js","scripts":{"start":"node source/Pict-Provider.js","test":"npx quack test","tests":"npx quack test -g","coverage":"npx quack coverage","build":"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-provider-image:local","docker-dev-run":"docker run -it -d --name pict-provider-dev -p 24125:8080 -p 30027:8086 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/pict-provider\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" pict-provider-image:local","docker-dev-shell":"docker exec -it pict-provider-dev /bin/bash","lint":"eslint source/**","types":"tsc -p ."},"types":"types/source/Pict-Provider.d.ts","repository":{"type":"git","url":"git+https://github.com/stevenvelozo/pict-provider.git"},"author":"steven velozo <steven@velozo.com>","license":"MIT","bugs":{"url":"https://github.com/stevenvelozo/pict-provider/issues"},"homepage":"https://github.com/stevenvelozo/pict-provider#readme","devDependencies":{"@eslint/js":"^9.39.1","eslint":"^9.39.1","pict":"^1.0.351","pict-docuserve":"^0.1.5","quackage":"^1.1.0","typescript":"^5.9.3"},"dependencies":{"fable-serviceproviderbase":"^3.0.19"},"mocha":{"diff":true,"extension":["js"],"package":"./package.json","reporter":"spec","slow":"75","timeout":"5000","ui":"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]}};},{}],142:[function(require,module,exports){const libFableServiceBase=require('fable-serviceproviderbase');const libPackage=require('../package.json');const defaultPictProviderSettings={ProviderIdentifier:false,// If this is set to true, when the App initializes this will.
4378
+ */get isPictApplication(){return true;}}module.exports=PictApplication;},{"../package.json":139,"fable-serviceproviderbase":59}],141:[function(require,module,exports){module.exports={"_from":"pict-provider@^1.0.13","_id":"pict-provider@1.0.13","_inBundle":false,"_integrity":"sha512-MRNtnuFfQYyM6pDTfth9XQETUkN91m1sVPRfgurZkrlsh8Cd9uvCgBQWfjQWjqwAHxKCIrp+QJcij2nNB81NsA==","_location":"/pict-provider","_phantomChildren":{},"_requested":{"type":"range","registry":true,"raw":"pict-provider@^1.0.13","name":"pict-provider","escapedName":"pict-provider","rawSpec":"^1.0.13","saveSpec":null,"fetchSpec":"^1.0.13"},"_requiredBy":["/","/bibliograph","/meadow-migrationmanager/pict-section-flow","/pict","/pict-docuserve","/pict-provider-theme","/pict-section-content","/pict-section-flow","/pict-section-form","/pict-section-theme","/quackage/pict-provider-theme"],"_resolved":"https://registry.npmjs.org/pict-provider/-/pict-provider-1.0.13.tgz","_shasum":"af7bc4353d0381812d86a671d2a0da08c038c80c","_spec":"pict-provider@^1.0.13","_where":"/Users/jacksonpollard/pict","author":{"name":"steven velozo","email":"steven@velozo.com"},"bugs":{"url":"https://github.com/stevenvelozo/pict-provider/issues"},"bundleDependencies":false,"dependencies":{"fable-serviceproviderbase":"^3.0.19"},"deprecated":false,"description":"Pict Provider Base Class","devDependencies":{"@eslint/js":"^9.39.1","eslint":"^9.39.1","pict":"^1.0.351","pict-docuserve":"^0.1.5","quackage":"^1.1.0","typescript":"^5.9.3"},"homepage":"https://github.com/stevenvelozo/pict-provider#readme","license":"MIT","main":"source/Pict-Provider.js","mocha":{"diff":true,"extension":["js"],"package":"./package.json","reporter":"spec","slow":"75","timeout":"5000","ui":"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},"name":"pict-provider","repository":{"type":"git","url":"git+https://github.com/stevenvelozo/pict-provider.git"},"scripts":{"build":"npx quack build","coverage":"npx quack coverage","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-provider-image:local","docker-dev-run":"docker run -it -d --name pict-provider-dev -p 24125:8080 -p 30027:8086 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/pict-provider\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" pict-provider-image:local","docker-dev-shell":"docker exec -it pict-provider-dev /bin/bash","lint":"eslint source/**","start":"node source/Pict-Provider.js","test":"npx quack test","tests":"npx quack test -g","types":"tsc -p ."},"types":"types/source/Pict-Provider.d.ts","version":"1.0.13"};},{}],142:[function(require,module,exports){const libFableServiceBase=require('fable-serviceproviderbase');const libPackage=require('../package.json');const defaultPictProviderSettings={ProviderIdentifier:false,// If this is set to true, when the App initializes this will.
4379
4379
  // After the App initializes, initialize will be called as soon as it's added.
4380
4380
  AutoInitialize:true,AutoInitializeOrdinal:0,AutoLoadDataWithApp:true,AutoLoadDataOrdinal:0,AutoSolveWithApp:true,AutoSolveOrdinal:0,Manifests:{},Templates:[]};class PictProvider extends libFableServiceBase{/**
4381
4381
  * @param {import('fable')} pFable - The Fable instance.
@@ -4439,7 +4439,7 @@ return fCallback();}}onAfterInitialize(){if(this.pict.LogNoisiness>3){this.log.t
4439
4439
  * @param {(pError?: Error) => void} fCallback - The callback to call after the data post-load.
4440
4440
  *
4441
4441
  * @return {void}
4442
- */onAfterSaveDataAsync(fCallback){return fCallback();}}module.exports=PictProvider;},{"../package.json":141,"fable-serviceproviderbase":59}],143:[function(require,module,exports){module.exports={"name":"pict-template","version":"1.0.15","description":"Pict Template Base Class","main":"source/Pict-Template.js","scripts":{"start":"node source/Pict-Template.js","test":"npx quack test","tests":"npx quack test -g","coverage":"npx quack coverage","build":"npx quack build","types":"tsc -p ."},"types":"types/source/Pict-Template.d.ts","repository":{"type":"git","url":"git+https://github.com/stevenvelozo/pict-view.git"},"author":"steven velozo <steven@velozo.com>","license":"MIT","bugs":{"url":"https://github.com/stevenvelozo/pict-view/issues"},"homepage":"https://github.com/stevenvelozo/pict-view#readme","devDependencies":{"pict":"^1.0.348","quackage":"^1.0.58","typescript":"^5.9.3"},"mocha":{"diff":true,"extension":["js"],"package":"./package.json","reporter":"spec","slow":"75","timeout":"5000","ui":"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},"dependencies":{"fable-serviceproviderbase":"^3.0.19"}};},{}],144:[function(require,module,exports){const libFableServiceBase=require('fable-serviceproviderbase');const libPackage=require('../package.json');/** @typedef {import('pict') & {
4442
+ */onAfterSaveDataAsync(fCallback){return fCallback();}}module.exports=PictProvider;},{"../package.json":141,"fable-serviceproviderbase":59}],143:[function(require,module,exports){module.exports={"_from":"pict-template@^1.0.15","_id":"pict-template@1.0.15","_inBundle":false,"_integrity":"sha512-oS+1FFJN5+BiggktJOpYb/HHW4DH/Iz2t6p5RELFZk0OOpsEh4wryAK/8hGfXwzdOXaJMpwL7nxcgO3v6WS1ow==","_location":"/pict-template","_phantomChildren":{},"_requested":{"type":"range","registry":true,"raw":"pict-template@^1.0.15","name":"pict-template","escapedName":"pict-template","rawSpec":"^1.0.15","saveSpec":null,"fetchSpec":"^1.0.15"},"_requiredBy":["/","/pict","/pict-provider-theme","/pict-section-form","/quackage/pict-provider-theme"],"_resolved":"https://registry.npmjs.org/pict-template/-/pict-template-1.0.15.tgz","_shasum":"23b2ec321ff2d2f1c78557ec523af5b3063198f4","_spec":"pict-template@^1.0.15","_where":"/Users/jacksonpollard/pict","author":{"name":"steven velozo","email":"steven@velozo.com"},"bugs":{"url":"https://github.com/stevenvelozo/pict-view/issues"},"bundleDependencies":false,"dependencies":{"fable-serviceproviderbase":"^3.0.19"},"deprecated":false,"description":"Pict Template Base Class","devDependencies":{"pict":"^1.0.348","quackage":"^1.0.58","typescript":"^5.9.3"},"homepage":"https://github.com/stevenvelozo/pict-view#readme","license":"MIT","main":"source/Pict-Template.js","mocha":{"diff":true,"extension":["js"],"package":"./package.json","reporter":"spec","slow":"75","timeout":"5000","ui":"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},"name":"pict-template","repository":{"type":"git","url":"git+https://github.com/stevenvelozo/pict-view.git"},"scripts":{"build":"npx quack build","coverage":"npx quack coverage","start":"node source/Pict-Template.js","test":"npx quack test","tests":"npx quack test -g","types":"tsc -p ."},"types":"types/source/Pict-Template.d.ts","version":"1.0.15"};},{}],144:[function(require,module,exports){const libFableServiceBase=require('fable-serviceproviderbase');const libPackage=require('../package.json');/** @typedef {import('pict') & {
4443
4443
  * [key: string]: any, // represent services for now as a workaround
4444
4444
  * }} Pict *//**
4445
4445
  * @class PictTemplateExpression
@@ -4487,7 +4487,7 @@ return fCallback();}}onAfterInitialize(){if(this.pict.LogNoisiness>3){this.log.t
4487
4487
  * @param {any} [pState] - A catchall state object for plumbing data through template processing.
4488
4488
  *
4489
4489
  * @return {any} The value at the given address, or undefined
4490
- */resolveStateFromAddress(pAddress,pRecord,pContextArray,pRootDataObject,pScope,pState){return this.pict.resolveStateFromAddress(pAddress,pRecord,pContextArray,pRootDataObject,pScope,pState);}}module.exports=PictTemplateExpression;module.exports.template_hash='Default';},{"../package.json":143,"fable-serviceproviderbase":59}],145:[function(require,module,exports){module.exports={"name":"pict-view","version":"1.0.68","description":"Pict View Base Class","main":"source/Pict-View.js","scripts":{"test":"npx quack test","tests":"npx quack test -g","start":"node source/Pict-View.js","coverage":"npx quack coverage","build":"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-view-image:local","docker-dev-run":"docker run -it -d --name pict-view-dev -p 30001:8080 -p 38086:8086 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/pict-view\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" pict-view-image:local","docker-dev-shell":"docker exec -it pict-view-dev /bin/bash","types":"tsc -p .","lint":"eslint source/**"},"types":"types/source/Pict-View.d.ts","repository":{"type":"git","url":"git+https://github.com/stevenvelozo/pict-view.git"},"author":"steven velozo <steven@velozo.com>","license":"MIT","bugs":{"url":"https://github.com/stevenvelozo/pict-view/issues"},"homepage":"https://github.com/stevenvelozo/pict-view#readme","devDependencies":{"@eslint/js":"^9.39.1","browser-env":"^3.3.0","eslint":"^9.39.1","pict":"^1.0.363","quackage":"^1.0.65","typescript":"^5.9.3"},"mocha":{"diff":true,"extension":["js"],"package":"./package.json","reporter":"spec","slow":"75","timeout":"5000","ui":"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},"dependencies":{"fable":"^3.1.67","fable-serviceproviderbase":"^3.0.19"}};},{}],146:[function(require,module,exports){const libFableServiceBase=require('fable-serviceproviderbase');const libPackage=require('../package.json');const defaultPictViewSettings={DefaultRenderable:false,DefaultDestinationAddress:false,DefaultTemplateRecordAddress:false,ViewIdentifier:false,// If this is set to true, when the App initializes this will.
4490
+ */resolveStateFromAddress(pAddress,pRecord,pContextArray,pRootDataObject,pScope,pState){return this.pict.resolveStateFromAddress(pAddress,pRecord,pContextArray,pRootDataObject,pScope,pState);}}module.exports=PictTemplateExpression;module.exports.template_hash='Default';},{"../package.json":143,"fable-serviceproviderbase":59}],145:[function(require,module,exports){module.exports={"_from":"pict-view@^1.0.68","_id":"pict-view@1.0.68","_inBundle":false,"_integrity":"sha512-hDrfBlcmCc+WyLJeapMhqCgI7yt5+6by+u5FQGnrlClezzcM3zzQv3rWJydQub1c3YBcSnSjqjpwa3Lx7Oik9w==","_location":"/pict-view","_phantomChildren":{},"_requested":{"type":"range","registry":true,"raw":"pict-view@^1.0.68","name":"pict-view","escapedName":"pict-view","rawSpec":"^1.0.68","saveSpec":null,"fetchSpec":"^1.0.68"},"_requiredBy":["/","/meadow-integration","/meadow-migrationmanager","/meadow-migrationmanager/pict-section-flow","/pict","/pict-docuserve","/pict-section-code","/pict-section-connection-form","/pict-section-content","/pict-section-flow","/pict-section-form","/pict-section-histogram","/pict-section-modal","/pict-section-theme","/pict-section-tuigrid","/pict-terminalui","/retold-harness","/stricture","/stricture/pict-terminalui"],"_resolved":"https://registry.npmjs.org/pict-view/-/pict-view-1.0.68.tgz","_shasum":"5df78b51e03625f624c988aad6c7f27b014e8f31","_spec":"pict-view@^1.0.68","_where":"/Users/jacksonpollard/pict","author":{"name":"steven velozo","email":"steven@velozo.com"},"bugs":{"url":"https://github.com/stevenvelozo/pict-view/issues"},"bundleDependencies":false,"dependencies":{"fable":"^3.1.67","fable-serviceproviderbase":"^3.0.19"},"deprecated":false,"description":"Pict View Base Class","devDependencies":{"@eslint/js":"^9.39.1","browser-env":"^3.3.0","eslint":"^9.39.1","pict":"^1.0.363","quackage":"^1.0.65","typescript":"^5.9.3"},"homepage":"https://github.com/stevenvelozo/pict-view#readme","license":"MIT","main":"source/Pict-View.js","mocha":{"diff":true,"extension":["js"],"package":"./package.json","reporter":"spec","slow":"75","timeout":"5000","ui":"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},"name":"pict-view","repository":{"type":"git","url":"git+https://github.com/stevenvelozo/pict-view.git"},"scripts":{"build":"npx quack build","coverage":"npx quack coverage","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-view-image:local","docker-dev-run":"docker run -it -d --name pict-view-dev -p 30001:8080 -p 38086:8086 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/pict-view\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" pict-view-image:local","docker-dev-shell":"docker exec -it pict-view-dev /bin/bash","lint":"eslint source/**","start":"node source/Pict-View.js","test":"npx quack test","tests":"npx quack test -g","types":"tsc -p ."},"types":"types/source/Pict-View.d.ts","version":"1.0.68"};},{}],146:[function(require,module,exports){const libFableServiceBase=require('fable-serviceproviderbase');const libPackage=require('../package.json');const defaultPictViewSettings={DefaultRenderable:false,DefaultDestinationAddress:false,DefaultTemplateRecordAddress:false,ViewIdentifier:false,// If this is set to true, when the App initializes this will.
4491
4491
  // After the App initializes, initialize will be called as soon as it's added.
4492
4492
  AutoInitialize:true,AutoInitializeOrdinal:0,// If this is set to true, when the App autorenders (on load) this will.
4493
4493
  // After the App initializes, render will be called as soon as it's added.
@@ -4915,162 +4915,7 @@ return cachedClearTimeout.call(null,marker);}catch(e){// same as above but when
4915
4915
  // Some versions of I.E. have different rules for clearTimeout vs setTimeout
4916
4916
  return cachedClearTimeout.call(this,marker);}}}var queue=[];var draining=false;var currentQueue;var queueIndex=-1;function cleanUpNextTick(){if(!draining||!currentQueue){return;}draining=false;if(currentQueue.length){queue=currentQueue.concat(queue);}else{queueIndex=-1;}if(queue.length){drainQueue();}}function drainQueue(){if(draining){return;}var timeout=runTimeout(cleanUpNextTick);draining=true;var len=queue.length;while(len){currentQueue=queue;queue=[];while(++queueIndex<len){if(currentQueue){currentQueue[queueIndex].run();}}queueIndex=-1;len=queue.length;}currentQueue=null;draining=false;runClearTimeout(timeout);}process.nextTick=function(fun){var args=new Array(arguments.length-1);if(arguments.length>1){for(var i=1;i<arguments.length;i++){args[i-1]=arguments[i];}}queue.push(new Item(fun,args));if(queue.length===1&&!draining){runTimeout(drainQueue);}};// v8 likes predictible objects
4917
4917
  function Item(fun,array){this.fun=fun;this.array=array;}Item.prototype.run=function(){this.fun.apply(null,this.array);};process.title='browser';process.browser=true;process.env={};process.argv=[];process.version='';// empty string to avoid regexp issues
4918
- process.versions={};function noop(){}process.on=noop;process.addListener=noop;process.once=noop;process.off=noop;process.removeListener=noop;process.removeAllListeners=noop;process.emit=noop;process.prependListener=noop;process.prependOnceListener=noop;process.listeners=function(name){return[];};process.binding=function(name){throw new Error('process.binding is not supported');};process.cwd=function(){return'/';};process.chdir=function(dir){throw new Error('process.chdir is not supported');};process.umask=function(){return 0;};},{}],151:[function(require,module,exports){(function(global){(function(){/*! https://mths.be/punycode v1.4.1 by @mathias */;(function(root){/** Detect free variables */var freeExports=typeof exports=='object'&&exports&&!exports.nodeType&&exports;var freeModule=typeof module=='object'&&module&&!module.nodeType&&module;var freeGlobal=typeof global=='object'&&global;if(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal||freeGlobal.self===freeGlobal){root=freeGlobal;}/**
4919
- * The `punycode` object.
4920
- * @name punycode
4921
- * @type Object
4922
- */var punycode,/** Highest positive signed 32-bit float value */maxInt=2147483647,// aka. 0x7FFFFFFF or 2^31-1
4923
- /** Bootstring parameters */base=36,tMin=1,tMax=26,skew=38,damp=700,initialBias=72,initialN=128,// 0x80
4924
- delimiter='-',// '\x2D'
4925
- /** Regular expressions */regexPunycode=/^xn--/,regexNonASCII=/[^\x20-\x7E]/,// unprintable ASCII chars + non-ASCII chars
4926
- regexSeparators=/[\x2E\u3002\uFF0E\uFF61]/g,// RFC 3490 separators
4927
- /** Error messages */errors={'overflow':'Overflow: input needs wider integers to process','not-basic':'Illegal input >= 0x80 (not a basic code point)','invalid-input':'Invalid input'},/** Convenience shortcuts */baseMinusTMin=base-tMin,floor=Math.floor,stringFromCharCode=String.fromCharCode,/** Temporary variable */key;/*--------------------------------------------------------------------------*//**
4928
- * A generic error utility function.
4929
- * @private
4930
- * @param {String} type The error type.
4931
- * @returns {Error} Throws a `RangeError` with the applicable error message.
4932
- */function error(type){throw new RangeError(errors[type]);}/**
4933
- * A generic `Array#map` utility function.
4934
- * @private
4935
- * @param {Array} array The array to iterate over.
4936
- * @param {Function} callback The function that gets called for every array
4937
- * item.
4938
- * @returns {Array} A new array of values returned by the callback function.
4939
- */function map(array,fn){var length=array.length;var result=[];while(length--){result[length]=fn(array[length]);}return result;}/**
4940
- * A simple `Array#map`-like wrapper to work with domain name strings or email
4941
- * addresses.
4942
- * @private
4943
- * @param {String} domain The domain name or email address.
4944
- * @param {Function} callback The function that gets called for every
4945
- * character.
4946
- * @returns {Array} A new string of characters returned by the callback
4947
- * function.
4948
- */function mapDomain(string,fn){var parts=string.split('@');var result='';if(parts.length>1){// In email addresses, only the domain name should be punycoded. Leave
4949
- // the local part (i.e. everything up to `@`) intact.
4950
- result=parts[0]+'@';string=parts[1];}// Avoid `split(regex)` for IE8 compatibility. See #17.
4951
- string=string.replace(regexSeparators,'\x2E');var labels=string.split('.');var encoded=map(labels,fn).join('.');return result+encoded;}/**
4952
- * Creates an array containing the numeric code points of each Unicode
4953
- * character in the string. While JavaScript uses UCS-2 internally,
4954
- * this function will convert a pair of surrogate halves (each of which
4955
- * UCS-2 exposes as separate characters) into a single code point,
4956
- * matching UTF-16.
4957
- * @see `punycode.ucs2.encode`
4958
- * @see <https://mathiasbynens.be/notes/javascript-encoding>
4959
- * @memberOf punycode.ucs2
4960
- * @name decode
4961
- * @param {String} string The Unicode input string (UCS-2).
4962
- * @returns {Array} The new array of code points.
4963
- */function ucs2decode(string){var output=[],counter=0,length=string.length,value,extra;while(counter<length){value=string.charCodeAt(counter++);if(value>=0xD800&&value<=0xDBFF&&counter<length){// high surrogate, and there is a next character
4964
- extra=string.charCodeAt(counter++);if((extra&0xFC00)==0xDC00){// low surrogate
4965
- output.push(((value&0x3FF)<<10)+(extra&0x3FF)+0x10000);}else{// unmatched surrogate; only append this code unit, in case the next
4966
- // code unit is the high surrogate of a surrogate pair
4967
- output.push(value);counter--;}}else{output.push(value);}}return output;}/**
4968
- * Creates a string based on an array of numeric code points.
4969
- * @see `punycode.ucs2.decode`
4970
- * @memberOf punycode.ucs2
4971
- * @name encode
4972
- * @param {Array} codePoints The array of numeric code points.
4973
- * @returns {String} The new Unicode string (UCS-2).
4974
- */function ucs2encode(array){return map(array,function(value){var output='';if(value>0xFFFF){value-=0x10000;output+=stringFromCharCode(value>>>10&0x3FF|0xD800);value=0xDC00|value&0x3FF;}output+=stringFromCharCode(value);return output;}).join('');}/**
4975
- * Converts a basic code point into a digit/integer.
4976
- * @see `digitToBasic()`
4977
- * @private
4978
- * @param {Number} codePoint The basic numeric code point value.
4979
- * @returns {Number} The numeric value of a basic code point (for use in
4980
- * representing integers) in the range `0` to `base - 1`, or `base` if
4981
- * the code point does not represent a value.
4982
- */function basicToDigit(codePoint){if(codePoint-48<10){return codePoint-22;}if(codePoint-65<26){return codePoint-65;}if(codePoint-97<26){return codePoint-97;}return base;}/**
4983
- * Converts a digit/integer into a basic code point.
4984
- * @see `basicToDigit()`
4985
- * @private
4986
- * @param {Number} digit The numeric value of a basic code point.
4987
- * @returns {Number} The basic code point whose value (when used for
4988
- * representing integers) is `digit`, which needs to be in the range
4989
- * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
4990
- * used; else, the lowercase form is used. The behavior is undefined
4991
- * if `flag` is non-zero and `digit` has no uppercase form.
4992
- */function digitToBasic(digit,flag){// 0..25 map to ASCII a..z or A..Z
4993
- // 26..35 map to ASCII 0..9
4994
- return digit+22+75*(digit<26)-((flag!=0)<<5);}/**
4995
- * Bias adaptation function as per section 3.4 of RFC 3492.
4996
- * https://tools.ietf.org/html/rfc3492#section-3.4
4997
- * @private
4998
- */function adapt(delta,numPoints,firstTime){var k=0;delta=firstTime?floor(delta/damp):delta>>1;delta+=floor(delta/numPoints);for/* no initialization */(;delta>baseMinusTMin*tMax>>1;k+=base){delta=floor(delta/baseMinusTMin);}return floor(k+(baseMinusTMin+1)*delta/(delta+skew));}/**
4999
- * Converts a Punycode string of ASCII-only symbols to a string of Unicode
5000
- * symbols.
5001
- * @memberOf punycode
5002
- * @param {String} input The Punycode string of ASCII-only symbols.
5003
- * @returns {String} The resulting string of Unicode symbols.
5004
- */function decode(input){// Don't use UCS-2
5005
- var output=[],inputLength=input.length,out,i=0,n=initialN,bias=initialBias,basic,j,index,oldi,w,k,digit,t,/** Cached calculation results */baseMinusT;// Handle the basic code points: let `basic` be the number of input code
5006
- // points before the last delimiter, or `0` if there is none, then copy
5007
- // the first basic code points to the output.
5008
- basic=input.lastIndexOf(delimiter);if(basic<0){basic=0;}for(j=0;j<basic;++j){// if it's not a basic code point
5009
- if(input.charCodeAt(j)>=0x80){error('not-basic');}output.push(input.charCodeAt(j));}// Main decoding loop: start just after the last delimiter if any basic code
5010
- // points were copied; start at the beginning otherwise.
5011
- for/* no final expression */(index=basic>0?basic+1:0;index<inputLength;){// `index` is the index of the next character to be consumed.
5012
- // Decode a generalized variable-length integer into `delta`,
5013
- // which gets added to `i`. The overflow checking is easier
5014
- // if we increase `i` as we go, then subtract off its starting
5015
- // value at the end to obtain `delta`.
5016
- for/* no condition */(oldi=i,w=1,k=base;;k+=base){if(index>=inputLength){error('invalid-input');}digit=basicToDigit(input.charCodeAt(index++));if(digit>=base||digit>floor((maxInt-i)/w)){error('overflow');}i+=digit*w;t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(digit<t){break;}baseMinusT=base-t;if(w>floor(maxInt/baseMinusT)){error('overflow');}w*=baseMinusT;}out=output.length+1;bias=adapt(i-oldi,out,oldi==0);// `i` was supposed to wrap around from `out` to `0`,
5017
- // incrementing `n` each time, so we'll fix that now:
5018
- if(floor(i/out)>maxInt-n){error('overflow');}n+=floor(i/out);i%=out;// Insert `n` at position `i` of the output
5019
- output.splice(i++,0,n);}return ucs2encode(output);}/**
5020
- * Converts a string of Unicode symbols (e.g. a domain name label) to a
5021
- * Punycode string of ASCII-only symbols.
5022
- * @memberOf punycode
5023
- * @param {String} input The string of Unicode symbols.
5024
- * @returns {String} The resulting Punycode string of ASCII-only symbols.
5025
- */function encode(input){var n,delta,handledCPCount,basicLength,bias,j,m,q,k,t,currentValue,output=[],/** `inputLength` will hold the number of code points in `input`. */inputLength,/** Cached calculation results */handledCPCountPlusOne,baseMinusT,qMinusT;// Convert the input in UCS-2 to Unicode
5026
- input=ucs2decode(input);// Cache the length
5027
- inputLength=input.length;// Initialize the state
5028
- n=initialN;delta=0;bias=initialBias;// Handle the basic code points
5029
- for(j=0;j<inputLength;++j){currentValue=input[j];if(currentValue<0x80){output.push(stringFromCharCode(currentValue));}}handledCPCount=basicLength=output.length;// `handledCPCount` is the number of code points that have been handled;
5030
- // `basicLength` is the number of basic code points.
5031
- // Finish the basic string - if it is not empty - with a delimiter
5032
- if(basicLength){output.push(delimiter);}// Main encoding loop:
5033
- while(handledCPCount<inputLength){// All non-basic code points < n have been handled already. Find the next
5034
- // larger one:
5035
- for(m=maxInt,j=0;j<inputLength;++j){currentValue=input[j];if(currentValue>=n&&currentValue<m){m=currentValue;}}// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
5036
- // but guard against overflow
5037
- handledCPCountPlusOne=handledCPCount+1;if(m-n>floor((maxInt-delta)/handledCPCountPlusOne)){error('overflow');}delta+=(m-n)*handledCPCountPlusOne;n=m;for(j=0;j<inputLength;++j){currentValue=input[j];if(currentValue<n&&++delta>maxInt){error('overflow');}if(currentValue==n){// Represent delta as a generalized variable-length integer
5038
- for/* no condition */(q=delta,k=base;;k+=base){t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(q<t){break;}qMinusT=q-t;baseMinusT=base-t;output.push(stringFromCharCode(digitToBasic(t+qMinusT%baseMinusT,0)));q=floor(qMinusT/baseMinusT);}output.push(stringFromCharCode(digitToBasic(q,0)));bias=adapt(delta,handledCPCountPlusOne,handledCPCount==basicLength);delta=0;++handledCPCount;}}++delta;++n;}return output.join('');}/**
5039
- * Converts a Punycode string representing a domain name or an email address
5040
- * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
5041
- * it doesn't matter if you call it on a string that has already been
5042
- * converted to Unicode.
5043
- * @memberOf punycode
5044
- * @param {String} input The Punycoded domain name or email address to
5045
- * convert to Unicode.
5046
- * @returns {String} The Unicode representation of the given Punycode
5047
- * string.
5048
- */function toUnicode(input){return mapDomain(input,function(string){return regexPunycode.test(string)?decode(string.slice(4).toLowerCase()):string;});}/**
5049
- * Converts a Unicode string representing a domain name or an email address to
5050
- * Punycode. Only the non-ASCII parts of the domain name will be converted,
5051
- * i.e. it doesn't matter if you call it with a domain that's already in
5052
- * ASCII.
5053
- * @memberOf punycode
5054
- * @param {String} input The domain name or email address to convert, as a
5055
- * Unicode string.
5056
- * @returns {String} The Punycode representation of the given domain name or
5057
- * email address.
5058
- */function toASCII(input){return mapDomain(input,function(string){return regexNonASCII.test(string)?'xn--'+encode(string):string;});}/*--------------------------------------------------------------------------*//** Define the public API */punycode={/**
5059
- * A string representing the current Punycode.js version number.
5060
- * @memberOf punycode
5061
- * @type String
5062
- */'version':'1.4.1',/**
5063
- * An object of methods to convert from JavaScript's internal character
5064
- * representation (UCS-2) to Unicode code points, and back.
5065
- * @see <https://mathiasbynens.be/notes/javascript-encoding>
5066
- * @memberOf punycode
5067
- * @type Object
5068
- */'ucs2':{'decode':ucs2decode,'encode':ucs2encode},'decode':decode,'encode':encode,'toASCII':toASCII,'toUnicode':toUnicode};/** Expose `punycode` */// Some AMD build optimizers, like r.js, check for specific condition patterns
5069
- // like the following:
5070
- if(typeof define=='function'&&typeof define.amd=='object'&&define.amd){define('punycode',function(){return punycode;});}else if(freeExports&&freeModule){if(module.exports==freeExports){// in Node.js, io.js, or RingoJS v0.8.0+
5071
- freeModule.exports=punycode;}else{// in Narwhal or RingoJS v0.7.0-
5072
- for(key in punycode){punycode.hasOwnProperty(key)&&(freeExports[key]=punycode[key]);}}}else{// in Rhino or a web browser
5073
- root.punycode=punycode;}})(this);}).call(this);}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{});},{}],152:[function(require,module,exports){'use strict';var replace=String.prototype.replace;var percentTwenties=/%20/g;var Format={RFC1738:'RFC1738',RFC3986:'RFC3986'};module.exports={'default':Format.RFC3986,formatters:{RFC1738:function(value){return replace.call(value,percentTwenties,'+');},RFC3986:function(value){return String(value);}},RFC1738:Format.RFC1738,RFC3986:Format.RFC3986};},{}],153:[function(require,module,exports){'use strict';var stringify=require('./stringify');var parse=require('./parse');var formats=require('./formats');module.exports={formats:formats,parse:parse,stringify:stringify};},{"./formats":152,"./parse":154,"./stringify":155}],154:[function(require,module,exports){'use strict';var utils=require('./utils');var has=Object.prototype.hasOwnProperty;var isArray=Array.isArray;var defaults={allowDots:false,allowEmptyArrays:false,allowPrototypes:false,allowSparse:false,arrayLimit:20,charset:'utf-8',charsetSentinel:false,comma:false,decodeDotInKeys:false,decoder:utils.decode,delimiter:'&',depth:5,duplicates:'combine',ignoreQueryPrefix:false,interpretNumericEntities:false,parameterLimit:1000,parseArrays:true,plainObjects:false,strictDepth:false,strictMerge:true,strictNullHandling:false,throwOnLimitExceeded:false};var interpretNumericEntities=function(str){return str.replace(/&#(\d+);/g,function($0,numberStr){return String.fromCharCode(parseInt(numberStr,10));});};var parseArrayValue=function(val,options,currentArrayLength){if(val&&typeof val==='string'&&options.comma&&val.indexOf(',')>-1){return val.split(',');}if(options.throwOnLimitExceeded&&currentArrayLength>=options.arrayLimit){throw new RangeError('Array limit exceeded. Only '+options.arrayLimit+' element'+(options.arrayLimit===1?'':'s')+' allowed in an array.');}return val;};// This is what browsers will submit when the ✓ character occurs in an
4918
+ process.versions={};function noop(){}process.on=noop;process.addListener=noop;process.once=noop;process.off=noop;process.removeListener=noop;process.removeAllListeners=noop;process.emit=noop;process.prependListener=noop;process.prependOnceListener=noop;process.listeners=function(name){return[];};process.binding=function(name){throw new Error('process.binding is not supported');};process.cwd=function(){return'/';};process.chdir=function(dir){throw new Error('process.chdir is not supported');};process.umask=function(){return 0;};},{}],151:[function(require,module,exports){'use strict';var replace=String.prototype.replace;var percentTwenties=/%20/g;var Format={RFC1738:'RFC1738',RFC3986:'RFC3986'};module.exports={'default':Format.RFC3986,formatters:{RFC1738:function(value){return replace.call(value,percentTwenties,'+');},RFC3986:function(value){return String(value);}},RFC1738:Format.RFC1738,RFC3986:Format.RFC3986};},{}],152:[function(require,module,exports){'use strict';var stringify=require('./stringify');var parse=require('./parse');var formats=require('./formats');module.exports={formats:formats,parse:parse,stringify:stringify};},{"./formats":151,"./parse":153,"./stringify":154}],153:[function(require,module,exports){'use strict';var utils=require('./utils');var has=Object.prototype.hasOwnProperty;var isArray=Array.isArray;var defaults={allowDots:false,allowEmptyArrays:false,allowPrototypes:false,allowSparse:false,arrayLimit:20,charset:'utf-8',charsetSentinel:false,comma:false,decodeDotInKeys:false,decoder:utils.decode,delimiter:'&',depth:5,duplicates:'combine',ignoreQueryPrefix:false,interpretNumericEntities:false,parameterLimit:1000,parseArrays:true,plainObjects:false,strictDepth:false,strictMerge:true,strictNullHandling:false,throwOnLimitExceeded:false};var interpretNumericEntities=function(str){return str.replace(/&#(\d+);/g,function($0,numberStr){return String.fromCharCode(parseInt(numberStr,10));});};var parseArrayValue=function(val,options,currentArrayLength){if(val&&typeof val==='string'&&options.comma&&val.indexOf(',')>-1){return val.split(',');}if(options.throwOnLimitExceeded&&currentArrayLength>=options.arrayLimit){throw new RangeError('Array limit exceeded. Only '+options.arrayLimit+' element'+(options.arrayLimit===1?'':'s')+' allowed in an array.');}return val;};// This is what browsers will submit when the ✓ character occurs in an
5074
4919
  // application/x-www-form-urlencoded body and the encoding of the page containing
5075
4920
  // the form is iso-8859-1, or when the submitted form has an accept-charset
5076
4921
  // attribute of iso-8859-1. Presumably also with other charsets that do not contain
@@ -5078,18 +4923,30 @@ root.punycode=punycode;}})(this);}).call(this);}).call(this,typeof global!=="und
5078
4923
  var isoSentinel='utf8=%26%2310003%3B';// encodeURIComponent('&#10003;')
5079
4924
  // These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
5080
4925
  var charsetSentinel='utf8=%E2%9C%93';// encodeURIComponent('✓')
5081
- var parseValues=function parseQueryStringValues(str,options){var obj={__proto__:null};var cleanStr=options.ignoreQueryPrefix?str.replace(/^\?/,''):str;cleanStr=cleanStr.replace(/%5B/gi,'[').replace(/%5D/gi,']');var limit=options.parameterLimit===Infinity?void undefined:options.parameterLimit;var parts=cleanStr.split(options.delimiter,options.throwOnLimitExceeded?limit+1:limit);if(options.throwOnLimitExceeded&&parts.length>limit){throw new RangeError('Parameter limit exceeded. Only '+limit+' parameter'+(limit===1?'':'s')+' allowed.');}var skipIndex=-1;// Keep track of where the utf8 sentinel was found
4926
+ var parseValues=function parseQueryStringValues(str,options){var obj={__proto__:null};var cleanStr=options.ignoreQueryPrefix?str.replace(/^\?/,''):str;cleanStr=cleanStr.replace(/%5B/gi,'[').replace(/%5D/gi,']');var limit=options.parameterLimit===Infinity?void undefined:options.parameterLimit;var parts=cleanStr.split(options.delimiter,options.throwOnLimitExceeded&&typeof limit!=='undefined'?limit+1:limit);if(options.throwOnLimitExceeded&&typeof limit!=='undefined'&&parts.length>limit){throw new RangeError('Parameter limit exceeded. Only '+limit+' parameter'+(limit===1?'':'s')+' allowed.');}var skipIndex=-1;// Keep track of where the utf8 sentinel was found
5082
4927
  var i;var charset=options.charset;if(options.charsetSentinel){for(i=0;i<parts.length;++i){if(parts[i].indexOf('utf8=')===0){if(parts[i]===charsetSentinel){charset='utf-8';}else if(parts[i]===isoSentinel){charset='iso-8859-1';}skipIndex=i;i=parts.length;// The eslint settings do not allow break;
5083
4928
  }}}for(i=0;i<parts.length;++i){if(i===skipIndex){continue;}var part=parts[i];var bracketEqualsPos=part.indexOf(']=');var pos=bracketEqualsPos===-1?part.indexOf('='):bracketEqualsPos+1;var key;var val;if(pos===-1){key=options.decoder(part,defaults.decoder,charset,'key');val=options.strictNullHandling?null:'';}else{key=options.decoder(part.slice(0,pos),defaults.decoder,charset,'key');if(key!==null){val=utils.maybeMap(parseArrayValue(part.slice(pos+1),options,isArray(obj[key])?obj[key].length:0),function(encodedVal){return options.decoder(encodedVal,defaults.decoder,charset,'value');});}}if(val&&options.interpretNumericEntities&&charset==='iso-8859-1'){val=interpretNumericEntities(String(val));}if(part.indexOf('[]=')>-1){val=isArray(val)?[val]:val;}if(options.comma&&isArray(val)&&val.length>options.arrayLimit){if(options.throwOnLimitExceeded){throw new RangeError('Array limit exceeded. Only '+options.arrayLimit+' element'+(options.arrayLimit===1?'':'s')+' allowed in an array.');}val=utils.combine([],val,options.arrayLimit,options.plainObjects);}if(key!==null){var existing=has.call(obj,key);if(existing&&(options.duplicates==='combine'||part.indexOf('[]=')>-1)){obj[key]=utils.combine(obj[key],val,options.arrayLimit,options.plainObjects);}else if(!existing||options.duplicates==='last'){obj[key]=val;}}}return obj;};var parseObject=function(chain,val,options,valuesParsed){var currentArrayLength=0;if(chain.length>0&&chain[chain.length-1]==='[]'){var parentKey=chain.slice(0,-1).join('');currentArrayLength=Array.isArray(val)&&val[parentKey]?val[parentKey].length:0;}var leaf=valuesParsed?val:parseArrayValue(val,options,currentArrayLength);for(var i=chain.length-1;i>=0;--i){var obj;var root=chain[i];if(root==='[]'&&options.parseArrays){if(utils.isOverflow(leaf)){// leaf is already an overflow object, preserve it
5084
- obj=leaf;}else{obj=options.allowEmptyArrays&&(leaf===''||options.strictNullHandling&&leaf===null)?[]:utils.combine([],leaf,options.arrayLimit,options.plainObjects);}}else{obj=options.plainObjects?{__proto__:null}:{};var cleanRoot=root.charAt(0)==='['&&root.charAt(root.length-1)===']'?root.slice(1,-1):root;var decodedRoot=options.decodeDotInKeys?cleanRoot.replace(/%2E/g,'.'):cleanRoot;var index=parseInt(decodedRoot,10);var isValidArrayIndex=!isNaN(index)&&root!==decodedRoot&&String(index)===decodedRoot&&index>=0&&options.parseArrays;if(!options.parseArrays&&decodedRoot===''){obj={0:leaf};}else if(isValidArrayIndex&&index<options.arrayLimit){obj=[];obj[index]=leaf;}else if(isValidArrayIndex&&options.throwOnLimitExceeded){throw new RangeError('Array limit exceeded. Only '+options.arrayLimit+' element'+(options.arrayLimit===1?'':'s')+' allowed in an array.');}else if(isValidArrayIndex){obj[index]=leaf;utils.markOverflow(obj,index);}else if(decodedRoot!=='__proto__'){obj[decodedRoot]=leaf;}}leaf=obj;}return leaf;};var splitKeyIntoSegments=function splitKeyIntoSegments(givenKey,options){var key=options.allowDots?givenKey.replace(/\.([^.[]+)/g,'[$1]'):givenKey;if(options.depth<=0){if(!options.plainObjects&&has.call(Object.prototype,key)){if(!options.allowPrototypes){return;}}return[key];}var brackets=/(\[[^[\]]*])/;var child=/(\[[^[\]]*])/g;var segment=brackets.exec(key);var parent=segment?key.slice(0,segment.index):key;var keys=[];if(parent){if(!options.plainObjects&&has.call(Object.prototype,parent)){if(!options.allowPrototypes){return;}}keys[keys.length]=parent;}var i=0;while((segment=child.exec(key))!==null&&i<options.depth){i+=1;var segmentContent=segment[1].slice(1,-1);if(!options.plainObjects&&has.call(Object.prototype,segmentContent)){if(!options.allowPrototypes){return;}}keys[keys.length]=segment[1];}if(segment){if(options.strictDepth===true){throw new RangeError('Input depth exceeded depth option of '+options.depth+' and strictDepth is true');}keys[keys.length]='['+key.slice(segment.index)+']';}return keys;};var parseKeys=function parseQueryStringKeys(givenKey,val,options,valuesParsed){if(!givenKey){return;}var keys=splitKeyIntoSegments(givenKey,options);if(!keys){return;}return parseObject(keys,val,options,valuesParsed);};var normalizeParseOptions=function normalizeParseOptions(opts){if(!opts){return defaults;}if(typeof opts.allowEmptyArrays!=='undefined'&&typeof opts.allowEmptyArrays!=='boolean'){throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided');}if(typeof opts.decodeDotInKeys!=='undefined'&&typeof opts.decodeDotInKeys!=='boolean'){throw new TypeError('`decodeDotInKeys` option can only be `true` or `false`, when provided');}if(opts.decoder!==null&&typeof opts.decoder!=='undefined'&&typeof opts.decoder!=='function'){throw new TypeError('Decoder has to be a function.');}if(typeof opts.charset!=='undefined'&&opts.charset!=='utf-8'&&opts.charset!=='iso-8859-1'){throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');}if(typeof opts.throwOnLimitExceeded!=='undefined'&&typeof opts.throwOnLimitExceeded!=='boolean'){throw new TypeError('`throwOnLimitExceeded` option must be a boolean');}var charset=typeof opts.charset==='undefined'?defaults.charset:opts.charset;var duplicates=typeof opts.duplicates==='undefined'?defaults.duplicates:opts.duplicates;if(duplicates!=='combine'&&duplicates!=='first'&&duplicates!=='last'){throw new TypeError('The duplicates option must be either combine, first, or last');}var allowDots=typeof opts.allowDots==='undefined'?opts.decodeDotInKeys===true?true:defaults.allowDots:!!opts.allowDots;return{allowDots:allowDots,allowEmptyArrays:typeof opts.allowEmptyArrays==='boolean'?!!opts.allowEmptyArrays:defaults.allowEmptyArrays,allowPrototypes:typeof opts.allowPrototypes==='boolean'?opts.allowPrototypes:defaults.allowPrototypes,allowSparse:typeof opts.allowSparse==='boolean'?opts.allowSparse:defaults.allowSparse,arrayLimit:typeof opts.arrayLimit==='number'?opts.arrayLimit:defaults.arrayLimit,charset:charset,charsetSentinel:typeof opts.charsetSentinel==='boolean'?opts.charsetSentinel:defaults.charsetSentinel,comma:typeof opts.comma==='boolean'?opts.comma:defaults.comma,decodeDotInKeys:typeof opts.decodeDotInKeys==='boolean'?opts.decodeDotInKeys:defaults.decodeDotInKeys,decoder:typeof opts.decoder==='function'?opts.decoder:defaults.decoder,delimiter:typeof opts.delimiter==='string'||utils.isRegExp(opts.delimiter)?opts.delimiter:defaults.delimiter,// eslint-disable-next-line no-implicit-coercion, no-extra-parens
4929
+ obj=leaf;}else{obj=options.allowEmptyArrays&&(leaf===''||options.strictNullHandling&&leaf===null)?[]:utils.combine([],leaf,options.arrayLimit,options.plainObjects);}}else{obj=options.plainObjects?{__proto__:null}:{};var cleanRoot=root.charAt(0)==='['&&root.charAt(root.length-1)===']'?root.slice(1,-1):root;var decodedRoot=options.decodeDotInKeys?cleanRoot.replace(/%2E/g,'.'):cleanRoot;var index=parseInt(decodedRoot,10);var isValidArrayIndex=!isNaN(index)&&root!==decodedRoot&&String(index)===decodedRoot&&index>=0&&options.parseArrays;if(!options.parseArrays&&decodedRoot===''){obj={0:leaf};}else if(isValidArrayIndex&&index<options.arrayLimit){obj=[];obj[index]=leaf;}else if(isValidArrayIndex&&options.throwOnLimitExceeded){throw new RangeError('Array limit exceeded. Only '+options.arrayLimit+' element'+(options.arrayLimit===1?'':'s')+' allowed in an array.');}else if(isValidArrayIndex){obj[index]=leaf;utils.markOverflow(obj,index);}else if(decodedRoot!=='__proto__'){obj[decodedRoot]=leaf;}}leaf=obj;}return leaf;};// Split a key like "a[b][c[]]" into ['a', '[b]', '[c[]]'] while preserving
4930
+ // qs parse semantics for depth/prototype guards.
4931
+ var splitKeyIntoSegments=function splitKeyIntoSegments(originalKey,options){var key=options.allowDots?originalKey.replace(/\.([^.[]+)/g,'[$1]'):originalKey;// depth <= 0 keeps the whole key as one segment
4932
+ if(options.depth<=0){if(!options.plainObjects&&has.call(Object.prototype,key)){if(!options.allowPrototypes){return;}}return[key];}var segments=[];// parent before the first '[' (may be empty if key starts with '[')
4933
+ var first=key.indexOf('[');var parent=first>=0?key.slice(0,first):key;if(parent){if(!options.plainObjects&&has.call(Object.prototype,parent)){if(!options.allowPrototypes){return;}}segments[segments.length]=parent;}var n=key.length;var open=first;var collected=0;while(open>=0&&collected<options.depth){var level=1;var i=open+1;var close=-1;// balance nested '[' and ']' inside this bracket group using a nesting level counter
4934
+ while(i<n&&close<0){var cu=key.charCodeAt(i);if(cu===0x5B){// '['
4935
+ level+=1;}else if(cu===0x5D){// ']'
4936
+ level-=1;if(level===0){close=i;// found matching close; loop will exit by condition
4937
+ }}i+=1;}if(close<0){// Unterminated group: wrap the raw remainder in one bracket pair so it stays
4938
+ // a single literal segment (e.g. "[[]b" -> "[[]b]"); we do not infer missing ']'.
4939
+ segments[segments.length]='['+key.slice(open)+']';return segments;}var seg=key.slice(open,close+1);// prototype guard for the content of this group
4940
+ var content=seg.slice(1,-1);if(!options.plainObjects&&has.call(Object.prototype,content)&&!options.allowPrototypes){return;}segments[segments.length]=seg;collected+=1;// find the next '[' after this balanced group
4941
+ open=key.indexOf('[',close+1);}if(open>=0){if(options.strictDepth===true){throw new RangeError('Input depth exceeded depth option of '+options.depth+' and strictDepth is true');}segments[segments.length]='['+key.slice(open)+']';}return segments;};var parseKeys=function parseQueryStringKeys(givenKey,val,options,valuesParsed){if(!givenKey){return;}var keys=splitKeyIntoSegments(givenKey,options);if(!keys){return;}return parseObject(keys,val,options,valuesParsed);};var normalizeParseOptions=function normalizeParseOptions(opts){if(!opts){return defaults;}if(typeof opts.allowEmptyArrays!=='undefined'&&typeof opts.allowEmptyArrays!=='boolean'){throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided');}if(typeof opts.decodeDotInKeys!=='undefined'&&typeof opts.decodeDotInKeys!=='boolean'){throw new TypeError('`decodeDotInKeys` option can only be `true` or `false`, when provided');}if(opts.decoder!==null&&typeof opts.decoder!=='undefined'&&typeof opts.decoder!=='function'){throw new TypeError('Decoder has to be a function.');}if(typeof opts.charset!=='undefined'&&opts.charset!=='utf-8'&&opts.charset!=='iso-8859-1'){throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');}if(typeof opts.throwOnLimitExceeded!=='undefined'&&typeof opts.throwOnLimitExceeded!=='boolean'){throw new TypeError('`throwOnLimitExceeded` option must be a boolean');}var charset=typeof opts.charset==='undefined'?defaults.charset:opts.charset;var duplicates=typeof opts.duplicates==='undefined'?defaults.duplicates:opts.duplicates;if(duplicates!=='combine'&&duplicates!=='first'&&duplicates!=='last'){throw new TypeError('The duplicates option must be either combine, first, or last');}var allowDots=typeof opts.allowDots==='undefined'?opts.decodeDotInKeys===true?true:defaults.allowDots:!!opts.allowDots;return{allowDots:allowDots,allowEmptyArrays:typeof opts.allowEmptyArrays==='boolean'?!!opts.allowEmptyArrays:defaults.allowEmptyArrays,allowPrototypes:typeof opts.allowPrototypes==='boolean'?opts.allowPrototypes:defaults.allowPrototypes,allowSparse:typeof opts.allowSparse==='boolean'?opts.allowSparse:defaults.allowSparse,arrayLimit:typeof opts.arrayLimit==='number'?opts.arrayLimit:defaults.arrayLimit,charset:charset,charsetSentinel:typeof opts.charsetSentinel==='boolean'?opts.charsetSentinel:defaults.charsetSentinel,comma:typeof opts.comma==='boolean'?opts.comma:defaults.comma,decodeDotInKeys:typeof opts.decodeDotInKeys==='boolean'?opts.decodeDotInKeys:defaults.decodeDotInKeys,decoder:typeof opts.decoder==='function'?opts.decoder:defaults.decoder,delimiter:typeof opts.delimiter==='string'||utils.isRegExp(opts.delimiter)?opts.delimiter:defaults.delimiter,// eslint-disable-next-line no-implicit-coercion, no-extra-parens
5085
4942
  depth:typeof opts.depth==='number'||opts.depth===false?+opts.depth:defaults.depth,duplicates:duplicates,ignoreQueryPrefix:opts.ignoreQueryPrefix===true,interpretNumericEntities:typeof opts.interpretNumericEntities==='boolean'?opts.interpretNumericEntities:defaults.interpretNumericEntities,parameterLimit:typeof opts.parameterLimit==='number'?opts.parameterLimit:defaults.parameterLimit,parseArrays:opts.parseArrays!==false,plainObjects:typeof opts.plainObjects==='boolean'?opts.plainObjects:defaults.plainObjects,strictDepth:typeof opts.strictDepth==='boolean'?!!opts.strictDepth:defaults.strictDepth,strictMerge:typeof opts.strictMerge==='boolean'?!!opts.strictMerge:defaults.strictMerge,strictNullHandling:typeof opts.strictNullHandling==='boolean'?opts.strictNullHandling:defaults.strictNullHandling,throwOnLimitExceeded:typeof opts.throwOnLimitExceeded==='boolean'?opts.throwOnLimitExceeded:false};};module.exports=function(str,opts){var options=normalizeParseOptions(opts);if(str===''||str===null||typeof str==='undefined'){return options.plainObjects?{__proto__:null}:{};}var tempObj=typeof str==='string'?parseValues(str,options):str;var obj=options.plainObjects?{__proto__:null}:{};// Iterate over the keys and setup the new object
5086
- var keys=Object.keys(tempObj);for(var i=0;i<keys.length;++i){var key=keys[i];var newObj=parseKeys(key,tempObj[key],options,typeof str==='string');obj=utils.merge(obj,newObj,options);}if(options.allowSparse===true){return obj;}return utils.compact(obj);};},{"./utils":156}],155:[function(require,module,exports){'use strict';var getSideChannel=require('side-channel');var utils=require('./utils');var formats=require('./formats');var has=Object.prototype.hasOwnProperty;var arrayPrefixGenerators={brackets:function brackets(prefix){return prefix+'[]';},comma:'comma',indices:function indices(prefix,key){return prefix+'['+key+']';},repeat:function repeat(prefix){return prefix;}};var isArray=Array.isArray;var push=Array.prototype.push;var pushToArray=function(arr,valueOrArray){push.apply(arr,isArray(valueOrArray)?valueOrArray:[valueOrArray]);};var toISO=Date.prototype.toISOString;var defaultFormat=formats['default'];var defaults={addQueryPrefix:false,allowDots:false,allowEmptyArrays:false,arrayFormat:'indices',charset:'utf-8',charsetSentinel:false,commaRoundTrip:false,delimiter:'&',encode:true,encodeDotInKeys:false,encoder:utils.encode,encodeValuesOnly:false,filter:void undefined,format:defaultFormat,formatter:formats.formatters[defaultFormat],// deprecated
4943
+ var keys=Object.keys(tempObj);for(var i=0;i<keys.length;++i){var key=keys[i];var newObj=parseKeys(key,tempObj[key],options,typeof str==='string');obj=utils.merge(obj,newObj,options);}if(options.allowSparse===true){return obj;}return utils.compact(obj);};},{"./utils":155}],154:[function(require,module,exports){'use strict';var getSideChannel=require('side-channel');var utils=require('./utils');var formats=require('./formats');var has=Object.prototype.hasOwnProperty;var arrayPrefixGenerators={brackets:function brackets(prefix){return prefix+'[]';},comma:'comma',indices:function indices(prefix,key){return prefix+'['+key+']';},repeat:function repeat(prefix){return prefix;}};var isArray=Array.isArray;var push=Array.prototype.push;var pushToArray=function(arr,valueOrArray){push.apply(arr,isArray(valueOrArray)?valueOrArray:[valueOrArray]);};var toISO=Date.prototype.toISOString;var defaultFormat=formats['default'];var defaults={addQueryPrefix:false,allowDots:false,allowEmptyArrays:false,arrayFormat:'indices',charset:'utf-8',charsetSentinel:false,commaRoundTrip:false,delimiter:'&',encode:true,encodeDotInKeys:false,encoder:utils.encode,encodeValuesOnly:false,filter:void undefined,format:defaultFormat,formatter:formats.formatters[defaultFormat],// deprecated
5087
4944
  indices:false,serializeDate:function serializeDate(date){return toISO.call(date);},skipNulls:false,strictNullHandling:false};var isNonNullishPrimitive=function isNonNullishPrimitive(v){return typeof v==='string'||typeof v==='number'||typeof v==='boolean'||typeof v==='symbol'||typeof v==='bigint';};var sentinel={};var stringify=function stringify(object,prefix,generateArrayPrefix,commaRoundTrip,allowEmptyArrays,strictNullHandling,skipNulls,encodeDotInKeys,encoder,filter,sort,allowDots,serializeDate,format,formatter,encodeValuesOnly,charset,sideChannel){var obj=object;var tmpSc=sideChannel;var step=0;var findFlag=false;while((tmpSc=tmpSc.get(sentinel))!==void undefined&&!findFlag){// Where object last appeared in the ref tree
5088
4945
  var pos=tmpSc.get(object);step+=1;if(typeof pos!=='undefined'){if(pos===step){throw new RangeError('Cyclic object value');}else{findFlag=true;// Break while
5089
- }}if(typeof tmpSc.get(sentinel)==='undefined'){step=0;}}if(typeof filter==='function'){obj=filter(prefix,obj);}else if(obj instanceof Date){obj=serializeDate(obj);}else if(generateArrayPrefix==='comma'&&isArray(obj)){obj=utils.maybeMap(obj,function(value){if(value instanceof Date){return serializeDate(value);}return value;});}if(obj===null){if(strictNullHandling){return encoder&&!encodeValuesOnly?encoder(prefix,defaults.encoder,charset,'key',format):prefix;}obj='';}if(isNonNullishPrimitive(obj)||utils.isBuffer(obj)){if(encoder){var keyValue=encodeValuesOnly?prefix:encoder(prefix,defaults.encoder,charset,'key',format);return[formatter(keyValue)+'='+formatter(encoder(obj,defaults.encoder,charset,'value',format))];}return[formatter(prefix)+'='+formatter(String(obj))];}var values=[];if(typeof obj==='undefined'){return values;}var objKeys;if(generateArrayPrefix==='comma'&&isArray(obj)){// we need to join elements in
5090
- if(encodeValuesOnly&&encoder){obj=utils.maybeMap(obj,encoder);}objKeys=[{value:obj.length>0?obj.join(',')||null:void undefined}];}else if(isArray(filter)){objKeys=filter;}else{var keys=Object.keys(obj);objKeys=sort?keys.sort(sort):keys;}var encodedPrefix=encodeDotInKeys?String(prefix).replace(/\./g,'%2E'):String(prefix);var adjustedPrefix=commaRoundTrip&&isArray(obj)&&obj.length===1?encodedPrefix+'[]':encodedPrefix;if(allowEmptyArrays&&isArray(obj)&&obj.length===0){return adjustedPrefix+'[]';}for(var j=0;j<objKeys.length;++j){var key=objKeys[j];var value=typeof key==='object'&&key&&typeof key.value!=='undefined'?key.value:obj[key];if(skipNulls&&value===null){continue;}var encodedKey=allowDots&&encodeDotInKeys?String(key).replace(/\./g,'%2E'):String(key);var keyPrefix=isArray(obj)?typeof generateArrayPrefix==='function'?generateArrayPrefix(adjustedPrefix,encodedKey):adjustedPrefix:adjustedPrefix+(allowDots?'.'+encodedKey:'['+encodedKey+']');sideChannel.set(object,step);var valueSideChannel=getSideChannel();valueSideChannel.set(sentinel,sideChannel);pushToArray(values,stringify(value,keyPrefix,generateArrayPrefix,commaRoundTrip,allowEmptyArrays,strictNullHandling,skipNulls,encodeDotInKeys,generateArrayPrefix==='comma'&&encodeValuesOnly&&isArray(obj)?null:encoder,filter,sort,allowDots,serializeDate,format,formatter,encodeValuesOnly,charset,valueSideChannel));}return values;};var normalizeStringifyOptions=function normalizeStringifyOptions(opts){if(!opts){return defaults;}if(typeof opts.allowEmptyArrays!=='undefined'&&typeof opts.allowEmptyArrays!=='boolean'){throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided');}if(typeof opts.encodeDotInKeys!=='undefined'&&typeof opts.encodeDotInKeys!=='boolean'){throw new TypeError('`encodeDotInKeys` option can only be `true` or `false`, when provided');}if(opts.encoder!==null&&typeof opts.encoder!=='undefined'&&typeof opts.encoder!=='function'){throw new TypeError('Encoder has to be a function.');}var charset=opts.charset||defaults.charset;if(typeof opts.charset!=='undefined'&&opts.charset!=='utf-8'&&opts.charset!=='iso-8859-1'){throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');}var format=formats['default'];if(typeof opts.format!=='undefined'){if(!has.call(formats.formatters,opts.format)){throw new TypeError('Unknown format option provided.');}format=opts.format;}var formatter=formats.formatters[format];var filter=defaults.filter;if(typeof opts.filter==='function'||isArray(opts.filter)){filter=opts.filter;}var arrayFormat;if(opts.arrayFormat in arrayPrefixGenerators){arrayFormat=opts.arrayFormat;}else if('indices'in opts){arrayFormat=opts.indices?'indices':'repeat';}else{arrayFormat=defaults.arrayFormat;}if('commaRoundTrip'in opts&&typeof opts.commaRoundTrip!=='boolean'){throw new TypeError('`commaRoundTrip` must be a boolean, or absent');}var allowDots=typeof opts.allowDots==='undefined'?opts.encodeDotInKeys===true?true:defaults.allowDots:!!opts.allowDots;return{addQueryPrefix:typeof opts.addQueryPrefix==='boolean'?opts.addQueryPrefix:defaults.addQueryPrefix,allowDots:allowDots,allowEmptyArrays:typeof opts.allowEmptyArrays==='boolean'?!!opts.allowEmptyArrays:defaults.allowEmptyArrays,arrayFormat:arrayFormat,charset:charset,charsetSentinel:typeof opts.charsetSentinel==='boolean'?opts.charsetSentinel:defaults.charsetSentinel,commaRoundTrip:!!opts.commaRoundTrip,delimiter:typeof opts.delimiter==='undefined'?defaults.delimiter:opts.delimiter,encode:typeof opts.encode==='boolean'?opts.encode:defaults.encode,encodeDotInKeys:typeof opts.encodeDotInKeys==='boolean'?opts.encodeDotInKeys:defaults.encodeDotInKeys,encoder:typeof opts.encoder==='function'?opts.encoder:defaults.encoder,encodeValuesOnly:typeof opts.encodeValuesOnly==='boolean'?opts.encodeValuesOnly:defaults.encodeValuesOnly,filter:filter,format:format,formatter:formatter,serializeDate:typeof opts.serializeDate==='function'?opts.serializeDate:defaults.serializeDate,skipNulls:typeof opts.skipNulls==='boolean'?opts.skipNulls:defaults.skipNulls,sort:typeof opts.sort==='function'?opts.sort:null,strictNullHandling:typeof opts.strictNullHandling==='boolean'?opts.strictNullHandling:defaults.strictNullHandling};};module.exports=function(object,opts){var obj=object;var options=normalizeStringifyOptions(opts);var objKeys;var filter;if(typeof options.filter==='function'){filter=options.filter;obj=filter('',obj);}else if(isArray(options.filter)){filter=options.filter;objKeys=filter;}var keys=[];if(typeof obj!=='object'||obj===null){return'';}var generateArrayPrefix=arrayPrefixGenerators[options.arrayFormat];var commaRoundTrip=generateArrayPrefix==='comma'&&options.commaRoundTrip;if(!objKeys){objKeys=Object.keys(obj);}if(options.sort){objKeys.sort(options.sort);}var sideChannel=getSideChannel();for(var i=0;i<objKeys.length;++i){var key=objKeys[i];var value=obj[key];if(options.skipNulls&&value===null){continue;}pushToArray(keys,stringify(value,key,generateArrayPrefix,commaRoundTrip,options.allowEmptyArrays,options.strictNullHandling,options.skipNulls,options.encodeDotInKeys,options.encode?options.encoder:null,options.filter,options.sort,options.allowDots,options.serializeDate,options.format,options.formatter,options.encodeValuesOnly,options.charset,sideChannel));}var joined=keys.join(options.delimiter);var prefix=options.addQueryPrefix===true?'?':'';if(options.charsetSentinel){if(options.charset==='iso-8859-1'){// encodeURIComponent('&#10003;'), the "numeric entity" representation of a checkmark
5091
- prefix+='utf8=%26%2310003%3B&';}else{// encodeURIComponent('✓')
5092
- prefix+='utf8=%E2%9C%93&';}}return joined.length>0?prefix+joined:'';};},{"./formats":152,"./utils":156,"side-channel":164}],156:[function(require,module,exports){'use strict';var formats=require('./formats');var getSideChannel=require('side-channel');var has=Object.prototype.hasOwnProperty;var isArray=Array.isArray;// Track objects created from arrayLimit overflow using side-channel
4946
+ }}if(typeof tmpSc.get(sentinel)==='undefined'){step=0;}}if(typeof filter==='function'){obj=filter(prefix,obj);}else if(obj instanceof Date){obj=serializeDate(obj);}else if(generateArrayPrefix==='comma'&&isArray(obj)){obj=utils.maybeMap(obj,function(value){if(value instanceof Date){return serializeDate(value);}return value;});}if(obj===null){if(strictNullHandling){return formatter(encoder&&!encodeValuesOnly?encoder(prefix,defaults.encoder,charset,'key',format):prefix);}obj='';}if(isNonNullishPrimitive(obj)||utils.isBuffer(obj)){if(encoder){var keyValue=encodeValuesOnly?prefix:encoder(prefix,defaults.encoder,charset,'key',format);return[formatter(keyValue)+'='+formatter(encoder(obj,defaults.encoder,charset,'value',format))];}return[formatter(prefix)+'='+formatter(String(obj))];}var values=[];if(typeof obj==='undefined'){return values;}var objKeys;if(generateArrayPrefix==='comma'&&isArray(obj)){// we need to join elements in
4947
+ if(encodeValuesOnly&&encoder){obj=utils.maybeMap(obj,function(v){return v==null?v:encoder(v);});}objKeys=[{value:obj.length>0?obj.join(',')||null:void undefined}];}else if(isArray(filter)){objKeys=filter;}else{var keys=Object.keys(obj);objKeys=sort?keys.sort(sort):keys;}var encodedPrefix=encodeDotInKeys?String(prefix).replace(/\./g,'%2E'):String(prefix);var adjustedPrefix=commaRoundTrip&&isArray(obj)&&obj.length===1?encodedPrefix+'[]':encodedPrefix;if(allowEmptyArrays&&isArray(obj)&&obj.length===0){return adjustedPrefix+'[]';}for(var j=0;j<objKeys.length;++j){var key=objKeys[j];var value=typeof key==='object'&&key&&typeof key.value!=='undefined'?key.value:obj[key];if(skipNulls&&value===null){continue;}var encodedKey=allowDots&&encodeDotInKeys?String(key).replace(/\./g,'%2E'):String(key);var keyPrefix=isArray(obj)?typeof generateArrayPrefix==='function'?generateArrayPrefix(adjustedPrefix,encodedKey):adjustedPrefix:adjustedPrefix+(allowDots?'.'+encodedKey:'['+encodedKey+']');sideChannel.set(object,step);var valueSideChannel=getSideChannel();valueSideChannel.set(sentinel,sideChannel);pushToArray(values,stringify(value,keyPrefix,generateArrayPrefix,commaRoundTrip,allowEmptyArrays,strictNullHandling,skipNulls,encodeDotInKeys,generateArrayPrefix==='comma'&&encodeValuesOnly&&isArray(obj)?null:encoder,filter,sort,allowDots,serializeDate,format,formatter,encodeValuesOnly,charset,valueSideChannel));}return values;};var normalizeStringifyOptions=function normalizeStringifyOptions(opts){if(!opts){return defaults;}if(typeof opts.allowEmptyArrays!=='undefined'&&typeof opts.allowEmptyArrays!=='boolean'){throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided');}if(typeof opts.encodeDotInKeys!=='undefined'&&typeof opts.encodeDotInKeys!=='boolean'){throw new TypeError('`encodeDotInKeys` option can only be `true` or `false`, when provided');}if(opts.encoder!==null&&typeof opts.encoder!=='undefined'&&typeof opts.encoder!=='function'){throw new TypeError('Encoder has to be a function.');}var charset=opts.charset||defaults.charset;if(typeof opts.charset!=='undefined'&&opts.charset!=='utf-8'&&opts.charset!=='iso-8859-1'){throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');}var format=formats['default'];if(typeof opts.format!=='undefined'){if(!has.call(formats.formatters,opts.format)){throw new TypeError('Unknown format option provided.');}format=opts.format;}var formatter=formats.formatters[format];var filter=defaults.filter;if(typeof opts.filter==='function'||isArray(opts.filter)){filter=opts.filter;}var arrayFormat;if(opts.arrayFormat in arrayPrefixGenerators){arrayFormat=opts.arrayFormat;}else if('indices'in opts){arrayFormat=opts.indices?'indices':'repeat';}else{arrayFormat=defaults.arrayFormat;}if('commaRoundTrip'in opts&&typeof opts.commaRoundTrip!=='boolean'){throw new TypeError('`commaRoundTrip` must be a boolean, or absent');}var allowDots=typeof opts.allowDots==='undefined'?opts.encodeDotInKeys===true?true:defaults.allowDots:!!opts.allowDots;return{addQueryPrefix:typeof opts.addQueryPrefix==='boolean'?opts.addQueryPrefix:defaults.addQueryPrefix,allowDots:allowDots,allowEmptyArrays:typeof opts.allowEmptyArrays==='boolean'?!!opts.allowEmptyArrays:defaults.allowEmptyArrays,arrayFormat:arrayFormat,charset:charset,charsetSentinel:typeof opts.charsetSentinel==='boolean'?opts.charsetSentinel:defaults.charsetSentinel,commaRoundTrip:!!opts.commaRoundTrip,delimiter:typeof opts.delimiter==='undefined'?defaults.delimiter:opts.delimiter,encode:typeof opts.encode==='boolean'?opts.encode:defaults.encode,encodeDotInKeys:typeof opts.encodeDotInKeys==='boolean'?opts.encodeDotInKeys:defaults.encodeDotInKeys,encoder:typeof opts.encoder==='function'?opts.encoder:defaults.encoder,encodeValuesOnly:typeof opts.encodeValuesOnly==='boolean'?opts.encodeValuesOnly:defaults.encodeValuesOnly,filter:filter,format:format,formatter:formatter,serializeDate:typeof opts.serializeDate==='function'?opts.serializeDate:defaults.serializeDate,skipNulls:typeof opts.skipNulls==='boolean'?opts.skipNulls:defaults.skipNulls,sort:typeof opts.sort==='function'?opts.sort:null,strictNullHandling:typeof opts.strictNullHandling==='boolean'?opts.strictNullHandling:defaults.strictNullHandling};};module.exports=function(object,opts){var obj=object;var options=normalizeStringifyOptions(opts);var objKeys;var filter;if(typeof options.filter==='function'){filter=options.filter;obj=filter('',obj);}else if(isArray(options.filter)){filter=options.filter;objKeys=filter;}var keys=[];if(typeof obj!=='object'||obj===null){return'';}var generateArrayPrefix=arrayPrefixGenerators[options.arrayFormat];var commaRoundTrip=generateArrayPrefix==='comma'&&options.commaRoundTrip;if(!objKeys){objKeys=Object.keys(obj);}if(options.sort){objKeys.sort(options.sort);}var sideChannel=getSideChannel();for(var i=0;i<objKeys.length;++i){var key=objKeys[i];if(typeof key==='undefined'||key===null){continue;}var value=obj[key];if(options.skipNulls&&value===null){continue;}pushToArray(keys,stringify(value,key,generateArrayPrefix,commaRoundTrip,options.allowEmptyArrays,options.strictNullHandling,options.skipNulls,options.encodeDotInKeys,options.encode?options.encoder:null,options.filter,options.sort,options.allowDots,options.serializeDate,options.format,options.formatter,options.encodeValuesOnly,options.charset,sideChannel));}var joined=keys.join(options.delimiter);var prefix=options.addQueryPrefix===true?'?':'';if(options.charsetSentinel){if(options.charset==='iso-8859-1'){// encodeURIComponent('&#10003;'), the "numeric entity" representation of a checkmark
4948
+ prefix+='utf8=%26%2310003%3B'+options.delimiter;}else{// encodeURIComponent('✓')
4949
+ prefix+='utf8=%E2%9C%93'+options.delimiter;}}return joined.length>0?prefix+joined:'';};},{"./formats":151,"./utils":155,"side-channel":163}],155:[function(require,module,exports){'use strict';var formats=require('./formats');var getSideChannel=require('side-channel');var has=Object.prototype.hasOwnProperty;var isArray=Array.isArray;// Track objects created from arrayLimit overflow using side-channel
5093
4950
  // Stores the current max numeric index for O(1) lookup
5094
4951
  var overflowChannel=getSideChannel();var markOverflow=function markOverflow(obj,maxIndex){overflowChannel.set(obj,maxIndex);return obj;};var isOverflow=function isOverflow(obj){return overflowChannel.has(obj);};var getMaxIndex=function getMaxIndex(obj){return overflowChannel.get(obj);};var setMaxIndex=function setMaxIndex(obj,maxIndex){overflowChannel.set(obj,maxIndex);};var hexTable=function(){var array=[];for(var i=0;i<256;++i){array[array.length]='%'+((i<16?'0':'')+i.toString(16)).toUpperCase();}return array;}();var compactQueue=function compactQueue(queue){while(queue.length>1){var item=queue.pop();var obj=item.obj[item.prop];if(isArray(obj)){var compacted=[];for(var j=0;j<obj.length;++j){if(typeof obj[j]!=='undefined'){compacted[compacted.length]=obj[j];}}item.obj[item.prop]=compacted;}}};var arrayToObject=function arrayToObject(source,options){var obj=options&&options.plainObjects?{__proto__:null}:{};for(var i=0;i<source.length;++i){if(typeof source[i]!=='undefined'){obj[i]=source[i];}}return obj;};var merge=function merge(target,source,options){/* eslint no-param-reassign: 0 */if(!source){return target;}if(typeof source!=='object'&&typeof source!=='function'){if(isArray(target)){var nextIndex=target.length;if(options&&typeof options.arrayLimit==='number'&&nextIndex>options.arrayLimit){return markOverflow(arrayToObject(target.concat(source),options),nextIndex);}target[nextIndex]=source;}else if(target&&typeof target==='object'){if(isOverflow(target)){// Add at next numeric index for overflow objects
5095
4952
  var newIndex=getMaxIndex(target)+1;target[newIndex]=source;setMaxIndex(target,newIndex);}else if(options&&options.strictMerge){return[target,source];}else if(options&&(options.plainObjects||options.allowPrototypes)||!has.call(Object.prototype,source)){target[source]=true;}}else{return[target,source];}return target;}if(!target||typeof target!=='object'){if(isOverflow(source)){// Create new object with target at 0, source values shifted by 1
@@ -5106,7 +4963,7 @@ if(str.length===0){return str;}var string=str;if(typeof str==='symbol'){string=S
5106
4963
  ||c>=0x61&&c<=0x7A// A-Z
5107
4964
  ||format===formats.RFC1738&&(c===0x28||c===0x29)// ( )
5108
4965
  ){arr[arr.length]=segment.charAt(i);continue;}if(c<0x80){arr[arr.length]=hexTable[c];continue;}if(c<0x800){arr[arr.length]=hexTable[0xC0|c>>6]+hexTable[0x80|c&0x3F];continue;}if(c<0xD800||c>=0xE000){arr[arr.length]=hexTable[0xE0|c>>12]+hexTable[0x80|c>>6&0x3F]+hexTable[0x80|c&0x3F];continue;}i+=1;c=0x10000+((c&0x3FF)<<10|segment.charCodeAt(i)&0x3FF);arr[arr.length]=hexTable[0xF0|c>>18]+hexTable[0x80|c>>12&0x3F]+hexTable[0x80|c>>6&0x3F]+hexTable[0x80|c&0x3F];}out+=arr.join('');}return out;};var compact=function compact(value){var queue=[{obj:{o:value},prop:'o'}];var refs=[];for(var i=0;i<queue.length;++i){var item=queue[i];var obj=item.obj[item.prop];var keys=Object.keys(obj);for(var j=0;j<keys.length;++j){var key=keys[j];var val=obj[key];if(typeof val==='object'&&val!==null&&refs.indexOf(val)===-1){queue[queue.length]={obj:obj,prop:key};refs[refs.length]=val;}}}compactQueue(queue);return value;};var isRegExp=function isRegExp(obj){return Object.prototype.toString.call(obj)==='[object RegExp]';};var isBuffer=function isBuffer(obj){if(!obj||typeof obj!=='object'){return false;}return!!(obj.constructor&&obj.constructor.isBuffer&&obj.constructor.isBuffer(obj));};var combine=function combine(a,b,arrayLimit,plainObjects){// If 'a' is already an overflow object, add to it
5109
- if(isOverflow(a)){var newIndex=getMaxIndex(a)+1;a[newIndex]=b;setMaxIndex(a,newIndex);return a;}var result=[].concat(a,b);if(result.length>arrayLimit){return markOverflow(arrayToObject(result,{plainObjects:plainObjects}),result.length-1);}return result;};var maybeMap=function maybeMap(val,fn){if(isArray(val)){var mapped=[];for(var i=0;i<val.length;i+=1){mapped[mapped.length]=fn(val[i]);}return mapped;}return fn(val);};module.exports={arrayToObject:arrayToObject,assign:assign,combine:combine,compact:compact,decode:decode,encode:encode,isBuffer:isBuffer,isOverflow:isOverflow,isRegExp:isRegExp,markOverflow:markOverflow,maybeMap:maybeMap,merge:merge};},{"./formats":152,"side-channel":164}],157:[function(require,module,exports){// Copyright Joyent, Inc. and other Node contributors.
4966
+ if(isOverflow(a)){var newIndex=getMaxIndex(a)+1;a[newIndex]=b;setMaxIndex(a,newIndex);return a;}var result=[].concat(a,b);if(result.length>arrayLimit){return markOverflow(arrayToObject(result,{plainObjects:plainObjects}),result.length-1);}return result;};var maybeMap=function maybeMap(val,fn){if(isArray(val)){var mapped=[];for(var i=0;i<val.length;i+=1){mapped[mapped.length]=fn(val[i]);}return mapped;}return fn(val);};module.exports={arrayToObject:arrayToObject,assign:assign,combine:combine,compact:compact,decode:decode,encode:encode,isBuffer:isBuffer,isOverflow:isOverflow,isRegExp:isRegExp,markOverflow:markOverflow,maybeMap:maybeMap,merge:merge};},{"./formats":151,"side-channel":163}],156:[function(require,module,exports){// Copyright Joyent, Inc. and other Node contributors.
5110
4967
  //
5111
4968
  // Permission is hereby granted, free of charge, to any person obtaining a
5112
4969
  // copy of this software and associated documentation files (the
@@ -5130,7 +4987,7 @@ if(isOverflow(a)){var newIndex=getMaxIndex(a)+1;a[newIndex]=b;setMaxIndex(a,newI
5130
4987
  // obj.hasOwnProperty(prop) will break.
5131
4988
  // See: https://github.com/joyent/node/issues/1707
5132
4989
  function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop);}module.exports=function(qs,sep,eq,options){sep=sep||'&';eq=eq||'=';var obj={};if(typeof qs!=='string'||qs.length===0){return obj;}var regexp=/\+/g;qs=qs.split(sep);var maxKeys=1000;if(options&&typeof options.maxKeys==='number'){maxKeys=options.maxKeys;}var len=qs.length;// maxKeys <= 0 means that we should not limit keys count
5133
- if(maxKeys>0&&len>maxKeys){len=maxKeys;}for(var i=0;i<len;++i){var x=qs[i].replace(regexp,'%20'),idx=x.indexOf(eq),kstr,vstr,k,v;if(idx>=0){kstr=x.substr(0,idx);vstr=x.substr(idx+1);}else{kstr=x;vstr='';}k=decodeURIComponent(kstr);v=decodeURIComponent(vstr);if(!hasOwnProperty(obj,k)){obj[k]=v;}else if(isArray(obj[k])){obj[k].push(v);}else{obj[k]=[obj[k],v];}}return obj;};var isArray=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==='[object Array]';};},{}],158:[function(require,module,exports){// Copyright Joyent, Inc. and other Node contributors.
4990
+ if(maxKeys>0&&len>maxKeys){len=maxKeys;}for(var i=0;i<len;++i){var x=qs[i].replace(regexp,'%20'),idx=x.indexOf(eq),kstr,vstr,k,v;if(idx>=0){kstr=x.substr(0,idx);vstr=x.substr(idx+1);}else{kstr=x;vstr='';}k=decodeURIComponent(kstr);v=decodeURIComponent(vstr);if(!hasOwnProperty(obj,k)){obj[k]=v;}else if(isArray(obj[k])){obj[k].push(v);}else{obj[k]=[obj[k],v];}}return obj;};var isArray=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==='[object Array]';};},{}],157:[function(require,module,exports){// Copyright Joyent, Inc. and other Node contributors.
5134
4991
  //
5135
4992
  // Permission is hereby granted, free of charge, to any person obtaining a
5136
4993
  // copy of this software and associated documentation files (the
@@ -5150,10 +5007,10 @@ if(maxKeys>0&&len>maxKeys){len=maxKeys;}for(var i=0;i<len;++i){var x=qs[i].repla
5150
5007
  // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
5151
5008
  // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
5152
5009
  // USE OR OTHER DEALINGS IN THE SOFTWARE.
5153
- 'use strict';var stringifyPrimitive=function(v){switch(typeof v){case'string':return v;case'boolean':return v?'true':'false';case'number':return isFinite(v)?v:'';default:return'';}};module.exports=function(obj,sep,eq,name){sep=sep||'&';eq=eq||'=';if(obj===null){obj=undefined;}if(typeof obj==='object'){return map(objectKeys(obj),function(k){var ks=encodeURIComponent(stringifyPrimitive(k))+eq;if(isArray(obj[k])){return map(obj[k],function(v){return ks+encodeURIComponent(stringifyPrimitive(v));}).join(sep);}else{return ks+encodeURIComponent(stringifyPrimitive(obj[k]));}}).join(sep);}if(!name)return'';return encodeURIComponent(stringifyPrimitive(name))+eq+encodeURIComponent(stringifyPrimitive(obj));};var isArray=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==='[object Array]';};function map(xs,f){if(xs.map)return xs.map(f);var res=[];for(var i=0;i<xs.length;i++){res.push(f(xs[i],i));}return res;}var objectKeys=Object.keys||function(obj){var res=[];for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))res.push(key);}return res;};},{}],159:[function(require,module,exports){'use strict';exports.decode=exports.parse=require('./decode');exports.encode=exports.stringify=require('./encode');},{"./decode":157,"./encode":158}],160:[function(require,module,exports){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *//* eslint-disable node/no-deprecated-api */var buffer=require('buffer');var Buffer=buffer.Buffer;// alternative to using Object.keys for old browsers
5010
+ 'use strict';var stringifyPrimitive=function(v){switch(typeof v){case'string':return v;case'boolean':return v?'true':'false';case'number':return isFinite(v)?v:'';default:return'';}};module.exports=function(obj,sep,eq,name){sep=sep||'&';eq=eq||'=';if(obj===null){obj=undefined;}if(typeof obj==='object'){return map(objectKeys(obj),function(k){var ks=encodeURIComponent(stringifyPrimitive(k))+eq;if(isArray(obj[k])){return map(obj[k],function(v){return ks+encodeURIComponent(stringifyPrimitive(v));}).join(sep);}else{return ks+encodeURIComponent(stringifyPrimitive(obj[k]));}}).join(sep);}if(!name)return'';return encodeURIComponent(stringifyPrimitive(name))+eq+encodeURIComponent(stringifyPrimitive(obj));};var isArray=Array.isArray||function(xs){return Object.prototype.toString.call(xs)==='[object Array]';};function map(xs,f){if(xs.map)return xs.map(f);var res=[];for(var i=0;i<xs.length;i++){res.push(f(xs[i],i));}return res;}var objectKeys=Object.keys||function(obj){var res=[];for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))res.push(key);}return res;};},{}],158:[function(require,module,exports){'use strict';exports.decode=exports.parse=require('./decode');exports.encode=exports.stringify=require('./encode');},{"./decode":156,"./encode":157}],159:[function(require,module,exports){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *//* eslint-disable node/no-deprecated-api */var buffer=require('buffer');var Buffer=buffer.Buffer;// alternative to using Object.keys for old browsers
5154
5011
  function copyProps(src,dst){for(var key in src){dst[key]=src[key];}}if(Buffer.from&&Buffer.alloc&&Buffer.allocUnsafe&&Buffer.allocUnsafeSlow){module.exports=buffer;}else{// Copy properties from require('buffer')
5155
5012
  copyProps(buffer,exports);exports.Buffer=SafeBuffer;}function SafeBuffer(arg,encodingOrOffset,length){return Buffer(arg,encodingOrOffset,length);}SafeBuffer.prototype=Object.create(Buffer.prototype);// Copy static methods from Buffer
5156
- copyProps(Buffer,SafeBuffer);SafeBuffer.from=function(arg,encodingOrOffset,length){if(typeof arg==='number'){throw new TypeError('Argument must not be a number');}return Buffer(arg,encodingOrOffset,length);};SafeBuffer.alloc=function(size,fill,encoding){if(typeof size!=='number'){throw new TypeError('Argument must be a number');}var buf=Buffer(size);if(fill!==undefined){if(typeof encoding==='string'){buf.fill(fill,encoding);}else{buf.fill(fill);}}else{buf.fill(0);}return buf;};SafeBuffer.allocUnsafe=function(size){if(typeof size!=='number'){throw new TypeError('Argument must be a number');}return Buffer(size);};SafeBuffer.allocUnsafeSlow=function(size){if(typeof size!=='number'){throw new TypeError('Argument must be a number');}return buffer.SlowBuffer(size);};},{"buffer":20}],161:[function(require,module,exports){'use strict';var inspect=require('object-inspect');var $TypeError=require('es-errors/type');/*
5013
+ copyProps(Buffer,SafeBuffer);SafeBuffer.from=function(arg,encodingOrOffset,length){if(typeof arg==='number'){throw new TypeError('Argument must not be a number');}return Buffer(arg,encodingOrOffset,length);};SafeBuffer.alloc=function(size,fill,encoding){if(typeof size!=='number'){throw new TypeError('Argument must be a number');}var buf=Buffer(size);if(fill!==undefined){if(typeof encoding==='string'){buf.fill(fill,encoding);}else{buf.fill(fill);}}else{buf.fill(0);}return buf;};SafeBuffer.allocUnsafe=function(size){if(typeof size!=='number'){throw new TypeError('Argument must be a number');}return Buffer(size);};SafeBuffer.allocUnsafeSlow=function(size){if(typeof size!=='number'){throw new TypeError('Argument must be a number');}return buffer.SlowBuffer(size);};},{"buffer":20}],160:[function(require,module,exports){'use strict';var inspect=require('object-inspect');var $TypeError=require('es-errors/type');/*
5157
5014
  * This function traverses the list returning the node corresponding to the given key.
5158
5015
  *
5159
5016
  * That node is also moved to the head of the list, so that if it's accessed again we don't need to traverse the whole list.
@@ -5165,17 +5022,16 @@ curr.next=/** @type {NonNullable<typeof list.next>} */list.next;list.next=curr;/
5165
5022
  }return curr;}}};/** @type {import('./list.d.ts').listGet} */var listGet=function(objects,key){if(!objects){return void undefined;}var node=listGetNode(objects,key);return node&&node.value;};/** @type {import('./list.d.ts').listSet} */var listSet=function(objects,key,value){var node=listGetNode(objects,key);if(node){node.value=value;}else{// Prepend the new node to the beginning of the list
5166
5023
  objects.next=/** @type {import('./list.d.ts').ListNode<typeof value, typeof key>} */{// eslint-disable-line no-param-reassign, no-extra-parens
5167
5024
  key:key,next:objects.next,value:value};}};/** @type {import('./list.d.ts').listHas} */var listHas=function(objects,key){if(!objects){return false;}return!!listGetNode(objects,key);};/** @type {import('./list.d.ts').listDelete} */// eslint-disable-next-line consistent-return
5168
- var listDelete=function(objects,key){if(objects){return listGetNode(objects,key,true);}};/** @type {import('.')} */module.exports=function getSideChannelList(){/** @typedef {ReturnType<typeof getSideChannelList>} Channel *//** @typedef {Parameters<Channel['get']>[0]} K *//** @typedef {Parameters<Channel['set']>[1]} V *//** @type {import('./list.d.ts').RootNode<V, K> | undefined} */var $o;/** @type {Channel} */var channel={assert:function(key){if(!channel.has(key)){throw new $TypeError('Side channel does not contain '+inspect(key));}},'delete':function(key){var root=$o&&$o.next;var deletedNode=listDelete($o,key);if(deletedNode&&root&&root===deletedNode){$o=void undefined;}return!!deletedNode;},get:function(key){return listGet($o,key);},has:function(key){return listHas($o,key);},set:function(key,value){if(!$o){// Initialize the linked list as an empty node, so that we don't have to special-case handling of the first node: we can always refer to it as (previous node).next, instead of something like (list).head
5025
+ var listDelete=function(objects,key){if(objects){return listGetNode(objects,key,true);}};/** @type {import('.')} */module.exports=function getSideChannelList(){/** @typedef {ReturnType<typeof getSideChannelList>} Channel *//** @typedef {Parameters<Channel['get']>[0]} K *//** @typedef {Parameters<Channel['set']>[1]} V *//** @type {import('./list.d.ts').RootNode<V, K> | undefined} */var $o;/** @type {Channel} */var channel={assert:function(key){if(!channel.has(key)){throw new $TypeError('Side channel does not contain '+inspect(key));}},'delete':function(key){var deletedNode=listDelete($o,key);if(deletedNode&&$o&&!$o.next){$o=void undefined;}return!!deletedNode;},get:function(key){return listGet($o,key);},has:function(key){return listHas($o,key);},set:function(key,value){if(!$o){// Initialize the linked list as an empty node, so that we don't have to special-case handling of the first node: we can always refer to it as (previous node).next, instead of something like (list).head
5169
5026
  $o={next:void undefined};}// eslint-disable-next-line no-extra-parens
5170
- listSet(/** @type {NonNullable<typeof $o>} */$o,key,value);}};// @ts-expect-error TODO: figure out why this is erroring
5171
- return channel;};},{"es-errors/type":47,"object-inspect":136}],162:[function(require,module,exports){'use strict';var GetIntrinsic=require('get-intrinsic');var callBound=require('call-bound');var inspect=require('object-inspect');var $TypeError=require('es-errors/type');var $Map=GetIntrinsic('%Map%',true);/** @type {<K, V>(thisArg: Map<K, V>, key: K) => V} */var $mapGet=callBound('Map.prototype.get',true);/** @type {<K, V>(thisArg: Map<K, V>, key: K, value: V) => void} */var $mapSet=callBound('Map.prototype.set',true);/** @type {<K, V>(thisArg: Map<K, V>, key: K) => boolean} */var $mapHas=callBound('Map.prototype.has',true);/** @type {<K, V>(thisArg: Map<K, V>, key: K) => boolean} */var $mapDelete=callBound('Map.prototype.delete',true);/** @type {<K, V>(thisArg: Map<K, V>) => number} */var $mapSize=callBound('Map.prototype.size',true);/** @type {import('.')} */module.exports=!!$Map&&/** @type {Exclude<import('.'), false>} */function getSideChannelMap(){/** @typedef {ReturnType<typeof getSideChannelMap>} Channel *//** @typedef {Parameters<Channel['get']>[0]} K *//** @typedef {Parameters<Channel['set']>[1]} V *//** @type {Map<K, V> | undefined} */var $m;/** @type {Channel} */var channel={assert:function(key){if(!channel.has(key)){throw new $TypeError('Side channel does not contain '+inspect(key));}},'delete':function(key){if($m){var result=$mapDelete($m,key);if($mapSize($m)===0){$m=void undefined;}return result;}return false;},get:function(key){// eslint-disable-line consistent-return
5027
+ listSet(/** @type {NonNullable<typeof $o>} */$o,key,value);}};return channel;};},{"es-errors/type":47,"object-inspect":136}],161:[function(require,module,exports){'use strict';var GetIntrinsic=require('get-intrinsic');var callBound=require('call-bound');var inspect=require('object-inspect');var $TypeError=require('es-errors/type');var $Map=GetIntrinsic('%Map%',true);/** @type {<K, V>(thisArg: Map<K, V>, key: K) => V} */var $mapGet=callBound('Map.prototype.get',true);/** @type {<K, V>(thisArg: Map<K, V>, key: K, value: V) => void} */var $mapSet=callBound('Map.prototype.set',true);/** @type {<K, V>(thisArg: Map<K, V>, key: K) => boolean} */var $mapHas=callBound('Map.prototype.has',true);/** @type {<K, V>(thisArg: Map<K, V>, key: K) => boolean} */var $mapDelete=callBound('Map.prototype.delete',true);/** @type {<K, V>(thisArg: Map<K, V>) => number} */var $mapSize=callBound('Map.prototype.size',true);/** @type {import('.')} */module.exports=!!$Map&&/** @type {Exclude<import('.'), false>} */function getSideChannelMap(){/** @typedef {ReturnType<typeof getSideChannelMap>} Channel *//** @typedef {Parameters<Channel['get']>[0]} K *//** @typedef {Parameters<Channel['set']>[1]} V *//** @type {Map<K, V> | undefined} */var $m;/** @type {Channel} */var channel={assert:function(key){if(!channel.has(key)){throw new $TypeError('Side channel does not contain '+inspect(key));}},'delete':function(key){if($m){var result=$mapDelete($m,key);if($mapSize($m)===0){$m=void undefined;}return result;}return false;},get:function(key){// eslint-disable-line consistent-return
5172
5028
  if($m){return $mapGet($m,key);}},has:function(key){if($m){return $mapHas($m,key);}return false;},set:function(key,value){if(!$m){// @ts-expect-error TS can't handle narrowing a variable inside a closure
5173
5029
  $m=new $Map();}$mapSet($m,key,value);}};// @ts-expect-error TODO: figure out why TS is erroring here
5174
- return channel;};},{"call-bound":30,"es-errors/type":47,"get-intrinsic":104,"object-inspect":136}],163:[function(require,module,exports){'use strict';var GetIntrinsic=require('get-intrinsic');var callBound=require('call-bound');var inspect=require('object-inspect');var getSideChannelMap=require('side-channel-map');var $TypeError=require('es-errors/type');var $WeakMap=GetIntrinsic('%WeakMap%',true);/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => V} */var $weakMapGet=callBound('WeakMap.prototype.get',true);/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K, value: V) => void} */var $weakMapSet=callBound('WeakMap.prototype.set',true);/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => boolean} */var $weakMapHas=callBound('WeakMap.prototype.has',true);/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => boolean} */var $weakMapDelete=callBound('WeakMap.prototype.delete',true);/** @type {import('.')} */module.exports=$WeakMap?/** @type {Exclude<import('.'), false>} */function getSideChannelWeakMap(){/** @typedef {ReturnType<typeof getSideChannelWeakMap>} Channel *//** @typedef {Parameters<Channel['get']>[0]} K *//** @typedef {Parameters<Channel['set']>[1]} V *//** @type {WeakMap<K & object, V> | undefined} */var $wm;/** @type {Channel | undefined} */var $m;/** @type {Channel} */var channel={assert:function(key){if(!channel.has(key)){throw new $TypeError('Side channel does not contain '+inspect(key));}},'delete':function(key){if($WeakMap&&key&&(typeof key==='object'||typeof key==='function')){if($wm){return $weakMapDelete($wm,key);}}else if(getSideChannelMap){if($m){return $m['delete'](key);}}return false;},get:function(key){if($WeakMap&&key&&(typeof key==='object'||typeof key==='function')){if($wm){return $weakMapGet($wm,key);}}return $m&&$m.get(key);},has:function(key){if($WeakMap&&key&&(typeof key==='object'||typeof key==='function')){if($wm){return $weakMapHas($wm,key);}}return!!$m&&$m.has(key);},set:function(key,value){if($WeakMap&&key&&(typeof key==='object'||typeof key==='function')){if(!$wm){$wm=new $WeakMap();}$weakMapSet($wm,key,value);}else if(getSideChannelMap){if(!$m){$m=getSideChannelMap();}// eslint-disable-next-line no-extra-parens
5030
+ return channel;};},{"call-bound":30,"es-errors/type":47,"get-intrinsic":104,"object-inspect":136}],162:[function(require,module,exports){'use strict';var GetIntrinsic=require('get-intrinsic');var callBound=require('call-bound');var inspect=require('object-inspect');var getSideChannelMap=require('side-channel-map');var $TypeError=require('es-errors/type');var $WeakMap=GetIntrinsic('%WeakMap%',true);/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => V} */var $weakMapGet=callBound('WeakMap.prototype.get',true);/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K, value: V) => void} */var $weakMapSet=callBound('WeakMap.prototype.set',true);/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => boolean} */var $weakMapHas=callBound('WeakMap.prototype.has',true);/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => boolean} */var $weakMapDelete=callBound('WeakMap.prototype.delete',true);/** @type {import('.')} */module.exports=$WeakMap?/** @type {Exclude<import('.'), false>} */function getSideChannelWeakMap(){/** @typedef {ReturnType<typeof getSideChannelWeakMap>} Channel *//** @typedef {Parameters<Channel['get']>[0]} K *//** @typedef {Parameters<Channel['set']>[1]} V *//** @type {WeakMap<K & object, V> | undefined} */var $wm;/** @type {Channel | undefined} */var $m;/** @type {Channel} */var channel={assert:function(key){if(!channel.has(key)){throw new $TypeError('Side channel does not contain '+inspect(key));}},'delete':function(key){if($WeakMap&&key&&(typeof key==='object'||typeof key==='function')){if($wm){return $weakMapDelete($wm,key);}}else if(getSideChannelMap){if($m){return $m['delete'](key);}}return false;},get:function(key){if($WeakMap&&key&&(typeof key==='object'||typeof key==='function')){if($wm){return $weakMapGet($wm,key);}}return $m&&$m.get(key);},has:function(key){if($WeakMap&&key&&(typeof key==='object'||typeof key==='function')){if($wm){return $weakMapHas($wm,key);}}return!!$m&&$m.has(key);},set:function(key,value){if($WeakMap&&key&&(typeof key==='object'||typeof key==='function')){if(!$wm){$wm=new $WeakMap();}$weakMapSet($wm,key,value);}else if(getSideChannelMap){if(!$m){$m=getSideChannelMap();}// eslint-disable-next-line no-extra-parens
5175
5031
  /** @type {NonNullable<typeof $m>} */$m.set(key,value);}}};// @ts-expect-error TODO: figure out why this is erroring
5176
- return channel;}:getSideChannelMap;},{"call-bound":30,"es-errors/type":47,"get-intrinsic":104,"object-inspect":136,"side-channel-map":162}],164:[function(require,module,exports){'use strict';var $TypeError=require('es-errors/type');var inspect=require('object-inspect');var getSideChannelList=require('side-channel-list');var getSideChannelMap=require('side-channel-map');var getSideChannelWeakMap=require('side-channel-weakmap');var makeChannel=getSideChannelWeakMap||getSideChannelMap||getSideChannelList;/** @type {import('.')} */module.exports=function getSideChannel(){/** @typedef {ReturnType<typeof getSideChannel>} Channel *//** @type {Channel | undefined} */var $channelData;/** @type {Channel} */var channel={assert:function(key){if(!channel.has(key)){throw new $TypeError('Side channel does not contain '+inspect(key));}},'delete':function(key){return!!$channelData&&$channelData['delete'](key);},get:function(key){return $channelData&&$channelData.get(key);},has:function(key){return!!$channelData&&$channelData.has(key);},set:function(key,value){if(!$channelData){$channelData=makeChannel();}$channelData.set(key,value);}};// @ts-expect-error TODO: figure out why this is erroring
5177
- return channel;};},{"es-errors/type":47,"object-inspect":136,"side-channel-list":161,"side-channel-map":162,"side-channel-weakmap":163}],165:[function(require,module,exports){(function(Buffer){(function(){/*! simple-concat. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */module.exports=function(stream,cb){var chunks=[];stream.on('data',function(chunk){chunks.push(chunk);});stream.once('end',function(){if(cb)cb(null,Buffer.concat(chunks));cb=null;});stream.once('error',function(err){if(cb)cb(err);cb=null;});};}).call(this);}).call(this,require("buffer").Buffer);},{"buffer":20}],166:[function(require,module,exports){(function(Buffer){(function(){/*! simple-get. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */module.exports=simpleGet;const concat=require('simple-concat');const decompressResponse=require('decompress-response');// excluded from browser build
5178
- const http=require('http');const https=require('https');const once=require('once');const querystring=require('querystring');const url=require('url');const isStream=o=>o!==null&&typeof o==='object'&&typeof o.pipe==='function';function simpleGet(opts,cb){opts=Object.assign({maxRedirects:10},typeof opts==='string'?{url:opts}:opts);cb=once(cb);if(opts.url){const{hostname,port,protocol,auth,path}=url.parse(opts.url);// eslint-disable-line node/no-deprecated-api
5032
+ return channel;}:getSideChannelMap;},{"call-bound":30,"es-errors/type":47,"get-intrinsic":104,"object-inspect":136,"side-channel-map":161}],163:[function(require,module,exports){'use strict';var $TypeError=require('es-errors/type');var inspect=require('object-inspect');var getSideChannelList=require('side-channel-list');var getSideChannelMap=require('side-channel-map');var getSideChannelWeakMap=require('side-channel-weakmap');var makeChannel=getSideChannelWeakMap||getSideChannelMap||getSideChannelList;/** @type {import('.')} */module.exports=function getSideChannel(){/** @typedef {ReturnType<typeof getSideChannel>} Channel *//** @type {Channel | undefined} */var $channelData;/** @type {Channel} */var channel={assert:function(key){if(!channel.has(key)){throw new $TypeError('Side channel does not contain '+inspect(key));}},'delete':function(key){return!!$channelData&&$channelData['delete'](key);},get:function(key){return $channelData&&$channelData.get(key);},has:function(key){return!!$channelData&&$channelData.has(key);},set:function(key,value){if(!$channelData){$channelData=makeChannel();}$channelData.set(key,value);}};// @ts-expect-error TODO: figure out why this is erroring
5033
+ return channel;};},{"es-errors/type":47,"object-inspect":136,"side-channel-list":160,"side-channel-map":161,"side-channel-weakmap":162}],164:[function(require,module,exports){(function(Buffer){(function(){/*! simple-concat. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */module.exports=function(stream,cb){var chunks=[];stream.on('data',function(chunk){chunks.push(chunk);});stream.once('end',function(){if(cb)cb(null,Buffer.concat(chunks));cb=null;});stream.once('error',function(err){if(cb)cb(err);cb=null;});};}).call(this);}).call(this,require("buffer").Buffer);},{"buffer":20}],165:[function(require,module,exports){(function(Buffer){(function(){/*! simple-get. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */module.exports=simpleGet;const concat=require('simple-concat');const decompressResponse=require('decompress-response');// excluded from browser build
5034
+ const http=require('http');const https=require('https');const once=require('once');const querystring=require('querystring');const url=require('url');const isStream=o=>o!==null&&typeof o==='object'&&typeof o.pipe==='function';function simpleGet(opts,cb){opts=Object.assign({maxRedirects:10},typeof opts==='string'?{url:opts}:opts);cb=once(cb);if(opts.url){const _url$parse=url.parse(opts.url),hostname=_url$parse.hostname,port=_url$parse.port,protocol=_url$parse.protocol,auth=_url$parse.auth,path=_url$parse.path;// eslint-disable-line node/no-deprecated-api
5179
5035
  delete opts.url;if(!hostname&&!port&&!protocol&&!auth)opts.path=path;// Relative redirect
5180
5036
  else Object.assign(opts,{hostname,port,protocol,auth,path});// Absolute redirect
5181
5037
  }const headers={'accept-encoding':'gzip, deflate'};if(opts.headers)Object.keys(opts.headers).forEach(k=>headers[k.toLowerCase()]=opts.headers[k]);opts.headers=headers;let body;if(opts.body){body=opts.json&&!isStream(opts.body)?JSON.stringify(opts.body):opts.body;}else if(opts.form){body=typeof opts.form==='string'?opts.form:querystring.stringify(opts.form);opts.headers['content-type']='application/x-www-form-urlencoded';}if(body){if(!opts.method)opts.method='POST';if(!isStream(body))opts.headers['content-length']=Buffer.byteLength(body);if(opts.json&&!opts.form)opts.headers['content-type']='application/json';}delete opts.body;delete opts.form;if(opts.json)opts.headers.accept='application/json';if(opts.method)opts.method=opts.method.toUpperCase();const originalHost=opts.hostname;// hostname before potential redirect
@@ -5186,13 +5042,13 @@ res.resume();// Discard response
5186
5042
  const redirectHost=url.parse(opts.url).hostname;// eslint-disable-line node/no-deprecated-api
5187
5043
  // If redirected host is different than original host, drop headers to prevent cookie leak (#73)
5188
5044
  if(redirectHost!==null&&redirectHost!==originalHost){delete opts.headers.cookie;delete opts.headers.authorization;}if(opts.method==='POST'&&[301,302].includes(res.statusCode)){opts.method='GET';// On 301/302 redirect, change POST to GET (see #35)
5189
- delete opts.headers['content-length'];delete opts.headers['content-type'];}if(opts.maxRedirects--===0)return cb(new Error('too many redirects'));else return simpleGet(opts,cb);}const tryUnzip=typeof decompressResponse==='function'&&opts.method!=='HEAD';cb(null,tryUnzip?decompressResponse(res):res);});req.on('timeout',()=>{req.abort();cb(new Error('Request timed out'));});req.on('error',cb);if(isStream(body))body.on('error',cb).pipe(req);else req.end(body);return req;}simpleGet.concat=(opts,cb)=>{return simpleGet(opts,(err,res)=>{if(err)return cb(err);concat(res,(err,data)=>{if(err)return cb(err);if(opts.json){try{data=JSON.parse(data.toString());}catch(err){return cb(err,res,data);}}cb(null,res,data);});});};['get','post','put','patch','head','delete'].forEach(method=>{simpleGet[method]=(opts,cb)=>{if(typeof opts==='string')opts={url:opts};return simpleGet(Object.assign({method:method.toUpperCase()},opts),cb);};});}).call(this);}).call(this,require("buffer").Buffer);},{"buffer":20,"decompress-response":18,"http":167,"https":113,"once":137,"querystring":159,"simple-concat":165,"url":188}],167:[function(require,module,exports){(function(global){(function(){var ClientRequest=require('./lib/request');var response=require('./lib/response');var extend=require('xtend');var statusCodes=require('builtin-status-codes');var url=require('url');var http=exports;http.request=function(opts,cb){if(typeof opts==='string')opts=url.parse(opts);else opts=extend(opts);// Normally, the page is loaded from http or https, so not specifying a protocol
5045
+ delete opts.headers['content-length'];delete opts.headers['content-type'];}if(opts.maxRedirects--===0)return cb(new Error('too many redirects'));else return simpleGet(opts,cb);}const tryUnzip=typeof decompressResponse==='function'&&opts.method!=='HEAD';cb(null,tryUnzip?decompressResponse(res):res);});req.on('timeout',()=>{req.abort();cb(new Error('Request timed out'));});req.on('error',cb);if(isStream(body))body.on('error',cb).pipe(req);else req.end(body);return req;}simpleGet.concat=(opts,cb)=>{return simpleGet(opts,(err,res)=>{if(err)return cb(err);concat(res,(err,data)=>{if(err)return cb(err);if(opts.json){try{data=JSON.parse(data.toString());}catch(err){return cb(err,res,data);}}cb(null,res,data);});});};['get','post','put','patch','head','delete'].forEach(method=>{simpleGet[method]=(opts,cb)=>{if(typeof opts==='string')opts={url:opts};return simpleGet(Object.assign({method:method.toUpperCase()},opts),cb);};});}).call(this);}).call(this,require("buffer").Buffer);},{"buffer":20,"decompress-response":18,"http":166,"https":113,"once":137,"querystring":158,"simple-concat":164,"url":188}],166:[function(require,module,exports){(function(global){(function(){var ClientRequest=require('./lib/request');var response=require('./lib/response');var extend=require('xtend');var statusCodes=require('builtin-status-codes');var url=require('url');var http=exports;http.request=function(opts,cb){if(typeof opts==='string')opts=url.parse(opts);else opts=extend(opts);// Normally, the page is loaded from http or https, so not specifying a protocol
5190
5046
  // will result in a (valid) protocol-relative url. However, this won't work if
5191
5047
  // the protocol is something else, like 'file:'
5192
5048
  var defaultProtocol=global.location.protocol.search(/^https?:$/)===-1?'http:':'';var protocol=opts.protocol||defaultProtocol;var host=opts.hostname||opts.host;var port=opts.port;var path=opts.path||'/';// Necessary for IPv6 addresses
5193
5049
  if(host&&host.indexOf(':')!==-1)host='['+host+']';// This may be a relative url. The browser should always be able to interpret it correctly.
5194
5050
  opts.url=(host?protocol+'//'+host:'')+(port?':'+port:'')+path;opts.method=(opts.method||'GET').toUpperCase();opts.headers=opts.headers||{};// Also valid opts.auth, opts.mode
5195
- var req=new ClientRequest(opts);if(cb)req.on('response',cb);return req;};http.get=function get(opts,cb){var req=http.request(opts,cb);req.end();return req;};http.ClientRequest=ClientRequest;http.IncomingMessage=response.IncomingMessage;http.Agent=function(){};http.Agent.defaultMaxSockets=4;http.globalAgent=new http.Agent();http.STATUS_CODES=statusCodes;http.METHODS=['CHECKOUT','CONNECT','COPY','DELETE','GET','HEAD','LOCK','M-SEARCH','MERGE','MKACTIVITY','MKCOL','MOVE','NOTIFY','OPTIONS','PATCH','POST','PROPFIND','PROPPATCH','PURGE','PUT','REPORT','SEARCH','SUBSCRIBE','TRACE','UNLOCK','UNSUBSCRIBE'];}).call(this);}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{});},{"./lib/request":169,"./lib/response":170,"builtin-status-codes":21,"url":188,"xtend":191}],168:[function(require,module,exports){(function(global){(function(){exports.fetch=isFunction(global.fetch)&&isFunction(global.ReadableStream);exports.writableStream=isFunction(global.WritableStream);exports.abortController=isFunction(global.AbortController);// The xhr request to example.com may violate some restrictive CSP configurations,
5051
+ var req=new ClientRequest(opts);if(cb)req.on('response',cb);return req;};http.get=function get(opts,cb){var req=http.request(opts,cb);req.end();return req;};http.ClientRequest=ClientRequest;http.IncomingMessage=response.IncomingMessage;http.Agent=function(){};http.Agent.defaultMaxSockets=4;http.globalAgent=new http.Agent();http.STATUS_CODES=statusCodes;http.METHODS=['CHECKOUT','CONNECT','COPY','DELETE','GET','HEAD','LOCK','M-SEARCH','MERGE','MKACTIVITY','MKCOL','MOVE','NOTIFY','OPTIONS','PATCH','POST','PROPFIND','PROPPATCH','PURGE','PUT','REPORT','SEARCH','SUBSCRIBE','TRACE','UNLOCK','UNSUBSCRIBE'];}).call(this);}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{});},{"./lib/request":168,"./lib/response":169,"builtin-status-codes":21,"url":188,"xtend":191}],167:[function(require,module,exports){(function(global){(function(){exports.fetch=isFunction(global.fetch)&&isFunction(global.ReadableStream);exports.writableStream=isFunction(global.WritableStream);exports.abortController=isFunction(global.AbortController);// The xhr request to example.com may violate some restrictive CSP configurations,
5196
5052
  // so if we're running in a browser that supports `fetch`, avoid calling getXHR()
5197
5053
  // and assume support for certain features below.
5198
5054
  var xhr;function getXHR(){// Cache the xhr value
@@ -5207,7 +5063,7 @@ exports.arraybuffer=exports.fetch||checkTypeSupport('arraybuffer');// These next
5207
5063
  exports.msstream=!exports.fetch&&checkTypeSupport('ms-stream');exports.mozchunkedarraybuffer=!exports.fetch&&checkTypeSupport('moz-chunked-arraybuffer');// If fetch is supported, then overrideMimeType will be supported too. Skip calling
5208
5064
  // getXHR().
5209
5065
  exports.overrideMimeType=exports.fetch||(getXHR()?isFunction(getXHR().overrideMimeType):false);function isFunction(value){return typeof value==='function';}xhr=null;// Help gc
5210
- }).call(this);}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{});},{}],169:[function(require,module,exports){(function(process,global,Buffer){(function(){var capability=require('./capability');var inherits=require('inherits');var response=require('./response');var stream=require('readable-stream');var IncomingMessage=response.IncomingMessage;var rStates=response.readyStates;function decideMode(preferBinary,useFetch){if(capability.fetch&&useFetch){return'fetch';}else if(capability.mozchunkedarraybuffer){return'moz-chunked-arraybuffer';}else if(capability.msstream){return'ms-stream';}else if(capability.arraybuffer&&preferBinary){return'arraybuffer';}else{return'text';}}var ClientRequest=module.exports=function(opts){var self=this;stream.Writable.call(self);self._opts=opts;self._body=[];self._headers={};if(opts.auth)self.setHeader('Authorization','Basic '+Buffer.from(opts.auth).toString('base64'));Object.keys(opts.headers).forEach(function(name){self.setHeader(name,opts.headers[name]);});var preferBinary;var useFetch=true;if(opts.mode==='disable-fetch'||'requestTimeout'in opts&&!capability.abortController){// If the use of XHR should be preferred. Not typically needed.
5066
+ }).call(this);}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{});},{}],168:[function(require,module,exports){(function(process,global,Buffer){(function(){var capability=require('./capability');var inherits=require('inherits');var response=require('./response');var stream=require('readable-stream');var IncomingMessage=response.IncomingMessage;var rStates=response.readyStates;function decideMode(preferBinary,useFetch){if(capability.fetch&&useFetch){return'fetch';}else if(capability.mozchunkedarraybuffer){return'moz-chunked-arraybuffer';}else if(capability.msstream){return'ms-stream';}else if(capability.arraybuffer&&preferBinary){return'arraybuffer';}else{return'text';}}var ClientRequest=module.exports=function(opts){var self=this;stream.Writable.call(self);self._opts=opts;self._body=[];self._headers={};if(opts.auth)self.setHeader('Authorization','Basic '+Buffer.from(opts.auth).toString('base64'));Object.keys(opts.headers).forEach(function(name){self.setHeader(name,opts.headers[name]);});var preferBinary;var useFetch=true;if(opts.mode==='disable-fetch'||'requestTimeout'in opts&&!capability.abortController){// If the use of XHR should be preferred. Not typically needed.
5211
5067
  useFetch=false;preferBinary=true;}else if(opts.mode==='prefer-streaming'){// If streaming is a high priority but binary compatibility and
5212
5068
  // the accuracy of the 'content-type' header aren't
5213
5069
  preferBinary=false;}else if(opts.mode==='allow-wrong-content-type'){// If streaming is more important than preserving the 'content-type' header
@@ -5224,7 +5080,7 @@ if(self._mode==='moz-chunked-arraybuffer'){xhr.onprogress=function(){self._onXHR
5224
5080
  * Even though the spec says it should be available in readyState 3,
5225
5081
  * accessing it throws an exception in IE8
5226
5082
  */function statusValid(xhr){try{var status=xhr.status;return status!==null&&status!==0;}catch(e){return false;}}ClientRequest.prototype._onXHRProgress=function(){var self=this;self._resetTimers(false);if(!statusValid(self._xhr)||self._destroyed)return;if(!self._response)self._connect();self._response._onXHRProgress(self._resetTimers.bind(self));};ClientRequest.prototype._connect=function(){var self=this;if(self._destroyed)return;self._response=new IncomingMessage(self._xhr,self._fetchResponse,self._mode,self._resetTimers.bind(self));self._response.on('error',function(err){self.emit('error',err);});self.emit('response',self._response);};ClientRequest.prototype._write=function(chunk,encoding,cb){var self=this;self._body.push(chunk);cb();};ClientRequest.prototype._resetTimers=function(done){var self=this;global.clearTimeout(self._socketTimer);self._socketTimer=null;if(done){global.clearTimeout(self._fetchTimer);self._fetchTimer=null;}else if(self._socketTimeout){self._socketTimer=global.setTimeout(function(){self.emit('timeout');},self._socketTimeout);}};ClientRequest.prototype.abort=ClientRequest.prototype.destroy=function(err){var self=this;self._destroyed=true;self._resetTimers(true);if(self._response)self._response._destroyed=true;if(self._xhr)self._xhr.abort();else if(self._fetchAbortController)self._fetchAbortController.abort();if(err)self.emit('error',err);};ClientRequest.prototype.end=function(data,encoding,cb){var self=this;if(typeof data==='function'){cb=data;data=undefined;}stream.Writable.prototype.end.call(self,data,encoding,cb);};ClientRequest.prototype.setTimeout=function(timeout,cb){var self=this;if(cb)self.once('timeout',cb);self._socketTimeout=timeout;self._resetTimers(false);};ClientRequest.prototype.flushHeaders=function(){};ClientRequest.prototype.setNoDelay=function(){};ClientRequest.prototype.setSocketKeepAlive=function(){};// Taken from http://www.w3.org/TR/XMLHttpRequest/#the-setrequestheader%28%29-method
5227
- var unsafeHeaders=['accept-charset','accept-encoding','access-control-request-headers','access-control-request-method','connection','content-length','cookie','cookie2','date','dnt','expect','host','keep-alive','origin','referer','te','trailer','transfer-encoding','upgrade','via'];}).call(this);}).call(this,require('_process'),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{},require("buffer").Buffer);},{"./capability":168,"./response":170,"_process":150,"buffer":20,"inherits":115,"readable-stream":185}],170:[function(require,module,exports){(function(process,global,Buffer){(function(){var capability=require('./capability');var inherits=require('inherits');var stream=require('readable-stream');var rStates=exports.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4};var IncomingMessage=exports.IncomingMessage=function(xhr,response,mode,resetTimers){var self=this;stream.Readable.call(self);self._mode=mode;self.headers={};self.rawHeaders=[];self.trailers={};self.rawTrailers=[];// Fake the 'close' event, but only once 'end' fires
5083
+ var unsafeHeaders=['accept-charset','accept-encoding','access-control-request-headers','access-control-request-method','connection','content-length','cookie','cookie2','date','dnt','expect','host','keep-alive','origin','referer','te','trailer','transfer-encoding','upgrade','via'];}).call(this);}).call(this,require('_process'),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{},require("buffer").Buffer);},{"./capability":167,"./response":169,"_process":150,"buffer":20,"inherits":115,"readable-stream":184}],169:[function(require,module,exports){(function(process,global,Buffer){(function(){var capability=require('./capability');var inherits=require('inherits');var stream=require('readable-stream');var rStates=exports.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4};var IncomingMessage=exports.IncomingMessage=function(xhr,response,mode,resetTimers){var self=this;stream.Readable.call(self);self._mode=mode;self.headers={};self.rawHeaders=[];self.trailers={};self.rawTrailers=[];// Fake the 'close' event, but only once 'end' fires
5228
5084
  self.on('end',function(){// The nextTick is necessary to prevent the 'request' module from causing an infinite loop
5229
5085
  process.nextTick(function(){self.emit('close');});});if(mode==='fetch'){self._fetchResponse=response;self.url=response.url;self.statusCode=response.status;self.statusMessage=response.statusText;response.headers.forEach(function(header,key){self.headers[key.toLowerCase()]=header;self.rawHeaders.push(key,header);});if(capability.writableStream){var writable=new WritableStream({write:function(chunk){resetTimers(false);return new Promise(function(resolve,reject){if(self._destroyed){reject();}else if(self.push(Buffer.from(chunk))){resolve();}else{self._resumeFetch=resolve;}});},close:function(){resetTimers(true);if(!self._destroyed)self.push(null);},abort:function(err){resetTimers(true);if(!self._destroyed)self.emit('error',err);}});try{response.body.pipeTo(writable).catch(function(err){resetTimers(true);if(!self._destroyed)self.emit('error',err);});return;}catch(e){}// pipeTo method isn't defined. Can't find a better way to feature test this
5230
5086
  }// fallback for when writableStream or pipeTo aren't available
@@ -5232,13 +5088,13 @@ var reader=response.body.getReader();function read(){reader.read().then(function
5232
5088
  }}};inherits(IncomingMessage,stream.Readable);IncomingMessage.prototype._read=function(){var self=this;var resolve=self._resumeFetch;if(resolve){self._resumeFetch=null;resolve();}};IncomingMessage.prototype._onXHRProgress=function(resetTimers){var self=this;var xhr=self._xhr;var response=null;switch(self._mode){case'text':response=xhr.responseText;if(response.length>self._pos){var newData=response.substr(self._pos);if(self._charset==='x-user-defined'){var buffer=Buffer.alloc(newData.length);for(var i=0;i<newData.length;i++)buffer[i]=newData.charCodeAt(i)&0xff;self.push(buffer);}else{self.push(newData,self._charset);}self._pos=response.length;}break;case'arraybuffer':if(xhr.readyState!==rStates.DONE||!xhr.response)break;response=xhr.response;self.push(Buffer.from(new Uint8Array(response)));break;case'moz-chunked-arraybuffer':// take whole
5233
5089
  response=xhr.response;if(xhr.readyState!==rStates.LOADING||!response)break;self.push(Buffer.from(new Uint8Array(response)));break;case'ms-stream':response=xhr.response;if(xhr.readyState!==rStates.LOADING)break;var reader=new global.MSStreamReader();reader.onprogress=function(){if(reader.result.byteLength>self._pos){self.push(Buffer.from(new Uint8Array(reader.result.slice(self._pos))));self._pos=reader.result.byteLength;}};reader.onload=function(){resetTimers(true);self.push(null);};// reader.onerror = ??? // TODO: this
5234
5090
  reader.readAsArrayBuffer(response);break;}// The ms-stream case handles end separately in reader.onload()
5235
- if(self._xhr.readyState===rStates.DONE&&self._mode!=='ms-stream'){resetTimers(true);self.push(null);}};}).call(this);}).call(this,require('_process'),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{},require("buffer").Buffer);},{"./capability":168,"_process":150,"buffer":20,"inherits":115,"readable-stream":185}],171:[function(require,module,exports){'use strict';function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype);subClass.prototype.constructor=subClass;subClass.__proto__=superClass;}var codes={};function createErrorType(code,message,Base){if(!Base){Base=Error;}function getMessage(arg1,arg2,arg3){if(typeof message==='string'){return message;}else{return message(arg1,arg2,arg3);}}var NodeError=/*#__PURE__*/function(_Base){_inheritsLoose(NodeError,_Base);function NodeError(arg1,arg2,arg3){return _Base.call(this,getMessage(arg1,arg2,arg3))||this;}return NodeError;}(Base);NodeError.prototype.name=Base.name;NodeError.prototype.code=code;codes[code]=NodeError;}// https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js
5091
+ if(self._xhr.readyState===rStates.DONE&&self._mode!=='ms-stream'){resetTimers(true);self.push(null);}};}).call(this);}).call(this,require('_process'),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{},require("buffer").Buffer);},{"./capability":167,"_process":150,"buffer":20,"inherits":115,"readable-stream":184}],170:[function(require,module,exports){'use strict';function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype);subClass.prototype.constructor=subClass;subClass.__proto__=superClass;}var codes={};function createErrorType(code,message,Base){if(!Base){Base=Error;}function getMessage(arg1,arg2,arg3){if(typeof message==='string'){return message;}else{return message(arg1,arg2,arg3);}}var NodeError=/*#__PURE__*/function(_Base){_inheritsLoose(NodeError,_Base);function NodeError(arg1,arg2,arg3){return _Base.call(this,getMessage(arg1,arg2,arg3))||this;}return NodeError;}(Base);NodeError.prototype.name=Base.name;NodeError.prototype.code=code;codes[code]=NodeError;}// https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js
5236
5092
  function oneOf(expected,thing){if(Array.isArray(expected)){var len=expected.length;expected=expected.map(function(i){return String(i);});if(len>2){return"one of ".concat(thing," ").concat(expected.slice(0,len-1).join(', '),", or ")+expected[len-1];}else if(len===2){return"one of ".concat(thing," ").concat(expected[0]," or ").concat(expected[1]);}else{return"of ".concat(thing," ").concat(expected[0]);}}else{return"of ".concat(thing," ").concat(String(expected));}}// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith
5237
5093
  function startsWith(str,search,pos){return str.substr(!pos||pos<0?0:+pos,search.length)===search;}// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith
5238
5094
  function endsWith(str,search,this_len){if(this_len===undefined||this_len>str.length){this_len=str.length;}return str.substring(this_len-search.length,this_len)===search;}// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes
5239
5095
  function includes(str,search,start){if(typeof start!=='number'){start=0;}if(start+search.length>str.length){return false;}else{return str.indexOf(search,start)!==-1;}}createErrorType('ERR_INVALID_OPT_VALUE',function(name,value){return'The value "'+value+'" is invalid for option "'+name+'"';},TypeError);createErrorType('ERR_INVALID_ARG_TYPE',function(name,expected,actual){// determiner: 'must be' or 'must not be'
5240
5096
  var determiner;if(typeof expected==='string'&&startsWith(expected,'not ')){determiner='must not be';expected=expected.replace(/^not /,'');}else{determiner='must be';}var msg;if(endsWith(name,' argument')){// For cases like 'first argument'
5241
- msg="The ".concat(name," ").concat(determiner," ").concat(oneOf(expected,'type'));}else{var type=includes(name,'.')?'property':'argument';msg="The \"".concat(name,"\" ").concat(type," ").concat(determiner," ").concat(oneOf(expected,'type'));}msg+=". Received type ".concat(typeof actual);return msg;},TypeError);createErrorType('ERR_STREAM_PUSH_AFTER_EOF','stream.push() after EOF');createErrorType('ERR_METHOD_NOT_IMPLEMENTED',function(name){return'The '+name+' method is not implemented';});createErrorType('ERR_STREAM_PREMATURE_CLOSE','Premature close');createErrorType('ERR_STREAM_DESTROYED',function(name){return'Cannot call '+name+' after a stream was destroyed';});createErrorType('ERR_MULTIPLE_CALLBACK','Callback called multiple times');createErrorType('ERR_STREAM_CANNOT_PIPE','Cannot pipe, not readable');createErrorType('ERR_STREAM_WRITE_AFTER_END','write after end');createErrorType('ERR_STREAM_NULL_VALUES','May not write null values to stream',TypeError);createErrorType('ERR_UNKNOWN_ENCODING',function(arg){return'Unknown encoding: '+arg;},TypeError);createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT','stream.unshift() after end event');module.exports.codes=codes;},{}],172:[function(require,module,exports){(function(process){(function(){// Copyright Joyent, Inc. and other Node contributors.
5097
+ msg="The ".concat(name," ").concat(determiner," ").concat(oneOf(expected,'type'));}else{var type=includes(name,'.')?'property':'argument';msg="The \"".concat(name,"\" ").concat(type," ").concat(determiner," ").concat(oneOf(expected,'type'));}msg+=". Received type ".concat(typeof actual);return msg;},TypeError);createErrorType('ERR_STREAM_PUSH_AFTER_EOF','stream.push() after EOF');createErrorType('ERR_METHOD_NOT_IMPLEMENTED',function(name){return'The '+name+' method is not implemented';});createErrorType('ERR_STREAM_PREMATURE_CLOSE','Premature close');createErrorType('ERR_STREAM_DESTROYED',function(name){return'Cannot call '+name+' after a stream was destroyed';});createErrorType('ERR_MULTIPLE_CALLBACK','Callback called multiple times');createErrorType('ERR_STREAM_CANNOT_PIPE','Cannot pipe, not readable');createErrorType('ERR_STREAM_WRITE_AFTER_END','write after end');createErrorType('ERR_STREAM_NULL_VALUES','May not write null values to stream',TypeError);createErrorType('ERR_UNKNOWN_ENCODING',function(arg){return'Unknown encoding: '+arg;},TypeError);createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT','stream.unshift() after end event');module.exports.codes=codes;},{}],171:[function(require,module,exports){(function(process){(function(){// Copyright Joyent, Inc. and other Node contributors.
5242
5098
  //
5243
5099
  // Permission is hereby granted, free of charge, to any person obtaining a
5244
5100
  // copy of this software and associated documentation files (the
@@ -5283,7 +5139,7 @@ enumerable:false,get:function get(){if(this._readableState===undefined||this._wr
5283
5139
  // has not been initialized yet
5284
5140
  if(this._readableState===undefined||this._writableState===undefined){return;}// backward compatibility, the user is explicitly
5285
5141
  // managing destroyed
5286
- this._readableState.destroyed=value;this._writableState.destroyed=value;}});}).call(this);}).call(this,require('_process'));},{"./_stream_readable":174,"./_stream_writable":176,"_process":150,"inherits":115}],173:[function(require,module,exports){// Copyright Joyent, Inc. and other Node contributors.
5142
+ this._readableState.destroyed=value;this._writableState.destroyed=value;}});}).call(this);}).call(this,require('_process'));},{"./_stream_readable":173,"./_stream_writable":175,"_process":150,"inherits":115}],172:[function(require,module,exports){// Copyright Joyent, Inc. and other Node contributors.
5287
5143
  //
5288
5144
  // Permission is hereby granted, free of charge, to any person obtaining a
5289
5145
  // copy of this software and associated documentation files (the
@@ -5306,7 +5162,7 @@ this._readableState.destroyed=value;this._writableState.destroyed=value;}});}).c
5306
5162
  // a passthrough stream.
5307
5163
  // basically just the most minimal sort of Transform stream.
5308
5164
  // Every written chunk gets output as-is.
5309
- 'use strict';module.exports=PassThrough;var Transform=require('./_stream_transform');require('inherits')(PassThrough,Transform);function PassThrough(options){if(!(this instanceof PassThrough))return new PassThrough(options);Transform.call(this,options);}PassThrough.prototype._transform=function(chunk,encoding,cb){cb(null,chunk);};},{"./_stream_transform":175,"inherits":115}],174:[function(require,module,exports){(function(process,global){(function(){// Copyright Joyent, Inc. and other Node contributors.
5165
+ 'use strict';module.exports=PassThrough;var Transform=require('./_stream_transform');require('inherits')(PassThrough,Transform);function PassThrough(options){if(!(this instanceof PassThrough))return new PassThrough(options);Transform.call(this,options);}PassThrough.prototype._transform=function(chunk,encoding,cb){cb(null,chunk);};},{"./_stream_transform":174,"inherits":115}],173:[function(require,module,exports){(function(process,global){(function(){// Copyright Joyent, Inc. and other Node contributors.
5310
5166
  //
5311
5167
  // Permission is hereby granted, free of charge, to any person obtaining a
5312
5168
  // copy of this software and associated documentation files (the
@@ -5558,7 +5414,7 @@ if(state.decoder)ret=state.buffer.join('');else if(state.buffer.length===1)ret=s
5558
5414
  ret=state.buffer.consume(n,state.decoder);}return ret;}function endReadable(stream){var state=stream._readableState;debug('endReadable',state.endEmitted);if(!state.endEmitted){state.ended=true;process.nextTick(endReadableNT,state,stream);}}function endReadableNT(state,stream){debug('endReadableNT',state.endEmitted,state.length);// Check that we didn't get one last unshift.
5559
5415
  if(!state.endEmitted&&state.length===0){state.endEmitted=true;stream.readable=false;stream.emit('end');if(state.autoDestroy){// In case of duplex streams we need a way to detect
5560
5416
  // if the writable side is ready for autoDestroy as well
5561
- var wState=stream._writableState;if(!wState||wState.autoDestroy&&wState.finished){stream.destroy();}}}}if(typeof Symbol==='function'){Readable.from=function(iterable,opts){if(from===undefined){from=require('./internal/streams/from');}return from(Readable,iterable,opts);};}function indexOf(xs,x){for(var i=0,l=xs.length;i<l;i++){if(xs[i]===x)return i;}return-1;}}).call(this);}).call(this,require('_process'),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{});},{"../errors":171,"./_stream_duplex":172,"./internal/streams/async_iterator":177,"./internal/streams/buffer_list":178,"./internal/streams/destroy":179,"./internal/streams/from":181,"./internal/streams/state":183,"./internal/streams/stream":184,"_process":150,"buffer":20,"events":50,"inherits":115,"string_decoder/":186,"util":18}],175:[function(require,module,exports){// Copyright Joyent, Inc. and other Node contributors.
5417
+ var wState=stream._writableState;if(!wState||wState.autoDestroy&&wState.finished){stream.destroy();}}}}if(typeof Symbol==='function'){Readable.from=function(iterable,opts){if(from===undefined){from=require('./internal/streams/from');}return from(Readable,iterable,opts);};}function indexOf(xs,x){for(var i=0,l=xs.length;i<l;i++){if(xs[i]===x)return i;}return-1;}}).call(this);}).call(this,require('_process'),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{});},{"../errors":170,"./_stream_duplex":171,"./internal/streams/async_iterator":176,"./internal/streams/buffer_list":177,"./internal/streams/destroy":178,"./internal/streams/from":180,"./internal/streams/state":182,"./internal/streams/stream":183,"_process":150,"buffer":20,"events":50,"inherits":115,"string_decoder/":185,"util":18}],174:[function(require,module,exports){// Copyright Joyent, Inc. and other Node contributors.
5562
5418
  //
5563
5419
  // Permission is hereby granted, free of charge, to any person obtaining a
5564
5420
  // copy of this software and associated documentation files (the
@@ -5644,7 +5500,7 @@ ts.needTransform=true;}};Transform.prototype._destroy=function(err,cb){Duplex.pr
5644
5500
  stream.push(data);// TODO(BridgeAR): Write a test for these two error cases
5645
5501
  // if there's nothing in the write buffer, then that means
5646
5502
  // that nothing more will ever be provided
5647
- if(stream._writableState.length)throw new ERR_TRANSFORM_WITH_LENGTH_0();if(stream._transformState.transforming)throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();return stream.push(null);}},{"../errors":171,"./_stream_duplex":172,"inherits":115}],176:[function(require,module,exports){(function(process,global){(function(){// Copyright Joyent, Inc. and other Node contributors.
5503
+ if(stream._writableState.length)throw new ERR_TRANSFORM_WITH_LENGTH_0();if(stream._transformState.transforming)throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();return stream.push(null);}},{"../errors":170,"./_stream_duplex":171,"inherits":115}],175:[function(require,module,exports){(function(process,global){(function(){// Copyright Joyent, Inc. and other Node contributors.
5648
5504
  //
5649
5505
  // Permission is hereby granted, free of charge, to any person obtaining a
5650
5506
  // copy of this software and associated documentation files (the
@@ -5779,7 +5635,7 @@ enumerable:false,get:function get(){if(this._writableState===undefined){return f
5779
5635
  // has not been initialized yet
5780
5636
  if(!this._writableState){return;}// backward compatibility, the user is explicitly
5781
5637
  // managing destroyed
5782
- this._writableState.destroyed=value;}});Writable.prototype.destroy=destroyImpl.destroy;Writable.prototype._undestroy=destroyImpl.undestroy;Writable.prototype._destroy=function(err,cb){cb(err);};}).call(this);}).call(this,require('_process'),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{});},{"../errors":171,"./_stream_duplex":172,"./internal/streams/destroy":179,"./internal/streams/state":183,"./internal/streams/stream":184,"_process":150,"buffer":20,"inherits":115,"util-deprecate":189}],177:[function(require,module,exports){(function(process){(function(){'use strict';var _Object$setPrototypeO;function _defineProperty(obj,key,value){key=_toPropertyKey(key);if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return typeof key==="symbol"?key:String(key);}function _toPrimitive(input,hint){if(typeof input!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==undefined){var res=prim.call(input,hint||"default");if(typeof res!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.");}return(hint==="string"?String:Number)(input);}var finished=require('./end-of-stream');var kLastResolve=Symbol('lastResolve');var kLastReject=Symbol('lastReject');var kError=Symbol('error');var kEnded=Symbol('ended');var kLastPromise=Symbol('lastPromise');var kHandlePromise=Symbol('handlePromise');var kStream=Symbol('stream');function createIterResult(value,done){return{value:value,done:done};}function readAndResolve(iter){var resolve=iter[kLastResolve];if(resolve!==null){var data=iter[kStream].read();// we defer if data is null
5638
+ this._writableState.destroyed=value;}});Writable.prototype.destroy=destroyImpl.destroy;Writable.prototype._undestroy=destroyImpl.undestroy;Writable.prototype._destroy=function(err,cb){cb(err);};}).call(this);}).call(this,require('_process'),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{});},{"../errors":170,"./_stream_duplex":171,"./internal/streams/destroy":178,"./internal/streams/state":182,"./internal/streams/stream":183,"_process":150,"buffer":20,"inherits":115,"util-deprecate":189}],176:[function(require,module,exports){(function(process){(function(){'use strict';var _Object$setPrototypeO;function _defineProperty(obj,key,value){key=_toPropertyKey(key);if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return typeof key==="symbol"?key:String(key);}function _toPrimitive(input,hint){if(typeof input!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==undefined){var res=prim.call(input,hint||"default");if(typeof res!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.");}return(hint==="string"?String:Number)(input);}var finished=require('./end-of-stream');var kLastResolve=Symbol('lastResolve');var kLastReject=Symbol('lastReject');var kError=Symbol('error');var kEnded=Symbol('ended');var kLastPromise=Symbol('lastPromise');var kHandlePromise=Symbol('handlePromise');var kStream=Symbol('stream');function createIterResult(value,done){return{value:value,done:done};}function readAndResolve(iter){var resolve=iter[kLastResolve];if(resolve!==null){var data=iter[kStream].read();// we defer if data is null
5783
5639
  // we can be expecting either 'end' or
5784
5640
  // 'error'
5785
5641
  if(data!==null){iter[kLastPromise]=null;iter[kLastResolve]=null;iter[kLastReject]=null;resolve(createIterResult(data,false));}}}function onReadable(iter){// we wait for the next tick, because it might
@@ -5801,7 +5657,7 @@ var data=this[kStream].read();if(data!==null){return Promise.resolve(createIterR
5801
5657
  // Readable class this is attached to
5802
5658
  return new Promise(function(resolve,reject){_this2[kStream].destroy(null,function(err){if(err){reject(err);return;}resolve(createIterResult(undefined,true));});});}),_Object$setPrototypeO),AsyncIteratorPrototype);var createReadableStreamAsyncIterator=function createReadableStreamAsyncIterator(stream){var _Object$create;var iterator=Object.create(ReadableStreamAsyncIteratorPrototype,(_Object$create={},_defineProperty(_Object$create,kStream,{value:stream,writable:true}),_defineProperty(_Object$create,kLastResolve,{value:null,writable:true}),_defineProperty(_Object$create,kLastReject,{value:null,writable:true}),_defineProperty(_Object$create,kError,{value:null,writable:true}),_defineProperty(_Object$create,kEnded,{value:stream._readableState.endEmitted,writable:true}),_defineProperty(_Object$create,kHandlePromise,{value:function value(resolve,reject){var data=iterator[kStream].read();if(data){iterator[kLastPromise]=null;iterator[kLastResolve]=null;iterator[kLastReject]=null;resolve(createIterResult(data,false));}else{iterator[kLastResolve]=resolve;iterator[kLastReject]=reject;}},writable:true}),_Object$create));iterator[kLastPromise]=null;finished(stream,function(err){if(err&&err.code!=='ERR_STREAM_PREMATURE_CLOSE'){var reject=iterator[kLastReject];// reject if we are waiting for data in the Promise
5803
5659
  // returned by next() and store the error
5804
- if(reject!==null){iterator[kLastPromise]=null;iterator[kLastResolve]=null;iterator[kLastReject]=null;reject(err);}iterator[kError]=err;return;}var resolve=iterator[kLastResolve];if(resolve!==null){iterator[kLastPromise]=null;iterator[kLastResolve]=null;iterator[kLastReject]=null;resolve(createIterResult(undefined,true));}iterator[kEnded]=true;});stream.on('readable',onReadable.bind(null,iterator));return iterator;};module.exports=createReadableStreamAsyncIterator;}).call(this);}).call(this,require('_process'));},{"./end-of-stream":180,"_process":150}],178:[function(require,module,exports){'use strict';function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;})),keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source[key]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}return target;}function _defineProperty(obj,key,value){key=_toPropertyKey(key);if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return typeof key==="symbol"?key:String(key);}function _toPrimitive(input,hint){if(typeof input!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==undefined){var res=prim.call(input,hint||"default");if(typeof res!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.");}return(hint==="string"?String:Number)(input);}var _require=require('buffer'),Buffer=_require.Buffer;var _require2=require('util'),inspect=_require2.inspect;var custom=inspect&&inspect.custom||'inspect';function copyBuffer(src,target,offset){Buffer.prototype.copy.call(src,target,offset);}module.exports=/*#__PURE__*/function(){function BufferList(){_classCallCheck(this,BufferList);this.head=null;this.tail=null;this.length=0;}_createClass(BufferList,[{key:"push",value:function push(v){var entry={data:v,next:null};if(this.length>0)this.tail.next=entry;else this.head=entry;this.tail=entry;++this.length;}},{key:"unshift",value:function unshift(v){var entry={data:v,next:this.head};if(this.length===0)this.tail=entry;this.head=entry;++this.length;}},{key:"shift",value:function shift(){if(this.length===0)return;var ret=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return ret;}},{key:"clear",value:function clear(){this.head=this.tail=null;this.length=0;}},{key:"join",value:function join(s){if(this.length===0)return'';var p=this.head;var ret=''+p.data;while(p=p.next)ret+=s+p.data;return ret;}},{key:"concat",value:function concat(n){if(this.length===0)return Buffer.alloc(0);var ret=Buffer.allocUnsafe(n>>>0);var p=this.head;var i=0;while(p){copyBuffer(p.data,ret,i);i+=p.data.length;p=p.next;}return ret;}// Consumes a specified amount of bytes or characters from the buffered data.
5660
+ if(reject!==null){iterator[kLastPromise]=null;iterator[kLastResolve]=null;iterator[kLastReject]=null;reject(err);}iterator[kError]=err;return;}var resolve=iterator[kLastResolve];if(resolve!==null){iterator[kLastPromise]=null;iterator[kLastResolve]=null;iterator[kLastReject]=null;resolve(createIterResult(undefined,true));}iterator[kEnded]=true;});stream.on('readable',onReadable.bind(null,iterator));return iterator;};module.exports=createReadableStreamAsyncIterator;}).call(this);}).call(this,require('_process'));},{"./end-of-stream":179,"_process":150}],177:[function(require,module,exports){'use strict';function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;})),keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source[key]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}return target;}function _defineProperty(obj,key,value){key=_toPropertyKey(key);if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return typeof key==="symbol"?key:String(key);}function _toPrimitive(input,hint){if(typeof input!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==undefined){var res=prim.call(input,hint||"default");if(typeof res!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.");}return(hint==="string"?String:Number)(input);}var _require=require('buffer'),Buffer=_require.Buffer;var _require2=require('util'),inspect=_require2.inspect;var custom=inspect&&inspect.custom||'inspect';function copyBuffer(src,target,offset){Buffer.prototype.copy.call(src,target,offset);}module.exports=/*#__PURE__*/function(){function BufferList(){_classCallCheck(this,BufferList);this.head=null;this.tail=null;this.length=0;}_createClass(BufferList,[{key:"push",value:function push(v){var entry={data:v,next:null};if(this.length>0)this.tail.next=entry;else this.head=entry;this.tail=entry;++this.length;}},{key:"unshift",value:function unshift(v){var entry={data:v,next:this.head};if(this.length===0)this.tail=entry;this.head=entry;++this.length;}},{key:"shift",value:function shift(){if(this.length===0)return;var ret=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return ret;}},{key:"clear",value:function clear(){this.head=this.tail=null;this.length=0;}},{key:"join",value:function join(s){if(this.length===0)return'';var p=this.head;var ret=''+p.data;while(p=p.next)ret+=s+p.data;return ret;}},{key:"concat",value:function concat(n){if(this.length===0)return Buffer.alloc(0);var ret=Buffer.allocUnsafe(n>>>0);var p=this.head;var i=0;while(p){copyBuffer(p.data,ret,i);i+=p.data.length;p=p.next;}return ret;}// Consumes a specified amount of bytes or characters from the buffered data.
5805
5661
  },{key:"consume",value:function consume(n,hasStrings){var ret;if(n<this.head.data.length){// `slice` is the same for buffers and strings.
5806
5662
  ret=this.head.data.slice(0,n);this.head.data=this.head.data.slice(n);}else if(n===this.head.data.length){// First chunk is a perfect match.
5807
5663
  ret=this.shift();}else{// Result spans more than one buffer.
@@ -5810,7 +5666,7 @@ ret=hasStrings?this._getString(n):this._getBuffer(n);}return ret;}},{key:"first"
5810
5666
  },{key:"_getBuffer",value:function _getBuffer(n){var ret=Buffer.allocUnsafe(n);var p=this.head;var c=1;p.data.copy(ret);n-=p.data.length;while(p=p.next){var buf=p.data;var nb=n>buf.length?buf.length:n;buf.copy(ret,ret.length-n,0,nb);n-=nb;if(n===0){if(nb===buf.length){++c;if(p.next)this.head=p.next;else this.head=this.tail=null;}else{this.head=p;p.data=buf.slice(nb);}break;}++c;}this.length-=c;return ret;}// Make sure the linked list only shows the minimal necessary information.
5811
5667
  },{key:custom,value:function value(_,options){return inspect(this,_objectSpread(_objectSpread({},options),{},{// Only inspect one level.
5812
5668
  depth:0,// It should not recurse.
5813
- customInspect:false}));}}]);return BufferList;}();},{"buffer":20,"util":18}],179:[function(require,module,exports){(function(process){(function(){'use strict';// undocumented cb() API, needed for core, not for public API
5669
+ customInspect:false}));}}]);return BufferList;}();},{"buffer":20,"util":18}],178:[function(require,module,exports){(function(process){(function(){'use strict';// undocumented cb() API, needed for core, not for public API
5814
5670
  function destroy(err,cb){var _this=this;var readableDestroyed=this._readableState&&this._readableState.destroyed;var writableDestroyed=this._writableState&&this._writableState.destroyed;if(readableDestroyed||writableDestroyed){if(cb){cb(err);}else if(err){if(!this._writableState){process.nextTick(emitErrorNT,this,err);}else if(!this._writableState.errorEmitted){this._writableState.errorEmitted=true;process.nextTick(emitErrorNT,this,err);}}return this;}// we set destroyed to true before firing error callbacks in order
5815
5671
  // to make it re-entrance safe in case destroy() is called within callbacks
5816
5672
  if(this._readableState){this._readableState.destroyed=true;}// if this is a duplex stream mark the writable part as destroyed as well
@@ -5819,15 +5675,15 @@ if(this._writableState){this._writableState.destroyed=true;}this._destroy(err||n
5819
5675
  // For now when you opt-in to autoDestroy we allow
5820
5676
  // the error to be emitted nextTick. In a future
5821
5677
  // semver major update we should change the default to this.
5822
- var rState=stream._readableState;var wState=stream._writableState;if(rState&&rState.autoDestroy||wState&&wState.autoDestroy)stream.destroy(err);else stream.emit('error',err);}module.exports={destroy:destroy,undestroy:undestroy,errorOrDestroy:errorOrDestroy};}).call(this);}).call(this,require('_process'));},{"_process":150}],180:[function(require,module,exports){// Ported from https://github.com/mafintosh/end-of-stream with
5678
+ var rState=stream._readableState;var wState=stream._writableState;if(rState&&rState.autoDestroy||wState&&wState.autoDestroy)stream.destroy(err);else stream.emit('error',err);}module.exports={destroy:destroy,undestroy:undestroy,errorOrDestroy:errorOrDestroy};}).call(this);}).call(this,require('_process'));},{"_process":150}],179:[function(require,module,exports){// Ported from https://github.com/mafintosh/end-of-stream with
5823
5679
  // permission from the author, Mathias Buus (@mafintosh).
5824
5680
  'use strict';var ERR_STREAM_PREMATURE_CLOSE=require('../../../errors').codes.ERR_STREAM_PREMATURE_CLOSE;function once(callback){var called=false;return function(){if(called)return;called=true;for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}callback.apply(this,args);};}function noop(){}function isRequest(stream){return stream.setHeader&&typeof stream.abort==='function';}function eos(stream,opts,callback){if(typeof opts==='function')return eos(stream,null,opts);if(!opts)opts={};callback=once(callback||noop);var readable=opts.readable||opts.readable!==false&&stream.readable;var writable=opts.writable||opts.writable!==false&&stream.writable;var onlegacyfinish=function onlegacyfinish(){if(!stream.writable)onfinish();};var writableEnded=stream._writableState&&stream._writableState.finished;var onfinish=function onfinish(){writable=false;writableEnded=true;if(!readable)callback.call(stream);};var readableEnded=stream._readableState&&stream._readableState.endEmitted;var onend=function onend(){readable=false;readableEnded=true;if(!writable)callback.call(stream);};var onerror=function onerror(err){callback.call(stream,err);};var onclose=function onclose(){var err;if(readable&&!readableEnded){if(!stream._readableState||!stream._readableState.ended)err=new ERR_STREAM_PREMATURE_CLOSE();return callback.call(stream,err);}if(writable&&!writableEnded){if(!stream._writableState||!stream._writableState.ended)err=new ERR_STREAM_PREMATURE_CLOSE();return callback.call(stream,err);}};var onrequest=function onrequest(){stream.req.on('finish',onfinish);};if(isRequest(stream)){stream.on('complete',onfinish);stream.on('abort',onclose);if(stream.req)onrequest();else stream.on('request',onrequest);}else if(writable&&!stream._writableState){// legacy streams
5825
- stream.on('end',onlegacyfinish);stream.on('close',onlegacyfinish);}stream.on('end',onend);stream.on('finish',onfinish);if(opts.error!==false)stream.on('error',onerror);stream.on('close',onclose);return function(){stream.removeListener('complete',onfinish);stream.removeListener('abort',onclose);stream.removeListener('request',onrequest);if(stream.req)stream.req.removeListener('finish',onfinish);stream.removeListener('end',onlegacyfinish);stream.removeListener('close',onlegacyfinish);stream.removeListener('finish',onfinish);stream.removeListener('end',onend);stream.removeListener('error',onerror);stream.removeListener('close',onclose);};}module.exports=eos;},{"../../../errors":171}],181:[function(require,module,exports){module.exports=function(){throw new Error('Readable.from is not available in the browser');};},{}],182:[function(require,module,exports){// Ported from https://github.com/mafintosh/pump with
5681
+ stream.on('end',onlegacyfinish);stream.on('close',onlegacyfinish);}stream.on('end',onend);stream.on('finish',onfinish);if(opts.error!==false)stream.on('error',onerror);stream.on('close',onclose);return function(){stream.removeListener('complete',onfinish);stream.removeListener('abort',onclose);stream.removeListener('request',onrequest);if(stream.req)stream.req.removeListener('finish',onfinish);stream.removeListener('end',onlegacyfinish);stream.removeListener('close',onlegacyfinish);stream.removeListener('finish',onfinish);stream.removeListener('end',onend);stream.removeListener('error',onerror);stream.removeListener('close',onclose);};}module.exports=eos;},{"../../../errors":170}],180:[function(require,module,exports){module.exports=function(){throw new Error('Readable.from is not available in the browser');};},{}],181:[function(require,module,exports){// Ported from https://github.com/mafintosh/pump with
5826
5682
  // permission from the author, Mathias Buus (@mafintosh).
5827
5683
  'use strict';var eos;function once(callback){var called=false;return function(){if(called)return;called=true;callback.apply(void 0,arguments);};}var _require$codes=require('../../../errors').codes,ERR_MISSING_ARGS=_require$codes.ERR_MISSING_ARGS,ERR_STREAM_DESTROYED=_require$codes.ERR_STREAM_DESTROYED;function noop(err){// Rethrow the error if it exists to avoid swallowing it
5828
5684
  if(err)throw err;}function isRequest(stream){return stream.setHeader&&typeof stream.abort==='function';}function destroyer(stream,reading,writing,callback){callback=once(callback);var closed=false;stream.on('close',function(){closed=true;});if(eos===undefined)eos=require('./end-of-stream');eos(stream,{readable:reading,writable:writing},function(err){if(err)return callback(err);closed=true;callback();});var destroyed=false;return function(err){if(closed)return;if(destroyed)return;destroyed=true;// request.destroy just do .end - .abort is what we want
5829
- if(isRequest(stream))return stream.abort();if(typeof stream.destroy==='function')return stream.destroy();callback(err||new ERR_STREAM_DESTROYED('pipe'));};}function call(fn){fn();}function pipe(from,to){return from.pipe(to);}function popCallback(streams){if(!streams.length)return noop;if(typeof streams[streams.length-1]!=='function')return noop;return streams.pop();}function pipeline(){for(var _len=arguments.length,streams=new Array(_len),_key=0;_key<_len;_key++){streams[_key]=arguments[_key];}var callback=popCallback(streams);if(Array.isArray(streams[0]))streams=streams[0];if(streams.length<2){throw new ERR_MISSING_ARGS('streams');}var error;var destroys=streams.map(function(stream,i){var reading=i<streams.length-1;var writing=i>0;return destroyer(stream,reading,writing,function(err){if(!error)error=err;if(err)destroys.forEach(call);if(reading)return;destroys.forEach(call);callback(error);});});return streams.reduce(pipe);}module.exports=pipeline;},{"../../../errors":171,"./end-of-stream":180}],183:[function(require,module,exports){'use strict';var ERR_INVALID_OPT_VALUE=require('../../../errors').codes.ERR_INVALID_OPT_VALUE;function highWaterMarkFrom(options,isDuplex,duplexKey){return options.highWaterMark!=null?options.highWaterMark:isDuplex?options[duplexKey]:null;}function getHighWaterMark(state,options,duplexKey,isDuplex){var hwm=highWaterMarkFrom(options,isDuplex,duplexKey);if(hwm!=null){if(!(isFinite(hwm)&&Math.floor(hwm)===hwm)||hwm<0){var name=isDuplex?duplexKey:'highWaterMark';throw new ERR_INVALID_OPT_VALUE(name,hwm);}return Math.floor(hwm);}// Default value
5830
- return state.objectMode?16:16*1024;}module.exports={getHighWaterMark:getHighWaterMark};},{"../../../errors":171}],184:[function(require,module,exports){module.exports=require('events').EventEmitter;},{"events":50}],185:[function(require,module,exports){exports=module.exports=require('./lib/_stream_readable.js');exports.Stream=exports;exports.Readable=exports;exports.Writable=require('./lib/_stream_writable.js');exports.Duplex=require('./lib/_stream_duplex.js');exports.Transform=require('./lib/_stream_transform.js');exports.PassThrough=require('./lib/_stream_passthrough.js');exports.finished=require('./lib/internal/streams/end-of-stream.js');exports.pipeline=require('./lib/internal/streams/pipeline.js');},{"./lib/_stream_duplex.js":172,"./lib/_stream_passthrough.js":173,"./lib/_stream_readable.js":174,"./lib/_stream_transform.js":175,"./lib/_stream_writable.js":176,"./lib/internal/streams/end-of-stream.js":180,"./lib/internal/streams/pipeline.js":182}],186:[function(require,module,exports){// Copyright Joyent, Inc. and other Node contributors.
5685
+ if(isRequest(stream))return stream.abort();if(typeof stream.destroy==='function')return stream.destroy();callback(err||new ERR_STREAM_DESTROYED('pipe'));};}function call(fn){fn();}function pipe(from,to){return from.pipe(to);}function popCallback(streams){if(!streams.length)return noop;if(typeof streams[streams.length-1]!=='function')return noop;return streams.pop();}function pipeline(){for(var _len=arguments.length,streams=new Array(_len),_key=0;_key<_len;_key++){streams[_key]=arguments[_key];}var callback=popCallback(streams);if(Array.isArray(streams[0]))streams=streams[0];if(streams.length<2){throw new ERR_MISSING_ARGS('streams');}var error;var destroys=streams.map(function(stream,i){var reading=i<streams.length-1;var writing=i>0;return destroyer(stream,reading,writing,function(err){if(!error)error=err;if(err)destroys.forEach(call);if(reading)return;destroys.forEach(call);callback(error);});});return streams.reduce(pipe);}module.exports=pipeline;},{"../../../errors":170,"./end-of-stream":179}],182:[function(require,module,exports){'use strict';var ERR_INVALID_OPT_VALUE=require('../../../errors').codes.ERR_INVALID_OPT_VALUE;function highWaterMarkFrom(options,isDuplex,duplexKey){return options.highWaterMark!=null?options.highWaterMark:isDuplex?options[duplexKey]:null;}function getHighWaterMark(state,options,duplexKey,isDuplex){var hwm=highWaterMarkFrom(options,isDuplex,duplexKey);if(hwm!=null){if(!(isFinite(hwm)&&Math.floor(hwm)===hwm)||hwm<0){var name=isDuplex?duplexKey:'highWaterMark';throw new ERR_INVALID_OPT_VALUE(name,hwm);}return Math.floor(hwm);}// Default value
5686
+ return state.objectMode?16:16*1024;}module.exports={getHighWaterMark:getHighWaterMark};},{"../../../errors":170}],183:[function(require,module,exports){module.exports=require('events').EventEmitter;},{"events":50}],184:[function(require,module,exports){exports=module.exports=require('./lib/_stream_readable.js');exports.Stream=exports;exports.Readable=exports;exports.Writable=require('./lib/_stream_writable.js');exports.Duplex=require('./lib/_stream_duplex.js');exports.Transform=require('./lib/_stream_transform.js');exports.PassThrough=require('./lib/_stream_passthrough.js');exports.finished=require('./lib/internal/streams/end-of-stream.js');exports.pipeline=require('./lib/internal/streams/pipeline.js');},{"./lib/_stream_duplex.js":171,"./lib/_stream_passthrough.js":172,"./lib/_stream_readable.js":173,"./lib/_stream_transform.js":174,"./lib/_stream_writable.js":175,"./lib/internal/streams/end-of-stream.js":179,"./lib/internal/streams/pipeline.js":181}],185:[function(require,module,exports){// Copyright Joyent, Inc. and other Node contributors.
5831
5687
  //
5832
5688
  // Permission is hereby granted, free of charge, to any person obtaining a
5833
5689
  // copy of this software and associated documentation files (the
@@ -5881,13 +5737,168 @@ function utf8End(buf){var r=buf&&buf.length?this.write(buf):'';if(this.lastNeed)
5881
5737
  function utf16Text(buf,i){if((buf.length-i)%2===0){var r=buf.toString('utf16le',i);if(r){var c=r.charCodeAt(r.length-1);if(c>=0xD800&&c<=0xDBFF){this.lastNeed=2;this.lastTotal=4;this.lastChar[0]=buf[buf.length-2];this.lastChar[1]=buf[buf.length-1];return r.slice(0,-1);}}return r;}this.lastNeed=1;this.lastTotal=2;this.lastChar[0]=buf[buf.length-1];return buf.toString('utf16le',i,buf.length-1);}// For UTF-16LE we do not explicitly append special replacement characters if we
5882
5738
  // end on a partial character, we simply let v8 handle that.
5883
5739
  function utf16End(buf){var r=buf&&buf.length?this.write(buf):'';if(this.lastNeed){var end=this.lastTotal-this.lastNeed;return r+this.lastChar.toString('utf16le',0,end);}return r;}function base64Text(buf,i){var n=(buf.length-i)%3;if(n===0)return buf.toString('base64',i);this.lastNeed=3-n;this.lastTotal=3;if(n===1){this.lastChar[0]=buf[buf.length-1];}else{this.lastChar[0]=buf[buf.length-2];this.lastChar[1]=buf[buf.length-1];}return buf.toString('base64',i,buf.length-n);}function base64End(buf){var r=buf&&buf.length?this.write(buf):'';if(this.lastNeed)return r+this.lastChar.toString('base64',0,3-this.lastNeed);return r;}// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
5884
- function simpleWrite(buf){return buf.toString(this.encoding);}function simpleEnd(buf){return buf&&buf.length?this.write(buf):'';}},{"safe-buffer":160}],187:[function(require,module,exports){(function(setImmediate,clearImmediate){(function(){var nextTick=require('process/browser.js').nextTick;var apply=Function.prototype.apply;var slice=Array.prototype.slice;var immediateIds={};var nextImmediateId=0;// DOM APIs, for completeness
5740
+ function simpleWrite(buf){return buf.toString(this.encoding);}function simpleEnd(buf){return buf&&buf.length?this.write(buf):'';}},{"safe-buffer":159}],186:[function(require,module,exports){(function(setImmediate,clearImmediate){(function(){var nextTick=require('process/browser.js').nextTick;var apply=Function.prototype.apply;var slice=Array.prototype.slice;var immediateIds={};var nextImmediateId=0;// DOM APIs, for completeness
5885
5741
  exports.setTimeout=function(){return new Timeout(apply.call(setTimeout,window,arguments),clearTimeout);};exports.setInterval=function(){return new Timeout(apply.call(setInterval,window,arguments),clearInterval);};exports.clearTimeout=exports.clearInterval=function(timeout){timeout.close();};function Timeout(id,clearFn){this._id=id;this._clearFn=clearFn;}Timeout.prototype.unref=Timeout.prototype.ref=function(){};Timeout.prototype.close=function(){this._clearFn.call(window,this._id);};// Does not start the time, just sets up the members needed.
5886
5742
  exports.enroll=function(item,msecs){clearTimeout(item._idleTimeoutId);item._idleTimeout=msecs;};exports.unenroll=function(item){clearTimeout(item._idleTimeoutId);item._idleTimeout=-1;};exports._unrefActive=exports.active=function(item){clearTimeout(item._idleTimeoutId);var msecs=item._idleTimeout;if(msecs>=0){item._idleTimeoutId=setTimeout(function onTimeout(){if(item._onTimeout)item._onTimeout();},msecs);}};// That's not how node.js implements it but the exposed api is the same.
5887
5743
  exports.setImmediate=typeof setImmediate==="function"?setImmediate:function(fn){var id=nextImmediateId++;var args=arguments.length<2?false:slice.call(arguments,1);immediateIds[id]=true;nextTick(function onNextTick(){if(immediateIds[id]){// fn.call() is faster so we optimize for the common use-case
5888
5744
  // @see http://jsperf.com/call-apply-segu
5889
5745
  if(args){fn.apply(null,args);}else{fn.call(null);}// Prevent ids from leaking
5890
- exports.clearImmediate(id);}});return id;};exports.clearImmediate=typeof clearImmediate==="function"?clearImmediate:function(id){delete immediateIds[id];};}).call(this);}).call(this,require("timers").setImmediate,require("timers").clearImmediate);},{"process/browser.js":150,"timers":187}],188:[function(require,module,exports){/*
5746
+ exports.clearImmediate(id);}});return id;};exports.clearImmediate=typeof clearImmediate==="function"?clearImmediate:function(id){delete immediateIds[id];};}).call(this);}).call(this,require("timers").setImmediate,require("timers").clearImmediate);},{"process/browser.js":150,"timers":186}],187:[function(require,module,exports){(function(global){(function(){/*! https://mths.be/punycode v1.4.1 by @mathias */;(function(root){/** Detect free variables */var freeExports=typeof exports=='object'&&exports&&!exports.nodeType&&exports;var freeModule=typeof module=='object'&&module&&!module.nodeType&&module;var freeGlobal=typeof global=='object'&&global;if(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal||freeGlobal.self===freeGlobal){root=freeGlobal;}/**
5747
+ * The `punycode` object.
5748
+ * @name punycode
5749
+ * @type Object
5750
+ */var punycode,/** Highest positive signed 32-bit float value */maxInt=2147483647,// aka. 0x7FFFFFFF or 2^31-1
5751
+ /** Bootstring parameters */base=36,tMin=1,tMax=26,skew=38,damp=700,initialBias=72,initialN=128,// 0x80
5752
+ delimiter='-',// '\x2D'
5753
+ /** Regular expressions */regexPunycode=/^xn--/,regexNonASCII=/[^\x20-\x7E]/,// unprintable ASCII chars + non-ASCII chars
5754
+ regexSeparators=/[\x2E\u3002\uFF0E\uFF61]/g,// RFC 3490 separators
5755
+ /** Error messages */errors={'overflow':'Overflow: input needs wider integers to process','not-basic':'Illegal input >= 0x80 (not a basic code point)','invalid-input':'Invalid input'},/** Convenience shortcuts */baseMinusTMin=base-tMin,floor=Math.floor,stringFromCharCode=String.fromCharCode,/** Temporary variable */key;/*--------------------------------------------------------------------------*//**
5756
+ * A generic error utility function.
5757
+ * @private
5758
+ * @param {String} type The error type.
5759
+ * @returns {Error} Throws a `RangeError` with the applicable error message.
5760
+ */function error(type){throw new RangeError(errors[type]);}/**
5761
+ * A generic `Array#map` utility function.
5762
+ * @private
5763
+ * @param {Array} array The array to iterate over.
5764
+ * @param {Function} callback The function that gets called for every array
5765
+ * item.
5766
+ * @returns {Array} A new array of values returned by the callback function.
5767
+ */function map(array,fn){var length=array.length;var result=[];while(length--){result[length]=fn(array[length]);}return result;}/**
5768
+ * A simple `Array#map`-like wrapper to work with domain name strings or email
5769
+ * addresses.
5770
+ * @private
5771
+ * @param {String} domain The domain name or email address.
5772
+ * @param {Function} callback The function that gets called for every
5773
+ * character.
5774
+ * @returns {Array} A new string of characters returned by the callback
5775
+ * function.
5776
+ */function mapDomain(string,fn){var parts=string.split('@');var result='';if(parts.length>1){// In email addresses, only the domain name should be punycoded. Leave
5777
+ // the local part (i.e. everything up to `@`) intact.
5778
+ result=parts[0]+'@';string=parts[1];}// Avoid `split(regex)` for IE8 compatibility. See #17.
5779
+ string=string.replace(regexSeparators,'\x2E');var labels=string.split('.');var encoded=map(labels,fn).join('.');return result+encoded;}/**
5780
+ * Creates an array containing the numeric code points of each Unicode
5781
+ * character in the string. While JavaScript uses UCS-2 internally,
5782
+ * this function will convert a pair of surrogate halves (each of which
5783
+ * UCS-2 exposes as separate characters) into a single code point,
5784
+ * matching UTF-16.
5785
+ * @see `punycode.ucs2.encode`
5786
+ * @see <https://mathiasbynens.be/notes/javascript-encoding>
5787
+ * @memberOf punycode.ucs2
5788
+ * @name decode
5789
+ * @param {String} string The Unicode input string (UCS-2).
5790
+ * @returns {Array} The new array of code points.
5791
+ */function ucs2decode(string){var output=[],counter=0,length=string.length,value,extra;while(counter<length){value=string.charCodeAt(counter++);if(value>=0xD800&&value<=0xDBFF&&counter<length){// high surrogate, and there is a next character
5792
+ extra=string.charCodeAt(counter++);if((extra&0xFC00)==0xDC00){// low surrogate
5793
+ output.push(((value&0x3FF)<<10)+(extra&0x3FF)+0x10000);}else{// unmatched surrogate; only append this code unit, in case the next
5794
+ // code unit is the high surrogate of a surrogate pair
5795
+ output.push(value);counter--;}}else{output.push(value);}}return output;}/**
5796
+ * Creates a string based on an array of numeric code points.
5797
+ * @see `punycode.ucs2.decode`
5798
+ * @memberOf punycode.ucs2
5799
+ * @name encode
5800
+ * @param {Array} codePoints The array of numeric code points.
5801
+ * @returns {String} The new Unicode string (UCS-2).
5802
+ */function ucs2encode(array){return map(array,function(value){var output='';if(value>0xFFFF){value-=0x10000;output+=stringFromCharCode(value>>>10&0x3FF|0xD800);value=0xDC00|value&0x3FF;}output+=stringFromCharCode(value);return output;}).join('');}/**
5803
+ * Converts a basic code point into a digit/integer.
5804
+ * @see `digitToBasic()`
5805
+ * @private
5806
+ * @param {Number} codePoint The basic numeric code point value.
5807
+ * @returns {Number} The numeric value of a basic code point (for use in
5808
+ * representing integers) in the range `0` to `base - 1`, or `base` if
5809
+ * the code point does not represent a value.
5810
+ */function basicToDigit(codePoint){if(codePoint-48<10){return codePoint-22;}if(codePoint-65<26){return codePoint-65;}if(codePoint-97<26){return codePoint-97;}return base;}/**
5811
+ * Converts a digit/integer into a basic code point.
5812
+ * @see `basicToDigit()`
5813
+ * @private
5814
+ * @param {Number} digit The numeric value of a basic code point.
5815
+ * @returns {Number} The basic code point whose value (when used for
5816
+ * representing integers) is `digit`, which needs to be in the range
5817
+ * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
5818
+ * used; else, the lowercase form is used. The behavior is undefined
5819
+ * if `flag` is non-zero and `digit` has no uppercase form.
5820
+ */function digitToBasic(digit,flag){// 0..25 map to ASCII a..z or A..Z
5821
+ // 26..35 map to ASCII 0..9
5822
+ return digit+22+75*(digit<26)-((flag!=0)<<5);}/**
5823
+ * Bias adaptation function as per section 3.4 of RFC 3492.
5824
+ * https://tools.ietf.org/html/rfc3492#section-3.4
5825
+ * @private
5826
+ */function adapt(delta,numPoints,firstTime){var k=0;delta=firstTime?floor(delta/damp):delta>>1;delta+=floor(delta/numPoints);for/* no initialization */(;delta>baseMinusTMin*tMax>>1;k+=base){delta=floor(delta/baseMinusTMin);}return floor(k+(baseMinusTMin+1)*delta/(delta+skew));}/**
5827
+ * Converts a Punycode string of ASCII-only symbols to a string of Unicode
5828
+ * symbols.
5829
+ * @memberOf punycode
5830
+ * @param {String} input The Punycode string of ASCII-only symbols.
5831
+ * @returns {String} The resulting string of Unicode symbols.
5832
+ */function decode(input){// Don't use UCS-2
5833
+ var output=[],inputLength=input.length,out,i=0,n=initialN,bias=initialBias,basic,j,index,oldi,w,k,digit,t,/** Cached calculation results */baseMinusT;// Handle the basic code points: let `basic` be the number of input code
5834
+ // points before the last delimiter, or `0` if there is none, then copy
5835
+ // the first basic code points to the output.
5836
+ basic=input.lastIndexOf(delimiter);if(basic<0){basic=0;}for(j=0;j<basic;++j){// if it's not a basic code point
5837
+ if(input.charCodeAt(j)>=0x80){error('not-basic');}output.push(input.charCodeAt(j));}// Main decoding loop: start just after the last delimiter if any basic code
5838
+ // points were copied; start at the beginning otherwise.
5839
+ for/* no final expression */(index=basic>0?basic+1:0;index<inputLength;){// `index` is the index of the next character to be consumed.
5840
+ // Decode a generalized variable-length integer into `delta`,
5841
+ // which gets added to `i`. The overflow checking is easier
5842
+ // if we increase `i` as we go, then subtract off its starting
5843
+ // value at the end to obtain `delta`.
5844
+ for/* no condition */(oldi=i,w=1,k=base;;k+=base){if(index>=inputLength){error('invalid-input');}digit=basicToDigit(input.charCodeAt(index++));if(digit>=base||digit>floor((maxInt-i)/w)){error('overflow');}i+=digit*w;t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(digit<t){break;}baseMinusT=base-t;if(w>floor(maxInt/baseMinusT)){error('overflow');}w*=baseMinusT;}out=output.length+1;bias=adapt(i-oldi,out,oldi==0);// `i` was supposed to wrap around from `out` to `0`,
5845
+ // incrementing `n` each time, so we'll fix that now:
5846
+ if(floor(i/out)>maxInt-n){error('overflow');}n+=floor(i/out);i%=out;// Insert `n` at position `i` of the output
5847
+ output.splice(i++,0,n);}return ucs2encode(output);}/**
5848
+ * Converts a string of Unicode symbols (e.g. a domain name label) to a
5849
+ * Punycode string of ASCII-only symbols.
5850
+ * @memberOf punycode
5851
+ * @param {String} input The string of Unicode symbols.
5852
+ * @returns {String} The resulting Punycode string of ASCII-only symbols.
5853
+ */function encode(input){var n,delta,handledCPCount,basicLength,bias,j,m,q,k,t,currentValue,output=[],/** `inputLength` will hold the number of code points in `input`. */inputLength,/** Cached calculation results */handledCPCountPlusOne,baseMinusT,qMinusT;// Convert the input in UCS-2 to Unicode
5854
+ input=ucs2decode(input);// Cache the length
5855
+ inputLength=input.length;// Initialize the state
5856
+ n=initialN;delta=0;bias=initialBias;// Handle the basic code points
5857
+ for(j=0;j<inputLength;++j){currentValue=input[j];if(currentValue<0x80){output.push(stringFromCharCode(currentValue));}}handledCPCount=basicLength=output.length;// `handledCPCount` is the number of code points that have been handled;
5858
+ // `basicLength` is the number of basic code points.
5859
+ // Finish the basic string - if it is not empty - with a delimiter
5860
+ if(basicLength){output.push(delimiter);}// Main encoding loop:
5861
+ while(handledCPCount<inputLength){// All non-basic code points < n have been handled already. Find the next
5862
+ // larger one:
5863
+ for(m=maxInt,j=0;j<inputLength;++j){currentValue=input[j];if(currentValue>=n&&currentValue<m){m=currentValue;}}// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
5864
+ // but guard against overflow
5865
+ handledCPCountPlusOne=handledCPCount+1;if(m-n>floor((maxInt-delta)/handledCPCountPlusOne)){error('overflow');}delta+=(m-n)*handledCPCountPlusOne;n=m;for(j=0;j<inputLength;++j){currentValue=input[j];if(currentValue<n&&++delta>maxInt){error('overflow');}if(currentValue==n){// Represent delta as a generalized variable-length integer
5866
+ for/* no condition */(q=delta,k=base;;k+=base){t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(q<t){break;}qMinusT=q-t;baseMinusT=base-t;output.push(stringFromCharCode(digitToBasic(t+qMinusT%baseMinusT,0)));q=floor(qMinusT/baseMinusT);}output.push(stringFromCharCode(digitToBasic(q,0)));bias=adapt(delta,handledCPCountPlusOne,handledCPCount==basicLength);delta=0;++handledCPCount;}}++delta;++n;}return output.join('');}/**
5867
+ * Converts a Punycode string representing a domain name or an email address
5868
+ * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
5869
+ * it doesn't matter if you call it on a string that has already been
5870
+ * converted to Unicode.
5871
+ * @memberOf punycode
5872
+ * @param {String} input The Punycoded domain name or email address to
5873
+ * convert to Unicode.
5874
+ * @returns {String} The Unicode representation of the given Punycode
5875
+ * string.
5876
+ */function toUnicode(input){return mapDomain(input,function(string){return regexPunycode.test(string)?decode(string.slice(4).toLowerCase()):string;});}/**
5877
+ * Converts a Unicode string representing a domain name or an email address to
5878
+ * Punycode. Only the non-ASCII parts of the domain name will be converted,
5879
+ * i.e. it doesn't matter if you call it with a domain that's already in
5880
+ * ASCII.
5881
+ * @memberOf punycode
5882
+ * @param {String} input The domain name or email address to convert, as a
5883
+ * Unicode string.
5884
+ * @returns {String} The Punycode representation of the given domain name or
5885
+ * email address.
5886
+ */function toASCII(input){return mapDomain(input,function(string){return regexNonASCII.test(string)?'xn--'+encode(string):string;});}/*--------------------------------------------------------------------------*//** Define the public API */punycode={/**
5887
+ * A string representing the current Punycode.js version number.
5888
+ * @memberOf punycode
5889
+ * @type String
5890
+ */'version':'1.4.1',/**
5891
+ * An object of methods to convert from JavaScript's internal character
5892
+ * representation (UCS-2) to Unicode code points, and back.
5893
+ * @see <https://mathiasbynens.be/notes/javascript-encoding>
5894
+ * @memberOf punycode
5895
+ * @type Object
5896
+ */'ucs2':{'decode':ucs2decode,'encode':ucs2encode},'decode':decode,'encode':encode,'toASCII':toASCII,'toUnicode':toUnicode};/** Expose `punycode` */// Some AMD build optimizers, like r.js, check for specific condition patterns
5897
+ // like the following:
5898
+ if(typeof define=='function'&&typeof define.amd=='object'&&define.amd){define('punycode',function(){return punycode;});}else if(freeExports&&freeModule){if(module.exports==freeExports){// in Node.js, io.js, or RingoJS v0.8.0+
5899
+ freeModule.exports=punycode;}else{// in Narwhal or RingoJS v0.7.0-
5900
+ for(key in punycode){punycode.hasOwnProperty(key)&&(freeExports[key]=punycode[key]);}}}else{// in Rhino or a web browser
5901
+ root.punycode=punycode;}})(this);}).call(this);}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{});},{}],188:[function(require,module,exports){/*
5891
5902
  * Copyright Joyent, Inc. and other Node contributors.
5892
5903
  *
5893
5904
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -6065,7 +6076,7 @@ if(psychotic){result.hostname=isAbsolute?'':srcPath.length?srcPath.shift():'';re
6065
6076
  * this especially happens in cases like
6066
6077
  * url.resolveObject('mailto:local1@domain1', 'local2@domain2')
6067
6078
  */var authInHost=result.host&&result.host.indexOf('@')>0?result.host.split('@'):false;if(authInHost){result.auth=authInHost.shift();result.hostname=authInHost.shift();result.host=result.hostname;}}mustEndAbs=mustEndAbs||result.host&&srcPath.length;if(mustEndAbs&&!isAbsolute){srcPath.unshift('');}if(srcPath.length>0){result.pathname=srcPath.join('/');}else{result.pathname=null;result.path=null;}// to support request.http
6068
- if(result.pathname!==null||result.search!==null){result.path=(result.pathname?result.pathname:'')+(result.search?result.search:'');}result.auth=relative.auth||result.auth;result.slashes=result.slashes||relative.slashes;result.href=result.format();return result;};Url.prototype.parseHost=function(){var host=this.host;var port=portPattern.exec(host);if(port){port=port[0];if(port!==':'){this.port=port.substr(1);}host=host.substr(0,host.length-port.length);}if(host){this.hostname=host;}};exports.parse=urlParse;exports.resolve=urlResolve;exports.resolveObject=urlResolveObject;exports.format=urlFormat;exports.Url=Url;},{"punycode/":151,"qs":153}],189:[function(require,module,exports){(function(global){(function(){/**
6079
+ if(result.pathname!==null||result.search!==null){result.path=(result.pathname?result.pathname:'')+(result.search?result.search:'');}result.auth=relative.auth||result.auth;result.slashes=result.slashes||relative.slashes;result.href=result.format();return result;};Url.prototype.parseHost=function(){var host=this.host;var port=portPattern.exec(host);if(port){port=port[0];if(port!==':'){this.port=port.substr(1);}host=host.substr(0,host.length-port.length);}if(host){this.hostname=host;}};exports.parse=urlParse;exports.resolve=urlResolve;exports.resolveObject=urlResolveObject;exports.format=urlFormat;exports.Url=Url;},{"punycode/":187,"qs":152}],189:[function(require,module,exports){(function(global){(function(){/**
6069
6080
  * Module exports.
6070
6081
  */module.exports=deprecate;/**
6071
6082
  * Mark that a method should not be used.
@@ -6095,7 +6106,7 @@ try{if(!global.localStorage)return false;}catch(_){return false;}var val=global.
6095
6106
  // presumably different callback function.
6096
6107
  // This makes sure that own properties are retained, so that
6097
6108
  // decorations and such are not lost along the way.
6098
- module.exports=wrappy;function wrappy(fn,cb){if(fn&&cb)return wrappy(fn)(cb);if(typeof fn!=='function')throw new TypeError('need wrapper function');Object.keys(fn).forEach(function(k){wrapper[k]=fn[k];});return wrapper;function wrapper(){var args=new Array(arguments.length);for(var i=0;i<args.length;i++){args[i]=arguments[i];}var ret=fn.apply(this,args);var cb=args[args.length-1];if(typeof ret==='function'&&ret!==cb){Object.keys(cb).forEach(function(k){ret[k]=cb[k];});}return ret;}}},{}],191:[function(require,module,exports){module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;function extend(){var target={};for(var i=0;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;}},{}],192:[function(require,module,exports){module.exports={"name":"pict","version":"1.0.370","description":"Pict browser library.","main":"source/Pict.js","scripts":{"start":"node source/Pict.js","test":"npx quack test","tests":"npx quack test -g","coverage":"npx quack coverage","build":"npx quack build","prepublishOnly":"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-image:local","docker-dev-run":"docker run -it -d --name pict-dev -p 37447:8080 -p 19506:8086 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/pict\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" pict-image:local","docker-dev-shell":"docker exec -it pict-dev /bin/bash","lint":"eslint source/**/*.js test/**/*.js","types":"tsc -p ."},"files":["source/","dist/","types/"],"types":"types/source/Pict.d.ts","mocha":{"diff":true,"extension":["js"],"package":"./package.json","reporter":"spec","slow":"75","timeout":"5000","ui":"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},"repository":{"type":"git","url":"git+https://stevenvelozo@github.com/stevenvelozo/pict.git"},"author":"steven velozo <steven@velozo.com>","license":"MIT","bugs":{"url":"https://github.com/stevenvelozo/pict/issues"},"homepage":"https://github.com/stevenvelozo/pict#readme","devDependencies":{"@eslint/js":"^9.39.1","@types/jquery":"^3.5.33","@types/sinon":"^17.0.4","eslint":"^9.39.1","globals":"^16.5.0","pict-docuserve":"^1.3.2","quackage":"^1.2.3","sinon":"^20.0.0","typescript":"^5.9.3"},"dependencies":{"cachetrax":"^1.0.6","fable":"^3.1.74","pict-application":"^1.0.34","pict-provider":"^1.0.13","pict-template":"^1.0.15","pict-view":"^1.0.68"}};},{}],193:[function(require,module,exports){// This assumes Pict has been required in the browser. Delcare these as globals so linter can do its job.
6109
+ module.exports=wrappy;function wrappy(fn,cb){if(fn&&cb)return wrappy(fn)(cb);if(typeof fn!=='function')throw new TypeError('need wrapper function');Object.keys(fn).forEach(function(k){wrapper[k]=fn[k];});return wrapper;function wrapper(){var args=new Array(arguments.length);for(var i=0;i<args.length;i++){args[i]=arguments[i];}var ret=fn.apply(this,args);var cb=args[args.length-1];if(typeof ret==='function'&&ret!==cb){Object.keys(cb).forEach(function(k){ret[k]=cb[k];});}return ret;}}},{}],191:[function(require,module,exports){module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;function extend(){var target={};for(var i=0;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;}},{}],192:[function(require,module,exports){module.exports={"name":"pict","version":"1.0.371","description":"Pict browser library.","main":"source/Pict.js","scripts":{"start":"node source/Pict.js","test":"npx quack test","tests":"npx quack test -g","coverage":"npx quack coverage","build":"npx quack build","prepublishOnly":"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-image:local","docker-dev-run":"docker run -it -d --name pict-dev -p 37447:8080 -p 19506:8086 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/pict\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" pict-image:local","docker-dev-shell":"docker exec -it pict-dev /bin/bash","lint":"eslint source/**/*.js test/**/*.js","types":"tsc -p ."},"files":["source/","dist/","types/"],"types":"types/source/Pict.d.ts","mocha":{"diff":true,"extension":["js"],"package":"./package.json","reporter":"spec","slow":"75","timeout":"5000","ui":"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},"repository":{"type":"git","url":"git+https://stevenvelozo@github.com/stevenvelozo/pict.git"},"author":"steven velozo <steven@velozo.com>","license":"MIT","bugs":{"url":"https://github.com/stevenvelozo/pict/issues"},"homepage":"https://github.com/stevenvelozo/pict#readme","devDependencies":{"@eslint/js":"^9.39.1","@types/jquery":"^3.5.33","@types/sinon":"^17.0.4","eslint":"^9.39.1","globals":"^16.5.0","pict-docuserve":"^1.3.2","quackage":"^1.2.3","sinon":"^20.0.0","typescript":"^5.9.3"},"dependencies":{"cachetrax":"^1.0.6","fable":"^3.1.74","pict-application":"^1.0.34","pict-provider":"^1.0.13","pict-template":"^1.0.15","pict-view":"^1.0.68"}};},{}],193:[function(require,module,exports){// This assumes Pict has been required in the browser. Delcare these as globals so linter can do its job.
6099
6110
  /* global Pict, _Pict: writeable *//**
6100
6111
  * Simple function to load a pict Application
6101
6112
  *
@@ -6390,7 +6401,7 @@ this.fable.manifest.setValueByHash(tmpDestinationEntity,tmpBucketAddress,tmpSour
6390
6401
  * @param {Record<string, any>} pInputRecord - The input record to use when resolving the output recordset address mapping.
6391
6402
  *
6392
6403
  * @return {string|null} - The resolved output recordset address, or null if no mapping was found.
6393
- */_resolveOutputRecordsetAddressMapping(pConfiguration,pContext,pInputRecord){const tmpAddressSpace=Object.assign({InputRecord:pInputRecord},pContext);for(const tmpRule of Object.keys(pConfiguration.OutputRecordsetAddressMapping)){const[tmpLHSAddress,tmpOperator,tmpMatchValue]=tmpRule.split(',');const tmpLHS=this.fable.manifest.getValueByHash(tmpAddressSpace,tmpLHSAddress);if(!tmpLHS){if(this.fable.LogNoisiness>0){this.log.warn(`EntityBundleRequest failed to project dataset because the LHS address [${tmpLHSAddress}] did not return a value.`);}continue;}switch(tmpOperator){case'AnyContains':if(!Array.isArray(tmpLHS)){//TODO: consider making this use objects as well?
6404
+ */_resolveOutputRecordsetAddressMapping(pConfiguration,pContext,pInputRecord){const tmpAddressSpace=Object.assign({InputRecord:pInputRecord},pContext);for(const tmpRule of Object.keys(pConfiguration.OutputRecordsetAddressMapping)){const _tmpRule$split=tmpRule.split(','),_tmpRule$split2=_slicedToArray(_tmpRule$split,3),tmpLHSAddress=_tmpRule$split2[0],tmpOperator=_tmpRule$split2[1],tmpMatchValue=_tmpRule$split2[2];const tmpLHS=this.fable.manifest.getValueByHash(tmpAddressSpace,tmpLHSAddress);if(!tmpLHS){if(this.fable.LogNoisiness>0){this.log.warn(`EntityBundleRequest failed to project dataset because the LHS address [${tmpLHSAddress}] did not return a value.`);}continue;}switch(tmpOperator){case'AnyContains':if(!Array.isArray(tmpLHS)){//TODO: consider making this use objects as well?
6394
6405
  this.log.error(`EntityBundleRequest failed to project dataset because the LHS address [${tmpLHSAddress}] did not return an array.`);continue;}for(const tmpLHSValue of tmpLHS){if(String(tmpLHSValue).includes(tmpMatchValue)){return pConfiguration.OutputRecordsetAddressMapping[tmpRule];}}}}return null;}/**
6395
6406
  * @param {Record<string, any>} pCustomRequestInformation - The custom request information object.
6396
6407
  * @param {Record<string, any>} pContext - The context object to use when parsing templates and resolving addresses.
@@ -6493,6 +6504,22 @@ this.recordCache[pEntity].prune(function(){let tmpPossibleRecord=this.recordCach
6493
6504
  return fCallback(new Error(`Error getting entity [${pEntity}] with ID [${pIDRecord}] from url [${tmpOptions.url}]: ${pResponse.statusCode} ${JSON.stringify(pBody || {})}`));
6494
6505
  }
6495
6506
  */if(pBody){this.recordCache[pEntity].put(pBody,pIDRecord);}return fCallback(pError,pBody);});}.bind(this));}/**
6507
+ * For a given list of objects, cache connected entity records (use lazy loading of pages and not count requests).
6508
+ *
6509
+ * @param {Array} pRecordSet - An array of objects to check cache on joined records for, and, get/cache the records as needed.
6510
+ * @param {Array} pIDListToCache - An array of property strings that are the ID fields to cache connected records for.
6511
+ * @param {Array} pEntityListToCache - An array of entity names, which can override the speculative entity name derived from the ID field name.
6512
+ * @param {boolean} pLiteRecords - If true, only cache lite records (ID and Name fields).
6513
+ *
6514
+ * @return {void}
6515
+ */cacheConnectedEntityRecordsWithoutCount(pRecordSet,pIDListToCache,pEntityListToCache,pLiteRecords,fCallback){//FIXME: pLiteRecords is ignored?
6516
+ if(!Array.isArray(pRecordSet)||pRecordSet.length<1){return fCallback();}if(!Array.isArray(pIDListToCache)||pIDListToCache.length<1){return fCallback();};const tmpAnticipate=this.fable.newAnticipate();const tmpEntityListToCache=pEntityListToCache||[];tmpAnticipate.maxOperations=10;for(let i=0;i<pIDListToCache.length;i++){const tmpEntityIDSourceField=pIDListToCache[i];// If an entity name override is provided, use it, otherwise speculate the joined entity name ID field from the source ID field name.
6517
+ const tmpEntityName=tmpEntityListToCache[i]||tmpEntityIDSourceField.replace(/^ID/,'');const tmpIDField=`ID${tmpEntityName}`;// Make a set of IDs to fetch for this entity.
6518
+ const tmpEntityIDsToFetch=new Set();// Initialize the cache
6519
+ this.initializeCache(tmpEntityName);// First pass: gather IDs to fetch
6520
+ for(const tmpRecord of pRecordSet){const tmpIDValue=tmpRecord[tmpEntityIDSourceField];if(tmpIDValue){const tmpCachedRecord=this.recordCache[tmpEntityName].read(tmpIDValue);if(!tmpCachedRecord){tmpEntityIDsToFetch.add(tmpIDValue);}}}// Now if there are records to fetch, do the request.
6521
+ if(tmpEntityIDsToFetch.size>0){tmpAnticipate.anticipate(function(fRequestComplete){const tmpIDRecordsArray=Array.from(tmpEntityIDsToFetch);const tmpMeadowFilterExpression=`FBL~ID${tmpEntityName}~INN~${tmpIDRecordsArray.join(',')}`;this.getEntitySet(tmpEntityName,tmpMeadowFilterExpression,(pError,pEntitySet)=>{if(pError){this.log.error(`cacheConnectedEntityRecords error getting connected entity records for [${tmpEntityName}] with IDs [${tmpIDRecordsArray.join(',')}]: ${pError}`,{Stack:pError.stack});return fRequestComplete(pError);}// The method automagically cached them for us! Just move on to the next...
6522
+ return fRequestComplete();},null,{NoCount:true});}.bind(this));}}tmpAnticipate.wait(pError=>{if(pError){this.log.error(`cacheConnectedEntityRecords error gathering connected entity records: ${pError}`,{Stack:pError.stack});return fCallback(pError);}return fCallback();});}/**
6496
6523
  * For a given list of objects, cache connected entity records.
6497
6524
  *
6498
6525
  * @param {Array} pRecordSet - An array of objects to check cache on joined records for, and, get/cache the records as needed.
@@ -6547,7 +6574,9 @@ else if(tmpColumnName in this.entityColumnTranslations){tmpIDColumnsToCache.push
6547
6574
  // FBL~ID${pDestinationEntity}~INN~${tmpIDRecordsCommaSeparated}
6548
6575
  // If the list is mega-long we can parse it and break it into chunks.
6549
6576
  this.initializeCache(pEntity);// Discard anything from the cache that has expired or is over size.
6550
- this.recordSetCache[pEntity].prune(function(){let tmpPossibleRecords=this.recordSetCache[pEntity].read(pMeadowFilterExpression);if(tmpPossibleRecords){return fCallback(null,tmpPossibleRecords);}return this.getEntitySetRecordCount(pEntity,pMeadowFilterExpression,(pRecordCountError,pRecordCount)=>{if(pRecordCountError){return fCallback(pRecordCountError);}let tmpRecordCount=pRecordCount;if(isNaN(pRecordCount)){this.log.error(`Entity count did not return a number for [${pEntity}] filtered to [${pMeadowFilterExpression}]... something is fatally wrong from the server accessed in getEntitySet call.`);return fCallback(new Error('Entity count did not return a number in getEntitySet.'));}let tmpDownloadBatchSize=this.options.downloadBatchSize;const tmpFilterStanza=pMeadowFilterExpression?`/FilteredTo/${pMeadowFilterExpression}`:'';const tmpPageCount=Math.ceil(tmpRecordCount/tmpDownloadBatchSize);// Build an indexed array of page descriptors to preserve ordering
6577
+ this.recordSetCache[pEntity].prune(function(){let tmpPossibleRecords=this.recordSetCache[pEntity].read(pMeadowFilterExpression);if(tmpPossibleRecords){return fCallback(null,tmpPossibleRecords);}if(pOptions.NoCount){// Lazily load until we hit a not full page rather than using couns.
6578
+ // Does not respect parallelization.
6579
+ const pageSize=250;let page=0;let returnSet=[];const tmpFilterStanza=pMeadowFilterExpression?`/FilteredTo/${pMeadowFilterExpression}`:'';const recursiveCallback=(pDownloadError,pDownloadResponse,pDownloadBody)=>{if(pDownloadResponse&&pDownloadResponse.statusCode&&pDownloadResponse.statusCode>=400||!Array.isArray(pDownloadBody)){this.log.error(`Error getting entity set of [${pEntity}] filtered to [${pMeadowFilterExpression}]: ${pDownloadResponse.statusCode} ${pDownloadResponse.statusMessage}`);return fCallback(new Error(`Error getting entity set of [${pEntity}] filtered to [${pMeadowFilterExpression}]: ${pDownloadResponse.statusCode} ${JSON.stringify(pDownloadBody||{})}`),[]);}if((pDownloadBody===null||pDownloadBody===void 0?void 0:pDownloadBody.length)<pageSize){returnSet=returnSet.concat(pDownloadBody);if(returnSet){this.recordSetCache[pEntity].put(returnSet,pMeadowFilterExpression);}this.cacheIndividualEntityRecords(pEntity,returnSet);fCallback(null,returnSet);}else{page+=1;this.restClient.getJSON(`${this.options.urlPrefix}${pEntity}s${tmpFilterStanza}/${page*pageSize}/${pageSize}`+(postfix||''),recursiveCallback);}};return this.restClient.getJSON(`${this.options.urlPrefix}${pEntity}s${tmpFilterStanza}/${page*pageSize}/${pageSize}`+(postfix||''),recursiveCallback);}return this.getEntitySetRecordCount(pEntity,pMeadowFilterExpression,(pRecordCountError,pRecordCount)=>{if(pRecordCountError){return fCallback(pRecordCountError);}let tmpRecordCount=pRecordCount;if(isNaN(pRecordCount)){this.log.error(`Entity count did not return a number for [${pEntity}] filtered to [${pMeadowFilterExpression}]... something is fatally wrong from the server accessed in getEntitySet call.`);return fCallback(new Error('Entity count did not return a number in getEntitySet.'));}let tmpDownloadBatchSize=this.options.downloadBatchSize;const tmpFilterStanza=pMeadowFilterExpression?`/FilteredTo/${pMeadowFilterExpression}`:'';const tmpPageCount=Math.ceil(tmpRecordCount/tmpDownloadBatchSize);// Build an indexed array of page descriptors to preserve ordering
6551
6580
  const tmpPages=[];for(let i=0;i<tmpPageCount;i++){tmpPages.push({Index:i,URL:`${this.options.urlPrefix}${pEntity}s${tmpFilterStanza}/${i*tmpDownloadBatchSize}/${tmpDownloadBatchSize}`,Records:null});}// Fetch pages concurrently and reassemble in order.
6552
6581
  // Per-call DownloadPageConcurrency overrides the provider-level default.
6553
6582
  const tmpPageConcurrency=typeof pOptions.DownloadPageConcurrency==='number'?pOptions.DownloadPageConcurrency:typeof this.options.downloadPageConcurrency==='number'?this.options.downloadPageConcurrency:4;this.fable.Utility.eachLimit(tmpPages,tmpPageConcurrency,(pPage,fDownloadCallback)=>{this.restClient.getJSON(pPage.URL+(postfix||''),(pDownloadError,pDownloadResponse,pDownloadBody)=>{if(pDownloadResponse&&pDownloadResponse.statusCode&&pDownloadResponse.statusCode>=400){this.log.error(`Error getting entity set of [${pEntity}] filtered to [${pMeadowFilterExpression}] from url [${pPage.URL}]: ${pDownloadResponse.statusCode} ${pDownloadResponse.statusMessage}`);return fDownloadCallback(new Error(`Error getting entity set of [${pEntity}] filtered to [${pMeadowFilterExpression}] from url [${pPage.URL}]: ${pDownloadResponse.statusCode} ${JSON.stringify(pDownloadBody||{})}`));}if(Array.isArray(pDownloadBody)){pPage.Records=pDownloadBody;}return fDownloadCallback(pDownloadError);});},pFullDownloadError=>{// Reassemble pages in index order to maintain consistent ordering
@@ -7202,7 +7231,7 @@ tmpFilter.Operator='EQ';tmpFilter.Value=tmpValue;}else{tmpFilter.Operator='LK';t
7202
7231
  */compileMeadowFilterStanzas(pFilterState){const tmpBundleConfig=[];//TODO: mathematically solve the number line
7203
7232
  // planned synthesized syntax for running on the server
7204
7233
  // FBV-3_Author~Name~LK~%25Ann%25~FBL-2_BookAuthorJoin~IDAuthor~INN~{~PJU:,^State[Step-3]^IDAuthor~}~FBV-1~User~NameFirst~LK~%25Bob%25~FBVOR-1~User~NameLast~LK~%25Bob%25~FBV~CreateDate~GT~2023-01-01T00:00:00Z~FBV~CreateDate~LT~2024-01-01T00:00:00Z~FBL~IDBook~INN~{~PJU:,^State[Step-2]^IDBook~}
7205
- if(!pFilterState.Filter){pFilterState.Filter=`${pFilterState.Entity||'Unknown'}-${this.pict.getUUID()}`;}tmpBundleConfig.push({Type:'SetStateAddress',StateAddress:`Bundle[${pFilterState.Filter}]`});const tmpGroupedFilters={};const tmpGroupedFilterKeys=[];const tmpGroupedCoreFilters=[];const tmpGroupedCoreFilterKeys=[];let tmpCoreEntity;const tmpCoreFilterStrings=[];for(const tmpFilterGroup of pFilterState.PreparedFilters){for(const tmpFilter of tmpFilterGroup.Filters){if(tmpFilter.CoreEntity){tmpCoreEntity=tmpFilter.Entity;const tmpFilterGUID=`${tmpFilterGroup.GUID}-${tmpFilter.ComputedIndex}`;if(!tmpGroupedCoreFilterKeys.find(v=>v==tmpFilterGUID)){tmpGroupedCoreFilterKeys.push(tmpFilterGUID);}if(!tmpGroupedCoreFilters[tmpFilterGUID]){tmpGroupedCoreFilters[tmpFilterGUID]={Stanzas:[],ComputedIndex:tmpFilter.ComputedIndex,Entity:tmpFilter.Entity,Junction:tmpFilterGroup.Junction||'AND',GroupOpen:tmpFilterGroup.GroupOpen||false,GroupJunction:tmpFilterGroup.GroupJunction||'AND',GroupClose:tmpFilterGroup.GroupClose||false};}tmpGroupedCoreFilters[tmpFilterGUID].Stanzas.push(this._compileSimpleFilterToString(tmpFilter));}else{const tmpFilterGroupGUID=`${tmpFilterGroup.GUID}-${tmpFilter.ComputedIndex}`;if(!tmpGroupedFilterKeys.find(v=>v==tmpFilterGroupGUID)){tmpGroupedFilterKeys.push(tmpFilterGroupGUID);}if(!tmpGroupedFilters[tmpFilterGroupGUID]){tmpGroupedFilters[tmpFilterGroupGUID]={Stanzas:[],ComputedIndex:tmpFilter.ComputedIndex,Entity:tmpFilter.Entity};}tmpGroupedFilters[tmpFilterGroupGUID].Stanzas.push(this._compileSimpleFilterToString(tmpFilter));}}for(const tmpFilterGroupKey of tmpGroupedFilterKeys){tmpGroupedFilters[tmpFilterGroupKey].Stanzas=tmpGroupedFilters[tmpFilterGroupKey].Stanzas.filter(f=>f.length>0);if(tmpGroupedFilters[tmpFilterGroupKey].Stanzas.length>0){tmpBundleConfig.push({Type:'MeadowEntity',AllRecords:true,Entity:tmpGroupedFilters[tmpFilterGroupKey].Entity,Filter:tmpGroupedFilters[tmpFilterGroupKey].Stanzas.join('~'),Destination:`State[Step${tmpGroupedFilters[tmpFilterGroupKey].ComputedIndex}]`});}}}for(const tmpCoreFilterKey of tmpGroupedCoreFilterKeys){tmpGroupedCoreFilters[tmpCoreFilterKey].Stanzas=tmpGroupedCoreFilters[tmpCoreFilterKey].Stanzas.filter(f=>f.length>0);if(tmpGroupedCoreFilters[tmpCoreFilterKey].Stanzas.length>0){let stringConstruct='';if(tmpGroupedCoreFilters[tmpCoreFilterKey].GroupOpen){stringConstruct+=tmpGroupedCoreFilters[tmpCoreFilterKey].GroupJunction=='OR'?'FOPOR~0~(~0~':'FOP~0~(~0~';}stringConstruct+=[tmpGroupedCoreFilters[tmpCoreFilterKey].Junction=='OR'?'FOPOR~0~(~0':'FOP~0~(~0',...tmpGroupedCoreFilters[tmpCoreFilterKey].Stanzas,'FCP~0~)~0'].join('~');if(tmpGroupedCoreFilters[tmpCoreFilterKey].GroupClose){stringConstruct+='~FCP~0~)~0';}tmpCoreFilterStrings.push(stringConstruct);}}if(!tmpCoreEntity){tmpCoreEntity=pFilterState.Entity;}const tmpCoreLoadStep={Type:pFilterState.Mode==='Count'?'MeadowEntityCount':'MeadowEntity',Entity:tmpCoreEntity,Filter:tmpCoreFilterStrings.join('~'),AllRecords:typeof pFilterState.PageSize==='undefined',RecordStartCursor:pFilterState.RecordOffset,Postfix:pFilterState.Postfix||'',PageSize:pFilterState.PageSize,Destination:pFilterState.ResultDestinationAddress};if(pFilterState.UserFilters.length>0){let tmpAllSorts='';let tmpFilter='';for(const tmpUserFilter of pFilterState.UserFilters){let tmpSorts;let tmpSanitizedUserFilter=tmpUserFilter;if(pFilterState.Mode==='Count'){tmpSanitizedUserFilter=this._sanitizeFilterForCount(tmpUserFilter);}else{[tmpSanitizedUserFilter,tmpSorts]=this._extractSortsFromFilter(tmpUserFilter);if(tmpSorts){if(tmpAllSorts.length>0){tmpAllSorts+='~';}tmpAllSorts+=tmpSorts;}if(!tmpSanitizedUserFilter){continue;}}if(!tmpSanitizedUserFilter){continue;}if(tmpFilter.length>0){tmpFilter+='~';}tmpFilter+='FOP~0~(~0~';tmpFilter+=tmpSanitizedUserFilter;tmpFilter+='~FCP~0~)~0';}if(tmpCoreLoadStep.Filter){if(tmpFilter.length>0){tmpFilter+='~';}tmpFilter+='FOP~0~(~0~';tmpFilter+=tmpCoreLoadStep.Filter;tmpFilter+='~FCP~0~)~0';}if(tmpAllSorts){if(tmpFilter.length>0){tmpFilter+='~';}tmpFilter+=tmpAllSorts;}tmpCoreLoadStep.Filter=tmpFilter;}tmpBundleConfig.push(tmpCoreLoadStep);pFilterState.BundleConfig=tmpBundleConfig;}/**
7234
+ if(!pFilterState.Filter){pFilterState.Filter=`${pFilterState.Entity||'Unknown'}-${this.pict.getUUID()}`;}tmpBundleConfig.push({Type:'SetStateAddress',StateAddress:`Bundle[${pFilterState.Filter}]`});const tmpGroupedFilters={};const tmpGroupedFilterKeys=[];const tmpGroupedCoreFilters=[];const tmpGroupedCoreFilterKeys=[];let tmpCoreEntity;const tmpCoreFilterStrings=[];for(const tmpFilterGroup of pFilterState.PreparedFilters){for(const tmpFilter of tmpFilterGroup.Filters){if(tmpFilter.CoreEntity){tmpCoreEntity=tmpFilter.Entity;const tmpFilterGUID=`${tmpFilterGroup.GUID}-${tmpFilter.ComputedIndex}`;if(!tmpGroupedCoreFilterKeys.find(v=>v==tmpFilterGUID)){tmpGroupedCoreFilterKeys.push(tmpFilterGUID);}if(!tmpGroupedCoreFilters[tmpFilterGUID]){tmpGroupedCoreFilters[tmpFilterGUID]={Stanzas:[],ComputedIndex:tmpFilter.ComputedIndex,Entity:tmpFilter.Entity,Junction:tmpFilterGroup.Junction||'AND',GroupOpen:tmpFilterGroup.GroupOpen||false,GroupJunction:tmpFilterGroup.GroupJunction||'AND',GroupClose:tmpFilterGroup.GroupClose||false};}tmpGroupedCoreFilters[tmpFilterGUID].Stanzas.push(this._compileSimpleFilterToString(tmpFilter));}else{const tmpFilterGroupGUID=`${tmpFilterGroup.GUID}-${tmpFilter.ComputedIndex}`;if(!tmpGroupedFilterKeys.find(v=>v==tmpFilterGroupGUID)){tmpGroupedFilterKeys.push(tmpFilterGroupGUID);}if(!tmpGroupedFilters[tmpFilterGroupGUID]){tmpGroupedFilters[tmpFilterGroupGUID]={Stanzas:[],ComputedIndex:tmpFilter.ComputedIndex,Entity:tmpFilter.Entity};}tmpGroupedFilters[tmpFilterGroupGUID].Stanzas.push(this._compileSimpleFilterToString(tmpFilter));}}for(const tmpFilterGroupKey of tmpGroupedFilterKeys){tmpGroupedFilters[tmpFilterGroupKey].Stanzas=tmpGroupedFilters[tmpFilterGroupKey].Stanzas.filter(f=>f.length>0);if(tmpGroupedFilters[tmpFilterGroupKey].Stanzas.length>0){tmpBundleConfig.push({Type:'MeadowEntity',AllRecords:true,Entity:tmpGroupedFilters[tmpFilterGroupKey].Entity,Filter:tmpGroupedFilters[tmpFilterGroupKey].Stanzas.join('~'),Destination:`State[Step${tmpGroupedFilters[tmpFilterGroupKey].ComputedIndex}]`});}}}for(const tmpCoreFilterKey of tmpGroupedCoreFilterKeys){tmpGroupedCoreFilters[tmpCoreFilterKey].Stanzas=tmpGroupedCoreFilters[tmpCoreFilterKey].Stanzas.filter(f=>f.length>0);if(tmpGroupedCoreFilters[tmpCoreFilterKey].Stanzas.length>0){let stringConstruct='';if(tmpGroupedCoreFilters[tmpCoreFilterKey].GroupOpen){stringConstruct+=tmpGroupedCoreFilters[tmpCoreFilterKey].GroupJunction=='OR'?'FOPOR~0~(~0~':'FOP~0~(~0~';}stringConstruct+=[tmpGroupedCoreFilters[tmpCoreFilterKey].Junction=='OR'?'FOPOR~0~(~0':'FOP~0~(~0',...tmpGroupedCoreFilters[tmpCoreFilterKey].Stanzas,'FCP~0~)~0'].join('~');if(tmpGroupedCoreFilters[tmpCoreFilterKey].GroupClose){stringConstruct+='~FCP~0~)~0';}tmpCoreFilterStrings.push(stringConstruct);}}if(!tmpCoreEntity){tmpCoreEntity=pFilterState.Entity;}const tmpCoreLoadStep={Type:pFilterState.Mode==='Count'?'MeadowEntityCount':'MeadowEntity',Entity:tmpCoreEntity,Filter:tmpCoreFilterStrings.join('~'),AllRecords:typeof pFilterState.PageSize==='undefined',RecordStartCursor:pFilterState.RecordOffset,Postfix:pFilterState.Postfix||'',PageSize:pFilterState.PageSize,Destination:pFilterState.ResultDestinationAddress};if(pFilterState.UserFilters.length>0){let tmpAllSorts='';let tmpFilter='';for(const tmpUserFilter of pFilterState.UserFilters){let tmpSorts;let tmpSanitizedUserFilter=tmpUserFilter;if(pFilterState.Mode==='Count'){tmpSanitizedUserFilter=this._sanitizeFilterForCount(tmpUserFilter);}else{var _this$_extractSortsFr=this._extractSortsFromFilter(tmpUserFilter);var _this$_extractSortsFr2=_slicedToArray(_this$_extractSortsFr,2);tmpSanitizedUserFilter=_this$_extractSortsFr2[0];tmpSorts=_this$_extractSortsFr2[1];if(tmpSorts){if(tmpAllSorts.length>0){tmpAllSorts+='~';}tmpAllSorts+=tmpSorts;}if(!tmpSanitizedUserFilter){continue;}}if(!tmpSanitizedUserFilter){continue;}if(tmpFilter.length>0){tmpFilter+='~';}tmpFilter+='FOP~0~(~0~';tmpFilter+=tmpSanitizedUserFilter;tmpFilter+='~FCP~0~)~0';}if(tmpCoreLoadStep.Filter){if(tmpFilter.length>0){tmpFilter+='~';}tmpFilter+='FOP~0~(~0~';tmpFilter+=tmpCoreLoadStep.Filter;tmpFilter+='~FCP~0~)~0';}if(tmpAllSorts){if(tmpFilter.length>0){tmpFilter+='~';}tmpFilter+=tmpAllSorts;}tmpCoreLoadStep.Filter=tmpFilter;}tmpBundleConfig.push(tmpCoreLoadStep);pFilterState.BundleConfig=tmpBundleConfig;}/**
7206
7235
  * @param {string} pFilter
7207
7236
  *
7208
7237
  * @return {string}
@@ -7951,7 +7980,7 @@ return'';}let tmpOpts=tmpVariant?{variant:tmpVariant}:undefined;return tmpProvid
7951
7980
  *
7952
7981
  * @return {string} The rendered template
7953
7982
  */render(pSolveParams,pRecord,pContextArray,pScope,pState){// {~S:ROUND(250*0.4129+Width,3):AppData.HomeworkRectangleSize:AppData.HomeworkManifest~}
7954
- const[tmpEquation,tmpRecordAddress,tmpManifestAddress]=pSolveParams.trim().split(':',3);const tmpContextualRecord=typeof pRecord==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace(`PICT Solve [fTemplateRender]::[${pSolveParams}] with tmpData:`,tmpContextualRecord);}else if(this.pict.LogNoisiness>0){this.log.trace(`PICT Solve [fTemplateRender]::[${pSolveParams}]`);}if(!tmpEquation){if(this.pict.LogNoisiness>2){this.log.warn(`Pict: Solve: Equation not found for [${tmpEquation}]`);}return'';}const tmpRecord=tmpRecordAddress&&this.pict.resolveStateFromAddress(tmpRecordAddress,tmpContextualRecord,pContextArray,null,pScope,pState)||tmpContextualRecord;const tmpManifest=tmpManifestAddress&&this.pict.resolveStateFromAddress(tmpManifestAddress,tmpContextualRecord,pContextArray,null,pScope,pState)||this.pict.manifest;const expressionParser=this.fable.instantiateServiceProviderIfNotExists('ExpressionParser');const tmpResultObject={};return expressionParser.solve(tmpEquation,tmpRecord,tmpResultObject,tmpManifest,tmpRecord);}}module.exports=PictTemplateProviderSolve;},{"pict-template":144}],225:[function(require,module,exports){const libPictTemplate=require('pict-template');class PictTemplateProviderSolveByReference extends libPictTemplate{/**
7983
+ const _pSolveParams$trim$sp=pSolveParams.trim().split(':',3),_pSolveParams$trim$sp2=_slicedToArray(_pSolveParams$trim$sp,3),tmpEquation=_pSolveParams$trim$sp2[0],tmpRecordAddress=_pSolveParams$trim$sp2[1],tmpManifestAddress=_pSolveParams$trim$sp2[2];const tmpContextualRecord=typeof pRecord==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace(`PICT Solve [fTemplateRender]::[${pSolveParams}] with tmpData:`,tmpContextualRecord);}else if(this.pict.LogNoisiness>0){this.log.trace(`PICT Solve [fTemplateRender]::[${pSolveParams}]`);}if(!tmpEquation){if(this.pict.LogNoisiness>2){this.log.warn(`Pict: Solve: Equation not found for [${tmpEquation}]`);}return'';}const tmpRecord=tmpRecordAddress&&this.pict.resolveStateFromAddress(tmpRecordAddress,tmpContextualRecord,pContextArray,null,pScope,pState)||tmpContextualRecord;const tmpManifest=tmpManifestAddress&&this.pict.resolveStateFromAddress(tmpManifestAddress,tmpContextualRecord,pContextArray,null,pScope,pState)||this.pict.manifest;const expressionParser=this.fable.instantiateServiceProviderIfNotExists('ExpressionParser');const tmpResultObject={};return expressionParser.solve(tmpEquation,tmpRecord,tmpResultObject,tmpManifest,tmpRecord);}}module.exports=PictTemplateProviderSolve;},{"pict-template":144}],225:[function(require,module,exports){const libPictTemplate=require('pict-template');class PictTemplateProviderSolveByReference extends libPictTemplate{/**
7955
7984
  * @param {Object} pFable - The Fable Framework instance
7956
7985
  * @param {Object} pOptions - The options for the service
7957
7986
  * @param {String} pServiceHash - The hash of the service
@@ -7966,7 +7995,7 @@ const[tmpEquation,tmpRecordAddress,tmpManifestAddress]=pSolveParams.trim().split
7966
7995
  *
7967
7996
  * @return {string} The rendered template
7968
7997
  */render(pSolveParams,pRecord,pContextArray,pScope,pState){// {~SBR:AppData.Equation:AppData.HomeworkRectangleSize:AppData.HomeworkManifest~}
7969
- const[tmpEquationAddress,tmpRecordAddress,tmpManifestAddress]=pSolveParams.trim().split(':',3);const tmpContextualRecord=typeof pRecord==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace(`PICT SolveByReference [fTemplateRender]::[${pSolveParams}] with tmpData:`,tmpContextualRecord);}else if(this.pict.LogNoisiness>0){this.log.trace(`PICT SolveByReference [fTemplateRender]::[${pSolveParams}]`);}const tmpEquation=this.pict.resolveStateFromAddress(tmpEquationAddress,tmpContextualRecord,pContextArray,null,pScope,pState);if(!tmpEquation){if(this.pict.LogNoisiness>2){this.log.warn(`Pict: SolveByReference: Equation not found for [${tmpEquationAddress}]`);}return'';}const tmpRecord=tmpRecordAddress&&this.pict.resolveStateFromAddress(tmpRecordAddress,tmpContextualRecord,pContextArray,null,pScope,pState)||tmpContextualRecord;const tmpManifest=tmpManifestAddress&&this.pict.resolveStateFromAddress(tmpManifestAddress,tmpContextualRecord,pContextArray,null,pScope,pState)||this.pict.manifest;const expressionParser=this.fable.instantiateServiceProviderIfNotExists('ExpressionParser');const tmpResultObject={};return expressionParser.solve(tmpEquation,tmpRecord,tmpResultObject,tmpManifest,tmpRecord);}}module.exports=PictTemplateProviderSolveByReference;},{"pict-template":144}],226:[function(require,module,exports){const libPictTemplate=require('pict-template');class PictTemplateProviderTemplate extends libPictTemplate{/**
7998
+ const _pSolveParams$trim$sp3=pSolveParams.trim().split(':',3),_pSolveParams$trim$sp4=_slicedToArray(_pSolveParams$trim$sp3,3),tmpEquationAddress=_pSolveParams$trim$sp4[0],tmpRecordAddress=_pSolveParams$trim$sp4[1],tmpManifestAddress=_pSolveParams$trim$sp4[2];const tmpContextualRecord=typeof pRecord==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace(`PICT SolveByReference [fTemplateRender]::[${pSolveParams}] with tmpData:`,tmpContextualRecord);}else if(this.pict.LogNoisiness>0){this.log.trace(`PICT SolveByReference [fTemplateRender]::[${pSolveParams}]`);}const tmpEquation=this.pict.resolveStateFromAddress(tmpEquationAddress,tmpContextualRecord,pContextArray,null,pScope,pState);if(!tmpEquation){if(this.pict.LogNoisiness>2){this.log.warn(`Pict: SolveByReference: Equation not found for [${tmpEquationAddress}]`);}return'';}const tmpRecord=tmpRecordAddress&&this.pict.resolveStateFromAddress(tmpRecordAddress,tmpContextualRecord,pContextArray,null,pScope,pState)||tmpContextualRecord;const tmpManifest=tmpManifestAddress&&this.pict.resolveStateFromAddress(tmpManifestAddress,tmpContextualRecord,pContextArray,null,pScope,pState)||this.pict.manifest;const expressionParser=this.fable.instantiateServiceProviderIfNotExists('ExpressionParser');const tmpResultObject={};return expressionParser.solve(tmpEquation,tmpRecord,tmpResultObject,tmpManifest,tmpRecord);}}module.exports=PictTemplateProviderSolveByReference;},{"pict-template":144}],226:[function(require,module,exports){const libPictTemplate=require('pict-template');class PictTemplateProviderTemplate extends libPictTemplate{/**
7970
7999
  * @param {Object} pFable - The Fable Framework instance
7971
8000
  * @param {Object} pOptions - The options for the service
7972
8001
  * @param {String} pServiceHash - The hash of the service
@@ -8504,7 +8533,7 @@ try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.
8504
8533
  * @param {any} [pState] - A catchall state object for plumbing data through template processing.
8505
8534
  *
8506
8535
  * @return {string} The rendered template
8507
- */render(pTemplateHash,pRecord,pContextArray,pScope,pState){let tmpHash=pTemplateHash.trim();let tmpRecord=typeof pRecord==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace(`PICT Template [fDataRender]::[${tmpHash}] with tmpData:`,tmpRecord);}else if(this.pict.LogNoisiness>3){this.log.trace(`PICT Template [fDataRender]::[${tmpHash}]`);}let tmpValue=false;const[tmpValueAddress,tmpPolarityStr]=tmpHash.split(':');if(tmpValueAddress!=null){tmpValue=this.resolveStateFromAddress(tmpValueAddress,tmpRecord,pContextArray,null,pScope,pState);}const tmpPolarity=tmpPolarityStr!=null?tmpPolarityStr==='1'||tmpPolarityStr.toLowerCase()==='true'||tmpPolarityStr.toLowerCase()==='t':false;if(Boolean(tmpValue)==tmpPolarity){return' -->';}return'';}}module.exports=PictTemplateProviderHTMLCommandEnd;},{"pict-template":144}],248:[function(require,module,exports){const libPictTemplate=require('pict-template');class PictTemplateProviderHTMLCommandStart extends libPictTemplate{/**
8536
+ */render(pTemplateHash,pRecord,pContextArray,pScope,pState){let tmpHash=pTemplateHash.trim();let tmpRecord=typeof pRecord==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace(`PICT Template [fDataRender]::[${tmpHash}] with tmpData:`,tmpRecord);}else if(this.pict.LogNoisiness>3){this.log.trace(`PICT Template [fDataRender]::[${tmpHash}]`);}let tmpValue=false;const _tmpHash$split=tmpHash.split(':'),_tmpHash$split2=_slicedToArray(_tmpHash$split,2),tmpValueAddress=_tmpHash$split2[0],tmpPolarityStr=_tmpHash$split2[1];if(tmpValueAddress!=null){tmpValue=this.resolveStateFromAddress(tmpValueAddress,tmpRecord,pContextArray,null,pScope,pState);}const tmpPolarity=tmpPolarityStr!=null?tmpPolarityStr==='1'||tmpPolarityStr.toLowerCase()==='true'||tmpPolarityStr.toLowerCase()==='t':false;if(Boolean(tmpValue)==tmpPolarity){return' -->';}return'';}}module.exports=PictTemplateProviderHTMLCommandEnd;},{"pict-template":144}],248:[function(require,module,exports){const libPictTemplate=require('pict-template');class PictTemplateProviderHTMLCommandStart extends libPictTemplate{/**
8508
8537
  * @param {Object} pFable - The Fable Framework instance
8509
8538
  * @param {Object} pOptions - The options for the service
8510
8539
  * @param {String} pServiceHash - The hash of the service
@@ -8518,7 +8547,7 @@ try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.
8518
8547
  * @param {any} [pState] - A catchall state object for plumbing data through template processing.
8519
8548
  *
8520
8549
  * @return {string} The rendered template
8521
- */render(pTemplateHash,pRecord,pContextArray,pScope,pState){let tmpHash=pTemplateHash.trim();let tmpRecord=typeof pRecord==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace(`PICT Template [fDataRender]::[${tmpHash}] with tmpData:`,tmpRecord);}else if(this.pict.LogNoisiness>3){this.log.trace(`PICT Template [fDataRender]::[${tmpHash}]`);}let tmpValue=false;const[tmpValueAddress,tmpPolarityStr]=tmpHash.split(':');if(tmpValueAddress!=null){tmpValue=this.resolveStateFromAddress(tmpValueAddress,tmpRecord,pContextArray,null,pScope,pState);}const tmpPolarity=tmpPolarityStr!=null?tmpPolarityStr==='1'||tmpPolarityStr.toLowerCase()==='true'||tmpPolarityStr.toLowerCase()==='t':false;if(Boolean(tmpValue)==tmpPolarity){return'<!-- ';}return'';}}module.exports=PictTemplateProviderHTMLCommandStart;},{"pict-template":144}],249:[function(require,module,exports){const libPictTemplate=require('pict-template');class PictTemplateProviderJoin extends libPictTemplate{/**
8550
+ */render(pTemplateHash,pRecord,pContextArray,pScope,pState){let tmpHash=pTemplateHash.trim();let tmpRecord=typeof pRecord==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace(`PICT Template [fDataRender]::[${tmpHash}] with tmpData:`,tmpRecord);}else if(this.pict.LogNoisiness>3){this.log.trace(`PICT Template [fDataRender]::[${tmpHash}]`);}let tmpValue=false;const _tmpHash$split3=tmpHash.split(':'),_tmpHash$split4=_slicedToArray(_tmpHash$split3,2),tmpValueAddress=_tmpHash$split4[0],tmpPolarityStr=_tmpHash$split4[1];if(tmpValueAddress!=null){tmpValue=this.resolveStateFromAddress(tmpValueAddress,tmpRecord,pContextArray,null,pScope,pState);}const tmpPolarity=tmpPolarityStr!=null?tmpPolarityStr==='1'||tmpPolarityStr.toLowerCase()==='true'||tmpPolarityStr.toLowerCase()==='t':false;if(Boolean(tmpValue)==tmpPolarity){return'<!-- ';}return'';}}module.exports=PictTemplateProviderHTMLCommandStart;},{"pict-template":144}],249:[function(require,module,exports){const libPictTemplate=require('pict-template');class PictTemplateProviderJoin extends libPictTemplate{/**
8522
8551
  * @param {Object} pFable - The Fable Framework instance
8523
8552
  * @param {Object} pOptions - The options for the service
8524
8553
  * @param {String} pServiceHash - The hash of the service