apprun 3.33.7 → 3.33.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/apprun-cli.js CHANGED
@@ -1,19 +1,102 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- 'use strict';
3
+ const { program } = require('commander');
4
+ const { existsSync, writeFileSync, mkdirSync } = require('fs');
5
+ const { resolve, dirname } = require('path');
6
+ const { red, green, yellow } = require('./cli/colors');
4
7
 
5
- import toYaml from './cli/export.js';
6
- import fromYaml from './cli/import.js';
8
+ const component_template = `import {app, Component} from 'apprun';
7
9
 
8
- const cmd = process.argv[2];
9
- const file = process.argv[3];
10
+ export default class #nameComponent extends Component {
11
+ state = '#name';
10
12
 
11
- if (cmd === 'export') {
12
- toYaml(file);
13
+ view = (state) => <>
14
+ <h1>{state}</h1>
15
+ </>;
16
+
17
+ update = {
18
+ '/#name': state => state,
19
+ }
20
+ }
21
+ `;
22
+
23
+ const test_template = `import app from 'apprun';
24
+ import #name from './#fn';
25
+
26
+ describe('component', () => {
27
+ it('should render state upon route event', () => {
28
+ const element = document.createElement('div');
29
+ const component = new #name().mount(element);
30
+ app.run('/#name');
31
+ expect(element.textContent).toBe('#name');
32
+ })
33
+ })
34
+ `;
35
+
36
+
37
+ program
38
+ .version('3.0.0')
39
+ .description('AppRun CLI')
40
+ .option('-i, --init', 'Initialize AppRun Project')
41
+ .option('-c, --component <name>', 'Create a component')
42
+ .option('-t, --test <name>', 'Create a component spec')
43
+ .option('-p, --pages [directory]', 'Create example pages')
44
+
45
+
46
+ program.parse(process.argv);
47
+
48
+ const options = program.opts();
49
+ if (options.init) {
50
+ console.log(`\nPlease use ${yellow('npm create apprun-app')} to create AppRun projects.\n`);
51
+ return;
13
52
  }
