forked from json-schema-form/angular-schema-form
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathangular-schema-form.min.js
30 lines (30 loc) · 91.5 KB
/
angular-schema-form.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*!
* angular-schema-form
* @version 1.0.0-alpha.5
* @date Mon, 01 May 2017 08:39:39 GMT
* @link https://github.com/json-schema-form/angular-schema-form
* @license MIT
* Copyright (c) 2014-2017 JSON Schema Form
*/
!function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=21)}([function(e,t){e.exports=angular},function(e,t,r){(function(t,r){/*!
* json-schema-form-core
* @version 1.0.0-alpha.4
* @date Sat, 15 Apr 2017 08:25:55 GMT
* @link https://github.com/json-schema-form/json-schema-form-core
* @license MIT
* Copyright (c) 2014-2017 JSON Schema Form
*/
e.exports=function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=13)}([function(e,t,r){"use strict";function n(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(e){var o=e.slice(),i=t||"-";return n&&(o=o.filter(function(e){return"number"!=typeof e})),(0!==r.length?r+i:"")+o.join(i)}return""}Object.defineProperty(t,"__esModule",{value:!0});var o=r(2);r.n(o);r.o(o,"parse")&&r.d(t,"parse",function(){return o.parse}),r.o(o,"stringify")&&r.d(t,"stringify",function(){return o.stringify}),r.o(o,"normalize")&&r.d(t,"normalize",function(){return o.normalize}),t.name=n},function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.a=function(e,t){if(!Array.isArray(e)){var r=function(){var r=[];return t?t.forEach(function(t){r.push({name:e[t],value:t})}):Object.keys(e).forEach(function(t){r.push({name:e[t],value:t})}),{v:r}}();if("object"===(void 0===r?"undefined":n(r)))return r.v}return e}},function(e,t,r){e.exports=r(11).ObjectPath},function(e,t,r){"use strict";function n(e,t,r,o){var i=e[g(r.type)];if(i)for(var a=void 0,s=function(t,r,o){return n(e,t,r,o)},u=0;u<i.length;u++)if(a=i[u](t,r,o,s))return a.schema["x-schema-form"]&&Object.assign(a,a.schema["x-schema-form"]),a}function o(e,t,n){n=n||{};var o=n.global&&n.global.formDefaults?Object.assign({},n.global.formDefaults):{};return n.global&&!0===n.global.supressPropertyTitles?o.title=t.title:o.title=t.title||e,t.description&&(o.description=t.description),!0!==n.required&&!0!==t.required||(o.required=!0),t.maxLength&&(o.maxlength=t.maxLength),t.minLength&&(o.minlength=t.minLength),(t.readOnly||t.readonly)&&(o.readonly=!0),t.minimum&&(o.minimum=t.minimum+(t.exclusiveMinimum?1:0)),t.maximum&&(o.maximum=t.maximum-(t.exclusiveMaximum?1:0)),t.validationMessage&&(o.validationMessage=t.validationMessage),t.enumNames&&(o.titleMap=r.i(v.a)(t.enumNames,t.enum)),o.schema=t,o.ngModelOptions=o.ngModelOptions||{},o}function i(e,t,n){if("string"===g(t.type)&&!t.enum){var i=o(e,t,n);return i.key=n.path,i.type="text",n.lookup[r.i(m.stringify)(n.path)]=i,i}}function a(e,t,n){if("number"===g(t.type)){var i=o(e,t,n);return i.key=n.path,i.type="number",n.lookup[r.i(m.stringify)(n.path)]=i,i}}function s(e,t,n){if("integer"===g(t.type)){var i=o(e,t,n);return i.key=n.path,i.type="number",n.lookup[r.i(m.stringify)(n.path)]=i,i}}function u(e,t,n){if("boolean"===g(t.type)){var i=o(e,t,n);return i.key=n.path,i.type="checkbox",n.lookup[r.i(m.stringify)(n.path)]=i,i}}function c(e,t,n){if("string"===g(t.type)&&t.enum){var i=o(e,t,n);return i.key=n.path,i.type="select",i.titleMap||(i.titleMap=b(t.enum)),n.lookup[r.i(m.stringify)(n.path)]=i,i}}function f(e,t,n){if("array"===g(t.type)&&t.items&&t.items.enum){var i=o(e,t,n);return i.key=n.path,i.type="checkboxes",i.titleMap||(i.titleMap=b(t.items.enum)),n.lookup[r.i(m.stringify)(n.path)]=i,i}}function l(e,t,n,i){if("object"===g(t.type)){var a=function(){var a=o(e,t,n);return a.type="fieldset",a.key=n.path,a.items=[],n.lookup[r.i(m.stringify)(n.path)]=a,t.properties&&Object.keys(t.properties).forEach(function(e){var o=t.properties[e],s=n.path.slice();if(s.push(e),!0!==n.ignore[r.i(m.stringify)(s)]){var u=t.required&&-1!==t.required.indexOf(e),c=i(e,o,{path:s,required:u||!1,lookup:n.lookup,ignore:n.ignore,global:n.global});c&&a.items.push(c)}}),{v:a}}();if("object"===(void 0===a?"undefined":y(a)))return a.v}}function p(e,t,n,i){if("array"===g(t.type)){var a=o(e,t,n);a.type="array",a.key=n.path,n.lookup[r.i(m.stringify)(n.path)]=a;var s=t.required&&-1!==t.required.indexOf(n.path[n.path.length-1]),u=n.path.slice();return u.push(""),a.items=[i(e,t.items,{path:u,required:s||!1,lookup:n.lookup,ignore:n.ignore,global:n.global})],a}}function d(){return{string:[c,i],object:[l],number:[a],integer:[s],boolean:[u],array:[f,p]}}function h(e,t,r,o){var i=[],a={};if(r=r||{},o=o||{},t=t||d(),!e.properties)throw new Error('Not implemented. Only type "object" allowed at root level of schema.');return Object.keys(e.properties).forEach(function(s){if(!0!==r[s]){var u=e.required&&-1!==e.required.indexOf(s),c=n(t,s,e.properties[s],{path:[s],lookup:a,ignore:r,required:u,global:o});c&&i.push(c)}}),{form:i,lookup:a}}Object.defineProperty(t,"__esModule",{value:!0});var m=r(0),v=r(1);t.defaultFormDefinition=n,t.stdFormObj=o,t.text=i,t.number=a,t.integer=s,t.checkbox=u,t.select=c,t.checkboxes=f,t.fieldset=l,t.array=p,t.createDefaults=d,t.defaultForm=h;var y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g=function(e){if(Array.isArray(e)&&2===e.length){if("null"===e[0])return e[1];if("null"===e[1])return e[0]}return e},b=function(e){var t=[];return e.forEach(function(e){t.push({name:e,value:e})}),t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3),o=r(0),i=r(1),a=r(6);r.d(t,"merge",function(){return a.a});var s=r(8);r.d(t,"select",function(){return s.a});var u=r(7);r.d(t,"jsonref",function(){return u.a});var c=r(9);r.d(t,"traverseSchema",function(){return c.a}),r.d(t,"traverseForm",function(){return c.b});var f=r(10);r.d(t,"validate",function(){return f.a}),r.d(t,"sfPath",function(){return l}),r.d(t,"schemaDefaults",function(){return p}),r.d(t,"canonicalTitleMap",function(){return d});var l=o,p=n,d=i.a},function(e,n,o){var i,a,s,u,u,c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(t){if("object"===c(n)&&void 0!==e)e.exports=t();else{a=[],i=t,void 0!==(s="function"==typeof i?i.apply(n,a):i)&&(e.exports=s)}}(function(){var e;return function e(t,r,n){function o(a,s){if(!r[a]){if(!t[a]){var c="function"==typeof u&&u;if(!s&&c)return u(a,!0);if(i)return i(a,!0);var f=new Error("Cannot find module '"+a+"'");throw f.code="MODULE_NOT_FOUND",f}var l=r[a]={exports:{}};t[a][0].call(l.exports,function(e){var r=t[a][1][e];return o(r||e)},l,l.exports,e,t,r,n)}return r[a].exports}for(var i="function"==typeof u&&u,a=0;a<n.length;a++)o(n[a]);return o}({1:[function(e,t,r){"use strict";function n(e){var t;return h(e,"Array")?(t=[],e.forEach(function(e,r){t[r]=n(e)})):h(e,"Object")?(t={},Object.keys(e).forEach(function(r){t[r]=n(e[r])})):t=e,t}function o(e,t){function r(e){Object.keys(e).forEach(function(t){n[t]=e[t]})}var n={};return r(_.parse(e||"")),r(_.parse(t||"")),0===Object.keys(n).length?void 0:_.stringify(n)}function i(e,t){h(e,"String")&&(e=I(e)),h(t,"String")&&(t=I(t));var r,n,i=y(h(t,"Undefined")?"":t);return V.indexOf(i.reference)>-1?n=i:(r=h(e,"Undefined")?void 0:y(e),h(r,"Undefined")?n=i:(n=r,n.path=I(D.join(r.path,i.path)),n.query=o(r.query,i.query))),n.fragment=void 0,(-1===V.indexOf(n.reference)&&0===n.path.indexOf("../")?"../":"")+R.serialize(n)}function a(e,t){var r,n=[];return t.length>0&&(r=e,t.slice(0,t.length-1).forEach(function(e){e in r&&(r=r[e],n.push(r))})),n}function s(e,t,r,o,i,a,s,f,l){var p,d;if(r.length>0)try{p=c(t,r)}catch(t){"remote"===e&&(o.error=t.message,o.missing=!0)}else p=t;if(h(p,"Undefined")||(o.value=p),h(p,"Array")||h(p,"Object"))return d=n(i),"local"===e?(delete d.subDocPath,t=p):(d.relativeBase=D.dirname(a[a.length-1]),0===r.length?delete d.subDocPath:d.subDocPath=r),u(t,d,a,s,f,l)}function u(e,t,r,n,o,a){var u=Promise.resolve(),c=n.length?k(n[n.length-1]):[],f=O(e,t),l=t.subDocPath||[],d=T(l),m=["#"];return r.forEach(function(e,t){"#"!==e.charAt(0)&&m.push(n[t])}),m.reverse(),"#"!==(r[r.length-1]||"").charAt(0)&&(o.documents[T(c)]=e),Object.keys(f).forEach(function(v){var y,g,b,x,w=f[v];b=0===r.length?c.concat(k(v)):c.concat(k(v).slice(0===r.length?0:l.length)),x=T(b),h(o[x],"Undefined")&&(o.refs[x]=f[v],h(w.error,"Undefined")&&"invalid"!==w.type&&(N.indexOf(w.type)>-1?(y=i(t.relativeBase,w.uri),g=r.indexOf(y)):(y=w.uri,g=n.indexOf(y)),w.ancestorPtrs=m,w.indirect=a,-1===g?N.indexOf(w.type)>-1?u=u.then(function(){return p(y,t).then(function(e){return s("remote",e,h(w.uriDetails.fragment,"Undefined")?[]:k(decodeURI(w.uriDetails.fragment)),w,t,r.concat(y),n.concat(x),o,a)}).catch(function(e){w.error=e.message,w.missing=!0})}):0!==x.indexOf(y+"/")&&x!==y&&0!==d.indexOf(y+"/")&&d!==y?0!==y.indexOf(d+"/")&&(u=u.then(function(){return s("local",e,k(y),w,t,r.concat(y),n.concat(x),o,a||-1===y.indexOf(d+"/")&&y!==d)})):w.circular=!0:(n.slice(g).forEach(function(e){o.refs[e].circular=!0}),w.circular=!0)))}),u=u.then(function(){function e(i,a,s,u){Object.keys(o.refs).forEach(function(c){var f=o.refs[c];-1===n.indexOf(u)&&-1===r.indexOf(s)&&-1===t.indexOf(u)&&c!==s&&0===c.indexOf(u+"/")&&(a.indexOf(u)>-1?a.forEach(function(e){-1===t.indexOf(u)&&t.push(e)}):e(i.concat(s),a.concat(u),c,f.uri),r.push(s),n.push(u))})}var t=[],r=[],n=[];Object.keys(o.refs).forEach(function(r){var n=o.refs[r];"local"!==n.type||n.circular||-1!==t.indexOf(n.uri)||e([],[],r,n.uri)}),Object.keys(o.refs).forEach(function(e){var r=o.refs[e];t.indexOf(r.uri)>-1&&(r.circular=!0)})}).then(function(){return o})}function c(e,t){var r=e;return t.forEach(function(e){if(!((e=decodeURI(e))in r))throw Error("JSON Pointer points to missing location: "+T(t));r=r[e]}),r}function f(e){return Object.keys(e).filter(function(e){return"$ref"!==e})}function l(e){var t;switch(e.uriDetails.reference){case"absolute":case"uri":t="remote";break;case"same-document":t="local";break;default:t=e.uriDetails.reference}return t}function p(e,t){var r=q[e],o=Promise.resolve(),i=n(t.loaderOptions||{});return h(r,"Undefined")?(h(i.processContent,"Undefined")&&(i.processContent=function(e,t){t(void 0,JSON.parse(e.text))}),o=F.load(decodeURI(e),i),o=o.then(function(t){return q[e]={value:t},t}).catch(function(t){throw q[e]={error:t},t})):o=o.then(function(){return r.value}),o=o.then(function(e){return n(e)})}function d(e,t){var r=!0;try{if(!h(e,"Object"))throw new Error("obj is not an Object");if(!h(e.$ref,"String"))throw new Error("obj.$ref is not a String")}catch(e){if(t)throw e;r=!1}return r}function h(e,t){return"Undefined"===t?void 0===e:Object.prototype.toString.call(e)==="[object "+t+"]"}function m(e){var t,r;return h(e.filter,"Array")||h(e.filter,"String")?(r=h(e.filter,"String")?[e.filter]:e.filter,t=function(e){return r.indexOf(e.type)>-1||r.indexOf(l(e))>-1}):h(e.filter,"Function")?t=e.filter:h(e.filter,"Undefined")&&(t=function(){return!0}),function(r,n){return("invalid"!==r.type||!0===e.includeInvalid)&&t(r,n)}}function v(e){var t;return h(e.subDocPath,"Array")?t=e.subDocPath:h(e.subDocPath,"String")?t=k(e.subDocPath):h(e.subDocPath,"Undefined")&&(t=[]),t}function y(e){return R.parse(encodeURI(decodeURI(e)))}function g(e,t,r){c(e,t.slice(0,t.length-1))[decodeURI(t[t.length-1])]=r}function b(e,t,r,n){function o(t,o){r.push(o),b(e,t,r,n),r.pop()}var i=!0;h(n,"Function")&&(i=n(e,t,r)),-1===e.indexOf(t)&&(e.push(t),!1!==i&&(h(t,"Array")?t.forEach(function(e,t){o(e,t.toString())}):h(t,"Object")&&Object.keys(t).forEach(function(e){o(t[e],e)}))),e.pop()}function x(e,t){if(e=h(e,"Undefined")?{}:n(e),!h(e,"Object"))throw new TypeError("options must be an Object");if(!(h(e.filter,"Undefined")||h(e.filter,"Array")||h(e.filter,"Function")||h(e.filter,"String")))throw new TypeError("options.filter must be an Array, a Function of a String");if(!h(e.includeInvalid,"Undefined")&&!h(e.includeInvalid,"Boolean"))throw new TypeError("options.includeInvalid must be a Boolean");if(!h(e.refPreProcessor,"Undefined")&&!h(e.refPreProcessor,"Function"))throw new TypeError("options.refPreProcessor must be a Function");if(!h(e.refPostProcessor,"Undefined")&&!h(e.refPostProcessor,"Function"))throw new TypeError("options.refPostProcessor must be a Function");if(!h(e.subDocPath,"Undefined")&&!h(e.subDocPath,"Array")&&!P(e.subDocPath))throw new TypeError("options.subDocPath must be an Array of path segments or a valid JSON Pointer");if(e.filter=m(e),e.subDocPath=v(e),!h(t,"Undefined"))try{c(t,e.subDocPath)}catch(e){throw e.message=e.message.replace("JSON Pointer","options.subDocPath"),e}return e}function w(){q={}}function E(e){if(!h(e,"Array"))throw new TypeError("path must be an array");return e.map(function(e){return h(e,"String")||(e=JSON.stringify(e)),decodeURI(e.replace(/~1/g,"/").replace(/~0/g,"~"))})}function $(e){if(!h(e,"Array"))throw new TypeError("path must be an array");return e.map(function(e){return h(e,"String")||(e=JSON.stringify(e)),e.replace(/~/g,"~0").replace(/\//g,"~1")})}function O(e,t){var r={};if(!h(e,"Array")&&!h(e,"Object"))throw new TypeError("obj must be an Array or an Object");return t=x(t,e),b(a(e,t.subDocPath),c(e,t.subDocPath),n(t.subDocPath),function(e,o,i){var a,s=!0;return d(o)&&(h(t.refPreProcessor,"Undefined")||(o=t.refPreProcessor(n(o),i)),a=A(o),h(t.refPostProcessor,"Undefined")||(a=t.refPostProcessor(a,i)),t.filter(a,i)&&(r[T(i)]=a),f(o).length>0&&(s=!1)),s}),r}function C(e,t){var r=Promise.resolve();return r=r.then(function(){if(!h(e,"String"))throw new TypeError("location must be a string");return t=x(t),e=i(t.relativeBase,e),p(e,t)}).then(function(r){var o=n(q[e]),i=n(t),a=y(e);return h(o.refs,"Undefined")&&(delete i.filter,delete i.subDocPath,i.includeInvalid=!0,q[e].refs=O(r,i)),h(t.filter,"Undefined")||(i.filter=t.filter),h(a.fragment,"Undefined")?h(a.subDocPath,"Undefined")||(i.subDocPath=t.subDocPath):i.subDocPath=k(decodeURI(a.fragment)),{refs:O(r,i),value:r}})}function A(e){var t,r,n,o={def:e};try{d(e,!0)?(t=e.$ref,n=L[t],h(n,"Undefined")&&(n=L[t]=y(t)),o.uri=t,o.uriDetails=n,h(n.error,"Undefined")?o.type=l(o):(o.error=o.uriDetails.error,o.type="invalid"),r=f(e),r.length>0&&(o.warning="Extra JSON Reference properties will be ignored: "+r.join(", "))):o.type="invalid"}catch(e){o.error=e.message,o.type="invalid"}return o}function P(e,t){var r,n=!0;try{if(!h(e,"String"))throw new Error("ptr is not a String");if(""!==e){if(r=e.charAt(0),-1===["#","/"].indexOf(r))throw new Error("ptr must start with a / or #/");if("#"===r&&"#"!==e&&"/"!==e.charAt(1))throw new Error("ptr must start with a / or #/");if(e.match(U))throw new Error("ptr has invalid token(s)")}}catch(e){if(!0===t)throw e;n=!1}return n}function S(e,t){return d(e,t)&&"invalid"!==A(e,t).type}function k(e){if(!P(e))throw new Error("ptr must be a JSON Pointer");var t=e.split("/");return t.shift(),E(t)}function T(e,t){if(!h(e,"Array"))throw new Error("path must be an Array");return(!1!==t?"#":"")+(e.length>0?"/":"")+$(e).join("/")}function M(e,t){var r=Promise.resolve();return r=r.then(function(){if(!h(e,"Array")&&!h(e,"Object"))throw new TypeError("obj must be an Array or an Object");t=x(t,e),e=n(e)}).then(function(){return u(e,t,[],[],{documents:{},refs:{}})}).then(function(t){function r(e,t){return k(e).length-k(t).length}var n={},o={};return Object.keys(t.refs).sort(r).forEach(function(r){var i=t.refs[r];i.indirect||(o[r]=i),delete i.indirect,h(i.error,"Undefined")&&"invalid"!==i.type?(h(i.value,"Undefined")&&i.circular&&(i.value=i.def),h(i.value,"Undefined")?n[r]=i:("#"===r?e=i.value:g(e,k(r),i.value),delete i.ancestorPtrs)):delete i.ancestorPtrs}),Object.keys(n).forEach(function(r){var o=n[r];o.ancestorPtrs.forEach(function(n,i){if(h(o.value,"Undefined"))try{o.value=c(t.documents[n],k(o.uri)),delete o.ancestorPtrs,g(e,k(r),o.value)}catch(e){i===o.ancestorPtrs.length-1&&(o.error=e.message,o.missing=!0,delete o.ancestorPtrs)}})}),{refs:o,resolved:e}})}function j(e,t){var r=Promise.resolve();return r=r.then(function(){if(!h(e,"String"))throw new TypeError("location must be a string");return t=x(t),e=i(t.relativeBase,e),p(e,t)}).then(function(r){var o=n(t),i=y(e);return h(i.fragment,"Undefined")||(o.subDocPath=k(decodeURI(i.fragment))),o.relativeBase=D.dirname(e),M(r,o).then(function(e){return{refs:e.refs,resolved:e.resolved,value:r}})})}var D=e("path"),F=e("path-loader"),_=e("querystring"),I=e("slash"),R=e("uri-js"),U=/~(?:[^01]|$)/g,q={},N=["relative","remote"],V=["absolute","uri"],L={};"undefined"==typeof Promise&&e("native-promise-only"),t.exports.clearCache=w,t.exports.decodePath=E,t.exports.encodePath=$,t.exports.findRefs=O,t.exports.findRefsAt=C,t.exports.getRefDetails=A,t.exports.isPtr=P,t.exports.isRef=S,t.exports.pathFromPtr=k,t.exports.pathToPtr=T,t.exports.resolveRefs=M,t.exports.resolveRefsAt=j},{"native-promise-only":3,path:4,"path-loader":5,querystring:11,slash:13,"uri-js":23}],2:[function(e,t,r){function n(e){if(e)return o(e)}function o(e){for(var t in n.prototype)e[t]=n.prototype[t];return e}t.exports=n,n.prototype.on=n.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},n.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var n,o=0;o<r.length;o++)if((n=r[o])===t||n.fn===t){r.splice(o,1);break}return this},n.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),r=this._callbacks["$"+e];if(r){r=r.slice(0);for(var n=0,o=r.length;n<o;++n)r[n].apply(this,t)}return this},n.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},n.prototype.hasListeners=function(e){return!!this.listeners(e).length}},{}],3:[function(n,o,i){(function(t){/*! Native Promise Only
v0.8.1 (c) Kyle Simpson
MIT License: http://getify.mit-license.org
*/
!function(t,r,n){r[t]=r[t]||n(),void 0!==o&&o.exports?o.exports=r[t]:"function"==typeof e&&e.amd&&e(function(){return r[t]})}("Promise",void 0!==t?t:this,function(){"use strict";function e(e,t){h.add(e,t),d||(d=v(h.drain))}function t(e){var t,r=void 0===e?"undefined":c(e);return null==e||"object"!=r&&"function"!=r||(t=e.then),"function"==typeof t&&t}function n(){for(var e=0;e<this.chain.length;e++)o(this,1===this.state?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function o(e,r,n){var o,i;try{!1===r?n.reject(e.msg):(o=!0===r?e.msg:r.call(void 0,e.msg),o===n.promise?n.reject(TypeError("Promise-chain cycle")):(i=t(o))?i.call(o,n.resolve,n.reject):n.resolve(o))}catch(e){n.reject(e)}}function i(r){var o,s=this;if(!s.triggered){s.triggered=!0,s.def&&(s=s.def);try{(o=t(r))?e(function(){var e=new u(s);try{o.call(r,function(){i.apply(e,arguments)},function(){a.apply(e,arguments)})}catch(t){a.call(e,t)}}):(s.msg=r,s.state=1,s.chain.length>0&&e(n,s))}catch(e){a.call(new u(s),e)}}}function a(t){var r=this;r.triggered||(r.triggered=!0,r.def&&(r=r.def),r.msg=t,r.state=2,r.chain.length>0&&e(n,r))}function s(e,t,r,n){for(var o=0;o<t.length;o++)!function(o){e.resolve(t[o]).then(function(e){r(o,e)},n)}(o)}function u(e){this.def=e,this.triggered=!1}function f(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function l(t){if("function"!=typeof t)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var r=new f(this);this.then=function(t,o){var i={success:"function"!=typeof t||t,failure:"function"==typeof o&&o};return i.promise=new this.constructor(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");i.resolve=e,i.reject=t}),r.chain.push(i),0!==r.state&&e(n,r),i.promise},this.catch=function(e){return this.then(void 0,e)};try{t.call(void 0,function(e){i.call(r,e)},function(e){a.call(r,e)})}catch(e){a.call(r,e)}}var p,d,h,m=Object.prototype.toString,v=void 0!==r?function(e){return r(e)}:setTimeout;try{Object.defineProperty({},"x",{}),p=function(e,t,r,n){return Object.defineProperty(e,t,{value:r,writable:!0,configurable:!1!==n})}}catch(e){p=function(e,t,r){return e[t]=r,e}}h=function(){function e(e,t){this.fn=e,this.self=t,this.next=void 0}var t,r,n;return{add:function(o,i){n=new e(o,i),r?r.next=n:t=n,r=n,n=void 0},drain:function(){var e=t;for(t=r=d=void 0;e;)e.fn.call(e.self),e=e.next}}}();var y=p({},"constructor",l,!1);return l.prototype=y,p(y,"__NPO__",0,!1),p(l,"resolve",function(e){var t=this;return e&&"object"==(void 0===e?"undefined":c(e))&&1===e.__NPO__?e:new t(function(t,r){if("function"!=typeof t||"function"!=typeof r)throw TypeError("Not a function");t(e)})}),p(l,"reject",function(e){return new this(function(t,r){if("function"!=typeof t||"function"!=typeof r)throw TypeError("Not a function");r(e)})}),p(l,"all",function(e){var t=this;return"[object Array]"!=m.call(e)?t.reject(TypeError("Not an array")):0===e.length?t.resolve([]):new t(function(r,n){if("function"!=typeof r||"function"!=typeof n)throw TypeError("Not a function");var o=e.length,i=Array(o),a=0;s(t,e,function(e,t){i[e]=t,++a===o&&r(i)},n)})}),p(l,"race",function(e){var t=this;return"[object Array]"!=m.call(e)?t.reject(TypeError("Not an array")):new t(function(r,n){if("function"!=typeof r||"function"!=typeof n)throw TypeError("Not a function");s(t,e,function(e,t){r(t)},n)})}),l})}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],4:[function(e,t,r){(function(e){function t(e,t){for(var r=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function n(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n<e.length;n++)t(e[n],n,e)&&r.push(e[n]);return r}var o=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i=function(e){return o.exec(e).slice(1)};r.resolve=function(){for(var r="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var a=i>=0?arguments[i]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(r=a+"/"+r,o="/"===a.charAt(0))}return r=t(n(r.split("/"),function(e){return!!e}),!o).join("/"),(o?"/":"")+r||"."},r.normalize=function(e){var o=r.isAbsolute(e),i="/"===a(e,-1);return e=t(n(e.split("/"),function(e){return!!e}),!o).join("/"),e||o||(e="."),e&&i&&(e+="/"),(o?"/":"")+e},r.isAbsolute=function(e){return"/"===e.charAt(0)},r.join=function(){var e=Array.prototype.slice.call(arguments,0);return r.normalize(n(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},r.relative=function(e,t){function n(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=r.resolve(e).substr(1),t=r.resolve(t).substr(1);for(var o=n(e.split("/")),i=n(t.split("/")),a=Math.min(o.length,i.length),s=a,u=0;u<a;u++)if(o[u]!==i[u]){s=u;break}for(var c=[],u=s;u<o.length;u++)c.push("..");return c=c.concat(i.slice(s)),c.join("/")},r.sep="/",r.delimiter=":",r.dirname=function(e){var t=i(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},r.basename=function(e,t){var r=i(e)[2];return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},r.extname=function(e){return i(e)[3]};var a="b"==="ab".substr(-1)?function(e,t,r){return e.substr(t,r)}:function(e,t,r){return t<0&&(t=e.length+t),e.substr(t,r)}}).call(this,e("_process"))},{_process:8}],5:[function(e,t,r){"use strict";function n(e){return void 0!==e&&(e=-1===e.indexOf("://")?"":e.split("://")[0]),e}function o(e){var t=n(e),r=i[t];if(void 0===r){if(""!==t)throw new Error("Unsupported scheme: "+t);r=a}return r}var i={file:e("./lib/loaders/file"),http:e("./lib/loaders/http"),https:e("./lib/loaders/http")},a="object"===("undefined"==typeof window?"undefined":c(window))||"function"==typeof importScripts?i.http:i.file;"undefined"==typeof Promise&&e("native-promise-only"),t.exports.load=function(e,t){var r=Promise.resolve();return void 0===t&&(t={}),r=r.then(function(){if(void 0===e)throw new TypeError("location is required");if("string"!=typeof e)throw new TypeError("location must be a string");if(void 0!==t){if("object"!==(void 0===t?"undefined":c(t)))throw new TypeError("options must be an object");if(void 0!==t.processContent&&"function"!=typeof t.processContent)throw new TypeError("options.processContent must be a function")}}),r=r.then(function(){return new Promise(function(r,n){o(e).load(e,t||{},function(e,t){e?n(e):r(t)})})}).then(function(e){return t.processContent?new Promise(function(r,n){t.processContent("object"===(void 0===e?"undefined":c(e))?e:{text:e},function(e,t){e?n(e):r(t)})}):"object"===(void 0===e?"undefined":c(e))?e.text:e})}},{"./lib/loaders/file":6,"./lib/loaders/http":7,"native-promise-only":3}],6:[function(e,t,r){"use strict";var n=new TypeError("The 'file' scheme is not supported in the browser");t.exports.getBase=function(){throw n},t.exports.load=function(){var e=arguments[arguments.length-1];if("function"!=typeof e)throw n;e(n)}},{}],7:[function(e,t,r){"use strict";var n=e("superagent"),o=["delete","get","head","patch","post","put"];t.exports.load=function(e,t,r){function i(e,t){e?r(e):("function"==typeof t.buffer&&t.buffer(!0),t.end(function(e,t){e?r(e):r(void 0,t)}))}var a,s,u=t.method?t.method.toLowerCase():"get";if(void 0!==t.method?"string"!=typeof t.method?a=new TypeError("options.method must be a string"):-1===o.indexOf(t.method)&&(a=new TypeError("options.method must be one of the following: "+o.slice(0,o.length-1).join(", ")+" or "+o[o.length-1])):void 0!==t.prepareRequest&&"function"!=typeof t.prepareRequest&&(a=new TypeError("options.prepareRequest must be a function")),a)r(a);else if(s=n["delete"===u?"del":u](e),t.prepareRequest)try{t.prepareRequest(s,i)}catch(e){r(e)}else i(void 0,s)}},{superagent:14}],8:[function(e,t,r){function n(){f=!1,s.length?c=s.concat(c):l=-1,c.length&&o()}function o(){if(!f){var e=setTimeout(n);f=!0;for(var t=c.length;t;){for(s=c,c=[];++l<t;)s&&s[l].run();l=-1,t=c.length}s=null,f=!1,clearTimeout(e)}}function i(e,t){this.fun=e,this.array=t}function a(){}var s,u=t.exports={},c=[],f=!1,l=-1;u.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new i(e,t)),1!==c.length||f||setTimeout(o,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},u.title="browser",u.browser=!0,u.env={},u.argv=[],u.version="",u.versions={},u.on=a,u.addListener=a,u.once=a,u.off=a,u.removeListener=a,u.removeAllListeners=a,u.emit=a,u.binding=function(e){throw new Error("process.binding is not supported")},u.cwd=function(){return"/"},u.chdir=function(e){throw new Error("process.chdir is not supported")},u.umask=function(){return 0}},{}],9:[function(e,t,r){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,r,i){t=t||"&",r=r||"=";var a={};if("string"!=typeof e||0===e.length)return a;e=e.split(t);var s=1e3;i&&"number"==typeof i.maxKeys&&(s=i.maxKeys);var u=e.length;s>0&&u>s&&(u=s);for(var c=0;c<u;++c){var f,l,p,d,h=e[c].replace(/\+/g,"%20"),m=h.indexOf(r);m>=0?(f=h.substr(0,m),l=h.substr(m+1)):(f=h,l=""),p=decodeURIComponent(f),d=decodeURIComponent(l),n(a,p)?o(a[p])?a[p].push(d):a[p]=[a[p],d]:a[p]=d}return a};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],10:[function(e,t,r){"use strict";function n(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var o=function(e){switch(void 0===e?"undefined":c(e)){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,r,s){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"===(void 0===e?"undefined":c(e))?n(a(e),function(a){var s=encodeURIComponent(o(a))+r;return i(e[a])?n(e[a],function(e){return s+encodeURIComponent(o(e))}).join(t):s+encodeURIComponent(o(e[a]))}).join(t):s?encodeURIComponent(o(s))+r+encodeURIComponent(o(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},a=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},{}],11:[function(e,t,r){"use strict";r.decode=r.parse=e("./decode"),r.encode=r.stringify=e("./encode")},{"./decode":9,"./encode":10}],12:[function(e,t,r){t.exports=function(e,t,r){for(var n=0,o=e.length,i=3==arguments.length?r:e[n++];n<o;)i=t.call(null,i,e[n],++n,e);return i}},{}],13:[function(e,t,r){"use strict";t.exports=function(e){var t=/^\\\\\?\\/.test(e),r=/[^\x00-\x80]+/.test(e);return t||r?e:e.replace(/\\/g,"/")}},{}],14:[function(e,t,r){function n(){}function o(e){switch({}.toString.call(e)){case"[object File]":case"[object Blob]":case"[object FormData]":return!0;default:return!1}}function i(e){if(!b(e))return e;var t=[];for(var r in e)null!=e[r]&&a(t,r,e[r]);return t.join("&")}function a(e,t,r){if(Array.isArray(r))return r.forEach(function(r){a(e,t,r)});e.push(encodeURIComponent(t)+"="+encodeURIComponent(r))}function s(e){for(var t,r,n={},o=e.split("&"),i=0,a=o.length;i<a;++i)r=o[i],t=r.split("="),n[decodeURIComponent(t[0])]=decodeURIComponent(t[1]);return n}function u(e){var t,r,n,o,i=e.split(/\r?\n/),a={};i.pop();for(var s=0,u=i.length;s<u;++s)r=i[s],t=r.indexOf(":"),n=r.slice(0,t).toLowerCase(),o=w(r.slice(t+1)),a[n]=o;return a}function c(e){return/[\/+]json\b/.test(e)}function f(e){return e.split(/ *; */).shift()}function l(e){return y(e.split(/ *; */),function(e,t){var r=t.split(/ *= */),n=r.shift(),o=r.shift();return n&&o&&(e[n]=o),e},{})}function p(e,t){t=t||{},this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText,this.setStatusProperties(this.xhr.status),this.header=this.headers=u(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this.setHeaderProperties(this.header),this.body="HEAD"!=this.req.method?this.parseBody(this.text?this.text:this.xhr.response):null}function d(e,t){var r=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",function(){var e=null,t=null;try{t=new p(r)}catch(t){return e=new Error("Parser is unable to parse the response"),e.parse=!0,e.original=t,e.rawResponse=r.xhr&&r.xhr.responseText?r.xhr.responseText:null,e.statusCode=r.xhr&&r.xhr.status?r.xhr.status:null,r.callback(e)}if(r.emit("response",t),e)return r.callback(e,t);if(t.status>=200&&t.status<300)return r.callback(e,t);var n=new Error(t.statusText||"Unsuccessful HTTP response");n.original=e,n.response=t,n.status=t.status,r.callback(n,t)})}function h(e,t){var r=x("DELETE",e);return t&&r.end(t),r}var m,v=e("emitter"),y=e("reduce"),g=e("./request-base"),b=e("./is-object");m="undefined"!=typeof window?window:"undefined"!=typeof self?self:this;var x=t.exports=e("./request").bind(null,d);x.getXHR=function(){if(!(!m.XMLHttpRequest||m.location&&"file:"==m.location.protocol&&m.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}return!1};var w="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};x.serializeObject=i,x.parseString=s,x.types={html:"text/html",json:"application/json",xml:"application/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},x.serialize={"application/x-www-form-urlencoded":i,"application/json":JSON.stringify},x.parse={"application/x-www-form-urlencoded":s,"application/json":JSON.parse},p.prototype.get=function(e){return this.header[e.toLowerCase()]},p.prototype.setHeaderProperties=function(e){var t=this.header["content-type"]||"";this.type=f(t);var r=l(t);for(var n in r)this[n]=r[n]},p.prototype.parseBody=function(e){var t=x.parse[this.type];return!t&&c(this.type)&&(t=x.parse["application/json"]),t&&e&&(e.length||e instanceof Object)?t(e):null},p.prototype.setStatusProperties=function(e){1223===e&&(e=204);var t=e/100|0;this.status=this.statusCode=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.clientError=4==t,this.serverError=5==t,this.error=(4==t||5==t)&&this.toError(),this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.notFound=404==e,this.forbidden=403==e},p.prototype.toError=function(){var e=this.req,t=e.method,r=e.url,n="cannot "+t+" "+r+" ("+this.status+")",o=new Error(n);return o.status=this.status,o.method=t,o.url=r,o},x.Response=p,v(d.prototype);for(var E in g)d.prototype[E]=g[E];d.prototype.abort=function(){if(!this.aborted)return this.aborted=!0,this.xhr.abort(),this.clearTimeout(),this.emit("abort"),this},d.prototype.type=function(e){return this.set("Content-Type",x.types[e]||e),this},d.prototype.responseType=function(e){return this._responseType=e,this},d.prototype.accept=function(e){return this.set("Accept",x.types[e]||e),this},d.prototype.auth=function(e,t,r){switch(r||(r={type:"basic"}),r.type){case"basic":var n=btoa(e+":"+t);this.set("Authorization","Basic "+n);break;case"auto":this.username=e,this.password=t}return this},d.prototype.query=function(e){return"string"!=typeof e&&(e=i(e)),e&&this._query.push(e),this},d.prototype.attach=function(e,t,r){return this._getFormData().append(e,t,r||t.name),this},d.prototype._getFormData=function(){return this._formData||(this._formData=new m.FormData),this._formData},d.prototype.send=function(e){var t=b(e),r=this._header["content-type"];if(t&&b(this._data))for(var n in e)this._data[n]=e[n];else"string"==typeof e?(r||this.type("form"),r=this._header["content-type"],this._data="application/x-www-form-urlencoded"==r?this._data?this._data+"&"+e:e:(this._data||"")+e):this._data=e;return!t||o(e)?this:(r||this.type("json"),this)},p.prototype.parse=function(e){return m.console&&console.warn("Client-side parse() method has been renamed to serialize(). This method is not compatible with superagent v2.0"),this.serialize(e),this},p.prototype.serialize=function(e){return this._parser=e,this},d.prototype.callback=function(e,t){var r=this._callback;this.clearTimeout(),r(e,t)},d.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},d.prototype.timeoutError=function(){var e=this._timeout,t=new Error("timeout of "+e+"ms exceeded");t.timeout=e,this.callback(t)},d.prototype.withCredentials=function(){return this._withCredentials=!0,this},d.prototype.end=function(e){var t=this,r=this.xhr=x.getXHR(),i=this._query.join("&"),a=this._timeout,s=this._formData||this._data;this._callback=e||n,r.onreadystatechange=function(){if(4==r.readyState){var e;try{e=r.status}catch(t){e=0}if(0==e){if(t.timedout)return t.timeoutError();if(t.aborted)return;return t.crossDomainError()}t.emit("end")}};var u=function(e){e.total>0&&(e.percent=e.loaded/e.total*100),e.direction="download",t.emit("progress",e)};this.hasListeners("progress")&&(r.onprogress=u);try{r.upload&&this.hasListeners("progress")&&(r.upload.onprogress=u)}catch(e){}if(a&&!this._timer&&(this._timer=setTimeout(function(){t.timedout=!0,t.abort()},a)),i&&(i=x.serializeObject(i),this.url+=~this.url.indexOf("?")?"&"+i:"?"+i),this.username&&this.password?r.open(this.method,this.url,!0,this.username,this.password):r.open(this.method,this.url,!0),this._withCredentials&&(r.withCredentials=!0),"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof s&&!o(s)){var f=this._header["content-type"],l=this._parser||x.serialize[f?f.split(";")[0]:""];!l&&c(f)&&(l=x.serialize["application/json"]),l&&(s=l(s))}for(var p in this.header)null!=this.header[p]&&r.setRequestHeader(p,this.header[p]);return this._responseType&&(r.responseType=this._responseType),this.emit("request",this),r.send(void 0!==s?s:null),this},x.Request=d,x.get=function(e,t,r){var n=x("GET",e);return"function"==typeof t&&(r=t,t=null),t&&n.query(t),r&&n.end(r),n},x.head=function(e,t,r){var n=x("HEAD",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n},x.del=h,x.delete=h,x.patch=function(e,t,r){var n=x("PATCH",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n},x.post=function(e,t,r){var n=x("POST",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n},x.put=function(e,t,r){var n=x("PUT",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n}},{"./is-object":15,"./request":17,"./request-base":16,emitter:2,reduce:12}],15:[function(e,t,r){function n(e){return null!=e&&"object"==(void 0===e?"undefined":c(e))}t.exports=n},{}],16:[function(e,t,r){var n=e("./is-object");r.clearTimeout=function(){return this._timeout=0,clearTimeout(this._timer),this},r.parse=function(e){return this._parser=e,this},r.timeout=function(e){return this._timeout=e,this},r.then=function(e,t){return this.end(function(r,n){r?t(r):e(n)})},r.use=function(e){return e(this),this},r.get=function(e){return this._header[e.toLowerCase()]},r.getHeader=r.get,r.set=function(e,t){if(n(e)){for(var r in e)this.set(r,e[r]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},r.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},r.field=function(e,t){return this._getFormData().append(e,t),this}},{"./is-object":15}],17:[function(e,t,r){function n(e,t,r){return"function"==typeof r?new e("GET",t).end(r):2==arguments.length?new e("GET",t):new e(t,r)}t.exports=n},{}],18:[function(e,t,r){/*! https://mths.be/punycode v1.3.2 by @mathias, modified for URI.js */var n=function(){function e(e){throw new RangeError(O[e])}function t(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function r(e,r){var n=e.split("@"),o="";return n.length>1&&(o=n[0]+"@",e=n[1]),e=e.replace($,"."),o+t(e.split("."),r).join(".")}function n(e){for(var t,r,n=[],o=0,i=e.length;o<i;)t=e.charCodeAt(o++),t>=55296&&t<=56319&&o<i?(r=e.charCodeAt(o++),56320==(64512&r)?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--)):n.push(t);return n}function o(e){return t(e,function(e){var t="";return e>65535&&(e-=65536,t+=P(e>>>10&1023|55296),e=56320|1023&e),t+=P(e)}).join("")}function i(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:d}function a(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function s(e,t,r){var n=0;for(e=r?A(e/y):e>>1,e+=A(e/t);e>C*m>>1;n+=d)e=A(e/C);return A(n+(C+1)*e/(e+v))}function u(t){var r,n,a,u,c,f,l,v,y,w,E=[],$=t.length,O=0,C=b,P=g;for(n=t.lastIndexOf(x),n<0&&(n=0),a=0;a<n;++a)t.charCodeAt(a)>=128&&e("not-basic"),E.push(t.charCodeAt(a));for(u=n>0?n+1:0;u<$;){for(c=O,f=1,l=d;u>=$&&e("invalid-input"),v=i(t.charCodeAt(u++)),(v>=d||v>A((p-O)/f))&&e("overflow"),O+=v*f,y=l<=P?h:l>=P+m?m:l-P,!(v<y);l+=d)w=d-y,f>A(p/w)&&e("overflow"),f*=w;r=E.length+1,P=s(O-c,r,0==c),A(O/r)>p-C&&e("overflow"),C+=A(O/r),O%=r,E.splice(O++,0,C)}return o(E)}function c(t){var r,o,i,u,c,f,l,v,y,w,E,$,O,C,S,k=[];for(t=n(t),$=t.length,r=b,o=0,c=g,f=0;f<$;++f)(E=t[f])<128&&k.push(P(E));for(i=u=k.length,u&&k.push(x);i<$;){for(l=p,f=0;f<$;++f)(E=t[f])>=r&&E<l&&(l=E);for(O=i+1,l-r>A((p-o)/O)&&e("overflow"),o+=(l-r)*O,r=l,f=0;f<$;++f)if(E=t[f],E<r&&++o>p&&e("overflow"),E==r){for(v=o,y=d;w=y<=c?h:y>=c+m?m:y-c,!(v<w);y+=d)S=v-w,C=d-w,k.push(P(a(w+S%C,0))),v=A(S/C);k.push(P(a(v,0))),c=s(o,O,i==u),o=0,++i}++o,++r}return k.join("")}function f(e){return r(e,function(e){return w.test(e)?u(e.slice(4).toLowerCase()):e})}function l(e){return r(e,function(e){return E.test(e)?"xn--"+c(e):e})}var p=2147483647,d=36,h=1,m=26,v=38,y=700,g=72,b=128,x="-",w=/^xn--/,E=/[^\x20-\x7E]/,$=/[\x2E\u3002\uFF0E\uFF61]/g,O={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},C=d-h,A=Math.floor,P=String.fromCharCode;return{version:"1.3.2",ucs2:{decode:n,encode:o},decode:u,encode:c,toASCII:l,toUnicode:f}}();"undefined"==typeof COMPILED&&void 0!==t&&(t.exports=n)},{}],19:[function(e,t,r){e("./schemes/http"),e("./schemes/urn"),e("./schemes/mailto")},{"./schemes/http":20,"./schemes/mailto":21,"./schemes/urn":22}],20:[function(e,t,r){if("undefined"==typeof COMPILED&&void 0===n&&"function"==typeof e)var n=e("../uri");n.SCHEMES.http=n.SCHEMES.https={domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){return e.port!==("https"!==String(e.scheme).toLowerCase()?80:443)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}}},{"../uri":23}],21:[function(e,t,r){if("undefined"==typeof COMPILED&&void 0===n&&"function"==typeof e)var n=e("../uri"),o=e("../punycode");!function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];if(e.length>1){e[0]=e[0].slice(0,-1);for(var r=e.length-1,n=1;n<r;++n)e[n]=e[n].slice(1,-1);return e[r]=e[r].slice(1),e.join("")}return e[0]}function t(e){return"(?:"+e+")"}function r(e){return e.toUpperCase()}function i(e){var t=n.pctDecChars(e);return t.match(k)?t:e}function a(e){return void 0!==e&&null!==e?e instanceof Array&&!e.callee?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}var s={},u=n.IRI_SUPPORT,c="[A-Za-z0-9\\-\\.\\_\\~"+(u?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]",f="[0-9A-Fa-f]",l=t(t("%[EFef][0-9A-Fa-f]%"+f+f+"%"+f+f)+"|"+t("%[89A-Fa-f][0-9A-Fa-f]%"+f+f)+"|"+t("%"+f+f)),p="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",d="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",h=e(d,'[\\"\\\\]'),m=t(p+"+"+t("\\."+p+"+")+"*"),v=t("\\\\"+h),y=t(d+"|"+v),g=t('\\"'+y+'*\\"'),b=t(c+"|"+l+"|[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),x=t(m+"|\\[[\\x21-\\x5A\\x5E-\\x7E]*\\]"),w=t(m+"|"+g),E=t(w+"\\@"+x),$=t(E+t("\\,"+E)+"*"),O=t(b+"*"),C=O,A=t(O+"\\="+C),P=t(A+t("\\&"+A)+"*"),S=t("\\?"+P),k=(n.VALIDATE_SUPPORT&&new RegExp("^mailto\\:"+$+"?"+S+"?$"),new RegExp(c,"g")),T=new RegExp(l,"g"),M=new RegExp(e("[^]",p,"[\\.]",'[\\"]',h),"g"),j=new RegExp(e("[^]",p,"[\\.]","[\\[]","[\\x21-\\x5A\\x5E-\\x7E]","[\\]]"),"g"),D=new RegExp(e("[^]",c,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),F=D,_=n.VALIDATE_SUPPORT&&new RegExp("^"+$+"$"),I=n.VALIDATE_SUPPORT&&new RegExp("^"+P+"$");n.SCHEMES.mailto={parse:function(e,t){n.VALIDATE_SUPPORT&&!e.error&&(e.path&&!_.test(e.path)?e.error="Email address is not valid":e.query&&!I.test(e.query)&&(e.error="Header fields are invalid"));var r=e.to=e.path?e.path.split(","):[];if(e.path=void 0,e.query){for(var i=!1,a={},s=e.query.split("&"),u=0,c=s.length;u<c;++u){var f=s[u].split("=");switch(f[0]){case"to":for(var l=f[1].split(","),p=0,d=l.length;p<d;++p)r.push(l[p]);break;case"subject":e.subject=n.unescapeComponent(f[1],t);break;case"body":e.body=n.unescapeComponent(f[1],t);break;default:i=!0,a[n.unescapeComponent(f[0],t)]=n.unescapeComponent(f[1],t)}}i&&(e.headers=a)}e.query=void 0;for(var u=0,c=r.length;u<c;++u){var h=r[u].split("@");if(h[0]=n.unescapeComponent(h[0]),void 0===o||t.unicodeSupport)h[1]=n.unescapeComponent(h[1],t).toLowerCase();else try{h[1]=o.toASCII(n.unescapeComponent(h[1],t).toLowerCase())}catch(t){e.error=e.error||"Email address's domain name can not be converted to ASCII via punycode: "+t}r[u]=h.join("@")}return e},serialize:function(e,t){var u=a(e.to);if(u){for(var c=0,f=u.length;c<f;++c){var l=String(u[c]),p=l.lastIndexOf("@"),d=l.slice(0,p),h=l.slice(p+1);if(d=d.replace(T,i).replace(T,r).replace(M,n.pctEncChar),void 0!==o)try{h=t.iri?o.toUnicode(h):o.toASCII(n.unescapeComponent(h,t).toLowerCase())}catch(r){e.error=e.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}else h=h.replace(T,i).toLowerCase().replace(T,r).replace(j,n.pctEncChar);u[c]=d+"@"+h}e.path=u.join(",")}var m=e.headers=e.headers||{};e.subject&&(m.subject=e.subject),e.body&&(m.body=e.body);var v=[];for(var y in m)m[y]!==s[y]&&v.push(y.replace(T,i).replace(T,r).replace(D,n.pctEncChar)+"="+m[y].replace(T,i).replace(T,r).replace(F,n.pctEncChar));return v.length&&(e.query=v.join("&")),e}}}()},{"../punycode":18,"../uri":23}],22:[function(e,t,r){if("undefined"==typeof COMPILED&&void 0===n&&"function"==typeof e)var n=e("../uri");!function(){var e=n.pctEncChar,t="(?:[0-9A-Za-z][0-9A-Za-z\\-]{1,31})",r=new RegExp("^urn\\:("+t+")$"),o=new RegExp("^("+t+")\\:((?:(?:(?:\\%[0-9A-Fa-f]{2})|[0-9A-Za-z\\(\\)\\+\\,\\-\\.\\:\\=\\@\\;\\$\\_\\!\\*\\'\\/\\?\\#])+))$"),i=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/;n.SCHEMES.urn={parse:function(e,t){var r,i,a=e.path.match(o);return a||(t.tolerant||(e.error=e.error||"URN is not strictly valid."),a=e.path.match(/^([^\:]+)\:(.*)/)),a?(r="urn:"+a[1].toLowerCase(),i=n.SCHEMES[r],i||(i=n.SCHEMES[r]={parse:function(e,t){return e},serialize:n.SCHEMES.urn.serialize}),e.scheme=r,e.path=a[2],e=i.parse(e,t)):e.error=e.error||"URN can not be parsed.",e},serialize:function(t,n){var o,i=t.scheme||n.scheme;if(i&&"urn"!==i){var o=i.match(r);o||(o=["urn:"+i,i]),t.scheme="urn",t.path=o[1]+":"+(t.path?t.path.replace(/[\x00-\x20\\\"\&\<\>\[\]\^\`\{\|\}\~\x7F-\xFF]/g,e):"")}return t}},n.SCHEMES["urn:uuid"]={parse:function(e,t){return t.tolerant||e.path&&e.path.match(i)||(e.error=e.error||"UUID is not valid."),e},serialize:function(e,t){return t.tolerant||e.path&&e.path.match(i)?e.path=(e.path||"").toLowerCase():e.scheme=void 0,n.SCHEMES.urn.serialize(e,t)}}}()},{"../uri":23}],23:[function(e,t,r){/**
* URI.js
*
* @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript.
* @author <a href="mailto:[email protected]">Gary Court</a>
* @version 2.0.0
* @see http://github.com/garycourt/uri-js
* @license URI.js v2.0.0 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js
*/
var n=!0,o=!0,i=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];if(e.length>1){e[0]=e[0].slice(0,-1);for(var r=e.length-1,n=1;n<r;++n)e[n]=e[n].slice(1,-1);return e[r]=e[r].slice(1),e.join("")}return e[0]}function t(e){return"(?:"+e+")"}function r(r){var n=e("[0-9]","[A-Fa-f]"),i=t(t("%[EFef]"+n+"%"+n+n+"%"+n+n)+"|"+t("%[89A-Fa-f]"+n+"%"+n+n)+"|"+t("%"+n+n)),a="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",s=e("[\\:\\/\\?\\#\\[\\]\\@]",a),u=r?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",c=r?"[\\uE000-\\uF8FF]":"[]",f=e("[A-Za-z]","[0-9]","[\\-\\.\\_\\~]",u),l=t("[A-Za-z]"+e("[A-Za-z]","[0-9]","[\\+\\-\\.]")+"*"),p=t(t(i+"|"+e(f,a,"[\\:]"))+"*"),d=t(t("25[0-5]")+"|"+t("2[0-4][0-9]")+"|"+t("1[0-9][0-9]")+"|"+t("[1-9][0-9]")+"|[0-9]"),h=t(d+"\\."+d+"\\."+d+"\\."+d),m=t(n+"{1,4}"),v=(t(t(m+"\\:"+m)+"|"+h),t(e(f,a,"[\\:]")+"+")),y=t("v"+n+"+\\."+e(f,a,"[\\:]")+"+"),g=t("\\["+t(v+"|"+y)+"\\]"),b=t(t(i+"|"+e(f,a))+"*"),x=t(g+"|"+h+"(?!"+b+")|"+b),w=t("[0-9]*"),E=t(t(p+"@")+"?"+x+t("\\:"+w)+"?"),$=t(i+"|"+e(f,a,"[\\:\\@]")),O=t($+"*"),C=t($+"+"),A=t(t(i+"|"+e(f,a,"[\\@]"))+"+"),P=t(t("\\/"+O)+"*"),S=t("\\/"+t(C+P)+"?"),k=t(A+P),T=t(C+P),M="(?!"+$+")",j=(t(P+"|"+S+"|"+k+"|"+T+"|"+M),t(t($+"|"+e("[\\/\\?]",c))+"*")),D=t(t($+"|[\\/\\?]")+"*"),F=t(t("\\/\\/"+E+P)+"|"+S+"|"+T+"|"+M),_=t(l+"\\:"+F+t("\\?"+j)+"?"+t("\\#"+D)+"?"),I=t(t("\\/\\/"+E+P)+"|"+S+"|"+k+"|"+M),R=t(I+t("\\?"+j)+"?"+t("\\#"+D)+"?"),U=(t(_+"|"+R),t(l+"\\:"+F+t("\\?"+j)+"?"),"^("+l+")\\:"+t(t("\\/\\/("+t("("+p+")@")+"?("+x+")"+t("\\:("+w+")")+"?)")+"?("+P+"|"+S+"|"+T+"|"+M+")")+t("\\?("+j+")")+"?"+t("\\#("+D+")")+"?$"),q="^(){0}"+t(t("\\/\\/("+t("("+p+")@")+"?("+x+")"+t("\\:("+w+")")+"?)")+"?("+P+"|"+S+"|"+k+"|"+M+")")+t("\\?("+j+")")+"?"+t("\\#("+D+")")+"?$";t(t("\\/\\/("+t("("+p+")@")+"?("+x+")"+t("\\:("+w+")")+"?)")+"?("+P+"|"+S+"|"+T+"|"+M+")"),t("\\?("+j+")"),t("\\#("+D+")"),t("("+p+")@"),t("\\:("+w+")");return{URI_REF:o&&new RegExp("("+U+")|("+q+")"),NOT_SCHEME:new RegExp(e("[^]","[A-Za-z]","[0-9]","[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(e("[^\\%\\:]",f,a),"g"),NOT_HOST:new RegExp(e("[^\\%]",f,a),"g"),NOT_PATH:new RegExp(e("[^\\%\\/\\:\\@]",f,a),"g"),NOT_PATH_NOSCHEME:new RegExp(e("[^\\%\\/\\@]",f,a),"g"),NOT_QUERY:new RegExp(e("[^\\%]",f,a,"[\\:\\@\\/\\?]",c),"g"),NOT_FRAGMENT:new RegExp(e("[^\\%]",f,a,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(e("[^]",f,a),"g"),UNRESERVED:new RegExp(f,"g"),OTHER_CHARS:new RegExp(e("[^\\%]",f,s),"g"),PCT_ENCODED:new RegExp(i,"g")}}function i(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function s(e){for(var t,r,n,o="",i=0,a=e.length;i<a;)t=parseInt(e.substr(i+1,2),16),t<128?(o+=String.fromCharCode(t),i+=3):t>=194&&t<224?(a-i>=6?(r=parseInt(e.substr(i+4,2),16),o+=String.fromCharCode((31&t)<<6|63&r)):o+=e.substr(i,6),i+=6):t>=224?(a-i>=9?(r=parseInt(e.substr(i+4,2),16),n=parseInt(e.substr(i+7,2),16),o+=String.fromCharCode((15&t)<<12|(63&r)<<6|63&n)):o+=e.substr(i,9),i+=9):(o+=e.substr(i,3),i+=3);return o}function u(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function c(e){return e.toUpperCase()}function f(e,t){function r(e){var r=s(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,i).replace(t.PCT_ENCODED,c)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,i).replace(t.PCT_ENCODED,c)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,i).replace(t.PCT_ENCODED,c)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,i).replace(t.PCT_ENCODED,c)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,i).replace(t.PCT_ENCODED,c)),e}function l(e,t){void 0===t&&(t={});var r,i,u=n&&!1!==t.iri?E:w,c={};if("suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e),o?(r=e.match(u.URI_REF),r&&(r=r[1]?r.slice(1,10):r.slice(10,19)),r||(!0,t.tolerant||(c.error=c.error||"URI is not strictly valid."),r=e.match($))):r=e.match($),r){if(S?(c.scheme=r[1],c.userinfo=r[3],c.host=r[4],c.port=parseInt(r[5],10),c.path=r[6]||"",c.query=r[7],c.fragment=r[8],isNaN(c.port)&&(c.port=r[5])):(c.scheme=r[1]||void 0,c.userinfo=-1!==e.indexOf("@")?r[3]:void 0,c.host=-1!==e.indexOf("//")?r[4]:void 0,c.port=parseInt(r[5],10),c.path=r[6]||"",c.query=-1!==e.indexOf("?")?r[7]:void 0,c.fragment=-1!==e.indexOf("#")?r[8]:void 0,isNaN(c.port)&&(c.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?r[4]:void 0)),void 0!==c.scheme||void 0!==c.userinfo||void 0!==c.host||void 0!==c.port||c.path||void 0!==c.query?void 0===c.scheme?c.reference="relative":void 0===c.fragment?c.reference="absolute":c.reference="uri":c.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==c.reference&&(c.error=c.error||"URI is not a "+t.reference+" reference."),i=k[(t.scheme||c.scheme||"").toLowerCase()],!n||void 0===a||t.unicodeSupport||i&&i.unicodeSupport)f(c,u);else{if(c.host&&(t.domainHost||i&&i.domainHost))try{c.host=a.toASCII(c.host.replace(u.PCT_ENCODED,s).toLowerCase())}catch(e){c.error=c.error||"Host's domain name can not be converted to ASCII via punycode: "+e}f(c,w)}i&&i.parse&&i.parse(c,t)}else!0,c.error=c.error||"URI can not be parsed.";return c}function p(e,t){var r=[];return void 0!==e.userinfo&&(r.push(e.userinfo),r.push("@")),void 0!==e.host&&r.push(e.host),"number"==typeof e.port&&(r.push(":"),r.push(e.port.toString(10))),r.length?r.join(""):void 0}function d(e){for(var t,r=[];e.length;)e.match(O)?e=e.replace(O,""):e.match(C)?e=e.replace(C,"/"):e.match(A)?(e=e.replace(A,"/"),r.pop()):"."===e||".."===e?e="":(t=e.match(P)[0],e=e.slice(t.length),r.push(t));return r.join("")}function h(e,t){void 0===t&&(t={});var r,o,i,u=n&&t.iri?E:w,c=[];if(r=k[(t.scheme||e.scheme||"").toLowerCase()],r&&r.serialize&&r.serialize(e,t),n&&void 0!==a&&e.host&&(t.domainHost||r&&r.domainHost))try{e.host=t.iri?a.toUnicode(e.host):a.toASCII(e.host.replace(u.PCT_ENCODED,s).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}return f(e,u),"suffix"!==t.reference&&e.scheme&&(c.push(e.scheme),c.push(":")),o=p(e,t),void 0!==o&&("suffix"!==t.reference&&c.push("//"),c.push(o),e.path&&"/"!==e.path.charAt(0)&&c.push("/")),void 0!==e.path&&(i=e.path,t.absolutePath||r&&r.absolutePath||(i=d(i)),void 0===o&&(i=i.replace(/^\/\//,"/%2F")),c.push(i)),void 0!==e.query&&(c.push("?"),c.push(e.query)),void 0!==e.fragment&&(c.push("#"),c.push(e.fragment)),c.join("")}function m(e,t,r,n){void 0===r&&(r={});var o={};return n||(e=l(h(e,r),r),t=l(h(t,r),r)),r=r||{},!r.tolerant&&t.scheme?(o.scheme=t.scheme,o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=d(t.path),o.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=d(t.path),o.query=t.query):(t.path?("/"===t.path.charAt(0)?o.path=d(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:o.path=t.path:o.path="/"+t.path,o.path=d(o.path)),o.query=t.query):(o.path=e.path,void 0!==t.query?o.query=t.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=t.fragment,o}function v(e,t,r){return h(m(l(e,r),l(t,r),r,!0),r)}function y(e,t){return"string"==typeof e?e=h(l(e,t),t):"object"===u(e)&&(e=l(h(e,t),t)),e}function g(e,t,r){return"string"==typeof e?e=h(l(e,r),r):"object"===u(e)&&(e=h(e,r)),"string"==typeof t?t=h(l(t,r),r):"object"===u(t)&&(t=h(t,r)),e===t}function b(e,t){return e&&e.toString().replace(n&&t&&t.iri?E.ESCAPE:w.ESCAPE,i)}function x(e,t){return e&&e.toString().replace(n&&t&&t.iri?E.PCT_ENCODED:w.PCT_ENCODED,s)}var w=r(!1),E=n?r(!0):void 0,$=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?([^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n)*))?/i,O=/^\.\.?\//,C=/^\/\.(\/|$)/,A=/^\/\.\.(\/|$)/,P=/^\/?(?:.|\n)*?(?=\/|$)/,S=void 0==="".match(/(){0}/)[1],k={};return{IRI_SUPPORT:n,VALIDATE_SUPPORT:o,pctEncChar:i,pctDecChars:s,SCHEMES:k,parse:l,_recomposeAuthority:p,removeDotSegments:d,serialize:h,resolveComponents:m,resolve:v,normalize:y,equal:g,escapeComponent:b,unescapeComponent:x}}();if(void 0!==t&&"function"==typeof e){var a=e("./punycode");t.exports=i,e("./schemes")}},{"./punycode":18,"./schemes":19}]},{},[1])(1)})},function(e,t,r){"use strict";function n(e,t){var u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r.i(i.createDefaults)(),c=arguments[3],f=arguments[4],l=arguments[5],p=arguments[6],d=[],h=[];t=t||[];var m=t.indexOf("*");f=f||{};var v={},y=t.indexOf("...");if("object"===(void 0===e?"undefined":s(e))&&e.hasOwnProperty("properties")){l=l||e.readonly||e.readOnly,v=r.i(i.defaultForm)(e,u,c,f);var g=v.lookup;e=g||e,d=d.concat(v.form)}return-1!==m&&(t=t.slice(0,m).concat(d).concat(t.slice(m+1))),v.form&&-1!==y&&function(){var e=t.map(function(e){return"string"==typeof e?e:e.key?e.key:void 0}).filter(function(e){return void 0!==e});h=h.concat(v.form.map(function(t){if(-1===e.indexOf(t.key[0]))return t}).filter(function(e){return void 0!==e}))}(),-1!==y&&(t=t.slice(0,y).concat(h).concat(t.slice(y+1))),t.map(function(t){if("string"==typeof t&&(t={key:t}),t.key&&"string"==typeof t.key&&(t.key=r.i(o.parse)(t.key)),t.titleMap&&(t.titleMap=r.i(a.a)(t.titleMap)),t.key){var i=r.i(o.stringify)(t.key);e[i]&&function(){var r=e[i];r&&Object.keys(r).forEach(function(e){void 0===t[e]&&(t[e]=r[e])})}()}return!0===l&&(t.readonly=!0),t.items&&(t.items=n(e,t.items,u,c,f,t.readonly,p)),t.tabs&&t.tabs.forEach(function(r){r.items&&(r.items=n(e,r.items,u,c,f,t.readonly,p))}),"checkbox"===t.type&&(void 0===t.schema?t.schema={default:!1}:void 0===t.schema.default&&(t.schema.default=!1)),p&&"template"===t.type&&!t.template&&t.templateUrl&&p.push(t),t})}var o=r(0),i=r(3),a=r(1);t.a=n;var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}},function(e,t,r){"use strict";function n(e,t){var r=new Promise(function(t,r){o.resolveRefs(e,{filter:["relative","local","remote"]}).then(function(e){t(e.resolved)}).catch(function(e){r(new Error(e))})});if("function"!=typeof t)return r;r.then(function(e){t(null,e)}).catch(function(e){t(e)})}var o=r(5);r.n(o);t.a=n},function(e,t,r){"use strict";function n(e,t,r){t||(t=this);var n="string"==typeof e?o.parse(e):e;if(void 0!==r&&1===n.length)return t[n[0]]=r,t;void 0!==r&&void 0===t[n[0]]&&(t[n[0]]=n.length>2&&i.test(n[1])?[]:{});for(var a=t[n[0]],s=1;s<n.length;s++){if(""===n[s])return;if(void 0!==r){if(s===n.length-1)return a[n[s]]=r,r;var u=a[n[s]];void 0!==u&&null!==u||(u=i.test(n[s+1])?[]:{},a[n[s]]=u),a=u}else a&&(a=a[n[s]])}return a}var o=r(0);t.a=n;var i=/^\d+$/},function(e,t,r){"use strict";function n(e,t,r,n){n=void 0===n||n,r=r||[];!function e(t,r,o){if(r(t,o),t.properties&&Object.keys(t.properties).forEach(function(n){var i=o.slice();i.push(n),e(t.properties[n],r,i)}),!n&&t.items){var i=o.slice();i.push(""),e(t.items,r,i)}}(e,t,r||[])}function o(e,t){t(e),e.items&&e.items.forEach(function(e){o(e,t)}),e.tabs&&e.tabs.forEach(function(e){e.items&&e.items.forEach(function(e){o(e,t)})})}t.a=n,t.b=o},function(e,t,r){"use strict";function n(e,t){if(!e)return{valid:!0};var r=e.schema;if(!r)return{valid:!0};""===t&&(t=void 0),"number"===e.type&&null===t&&(t=void 0);var n={type:"object",properties:{},required:void 0},o=e.key[e.key.length-1];n.properties[o]=r,e.required&&(n.required=[o]);var a={};return void 0!==t&&(a[o]=t),i.a.validateResult(a,n)}var o=r(12),i=r.n(o);t.a=n},function(e,t,r){"use strict";var n;!function(o){var i={parse:function(e){if("string"!=typeof e)throw new TypeError("ObjectPath.parse must be passed a string");for(var t,r,n,o,i=0,a=[];i<e.length;)if(t=e.indexOf(".",i),r=e.indexOf("[",i),-1===t&&-1===r)a.push(e.slice(i,e.length)),i=e.length;else if(-1===r||-1!==t&&t<r)a.push(e.slice(i,t)),i=t+1;else if(r>i&&(a.push(e.slice(i,r)),i=r),'"'!==(n=e.slice(r+1,r+2))&&"'"!==n)o=e.indexOf("]",r),-1===o&&(o=e.length),a.push(e.slice(i+1,o)),i="."===e.slice(o+1,o+2)?o+2:o+1;else{for(o=e.indexOf(n+"]",r),-1===o&&(o=e.length);"\\"===e.slice(o-1,o)&&r<e.length;)r++,o=e.indexOf(n+"]",r);a.push(e.slice(i+2,o).replace(new RegExp("\\"+n,"g"),n)),i="."===e.slice(o+2,o+3)?o+3:o+2}return a},stringify:function(e,t){return Array.isArray(e)||(e=[e.toString()]),t='"'===t?'"':"'",e.map(function(e){return"["+t+e.toString().replace(new RegExp(t,"g"),"\\"+t)+t+"]"}).join("")},normalize:function(e,t){return i.stringify(Array.isArray(e)?e:i.parse(e),t)},registerModule:function(e){e.module("ObjectPath",[]).provider("ObjectPath",function(){this.parse=i.parse,this.stringify=i.stringify,this.normalize=i.normalize,this.$get=function(){return i}})}};void 0!==(n=function(){return{ObjectPath:i}}.call(t,r,t,e))&&(e.exports=n)}()},function(e,t){e.exports=tv4},function(e,t,r){e.exports=r(4)}])}).call(t,r(2),r(19).setImmediate)},function(e,t){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(r=window)}e.exports=r},,function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=(r.n(n),r(0)),i=r.n(o),a=r(14),s=r(12),u=r(13),c=r(15),f=r(16),l=r(7),p=r(8),d=r(10),h=r(6),m=r(9),v=r(11),y=r(5),g=[];try{i.a.module("ngSanitize"),g.push("ngSanitize")}catch(e){}try{i.a.module("ui.sortable"),g.push("ui.sortable")}catch(e){}try{i.a.module("angularSpectrumColorpicker"),g.push("angularSpectrumColorpicker")}catch(e){}i.a.module("schemaForm",g).provider("sfPath",f.a).provider("sfBuilder",["sfPathProvider",a.a]).provider("schemaFormDecorators",["$compileProvider","sfPathProvider",s.a]).provider("sfErrorMessage",c.a).provider("schemaForm",["sfPathProvider",u.a]).factory("sfSelect",function(){return n.select}).factory("sfValidator",function(){return n.validate}).directive("sfChanged",l.a).directive("sfField",["$parse","$compile","$http","$templateCache","$interpolate","$q","sfErrorMessage","sfPath","sfSelect",p.a]).directive("sfMessage",["$injector","sfErrorMessage",d.a]).directive("sfNewArray",["sfSelect","sfPath","schemaForm",h.a]).directive("sfSchema",["$compile","$http","$templateCache","$q","schemaForm","schemaFormDecorators","sfSelect","sfPath","sfBuilder",v.a]).directive("schemaValidate",["sfValidator","$parse","sfSelect","$interpolate",y.a]).directive("sfKeyController",["schemaForm","sfPath",m.a])},function(e,t,r){"use strict";var n=r(0),o=r.n(n);t.a=function(e,t,r,n){return{restrict:"A",scope:!1,priority:500,require:"ngModel",link:function(t,i,a,s){t.$emit("schemaFormPropagateNgModelController",s);var u=null,c=t.$eval(a.schemaValidate),f="string"==typeof c.copyValueTo?[c.copyValueTo]:c.copyValueTo;f&&f.length&&s.$viewChangeListeners.push(function(){var e={model:t.model,form:c,arrayIndex:t.$index,arrayIndices:t.arrayIndices,path:t.path,$i:t.$i,$index:t.$index};o.a.forEach(f,function(o){var i=o.replace(/\[/g,"[{{ ").replace(/\]/g," }}]").replace(/^model\./,"");i=n(i)(e),r(i,t.model,s.$modelValue)})});var l=function(r,n){if(!c)return r;if(t.options&&!1===t.options.tv4Validation)return r;var o=e(c,r);Object.keys(s.$error).filter(function(e){return 0===e.indexOf("tv4-")}).forEach(function(e){s.$setValidity(e,!0)});{if(o.valid||s.$pristine&&!n)return r;if(s.$setValidity("tv4-"+o.error.code,!1),u=o.error,s.$validators)return r}};"function"==typeof c.ngModel&&c.ngModel(s),["$parsers","$viewChangeListeners","$formatters"].forEach(function(e){c[e]&&s[e]&&c[e].forEach(function(t){s[e].push(t)})}),["$validators","$asyncValidators"].forEach(function(e){c[e]&&s[e]&&o.a.forEach(c[e],function(r,n){s[e][n]=function(e,n){return r(e,n,t.model,c)}})}),s.$parsers.push(l),s.$validators&&(s.$validators.schemaForm=function(){return!Object.keys(s.$error).some(function(e){return"schemaForm"!==e})});var p=c.schema;t.validateField=function(e,t){var r=void 0===e;(r||s.$$parentForm.$name===e)&&((r||p&&-1!==p.type.indexOf("array"))&&l(s.$modelValue,t),s.$setDirty?(s.$setDirty(),s.$setViewValue(s.$viewValue),s.$commitViewValue(),"checkbox"===c.type?c.required&&void 0===s.$modelValue&&s.$setValidity("tv4-302",!1):c.required&&s.$isEmpty(s.$modelValue)&&s.$setValidity("tv4-302",!1)):s.$setViewValue(s.$viewValue))};var d=!0;s.$formatters.push(function(e){return!s.$pristine||!d||t.options&&!0===t.options.validateOnRender?(l(s.$modelValue),e):(d=!1,e)}),t.$on("schemaFormValidate",function(e,r){t.validateField(r,!0)}),t.schemaError=function(){return u}}}}},function(e,t,r){"use strict";var n=r(0),o=r.n(n),i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.a=function(e,t,r){return{scope:!0,controller:["$scope",function(e){this.key=e.form&&e.form.key?e.form.key.splice(0,-2):[]}],link:function(n,a,s){n.min=0,n.trackBy=function(e,t){return e&&"object"===(void 0===e?"undefined":i(e))?e:t},n.modelArray=n.$eval(s.sfNewArray);var u=function(){n.modelArray=n.$eval(s.sfNewArray),n.ngModel&&n.ngModel.$pristine&&n.firstDigest&&(!n.options||!0!==n.options.validateOnRender)||n.validateField&&n.validateField()},c=function(){n.form&&n.form.onChange&&(o.a.isFunction(n.form.onChange)?n.form.onChange(n.modelArray,n.form):n.evalExpr(n.form.onChange,{modelValue:n.modelArray,form:n.form}))},f=function(){var r=n.modelArray;if(!r){var o=t.parse(s.sfNewArray);r=[],e(o,n,r),n.modelArray=r}return r},l=n.$watch("form",function(e){if(e){if(e.titleMap||!0===e.startEmpty||n.modelArray&&0!==n.modelArray.length||n.appendToArray(),n.$watch(function(e){return JSON.stringify(e.modelArray)},function(){u(),c()}),e.titleMap&&e.titleMap.length>0){n.titleMapValues=[];var t=function(t){n.titleMapValues=[],t=t||[],e.titleMap.forEach(function(e){n.titleMapValues.push(-1!==t.indexOf(e.value))})};t(n.modelArray),n.$watchCollection("modelArray",t),n.$watchCollection("titleMapValues",function(t,r){if(t&&t!==r){var o=f();e.titleMap.forEach(function(e,r){var n=o.indexOf(e.value);-1===n&&t[r]&&o.push(e.value),-1===n||t[r]||o.splice(n,1)}),n.validateField&&n.validateField()}})}l()}});n.appendToArray=function(){var t,i=f();if(n.form&&n.form.schema&&n.form.schema.items){var a=n.form.schema.items;a.type&&-1!==a.type.indexOf("object")?(t={},n.options&&!1===n.options.setSchemaDefaults||(t=o.a.isDefined(a.default)?a.default:t)&&r.traverseSchema(a,function(r,n){o.a.isDefined(r.default)&&e(n,t,r.default)})):(a.type&&(-1!==a.type.indexOf("array")?t=[]:-1===a.type.indexOf("string")&&-1===a.type.indexOf("number")||(t="")),n.options&&!1===n.options.setSchemaDefaults||(t=a.default||t))}return i.push(t),i},n.deleteFromArray=function(e){var t=n.modelArray.indexOf(e),r=n.modelArray;return r&&r.splice(t,1),e.$$hashKey&&(n.destroyed=e.$$hashKey),r};var p=function(e){return function(t){t.key&&(t.key[t.key.indexOf("")]=e)}},d={};n.copyWithIndex=function(e){var t=n.form;if(!d[e]){var i=t.items[0];if(t.items.length>1&&(i={type:"section",items:t.items.map(function(e){return e.ngModelOptions=t.ngModelOptions,o.a.isUndefined(e.readonly)&&(e.readonly=t.readonly),e})}),i){var a=o.a.copy(i);a.arrayIndex=e,r.traverseForm(a,p(e)),d[e]=a}}return d[e]}}}}},function(e,t,r){"use strict";var n=r(0),o=r.n(n);t.a=function(){return{require:"ngModel",restrict:"AC",scope:!1,link:function(e,t,r,n){var i=e.$eval(r.sfChanged);i&&i.onChange&&n.$viewChangeListeners.push(function(){o.a.isFunction(i.onChange)?i.onChange(n.$modelValue,i):e.evalExpr(i.onChange,{modelValue:n.$modelValue,form:i,arrayIndex:e.$index,arrayIndices:e.arrayIndices,path:e.path,$i:e.$i,$index:e.$index})})}}}},function(e,t,r){"use strict";var n=r(0),o=r.n(n),i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.a=function(e,t,r,n,a,s,u,c,f){var l={COMPLETE:"*",PATH:"string",INDICES:"number"};return{restrict:"AE",replace:!1,transclude:!1,scope:!0,require:["^sfSchema","?^form","?^^sfKeyController"],link:{pre:function(e,t,r,n){var o=n[0];n[1],n[2];e.$on("schemaFormPropagateNgModelController",function(t,r){t.stopPropagation(),t.preventDefault(),e.ngModel=r}),e.initialForm=Object.assign({},o.lookup["f"+r.sfField]),e.form=o.lookup["f"+r.sfField]},post:function(e,t,r,n){var s=n[0],p=n[1];n[2];e.getKey=function(t){var r=t||l.COMPLETE,n=e.parentKey?e.parentKey.slice(0,e.parentKey.length-1):[];if(e.completeKey!==e.form.key&&("number"==typeof e.$index&&(n=n.concat(e.$index)),e.form.key&&e.form.key.length))if("number"==typeof n[n.length-1]&&e.form.key.length>=1){var o=e.form.key.length-n.length;e.completeKey=o>0?n.concat(e.form.key.slice(-o)):n}else e.completeKey=e.form.key.slice();if(Array.isArray(e.completeKey))return r===l.COMPLETE?e.completeKey:e.completeKey.reduce(function(e,t,n){return-1!==[r].indexOf(void 0===t?"undefined":i(t))?e.concat(t):e},[])},e.form.key&&(e.form.key=e.completeKey=e.getKey()),e.showTitle=function(){return e.form&&!0!==e.form.notitle&&e.form.title},e.fieldId=function(t,r){var n=r||!1,o=t&&p&&p.$name?p.$name:void 0,i=e.completeKey;return Array.isArray(i)?c.name(i,"-",o,n):""},e.listToCheckboxValues=function(e){var t={};return o.a.forEach(e,function(e){t[e]=!0}),t},e.checkboxValuesToList=function(e){var t=[];return o.a.forEach(e,function(e,r){e&&t.push(r)}),t},e.buttonClick=function(t,r){o.a.isFunction(r.onClick)?r.onClick(t,r):o.a.isString(r.onClick)&&(s?s.evalInParentScope(r.onClick,{$event:t,form:r}):e.$eval(r.onClick,{$event:t,form:r}))},e.evalExpr=function(t,r){return s?s.evalInParentScope(t,r):e.$eval(t,r)},e.evalInScope=function(t,r){if(t)return e.$eval(t,r)},e.interp=function(e,t){return e&&a(e)(t)},e.hasSuccess=function(){return!!e.ngModel&&(e.options&&e.options.pristine&&!1===e.options.pristine.success?e.ngModel.$valid&&!e.ngModel.$pristine&&!e.ngModel.$isEmpty(e.ngModel.$modelValue):e.ngModel.$valid&&(!e.ngModel.$pristine||!e.ngModel.$isEmpty(e.ngModel.$modelValue)))},e.hasError=function(){return!!e.ngModel&&(e.options&&e.options.pristine&&!1===e.options.pristine.errors?e.ngModel.$invalid&&!e.ngModel.$pristine:e.ngModel.$invalid)},e.errorMessage=function(t){return u.interpolate(t&&t.code+""||"default",e.ngModel&&e.ngModel.$modelValue||"",e.ngModel&&e.ngModel.$viewValue||"",e.form,e.options&&e.options.validationMessage)},e.form.htmlClass=e.form.htmlClass||"",e.idClass=e.fieldId(!1)+" "+e.fieldId(!1,!0);var d=e.form;d.key&&(e.$on("schemaForm.error."+d.key.join("."),function(t,r,n,o,i){i=o,!0!==n&&!1!==n||(o=n,n=void 0),void 0!=i&&e.ngModel.$$parentForm.$name!==i||e.ngModel&&r&&(e.ngModel.$setDirty?e.ngModel.$setDirty():(e.ngModel.$dirty=!0,e.ngModel.$pristine=!1),n&&(d.validationMessage||(d.validationMessage={}),d.validationMessage[r]=n),e.ngModel.$setValidity(r,!0===o),!0===o&&(e.ngModel.$validate(),e.$broadcast("schemaFormValidate")))}),e.$on("$destroy",function(){var t=e.getKey();"number"==typeof e.arrayIndex&&e.arrayIndex;if(!e.externalDestructionInProgress){var r=d.destroyStrategy||e.options&&e.options.destroyStrategy||"remove";if(t&&"retain"!==r){var n=e.model;if(t.length>1&&(n=f(t.slice(0,t.length-1),n)),n&&e.destroyed&&n.$$hashKey&&n.$$hashKey!==e.destroyed)return;if(void 0===n)return;var o=d.schema&&d.schema.type||"";"empty"===r&&-1!==o.indexOf("string")?n[t.slice(-1)]="":"empty"===r&&-1!==o.indexOf("object")?n[t.slice(-1)]={}:"empty"===r&&-1!==o.indexOf("array")?n[t.slice(-1)]=[]:"null"===r?n[t.slice(-1)]=null:delete n[t.slice(-1)]}}}))}}}}},function(e,t,r){"use strict";t.a=function(e,t){return{scope:!0,require:["?^^sfNewArray"],link:{pre:function(e,r,n,o){e.parentKey=e.parentKey||[];var i=t.parse(n.sfParentKey),a=i.length-e.parentKey.length;i.length>1&&(i=i.splice(-a)),e.parentKey=e.parentKey.concat(i,Number(n.sfIndex)),e.arrayIndex=Number(n.sfIndex),e.arrayIndices=e.arrayIndices||[],e.arrayIndices=e.arrayIndices.concat(e.arrayIndex),e.$i=e.arrayIndices,e.path=function(t){var r=-1;return t=t.replace(/\[\]/gi,function(t){return r++,"["+e.$i[r]+"]"}),e.evalExpr(t,e)}}}}}},function(e,t,r){"use strict";var n=r(0),o=r.n(n);t.a=function(e,t){var r=e.has("$sanitize")?e.get("$sanitize"):function(e){return e};return{scope:!1,restrict:"EA",link:function(e,n,i){var a="";i.sfMessage&&e.$watch(i.sfMessage,function(t){t&&(a=r(t),c(!!e.ngModel))});var s,u=function(e){e!==s&&(n.html(e),s=e)},c=function(r){if(r)if(e.hasError()){var n=[];o.a.forEach(e.ngModel&&e.ngModel.$error,function(e,t){e&&n.push(t)}),n=n.filter(function(e){return"schemaForm"!==e});var i=n[0];u(i?t.interpolate(i,e.ngModel.$modelValue,e.ngModel.$viewValue,e.form,e.options&&e.options.validationMessage):a)}else u(a);else u(a)};c();var f=e.$watch("ngModel",function(e){e&&(e.$parsers.push(function(e){return c(!0),e}),e.$formatters.push(function(e){return c(!0),e}),f())});e.$watchCollection("ngModel.$error",function(){c(!!e.ngModel)})}}}},function(e,t,r){"use strict";var n=r(0),o=r.n(n);t.a=function(e,t,r,n,i,a,s,u,c){return{scope:{schema:"=sfSchema",initialForm:"=sfForm",model:"=sfModel",options:"=sfOptions"},controller:["$scope",function(e){this.$onInit=function(){this.evalInParentScope=function(t,r){return e.$parent.$eval(t,r)};var t=this;e.lookup=function(e){return e&&(t.lookup=e),t.lookup}},1===o.a.version.major&&o.a.version.minor<5&&this.$onInit()}],replace:!1,restrict:"A",transclude:!0,require:"?form",link:function(u,f,l,p,d){u.formCtrl=p;var h={};d(u,function(e){if(e.addClass("schema-form-ignore"),f.prepend(e),f[0].querySelectorAll){var t=f[0].querySelectorAll("[ng-model]");if(t)for(var r=0;r<t.length;r++){var n=t[r].getAttribute("ng-model");h[n.substring(n.indexOf(".")+1)]=!0}}});var m,v={};u.resolveReferences=function(e,t){i.jsonref(e).then(function(e){u.render(e,t)}).catch(function(e){new Error(e)})},u.render=function(e,o){var a=[],s=i.merge(e,o,void 0,h,u.options,void 0,a);a.length>0?n.all(a.map(function(e){return t.get(e.templateUrl,{cache:r}).then(function(t){e.template=t.data})})).then(function(){u.internalRender(e,o,s)}):u.internalRender(e,o,s)},u.internalRender=function(t,r,n){m&&(u.externalDestructionInProgress=!0,m.$destroy(),u.externalDestructionInProgress=!1),m=u.$new(),m.schemaForm={form:n,schema:t},Array.prototype.forEach.call(f.children(),function(e){var t=o.a.element(e);!1===t.hasClass("schema-form-ignore")&&t.remove()});for(var p={},d=f[0].querySelectorAll("*[sf-insert-field]"),h=0;h<d.length;h++)p[d[h].getAttribute("sf-insert-field")]=d[h];var v=a.decorator(l.sfUseDecorator),y=Object.create(null);u.lookup(y),f[0].appendChild(c.build(n,v,p,y)),m.firstDigest=!0,setTimeout(function(){m.firstDigest=!1,u.$apply()},0),e(f.children())(m),u.options&&!1===u.options.setSchemaDefaults||i.traverseSchema(t,function(e,t){if(o.a.isDefined(e.default)){var r=s(t,u.model);o.a.isUndefined(r)&&s(t,u.model,e.default)}}),u.$emit("sf-render-finished",f)};var y=["*"];u.$watch(function(){var e=u.schema,t=u.initialForm||y;t&&e&&e.type&&(v.form!==t||v.schema!==e)&&((!e.properties||0===Object.keys(e.properties).length)&&(t.indexOf("*")||t.indexOf("...")),v.schema=e,v.form=t,u.resolveReferences(e,t))}),u.$on("schemaFormRedraw",function(){var e=u.schema,t=u.initialForm?o.a.copy(u.initialForm):["*"];e&&u.resolveReferences(e,t)}),u.$on("$destroy",function(){u.externalDestructionInProgress=!0}),u.evalExpr=function(e,t){return u.$parent.$eval(e,t)}}}}},function(e,t,r){"use strict";var n=r(0),o=r.n(n);t.a=function(e,t){var r="",n={},i=function(e,t){"sfDecorator"===e&&(e=r);var o=n[e];return o[t.type]?o[t.type].template:o.default.template},a=function(r){e.directive(r,["$parse","$compile","$http","$templateCache","$interpolate","$q","sfErrorMessage","sfPath","sfSelect",function(e,n,a,s,u,c,f,l,p){return{restrict:"AE",replace:!1,transclude:!1,scope:!0,require:["?^sfSchema","?^form"],link:function(e,d,h,m){var v=m[0],y=m[1];e.$on("schemaFormPropagateNgModelController",function(t,r){t.stopPropagation(),t.preventDefault(),e.ngModel=r}),e.showTitle=function(){return e.form&&!0!==e.form.notitle&&e.form.title},e.fieldId=function(t,r){var n=e.parentKey||[];if(e.form.key){if("number"==typeof n[n.length-1]){var o=n.concat(e.form.key.slice(-1)),i=t&&y&&y.$name?y.$name:void 0;return l.name(o,"-",i,r)}var i=t&&y&&y.$name?y.$name:void 0;return l.name(e.form.key,"-",i,r)}return""},e.listToCheckboxValues=function(e){var t={};return o.a.forEach(e,function(e){t[e]=!0}),t},e.checkboxValuesToList=function(e){var t=[];return o.a.forEach(e,function(e,r){e&&t.push(r)}),t},e.buttonClick=function(t,r){o.a.isFunction(r.onClick)?r.onClick(t,r):o.a.isString(r.onClick)&&(v?v.evalInParentScope(r.onClick,{$event:t,form:r}):e.$eval(r.onClick,{$event:t,form:r}))},e.evalExpr=function(t,r){return v?v.evalInParentScope(t,r):e.$eval(t,r)},e.evalInScope=function(t,r){if(t)return e.$eval(t,r)},e.interp=function(e,t){return e&&u(e)(t)},e.hasSuccess=function(){return!!e.ngModel&&(e.options&&e.options.pristine&&!1===e.options.pristine.success?e.ngModel.$valid&&!e.ngModel.$pristine&&!e.ngModel.$isEmpty(e.ngModel.$modelValue):e.ngModel.$valid&&(!e.ngModel.$pristine||!e.ngModel.$isEmpty(e.ngModel.$modelValue)))},e.hasError=function(){return!!e.ngModel&&(e.ngModel.$invalid&&!e.ngModel.$pristine)},e.errorMessage=function(t){return f.interpolate(t&&t.code+""||"default",e.ngModel&&e.ngModel.$modelValue||"",e.ngModel&&e.ngModel.$viewValue||"",e.form,e.options&&e.options.validationMessage)};var g=e.$watch(h.form,function(u){if(u){u.ngModelOptions=u.ngModelOptions||{},e.form=u;var f;if("template"===u.type&&u.template)f=c.when(u.template);else{var h="template"===u.type?u.templateUrl:i(r,u);f=a.get(h,{cache:s}).then(function(e){return e.data})}f.then(function(r){if(u.key){var i=u.key?t.stringify(u.key).replace(/"/g,"""):"";r=r.replace(/\$\$value\$\$/g,"model"+("["!==i[0]?".":"")+i)}if(d.html(r),u.condition){var a='evalExpr(form.condition,{ model: model, "arrayIndex": arrayIndex})';u.key&&(a='evalExpr(form.condition, {model: model, "arrayIndex": arrayIndex, "modelValue": model'+l.stringify(u.key)+"})"),o.a.forEach(d.children(),function(e){var t=e.getAttribute("ng-if");e.setAttribute("ng-if",t?"("+t+") || ("+a+")":a)})}n(d.contents())(e)}),u.key&&(e.$on("schemaForm.error."+u.key.join("."),function(t,r,n,o,i){i=o,!0!==n&&!1!==n||(o=n,n=void 0),void 0!=i&&e.ngModel.$$parentForm.$name!==i||void 0!=i&&e.ngModel.$$parentForm.$name!==i||e.ngModel&&r&&(e.ngModel.$setDirty?e.ngModel.$setDirty():(e.ngModel.$dirty=!0,e.ngModel.$pristine=!1),n&&(u.validationMessage||(u.validationMessage={}),u.validationMessage[r]=n),e.ngModel.$setValidity(r,!0===o),!0===o&&(e.ngModel.$validate(),e.$broadcast("schemaFormValidate")))}),e.$on("$destroy",function(){if(!e.externalDestructionInProgress){var t=u.destroyStrategy||e.options&&e.options.destroyStrategy||"remove";if(u.key&&"retain"!==t){var r=e.model;if(u.key.length>1&&(r=p(u.key.slice(0,u.key.length-1),r)),void 0===r)return;var n=u.schema&&u.schema.type||"";"empty"===t&&-1!==n.indexOf("string")?r[u.key.slice(-1)]="":"empty"===t&&-1!==n.indexOf("object")?r[u.key.slice(-1)]={}:"empty"===t&&-1!==n.indexOf("array")?r[u.key.slice(-1)]=[]:"null"===t?r[u.key.slice(-1)]=null:delete r[u.key.slice(-1)]}}})),g()}})}}}])},s=function(t,r,n){n=!!o.a.isDefined(n)&&n,e.directive("sf"+o.a.uppercase(t[0])+t.substr(1),function(){return{restrict:"EAC",scope:!0,replace:!0,transclude:n,template:'<sf-decorator form="form"></sf-decorator>',link:function(e,r,n){var i={items:"c",titleMap:"c",schema:"c"},a={type:t},s=!0;o.a.forEach(n,function(t,r){if("$"!==r[0]&&0!==r.indexOf("ng")&&"sfField"!==r){var u=function(t){o.a.isDefined(t)&&t!==a[r]&&(a[r]=t,s&&a.type&&(a.key||o.a.isUndefined(n.key))&&(e.form=a,s=!1))};"model"===r?e.$watch(t,function(t){t&&e.model!==t&&(e.model=t)}):"c"===i[r]?e.$watchCollection(t,u):n.$observe(r,u)}})}}})};this.createDecorator=function(e,t){n[e]={__name:e},o.a.forEach(t,function(t,r){n[e][r]={template:t,replace:!1,builder:[]}}),n[r]||(r=e),a(e)},this.defineDecorator=function(e,t){n[e]={__name:e},o.a.forEach(t,function(t,r){t.builder=t.builder||[],t.replace=!o.a.isDefined(t.replace)||t.replace,n[e][r]=t}),n[r]||(r=e),a(e)},this.createDirective=s,this.createDirectives=function(e){o.a.forEach(e,function(e,t){s(t)})},this.decorator=function(e){return e=e||r,n[e]},this.addMapping=function(e,t,r,o,i){n[e]&&(n[e][t]={template:r,builder:o,replace:!!i})},this.defineAddOn=function(e,t,r,o){n[e]&&(n[e][t]={template:r,builder:o,replace:!0})},this.$get=function(){return{decorator:function(e){return n[e]||n[r]},defaultDecorator:r}},a("sfDecorator")}},function(e,t,r){"use strict";var n=r(0),o=(r.n(n),r(1));r.n(o);t.a=function(){var e=function(e){return e},t=o.schemaDefaults.createDefaults();this.defaults=t,this.stdFormObj=o.schemaDefaults.stdFormObj,this.defaultFormDefinition=o.schemaDefaults.defaultFormDefinition,this.postProcess=function(t){e=t},this.appendRule=function(e,t){this.defaults[e]||(this.defaults[e]=[]),this.defaults[e].push(t)},this.prependRule=function(e,t){this.defaults[e]||(this.defaults[e]=[]),this.defaults[e].unshift(t)},this.createStandardForm=o.schemaDefaults.stdFormObj,this.$get=function(){var t={},n=this.defaults;return t.jsonref=o.jsonref,t.defaults=function(e,t,r,i){var a=t||n;return o.schemaDefaults.defaultForm(e,a,r,i)},t.merge=function(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["*"],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.typeDefault,s=arguments[3],u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},c=arguments.length>5&&void 0!==arguments[5]&&arguments[5],f=arguments[6],l=r.i(o.merge)(n,i,a,s,u,c,f);return e(l)},t.typeDefault=n,t.traverseSchema=o.traverseSchema,t.traverseForm=o.traverseForm,t}}},function(e,t,r){"use strict";t.a=function(e){var t=function(e,t){return t=t||"_",e.replace(/[A-Z]/g,function(e,r){return(r?t:"")+e.toLowerCase()})},r=0;"firstElementChild"in document.createDocumentFragment()||Object.defineProperty(DocumentFragment.prototype,"firstElementChild",{get:function(){for(var e,t=this.childNodes,r=0,n=t.length;r<n;++r)if(e=t[r],1===e.nodeType)return e;return null}});var n={sfField:function(e){e.fieldFrag.firstElementChild.setAttribute("sf-field",r),e.lookup["f"+r]=e.form,r++},ngModel:function(t){if(t.form.key){var r=t.form.key;t.state.keyRedaction&&(r=r.slice(t.state.keyRedaction));var n;if(t.state.modelValue)n=t.state.modelValue;else{var o=e.stringify(r).replace(/"/g,""");n=t.state.modelName||"model",o&&(n+=("["!==o[0]?".":"")+o)}for(var i=t.fieldFrag.querySelectorAll("[sf-field-model]"),a=0;a<i.length;a++){var s=i[a],u=s.getAttribute("sf-field-model");if(u&&""!==u)if("replaceAll"===u)for(var c=s.attributes,f=0;f<c.length;f++)c[f].value&&-1!==c[f].value.indexOf("$$value")&&(c[f].value=c[f].value.replace(/\$\$value\$\$/g,n));else{var l=s.getAttribute(u);l&&l.indexOf("$$value$$")?s.setAttribute(u,l.replace(/\$\$value\$\$/g,n)):s.setAttribute(u,n)}else s.setAttribute("ng-model",n)}}},simpleTransclusion:function(e){var t=e.build(e.form.items,e.path+".items",e.state);e.fieldFrag.firstChild.appendChild(t)},ngModelOptions:function(e){e.form.ngModelOptions&&Object.keys(e.form.ngModelOptions).length>0&&e.fieldFrag.firstChild.setAttribute("ng-model-options",JSON.stringify(e.form.ngModelOptions))},transclusion:function(e){var t=e.fieldFrag.querySelectorAll("[sf-field-transclude]");if(t.length)for(var r=0;r<t.length;r++){var n=t[r],o=n.getAttribute("sf-field-transclude")||"items",i=e.form[o];if(i){var a=e.build(i,e.path+"."+o,e.state);n.appendChild(a)}}},condition:function(t){var r="",n="undefined",o="";if(t.form.condition){t.form.key&&(r=e.stringify(t.form.key),n="model"+("["===r[0]?"":".")+r);for(var i="evalExpr("+t.path+'.condition, { model: model, "arrayIndex": $index, "arrayIndices": arrayIndices, "path": path, "$i": $i, "$index": $index, "modelValue": '+n+"})",a=t.fieldFrag.children||t.fieldFrag.childNodes,s=0;s<a.length;s++){var u=a[s];u.hasAttribute&&u.hasAttribute("ng-if")&&(o=u.getAttribute("ng-if")),u.setAttribute&&u.setAttribute("ng-if",o?"("+o+") || ("+i+")":i)}}},array:function(t){var r=t.fieldFrag.querySelector("[schema-form-array-items]");if(t.form.key){t.form.key.filter(function(e){return""===e}).length}if(r){var n=angular.copy(t.state);if(n.keyRedaction=0,n.keyRedaction+=t.form.key.length+1,t.form.schema&&t.form.schema.items&&t.form.schema.items.type&&-1===t.form.schema.items.type.indexOf("object")&&-1===t.form.schema.items.type.indexOf("array")){e.stringify(t.form.key).replace(/"/g,""");n.modelValue="modelArray[$index]"}else n.modelName="item";n.arrayCompatFlag=!0;var o=t.build(t.form.items,t.path+".items",n);r.appendChild(o)}},numeric:function(e){var t=e.fieldFrag.querySelector("input"),r=e.form.maximum||!1,n=e.form.exclusiveMaximum||!1,o=e.form.minimum||!1,i=e.form.exclusiveMinimum||!1,a=e.form.multipleOf||!1;t&&(!1!==a&&t.setAttribute("step",a),!1!==r&&(!1!==n&&!1!==a&&(r-=a),t.setAttribute("max",r)),!1!==o&&(!1!==i&&!1!==a&&(o+=a),t.setAttribute("min",o)))}};this.builders=n;var o=[n.sfField,n.ngModel,n.ngModelOptions,n.condition];this.stdBuilders=o,this.$get=["$templateCache","schemaFormDecorators","sfPath",function(e,r,i){var a=function(e,t){if(e.key){var r=t[i.stringify(e.key)];if(r){for(;r.firstChild;)r.removeChild(r.firstChild);return r}}},s=function e(r,n,o,i,s,u,c){u=u||{},u=u||{},c=c||Object.create(null),s=s||"schemaForm.form";var f=document.createDocumentFragment();return r.reduce(function(r,f,l){if(!f.type)return r;var p=n[f.type]||n.default;if(p.replace){var d;u.arrayCompatFlag=!1;var h=document.createElement("div"),m=o(f,p)||o(f,n.default);for(h.innerHTML=m,d=document.createDocumentFragment();h.childNodes.length>0;)d.appendChild(h.childNodes[0]);var v={fieldFrag:d,form:f,lookup:c,state:u,path:s+"["+l+"]",build:function(t,r,a){return e(t,n,o,i,r,a,c)}},y=f.builder||p.builder;"function"==typeof y?y(v):y.forEach(function(e){e(v)}),(a(f,i)||r).appendChild(d)}else{var g=document.createElement(t(n.__name,"-"));u.arrayCompatFlag?g.setAttribute("form","copyWithIndex($index)"):g.setAttribute("form",s+"["+l+"]"),(a(f,i)||r).appendChild(g)}return r},f),f};return{build:function(t,r,n,o){return s(t,r,function(t,r){return"template"===t.type?t.template:e.get(r.template)},n,void 0,void 0,o)},builder:n,stdBuilders:o,internalBuild:s}}]}},function(e,t,r){"use strict";var n=r(0),o=r.n(n);t.a=function(){var e={default:"Field does not validate",0:"Invalid type, expected {{schema.type}}",1:"No enum match for: {{viewValue}}",10:'Data does not match any schemas from "anyOf"',11:'Data does not match any schemas from "oneOf"',12:'Data is valid against more than one schema from "oneOf"',13:'Data matches schema from "not"',100:"Value is not a multiple of {{schema.multipleOf}}",101:"{{viewValue}} is less than the allowed minimum of {{schema.minimum}}",102:"{{viewValue}} is equal to the exclusive minimum {{schema.minimum}}",103:"{{viewValue}} is greater than the allowed maximum of {{schema.maximum}}",104:"{{viewValue}} is equal to the exclusive maximum {{schema.maximum}}",105:"Value is not a valid number",200:"String is too short ({{viewValue.length}} chars), minimum {{schema.minLength}}",201:"String is too long ({{viewValue.length}} chars), maximum {{schema.maxLength}}",202:"String does not match pattern: {{schema.pattern}}",300:"Too few properties defined, minimum {{schema.minProperties}}",301:"Too many properties defined, maximum {{schema.maxProperties}}",302:"Required",303:"Additional properties not allowed",304:"Dependency failed - key must exist",400:"Array is too short ({{value.length}}), minimum {{schema.minItems}}",401:"Array is too long ({{value.length}}), maximum {{schema.maxItems}}",402:"Array items are not unique",403:"Additional items not allowed",500:"Format validation failed",501:'Keyword failed: "{{title}}"',600:"Circular $refs",1e3:"Unknown property (not in schema)"};e.number=e[105],e.required=e[302],e.min=e[101],e.max=e[103],e.maxlength=e[201],e.minlength=e[200],e.pattern=e[202],this.setDefaultMessages=function(t){e=t},this.getDefaultMessages=function(){return e},this.setDefaultMessage=function(t,r){e[t]=r},this.$get=["$interpolate",function(t){var r={};return r.defaultMessages=e,r.interpolate=function(r,n,i,a,s){s=s||{};var u=a.validationMessage||{};0===r.indexOf("tv4-")&&(r=r.substring(4));var c=u.default||s.default||"";[u,s,e].some(function(e){return o.a.isString(e)||o.a.isFunction(e)?(c=e,!0):e&&e[r]?(c=e[r],!0):void 0});var f={error:r,value:n,viewValue:i,form:a,schema:a.schema,title:a.title||a.schema&&a.schema.title};return o.a.isFunction(c)?c(f):t(c)(f)},r}]}},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=r(1),i=(r.n(o),r(0)),a=(r.n(i),function(){function e(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)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()),s=function(){function e(){n(this,e),this.name=o.sfPath.name,this.parse=o.sfPath.parse,this.stringify=o.sfPath.stringify,this.normalize=o.sfPath.normalize}return a(e,[{key:"$get",value:function(){return o.sfPath}}]),e}();t.a=s},function(e,t){function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function o(e){if(f===setTimeout)return setTimeout(e,0);if((f===r||!f)&&setTimeout)return f=setTimeout,setTimeout(e,0);try{return f(e,0)}catch(t){try{return f.call(null,e,0)}catch(t){return f.call(this,e,0)}}}function i(e){if(l===clearTimeout)return clearTimeout(e);if((l===n||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(e);try{return l(e)}catch(t){try{return l.call(null,e)}catch(t){return l.call(this,e)}}}function a(){m&&d&&(m=!1,d.length?h=d.concat(h):v=-1,h.length&&s())}function s(){if(!m){var e=o(a);m=!0;for(var t=h.length;t;){for(d=h,h=[];++v<t;)d&&d[v].run();v=-1,t=h.length}d=null,m=!1,i(e)}}function u(e,t){this.fun=e,this.array=t}function c(){}var f,l,p=e.exports={};!function(){try{f="function"==typeof setTimeout?setTimeout:r}catch(e){f=r}try{l="function"==typeof clearTimeout?clearTimeout:n}catch(e){l=n}}();var d,h=[],m=!1,v=-1;p.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];h.push(new u(e,t)),1!==h.length||m||o(s)},u.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=c,p.addListener=c,p.once=c,p.off=c,p.removeListener=c,p.removeAllListeners=c,p.emit=c,p.binding=function(e){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(e){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(e,t,r){(function(e,t){!function(e,r){"use strict";function n(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r<t.length;r++)t[r]=arguments[r+1];var n={callback:e,args:t};return c[u]=n,s(u),u++}function o(e){delete c[e]}function i(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(r,n)}}function a(e){if(f)setTimeout(a,0,e);else{var t=c[e];if(t){f=!0;try{i(t)}finally{o(e),f=!1}}}}if(!e.setImmediate){var s,u=1,c={},f=!1,l=e.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(e);p=p&&p.setTimeout?p:e,"[object process]"==={}.toString.call(e.process)?function(){s=function(e){t.nextTick(function(){a(e)})}}():function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?function(){var t="setImmediate$"+Math.random()+"$",r=function(r){r.source===e&&"string"==typeof r.data&&0===r.data.indexOf(t)&&a(+r.data.slice(t.length))};e.addEventListener?e.addEventListener("message",r,!1):e.attachEvent("onmessage",r),s=function(r){e.postMessage(t+r,"*")}}():e.MessageChannel?function(){var e=new MessageChannel;e.port1.onmessage=function(e){a(e.data)},s=function(t){e.port2.postMessage(t)}}():l&&"onreadystatechange"in l.createElement("script")?function(){var e=l.documentElement;s=function(t){var r=l.createElement("script");r.onreadystatechange=function(){a(t),r.onreadystatechange=null,e.removeChild(r),r=null},e.appendChild(r)}}():function(){s=function(e){setTimeout(a,0,e)}}(),p.setImmediate=n,p.clearImmediate=o}}("undefined"==typeof self?void 0===e?this:e:self)}).call(t,r(2),r(17))},function(e,t,r){function n(e,t){this._id=e,this._clearFn=t}var o=Function.prototype.apply;t.setTimeout=function(){return new n(o.call(setTimeout,window,arguments),clearTimeout)},t.setInterval=function(){return new n(o.call(setInterval,window,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},n.prototype.unref=n.prototype.ref=function(){},n.prototype.close=function(){this._clearFn.call(window,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},r(18),t.setImmediate=setImmediate,t.clearImmediate=clearImmediate},,function(e,t,r){r(1),e.exports=r(4)}]);