UNPKG

formiojs

Version:

Common js library for client side interaction with <form.io>

10 lines 84 kB
/*! formiojs v3.6.3 | https://unpkg.com/formiojs@3.6.3/LICENSE.txt */!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=63)}([function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(28)("wks"),o=n(14),i=n(0).Symbol,s="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=s&&i[t]||(s?i:o)("Symbol."+t))}).store=r},function(t,e,n){var r=n(9),o=n(42),i=n(17),s=Object.defineProperty;e.f=n(3)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){t.exports=!n(4)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(2),o=n(20);t.exports=n(3)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(0),o=n(7),i=n(6),s=n(14)("src"),a=Function.toString,u=(""+a).split("toString");n(18).inspectSource=function(t){return a.call(t)},(t.exports=function(t,e,n,a){var c="function"==typeof n;c&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(c&&(i(n,s)||o(n,s,t[e]?""+t[e]:u.join(String(e)))),t===r?t[e]=n:a?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[s]||a.call(this)})},function(t,e,n){var r=n(5);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){var r=n(0),o=n(18),i=n(7),s=n(8),a=n(46),u=function(t,e,n){var c,l,f,p,h=t&u.F,d=t&u.G,v=t&u.S,y=t&u.P,m=t&u.B,g=d?r:v?r[e]||(r[e]={}):(r[e]||{}).prototype,b=d?o:o[e]||(o[e]={}),_=b.prototype||(b.prototype={});for(c in d&&(n=e),n)f=((l=!h&&g&&void 0!==g[c])?g:n)[c],p=m&&l?a(f,r):y&&"function"==typeof f?a(Function.call,f):f,g&&s(g,c,f,t&u.U),b[c]!=f&&i(b,c,p),y&&_[c]!=f&&(_[c]=f)};r.core=o,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e,n){var r=n(48),o=n(12);t.exports=function(t){return r(o(t))}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(47),o=n(32);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){(function(r,o){var i; /*! Native Promise Only v0.8.1 (c) Kyle Simpson MIT License: http://getify.mit-license.org */ /*! Native Promise Only v0.8.1 (c) Kyle Simpson MIT License: http://getify.mit-license.org */ !function(r,o,s){o[r]=o[r]||s(),void 0!==t&&t.exports?t.exports=o[r]:void 0===(i=function(){return o[r]}.call(e,n,e,t))||(t.exports=i)}("Promise",void 0!==r?r:this,function(){"use strict";var t,e,n,r=Object.prototype.toString,i=void 0!==o?function(t){return o(t)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(t,e,n,r){return Object.defineProperty(t,e,{value:n,writable:!0,configurable:!1!==r})}}catch(e){t=function(t,e,n){return t[e]=n,t}}function s(t,r){n.add(t,r),e||(e=i(n.drain))}function a(t){var e,n=typeof t;return null==t||"object"!=n&&"function"!=n||(e=t.then),"function"==typeof e&&e}function u(){for(var t=0;t<this.chain.length;t++)c(this,1===this.state?this.chain[t].success:this.chain[t].failure,this.chain[t]);this.chain.length=0}function c(t,e,n){var r,o;try{!1===e?n.reject(t.msg):(r=!0===e?t.msg:e.call(void 0,t.msg))===n.promise?n.reject(TypeError("Promise-chain cycle")):(o=a(r))?o.call(r,n.resolve,n.reject):n.resolve(r)}catch(t){n.reject(t)}}function l(t){var e=this;e.triggered||(e.triggered=!0,e.def&&(e=e.def),e.msg=t,e.state=2,e.chain.length>0&&s(u,e))}function f(t,e,n,r){for(var o=0;o<e.length;o++)!function(o){t.resolve(e[o]).then(function(t){n(o,t)},r)}(o)}function p(t){this.def=t,this.triggered=!1}function h(t){if("function"!=typeof t)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var e=new function(t){this.promise=t,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}(this);this.then=function(t,n){var r={success:"function"!=typeof t||t,failure:"function"==typeof n&&n};return r.promise=new this.constructor(function(t,e){if("function"!=typeof t||"function"!=typeof e)throw TypeError("Not a function");r.resolve=t,r.reject=e}),e.chain.push(r),0!==e.state&&s(u,e),r.promise},this.catch=function(t){return this.then(void 0,t)};try{t.call(void 0,function(t){(function t(e){var n,r=this;if(!r.triggered){r.triggered=!0,r.def&&(r=r.def);try{(n=a(e))?s(function(){var o=new p(r);try{n.call(e,function(){t.apply(o,arguments)},function(){l.apply(o,arguments)})}catch(t){l.call(o,t)}}):(r.msg=e,r.state=1,r.chain.length>0&&s(u,r))}catch(t){l.call(new p(r),t)}}}).call(e,t)},function(t){l.call(e,t)})}catch(t){l.call(e,t)}}n=function(){var t,n,r;return{add:function(e,o){r=new function(t,e){this.fn=t,this.self=e,this.next=void 0}(e,o),n?n.next=r:t=r,n=r,r=void 0},drain:function(){var r=t;for(t=n=e=void 0;r;)r.fn.call(r.self),r=r.next}}}();var d=t({},"constructor",h,!1);return h.prototype=d,t(d,"__NPO__",0,!1),t(h,"resolve",function(t){return t&&"object"==typeof t&&1===t.__NPO__?t:new this(function(e,n){if("function"!=typeof e||"function"!=typeof n)throw TypeError("Not a function");e(t)})}),t(h,"reject",function(t){return new this(function(e,n){if("function"!=typeof e||"function"!=typeof n)throw TypeError("Not a function");n(t)})}),t(h,"all",function(t){var e=this;return"[object Array]"!=r.call(t)?e.reject(TypeError("Not an array")):0===t.length?e.resolve([]):new e(function(n,r){if("function"!=typeof n||"function"!=typeof r)throw TypeError("Not a function");var o=t.length,i=Array(o),s=0;f(e,t,function(t,e){i[t]=e,++s===o&&n(i)},r)})}),t(h,"race",function(t){var e=this;return"[object Array]"!=r.call(t)?e.reject(TypeError("Not an array")):new e(function(n,r){if("function"!=typeof n||"function"!=typeof r)throw TypeError("Not a function");f(e,t,function(t,e){n(e)},r)})}),h})}).call(this,n(13),n(98).setImmediate)},function(t,e,n){var r=n(5);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e){var n=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(t,e){t.exports=!1},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(47),o=n(32).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){"use strict";var r=n(7),o=n(8),i=n(4),s=n(12),a=n(1);t.exports=function(t,e,n){var u=a(t),c=n(s,u,""[t]),l=c[0],f=c[1];i(function(){var e={};return e[u]=function(){return 7},7!=""[t](e)})&&(o(String.prototype,t,l),r(RegExp.prototype,u,2==e?function(t,e){return f.call(t,this,e)}:function(t){return f.call(t,this)}))}},function(t,e,n){var r=n(61)(Object,"create");t.exports=r},function(t,e,n){var r=n(151);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},function(t,e,n){var r=n(157);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},function(t,e,n){var r=n(18),o=n(0),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(19)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var r=n(2).f,o=n(6),i=n(1)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(28)("keys"),o=n(14);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(9),o=n(73),i=n(32),s=n(31)("IE_PROTO"),a=function(){},u=function(){var t,e=n(43)("iframe"),r=i.length;for(e.style.display="none",n(74).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),u=t.F;r--;)delete u.prototype[i[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(a.prototype=r(t),n=new a,a.prototype=null,n[s]=t):n=u(),void 0===e?n:o(n,e)}},function(t,e,n){var r=n(22),o=n(20),i=n(11),s=n(17),a=n(6),u=n(42),c=Object.getOwnPropertyDescriptor;e.f=n(3)?c:function(t,e){if(t=i(t),e=s(e,!0),u)try{return c(t,e)}catch(t){}if(a(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e){t.exports={}},function(t,e,n){var r=n(5),o=n(21),i=n(1)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},function(t,e,n){var r=n(39).Symbol;t.exports=r},function(t,e,n){var r=n(110),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){var r=n(58),o=n(114),i="[object Symbol]";t.exports=function(t){return"symbol"==typeof t||o(t)&&r(t)==i}},function(t,e,n){t.exports=!n(3)&&!n(4)(function(){return 7!=Object.defineProperty(n(43)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(5),o=n(0).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){var r=n(0),o=n(18),i=n(19),s=n(45),a=n(2).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:s.f(t)})}},function(t,e,n){e.f=n(1)},function(t,e,n){var r=n(67);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var r=n(6),o=n(11),i=n(49)(!1),s=n(31)("IE_PROTO");t.exports=function(t,e){var n,a=o(t),u=0,c=[];for(n in a)n!=s&&r(a,n)&&c.push(n);for(;e.length>u;)r(a,n=e[u++])&&(~i(c,n)||c.push(n));return c}},function(t,e,n){var r=n(21);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(11),o=n(70),i=n(71);t.exports=function(t){return function(e,n,s){var a,u=r(e),c=o(u.length),l=i(s,c);if(t&&n!=n){for(;c>l;)if((a=u[l++])!=a)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){var r=n(5),o=n(77).set;t.exports=function(t,e,n){var i,s=e.constructor;return s!==n&&"function"==typeof s&&(i=s.prototype)!==n.prototype&&r(i)&&o&&o(t,i),t}},function(t,e,n){"use strict";var r=n(52),o=n(81),i=n(36),s=n(11);t.exports=n(53)(Array,"Array",function(t,e){this._t=s(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,e,n){var r=n(1)("unscopables"),o=Array.prototype;void 0==o[r]&&n(7)(o,r,{}),t.exports=function(t){o[r][t]=!0}},function(t,e,n){"use strict";var r=n(19),o=n(10),i=n(8),s=n(7),a=n(36),u=n(82),c=n(29),l=n(83),f=n(1)("iterator"),p=!([].keys&&"next"in[].keys()),h=function(){return this};t.exports=function(t,e,n,d,v,y,m){u(n,e,d);var g,b,_,w=function(t){if(!p&&t in O)return O[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},k=e+" Iterator",x="values"==v,j=!1,O=t.prototype,T=O[f]||O["@@iterator"]||v&&O[v],U=T||w(v),S=v?x?w("entries"):U:void 0,A="Array"==e&&O.entries||T;if(A&&(_=l(A.call(new t)))!==Object.prototype&&_.next&&(c(_,k,!0),r||"function"==typeof _[f]||s(_,f,h)),x&&T&&"values"!==T.name&&(j=!0,U=function(){return T.call(this)}),r&&!m||!p&&!j&&O[f]||s(O,f,U),a[e]=U,a[k]=h,v)if(g={values:x?U:w("values"),keys:y?U:w("keys"),entries:S},m)for(b in g)b in O||i(O,b,g[b]);else o(o.P+o.F*(p||j),e,g);return g}},function(t,e,n){var r=n(12);t.exports=function(t){return Object(r(t))}},function(t,e,n){n(24)("replace",2,function(t,e,n){return[function(r,o){"use strict";var i=t(this),s=void 0==r?void 0:r[e];return void 0!==s?s.call(r,i,o):n.call(String(i),r,o)},n]})},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var u,c=[],l=!1,f=-1;function p(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&h())}function h(){if(!l){var t=a(p);l=!0;for(var e=c.length;e;){for(u=c,c=[];++f<e;)u&&u[f].run();f=-1,e=c.length}u=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function v(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new d(t,e)),1!==c.length||l||a(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,n){var r=n(38),o=n(111),i=n(40),s=n(41),a=1/0,u=r?r.prototype:void 0,c=u?u.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(i(e))return o(e,t)+"";if(s(e))return c?c.call(e):"";var n=e+"";return"0"==n&&1/e==-a?"-0":n}},function(t,e,n){var r=n(38),o=n(112),i=n(113),s="[object Null]",a="[object Undefined]",u=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?a:s:u&&u in Object(t)?o(t):i(t)}},function(t,e,n){var r=n(118),o=n(119),i=n(120);t.exports=function(t,e,n){return e==e?i(t,e,n):r(t,o,n)}},function(t,e,n){var r=n(57);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){var r=n(138),o=n(143);t.exports=function(t,e){var n=o(t,e);return r(n)?n:void 0}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n(64),n(65),n(66),n(76),n(80),n(51),n(84),n(86),n(88),n(89),n(55),n(92),n(95),n(96),n(97);var r=c(n(16));n(100);var o=n(101),i=c(n(102)),s=c(n(103)),a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,n):{};r.get||r.set?Object.defineProperty(e,n,r):e[n]=t[n]}return e.default=t,e}(n(104)),u=c(n(127));function c(t){return t&&t.__esModule?t:{default:t}}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function f(t){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var p=function(t){return null===t||void 0===t},h=function(t){return t&&"object"===f(t)},d=function(){function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),!(this instanceof t))return new t(e);if(this.base="",this.projectsUrl="",this.projectUrl="",this.projectId="",this.formUrl="",this.formsUrl="",this.formId="",this.submissionsUrl="",this.submissionUrl="",this.submissionId="",this.actionsUrl="",this.actionId="",this.actionUrl="",this.vsUrl="",this.vId="",this.vUrl="",this.query="",this.path=e,this.options=r,r.hasOwnProperty("base")?this.base=r.base:t.baseUrl?this.base=t.baseUrl:this.base=window.location.href.match(/http[s]?:\/\/api./)[0],!e)return this.projectUrl="".concat(this.base,"/project"),this.projectsUrl="".concat(this.base,"/project"),this.projectId=!1,void(this.query="");r.hasOwnProperty("project")&&(this.projectUrl=r.project);var o=this.projectUrl||t.projectUrl,i=/(^|\/)(project)($|\/[^/]+)/,s=-1!==e.search(i);o&&this.base===o&&!s&&(this.noProject=!0,this.projectUrl=this.base),0!==e.indexOf("http")&&0!==e.indexOf("//")&&(e=this.base+e);var a=this.getUrlParts(e),u=[],c=a[1]+a[2],l=(e=a.length>3?a[3]:"").split("?");l.length>1&&(e=l[0],this.query="?".concat(l[1]));var f=function(t,r){n["".concat(t,"sUrl")]="".concat(r,"/").concat(t);var o=new RegExp("/".concat(t,"/([^/]+)"));return-1!==e.search(o)&&(u=e.match(o),n["".concat(t,"Url")]=u?r+u[0]:"",n["".concat(t,"Id")]=u.length>1?u[1]:"",r+=u[0]),r},p=function t(e,n,r){for(var o in e)if(e.hasOwnProperty(o)){var i=e[o];if(Array.isArray(i))t(i,n,!0);else{var s=f(i,n);n=r?n:s}}};if(this.projectUrl&&this.projectUrl!==this.base||(this.projectUrl=c),!this.noProject){if(s)p(["project"],c),e=e.replace(i,"");else if(c===this.base){if(a.length>3&&e.split("/").length>1){var h=e.split("/");h.shift(),this.projectId=h.shift(),e="/".concat(h.join("/")),this.projectUrl="".concat(c,"/").concat(this.projectId)}}else a.length>2&&(a[2].split(".").length>2||c.includes("localhost"))&&(this.projectUrl=c,this.projectId=a[2].split(".")[0]);this.projectsUrl=this.projectsUrl||"".concat(this.base,"/project")}if(-1!==e.search(/(^|\/)(form)($|\/)/))p(["form",["submission","action","v"]],this.projectUrl);else{var d=new RegExp("/(submission|action|v)($|/.*)"),v=e.match(d);this.pathType=v&&v.length>1?v[1]:"",e=(e=e.replace(d,"")).replace(/\/$/,""),this.formsUrl="".concat(this.projectUrl,"/form"),this.formUrl=e?this.projectUrl+e:"",this.formId=e.replace(/^\/+|\/+$/g,"");var y=["submission","action","v"];for(var m in y)if(y.hasOwnProperty(m)){var g=y[m];this["".concat(g,"sUrl")]="".concat(this.projectUrl+e,"/").concat(g),this.pathType===g&&v.length>2&&v[2]&&(this["".concat(g,"Id")]=v[2].replace(/^\/+|\/+$/g,""),this["".concat(g,"Url")]=this.projectUrl+e+v[0])}}t.projectUrlSet||(t.projectUrl=this.projectUrl)}return function(t,e,n){e&&l(t.prototype,e),n&&l(t,n)}(t,[{key:"delete",value:function(e,n){var o="".concat(e,"Id"),i="".concat(e,"Url");return this[o]||r.default.reject("Nothing to delete"),t.cache={},this.makeRequest(e,this[i],"delete",null,n)}},{key:"index",value:function(e,n,r){var o="".concat(e,"Url");return(n=n||"")&&h(n)&&(n="?".concat(t.serialize(n.params))),this.makeRequest(e,this[o]+n,"get",null,r)}},{key:"save",value:function(e,n,r){var o="".concat(e,"Id"),i="".concat(e,"Url"),s=this[o]||n._id?"put":"post",a=this[o]?this[i]:this["".concat(e,"sUrl")];return this[o]||!n._id||"put"!==s||a.includes(n._id)||(a+="/".concat(n._id)),t.cache={},this.makeRequest(e,a+this.query,s,n,r)}},{key:"load",value:function(e,n,o){var i="".concat(e,"Id"),s="".concat(e,"Url");return n&&h(n)&&(n=t.serialize(n.params)),n=n?this.query?"".concat(this.query,"&").concat(n):"?".concat(n):this.query,this[i]?this.makeRequest(e,this[s]+n,"get",null,o):r.default.reject("Missing ".concat(i))}},{key:"makeRequest",value:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.makeRequest.apply(t,[this].concat(n))}},{key:"loadProject",value:function(t,e){return this.load("project",t,e)}},{key:"saveProject",value:function(t,e){return this.save("project",t,e)}},{key:"deleteProject",value:function(t){return this.delete("project",t)}},{key:"loadForm",value:function(e,n){var r=this;return this.load("form",e,n).then(function(o){return!o.revisions||isNaN(parseInt(r.vId))?o:"current"===o.revisions&&r.submissionId?o:(e&&h(e)&&(e=t.serialize(e.params)),e=e?r.query?"".concat(r.query,"&").concat(e):"?".concat(e):r.query,r.makeRequest("form",r.vUrl+e,"get",null,n).then(function(t){return o.components=t.components,Object.assign({},o)}).catch(function(){return Object.assign({},o)}))})}},{key:"saveForm",value:function(t,e){return this.save("form",t,e)}},{key:"deleteForm",value:function(t){return this.delete("form",t)}},{key:"loadForms",value:function(t,e){return this.index("forms",t,e)}},{key:"loadSubmission",value:function(t,e){var n=this;return this.load("submission",t,e).then(function(t){return n.vId=t._fvid,n.vUrl="".concat(n.formUrl,"/v/").concat(n.vId),t})}},{key:"saveSubmission",value:function(t,e){return isNaN(parseInt(this.vId))||(t._fvid=this.vId),this.save("submission",t,e)}},{key:"deleteSubmission",value:function(t){return this.delete("submission",t)}},{key:"loadSubmissions",value:function(t,e){return this.index("submissions",t,e)}},{key:"loadAction",value:function(t,e){return this.load("action",t,e)}},{key:"saveAction",value:function(t,e){return this.save("action",t,e)}},{key:"deleteAction",value:function(t){return this.delete("action",t)}},{key:"loadActions",value:function(t,e){return this.index("actions",t,e)}},{key:"availableActions",value:function(){return this.makeRequest("availableActions","".concat(this.formUrl,"/actions"))}},{key:"actionInfo",value:function(t){return this.makeRequest("actionInfo","".concat(this.formUrl,"/actions/").concat(t))}},{key:"isObjectId",value:function(t){return new RegExp("^[0-9a-fA-F]{24}$").test(t)}},{key:"getProjectId",value:function(){return this.projectId?this.isObjectId(this.projectId)?r.default.resolve(this.projectId):this.loadProject().then(function(t){return t._id}):r.default.resolve("")}},{key:"getFormId",value:function(){return this.formId?this.isObjectId(this.formId)?r.default.resolve(this.formId):this.loadForm().then(function(t){return t._id}):r.default.resolve("")}},{key:"currentUser",value:function(e){return t.currentUser(this,e)}},{key:"accessInfo",value:function(){return t.accessInfo(this)}},{key:"getToken",value:function(e){return t.getToken(Object.assign({formio:this},this.options,e))}},{key:"setToken",value:function(e,n){return t.setToken(e,Object.assign({formio:this},this.options,n))}},{key:"getTempToken",value:function(e,n,o){return t.getToken(o)?this.makeRequest("tempToken","".concat(this.projectUrl,"/token"),"GET",null,{ignoreCache:!0,header:new Headers({"x-expire":e,"x-allow":n})}):r.default.reject("You must be authenticated to generate a temporary auth token.")}},{key:"getDownloadUrl",value:function(t){var e=this;if(!this.submissionId)return r.default.resolve("");if(!t)return this.loadForm().then(function(t){return t?e.getDownloadUrl(t):""});var n="/project/".concat(t.project);n+="/form/".concat(t._id),n+="/submission/".concat(this.submissionId),n+="/download";var o=this.base+n;return new r.default(function(t,r){e.getTempToken(3600,"GET:".concat(n)).then(function(e){o+="?token=".concat(e.key),t(o)},function(){t(o)}).catch(r)})}},{key:"uploadFile",value:function(e,n,r,o,i,s){var a=this,u={provider:e,method:"upload",file:n,fileName:r,dir:o},c=t.pluginWait("preRequest",u).then(function(){return t.pluginGet("fileRequest",u).then(function(u){if(e&&p(u)){if(t.providers.storage.hasOwnProperty(e))return new t.providers.storage[e](a).uploadFile(n,r,o,i,s);throw"Storage provider not found"}return u||{url:""}})});return t.pluginAlter("wrapFileRequestPromise",c,u)}},{key:"downloadFile",value:function(e){var n=this,r={method:"download",file:e},o=t.pluginWait("preRequest",r).then(function(){return t.pluginGet("fileRequest",r).then(function(r){if(e.storage&&p(r)){if(t.providers.storage.hasOwnProperty(e.storage))return new t.providers.storage[e.storage](n).downloadFile(e);throw"Storage provider not found"}return r||{url:""}})});return t.pluginAlter("wrapFileRequestPromise",o,r)}},{key:"canSubmit",value:function(){return r.default.all([this.loadForm(),this.currentUser(),this.accessInfo()]).then(function(e){var n=e.shift(),r=e.shift(),o=e.shift(),i={},s={};for(var a in o.roles)if(o.roles.hasOwnProperty(a)){var u=o.roles[a];u.default&&(i=u),u.admin&&(s=u)}var c=!1,l=!1;if(r&&r.roles.includes(s._id))return!0;for(var f in n.submissionAccess)if(n.submissionAccess.hasOwnProperty(f)){var p=n.submissionAccess[f];if("create_all"===p.type||"create_own"===p.type){for(var h in p.roles)if(p.roles.hasOwnProperty(h)&&(i._id===p.roles[h]&&(l=!0),r&&r.roles.includes(p.roles[h]))){c=!0;break}if(c)break}}return!c&&l&&(c=!0,t.setUser(null)),c})}},{key:"getUrlParts",value:function(e){return t.getUrlParts(e,this)}}],[{key:"loadProjects",value:function(e,n){return h(e=e||"")&&(e="?".concat(t.serialize(e.params))),t.makeStaticRequest("".concat(t.baseUrl,"/project").concat(e),"GET",null,n)}},{key:"getUrlParts",value:function(e,n){var r=n&&n.base?n.base:t.baseUrl,o="^(http[s]?:\\/\\/)";return r&&0===e.indexOf(r)?o+="(".concat(r.replace(/^http[s]?:\/\//,""),")"):o+="([^/]+)",o+="($|\\/.*)",e.match(new RegExp(o))}},{key:"serialize",value:function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push("".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(t[n])));return e.join("&")}},{key:"getRequestArgs",value:function(t,e,n,r,o,i){r=(r||"GET").toUpperCase(),i&&h(i)||(i={});var s={url:n,method:r,data:o||null,opts:i};return e&&(s.type=e),t&&(s.formio=t),s}},{key:"makeStaticRequest",value:function(e,n,r,o){var i=t.getRequestArgs(null,"",e,n,r,o),s=t.pluginWait("preRequest",i).then(function(){return t.pluginGet("staticRequest",i).then(function(r){return p(r)?t.request(e,n,i.data,i.opts.header,i.opts):r})});return t.pluginAlter("wrapStaticRequestPromise",s,i)}},{key:"makeRequest",value:function(e,n,r,o,i,s){if(!e)return t.makeStaticRequest(r,o,i,s);var a=t.getRequestArgs(e,n,r,o,i,s);a.opts=a.opts||{},a.opts.formio=e;var u=t.pluginWait("preRequest",a).then(function(){return t.pluginGet("request",a).then(function(e){return p(e)?t.request(r,o,a.data,a.opts.header,a.opts):e})});return t.pluginAlter("wrapRequestPromise",u,a)}},{key:"request",value:function(e,n,o,i,a){if(!e)return r.default.reject("No url provided");n=(n||"GET").toUpperCase(),function(t){return f(t)===f(!0)}(a)&&(a={ignoreCache:a}),a&&h(a)||(a={});var u=btoa(e);if(!a.ignoreCache&&"GET"===n&&t.cache.hasOwnProperty(u))return t.cache[u];var c=i||new Headers(a.headers||{Accept:"application/json","Content-type":"application/json; charset=UTF-8"}),l=t.getToken(a);l&&!a.noToken&&c.append("x-jwt-token",l);var p={method:n,headers:c,mode:"cors"};o&&(p.body=JSON.stringify(o)),(p=t.pluginAlter("requestOptions",p,e)).namespace&&(a.namespace=p.namespace);var d=p.headers.get("x-jwt-token"),v=fetch(e,p).then(function(o){if(!(o=t.pluginAlter("requestResponse",o,t)).ok)return 440===o.status?(t.setToken(null,a),t.events.emit("formio.sessionExpired",o.body)):401===o.status&&t.events.emit("formio.unauthorized",o.body),(o.headers.get("content-type").includes("application/json")?o.json():o.text()).then(function(t){return r.default.reject(t)});var i=o.headers.get("x-jwt-token"),s=!1;return"GET"!==n||d||!i||a.external||e.includes("token=")||e.includes("x-jwt-token=")||(console.warn("Token was introduced in request."),s=!0),o.status>=200&&o.status<300&&i&&""!==i&&!s&&t.setToken(i,a),204===o.status?{}:(o.headers.get("content-type").includes("application/json")?o.json():o.text()).then(function(t){var e=o.headers.get("content-range");if(e&&h(t)){if("*"!==(e=e.split("/"))[0]){var n=e[0].split("-");t.skip=Number(n[0]),t.limit=n[1]-n[0]+1}t.serverCount="*"===e[1]?e[1]:Number(e[1])}if(!a.getHeaders)return t;var r={};return o.headers.forEach(function(t,e){r[e]=t}),{result:t,headers:r}})}).then(function(t){if(a.getHeaders)return t;var e={};return Array.isArray(t)?((e=t.map(s.default)).skip=t.skip,e.limit=t.limit,e.serverCount=t.serverCount):e=(0,s.default)(t),e}).catch(function(e){return"Bad Token"===e&&(t.setToken(null,a),t.events.emit("formio.badToken",e)),e.message&&(e.message="Could not connect to API server (".concat(e.message,")"),e.networkError=!0),"GET"===n&&delete t.cache[u],r.default.reject(e)});return"GET"===n&&(t.cache[u]=v),v}},{key:"setToken",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,r="".concat((n="string"==typeof n?{namespace:n}:n||{}).namespace||"formio","Token");if(t.tokens||(t.tokens={}),t.tokens[r]!==e){if(t.tokens[r]=e,!e){t.setUser(null,n);try{return localStorage.removeItem(r)}catch(t){return i.default.erase(r,{path:"/"})}}try{localStorage.setItem(r,e)}catch(t){i.default.set(r,e,{path:"/"})}return t.currentUser(n.formio,n)}}},{key:"getToken",value:function(e){var n="".concat((e="string"==typeof e?{namespace:e}:e||{}).namespace||"formio","Token");if(t.tokens||(t.tokens={}),t.tokens[n])return t.tokens[n];try{return t.tokens[n]=localStorage.getItem(n)||"",t.tokens[n]}catch(e){return t.tokens[n]=i.default.get(n),t.tokens[n]}}},{key:"setUser",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r="".concat(n.namespace||"formio","User");if(!e){t.setToken(null,n);try{return localStorage.removeItem(r)}catch(t){return i.default.erase(r,{path:"/"})}}try{localStorage.setItem(r,JSON.stringify(e))}catch(t){i.default.set(r,JSON.stringify(e),{path:"/"})}}},{key:"getUser",value:function(t){var e="".concat((t=t||{}).namespace||"formio","User");try{return JSON.parse(localStorage.getItem(e)||null)}catch(t){return JSON.parse(i.default.get(e))}}},{key:"setBaseUrl",value:function(e){t.baseUrl=e,t.projectUrlSet||(t.projectUrl=e)}},{key:"getBaseUrl",value:function(){return t.baseUrl}},{key:"setApiUrl",value:function(e){return t.setBaseUrl(e)}},{key:"getApiUrl",value:function(){return t.getBaseUrl()}},{key:"setAppUrl",value:function(e){console.warn("Formio.setAppUrl() is deprecated. Use Formio.setProjectUrl instead."),t.projectUrl=e,t.projectUrlSet=!0}},{key:"setProjectUrl",value:function(e){t.projectUrl=e,t.projectUrlSet=!0}},{key:"getAppUrl",value:function(){return console.warn("Formio.getAppUrl() is deprecated. Use Formio.getProjectUrl instead."),t.projectUrl}},{key:"getProjectUrl",value:function(){return t.projectUrl}},{key:"clearCache",value:function(){t.cache={}}},{key:"noop",value:function(){}},{key:"identity",value:function(t){return t}},{key:"deregisterPlugin",value:function(e){var n=t.plugins.length;return t.plugins=t.plugins.filter(function(n){return n!==e&&n.__name!==e||((n.deregister||t.noop).call(e,t),!1)}),n!==t.plugins.length}},{key:"registerPlugin",value:function(e,n){t.plugins.push(e),t.plugins.sort(function(t,e){return(e.priority||0)-(t.priority||0)}),e.__name=n,(e.init||t.noop).call(e,t)}},{key:"getPlugin",value:function(e){var n=!0,r=!1,o=void 0;try{for(var i,s=t.plugins[Symbol.iterator]();!(n=(i=s.next()).done);n=!0){var a=i.value;if(a.__name===e)return a}}catch(t){r=!0,o=t}finally{try{n||null==s.return||s.return()}finally{if(r)throw o}}return null}},{key:"pluginWait",value:function(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return r.default.all(t.plugins.map(function(n){var r;return(r=n[e]||t.noop).call.apply(r,[n].concat(o))}))}},{key:"pluginGet",value:function(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return function n(i){var s,a=t.plugins[i];return a?r.default.resolve((s=a[e]||t.noop).call.apply(s,[a].concat(o))).then(function(t){return p(t)?n(i+1):t}):r.default.resolve(null)}(0)}},{key:"pluginAlter",value:function(e,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];return t.plugins.reduce(function(n,r){return(r[e]||t.identity).apply(void 0,[n].concat(o))},n)}},{key:"accessInfo",value:function(e){var n=e?e.projectUrl:t.projectUrl;return t.makeRequest(e,"accessInfo","".concat(n,"/access"))}},{key:"currentUser",value:function(e,n){var o=e?e.projectUrl:t.projectUrl||t.baseUrl;o+="/current";var i=t.getUser(n);if(i)return t.pluginAlter("wrapStaticRequestPromise",r.default.resolve(i),{url:o,method:"GET",options:n});var s=t.getToken(n);return n&&n.external||s?t.makeRequest(e,"currentUser",o,"GET",null,n).then(function(e){return t.setUser(e,n),e}):t.pluginAlter("wrapStaticRequestPromise",r.default.resolve(null),{url:o,method:"GET",options:n})}},{key:"logout",value:function(e,n){(n=n||{}).formio=e,t.setToken(null,n),t.setUser(null,n),t.clearCache();var r=e?e.projectUrl:t.baseUrl;return t.makeRequest(e,"logout","".concat(r,"/logout"))}},{key:"oAuthCurrentUser",value:function(e,n){return t.currentUser(e,{external:!0,headers:{Authorization:"Bearer ".concat(n)}})}},{key:"oktaInit",value:function(e){if(e=e||{},void 0!==("undefined"==typeof OktaAuth?"undefined":f(OktaAuth))&&(e.OktaAuth=OktaAuth),void 0===f(e.OktaAuth)){var n="Cannot find OktaAuth. Please include the Okta JavaScript SDK within your application. See https://developer.okta.com/code/javascript/okta_auth_sdk for an example.";return console.warn(n),r.default.reject(n)}return new r.default(function(n,r){var o=e.OktaAuth;delete e.OktaAuth;var i=new o(e),s=i.tokenManager.get("accessToken");s?n(t.oAuthCurrentUser(e.formio,s.accessToken)):location.hash?i.token.parseFromUrl().then(function(r){i.tokenManager.add("accessToken",r),n(t.oAuthCurrentUser(e.formio,r.accessToken))}).catch(function(t){console.warn(t),r(t)}):(i.token.getWithRedirect({responseType:"token",scopes:e.scopes}),n(!1))})}},{key:"ssoInit",value:function(e,n){switch(e){case"okta":return t.oktaInit(n);default:return console.warn("Unknown SSO type"),r.default.reject("Unknown SSO type")}}},{key:"requireLibrary",value:function(e,n,o,i){if(!t.libraries.hasOwnProperty(e)){t.libraries[e]={},t.libraries[e].ready=new r.default(function(n,r){t.libraries[e].resolve=n,t.libraries[e].reject=r});var s="".concat(e,"Callback");i||window[s]||(window[s]=function(){return t.libraries[e].resolve()});var a=(0,u.default)(window,n);if(a)t.libraries[e].resolve(a);else if((o=Array.isArray(o)?o:[o]).forEach(function(t){var e={},n="";switch("string"==typeof t&&(t={type:"script",src:t}),t.type){case"script":n="script",e={src:t.src,type:"text/javascript",defer:!0,async:!0};break;case"styles":n="link",e={href:t.src,rel:"stylesheet"}}var r=document.createElement(n);for(var o in e)r.setAttribute(o,e[o]);document.getElementsByTagName("head")[0].appendChild(r)}),i)var c=setInterval(function(){var r=(0,u.default)(window,n);r&&(clearInterval(c),t.libraries[e].resolve(r))},200)}return t.libraries[e].ready}},{key:"libraryReady",value:function(e){return t.libraries.hasOwnProperty(e)&&t.libraries[e].ready?t.libraries[e].ready:r.default.reject("".concat(e," library was not required."))}},{key:"token",get:function(){return t.tokens||(t.tokens={}),t.tokens.formioToken?t.tokens.formioToken:""},set:function(e){return t.tokens||(t.tokens={}),t.tokens.formioToken=e||""}}]),t}();e.default=d,d.libraries={},d.Promise=r.default,d.Headers=Headers,d.baseUrl="https://api.form.io",d.projectUrl=d.baseUrl,d.projectUrlSet=!1,d.plugins=[],d.cache={},d.providers=a,d.events=new o.EventEmitter2({wildcard:!1,maxListeners:0}),"object"!==(void 0===t?"undefined":f(t))||t.Formio||(t.Formio=d)}).call(this,n(13))},function(t,e,n){var r=n(2).f,o=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in o||n(3)&&r(o,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},function(t,e,n){n(44)("asyncIterator")},function(t,e,n){"use strict";var r=n(0),o=n(6),i=n(3),s=n(10),a=n(8),u=n(68).KEY,c=n(4),l=n(28),f=n(29),p=n(14),h=n(1),d=n(45),v=n(44),y=n(69),m=n(72),g=n(9),b=n(5),_=n(11),w=n(17),k=n(20),x=n(34),j=n(75),O=n(35),T=n(2),U=n(15),S=O.f,A=T.f,P=j.f,E=r.Symbol,I=r.JSON,R=I&&I.stringify,L=h("_hidden"),F=h("toPrimitive"),N={}.propertyIsEnumerable,q=l("symbol-registry"),M=l("symbols"),C=l("op-symbols"),B=Object.prototype,D="function"==typeof E,G=r.QObject,z=!G||!G.prototype||!G.prototype.findChild,H=i&&c(function(){return 7!=x(A({},"a",{get:function(){return A(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=S(B,e);r&&delete B[e],A(t,e,n),r&&t!==B&&A(B,e,r)}:A,$=function(t){var e=M[t]=x(E.prototype);return e._k=t,e},J=D&&"symbol"==typeof E.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof E},W=function(t,e,n){return t===B&&W(C,e,n),g(t),e=w(e,!0),g(n),o(M,e)?(n.enumerable?(o(t,L)&&t[L][e]&&(t[L][e]=!1),n=x(n,{enumerable:k(0,!1)})):(o(t,L)||A(t,L,k(1,{})),t[L][e]=!0),H(t,e,n)):A(t,e,n)},V=function(t,e){g(t);for(var n,r=y(e=_(e)),o=0,i=r.length;i>o;)W(t,n=r[o++],e[n]);return t},X=function(t){var e=N.call(this,t=w(t,!0));return!(this===B&&o(M,t)&&!o(C,t))&&(!(e||!o(this,t)||!o(M,t)||o(this,L)&&this[L][t])||e)},K=function(t,e){if(t=_(t),e=w(e,!0),t!==B||!o(M,e)||o(C,e)){var n=S(t,e);return!n||!o(M,e)||o(t,L)&&t[L][e]||(n.enumerable=!0),n}},Y=function(t){for(var e,n=P(_(t)),r=[],i=0;n.length>i;)o(M,e=n[i++])||e==L||e==u||r.push(e);return r},Q=function(t){for(var e,n=t===B,r=P(n?C:_(t)),i=[],s=0;r.length>s;)!o(M,e=r[s++])||n&&!o(B,e)||i.push(M[e]);return i};D||(a((E=function(){if(this instanceof E)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===B&&e.call(C,n),o(this,L)&&o(this[L],t)&&(this[L][t]=!1),H(this,t,k(1,n))};return i&&z&&H(B,t,{configurable:!0,set:e}),$(t)}).prototype,"toString",function(){return this._k}),O.f=K,T.f=W,n(23).f=j.f=Y,n(22).f=X,n(33).f=Q,i&&!n(19)&&a(B,"propertyIsEnumerable",X,!0),d.f=function(t){return $(h(t))}),s(s.G+s.W+s.F*!D,{Symbol:E});for(var Z="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),tt=0;Z.length>tt;)h(Z[tt++]);for(var et=U(h.store),nt=0;et.length>nt;)v(et[nt++]);s(s.S+s.F*!D,"Symbol",{for:function(t){return o(q,t+="")?q[t]:q[t]=E(t)},keyFor:function(t){if(!J(t))throw TypeError(t+" is not a symbol!");for(var e in q)if(q[e]===t)return e},useSetter:function(){z=!0},useSimple:function(){z=!1}}),s(s.S+s.F*!D,"Object",{create:function(t,e){return void 0===e?x(t):V(x(t),e)},defineProperty:W,defineProperties:V,getOwnPropertyDescriptor:K,getOwnPropertyNames:Y,getOwnPropertySymbols:Q}),I&&s(s.S+s.F*(!D||c(function(){var t=E();return"[null]"!=R([t])||"{}"!=R({a:t})||"{}"!=R(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=e=r[1],(b(e)||void 0!==t)&&!J(t))return m(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!J(e))return e}),r[1]=e,R.apply(I,r)}}),E.prototype[F]||n(7)(E.prototype,F,E.prototype.valueOf),f(E,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(14)("meta"),o=n(5),i=n(6),s=n(2).f,a=0,u=Object.isExtensible||function(){return!0},c=!n(4)(function(){return u(Object.preventExtensions({}))}),l=function(t){s(t,r,{value:{i:"O"+ ++a,w:{}}})},f=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!u(t))return"F";if(!e)return"E";l(t)}return t[r].i},getWeak:function(t,e){if(!i(t,r)){if(!u(t))return!0;if(!e)return!1;l(t)}return t[r].w},onFreeze:function(t){return c&&f.NEED&&u(t)&&!i(t,r)&&l(t),t}}},function(t,e,n){var r=n(15),o=n(33),i=n(22);t.exports=function(t){var e=r(t),n=o.f;if(n)for(var s,a=n(t),u=i.f,c=0;a.length>c;)u.call(t,s=a[c++])&&e.push(s);return e}},function(t,e,n){var r=n(30),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(30),o=Math.max,i=Math.min;t.exports=function(t,e){return(t=r(t))<0?o(t+e,0):i(t,e)}},function(t,e,n){var r=n(21);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(2),o=n(9),i=n(15);t.exports=n(3)?Object.defineProperties:function(t,e){o(t);for(var n,s=i(e),a=s.length,u=0;a>u;)r.f(t,n=s[u++],e[n]);return t}},function(t,e,n){var r=n(0).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(11),o=n(23).f,i={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"[object Window]"==i.call(t)?function(t){try{return o(t)}catch(t){return s.slice()}}(t):o(r(t))}},function(t,e,n){"use strict";var r=n(0),o=n(6),i=n(21),s=n(50),a=n(17),u=n(4),c=n(23).f,l=n(35).f,f=n(2).f,p=n(78).trim,h=r.Number,d=h,v=h.prototype,y="Number"==i(n(34)(v)),m="trim"in String.prototype,g=function(t){var e=a(t,!1);if("string"==typeof e&&e.length>2){var n,r,o,i=(e=m?e.trim():p(e,3)).charCodeAt(0);if(43===i||45===i){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===i){switch(e.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+e}for(var s,u=e.slice(2),c=0,l=u.length;c<l;c++)if((s=u.charCodeAt(c))<48||s>o)return NaN;return parseInt(u,r)}}return+e};if(!h(" 0o1")||!h("0b1")||h("+0x1")){h=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof h&&(y?u(function(){v.valueOf.call(n)}):"Number"!=i(n))?s(new d(g(e)),n,h):g(e)};for(var b,_=n(3)?c(d):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;_.length>w;w++)o(d,b=_[w])&&!o(h,b)&&f(h,b,l(d,b));h.prototype=v,v.constructor=h,n(8)(r,"Number",h)}},function(t,e,n){var r=n(5),o=n(9),i=function(t,e){if(o(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(46)(Function.call,n(35).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return i(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:i}},function(t,e,n){var r=n(10),o=n(12),i=n(4),s=n(79),a="["+s+"]",u=RegExp("^"+a+a+"*"),c=RegExp(a+a+"*$"),l=function(t,e,n){var o={},a=i(function(){return!!s[t]()||"​…"!="​…"[t]()}),u=o[t]=a?e(f):s[t];n&&(o[n]=u),r(r.P+r.F*a,"String",o)},f=l.trim=function(t,e){return t=String(o(t)),1&e&&(t=t.replace(u,"")),2&e&&(t=t.replace(c,"")),t};t.exports=l},function(t,e){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(t,e,n){for(var r=n(51),o=n(15),i=n(8),s=n(0),a=n(7),u=n(36),c=n(1),l=c("iterator"),f=c("toStringTag"),p=u.Array,h={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},d=o(h),v=0;v<d.length;v++){var y,m=d[v],g=h[m],b=s[m],_=b&&b.prototype;if(_&&(_[l]||a(_,l,p),_[f]||a(_,f,m),u[m]=p,g))for(y in r)_[y]||i(_,y,r[y],!0)}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){"use strict";var r=n(34),o=n(20),i=n(29),s={};n(7)(s,n(1)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(s,{next:o(1,n)}),i(t,e+" Iterator")}},function(t,e,n){var r=n(6),o=n(54),i=n(31)("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},function(t,e,n){"use strict";var r=n(85)(!0);n(53)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){var r=n(30),o=n(12);t.exports=function(t){return function(e,n){var i,s,a=String(o(e)),u=r(n),c=a.length;return u<0||u>=c?t?"":void 0:(i=a.charCodeAt(u))<55296||i>56319||u+1===c||(s=a.charCodeAt(u+1))<56320||s>57343?t?a.charAt(u):i:t?a.slice(u,u+2):s-56320+(i-55296<<10)+65536}}},function(t,e,n){var r=n(10);r(r.S+r.F,"Object",{assign:n(87)})},function(t,e,n){"use strict";var r=n(15),o=n(33),i=n(22),s=n(54),a=n(48),u=Object.assign;t.exports=!u||n(4)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=u({},t)[n]||Object.keys(u({},e)).join("")!=r})?function(t,e){for(var n=s(t),u=arguments.length,c=1,l=o.f,f=i.f;u>c;)for(var p,h=a(arguments[c++]),d=l?r(h).concat(l(h)):r(h),v=d.length,y=0;v>y;)f.call(h,p=d[y++])&&(n[p]=h[p]);return n}:u},function(t,e,n){"use strict";var r=n(10),o=n(49)(!0);r(r.P,"Array",{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n(52)("includes")},function(t,e,n){"use strict";var r=n(10),o=n(90);r(r.P+r.F*n(91)("includes"),"String",{includes:function(t){return!!~o(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(37),o=n(12);t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(t))}},function(t,e,n){var r=n(1)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(t){}}return!0}},function(t,e,n){var r=n(0),o=n(50),i=n(2).f,s=n(23).f,a=n(37),u=n(93),c=r.RegExp,l=c,f=c.prototype,p=/a/g,h=/a/g,d=new c(p)!==p;if(n(3)&&(!d||n(4)(function(){return h[n(1)("match")]=!1,c(p)!=p||c(h)==h||"/a/i"!=c(p,"i")}))){c=function(t,e){var n=this instanceof c,r=a(t),i=void 0===e;return!n&&r&&t.constructor===c&&i?t:o(d?new l(r&&!i?t.source:t,e):l((r=t instanceof c)?t.source:t,r&&i?u.call(t):e),n?this:f,c)};for(var v=function(t){t in c||i(c,t,{configurable:!0,get:function(){return l[t]},set:function(e){l[t]=e}})},y=s(l),m=0;y.length>m;)v(y[m++]);f.constructor=c,c.prototype=f,n(8)(r,"RegExp",c)}n(94)("RegExp")},function(t,e,n){"use strict";var r=n(9);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){"use strict";var r=n(0),o=n(2),i=n(3),s=n(1)("species");t.exports=function(t){var e=r[t];i&&e&&!e[s]&&o.f(e,s,{configurable:!0,get:function(){return this}})}},function(t,e,n){n(24)("split",2,function(t,e,r){"use strict";var o=n(37),i=r,s=[].push;if("c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length){var a=void 0===/()??/.exec("")[1];r=function(t,e){var n=String(this);if(void 0===t&&0===e)return[];if(!o(t))return i.call(n,t,e);var r,u,c,l,f,p=[],h=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),d=0,v=void 0===e?4294967295:e>>>0,y=new RegExp(t.source,h+"g");for(a||(r=new RegExp("^"+y.source+"$(?!\\s)",h));(u=y.exec(n))&&!((c=u.index+u[0].length)>d&&(p.push(n.slice(d,u.index)),!a&&u.length>1&&u[0].replace(r,function(){for(f=1;f<arguments.length-2;f++)void 0===arguments[f]&&(u[f]=void 0)}),u.length>1&&u.index<n.length&&s.apply(p,u.slice(1)),l=u[0].length,d=c,p.length>=v));)y.lastIndex===u.index&&y.lastIndex++;return d===n.length?!l&&y.test("")||p.push(""):p.push(n.slice(d)),p.length>v?p.slice(0,v):p}}else"0".split(void 0,0).length&&(r=function(t,e){return void 0===t&&0===e?[]:i.call(this,t,e)});return[function(n,o){var i=t(this),s=void 0==n?void 0:n[e];return void 0!==s?s.call(n,i,o):r.call(String(i),n,o)},r]})},function(t,e,n){n(24)("search",1,function(t,e,n){return[function(n){"use strict";var r=t(this),o=void 0==n?void 0:n[e];return void 0!==o?o.call(n,r):new RegExp(n)[e](String(r))},n]})},function(t,e,n){n(24)("match",1,function(t,e,n){return[function(n){"use strict";var r=t(this),o=void 0==n?void 0:n[e];return void 0!==o?o.call(n,r):new RegExp(n)[e](String(r))},n]})},function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new i(o.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new i(o.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInter