@edsc/echoforms 1.1.9 → 1.1.12
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/README.md +2 -1
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/package.json +52 -47
package/dist/index.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
module.exports=function(e){var t={};function __webpack_require__(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,__webpack_require__),n.l=!0,n.exports}return __webpack_require__.m=e,__webpack_require__.c=t,__webpack_require__.d=function(e,t,r){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(__webpack_require__.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)__webpack_require__.d(r,n,function(t){return e[t]}.bind(null,n));return r},__webpack_require__.n=function(e){var t=e&&e.__esModule?function getDefault(){return e.default}:function getModuleExports(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=32)}([function(e,t,r){e.exports=r(16)()},function(e,t){e.exports=require("react")},function(e,t,r){var n=r(13),a=r(14),i=r(15);e.exports=function _slicedToArray(e,t){return n(e)||a(e,t)||i()}},function(e,t){e.exports=function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},function(e,t){function _extends(){return e.exports=_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_extends.apply(this,arguments)}e.exports=_extends},function(e,t,r){"use strict";var n=function isOldIE(){var e;return function memorize(){return void 0===e&&(e=Boolean(window&&document&&document.all&&!window.atob)),e}}(),a=function getTarget(){var e={};return function memorize(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),i=[];function getIndexByIdentifier(e){for(var t=-1,r=0;r<i.length;r++)if(i[r].identifier===e){t=r;break}return t}function modulesToDom(e,t){for(var r={},n=[],a=0;a<e.length;a++){var o=e[a],l=t.base?o[0]+t.base:o[0],u=r[l]||0,s="".concat(l," ").concat(u);r[l]=u+1;var c=getIndexByIdentifier(s),f={css:o[1],media:o[2],sourceMap:o[3]};-1!==c?(i[c].references++,i[c].updater(f)):i.push({identifier:s,updater:addStyle(f,t),references:1}),n.push(s)}return n}function insertStyleElement(e){var t=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var i=r.nc;i&&(n.nonce=i)}if(Object.keys(n).forEach((function(e){t.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(t);else{var o=a(e.insert||"head");if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(t)}return t}var o=function replaceText(){var e=[];return function replace(t,r){return e[t]=r,e.filter(Boolean).join("\n")}}();function applyToSingletonTag(e,t,r,n){var a=r?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=o(t,a);else{var i=document.createTextNode(a),l=e.childNodes;l[t]&&e.removeChild(l[t]),l.length?e.insertBefore(i,l[t]):e.appendChild(i)}}function applyToTag(e,t,r){var n=r.css,a=r.media,i=r.sourceMap;if(a?e.setAttribute("media",a):e.removeAttribute("media"),i&&btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var l=null,u=0;function addStyle(e,t){var r,n,a;if(t.singleton){var i=u++;r=l||(l=insertStyleElement(t)),n=applyToSingletonTag.bind(null,r,i,!1),a=applyToSingletonTag.bind(null,r,i,!0)}else r=insertStyleElement(t),n=applyToTag.bind(null,r,t),a=function remove(){!function removeStyleElement(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(r)};return n(e),function updateStyle(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else a()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=n());var r=modulesToDom(e=e||[],t);return function update(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<r.length;n++){var a=getIndexByIdentifier(r[n]);i[a].references--}for(var o=modulesToDom(e,t),l=0;l<r.length;l++){var u=getIndexByIdentifier(r[l]);0===i[u].references&&(i[u].updater(),i.splice(u,1))}r=o}}}},function(e,t,r){"use strict";e.exports=function(e){var t=[];return t.toString=function toString(){return this.map((function(t){var r=function cssWithMappingToString(e,t){var r=e[1]||"",n=e[3];if(!n)return r;if(t&&"function"==typeof btoa){var a=function toComment(e){var t=btoa(unescape(encodeURIComponent(JSON.stringify(e)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(t);return"/*# ".concat(r," */")}(n),i=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[r].concat(i).concat([a]).join("\n")}return[r].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,n){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(n)for(var i=0;i<this.length;i++){var o=this[i][0];null!=o&&(a[o]=!0)}for(var l=0;l<e.length;l++){var u=[].concat(e[l]);n&&a[u[0]]||(r&&(u[2]?u[2]="".concat(r," and ").concat(u[2]):u[2]=r),t.push(u))}},t}},function(e,t,r){(function(t){!function(){const r=t.from&&t.alloc&&t.allocUnsafe&&t.allocUnsafeSlow?t.from:e=>new t(e);function MurmurHashV3(e,n){var a,i,o,l,u,s,c,f;for(t.isBuffer(e)||(e=r(e)),a=3&e.length,i=e.length-a,o=n,u=3432918353,s=461845907,f=0;f<i;)c=255&e[f]|(255&e[++f])<<8|(255&e[++f])<<16|(255&e[++f])<<24,++f,o=27492+(65535&(l=5*(65535&(o=(o^=c=(65535&(c=(c=(65535&c)*u+(((c>>>16)*u&65535)<<16)&4294967295)<<15|c>>>17))*s+(((c>>>16)*s&65535)<<16)&4294967295)<<13|o>>>19))+((5*(o>>>16)&65535)<<16)&4294967295))+((58964+(l>>>16)&65535)<<16);switch(c=0,a){case 3:c^=(255&e[f+2])<<16;case 2:c^=(255&e[f+1])<<8;case 1:o^=c=(65535&(c=(c=(65535&(c^=255&e[f]))*u+(((c>>>16)*u&65535)<<16)&4294967295)<<15|c>>>17))*s+(((c>>>16)*s&65535)<<16)&4294967295}return o^=e.length,o=2246822507*(65535&(o^=o>>>16))+((2246822507*(o>>>16)&65535)<<16)&4294967295,o=3266489909*(65535&(o^=o>>>13))+((3266489909*(o>>>16)&65535)<<16)&4294967295,(o^=o>>>16)>>>0}var n=MurmurHashV3;n.v2=function MurmurHashV2(e,n){t.isBuffer(e)||(e=r(e));for(var a,i=e.length,o=n^i,l=0;i>=4;)a=1540483477*(65535&(a=255&e[l]|(255&e[++l])<<8|(255&e[++l])<<16|(255&e[++l])<<24))+((1540483477*(a>>>16)&65535)<<16),o=1540483477*(65535&o)+((1540483477*(o>>>16)&65535)<<16)^(a=1540483477*(65535&(a^=a>>>24))+((1540483477*(a>>>16)&65535)<<16)),i-=4,++l;switch(i){case 3:o^=(255&e[l+2])<<16;case 2:o^=(255&e[l+1])<<8;case 1:o=1540483477*(65535&(o^=255&e[l]))+((1540483477*(o>>>16)&65535)<<16)}return o=1540483477*(65535&(o^=o>>>13))+((1540483477*(o>>>16)&65535)<<16),(o^=o>>>15)>>>0},n.v3=MurmurHashV3,e.exports=n}()}).call(this,r(18).Buffer)},function(e,t,r){e.exports=r(27)},function(e,t){function asyncGeneratorStep(e,t,r,n,a,i,o){try{var l=e[i](o),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,a)}e.exports=function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,a,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,a,_next,_throw,"throw",e)}_next(void 0)}))}}},function(e,t){e.exports=function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}},function(e,t){function _typeof(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=_typeof=function _typeof(e){return typeof e}:e.exports=_typeof=function _typeof(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(t)}e.exports=_typeof},function(e,t){e.exports=function _arrayWithHoles(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function _iterableToArrayLimit(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],n=!0,a=!1,i=void 0;try{for(var o,l=e[Symbol.iterator]();!(n=(o=l.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){a=!0,i=e}finally{try{n||null==l.return||l.return()}finally{if(a)throw i}}return r}}},function(e,t){e.exports=function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t,r){"use strict";var n=r(17);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,t,r,a,i,o){if(o!==n){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function getShim(){return shim}shim.isRequired=shim;var e={array:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return e.PropTypes=e,e}},function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,r){"use strict";(function(e){
|
|
1
|
+
(()=>{var i={636:i=>{var a=function(i){"use strict";var a=Object.prototype,o=a.hasOwnProperty,s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",l=s.asyncIterator||"@@asyncIterator",h=s.toStringTag||"@@toStringTag";function define(i,a,o){return Object.defineProperty(i,a,{value:o,enumerable:!0,configurable:!0,writable:!0}),i[a]}try{define({},"")}catch(i){define=function(i,a,o){return i[a]=o}}function wrap(i,a,o,s){var u=a&&a.prototype instanceof Generator?a:Generator,l=Object.create(u.prototype),h=new Context(s||[]);return l._invoke=function makeInvokeMethod(i,a,o){var s="suspendedStart";return function invoke(u,l){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===u)throw l;return doneResult()}for(o.method=u,o.arg=l;;){var h=o.delegate;if(h){var p=maybeInvokeDelegate(h,o);if(p){if(p===d)continue;return p}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===s)throw s="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s="executing";var m=tryCatch(i,a,o);if("normal"===m.type){if(s=o.done?"completed":"suspendedYield",m.arg===d)continue;return{value:m.arg,done:o.done}}"throw"===m.type&&(s="completed",o.method="throw",o.arg=m.arg)}}}(i,o,h),l}function tryCatch(i,a,o){try{return{type:"normal",arg:i.call(a,o)}}catch(i){return{type:"throw",arg:i}}}i.wrap=wrap;var d={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,u,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(values([])));y&&y!==a&&o.call(y,u)&&(p=y);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(i){["next","throw","return"].forEach((function(a){define(i,a,(function(i){return this._invoke(a,i)}))}))}function AsyncIterator(i,a){var s;this._invoke=function enqueue(u,l){function callInvokeWithMethodAndArg(){return new a((function(s,h){!function invoke(s,u,l,h){var d=tryCatch(i[s],i,u);if("throw"!==d.type){var p=d.arg,m=p.value;return m&&"object"==typeof m&&o.call(m,"__await")?a.resolve(m.__await).then((function(i){invoke("next",i,l,h)}),(function(i){invoke("throw",i,l,h)})):a.resolve(m).then((function(i){p.value=i,l(p)}),(function(i){return invoke("throw",i,l,h)}))}h(d.arg)}(u,l,s,h)}))}return s=s?s.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}function maybeInvokeDelegate(i,a){var o=i.iterator[a.method];if(void 0===o){if(a.delegate=null,"throw"===a.method){if(i.iterator.return&&(a.method="return",a.arg=void 0,maybeInvokeDelegate(i,a),"throw"===a.method))return d;a.method="throw",a.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var s=tryCatch(o,i.iterator,a.arg);if("throw"===s.type)return a.method="throw",a.arg=s.arg,a.delegate=null,d;var u=s.arg;return u?u.done?(a[i.resultName]=u.value,a.next=i.nextLoc,"return"!==a.method&&(a.method="next",a.arg=void 0),a.delegate=null,d):u:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,d)}function pushTryEntry(i){var a={tryLoc:i[0]};1 in i&&(a.catchLoc=i[1]),2 in i&&(a.finallyLoc=i[2],a.afterLoc=i[3]),this.tryEntries.push(a)}function resetTryEntry(i){var a=i.completion||{};a.type="normal",delete a.arg,i.completion=a}function Context(i){this.tryEntries=[{tryLoc:"root"}],i.forEach(pushTryEntry,this),this.reset(!0)}function values(i){if(i){var a=i[u];if(a)return a.call(i);if("function"==typeof i.next)return i;if(!isNaN(i.length)){var s=-1,l=function next(){for(;++s<i.length;)if(o.call(i,s))return next.value=i[s],next.done=!1,next;return next.value=void 0,next.done=!0,next};return l.next=l}}return{next:doneResult}}function doneResult(){return{value:void 0,done:!0}}return GeneratorFunction.prototype=GeneratorFunctionPrototype,define(g,"constructor",GeneratorFunctionPrototype),define(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,h,"GeneratorFunction"),i.isGeneratorFunction=function(i){var a="function"==typeof i&&i.constructor;return!!a&&(a===GeneratorFunction||"GeneratorFunction"===(a.displayName||a.name))},i.mark=function(i){return Object.setPrototypeOf?Object.setPrototypeOf(i,GeneratorFunctionPrototype):(i.__proto__=GeneratorFunctionPrototype,define(i,h,"GeneratorFunction")),i.prototype=Object.create(g),i},i.awrap=function(i){return{__await:i}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,l,(function(){return this})),i.AsyncIterator=AsyncIterator,i.async=function(a,o,s,u,l){void 0===l&&(l=Promise);var h=new AsyncIterator(wrap(a,o,s,u),l);return i.isGeneratorFunction(o)?h:h.next().then((function(i){return i.done?i.value:h.next()}))},defineIteratorMethods(g),define(g,h,"Generator"),define(g,u,(function(){return this})),define(g,"toString",(function(){return"[object Generator]"})),i.keys=function(i){var a=[];for(var o in i)a.push(o);return a.reverse(),function next(){for(;a.length;){var o=a.pop();if(o in i)return next.value=o,next.done=!1,next}return next.done=!0,next}},i.values=values,Context.prototype={constructor:Context,reset:function(i){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!i)for(var a in this)"t"===a.charAt(0)&&o.call(this,a)&&!isNaN(+a.slice(1))&&(this[a]=void 0)},stop:function(){this.done=!0;var i=this.tryEntries[0].completion;if("throw"===i.type)throw i.arg;return this.rval},dispatchException:function(i){if(this.done)throw i;var a=this;function handle(o,s){return l.type="throw",l.arg=i,a.next=o,s&&(a.method="next",a.arg=void 0),!!s}for(var s=this.tryEntries.length-1;s>=0;--s){var u=this.tryEntries[s],l=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var h=o.call(u,"catchLoc"),d=o.call(u,"finallyLoc");if(h&&d){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(h){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0)}else{if(!d)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}}}},abrupt:function(i,a){for(var s=this.tryEntries.length-1;s>=0;--s){var u=this.tryEntries[s];if(u.tryLoc<=this.prev&&o.call(u,"finallyLoc")&&this.prev<u.finallyLoc){var l=u;break}}l&&("break"===i||"continue"===i)&&l.tryLoc<=a&&a<=l.finallyLoc&&(l=null);var h=l?l.completion:{};return h.type=i,h.arg=a,l?(this.method="next",this.next=l.finallyLoc,d):this.complete(h)},complete:function(i,a){if("throw"===i.type)throw i.arg;return"break"===i.type||"continue"===i.type?this.next=i.arg:"return"===i.type?(this.rval=this.arg=i.arg,this.method="return",this.next="end"):"normal"===i.type&&a&&(this.next=a),d},finish:function(i){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.finallyLoc===i)return this.complete(o.completion,o.afterLoc),resetTryEntry(o),d}},catch:function(i){for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a];if(o.tryLoc===i){var s=o.completion;if("throw"===s.type){var u=s.arg;resetTryEntry(o)}return u}}throw new Error("illegal catch attempt")},delegateYield:function(i,a,o){return this.delegate={iterator:values(i),resultName:a,nextLoc:o},"next"===this.method&&(this.arg=void 0),d}},i}(i.exports);try{regeneratorRuntime=a}catch(i){"object"==typeof globalThis?globalThis.regeneratorRuntime=a:Function("r","regeneratorRuntime = r")(a)}},757:(i,a,o)=>{i.exports=o(636)},742:(i,a)=>{"use strict";a.byteLength=function byteLength(i){var a=getLens(i),o=a[0],s=a[1];return 3*(o+s)/4-s},a.toByteArray=function toByteArray(i){var a,o,l=getLens(i),h=l[0],d=l[1],p=new u(function _byteLength(i,a,o){return 3*(a+o)/4-o}(0,h,d)),m=0,y=d>0?h-4:h;for(o=0;o<y;o+=4)a=s[i.charCodeAt(o)]<<18|s[i.charCodeAt(o+1)]<<12|s[i.charCodeAt(o+2)]<<6|s[i.charCodeAt(o+3)],p[m++]=a>>16&255,p[m++]=a>>8&255,p[m++]=255&a;2===d&&(a=s[i.charCodeAt(o)]<<2|s[i.charCodeAt(o+1)]>>4,p[m++]=255&a);1===d&&(a=s[i.charCodeAt(o)]<<10|s[i.charCodeAt(o+1)]<<4|s[i.charCodeAt(o+2)]>>2,p[m++]=a>>8&255,p[m++]=255&a);return p},a.fromByteArray=function fromByteArray(i){for(var a,s=i.length,u=s%3,l=[],h=0,d=s-u;h<d;h+=16383)l.push(encodeChunk(i,h,h+16383>d?d:h+16383));1===u?(a=i[s-1],l.push(o[a>>2]+o[a<<4&63]+"==")):2===u&&(a=(i[s-2]<<8)+i[s-1],l.push(o[a>>10]+o[a>>4&63]+o[a<<2&63]+"="));return l.join("")};for(var o=[],s=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,d=l.length;h<d;++h)o[h]=l[h],s[l.charCodeAt(h)]=h;function getLens(i){var a=i.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var o=i.indexOf("=");return-1===o&&(o=a),[o,o===a?0:4-o%4]}function encodeChunk(i,a,s){for(var u,l,h=[],d=a;d<s;d+=3)u=(i[d]<<16&16711680)+(i[d+1]<<8&65280)+(255&i[d+2]),h.push(o[(l=u)>>18&63]+o[l>>12&63]+o[l>>6&63]+o[63&l]);return h.join("")}s["-".charCodeAt(0)]=62,s["_".charCodeAt(0)]=63},764:(i,a,o)=>{"use strict";
|
|
2
2
|
/*!
|
|
3
3
|
* The buffer module from node.js, for the browser.
|
|
4
4
|
*
|
|
5
|
-
* @author Feross Aboukhadijeh <
|
|
5
|
+
* @author Feross Aboukhadijeh <https://feross.org>
|
|
6
6
|
* @license MIT
|
|
7
|
-
*/
|
|
8
|
-
var n=r(20),a=r(21),i=r(22);function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(e,t){if(kMaxLength()<t)throw new RangeError("Invalid typed array length");return Buffer.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=Buffer.prototype:(null===e&&(e=new Buffer(t)),e.length=t),e}function Buffer(e,t,r){if(!(Buffer.TYPED_ARRAY_SUPPORT||this instanceof Buffer))return new Buffer(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return allocUnsafe(this,e)}return from(this,e,t,r)}function from(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function fromArrayBuffer(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n);Buffer.TYPED_ARRAY_SUPPORT?(e=t).__proto__=Buffer.prototype:e=fromArrayLike(e,t);return e}(e,t,r,n):"string"==typeof t?function fromString(e,t,r){"string"==typeof r&&""!==r||(r="utf8");if(!Buffer.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|byteLength(t,r),a=(e=createBuffer(e,n)).write(t,r);a!==n&&(e=e.slice(0,a));return e}(e,t,r):function fromObject(e,t){if(Buffer.isBuffer(t)){var r=0|checked(t.length);return 0===(e=createBuffer(e,r)).length||t.copy(e,0,0,r),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||function isnan(e){return e!=e}(t.length)?createBuffer(e,0):fromArrayLike(e,t);if("Buffer"===t.type&&i(t.data))return fromArrayLike(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function assertSize(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function allocUnsafe(e,t){if(assertSize(t),e=createBuffer(e,t<0?0:0|checked(t)),!Buffer.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function fromArrayLike(e,t){var r=t.length<0?0:0|checked(t.length);e=createBuffer(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function checked(e){if(e>=kMaxLength())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength().toString(16)+" bytes");return 0|e}function byteLength(e,t){if(Buffer.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return utf8ToBytes(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return base64ToBytes(e).length;default:if(n)return utf8ToBytes(e).length;t=(""+t).toLowerCase(),n=!0}}function slowToString(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return hexSlice(this,t,r);case"utf8":case"utf-8":return utf8Slice(this,t,r);case"ascii":return asciiSlice(this,t,r);case"latin1":case"binary":return latin1Slice(this,t,r);case"base64":return base64Slice(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function swap(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function bidirectionalIndexOf(e,t,r,n,a){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=a?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(a)return-1;r=e.length-1}else if(r<0){if(!a)return-1;r=0}if("string"==typeof t&&(t=Buffer.from(t,n)),Buffer.isBuffer(t))return 0===t.length?-1:arrayIndexOf(e,t,r,n,a);if("number"==typeof t)return t&=255,Buffer.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):arrayIndexOf(e,[t],r,n,a);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(e,t,r,n,a){var i,o=1,l=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,l/=2,u/=2,r/=2}function read(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(a){var s=-1;for(i=r;i<l;i++)if(read(e,i)===read(t,-1===s?0:i-s)){if(-1===s&&(s=i),i-s+1===u)return s*o}else-1!==s&&(i-=i-s),s=-1}else for(r+u>l&&(r=l-u),i=r;i>=0;i--){for(var c=!0,f=0;f<u;f++)if(read(e,i+f)!==read(t,f)){c=!1;break}if(c)return i}return-1}function hexWrite(e,t,r,n){r=Number(r)||0;var a=e.length-r;n?(n=Number(n))>a&&(n=a):n=a;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var o=0;o<n;++o){var l=parseInt(t.substr(2*o,2),16);if(isNaN(l))return o;e[r+o]=l}return o}function utf8Write(e,t,r,n){return blitBuffer(utf8ToBytes(t,e.length-r),e,r,n)}function asciiWrite(e,t,r,n){return blitBuffer(function asciiToBytes(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function latin1Write(e,t,r,n){return asciiWrite(e,t,r,n)}function base64Write(e,t,r,n){return blitBuffer(base64ToBytes(t),e,r,n)}function ucs2Write(e,t,r,n){return blitBuffer(function utf16leToBytes(e,t){for(var r,n,a,i=[],o=0;o<e.length&&!((t-=2)<0);++o)r=e.charCodeAt(o),n=r>>8,a=r%256,i.push(a),i.push(n);return i}(t,e.length-r),e,r,n)}function base64Slice(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function utf8Slice(e,t,r){r=Math.min(e.length,r);for(var n=[],a=t;a<r;){var i,o,l,u,s=e[a],c=null,f=s>239?4:s>223?3:s>191?2:1;if(a+f<=r)switch(f){case 1:s<128&&(c=s);break;case 2:128==(192&(i=e[a+1]))&&(u=(31&s)<<6|63&i)>127&&(c=u);break;case 3:i=e[a+1],o=e[a+2],128==(192&i)&&128==(192&o)&&(u=(15&s)<<12|(63&i)<<6|63&o)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:i=e[a+1],o=e[a+2],l=e[a+3],128==(192&i)&&128==(192&o)&&128==(192&l)&&(u=(15&s)<<18|(63&i)<<12|(63&o)<<6|63&l)>65535&&u<1114112&&(c=u)}null===c?(c=65533,f=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),a+=f}return function decodeCodePointsArray(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=4096));return r}(n)}t.Buffer=Buffer,t.SlowBuffer=function SlowBuffer(e){+e!=e&&(e=0);return Buffer.alloc(+e)},t.INSPECT_MAX_BYTES=50,Buffer.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function typedArraySupport(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=kMaxLength(),Buffer.poolSize=8192,Buffer._augment=function(e){return e.__proto__=Buffer.prototype,e},Buffer.from=function(e,t,r){return from(null,e,t,r)},Buffer.TYPED_ARRAY_SUPPORT&&(Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&Buffer[Symbol.species]===Buffer&&Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:!0})),Buffer.alloc=function(e,t,r){return function alloc(e,t,r,n){return assertSize(t),t<=0?createBuffer(e,t):void 0!==r?"string"==typeof n?createBuffer(e,t).fill(r,n):createBuffer(e,t).fill(r):createBuffer(e,t)}(null,e,t,r)},Buffer.allocUnsafe=function(e){return allocUnsafe(null,e)},Buffer.allocUnsafeSlow=function(e){return allocUnsafe(null,e)},Buffer.isBuffer=function isBuffer(e){return!(null==e||!e._isBuffer)},Buffer.compare=function compare(e,t){if(!Buffer.isBuffer(e)||!Buffer.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,a=0,i=Math.min(r,n);a<i;++a)if(e[a]!==t[a]){r=e[a],n=t[a];break}return r<n?-1:n<r?1:0},Buffer.isEncoding=function isEncoding(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Buffer.concat=function concat(e,t){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return Buffer.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=Buffer.allocUnsafe(t),a=0;for(r=0;r<e.length;++r){var o=e[r];if(!Buffer.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,a),a+=o.length}return n},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function swap16(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)swap(this,t,t+1);return this},Buffer.prototype.swap32=function swap32(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)swap(this,t,t+3),swap(this,t+1,t+2);return this},Buffer.prototype.swap64=function swap64(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)swap(this,t,t+7),swap(this,t+1,t+6),swap(this,t+2,t+5),swap(this,t+3,t+4);return this},Buffer.prototype.toString=function toString(){var e=0|this.length;return 0===e?"":0===arguments.length?utf8Slice(this,0,e):slowToString.apply(this,arguments)},Buffer.prototype.equals=function equals(e){if(!Buffer.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===Buffer.compare(this,e)},Buffer.prototype.inspect=function inspect(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},Buffer.prototype.compare=function compare(e,t,r,n,a){if(!Buffer.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),t<0||r>e.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&t>=r)return 0;if(n>=a)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(a>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0),l=Math.min(i,o),u=this.slice(n,a),s=e.slice(t,r),c=0;c<l;++c)if(u[c]!==s[c]){i=u[c],o=s[c];break}return i<o?-1:o<i?1:0},Buffer.prototype.includes=function includes(e,t,r){return-1!==this.indexOf(e,t,r)},Buffer.prototype.indexOf=function indexOf(e,t,r){return bidirectionalIndexOf(this,e,t,r,!0)},Buffer.prototype.lastIndexOf=function lastIndexOf(e,t,r){return bidirectionalIndexOf(this,e,t,r,!1)},Buffer.prototype.write=function write(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var a=this.length-t;if((void 0===r||r>a)&&(r=a),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return hexWrite(this,e,t,r);case"utf8":case"utf-8":return utf8Write(this,e,t,r);case"ascii":return asciiWrite(this,e,t,r);case"latin1":case"binary":return latin1Write(this,e,t,r);case"base64":return base64Write(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function asciiSlice(e,t,r){var n="";r=Math.min(e.length,r);for(var a=t;a<r;++a)n+=String.fromCharCode(127&e[a]);return n}function latin1Slice(e,t,r){var n="";r=Math.min(e.length,r);for(var a=t;a<r;++a)n+=String.fromCharCode(e[a]);return n}function hexSlice(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var a="",i=t;i<r;++i)a+=toHex(e[i]);return a}function utf16leSlice(e,t,r){for(var n=e.slice(t,r),a="",i=0;i<n.length;i+=2)a+=String.fromCharCode(n[i]+256*n[i+1]);return a}function checkOffset(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function checkInt(e,t,r,n,a,i){if(!Buffer.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function objectWriteUInt16(e,t,r,n){t<0&&(t=65535+t+1);for(var a=0,i=Math.min(e.length-r,2);a<i;++a)e[r+a]=(t&255<<8*(n?a:1-a))>>>8*(n?a:1-a)}function objectWriteUInt32(e,t,r,n){t<0&&(t=4294967295+t+1);for(var a=0,i=Math.min(e.length-r,4);a<i;++a)e[r+a]=t>>>8*(n?a:3-a)&255}function checkIEEE754(e,t,r,n,a,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function writeFloat(e,t,r,n,i){return i||checkIEEE754(e,0,r,4),a.write(e,t,r,n,23,4),r+4}function writeDouble(e,t,r,n,i){return i||checkIEEE754(e,0,r,8),a.write(e,t,r,n,52,8),r+8}Buffer.prototype.slice=function slice(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),Buffer.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=Buffer.prototype;else{var a=t-e;r=new Buffer(a,void 0);for(var i=0;i<a;++i)r[i]=this[i+e]}return r},Buffer.prototype.readUIntLE=function readUIntLE(e,t,r){e|=0,t|=0,r||checkOffset(e,t,this.length);for(var n=this[e],a=1,i=0;++i<t&&(a*=256);)n+=this[e+i]*a;return n},Buffer.prototype.readUIntBE=function readUIntBE(e,t,r){e|=0,t|=0,r||checkOffset(e,t,this.length);for(var n=this[e+--t],a=1;t>0&&(a*=256);)n+=this[e+--t]*a;return n},Buffer.prototype.readUInt8=function readUInt8(e,t){return t||checkOffset(e,1,this.length),this[e]},Buffer.prototype.readUInt16LE=function readUInt16LE(e,t){return t||checkOffset(e,2,this.length),this[e]|this[e+1]<<8},Buffer.prototype.readUInt16BE=function readUInt16BE(e,t){return t||checkOffset(e,2,this.length),this[e]<<8|this[e+1]},Buffer.prototype.readUInt32LE=function readUInt32LE(e,t){return t||checkOffset(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Buffer.prototype.readUInt32BE=function readUInt32BE(e,t){return t||checkOffset(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Buffer.prototype.readIntLE=function readIntLE(e,t,r){e|=0,t|=0,r||checkOffset(e,t,this.length);for(var n=this[e],a=1,i=0;++i<t&&(a*=256);)n+=this[e+i]*a;return n>=(a*=128)&&(n-=Math.pow(2,8*t)),n},Buffer.prototype.readIntBE=function readIntBE(e,t,r){e|=0,t|=0,r||checkOffset(e,t,this.length);for(var n=t,a=1,i=this[e+--n];n>0&&(a*=256);)i+=this[e+--n]*a;return i>=(a*=128)&&(i-=Math.pow(2,8*t)),i},Buffer.prototype.readInt8=function readInt8(e,t){return t||checkOffset(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Buffer.prototype.readInt16LE=function readInt16LE(e,t){t||checkOffset(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt16BE=function readInt16BE(e,t){t||checkOffset(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt32LE=function readInt32LE(e,t){return t||checkOffset(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Buffer.prototype.readInt32BE=function readInt32BE(e,t){return t||checkOffset(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Buffer.prototype.readFloatLE=function readFloatLE(e,t){return t||checkOffset(e,4,this.length),a.read(this,e,!0,23,4)},Buffer.prototype.readFloatBE=function readFloatBE(e,t){return t||checkOffset(e,4,this.length),a.read(this,e,!1,23,4)},Buffer.prototype.readDoubleLE=function readDoubleLE(e,t){return t||checkOffset(e,8,this.length),a.read(this,e,!0,52,8)},Buffer.prototype.readDoubleBE=function readDoubleBE(e,t){return t||checkOffset(e,8,this.length),a.read(this,e,!1,52,8)},Buffer.prototype.writeUIntLE=function writeUIntLE(e,t,r,n){(e=+e,t|=0,r|=0,n)||checkInt(this,e,t,r,Math.pow(2,8*r)-1,0);var a=1,i=0;for(this[t]=255&e;++i<r&&(a*=256);)this[t+i]=e/a&255;return t+r},Buffer.prototype.writeUIntBE=function writeUIntBE(e,t,r,n){(e=+e,t|=0,r|=0,n)||checkInt(this,e,t,r,Math.pow(2,8*r)-1,0);var a=r-1,i=1;for(this[t+a]=255&e;--a>=0&&(i*=256);)this[t+a]=e/i&255;return t+r},Buffer.prototype.writeUInt8=function writeUInt8(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,1,255,0),Buffer.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Buffer.prototype.writeUInt16LE=function writeUInt16LE(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):objectWriteUInt16(this,e,t,!0),t+2},Buffer.prototype.writeUInt16BE=function writeUInt16BE(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):objectWriteUInt16(this,e,t,!1),t+2},Buffer.prototype.writeUInt32LE=function writeUInt32LE(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):objectWriteUInt32(this,e,t,!0),t+4},Buffer.prototype.writeUInt32BE=function writeUInt32BE(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):objectWriteUInt32(this,e,t,!1),t+4},Buffer.prototype.writeIntLE=function writeIntLE(e,t,r,n){if(e=+e,t|=0,!n){var a=Math.pow(2,8*r-1);checkInt(this,e,t,r,a-1,-a)}var i=0,o=1,l=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===l&&0!==this[t+i-1]&&(l=1),this[t+i]=(e/o>>0)-l&255;return t+r},Buffer.prototype.writeIntBE=function writeIntBE(e,t,r,n){if(e=+e,t|=0,!n){var a=Math.pow(2,8*r-1);checkInt(this,e,t,r,a-1,-a)}var i=r-1,o=1,l=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===l&&0!==this[t+i+1]&&(l=1),this[t+i]=(e/o>>0)-l&255;return t+r},Buffer.prototype.writeInt8=function writeInt8(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,1,127,-128),Buffer.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Buffer.prototype.writeInt16LE=function writeInt16LE(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):objectWriteUInt16(this,e,t,!0),t+2},Buffer.prototype.writeInt16BE=function writeInt16BE(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):objectWriteUInt16(this,e,t,!1),t+2},Buffer.prototype.writeInt32LE=function writeInt32LE(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,4,2147483647,-2147483648),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):objectWriteUInt32(this,e,t,!0),t+4},Buffer.prototype.writeInt32BE=function writeInt32BE(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):objectWriteUInt32(this,e,t,!1),t+4},Buffer.prototype.writeFloatLE=function writeFloatLE(e,t,r){return writeFloat(this,e,t,!0,r)},Buffer.prototype.writeFloatBE=function writeFloatBE(e,t,r){return writeFloat(this,e,t,!1,r)},Buffer.prototype.writeDoubleLE=function writeDoubleLE(e,t,r){return writeDouble(this,e,t,!0,r)},Buffer.prototype.writeDoubleBE=function writeDoubleBE(e,t,r){return writeDouble(this,e,t,!1,r)},Buffer.prototype.copy=function copy(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var a,i=n-r;if(this===e&&r<t&&t<n)for(a=i-1;a>=0;--a)e[a+t]=this[a+r];else if(i<1e3||!Buffer.TYPED_ARRAY_SUPPORT)for(a=0;a<i;++a)e[a+t]=this[a+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+i),t);return i},Buffer.prototype.fill=function fill(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var a=e.charCodeAt(0);a<256&&(e=a)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!Buffer.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var o=Buffer.isBuffer(e)?e:utf8ToBytes(new Buffer(e,n).toString()),l=o.length;for(i=0;i<r-t;++i)this[i+t]=o[i%l]}return this};var o=/[^+\/0-9A-Za-z-_]/g;function toHex(e){return e<16?"0"+e.toString(16):e.toString(16)}function utf8ToBytes(e,t){var r;t=t||1/0;for(var n=e.length,a=null,i=[],o=0;o<n;++o){if((r=e.charCodeAt(o))>55295&&r<57344){if(!a){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&i.push(239,191,189);continue}a=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),a=r;continue}r=65536+(a-55296<<10|r-56320)}else a&&(t-=3)>-1&&i.push(239,191,189);if(a=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function base64ToBytes(e){return n.toByteArray(function base64clean(e){if((e=function stringtrim(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(o,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function blitBuffer(e,t,r,n){for(var a=0;a<n&&!(a+r>=t.length||a>=e.length);++a)t[a+r]=e[a];return a}}).call(this,r(19))},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";t.byteLength=function byteLength(e){var t=getLens(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function toByteArray(e){var t,r,n=getLens(e),o=n[0],l=n[1],u=new i(function _byteLength(e,t,r){return 3*(t+r)/4-r}(0,o,l)),s=0,c=l>0?o-4:o;for(r=0;r<c;r+=4)t=a[e.charCodeAt(r)]<<18|a[e.charCodeAt(r+1)]<<12|a[e.charCodeAt(r+2)]<<6|a[e.charCodeAt(r+3)],u[s++]=t>>16&255,u[s++]=t>>8&255,u[s++]=255&t;2===l&&(t=a[e.charCodeAt(r)]<<2|a[e.charCodeAt(r+1)]>>4,u[s++]=255&t);1===l&&(t=a[e.charCodeAt(r)]<<10|a[e.charCodeAt(r+1)]<<4|a[e.charCodeAt(r+2)]>>2,u[s++]=t>>8&255,u[s++]=255&t);return u},t.fromByteArray=function fromByteArray(e){for(var t,r=e.length,a=r%3,i=[],o=0,l=r-a;o<l;o+=16383)i.push(encodeChunk(e,o,o+16383>l?l:o+16383));1===a?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===a&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],a=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,u=o.length;l<u;++l)n[l]=o[l],a[o.charCodeAt(l)]=l;function getLens(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function encodeChunk(e,t,r){for(var a,i,o=[],l=t;l<r;l+=3)a=(e[l]<<16&16711680)+(e[l+1]<<8&65280)+(255&e[l+2]),o.push(n[(i=a)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return o.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,r,n,a){var i,o,l=8*a-n-1,u=(1<<l)-1,s=u>>1,c=-7,f=r?a-1:0,d=r?-1:1,h=e[t+f];for(f+=d,i=h&(1<<-c)-1,h>>=-c,c+=l;c>0;i=256*i+e[t+f],f+=d,c-=8);for(o=i&(1<<-c)-1,i>>=-c,c+=n;c>0;o=256*o+e[t+f],f+=d,c-=8);if(0===i)i=1-s;else{if(i===u)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,n),i-=s}return(h?-1:1)*o*Math.pow(2,i-n)},t.write=function(e,t,r,n,a,i){var o,l,u,s=8*i-a-1,c=(1<<s)-1,f=c>>1,d=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,p=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+f>=1?d/u:d*Math.pow(2,1-f))*u>=2&&(o++,u/=2),o+f>=c?(l=0,o=c):o+f>=1?(l=(t*u-1)*Math.pow(2,a),o+=f):(l=t*Math.pow(2,f-1)*Math.pow(2,a),o=0));a>=8;e[r+h]=255&l,h+=p,l/=256,a-=8);for(o=o<<a|l,s+=a;s>0;e[r+h]=255&o,h+=p,o/=256,s-=8);e[r+h-p]|=128*m}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){var n=r(5),a=r(24);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.i,a,""]]);var i={insert:"head",singleton:!1},o=(n(a,i),a.locals?a.locals:{});e.exports=o},function(e,t,r){(t=r(6)(!1)).push([e.i,".group{margin-bottom:1rem}\n",""]),e.exports=t},function(e,t,r){var n=r(5),a=r(26);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.i,a,""]]);var i={insert:"head",singleton:!1},o=(n(a,i),a.locals?a.locals:{});e.exports=o},function(e,t,r){(t=r(6)(!1)).push([e.i,".range__markers{width:100%;display:flex;justify-content:space-between}.range__min,.range__max{font-size:.75rem}.range__input{-webkit-appearance:none;width:100%;height:10px;border-radius:5px;background:#d3d3d3;outline:none;opacity:0.7;-webkit-transition:.2s;transition:opacity .2s}.range__input:hover{opacity:1}.range__input::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;border-radius:50%;background:#4CAF50;cursor:pointer}.range__input::-moz-range-thumb{width:20px;height:20px;border-radius:50%;background:#4CAF50;cursor:pointer}.range__value{position:absolute;top:50%}.range__value span{width:30px;height:24px;line-height:24px;text-align:center;background:#03a9f4;color:#fff;font-size:12px;display:block;position:absolute;left:50%;transform:translate(-50%, 0);border-radius:6px}\n",""]),e.exports=t},function(e,t,r){var n=function(e){"use strict";var t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",o=n.toStringTag||"@@toStringTag";function wrap(e,t,r,n){var a=t&&t.prototype instanceof Generator?t:Generator,i=Object.create(a.prototype),o=new Context(n||[]);return i._invoke=function makeInvokeMethod(e,t,r){var n="suspendedStart";return function invoke(a,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw i;return doneResult()}for(r.method=a,r.arg=i;;){var o=r.delegate;if(o){var u=maybeInvokeDelegate(o,r);if(u){if(u===l)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=tryCatch(e,t,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(e,r,o),i}function tryCatch(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=wrap;var l={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var u={};u[a]=function(){return this};var s=Object.getPrototypeOf,c=s&&s(s(values([])));c&&c!==t&&r.call(c,a)&&(u=c);var f=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(u);function defineIteratorMethods(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function AsyncIterator(e){var t;this._invoke=function enqueue(n,a){function callInvokeWithMethodAndArg(){return new Promise((function(t,i){!function invoke(t,n,a,i){var o=tryCatch(e[t],e,n);if("throw"!==o.type){var l=o.arg,u=l.value;return u&&"object"==typeof u&&r.call(u,"__await")?Promise.resolve(u.__await).then((function(e){invoke("next",e,a,i)}),(function(e){invoke("throw",e,a,i)})):Promise.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return invoke("throw",e,a,i)}))}i(o.arg)}(n,a,t,i)}))}return t=t?t.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}function maybeInvokeDelegate(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,maybeInvokeDelegate(e,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=tryCatch(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,l;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function pushTryEntry(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function resetTryEntry(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function Context(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(pushTryEntry,this),this.reset(!0)}function values(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function next(){for(;++n<e.length;)if(r.call(e,n))return next.value=e[n],next.done=!1,next;return next.value=void 0,next.done=!0,next};return i.next=i}}return{next:doneResult}}function doneResult(){return{value:void 0,done:!0}}return GeneratorFunction.prototype=f.constructor=GeneratorFunctionPrototype,GeneratorFunctionPrototype.constructor=GeneratorFunction,GeneratorFunctionPrototype[o]=GeneratorFunction.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===GeneratorFunction||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,GeneratorFunctionPrototype):(e.__proto__=GeneratorFunctionPrototype,o in e||(e[o]="GeneratorFunction")),e.prototype=Object.create(f),e},e.awrap=function(e){return{__await:e}},defineIteratorMethods(AsyncIterator.prototype),AsyncIterator.prototype[i]=function(){return this},e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,a){var i=new AsyncIterator(wrap(t,r,n,a));return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},defineIteratorMethods(f),f[o]="Generator",f[a]=function(){return this},f.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function next(){for(;t.length;){var r=t.pop();if(r in e)return next.value=r,next.done=!1,next}return next.done=!0,next}},e.values=values,Context.prototype={constructor:Context,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function handle(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n],i=a.completion;if("root"===a.tryLoc)return handle("end");if(a.tryLoc<=this.prev){var o=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(o&&l){if(this.prev<a.catchLoc)return handle(a.catchLoc,!0);if(this.prev<a.finallyLoc)return handle(a.finallyLoc)}else if(o){if(this.prev<a.catchLoc)return handle(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return handle(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),l},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;resetTryEntry(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:values(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},e}(e.exports);try{regeneratorRuntime=n}catch(e){Function("r","regeneratorRuntime = r")(n)}},function(e,t,r){var n=r(5),a=r(29);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.i,a,""]]);var i={insert:"head",singleton:!1},o=(n(a,i),a.locals?a.locals:{});e.exports=o},function(e,t,r){(t=r(6)(!1)).push([e.i,".tree-item{position:relative;margin-left:1.625rem;margin-bottom:0.325rem}.tree-item__header{vertical-align:middle;display:flex;align-items:center;height:1.5rem;margin-bottom:0.325rem;margin-left:0.1rem}.tree-item--is-first>.tree-item__header:after{content:'';position:absolute;top:-0.5rem;left:-1.125rem;height:0.5rem;width:1px;z-index:1;background-image:linear-gradient(to bottom, #fff 0%, rgba(255,255,255,0) 100%)}.tree-item--has-blocker>.tree-item__header:before{content:'';position:absolute;top:.775rem;left:-1.125rem;z-index:1;width:1px;height:calc(100% - 1.25rem);min-height:0.5rem;background:white}.tree-item--is-not-relevant .tree-item__header{cursor:not-allowed}.tree-item--is-not-relevant .tree-item__header:hover{cursor:not-allowed}.tree-item:before{content:'';position:absolute;top:0.75rem;left:-1.125rem;width:0.75rem;border-bottom:1px solid #ced4da}.tree-item--is-parent:after{content:'';position:absolute;top:1.5rem;left:0.5rem;height:calc(100% - 1.925rem);border-left:1px solid #ced4da}.tree-item--child-1{margin-left:0}.tree-item--is-not-relevant{color:#6c757d}.tree-item__parent-button{position:relative;right:0.3rem}.tree-item__parent-button.btn{padding:0.125rem}.tree-item__parent-button svg{fill:#fff981}.tree-item__parent-button path{stroke-width:35;stroke:#ebd604}.tree-item__checkbox{margin-right:0.5rem;transform:scale(0.925)}.tree-item--is-not-relevant .tree-item__checkbox{cursor:not-allowed}.tree-item--is-not-relevant .tree-item__checkbox:hover{cursor:not-allowed}.tree-item__label{display:flex;align-items:center;margin-bottom:0;margin-left:0.1rem;white-space:nowrap;font-size:0.875rem;line-height:1.375}.tree-item--is-not-relevant .tree-item__label{cursor:not-allowed}.tree-item--is-not-relevant .tree-item__label:hover{cursor:not-allowed}.tree-item__irrelevant-label{font-style:italic}.tree-item__required-label{font-style:italic;color:#bb1111}\n",""]),e.exports=t},function(e,t,r){var n=r(5),a=r(31);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.i,a,""]]);var i={insert:"head",singleton:!1},o=(n(a,i),a.locals?a.locals:{});e.exports=o},function(e,t,r){(t=r(6)(!1)).push([e.i,".tree__filter-clear-button.btn-outline-secondary{border-color:#ced4da}.tree__list-wrapper{overflow-y:scroll;position:relative}.tree__list{position:relative;left:-0.125rem;padding-top:0.5rem;padding-left:1.75rem;margin-bottom:1rem}.tree__list:before{content:'';position:absolute;top:-0.75rem;left:0.625rem;height:calc(100% + 0.125rem);border-left:1px solid #ced4da;z-index:0}.tree__list:after{content:'';position:absolute;top:-0.25rem;left:0.625rem;height:0.5rem;width:1px;z-index:1;background-image:linear-gradient(to bottom, #fff 0%, rgba(255,255,255,0) 100%)}\n",""]),e.exports=t},function(e,t,r){"use strict";r.r(t);var n=r(3),a=r.n(n),i=r(2),o=r.n(i),l=r(1),u=r.n(l),s=r(0),c=r.n(s),f=Object(l.createContext)({addBootstrapClasses:!1,hasShapefile:!1,model:{},onUpdateModel:function onUpdateModel(){},resolver:function resolver(){},setFormIsValid:function setFormIsValid(){},setRelevantFields:function setRelevantFields(){},setSimplifiedTree:function setSimplifiedTree(){},simplifiedTree:{}}),d=function useClasses(){var e=Object(l.useContext)(f).addBootstrapClasses;return{elementClasses:Object(l.useCallback)((function(t,r,n){var a=t;return n&&(a+=" is-invalid"),e?[r,a].filter(Boolean).join(" "):a}),[e])}},h=r(4),p=r.n(h),m=r(7),v=r.n(m),g=function getAttribute(e,t){var r=e.getNamedItem(t);return r?r.value:null},y=function evaluateXpath(e,t,r){var n=e;"["===e.charAt(0)&&(n="self::*".concat(e)),n=n.replace(/^\/+|(https:)?\/\//g,(function(e,t){return t?e:"/descendant-or-self::node()/"}));var a,i=t.ownerDocument.evaluate(n,t,r,XPathResult.ANY_TYPE,null);switch(i.resultType){case XPathResult.NUMBER_TYPE:a=i.numberValue;break;case XPathResult.STRING_TYPE:a=i.stringValue;break;case XPathResult.BOOLEAN_TYPE:a=i.booleanValue;break;default:a=i.iterateNext()}return a},b=function getNodeValue(e,t,r,n,a){if("true"===e||"false"===e)return"true"===e;var i=y(e,t,r);if(n&&null==i)return!1;if("boolean"==typeof i)return i;var o=i.children,l=void 0===o?[]:o;return 0===l.length?a?[]:i.textContent.trim():Array.from(l).map((function(e){return e.textContent.trim()}))},w=function validateIntegerRange(e,t,r){var n=Number(r);return!Number.isNaN(n)&&n>=e&&n<=t&&-1===r.indexOf(".")},E=function typeValidation(e,t){if(!t)return!0;switch(e){case"datetime":return function validateDateTime(e){var t="Value must be a date/time with format YYYY-MM-DDTHH:MM:SS";if(!e)return!0;if(!e.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$/))return t;var r=Array.from(e.split("T")),n=o()(r,2),a=n[0],i=n[1],l=a.split("-").map((function(e){return parseInt(e,10)})),u=o()(l,3),s=u[0],c=u[1],f=u[2],d=i.split(":").map((function(e){return parseInt(e,10)})),h=o()(d,3),p=h[0],m=h[1],v=h[2];return!!(s&&c>=1&&c<=12&&f>=1&&f<=31&&p<24&&m<60&&v<60)||t}(t);case"double":return function validateDouble(e){return!e||(!Number.isNaN(Number(e))||"Value must be a number")}(t);case"long":return function validateLong(e){return!e||(!!w(-Math.pow(2,63),Math.pow(2,63)-1,e)||"Value must be a integer between -2^63 and 2^63-1")}(t);case"int":return function validateInteger(e){return!e||(!!w(-Math.pow(2,31),Math.pow(2,31)-1,e)||"Value must be a integer between -2,147,483,648 and 2,147,483,647")}(t);case"short":return function validateShort(e){return!e||(!!w(-Math.pow(2,15),Math.pow(2,15)-1,e)||"Value must be a integer between -32,768 and 32,767")}(t);default:return!0}},_=function Constraint(e){var t=e.elements,r=e.manualError,n=e.model,a=e.required,i=e.type,o=e.value,s=e.setFieldIsValid,c=Object(l.useContext)(f).resolver;if(!t)return null;var d=[];r&&d.push(r),Array.from(t).filter((function(e){return"constraints"===e.tagName})).forEach((function(e){var t=e.children;Array.from(t).filter((function(e){return"constraint"===e.tagName})).forEach((function(e){var t=e.children,r=Array.from(t).filter((function(e){return"xpath"===e.tagName}))[0],a=Array.from(t).filter((function(e){return"pattern"===e.tagName}))[0],i=Array.from(t).filter((function(e){return"alert"===e.tagName}))[0];(r&&!y(r.textContent,n,c)&&d.push(i.textContent),a)&&(null===RegExp(a.textContent).exec(o)&&d.push(i.textContent))}))}));var h=E(i,o);return!0!==h&&d.push(h),!a||o&&o.length||d.push("Required field"),s(!d.length),d.map((function(e){return u.a.createElement("div",{key:e,className:"invalid-feedback"},e)}))};_.defaultProps={elements:{},manualError:null,type:null,value:null},_.propTypes={elements:c.a.shape({}),manualError:c.a.string,model:c.a.shape({}).isRequired,required:c.a.bool.isRequired,type:c.a.string,value:c.a.oneOfType([c.a.string,c.a.arrayOf(c.a.string)]),setFieldIsValid:c.a.func.isRequired};var R=function Help(e){var t=e.elements,r=e.manualHelp,n=(0,d().elementClasses)("help-text","form-text text-muted"),a=[];return t&&Array.from(t).filter((function(e){return"help"===e.tagName})).forEach((function(e){var t=e.textContent;a.push(u.a.createElement("small",{key:t,className:n},t))})),r&&a.push(u.a.createElement("small",{key:r,className:n},r)),u.a.createElement(u.a.Fragment,null,a)};function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}R.defaultProps={elements:{},manualHelp:null},R.propTypes={elements:c.a.shape({}),manualHelp:c.a.oneOfType([c.a.string,c.a.node])};var O=function ElementWrapper(e){var t=e.children,r=e.elementHash,n=e.formElements,i=e.htmlFor,s=e.label,c=e.manualError,h=e.manualHelp,p=e.model,m=e.required,v=e.type,g=e.value,y=Object(l.useContext)(f).setFormIsValid,b=Object(l.useState)(!0),w=o()(b,2),E=w[0],O=w[1],x=d().elementClasses;return Object(l.useEffect)((function(){y((function(e){return function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e,a()({},r,E))}))}),[E]),u.a.createElement("div",{className:x("","form-group row")},u.a.createElement("label",{htmlFor:i,className:x("","form-label col-form-label col-sm-4 text-right")},s),u.a.createElement("div",{className:x("","col-sm-8")},t({isFieldValid:E}),u.a.createElement(_,{elements:n,setFieldIsValid:O,manualError:c,model:p,required:m,type:v,value:g}),u.a.createElement(R,{elements:n,manualHelp:h})))};O.defaultProps={children:null,formElements:null,htmlFor:"",label:null,manualError:null,manualHelp:null,required:!1,type:null,value:null},O.propTypes={children:c.a.func,elementHash:c.a.number.isRequired,formElements:c.a.shape({}),htmlFor:c.a.string,label:c.a.string,manualError:c.a.string,manualHelp:c.a.oneOfType([c.a.string,c.a.node]),model:c.a.shape({}).isRequired,required:c.a.bool,type:c.a.string,value:c.a.oneOfType([c.a.string,c.a.arrayOf(c.a.string)])};var x=function Checkbox(e){var t,r=e.checked,n=e.children,a=e.elementHash,i=e.id,o=e.label,s=e.model,c=e.modelRef,h=e.parentRef,p=e.readOnly,m=e.required,v=Object(l.useContext)(f),g=v.hasShapefile,y=v.onUpdateModel,b=d().elementClasses,w=function onChange(e){y(h,c,e.target.checked)},E=!1;return i&&i.includes("use-shapefile")&&(g?t="Complex shapefiles may take longer to process. You will receive an email when your files are finished processing.":(E=!0,t=u.a.createElement("span",null,"Click"," ",u.a.createElement("b",null,"Back to Search")," ","and upload a KML or Shapefile to enable this option."))),u.a.createElement(O,{elementHash:a,formElements:n,htmlFor:i,manualHelp:t,model:s,required:m,value:r},(function(e){var t=e.isFieldValid;return u.a.createElement(u.a.Fragment,null,u.a.createElement("input",{className:b("checkbox__input","form-check-input",!t),checked:"true"===r,disabled:E,id:i,name:o,readOnly:p,type:"checkbox",onChange:w}),u.a.createElement("label",{className:b("checkbox__label","form-check-label"),htmlFor:i},o))}))};x.defaultProps={children:null,id:"",label:"",parentRef:null},x.propTypes={checked:c.a.string.isRequired,children:c.a.shape({}),elementHash:c.a.number.isRequired,id:c.a.string,label:c.a.string,model:c.a.shape({}).isRequired,modelRef:c.a.string.isRequired,parentRef:c.a.string,readOnly:c.a.bool.isRequired,required:c.a.bool.isRequired};var B=function InputField(e){var t=e.children,r=e.elementHash,n=e.id,a=e.label,i=e.model,s=e.modelRef,c=e.parentRef,h=e.placeholder,p=e.readOnly,m=e.required,v=e.type,g=e.value,y=Object(l.useState)(g),b=o()(y,2),w=b[0],E=b[1],_=Object(l.useContext)(f).onUpdateModel,R=d().elementClasses;Object(l.useEffect)((function(){E(g)}),[g]);var x=function onBlur(){_(c,s,w)},B=function onChange(e){E(e.target.value)};return u.a.createElement(O,{elementHash:r,formElements:t,htmlFor:n,label:a,model:i,required:m,type:v,value:g},(function(e){var t=e.isFieldValid;return u.a.createElement("input",{className:R("input","form-control",!t),id:n,name:a,placeholder:h,readOnly:p,type:v,value:w,onBlur:x,onChange:B})}))};B.defaultProps={children:null,id:"",parentRef:null,placeholder:"",type:null,value:""},B.propTypes={children:c.a.shape({}),elementHash:c.a.number.isRequired,id:c.a.string,label:c.a.string.isRequired,model:c.a.shape({}).isRequired,modelRef:c.a.string.isRequired,parentRef:c.a.string,placeholder:c.a.string,readOnly:c.a.bool.isRequired,required:c.a.bool.isRequired,type:c.a.string,value:c.a.string};var k=function DateTime(e){var t=e.children,r=e.elementHash,n=e.id,a=e.label,i=e.model,o=e.modelRef,l=e.parentRef,s=e.readOnly,c=e.required,f=e.value;return u.a.createElement(B,{elementHash:r,id:n,label:a,model:i,modelRef:o,parentRef:l,placeholder:"YYYY-MM-DDTHH:MM:SS",readOnly:s,required:c,type:"datetime",value:f},t)};k.defaultProps={children:null,id:"",parentRef:null,value:""},k.propTypes={children:c.a.shape({}),elementHash:c.a.number.isRequired,id:c.a.string,label:c.a.string.isRequired,model:c.a.shape({}).isRequired,modelRef:c.a.string.isRequired,parentRef:c.a.string,readOnly:c.a.bool.isRequired,required:c.a.bool.isRequired,value:c.a.string};var T=function buildParentXpath(e,t){var r=t;return e&&!t.startsWith("/")&&(r="".concat(e,"/").concat(t)),r},C=(r(23),function Group(e){var t=e.children,r=e.id,n=e.label,a=e.model,i=e.modelRef,o=e.parentRef,s=e.readOnly,c=Object(l.useContext)(f).resolver,h=d().elementClasses,p=y(i,a,c),m=h("group__header","card-header"),v=T(o,i);return u.a.createElement("div",{id:r,className:h("group","card")},n&&u.a.createElement("div",{className:m},n,u.a.createElement(R,{elements:t})),u.a.createElement("div",{className:h("group__body","card-body")},t&&Array.from(t).filter((function(e){return"help"!==e.tagName})).map((function(e){return u.a.createElement(J,{key:e.outerHTML,element:e,model:p,parentReadOnly:s,parentRef:v})}))))});C.defaultProps={children:null,id:"",label:"",modelRef:void 0,parentRef:null,readOnly:void 0},C.propTypes={children:c.a.shape({}),id:c.a.string,label:c.a.string,model:c.a.shape({}).isRequired,modelRef:c.a.string,parentRef:c.a.string,readOnly:c.a.bool};var S=function Number(e){var t=e.children,r=e.elementHash,n=e.id,a=e.label,i=e.model,o=e.modelRef,l=e.parentRef,s=e.readOnly,c=e.required,f=e.type,d=e.value;return u.a.createElement(B,{elementHash:r,id:n,label:a,model:i,modelRef:o,parentRef:l,readOnly:s,required:c,type:f,value:d},t)};S.defaultProps={children:null,id:"",parentRef:null,value:""},S.propTypes={children:c.a.shape({}),elementHash:c.a.number.isRequired,id:c.a.string,label:c.a.string.isRequired,model:c.a.shape({}).isRequired,modelRef:c.a.string.isRequired,parentRef:c.a.string,readOnly:c.a.bool.isRequired,required:c.a.bool.isRequired,type:c.a.string.isRequired,value:c.a.string};var N=function Output(e){var t=e.children,r=e.elementHash,n=e.id,a=e.label,i=e.model,o=e.type,s=e.value,c=Object(l.useContext)(f).resolver,d=s;try{null==(d=y(s,i,c))&&(d=s)}catch(e){d=s}return u.a.createElement(O,{elementHash:r,formElements:t,htmlFor:n,label:a,model:i},(function(){return u.a.createElement(u.a.Fragment,null,"anyuri"===o&&u.a.createElement("a",{className:"form-text",id:n,href:d},d),(!o||"anyuri"!==o)&&u.a.createElement("p",{className:"form-text mb-0",id:n},d))}))};N.defaultProps={children:null,id:"",type:"",value:""},N.propTypes={children:c.a.shape({}),elementHash:c.a.number.isRequired,id:c.a.string,label:c.a.string.isRequired,model:c.a.shape({}).isRequired,type:c.a.string,value:c.a.string};r(25);var P=function Range(e){var t=e.children,r=e.elementHash,n=e.id,a=e.label,i=e.max,s=e.min,c=e.model,h=e.modelRef,p=e.parentRef,m=e.readOnly,v=e.required,g=e.step,y=e.value,b=Object(l.useContext)(f).onUpdateModel,w=Object(l.useState)(y),E=o()(w,2),_=E[0],R=E[1],x=Object(l.useState)(""),B=o()(x,2),k=B[0],T=B[1],C=Object(l.useState)(""),S=o()(C,2),N=S[0],P=S[1],j=d().elementClasses;Object(l.useEffect)((function(){R(y)}),[y]),Object(l.useEffect)((function(){var e=_;_||(e=s);var t=Number(100*(e-s)/(i-s));T(25-.5*t),P(t)}),[_,i,s]);var A=function onChange(e){R(e.target.value)},I=function updateModel(e){b(p,h,e.target.value)};return u.a.createElement(O,{elementHash:r,formElements:t,htmlFor:n,label:a,model:c,required:v,value:_},(function(e){var t=e.isFieldValid;return u.a.createElement(u.a.Fragment,null,u.a.createElement("input",{className:j("range__input","form-control-range",!t),id:n,max:i,min:s,name:a,readOnly:m,step:g,type:"range",value:_||s,onChange:A,onMouseUp:I,onKeyUp:I}),u.a.createElement("div",{className:"range__markers"},u.a.createElement("span",{className:"range__min"},s),u.a.createElement("span",{className:"range__max"},i)),u.a.createElement("div",{className:"range__value",style:{left:"calc(".concat(N,"% + (").concat(k,"px))")}},u.a.createElement("span",null,_||s)))}))};P.defaultProps={children:null,id:"",parentRef:null,value:""},P.propTypes={children:c.a.shape({}),elementHash:c.a.number.isRequired,id:c.a.string,label:c.a.string.isRequired,max:c.a.string.isRequired,min:c.a.string.isRequired,model:c.a.shape({}).isRequired,modelRef:c.a.string.isRequired,parentRef:c.a.string,readOnly:c.a.bool.isRequired,required:c.a.bool.isRequired,step:c.a.string.isRequired,value:c.a.string};var j=function SecretField(e){var t=e.children,r=e.elementHash,n=e.id,a=e.label,i=e.model,o=e.modelRef,l=e.parentRef,s=e.readOnly,c=e.required,f=e.value;return u.a.createElement(B,{elementHash:r,id:n,label:a,model:i,modelRef:o,parentRef:l,readOnly:s,required:c,type:"password",value:f},t)};j.defaultProps={children:null,id:"",parentRef:null,value:""},j.propTypes={children:c.a.shape({}),elementHash:c.a.number.isRequired,id:c.a.string,label:c.a.string.isRequired,model:c.a.shape({}).isRequired,modelRef:c.a.string.isRequired,parentRef:c.a.string,readOnly:c.a.bool.isRequired,required:c.a.bool.isRequired,value:c.a.string};var A=function Select(e){var t=e.children,r=e.elementHash,n=e.id,a=e.label,i=e.model,o=e.modelRef,s=e.multiple,c=e.parentRef,h=e.readOnly,p=e.required,m=e.value,v=e.valueElementName,y=Object(l.useContext)(f).onUpdateModel,b=d().elementClasses,w=Object(l.useRef)(m),E=function onChange(e){var t=e.target.selectedOptions,r=[];Array.from(t).forEach((function(e){var t=e.attributes,n=g(t,"value");n&&r.push(n)})),y(c,o,{value:r,valueElementName:v})},_=[],R=!1;if(Array.from(t).filter((function(e){return"item"===e.tagName})).forEach((function(e){var t=e.attributes,r=g(t,"label"),n=g(t,"value");""===n&&(R=!0),_.push(u.a.createElement("option",{key:"option-".concat(n),value:n},r))})),!s&&!R&&!w.current.length){var x=" -- No selection -- ";p&&(x=" -- Select a value -- "),_.unshift(u.a.createElement("option",{key:"default option"},x))}return u.a.createElement(O,{elementHash:r,formElements:t,htmlFor:n,label:a,model:i,required:p,value:m},(function(e){var t=e.isFieldValid;return u.a.createElement("select",{className:b("select__input","form-control",!t),id:n,name:a,multiple:s,readOnly:h,value:s?m:m[0]||"",onChange:E},_)}))};A.defaultProps={children:null,id:"",label:"",multiple:!1,parentRef:null,value:[],valueElementName:""},A.propTypes={children:c.a.shape({}),elementHash:c.a.number.isRequired,id:c.a.string,label:c.a.string,model:c.a.shape({}).isRequired,modelRef:c.a.string.isRequired,multiple:c.a.bool,parentRef:c.a.string,readOnly:c.a.bool.isRequired,required:c.a.bool.isRequired,value:c.a.arrayOf(c.a.string),valueElementName:c.a.string};var I=function TextArea(e){var t=e.children,r=e.elementHash,n=e.id,a=e.label,i=e.model,s=e.modelRef,c=e.parentRef,h=e.readOnly,p=e.required,m=e.value,v=Object(l.useState)(m),g=o()(v,2),y=g[0],b=g[1],w=Object(l.useContext)(f).onUpdateModel,E=d().elementClasses;Object(l.useEffect)((function(){b(m)}),[m]);var _=function onBlur(){w(c,s,y)},R=function onChange(e){b(e.target.value)};return u.a.createElement(O,{elementHash:r,formElements:t,htmlFor:n,label:a,model:i,required:p,value:m},(function(e){var t=e.isFieldValid;return u.a.createElement("textarea",{className:E("textarea__input","form-control",!t),id:n,name:a,readOnly:h,value:y,onBlur:_,onChange:R})}))};I.defaultProps={children:null,id:"",parentRef:null,value:""},I.propTypes={children:c.a.shape({}),elementHash:c.a.number.isRequired,id:c.a.string,label:c.a.string.isRequired,model:c.a.shape({}).isRequired,modelRef:c.a.string.isRequired,parentRef:c.a.string,readOnly:c.a.bool.isRequired,required:c.a.bool.isRequired,value:c.a.string};var q=function TextField(e){var t=e.children,r=e.elementHash,n=e.id,a=e.label,i=e.model,o=e.modelRef,l=e.parentRef,s=e.readOnly,c=e.required,f=e.value;return u.a.createElement(B,{elementHash:r,id:n,label:a,model:i,modelRef:o,parentRef:l,readOnly:s,required:c,value:f},t)};q.defaultProps={children:null,id:"",parentRef:null,value:""},q.propTypes={children:c.a.shape({}),elementHash:c.a.number.isRequired,id:c.a.string,label:c.a.string.isRequired,model:c.a.shape({}).isRequired,modelRef:c.a.string.isRequired,parentRef:c.a.string,readOnly:c.a.bool.isRequired,required:c.a.bool.isRequired,value:c.a.string};var L=r(8),F=r.n(L),M=r(9),U=r.n(M),H={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},D=l.createContext&&l.createContext(H),__assign=function(){return(__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},__rest=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&(r[n[a]]=e[n[a]])}return r};function GenIcon(e){return function(t){return l.createElement(IconBase,__assign({attr:__assign({},e.attr)},t),function Tree2Element(e){return e&&e.map((function(e,t){return l.createElement(e.tag,__assign({key:t},e.attr),Tree2Element(e.child))}))}(e.child))}}function IconBase(e){var elem=function(t){var r,n=e.size||t.size||"1em";t.className&&(r=t.className),e.className&&(r=(r?r+" ":"")+e.className);var a=e.attr,i=e.title,o=__rest(e,["attr","title"]);return l.createElement("svg",__assign({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,a,o,{className:r,style:__assign({color:e.color||t.color},t.style,e.style),height:n,width:n,xmlns:"http://www.w3.org/2000/svg"}),i&&l.createElement("title",null,i),e.children)};return void 0!==D?l.createElement(D.Consumer,null,(function(e){return elem(e)})):elem(H)}var FaFolderOpen=function(e){return GenIcon({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.694 292.093L500.27 416.248A63.997 63.997 0 0 1 444.989 448H45.025c-18.523 0-30.064-20.093-20.731-36.093l72.424-124.155A64 64 0 0 1 152 256h399.964c18.523 0 30.064 20.093 20.73 36.093zM152 224h328v-48c0-26.51-21.49-48-48-48H272l-64-64H48C21.49 64 0 85.49 0 112v278.046l69.077-118.418C86.214 242.25 117.989 224 152 224z"}}]})(e)};FaFolderOpen.displayName="FaFolderOpen";var FaFolder=function(e){return GenIcon({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 128H272l-64-64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V176c0-26.51-21.49-48-48-48z"}}]})(e)};FaFolder.displayName="FaFolder";r(28);var Y=function TreeItem(e){var t=e.filterText,r=e.item,n=e.model,a=e.onChange,i=e.isFirst,s=e.isLast,c=r.checked,f=r.children,h=r.disabled,p=r.expanded,m=r.fullValue,v=r.id,g=r.isParent,y=r.label,b=r.level,w=r.relevant,E=r.required,_=Object(l.useRef)(null),R=d().elementClasses,O=Object(l.useState)(p),x=o()(O,2),B=x[0],k=x[1];Object(l.useEffect)((function(){_.current&&(_.current.indeterminate="indeterminate"===c)}),[_.current,c]);var T;if(t.length>1&&(T=r.childrenMatchFilter(t),!r.matchesFilter(t)&&!T))return null;var C=!B&&!T,S="tree-item";return S+=" ".concat("tree-item--child-".concat(b)),S+=" ".concat(g?"tree-item--is-parent":""),S+=" ".concat(i?"tree-item--is-first":""),S+=" ".concat(s?"tree-item--is-last":""),S+=" ".concat(C?"":"tree-item--is-open"),S+=" ".concat(s?"tree-item--has-blocker":""),S+=" ".concat(w?"":"tree-item--is-not-relevant"),u.a.createElement("div",{className:R(S)},u.a.createElement("div",{className:R("tree-item__header")},g&&u.a.createElement("button",{className:R("tree-item__parent-button","btn"),type:"button",onClick:function onToggleExpanded(){r.setExpanded(!B),k(!B)}},u.a.createElement(D.Provider,{value:{style:{width:"1.25em"}}},C?u.a.createElement(FaFolder,null):u.a.createElement(FaFolderOpen,null))),u.a.createElement("input",{id:v,className:R("tree-item__checkbox"),type:"checkbox",value:m,onChange:function handleChange(e){r.setChecked(e.target.checked),a()},checked:c,disabled:h,ref:_}),u.a.createElement("label",{className:R("tree-item__label"),htmlFor:v},y,!w&&u.a.createElement("span",{className:R("tree-item__irrelevant-label","ml-1 small")},"(not available)"),E&&u.a.createElement("span",{className:R("tree-item__required-label","ml-1 small")},"(required)"))),(B||T)&&function childItems(){return f.map((function(e,r){return u.a.createElement(TreeItem,{key:"".concat(e.elementHash),filterText:t,item:e,model:n,onChange:a,isFirst:0===r,isLast:r===f.length-1})}))}())};Y.defaultProps={filterText:""},Y.propTypes={filterText:c.a.string,isFirst:c.a.bool.isRequired,isLast:c.a.bool.isRequired,item:c.a.shape({checked:c.a.oneOfType([c.a.string,c.a.bool]),children:c.a.arrayOf(c.a.shape({length:c.a.number})),disabled:c.a.bool,expanded:c.a.bool,fullValue:c.a.string,id:c.a.string,isParent:c.a.bool,label:c.a.string,level:c.a.number,relevant:c.a.bool,required:c.a.bool,childrenMatchFilter:c.a.func,matchesFilter:c.a.func,setChecked:c.a.func,setExpanded:c.a.func}).isRequired,model:c.a.shape({}).isRequired,onChange:c.a.func.isRequired};var V=r(10),W=r.n(V),z=r(11),G=r.n(z);function TreeNode_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function TreeNode_objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?TreeNode_ownKeys(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):TreeNode_ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var X=function(){function TreeNode(e){W()(this,TreeNode),this.props=e,this.cascade=this.props.cascade,this.checkedFields=this.props.checkedFields,this.element=this.props.element,this.level=this.props.level||0,this.model=this.props.model,this.parentChecked=this.props.parentChecked,this.resolver=this.props.resolver,this.separator=this.props.separator,this.simplifyOutput=this.props.simplifyOutput,this.onUpdateFinished=this.props.onUpdateFinished,this.elementHash=v.a.v3(this.element.outerHTML,"seed"),this.allItems={},this.checked=!1,this.children=[],this.disabled=!1,this.expanded=1===this.level,this.relevantAttribute=void 0,this.requiredAttribute=void 0,this.totalLeafNodes=void 0,this.value=void 0,this.buildNode(e),this.setup=this.setup.bind(this),this.setupChildren=this.setupChildren.bind(this),this.updateNode=this.updateNode.bind(this),this.setExpanded=this.setExpanded.bind(this),this.getValue=this.getValue.bind(this),this.getLabel=this.getLabel.bind(this),this.getRelevant=this.getRelevant.bind(this),this.getRequired=this.getRequired.bind(this),this.getDisabled=this.getDisabled.bind(this),this.getTotalLeafNodes=this.getTotalLeafNodes.bind(this),this.getNumberSelectedNodes=this.getNumberSelectedNodes.bind(this),this.matchesFilter=this.matchesFilter.bind(this),this.childrenMatchFilter=this.childrenMatchFilter.bind(this)}return G()(TreeNode,[{key:"buildNode",value:function buildNode(e){var t=e.element,r=e.parent,n=void 0===r?{}:r,i=t.attributes,o=t.children;this.value=this.getValue(i,this.value),this.fullValue=this.getFullValue(n.fullValue,this.value),this.id=this.fullValue,this.label=this.getLabel(i,this.value),"tree"!==this.element.tagName&&(this.parent=n,this.allItems=TreeNode_objectSpread({},this.allItems,a()({},this.fullValue,this))),this.isLeaf=0===o.length,this.isParent=o.length>0,this.isChild=""!==n.fullValue,o.length&&this.setupChildren(o),this.setup(i)}},{key:"setup",value:function setup(e){this.relevant=this.getRelevant(e),this.required=this.getRequired(e),this.disabled=this.getDisabled(),this.checked=this.determineChecked(this.checkedFields.includes(this.fullValue)||this.required),this.onUpdateFinished&&this.onUpdateFinished()}},{key:"setupChildren",value:function setupChildren(e){var t=this;Array.from(e).filter((function(e){return"item"===e.tagName})).forEach((function(e){var r=new TreeNode(TreeNode_objectSpread({},t.props,{level:t.level+1,element:e,parent:t,parentChecked:t.checkedFields.includes(t.fullValue)||t.required||t.parentChecked,onUpdateFinished:void 0}));t.allItems=TreeNode_objectSpread({},t.allItems,a()({},r.fullValue,r),r.allItems),t.children.push(r)}))}},{key:"updateNode",value:function updateNode(e,t,r){this.model=t,this.checkedFields=r;var n=e.attributes;return e.children.length&&this.updateChildren(),this.setup(n),this}},{key:"updateChildren",value:function updateChildren(){var e=this;this.children.forEach((function(t){t.parentChecked=void 0,t.updateNode(t,e.model,e.checkedFields)}))}},{key:"seralize",value:function seralize(){var e=this,t=[];return Object.keys(this.allItems).forEach((function(r){var n=e.allItems[r];!0===n.checked&&t.push(n.fullValue)})),t}},{key:"simplifiedSeralize",value:function simplifiedSeralize(){var e=this,t=[];return Object.keys(this.allItems).forEach((function(r){var n=e.allItems[r],a=!1;!0===n.checked&&(n.isParent&&n.allChildrenChecked()?n.isChild&&!0!==n.parent.checked?a=!0:n.isChild||(a=!0):n.isParent||!0===n.parent.checked||(a=!0)),a&&t.push(n.fullValue)})),t}},{key:"formatFilterText",value:function formatFilterText(e){return e.trim().toLowerCase()}},{key:"matchesFilter",value:function matchesFilter(e){return-1!==this.label.toLowerCase().indexOf(this.formatFilterText(e))}},{key:"childrenMatchFilter",value:function childrenMatchFilter(e){var t=this;return this.children.some((function(r){return r.matchesFilter(t.formatFilterText(e))||r.childrenMatchFilter(t.formatFilterText(e))}))}},{key:"getTotalLeafNodes",value:function getTotalLeafNodes(){return this.totalLeafNodes||(this.totalLeafNodes=Object.values(this.allItems).reduce((function(e,t){return t.isLeaf?e+1:e}),0)),this.totalLeafNodes}},{key:"getNumberSelectedNodes",value:function getNumberSelectedNodes(){return Object.values(this.allItems).reduce((function(e,t){return t.isLeaf&&!0===t.checked?e+1:e}),0)}},{key:"getFullValue",value:function getFullValue(e,t){return!e&&t?"".concat(this.separator).concat(t):[e,t].filter(Boolean).join(this.separator)}},{key:"determineChecked",value:function determineChecked(e){return!!this.relevant&&(!(!this.cascade||!this.parent||!0!==this.parentChecked)||(this.cascade&&!this.isLeaf||null==e?!!this.allChildrenChecked()||!!this.someChildrenChecked()&&"indeterminate":e))}},{key:"setChecked",value:function setChecked(e){var t=this,r=e;"indeterminate"===this.checked&&(r=!0,this.allEnabledChildrenChecked()&&(r=!1)),this.checked=r||this.required,this.relevant||(this.checked=!1),this.cascade&&this.children.forEach((function(e){e.setChecked(t.checked)}))}},{key:"setExpanded",value:function setExpanded(e){this.expanded=e}},{key:"allChildrenChecked",value:function allChildrenChecked(){return this.children.every((function(e){return!0===e.checked}))}},{key:"allEnabledChildrenChecked",value:function allEnabledChildrenChecked(){return this.children.every((function(e){return!0===e.checked||e.getDisabled()}))}},{key:"someChildrenChecked",value:function someChildrenChecked(){return this.children.some((function(e){return!0===e.checked||"indeterminate"===e.checked}))}},{key:"getValue",value:function getValue(e,t){return void 0===t?g(e,"value"):t}},{key:"getLabel",value:function getLabel(e,t){return void 0===this.label&&(this.label=g(e,"label")||t),this.label}},{key:"getDisabled",value:function getDisabled(){return this.required||!this.relevant||this.isParent&&this.children.every((function(e){return e.getDisabled()}))}},{key:"getRelevant",value:function getRelevant(e){return void 0===this.relevantAttribute&&(this.relevantAttribute=g(e,"relevant")),null==this.relevantAttribute||b(this.relevantAttribute,this.model,this.resolver)}},{key:"getRequired",value:function getRequired(e){return void 0===this.requiredAttribute&&(this.requiredAttribute=g(e,"required")),null!=this.requiredAttribute&&b(this.requiredAttribute,this.model,this.resolver)}}]),TreeNode}();r(30);function Tree_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var K=function Tree(e){var t=e.children,r=e.element,n=e.elementHash,i=e.cascade,s=e.id,c=e.label,h=e.maxParameters,p=e.model,m=e.modelRef,v=e.parentRef,g=e.required,y=e.separator,b=e.simplifyOutput,w=e.value,E=e.valueElementName,_=Object(l.useContext)(f),R=_.model,x=_.resolver,B=_.simplifiedTree,k=_.setSimplifiedTree,T=_.onUpdateModel,C=d().elementClasses,S=Object(l.useRef)(void 0),N=Object(l.useRef)([]),P=Object(l.useState)(),j=o()(P,2)[1],A=Object(l.useCallback)((function(){return j({})}),[]),I=Object(l.useState)(0),q=o()(I,2),L=q[0],M=q[1],H=Object(l.useState)(0),D=o()(H,2),V=D[0],W=D[1],z=Object(l.useState)(null),G=o()(z,2),K=G[0],J=G[1],$=Object(l.useState)(""),Z=o()($,2),Q=Z[0],ee=Z[1],te=function updateModel(){var e=S.current.seralize();void 0!==N.current&&function isArrayEqual(e,t){if(e.length!==t.length)return!1;var r;for(r=0;r<e.length;r+=1)if(e[r]!==t[r])return!1;return!0}(e,N.current)||(b&&k(function Tree_objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Tree_ownKeys(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tree_ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},B.current,a()({},s,{parentRef:v,modelRef:m,value:S.current.simplifiedSeralize(),valueElementName:E}))),N.current=e,T(v,m,{value:e,valueElementName:E}),W(S.current.getNumberSelectedNodes()))};Object(l.useEffect)((function(){S.current=new X({cascade:i,checkedFields:w,element:r,model:p,resolver:x,separator:y,simplifyOutput:b,onUpdateFinished:A}),te(),M(S.current.getTotalLeafNodes()),W(S.current.getNumberSelectedNodes())}),[]),Object(l.useEffect)((function(){!b&&h&&(V>parseInt(h,10)?J("No more than ".concat(h," parameters can be selected.")):J(null))}),[V]);var re=function updateTreeModel(){S.current=S.current.updateNode(r,p,w)},ne=function(){var e=U()(F.a.mark((function _callee(){return F.a.wrap((function _callee$(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,re();case 2:return e.next=4,te();case 4:case"end":return e.stop()}}),_callee)})));return function update(){return e.apply(this,arguments)}}();if(Object(l.useEffect)((function(){ne()}),[R]),!S.current)return u.a.createElement("div",null,"Loading...");var ae=function onChange(){te()},ie=function onFilterChange(e){var t=e.target.value;ee(t)},oe=function onFilterClear(){ee("")};return u.a.createElement(O,{elementHash:n,formElements:t,htmlFor:s,label:c,manualError:K,model:p,required:g,value:w},(function(e){var t=e.isFieldValid;return u.a.createElement(u.a.Fragment,null,u.a.createElement("div",{className:C("tree","",!t)},u.a.createElement("div",{className:C("tree__filter")},u.a.createElement("label",{className:C("tree__filter-label","sr-only"),htmlFor:"tree_filter_input"},"Filter"),u.a.createElement("div",{className:C("tree__filter-input-group","input-group input-group-sm mb-2 mt-1")},u.a.createElement("div",{className:C("tree__filter-input-group-prepend","input-group-prepend input-group-prepend-sm")},u.a.createElement("div",{className:"input-group-text"},"Filter")),u.a.createElement("input",{id:"tree_filter_input",name:"tree_filter_input",className:C("tree__filter-input","form-control form-control-sm"),placeholder:"Enter text to filter bands",value:Q,onChange:ie}),u.a.createElement("div",{className:C("tree__filter-input-append tree__filter-input-append--clear","input-group-append")},u.a.createElement("button",{type:"button",label:"Clear",value:"",className:C("tree__filter-clear-button","btn btn-outline-secondary form-control-sm"),onClick:oe},u.a.createElement("span",{className:C("tree__filter-clear-button-text","")},"Clear"))))),u.a.createElement("div",{className:C("tree__node-count","mb-3")},u.a.createElement("span",{className:C("tree__node-count-text","text-secondary small")},V," ","of"," ",L," ","bands selected")),u.a.createElement("div",{className:"tree__list-wrapper"},u.a.createElement("div",{className:"tree__list"},function nodeList(){return S.current.children.map((function(e,t){return u.a.createElement(Y,{key:"".concat(e.elementHash),filterText:Q,item:e,model:p,onChange:ae,isFirst:0===t,isLast:t===S.current.children.length-1})}))}()))))}))};K.defaultProps={children:null,id:"",label:"",maxParameters:null,parentRef:null,value:[],valueElementName:""},K.propTypes={cascade:c.a.bool.isRequired,children:c.a.shape({}),element:c.a.shape({}).isRequired,elementHash:c.a.number.isRequired,id:c.a.string,label:c.a.string,maxParameters:c.a.string,model:c.a.shape({outerHTML:c.a.string}).isRequired,modelRef:c.a.string.isRequired,parentRef:c.a.string,required:c.a.bool.isRequired,separator:c.a.string.isRequired,simplifyOutput:c.a.bool.isRequired,value:c.a.arrayOf(c.a.string),valueElementName:c.a.string};var J=function FormElement(e){var t=e.element,r=e.parentReadOnly,n=e.parentRef,i=e.model,o=Object(l.useContext)(f),s=o.resolver,c=o.setRelevantFields,d=Object(l.useRef)(void 0),h=Object(l.useRef)(void 0),m=Object(l.useRef)(void 0),w=Object(l.useRef)(void 0),E=Object(l.useRef)(void 0),_=Object(l.useRef)(void 0),R=Object(l.useRef)(void 0),O=Object(l.useRef)(void 0),B=Object(l.useRef)(void 0),T=Object(l.useRef)(void 0),L=Object(l.useRef)(void 0),F=Object(l.useRef)(void 0),M=Object(l.useRef)(void 0),U=Object(l.useRef)(void 0),H=Object(l.useRef)(void 0),D=Object(l.useRef)(void 0),Y=v.a.v3(t.outerHTML,"seed"),V=t.attributes,W=t.children,z=t.tagName;if(!V)return null;void 0===R.current&&(R.current=g(V,"ref")),void 0===T.current&&(T.current=g(V,"relevant"));var G=!0;if(T.current&&(G=b(T.current,i,s,!0)),c(a()({},Y,G)),function setRelevantAttribute(e,t,r,n){if(!r)return e;var a=y(r,e,t);n?a.removeAttribute("irrelevant"):a.setAttribute("irrelevant",!n)}(i,s,R.current,G),!G)return null;var X=!1;r?X=r:(void 0===B.current&&(B.current=g(V,"readonly")),B.current&&(X=b(B.current,i,s,!0))),void 0===L.current&&(L.current=g(V,"required"));var J,$=!1;L.current&&($=b(L.current,i,s,!0)),void 0===m.current&&(m.current=g(V,"label")),void 0===h.current&&(h.current=g(V,"id")),J=R.current?b(R.current,i,s,!1,"tree"===z):g(V,"value");var Z={elementHash:Y,id:h.current,label:m.current,model:i,modelRef:R.current,parentRef:n,readOnly:X,required:$,value:J};return void 0===H.current&&(H.current=function derivedType(e){return e?e.toLowerCase().includes("boolean")?"boolean":e.toLowerCase().includes("datetime")?"datetime":e.toLowerCase().includes("double")?"double":e.toLowerCase().includes("long")?"long":e.toLowerCase().includes("int")?"int":e.toLowerCase().includes("short")?"short":e.toLowerCase().includes("anyuri")?"anyuri":"string":"string"}(g(V,"type"))),"input"===z?"boolean"===H.current?u.a.createElement(x,p()({checked:J},Z),W):"datetime"===H.current?u.a.createElement(k,Z,W):"double"===H.current||"long"===H.current||"int"===H.current||"short"===H.current?u.a.createElement(S,p()({},Z,{type:H.current}),W):u.a.createElement(q,Z,W):"textarea"===z?u.a.createElement(I,Z,W):"secret"===z?u.a.createElement(j,Z,W):"select"===z||"selectref"===z?(void 0===O.current&&(O.current=g(V,"multiple")),void 0===D.current&&(D.current=g(V,"valueElementName")),"selectref"===z&&null===D.current&&(D.current="value"),u.a.createElement(A,p()({},Z,{multiple:"true"===O.current,value:Array.from(J),valueElementName:D.current}),W)):"range"===z?(void 0===w.current&&(w.current=g(V,"end")),void 0===_.current&&(_.current=g(V,"start")),void 0===U.current&&(U.current=g(V,"step")),u.a.createElement(P,p()({},Z,{max:w.current,min:_.current,step:U.current}),W)):"output"===z?u.a.createElement(N,p()({},Z,{type:H.current}),W):"group"===z?u.a.createElement(C,Z,W):"tree"===z?(void 0===d.current&&(d.current="true"===(g(V,"cascade")||"true")),void 0===E.current&&(E.current=g(V,"maxParameters")),void 0===F.current&&(F.current=g(V,"separator")),void 0===M.current&&(M.current="true"===(g(V,"simplifyOutput")||"true")),void 0===D.current&&(D.current=g(V,"valueElementName")||J),u.a.createElement(K,p()({},Z,{element:t,cascade:d.current,maxParameters:E.current,separator:F.current,simplifyOutput:M.current,valueElementName:D.current}),W)):u.a.createElement("p",null,z)};J.defaultProps={parentReadOnly:void 0,parentRef:null},J.propTypes={element:c.a.shape({attributes:c.a.shape({}),children:c.a.shape({}),outerHTML:c.a.string,tagName:c.a.string}).isRequired,model:c.a.shape({}).isRequired,parentReadOnly:c.a.bool,parentRef:c.a.string};var $=function FormBody(e){var t=e.className,r=e.model,n=e.ui,a=d().elementClasses,i="form";return i+=" ".concat(t),u.a.createElement("div",{className:a(i,"card")},u.a.createElement("div",{className:a("form__body","card-body")},n.childElementCount>0&&Array.from(n.children).map((function(e){return u.a.createElement(J,{key:e.outerHTML,element:e,model:r})}))))};$.defaultProps={className:null},$.propTypes={className:c.a.string,model:c.a.shape({}).isRequired,ui:c.a.shape({childElementCount:c.a.number,children:c.a.shape({})}).isRequired};var Z=r(12),Q=r.n(Z),ee=function updateModel(e,t,r,n){var a=y(r,e.firstElementChild,t);if(a||console.warn("Unable to update model value, value is:",a,r,e.outerHTML),"object"===Q()(n)){var i=n.value,o=n.valueElementName,l=a.namespaceURI,u=[a.prefix,o].filter(Boolean).join(":");a.innerHTML=i.map((function(e){var t=document.createElementNS(l,u);return t.textContent=e,t.outerHTML})).join("")}else a.textContent=n;return e},te=function pruneModel(e){return e.querySelectorAll("[irrelevant=true]").forEach((function(e){return e.parentNode.removeChild(e)})),e};function src_ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}r.d(t,"EDSCEchoform",(function(){return re}));var re=function EDSCEchoform(e){var t=e.addBootstrapClasses,r=e.className,n=e.defaultRawModel,i=e.form,s=e.hasShapefile,c=e.prepopulateValues,d=e.onFormModelUpdated,h=e.onFormIsValidUpdated,p=Object(l.useState)({}),m=o()(p,2),v=m[0],g=m[1],y=Object(l.useState)({}),b=o()(y,2),w=b[0],E=b[1],_=Object(l.useState)({}),R=o()(_,2),O=R[0],x=R[1],B=Object(l.useRef)(void 0),k=Object(l.useState)(Date.now()),C=o()(k,2),S=C[0],N=C[1],P=Object(l.useRef)(void 0),j=Object(l.useRef)({}),A=function getFormDoc(){var e=i;n&&(e=i.replace(/(?:<instance>)(?:.|\n)*(?:<\/instance>)/,"<instance>\n".concat(n,"\n</instance>")));var t=function parseXml(e){var t;try{window.DOMParser?t=(new DOMParser).parseFromString(e,"text/xml"):((t=new ActiveXObject("Microsoft.XMLDOM")).async=!1,t.loadXML(e))}catch(e){}return t&&t.documentElement&&!t.getElementsByTagName("parsererror").length||console.error("Invalid XML: ".concat(e)),t}(e.replace(/>\s+</g,"><").replace(/^\s+|\s+$/g,""));return P.current=function buildXPathResolverFn(e){var t,r={},n=/\sxmlns(?::(\w+))?="([^"]+)"/g;for(t=n.exec(e.firstChild.outerHTML);null!=t;){var a=Array.from(t.slice(1,3)),i=o()(a,2),l=i[0],u=i[1];r[null!=l?l:" default "]=u,t=n.exec(e.firstChild.outerHTML)}return function(e){return r[null!==e?e:" default "]}}(t),t},I=function extendModelWithPrepopulateValues(e,t){return function handlePrepopulateExtension(e,t,r){if(!c||!e)return t;var n=t;return Array.from(e.children).filter((function(e){return"pre:expression"===e.tagName})).forEach((function(e){var t=e.getAttribute("ref"),a=e.getAttribute("source");null!=c[a]&&(n=ee(n,r,t,c[a]))})),n}(e.evaluate('//*[local-name()="extension" and @name="pre:prepopulate"]/*',e,P.current,XPathResult.ANY_TYPE,null).iterateNext(),t,P.current)},q=function setupForm(){var e=A(),t=e.evaluate('//*[local-name()="instance"]',e,P.current,XPathResult.ANY_TYPE,null).iterateNext(),r=I(e,t.cloneNode(!0)),n=e.evaluate('//*[local-name()="ui"]',e,P.current,XPathResult.ANY_TYPE,null).iterateNext();N(Date.now()),x({}),B.current=void 0,g(r),E(n)};Object(l.useEffect)((function(){q()}),[i]),Object(l.useEffect)((function(){if(v.outerHTML){var e=A(),t=I(e,v.cloneNode(!0));g(t)}}),[c]),Object(l.useEffect)((function(){v.outerHTML&&!n&&q()}),[n]),Object(l.useEffect)((function(){var e=Object.keys(O).filter((function(e){var t=O[e];return j.current[e]&&!t}));h(!e.length)}),[O,j]),Object(l.useEffect)((function(){if(v.outerHTML){var e=v.cloneNode(!0);void 0!==B.current&&Object.values(B.current).forEach((function(t){var r=t.parentRef,n=t.modelRef,a=t.value,i=t.valueElementName,o=n;r&&(o="".concat(r,"/").concat(n)),e=ee(e,P.current,o,{value:a,valueElementName:i})})),d({model:te(e.cloneNode(!0)).innerHTML,rawModel:e.innerHTML})}}),[v]);return v.firstElementChild?u.a.createElement(f.Provider,{value:{addBootstrapClasses:t,hasShapefile:s,model:v.firstElementChild.innerHTML,onUpdateModel:function onUpdateModel(e,t,r){var n=T(e,t),a=ee(v.cloneNode(!0),P.current,n,r);g(a)},resolver:P.current,setFormIsValid:x,setRelevantFields:function setRelevantFields(e){j.current=function src_objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?src_ownKeys(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):src_ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},j.current,{},e)},setSimplifiedTree:function setSimplifiedTree(e){B.current=e},simplifiedTree:B}},u.a.createElement($,{className:r,key:S,ui:w,model:v.firstElementChild})):null};re.defaultProps={addBootstrapClasses:!1,className:null,defaultRawModel:null,hasShapefile:!1,prepopulateValues:null},re.propTypes={addBootstrapClasses:c.a.bool,className:c.a.string,defaultRawModel:c.a.string,form:c.a.string.isRequired,hasShapefile:c.a.bool,prepopulateValues:c.a.shape({}),onFormModelUpdated:c.a.func.isRequired,onFormIsValidUpdated:c.a.func.isRequired};t.default=re}]);
|
|
7
|
+
*/var s=o(742),u=o(645);a.Buffer=Buffer,a.SlowBuffer=function SlowBuffer(i){+i!=i&&(i=0);return Buffer.alloc(+i)},a.INSPECT_MAX_BYTES=50;function createBuffer(i){if(i>2147483647)throw new RangeError('The value "'+i+'" is invalid for option "size"');var a=new Uint8Array(i);return a.__proto__=Buffer.prototype,a}function Buffer(i,a,o){if("number"==typeof i){if("string"==typeof a)throw new TypeError('The "string" argument must be of type string. Received type number');return allocUnsafe(i)}return from(i,a,o)}function from(i,a,o){if("string"==typeof i)return function fromString(i,a){"string"==typeof a&&""!==a||(a="utf8");if(!Buffer.isEncoding(a))throw new TypeError("Unknown encoding: "+a);var o=0|byteLength(i,a),s=createBuffer(o),u=s.write(i,a);u!==o&&(s=s.slice(0,u));return s}(i,a);if(ArrayBuffer.isView(i))return fromArrayLike(i);if(null==i)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof i);if(isInstance(i,ArrayBuffer)||i&&isInstance(i.buffer,ArrayBuffer))return function fromArrayBuffer(i,a,o){if(a<0||i.byteLength<a)throw new RangeError('"offset" is outside of buffer bounds');if(i.byteLength<a+(o||0))throw new RangeError('"length" is outside of buffer bounds');var s;s=void 0===a&&void 0===o?new Uint8Array(i):void 0===o?new Uint8Array(i,a):new Uint8Array(i,a,o);return s.__proto__=Buffer.prototype,s}(i,a,o);if("number"==typeof i)throw new TypeError('The "value" argument must not be of type number. Received type number');var s=i.valueOf&&i.valueOf();if(null!=s&&s!==i)return Buffer.from(s,a,o);var u=function fromObject(i){if(Buffer.isBuffer(i)){var a=0|checked(i.length),o=createBuffer(a);return 0===o.length||i.copy(o,0,0,a),o}if(void 0!==i.length)return"number"!=typeof i.length||numberIsNaN(i.length)?createBuffer(0):fromArrayLike(i);if("Buffer"===i.type&&Array.isArray(i.data))return fromArrayLike(i.data)}(i);if(u)return u;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof i[Symbol.toPrimitive])return Buffer.from(i[Symbol.toPrimitive]("string"),a,o);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof i)}function assertSize(i){if("number"!=typeof i)throw new TypeError('"size" argument must be of type number');if(i<0)throw new RangeError('The value "'+i+'" is invalid for option "size"')}function allocUnsafe(i){return assertSize(i),createBuffer(i<0?0:0|checked(i))}function fromArrayLike(i){for(var a=i.length<0?0:0|checked(i.length),o=createBuffer(a),s=0;s<a;s+=1)o[s]=255&i[s];return o}function checked(i){if(i>=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647..toString(16)+" bytes");return 0|i}function byteLength(i,a){if(Buffer.isBuffer(i))return i.length;if(ArrayBuffer.isView(i)||isInstance(i,ArrayBuffer))return i.byteLength;if("string"!=typeof i)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof i);var o=i.length,s=arguments.length>2&&!0===arguments[2];if(!s&&0===o)return 0;for(var u=!1;;)switch(a){case"ascii":case"latin1":case"binary":return o;case"utf8":case"utf-8":return utf8ToBytes(i).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*o;case"hex":return o>>>1;case"base64":return base64ToBytes(i).length;default:if(u)return s?-1:utf8ToBytes(i).length;a=(""+a).toLowerCase(),u=!0}}function slowToString(i,a,o){var s=!1;if((void 0===a||a<0)&&(a=0),a>this.length)return"";if((void 0===o||o>this.length)&&(o=this.length),o<=0)return"";if((o>>>=0)<=(a>>>=0))return"";for(i||(i="utf8");;)switch(i){case"hex":return hexSlice(this,a,o);case"utf8":case"utf-8":return utf8Slice(this,a,o);case"ascii":return asciiSlice(this,a,o);case"latin1":case"binary":return latin1Slice(this,a,o);case"base64":return base64Slice(this,a,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,a,o);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(i+"").toLowerCase(),s=!0}}function swap(i,a,o){var s=i[a];i[a]=i[o],i[o]=s}function bidirectionalIndexOf(i,a,o,s,u){if(0===i.length)return-1;if("string"==typeof o?(s=o,o=0):o>2147483647?o=2147483647:o<-2147483648&&(o=-2147483648),numberIsNaN(o=+o)&&(o=u?0:i.length-1),o<0&&(o=i.length+o),o>=i.length){if(u)return-1;o=i.length-1}else if(o<0){if(!u)return-1;o=0}if("string"==typeof a&&(a=Buffer.from(a,s)),Buffer.isBuffer(a))return 0===a.length?-1:arrayIndexOf(i,a,o,s,u);if("number"==typeof a)return a&=255,"function"==typeof Uint8Array.prototype.indexOf?u?Uint8Array.prototype.indexOf.call(i,a,o):Uint8Array.prototype.lastIndexOf.call(i,a,o):arrayIndexOf(i,[a],o,s,u);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(i,a,o,s,u){var l,h=1,d=i.length,p=a.length;if(void 0!==s&&("ucs2"===(s=String(s).toLowerCase())||"ucs-2"===s||"utf16le"===s||"utf-16le"===s)){if(i.length<2||a.length<2)return-1;h=2,d/=2,p/=2,o/=2}function read(i,a){return 1===h?i[a]:i.readUInt16BE(a*h)}if(u){var m=-1;for(l=o;l<d;l++)if(read(i,l)===read(a,-1===m?0:l-m)){if(-1===m&&(m=l),l-m+1===p)return m*h}else-1!==m&&(l-=l-m),m=-1}else for(o+p>d&&(o=d-p),l=o;l>=0;l--){for(var y=!0,g=0;g<p;g++)if(read(i,l+g)!==read(a,g)){y=!1;break}if(y)return l}return-1}function hexWrite(i,a,o,s){o=Number(o)||0;var u=i.length-o;s?(s=Number(s))>u&&(s=u):s=u;var l=a.length;s>l/2&&(s=l/2);for(var h=0;h<s;++h){var d=parseInt(a.substr(2*h,2),16);if(numberIsNaN(d))return h;i[o+h]=d}return h}function utf8Write(i,a,o,s){return blitBuffer(utf8ToBytes(a,i.length-o),i,o,s)}function asciiWrite(i,a,o,s){return blitBuffer(function asciiToBytes(i){for(var a=[],o=0;o<i.length;++o)a.push(255&i.charCodeAt(o));return a}(a),i,o,s)}function latin1Write(i,a,o,s){return asciiWrite(i,a,o,s)}function base64Write(i,a,o,s){return blitBuffer(base64ToBytes(a),i,o,s)}function ucs2Write(i,a,o,s){return blitBuffer(function utf16leToBytes(i,a){for(var o,s,u,l=[],h=0;h<i.length&&!((a-=2)<0);++h)o=i.charCodeAt(h),s=o>>8,u=o%256,l.push(u),l.push(s);return l}(a,i.length-o),i,o,s)}function base64Slice(i,a,o){return 0===a&&o===i.length?s.fromByteArray(i):s.fromByteArray(i.slice(a,o))}function utf8Slice(i,a,o){o=Math.min(i.length,o);for(var s=[],u=a;u<o;){var l,h,d,p,m=i[u],y=null,g=m>239?4:m>223?3:m>191?2:1;if(u+g<=o)switch(g){case 1:m<128&&(y=m);break;case 2:128==(192&(l=i[u+1]))&&(p=(31&m)<<6|63&l)>127&&(y=p);break;case 3:l=i[u+1],h=i[u+2],128==(192&l)&&128==(192&h)&&(p=(15&m)<<12|(63&l)<<6|63&h)>2047&&(p<55296||p>57343)&&(y=p);break;case 4:l=i[u+1],h=i[u+2],d=i[u+3],128==(192&l)&&128==(192&h)&&128==(192&d)&&(p=(15&m)<<18|(63&l)<<12|(63&h)<<6|63&d)>65535&&p<1114112&&(y=p)}null===y?(y=65533,g=1):y>65535&&(y-=65536,s.push(y>>>10&1023|55296),y=56320|1023&y),s.push(y),u+=g}return function decodeCodePointsArray(i){var a=i.length;if(a<=4096)return String.fromCharCode.apply(String,i);var o="",s=0;for(;s<a;)o+=String.fromCharCode.apply(String,i.slice(s,s+=4096));return o}(s)}a.kMaxLength=2147483647,Buffer.TYPED_ARRAY_SUPPORT=function typedArraySupport(){try{var i=new Uint8Array(1);return i.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===i.foo()}catch(i){return!1}}(),Buffer.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(Buffer.prototype,"parent",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.buffer}}),Object.defineProperty(Buffer.prototype,"offset",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&Buffer[Symbol.species]===Buffer&&Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),Buffer.poolSize=8192,Buffer.from=function(i,a,o){return from(i,a,o)},Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array,Buffer.alloc=function(i,a,o){return function alloc(i,a,o){return assertSize(i),i<=0?createBuffer(i):void 0!==a?"string"==typeof o?createBuffer(i).fill(a,o):createBuffer(i).fill(a):createBuffer(i)}(i,a,o)},Buffer.allocUnsafe=function(i){return allocUnsafe(i)},Buffer.allocUnsafeSlow=function(i){return allocUnsafe(i)},Buffer.isBuffer=function isBuffer(i){return null!=i&&!0===i._isBuffer&&i!==Buffer.prototype},Buffer.compare=function compare(i,a){if(isInstance(i,Uint8Array)&&(i=Buffer.from(i,i.offset,i.byteLength)),isInstance(a,Uint8Array)&&(a=Buffer.from(a,a.offset,a.byteLength)),!Buffer.isBuffer(i)||!Buffer.isBuffer(a))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(i===a)return 0;for(var o=i.length,s=a.length,u=0,l=Math.min(o,s);u<l;++u)if(i[u]!==a[u]){o=i[u],s=a[u];break}return o<s?-1:s<o?1:0},Buffer.isEncoding=function isEncoding(i){switch(String(i).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Buffer.concat=function concat(i,a){if(!Array.isArray(i))throw new TypeError('"list" argument must be an Array of Buffers');if(0===i.length)return Buffer.alloc(0);var o;if(void 0===a)for(a=0,o=0;o<i.length;++o)a+=i[o].length;var s=Buffer.allocUnsafe(a),u=0;for(o=0;o<i.length;++o){var l=i[o];if(isInstance(l,Uint8Array)&&(l=Buffer.from(l)),!Buffer.isBuffer(l))throw new TypeError('"list" argument must be an Array of Buffers');l.copy(s,u),u+=l.length}return s},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function swap16(){var i=this.length;if(i%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var a=0;a<i;a+=2)swap(this,a,a+1);return this},Buffer.prototype.swap32=function swap32(){var i=this.length;if(i%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var a=0;a<i;a+=4)swap(this,a,a+3),swap(this,a+1,a+2);return this},Buffer.prototype.swap64=function swap64(){var i=this.length;if(i%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var a=0;a<i;a+=8)swap(this,a,a+7),swap(this,a+1,a+6),swap(this,a+2,a+5),swap(this,a+3,a+4);return this},Buffer.prototype.toString=function toString(){var i=this.length;return 0===i?"":0===arguments.length?utf8Slice(this,0,i):slowToString.apply(this,arguments)},Buffer.prototype.toLocaleString=Buffer.prototype.toString,Buffer.prototype.equals=function equals(i){if(!Buffer.isBuffer(i))throw new TypeError("Argument must be a Buffer");return this===i||0===Buffer.compare(this,i)},Buffer.prototype.inspect=function inspect(){var i="",o=a.INSPECT_MAX_BYTES;return i=this.toString("hex",0,o).replace(/(.{2})/g,"$1 ").trim(),this.length>o&&(i+=" ... "),"<Buffer "+i+">"},Buffer.prototype.compare=function compare(i,a,o,s,u){if(isInstance(i,Uint8Array)&&(i=Buffer.from(i,i.offset,i.byteLength)),!Buffer.isBuffer(i))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof i);if(void 0===a&&(a=0),void 0===o&&(o=i?i.length:0),void 0===s&&(s=0),void 0===u&&(u=this.length),a<0||o>i.length||s<0||u>this.length)throw new RangeError("out of range index");if(s>=u&&a>=o)return 0;if(s>=u)return-1;if(a>=o)return 1;if(this===i)return 0;for(var l=(u>>>=0)-(s>>>=0),h=(o>>>=0)-(a>>>=0),d=Math.min(l,h),p=this.slice(s,u),m=i.slice(a,o),y=0;y<d;++y)if(p[y]!==m[y]){l=p[y],h=m[y];break}return l<h?-1:h<l?1:0},Buffer.prototype.includes=function includes(i,a,o){return-1!==this.indexOf(i,a,o)},Buffer.prototype.indexOf=function indexOf(i,a,o){return bidirectionalIndexOf(this,i,a,o,!0)},Buffer.prototype.lastIndexOf=function lastIndexOf(i,a,o){return bidirectionalIndexOf(this,i,a,o,!1)},Buffer.prototype.write=function write(i,a,o,s){if(void 0===a)s="utf8",o=this.length,a=0;else if(void 0===o&&"string"==typeof a)s=a,o=this.length,a=0;else{if(!isFinite(a))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");a>>>=0,isFinite(o)?(o>>>=0,void 0===s&&(s="utf8")):(s=o,o=void 0)}var u=this.length-a;if((void 0===o||o>u)&&(o=u),i.length>0&&(o<0||a<0)||a>this.length)throw new RangeError("Attempt to write outside buffer bounds");s||(s="utf8");for(var l=!1;;)switch(s){case"hex":return hexWrite(this,i,a,o);case"utf8":case"utf-8":return utf8Write(this,i,a,o);case"ascii":return asciiWrite(this,i,a,o);case"latin1":case"binary":return latin1Write(this,i,a,o);case"base64":return base64Write(this,i,a,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,i,a,o);default:if(l)throw new TypeError("Unknown encoding: "+s);s=(""+s).toLowerCase(),l=!0}},Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function asciiSlice(i,a,o){var s="";o=Math.min(i.length,o);for(var u=a;u<o;++u)s+=String.fromCharCode(127&i[u]);return s}function latin1Slice(i,a,o){var s="";o=Math.min(i.length,o);for(var u=a;u<o;++u)s+=String.fromCharCode(i[u]);return s}function hexSlice(i,a,o){var s=i.length;(!a||a<0)&&(a=0),(!o||o<0||o>s)&&(o=s);for(var u="",l=a;l<o;++l)u+=toHex(i[l]);return u}function utf16leSlice(i,a,o){for(var s=i.slice(a,o),u="",l=0;l<s.length;l+=2)u+=String.fromCharCode(s[l]+256*s[l+1]);return u}function checkOffset(i,a,o){if(i%1!=0||i<0)throw new RangeError("offset is not uint");if(i+a>o)throw new RangeError("Trying to access beyond buffer length")}function checkInt(i,a,o,s,u,l){if(!Buffer.isBuffer(i))throw new TypeError('"buffer" argument must be a Buffer instance');if(a>u||a<l)throw new RangeError('"value" argument is out of bounds');if(o+s>i.length)throw new RangeError("Index out of range")}function checkIEEE754(i,a,o,s,u,l){if(o+s>i.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("Index out of range")}function writeFloat(i,a,o,s,l){return a=+a,o>>>=0,l||checkIEEE754(i,0,o,4),u.write(i,a,o,s,23,4),o+4}function writeDouble(i,a,o,s,l){return a=+a,o>>>=0,l||checkIEEE754(i,0,o,8),u.write(i,a,o,s,52,8),o+8}Buffer.prototype.slice=function slice(i,a){var o=this.length;(i=~~i)<0?(i+=o)<0&&(i=0):i>o&&(i=o),(a=void 0===a?o:~~a)<0?(a+=o)<0&&(a=0):a>o&&(a=o),a<i&&(a=i);var s=this.subarray(i,a);return s.__proto__=Buffer.prototype,s},Buffer.prototype.readUIntLE=function readUIntLE(i,a,o){i>>>=0,a>>>=0,o||checkOffset(i,a,this.length);for(var s=this[i],u=1,l=0;++l<a&&(u*=256);)s+=this[i+l]*u;return s},Buffer.prototype.readUIntBE=function readUIntBE(i,a,o){i>>>=0,a>>>=0,o||checkOffset(i,a,this.length);for(var s=this[i+--a],u=1;a>0&&(u*=256);)s+=this[i+--a]*u;return s},Buffer.prototype.readUInt8=function readUInt8(i,a){return i>>>=0,a||checkOffset(i,1,this.length),this[i]},Buffer.prototype.readUInt16LE=function readUInt16LE(i,a){return i>>>=0,a||checkOffset(i,2,this.length),this[i]|this[i+1]<<8},Buffer.prototype.readUInt16BE=function readUInt16BE(i,a){return i>>>=0,a||checkOffset(i,2,this.length),this[i]<<8|this[i+1]},Buffer.prototype.readUInt32LE=function readUInt32LE(i,a){return i>>>=0,a||checkOffset(i,4,this.length),(this[i]|this[i+1]<<8|this[i+2]<<16)+16777216*this[i+3]},Buffer.prototype.readUInt32BE=function readUInt32BE(i,a){return i>>>=0,a||checkOffset(i,4,this.length),16777216*this[i]+(this[i+1]<<16|this[i+2]<<8|this[i+3])},Buffer.prototype.readIntLE=function readIntLE(i,a,o){i>>>=0,a>>>=0,o||checkOffset(i,a,this.length);for(var s=this[i],u=1,l=0;++l<a&&(u*=256);)s+=this[i+l]*u;return s>=(u*=128)&&(s-=Math.pow(2,8*a)),s},Buffer.prototype.readIntBE=function readIntBE(i,a,o){i>>>=0,a>>>=0,o||checkOffset(i,a,this.length);for(var s=a,u=1,l=this[i+--s];s>0&&(u*=256);)l+=this[i+--s]*u;return l>=(u*=128)&&(l-=Math.pow(2,8*a)),l},Buffer.prototype.readInt8=function readInt8(i,a){return i>>>=0,a||checkOffset(i,1,this.length),128&this[i]?-1*(255-this[i]+1):this[i]},Buffer.prototype.readInt16LE=function readInt16LE(i,a){i>>>=0,a||checkOffset(i,2,this.length);var o=this[i]|this[i+1]<<8;return 32768&o?4294901760|o:o},Buffer.prototype.readInt16BE=function readInt16BE(i,a){i>>>=0,a||checkOffset(i,2,this.length);var o=this[i+1]|this[i]<<8;return 32768&o?4294901760|o:o},Buffer.prototype.readInt32LE=function readInt32LE(i,a){return i>>>=0,a||checkOffset(i,4,this.length),this[i]|this[i+1]<<8|this[i+2]<<16|this[i+3]<<24},Buffer.prototype.readInt32BE=function readInt32BE(i,a){return i>>>=0,a||checkOffset(i,4,this.length),this[i]<<24|this[i+1]<<16|this[i+2]<<8|this[i+3]},Buffer.prototype.readFloatLE=function readFloatLE(i,a){return i>>>=0,a||checkOffset(i,4,this.length),u.read(this,i,!0,23,4)},Buffer.prototype.readFloatBE=function readFloatBE(i,a){return i>>>=0,a||checkOffset(i,4,this.length),u.read(this,i,!1,23,4)},Buffer.prototype.readDoubleLE=function readDoubleLE(i,a){return i>>>=0,a||checkOffset(i,8,this.length),u.read(this,i,!0,52,8)},Buffer.prototype.readDoubleBE=function readDoubleBE(i,a){return i>>>=0,a||checkOffset(i,8,this.length),u.read(this,i,!1,52,8)},Buffer.prototype.writeUIntLE=function writeUIntLE(i,a,o,s){(i=+i,a>>>=0,o>>>=0,s)||checkInt(this,i,a,o,Math.pow(2,8*o)-1,0);var u=1,l=0;for(this[a]=255&i;++l<o&&(u*=256);)this[a+l]=i/u&255;return a+o},Buffer.prototype.writeUIntBE=function writeUIntBE(i,a,o,s){(i=+i,a>>>=0,o>>>=0,s)||checkInt(this,i,a,o,Math.pow(2,8*o)-1,0);var u=o-1,l=1;for(this[a+u]=255&i;--u>=0&&(l*=256);)this[a+u]=i/l&255;return a+o},Buffer.prototype.writeUInt8=function writeUInt8(i,a,o){return i=+i,a>>>=0,o||checkInt(this,i,a,1,255,0),this[a]=255&i,a+1},Buffer.prototype.writeUInt16LE=function writeUInt16LE(i,a,o){return i=+i,a>>>=0,o||checkInt(this,i,a,2,65535,0),this[a]=255&i,this[a+1]=i>>>8,a+2},Buffer.prototype.writeUInt16BE=function writeUInt16BE(i,a,o){return i=+i,a>>>=0,o||checkInt(this,i,a,2,65535,0),this[a]=i>>>8,this[a+1]=255&i,a+2},Buffer.prototype.writeUInt32LE=function writeUInt32LE(i,a,o){return i=+i,a>>>=0,o||checkInt(this,i,a,4,4294967295,0),this[a+3]=i>>>24,this[a+2]=i>>>16,this[a+1]=i>>>8,this[a]=255&i,a+4},Buffer.prototype.writeUInt32BE=function writeUInt32BE(i,a,o){return i=+i,a>>>=0,o||checkInt(this,i,a,4,4294967295,0),this[a]=i>>>24,this[a+1]=i>>>16,this[a+2]=i>>>8,this[a+3]=255&i,a+4},Buffer.prototype.writeIntLE=function writeIntLE(i,a,o,s){if(i=+i,a>>>=0,!s){var u=Math.pow(2,8*o-1);checkInt(this,i,a,o,u-1,-u)}var l=0,h=1,d=0;for(this[a]=255&i;++l<o&&(h*=256);)i<0&&0===d&&0!==this[a+l-1]&&(d=1),this[a+l]=(i/h>>0)-d&255;return a+o},Buffer.prototype.writeIntBE=function writeIntBE(i,a,o,s){if(i=+i,a>>>=0,!s){var u=Math.pow(2,8*o-1);checkInt(this,i,a,o,u-1,-u)}var l=o-1,h=1,d=0;for(this[a+l]=255&i;--l>=0&&(h*=256);)i<0&&0===d&&0!==this[a+l+1]&&(d=1),this[a+l]=(i/h>>0)-d&255;return a+o},Buffer.prototype.writeInt8=function writeInt8(i,a,o){return i=+i,a>>>=0,o||checkInt(this,i,a,1,127,-128),i<0&&(i=255+i+1),this[a]=255&i,a+1},Buffer.prototype.writeInt16LE=function writeInt16LE(i,a,o){return i=+i,a>>>=0,o||checkInt(this,i,a,2,32767,-32768),this[a]=255&i,this[a+1]=i>>>8,a+2},Buffer.prototype.writeInt16BE=function writeInt16BE(i,a,o){return i=+i,a>>>=0,o||checkInt(this,i,a,2,32767,-32768),this[a]=i>>>8,this[a+1]=255&i,a+2},Buffer.prototype.writeInt32LE=function writeInt32LE(i,a,o){return i=+i,a>>>=0,o||checkInt(this,i,a,4,2147483647,-2147483648),this[a]=255&i,this[a+1]=i>>>8,this[a+2]=i>>>16,this[a+3]=i>>>24,a+4},Buffer.prototype.writeInt32BE=function writeInt32BE(i,a,o){return i=+i,a>>>=0,o||checkInt(this,i,a,4,2147483647,-2147483648),i<0&&(i=4294967295+i+1),this[a]=i>>>24,this[a+1]=i>>>16,this[a+2]=i>>>8,this[a+3]=255&i,a+4},Buffer.prototype.writeFloatLE=function writeFloatLE(i,a,o){return writeFloat(this,i,a,!0,o)},Buffer.prototype.writeFloatBE=function writeFloatBE(i,a,o){return writeFloat(this,i,a,!1,o)},Buffer.prototype.writeDoubleLE=function writeDoubleLE(i,a,o){return writeDouble(this,i,a,!0,o)},Buffer.prototype.writeDoubleBE=function writeDoubleBE(i,a,o){return writeDouble(this,i,a,!1,o)},Buffer.prototype.copy=function copy(i,a,o,s){if(!Buffer.isBuffer(i))throw new TypeError("argument should be a Buffer");if(o||(o=0),s||0===s||(s=this.length),a>=i.length&&(a=i.length),a||(a=0),s>0&&s<o&&(s=o),s===o)return 0;if(0===i.length||0===this.length)return 0;if(a<0)throw new RangeError("targetStart out of bounds");if(o<0||o>=this.length)throw new RangeError("Index out of range");if(s<0)throw new RangeError("sourceEnd out of bounds");s>this.length&&(s=this.length),i.length-a<s-o&&(s=i.length-a+o);var u=s-o;if(this===i&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(a,o,s);else if(this===i&&o<a&&a<s)for(var l=u-1;l>=0;--l)i[l+a]=this[l+o];else Uint8Array.prototype.set.call(i,this.subarray(o,s),a);return u},Buffer.prototype.fill=function fill(i,a,o,s){if("string"==typeof i){if("string"==typeof a?(s=a,a=0,o=this.length):"string"==typeof o&&(s=o,o=this.length),void 0!==s&&"string"!=typeof s)throw new TypeError("encoding must be a string");if("string"==typeof s&&!Buffer.isEncoding(s))throw new TypeError("Unknown encoding: "+s);if(1===i.length){var u=i.charCodeAt(0);("utf8"===s&&u<128||"latin1"===s)&&(i=u)}}else"number"==typeof i&&(i&=255);if(a<0||this.length<a||this.length<o)throw new RangeError("Out of range index");if(o<=a)return this;var l;if(a>>>=0,o=void 0===o?this.length:o>>>0,i||(i=0),"number"==typeof i)for(l=a;l<o;++l)this[l]=i;else{var h=Buffer.isBuffer(i)?i:Buffer.from(i,s),d=h.length;if(0===d)throw new TypeError('The value "'+i+'" is invalid for argument "value"');for(l=0;l<o-a;++l)this[l+a]=h[l%d]}return this};var l=/[^+/0-9A-Za-z-_]/g;function toHex(i){return i<16?"0"+i.toString(16):i.toString(16)}function utf8ToBytes(i,a){var o;a=a||1/0;for(var s=i.length,u=null,l=[],h=0;h<s;++h){if((o=i.charCodeAt(h))>55295&&o<57344){if(!u){if(o>56319){(a-=3)>-1&&l.push(239,191,189);continue}if(h+1===s){(a-=3)>-1&&l.push(239,191,189);continue}u=o;continue}if(o<56320){(a-=3)>-1&&l.push(239,191,189),u=o;continue}o=65536+(u-55296<<10|o-56320)}else u&&(a-=3)>-1&&l.push(239,191,189);if(u=null,o<128){if((a-=1)<0)break;l.push(o)}else if(o<2048){if((a-=2)<0)break;l.push(o>>6|192,63&o|128)}else if(o<65536){if((a-=3)<0)break;l.push(o>>12|224,o>>6&63|128,63&o|128)}else{if(!(o<1114112))throw new Error("Invalid code point");if((a-=4)<0)break;l.push(o>>18|240,o>>12&63|128,o>>6&63|128,63&o|128)}}return l}function base64ToBytes(i){return s.toByteArray(function base64clean(i){if((i=(i=i.split("=")[0]).trim().replace(l,"")).length<2)return"";for(;i.length%4!=0;)i+="=";return i}(i))}function blitBuffer(i,a,o,s){for(var u=0;u<s&&!(u+o>=a.length||u>=i.length);++u)a[u+o]=i[u];return u}function isInstance(i,a){return i instanceof a||null!=i&&null!=i.constructor&&null!=i.constructor.name&&i.constructor.name===a.name}function numberIsNaN(i){return i!=i}},517:(i,a,o)=>{(a=o(879)(!1)).push([i.id,".group{margin-bottom:1rem}",""]),i.exports=a},787:(i,a,o)=>{(a=o(879)(!1)).push([i.id,".range__markers{width:100%;display:flex;justify-content:space-between}.range__min,.range__max{font-size:.75rem}.range__input{-webkit-appearance:none;width:100%;height:10px;border-radius:5px;background:#d3d3d3;outline:none;opacity:.7;-webkit-transition:.2s;transition:opacity .2s}.range__input:hover{opacity:1}.range__input::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;border-radius:50%;background:#4caf50;cursor:pointer}.range__input::-moz-range-thumb{width:20px;height:20px;border-radius:50%;background:#4caf50;cursor:pointer}.range__value{position:absolute;top:50%}.range__value span{width:30px;height:24px;line-height:24px;text-align:center;background:#03a9f4;color:#fff;font-size:12px;display:block;position:absolute;left:50%;transform:translate(-50%, 0);border-radius:6px}",""]),i.exports=a},145:(i,a,o)=>{(a=o(879)(!1)).push([i.id,'.tree__filter-clear-button.btn-outline-secondary{border-color:#ced4da}.tree__list-wrapper{overflow-y:scroll;position:relative}.tree__list{position:relative;left:-0.125rem;padding-top:.5rem;padding-left:1.75rem;margin-bottom:1rem}.tree__list:before{content:"";position:absolute;top:-0.75rem;left:.625rem;height:calc(100% + .125rem);border-left:1px solid #ced4da;z-index:0}.tree__list:after{content:"";position:absolute;top:-0.25rem;left:.625rem;height:.5rem;width:1px;z-index:1;background-image:linear-gradient(to bottom, rgb(255, 255, 255) 0%, rgba(255, 255, 255, 0) 100%)}',""]),i.exports=a},762:(i,a,o)=>{(a=o(879)(!1)).push([i.id,'.tree-item{position:relative;margin-left:1.625rem;margin-bottom:.325rem}.tree-item__header{vertical-align:middle;display:flex;align-items:center;height:1.5rem;margin-bottom:.325rem;margin-left:.1rem}.tree-item--is-first>.tree-item__header:after{content:"";position:absolute;top:-0.5rem;left:-1.125rem;height:.5rem;width:1px;z-index:1;background-image:linear-gradient(to bottom, rgb(255, 255, 255) 0%, rgba(255, 255, 255, 0) 100%)}.tree-item--has-blocker>.tree-item__header:before{content:"";position:absolute;top:.775rem;left:-1.125rem;z-index:1;width:1px;height:calc(100% - 1.25rem);min-height:.5rem;background:#fff}.tree-item--is-not-relevant .tree-item__header{cursor:not-allowed}.tree-item--is-not-relevant .tree-item__header:hover{cursor:not-allowed}.tree-item:before{content:"";position:absolute;top:.75rem;left:-1.125rem;width:.75rem;border-bottom:1px solid #ced4da}.tree-item--is-parent:after{content:"";position:absolute;top:1.5rem;left:.5rem;height:calc(100% - 1.925rem);border-left:1px solid #ced4da}.tree-item--child-1{margin-left:0}.tree-item--is-not-relevant{color:#6c757d}.tree-item__parent-button{position:relative;right:.3rem}.tree-item__parent-button.btn{padding:.125rem}.tree-item__parent-button svg{fill:#fff981}.tree-item__parent-button path{stroke-width:35;stroke:#ebd604}.tree-item__checkbox{margin-right:.5rem;transform:scale(0.925)}.tree-item--is-not-relevant .tree-item__checkbox{cursor:not-allowed}.tree-item--is-not-relevant .tree-item__checkbox:hover{cursor:not-allowed}.tree-item__label{display:flex;align-items:center;margin-bottom:0;margin-left:.1rem;white-space:nowrap;font-size:.875rem;line-height:1.375}.tree-item--is-not-relevant .tree-item__label{cursor:not-allowed}.tree-item--is-not-relevant .tree-item__label:hover{cursor:not-allowed}.tree-item__irrelevant-label{font-style:italic}.tree-item__required-label{font-style:italic;color:#b11}',""]),i.exports=a},879:i=>{"use strict";i.exports=function(i){var a=[];return a.toString=function toString(){return this.map((function(a){var o=function cssWithMappingToString(i,a){var o=i[1]||"",s=i[3];if(!s)return o;if(a&&"function"==typeof btoa){var u=function toComment(i){var a=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a);return"/*# ".concat(o," */")}(s),l=s.sources.map((function(i){return"/*# sourceURL=".concat(s.sourceRoot||"").concat(i," */")}));return[o].concat(l).concat([u]).join("\n")}return[o].join("\n")}(a,i);return a[2]?"@media ".concat(a[2]," {").concat(o,"}"):o})).join("")},a.i=function(i,o,s){"string"==typeof i&&(i=[[null,i,""]]);var u={};if(s)for(var l=0;l<this.length;l++){var h=this[l][0];null!=h&&(u[h]=!0)}for(var d=0;d<i.length;d++){var p=[].concat(i[d]);s&&u[p[0]]||(o&&(p[2]?p[2]="".concat(o," and ").concat(p[2]):p[2]=o),a.push(p))}},a}},437:function(i,a,o){"use strict";var s=this&&this.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(a,"__esModule",{value:!0});var u=s(o(419)),l=o(888),h={compareElementValues:!0},d={compact:!0,ignoreDoctype:!0,ignoreDeclaration:!0,ignoreAttributes:!0},compareObjects=function(i,a,o,s,l){var h=[],d=Object.keys(i),p=Object.keys(a);return u.default.union(d,p).forEach((function(m){var y=(s||"")+m,g=o[m]||{};if(!u.default.contains(d,m)){if(g.skipKey)return;var v={path:y,resultType:"missing element",message:"field "+y+" not present in lhs"};return h.push(v)}if(!g.skipKey){if(l.compareElementValues){var b=void 0,E=void 0;if(void 0!==i[m]&&(b=i[m].toString()),void 0!==a[m]&&(E=a[m].toString()),void 0!==E&&b!==E&&"*"!==b){v={path:y,resultType:"difference in element value",message:"field "+y+" has lhs value "+JSON.stringify(i[m],null,1)+" and rhs value "+JSON.stringify(a[m],null,1)};return h.push(v)}}if(!u.default.contains(p,m)){if(g.skipKey)return;v={path:y,resultType:"missing element",message:"field "+y+" not present in rhs"};return h.push(v)}if(u.default.isArray(i[m]))for(var T=0;T<i[m].length;T++){var N=i[m][T],O=a[m][T];if(""===N&&""===O)return;if("false"===N&&"false"===O)return;if(0===N&&0===O)return;if(!O){v={path:y,resultType:"missing element",message:"field "+y+"["+T+"] not present in rhs"};return h.push(v)}if(!N){v={path:y,resultType:"missing element",message:"element "+y+"["+T+"] not present in lhs"};return h.push(v)}u.default.isObject(i[m][T])&&u.default.isObject(a[m][T])&&(h=h.concat(compareObjects(i[m][T],a[m][T],o,y+"["+T+"].",l)))}else u.default.isObject(i[m])&&(h=h.concat(compareObjects(i[m],a[m],o,y+".",l)))}})),h};function adjustXMLforDiff(i){return i.replace(/({"_text":)("?(.*?)"?)(})/g,"$2")}a.diff=function diff(i,a,o,s,l){l(compareObjects(i,a,o||{},null,u.default.extend({},h,s)))},a.diffAsXml=function diffAsXml(i,a,o,s,p){var m=u.default.extend({},d);s&&s.xml2jsOptions&&u.default.extend(m,s.xml2jsOptions);var y=l.xml2json(i,m),g=l.xml2json(a,m),v=adjustXMLforDiff(y),b=adjustXMLforDiff(g),E=JSON.parse(v),T=JSON.parse(b);p(compareObjects(E,T,o||{},null,u.default.extend({},h,s)))}},624:i=>{function Emitter(i){if(i)return function mixin(i){for(var a in Emitter.prototype)i[a]=Emitter.prototype[a];return i}(i)}i.exports=Emitter,Emitter.prototype.on=Emitter.prototype.addEventListener=function(i,a){return this._callbacks=this._callbacks||{},(this._callbacks[i]=this._callbacks[i]||[]).push(a),this},Emitter.prototype.once=function(i,a){var o=this;function on(){o.off(i,on),a.apply(this,arguments)}return this._callbacks=this._callbacks||{},on.fn=a,this.on(i,on),this},Emitter.prototype.off=Emitter.prototype.removeListener=Emitter.prototype.removeAllListeners=Emitter.prototype.removeEventListener=function(i,a){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var o,s=this._callbacks[i];if(!s)return this;if(1==arguments.length)return delete this._callbacks[i],this;for(var u=0;u<s.length;u++)if((o=s[u])===a||o.fn===a){s.splice(u,1);break}return this},Emitter.prototype.emit=function(i){this._callbacks=this._callbacks||{};var a=[].slice.call(arguments,1),o=this._callbacks[i];if(o)for(var s=0,u=(o=o.slice(0)).length;s<u;++s)o[s].apply(this,a);return this},Emitter.prototype.listeners=function(i){return this._callbacks=this._callbacks||{},this._callbacks[i]||[]},Emitter.prototype.hasListeners=function(i){return!!this.listeners(i).length}},645:(i,a)=>{
|
|
8
|
+
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
9
|
+
a.read=function(i,a,o,s,u){var l,h,d=8*u-s-1,p=(1<<d)-1,m=p>>1,y=-7,g=o?u-1:0,v=o?-1:1,b=i[a+g];for(g+=v,l=b&(1<<-y)-1,b>>=-y,y+=d;y>0;l=256*l+i[a+g],g+=v,y-=8);for(h=l&(1<<-y)-1,l>>=-y,y+=s;y>0;h=256*h+i[a+g],g+=v,y-=8);if(0===l)l=1-m;else{if(l===p)return h?NaN:1/0*(b?-1:1);h+=Math.pow(2,s),l-=m}return(b?-1:1)*h*Math.pow(2,l-s)},a.write=function(i,a,o,s,u,l){var h,d,p,m=8*l-u-1,y=(1<<m)-1,g=y>>1,v=23===u?Math.pow(2,-24)-Math.pow(2,-77):0,b=s?0:l-1,E=s?1:-1,T=a<0||0===a&&1/a<0?1:0;for(a=Math.abs(a),isNaN(a)||a===1/0?(d=isNaN(a)?1:0,h=y):(h=Math.floor(Math.log(a)/Math.LN2),a*(p=Math.pow(2,-h))<1&&(h--,p*=2),(a+=h+g>=1?v/p:v*Math.pow(2,1-g))*p>=2&&(h++,p/=2),h+g>=y?(d=0,h=y):h+g>=1?(d=(a*p-1)*Math.pow(2,u),h+=g):(d=a*Math.pow(2,g-1)*Math.pow(2,u),h=0));u>=8;i[o+b]=255&d,b+=E,d/=256,u-=8);for(h=h<<u|d,m+=u;m>0;i[o+b]=255&h,b+=E,h/=256,m-=8);i[o+b-E]|=128*T}},53:i=>{!function(){const createBuffer=i=>(new TextEncoder).encode(i);function MurmurHashV3(i,a){var o,s,u,l,h,d,p,m;for("string"==typeof i&&(i=createBuffer(i)),o=3&i.length,s=i.length-o,u=a,h=3432918353,d=461845907,m=0;m<s;)p=255&i[m]|(255&i[++m])<<8|(255&i[++m])<<16|(255&i[++m])<<24,++m,u=27492+(65535&(l=5*(65535&(u=(u^=p=(65535&(p=(p=(65535&p)*h+(((p>>>16)*h&65535)<<16)&4294967295)<<15|p>>>17))*d+(((p>>>16)*d&65535)<<16)&4294967295)<<13|u>>>19))+((5*(u>>>16)&65535)<<16)&4294967295))+((58964+(l>>>16)&65535)<<16);switch(p=0,o){case 3:p^=(255&i[m+2])<<16;case 2:p^=(255&i[m+1])<<8;case 1:u^=p=(65535&(p=(p=(65535&(p^=255&i[m]))*h+(((p>>>16)*h&65535)<<16)&4294967295)<<15|p>>>17))*d+(((p>>>16)*d&65535)<<16)&4294967295}return u^=i.length,u=2246822507*(65535&(u^=u>>>16))+((2246822507*(u>>>16)&65535)<<16)&4294967295,u=3266489909*(65535&(u^=u>>>13))+((3266489909*(u>>>16)&65535)<<16)&4294967295,(u^=u>>>16)>>>0}var a=MurmurHashV3;a.v2=function MurmurHashV2(i,a){"string"==typeof i&&(i=createBuffer(i));for(var o,s=i.length,u=a^s,l=0;s>=4;)o=1540483477*(65535&(o=255&i[l]|(255&i[++l])<<8|(255&i[++l])<<16|(255&i[++l])<<24))+((1540483477*(o>>>16)&65535)<<16),u=1540483477*(65535&u)+((1540483477*(u>>>16)&65535)<<16)^(o=1540483477*(65535&(o^=o>>>24))+((1540483477*(o>>>16)&65535)<<16)),s-=4,++l;switch(s){case 3:u^=(255&i[l+2])<<16;case 2:u^=(255&i[l+1])<<8;case 1:u=1540483477*(65535&(u^=255&i[l]))+((1540483477*(u>>>16)&65535)<<16)}return u=1540483477*(65535&(u^=u>>>13))+((1540483477*(u>>>16)&65535)<<16),(u^=u>>>15)>>>0},a.v3=MurmurHashV3,i.exports=a}()},703:(i,a,o)=>{"use strict";var s=o(414);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,i.exports=function(){function shim(i,a,o,u,l,h){if(h!==s){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}function getShim(){return shim}shim.isRequired=shim;var i={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return i.PropTypes=i,i}},697:(i,a,o)=>{i.exports=o(703)()},414:i=>{"use strict";i.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},99:(i,a,o)=>{!function(i){i.parser=function(i,a){return new SAXParser(i,a)},i.SAXParser=SAXParser,i.SAXStream=SAXStream,i.createStream=function createStream(i,a){return new SAXStream(i,a)},i.MAX_BUFFER_LENGTH=65536;var a,s=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function SAXParser(a,o){if(!(this instanceof SAXParser))return new SAXParser(a,o);!function clearBuffers(i){for(var a=0,o=s.length;a<o;a++)i[s[a]]=""}(this),this.q=this.c="",this.bufferCheckPosition=i.MAX_BUFFER_LENGTH,this.opt=o||{},this.opt.lowercase=this.opt.lowercase||this.opt.lowercasetags,this.looseCase=this.opt.lowercase?"toLowerCase":"toUpperCase",this.tags=[],this.closed=this.closedRoot=this.sawRoot=!1,this.tag=this.error=null,this.strict=!!a,this.noscript=!(!a&&!this.opt.noscript),this.state=E.BEGIN,this.strictEntities=this.opt.strictEntities,this.ENTITIES=this.strictEntities?Object.create(i.XML_ENTITIES):Object.create(i.ENTITIES),this.attribList=[],this.opt.xmlns&&(this.ns=Object.create(h)),this.trackPosition=!1!==this.opt.position,this.trackPosition&&(this.position=this.line=this.column=0),emit(this,"onready")}i.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(i){function F(){}return F.prototype=i,new F}),Object.keys||(Object.keys=function(i){var a=[];for(var o in i)i.hasOwnProperty(o)&&a.push(o);return a}),SAXParser.prototype={end:function(){end(this)},write:function write(a){if(this.error)throw this.error;if(this.closed)return error(this,"Cannot write after close. Assign an onready handler.");if(null===a)return end(this);"object"==typeof a&&(a=a.toString());var o=0,u="";for(;u=charAt(a,o++),this.c=u,u;)switch(this.trackPosition&&(this.position++,"\n"===u?(this.line++,this.column=0):this.column++),this.state){case E.BEGIN:if(this.state=E.BEGIN_WHITESPACE,"\ufeff"===u)continue;beginWhiteSpace(this,u);continue;case E.BEGIN_WHITESPACE:beginWhiteSpace(this,u);continue;case E.TEXT:if(this.sawRoot&&!this.closedRoot){for(var l=o-1;u&&"<"!==u&&"&"!==u;)(u=charAt(a,o++))&&this.trackPosition&&(this.position++,"\n"===u?(this.line++,this.column=0):this.column++);this.textNode+=a.substring(l,o-1)}"<"!==u||this.sawRoot&&this.closedRoot&&!this.strict?(isWhitespace(u)||this.sawRoot&&!this.closedRoot||strictFail(this,"Text data outside of root node."),"&"===u?this.state=E.TEXT_ENTITY:this.textNode+=u):(this.state=E.OPEN_WAKA,this.startTagPosition=this.position);continue;case E.SCRIPT:"<"===u?this.state=E.SCRIPT_ENDING:this.script+=u;continue;case E.SCRIPT_ENDING:"/"===u?this.state=E.CLOSE_TAG:(this.script+="<"+u,this.state=E.SCRIPT);continue;case E.OPEN_WAKA:if("!"===u)this.state=E.SGML_DECL,this.sgmlDecl="";else if(isWhitespace(u));else if(isMatch(d,u))this.state=E.OPEN_TAG,this.tagName=u;else if("/"===u)this.state=E.CLOSE_TAG,this.tagName="";else if("?"===u)this.state=E.PROC_INST,this.procInstName=this.procInstBody="";else{if(strictFail(this,"Unencoded <"),this.startTagPosition+1<this.position){var h=this.position-this.startTagPosition;u=new Array(h).join(" ")+u}this.textNode+="<"+u,this.state=E.TEXT}continue;case E.SGML_DECL:"[CDATA["===(this.sgmlDecl+u).toUpperCase()?(emitNode(this,"onopencdata"),this.state=E.CDATA,this.sgmlDecl="",this.cdata=""):this.sgmlDecl+u==="--"?(this.state=E.COMMENT,this.comment="",this.sgmlDecl=""):"DOCTYPE"===(this.sgmlDecl+u).toUpperCase()?(this.state=E.DOCTYPE,(this.doctype||this.sawRoot)&&strictFail(this,"Inappropriately located doctype declaration"),this.doctype="",this.sgmlDecl=""):">"===u?(emitNode(this,"onsgmldeclaration",this.sgmlDecl),this.sgmlDecl="",this.state=E.TEXT):isQuote(u)?(this.state=E.SGML_DECL_QUOTED,this.sgmlDecl+=u):this.sgmlDecl+=u;continue;case E.SGML_DECL_QUOTED:u===this.q&&(this.state=E.SGML_DECL,this.q=""),this.sgmlDecl+=u;continue;case E.DOCTYPE:">"===u?(this.state=E.TEXT,emitNode(this,"ondoctype",this.doctype),this.doctype=!0):(this.doctype+=u,"["===u?this.state=E.DOCTYPE_DTD:isQuote(u)&&(this.state=E.DOCTYPE_QUOTED,this.q=u));continue;case E.DOCTYPE_QUOTED:this.doctype+=u,u===this.q&&(this.q="",this.state=E.DOCTYPE);continue;case E.DOCTYPE_DTD:this.doctype+=u,"]"===u?this.state=E.DOCTYPE:isQuote(u)&&(this.state=E.DOCTYPE_DTD_QUOTED,this.q=u);continue;case E.DOCTYPE_DTD_QUOTED:this.doctype+=u,u===this.q&&(this.state=E.DOCTYPE_DTD,this.q="");continue;case E.COMMENT:"-"===u?this.state=E.COMMENT_ENDING:this.comment+=u;continue;case E.COMMENT_ENDING:"-"===u?(this.state=E.COMMENT_ENDED,this.comment=textopts(this.opt,this.comment),this.comment&&emitNode(this,"oncomment",this.comment),this.comment=""):(this.comment+="-"+u,this.state=E.COMMENT);continue;case E.COMMENT_ENDED:">"!==u?(strictFail(this,"Malformed comment"),this.comment+="--"+u,this.state=E.COMMENT):this.state=E.TEXT;continue;case E.CDATA:"]"===u?this.state=E.CDATA_ENDING:this.cdata+=u;continue;case E.CDATA_ENDING:"]"===u?this.state=E.CDATA_ENDING_2:(this.cdata+="]"+u,this.state=E.CDATA);continue;case E.CDATA_ENDING_2:">"===u?(this.cdata&&emitNode(this,"oncdata",this.cdata),emitNode(this,"onclosecdata"),this.cdata="",this.state=E.TEXT):"]"===u?this.cdata+="]":(this.cdata+="]]"+u,this.state=E.CDATA);continue;case E.PROC_INST:"?"===u?this.state=E.PROC_INST_ENDING:isWhitespace(u)?this.state=E.PROC_INST_BODY:this.procInstName+=u;continue;case E.PROC_INST_BODY:if(!this.procInstBody&&isWhitespace(u))continue;"?"===u?this.state=E.PROC_INST_ENDING:this.procInstBody+=u;continue;case E.PROC_INST_ENDING:">"===u?(emitNode(this,"onprocessinginstruction",{name:this.procInstName,body:this.procInstBody}),this.procInstName=this.procInstBody="",this.state=E.TEXT):(this.procInstBody+="?"+u,this.state=E.PROC_INST_BODY);continue;case E.OPEN_TAG:isMatch(p,u)?this.tagName+=u:(newTag(this),">"===u?openTag(this):"/"===u?this.state=E.OPEN_TAG_SLASH:(isWhitespace(u)||strictFail(this,"Invalid character in tag name"),this.state=E.ATTRIB));continue;case E.OPEN_TAG_SLASH:">"===u?(openTag(this,!0),closeTag(this)):(strictFail(this,"Forward-slash in opening tag not followed by >"),this.state=E.ATTRIB);continue;case E.ATTRIB:if(isWhitespace(u))continue;">"===u?openTag(this):"/"===u?this.state=E.OPEN_TAG_SLASH:isMatch(d,u)?(this.attribName=u,this.attribValue="",this.state=E.ATTRIB_NAME):strictFail(this,"Invalid attribute name");continue;case E.ATTRIB_NAME:"="===u?this.state=E.ATTRIB_VALUE:">"===u?(strictFail(this,"Attribute without value"),this.attribValue=this.attribName,attrib(this),openTag(this)):isWhitespace(u)?this.state=E.ATTRIB_NAME_SAW_WHITE:isMatch(p,u)?this.attribName+=u:strictFail(this,"Invalid attribute name");continue;case E.ATTRIB_NAME_SAW_WHITE:if("="===u)this.state=E.ATTRIB_VALUE;else{if(isWhitespace(u))continue;strictFail(this,"Attribute without value"),this.tag.attributes[this.attribName]="",this.attribValue="",emitNode(this,"onattribute",{name:this.attribName,value:""}),this.attribName="",">"===u?openTag(this):isMatch(d,u)?(this.attribName=u,this.state=E.ATTRIB_NAME):(strictFail(this,"Invalid attribute name"),this.state=E.ATTRIB)}continue;case E.ATTRIB_VALUE:if(isWhitespace(u))continue;isQuote(u)?(this.q=u,this.state=E.ATTRIB_VALUE_QUOTED):(strictFail(this,"Unquoted attribute value"),this.state=E.ATTRIB_VALUE_UNQUOTED,this.attribValue=u);continue;case E.ATTRIB_VALUE_QUOTED:if(u!==this.q){"&"===u?this.state=E.ATTRIB_VALUE_ENTITY_Q:this.attribValue+=u;continue}attrib(this),this.q="",this.state=E.ATTRIB_VALUE_CLOSED;continue;case E.ATTRIB_VALUE_CLOSED:isWhitespace(u)?this.state=E.ATTRIB:">"===u?openTag(this):"/"===u?this.state=E.OPEN_TAG_SLASH:isMatch(d,u)?(strictFail(this,"No whitespace between attributes"),this.attribName=u,this.attribValue="",this.state=E.ATTRIB_NAME):strictFail(this,"Invalid attribute name");continue;case E.ATTRIB_VALUE_UNQUOTED:if(!isAttribEnd(u)){"&"===u?this.state=E.ATTRIB_VALUE_ENTITY_U:this.attribValue+=u;continue}attrib(this),">"===u?openTag(this):this.state=E.ATTRIB;continue;case E.CLOSE_TAG:if(this.tagName)">"===u?closeTag(this):isMatch(p,u)?this.tagName+=u:this.script?(this.script+="</"+this.tagName,this.tagName="",this.state=E.SCRIPT):(isWhitespace(u)||strictFail(this,"Invalid tagname in closing tag"),this.state=E.CLOSE_TAG_SAW_WHITE);else{if(isWhitespace(u))continue;notMatch(d,u)?this.script?(this.script+="</"+u,this.state=E.SCRIPT):strictFail(this,"Invalid tagname in closing tag."):this.tagName=u}continue;case E.CLOSE_TAG_SAW_WHITE:if(isWhitespace(u))continue;">"===u?closeTag(this):strictFail(this,"Invalid characters in closing tag");continue;case E.TEXT_ENTITY:case E.ATTRIB_VALUE_ENTITY_Q:case E.ATTRIB_VALUE_ENTITY_U:var g,v;switch(this.state){case E.TEXT_ENTITY:g=E.TEXT,v="textNode";break;case E.ATTRIB_VALUE_ENTITY_Q:g=E.ATTRIB_VALUE_QUOTED,v="attribValue";break;case E.ATTRIB_VALUE_ENTITY_U:g=E.ATTRIB_VALUE_UNQUOTED,v="attribValue"}";"===u?(this[v]+=parseEntity(this),this.entity="",this.state=g):isMatch(this.entity.length?y:m,u)?this.entity+=u:(strictFail(this,"Invalid character in entity name"),this[v]+="&"+this.entity+u,this.entity="",this.state=g);continue;default:throw new Error(this,"Unknown state: "+this.state)}this.position>=this.bufferCheckPosition&&function checkBufferLength(a){for(var o=Math.max(i.MAX_BUFFER_LENGTH,10),u=0,l=0,h=s.length;l<h;l++){var d=a[s[l]].length;if(d>o)switch(s[l]){case"textNode":closeText(a);break;case"cdata":emitNode(a,"oncdata",a.cdata),a.cdata="";break;case"script":emitNode(a,"onscript",a.script),a.script="";break;default:error(a,"Max buffer length exceeded: "+s[l])}u=Math.max(u,d)}var p=i.MAX_BUFFER_LENGTH-u;a.bufferCheckPosition=p+a.position}(this);return this}
|
|
10
|
+
/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){!function flushBuffers(i){closeText(i),""!==i.cdata&&(emitNode(i,"oncdata",i.cdata),i.cdata=""),""!==i.script&&(emitNode(i,"onscript",i.script),i.script="")}(this)}};try{a=o(86).Stream}catch(i){a=function(){}}var u=i.EVENTS.filter((function(i){return"error"!==i&&"end"!==i}));function SAXStream(i,o){if(!(this instanceof SAXStream))return new SAXStream(i,o);a.apply(this),this._parser=new SAXParser(i,o),this.writable=!0,this.readable=!0;var s=this;this._parser.onend=function(){s.emit("end")},this._parser.onerror=function(i){s.emit("error",i),s._parser.error=null},this._decoder=null,u.forEach((function(i){Object.defineProperty(s,"on"+i,{get:function(){return s._parser["on"+i]},set:function(a){if(!a)return s.removeAllListeners(i),s._parser["on"+i]=a,a;s.on(i,a)},enumerable:!0,configurable:!1})}))}SAXStream.prototype=Object.create(a.prototype,{constructor:{value:SAXStream}}),SAXStream.prototype.write=function(i){if("function"==typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(i)){if(!this._decoder){var a=o(553).s;this._decoder=new a("utf8")}i=this._decoder.write(i)}return this._parser.write(i.toString()),this.emit("data",i),!0},SAXStream.prototype.end=function(i){return i&&i.length&&this.write(i),this._parser.end(),!0},SAXStream.prototype.on=function(i,o){var s=this;return s._parser["on"+i]||-1===u.indexOf(i)||(s._parser["on"+i]=function(){var a=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);a.splice(0,0,i),s.emit.apply(s,a)}),a.prototype.on.call(s,i,o)};var l="http://www.w3.org/XML/1998/namespace",h={xml:l,xmlns:"http://www.w3.org/2000/xmlns/"},d=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,p=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,m=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,y=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function isWhitespace(i){return" "===i||"\n"===i||"\r"===i||"\t"===i}function isQuote(i){return'"'===i||"'"===i}function isAttribEnd(i){return">"===i||isWhitespace(i)}function isMatch(i,a){return i.test(a)}function notMatch(i,a){return!isMatch(i,a)}var g,v,b,E=0;for(var T in i.STATE={BEGIN:E++,BEGIN_WHITESPACE:E++,TEXT:E++,TEXT_ENTITY:E++,OPEN_WAKA:E++,SGML_DECL:E++,SGML_DECL_QUOTED:E++,DOCTYPE:E++,DOCTYPE_QUOTED:E++,DOCTYPE_DTD:E++,DOCTYPE_DTD_QUOTED:E++,COMMENT_STARTING:E++,COMMENT:E++,COMMENT_ENDING:E++,COMMENT_ENDED:E++,CDATA:E++,CDATA_ENDING:E++,CDATA_ENDING_2:E++,PROC_INST:E++,PROC_INST_BODY:E++,PROC_INST_ENDING:E++,OPEN_TAG:E++,OPEN_TAG_SLASH:E++,ATTRIB:E++,ATTRIB_NAME:E++,ATTRIB_NAME_SAW_WHITE:E++,ATTRIB_VALUE:E++,ATTRIB_VALUE_QUOTED:E++,ATTRIB_VALUE_CLOSED:E++,ATTRIB_VALUE_UNQUOTED:E++,ATTRIB_VALUE_ENTITY_Q:E++,ATTRIB_VALUE_ENTITY_U:E++,CLOSE_TAG:E++,CLOSE_TAG_SAW_WHITE:E++,SCRIPT:E++,SCRIPT_ENDING:E++},i.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},i.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(i.ENTITIES).forEach((function(a){var o=i.ENTITIES[a],s="number"==typeof o?String.fromCharCode(o):o;i.ENTITIES[a]=s})),i.STATE)i.STATE[i.STATE[T]]=T;function emit(i,a,o){i[a]&&i[a](o)}function emitNode(i,a,o){i.textNode&&closeText(i),emit(i,a,o)}function closeText(i){i.textNode=textopts(i.opt,i.textNode),i.textNode&&emit(i,"ontext",i.textNode),i.textNode=""}function textopts(i,a){return i.trim&&(a=a.trim()),i.normalize&&(a=a.replace(/\s+/g," ")),a}function error(i,a){return closeText(i),i.trackPosition&&(a+="\nLine: "+i.line+"\nColumn: "+i.column+"\nChar: "+i.c),a=new Error(a),i.error=a,emit(i,"onerror",a),i}function end(i){return i.sawRoot&&!i.closedRoot&&strictFail(i,"Unclosed root tag"),i.state!==E.BEGIN&&i.state!==E.BEGIN_WHITESPACE&&i.state!==E.TEXT&&error(i,"Unexpected end"),closeText(i),i.c="",i.closed=!0,emit(i,"onend"),SAXParser.call(i,i.strict,i.opt),i}function strictFail(i,a){if("object"!=typeof i||!(i instanceof SAXParser))throw new Error("bad call to strictFail");i.strict&&error(i,a)}function newTag(i){i.strict||(i.tagName=i.tagName[i.looseCase]());var a=i.tags[i.tags.length-1]||i,o=i.tag={name:i.tagName,attributes:{}};i.opt.xmlns&&(o.ns=a.ns),i.attribList.length=0,emitNode(i,"onopentagstart",o)}function qname(i,a){var o=i.indexOf(":")<0?["",i]:i.split(":"),s=o[0],u=o[1];return a&&"xmlns"===i&&(s="xmlns",u=""),{prefix:s,local:u}}function attrib(i){if(i.strict||(i.attribName=i.attribName[i.looseCase]()),-1!==i.attribList.indexOf(i.attribName)||i.tag.attributes.hasOwnProperty(i.attribName))i.attribName=i.attribValue="";else{if(i.opt.xmlns){var a=qname(i.attribName,!0),o=a.prefix,s=a.local;if("xmlns"===o)if("xml"===s&&i.attribValue!==l)strictFail(i,"xml: prefix must be bound to "+l+"\nActual: "+i.attribValue);else if("xmlns"===s&&"http://www.w3.org/2000/xmlns/"!==i.attribValue)strictFail(i,"xmlns: prefix must be bound to http://www.w3.org/2000/xmlns/\nActual: "+i.attribValue);else{var u=i.tag,h=i.tags[i.tags.length-1]||i;u.ns===h.ns&&(u.ns=Object.create(h.ns)),u.ns[s]=i.attribValue}i.attribList.push([i.attribName,i.attribValue])}else i.tag.attributes[i.attribName]=i.attribValue,emitNode(i,"onattribute",{name:i.attribName,value:i.attribValue});i.attribName=i.attribValue=""}}function openTag(i,a){if(i.opt.xmlns){var o=i.tag,s=qname(i.tagName);o.prefix=s.prefix,o.local=s.local,o.uri=o.ns[s.prefix]||"",o.prefix&&!o.uri&&(strictFail(i,"Unbound namespace prefix: "+JSON.stringify(i.tagName)),o.uri=s.prefix);var u=i.tags[i.tags.length-1]||i;o.ns&&u.ns!==o.ns&&Object.keys(o.ns).forEach((function(a){emitNode(i,"onopennamespace",{prefix:a,uri:o.ns[a]})}));for(var l=0,h=i.attribList.length;l<h;l++){var d=i.attribList[l],p=d[0],m=d[1],y=qname(p,!0),g=y.prefix,v=y.local,b=""===g?"":o.ns[g]||"",T={name:p,value:m,prefix:g,local:v,uri:b};g&&"xmlns"!==g&&!b&&(strictFail(i,"Unbound namespace prefix: "+JSON.stringify(g)),T.uri=g),i.tag.attributes[p]=T,emitNode(i,"onattribute",T)}i.attribList.length=0}i.tag.isSelfClosing=!!a,i.sawRoot=!0,i.tags.push(i.tag),emitNode(i,"onopentag",i.tag),a||(i.noscript||"script"!==i.tagName.toLowerCase()?i.state=E.TEXT:i.state=E.SCRIPT,i.tag=null,i.tagName=""),i.attribName=i.attribValue="",i.attribList.length=0}function closeTag(i){if(!i.tagName)return strictFail(i,"Weird empty close tag."),i.textNode+="</>",void(i.state=E.TEXT);if(i.script){if("script"!==i.tagName)return i.script+="</"+i.tagName+">",i.tagName="",void(i.state=E.SCRIPT);emitNode(i,"onscript",i.script),i.script=""}var a=i.tags.length,o=i.tagName;i.strict||(o=o[i.looseCase]());for(var s=o;a--;){if(i.tags[a].name===s)break;strictFail(i,"Unexpected close tag")}if(a<0)return strictFail(i,"Unmatched closing tag: "+i.tagName),i.textNode+="</"+i.tagName+">",void(i.state=E.TEXT);i.tagName=o;for(var u=i.tags.length;u-- >a;){var l=i.tag=i.tags.pop();i.tagName=i.tag.name,emitNode(i,"onclosetag",i.tagName);var h={};for(var d in l.ns)h[d]=l.ns[d];var p=i.tags[i.tags.length-1]||i;i.opt.xmlns&&l.ns!==p.ns&&Object.keys(l.ns).forEach((function(a){var o=l.ns[a];emitNode(i,"onclosenamespace",{prefix:a,uri:o})}))}0===a&&(i.closedRoot=!0),i.tagName=i.attribValue=i.attribName="",i.attribList.length=0,i.state=E.TEXT}function parseEntity(i){var a,o=i.entity,s=o.toLowerCase(),u="";return i.ENTITIES[o]?i.ENTITIES[o]:i.ENTITIES[s]?i.ENTITIES[s]:("#"===(o=s).charAt(0)&&("x"===o.charAt(1)?(o=o.slice(2),u=(a=parseInt(o,16)).toString(16)):(o=o.slice(1),u=(a=parseInt(o,10)).toString(10))),o=o.replace(/^0+/,""),isNaN(a)||u.toLowerCase()!==o?(strictFail(i,"Invalid character entity"),"&"+i.entity+";"):String.fromCodePoint(a))}function beginWhiteSpace(i,a){"<"===a?(i.state=E.OPEN_WAKA,i.startTagPosition=i.position):isWhitespace(a)||(strictFail(i,"Non-whitespace before first tag."),i.textNode=a,i.state=E.TEXT)}function charAt(i,a){var o="";return a<i.length&&(o=i.charAt(a)),o}E=i.STATE,String.fromCodePoint||(g=String.fromCharCode,v=Math.floor,b=function(){var i,a,o=16384,s=[],u=-1,l=arguments.length;if(!l)return"";for(var h="";++u<l;){var d=Number(arguments[u]);if(!isFinite(d)||d<0||d>1114111||v(d)!==d)throw RangeError("Invalid code point: "+d);d<=65535?s.push(d):(i=55296+((d-=65536)>>10),a=d%1024+56320,s.push(i,a)),(u+1===l||s.length>o)&&(h+=g.apply(null,s),s.length=0)}return h},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:b,configurable:!0,writable:!0}):String.fromCodePoint=b)}(a)},86:(i,a,o)=>{var s=o(624);function Stream(){s.call(this)}Stream.prototype=new s,i.exports=Stream,Stream.Stream=Stream,Stream.prototype.pipe=function(i,a){var o=this;function ondata(a){i.writable&&!1===i.write(a)&&o.pause&&o.pause()}function ondrain(){o.readable&&o.resume&&o.resume()}o.on("data",ondata),i.on("drain",ondrain),i._isStdio||a&&!1===a.end||(o.on("end",onend),o.on("close",onclose));var s=!1;function onend(){s||(s=!0,i.end())}function onclose(){s||(s=!0,"function"==typeof i.destroy&&i.destroy())}function onerror(i){if(cleanup(),!this.hasListeners("error"))throw i}function cleanup(){o.off("data",ondata),i.off("drain",ondrain),o.off("end",onend),o.off("close",onclose),o.off("error",onerror),i.off("error",onerror),o.off("end",cleanup),o.off("close",cleanup),i.off("end",cleanup),i.off("close",cleanup)}return o.on("error",onerror),i.on("error",onerror),o.on("end",cleanup),o.on("close",cleanup),i.on("end",cleanup),i.on("close",cleanup),i.emit("pipe",o),i}},553:(i,a,o)=>{"use strict";var s=o(396).Buffer,u=s.isEncoding||function(i){switch((i=""+i)&&i.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function StringDecoder(i){var a;switch(this.encoding=function normalizeEncoding(i){var a=function _normalizeEncoding(i){if(!i)return"utf8";for(var a;;)switch(i){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return i;default:if(a)return;i=(""+i).toLowerCase(),a=!0}}(i);if("string"!=typeof a&&(s.isEncoding===u||!u(i)))throw new Error("Unknown encoding: "+i);return a||i}(i),this.encoding){case"utf16le":this.text=utf16Text,this.end=utf16End,a=4;break;case"utf8":this.fillLast=utf8FillLast,a=4;break;case"base64":this.text=base64Text,this.end=base64End,a=3;break;default:return this.write=simpleWrite,void(this.end=simpleEnd)}this.lastNeed=0,this.lastTotal=0,this.lastChar=s.allocUnsafe(a)}function utf8CheckByte(i){return i<=127?0:i>>5==6?2:i>>4==14?3:i>>3==30?4:i>>6==2?-1:-2}function utf8FillLast(i){var a=this.lastTotal-this.lastNeed,o=function utf8CheckExtraBytes(i,a,o){if(128!=(192&a[0]))return i.lastNeed=0,"�";if(i.lastNeed>1&&a.length>1){if(128!=(192&a[1]))return i.lastNeed=1,"�";if(i.lastNeed>2&&a.length>2&&128!=(192&a[2]))return i.lastNeed=2,"�"}}(this,i);return void 0!==o?o:this.lastNeed<=i.length?(i.copy(this.lastChar,a,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(i.copy(this.lastChar,a,0,i.length),void(this.lastNeed-=i.length))}function utf16Text(i,a){if((i.length-a)%2==0){var o=i.toString("utf16le",a);if(o){var s=o.charCodeAt(o.length-1);if(s>=55296&&s<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=i[i.length-2],this.lastChar[1]=i[i.length-1],o.slice(0,-1)}return o}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=i[i.length-1],i.toString("utf16le",a,i.length-1)}function utf16End(i){var a=i&&i.length?this.write(i):"";if(this.lastNeed){var o=this.lastTotal-this.lastNeed;return a+this.lastChar.toString("utf16le",0,o)}return a}function base64Text(i,a){var o=(i.length-a)%3;return 0===o?i.toString("base64",a):(this.lastNeed=3-o,this.lastTotal=3,1===o?this.lastChar[0]=i[i.length-1]:(this.lastChar[0]=i[i.length-2],this.lastChar[1]=i[i.length-1]),i.toString("base64",a,i.length-o))}function base64End(i){var a=i&&i.length?this.write(i):"";return this.lastNeed?a+this.lastChar.toString("base64",0,3-this.lastNeed):a}function simpleWrite(i){return i.toString(this.encoding)}function simpleEnd(i){return i&&i.length?this.write(i):""}a.s=StringDecoder,StringDecoder.prototype.write=function(i){if(0===i.length)return"";var a,o;if(this.lastNeed){if(void 0===(a=this.fillLast(i)))return"";o=this.lastNeed,this.lastNeed=0}else o=0;return o<i.length?a?a+this.text(i,o):this.text(i,o):a||""},StringDecoder.prototype.end=function utf8End(i){var a=i&&i.length?this.write(i):"";return this.lastNeed?a+"�":a},StringDecoder.prototype.text=function utf8Text(i,a){var o=function utf8CheckIncomplete(i,a,o){var s=a.length-1;if(s<o)return 0;var u=utf8CheckByte(a[s]);if(u>=0)return u>0&&(i.lastNeed=u-1),u;if(--s<o||-2===u)return 0;if((u=utf8CheckByte(a[s]))>=0)return u>0&&(i.lastNeed=u-2),u;if(--s<o||-2===u)return 0;if((u=utf8CheckByte(a[s]))>=0)return u>0&&(2===u?u=0:i.lastNeed=u-3),u;return 0}(this,i,a);if(!this.lastNeed)return i.toString("utf8",a);this.lastTotal=o;var s=i.length-(o-this.lastNeed);return i.copy(this.lastChar,0,s),i.toString("utf8",a,s)},StringDecoder.prototype.fillLast=function(i){if(this.lastNeed<=i.length)return i.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);i.copy(this.lastChar,this.lastTotal-this.lastNeed,0,i.length),this.lastNeed-=i.length}},396:(i,a,o)=>{var s=o(764),u=s.Buffer;function copyProps(i,a){for(var o in i)a[o]=i[o]}function SafeBuffer(i,a,o){return u(i,a,o)}u.from&&u.alloc&&u.allocUnsafe&&u.allocUnsafeSlow?i.exports=s:(copyProps(s,a),a.Buffer=SafeBuffer),SafeBuffer.prototype=Object.create(u.prototype),copyProps(u,SafeBuffer),SafeBuffer.from=function(i,a,o){if("number"==typeof i)throw new TypeError("Argument must not be a number");return u(i,a,o)},SafeBuffer.alloc=function(i,a,o){if("number"!=typeof i)throw new TypeError("Argument must be a number");var s=u(i);return void 0!==a?"string"==typeof o?s.fill(a,o):s.fill(a):s.fill(0),s},SafeBuffer.allocUnsafe=function(i){if("number"!=typeof i)throw new TypeError("Argument must be a number");return u(i)},SafeBuffer.allocUnsafeSlow=function(i){if("number"!=typeof i)throw new TypeError("Argument must be a number");return s.SlowBuffer(i)}},454:(i,a,o)=>{var s=o(379),u=o(517);"string"==typeof(u=u.__esModule?u.default:u)&&(u=[[i.id,u,""]]);var l={insert:"head",singleton:!1};s(u,l);i.exports=u.locals||{}},516:(i,a,o)=>{var s=o(379),u=o(787);"string"==typeof(u=u.__esModule?u.default:u)&&(u=[[i.id,u,""]]);var l={insert:"head",singleton:!1};s(u,l);i.exports=u.locals||{}},381:(i,a,o)=>{var s=o(379),u=o(145);"string"==typeof(u=u.__esModule?u.default:u)&&(u=[[i.id,u,""]]);var l={insert:"head",singleton:!1};s(u,l);i.exports=u.locals||{}},365:(i,a,o)=>{var s=o(379),u=o(762);"string"==typeof(u=u.__esModule?u.default:u)&&(u=[[i.id,u,""]]);var l={insert:"head",singleton:!1};s(u,l);i.exports=u.locals||{}},379:(i,a,o)=>{"use strict";var s=function isOldIE(){var i;return function memorize(){return void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i}}(),u=function getTarget(){var i={};return function memorize(a){if(void 0===i[a]){var o=document.querySelector(a);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(i){o=null}i[a]=o}return i[a]}}(),l=[];function getIndexByIdentifier(i){for(var a=-1,o=0;o<l.length;o++)if(l[o].identifier===i){a=o;break}return a}function modulesToDom(i,a){for(var o={},s=[],u=0;u<i.length;u++){var h=i[u],d=a.base?h[0]+a.base:h[0],p=o[d]||0,m="".concat(d," ").concat(p);o[d]=p+1;var y=getIndexByIdentifier(m),g={css:h[1],media:h[2],sourceMap:h[3]};-1!==y?(l[y].references++,l[y].updater(g)):l.push({identifier:m,updater:addStyle(g,a),references:1}),s.push(m)}return s}function insertStyleElement(i){var a=document.createElement("style"),s=i.attributes||{};if(void 0===s.nonce){var l=o.nc;l&&(s.nonce=l)}if(Object.keys(s).forEach((function(i){a.setAttribute(i,s[i])})),"function"==typeof i.insert)i.insert(a);else{var h=u(i.insert||"head");if(!h)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");h.appendChild(a)}return a}var h=function replaceText(){var i=[];return function replace(a,o){return i[a]=o,i.filter(Boolean).join("\n")}}();function applyToSingletonTag(i,a,o,s){var u=o?"":s.media?"@media ".concat(s.media," {").concat(s.css,"}"):s.css;if(i.styleSheet)i.styleSheet.cssText=h(a,u);else{var l=document.createTextNode(u),d=i.childNodes;d[a]&&i.removeChild(d[a]),d.length?i.insertBefore(l,d[a]):i.appendChild(l)}}function applyToTag(i,a,o){var s=o.css,u=o.media,l=o.sourceMap;if(u?i.setAttribute("media",u):i.removeAttribute("media"),l&&"undefined"!=typeof btoa&&(s+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(l))))," */")),i.styleSheet)i.styleSheet.cssText=s;else{for(;i.firstChild;)i.removeChild(i.firstChild);i.appendChild(document.createTextNode(s))}}var d=null,p=0;function addStyle(i,a){var o,s,u;if(a.singleton){var l=p++;o=d||(d=insertStyleElement(a)),s=applyToSingletonTag.bind(null,o,l,!1),u=applyToSingletonTag.bind(null,o,l,!0)}else o=insertStyleElement(a),s=applyToTag.bind(null,o,a),u=function remove(){!function removeStyleElement(i){if(null===i.parentNode)return!1;i.parentNode.removeChild(i)}(o)};return s(i),function updateStyle(a){if(a){if(a.css===i.css&&a.media===i.media&&a.sourceMap===i.sourceMap)return;s(i=a)}else u()}}i.exports=function(i,a){(a=a||{}).singleton||"boolean"==typeof a.singleton||(a.singleton=s());var o=modulesToDom(i=i||[],a);return function update(i){if(i=i||[],"[object Array]"===Object.prototype.toString.call(i)){for(var s=0;s<o.length;s++){var u=getIndexByIdentifier(o[s]);l[u].references--}for(var h=modulesToDom(i,a),d=0;d<o.length;d++){var p=getIndexByIdentifier(o[d]);0===l[p].references&&(l[p].updater(),l.splice(p,1))}o=h}}}},881:i=>{i.exports={isArray:function(i){return Array.isArray?Array.isArray(i):"[object Array]"===Object.prototype.toString.call(i)}}},888:(i,a,o)=>{var s=o(229),u=o(388),l=o(501),h=o(673);i.exports={xml2js:s,xml2json:u,js2xml:l,json2xml:h}},501:(i,a,o)=>{var s,u,l=o(740),h=o(881).isArray;function writeIndentation(i,a,o){return(!o&&i.spaces?"\n":"")+Array(a+1).join(i.spaces)}function writeAttributes(i,a,o){if(a.ignoreAttributes)return"";"attributesFn"in a&&(i=a.attributesFn(i,u,s));var l,h,d,p,m=[];for(l in i)i.hasOwnProperty(l)&&null!==i[l]&&void 0!==i[l]&&(p=a.noQuotesForNativeAttributes&&"string"!=typeof i[l]?"":'"',h=(h=""+i[l]).replace(/"/g,"""),d="attributeNameFn"in a?a.attributeNameFn(l,h,u,s):l,m.push(a.spaces&&a.indentAttributes?writeIndentation(a,o+1,!1):" "),m.push(d+"="+p+("attributeValueFn"in a?a.attributeValueFn(h,l,u,s):h)+p));return i&&Object.keys(i).length&&a.spaces&&a.indentAttributes&&m.push(writeIndentation(a,o,!1)),m.join("")}function writeDeclaration(i,a,o){return s=i,u="xml",a.ignoreDeclaration?"":"<?xml"+writeAttributes(i[a.attributesKey],a,o)+"?>"}function writeInstruction(i,a,o){if(a.ignoreInstruction)return"";var l;for(l in i)if(i.hasOwnProperty(l))break;var h="instructionNameFn"in a?a.instructionNameFn(l,i[l],u,s):l;if("object"==typeof i[l])return s=i,u=h,"<?"+h+writeAttributes(i[l][a.attributesKey],a,o)+"?>";var d=i[l]?i[l]:"";return"instructionFn"in a&&(d=a.instructionFn(d,l,u,s)),"<?"+h+(d?" "+d:"")+"?>"}function writeComment(i,a){return a.ignoreComment?"":"\x3c!--"+("commentFn"in a?a.commentFn(i,u,s):i)+"--\x3e"}function writeCdata(i,a){return a.ignoreCdata?"":"<![CDATA["+("cdataFn"in a?a.cdataFn(i,u,s):i.replace("]]>","]]]]><![CDATA[>"))+"]]>"}function writeDoctype(i,a){return a.ignoreDoctype?"":"<!DOCTYPE "+("doctypeFn"in a?a.doctypeFn(i,u,s):i)+">"}function writeText(i,a){return a.ignoreText?"":(i=(i=(i=""+i).replace(/&/g,"&")).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),"textFn"in a?a.textFn(i,u,s):i)}function writeElements(i,a,o,l){return i.reduce((function(i,h){var d=writeIndentation(a,o,l&&!i);switch(h.type){case"element":return i+d+function writeElement(i,a,o){s=i,u=i.name;var l=[],h="elementNameFn"in a?a.elementNameFn(i.name,i):i.name;l.push("<"+h),i[a.attributesKey]&&l.push(writeAttributes(i[a.attributesKey],a,o));var d=i[a.elementsKey]&&i[a.elementsKey].length||i[a.attributesKey]&&"preserve"===i[a.attributesKey]["xml:space"];return d||(d="fullTagEmptyElementFn"in a?a.fullTagEmptyElementFn(i.name,i):a.fullTagEmptyElement),d?(l.push(">"),i[a.elementsKey]&&i[a.elementsKey].length&&(l.push(writeElements(i[a.elementsKey],a,o+1)),s=i,u=i.name),l.push(a.spaces&&function hasContent(i,a){var o;if(i.elements&&i.elements.length)for(o=0;o<i.elements.length;++o)switch(i.elements[o][a.typeKey]){case"text":if(a.indentText)return!0;break;case"cdata":if(a.indentCdata)return!0;break;case"instruction":if(a.indentInstruction)return!0;break;case"doctype":case"comment":case"element":default:return!0}return!1}(i,a)?"\n"+Array(o+1).join(a.spaces):""),l.push("</"+h+">")):l.push("/>"),l.join("")}(h,a,o);case"comment":return i+d+writeComment(h[a.commentKey],a);case"doctype":return i+d+writeDoctype(h[a.doctypeKey],a);case"cdata":return i+(a.indentCdata?d:"")+writeCdata(h[a.cdataKey],a);case"text":return i+(a.indentText?d:"")+writeText(h[a.textKey],a);case"instruction":var p={};return p[h[a.nameKey]]=h[a.attributesKey]?h:h[a.instructionKey],i+(a.indentInstruction?d:"")+writeInstruction(p,a,o)}}),"")}function hasContentCompact(i,a,o){var s;for(s in i)if(i.hasOwnProperty(s))switch(s){case a.parentKey:case a.attributesKey:break;case a.textKey:if(a.indentText||o)return!0;break;case a.cdataKey:if(a.indentCdata||o)return!0;break;case a.instructionKey:if(a.indentInstruction||o)return!0;break;case a.doctypeKey:case a.commentKey:default:return!0}return!1}function writeElementCompact(i,a,o,l,h){s=i,u=a;var d="elementNameFn"in o?o.elementNameFn(a,i):a;if(null==i||""===i)return"fullTagEmptyElementFn"in o&&o.fullTagEmptyElementFn(a,i)||o.fullTagEmptyElement?"<"+d+"></"+d+">":"<"+d+"/>";var p=[];if(a){if(p.push("<"+d),"object"!=typeof i)return p.push(">"+writeText(i,o)+"</"+d+">"),p.join("");i[o.attributesKey]&&p.push(writeAttributes(i[o.attributesKey],o,l));var m=hasContentCompact(i,o,!0)||i[o.attributesKey]&&"preserve"===i[o.attributesKey]["xml:space"];if(m||(m="fullTagEmptyElementFn"in o?o.fullTagEmptyElementFn(a,i):o.fullTagEmptyElement),!m)return p.push("/>"),p.join("");p.push(">")}return p.push(writeElementsCompact(i,o,l+1,!1)),s=i,u=a,a&&p.push((h?writeIndentation(o,l,!1):"")+"</"+d+">"),p.join("")}function writeElementsCompact(i,a,o,s){var u,l,d,p=[];for(l in i)if(i.hasOwnProperty(l))for(d=h(i[l])?i[l]:[i[l]],u=0;u<d.length;++u){switch(l){case a.declarationKey:p.push(writeDeclaration(d[u],a,o));break;case a.instructionKey:p.push((a.indentInstruction?writeIndentation(a,o,s):"")+writeInstruction(d[u],a,o));break;case a.attributesKey:case a.parentKey:break;case a.textKey:p.push((a.indentText?writeIndentation(a,o,s):"")+writeText(d[u],a));break;case a.cdataKey:p.push((a.indentCdata?writeIndentation(a,o,s):"")+writeCdata(d[u],a));break;case a.doctypeKey:p.push(writeIndentation(a,o,s)+writeDoctype(d[u],a));break;case a.commentKey:p.push(writeIndentation(a,o,s)+writeComment(d[u],a));break;default:p.push(writeIndentation(a,o,s)+writeElementCompact(d[u],l,a,o,hasContentCompact(d[u],a)))}s=s&&!p.length}return p.join("")}i.exports=function(i,a){a=function validateOptions(i){var a=l.copyOptions(i);return l.ensureFlagExists("ignoreDeclaration",a),l.ensureFlagExists("ignoreInstruction",a),l.ensureFlagExists("ignoreAttributes",a),l.ensureFlagExists("ignoreText",a),l.ensureFlagExists("ignoreComment",a),l.ensureFlagExists("ignoreCdata",a),l.ensureFlagExists("ignoreDoctype",a),l.ensureFlagExists("compact",a),l.ensureFlagExists("indentText",a),l.ensureFlagExists("indentCdata",a),l.ensureFlagExists("indentAttributes",a),l.ensureFlagExists("indentInstruction",a),l.ensureFlagExists("fullTagEmptyElement",a),l.ensureFlagExists("noQuotesForNativeAttributes",a),l.ensureSpacesExists(a),"number"==typeof a.spaces&&(a.spaces=Array(a.spaces+1).join(" ")),l.ensureKeyExists("declaration",a),l.ensureKeyExists("instruction",a),l.ensureKeyExists("attributes",a),l.ensureKeyExists("text",a),l.ensureKeyExists("comment",a),l.ensureKeyExists("cdata",a),l.ensureKeyExists("doctype",a),l.ensureKeyExists("type",a),l.ensureKeyExists("name",a),l.ensureKeyExists("elements",a),l.checkFnExists("doctype",a),l.checkFnExists("instruction",a),l.checkFnExists("cdata",a),l.checkFnExists("comment",a),l.checkFnExists("text",a),l.checkFnExists("instructionName",a),l.checkFnExists("elementName",a),l.checkFnExists("attributeName",a),l.checkFnExists("attributeValue",a),l.checkFnExists("attributes",a),l.checkFnExists("fullTagEmptyElement",a),a}(a);var o=[];return s=i,u="_root_",a.compact?o.push(writeElementsCompact(i,a,0,!0)):(i[a.declarationKey]&&o.push(writeDeclaration(i[a.declarationKey],a,0)),i[a.elementsKey]&&i[a.elementsKey].length&&o.push(writeElements(i[a.elementsKey],a,0,!o.length))),o.join("")}},673:(i,a,o)=>{var s=o(501);i.exports=function(i,a){i instanceof Buffer&&(i=i.toString());var o=null;if("string"==typeof i)try{o=JSON.parse(i)}catch(i){throw new Error("The JSON structure is invalid")}else o=i;return s(o,a)}},740:(i,a,o)=>{var s=o(881).isArray;i.exports={copyOptions:function(i){var a,o={};for(a in i)i.hasOwnProperty(a)&&(o[a]=i[a]);return o},ensureFlagExists:function(i,a){i in a&&"boolean"==typeof a[i]||(a[i]=!1)},ensureSpacesExists:function(i){(!("spaces"in i)||"number"!=typeof i.spaces&&"string"!=typeof i.spaces)&&(i.spaces=0)},ensureAlwaysArrayExists:function(i){"alwaysArray"in i&&("boolean"==typeof i.alwaysArray||s(i.alwaysArray))||(i.alwaysArray=!1)},ensureKeyExists:function(i,a){i+"Key"in a&&"string"==typeof a[i+"Key"]||(a[i+"Key"]=a.compact?"_"+i:i)},checkFnExists:function(i,a){return i+"Fn"in a}}},229:(i,a,o)=>{var s,u,l=o(99),h=o(740),d=o(881).isArray;function nativeType(i){var a=Number(i);if(!isNaN(a))return a;var o=i.toLowerCase();return"true"===o||"false"!==o&&i}function addField(i,a){var o;if(s.compact){if(!u[s[i+"Key"]]&&(d(s.alwaysArray)?-1!==s.alwaysArray.indexOf(s[i+"Key"]):s.alwaysArray)&&(u[s[i+"Key"]]=[]),u[s[i+"Key"]]&&!d(u[s[i+"Key"]])&&(u[s[i+"Key"]]=[u[s[i+"Key"]]]),i+"Fn"in s&&"string"==typeof a&&(a=s[i+"Fn"](a,u)),"instruction"===i&&("instructionFn"in s||"instructionNameFn"in s))for(o in a)if(a.hasOwnProperty(o))if("instructionFn"in s)a[o]=s.instructionFn(a[o],o,u);else{var l=a[o];delete a[o],a[s.instructionNameFn(o,l,u)]=l}d(u[s[i+"Key"]])?u[s[i+"Key"]].push(a):u[s[i+"Key"]]=a}else{u[s.elementsKey]||(u[s.elementsKey]=[]);var h={};if(h[s.typeKey]=i,"instruction"===i){for(o in a)if(a.hasOwnProperty(o))break;h[s.nameKey]="instructionNameFn"in s?s.instructionNameFn(o,a,u):o,s.instructionHasAttributes?(h[s.attributesKey]=a[o][s.attributesKey],"instructionFn"in s&&(h[s.attributesKey]=s.instructionFn(h[s.attributesKey],o,u))):("instructionFn"in s&&(a[o]=s.instructionFn(a[o],o,u)),h[s.instructionKey]=a[o])}else i+"Fn"in s&&(a=s[i+"Fn"](a,u)),h[s[i+"Key"]]=a;s.addParent&&(h[s.parentKey]=u),u[s.elementsKey].push(h)}}function manipulateAttributes(i){var a;if("attributesFn"in s&&i&&(i=s.attributesFn(i,u)),(s.trim||"attributeValueFn"in s||"attributeNameFn"in s||s.nativeTypeAttributes)&&i)for(a in i)if(i.hasOwnProperty(a)&&(s.trim&&(i[a]=i[a].trim()),s.nativeTypeAttributes&&(i[a]=nativeType(i[a])),"attributeValueFn"in s&&(i[a]=s.attributeValueFn(i[a],a,u)),"attributeNameFn"in s)){var o=i[a];delete i[a],i[s.attributeNameFn(a,i[a],u)]=o}return i}function onInstruction(i){var a={};if(i.body&&("xml"===i.name.toLowerCase()||s.instructionHasAttributes)){for(var o,l=/([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g;null!==(o=l.exec(i.body));)a[o[1]]=o[2]||o[3]||o[4];a=manipulateAttributes(a)}if("xml"===i.name.toLowerCase()){if(s.ignoreDeclaration)return;u[s.declarationKey]={},Object.keys(a).length&&(u[s.declarationKey][s.attributesKey]=a),s.addParent&&(u[s.declarationKey][s.parentKey]=u)}else{if(s.ignoreInstruction)return;s.trim&&(i.body=i.body.trim());var h={};s.instructionHasAttributes&&Object.keys(a).length?(h[i.name]={},h[i.name][s.attributesKey]=a):h[i.name]=i.body,addField("instruction",h)}}function onStartElement(i,a){var o;if("object"==typeof i&&(a=i.attributes,i=i.name),a=manipulateAttributes(a),"elementNameFn"in s&&(i=s.elementNameFn(i,u)),s.compact){var l;if(o={},!s.ignoreAttributes&&a&&Object.keys(a).length)for(l in o[s.attributesKey]={},a)a.hasOwnProperty(l)&&(o[s.attributesKey][l]=a[l]);!(i in u)&&(d(s.alwaysArray)?-1!==s.alwaysArray.indexOf(i):s.alwaysArray)&&(u[i]=[]),u[i]&&!d(u[i])&&(u[i]=[u[i]]),d(u[i])?u[i].push(o):u[i]=o}else u[s.elementsKey]||(u[s.elementsKey]=[]),(o={})[s.typeKey]="element",o[s.nameKey]=i,!s.ignoreAttributes&&a&&Object.keys(a).length&&(o[s.attributesKey]=a),s.alwaysChildren&&(o[s.elementsKey]=[]),u[s.elementsKey].push(o);o[s.parentKey]=u,u=o}function onText(i){s.ignoreText||(i.trim()||s.captureSpacesBetweenElements)&&(s.trim&&(i=i.trim()),s.nativeType&&(i=nativeType(i)),s.sanitize&&(i=i.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")),addField("text",i))}function onComment(i){s.ignoreComment||(s.trim&&(i=i.trim()),addField("comment",i))}function onEndElement(i){var a=u[s.parentKey];s.addParent||delete u[s.parentKey],u=a}function onCdata(i){s.ignoreCdata||(s.trim&&(i=i.trim()),addField("cdata",i))}function onDoctype(i){s.ignoreDoctype||(i=i.replace(/^ /,""),s.trim&&(i=i.trim()),addField("doctype",i))}function onError(i){i.note=i}i.exports=function(i,a){var o=l.parser(!0,{}),d={};if(u=d,s=function validateOptions(i){return s=h.copyOptions(i),h.ensureFlagExists("ignoreDeclaration",s),h.ensureFlagExists("ignoreInstruction",s),h.ensureFlagExists("ignoreAttributes",s),h.ensureFlagExists("ignoreText",s),h.ensureFlagExists("ignoreComment",s),h.ensureFlagExists("ignoreCdata",s),h.ensureFlagExists("ignoreDoctype",s),h.ensureFlagExists("compact",s),h.ensureFlagExists("alwaysChildren",s),h.ensureFlagExists("addParent",s),h.ensureFlagExists("trim",s),h.ensureFlagExists("nativeType",s),h.ensureFlagExists("nativeTypeAttributes",s),h.ensureFlagExists("sanitize",s),h.ensureFlagExists("instructionHasAttributes",s),h.ensureFlagExists("captureSpacesBetweenElements",s),h.ensureAlwaysArrayExists(s),h.ensureKeyExists("declaration",s),h.ensureKeyExists("instruction",s),h.ensureKeyExists("attributes",s),h.ensureKeyExists("text",s),h.ensureKeyExists("comment",s),h.ensureKeyExists("cdata",s),h.ensureKeyExists("doctype",s),h.ensureKeyExists("type",s),h.ensureKeyExists("name",s),h.ensureKeyExists("elements",s),h.ensureKeyExists("parent",s),h.checkFnExists("doctype",s),h.checkFnExists("instruction",s),h.checkFnExists("cdata",s),h.checkFnExists("comment",s),h.checkFnExists("text",s),h.checkFnExists("instructionName",s),h.checkFnExists("elementName",s),h.checkFnExists("attributeName",s),h.checkFnExists("attributeValue",s),h.checkFnExists("attributes",s),s}(a),o.opt={strictEntities:!0},o.onopentag=onStartElement,o.ontext=onText,o.oncomment=onComment,o.onclosetag=onEndElement,o.onerror=onError,o.oncdata=onCdata,o.ondoctype=onDoctype,o.onprocessinginstruction=onInstruction,o.write(i).close(),d[s.elementsKey]){var p=d[s.elementsKey];delete d[s.elementsKey],d[s.elementsKey]=p,delete d.text}return d}},388:(i,a,o)=>{var s=o(740),u=o(229);i.exports=function(i,a){var o,l,h;return o=function validateOptions(i){var a=s.copyOptions(i);return s.ensureSpacesExists(a),a}(a),l=u(i,o),h="compact"in o&&o.compact?"_parent":"parent",("addParent"in o&&o.addParent?JSON.stringify(l,(function(i,a){return i===h?"_":a}),o.spaces):JSON.stringify(l,null,o.spaces)).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}},419:function(i,a,o){i.exports=function(){var i="1.13.3",a="object"==typeof self&&self.self===self&&self||"object"==typeof o.g&&o.g.global===o.g&&o.g||Function("return this")()||{},s=Array.prototype,u=Object.prototype,l="undefined"!=typeof Symbol?Symbol.prototype:null,h=s.push,d=s.slice,p=u.toString,m=u.hasOwnProperty,y="undefined"!=typeof ArrayBuffer,g="undefined"!=typeof DataView,v=Array.isArray,b=Object.keys,E=Object.create,T=y&&ArrayBuffer.isView,N=isNaN,O=isFinite,S=!{toString:null}.propertyIsEnumerable("toString"),I=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],k=Math.pow(2,53)-1;function j(i,a){return a=null==a?i.length-1:+a,function(){for(var o=Math.max(arguments.length-a,0),s=Array(o),u=0;u<o;u++)s[u]=arguments[u+a];switch(a){case 0:return i.call(this,s);case 1:return i.call(this,arguments[0],s);case 2:return i.call(this,arguments[0],arguments[1],s)}var l=Array(a+1);for(u=0;u<a;u++)l[u]=arguments[u];return l[a]=s,i.apply(this,l)}}function _(i){var a=typeof i;return"function"===a||"object"===a&&!!i}function w(i){return void 0===i}function A(i){return!0===i||!1===i||"[object Boolean]"===p.call(i)}function x(i){var a="[object "+i+"]";return function(i){return p.call(i)===a}}var B=x("String"),R=x("Number"),P=x("Date"),L=x("RegExp"),D=x("Error"),M=x("Symbol"),q=x("ArrayBuffer"),U=x("Function"),V=a.document&&a.document.childNodes;"object"!=typeof Int8Array&&"function"!=typeof V&&(U=function(i){return"function"==typeof i||!1});var H=U,G=x("Object"),X=g&&G(new DataView(new ArrayBuffer(8))),Y="undefined"!=typeof Map&&G(new Map),z=x("DataView"),Q=X?function(i){return null!=i&&H(i.getInt8)&&q(i.buffer)}:z,ee=v||x("Array");function W(i,a){return null!=i&&m.call(i,a)}var te=x("Arguments");!function(){te(arguments)||(te=function(i){return W(i,"callee")})}();var re=te;function $(i){return R(i)&&N(i)}function C(i){return function(){return i}}function K(i){return function(a){var o=i(a);return"number"==typeof o&&o>=0&&o<=k}}function J(i){return function(a){return null==a?void 0:a[i]}}var ne=J("byteLength"),ie=K(ne),ae=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/,oe=y?function(i){return T?T(i)&&!Q(i):ie(i)&&ae.test(p.call(i))}:C(!1),se=J("length");function Z(i,a){a=function(i){for(var a={},o=i.length,s=0;s<o;++s)a[i[s]]=!0;return{contains:function(i){return!0===a[i]},push:function(o){return a[o]=!0,i.push(o)}}}(a);var o=I.length,s=i.constructor,l=H(s)&&s.prototype||u,h="constructor";for(W(i,h)&&!a.contains(h)&&a.push(h);o--;)(h=I[o])in i&&i[h]!==l[h]&&!a.contains(h)&&a.push(h)}function nn(i){if(!_(i))return[];if(b)return b(i);var a=[];for(var o in i)W(i,o)&&a.push(o);return S&&Z(i,a),a}function rn(i,a){var o=nn(a),s=o.length;if(null==i)return!s;for(var u=Object(i),l=0;l<s;l++){var h=o[l];if(a[h]!==u[h]||!(h in u))return!1}return!0}function tn(i){return i instanceof tn?i:this instanceof tn?void(this._wrapped=i):new tn(i)}function en(i){return new Uint8Array(i.buffer||i,i.byteOffset||0,ne(i))}tn.VERSION=i,tn.prototype.value=function(){return this._wrapped},tn.prototype.valueOf=tn.prototype.toJSON=tn.prototype.value,tn.prototype.toString=function(){return String(this._wrapped)};var ue="[object DataView]";function an(i){if(!_(i))return[];var a=[];for(var o in i)a.push(o);return S&&Z(i,a),a}function fn(i){var a=se(i);return function(o){if(null==o)return!1;var s=an(o);if(se(s))return!1;for(var u=0;u<a;u++)if(!H(o[i[u]]))return!1;return i!==de||!H(o[le])}}var le="forEach",ce=["clear","delete"],fe=["get","has","set"],he=ce.concat(le,fe),de=ce.concat(fe),pe=["add"].concat(ce,le,"has"),me=Y?fn(he):x("Map"),ye=Y?fn(de):x("WeakMap"),ge=Y?fn(pe):x("Set"),ve=x("WeakSet");function jn(i){for(var a=nn(i),o=a.length,s=Array(o),u=0;u<o;u++)s[u]=i[a[u]];return s}function _n(i){for(var a={},o=nn(i),s=0,u=o.length;s<u;s++)a[i[o[s]]]=o[s];return a}function wn(i){var a=[];for(var o in i)H(i[o])&&a.push(o);return a.sort()}function An(i,a){return function(o){var s=arguments.length;if(a&&(o=Object(o)),s<2||null==o)return o;for(var u=1;u<s;u++)for(var l=arguments[u],h=i(l),d=h.length,p=0;p<d;p++){var m=h[p];a&&void 0!==o[m]||(o[m]=l[m])}return o}}var be=An(an),Ee=An(nn),_e=An(an,!0);function Mn(i){if(!_(i))return{};if(E)return E(i);var r=function(){};r.prototype=i;var a=new r;return r.prototype=null,a}function En(i){return ee(i)?i:[i]}function Bn(i){return tn.toPath(i)}function Nn(i,a){for(var o=a.length,s=0;s<o;s++){if(null==i)return;i=i[a[s]]}return o?i:void 0}function In(i,a,o){var s=Nn(i,Bn(a));return w(s)?o:s}function Tn(i){return i}function kn(i){return i=Ee({},i),function(a){return rn(a,i)}}function Dn(i){return i=Bn(i),function(a){return Nn(a,i)}}function Rn(i,a,o){if(void 0===a)return i;switch(null==o?3:o){case 1:return function(o){return i.call(a,o)};case 3:return function(o,s,u){return i.call(a,o,s,u)};case 4:return function(o,s,u,l){return i.call(a,o,s,u,l)}}return function(){return i.apply(a,arguments)}}function Fn(i,a,o){return null==i?Tn:H(i)?Rn(i,a,o):_(i)&&!ee(i)?kn(i):Dn(i)}function Vn(i,a){return Fn(i,a,1/0)}function Pn(i,a,o){return tn.iteratee!==Vn?tn.iteratee(i,a):Fn(i,a,o)}function qn(){}function Un(i,a){return null==a&&(a=i,i=0),i+Math.floor(Math.random()*(a-i+1))}tn.toPath=En,tn.iteratee=Vn;var we=Date.now||function(){return(new Date).getTime()};function zn(i){var r=function(a){return i[a]},a="(?:"+nn(i).join("|")+")",o=RegExp(a),s=RegExp(a,"g");return function(i){return i=null==i?"":""+i,o.test(i)?i.replace(s,r):i}}var Te={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},xe=zn(Te),Ne=zn(_n(Te)),Ae=tn.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Oe=/(.)^/,Se={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Ce=/\\|'|\r|\n|\u2028|\u2029/g;function Qn(i){return"\\"+Se[i]}var Fe=/^\s*(\w|\$)+\s*$/,Ie=0;function Zn(i,a,o,s,u){if(!(s instanceof a))return i.apply(o,u);var l=Mn(i.prototype),h=i.apply(l,u);return _(h)?h:l}var ke=j((function(i,a){var o=ke.placeholder,e=function(){for(var s=0,u=a.length,l=Array(u),h=0;h<u;h++)l[h]=a[h]===o?arguments[s++]:a[h];for(;s<arguments.length;)l.push(arguments[s++]);return Zn(i,e,this,this,l)};return e}));ke.placeholder=tn;var Be=j((function(i,a,o){if(!H(i))throw new TypeError("Bind must be called on a function");var s=j((function(u){return Zn(i,s,a,this,o.concat(u))}));return s})),Re=K(se);function er(i,a,o,s){if(s=s||[],a||0===a){if(a<=0)return s.concat(i)}else a=1/0;for(var u=s.length,l=0,h=se(i);l<h;l++){var d=i[l];if(Re(d)&&(ee(d)||re(d)))if(a>1)er(d,a-1,o,s),u=s.length;else for(var p=0,m=d.length;p<m;)s[u++]=d[p++];else o||(s[u++]=d)}return s}var Pe=j((function(i,a){var o=(a=er(a,!1,!1)).length;if(o<1)throw new Error("bindAll must be passed function names");for(;o--;){var s=a[o];i[s]=Be(i[s],i)}return i})),Le=j((function(i,a,o){return setTimeout((function(){return i.apply(null,o)}),a)})),je=ke(Le,tn,1);function ar(i){return function(){return!i.apply(this,arguments)}}function fr(i,a){var o;return function(){return--i>0&&(o=a.apply(this,arguments)),i<=1&&(a=null),o}}var De=ke(fr,2);function lr(i,a,o){a=Pn(a,o);for(var s,u=nn(i),l=0,h=u.length;l<h;l++)if(a(i[s=u[l]],s,i))return s}function sr(i){return function(a,o,s){o=Pn(o,s);for(var u=se(a),l=i>0?0:u-1;l>=0&&l<u;l+=i)if(o(a[l],l,a))return l;return-1}}var Me=sr(1),qe=sr(-1);function hr(i,a,o,s){for(var u=(o=Pn(o,s,1))(a),l=0,h=se(i);l<h;){var d=Math.floor((l+h)/2);o(i[d])<u?l=d+1:h=d}return l}function yr(i,a,o){return function(s,u,l){var h=0,p=se(s);if("number"==typeof l)i>0?h=l>=0?l:Math.max(l+p,h):p=l>=0?Math.min(l+1,p):l+p+1;else if(o&&l&&p)return s[l=o(s,u)]===u?l:-1;if(u!=u)return(l=a(d.call(s,h,p),$))>=0?l+h:-1;for(l=i>0?h:p-1;l>=0&&l<p;l+=i)if(s[l]===u)return l;return-1}}var Ue=yr(1,Me,hr),Ke=yr(-1,qe);function br(i,a,o){var s=(Re(i)?Me:lr)(i,a,o);if(void 0!==s&&-1!==s)return i[s]}function mr(i,a,o){var s,u;if(a=Rn(a,o),Re(i))for(s=0,u=i.length;s<u;s++)a(i[s],s,i);else{var l=nn(i);for(s=0,u=l.length;s<u;s++)a(i[l[s]],l[s],i)}return i}function jr(i,a,o){a=Pn(a,o);for(var s=!Re(i)&&nn(i),u=(s||i).length,l=Array(u),h=0;h<u;h++){var d=s?s[h]:h;l[h]=a(i[d],d,i)}return l}function _r(i){var r=function(a,o,s,u){var l=!Re(a)&&nn(a),h=(l||a).length,d=i>0?0:h-1;for(u||(s=a[l?l[d]:d],d+=i);d>=0&&d<h;d+=i){var p=l?l[d]:d;s=o(s,a[p],p,a)}return s};return function(i,a,o,s){var u=arguments.length>=3;return r(i,Rn(a,s,4),o,u)}}var Ve=_r(1),He=_r(-1);function xr(i,a,o){var s=[];return a=Pn(a,o),mr(i,(function(i,o,u){a(i,o,u)&&s.push(i)})),s}function Sr(i,a,o){a=Pn(a,o);for(var s=!Re(i)&&nn(i),u=(s||i).length,l=0;l<u;l++){var h=s?s[l]:l;if(!a(i[h],h,i))return!1}return!0}function Or(i,a,o){a=Pn(a,o);for(var s=!Re(i)&&nn(i),u=(s||i).length,l=0;l<u;l++){var h=s?s[l]:l;if(a(i[h],h,i))return!0}return!1}function Mr(i,a,o,s){return Re(i)||(i=jn(i)),("number"!=typeof o||s)&&(o=0),Ue(i,a,o)>=0}var We=j((function(i,a,o){var s,u;return H(a)?u=a:(a=Bn(a),s=a.slice(0,-1),a=a[a.length-1]),jr(i,(function(i){var l=u;if(!l){if(s&&s.length&&(i=Nn(i,s)),null==i)return;l=i[a]}return null==l?l:l.apply(i,o)}))}));function Br(i,a){return jr(i,Dn(a))}function Nr(i,a,o){var s,u,l=-1/0,h=-1/0;if(null==a||"number"==typeof a&&"object"!=typeof i[0]&&null!=i)for(var d=0,p=(i=Re(i)?i:jn(i)).length;d<p;d++)null!=(s=i[d])&&s>l&&(l=s);else a=Pn(a,o),mr(i,(function(i,o,s){((u=a(i,o,s))>h||u===-1/0&&l===-1/0)&&(l=i,h=u)}));return l}var Ge=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function Tr(i){return i?ee(i)?d.call(i):B(i)?i.match(Ge):Re(i)?jr(i,Tn):jn(i):[]}function kr(i,a,o){if(null==a||o)return Re(i)||(i=jn(i)),i[Un(i.length-1)];var s=Tr(i),u=se(s);a=Math.max(Math.min(a,u),0);for(var l=u-1,h=0;h<a;h++){var d=Un(h,l),p=s[h];s[h]=s[d],s[d]=p}return s.slice(0,a)}function Dr(i,a){return function(o,s,u){var l=a?[[],[]]:{};return s=Pn(s,u),mr(o,(function(a,u){var h=s(a,u,o);i(l,a,h)})),l}}var Xe=Dr((function(i,a,o){W(i,o)?i[o].push(a):i[o]=[a]})),Ye=Dr((function(i,a,o){i[o]=a})),ze=Dr((function(i,a,o){W(i,o)?i[o]++:i[o]=1})),Qe=Dr((function(i,a,o){i[o?0:1].push(a)}),!0);function qr(i,a,o){return a in o}var Je=j((function(i,a){var o={},s=a[0];if(null==i)return o;H(s)?(a.length>1&&(s=Rn(s,a[1])),a=an(i)):(s=qr,a=er(a,!1,!1),i=Object(i));for(var u=0,l=a.length;u<l;u++){var h=a[u],d=i[h];s(d,h,i)&&(o[h]=d)}return o})),$e=j((function(i,a){var o,s=a[0];return H(s)?(s=ar(s),a.length>1&&(o=a[1])):(a=jr(er(a,!1,!1),String),s=function(i,o){return!Mr(a,o)}),Je(i,s,o)}));function zr(i,a,o){return d.call(i,0,Math.max(0,i.length-(null==a||o?1:a)))}function Lr(i,a,o){return null==i||i.length<1?null==a||o?void 0:[]:null==a||o?i[0]:zr(i,i.length-a)}function $r(i,a,o){return d.call(i,null==a||o?1:a)}var Ze=j((function(i,a){return a=er(a,!0,!0),xr(i,(function(i){return!Mr(a,i)}))})),et=j((function(i,a){return Ze(i,a)}));function Jr(i,a,o,s){A(a)||(s=o,o=a,a=!1),null!=o&&(o=Pn(o,s));for(var u=[],l=[],h=0,d=se(i);h<d;h++){var p=i[h],m=o?o(p,h,i):p;a&&!o?(h&&l===m||u.push(p),l=m):o?Mr(l,m)||(l.push(m),u.push(p)):Mr(u,p)||u.push(p)}return u}var tt=j((function(i){return Jr(er(i,!0,!0))}));function Hr(i){for(var a=i&&Nr(i,se).length||0,o=Array(a),s=0;s<a;s++)o[s]=Br(i,s);return o}var rt=j(Hr);function Xr(i,a){return i._chain?tn(a).chain():a}function Yr(i){return mr(wn(i),(function(a){var o=tn[a]=i[a];tn.prototype[a]=function(){var i=[this._wrapped];return h.apply(i,arguments),Xr(this,o.apply(tn,i))}})),tn}mr(["pop","push","reverse","shift","sort","splice","unshift"],(function(i){var a=s[i];tn.prototype[i]=function(){var o=this._wrapped;return null!=o&&(a.apply(o,arguments),"shift"!==i&&"splice"!==i||0!==o.length||delete o[0]),Xr(this,o)}})),mr(["concat","join","slice"],(function(i){var a=s[i];tn.prototype[i]=function(){var i=this._wrapped;return null!=i&&(i=a.apply(i,arguments)),Xr(this,i)}}));var nt=Yr({__proto__:null,VERSION:i,restArguments:j,isObject:_,isNull:function(i){return null===i},isUndefined:w,isBoolean:A,isElement:function(i){return!(!i||1!==i.nodeType)},isString:B,isNumber:R,isDate:P,isRegExp:L,isError:D,isSymbol:M,isArrayBuffer:q,isDataView:Q,isArray:ee,isFunction:H,isArguments:re,isFinite:function(i){return!M(i)&&O(i)&&!isNaN(parseFloat(i))},isNaN:$,isTypedArray:oe,isEmpty:function(i){if(null==i)return!0;var a=se(i);return"number"==typeof a&&(ee(i)||B(i)||re(i))?0===a:0===se(nn(i))},isMatch:rn,isEqual:function(i,a){return function on(i,a,o,s){if(i===a)return 0!==i||1/i==1/a;if(null==i||null==a)return!1;if(i!=i)return a!=a;var u=typeof i;return("function"===u||"object"===u||"object"==typeof a)&&function n(i,a,o,s){i instanceof tn&&(i=i._wrapped),a instanceof tn&&(a=a._wrapped);var u=p.call(i);if(u!==p.call(a))return!1;if(X&&"[object Object]"==u&&Q(i)){if(!Q(a))return!1;u=ue}switch(u){case"[object RegExp]":case"[object String]":return""+i==""+a;case"[object Number]":return+i!=+i?+a!=+a:0==+i?1/+i==1/a:+i==+a;case"[object Date]":case"[object Boolean]":return+i==+a;case"[object Symbol]":return l.valueOf.call(i)===l.valueOf.call(a);case"[object ArrayBuffer]":case ue:return n(en(i),en(a),o,s)}var h="[object Array]"===u;if(!h&&oe(i)){if(ne(i)!==ne(a))return!1;if(i.buffer===a.buffer&&i.byteOffset===a.byteOffset)return!0;h=!0}if(!h){if("object"!=typeof i||"object"!=typeof a)return!1;var d=i.constructor,m=a.constructor;if(d!==m&&!(H(d)&&d instanceof d&&H(m)&&m instanceof m)&&"constructor"in i&&"constructor"in a)return!1}s=s||[];for(var y=(o=o||[]).length;y--;)if(o[y]===i)return s[y]===a;if(o.push(i),s.push(a),h){if((y=i.length)!==a.length)return!1;for(;y--;)if(!on(i[y],a[y],o,s))return!1}else{var g,v=nn(i);if(y=v.length,nn(a).length!==y)return!1;for(;y--;)if(!W(a,g=v[y])||!on(i[g],a[g],o,s))return!1}return o.pop(),s.pop(),!0}(i,a,o,s)}(i,a)},isMap:me,isWeakMap:ye,isSet:ge,isWeakSet:ve,keys:nn,allKeys:an,values:jn,pairs:function(i){for(var a=nn(i),o=a.length,s=Array(o),u=0;u<o;u++)s[u]=[a[u],i[a[u]]];return s},invert:_n,functions:wn,methods:wn,extend:be,extendOwn:Ee,assign:Ee,defaults:_e,create:function(i,a){var o=Mn(i);return a&&Ee(o,a),o},clone:function(i){return _(i)?ee(i)?i.slice():be({},i):i},tap:function(i,a){return a(i),i},get:In,has:function(i,a){for(var o=(a=Bn(a)).length,s=0;s<o;s++){var u=a[s];if(!W(i,u))return!1;i=i[u]}return!!o},mapObject:function(i,a,o){a=Pn(a,o);for(var s=nn(i),u=s.length,l={},h=0;h<u;h++){var d=s[h];l[d]=a(i[d],d,i)}return l},identity:Tn,constant:C,noop:qn,toPath:En,property:Dn,propertyOf:function(i){return null==i?qn:function(a){return In(i,a)}},matcher:kn,matches:kn,times:function(i,a,o){var s=Array(Math.max(0,i));a=Rn(a,o,1);for(var u=0;u<i;u++)s[u]=a(u);return s},random:Un,now:we,escape:xe,unescape:Ne,templateSettings:Ae,template:function(i,a,o){!a&&o&&(a=o),a=_e({},a,tn.templateSettings);var s=RegExp([(a.escape||Oe).source,(a.interpolate||Oe).source,(a.evaluate||Oe).source].join("|")+"|$","g"),u=0,l="__p+='";i.replace(s,(function(a,o,s,h,d){return l+=i.slice(u,d).replace(Ce,Qn),u=d+a.length,o?l+="'+\n((__t=("+o+"))==null?'':_.escape(__t))+\n'":s?l+="'+\n((__t=("+s+"))==null?'':__t)+\n'":h&&(l+="';\n"+h+"\n__p+='"),a})),l+="';\n";var h,d=a.variable;if(d){if(!Fe.test(d))throw new Error("variable is not a bare identifier: "+d)}else l="with(obj||{}){\n"+l+"}\n",d="obj";l="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+l+"return __p;\n";try{h=new Function(d,"_",l)}catch(i){throw i.source=l,i}var f=function(i){return h.call(this,i,tn)};return f.source="function("+d+"){\n"+l+"}",f},result:function(i,a,o){var s=(a=Bn(a)).length;if(!s)return H(o)?o.call(i):o;for(var u=0;u<s;u++){var l=null==i?void 0:i[a[u]];void 0===l&&(l=o,u=s),i=H(l)?l.call(i):l}return i},uniqueId:function(i){var a=++Ie+"";return i?i+a:a},chain:function(i){var a=tn(i);return a._chain=!0,a},iteratee:Vn,partial:ke,bind:Be,bindAll:Pe,memoize:function(i,a){var t=function(o){var s=t.cache,u=""+(a?a.apply(this,arguments):o);return W(s,u)||(s[u]=i.apply(this,arguments)),s[u]};return t.cache={},t},delay:Le,defer:je,throttle:function(i,a,o){var s,u,l,h,d=0;o||(o={});var f=function(){d=!1===o.leading?0:we(),s=null,h=i.apply(u,l),s||(u=l=null)},c=function(){var p=we();d||!1!==o.leading||(d=p);var m=a-(p-d);return u=this,l=arguments,m<=0||m>a?(s&&(clearTimeout(s),s=null),d=p,h=i.apply(u,l),s||(u=l=null)):s||!1===o.trailing||(s=setTimeout(f,m)),h};return c.cancel=function(){clearTimeout(s),d=0,s=u=l=null},c},debounce:function(i,a,o){var s,u,l,h,d,f=function(){var p=we()-u;a>p?s=setTimeout(f,a-p):(s=null,o||(h=i.apply(d,l)),s||(l=d=null))},p=j((function(p){return d=this,l=p,u=we(),s||(s=setTimeout(f,a),o&&(h=i.apply(d,l))),h}));return p.cancel=function(){clearTimeout(s),s=l=d=null},p},wrap:function(i,a){return ke(a,i)},negate:ar,compose:function(){var i=arguments,a=i.length-1;return function(){for(var o=a,s=i[a].apply(this,arguments);o--;)s=i[o].call(this,s);return s}},after:function(i,a){return function(){if(--i<1)return a.apply(this,arguments)}},before:fr,once:De,findKey:lr,findIndex:Me,findLastIndex:qe,sortedIndex:hr,indexOf:Ue,lastIndexOf:Ke,find:br,detect:br,findWhere:function(i,a){return br(i,kn(a))},each:mr,forEach:mr,map:jr,collect:jr,reduce:Ve,foldl:Ve,inject:Ve,reduceRight:He,foldr:He,filter:xr,select:xr,reject:function(i,a,o){return xr(i,ar(Pn(a)),o)},every:Sr,all:Sr,some:Or,any:Or,contains:Mr,includes:Mr,include:Mr,invoke:We,pluck:Br,where:function(i,a){return xr(i,kn(a))},max:Nr,min:function(i,a,o){var s,u,l=1/0,h=1/0;if(null==a||"number"==typeof a&&"object"!=typeof i[0]&&null!=i)for(var d=0,p=(i=Re(i)?i:jn(i)).length;d<p;d++)null!=(s=i[d])&&s<l&&(l=s);else a=Pn(a,o),mr(i,(function(i,o,s){((u=a(i,o,s))<h||u===1/0&&l===1/0)&&(l=i,h=u)}));return l},shuffle:function(i){return kr(i,1/0)},sample:kr,sortBy:function(i,a,o){var s=0;return a=Pn(a,o),Br(jr(i,(function(i,o,u){return{value:i,index:s++,criteria:a(i,o,u)}})).sort((function(i,a){var o=i.criteria,s=a.criteria;if(o!==s){if(o>s||void 0===o)return 1;if(o<s||void 0===s)return-1}return i.index-a.index})),"value")},groupBy:Xe,indexBy:Ye,countBy:ze,partition:Qe,toArray:Tr,size:function(i){return null==i?0:Re(i)?i.length:nn(i).length},pick:Je,omit:$e,first:Lr,head:Lr,take:Lr,initial:zr,last:function(i,a,o){return null==i||i.length<1?null==a||o?void 0:[]:null==a||o?i[i.length-1]:$r(i,Math.max(0,i.length-a))},rest:$r,tail:$r,drop:$r,compact:function(i){return xr(i,Boolean)},flatten:function(i,a){return er(i,a,!1)},without:et,uniq:Jr,unique:Jr,union:tt,intersection:function(i){for(var a=[],o=arguments.length,s=0,u=se(i);s<u;s++){var l=i[s];if(!Mr(a,l)){var h;for(h=1;h<o&&Mr(arguments[h],l);h++);h===o&&a.push(l)}}return a},difference:Ze,unzip:Hr,transpose:Hr,zip:rt,object:function(i,a){for(var o={},s=0,u=se(i);s<u;s++)a?o[i[s]]=a[s]:o[i[s][0]]=i[s][1];return o},range:function(i,a,o){null==a&&(a=i||0,i=0),o||(o=a<i?-1:1);for(var s=Math.max(Math.ceil((a-i)/o),0),u=Array(s),l=0;l<s;l++,i+=o)u[l]=i;return u},chunk:function(i,a){if(null==a||a<1)return[];for(var o=[],s=0,u=i.length;s<u;)o.push(d.call(i,s,s+=a));return o},mixin:Yr,default:tn});return nt._=nt,nt}()}},a={};function __webpack_require__(o){var s=a[o];if(void 0!==s)return s.exports;var u=a[o]={id:o,exports:{}};return i[o].call(u.exports,u,u.exports,__webpack_require__),u.exports}__webpack_require__.n=i=>{var a=i&&i.__esModule?()=>i.default:()=>i;return __webpack_require__.d(a,{a:a}),a},__webpack_require__.d=(i,a)=>{for(var o in a)__webpack_require__.o(a,o)&&!__webpack_require__.o(i,o)&&Object.defineProperty(i,o,{enumerable:!0,get:a[o]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(i){if("object"==typeof window)return window}}(),__webpack_require__.o=(i,a)=>Object.prototype.hasOwnProperty.call(i,a),__webpack_require__.r=i=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var o={};(()=>{"use strict";function _defineProperty(i,a,o){return a in i?Object.defineProperty(i,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):i[a]=o,i}function _arrayLikeToArray(i,a){(null==a||a>i.length)&&(a=i.length);for(var o=0,s=new Array(a);o<a;o++)s[o]=i[o];return s}function _slicedToArray(i,a){return function _arrayWithHoles(i){if(Array.isArray(i))return i}(i)||function _iterableToArrayLimit(i,a){var o=null==i?null:"undefined"!=typeof Symbol&&i[Symbol.iterator]||i["@@iterator"];if(null!=o){var s,u,l=[],h=!0,d=!1;try{for(o=o.call(i);!(h=(s=o.next()).done)&&(l.push(s.value),!a||l.length!==a);h=!0);}catch(i){d=!0,u=i}finally{try{h||null==o.return||o.return()}finally{if(d)throw u}}return l}}(i,a)||function _unsupportedIterableToArray(i,a){if(i){if("string"==typeof i)return _arrayLikeToArray(i,a);var o=Object.prototype.toString.call(i).slice(8,-1);return"Object"===o&&i.constructor&&(o=i.constructor.name),"Map"===o||"Set"===o?Array.from(i):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_arrayLikeToArray(i,a):void 0}}(i,a)||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.")}()}__webpack_require__.r(o),__webpack_require__.d(o,{EDSCEchoform:()=>oe,default:()=>se});const i=require("react");var a=__webpack_require__.n(i),s=__webpack_require__(697),u=__webpack_require__.n(s),l=function buildParentXpath(i,a){var o=a;return i&&!a.startsWith("/")&&(o="".concat(i,"/").concat(a)),o},h=function buildXPathResolverFn(i){var a,o={},s=/\sxmlns(?::(\w+))?="([^"]+)"/g;for(a=s.exec(i.firstChild.outerHTML);null!=a;){var u=_slicedToArray(Array.from(a.slice(1,3)),2),l=u[0],h=u[1];o[null!=l?l:" default "]=h,a=s.exec(i.firstChild.outerHTML)}return function(i){return o[null!==i?i:" default "]}},d=__webpack_require__(437),p=function evaluateXpath(i,a,o){var s=i;"["===i.charAt(0)&&(s="self::*".concat(i)),s=s.replace(/^\/+|(https:)?\/\//g,(function(i,a){return a?i:"/descendant-or-self::node()/"}));var u,l=a.ownerDocument.evaluate(s,a,o,XPathResult.ANY_TYPE,null);switch(l.resultType){case XPathResult.NUMBER_TYPE:u=l.numberValue;break;case XPathResult.STRING_TYPE:u=l.stringValue;break;case XPathResult.BOOLEAN_TYPE:u=l.booleanValue;break;default:u=l.iterateNext()}return u},m=function hasModelChanged(i,a,o){var s=!1;return(0,d.diffAsXml)(i.innerHTML,a.innerHTML,{"ecs:email":{skipKey:!0},"ecs:INCLUDE_META":{skipKey:!0}},{},(function(i){if(i.length>0){var u=0;i.forEach((function(i){var s=i.path;(function isNodeOrParentIrrelevant(i){return!(!i||!i.getAttribute)&&("true"===i.getAttribute("irrelevant")||isNodeOrParentIrrelevant(i.parentNode))})(p((void 0===s?"":s).replaceAll(".","/"),a,o))&&(u+=1)})),u!==i.length&&(s=!0)}})),s};function _typeof(i){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(i){return typeof i}:function(i){return i&&"function"==typeof Symbol&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i})(i)}var y=function updateModel(i,a,o,s){var u=p(o,i.firstElementChild,a);if(u||console.warn("Unable to update model value, value is:",u,o,i.outerHTML),"object"===_typeof(s)){var l=s.value,h=s.valueElementName,d=u.namespaceURI,m=[u.prefix,h].filter(Boolean).join(":");u.innerHTML=l.map((function(i){var a=document.createElementNS(d,m);return a.textContent=i,a.outerHTML})).join("")}else u.textContent=s;return i},g=(0,i.createContext)({addBootstrapClasses:!1,hasShapefile:!1,model:{},onUpdateModel:function onUpdateModel(){},resolver:function resolver(){},setFormIsValid:function setFormIsValid(){},setRelevantFields:function setRelevantFields(){},setSimplifiedTree:function setSimplifiedTree(){},simplifiedTree:{}}),v=function useClasses(){var a=(0,i.useContext)(g).addBootstrapClasses;return{elementClasses:(0,i.useCallback)((function(i,o,s){var u=i;return s&&(u+=" is-invalid"),a?[o,u].filter(Boolean).join(" "):u}),[a])}};function _extends(){return(_extends=Object.assign||function(i){for(var a=1;a<arguments.length;a++){var o=arguments[a];for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(i[s]=o[s])}return i}).apply(this,arguments)}var b=__webpack_require__(53),E=__webpack_require__.n(b),T=function getAttribute(i,a){var o=i.getNamedItem(a);return o?o.value:null},N=function getNodeValue(i,a,o,s,u){if("true"===i||"false"===i)return"true"===i;var l=p(i,a,o);if(s&&null==l)return!1;if("boolean"==typeof l)return l;var h=l.children,d=void 0===h?[]:h;return 0===d.length?u?[]:l.textContent.trim():Array.from(d).map((function(i){return i.textContent.trim()}))},O=function validateIntegerRange(i,a,o){var s=Number(o);return!Number.isNaN(s)&&s>=i&&s<=a&&-1===o.indexOf(".")},S=function typeValidation(i,a){if(!a)return!0;switch(i){case"datetime":return function validateDateTime(i){var a="Value must be a date/time with format YYYY-MM-DDTHH:MM:SS";if(!i)return!0;if(!i.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$/))return a;var o=_slicedToArray(Array.from(i.split("T")),2),s=o[0],u=o[1],l=_slicedToArray(s.split("-").map((function(i){return parseInt(i,10)})),3),h=l[0],d=l[1],p=l[2],m=_slicedToArray(u.split(":").map((function(i){return parseInt(i,10)})),3),y=m[0],g=m[1],v=m[2];return!!(h&&d>=1&&d<=12&&p>=1&&p<=31&&y<24&&g<60&&v<60)||a}(a);case"double":return function validateDouble(i){return!i||(!Number.isNaN(Number(i))||"Value must be a number")}(a);case"long":return function validateLong(i){return!i||(!!O(-Math.pow(2,63),Math.pow(2,63)-1,i)||"Value must be a integer between -2^63 and 2^63-1")}(a);case"int":return function validateInteger(i){return!i||(!!O(-Math.pow(2,31),Math.pow(2,31)-1,i)||"Value must be a integer between -2,147,483,648 and 2,147,483,647")}(a);case"short":return function validateShort(i){return!i||(!!O(-Math.pow(2,15),Math.pow(2,15)-1,i)||"Value must be a integer between -32,768 and 32,767")}(a);default:return!0}},I=function Constraint(o){var s=o.elements,u=o.manualError,l=o.model,h=o.required,d=o.type,m=o.value,y=o.setFieldIsValid,v=(0,i.useContext)(g).resolver;if(!s)return null;var b=[];u&&b.push(u),Array.from(s).filter((function(i){return"constraints"===i.tagName})).forEach((function(i){var a=i.children;Array.from(a).filter((function(i){return"constraint"===i.tagName})).forEach((function(i){var a=i.children,o=Array.from(a).filter((function(i){return"xpath"===i.tagName}))[0],s=Array.from(a).filter((function(i){return"pattern"===i.tagName}))[0],u=Array.from(a).filter((function(i){return"alert"===i.tagName}))[0];(o&&!p(o.textContent,l,v)&&b.push(u.textContent),s)&&(null===RegExp(s.textContent).exec(m)&&b.push(u.textContent))}))}));var E=S(d,m);return!0!==E&&b.push(E),!h||m&&m.length||b.push("Required field"),y(!b.length),b.map((function(i){return a().createElement("div",{key:i,className:"invalid-feedback"},i)}))};I.defaultProps={elements:{},manualError:null,type:null,value:null},I.propTypes={elements:u().shape({}),manualError:u().string,model:u().shape({}).isRequired,required:u().bool.isRequired,type:u().string,value:u().oneOfType([u().string,u().arrayOf(u().string)]),setFieldIsValid:u().func.isRequired};var k=function Help(i){var o=i.elements,s=i.manualHelp,u=(0,v().elementClasses)("help-text","form-text text-muted"),l=[];return o&&Array.from(o).filter((function(i){return"help"===i.tagName})).forEach((function(i){var o=i.textContent;l.push(a().createElement("small",{key:o,className:u},o))})),s&&l.push(a().createElement("small",{key:s,className:u},s)),a().createElement(a().Fragment,null,l)};function ownKeys(i,a){var o=Object.keys(i);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(i);a&&(s=s.filter((function(a){return Object.getOwnPropertyDescriptor(i,a).enumerable}))),o.push.apply(o,s)}return o}function _objectSpread(i){for(var a=1;a<arguments.length;a++){var o=null!=arguments[a]?arguments[a]:{};a%2?ownKeys(Object(o),!0).forEach((function(a){_defineProperty(i,a,o[a])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(o)):ownKeys(Object(o)).forEach((function(a){Object.defineProperty(i,a,Object.getOwnPropertyDescriptor(o,a))}))}return i}k.defaultProps={elements:{},manualHelp:null},k.propTypes={elements:u().shape({}),manualHelp:u().oneOfType([u().string,u().node])};var B=function ElementWrapper(o){var s=o.children,u=o.elementHash,l=o.formElements,h=o.htmlFor,d=o.label,p=o.manualError,m=o.manualHelp,y=o.model,b=o.required,E=o.type,T=o.value,N=(0,i.useContext)(g).setFormIsValid,O=_slicedToArray((0,i.useState)(!0),2),S=O[0],B=O[1],R=v().elementClasses;return(0,i.useEffect)((function(){N((function(i){return _objectSpread(_objectSpread({},i),{},_defineProperty({},u,S))}))}),[S]),a().createElement("div",{className:R("","form-group row")},a().createElement("label",{htmlFor:h,className:R("","form-label col-form-label col-sm-4 text-right")},d),a().createElement("div",{className:R("","col-sm-8")},s({isFieldValid:S}),a().createElement(I,{elements:l,setFieldIsValid:B,manualError:p,model:y,required:b,type:E,value:T}),a().createElement(k,{elements:l,manualHelp:m})))};B.defaultProps={children:null,formElements:null,htmlFor:"",label:null,manualError:null,manualHelp:null,required:!1,type:null,value:null},B.propTypes={children:u().func,elementHash:u().number.isRequired,formElements:u().shape({}),htmlFor:u().string,label:u().string,manualError:u().string,manualHelp:u().oneOfType([u().string,u().node]),model:u().shape({}).isRequired,required:u().bool,type:u().string,value:u().oneOfType([u().string,u().arrayOf(u().string)])};var R=function Checkbox(o){var s,u=o.checked,l=o.children,h=o.elementHash,d=o.id,p=o.label,m=o.model,y=o.modelRef,b=o.parentRef,E=o.readOnly,T=o.required,N=(0,i.useContext)(g),O=N.hasShapefile,S=N.onUpdateModel,I=v().elementClasses,k=function onChange(i){S(b,y,i.target.checked)},R=!1;return d&&d.includes("use-shapefile")&&(O?s="Complex shapefiles may take longer to process. You will receive an email when your files are finished processing.":(R=!0,s=a().createElement("span",null,"Click"," ",a().createElement("b",null,"Back to Search")," ","and upload a KML or Shapefile to enable this option."))),a().createElement(B,{elementHash:h,formElements:l,htmlFor:d,manualHelp:s,model:m,required:T,value:u},(function(i){var o=i.isFieldValid;return a().createElement(a().Fragment,null,a().createElement("input",{className:I("checkbox__input","form-check-input",!o),checked:"true"===u,disabled:R,id:d,name:p,readOnly:E,type:"checkbox",onChange:k}),a().createElement("label",{className:I("checkbox__label","form-check-label"),htmlFor:d},p))}))};R.defaultProps={children:null,id:"",label:"",parentRef:null},R.propTypes={checked:u().string.isRequired,children:u().shape({}),elementHash:u().number.isRequired,id:u().string,label:u().string,model:u().shape({}).isRequired,modelRef:u().string.isRequired,parentRef:u().string,readOnly:u().bool.isRequired,required:u().bool.isRequired};var P=function InputField(o){var s=o.children,u=o.elementHash,l=o.id,h=o.label,d=o.model,p=o.modelRef,m=o.parentRef,y=o.placeholder,b=o.readOnly,E=o.required,T=o.type,N=o.value,O=_slicedToArray((0,i.useState)(N),2),S=O[0],I=O[1],k=(0,i.useContext)(g).onUpdateModel,R=v().elementClasses;(0,i.useEffect)((function(){I(N)}),[N]);var P=function onBlur(){k(m,p,S)},L=function onChange(i){I(i.target.value)};return a().createElement(B,{elementHash:u,formElements:s,htmlFor:l,label:h,model:d,required:E,type:T,value:N},(function(i){var o=i.isFieldValid;return a().createElement("input",{className:R("input","form-control",!o),id:l,name:h,placeholder:y,readOnly:b,type:T,value:S,onBlur:P,onChange:L})}))};P.defaultProps={children:null,id:"",parentRef:null,placeholder:"",type:null,value:""},P.propTypes={children:u().shape({}),elementHash:u().number.isRequired,id:u().string,label:u().string.isRequired,model:u().shape({}).isRequired,modelRef:u().string.isRequired,parentRef:u().string,placeholder:u().string,readOnly:u().bool.isRequired,required:u().bool.isRequired,type:u().string,value:u().string};var L=function DateTime(i){var o=i.children,s=i.elementHash,u=i.id,l=i.label,h=i.model,d=i.modelRef,p=i.parentRef,m=i.readOnly,y=i.required,g=i.value;return a().createElement(P,{elementHash:s,id:u,label:l,model:h,modelRef:d,parentRef:p,placeholder:"YYYY-MM-DDTHH:MM:SS",readOnly:m,required:y,type:"datetime",value:g},o)};L.defaultProps={children:null,id:"",parentRef:null,value:""},L.propTypes={children:u().shape({}),elementHash:u().number.isRequired,id:u().string,label:u().string.isRequired,model:u().shape({}).isRequired,modelRef:u().string.isRequired,parentRef:u().string,readOnly:u().bool.isRequired,required:u().bool.isRequired,value:u().string};__webpack_require__(454);var D=function Group(o){var s=o.children,u=o.id,h=o.label,d=o.model,m=o.modelRef,y=o.parentRef,b=o.readOnly,E=(0,i.useContext)(g).resolver,T=v().elementClasses,N=p(m,d,E),O=T("group__header","card-header"),S=l(y,m);return a().createElement("div",{id:u,className:T("group","card")},h&&a().createElement("div",{className:O},h,a().createElement(k,{elements:s})),a().createElement("div",{className:T("group__body","card-body")},s&&Array.from(s).filter((function(i){return"help"!==i.tagName})).map((function(i){return a().createElement(ie,{key:i.outerHTML,element:i,model:N,parentReadOnly:b,parentRef:S})}))))};D.defaultProps={children:null,id:"",label:"",modelRef:void 0,parentRef:null,readOnly:void 0},D.propTypes={children:u().shape({}),id:u().string,label:u().string,model:u().shape({}).isRequired,modelRef:u().string,parentRef:u().string,readOnly:u().bool};var M=function Number(i){var o=i.children,s=i.elementHash,u=i.id,l=i.label,h=i.model,d=i.modelRef,p=i.parentRef,m=i.readOnly,y=i.required,g=i.type,v=i.value;return a().createElement(P,{elementHash:s,id:u,label:l,model:h,modelRef:d,parentRef:p,readOnly:m,required:y,type:g,value:v},o)};M.defaultProps={children:null,id:"",parentRef:null,value:""},M.propTypes={children:u().shape({}),elementHash:u().number.isRequired,id:u().string,label:u().string.isRequired,model:u().shape({}).isRequired,modelRef:u().string.isRequired,parentRef:u().string,readOnly:u().bool.isRequired,required:u().bool.isRequired,type:u().string.isRequired,value:u().string};var q=function Output(o){var s=o.children,u=o.elementHash,l=o.id,h=o.label,d=o.model,m=o.type,y=o.value,v=(0,i.useContext)(g).resolver,b=y;try{null==(b=p(y,d,v))&&(b=y)}catch(i){b=y}return a().createElement(B,{elementHash:u,formElements:s,htmlFor:l,label:h,model:d},(function(){return a().createElement(a().Fragment,null,"anyuri"===m&&a().createElement("a",{className:"form-text",id:l,href:b},b),(!m||"anyuri"!==m)&&a().createElement("p",{className:"form-text mb-0",id:l},b))}))};q.defaultProps={children:null,id:"",type:"",value:""},q.propTypes={children:u().shape({}),elementHash:u().number.isRequired,id:u().string,label:u().string.isRequired,model:u().shape({}).isRequired,type:u().string,value:u().string};__webpack_require__(516);var U=function Range(o){var s=o.children,u=o.elementHash,l=o.id,h=o.label,d=o.max,p=o.min,m=o.model,y=o.modelRef,b=o.parentRef,E=o.readOnly,T=o.required,N=o.step,O=o.value,S=(0,i.useContext)(g).onUpdateModel,I=_slicedToArray((0,i.useState)(O),2),k=I[0],R=I[1],P=_slicedToArray((0,i.useState)(""),2),L=P[0],D=P[1],M=_slicedToArray((0,i.useState)(""),2),q=M[0],U=M[1],V=v().elementClasses;(0,i.useEffect)((function(){R(O)}),[O]),(0,i.useEffect)((function(){var i=k;k||(i=p);var a=Number(100*(i-p))/(d-p);D(25-.5*a),U(a)}),[k,d,p]);var H=function onChange(i){R(i.target.value)},G=function updateModel(i){S(b,y,i.target.value)};return a().createElement(B,{elementHash:u,formElements:s,htmlFor:l,label:h,model:m,required:T,value:k},(function(i){var o=i.isFieldValid;return a().createElement(a().Fragment,null,a().createElement("input",{className:V("range__input","form-control-range",!o),id:l,max:d,min:p,name:h,readOnly:E,step:N,type:"range",value:k||p,onChange:H,onMouseUp:G,onKeyUp:G}),a().createElement("div",{className:"range__markers"},a().createElement("span",{className:"range__min"},p),a().createElement("span",{className:"range__max"},d)),a().createElement("div",{className:"range__value",style:{left:"calc(".concat(q,"% + (").concat(L,"px))")}},a().createElement("span",null,k||p)))}))};U.defaultProps={children:null,id:"",parentRef:null,value:""},U.propTypes={children:u().shape({}),elementHash:u().number.isRequired,id:u().string,label:u().string.isRequired,max:u().string.isRequired,min:u().string.isRequired,model:u().shape({}).isRequired,modelRef:u().string.isRequired,parentRef:u().string,readOnly:u().bool.isRequired,required:u().bool.isRequired,step:u().string.isRequired,value:u().string};var V=function SecretField(i){var o=i.children,s=i.elementHash,u=i.id,l=i.label,h=i.model,d=i.modelRef,p=i.parentRef,m=i.readOnly,y=i.required,g=i.value;return a().createElement(P,{elementHash:s,id:u,label:l,model:h,modelRef:d,parentRef:p,readOnly:m,required:y,type:"password",value:g},o)};V.defaultProps={children:null,id:"",parentRef:null,value:""},V.propTypes={children:u().shape({}),elementHash:u().number.isRequired,id:u().string,label:u().string.isRequired,model:u().shape({}).isRequired,modelRef:u().string.isRequired,parentRef:u().string,readOnly:u().bool.isRequired,required:u().bool.isRequired,value:u().string};var H=function Select(o){var s=o.children,u=o.elementHash,l=o.id,h=o.label,d=o.model,p=o.modelRef,m=o.multiple,y=o.parentRef,b=o.readOnly,E=o.required,N=o.value,O=o.valueElementName,S=(0,i.useContext)(g).onUpdateModel,I=v().elementClasses,k=(0,i.useRef)(N),R=function onChange(i){var a=i.target.selectedOptions,o=[];Array.from(a).forEach((function(i){var a=i.attributes,s=T(a,"value");o.push(s)})),S(y,p,{value:o,valueElementName:O})},P=[],L=!1;if(Array.from(s).filter((function(i){return"item"===i.tagName})).forEach((function(i){var o=i.attributes,s=T(o,"label"),u=T(o,"value");""===u&&(L=!0),P.push(a().createElement("option",{key:"option-".concat(u),value:u},s))})),!m&&!L&&!k.current.length){var D=" -- No selection -- ";E&&(D=" -- Select a value -- "),P.unshift(a().createElement("option",{key:"default option"},D))}return a().createElement(B,{elementHash:u,formElements:s,htmlFor:l,label:h,model:d,required:E,value:N},(function(i){var o=i.isFieldValid;return a().createElement("select",{className:I("select__input","form-control",!o),id:l,name:h,multiple:m,readOnly:b,value:m?N:N[0]||"",onChange:R},P)}))};H.defaultProps={children:null,id:"",label:"",multiple:!1,parentRef:null,value:[],valueElementName:""},H.propTypes={children:u().shape({}),elementHash:u().number.isRequired,id:u().string,label:u().string,model:u().shape({}).isRequired,modelRef:u().string.isRequired,multiple:u().bool,parentRef:u().string,readOnly:u().bool.isRequired,required:u().bool.isRequired,value:u().arrayOf(u().string),valueElementName:u().string};var G=function TextArea(o){var s=o.children,u=o.elementHash,l=o.id,h=o.label,d=o.model,p=o.modelRef,m=o.parentRef,y=o.readOnly,b=o.required,E=o.value,T=_slicedToArray((0,i.useState)(E),2),N=T[0],O=T[1],S=(0,i.useContext)(g).onUpdateModel,I=v().elementClasses;(0,i.useEffect)((function(){O(E)}),[E]);var k=function onBlur(){S(m,p,N)},R=function onChange(i){O(i.target.value)};return a().createElement(B,{elementHash:u,formElements:s,htmlFor:l,label:h,model:d,required:b,value:E},(function(i){var o=i.isFieldValid;return a().createElement("textarea",{className:I("textarea__input","form-control",!o),id:l,name:h,readOnly:y,value:N,onBlur:k,onChange:R})}))};G.defaultProps={children:null,id:"",parentRef:null,value:""},G.propTypes={children:u().shape({}),elementHash:u().number.isRequired,id:u().string,label:u().string.isRequired,model:u().shape({}).isRequired,modelRef:u().string.isRequired,parentRef:u().string,readOnly:u().bool.isRequired,required:u().bool.isRequired,value:u().string};var X=function TextField(i){var o=i.children,s=i.elementHash,u=i.id,l=i.label,h=i.model,d=i.modelRef,p=i.parentRef,m=i.readOnly,y=i.required,g=i.value;return a().createElement(P,{elementHash:s,id:u,label:l,model:h,modelRef:d,parentRef:p,readOnly:m,required:y,value:g},o)};function asyncGeneratorStep(i,a,o,s,u,l,h){try{var d=i[l](h),p=d.value}catch(i){return void o(i)}d.done?a(p):Promise.resolve(p).then(s,u)}X.defaultProps={children:null,id:"",parentRef:null,value:""},X.propTypes={children:u().shape({}),elementHash:u().number.isRequired,id:u().string,label:u().string.isRequired,model:u().shape({}).isRequired,modelRef:u().string.isRequired,parentRef:u().string,readOnly:u().bool.isRequired,required:u().bool.isRequired,value:u().string};var Y=__webpack_require__(757),z=__webpack_require__.n(Y),Q={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},ee=i.createContext&&i.createContext(Q),__assign=function(){return(__assign=Object.assign||function(i){for(var a,o=1,s=arguments.length;o<s;o++)for(var u in a=arguments[o])Object.prototype.hasOwnProperty.call(a,u)&&(i[u]=a[u]);return i}).apply(this,arguments)},__rest=function(i,a){var o={};for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&a.indexOf(s)<0&&(o[s]=i[s]);if(null!=i&&"function"==typeof Object.getOwnPropertySymbols){var u=0;for(s=Object.getOwnPropertySymbols(i);u<s.length;u++)a.indexOf(s[u])<0&&(o[s[u]]=i[s[u]])}return o};function iconBase_GenIcon(a){return function(o){return i.createElement(IconBase,__assign({attr:__assign({},a.attr)},o),function Tree2Element(a){return a&&a.map((function(a,o){return i.createElement(a.tag,__assign({key:o},a.attr),Tree2Element(a.child))}))}(a.child))}}function IconBase(a){var elem=function(o){var s,u=a.size||o.size||"1em";o.className&&(s=o.className),a.className&&(s=(s?s+" ":"")+a.className);var l=a.attr,h=a.title,d=__rest(a,["attr","title"]);return i.createElement("svg",__assign({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},o.attr,l,d,{className:s,style:__assign({color:a.color||o.color},o.style,a.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),h&&i.createElement("title",null,h),a.children)};return void 0!==ee?i.createElement(ee.Consumer,null,(function(i){return elem(i)})):elem(Q)}function FaFolderOpen(i){return iconBase_GenIcon({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.694 292.093L500.27 416.248A63.997 63.997 0 0 1 444.989 448H45.025c-18.523 0-30.064-20.093-20.731-36.093l72.424-124.155A64 64 0 0 1 152 256h399.964c18.523 0 30.064 20.093 20.73 36.093zM152 224h328v-48c0-26.51-21.49-48-48-48H272l-64-64H48C21.49 64 0 85.49 0 112v278.046l69.077-118.418C86.214 242.25 117.989 224 152 224z"}}]})(i)}function FaFolder(i){return iconBase_GenIcon({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 128H272l-64-64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V176c0-26.51-21.49-48-48-48z"}}]})(i)}__webpack_require__(365);var te=function TreeItem(o){var s=o.filterText,u=o.item,l=o.model,h=o.onChange,d=o.isFirst,p=o.isLast,m=u.checked,y=u.children,g=u.disabled,b=u.expanded,E=u.fullValue,T=u.id,N=u.isParent,O=u.label,S=u.level,I=u.relevant,k=u.required,B=(0,i.useRef)(null),R=v().elementClasses,P=_slicedToArray((0,i.useState)(b),2),L=P[0],D=P[1];(0,i.useEffect)((function(){B.current&&(B.current.indeterminate="indeterminate"===m)}),[B.current,m]);var M;if(s.length>1&&(M=u.childrenMatchFilter(s),!u.matchesFilter(s)&&!M))return null;var q=!L&&!M,U="tree-item";return U+=" ".concat("tree-item--child-".concat(S)),U+=" ".concat(N?"tree-item--is-parent":""),U+=" ".concat(d?"tree-item--is-first":""),U+=" ".concat(p?"tree-item--is-last":""),U+=" ".concat(q?"":"tree-item--is-open"),U+=" ".concat(p?"tree-item--has-blocker":""),U+=" ".concat(I?"":"tree-item--is-not-relevant"),a().createElement("div",{className:R(U)},a().createElement("div",{className:R("tree-item__header")},N&&a().createElement("button",{className:R("tree-item__parent-button","btn"),type:"button",onClick:function onToggleExpanded(){u.setExpanded(!L),D(!L)}},a().createElement(ee.Provider,{value:{style:{width:"1.25em"}}},q?a().createElement(FaFolder,null):a().createElement(FaFolderOpen,null))),a().createElement("input",{id:T,className:R("tree-item__checkbox"),type:"checkbox",value:E,onChange:function handleChange(i){u.setChecked(i.target.checked),h()},checked:m,disabled:g,ref:B}),a().createElement("label",{className:R("tree-item__label"),htmlFor:T},O,!I&&a().createElement("span",{className:R("tree-item__irrelevant-label","ml-1 small")},"(not available)"),k&&a().createElement("span",{className:R("tree-item__required-label","ml-1 small")},"(required)"))),(L||M)&&function childItems(){return y.map((function(i,o){return a().createElement(TreeItem,{key:"".concat(i.elementHash),filterText:s,item:i,model:l,onChange:h,isFirst:0===o,isLast:o===y.length-1})}))}())};function _defineProperties(i,a){for(var o=0;o<a.length;o++){var s=a[o];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(i,s.key,s)}}function TreeNode_ownKeys(i,a){var o=Object.keys(i);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(i);a&&(s=s.filter((function(a){return Object.getOwnPropertyDescriptor(i,a).enumerable}))),o.push.apply(o,s)}return o}function TreeNode_objectSpread(i){for(var a=1;a<arguments.length;a++){var o=null!=arguments[a]?arguments[a]:{};a%2?TreeNode_ownKeys(Object(o),!0).forEach((function(a){_defineProperty(i,a,o[a])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(o)):TreeNode_ownKeys(Object(o)).forEach((function(a){Object.defineProperty(i,a,Object.getOwnPropertyDescriptor(o,a))}))}return i}te.defaultProps={filterText:""},te.propTypes={filterText:u().string,isFirst:u().bool.isRequired,isLast:u().bool.isRequired,item:u().shape({checked:u().oneOfType([u().string,u().bool]),children:u().arrayOf(u().shape({length:u().number})),disabled:u().bool,expanded:u().bool,fullValue:u().string,id:u().string,isParent:u().bool,label:u().string,level:u().number,relevant:u().bool,required:u().bool,childrenMatchFilter:u().func,matchesFilter:u().func,setChecked:u().func,setExpanded:u().func}).isRequired,model:u().shape({}).isRequired,onChange:u().func.isRequired};var re=function(){function TreeNode(i){!function _classCallCheck(i,a){if(!(i instanceof a))throw new TypeError("Cannot call a class as a function")}(this,TreeNode),this.props=i,this.cascade=this.props.cascade,this.checkedFields=this.props.checkedFields,this.element=this.props.element,this.level=this.props.level||0,this.model=this.props.model,this.parentChecked=this.props.parentChecked,this.resolver=this.props.resolver,this.separator=this.props.separator,this.simplifyOutput=this.props.simplifyOutput,this.onUpdateFinished=this.props.onUpdateFinished,this.elementHash=E().v3(this.element.outerHTML,"seed"),this.allItems={},this.checked=!1,this.children=[],this.disabled=!1,this.expanded=1===this.level,this.relevantAttribute=void 0,this.requiredAttribute=void 0,this.totalLeafNodes=void 0,this.value=void 0,this.buildNode(i),this.setup=this.setup.bind(this),this.setupChildren=this.setupChildren.bind(this),this.updateNode=this.updateNode.bind(this),this.setExpanded=this.setExpanded.bind(this),this.getValue=this.getValue.bind(this),this.getLabel=this.getLabel.bind(this),this.getRelevant=this.getRelevant.bind(this),this.getRequired=this.getRequired.bind(this),this.getDisabled=this.getDisabled.bind(this),this.getTotalLeafNodes=this.getTotalLeafNodes.bind(this),this.getNumberSelectedNodes=this.getNumberSelectedNodes.bind(this),this.matchesFilter=this.matchesFilter.bind(this),this.childrenMatchFilter=this.childrenMatchFilter.bind(this)}return function _createClass(i,a,o){return a&&_defineProperties(i.prototype,a),o&&_defineProperties(i,o),Object.defineProperty(i,"prototype",{writable:!1}),i}(TreeNode,[{key:"buildNode",value:function buildNode(i){var a=i.element,o=i.parent,s=void 0===o?{}:o,u=a.attributes,l=a.children;this.value=this.getValue(u,this.value),this.fullValue=this.getFullValue(s.fullValue,this.value),this.id=this.fullValue,this.label=this.getLabel(u,this.value),"tree"!==this.element.tagName&&(this.parent=s,this.allItems=TreeNode_objectSpread(TreeNode_objectSpread({},this.allItems),{},_defineProperty({},this.fullValue,this))),this.isLeaf=0===l.length,this.isParent=l.length>0,this.isChild=""!==s.fullValue,l.length&&this.setupChildren(l),this.setup(u)}},{key:"setup",value:function setup(i){this.relevant=this.getRelevant(i),this.required=this.getRequired(i),this.disabled=this.getDisabled(),this.checked=this.determineChecked(this.checkedFields.includes(this.fullValue)||this.required),this.onUpdateFinished&&this.onUpdateFinished()}},{key:"setupChildren",value:function setupChildren(i){var a=this;Array.from(i).filter((function(i){return"item"===i.tagName})).forEach((function(i){var o=new TreeNode(TreeNode_objectSpread(TreeNode_objectSpread({},a.props),{},{level:a.level+1,element:i,parent:a,parentChecked:a.checkedFields.includes(a.fullValue)||a.required||a.parentChecked,onUpdateFinished:void 0}));a.allItems=TreeNode_objectSpread(TreeNode_objectSpread({},a.allItems),{},_defineProperty({},o.fullValue,o),o.allItems),a.children.push(o)}))}},{key:"updateNode",value:function updateNode(i,a,o){this.model=a,this.checkedFields=o;var s=i.attributes;return i.children.length&&this.updateChildren(),this.setup(s),this}},{key:"updateChildren",value:function updateChildren(){var i=this;this.children.forEach((function(a){a.parentChecked=void 0,a.updateNode(a,i.model,i.checkedFields)}))}},{key:"seralize",value:function seralize(){var i=this,a=[];return Object.keys(this.allItems).forEach((function(o){var s=i.allItems[o];!0===s.checked&&a.push(s.fullValue)})),a}},{key:"simplifiedSeralize",value:function simplifiedSeralize(){var i=this,a=[];return Object.keys(this.allItems).forEach((function(o){var s=i.allItems[o],u=!1;!0===s.checked&&(s.isParent&&s.allChildrenChecked()?s.isChild&&!0!==s.parent.checked?u=!0:s.isChild||(u=!0):s.isParent||!0===s.parent.checked||(u=!0)),u&&a.push(s.fullValue)})),a}},{key:"formatFilterText",value:function formatFilterText(i){return i.trim().toLowerCase()}},{key:"matchesFilter",value:function matchesFilter(i){return-1!==this.label.toLowerCase().indexOf(this.formatFilterText(i))}},{key:"childrenMatchFilter",value:function childrenMatchFilter(i){var a=this;return this.children.some((function(o){return o.matchesFilter(a.formatFilterText(i))||o.childrenMatchFilter(a.formatFilterText(i))}))}},{key:"getTotalLeafNodes",value:function getTotalLeafNodes(){return this.totalLeafNodes||(this.totalLeafNodes=Object.values(this.allItems).reduce((function(i,a){return a.isLeaf?i+1:i}),0)),this.totalLeafNodes}},{key:"getNumberSelectedNodes",value:function getNumberSelectedNodes(){return Object.values(this.allItems).reduce((function(i,a){return a.isLeaf&&!0===a.checked?i+1:i}),0)}},{key:"getFullValue",value:function getFullValue(i,a){return!i&&a?"".concat(this.separator).concat(a):[i,a].filter(Boolean).join(this.separator)}},{key:"determineChecked",value:function determineChecked(i){return!!this.relevant&&(!(!this.cascade||!this.parent||!0!==this.parentChecked)||(this.cascade&&!this.isLeaf||null==i?!!this.allChildrenChecked()||!!this.someChildrenChecked()&&"indeterminate":i))}},{key:"setChecked",value:function setChecked(i){var a=this,o=i;"indeterminate"===this.checked&&(o=!0,this.allEnabledChildrenChecked()&&(o=!1)),this.checked=o||this.required,this.relevant||(this.checked=!1),this.cascade&&this.children.forEach((function(i){i.setChecked(a.checked)}))}},{key:"setExpanded",value:function setExpanded(i){this.expanded=i}},{key:"allChildrenChecked",value:function allChildrenChecked(){return this.children.every((function(i){return!0===i.checked}))}},{key:"allEnabledChildrenChecked",value:function allEnabledChildrenChecked(){return this.children.every((function(i){return!0===i.checked||i.getDisabled()}))}},{key:"someChildrenChecked",value:function someChildrenChecked(){return this.children.some((function(i){return!0===i.checked||"indeterminate"===i.checked}))}},{key:"getValue",value:function getValue(i,a){return void 0===a?T(i,"value"):a}},{key:"getLabel",value:function getLabel(i,a){return void 0===this.label&&(this.label=T(i,"label")||a),this.label}},{key:"getDisabled",value:function getDisabled(){return this.required||!this.relevant||this.isParent&&this.children.every((function(i){return i.getDisabled()}))}},{key:"getRelevant",value:function getRelevant(i){return void 0===this.relevantAttribute&&(this.relevantAttribute=T(i,"relevant")),null==this.relevantAttribute||N(this.relevantAttribute,this.model,this.resolver)}},{key:"getRequired",value:function getRequired(i){return void 0===this.requiredAttribute&&(this.requiredAttribute=T(i,"required")),null!=this.requiredAttribute&&N(this.requiredAttribute,this.model,this.resolver)}}]),TreeNode}();__webpack_require__(381);function Tree_ownKeys(i,a){var o=Object.keys(i);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(i);a&&(s=s.filter((function(a){return Object.getOwnPropertyDescriptor(i,a).enumerable}))),o.push.apply(o,s)}return o}function Tree_objectSpread(i){for(var a=1;a<arguments.length;a++){var o=null!=arguments[a]?arguments[a]:{};a%2?Tree_ownKeys(Object(o),!0).forEach((function(a){_defineProperty(i,a,o[a])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(o)):Tree_ownKeys(Object(o)).forEach((function(a){Object.defineProperty(i,a,Object.getOwnPropertyDescriptor(o,a))}))}return i}var ne=function Tree(o){var s=o.children,u=o.element,l=o.elementHash,h=o.cascade,d=o.id,p=o.label,m=o.maxParameters,y=o.model,b=o.modelRef,E=o.parentRef,T=o.required,N=o.separator,O=o.simplifyOutput,S=o.value,I=o.valueElementName,k=(0,i.useContext)(g),R=k.model,P=k.resolver,L=k.simplifiedTree,D=k.setSimplifiedTree,M=k.onUpdateModel,q=v().elementClasses,U=(0,i.useRef)(void 0),V=(0,i.useRef)([]),H=_slicedToArray((0,i.useState)(),2)[1],G=(0,i.useCallback)((function(){return H({})}),[]),X=_slicedToArray((0,i.useState)(0),2),Y=X[0],Q=X[1],ee=_slicedToArray((0,i.useState)(0),2),ne=ee[0],ie=ee[1],ae=_slicedToArray((0,i.useState)(null),2),oe=ae[0],se=ae[1],ue=_slicedToArray((0,i.useState)(""),2),le=ue[0],ce=ue[1],fe=function updateModel(){var i=U.current.seralize();void 0!==V.current&&function isArrayEqual(i,a){if(i.length!==a.length)return!1;var o;for(o=0;o<i.length;o+=1)if(i[o]!==a[o])return!1;return!0}(i,V.current)||(O&&D(Tree_objectSpread(Tree_objectSpread({},L.current),{},_defineProperty({},d,{parentRef:E,modelRef:b,value:U.current.simplifiedSeralize(),valueElementName:I}))),V.current=i,M(E,b,{value:i,valueElementName:I}),ie(U.current.getNumberSelectedNodes()))};(0,i.useEffect)((function(){U.current=new re({cascade:h,checkedFields:S,element:u,model:y,resolver:P,separator:N,simplifyOutput:O,onUpdateFinished:G}),fe(),Q(U.current.getTotalLeafNodes()),ie(U.current.getNumberSelectedNodes())}),[]),(0,i.useEffect)((function(){!O&&m&&(ne>parseInt(m,10)?se("No more than ".concat(m," parameters can be selected.")):se(null))}),[ne]);var he=function updateTreeModel(){U.current=U.current.updateNode(u,y,S)},de=function(){var i=function _asyncToGenerator(i){return function(){var a=this,o=arguments;return new Promise((function(s,u){var l=i.apply(a,o);function _next(i){asyncGeneratorStep(l,s,u,_next,_throw,"next",i)}function _throw(i){asyncGeneratorStep(l,s,u,_next,_throw,"throw",i)}_next(void 0)}))}}(z().mark((function _callee(){return z().wrap((function _callee$(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,he();case 2:return i.next=4,fe();case 4:case"end":return i.stop()}}),_callee)})));return function update(){return i.apply(this,arguments)}}();if((0,i.useEffect)((function(){de()}),[R]),!U.current)return a().createElement("div",null,"Loading...");var pe=function onChange(){fe()},me=function onFilterChange(i){var a=i.target.value;ce(a)},ye=function onFilterClear(){ce("")};return a().createElement(B,{elementHash:l,formElements:s,htmlFor:d,label:p,manualError:oe,model:y,required:T,value:S},(function(i){var o=i.isFieldValid;return a().createElement("div",{className:q("tree","",!o)},a().createElement("div",{className:q("tree__filter")},a().createElement("label",{className:q("tree__filter-label","sr-only"),htmlFor:"tree_filter_input"},"Filter"),a().createElement("div",{className:q("tree__filter-input-group","input-group input-group-sm mb-2 mt-1")},a().createElement("div",{className:q("tree__filter-input-group-prepend","input-group-prepend input-group-prepend-sm")},a().createElement("div",{className:"input-group-text"},"Filter")),a().createElement("input",{id:"tree_filter_input",name:"tree_filter_input",className:q("tree__filter-input","form-control form-control-sm"),placeholder:"Enter text to filter bands",value:le,onChange:me}),a().createElement("div",{className:q("tree__filter-input-append tree__filter-input-append--clear","input-group-append")},a().createElement("button",{type:"button",label:"Clear",value:"",className:q("tree__filter-clear-button","btn btn-outline-secondary form-control-sm"),onClick:ye},a().createElement("span",{className:q("tree__filter-clear-button-text","")},"Clear"))))),a().createElement("div",{className:q("tree__node-count","mb-3")},a().createElement("span",{className:q("tree__node-count-text","text-secondary small")},ne," ","of"," ",Y," ","bands selected")),a().createElement("div",{className:"tree__list-wrapper"},a().createElement("div",{className:"tree__list"},function nodeList(){return U.current.children.map((function(i,o){return a().createElement(te,{key:"".concat(i.elementHash),filterText:le,item:i,model:y,onChange:pe,isFirst:0===o,isLast:o===U.current.children.length-1})}))}())))}))};ne.defaultProps={children:null,id:"",label:"",maxParameters:null,parentRef:null,value:[],valueElementName:""},ne.propTypes={cascade:u().bool.isRequired,children:u().shape({}),element:u().shape({}).isRequired,elementHash:u().number.isRequired,id:u().string,label:u().string,maxParameters:u().string,model:u().shape({outerHTML:u().string}).isRequired,modelRef:u().string.isRequired,parentRef:u().string,required:u().bool.isRequired,separator:u().string.isRequired,simplifyOutput:u().bool.isRequired,value:u().arrayOf(u().string),valueElementName:u().string};var ie=function FormElement(o){var s=o.element,u=o.parentReadOnly,l=o.parentRef,h=o.model,d=(0,i.useContext)(g),m=d.resolver,y=d.setRelevantFields,v=(0,i.useRef)(void 0),b=(0,i.useRef)(void 0),O=(0,i.useRef)(void 0),S=(0,i.useRef)(void 0),I=(0,i.useRef)(void 0),k=(0,i.useRef)(void 0),B=(0,i.useRef)(void 0),P=(0,i.useRef)(void 0),Y=(0,i.useRef)(void 0),z=(0,i.useRef)(void 0),Q=(0,i.useRef)(void 0),ee=(0,i.useRef)(void 0),te=(0,i.useRef)(void 0),re=(0,i.useRef)(void 0),ie=(0,i.useRef)(void 0),ae=(0,i.useRef)(void 0),oe=E().v3(s.outerHTML,"seed"),se=s.attributes,ue=s.children,le=s.tagName;if(!se)return null;void 0===B.current&&(B.current=T(se,"ref")),void 0===z.current&&(z.current=T(se,"relevant"));var ce=!0;if(z.current&&(ce=N(z.current,h,m,!0)),y(_defineProperty({},oe,ce)),function setRelevantAttribute(i,a,o,s){if(!o)return i;var u=p(o,i,a);s?u.removeAttribute("irrelevant"):u.setAttribute("irrelevant",!s)}(h,m,B.current,ce),!ce)return null;var fe=!1;u?fe=u:(void 0===Y.current&&(Y.current=T(se,"readonly")),Y.current&&(fe=N(Y.current,h,m,!0))),void 0===Q.current&&(Q.current=T(se,"required"));var he,de=!1;Q.current&&(de=N(Q.current,h,m,!0)),void 0===O.current&&(O.current=T(se,"label")),void 0===b.current&&(b.current=T(se,"id")),he=B.current?N(B.current,h,m,!1,"tree"===le):T(se,"value");var pe={elementHash:oe,id:b.current,label:O.current,model:h,modelRef:B.current,parentRef:l,readOnly:fe,required:de,value:he};return void 0===ie.current&&(ie.current=function derivedType(i){return i?i.toLowerCase().includes("boolean")?"boolean":i.toLowerCase().includes("datetime")?"datetime":i.toLowerCase().includes("double")?"double":i.toLowerCase().includes("long")?"long":i.toLowerCase().includes("int")?"int":i.toLowerCase().includes("short")?"short":i.toLowerCase().includes("anyuri")?"anyuri":"string":"string"}(T(se,"type"))),"input"===le?"boolean"===ie.current?a().createElement(R,_extends({checked:he},pe),ue):"datetime"===ie.current?a().createElement(L,pe,ue):"double"===ie.current||"long"===ie.current||"int"===ie.current||"short"===ie.current?a().createElement(M,_extends({},pe,{type:ie.current}),ue):a().createElement(X,pe,ue):"textarea"===le?a().createElement(G,pe,ue):"secret"===le?a().createElement(V,pe,ue):"select"===le||"selectref"===le?(void 0===P.current&&(P.current=T(se,"multiple")),void 0===ae.current&&(ae.current=T(se,"valueElementName")),"selectref"===le&&null===ae.current&&(ae.current="value"),a().createElement(H,_extends({},pe,{multiple:"true"===P.current,value:Array.from(he),valueElementName:ae.current}),ue)):"range"===le?(void 0===S.current&&(S.current=T(se,"end")),void 0===k.current&&(k.current=T(se,"start")),void 0===re.current&&(re.current=T(se,"step")),a().createElement(U,_extends({},pe,{max:S.current,min:k.current,step:re.current}),ue)):"output"===le?a().createElement(q,_extends({},pe,{type:ie.current}),ue):"group"===le?a().createElement(D,pe,ue):"tree"===le?(void 0===v.current&&(v.current="true"===(T(se,"cascade")||"true")),void 0===I.current&&(I.current=T(se,"maxParameters")),void 0===ee.current&&(ee.current=T(se,"separator")),void 0===te.current&&(te.current="true"===(T(se,"simplifyOutput")||"true")),void 0===ae.current&&(ae.current=T(se,"valueElementName")||he),a().createElement(ne,_extends({},pe,{element:s,cascade:v.current,maxParameters:I.current,separator:ee.current,simplifyOutput:te.current,valueElementName:ae.current}),ue)):a().createElement("p",null,le)};ie.defaultProps={parentReadOnly:void 0,parentRef:null},ie.propTypes={element:u().shape({attributes:u().shape({}),children:u().shape({}),outerHTML:u().string,tagName:u().string}).isRequired,model:u().shape({}).isRequired,parentReadOnly:u().bool,parentRef:u().string};var ae=function FormBody(i){var o=i.className,s=i.model,u=i.ui,l=v().elementClasses,h="form";return h+=" ".concat(o),a().createElement("div",{className:l(h,"card")},a().createElement("div",{className:l("form__body","card-body")},u.childElementCount>0&&Array.from(u.children).map((function(i){return a().createElement(ie,{key:i.outerHTML,element:i,model:s})}))))};function src_ownKeys(i,a){var o=Object.keys(i);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(i);a&&(s=s.filter((function(a){return Object.getOwnPropertyDescriptor(i,a).enumerable}))),o.push.apply(o,s)}return o}function src_objectSpread(i){for(var a=1;a<arguments.length;a++){var o=null!=arguments[a]?arguments[a]:{};a%2?src_ownKeys(Object(o),!0).forEach((function(a){_defineProperty(i,a,o[a])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(o)):src_ownKeys(Object(o)).forEach((function(a){Object.defineProperty(i,a,Object.getOwnPropertyDescriptor(o,a))}))}return i}ae.defaultProps={className:null},ae.propTypes={className:u().string,model:u().shape({}).isRequired,ui:u().shape({childElementCount:u().number,children:u().shape({})}).isRequired};var oe=function EDSCEchoform(o){var s=o.addBootstrapClasses,u=o.className,d=o.defaultRawModel,p=o.form,v=o.hasShapefile,b=o.prepopulateValues,E=o.onFormModelUpdated,T=o.onFormIsValidUpdated,N=_slicedToArray((0,i.useState)({}),2),O=N[0],S=N[1],I=_slicedToArray((0,i.useState)({}),2),k=I[0],B=I[1],R=_slicedToArray((0,i.useState)({}),2),P=R[0],L=R[1],D=_slicedToArray((0,i.useState)({}),2),M=D[0],q=D[1],U=(0,i.useRef)(void 0),V=_slicedToArray((0,i.useState)(Date.now()),2),H=V[0],G=V[1],X=(0,i.useRef)(void 0),Y=(0,i.useRef)({}),z=function getFormDoc(i){var a=p;i&&(a=p.replace(/(?:<instance>)(?:.|\n)*(?:<\/instance>)/,"<instance>\n".concat(i,"\n</instance>")));var o=function parseXml(i){var a;try{window.DOMParser?a=(new DOMParser).parseFromString(i,"text/xml"):((a=new ActiveXObject("Microsoft.XMLDOM")).async=!1,a.loadXML(i))}catch(i){console.error("Error parings XML:",i)}return a&&a.documentElement&&!a.getElementsByTagName("parsererror").length||console.error("Invalid XML: ".concat(i)),a}(a.replace(/>\s+</g,"><").replace(/^\s+|\s+$/g,""));return{doc:o,resolver:h(o)}},Q=function extendModelWithPrepopulateValues(i,a,o){return function handlePrepopulateExtension(i,a,o){if(!b||!i)return a;var s=a;return Array.from(i.children).filter((function(i){return"pre:expression"===i.tagName})).forEach((function(i){var a=i.getAttribute("ref"),u=i.getAttribute("source");null!=b[u]&&(s=y(s,o,a,b[u]))})),s}(i.evaluate('//*[local-name()="extension" and @name="pre:prepopulate"]/*',i,o,XPathResult.ANY_TYPE,null).iterateNext(),a,o)},ee=function setupForm(){var i=z(),a=i.doc,o=i.resolver,s=a.evaluate('//*[local-name()="instance"]',a,o,XPathResult.ANY_TYPE,null).iterateNext(),u=Q(a,s.cloneNode(!0),o);q(u);var l=z(d),h=l.doc,p=l.resolver;X.current=p;var m=h.evaluate('//*[local-name()="instance"]',h,X.current,XPathResult.ANY_TYPE,null).iterateNext(),y=Q(h,m.cloneNode(!0),X.current),g=h.evaluate('//*[local-name()="ui"]',h,X.current,XPathResult.ANY_TYPE,null).iterateNext();G(Date.now()),L({}),U.current=void 0,S(y),B(g)};(0,i.useEffect)((function(){ee()}),[p]),(0,i.useEffect)((function(){if(O.outerHTML){var i=z(d),a=i.doc,o=i.resolver;X.current=o;var s=Q(a,O.cloneNode(!0),o);S(s)}}),[b]),(0,i.useEffect)((function(){O.outerHTML&&!d&&ee()}),[d]),(0,i.useEffect)((function(){var i=Object.keys(P).filter((function(i){var a=P[i];return Y.current[i]&&!a}));T(!i.length)}),[P,Y]),(0,i.useEffect)((function(){if(O.outerHTML){var i=O.cloneNode(!0);void 0!==U.current&&Object.values(U.current).forEach((function(a){var o=a.parentRef,s=a.modelRef,u=a.value,l=a.valueElementName,h=s;o&&(h="".concat(o,"/").concat(s)),i=y(i,X.current,h,{value:u,valueElementName:l})}));var a=function pruneModel(i){return i.querySelectorAll("[irrelevant=true]").forEach((function(i){return i.parentNode.removeChild(i)})),i}(i.cloneNode(!0)).innerHTML;E({model:a,rawModel:i.innerHTML,hasChanged:m(M.cloneNode(!0),i.cloneNode(!0),X.current)})}}),[O]);return O.firstElementChild?a().createElement(g.Provider,{value:{addBootstrapClasses:s,hasShapefile:v,model:O.firstElementChild.innerHTML,onUpdateModel:function onUpdateModel(i,a,o){var s=l(i,a),u=y(O.cloneNode(!0),X.current,s,o);S(u)},resolver:X.current,setFormIsValid:L,setRelevantFields:function setRelevantFields(i){Y.current=src_objectSpread(src_objectSpread({},Y.current),i)},setSimplifiedTree:function setSimplifiedTree(i){U.current=i},simplifiedTree:U}},a().createElement(ae,{className:u,key:H,ui:k,model:O.firstElementChild})):null};oe.defaultProps={addBootstrapClasses:!1,className:null,defaultRawModel:null,hasShapefile:!1,prepopulateValues:null},oe.propTypes={addBootstrapClasses:u().bool,className:u().string,defaultRawModel:u().string,form:u().string.isRequired,hasShapefile:u().bool,prepopulateValues:u().shape({}),onFormModelUpdated:u().func.isRequired,onFormIsValidUpdated:u().func.isRequired};const se=oe})(),module.exports=o})();
|
|
9
11
|
//# sourceMappingURL=index.js.map
|