14
- else if (cmd === 'import') {
15
- fromYaml(file);
16
- } else {
17
- console.log('Usage: apprun-cli <export|import> <file>');
18
- console.log('> If you want to create an AppRun project. Please use npm create apprun-app instead.');
19
- }
53
+
54
+ function createTestFile(fn, name) {
55
+ const component_name = name || fn.split('/').pop();
56
+ const component_file = fn.split('/').pop();
57
+ const test = test_template
58
+ .replace(/#name/g, component_name)
59
+ .replace(/#fn/g, component_file);
60
+ writeFile(fn + '.spec.tsx', test);
61
+ }
62
+
63
+ function createComponent(fn, name) {
64
+ if (!name) name = fn.split('/').pop();
65
+ const component = component_template.replace(/#name/g, name);
66
+ writeFile(fn + '.tsx', component);
67
+ }
68
+
69
+ const cwd = process.cwd();
70
+ const writeFile = (fn, text) => {
71
+ fn = resolve(cwd, fn);
72
+ const dir = dirname(fn);
73
+ if (!existsSync(dir)) {
74
+ mkdirSync(dir, { recursive: true });
75
+ console.log(yellow(`✔ ${dir}`));
76
+
77
+ }
78
+ if (existsSync(fn)) {
79
+ console.log(red(`✘ ${fn} exists`));
80
+ return;
81
+ }
82
+ writeFileSync(fn, text, 'utf8');
83
+ console.log(green(`✔ ${fn}`));
84
+ }
85
+
86
+ options.component && createComponent(options.component);
87
+ options.test && createTestFile(options.test);
88
+
89
+ if (options.pages) {
90
+ let pages = typeof options.pages === 'string' ? options.pages : 'pages';
91
+ pages = resolve(cwd, pages);
92
+ createComponent(`${pages}/Home/index`, 'Home');
93
+ createTestFile(`${pages}/Home/index`, 'Home');
94
+ createComponent(`${pages}/About/index`, 'About');
95
+ createTestFile(`${pages}/About/index`, 'About');
96
+ createComponent(`${pages}/Contact/index`, 'Contact');
97
+ createTestFile(`${pages}/Contact/index`, 'Contact');
98
+ }
99
+
100
+
101
+
102
+
package/apprun.d.ts CHANGED
@@ -87,6 +87,7 @@ declare module 'apprun' {
87
87
 
88
88
  export const app: IApp
89
89
  export default app;
90
+ export const App: IApp;
90
91
 
91
92
  export const ROUTER_EVENT: string;
92
93
  export const ROUTER_404_EVENT: string;
package/cli/colors.js ADDED
@@ -0,0 +1,69 @@
1
+ // ANSI escape codes for colors
2
+ const greenColor = "\x1b[32m";
3
+ const yellowColor = "\x1b[33m";
4
+ const redColor = "\x1b[31m";
5
+ const cyanColor = "\x1b[36m";
6
+ const blueColor = "\x1b[34m";
7
+ const magentaColor = "\x1b[35m";
8
+ const grayColor = "\x1b[90m";
9
+ const whiteColor = "\x1b[37m";
10
+ const blackColor = "\x1b[30m";
11
+ const resetColor = "\x1b[0m";
12
+
13
+ // Helper functions with tagged template literals
14
+ function green(strings, ...values) {
15
+ const text = String.raw({ raw: strings }, ...values);
16
+ return `${greenColor}${text}${resetColor}`;
17
+ }
18
+
19
+ function yellow(strings, ...values) {
20
+ const text = String.raw({ raw: strings }, ...values);
21
+ return `${yellowColor}${text}${resetColor}`;
22
+ }
23
+
24
+ function red(strings, ...values) {
25
+ const text = String.raw({ raw: strings }, ...values);
26
+ return `${redColor}${text}${resetColor}`;
27
+ }
28
+
29
+ function cyan(strings, ...values) {
30
+ const text = String.raw({ raw: strings }, ...values);
31
+ return `${cyanColor}${text}${resetColor}`;
32
+ }
33
+
34
+ function blue(strings, ...values) {
35
+ const text = String.raw({ raw: strings }, ...values);
36
+ return `${blueColor}${text}${resetColor}`;
37
+ }
38
+
39
+ function magenta(strings, ...values) {
40
+ const text = String.raw({ raw: strings }, ...values);
41
+ return `${magentaColor}${text}${resetColor}`;
42
+ }
43
+
44
+ function gray(strings, ...values) {
45
+ const text = String.raw({ raw: strings }, ...values);
46
+ return `${grayColor}${text}${resetColor}`;
47
+ }
48
+
49
+ function white(strings, ...values) {
50
+ const text = String.raw({ raw: strings }, ...values);
51
+ return `${whiteColor}${text}${resetColor}`;
52
+ }
53
+
54
+ function black(strings, ...values) {
55
+ const text = String.raw({ raw: strings }, ...values);
56
+ return `${blackColor}${text}${resetColor}`;
57
+ }
58
+
59
+ module.exports = {
60
+ green,
61
+ yellow,
62
+ red,
63
+ cyan,
64
+ blue,
65
+ magenta,
66
+ gray,
67
+ white,
68
+ black,
69
+ };
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see apprun-dev-tools.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.apprun=t():e.apprun=t()}(this,(()=>(()=>{"use strict";var e={752:(e,t,n)=>{n.d(t,{Z:()=>r});let i;const o="object"==typeof self&&self.self===self&&self||"object"==typeof n.g&&n.g.global===n.g&&n.g;o.app&&o._AppRunVersions?i=o.app:(i=new class{constructor(){this._events={}}on(e,t,n={}){this._events[e]=this._events[e]||[],this._events[e].push({fn:t,options:n})}off(e,t){const n=this._events[e]||[];this._events[e]=n.filter((e=>e.fn!==t))}find(e){return this._events[e]}run(e,...t){const n=this.getSubscribers(e,this._events);return console.assert(n&&n.length>0,"No subscriber for event: "+e),n.forEach((n=>{const{fn:i,options:o}=n;return o.delay?this.delay(e,i,t,o):Object.keys(o).length>0?i.apply(this,[...t,o]):i.apply(this,t),!n.options.once})),n.length}once(e,t,n={}){this.on(e,t,Object.assign(Object.assign({},n),{once:!0}))}delay(e,t,n,i){i._t&&clearTimeout(i._t),i._t=setTimeout((()=>{clearTimeout(i._t),Object.keys(i).length>0?t.apply(this,[...n,i]):t.apply(this,n)}),i.delay)}runAsync(e,...t){const n=this.getSubscribers(e,this._events);console.assert(n&&n.length>0,"No subscriber for event: "+e);const i=n.map((e=>{const{fn:n,options:i}=e;return Object.keys(i).length>0?n.apply(this,[...t,i]):n.apply(this,t)}));return Promise.all(i)}query(e,...t){return this.runAsync(e,...t)}getSubscribers(e,t){const n=t[e]||[];return t[e]=n.filter((e=>!e.options.once)),Object.keys(t).filter((t=>t.endsWith("*")&&e.startsWith(t.replace("*","")))).sort(((e,t)=>t.length-e.length)).forEach((i=>n.push(...t[i].map((t=>Object.assign(Object.assign({},t),{options:Object.assign(Object.assign({},t.options),{event:e})})))))),n}},o.app=i,o._AppRunVersions="AppRun-3");const r=i}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={exports:{}};return e[i](r,r.exports,n),r.exports}n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{n.r(i);var e=n(752);function t(e){return e.map((e=>r(e))).join("")}function o(e){for(var t in e)null==e[t]?delete e[t]:"object"==typeof e[t]&&o(e[t])}function r(e){if(!e)return"";if(e._$litType$)return e.toString();if(o(e),Array.isArray(e))return t(e);if("string"==typeof e)return e.startsWith("_html:")?e.substring(6):e;if(e.tag){const n=e.props?function(e){return Object.keys(e).map((t=>{return` ${"className"===t?"class":t}="${n=e[t],"object"==typeof n?Object.keys(n).map((e=>`${e}:${n[e]}`)).join(";"):n.toString()}"`;var n})).join("")}(e.props):"",i=e.children?t(e.children):"";return`<${e.tag}${n}>${i}</${e.tag}>`}return"object"==typeof e?JSON.stringify(e):void 0}const a=r;let l;function s(e){l=window.open("",e),l.document.write(`<html>\n <title>AppRun Analyzer | ${document.location.href}</title>\n <style>\n body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI" }\n </style>\n <body><pre>`)}function c(e){l.document.write(e+"\n")}function u(){l.document.write("</pre>\n </body>\n </html>"),l.document.close()}app.debug=!0;const p=e=>{c(`import ${e.constructor.name} from '../src/${e.constructor.name}'`),c(`describe('${e.constructor.name}', ()=>{`),e._actions.forEach((t=>{"."!==t.name&&(c(` it ('should handle event: ${t.name}', (done)=>{`),c(` const component = new ${e.constructor.name}().mount();`),c(` component.run('${t.name}');`),c(" setTimeout(() => {"),c(" //expect(?).toHaveBeenCalled();"),c(" //expect(component.state).toBe(?);"),c(" done();"),c(" })"))})),c("});")};let f=!1,d=[];app.on("debug",(e=>{f&&e.vdom&&(d.push(e),console.log(`* ${d.length} state(s) recorded.`))}));function h(e){return null==e}var g={isNothing:h,isObject:function(e){return"object"==typeof e&&null!==e},toArray:function(e){return Array.isArray(e)?e:h(e)?[]:[e]},repeat:function(e,t){var n,i="";for(n=0;n<t;n+=1)i+=e;return i},isNegativeZero:function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},extend:function(e,t){var n,i,o,r;if(t)for(n=0,i=(r=Object.keys(t)).length;n<i;n+=1)e[o=r[n]]=t[o];return e}};function m(e,t){var n="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(n+='in "'+e.mark.name+'" '),n+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(n+="\n\n"+e.mark.snippet),i+" "+n):i}function y(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=m(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}y.prototype=Object.create(Error.prototype),y.prototype.constructor=y,y.prototype.toString=function(e){return this.name+": "+m(this,e)};var b=y;function v(e,t,n,i,o){var r="",a="",l=Math.floor(o/2)-1;return i-t>l&&(t=i-l+(r=" ... ").length),n-i>l&&(n=i+l-(a=" ...").length),{str:r+e.slice(t,n).replace(/\t/g,"→")+a,pos:i-t+r.length}}function w(e,t){return g.repeat(" ",t-e.length)+e}var A=function(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var n,i=/\r?\n|\r|\0/g,o=[0],r=[],a=-1;n=i.exec(e.buffer);)r.push(n.index),o.push(n.index+n[0].length),e.position<=n.index&&a<0&&(a=o.length-2);a<0&&(a=o.length-1);var l,s,c="",u=Math.min(e.line+t.linesAfter,r.length).toString().length,p=t.maxLength-(t.indent+u+3);for(l=1;l<=t.linesBefore&&!(a-l<0);l++)s=v(e.buffer,o[a-l],r[a-l],e.position-(o[a]-o[a-l]),p),c=g.repeat(" ",t.indent)+w((e.line-l+1).toString(),u)+" | "+s.str+"\n"+c;for(s=v(e.buffer,o[a],r[a],e.position,p),c+=g.repeat(" ",t.indent)+w((e.line+1).toString(),u)+" | "+s.str+"\n",c+=g.repeat("-",t.indent+u+3+s.pos)+"^\n",l=1;l<=t.linesAfter&&!(a+l>=r.length);l++)s=v(e.buffer,o[a+l],r[a+l],e.position-(o[a]-o[a+l]),p),c+=g.repeat(" ",t.indent)+w((e.line+l+1).toString(),u)+" | "+s.str+"\n";return c.replace(/\n$/,"")},k=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],x=["scalar","sequence","mapping"],C=function(e,t){if(t=t||{},Object.keys(t).forEach((function(t){if(-1===k.indexOf(t))throw new b('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=function(e){var t={};return null!==e&&Object.keys(e).forEach((function(n){e[n].forEach((function(e){t[String(e)]=n}))})),t}(t.styleAliases||null),-1===x.indexOf(this.kind))throw new b('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')};function S(e,t){var n=[];return e[t].forEach((function(e){var t=n.length;n.forEach((function(n,i){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=i)})),n[t]=e})),n}function O(e){return this.extend(e)}O.prototype.extend=function(e){var t=[],n=[];if(e instanceof C)n.push(e);else if(Array.isArray(e))n=n.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new b("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit))}t.forEach((function(e){if(!(e instanceof C))throw new b("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new b("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new b("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),n.forEach((function(e){if(!(e instanceof C))throw new b("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var i=Object.create(O.prototype);return i.implicit=(this.implicit||[]).concat(t),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=S(i,"implicit"),i.compiledExplicit=S(i,"explicit"),i.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(e){e.multi?(n.multi[e.kind].push(e),n.multi.fallback.push(e)):n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(i);return n}(i.compiledImplicit,i.compiledExplicit),i};var j=O,I=new C("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}}),_=new C("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}}),T=new C("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}}),E=new j({explicit:[I,_,T]}),N=new C("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"}),L=new C("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function M(e){return 48<=e&&e<=55}function F(e){return 48<=e&&e<=57}var $=new C("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,i=e.length,o=0,r=!1;if(!i)return!1;if("-"!==(t=e[o])&&"+"!==t||(t=e[++o]),"0"===t){if(o+1===i)return!0;if("b"===(t=e[++o])){for(o++;o<i;o++)if("_"!==(t=e[o])){if("0"!==t&&"1"!==t)return!1;r=!0}return r&&"_"!==t}if("x"===t){for(o++;o<i;o++)if("_"!==(t=e[o])){if(!(48<=(n=e.charCodeAt(o))&&n<=57||65<=n&&n<=70||97<=n&&n<=102))return!1;r=!0}return r&&"_"!==t}if("o"===t){for(o++;o<i;o++)if("_"!==(t=e[o])){if(!M(e.charCodeAt(o)))return!1;r=!0}return r&&"_"!==t}}if("_"===t)return!1;for(;o<i;o++)if("_"!==(t=e[o])){if(!F(e.charCodeAt(o)))return!1;r=!0}return!(!r||"_"===t)},construct:function(e){var t,n=e,i=1;if(-1!==n.indexOf("_")&&(n=n.replace(/_/g,"")),"-"!==(t=n[0])&&"+"!==t||("-"===t&&(i=-1),t=(n=n.slice(1))[0]),"0"===n)return 0;if("0"===t){if("b"===n[1])return i*parseInt(n.slice(2),2);if("x"===n[1])return i*parseInt(n.slice(2),16);if("o"===n[1])return i*parseInt(n.slice(2),8)}return i*parseInt(n,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!g.isNegativeZero(e)},represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Z=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),D=/^[-+]?[0-9]+e/,R=new C("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!Z.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||g.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(g.isNegativeZero(e))return"-0.0";return n=e.toString(10),D.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"}),U=E.extend({implicit:[N,L,$,R]}),q=U,Y=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),B=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"),P=new C("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==Y.exec(e)||null!==B.exec(e))},construct:function(e){var t,n,i,o,r,a,l,s,c=0,u=null;if(null===(t=Y.exec(e))&&(t=B.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],i=+t[2]-1,o=+t[3],!t[4])return new Date(Date.UTC(n,i,o));if(r=+t[4],a=+t[5],l=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(u=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(u=-u)),s=new Date(Date.UTC(n,i,o,r,a,l,c)),u&&s.setTime(s.getTime()-u),s},instanceOf:Date,represent:function(e){return e.toISOString()}}),V=new C("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}}),W="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r",G=new C("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,i=0,o=e.length,r=W;for(n=0;n<o;n++)if(!((t=r.indexOf(e.charAt(n)))>64)){if(t<0)return!1;i+=6}return i%8==0},construct:function(e){var t,n,i=e.replace(/[\r\n=]/g,""),o=i.length,r=W,a=0,l=[];for(t=0;t<o;t++)t%4==0&&t&&(l.push(a>>16&255),l.push(a>>8&255),l.push(255&a)),a=a<<6|r.indexOf(i.charAt(t));return 0==(n=o%4*6)?(l.push(a>>16&255),l.push(a>>8&255),l.push(255&a)):18===n?(l.push(a>>10&255),l.push(a>>2&255)):12===n&&l.push(a>>4&255),new Uint8Array(l)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,n,i="",o=0,r=e.length,a=W;for(t=0;t<r;t++)t%3==0&&t&&(i+=a[o>>18&63],i+=a[o>>12&63],i+=a[o>>6&63],i+=a[63&o]),o=(o<<8)+e[t];return 0==(n=r%3)?(i+=a[o>>18&63],i+=a[o>>12&63],i+=a[o>>6&63],i+=a[63&o]):2===n?(i+=a[o>>10&63],i+=a[o>>4&63],i+=a[o<<2&63],i+=a[64]):1===n&&(i+=a[o>>2&63],i+=a[o<<4&63],i+=a[64],i+=a[64]),i}}),K=Object.prototype.hasOwnProperty,H=Object.prototype.toString,J=new C("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,i,o,r,a=[],l=e;for(t=0,n=l.length;t<n;t+=1){if(i=l[t],r=!1,"[object Object]"!==H.call(i))return!1;for(o in i)if(K.call(i,o)){if(r)return!1;r=!0}if(!r)return!1;if(-1!==a.indexOf(o))return!1;a.push(o)}return!0},construct:function(e){return null!==e?e:[]}}),z=Object.prototype.toString,X=new C("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,i,o,r,a=e;for(r=new Array(a.length),t=0,n=a.length;t<n;t+=1){if(i=a[t],"[object Object]"!==z.call(i))return!1;if(1!==(o=Object.keys(i)).length)return!1;r[t]=[o[0],i[o[0]]]}return!0},construct:function(e){if(null===e)return[];var t,n,i,o,r,a=e;for(r=new Array(a.length),t=0,n=a.length;t<n;t+=1)i=a[t],o=Object.keys(i),r[t]=[o[0],i[o[0]]];return r}}),Q=Object.prototype.hasOwnProperty,ee=new C("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){if(null===e)return!0;var t,n=e;for(t in n)if(Q.call(n,t)&&null!==n[t])return!1;return!0},construct:function(e){return null!==e?e:{}}}),te=q.extend({implicit:[P,V],explicit:[G,J,X,ee]}),ne=Object.prototype.hasOwnProperty,ie=1,oe=2,re=3,ae=4,le=1,se=2,ce=3,ue=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,pe=/[\x85\u2028\u2029]/,fe=/[,\[\]\{\}]/,de=/^(?:!|!!|![a-z\-]+!)$/i,he=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function ge(e){return Object.prototype.toString.call(e)}function me(e){return 10===e||13===e}function ye(e){return 9===e||32===e}function be(e){return 9===e||32===e||10===e||13===e}function ve(e){return 44===e||91===e||93===e||123===e||125===e}function we(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function Ae(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function ke(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var xe=new Array(256),Ce=new Array(256),Se=0;Se<256;Se++)xe[Se]=Ae(Se)?1:0,Ce[Se]=Ae(Se);function Oe(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||te,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function je(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=A(n),new b(t,n)}function Ie(e,t){throw je(e,t)}function _e(e,t){e.onWarning&&e.onWarning.call(null,je(e,t))}var Te={YAML:function(e,t,n){var i,o,r;null!==e.version&&Ie(e,"duplication of %YAML directive"),1!==n.length&&Ie(e,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&Ie(e,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),r=parseInt(i[2],10),1!==o&&Ie(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=r<2,1!==r&&2!==r&&_e(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var i,o;2!==n.length&&Ie(e,"TAG directive accepts exactly two arguments"),i=n[0],o=n[1],de.test(i)||Ie(e,"ill-formed tag handle (first argument) of the TAG directive"),ne.call(e.tagMap,i)&&Ie(e,'there is a previously declared suffix for "'+i+'" tag handle'),he.test(o)||Ie(e,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch(t){Ie(e,"tag prefix is malformed: "+o)}e.tagMap[i]=o}};function Ee(e,t,n,i){var o,r,a,l;if(t<n){if(l=e.input.slice(t,n),i)for(o=0,r=l.length;o<r;o+=1)9===(a=l.charCodeAt(o))||32<=a&&a<=1114111||Ie(e,"expected valid JSON character");else ue.test(l)&&Ie(e,"the stream contains non-printable characters");e.result+=l}}function Ne(e,t,n,i){var o,r,a,l;for(g.isObject(n)||Ie(e,"cannot merge mappings; the provided source object is unacceptable"),a=0,l=(o=Object.keys(n)).length;a<l;a+=1)r=o[a],ne.call(t,r)||(t[r]=n[r],i[r]=!0)}function Le(e,t,n,i,o,r,a,l,s){var c,u;if(Array.isArray(o))for(c=0,u=(o=Array.prototype.slice.call(o)).length;c<u;c+=1)Array.isArray(o[c])&&Ie(e,"nested arrays are not supported inside keys"),"object"==typeof o&&"[object Object]"===ge(o[c])&&(o[c]="[object Object]");if("object"==typeof o&&"[object Object]"===ge(o)&&(o="[object Object]"),o=String(o),null===t&&(t={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(r))for(c=0,u=r.length;c<u;c+=1)Ne(e,t,r[c],n);else Ne(e,t,r,n);else e.json||ne.call(n,o)||!ne.call(t,o)||(e.line=a||e.line,e.lineStart=l||e.lineStart,e.position=s||e.position,Ie(e,"duplicated mapping key")),"__proto__"===o?Object.defineProperty(t,o,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[o]=r,delete n[o];return t}function Me(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):Ie(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function Fe(e,t,n){for(var i=0,o=e.input.charCodeAt(e.position);0!==o;){for(;ye(o);)9===o&&-1===e.firstTabInLine&&(e.firstTabInLine=e.position),o=e.input.charCodeAt(++e.position);if(t&&35===o)do{o=e.input.charCodeAt(++e.position)}while(10!==o&&13!==o&&0!==o);if(!me(o))break;for(Me(e),o=e.input.charCodeAt(e.position),i++,e.lineIndent=0;32===o;)e.lineIndent++,o=e.input.charCodeAt(++e.position)}return-1!==n&&0!==i&&e.lineIndent<n&&_e(e,"deficient indentation"),i}function $e(e){var t,n=e.position;return!(45!==(t=e.input.charCodeAt(n))&&46!==t||t!==e.input.charCodeAt(n+1)||t!==e.input.charCodeAt(n+2)||(n+=3,0!==(t=e.input.charCodeAt(n))&&!be(t)))}function Ze(e,t){1===t?e.result+=" ":t>1&&(e.result+=g.repeat("\n",t-1))}function De(e,t){var n,i,o=e.tag,r=e.anchor,a=[],l=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),i=e.input.charCodeAt(e.position);0!==i&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,Ie(e,"tab characters must not be used in indentation")),45===i)&&be(e.input.charCodeAt(e.position+1));)if(l=!0,e.position++,Fe(e,!0,-1)&&e.lineIndent<=t)a.push(null),i=e.input.charCodeAt(e.position);else if(n=e.line,qe(e,t,re,!1,!0),a.push(e.result),Fe(e,!0,-1),i=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==i)Ie(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!l&&(e.tag=o,e.anchor=r,e.kind="sequence",e.result=a,!0)}function Re(e){var t,n,i,o,r=!1,a=!1;if(33!==(o=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&Ie(e,"duplication of a tag property"),60===(o=e.input.charCodeAt(++e.position))?(r=!0,o=e.input.charCodeAt(++e.position)):33===o?(a=!0,n="!!",o=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){do{o=e.input.charCodeAt(++e.position)}while(0!==o&&62!==o);e.position<e.length?(i=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):Ie(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==o&&!be(o);)33===o&&(a?Ie(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),de.test(n)||Ie(e,"named tag handle cannot contain such characters"),a=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);i=e.input.slice(t,e.position),fe.test(i)&&Ie(e,"tag suffix cannot contain flow indicator characters")}i&&!he.test(i)&&Ie(e,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch(t){Ie(e,"tag name is malformed: "+i)}return r?e.tag=i:ne.call(e.tagMap,n)?e.tag=e.tagMap[n]+i:"!"===n?e.tag="!"+i:"!!"===n?e.tag="tag:yaml.org,2002:"+i:Ie(e,'undeclared tag handle "'+n+'"'),!0}function Ue(e){var t,n;if(38!==(n=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&Ie(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!be(n)&&!ve(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&Ie(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function qe(e,t,n,i,o){var r,a,l,s,c,u,p,f,d,h=1,m=!1,y=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,r=a=l=ae===n||re===n,i&&Fe(e,!0,-1)&&(m=!0,e.lineIndent>t?h=1:e.lineIndent===t?h=0:e.lineIndent<t&&(h=-1)),1===h)for(;Re(e)||Ue(e);)Fe(e,!0,-1)?(m=!0,l=r,e.lineIndent>t?h=1:e.lineIndent===t?h=0:e.lineIndent<t&&(h=-1)):l=!1;if(l&&(l=m||o),1!==h&&ae!==n||(f=ie===n||oe===n?t:t+1,d=e.position-e.lineStart,1===h?l&&(De(e,d)||function(e,t,n){var i,o,r,a,l,s,c,u=e.tag,p=e.anchor,f={},d=Object.create(null),h=null,g=null,m=null,y=!1,b=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=f),c=e.input.charCodeAt(e.position);0!==c;){if(y||-1===e.firstTabInLine||(e.position=e.firstTabInLine,Ie(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),r=e.line,63!==c&&58!==c||!be(i)){if(a=e.line,l=e.lineStart,s=e.position,!qe(e,n,oe,!1,!0))break;if(e.line===r){for(c=e.input.charCodeAt(e.position);ye(c);)c=e.input.charCodeAt(++e.position);if(58===c)be(c=e.input.charCodeAt(++e.position))||Ie(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Le(e,f,d,h,g,null,a,l,s),h=g=m=null),b=!0,y=!1,o=!1,h=e.tag,g=e.result;else{if(!b)return e.tag=u,e.anchor=p,!0;Ie(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!b)return e.tag=u,e.anchor=p,!0;Ie(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(y&&(Le(e,f,d,h,g,null,a,l,s),h=g=m=null),b=!0,y=!0,o=!0):y?(y=!1,o=!0):Ie(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,c=i;if((e.line===r||e.lineIndent>t)&&(y&&(a=e.line,l=e.lineStart,s=e.position),qe(e,t,ae,!0,o)&&(y?g=e.result:m=e.result),y||(Le(e,f,d,h,g,m,a,l,s),h=g=m=null),Fe(e,!0,-1),c=e.input.charCodeAt(e.position)),(e.line===r||e.lineIndent>t)&&0!==c)Ie(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&Le(e,f,d,h,g,null,a,l,s),b&&(e.tag=u,e.anchor=p,e.kind="mapping",e.result=f),b}(e,d,f))||function(e,t){var n,i,o,r,a,l,s,c,u,p,f,d,h=!0,g=e.tag,m=e.anchor,y=Object.create(null);if(91===(d=e.input.charCodeAt(e.position)))a=93,c=!1,r=[];else{if(123!==d)return!1;a=125,c=!0,r={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=r),d=e.input.charCodeAt(++e.position);0!==d;){if(Fe(e,!0,t),(d=e.input.charCodeAt(e.position))===a)return e.position++,e.tag=g,e.anchor=m,e.kind=c?"mapping":"sequence",e.result=r,!0;h?44===d&&Ie(e,"expected the node content, but found ','"):Ie(e,"missed comma between flow collection entries"),f=null,l=s=!1,63===d&&be(e.input.charCodeAt(e.position+1))&&(l=s=!0,e.position++,Fe(e,!0,t)),n=e.line,i=e.lineStart,o=e.position,qe(e,t,ie,!1,!0),p=e.tag,u=e.result,Fe(e,!0,t),d=e.input.charCodeAt(e.position),!s&&e.line!==n||58!==d||(l=!0,d=e.input.charCodeAt(++e.position),Fe(e,!0,t),qe(e,t,ie,!1,!0),f=e.result),c?Le(e,r,y,p,u,f,n,i,o):l?r.push(Le(e,null,y,p,u,f,n,i,o)):r.push(u),Fe(e,!0,t),44===(d=e.input.charCodeAt(e.position))?(h=!0,d=e.input.charCodeAt(++e.position)):h=!1}Ie(e,"unexpected end of the stream within a flow collection")}(e,f)?y=!0:(a&&function(e,t){var n,i,o,r,a,l=le,s=!1,c=!1,u=t,p=0,f=!1;if(124===(r=e.input.charCodeAt(e.position)))i=!1;else{if(62!==r)return!1;i=!0}for(e.kind="scalar",e.result="";0!==r;)if(43===(r=e.input.charCodeAt(++e.position))||45===r)le===l?l=43===r?ce:se:Ie(e,"repeat of a chomping mode identifier");else{if(!((o=48<=(a=r)&&a<=57?a-48:-1)>=0))break;0===o?Ie(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?Ie(e,"repeat of an indentation width identifier"):(u=t+o-1,c=!0)}if(ye(r)){do{r=e.input.charCodeAt(++e.position)}while(ye(r));if(35===r)do{r=e.input.charCodeAt(++e.position)}while(!me(r)&&0!==r)}for(;0!==r;){for(Me(e),e.lineIndent=0,r=e.input.charCodeAt(e.position);(!c||e.lineIndent<u)&&32===r;)e.lineIndent++,r=e.input.charCodeAt(++e.position);if(!c&&e.lineIndent>u&&(u=e.lineIndent),me(r))p++;else{if(e.lineIndent<u){l===ce?e.result+=g.repeat("\n",s?1+p:p):l===le&&s&&(e.result+="\n");break}for(i?ye(r)?(f=!0,e.result+=g.repeat("\n",s?1+p:p)):f?(f=!1,e.result+=g.repeat("\n",p+1)):0===p?s&&(e.result+=" "):e.result+=g.repeat("\n",p):e.result+=g.repeat("\n",s?1+p:p),s=!0,c=!0,p=0,n=e.position;!me(r)&&0!==r;)r=e.input.charCodeAt(++e.position);Ee(e,n,e.position,!1)}}return!0}(e,f)||function(e,t){var n,i,o;if(39!==(n=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,i=o=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(Ee(e,i,e.position,!0),39!==(n=e.input.charCodeAt(++e.position)))return!0;i=e.position,e.position++,o=e.position}else me(n)?(Ee(e,i,o,!0),Ze(e,Fe(e,!1,t)),i=o=e.position):e.position===e.lineStart&&$e(e)?Ie(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);Ie(e,"unexpected end of the stream within a single quoted scalar")}(e,f)||function(e,t){var n,i,o,r,a,l,s;if(34!==(l=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;0!==(l=e.input.charCodeAt(e.position));){if(34===l)return Ee(e,n,e.position,!0),e.position++,!0;if(92===l){if(Ee(e,n,e.position,!0),me(l=e.input.charCodeAt(++e.position)))Fe(e,!1,t);else if(l<256&&xe[l])e.result+=Ce[l],e.position++;else if((a=120===(s=l)?2:117===s?4:85===s?8:0)>0){for(o=a,r=0;o>0;o--)(a=we(l=e.input.charCodeAt(++e.position)))>=0?r=(r<<4)+a:Ie(e,"expected hexadecimal character");e.result+=ke(r),e.position++}else Ie(e,"unknown escape sequence");n=i=e.position}else me(l)?(Ee(e,n,i,!0),Ze(e,Fe(e,!1,t)),n=i=e.position):e.position===e.lineStart&&$e(e)?Ie(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}Ie(e,"unexpected end of the stream within a double quoted scalar")}(e,f)?y=!0:function(e){var t,n,i;if(42!==(i=e.input.charCodeAt(e.position)))return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!be(i)&&!ve(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&Ie(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),ne.call(e.anchorMap,n)||Ie(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],Fe(e,!0,-1),!0}(e)?(y=!0,null===e.tag&&null===e.anchor||Ie(e,"alias node should not have any properties")):function(e,t,n){var i,o,r,a,l,s,c,u,p=e.kind,f=e.result;if(be(u=e.input.charCodeAt(e.position))||ve(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(be(i=e.input.charCodeAt(e.position+1))||n&&ve(i)))return!1;for(e.kind="scalar",e.result="",o=r=e.position,a=!1;0!==u;){if(58===u){if(be(i=e.input.charCodeAt(e.position+1))||n&&ve(i))break}else if(35===u){if(be(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&$e(e)||n&&ve(u))break;if(me(u)){if(l=e.line,s=e.lineStart,c=e.lineIndent,Fe(e,!1,-1),e.lineIndent>=t){a=!0,u=e.input.charCodeAt(e.position);continue}e.position=r,e.line=l,e.lineStart=s,e.lineIndent=c;break}}a&&(Ee(e,o,r,!1),Ze(e,e.line-l),o=r=e.position,a=!1),ye(u)||(r=e.position+1),u=e.input.charCodeAt(++e.position)}return Ee(e,o,r,!1),!!e.result||(e.kind=p,e.result=f,!1)}(e,f,ie===n)&&(y=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===h&&(y=l&&De(e,d))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&Ie(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),s=0,c=e.implicitTypes.length;s<c;s+=1)if((p=e.implicitTypes[s]).resolve(e.result)){e.result=p.construct(e.result),e.tag=p.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else if("!"!==e.tag){if(ne.call(e.typeMap[e.kind||"fallback"],e.tag))p=e.typeMap[e.kind||"fallback"][e.tag];else for(p=null,s=0,c=(u=e.typeMap.multi[e.kind||"fallback"]).length;s<c;s+=1)if(e.tag.slice(0,u[s].tag.length)===u[s].tag){p=u[s];break}p||Ie(e,"unknown tag !<"+e.tag+">"),null!==e.result&&p.kind!==e.kind&&Ie(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+p.kind+'", not "'+e.kind+'"'),p.resolve(e.result,e.tag)?(e.result=p.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):Ie(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||y}function Ye(e){var t,n,i,o,r=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(o=e.input.charCodeAt(e.position))&&(Fe(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==o));){for(a=!0,o=e.input.charCodeAt(++e.position),t=e.position;0!==o&&!be(o);)o=e.input.charCodeAt(++e.position);for(i=[],(n=e.input.slice(t,e.position)).length<1&&Ie(e,"directive name must not be less than one character in length");0!==o;){for(;ye(o);)o=e.input.charCodeAt(++e.position);if(35===o){do{o=e.input.charCodeAt(++e.position)}while(0!==o&&!me(o));break}if(me(o))break;for(t=e.position;0!==o&&!be(o);)o=e.input.charCodeAt(++e.position);i.push(e.input.slice(t,e.position))}0!==o&&Me(e),ne.call(Te,n)?Te[n](e,n,i):_e(e,'unknown document directive "'+n+'"')}Fe(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,Fe(e,!0,-1)):a&&Ie(e,"directives end mark is expected"),qe(e,e.lineIndent-1,ae,!1,!0),Fe(e,!0,-1),e.checkLineBreaks&&pe.test(e.input.slice(r,e.position))&&_e(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&$e(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,Fe(e,!0,-1)):e.position<e.length-1&&Ie(e,"end of the stream or a document separator is expected")}function Be(e,t){t=t||{},0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var n=new Oe(e,t),i=e.indexOf("\0");for(-1!==i&&(n.position=i,Ie(n,"null byte is not allowed in input")),n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)Ye(n);return n.documents}var Pe={loadAll:function(e,t,n){null!==t&&"object"==typeof t&&void 0===n&&(n=t,t=null);var i=Be(e,n);if("function"!=typeof t)return i;for(var o=0,r=i.length;o<r;o+=1)t(i[o])},load:function(e,t){var n=Be(e,t);if(0!==n.length){if(1===n.length)return n[0];throw new b("expected a single document in the stream, but found more")}}},Ve=Object.prototype.toString,We=Object.prototype.hasOwnProperty,Ge=65279,Ke=9,He=10,Je=13,ze=32,Xe=33,Qe=34,et=35,tt=37,nt=38,it=39,ot=42,rt=44,at=45,lt=58,st=61,ct=62,ut=63,pt=64,ft=91,dt=93,ht=96,gt=123,mt=124,yt=125,bt={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},vt=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],wt=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function At(e){var t,n,i;if(t=e.toString(16).toUpperCase(),e<=255)n="x",i=2;else if(e<=65535)n="u",i=4;else{if(!(e<=4294967295))throw new b("code point within a string may not be greater than 0xFFFFFFFF");n="U",i=8}return"\\"+n+g.repeat("0",i-t.length)+t}var kt=2;function xt(e){this.schema=e.schema||te,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=g.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var n,i,o,r,a,l,s;if(null===t)return{};for(n={},o=0,r=(i=Object.keys(t)).length;o<r;o+=1)a=i[o],l=String(t[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),(s=e.compiledTypeMap.fallback[a])&&We.call(s.styleAliases,l)&&(l=s.styleAliases[l]),n[a]=l;return n}(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType='"'===e.quotingType?kt:1,this.forceQuotes=e.forceQuotes||!1,this.replacer="function"==typeof e.replacer?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Ct(e,t){for(var n,i=g.repeat(" ",t),o=0,r=-1,a="",l=e.length;o<l;)-1===(r=e.indexOf("\n",o))?(n=e.slice(o),o=l):(n=e.slice(o,r+1),o=r+1),n.length&&"\n"!==n&&(a+=i),a+=n;return a}function St(e,t){return"\n"+g.repeat(" ",e.indent*t)}function Ot(e){return e===ze||e===Ke}function jt(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&e!==Ge||65536<=e&&e<=1114111}function It(e){return jt(e)&&e!==Ge&&e!==Je&&e!==He}function _t(e,t,n){var i=It(e),o=i&&!Ot(e);return(n?i:i&&e!==rt&&e!==ft&&e!==dt&&e!==gt&&e!==yt)&&e!==et&&!(t===lt&&!o)||It(t)&&!Ot(t)&&e===et||t===lt&&o}function Tt(e,t){var n,i=e.charCodeAt(t);return i>=55296&&i<=56319&&t+1<e.length&&(n=e.charCodeAt(t+1))>=56320&&n<=57343?1024*(i-55296)+n-56320+65536:i}function Et(e){return/^\n* /.test(e)}var Nt=1,Lt=2,Mt=3,Ft=4,$t=5;function Zt(e,t,n,i,o){e.dump=function(){if(0===t.length)return e.quotingType===kt?'""':"''";if(!e.noCompatMode&&(-1!==vt.indexOf(t)||wt.test(t)))return e.quotingType===kt?'"'+t+'"':"'"+t+"'";var r=e.indent*Math.max(1,n),a=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-r),l=i||e.flowLevel>-1&&n>=e.flowLevel;switch(function(e,t,n,i,o,r,a,l){var s,c,u=0,p=null,f=!1,d=!1,h=-1!==i,g=-1,m=jt(c=Tt(e,0))&&c!==Ge&&!Ot(c)&&c!==at&&c!==ut&&c!==lt&&c!==rt&&c!==ft&&c!==dt&&c!==gt&&c!==yt&&c!==et&&c!==nt&&c!==ot&&c!==Xe&&c!==mt&&c!==st&&c!==ct&&c!==it&&c!==Qe&&c!==tt&&c!==pt&&c!==ht&&function(e){return!Ot(e)&&e!==lt}(Tt(e,e.length-1));if(t||a)for(s=0;s<e.length;u>=65536?s+=2:s++){if(!jt(u=Tt(e,s)))return $t;m=m&&_t(u,p,l),p=u}else{for(s=0;s<e.length;u>=65536?s+=2:s++){if((u=Tt(e,s))===He)f=!0,h&&(d=d||s-g-1>i&&" "!==e[g+1],g=s);else if(!jt(u))return $t;m=m&&_t(u,p,l),p=u}d=d||h&&s-g-1>i&&" "!==e[g+1]}return f||d?n>9&&Et(e)?$t:a?r===kt?$t:Lt:d?Ft:Mt:!m||a||o(e)?r===kt?$t:Lt:Nt}(t,l,e.indent,a,(function(t){return function(e,t){var n,i;for(n=0,i=e.implicitTypes.length;n<i;n+=1)if(e.implicitTypes[n].resolve(t))return!0;return!1}(e,t)}),e.quotingType,e.forceQuotes&&!i,o)){case Nt:return t;case Lt:return"'"+t.replace(/'/g,"''")+"'";case Mt:return"|"+Dt(t,e.indent)+Rt(Ct(t,r));case Ft:return">"+Dt(t,e.indent)+Rt(Ct(function(e,t){for(var n,i,o,r=/(\n+)([^\n]*)/g,a=(o=-1!==(o=e.indexOf("\n"))?o:e.length,r.lastIndex=o,Ut(e.slice(0,o),t)),l="\n"===e[0]||" "===e[0];i=r.exec(e);){var s=i[1],c=i[2];n=" "===c[0],a+=s+(l||n||""===c?"":"\n")+Ut(c,t),l=n}return a}(t,a),r));case $t:return'"'+function(e){for(var t,n="",i=0,o=0;o<e.length;i>=65536?o+=2:o++)i=Tt(e,o),!(t=bt[i])&&jt(i)?(n+=e[o],i>=65536&&(n+=e[o+1])):n+=t||At(i);return n}(t)+'"';default:throw new b("impossible error: invalid scalar style")}}()}function Dt(e,t){var n=Et(e)?String(t):"",i="\n"===e[e.length-1];return n+(!i||"\n"!==e[e.length-2]&&"\n"!==e?i?"":"-":"+")+"\n"}function Rt(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function Ut(e,t){if(""===e||" "===e[0])return e;for(var n,i,o=/ [^ ]/g,r=0,a=0,l=0,s="";n=o.exec(e);)(l=n.index)-r>t&&(i=a>r?a:l,s+="\n"+e.slice(r,i),r=i+1),a=l;return s+="\n",e.length-r>t&&a>r?s+=e.slice(r,a)+"\n"+e.slice(a+1):s+=e.slice(r),s.slice(1)}function qt(e,t,n,i){var o,r,a,l="",s=e.tag;for(o=0,r=n.length;o<r;o+=1)a=n[o],e.replacer&&(a=e.replacer.call(n,String(o),a)),(Bt(e,t+1,a,!0,!0,!1,!0)||void 0===a&&Bt(e,t+1,null,!0,!0,!1,!0))&&(i&&""===l||(l+=St(e,t)),e.dump&&He===e.dump.charCodeAt(0)?l+="-":l+="- ",l+=e.dump);e.tag=s,e.dump=l||"[]"}function Yt(e,t,n){var i,o,r,a,l,s;for(r=0,a=(o=n?e.explicitTypes:e.implicitTypes).length;r<a;r+=1)if(((l=o[r]).instanceOf||l.predicate)&&(!l.instanceOf||"object"==typeof t&&t instanceof l.instanceOf)&&(!l.predicate||l.predicate(t))){if(n?l.multi&&l.representName?e.tag=l.representName(t):e.tag=l.tag:e.tag="?",l.represent){if(s=e.styleMap[l.tag]||l.defaultStyle,"[object Function]"===Ve.call(l.represent))i=l.represent(t,s);else{if(!We.call(l.represent,s))throw new b("!<"+l.tag+'> tag resolver accepts not "'+s+'" style');i=l.represent[s](t,s)}e.dump=i}return!0}return!1}function Bt(e,t,n,i,o,r,a){e.tag=null,e.dump=n,Yt(e,n,!1)||Yt(e,n,!0);var l,s=Ve.call(e.dump),c=i;i&&(i=e.flowLevel<0||e.flowLevel>t);var u,p,f="[object Object]"===s||"[object Array]"===s;if(f&&(p=-1!==(u=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||p||2!==e.indent&&t>0)&&(o=!1),p&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(f&&p&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),"[object Object]"===s)i&&0!==Object.keys(e.dump).length?(function(e,t,n,i){var o,r,a,l,s,c,u="",p=e.tag,f=Object.keys(n);if(!0===e.sortKeys)f.sort();else if("function"==typeof e.sortKeys)f.sort(e.sortKeys);else if(e.sortKeys)throw new b("sortKeys must be a boolean or a function");for(o=0,r=f.length;o<r;o+=1)c="",i&&""===u||(c+=St(e,t)),l=n[a=f[o]],e.replacer&&(l=e.replacer.call(n,a,l)),Bt(e,t+1,a,!0,!0,!0)&&((s=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&He===e.dump.charCodeAt(0)?c+="?":c+="? "),c+=e.dump,s&&(c+=St(e,t)),Bt(e,t+1,l,!0,s)&&(e.dump&&He===e.dump.charCodeAt(0)?c+=":":c+=": ",u+=c+=e.dump));e.tag=p,e.dump=u||"{}"}(e,t,e.dump,o),p&&(e.dump="&ref_"+u+e.dump)):(function(e,t,n){var i,o,r,a,l,s="",c=e.tag,u=Object.keys(n);for(i=0,o=u.length;i<o;i+=1)l="",""!==s&&(l+=", "),e.condenseFlow&&(l+='"'),a=n[r=u[i]],e.replacer&&(a=e.replacer.call(n,r,a)),Bt(e,t,r,!1,!1)&&(e.dump.length>1024&&(l+="? "),l+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Bt(e,t,a,!1,!1)&&(s+=l+=e.dump));e.tag=c,e.dump="{"+s+"}"}(e,t,e.dump),p&&(e.dump="&ref_"+u+" "+e.dump));else if("[object Array]"===s)i&&0!==e.dump.length?(e.noArrayIndent&&!a&&t>0?qt(e,t-1,e.dump,o):qt(e,t,e.dump,o),p&&(e.dump="&ref_"+u+e.dump)):(function(e,t,n){var i,o,r,a="",l=e.tag;for(i=0,o=n.length;i<o;i+=1)r=n[i],e.replacer&&(r=e.replacer.call(n,String(i),r)),(Bt(e,t,r,!1,!1)||void 0===r&&Bt(e,t,null,!1,!1))&&(""!==a&&(a+=","+(e.condenseFlow?"":" ")),a+=e.dump);e.tag=l,e.dump="["+a+"]"}(e,t,e.dump),p&&(e.dump="&ref_"+u+" "+e.dump));else{if("[object String]"!==s){if("[object Undefined]"===s)return!1;if(e.skipInvalid)return!1;throw new b("unacceptable kind of an object to dump "+s)}"?"!==e.tag&&Zt(e,e.dump,t,r,c)}null!==e.tag&&"?"!==e.tag&&(l=encodeURI("!"===e.tag[0]?e.tag.slice(1):e.tag).replace(/!/g,"%21"),l="!"===e.tag[0]?"!"+l:"tag:yaml.org,2002:"===l.slice(0,18)?"!!"+l.slice(18):"!<"+l+">",e.dump=l+" "+e.dump)}return!0}function Pt(e,t){var n,i,o=[],r=[];for(Vt(e,o,r),n=0,i=r.length;n<i;n+=1)t.duplicates.push(o[r[n]]);t.usedDuplicates=new Array(i)}function Vt(e,t,n){var i,o,r;if(null!==e&&"object"==typeof e)if(-1!==(o=t.indexOf(e)))-1===n.indexOf(o)&&n.push(o);else if(t.push(e),Array.isArray(e))for(o=0,r=e.length;o<r;o+=1)Vt(e[o],t,n);else for(o=0,r=(i=Object.keys(e)).length;o<r;o+=1)Vt(e[i[o]],t,n)}function Wt(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}const Gt={Type:C,Schema:j,FAILSAFE_SCHEMA:E,JSON_SCHEMA:U,CORE_SCHEMA:q,DEFAULT_SCHEMA:te,load:Pe.load,loadAll:Pe.loadAll,dump:function(e,t){var n=new xt(t=t||{});n.noRefs||Pt(e,n);var i=e;return n.replacer&&(i=n.replacer.call({"":i},"",i)),Bt(n,0,i,!0,!0)?n.dump+"\n":""},YAMLException:b,types:{binary:G,float:R,map:T,null:N,pairs:X,set:ee,timestamp:P,bool:L,int:$,merge:V,omap:J,seq:_,str:I},safeLoad:Wt("safeLoad","load"),safeLoadAll:Wt("safeLoadAll","loadAll"),safeDump:Wt("safeDump","dump")};var Kt;function Ht(e,t){return"function"==typeof t?t.toString():["",null].includes(t)||"object"==typeof t&&(0===t.length||0===Object.keys(t).length)?void 0:t}function Jt(e){const t={get(e,t,n){const i=Reflect.get(e,t,n);return"object"==typeof i&&null!==i?Array.isArray(i)?i.map((e=>Jt(e))):Jt(i):`{${t}}`}};return Array.isArray(e)?e.map((e=>Jt(e))):new Proxy(e,t)}function zt(e){let t;if("object"==typeof e.state){const n=Jt(e.state);t=e.view(n)}else t=e.view(e.state);return t}function Xt(e){const t=window.open("","_apprun_debug","toolbar=0");t.document.write(`<html>\n <title>AppRun Analyzer | ${document.location.href}</title>\n <style>\n body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI" }\n li { margin-left: 80px; }\n </style>\n <body>\n <div id="main">${e}</div>\n <\/script>\n </body>\n </html>`),t.document.close()}e.Z.debug=!0,window["_apprun-help"]=["",()=>{Object.keys(window).forEach((e=>{e.startsWith("_apprun-")&&("_apprun-help"===e?console.log("AppRun Commands:"):console.log(`* ${e.substring(8)}: ${window[e][0]}`))}))}];const Qt=()=>{const t={components:{}};e.Z.run("get-components",t);const{components:n}=t;return n};let en=Number(null===(Kt=null===window||void 0===window?void 0:window.localStorage)||void 0===Kt?void 0:Kt.getItem("__apprun_debugging__"))||0;if(e.Z.on("debug",(e=>{1&en&&e.event&&console.log(e),2&en&&e.vdom&&console.log(e)})),window["_apprun-components"]=["components [print]",t=>{(t=>{const n=Qt(),i=[];if(n instanceof Map)for(let[e,t]of n){const n="string"==typeof e?document.getElementById(e)||document.querySelector(e):e;i.push({element:n,comps:t})}else Object.keys(n).forEach((e=>{const t="string"==typeof e?document.getElementById(e)||document.querySelector(e):e;i.push({element:t,comps:n[e]})}));if(t){const t=(t=>{const n=({components:t})=>e.Z.h("ul",null,t.map((t=>{const n=zt(t),i=t._actions.map((e=>e.name)),o={state:t.state,view:n,actions:i,update:t.update};return e.Z.h("li",null,e.Z.h("div",null,t.constructor.name),e.Z.h("div",null,e.Z.h("pre",null,(r=Gt.dump(o,{replacer:Ht}))?r.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):r)),e.Z.h("br",null));var r})));return e.Z.h("ul",null,t.map((({element:t,comps:i})=>e.Z.h("li",null,e.Z.h("div",null,(t=>e.Z.h("div",null,t.tagName.toLowerCase(),t.id?"#"+t.id:""," ",t.className&&t.className.split(" ").map((e=>"."+e)).join()))(t)),e.Z.h(n,{components:i})))))})(i);Xt(a(t))}else i.forEach((({element:e,comps:t})=>console.log(e,t)))})("print"===t)}],window["_apprun-events"]=["events [print]",t=>{(t=>{const n=e.Z._events,i={},o=Qt(),r=e=>e._actions.forEach((t=>{i[t.name]=i[t.name]||[],i[t.name].push(e)}));if(o instanceof Map)for(let[e,t]of o)t.forEach(r);else Object.keys(o).forEach((e=>o[e].forEach(r)));const l=[];if(Object.keys(i).forEach((e=>{l.push({event:e,components:i[e],global:!!n[e]})})),l.sort(((e,t)=>e.event>t.event?1:-1)).map((e=>e.event)),t){const t=(t=>{const n=({components:t})=>e.Z.h("ul",null,t.map((t=>e.Z.h("li",null,e.Z.h("div",null,t.constructor.name))))),i=({events:t,global:i})=>e.Z.h("ul",null,t&&t.filter((e=>e.global===i&&"."!==e.event)).map((({event:t,components:i})=>e.Z.h("li",null,e.Z.h("div",null,t),e.Z.h(n,{components:i})))));return e.Z.h("div",null,e.Z.h("div",null,"GLOBAL EVENTS"),e.Z.h(i,{events:t,global:!0}),e.Z.h("div",null,"LOCAL EVENTS"),e.Z.h(i,{events:t,global:!1}))})(l);Xt(a(t))}else console.log("=== GLOBAL EVENTS ==="),l.filter((e=>e.global&&"."!==e.event)).forEach((({event:e,components:t})=>console.log({event:e},t))),console.log("=== LOCAL EVENTS ==="),l.filter((e=>!e.global&&"."!==e.event)).forEach((({event:e,components:t})=>console.log({event:e},t)))})("print"===t)}],window["_apprun-log"]=["log [event|view] on|off",(e,t)=>{var n;"on"===e?en=3:"off"===e?en=0:"event"===e?"on"===t?en|=1:"off"===t&&(en&=-2):"view"===e&&("on"===t?en|=2:"off"===t&&(en&=-3)),console.log(`* log ${e} ${t||""}`),null===(n=null===window||void 0===window?void 0:window.localStorage)||void 0===n||n.setItem("__apprun_debugging__",`${en}`)}],window["_apprun-create-event-tests"]=["create-event-tests",()=>(()=>{const e={components:{}};app.run("get-components",e);const{components:t}=e;if(s(""),t instanceof Map)for(let[e,n]of t)n.forEach(p);else Object.keys(t).forEach((e=>{t[e].forEach(p)}));u()})()],window["_apprun-create-state-tests"]=["create-state-tests <start|stop>",e=>{var t;"start"===(t=e)?(d=[],f=!0,console.log("* State logging started.")):"stop"===t?(0!==d.length?(s(""),d.forEach(((e,t)=>{c(` it ('view snapshot: #${t+1}', ()=>{`),c(` const component = new ${e.component.constructor.name}()`),c(` const state = ${JSON.stringify(e.state,void 0,2)};`),c(" const vdom = component['view'](state);"),c(" expect(JSON.stringify(vdom)).toMatchSnapshot();"),c(" })")})),u()):console.log("* No state recorded."),f=!1,d=[],console.log("* State logging stopped.")):console.log("create-state-tests <start|stop>")}],window._apprun=e=>{const[t,...n]=e[0].split(" ").filter((e=>!!e)),i=window[`_apprun-${t}`];i?i[1](...n):window["_apprun-help"][1]()},console.info('AppRun DevTools 2.27: type "_apprun `help`" to list all available commands.'),window.__REDUX_DEVTOOLS_EXTENSION__){let t=!1;const n=window.__REDUX_DEVTOOLS_EXTENSION__.connect();if(n){const i=location.hash||"#";n.send(i,"");const o=[{component:null,state:""}];console.info("Connected to the Redux DevTools"),n.subscribe((n=>{if("START"===n.type)t=!0;else if("STOP"===n.type)t=!1;else if("DISPATCH"===n.type){const t=n.payload.index;if(0===t)e.Z.run(i);else{const{component:e,state:n}=o[t];null==e||e.setState(n)}}}));const r=(e,t,i)=>{null!=i&&(o.push({component:e,state:i}),n.send(t,i))};e.Z.on("debug",(e=>{if(t&&e.event){const t=e.newState,n={type:e.event,payload:e.p},i=e.component;t instanceof Promise?t.then((e=>r(i,n,e))):r(i,n,t)}}))}}})(),i})()));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.apprun=t():e.apprun=t()}(this,(()=>(()=>{"use strict";var e={859:(e,t,n)=>{n.d(t,{A:()=>r});let i;const o="object"==typeof self&&self.self===self&&self||"object"==typeof n.g&&n.g.global===n.g&&n.g;o.app&&o._AppRunVersions?i=o.app:(i=new class{constructor(){this._events={}}on(e,t,n={}){this._events[e]=this._events[e]||[],this._events[e].push({fn:t,options:n})}off(e,t){const n=this._events[e]||[];this._events[e]=n.filter((e=>e.fn!==t))}find(e){return this._events[e]}run(e,...t){const n=this.getSubscribers(e,this._events);return console.assert(n&&n.length>0,"No subscriber for event: "+e),n.forEach((n=>{const{fn:i,options:o}=n;return o.delay?this.delay(e,i,t,o):Object.keys(o).length>0?i.apply(this,[...t,o]):i.apply(this,t),!n.options.once})),n.length}once(e,t,n={}){this.on(e,t,Object.assign(Object.assign({},n),{once:!0}))}delay(e,t,n,i){i._t&&clearTimeout(i._t),i._t=setTimeout((()=>{clearTimeout(i._t),Object.keys(i).length>0?t.apply(this,[...n,i]):t.apply(this,n)}),i.delay)}runAsync(e,...t){const n=this.getSubscribers(e,this._events);console.assert(n&&n.length>0,"No subscriber for event: "+e);const i=n.map((e=>{const{fn:n,options:i}=e;return Object.keys(i).length>0?n.apply(this,[...t,i]):n.apply(this,t)}));return Promise.all(i)}query(e,...t){return this.runAsync(e,...t)}getSubscribers(e,t){const n=t[e]||[];return t[e]=n.filter((e=>!e.options.once)),Object.keys(t).filter((t=>t.endsWith("*")&&e.startsWith(t.replace("*","")))).sort(((e,t)=>t.length-e.length)).forEach((i=>n.push(...t[i].map((t=>Object.assign(Object.assign({},t),{options:Object.assign(Object.assign({},t.options),{event:e})})))))),n}},o.app=i,o._AppRunVersions="AppRun-3");const r=i}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={exports:{}};return e[i](r,r.exports,n),r.exports}n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var i=n(859);function o(e){return e.map((e=>a(e))).join("")}function r(e){for(var t in e)null==e[t]?delete e[t]:"object"==typeof e[t]&&r(e[t])}function a(e){if(!e)return"";if(e._$litType$)return e.toString();if(r(e),Array.isArray(e))return o(e);if("string"==typeof e)return e.startsWith("_html:")?e.substring(6):e;if(e.tag){const t=e.props?function(e){return Object.keys(e).map((t=>{return` ${"className"===t?"class":t}="${n=e[t],"object"==typeof n?Object.keys(n).map((e=>`${e}:${n[e]}`)).join(";"):n.toString()}"`;var n})).join("")}(e.props):"",n=e.children?o(e.children):"";return`<${e.tag}${t}>${n}</${e.tag}>`}return"object"==typeof e?JSON.stringify(e):void 0}const l=a;let s;function c(e){s=window.open("",e),s.document.write(`<html>\n <title>AppRun Analyzer | ${document.location.href}</title>\n <style>\n body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI" }\n </style>\n <body><pre>`)}function u(e){s.document.write(e+"\n")}function p(){s.document.write("</pre>\n </body>\n </html>"),s.document.close()}app.debug=!0;const f=e=>{u(`import ${e.constructor.name} from '../src/${e.constructor.name}'`),u(`describe('${e.constructor.name}', ()=>{`),e._actions.forEach((t=>{"."!==t.name&&(u(` it ('should handle event: ${t.name}', (done)=>{`),u(` const component = new ${e.constructor.name}().mount();`),u(` component.run('${t.name}');`),u(" setTimeout(() => {"),u(" //expect(?).toHaveBeenCalled();"),u(" //expect(component.state).toBe(?);"),u(" done();"),u(" })"))})),u("});")};let d=!1,h=[];app.on("debug",(e=>{d&&e.vdom&&(h.push(e),console.log(`* ${h.length} state(s) recorded.`))}));function g(e){return null==e}var m={isNothing:g,isObject:function(e){return"object"==typeof e&&null!==e},toArray:function(e){return Array.isArray(e)?e:g(e)?[]:[e]},repeat:function(e,t){var n,i="";for(n=0;n<t;n+=1)i+=e;return i},isNegativeZero:function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},extend:function(e,t){var n,i,o,r;if(t)for(n=0,i=(r=Object.keys(t)).length;n<i;n+=1)e[o=r[n]]=t[o];return e}};function y(e,t){var n="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(n+='in "'+e.mark.name+'" '),n+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(n+="\n\n"+e.mark.snippet),i+" "+n):i}function b(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=y(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}b.prototype=Object.create(Error.prototype),b.prototype.constructor=b,b.prototype.toString=function(e){return this.name+": "+y(this,e)};var v=b;function A(e,t,n,i,o){var r="",a="",l=Math.floor(o/2)-1;return i-t>l&&(t=i-l+(r=" ... ").length),n-i>l&&(n=i+l-(a=" ...").length),{str:r+e.slice(t,n).replace(/\t/g,"→")+a,pos:i-t+r.length}}function w(e,t){return m.repeat(" ",t-e.length)+e}var k=function(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var n,i=/\r?\n|\r|\0/g,o=[0],r=[],a=-1;n=i.exec(e.buffer);)r.push(n.index),o.push(n.index+n[0].length),e.position<=n.index&&a<0&&(a=o.length-2);a<0&&(a=o.length-1);var l,s,c="",u=Math.min(e.line+t.linesAfter,r.length).toString().length,p=t.maxLength-(t.indent+u+3);for(l=1;l<=t.linesBefore&&!(a-l<0);l++)s=A(e.buffer,o[a-l],r[a-l],e.position-(o[a]-o[a-l]),p),c=m.repeat(" ",t.indent)+w((e.line-l+1).toString(),u)+" | "+s.str+"\n"+c;for(s=A(e.buffer,o[a],r[a],e.position,p),c+=m.repeat(" ",t.indent)+w((e.line+1).toString(),u)+" | "+s.str+"\n",c+=m.repeat("-",t.indent+u+3+s.pos)+"^\n",l=1;l<=t.linesAfter&&!(a+l>=r.length);l++)s=A(e.buffer,o[a+l],r[a+l],e.position-(o[a]-o[a+l]),p),c+=m.repeat(" ",t.indent)+w((e.line+l+1).toString(),u)+" | "+s.str+"\n";return c.replace(/\n$/,"")},x=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],C=["scalar","sequence","mapping"],O=function(e,t){if(t=t||{},Object.keys(t).forEach((function(t){if(-1===x.indexOf(t))throw new v('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=function(e){var t={};return null!==e&&Object.keys(e).forEach((function(n){e[n].forEach((function(e){t[String(e)]=n}))})),t}(t.styleAliases||null),-1===C.indexOf(this.kind))throw new v('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')};function j(e,t){var n=[];return e[t].forEach((function(e){var t=n.length;n.forEach((function(n,i){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=i)})),n[t]=e})),n}function S(e){return this.extend(e)}S.prototype.extend=function(e){var t=[],n=[];if(e instanceof O)n.push(e);else if(Array.isArray(e))n=n.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new v("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit))}t.forEach((function(e){if(!(e instanceof O))throw new v("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new v("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new v("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),n.forEach((function(e){if(!(e instanceof O))throw new v("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var i=Object.create(S.prototype);return i.implicit=(this.implicit||[]).concat(t),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=j(i,"implicit"),i.compiledExplicit=j(i,"explicit"),i.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(e){e.multi?(n.multi[e.kind].push(e),n.multi.fallback.push(e)):n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(i);return n}(i.compiledImplicit,i.compiledExplicit),i};var I=S,_=new O("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}}),T=new O("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}}),E=new O("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}}),N=new I({explicit:[_,T,E]}),L=new O("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"}),F=new O("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function M(e){return 48<=e&&e<=55}function $(e){return 48<=e&&e<=57}var D=new O("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,i=e.length,o=0,r=!1;if(!i)return!1;if("-"!==(t=e[o])&&"+"!==t||(t=e[++o]),"0"===t){if(o+1===i)return!0;if("b"===(t=e[++o])){for(o++;o<i;o++)if("_"!==(t=e[o])){if("0"!==t&&"1"!==t)return!1;r=!0}return r&&"_"!==t}if("x"===t){for(o++;o<i;o++)if("_"!==(t=e[o])){if(!(48<=(n=e.charCodeAt(o))&&n<=57||65<=n&&n<=70||97<=n&&n<=102))return!1;r=!0}return r&&"_"!==t}if("o"===t){for(o++;o<i;o++)if("_"!==(t=e[o])){if(!M(e.charCodeAt(o)))return!1;r=!0}return r&&"_"!==t}}if("_"===t)return!1;for(;o<i;o++)if("_"!==(t=e[o])){if(!$(e.charCodeAt(o)))return!1;r=!0}return!(!r||"_"===t)},construct:function(e){var t,n=e,i=1;if(-1!==n.indexOf("_")&&(n=n.replace(/_/g,"")),"-"!==(t=n[0])&&"+"!==t||("-"===t&&(i=-1),t=(n=n.slice(1))[0]),"0"===n)return 0;if("0"===t){if("b"===n[1])return i*parseInt(n.slice(2),2);if("x"===n[1])return i*parseInt(n.slice(2),16);if("o"===n[1])return i*parseInt(n.slice(2),8)}return i*parseInt(n,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!m.isNegativeZero(e)},represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),R=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),U=/^[-+]?[0-9]+e/,q=new O("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!R.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||m.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(m.isNegativeZero(e))return"-0.0";return n=e.toString(10),U.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"}),Y=N.extend({implicit:[L,F,D,q]}),B=Y,P=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),V=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"),W=new O("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==P.exec(e)||null!==V.exec(e))},construct:function(e){var t,n,i,o,r,a,l,s,c=0,u=null;if(null===(t=P.exec(e))&&(t=V.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],i=+t[2]-1,o=+t[3],!t[4])return new Date(Date.UTC(n,i,o));if(r=+t[4],a=+t[5],l=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(u=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(u=-u)),s=new Date(Date.UTC(n,i,o,r,a,l,c)),u&&s.setTime(s.getTime()-u),s},instanceOf:Date,represent:function(e){return e.toISOString()}}),G=new O("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}}),K="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r",H=new O("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,i=0,o=e.length,r=K;for(n=0;n<o;n++)if(!((t=r.indexOf(e.charAt(n)))>64)){if(t<0)return!1;i+=6}return i%8==0},construct:function(e){var t,n,i=e.replace(/[\r\n=]/g,""),o=i.length,r=K,a=0,l=[];for(t=0;t<o;t++)t%4==0&&t&&(l.push(a>>16&255),l.push(a>>8&255),l.push(255&a)),a=a<<6|r.indexOf(i.charAt(t));return 0==(n=o%4*6)?(l.push(a>>16&255),l.push(a>>8&255),l.push(255&a)):18===n?(l.push(a>>10&255),l.push(a>>2&255)):12===n&&l.push(a>>4&255),new Uint8Array(l)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,n,i="",o=0,r=e.length,a=K;for(t=0;t<r;t++)t%3==0&&t&&(i+=a[o>>18&63],i+=a[o>>12&63],i+=a[o>>6&63],i+=a[63&o]),o=(o<<8)+e[t];return 0==(n=r%3)?(i+=a[o>>18&63],i+=a[o>>12&63],i+=a[o>>6&63],i+=a[63&o]):2===n?(i+=a[o>>10&63],i+=a[o>>4&63],i+=a[o<<2&63],i+=a[64]):1===n&&(i+=a[o>>2&63],i+=a[o<<4&63],i+=a[64],i+=a[64]),i}}),J=Object.prototype.hasOwnProperty,Z=Object.prototype.toString,z=new O("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,i,o,r,a=[],l=e;for(t=0,n=l.length;t<n;t+=1){if(i=l[t],r=!1,"[object Object]"!==Z.call(i))return!1;for(o in i)if(J.call(i,o)){if(r)return!1;r=!0}if(!r)return!1;if(-1!==a.indexOf(o))return!1;a.push(o)}return!0},construct:function(e){return null!==e?e:[]}}),X=Object.prototype.toString,Q=new O("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,i,o,r,a=e;for(r=new Array(a.length),t=0,n=a.length;t<n;t+=1){if(i=a[t],"[object Object]"!==X.call(i))return!1;if(1!==(o=Object.keys(i)).length)return!1;r[t]=[o[0],i[o[0]]]}return!0},construct:function(e){if(null===e)return[];var t,n,i,o,r,a=e;for(r=new Array(a.length),t=0,n=a.length;t<n;t+=1)i=a[t],o=Object.keys(i),r[t]=[o[0],i[o[0]]];return r}}),ee=Object.prototype.hasOwnProperty,te=new O("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){if(null===e)return!0;var t,n=e;for(t in n)if(ee.call(n,t)&&null!==n[t])return!1;return!0},construct:function(e){return null!==e?e:{}}}),ne=B.extend({implicit:[W,G],explicit:[H,z,Q,te]}),ie=Object.prototype.hasOwnProperty,oe=1,re=2,ae=3,le=4,se=1,ce=2,ue=3,pe=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,fe=/[\x85\u2028\u2029]/,de=/[,\[\]\{\}]/,he=/^(?:!|!!|![a-z\-]+!)$/i,ge=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function me(e){return Object.prototype.toString.call(e)}function ye(e){return 10===e||13===e}function be(e){return 9===e||32===e}function ve(e){return 9===e||32===e||10===e||13===e}function Ae(e){return 44===e||91===e||93===e||123===e||125===e}function we(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function ke(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function xe(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var Ce=new Array(256),Oe=new Array(256),je=0;je<256;je++)Ce[je]=ke(je)?1:0,Oe[je]=ke(je);function Se(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||ne,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Ie(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=k(n),new v(t,n)}function _e(e,t){throw Ie(e,t)}function Te(e,t){e.onWarning&&e.onWarning.call(null,Ie(e,t))}var Ee={YAML:function(e,t,n){var i,o,r;null!==e.version&&_e(e,"duplication of %YAML directive"),1!==n.length&&_e(e,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&_e(e,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),r=parseInt(i[2],10),1!==o&&_e(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=r<2,1!==r&&2!==r&&Te(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var i,o;2!==n.length&&_e(e,"TAG directive accepts exactly two arguments"),i=n[0],o=n[1],he.test(i)||_e(e,"ill-formed tag handle (first argument) of the TAG directive"),ie.call(e.tagMap,i)&&_e(e,'there is a previously declared suffix for "'+i+'" tag handle'),ge.test(o)||_e(e,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch(t){_e(e,"tag prefix is malformed: "+o)}e.tagMap[i]=o}};function Ne(e,t,n,i){var o,r,a,l;if(t<n){if(l=e.input.slice(t,n),i)for(o=0,r=l.length;o<r;o+=1)9===(a=l.charCodeAt(o))||32<=a&&a<=1114111||_e(e,"expected valid JSON character");else pe.test(l)&&_e(e,"the stream contains non-printable characters");e.result+=l}}function Le(e,t,n,i){var o,r,a,l;for(m.isObject(n)||_e(e,"cannot merge mappings; the provided source object is unacceptable"),a=0,l=(o=Object.keys(n)).length;a<l;a+=1)r=o[a],ie.call(t,r)||(t[r]=n[r],i[r]=!0)}function Fe(e,t,n,i,o,r,a,l,s){var c,u;if(Array.isArray(o))for(c=0,u=(o=Array.prototype.slice.call(o)).length;c<u;c+=1)Array.isArray(o[c])&&_e(e,"nested arrays are not supported inside keys"),"object"==typeof o&&"[object Object]"===me(o[c])&&(o[c]="[object Object]");if("object"==typeof o&&"[object Object]"===me(o)&&(o="[object Object]"),o=String(o),null===t&&(t={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(r))for(c=0,u=r.length;c<u;c+=1)Le(e,t,r[c],n);else Le(e,t,r,n);else e.json||ie.call(n,o)||!ie.call(t,o)||(e.line=a||e.line,e.lineStart=l||e.lineStart,e.position=s||e.position,_e(e,"duplicated mapping key")),"__proto__"===o?Object.defineProperty(t,o,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[o]=r,delete n[o];return t}function Me(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):_e(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function $e(e,t,n){for(var i=0,o=e.input.charCodeAt(e.position);0!==o;){for(;be(o);)9===o&&-1===e.firstTabInLine&&(e.firstTabInLine=e.position),o=e.input.charCodeAt(++e.position);if(t&&35===o)do{o=e.input.charCodeAt(++e.position)}while(10!==o&&13!==o&&0!==o);if(!ye(o))break;for(Me(e),o=e.input.charCodeAt(e.position),i++,e.lineIndent=0;32===o;)e.lineIndent++,o=e.input.charCodeAt(++e.position)}return-1!==n&&0!==i&&e.lineIndent<n&&Te(e,"deficient indentation"),i}function De(e){var t,n=e.position;return!(45!==(t=e.input.charCodeAt(n))&&46!==t||t!==e.input.charCodeAt(n+1)||t!==e.input.charCodeAt(n+2)||(n+=3,0!==(t=e.input.charCodeAt(n))&&!ve(t)))}function Re(e,t){1===t?e.result+=" ":t>1&&(e.result+=m.repeat("\n",t-1))}function Ue(e,t){var n,i,o=e.tag,r=e.anchor,a=[],l=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),i=e.input.charCodeAt(e.position);0!==i&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,_e(e,"tab characters must not be used in indentation")),45===i)&&ve(e.input.charCodeAt(e.position+1));)if(l=!0,e.position++,$e(e,!0,-1)&&e.lineIndent<=t)a.push(null),i=e.input.charCodeAt(e.position);else if(n=e.line,Be(e,t,ae,!1,!0),a.push(e.result),$e(e,!0,-1),i=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==i)_e(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!l&&(e.tag=o,e.anchor=r,e.kind="sequence",e.result=a,!0)}function qe(e){var t,n,i,o,r=!1,a=!1;if(33!==(o=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&_e(e,"duplication of a tag property"),60===(o=e.input.charCodeAt(++e.position))?(r=!0,o=e.input.charCodeAt(++e.position)):33===o?(a=!0,n="!!",o=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){do{o=e.input.charCodeAt(++e.position)}while(0!==o&&62!==o);e.position<e.length?(i=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):_e(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==o&&!ve(o);)33===o&&(a?_e(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),he.test(n)||_e(e,"named tag handle cannot contain such characters"),a=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);i=e.input.slice(t,e.position),de.test(i)&&_e(e,"tag suffix cannot contain flow indicator characters")}i&&!ge.test(i)&&_e(e,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch(t){_e(e,"tag name is malformed: "+i)}return r?e.tag=i:ie.call(e.tagMap,n)?e.tag=e.tagMap[n]+i:"!"===n?e.tag="!"+i:"!!"===n?e.tag="tag:yaml.org,2002:"+i:_e(e,'undeclared tag handle "'+n+'"'),!0}function Ye(e){var t,n;if(38!==(n=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&_e(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!ve(n)&&!Ae(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&_e(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function Be(e,t,n,i,o){var r,a,l,s,c,u,p,f,d,h=1,g=!1,y=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,r=a=l=le===n||ae===n,i&&$e(e,!0,-1)&&(g=!0,e.lineIndent>t?h=1:e.lineIndent===t?h=0:e.lineIndent<t&&(h=-1)),1===h)for(;qe(e)||Ye(e);)$e(e,!0,-1)?(g=!0,l=r,e.lineIndent>t?h=1:e.lineIndent===t?h=0:e.lineIndent<t&&(h=-1)):l=!1;if(l&&(l=g||o),1!==h&&le!==n||(f=oe===n||re===n?t:t+1,d=e.position-e.lineStart,1===h?l&&(Ue(e,d)||function(e,t,n){var i,o,r,a,l,s,c,u=e.tag,p=e.anchor,f={},d=Object.create(null),h=null,g=null,m=null,y=!1,b=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=f),c=e.input.charCodeAt(e.position);0!==c;){if(y||-1===e.firstTabInLine||(e.position=e.firstTabInLine,_e(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),r=e.line,63!==c&&58!==c||!ve(i)){if(a=e.line,l=e.lineStart,s=e.position,!Be(e,n,re,!1,!0))break;if(e.line===r){for(c=e.input.charCodeAt(e.position);be(c);)c=e.input.charCodeAt(++e.position);if(58===c)ve(c=e.input.charCodeAt(++e.position))||_e(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Fe(e,f,d,h,g,null,a,l,s),h=g=m=null),b=!0,y=!1,o=!1,h=e.tag,g=e.result;else{if(!b)return e.tag=u,e.anchor=p,!0;_e(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!b)return e.tag=u,e.anchor=p,!0;_e(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(y&&(Fe(e,f,d,h,g,null,a,l,s),h=g=m=null),b=!0,y=!0,o=!0):y?(y=!1,o=!0):_e(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,c=i;if((e.line===r||e.lineIndent>t)&&(y&&(a=e.line,l=e.lineStart,s=e.position),Be(e,t,le,!0,o)&&(y?g=e.result:m=e.result),y||(Fe(e,f,d,h,g,m,a,l,s),h=g=m=null),$e(e,!0,-1),c=e.input.charCodeAt(e.position)),(e.line===r||e.lineIndent>t)&&0!==c)_e(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&Fe(e,f,d,h,g,null,a,l,s),b&&(e.tag=u,e.anchor=p,e.kind="mapping",e.result=f),b}(e,d,f))||function(e,t){var n,i,o,r,a,l,s,c,u,p,f,d,h=!0,g=e.tag,m=e.anchor,y=Object.create(null);if(91===(d=e.input.charCodeAt(e.position)))a=93,c=!1,r=[];else{if(123!==d)return!1;a=125,c=!0,r={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=r),d=e.input.charCodeAt(++e.position);0!==d;){if($e(e,!0,t),(d=e.input.charCodeAt(e.position))===a)return e.position++,e.tag=g,e.anchor=m,e.kind=c?"mapping":"sequence",e.result=r,!0;h?44===d&&_e(e,"expected the node content, but found ','"):_e(e,"missed comma between flow collection entries"),f=null,l=s=!1,63===d&&ve(e.input.charCodeAt(e.position+1))&&(l=s=!0,e.position++,$e(e,!0,t)),n=e.line,i=e.lineStart,o=e.position,Be(e,t,oe,!1,!0),p=e.tag,u=e.result,$e(e,!0,t),d=e.input.charCodeAt(e.position),!s&&e.line!==n||58!==d||(l=!0,d=e.input.charCodeAt(++e.position),$e(e,!0,t),Be(e,t,oe,!1,!0),f=e.result),c?Fe(e,r,y,p,u,f,n,i,o):l?r.push(Fe(e,null,y,p,u,f,n,i,o)):r.push(u),$e(e,!0,t),44===(d=e.input.charCodeAt(e.position))?(h=!0,d=e.input.charCodeAt(++e.position)):h=!1}_e(e,"unexpected end of the stream within a flow collection")}(e,f)?y=!0:(a&&function(e,t){var n,i,o,r,a,l=se,s=!1,c=!1,u=t,p=0,f=!1;if(124===(r=e.input.charCodeAt(e.position)))i=!1;else{if(62!==r)return!1;i=!0}for(e.kind="scalar",e.result="";0!==r;)if(43===(r=e.input.charCodeAt(++e.position))||45===r)se===l?l=43===r?ue:ce:_e(e,"repeat of a chomping mode identifier");else{if(!((o=48<=(a=r)&&a<=57?a-48:-1)>=0))break;0===o?_e(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?_e(e,"repeat of an indentation width identifier"):(u=t+o-1,c=!0)}if(be(r)){do{r=e.input.charCodeAt(++e.position)}while(be(r));if(35===r)do{r=e.input.charCodeAt(++e.position)}while(!ye(r)&&0!==r)}for(;0!==r;){for(Me(e),e.lineIndent=0,r=e.input.charCodeAt(e.position);(!c||e.lineIndent<u)&&32===r;)e.lineIndent++,r=e.input.charCodeAt(++e.position);if(!c&&e.lineIndent>u&&(u=e.lineIndent),ye(r))p++;else{if(e.lineIndent<u){l===ue?e.result+=m.repeat("\n",s?1+p:p):l===se&&s&&(e.result+="\n");break}for(i?be(r)?(f=!0,e.result+=m.repeat("\n",s?1+p:p)):f?(f=!1,e.result+=m.repeat("\n",p+1)):0===p?s&&(e.result+=" "):e.result+=m.repeat("\n",p):e.result+=m.repeat("\n",s?1+p:p),s=!0,c=!0,p=0,n=e.position;!ye(r)&&0!==r;)r=e.input.charCodeAt(++e.position);Ne(e,n,e.position,!1)}}return!0}(e,f)||function(e,t){var n,i,o;if(39!==(n=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,i=o=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(Ne(e,i,e.position,!0),39!==(n=e.input.charCodeAt(++e.position)))return!0;i=e.position,e.position++,o=e.position}else ye(n)?(Ne(e,i,o,!0),Re(e,$e(e,!1,t)),i=o=e.position):e.position===e.lineStart&&De(e)?_e(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);_e(e,"unexpected end of the stream within a single quoted scalar")}(e,f)||function(e,t){var n,i,o,r,a,l,s;if(34!==(l=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;0!==(l=e.input.charCodeAt(e.position));){if(34===l)return Ne(e,n,e.position,!0),e.position++,!0;if(92===l){if(Ne(e,n,e.position,!0),ye(l=e.input.charCodeAt(++e.position)))$e(e,!1,t);else if(l<256&&Ce[l])e.result+=Oe[l],e.position++;else if((a=120===(s=l)?2:117===s?4:85===s?8:0)>0){for(o=a,r=0;o>0;o--)(a=we(l=e.input.charCodeAt(++e.position)))>=0?r=(r<<4)+a:_e(e,"expected hexadecimal character");e.result+=xe(r),e.position++}else _e(e,"unknown escape sequence");n=i=e.position}else ye(l)?(Ne(e,n,i,!0),Re(e,$e(e,!1,t)),n=i=e.position):e.position===e.lineStart&&De(e)?_e(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}_e(e,"unexpected end of the stream within a double quoted scalar")}(e,f)?y=!0:function(e){var t,n,i;if(42!==(i=e.input.charCodeAt(e.position)))return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!ve(i)&&!Ae(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&_e(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),ie.call(e.anchorMap,n)||_e(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],$e(e,!0,-1),!0}(e)?(y=!0,null===e.tag&&null===e.anchor||_e(e,"alias node should not have any properties")):function(e,t,n){var i,o,r,a,l,s,c,u,p=e.kind,f=e.result;if(ve(u=e.input.charCodeAt(e.position))||Ae(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(ve(i=e.input.charCodeAt(e.position+1))||n&&Ae(i)))return!1;for(e.kind="scalar",e.result="",o=r=e.position,a=!1;0!==u;){if(58===u){if(ve(i=e.input.charCodeAt(e.position+1))||n&&Ae(i))break}else if(35===u){if(ve(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&De(e)||n&&Ae(u))break;if(ye(u)){if(l=e.line,s=e.lineStart,c=e.lineIndent,$e(e,!1,-1),e.lineIndent>=t){a=!0,u=e.input.charCodeAt(e.position);continue}e.position=r,e.line=l,e.lineStart=s,e.lineIndent=c;break}}a&&(Ne(e,o,r,!1),Re(e,e.line-l),o=r=e.position,a=!1),be(u)||(r=e.position+1),u=e.input.charCodeAt(++e.position)}return Ne(e,o,r,!1),!!e.result||(e.kind=p,e.result=f,!1)}(e,f,oe===n)&&(y=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===h&&(y=l&&Ue(e,d))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&_e(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),s=0,c=e.implicitTypes.length;s<c;s+=1)if((p=e.implicitTypes[s]).resolve(e.result)){e.result=p.construct(e.result),e.tag=p.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else if("!"!==e.tag){if(ie.call(e.typeMap[e.kind||"fallback"],e.tag))p=e.typeMap[e.kind||"fallback"][e.tag];else for(p=null,s=0,c=(u=e.typeMap.multi[e.kind||"fallback"]).length;s<c;s+=1)if(e.tag.slice(0,u[s].tag.length)===u[s].tag){p=u[s];break}p||_e(e,"unknown tag !<"+e.tag+">"),null!==e.result&&p.kind!==e.kind&&_e(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+p.kind+'", not "'+e.kind+'"'),p.resolve(e.result,e.tag)?(e.result=p.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):_e(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||y}function Pe(e){var t,n,i,o,r=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(o=e.input.charCodeAt(e.position))&&($e(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==o));){for(a=!0,o=e.input.charCodeAt(++e.position),t=e.position;0!==o&&!ve(o);)o=e.input.charCodeAt(++e.position);for(i=[],(n=e.input.slice(t,e.position)).length<1&&_e(e,"directive name must not be less than one character in length");0!==o;){for(;be(o);)o=e.input.charCodeAt(++e.position);if(35===o){do{o=e.input.charCodeAt(++e.position)}while(0!==o&&!ye(o));break}if(ye(o))break;for(t=e.position;0!==o&&!ve(o);)o=e.input.charCodeAt(++e.position);i.push(e.input.slice(t,e.position))}0!==o&&Me(e),ie.call(Ee,n)?Ee[n](e,n,i):Te(e,'unknown document directive "'+n+'"')}$e(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,$e(e,!0,-1)):a&&_e(e,"directives end mark is expected"),Be(e,e.lineIndent-1,le,!1,!0),$e(e,!0,-1),e.checkLineBreaks&&fe.test(e.input.slice(r,e.position))&&Te(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&De(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,$e(e,!0,-1)):e.position<e.length-1&&_e(e,"end of the stream or a document separator is expected")}function Ve(e,t){t=t||{},0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var n=new Se(e,t),i=e.indexOf("\0");for(-1!==i&&(n.position=i,_e(n,"null byte is not allowed in input")),n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)Pe(n);return n.documents}var We={loadAll:function(e,t,n){null!==t&&"object"==typeof t&&void 0===n&&(n=t,t=null);var i=Ve(e,n);if("function"!=typeof t)return i;for(var o=0,r=i.length;o<r;o+=1)t(i[o])},load:function(e,t){var n=Ve(e,t);if(0!==n.length){if(1===n.length)return n[0];throw new v("expected a single document in the stream, but found more")}}},Ge=Object.prototype.toString,Ke=Object.prototype.hasOwnProperty,He=65279,Je=9,Ze=10,ze=13,Xe=32,Qe=33,et=34,tt=35,nt=37,it=38,ot=39,rt=42,at=44,lt=45,st=58,ct=61,ut=62,pt=63,ft=64,dt=91,ht=93,gt=96,mt=123,yt=124,bt=125,vt={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},At=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],wt=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function kt(e){var t,n,i;if(t=e.toString(16).toUpperCase(),e<=255)n="x",i=2;else if(e<=65535)n="u",i=4;else{if(!(e<=4294967295))throw new v("code point within a string may not be greater than 0xFFFFFFFF");n="U",i=8}return"\\"+n+m.repeat("0",i-t.length)+t}var xt=2;function Ct(e){this.schema=e.schema||ne,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=m.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var n,i,o,r,a,l,s;if(null===t)return{};for(n={},o=0,r=(i=Object.keys(t)).length;o<r;o+=1)a=i[o],l=String(t[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),(s=e.compiledTypeMap.fallback[a])&&Ke.call(s.styleAliases,l)&&(l=s.styleAliases[l]),n[a]=l;return n}(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType='"'===e.quotingType?xt:1,this.forceQuotes=e.forceQuotes||!1,this.replacer="function"==typeof e.replacer?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Ot(e,t){for(var n,i=m.repeat(" ",t),o=0,r=-1,a="",l=e.length;o<l;)-1===(r=e.indexOf("\n",o))?(n=e.slice(o),o=l):(n=e.slice(o,r+1),o=r+1),n.length&&"\n"!==n&&(a+=i),a+=n;return a}function jt(e,t){return"\n"+m.repeat(" ",e.indent*t)}function St(e){return e===Xe||e===Je}function It(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&e!==He||65536<=e&&e<=1114111}function _t(e){return It(e)&&e!==He&&e!==ze&&e!==Ze}function Tt(e,t,n){var i=_t(e),o=i&&!St(e);return(n?i:i&&e!==at&&e!==dt&&e!==ht&&e!==mt&&e!==bt)&&e!==tt&&!(t===st&&!o)||_t(t)&&!St(t)&&e===tt||t===st&&o}function Et(e,t){var n,i=e.charCodeAt(t);return i>=55296&&i<=56319&&t+1<e.length&&(n=e.charCodeAt(t+1))>=56320&&n<=57343?1024*(i-55296)+n-56320+65536:i}function Nt(e){return/^\n* /.test(e)}var Lt=1,Ft=2,Mt=3,$t=4,Dt=5;function Rt(e,t,n,i,o){e.dump=function(){if(0===t.length)return e.quotingType===xt?'""':"''";if(!e.noCompatMode&&(-1!==At.indexOf(t)||wt.test(t)))return e.quotingType===xt?'"'+t+'"':"'"+t+"'";var r=e.indent*Math.max(1,n),a=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-r),l=i||e.flowLevel>-1&&n>=e.flowLevel;switch(function(e,t,n,i,o,r,a,l){var s,c,u=0,p=null,f=!1,d=!1,h=-1!==i,g=-1,m=It(c=Et(e,0))&&c!==He&&!St(c)&&c!==lt&&c!==pt&&c!==st&&c!==at&&c!==dt&&c!==ht&&c!==mt&&c!==bt&&c!==tt&&c!==it&&c!==rt&&c!==Qe&&c!==yt&&c!==ct&&c!==ut&&c!==ot&&c!==et&&c!==nt&&c!==ft&&c!==gt&&function(e){return!St(e)&&e!==st}(Et(e,e.length-1));if(t||a)for(s=0;s<e.length;u>=65536?s+=2:s++){if(!It(u=Et(e,s)))return Dt;m=m&&Tt(u,p,l),p=u}else{for(s=0;s<e.length;u>=65536?s+=2:s++){if((u=Et(e,s))===Ze)f=!0,h&&(d=d||s-g-1>i&&" "!==e[g+1],g=s);else if(!It(u))return Dt;m=m&&Tt(u,p,l),p=u}d=d||h&&s-g-1>i&&" "!==e[g+1]}return f||d?n>9&&Nt(e)?Dt:a?r===xt?Dt:Ft:d?$t:Mt:!m||a||o(e)?r===xt?Dt:Ft:Lt}(t,l,e.indent,a,(function(t){return function(e,t){var n,i;for(n=0,i=e.implicitTypes.length;n<i;n+=1)if(e.implicitTypes[n].resolve(t))return!0;return!1}(e,t)}),e.quotingType,e.forceQuotes&&!i,o)){case Lt:return t;case Ft:return"'"+t.replace(/'/g,"''")+"'";case Mt:return"|"+Ut(t,e.indent)+qt(Ot(t,r));case $t:return">"+Ut(t,e.indent)+qt(Ot(function(e,t){for(var n,i,o,r=/(\n+)([^\n]*)/g,a=(o=-1!==(o=e.indexOf("\n"))?o:e.length,r.lastIndex=o,Yt(e.slice(0,o),t)),l="\n"===e[0]||" "===e[0];i=r.exec(e);){var s=i[1],c=i[2];n=" "===c[0],a+=s+(l||n||""===c?"":"\n")+Yt(c,t),l=n}return a}(t,a),r));case Dt:return'"'+function(e){for(var t,n="",i=0,o=0;o<e.length;i>=65536?o+=2:o++)i=Et(e,o),!(t=vt[i])&&It(i)?(n+=e[o],i>=65536&&(n+=e[o+1])):n+=t||kt(i);return n}(t)+'"';default:throw new v("impossible error: invalid scalar style")}}()}function Ut(e,t){var n=Nt(e)?String(t):"",i="\n"===e[e.length-1];return n+(!i||"\n"!==e[e.length-2]&&"\n"!==e?i?"":"-":"+")+"\n"}function qt(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function Yt(e,t){if(""===e||" "===e[0])return e;for(var n,i,o=/ [^ ]/g,r=0,a=0,l=0,s="";n=o.exec(e);)(l=n.index)-r>t&&(i=a>r?a:l,s+="\n"+e.slice(r,i),r=i+1),a=l;return s+="\n",e.length-r>t&&a>r?s+=e.slice(r,a)+"\n"+e.slice(a+1):s+=e.slice(r),s.slice(1)}function Bt(e,t,n,i){var o,r,a,l="",s=e.tag;for(o=0,r=n.length;o<r;o+=1)a=n[o],e.replacer&&(a=e.replacer.call(n,String(o),a)),(Vt(e,t+1,a,!0,!0,!1,!0)||void 0===a&&Vt(e,t+1,null,!0,!0,!1,!0))&&(i&&""===l||(l+=jt(e,t)),e.dump&&Ze===e.dump.charCodeAt(0)?l+="-":l+="- ",l+=e.dump);e.tag=s,e.dump=l||"[]"}function Pt(e,t,n){var i,o,r,a,l,s;for(r=0,a=(o=n?e.explicitTypes:e.implicitTypes).length;r<a;r+=1)if(((l=o[r]).instanceOf||l.predicate)&&(!l.instanceOf||"object"==typeof t&&t instanceof l.instanceOf)&&(!l.predicate||l.predicate(t))){if(n?l.multi&&l.representName?e.tag=l.representName(t):e.tag=l.tag:e.tag="?",l.represent){if(s=e.styleMap[l.tag]||l.defaultStyle,"[object Function]"===Ge.call(l.represent))i=l.represent(t,s);else{if(!Ke.call(l.represent,s))throw new v("!<"+l.tag+'> tag resolver accepts not "'+s+'" style');i=l.represent[s](t,s)}e.dump=i}return!0}return!1}function Vt(e,t,n,i,o,r,a){e.tag=null,e.dump=n,Pt(e,n,!1)||Pt(e,n,!0);var l,s=Ge.call(e.dump),c=i;i&&(i=e.flowLevel<0||e.flowLevel>t);var u,p,f="[object Object]"===s||"[object Array]"===s;if(f&&(p=-1!==(u=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||p||2!==e.indent&&t>0)&&(o=!1),p&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(f&&p&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),"[object Object]"===s)i&&0!==Object.keys(e.dump).length?(function(e,t,n,i){var o,r,a,l,s,c,u="",p=e.tag,f=Object.keys(n);if(!0===e.sortKeys)f.sort();else if("function"==typeof e.sortKeys)f.sort(e.sortKeys);else if(e.sortKeys)throw new v("sortKeys must be a boolean or a function");for(o=0,r=f.length;o<r;o+=1)c="",i&&""===u||(c+=jt(e,t)),l=n[a=f[o]],e.replacer&&(l=e.replacer.call(n,a,l)),Vt(e,t+1,a,!0,!0,!0)&&((s=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&Ze===e.dump.charCodeAt(0)?c+="?":c+="? "),c+=e.dump,s&&(c+=jt(e,t)),Vt(e,t+1,l,!0,s)&&(e.dump&&Ze===e.dump.charCodeAt(0)?c+=":":c+=": ",u+=c+=e.dump));e.tag=p,e.dump=u||"{}"}(e,t,e.dump,o),p&&(e.dump="&ref_"+u+e.dump)):(function(e,t,n){var i,o,r,a,l,s="",c=e.tag,u=Object.keys(n);for(i=0,o=u.length;i<o;i+=1)l="",""!==s&&(l+=", "),e.condenseFlow&&(l+='"'),a=n[r=u[i]],e.replacer&&(a=e.replacer.call(n,r,a)),Vt(e,t,r,!1,!1)&&(e.dump.length>1024&&(l+="? "),l+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Vt(e,t,a,!1,!1)&&(s+=l+=e.dump));e.tag=c,e.dump="{"+s+"}"}(e,t,e.dump),p&&(e.dump="&ref_"+u+" "+e.dump));else if("[object Array]"===s)i&&0!==e.dump.length?(e.noArrayIndent&&!a&&t>0?Bt(e,t-1,e.dump,o):Bt(e,t,e.dump,o),p&&(e.dump="&ref_"+u+e.dump)):(function(e,t,n){var i,o,r,a="",l=e.tag;for(i=0,o=n.length;i<o;i+=1)r=n[i],e.replacer&&(r=e.replacer.call(n,String(i),r)),(Vt(e,t,r,!1,!1)||void 0===r&&Vt(e,t,null,!1,!1))&&(""!==a&&(a+=","+(e.condenseFlow?"":" ")),a+=e.dump);e.tag=l,e.dump="["+a+"]"}(e,t,e.dump),p&&(e.dump="&ref_"+u+" "+e.dump));else{if("[object String]"!==s){if("[object Undefined]"===s)return!1;if(e.skipInvalid)return!1;throw new v("unacceptable kind of an object to dump "+s)}"?"!==e.tag&&Rt(e,e.dump,t,r,c)}null!==e.tag&&"?"!==e.tag&&(l=encodeURI("!"===e.tag[0]?e.tag.slice(1):e.tag).replace(/!/g,"%21"),l="!"===e.tag[0]?"!"+l:"tag:yaml.org,2002:"===l.slice(0,18)?"!!"+l.slice(18):"!<"+l+">",e.dump=l+" "+e.dump)}return!0}function Wt(e,t){var n,i,o=[],r=[];for(Gt(e,o,r),n=0,i=r.length;n<i;n+=1)t.duplicates.push(o[r[n]]);t.usedDuplicates=new Array(i)}function Gt(e,t,n){var i,o,r;if(null!==e&&"object"==typeof e)if(-1!==(o=t.indexOf(e)))-1===n.indexOf(o)&&n.push(o);else if(t.push(e),Array.isArray(e))for(o=0,r=e.length;o<r;o+=1)Gt(e[o],t,n);else for(o=0,r=(i=Object.keys(e)).length;o<r;o+=1)Gt(e[i[o]],t,n)}function Kt(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}const Ht={Type:O,Schema:I,FAILSAFE_SCHEMA:N,JSON_SCHEMA:Y,CORE_SCHEMA:B,DEFAULT_SCHEMA:ne,load:We.load,loadAll:We.loadAll,dump:function(e,t){var n=new Ct(t=t||{});n.noRefs||Wt(e,n);var i=e;return n.replacer&&(i=n.replacer.call({"":i},"",i)),Vt(n,0,i,!0,!0)?n.dump+"\n":""},YAMLException:v,types:{binary:H,float:q,map:E,null:L,pairs:Q,set:te,timestamp:W,bool:F,int:D,merge:G,omap:z,seq:T,str:_},safeLoad:Kt("safeLoad","load"),safeLoadAll:Kt("safeLoadAll","loadAll"),safeDump:Kt("safeDump","dump")};var Jt;function Zt(e,t){return"function"==typeof t?t.toString():["",null].includes(t)||"object"==typeof t&&(0===t.length||0===Object.keys(t).length)?void 0:t}function zt(e){const t={get(e,t,n){const i=Reflect.get(e,t,n);return"object"==typeof i&&null!==i?Array.isArray(i)?i.map((e=>zt(e))):zt(i):`{${t}}`}};return Array.isArray(e)?e.map((e=>zt(e))):new Proxy(e,t)}function Xt(e){let t;if("object"==typeof e.state){const n=zt(e.state);t=e.view(n)}else t=e.view(e.state);return t}function Qt(e){const t=window.open("","_apprun_debug","toolbar=0");t.document.write(`<html>\n <title>AppRun Analyzer | ${document.location.href}</title>\n <style>\n body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI" }\n li { margin-left: 80px; }\n </style>\n <body>\n <div id="main">${e}</div>\n <\/script>\n </body>\n </html>`),t.document.close()}i.A.debug=!0,window["_apprun-help"]=["",()=>{Object.keys(window).forEach((e=>{e.startsWith("_apprun-")&&("_apprun-help"===e?console.log("AppRun Commands:"):console.log(`* ${e.substring(8)}: ${window[e][0]}`))}))}];const en=()=>{const e={components:{}};i.A.run("get-components",e);const{components:t}=e;return t};let tn=Number(null===(Jt=null===window||void 0===window?void 0:window.localStorage)||void 0===Jt?void 0:Jt.getItem("__apprun_debugging__"))||0;if(i.A.on("debug",(e=>{1&tn&&e.event&&console.log(e),2&tn&&e.vdom&&console.log(e)})),window["_apprun-components"]=["components [print]",e=>{(e=>{const t=en(),n=[];if(t instanceof Map)for(let[e,i]of t){const t="string"==typeof e?document.getElementById(e)||document.querySelector(e):e;n.push({element:t,comps:i})}else Object.keys(t).forEach((e=>{const i="string"==typeof e?document.getElementById(e)||document.querySelector(e):e;n.push({element:i,comps:t[e]})}));if(e){const e=(e=>{const t=({components:e})=>i.A.h("ul",null,e.map((e=>{const t=Xt(e),n=e._actions.map((e=>e.name)),o={state:e.state,view:t,actions:n,update:e.update};return i.A.h("li",null,i.A.h("div",null,e.constructor.name),i.A.h("div",null,i.A.h("pre",null,(r=Ht.dump(o,{replacer:Zt}))?r.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):r)),i.A.h("br",null));var r})));return i.A.h("ul",null,e.map((({element:e,comps:n})=>i.A.h("li",null,i.A.h("div",null,(e=>i.A.h("div",null,e.tagName.toLowerCase(),e.id?"#"+e.id:""," ",e.className&&e.className.split(" ").map((e=>"."+e)).join()))(e)),i.A.h(t,{components:n})))))})(n);Qt(l(e))}else n.forEach((({element:e,comps:t})=>console.log(e,t)))})("print"===e)}],window["_apprun-events"]=["events [print]",e=>{(e=>{const t=i.A._events,n={},o=en(),r=e=>e._actions.forEach((t=>{n[t.name]=n[t.name]||[],n[t.name].push(e)}));if(o instanceof Map)for(let[e,t]of o)t.forEach(r);else Object.keys(o).forEach((e=>o[e].forEach(r)));const a=[];if(Object.keys(n).forEach((e=>{a.push({event:e,components:n[e],global:!!t[e]})})),a.sort(((e,t)=>e.event>t.event?1:-1)).map((e=>e.event)),e){const e=(e=>{const t=({components:e})=>i.A.h("ul",null,e.map((e=>i.A.h("li",null,i.A.h("div",null,e.constructor.name))))),n=({events:e,global:n})=>i.A.h("ul",null,e&&e.filter((e=>e.global===n&&"."!==e.event)).map((({event:e,components:n})=>i.A.h("li",null,i.A.h("div",null,e),i.A.h(t,{components:n})))));return i.A.h("div",null,i.A.h("div",null,"GLOBAL EVENTS"),i.A.h(n,{events:e,global:!0}),i.A.h("div",null,"LOCAL EVENTS"),i.A.h(n,{events:e,global:!1}))})(a);Qt(l(e))}else console.log("=== GLOBAL EVENTS ==="),a.filter((e=>e.global&&"."!==e.event)).forEach((({event:e,components:t})=>console.log({event:e},t))),console.log("=== LOCAL EVENTS ==="),a.filter((e=>!e.global&&"."!==e.event)).forEach((({event:e,components:t})=>console.log({event:e},t)))})("print"===e)}],window["_apprun-log"]=["log [event|view] on|off",(e,t)=>{var n;"on"===e?tn=3:"off"===e?tn=0:"event"===e?"on"===t?tn|=1:"off"===t&&(tn&=-2):"view"===e&&("on"===t?tn|=2:"off"===t&&(tn&=-3)),console.log(`* log ${e} ${t||""}`),null===(n=null===window||void 0===window?void 0:window.localStorage)||void 0===n||n.setItem("__apprun_debugging__",`${tn}`)}],window["_apprun-create-event-tests"]=["create-event-tests",()=>(()=>{const e={components:{}};app.run("get-components",e);const{components:t}=e;if(c(""),t instanceof Map)for(let[e,n]of t)n.forEach(f);else Object.keys(t).forEach((e=>{t[e].forEach(f)}));p()})()],window["_apprun-create-state-tests"]=["create-state-tests <start|stop>",e=>{var t;"start"===(t=e)?(h=[],d=!0,console.log("* State logging started.")):"stop"===t?(0!==h.length?(c(""),h.forEach(((e,t)=>{u(` it ('view snapshot: #${t+1}', ()=>{`),u(` const component = new ${e.component.constructor.name}()`),u(` const state = ${JSON.stringify(e.state,void 0,2)};`),u(" const vdom = component['view'](state);"),u(" expect(JSON.stringify(vdom)).toMatchSnapshot();"),u(" })")})),p()):console.log("* No state recorded."),d=!1,h=[],console.log("* State logging stopped.")):console.log("create-state-tests <start|stop>")}],window._apprun=e=>{const[t,...n]=e[0].split(" ").filter((e=>!!e)),i=window[`_apprun-${t}`];i?i[1](...n):window["_apprun-help"][1]()},console.info('AppRun DevTools 2.27: type "_apprun `help`" to list all available commands.'),window.__REDUX_DEVTOOLS_EXTENSION__){let e=!1;const t=window.__REDUX_DEVTOOLS_EXTENSION__.connect();if(t){const n=location.hash||"#";t.send(n,"");const o=[{component:null,state:""}];console.info("Connected to the Redux DevTools"),t.subscribe((t=>{if("START"===t.type)e=!0;else if("STOP"===t.type)e=!1;else if("DISPATCH"===t.type){const e=t.payload.index;if(0===e)i.A.run(n);else{const{component:t,state:n}=o[e];null==t||t.setState(n)}}}));const r=(e,n,i)=>{null!=i&&(o.push({component:e,state:i}),t.send(n,i))};i.A.on("debug",(t=>{if(e&&t.event){const e=t.newState,n={type:t.event,payload:t.p},i=t.component;e instanceof Promise?e.then((e=>r(i,n,e))):r(i,n,e)}}))}}return{}})()));
3
3
  //# sourceMappingURL=apprun-dev-tools.js.map