@budibase/bbui 1.0.196 → 1.0.199

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bbui.es.js CHANGED
@@ -206,5 +206,5 @@ var Kb=Zc((function(e,t){function r(e){this.caches=e||{}}r.prototype={cache:func
206
206
  *
207
207
  * Copyright (c) 2014-2015 Jon Schlinkert, contributors.
208
208
  * Licensed under the MIT License
209
- */var ny=function(e,t){if(!lp(e)&&"function"!=typeof e)return{};var r={};if("string"==typeof t)return t in e&&(r[t]=e[t]),r;for(var n=t.length,i=-1;++i<n;){var o=t[i];o in e&&(r[o]=e[o])}return r},iy=Zc((function(e){var t=e.exports,r=Zb();t.define=ey,t.diff=ty,t.extend=Rb,t.pick=ny,t.typeOf=pp,t.unique=zh,t.isEmptyString=function(e){return""===String(e)||"./"===String(e)},t.isWindows=function(){return"\\"===zf.sep||!0===r},t.last=function(e,t){return e[e.length-(t||1)]},t.instantiate=function(e,r){var n;return n="object"===t.typeOf(e)&&e.snapdragon?e.snapdragon:"object"===t.typeOf(r)&&r.snapdragon?r.snapdragon:new Eb(r),t.define(n,"parse",(function(e,r){var n=Eb.prototype.parse.call(this,e,r);n.input=e;var i=this.parser.stack.pop();if(i&&!0!==this.options.strictErrors){var o=i.nodes[0],a=i.nodes[1];if("bracket"===i.type)"["===a.val.charAt(0)&&(a.val="\\"+a.val);else{o.val="\\"+o.val;var s=o.parent.nodes[1];"star"===s.type&&(s.loose=!0)}}return t.define(n,"parser",this.parser),n})),n},t.createKey=function(e,t){if(void 0===t)return e;var r=e;for(var n in t)t.hasOwnProperty(n)&&(r+=";"+n+"="+String(t[n]));return r},t.arrayify=function(e){return"string"==typeof e?[e]:e?Array.isArray(e)?e:[e]:[]},t.isString=function(e){return"string"==typeof e},t.isRegex=function(e){return"regexp"===t.typeOf(e)},t.isObject=function(e){return"object"===t.typeOf(e)},t.escapeRegex=function(e){return e.replace(/[-[\]{}()^$|*+?.\\/\s]/g,"\\$&")},t.combineDupes=function(e,r){var n=(r=(r=t.arrayify(r).join("|").split("|")).map((function(e){return e.replace(/\\?([+*\\/])/g,"\\$1")}))).join("|"),i=new RegExp("("+n+")(?=\\1)","g");return e.replace(i,"")},t.hasSpecialChars=function(e){return/(?:(?:(^|\/)[!.])|[*?+()|[\]{}]|[+@]\()/.test(e)},t.toPosixPath=function(e){return e.replace(/\\+/g,"/")},t.unescape=function(e){return t.toPosixPath(e.replace(/\\(?=[*+?!.])/g,""))},t.stripDrive=function(e){return t.isWindows()?e.replace(/^[a-z]:[\\/]+?/i,"/"):e},t.stripPrefix=function(e){return"."!==e.charAt(0)||"/"!==e.charAt(1)&&"\\"!==e.charAt(1)?e:e.slice(2)},t.isSimpleChar=function(e){return""===e.trim()||"."===e},t.isSlash=function(e){return"/"===e||"\\/"===e||"\\"===e||"\\\\"===e},t.matchPath=function(e,r){return r&&r.contains?t.containsPattern(e,r):t.equalsPattern(e,r)},t._equals=function(e,t,r){return r===e||r===t},t._contains=function(e,t,r){return-1!==e.indexOf(r)||-1!==t.indexOf(r)},t.equalsPattern=function(e,r){var n=t.unixify(r);return r=r||{},function(i){var o=t._equals(i,n(i),e);if(!0===o||!0!==r.nocase)return o;var a=i.toLowerCase();return t._equals(a,n(a),e)}},t.containsPattern=function(e,r){var n=t.unixify(r);return r=r||{},function(i){var o=t._contains(i,n(i),e);if(!0===o||!0!==r.nocase)return o;var a=i.toLowerCase();return t._contains(a,n(a),e)}},t.matchBasename=function(e){return function(t){return e.test(t)||e.test(zf.basename(t))}},t.identity=function(e){return e},t.value=function(e,t,r){return r&&!1===r.unixify?e:r&&"function"==typeof r.unixify?r.unixify(e):t(e)},t.unixify=function(e){var r=e||{};return function(e){return!1!==r.stripPrefix&&(e=t.stripPrefix(e)),!0===r.unescape&&(e=t.unescape(e)),(!0===r.unixify||t.isWindows())&&(e=t.toPosixPath(e)),e}}}));function oy(e,t,r){t=iy.arrayify(t),e=iy.arrayify(e);var n=t.length;if(0===e.length||0===n)return[];if(1===n)return oy.match(e,t[0],r);for(var i=!1,o=[],a=[],s=-1;++s<n;){var c=t[s];"string"==typeof c&&33===c.charCodeAt(0)?(o.push.apply(o,oy.match(e,c.slice(1),r)),i=!0):a.push.apply(a,oy.match(e,c,r))}if(i&&0===a.length)if(r&&!1===r.unixify)a=e.slice();else for(var l=iy.unixify(r),u=0;u<e.length;u++)a.push(l(e[u]));var p=iy.diff(a,o);return r&&!1===r.nodupes?p:iy.unique(p)}function ay(e,t,r,n){var i=iy.createKey(e+"="+t,r);if(r&&!1===r.cache)return n(t,r);if(Jb.has(e,i))return Jb.get(e,i);var o=n(t,r);return Jb.set(e,i,o),o}oy.match=function(e,t,r){if(Array.isArray(t))throw new TypeError("expected pattern to be a string");for(var n=iy.unixify(r),i=ay("match",t,r,oy.matcher),o=[],a=(e=iy.arrayify(e)).length,s=-1;++s<a;){var c=e[s];(c===t||i(c))&&o.push(iy.value(c,n,r))}if(void 0===r)return iy.unique(o);if(0===o.length){if(!0===r.failglob)throw new Error('no matches found for "'+t+'"');if(!0===r.nonull||!0===r.nullglob)return[r.unescape?iy.unescape(t):t]}return r.ignore&&(o=oy.not(o,r.ignore,r)),!1!==r.nodupes?iy.unique(o):o},oy.isMatch=function(e,t,r){if("string"!=typeof e)throw new TypeError('expected a string: "'+$m.inspect(e)+'"');return!iy.isEmptyString(e)&&!iy.isEmptyString(t)&&(!!iy.equalsPattern(r)(e)||ay("isMatch",t,r,oy.matcher)(e))},oy.some=function(e,t,r){"string"==typeof e&&(e=[e]);for(var n=0;n<e.length;n++)if(1===oy(e[n],t,r).length)return!0;return!1},oy.every=function(e,t,r){"string"==typeof e&&(e=[e]);for(var n=0;n<e.length;n++)if(1!==oy(e[n],t,r).length)return!1;return!0},oy.any=function(e,t,r){if("string"!=typeof e)throw new TypeError('expected a string: "'+$m.inspect(e)+'"');if(iy.isEmptyString(e)||iy.isEmptyString(t))return!1;"string"==typeof t&&(t=[t]);for(var n=0;n<t.length;n++)if(oy.isMatch(e,t[n],r))return!0;return!1},oy.all=function(e,t,r){if("string"!=typeof e)throw new TypeError('expected a string: "'+$m.inspect(e)+'"');"string"==typeof t&&(t=[t]);for(var n=0;n<t.length;n++)if(!oy.isMatch(e,t[n],r))return!1;return!0},oy.not=function(e,t,r){var n=Rb({},r),i=n.ignore;delete n.ignore,e=iy.arrayify(e);var o=iy.diff(e,oy(e,t,n));return i&&(o=iy.diff(o,oy(e,i))),!1!==n.nodupes?iy.unique(o):o},oy.contains=function(e,t,r){if("string"!=typeof e)throw new TypeError('expected a string: "'+$m.inspect(e)+'"');if("string"==typeof t){if(iy.isEmptyString(e)||iy.isEmptyString(t))return!1;if(iy.equalsPattern(t,r)(e))return!0;if(iy.containsPattern(t,r)(e))return!0}var n=Rb({},r,{contains:!0});return oy.any(e,t,n)},oy.matchBase=function(e,t){return!(e&&-1!==e.indexOf("/")||!t||!0!==t.basename&&!0!==t.matchBase)},oy.matchKeys=function(e,t,r){if(!iy.isObject(e))throw new TypeError("expected the first argument to be an object");var n=oy(Object.keys(e),t,r);return iy.pick(e,n)},oy.matcher=function e(t,r){if(iy.isEmptyString(t))return function(){return!1};if(Array.isArray(t))return function(e,t,r){var n;return ay("compose",String(e),t,(function(){return function(i){if(!n){n=[];for(var o=0;o<e.length;o++)n.push(r(e[o],t))}for(var a=n.length;a--;)if(!0===n[a](i))return!0;return!1}}))}(t,r,e);if(t instanceof RegExp)return i(t);if(!iy.isString(t))throw new TypeError("expected pattern to be an array, string or regex");if(!iy.hasSpecialChars(t))return r&&!0===r.nocase&&(t=t.toLowerCase()),iy.matchPath(t,r);var n=oy.makeRe(t,r);if(oy.matchBase(t,r))return iy.matchBasename(n,r);function i(e){var t=iy.equalsPattern(r),n=iy.unixify(r);return function(r){return!!t(r)||!!e.test(n(r))}}var o=i(n);return iy.define(o,"result",n.result),o},oy.capture=function(e,t,r){var n=oy.makeRe(e,Rb({capture:!0},r)),i=iy.unixify(r);return ay("capture",e,r,(function(){return function(e){var t=n.exec(i(e));return t?t.slice(1):null}}))(t)},oy.makeRe=function(e,t){if(e instanceof RegExp)return e;if("string"!=typeof e)throw new TypeError("expected pattern to be a string");if(e.length>65536)throw new Error("expected pattern to be less than 65536 characters");return ay("makeRe",e,t,(function(){var r=iy.extend({wrap:!1},t),n=oy.create(e,r),i=kh(n.output,r);return iy.define(i,"result",n),i}))},oy.create=function(e,t){if("string"!=typeof e)throw new TypeError("expected a string");return ay("create",e,t,(function(){return oy.compile(oy.parse(e,t),t)}))},oy.parse=function(e,t){if("string"!=typeof e)throw new TypeError("expected a string");return ay("parse",e,t,(function(){var r=iy.instantiate(null,t);Yb(r,t);var n=r.parse(e,t);return iy.define(n,"snapdragon",r),n.input=e,n}))},oy.compile=function(e,t){return"string"==typeof e&&(e=oy.parse(e,t)),ay("compile",e.input,t,(function(){var r=iy.instantiate(e,t);return Xb(r,t),r.compile(e,t)}))},oy.clearCache=function(){oy.cache.__data__={}},oy.compilers=Xb,oy.parsers=Yb,oy.cache=Jb;var sy,cy=oy,ly={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},uy=function(e){e.compiler.set("escape",(function(e){return this.emit("\\"+e.val.replace(/^\\/,""),e)})).set("text",(function(e){return this.emit(e.val.replace(/([{}])/g,"\\$1"),e)})).set("posix",(function(e){if("[::]"===e.val)return this.emit("\\[::\\]",e);var t=ly[e.inner];return void 0===t&&(t="["+e.inner+"]"),this.emit(t,e)})).set("bracket",(function(e){return this.mapVisit(e.nodes)})).set("bracket.open",(function(e){return this.emit(e.val,e)})).set("bracket.inner",(function(e){var t=e.val;if("["===t||"]"===t)return this.emit("\\"+e.val,e);if("^]"===t)return this.emit("^\\]",e);if("^"===t)return this.emit("^",e);/-/.test(t)&&!/(\d-\d|\w-\w)/.test(t)&&(t=t.split("-").join("\\-"));var r="^"===t.charAt(0);return r&&-1===t.indexOf("/")&&(t+="/"),r&&-1===t.indexOf(".")&&(t+="."),t=t.replace(/\\([1-9])/g,"$1"),this.emit(t,e)})).set("bracket.close",(function(e){var t=e.val.replace(/^\\/,"");return!0===e.parent.escaped?this.emit("\\"+t,e):this.emit(t,e)}))},py=function(e){return e[e.length-1]},dy=function(e,t){if(sy)return sy;var r,n={contains:!0,strictClose:!1},i=xh.create(e,n);return r=kh("string"==typeof t?"^(?:"+t+"|"+i+")":i,n),sy=r}("(\\[(?=.*\\])|\\])+"),my=function(e){e.state=e.state||{},e.parser.sets.bracket=e.parser.sets.bracket||[],e.parser.capture("escape",(function(){if(!this.isInside("bracket")){var e=this.position(),t=this.match(/^\\(.)/);if(t)return e({type:"escape",val:t[0]})}})).capture("text",(function(){if(!this.isInside("bracket")){var e=this.position(),t=this.match(dy);if(t&&t[0])return e({type:"text",val:t[0]})}})).capture("posix",(function(){var t=this.position(),r=this.match(/^\[:(.*?):\](?=.*\])/);if(r){var n=this.isInside("bracket");return n&&e.posix++,t({type:"posix",insideBracket:n,inner:r[1],val:r[0]})}})).capture("bracket",(function(){})).capture("bracket.open",(function(){var e=this.parsed,t=this.position(),r=this.match(/^\[(?=.*\])/);if(r){var n=this.prev(),i=py(n.nodes);if("\\"===e.slice(-1)&&!this.isInside("bracket"))return i.val=i.val.slice(0,i.val.length-1),t({type:"escape",val:r[0]});var o=t({type:"bracket.open",val:r[0]});if("bracket.open"===i.type||this.isInside("bracket"))return o.val="\\"+o.val,o.type="bracket.inner",o.escaped=!0,o;var a=t({type:"bracket",nodes:[o]});pv(a,"parent",n),pv(o,"parent",a),this.push("bracket",a),n.nodes.push(a)}})).capture("bracket.inner",(function(){if(this.isInside("bracket")){var e=this.position(),t=this.match(dy);if(t&&t[0]){var r=this.input.charAt(0),n=t[0],i=e({type:"bracket.inner",val:n});if("\\\\"===n)return i;var o=n.charAt(0),a=n.slice(-1);return"!"===o&&(n="^"+n.slice(1)),("\\"===a||"^"===n&&"]"===r)&&(n+=this.input[0],this.consume(1)),i.val=n,i}}})).capture("bracket.close",(function(){var e=this.parsed,t=this.position(),r=this.match(/^\]/);if(r){var n=this.prev(),i=py(n.nodes);if("\\"===e.slice(-1)&&!this.isInside("bracket"))return i.val=i.val.slice(0,i.val.length-1),t({type:"escape",val:r[0]});var o=t({type:"bracket.close",rest:this.input,val:r[0]});if("bracket.open"===i.type)return o.type="bracket.inner",o.escaped=!0,o;var a=this.pop("bracket");if(!this.isType(a,"bracket")){if(this.options.strict)throw new Error('missing opening "["');return o.type="bracket.inner",o.escaped=!0,o}a.nodes.push(o),pv(o,"parent",a)}}))};my.TEXT_REGEX="(\\[(?=.*\\])|\\])+";var fy=1e3,hy=6e4,gy=60*hy,vy=24*gy,by=function(e,t){t=t||{};var r=typeof e;if("string"===r&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*r;case"days":case"day":case"d":return r*vy;case"hours":case"hour":case"hrs":case"hr":case"h":return r*gy;case"minutes":case"minute":case"mins":case"min":case"m":return r*hy;case"seconds":case"second":case"secs":case"sec":case"s":return r*fy;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}(e);if("number"===r&&!1===isNaN(e))return t.long?function(e){return yy(e,vy,"day")||yy(e,gy,"hour")||yy(e,hy,"minute")||yy(e,fy,"second")||e+" ms"}(e):function(e){return e>=vy?Math.round(e/vy)+"d":e>=gy?Math.round(e/gy)+"h":e>=hy?Math.round(e/hy)+"m":e>=fy?Math.round(e/fy)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function yy(e,t,r){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}var xy=Zc((function(e,t){var r;function n(e){function n(){if(n.enabled){var e=n,i=+new Date,o=i-(r||i);e.diff=o,e.prev=r,e.curr=i,r=i;for(var a=new Array(arguments.length),s=0;s<a.length;s++)a[s]=arguments[s];a[0]=t.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");var c=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,(function(r,n){if("%%"===r)return r;c++;var i=t.formatters[n];if("function"==typeof i){var o=a[c];r=i.call(e,o),a.splice(c,1),c--}return r})),t.formatArgs.call(e,a);var l=n.log||t.log||console.log.bind(console);l.apply(e,a)}}return n.namespace=e,n.enabled=t.enabled(e),n.useColors=t.useColors(),n.color=function(e){var r,n=0;for(r in e)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]}(e),"function"==typeof t.init&&t.init(n),n}(t=e.exports=n.debug=n.default=n).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e),t.names=[],t.skips=[];for(var r=("string"==typeof e?e:"").split(/[\s,]+/),n=r.length,i=0;i<n;i++)r[i]&&("-"===(e=r[i].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=by,t.names=[],t.skips=[],t.formatters={}})),wy=Zc((function(e,t){function r(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==jd&&"env"in jd&&(e=jd.env.DEBUG),e}(t=e.exports=xy).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var r=this.useColors;if(e[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+e[0]+(r?"%c ":" ")+"+"+t.humanize(this.diff),r){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))})),e.splice(o,0,n)}},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=r,t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(r())}))("expand-brackets");function ky(e,t){return wy("initializing from <%s>","/home/runner/work/budibase/budibase/packages/string-templates/node_modules/expand-brackets/index.js"),ky.create(e,t).output}ky.match=function(e,t,r){e=[].concat(e);for(var n=jg({},r),i=ky.matcher(t,n),o=e.length,a=-1,s=[];++a<o;){var c=e[a];i(c)&&s.push(c)}if(0===s.length){if(!0===n.failglob)throw new Error('no matches found for "'+t+'"');if(!0===n.nonull||!0===n.nullglob)return[t.split("\\").join("")]}return s},ky.isMatch=function(e,t,r){return ky.matcher(t,r)(e)},ky.matcher=function(e,t){var r=ky.makeRe(e,t);return function(e){return r.test(e)}},ky.makeRe=function(e,t){var r=ky.create(e,t),n=jg({strictErrors:!1},t);return kh(r.output,n)},ky.create=function(e,t){var r=t&&t.snapdragon||new Eb(t);uy(r),my(r);var n=r.parse(e,t);n.input=e;var i=r.compile(n,t);return i.input=e,i},ky.compilers=uy,ky.parsers=my;var Cy=ky,zy=function(e){function t(){return"function"==typeof e.options.star?e.options.star.apply(this,arguments):"string"==typeof e.options.star?e.options.star:".*?"}e.use(Cy.compilers),e.compiler.set("escape",(function(e){return this.emit(e.val,e)})).set("dot",(function(e){return this.emit("\\"+e.val,e)})).set("qmark",(function(e){var t="[^\\\\/.]",r=this.prev();if("("===e.parsed.slice(-1)){var n=e.rest.charAt(0);return"!"!==n&&"="!==n&&":"!==n?this.emit(t,e):this.emit(e.val,e)}return"text"===r.type&&r.val||e.val.length>1&&(t+="{"+e.val.length+"}"),this.emit(t,e)})).set("plus",(function(e){var t=e.parsed.slice(-1);if("]"===t||")"===t)return this.emit(e.val,e);var r=this.output.slice(-1);return!this.output||/[?*+]/.test(r)&&"bracket"!==e.parent.type?this.emit("\\+",e):/\w/.test(r)&&!e.inside?this.emit("+\\+?",e):this.emit("+",e)})).set("star",(function(e){var r=this.prev(),n="text"!==r.type&&"escape"!==r.type?"(?!\\.)":"";return this.emit(n+t.call(this,e),e)})).set("paren",(function(e){return this.mapVisit(e.nodes)})).set("paren.open",(function(e){var t=this.options.capture?"(":"";switch(e.parent.prefix){case"!":case"^":return this.emit(t+"(?:(?!(?:",e);case"*":case"+":case"?":case"@":return this.emit(t+"(?:",e);default:var r=e.val;return!0===this.options.bash?r="\\"+r:this.options.capture||"("!==r||"?"===e.parent.rest[0]||(r+="?:"),this.emit(r,e)}})).set("paren.close",(function(e){var r=this.options.capture?")":"";switch(e.prefix){case"!":case"^":var n=/^(\)|$)/.test(e.rest)?"$":"",i=t.call(this,e);return e.parent.hasSlash&&!this.options.star&&!1!==this.options.slash&&(i=".*?"),this.emit(n+"))"+i+")"+r,e);case"*":case"+":case"?":return this.emit(")"+e.prefix+r,e);case"@":return this.emit(")"+r,e);default:var o=(!0===this.options.bash?"\\":"")+")";return this.emit(o,e)}})).set("text",(function(e){var t=e.val.replace(/[\[\]]/g,"\\$&");return this.emit(t,e)}))},Sy=function(e,t,r){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("expected an object or function.");if("string"!=typeof t)throw new TypeError("expected `prop` to be a string.");return hp(r)&&("set"in r||"get"in r)?Object.defineProperty(e,t,r):Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:r})},Ay=Zc((function(e){var t=e.exports,r=t.cache=new Kb;t.arrayify=function(e){return Array.isArray(e)?e:[e]},t.memoize=function(e,n,i,o){var a=t.createKey(e+n,i);if(r.has(e,a))return r.get(e,a);var s=o(n,i);return i&&!1===i.cache||r.set(e,a,s),s},t.createKey=function(e,t){var r=e;if(void 0===t)return r;for(var n in t)r+=";"+n+"="+String(t[n]);return r},t.createRegex=function(e){return xh(e,{contains:!0,strictClose:!1})}})),Dy=Ay.createRegex("([!@*?+]?\\(|\\)|[*?.+\\\\]|\\[:?(?=.*\\])|:?\\])+"),Ty=function(e){e.state=e.state||{},e.use(Cy.parsers),e.parser.sets.paren=e.parser.sets.paren||[],e.parser.capture("paren.open",(function(){var e=this.parsed,t=this.position(),r=this.match(/^([!@*?+])?\(/);if(r){var n=this.prev(),i=r[1],o=t({type:"paren.open",parsed:e,val:r[0]}),a=t({type:"paren",prefix:i,nodes:[o]});"!"===i&&"paren"===n.type&&"!"===n.prefix&&(n.prefix="@",a.prefix="@"),Sy(a,"rest",this.input),Sy(a,"parsed",e),Sy(a,"parent",n),Sy(o,"parent",a),this.push("paren",a),n.nodes.push(a)}})).capture("paren.close",(function(){var e=this.parsed,t=this.position(),r=this.match(/^\)/);if(r){var n=this.pop("paren"),i=t({type:"paren.close",rest:this.input,parsed:e,val:r[0]});if(!this.isType(n,"paren")){if(this.options.strict)throw new Error('missing opening paren: "("');return i.escaped=!0,i}i.prefix=n.prefix,n.nodes.push(i),Sy(i,"parent",n)}})).capture("escape",(function(){var e=this.position(),t=this.match(/^\\(.)/);if(t)return e({type:"escape",val:t[0],ch:t[1]})})).capture("qmark",(function(){var t=this.parsed,r=this.position(),n=this.match(/^\?+(?!\()/);if(n)return e.state.metachar=!0,r({type:"qmark",rest:this.input,parsed:t,val:n[0]})})).capture("star",/^\*(?!\()/).capture("plus",/^\+(?!\()/).capture("dot",/^\./).capture("text",Dy)};Ty.TEXT_REGEX="([!@*?+]?\\(|\\)|[*?.+\\\\]|\\[:?(?=.*\\])|:?\\])+";var $y=function(e){this.options=jg({source:"extglob"},e),this.snapdragon=this.options.snapdragon||new Eb(this.options),this.snapdragon.patterns=this.snapdragon.patterns||{},this.compiler=this.snapdragon.compiler,this.parser=this.snapdragon.parser,zy(this.snapdragon),Ty(this.snapdragon),Sy(this.snapdragon,"parse",(function(e,t){var r=Eb.prototype.parse.apply(this,arguments);r.input=e;var n=this.parser.stack.pop();if(n&&!0!==this.options.strict){var i=n.nodes[0];i.val="\\"+i.val;var o=i.parent.nodes[1];"star"===o.type&&(o.loose=!0)}return Sy(r,"parser",this.parser),r})),Sy(this,"parse",(function(e,t){return this.snapdragon.parse.apply(this.snapdragon,arguments)})),Sy(this,"compile",(function(e,t){return this.snapdragon.compile.apply(this.snapdragon,arguments)}))};function _y(e,t){return _y.create(e,t).output}_y.match=function(e,t,r){if("string"!=typeof t)throw new TypeError("expected pattern to be a string");e=Ay.arrayify(e);for(var n=_y.matcher(t,r),i=e.length,o=-1,a=[];++o<i;){var s=e[o];n(s)&&a.push(s)}if(void 0===r)return zh(a);if(0===a.length){if(!0===r.failglob)throw new Error('no matches found for "'+t+'"');if(!0===r.nonull||!0===r.nullglob)return[t.split("\\").join("")]}return!1!==r.nodupes?zh(a):a},_y.isMatch=function(e,t,r){if("string"!=typeof t)throw new TypeError("expected pattern to be a string");if("string"!=typeof e)throw new TypeError("expected a string");return t===e||(""===t||" "===t||"."===t?t===e:Ay.memoize("isMatch",t,r,_y.matcher)(e))},_y.contains=function(e,t,r){if("string"!=typeof e)throw new TypeError("expected a string");if(""===t||" "===t||"."===t)return t===e;var n=jg({},r,{contains:!0});return n.strictClose=!1,n.strictOpen=!1,_y.isMatch(e,t,n)},_y.matcher=function(e,t){if("string"!=typeof e)throw new TypeError("expected pattern to be a string");return Ay.memoize("matcher",e,t,(function(){var r=_y.makeRe(e,t);return function(e){return r.test(e)}}))},_y.create=function(e,t){if("string"!=typeof e)throw new TypeError("expected pattern to be a string");return Ay.memoize("create",e,t,(function(){var r=new $y(t),n=r.parse(e,t);return r.compile(n,t)}))},_y.capture=function(e,t,r){var n=_y.makeRe(e,jg({capture:!0},r));return Ay.memoize("capture",e,r,(function(){return function(e){var t=n.exec(e);return t?t.slice(1):null}}))(t)},_y.makeRe=function(e,t){if(e instanceof RegExp)return e;if("string"!=typeof e)throw new TypeError("expected pattern to be a string");if(e.length>65536)throw new Error("expected pattern to be less than 65536 characters");var r=Ay.memoize("makeRe",e,t,(function(){var r=jg({strictErrors:!1},t);!0===r.strictErrors&&(r.strict=!0);var n=_y.create(e,r);return kh(n.output,r)}));if(r.source.length>65536)throw new SyntaxError("potentially malicious regex detected");return r},_y.cache=Ay.cache,_y.clearCache=function(){_y.cache.__data__={}},_y.Extglob=$y,_y.compilers=zy,_y.parsers=Ty;var Ey,My=_y,Ly=function(e){var t=e.compiler.compilers,r=e.options;e.use(cy.compilers);var n=t.escape,i=t.qmark,o=t.slash,a=t.star,s=t.text,c=t.plus,l=t.dot;!1===r.extglob||!0===r.noext?e.compiler.use(Iy):e.use(My.compilers),e.use((function(){this.options.star=this.options.star||function(){return"[^\\\\/]*?"}})),e.compiler.set("dot",l).set("escape",n).set("plus",c).set("slash",o).set("qmark",i).set("star",a).set("text",s)};function Iy(e){function t(e,r){return e.nodes?function(e,r){for(var n=e.length,i=-1;++i<n;)t(e[i],r)}(e.nodes,r):r(e)}e.set("paren",(function(e){var r="";return t(e,(function(e){e.val&&(r+=(/^\W/.test(e.val)?"\\":"")+e.val)})),this.emit(r,e)}))}var Oy=function(e){var t=e.parser.parsers;e.use(cy.parsers);var r=t.escape,n=t.slash,i=t.qmark,o=t.plus,a=t.star,s=t.dot;e.use(My.parsers),e.parser.use((function(){this.notRegex=/^\!+(?!\()/})).capture("escape",r).capture("slash",n).capture("qmark",i).capture("star",a).capture("plus",o).capture("dot",s).capture("text",(function(){if(!this.isInside("bracket")){var e=this.position(),t=this.match(function(e){return Ey||(t=xh.create("([!@*?+]?\\(|\\)|\\[:?(?=.*?:?\\])|:?\\]|[*+?!^$.\\\\/])+",{contains:!0,strictClose:!1}),Ey=kh("(?:[\\^]|\\\\|"+t+")",{strictClose:!1}));var t}(this.options));if(t&&t[0])return e({type:"text",val:t[0].replace(/([[\]^$])/g,"\\$1")})}}))},By=new Kb,Py=Zc((function(e){var t=e.exports;t.define=vp,t.diff=ty,t.extend=Vm,t.pick=ny,t.typeOf=pp,t.unique=zh,t.isWindows=function(){return"\\"===zf.sep||"win32"===jd.platform},t.instantiate=function(e,r){var n;return n="object"===t.typeOf(e)&&e.snapdragon?e.snapdragon:"object"===t.typeOf(r)&&r.snapdragon?r.snapdragon:new Eb(r),t.define(n,"parse",(function(e,r){var n=Eb.prototype.parse.apply(this,arguments);n.input=e;var i=this.parser.stack.pop();if(i&&!0!==this.options.strictErrors){var o=i.nodes[0],a=i.nodes[1];if("bracket"===i.type)"["===a.val.charAt(0)&&(a.val="\\"+a.val);else{o.val="\\"+o.val;var s=o.parent.nodes[1];"star"===s.type&&(s.loose=!0)}}return t.define(n,"parser",this.parser),n})),n},t.createKey=function(e,r){if("object"!==t.typeOf(r))return e;for(var n=e,i=Object.keys(r),o=0;o<i.length;o++){var a=i[o];n+=";"+a+"="+String(r[a])}return n},t.arrayify=function(e){return"string"==typeof e?[e]:e?Array.isArray(e)?e:[e]:[]},t.isString=function(e){return"string"==typeof e},t.isObject=function(e){return"object"===t.typeOf(e)},t.hasSpecialChars=function(e){return/(?:(?:(^|\/)[!.])|[*?+()|\[\]{}]|[+@]\()/.test(e)},t.escapeRegex=function(e){return e.replace(/[-[\]{}()^$|*+?.\\\/\s]/g,"\\$&")},t.toPosixPath=function(e){return e.replace(/\\+/g,"/")},t.unescape=function(e){return t.toPosixPath(e.replace(/\\(?=[*+?!.])/g,""))},t.stripPrefix=function(e){if("."!==e.charAt(0))return e;var r=e.charAt(1);return t.isSlash(r)?e.slice(2):e},t.isSlash=function(e){return"/"===e||"\\/"===e||"\\"===e||"\\\\"===e},t.matchPath=function(e,r){return r&&r.contains?t.containsPattern(e,r):t.equalsPattern(e,r)},t._equals=function(e,t,r){return r===e||r===t},t._contains=function(e,t,r){return-1!==e.indexOf(r)||-1!==t.indexOf(r)},t.equalsPattern=function(e,r){var n=t.unixify(r);return r=r||{},function(i){var o=t._equals(i,n(i),e);if(!0===o||!0!==r.nocase)return o;var a=i.toLowerCase();return t._equals(a,n(a),e)}},t.containsPattern=function(e,r){var n=t.unixify(r);return r=r||{},function(i){var o=t._contains(i,n(i),e);if(!0===o||!0!==r.nocase)return o;var a=i.toLowerCase();return t._contains(a,n(a),e)}},t.matchBasename=function(e){return function(t){return e.test(zf.basename(t))}},t.value=function(e,t,r){return r&&!1===r.unixify?e:t(e)},t.unixify=function(e){return e=e||{},function(r){return(t.isWindows()||!0===e.unixify)&&(r=t.toPosixPath(r)),!1!==e.stripPrefix&&(r=t.stripPrefix(r)),!0===e.unescape&&(r=t.unescape(r)),r}}}));function jy(e,t,r){t=Py.arrayify(t),e=Py.arrayify(e);var n=t.length;if(0===e.length||0===n)return[];if(1===n)return jy.match(e,t[0],r);for(var i=[],o=[],a=-1;++a<n;){var s=t[a];"string"==typeof s&&33===s.charCodeAt(0)?i.push.apply(i,jy.match(e,s.slice(1),r)):o.push.apply(o,jy.match(e,s,r))}var c=Py.diff(o,i);return r&&!1===r.nodupes?c:Py.unique(c)}function Fy(e){return""===String(e)||"./"===String(e)}function Ry(e,t,r,n){var i=Py.createKey(e+"="+t,r);if(r&&!1===r.cache)return n(t,r);if(By.has(e,i))return By.get(e,i);var o=n(t,r);return By.set(e,i,o),o}jy.match=function(e,t,r){if(Array.isArray(t))throw new TypeError("expected pattern to be a string");for(var n=Py.unixify(r),i=Ry("match",t,r,jy.matcher),o=[],a=(e=Py.arrayify(e)).length,s=-1;++s<a;){var c=e[s];(c===t||i(c))&&o.push(Py.value(c,n,r))}if(void 0===r)return Py.unique(o);if(0===o.length){if(!0===r.failglob)throw new Error('no matches found for "'+t+'"');if(!0===r.nonull||!0===r.nullglob)return[r.unescape?Py.unescape(t):t]}return r.ignore&&(o=jy.not(o,r.ignore,r)),!1!==r.nodupes?Py.unique(o):o},jy.isMatch=function(e,t,r){if("string"!=typeof e)throw new TypeError('expected a string: "'+$m.inspect(e)+'"');return!Fy(e)&&!Fy(t)&&(!!Py.equalsPattern(r)(e)||Ry("isMatch",t,r,jy.matcher)(e))},jy.some=function(e,t,r){"string"==typeof e&&(e=[e]);for(var n=0;n<e.length;n++)if(1===jy(e[n],t,r).length)return!0;return!1},jy.every=function(e,t,r){"string"==typeof e&&(e=[e]);for(var n=0;n<e.length;n++)if(1!==jy(e[n],t,r).length)return!1;return!0},jy.any=function(e,t,r){if("string"!=typeof e)throw new TypeError('expected a string: "'+$m.inspect(e)+'"');if(Fy(e)||Fy(t))return!1;"string"==typeof t&&(t=[t]);for(var n=0;n<t.length;n++)if(jy.isMatch(e,t[n],r))return!0;return!1},jy.all=function(e,t,r){if("string"!=typeof e)throw new TypeError('expected a string: "'+$m.inspect(e)+'"');"string"==typeof t&&(t=[t]);for(var n=0;n<t.length;n++)if(!jy.isMatch(e,t[n],r))return!1;return!0},jy.not=function(e,t,r){var n=Vm({},r),i=n.ignore;delete n.ignore;var o=Py.unixify(n);e=Py.arrayify(e).map(o);var a=Py.diff(e,jy(e,t,n));return i&&(a=Py.diff(a,jy(e,i))),!1!==n.nodupes?Py.unique(a):a},jy.contains=function(e,t,r){if("string"!=typeof e)throw new TypeError('expected a string: "'+$m.inspect(e)+'"');if("string"==typeof t){if(Fy(e)||Fy(t))return!1;if(Py.equalsPattern(t,r)(e))return!0;if(Py.containsPattern(t,r)(e))return!0}var n=Vm({},r,{contains:!0});return jy.any(e,t,n)},jy.matchBase=function(e,t){return!(e&&-1!==e.indexOf("/")||!t||!0!==t.basename&&!0!==t.matchBase)},jy.matchKeys=function(e,t,r){if(!Py.isObject(e))throw new TypeError("expected the first argument to be an object");var n=jy(Object.keys(e),t,r);return Py.pick(e,n)},jy.matcher=function e(t,r){if(Array.isArray(t))return function(e,t,r){var n;return Ry("compose",String(e),t,(function(){return function(i){if(!n){n=[];for(var o=0;o<e.length;o++)n.push(r(e[o],t))}for(var a=n.length;a--;)if(!0===n[a](i))return!0;return!1}}))}(t,r,e);if(t instanceof RegExp)return i(t);if(!Py.isString(t))throw new TypeError("expected pattern to be an array, string or regex");if(!Py.hasSpecialChars(t))return r&&!0===r.nocase&&(t=t.toLowerCase()),Py.matchPath(t,r);var n=jy.makeRe(t,r);if(jy.matchBase(t,r))return Py.matchBasename(n,r);function i(e){var t=Py.equalsPattern(r),n=Py.unixify(r);return function(r){return!!t(r)||!!e.test(n(r))}}var o=i(n);return Object.defineProperty(o,"result",{configurable:!0,enumerable:!1,value:n.result}),o},jy.capture=function(e,t,r){var n=jy.makeRe(e,Vm({capture:!0},r)),i=Py.unixify(r);return Ry("capture",e,r,(function(){return function(e){var t=n.exec(i(e));return t?t.slice(1):null}}))(t)},jy.makeRe=function(e,t){if("string"!=typeof e)throw new TypeError("expected pattern to be a string");if(e.length>65536)throw new Error("expected pattern to be less than 65536 characters");return Ry("makeRe",e,t,(function(){var r=jy.create(e,t),n=[],i=r.map((function(e){return e.ast.state=e.state,n.push(e.ast),e.output})),o=kh(i.join("|"),t);return Object.defineProperty(o,"result",{configurable:!0,enumerable:!1,value:n}),o}))},jy.braces=function(e,t){if("string"!=typeof e&&!Array.isArray(e))throw new TypeError("expected pattern to be an array or string");return Ry("braces",e,t,(function(){return t&&!0===t.nobrace||!/\{.*\}/.test(e)?Py.arrayify(e):Fb(e,t)}))},jy.braceExpand=function(e,t){var r=Vm({},t,{expand:!0});return jy.braces(e,r)},jy.create=function(e,t){return Ry("create",e,t,(function(){for(var r,n,i=(e=jy.braces(e,t)).length,o=-1,a=[];++o<i;)a.push((r=e[o],n=t,jy.compile(jy.parse(r,n),n)));return a}))},jy.parse=function(e,t){if("string"!=typeof e)throw new TypeError("expected a string");return Ry("parse",e,t,(function(){var r=Py.instantiate(null,t);Oy(r);var n=r.parse(e,t);return Py.define(n,"snapdragon",r),n.input=e,n}))},jy.compile=function(e,t){return"string"==typeof e&&(e=jy.parse(e,t)),Ry("compile",e.input,t,(function(){var r=Py.instantiate(e,t);return Ly(r),r.compile(e,t)}))},jy.clearCache=function(){jy.cache.caches={}},jy.compilers=Ly,jy.parsers=Oy,jy.caches=By.caches;var Ny=jy,qy=Zc((function(e){var t=e.exports;t.match=function(e,t,r,n){var i=_m.options(this,r,n);return"string"==typeof t&&(t=t.split(/, */)),Ny(e,t,i)},t.isMatch=function(e,t,r,n){var i=_m.options(this,r,n);return Ny.isMatch(e,t,i)},t.mm=function(){return console.log("the {{mm}} helper is depcrecated and will be removed"),console.log("in handlebars-helpers v1.0.0, please use the {{match}}"),console.log("helper instead."),t.match.apply(this,arguments)}})),Hy=Zc((function(e){var t=e.exports;t.abs=function(e){if(isNaN(e))throw new TypeError("expected a number");return Math.abs(e)},t.add=function(e,t){return isNaN(e)||isNaN(t)?"string"==typeof e&&"string"==typeof t?e+t:"":Number(e)+Number(t)},t.avg=function(){const e=[].concat.apply([],arguments);return e.pop(),t.sum(e)/e.length},t.ceil=function(e){if(isNaN(e))throw new TypeError("expected a number");return Math.ceil(e)},t.divide=function(e,t){if(isNaN(e))throw new TypeError("expected the first argument to be a number");if(isNaN(t))throw new TypeError("expected the second argument to be a number");return Number(e)/Number(t)},t.floor=function(e){if(isNaN(e))throw new TypeError("expected a number");return Math.floor(e)},t.minus=function(e,t){if(isNaN(e))throw new TypeError("expected the first argument to be a number");if(isNaN(t))throw new TypeError("expected the second argument to be a number");return Number(e)-Number(t)},t.modulo=function(e,t){if(isNaN(e))throw new TypeError("expected the first argument to be a number");if(isNaN(t))throw new TypeError("expected the second argument to be a number");return Number(e)%Number(t)},t.multiply=function(e,t){if(isNaN(e))throw new TypeError("expected the first argument to be a number");if(isNaN(t))throw new TypeError("expected the second argument to be a number");return Number(e)*Number(t)},t.plus=function(e,t){if(isNaN(e))throw new TypeError("expected the first argument to be a number");if(isNaN(t))throw new TypeError("expected the second argument to be a number");return Number(e)+Number(t)},t.random=function(e,t){if(isNaN(e))throw new TypeError("expected minimum to be a number");if(isNaN(t))throw new TypeError("expected maximum to be a number");return Of.random(e,t)},t.remainder=function(e,t){return e%t},t.round=function(e){if(isNaN(e))throw new TypeError("expected a number");return Math.round(e)},t.subtract=function(e,t){if(isNaN(e))throw new TypeError("expected the first argument to be a number");if(isNaN(t))throw new TypeError("expected the second argument to be a number");return Number(e)-Number(t)},t.sum=function(){for(var e=[].concat.apply([],arguments),t=e.length,r=0;t--;)isNaN(e[t])||(r+=Number(e[t]));return r},t.times=function(){return t.multiply.apply(this,arguments)}})),Uy=Zc((function(e){var t=e.exports;t.frame=function(e,t){"object"==typeof e&&e.hash&&(e=(t=e).data);var r=ef(e);return"object"!=typeof t&&(t={}),r.extend(t.hash),t.fn(this,{data:r})},t.option=function(e,t,r){return Nm(_m.options(this,t,r),e)},t.noop=function(e){return e.fn(this)},t.typeOf=pp,t.withHash=function(e){return e.hash&&Object.keys(e.hash).length?e.fn(e.hash):e.inverse(this)}})),Gy=Zc((function(e){var t=e.exports;t.bytes=function(e,t,r){if(null==e)return"0 B";if(isNaN(e)&&!(e=e.length))return"0 B";isNaN(t)&&(t=2);var n=["B","kB","MB","GB","TB","PB","EB","ZB","YB"];t=Math.pow(10,t),e=Number(e);for(var i=n.length-1;i-- >=0;){var o=Math.pow(10,3*i);if(o<=e+1){e=Math.round(e*t/o)/t,e+=" "+n[i];break}}return e},t.addCommas=function(e){return e.toString().replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,")},t.phoneNumber=function(e){return"("+(e=e.toString()).substr(0,3)+") "+e.substr(3,3)+"-"+e.substr(6,4)},t.toAbbr=function(e,t){isNaN(e)&&(e=0),_m.isUndefined(t)&&(t=2),e=Number(e),t=Math.pow(10,t);for(var r=["k","m","b","t","q"],n=r.length-1;n>=0;){var i=Math.pow(10,3*(n+1));if(i<=e+1){e=Math.round(e*t/i)/t,e+=r[n];break}n--}return e},t.toExponential=function(e,t){return isNaN(e)&&(e=0),_m.isUndefined(t)&&(t=0),Number(e).toExponential(t)},t.toFixed=function(e,t){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),Number(e).toFixed(t)},t.toFloat=function(e){return parseFloat(e)},t.toInt=function(e){return parseInt(e,10)},t.toPrecision=function(e,t){return isNaN(e)&&(e=0),isNaN(t)&&(t=1),Number(e).toPrecision(t)}})),Wy={}.toString,Xy=Array.isArray||function(e){return"[object Array]"==Wy.call(e)},Vy=Yy;function Yy(e,t,r){if("string"!=typeof e)throw new TypeError("relative expects a string.");if(""==e&&!t)return e;var n=arguments.length;1===n&&(t=e,e=jd.cwd(),r=null),2===n&&"boolean"==typeof t&&(t=e,e=jd.cwd(),r=!0),2===n&&"object"==typeof t&&(r=t,t=e,e=jd.cwd());var i=t,o=Zy(e,"/"),a=Zy(t,"/");e=Ky(e),t=Ky(t),o&&(e+="/"),ex(e,r)&&(e=zf.dirname(e));var s=zf.relative(e,t);if(""===s)return".";var c=Jy(i,"/");return a&&(s===c||Zy(s,c))&&(s+="/"),s}function Ky(e){return e.replace(/[\\\/]+/g,"/")}function Jy(e,t){return e.slice(0,e.length-t.length)}function Zy(e,t){return e.slice(-t.length)[0]===t}function Qy(e){try{return np.statSync(e)}catch(e){}return null}function ex(e,t){return!0===t&&(t=Qy(e)),!function(e,t){if(Zy(e,"/"))return!0;if(null===t&&(t=Qy(e)),null!=(r=t)&&"object"==typeof r&&!1===Xy(r)&&"function"==typeof t.isDirectory)return t.isDirectory();var r,n=e.split("/"),i=n[n.length-1];return!i||-1===i.indexOf(".")}(e,t)}Yy.toBase=function(e,t){e=Ky(e);var r=(t=Ky(t)).slice(e.length);return"/"===r.charAt(0)&&(r=r.slice(1)),r};var tx=Zc((function(e){var t=e.exports;t.absolute=function(e,t){t=t||{data:{}};var r=_m.options(this,t),n=Object.assign({},t.data.root,r).cwd||jd.cwd();return zf.resolve(n,e)},t.dirname=function(e,t){if("string"!=typeof e)throw new TypeError(_m.expectedType("filepath","string",e));return zf.dirname(e)},t.relative=function(e,t){if("string"!=typeof e)throw new TypeError(_m.expectedType("first path","string",e));if("string"!=typeof t)throw new TypeError(_m.expectedType("second path","string",t));return Vy(e,t)},t.basename=function(e){if("string"!=typeof e)throw new TypeError(_m.expectedType("filepath","string",e));return zf.basename(e)},t.stem=function(e){if("string"!=typeof e)throw new TypeError(_m.expectedType("filepath","string",e));return zf.basename(e,zf.extname(e))},t.extname=function(e){if("string"!=typeof e)throw new TypeError(_m.expectedType("filepath","string",e));return zf.extname(e)},t.resolve=function(e){var t=[].slice.call(arguments),r=_m.options(this,t.pop()),n=zf.resolve(r.cwd||jd.cwd());return t.unshift(n),zf.resolve.apply(zf,t)},t.segments=function(e,t,r){if("string"!=typeof e)throw new TypeError(_m.expectedType("filepath","string",e));return e.split(/[\\\/]+/).slice(t,r).join("/")}})),rx=Zc((function(e){var t=e.exports;t.toRegex=function(e,t,r){var n=_m.options({},t,r);return new RegExp(e,n.flags)},t.test=function(e,t){if("string"!=typeof e)return!1;if("regexp"!==pp(t))throw new TypeError("expected a regular expression");return t.test(e)}})),nx=Zc((function(e,t){var r=e.exports;r.append=function(e,t){return"string"==typeof e&&"string"==typeof t?e+t:e},r.camelcase=function(e){return"string"!=typeof e?"":Of.changecase(e,(function(e){return e.toUpperCase()}))},r.capitalize=function(e){return"string"!=typeof e?"":e.charAt(0).toUpperCase()+e.slice(1)},r.capitalizeAll=function(e){return"string"!=typeof e?"":_m.isString(e)?e.replace(/\w\S*/g,(function(e){return r.capitalize(e)})):void 0},r.center=function(e,t){if("string"!=typeof e)return"";for(var r="",n=0;n<t;)r+="&nbsp;",n++;return r+e+r},r.chop=function(e){return"string"!=typeof e?"":Of.chop(e)},r.dashcase=function(e){return"string"!=typeof e?"":Of.changecase(e,(function(e){return"-"+e}))},r.dotcase=function(e){return"string"!=typeof e?"":Of.changecase(e,(function(e){return"."+e}))},r.downcase=function(){return r.lowercase.apply(this,arguments)},r.ellipsis=function(e,t){if(_m.isString(e))return e.length<=t?e:r.truncate(e,t)+"…"},r.hyphenate=function(e){return"string"!=typeof e?"":e.split(" ").join("-")},r.isString=function(e){return"string"==typeof e},r.lowercase=function(e){return _m.isObject(e)&&e.fn?e.fn(this).toLowerCase():"string"!=typeof e?"":e.toLowerCase()},r.occurrences=function(e,t){if("string"!=typeof e)return"";for(var r=t.length,n=0,i=0;(n=e.indexOf(t,n))>-1;)i++,n+=r;return i},r.pascalcase=function(e){return"string"!=typeof e?"":(e=Of.changecase(e,(function(e){return e.toUpperCase()}))).charAt(0).toUpperCase()+e.slice(1)},r.pathcase=function(e){return"string"!=typeof e?"":Of.changecase(e,(function(e){return"/"+e}))},r.plusify=function(e,t){return"string"!=typeof e?"":(_m.isString(t)||(t=" "),e.split(t).join("+"))},r.prepend=function(e,t){return"string"==typeof e&&"string"==typeof t?t+e:e},r.raw=function(e){var t=e.fn();if(!1!==_m.options(this,e).escape)for(var r=0;-1!==(r=t.indexOf("{{",r));)"\\"!==t[r-1]&&(t=t.slice(0,r)+"\\"+t.slice(r)),r+=3;return t},r.remove=function(e,t){return"string"!=typeof e?"":_m.isString(t)?e.split(t).join(""):e},r.removeFirst=function(e,t){return"string"!=typeof e?"":_m.isString(t)?e.replace(t,""):e},r.replace=function(e,t,r){return"string"!=typeof e?"":_m.isString(t)?(_m.isString(r)||(r=""),e.split(t).join(r)):e},r.replaceFirst=function(e,t,r){return"string"!=typeof e?"":_m.isString(t)?(_m.isString(r)||(r=""),e.replace(t,r)):e},r.reverse=function(e){return"string"!=typeof e?"":e.split("").reverse().join("")},r.sentence=function(e){return"string"!=typeof e?"":e.replace(/((?:\S[^\.\?\!]*)[\.\?\!]*)/g,(function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}))},r.snakecase=function(e){return"string"!=typeof e?"":Of.changecase(e,(function(e){return"_"+e}))},r.split=function(e,t){return"string"!=typeof e?"":(_m.isString(t)||(t=","),e.split(t))},r.startsWith=function(e,t,r){var n=[].slice.call(arguments);return r=n.pop(),_m.isString(t)&&0===t.indexOf(e)?r.fn(this):"function"==typeof r.inverse?r.inverse(this):""},r.titleize=function(e){if("string"!=typeof e)return"";for(var r=e.replace(/[- _]+/g," ").split(" "),n=r.length,i=[],o=0;n--;){var a=r[o++];i.push(t.capitalize(a))}return i.join(" ")},r.trim=function(e){return"string"==typeof e?e.trim():""},r.trimLeft=function(e){if(_m.isString(e))return e.replace(/^\s+/,"")},r.trimRight=function(e){if(_m.isString(e))return e.replace(/\s+$/,"")},r.truncate=function(e,t,r){if(_m.isString(e))return"string"!=typeof r&&(r=""),e.length>t?e.slice(0,t-r.length)+r:e},r.truncateWords=function(e,t,r){if(_m.isString(e)&&!isNaN(t)){"string"!=typeof r&&(r="…");var n=Number(t),i=e.split(/[ \t]/);return n>i.length&&(i=i.slice(0,n)),i.join(" ").trim()+r}},r.upcase=function(){return r.uppercase.apply(this,arguments)},r.uppercase=function(e){return _m.isObject(e)&&e.fn?e.fn(this).toUpperCase():"string"!=typeof e?"":e.toUpperCase()}})),ix=/[^\x20-\x7E]/,ox=/[\x2E\u3002\uFF0E\uFF61]/g,ax={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},sx=Math.floor,cx=String.fromCharCode;function lx(e){throw new RangeError(ax[e])}function ux(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function px(e,t,r){var n=0;for(e=r?sx(e/700):e>>1,e+=sx(e/t);e>455;n+=36)e=sx(e/35);return sx(n+36*e/(e+38))}function dx(e){return function(e,t){var r=e.split("@"),n="";r.length>1&&(n=r[0]+"@",e=r[1]);var i=function(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}((e=e.replace(ox,".")).split("."),(function(e){return ix.test(e)?"xn--"+function(e){var t,r,n,i,o,a,s,c,l,u,p,d,m,f,h,g=[];for(d=(e=function(e){for(var t,r,n=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(r=e.charCodeAt(i++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--):n.push(t);return n}(e)).length,t=128,r=0,o=72,a=0;a<d;++a)(p=e[a])<128&&g.push(cx(p));for(n=i=g.length,i&&g.push("-");n<d;){for(s=2147483647,a=0;a<d;++a)(p=e[a])>=t&&p<s&&(s=p);for(s-t>sx((2147483647-r)/(m=n+1))&&lx("overflow"),r+=(s-t)*m,t=s,a=0;a<d;++a)if((p=e[a])<t&&++r>2147483647&&lx("overflow"),p==t){for(c=r,l=36;!(c<(u=l<=o?1:l>=o+26?26:l-o));l+=36)h=c-u,f=36-u,g.push(cx(ux(u+h%f,0))),c=sx(h/f);g.push(cx(ux(c,0))),o=px(r,m,n==i),r=0,++n}++r,++t}return g.join("")}(e):e})).join(".");return n+i}(e)}function mx(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var fx=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function hx(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}}function gx(e,t,r,n){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?vx(bx(e),(function(n){var i=encodeURIComponent(hx(n))+r;return fx(e[n])?vx(e[n],(function(e){return i+encodeURIComponent(hx(e))})).join(t):i+encodeURIComponent(hx(e[n]))})).join(t):n?encodeURIComponent(hx(n))+r+encodeURIComponent(hx(e)):""}function vx(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var bx=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t};function yx(e,t,r,n){t=t||"&",r=r||"=";var i={};if("string"!=typeof e||0===e.length)return i;var o=/\+/g;e=e.split(t);var a=1e3;n&&"number"==typeof n.maxKeys&&(a=n.maxKeys);var s=e.length;a>0&&s>a&&(s=a);for(var c=0;c<s;++c){var l,u,p,d,m=e[c].replace(o,"%20"),f=m.indexOf(r);f>=0?(l=m.substr(0,f),u=m.substr(f+1)):(l=m,u=""),p=decodeURIComponent(l),d=decodeURIComponent(u),mx(i,p)?fx(i[p])?i[p].push(d):i[p]=[i[p],d]:i[p]=d}return i}var xx={encode:gx,stringify:gx,decode:yx,parse:yx},wx=Object.freeze({__proto__:null,stringify:gx,parse:yx,default:xx,encode:gx,decode:yx}),kx={parse:Bx,resolve:Rx,resolveObject:Nx,format:jx,Url:Cx};function Cx(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var zx=/^([a-z0-9.+-]+:)/i,Sx=/:[0-9]*$/,Ax=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Dx=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),Tx=["'"].concat(Dx),$x=["%","/","?",";","#"].concat(Tx),_x=["/","?","#"],Ex=/^[+a-z0-9A-Z_-]{0,63}$/,Mx=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Lx={javascript:!0,"javascript:":!0},Ix={javascript:!0,"javascript:":!0},Ox={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Bx(e,t,r){if(e&&sm(e)&&e instanceof Cx)return e;var n=new Cx;return n.parse(e,t,r),n}function Px(e,t,r,n){if(!nm(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var i=t.indexOf("?"),o=-1!==i&&i<t.indexOf("#")?"?":"#",a=t.split(o);a[0]=a[0].replace(/\\/g,"/");var s=t=a.join(o);if(s=s.trim(),!n&&1===t.split("#").length){var c=Ax.exec(s);if(c)return e.path=s,e.href=s,e.pathname=c[1],c[2]?(e.search=c[2],e.query=r?yx(e.search.substr(1)):e.search.substr(1)):r&&(e.search="",e.query={}),e}var l,u,p,d,m=zx.exec(s);if(m){var f=(m=m[0]).toLowerCase();e.protocol=f,s=s.substr(m.length)}if(n||m||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var h="//"===s.substr(0,2);!h||m&&Ix[m]||(s=s.substr(2),e.slashes=!0)}if(!Ix[m]&&(h||m&&!Ox[m])){var g,v,b=-1;for(l=0;l<_x.length;l++)-1!==(u=s.indexOf(_x[l]))&&(-1===b||u<b)&&(b=u);for(-1!==(v=-1===b?s.lastIndexOf("@"):s.lastIndexOf("@",b))&&(g=s.slice(0,v),s=s.slice(v+1),e.auth=decodeURIComponent(g)),b=-1,l=0;l<$x.length;l++)-1!==(u=s.indexOf($x[l]))&&(-1===b||u<b)&&(b=u);-1===b&&(b=s.length),e.host=s.slice(0,b),s=s.slice(b),qx(e),e.hostname=e.hostname||"";var y="["===e.hostname[0]&&"]"===e.hostname[e.hostname.length-1];if(!y){var x=e.hostname.split(/\./);for(l=0,p=x.length;l<p;l++){var w=x[l];if(w&&!w.match(Ex)){for(var k="",C=0,z=w.length;C<z;C++)w.charCodeAt(C)>127?k+="x":k+=w[C];if(!k.match(Ex)){var S=x.slice(0,l),A=x.slice(l+1),D=w.match(Mx);D&&(S.push(D[1]),A.unshift(D[2])),A.length&&(s="/"+A.join(".")+s),e.hostname=S.join(".");break}}}}e.hostname.length>255?e.hostname="":e.hostname=e.hostname.toLowerCase(),y||(e.hostname=dx(e.hostname)),d=e.port?":"+e.port:"";var T=e.hostname||"";e.host=T+d,e.href+=e.host,y&&(e.hostname=e.hostname.substr(1,e.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!Lx[f])for(l=0,p=Tx.length;l<p;l++){var $=Tx[l];if(-1!==s.indexOf($)){var _=encodeURIComponent($);_===$&&(_=escape($)),s=s.split($).join(_)}}var E=s.indexOf("#");-1!==E&&(e.hash=s.substr(E),s=s.slice(0,E));var M=s.indexOf("?");if(-1!==M?(e.search=s.substr(M),e.query=s.substr(M+1),r&&(e.query=yx(e.query)),s=s.slice(0,M)):r&&(e.search="",e.query={}),s&&(e.pathname=s),Ox[f]&&e.hostname&&!e.pathname&&(e.pathname="/"),e.pathname||e.search){d=e.pathname||"";var L=e.search||"";e.path=d+L}return e.href=Fx(e),e}function jx(e){return nm(e)&&(e=Px({},e)),Fx(e)}function Fx(e){var t=e.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var r=e.protocol||"",n=e.pathname||"",i=e.hash||"",o=!1,a="";e.host?o=t+e.host:e.hostname&&(o=t+(-1===e.hostname.indexOf(":")?e.hostname:"["+this.hostname+"]"),e.port&&(o+=":"+e.port)),e.query&&sm(e.query)&&Object.keys(e.query).length&&(a=gx(e.query));var s=e.search||a&&"?"+a||"";return r&&":"!==r.substr(-1)&&(r+=":"),e.slashes||(!r||Ox[r])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),i&&"#"!==i.charAt(0)&&(i="#"+i),s&&"?"!==s.charAt(0)&&(s="?"+s),r+o+(n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+i}function Rx(e,t){return Bx(e,!1,!0).resolve(t)}function Nx(e,t){return e?Bx(e,!1,!0).resolveObject(t):t}function qx(e){var t=e.host,r=Sx.exec(t);r&&(":"!==(r=r[0])&&(e.port=r.substr(1)),t=t.substr(0,t.length-r.length)),t&&(e.hostname=t)}Cx.prototype.parse=function(e,t,r){return Px(this,e,t,r)},Cx.prototype.format=function(){return Fx(this)},Cx.prototype.resolve=function(e){return this.resolveObject(Bx(e,!1,!0)).format()},Cx.prototype.resolveObject=function(e){if(nm(e)){var t=new Cx;t.parse(e,!1,!0),e=t}for(var r,n=new Cx,i=Object.keys(this),o=0;o<i.length;o++){var a=i[o];n[a]=this[a]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),c=0;c<s.length;c++){var l=s[c];"protocol"!==l&&(n[l]=e[l])}return Ox[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!Ox[e.protocol]){for(var u=Object.keys(e),p=0;p<u.length;p++){var d=u[p];n[d]=e[d]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||Ix[e.protocol])n.pathname=e.pathname;else{for(r=(e.pathname||"").split("/");r.length&&!(e.host=r.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==r[0]&&r.unshift(""),r.length<2&&r.unshift(""),n.pathname=r.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var m=n.pathname||"",f=n.search||"";n.path=m+f}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var h,g=n.pathname&&"/"===n.pathname.charAt(0),v=e.host||e.pathname&&"/"===e.pathname.charAt(0),b=v||g||n.host&&e.pathname,y=b,x=n.pathname&&n.pathname.split("/")||[],w=n.protocol&&!Ox[n.protocol];if(r=e.pathname&&e.pathname.split("/")||[],w&&(n.hostname="",n.port=null,n.host&&(""===x[0]?x[0]=n.host:x.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===r[0]?r[0]=e.host:r.unshift(e.host)),e.host=null),b=b&&(""===r[0]||""===x[0])),v)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,x=r;else if(r.length)x||(x=[]),x.pop(),x=x.concat(r),n.search=e.search,n.query=e.query;else if(!tm(e.search))return w&&(n.hostname=n.host=x.shift(),(h=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=h.shift(),n.host=n.hostname=h.shift())),n.search=e.search,n.query=e.query,em(n.pathname)&&em(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n;if(!x.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var k=x.slice(-1)[0],C=(n.host||e.host||x.length>1)&&("."===k||".."===k)||""===k,z=0,S=x.length;S>=0;S--)"."===(k=x[S])?x.splice(S,1):".."===k?(x.splice(S,1),z++):z&&(x.splice(S,1),z--);if(!b&&!y)for(;z--;z)x.unshift("..");!b||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),C&&"/"!==x.join("/").substr(-1)&&x.push("");var A=""===x[0]||x[0]&&"/"===x[0].charAt(0);return w&&(n.hostname=n.host=A?"":x.length?x.shift():"",(h=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=h.shift(),n.host=n.hostname=h.shift())),(b=b||n.host&&x.length)&&!A&&x.unshift(""),x.length?n.pathname=x.join("/"):(n.pathname=null,n.path=null),em(n.pathname)&&em(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},Cx.prototype.parseHost=function(){return qx(this)};var Hx=Jc(Object.freeze({__proto__:null,parse:Bx,resolve:Rx,resolveObject:Nx,format:jx,default:kx,Url:Cx})),Ux=Jc(wx),Gx=Zc((function(e){var t=e.exports;t.encodeURI=function(e){if(_m.isString(e))return encodeURIComponent(e)},t.escape=function(e){if(_m.isString(e))return Ux.escape(e)},t.decodeURI=function(e){if(_m.isString(e))return decodeURIComponent(e)},t.url_encode=function(){return t.encodeURI.apply(this,arguments)},t.url_decode=function(e){return t.decodeURI.apply(this,arguments)},t.urlResolve=function(e,t){return Hx.resolve(e,t)},t.urlParse=function(e){return Hx.parse(e)},t.stripQuerystring=function(e){if(_m.isString(e))return e.split("?")[0]},t.stripProtocol=function(e){if(_m.isString(e)){var t=Hx.parse(e);return t.protocol="",t.format()}}})),Wx={array:tf,code:Sf,collection:$f,comparison:Ff,html:qf,i18n:Hf,inflection:Uf,match:qy,math:Hy,misc:Uy,number:Gy,object:Tf,path:tx,regex:rx,string:nx,url:Gx},Xx=Zc((function(e){e.exports=function(t,r){"string"==typeof t?t=[t]:Array.isArray(t)||(r=t,t=null);var n=(r=r||{}).handlebars||r.hbs||op;return vp(e.exports,"handlebars",n),t?t.forEach((function(e){n.registerHelper(Wx[e])})):cp(Wx,(function(e,t){n.registerHelper(e)})),n.helpers},cp(Wx,(function(t,r){vp(e.exports,r,(function(r){var n=(r=r||{}).handlebars||r.hbs||op;return vp(e.exports,"handlebars",n),n.registerHelper(t),n.helpers}))})),e.exports.utils=Of})),Vx=Zc((function(e,t){e.exports=function(){var e=6e4,t=36e5,r="millisecond",n="second",i="minute",o="hour",a="day",s="week",c="month",l="quarter",u="year",p="date",d="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,h={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},g=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},v={s:g,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),i=r%60;return(t<=0?"+":"-")+g(n,2,"0")+":"+g(i,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),i=t.clone().add(n,c),o=r-i<0,a=t.clone().add(n+(o?-1:1),c);return+(-(n+(r-i)/(o?i-a:a-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:u,w:s,d:a,D:p,h:o,m:i,s:n,ms:r,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",y={};y[b]=h;var x=function(e){return e instanceof z},w=function(e,t,r){var n;if(!e)return b;if("string"==typeof e)y[e]&&(n=e),t&&(y[e]=t,n=e);else{var i=e.name;y[i]=e,n=i}return!r&&n&&(b=n),n||!r&&b},k=function(e,t){if(x(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new z(r)},C=v;C.l=w,C.i=x,C.w=function(e,t){return k(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var z=function(){function h(e){this.$L=w(e.locale,null,!0),this.parse(e)}var g=h.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(C.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(m);if(n){var i=n[2]-1||0,o=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,o)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,o)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return C},g.isValid=function(){return!(this.$d.toString()===d)},g.isSame=function(e,t){var r=k(e);return this.startOf(t)<=r&&r<=this.endOf(t)},g.isAfter=function(e,t){return k(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<k(e)},g.$g=function(e,t,r){return C.u(e)?this[t]:this.set(r,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var r=this,l=!!C.u(t)||t,d=C.p(e),m=function(e,t){var n=C.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return l?n:n.endOf(a)},f=function(e,t){return C.w(r.toDate()[e].apply(r.toDate("s"),(l?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},h=this.$W,g=this.$M,v=this.$D,b="set"+(this.$u?"UTC":"");switch(d){case u:return l?m(1,0):m(31,11);case c:return l?m(1,g):m(0,g+1);case s:var y=this.$locale().weekStart||0,x=(h<y?h+7:h)-y;return m(l?v-x:v+(6-x),g);case a:case p:return f(b+"Hours",0);case o:return f(b+"Minutes",1);case i:return f(b+"Seconds",2);case n:return f(b+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var s,l=C.p(e),d="set"+(this.$u?"UTC":""),m=(s={},s[a]=d+"Date",s[p]=d+"Date",s[c]=d+"Month",s[u]=d+"FullYear",s[o]=d+"Hours",s[i]=d+"Minutes",s[n]=d+"Seconds",s[r]=d+"Milliseconds",s)[l],f=l===a?this.$D+(t-this.$W):t;if(l===c||l===u){var h=this.clone().set(p,1);h.$d[m](f),h.init(),this.$d=h.set(p,Math.min(this.$D,h.daysInMonth())).$d}else m&&this.$d[m](f);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[C.p(e)]()},g.add=function(r,l){var p,d=this;r=Number(r);var m=C.p(l),f=function(e){var t=k(d);return C.w(t.date(t.date()+Math.round(e*r)),d)};if(m===c)return this.set(c,this.$M+r);if(m===u)return this.set(u,this.$y+r);if(m===a)return f(1);if(m===s)return f(7);var h=(p={},p[i]=e,p[o]=t,p[n]=1e3,p)[m]||1,g=this.$d.getTime()+r*h;return C.w(g,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||d;var n=e||"YYYY-MM-DDTHH:mm:ssZ",i=C.z(this),o=this.$H,a=this.$m,s=this.$M,c=r.weekdays,l=r.months,u=function(e,r,i,o){return e&&(e[r]||e(t,n))||i[r].substr(0,o)},p=function(e){return C.s(o%12||12,e,"0")},m=r.meridiem||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n},h={YY:String(this.$y).slice(-2),YYYY:this.$y,M:s+1,MM:C.s(s+1,2,"0"),MMM:u(r.monthsShort,s,l,3),MMMM:u(l,s),D:this.$D,DD:C.s(this.$D,2,"0"),d:String(this.$W),dd:u(r.weekdaysMin,this.$W,c,2),ddd:u(r.weekdaysShort,this.$W,c,3),dddd:c[this.$W],H:String(o),HH:C.s(o,2,"0"),h:p(1),hh:p(2),a:m(o,a,!0),A:m(o,a,!1),m:String(a),mm:C.s(a,2,"0"),s:String(this.$s),ss:C.s(this.$s,2,"0"),SSS:C.s(this.$ms,3,"0"),Z:i};return n.replace(f,(function(e,t){return t||h[e]||i.replace(":","")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(r,p,d){var m,f=C.p(p),h=k(r),g=(h.utcOffset()-this.utcOffset())*e,v=this-h,b=C.m(this,h);return b=(m={},m[u]=b/12,m[c]=b,m[l]=b/3,m[s]=(v-g)/6048e5,m[a]=(v-g)/864e5,m[o]=v/t,m[i]=v/e,m[n]=v/1e3,m)[f]||v,d?b:C.a(b)},g.daysInMonth=function(){return this.endOf(c).$D},g.$locale=function(){return y[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=w(e,t,!0);return n&&(r.$L=n),r},g.clone=function(){return C.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},h}(),S=z.prototype;return k.prototype=S,[["$ms",r],["$s",n],["$m",i],["$H",o],["$W",a],["$M",c],["$y",u],["$D",p]].forEach((function(e){S[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),k.extend=function(e,t){return e.$i||(e(t,z,k),e.$i=!0),k},k.locale=w,k.isDayjs=x,k.unix=function(e){return k(1e3*e)},k.en=y[b],k.Ls=y,k.p={},k}()})),Yx=Zc((function(e,t){e.exports=function(){var e,t,r=1e3,n=6e4,i=36e5,o=864e5,a=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,s=31536e6,c=2592e6,l=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,u={years:s,months:c,days:o,hours:i,minutes:n,seconds:r,milliseconds:1,weeks:6048e5},p=function(e){return e instanceof b},d=function(e,t,r){return new b(e,r,t.$l)},m=function(e){return t.p(e)+"s"},f=function(e){return e<0},h=function(e){return f(e)?Math.ceil(e):Math.floor(e)},g=function(e){return Math.abs(e)},v=function(e,t){return e?f(e)?{negative:!0,format:""+g(e)+t}:{negative:!1,format:""+e+t}:{negative:!1,format:""}},b=function(){function f(e,t,r){var n=this;if(this.$d={},this.$l=r,void 0===e&&(this.$ms=0,this.parseFromMilliseconds()),t)return d(e*u[m(t)],this);if("number"==typeof e)return this.$ms=e,this.parseFromMilliseconds(),this;if("object"==typeof e)return Object.keys(e).forEach((function(t){n.$d[m(t)]=e[t]})),this.calMilliseconds(),this;if("string"==typeof e){var i=e.match(l);if(i){var o=i.slice(2).map((function(e){return null!=e?Number(e):0}));return this.$d.years=o[0],this.$d.months=o[1],this.$d.weeks=o[2],this.$d.days=o[3],this.$d.hours=o[4],this.$d.minutes=o[5],this.$d.seconds=o[6],this.calMilliseconds(),this}}return this}var g=f.prototype;return g.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function(t,r){return t+(e.$d[r]||0)*u[r]}),0)},g.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=h(e/s),e%=s,this.$d.months=h(e/c),e%=c,this.$d.days=h(e/o),e%=o,this.$d.hours=h(e/i),e%=i,this.$d.minutes=h(e/n),e%=n,this.$d.seconds=h(e/r),e%=r,this.$d.milliseconds=e},g.toISOString=function(){var e=v(this.$d.years,"Y"),t=v(this.$d.months,"M"),r=+this.$d.days||0;this.$d.weeks&&(r+=7*this.$d.weeks);var n=v(r,"D"),i=v(this.$d.hours,"H"),o=v(this.$d.minutes,"M"),a=this.$d.seconds||0;this.$d.milliseconds&&(a+=this.$d.milliseconds/1e3);var s=v(a,"S"),c=e.negative||t.negative||n.negative||i.negative||o.negative||s.negative,l=i.format||o.format||s.format?"T":"",u=(c?"-":"")+"P"+e.format+t.format+n.format+l+i.format+o.format+s.format;return"P"===u||"-P"===u?"P0D":u},g.toJSON=function(){return this.toISOString()},g.format=function(e){var r=e||"YYYY-MM-DDTHH:mm:ss",n={Y:this.$d.years,YY:t.s(this.$d.years,2,"0"),YYYY:t.s(this.$d.years,4,"0"),M:this.$d.months,MM:t.s(this.$d.months,2,"0"),D:this.$d.days,DD:t.s(this.$d.days,2,"0"),H:this.$d.hours,HH:t.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,"0"),SSS:t.s(this.$d.milliseconds,3,"0")};return r.replace(a,(function(e,t){return t||String(n[e])}))},g.as=function(e){return this.$ms/u[m(e)]},g.get=function(e){var t=this.$ms,r=m(e);return"milliseconds"===r?t%=1e3:t="weeks"===r?h(t/u[r]):this.$d[r],0===t?0:t},g.add=function(e,t,r){var n;return n=t?e*u[m(t)]:p(e)?e.$ms:d(e,this).$ms,d(this.$ms+n*(r?-1:1),this)},g.subtract=function(e,t){return this.add(e,t,!0)},g.locale=function(e){var t=this.clone();return t.$l=e,t},g.clone=function(){return d(this.$ms,this)},g.humanize=function(t){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!t)},g.milliseconds=function(){return this.get("milliseconds")},g.asMilliseconds=function(){return this.as("milliseconds")},g.seconds=function(){return this.get("seconds")},g.asSeconds=function(){return this.as("seconds")},g.minutes=function(){return this.get("minutes")},g.asMinutes=function(){return this.as("minutes")},g.hours=function(){return this.get("hours")},g.asHours=function(){return this.as("hours")},g.days=function(){return this.get("days")},g.asDays=function(){return this.as("days")},g.weeks=function(){return this.get("weeks")},g.asWeeks=function(){return this.as("weeks")},g.months=function(){return this.get("months")},g.asMonths=function(){return this.as("months")},g.years=function(){return this.get("years")},g.asYears=function(){return this.as("years")},f}();return function(r,n,i){e=i,t=i().$utils(),i.duration=function(e,t){var r=i.locale();return d(e,{$l:r},t)},i.isDuration=p;var o=n.prototype.add,a=n.prototype.subtract;n.prototype.add=function(e,t){return p(e)&&(e=e.asMilliseconds()),o.bind(this)(e,t)},n.prototype.subtract=function(e,t){return p(e)&&(e=e.asMilliseconds()),a.bind(this)(e,t)}}}()})),Kx=Zc((function(e,t){e.exports=function(e,t,r){var n=t.prototype,i=n.format;r.en.ordinal=function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"},n.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return i.bind(this)(e);var n=this.$utils(),o=(e||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case"Q":return Math.ceil((t.$M+1)/3);case"Do":return r.ordinal(t.$D);case"gggg":return t.weekYear();case"GGGG":return t.isoWeekYear();case"wo":return r.ordinal(t.week(),"W");case"w":case"ww":return n.s(t.week(),"w"===e?1:2,"0");case"W":case"WW":return n.s(t.isoWeek(),"W"===e?1:2,"0");case"k":case"kk":return n.s(String(0===t.$H?24:t.$H),"k"===e?1:2,"0");case"X":return Math.floor(t.$d.getTime()/1e3);case"x":return t.$d.getTime();case"z":return"["+t.offsetName()+"]";case"zzz":return"["+t.offsetName("long")+"]";default:return e}}));return i.bind(this)(o)}}})),Jx=Zc((function(e,t){e.exports=function(e,t,r){e=e||{};var n=t.prototype,i={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function o(e,t,r,i){return n.fromToBase(e,t,r,i)}r.en.relativeTime=i,n.fromToBase=function(t,n,o,a,s){for(var c,l,u,p=o.$locale().relativeTime||i,d=e.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],m=d.length,f=0;f<m;f+=1){var h=d[f];h.d&&(c=a?r(t).diff(o,h.d,!0):o.diff(t,h.d,!0));var g=(e.rounding||Math.round)(Math.abs(c));if(u=c>0,g<=h.r||!h.r){g<=1&&f>0&&(h=d[f-1]);var v=p[h.l];s&&(g=s(""+g)),l="string"==typeof v?v.replace("%d",g):v(g,n,h.l,u);break}}if(n)return l;var b=u?p.future:p.past;return"function"==typeof b?b(l):b.replace("%s",l)},n.to=function(e,t){return o(e,t,this,!0)},n.from=function(e,t){return o(e,t,this)};var a=function(e){return e.$u?r.utc():r()};n.toNow=function(e){return this.to(a(this),e)},n.fromNow=function(e){return this.from(a(this),e)}}})),Zx=Zc((function(e,t){var r,n,i;e.exports=(r="minute",n=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g,function(e,t,o){var a=t.prototype;o.utc=function(e){return new t({date:e,utc:!0,args:arguments})},a.utc=function(e){var t=o(this.toDate(),{locale:this.$L,utc:!0});return e?t.add(this.utcOffset(),r):t},a.local=function(){return o(this.toDate(),{locale:this.$L,utc:!1})};var s=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var c=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else c.call(this)};var l=a.utcOffset;a.utcOffset=function(e,t){var o=this.$utils().u;if(o(e))return this.$u?0:o(this.$offset)?l.call(this):this.$offset;if("string"==typeof e&&null===(e=function(e){void 0===e&&(e="");var t=e.match(n);if(!t)return null;var r=(""+t[0]).match(i)||["-",0,0],o=r[0],a=60*+r[1]+ +r[2];return 0===a?0:"+"===o?a:-a}(e)))return this;var a=Math.abs(e)<=16?60*e:e,s=this;if(t)return s.$offset=a,s.$u=0===e,s;if(0!==e){var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(s=this.local().add(a+c,r)).$offset=a,s.$x.$localOffset=c}else s=this.utc();return s};var u=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return u.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||(new Date).getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var p=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?o(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():p.call(this)};var d=a.diff;a.diff=function(e,t,r){if(e&&this.$u===e.$u)return d.call(this,e,t,r);var n=this.local(),i=o(e).local();return d.call(n,i,t,r)}})})),Qx=Zc((function(e,t){var r,n;e.exports=(r={year:0,month:1,day:2,hour:3,minute:4,second:5},n={},function(e,t,i){var o,a=function(e,t,r){void 0===r&&(r={});var i=new Date(e);return function(e,t){void 0===t&&(t={});var r=t.timeZoneName||"short",i=e+"|"+r,o=n[i];return o||(o=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:r}),n[i]=o),o}(t,r).formatToParts(i)},s=function(e,t){for(var n=a(e,t),o=[],s=0;s<n.length;s+=1){var c=n[s],l=c.type,u=c.value,p=r[l];p>=0&&(o[p]=parseInt(u,10))}var d=o[3],m=24===d?0:d,f=o[0]+"-"+o[1]+"-"+o[2]+" "+m+":"+o[4]+":"+o[5]+":000",h=+e;return(i.utc(f).valueOf()-(h-=h%1e3))/6e4},c=t.prototype;c.tz=function(e,t){void 0===e&&(e=o);var r=this.utcOffset(),n=this.toDate(),a=n.toLocaleString("en-US",{timeZone:e}),s=Math.round((n-new Date(a))/1e3/60),c=i(a).$set("millisecond",this.$ms).utcOffset(15*-Math.round(n.getTimezoneOffset()/15)-s,!0);if(t){var l=c.utcOffset();c=c.add(r-l,"minute")}return c.$x.$timezone=e,c},c.offsetName=function(e){var t=this.$x.$timezone||i.tz.guess(),r=a(this.valueOf(),t,{timeZoneName:e}).find((function(e){return"timezonename"===e.type.toLowerCase()}));return r&&r.value};var l=c.startOf;c.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return l.call(this,e,t);var r=i(this.format("YYYY-MM-DD HH:mm:ss:SSS"));return l.call(r,e,t).tz(this.$x.$timezone,!0)},i.tz=function(e,t,r){var n=r&&t,a=r||t||o,c=s(+i(),a);if("string"!=typeof e)return i(e).tz(a);var l=function(e,t,r){var n=e-60*t*1e3,i=s(n,r);if(t===i)return[n,t];var o=s(n-=60*(i-t)*1e3,r);return i===o?[n,i]:[e-60*Math.min(i,o)*1e3,Math.max(i,o)]}(i.utc(e,n).valueOf(),c,a),u=l[0],p=l[1],d=i(u).utcOffset(p);return d.$x.$timezone=a,d},i.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},i.tz.setDefault=function(e){o=e}})}));function ew(e){return"object"==typeof e&&"object"==typeof e.hash}function tw(e){return"object"==typeof e&&"object"==typeof e.options&&"object"==typeof e.app}function rw(e,t,r){if(ew(e))return rw({},t,e);if(ew(t))return rw(e,r,t);const n=tw(e)?e.context:{};ew(r=r||{})||(t=Object.assign({},t,r)),ew(r)&&!0===r.hash.root&&(t=Object.assign({},r.data.root,t));let i=Object.assign({},n,t,r.hash);return tw(e)||(i=Object.assign({},e,i)),tw(e)&&e.view&&e.view.data&&(i=Object.assign({},i,e.view.data)),i}function nw(e,t,r){return ew(t)&&(r=t,t=null),ew(e)&&(r=e,t=null,e=null),{str:e,pattern:t,options:r}}function iw(e,t,r){const n=nw(e,t,r),i=rw(this,{lang:"en",date:new Date(n.str)},{});Vx.locale(i.lang||i.language)}Vx.extend(Yx),Vx.extend(Kx),Vx.extend(Jx),Vx.extend(Zx),Vx.extend(Qx);var ow={date:(e,t,r)=>{const n=nw(e,t,r);if(null==n.str&&null==n.pattern)return Vx.locale("en"),Vx().format("MMMM DD, YYYY");iw(n.str,n.pattern,n.options);let i=Vx(new Date(n.str));return i="string"==typeof n.options?"utc"===n.options.toLowerCase()?i.utc():i.tz(n.options):i.tz(Vx.tz.guess()),""===n.pattern?i.toISOString():i.format(n.pattern)},duration:(e,t,r)=>{const n=nw(e,t);iw(n.str,n.pattern);const i=Vx.duration(n.str,n.pattern);return ew(r)?i.humanize():i.format(r)}},aw={HelperFunctionBuiltin:["#if","#unless","#each","#with","lookup","log","blockHelperMissing","each","helperMissing","if","unless","log","lookup","with"],HelperFunctionNames:{OBJECT:"object",ALL:"all",LITERAL:"literal",JS:"js"},LITERAL_MARKER:"%LITERAL%"},sw=Zc((function(e,t){const{date:r,duration:n}=ow,{HelperFunctionBuiltin:i}=aw,o=["math","array","number","url","string","comparison","object","regex"],a={date:r,duration:n};t.registerAll=e=>{for(let[t,r]of Object.entries(a))e.registerHelper(t,r);let r=[];for(let t of o){let n=Xx[t]();for(let e of Object.entries(n)){const t=e[0];-1===i.indexOf(t)&&-1===r.indexOf(t)&&r.push(t)}Xx[t]({handlebars:e})}t.externalHelperNames=r.concat(Object.keys(a))},t.unregisterAll=r=>{for(let e of Object.keys(a))r.unregisterHelper(e);for(let t of e.exports.externalHelperNames)r.unregisterHelper(t);t.externalHelperNames=[]},t.externalHelperNames=[]})),cw=Zc((function(e,t){const r=/^[A-Za-z0-9]+$/g;e.exports.FIND_HBS_REGEX=/{{([^{].*?)}}/g,e.exports.FIND_ANY_HBS_REGEX=/{?{{([^{].*?)}}}?/g,e.exports.FIND_TRIPLE_HBS_REGEX=/{{{([^{].*?)}}}/g,e.exports.findDoubleHbsInstances=e=>{let r=e;const n=new RegExp(t.FIND_HBS_REGEX),i=new RegExp(t.FIND_TRIPLE_HBS_REGEX),o=r.match(i);o&&o.forEach((e=>{r=r.replace(e,"")}));return r.match(n)||[]},e.exports.isAlphaNumeric=e=>e.match(r),e.exports.swapStrings=(e,t,r,n)=>e.slice(0,t)+n+e.slice(t+r),e.exports.removeHandlebarsStatements=(e,r="Invalid binding")=>{let n=new RegExp(t.FIND_HBS_REGEX),i=e.match(n);if(null==i)return e;for(let n of i){const i=e.indexOf(n);e=t.swapStrings(e,i,n.length,r)}return e},e.exports.btoa=e=>Ep.from(e,"utf-8").toString("base64"),e.exports.atob=e=>Ep.from(e,"base64").toString("utf-8")})),lw=Zc((function(e,t){(function(){function r(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function n(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(n,a,r(a),e)}return n}function i(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function o(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function a(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function s(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}function c(e,t){return!(null==e||!e.length)&&b(e,t,0)>-1}function l(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}function u(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}function p(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function d(e,t,r,n){var i=-1,o=null==e?0:e.length;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}function m(e,t,r,n){var i=null==e?0:e.length;for(n&&i&&(r=e[--i]);i--;)r=t(r,e[i],i,e);return r}function f(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function h(e){return e.match(Ye)||[]}function g(e,t,r){var n;return r(e,(function(e,r,i){if(t(e,r,i))return n=r,!1})),n}function v(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function b(e,t,r){return t==t?function(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}(e,t,r):v(e,x,r)}function y(e,t,r,n){for(var i=r-1,o=e.length;++i<o;)if(n(e[i],t))return i;return-1}function x(e){return e!=e}function w(e,t){var r=null==e?0:e.length;return r?S(e,t)/r:Q}function k(e){return function(t){return null==t?G:t[e]}}function C(e){return function(t){return null==e?G:e[t]}}function z(e,t,r,n,i){return i(e,(function(e,i,o){r=n?(n=!1,e):t(r,e,i,o)})),r}function S(e,t){for(var r,n=-1,i=e.length;++n<i;){var o=t(e[n]);o!==G&&(r=r===G?o:r+o)}return r}function A(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function D(e){return e?e.slice(0,H(e)+1).replace(Ue,""):e}function T(e){return function(t){return e(t)}}function $(e,t){return u(t,(function(t){return e[t]}))}function _(e,t){return e.has(t)}function E(e,t){for(var r=-1,n=e.length;++r<n&&b(t,e[r],0)>-1;);return r}function M(e,t){for(var r=e.length;r--&&b(t,e[r],0)>-1;);return r}function L(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}function I(e){return"\\"+Wt[e]}function O(e){return Rt.test(e)}function B(e){return Nt.test(e)}function P(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function j(e,t){return function(r){return e(t(r))}}function F(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var a=e[r];a!==t&&a!==V||(e[r]=V,o[i++]=r)}return o}function R(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}function N(e){return O(e)?function(e){for(var t=jt.lastIndex=0;jt.test(e);)++t;return t}(e):lr(e)}function q(e){return O(e)?function(e){return e.match(jt)||[]}(e):function(e){return e.split("")}(e)}function H(e){for(var t=e.length;t--&&Ge.test(e.charAt(t)););return t}function U(e){return e.match(Ft)||[]}var G,W="Expected a function",X="__lodash_hash_undefined__",V="__lodash_placeholder__",Y=32,K=128,J=1/0,Z=9007199254740991,Q=NaN,ee=4294967295,te=[["ary",K],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",Y],["partialRight",64],["rearg",256]],re="[object Arguments]",ne="[object Array]",ie="[object Boolean]",oe="[object Date]",ae="[object Error]",se="[object Function]",ce="[object GeneratorFunction]",le="[object Map]",ue="[object Number]",pe="[object Object]",de="[object Promise]",me="[object RegExp]",fe="[object Set]",he="[object String]",ge="[object Symbol]",ve="[object WeakMap]",be="[object ArrayBuffer]",ye="[object DataView]",xe="[object Float32Array]",we="[object Float64Array]",ke="[object Int8Array]",Ce="[object Int16Array]",ze="[object Int32Array]",Se="[object Uint8Array]",Ae="[object Uint8ClampedArray]",De="[object Uint16Array]",Te="[object Uint32Array]",$e=/\b__p \+= '';/g,_e=/\b(__p \+=) '' \+/g,Ee=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Me=/&(?:amp|lt|gt|quot|#39);/g,Le=/[&<>"']/g,Ie=RegExp(Me.source),Oe=RegExp(Le.source),Be=/<%-([\s\S]+?)%>/g,Pe=/<%([\s\S]+?)%>/g,je=/<%=([\s\S]+?)%>/g,Fe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Re=/^\w*$/,Ne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qe=/[\\^$.*+?()[\]{}|]/g,He=RegExp(qe.source),Ue=/^\s+/,Ge=/\s/,We=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Xe=/\{\n\/\* \[wrapped with (.+)\] \*/,Ve=/,? & /,Ye=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ke=/[()=,{}\[\]\/\s]/,Je=/\\(\\)?/g,Ze=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Qe=/\w*$/,et=/^[-+]0x[0-9a-f]+$/i,tt=/^0b[01]+$/i,rt=/^\[object .+?Constructor\]$/,nt=/^0o[0-7]+$/i,it=/^(?:0|[1-9]\d*)$/,ot=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,at=/($^)/,st=/['\n\r\u2028\u2029\\]/g,ct="\\ud800-\\udfff",lt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ut="\\u2700-\\u27bf",pt="a-z\\xdf-\\xf6\\xf8-\\xff",dt="A-Z\\xc0-\\xd6\\xd8-\\xde",mt="\\ufe0e\\ufe0f",ft="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ht="["+ct+"]",gt="["+ft+"]",vt="["+lt+"]",bt="\\d+",yt="["+ut+"]",xt="["+pt+"]",wt="[^"+ct+ft+bt+ut+pt+dt+"]",kt="\\ud83c[\\udffb-\\udfff]",Ct="[^"+ct+"]",zt="(?:\\ud83c[\\udde6-\\uddff]){2}",St="[\\ud800-\\udbff][\\udc00-\\udfff]",At="["+dt+"]",Dt="(?:"+xt+"|"+wt+")",Tt="(?:"+At+"|"+wt+")",$t="(?:['’](?:d|ll|m|re|s|t|ve))?",_t="(?:['’](?:D|LL|M|RE|S|T|VE))?",Et="(?:"+vt+"|"+kt+")?",Mt="["+mt+"]?",Lt=Mt+Et+"(?:\\u200d(?:"+[Ct,zt,St].join("|")+")"+Mt+Et+")*",It="(?:"+[yt,zt,St].join("|")+")"+Lt,Ot="(?:"+[Ct+vt+"?",vt,zt,St,ht].join("|")+")",Bt=RegExp("['’]","g"),Pt=RegExp(vt,"g"),jt=RegExp(kt+"(?="+kt+")|"+Ot+Lt,"g"),Ft=RegExp([At+"?"+xt+"+"+$t+"(?="+[gt,At,"$"].join("|")+")",Tt+"+"+_t+"(?="+[gt,At+Dt,"$"].join("|")+")",At+"?"+Dt+"+"+$t,At+"+"+_t,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",bt,It].join("|"),"g"),Rt=RegExp("[\\u200d"+ct+lt+mt+"]"),Nt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,qt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ht=-1,Ut={};Ut[xe]=Ut[we]=Ut[ke]=Ut[Ce]=Ut[ze]=Ut[Se]=Ut[Ae]=Ut[De]=Ut[Te]=!0,Ut[re]=Ut[ne]=Ut[be]=Ut[ie]=Ut[ye]=Ut[oe]=Ut[ae]=Ut[se]=Ut[le]=Ut[ue]=Ut[pe]=Ut[me]=Ut[fe]=Ut[he]=Ut[ve]=!1;var Gt={};Gt[re]=Gt[ne]=Gt[be]=Gt[ye]=Gt[ie]=Gt[oe]=Gt[xe]=Gt[we]=Gt[ke]=Gt[Ce]=Gt[ze]=Gt[le]=Gt[ue]=Gt[pe]=Gt[me]=Gt[fe]=Gt[he]=Gt[ge]=Gt[Se]=Gt[Ae]=Gt[De]=Gt[Te]=!0,Gt[ae]=Gt[se]=Gt[ve]=!1;var Wt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Xt=parseFloat,Vt=parseInt,Yt="object"==typeof Kc&&Kc&&Kc.Object===Object&&Kc,Kt="object"==typeof self&&self&&self.Object===Object&&self,Jt=Yt||Kt||Function("return this")(),Zt=t&&!t.nodeType&&t,Qt=Zt&&e&&!e.nodeType&&e,er=Qt&&Qt.exports===Zt,tr=er&&Yt.process,rr=function(){try{return Qt&&Qt.require&&Qt.require("util").types||tr&&tr.binding&&tr.binding("util")}catch(e){}}(),nr=rr&&rr.isArrayBuffer,ir=rr&&rr.isDate,or=rr&&rr.isMap,ar=rr&&rr.isRegExp,sr=rr&&rr.isSet,cr=rr&&rr.isTypedArray,lr=k("length"),ur=C({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),pr=C({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),dr=C({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),mr=function e(t){function C(e){if(Oi(e)&&!Ss(e)&&!(e instanceof ct)){if(e instanceof Ye)return e;if(So.call(e,"__wrapped__"))return si(e)}return new Ye(e)}function Ge(){}function Ye(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=G}function ct(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ee,this.__views__=[]}function lt(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ut(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function pt(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function dt(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new pt;++t<r;)this.add(e[t])}function mt(e){this.size=(this.__data__=new ut(e)).size}function ft(e,t){var r=Ss(e),n=!r&&zs(e),i=!r&&!n&&Ds(e),o=!r&&!n&&!i&&Ms(e),a=r||n||i||o,s=a?A(e.length,bo):[],c=s.length;for(var l in e)!t&&!So.call(e,l)||a&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Gn(l,c))||s.push(l);return s}function ht(e){var t=e.length;return t?e[Dr(0,t-1)]:G}function gt(e,t){return ii(on(e),St(t,0,e.length))}function vt(e){return ii(on(e))}function bt(e,t,r){(r===G||Di(e[t],r))&&(r!==G||t in e)||Ct(e,t,r)}function yt(e,t,r){var n=e[t];So.call(e,t)&&Di(n,r)&&(r!==G||t in e)||Ct(e,t,r)}function xt(e,t){for(var r=e.length;r--;)if(Di(e[r][0],t))return r;return-1}function wt(e,t,r,n){return Ca(e,(function(e,i,o){t(n,e,r(e),o)})),n}function kt(e,t){return e&&an(t,Yi(t),e)}function Ct(e,t,r){"__proto__"==t&&Ho?Ho(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function zt(e,t){for(var r=-1,n=t.length,i=uo(n),o=null==e;++r<n;)i[r]=o?G:Xi(e,t[r]);return i}function St(e,t,r){return e==e&&(r!==G&&(e=e<=r?e:r),t!==G&&(e=e>=t?e:t)),e}function At(e,t,r,n,o,a){var s,c=1&t,l=2&t,u=4&t;if(r&&(s=o?r(e,n,o,a):r(e)),s!==G)return s;if(!Ii(e))return e;var p=Ss(e);if(p){if(s=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&So.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!c)return on(e,s)}else{var d=Oa(e),m=d==se||d==ce;if(Ds(e))return Zr(e,c);if(d==pe||d==re||m&&!o){if(s=l||m?{}:Hn(e),!c)return l?function(e,t){return an(e,Ia(e),t)}(e,function(e,t){return e&&an(t,Ki(t),e)}(s,e)):function(e,t){return an(e,La(e),t)}(e,kt(s,e))}else{if(!Gt[d])return o?e:{};s=function(e,t,r){var n=e.constructor;switch(t){case be:return Qr(e);case ie:case oe:return new n(+e);case ye:return function(e,t){return new e.constructor(t?Qr(e.buffer):e.buffer,e.byteOffset,e.byteLength)}(e,r);case xe:case we:case ke:case Ce:case ze:case Se:case Ae:case De:case Te:return en(e,r);case le:return new n;case ue:case he:return new n(e);case me:return function(e){var t=new e.constructor(e.source,Qe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case fe:return new n;case ge:return function(e){return xa?go(xa.call(e)):{}}(e)}}(e,d,c)}}a||(a=new mt);var f=a.get(e);if(f)return f;a.set(e,s),Es(e)?e.forEach((function(n){s.add(At(n,t,r,n,e,a))})):$s(e)&&e.forEach((function(n,i){s.set(i,At(n,t,r,i,e,a))}));var h=p?G:(u?l?On:In:l?Ki:Yi)(e);return i(h||e,(function(n,i){h&&(n=e[i=n]),yt(s,i,At(n,t,r,i,e,a))})),s}function Dt(e,t,r){var n=r.length;if(null==e)return!n;for(e=go(e);n--;){var i=r[n],o=t[i],a=e[i];if(a===G&&!(i in e)||!o(a))return!1}return!0}function Tt(e,t,r){if("function"!=typeof e)throw new yo(W);return ja((function(){e.apply(G,r)}),t)}function $t(e,t,r,n){var i=-1,o=c,a=!0,s=e.length,p=[],d=t.length;if(!s)return p;r&&(t=u(t,T(r))),n?(o=l,a=!1):t.length>=200&&(o=_,a=!1,t=new dt(t));e:for(;++i<s;){var m=e[i],f=null==r?m:r(m);if(m=n||0!==m?m:0,a&&f==f){for(var h=d;h--;)if(t[h]===f)continue e;p.push(m)}else o(t,f,n)||p.push(m)}return p}function _t(e,t){var r=!0;return Ca(e,(function(e,n,i){return r=!!t(e,n,i)})),r}function Et(e,t,r){for(var n=-1,i=e.length;++n<i;){var o=e[n],a=t(o);if(null!=a&&(s===G?a==a&&!Fi(a):r(a,s)))var s=a,c=o}return c}function Mt(e,t){var r=[];return Ca(e,(function(e,n,i){t(e,n,i)&&r.push(e)})),r}function Lt(e,t,r,n,i){var o=-1,a=e.length;for(r||(r=Un),i||(i=[]);++o<a;){var s=e[o];t>0&&r(s)?t>1?Lt(s,t-1,r,n,i):p(i,s):n||(i[i.length]=s)}return i}function It(e,t){return e&&Sa(e,t,Yi)}function Ot(e,t){return e&&Aa(e,t,Yi)}function jt(e,t){return s(t,(function(t){return Ei(e[t])}))}function Ft(e,t){for(var r=0,n=(t=Kr(t,e)).length;null!=e&&r<n;)e=e[oi(t[r++])];return r&&r==n?e:G}function Rt(e,t,r){var n=t(e);return Ss(e)?n:p(n,r(e))}function Nt(e){return null==e?e===G?"[object Undefined]":"[object Null]":qo&&qo in go(e)?function(e){var t=So.call(e,qo),r=e[qo];try{e[qo]=G;var n=!0}catch(e){}var i=To.call(e);return n&&(t?e[qo]=r:delete e[qo]),i}(e):function(e){return To.call(e)}(e)}function Wt(e,t){return e>t}function Yt(e,t){return null!=e&&So.call(e,t)}function Kt(e,t){return null!=e&&t in go(e)}function Zt(e,t,r){for(var n=r?l:c,i=e[0].length,o=e.length,a=o,s=uo(o),p=1/0,d=[];a--;){var m=e[a];a&&t&&(m=u(m,T(t))),p=ta(m.length,p),s[a]=!r&&(t||i>=120&&m.length>=120)?new dt(a&&m):G}m=e[0];var f=-1,h=s[0];e:for(;++f<i&&d.length<p;){var g=m[f],v=t?t(g):g;if(g=r||0!==g?g:0,!(h?_(h,v):n(d,v,r))){for(a=o;--a;){var b=s[a];if(!(b?_(b,v):n(e[a],v,r)))continue e}h&&h.push(v),d.push(g)}}return d}function Qt(e,t,n){var i=null==(e=Qn(e,t=Kr(t,e)))?e:e[oi(di(t))];return null==i?G:r(i,e,n)}function tr(e){return Oi(e)&&Nt(e)==re}function rr(e,t,r,n,i){return e===t||(null==e||null==t||!Oi(e)&&!Oi(t)?e!=e&&t!=t:function(e,t,r,n,i,o){var a=Ss(e),s=Ss(t),c=a?ne:Oa(e),l=s?ne:Oa(t),u=(c=c==re?pe:c)==pe,p=(l=l==re?pe:l)==pe,d=c==l;if(d&&Ds(e)){if(!Ds(t))return!1;a=!0,u=!1}if(d&&!u)return o||(o=new mt),a||Ms(e)?Mn(e,t,r,n,i,o):function(e,t,r,n,i,o,a){switch(r){case ye:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case be:return!(e.byteLength!=t.byteLength||!o(new Io(e),new Io(t)));case ie:case oe:case ue:return Di(+e,+t);case ae:return e.name==t.name&&e.message==t.message;case me:case he:return e==t+"";case le:var s=P;case fe:var c=1&n;if(s||(s=R),e.size!=t.size&&!c)return!1;var l=a.get(e);if(l)return l==t;n|=2,a.set(e,t);var u=Mn(s(e),s(t),n,i,o,a);return a.delete(e),u;case ge:if(xa)return xa.call(e)==xa.call(t)}return!1}(e,t,c,r,n,i,o);if(!(1&r)){var m=u&&So.call(e,"__wrapped__"),f=p&&So.call(t,"__wrapped__");if(m||f){var h=m?e.value():e,g=f?t.value():t;return o||(o=new mt),i(h,g,r,n,o)}}return!!d&&(o||(o=new mt),function(e,t,r,n,i,o){var a=1&r,s=In(e),c=s.length;if(c!=In(t).length&&!a)return!1;for(var l=c;l--;){var u=s[l];if(!(a?u in t:So.call(t,u)))return!1}var p=o.get(e),d=o.get(t);if(p&&d)return p==t&&d==e;var m=!0;o.set(e,t),o.set(t,e);for(var f=a;++l<c;){var h=e[u=s[l]],g=t[u];if(n)var v=a?n(g,h,u,t,e,o):n(h,g,u,e,t,o);if(!(v===G?h===g||i(h,g,r,n,o):v)){m=!1;break}f||(f="constructor"==u)}if(m&&!f){var b=e.constructor,y=t.constructor;b!=y&&"constructor"in e&&"constructor"in t&&!("function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y)&&(m=!1)}return o.delete(e),o.delete(t),m}(e,t,r,n,i,o))}(e,t,r,n,rr,i))}function lr(e,t,r,n){var i=r.length,o=i,a=!n;if(null==e)return!o;for(e=go(e);i--;){var s=r[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){var c=(s=r[i])[0],l=e[c],u=s[1];if(a&&s[2]){if(l===G&&!(c in e))return!1}else{var p=new mt;if(n)var d=n(l,u,c,e,t,p);if(!(d===G?rr(u,l,3,n,p):d))return!1}}return!0}function fr(e){return!(!Ii(e)||function(e){return!!Do&&Do in e}(e))&&(Ei(e)?Eo:rt).test(ai(e))}function hr(e){return"function"==typeof e?e:null==e?no:"object"==typeof e?Ss(e)?xr(e[0],e[1]):yr(e):so(e)}function gr(e){if(!Yn(e))return Qo(e);var t=[];for(var r in go(e))So.call(e,r)&&"constructor"!=r&&t.push(r);return t}function vr(e,t){return e<t}function br(e,t){var r=-1,n=Ti(e)?uo(e.length):[];return Ca(e,(function(e,i,o){n[++r]=t(e,i,o)})),n}function yr(e){var t=Rn(e);return 1==t.length&&t[0][2]?Jn(t[0][0],t[0][1]):function(r){return r===e||lr(r,e,t)}}function xr(e,t){return Xn(e)&&Kn(t)?Jn(oi(e),t):function(r){var n=Xi(r,e);return n===G&&n===t?Vi(r,e):rr(t,n,3)}}function wr(e,t,r,n,i){e!==t&&Sa(t,(function(o,a){if(i||(i=new mt),Ii(o))!function(e,t,r,n,i,o,a){var s=ti(e,r),c=ti(t,r),l=a.get(c);if(l)return bt(e,r,l),G;var u=o?o(s,c,r+"",e,t,a):G,p=u===G;if(p){var d=Ss(c),m=!d&&Ds(c),f=!d&&!m&&Ms(c);u=c,d||m||f?Ss(s)?u=s:$i(s)?u=on(s):m?(p=!1,u=Zr(c,!0)):f?(p=!1,u=en(c,!0)):u=[]:Pi(c)||zs(c)?(u=s,zs(s)?u=Gi(s):Ii(s)&&!Ei(s)||(u=Hn(c))):p=!1}p&&(a.set(c,u),i(u,c,n,o,a),a.delete(c)),bt(e,r,u)}(e,t,a,r,wr,n,i);else{var s=n?n(ti(e,a),o,a+"",e,t,i):G;s===G&&(s=o),bt(e,a,s)}}),Ki)}function kr(e,t){var r=e.length;if(r)return Gn(t+=t<0?r:0,r)?e[t]:G}function Cr(e,t,r){t=t.length?u(t,(function(e){return Ss(e)?function(t){return Ft(t,1===e.length?e[0]:e)}:e})):[no];var n=-1;return t=u(t,T(jn())),function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}(br(e,(function(e,r,i){return{criteria:u(t,(function(t){return t(e)})),index:++n,value:e}})),(function(e,t){return function(e,t,r){for(var n=-1,i=e.criteria,o=t.criteria,a=i.length,s=r.length;++n<a;){var c=tn(i[n],o[n]);if(c)return n>=s?c:c*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}))}function zr(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var a=t[n],s=Ft(e,a);r(s,a)&&Mr(o,Kr(a,e),s)}return o}function Sr(e,t,r,n){var i=n?y:b,o=-1,a=t.length,s=e;for(e===t&&(t=on(t)),r&&(s=u(e,T(r)));++o<a;)for(var c=0,l=t[o],p=r?r(l):l;(c=i(s,p,c,n))>-1;)s!==e&&Fo.call(s,c,1),Fo.call(e,c,1);return e}function Ar(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==o){var o=i;Gn(i)?Fo.call(e,i,1):qr(e,i)}}return e}function Dr(e,t){return e+Vo(ia()*(t-e+1))}function Tr(e,t){var r="";if(!e||t<1||t>Z)return r;do{t%2&&(r+=e),(t=Vo(t/2))&&(e+=e)}while(t);return r}function $r(e,t){return Fa(Zn(e,t,no),e+"")}function _r(e){return ht(Zi(e))}function Er(e,t){var r=Zi(e);return ii(r,St(t,0,r.length))}function Mr(e,t,r,n){if(!Ii(e))return e;for(var i=-1,o=(t=Kr(t,e)).length,a=o-1,s=e;null!=s&&++i<o;){var c=oi(t[i]),l=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(i!=a){var u=s[c];(l=n?n(u,c,s):G)===G&&(l=Ii(u)?u:Gn(t[i+1])?[]:{})}yt(s,c,l),s=s[c]}return e}function Lr(e){return ii(Zi(e))}function Ir(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=uo(i);++n<i;)o[n]=e[n+t];return o}function Or(e,t){var r;return Ca(e,(function(e,n,i){return!(r=t(e,n,i))})),!!r}function Br(e,t,r){var n=0,i=null==e?n:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;n<i;){var o=n+i>>>1,a=e[o];null!==a&&!Fi(a)&&(r?a<=t:a<t)?n=o+1:i=o}return i}return Pr(e,t,no,r)}function Pr(e,t,r,n){var i=0,o=null==e?0:e.length;if(0===o)return 0;for(var a=(t=r(t))!=t,s=null===t,c=Fi(t),l=t===G;i<o;){var u=Vo((i+o)/2),p=r(e[u]),d=p!==G,m=null===p,f=p==p,h=Fi(p);if(a)var g=n||f;else g=l?f&&(n||d):s?f&&d&&(n||!m):c?f&&d&&!m&&(n||!h):!m&&!h&&(n?p<=t:p<t);g?i=u+1:o=u}return ta(o,4294967294)}function jr(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var a=e[r],s=t?t(a):a;if(!r||!Di(s,c)){var c=s;o[i++]=0===a?0:a}}return o}function Fr(e){return"number"==typeof e?e:Fi(e)?Q:+e}function Rr(e){if("string"==typeof e)return e;if(Ss(e))return u(e,Rr)+"";if(Fi(e))return wa?wa.call(e):"";var t=e+"";return"0"==t&&1/e==-J?"-0":t}function Nr(e,t,r){var n=-1,i=c,o=e.length,a=!0,s=[],u=s;if(r)a=!1,i=l;else if(o>=200){var p=t?null:Ea(e);if(p)return R(p);a=!1,i=_,u=new dt}else u=t?[]:s;e:for(;++n<o;){var d=e[n],m=t?t(d):d;if(d=r||0!==d?d:0,a&&m==m){for(var f=u.length;f--;)if(u[f]===m)continue e;t&&u.push(m),s.push(d)}else i(u,m,r)||(u!==s&&u.push(m),s.push(d))}return s}function qr(e,t){return null==(e=Qn(e,t=Kr(t,e)))||delete e[oi(di(t))]}function Hr(e,t,r,n){return Mr(e,t,r(Ft(e,t)),n)}function Ur(e,t,r,n){for(var i=e.length,o=n?i:-1;(n?o--:++o<i)&&t(e[o],o,e););return r?Ir(e,n?0:o,n?o+1:i):Ir(e,n?o+1:0,n?i:o)}function Gr(e,t){var r=e;return r instanceof ct&&(r=r.value()),d(t,(function(e,t){return t.func.apply(t.thisArg,p([e],t.args))}),r)}function Wr(e,t,r){var n=e.length;if(n<2)return n?Nr(e[0]):[];for(var i=-1,o=uo(n);++i<n;)for(var a=e[i],s=-1;++s<n;)s!=i&&(o[i]=$t(o[i]||a,e[s],t,r));return Nr(Lt(o,1),t,r)}function Xr(e,t,r){for(var n=-1,i=e.length,o=t.length,a={};++n<i;)r(a,e[n],n<o?t[n]:G);return a}function Vr(e){return $i(e)?e:[]}function Yr(e){return"function"==typeof e?e:no}function Kr(e,t){return Ss(e)?e:Xn(e,t)?[e]:Ra(Wi(e))}function Jr(e,t,r){var n=e.length;return r=r===G?n:r,!t&&r>=n?e:Ir(e,t,r)}function Zr(e,t){if(t)return e.slice();var r=e.length,n=Oo?Oo(r):new e.constructor(r);return e.copy(n),n}function Qr(e){var t=new e.constructor(e.byteLength);return new Io(t).set(new Io(e)),t}function en(e,t){return new e.constructor(t?Qr(e.buffer):e.buffer,e.byteOffset,e.length)}function tn(e,t){if(e!==t){var r=e!==G,n=null===e,i=e==e,o=Fi(e),a=t!==G,s=null===t,c=t==t,l=Fi(t);if(!s&&!l&&!o&&e>t||o&&a&&c&&!s&&!l||n&&a&&c||!r&&c||!i)return 1;if(!n&&!o&&!l&&e<t||l&&r&&i&&!n&&!o||s&&r&&i||!a&&i||!c)return-1}return 0}function rn(e,t,r,n){for(var i=-1,o=e.length,a=r.length,s=-1,c=t.length,l=ea(o-a,0),u=uo(c+l),p=!n;++s<c;)u[s]=t[s];for(;++i<a;)(p||i<o)&&(u[r[i]]=e[i]);for(;l--;)u[s++]=e[i++];return u}function nn(e,t,r,n){for(var i=-1,o=e.length,a=-1,s=r.length,c=-1,l=t.length,u=ea(o-s,0),p=uo(u+l),d=!n;++i<u;)p[i]=e[i];for(var m=i;++c<l;)p[m+c]=t[c];for(;++a<s;)(d||i<o)&&(p[m+r[a]]=e[i++]);return p}function on(e,t){var r=-1,n=e.length;for(t||(t=uo(n));++r<n;)t[r]=e[r];return t}function an(e,t,r,n){var i=!r;r||(r={});for(var o=-1,a=t.length;++o<a;){var s=t[o],c=n?n(r[s],e[s],s,r,e):G;c===G&&(c=e[s]),i?Ct(r,s,c):yt(r,s,c)}return r}function sn(e,t){return function(r,i){var o=Ss(r)?n:wt,a=t?t():{};return o(r,e,jn(i,2),a)}}function cn(e){return $r((function(t,r){var n=-1,i=r.length,o=i>1?r[i-1]:G,a=i>2?r[2]:G;for(o=e.length>3&&"function"==typeof o?(i--,o):G,a&&Wn(r[0],r[1],a)&&(o=i<3?G:o,i=1),t=go(t);++n<i;){var s=r[n];s&&e(t,s,n,o)}return t}))}function ln(e,t){return function(r,n){if(null==r)return r;if(!Ti(r))return e(r,n);for(var i=r.length,o=t?i:-1,a=go(r);(t?o--:++o<i)&&!1!==n(a[o],o,a););return r}}function un(e){return function(t,r,n){for(var i=-1,o=go(t),a=n(t),s=a.length;s--;){var c=a[e?s:++i];if(!1===r(o[c],c,o))break}return t}}function pn(e){return function(t){var r=O(t=Wi(t))?q(t):G,n=r?r[0]:t.charAt(0),i=r?Jr(r,1).join(""):t.slice(1);return n[e]()+i}}function dn(e){return function(t){return d(to(eo(t).replace(Bt,"")),e,"")}}function mn(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=ka(e.prototype),n=e.apply(r,t);return Ii(n)?n:r}}function fn(e,t,n){var i=mn(e);return function o(){for(var a=arguments.length,s=uo(a),c=a,l=Pn(o);c--;)s[c]=arguments[c];var u=a<3&&s[0]!==l&&s[a-1]!==l?[]:F(s,l);return(a-=u.length)<n?Sn(e,t,vn,o.placeholder,G,s,u,G,G,n-a):r(this&&this!==Jt&&this instanceof o?i:e,this,s)}}function hn(e){return function(t,r,n){var i=go(t);if(!Ti(t)){var o=jn(r,3);t=Yi(t),r=function(e){return o(i[e],e,i)}}var a=e(t,r,n);return a>-1?i[o?t[a]:a]:G}}function gn(e){return Ln((function(t){var r=t.length,n=r,i=Ye.prototype.thru;for(e&&t.reverse();n--;){var o=t[n];if("function"!=typeof o)throw new yo(W);if(i&&!a&&"wrapper"==Bn(o))var a=new Ye([],!0)}for(n=a?n:r;++n<r;){var s=Bn(o=t[n]),c="wrapper"==s?Ma(o):G;a=c&&Vn(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?a[Bn(c[0])].apply(a,c[3]):1==o.length&&Vn(o)?a[s]():a.thru(o)}return function(){var e=arguments,n=e[0];if(a&&1==e.length&&Ss(n))return a.plant(n).value();for(var i=0,o=r?t[i].apply(this,e):n;++i<r;)o=t[i].call(this,o);return o}}))}function vn(e,t,r,n,i,o,a,s,c,l){var u=t&K,p=1&t,d=2&t,m=24&t,f=512&t,h=d?G:mn(e);return function g(){for(var v=arguments.length,b=uo(v),y=v;y--;)b[y]=arguments[y];if(m)var x=Pn(g),w=L(b,x);if(n&&(b=rn(b,n,i,m)),o&&(b=nn(b,o,a,m)),v-=w,m&&v<l)return Sn(e,t,vn,g.placeholder,r,b,F(b,x),s,c,l-v);var k=p?r:this,C=d?k[e]:e;return v=b.length,s?b=ei(b,s):f&&v>1&&b.reverse(),u&&c<v&&(b.length=c),this&&this!==Jt&&this instanceof g&&(C=h||mn(C)),C.apply(k,b)}}function bn(e,t){return function(r,n){return function(e,t,r,n){return It(e,(function(e,i,o){t(n,r(e),i,o)})),n}(r,e,t(n),{})}}function yn(e,t){return function(r,n){var i;if(r===G&&n===G)return t;if(r!==G&&(i=r),n!==G){if(i===G)return n;"string"==typeof r||"string"==typeof n?(r=Rr(r),n=Rr(n)):(r=Fr(r),n=Fr(n)),i=e(r,n)}return i}}function xn(e){return Ln((function(t){return t=u(t,T(jn())),$r((function(n){var i=this;return e(t,(function(e){return r(e,i,n)}))}))}))}function wn(e,t){var r=(t=t===G?" ":Rr(t)).length;if(r<2)return r?Tr(t,e):t;var n=Tr(t,Xo(e/N(t)));return O(t)?Jr(q(n),0,e).join(""):n.slice(0,e)}function kn(e,t,n,i){var o=1&t,a=mn(e);return function t(){for(var s=-1,c=arguments.length,l=-1,u=i.length,p=uo(u+c),d=this&&this!==Jt&&this instanceof t?a:e;++l<u;)p[l]=i[l];for(;c--;)p[l++]=arguments[++s];return r(d,o?n:this,p)}}function Cn(e){return function(t,r,n){return n&&"number"!=typeof n&&Wn(t,r,n)&&(r=n=G),t=Ni(t),r===G?(r=t,t=0):r=Ni(r),function(e,t,r,n){for(var i=-1,o=ea(Xo((t-e)/(r||1)),0),a=uo(o);o--;)a[n?o:++i]=e,e+=r;return a}(t,r,n=n===G?t<r?1:-1:Ni(n),e)}}function zn(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=Ui(t),r=Ui(r)),e(t,r)}}function Sn(e,t,r,n,i,o,a,s,c,l){var u=8&t;t|=u?Y:64,4&(t&=~(u?64:Y))||(t&=-4);var p=[e,t,i,u?o:G,u?a:G,u?G:o,u?G:a,s,c,l],d=r.apply(G,p);return Vn(e)&&Pa(d,p),d.placeholder=n,ri(d,e,t)}function An(e){var t=ho[e];return function(e,r){if(e=Ui(e),(r=null==r?0:ta(qi(r),292))&&Jo(e)){var n=(Wi(e)+"e").split("e");return+((n=(Wi(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}function Dn(e){return function(t){var r=Oa(t);return r==le?P(t):r==fe?function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=[e,e]})),r}(t):function(e,t){return u(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Tn(e,t,r,n,i,o,a,s){var c=2&t;if(!c&&"function"!=typeof e)throw new yo(W);var l=n?n.length:0;if(l||(t&=-97,n=i=G),a=a===G?a:ea(qi(a),0),s=s===G?s:qi(s),l-=i?i.length:0,64&t){var u=n,p=i;n=i=G}var d=c?G:Ma(e),m=[e,t,r,n,i,u,p,o,a,s];if(d&&function(e,t){var r=e[1],n=t[1],i=r|n,o=i<131,a=n==K&&8==r||n==K&&256==r&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(!o&&!a)return e;1&n&&(e[2]=t[2],i|=1&r?0:4);var s=t[3];if(s){var c=e[3];e[3]=c?rn(c,s,t[4]):s,e[4]=c?F(e[3],V):t[4]}(s=t[5])&&(c=e[5],e[5]=c?nn(c,s,t[6]):s,e[6]=c?F(e[5],V):t[6]),(s=t[7])&&(e[7]=s),n&K&&(e[8]=null==e[8]?t[8]:ta(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(m,d),e=m[0],t=m[1],r=m[2],n=m[3],i=m[4],!(s=m[9]=m[9]===G?c?0:e.length:ea(m[9]-l,0))&&24&t&&(t&=-25),t&&1!=t)f=8==t||16==t?fn(e,t,s):t!=Y&&33!=t||i.length?vn.apply(G,m):kn(e,t,r,n);else var f=function(e,t,r){var n=1&t,i=mn(e);return function t(){return(this&&this!==Jt&&this instanceof t?i:e).apply(n?r:this,arguments)}}(e,t,r);return ri((d?Da:Pa)(f,m),e,t)}function $n(e,t,r,n){return e===G||Di(e,ko[r])&&!So.call(n,r)?t:e}function _n(e,t,r,n,i,o){return Ii(e)&&Ii(t)&&(o.set(t,e),wr(e,t,G,_n,o),o.delete(t)),e}function En(e){return Pi(e)?G:e}function Mn(e,t,r,n,i,o){var a=1&r,s=e.length,c=t.length;if(s!=c&&!(a&&c>s))return!1;var l=o.get(e),u=o.get(t);if(l&&u)return l==t&&u==e;var p=-1,d=!0,m=2&r?new dt:G;for(o.set(e,t),o.set(t,e);++p<s;){var h=e[p],g=t[p];if(n)var v=a?n(g,h,p,t,e,o):n(h,g,p,e,t,o);if(v!==G){if(v)continue;d=!1;break}if(m){if(!f(t,(function(e,t){if(!_(m,t)&&(h===e||i(h,e,r,n,o)))return m.push(t)}))){d=!1;break}}else if(h!==g&&!i(h,g,r,n,o)){d=!1;break}}return o.delete(e),o.delete(t),d}function Ln(e){return Fa(Zn(e,G,ui),e+"")}function In(e){return Rt(e,Yi,La)}function On(e){return Rt(e,Ki,Ia)}function Bn(e){for(var t=e.name+"",r=ma[t],n=So.call(ma,t)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==e)return i.name}return t}function Pn(e){return(So.call(C,"placeholder")?C:e).placeholder}function jn(){var e=C.iteratee||io;return e=e===io?hr:e,arguments.length?e(arguments[0],arguments[1]):e}function Fn(e,t){var r=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?r["string"==typeof t?"string":"hash"]:r.map}function Rn(e){for(var t=Yi(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Kn(i)]}return t}function Nn(e,t){var r=function(e,t){return null==e?G:e[t]}(e,t);return fr(r)?r:G}function qn(e,t,r){for(var n=-1,i=(t=Kr(t,e)).length,o=!1;++n<i;){var a=oi(t[n]);if(!(o=null!=e&&r(e,a)))break;e=e[a]}return o||++n!=i?o:!!(i=null==e?0:e.length)&&Li(i)&&Gn(a,i)&&(Ss(e)||zs(e))}function Hn(e){return"function"!=typeof e.constructor||Yn(e)?{}:ka(Bo(e))}function Un(e){return Ss(e)||zs(e)||!!(Ro&&e&&e[Ro])}function Gn(e,t){var r=typeof e;return!!(t=null==t?Z:t)&&("number"==r||"symbol"!=r&&it.test(e))&&e>-1&&e%1==0&&e<t}function Wn(e,t,r){if(!Ii(r))return!1;var n=typeof t;return!!("number"==n?Ti(r)&&Gn(t,r.length):"string"==n&&t in r)&&Di(r[t],e)}function Xn(e,t){if(Ss(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!Fi(e))||Re.test(e)||!Fe.test(e)||null!=t&&e in go(t)}function Vn(e){var t=Bn(e),r=C[t];if("function"!=typeof r||!(t in ct.prototype))return!1;if(e===r)return!0;var n=Ma(r);return!!n&&e===n[0]}function Yn(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ko)}function Kn(e){return e==e&&!Ii(e)}function Jn(e,t){return function(r){return null!=r&&r[e]===t&&(t!==G||e in go(r))}}function Zn(e,t,n){return t=ea(t===G?e.length-1:t,0),function(){for(var i=arguments,o=-1,a=ea(i.length-t,0),s=uo(a);++o<a;)s[o]=i[t+o];o=-1;for(var c=uo(t+1);++o<t;)c[o]=i[o];return c[t]=n(s),r(e,this,c)}}function Qn(e,t){return t.length<2?e:Ft(e,Ir(t,0,-1))}function ei(e,t){for(var r=e.length,n=ta(t.length,r),i=on(e);n--;){var o=t[n];e[n]=Gn(o,r)?i[o]:G}return e}function ti(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function ri(e,t,r){var n=t+"";return Fa(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(We,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return i(te,(function(r){var n="_."+r[0];t&r[1]&&!c(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(Xe);return t?t[1].split(Ve):[]}(n),r)))}function ni(e){var t=0,r=0;return function(){var n=ra(),i=16-(n-r);if(r=n,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(G,arguments)}}function ii(e,t){var r=-1,n=e.length,i=n-1;for(t=t===G?n:t;++r<t;){var o=Dr(r,i),a=e[o];e[o]=e[r],e[r]=a}return e.length=t,e}function oi(e){if("string"==typeof e||Fi(e))return e;var t=e+"";return"0"==t&&1/e==-J?"-0":t}function ai(e){if(null!=e){try{return zo.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function si(e){if(e instanceof ct)return e.clone();var t=new Ye(e.__wrapped__,e.__chain__);return t.__actions__=on(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function ci(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:qi(r);return i<0&&(i=ea(n+i,0)),v(e,jn(t,3),i)}function li(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=n-1;return r!==G&&(i=qi(r),i=r<0?ea(n+i,0):ta(i,n-1)),v(e,jn(t,3),i,!0)}function ui(e){return null!=e&&e.length?Lt(e,1):[]}function pi(e){return e&&e.length?e[0]:G}function di(e){var t=null==e?0:e.length;return t?e[t-1]:G}function mi(e,t){return e&&e.length&&t&&t.length?Sr(e,t):e}function fi(e){return null==e?e:oa.call(e)}function hi(e){if(!e||!e.length)return[];var t=0;return e=s(e,(function(e){if($i(e))return t=ea(e.length,t),!0})),A(t,(function(t){return u(e,k(t))}))}function gi(e,t){if(!e||!e.length)return[];var n=hi(e);return null==t?n:u(n,(function(e){return r(t,G,e)}))}function vi(e){var t=C(e);return t.__chain__=!0,t}function bi(e,t){return t(e)}function yi(e,t){return(Ss(e)?i:Ca)(e,jn(t,3))}function xi(e,t){return(Ss(e)?o:za)(e,jn(t,3))}function wi(e,t){return(Ss(e)?u:br)(e,jn(t,3))}function ki(e,t,r){return t=r?G:t,t=e&&null==t?e.length:t,Tn(e,K,G,G,G,G,t)}function Ci(e,t){var r;if("function"!=typeof t)throw new yo(W);return e=qi(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=G),r}}function zi(e,t,r){function n(t){var r=l,n=u;return l=u=G,h=t,d=e.apply(n,r)}function i(e){return h=e,m=ja(a,t),g?n(e):d}function o(e){var r=e-f;return f===G||r>=t||r<0||v&&e-h>=p}function a(){var e=ms();return o(e)?s(e):(m=ja(a,function(e){var r=t-(e-f);return v?ta(r,p-(e-h)):r}(e)),G)}function s(e){return m=G,b&&l?n(e):(l=u=G,d)}function c(){var e=ms(),r=o(e);if(l=arguments,u=this,f=e,r){if(m===G)return i(f);if(v)return _a(m),m=ja(a,t),n(f)}return m===G&&(m=ja(a,t)),d}var l,u,p,d,m,f,h=0,g=!1,v=!1,b=!0;if("function"!=typeof e)throw new yo(W);return t=Ui(t)||0,Ii(r)&&(g=!!r.leading,p=(v="maxWait"in r)?ea(Ui(r.maxWait)||0,t):p,b="trailing"in r?!!r.trailing:b),c.cancel=function(){m!==G&&_a(m),h=0,l=f=u=m=G},c.flush=function(){return m===G?d:s(ms())},c}function Si(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new yo(W);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(Si.Cache||pt),r}function Ai(e){if("function"!=typeof e)throw new yo(W);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Di(e,t){return e===t||e!=e&&t!=t}function Ti(e){return null!=e&&Li(e.length)&&!Ei(e)}function $i(e){return Oi(e)&&Ti(e)}function _i(e){if(!Oi(e))return!1;var t=Nt(e);return t==ae||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Pi(e)}function Ei(e){if(!Ii(e))return!1;var t=Nt(e);return t==se||t==ce||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Mi(e){return"number"==typeof e&&e==qi(e)}function Li(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Z}function Ii(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Oi(e){return null!=e&&"object"==typeof e}function Bi(e){return"number"==typeof e||Oi(e)&&Nt(e)==ue}function Pi(e){if(!Oi(e)||Nt(e)!=pe)return!1;var t=Bo(e);if(null===t)return!0;var r=So.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&zo.call(r)==$o}function ji(e){return"string"==typeof e||!Ss(e)&&Oi(e)&&Nt(e)==he}function Fi(e){return"symbol"==typeof e||Oi(e)&&Nt(e)==ge}function Ri(e){if(!e)return[];if(Ti(e))return ji(e)?q(e):on(e);if(No&&e[No])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[No]());var t=Oa(e);return(t==le?P:t==fe?R:Zi)(e)}function Ni(e){return e?(e=Ui(e))===J||e===-J?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function qi(e){var t=Ni(e),r=t%1;return t==t?r?t-r:t:0}function Hi(e){return e?St(qi(e),0,ee):0}function Ui(e){if("number"==typeof e)return e;if(Fi(e))return Q;if(Ii(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ii(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=D(e);var r=tt.test(e);return r||nt.test(e)?Vt(e.slice(2),r?2:8):et.test(e)?Q:+e}function Gi(e){return an(e,Ki(e))}function Wi(e){return null==e?"":Rr(e)}function Xi(e,t,r){var n=null==e?G:Ft(e,t);return n===G?r:n}function Vi(e,t){return null!=e&&qn(e,t,Kt)}function Yi(e){return Ti(e)?ft(e):gr(e)}function Ki(e){return Ti(e)?ft(e,!0):function(e){if(!Ii(e))return function(e){var t=[];if(null!=e)for(var r in go(e))t.push(r);return t}(e);var t=Yn(e),r=[];for(var n in e)("constructor"!=n||!t&&So.call(e,n))&&r.push(n);return r}(e)}function Ji(e,t){if(null==e)return{};var r=u(On(e),(function(e){return[e]}));return t=jn(t),zr(e,r,(function(e,r){return t(e,r[0])}))}function Zi(e){return null==e?[]:$(e,Yi(e))}function Qi(e){return ic(Wi(e).toLowerCase())}function eo(e){return(e=Wi(e))&&e.replace(ot,ur).replace(Pt,"")}function to(e,t,r){return e=Wi(e),(t=r?G:t)===G?B(e)?U(e):h(e):e.match(t)||[]}function ro(e){return function(){return e}}function no(e){return e}function io(e){return hr("function"==typeof e?e:At(e,1))}function oo(e,t,r){var n=Yi(t),o=jt(t,n);null!=r||Ii(t)&&(o.length||!n.length)||(r=t,t=e,e=this,o=jt(t,Yi(t)));var a=!(Ii(r)&&"chain"in r&&!r.chain),s=Ei(e);return i(o,(function(r){var n=t[r];e[r]=n,s&&(e.prototype[r]=function(){var t=this.__chain__;if(a||t){var r=e(this.__wrapped__);return(r.__actions__=on(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,p([this.value()],arguments))})})),e}function ao(){}function so(e){return Xn(e)?k(oi(e)):function(e){return function(t){return Ft(t,e)}}(e)}function co(){return[]}function lo(){return!1}var uo=(t=null==t?Jt:mr.defaults(Jt.Object(),t,mr.pick(Jt,qt))).Array,po=t.Date,mo=t.Error,fo=t.Function,ho=t.Math,go=t.Object,vo=t.RegExp,bo=t.String,yo=t.TypeError,xo=uo.prototype,wo=fo.prototype,ko=go.prototype,Co=t["__core-js_shared__"],zo=wo.toString,So=ko.hasOwnProperty,Ao=0,Do=function(){var e=/[^.]+$/.exec(Co&&Co.keys&&Co.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),To=ko.toString,$o=zo.call(go),_o=Jt._,Eo=vo("^"+zo.call(So).replace(qe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Mo=er?t.Buffer:G,Lo=t.Symbol,Io=t.Uint8Array,Oo=Mo?Mo.allocUnsafe:G,Bo=j(go.getPrototypeOf,go),Po=go.create,jo=ko.propertyIsEnumerable,Fo=xo.splice,Ro=Lo?Lo.isConcatSpreadable:G,No=Lo?Lo.iterator:G,qo=Lo?Lo.toStringTag:G,Ho=function(){try{var e=Nn(go,"defineProperty");return e({},"",{}),e}catch(e){}}(),Uo=t.clearTimeout!==Jt.clearTimeout&&t.clearTimeout,Go=po&&po.now!==Jt.Date.now&&po.now,Wo=t.setTimeout!==Jt.setTimeout&&t.setTimeout,Xo=ho.ceil,Vo=ho.floor,Yo=go.getOwnPropertySymbols,Ko=Mo?Mo.isBuffer:G,Jo=t.isFinite,Zo=xo.join,Qo=j(go.keys,go),ea=ho.max,ta=ho.min,ra=po.now,na=t.parseInt,ia=ho.random,oa=xo.reverse,aa=Nn(t,"DataView"),sa=Nn(t,"Map"),ca=Nn(t,"Promise"),la=Nn(t,"Set"),ua=Nn(t,"WeakMap"),pa=Nn(go,"create"),da=ua&&new ua,ma={},fa=ai(aa),ha=ai(sa),ga=ai(ca),va=ai(la),ba=ai(ua),ya=Lo?Lo.prototype:G,xa=ya?ya.valueOf:G,wa=ya?ya.toString:G,ka=function(){function e(){}return function(t){if(!Ii(t))return{};if(Po)return Po(t);e.prototype=t;var r=new e;return e.prototype=G,r}}();C.templateSettings={escape:Be,evaluate:Pe,interpolate:je,variable:"",imports:{_:C}},C.prototype=Ge.prototype,C.prototype.constructor=C,Ye.prototype=ka(Ge.prototype),Ye.prototype.constructor=Ye,ct.prototype=ka(Ge.prototype),ct.prototype.constructor=ct,lt.prototype.clear=function(){this.__data__=pa?pa(null):{},this.size=0},lt.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},lt.prototype.get=function(e){var t=this.__data__;if(pa){var r=t[e];return r===X?G:r}return So.call(t,e)?t[e]:G},lt.prototype.has=function(e){var t=this.__data__;return pa?t[e]!==G:So.call(t,e)},lt.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=pa&&t===G?X:t,this},ut.prototype.clear=function(){this.__data__=[],this.size=0},ut.prototype.delete=function(e){var t=this.__data__,r=xt(t,e);return!(r<0||(r==t.length-1?t.pop():Fo.call(t,r,1),--this.size,0))},ut.prototype.get=function(e){var t=this.__data__,r=xt(t,e);return r<0?G:t[r][1]},ut.prototype.has=function(e){return xt(this.__data__,e)>-1},ut.prototype.set=function(e,t){var r=this.__data__,n=xt(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},pt.prototype.clear=function(){this.size=0,this.__data__={hash:new lt,map:new(sa||ut),string:new lt}},pt.prototype.delete=function(e){var t=Fn(this,e).delete(e);return this.size-=t?1:0,t},pt.prototype.get=function(e){return Fn(this,e).get(e)},pt.prototype.has=function(e){return Fn(this,e).has(e)},pt.prototype.set=function(e,t){var r=Fn(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},dt.prototype.add=dt.prototype.push=function(e){return this.__data__.set(e,X),this},dt.prototype.has=function(e){return this.__data__.has(e)},mt.prototype.clear=function(){this.__data__=new ut,this.size=0},mt.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},mt.prototype.get=function(e){return this.__data__.get(e)},mt.prototype.has=function(e){return this.__data__.has(e)},mt.prototype.set=function(e,t){var r=this.__data__;if(r instanceof ut){var n=r.__data__;if(!sa||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new pt(n)}return r.set(e,t),this.size=r.size,this};var Ca=ln(It),za=ln(Ot,!0),Sa=un(),Aa=un(!0),Da=da?function(e,t){return da.set(e,t),e}:no,Ta=Ho?function(e,t){return Ho(e,"toString",{configurable:!0,enumerable:!1,value:ro(t),writable:!0})}:no,$a=$r,_a=Uo||function(e){return Jt.clearTimeout(e)},Ea=la&&1/R(new la([,-0]))[1]==J?function(e){return new la(e)}:ao,Ma=da?function(e){return da.get(e)}:ao,La=Yo?function(e){return null==e?[]:(e=go(e),s(Yo(e),(function(t){return jo.call(e,t)})))}:co,Ia=Yo?function(e){for(var t=[];e;)p(t,La(e)),e=Bo(e);return t}:co,Oa=Nt;(aa&&Oa(new aa(new ArrayBuffer(1)))!=ye||sa&&Oa(new sa)!=le||ca&&Oa(ca.resolve())!=de||la&&Oa(new la)!=fe||ua&&Oa(new ua)!=ve)&&(Oa=function(e){var t=Nt(e),r=t==pe?e.constructor:G,n=r?ai(r):"";if(n)switch(n){case fa:return ye;case ha:return le;case ga:return de;case va:return fe;case ba:return ve}return t});var Ba=Co?Ei:lo,Pa=ni(Da),ja=Wo||function(e,t){return Jt.setTimeout(e,t)},Fa=ni(Ta),Ra=function(e){var t=Si((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Ne,(function(e,r,n,i){t.push(n?i.replace(Je,"$1"):r||e)})),t}),(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}(),Na=$r((function(e,t){return $i(e)?$t(e,Lt(t,1,$i,!0)):[]})),qa=$r((function(e,t){var r=di(t);return $i(r)&&(r=G),$i(e)?$t(e,Lt(t,1,$i,!0),jn(r,2)):[]})),Ha=$r((function(e,t){var r=di(t);return $i(r)&&(r=G),$i(e)?$t(e,Lt(t,1,$i,!0),G,r):[]})),Ua=$r((function(e){var t=u(e,Vr);return t.length&&t[0]===e[0]?Zt(t):[]})),Ga=$r((function(e){var t=di(e),r=u(e,Vr);return t===di(r)?t=G:r.pop(),r.length&&r[0]===e[0]?Zt(r,jn(t,2)):[]})),Wa=$r((function(e){var t=di(e),r=u(e,Vr);return(t="function"==typeof t?t:G)&&r.pop(),r.length&&r[0]===e[0]?Zt(r,G,t):[]})),Xa=$r(mi),Va=Ln((function(e,t){var r=null==e?0:e.length,n=zt(e,t);return Ar(e,u(t,(function(e){return Gn(e,r)?+e:e})).sort(tn)),n})),Ya=$r((function(e){return Nr(Lt(e,1,$i,!0))})),Ka=$r((function(e){var t=di(e);return $i(t)&&(t=G),Nr(Lt(e,1,$i,!0),jn(t,2))})),Ja=$r((function(e){var t=di(e);return t="function"==typeof t?t:G,Nr(Lt(e,1,$i,!0),G,t)})),Za=$r((function(e,t){return $i(e)?$t(e,t):[]})),Qa=$r((function(e){return Wr(s(e,$i))})),es=$r((function(e){var t=di(e);return $i(t)&&(t=G),Wr(s(e,$i),jn(t,2))})),ts=$r((function(e){var t=di(e);return t="function"==typeof t?t:G,Wr(s(e,$i),G,t)})),rs=$r(hi),ns=$r((function(e){var t=e.length,r=t>1?e[t-1]:G;return r="function"==typeof r?(e.pop(),r):G,gi(e,r)})),is=Ln((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,i=function(t){return zt(t,e)};return!(t>1||this.__actions__.length)&&n instanceof ct&&Gn(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:bi,args:[i],thisArg:G}),new Ye(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(G),e}))):this.thru(i)})),os=sn((function(e,t,r){So.call(e,r)?++e[r]:Ct(e,r,1)})),as=hn(ci),ss=hn(li),cs=sn((function(e,t,r){So.call(e,r)?e[r].push(t):Ct(e,r,[t])})),ls=$r((function(e,t,n){var i=-1,o="function"==typeof t,a=Ti(e)?uo(e.length):[];return Ca(e,(function(e){a[++i]=o?r(t,e,n):Qt(e,t,n)})),a})),us=sn((function(e,t,r){Ct(e,r,t)})),ps=sn((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]})),ds=$r((function(e,t){if(null==e)return[];var r=t.length;return r>1&&Wn(e,t[0],t[1])?t=[]:r>2&&Wn(t[0],t[1],t[2])&&(t=[t[0]]),Cr(e,Lt(t,1),[])})),ms=Go||function(){return Jt.Date.now()},fs=$r((function(e,t,r){var n=1;if(r.length){var i=F(r,Pn(fs));n|=Y}return Tn(e,n,t,r,i)})),hs=$r((function(e,t,r){var n=3;if(r.length){var i=F(r,Pn(hs));n|=Y}return Tn(t,n,e,r,i)})),gs=$r((function(e,t){return Tt(e,1,t)})),vs=$r((function(e,t,r){return Tt(e,Ui(t)||0,r)}));Si.Cache=pt;var bs=$a((function(e,t){var n=(t=1==t.length&&Ss(t[0])?u(t[0],T(jn())):u(Lt(t,1),T(jn()))).length;return $r((function(i){for(var o=-1,a=ta(i.length,n);++o<a;)i[o]=t[o].call(this,i[o]);return r(e,this,i)}))})),ys=$r((function(e,t){return Tn(e,Y,G,t,F(t,Pn(ys)))})),xs=$r((function(e,t){return Tn(e,64,G,t,F(t,Pn(xs)))})),ws=Ln((function(e,t){return Tn(e,256,G,G,G,t)})),ks=zn(Wt),Cs=zn((function(e,t){return e>=t})),zs=tr(function(){return arguments}())?tr:function(e){return Oi(e)&&So.call(e,"callee")&&!jo.call(e,"callee")},Ss=uo.isArray,As=nr?T(nr):function(e){return Oi(e)&&Nt(e)==be},Ds=Ko||lo,Ts=ir?T(ir):function(e){return Oi(e)&&Nt(e)==oe},$s=or?T(or):function(e){return Oi(e)&&Oa(e)==le},_s=ar?T(ar):function(e){return Oi(e)&&Nt(e)==me},Es=sr?T(sr):function(e){return Oi(e)&&Oa(e)==fe},Ms=cr?T(cr):function(e){return Oi(e)&&Li(e.length)&&!!Ut[Nt(e)]},Ls=zn(vr),Is=zn((function(e,t){return e<=t})),Os=cn((function(e,t){if(Yn(t)||Ti(t))return an(t,Yi(t),e),G;for(var r in t)So.call(t,r)&&yt(e,r,t[r])})),Bs=cn((function(e,t){an(t,Ki(t),e)})),Ps=cn((function(e,t,r,n){an(t,Ki(t),e,n)})),js=cn((function(e,t,r,n){an(t,Yi(t),e,n)})),Fs=Ln(zt),Rs=$r((function(e,t){e=go(e);var r=-1,n=t.length,i=n>2?t[2]:G;for(i&&Wn(t[0],t[1],i)&&(n=1);++r<n;)for(var o=t[r],a=Ki(o),s=-1,c=a.length;++s<c;){var l=a[s],u=e[l];(u===G||Di(u,ko[l])&&!So.call(e,l))&&(e[l]=o[l])}return e})),Ns=$r((function(e){return e.push(G,_n),r(Ws,G,e)})),qs=bn((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=To.call(t)),e[t]=r}),ro(no)),Hs=bn((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=To.call(t)),So.call(e,t)?e[t].push(r):e[t]=[r]}),jn),Us=$r(Qt),Gs=cn((function(e,t,r){wr(e,t,r)})),Ws=cn((function(e,t,r,n){wr(e,t,r,n)})),Xs=Ln((function(e,t){var r={};if(null==e)return r;var n=!1;t=u(t,(function(t){return t=Kr(t,e),n||(n=t.length>1),t})),an(e,On(e),r),n&&(r=At(r,7,En));for(var i=t.length;i--;)qr(r,t[i]);return r})),Vs=Ln((function(e,t){return null==e?{}:function(e,t){return zr(e,t,(function(t,r){return Vi(e,r)}))}(e,t)})),Ys=Dn(Yi),Ks=Dn(Ki),Js=dn((function(e,t,r){return t=t.toLowerCase(),e+(r?Qi(t):t)})),Zs=dn((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),Qs=dn((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),ec=pn("toLowerCase"),tc=dn((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()})),rc=dn((function(e,t,r){return e+(r?" ":"")+ic(t)})),nc=dn((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),ic=pn("toUpperCase"),oc=$r((function(e,t){try{return r(e,G,t)}catch(e){return _i(e)?e:new mo(e)}})),ac=Ln((function(e,t){return i(t,(function(t){t=oi(t),Ct(e,t,fs(e[t],e))})),e})),sc=gn(),cc=gn(!0),lc=$r((function(e,t){return function(r){return Qt(r,e,t)}})),uc=$r((function(e,t){return function(r){return Qt(e,r,t)}})),pc=xn(u),dc=xn(a),mc=xn(f),fc=Cn(),hc=Cn(!0),gc=yn((function(e,t){return e+t}),0),vc=An("ceil"),bc=yn((function(e,t){return e/t}),1),yc=An("floor"),xc=yn((function(e,t){return e*t}),1),wc=An("round"),kc=yn((function(e,t){return e-t}),0);return C.after=function(e,t){if("function"!=typeof t)throw new yo(W);return e=qi(e),function(){if(--e<1)return t.apply(this,arguments)}},C.ary=ki,C.assign=Os,C.assignIn=Bs,C.assignInWith=Ps,C.assignWith=js,C.at=Fs,C.before=Ci,C.bind=fs,C.bindAll=ac,C.bindKey=hs,C.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ss(e)?e:[e]},C.chain=vi,C.chunk=function(e,t,r){t=(r?Wn(e,t,r):t===G)?1:ea(qi(t),0);var n=null==e?0:e.length;if(!n||t<1)return[];for(var i=0,o=0,a=uo(Xo(n/t));i<n;)a[o++]=Ir(e,i,i+=t);return a},C.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,i=[];++t<r;){var o=e[t];o&&(i[n++]=o)}return i},C.concat=function(){var e=arguments.length;if(!e)return[];for(var t=uo(e-1),r=arguments[0],n=e;n--;)t[n-1]=arguments[n];return p(Ss(r)?on(r):[r],Lt(t,1))},C.cond=function(e){var t=null==e?0:e.length,n=jn();return e=t?u(e,(function(e){if("function"!=typeof e[1])throw new yo(W);return[n(e[0]),e[1]]})):[],$r((function(n){for(var i=-1;++i<t;){var o=e[i];if(r(o[0],this,n))return r(o[1],this,n)}}))},C.conforms=function(e){return function(e){var t=Yi(e);return function(r){return Dt(r,e,t)}}(At(e,1))},C.constant=ro,C.countBy=os,C.create=function(e,t){var r=ka(e);return null==t?r:kt(r,t)},C.curry=function e(t,r,n){var i=Tn(t,8,G,G,G,G,G,r=n?G:r);return i.placeholder=e.placeholder,i},C.curryRight=function e(t,r,n){var i=Tn(t,16,G,G,G,G,G,r=n?G:r);return i.placeholder=e.placeholder,i},C.debounce=zi,C.defaults=Rs,C.defaultsDeep=Ns,C.defer=gs,C.delay=vs,C.difference=Na,C.differenceBy=qa,C.differenceWith=Ha,C.drop=function(e,t,r){var n=null==e?0:e.length;return n?Ir(e,(t=r||t===G?1:qi(t))<0?0:t,n):[]},C.dropRight=function(e,t,r){var n=null==e?0:e.length;return n?Ir(e,0,(t=n-(t=r||t===G?1:qi(t)))<0?0:t):[]},C.dropRightWhile=function(e,t){return e&&e.length?Ur(e,jn(t,3),!0,!0):[]},C.dropWhile=function(e,t){return e&&e.length?Ur(e,jn(t,3),!0):[]},C.fill=function(e,t,r,n){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&Wn(e,t,r)&&(r=0,n=i),function(e,t,r,n){var i=e.length;for((r=qi(r))<0&&(r=-r>i?0:i+r),(n=n===G||n>i?i:qi(n))<0&&(n+=i),n=r>n?0:Hi(n);r<n;)e[r++]=t;return e}(e,t,r,n)):[]},C.filter=function(e,t){return(Ss(e)?s:Mt)(e,jn(t,3))},C.flatMap=function(e,t){return Lt(wi(e,t),1)},C.flatMapDeep=function(e,t){return Lt(wi(e,t),J)},C.flatMapDepth=function(e,t,r){return r=r===G?1:qi(r),Lt(wi(e,t),r)},C.flatten=ui,C.flattenDeep=function(e){return null!=e&&e.length?Lt(e,J):[]},C.flattenDepth=function(e,t){return null!=e&&e.length?Lt(e,t=t===G?1:qi(t)):[]},C.flip=function(e){return Tn(e,512)},C.flow=sc,C.flowRight=cc,C.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var i=e[t];n[i[0]]=i[1]}return n},C.functions=function(e){return null==e?[]:jt(e,Yi(e))},C.functionsIn=function(e){return null==e?[]:jt(e,Ki(e))},C.groupBy=cs,C.initial=function(e){return null!=e&&e.length?Ir(e,0,-1):[]},C.intersection=Ua,C.intersectionBy=Ga,C.intersectionWith=Wa,C.invert=qs,C.invertBy=Hs,C.invokeMap=ls,C.iteratee=io,C.keyBy=us,C.keys=Yi,C.keysIn=Ki,C.map=wi,C.mapKeys=function(e,t){var r={};return t=jn(t,3),It(e,(function(e,n,i){Ct(r,t(e,n,i),e)})),r},C.mapValues=function(e,t){var r={};return t=jn(t,3),It(e,(function(e,n,i){Ct(r,n,t(e,n,i))})),r},C.matches=function(e){return yr(At(e,1))},C.matchesProperty=function(e,t){return xr(e,At(t,1))},C.memoize=Si,C.merge=Gs,C.mergeWith=Ws,C.method=lc,C.methodOf=uc,C.mixin=oo,C.negate=Ai,C.nthArg=function(e){return e=qi(e),$r((function(t){return kr(t,e)}))},C.omit=Xs,C.omitBy=function(e,t){return Ji(e,Ai(jn(t)))},C.once=function(e){return Ci(2,e)},C.orderBy=function(e,t,r,n){return null==e?[]:(Ss(t)||(t=null==t?[]:[t]),Ss(r=n?G:r)||(r=null==r?[]:[r]),Cr(e,t,r))},C.over=pc,C.overArgs=bs,C.overEvery=dc,C.overSome=mc,C.partial=ys,C.partialRight=xs,C.partition=ps,C.pick=Vs,C.pickBy=Ji,C.property=so,C.propertyOf=function(e){return function(t){return null==e?G:Ft(e,t)}},C.pull=Xa,C.pullAll=mi,C.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?Sr(e,t,jn(r,2)):e},C.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Sr(e,t,G,r):e},C.pullAt=Va,C.range=fc,C.rangeRight=hc,C.rearg=ws,C.reject=function(e,t){return(Ss(e)?s:Mt)(e,Ai(jn(t,3)))},C.remove=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,i=[],o=e.length;for(t=jn(t,3);++n<o;){var a=e[n];t(a,n,e)&&(r.push(a),i.push(n))}return Ar(e,i),r},C.rest=function(e,t){if("function"!=typeof e)throw new yo(W);return $r(e,t=t===G?t:qi(t))},C.reverse=fi,C.sampleSize=function(e,t,r){return t=(r?Wn(e,t,r):t===G)?1:qi(t),(Ss(e)?gt:Er)(e,t)},C.set=function(e,t,r){return null==e?e:Mr(e,t,r)},C.setWith=function(e,t,r,n){return n="function"==typeof n?n:G,null==e?e:Mr(e,t,r,n)},C.shuffle=function(e){return(Ss(e)?vt:Lr)(e)},C.slice=function(e,t,r){var n=null==e?0:e.length;return n?(r&&"number"!=typeof r&&Wn(e,t,r)?(t=0,r=n):(t=null==t?0:qi(t),r=r===G?n:qi(r)),Ir(e,t,r)):[]},C.sortBy=ds,C.sortedUniq=function(e){return e&&e.length?jr(e):[]},C.sortedUniqBy=function(e,t){return e&&e.length?jr(e,jn(t,2)):[]},C.split=function(e,t,r){return r&&"number"!=typeof r&&Wn(e,t,r)&&(t=r=G),(r=r===G?ee:r>>>0)?(e=Wi(e))&&("string"==typeof t||null!=t&&!_s(t))&&!(t=Rr(t))&&O(e)?Jr(q(e),0,r):e.split(t,r):[]},C.spread=function(e,t){if("function"!=typeof e)throw new yo(W);return t=null==t?0:ea(qi(t),0),$r((function(n){var i=n[t],o=Jr(n,0,t);return i&&p(o,i),r(e,this,o)}))},C.tail=function(e){var t=null==e?0:e.length;return t?Ir(e,1,t):[]},C.take=function(e,t,r){return e&&e.length?Ir(e,0,(t=r||t===G?1:qi(t))<0?0:t):[]},C.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?Ir(e,(t=n-(t=r||t===G?1:qi(t)))<0?0:t,n):[]},C.takeRightWhile=function(e,t){return e&&e.length?Ur(e,jn(t,3),!1,!0):[]},C.takeWhile=function(e,t){return e&&e.length?Ur(e,jn(t,3)):[]},C.tap=function(e,t){return t(e),e},C.throttle=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new yo(W);return Ii(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),zi(e,t,{leading:n,maxWait:t,trailing:i})},C.thru=bi,C.toArray=Ri,C.toPairs=Ys,C.toPairsIn=Ks,C.toPath=function(e){return Ss(e)?u(e,oi):Fi(e)?[e]:on(Ra(Wi(e)))},C.toPlainObject=Gi,C.transform=function(e,t,r){var n=Ss(e),o=n||Ds(e)||Ms(e);if(t=jn(t,4),null==r){var a=e&&e.constructor;r=o?n?new a:[]:Ii(e)&&Ei(a)?ka(Bo(e)):{}}return(o?i:It)(e,(function(e,n,i){return t(r,e,n,i)})),r},C.unary=function(e){return ki(e,1)},C.union=Ya,C.unionBy=Ka,C.unionWith=Ja,C.uniq=function(e){return e&&e.length?Nr(e):[]},C.uniqBy=function(e,t){return e&&e.length?Nr(e,jn(t,2)):[]},C.uniqWith=function(e,t){return t="function"==typeof t?t:G,e&&e.length?Nr(e,G,t):[]},C.unset=function(e,t){return null==e||qr(e,t)},C.unzip=hi,C.unzipWith=gi,C.update=function(e,t,r){return null==e?e:Hr(e,t,Yr(r))},C.updateWith=function(e,t,r,n){return n="function"==typeof n?n:G,null==e?e:Hr(e,t,Yr(r),n)},C.values=Zi,C.valuesIn=function(e){return null==e?[]:$(e,Ki(e))},C.without=Za,C.words=to,C.wrap=function(e,t){return ys(Yr(t),e)},C.xor=Qa,C.xorBy=es,C.xorWith=ts,C.zip=rs,C.zipObject=function(e,t){return Xr(e||[],t||[],yt)},C.zipObjectDeep=function(e,t){return Xr(e||[],t||[],Mr)},C.zipWith=ns,C.entries=Ys,C.entriesIn=Ks,C.extend=Bs,C.extendWith=Ps,oo(C,C),C.add=gc,C.attempt=oc,C.camelCase=Js,C.capitalize=Qi,C.ceil=vc,C.clamp=function(e,t,r){return r===G&&(r=t,t=G),r!==G&&(r=(r=Ui(r))==r?r:0),t!==G&&(t=(t=Ui(t))==t?t:0),St(Ui(e),t,r)},C.clone=function(e){return At(e,4)},C.cloneDeep=function(e){return At(e,5)},C.cloneDeepWith=function(e,t){return At(e,5,t="function"==typeof t?t:G)},C.cloneWith=function(e,t){return At(e,4,t="function"==typeof t?t:G)},C.conformsTo=function(e,t){return null==t||Dt(e,t,Yi(t))},C.deburr=eo,C.defaultTo=function(e,t){return null==e||e!=e?t:e},C.divide=bc,C.endsWith=function(e,t,r){e=Wi(e),t=Rr(t);var n=e.length,i=r=r===G?n:St(qi(r),0,n);return(r-=t.length)>=0&&e.slice(r,i)==t},C.eq=Di,C.escape=function(e){return(e=Wi(e))&&Oe.test(e)?e.replace(Le,pr):e},C.escapeRegExp=function(e){return(e=Wi(e))&&He.test(e)?e.replace(qe,"\\$&"):e},C.every=function(e,t,r){var n=Ss(e)?a:_t;return r&&Wn(e,t,r)&&(t=G),n(e,jn(t,3))},C.find=as,C.findIndex=ci,C.findKey=function(e,t){return g(e,jn(t,3),It)},C.findLast=ss,C.findLastIndex=li,C.findLastKey=function(e,t){return g(e,jn(t,3),Ot)},C.floor=yc,C.forEach=yi,C.forEachRight=xi,C.forIn=function(e,t){return null==e?e:Sa(e,jn(t,3),Ki)},C.forInRight=function(e,t){return null==e?e:Aa(e,jn(t,3),Ki)},C.forOwn=function(e,t){return e&&It(e,jn(t,3))},C.forOwnRight=function(e,t){return e&&Ot(e,jn(t,3))},C.get=Xi,C.gt=ks,C.gte=Cs,C.has=function(e,t){return null!=e&&qn(e,t,Yt)},C.hasIn=Vi,C.head=pi,C.identity=no,C.includes=function(e,t,r,n){e=Ti(e)?e:Zi(e),r=r&&!n?qi(r):0;var i=e.length;return r<0&&(r=ea(i+r,0)),ji(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&b(e,t,r)>-1},C.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:qi(r);return i<0&&(i=ea(n+i,0)),b(e,t,i)},C.inRange=function(e,t,r){return t=Ni(t),r===G?(r=t,t=0):r=Ni(r),function(e,t,r){return e>=ta(t,r)&&e<ea(t,r)}(e=Ui(e),t,r)},C.invoke=Us,C.isArguments=zs,C.isArray=Ss,C.isArrayBuffer=As,C.isArrayLike=Ti,C.isArrayLikeObject=$i,C.isBoolean=function(e){return!0===e||!1===e||Oi(e)&&Nt(e)==ie},C.isBuffer=Ds,C.isDate=Ts,C.isElement=function(e){return Oi(e)&&1===e.nodeType&&!Pi(e)},C.isEmpty=function(e){if(null==e)return!0;if(Ti(e)&&(Ss(e)||"string"==typeof e||"function"==typeof e.splice||Ds(e)||Ms(e)||zs(e)))return!e.length;var t=Oa(e);if(t==le||t==fe)return!e.size;if(Yn(e))return!gr(e).length;for(var r in e)if(So.call(e,r))return!1;return!0},C.isEqual=function(e,t){return rr(e,t)},C.isEqualWith=function(e,t,r){var n=(r="function"==typeof r?r:G)?r(e,t):G;return n===G?rr(e,t,G,r):!!n},C.isError=_i,C.isFinite=function(e){return"number"==typeof e&&Jo(e)},C.isFunction=Ei,C.isInteger=Mi,C.isLength=Li,C.isMap=$s,C.isMatch=function(e,t){return e===t||lr(e,t,Rn(t))},C.isMatchWith=function(e,t,r){return r="function"==typeof r?r:G,lr(e,t,Rn(t),r)},C.isNaN=function(e){return Bi(e)&&e!=+e},C.isNative=function(e){if(Ba(e))throw new mo("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return fr(e)},C.isNil=function(e){return null==e},C.isNull=function(e){return null===e},C.isNumber=Bi,C.isObject=Ii,C.isObjectLike=Oi,C.isPlainObject=Pi,C.isRegExp=_s,C.isSafeInteger=function(e){return Mi(e)&&e>=-Z&&e<=Z},C.isSet=Es,C.isString=ji,C.isSymbol=Fi,C.isTypedArray=Ms,C.isUndefined=function(e){return e===G},C.isWeakMap=function(e){return Oi(e)&&Oa(e)==ve},C.isWeakSet=function(e){return Oi(e)&&"[object WeakSet]"==Nt(e)},C.join=function(e,t){return null==e?"":Zo.call(e,t)},C.kebabCase=Zs,C.last=di,C.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=n;return r!==G&&(i=(i=qi(r))<0?ea(n+i,0):ta(i,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,i):v(e,x,i,!0)},C.lowerCase=Qs,C.lowerFirst=ec,C.lt=Ls,C.lte=Is,C.max=function(e){return e&&e.length?Et(e,no,Wt):G},C.maxBy=function(e,t){return e&&e.length?Et(e,jn(t,2),Wt):G},C.mean=function(e){return w(e,no)},C.meanBy=function(e,t){return w(e,jn(t,2))},C.min=function(e){return e&&e.length?Et(e,no,vr):G},C.minBy=function(e,t){return e&&e.length?Et(e,jn(t,2),vr):G},C.stubArray=co,C.stubFalse=lo,C.stubObject=function(){return{}},C.stubString=function(){return""},C.stubTrue=function(){return!0},C.multiply=xc,C.nth=function(e,t){return e&&e.length?kr(e,qi(t)):G},C.noConflict=function(){return Jt._===this&&(Jt._=_o),this},C.noop=ao,C.now=ms,C.pad=function(e,t,r){e=Wi(e);var n=(t=qi(t))?N(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return wn(Vo(i),r)+e+wn(Xo(i),r)},C.padEnd=function(e,t,r){e=Wi(e);var n=(t=qi(t))?N(e):0;return t&&n<t?e+wn(t-n,r):e},C.padStart=function(e,t,r){e=Wi(e);var n=(t=qi(t))?N(e):0;return t&&n<t?wn(t-n,r)+e:e},C.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),na(Wi(e).replace(Ue,""),t||0)},C.random=function(e,t,r){if(r&&"boolean"!=typeof r&&Wn(e,t,r)&&(t=r=G),r===G&&("boolean"==typeof t?(r=t,t=G):"boolean"==typeof e&&(r=e,e=G)),e===G&&t===G?(e=0,t=1):(e=Ni(e),t===G?(t=e,e=0):t=Ni(t)),e>t){var n=e;e=t,t=n}if(r||e%1||t%1){var i=ia();return ta(e+i*(t-e+Xt("1e-"+((i+"").length-1))),t)}return Dr(e,t)},C.reduce=function(e,t,r){var n=Ss(e)?d:z,i=arguments.length<3;return n(e,jn(t,4),r,i,Ca)},C.reduceRight=function(e,t,r){var n=Ss(e)?m:z,i=arguments.length<3;return n(e,jn(t,4),r,i,za)},C.repeat=function(e,t,r){return t=(r?Wn(e,t,r):t===G)?1:qi(t),Tr(Wi(e),t)},C.replace=function(){var e=arguments,t=Wi(e[0]);return e.length<3?t:t.replace(e[1],e[2])},C.result=function(e,t,r){var n=-1,i=(t=Kr(t,e)).length;for(i||(i=1,e=G);++n<i;){var o=null==e?G:e[oi(t[n])];o===G&&(n=i,o=r),e=Ei(o)?o.call(e):o}return e},C.round=wc,C.runInContext=e,C.sample=function(e){return(Ss(e)?ht:_r)(e)},C.size=function(e){if(null==e)return 0;if(Ti(e))return ji(e)?N(e):e.length;var t=Oa(e);return t==le||t==fe?e.size:gr(e).length},C.snakeCase=tc,C.some=function(e,t,r){var n=Ss(e)?f:Or;return r&&Wn(e,t,r)&&(t=G),n(e,jn(t,3))},C.sortedIndex=function(e,t){return Br(e,t)},C.sortedIndexBy=function(e,t,r){return Pr(e,t,jn(r,2))},C.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=Br(e,t);if(n<r&&Di(e[n],t))return n}return-1},C.sortedLastIndex=function(e,t){return Br(e,t,!0)},C.sortedLastIndexBy=function(e,t,r){return Pr(e,t,jn(r,2),!0)},C.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var r=Br(e,t,!0)-1;if(Di(e[r],t))return r}return-1},C.startCase=rc,C.startsWith=function(e,t,r){return e=Wi(e),r=null==r?0:St(qi(r),0,e.length),t=Rr(t),e.slice(r,r+t.length)==t},C.subtract=kc,C.sum=function(e){return e&&e.length?S(e,no):0},C.sumBy=function(e,t){return e&&e.length?S(e,jn(t,2)):0},C.template=function(e,t,r){var n=C.templateSettings;r&&Wn(e,t,r)&&(t=G),e=Wi(e),t=Ps({},t,n,$n);var i,o,a=Ps({},t.imports,n.imports,$n),s=Yi(a),c=$(a,s),l=0,u=t.interpolate||at,p="__p += '",d=vo((t.escape||at).source+"|"+u.source+"|"+(u===je?Ze:at).source+"|"+(t.evaluate||at).source+"|$","g"),m="//# sourceURL="+(So.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ht+"]")+"\n";e.replace(d,(function(t,r,n,a,s,c){return n||(n=a),p+=e.slice(l,c).replace(st,I),r&&(i=!0,p+="' +\n__e("+r+") +\n'"),s&&(o=!0,p+="';\n"+s+";\n__p += '"),n&&(p+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),l=c+t.length,t})),p+="';\n";var f=So.call(t,"variable")&&t.variable;if(f){if(Ke.test(f))throw new mo("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(o?p.replace($e,""):p).replace(_e,"$1").replace(Ee,"$1;"),p="function("+(f||"obj")+") {\n"+(f?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var h=oc((function(){return fo(s,m+"return "+p).apply(G,c)}));if(h.source=p,_i(h))throw h;return h},C.times=function(e,t){if((e=qi(e))<1||e>Z)return[];var r=ee,n=ta(e,ee);t=jn(t),e-=ee;for(var i=A(n,t);++r<e;)t(r);return i},C.toFinite=Ni,C.toInteger=qi,C.toLength=Hi,C.toLower=function(e){return Wi(e).toLowerCase()},C.toNumber=Ui,C.toSafeInteger=function(e){return e?St(qi(e),-Z,Z):0===e?e:0},C.toString=Wi,C.toUpper=function(e){return Wi(e).toUpperCase()},C.trim=function(e,t,r){if((e=Wi(e))&&(r||t===G))return D(e);if(!e||!(t=Rr(t)))return e;var n=q(e),i=q(t);return Jr(n,E(n,i),M(n,i)+1).join("")},C.trimEnd=function(e,t,r){if((e=Wi(e))&&(r||t===G))return e.slice(0,H(e)+1);if(!e||!(t=Rr(t)))return e;var n=q(e);return Jr(n,0,M(n,q(t))+1).join("")},C.trimStart=function(e,t,r){if((e=Wi(e))&&(r||t===G))return e.replace(Ue,"");if(!e||!(t=Rr(t)))return e;var n=q(e);return Jr(n,E(n,q(t))).join("")},C.truncate=function(e,t){var r=30,n="...";if(Ii(t)){var i="separator"in t?t.separator:i;r="length"in t?qi(t.length):r,n="omission"in t?Rr(t.omission):n}var o=(e=Wi(e)).length;if(O(e)){var a=q(e);o=a.length}if(r>=o)return e;var s=r-N(n);if(s<1)return n;var c=a?Jr(a,0,s).join(""):e.slice(0,s);if(i===G)return c+n;if(a&&(s+=c.length-s),_s(i)){if(e.slice(s).search(i)){var l,u=c;for(i.global||(i=vo(i.source,Wi(Qe.exec(i))+"g")),i.lastIndex=0;l=i.exec(u);)var p=l.index;c=c.slice(0,p===G?s:p)}}else if(e.indexOf(Rr(i),s)!=s){var d=c.lastIndexOf(i);d>-1&&(c=c.slice(0,d))}return c+n},C.unescape=function(e){return(e=Wi(e))&&Ie.test(e)?e.replace(Me,dr):e},C.uniqueId=function(e){var t=++Ao;return Wi(e)+t},C.upperCase=nc,C.upperFirst=ic,C.each=yi,C.eachRight=xi,C.first=pi,oo(C,function(){var e={};return It(C,(function(t,r){So.call(C.prototype,r)||(e[r]=t)})),e}(),{chain:!1}),C.VERSION="4.17.21",i(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){C[e].placeholder=C})),i(["drop","take"],(function(e,t){ct.prototype[e]=function(r){r=r===G?1:ea(qi(r),0);var n=this.__filtered__&&!t?new ct(this):this.clone();return n.__filtered__?n.__takeCount__=ta(r,n.__takeCount__):n.__views__.push({size:ta(r,ee),type:e+(n.__dir__<0?"Right":"")}),n},ct.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),i(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;ct.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:jn(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),i(["head","last"],(function(e,t){var r="take"+(t?"Right":"");ct.prototype[e]=function(){return this[r](1).value()[0]}})),i(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");ct.prototype[e]=function(){return this.__filtered__?new ct(this):this[r](1)}})),ct.prototype.compact=function(){return this.filter(no)},ct.prototype.find=function(e){return this.filter(e).head()},ct.prototype.findLast=function(e){return this.reverse().find(e)},ct.prototype.invokeMap=$r((function(e,t){return"function"==typeof e?new ct(this):this.map((function(r){return Qt(r,e,t)}))})),ct.prototype.reject=function(e){return this.filter(Ai(jn(e)))},ct.prototype.slice=function(e,t){e=qi(e);var r=this;return r.__filtered__&&(e>0||t<0)?new ct(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==G&&(r=(t=qi(t))<0?r.dropRight(-t):r.take(t-e)),r)},ct.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},ct.prototype.toArray=function(){return this.take(ee)},It(ct.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),i=C[n?"take"+("last"==t?"Right":""):t],o=n||/^find/.test(t);i&&(C.prototype[t]=function(){var t=this.__wrapped__,a=n?[1]:arguments,s=t instanceof ct,c=a[0],l=s||Ss(t),u=function(e){var t=i.apply(C,p([e],a));return n&&d?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(s=l=!1);var d=this.__chain__,m=!!this.__actions__.length,f=o&&!d,h=s&&!m;if(!o&&l){t=h?t:new ct(this);var g=e.apply(t,a);return g.__actions__.push({func:bi,args:[u],thisArg:G}),new Ye(g,d)}return f&&h?e.apply(this,a):(g=this.thru(u),f?n?g.value()[0]:g.value():g)})})),i(["pop","push","shift","sort","splice","unshift"],(function(e){var t=xo[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);C.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(Ss(i)?i:[],e)}return this[r]((function(r){return t.apply(Ss(r)?r:[],e)}))}})),It(ct.prototype,(function(e,t){var r=C[t];if(r){var n=r.name+"";So.call(ma,n)||(ma[n]=[]),ma[n].push({name:t,func:r})}})),ma[vn(G,2).name]=[{name:"wrapper",func:G}],ct.prototype.clone=function(){var e=new ct(this.__wrapped__);return e.__actions__=on(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=on(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=on(this.__views__),e},ct.prototype.reverse=function(){if(this.__filtered__){var e=new ct(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},ct.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Ss(e),n=t<0,i=r?e.length:0,o=function(e,t,r){for(var n=-1,i=r.length;++n<i;){var o=r[n],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=ta(t,e+a);break;case"takeRight":e=ea(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,c=s-a,l=n?s:a-1,u=this.__iteratees__,p=u.length,d=0,m=ta(c,this.__takeCount__);if(!r||!n&&i==c&&m==c)return Gr(e,this.__actions__);var f=[];e:for(;c--&&d<m;){for(var h=-1,g=e[l+=t];++h<p;){var v=u[h],b=v.iteratee,y=v.type,x=b(g);if(2==y)g=x;else if(!x){if(1==y)continue e;break e}}f[d++]=g}return f},C.prototype.at=is,C.prototype.chain=function(){return vi(this)},C.prototype.commit=function(){return new Ye(this.value(),this.__chain__)},C.prototype.next=function(){this.__values__===G&&(this.__values__=Ri(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?G:this.__values__[this.__index__++]}},C.prototype.plant=function(e){for(var t,r=this;r instanceof Ge;){var n=si(r);n.__index__=0,n.__values__=G,t?i.__wrapped__=n:t=n;var i=n;r=r.__wrapped__}return i.__wrapped__=e,t},C.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof ct){var t=e;return this.__actions__.length&&(t=new ct(this)),(t=t.reverse()).__actions__.push({func:bi,args:[fi],thisArg:G}),new Ye(t,this.__chain__)}return this.thru(fi)},C.prototype.toJSON=C.prototype.valueOf=C.prototype.value=function(){return Gr(this.__wrapped__,this.__actions__)},C.prototype.first=C.prototype.head,No&&(C.prototype[No]=function(){return this}),C}();Qt?((Qt.exports=mr)._=mr,Zt._=mr):Jt._=mr}).call(Kc)})),uw=Zc((function(e,t){t.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"},t.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","rangeStep","rangeStepRight","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},t.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},t.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},t.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},t.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},t.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},t.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},t.realToAlias=function(){var e=Object.prototype.hasOwnProperty,r=t.aliasToReal,n={};for(var i in r){var o=r[i];e.call(n,o)?n[o].push(i):n[o]=[i]}return n}(),t.remap={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",rangeStep:"range",rangeStepRight:"rangeRight",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},t.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},t.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}})),pw={},dw=Array.prototype.push;function mw(e,t){return 2==t?function(t,r){return e(t,r)}:function(t){return e(t)}}function fw(e){for(var t=e?e.length:0,r=Array(t);t--;)r[t]=e[t];return r}function hw(e,t){return function(){var r=arguments.length;if(r){for(var n=Array(r);r--;)n[r]=arguments[r];var i=n[0]=t.apply(void 0,n);return e.apply(void 0,n),i}}}var gw=lw.runInContext(),vw=function e(t,r,n,i){var o="function"==typeof r,a=r===Object(r);if(a&&(i=n,n=r,r=void 0),null==n)throw new TypeError;i||(i={});var s=!("cap"in i)||i.cap,c=!("curry"in i)||i.curry,l=!("fixed"in i)||i.fixed,u=!("immutable"in i)||i.immutable,p=!("rearg"in i)||i.rearg,d=o?n:pw,m="curry"in i&&i.curry,f="fixed"in i&&i.fixed,h="rearg"in i&&i.rearg,g=o?n.runInContext():void 0,v=o?n:{ary:t.ary,assign:t.assign,clone:t.clone,curry:t.curry,forEach:t.forEach,isArray:t.isArray,isError:t.isError,isFunction:t.isFunction,isWeakMap:t.isWeakMap,iteratee:t.iteratee,keys:t.keys,rearg:t.rearg,toInteger:t.toInteger,toPath:t.toPath},b=v.ary,y=v.assign,x=v.clone,w=v.curry,k=v.forEach,C=v.isArray,z=v.isError,S=v.isFunction,A=v.isWeakMap,D=v.keys,T=v.rearg,$=v.toInteger,_=v.toPath,E=D(uw.aryMethod),M={castArray:function(e){return function(){var t=arguments[0];return C(t)?e(fw(t)):e.apply(void 0,arguments)}},iteratee:function(e){return function(){var t=arguments[0],r=arguments[1],n=e(t,r),i=n.length;return s&&"number"==typeof r?(r=r>2?r-2:1,i&&i<=r?n:mw(n,r)):n}},mixin:function(e){return function(t){var r=this;if(!S(r))return e(r,Object(t));var n=[];return k(D(t),(function(e){S(t[e])&&n.push([e,r.prototype[e]])})),e(r,Object(t)),k(n,(function(e){var t=e[1];S(t)?r.prototype[e[0]]=t:delete r.prototype[e[0]]})),r}},nthArg:function(e){return function(t){var r=t<0?1:$(t)+1;return w(e(t),r)}},rearg:function(e){return function(t,r){var n=r?r.length:0;return w(e(t,r),n)}},runInContext:function(r){return function(n){return e(t,r(n),i)}}};function L(e,t){if(s){var r=uw.iterateeRearg[e];if(r)return function(e,t){return j(e,(function(e){var r=t.length;return function(e,t){return 2==t?function(t,r){return e.apply(void 0,arguments)}:function(t){return e.apply(void 0,arguments)}}(T(mw(e,r),t),r)}))}(t,r);var n=!o&&uw.iterateeAry[e];if(n)return function(e,t){return j(e,(function(e){return"function"==typeof e?mw(e,t):e}))}(t,n)}return t}function I(e,t,r){if(l&&(f||!uw.skipFixed[e])){var n=uw.methodSpread[e],i=n&&n.start;return void 0===i?b(t,r):function(e,t){return function(){for(var r=arguments.length,n=r-1,i=Array(r);r--;)i[r]=arguments[r];var o=i[t],a=i.slice(0,t);return o&&dw.apply(a,o),t!=n&&dw.apply(a,i.slice(t+1)),e.apply(this,a)}}(t,i)}return t}function O(e,t,r){return p&&r>1&&(h||!uw.skipRearg[e])?T(t,uw.methodRearg[e]||uw.aryRearg[r]):t}function B(e,t){for(var r=-1,n=(t=_(t)).length,i=n-1,o=x(Object(e)),a=o;null!=a&&++r<n;){var s=t[r],c=a[s];null==c||S(c)||z(c)||A(c)||(a[s]=x(r==i?c:Object(c))),a=a[s]}return o}function P(t,r){var n=uw.aliasToReal[t]||t,a=uw.remap[n]||n,s=i;return function(t){var i=o?g:v,c=o?g[a]:r,l=y(y({},s),t);return e(i,n,c,l)}}function j(e,t){return function(){var r=arguments.length;if(!r)return e();for(var n=Array(r);r--;)n[r]=arguments[r];var i=p?0:r-1;return n[i]=t(n[i]),e.apply(void 0,n)}}function F(e,t,r){var n,i=uw.aliasToReal[e]||e,o=t,a=M[i];return a?o=a(t):u&&(uw.mutate.array[i]?o=hw(t,fw):uw.mutate.object[i]?o=hw(t,function(e){return function(t){return e({},t)}}(t)):uw.mutate.set[i]&&(o=hw(t,B))),k(E,(function(e){return k(uw.aryMethod[e],(function(t){if(i==t){var r=uw.methodSpread[i],a=r&&r.afterRearg;return n=a?I(i,O(i,o,e),e):O(i,I(i,o,e),e),n=function(e,t,r){return m||c&&r>1?w(t,r):t}(0,n=L(i,n),e),!1}})),!n})),n||(n=o),n==t&&(n=m?w(n,1):function(){return t.apply(this,arguments)}),n.convert=P(i,t),n.placeholder=t.placeholder=r,n}if(!a)return F(r,n,d);var R=n,N=[];return k(E,(function(e){k(uw.aryMethod[e],(function(e){var t=R[uw.remap[e]||e];t&&N.push([e,F(e,t,R)])}))})),k(D(R),(function(e){var t=R[e];if("function"==typeof t){for(var r=N.length;r--;)if(N[r][0]==e)return;t.convert=P(e,t),N.push([e,t])}})),k(N,(function(e){R[e[0]]=e[1]})),R.convert=function(e){return R.runInContext.convert(e)(void 0)},R.placeholder=R,k(D(R),(function(e){k(uw.realToAlias[e]||[],(function(t){R[t]=R[e]}))})),R}(gw,gw);const{atob:bw}=cw,{cloneDeep:yw}=vw,{LITERAL_MARKER:xw}=aw;let ww;var kw=e=>ww=e,Cw={setJSRunner:kw,processJS:(e,t)=>{try{const r=`function run(){${bw(e)}};run();`,n={$:e=>((e,t)=>{let r=t;return e.split(".").forEach((e=>{if(null==r||"object"!=typeof r)return null;r=r[(e=>{if(!e||"string"!=typeof e)return e;const t=e.match(/\[+(.+)]+/);return t&&t[1]?t[1]:e})(e)]})),r})(e,yw(t))},i={data:ww(r,n)};return`{{${xw} js_result-${JSON.stringify(i)}}}`}catch(e){return"Error while executing JS"}}},zw=Zc((function(e){const{SafeString:t}=op,{processJS:r}=Cw,{HelperFunctionNames:n,HelperFunctionBuiltin:i,LITERAL_MARKER:o}=aw,a={"<":"&lt;",">":"&gt;"},s=[new sp(n.OBJECT,(e=>new t(JSON.stringify(e)))),new sp(n.JS,r,!1),new sp(n.ALL,((e,{__opts:r})=>{if(function(e){return null!=e&&"object"==typeof e&&("[object Object]"===e.toString()||e.length>0&&"object"==typeof e[0])}(e))return new t(JSON.stringify(e));if(null==e||"string"!=typeof e)return null==e?"":e;e&&e.string&&(e=e.string);let n=e;return r&&r.escapeNewlines&&(n=e.replace(/\n/g,"\\n")),n=new t(n.replace(/&amp;/g,"&")),null==n||"string"!=typeof n?n:n.replace(/[<>]/g,(e=>a[e]||e))})),new sp(n.LITERAL,(e=>{if(void 0===e)return"";const t=typeof e,r="object"===t?JSON.stringify(e):e;return`{{${o} ${t}-${r}}}`}))];e.exports.HelperNames=()=>Object.values(n).concat(i,sw.externalHelperNames),e.exports.registerMinimum=e=>{for(let t of s)t.register(e)},e.exports.registerAll=t=>{e.exports.registerMinimum(t),sw.registerAll(t)},e.exports.unregisterAll=e=>{for(let t of s)t.unregister(e);sw.unregisterAll(e)}}));const{HelperNames:Sw}=zw,{swapStrings:Aw,isAlphaNumeric:Dw}=cw,Tw=["#","else","/"],$w={SWAP_TO_DOT:"swap-to-dot-notation",FIX_FUNCTIONS:"fix-functions",FINALISE:"finalise"};class _w{constructor(e,t){this.name=e,this.fn=t}process(e,t,r){const n=this.fn(t,r),i=e.indexOf(t);return Aw(e,i,t.length,n)}}var Ew={processors:[new _w($w.SWAP_TO_DOT,(e=>{let t=e.indexOf("["),r=0;for(;-1!==t;){Dw(e.charAt(t-1))&&(e=Aw(e,t+r,1,".[")),r=t+1;const n=e.substring(r+1).indexOf("[");t=n>0?r+1+n:-1}return e})),new _w($w.FIX_FUNCTIONS,(e=>{for(let t of Tw){const r=`{ ${t}`,n=`{${t}`;e=e.replace(new RegExp(r,"g"),n)}return e})),new _w($w.FINALISE,((e,t)=>{const r=t&&t.noHelpers;let n=e.slice(2,e.length-2);" "===n.charAt(0)&&(n=n.slice(1))," "===n.charAt(n.length-1)&&(n=n.slice(0,n.length-1));const i=n.split(" ")[0];for(let t of Tw)if(i.includes(t))return e;const o=i.trim().toLowerCase();return!r&&Sw().some((e=>o===e.toLowerCase()))&&(n=`(${n})`),`{{ all ${n} }}`}))],PreprocessorNames:$w};const{LITERAL_MARKER:Mw}=aw,Lw={CONVERT_LITERALS:"convert-literals"};var Iw={PostProcessorNames:Lw,processors:[new class{constructor(e,t){this.name=e,this.fn=t}process(e){return this.fn(e)}}(Lw.CONVERT_LITERALS,(e=>{if("string"!=typeof e||!e.includes(Mw))return e;const t=e.indexOf("-"),r=e.substring(12,t),n=e.substring(t+1,e.length-2);switch(r){case"string":return n;case"number":return parseFloat(n);case"boolean":return"true"===n;case"object":return JSON.parse(n);case"js_result":return JSON.parse(n).data}return n}))]};const{FIND_HBS_REGEX:Ow}=cw;function Bw(e,t,r){for(let n of t){if("string"!=typeof e)break;let t=new RegExp(Ow),i=e.match(t);if(null!=i)for(let t of i)e=n.process(e,t,r)}return e}var Pw={math:{abs:{args:["a"],numArgs:1,example:"{{ abs 12012.1000 }} -> 12012.1",description:"<p>Return the magnitude of <code>a</code>.</p>\n"},add:{args:["a","b"],numArgs:2,example:"{{ add 1 2 }} -> 3",description:"<p>Return the sum of <code>a</code> plus <code>b</code>.</p>\n"},avg:{args:["array"],numArgs:1,example:"{{ avg 1 2 3 4 5 }} -> 3",description:"<p>Returns the average of all numbers in the given array.</p>\n"},ceil:{args:["value"],numArgs:1,example:"{{ ceil 1.2 }} -> 2",description:"<p>Get the <code>Math.ceil()</code> of the given value.</p>\n"},divide:{args:["a","b"],numArgs:2,example:"{{ divide 10 5 }} -> 2",description:"<p>Divide <code>a</code> by <code>b</code></p>\n"},floor:{args:["value"],numArgs:1,example:"{{ floor 1.2 }} -> 1",description:"<p>Get the <code>Math.floor()</code> of the given value.</p>\n"},minus:{args:["a","b"],numArgs:2,example:"{{ subtract 10 5 }} -> 5",description:"<p>Return the product of <code>a</code> minus <code>b</code>.</p>\n"},modulo:{args:["a","b"],numArgs:2,example:"{{ modulo 10 5 }} -> 0",description:"<p>Get the remainder of a division operation.</p>\n"},multiply:{args:["a","b"],numArgs:2,example:"{{ product 10 5 }} -> 50",description:"<p>Return the product of <code>a</code> times <code>b</code>.</p>\n"},plus:{args:["a","b"],numArgs:2,example:"{{ plus 10 5 }} -> 15",description:"<p>Add <code>a</code> by <code>b</code>.</p>\n"},random:{args:["min","max"],numArgs:2,example:"{{ random 0 20 }} -> 10",description:"<p>Generate a random number between two values</p>\n"},remainder:{args:["a","b"],numArgs:2,example:"{{ remainder 10 6 }} -> 4",description:"<p>Get the remainder when <code>a</code> is divided by <code>b</code>.</p>\n"},round:{args:["number"],numArgs:1,example:"{{ round 10.3 }} -> 10",description:"<p>Round the given number.</p>\n"},subtract:{args:["a","b"],numArgs:2,example:"{{ subtract 10 5 }} -> 5",description:"<p>Return the product of <code>a</code> minus <code>b</code>.</p>\n"},sum:{args:["array"],numArgs:1,example:"{{ sum [1, 2, 3] }} -> 6",description:"<p>Returns the sum of all numbers in the given array.</p>\n"},times:{args:["a","b"],numArgs:2,example:"{{ times 10 5 }} -> 50",description:"<p>Multiply number <code>a</code> by number <code>b</code>.</p>\n"}},array:{after:{args:["array","n"],numArgs:2,example:"{{ after [1, 2, 3] 1}} -> [3]",description:'<p>Returns all of the items in an array after the specified index. Opposite of <a href="#before">before</a>.</p>\n'},arrayify:{args:["value"],numArgs:1,example:"{{ arrayify 'foo' }} -> ['foo']",description:"<p>Cast the given <code>value</code> to an array.</p>\n"},before:{args:["array","n"],numArgs:2,example:"{{ before [1, 2, 3] 2}} -> [1, 2]",description:'<p>Return all of the items in the collection before the specified count. Opposite of <a href="#after">after</a>.</p>\n'},eachIndex:{args:["array","options"],numArgs:2,example:"{{#eachIndex [1, 2, 3]}} {{item}} is {{index}} {{/eachIndex}}",description:"<p>Iterates the array, listing an item and the index of it.</p>\n"},filter:{args:["array","value","options"],numArgs:3,example:"{{#filter [1, 2, 3] 2}}2 Found{{else}}2 not found{{/filter}}",description:"<p>Block helper that filters the given array and renders the block for values that evaluate to <code>true</code>, otherwise the inverse block is returned.</p>\n"},first:{args:["array","n"],numArgs:2,example:"{{first [1, 2, 3, 4] 2}} -> [1, 2]",description:"<p>Returns the first item, or first <code>n</code> items of an array.</p>\n"},forEach:{args:["array"],numArgs:1,example:"{{#forEach [{ 'name': 'John' }] }} {{ name }} {{/forEach}}",description:"<p>Iterates over each item in an array and exposes the current item in the array as context to the inner block. In addition to the current array item, the helper exposes the following variables to the inner block: - <code>index</code> - <code>total</code> - <code>isFirst</code> - <code>isLast</code> Also, <code>@index</code> is exposed as a private variable, and additional private variables may be defined as hash arguments.</p>\n"},inArray:{args:["array","value","options"],numArgs:3,example:"{{#inArray [1, 2, 3] 2}} 2 exists {{else}} 2 does not exist {{/inArray}} -> 2 exists",description:"<p>Block helper that renders the block if an array has the given <code>value</code>. Optionally specify an inverse block to render when the array does not have the given value.</p>\n"},isArray:{args:["value"],numArgs:1,example:"{{isArray [1, 2]}} -> true",description:"<p>Returns true if <code>value</code> is an es5 array.</p>\n"},itemAt:{args:["array","idx"],numArgs:2,example:"{{itemAt [1, 2, 3] 1}} -> 2",description:"<p>Returns the item from <code>array</code> at index <code>idx</code>.</p>\n"},join:{args:["array","separator"],numArgs:2,example:"{{join [1, 2, 3]}} -> '1, 2, 3'",description:"<p>Join all elements of array into a string, optionally using a given separator.</p>\n"},equalsLength:{args:["value","length","options"],numArgs:3,example:"{{equalsLength '[1,2,3]' 3}} -> true",description:"<p>Returns true if the the length of the given <code>value</code> is equal to the given <code>length</code>. Can be used as a block or inline helper.</p>\n"},last:{args:["value","n"],numArgs:2,example:"{{last [1, 2, 3]}} -> 3",description:'<p>Returns the last item, or last <code>n</code> items of an array or string. Opposite of <a href="#first">first</a>.</p>\n'},length:{args:["value"],numArgs:1,example:"{{length '[1, 2, 3]'}} -> 3",description:"<p>Returns the length of the given string or array.</p>\n"},lengthEqual:{args:["value","length","options"],numArgs:3,example:"{{equalsLength '[1,2,3]' 3}} -> true",description:"<p>Returns true if the the length of the given <code>value</code> is equal to the given <code>length</code>. Can be used as a block or inline helper.</p>\n"},map:{args:["array","fn"],numArgs:2,example:"{{map [1, 2, 3] double}} -> [2, 4, 6]",description:"<p>Returns a new array, created by calling <code>function</code> on each element of the given <code>array</code>. For example,</p>\n"},pluck:{args:["collection","prop"],numArgs:2,example:"{{pluck [{ 'name': 'Bob' }] 'name' }} -> ['Bob']",description:"<p>Map over the given object or array or objects and create an array of values from the given <code>prop</code>. Dot-notation may be used (as a string) to get nested properties.</p>\n"},reverse:{args:["value"],numArgs:1,example:"{{reverse [1, 2, 3]}} -> [3, 2, 1]",description:"<p>Reverse the elements in an array, or the characters in a string.</p>\n"},some:{args:["array","iter","provided"],numArgs:3,example:"{{#some [1, 'b', 3] isString}} string found {{else}} No string found {{/some}} -> string found",description:"<p>Block helper that returns the block if the callback returns true for some value in the given array.</p>\n"},sort:{args:["array","key"],numArgs:2,example:"{{ sort ['b', 'a', 'c'] }} -> ['a', 'b', 'c']",description:"<p>Sort the given <code>array</code>. If an array of objects is passed, you may optionally pass a <code>key</code> to sort on as the second argument. You may alternatively pass a sorting function as the second argument.</p>\n"},sortBy:{args:["array","props"],numArgs:2,example:"{{ sortBy [{a: 'zzz'}, {a: 'aaa'}] 'a' }} -> [{'a':'aaa'}, {'a':'zzz'}]",description:"<p>Sort an <code>array</code>. If an array of objects is passed, you may optionally pass a <code>key</code> to sort on as the second argument. You may alternatively pass a sorting function as the second argument.</p>\n"},withAfter:{args:["array","idx","options"],numArgs:3,example:"{{ withAfter [1, 2, 3] 1 }} {{this}} {{/withAfter}}",description:'<p>Use the items in the array <em>after</em> the specified index as context inside a block. Opposite of <a href="#withBefore">withBefore</a>.</p>\n'},withBefore:{args:["array","idx","options"],numArgs:3,example:"{{ withBefore [1, 2, 3] 2 }} {{this}} {{/withBefore}}",description:'<p>Use the items in the array <em>before</em> the specified index as context inside a block. Opposite of <a href="#withAfter">withAfter</a>.</p>\n'},withFirst:{args:["array","idx","options"],numArgs:3,example:"{{ withFirst [1, 2, 3] }} {{this}} {{/withFirst}}",description:'<p>Use the first item in a collection inside a handlebars block expression. Opposite of <a href="#withLast">withLast</a>.</p>\n'},withGroup:{args:["array","size","options"],numArgs:3,example:"{{#withGroup [1, 2, 3, 4] 2}} {{#each this}} {{.}} {{each}} <br> {{/withGroup}} -> 1,2<br> 3,4<br>",description:"<p>Block helper that groups array elements by given group <code>size</code>.</p>\n"},withLast:{args:["array","idx","options"],numArgs:3,example:"{{#withLast [1, 2, 3, 4]}} {{this}} {{/withLast}} -> 4",description:'<p>Use the last item or <code>n</code> items in an array as context inside a block. Opposite of <a href="#withFirst">withFirst</a>.</p>\n'},withSort:{args:["array","prop","options"],numArgs:3,example:"{{#withSort ['b', 'a', 'c']}} {{this}} {{/withSort}} -> abc",description:"<p>Block helper that sorts a collection and exposes the sorted collection as context inside the block.</p>\n"},unique:{args:["array","options"],numArgs:2,example:"{{#each (unique ['a', 'a', 'c', 'b', 'e', 'e']) }} {{.}} {{/each}} -> acbe",description:'<p>Block helper that return an array with all duplicate values removed. Best used along with a <a href="#each">each</a> helper.</p>\n'}},number:{bytes:{args:["number"],numArgs:1,example:"{{ bytes 1386 }} -> 1.4Kb",description:"<p>Format a number to it&#39;s equivalent in bytes. If a string is passed, it&#39;s length will be formatted and returned. <strong>Examples:</strong> - <code>&#39;foo&#39; =&gt; 3 B</code> - <code>13661855 =&gt; 13.66 MB</code> - <code>825399 =&gt; 825.39 kB</code> - <code>1396 =&gt; 1.4 kB</code></p>\n"},addCommas:{args:["num"],numArgs:1,example:"{{ addCommas 1000000 }} -> 1,000,000",description:"<p>Add commas to numbers</p>\n"},phoneNumber:{args:["num"],numArgs:1,example:"{{ phoneNumber 8005551212 }} -> (800) 555-1212",description:"<p>Convert a string or number to a formatted phone number.</p>\n"},toAbbr:{args:["number","precision"],numArgs:2,example:"{{ toAbbr 10123 2 }} -> 10.12k",description:"<p>Abbreviate numbers to the given number of <code>precision</code>. This for general numbers, not size in bytes.</p>\n"},toExponential:{args:["number","fractionDigits"],numArgs:2,example:"{{ toExponential 10123 2 }} -> 101e+4",description:"<p>Returns a string representing the given number in exponential notation.</p>\n"},toFixed:{args:["number","digits"],numArgs:2,example:"{{ toFixed 1.1234 2 }} -> 1.12",description:"<p>Formats the given number using fixed-point notation.</p>\n"},toFloat:{args:["number"],numArgs:1,description:"<p>Convert input to a float.</p>\n"},toInt:{args:["number"],numArgs:1,description:"<p>Convert input to an integer.</p>\n"},toPrecision:{args:["number","precision"],numArgs:2,example:"{{toPrecision '1.1234' 2}}",description:"<p>Returns a string representing the <code>Number</code> object to the specified precision.</p>\n"}},url:{encodeURI:{args:["str"],numArgs:1,example:"{{ encodeURI 'https://myurl?Hello There' }} -> https://myurl?Hello%20There",description:"<p>Encodes a Uniform Resource Identifier (URI) component by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character.</p>\n"},escape:{args:["str"],numArgs:1,example:"{{ escape 'https://myurl?Hello+There' }} -> https://myurl?Hello%20There",description:"<p>Escape the given string by replacing characters with escape sequences. Useful for allowing the string to be used in a URL, etc.</p>\n"},decodeURI:{args:["str"],numArgs:1,example:"{{ escape 'https://myurl?Hello%20There' }} -> https://myurl?Hello+There",description:"<p>Decode a Uniform Resource Identifier (URI) component.</p>\n"},url_encode:{args:[],numArgs:0,description:'<p>Alias for <a href="#encodeuri">encodeURI</a>.</p>\n'},url_decode:{args:[],numArgs:0,description:'<p>Alias for <a href="#decodeuri">decodeURI</a>.</p>\n'},urlResolve:{args:["base","href"],numArgs:2,example:"{{ urlResolve 'https://myurl' '/api/test' }} -> https://myurl/api/test",description:"<p>Take a base URL, and a href URL, and resolve them as a browser would for an anchor tag.</p>\n"},urlParse:{args:["str"],numArgs:1,example:"{{ urlParse 'https://myurl/api/test' }}",description:"<p>Parses a <code>url</code> string into an object.</p>\n"},stripQuerystring:{args:["url"],numArgs:1,example:"{{ stripQueryString 'https://myurl/api/test?foo=bar' }} -> 'https://myurl/api/test'",description:"<p>Strip the query string from the given <code>url</code>.</p>\n"},stripProtocol:{args:["str"],numArgs:1,example:"{{ stripProtocol 'https://myurl/api/test' }} -> 'myurl/api/test'",description:"<p>Strip protocol from a <code>url</code>. Useful for displaying media that may have an &#39;http&#39; protocol on secure connections.</p>\n"}},string:{append:{args:["str","suffix"],numArgs:2,example:"{{append 'index' '.html'}} -> index.html",description:"<p>Append the specified <code>suffix</code> to the given string.</p>\n"},camelcase:{args:["string"],numArgs:1,example:"{{camelcase 'foo bar baz'}} -> fooBarBaz",description:"<p>camelCase the characters in the given <code>string</code>.</p>\n"},capitalize:{args:["str"],numArgs:1,example:"{{capitalize 'foo bar baz'}} -> Foo bar baz",description:"<p>Capitalize the first word in a sentence.</p>\n"},capitalizeAll:{args:["str"],numArgs:1,example:"{{ capitalizeAll 'foo bar baz'}} -> Foo Bar Baz",description:"<p>Capitalize all words in a string.</p>\n"},center:{args:["str","spaces"],numArgs:2,example:"{{ center 'test' 1}} -> ' test '",description:"<p>Center a string using non-breaking spaces</p>\n"},chop:{args:["string"],numArgs:1,example:"{{ chop ' ABC '}} -> 'ABC'",description:"<p>Like trim, but removes both extraneous whitespace <strong>and non-word characters</strong> from the beginning and end of a string.</p>\n"},dashcase:{args:["string"],numArgs:1,example:"{{dashcase 'a-b-c d_e'}} -> a-b-c-d-e",description:"<p>dash-case the characters in <code>string</code>. Replaces non-word characters and periods with hyphens.</p>\n"},dotcase:{args:["string"],numArgs:1,example:"{{dotcase 'a-b-c d_e'}} -> a.b.c.d.e",description:"<p>dot.case the characters in <code>string</code>.</p>\n"},downcase:{args:["string"],numArgs:1,example:"{{downcase 'aBcDeF'}} -> abcdef",description:'<p>Lowercase all of the characters in the given string. Alias for <a href="#lowercase">lowercase</a>.</p>\n'},ellipsis:{args:["str","length"],numArgs:2,example:"{{ellipsis 'foo bar baz', 7}} -> foo bar…",description:"<p>Truncates a string to the specified <code>length</code>, and appends it with an elipsis, <code>…</code>.</p>\n"},hyphenate:{args:["str"],numArgs:1,example:"{{hyphenate 'foo bar baz qux'}} -> foo-bar-baz-qux",description:"<p>Replace spaces in a string with hyphens.</p>\n"},isString:{args:["value"],numArgs:1,example:"{{isString 'foo'}} -> true",description:"<p>Return true if <code>value</code> is a string.</p>\n"},lowercase:{args:["str"],numArgs:1,example:"{{lowercase 'Foo BAR baZ'}} -> foo bar baz",description:"<p>Lowercase all characters in the given string.</p>\n"},occurrences:{args:["str","substring"],numArgs:2,example:"{{occurrences 'foo bar foo bar baz' 'foo'}} -> 2",description:"<p>Return the number of occurrences of <code>substring</code> within the given <code>string</code>.</p>\n"},pascalcase:{args:["string"],numArgs:1,example:"{{pascalcase 'foo bar baz'}} -> FooBarBaz",description:"<p>PascalCase the characters in <code>string</code>.</p>\n"},pathcase:{args:["string"],numArgs:1,example:"{{pathcase 'a-b-c d_e'}} -> a/b/c/d/e",description:"<p>path/case the characters in <code>string</code>.</p>\n"},plusify:{args:["str"],numArgs:1,example:"{{plusify 'foo bar baz'}} -> foo+bar+baz",description:"<p>Replace spaces in the given string with pluses.</p>\n"},prepend:{args:["str","prefix"],numArgs:2,example:"{{prepend 'bar' 'foo-'}} -> foo-bar",description:"<p>Prepends the given <code>string</code> with the specified <code>prefix</code>.</p>\n"},raw:{args:["options"],numArgs:1,example:"{{{{#raw}}}} {{foo}} {{{{/raw}}}} -> {{foo}}",description:"<p>Render a block without processing mustache templates inside the block.</p>\n"},remove:{args:["str","substring"],numArgs:2,example:"{{remove 'a b a b a b' 'a '}} -> b b b",description:"<p>Remove all occurrences of <code>substring</code> from the given <code>str</code>.</p>\n"},removeFirst:{args:["str","substring"],numArgs:2,example:"{{remove 'a b a b a b' 'a'}} -> b a b a b",description:"<p>Remove the first occurrence of <code>substring</code> from the given <code>str</code>.</p>\n"},replace:{args:["str","a","b"],numArgs:3,example:"{{replace 'a b a b a b' 'a' 'z'}} -> z b z b z b",description:"<p>Replace all occurrences of substring <code>a</code> with substring <code>b</code>.</p>\n"},replaceFirst:{args:["str","a","b"],numArgs:3,example:"{{replace 'a b a b a b' 'a' 'z'}} -> z b a b a b",description:"<p>Replace the first occurrence of substring <code>a</code> with substring <code>b</code>.</p>\n"},sentence:{args:["str"],numArgs:1,example:"{{sentence 'hello world. goodbye world.'}} -> Hello world. Goodbye world.",description:"<p>Sentence case the given string</p>\n"},snakecase:{args:["string"],numArgs:1,example:"{{snakecase 'a-b-c d_e'}} -> a_b_c_d_e",description:"<p>snake_case the characters in the given <code>string</code>.</p>\n"},split:{args:["string"],numArgs:1,example:"{{split 'a,b,c'}} -> ['a', 'b', 'c']",description:"<p>Split <code>string</code> by the given <code>character</code>.</p>\n"},startsWith:{args:["prefix","testString","options"],numArgs:3,example:"{{#startsWith 'Goodbye' 'Hello, world!'}} Yep {{else}} Nope {{/startsWith}} -> Nope",description:"<p>Tests whether a string begins with the given prefix.</p>\n"},titleize:{args:["str"],numArgs:1,example:"{{#titleize 'this is title case' }} -> This Is Title Case",description:"<p>Title case the given string.</p>\n"},trim:{args:["string"],numArgs:1,example:"{{trim ' ABC ' }} -> ABC",description:"<p>Removes extraneous whitespace from the beginning and end of a string.</p>\n"},trimLeft:{args:["string"],numArgs:1,example:"{{trimLeft ' ABC ' }} -> 'ABC '",description:"<p>Removes extraneous whitespace from the beginning of a string.</p>\n"},trimRight:{args:["string"],numArgs:1,example:"{{trimRight ' ABC ' }} -> ' ABC '",description:"<p>Removes extraneous whitespace from the end of a string.</p>\n"},truncate:{args:["str","limit","suffix"],numArgs:3,example:"{{truncate 'foo bar baz' 7 }} -> foo bar",description:'<p>Truncate a string to the specified <code>length</code>. Also see <a href="#ellipsis">ellipsis</a>.</p>\n'},truncateWords:{args:["str","limit","suffix"],numArgs:3,example:"{{truncateWords 'foo bar baz' 1 }} -> foo",description:'<p>Truncate a string to have the specified number of words. Also see <a href="#truncate">truncate</a>.</p>\n'},upcase:{args:["string"],numArgs:1,example:"{{upcase 'aBcDef'}} -> ABCDEF",description:'<p>Uppercase all of the characters in the given string. Alias for <a href="#uppercase">uppercase</a>.</p>\n'},uppercase:{args:["str","options"],numArgs:2,example:"{{uppercase 'aBcDef'}} -> ABCDEF",description:"<p>Uppercase all of the characters in the given string. If used as a block helper it will uppercase the entire block. This helper does not support inverse blocks.</p>\n"}},comparison:{and:{args:["a","b","options"],numArgs:3,example:"{{#and great magnificent}}both{{else}}no{{/and}}",description:"<p>Helper that renders the block if <strong>both</strong> of the given values are truthy. If an inverse block is specified it will be rendered when falsy. Works as a block helper, inline helper or subexpression.</p>\n"},compare:{args:["a","operator","b","options"],numArgs:4,example:"{{compare 10 '<' 5 }} -> true",description:"<p>Render a block when a comparison of the first and third arguments returns true. The second argument is the [arithemetic operator][operators] to use. You may also optionally specify an inverse block to render when falsy.</p>\n"},contains:{args:["collection","value","[startIndex=0]","options"],numArgs:4,example:"{{#contains ['a', 'b', 'c'] 'd'}} This will not be rendered. {{else}} This will be rendered. {{/contains}}",description:"<p>Block helper that renders the block if <code>collection</code> has the given <code>value</code>, using strict equality (<code>===</code>) for comparison, otherwise the inverse block is rendered (if specified). If a <code>startIndex</code> is specified and is negative, it is used as the offset from the end of the collection.</p>\n"},default:{args:["value","defaultValue"],numArgs:2,example:"{{default null null 'default'}} -> default",description:"<p>Returns the first value that is not undefined, otherwise the &#39;default&#39; value is returned.</p>\n"},eq:{args:["a","b","options"],numArgs:3,example:"{{#eq 3 3}} equal{{else}} not equal{{/eq}} -> equal",description:"<p>Block helper that renders a block if <code>a</code> is <strong>equal to</strong> <code>b</code>. If an inverse block is specified it will be rendered when falsy. You may optionally use the <code>compare=&#39;&#39;</code> hash argument for the second value.</p>\n"},gt:{args:["a","b","options"],numArgs:3,example:"{{#gt 4 3}} greater than{{else}} not greater than{{/gt}} -> greater than",description:"<p>Block helper that renders a block if <code>a</code> is <strong>greater than</strong> <code>b</code>. If an inverse block is specified it will be rendered when falsy. You may optionally use the <code>compare=&#39;&#39;</code> hash argument for the second value.</p>\n"},gte:{args:["a","b","options"],numArgs:3,example:"{{#gte 4 3}} greater than or equal{{else}} not greater than{{/gte}} -> greater than or equal",description:"<p>Block helper that renders a block if <code>a</code> is <strong>greater than or equal to</strong> <code>b</code>. If an inverse block is specified it will be rendered when falsy. You may optionally use the <code>compare=&#39;&#39;</code> hash argument for the second value.</p>\n"},has:{args:["val","pattern","options"],numArgs:3,example:"{{#has 'foobar' 'foo'}} has it{{else}} doesn't{{/has}} -> has it",description:"<p>Block helper that renders a block if <code>value</code> has <code>pattern</code>. If an inverse block is specified it will be rendered when falsy.</p>\n"},isFalsey:{args:["val","options"],numArgs:2,example:"{{isFalsey '' }} -> true",description:"<p>Returns true if the given <code>value</code> is falsey. Uses the [falsey][] library for comparisons. Please see that library for more information or to report bugs with this helper.</p>\n"},isTruthy:{args:["val","options"],numArgs:2,example:"{{isTruthy '12' }} -> true",description:"<p>Returns true if the given <code>value</code> is truthy. Uses the [falsey][] library for comparisons. Please see that library for more information or to report bugs with this helper.</p>\n"},ifEven:{args:["number","options"],numArgs:2,example:"{{#ifEven 2}} even {{else}} odd {{/ifEven}} -> even",description:"<p>Return true if the given value is an even number.</p>\n"},ifNth:{args:["a","b","options"],numArgs:3,example:"{{#ifNth 10 2}} remainder {{else}} no remainder {{/ifNth}} -> remainder",description:"<p>Conditionally renders a block if the remainder is zero when <code>a</code> operand is divided by <code>b</code>. If an inverse block is specified it will be rendered when the remainder is <strong>not zero</strong>.</p>\n"},ifOdd:{args:["value","options"],numArgs:2,example:"{{#ifOdd 3}} odd {{else}} even {{/ifOdd}} -> odd",description:"<p>Block helper that renders a block if <code>value</code> is <strong>an odd number</strong>. If an inverse block is specified it will be rendered when falsy.</p>\n"},is:{args:["a","b","options"],numArgs:3,example:"{{#is 3 3}} is {{else}} is not {{/is}} -> is",description:'<p>Block helper that renders a block if <code>a</code> is <strong>equal to</strong> <code>b</code>. If an inverse block is specified it will be rendered when falsy. Similar to <a href="#eq">eq</a> but does not do strict equality.</p>\n'},isnt:{args:["a","b","options"],numArgs:3,example:"{{#isnt 3 3}} isnt {{else}} is {{/isnt}} -> is",description:'<p>Block helper that renders a block if <code>a</code> is <strong>not equal to</strong> <code>b</code>. If an inverse block is specified it will be rendered when falsy. Similar to <a href="#unlesseq">unlessEq</a> but does not use strict equality for comparisons.</p>\n'},lt:{args:["context","options"],numArgs:2,example:"{{#lt 2 3}} less than {{else}} more than or equal {{/lt}} -> less than",description:"<p>Block helper that renders a block if <code>a</code> is <strong>less than</strong> <code>b</code>. If an inverse block is specified it will be rendered when falsy. You may optionally use the <code>compare=&#39;&#39;</code> hash argument for the second value.</p>\n"},lte:{args:["a","b","options"],numArgs:3,example:"{{#lte 2 3}} less than or equal {{else}} more than {{/lte}} -> less than or equal",description:"<p>Block helper that renders a block if <code>a</code> is <strong>less than or equal to</strong> <code>b</code>. If an inverse block is specified it will be rendered when falsy. You may optionally use the <code>compare=&#39;&#39;</code> hash argument for the second value.</p>\n"},neither:{args:["a","b","options"],numArgs:3,example:"{{#neither null null}} both falsey {{else}} both not falsey {{/neither}} -> both falsey",description:"<p>Block helper that renders a block if <strong>neither of</strong> the given values are truthy. If an inverse block is specified it will be rendered when falsy.</p>\n"},not:{args:["val","options"],numArgs:2,example:"{{#not undefined }} falsey {{else}} not falsey {{/not}} -> falsey",description:"<p>Returns true if <code>val</code> is falsey. Works as a block or inline helper.</p>\n"},or:{args:["arguments","options"],numArgs:2,example:"{{#or 1 2 undefined }} at least one truthy {{else}} all falsey {{/or}} -> at least one truthy",description:"<p>Block helper that renders a block if <strong>any of</strong> the given values is truthy. If an inverse block is specified it will be rendered when falsy.</p>\n"},unlessEq:{args:["a","b","options"],numArgs:3,example:"{{#unlessEq 2 1 }} not equal {{else}} equal {{/unlessEq}} -> not equal",description:"<p>Block helper that always renders the inverse block <strong>unless <code>a</code> is equal to <code>b</code></strong>.</p>\n"},unlessGt:{args:["a","b","options"],numArgs:3,example:"{{#unlessGt 20 1 }} not greater than {{else}} greater than {{/unlessGt}} -> greater than",description:"<p>Block helper that always renders the inverse block <strong>unless <code>a</code> is greater than <code>b</code></strong>.</p>\n"},unlessLt:{args:["a","b","options"],numArgs:3,example:"{{#unlessLt 20 1 }} greater than or equal {{else}} less than {{/unlessLt}} -> greater than or equal",description:"<p>Block helper that always renders the inverse block <strong>unless <code>a</code> is less than <code>b</code></strong>.</p>\n"},unlessGteq:{args:["a","b","options"],numArgs:3,example:"{{#unlessGteq 20 1 }} less than {{else}} greater than or equal to {{/unlessGteq}} -> greater than or equal to",description:"<p>Block helper that always renders the inverse block <strong>unless <code>a</code> is greater than or equal to <code>b</code></strong>.</p>\n"},unlessLteq:{args:["a","b","options"],numArgs:3,example:"{{#unlessLteq 20 1 }} greater than {{else}} less than or equal to {{/unlessLteq}} -> greater than",description:"<p>Block helper that always renders the inverse block <strong>unless <code>a</code> is less than or equal to <code>b</code></strong>.</p>\n"}},object:{extend:{args:["objects"],numArgs:1,description:"<p>Extend the context with the properties of other objects. A shallow merge is performed to avoid mutating the context.</p>\n"},forIn:{args:["context","options"],numArgs:2,description:"<p>Block helper that iterates over the properties of an object, exposing each key and value on the context.</p>\n"},forOwn:{args:["obj","options"],numArgs:2,description:"<p>Block helper that iterates over the <strong>own</strong> properties of an object, exposing each key and value on the context.</p>\n"},toPath:{args:["prop"],numArgs:1,description:"<p>Take arguments and, if they are string or number, convert them to a dot-delineated object property path.</p>\n"},get:{args:["prop","context","options"],numArgs:3,description:"<p>Use property paths (<code>a.b.c</code>) to get a value or nested value from the context. Works as a regular helper or block helper.</p>\n"},getObject:{args:["prop","context"],numArgs:2,description:"<p>Use property paths (<code>a.b.c</code>) to get an object from the context. Differs from the <code>get</code> helper in that this helper will return the actual object, including the given property key. Also, this helper does not work as a block helper.</p>\n"},hasOwn:{args:["key","context"],numArgs:2,description:"<p>Return true if <code>key</code> is an own, enumerable property of the given <code>context</code> object.</p>\n"},isObject:{args:["value"],numArgs:1,description:"<p>Return true if <code>value</code> is an object.</p>\n"},JSONparse:{args:["string"],numArgs:1,description:"<p>Parses the given string using <code>JSON.parse</code>.</p>\n"},JSONstringify:{args:["obj"],numArgs:1,description:"<p>Stringify an object using <code>JSON.stringify</code>.</p>\n"},merge:{args:["object","objects"],numArgs:2,description:"<p>Deeply merge the properties of the given <code>objects</code> with the context object.</p>\n"},parseJSON:{args:["string"],numArgs:1,description:"<p>Parses the given string using <code>JSON.parse</code>.</p>\n"},pick:{args:["properties","context","options"],numArgs:3,description:"<p>Pick properties from the context object.</p>\n"},stringify:{args:["obj"],numArgs:1,description:"<p>Stringify an object using <code>JSON.stringify</code>.</p>\n"}},date:{date:{args:["datetime","format"],numArgs:2,example:'{{date now "DD-MM-YYYY" "America/New_York" }} -> 21-01-2021',description:"<p>Format a date using moment.js date formatting - the timezone is optional and uses the tz database.</p>\n"},duration:{args:["time","durationType"],numArgs:2,example:'{{duration timeLeft "seconds"}} -> a few seconds',description:"<p>Produce a humanized duration left/until given an amount of time and the type of time measurement.</p>\n"}}},jw=Zc((function(e,t){const{registerAll:r,registerMinimum:n}=zw,{atob:i,btoa:o}=cw,{FIND_HBS_REGEX:a,FIND_ANY_HBS_REGEX:s,findDoubleHbsInstances:c}=cw,l=op.create();r(l);const u=op.create();n(u);const p={noHelpers:!1,cacheTemplates:!1,noEscaping:!1,escapeNewlines:!1,noFinalise:!1};function d(e){try{JSON.stringify(e)}catch(e){throw"Unable to process inputs to JSON, cannot recurse"}}let m={};function f(e,r){r={...p,...r};const n=`${e}-${JSON.stringify(r)}`;if(r.cacheTemplates&&m[n])return m[n];e=((e,t)=>{let r=Ew.processors;return t.noFinalise&&(r=r.filter((e=>e.name!==Ew.PreprocessorNames.FINALISE))),Bw(e,r,t)})(e,r),r.noEscaping&&(e=t.disableEscaping(e));const i=(r.noHelpers?u:l).compile(e,{strict:!1});return m[n]=i,i}e.exports.processObject=async(t,r,n)=>{d(t);for(let i of Object.keys(t||{}))if(null!=t[i]){let o=t[i];"string"==typeof o?t[i]=await e.exports.processString(t[i],r,n):"object"==typeof o&&(t[i]=await e.exports.processObject(t[i],r,n))}return t},e.exports.processString=async(t,r,n)=>e.exports.processStringSync(t,r,n),e.exports.processObjectSync=(t,r,n)=>{d(t);for(let i of Object.keys(t||{})){let o=t[i];"string"==typeof o?t[i]=e.exports.processStringSync(t[i],r,n):"object"==typeof o&&(t[i]=e.exports.processObjectSync(t[i],r,n))}return t},e.exports.processStringSync=(e,t,r)=>{const n=e;if("string"!=typeof e)throw"Cannot process non-string types.";try{const n=f(e,r),i=1e3*Math.floor(Date.now()/1e3);return(e=>Bw(e,Iw.processors))(n({now:new Date(i).toISOString(),__opts:r,...t}))}catch(e){return n}},e.exports.disableEscaping=e=>{const t=c(e);if(null==t)return e;const r=[...new Set(t)];for(let t of r){const r=new RegExp(`${t}(?!})`,"g");e=e.replace(r,`{${t}}`)}return e},e.exports.makePropSafe=e=>`[${e}]`.replace("[[","[").replace("]]","]"),e.exports.isValid=(e,t)=>{const r=["string","number","object","array","cannot read property","undefined","json at position 0"],n=["expecting '"],i={};try{return f(e,{...t,noFinalise:!0})(i),!0}catch(e){const t=e&&e.message?e.message:e;if(!t)return!1;const i=n.some((e=>t.toLowerCase().includes(e)));return r.some((e=>t.toLowerCase().includes(e)))&&!i}},e.exports.getManifest=()=>Pw,e.exports.isJSBinding=t=>null!=e.exports.decodeJSBinding(t),e.exports.encodeJSBinding=e=>`{{ js "${o(e)}" }}`,e.exports.decodeJSBinding=e=>{if(!e||"string"!=typeof e)return null;if(!e.trim().startsWith("{{ js "))return null;const t=new RegExp(/{{ js "(.*)" }}/),r=e.match(t);return!r||r.length<2?null:i(r[1])},e.exports.doesContainStrings=(e,r)=>{let n=new RegExp(a),i=e.match(n);if(null==i)return!1;for(let e of i){let n=e;t.isJSBinding(e)&&(n=t.decodeJSBinding(e));let i=!0;for(let e of r)n.includes(e)||(i=!1);if(i)return!0}return!1},e.exports.findHBSBlocks=e=>{let t=new RegExp(s),r=e.match(t);return null==r?[]:r},e.exports.doesContainString=(e,r)=>t.doesContainStrings(e,[r])}));jw.isValid,jw.makePropSafe,jw.getManifest,jw.isJSBinding,jw.encodeJSBinding,jw.decodeJSBinding;const Fw=jw.processStringSync;jw.processObjectSync,jw.processString,jw.processObject,jw.doesContainStrings,jw.doesContainString,jw.disableEscaping,jw.findHBSBlocks,kw(((e,t)=>(t={...t,alert:void 0,setInterval:void 0,setTimeout:void 0},Vc.createContext(t),Vc.runInNewContext(e,t,{timeout:1e3}))));function Rw(e){let t,r,n;var i=e[3];function o(e){return{props:{row:e[0],schema:e[1],value:e[4],$$slots:{default:[Nw]},$$scope:{ctx:e}}}}return i&&(r=new i(o(e)),r.$on("clickrelationship",e[9])),{c(){t=_("div"),r&&Pe(r.$$.fragment),U(t,"--max-cell-width",e[1].width?"none":"200px"),j(t,"class","svelte-16j2cvj")},m(e,i){D(e,t,i),r&&je(r,t,null),n=!0},p(e,a){const s={};if(1&a&&(s.row=e[0]),2&a&&(s.schema=e[1]),16&a&&(s.value=e[4]),1024&a&&(s.$$scope={dirty:a,ctx:e}),i!==(i=e[3])){if(r){Ae();const e=r;$e(e.$$.fragment,1,0,(()=>{Fe(e,1)})),De()}i?(r=new i(o(e)),r.$on("clickrelationship",e[9]),Pe(r.$$.fragment),Te(r.$$.fragment,1),je(r,t,null)):r=null}else i&&r.$set(s);(!n||2&a)&&U(t,"--max-cell-width",e[1].width?"none":"200px")},i(e){n||(r&&Te(r.$$.fragment,e),n=!0)},o(e){r&&$e(r.$$.fragment,e),n=!1},d(e){e&&T(t),r&&Fe(r)}}}function Nw(e){let t;const r=e[8].default,n=p(r,e,e[10],null);return{c(){n&&n.c()},m(e,r){n&&n.m(e,r),t=!0},p(e,i){n&&n.p&&(!t||1024&i)&&m(n,r,e,e[10],i,null,null)},i(e){t||(Te(n,e),t=!0)},o(e){$e(n,e),t=!1},d(e){n&&n.d(e)}}}function qw(e){let t,r,n=e[3]&&(e[2]||null!=e[4]&&""!==e[4])&&Rw(e);return{c(){n&&n.c(),t=I()},m(e,i){n&&n.m(e,i),D(e,t,i),r=!0},p(e,[r]){e[3]&&(e[2]||null!=e[4]&&""!==e[4])?n?(n.p(e,r),28&r&&Te(n,1)):(n=Rw(e),n.c(),Te(n,1),n.m(t.parentNode,t)):n&&(Ae(),$e(n,1,1,(()=>{n=null})),De())},i(e){r||(Te(n),r=!0)},o(e){$e(n),r=!1},d(e){n&&n.d(e),e&&T(t)}}}function Hw(e,t,r){let n,i,o,a,{$$slots:s={},$$scope:c}=t,{row:l}=t,{schema:u}=t,{value:p}=t,{customRenderers:d=[]}=t;const m={boolean:ec,datetime:ac,link:mc,attachment:zc,string:Js,options:Js,number:Js,longform:Js,array:Ic,internal:Pc};return e.$$set=e=>{"row"in e&&r(0,l=e.row),"schema"in e&&r(1,u=e.schema),"value"in e&&r(5,p=e.value),"customRenderers"in e&&r(6,d=e.customRenderers),"$$scope"in e&&r(10,c=e.$$scope)},e.$$.update=()=>{2&e.$$.dirty&&r(7,n=u?.type??"string"),66&e.$$.dirty&&r(2,i=d?.find((e=>e.column===u?.name))),132&e.$$.dirty&&r(3,a=i?.component??m[n]??Js),2&e.$$.dirty&&u?.width,34&e.$$.dirty&&r(4,o=((e,t)=>t?Fw(t,{value:e}):e)(p,u.template))},[l,u,i,a,o,p,d,n,s,function(t){se(e,t)},c]}t("div.svelte-16j2cvj{display:contents}");class Uw extends Ne{constructor(e){super(),Re(this,e,Hw,qw,l,{row:0,schema:1,value:5,customRenderers:6})}}function Gw(e){let t,r;return t=new po({props:{value:e[0]}}),{c(){Pe(t.$$.fragment)},m(e,n){je(t,e,n),r=!0},p(e,r){const n={};1&r&&(n.value=e[0]),t.$set(n)},i(e){r||(Te(t.$$.fragment,e),r=!0)},o(e){$e(t.$$.fragment,e),r=!1},d(e){Fe(t,e)}}}function Ww(e){let t,r;return t=new mi({props:{size:"S",$$slots:{default:[Xw]},$$scope:{ctx:e}}}),t.$on("click",(function(){c(e[1])&&e[1].apply(this,arguments)})),{c(){Pe(t.$$.fragment)},m(e,n){je(t,e,n),r=!0},p(r,n){e=r;const i={};16&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){r||(Te(t.$$.fragment,e),r=!0)},o(e){$e(t.$$.fragment,e),r=!1},d(e){Fe(t,e)}}}function Xw(e){let t;return{c(){t=M("Edit")},m(e,r){D(e,t,r)},d(e){e&&T(t)}}}function Vw(e){let t,r,n,i=e[2]&&Gw(e),o=e[3]&&Ww(e);return{c(){t=_("div"),i&&i.c(),r=L(),o&&o.c(),j(t,"class","svelte-1fa8hd3")},m(e,a){D(e,t,a),i&&i.m(t,null),A(t,r),o&&o.m(t,null),n=!0},p(e,[n]){e[2]?i?(i.p(e,n),4&n&&Te(i,1)):(i=Gw(e),i.c(),Te(i,1),i.m(t,r)):i&&(Ae(),$e(i,1,1,(()=>{i=null})),De()),e[3]?o?(o.p(e,n),8&n&&Te(o,1)):(o=Ww(e),o.c(),Te(o,1),o.m(t,null)):o&&(Ae(),$e(o,1,1,(()=>{o=null})),De())},i(e){n||(Te(i),Te(o),n=!0)},o(e){$e(i),$e(o),n=!1},d(e){e&&T(t),i&&i.d(),o&&o.d()}}}function Yw(e,t,r){let{selected:n}=t,{onEdit:i}=t,{allowSelectRows:o=!1}=t,{allowEditRows:a=!1}=t;return e.$$set=e=>{"selected"in e&&r(0,n=e.selected),"onEdit"in e&&r(1,i=e.onEdit),"allowSelectRows"in e&&r(2,o=e.allowSelectRows),"allowEditRows"in e&&r(3,a=e.allowEditRows)},[n,i,o,a]}t("div.svelte-1fa8hd3{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;gap:var(--spacing-m)}");class Kw extends Ne{constructor(e){super(),Re(this,e,Yw,Vw,l,{selected:0,onEdit:1,allowSelectRows:2,allowEditRows:3})}}t('.wrapper.svelte-6mqswq.svelte-6mqswq{position:relative;z-index:0;--table-bg:var(--spectrum-global-color-gray-50);--table-border:1px solid var(--spectrum-alias-border-color-mid);--cell-padding:var(--spectrum-global-dimension-size-250)}.wrapper--quiet.svelte-6mqswq.svelte-6mqswq{--table-bg:var(--spectrum-alias-background-color-transparent)}.wrapper--compact.svelte-6mqswq.svelte-6mqswq{--cell-padding:var(--spectrum-global-dimension-size-150)}.loading.svelte-6mqswq.svelte-6mqswq{display:grid;place-items:center;min-height:100px}.spectrum-Table.svelte-6mqswq.svelte-6mqswq{width:100%;border-radius:0;display:grid;overflow:auto}.spectrum-Table-head.svelte-6mqswq.svelte-6mqswq{display:contents}.spectrum-Table-head.svelte-6mqswq>.svelte-6mqswq:first-child{border-left:1px solid transparent;padding-left:var(--cell-padding)}.spectrum-Table-head.svelte-6mqswq>.svelte-6mqswq:last-child{border-right:1px solid transparent;padding-right:var(--cell-padding)}.spectrum-Table-headCell.svelte-6mqswq.svelte-6mqswq{height:var(--header-height);position:sticky;top:0;text-overflow:ellipsis;white-space:nowrap;background-color:var(--spectrum-alias-background-color-secondary);z-index:2;border-bottom:var(--table-border);padding:0 calc(var(--cell-padding) / 1.33);display:flex;flex-direction:row;justify-content:flex-start;align-items:center;user-select:none;border-top:var(--table-border)}.spectrum-Table-headCell.svelte-6mqswq.svelte-6mqswq:first-of-type{border-left:var(--table-border)}.spectrum-Table-headCell.svelte-6mqswq.svelte-6mqswq:last-of-type{border-right:var(--table-border)}.spectrum-Table-headCell--alignCenter.svelte-6mqswq.svelte-6mqswq{justify-content:center}.spectrum-Table-headCell--alignRight.svelte-6mqswq.svelte-6mqswq{justify-content:flex-end}.spectrum-Table-headCell--divider.svelte-6mqswq.svelte-6mqswq{padding-right:var(--cell-padding)}.spectrum-Table-headCell--divider.svelte-6mqswq+.spectrum-Table-headCell.svelte-6mqswq{padding-left:var(--cell-padding)}.spectrum-Table-headCell--edit.svelte-6mqswq.svelte-6mqswq{position:sticky;left:0;z-index:3}.spectrum-Table-headCell.svelte-6mqswq .title.svelte-6mqswq{overflow:hidden;text-overflow:ellipsis}.spectrum-Table-headCell.svelte-6mqswq:hover .spectrum-Table-editIcon.svelte-6mqswq{opacity:1;transition:opacity 0.2s ease}.spectrum-Table-headCell.svelte-6mqswq .spectrum-Icon.svelte-6mqswq{pointer-events:all;margin-left:var(\n --spectrum-table-header-sort-icon-gap,\n var(--spectrum-global-dimension-size-125)\n )}.spectrum-Table-editIcon.svelte-6mqswq.svelte-6mqswq,.spectrum-Table-autoIcon.svelte-6mqswq.svelte-6mqswq{width:var(--spectrum-global-dimension-size-150);height:var(--spectrum-global-dimension-size-150)}.spectrum-Table-editIcon.svelte-6mqswq.svelte-6mqswq{opacity:0}.spectrum-Table-row.svelte-6mqswq.svelte-6mqswq{display:contents}.spectrum-Table-row.svelte-6mqswq:hover .spectrum-Table-cell.svelte-6mqswq:after{background-color:var(--spectrum-alias-highlight-hover)}.wrapper--quiet.svelte-6mqswq .spectrum-Table-row.svelte-6mqswq{border-left:none;border-right:none}.spectrum-Table-row.svelte-6mqswq>.svelte-6mqswq:first-child{border-left:var(--table-border);padding-left:var(--cell-padding)}.spectrum-Table-row.svelte-6mqswq>.svelte-6mqswq:last-child{border-right:var(--table-border);padding-right:var(--cell-padding)}.spectrum-Table-cell.svelte-6mqswq.svelte-6mqswq{flex:1 1 auto;padding:0 calc(var(--cell-padding) / 1.33);border-top:none;border-bottom:none;border-radius:0;text-overflow:ellipsis;white-space:nowrap;height:var(--row-height);display:flex;flex-direction:row;justify-content:flex-start;align-items:center;gap:4px;border-bottom:1px solid var(--spectrum-alias-border-color-mid);background-color:var(--table-bg);z-index:1}.spectrum-Table-cell--divider.svelte-6mqswq.svelte-6mqswq{padding-right:var(--cell-padding)}.spectrum-Table-cell--divider.svelte-6mqswq+.spectrum-Table-cell.svelte-6mqswq{padding-left:var(--cell-padding)}.spectrum-Table-cell--edit.svelte-6mqswq.svelte-6mqswq{position:sticky;left:0;z-index:2}.spectrum-Table-cell.svelte-6mqswq.svelte-6mqswq:after{content:"";position:absolute;width:100%;height:100%;background-color:transparent;top:0;left:0;pointer-events:none;transition:background-color\n var(--spectrum-global-animation-duration-100, 0.13s) ease-in-out}.placeholder.svelte-6mqswq.svelte-6mqswq{display:flex;flex-direction:row;justify-content:center;align-items:center;border:var(--table-border);border-top:none;grid-column:1 / -1;background-color:var(--table-bg);padding:40px}.placeholder--no-fields.svelte-6mqswq.svelte-6mqswq{border-top:var(--table-border)}.placeholder--custom.svelte-6mqswq.svelte-6mqswq{justify-content:flex-start}.wrapper--quiet.svelte-6mqswq .placeholder.svelte-6mqswq{border-left:none;border-right:none}.placeholder-content.svelte-6mqswq.svelte-6mqswq{display:flex;flex-direction:column;justify-content:center;align-items:center;color:var(\n --spectrum-table-cell-text-color,\n var(--spectrum-alias-text-color)\n )}.placeholder-content.svelte-6mqswq div.svelte-6mqswq{margin-top:10px;font-size:var(\n --spectrum-table-cell-text-size,\n var(--spectrum-alias-font-size-default)\n );text-align:center}');const Jw=e=>({}),Zw=e=>({});function Qw(e,t,r){const n=e.slice();return n[56]=t[r],n[58]=r,n}function ek(e,t,r){const n=e.slice();return n[59]=t[r],n}function tk(e,t,r){const n=e.slice();return n[59]=t[r],n}function rk(e){let t,r,n,i,o,a,s=e[14].length&&ik(e);const c=[mk,dk],l=[];function u(e,t){return e[18]?.length?0:1}return n=u(e),i=l[n]=c[n](e),{c(){t=_("div"),s&&s.c(),r=L(),i.c(),j(t,"class","spectrum-Table svelte-6mqswq"),j(t,"style",o=`${e[17]}${e[19]}`)},m(e,i){D(e,t,i),s&&s.m(t,null),A(t,r),l[n].m(t,null),a=!0},p(e,p){e[14].length?s?(s.p(e,p),16384&p[0]&&Te(s,1)):(s=ik(e),s.c(),Te(s,1),s.m(t,r)):s&&(Ae(),$e(s,1,1,(()=>{s=null})),De());let d=n;n=u(e),n===d?l[n].p(e,p):(Ae(),$e(l[d],1,1,(()=>{l[d]=null})),De(),i=l[n],i?i.p(e,p):(i=l[n]=c[n](e),i.c()),Te(i,1),i.m(t,null)),(!a||655360&p[0]&&o!==(o=`${e[17]}${e[19]}`))&&j(t,"style",o)},i(e){a||(Te(s),Te(i),a=!0)},o(e){$e(s),$e(i),a=!1},d(e){e&&T(t),s&&s.d(),l[n].d()}}}function nk(e){let t,r,n;return r=new $o({}),{c(){t=_("div"),Pe(r.$$.fragment),j(t,"class","loading svelte-6mqswq"),j(t,"style",e[17])},m(e,i){D(e,t,i),je(r,t,null),n=!0},p(e,r){(!n||131072&r[0])&&j(t,"style",e[17])},i(e){n||(Te(r.$$.fragment,e),n=!0)},o(e){$e(r.$$.fragment,e),n=!1},d(e){e&&T(t),Fe(r)}}}function ik(e){let t,r,n,i=e[15]&&ok(e),o=e[14],a=[];for(let t=0;t<o.length;t+=1)a[t]=pk(tk(e,o,t));return{c(){t=_("div"),i&&i.c(),r=L();for(let e=0;e<a.length;e+=1)a[e].c();j(t,"class","spectrum-Table-head svelte-6mqswq")},m(e,o){D(e,t,o),i&&i.m(t,null),A(t,r);for(let e=0;e<a.length;e+=1)a[e].m(t,null);n=!0},p(e,n){if(e[15]?i?(i.p(e,n),32768&n[0]&&Te(i,1)):(i=ok(e),i.c(),Te(i,1),i.m(t,r)):i&&(Ae(),$e(i,1,1,(()=>{i=null})),De()),29378081&n[0]){let r;for(o=e[14],r=0;r<o.length;r+=1){const i=tk(e,o,r);a[r]?a[r].p(i,n):(a[r]=pk(i),a[r].c(),a[r].m(t,null))}for(;r<a.length;r+=1)a[r].d(1);a.length=o.length}},i(e){n||(Te(i),n=!0)},o(e){$e(i),n=!1},d(e){e&&T(t),i&&i.d(),$(a,e)}}}function ok(e){let t,r,n,i;const o=[sk,ak],a=[];function s(e,t){return e[3]?0:1}return r=s(e),n=a[r]=o[r](e),{c(){t=_("div"),n.c(),j(t,"class","spectrum-Table-headCell spectrum-Table-headCell--divider spectrum-Table-headCell--edit svelte-6mqswq")},m(e,n){D(e,t,n),a[r].m(t,null),i=!0},p(e,i){let c=r;r=s(e),r===c?a[r].p(e,i):(Ae(),$e(a[c],1,1,(()=>{a[c]=null})),De(),n=a[r],n?n.p(e,i):(n=a[r]=o[r](e),n.c()),Te(n,1),n.m(t,null))},i(e){i||(Te(n),i=!0)},o(e){$e(n),i=!1},d(e){e&&T(t),a[r].d()}}}function ak(e){let t;return{c(){t=M("Edit")},m(e,r){D(e,t,r)},p:r,i:r,o:r,d(e){e&&T(t)}}}function sk(e){let t,r,n;function i(t){e[38](t)}let o={};return void 0!==e[16]&&(o.value=e[16]),t=new po({props:o}),le.push((()=>Be(t,"value",i))),t.$on("change",e[27]),{c(){Pe(t.$$.fragment)},m(e,r){je(t,e,r),n=!0},p(e,n){const i={};!r&&65536&n[0]&&(r=!0,i.value=e[16],ge((()=>r=!1))),t.$set(i)},i(e){n||(Te(t.$$.fragment,e),n=!0)},o(e){$e(t.$$.fragment,e),n=!1},d(e){Fe(t,e)}}}function ck(e){let t,r;return{c(){t=E("svg"),r=E("use"),R(r,"xlink:href","#spectrum-icon-18-MagicWand"),j(t,"class","spectrum-Icon spectrum-Table-autoIcon svelte-6mqswq"),j(t,"focusable","false")},m(e,n){D(e,t,n),A(t,r)},d(e){e&&T(t)}}}function lk(e){let t,r;return{c(){t=E("svg"),r=E("use"),R(r,"xlink:href","#spectrum-css-icon-Arrow100"),j(t,"class","spectrum-Icon spectrum-UIIcon-ArrowDown100 spectrum-Table-sortedIcon svelte-6mqswq"),j(t,"focusable","false"),j(t,"aria-hidden","true")},m(e,n){D(e,t,n),A(t,r)},d(e){e&&T(t)}}}function uk(e){let t,r,n,i;function o(...t){return e[39](e[59],...t)}return{c(){t=E("svg"),r=E("use"),R(r,"xlink:href","#spectrum-icon-18-Edit"),j(t,"class","spectrum-Icon spectrum-Table-editIcon svelte-6mqswq"),j(t,"focusable","false")},m(e,a){D(e,t,a),A(t,r),n||(i=O(t,"click",o),n=!0)},p(t,r){e=t},d(e){e&&T(t),n=!1,i()}}}function pk(e){let t,r,n,i,o,a,s,c,l,u=e[23](e[0][e[59]])+"",p=e[0][e[59]]?.autocolumn&&ck(),d=e[9]===e[59]&&lk(),m=e[5]&&!1!==e[0][e[59]]?.editable&&uk(e);function f(){return e[40](e[59])}return{c(){t=_("div"),r=_("div"),n=M(u),i=L(),p&&p.c(),o=L(),d&&d.c(),a=L(),m&&m.c(),s=L(),j(r,"class","title svelte-6mqswq"),j(t,"class","spectrum-Table-headCell svelte-6mqswq"),X(t,"spectrum-Table-headCell--alignCenter","Center"===e[0][e[59]].align),X(t,"spectrum-Table-headCell--alignRight","Right"===e[0][e[59]].align),X(t,"is-sortable",!1!==e[0][e[59]].sortable),X(t,"is-sorted-desc",e[9]===e[59]&&"Descending"===e[10]),X(t,"is-sorted-asc",e[9]===e[59]&&"Ascending"===e[10])},m(e,u){D(e,t,u),A(t,r),A(r,n),A(t,i),p&&p.m(t,null),A(t,o),d&&d.m(t,null),A(t,a),m&&m.m(t,null),A(t,s),c||(l=O(t,"click",f),c=!0)},p(r,i){e=r,16385&i[0]&&u!==(u=e[23](e[0][e[59]])+"")&&q(n,u),e[0][e[59]]?.autocolumn?p||(p=ck(),p.c(),p.m(t,o)):p&&(p.d(1),p=null),e[9]===e[59]?d||(d=lk(),d.c(),d.m(t,a)):d&&(d.d(1),d=null),e[5]&&!1!==e[0][e[59]]?.editable?m?m.p(e,i):(m=uk(e),m.c(),m.m(t,s)):m&&(m.d(1),m=null),16385&i[0]&&X(t,"spectrum-Table-headCell--alignCenter","Center"===e[0][e[59]].align),16385&i[0]&&X(t,"spectrum-Table-headCell--alignRight","Right"===e[0][e[59]].align),16385&i[0]&&X(t,"is-sortable",!1!==e[0][e[59]].sortable),17920&i[0]&&X(t,"is-sorted-desc",e[9]===e[59]&&"Descending"===e[10]),17920&i[0]&&X(t,"is-sorted-asc",e[9]===e[59]&&"Ascending"===e[10])},d(e){e&&T(t),p&&p.d(),d&&d.d(),m&&m.d(),c=!1,l()}}}function dk(e){let t,r,n,i;const o=[hk,fk],a=[];function s(e,t){return e[8]?0:1}return r=s(e),n=a[r]=o[r](e),{c(){t=_("div"),n.c(),j(t,"class","placeholder svelte-6mqswq"),X(t,"placeholder--custom",e[8]),X(t,"placeholder--no-fields",!e[14]?.length)},m(e,n){D(e,t,n),a[r].m(t,null),i=!0},p(e,i){let c=r;r=s(e),r===c?a[r].p(e,i):(Ae(),$e(a[c],1,1,(()=>{a[c]=null})),De(),n=a[r],n?n.p(e,i):(n=a[r]=o[r](e),n.c()),Te(n,1),n.m(t,null)),256&i[0]&&X(t,"placeholder--custom",e[8]),16384&i[0]&&X(t,"placeholder--no-fields",!e[14]?.length)},i(e){i||(Te(n),i=!0)},o(e){$e(n),i=!1},d(e){e&&T(t),a[r].d()}}}function mk(e){let t,r,n=e[18],i=[];for(let t=0;t<n.length;t+=1)i[t]=yk(Qw(e,n,t));const o=e=>$e(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=I()},m(e,n){for(let t=0;t<i.length;t+=1)i[t].m(e,n);D(e,t,n),r=!0},p(e,r){if(104120411&r[0]|131072&r[1]){let a;for(n=e[18],a=0;a<n.length;a+=1){const o=Qw(e,n,a);i[a]?(i[a].p(o,r),Te(i[a],1)):(i[a]=yk(o),i[a].c(),Te(i[a],1),i[a].m(t.parentNode,t))}for(Ae(),a=n.length;a<i.length;a+=1)o(a);De()}},i(e){if(!r){for(let e=0;e<n.length;e+=1)Te(i[e]);r=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)$e(i[e]);r=!1},d(e){$(i,e),e&&T(t)}}}function fk(e){let t;return{c(){t=_("div"),t.innerHTML='<svg class="spectrum-Icon spectrum-Icon--sizeXXL" focusable="false"><use xlink:href="#spectrum-icon-18-Table"></use></svg> \n <div class="svelte-6mqswq">No rows found</div>',j(t,"class","placeholder-content svelte-6mqswq")},m(e,r){D(e,t,r)},p:r,i:r,o:r,d(e){e&&T(t)}}}function hk(e){let t;const r=e[37].placeholder,n=p(r,e,e[48],Zw);return{c(){n&&n.c()},m(e,r){n&&n.m(e,r),t=!0},p(e,i){n&&n.p&&(!t||131072&i[1])&&m(n,r,e,e[48],i,Jw,Zw)},i(e){t||(Te(n,e),t=!0)},o(e){$e(n,e),t=!1},d(e){n&&n.d(e)}}}function gk(e){let t,r,n,i,o;function a(...t){return e[41](e[56],...t)}function s(...t){return e[42](e[56],...t)}function c(...t){return e[43](e[56],...t)}return r=new Kw({props:{data:e[56],selected:-1!==e[1].findIndex(a),onEdit:s,allowSelectRows:e[3],allowEditRows:e[4]}}),{c(){t=_("div"),Pe(r.$$.fragment),j(t,"class","spectrum-Table-cell spectrum-Table-cell--divider spectrum-Table-cell--edit svelte-6mqswq")},m(e,a){D(e,t,a),je(r,t,null),n=!0,i||(o=O(t,"click",c),i=!0)},p(t,n){e=t;const i={};262144&n[0]&&(i.data=e[56]),262146&n[0]&&(i.selected=-1!==e[1].findIndex(a)),262144&n[0]&&(i.onEdit=s),8&n[0]&&(i.allowSelectRows=e[3]),16&n[0]&&(i.allowEditRows=e[4]),r.$set(i)},i(e){n||(Te(r.$$.fragment,e),n=!0)},o(e){$e(r.$$.fragment,e),n=!1},d(e){e&&T(t),Fe(r),i=!1,o()}}}function vk(e){let t;const r=e[37].default,n=p(r,e,e[48],null);return{c(){n&&n.c()},m(e,r){n&&n.m(e,r),t=!0},p(e,i){n&&n.p&&(!t||131072&i[1])&&m(n,r,e,e[48],i,null,null)},i(e){t||(Te(n,e),t=!0)},o(e){$e(n,e),t=!1},d(e){n&&n.d(e)}}}function bk(e){let t,r,n,i;return r=new Uw({props:{customRenderers:e[6],row:e[56],schema:e[0][e[59]],value:wr(e[56],e[59]),$$slots:{default:[vk]},$$scope:{ctx:e}}}),r.$on("clickrelationship",e[44]),{c(){t=_("div"),Pe(r.$$.fragment),j(t,"class","spectrum-Table-cell svelte-6mqswq"),j(t,"style",n=e[20][e[59]]),X(t,"spectrum-Table-cell--divider",!!e[0][e[59]].divider)},m(e,n){D(e,t,n),je(r,t,null),i=!0},p(e,o){const a={};64&o[0]&&(a.customRenderers=e[6]),262144&o[0]&&(a.row=e[56]),16385&o[0]&&(a.schema=e[0][e[59]]),278528&o[0]&&(a.value=wr(e[56],e[59])),131072&o[1]&&(a.$$scope={dirty:o,ctx:e}),r.$set(a),(!i||1064960&o[0]&&n!==(n=e[20][e[59]]))&&j(t,"style",n),16385&o[0]&&X(t,"spectrum-Table-cell--divider",!!e[0][e[59]].divider)},i(e){i||(Te(r.$$.fragment,e),i=!0)},o(e){$e(r.$$.fragment,e),i=!1},d(e){e&&T(t),Fe(r)}}}function yk(e){let t,r,n,i,o,a,c=e[15]&&gk(e),l=e[14],u=[];for(let t=0;t<l.length;t+=1)u[t]=bk(ek(e,l,t));const p=e=>$e(u[e],1,1,(()=>{u[e]=null}));function d(){return e[45](e[56])}function m(){return e[46](e[56])}return{c(){t=_("div"),c&&c.c(),r=L();for(let e=0;e<u.length;e+=1)u[e].c();n=L(),j(t,"class","spectrum-Table-row svelte-6mqswq")},m(e,s){D(e,t,s),c&&c.m(t,null),A(t,r);for(let e=0;e<u.length;e+=1)u[e].m(t,null);A(t,n),i=!0,o||(a=[O(t,"click",d),O(t,"click",m)],o=!0)},p(i,o){if((e=i)[15]?c?(c.p(e,o),32768&o[0]&&Te(c,1)):(c=gk(e),c.c(),Te(c,1),c.m(t,r)):c&&(Ae(),$e(c,1,1,(()=>{c=null})),De()),1327169&o[0]|131072&o[1]){let r;for(l=e[14],r=0;r<l.length;r+=1){const i=ek(e,l,r);u[r]?(u[r].p(i,o),Te(u[r],1)):(u[r]=bk(i),u[r].c(),Te(u[r],1),u[r].m(t,n))}for(Ae(),r=l.length;r<u.length;r+=1)p(r);De()}},i(e){if(!i){Te(c);for(let e=0;e<l.length;e+=1)Te(u[e]);i=!0}},o(e){$e(c),u=u.filter(Boolean);for(let e=0;e<u.length;e+=1)$e(u[e]);i=!1},d(e){e&&T(t),c&&c.d(),$(u,e),o=!1,s(a)}}}function xk(e){let t,r,n,i,o,a;const s=[nk,rk],c=[];function l(e,t){return e[12]?1:0}return r=l(e),n=c[r]=s[r](e),{c(){t=_("div"),n.c(),j(t,"class","wrapper svelte-6mqswq"),j(t,"style",i=`--row-height: ${e[13]}px; --header-height: ${wk}px;`),he((()=>e[47].call(t))),X(t,"wrapper--quiet",e[2]),X(t,"wrapper--compact",e[7])},m(n,i){D(n,t,i),c[r].m(t,null),o=function(e,t){"static"===getComputedStyle(e).position&&(e.style.position="relative");const r=_("iframe");r.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),r.setAttribute("aria-hidden","true"),r.tabIndex=-1;const n=W();let i;return n?(r.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",i=O(window,"message",(e=>{e.source===r.contentWindow&&t()}))):(r.src="about:blank",r.onload=()=>{i=O(r.contentWindow,"resize",t)}),A(e,r),()=>{(n||i&&r.contentWindow)&&i(),T(r)}}(t,e[47].bind(t)),a=!0},p(e,o){let u=r;r=l(e),r===u?c[r].p(e,o):(Ae(),$e(c[u],1,1,(()=>{c[u]=null})),De(),n=c[r],n?n.p(e,o):(n=c[r]=s[r](e),n.c()),Te(n,1),n.m(t,null)),(!a||8192&o[0]&&i!==(i=`--row-height: ${e[13]}px; --header-height: ${wk}px;`))&&j(t,"style",i),4&o[0]&&X(t,"wrapper--quiet",e[2]),128&o[0]&&X(t,"wrapper--compact",e[7])},i(e){a||(Te(n),a=!0)},o(e){$e(n),a=!1},d(e){e&&T(t),c[r].d(),o()}}}const wk=36;function kk(e,t,r){let n,i,o,a,s,c,l,u,p,d,{$$slots:m={},$$scope:f}=t,{data:h=[]}=t,{schema:g={}}=t,{showAutoColumns:v=!1}=t,{rowCount:b=0}=t,{quiet:y=!1}=t,{loading:x=!1}=t,{allowSelectRows:w=!0}=t,{allowEditRows:k=!0}=t,{allowEditColumns:C=!0}=t,{selectedRows:z=[]}=t,{customRenderers:S=[]}=t,{disableSorting:A=!1}=t,{autoSortColumns:D=!0}=t,{compact:T=!1}=t,{customPlaceholder:$=!1}=t;const _=ie();let E,M,L=0,I=!1,O=!1;const B=e=>{!1!==e.sortable&&(e.name===E?r(10,M="Descending"===M?"Ascending":"Descending"):(r(9,E=e.name),r(10,M="Descending")),_("sort",{column:E,order:M}))},P=e=>{let t=e?.displayName;return e&&void 0===t&&(t=e.name),t||""},j=(e,t)=>{e.stopPropagation(),_("editcolumn",t)},F=(e,t)=>{e.stopPropagation(),_("editrow",kr(t))},R=e=>{w&&(z.some((t=>t._id===e._id))?r(1,z=z.filter((t=>t._id!==e._id))):r(1,z=[...z,e]))};return e.$$set=e=>{"data"in e&&r(28,h=e.data),"schema"in e&&r(0,g=e.schema),"showAutoColumns"in e&&r(29,v=e.showAutoColumns),"rowCount"in e&&r(30,b=e.rowCount),"quiet"in e&&r(2,y=e.quiet),"loading"in e&&r(31,x=e.loading),"allowSelectRows"in e&&r(3,w=e.allowSelectRows),"allowEditRows"in e&&r(4,k=e.allowEditRows),"allowEditColumns"in e&&r(5,C=e.allowEditColumns),"selectedRows"in e&&r(1,z=e.selectedRows),"customRenderers"in e&&r(6,S=e.customRenderers),"disableSorting"in e&&r(32,A=e.disableSorting),"autoSortColumns"in e&&r(33,D=e.autoSortColumns),"compact"in e&&r(7,T=e.compact),"customPlaceholder"in e&&r(8,$=e.customPlaceholder),"$$scope"in e&&r(48,f=e.$$scope)},e.$$.update=()=>{if(128&e.$$.dirty[0]&&r(13,n=T?46:55),1&e.$$.dirty[0]&&r(0,g=(e=>{let t={};return Object.entries(e||{}).forEach((([e,r])=>{t[e]="string"==typeof r?{type:r,name:e}:{...r,name:e}})),t})(g)),1&e.$$.dirty[1]&&(x||r(12,I=!0)),536870913&e.$$.dirty[0]|4&e.$$.dirty[1]&&r(14,i=((e,t,r)=>{let n=[],i=[];return Object.entries(e||{}).forEach((([e,o])=>{e&&o&&(r&&o?.autocolumn?t&&i.push(o):n.push(o))})),n.sort(((e,t)=>{const r=e.order||Number.MAX_SAFE_INTEGER,n=t.order||Number.MAX_SAFE_INTEGER,i=P(e),o=P(t);return r!==n?r<n?r:n:i<o?e:t})).concat(i).map((e=>e.name))})(g,v,D)),268451840&e.$$.dirty[0]&&r(34,o=i?.length&&h||[]),8&e.$$.dirty[1]&&r(35,a=o?.length||0),1073756160&e.$$.dirty[0]|8&e.$$.dirty[1]&&r(36,s=((e,t,r,n,i)=>e?n?Math.min(r,n):Math.min(r,Math.ceil(t/i)):n||0)(I,L,o.length,b,n)),1073750016&e.$$.dirty[0]|48&e.$$.dirty[1]&&r(17,c=((e,t,r,n)=>!t||!e||r<=t?"":`height: ${wk+e*n}px;`)(s,b,a,n)),1536&e.$$.dirty[0]|8&e.$$.dirty[1]&&r(18,l=((e,t,r)=>t&&r&&!A?e.slice().sort(((e,n)=>{const i=e[t],o=n[t];return"Descending"===r?i>o?-1:1:i>o?1:-1})):e)(o,E,M)),24&e.$$.dirty[0]&&r(15,p=k||w),49153&e.$$.dirty[0]&&r(19,u=((e,t,r)=>{let n="grid-template-columns:";return r&&(n+=" auto"),e?.forEach((e=>{const r=t[e];r.width?n+=` ${r.width}`:n+=" minmax(auto, 1fr)"})),n+=";",n})(i,g,p)),1&e.$$.dirty[0]&&r(20,d=(e=>{let t={};return Object.keys(e||{}).forEach((r=>{t[r]="",e[r].color&&(t[r]+=`color: ${e[r].color};`),e[r].background&&(t[r]+=`background-color: ${e[r].background};`),"Center"===e[r].align&&(t[r]+="justify-content: center; text-align: center;"),"Right"===e[r].align&&(t[r]+="justify-content: flex-end; text-align: right;")})),t})(g)),2&e.$$.dirty[0]|8&e.$$.dirty[1]){0===o.filter((e=>z.some((t=>e._id===t._id)))).length&&r(16,O=!1)}},[g,z,y,w,k,C,S,T,$,E,M,L,I,n,i,p,O,c,l,u,d,_,B,P,j,F,R,e=>{!!e.detail?o.forEach((e=>{-1===z.findIndex((t=>t._id===e._id))&&z.push(e)})):r(1,z=z.filter((e=>o.every((t=>t._id!==e._id)))))},h,v,b,x,A,D,o,a,s,m,function(e){O=e,r(16,O),r(34,o),r(1,z),r(14,i),r(28,h),r(0,g),r(29,v),r(33,D)},(e,t)=>j(t,e),e=>B(g[e]),(e,t)=>t._id===e._id,(e,t)=>F(t,e),(e,t)=>{R(e),t.stopPropagation()},function(t){se(e,t)},e=>_("click",e),e=>R(e),function(){L=this.offsetHeight,r(11,L)},f]}class Ck extends Ne{constructor(e){super(),Re(this,e,kk,xk,l,{data:28,schema:0,showAutoColumns:29,rowCount:30,quiet:2,loading:31,allowSelectRows:3,allowEditRows:4,allowEditColumns:5,selectedRows:1,customRenderers:6,disableSorting:32,autoSortColumns:33,compact:7,customPlaceholder:8},[-1,-1,-1])}}t('.spectrum-Tabs {\n --spectrum-tabs-focus-ring-border-radius: var(--spectrum-tabs-m-focus-ring-border-radius);\n --spectrum-tabs-compact-item-height: var(--spectrum-tabs-m-compact-item-height, var(--spectrum-alias-item-height-m));\n --spectrum-tabs-compact-vertical-item-height: var(--spectrum-tabs-m-compact-vertical-item-height, var(--spectrum-global-dimension-size-400));\n --spectrum-tabs-compact-vertical-item-gap: var(--spectrum-tabs-m-compact-vertical-item-gap, var(--spectrum-global-dimension-size-50));\n --spectrum-tabs-text-font-weight: var(--spectrum-tabs-m-text-font-weight, var(--spectrum-alias-body-text-font-weight));\n --spectrum-tabs-rule-border-radius: var(--spectrum-tabs-m-rule-border-radius, var(--spectrum-global-dimension-static-size-10));\n --spectrum-tabs-rule-size: var(--spectrum-tabs-m-rule-size, var(--spectrum-alias-border-size-thick));\n --spectrum-tabs-focus-ring-size: var(--spectrum-tabs-m-focus-ring-size, var(--spectrum-alias-border-size-thick));\n --spectrum-tabs-text-size: var(--spectrum-tabs-m-text-size, var(--spectrum-alias-item-text-size-m));\n --spectrum-tabs-height: var(--spectrum-tabs-m-height, var(--spectrum-global-dimension-size-600));\n --spectrum-tabs-item-height: var(--spectrum-tabs-m-item-height, var(--spectrum-alias-item-height-m));\n --spectrum-tabs-icon-gap: var(--spectrum-tabs-m-icon-gap, var(--spectrum-alias-item-workflow-icon-gap-m));\n --spectrum-tabs-focus-ring-height: var(--spectrum-tabs-m-focus-ring-height, var(--spectrum-alias-item-height-m));\n --spectrum-tabs-focus-ring-padding-x: var(--spectrum-tabs-m-focus-ring-padding-x, var(--spectrum-alias-item-padding-m));\n --spectrum-tabs-item-gap: var(--spectrum-tabs-m-item-gap, var(--spectrum-global-dimension-size-300));\n --spectrum-tabs-selection-indicator-animation-duration: var(--spectrum-tabs-m-selection-indicator-animation-duration, var(--spectrum-global-animation-duration-100));\n --spectrum-tabs-vertical-rule-size: var(--spectrum-tabs-m-vertical-rule-size, var(--spectrum-alias-border-size-thick));\n --spectrum-tabs-vertical-item-height: var(--spectrum-tabs-m-vertical-item-height, var(--spectrum-global-dimension-size-550));\n --spectrum-tabs-vertical-item-gap: var(--spectrum-tabs-m-vertical-item-gap, var(--spectrum-global-dimension-size-50));\n --spectrum-tabs-vertical-item-margin-left: var(--spectrum-tabs-m-vertical-item-margin-left, var(--spectrum-global-dimension-size-150));\n --spectrum-tabs-quiet-compact-height: var(--spectrum-tabs-quiet-m-compact-height, var(--spectrum-alias-item-height-m));\n}\n\n.spectrum-Tabs {\n --spectrum-tabs-item-height: calc(var(--spectrum-tabs-height) - var(--spectrum-tabs-rule-size));\n --spectrum-tabs-compact-item-height: calc(var(--spectrum-tabs-quiet-compact-height) - var(--spectrum-tabs-rule-size));\n --spectrum-tabs-text-size: var(--spectrum-alias-font-size-default, var(--spectrum-global-dimension-font-size-100));\n}\n\n.spectrum-Tabs {\n display: -ms-flexbox;\n display: flex;\n position: relative;\n z-index: 0;\n\n margin: 0;\n padding-top: 0;\n padding-bottom: 0;\n padding-left: var(--spectrum-tabs-focus-ring-padding-x);\n padding-right: var(--spectrum-tabs-focus-ring-padding-x);\n vertical-align: top;\n}\n\n.spectrum-Tabs-item {\n position: relative;\n\n box-sizing: border-box;\n\n height: var(--spectrum-tabs-item-height);\n line-height: var(--spectrum-tabs-item-height);\n z-index: 1;\n\n text-decoration: none;\n white-space: nowrap;\n\n transition: color var(--spectrum-global-animation-duration-100, 130ms) ease-out;\n cursor: pointer;\n outline: none;\n}\n\n.spectrum-Tabs-item.is-disabled {\n cursor: default;\n }\n\n.spectrum-Tabs-item.is-disabled .spectrum-Tabs-itemLabel {\n cursor: default;\n }\n\n.spectrum-Tabs-item .spectrum-Icon {\n height: var(--spectrum-tabs-item-height);\n }\n\n[dir="ltr"] .spectrum-Tabs-item .spectrum-Icon + .spectrum-Tabs-itemLabel {\n margin-left: calc(var(--spectrum-tabs-icon-gap) - var(--spectrum-global-dimension-size-40));\n}\n\n[dir="rtl"] .spectrum-Tabs-item .spectrum-Icon + .spectrum-Tabs-itemLabel {\n margin-right: calc(var(--spectrum-tabs-icon-gap) - var(--spectrum-global-dimension-size-40));\n}\n\n[dir="ltr"] .spectrum-Tabs-item::before {\n left: calc(-1 * var(--spectrum-tabs-focus-ring-padding-x));\n}\n\n[dir="rtl"] .spectrum-Tabs-item::before {\n right: calc(-1 * var(--spectrum-tabs-focus-ring-padding-x));\n}\n\n[dir="ltr"] .spectrum-Tabs-item::before {\n right: calc(-1 * var(--spectrum-tabs-focus-ring-padding-x));\n}\n\n[dir="rtl"] .spectrum-Tabs-item::before {\n left: calc(-1 * var(--spectrum-tabs-focus-ring-padding-x));\n}\n\n.spectrum-Tabs-item::before {\n content: \'\';\n position: absolute;\n top: 50%;\n\n box-sizing: border-box;\n\n height: var(--spectrum-tabs-focus-ring-height);\n margin-top: calc(var(--spectrum-tabs-focus-ring-height) / -2 + var(--spectrum-tabs-rule-size) / 2);\n border: var(--spectrum-tabs-focus-ring-size) solid transparent;\n border-radius: var(--spectrum-tabs-focus-ring-border-radius);\n\n pointer-events: none;\n }\n\n.spectrum-Tabs-itemLabel {\n cursor: pointer;\n vertical-align: top;\n display: inline-block;\n\n font-size: var(--spectrum-tabs-text-size);\n font-weight: var(--spectrum-tabs-text-font-weight);\n text-decoration: none;\n}\n\n.spectrum-Tabs-itemLabel:empty {\n display: none;\n }\n\n[dir="ltr"] .spectrum-Tabs-selectionIndicator {\n left: 0;\n}\n\n[dir="rtl"] .spectrum-Tabs-selectionIndicator {\n right: 0;\n}\n\n.spectrum-Tabs-selectionIndicator {\n position: absolute;\n z-index: 0;\n\n transition: transform var(--spectrum-tabs-selection-indicator-animation-duration) ease-in-out;\n transform-origin: top left;\n\n border-radius: var(--spectrum-tabs-rule-border-radius);\n}\n\n.spectrum-Tabs--compact .spectrum-Tabs-item {\n height: var(--spectrum-tabs-compact-item-height);\n line-height: var(--spectrum-tabs-compact-item-height);\n }\n\n.spectrum-Tabs--compact .spectrum-Tabs-item .spectrum-Icon {\n height: var(--spectrum-tabs-compact-item-height);\n }\n\n.spectrum-Tabs--horizontal {\n -ms-flex-align: center;\n align-items: center;\n\n border-bottom: var(--spectrum-tabs-rule-size) solid;\n}\n\n.spectrum-Tabs--horizontal .spectrum-Tabs-item {\n vertical-align: top;\n }\n\n[dir="ltr"] .spectrum-Tabs--horizontal .spectrum-Tabs-item + *:not(.spectrum-Tabs-selectionIndicator) {\n margin-left: var(--spectrum-tabs-item-gap);\n}\n\n[dir="rtl"] .spectrum-Tabs--horizontal .spectrum-Tabs-item + *:not(.spectrum-Tabs-selectionIndicator) {\n margin-right: var(--spectrum-tabs-item-gap);\n}\n\n.spectrum-Tabs--horizontal .spectrum-Tabs-selectionIndicator {\n position: absolute;\n bottom: 0;\n height: var(--spectrum-tabs-rule-size);\n\n bottom: calc(-1 * var(--spectrum-tabs-rule-size));\n }\n\n.spectrum-Tabs--horizontal.spectrum-Tabs--compact {\n box-sizing: content-box;\n height: var(--spectrum-tabs-compact-item-height);\n -ms-flex-align: end;\n align-items: end;\n }\n\n.spectrum-Tabs--quiet {\n display: -ms-inline-flexbox;\n display: inline-flex;\n}\n\n[dir="ltr"] .spectrum-Tabs--vertical {\n border-left: var(--spectrum-tabs-vertical-rule-size) solid;\n}\n\n[dir="rtl"] .spectrum-Tabs--vertical {\n border-right: var(--spectrum-tabs-vertical-rule-size) solid;\n}\n\n.spectrum-Tabs--vertical {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-direction: column;\n flex-direction: column;\n padding: 0;\n}\n\n[dir="ltr"] .spectrum-Tabs--vertical .spectrum-Tabs-item {\n margin-left: calc(var(--spectrum-tabs-vertical-item-margin-left) - var(--spectrum-tabs-focus-ring-padding-x));\n}\n\n[dir="rtl"] .spectrum-Tabs--vertical .spectrum-Tabs-item {\n margin-right: calc(var(--spectrum-tabs-vertical-item-margin-left) - var(--spectrum-tabs-focus-ring-padding-x));\n}\n\n.spectrum-Tabs--vertical .spectrum-Tabs-item {\n height: var(--spectrum-tabs-vertical-item-height);\n padding-top: 0;\n padding-bottom: 0;\n padding-left: var(--spectrum-tabs-focus-ring-padding-x);\n padding-right: var(--spectrum-tabs-focus-ring-padding-x);\n margin-bottom: var(--spectrum-tabs-vertical-item-gap);\n }\n\n[dir="ltr"] .spectrum-Tabs--vertical .spectrum-Tabs-item::before {\n left: calc(-1 * var(--spectrum-tabs-focus-ring-size));\n}\n\n[dir="rtl"] .spectrum-Tabs--vertical .spectrum-Tabs-item::before {\n right: calc(-1 * var(--spectrum-tabs-focus-ring-size));\n}\n\n[dir="ltr"] .spectrum-Tabs--vertical .spectrum-Tabs-item::before {\n right: calc(-1 * var(--spectrum-tabs-focus-ring-size));\n}\n\n[dir="rtl"] .spectrum-Tabs--vertical .spectrum-Tabs-item::before {\n left: calc(-1 * var(--spectrum-tabs-focus-ring-size));\n}\n\n.spectrum-Tabs--vertical .spectrum-Tabs-item::before {\n margin-top: calc(var(--spectrum-tabs-focus-ring-height) / -2);\n }\n\n.spectrum-Tabs--vertical.spectrum-Tabs--compact .spectrum-Tabs-item {\n height: var(--spectrum-tabs-compact-vertical-item-height);\n line-height: var(--spectrum-tabs-compact-vertical-item-height);\n margin-bottom: var(--spectrum-tabs-compact-vertical-item-gap);\n }\n\n.spectrum-Tabs--vertical.spectrum-Tabs--compact .spectrum-Tabs-item .spectrum-Icon {\n height: var(--spectrum-tabs-compact-vertical-item-height);\n }\n\n[dir="ltr"] .spectrum-Tabs--vertical .spectrum-Tabs-selectionIndicator {\n left: 0px;\n}\n\n[dir="rtl"] .spectrum-Tabs--vertical .spectrum-Tabs-selectionIndicator {\n right: 0px;\n}\n\n[dir="ltr"] .spectrum-Tabs--vertical .spectrum-Tabs-selectionIndicator {\n\n left: calc(-1 * var(--spectrum-tabs-vertical-rule-size));\n}\n\n[dir="rtl"] .spectrum-Tabs--vertical .spectrum-Tabs-selectionIndicator {\n\n right: calc(-1 * var(--spectrum-tabs-vertical-rule-size));\n}\n\n.spectrum-Tabs--vertical .spectrum-Tabs-selectionIndicator {\n position: absolute;\n width: var(--spectrum-tabs-vertical-rule-size);\n }\n\n.spectrum-Tabs {\n border-bottom-color: var(--spectrum-tabs-m-rule-color, var(--spectrum-alias-border-color-light));\n}\n\n[dir="ltr"] .spectrum-Tabs--vertical {\n border-left-color: var(--spectrum-tabs-m-vertical-rule-color, var(--spectrum-alias-border-color-light));\n}\n\n[dir="rtl"] .spectrum-Tabs--vertical {\n border-right-color: var(--spectrum-tabs-m-vertical-rule-color, var(--spectrum-alias-border-color-light));\n}\n\n.spectrum-Tabs-selectionIndicator {\n background-color: var(--spectrum-tabs-m-selection-indicator-color, var(--spectrum-global-color-gray-900));\n}\n\n.spectrum-Tabs-item {\n color: var(--spectrum-tabs-m-text-color, var(--spectrum-alias-label-text-color));\n}\n\n.spectrum-Tabs-item .spectrum-Icon {\n color: var(--spectrum-tabs-m-icon-color, var(--spectrum-alias-icon-color))\n }\n\n.spectrum-Tabs-item:hover {\n color: var(--spectrum-tabs-m-text-color-hover, var(--spectrum-alias-text-color-hover));\n }\n\n.spectrum-Tabs-item:hover .spectrum-Icon {\n color: var(--spectrum-tabs-m-icon-color-hover, var(--spectrum-alias-icon-color-hover))\n }\n\n.spectrum-Tabs-item.is-selected {\n color: var(--spectrum-tabs-m-text-color-selected, var(--spectrum-global-color-gray-900));\n }\n\n.spectrum-Tabs-item.is-selected .spectrum-Icon {\n color: var(--spectrum-tabs-m-icon-color-selected, var(--spectrum-global-color-gray-900))\n }\n\n.spectrum-Tabs-item.focus-ring {\n color: var(--spectrum-tabs-m-text-color-key-focus, var(--spectrum-alias-text-color-hover));\n }\n\n.spectrum-Tabs-item.focus-ring::before {\n border-color: var(--spectrum-tabs-m-focus-ring-color, var(--spectrum-alias-border-color-focus));\n }\n\n.spectrum-Tabs-item.focus-ring .spectrum-Icon {\n color: var(--spectrum-tabs-m-icon-color-key-focus, var(--spectrum-alias-icon-color-focus))\n }\n\n.spectrum-Tabs-item.is-disabled {\n color: var(--spectrum-tabs-m-text-color-disabled, var(--spectrum-alias-text-color-disabled));\n }\n\n.spectrum-Tabs-item.is-disabled .spectrum-Icon {\n color: var(--spectrum-tabs-m-icon-color-disabled, var(--spectrum-alias-icon-color-disabled))\n }\n\n.spectrum-Tabs--quiet {\n border-bottom-color: var(--spectrum-tabs-quiet-m-rule-color, var(--spectrum-alias-border-color-transparent));\n}\n\n.spectrum-Tabs--quiet .spectrum-Tabs-selectionIndicator {\n background-color: var(--spectrum-tabs-quiet-m-selection-indicator-color, var(--spectrum-global-color-gray-900));\n }\n\n[dir="ltr"] .spectrum-Tabs--vertical.spectrum-Tabs--quiet,[dir="ltr"] \n .spectrum-Tabs--vertical.spectrum-Tabs--compact {\n border-left-color: var(--spectrum-tabs-quiet-m-vertical-rule-color, var(--spectrum-alias-border-color-transparent));\n}\n\n[dir="rtl"] .spectrum-Tabs--vertical.spectrum-Tabs--quiet,[dir="rtl"] \n .spectrum-Tabs--vertical.spectrum-Tabs--compact {\n border-right-color: var(--spectrum-tabs-quiet-m-vertical-rule-color, var(--spectrum-alias-border-color-transparent));\n}\n\n.spectrum-Tabs--vertical.spectrum-Tabs--quiet .spectrum-Tabs-selectionIndicator, .spectrum-Tabs--vertical.spectrum-Tabs--compact .spectrum-Tabs-selectionIndicator {\n background-color: var(--spectrum-tabs-quiet-m-selection-indicator-color, var(--spectrum-global-color-gray-900));\n }\n');function zk(e){let t,r;return{c(){t=_("div"),j(t,"class","spectrum-Tabs-selectionIndicator indicator-transition svelte-14e5lpv"),j(t,"style",r=(e[4]&&"background-color: var(--spectrum-global-color-blue-400)")+"; width: "+e[10]+"; height: "+e[11]+"; left: "+e[9]+"; top: "+e[8]+";")},m(e,r){D(e,t,r)},p(e,n){3856&n&&r!==(r=(e[4]&&"background-color: var(--spectrum-global-color-blue-400)")+"; width: "+e[10]+"; height: "+e[11]+"; left: "+e[9]+"; top: "+e[8]+";")&&j(t,"style",r)},d(e){e&&T(t)}}}function Sk(e){let t,r,n,i,o,a;const s=e[17].default,c=p(s,e,e[16],null);let l=e[6].info&&zk(e);return{c(){t=_("div"),c&&c.c(),r=L(),l&&l.c(),i=L(),o=_("div"),j(t,"class",n="selected-border spectrum-Tabs "+(e[3]&&"spectrum-Tabs--quiet")+" spectrum-Tabs--"+(e[0]?"vertical":"horizontal")+" svelte-14e5lpv"),X(t,"quiet",e[3]),X(t,"noHorizPadding",e[2]),X(t,"onTop",e[5]),j(o,"class","spectrum-Tabs-content spectrum-Tabs-content-"+e[12]+" svelte-14e5lpv"),X(o,"noPadding",e[1])},m(n,s){D(n,t,s),c&&c.m(t,null),A(t,r),l&&l.m(t,null),e[18](t),D(n,i,s),D(n,o,s),a=!0},p(e,[r]){c&&c.p&&(!a||65536&r)&&m(c,s,e,e[16],r,null,null),e[6].info?l?l.p(e,r):(l=zk(e),l.c(),l.m(t,null)):l&&(l.d(1),l=null),(!a||9&r&&n!==(n="selected-border spectrum-Tabs "+(e[3]&&"spectrum-Tabs--quiet")+" spectrum-Tabs--"+(e[0]?"vertical":"horizontal")+" svelte-14e5lpv"))&&j(t,"class",n),9&r&&X(t,"quiet",e[3]),13&r&&X(t,"noHorizPadding",e[2]),41&r&&X(t,"onTop",e[5]),2&r&&X(o,"noPadding",e[1])},i(e){a||(Te(c,e),a=!0)},o(e){$e(c,e),a=!1},d(r){r&&T(t),c&&c.d(r),l&&l.d(),e[18](null),r&&T(i),r&&T(o)}}}function Ak(e,t,r){let n,i,{$$slots:o={},$$scope:a}=t,{selected:s}=t,{vertical:c=!1}=t,{noPadding:l=!1}=t,{noHorizPadding:p=!1}=t,{quiet:d=!1}=t,{emphasized:m=!1}=t,{onTop:f=!1}=t,h="_"+Math.random().toString(36).slice(2,9);const g=bo({title:s,id:h,emphasized:m});let v;u(e,g,(e=>r(6,n=e))),oe("tab",g);const b=ie();let y,x,w,k;function C(){c?(r(11,k=n.info?.height+4+"px"),r(10,w=n.info?.width)):(r(10,w=n.info?.width+"px"),r(11,k=n.info?.height))}function z(){c?r(8,y=n.info?.top-v?.getBoundingClientRect().top+"px"):r(9,x=n.info?.left-v?.getBoundingClientRect().left+"px")}return ne((()=>{C(),z()})),e.$$set=e=>{"selected"in e&&r(14,s=e.selected),"vertical"in e&&r(0,c=e.vertical),"noPadding"in e&&r(1,l=e.noPadding),"noHorizPadding"in e&&r(2,p=e.noHorizPadding),"quiet"in e&&r(3,d=e.quiet),"emphasized"in e&&r(4,m=e.emphasized),"onTop"in e&&r(5,f=e.onTop),"$$scope"in e&&r(16,a=e.$$scope)},e.$$.update=()=>{49216&e.$$.dirty&&(i!==s?(r(15,i=s),b("select",i)):n.title!==i&&(r(15,i=n.title),r(14,s=n.title),b("select",i)),n.title!==i&&g.update((e=>(e.title=i,e)))),64&e.$$.dirty&&C(),64&e.$$.dirty&&z()},[c,l,p,d,m,f,n,v,y,x,w,k,h,g,s,i,a,o,function(e){le[e?"unshift":"push"]((()=>{v=e,r(7,v)}))}]}t(".quiet.svelte-14e5lpv.svelte-14e5lpv{border-bottom:none !important}.onTop.svelte-14e5lpv.svelte-14e5lpv{z-index:20}.spectrum-Tabs.svelte-14e5lpv.svelte-14e5lpv{padding-left:var(--spacing-xl);padding-right:var(--spacing-xl);position:relative;border-bottom:1px solid var(--spectrum-global-color-gray-300)}.spectrum-Tabs-content.svelte-14e5lpv.svelte-14e5lpv{margin-top:var(--spectrum-global-dimension-static-size-150)}.indicator-transition.svelte-14e5lpv.svelte-14e5lpv{transition:all 200ms}.spectrum-Tabs--horizontal.svelte-14e5lpv .spectrum-Tabs-selectionIndicator.svelte-14e5lpv{bottom:0 !important}.noHorizPadding.svelte-14e5lpv.svelte-14e5lpv{padding:0}.noPadding.svelte-14e5lpv.svelte-14e5lpv{margin:0}");class Dk extends Ne{constructor(e){super(),Re(this,e,Ak,Sk,l,{selected:14,vertical:0,noPadding:1,noHorizPadding:2,quiet:3,emphasized:4,onTop:5})}}function Tk(e){let t,r,n;return{c(){t=E("svg"),r=E("use"),R(r,"xlink:href",n="#spectrum-icon-18-"+e[1]),j(t,"class","spectrum-Icon spectrum-Icon--sizeM"),j(t,"focusable","false"),j(t,"aria-hidden","true"),j(t,"aria-label","Folder")},m(e,n){D(e,t,n),A(t,r)},p(e,t){2&t&&n!==(n="#spectrum-icon-18-"+e[1])&&R(r,"xlink:href",n)},d(e){e&&T(t)}}}function $k(e){let t,r;return t=new Tn({props:{target:".spectrum-Tabs-content-"+e[3].id,$$slots:{default:[_k]},$$scope:{ctx:e}}}),{c(){Pe(t.$$.fragment)},m(e,n){je(t,e,n),r=!0},p(e,r){const n={};8&r&&(n.target=".spectrum-Tabs-content-"+e[3].id),256&r&&(n.$$scope={dirty:r,ctx:e}),t.$set(n)},i(e){r||(Te(t.$$.fragment,e),r=!0)},o(e){$e(t.$$.fragment,e),r=!1},d(e){Fe(t,e)}}}function _k(e){let t;const r=e[6].default,n=p(r,e,e[8],null);return{c(){n&&n.c()},m(e,r){n&&n.m(e,r),t=!0},p(e,i){n&&n.p&&(!t||256&i)&&m(n,r,e,e[8],i,null,null)},i(e){t||(Te(n,e),t=!0)},o(e){$e(n,e),t=!1},d(e){n&&n.d(e)}}}function Ek(e){let t,r,n,i,o,a,s,c,l,u=e[1]&&Tk(e),p=e[3].title===e[0]&&$k(e);return{c(){t=_("div"),u&&u.c(),r=L(),n=_("span"),i=M(e[0]),o=L(),p&&p.c(),a=I(),j(n,"class","spectrum-Tabs-itemLabel"),j(t,"class","spectrum-Tabs-item svelte-1urx9zy"),j(t,"tabindex","0"),X(t,"is-selected",e[3].title===e[0]),X(t,"emphasized",e[3].title===e[0]&&e[3].emphasized)},m(d,m){D(d,t,m),u&&u.m(t,null),A(t,r),A(t,n),A(n,i),e[7](t),D(d,o,m),p&&p.m(d,m),D(d,a,m),s=!0,c||(l=O(t,"click",e[5]),c=!0)},p(e,[n]){e[1]?u?u.p(e,n):(u=Tk(e),u.c(),u.m(t,r)):u&&(u.d(1),u=null),(!s||1&n)&&q(i,e[0]),9&n&&X(t,"is-selected",e[3].title===e[0]),9&n&&X(t,"emphasized",e[3].title===e[0]&&e[3].emphasized),e[3].title===e[0]?p?(p.p(e,n),9&n&&Te(p,1)):(p=$k(e),p.c(),Te(p,1),p.m(a.parentNode,a)):p&&(Ae(),$e(p,1,1,(()=>{p=null})),De())},i(e){s||(Te(p),s=!0)},o(e){$e(p),s=!1},d(r){r&&T(t),u&&u.d(),e[7](null),r&&T(o),p&&p.d(r),r&&T(a),c=!1,l()}}}function Mk(e,t,r){let n,{$$slots:i={},$$scope:o}=t,{title:a}=t,{icon:s=""}=t;const c=ie();let l,p,d=ae("tab");u(e,d,(e=>r(3,n=e)));ne((()=>{setTimeout((()=>{p=l?.getBoundingClientRect(),p&&n.title===a&&b(d,n.info=p,n)}),0)}));return e.$$set=e=>{"title"in e&&r(0,a=e.title),"icon"in e&&r(1,s=e.icon),"$$scope"in e&&r(8,o=e.$$scope)},e.$$.update=()=>{13&e.$$.dirty&&n.title===a&&l&&n.info?.left!==l.getBoundingClientRect().left&&b(d,n={...n,info:l.getBoundingClientRect()},n)},[a,s,l,n,d,()=>{b(d,n={...n,title:a,info:l.getBoundingClientRect()},n),c("click")},i,function(e){le[e?"unshift":"push"]((()=>{l=e,r(2,l)}))},o]}t(".emphasized.svelte-1urx9zy{color:var(--spectrum-global-color-blue-600)}");class Lk extends Ne{constructor(e){super(),Re(this,e,Mk,Ek,l,{title:0,icon:1})}}function Ik(e){let t,r;const n=e[4].default,i=p(n,e,e[3],null);return{c(){t=_("ul"),i&&i.c(),j(t,"class","spectrum-TreeView"),U(t,"width",e[2]),X(t,"spectrum-TreeView--standalone",e[1]),X(t,"spectrum-TreeView--quiet",e[0])},m(e,n){D(e,t,n),i&&i.m(t,null),r=!0},p(e,[o]){i&&i.p&&(!r||8&o)&&m(i,n,e,e[3],o,null,null),(!r||4&o)&&U(t,"width",e[2]),2&o&&X(t,"spectrum-TreeView--standalone",e[1]),1&o&&X(t,"spectrum-TreeView--quiet",e[0])},i(e){r||(Te(i,e),r=!0)},o(e){$e(i,e),r=!1},d(e){e&&T(t),i&&i.d(e)}}}function Ok(e,t,r){let{$$slots:n={},$$scope:i}=t,{quiet:o=!1}=t,{standalone:a=!0}=t,{width:s="250px"}=t;return e.$$set=e=>{"quiet"in e&&r(0,o=e.quiet),"standalone"in e&&r(1,a=e.standalone),"width"in e&&r(2,s=e.width),"$$scope"in e&&r(3,i=e.$$scope)},[o,a,s,i,n]}t('.spectrum-TreeView {\n --spectrum-treeview-item-min-height: var(--spectrum-global-dimension-size-400);\n --spectrum-treeview-item-padding-y: var(--spectrum-global-dimension-size-75);\n --spectrum-treeview-item-icon-margin-right: var(--spectrum-global-dimension-size-125);\n --spectrum-treeview-item-affordance-width: var(--spectrum-global-dimension-size-400);\n --spectrum-treeview-item-indentation: var(--spectrum-global-dimension-size-200);\n --spectrum-treeview-heading-font-weight: var(--spectrum-global-font-weight-bold, 700);\n --spectrum-treeview-item-hover-offset: var(--spectrum-global-dimension-size-25);\n --spectrum-treeview-item-border-size-selected: var(--spectrum-alias-border-size-thin, var(--spectrum-global-dimension-static-size-10));\n\n --spectrum-treeview-item-height-layers: var(--spectrum-global-dimension-size-550);\n}\n\n.spectrum-TreeView {\n display: block;\n position: relative;\n\n padding: 0;\n\n list-style: none;\n outline: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.spectrum-TreeView-item {\n overflow: hidden;\n}\n\n[dir="ltr"] .spectrum-TreeView-item.is-open > .spectrum-TreeView-itemLink > .spectrum-TreeView-itemIndicator { transform: rotate(90deg); }\n\n[dir="rtl"] .spectrum-TreeView-item.is-open > .spectrum-TreeView-itemLink > .spectrum-TreeView-itemIndicator { transform: matrix(-1, 0, 0, 1, 0, 0) rotate(90deg); }\n\n.spectrum-TreeView-item.is-open > .spectrum-TreeView {\n height: auto;\n visibility: visible;\n }\n\n.spectrum-TreeView-item.is-drop-target .spectrum-TreeView-itemLink:before {\n border-width: var(--spectrum-treeview-item-border-size, var(--spectrum-global-dimension-static-size-25));\n }\n\n.spectrum-TreeView-item.is-selected .spectrum-TreeView-itemLink:not(.focus-ring):before {\n border-width: var(--spectrum-treeview-item-border-size-selected);\n }\n\n.spectrum-TreeView-itemLabel {\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.spectrum-TreeView-itemLink {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-align: center;\n align-items: center;\n\n box-sizing: border-box;\n cursor: pointer;\n\n padding-top: var(--spectrum-treeview-item-padding-y, var(--spectrum-global-dimension-static-size-100));\n\n padding-bottom: var(--spectrum-treeview-item-padding-y, var(--spectrum-global-dimension-static-size-100));\n padding-left: var(--spectrum-treeview-item-affordance-width);\n padding-right: var(--spectrum-treeview-item-affordance-width);\n\n text-decoration: none;\n\n height: var(--spectrum-treeview-item-min-height);\n white-space: nowrap;\n overflow: hidden;\n\n outline: none;\n}\n\n[dir="ltr"] .spectrum-TreeView-itemLink .spectrum-TreeView-itemIcon {\n margin-right: var(--spectrum-treeview-item-icon-margin-right);\n}\n\n[dir="rtl"] .spectrum-TreeView-itemLink .spectrum-TreeView-itemIcon {\n margin-left: var(--spectrum-treeview-item-icon-margin-right);\n}\n\n.spectrum-TreeView-itemLink .spectrum-TreeView-itemIcon {\n vertical-align: top;\n }\n\n[dir="ltr"] .spectrum-TreeView-itemLink:before {\n left: var(--spectrum-treeview-item-border-size, var(--spectrum-global-dimension-static-size-25));\n}\n\n[dir="rtl"] .spectrum-TreeView-itemLink:before {\n right: var(--spectrum-treeview-item-border-size, var(--spectrum-global-dimension-static-size-25));\n}\n\n[dir="ltr"] .spectrum-TreeView-itemLink:before {\n right: 0;\n}\n\n[dir="rtl"] .spectrum-TreeView-itemLink:before {\n left: 0;\n}\n\n.spectrum-TreeView-itemLink:before {\n content: \'\';\n\n box-sizing: border-box;\n\n position: absolute;\n\n height: calc(var(--spectrum-treeview-item-height, var(--spectrum-global-dimension-size-450)) - var(--spectrum-treeview-item-hover-offset) * 2);\n\n border-style: solid;\n border-color: transparent;\n border-width: var(--spectrum-treeview-item-border-size, var(--spectrum-global-dimension-static-size-25)) 0 var(--spectrum-treeview-item-border-size, var(--spectrum-global-dimension-static-size-25)) 0;\n background-color: transparent;\n }\n\n.spectrum-TreeView-itemLink.focus-ring:before {\n border-width: var(--spectrum-treeview-item-border-size, var(--spectrum-global-dimension-static-size-25));\n }\n\n.spectrum-TreeView--standalone .spectrum-TreeView-itemLink:before {\n border-radius: var(--spectrum-treeview-item-border-radius, var(--spectrum-alias-border-radius-regular));\n border-width: var(--spectrum-treeview-item-border-size, var(--spectrum-global-dimension-static-size-25));\n }\n\n[dir="ltr"] .spectrum-TreeView--thumbnail .spectrum-TreeView-itemThumbnail {\n margin-right: var(--spectrum-treeview-item-icon-margin-right);\n}\n\n[dir="rtl"] .spectrum-TreeView--thumbnail .spectrum-TreeView-itemThumbnail {\n margin-left: var(--spectrum-treeview-item-icon-margin-right);\n}\n\n.spectrum-TreeView--thumbnail .spectrum-TreeView-itemLink {\n height: var(--spectrum-treeview-item-height-layers);\n }\n\n.spectrum-TreeView--thumbnail .spectrum-TreeView-itemLink:before {\n height: var(--spectrum-treeview-item-height-layers);\n }\n\n[dir="ltr"] .spectrum-TreeView-itemIndicator {\n\n float: left;\n}\n\n[dir="rtl"] .spectrum-TreeView-itemIndicator {\n\n float: right;\n}\n\n[dir="ltr"] .spectrum-TreeView-itemIndicator {\n\n left: var(--spectrum-global-dimension-size-125);\n}\n\n[dir="rtl"] .spectrum-TreeView-itemIndicator {\n\n right: var(--spectrum-global-dimension-size-125);\n}\n\n[dir="ltr"] .spectrum-TreeView-itemIndicator {\n margin-left: calc(-1 * var(--spectrum-global-dimension-size-500));\n}\n\n[dir="rtl"] .spectrum-TreeView-itemIndicator {\n margin-right: calc(-1 * var(--spectrum-global-dimension-size-500));\n}\n\n[dir="ltr"] .spectrum-TreeView-itemIndicator {\n margin-right: var(--spectrum-global-dimension-size-85);\n}\n\n[dir="rtl"] .spectrum-TreeView-itemIndicator {\n margin-left: var(--spectrum-global-dimension-size-85);\n}\n\n[dir="rtl"] .spectrum-TreeView-itemIndicator { transform: matrix(-1, 0, 0, 1, 0, 0) ; }\n\n.spectrum-TreeView-itemIndicator {\n display: block;\n box-sizing: content-box;\n position: relative;\n z-index: 1;\n top: calc(-1 * var(--spectrum-global-dimension-size-65));\n margin-bottom: calc(-1 * var(--spectrum-global-dimension-size-125));\n\n padding-left: var(--spectrum-global-dimension-size-150);\n\n padding-right: var(--spectrum-global-dimension-size-150);\n padding-top: var(--spectrum-global-dimension-size-125);\n padding-bottom: var(--spectrum-global-dimension-size-125);\n transition: transform ease var(--spectrum-global-animation-duration-100, 130ms);\n\n pointer-events: all !important;\n}\n\n[dir="ltr"] .spectrum-TreeView .spectrum-TreeView {\n\n padding-left: var(--spectrum-treeview-item-indentation);\n}\n\n[dir="rtl"] .spectrum-TreeView .spectrum-TreeView {\n\n padding-right: var(--spectrum-treeview-item-indentation);\n}\n\n.spectrum-TreeView .spectrum-TreeView {\n position: static;\n height: 0;\n visibility: hidden;\n}\n\n[dir="ltr"] .spectrum-TreeView-item--indent1 {\n padding-left: var(--spectrum-treeview-item-indentation);\n}\n\n[dir="rtl"] .spectrum-TreeView-item--indent1 {\n padding-right: var(--spectrum-treeview-item-indentation);\n}\n\n[dir="ltr"] .spectrum-TreeView-item--indent2 {\n padding-left: calc(2 * var(--spectrum-treeview-item-indentation));\n}\n\n[dir="rtl"] .spectrum-TreeView-item--indent2 {\n padding-right: calc(2 * var(--spectrum-treeview-item-indentation));\n}\n\n[dir="ltr"] .spectrum-TreeView-item--indent3 {\n padding-left: calc(3 * var(--spectrum-treeview-item-indentation));\n}\n\n[dir="rtl"] .spectrum-TreeView-item--indent3 {\n padding-right: calc(3 * var(--spectrum-treeview-item-indentation));\n}\n\n[dir="ltr"] .spectrum-TreeView-item--indent4 {\n padding-left: calc(4 * var(--spectrum-treeview-item-indentation));\n}\n\n[dir="rtl"] .spectrum-TreeView-item--indent4 {\n padding-right: calc(4 * var(--spectrum-treeview-item-indentation));\n}\n\n[dir="ltr"] .spectrum-TreeView-item--indent5 {\n padding-left: calc(5 * var(--spectrum-treeview-item-indentation));\n}\n\n[dir="rtl"] .spectrum-TreeView-item--indent5 {\n padding-right: calc(5 * var(--spectrum-treeview-item-indentation));\n}\n\n[dir="ltr"] .spectrum-TreeView-item--indent6 {\n padding-left: calc(6 * var(--spectrum-treeview-item-indentation));\n}\n\n[dir="rtl"] .spectrum-TreeView-item--indent6 {\n padding-right: calc(6 * var(--spectrum-treeview-item-indentation));\n}\n\n[dir="ltr"] .spectrum-TreeView-item--indent7 {\n padding-left: calc(7 * var(--spectrum-treeview-item-indentation));\n}\n\n[dir="rtl"] .spectrum-TreeView-item--indent7 {\n padding-right: calc(7 * var(--spectrum-treeview-item-indentation));\n}\n\n[dir="ltr"] .spectrum-TreeView-item--indent8 {\n padding-left: calc(8 * var(--spectrum-treeview-item-indentation));\n}\n\n[dir="rtl"] .spectrum-TreeView-item--indent8 {\n padding-right: calc(8 * var(--spectrum-treeview-item-indentation));\n}\n\n[dir="ltr"] .spectrum-TreeView-item--indent9 {\n padding-left: calc(9 * var(--spectrum-treeview-item-indentation));\n}\n\n[dir="rtl"] .spectrum-TreeView-item--indent9 {\n padding-right: calc(9 * var(--spectrum-treeview-item-indentation));\n}\n\n[dir="ltr"] .spectrum-TreeView-item--indent10 {\n padding-left: calc(10 * var(--spectrum-treeview-item-indentation));\n}\n\n[dir="rtl"] .spectrum-TreeView-item--indent10 {\n padding-right: calc(10 * var(--spectrum-treeview-item-indentation));\n}\n\n.spectrum-TreeView-heading {\n padding: var(--spectrum-treeview-item-padding-y, var(--spectrum-global-dimension-static-size-100));\n font-weight: var(--spectrum-treeview-heading-font-weight);\n}\n\n.spectrum-TreeView-heading:not(:first-child) {\n margin-top: var(--spectrum-global-dimension-size-200);\n }\n\n.spectrum-TreeView {\n --spectrum-treeview-item-background-color-selected: var(--spectrum-alias-highlight-selected);\n\n --spectrum-treeview-item-background-color-quiet-selected: var(--spectrum-alias-highlight-hover);\n --spectrum-treeview-item-icon-color: var(--spectrum-alias-icon-color, var(--spectrum-global-color-gray-700));\n --spectrum-treeview-item-icon-color-hover: var(--spectrum-alias-icon-color-hover, var(--spectrum-global-color-gray-900));\n --spectrum-treeview-item-icon-color-focus: var(--spectrum-alias-icon-color-focus, var(--spectrum-global-color-gray-900));\n --spectrum-treeview-item-icon-color-selected: var(--spectrum-alias-icon-color-selected-neutral, var(--spectrum-global-color-gray-900));\n --spectrum-treeview-item-icon-color-disabled: var(--spectrum-alias-icon-color-disabled, var(--spectrum-global-color-gray-400));\n --spectrum-treeview-item-text-color-focus: var(--spectrum-alias-text-color-down, var(--spectrum-global-color-gray-900));\n --spectrum-treeview-item-text-color-selected: var(--spectrum-alias-text-color-selected-neutral, var(--spectrum-global-color-gray-900));\n --spectrum-treeview-item-text-color-disabled: var(--spectrum-alias-text-color-disabled, var(--spectrum-global-color-gray-500));\n}\n\n.spectrum-TreeView-item.is-disabled > .spectrum-TreeView-itemLink {\n color: var(--spectrum-treeview-item-text-color-disabled);\n }\n\n.spectrum-TreeView-item.is-disabled > .spectrum-TreeView-itemLink .spectrum-Icon {\n color: var(--spectrum-treeview-item-icon-color-disabled);\n }\n\n.spectrum-TreeView-item.is-selected > .spectrum-TreeView-itemLink {\n color: var(--spectrum-treeview-item-text-color-selected);\n }\n\n.spectrum-TreeView-item.is-selected > .spectrum-TreeView-itemLink:before {\n background-color: var(--spectrum-treeview-item-background-color-selected);\n border-color: var(--spectrum-treeview-item-border-color-key-focus, var(--spectrum-alias-focus-color));\n }\n\n.spectrum-TreeView-item.is-selected > .spectrum-TreeView-itemLink .spectrum-TreeView-itemIcon {\n color: var(--spectrum-treeview-item-icon-color-selected);\n }\n\n.spectrum-TreeView-item.is-drop-target > .spectrum-TreeView-itemLink:before {\n background-color: var(--spectrum-alias-highlight-selected);\n border-color: var(--spectrum-treeview-item-border-color-key-focus, var(--spectrum-alias-focus-color));\n }\n\n.spectrum-TreeView--quiet .spectrum-TreeView-item.is-selected > .spectrum-TreeView-itemLink:before {\n background-color: var(--spectrum-treeview-item-background-color-quiet-selected);\n border-color: transparent;\n }\n\n.spectrum-TreeView--quiet .spectrum-TreeView-item.is-selected > .spectrum-TreeView-itemLink.focus-ring:before {\n border-color: var(--spectrum-treeview-item-border-color-key-focus, var(--spectrum-alias-focus-color));\n }\n\n.spectrum-TreeView-itemIcon {\n color: var(--spectrum-treeview-item-icon-color);\n}\n\n.spectrum-TreeView-itemLink {\n color: var(--spectrum-treeview-item-text-color, var(--spectrum-global-color-gray-800));\n}\n\n.spectrum-TreeView-itemLink:hover {\n color: var(--spectrum-treeview-item-text-color-hover, var(--spectrum-global-color-gray-900));\n }\n\n.spectrum-TreeView-itemLink:hover:before {\n background-color: var(--spectrum-treeview-item-background-color-hover, var(--spectrum-alias-background-color-hover-overlay));\n }\n\n.spectrum-TreeView-itemLink:hover .spectrum-TreeView-itemIcon {\n color: var(--spectrum-treeview-item-icon-color-hover);\n }\n\n.spectrum-TreeView-itemLink.focus-ring {\n color: var(--spectrum-treeview-item-text-color-focus);\n }\n\n.spectrum-TreeView-itemLink.focus-ring::before {\n background-color: var(--spectrum-treeview-item-background-color-key-focus, var(--spectrum-alias-background-color-hover-overlay));\n\n border-color: var(--spectrum-treeview-item-border-color-key-focus, var(--spectrum-alias-focus-color));\n }\n\n.spectrum-TreeView-itemLink.focus-ring .spectrum-TreeView-itemIcon {\n color: var(--spectrum-treeview-item-icon-color-focus);\n }\n');class Bk extends Ne{constructor(e){super(),Re(this,e,Ok,Ik,l,{quiet:0,standalone:1,width:2})}}function Pk(e){let t,r;return{c(){t=E("svg"),r=E("use"),R(r,"xlink:href","#spectrum-css-icon-Chevron100"),j(t,"class","spectrum-Icon spectrum-UIIcon-ChevronRight100 spectrum-TreeView-itemIndicator"),j(t,"focusable","false"),j(t,"aria-hidden","true")},m(e,n){D(e,t,n),A(t,r)},d(e){e&&T(t)}}}function jk(e){let t,r,n;return{c(){t=E("svg"),r=E("use"),R(r,"xlink:href",n="#spectrum-icon-18-"+e[4]),j(t,"class","spectrum-TreeView-itemIcon spectrum-Icon spectrum-Icon--sizeM"),j(t,"focusable","false"),j(t,"aria-hidden","true"),j(t,"aria-label","Layers")},m(e,n){D(e,t,n),A(t,r)},p(e,t){16&t&&n!==(n="#spectrum-icon-18-"+e[4])&&R(r,"xlink:href",n)},d(e){e&&T(t)}}}function Fk(e){let t,r;const n=e[7].default,i=p(n,e,e[6],null);return{c(){t=_("ul"),i&&i.c(),j(t,"class","spectrum-TreeView")},m(e,n){D(e,t,n),i&&i.m(t,null),r=!0},p(e,t){i&&i.p&&(!r||64&t)&&m(i,n,e,e[6],t,null,null)},i(e){r||(Te(i,e),r=!0)},o(e){$e(i,e),r=!1},d(e){e&&T(t),i&&i.d(e)}}}function Rk(e){let t,r,n,i,o,a,s,c,l,u,p=e[5].default&&Pk(),d=e[4]&&jk(e),m=e[5].default&&Fk(e);return{c(){t=_("li"),r=_("a"),p&&p.c(),n=L(),d&&d.c(),i=L(),o=_("span"),a=M(e[3]),s=L(),m&&m.c(),j(o,"class","spectrum-TreeView-itemLabel"),j(r,"class","spectrum-TreeView-itemLink"),j(r,"href",e[2]),j(t,"class","spectrum-TreeView-item"),X(t,"is-selected",e[0]),X(t,"is-open",e[1])},m(f,h){D(f,t,h),A(t,r),p&&p.m(r,null),A(r,n),d&&d.m(r,null),A(r,i),A(r,o),A(o,a),A(t,s),m&&m.m(t,null),c=!0,l||(u=O(r,"click",e[8]),l=!0)},p(e,[o]){e[5].default?p||(p=Pk(),p.c(),p.m(r,n)):p&&(p.d(1),p=null),e[4]?d?d.p(e,o):(d=jk(e),d.c(),d.m(r,i)):d&&(d.d(1),d=null),(!c||8&o)&&q(a,e[3]),(!c||4&o)&&j(r,"href",e[2]),e[5].default?m?(m.p(e,o),32&o&&Te(m,1)):(m=Fk(e),m.c(),Te(m,1),m.m(t,null)):m&&(Ae(),$e(m,1,1,(()=>{m=null})),De()),1&o&&X(t,"is-selected",e[0]),2&o&&X(t,"is-open",e[1])},i(e){c||(Te(m),c=!0)},o(e){$e(m),c=!1},d(e){e&&T(t),p&&p.d(),d&&d.d(),m&&m.d(),l=!1,u()}}}function Nk(e,t,r){let{$$slots:n={},$$scope:i}=t;const o=g(n);let{selected:a=!1}=t,{open:s=!1}=t,{href:c=!1}=t,{title:l}=t,{icon:u}=t;return e.$$set=e=>{"selected"in e&&r(0,a=e.selected),"open"in e&&r(1,s=e.open),"href"in e&&r(2,c=e.href),"title"in e&&r(3,l=e.title),"icon"in e&&r(4,u=e.icon),"$$scope"in e&&r(6,i=e.$$scope)},[a,s,c,l,u,o,i,n,function(t){se(e,t)}]}class qk extends Ne{constructor(e){super(),Re(this,e,Nk,Rk,l,{selected:0,open:1,href:2,title:3,icon:4})}}function Hk(e){let t,r;return t=new qt({props:{updateOnChange:e[5],disabled:e[4],value:e[0],placeholder:e[3],quiet:e[6]}}),t.$on("change",e[7]),t.$on("click",e[8]),t.$on("input",e[9]),t.$on("focus",e[10]),t.$on("blur",e[11]),{c(){Pe(t.$$.fragment)},m(e,n){je(t,e,n),r=!0},p(e,r){const n={};32&r&&(n.updateOnChange=e[5]),16&r&&(n.disabled=e[4]),1&r&&(n.value=e[0]),8&r&&(n.placeholder=e[3]),64&r&&(n.quiet=e[6]),t.$set(n)},i(e){r||(Te(t.$$.fragment,e),r=!0)},o(e){$e(t.$$.fragment,e),r=!1},d(e){Fe(t,e)}}}function Uk(e){let t,r;return t=new ft({props:{label:e[1],labelPosition:e[2],$$slots:{default:[Hk]},$$scope:{ctx:e}}}),{c(){Pe(t.$$.fragment)},m(e,n){je(t,e,n),r=!0},p(e,[r]){const n={};2&r&&(n.label=e[1]),4&r&&(n.labelPosition=e[2]),8313&r&&(n.$$scope={dirty:r,ctx:e}),t.$set(n)},i(e){r||(Te(t.$$.fragment,e),r=!0)},o(e){$e(t.$$.fragment,e),r=!1},d(e){Fe(t,e)}}}function Gk(e,t,r){let{value:n=null}=t,{label:i=null}=t,{labelPosition:o="above"}=t,{placeholder:a=null}=t,{disabled:s=!1}=t,{updateOnChange:c=!0}=t,{quiet:l=!1}=t;const u=ie();return e.$$set=e=>{"value"in e&&r(0,n=e.value),"label"in e&&r(1,i=e.label),"labelPosition"in e&&r(2,o=e.labelPosition),"placeholder"in e&&r(3,a=e.placeholder),"disabled"in e&&r(4,s=e.disabled),"updateOnChange"in e&&r(5,c=e.updateOnChange),"quiet"in e&&r(6,l=e.quiet)},[n,i,o,a,s,c,l,e=>{r(0,n=e.detail),u("change",e.detail)},function(t){se(e,t)},function(t){se(e,t)},function(t){se(e,t)},function(t){se(e,t)}]}class Wk extends Ne{constructor(e){super(),Re(this,e,Gk,Uk,l,{value:0,label:1,labelPosition:2,placeholder:3,disabled:4,updateOnChange:5,quiet:6})}}t('.spectrum-Pagination--explicit,\n.spectrum-Pagination--listing {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-align: center;\n align-items: center;\n}\n\n.spectrum-Pagination-textfield {\n width: var(--spectrum-pagination-textfield-width, var(--spectrum-global-dimension-size-600));\n min-width: var(--spectrum-pagination-textfield-width, var(--spectrum-global-dimension-size-600));\n}\n\n[dir="ltr"] .spectrum-Pagination-counter {\n margin-left: var(--spectrum-pagination-counter-margin-left, var(--spectrum-global-dimension-size-65));\n}\n\n[dir="rtl"] .spectrum-Pagination-counter {\n margin-right: var(--spectrum-pagination-counter-margin-left, var(--spectrum-global-dimension-size-65));\n}\n\n[dir="ltr"] .spectrum-Pagination-prevButton {\n margin-right: var(--spectrum-pagination-page-button-margin-horizontal, var(--spectrum-global-dimension-size-65));\n}\n\n[dir="rtl"] .spectrum-Pagination-prevButton {\n margin-left: var(--spectrum-pagination-page-button-margin-horizontal, var(--spectrum-global-dimension-size-65));\n}\n\n[dir="ltr"] .spectrum-Pagination-nextButton {\n margin-left: var(--spectrum-pagination-page-button-margin-horizontal, var(--spectrum-global-dimension-size-65));\n}\n\n[dir="rtl"] .spectrum-Pagination-nextButton {\n margin-right: var(--spectrum-pagination-page-button-margin-horizontal, var(--spectrum-global-dimension-size-65));\n}\n\n[dir="rtl"] .spectrum-Pagination-prevButton .spectrum-Icon,[dir="rtl"] .spectrum-Pagination-nextButton .spectrum-Icon { transform: matrix(-1, 0, 0, 1, 0, 0) ; }\n\n.spectrum-Pagination-pageButton:hover {\n background-color: var(--spectrum-pagination-page-button-background-color-hover, var(--spectrum-alias-background-color-hover-overlay));\n }\n\n.spectrum-Pagination-pageButton:focus {\n border-color: var(--spectrum-pagination-page-button-border-color-key-focus, var(--spectrum-alias-focus-color));\n }\n\n.spectrum-Pagination-pageButton.is-selected {\n background-color: var(--spectrum-pagination-page-button-background-color-down, var(--spectrum-global-color-gray-800));\n color: var(--spectrum-pagination-page-button-text-color-down, var(--spectrum-global-color-static-white));\n }\n\n.spectrum-Pagination-counter {\n color: var(--spectrum-alias-label-text-color, var(--spectrum-global-color-gray-700));\n}\n');function Xk(e){let t,n,i,o,a,l,u,p,d,m;return{c(){t=_("nav"),n=_("div"),n.innerHTML='<svg class="spectrum-Icon spectrum-UIIcon-ChevronLeft100" focusable="false" aria-hidden="true" aria-label="ChevronLeft"><use xlink:href="#spectrum-css-icon-Chevron100"></use></svg>',i=L(),o=_("span"),a=M("Page "),l=M(e[0]),u=L(),p=_("div"),p.innerHTML='<svg class="spectrum-Icon spectrum-UIIcon-ChevronRight100" focusable="false" aria-hidden="true" aria-label="ChevronLeft"><use xlink:href="#spectrum-css-icon-Chevron100"></use></svg>',j(n,"href","#"),j(n,"class","spectrum-ActionButton spectrum-ActionButton--sizeM spectrum-ActionButton--quiet spectrum-Pagination-prevButton svelte-1w0vi9g"),X(n,"is-disabled",!e[3]),j(o,"class","spectrum-Body--secondary spectrum-Pagination-counter svelte-1w0vi9g"),j(p,"href","#"),j(p,"class","spectrum-ActionButton spectrum-ActionButton--sizeM spectrum-ActionButton--quiet spectrum-Pagination-nextButton svelte-1w0vi9g"),X(p,"is-disabled",!e[4]),j(t,"class","spectrum-Pagination spectrum-Pagination--explicit")},m(r,s){D(r,t,s),A(t,n),A(t,i),A(t,o),A(o,a),A(o,l),A(t,u),A(t,p),d||(m=[O(n,"click",(function(){c(e[3]?e[1]:null)&&(e[3]?e[1]:null).apply(this,arguments)})),O(p,"click",(function(){c(e[4]?e[2]:null)&&(e[4]?e[2]:null).apply(this,arguments)}))],d=!0)},p(t,[r]){e=t,8&r&&X(n,"is-disabled",!e[3]),1&r&&q(l,e[0]),16&r&&X(p,"is-disabled",!e[4])},i:r,o:r,d(e){e&&T(t),d=!1,s(m)}}}function Vk(e,t,r){let{page:n}=t,{goToPrevPage:i}=t,{goToNextPage:o}=t,{hasPrevPage:a=!0}=t,{hasNextPage:s=!0}=t;return e.$$set=e=>{"page"in e&&r(0,n=e.page),"goToPrevPage"in e&&r(1,i=e.goToPrevPage),"goToNextPage"in e&&r(2,o=e.goToNextPage),"hasPrevPage"in e&&r(3,a=e.hasPrevPage),"hasNextPage"in e&&r(4,s=e.hasNextPage)},[n,i,o,a,s]}t(".spectrum-Pagination-counter.svelte-1w0vi9g{margin-left:0;user-select:none}.is-disabled.svelte-1w0vi9g:hover{cursor:initial}");class Yk extends Ne{constructor(e){super(),Re(this,e,Vk,Xk,l,{page:0,goToPrevPage:1,goToNextPage:2,hasPrevPage:3,hasNextPage:4})}}function Kk(e){let t,r,n;const i=e[17].default,o=p(i,e,e[16],null);return{c(){t=_("div"),o&&o.c(),j(t,"class",r="spectrum-StatusLight spectrum-StatusLight--size"+e[0]),X(t,"spectrum-StatusLight--celery",e[1]),X(t,"spectrum-StatusLight--yellow",e[2]),X(t,"spectrum-StatusLight--fuchsia",e[3]),X(t,"spectrum-StatusLight--indigo",e[4]),X(t,"spectrum-StatusLight--seafoam",e[5]),X(t,"spectrum-StatusLight--chartreuse",e[6]),X(t,"spectrum-StatusLight--magenta",e[7]),X(t,"spectrum-StatusLight--purple",e[8]),X(t,"spectrum-StatusLight--neutral",e[9]),X(t,"spectrum-StatusLight--info",e[10]),X(t,"spectrum-StatusLight--positive",e[11]),X(t,"spectrum-StatusLight--notice",e[12]),X(t,"spectrum-StatusLight--negative",e[13]),X(t,"spectrum-StatusLight--disabled",e[14]),X(t,"spectrum-StatusLight--active",e[15])},m(e,r){D(e,t,r),o&&o.m(t,null),n=!0},p(e,[a]){o&&o.p&&(!n||65536&a)&&m(o,i,e,e[16],a,null,null),(!n||1&a&&r!==(r="spectrum-StatusLight spectrum-StatusLight--size"+e[0]))&&j(t,"class",r),3&a&&X(t,"spectrum-StatusLight--celery",e[1]),5&a&&X(t,"spectrum-StatusLight--yellow",e[2]),9&a&&X(t,"spectrum-StatusLight--fuchsia",e[3]),17&a&&X(t,"spectrum-StatusLight--indigo",e[4]),33&a&&X(t,"spectrum-StatusLight--seafoam",e[5]),65&a&&X(t,"spectrum-StatusLight--chartreuse",e[6]),129&a&&X(t,"spectrum-StatusLight--magenta",e[7]),257&a&&X(t,"spectrum-StatusLight--purple",e[8]),513&a&&X(t,"spectrum-StatusLight--neutral",e[9]),1025&a&&X(t,"spectrum-StatusLight--info",e[10]),2049&a&&X(t,"spectrum-StatusLight--positive",e[11]),4097&a&&X(t,"spectrum-StatusLight--notice",e[12]),8193&a&&X(t,"spectrum-StatusLight--negative",e[13]),16385&a&&X(t,"spectrum-StatusLight--disabled",e[14]),32769&a&&X(t,"spectrum-StatusLight--active",e[15])},i(e){n||(Te(o,e),n=!0)},o(e){$e(o,e),n=!1},d(e){e&&T(t),o&&o.d(e)}}}function Jk(e,t,r){let{$$slots:n={},$$scope:i}=t,{size:o="M"}=t,{celery:a=!1}=t,{yellow:s=!1}=t,{fuchsia:c=!1}=t,{indigo:l=!1}=t,{seafoam:u=!1}=t,{chartreuse:p=!1}=t,{magenta:d=!1}=t,{purple:m=!1}=t,{neutral:f=!1}=t,{info:h=!1}=t,{positive:g=!1}=t,{notice:v=!1}=t,{negative:b=!1}=t,{disabled:y=!1}=t,{active:x=!1}=t;return e.$$set=e=>{"size"in e&&r(0,o=e.size),"celery"in e&&r(1,a=e.celery),"yellow"in e&&r(2,s=e.yellow),"fuchsia"in e&&r(3,c=e.fuchsia),"indigo"in e&&r(4,l=e.indigo),"seafoam"in e&&r(5,u=e.seafoam),"chartreuse"in e&&r(6,p=e.chartreuse),"magenta"in e&&r(7,d=e.magenta),"purple"in e&&r(8,m=e.purple),"neutral"in e&&r(9,f=e.neutral),"info"in e&&r(10,h=e.info),"positive"in e&&r(11,g=e.positive),"notice"in e&&r(12,v=e.notice),"negative"in e&&r(13,b=e.negative),"disabled"in e&&r(14,y=e.disabled),"active"in e&&r(15,x=e.active),"$$scope"in e&&r(16,i=e.$$scope)},[o,a,s,c,l,u,p,d,m,f,h,g,v,b,y,x,i,n]}t('.spectrum-StatusLight--sizeS {\n --spectrum-statuslight-info-text-font-weight: var(--spectrum-statuslight-info-s-text-font-weight, var(--spectrum-alias-body-text-font-weight));\n --spectrum-statuslight-info-text-line-height: var(--spectrum-statuslight-info-s-text-line-height, var(--spectrum-alias-component-text-line-height));\n --spectrum-statuslight-info-text-size: var(--spectrum-statuslight-info-s-text-size, var(--spectrum-alias-item-text-size-s));\n --spectrum-statuslight-info-dot-size: var(--spectrum-statuslight-info-s-dot-size, var(--spectrum-alias-item-control-1-size-s));\n --spectrum-statuslight-info-text-gap: var(--spectrum-statuslight-info-s-text-gap, var(--spectrum-alias-item-control-gap-s));\n --spectrum-statuslight-info-height: var(--spectrum-statuslight-info-s-height, var(--spectrum-alias-item-height-s));\n}\n\n.spectrum-StatusLight--sizeM {\n --spectrum-statuslight-info-text-font-weight: var(--spectrum-statuslight-info-m-text-font-weight, var(--spectrum-alias-body-text-font-weight));\n --spectrum-statuslight-info-text-line-height: var(--spectrum-statuslight-info-m-text-line-height, var(--spectrum-alias-component-text-line-height));\n --spectrum-statuslight-info-text-size: var(--spectrum-statuslight-info-m-text-size, var(--spectrum-alias-item-text-size-m));\n --spectrum-statuslight-info-dot-size: var(--spectrum-statuslight-info-m-dot-size, var(--spectrum-alias-item-control-1-size-m));\n --spectrum-statuslight-info-text-gap: var(--spectrum-statuslight-info-m-text-gap, var(--spectrum-alias-item-control-gap-m));\n --spectrum-statuslight-info-height: var(--spectrum-statuslight-info-m-height, var(--spectrum-alias-item-height-m));\n}\n\n.spectrum-StatusLight--sizeL {\n --spectrum-statuslight-info-text-font-weight: var(--spectrum-statuslight-info-l-text-font-weight, var(--spectrum-alias-body-text-font-weight));\n --spectrum-statuslight-info-text-line-height: var(--spectrum-statuslight-info-l-text-line-height, var(--spectrum-alias-component-text-line-height));\n --spectrum-statuslight-info-text-size: var(--spectrum-statuslight-info-l-text-size, var(--spectrum-alias-item-text-size-l));\n --spectrum-statuslight-info-dot-size: var(--spectrum-statuslight-info-l-dot-size, var(--spectrum-alias-item-control-1-size-l));\n --spectrum-statuslight-info-text-gap: var(--spectrum-statuslight-info-l-text-gap, var(--spectrum-alias-item-control-gap-l));\n --spectrum-statuslight-info-height: var(--spectrum-statuslight-info-l-height, var(--spectrum-alias-item-height-l));\n}\n\n.spectrum-StatusLight--sizeXL {\n --spectrum-statuslight-info-text-font-weight: var(--spectrum-statuslight-info-xl-text-font-weight, var(--spectrum-alias-body-text-font-weight));\n --spectrum-statuslight-info-text-line-height: var(--spectrum-statuslight-info-xl-text-line-height, var(--spectrum-alias-component-text-line-height));\n --spectrum-statuslight-info-text-size: var(--spectrum-statuslight-info-xl-text-size, var(--spectrum-alias-item-text-size-xl));\n --spectrum-statuslight-info-dot-size: var(--spectrum-statuslight-info-xl-dot-size, var(--spectrum-alias-item-control-1-size-xl));\n --spectrum-statuslight-info-text-gap: var(--spectrum-statuslight-info-xl-text-gap, var(--spectrum-alias-item-control-gap-xl));\n --spectrum-statuslight-info-height: var(--spectrum-statuslight-info-xl-height, var(--spectrum-alias-item-height-xl));\n}\n\n.spectrum-StatusLight {\n --spectrum-statuslight-info-padding-y: var(\n --spectrum-global-dimension-size-65\n );\n --spectrum-statuslight-info-text-line-height: 1.44;\n --spectrum-statuslight-info-padding-top: calc(var(--spectrum-statuslight-info-padding-y) - 1px);\n --spectrum-statuslight-info-padding-bottom: calc(var(--spectrum-statuslight-info-padding-y) + 1px);\n}\n\n.spectrum-StatusLight {\n min-height: var(--spectrum-statuslight-info-height);\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-align: start;\n align-items: flex-start;\n\n padding-top: var(--spectrum-statuslight-info-padding-top);\n\n padding-bottom: var(--spectrum-statuslight-info-padding-bottom);\n padding-left: 0;\n padding-right: 0;\n box-sizing: border-box;\n\n font-size: var(--spectrum-statuslight-info-text-size);\n font-weight: var(--spectrum-statuslight-info-text-font-weight);\n line-height: var(--spectrum-statuslight-info-text-line-height);\n}\n\n.spectrum-StatusLight::before {\n content: "";\n -ms-flex-positive: 0;\n flex-grow: 0;\n -ms-flex-negative: 0;\n flex-shrink: 0;\n display: inline-block;\n width: var(--spectrum-statuslight-info-dot-size);\n height: var(--spectrum-statuslight-info-dot-size);\n border-radius: 50%;\n margin-top: var(--spectrum-statuslight-info-padding-bottom);\n margin-bottom: var(--spectrum-statuslight-info-padding-top);\n margin-left: var(--spectrum-statuslight-info-text-gap);\n margin-right: var(--spectrum-statuslight-info-text-gap);\n -ms-high-contrast-adjust: none;\n forced-color-adjust: none;\n }\n\n.spectrum-StatusLight--neutral {\n font-style: italic;\n}\n\n.spectrum-StatusLight {\n color: var(--spectrum-statuslight-info-m-text-color, var(--spectrum-alias-text-color));\n}\n\n.spectrum-StatusLight[disabled],\n .spectrum-StatusLight.is-disabled {\n color: var(--spectrum-statuslight-info-m-text-color-disabled, var(--spectrum-alias-text-color-disabled));\n }\n\n.spectrum-StatusLight[disabled]::before, .spectrum-StatusLight.is-disabled::before {\n background-color: var(--spectrum-statuslight-info-m-dot-color-disabled, var(--spectrum-global-color-gray-400));\n }\n\n.spectrum-StatusLight--negative::before {\n background-color: var(--spectrum-statuslight-negative-m-dot-color, var(--spectrum-semantic-negative-color-status));\n}\n\n.spectrum-StatusLight--notice::before {\n background-color: var(--spectrum-statuslight-notice-m-dot-color, var(--spectrum-semantic-notice-color-status));\n}\n\n.spectrum-StatusLight--positive::before {\n background-color: var(--spectrum-statuslight-positive-m-dot-color, var(--spectrum-semantic-positive-color-status));\n}\n\n.spectrum-StatusLight--info::before,\n/** @deprecated */.spectrum-StatusLight--active::before {\n background-color: var(--spectrum-statuslight-info-m-dot-color, var(--spectrum-semantic-informative-color-status));\n}\n\n.spectrum-StatusLight--neutral {\n color: var(--spectrum-statuslight-neutral-m-text-color, var(--spectrum-alias-label-text-color));\n}\n\n.spectrum-StatusLight--neutral::before {\n background-color: var(--spectrum-statuslight-neutral-m-dot-color, var(--spectrum-global-color-gray-500));\n }\n\n.spectrum-StatusLight--celery::before {\n background-color: var(--spectrum-statuslight-celery-m-dot-color, var(--spectrum-global-color-celery-400));\n}\n\n.spectrum-StatusLight--yellow::before {\n background-color: var(--spectrum-statuslight-yellow-m-dot-color, var(--spectrum-global-color-yellow-400));\n}\n\n.spectrum-StatusLight--fuchsia::before {\n background-color: var(--spectrum-statuslight-fuchsia-m-dot-color, var(--spectrum-global-color-fuchsia-400));\n}\n\n.spectrum-StatusLight--indigo::before {\n background-color: var(--spectrum-statuslight-indigo-m-dot-color, var(--spectrum-global-color-indigo-400));\n}\n\n.spectrum-StatusLight--seafoam::before {\n background-color: var(--spectrum-statuslight-seafoam-m-dot-color, var(--spectrum-global-color-seafoam-400));\n}\n\n.spectrum-StatusLight--chartreuse::before {\n background-color: var(--spectrum-statuslight-chartreuse-m-dot-color, var(--spectrum-global-color-chartreuse-400));\n}\n\n.spectrum-StatusLight--magenta::before {\n background-color: var(--spectrum-statuslight-magenta-m-dot-color, var(--spectrum-global-color-magenta-400));\n}\n\n.spectrum-StatusLight--purple::before {\n background-color: var(--spectrum-statuslight-purple-m-dot-color, var(--spectrum-global-color-purple-400));\n}\n');class Zk extends Ne{constructor(e){super(),Re(this,e,Jk,Kk,l,{size:0,celery:1,yellow:2,fuchsia:3,indigo:4,seafoam:5,chartreuse:6,magenta:7,purple:8,neutral:9,info:10,positive:11,notice:12,negative:13,disabled:14,active:15})}}function Qk(e,t,r){const n=e.slice();return n[18]=t[r],n}function eC(e,t,r){const n=e.slice();return n[21]=t[r],n}function tC(e){let t,r,n,i,o,a,s,l,u,p,d,m,f,h,g=e[7],v=[];for(let t=0;t<g.length;t+=1)v[t]=iC(Qk(e,g,t));const b=e=>$e(v[e],1,1,(()=>{v[e]=null}));return s=new kt({props:{updateOnChange:!1,quiet:!0,placeholder:"Hex, RGB, HSL...",value:e[5]}}),s.$on("change",e[12]),u=new et({props:{size:"S",name:"Close",hoverable:!0}}),u.$on("click",e[13]),{c(){t=_("div");for(let e=0;e<v.length;e+=1)v[e].c();r=L(),n=_("div"),i=_("div"),i.textContent="Custom",o=L(),a=_("div"),Pe(s.$$.fragment),l=L(),Pe(u.$$.fragment),j(i,"class","heading svelte-bfns6y"),j(a,"class","custom svelte-bfns6y"),j(n,"class","category category--custom svelte-bfns6y"),j(t,"class","spectrum-Popover spectrum-Popover--bottom spectrum-Picker-popover is-open svelte-bfns6y"),X(t,"spectrum-Popover--align-right",e[3])},m(c,d){D(c,t,d);for(let e=0;e<v.length;e+=1)v[e].m(t,null);A(t,r),A(t,n),A(n,i),A(n,o),A(n,a),je(s,a,null),A(a,l),je(u,a,null),m=!0,f||(h=y(p=Ft.call(null,t,e[14])),f=!0)},p(e,n){if(965&n){let i;for(g=e[7],i=0;i<g.length;i+=1){const o=Qk(e,g,i);v[i]?(v[i].p(o,n),Te(v[i],1)):(v[i]=iC(o),v[i].c(),Te(v[i],1),v[i].m(t,r))}for(Ae(),i=g.length;i<v.length;i+=1)b(i);De()}const i={};32&n&&(i.value=e[5]),s.$set(i),p&&c(p.update)&&16&n&&p.update.call(null,e[14]),8&n&&X(t,"spectrum-Popover--align-right",e[3])},i(e){if(!m){for(let e=0;e<g.length;e+=1)Te(v[e]);Te(s.$$.fragment,e),Te(u.$$.fragment,e),he((()=>{d||(d=Le(t,Ye,{y:-20,duration:200},!0)),d.run(1)})),m=!0}},o(e){v=v.filter(Boolean);for(let e=0;e<v.length;e+=1)$e(v[e]);$e(s.$$.fragment,e),$e(u.$$.fragment,e),d||(d=Le(t,Ye,{y:-20,duration:200},!1)),d.run(0),m=!1},d(e){e&&T(t),$(v,e),Fe(s),Fe(u),e&&d&&d.end(),f=!1,h()}}}function rC(e){let t,r;return t=new et({props:{name:"Checkmark",size:"S"}}),{c(){Pe(t.$$.fragment)},m(e,n){je(t,e,n),r=!0},i(e){r||(Te(t.$$.fragment,e),r=!0)},o(e){$e(t.$$.fragment,e),r=!1},d(e){Fe(t,e)}}}function nC(e){let t,r,n,i,o,a,s=e[0]===`var(--spectrum-global-color-${e[21]})`&&rC();function c(){return e[11](e[21])}return{c(){t=_("div"),r=_("div"),s&&s.c(),j(r,"class",n="fill "+(e[2]||"")+" svelte-bfns6y"),U(r,"background","var(--spectrum-global-color-"+e[21]+")"),U(r,"color",e[6]),j(t,"class","color svelte-bfns6y"),j(t,"title",e[9](e[21]))},m(e,n){D(e,t,n),A(t,r),s&&s.m(r,null),i=!0,o||(a=O(t,"click",c),o=!0)},p(t,o){(e=t)[0]===`var(--spectrum-global-color-${e[21]})`?s?1&o&&Te(s,1):(s=rC(),s.c(),Te(s,1),s.m(r,null)):s&&(Ae(),$e(s,1,1,(()=>{s=null})),De()),(!i||4&o&&n!==(n="fill "+(e[2]||"")+" svelte-bfns6y"))&&j(r,"class",n),(!i||64&o)&&U(r,"color",e[6])},i(e){i||(Te(s),i=!0)},o(e){$e(s),i=!1},d(e){e&&T(t),s&&s.d(),o=!1,a()}}}function iC(e){let t,r,n,i,o,a,s=e[18].label+"",c=e[18].colors,l=[];for(let t=0;t<c.length;t+=1)l[t]=nC(eC(e,c,t));const u=e=>$e(l[e],1,1,(()=>{l[e]=null}));return{c(){t=_("div"),r=_("div"),n=M(s),i=L(),o=_("div");for(let e=0;e<l.length;e+=1)l[e].c();j(r,"class","heading svelte-bfns6y"),j(o,"class","colors svelte-bfns6y"),j(t,"class","category")},m(e,s){D(e,t,s),A(t,r),A(r,n),A(t,i),A(t,o);for(let e=0;e<l.length;e+=1)l[e].m(o,null);a=!0},p(e,t){if(965&t){let r;for(c=e[18].colors,r=0;r<c.length;r+=1){const n=eC(e,c,r);l[r]?(l[r].p(n,t),Te(l[r],1)):(l[r]=nC(n),l[r].c(),Te(l[r],1),l[r].m(o,null))}for(Ae(),r=c.length;r<l.length;r+=1)u(r);De()}},i(e){if(!a){for(let e=0;e<c.length;e+=1)Te(l[e]);a=!0}},o(e){l=l.filter(Boolean);for(let e=0;e<l.length;e+=1)$e(l[e]);a=!1},d(e){e&&T(t),$(l,e)}}}function oC(e){let t,r,n,i,o,a,s,c,l,u,p=e[4]&&tC(e);return{c(){t=_("div"),r=_("div"),n=_("div"),s=L(),p&&p.c(),j(n,"class",i="fill "+(e[2]||"")+" svelte-bfns6y"),j(n,"style",o=e[0]?`background: ${e[0]};`:""),X(n,"placeholder",!e[0]),j(r,"class",a="preview size--"+(e[1]||"M")+" svelte-bfns6y"),j(t,"class","container svelte-bfns6y")},m(i,o){D(i,t,o),A(t,r),A(r,n),A(t,s),p&&p.m(t,null),c=!0,l||(u=O(r,"click",e[10]),l=!0)},p(e,[s]){(!c||4&s&&i!==(i="fill "+(e[2]||"")+" svelte-bfns6y"))&&j(n,"class",i),(!c||1&s&&o!==(o=e[0]?`background: ${e[0]};`:""))&&j(n,"style",o),5&s&&X(n,"placeholder",!e[0]),(!c||2&s&&a!==(a="preview size--"+(e[1]||"M")+" svelte-bfns6y"))&&j(r,"class",a),e[4]?p?(p.p(e,s),16&s&&Te(p,1)):(p=tC(e),p.c(),Te(p,1),p.m(t,null)):p&&(Ae(),$e(p,1,1,(()=>{p=null})),De())},i(e){c||(Te(p),c=!0)},o(e){$e(p),c=!1},d(e){e&&T(t),p&&p.d(),l=!1,u()}}}function aC(e,t,r){let n,i,{value:o}=t,{size:a="M"}=t,{spectrumTheme:s}=t,{alignRight:c=!1}=t,l=!1;const u=ie(),p=[{label:"Theme",colors:["gray-50","gray-75","gray-100","gray-200","gray-300","gray-400","gray-500","gray-600","gray-700","gray-800","gray-900"]},{label:"Colors",colors:["red-400","orange-400","yellow-400","green-400","seafoam-400","blue-400","indigo-400","magenta-400","red-500","orange-500","yellow-500","green-500","seafoam-500","blue-500","indigo-500","magenta-500","red-600","orange-600","yellow-600","green-600","seafoam-600","blue-600","indigo-600","magenta-600","red-700","orange-700","yellow-700","green-700","seafoam-700","blue-700","indigo-700","magenta-700","static-white","static-black"]}],d=e=>{u("change",e),r(4,l=!1)};return e.$$set=e=>{"value"in e&&r(0,o=e.value),"size"in e&&r(1,a=e.size),"spectrumTheme"in e&&r(2,s=e.spectrumTheme),"alignRight"in e&&r(3,c=e.alignRight)},e.$$.update=()=>{1&e.$$.dirty&&r(5,n=(e=>{if(!e)return e;let t=!1;const r=e.substring(28,e.length-1);for(let e of p)if(t=e.colors.includes(r),t)break;return t?null:e})(o)),1&e.$$.dirty&&r(6,i=(e=>e?.includes("gray")?/^.*(gray-(50|75|100|200|300|400|500))\)$/.test(e)?"var(--spectrum-global-color-gray-900)":"var(--spectrum-global-color-gray-50)":e?.includes("static-black")?"var(--spectrum-global-color-static-gray-50)":"var(--spectrum-global-color-static-gray-900)")(o))},[o,a,s,c,l,n,i,p,d,e=>xr(e.split("-").join(" ")),()=>r(4,l=!0),e=>{d(`var(--spectrum-global-color-${e})`)},function(t){se(e,t)},()=>d(null),()=>r(4,l=!1)]}t(".container.svelte-bfns6y.svelte-bfns6y{position:relative}.preview.svelte-bfns6y.svelte-bfns6y{width:32px;height:32px;border-radius:100%;position:relative;transition:border-color 130ms ease-in-out;box-shadow:0 0 0 1px var(--spectrum-global-color-gray-400)}.preview.svelte-bfns6y.svelte-bfns6y:hover{cursor:pointer;box-shadow:0 0 2px 2px var(--spectrum-global-color-gray-400)}.fill.svelte-bfns6y.svelte-bfns6y{width:100%;height:100%;border-radius:100%;position:absolute;top:0;left:0;display:grid;place-items:center}.fill.placeholder.svelte-bfns6y.svelte-bfns6y{background-position:0 0, 10px 10px;background-size:20px 20px;background-image:linear-gradient(\n 45deg,\n #eee 25%,\n transparent 25%,\n transparent 75%,\n #eee 75%,\n #eee 100%\n ),\n linear-gradient(\n 45deg,\n #eee 25%,\n white 25%,\n white 75%,\n #eee 75%,\n #eee 100%\n )}.size--S.svelte-bfns6y.svelte-bfns6y{width:20px;height:20px}.size--M.svelte-bfns6y.svelte-bfns6y{width:32px;height:32px}.size--L.svelte-bfns6y.svelte-bfns6y{width:48px;height:48px}.spectrum-Popover.svelte-bfns6y.svelte-bfns6y{width:210px;z-index:999;top:100%;padding:var(--spacing-l) var(--spacing-xl);display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;gap:var(--spacing-xl)}.spectrum-Popover--align-right.svelte-bfns6y.svelte-bfns6y{right:0}.colors.svelte-bfns6y.svelte-bfns6y{display:grid;grid-template-columns:1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;gap:var(--spacing-xs)}.heading.svelte-bfns6y.svelte-bfns6y{font-size:var(--font-size-s);font-weight:600;letter-spacing:0.14px;flex:1 1 auto;text-transform:uppercase;grid-column:1 / 5;margin-bottom:var(--spacing-s)}.color.svelte-bfns6y.svelte-bfns6y{height:16px;width:16px;border-radius:100%;box-shadow:0 0 0 1px var(--spectrum-global-color-gray-300);position:relative}.color.svelte-bfns6y.svelte-bfns6y:hover{cursor:pointer;box-shadow:0 0 2px 2px var(--spectrum-global-color-gray-300)}.custom.svelte-bfns6y.svelte-bfns6y{display:grid;grid-template-columns:1fr auto;align-items:center;gap:var(--spacing-m);margin-right:var(--spacing-xs)}.category--custom.svelte-bfns6y .heading.svelte-bfns6y{margin-bottom:var(--spacing-xs)}.spectrum-wrapper.svelte-bfns6y.svelte-bfns6y{background-color:transparent}");class sC extends Ne{constructor(e){super(),Re(this,e,aC,oC,l,{value:0,size:1,spectrumTheme:2,alignRight:3})}}t('.spectrum-InLineAlert {\n --spectrum-inlinealert-neutral-title-height: 38px;\n --spectrum-inlinealert-neutral-corner-radius: 4px;\n --spectrum-inlinealert-neutral-border-width: 2px;\n}\n\n.spectrum-InLineAlert {\n position: relative;\n\n display: inline-block;\n box-sizing: border-box;\n min-width: var(--spectrum-inlinealert-neutral-min-width, var(--spectrum-global-dimension-static-size-4600));\n min-height: var(--spectrum-inlinealert-neutral-title-height);\n margin-top: 8px;\n margin-bottom: 8px;\n margin-left: 0;\n margin-right: 0;\n padding-top: var(--spectrum-inlinealert-neutral-padding-y, var(--spectrum-global-dimension-static-size-250));\n padding-bottom: var(--spectrum-inlinealert-neutral-padding-y, var(--spectrum-global-dimension-static-size-250));\n padding-left: var(--spectrum-inlinealert-neutral-padding-x, var(--spectrum-global-dimension-static-size-250));\n padding-right: var(--spectrum-inlinealert-neutral-padding-x, var(--spectrum-global-dimension-static-size-250));\n\n border-width: var(--spectrum-inlinealert-neutral-border-width);\n border-style: solid;\n border-radius: var(--spectrum-inlinealert-neutral-corner-radius);\n}\n\n[dir="ltr"] .spectrum-InLineAlert-icon {\n right: 20px;\n}\n\n[dir="rtl"] .spectrum-InLineAlert-icon {\n left: 20px;\n}\n\n.spectrum-InLineAlert-icon {\n position: absolute;\n display: block;\n top: 20px;\n}\n\n[dir="ltr"] .spectrum-InLineAlert-header {\n padding-right: 30px;\n}\n\n[dir="rtl"] .spectrum-InLineAlert-header {\n padding-left: 30px;\n}\n\n.spectrum-InLineAlert-header {\n display: inline-block;\n height: auto;\n min-height: 0;\n margin: 0;\n padding: 0;\n\n font-size: 14px;\n font-weight: 700;\n font-style: normal;\n line-height: 14px;\n text-transform: none;\n}\n\n.spectrum-InLineAlert-content {\n display: block;\n margin: var(--spectrum-inlinealert-neutral-content-margin-top, var(--spectrum-global-dimension-static-size-100)) 0 0 0;\n padding: 0;\n\n font-size: 14px;\n word-wrap: break-word;\n}\n\n[dir="ltr"] .spectrum-InLineAlert-footer {\n\n text-align: right;\n}\n\n[dir="rtl"] .spectrum-InLineAlert-footer {\n\n text-align: left;\n}\n\n.spectrum-InLineAlert-footer {\n display: block;\n\n padding-top: 0.5rem;\n}\n\n.spectrum-InLineAlert-footer:empty {\n display: none;\n }\n\n[dir="ltr"] .spectrum-InLineAlert-footer .spectrum-Button {\n margin-right: 0;\n}\n\n[dir="rtl"] .spectrum-InLineAlert-footer .spectrum-Button {\n margin-left: 0;\n}\n\n[dir="ltr"] .spectrum-InLineAlert-footer .spectrum-Button {\n margin-left: 0.75rem;\n}\n\n[dir="rtl"] .spectrum-InLineAlert-footer .spectrum-Button {\n margin-right: 0.75rem;\n}\n\n.spectrum-InLineAlert {\n background-color: var(--spectrum-inlinealert-neutral-background-color, var(--spectrum-global-color-gray-50));\n color: var(--spectrum-inlinealert-neutral-text-color, var(--spectrum-global-color-gray-700));\n}\n\n.spectrum-InLineAlert-header {\n color: var(--spectrum-inlinealert-neutral-title-text-color, var(--spectrum-global-color-gray-900));\n}\n\n.spectrum-InLineAlert-content {\n color: var(--spectrum-inlinealert-neutral-text-color, var(--spectrum-global-color-gray-700));\n}\n\n.spectrum-InLineAlert--info {\n border-color: var(--spectrum-inlinealert-info-border-color, var(--spectrum-semantic-informative-border-color));\n}\n\n.spectrum-InLineAlert--info .spectrum-InLineAlert-icon {\n color: var(--spectrum-inlinealert-info-icon-color, var(--spectrum-semantic-informative-icon-color));\n }\n\n.spectrum-InLineAlert--help {\n border-color: var(--spectrum-inlinealert-info-border-color, var(--spectrum-semantic-informative-border-color));\n}\n\n.spectrum-InLineAlert--help .spectrum-InLineAlert-icon {\n color: var(--spectrum-inlinealert-info-icon-color, var(--spectrum-semantic-informative-icon-color));\n }\n\n.spectrum-InLineAlert--error {\n border-color: var(--spectrum-inlinealert-error-border-color, var(--spectrum-semantic-negative-border-color));\n}\n\n.spectrum-InLineAlert--error .spectrum-InLineAlert-icon {\n color: var(--spectrum-inlinealert-error-icon-color, var(--spectrum-semantic-negative-icon-color));\n }\n\n.spectrum-InLineAlert--success {\n border-color: var(--spectrum-inlinealert-success-border-color, var(--spectrum-semantic-positive-border-color));\n}\n\n.spectrum-InLineAlert--success .spectrum-InLineAlert-icon {\n color: var(--spectrum-inlinealert-success-icon-color, var(--spectrum-semantic-positive-icon-color));\n }\n\n.spectrum-InLineAlert--negative {\n border-color: var(--spectrum-inlinealert-negative-border-color, var(--spectrum-semantic-notice-border-color));\n}\n\n.spectrum-InLineAlert--negative .spectrum-InLineAlert-icon {\n color: var(--spectrum-inlinealert-negative-icon-color, var(--spectrum-semantic-notice-icon-color));\n }\n');function cC(e,t,r){const n=e.slice();return n[6]=t[r],n}function lC(e){let t,r,n=e[6]+"";return{c(){t=_("div"),r=M(n),j(t,"class","spectrum-InLineAlert-content")},m(e,n){D(e,t,n),A(t,r)},p(e,t){16&t&&n!==(n=e[6]+"")&&q(r,n)},d(e){e&&T(t)}}}function uC(e){let t,r,n;return r=new On({props:{secondary:!0,$$slots:{default:[pC]},$$scope:{ctx:e}}}),r.$on("click",(function(){c(e[2])&&e[2].apply(this,arguments)})),{c(){t=_("div"),Pe(r.$$.fragment),j(t,"class","spectrum-InLineAlert-footer")},m(e,i){D(e,t,i),je(r,t,null),n=!0},p(t,n){e=t;const i={};512&n&&(i.$$scope={dirty:n,ctx:e}),r.$set(i)},i(e){n||(Te(r.$$.fragment,e),n=!0)},o(e){$e(r.$$.fragment,e),n=!1},d(e){e&&T(t),Fe(r)}}}function pC(e){let t;return{c(){t=M("OK")},m(e,r){D(e,t,r)},d(e){e&&T(t)}}}function dC(e){let t,r,n,i,o,a,s,c,l,u,p,d=e[4],m=[];for(let t=0;t<d.length;t+=1)m[t]=lC(cC(e,d,t));let f=e[2]&&uC(e);return{c(){t=_("div"),r=E("svg"),n=E("use"),o=L(),a=_("div"),s=M(e[1]),c=L();for(let e=0;e<m.length;e+=1)m[e].c();l=L(),f&&f.c(),R(n,"xlink:href",i="#spectrum-icon-18-"+e[3]),j(r,"class","spectrum-Icon spectrum-Icon--sizeM spectrum-InLineAlert-icon"),j(r,"focusable","false"),j(r,"aria-hidden","true"),j(a,"class","spectrum-InLineAlert-header"),j(t,"class",u="spectrum-InLineAlert spectrum-InLineAlert--"+e[0]+" svelte-1ofhl9j")},m(e,i){D(e,t,i),A(t,r),A(r,n),A(t,o),A(t,a),A(a,s),A(t,c);for(let e=0;e<m.length;e+=1)m[e].m(t,null);A(t,l),f&&f.m(t,null),p=!0},p(e,[r]){if((!p||8&r&&i!==(i="#spectrum-icon-18-"+e[3]))&&R(n,"xlink:href",i),(!p||2&r)&&q(s,e[1]),16&r){let n;for(d=e[4],n=0;n<d.length;n+=1){const i=cC(e,d,n);m[n]?m[n].p(i,r):(m[n]=lC(i),m[n].c(),m[n].m(t,l))}for(;n<m.length;n+=1)m[n].d(1);m.length=d.length}e[2]?f?(f.p(e,r),4&r&&Te(f,1)):(f=uC(e),f.c(),Te(f,1),f.m(t,null)):f&&(Ae(),$e(f,1,1,(()=>{f=null})),De()),(!p||1&r&&u!==(u="spectrum-InLineAlert spectrum-InLineAlert--"+e[0]+" svelte-1ofhl9j"))&&j(t,"class",u)},i(e){p||(Te(f),p=!0)},o(e){$e(f),p=!1},d(e){e&&T(t),$(m,e),f&&f.d()}}}function mC(e,t,r){let n,i,{type:o="info"}=t,{header:a=""}=t,{message:s=""}=t,{onConfirm:c}=t;return e.$$set=e=>{"type"in e&&r(0,o=e.type),"header"in e&&r(1,a=e.header),"message"in e&&r(5,s=e.message),"onConfirm"in e&&r(2,c=e.onConfirm)},e.$$.update=()=>{1&e.$$.dirty&&r(3,n=function(e){switch(e){case"error":case"negative":return"Alert";case"success":return"CheckmarkCircle";case"help":return"Help";default:return"Info"}}(o)),32&e.$$.dirty&&r(4,i=s.split("\n"))},[o,a,c,n,i,s]}t(".spectrum-InLineAlert.svelte-1ofhl9j{--spectrum-semantic-negative-border-color:#e34850;--spectrum-semantic-positive-border-color:#2d9d78;--spectrum-semantic-positive-icon-color:#2d9d78;--spectrum-semantic-negative-icon-color:#e34850;min-width:100px}");class fC extends Ne{constructor(e){super(),Re(this,e,mC,dC,l,{type:0,header:1,message:5,onConfirm:2})}}function hC(e){let t,r,n,i,o,a,s,c,l,u,d,f,h,g,v,b,y,x;const w=e[8].default,k=p(w,e,e[7],null);let C=e[3]&&e[4]&&gC(e);return{c(){t=_("div"),r=E("svg"),n=E("use"),a=L(),s=_("div"),c=_("div"),k&&k.c(),l=L(),C&&C.c(),u=L(),d=_("div"),f=_("button"),h=_("div"),h.innerHTML='<svg class="spectrum-ClearButton-icon spectrum-Icon spectrum-UIIcon-Cross100" focusable="false" aria-hidden="true"><use xlink:href="#spectrum-css-icon-Cross100"></use></svg>',R(n,"xlink:href",i="#spectrum-icon-18-"+e[1]),j(r,"class",o="spectrum-Icon spectrum-Icon--size"+e[2]+" spectrum-Toast-typeIcon svelte-5w5398"),j(r,"focusable","false"),j(r,"aria-hidden","true"),j(c,"class","spectrum-Toast-content"),j(s,"class","spectrum-Toast-body"),j(h,"class","spectrum-ClearButton-fill"),j(f,"class",g="spectrum-ClearButton spectrum-ClearButton--overBackground spectrum-ClearButton--size"+e[2]+" svelte-5w5398"),j(d,"class","spectrum-Toast-buttons"),j(t,"class",v="spectrum-Toast spectrum-Toast--"+e[0]+" svelte-5w5398")},m(i,o){D(i,t,o),A(t,r),A(r,n),A(t,a),A(t,s),A(s,c),k&&k.m(c,null),A(s,l),C&&C.m(s,null),A(t,u),A(t,d),A(d,f),A(f,h),b=!0,y||(x=O(f,"click",e[6]),y=!0)},p(e,a){(!b||2&a&&i!==(i="#spectrum-icon-18-"+e[1]))&&R(n,"xlink:href",i),(!b||4&a&&o!==(o="spectrum-Icon spectrum-Icon--size"+e[2]+" spectrum-Toast-typeIcon svelte-5w5398"))&&j(r,"class",o),k&&k.p&&(!b||128&a)&&m(k,w,e,e[7],a,null,null),e[3]&&e[4]?C?C.p(e,a):(C=gC(e),C.c(),C.m(s,null)):C&&(C.d(1),C=null),(!b||4&a&&g!==(g="spectrum-ClearButton spectrum-ClearButton--overBackground spectrum-ClearButton--size"+e[2]+" svelte-5w5398"))&&j(f,"class",g),(!b||1&a&&v!==(v="spectrum-Toast spectrum-Toast--"+e[0]+" svelte-5w5398"))&&j(t,"class",v)},i(e){b||(Te(k,e),b=!0)},o(e){$e(k,e),b=!1},d(e){e&&T(t),k&&k.d(e),C&&C.d(),y=!1,x()}}}function gC(e){let t,r,n,i,o;return{c(){t=_("button"),r=_("span"),n=M(e[3]),j(r,"class","spectrum-Button-label"),j(t,"class","spectrum-Button spectrum-Button--sizeM spectrum-Button--overBackground spectrum-Button--quiet")},m(a,s){D(a,t,s),A(t,r),A(r,n),i||(o=O(t,"click",(function(){c(e[4])&&e[4].apply(this,arguments)})),i=!0)},p(t,r){e=t,8&r&&q(n,e[3])},d(e){e&&T(t),i=!1,o()}}}function vC(e){let t,r,n=e[5]&&hC(e);return{c(){n&&n.c(),t=I()},m(e,i){n&&n.m(e,i),D(e,t,i),r=!0},p(e,[r]){e[5]?n?(n.p(e,r),32&r&&Te(n,1)):(n=hC(e),n.c(),Te(n,1),n.m(t.parentNode,t)):n&&(Ae(),$e(n,1,1,(()=>{n=null})),De())},i(e){r||(Te(n),r=!0)},o(e){$e(n),r=!1},d(e){n&&n.d(e),e&&T(t)}}}function bC(e,t,r){let{$$slots:n={},$$scope:i}=t,o=ie(),{type:a="info"}=t,{icon:s="Info"}=t,{size:c="S"}=t,{extraButtonText:l}=t,{extraButtonAction:u}=t,p=!0;return e.$$set=e=>{"type"in e&&r(0,a=e.type),"icon"in e&&r(1,s=e.icon),"size"in e&&r(2,c=e.size),"extraButtonText"in e&&r(3,l=e.extraButtonText),"extraButtonAction"in e&&r(4,u=e.extraButtonAction),"$$scope"in e&&r(7,i=e.$$scope)},[a,s,c,l,u,p,function(){r(5,p=!1),o("change")},i,n]}t(".spectrum-Toast.svelte-5w5398{pointer-events:all;width:100%}");class yC extends Ne{constructor(e){super(),Re(this,e,bC,vC,l,{type:0,icon:1,size:2,extraButtonText:3,extraButtonAction:4})}}const xC=function(){const e=bo({});return{subscribe:e.subscribe,showStatus:async()=>{const t={message:"Some systems are experiencing issues",type:"negative",extraButtonText:"View Status",extraButtonAction:()=>window.open("https://status.budibase.com/")};await(async(t={message:message,type:type,extraButtonText:extraButtonText,extraButtonAction:extraButtonAction,onChange:onChange})=>{e.update((e=>({...e,...t})))})(t)}}}();function wC(e){let t,r,n,i;return r=new yC({props:{type:e[0].type,extraButtonText:e[0].extraButtonText,extraButtonAction:e[0].extraButtonAction,$$slots:{default:[kC]},$$scope:{ctx:e}}}),r.$on("change",(function(){c(e[0].onChange)&&e[0].onChange.apply(this,arguments)})),{c(){t=_("div"),Pe(r.$$.fragment)},m(e,n){D(e,t,n),je(r,t,null),i=!0},p(t,n){e=t;const i={};1&n&&(i.type=e[0].type),1&n&&(i.extraButtonText=e[0].extraButtonText),1&n&&(i.extraButtonAction=e[0].extraButtonAction),3&n&&(i.$$scope={dirty:n,ctx:e}),r.$set(i)},i(e){i||(Te(r.$$.fragment,e),he((()=>{n||(n=Le(t,Ye,{y:-30},!0)),n.run(1)})),i=!0)},o(e){$e(r.$$.fragment,e),n||(n=Le(t,Ye,{y:-30},!1)),n.run(0),i=!1},d(e){e&&T(t),Fe(r),e&&n&&n.end()}}}function kC(e){let t,r=e[0].message+"";return{c(){t=M(r)},m(e,r){D(e,t,r)},p(e,n){1&n&&r!==(r=e[0].message+"")&&q(t,r)},d(e){e&&T(t)}}}function CC(e){let t,r,n=e[0].message&&wC(e);return{c(){t=_("div"),n&&n.c(),j(t,"class","banner svelte-j1ssay")},m(e,i){D(e,t,i),n&&n.m(t,null),r=!0},p(e,r){e[0].message?n?(n.p(e,r),1&r&&Te(n,1)):(n=wC(e),n.c(),Te(n,1),n.m(t,null)):n&&(Ae(),$e(n,1,1,(()=>{n=null})),De())},i(e){r||(Te(n),r=!0)},o(e){$e(n),r=!1},d(e){e&&T(t),n&&n.d()}}}function zC(e){let t,r;return t=new Tn({props:{target:".banner-container",$$slots:{default:[CC]},$$scope:{ctx:e}}}),{c(){Pe(t.$$.fragment)},m(e,n){je(t,e,n),r=!0},p(e,[r]){const n={};3&r&&(n.$$scope={dirty:r,ctx:e}),t.$set(n)},i(e){r||(Te(t.$$.fragment,e),r=!0)},o(e){$e(t.$$.fragment,e),r=!1},d(e){Fe(t,e)}}}function SC(e,t,r){let n;return u(e,xC,(e=>r(0,n=e))),[n]}t(".banner.svelte-j1ssay{pointer-events:none;width:100%}");class AC extends Ne{constructor(e){super(),Re(this,e,SC,zC,l,{})}}var DC=tc((function(e,t){e.exports=function(){var e=navigator.userAgent,t=navigator.platform,r=/gecko\/\d/i.test(e),n=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),a=n||i||o,s=a&&(n?document.documentMode||6:+(o||i)[1]),c=!o&&/WebKit\//.test(e),l=c&&/Qt\/\d+\.\d+/.test(e),u=!o&&/Chrome\//.test(e),p=/Opera\//.test(e),d=/Apple Computer/.test(navigator.vendor),m=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),f=/PhantomJS/.test(e),h=d&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),g=/Android/.test(e),v=h||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),b=h||/Mac/.test(t),y=/\bCrOS\b/.test(e),x=/win/i.test(t),w=p&&e.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(p=!1,c=!0);var k=b&&(l||p&&(null==w||w<12.11)),C=r||a&&s>=9;function z(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var S,A=function(e,t){var r=e.className,n=z(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function D(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function T(e,t){return D(e).appendChild(t)}function $(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function _(e,t,r,n){var i=$(e,t,r,n);return i.setAttribute("role","presentation"),i}function E(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function M(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function L(e,t){var r=e.className;z(t).test(r)||(e.className+=(r?" ":"")+t)}function I(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!z(r[n]).test(t)&&(t+=" "+r[n]);return t}S=document.createRange?function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(e){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var O=function(e){e.select()};function B(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function P(e,t,r){for(var n in t||(t={}),e)!e.hasOwnProperty(n)||!1===r&&t.hasOwnProperty(n)||(t[n]=e[n]);return t}function j(e,t,r,n,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=n||0,a=i||0;;){var s=e.indexOf("\t",o);if(s<0||s>=t)return a+(t-o);a+=s-o,a+=r-a%r,o=s+1}}h?O=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(O=function(e){try{e.select()}catch(e){}});var F=function(){this.id=null,this.f=null,this.time=0,this.handler=B(this.onTimeout,this)};function R(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}F.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},F.prototype.set=function(e,t){this.f=t;var r=+new Date+e;(!this.id||r<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=r)};var N=50,q={toString:function(){return"CodeMirror.Pass"}},H={scroll:!1},U={origin:"*mouse"},G={origin:"+move"};function W(e,t,r){for(var n=0,i=0;;){var o=e.indexOf("\t",n);-1==o&&(o=e.length);var a=o-n;if(o==e.length||i+a>=t)return n+Math.min(a,t-i);if(i+=o-n,n=o+1,(i+=r-i%r)>=t)return n}}var X=[""];function V(e){for(;X.length<=e;)X.push(Y(X)+" ");return X[e]}function Y(e){return e[e.length-1]}function K(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function J(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}function Z(){}function Q(e,t){var r;return Object.create?r=Object.create(e):(Z.prototype=e,r=new Z),t&&P(t,r),r}var ee=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function te(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||ee.test(e))}function re(e,t){return t?!!(t.source.indexOf("\\w")>-1&&te(e))||t.test(e):te(e)}function ne(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ie=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function oe(e){return e.charCodeAt(0)>=768&&ie.test(e)}function ae(e,t,r){for(;(r<0?t>0:t<e.length)&&oe(e.charAt(t));)t+=r;return t}function se(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}function ce(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<r&&a.to>t||t==r&&a.to==t)&&(n(Math.max(a.from,t),Math.min(a.to,r),1==a.level?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}var le=null;function ue(e,t,r){var n;le=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==r?n=i:le=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:le=i)}return null!=n?n:le}var pe=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(r){return r<=247?e.charAt(r):1424<=r&&r<=1524?"R":1536<=r&&r<=1785?t.charAt(r-1536):1774<=r&&r<=2220?"r":8192<=r&&r<=8203?"w":8204==r?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,a=/[Lb1n]/,s=/[1n]/;function c(e,t,r){this.level=e,this.from=t,this.to=r}return function(e,t){var l="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!n.test(e))return!1;for(var u=e.length,p=[],d=0;d<u;++d)p.push(r(e.charCodeAt(d)));for(var m=0,f=l;m<u;++m){var h=p[m];"m"==h?p[m]=f:f=h}for(var g=0,v=l;g<u;++g){var b=p[g];"1"==b&&"r"==v?p[g]="n":o.test(b)&&(v=b,"r"==b&&(p[g]="R"))}for(var y=1,x=p[0];y<u-1;++y){var w=p[y];"+"==w&&"1"==x&&"1"==p[y+1]?p[y]="1":","!=w||x!=p[y+1]||"1"!=x&&"n"!=x||(p[y]=x),x=w}for(var k=0;k<u;++k){var C=p[k];if(","==C)p[k]="N";else if("%"==C){var z=void 0;for(z=k+1;z<u&&"%"==p[z];++z);for(var S=k&&"!"==p[k-1]||z<u&&"1"==p[z]?"1":"N",A=k;A<z;++A)p[A]=S;k=z-1}}for(var D=0,T=l;D<u;++D){var $=p[D];"L"==T&&"1"==$?p[D]="L":o.test($)&&(T=$)}for(var _=0;_<u;++_)if(i.test(p[_])){var E=void 0;for(E=_+1;E<u&&i.test(p[E]);++E);for(var M="L"==(_?p[_-1]:l),L=M==("L"==(E<u?p[E]:l))?M?"L":"R":l,I=_;I<E;++I)p[I]=L;_=E-1}for(var O,B=[],P=0;P<u;)if(a.test(p[P])){var j=P;for(++P;P<u&&a.test(p[P]);++P);B.push(new c(0,j,P))}else{var F=P,R=B.length,N="rtl"==t?1:0;for(++P;P<u&&"L"!=p[P];++P);for(var q=F;q<P;)if(s.test(p[q])){F<q&&(B.splice(R,0,new c(1,F,q)),R+=N);var H=q;for(++q;q<P&&s.test(p[q]);++q);B.splice(R,0,new c(2,H,q)),R+=N,F=q}else++q;F<P&&B.splice(R,0,new c(1,F,P))}return"ltr"==t&&(1==B[0].level&&(O=e.match(/^\s+/))&&(B[0].from=O[0].length,B.unshift(new c(0,0,O[0].length))),1==Y(B).level&&(O=e.match(/\s+$/))&&(Y(B).to-=O[0].length,B.push(new c(0,u-O[0].length,u)))),"rtl"==t?B.reverse():B}}();function de(e,t){var r=e.order;return null==r&&(r=e.order=pe(e.text,t)),r}var me=[],fe=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||me).concat(r)}};function he(e,t){return e._handlers&&e._handlers[t]||me}function ge(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var o=R(i,r);o>-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function ve(e,t){var r=he(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function be(e,t,r){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ve(e,r||t.type,e,t),ze(t)||t.codemirrorIgnore}function ye(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)-1==R(r,t[n])&&r.push(t[n])}function xe(e,t){return he(e,t).length>0}function we(e){e.prototype.on=function(e,t){fe(this,e,t)},e.prototype.off=function(e,t){ge(this,e,t)}}function ke(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ce(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function ze(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Se(e){ke(e),Ce(e)}function Ae(e){return e.target||e.srcElement}function De(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),b&&e.ctrlKey&&1==t&&(t=3),t}var Te,$e,_e=function(){if(a&&s<9)return!1;var e=$("div");return"draggable"in e||"dragDrop"in e}();function Ee(e){if(null==Te){var t=$("span","​");T(e,$("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Te=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var r=Te?$("span","​"):$("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Me(e){if(null!=$e)return $e;var t=T(e,document.createTextNode("AخA")),r=S(t,0,1).getBoundingClientRect(),n=S(t,1,2).getBoundingClientRect();return D(e),!(!r||r.left==r.right)&&($e=n.right-r.right<3)}var Le=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(r.push(o.slice(0,a)),t+=a+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},Ie=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Oe=function(){var e=$("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Be=null;function Pe(e){if(null!=Be)return Be;var t=T(e,$("span","x")),r=t.getBoundingClientRect(),n=S(t,0,1).getBoundingClientRect();return Be=Math.abs(r.left-n.left)>1}var je={},Fe={};function Re(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),je[e]=t}function Ne(e,t){Fe[e]=t}function qe(e){if("string"==typeof e&&Fe.hasOwnProperty(e))e=Fe[e];else if(e&&"string"==typeof e.name&&Fe.hasOwnProperty(e.name)){var t=Fe[e.name];"string"==typeof t&&(t={name:t}),(e=Q(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return qe("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return qe("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function He(e,t){t=qe(t);var r=je[t.name];if(!r)return He(e,"text/plain");var n=r(e,t);if(Ue.hasOwnProperty(t.name)){var i=Ue[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)n[a]=t.modeProps[a];return n}var Ue={};function Ge(e,t){P(t,Ue.hasOwnProperty(e)?Ue[e]:Ue[e]={})}function We(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function Xe(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Ve(e,t,r){return!e.startState||e.startState(t,r)}var Ye=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};function Ke(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t<o){r=i;break}t-=o}return r.lines[t]}function Je(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,(function(e){var o=e.text;i==r.line&&(o=o.slice(0,r.ch)),i==t.line&&(o=o.slice(t.ch)),n.push(o),++i})),n}function Ze(e,t,r){var n=[];return e.iter(t,r,(function(e){n.push(e.text)})),n}function Qe(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function et(e){if(null==e.parent)return null;for(var t=e.parent,r=R(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;n.children[i]!=t;++i)r+=n.children[i].chunkSize();return r+t.first}function tt(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],o=i.height;if(t<o){e=i;continue e}t-=o,r+=i.chunkSize()}return r}while(!e.lines);for(var a=0;a<e.lines.length;++a){var s=e.lines[a].height;if(t<s)break;t-=s}return r+a}function rt(e,t){return t>=e.first&&t<e.first+e.size}function nt(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function it(e,t,r){if(void 0===r&&(r=null),!(this instanceof it))return new it(e,t,r);this.line=e,this.ch=t,this.sticky=r}function ot(e,t){return e.line-t.line||e.ch-t.ch}function at(e,t){return e.sticky==t.sticky&&0==ot(e,t)}function st(e){return it(e.line,e.ch)}function ct(e,t){return ot(e,t)<0?t:e}function lt(e,t){return ot(e,t)<0?e:t}function ut(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function pt(e,t){if(t.line<e.first)return it(e.first,0);var r=e.first+e.size-1;return t.line>r?it(r,Ke(e,r).text.length):dt(t,Ke(e,t.line).text.length)}function dt(e,t){var r=e.ch;return null==r||r>t?it(e.line,t):r<0?it(e.line,0):e}function mt(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=pt(e,t[n]);return r}Ye.prototype.eol=function(){return this.pos>=this.string.length},Ye.prototype.sol=function(){return this.pos==this.lineStart},Ye.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ye.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ye.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Ye.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ye.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ye.prototype.skipToEnd=function(){this.pos=this.string.length},Ye.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ye.prototype.backUp=function(e){this.pos-=e},Ye.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=j(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?j(this.string,this.lineStart,this.tabSize):0)},Ye.prototype.indentation=function(){return j(this.string,null,this.tabSize)-(this.lineStart?j(this.string,this.lineStart,this.tabSize):0)},Ye.prototype.match=function(e,t,r){if("string"!=typeof e){var n=this.string.slice(this.pos).match(e);return n&&n.index>0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Ye.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ye.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ye.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ye.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ft=function(e,t){this.state=e,this.lookAhead=t},ht=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function gt(e,t,r,n){var i=[e.state.modeGen],o={};St(e,t.text,e.doc.mode,r,(function(e,t){return i.push(e,t)}),o,n);for(var a=r.state,s=function(n){r.baseTokens=i;var s=e.state.overlays[n],c=1,l=0;r.state=!0,St(e,t.text,s.mode,r,(function(e,t){for(var r=c;l<e;){var n=i[c];n>e&&i.splice(c,1,e,i[c+1],n),c+=2,l=Math.min(e,n)}if(t)if(s.opaque)i.splice(r,c-r,e,"overlay "+t),c=r+2;else for(;r<c;r+=2){var o=i[r+1];i[r+1]=(o?o+" ":"")+"overlay "+t}}),o),r.state=a,r.baseTokens=null,r.baseTokenPos=1},c=0;c<e.state.overlays.length;++c)s(c);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function vt(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=bt(e,et(t)),i=t.text.length>e.options.maxHighlightLength&&We(e.doc.mode,n.state),o=gt(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function bt(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new ht(n,!0,t);var o=At(e,t,r),a=o>n.first&&Ke(n,o-1).stateAfter,s=a?ht.fromSaved(n,a,o):new ht(n,Ve(n.mode),o);return n.iter(o,t,(function(r){yt(e,r.text,s);var n=s.line;r.stateAfter=n==t-1||n%5==0||n>=i.viewFrom&&n<i.viewTo?s.save():null,s.nextLine()})),r&&(n.modeFrontier=s.line),s}function yt(e,t,r,n){var i=e.doc.mode,o=new Ye(t,e.options.tabSize,r);for(o.start=o.pos=n||0,""==t&&xt(i,r.state);!o.eol();)wt(i,o,r.state),o.start=o.pos}function xt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=Xe(e,t);return r.mode.blankLine?r.mode.blankLine(r.state):void 0}}function wt(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=Xe(e,r).mode);var o=e.token(t,r);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}ht.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ht.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ht.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ht.fromSaved=function(e,t,r){return t instanceof ft?new ht(e,We(e.mode,t.state),r,t.lookAhead):new ht(e,We(e.mode,t),r)},ht.prototype.save=function(e){var t=!1!==e?We(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ft(t,this.maxLookAhead):t};var kt=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function Ct(e,t,r,n){var i,o,a=e.doc,s=a.mode,c=Ke(a,(t=pt(a,t)).line),l=bt(e,t.line,r),u=new Ye(c.text,e.options.tabSize,l);for(n&&(o=[]);(n||u.pos<t.ch)&&!u.eol();)u.start=u.pos,i=wt(s,u,l.state),n&&o.push(new kt(u,i,We(a.mode,l.state)));return n?o:new kt(u,i,l.state)}function zt(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";null==t[n]?t[n]=r[2]:new RegExp("(?:^|\\s)"+r[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+r[2])}return e}function St(e,t,r,n,i,o,a){var s=r.flattenSpans;null==s&&(s=e.options.flattenSpans);var c,l=0,u=null,p=new Ye(t,e.options.tabSize,n),d=e.options.addModeClass&&[null];for(""==t&&zt(xt(r,n.state),o);!p.eol();){if(p.pos>e.options.maxHighlightLength?(s=!1,a&&yt(e,t,n,p.pos),p.pos=t.length,c=null):c=zt(wt(r,p,n.state,d),o),d){var m=d[0].name;m&&(c="m-"+(c?m+" "+c:m))}if(!s||u!=c){for(;l<p.start;)i(l=Math.min(p.start,l+5e3),u);u=c}p.start=p.pos}for(;l<p.pos;){var f=Math.min(p.pos,l+5e3);i(f,u),l=f}}function At(e,t,r){for(var n,i,o=e.doc,a=r?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=o.first)return o.first;var c=Ke(o,s-1),l=c.stateAfter;if(l&&(!r||s+(l instanceof ft?l.lookAhead:0)<=o.modeFrontier))return s;var u=j(c.text,null,e.options.tabSize);(null==i||n>u)&&(i=s-1,n=u)}return i}function Dt(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var r=e.first,n=t-1;n>r;n--){var i=Ke(e,n).stateAfter;if(i&&(!(i instanceof ft)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}}var Tt=!1,$t=!1;function _t(){Tt=!0}function Et(){$t=!0}function Mt(e,t,r){this.marker=e,this.from=t,this.to=r}function Lt(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function It(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function Ot(e,t,r){var n=r&&window.WeakSet&&(r.markedSpans||(r.markedSpans=new WeakSet));n&&n.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],n&&n.add(e.markedSpans)),t.marker.attachLine(e)}function Bt(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==a.type&&(!r||!o.marker.insertLeft)){var s=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new Mt(a,o.from,s?null:o.to))}}return n}function Pt(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.to||(a.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!r||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(n||(n=[])).push(new Mt(a,s?null:o.from-t,null==o.to?null:o.to-t))}}return n}function jt(e,t){if(t.full)return null;var r=rt(e,t.from.line)&&Ke(e,t.from.line).markedSpans,n=rt(e,t.to.line)&&Ke(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,a=0==ot(t.from,t.to),s=Bt(r,i,a),c=Pt(n,o,a),l=1==t.text.length,u=Y(t.text).length+(l?i:0);if(s)for(var p=0;p<s.length;++p){var d=s[p];if(null==d.to){var m=Lt(c,d.marker);m?l&&(d.to=null==m.to?null:m.to+u):d.to=i}}if(c)for(var f=0;f<c.length;++f){var h=c[f];null!=h.to&&(h.to+=u),null==h.from?Lt(s,h.marker)||(h.from=u,l&&(s||(s=[])).push(h)):(h.from+=u,l&&(s||(s=[])).push(h))}s&&(s=Ft(s)),c&&c!=s&&(c=Ft(c));var g=[s];if(!l){var v,b=t.text.length-2;if(b>0&&s)for(var y=0;y<s.length;++y)null==s[y].to&&(v||(v=[])).push(new Mt(s[y].marker,null,null));for(var x=0;x<b;++x)g.push(v);g.push(c)}return g}function Ft(e){for(var t=0;t<e.length;++t){var r=e[t];null!=r.from&&r.from==r.to&&!1!==r.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Rt(e,t,r){var n=null;if(e.iter(t.line,r.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var r=e.markedSpans[t].marker;!r.readOnly||n&&-1!=R(n,r)||(n||(n=[])).push(r)}})),!n)return null;for(var i=[{from:t,to:r}],o=0;o<n.length;++o)for(var a=n[o],s=a.find(0),c=0;c<i.length;++c){var l=i[c];if(!(ot(l.to,s.from)<0||ot(l.from,s.to)>0)){var u=[c,1],p=ot(l.from,s.from),d=ot(l.to,s.to);(p<0||!a.inclusiveLeft&&!p)&&u.push({from:l.from,to:s.from}),(d>0||!a.inclusiveRight&&!d)&&u.push({from:s.to,to:l.to}),i.splice.apply(i,u),c+=u.length-3}}return i}function Nt(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function qt(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function Ht(e){return e.inclusiveLeft?-1:0}function Ut(e){return e.inclusiveRight?1:0}function Gt(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var n=e.find(),i=t.find(),o=ot(n.from,i.from)||Ht(e)-Ht(t);if(o)return-o;var a=ot(n.to,i.to)||Ut(e)-Ut(t);return a||t.id-e.id}function Wt(e,t){var r,n=$t&&e.markedSpans;if(n)for(var i=void 0,o=0;o<n.length;++o)(i=n[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!r||Gt(r,i.marker)<0)&&(r=i.marker);return r}function Xt(e){return Wt(e,!0)}function Vt(e){return Wt(e,!1)}function Yt(e,t){var r,n=$t&&e.markedSpans;if(n)for(var i=0;i<n.length;++i){var o=n[i];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!r||Gt(r,o.marker)<0)&&(r=o.marker)}return r}function Kt(e,t,r,n,i){var o=Ke(e,t),a=$t&&o.markedSpans;if(a)for(var s=0;s<a.length;++s){var c=a[s];if(c.marker.collapsed){var l=c.marker.find(0),u=ot(l.from,r)||Ht(c.marker)-Ht(i),p=ot(l.to,n)||Ut(c.marker)-Ut(i);if(!(u>=0&&p<=0||u<=0&&p>=0)&&(u<=0&&(c.marker.inclusiveRight&&i.inclusiveLeft?ot(l.to,r)>=0:ot(l.to,r)>0)||u>=0&&(c.marker.inclusiveRight&&i.inclusiveLeft?ot(l.from,n)<=0:ot(l.from,n)<0)))return!0}}}function Jt(e){for(var t;t=Xt(e);)e=t.find(-1,!0).line;return e}function Zt(e){for(var t;t=Vt(e);)e=t.find(1,!0).line;return e}function Qt(e){for(var t,r;t=Vt(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function er(e,t){var r=Ke(e,t),n=Jt(r);return r==n?t:et(n)}function tr(e,t){if(t>e.lastLine())return t;var r,n=Ke(e,t);if(!rr(e,n))return t;for(;r=Vt(n);)n=r.find(1,!0).line;return et(n)+1}function rr(e,t){var r=$t&&t.markedSpans;if(r)for(var n=void 0,i=0;i<r.length;++i)if((n=r[i]).marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&nr(e,t,n))return!0}}function nr(e,t,r){if(null==r.to){var n=r.marker.find(1,!0);return nr(e,n.line,Lt(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(null==i.to||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&nr(e,t,i))return!0}function ir(e){for(var t=0,r=(e=Jt(e)).parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var o=r.parent;o;o=(r=o).parent)for(var a=0;a<o.children.length;++a){var s=o.children[a];if(s==r)break;t+=s.height}return t}function or(e){if(0==e.height)return 0;for(var t,r=e.text.length,n=e;t=Xt(n);){var i=t.find(0,!0);n=i.from.line,r+=i.from.ch-i.to.ch}for(n=e;t=Vt(n);){var o=t.find(0,!0);r-=n.text.length-o.from.ch,r+=(n=o.to.line).text.length-o.to.ch}return r}function ar(e){var t=e.display,r=e.doc;t.maxLine=Ke(r,r.first),t.maxLineLength=or(t.maxLine),t.maxLineChanged=!0,r.iter((function(e){var r=or(e);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)}))}var sr=function(e,t,r){this.text=e,qt(this,t),this.height=r?r(this):1};function cr(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Nt(e),qt(e,r);var i=n?n(e):1;i!=e.height&&Qe(e,i)}function lr(e){e.parent=null,Nt(e)}sr.prototype.lineNo=function(){return et(this)},we(sr);var ur={},pr={};function dr(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?pr:ur;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function mr(e,t){var r=_("span",null,null,c?"padding-right: .1px":null),n={pre:_("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;n.pos=0,n.addToken=hr,Me(e.display.measure)&&(a=de(o,e.doc.direction))&&(n.addToken=vr(n.addToken,a)),n.map=[],yr(o,n,vt(e,o,t!=e.display.externalMeasured&&et(o))),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=I(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=I(o.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(Ee(e.display.measure))),0==i?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(c){var s=n.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return ve(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=I(n.pre.className,n.textClass||"")),n}function fr(e){var t=$("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function hr(e,t,r,n,i,o,c){if(t){var l,u=e.splitSpaces?gr(t,e.trailingSpace):t,p=e.cm.state.specialChars,d=!1;if(p.test(t)){l=document.createDocumentFragment();for(var m=0;;){p.lastIndex=m;var f=p.exec(t),h=f?f.index-m:t.length-m;if(h){var g=document.createTextNode(u.slice(m,m+h));a&&s<9?l.appendChild($("span",[g])):l.appendChild(g),e.map.push(e.pos,e.pos+h,g),e.col+=h,e.pos+=h}if(!f)break;m+=h+1;var v=void 0;if("\t"==f[0]){var b=e.cm.options.tabSize,y=b-e.col%b;(v=l.appendChild($("span",V(y),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=y}else"\r"==f[0]||"\n"==f[0]?((v=l.appendChild($("span","\r"==f[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",f[0]),e.col+=1):((v=e.cm.options.specialCharPlaceholder(f[0])).setAttribute("cm-text",f[0]),a&&s<9?l.appendChild($("span",[v])):l.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,l=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,l),a&&s<9&&(d=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),r||n||i||d||o||c){var x=r||"";n&&(x+=n),i&&(x+=i);var w=$("span",[l],x,o);if(c)for(var k in c)c.hasOwnProperty(k)&&"style"!=k&&"class"!=k&&w.setAttribute(k,c[k]);return e.content.appendChild(w)}e.content.appendChild(l)}}function gr(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!r||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),n+=o,r=" "==o}return n}function vr(e,t){return function(r,n,i,o,a,s,c){i=i?i+" cm-force-border":"cm-force-border";for(var l=r.pos,u=l+n.length;;){for(var p=void 0,d=0;d<t.length&&!((p=t[d]).to>l&&p.from<=l);d++);if(p.to>=u)return e(r,n,i,o,a,s,c);e(r,n.slice(0,p.to-l),i,o,null,s,c),o=null,n=n.slice(p.to-l),l=p.to}}}function br(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function yr(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var a,s,c,l,u,p,d,m=i.length,f=0,h=1,g="",v=0;;){if(v==f){c=l=u=s="",d=null,p=null,v=1/0;for(var b=[],y=void 0,x=0;x<n.length;++x){var w=n[x],k=w.marker;if("bookmark"==k.type&&w.from==f&&k.widgetNode)b.push(k);else if(w.from<=f&&(null==w.to||w.to>f||k.collapsed&&w.to==f&&w.from==f)){if(null!=w.to&&w.to!=f&&v>w.to&&(v=w.to,l=""),k.className&&(c+=" "+k.className),k.css&&(s=(s?s+";":"")+k.css),k.startStyle&&w.from==f&&(u+=" "+k.startStyle),k.endStyle&&w.to==v&&(y||(y=[])).push(k.endStyle,w.to),k.title&&((d||(d={})).title=k.title),k.attributes)for(var C in k.attributes)(d||(d={}))[C]=k.attributes[C];k.collapsed&&(!p||Gt(p.marker,k)<0)&&(p=w)}else w.from>f&&v>w.from&&(v=w.from)}if(y)for(var z=0;z<y.length;z+=2)y[z+1]==v&&(l+=" "+y[z]);if(!p||p.from==f)for(var S=0;S<b.length;++S)br(t,0,b[S]);if(p&&(p.from||0)==f){if(br(t,(null==p.to?m+1:p.to)-f,p.marker,null==p.from),null==p.to)return;p.to==f&&(p=!1)}}if(f>=m)break;for(var A=Math.min(m,v);;){if(g){var D=f+g.length;if(!p){var T=D>A?g.slice(0,A-f):g;t.addToken(t,T,a?a+c:c,u,f+T.length==v?l:"",s,d)}if(D>=A){g=g.slice(A-f),f=A;break}f=D,u=""}g=i.slice(o,o=r[h++]),a=dr(r[h++],t.cm.options)}}else for(var $=1;$<r.length;$+=2)t.addToken(t,i.slice(o,o=r[$]),dr(r[$+1],t.cm.options))}function xr(e,t,r){this.line=t,this.rest=Qt(t),this.size=this.rest?et(Y(this.rest))-r+1:1,this.node=this.text=null,this.hidden=rr(e,t)}function wr(e,t,r){for(var n,i=[],o=t;o<r;o=n){var a=new xr(e.doc,Ke(e.doc,o),o);n=o+a.size,i.push(a)}return i}var kr=null;function Cr(e){kr?kr.ops.push(e):e.ownsGroup=kr={ops:[e],delayedCallbacks:[]}}function zr(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}function Sr(e,t){var r=e.ownsGroup;if(r)try{zr(r)}finally{kr=null,t(r)}}var Ar=null;function Dr(e,t){var r=he(e,t);if(r.length){var n,i=Array.prototype.slice.call(arguments,2);kr?n=kr.delayedCallbacks:Ar?n=Ar:(n=Ar=[],setTimeout(Tr,0));for(var o=function(e){n.push((function(){return r[e].apply(null,i)}))},a=0;a<r.length;++a)o(a)}}function Tr(){var e=Ar;Ar=null;for(var t=0;t<e.length;++t)e[t]()}function $r(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?Lr(e,t):"gutter"==o?Or(e,t,r,n):"class"==o?Ir(e,t):"widget"==o&&Br(e,t,n)}t.changes=null}function _r(e){return e.node==e.text&&(e.node=$("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),a&&s<8&&(e.node.style.zIndex=2)),e.node}function Er(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var n=_r(t);t.background=n.insertBefore($("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}function Mr(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):mr(e,t)}function Lr(e,t){var r=t.text.className,n=Mr(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,Ir(e,t)):r&&(t.text.className=r)}function Ir(e,t){Er(e,t),t.line.wrapClass?_r(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function Or(e,t,r,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=_r(t);t.gutterBackground=$("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var a=_r(t),s=t.gutter=$("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(s.setAttribute("aria-hidden","true"),e.display.input.setUneditable(s),a.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild($("div",nt(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var c=0;c<e.display.gutterSpecs.length;++c){var l=e.display.gutterSpecs[c].className,u=o.hasOwnProperty(l)&&o[l];u&&s.appendChild($("div",[u],"CodeMirror-gutter-elt","left: "+n.gutterLeft[l]+"px; width: "+n.gutterWidth[l]+"px"))}}}function Br(e,t,r){t.alignable&&(t.alignable=null);for(var n=z("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,n.test(i.className)&&t.node.removeChild(i);jr(e,t,r)}function Pr(e,t,r,n){var i=Mr(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Ir(e,t),Or(e,t,r,n),jr(e,t,n),t.node}function jr(e,t,r){if(Fr(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)Fr(e,t.rest[n],t,r,!1)}function Fr(e,t,r,n,i){if(t.widgets)for(var o=_r(r),a=0,s=t.widgets;a<s.length;++a){var c=s[a],l=$("div",[c.node],"CodeMirror-linewidget"+(c.className?" "+c.className:""));c.handleMouseEvents||l.setAttribute("cm-ignore-events","true"),Rr(c,l,r,n),e.display.input.setUneditable(l),i&&c.above?o.insertBefore(l,r.gutter||r.text):o.appendChild(l),Dr(c,"redraw")}}function Rr(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function Nr(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!E(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),T(t.display.measure,$("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function qr(e,t){for(var r=Ae(t);r!=e.wrapper;r=r.parentNode)if(!r||1==r.nodeType&&"true"==r.getAttribute("cm-ignore-events")||r.parentNode==e.sizer&&r!=e.mover)return!0}function Hr(e){return e.lineSpace.offsetTop}function Ur(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Gr(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=T(e.measure,$("pre","x","CodeMirror-line-like")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return isNaN(n.left)||isNaN(n.right)||(e.cachedPaddingH=n),n}function Wr(e){return N-e.display.nativeBarWidth}function Xr(e){return e.display.scroller.clientWidth-Wr(e)-e.display.barWidth}function Vr(e){return e.display.scroller.clientHeight-Wr(e)-e.display.barHeight}function Yr(e,t,r){var n=e.options.lineWrapping,i=n&&Xr(e);if(!t.measure.heights||n&&t.measure.width!=i){var o=t.measure.heights=[];if(n){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),s=0;s<a.length-1;s++){var c=a[s],l=a[s+1];Math.abs(c.bottom-l.bottom)>2&&o.push((c.bottom+l.top)/2-r.top)}}o.push(r.bottom-r.top)}}function Kr(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var i=0;i<e.rest.length;i++)if(et(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function Jr(e,t){var r=et(t=Jt(t)),n=e.display.externalMeasured=new xr(e.doc,t,r);n.lineN=r;var i=n.built=mr(e,n);return n.text=i.pre,T(e.display.lineMeasure,i.pre),n}function Zr(e,t,r,n){return tn(e,en(e,t),r,n)}function Qr(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[On(e,t)];var r=e.display.externalMeasured;return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function en(e,t){var r=et(t),n=Qr(e,r);n&&!n.text?n=null:n&&n.changes&&($r(e,n,r,_n(e)),e.curOp.forceUpdate=!0),n||(n=Jr(e,t));var i=Kr(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function tn(e,t,r,n,i){t.before&&(r=-1);var o,a=r+(n||"");return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Yr(e,t.view,t.rect),t.hasHeights=!0),(o=sn(e,t,r,n)).bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var rn,nn={left:0,right:0,top:0,bottom:0};function on(e,t,r){for(var n,i,o,a,s,c,l=0;l<e.length;l+=3)if(s=e[l],c=e[l+1],t<s?(i=0,o=1,a="left"):t<c?o=1+(i=t-s):(l==e.length-3||t==c&&e[l+3]>t)&&(i=(o=c-s)-1,t>=c&&(a="right")),null!=i){if(n=e[l+2],s==c&&r==(n.insertLeft?"left":"right")&&(a=r),"left"==r&&0==i)for(;l&&e[l-2]==e[l-3]&&e[l-1].insertLeft;)n=e[2+(l-=3)],a="left";if("right"==r&&i==c-s)for(;l<e.length-3&&e[l+3]==e[l+4]&&!e[l+5].insertLeft;)n=e[(l+=3)+2],a="right";break}return{node:n,start:i,end:o,collapse:a,coverStart:s,coverEnd:c}}function an(e,t){var r=nn;if("left"==t)for(var n=0;n<e.length&&(r=e[n]).left==r.right;n++);else for(var i=e.length-1;i>=0&&(r=e[i]).left==r.right;i--);return r}function sn(e,t,r,n){var i,o=on(t.map,r,n),c=o.node,l=o.start,u=o.end,p=o.collapse;if(3==c.nodeType){for(var d=0;d<4;d++){for(;l&&oe(t.line.text.charAt(o.coverStart+l));)--l;for(;o.coverStart+u<o.coverEnd&&oe(t.line.text.charAt(o.coverStart+u));)++u;if((i=a&&s<9&&0==l&&u==o.coverEnd-o.coverStart?c.parentNode.getBoundingClientRect():an(S(c,l,u).getClientRects(),n)).left||i.right||0==l)break;u=l,l-=1,p="right"}a&&s<11&&(i=cn(e.display.measure,i))}else{var m;l>0&&(p=n="right"),i=e.options.lineWrapping&&(m=c.getClientRects()).length>1?m["right"==n?m.length-1:0]:c.getBoundingClientRect()}if(a&&s<9&&!l&&(!i||!i.left&&!i.right)){var f=c.parentNode.getClientRects()[0];i=f?{left:f.left,right:f.left+$n(e.display),top:f.top,bottom:f.bottom}:nn}for(var h=i.top-t.rect.top,g=i.bottom-t.rect.top,v=(h+g)/2,b=t.view.measure.heights,y=0;y<b.length-1&&!(v<b[y]);y++);var x=y?b[y-1]:0,w=b[y],k={left:("right"==p?i.right:i.left)-t.rect.left,right:("left"==p?i.left:i.right)-t.rect.left,top:x,bottom:w};return i.left||i.right||(k.bogus=!0),e.options.singleCursorHeightPerLine||(k.rtop=h,k.rbottom=g),k}function cn(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Pe(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}function ln(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function un(e){e.display.externalMeasure=null,D(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)ln(e.display.view[t])}function pn(e){un(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function dn(){return u&&g?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function mn(){return u&&g?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function fn(e){var t=Jt(e).widgets,r=0;if(t)for(var n=0;n<t.length;++n)t[n].above&&(r+=Nr(t[n]));return r}function hn(e,t,r,n,i){if(!i){var o=fn(t);r.top+=o,r.bottom+=o}if("line"==n)return r;n||(n="local");var a=ir(t);if("local"==n?a+=Hr(e.display):a-=e.display.viewOffset,"page"==n||"window"==n){var s=e.display.lineSpace.getBoundingClientRect();a+=s.top+("window"==n?0:mn());var c=s.left+("window"==n?0:dn());r.left+=c,r.right+=c}return r.top+=a,r.bottom+=a,r}function gn(e,t,r){if("div"==r)return t;var n=t.left,i=t.top;if("page"==r)n-=dn(),i-=mn();else if("local"==r||!r){var o=e.display.sizer.getBoundingClientRect();n+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:n-a.left,top:i-a.top}}function vn(e,t,r,n,i){return n||(n=Ke(e.doc,t.line)),hn(e,n,Zr(e,n,t.ch,i),r)}function bn(e,t,r,n,i,o){function a(t,a){var s=tn(e,i,t,a?"right":"left",o);return a?s.left=s.right:s.right=s.left,hn(e,n,s,r)}n=n||Ke(e.doc,t.line),i||(i=en(e,n));var s=de(n,e.doc.direction),c=t.ch,l=t.sticky;if(c>=n.text.length?(c=n.text.length,l="before"):c<=0&&(c=0,l="after"),!s)return a("before"==l?c-1:c,"before"==l);function u(e,t,r){return a(r?e-1:e,1==s[t].level!=r)}var p=ue(s,c,l),d=le,m=u(c,p,"before"==l);return null!=d&&(m.other=u(c,d,"before"!=l)),m}function yn(e,t){var r=0;t=pt(e.doc,t),e.options.lineWrapping||(r=$n(e.display)*t.ch);var n=Ke(e.doc,t.line),i=ir(n)+Hr(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function xn(e,t,r,n,i){var o=it(e,t,r);return o.xRel=i,n&&(o.outside=n),o}function wn(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return xn(n.first,0,null,-1,-1);var i=tt(n,r),o=n.first+n.size-1;if(i>o)return xn(n.first+n.size-1,Ke(n,o).text.length,null,1,1);t<0&&(t=0);for(var a=Ke(n,i);;){var s=Sn(e,a,i,t,r),c=Yt(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!c)return s;var l=c.find(1);if(l.line==i)return l;a=Ke(n,i=l.line)}}function kn(e,t,r,n){n-=fn(t);var i=t.text.length,o=se((function(t){return tn(e,r,t-1).bottom<=n}),i,0);return{begin:o,end:i=se((function(t){return tn(e,r,t).top>n}),o,i)}}function Cn(e,t,r,n){return r||(r=en(e,t)),kn(e,t,r,hn(e,t,tn(e,r,n),"line").top)}function zn(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function Sn(e,t,r,n,i){i-=ir(t);var o=en(e,t),a=fn(t),s=0,c=t.text.length,l=!0,u=de(t,e.doc.direction);if(u){var p=(e.options.lineWrapping?Dn:An)(e,t,r,o,u,n,i);s=(l=1!=p.level)?p.from:p.to-1,c=l?p.to:p.from-1}var d,m,f=null,h=null,g=se((function(t){var r=tn(e,o,t);return r.top+=a,r.bottom+=a,!!zn(r,n,i,!1)&&(r.top<=i&&r.left<=n&&(f=t,h=r),!0)}),s,c),v=!1;if(h){var b=n-h.left<h.right-n,y=b==l;g=f+(y?0:1),m=y?"after":"before",d=b?h.left:h.right}else{l||g!=c&&g!=s||g++,m=0==g?"after":g==t.text.length?"before":tn(e,o,g-(l?1:0)).bottom+a<=i==l?"after":"before";var x=bn(e,it(r,g,m),"line",t,o);d=x.left,v=i<x.top?-1:i>=x.bottom?1:0}return xn(r,g=ae(t.text,g,1),m,v,n-d)}function An(e,t,r,n,i,o,a){var s=se((function(s){var c=i[s],l=1!=c.level;return zn(bn(e,it(r,l?c.to:c.from,l?"before":"after"),"line",t,n),o,a,!0)}),0,i.length-1),c=i[s];if(s>0){var l=1!=c.level,u=bn(e,it(r,l?c.from:c.to,l?"after":"before"),"line",t,n);zn(u,o,a,!0)&&u.top>a&&(c=i[s-1])}return c}function Dn(e,t,r,n,i,o,a){var s=kn(e,t,n,a),c=s.begin,l=s.end;/\s/.test(t.text.charAt(l-1))&&l--;for(var u=null,p=null,d=0;d<i.length;d++){var m=i[d];if(!(m.from>=l||m.to<=c)){var f=tn(e,n,1!=m.level?Math.min(l,m.to)-1:Math.max(c,m.from)).right,h=f<o?o-f+1e9:f-o;(!u||p>h)&&(u=m,p=h)}}return u||(u=i[i.length-1]),u.from<c&&(u={from:c,to:u.to,level:u.level}),u.to>l&&(u={from:u.from,to:l,level:u.level}),u}function Tn(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==rn){rn=$("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)rn.appendChild(document.createTextNode("x")),rn.appendChild($("br"));rn.appendChild(document.createTextNode("x"))}T(e.measure,rn);var r=rn.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),D(e.measure),r||1}function $n(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=$("span","xxxxxxxxxx"),r=$("pre",[t],"CodeMirror-line-like");T(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function _n(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=e.display.gutterSpecs[a].className;r[s]=o.offsetLeft+o.clientLeft+i,n[s]=o.clientWidth}return{fixedPos:En(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function En(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Mn(e){var t=Tn(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/$n(e.display)-3);return function(i){if(rr(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height);return r?o+(Math.ceil(i.text.length/n)||1)*t:o+t}}function Ln(e){var t=e.doc,r=Mn(e);t.iter((function(e){var t=r(e);t!=e.height&&Qe(e,t)}))}function In(e,t,r,n){var i=e.display;if(!r&&"true"==Ae(t).getAttribute("cm-not-content"))return null;var o,a,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,a=t.clientY-s.top}catch(e){return null}var c,l=wn(e,o,a);if(n&&l.xRel>0&&(c=Ke(e.doc,l.line).text).length==l.ch){var u=j(c,c.length,e.options.tabSize)-c.length;l=it(l.line,Math.max(0,Math.round((o-Gr(e.display).left)/$n(e.display))-u))}return l}function On(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if((t-=r[n].size)<0)return n}function Bn(e,t,r,n){null==t&&(t=e.doc.first),null==r&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)$t&&er(e.doc,t)<i.viewTo&&jn(e);else if(r<=i.viewFrom)$t&&tr(e.doc,r+n)>i.viewFrom?jn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)jn(e);else if(t<=i.viewFrom){var o=Fn(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):jn(e)}else if(r>=i.viewTo){var a=Fn(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):jn(e)}else{var s=Fn(e,t,t,-1),c=Fn(e,r,r+n,1);s&&c?(i.view=i.view.slice(0,s.index).concat(wr(e,s.lineN,c.lineN)).concat(i.view.slice(c.index)),i.viewTo+=n):jn(e)}var l=i.externalMeasured;l&&(r<l.lineN?l.lineN+=n:t<l.lineN+l.size&&(i.externalMeasured=null))}function Pn(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var o=n.view[On(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==R(a,r)&&a.push(r)}}}function jn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Fn(e,t,r,n){var i,o=On(e,t),a=e.display.view;if(!$t||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var s=e.display.viewFrom,c=0;c<o;c++)s+=a[c].size;if(s!=t){if(n>0){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,r+=i}for(;er(e.doc,r)!=r;){if(o==(n<0?0:a.length-1))return null;r+=n*a[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function Rn(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=wr(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=wr(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(On(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(wr(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,On(e,r)))),n.viewTo=r}function Nn(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];i.hidden||i.node&&!i.changes||++r}return r}function qn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Hn(e,t){void 0===t&&(t=!0);var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),o=n.selection=document.createDocumentFragment(),a=e.options.$customCursor;a&&(t=!0);for(var s=0;s<r.sel.ranges.length;s++)if(t||s!=r.sel.primIndex){var c=r.sel.ranges[s];if(!(c.from().line>=e.display.viewTo||c.to().line<e.display.viewFrom)){var l=c.empty();if(a){var u=a(e,c);u&&Un(e,u,i)}else(l||e.options.showCursorWhenSelecting)&&Un(e,c.head,i);l||Wn(e,c,o)}}return n}function Un(e,t,r){var n=bn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild($("div"," ","CodeMirror-cursor"));if(i.style.left=n.left+"px",i.style.top=n.top+"px",i.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var o=vn(e,t,"div",null,null),a=o.right-o.left;i.style.width=(a>0?a:e.defaultCharWidth())+"px"}if(n.other){var s=r.appendChild($("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));s.style.display="",s.style.left=n.other.left+"px",s.style.top=n.other.top+"px",s.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function Gn(e,t){return e.top-t.top||e.left-t.left}function Wn(e,t,r){var n=e.display,i=e.doc,o=document.createDocumentFragment(),a=Gr(e.display),s=a.left,c=Math.max(n.sizerWidth,Xr(e)-n.sizer.offsetLeft)-a.right,l="ltr"==i.direction;function u(e,t,r,n){t<0&&(t=0),t=Math.round(t),n=Math.round(n),o.appendChild($("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==r?c-e:r)+"px;\n height: "+(n-t)+"px"))}function p(t,r,n){var o,a,p=Ke(i,t),d=p.text.length;function m(r,n){return vn(e,it(t,r),"div",p,n)}function f(t,r,n){var i=Cn(e,p,null,t),o="ltr"==r==("after"==n)?"left":"right";return m("after"==n?i.begin:i.end-(/\s/.test(p.text.charAt(i.end-1))?2:1),o)[o]}var h=de(p,i.direction);return ce(h,r||0,null==n?d:n,(function(e,t,i,p){var g="ltr"==i,v=m(e,g?"left":"right"),b=m(t-1,g?"right":"left"),y=null==r&&0==e,x=null==n&&t==d,w=0==p,k=!h||p==h.length-1;if(b.top-v.top<=3){var C=(l?x:y)&&k,z=(l?y:x)&&w?s:(g?v:b).left,S=C?c:(g?b:v).right;u(z,v.top,S-z,v.bottom)}else{var A,D,T,$;g?(A=l&&y&&w?s:v.left,D=l?c:f(e,i,"before"),T=l?s:f(t,i,"after"),$=l&&x&&k?c:b.right):(A=l?f(e,i,"before"):s,D=!l&&y&&w?c:v.right,T=!l&&x&&k?s:b.left,$=l?f(t,i,"after"):c),u(A,v.top,D-A,v.bottom),v.bottom<b.top&&u(s,v.bottom,null,b.top),u(T,b.top,$-T,b.bottom)}(!o||Gn(v,o)<0)&&(o=v),Gn(b,o)<0&&(o=b),(!a||Gn(v,a)<0)&&(a=v),Gn(b,a)<0&&(a=b)})),{start:o,end:a}}var d=t.from(),m=t.to();if(d.line==m.line)p(d.line,d.ch,m.ch);else{var f=Ke(i,d.line),h=Ke(i,m.line),g=Jt(f)==Jt(h),v=p(d.line,d.ch,g?f.text.length+1:null).end,b=p(m.line,g?0:null,m.ch).start;g&&(v.top<b.top-2?(u(v.right,v.top,null,v.bottom),u(s,b.top,b.left,b.bottom)):u(v.right,v.top,b.left-v.right,v.bottom)),v.bottom<b.top&&u(s,v.bottom,null,b.top)}r.appendChild(o)}function Xn(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||Jn(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Vn(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Kn(e))}function Yn(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Jn(e))}),100)}function Kn(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ve(e,"focus",e,t),e.state.focused=!0,L(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),c&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),Xn(e))}function Jn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ve(e,"blur",e,t),e.state.focused=!1,A(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Zn(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,c=0;c<t.view.length;c++){var l=t.view[c],u=e.options.lineWrapping,p=void 0,d=0;if(!l.hidden){if(i+=l.line.height,a&&s<8){var m=l.node.offsetTop+l.node.offsetHeight;p=m-r,r=m}else{var f=l.node.getBoundingClientRect();p=f.bottom-f.top,!u&&l.text.firstChild&&(d=l.text.firstChild.getBoundingClientRect().right-f.left-1)}var h=l.line.height-p;if((h>.005||h<-.005)&&(i<n&&(o-=h),Qe(l.line,p),Qn(l.line),l.rest))for(var g=0;g<l.rest.length;g++)Qn(l.rest[g]);if(d>e.display.sizerWidth){var v=Math.ceil(d/$n(e.display));v>e.display.maxLineLength&&(e.display.maxLineLength=v,e.display.maxLine=l.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function Qn(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function ei(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-Hr(e));var i=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,o=tt(t,n),a=tt(t,i);if(r&&r.ensure){var s=r.ensure.from.line,c=r.ensure.to.line;s<o?(o=s,a=tt(t,ir(Ke(t,s))+e.wrapper.clientHeight)):Math.min(c,t.lastLine())>=a&&(o=tt(t,ir(Ke(t,c))-e.wrapper.clientHeight),a=c)}return{from:o,to:Math.max(a,o+1)}}function ti(e,t){if(!be(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),i=null;if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!f){var o=$("div","​",null,"position: absolute;\n top: "+(t.top-r.viewOffset-Hr(e.display))+"px;\n height: "+(t.bottom-t.top+Wr(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function ri(e,t,r,n){var i;null==n&&(n=0),e.options.lineWrapping||t!=r||(r="before"==t.sticky?it(t.line,t.ch+1,"before"):t,t=t.ch?it(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var a=!1,s=bn(e,t),c=r&&r!=t?bn(e,r):s,l=ii(e,i={left:Math.min(s.left,c.left),top:Math.min(s.top,c.top)-n,right:Math.max(s.left,c.left),bottom:Math.max(s.bottom,c.bottom)+n}),u=e.doc.scrollTop,p=e.doc.scrollLeft;if(null!=l.scrollTop&&(pi(e,l.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=l.scrollLeft&&(mi(e,l.scrollLeft),Math.abs(e.doc.scrollLeft-p)>1&&(a=!0)),!a)break}return i}function ni(e,t){var r=ii(e,t);null!=r.scrollTop&&pi(e,r.scrollTop),null!=r.scrollLeft&&mi(e,r.scrollLeft)}function ii(e,t){var r=e.display,n=Tn(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=Vr(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+Ur(r),c=t.top<n,l=t.bottom>s-n;if(t.top<i)a.scrollTop=c?0:t.top;else if(t.bottom>i+o){var u=Math.min(t.top,(l?s:t.bottom)-o);u!=i&&(a.scrollTop=u)}var p=e.options.fixedGutter?0:r.gutters.offsetWidth,d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft-p,m=Xr(e)-r.gutters.offsetWidth,f=t.right-t.left>m;return f&&(t.right=t.left+m),t.left<10?a.scrollLeft=0:t.left<d?a.scrollLeft=Math.max(0,t.left+p-(f?0:10)):t.right>m+d-3&&(a.scrollLeft=t.right+(f?0:10)-m),a}function oi(e,t){null!=t&&(li(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function ai(e){li(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function si(e,t,r){null==t&&null==r||li(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function ci(e,t){li(e),e.curOp.scrollToPos=t}function li(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,ui(e,yn(e,t.from),yn(e,t.to),t.margin))}function ui(e,t,r,n){var i=ii(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});si(e,i.scrollLeft,i.scrollTop)}function pi(e,t){Math.abs(e.doc.scrollTop-t)<2||(r||qi(e,{top:t}),di(e,t,!0),r&&qi(e),Ii(e,100))}function di(e,t,r){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function mi(e,t,r,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,Wi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function fi(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+Ur(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+Wr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var hi=function(e,t,r){this.cm=r;var n=this.vert=$("div",[$("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=$("div",[$("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),fe(n,"scroll",(function(){n.clientHeight&&t(n.scrollTop,"vertical")})),fe(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};hi.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},hi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},hi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},hi.prototype.zeroWidthHack=function(){var e=b&&!m?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new F,this.disableVert=new F},hi.prototype.enableZeroWidthBar=function(e,t,r){function n(){var i=e.getBoundingClientRect();("vert"==r?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,n)}e.style.pointerEvents="auto",t.set(1e3,n)},hi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var gi=function(){};function vi(e,t){t||(t=fi(e));var r=e.display.barWidth,n=e.display.barHeight;bi(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&Zn(e),bi(e,fi(e)),r=e.display.barWidth,n=e.display.barHeight}function bi(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}gi.prototype.update=function(){return{bottom:0,right:0}},gi.prototype.setScrollLeft=function(){},gi.prototype.setScrollTop=function(){},gi.prototype.clear=function(){};var yi={native:hi,null:gi};function xi(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&A(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new yi[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),fe(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,r){"horizontal"==r?mi(e,t):pi(e,t)}),e),e.display.scrollbars.addClass&&L(e.display.wrapper,e.display.scrollbars.addClass)}var wi=0;function ki(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++wi,markArrays:null},Cr(e.curOp)}function Ci(e){var t=e.curOp;t&&Sr(t,(function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;zi(e)}))}function zi(e){for(var t=e.ops,r=0;r<t.length;r++)Si(t[r]);for(var n=0;n<t.length;n++)Ai(t[n]);for(var i=0;i<t.length;i++)Di(t[i]);for(var o=0;o<t.length;o++)Ti(t[o]);for(var a=0;a<t.length;a++)$i(t[a])}function Si(e){var t=e.cm,r=t.display;Pi(t),e.updateMaxLine&&ar(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Bi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Ai(e){e.updatedDisplay=e.mustUpdate&&Ri(e.cm,e.update)}function Di(e){var t=e.cm,r=t.display;e.updatedDisplay&&Zn(t),e.barMeasure=fi(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Zr(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Wr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Xr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function Ti(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&mi(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==M();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&vi(t,e.barMeasure),e.updatedDisplay&&Gi(t,e.barMeasure),e.selectionChanged&&Xn(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&Vn(e.cm)}function $i(e){var t=e.cm,r=t.display,n=t.doc;e.updatedDisplay&&Ni(t,e.update),null==r.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(r.wheelStartX=r.wheelStartY=null),null!=e.scrollTop&&di(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&mi(t,e.scrollLeft,!0,!0),e.scrollToPos&&ti(t,ri(t,pt(n,e.scrollToPos.from),pt(n,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var a=0;a<i.length;++a)i[a].lines.length||ve(i[a],"hide");if(o)for(var s=0;s<o.length;++s)o[s].lines.length&&ve(o[s],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ve(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function _i(e,t){if(e.curOp)return t();ki(e);try{return t()}finally{Ci(e)}}function Ei(e,t){return function(){if(e.curOp)return t.apply(e,arguments);ki(e);try{return t.apply(e,arguments)}finally{Ci(e)}}}function Mi(e){return function(){if(this.curOp)return e.apply(this,arguments);ki(this);try{return e.apply(this,arguments)}finally{Ci(this)}}}function Li(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);ki(t);try{return e.apply(this,arguments)}finally{Ci(t)}}}function Ii(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,B(Oi,e))}function Oi(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=bt(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(n.line>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength?We(t.mode,n.state):null,c=gt(e,o,n,!0);s&&(n.state=s),o.styles=c.styles;var l=o.styleClasses,u=c.classes;u?o.styleClasses=u:l&&(o.styleClasses=null);for(var p=!a||a.length!=o.styles.length||l!=u&&(!l||!u||l.bgClass!=u.bgClass||l.textClass!=u.textClass),d=0;!p&&d<a.length;++d)p=a[d]!=o.styles[d];p&&i.push(n.line),o.stateAfter=n.save(),n.nextLine()}else o.text.length<=e.options.maxHighlightLength&&yt(e,o.text,n),o.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return Ii(e,e.options.workDelay),!0})),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&_i(e,(function(){for(var t=0;t<i.length;t++)Pn(e,i[t],"text")}))}}var Bi=function(e,t,r){var n=e.display;this.viewport=t,this.visible=ei(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Xr(e),this.force=r,this.dims=_n(e),this.events=[]};function Pi(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Wr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Wr(e)+"px",t.scrollbarsClipped=!0)}function ji(e){if(e.hasFocus())return null;var t=M();if(!t||!E(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&E(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}function Fi(e){if(e&&e.activeElt&&e.activeElt!=M()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&E(document.body,e.anchorNode)&&E(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}function Ri(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return jn(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==Nn(e))return!1;Xi(e)&&(jn(e),t.dims=_n(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFrom<o&&o-r.viewFrom<20&&(o=Math.max(n.first,r.viewFrom)),r.viewTo>a&&r.viewTo-a<20&&(a=Math.min(i,r.viewTo)),$t&&(o=er(e.doc,o),a=tr(e.doc,a));var s=o!=r.viewFrom||a!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;Rn(e,o,a),r.viewOffset=ir(Ke(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var c=Nn(e);if(!s&&0==c&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var l=ji(e);return c>4&&(r.lineDiv.style.display="none"),Hi(e,r.updateLineNumbers,t.dims),c>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,Fi(l),D(r.cursorDiv),D(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,s&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,Ii(e,400)),r.updateLineNumbers=null,!0}function Ni(e,t){for(var r=t.viewport,n=!0;;n=!1){if(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Xr(e))n&&(t.visible=ei(e.display,e.doc,r));else if(r&&null!=r.top&&(r={top:Math.min(e.doc.height+Ur(e.display)-Vr(e),r.top)}),t.visible=ei(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!Ri(e,t))break;Zn(e);var i=fi(e);qn(e),vi(e,i),Gi(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function qi(e,t){var r=new Bi(e,t);if(Ri(e,r)){Zn(e),Ni(e,r);var n=fi(e);qn(e),vi(e,n),Gi(e,n),r.finish()}}function Hi(e,t,r){var n=e.display,i=e.options.lineNumbers,o=n.lineDiv,a=o.firstChild;function s(t){var r=t.nextSibling;return c&&b&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var l=n.view,u=n.viewFrom,p=0;p<l.length;p++){var d=l[p];if(d.hidden);else if(d.node&&d.node.parentNode==o){for(;a!=d.node;)a=s(a);var m=i&&null!=t&&t<=u&&d.lineNumber;d.changes&&(R(d.changes,"gutter")>-1&&(m=!1),$r(e,d,u,r)),m&&(D(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(nt(e.options,u)))),a=d.node.nextSibling}else{var f=Pr(e,d,u,r);o.insertBefore(f,a)}u+=d.size}for(;a;)a=s(a)}function Ui(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",Dr(e,"gutterChanged",e)}function Gi(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Wr(e)+"px"}function Wi(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=En(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",a=0;a<r.length;a++)if(!r[a].hidden){e.options.fixedGutter&&(r[a].gutter&&(r[a].gutter.style.left=o),r[a].gutterBackground&&(r[a].gutterBackground.style.left=o));var s=r[a].alignable;if(s)for(var c=0;c<s.length;c++)s[c].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}}function Xi(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=nt(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild($("div",[$("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(o,n.lineGutter.offsetWidth-a)+1,n.lineNumWidth=n.lineNumInnerWidth+a,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",Ui(e.display),!0}return!1}function Vi(e,t){for(var r=[],n=!1,i=0;i<e.length;i++){var o=e[i],a=null;if("string"!=typeof o&&(a=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!t)continue;n=!0}r.push({className:o,style:a})}return t&&!n&&r.push({className:"CodeMirror-linenumbers",style:null}),r}function Yi(e){var t=e.gutters,r=e.gutterSpecs;D(t),e.lineGutter=null;for(var n=0;n<r.length;++n){var i=r[n],o=i.className,a=i.style,s=t.appendChild($("div",null,"CodeMirror-gutter "+o));a&&(s.style.cssText=a),"CodeMirror-linenumbers"==o&&(e.lineGutter=s,s.style.width=(e.lineNumWidth||1)+"px")}t.style.display=r.length?"":"none",Ui(e)}function Ki(e){Yi(e.display),Bn(e),Wi(e)}function Ji(e,t,n,i){var o=this;this.input=n,o.scrollbarFiller=$("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=$("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=_("div",null,"CodeMirror-code"),o.selectionDiv=$("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=$("div",null,"CodeMirror-cursors"),o.measure=$("div",null,"CodeMirror-measure"),o.lineMeasure=$("div",null,"CodeMirror-measure"),o.lineSpace=_("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var l=_("div",[o.lineSpace],"CodeMirror-lines");o.mover=$("div",[l],null,"position: relative"),o.sizer=$("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=$("div",null,null,"position: absolute; height: "+N+"px; width: 1px;"),o.gutters=$("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=$("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=$("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),o.wrapper.setAttribute("translate","no"),a&&s<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),c||r&&v||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,o.gutterSpecs=Vi(i.gutters,i.lineNumbers),Yi(o),n.init(o)}Bi.prototype.signal=function(e,t){xe(e,t)&&this.events.push(arguments)},Bi.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ve.apply(null,this.events[e])};var Zi=0,Qi=null;function eo(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==r&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:null==r&&(r=e.wheelDelta),{x:t,y:r}}function to(e){var t=eo(e);return t.x*=Qi,t.y*=Qi,t}function ro(e,t){var n=eo(t),i=n.x,o=n.y,a=Qi;0===t.deltaMode&&(i=t.deltaX,o=t.deltaY,a=1);var s=e.display,l=s.scroller,u=l.scrollWidth>l.clientWidth,d=l.scrollHeight>l.clientHeight;if(i&&u||o&&d){if(o&&b&&c)e:for(var m=t.target,f=s.view;m!=l;m=m.parentNode)for(var h=0;h<f.length;h++)if(f[h].node==m){e.display.currentWheelTarget=m;break e}if(i&&!r&&!p&&null!=a)return o&&d&&pi(e,Math.max(0,l.scrollTop+o*a)),mi(e,Math.max(0,l.scrollLeft+i*a)),(!o||o&&d)&&ke(t),void(s.wheelStartX=null);if(o&&null!=a){var g=o*a,v=e.doc.scrollTop,y=v+s.wrapper.clientHeight;g<0?v=Math.max(0,v+g-50):y=Math.min(e.doc.height,y+g+50),qi(e,{top:v,bottom:y})}Zi<20&&0!==t.deltaMode&&(null==s.wheelStartX?(s.wheelStartX=l.scrollLeft,s.wheelStartY=l.scrollTop,s.wheelDX=i,s.wheelDY=o,setTimeout((function(){if(null!=s.wheelStartX){var e=l.scrollLeft-s.wheelStartX,t=l.scrollTop-s.wheelStartY,r=t&&s.wheelDY&&t/s.wheelDY||e&&s.wheelDX&&e/s.wheelDX;s.wheelStartX=s.wheelStartY=null,r&&(Qi=(Qi*Zi+r)/(Zi+1),++Zi)}}),200)):(s.wheelDX+=i,s.wheelDY+=o))}}a?Qi=-.53:r?Qi=15:u?Qi=-.7:d&&(Qi=-1/3);var no=function(e,t){this.ranges=e,this.primIndex=t};no.prototype.primary=function(){return this.ranges[this.primIndex]},no.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(!at(r.anchor,n.anchor)||!at(r.head,n.head))return!1}return!0},no.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new io(st(this.ranges[t].anchor),st(this.ranges[t].head));return new no(e,this.primIndex)},no.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},no.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(ot(t,n.from())>=0&&ot(e,n.to())<=0)return r}return-1};var io=function(e,t){this.anchor=e,this.head=t};function oo(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort((function(e,t){return ot(e.from(),t.from())})),r=R(t,i);for(var o=1;o<t.length;o++){var a=t[o],s=t[o-1],c=ot(s.to(),a.from());if(n&&!a.empty()?c>0:c>=0){var l=lt(s.from(),a.from()),u=ct(s.to(),a.to()),p=s.empty()?a.from()==a.head:s.from()==s.head;o<=r&&--r,t.splice(--o,2,new io(p?u:l,p?l:u))}}return new no(t,r)}function ao(e,t){return new no([new io(e,t||e)],0)}function so(e){return e.text?it(e.from.line+e.text.length-1,Y(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function co(e,t){if(ot(e,t.from)<0)return e;if(ot(e,t.to)<=0)return so(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=so(t).ch-t.to.ch),it(r,n)}function lo(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new io(co(i.anchor,t),co(i.head,t)))}return oo(e.cm,r,e.sel.primIndex)}function uo(e,t,r){return e.line==t.line?it(r.line,e.ch-t.ch+r.ch):it(r.line+(e.line-t.line),e.ch)}function po(e,t,r){for(var n=[],i=it(e.first,0),o=i,a=0;a<t.length;a++){var s=t[a],c=uo(s.from,i,o),l=uo(so(s),i,o);if(i=s.to,o=l,"around"==r){var u=e.sel.ranges[a],p=ot(u.head,u.anchor)<0;n[a]=new io(p?l:c,p?c:l)}else n[a]=new io(c,c)}return new no(n,e.sel.primIndex)}function mo(e){e.doc.mode=He(e.options,e.doc.modeOption),fo(e)}function fo(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Ii(e,100),e.state.modeGen++,e.curOp&&Bn(e)}function ho(e,t){return 0==t.from.ch&&0==t.to.ch&&""==Y(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function go(e,t,r,n){function i(e){return r?r[e]:null}function o(e,r,i){cr(e,r,i,n),Dr(e,"change",e,t)}function a(e,t){for(var r=[],o=e;o<t;++o)r.push(new sr(l[o],i(o),n));return r}var s=t.from,c=t.to,l=t.text,u=Ke(e,s.line),p=Ke(e,c.line),d=Y(l),m=i(l.length-1),f=c.line-s.line;if(t.full)e.insert(0,a(0,l.length)),e.remove(l.length,e.size-l.length);else if(ho(e,t)){var h=a(0,l.length-1);o(p,p.text,m),f&&e.remove(s.line,f),h.length&&e.insert(s.line,h)}else if(u==p)if(1==l.length)o(u,u.text.slice(0,s.ch)+d+u.text.slice(c.ch),m);else{var g=a(1,l.length-1);g.push(new sr(d+u.text.slice(c.ch),m,n)),o(u,u.text.slice(0,s.ch)+l[0],i(0)),e.insert(s.line+1,g)}else if(1==l.length)o(u,u.text.slice(0,s.ch)+l[0]+p.text.slice(c.ch),i(0)),e.remove(s.line+1,f);else{o(u,u.text.slice(0,s.ch)+l[0],i(0)),o(p,d+p.text.slice(c.ch),m);var v=a(1,l.length-1);f>1&&e.remove(s.line+1,f-1),e.insert(s.line+1,v)}Dr(e,"change",e,t)}function vo(e,t,r){function n(e,i,o){if(e.linked)for(var a=0;a<e.linked.length;++a){var s=e.linked[a];if(s.doc!=i){var c=o&&s.sharedHist;r&&!c||(t(s.doc,c),n(s.doc,e,c))}}}n(e,null,!0)}function bo(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Ln(e),mo(e),yo(e),e.options.direction=t.direction,e.options.lineWrapping||ar(e),e.options.mode=t.modeOption,Bn(e)}function yo(e){("rtl"==e.doc.direction?L:A)(e.display.lineDiv,"CodeMirror-rtl")}function xo(e){_i(e,(function(){yo(e),Bn(e)}))}function wo(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function ko(e,t){var r={from:st(t.from),to:so(t),text:Je(e,t.from,t.to)};return $o(e,r,t.from.line,t.to.line+1),vo(e,(function(e){return $o(e,r,t.from.line,t.to.line+1)}),!0),r}function Co(e){for(;e.length&&Y(e).ranges;)e.pop()}function zo(e,t){return t?(Co(e.done),Y(e.done)):e.done.length&&!Y(e.done).ranges?Y(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Y(e.done)):void 0}function So(e,t,r,n){var i=e.history;i.undone.length=0;var o,a,s=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=zo(i,i.lastOp==n)))a=Y(o.changes),0==ot(t.from,t.to)&&0==ot(t.from,a.to)?a.to=so(t):o.changes.push(ko(e,t));else{var c=Y(i.done);for(c&&c.ranges||To(e.sel,i.done),o={changes:[ko(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,a||ve(e,"historyAdded")}function Ao(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Do(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||Ao(e,o,Y(i.done),t))?i.done[i.done.length-1]=t:To(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&!1!==n.clearRedo&&Co(i.undone)}function To(e,t){var r=Y(t);r&&r.ranges&&r.equals(e)||t.push(e)}function $o(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),(function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o}))}function _o(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function Eo(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(_o(r[i]));return n}function Mo(e,t){var r=Eo(e,t),n=jt(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var o=r[i],a=n[i];if(o&&a)e:for(var s=0;s<a.length;++s){for(var c=a[s],l=0;l<o.length;++l)if(o[l].marker==c.marker)continue e;o.push(c)}else a&&(r[i]=a)}return r}function Lo(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)n.push(r?no.prototype.deepCopy.call(o):o);else{var a=o.changes,s=[];n.push({changes:s});for(var c=0;c<a.length;++c){var l=a[c],u=void 0;if(s.push({from:l.from,to:l.to,text:l.text}),t)for(var p in l)(u=p.match(/^spans_(\d+)$/))&&R(t,Number(u[1]))>-1&&(Y(s)[p]=l[p],delete l[p])}}}return n}function Io(e,t,r,n){if(n){var i=e.anchor;if(r){var o=ot(t,i)<0;o!=ot(r,i)<0?(i=t,t=r):o!=ot(t,r)<0&&(t=r)}return new io(i,t)}return new io(r||t,t)}function Oo(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),No(e,new no([Io(e.sel.primary(),t,r,i)],0),n)}function Bo(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)n[o]=Io(e.sel.ranges[o],t[o],null,i);No(e,oo(e.cm,n,e.sel.primIndex),r)}function Po(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,No(e,oo(e.cm,i,e.sel.primIndex),n)}function jo(e,t,r,n){No(e,ao(t,r),n)}function Fo(e,t,r){var n={ranges:t.ranges,update:function(t){this.ranges=[];for(var r=0;r<t.length;r++)this.ranges[r]=new io(pt(e,t[r].anchor),pt(e,t[r].head))},origin:r&&r.origin};return ve(e,"beforeSelectionChange",e,n),e.cm&&ve(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?oo(e.cm,n.ranges,n.ranges.length-1):t}function Ro(e,t,r){var n=e.history.done,i=Y(n);i&&i.ranges?(n[n.length-1]=t,qo(e,t,r)):No(e,t,r)}function No(e,t,r){qo(e,t,r),Do(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function qo(e,t,r){(xe(e,"beforeSelectionChange")||e.cm&&xe(e.cm,"beforeSelectionChange"))&&(t=Fo(e,t,r));var n=r&&r.bias||(ot(t.primary().head,e.sel.primary().head)<0?-1:1);Ho(e,Go(e,t,n,!0)),r&&!1===r.scroll||!e.cm||"nocursor"==e.cm.getOption("readOnly")||ai(e.cm)}function Ho(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,ye(e.cm)),Dr(e,"cursorActivity",e))}function Uo(e){Ho(e,Go(e,e.sel,null,!1))}function Go(e,t,r,n){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],c=Xo(e,a.anchor,s&&s.anchor,r,n),l=Xo(e,a.head,s&&s.head,r,n);(i||c!=a.anchor||l!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new io(c,l))}return i?oo(e.cm,i,t.primIndex):t}function Wo(e,t,r,n,i){var o=Ke(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var s=o.markedSpans[a],c=s.marker,l="selectLeft"in c?!c.selectLeft:c.inclusiveLeft,u="selectRight"in c?!c.selectRight:c.inclusiveRight;if((null==s.from||(l?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(u?s.to>=t.ch:s.to>t.ch))){if(i&&(ve(c,"beforeCursorEnter"),c.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!c.atomic)continue;if(r){var p=c.find(n<0?1:-1),d=void 0;if((n<0?u:l)&&(p=Vo(e,p,-n,p&&p.line==t.line?o:null)),p&&p.line==t.line&&(d=ot(p,r))&&(n<0?d<0:d>0))return Wo(e,p,t,n,i)}var m=c.find(n<0?-1:1);return(n<0?l:u)&&(m=Vo(e,m,n,m.line==t.line?o:null)),m?Wo(e,m,t,n,i):null}}return t}function Xo(e,t,r,n,i){var o=n||1,a=Wo(e,t,r,o,i)||!i&&Wo(e,t,r,o,!0)||Wo(e,t,r,-o,i)||!i&&Wo(e,t,r,-o,!0);return a||(e.cantEdit=!0,it(e.first,0))}function Vo(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?pt(e,it(t.line-1)):null:r>0&&t.ch==(n||Ke(e,t.line)).text.length?t.line<e.first+e.size-1?it(t.line+1,0):null:new it(t.line,t.ch+r)}function Yo(e){e.setSelection(it(e.firstLine(),0),it(e.lastLine()),H)}function Ko(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(t,r,i,o){t&&(n.from=pt(e,t)),r&&(n.to=pt(e,r)),i&&(n.text=i),void 0!==o&&(n.origin=o)}),ve(e,"beforeChange",e,n),e.cm&&ve(e.cm,"beforeChange",e.cm,n),n.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Jo(e,t,r){if(e.cm){if(!e.cm.curOp)return Ei(e.cm,Jo)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(xe(e,"beforeChange")||e.cm&&xe(e.cm,"beforeChange"))||(t=Ko(e,t,!0))){var n=Tt&&!r&&Rt(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)Zo(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else Zo(e,t)}}function Zo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=ot(t.from,t.to)){var r=lo(e,t);So(e,t,r,e.cm?e.cm.curOp.id:NaN),ta(e,t,r,jt(e,t));var n=[];vo(e,(function(e,r){r||-1!=R(n,e.history)||(aa(e.history,t),n.push(e.history)),ta(e,t,null,jt(e,t))}))}}function Qo(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(!n||r){for(var i,o=e.history,a=e.sel,s="undo"==t?o.done:o.undone,c="undo"==t?o.undone:o.done,l=0;l<s.length&&(i=s[l],r?!i.ranges||i.equals(e.sel):i.ranges);l++);if(l!=s.length){for(o.lastOrigin=o.lastSelOrigin=null;;){if(!(i=s.pop()).ranges){if(n)return void s.push(i);break}if(To(i,c),r&&!i.equals(e.sel))return void No(e,i,{clearRedo:!1});a=i}var u=[];To(a,c),c.push({changes:u,generation:o.generation}),o.generation=i.generation||++o.maxGeneration;for(var p=xe(e,"beforeChange")||e.cm&&xe(e.cm,"beforeChange"),d=function(r){var n=i.changes[r];if(n.origin=t,p&&!Ko(e,n,!1))return s.length=0,{};u.push(ko(e,n));var o=r?lo(e,n):Y(s);ta(e,n,o,Mo(e,n)),!r&&e.cm&&e.cm.scrollIntoView({from:n.from,to:so(n)});var a=[];vo(e,(function(e,t){t||-1!=R(a,e.history)||(aa(e.history,n),a.push(e.history)),ta(e,n,null,Mo(e,n))}))},m=i.changes.length-1;m>=0;--m){var f=d(m);if(f)return f.v}}}}function ea(e,t){if(0!=t&&(e.first+=t,e.sel=new no(K(e.sel.ranges,(function(e){return new io(it(e.anchor.line+t,e.anchor.ch),it(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){Bn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)Pn(e.cm,n,"gutter")}}function ta(e,t,r,n){if(e.cm&&!e.cm.curOp)return Ei(e.cm,ta)(e,t,r,n);if(t.to.line<e.first)ea(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);ea(e,i),t={from:it(e.first,0),to:it(t.to.line+i,t.to.ch),text:[Y(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:it(o,Ke(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Je(e,t.from,t.to),r||(r=lo(e,t)),e.cm?ra(e.cm,t,n):go(e,t,n),qo(e,r,H),e.cantEdit&&Xo(e,it(e.firstLine(),0))&&(e.cantEdit=!1)}}function ra(e,t,r){var n=e.doc,i=e.display,o=t.from,a=t.to,s=!1,c=o.line;e.options.lineWrapping||(c=et(Jt(Ke(n,o.line))),n.iter(c,a.line+1,(function(e){if(e==i.maxLine)return s=!0,!0}))),n.sel.contains(t.from,t.to)>-1&&ye(e),go(n,t,r,Mn(e)),e.options.lineWrapping||(n.iter(c,o.line+t.text.length,(function(e){var t=or(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),Dt(n,o.line),Ii(e,400);var l=t.text.length-(a.line-o.line)-1;t.full?Bn(e):o.line!=a.line||1!=t.text.length||ho(e.doc,t)?Bn(e,o.line,a.line+1,l):Pn(e,o.line,"text");var u=xe(e,"changes"),p=xe(e,"change");if(p||u){var d={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};p&&Dr(e,"change",e,d),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(d)}e.display.selForContextMenu=null}function na(e,t,r,n,i){var o;n||(n=r),ot(n,r)<0&&(r=(o=[n,r])[0],n=o[1]),"string"==typeof t&&(t=e.splitLines(t)),Jo(e,{from:r,to:n,text:t,origin:i})}function ia(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function oa(e,t,r,n){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var s=0;s<o.ranges.length;s++)ia(o.ranges[s].anchor,t,r,n),ia(o.ranges[s].head,t,r,n)}else{for(var c=0;c<o.changes.length;++c){var l=o.changes[c];if(r<l.from.line)l.from=it(l.from.line+n,l.from.ch),l.to=it(l.to.line+n,l.to.ch);else if(t<=l.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}}function aa(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;oa(e.done,r,n,i),oa(e.undone,r,n,i)}function sa(e,t,r,n){var i=t,o=t;return"number"==typeof t?o=Ke(e,ut(e,t)):i=et(t),null==i?null:(n(o,i)&&e.cm&&Pn(e.cm,i,r),o)}function ca(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}function la(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n];t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,this.parent=null}io.prototype.from=function(){return lt(this.anchor,this.head)},io.prototype.to=function(){return ct(this.anchor,this.head)},io.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},ca.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var i=this.lines[r];this.height-=i.height,lr(i),Dr(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}},la.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(e<i){var o=Math.min(t,i-e),a=n.height;if(n.removeInner(e,o),this.height-=a-n.height,i==o&&(this.children.splice(r--,1),n.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof ca))){var s=[];this.collapse(s),this.children=[new ca(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,r),i.lines&&i.lines.length>50){for(var a=i.lines.length%25+25,s=a;s<i.lines.length;){var c=new ca(i.lines.slice(s,s+=25));i.height-=c.height,this.children.splice(++n,0,c),c.parent=this}i.lines=i.lines.slice(0,a),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new la(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var r=R(e.parent.children,e);e.parent.children.splice(r+1,0,t)}else{var n=new la(e.children);n.parent=e,e.children=[n,t],e=n}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,r))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var ua=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};function pa(e,t,r){ir(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&oi(e,r)}function da(e,t,r,n){var i=new ua(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),sa(e,t,"widget",(function(t){var r=t.widgets||(t.widgets=[]);if(null==i.insertAt?r.push(i):r.splice(Math.min(r.length,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!rr(e,t)){var n=ir(t)<e.scrollTop;Qe(t,t.height+Nr(i)),n&&oi(o,i.height),o.curOp.forceUpdate=!0}return!0})),o&&Dr(o,"lineWidgetAdded",o,i,"number"==typeof t?t:et(t)),i}ua.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=et(r);if(null!=n&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(r.widgets=null);var o=Nr(this);Qe(r,Math.max(0,r.height-o)),e&&(_i(e,(function(){pa(e,r,-o),Pn(e,n,"widget")})),Dr(e,"lineWidgetCleared",e,this,n))}},ua.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=Nr(this)-t;i&&(rr(this.doc,n)||Qe(n,n.height+i),r&&_i(r,(function(){r.curOp.forceUpdate=!0,pa(r,n,i),Dr(r,"lineWidgetChanged",r,e,et(n))})))},we(ua);var ma=0,fa=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ma};function ha(e,t,r,n,i){if(n&&n.shared)return va(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return Ei(e.cm,ha)(e,t,r,n,i);var o=new fa(e,i),a=ot(t,r);if(n&&P(n,o,!1),a>0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=_("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Kt(e,t.line,t,r,o)||t.line!=r.line&&Kt(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Et()}o.addToHistory&&So(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var s,c=t.line,l=e.cm;if(e.iter(c,r.line+1,(function(n){l&&o.collapsed&&!l.options.lineWrapping&&Jt(n)==l.display.maxLine&&(s=!0),o.collapsed&&c!=t.line&&Qe(n,0),Ot(n,new Mt(o,c==t.line?t.ch:null,c==r.line?r.ch:null),e.cm&&e.cm.curOp),++c})),o.collapsed&&e.iter(t.line,r.line+1,(function(t){rr(e,t)&&Qe(t,0)})),o.clearOnEnter&&fe(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(_t(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ma,o.atomic=!0),l){if(s&&(l.curOp.updateMaxLine=!0),o.collapsed)Bn(l,t.line,r.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=t.line;u<=r.line;u++)Pn(l,u,"text");o.atomic&&Uo(l.doc),Dr(l,"markerAdded",l,o)}return o}fa.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&ki(e),xe(this,"clear")){var r=this.find();r&&Dr(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],s=Lt(a.markedSpans,this);e&&!this.collapsed?Pn(e,et(a),"text"):e&&(null!=s.to&&(i=et(a)),null!=s.from&&(n=et(a))),a.markedSpans=It(a.markedSpans,s),null==s.from&&this.collapsed&&!rr(this.doc,a)&&e&&Qe(a,Tn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var c=0;c<this.lines.length;++c){var l=Jt(this.lines[c]),u=or(l);u>e.display.maxLineLength&&(e.display.maxLine=l,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&Bn(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Uo(e.doc)),e&&Dr(e,"markerCleared",e,this,n,i),t&&Ci(e),this.parent&&this.parent.clear()}},fa.prototype.find=function(e,t){var r,n;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],a=Lt(o.markedSpans,this);if(null!=a.from&&(r=it(t?o:et(o),a.from),-1==e))return r;if(null!=a.to&&(n=it(t?o:et(o),a.to),1==e))return n}return r&&{from:r,to:n}},fa.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;t&&n&&_i(n,(function(){var i=t.line,o=et(t.line),a=Qr(n,o);if(a&&(ln(a),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!rr(r.doc,i)&&null!=r.height){var s=r.height;r.height=null;var c=Nr(r)-s;c&&Qe(i,i.height+c)}Dr(n,"markerChanged",n,e)}))},fa.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=R(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},fa.prototype.detachLine=function(e){if(this.lines.splice(R(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},we(fa);var ga=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};function va(e,t,r,n,i){(n=P(n)).shared=!1;var o=[ha(e,t,r,n,i)],a=o[0],s=n.widgetNode;return vo(e,(function(e){s&&(n.widgetNode=s.cloneNode(!0)),o.push(ha(e,pt(e,t),pt(e,r),n,i));for(var c=0;c<e.linked.length;++c)if(e.linked[c].isParent)return;a=Y(o)})),new ga(o,a)}function ba(e){return e.findMarks(it(e.first,0),e.clipPos(it(e.lastLine())),(function(e){return e.parent}))}function ya(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(ot(o,a)){var s=ha(e,o,a,n.primary,n.primary.type);n.markers.push(s),s.parent=n}}}function xa(e){for(var t=function(t){var r=e[t],n=[r.primary.doc];vo(r.primary.doc,(function(e){return n.push(e)}));for(var i=0;i<r.markers.length;i++){var o=r.markers[i];-1==R(n,o.doc)&&(o.parent=null,r.markers.splice(i--,1))}},r=0;r<e.length;r++)t(r)}ga.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Dr(this,"clear")}},ga.prototype.find=function(e,t){return this.primary.find(e,t)},we(ga);var wa=0,ka=function(e,t,r,n,i){if(!(this instanceof ka))return new ka(e,t,r,n,i);null==r&&(r=0),la.call(this,[new ca([new sr("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=it(r,0);this.sel=ao(o),this.history=new wo(null),this.id=++wa,this.modeOption=t,this.lineSep=n,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),go(this,{from:o,to:o,text:e}),No(this,ao(o),H)};ka.prototype=Q(la.prototype,{constructor:ka,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Ze(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:Li((function(e){var t=it(this.first,0),r=this.first+this.size-1;Jo(this,{from:t,to:it(r,Ke(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&si(this.cm,0,0),No(this,ao(t),H)})),replaceRange:function(e,t,r,n){na(this,e,t=pt(this,t),r=r?pt(this,r):t,n)},getRange:function(e,t,r){var n=Je(this,pt(this,e),pt(this,t));return!1===r?n:""===r?n.join(""):n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(rt(this,e))return Ke(this,e)},getLineNumber:function(e){return et(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Ke(this,e)),Jt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return pt(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Li((function(e,t,r){jo(this,pt(this,"number"==typeof e?it(e,t||0):e),null,r)})),setSelection:Li((function(e,t,r){jo(this,pt(this,e),pt(this,t||e),r)})),extendSelection:Li((function(e,t,r){Oo(this,pt(this,e),t&&pt(this,t),r)})),extendSelections:Li((function(e,t){Bo(this,mt(this,e),t)})),extendSelectionsBy:Li((function(e,t){Bo(this,mt(this,K(this.sel.ranges,e)),t)})),setSelections:Li((function(e,t,r){if(e.length){for(var n=[],i=0;i<e.length;i++)n[i]=new io(pt(this,e[i].anchor),pt(this,e[i].head||e[i].anchor));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),No(this,oo(this.cm,n,t),r)}})),addSelection:Li((function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new io(pt(this,e),pt(this,t||e))),No(this,oo(this.cm,n,n.length-1),r)})),getSelection:function(e){for(var t,r=this.sel.ranges,n=0;n<r.length;n++){var i=Je(this,r[n].from(),r[n].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var i=Je(this,r[n].from(),r[n].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[n]=i}return t},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:Li((function(e,t,r){for(var n=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];n[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:r}}for(var s=t&&"end"!=t&&po(this,n,t),c=n.length-1;c>=0;c--)Jo(this,n[c]);s?Ro(this,s):this.cm&&ai(this.cm)})),undo:Li((function(){Qo(this,"undo")})),redo:Li((function(){Qo(this,"redo")})),undoSelection:Li((function(){Qo(this,"undo",!0)})),redoSelection:Li((function(){Qo(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){var e=this;this.history=new wo(this.history),vo(this,(function(t){return t.history=e.history}),!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Lo(this.history.done),undone:Lo(this.history.undone)}},setHistory:function(e){var t=this.history=new wo(this.history);t.done=Lo(e.done.slice(0),null,!0),t.undone=Lo(e.undone.slice(0),null,!0)},setGutterMarker:Li((function(e,t,r){return sa(this,e,"gutter",(function(e){var n=e.gutterMarkers||(e.gutterMarkers={});return n[t]=r,!r&&ne(n)&&(e.gutterMarkers=null),!0}))})),clearGutter:Li((function(e){var t=this;this.iter((function(r){r.gutterMarkers&&r.gutterMarkers[e]&&sa(t,r,"gutter",(function(){return r.gutterMarkers[e]=null,ne(r.gutterMarkers)&&(r.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!rt(this,e))return null;if(t=e,!(e=Ke(this,e)))return null}else if(null==(t=et(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Li((function(e,t,r){return sa(this,e,"gutter"==t?"gutter":"class",(function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[n]){if(z(r).test(e[n]))return!1;e[n]+=" "+r}else e[n]=r;return!0}))})),removeLineClass:Li((function(e,t,r){return sa(this,e,"gutter"==t?"gutter":"class",(function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[n];if(!i)return!1;if(null==r)e[n]=null;else{var o=i.match(z(r));if(!o)return!1;var a=o.index+o[0].length;e[n]=i.slice(0,o.index)+(o.index&&a!=i.length?" ":"")+i.slice(a)||null}return!0}))})),addLineWidget:Li((function(e,t,r){return da(this,e,t,r)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return ha(this,pt(this,e),pt(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return ha(this,e=pt(this,e),e,r,"bookmark")},findMarksAt:function(e){var t=[],r=Ke(this,(e=pt(this,e)).line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=pt(this,e),t=pt(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var a=o.markedSpans;if(a)for(var s=0;s<a.length;s++){var c=a[s];null!=c.to&&i==e.line&&e.ch>=c.to||null==c.from&&i!=e.line||null!=c.from&&i==t.line&&c.from>=t.ch||r&&!r(c.marker)||n.push(c.marker.parent||c.marker)}++i})),n},getAllMarks:function(){var e=[];return this.iter((function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)null!=r[n].from&&e.push(r[n].marker)})),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter((function(i){var o=i.text.length+n;if(o>e)return t=e,!0;e-=o,++r})),pt(this,it(r,t))},indexFromPos:function(e){var t=(e=pt(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+r})),t},copy:function(e){var t=new ka(Ze(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<r&&(r=e.to);var n=new ka(Ze(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],ya(n,ba(this)),n},unlinkDoc:function(e){if(e instanceof Bs&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),xa(ba(this));break}if(e.history==this.history){var r=[e.id];vo(e,(function(e){return r.push(e.id)}),!0),e.history=new wo(null),e.history.done=Lo(this.history.done,r),e.history.undone=Lo(this.history.undone,r)}},iterLinkedDocs:function(e){vo(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Le(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:Li((function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&xo(this.cm))}))}),ka.prototype.eachLine=ka.prototype.iter;var Ca=0;function za(e){var t=this;if(Da(t),!be(t,e)&&!qr(t.display,e)){ke(e),a&&(Ca=+new Date);var r=In(t,e,!0),n=e.dataTransfer.files;if(r&&!t.isReadOnly())if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),s=0,c=function(){++s==i&&Ei(t,(function(){var e={from:r=pt(t.doc,r),to:r,text:t.doc.splitLines(o.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};Jo(t.doc,e),Ro(t.doc,ao(pt(t.doc,r),pt(t.doc,so(e))))}))()},l=function(e,r){if(t.options.allowDropFileTypes&&-1==R(t.options.allowDropFileTypes,e.type))c();else{var n=new FileReader;n.onerror=function(){return c()},n.onload=function(){var e=n.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(o[r]=e),c()},n.readAsText(e)}},u=0;u<n.length;u++)l(n[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var p=e.dataTransfer.getData("Text");if(p){var d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),qo(t.doc,ao(r,r)),d)for(var m=0;m<d.length;++m)na(t.doc,"",d[m].anchor,d[m].head,"drag");t.replaceSelection(p,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Sa(e,t){if(a&&(!e.state.draggingText||+new Date-Ca<100))Se(t);else if(!be(e,t)&&!qr(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!d)){var r=$("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",p&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),p&&r.parentNode.removeChild(r)}}function Aa(e,t){var r=In(e,t);if(r){var n=document.createDocumentFragment();Un(e,r,n),e.display.dragCursor||(e.display.dragCursor=$("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),T(e.display.dragCursor,n)}}function Da(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Ta(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),r=[],n=0;n<t.length;n++){var i=t[n].CodeMirror;i&&r.push(i)}r.length&&r[0].operation((function(){for(var t=0;t<r.length;t++)e(r[t])}))}}var $a=!1;function _a(){$a||(Ea(),$a=!0)}function Ea(){var e;fe(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Ta(Ma)}),100))})),fe(window,"blur",(function(){return Ta(Jn)}))}function Ma(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var La={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Ia=0;Ia<10;Ia++)La[Ia+48]=La[Ia+96]=String(Ia);for(var Oa=65;Oa<=90;Oa++)La[Oa]=String.fromCharCode(Oa);for(var Ba=1;Ba<=12;Ba++)La[Ba+111]=La[Ba+63235]="F"+Ba;var Pa={};function ja(e){var t,r,n,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(var a=0;a<o.length-1;a++){var s=o[a];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))r=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);n=!0}}return t&&(e="Alt-"+e),r&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),n&&(e="Shift-"+e),e}function Fa(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if("..."==n){delete e[r];continue}for(var i=K(r.split(" "),ja),o=0;o<i.length;o++){var a=void 0,s=void 0;o==i.length-1?(s=i.join(" "),a=n):(s=i.slice(0,o+1).join(" "),a="...");var c=t[s];if(c){if(c!=a)throw new Error("Inconsistent bindings for "+s)}else t[s]=a}delete e[r]}for(var l in t)e[l]=t[l];return e}function Ra(e,t,r,n){var i=(t=Ua(t)).call?t.call(e,n):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&r(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Ra(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var a=Ra(e,t.fallthrough[o],r,n);if(a)return a}}}function Na(e){var t="string"==typeof e?e:La[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function qa(e,t,r){var n=e;return t.altKey&&"Alt"!=n&&(e="Alt-"+e),(k?t.metaKey:t.ctrlKey)&&"Ctrl"!=n&&(e="Ctrl-"+e),(k?t.ctrlKey:t.metaKey)&&"Mod"!=n&&(e="Cmd-"+e),!r&&t.shiftKey&&"Shift"!=n&&(e="Shift-"+e),e}function Ha(e,t){if(p&&34==e.keyCode&&e.char)return!1;var r=La[e.keyCode];return null!=r&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(r=e.code),qa(r,e,t))}function Ua(e){return"string"==typeof e?Pa[e]:e}function Ga(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&ot(o.from,Y(n).to)<=0;){var a=n.pop();if(ot(a.from,o.from)<0){o.from=a.from;break}}n.push(o)}_i(e,(function(){for(var t=n.length-1;t>=0;t--)na(e.doc,"",n[t].from,n[t].to,"+delete");ai(e)}))}function Wa(e,t,r){var n=ae(e.text,t+r,r);return n<0||n>e.text.length?null:n}function Xa(e,t,r){var n=Wa(e,t.ch,r);return null==n?null:new it(t.line,n,r<0?"after":"before")}function Va(e,t,r,n,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=de(r,t.doc.direction);if(o){var a,s=i<0?Y(o):o[0],c=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var l=en(t,r);a=i<0?r.text.length-1:0;var u=tn(t,l,a).top;a=se((function(e){return tn(t,l,e).top==u}),i<0==(1==s.level)?s.from:s.to-1,a),"before"==c&&(a=Wa(r,a,1))}else a=i<0?s.to:s.from;return new it(n,a,c)}}return new it(n,i<0?r.text.length:0,i<0?"before":"after")}function Ya(e,t,r,n){var i=de(t,e.doc.direction);if(!i)return Xa(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=ue(i,r.ch,r.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(n>0?a.to>r.ch:a.from<r.ch))return Xa(t,r,n);var s,c=function(e,r){return Wa(t,e instanceof it?e.ch:e,r)},l=function(r){return e.options.lineWrapping?(s=s||en(e,t),Cn(e,t,s,r)):{begin:0,end:t.text.length}},u=l("before"==r.sticky?c(r,-1):r.ch);if("rtl"==e.doc.direction||1==a.level){var p=1==a.level==n<0,d=c(r,p?1:-1);if(null!=d&&(p?d<=a.to&&d<=u.end:d>=a.from&&d>=u.begin)){var m=p?"before":"after";return new it(r.line,d,m)}}var f=function(e,t,n){for(var o=function(e,t){return t?new it(r.line,c(e,1),"before"):new it(r.line,e,"after")};e>=0&&e<i.length;e+=t){var a=i[e],s=t>0==(1!=a.level),l=s?n.begin:c(n.end,-1);if(a.from<=l&&l<a.to)return o(l,s);if(l=s?a.from:c(a.to,-1),n.begin<=l&&l<n.end)return o(l,s)}},h=f(o+n,n,u);if(h)return h;var g=n>0?u.end:c(u.begin,-1);return null==g||n>0&&g==t.text.length||!(h=f(n>0?0:i.length-1,n,l(g)))?null:h}Pa.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Pa.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Pa.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Pa.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Pa.default=b?Pa.macDefault:Pa.pcDefault;var Ka={selectAll:Yo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),H)},killLine:function(e){return Ga(e,(function(t){if(t.empty()){var r=Ke(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:it(t.head.line+1,0)}:{from:t.head,to:it(t.head.line,r)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return Ga(e,(function(t){return{from:it(t.from().line,0),to:pt(e.doc,it(t.to().line+1,0))}}))},delLineLeft:function(e){return Ga(e,(function(e){return{from:it(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return Ga(e,(function(t){var r=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:r},"div"),to:t.from()}}))},delWrappedLineRight:function(e){return Ga(e,(function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}}))},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(it(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(it(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return Ja(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return Qa(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return Za(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")}),G)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")}),G)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?Qa(e,t.head):n}),G)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var o=r[i].from(),a=j(e.getLine(o.line),o.ch,n);t.push(V(n-a%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return _i(e,(function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var i=t[n].head,o=Ke(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new it(i.line,i.ch-1)),i.ch>0)i=new it(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),it(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Ke(e.doc,i.line-1).text;a&&(i=new it(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),it(i.line-1,a.length-1),i,"+transpose"))}r.push(new io(i,i))}e.setSelections(r)}))},newlineAndIndent:function(e){return _i(e,(function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);ai(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Ja(e,t){var r=Ke(e.doc,t),n=Jt(r);return n!=r&&(t=et(n)),Va(!0,e,n,t,1)}function Za(e,t){var r=Ke(e.doc,t),n=Zt(r);return n!=r&&(t=et(n)),Va(!0,e,r,t,-1)}function Qa(e,t){var r=Ja(e,t.line),n=Ke(e.doc,r.line),i=de(n,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(r.ch,n.text.search(/\S/)),a=t.line==r.line&&t.ch<=o&&t.ch;return it(r.line,a?0:o,r.sticky)}return r}function es(e,t,r){if("string"==typeof t&&!(t=Ka[t]))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=q}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function ts(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=Ra(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Ra(t,e.options.extraKeys,r,e)||Ra(t,e.options.keyMap,r,e)}var rs=new F;function ns(e,t,r,n){var i=e.state.keySeq;if(i){if(Na(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:rs.set(50,(function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())})),is(e,i+" "+t,r,n))return!0}return is(e,t,r,n)}function is(e,t,r,n){var i=ts(e,t,n);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&Dr(e,"keyHandled",e,t,r),"handled"!=i&&"multi"!=i||(ke(r),Xn(e)),!!i}function os(e,t){var r=Ha(t,!0);return!!r&&(t.shiftKey&&!e.state.keySeq?ns(e,"Shift-"+r,t,(function(t){return es(e,t,!0)}))||ns(e,r,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return es(e,t)})):ns(e,r,t,(function(t){return es(e,t)})))}function as(e,t,r){return ns(e,"'"+r+"'",t,(function(t){return es(e,t,!0)}))}var ss=null;function cs(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=M(),be(t,e)))){a&&s<11&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var i=os(t,e);p&&(ss=i?n:null,i||88!=n||Oe||!(b?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),r&&!b&&!i&&46==n&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||ls(t)}}function ls(e){var t=e.display.lineDiv;function r(e){18!=e.keyCode&&e.altKey||(A(t,"CodeMirror-crosshair"),ge(document,"keyup",r),ge(document,"mouseover",r))}L(t,"CodeMirror-crosshair"),fe(document,"keyup",r),fe(document,"mouseover",r)}function us(e){16==e.keyCode&&(this.doc.sel.shift=!1),be(this,e)}function ps(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||qr(t.display,e)||be(t,e)||e.ctrlKey&&!e.altKey||b&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(p&&r==ss)return ss=null,void ke(e);if(!p||e.which&&!(e.which<10)||!os(t,e)){var i=String.fromCharCode(null==n?r:n);"\b"!=i&&(as(t,e,i)||t.display.input.onKeyPress(e))}}}var ds,ms,fs=400,hs=function(e,t,r){this.time=e,this.pos=t,this.button=r};function gs(e,t){var r=+new Date;return ms&&ms.compare(r,e,t)?(ds=ms=null,"triple"):ds&&ds.compare(r,e,t)?(ms=new hs(r,e,t),ds=null,"double"):(ds=new hs(r,e,t),ms=null,"single")}function vs(e){var t=this,r=t.display;if(!(be(t,e)||r.activeTouch&&r.input.supportsTouch()))if(r.input.ensurePolled(),r.shift=e.shiftKey,qr(r,e))c||(r.scroller.draggable=!1,setTimeout((function(){return r.scroller.draggable=!0}),100));else if(!As(t,e)){var n=In(t,e),i=De(e),o=n?gs(n,i):"single";window.focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),n&&bs(t,i,n,o,e)||(1==i?n?xs(t,n,o,e):Ae(e)==r.scroller&&ke(e):2==i?(n&&Oo(t.doc,n),setTimeout((function(){return r.input.focus()}),20)):3==i&&(C?t.display.input.onContextMenu(e):Yn(t)))}}function bs(e,t,r,n,i){var o="Click";return"double"==n?o="Double"+o:"triple"==n&&(o="Triple"+o),ns(e,qa(o=(1==t?"Left":2==t?"Middle":"Right")+o,i),i,(function(t){if("string"==typeof t&&(t=Ka[t]),!t)return!1;var n=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n=t(e,r)!=q}finally{e.state.suppressEdits=!1}return n}))}function ys(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(null==i.unit){var o=y?r.shiftKey&&r.metaKey:r.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey),null==i.addNew&&(i.addNew=b?r.metaKey:r.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(b?r.altKey:r.ctrlKey)),i}function xs(e,t,r,n){a?setTimeout(B(Vn,e),0):e.curOp.focus=M();var i,o=ys(e,r,n),s=e.doc.sel;e.options.dragDrop&&_e&&!e.isReadOnly()&&"single"==r&&(i=s.contains(t))>-1&&(ot((i=s.ranges[i]).from(),t)<0||t.xRel>0)&&(ot(i.to(),t)>0||t.xRel<0)?ws(e,n,t,o):Cs(e,n,t,o)}function ws(e,t,r,n){var i=e.display,o=!1,l=Ei(e,(function(t){c&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Yn(e)),ge(i.wrapper.ownerDocument,"mouseup",l),ge(i.wrapper.ownerDocument,"mousemove",u),ge(i.scroller,"dragstart",p),ge(i.scroller,"drop",l),o||(ke(t),n.addNew||Oo(e.doc,r,null,null,n.extend),c&&!d||a&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),u=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},p=function(){return o=!0};c&&(i.scroller.draggable=!0),e.state.draggingText=l,l.copy=!n.moveOnDrag,fe(i.wrapper.ownerDocument,"mouseup",l),fe(i.wrapper.ownerDocument,"mousemove",u),fe(i.scroller,"dragstart",p),fe(i.scroller,"drop",l),e.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}function ks(e,t,r){if("char"==r)return new io(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new io(it(t.line,0),pt(e.doc,it(t.line+1,0)));var n=r(e,t);return new io(n.from,n.to)}function Cs(e,t,r,n){a&&Yn(e);var i=e.display,o=e.doc;ke(t);var s,c,l=o.sel,u=l.ranges;if(n.addNew&&!n.extend?(c=o.sel.contains(r),s=c>-1?u[c]:new io(r,r)):(s=o.sel.primary(),c=o.sel.primIndex),"rectangle"==n.unit)n.addNew||(s=new io(r,r)),r=In(e,t,!0,!0),c=-1;else{var p=ks(e,r,n.unit);s=n.extend?Io(s,p.anchor,p.head,n.extend):p}n.addNew?-1==c?(c=u.length,No(o,oo(e,u.concat([s]),c),{scroll:!1,origin:"*mouse"})):u.length>1&&u[c].empty()&&"char"==n.unit&&!n.extend?(No(o,oo(e,u.slice(0,c).concat(u.slice(c+1)),0),{scroll:!1,origin:"*mouse"}),l=o.sel):Po(o,c,s,U):(c=0,No(o,new no([s],0),U),l=o.sel);var d=r;function m(t){if(0!=ot(d,t))if(d=t,"rectangle"==n.unit){for(var i=[],a=e.options.tabSize,u=j(Ke(o,r.line).text,r.ch,a),p=j(Ke(o,t.line).text,t.ch,a),m=Math.min(u,p),f=Math.max(u,p),h=Math.min(r.line,t.line),g=Math.min(e.lastLine(),Math.max(r.line,t.line));h<=g;h++){var v=Ke(o,h).text,b=W(v,m,a);m==f?i.push(new io(it(h,b),it(h,b))):v.length>b&&i.push(new io(it(h,b),it(h,W(v,f,a))))}i.length||i.push(new io(r,r)),No(o,oo(e,l.ranges.slice(0,c).concat(i),c),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var y,x=s,w=ks(e,t,n.unit),k=x.anchor;ot(w.anchor,k)>0?(y=w.head,k=lt(x.from(),w.anchor)):(y=w.anchor,k=ct(x.to(),w.head));var C=l.ranges.slice(0);C[c]=zs(e,new io(pt(o,k),y)),No(o,oo(e,C,c),U)}}var f=i.wrapper.getBoundingClientRect(),h=0;function g(t){var r=++h,a=In(e,t,!0,"rectangle"==n.unit);if(a)if(0!=ot(a,d)){e.curOp.focus=M(),m(a);var s=ei(i,o);(a.line>=s.to||a.line<s.from)&&setTimeout(Ei(e,(function(){h==r&&g(t)})),150)}else{var c=t.clientY<f.top?-20:t.clientY>f.bottom?20:0;c&&setTimeout(Ei(e,(function(){h==r&&(i.scroller.scrollTop+=c,g(t))})),50)}}function v(t){e.state.selectingText=!1,h=1/0,t&&(ke(t),i.input.focus()),ge(i.wrapper.ownerDocument,"mousemove",b),ge(i.wrapper.ownerDocument,"mouseup",y),o.history.lastSelOrigin=null}var b=Ei(e,(function(e){0!==e.buttons&&De(e)?g(e):v(e)})),y=Ei(e,v);e.state.selectingText=y,fe(i.wrapper.ownerDocument,"mousemove",b),fe(i.wrapper.ownerDocument,"mouseup",y)}function zs(e,t){var r=t.anchor,n=t.head,i=Ke(e.doc,r.line);if(0==ot(r,n)&&r.sticky==n.sticky)return t;var o=de(i);if(!o)return t;var a=ue(o,r.ch,r.sticky),s=o[a];if(s.from!=r.ch&&s.to!=r.ch)return t;var c,l=a+(s.from==r.ch==(1!=s.level)?0:1);if(0==l||l==o.length)return t;if(n.line!=r.line)c=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=ue(o,n.ch,n.sticky),p=u-a||(n.ch-r.ch)*(1==s.level?-1:1);c=u==l-1||u==l?p<0:p>0}var d=o[l+(c?-1:0)],m=c==(1==d.level),f=m?d.from:d.to,h=m?"after":"before";return r.ch==f&&r.sticky==h?t:new io(new it(r.line,f,h),n)}function Ss(e,t,r,n){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&ke(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!xe(e,r))return ze(t);o-=s.top-a.viewOffset;for(var c=0;c<e.display.gutterSpecs.length;++c){var l=a.gutters.childNodes[c];if(l&&l.getBoundingClientRect().right>=i)return ve(e,r,e,tt(e.doc,o),e.display.gutterSpecs[c].className,t),ze(t)}}function As(e,t){return Ss(e,t,"gutterClick",!0)}function Ds(e,t){qr(e.display,t)||Ts(e,t)||be(e,t,"contextmenu")||C||e.display.input.onContextMenu(t)}function Ts(e,t){return!!xe(e,"gutterContextMenu")&&Ss(e,t,"gutterContextMenu",!1)}function $s(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),pn(e)}hs.prototype.compare=function(e,t,r){return this.time+fs>e&&0==ot(t,this.pos)&&r==this.button};var _s={toString:function(){return"CodeMirror.Init"}},Es={},Ms={};function Ls(e){var t=e.optionHandlers;function r(r,n,i,o){e.defaults[r]=n,i&&(t[r]=o?function(e,t,r){r!=_s&&i(e,t,r)}:i)}e.defineOption=r,e.Init=_s,r("value","",(function(e,t){return e.setValue(t)}),!0),r("mode",null,(function(e,t){e.doc.modeOption=t,mo(e)}),!0),r("indentUnit",2,mo,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,(function(e){fo(e),pn(e),Bn(e)}),!0),r("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,r.push(it(n,o))}n++}));for(var i=r.length-1;i>=0;i--)na(e.doc,t,r[i],it(r[i].line,r[i].ch+t.length))}})),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=_s&&e.refresh()})),r("specialCharPlaceholder",fr,(function(e){return e.refresh()}),!0),r("electricChars",!0),r("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),r("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),r("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),r("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),r("rtlMoveVisually",!x),r("wholeLineUpdateBefore",!0),r("theme","default",(function(e){$s(e),Ki(e)}),!0),r("keyMap","default",(function(e,t,r){var n=Ua(t),i=r!=_s&&Ua(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)})),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Os,!0),r("gutters",[],(function(e,t){e.display.gutterSpecs=Vi(t,e.options.lineNumbers),Ki(e)}),!0),r("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?En(e.display)+"px":"0",e.refresh()}),!0),r("coverGutterNextToScrollbar",!1,(function(e){return vi(e)}),!0),r("scrollbarStyle","native",(function(e){xi(e),vi(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),r("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=Vi(e.options.gutters,t),Ki(e)}),!0),r("firstLineNumber",1,Ki,!0),r("lineNumberFormatter",(function(e){return e}),Ki,!0),r("showCursorWhenSelecting",!1,qn,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,(function(e,t){"nocursor"==t&&(Jn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),r("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),r("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),r("dragDrop",!0,Is),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,qn,!0),r("singleCursorHeightPerLine",!0,qn,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,fo,!0),r("addModeClass",!1,fo,!0),r("pollInterval",100),r("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),r("historyEventDelay",1250),r("viewportMargin",10,(function(e){return e.refresh()}),!0),r("maxHighlightLength",1e4,fo,!0),r("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),r("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),r("autofocus",null),r("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),r("phrases",null)}function Is(e,t,r){if(!t!=!(r&&r!=_s)){var n=e.display.dragFunctions,i=t?fe:ge;i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function Os(e){e.options.lineWrapping?(L(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(A(e.display.wrapper,"CodeMirror-wrap"),ar(e)),Ln(e),Bn(e),pn(e),setTimeout((function(){return vi(e)}),100)}function Bs(e,t){var r=this;if(!(this instanceof Bs))return new Bs(e,t);this.options=t=t?P(t):{},P(Es,t,!1);var n=t.value;"string"==typeof n?n=new ka(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new Bs.inputStyles[t.inputStyle](this),o=this.display=new Ji(e,n,i,t);for(var l in o.wrapper.CodeMirror=this,$s(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),xi(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new F,keySeq:null,specialChars:null},t.autofocus&&!v&&o.input.focus(),a&&s<11&&setTimeout((function(){return r.display.input.reset(!0)}),20),Ps(this),_a(),ki(this),this.curOp.forceUpdate=!0,bo(this,n),t.autofocus&&!v||this.hasFocus()?setTimeout((function(){r.hasFocus()&&!r.state.focused&&Kn(r)}),20):Jn(this),Ms)Ms.hasOwnProperty(l)&&Ms[l](this,t[l],_s);Xi(this),t.finishInit&&t.finishInit(this);for(var u=0;u<js.length;++u)js[u](this);Ci(this),c&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}function Ps(e){var t=e.display;fe(t.scroller,"mousedown",Ei(e,vs)),fe(t.scroller,"dblclick",a&&s<11?Ei(e,(function(t){if(!be(e,t)){var r=In(e,t);if(r&&!As(e,t)&&!qr(e.display,t)){ke(t);var n=e.findWordAt(r);Oo(e.doc,n.anchor,n.head)}}})):function(t){return be(e,t)||ke(t)}),fe(t.scroller,"contextmenu",(function(t){return Ds(e,t)})),fe(t.input.getField(),"contextmenu",(function(r){t.scroller.contains(r.target)||Ds(e,r)}));var r,n={end:0};function i(){t.activeTouch&&(r=setTimeout((function(){return t.activeTouch=null}),1e3),(n=t.activeTouch).end=+new Date)}function o(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function c(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return r*r+n*n>400}fe(t.scroller,"touchstart",(function(i){if(!be(e,i)&&!o(i)&&!As(e,i)){t.input.ensurePolled(),clearTimeout(r);var a=+new Date;t.activeTouch={start:a,moved:!1,prev:a-n.end<=300?n:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),fe(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),fe(t.scroller,"touchend",(function(r){var n=t.activeTouch;if(n&&!qr(t,r)&&null!=n.left&&!n.moved&&new Date-n.start<300){var o,a=e.coordsChar(t.activeTouch,"page");o=!n.prev||c(n,n.prev)?new io(a,a):!n.prev.prev||c(n,n.prev.prev)?e.findWordAt(a):new io(it(a.line,0),pt(e.doc,it(a.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),ke(r)}i()})),fe(t.scroller,"touchcancel",i),fe(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(pi(e,t.scroller.scrollTop),mi(e,t.scroller.scrollLeft,!0),ve(e,"scroll",e))})),fe(t.scroller,"mousewheel",(function(t){return ro(e,t)})),fe(t.scroller,"DOMMouseScroll",(function(t){return ro(e,t)})),fe(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){be(e,t)||Se(t)},over:function(t){be(e,t)||(Aa(e,t),Se(t))},start:function(t){return Sa(e,t)},drop:Ei(e,za),leave:function(t){be(e,t)||Da(e)}};var l=t.input.getField();fe(l,"keyup",(function(t){return us.call(e,t)})),fe(l,"keydown",Ei(e,cs)),fe(l,"keypress",Ei(e,ps)),fe(l,"focus",(function(t){return Kn(e,t)})),fe(l,"blur",(function(t){return Jn(e,t)}))}Bs.defaults=Es,Bs.optionHandlers=Ms;var js=[];function Fs(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=bt(e,t).state:r="prev");var a=e.options.tabSize,s=Ke(o,t),c=j(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var l,u=s.text.match(/^\s*/)[0];if(n||/\S/.test(s.text)){if("smart"==r&&((l=o.mode.indent(i,s.text.slice(u.length),s.text))==q||l>150)){if(!n)return;r="prev"}}else l=0,r="not";"prev"==r?l=t>o.first?j(Ke(o,t-1).text,null,a):0:"add"==r?l=c+e.options.indentUnit:"subtract"==r?l=c-e.options.indentUnit:"number"==typeof r&&(l=c+r),l=Math.max(0,l);var p="",d=0;if(e.options.indentWithTabs)for(var m=Math.floor(l/a);m;--m)d+=a,p+="\t";if(d<l&&(p+=V(l-d)),p!=u)return na(o,p,it(t,0),it(t,u.length),"+input"),s.stateAfter=null,!0;for(var f=0;f<o.sel.ranges.length;f++){var h=o.sel.ranges[f];if(h.head.line==t&&h.head.ch<u.length){var g=it(t,u.length);Po(o,f,new io(g,g));break}}}Bs.defineInitHook=function(e){return js.push(e)};var Rs=null;function Ns(e){Rs=e}function qs(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var a=+new Date-200,s="paste"==i||e.state.pasteIncoming>a,c=Le(t),l=null;if(s&&n.ranges.length>1)if(Rs&&Rs.text.join("\n")==t){if(n.ranges.length%Rs.text.length==0){l=[];for(var u=0;u<Rs.text.length;u++)l.push(o.splitLines(Rs.text[u]))}}else c.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(l=K(c,(function(e){return[e]})));for(var p=e.curOp.updateInput,d=n.ranges.length-1;d>=0;d--){var m=n.ranges[d],f=m.from(),h=m.to();m.empty()&&(r&&r>0?f=it(f.line,f.ch-r):e.state.overwrite&&!s?h=it(h.line,Math.min(Ke(o,h.line).text.length,h.ch+Y(c).length)):s&&Rs&&Rs.lineWise&&Rs.text.join("\n")==c.join("\n")&&(f=h=it(f.line,0)));var g={from:f,to:h,text:l?l[d%l.length]:c,origin:i||(s?"paste":e.state.cutIncoming>a?"cut":"+input")};Jo(e.doc,g),Dr(e,"inputRead",e,g)}t&&!s&&Us(e,t),ai(e),e.curOp.updateInput<2&&(e.curOp.updateInput=p),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Hs(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||_i(t,(function(){return qs(t,r,0,null,"paste")})),!0}function Us(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s<o.electricChars.length;s++)if(t.indexOf(o.electricChars.charAt(s))>-1){a=Fs(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Ke(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Fs(e,i.head.line,"smart"));a&&Dr(e,"electricInput",e,i.head.line)}}}function Gs(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,o={anchor:it(i,0),head:it(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function Ws(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function Xs(){var e=$("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=$("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return c?e.style.width="1000px":e.setAttribute("wrap","off"),h&&(e.style.border="1px solid black"),Ws(e),t}function Vs(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,r){var n=this.options,i=n[e];n[e]==r&&"mode"!=e||(n[e]=r,t.hasOwnProperty(e)&&Ei(this,t[e])(this,r,i),ve(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Ua(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;r<t.length;++r)if(t[r]==e||t[r].name==e)return t.splice(r,1),!0},addOverlay:Mi((function(t,r){var n=t.token?t:e.getMode(this.options,t);if(n.startState)throw new Error("Overlays may not be stateful.");J(this.state.overlays,{mode:n,modeSpec:t,opaque:r&&r.opaque,priority:r&&r.priority||0},(function(e){return e.priority})),this.state.modeGen++,Bn(this)})),removeOverlay:Mi((function(e){for(var t=this.state.overlays,r=0;r<t.length;++r){var n=t[r].modeSpec;if(n==e||"string"==typeof e&&n.name==e)return t.splice(r,1),this.state.modeGen++,void Bn(this)}})),indentLine:Mi((function(e,t,r){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),rt(this.doc,e)&&Fs(this,e,t,r)})),indentSelection:Mi((function(e){for(var t=this.doc.sel.ranges,r=-1,n=0;n<t.length;n++){var i=t[n];if(i.empty())i.head.line>r&&(Fs(this,i.head.line,e,!0),r=i.head.line,n==this.doc.sel.primIndex&&ai(this));else{var o=i.from(),a=i.to(),s=Math.max(r,o.line);r=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var c=s;c<r;++c)Fs(this,c,e);var l=this.doc.sel.ranges;0==o.ch&&t.length==l.length&&l[n].from().ch>0&&Po(this.doc,n,new io(o,l[n].to()),H)}}})),getTokenAt:function(e,t){return Ct(this,e,t)},getLineTokens:function(e,t){return Ct(this,it(e),t,!0)},getTokenTypeAt:function(e){e=pt(this.doc,e);var t,r=vt(this,Ke(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var a=n+i>>1;if((a?r[2*a-1]:0)>=o)i=a;else{if(!(r[2*a+1]<o)){t=r[2*a+2];break}n=a+1}}var s=t?t.indexOf("overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var r=this.doc.mode;return r.innerMode?e.innerMode(r,this.getTokenAt(t).state).mode:r},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!r.hasOwnProperty(t))return n;var i=r[t],o=this.getModeAt(e);if("string"==typeof o[t])i[o[t]]&&n.push(i[o[t]]);else if(o[t])for(var a=0;a<o[t].length;a++){var s=i[o[t][a]];s&&n.push(s)}else o.helperType&&i[o.helperType]?n.push(i[o.helperType]):i[o.name]&&n.push(i[o.name]);for(var c=0;c<i._global.length;c++){var l=i._global[c];l.pred(o,this)&&-1==R(n,l.val)&&n.push(l.val)}return n},getStateAfter:function(e,t){var r=this.doc;return bt(this,(e=ut(r,null==e?r.first+r.size-1:e))+1,t).state},cursorCoords:function(e,t){var r=this.doc.sel.primary();return bn(this,null==e?r.head:"object"==typeof e?pt(this.doc,e):e?r.from():r.to(),t||"page")},charCoords:function(e,t){return vn(this,pt(this.doc,e),t||"page")},coordsChar:function(e,t){return wn(this,(e=gn(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=gn(this,{top:e,left:0},t||"page").top,tt(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,r){var n,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>o&&(e=o,i=!0),n=Ke(this.doc,e)}else n=e;return hn(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-ir(n):0)},defaultTextHeight:function(){return Tn(this.display)},defaultCharWidth:function(){return $n(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o=this.display,a=(e=bn(this,pt(this.doc,e))).bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==n)a=e.top;else if("above"==n||"near"==n){var c=Math.max(o.wrapper.clientHeight,this.doc.height),l=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>c)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=c&&(a=e.bottom),s+t.offsetWidth>l&&(s=l-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),r&&ni(this,{left:s,top:a,right:s+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:Mi(cs),triggerOnKeyPress:Mi(ps),triggerOnKeyUp:us,triggerOnMouseDown:Mi(vs),execCommand:function(e){if(Ka.hasOwnProperty(e))return Ka[e].call(null,this)},triggerElectric:Mi((function(e){Us(this,e)})),findPosH:function(e,t,r,n){var i=1;t<0&&(i=-1,t=-t);for(var o=pt(this.doc,e),a=0;a<t&&!(o=Ys(this.doc,o,i,r,n)).hitSide;++a);return o},moveH:Mi((function(e,t){var r=this;this.extendSelectionsBy((function(n){return r.display.shift||r.doc.extend||n.empty()?Ys(r.doc,n.head,e,t,r.options.rtlMoveVisually):e<0?n.from():n.to()}),G)})),deleteH:Mi((function(e,t){var r=this.doc.sel,n=this.doc;r.somethingSelected()?n.replaceSelection("",null,"+delete"):Ga(this,(function(r){var i=Ys(n,r.head,e,t,!1);return e<0?{from:i,to:r.head}:{from:r.head,to:i}}))})),findPosV:function(e,t,r,n){var i=1,o=n;t<0&&(i=-1,t=-t);for(var a=pt(this.doc,e),s=0;s<t;++s){var c=bn(this,a,"div");if(null==o?o=c.left:c.left=o,(a=Ks(this,c,i,r)).hitSide)break}return a},moveV:Mi((function(e,t){var r=this,n=this.doc,i=[],o=!this.display.shift&&!n.extend&&n.sel.somethingSelected();if(n.extendSelectionsBy((function(a){if(o)return e<0?a.from():a.to();var s=bn(r,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),i.push(s.left);var c=Ks(r,s,e,t);return"page"==t&&a==n.sel.primary()&&oi(r,vn(r,c,"div").top-s.top),c}),G),i.length)for(var a=0;a<n.sel.ranges.length;a++)n.sel.ranges[a].goalColumn=i[a]})),findWordAt:function(e){var t=Ke(this.doc,e.line).text,r=e.ch,n=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&n!=t.length||!r?++n:--r;for(var o=t.charAt(r),a=re(o,i)?function(e){return re(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!re(e)};r>0&&a(t.charAt(r-1));)--r;for(;n<t.length&&a(t.charAt(n));)++n}return new io(it(e.line,r),it(e.line,n))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?L(this.display.cursorDiv,"CodeMirror-overwrite"):A(this.display.cursorDiv,"CodeMirror-overwrite"),ve(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==M()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:Mi((function(e,t){si(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Wr(this)-this.display.barHeight,width:e.scrollWidth-Wr(this)-this.display.barWidth,clientHeight:Vr(this),clientWidth:Xr(this)}},scrollIntoView:Mi((function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:it(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?ci(this,e):ui(this,e.from,e.to,e.margin)})),setSize:Mi((function(e,t){var r=this,n=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=n(e)),null!=t&&(this.display.wrapper.style.height=n(t)),this.options.lineWrapping&&un(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Pn(r,i,"widget");break}++i})),this.curOp.forceUpdate=!0,ve(this,"refresh",this)})),operation:function(e){return _i(this,e)},startOperation:function(){return ki(this)},endOperation:function(){return Ci(this)},refresh:Mi((function(){var e=this.display.cachedTextHeight;Bn(this),this.curOp.forceUpdate=!0,pn(this),si(this,this.doc.scrollLeft,this.doc.scrollTop),Ui(this.display),(null==e||Math.abs(e-Tn(this.display))>.5||this.options.lineWrapping)&&Ln(this),ve(this,"refresh",this)})),swapDoc:Mi((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),bo(this,e),pn(this),this.display.input.reset(),si(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Dr(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},we(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}function Ys(e,t,r,n,i){var o=t,a=r,s=Ke(e,t.line),c=i&&"rtl"==e.direction?-r:r;function l(){var r=t.line+c;return!(r<e.first||r>=e.first+e.size)&&(t=new it(r,t.ch,t.sticky),s=Ke(e,r))}function u(o){var a;if("codepoint"==n){var u=s.text.charCodeAt(t.ch+(r>0?0:-1));if(isNaN(u))a=null;else{var p=r>0?u>=55296&&u<56320:u>=56320&&u<57343;a=new it(t.line,Math.max(0,Math.min(s.text.length,t.ch+r*(p?2:1))),-r)}}else a=i?Ya(e.cm,s,t,r):Xa(s,t,r);if(null==a){if(o||!l())return!1;t=Va(i,e.cm,s,t.line,c)}else t=a;return!0}if("char"==n||"codepoint"==n)u();else if("column"==n)u(!0);else if("word"==n||"group"==n)for(var p=null,d="group"==n,m=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(r<0)||u(!f);f=!1){var h=s.text.charAt(t.ch)||"\n",g=re(h,m)?"w":d&&"\n"==h?"n":!d||/\s/.test(h)?null:"p";if(!d||f||g||(g="s"),p&&p!=g){r<0&&(r=1,u(),t.sticky="after");break}if(g&&(p=g),r>0&&!u(!f))break}var v=Xo(e,t,o,a,!0);return at(o,v)&&(v.hitSide=!0),v}function Ks(e,t,r,n){var i,o,a=e.doc,s=t.left;if("page"==n){var c=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(c-.5*Tn(e.display),3);i=(r>0?t.bottom:t.top)+r*l}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(;(o=wn(e,s,i)).outside;){if(r<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*r}return o}var Js=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new F,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Zs(e,t){var r=Qr(e,t.line);if(!r||r.hidden)return null;var n=Ke(e.doc,t.line),i=Kr(r,n,t.line),o=de(n,e.doc.direction),a="left";o&&(a=ue(o,t.ch)%2?"right":"left");var s=on(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Qs(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function ec(e,t){return t&&(e.bad=!0),e}function tc(e,t,r,n,i){var o="",a=!1,s=e.doc.lineSeparator(),c=!1;function l(e){return function(t){return t.id==e}}function u(){a&&(o+=s,c&&(o+=s),a=c=!1)}function p(e){e&&(u(),o+=e)}function d(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(r)return void p(r);var o,m=t.getAttribute("cm-marker");if(m){var f=e.findMarks(it(n,0),it(i+1,0),l(+m));return void(f.length&&(o=f[0].find(0))&&p(Je(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var h=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;h&&u();for(var g=0;g<t.childNodes.length;g++)d(t.childNodes[g]);/^(pre|p)$/i.test(t.nodeName)&&(c=!0),h&&(a=!0)}else 3==t.nodeType&&p(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;d(t),t!=r;)t=t.nextSibling,c=!1;return o}function rc(e,t,r){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return ec(e.clipPos(it(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==n)return nc(o,t,r)}}function nc(e,t,r){var n=e.text.firstChild,i=!1;if(!t||!E(n,t))return ec(it(et(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var o=e.rest?Y(e.rest):e.line;return ec(it(et(o),o.text.length),i)}var a=3==t.nodeType?t:null,s=t;for(a||1!=t.childNodes.length||3!=t.firstChild.nodeType||(a=t.firstChild,r&&(r=a.nodeValue.length));s.parentNode!=n;)s=s.parentNode;var c=e.measure,l=c.maps;function u(t,r,n){for(var i=-1;i<(l?l.length:0);i++)for(var o=i<0?c.map:l[i],a=0;a<o.length;a+=3){var s=o[a+2];if(s==t||s==r){var u=et(i<0?e.line:e.rest[i]),p=o[a]+n;return(n<0||s!=t)&&(p=o[a+(n?1:0)]),it(u,p)}}}var p=u(a,s,r);if(p)return ec(p,i);for(var d=s.nextSibling,m=a?a.nodeValue.length-r:0;d;d=d.nextSibling){if(p=u(d,d.firstChild,0))return ec(it(p.line,p.ch-m),i);m+=d.textContent.length}for(var f=s.previousSibling,h=r;f;f=f.previousSibling){if(p=u(f,f.firstChild,-1))return ec(it(p.line,p.ch+h),i);h+=f.textContent.length}}Js.prototype.init=function(e){var t=this,r=this,n=r.cm,i=r.div=e.lineDiv;function o(e){for(var t=e.target;t;t=t.parentNode){if(t==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function a(e){if(o(e)&&!be(n,e)){if(n.somethingSelected())Ns({lineWise:!1,text:n.getSelections()}),"cut"==e.type&&n.replaceSelection("",null,"cut");else{if(!n.options.lineWiseCopyCut)return;var t=Gs(n);Ns({lineWise:!0,text:t.text}),"cut"==e.type&&n.operation((function(){n.setSelections(t.ranges,0,H),n.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var a=Rs.text.join("\n");if(e.clipboardData.setData("Text",a),e.clipboardData.getData("Text")==a)return void e.preventDefault()}var s=Xs(),c=s.firstChild;n.display.lineSpace.insertBefore(s,n.display.lineSpace.firstChild),c.value=Rs.text.join("\n");var l=M();O(c),setTimeout((function(){n.display.lineSpace.removeChild(s),l.focus(),l==i&&r.showPrimarySelection()}),50)}}i.contentEditable=!0,Ws(i,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize),fe(i,"paste",(function(e){!o(e)||be(n,e)||Hs(e,n)||s<=11&&setTimeout(Ei(n,(function(){return t.updateFromDOM()})),20)})),fe(i,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),fe(i,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),fe(i,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),fe(i,"touchstart",(function(){return r.forceCompositionEnd()})),fe(i,"input",(function(){t.composing||t.readFromDOMSoon()})),fe(i,"copy",a),fe(i,"cut",a)},Js.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Js.prototype.prepareSelection=function(){var e=Hn(this.cm,!1);return e.focus=M()==this.div,e},Js.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Js.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Js.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),i=n.from(),o=n.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||o.line<t.display.viewFrom)e.removeAllRanges();else{var a=rc(t,e.anchorNode,e.anchorOffset),s=rc(t,e.focusNode,e.focusOffset);if(!a||a.bad||!s||s.bad||0!=ot(lt(a,s),i)||0!=ot(ct(a,s),o)){var c=t.display.view,l=i.line>=t.display.viewFrom&&Zs(t,i)||{node:c[0].measure.map[2],offset:0},u=o.line<t.display.viewTo&&Zs(t,o);if(!u){var p=c[c.length-1].measure,d=p.maps?p.maps[p.maps.length-1]:p.map;u={node:d[d.length-1],offset:d[d.length-2]-d[d.length-3]}}if(l&&u){var m,f=e.rangeCount&&e.getRangeAt(0);try{m=S(l.node,l.offset,u.offset,u.node)}catch(e){}m&&(!r&&t.state.focused?(e.collapse(l.node,l.offset),m.collapsed||(e.removeAllRanges(),e.addRange(m))):(e.removeAllRanges(),e.addRange(m)),f&&null==e.anchorNode?e.addRange(f):r&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Js.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation((function(){return e.cm.curOp.selectionChanged=!0}))}),20)},Js.prototype.showMultipleSelections=function(e){T(this.cm.display.cursorDiv,e.cursors),T(this.cm.display.selectionDiv,e.selection)},Js.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Js.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return E(this.div,t)},Js.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&M()==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Js.prototype.blur=function(){this.div.blur()},Js.prototype.getField=function(){return this.div},Js.prototype.supportsTouch=function(){return!0},Js.prototype.receivedFocus=function(){var e=this,t=this;function r(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,r))}this.selectionInEditor()?setTimeout((function(){return e.pollSelection()}),20):_i(this.cm,(function(){return t.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,r)},Js.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Js.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(g&&u&&this.cm.display.gutterSpecs.length&&Qs(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var r=rc(t,e.anchorNode,e.anchorOffset),n=rc(t,e.focusNode,e.focusOffset);r&&n&&_i(t,(function(){No(t.doc,ao(r,n),H),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)}))}}},Js.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,r,n=this.cm,i=n.display,o=n.doc.sel.primary(),a=o.from(),s=o.to();if(0==a.ch&&a.line>n.firstLine()&&(a=it(a.line-1,Ke(n.doc,a.line-1).length)),s.ch==Ke(n.doc,s.line).text.length&&s.line<n.lastLine()&&(s=it(s.line+1,0)),a.line<i.viewFrom||s.line>i.viewTo-1)return!1;a.line==i.viewFrom||0==(e=On(n,a.line))?(t=et(i.view[0].line),r=i.view[0].node):(t=et(i.view[e].line),r=i.view[e-1].node.nextSibling);var c,l,u=On(n,s.line);if(u==i.view.length-1?(c=i.viewTo-1,l=i.lineDiv.lastChild):(c=et(i.view[u+1].line)-1,l=i.view[u+1].node.previousSibling),!r)return!1;for(var p=n.doc.splitLines(tc(n,r,l,t,c)),d=Je(n.doc,it(t,0),it(c,Ke(n.doc,c).text.length));p.length>1&&d.length>1;)if(Y(p)==Y(d))p.pop(),d.pop(),c--;else{if(p[0]!=d[0])break;p.shift(),d.shift(),t++}for(var m=0,f=0,h=p[0],g=d[0],v=Math.min(h.length,g.length);m<v&&h.charCodeAt(m)==g.charCodeAt(m);)++m;for(var b=Y(p),y=Y(d),x=Math.min(b.length-(1==p.length?m:0),y.length-(1==d.length?m:0));f<x&&b.charCodeAt(b.length-f-1)==y.charCodeAt(y.length-f-1);)++f;if(1==p.length&&1==d.length&&t==a.line)for(;m&&m>a.ch&&b.charCodeAt(b.length-f-1)==y.charCodeAt(y.length-f-1);)m--,f++;p[p.length-1]=b.slice(0,b.length-f).replace(/^\u200b+/,""),p[0]=p[0].slice(m).replace(/\u200b+$/,"");var w=it(t,m),k=it(c,d.length?Y(d).length-f:0);return p.length>1||p[0]||ot(w,k)?(na(n.doc,p,w,k,"+input"),!0):void 0},Js.prototype.ensurePolled=function(){this.forceCompositionEnd()},Js.prototype.reset=function(){this.forceCompositionEnd()},Js.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Js.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Js.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||_i(this.cm,(function(){return Bn(e.cm)}))},Js.prototype.setUneditable=function(e){e.contentEditable="false"},Js.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Ei(this.cm,qs)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Js.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Js.prototype.onContextMenu=function(){},Js.prototype.resetPosition=function(){},Js.prototype.needsContentAttribute=!0;var ic=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new F,this.hasSelection=!1,this.composing=null};function oc(e,t){if((t=t?P(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var r=M();t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}function n(){e.value=s.getValue()}var i;if(e.form&&(fe(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){n(),o.submit=i,o.submit(),o.submit=a}}catch(e){}}t.finishInit=function(r){r.save=n,r.getTextArea=function(){return e},r.toTextArea=function(){r.toTextArea=isNaN,n(),e.parentNode.removeChild(r.getWrapperElement()),e.style.display="",e.form&&(ge(e.form,"submit",n),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=Bs((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s}function ac(e){e.off=ge,e.on=fe,e.wheelEventPixels=to,e.Doc=ka,e.splitLines=Le,e.countColumn=j,e.findColumn=W,e.isWordChar=te,e.Pass=q,e.signal=ve,e.Line=sr,e.changeEnd=so,e.scrollbarModel=yi,e.Pos=it,e.cmpPos=ot,e.modes=je,e.mimeModes=Fe,e.resolveMode=qe,e.getMode=He,e.modeExtensions=Ue,e.extendMode=Ge,e.copyState=We,e.startState=Ve,e.innerMode=Xe,e.commands=Ka,e.keyMap=Pa,e.keyName=Ha,e.isModifierKey=Na,e.lookupKey=Ra,e.normalizeKeyMap=Fa,e.StringStream=Ye,e.SharedTextMarker=ga,e.TextMarker=fa,e.LineWidget=ua,e.e_preventDefault=ke,e.e_stopPropagation=Ce,e.e_stop=Se,e.addClass=L,e.contains=E,e.rmClass=A,e.keyNames=La}ic.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!be(n,e)){if(n.somethingSelected())Ns({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var t=Gs(n);Ns({lineWise:!0,text:t.text}),"cut"==e.type?n.setSelections(t.ranges,null,H):(r.prevInput="",i.value=t.text.join("\n"),O(i))}"cut"==e.type&&(n.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),h&&(i.style.width="0px"),fe(i,"input",(function(){a&&s>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()})),fe(i,"paste",(function(e){be(n,e)||Hs(e,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())})),fe(i,"cut",o),fe(i,"copy",o),fe(e.scroller,"paste",(function(t){if(!qr(e,t)&&!be(n,t)){if(!i.dispatchEvent)return n.state.pasteIncoming=+new Date,void r.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),fe(e.lineSpace,"selectstart",(function(t){qr(e,t)||ke(t)})),fe(i,"compositionstart",(function(){var e=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}})),fe(i,"compositionend",(function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)}))},ic.prototype.createField=function(e){this.wrapper=Xs(),this.textarea=this.wrapper.firstChild},ic.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},ic.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=Hn(e);if(e.options.moveInputWithCursor){var i=bn(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return n},ic.prototype.showSelection=function(e){var t=this.cm.display;T(t.cursorDiv,e.cursors),T(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ic.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&O(this.textarea),a&&s>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},ic.prototype.getField=function(){return this.textarea},ic.prototype.supportsTouch=function(){return!1},ic.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||M()!=this.textarea))try{this.textarea.focus()}catch(e){}},ic.prototype.blur=function(){this.textarea.blur()},ic.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ic.prototype.receivedFocus=function(){this.slowPoll()},ic.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},ic.prototype.fastPoll=function(){var e=!1,t=this;function r(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,r))}t.pollingFast=!0,t.polling.set(20,r)},ic.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||Ie(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===i||b&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||n||(n="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var c=0,l=Math.min(n.length,i.length);c<l&&n.charCodeAt(c)==i.charCodeAt(c);)++c;return _i(t,(function(){qs(t,i.slice(c),n.length-c,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},ic.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ic.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},ic.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=In(r,e),l=n.scroller.scrollTop;if(o&&!p){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(o)&&Ei(r,No)(r.doc,ao(o),H);var u,d=i.style.cssText,m=t.wrapper.style.cssText,f=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-f.top-5)+"px; left: "+(e.clientX-f.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",c&&(u=window.scrollY),n.input.focus(),c&&window.scrollTo(null,u),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=v,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll),a&&s>=9&&g(),C){Se(e);var h=function(){ge(window,"mouseup",h),setTimeout(v,20)};fe(window,"mouseup",h)}else setTimeout(v,50)}function g(){if(null!=i.selectionStart){var e=r.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,n.selForContextMenu=r.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=m,i.style.cssText=d,a&&s<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=l),null!=i.selectionStart)){(!a||a&&s<9)&&g();var e=0,o=function(){n.selForContextMenu==r.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?Ei(r,Yo)(r):e++<10?n.detectingSelectAll=setTimeout(o,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(o,200)}}},ic.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},ic.prototype.setUneditable=function(){},ic.prototype.needsContentAttribute=!1,Ls(Bs),Vs(Bs);var sc="iter insert remove copy getEditor constructor".split(" ");for(var cc in ka.prototype)ka.prototype.hasOwnProperty(cc)&&R(sc,cc)<0&&(Bs.prototype[cc]=function(e){return function(){return e.apply(this.doc,arguments)}}(ka.prototype[cc]));return we(ka),Bs.inputStyles={textarea:ic,contenteditable:Js},Bs.defineMode=function(e){Bs.defaults.mode||"null"==e||(Bs.defaults.mode=e),Re.apply(this,arguments)},Bs.defineMIME=Ne,Bs.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Bs.defineMIME("text/plain","null"),Bs.defineExtension=function(e,t){Bs.prototype[e]=t},Bs.defineDocExtension=function(e,t){ka.prototype[e]=t},Bs.fromTextArea=oc,ac(Bs),Bs.version="5.65.1",Bs}()}));tc((function(e,t){!function(e){var t=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,r=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,n=/[*+-]\s/;function i(e,r){var n=r.line,i=0,o=0,a=t.exec(e.getLine(n)),s=a[1];do{var c=n+(i+=1),l=e.getLine(c),u=t.exec(l);if(u){var p=u[1],d=parseInt(a[3],10)+i-o,m=parseInt(u[3],10),f=m;if(s!==p||isNaN(m)){if(s.length>p.length)return;if(s.length<p.length&&1===i)return;o+=1}else d===m&&(f=m+1),d>m&&(f=d+1),e.replaceRange(l.replace(t,p+f+u[4]+u[5]),{line:c,ch:0},{line:c,ch:l.length})}}while(u)}e.commands.newlineAndIndentContinueMarkdownList=function(o){if(o.getOption("disableInput"))return e.Pass;for(var a=o.listSelections(),s=[],c=0;c<a.length;c++){var l=a[c].head,u=o.getStateAfter(l.line),p=e.innerMode(o.getMode(),u);if("markdown"!==p.mode.name)return void o.execCommand("newlineAndIndent");var d=!1!==(u=p.state).list,m=0!==u.quote,f=o.getLine(l.line),h=t.exec(f),g=/^\s*$/.test(f.slice(0,l.ch));if(!a[c].empty()||!d&&!m||!h||g)return void o.execCommand("newlineAndIndent");if(r.test(f)){var v=m&&/>\s*$/.test(f),b=!/>\s*$/.test(f);(v||b)&&o.replaceRange("",{line:l.line,ch:0},{line:l.line,ch:l.ch+1}),s[c]="\n"}else{var y=h[1],x=h[5],w=!(n.test(h[2])||h[2].indexOf(">")>=0),k=w?parseInt(h[3],10)+1+h[4]:h[2].replace("x"," ");s[c]="\n"+y+k+x,w&&i(o,l)}}o.replaceSelections(s)}}(DC)})),DC.commands.tabAndIndentMarkdownList=function(e){var t=e.listSelections()[0].head;if(!1!==e.getStateAfter(t.line).list)e.execCommand("indentMore");else if(e.options.indentWithTabs)e.execCommand("insertTab");else{var r=Array(e.options.tabSize+1).join(" ");e.replaceSelection(r)}},DC.commands.shiftTabAndUnindentMarkdownList=function(e){var t=e.listSelections()[0].head;if(!1!==e.getStateAfter(t.line).list)e.execCommand("indentLess");else if(e.options.indentWithTabs)e.execCommand("insertTab");else{var r=Array(e.options.tabSize+1).join(" ");e.replaceSelection(r)}},tc((function(e,t){!function(e){function t(e){var t=e.getWrapperElement();e.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:t.style.width,height:t.style.height},t.style.width="",t.style.height="auto",t.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",e.refresh()}function r(e){var t=e.getWrapperElement();t.className=t.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var r=e.state.fullScreenRestore;t.style.width=r.width,t.style.height=r.height,window.scrollTo(r.scrollLeft,r.scrollTop),e.refresh()}e.defineOption("fullScreen",!1,(function(n,i,o){o==e.Init&&(o=!1),!o!=!i&&(i?t(n):r(n))}))}(DC)}));tc((function(e,t){var r,n,i;n={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},i={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1},(r=DC).defineMode("xml",(function(e,t){var o,a,s=e.indentUnit,c={},l=t.htmlMode?n:i;for(var u in l)c[u]=l[u];for(var u in t)c[u]=t[u];function p(e,t){function r(r){return t.tokenize=r,r(e,t)}var n=e.next();return"<"==n?e.eat("!")?e.eat("[")?e.match("CDATA[")?r(f("atom","]]>")):null:e.match("--")?r(f("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(h(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=f("meta","?>"),"meta"):(o=e.eat("/")?"closeTag":"openTag",t.tokenize=d,"tag bracket"):"&"==n?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function d(e,t){var r=e.next();if(">"==r||"/"==r&&e.eat(">"))return t.tokenize=p,o=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return o="equals",null;if("<"==r){t.tokenize=p,t.state=x,t.tagName=t.tagStart=null;var n=t.tokenize(e,t);return n?n+" tag error":"tag error"}return/[\'\"]/.test(r)?(t.tokenize=m(r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function m(e){var t=function(t,r){for(;!t.eol();)if(t.next()==e){r.tokenize=d;break}return"string"};return t.isInAttribute=!0,t}function f(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=p;break}r.next()}return e}}function h(e){return function(t,r){for(var n;null!=(n=t.next());){if("<"==n)return r.tokenize=h(e+1),r.tokenize(t,r);if(">"==n){if(1==e){r.tokenize=p;break}return r.tokenize=h(e-1),r.tokenize(t,r)}}return"meta"}}function g(e){return e&&e.toLowerCase()}function v(e,t,r){this.prev=e.context,this.tagName=t||"",this.indent=e.indented,this.startOfLine=r,(c.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function b(e){e.context&&(e.context=e.context.prev)}function y(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!c.contextGrabbers.hasOwnProperty(g(r))||!c.contextGrabbers[g(r)].hasOwnProperty(g(t)))return;b(e)}}function x(e,t,r){return"openTag"==e?(r.tagStart=t.column(),w):"closeTag"==e?k:x}function w(e,t,r){return"word"==e?(r.tagName=t.current(),a="tag",S):c.allowMissingTagName&&"endTag"==e?(a="tag bracket",S(e,t,r)):(a="error",w)}function k(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&c.implicitlyClosed.hasOwnProperty(g(r.context.tagName))&&b(r),r.context&&r.context.tagName==n||!1===c.matchClosing?(a="tag",C):(a="tag error",z)}return c.allowMissingTagName&&"endTag"==e?(a="tag bracket",C(e,t,r)):(a="error",z)}function C(e,t,r){return"endTag"!=e?(a="error",C):(b(r),x)}function z(e,t,r){return a="error",C(e,t,r)}function S(e,t,r){if("word"==e)return a="attribute",A;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,i=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||c.autoSelfClosers.hasOwnProperty(g(n))?y(r,n):(y(r,n),r.context=new v(r,n,i==r.indented)),x}return a="error",S}function A(e,t,r){return"equals"==e?D:(c.allowMissing||(a="error"),S(e,t,r))}function D(e,t,r){return"string"==e?T:"word"==e&&c.allowUnquoted?(a="string",S):(a="error",S(e,t,r))}function T(e,t,r){return"string"==e?T:S(e,t,r)}return p.isInText=!0,{startState:function(e){var t={tokenize:p,state:x,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;o=null;var r=t.tokenize(e,t);return(r||o)&&"comment"!=r&&(a=null,t.state=t.state(o||r,e,t),a&&(r="error"==a?r+" error":a)),r},indent:function(e,t,n){var i=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+s;if(i&&i.noIndent)return r.Pass;if(e.tokenize!=d&&e.tokenize!=p)return n?n.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==c.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+s*(c.multilineTagIndentFactor||1);if(c.alignCDATA&&/<!\[CDATA\[/.test(t))return 0;var o=t&&/^<(\/)?([\w_:\.-]*)/.exec(t);if(o&&o[1])for(;i;){if(i.tagName==o[2]){i=i.prev;break}if(!c.implicitlyClosed.hasOwnProperty(g(i.tagName)))break;i=i.prev}else if(o)for(;i;){var a=c.contextGrabbers[g(i.tagName)];if(!a||!a.hasOwnProperty(g(o[2])))break;i=i.prev}for(;i&&i.prev&&!i.startOfLine;)i=i.prev;return i?i.indent+s:e.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:c.htmlMode?"html":"xml",helperType:c.htmlMode?"html":"xml",skipAttribute:function(e){e.state==D&&(e.state=S)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],r=e.context;r;r=r.prev)t.push(r.tagName);return t.reverse()}}})),r.defineMIME("text/xml","xml"),r.defineMIME("application/xml","xml"),r.mimeModes.hasOwnProperty("text/html")||r.defineMIME("text/html",{name:"xml",htmlMode:!0})})),tc((function(e,t){!function(e){e.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy","cbl"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded JavaScript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"],alias:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var t=0;t<e.modeInfo.length;t++){var r=e.modeInfo[t];r.mimes&&(r.mime=r.mimes[0])}e.findModeByMIME=function(t){t=t.toLowerCase();for(var r=0;r<e.modeInfo.length;r++){var n=e.modeInfo[r];if(n.mime==t)return n;if(n.mimes)for(var i=0;i<n.mimes.length;i++)if(n.mimes[i]==t)return n}return/\+xml$/.test(t)?e.findModeByMIME("application/xml"):/\+json$/.test(t)?e.findModeByMIME("application/json"):void 0},e.findModeByExtension=function(t){t=t.toLowerCase();for(var r=0;r<e.modeInfo.length;r++){var n=e.modeInfo[r];if(n.ext)for(var i=0;i<n.ext.length;i++)if(n.ext[i]==t)return n}},e.findModeByFileName=function(t){for(var r=0;r<e.modeInfo.length;r++){var n=e.modeInfo[r];if(n.file&&n.file.test(t))return n}var i=t.lastIndexOf("."),o=i>-1&&t.substring(i+1,t.length);if(o)return e.findModeByExtension(o)},e.findModeByName=function(t){t=t.toLowerCase();for(var r=0;r<e.modeInfo.length;r++){var n=e.modeInfo[r];if(n.name.toLowerCase()==t)return n;if(n.alias)for(var i=0;i<n.alias.length;i++)if(n.alias[i].toLowerCase()==t)return n}}}(DC)})),tc((function(e,t){var r;(r=DC).defineMode("markdown",(function(e,t){var n=r.getMode(e,"text/html"),i="null"==n.name;function o(t){if(r.findModeByName){var n=r.findModeByName(t);n&&(t=n.mime||n.mimes[0])}var i=r.getMode(e,t);return"null"==i.name?null:i}void 0===t.highlightFormatting&&(t.highlightFormatting=!1),void 0===t.maxBlockquoteDepth&&(t.maxBlockquoteDepth=0),void 0===t.taskLists&&(t.taskLists=!1),void 0===t.strikethrough&&(t.strikethrough=!1),void 0===t.emoji&&(t.emoji=!1),void 0===t.fencedCodeBlockHighlighting&&(t.fencedCodeBlockHighlighting=!0),void 0===t.fencedCodeBlockDefaultMode&&(t.fencedCodeBlockDefaultMode="text/plain"),void 0===t.xml&&(t.xml=!0),void 0===t.tokenTypeOverrides&&(t.tokenTypeOverrides={});var a={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var s in a)a.hasOwnProperty(s)&&t.tokenTypeOverrides[s]&&(a[s]=t.tokenTypeOverrides[s]);var c=/^([*\-_])(?:\s*\1){2,}\s*$/,l=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,u=/^\[(x| )\](?=\s)/i,p=t.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,d=/^ {0,3}(?:\={1,}|-{2,})\s*$/,m=/^[^#!\[\]*_\\<>` "'(~:]+/,f=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,h=/^\s*\[[^\]]+?\]:.*$/,g=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,v=" ";function b(e,t,r){return t.f=t.inline=r,r(e,t)}function y(e,t,r){return t.f=t.block=r,r(e,t)}function x(e){return!e||!/\S/.test(e.string)}function w(e){if(e.linkTitle=!1,e.linkHref=!1,e.linkText=!1,e.em=!1,e.strong=!1,e.strikethrough=!1,e.quote=0,e.indentedCode=!1,e.f==C){var t=i;if(!t){var o=r.innerMode(n,e.htmlState);t="xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText}t&&(e.f=D,e.block=k,e.htmlState=null)}return e.trailingSpace=0,e.trailingSpaceNewLine=!1,e.prevLine=e.thisLine,e.thisLine={stream:null},null}function k(e,n){var i=e.column()===n.indentation,s=x(n.prevLine.stream),m=n.indentedCode,g=n.prevLine.hr,v=!1!==n.list,y=(n.listStack[n.listStack.length-1]||0)+3;n.indentedCode=!1;var w=n.indentation;if(null===n.indentationDiff&&(n.indentationDiff=n.indentation,v)){for(n.list=null;w<n.listStack[n.listStack.length-1];)n.listStack.pop(),n.listStack.length?n.indentation=n.listStack[n.listStack.length-1]:n.list=!1;!1!==n.list&&(n.indentationDiff=w-n.listStack[n.listStack.length-1])}var k=!(s||g||n.prevLine.header||v&&m||n.prevLine.fencedCodeEnd),C=(!1===n.list||g||s)&&n.indentation<=y&&e.match(c),A=null;if(n.indentationDiff>=4&&(m||n.prevLine.fencedCodeEnd||n.prevLine.header||s))return e.skipToEnd(),n.indentedCode=!0,a.code;if(e.eatSpace())return null;if(i&&n.indentation<=y&&(A=e.match(p))&&A[1].length<=6)return n.quote=0,n.header=A[1].length,n.thisLine.header=!0,t.highlightFormatting&&(n.formatting="header"),n.f=n.inline,S(n);if(n.indentation<=y&&e.eat(">"))return n.quote=i?1:n.quote+1,t.highlightFormatting&&(n.formatting="quote"),e.eatSpace(),S(n);if(!C&&!n.setext&&i&&n.indentation<=y&&(A=e.match(l))){var D=A[1]?"ol":"ul";return n.indentation=w+e.current().length,n.list=!0,n.quote=0,n.listStack.push(n.indentation),n.em=!1,n.strong=!1,n.code=!1,n.strikethrough=!1,t.taskLists&&e.match(u,!1)&&(n.taskList=!0),n.f=n.inline,t.highlightFormatting&&(n.formatting=["list","list-"+D]),S(n)}return i&&n.indentation<=y&&(A=e.match(f,!0))?(n.quote=0,n.fencedEndRE=new RegExp(A[1]+"+ *$"),n.localMode=t.fencedCodeBlockHighlighting&&o(A[2]||t.fencedCodeBlockDefaultMode),n.localMode&&(n.localState=r.startState(n.localMode)),n.f=n.block=z,t.highlightFormatting&&(n.formatting="code-block"),n.code=-1,S(n)):n.setext||!(k&&v||n.quote||!1!==n.list||n.code||C||h.test(e.string))&&(A=e.lookAhead(1))&&(A=A.match(d))?(n.setext?(n.header=n.setext,n.setext=0,e.skipToEnd(),t.highlightFormatting&&(n.formatting="header")):(n.header="="==A[0].charAt(0)?1:2,n.setext=n.header),n.thisLine.header=!0,n.f=n.inline,S(n)):C?(e.skipToEnd(),n.hr=!0,n.thisLine.hr=!0,a.hr):"["===e.peek()?b(e,n,M):b(e,n,n.inline)}function C(e,t){var o=n.token(e,t.htmlState);if(!i){var a=r.innerMode(n,t.htmlState);("xml"==a.mode.name&&null===a.state.tagStart&&!a.state.context&&a.state.tokenize.isInText||t.md_inside&&e.current().indexOf(">")>-1)&&(t.f=D,t.block=k,t.htmlState=null)}return o}function z(e,r){var n,i=r.listStack[r.listStack.length-1]||0,o=r.indentation<i,s=i+3;return r.fencedEndRE&&r.indentation<=s&&(o||e.match(r.fencedEndRE))?(t.highlightFormatting&&(r.formatting="code-block"),o||(n=S(r)),r.localMode=r.localState=null,r.block=k,r.f=D,r.fencedEndRE=null,r.code=0,r.thisLine.fencedCodeEnd=!0,o?y(e,r,r.block):n):r.localMode?r.localMode.token(e,r.localState):(e.skipToEnd(),a.code)}function S(e){var r=[];if(e.formatting){r.push(a.formatting),"string"==typeof e.formatting&&(e.formatting=[e.formatting]);for(var n=0;n<e.formatting.length;n++)r.push(a.formatting+"-"+e.formatting[n]),"header"===e.formatting[n]&&r.push(a.formatting+"-"+e.formatting[n]+"-"+e.header),"quote"===e.formatting[n]&&(!t.maxBlockquoteDepth||t.maxBlockquoteDepth>=e.quote?r.push(a.formatting+"-"+e.formatting[n]+"-"+e.quote):r.push("error"))}if(e.taskOpen)return r.push("meta"),r.length?r.join(" "):null;if(e.taskClosed)return r.push("property"),r.length?r.join(" "):null;if(e.linkHref?r.push(a.linkHref,"url"):(e.strong&&r.push(a.strong),e.em&&r.push(a.em),e.strikethrough&&r.push(a.strikethrough),e.emoji&&r.push(a.emoji),e.linkText&&r.push(a.linkText),e.code&&r.push(a.code),e.image&&r.push(a.image),e.imageAltText&&r.push(a.imageAltText,"link"),e.imageMarker&&r.push(a.imageMarker)),e.header&&r.push(a.header,a.header+"-"+e.header),e.quote&&(r.push(a.quote),!t.maxBlockquoteDepth||t.maxBlockquoteDepth>=e.quote?r.push(a.quote+"-"+e.quote):r.push(a.quote+"-"+t.maxBlockquoteDepth)),!1!==e.list){var i=(e.listStack.length-1)%3;i?1===i?r.push(a.list2):r.push(a.list3):r.push(a.list1)}return e.trailingSpaceNewLine?r.push("trailing-space-new-line"):e.trailingSpace&&r.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),r.length?r.join(" "):null}function A(e,t){if(e.match(m,!0))return S(t)}function D(e,i){var o=i.text(e,i);if(void 0!==o)return o;if(i.list)return i.list=null,S(i);if(i.taskList)return" "===e.match(u,!0)[1]?i.taskOpen=!0:i.taskClosed=!0,t.highlightFormatting&&(i.formatting="task"),i.taskList=!1,S(i);if(i.taskOpen=!1,i.taskClosed=!1,i.header&&e.match(/^#+$/,!0))return t.highlightFormatting&&(i.formatting="header"),S(i);var s=e.next();if(i.linkTitle){i.linkTitle=!1;var c=s;"("===s&&(c=")");var l="^\\s*(?:[^"+(c=(c+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+c;if(e.match(new RegExp(l),!0))return a.linkHref}if("`"===s){var p=i.formatting;t.highlightFormatting&&(i.formatting="code"),e.eatWhile("`");var d=e.current().length;if(0!=i.code||i.quote&&1!=d){if(d==i.code){var m=S(i);return i.code=0,m}return i.formatting=p,S(i)}return i.code=d,S(i)}if(i.code)return S(i);if("\\"===s&&(e.next(),t.highlightFormatting)){var f=S(i),h=a.formatting+"-escape";return f?f+" "+h:h}if("!"===s&&e.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return i.imageMarker=!0,i.image=!0,t.highlightFormatting&&(i.formatting="image"),S(i);if("["===s&&i.imageMarker&&e.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return i.imageMarker=!1,i.imageAltText=!0,t.highlightFormatting&&(i.formatting="image"),S(i);if("]"===s&&i.imageAltText){t.highlightFormatting&&(i.formatting="image");var f=S(i);return i.imageAltText=!1,i.image=!1,i.inline=i.f=$,f}if("["===s&&!i.image)return i.linkText&&e.match(/^.*?\]/)||(i.linkText=!0,t.highlightFormatting&&(i.formatting="link")),S(i);if("]"===s&&i.linkText){t.highlightFormatting&&(i.formatting="link");var f=S(i);return i.linkText=!1,i.inline=i.f=e.match(/\(.*?\)| ?\[.*?\]/,!1)?$:D,f}if("<"===s&&e.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=T,t.highlightFormatting&&(i.formatting="link"),(f=S(i))?f+=" ":f="",f+a.linkInline;if("<"===s&&e.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=T,t.highlightFormatting&&(i.formatting="link"),(f=S(i))?f+=" ":f="",f+a.linkEmail;if(t.xml&&"<"===s&&e.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var v=e.string.indexOf(">",e.pos);if(-1!=v){var b=e.string.substring(e.start,v);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(b)&&(i.md_inside=!0)}return e.backUp(1),i.htmlState=r.startState(n),y(e,i,C)}if(t.xml&&"<"===s&&e.match(/^\/\w*?>/))return i.md_inside=!1,"tag";if("*"===s||"_"===s){for(var x=1,w=1==e.pos?" ":e.string.charAt(e.pos-2);x<3&&e.eat(s);)x++;var k=e.peek()||" ",z=!/\s/.test(k)&&(!g.test(k)||/\s/.test(w)||g.test(w)),A=!/\s/.test(w)&&(!g.test(w)||/\s/.test(k)||g.test(k)),_=null,E=null;if(x%2&&(i.em||!z||"*"!==s&&A&&!g.test(w)?i.em!=s||!A||"*"!==s&&z&&!g.test(k)||(_=!1):_=!0),x>1&&(i.strong||!z||"*"!==s&&A&&!g.test(w)?i.strong!=s||!A||"*"!==s&&z&&!g.test(k)||(E=!1):E=!0),null!=E||null!=_)return t.highlightFormatting&&(i.formatting=null==_?"strong":null==E?"em":"strong em"),!0===_&&(i.em=s),!0===E&&(i.strong=s),m=S(i),!1===_&&(i.em=!1),!1===E&&(i.strong=!1),m}else if(" "===s&&(e.eat("*")||e.eat("_"))){if(" "===e.peek())return S(i);e.backUp(1)}if(t.strikethrough)if("~"===s&&e.eatWhile(s)){if(i.strikethrough)return t.highlightFormatting&&(i.formatting="strikethrough"),m=S(i),i.strikethrough=!1,m;if(e.match(/^[^\s]/,!1))return i.strikethrough=!0,t.highlightFormatting&&(i.formatting="strikethrough"),S(i)}else if(" "===s&&e.match("~~",!0)){if(" "===e.peek())return S(i);e.backUp(2)}if(t.emoji&&":"===s&&e.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){i.emoji=!0,t.highlightFormatting&&(i.formatting="emoji");var M=S(i);return i.emoji=!1,M}return" "===s&&(e.match(/^ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),S(i)}function T(e,r){if(">"===e.next()){r.f=r.inline=D,t.highlightFormatting&&(r.formatting="link");var n=S(r);return n?n+=" ":n="",n+a.linkInline}return e.match(/^[^>]+/,!0),a.linkInline}function $(e,r){if(e.eatSpace())return null;var n=e.next();return"("===n||"["===n?(r.f=r.inline=E("("===n?")":"]"),t.highlightFormatting&&(r.formatting="link-string"),r.linkHref=!0,S(r)):"error"}var _={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function E(e){return function(r,n){if(r.next()===e){n.f=n.inline=D,t.highlightFormatting&&(n.formatting="link-string");var i=S(n);return n.linkHref=!1,i}return r.match(_[e]),n.linkHref=!0,S(n)}}function M(e,r){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(r.f=L,e.next(),t.highlightFormatting&&(r.formatting="link"),r.linkText=!0,S(r)):b(e,r,D)}function L(e,r){if(e.match("]:",!0)){r.f=r.inline=I,t.highlightFormatting&&(r.formatting="link");var n=S(r);return r.linkText=!1,n}return e.match(/^([^\]\\]|\\.)+/,!0),a.linkText}function I(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),t.f=t.inline=D,a.linkHref+" url")}var O={startState:function(){return{f:k,prevLine:{stream:null},thisLine:{stream:null},block:k,htmlState:null,indentation:0,inline:D,text:A,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(e){return{f:e.f,prevLine:e.prevLine,thisLine:e.thisLine,block:e.block,htmlState:e.htmlState&&r.copyState(n,e.htmlState),indentation:e.indentation,localMode:e.localMode,localState:e.localMode?r.copyState(e.localMode,e.localState):null,inline:e.inline,text:e.text,formatting:!1,linkText:e.linkText,linkTitle:e.linkTitle,linkHref:e.linkHref,code:e.code,em:e.em,strong:e.strong,strikethrough:e.strikethrough,emoji:e.emoji,header:e.header,setext:e.setext,hr:e.hr,taskList:e.taskList,list:e.list,listStack:e.listStack.slice(0),quote:e.quote,indentedCode:e.indentedCode,trailingSpace:e.trailingSpace,trailingSpaceNewLine:e.trailingSpaceNewLine,md_inside:e.md_inside,fencedEndRE:e.fencedEndRE}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine.stream){if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0))return w(t),null;if(t.prevLine=t.thisLine,t.thisLine={stream:e},t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,!t.localState&&(t.f=t.block,t.f!=C)){var r=e.match(/^\s*/,!0)[0].replace(/\t/g,v).length;if(t.indentation=r,t.indentationDiff=null,r>0)return null}}return t.f(e,t)},innerMode:function(e){return e.block==C?{state:e.htmlState,mode:n}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:O}},indent:function(e,t,i){return e.block==C&&n.indent?n.indent(e.htmlState,t,i):e.localState&&e.localMode.indent?e.localMode.indent(e.localState,t,i):r.Pass},blankLine:w,getType:S,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return O}),"xml"),r.defineMIME("text/markdown","markdown"),r.defineMIME("text/x-markdown","markdown")})),tc((function(e,t){var r;(r=DC).overlayMode=function(e,t,n){return{startState:function(){return{base:r.startState(e),overlay:r.startState(t),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(n){return{base:r.copyState(e,n.base),overlay:r.copyState(t,n.overlay),basePos:n.basePos,baseCur:null,overlayPos:n.overlayPos,overlayCur:null}},token:function(r,i){return(r!=i.streamSeen||Math.min(i.basePos,i.overlayPos)<r.start)&&(i.streamSeen=r,i.basePos=i.overlayPos=r.start),r.start==i.basePos&&(i.baseCur=e.token(r,i.base),i.basePos=r.pos),r.start==i.overlayPos&&(r.pos=r.start,i.overlayCur=t.token(r,i.overlay),i.overlayPos=r.pos),r.pos=Math.min(i.basePos,i.overlayPos),null==i.overlayCur?i.baseCur:null!=i.baseCur&&i.overlay.combineTokens||n&&null==i.overlay.combineTokens?i.baseCur+" "+i.overlayCur:i.overlayCur},indent:e.indent&&function(t,r,n){return e.indent(t.base,r,n)},electricChars:e.electricChars,innerMode:function(t){return{state:t.base,mode:e}},blankLine:function(r){var i,o;return e.blankLine&&(i=e.blankLine(r.base)),t.blankLine&&(o=t.blankLine(r.overlay)),null==o?i:n&&null!=i?i+" "+o:o}}}}));tc((function(e,t){!function(e){function t(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function r(e){t(e);var r=e.state.placeholder=document.createElement("pre");r.style.cssText="height: 0; overflow: visible",r.style.direction=e.getOption("direction"),r.className="CodeMirror-placeholder CodeMirror-line-like";var n=e.getOption("placeholder");"string"==typeof n&&(n=document.createTextNode(n)),r.appendChild(n),e.display.lineSpace.insertBefore(r,e.display.lineSpace.firstChild)}function n(e){setTimeout((function(){var n=!1;if(1==e.lineCount()){var i=e.getInputField();n="TEXTAREA"==i.nodeName?!e.getLine(0).length:!/[^\u200b]/.test(i.querySelector(".CodeMirror-line").textContent)}n?r(e):t(e)}),20)}function i(e){a(e)&&r(e)}function o(e){var n=e.getWrapperElement(),i=a(e);n.className=n.className.replace(" CodeMirror-empty","")+(i?" CodeMirror-empty":""),i?r(e):t(e)}function a(e){return 1===e.lineCount()&&""===e.getLine(0)}e.defineOption("placeholder","",(function(r,a,s){var c=s&&s!=e.Init;if(a&&!c)r.on("blur",i),r.on("change",o),r.on("swapDoc",o),e.on(r.getInputField(),"compositionupdate",r.state.placeholderCompose=function(){n(r)}),o(r);else if(!a&&c){r.off("blur",i),r.off("change",o),r.off("swapDoc",o),e.off(r.getInputField(),"compositionupdate",r.state.placeholderCompose),t(r);var l=r.getWrapperElement();l.className=l.className.replace(" CodeMirror-empty","")}a&&!r.hasFocus()&&i(r)}))}(DC)})),tc((function(e,t){!function(e){function t(t,n){function i(){t.display.wrapper.offsetHeight?(r(t,n),t.display.lastWrapHeight!=t.display.wrapper.clientHeight&&t.refresh()):n.timeout=setTimeout(i,n.delay)}n.timeout=setTimeout(i,n.delay),n.hurry=function(){clearTimeout(n.timeout),n.timeout=setTimeout(i,50)},e.on(window,"mouseup",n.hurry),e.on(window,"keyup",n.hurry)}function r(t,r){clearTimeout(r.timeout),e.off(window,"mouseup",r.hurry),e.off(window,"keyup",r.hurry)}e.defineOption("autoRefresh",!1,(function(e,n){e.state.autoRefresh&&(r(e,e.state.autoRefresh),e.state.autoRefresh=null),n&&0==e.display.wrapper.offsetHeight&&t(e,e.state.autoRefresh={delay:n.delay||250})}))}(DC)})),tc((function(e,t){!function(e){function t(e){e.state.markedSelection&&e.operation((function(){l(e)}))}function r(e){e.state.markedSelection&&e.state.markedSelection.length&&e.operation((function(){s(e)}))}e.defineOption("styleSelectedText",!1,(function(n,i,o){var a=o&&o!=e.Init;i&&!a?(n.state.markedSelection=[],n.state.markedSelectionStyle="string"==typeof i?i:"CodeMirror-selectedtext",c(n),n.on("cursorActivity",t),n.on("change",r)):!i&&a&&(n.off("cursorActivity",t),n.off("change",r),s(n),n.state.markedSelection=n.state.markedSelectionStyle=null)}));var n=8,i=e.Pos,o=e.cmpPos;function a(e,t,r,a){if(0!=o(t,r))for(var s=e.state.markedSelection,c=e.state.markedSelectionStyle,l=t.line;;){var u=l==t.line?t:i(l,0),p=l+n,d=p>=r.line,m=d?r:i(p,0),f=e.markText(u,m,{className:c});if(null==a?s.push(f):s.splice(a++,0,f),d)break;l=p}}function s(e){for(var t=e.state.markedSelection,r=0;r<t.length;++r)t[r].clear();t.length=0}function c(e){s(e);for(var t=e.listSelections(),r=0;r<t.length;r++)a(e,t[r].from(),t[r].to())}function l(e){if(!e.somethingSelected())return s(e);if(e.listSelections().length>1)return c(e);var t=e.getCursor("start"),r=e.getCursor("end"),i=e.state.markedSelection;if(!i.length)return a(e,t,r);var l=i[0].find(),u=i[i.length-1].find();if(!l||!u||r.line-t.line<=n||o(t,u.to)>=0||o(r,l.from)<=0)return c(e);for(;o(t,l.from)>0;)i.shift().clear(),l=i[0].find();for(o(t,l.from)<0&&(l.to.line-t.line<n?(i.shift().clear(),a(e,t,l.to,0)):a(e,t,l.from,0));o(r,u.to)<0;)i.pop().clear(),u=i[i.length-1].find();o(r,u.to)>0&&(r.line-u.from.line<n?(i.pop().clear(),a(e,u.from,r)):a(e,u.to,r))}}(DC)})),tc((function(e,t){!function(e){var t,r,n=e.Pos;function i(e){var t=e.flags;return null!=t?t:(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}function o(e,t){for(var r=i(e),n=r,o=0;o<t.length;o++)-1==n.indexOf(t.charAt(o))&&(n+=t.charAt(o));return r==n?e:new RegExp(e.source,n)}function a(e){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source)}function s(e,t,r){t=o(t,"g");for(var i=r.line,a=r.ch,s=e.lastLine();i<=s;i++,a=0){t.lastIndex=a;var c=e.getLine(i),l=t.exec(c);if(l)return{from:n(i,l.index),to:n(i,l.index+l[0].length),match:l}}}function c(e,t,r){if(!a(t))return s(e,t,r);t=o(t,"gm");for(var i,c=1,l=r.line,u=e.lastLine();l<=u;){for(var p=0;p<c&&!(l>u);p++){var d=e.getLine(l++);i=null==i?d:i+"\n"+d}c*=2,t.lastIndex=r.ch;var m=t.exec(i);if(m){var f=i.slice(0,m.index).split("\n"),h=m[0].split("\n"),g=r.line+f.length-1,v=f[f.length-1].length;return{from:n(g,v),to:n(g+h.length-1,1==h.length?v+h[0].length:h[h.length-1].length),match:m}}}}function l(e,t,r){for(var n,i=0;i<=e.length;){t.lastIndex=i;var o=t.exec(e);if(!o)break;var a=o.index+o[0].length;if(a>e.length-r)break;(!n||a>n.index+n[0].length)&&(n=o),i=o.index+1}return n}function u(e,t,r){t=o(t,"g");for(var i=r.line,a=r.ch,s=e.firstLine();i>=s;i--,a=-1){var c=e.getLine(i),u=l(c,t,a<0?0:c.length-a);if(u)return{from:n(i,u.index),to:n(i,u.index+u[0].length),match:u}}}function p(e,t,r){if(!a(t))return u(e,t,r);t=o(t,"gm");for(var i,s=1,c=e.getLine(r.line).length-r.ch,p=r.line,d=e.firstLine();p>=d;){for(var m=0;m<s&&p>=d;m++){var f=e.getLine(p--);i=null==i?f:f+"\n"+i}s*=2;var h=l(i,t,c);if(h){var g=i.slice(0,h.index).split("\n"),v=h[0].split("\n"),b=p+g.length,y=g[g.length-1].length;return{from:n(b,y),to:n(b+v.length-1,1==v.length?y+v[0].length:v[v.length-1].length),match:h}}}}function d(e,t,r,n){if(e.length==t.length)return r;for(var i=0,o=r+Math.max(0,e.length-t.length);;){if(i==o)return i;var a=i+o>>1,s=n(e.slice(0,a)).length;if(s==r)return a;s>r?o=a:i=a+1}}function m(e,i,o,a){if(!i.length)return null;var s=a?t:r,c=s(i).split(/\r|\n\r?/);e:for(var l=o.line,u=o.ch,p=e.lastLine()+1-c.length;l<=p;l++,u=0){var m=e.getLine(l).slice(u),f=s(m);if(1==c.length){var h=f.indexOf(c[0]);if(-1==h)continue e;return o=d(m,f,h,s)+u,{from:n(l,d(m,f,h,s)+u),to:n(l,d(m,f,h+c[0].length,s)+u)}}var g=f.length-c[0].length;if(f.slice(g)==c[0]){for(var v=1;v<c.length-1;v++)if(s(e.getLine(l+v))!=c[v])continue e;var b=e.getLine(l+c.length-1),y=s(b),x=c[c.length-1];if(y.slice(0,x.length)==x)return{from:n(l,d(m,f,g,s)+u),to:n(l+c.length-1,d(b,y,x.length,s))}}}}function f(e,i,o,a){if(!i.length)return null;var s=a?t:r,c=s(i).split(/\r|\n\r?/);e:for(var l=o.line,u=o.ch,p=e.firstLine()-1+c.length;l>=p;l--,u=-1){var m=e.getLine(l);u>-1&&(m=m.slice(0,u));var f=s(m);if(1==c.length){var h=f.lastIndexOf(c[0]);if(-1==h)continue e;return{from:n(l,d(m,f,h,s)),to:n(l,d(m,f,h+c[0].length,s))}}var g=c[c.length-1];if(f.slice(0,g.length)==g){var v=1;for(o=l-c.length+1;v<c.length-1;v++)if(s(e.getLine(o+v))!=c[v])continue e;var b=e.getLine(l+1-c.length),y=s(b);if(y.slice(y.length-c[0].length)==c[0])return{from:n(l+1-c.length,d(b,y,b.length-c[0].length,s)),to:n(l,d(m,f,g.length,s))}}}}function h(e,t,r,i){var a;this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=e,r=r?e.clipPos(r):n(0,0),this.pos={from:r,to:r},"object"==typeof i?a=i.caseFold:(a=i,i=null),"string"==typeof t?(null==a&&(a=!1),this.matches=function(r,n){return(r?f:m)(e,t,n,a)}):(t=o(t,"gm"),i&&!1===i.multiline?this.matches=function(r,n){return(r?u:s)(e,t,n)}:this.matches=function(r,n){return(r?p:c)(e,t,n)})}String.prototype.normalize?(t=function(e){return e.normalize("NFD").toLowerCase()},r=function(e){return e.normalize("NFD")}):(t=function(e){return e.toLowerCase()},r=function(e){return e}),h.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(t){var r=this.doc.clipPos(t?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(r=n(r.line,r.ch),t?(r.ch--,r.ch<0&&(r.line--,r.ch=(this.doc.getLine(r.line)||"").length)):(r.ch++,r.ch>(this.doc.getLine(r.line)||"").length&&(r.ch=0,r.line++)),0!=e.cmpPos(r,this.doc.clipPos(r))))return this.atOccurrence=!1;var i=this.matches(t,r);if(this.afterEmptyMatch=i&&0==e.cmpPos(i.from,i.to),i)return this.pos=i,this.atOccurrence=!0,this.pos.match||!0;var o=n(t?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:o,to:o},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(t,r){if(this.atOccurrence){var i=e.splitLines(t);this.doc.replaceRange(i,this.pos.from,this.pos.to,r),this.pos.to=n(this.pos.from.line+i.length-1,i[i.length-1].length+(1==i.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",(function(e,t,r){return new h(this.doc,e,t,r)})),e.defineDocExtension("getSearchCursor",(function(e,t,r){return new h(this,e,t,r)})),e.defineExtension("selectMatches",(function(t,r){for(var n=[],i=this.getSearchCursor(t,this.getCursor("from"),r);i.findNext()&&!(e.cmpPos(i.to(),this.getCursor("to"))>0);)n.push({anchor:i.from(),head:i.to()});n.length&&this.setSelections(n,0)}))}(DC)})),tc((function(e,t){var r,n;n=/^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i,(r=DC).defineMode("gfm",(function(e,t){var i=0;function o(e){return e.code=!1,null}var a={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(e){return{code:e.code,codeBlock:e.codeBlock,ateSpace:e.ateSpace}},token:function(e,r){if(r.combineTokens=null,r.codeBlock)return e.match(/^```+/)?(r.codeBlock=!1,null):(e.skipToEnd(),null);if(e.sol()&&(r.code=!1),e.sol()&&e.match(/^```+/))return e.skipToEnd(),r.codeBlock=!0,null;if("`"===e.peek()){e.next();var o=e.pos;e.eatWhile("`");var a=1+e.pos-o;return r.code?a===i&&(r.code=!1):(i=a,r.code=!0),null}if(r.code)return e.next(),null;if(e.eatSpace())return r.ateSpace=!0,null;if((e.sol()||r.ateSpace)&&(r.ateSpace=!1,!1!==t.gitHubSpice)){if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/))return r.combineTokens=!0,"link";if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return r.combineTokens=!0,"link"}return e.match(n)&&"]("!=e.string.slice(e.start-2,e.start)&&(0==e.start||/\W/.test(e.string.charAt(e.start-1)))?(r.combineTokens=!0,"link"):(e.next(),null)},blankLine:o},s={taskLists:!0,strikethrough:!0,emoji:!0};for(var c in t)s[c]=t[c];return s.name="markdown",r.overlayMode(r.getMode(e,s),a)}),"markdown"),r.defineMIME("text/x-gfm","gfm")}));var TC=tc((function(t){var r;(r=function(e,t,r,n){n=n||{},this.dictionary=null,this.rules={},this.dictionaryTable={},this.compoundRules=[],this.compoundRuleCodes={},this.replacementTable=[],this.flags=n.flags||{},this.memoized={},this.loaded=!1;var i,o,a,s,c,l=this;function u(e,t){var r=l._readFile(e,null,n.asyncLoad);n.asyncLoad?r.then((function(e){t(e)})):t(r)}function p(e){t=e,r&&m()}function d(e){r=e,t&&m()}function m(){for(l.rules=l._parseAFF(t),l.compoundRuleCodes={},o=0,s=l.compoundRules.length;o<s;o++){var e=l.compoundRules[o];for(a=0,c=e.length;a<c;a++)l.compoundRuleCodes[e[a]]=[]}for(o in"ONLYINCOMPOUND"in l.flags&&(l.compoundRuleCodes[l.flags.ONLYINCOMPOUND]=[]),l.dictionaryTable=l._parseDIC(r),l.compoundRuleCodes)0===l.compoundRuleCodes[o].length&&delete l.compoundRuleCodes[o];for(o=0,s=l.compoundRules.length;o<s;o++){var i=l.compoundRules[o],u="";for(a=0,c=i.length;a<c;a++){var p=i[a];p in l.compoundRuleCodes?u+="("+l.compoundRuleCodes[p].join("|")+")":u+=p}l.compoundRules[o]=new RegExp(u,"i")}l.loaded=!0,n.asyncLoad&&n.loadedCallback&&n.loadedCallback(l)}return e&&(l.dictionary=e,t&&r?m():"undefined"!=typeof window&&"chrome"in window&&"extension"in window.chrome&&"getURL"in window.chrome.extension?(i=n.dictionaryPath?n.dictionaryPath:"typo/dictionaries",t||u(chrome.extension.getURL(i+"/"+e+"/"+e+".aff"),p),r||u(chrome.extension.getURL(i+"/"+e+"/"+e+".dic"),d)):(i=n.dictionaryPath?n.dictionaryPath:"undefined"!=typeof __dirname?__dirname+"/dictionaries":"./dictionaries",t||u(i+"/"+e+"/"+e+".aff",p),r||u(i+"/"+e+"/"+e+".dic",d))),this}).prototype={load:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);return this},_readFile:function(t,r,n){if(r=r||"utf8","undefined"!=typeof XMLHttpRequest){var i,o=new XMLHttpRequest;return o.open("GET",t,n),n&&(i=new Promise((function(e,t){o.onload=function(){200===o.status?e(o.responseText):t(o.statusText)},o.onerror=function(){t(o.statusText)}}))),o.overrideMimeType&&o.overrideMimeType("text/plain; charset="+r),o.send(null),n?i:o.responseText}var a=e;try{if(a.existsSync(t))return a.readFileSync(t,r);console.log("Path "+t+" does not exist.")}catch(e){return console.log(e),""}},_parseAFF:function(e){var t,r,n,i,o,a,s,c={},l=e.split(/\r?\n/);for(i=0,a=l.length;i<a;i++)if(t=(t=this._removeAffixComments(l[i])).trim()){var u=t.split(/\s+/),p=u[0];if("PFX"==p||"SFX"==p){var d=u[1],m=u[2],f=[];for(o=i+1,s=i+1+(r=parseInt(u[3],10));o<s;o++){var h=(n=l[o].split(/\s+/))[2],g=n[3].split("/"),v=g[0];"0"===v&&(v="");var b=this.parseRuleCodes(g[1]),y=n[4],x={};x.add=v,b.length>0&&(x.continuationClasses=b),"."!==y&&(x.match="SFX"===p?new RegExp(y+"$"):new RegExp("^"+y)),"0"!=h&&(x.remove="SFX"===p?new RegExp(h+"$"):h),f.push(x)}c[d]={type:p,combineable:"Y"==m,entries:f},i+=r}else if("COMPOUNDRULE"===p){for(o=i+1,s=i+1+(r=parseInt(u[1],10));o<s;o++)n=(t=l[o]).split(/\s+/),this.compoundRules.push(n[1]);i+=r}else"REP"===p?3===(n=t.split(/\s+/)).length&&this.replacementTable.push([n[1],n[2]]):this.flags[p]=u[1]}return c},_removeAffixComments:function(e){return e.match(/^\s*#/,"")?"":e},_parseDIC:function(e){var t=(e=this._removeDicComments(e)).split(/\r?\n/),r={};function n(e,t){r.hasOwnProperty(e)||(r[e]=null),t.length>0&&(null===r[e]&&(r[e]=[]),r[e].push(t))}for(var i=1,o=t.length;i<o;i++){var a=t[i];if(a){var s=a.split("/",2),c=s[0];if(s.length>1){var l=this.parseRuleCodes(s[1]);"NEEDAFFIX"in this.flags&&-1!=l.indexOf(this.flags.NEEDAFFIX)||n(c,l);for(var u=0,p=l.length;u<p;u++){var d=l[u],m=this.rules[d];if(m)for(var f=this._applyRule(c,m),h=0,g=f.length;h<g;h++){var v=f[h];if(n(v,[]),m.combineable)for(var b=u+1;b<p;b++){var y=l[b],x=this.rules[y];if(x&&x.combineable&&m.type!=x.type)for(var w=this._applyRule(v,x),k=0,C=w.length;k<C;k++)n(w[k],[])}}d in this.compoundRuleCodes&&this.compoundRuleCodes[d].push(c)}}else n(c.trim(),[])}}return r},_removeDicComments:function(e){return e=e.replace(/^\t.*$/gm,"")},parseRuleCodes:function(e){if(!e)return[];if(!("FLAG"in this.flags))return e.split("");if("long"===this.flags.FLAG){for(var t=[],r=0,n=e.length;r<n;r+=2)t.push(e.substr(r,2));return t}return"num"===this.flags.FLAG?e.split(","):void 0},_applyRule:function(e,t){for(var r=t.entries,n=[],i=0,o=r.length;i<o;i++){var a=r[i];if(!a.match||e.match(a.match)){var s=e;if(a.remove&&(s=s.replace(a.remove,"")),"SFX"===t.type?s+=a.add:s=a.add+s,n.push(s),"continuationClasses"in a)for(var c=0,l=a.continuationClasses.length;c<l;c++){var u=this.rules[a.continuationClasses[c]];u&&(n=n.concat(this._applyRule(s,u)))}}}return n},check:function(e){if(!this.loaded)throw"Dictionary not loaded.";var t=e.replace(/^\s\s*/,"").replace(/\s\s*$/,"");if(this.checkExact(t))return!0;if(t.toUpperCase()===t){var r=t[0]+t.substring(1).toLowerCase();if(this.hasFlag(r,"KEEPCASE"))return!1;if(this.checkExact(r))return!0;if(this.checkExact(t.toLowerCase()))return!0}var n=t[0].toLowerCase()+t.substring(1);if(n!==t){if(this.hasFlag(n,"KEEPCASE"))return!1;if(this.checkExact(n))return!0}return!1},checkExact:function(e){if(!this.loaded)throw"Dictionary not loaded.";var t,r,n=this.dictionaryTable[e];if(void 0===n){if("COMPOUNDMIN"in this.flags&&e.length>=this.flags.COMPOUNDMIN)for(t=0,r=this.compoundRules.length;t<r;t++)if(e.match(this.compoundRules[t]))return!0}else{if(null===n)return!0;if("object"==typeof n)for(t=0,r=n.length;t<r;t++)if(!this.hasFlag(e,"ONLYINCOMPOUND",n[t]))return!0}return!1},hasFlag:function(e,t,r){if(!this.loaded)throw"Dictionary not loaded.";return!(!(t in this.flags)||(void 0===r&&(r=Array.prototype.concat.apply([],this.dictionaryTable[e])),!r||-1===r.indexOf(this.flags[t])))},alphabet:"",suggest:function(e,t){if(!this.loaded)throw"Dictionary not loaded.";if(t=t||5,this.memoized.hasOwnProperty(e)){var r=this.memoized[e].limit;if(t<=r||this.memoized[e].suggestions.length<r)return this.memoized[e].suggestions.slice(0,t)}if(this.check(e))return[];for(var n=0,i=this.replacementTable.length;n<i;n++){var o=this.replacementTable[n];if(-1!==e.indexOf(o[0])){var a=e.replace(o[0],o[1]);if(this.check(a))return[a]}}var s=this;function c(e,t){var r,n,i,o,a={},c=s.alphabet.length;if("string"==typeof e){var l=e;(e={})[l]=!0}for(var l in e)for(r=0,i=l.length+1;r<i;r++){var u=[l.substring(0,r),l.substring(r)];if(u[1]&&(o=u[0]+u[1].substring(1),t&&!s.check(o)||(o in a?a[o]+=1:a[o]=1)),u[1].length>1&&u[1][1]!==u[1][0]&&(o=u[0]+u[1][1]+u[1][0]+u[1].substring(2),t&&!s.check(o)||(o in a?a[o]+=1:a[o]=1)),u[1]){var p=u[1].substring(0,1).toUpperCase()===u[1].substring(0,1)?"uppercase":"lowercase";for(n=0;n<c;n++){var d=s.alphabet[n];"uppercase"===p&&(d=d.toUpperCase()),d!=u[1].substring(0,1)&&(o=u[0]+d+u[1].substring(1),t&&!s.check(o)||(o in a?a[o]+=1:a[o]=1))}}if(u[1])for(n=0;n<c;n++)p=u[0].substring(-1).toUpperCase()===u[0].substring(-1)&&u[1].substring(0,1).toUpperCase()===u[1].substring(0,1)?"uppercase":"lowercase",d=s.alphabet[n],"uppercase"===p&&(d=d.toUpperCase()),o=u[0]+d+u[1],t&&!s.check(o)||(o in a?a[o]+=1:a[o]=1)}return a}return s.alphabet="abcdefghijklmnopqrstuvwxyz",this.memoized[e]={suggestions:function(e){var r,n=c(e),i=c(n,!0);for(var o in n)s.check(o)&&(o in i?i[o]+=n[o]:i[o]=n[o]);var a=[];for(r in i)i.hasOwnProperty(r)&&a.push([r,i[r]]);a.sort((function(e,t){var r=e[1],n=t[1];return r<n?-1:r>n?1:t[0].localeCompare(e[0])})).reverse();var l=[],u="lowercase";e.toUpperCase()===e?u="uppercase":e.substr(0,1).toUpperCase()+e.substr(1).toLowerCase()===e&&(u="capitalized");var p=t;for(r=0;r<Math.min(p,a.length);r++)"uppercase"===u?a[r][0]=a[r][0].toUpperCase():"capitalized"===u&&(a[r][0]=a[r][0].substr(0,1).toUpperCase()+a[r][0].substr(1)),s.hasFlag(a[r][0],"NOSUGGEST")||-1!=l.indexOf(a[r][0])?p++:l.push(a[r][0]);return l}(e),limit:t},this.memoized[e].suggestions}},t.exports=r}));function $C(e){"function"==typeof(e=e||{}).codeMirrorInstance&&"function"==typeof e.codeMirrorInstance.defineMode?(String.prototype.includes||(String.prototype.includes=function(){return-1!==String.prototype.indexOf.apply(this,arguments)}),e.codeMirrorInstance.defineMode("spell-checker",(function(t){if(!$C.aff_loading){$C.aff_loading=!0;var r=new XMLHttpRequest;r.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.aff",!0),r.onload=function(){4===r.readyState&&200===r.status&&($C.aff_data=r.responseText,$C.num_loaded++,2==$C.num_loaded&&($C.typo=new TC("en_US",$C.aff_data,$C.dic_data,{platform:"any"})))},r.send(null)}if(!$C.dic_loading){$C.dic_loading=!0;var n=new XMLHttpRequest;n.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.dic",!0),n.onload=function(){4===n.readyState&&200===n.status&&($C.dic_data=n.responseText,$C.num_loaded++,2==$C.num_loaded&&($C.typo=new TC("en_US",$C.aff_data,$C.dic_data,{platform:"any"})))},n.send(null)}var i='!"#$%&()*+,-./:;<=>?@[\\]^_`{|}~ ',o={token:function(e){var t=e.peek(),r="";if(i.includes(t))return e.next(),null;for(;null!=(t=e.peek())&&!i.includes(t);)r+=t,e.next();return $C.typo&&!$C.typo.check(r)?"spell-error":null}},a=e.codeMirrorInstance.getMode(t,t.backdrop||"text/plain");return e.codeMirrorInstance.overlayMode(a,o,!0)}))):console.log("CodeMirror Spell Checker: You must provide an instance of CodeMirror via the option `codeMirrorInstance`")}$C.num_loaded=0,$C.aff_loading=!1,$C.dic_loading=!1,$C.aff_data="",$C.dic_data="";var _C=$C,EC=tc((function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}Object.defineProperty(t,"__esModule",{value:!0}),t.defaults={baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};var a=/[&<>"']/,s=/[&<>"']/g,c=/[<>"']|&(?!#?\w+;)/,l=/[<>"']|&(?!#?\w+;)/g,u={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},p=function(e){return u[e]};function d(e,t){if(t){if(a.test(e))return e.replace(s,p)}else if(c.test(e))return e.replace(l,p);return e}var m=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function f(e){return e.replace(m,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var h=/(^|[^\[])\^/g;function g(e,t){e=e.source||e,t=t||"";var r={replace:function(t,n){return n=(n=n.source||n).replace(h,"$1"),e=e.replace(t,n),r},getRegex:function(){return new RegExp(e,t)}};return r}var v=/[^\w:]/g,b=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function y(e,t,r){if(e){var n;try{n=decodeURIComponent(f(r)).replace(v,"").toLowerCase()}catch(e){return null}if(0===n.indexOf("javascript:")||0===n.indexOf("vbscript:")||0===n.indexOf("data:"))return null}t&&!b.test(r)&&(r=function(e,t){x[" "+e]||(w.test(e)?x[" "+e]=e+"/":x[" "+e]=D(e,"/",!0));var r=-1===(e=x[" "+e]).indexOf(":");return"//"===t.substring(0,2)?r?t:e.replace(k,"$1")+t:"/"===t.charAt(0)?r?t:e.replace(C,"$1")+t:e+t}(t,r));try{r=encodeURI(r).replace(/%25/g,"%")}catch(e){return null}return r}var x={},w=/^[^:]+:\/*[^/]*$/,k=/^([^:]+:)[\s\S]*$/,C=/^([^:]+:\/*[^/]*)[\s\S]*$/;var z={exec:function(){}};function S(e){for(var t,r,n=1;n<arguments.length;n++)for(r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}function A(e,t){var r=e.replace(/\|/g,(function(e,t,r){for(var n=!1,i=t;--i>=0&&"\\"===r[i];)n=!n;return n?"|":" |"})).split(/ \|/),n=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;n<r.length;n++)r[n]=r[n].trim().replace(/\\\|/g,"|");return r}function D(e,t,r){var n=e.length;if(0===n)return"";for(var i=0;i<n;){var o=e.charAt(n-i-1);if(o!==t||r){if(o===t||!r)break;i++}else i++}return e.substr(0,n-i)}function T(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function $(e,t){if(t<1)return"";for(var r="";t>1;)1&t&&(r+=e),t>>=1,e+=e;return r+e}function _(e,t,r,n){var i=t.href,o=t.title?d(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){n.state.inLink=!0;var s={type:"link",raw:r,href:i,title:o,text:a,tokens:n.inlineTokens(a,[])};return n.state.inLink=!1,s}return{type:"image",raw:r,href:i,title:o,text:d(a)}}var E=function(){function e(e){this.options=e||t.defaults}var r=e.prototype;return r.space=function(e){var t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}},r.code=function(e){var t=this.rules.block.code.exec(e);if(t){var r=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?r:D(r,"\n")}}},r.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var r=t[0],n=function(e,t){var r=e.match(/^(\s+)(?:```)/);if(null===r)return t;var n=r[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=n.length?e.slice(n.length):e})).join("\n")}(r,t[3]||"");return{type:"code",raw:r,lang:t[2]?t[2].trim():t[2],text:n}}},r.heading=function(e){var t=this.rules.block.heading.exec(e);if(t){var r=t[2].trim();if(/#$/.test(r)){var n=D(r,"#");this.options.pedantic?r=n.trim():n&&!/ $/.test(n)||(r=n.trim())}var i={type:"heading",raw:t[0],depth:t[1].length,text:r,tokens:[]};return this.lexer.inline(i.text,i.tokens),i}},r.hr=function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}},r.blockquote=function(e){var t=this.rules.block.blockquote.exec(e);if(t){var r=t[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(r,[]),text:r}}},r.list=function(e){var t=this.rules.block.list.exec(e);if(t){var r,n,o,a,s,c,l,u,p,d,m,f,h=t[1].trim(),g=h.length>1,v={type:"list",raw:"",ordered:g,start:g?+h.slice(0,-1):"",loose:!1,items:[]};h=g?"\\d{1,9}\\"+h.slice(-1):"\\"+h,this.options.pedantic&&(h=g?h:"[*+-]");for(var b=new RegExp("^( {0,3}"+h+")((?: [^\\n]*)?(?:\\n|$))");e&&(f=!1,t=b.exec(e))&&!this.rules.block.hr.test(e);){if(r=t[0],e=e.substring(r.length),u=t[2].split("\n",1)[0],p=e.split("\n",1)[0],this.options.pedantic?(a=2,m=u.trimLeft()):(a=(a=t[2].search(/[^ ]/))>4?1:a,m=u.slice(a),a+=t[1].length),c=!1,!u&&/^ *$/.test(p)&&(r+=p+"\n",e=e.substring(p.length+1),f=!0),!f)for(var y=new RegExp("^ {0,"+Math.min(3,a-1)+"}(?:[*+-]|\\d{1,9}[.)])");e&&(u=d=e.split("\n",1)[0],this.options.pedantic&&(u=u.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!y.test(u));){if(u.search(/[^ ]/)>=a||!u.trim())m+="\n"+u.slice(a);else{if(c)break;m+="\n"+u}c||u.trim()||(c=!0),r+=d+"\n",e=e.substring(d.length+1)}v.loose||(l?v.loose=!0:/\n *\n *$/.test(r)&&(l=!0)),this.options.gfm&&(n=/^\[[ xX]\] /.exec(m))&&(o="[ ] "!==n[0],m=m.replace(/^\[[ xX]\] +/,"")),v.items.push({type:"list_item",raw:r,task:!!n,checked:o,loose:!1,text:m}),v.raw+=r}v.items[v.items.length-1].raw=r.trimRight(),v.items[v.items.length-1].text=m.trimRight(),v.raw=v.raw.trimRight();var x=v.items.length;for(s=0;s<x;s++){this.lexer.state.top=!1,v.items[s].tokens=this.lexer.blockTokens(v.items[s].text,[]);var w=v.items[s].tokens.filter((function(e){return"space"===e.type})),k=w.every((function(e){for(var t,r=0,n=i(e.raw.split(""));!(t=n()).done;){if("\n"===t.value&&(r+=1),r>1)return!0}return!1}));!v.loose&&w.length&&k&&(v.loose=!0,v.items[s].loose=!0)}return v}},r.html=function(e){var t=this.rules.block.html.exec(e);if(t){var r={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};return this.options.sanitize&&(r.type="paragraph",r.text=this.options.sanitizer?this.options.sanitizer(t[0]):d(t[0]),r.tokens=[],this.lexer.inline(r.text,r.tokens)),r}},r.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},r.table=function(e){var t=this.rules.block.table.exec(e);if(t){var r={type:"table",header:A(t[1]).map((function(e){return{text:e}})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(r.header.length===r.align.length){r.raw=t[0];var n,i,o,a,s=r.align.length;for(n=0;n<s;n++)/^ *-+: *$/.test(r.align[n])?r.align[n]="right":/^ *:-+: *$/.test(r.align[n])?r.align[n]="center":/^ *:-+ *$/.test(r.align[n])?r.align[n]="left":r.align[n]=null;for(s=r.rows.length,n=0;n<s;n++)r.rows[n]=A(r.rows[n],r.header.length).map((function(e){return{text:e}}));for(s=r.header.length,i=0;i<s;i++)r.header[i].tokens=[],this.lexer.inlineTokens(r.header[i].text,r.header[i].tokens);for(s=r.rows.length,i=0;i<s;i++)for(a=r.rows[i],o=0;o<a.length;o++)a[o].tokens=[],this.lexer.inlineTokens(a[o].text,a[o].tokens);return r}}},r.lheading=function(e){var t=this.rules.block.lheading.exec(e);if(t){var r={type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:[]};return this.lexer.inline(r.text,r.tokens),r}},r.paragraph=function(e){var t=this.rules.block.paragraph.exec(e);if(t){var r={type:"paragraph",raw:t[0],text:"\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1],tokens:[]};return this.lexer.inline(r.text,r.tokens),r}},r.text=function(e){var t=this.rules.block.text.exec(e);if(t){var r={type:"text",raw:t[0],text:t[0],tokens:[]};return this.lexer.inline(r.text,r.tokens),r}},r.escape=function(e){var t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:d(t[1])}},r.tag=function(e){var t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):d(t[0]):t[0]}},r.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var r=t[2].trim();if(!this.options.pedantic&&/^</.test(r)){if(!/>$/.test(r))return;var n=D(r.slice(0,-1),"\\");if((r.length-n.length)%2==0)return}else{var i=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var r=e.length,n=0,i=0;i<r;i++)if("\\"===e[i])i++;else if(e[i]===t[0])n++;else if(e[i]===t[1]&&--n<0)return i;return-1}(t[2],"()");if(i>-1){var o=(0===t[0].indexOf("!")?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,o).trim(),t[3]=""}}var a=t[2],s="";if(this.options.pedantic){var c=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(a);c&&(a=c[1],s=c[3])}else s=t[3]?t[3].slice(1,-1):"";return a=a.trim(),/^</.test(a)&&(a=this.options.pedantic&&!/>$/.test(r)?a.slice(1):a.slice(1,-1)),_(t,{href:a?a.replace(this.rules.inline._escapes,"$1"):a,title:s?s.replace(this.rules.inline._escapes,"$1"):s},t[0],this.lexer)}},r.reflink=function(e,t){var r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){var n=(r[2]||r[1]).replace(/\s+/g," ");if(!(n=t[n.toLowerCase()])||!n.href){var i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return _(r,n,r[0],this.lexer)}},r.emStrong=function(e,t,r){void 0===r&&(r="");var n=this.rules.inline.emStrong.lDelim.exec(e);if(n&&(!n[3]||!r.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var i=n[1]||n[2]||"";if(!i||i&&(""===r||this.rules.inline.punctuation.exec(r))){var o,a,s=n[0].length-1,c=s,l=0,u="*"===n[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+s);null!=(n=u.exec(t));)if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6])if(a=o.length,n[3]||n[4])c+=a;else if(!((n[5]||n[6])&&s%3)||(s+a)%3){if(!((c-=a)>0)){if(a=Math.min(a,a+c+l),Math.min(s,a)%2){var p=e.slice(1,s+n.index+a);return{type:"em",raw:e.slice(0,s+n.index+a+1),text:p,tokens:this.lexer.inlineTokens(p,[])}}var d=e.slice(2,s+n.index+a-1);return{type:"strong",raw:e.slice(0,s+n.index+a+1),text:d,tokens:this.lexer.inlineTokens(d,[])}}}else l+=a}}},r.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var r=t[2].replace(/\n/g," "),n=/[^ ]/.test(r),i=/^ /.test(r)&&/ $/.test(r);return n&&i&&(r=r.substring(1,r.length-1)),r=d(r,!0),{type:"codespan",raw:t[0],text:r}}},r.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},r.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2],[])}},r.autolink=function(e,t){var r,n,i=this.rules.inline.autolink.exec(e);if(i)return n="@"===i[2]?"mailto:"+(r=d(this.options.mangle?t(i[1]):i[1])):r=d(i[1]),{type:"link",raw:i[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}},r.url=function(e,t){var r;if(r=this.rules.inline.url.exec(e)){var n,i;if("@"===r[2])i="mailto:"+(n=d(this.options.mangle?t(r[0]):r[0]));else{var o;do{o=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0]}while(o!==r[0]);n=d(r[0]),i="www."===r[1]?"http://"+n:n}return{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}},r.inlineText=function(e,t){var r,n=this.rules.inline.text.exec(e);if(n)return r=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):d(n[0]):n[0]:d(this.options.smartypants?t(n[0]):n[0]),{type:"text",raw:n[0],text:r}},e}(),M={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)( [^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?<?([^\s>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:z,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};M.def=g(M.def).replace("label",M._label).replace("title",M._title).getRegex(),M.bullet=/(?:[*+-]|\d{1,9}[.)])/,M.listItemStart=g(/^( *)(bull) */).replace("bull",M.bullet).getRegex(),M.list=g(M.list).replace(/bull/g,M.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+M.def.source+")").getRegex(),M._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",M._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,M.html=g(M.html,"i").replace("comment",M._comment).replace("tag",M._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),M.paragraph=g(M._paragraph).replace("hr",M.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",M._tag).getRegex(),M.blockquote=g(M.blockquote).replace("paragraph",M.paragraph).getRegex(),M.normal=S({},M),M.gfm=S({},M.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),M.gfm.table=g(M.gfm.table).replace("hr",M.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",M._tag).getRegex(),M.gfm.paragraph=g(M._paragraph).replace("hr",M.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",M.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",M._tag).getRegex(),M.pedantic=S({},M.normal,{html:g("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",M._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:z,paragraph:g(M.normal._paragraph).replace("hr",M.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",M.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var L={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:z,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:z,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};function I(e){return e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function O(e){var t,r,n="",i=e.length;for(t=0;t<i;t++)r=e.charCodeAt(t),Math.random()>.5&&(r="x"+r.toString(16)),n+="&#"+r+";";return n}L._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",L.punctuation=g(L.punctuation).replace(/punctuation/g,L._punctuation).getRegex(),L.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,L.escapedEmSt=/\\\*|\\_/g,L._comment=g(M._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),L.emStrong.lDelim=g(L.emStrong.lDelim).replace(/punct/g,L._punctuation).getRegex(),L.emStrong.rDelimAst=g(L.emStrong.rDelimAst,"g").replace(/punct/g,L._punctuation).getRegex(),L.emStrong.rDelimUnd=g(L.emStrong.rDelimUnd,"g").replace(/punct/g,L._punctuation).getRegex(),L._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,L._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,L._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,L.autolink=g(L.autolink).replace("scheme",L._scheme).replace("email",L._email).getRegex(),L._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,L.tag=g(L.tag).replace("comment",L._comment).replace("attribute",L._attribute).getRegex(),L._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,L._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,L._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,L.link=g(L.link).replace("label",L._label).replace("href",L._href).replace("title",L._title).getRegex(),L.reflink=g(L.reflink).replace("label",L._label).replace("ref",M._label).getRegex(),L.nolink=g(L.nolink).replace("ref",M._label).getRegex(),L.reflinkSearch=g(L.reflinkSearch,"g").replace("reflink",L.reflink).replace("nolink",L.nolink).getRegex(),L.normal=S({},L),L.pedantic=S({},L.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:g(/^!?\[(label)\]\((.*?)\)/).replace("label",L._label).getRegex(),reflink:g(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",L._label).getRegex()}),L.gfm=S({},L.normal,{escape:g(L.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),L.gfm.url=g(L.gfm.url,"i").replace("email",L.gfm._extended_email).getRegex(),L.breaks=S({},L.gfm,{br:g(L.br).replace("{2,}","*").getRegex(),text:g(L.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var B=function(){function e(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||t.defaults,this.options.tokenizer=this.options.tokenizer||new E,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};var r={block:M.normal,inline:L.normal};this.options.pedantic?(r.block=M.pedantic,r.inline=L.pedantic):this.options.gfm&&(r.block=M.gfm,this.options.breaks?r.inline=L.breaks:r.inline=L.gfm),this.tokenizer.rules=r}e.lex=function(t,r){return new e(r).lex(t)},e.lexInline=function(t,r){return new e(r).inlineTokens(t)};var n,i,o,a=e.prototype;return a.lex=function(e){var t;for(e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens);t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens},a.blockTokens=function(e,t){var r,n,i,o,a=this;for(void 0===t&&(t=[]),this.options.pedantic&&(e=e.replace(/^ +$/gm,""));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((function(n){return!!(r=n.call({lexer:a},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)}))))if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),1===r.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(r);else if(r=this.tokenizer.code(e))e=e.substring(r.raw.length),!(n=t[t.length-1])||"paragraph"!==n.type&&"text"!==n.type?t.push(r):(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.list(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.html(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.def(e))e=e.substring(r.raw.length),!(n=t[t.length-1])||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title}):(n.raw+="\n"+r.raw,n.text+="\n"+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(r=this.tokenizer.table(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.lheading(e))e=e.substring(r.raw.length),t.push(r);else if(i=e,this.options.extensions&&this.options.extensions.startBlock&&function(){var t=1/0,r=e.slice(1),n=void 0;a.options.extensions.startBlock.forEach((function(e){"number"==typeof(n=e.call({lexer:this},r))&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}(),this.state.top&&(r=this.tokenizer.paragraph(i)))n=t[t.length-1],o&&"paragraph"===n.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(r),o=i.length!==e.length,e=e.substring(r.raw.length);else if(r=this.tokenizer.text(e))e=e.substring(r.raw.length),(n=t[t.length-1])&&"text"===n.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(r);else if(e){var s="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(s);break}throw new Error(s)}return this.state.top=!0,t},a.inline=function(e,t){this.inlineQueue.push({src:e,tokens:t})},a.inlineTokens=function(e,t){var r,n,i,o=this;void 0===t&&(t=[]);var a,s,c,l=e;if(this.tokens.links){var u=Object.keys(this.tokens.links);if(u.length>0)for(;null!=(a=this.tokenizer.rules.inline.reflinkSearch.exec(l));)u.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,a.index)+"["+$("a",a[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(a=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,a.index)+"["+$("a",a[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(a=this.tokenizer.rules.inline.escapedEmSt.exec(l));)l=l.slice(0,a.index)+"++"+l.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(s||(c=""),s=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((function(n){return!!(r=n.call({lexer:o},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)}))))if(r=this.tokenizer.escape(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.tag(e))e=e.substring(r.raw.length),(n=t[t.length-1])&&"text"===r.type&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);else if(r=this.tokenizer.link(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(r.raw.length),(n=t[t.length-1])&&"text"===r.type&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);else if(r=this.tokenizer.emStrong(e,l,c))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.codespan(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.br(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.del(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.autolink(e,O))e=e.substring(r.raw.length),t.push(r);else if(this.state.inLink||!(r=this.tokenizer.url(e,O))){if(i=e,this.options.extensions&&this.options.extensions.startInline&&function(){var t=1/0,r=e.slice(1),n=void 0;o.options.extensions.startInline.forEach((function(e){"number"==typeof(n=e.call({lexer:this},r))&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}(),r=this.tokenizer.inlineText(i,I))e=e.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(c=r.raw.slice(-1)),s=!0,(n=t[t.length-1])&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);else if(e){var p="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(p);break}throw new Error(p)}}else e=e.substring(r.raw.length),t.push(r);return t},n=e,o=[{key:"rules",get:function(){return{block:M,inline:L}}}],(i=null)&&r(n.prototype,i),o&&r(n,o),Object.defineProperty(n,"prototype",{writable:!1}),e}(),P=function(){function e(e){this.options=e||t.defaults}var r=e.prototype;return r.code=function(e,t,r){var n=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,n);null!=i&&i!==e&&(r=!0,e=i)}return e=e.replace(/\n$/,"")+"\n",n?'<pre><code class="'+this.options.langPrefix+d(n,!0)+'">'+(r?e:d(e,!0))+"</code></pre>\n":"<pre><code>"+(r?e:d(e,!0))+"</code></pre>\n"},r.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},r.html=function(e){return e},r.heading=function(e,t,r,n){return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+n.slug(r)+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"},r.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},r.list=function(e,t,r){var n=t?"ol":"ul";return"<"+n+(t&&1!==r?' start="'+r+'"':"")+">\n"+e+"</"+n+">\n"},r.listitem=function(e){return"<li>"+e+"</li>\n"},r.checkbox=function(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},r.paragraph=function(e){return"<p>"+e+"</p>\n"},r.table=function(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"},r.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},r.tablecell=function(e,t){var r=t.header?"th":"td";return(t.align?"<"+r+' align="'+t.align+'">':"<"+r+">")+e+"</"+r+">\n"},r.strong=function(e){return"<strong>"+e+"</strong>"},r.em=function(e){return"<em>"+e+"</em>"},r.codespan=function(e){return"<code>"+e+"</code>"},r.br=function(){return this.options.xhtml?"<br/>":"<br>"},r.del=function(e){return"<del>"+e+"</del>"},r.link=function(e,t,r){if(null===(e=y(this.options.sanitize,this.options.baseUrl,e)))return r;var n='<a href="'+d(e)+'"';return t&&(n+=' title="'+t+'"'),n+=">"+r+"</a>"},r.image=function(e,t,r){if(null===(e=y(this.options.sanitize,this.options.baseUrl,e)))return r;var n='<img src="'+e+'" alt="'+r+'"';return t&&(n+=' title="'+t+'"'),n+=this.options.xhtml?"/>":">"},r.text=function(e){return e},e}(),j=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,r){return""+r},t.image=function(e,t,r){return""+r},t.br=function(){return""},e}(),F=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var r=e,n=0;if(this.seen.hasOwnProperty(r)){n=this.seen[e];do{r=e+"-"+ ++n}while(this.seen.hasOwnProperty(r))}return t||(this.seen[e]=n,this.seen[r]=0),r},t.slug=function(e,t){void 0===t&&(t={});var r=this.serialize(e);return this.getNextSafeSlug(r,t.dryrun)},e}(),R=function(){function e(e){this.options=e||t.defaults,this.options.renderer=this.options.renderer||new P,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new j,this.slugger=new F}e.parse=function(t,r){return new e(r).parse(t)},e.parseInline=function(t,r){return new e(r).parseInline(t)};var r=e.prototype;return r.parse=function(e,t){void 0===t&&(t=!0);var r,n,i,o,a,s,c,l,u,p,d,m,h,g,v,b,y,x,w,k="",C=e.length;for(r=0;r<C;r++)if(p=e[r],!(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[p.type])||!1===(w=this.options.extensions.renderers[p.type].call({parser:this},p))&&["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(p.type))switch(p.type){case"space":continue;case"hr":k+=this.renderer.hr();continue;case"heading":k+=this.renderer.heading(this.parseInline(p.tokens),p.depth,f(this.parseInline(p.tokens,this.textRenderer)),this.slugger);continue;case"code":k+=this.renderer.code(p.text,p.lang,p.escaped);continue;case"table":for(l="",c="",o=p.header.length,n=0;n<o;n++)c+=this.renderer.tablecell(this.parseInline(p.header[n].tokens),{header:!0,align:p.align[n]});for(l+=this.renderer.tablerow(c),u="",o=p.rows.length,n=0;n<o;n++){for(c="",a=(s=p.rows[n]).length,i=0;i<a;i++)c+=this.renderer.tablecell(this.parseInline(s[i].tokens),{header:!1,align:p.align[i]});u+=this.renderer.tablerow(c)}k+=this.renderer.table(l,u);continue;case"blockquote":u=this.parse(p.tokens),k+=this.renderer.blockquote(u);continue;case"list":for(d=p.ordered,m=p.start,h=p.loose,o=p.items.length,u="",n=0;n<o;n++)b=(v=p.items[n]).checked,y=v.task,g="",v.task&&(x=this.renderer.checkbox(b),h?v.tokens.length>0&&"paragraph"===v.tokens[0].type?(v.tokens[0].text=x+" "+v.tokens[0].text,v.tokens[0].tokens&&v.tokens[0].tokens.length>0&&"text"===v.tokens[0].tokens[0].type&&(v.tokens[0].tokens[0].text=x+" "+v.tokens[0].tokens[0].text)):v.tokens.unshift({type:"text",text:x}):g+=x),g+=this.parse(v.tokens,h),u+=this.renderer.listitem(g,y,b);k+=this.renderer.list(u,d,m);continue;case"html":k+=this.renderer.html(p.text);continue;case"paragraph":k+=this.renderer.paragraph(this.parseInline(p.tokens));continue;case"text":for(u=p.tokens?this.parseInline(p.tokens):p.text;r+1<C&&"text"===e[r+1].type;)u+="\n"+((p=e[++r]).tokens?this.parseInline(p.tokens):p.text);k+=t?this.renderer.paragraph(u):u;continue;default:var z='Token with "'+p.type+'" type was not found.';if(this.options.silent)return void console.error(z);throw new Error(z)}else k+=w||"";return k},r.parseInline=function(e,t){t=t||this.renderer;var r,n,i,o="",a=e.length;for(r=0;r<a;r++)if(n=e[r],!(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[n.type])||!1===(i=this.options.extensions.renderers[n.type].call({parser:this},n))&&["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type))switch(n.type){case"escape":o+=t.text(n.text);break;case"html":o+=t.html(n.text);break;case"link":o+=t.link(n.href,n.title,this.parseInline(n.tokens,t));break;case"image":o+=t.image(n.href,n.title,n.text);break;case"strong":o+=t.strong(this.parseInline(n.tokens,t));break;case"em":o+=t.em(this.parseInline(n.tokens,t));break;case"codespan":o+=t.codespan(n.text);break;case"br":o+=t.br();break;case"del":o+=t.del(this.parseInline(n.tokens,t));break;case"text":o+=t.text(n.text);break;default:var s='Token with "'+n.type+'" type was not found.';if(this.options.silent)return void console.error(s);throw new Error(s)}else o+=i||"";return o},e}();function N(e,t,r){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if("function"==typeof t&&(r=t,t=null),T(t=S({},N.defaults,t||{})),r){var n,i=t.highlight;try{n=B.lex(e,t)}catch(e){return r(e)}var o=function(e){var o;if(!e)try{t.walkTokens&&N.walkTokens(n,t.walkTokens),o=R.parse(n,t)}catch(t){e=t}return t.highlight=i,e?r(e):r(null,o)};if(!i||i.length<3)return o();if(delete t.highlight,!n.length)return o();var a=0;return N.walkTokens(n,(function(e){"code"===e.type&&(a++,setTimeout((function(){i(e.text,e.lang,(function(t,r){if(t)return o(t);null!=r&&r!==e.text&&(e.text=r,e.escaped=!0),0===--a&&o()}))}),0))})),void(0===a&&o())}try{var s=B.lex(e,t);return t.walkTokens&&N.walkTokens(s,t.walkTokens),R.parse(s,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+d(e.message+"",!0)+"</pre>";throw e}}N.options=N.setOptions=function(e){var r;return S(N.defaults,e),r=N.defaults,t.defaults=r,N},N.getDefaults=o,N.defaults=t.defaults,N.use=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,i=S.apply(void 0,[{}].concat(t)),o=N.defaults.extensions||{renderers:{},childTokens:{}};t.forEach((function(e){if(e.extensions&&(n=!0,e.extensions.forEach((function(e){if(!e.name)throw new Error("extension name required");if(e.renderer){var t=o.renderers?o.renderers[e.name]:null;o.renderers[e.name]=t?function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];var o=e.renderer.apply(this,n);return!1===o&&(o=t.apply(this,n)),o}:e.renderer}if(e.tokenizer){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");o[e.level]?o[e.level].unshift(e.tokenizer):o[e.level]=[e.tokenizer],e.start&&("block"===e.level?o.startBlock?o.startBlock.push(e.start):o.startBlock=[e.start]:"inline"===e.level&&(o.startInline?o.startInline.push(e.start):o.startInline=[e.start]))}e.childTokens&&(o.childTokens[e.name]=e.childTokens)}))),e.renderer&&function(){var t=N.defaults.renderer||new P,r=function(r){var n=t[r];t[r]=function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=e.renderer[r].apply(t,o);return!1===s&&(s=n.apply(t,o)),s}};for(var n in e.renderer)r(n);i.renderer=t}(),e.tokenizer&&function(){var t=N.defaults.tokenizer||new E,r=function(r){var n=t[r];t[r]=function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=e.tokenizer[r].apply(t,o);return!1===s&&(s=n.apply(t,o)),s}};for(var n in e.tokenizer)r(n);i.tokenizer=t}(),e.walkTokens){var t=N.defaults.walkTokens;i.walkTokens=function(r){e.walkTokens.call(this,r),t&&t.call(this,r)}}n&&(i.extensions=o),N.setOptions(i)}))},N.walkTokens=function(e,t){for(var r,n=function(){var e=r.value;switch(t.call(N,e),e.type){case"table":for(var n,o=i(e.header);!(n=o()).done;){var a=n.value;N.walkTokens(a.tokens,t)}for(var s,c=i(e.rows);!(s=c()).done;)for(var l,u=i(s.value);!(l=u()).done;){var p=l.value;N.walkTokens(p.tokens,t)}break;case"list":N.walkTokens(e.items,t);break;default:N.defaults.extensions&&N.defaults.extensions.childTokens&&N.defaults.extensions.childTokens[e.type]?N.defaults.extensions.childTokens[e.type].forEach((function(r){N.walkTokens(e[r],t)})):e.tokens&&N.walkTokens(e.tokens,t)}},o=i(e);!(r=o()).done;)n()},N.parseInline=function(e,t){if(null==e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");T(t=S({},N.defaults,t||{}));try{var r=B.lexInline(e,t);return t.walkTokens&&N.walkTokens(r,t.walkTokens),R.parseInline(r,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+d(e.message+"",!0)+"</pre>";throw e}},N.Parser=R,N.parser=R.parse,N.Renderer=P,N.TextRenderer=j,N.Lexer=B,N.lexer=B.lex,N.Tokenizer=E,N.Slugger=F,N.parse=N;var q=N.options,H=N.setOptions,U=N.use,G=N.walkTokens,W=N.parseInline,X=N,V=R.parse,Y=B.lex;t.Lexer=B,t.Parser=R,t.Renderer=P,t.Slugger=F,t.TextRenderer=j,t.Tokenizer=E,t.getDefaults=o,t.lexer=Y,t.marked=N,t.options=q,t.parse=X,t.parseInline=W,t.parser=V,t.setOptions=H,t.use=U,t.walkTokens=G})).marked,MC=/Mac/.test(navigator.platform),LC=new RegExp(/(<a.*?https?:\/\/.*?[^a]>)+?/g),IC={toggleBold:VC,toggleItalic:YC,drawLink:sz,toggleHeadingSmaller:QC,toggleHeadingBigger:ez,drawImage:cz,toggleBlockquote:ZC,toggleOrderedList:oz,toggleUnorderedList:iz,toggleCodeBlock:JC,togglePreview:gz,toggleStrikethrough:KC,toggleHeading1:tz,toggleHeading2:rz,toggleHeading3:nz,cleanBlock:az,drawTable:pz,drawHorizontalRule:dz,undo:mz,redo:fz,toggleSideBySide:hz,toggleFullScreen:XC},OC={toggleBold:"Cmd-B",toggleItalic:"Cmd-I",drawLink:"Cmd-K",toggleHeadingSmaller:"Cmd-H",toggleHeadingBigger:"Shift-Cmd-H",cleanBlock:"Cmd-E",drawImage:"Cmd-Alt-I",toggleBlockquote:"Cmd-'",toggleOrderedList:"Cmd-Alt-L",toggleUnorderedList:"Cmd-L",toggleCodeBlock:"Cmd-Alt-C",togglePreview:"Cmd-P",toggleSideBySide:"F9",toggleFullScreen:"F11"},BC=function(){var e=!1;return function(t){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(t.substr(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||window.opera),e};function PC(e){return e=MC?e.replace("Ctrl","Cmd"):e.replace("Cmd","Ctrl")}var jC={};function FC(e){return jC[e]||(jC[e]=new RegExp("\\s*"+e+"(\\s*)","g"))}function RC(e,t){if(e&&t){var r=FC(t);e.className.match(r)||(e.className+=" "+t)}}function NC(e,t){if(e&&t){var r=FC(t);e.className.match(r)&&(e.className=e.className.replace(r,"$1"))}}function qC(e,t,r,n){var i=HC(e,!1,t,r,"button",n);i.className+=" easymde-dropdown",i.onclick=function(){i.focus()};var o=document.createElement("div");o.className="easymde-dropdown-content";for(var a=0;a<e.children.length;a++){var s,c=e.children[a];(s=HC("string"==typeof c&&c in Sz?Sz[c]:c,!0,t,r,"button",n)).addEventListener("click",(function(e){e.stopPropagation()}),!1),o.appendChild(s)}return i.appendChild(o),i}function HC(e,t,r,n,i,o){e=e||{};var a=document.createElement(i);if(e.attributes)for(var s in e.attributes)Object.prototype.hasOwnProperty.call(e.attributes,s)&&a.setAttribute(s,e.attributes[s]);a.className=e.name,a.setAttribute("type",i),r=null==r||r,e.name&&e.name in n&&(IC[e.name]=e.action),e.title&&r&&(a.title=function(e,t,r){var n,i=e;t&&r[n=function(e){for(var t in IC)if(IC[t]===e)return t;return null}(t)]&&(i+=" ("+PC(r[n])+")");return i}(e.title,e.action,n),MC&&(a.title=a.title.replace("Ctrl","⌘"),a.title=a.title.replace("Alt","⌥"))),e.noDisable&&a.classList.add("no-disable"),e.noMobile&&a.classList.add("no-mobile");var c=[];void 0!==e.className&&(c=e.className.split(" "));for(var l=[],u=0;u<c.length;u++){var p=c[u];p.match(/^fa([srlb]|(-[\w-]*)|$)/)?l.push(p):a.classList.add(p)}a.tabIndex=-1;for(var d=document.createElement("i"),m=0;m<l.length;m++){var f=l[m];d.classList.add(f)}return a.appendChild(d),void 0!==e.icon&&(a.innerHTML=e.icon),e.action&&t&&("function"==typeof e.action?a.onclick=function(t){t.preventDefault(),e.action(o)}:"string"==typeof e.action&&(a.onclick=function(t){t.preventDefault(),window.open(e.action,"_blank")})),a}function UC(){var e=document.createElement("i");return e.className="separator",e.innerHTML="|",e}function GC(e,t){t=t||e.getCursor("start");var r=e.getTokenAt(t);if(!r.type)return{};for(var n,i,o=r.type.split(" "),a={},s=0;s<o.length;s++)"strong"===(n=o[s])?a.bold=!0:"variable-2"===n?(i=e.getLine(t.line),/^\s*\d+\.\s/.test(i)?a["ordered-list"]=!0:a["unordered-list"]=!0):"atom"===n?a.quote=!0:"em"===n?a.italic=!0:"quote"===n?a.quote=!0:"strikethrough"===n?a.strikethrough=!0:"comment"===n?a.code=!0:"link"===n?a.link=!0:"tag"===n?a.image=!0:n.match(/^header(-[1-6])?$/)&&(a[n.replace("header","heading")]=!0);return a}var WC="";function XC(e){var t=e.codemirror;t.setOption("fullScreen",!t.getOption("fullScreen")),t.getOption("fullScreen")?(WC=document.body.style.overflow,document.body.style.overflow="hidden"):document.body.style.overflow=WC;var r=t.getWrapperElement(),n=r.nextSibling;if(/editor-preview-active-side/.test(n.className))if(!1===e.options.sideBySideFullscreen){var i=r.parentNode;t.getOption("fullScreen")?NC(i,"sided--no-fullscreen"):RC(i,"sided--no-fullscreen")}else hz(e);if(e.options.onToggleFullScreen&&e.options.onToggleFullScreen(t.getOption("fullScreen")||!1),void 0!==e.options.maxHeight&&(t.getOption("fullScreen")?(t.getScrollerElement().style.removeProperty("height"),n.style.removeProperty("height")):(t.getScrollerElement().style.height=e.options.maxHeight,e.setPreviewMaxHeight())),/fullscreen/.test(e.toolbar_div.className)?e.toolbar_div.className=e.toolbar_div.className.replace(/\s*fullscreen\b/,""):e.toolbar_div.className+=" fullscreen",e.toolbarElements&&e.toolbarElements.fullscreen){var o=e.toolbarElements.fullscreen;/active/.test(o.className)?o.className=o.className.replace(/\s*active\s*/g,""):o.className+=" active"}}function VC(e){xz(e,"bold",e.options.blockStyles.bold)}function YC(e){xz(e,"italic",e.options.blockStyles.italic)}function KC(e){xz(e,"strikethrough","~~")}function JC(e){var t=e.options.blockStyles.code;function r(e){if("object"!=typeof e)throw"fencing_line() takes a 'line' object (not a line number, or line text). Got: "+typeof e+": "+e;return e.styles&&e.styles[2]&&-1!==e.styles[2].indexOf("formatting-code-block")}function n(e){return e.state.base.base||e.state.base}function i(e,t,i,o,a){i=i||e.getLineHandle(t),o=o||e.getTokenAt({line:t,ch:1}),a=a||!!i.text&&e.getTokenAt({line:t,ch:i.text.length-1});var s=o.type?o.type.split(" "):[];return a&&n(a).indentedCode?"indented":-1!==s.indexOf("comment")&&(n(o).fencedChars||n(a).fencedChars||r(i)?"fenced":"single")}var o,a,s,c=e.codemirror,l=c.getCursor("start"),u=c.getCursor("end"),p=c.getTokenAt({line:l.line,ch:l.ch||1}),d=c.getLineHandle(l.line),m=i(c,l.line,d,p);if("single"===m){var f=d.text.slice(0,l.ch).replace("`",""),h=d.text.slice(l.ch).replace("`","");c.replaceRange(f+h,{line:l.line,ch:0},{line:l.line,ch:99999999999999}),l.ch--,l!==u&&u.ch--,c.setSelection(l,u),c.focus()}else if("fenced"===m)if(l.line!==u.line||l.ch!==u.ch){for(o=l.line;o>=0&&!r(d=c.getLineHandle(o));o--);var g,v,b,y,x=n(c.getTokenAt({line:o,ch:1})).fencedChars;r(c.getLineHandle(l.line))?(g="",v=l.line):r(c.getLineHandle(l.line-1))?(g="",v=l.line-1):(g=x+"\n",v=l.line),r(c.getLineHandle(u.line))?(b="",y=u.line,0===u.ch&&(y+=1)):0!==u.ch&&r(c.getLineHandle(u.line+1))?(b="",y=u.line+1):(b=x+"\n",y=u.line+1),0===u.ch&&(y-=1),c.operation((function(){c.replaceRange(b,{line:y,ch:0},{line:y+(b?0:1),ch:0}),c.replaceRange(g,{line:v,ch:0},{line:v+(g?0:1),ch:0})})),c.setSelection({line:v+(g?1:0),ch:0},{line:y+(g?1:-1),ch:0}),c.focus()}else{var w=l.line;if(r(c.getLineHandle(l.line))&&("fenced"===i(c,l.line+1)?(o=l.line,w=l.line+1):(a=l.line,w=l.line-1)),void 0===o)for(o=w;o>=0&&!r(d=c.getLineHandle(o));o--);if(void 0===a)for(s=c.lineCount(),a=w;a<s&&!r(d=c.getLineHandle(a));a++);c.operation((function(){c.replaceRange("",{line:o,ch:0},{line:o+1,ch:0}),c.replaceRange("",{line:a-1,ch:0},{line:a,ch:0})})),c.focus()}else if("indented"===m){if(l.line!==u.line||l.ch!==u.ch)o=l.line,a=u.line,0===u.ch&&a--;else{for(o=l.line;o>=0;o--)if(!(d=c.getLineHandle(o)).text.match(/^\s*$/)&&"indented"!==i(c,o,d)){o+=1;break}for(s=c.lineCount(),a=l.line;a<s;a++)if(!(d=c.getLineHandle(a)).text.match(/^\s*$/)&&"indented"!==i(c,a,d)){a-=1;break}}var k=c.getLineHandle(a+1),C=k&&c.getTokenAt({line:a+1,ch:k.text.length-1});C&&n(C).indentedCode&&c.replaceRange("\n",{line:a+1,ch:0});for(var z=o;z<=a;z++)c.indentLine(z,"subtract");c.focus()}else{var S=l.line===u.line&&l.ch===u.ch&&0===l.ch,A=l.line!==u.line;S||A?function(e,t,r,n){var i=t.line+1,o=r.line+1,a=t.line!==r.line,s=n+"\n",c="\n"+n;a&&o++,a&&0===r.ch&&(c=n+"\n",o--),vz(e,!1,[s,c]),e.setSelection({line:i,ch:0},{line:o,ch:0})}(c,l,u,t):vz(c,!1,["`","`"])}}function ZC(e){yz(e.codemirror,"quote")}function QC(e){bz(e.codemirror,"smaller")}function ez(e){bz(e.codemirror,"bigger")}function tz(e){bz(e.codemirror,void 0,1)}function rz(e){bz(e.codemirror,void 0,2)}function nz(e){bz(e.codemirror,void 0,3)}function iz(e){var t=e.codemirror,r="*";["-","+","*"].includes(e.options.unorderedListStyle)&&(r=e.options.unorderedListStyle),yz(t,"unordered-list",r)}function oz(e){yz(e.codemirror,"ordered-list")}function az(e){!function(e){if(/editor-preview-active/.test(e.getWrapperElement().lastChild.className))return;for(var t,r=e.getCursor("start"),n=e.getCursor("end"),i=r.line;i<=n.line;i++)t=(t=e.getLine(i)).replace(/^[ ]*([# ]+|\*|-|[> ]+|[0-9]+(.|\)))[ ]*/,""),e.replaceRange(t,{line:i,ch:0},{line:i,ch:99999999999999})}(e.codemirror)}function sz(e){var t=e.codemirror,r=GC(t),n=e.options,i="https://";if(n.promptURLs&&!(i=prompt(n.promptTexts.link,"https://")))return!1;vz(t,r.link,n.insertTexts.link,i)}function cz(e){var t=e.codemirror,r=GC(t),n=e.options,i="https://";if(n.promptURLs&&!(i=prompt(n.promptTexts.image,"https://")))return!1;vz(t,r.image,n.insertTexts.image,i)}function lz(e){e.openBrowseFileWindow()}function uz(e,t){var r=e.codemirror,n=GC(r),i=e.options,o=t.substr(t.lastIndexOf("/")+1),a=o.substring(o.lastIndexOf(".")+1).replace(/\?.*$/,"").toLowerCase();if(["png","jpg","jpeg","gif","svg"].includes(a))vz(r,n.image,i.insertTexts.uploadedImage,t);else{var s=i.insertTexts.link;s[0]="["+o,vz(r,n.link,s,t)}e.updateStatusBar("upload-image",e.options.imageTexts.sbOnUploaded.replace("#image_name#",o)),setTimeout((function(){e.updateStatusBar("upload-image",e.options.imageTexts.sbInit)}),1e3)}function pz(e){var t=e.codemirror,r=GC(t),n=e.options;vz(t,r.table,n.insertTexts.table)}function dz(e){var t=e.codemirror,r=GC(t),n=e.options;vz(t,r.image,n.insertTexts.horizontalRule)}function mz(e){var t=e.codemirror;t.undo(),t.focus()}function fz(e){var t=e.codemirror;t.redo(),t.focus()}function hz(e){var t=e.codemirror,r=t.getWrapperElement(),n=r.nextSibling,i=e.toolbarElements&&e.toolbarElements["side-by-side"],o=!1,a=r.parentNode;/editor-preview-active-side/.test(n.className)?(!1===e.options.sideBySideFullscreen&&NC(a,"sided--no-fullscreen"),n.className=n.className.replace(/\s*editor-preview-active-side\s*/g,""),i&&(i.className=i.className.replace(/\s*active\s*/g,"")),r.className=r.className.replace(/\s*CodeMirror-sided\s*/g," ")):(setTimeout((function(){t.getOption("fullScreen")||(!1===e.options.sideBySideFullscreen?RC(a,"sided--no-fullscreen"):XC(e)),n.className+=" editor-preview-active-side"}),1),i&&(i.className+=" active"),r.className+=" CodeMirror-sided",o=!0);var s=r.lastChild;if(/editor-preview-active/.test(s.className)){s.className=s.className.replace(/\s*editor-preview-active\s*/g,"");var c=e.toolbarElements.preview,l=e.toolbar_div;c.className=c.className.replace(/\s*active\s*/g,""),l.className=l.className.replace(/\s*disabled-for-preview*/g,"")}if(t.sideBySideRenderingFunction||(t.sideBySideRenderingFunction=function(){var t=e.options.previewRender(e.value(),n);null!=t&&(n.innerHTML=t)}),o){var u=e.options.previewRender(e.value(),n);null!=u&&(n.innerHTML=u),t.on("update",t.sideBySideRenderingFunction)}else t.off("update",t.sideBySideRenderingFunction);t.refresh()}function gz(e){var t=e.codemirror,r=t.getWrapperElement(),n=e.toolbar_div,i=!!e.options.toolbar&&e.toolbarElements.preview,o=r.lastChild,a=t.getWrapperElement().nextSibling;if(/editor-preview-active-side/.test(a.className)&&hz(e),!o||!/editor-preview-full/.test(o.className)){if((o=document.createElement("div")).className="editor-preview-full",e.options.previewClass)if(Array.isArray(e.options.previewClass))for(var s=0;s<e.options.previewClass.length;s++)o.className+=" "+e.options.previewClass[s];else"string"==typeof e.options.previewClass&&(o.className+=" "+e.options.previewClass);r.appendChild(o)}/editor-preview-active/.test(o.className)?(o.className=o.className.replace(/\s*editor-preview-active\s*/g,""),i&&(i.className=i.className.replace(/\s*active\s*/g,""),n.className=n.className.replace(/\s*disabled-for-preview*/g,""))):(setTimeout((function(){o.className+=" editor-preview-active"}),1),i&&(i.className+=" active",n.className+=" disabled-for-preview")),o.innerHTML=e.options.previewRender(e.value(),o)}function vz(e,t,r,n){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){var i,o=r[0],a=r[1],s={},c={};Object.assign(s,e.getCursor("start")),Object.assign(c,e.getCursor("end")),n&&(o=o.replace("#url#",n),a=a.replace("#url#",n)),t?(o=(i=e.getLine(s.line)).slice(0,s.ch),a=i.slice(s.ch),e.replaceRange(o+a,{line:s.line,ch:0})):(i=e.getSelection(),e.replaceSelection(o+i+a),s.ch+=o.length,s!==c&&(c.ch+=o.length)),e.setSelection(s,c),e.focus()}}function bz(e,t,r){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){for(var n=e.getCursor("start"),i=e.getCursor("end"),o=n.line;o<=i.line;o++)!function(n){var i=e.getLine(n),o=i.search(/[^#]/);i=void 0!==t?o<=0?"bigger"==t?"###### "+i:"# "+i:6==o&&"smaller"==t?i.substr(7):1==o&&"bigger"==t?i.substr(2):"bigger"==t?i.substr(1):"#"+i:1==r?o<=0?"# "+i:o==r?i.substr(o+1):"# "+i.substr(o+1):2==r?o<=0?"## "+i:o==r?i.substr(o+1):"## "+i.substr(o+1):o<=0?"### "+i:o==r?i.substr(o+1):"### "+i.substr(o+1),e.replaceRange(i,{line:n,ch:0},{line:n,ch:99999999999999})}(o);e.focus()}}function yz(e,t,r){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){for(var n=/^(\s*)(\*|-|\+|\d*\.)(\s+)/,i=/^\s*/,o=GC(e),a=e.getCursor("start"),s=e.getCursor("end"),c={quote:/^(\s*)>\s+/,"unordered-list":n,"ordered-list":n},l=function(e,t,o){var a=n.exec(t),s=function(e,t){return{quote:">","unordered-list":r,"ordered-list":"%%i."}[e].replace("%%i",t)}(e,u);return null!==a?(function(e,t){var n=new RegExp({quote:">","unordered-list":"\\"+r,"ordered-list":"\\d+."}[e]);return t&&n.test(t)}(e,a[2])&&(s=""),t=a[1]+s+a[3]+t.replace(i,"").replace(c[e],"$1")):0==o&&(t=s+" "+t),t},u=1,p=a.line;p<=s.line;p++)!function(r){var n=e.getLine(r);o[t]?n=n.replace(c[t],"$1"):("unordered-list"==t&&(n=l("ordered-list",n,!0)),n=l(t,n,!1),u+=1),e.replaceRange(n,{line:r,ch:0},{line:r,ch:99999999999999})}(p);e.focus()}}function xz(e,t,r,n){if(!/editor-preview-active/.test(e.codemirror.getWrapperElement().lastChild.className)){n=void 0===n?r:n;var i,o=e.codemirror,a=GC(o),s=r,c=n,l=o.getCursor("start"),u=o.getCursor("end");a[t]?(s=(i=o.getLine(l.line)).slice(0,l.ch),c=i.slice(l.ch),"bold"==t?(s=s.replace(/(\*\*|__)(?![\s\S]*(\*\*|__))/,""),c=c.replace(/(\*\*|__)/,"")):"italic"==t?(s=s.replace(/(\*|_)(?![\s\S]*(\*|_))/,""),c=c.replace(/(\*|_)/,"")):"strikethrough"==t&&(s=s.replace(/(\*\*|~~)(?![\s\S]*(\*\*|~~))/,""),c=c.replace(/(\*\*|~~)/,"")),o.replaceRange(s+c,{line:l.line,ch:0},{line:l.line,ch:99999999999999}),"bold"==t||"strikethrough"==t?(l.ch-=2,l!==u&&(u.ch-=2)):"italic"==t&&(l.ch-=1,l!==u&&(u.ch-=1))):(i=o.getSelection(),"bold"==t?i=(i=i.split("**").join("")).split("__").join(""):"italic"==t?i=(i=i.split("*").join("")).split("_").join(""):"strikethrough"==t&&(i=i.split("~~").join("")),o.replaceSelection(s+i+c),l.ch+=r.length,u.ch=l.ch+i.length),o.setSelection(l,u),o.focus()}}function wz(e,t){if(Math.abs(e)<1024)return""+e+t[0];var r=0;do{e/=1024,++r}while(Math.abs(e)>=1024&&r<t.length);return""+e.toFixed(1)+t[r]}function kz(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]instanceof Array?e[r]=t[r].concat(e[r]instanceof Array?e[r]:[]):null!==t[r]&&"object"==typeof t[r]&&t[r].constructor===Object?e[r]=kz(e[r]||{},t[r]):e[r]=t[r]);return e}function Cz(e){for(var t=1;t<arguments.length;t++)e=kz(e,arguments[t]);return e}function zz(e){var t=e.match(/[a-zA-Z0-9_\u00A0-\u02AF\u0392-\u03c9\u0410-\u04F9]+|[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af]+/g),r=0;if(null===t)return r;for(var n=0;n<t.length;n++)t[n].charCodeAt(0)>=19968?r+=t[n].length:r+=1;return r}var Sz={bold:{name:"bold",action:VC,className:"fa fa-bold",title:"Bold",default:!0},italic:{name:"italic",action:YC,className:"fa fa-italic",title:"Italic",default:!0},strikethrough:{name:"strikethrough",action:KC,className:"fa fa-strikethrough",title:"Strikethrough"},heading:{name:"heading",action:QC,className:"fa fa-header fa-heading",title:"Heading",default:!0},"heading-smaller":{name:"heading-smaller",action:QC,className:"fa fa-header fa-heading header-smaller",title:"Smaller Heading"},"heading-bigger":{name:"heading-bigger",action:ez,className:"fa fa-header fa-heading header-bigger",title:"Bigger Heading"},"heading-1":{name:"heading-1",action:tz,className:"fa fa-header fa-heading header-1",title:"Big Heading"},"heading-2":{name:"heading-2",action:rz,className:"fa fa-header fa-heading header-2",title:"Medium Heading"},"heading-3":{name:"heading-3",action:nz,className:"fa fa-header fa-heading header-3",title:"Small Heading"},"separator-1":{name:"separator-1"},code:{name:"code",action:JC,className:"fa fa-code",title:"Code"},quote:{name:"quote",action:ZC,className:"fa fa-quote-left",title:"Quote",default:!0},"unordered-list":{name:"unordered-list",action:iz,className:"fa fa-list-ul",title:"Generic List",default:!0},"ordered-list":{name:"ordered-list",action:oz,className:"fa fa-list-ol",title:"Numbered List",default:!0},"clean-block":{name:"clean-block",action:az,className:"fa fa-eraser",title:"Clean block"},"separator-2":{name:"separator-2"},link:{name:"link",action:sz,className:"fa fa-link",title:"Create Link",default:!0},image:{name:"image",action:cz,className:"fa fa-image",title:"Insert Image",default:!0},"upload-image":{name:"upload-image",action:lz,className:"fa fa-image",title:"Import an image"},table:{name:"table",action:pz,className:"fa fa-table",title:"Insert Table"},"horizontal-rule":{name:"horizontal-rule",action:dz,className:"fa fa-minus",title:"Insert Horizontal Line"},"separator-3":{name:"separator-3"},preview:{name:"preview",action:gz,className:"fa fa-eye",noDisable:!0,title:"Toggle Preview",default:!0},"side-by-side":{name:"side-by-side",action:hz,className:"fa fa-columns",noDisable:!0,noMobile:!0,title:"Toggle Side by Side",default:!0},fullscreen:{name:"fullscreen",action:XC,className:"fa fa-arrows-alt",noDisable:!0,noMobile:!0,title:"Toggle Fullscreen",default:!0},"separator-4":{name:"separator-4"},guide:{name:"guide",action:"https://www.markdownguide.org/basic-syntax/",className:"fa fa-question-circle",noDisable:!0,title:"Markdown Guide",default:!0},"separator-5":{name:"separator-5"},undo:{name:"undo",action:mz,className:"fa fa-undo",noDisable:!0,title:"Undo"},redo:{name:"redo",action:fz,className:"fa fa-repeat fa-redo",noDisable:!0,title:"Redo"}},Az={link:["[","](#url#)"],image:["![](","#url#)"],uploadedImage:["![](#url#)",""],table:["","\n\n| Column 1 | Column 2 | Column 3 |\n| -------- | -------- | -------- |\n| Text | Text | Text |\n\n"],horizontalRule:["","\n\n-----\n\n"]},Dz={link:"URL for the link:",image:"URL of the image:"},Tz={locale:"en-US",format:{hour:"2-digit",minute:"2-digit"}},$z={bold:"**",code:"```",italic:"*"},_z={sbInit:"Attach files by drag and dropping or pasting from clipboard.",sbOnDragEnter:"Drop image to upload it.",sbOnDrop:"Uploading image #images_names#...",sbProgress:"Uploading #file_name#: #progress#%",sbOnUploaded:"Uploaded #image_name#",sizeUnits:" B, KB, MB"},Ez={noFileGiven:"You must select a file.",typeNotAllowed:"This image type is not allowed.",fileTooLarge:"Image #image_name# is too big (#image_size#).\nMaximum file size is #image_max_size#.",importError:"Something went wrong when uploading the image #image_name#."};function Mz(e){(e=e||{}).parent=this;var t=!0;if(!1===e.autoDownloadFontAwesome&&(t=!1),!0!==e.autoDownloadFontAwesome)for(var r=document.styleSheets,n=0;n<r.length;n++)r[n].href&&r[n].href.indexOf("//maxcdn.bootstrapcdn.com/font-awesome/")>-1&&(t=!1);if(t){var i=document.createElement("link");i.rel="stylesheet",i.href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css",document.getElementsByTagName("head")[0].appendChild(i)}if(e.element)this.element=e.element;else if(null===e.element)return void console.log("EasyMDE: Error. No element was found.");if(void 0===e.toolbar)for(var o in e.toolbar=[],Sz)Object.prototype.hasOwnProperty.call(Sz,o)&&(-1!=o.indexOf("separator-")&&e.toolbar.push("|"),(!0===Sz[o].default||e.showIcons&&e.showIcons.constructor===Array&&-1!=e.showIcons.indexOf(o))&&e.toolbar.push(o));if(Object.prototype.hasOwnProperty.call(e,"previewClass")||(e.previewClass="editor-preview"),Object.prototype.hasOwnProperty.call(e,"status")||(e.status=["autosave","lines","words","cursor"],e.uploadImage&&e.status.unshift("upload-image")),e.previewRender||(e.previewRender=function(e){return this.parent.markdown(e)}),e.parsingConfig=Cz({highlightFormatting:!0},e.parsingConfig||{}),e.insertTexts=Cz({},Az,e.insertTexts||{}),e.promptTexts=Cz({},Dz,e.promptTexts||{}),e.blockStyles=Cz({},$z,e.blockStyles||{}),null!=e.autosave&&(e.autosave.timeFormat=Cz({},Tz,e.autosave.timeFormat||{})),e.shortcuts=Cz({},OC,e.shortcuts||{}),e.maxHeight=e.maxHeight||void 0,e.direction=e.direction||"ltr",void 0!==e.maxHeight?e.minHeight=e.maxHeight:e.minHeight=e.minHeight||"300px",e.errorCallback=e.errorCallback||function(e){alert(e)},e.uploadImage=e.uploadImage||!1,e.imageMaxSize=e.imageMaxSize||2097152,e.imageAccept=e.imageAccept||"image/png, image/jpeg",e.imageTexts=Cz({},_z,e.imageTexts||{}),e.errorMessages=Cz({},Ez,e.errorMessages||{}),null!=e.autosave&&null!=e.autosave.unique_id&&""!=e.autosave.unique_id&&(e.autosave.uniqueId=e.autosave.unique_id),e.overlayMode&&void 0===e.overlayMode.combine&&(e.overlayMode.combine=!0),this.options=e,this.render(),!e.initialValue||this.options.autosave&&!0===this.options.autosave.foundSavedValue||this.value(e.initialValue),e.uploadImage){var a=this;this.codemirror.on("dragenter",(function(e,t){a.updateStatusBar("upload-image",a.options.imageTexts.sbOnDragEnter),t.stopPropagation(),t.preventDefault()})),this.codemirror.on("dragend",(function(e,t){a.updateStatusBar("upload-image",a.options.imageTexts.sbInit),t.stopPropagation(),t.preventDefault()})),this.codemirror.on("dragleave",(function(e,t){a.updateStatusBar("upload-image",a.options.imageTexts.sbInit),t.stopPropagation(),t.preventDefault()})),this.codemirror.on("dragover",(function(e,t){a.updateStatusBar("upload-image",a.options.imageTexts.sbOnDragEnter),t.stopPropagation(),t.preventDefault()})),this.codemirror.on("drop",(function(t,r){r.stopPropagation(),r.preventDefault(),e.imageUploadFunction?a.uploadImagesUsingCustomFunction(e.imageUploadFunction,r.dataTransfer.files):a.uploadImages(r.dataTransfer.files)})),this.codemirror.on("paste",(function(t,r){e.imageUploadFunction?a.uploadImagesUsingCustomFunction(e.imageUploadFunction,r.clipboardData.files):a.uploadImages(r.clipboardData.files)}))}}function Lz(){if("object"!=typeof localStorage)return!1;try{localStorage.setItem("smde_localStorage",1),localStorage.removeItem("smde_localStorage")}catch(e){return!1}return!0}Mz.prototype.uploadImages=function(e,t,r){if(0!==e.length){for(var n=[],i=0;i<e.length;i++)n.push(e[i].name),this.uploadImage(e[i],t,r);this.updateStatusBar("upload-image",this.options.imageTexts.sbOnDrop.replace("#images_names#",n.join(", ")))}},Mz.prototype.uploadImagesUsingCustomFunction=function(e,t){if(0!==t.length){for(var r=[],n=0;n<t.length;n++)r.push(t[n].name),this.uploadImageUsingCustomFunction(e,t[n]);this.updateStatusBar("upload-image",this.options.imageTexts.sbOnDrop.replace("#images_names#",r.join(", ")))}},Mz.prototype.updateStatusBar=function(e,t){if(this.gui.statusbar){var r=this.gui.statusbar.getElementsByClassName(e);1===r.length?this.gui.statusbar.getElementsByClassName(e)[0].textContent=t:0===r.length?console.log("EasyMDE: status bar item "+e+" was not found."):console.log("EasyMDE: Several status bar items named "+e+" was found.")}},Mz.prototype.markdown=function(e){if(EC){var t;if(t=this.options&&this.options.renderingConfig&&this.options.renderingConfig.markedOptions?this.options.renderingConfig.markedOptions:{},this.options&&this.options.renderingConfig&&!1===this.options.renderingConfig.singleLineBreaks?t.breaks=!1:t.breaks=!0,this.options&&this.options.renderingConfig&&!0===this.options.renderingConfig.codeSyntaxHighlighting){var r=this.options.renderingConfig.hljs||window.hljs;r&&(t.highlight=function(e,t){return t&&r.getLanguage(t)?r.highlight(t,e).value:r.highlightAuto(e).value})}EC.setOptions(t);var n=EC.parse(e);return this.options.renderingConfig&&"function"==typeof this.options.renderingConfig.sanitizerFunction&&(n=this.options.renderingConfig.sanitizerFunction.call(this,n)),n=function(e){for(var t=(new DOMParser).parseFromString(e,"text/html"),r=t.getElementsByTagName("li"),n=0;n<r.length;n++)for(var i=r[n],o=0;o<i.children.length;o++){var a=i.children[o];a instanceof HTMLInputElement&&"checkbox"===a.type&&(i.style.marginLeft="-1.5em",i.style.listStyleType="none")}return t.documentElement.innerHTML}(n=function(e){for(var t;null!==(t=LC.exec(e));){var r=t[0];if(-1===r.indexOf("target=")){var n=r.replace(/>$/,' target="_blank">');e=e.replace(r,n)}}return e}(n))}},Mz.prototype.render=function(e){if(e||(e=this.element||document.getElementsByTagName("textarea")[0]),!this._rendered||this._rendered!==e){this.element=e;var t,r,n=this.options,i=this,o={};for(var a in n.shortcuts)null!==n.shortcuts[a]&&null!==IC[a]&&function(e){o[PC(n.shortcuts[e])]=function(){var t=IC[e];"function"==typeof t?t(i):"string"==typeof t&&window.open(t,"_blank")}}(a);if(o.Enter="newlineAndIndentContinueMarkdownList",o.Tab="tabAndIndentMarkdownList",o["Shift-Tab"]="shiftTabAndUnindentMarkdownList",o.Esc=function(e){e.getOption("fullScreen")&&XC(i)},this.documentOnKeyDown=function(e){27==(e=e||window.event).keyCode&&i.codemirror.getOption("fullScreen")&&XC(i)},document.addEventListener("keydown",this.documentOnKeyDown,!1),n.overlayMode?(DC.defineMode("overlay-mode",(function(e){return DC.overlayMode(DC.getMode(e,!1!==n.spellChecker?"spell-checker":"gfm"),n.overlayMode.mode,n.overlayMode.combine)})),t="overlay-mode",(r=n.parsingConfig).gitHubSpice=!1):((t=n.parsingConfig).name="gfm",t.gitHubSpice=!1),!1!==n.spellChecker&&(t="spell-checker",(r=n.parsingConfig).name="gfm",r.gitHubSpice=!1,"function"==typeof n.spellChecker?n.spellChecker({codeMirrorInstance:DC}):_C({codeMirrorInstance:DC})),this.codemirror=DC.fromTextArea(e,{mode:t,backdrop:r,theme:null!=n.theme?n.theme:"easymde",tabSize:null!=n.tabSize?n.tabSize:2,indentUnit:null!=n.tabSize?n.tabSize:2,indentWithTabs:!1!==n.indentWithTabs,lineNumbers:!0===n.lineNumbers,autofocus:!0===n.autofocus,extraKeys:o,direction:n.direction,lineWrapping:!1!==n.lineWrapping,allowDropFileTypes:["text/plain"],placeholder:n.placeholder||e.getAttribute("placeholder")||"",styleSelectedText:null!=n.styleSelectedText?n.styleSelectedText:!BC(),scrollbarStyle:null!=n.scrollbarStyle?n.scrollbarStyle:"native",configureMouse:function(e,t,r){return{addNew:!1}},inputStyle:null!=n.inputStyle?n.inputStyle:BC()?"contenteditable":"textarea",spellcheck:null==n.nativeSpellcheck||n.nativeSpellcheck,autoRefresh:null!=n.autoRefresh&&n.autoRefresh}),this.codemirror.getScrollerElement().style.minHeight=n.minHeight,void 0!==n.maxHeight&&(this.codemirror.getScrollerElement().style.height=n.maxHeight),!0===n.forceSync){var s=this.codemirror;s.on("change",(function(){s.save()}))}this.gui={};var c=document.createElement("div");c.classList.add("EasyMDEContainer");var l=this.codemirror.getWrapperElement();l.parentNode.insertBefore(c,l),c.appendChild(l),!1!==n.toolbar&&(this.gui.toolbar=this.createToolbar()),!1!==n.status&&(this.gui.statusbar=this.createStatusbar()),null!=n.autosave&&!0===n.autosave.enabled&&(this.autosave(),this.codemirror.on("change",(function(){clearTimeout(i._autosave_timeout),i._autosave_timeout=setTimeout((function(){i.autosave()}),i.options.autosave.submit_delay||i.options.autosave.delay||1e3)})));var u=this;this.codemirror.on("update",(function(){n.previewImagesInEditor&&c.querySelectorAll(".cm-image-marker").forEach((function(e){var t=e.parentElement;if(t.innerText.match(/^!\[.*?\]\(.*\)/g)&&!t.hasAttribute("data-img-src")){var r=t.innerText.match("\\((.*)\\)");if(window.EMDEimagesCache||(window.EMDEimagesCache={}),r&&r.length>=2){var n=r[1];if(window.EMDEimagesCache[n])d(t,window.EMDEimagesCache[n]);else{var i=document.createElement("img");i.onload=function(){window.EMDEimagesCache[n]={naturalWidth:i.naturalWidth,naturalHeight:i.naturalHeight,url:n},d(t,window.EMDEimagesCache[n])},i.src=n}}}}))})),this.gui.sideBySide=this.createSideBySide(),this._rendered=this.element;var p=this.codemirror;setTimeout(function(){p.refresh()}.bind(p),0)}function d(e,t){var r,n;e.setAttribute("data-img-src",t.url),e.setAttribute("style","--bg-image:url("+t.url+");--width:"+t.naturalWidth+"px;--height:"+(r=t.naturalWidth,n=t.naturalHeight,r<window.getComputedStyle(document.querySelector(".CodeMirror-sizer")).width.replace("px","")?n+"px":n/r*100+"%")),u.codemirror.setSize()}},Mz.prototype.cleanup=function(){document.removeEventListener("keydown",this.documentOnKeyDown)},Mz.prototype.autosave=function(){if(Lz()){var e=this;if(null==this.options.autosave.uniqueId||""==this.options.autosave.uniqueId)return void console.log("EasyMDE: You must set a uniqueId to use the autosave feature");!0!==this.options.autosave.binded&&(null!=e.element.form&&null!=e.element.form&&e.element.form.addEventListener("submit",(function(){clearTimeout(e.autosaveTimeoutId),e.autosaveTimeoutId=void 0,localStorage.removeItem("smde_"+e.options.autosave.uniqueId)})),this.options.autosave.binded=!0),!0!==this.options.autosave.loaded&&("string"==typeof localStorage.getItem("smde_"+this.options.autosave.uniqueId)&&""!=localStorage.getItem("smde_"+this.options.autosave.uniqueId)&&(this.codemirror.setValue(localStorage.getItem("smde_"+this.options.autosave.uniqueId)),this.options.autosave.foundSavedValue=!0),this.options.autosave.loaded=!0);var t=e.value();""!==t?localStorage.setItem("smde_"+this.options.autosave.uniqueId,t):localStorage.removeItem("smde_"+this.options.autosave.uniqueId);var r=document.getElementById("autosaved");if(null!=r&&null!=r&&""!=r){var n=new Date,i=new Intl.DateTimeFormat([this.options.autosave.timeFormat.locale,"en-US"],this.options.autosave.timeFormat.format).format(n),o=null==this.options.autosave.text?"Autosaved: ":this.options.autosave.text;r.innerHTML=o+i}}else console.log("EasyMDE: localStorage not available, cannot autosave")},Mz.prototype.clearAutosavedValue=function(){if(Lz()){if(null==this.options.autosave||null==this.options.autosave.uniqueId||""==this.options.autosave.uniqueId)return void console.log("EasyMDE: You must set a uniqueId to clear the autosave value");localStorage.removeItem("smde_"+this.options.autosave.uniqueId)}else console.log("EasyMDE: localStorage not available, cannot autosave")},Mz.prototype.openBrowseFileWindow=function(e,t){var r=this,n=this.gui.toolbar.getElementsByClassName("imageInput")[0];n.click(),n.addEventListener("change",(function i(o){r.options.imageUploadFunction?r.uploadImagesUsingCustomFunction(r.options.imageUploadFunction,o.target.files):r.uploadImages(o.target.files,e,t),n.removeEventListener("change",i)}))},Mz.prototype.uploadImage=function(e,t,r){var n=this;function i(e){n.updateStatusBar("upload-image",e),setTimeout((function(){n.updateStatusBar("upload-image",n.options.imageTexts.sbInit)}),1e4),r&&"function"==typeof r&&r(e),n.options.errorCallback(e)}function o(t){var r=n.options.imageTexts.sizeUnits.split(",");return t.replace("#image_name#",e.name).replace("#image_size#",wz(e.size,r)).replace("#image_max_size#",wz(n.options.imageMaxSize,r))}if(t=t||function(e){uz(n,e)},e.size>this.options.imageMaxSize)i(o(this.options.errorMessages.fileTooLarge));else{var a=new FormData;a.append("image",e),n.options.imageCSRFToken&&a.append("csrfmiddlewaretoken",n.options.imageCSRFToken);var s=new XMLHttpRequest;s.upload.onprogress=function(t){if(t.lengthComputable){var r=""+Math.round(100*t.loaded/t.total);n.updateStatusBar("upload-image",n.options.imageTexts.sbProgress.replace("#file_name#",e.name).replace("#progress#",r))}},s.open("POST",this.options.imageUploadEndpoint),s.onload=function(){try{var e=JSON.parse(this.responseText)}catch(e){return console.error("EasyMDE: The server did not return a valid json."),void i(o(n.options.errorMessages.importError))}200===this.status&&e&&!e.error&&e.data&&e.data.filePath?t((n.options.imagePathAbsolute?"":window.location.origin+"/")+e.data.filePath):e.error&&e.error in n.options.errorMessages?i(o(n.options.errorMessages[e.error])):e.error?i(o(e.error)):(console.error("EasyMDE: Received an unexpected response after uploading the image."+this.status+" ("+this.statusText+")"),i(o(n.options.errorMessages.importError)))},s.onerror=function(e){console.error("EasyMDE: An unexpected error occurred when trying to upload the image."+e.target.status+" ("+e.target.statusText+")"),i(n.options.errorMessages.importError)},s.send(a)}},Mz.prototype.uploadImageUsingCustomFunction=function(e,t){var r=this;e.apply(this,[t,function(e){uz(r,e)},function(e){var n=function(e){var n=r.options.imageTexts.sizeUnits.split(",");return e.replace("#image_name#",t.name).replace("#image_size#",wz(t.size,n)).replace("#image_max_size#",wz(r.options.imageMaxSize,n))}(e);r.updateStatusBar("upload-image",n),setTimeout((function(){r.updateStatusBar("upload-image",r.options.imageTexts.sbInit)}),1e4),r.options.errorCallback(n)}])},Mz.prototype.setPreviewMaxHeight=function(){var e=this.codemirror.getWrapperElement(),t=e.nextSibling,r=parseInt(window.getComputedStyle(e).paddingTop),n=parseInt(window.getComputedStyle(e).borderTopWidth),i=(parseInt(this.options.maxHeight)+2*r+2*n).toString()+"px";t.style.height=i},Mz.prototype.createSideBySide=function(){var e=this.codemirror,t=e.getWrapperElement(),r=t.nextSibling;if(!r||!/editor-preview-side/.test(r.className)){if((r=document.createElement("div")).className="editor-preview-side",this.options.previewClass)if(Array.isArray(this.options.previewClass))for(var n=0;n<this.options.previewClass.length;n++)r.className+=" "+this.options.previewClass[n];else"string"==typeof this.options.previewClass&&(r.className+=" "+this.options.previewClass);t.parentNode.insertBefore(r,t.nextSibling)}if(void 0!==this.options.maxHeight&&this.setPreviewMaxHeight(),!1===this.options.syncSideBySidePreviewScroll)return r;var i=!1,o=!1;return e.on("scroll",(function(e){if(i)i=!1;else{o=!0;var t=e.getScrollInfo().height-e.getScrollInfo().clientHeight,n=parseFloat(e.getScrollInfo().top)/t,a=(r.scrollHeight-r.clientHeight)*n;r.scrollTop=a}})),r.onscroll=function(){if(o)o=!1;else{i=!0;var t=r.scrollHeight-r.clientHeight,n=parseFloat(r.scrollTop)/t,a=(e.getScrollInfo().height-e.getScrollInfo().clientHeight)*n;e.scrollTo(0,a)}},r},Mz.prototype.createToolbar=function(e){if((e=e||this.options.toolbar)&&0!==e.length){var t;for(t=0;t<e.length;t++)null!=Sz[e[t]]&&(e[t]=Sz[e[t]]);var r=document.createElement("div");r.className="editor-toolbar";var n=this,i={};for(n.toolbar=e,t=0;t<e.length;t++)if(("guide"!=e[t].name||!1!==n.options.toolbarGuideIcon)&&!(n.options.hideIcons&&-1!=n.options.hideIcons.indexOf(e[t].name)||("fullscreen"==e[t].name||"side-by-side"==e[t].name)&&BC())){if("|"===e[t]){for(var o=!1,a=t+1;a<e.length;a++)"|"===e[a]||n.options.hideIcons&&-1!=n.options.hideIcons.indexOf(e[a].name)||(o=!0);if(!o)continue}!function(e){var t;if(t="|"===e?UC():e.children?qC(e,n.options.toolbarTips,n.options.shortcuts,n):HC(e,!0,n.options.toolbarTips,n.options.shortcuts,"button",n),i[e.name||e]=t,r.appendChild(t),"upload-image"===e.name){var o=document.createElement("input");o.className="imageInput",o.type="file",o.multiple=!0,o.name="image",o.accept=n.options.imageAccept,o.style.display="none",o.style.opacity=0,r.appendChild(o)}}(e[t])}n.toolbar_div=r,n.toolbarElements=i;var s=this.codemirror;s.on("cursorActivity",(function(){var e=GC(s);for(var t in i)!function(t){var r=i[t];e[t]?r.className+=" active":"fullscreen"!=t&&"side-by-side"!=t&&(r.className=r.className.replace(/\s*active\s*/g,""))}(t)}));var c=s.getWrapperElement();return c.parentNode.insertBefore(r,c),r}},Mz.prototype.createStatusbar=function(e){e=e||this.options.status;var t=this.options,r=this.codemirror;if(e&&0!==e.length){var n,i,o,a,s=[];for(n=0;n<e.length;n++)if(i=void 0,o=void 0,a=void 0,"object"==typeof e[n])s.push({className:e[n].className,defaultValue:e[n].defaultValue,onUpdate:e[n].onUpdate,onActivity:e[n].onActivity});else{var c=e[n];"words"===c?(a=function(e){e.innerHTML=zz(r.getValue())},i=function(e){e.innerHTML=zz(r.getValue())}):"lines"===c?(a=function(e){e.innerHTML=r.lineCount()},i=function(e){e.innerHTML=r.lineCount()}):"cursor"===c?(a=function(e){e.innerHTML="1:1"},o=function(e){var t=r.getCursor(),n=t.line+1,i=t.ch+1;e.innerHTML=n+":"+i}):"autosave"===c?a=function(e){null!=t.autosave&&!0===t.autosave.enabled&&e.setAttribute("id","autosaved")}:"upload-image"===c&&(a=function(e){e.innerHTML=t.imageTexts.sbInit}),s.push({className:c,defaultValue:a,onUpdate:i,onActivity:o})}var l=document.createElement("div");for(l.className="editor-statusbar",n=0;n<s.length;n++){var u=s[n],p=document.createElement("span");p.className=u.className,"function"==typeof u.defaultValue&&u.defaultValue(p),"function"==typeof u.onUpdate&&this.codemirror.on("update",function(e,t){return function(){t.onUpdate(e)}}(p,u)),"function"==typeof u.onActivity&&this.codemirror.on("cursorActivity",function(e,t){return function(){t.onActivity(e)}}(p,u)),l.appendChild(p)}var d=this.codemirror.getWrapperElement();return d.parentNode.insertBefore(l,d.nextSibling),l}},Mz.prototype.value=function(e){var t=this.codemirror;if(void 0===e)return t.getValue();if(t.getDoc().setValue(e),this.isPreviewActive()){var r=t.getWrapperElement().lastChild;r.innerHTML=this.options.previewRender(e,r)}return this},Mz.toggleBold=VC,Mz.toggleItalic=YC,Mz.toggleStrikethrough=KC,Mz.toggleBlockquote=ZC,Mz.toggleHeadingSmaller=QC,Mz.toggleHeadingBigger=ez,Mz.toggleHeading1=tz,Mz.toggleHeading2=rz,Mz.toggleHeading3=nz,Mz.toggleCodeBlock=JC,Mz.toggleUnorderedList=iz,Mz.toggleOrderedList=oz,Mz.cleanBlock=az,Mz.drawLink=sz,Mz.drawImage=cz,Mz.drawUploadedImage=lz,Mz.drawTable=pz,Mz.drawHorizontalRule=dz,Mz.undo=mz,Mz.redo=fz,Mz.togglePreview=gz,Mz.toggleSideBySide=hz,Mz.toggleFullScreen=XC,Mz.prototype.toggleBold=function(){VC(this)},Mz.prototype.toggleItalic=function(){YC(this)},Mz.prototype.toggleStrikethrough=function(){KC(this)},Mz.prototype.toggleBlockquote=function(){ZC(this)},Mz.prototype.toggleHeadingSmaller=function(){QC(this)},Mz.prototype.toggleHeadingBigger=function(){ez(this)},Mz.prototype.toggleHeading1=function(){tz(this)},Mz.prototype.toggleHeading2=function(){rz(this)},Mz.prototype.toggleHeading3=function(){nz(this)},Mz.prototype.toggleCodeBlock=function(){JC(this)},Mz.prototype.toggleUnorderedList=function(){iz(this)},Mz.prototype.toggleOrderedList=function(){oz(this)},Mz.prototype.cleanBlock=function(){az(this)},Mz.prototype.drawLink=function(){sz(this)},Mz.prototype.drawImage=function(){cz(this)},Mz.prototype.drawUploadedImage=function(){lz(this)},Mz.prototype.drawTable=function(){pz(this)},Mz.prototype.drawHorizontalRule=function(){dz(this)},Mz.prototype.undo=function(){mz(this)},Mz.prototype.redo=function(){fz(this)},Mz.prototype.togglePreview=function(){gz(this)},Mz.prototype.toggleSideBySide=function(){hz(this)},Mz.prototype.toggleFullScreen=function(){XC(this)},Mz.prototype.isPreviewActive=function(){var e=this.codemirror.getWrapperElement().lastChild;return/editor-preview-active/.test(e.className)},Mz.prototype.isSideBySideActive=function(){var e=this.codemirror.getWrapperElement().nextSibling;return/editor-preview-active-side/.test(e.className)},Mz.prototype.isFullscreenActive=function(){return this.codemirror.getOption("fullScreen")},Mz.prototype.getState=function(){return GC(this.codemirror)},Mz.prototype.toTextArea=function(){var e=this.codemirror,t=e.getWrapperElement(),r=t.parentNode;r&&(this.gui.toolbar&&r.removeChild(this.gui.toolbar),this.gui.statusbar&&r.removeChild(this.gui.statusbar),this.gui.sideBySide&&r.removeChild(this.gui.sideBySide)),r.parentNode.insertBefore(t,r),r.remove(),e.toTextArea(),this.autosaveTimeoutId&&(clearTimeout(this.autosaveTimeoutId),this.autosaveTimeoutId=void 0,this.clearAutosavedValue())};var Iz=Mz;t('/**\n * easymde v2.16.1\n * Copyright Jeroen Akkerman\n * @link https://github.com/ionaru/easy-markdown-editor\n * @license MIT\n */\n.CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor .CodeMirror-line::selection,.cm-fat-cursor .CodeMirror-line>span::selection,.cm-fat-cursor .CodeMirror-line>span>span::selection{background:0 0}.cm-fat-cursor .CodeMirror-line::-moz-selection,.cm-fat-cursor .CodeMirror-line>span::-moz-selection,.cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:0 0}.cm-fat-cursor{caret-color:transparent}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-type,.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:red}.cm-invalidchar{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none;outline:0}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:0 0!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:0}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:\'\'}span.CodeMirror-selectedtext{background:0 0}.EasyMDEContainer{display:block}.CodeMirror-rtl pre{direction:rtl}.EasyMDEContainer.sided--no-fullscreen{display:flex;flex-direction:row;flex-wrap:wrap}.EasyMDEContainer .CodeMirror{box-sizing:border-box;height:auto;border:1px solid #ddd;border-bottom-left-radius:4px;border-bottom-right-radius:4px;padding:10px;font:inherit;z-index:0;word-wrap:break-word}.EasyMDEContainer .CodeMirror-scroll{cursor:text}.EasyMDEContainer .CodeMirror-fullscreen{background:#fff;position:fixed!important;top:50px;left:0;right:0;bottom:0;height:auto;z-index:8;border-right:none!important;border-bottom-right-radius:0!important}.EasyMDEContainer .CodeMirror-sided{width:50%!important}.EasyMDEContainer.sided--no-fullscreen .CodeMirror-sided{border-right:none!important;border-bottom-right-radius:0;position:relative;flex:1 1 auto}.EasyMDEContainer .CodeMirror-placeholder{opacity:.5}.EasyMDEContainer .CodeMirror-focused .CodeMirror-selected{background:#d9d9d9}.editor-toolbar{position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;padding:9px 10px;border-top:1px solid #bbb;border-left:1px solid #bbb;border-right:1px solid #bbb;border-top-left-radius:4px;border-top-right-radius:4px}.editor-toolbar.fullscreen{width:100%;height:50px;padding-top:10px;padding-bottom:10px;box-sizing:border-box;background:#fff;border:0;position:fixed;top:0;left:0;opacity:1;z-index:9}.editor-toolbar.fullscreen::before{width:20px;height:50px;background:-moz-linear-gradient(left,#fff 0,rgba(255,255,255,0) 100%);background:-webkit-gradient(linear,left top,right top,color-stop(0,#fff),color-stop(100%,rgba(255,255,255,0)));background:-webkit-linear-gradient(left,#fff 0,rgba(255,255,255,0) 100%);background:-o-linear-gradient(left,#fff 0,rgba(255,255,255,0) 100%);background:-ms-linear-gradient(left,#fff 0,rgba(255,255,255,0) 100%);background:linear-gradient(to right,#fff 0,rgba(255,255,255,0) 100%);position:fixed;top:0;left:0;margin:0;padding:0}.editor-toolbar.fullscreen::after{width:20px;height:50px;background:-moz-linear-gradient(left,rgba(255,255,255,0) 0,#fff 100%);background:-webkit-gradient(linear,left top,right top,color-stop(0,rgba(255,255,255,0)),color-stop(100%,#fff));background:-webkit-linear-gradient(left,rgba(255,255,255,0) 0,#fff 100%);background:-o-linear-gradient(left,rgba(255,255,255,0) 0,#fff 100%);background:-ms-linear-gradient(left,rgba(255,255,255,0) 0,#fff 100%);background:linear-gradient(to right,rgba(255,255,255,0) 0,#fff 100%);position:fixed;top:0;right:0;margin:0;padding:0}.EasyMDEContainer.sided--no-fullscreen .editor-toolbar{width:100%}.editor-toolbar .easymde-dropdown,.editor-toolbar button{background:0 0;display:inline-block;text-align:center;text-decoration:none!important;height:30px;margin:0;padding:0;border:1px solid transparent;border-radius:3px;cursor:pointer}.editor-toolbar button{width:30px}.editor-toolbar button.active,.editor-toolbar button:hover{background:#fcfcfc;border-color:#95a5a6}.editor-toolbar i.separator{display:inline-block;width:0;border-left:1px solid #d9d9d9;border-right:1px solid #fff;color:transparent;text-indent:-10px;margin:0 6px}.editor-toolbar button:after{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:65%;vertical-align:text-bottom;position:relative;top:2px}.editor-toolbar button.heading-1:after{content:"1"}.editor-toolbar button.heading-2:after{content:"2"}.editor-toolbar button.heading-3:after{content:"3"}.editor-toolbar button.heading-bigger:after{content:"▲"}.editor-toolbar button.heading-smaller:after{content:"▼"}.editor-toolbar.disabled-for-preview button:not(.no-disable){opacity:.6;pointer-events:none}@media only screen and (max-width:700px){.editor-toolbar i.no-mobile{display:none}}.editor-statusbar{padding:8px 10px;font-size:12px;color:#959694;text-align:right}.EasyMDEContainer.sided--no-fullscreen .editor-statusbar{width:100%}.editor-statusbar span{display:inline-block;min-width:4em;margin-left:1em}.editor-statusbar .lines:before{content:\'lines: \'}.editor-statusbar .words:before{content:\'words: \'}.editor-statusbar .characters:before{content:\'characters: \'}.editor-preview-full{position:absolute;width:100%;height:100%;top:0;left:0;z-index:7;overflow:auto;display:none;box-sizing:border-box}.editor-preview-side{position:fixed;bottom:0;width:50%;top:50px;right:0;z-index:9;overflow:auto;display:none;box-sizing:border-box;border:1px solid #ddd;word-wrap:break-word}.editor-preview-active-side{display:block}.EasyMDEContainer.sided--no-fullscreen .editor-preview-active-side{flex:1 1 auto;height:auto;position:static}.editor-preview-active{display:block}.editor-preview{padding:10px;background:#fafafa}.editor-preview>p{margin-top:0}.editor-preview pre{background:#eee;margin-bottom:10px}.editor-preview table td,.editor-preview table th{border:1px solid #ddd;padding:5px}.cm-s-easymde .cm-tag{color:#63a35c}.cm-s-easymde .cm-attribute{color:#795da3}.cm-s-easymde .cm-string{color:#183691}.cm-s-easymde .cm-header-1{font-size:200%;line-height:200%}.cm-s-easymde .cm-header-2{font-size:160%;line-height:160%}.cm-s-easymde .cm-header-3{font-size:125%;line-height:125%}.cm-s-easymde .cm-header-4{font-size:110%;line-height:110%}.cm-s-easymde .cm-comment{background:rgba(0,0,0,.05);border-radius:2px}.cm-s-easymde .cm-link{color:#7f8c8d}.cm-s-easymde .cm-url{color:#aab2b3}.cm-s-easymde .cm-quote{color:#7f8c8d;font-style:italic}.editor-toolbar .easymde-dropdown{position:relative;background:linear-gradient(to bottom right,#fff 0,#fff 84%,#333 50%,#333 100%);border-radius:0;border:1px solid #fff}.editor-toolbar .easymde-dropdown:hover{background:linear-gradient(to bottom right,#fff 0,#fff 84%,#333 50%,#333 100%)}.easymde-dropdown-content{display:block;visibility:hidden;position:absolute;background-color:#f9f9f9;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);padding:8px;z-index:2;top:30px}.easymde-dropdown:active .easymde-dropdown-content,.easymde-dropdown:focus .easymde-dropdown-content,.easymde-dropdown:focus-within .easymde-dropdown-content{visibility:visible}span[data-img-src]::after{content:\'\';background-image:var(--bg-image);display:block;max-height:100%;max-width:100%;background-size:contain;height:0;padding-top:var(--height);width:var(--width);background-repeat:no-repeat}.CodeMirror .cm-spell-error:not(.cm-url):not(.cm-comment):not(.cm-tag):not(.cm-word){background:rgba(255,0,0,.15)}');function Oz(e){let t,n;return{c(){t=_("div"),n=_("textarea"),n.disabled=!0,j(n,"id",e[0]),j(t,"style",e[3]),j(t,"class","svelte-1gaj2sn"),X(t,"disabled",e[1])},m(r,i){D(r,t,i),A(t,n),e[9](n)},p(e,[r]){1&r&&j(n,"id",e[0]),8&r&&j(t,"style",e[3]),2&r&&X(t,"disabled",e[1])},i:r,o:r,d(r){r&&T(t),e[9](null)}}}function Bz(e,t,r){let n,i,{height:o=null}=t,{scroll:a=!0}=t,{easyMDEOptions:s=null}=t,{mde:c=null}=t,{id:l=null}=t,{fullScreenOffset:u=null}=t,{disabled:p=!1}=t;ne((()=>(r(4,o=o||"200px"),r(5,c=new Iz({element:i,spellChecker:!1,status:!1,unorderedListStyle:"-",maxHeight:a?o:void 0,minHeight:a?void 0:o,...s})),()=>{c.toTextArea()})));return e.$$set=e=>{"height"in e&&r(4,o=e.height),"scroll"in e&&r(6,a=e.scroll),"easyMDEOptions"in e&&r(7,s=e.easyMDEOptions),"mde"in e&&r(5,c=e.mde),"id"in e&&r(0,l=e.id),"fullScreenOffset"in e&&r(8,u=e.fullScreenOffset),"disabled"in e&&r(1,p=e.disabled)},e.$$.update=()=>{256&e.$$.dirty&&r(3,n=(e=>{let t="";return t+=`--fullscreen-offset-x:${e?.x||"0px"};`,t+=`--fullscreen-offset-y:${e?.y||"0px"};`,t})(u))},[l,p,i,n,o,c,a,s,u,function(e){le[e?"unshift":"push"]((()=>{i=e,r(2,i)}))}]}t(".disabled.svelte-1gaj2sn textarea{display:none}.disabled.svelte-1gaj2sn .CodeMirror-cursor{display:none}.disabled.svelte-1gaj2sn .EasyMDEContainer{pointer-events:none}.disabled.svelte-1gaj2sn .editor-toolbar button i{color:var(--spectrum-global-color-gray-400)}.disabled.svelte-1gaj2sn .CodeMirror{color:var(--spectrum-global-color-gray-600)}.EasyMDEContainer .editor-toolbar{background:var(--spectrum-global-color-gray-50);border-top:1px solid var(--spectrum-alias-border-color);border-left:1px solid var(--spectrum-alias-border-color);border-right:1px solid var(--spectrum-alias-border-color)}.EasyMDEContainer .CodeMirror{border:1px solid var(--spectrum-alias-border-color);background:var(--spectrum-global-color-gray-50);color:var(--spectrum-alias-text-color)}.EasyMDEContainer .editor-toolbar button.active{background:var(--spectrum-global-color-gray-200);border-color:var(--spectrum-global-color-gray-400)}.EasyMDEContainer .editor-toolbar button:hover{background:var(--spectrum-global-color-gray-200);border-color:var(--spectrum-global-color-gray-400)}.EasyMDEContainer .editor-toolbar button i{color:var(--spectrum-global-color-gray-800)}.EasyMDEContainer .editor-toolbar i.separator{border-color:var(--spectrum-global-color-gray-300)}.EasyMDEContainer .CodeMirror-cursor{border-color:var(--spectrum-alias-text-color)}.EasyMDEContainer .CodeMirror-selectedtext{background:var(--spectrum-global-color-gray-400) !important}.EasyMDEContainer .CodeMirror-selected{background:var(--spectrum-global-color-gray-400) !important}.EasyMDEContainer .cm-s-easymde .cm-link{color:var(--spectrum-global-color-gray-600)}.EasyMDEContainer .cm-s-easymde .cm-url{color:var(--spectrum-global-color-gray-500)}.EasyMDEContainer .editor-preview{background:var(--spectrum-global-color-gray-50)}.EasyMDEContainer .editor-preview{border:1px solid var(--spectrum-alias-border-color)}.EasyMDEContainer .cm-s-easymde .cm-comment{background:var(--spectrum-global-color-gray-100)}.EasyMDEContainer pre{background:var(--spectrum-global-color-gray-100);padding:4px;border-radius:4px}.EasyMDEContainer code{color:#e83e8c}.EasyMDEContainer pre code{color:var(--spectrum-alias-text-color)}.EasyMDEContainer blockquote{border-left:4px solid var(--spectrum-global-color-gray-400);color:var(--spectrum-global-color-gray-700);margin-left:0;padding-left:20px}.EasyMDEContainer hr{background-color:var(--spectrum-global-color-gray-300);border:none;height:2px}.EasyMDEContainer td, .EasyMDEContainer th{border-color:var(--spectrum-alias-border-color) !important}.EasyMDEContainer a{color:var(--primaryColor)}.EasyMDEContainer a:hover{color:var(--primaryColorHover)}.EasyMDEContainer .editor-toolbar.fullscreen{left:var(--fullscreen-offset-x);top:var(--fullscreen-offset-y)}.EasyMDEContainer .CodeMirror-fullscreen{left:var(--fullscreen-offset-x);top:calc(50px + var(--fullscreen-offset-y))}.EasyMDEContainer .CodeMirror-fullscreen.CodeMirror-sided{width:calc((100% - var(--fullscreen-offset-x)) / 2) !important}.EasyMDEContainer .editor-preview-side{left:calc(50% + (var(--fullscreen-offset-x) / 2));top:calc(50px + var(--fullscreen-offset-y));width:calc((100% - var(--fullscreen-offset-x)) / 2) !important}");class Pz extends Ne{constructor(e){super(),Re(this,e,Bz,Oz,l,{height:4,scroll:6,easyMDEOptions:7,mde:5,id:0,fullScreenOffset:8,disabled:1})}}function jz(e){let t,r,n;function i(t){e[8](t)}let o={scroll:!0,height:e[1],id:e[3],fullScreenOffset:e[4],disabled:e[5],easyMDEOptions:{initialValue:e[0],placeholder:e[2],...e[6]}};return void 0!==e[7]&&(o.mde=e[7]),t=new Pz({props:o}),le.push((()=>Be(t,"mde",i))),{c(){Pe(t.$$.fragment)},m(e,r){je(t,e,r),n=!0},p(e,n){const i={};2&n&&(i.height=e[1]),8&n&&(i.id=e[3]),16&n&&(i.fullScreenOffset=e[4]),32&n&&(i.disabled=e[5]),69&n&&(i.easyMDEOptions={initialValue:e[0],placeholder:e[2],...e[6]}),!r&&128&n&&(r=!0,i.mde=e[7],ge((()=>r=!1))),t.$set(i)},i(e){n||(Te(t.$$.fragment,e),n=!0)},o(e){$e(t.$$.fragment,e),n=!1},d(e){Fe(t,e)}}}function Fz(e){let t,n,i=e[1],o=jz(e);return{c(){o.c(),t=I()},m(e,r){o.m(e,r),D(e,t,r),n=!0},p(e,[n]){2&n&&l(i,i=e[1])?(Ae(),$e(o,1,1,r),De(),o=jz(e),o.c(),Te(o),o.m(t.parentNode,t)):o.p(e,n)},i(e){n||(Te(o),n=!0)},o(e){$e(o),n=!1},d(e){e&&T(t),o.d(e)}}}function Rz(e,t,r){let{value:n=null}=t,{height:i=null}=t,{placeholder:o=null}=t,{id:a=null}=t,{fullScreenOffset:s=0}=t,{disabled:c=!1}=t,{easyMDEOptions:l}=t;const u=ie();let p,d;const m=((e,t)=>{let r;return()=>{clearTimeout(r),r=setTimeout(e,t)}})((()=>{p=d.value(),u("change",p)}),250);return e.$$set=e=>{"value"in e&&r(0,n=e.value),"height"in e&&r(1,i=e.height),"placeholder"in e&&r(2,o=e.placeholder),"id"in e&&r(3,a=e.id),"fullScreenOffset"in e&&r(4,s=e.fullScreenOffset),"disabled"in e&&r(5,c=e.disabled),"easyMDEOptions"in e&&r(6,l=e.easyMDEOptions)},e.$$.update=()=>{var t;1&e.$$.dirty&&(t=n,d&&t!==p&&d.value(t)),128&e.$$.dirty&&d?.codemirror.on("change",m)},[n,i,o,a,s,c,l,d,function(e){d=e,r(7,d)}]}class Nz extends Ne{constructor(e){super(),Re(this,e,Rz,Fz,l,{value:0,height:1,placeholder:2,id:3,fullScreenOffset:4,disabled:5,easyMDEOptions:6})}}function qz(e){let t,r,n,i;function o(t){e[3](t)}let a={scroll:!1,easyMDEOptions:{initialValue:e[0],toolbar:!1}};return void 0!==e[2]&&(a.mde=e[2]),r=new Pz({props:a}),le.push((()=>Be(r,"mde",o))),{c(){t=_("div"),Pe(r.$$.fragment),j(t,"class","markdown-viewer svelte-digdb7"),U(t,"height",e[1])},m(e,n){D(e,t,n),je(r,t,null),i=!0},p(e,[o]){const a={};1&o&&(a.easyMDEOptions={initialValue:e[0],toolbar:!1}),!n&&4&o&&(n=!0,a.mde=e[2],ge((()=>n=!1))),r.$set(a),(!i||2&o)&&U(t,"height",e[1])},i(e){i||(Te(r.$$.fragment,e),i=!0)},o(e){$e(r.$$.fragment,e),i=!1},d(e){e&&T(t),Fe(r)}}}function Hz(e,t,r){let n,{value:i}=t,{height:o}=t;return e.$$set=e=>{"value"in e&&r(0,i=e.value),"height"in e&&r(1,o=e.height)},e.$$.update=()=>{5&e.$$.dirty&&n&&n.value(i||""),4&e.$$.dirty&&n&&!n.isPreviewActive()&&n.togglePreview()},[i,o,n,function(e){n=e,r(2,n)}]}t(".markdown-viewer.svelte-digdb7{overflow:auto}.markdown-viewer.svelte-digdb7 .editor-preview{padding:0;border:none;background:transparent}.markdown-viewer.svelte-digdb7 .CodeMirror{border:none;background:transparent;padding:0}.markdown-viewer.svelte-digdb7 .EasyMDEContainer{background:transparent}.markdown-viewer.svelte-digdb7 .CodeMirror-scroll{display:none}.markdown-viewer.svelte-digdb7 .CodeMirror-vscrollbar{display:none !important}.markdown-viewer.svelte-digdb7 .editor-preview-full{position:relative}.markdown-viewer.svelte-digdb7 .editor-preview-full > :first-child{margin-top:0}.markdown-viewer.svelte-digdb7 .editor-preview-full > :last-child{margin-bottom:0}.markdown-viewer.svelte-digdb7 .editor-preview-full pre{background:var(--spectrum-global-color-gray-200)}");class Uz extends Ne{constructor(e){super(),Re(this,e,Hz,qz,l,{value:0,height:1})}}function Gz(e){let t,r,n;return r=new Nz({props:{value:e[0],placeholder:e[1],height:e[4],id:e[5],fullScreenOffset:e[6],disabled:e[2],easyMDEOptions:e[7]}}),r.$on("change",e[8]),{c(){t=_("div"),Pe(r.$$.fragment),j(t,"class","svelte-rs8sig"),X(t,"error",e[3])},m(e,i){D(e,t,i),je(r,t,null),n=!0},p(e,[n]){const i={};1&n&&(i.value=e[0]),2&n&&(i.placeholder=e[1]),16&n&&(i.height=e[4]),32&n&&(i.id=e[5]),64&n&&(i.fullScreenOffset=e[6]),4&n&&(i.disabled=e[2]),128&n&&(i.easyMDEOptions=e[7]),r.$set(i),8&n&&X(t,"error",e[3])},i(e){n||(Te(r.$$.fragment,e),n=!0)},o(e){$e(r.$$.fragment,e),n=!1},d(e){e&&T(t),Fe(r)}}}function Wz(e,t,r){let{value:n=""}=t,{placeholder:i=null}=t,{disabled:o=!1}=t,{error:a=null}=t,{height:s=null}=t,{id:c=null}=t,{fullScreenOffset:l=null}=t,{easyMDEOptions:u=null}=t;return e.$$set=e=>{"value"in e&&r(0,n=e.value),"placeholder"in e&&r(1,i=e.placeholder),"disabled"in e&&r(2,o=e.disabled),"error"in e&&r(3,a=e.error),"height"in e&&r(4,s=e.height),"id"in e&&r(5,c=e.id),"fullScreenOffset"in e&&r(6,l=e.fullScreenOffset),"easyMDEOptions"in e&&r(7,u=e.easyMDEOptions)},[n,i,o,a,s,c,l,u,function(t){se(e,t)}]}t(".error.svelte-rs8sig .EasyMDEContainer .editor-toolbar{border-top-color:var(--spectrum-semantic-negative-color-default);border-left-color:var(--spectrum-semantic-negative-color-default);border-right-color:var(--spectrum-semantic-negative-color-default)}.error.svelte-rs8sig .EasyMDEContainer .CodeMirror{border-bottom-color:var(--spectrum-semantic-negative-color-default);border-left-color:var(--spectrum-semantic-negative-color-default);border-right-color:var(--spectrum-semantic-negative-color-default)}.error.svelte-rs8sig .EasyMDEContainer .editor-preview-side{border-bottom-color:var(--spectrum-semantic-negative-color-default);border-right-color:var(--spectrum-semantic-negative-color-default)}");class Xz extends Ne{constructor(e){super(),Re(this,e,Wz,Gz,l,{value:0,placeholder:1,disabled:2,error:3,height:4,id:5,fullScreenOffset:6,easyMDEOptions:7})}}function Vz(e){let t,r;return t=new Xz({props:{error:e[5],disabled:e[4],value:e[0],placeholder:e[3],height:e[6],id:e[7],fullScreenOffset:e[8],easyMDEOptions:e[9]}}),t.$on("change",e[10]),{c(){Pe(t.$$.fragment)},m(e,n){je(t,e,n),r=!0},p(e,r){const n={};32&r&&(n.error=e[5]),16&r&&(n.disabled=e[4]),1&r&&(n.value=e[0]),8&r&&(n.placeholder=e[3]),64&r&&(n.height=e[6]),128&r&&(n.id=e[7]),256&r&&(n.fullScreenOffset=e[8]),512&r&&(n.easyMDEOptions=e[9]),t.$set(n)},i(e){r||(Te(t.$$.fragment,e),r=!0)},o(e){$e(t.$$.fragment,e),r=!1},d(e){Fe(t,e)}}}function Yz(e){let t,r;return t=new ft({props:{label:e[1],labelPosition:e[2],error:e[5],$$slots:{default:[Vz]},$$scope:{ctx:e}}}),{c(){Pe(t.$$.fragment)},m(e,n){je(t,e,n),r=!0},p(e,[r]){const n={};2&r&&(n.label=e[1]),4&r&&(n.labelPosition=e[2]),32&r&&(n.error=e[5]),5113&r&&(n.$$scope={dirty:r,ctx:e}),t.$set(n)},i(e){r||(Te(t.$$.fragment,e),r=!0)},o(e){$e(t.$$.fragment,e),r=!1},d(e){Fe(t,e)}}}function Kz(e,t,r){let{value:n=null}=t,{label:i=null}=t,{labelPosition:o="above"}=t,{placeholder:a=null}=t,{disabled:s=!1}=t,{error:c=null}=t,{height:l=null}=t,{id:u=null}=t,{fullScreenOffset:p=null}=t,{easyMDEOptions:d=null}=t;const m=ie();return e.$$set=e=>{"value"in e&&r(0,n=e.value),"label"in e&&r(1,i=e.label),"labelPosition"in e&&r(2,o=e.labelPosition),"placeholder"in e&&r(3,a=e.placeholder),"disabled"in e&&r(4,s=e.disabled),"error"in e&&r(5,c=e.error),"height"in e&&r(6,l=e.height),"id"in e&&r(7,u=e.id),"fullScreenOffset"in e&&r(8,p=e.fullScreenOffset),"easyMDEOptions"in e&&r(9,d=e.easyMDEOptions)},[n,i,o,a,s,c,l,u,p,d,e=>{r(0,n=e.detail),m("change",e.detail)}]}class Jz extends Ne{constructor(e){super(),Re(this,e,Kz,Yz,l,{value:0,label:1,labelPosition:2,placeholder:3,disabled:4,error:5,height:6,id:7,fullScreenOffset:8,easyMDEOptions:9})}}function Zz(e){let t,n;return{c(){t=_("div"),n=M(e[0]),j(t,"class","bold svelte-9amtlb")},m(e,r){D(e,t,r),A(t,n)},p(e,[t]){1&t&&q(n,e[0])},i:r,o:r,d(e){e&&T(t)}}}function Qz(e,t,r){let{value:n}=t;return e.$$set=e=>{"value"in e&&r(0,n=e.value)},[n]}t(".bold.svelte-9amtlb{font-weight:bold;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:var(--max-cell-width)}");class eS extends Ne{constructor(e){super(),Re(this,e,Qz,Zz,l,{value:0})}}function tS(e){let t,n;return{c(){t=_("code"),n=M(e[0]),j(t,"class","svelte-e82i3")},m(e,r){D(e,t,r),A(t,n)},p(e,[t]){1&t&&q(n,e[0])},i:r,o:r,d(e){e&&T(t)}}}function rS(e,t,r){let{value:n}=t;return e.$$set=e=>{"value"in e&&r(0,n=e.value)},[n]}t("code.svelte-e82i3{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:var(--max-cell-width)}");class nS extends Ne{constructor(e){super(),Re(this,e,rS,tS,l,{value:0})}}function iS(e){let t,r,n;const i=e[3].default,o=p(i,e,e[2],null);return{c(){t=_("p"),o&&o.c(),j(t,"class",r="spectrum-Detail spectrum-Detail--size"+e[0]+" svelte-129iykg"),X(t,"spectrum-Detail--serif",e[1])},m(e,r){D(e,t,r),o&&o.m(t,null),n=!0},p(e,[a]){o&&o.p&&(!n||4&a)&&m(o,i,e,e[2],a,null,null),(!n||1&a&&r!==(r="spectrum-Detail spectrum-Detail--size"+e[0]+" svelte-129iykg"))&&j(t,"class",r),3&a&&X(t,"spectrum-Detail--serif",e[1])},i(e){n||(Te(o,e),n=!0)},o(e){$e(o,e),n=!1},d(e){e&&T(t),o&&o.d(e)}}}function oS(e,t,r){let{$$slots:n={},$$scope:i}=t,{size:o="M"}=t,{serif:a=!1}=t;return e.$$set=e=>{"size"in e&&r(0,o=e.size),"serif"in e&&r(1,a=e.serif),"$$scope"in e&&r(2,i=e.$$scope)},[o,a,i,n]}t("p.svelte-129iykg{font-weight:600}");class aS extends Ne{constructor(e){super(),Re(this,e,oS,iS,l,{size:0,serif:1})}}function sS(e){let t,r,n;const i=e[2].default,o=p(i,e,e[1],null);return{c(){t=_("code"),o&&o.c(),j(t,"class",r="spectrum-Code spectrum-Code--size"+e[0])},m(e,r){D(e,t,r),o&&o.m(t,null),n=!0},p(e,[a]){o&&o.p&&(!n||2&a)&&m(o,i,e,e[1],a,null,null),(!n||1&a&&r!==(r="spectrum-Code spectrum-Code--size"+e[0]))&&j(t,"class",r)},i(e){n||(Te(o,e),n=!0)},o(e){$e(o,e),n=!1},d(e){e&&T(t),o&&o.d(e)}}}function cS(e,t,r){let{$$slots:n={},$$scope:i}=t,{size:o="M"}=t;return e.$$set=e=>{"size"in e&&r(0,o=e.size),"$$scope"in e&&r(1,i=e.$$scope)},[o,i,n]}class lS extends Ne{constructor(e){super(),Re(this,e,cS,sS,l,{size:0})}}function uS(e,t,r){const n=e.slice();return n[9]=t[r],n}function pS(e){let t,r=e[2],n=[];for(let t=0;t<r.length;t+=1)n[t]=dS(uS(e,r,t));return{c(){for(let e=0;e<n.length;e+=1)n[e].c();t=I()},m(e,r){for(let t=0;t<n.length;t+=1)n[t].m(e,r);D(e,t,r)},p(e,i){if(253&i){let o;for(r=e[2],o=0;o<r.length;o+=1){const a=uS(e,r,o);n[o]?n[o].p(a,i):(n[o]=dS(a),n[o].c(),n[o].m(t.parentNode,t))}for(;o<n.length;o+=1)n[o].d(1);n.length=r.length}},d(e){$(n,e),e&&T(t)}}}function dS(e){let t,r,n,i,o,a,s,c,l,u,p,d,m,f,h=e[5](e[9])+"";return{c(){t=_("div"),r=_("label"),n=_("input"),a=L(),s=_("span"),s.innerHTML='<svg class="spectrum-Icon spectrum-UIIcon-Checkmark100 spectrum-Checkbox-checkmark" focusable="false" aria-hidden="true"><use xlink:href="#spectrum-css-icon-Checkmark100"></use></svg>',c=L(),l=_("span"),u=M(h),p=L(),n.value=i=e[6](e[9]),j(n,"type","checkbox"),j(n,"class","spectrum-Checkbox-input svelte-rergqh"),n.disabled=e[4],n.checked=o=e[0].includes(e[6](e[9])),j(s,"class","spectrum-Checkbox-box"),j(l,"class","spectrum-Checkbox-label"),j(r,"class","spectrum-Checkbox spectrum-Checkbox--sizeM spectrum-FieldGroup-item"),j(t,"title",d=e[5](e[9])),j(t,"class","spectrum-Checkbox spectrum-FieldGroup-item"),X(t,"is-invalid",!!e[3])},m(i,o){D(i,t,o),A(t,r),A(r,n),A(r,a),A(r,s),A(r,c),A(r,l),A(l,u),A(t,p),m||(f=O(n,"change",e[7]),m=!0)},p(e,r){68&r&&i!==(i=e[6](e[9]))&&(n.value=i),16&r&&(n.disabled=e[4]),69&r&&o!==(o=e[0].includes(e[6](e[9])))&&(n.checked=o),36&r&&h!==(h=e[5](e[9])+"")&&q(u,h),36&r&&d!==(d=e[5](e[9]))&&j(t,"title",d),8&r&&X(t,"is-invalid",!!e[3])},d(e){e&&T(t),m=!1,f()}}}function mS(e){let t,n,i=e[2]&&Array.isArray(e[2]),o=i&&pS(e);return{c(){t=_("div"),o&&o.c(),j(t,"class",n=v(`spectrum-FieldGroup spectrum-FieldGroup--${e[1]}`)+" svelte-rergqh")},m(e,r){D(e,t,r),o&&o.m(t,null)},p(e,[r]){4&r&&(i=e[2]&&Array.isArray(e[2])),i?o?o.p(e,r):(o=pS(e),o.c(),o.m(t,null)):o&&(o.d(1),o=null),2&r&&n!==(n=v(`spectrum-FieldGroup spectrum-FieldGroup--${e[1]}`)+" svelte-rergqh")&&j(t,"class",n)},i:r,o:r,d(e){e&&T(t),o&&o.d()}}}function fS(e,t,r){let{direction:n="vertical"}=t,{value:i=[]}=t,{options:o=[]}=t,{error:a=null}=t,{disabled:s=!1}=t,{getOptionLabel:c=(e=>e)}=t,{getOptionValue:l=(e=>e)}=t;const u=ie();return e.$$set=e=>{"direction"in e&&r(1,n=e.direction),"value"in e&&r(0,i=e.value),"options"in e&&r(2,o=e.options),"error"in e&&r(3,a=e.error),"disabled"in e&&r(4,s=e.disabled),"getOptionLabel"in e&&r(5,c=e.getOptionLabel),"getOptionValue"in e&&r(6,l=e.getOptionValue)},[i,n,o,a,s,c,l,e=>{let t=i,n=e.target.checked;!t.includes(e.target.value)&&n&&t.push(e.target.value),r(0,i=t),u("change",t.filter((t=>t!==e.target.value||n)))}]}t(".spectrum-Checkbox-input.svelte-rergqh{opacity:0}");class hS extends Ne{constructor(e){super(),Re(this,e,fS,mS,l,{direction:1,value:0,options:2,error:3,disabled:4,getOptionLabel:5,getOptionValue:6})}}function gS({target:e}){e.style.height="1px",e.style.height=+e.scrollHeight+"px"}function vS(e){return gS({target:e}),e.style.overflow="hidden",e.addEventListener("input",gS),{destroy:()=>e.removeEventListener("input",gS)}}export{mi as ActionButton,vi as ActionGroup,Oi as ActionMenu,Mr as Avatar,Dc as Badge,yC as Banner,AC as BannerDisplay,jn as Body,eS as BoldRenderer,On as Button,Fi as ButtonGroup,po as Checkbox,Or as ClearButton,lS as Code,nS as CodeRenderer,sC as ColorPicker,br as Combobox,Yo as Context,so as CoreCheckbox,hS as CoreCheckboxGroup,fr as CoreCombobox,Ps as CoreDatePicker,wn as CoreDropzone,Us as CoreMultiselect,Qi as CoreRadioGroup,Xz as CoreRichTextField,qt as CoreSearch,nr as CoreSelect,At as CoreStepper,Hi as CoreSwitch,It as CoreTextArea,bt as CoreTextField,Ns as DatePicker,aS as Detail,go as DetailSummary,ca as Divider,ti as Drawer,si as DrawerContent,Sn as Dropzone,Nn as Heading,zr as Helpers,et as Icon,fC as InlineAlert,kt as Input,Lo as Label,Bo as Layout,Dr as Link,Nz as MarkdownEditor,Uz as MarkdownViewer,Ti as Menu,Vo as MenuItem,qo as MenuSection,Uo as MenuSeparator,oa as Modal,$a as ModalContent,Vs as Multiselect,Ba as Notification,qa as NotificationDisplay,Fo as Page,Yk as Pagination,Si as Popover,So as ProgressBar,$o as ProgressCircle,no as RadioGroup,Jz as RichTextField,Wk as Search,sr as Select,Ga as SideNavigation,Qa as SideNavigationItem,Zk as StatusLight,_t as Stepper,Lk as Tab,Ck as Table,Dk as Tabs,Nr as Tag,Ur as Tags,jt as TextArea,Xi as Toggle,We as Tooltip,qk as TreeItem,Bk as TreeView,vS as autoResizeTextArea,xC as banner,Ft as clickOutside,_a as createNotificationStore,Ze as directions,Ea as notifications,bi as positionDropdown};
209
+ */var ny=function(e,t){if(!lp(e)&&"function"!=typeof e)return{};var r={};if("string"==typeof t)return t in e&&(r[t]=e[t]),r;for(var n=t.length,i=-1;++i<n;){var o=t[i];o in e&&(r[o]=e[o])}return r},iy=Zc((function(e){var t=e.exports,r=Zb();t.define=ey,t.diff=ty,t.extend=Rb,t.pick=ny,t.typeOf=pp,t.unique=zh,t.isEmptyString=function(e){return""===String(e)||"./"===String(e)},t.isWindows=function(){return"\\"===zf.sep||!0===r},t.last=function(e,t){return e[e.length-(t||1)]},t.instantiate=function(e,r){var n;return n="object"===t.typeOf(e)&&e.snapdragon?e.snapdragon:"object"===t.typeOf(r)&&r.snapdragon?r.snapdragon:new Eb(r),t.define(n,"parse",(function(e,r){var n=Eb.prototype.parse.call(this,e,r);n.input=e;var i=this.parser.stack.pop();if(i&&!0!==this.options.strictErrors){var o=i.nodes[0],a=i.nodes[1];if("bracket"===i.type)"["===a.val.charAt(0)&&(a.val="\\"+a.val);else{o.val="\\"+o.val;var s=o.parent.nodes[1];"star"===s.type&&(s.loose=!0)}}return t.define(n,"parser",this.parser),n})),n},t.createKey=function(e,t){if(void 0===t)return e;var r=e;for(var n in t)t.hasOwnProperty(n)&&(r+=";"+n+"="+String(t[n]));return r},t.arrayify=function(e){return"string"==typeof e?[e]:e?Array.isArray(e)?e:[e]:[]},t.isString=function(e){return"string"==typeof e},t.isRegex=function(e){return"regexp"===t.typeOf(e)},t.isObject=function(e){return"object"===t.typeOf(e)},t.escapeRegex=function(e){return e.replace(/[-[\]{}()^$|*+?.\\/\s]/g,"\\$&")},t.combineDupes=function(e,r){var n=(r=(r=t.arrayify(r).join("|").split("|")).map((function(e){return e.replace(/\\?([+*\\/])/g,"\\$1")}))).join("|"),i=new RegExp("("+n+")(?=\\1)","g");return e.replace(i,"")},t.hasSpecialChars=function(e){return/(?:(?:(^|\/)[!.])|[*?+()|[\]{}]|[+@]\()/.test(e)},t.toPosixPath=function(e){return e.replace(/\\+/g,"/")},t.unescape=function(e){return t.toPosixPath(e.replace(/\\(?=[*+?!.])/g,""))},t.stripDrive=function(e){return t.isWindows()?e.replace(/^[a-z]:[\\/]+?/i,"/"):e},t.stripPrefix=function(e){return"."!==e.charAt(0)||"/"!==e.charAt(1)&&"\\"!==e.charAt(1)?e:e.slice(2)},t.isSimpleChar=function(e){return""===e.trim()||"."===e},t.isSlash=function(e){return"/"===e||"\\/"===e||"\\"===e||"\\\\"===e},t.matchPath=function(e,r){return r&&r.contains?t.containsPattern(e,r):t.equalsPattern(e,r)},t._equals=function(e,t,r){return r===e||r===t},t._contains=function(e,t,r){return-1!==e.indexOf(r)||-1!==t.indexOf(r)},t.equalsPattern=function(e,r){var n=t.unixify(r);return r=r||{},function(i){var o=t._equals(i,n(i),e);if(!0===o||!0!==r.nocase)return o;var a=i.toLowerCase();return t._equals(a,n(a),e)}},t.containsPattern=function(e,r){var n=t.unixify(r);return r=r||{},function(i){var o=t._contains(i,n(i),e);if(!0===o||!0!==r.nocase)return o;var a=i.toLowerCase();return t._contains(a,n(a),e)}},t.matchBasename=function(e){return function(t){return e.test(t)||e.test(zf.basename(t))}},t.identity=function(e){return e},t.value=function(e,t,r){return r&&!1===r.unixify?e:r&&"function"==typeof r.unixify?r.unixify(e):t(e)},t.unixify=function(e){var r=e||{};return function(e){return!1!==r.stripPrefix&&(e=t.stripPrefix(e)),!0===r.unescape&&(e=t.unescape(e)),(!0===r.unixify||t.isWindows())&&(e=t.toPosixPath(e)),e}}}));function oy(e,t,r){t=iy.arrayify(t),e=iy.arrayify(e);var n=t.length;if(0===e.length||0===n)return[];if(1===n)return oy.match(e,t[0],r);for(var i=!1,o=[],a=[],s=-1;++s<n;){var c=t[s];"string"==typeof c&&33===c.charCodeAt(0)?(o.push.apply(o,oy.match(e,c.slice(1),r)),i=!0):a.push.apply(a,oy.match(e,c,r))}if(i&&0===a.length)if(r&&!1===r.unixify)a=e.slice();else for(var l=iy.unixify(r),u=0;u<e.length;u++)a.push(l(e[u]));var p=iy.diff(a,o);return r&&!1===r.nodupes?p:iy.unique(p)}function ay(e,t,r,n){var i=iy.createKey(e+"="+t,r);if(r&&!1===r.cache)return n(t,r);if(Jb.has(e,i))return Jb.get(e,i);var o=n(t,r);return Jb.set(e,i,o),o}oy.match=function(e,t,r){if(Array.isArray(t))throw new TypeError("expected pattern to be a string");for(var n=iy.unixify(r),i=ay("match",t,r,oy.matcher),o=[],a=(e=iy.arrayify(e)).length,s=-1;++s<a;){var c=e[s];(c===t||i(c))&&o.push(iy.value(c,n,r))}if(void 0===r)return iy.unique(o);if(0===o.length){if(!0===r.failglob)throw new Error('no matches found for "'+t+'"');if(!0===r.nonull||!0===r.nullglob)return[r.unescape?iy.unescape(t):t]}return r.ignore&&(o=oy.not(o,r.ignore,r)),!1!==r.nodupes?iy.unique(o):o},oy.isMatch=function(e,t,r){if("string"!=typeof e)throw new TypeError('expected a string: "'+$m.inspect(e)+'"');return!iy.isEmptyString(e)&&!iy.isEmptyString(t)&&(!!iy.equalsPattern(r)(e)||ay("isMatch",t,r,oy.matcher)(e))},oy.some=function(e,t,r){"string"==typeof e&&(e=[e]);for(var n=0;n<e.length;n++)if(1===oy(e[n],t,r).length)return!0;return!1},oy.every=function(e,t,r){"string"==typeof e&&(e=[e]);for(var n=0;n<e.length;n++)if(1!==oy(e[n],t,r).length)return!1;return!0},oy.any=function(e,t,r){if("string"!=typeof e)throw new TypeError('expected a string: "'+$m.inspect(e)+'"');if(iy.isEmptyString(e)||iy.isEmptyString(t))return!1;"string"==typeof t&&(t=[t]);for(var n=0;n<t.length;n++)if(oy.isMatch(e,t[n],r))return!0;return!1},oy.all=function(e,t,r){if("string"!=typeof e)throw new TypeError('expected a string: "'+$m.inspect(e)+'"');"string"==typeof t&&(t=[t]);for(var n=0;n<t.length;n++)if(!oy.isMatch(e,t[n],r))return!1;return!0},oy.not=function(e,t,r){var n=Rb({},r),i=n.ignore;delete n.ignore,e=iy.arrayify(e);var o=iy.diff(e,oy(e,t,n));return i&&(o=iy.diff(o,oy(e,i))),!1!==n.nodupes?iy.unique(o):o},oy.contains=function(e,t,r){if("string"!=typeof e)throw new TypeError('expected a string: "'+$m.inspect(e)+'"');if("string"==typeof t){if(iy.isEmptyString(e)||iy.isEmptyString(t))return!1;if(iy.equalsPattern(t,r)(e))return!0;if(iy.containsPattern(t,r)(e))return!0}var n=Rb({},r,{contains:!0});return oy.any(e,t,n)},oy.matchBase=function(e,t){return!(e&&-1!==e.indexOf("/")||!t||!0!==t.basename&&!0!==t.matchBase)},oy.matchKeys=function(e,t,r){if(!iy.isObject(e))throw new TypeError("expected the first argument to be an object");var n=oy(Object.keys(e),t,r);return iy.pick(e,n)},oy.matcher=function e(t,r){if(iy.isEmptyString(t))return function(){return!1};if(Array.isArray(t))return function(e,t,r){var n;return ay("compose",String(e),t,(function(){return function(i){if(!n){n=[];for(var o=0;o<e.length;o++)n.push(r(e[o],t))}for(var a=n.length;a--;)if(!0===n[a](i))return!0;return!1}}))}(t,r,e);if(t instanceof RegExp)return i(t);if(!iy.isString(t))throw new TypeError("expected pattern to be an array, string or regex");if(!iy.hasSpecialChars(t))return r&&!0===r.nocase&&(t=t.toLowerCase()),iy.matchPath(t,r);var n=oy.makeRe(t,r);if(oy.matchBase(t,r))return iy.matchBasename(n,r);function i(e){var t=iy.equalsPattern(r),n=iy.unixify(r);return function(r){return!!t(r)||!!e.test(n(r))}}var o=i(n);return iy.define(o,"result",n.result),o},oy.capture=function(e,t,r){var n=oy.makeRe(e,Rb({capture:!0},r)),i=iy.unixify(r);return ay("capture",e,r,(function(){return function(e){var t=n.exec(i(e));return t?t.slice(1):null}}))(t)},oy.makeRe=function(e,t){if(e instanceof RegExp)return e;if("string"!=typeof e)throw new TypeError("expected pattern to be a string");if(e.length>65536)throw new Error("expected pattern to be less than 65536 characters");return ay("makeRe",e,t,(function(){var r=iy.extend({wrap:!1},t),n=oy.create(e,r),i=kh(n.output,r);return iy.define(i,"result",n),i}))},oy.create=function(e,t){if("string"!=typeof e)throw new TypeError("expected a string");return ay("create",e,t,(function(){return oy.compile(oy.parse(e,t),t)}))},oy.parse=function(e,t){if("string"!=typeof e)throw new TypeError("expected a string");return ay("parse",e,t,(function(){var r=iy.instantiate(null,t);Yb(r,t);var n=r.parse(e,t);return iy.define(n,"snapdragon",r),n.input=e,n}))},oy.compile=function(e,t){return"string"==typeof e&&(e=oy.parse(e,t)),ay("compile",e.input,t,(function(){var r=iy.instantiate(e,t);return Xb(r,t),r.compile(e,t)}))},oy.clearCache=function(){oy.cache.__data__={}},oy.compilers=Xb,oy.parsers=Yb,oy.cache=Jb;var sy,cy=oy,ly={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},uy=function(e){e.compiler.set("escape",(function(e){return this.emit("\\"+e.val.replace(/^\\/,""),e)})).set("text",(function(e){return this.emit(e.val.replace(/([{}])/g,"\\$1"),e)})).set("posix",(function(e){if("[::]"===e.val)return this.emit("\\[::\\]",e);var t=ly[e.inner];return void 0===t&&(t="["+e.inner+"]"),this.emit(t,e)})).set("bracket",(function(e){return this.mapVisit(e.nodes)})).set("bracket.open",(function(e){return this.emit(e.val,e)})).set("bracket.inner",(function(e){var t=e.val;if("["===t||"]"===t)return this.emit("\\"+e.val,e);if("^]"===t)return this.emit("^\\]",e);if("^"===t)return this.emit("^",e);/-/.test(t)&&!/(\d-\d|\w-\w)/.test(t)&&(t=t.split("-").join("\\-"));var r="^"===t.charAt(0);return r&&-1===t.indexOf("/")&&(t+="/"),r&&-1===t.indexOf(".")&&(t+="."),t=t.replace(/\\([1-9])/g,"$1"),this.emit(t,e)})).set("bracket.close",(function(e){var t=e.val.replace(/^\\/,"");return!0===e.parent.escaped?this.emit("\\"+t,e):this.emit(t,e)}))},py=function(e){return e[e.length-1]},dy=function(e,t){if(sy)return sy;var r,n={contains:!0,strictClose:!1},i=xh.create(e,n);return r=kh("string"==typeof t?"^(?:"+t+"|"+i+")":i,n),sy=r}("(\\[(?=.*\\])|\\])+"),my=function(e){e.state=e.state||{},e.parser.sets.bracket=e.parser.sets.bracket||[],e.parser.capture("escape",(function(){if(!this.isInside("bracket")){var e=this.position(),t=this.match(/^\\(.)/);if(t)return e({type:"escape",val:t[0]})}})).capture("text",(function(){if(!this.isInside("bracket")){var e=this.position(),t=this.match(dy);if(t&&t[0])return e({type:"text",val:t[0]})}})).capture("posix",(function(){var t=this.position(),r=this.match(/^\[:(.*?):\](?=.*\])/);if(r){var n=this.isInside("bracket");return n&&e.posix++,t({type:"posix",insideBracket:n,inner:r[1],val:r[0]})}})).capture("bracket",(function(){})).capture("bracket.open",(function(){var e=this.parsed,t=this.position(),r=this.match(/^\[(?=.*\])/);if(r){var n=this.prev(),i=py(n.nodes);if("\\"===e.slice(-1)&&!this.isInside("bracket"))return i.val=i.val.slice(0,i.val.length-1),t({type:"escape",val:r[0]});var o=t({type:"bracket.open",val:r[0]});if("bracket.open"===i.type||this.isInside("bracket"))return o.val="\\"+o.val,o.type="bracket.inner",o.escaped=!0,o;var a=t({type:"bracket",nodes:[o]});pv(a,"parent",n),pv(o,"parent",a),this.push("bracket",a),n.nodes.push(a)}})).capture("bracket.inner",(function(){if(this.isInside("bracket")){var e=this.position(),t=this.match(dy);if(t&&t[0]){var r=this.input.charAt(0),n=t[0],i=e({type:"bracket.inner",val:n});if("\\\\"===n)return i;var o=n.charAt(0),a=n.slice(-1);return"!"===o&&(n="^"+n.slice(1)),("\\"===a||"^"===n&&"]"===r)&&(n+=this.input[0],this.consume(1)),i.val=n,i}}})).capture("bracket.close",(function(){var e=this.parsed,t=this.position(),r=this.match(/^\]/);if(r){var n=this.prev(),i=py(n.nodes);if("\\"===e.slice(-1)&&!this.isInside("bracket"))return i.val=i.val.slice(0,i.val.length-1),t({type:"escape",val:r[0]});var o=t({type:"bracket.close",rest:this.input,val:r[0]});if("bracket.open"===i.type)return o.type="bracket.inner",o.escaped=!0,o;var a=this.pop("bracket");if(!this.isType(a,"bracket")){if(this.options.strict)throw new Error('missing opening "["');return o.type="bracket.inner",o.escaped=!0,o}a.nodes.push(o),pv(o,"parent",a)}}))};my.TEXT_REGEX="(\\[(?=.*\\])|\\])+";var fy=1e3,hy=6e4,gy=60*hy,vy=24*gy,by=function(e,t){t=t||{};var r=typeof e;if("string"===r&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*r;case"days":case"day":case"d":return r*vy;case"hours":case"hour":case"hrs":case"hr":case"h":return r*gy;case"minutes":case"minute":case"mins":case"min":case"m":return r*hy;case"seconds":case"second":case"secs":case"sec":case"s":return r*fy;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}(e);if("number"===r&&!1===isNaN(e))return t.long?function(e){return yy(e,vy,"day")||yy(e,gy,"hour")||yy(e,hy,"minute")||yy(e,fy,"second")||e+" ms"}(e):function(e){return e>=vy?Math.round(e/vy)+"d":e>=gy?Math.round(e/gy)+"h":e>=hy?Math.round(e/hy)+"m":e>=fy?Math.round(e/fy)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function yy(e,t,r){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}var xy=Zc((function(e,t){var r;function n(e){function n(){if(n.enabled){var e=n,i=+new Date,o=i-(r||i);e.diff=o,e.prev=r,e.curr=i,r=i;for(var a=new Array(arguments.length),s=0;s<a.length;s++)a[s]=arguments[s];a[0]=t.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");var c=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,(function(r,n){if("%%"===r)return r;c++;var i=t.formatters[n];if("function"==typeof i){var o=a[c];r=i.call(e,o),a.splice(c,1),c--}return r})),t.formatArgs.call(e,a);var l=n.log||t.log||console.log.bind(console);l.apply(e,a)}}return n.namespace=e,n.enabled=t.enabled(e),n.useColors=t.useColors(),n.color=function(e){var r,n=0;for(r in e)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]}(e),"function"==typeof t.init&&t.init(n),n}(t=e.exports=n.debug=n.default=n).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e),t.names=[],t.skips=[];for(var r=("string"==typeof e?e:"").split(/[\s,]+/),n=r.length,i=0;i<n;i++)r[i]&&("-"===(e=r[i].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=by,t.names=[],t.skips=[],t.formatters={}})),wy=Zc((function(e,t){function r(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==jd&&"env"in jd&&(e=jd.env.DEBUG),e}(t=e.exports=xy).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var r=this.useColors;if(e[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+e[0]+(r?"%c ":" ")+"+"+t.humanize(this.diff),r){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))})),e.splice(o,0,n)}},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=r,t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(r())}))("expand-brackets");function ky(e,t){return wy("initializing from <%s>","/home/runner/work/budibase/budibase/packages/string-templates/node_modules/expand-brackets/index.js"),ky.create(e,t).output}ky.match=function(e,t,r){e=[].concat(e);for(var n=jg({},r),i=ky.matcher(t,n),o=e.length,a=-1,s=[];++a<o;){var c=e[a];i(c)&&s.push(c)}if(0===s.length){if(!0===n.failglob)throw new Error('no matches found for "'+t+'"');if(!0===n.nonull||!0===n.nullglob)return[t.split("\\").join("")]}return s},ky.isMatch=function(e,t,r){return ky.matcher(t,r)(e)},ky.matcher=function(e,t){var r=ky.makeRe(e,t);return function(e){return r.test(e)}},ky.makeRe=function(e,t){var r=ky.create(e,t),n=jg({strictErrors:!1},t);return kh(r.output,n)},ky.create=function(e,t){var r=t&&t.snapdragon||new Eb(t);uy(r),my(r);var n=r.parse(e,t);n.input=e;var i=r.compile(n,t);return i.input=e,i},ky.compilers=uy,ky.parsers=my;var Cy=ky,zy=function(e){function t(){return"function"==typeof e.options.star?e.options.star.apply(this,arguments):"string"==typeof e.options.star?e.options.star:".*?"}e.use(Cy.compilers),e.compiler.set("escape",(function(e){return this.emit(e.val,e)})).set("dot",(function(e){return this.emit("\\"+e.val,e)})).set("qmark",(function(e){var t="[^\\\\/.]",r=this.prev();if("("===e.parsed.slice(-1)){var n=e.rest.charAt(0);return"!"!==n&&"="!==n&&":"!==n?this.emit(t,e):this.emit(e.val,e)}return"text"===r.type&&r.val||e.val.length>1&&(t+="{"+e.val.length+"}"),this.emit(t,e)})).set("plus",(function(e){var t=e.parsed.slice(-1);if("]"===t||")"===t)return this.emit(e.val,e);var r=this.output.slice(-1);return!this.output||/[?*+]/.test(r)&&"bracket"!==e.parent.type?this.emit("\\+",e):/\w/.test(r)&&!e.inside?this.emit("+\\+?",e):this.emit("+",e)})).set("star",(function(e){var r=this.prev(),n="text"!==r.type&&"escape"!==r.type?"(?!\\.)":"";return this.emit(n+t.call(this,e),e)})).set("paren",(function(e){return this.mapVisit(e.nodes)})).set("paren.open",(function(e){var t=this.options.capture?"(":"";switch(e.parent.prefix){case"!":case"^":return this.emit(t+"(?:(?!(?:",e);case"*":case"+":case"?":case"@":return this.emit(t+"(?:",e);default:var r=e.val;return!0===this.options.bash?r="\\"+r:this.options.capture||"("!==r||"?"===e.parent.rest[0]||(r+="?:"),this.emit(r,e)}})).set("paren.close",(function(e){var r=this.options.capture?")":"";switch(e.prefix){case"!":case"^":var n=/^(\)|$)/.test(e.rest)?"$":"",i=t.call(this,e);return e.parent.hasSlash&&!this.options.star&&!1!==this.options.slash&&(i=".*?"),this.emit(n+"))"+i+")"+r,e);case"*":case"+":case"?":return this.emit(")"+e.prefix+r,e);case"@":return this.emit(")"+r,e);default:var o=(!0===this.options.bash?"\\":"")+")";return this.emit(o,e)}})).set("text",(function(e){var t=e.val.replace(/[\[\]]/g,"\\$&");return this.emit(t,e)}))},Sy=function(e,t,r){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("expected an object or function.");if("string"!=typeof t)throw new TypeError("expected `prop` to be a string.");return hp(r)&&("set"in r||"get"in r)?Object.defineProperty(e,t,r):Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:r})},Ay=Zc((function(e){var t=e.exports,r=t.cache=new Kb;t.arrayify=function(e){return Array.isArray(e)?e:[e]},t.memoize=function(e,n,i,o){var a=t.createKey(e+n,i);if(r.has(e,a))return r.get(e,a);var s=o(n,i);return i&&!1===i.cache||r.set(e,a,s),s},t.createKey=function(e,t){var r=e;if(void 0===t)return r;for(var n in t)r+=";"+n+"="+String(t[n]);return r},t.createRegex=function(e){return xh(e,{contains:!0,strictClose:!1})}})),Dy=Ay.createRegex("([!@*?+]?\\(|\\)|[*?.+\\\\]|\\[:?(?=.*\\])|:?\\])+"),Ty=function(e){e.state=e.state||{},e.use(Cy.parsers),e.parser.sets.paren=e.parser.sets.paren||[],e.parser.capture("paren.open",(function(){var e=this.parsed,t=this.position(),r=this.match(/^([!@*?+])?\(/);if(r){var n=this.prev(),i=r[1],o=t({type:"paren.open",parsed:e,val:r[0]}),a=t({type:"paren",prefix:i,nodes:[o]});"!"===i&&"paren"===n.type&&"!"===n.prefix&&(n.prefix="@",a.prefix="@"),Sy(a,"rest",this.input),Sy(a,"parsed",e),Sy(a,"parent",n),Sy(o,"parent",a),this.push("paren",a),n.nodes.push(a)}})).capture("paren.close",(function(){var e=this.parsed,t=this.position(),r=this.match(/^\)/);if(r){var n=this.pop("paren"),i=t({type:"paren.close",rest:this.input,parsed:e,val:r[0]});if(!this.isType(n,"paren")){if(this.options.strict)throw new Error('missing opening paren: "("');return i.escaped=!0,i}i.prefix=n.prefix,n.nodes.push(i),Sy(i,"parent",n)}})).capture("escape",(function(){var e=this.position(),t=this.match(/^\\(.)/);if(t)return e({type:"escape",val:t[0],ch:t[1]})})).capture("qmark",(function(){var t=this.parsed,r=this.position(),n=this.match(/^\?+(?!\()/);if(n)return e.state.metachar=!0,r({type:"qmark",rest:this.input,parsed:t,val:n[0]})})).capture("star",/^\*(?!\()/).capture("plus",/^\+(?!\()/).capture("dot",/^\./).capture("text",Dy)};Ty.TEXT_REGEX="([!@*?+]?\\(|\\)|[*?.+\\\\]|\\[:?(?=.*\\])|:?\\])+";var $y=function(e){this.options=jg({source:"extglob"},e),this.snapdragon=this.options.snapdragon||new Eb(this.options),this.snapdragon.patterns=this.snapdragon.patterns||{},this.compiler=this.snapdragon.compiler,this.parser=this.snapdragon.parser,zy(this.snapdragon),Ty(this.snapdragon),Sy(this.snapdragon,"parse",(function(e,t){var r=Eb.prototype.parse.apply(this,arguments);r.input=e;var n=this.parser.stack.pop();if(n&&!0!==this.options.strict){var i=n.nodes[0];i.val="\\"+i.val;var o=i.parent.nodes[1];"star"===o.type&&(o.loose=!0)}return Sy(r,"parser",this.parser),r})),Sy(this,"parse",(function(e,t){return this.snapdragon.parse.apply(this.snapdragon,arguments)})),Sy(this,"compile",(function(e,t){return this.snapdragon.compile.apply(this.snapdragon,arguments)}))};function _y(e,t){return _y.create(e,t).output}_y.match=function(e,t,r){if("string"!=typeof t)throw new TypeError("expected pattern to be a string");e=Ay.arrayify(e);for(var n=_y.matcher(t,r),i=e.length,o=-1,a=[];++o<i;){var s=e[o];n(s)&&a.push(s)}if(void 0===r)return zh(a);if(0===a.length){if(!0===r.failglob)throw new Error('no matches found for "'+t+'"');if(!0===r.nonull||!0===r.nullglob)return[t.split("\\").join("")]}return!1!==r.nodupes?zh(a):a},_y.isMatch=function(e,t,r){if("string"!=typeof t)throw new TypeError("expected pattern to be a string");if("string"!=typeof e)throw new TypeError("expected a string");return t===e||(""===t||" "===t||"."===t?t===e:Ay.memoize("isMatch",t,r,_y.matcher)(e))},_y.contains=function(e,t,r){if("string"!=typeof e)throw new TypeError("expected a string");if(""===t||" "===t||"."===t)return t===e;var n=jg({},r,{contains:!0});return n.strictClose=!1,n.strictOpen=!1,_y.isMatch(e,t,n)},_y.matcher=function(e,t){if("string"!=typeof e)throw new TypeError("expected pattern to be a string");return Ay.memoize("matcher",e,t,(function(){var r=_y.makeRe(e,t);return function(e){return r.test(e)}}))},_y.create=function(e,t){if("string"!=typeof e)throw new TypeError("expected pattern to be a string");return Ay.memoize("create",e,t,(function(){var r=new $y(t),n=r.parse(e,t);return r.compile(n,t)}))},_y.capture=function(e,t,r){var n=_y.makeRe(e,jg({capture:!0},r));return Ay.memoize("capture",e,r,(function(){return function(e){var t=n.exec(e);return t?t.slice(1):null}}))(t)},_y.makeRe=function(e,t){if(e instanceof RegExp)return e;if("string"!=typeof e)throw new TypeError("expected pattern to be a string");if(e.length>65536)throw new Error("expected pattern to be less than 65536 characters");var r=Ay.memoize("makeRe",e,t,(function(){var r=jg({strictErrors:!1},t);!0===r.strictErrors&&(r.strict=!0);var n=_y.create(e,r);return kh(n.output,r)}));if(r.source.length>65536)throw new SyntaxError("potentially malicious regex detected");return r},_y.cache=Ay.cache,_y.clearCache=function(){_y.cache.__data__={}},_y.Extglob=$y,_y.compilers=zy,_y.parsers=Ty;var Ey,My=_y,Ly=function(e){var t=e.compiler.compilers,r=e.options;e.use(cy.compilers);var n=t.escape,i=t.qmark,o=t.slash,a=t.star,s=t.text,c=t.plus,l=t.dot;!1===r.extglob||!0===r.noext?e.compiler.use(Iy):e.use(My.compilers),e.use((function(){this.options.star=this.options.star||function(){return"[^\\\\/]*?"}})),e.compiler.set("dot",l).set("escape",n).set("plus",c).set("slash",o).set("qmark",i).set("star",a).set("text",s)};function Iy(e){function t(e,r){return e.nodes?function(e,r){for(var n=e.length,i=-1;++i<n;)t(e[i],r)}(e.nodes,r):r(e)}e.set("paren",(function(e){var r="";return t(e,(function(e){e.val&&(r+=(/^\W/.test(e.val)?"\\":"")+e.val)})),this.emit(r,e)}))}var Oy=function(e){var t=e.parser.parsers;e.use(cy.parsers);var r=t.escape,n=t.slash,i=t.qmark,o=t.plus,a=t.star,s=t.dot;e.use(My.parsers),e.parser.use((function(){this.notRegex=/^\!+(?!\()/})).capture("escape",r).capture("slash",n).capture("qmark",i).capture("star",a).capture("plus",o).capture("dot",s).capture("text",(function(){if(!this.isInside("bracket")){var e=this.position(),t=this.match(function(e){return Ey||(t=xh.create("([!@*?+]?\\(|\\)|\\[:?(?=.*?:?\\])|:?\\]|[*+?!^$.\\\\/])+",{contains:!0,strictClose:!1}),Ey=kh("(?:[\\^]|\\\\|"+t+")",{strictClose:!1}));var t}(this.options));if(t&&t[0])return e({type:"text",val:t[0].replace(/([[\]^$])/g,"\\$1")})}}))},By=new Kb,Py=Zc((function(e){var t=e.exports;t.define=vp,t.diff=ty,t.extend=Vm,t.pick=ny,t.typeOf=pp,t.unique=zh,t.isWindows=function(){return"\\"===zf.sep||"win32"===jd.platform},t.instantiate=function(e,r){var n;return n="object"===t.typeOf(e)&&e.snapdragon?e.snapdragon:"object"===t.typeOf(r)&&r.snapdragon?r.snapdragon:new Eb(r),t.define(n,"parse",(function(e,r){var n=Eb.prototype.parse.apply(this,arguments);n.input=e;var i=this.parser.stack.pop();if(i&&!0!==this.options.strictErrors){var o=i.nodes[0],a=i.nodes[1];if("bracket"===i.type)"["===a.val.charAt(0)&&(a.val="\\"+a.val);else{o.val="\\"+o.val;var s=o.parent.nodes[1];"star"===s.type&&(s.loose=!0)}}return t.define(n,"parser",this.parser),n})),n},t.createKey=function(e,r){if("object"!==t.typeOf(r))return e;for(var n=e,i=Object.keys(r),o=0;o<i.length;o++){var a=i[o];n+=";"+a+"="+String(r[a])}return n},t.arrayify=function(e){return"string"==typeof e?[e]:e?Array.isArray(e)?e:[e]:[]},t.isString=function(e){return"string"==typeof e},t.isObject=function(e){return"object"===t.typeOf(e)},t.hasSpecialChars=function(e){return/(?:(?:(^|\/)[!.])|[*?+()|\[\]{}]|[+@]\()/.test(e)},t.escapeRegex=function(e){return e.replace(/[-[\]{}()^$|*+?.\\\/\s]/g,"\\$&")},t.toPosixPath=function(e){return e.replace(/\\+/g,"/")},t.unescape=function(e){return t.toPosixPath(e.replace(/\\(?=[*+?!.])/g,""))},t.stripPrefix=function(e){if("."!==e.charAt(0))return e;var r=e.charAt(1);return t.isSlash(r)?e.slice(2):e},t.isSlash=function(e){return"/"===e||"\\/"===e||"\\"===e||"\\\\"===e},t.matchPath=function(e,r){return r&&r.contains?t.containsPattern(e,r):t.equalsPattern(e,r)},t._equals=function(e,t,r){return r===e||r===t},t._contains=function(e,t,r){return-1!==e.indexOf(r)||-1!==t.indexOf(r)},t.equalsPattern=function(e,r){var n=t.unixify(r);return r=r||{},function(i){var o=t._equals(i,n(i),e);if(!0===o||!0!==r.nocase)return o;var a=i.toLowerCase();return t._equals(a,n(a),e)}},t.containsPattern=function(e,r){var n=t.unixify(r);return r=r||{},function(i){var o=t._contains(i,n(i),e);if(!0===o||!0!==r.nocase)return o;var a=i.toLowerCase();return t._contains(a,n(a),e)}},t.matchBasename=function(e){return function(t){return e.test(zf.basename(t))}},t.value=function(e,t,r){return r&&!1===r.unixify?e:t(e)},t.unixify=function(e){return e=e||{},function(r){return(t.isWindows()||!0===e.unixify)&&(r=t.toPosixPath(r)),!1!==e.stripPrefix&&(r=t.stripPrefix(r)),!0===e.unescape&&(r=t.unescape(r)),r}}}));function jy(e,t,r){t=Py.arrayify(t),e=Py.arrayify(e);var n=t.length;if(0===e.length||0===n)return[];if(1===n)return jy.match(e,t[0],r);for(var i=[],o=[],a=-1;++a<n;){var s=t[a];"string"==typeof s&&33===s.charCodeAt(0)?i.push.apply(i,jy.match(e,s.slice(1),r)):o.push.apply(o,jy.match(e,s,r))}var c=Py.diff(o,i);return r&&!1===r.nodupes?c:Py.unique(c)}function Fy(e){return""===String(e)||"./"===String(e)}function Ry(e,t,r,n){var i=Py.createKey(e+"="+t,r);if(r&&!1===r.cache)return n(t,r);if(By.has(e,i))return By.get(e,i);var o=n(t,r);return By.set(e,i,o),o}jy.match=function(e,t,r){if(Array.isArray(t))throw new TypeError("expected pattern to be a string");for(var n=Py.unixify(r),i=Ry("match",t,r,jy.matcher),o=[],a=(e=Py.arrayify(e)).length,s=-1;++s<a;){var c=e[s];(c===t||i(c))&&o.push(Py.value(c,n,r))}if(void 0===r)return Py.unique(o);if(0===o.length){if(!0===r.failglob)throw new Error('no matches found for "'+t+'"');if(!0===r.nonull||!0===r.nullglob)return[r.unescape?Py.unescape(t):t]}return r.ignore&&(o=jy.not(o,r.ignore,r)),!1!==r.nodupes?Py.unique(o):o},jy.isMatch=function(e,t,r){if("string"!=typeof e)throw new TypeError('expected a string: "'+$m.inspect(e)+'"');return!Fy(e)&&!Fy(t)&&(!!Py.equalsPattern(r)(e)||Ry("isMatch",t,r,jy.matcher)(e))},jy.some=function(e,t,r){"string"==typeof e&&(e=[e]);for(var n=0;n<e.length;n++)if(1===jy(e[n],t,r).length)return!0;return!1},jy.every=function(e,t,r){"string"==typeof e&&(e=[e]);for(var n=0;n<e.length;n++)if(1!==jy(e[n],t,r).length)return!1;return!0},jy.any=function(e,t,r){if("string"!=typeof e)throw new TypeError('expected a string: "'+$m.inspect(e)+'"');if(Fy(e)||Fy(t))return!1;"string"==typeof t&&(t=[t]);for(var n=0;n<t.length;n++)if(jy.isMatch(e,t[n],r))return!0;return!1},jy.all=function(e,t,r){if("string"!=typeof e)throw new TypeError('expected a string: "'+$m.inspect(e)+'"');"string"==typeof t&&(t=[t]);for(var n=0;n<t.length;n++)if(!jy.isMatch(e,t[n],r))return!1;return!0},jy.not=function(e,t,r){var n=Vm({},r),i=n.ignore;delete n.ignore;var o=Py.unixify(n);e=Py.arrayify(e).map(o);var a=Py.diff(e,jy(e,t,n));return i&&(a=Py.diff(a,jy(e,i))),!1!==n.nodupes?Py.unique(a):a},jy.contains=function(e,t,r){if("string"!=typeof e)throw new TypeError('expected a string: "'+$m.inspect(e)+'"');if("string"==typeof t){if(Fy(e)||Fy(t))return!1;if(Py.equalsPattern(t,r)(e))return!0;if(Py.containsPattern(t,r)(e))return!0}var n=Vm({},r,{contains:!0});return jy.any(e,t,n)},jy.matchBase=function(e,t){return!(e&&-1!==e.indexOf("/")||!t||!0!==t.basename&&!0!==t.matchBase)},jy.matchKeys=function(e,t,r){if(!Py.isObject(e))throw new TypeError("expected the first argument to be an object");var n=jy(Object.keys(e),t,r);return Py.pick(e,n)},jy.matcher=function e(t,r){if(Array.isArray(t))return function(e,t,r){var n;return Ry("compose",String(e),t,(function(){return function(i){if(!n){n=[];for(var o=0;o<e.length;o++)n.push(r(e[o],t))}for(var a=n.length;a--;)if(!0===n[a](i))return!0;return!1}}))}(t,r,e);if(t instanceof RegExp)return i(t);if(!Py.isString(t))throw new TypeError("expected pattern to be an array, string or regex");if(!Py.hasSpecialChars(t))return r&&!0===r.nocase&&(t=t.toLowerCase()),Py.matchPath(t,r);var n=jy.makeRe(t,r);if(jy.matchBase(t,r))return Py.matchBasename(n,r);function i(e){var t=Py.equalsPattern(r),n=Py.unixify(r);return function(r){return!!t(r)||!!e.test(n(r))}}var o=i(n);return Object.defineProperty(o,"result",{configurable:!0,enumerable:!1,value:n.result}),o},jy.capture=function(e,t,r){var n=jy.makeRe(e,Vm({capture:!0},r)),i=Py.unixify(r);return Ry("capture",e,r,(function(){return function(e){var t=n.exec(i(e));return t?t.slice(1):null}}))(t)},jy.makeRe=function(e,t){if("string"!=typeof e)throw new TypeError("expected pattern to be a string");if(e.length>65536)throw new Error("expected pattern to be less than 65536 characters");return Ry("makeRe",e,t,(function(){var r=jy.create(e,t),n=[],i=r.map((function(e){return e.ast.state=e.state,n.push(e.ast),e.output})),o=kh(i.join("|"),t);return Object.defineProperty(o,"result",{configurable:!0,enumerable:!1,value:n}),o}))},jy.braces=function(e,t){if("string"!=typeof e&&!Array.isArray(e))throw new TypeError("expected pattern to be an array or string");return Ry("braces",e,t,(function(){return t&&!0===t.nobrace||!/\{.*\}/.test(e)?Py.arrayify(e):Fb(e,t)}))},jy.braceExpand=function(e,t){var r=Vm({},t,{expand:!0});return jy.braces(e,r)},jy.create=function(e,t){return Ry("create",e,t,(function(){for(var r,n,i=(e=jy.braces(e,t)).length,o=-1,a=[];++o<i;)a.push((r=e[o],n=t,jy.compile(jy.parse(r,n),n)));return a}))},jy.parse=function(e,t){if("string"!=typeof e)throw new TypeError("expected a string");return Ry("parse",e,t,(function(){var r=Py.instantiate(null,t);Oy(r);var n=r.parse(e,t);return Py.define(n,"snapdragon",r),n.input=e,n}))},jy.compile=function(e,t){return"string"==typeof e&&(e=jy.parse(e,t)),Ry("compile",e.input,t,(function(){var r=Py.instantiate(e,t);return Ly(r),r.compile(e,t)}))},jy.clearCache=function(){jy.cache.caches={}},jy.compilers=Ly,jy.parsers=Oy,jy.caches=By.caches;var Ny=jy,qy=Zc((function(e){var t=e.exports;t.match=function(e,t,r,n){var i=_m.options(this,r,n);return"string"==typeof t&&(t=t.split(/, */)),Ny(e,t,i)},t.isMatch=function(e,t,r,n){var i=_m.options(this,r,n);return Ny.isMatch(e,t,i)},t.mm=function(){return console.log("the {{mm}} helper is depcrecated and will be removed"),console.log("in handlebars-helpers v1.0.0, please use the {{match}}"),console.log("helper instead."),t.match.apply(this,arguments)}})),Hy=Zc((function(e){var t=e.exports;t.abs=function(e){if(isNaN(e))throw new TypeError("expected a number");return Math.abs(e)},t.add=function(e,t){return isNaN(e)||isNaN(t)?"string"==typeof e&&"string"==typeof t?e+t:"":Number(e)+Number(t)},t.avg=function(){const e=[].concat.apply([],arguments);return e.pop(),t.sum(e)/e.length},t.ceil=function(e){if(isNaN(e))throw new TypeError("expected a number");return Math.ceil(e)},t.divide=function(e,t){if(isNaN(e))throw new TypeError("expected the first argument to be a number");if(isNaN(t))throw new TypeError("expected the second argument to be a number");return Number(e)/Number(t)},t.floor=function(e){if(isNaN(e))throw new TypeError("expected a number");return Math.floor(e)},t.minus=function(e,t){if(isNaN(e))throw new TypeError("expected the first argument to be a number");if(isNaN(t))throw new TypeError("expected the second argument to be a number");return Number(e)-Number(t)},t.modulo=function(e,t){if(isNaN(e))throw new TypeError("expected the first argument to be a number");if(isNaN(t))throw new TypeError("expected the second argument to be a number");return Number(e)%Number(t)},t.multiply=function(e,t){if(isNaN(e))throw new TypeError("expected the first argument to be a number");if(isNaN(t))throw new TypeError("expected the second argument to be a number");return Number(e)*Number(t)},t.plus=function(e,t){if(isNaN(e))throw new TypeError("expected the first argument to be a number");if(isNaN(t))throw new TypeError("expected the second argument to be a number");return Number(e)+Number(t)},t.random=function(e,t){if(isNaN(e))throw new TypeError("expected minimum to be a number");if(isNaN(t))throw new TypeError("expected maximum to be a number");return Of.random(e,t)},t.remainder=function(e,t){return e%t},t.round=function(e){if(isNaN(e))throw new TypeError("expected a number");return Math.round(e)},t.subtract=function(e,t){if(isNaN(e))throw new TypeError("expected the first argument to be a number");if(isNaN(t))throw new TypeError("expected the second argument to be a number");return Number(e)-Number(t)},t.sum=function(){for(var e=[].concat.apply([],arguments),t=e.length,r=0;t--;)isNaN(e[t])||(r+=Number(e[t]));return r},t.times=function(){return t.multiply.apply(this,arguments)}})),Uy=Zc((function(e){var t=e.exports;t.frame=function(e,t){"object"==typeof e&&e.hash&&(e=(t=e).data);var r=ef(e);return"object"!=typeof t&&(t={}),r.extend(t.hash),t.fn(this,{data:r})},t.option=function(e,t,r){return Nm(_m.options(this,t,r),e)},t.noop=function(e){return e.fn(this)},t.typeOf=pp,t.withHash=function(e){return e.hash&&Object.keys(e.hash).length?e.fn(e.hash):e.inverse(this)}})),Gy=Zc((function(e){var t=e.exports;t.bytes=function(e,t,r){if(null==e)return"0 B";if(isNaN(e)&&!(e=e.length))return"0 B";isNaN(t)&&(t=2);var n=["B","kB","MB","GB","TB","PB","EB","ZB","YB"];t=Math.pow(10,t),e=Number(e);for(var i=n.length-1;i-- >=0;){var o=Math.pow(10,3*i);if(o<=e+1){e=Math.round(e*t/o)/t,e+=" "+n[i];break}}return e},t.addCommas=function(e){return e.toString().replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,")},t.phoneNumber=function(e){return"("+(e=e.toString()).substr(0,3)+") "+e.substr(3,3)+"-"+e.substr(6,4)},t.toAbbr=function(e,t){isNaN(e)&&(e=0),_m.isUndefined(t)&&(t=2),e=Number(e),t=Math.pow(10,t);for(var r=["k","m","b","t","q"],n=r.length-1;n>=0;){var i=Math.pow(10,3*(n+1));if(i<=e+1){e=Math.round(e*t/i)/t,e+=r[n];break}n--}return e},t.toExponential=function(e,t){return isNaN(e)&&(e=0),_m.isUndefined(t)&&(t=0),Number(e).toExponential(t)},t.toFixed=function(e,t){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),Number(e).toFixed(t)},t.toFloat=function(e){return parseFloat(e)},t.toInt=function(e){return parseInt(e,10)},t.toPrecision=function(e,t){return isNaN(e)&&(e=0),isNaN(t)&&(t=1),Number(e).toPrecision(t)}})),Wy={}.toString,Xy=Array.isArray||function(e){return"[object Array]"==Wy.call(e)},Vy=Yy;function Yy(e,t,r){if("string"!=typeof e)throw new TypeError("relative expects a string.");if(""==e&&!t)return e;var n=arguments.length;1===n&&(t=e,e=jd.cwd(),r=null),2===n&&"boolean"==typeof t&&(t=e,e=jd.cwd(),r=!0),2===n&&"object"==typeof t&&(r=t,t=e,e=jd.cwd());var i=t,o=Zy(e,"/"),a=Zy(t,"/");e=Ky(e),t=Ky(t),o&&(e+="/"),ex(e,r)&&(e=zf.dirname(e));var s=zf.relative(e,t);if(""===s)return".";var c=Jy(i,"/");return a&&(s===c||Zy(s,c))&&(s+="/"),s}function Ky(e){return e.replace(/[\\\/]+/g,"/")}function Jy(e,t){return e.slice(0,e.length-t.length)}function Zy(e,t){return e.slice(-t.length)[0]===t}function Qy(e){try{return np.statSync(e)}catch(e){}return null}function ex(e,t){return!0===t&&(t=Qy(e)),!function(e,t){if(Zy(e,"/"))return!0;if(null===t&&(t=Qy(e)),null!=(r=t)&&"object"==typeof r&&!1===Xy(r)&&"function"==typeof t.isDirectory)return t.isDirectory();var r,n=e.split("/"),i=n[n.length-1];return!i||-1===i.indexOf(".")}(e,t)}Yy.toBase=function(e,t){e=Ky(e);var r=(t=Ky(t)).slice(e.length);return"/"===r.charAt(0)&&(r=r.slice(1)),r};var tx=Zc((function(e){var t=e.exports;t.absolute=function(e,t){t=t||{data:{}};var r=_m.options(this,t),n=Object.assign({},t.data.root,r).cwd||jd.cwd();return zf.resolve(n,e)},t.dirname=function(e,t){if("string"!=typeof e)throw new TypeError(_m.expectedType("filepath","string",e));return zf.dirname(e)},t.relative=function(e,t){if("string"!=typeof e)throw new TypeError(_m.expectedType("first path","string",e));if("string"!=typeof t)throw new TypeError(_m.expectedType("second path","string",t));return Vy(e,t)},t.basename=function(e){if("string"!=typeof e)throw new TypeError(_m.expectedType("filepath","string",e));return zf.basename(e)},t.stem=function(e){if("string"!=typeof e)throw new TypeError(_m.expectedType("filepath","string",e));return zf.basename(e,zf.extname(e))},t.extname=function(e){if("string"!=typeof e)throw new TypeError(_m.expectedType("filepath","string",e));return zf.extname(e)},t.resolve=function(e){var t=[].slice.call(arguments),r=_m.options(this,t.pop()),n=zf.resolve(r.cwd||jd.cwd());return t.unshift(n),zf.resolve.apply(zf,t)},t.segments=function(e,t,r){if("string"!=typeof e)throw new TypeError(_m.expectedType("filepath","string",e));return e.split(/[\\\/]+/).slice(t,r).join("/")}})),rx=Zc((function(e){var t=e.exports;t.toRegex=function(e,t,r){var n=_m.options({},t,r);return new RegExp(e,n.flags)},t.test=function(e,t){if("string"!=typeof e)return!1;if("regexp"!==pp(t))throw new TypeError("expected a regular expression");return t.test(e)}})),nx=Zc((function(e,t){var r=e.exports;r.append=function(e,t){return"string"==typeof e&&"string"==typeof t?e+t:e},r.camelcase=function(e){return"string"!=typeof e?"":Of.changecase(e,(function(e){return e.toUpperCase()}))},r.capitalize=function(e){return"string"!=typeof e?"":e.charAt(0).toUpperCase()+e.slice(1)},r.capitalizeAll=function(e){return"string"!=typeof e?"":_m.isString(e)?e.replace(/\w\S*/g,(function(e){return r.capitalize(e)})):void 0},r.center=function(e,t){if("string"!=typeof e)return"";for(var r="",n=0;n<t;)r+="&nbsp;",n++;return r+e+r},r.chop=function(e){return"string"!=typeof e?"":Of.chop(e)},r.dashcase=function(e){return"string"!=typeof e?"":Of.changecase(e,(function(e){return"-"+e}))},r.dotcase=function(e){return"string"!=typeof e?"":Of.changecase(e,(function(e){return"."+e}))},r.downcase=function(){return r.lowercase.apply(this,arguments)},r.ellipsis=function(e,t){if(_m.isString(e))return e.length<=t?e:r.truncate(e,t)+"…"},r.hyphenate=function(e){return"string"!=typeof e?"":e.split(" ").join("-")},r.isString=function(e){return"string"==typeof e},r.lowercase=function(e){return _m.isObject(e)&&e.fn?e.fn(this).toLowerCase():"string"!=typeof e?"":e.toLowerCase()},r.occurrences=function(e,t){if("string"!=typeof e)return"";for(var r=t.length,n=0,i=0;(n=e.indexOf(t,n))>-1;)i++,n+=r;return i},r.pascalcase=function(e){return"string"!=typeof e?"":(e=Of.changecase(e,(function(e){return e.toUpperCase()}))).charAt(0).toUpperCase()+e.slice(1)},r.pathcase=function(e){return"string"!=typeof e?"":Of.changecase(e,(function(e){return"/"+e}))},r.plusify=function(e,t){return"string"!=typeof e?"":(_m.isString(t)||(t=" "),e.split(t).join("+"))},r.prepend=function(e,t){return"string"==typeof e&&"string"==typeof t?t+e:e},r.raw=function(e){var t=e.fn();if(!1!==_m.options(this,e).escape)for(var r=0;-1!==(r=t.indexOf("{{",r));)"\\"!==t[r-1]&&(t=t.slice(0,r)+"\\"+t.slice(r)),r+=3;return t},r.remove=function(e,t){return"string"!=typeof e?"":_m.isString(t)?e.split(t).join(""):e},r.removeFirst=function(e,t){return"string"!=typeof e?"":_m.isString(t)?e.replace(t,""):e},r.replace=function(e,t,r){return"string"!=typeof e?"":_m.isString(t)?(_m.isString(r)||(r=""),e.split(t).join(r)):e},r.replaceFirst=function(e,t,r){return"string"!=typeof e?"":_m.isString(t)?(_m.isString(r)||(r=""),e.replace(t,r)):e},r.reverse=function(e){return"string"!=typeof e?"":e.split("").reverse().join("")},r.sentence=function(e){return"string"!=typeof e?"":e.replace(/((?:\S[^\.\?\!]*)[\.\?\!]*)/g,(function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}))},r.snakecase=function(e){return"string"!=typeof e?"":Of.changecase(e,(function(e){return"_"+e}))},r.split=function(e,t){return"string"!=typeof e?"":(_m.isString(t)||(t=","),e.split(t))},r.startsWith=function(e,t,r){var n=[].slice.call(arguments);return r=n.pop(),_m.isString(t)&&0===t.indexOf(e)?r.fn(this):"function"==typeof r.inverse?r.inverse(this):""},r.titleize=function(e){if("string"!=typeof e)return"";for(var r=e.replace(/[- _]+/g," ").split(" "),n=r.length,i=[],o=0;n--;){var a=r[o++];i.push(t.capitalize(a))}return i.join(" ")},r.trim=function(e){return"string"==typeof e?e.trim():""},r.trimLeft=function(e){if(_m.isString(e))return e.replace(/^\s+/,"")},r.trimRight=function(e){if(_m.isString(e))return e.replace(/\s+$/,"")},r.truncate=function(e,t,r){if(_m.isString(e))return"string"!=typeof r&&(r=""),e.length>t?e.slice(0,t-r.length)+r:e},r.truncateWords=function(e,t,r){if(_m.isString(e)&&!isNaN(t)){"string"!=typeof r&&(r="…");var n=Number(t),i=e.split(/[ \t]/);return n>i.length&&(i=i.slice(0,n)),i.join(" ").trim()+r}},r.upcase=function(){return r.uppercase.apply(this,arguments)},r.uppercase=function(e){return _m.isObject(e)&&e.fn?e.fn(this).toUpperCase():"string"!=typeof e?"":e.toUpperCase()}})),ix=/[^\x20-\x7E]/,ox=/[\x2E\u3002\uFF0E\uFF61]/g,ax={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},sx=Math.floor,cx=String.fromCharCode;function lx(e){throw new RangeError(ax[e])}function ux(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function px(e,t,r){var n=0;for(e=r?sx(e/700):e>>1,e+=sx(e/t);e>455;n+=36)e=sx(e/35);return sx(n+36*e/(e+38))}function dx(e){return function(e,t){var r=e.split("@"),n="";r.length>1&&(n=r[0]+"@",e=r[1]);var i=function(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}((e=e.replace(ox,".")).split("."),(function(e){return ix.test(e)?"xn--"+function(e){var t,r,n,i,o,a,s,c,l,u,p,d,m,f,h,g=[];for(d=(e=function(e){for(var t,r,n=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(r=e.charCodeAt(i++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--):n.push(t);return n}(e)).length,t=128,r=0,o=72,a=0;a<d;++a)(p=e[a])<128&&g.push(cx(p));for(n=i=g.length,i&&g.push("-");n<d;){for(s=2147483647,a=0;a<d;++a)(p=e[a])>=t&&p<s&&(s=p);for(s-t>sx((2147483647-r)/(m=n+1))&&lx("overflow"),r+=(s-t)*m,t=s,a=0;a<d;++a)if((p=e[a])<t&&++r>2147483647&&lx("overflow"),p==t){for(c=r,l=36;!(c<(u=l<=o?1:l>=o+26?26:l-o));l+=36)h=c-u,f=36-u,g.push(cx(ux(u+h%f,0))),c=sx(h/f);g.push(cx(ux(c,0))),o=px(r,m,n==i),r=0,++n}++r,++t}return g.join("")}(e):e})).join(".");return n+i}(e)}function mx(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var fx=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function hx(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}}function gx(e,t,r,n){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?vx(bx(e),(function(n){var i=encodeURIComponent(hx(n))+r;return fx(e[n])?vx(e[n],(function(e){return i+encodeURIComponent(hx(e))})).join(t):i+encodeURIComponent(hx(e[n]))})).join(t):n?encodeURIComponent(hx(n))+r+encodeURIComponent(hx(e)):""}function vx(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var bx=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t};function yx(e,t,r,n){t=t||"&",r=r||"=";var i={};if("string"!=typeof e||0===e.length)return i;var o=/\+/g;e=e.split(t);var a=1e3;n&&"number"==typeof n.maxKeys&&(a=n.maxKeys);var s=e.length;a>0&&s>a&&(s=a);for(var c=0;c<s;++c){var l,u,p,d,m=e[c].replace(o,"%20"),f=m.indexOf(r);f>=0?(l=m.substr(0,f),u=m.substr(f+1)):(l=m,u=""),p=decodeURIComponent(l),d=decodeURIComponent(u),mx(i,p)?fx(i[p])?i[p].push(d):i[p]=[i[p],d]:i[p]=d}return i}var xx={encode:gx,stringify:gx,decode:yx,parse:yx},wx=Object.freeze({__proto__:null,stringify:gx,parse:yx,default:xx,encode:gx,decode:yx}),kx={parse:Bx,resolve:Rx,resolveObject:Nx,format:jx,Url:Cx};function Cx(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var zx=/^([a-z0-9.+-]+:)/i,Sx=/:[0-9]*$/,Ax=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Dx=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),Tx=["'"].concat(Dx),$x=["%","/","?",";","#"].concat(Tx),_x=["/","?","#"],Ex=/^[+a-z0-9A-Z_-]{0,63}$/,Mx=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Lx={javascript:!0,"javascript:":!0},Ix={javascript:!0,"javascript:":!0},Ox={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Bx(e,t,r){if(e&&sm(e)&&e instanceof Cx)return e;var n=new Cx;return n.parse(e,t,r),n}function Px(e,t,r,n){if(!nm(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var i=t.indexOf("?"),o=-1!==i&&i<t.indexOf("#")?"?":"#",a=t.split(o);a[0]=a[0].replace(/\\/g,"/");var s=t=a.join(o);if(s=s.trim(),!n&&1===t.split("#").length){var c=Ax.exec(s);if(c)return e.path=s,e.href=s,e.pathname=c[1],c[2]?(e.search=c[2],e.query=r?yx(e.search.substr(1)):e.search.substr(1)):r&&(e.search="",e.query={}),e}var l,u,p,d,m=zx.exec(s);if(m){var f=(m=m[0]).toLowerCase();e.protocol=f,s=s.substr(m.length)}if(n||m||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var h="//"===s.substr(0,2);!h||m&&Ix[m]||(s=s.substr(2),e.slashes=!0)}if(!Ix[m]&&(h||m&&!Ox[m])){var g,v,b=-1;for(l=0;l<_x.length;l++)-1!==(u=s.indexOf(_x[l]))&&(-1===b||u<b)&&(b=u);for(-1!==(v=-1===b?s.lastIndexOf("@"):s.lastIndexOf("@",b))&&(g=s.slice(0,v),s=s.slice(v+1),e.auth=decodeURIComponent(g)),b=-1,l=0;l<$x.length;l++)-1!==(u=s.indexOf($x[l]))&&(-1===b||u<b)&&(b=u);-1===b&&(b=s.length),e.host=s.slice(0,b),s=s.slice(b),qx(e),e.hostname=e.hostname||"";var y="["===e.hostname[0]&&"]"===e.hostname[e.hostname.length-1];if(!y){var x=e.hostname.split(/\./);for(l=0,p=x.length;l<p;l++){var w=x[l];if(w&&!w.match(Ex)){for(var k="",C=0,z=w.length;C<z;C++)w.charCodeAt(C)>127?k+="x":k+=w[C];if(!k.match(Ex)){var S=x.slice(0,l),A=x.slice(l+1),D=w.match(Mx);D&&(S.push(D[1]),A.unshift(D[2])),A.length&&(s="/"+A.join(".")+s),e.hostname=S.join(".");break}}}}e.hostname.length>255?e.hostname="":e.hostname=e.hostname.toLowerCase(),y||(e.hostname=dx(e.hostname)),d=e.port?":"+e.port:"";var T=e.hostname||"";e.host=T+d,e.href+=e.host,y&&(e.hostname=e.hostname.substr(1,e.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!Lx[f])for(l=0,p=Tx.length;l<p;l++){var $=Tx[l];if(-1!==s.indexOf($)){var _=encodeURIComponent($);_===$&&(_=escape($)),s=s.split($).join(_)}}var E=s.indexOf("#");-1!==E&&(e.hash=s.substr(E),s=s.slice(0,E));var M=s.indexOf("?");if(-1!==M?(e.search=s.substr(M),e.query=s.substr(M+1),r&&(e.query=yx(e.query)),s=s.slice(0,M)):r&&(e.search="",e.query={}),s&&(e.pathname=s),Ox[f]&&e.hostname&&!e.pathname&&(e.pathname="/"),e.pathname||e.search){d=e.pathname||"";var L=e.search||"";e.path=d+L}return e.href=Fx(e),e}function jx(e){return nm(e)&&(e=Px({},e)),Fx(e)}function Fx(e){var t=e.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var r=e.protocol||"",n=e.pathname||"",i=e.hash||"",o=!1,a="";e.host?o=t+e.host:e.hostname&&(o=t+(-1===e.hostname.indexOf(":")?e.hostname:"["+this.hostname+"]"),e.port&&(o+=":"+e.port)),e.query&&sm(e.query)&&Object.keys(e.query).length&&(a=gx(e.query));var s=e.search||a&&"?"+a||"";return r&&":"!==r.substr(-1)&&(r+=":"),e.slashes||(!r||Ox[r])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),i&&"#"!==i.charAt(0)&&(i="#"+i),s&&"?"!==s.charAt(0)&&(s="?"+s),r+o+(n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+i}function Rx(e,t){return Bx(e,!1,!0).resolve(t)}function Nx(e,t){return e?Bx(e,!1,!0).resolveObject(t):t}function qx(e){var t=e.host,r=Sx.exec(t);r&&(":"!==(r=r[0])&&(e.port=r.substr(1)),t=t.substr(0,t.length-r.length)),t&&(e.hostname=t)}Cx.prototype.parse=function(e,t,r){return Px(this,e,t,r)},Cx.prototype.format=function(){return Fx(this)},Cx.prototype.resolve=function(e){return this.resolveObject(Bx(e,!1,!0)).format()},Cx.prototype.resolveObject=function(e){if(nm(e)){var t=new Cx;t.parse(e,!1,!0),e=t}for(var r,n=new Cx,i=Object.keys(this),o=0;o<i.length;o++){var a=i[o];n[a]=this[a]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),c=0;c<s.length;c++){var l=s[c];"protocol"!==l&&(n[l]=e[l])}return Ox[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!Ox[e.protocol]){for(var u=Object.keys(e),p=0;p<u.length;p++){var d=u[p];n[d]=e[d]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||Ix[e.protocol])n.pathname=e.pathname;else{for(r=(e.pathname||"").split("/");r.length&&!(e.host=r.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==r[0]&&r.unshift(""),r.length<2&&r.unshift(""),n.pathname=r.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var m=n.pathname||"",f=n.search||"";n.path=m+f}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var h,g=n.pathname&&"/"===n.pathname.charAt(0),v=e.host||e.pathname&&"/"===e.pathname.charAt(0),b=v||g||n.host&&e.pathname,y=b,x=n.pathname&&n.pathname.split("/")||[],w=n.protocol&&!Ox[n.protocol];if(r=e.pathname&&e.pathname.split("/")||[],w&&(n.hostname="",n.port=null,n.host&&(""===x[0]?x[0]=n.host:x.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===r[0]?r[0]=e.host:r.unshift(e.host)),e.host=null),b=b&&(""===r[0]||""===x[0])),v)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,x=r;else if(r.length)x||(x=[]),x.pop(),x=x.concat(r),n.search=e.search,n.query=e.query;else if(!tm(e.search))return w&&(n.hostname=n.host=x.shift(),(h=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=h.shift(),n.host=n.hostname=h.shift())),n.search=e.search,n.query=e.query,em(n.pathname)&&em(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n;if(!x.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var k=x.slice(-1)[0],C=(n.host||e.host||x.length>1)&&("."===k||".."===k)||""===k,z=0,S=x.length;S>=0;S--)"."===(k=x[S])?x.splice(S,1):".."===k?(x.splice(S,1),z++):z&&(x.splice(S,1),z--);if(!b&&!y)for(;z--;z)x.unshift("..");!b||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),C&&"/"!==x.join("/").substr(-1)&&x.push("");var A=""===x[0]||x[0]&&"/"===x[0].charAt(0);return w&&(n.hostname=n.host=A?"":x.length?x.shift():"",(h=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=h.shift(),n.host=n.hostname=h.shift())),(b=b||n.host&&x.length)&&!A&&x.unshift(""),x.length?n.pathname=x.join("/"):(n.pathname=null,n.path=null),em(n.pathname)&&em(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},Cx.prototype.parseHost=function(){return qx(this)};var Hx=Jc(Object.freeze({__proto__:null,parse:Bx,resolve:Rx,resolveObject:Nx,format:jx,default:kx,Url:Cx})),Ux=Jc(wx),Gx=Zc((function(e){var t=e.exports;t.encodeURI=function(e){if(_m.isString(e))return encodeURIComponent(e)},t.escape=function(e){if(_m.isString(e))return Ux.escape(e)},t.decodeURI=function(e){if(_m.isString(e))return decodeURIComponent(e)},t.url_encode=function(){return t.encodeURI.apply(this,arguments)},t.url_decode=function(e){return t.decodeURI.apply(this,arguments)},t.urlResolve=function(e,t){return Hx.resolve(e,t)},t.urlParse=function(e){return Hx.parse(e)},t.stripQuerystring=function(e){if(_m.isString(e))return e.split("?")[0]},t.stripProtocol=function(e){if(_m.isString(e)){var t=Hx.parse(e);return t.protocol="",t.format()}}})),Wx={array:tf,code:Sf,collection:$f,comparison:Ff,html:qf,i18n:Hf,inflection:Uf,match:qy,math:Hy,misc:Uy,number:Gy,object:Tf,path:tx,regex:rx,string:nx,url:Gx},Xx=Zc((function(e){e.exports=function(t,r){"string"==typeof t?t=[t]:Array.isArray(t)||(r=t,t=null);var n=(r=r||{}).handlebars||r.hbs||op;return vp(e.exports,"handlebars",n),t?t.forEach((function(e){n.registerHelper(Wx[e])})):cp(Wx,(function(e,t){n.registerHelper(e)})),n.helpers},cp(Wx,(function(t,r){vp(e.exports,r,(function(r){var n=(r=r||{}).handlebars||r.hbs||op;return vp(e.exports,"handlebars",n),n.registerHelper(t),n.helpers}))})),e.exports.utils=Of})),Vx=Zc((function(e,t){e.exports=function(){var e=6e4,t=36e5,r="millisecond",n="second",i="minute",o="hour",a="day",s="week",c="month",l="quarter",u="year",p="date",d="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,h={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},g=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},v={s:g,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),i=r%60;return(t<=0?"+":"-")+g(n,2,"0")+":"+g(i,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),i=t.clone().add(n,c),o=r-i<0,a=t.clone().add(n+(o?-1:1),c);return+(-(n+(r-i)/(o?i-a:a-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:u,w:s,d:a,D:p,h:o,m:i,s:n,ms:r,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",y={};y[b]=h;var x=function(e){return e instanceof z},w=function(e,t,r){var n;if(!e)return b;if("string"==typeof e)y[e]&&(n=e),t&&(y[e]=t,n=e);else{var i=e.name;y[i]=e,n=i}return!r&&n&&(b=n),n||!r&&b},k=function(e,t){if(x(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new z(r)},C=v;C.l=w,C.i=x,C.w=function(e,t){return k(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var z=function(){function h(e){this.$L=w(e.locale,null,!0),this.parse(e)}var g=h.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(C.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(m);if(n){var i=n[2]-1||0,o=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,o)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,o)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return C},g.isValid=function(){return!(this.$d.toString()===d)},g.isSame=function(e,t){var r=k(e);return this.startOf(t)<=r&&r<=this.endOf(t)},g.isAfter=function(e,t){return k(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<k(e)},g.$g=function(e,t,r){return C.u(e)?this[t]:this.set(r,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var r=this,l=!!C.u(t)||t,d=C.p(e),m=function(e,t){var n=C.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return l?n:n.endOf(a)},f=function(e,t){return C.w(r.toDate()[e].apply(r.toDate("s"),(l?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},h=this.$W,g=this.$M,v=this.$D,b="set"+(this.$u?"UTC":"");switch(d){case u:return l?m(1,0):m(31,11);case c:return l?m(1,g):m(0,g+1);case s:var y=this.$locale().weekStart||0,x=(h<y?h+7:h)-y;return m(l?v-x:v+(6-x),g);case a:case p:return f(b+"Hours",0);case o:return f(b+"Minutes",1);case i:return f(b+"Seconds",2);case n:return f(b+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var s,l=C.p(e),d="set"+(this.$u?"UTC":""),m=(s={},s[a]=d+"Date",s[p]=d+"Date",s[c]=d+"Month",s[u]=d+"FullYear",s[o]=d+"Hours",s[i]=d+"Minutes",s[n]=d+"Seconds",s[r]=d+"Milliseconds",s)[l],f=l===a?this.$D+(t-this.$W):t;if(l===c||l===u){var h=this.clone().set(p,1);h.$d[m](f),h.init(),this.$d=h.set(p,Math.min(this.$D,h.daysInMonth())).$d}else m&&this.$d[m](f);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[C.p(e)]()},g.add=function(r,l){var p,d=this;r=Number(r);var m=C.p(l),f=function(e){var t=k(d);return C.w(t.date(t.date()+Math.round(e*r)),d)};if(m===c)return this.set(c,this.$M+r);if(m===u)return this.set(u,this.$y+r);if(m===a)return f(1);if(m===s)return f(7);var h=(p={},p[i]=e,p[o]=t,p[n]=1e3,p)[m]||1,g=this.$d.getTime()+r*h;return C.w(g,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||d;var n=e||"YYYY-MM-DDTHH:mm:ssZ",i=C.z(this),o=this.$H,a=this.$m,s=this.$M,c=r.weekdays,l=r.months,u=function(e,r,i,o){return e&&(e[r]||e(t,n))||i[r].substr(0,o)},p=function(e){return C.s(o%12||12,e,"0")},m=r.meridiem||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n},h={YY:String(this.$y).slice(-2),YYYY:this.$y,M:s+1,MM:C.s(s+1,2,"0"),MMM:u(r.monthsShort,s,l,3),MMMM:u(l,s),D:this.$D,DD:C.s(this.$D,2,"0"),d:String(this.$W),dd:u(r.weekdaysMin,this.$W,c,2),ddd:u(r.weekdaysShort,this.$W,c,3),dddd:c[this.$W],H:String(o),HH:C.s(o,2,"0"),h:p(1),hh:p(2),a:m(o,a,!0),A:m(o,a,!1),m:String(a),mm:C.s(a,2,"0"),s:String(this.$s),ss:C.s(this.$s,2,"0"),SSS:C.s(this.$ms,3,"0"),Z:i};return n.replace(f,(function(e,t){return t||h[e]||i.replace(":","")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(r,p,d){var m,f=C.p(p),h=k(r),g=(h.utcOffset()-this.utcOffset())*e,v=this-h,b=C.m(this,h);return b=(m={},m[u]=b/12,m[c]=b,m[l]=b/3,m[s]=(v-g)/6048e5,m[a]=(v-g)/864e5,m[o]=v/t,m[i]=v/e,m[n]=v/1e3,m)[f]||v,d?b:C.a(b)},g.daysInMonth=function(){return this.endOf(c).$D},g.$locale=function(){return y[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=w(e,t,!0);return n&&(r.$L=n),r},g.clone=function(){return C.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},h}(),S=z.prototype;return k.prototype=S,[["$ms",r],["$s",n],["$m",i],["$H",o],["$W",a],["$M",c],["$y",u],["$D",p]].forEach((function(e){S[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),k.extend=function(e,t){return e.$i||(e(t,z,k),e.$i=!0),k},k.locale=w,k.isDayjs=x,k.unix=function(e){return k(1e3*e)},k.en=y[b],k.Ls=y,k.p={},k}()})),Yx=Zc((function(e,t){e.exports=function(){var e,t,r=1e3,n=6e4,i=36e5,o=864e5,a=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,s=31536e6,c=2592e6,l=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,u={years:s,months:c,days:o,hours:i,minutes:n,seconds:r,milliseconds:1,weeks:6048e5},p=function(e){return e instanceof b},d=function(e,t,r){return new b(e,r,t.$l)},m=function(e){return t.p(e)+"s"},f=function(e){return e<0},h=function(e){return f(e)?Math.ceil(e):Math.floor(e)},g=function(e){return Math.abs(e)},v=function(e,t){return e?f(e)?{negative:!0,format:""+g(e)+t}:{negative:!1,format:""+e+t}:{negative:!1,format:""}},b=function(){function f(e,t,r){var n=this;if(this.$d={},this.$l=r,void 0===e&&(this.$ms=0,this.parseFromMilliseconds()),t)return d(e*u[m(t)],this);if("number"==typeof e)return this.$ms=e,this.parseFromMilliseconds(),this;if("object"==typeof e)return Object.keys(e).forEach((function(t){n.$d[m(t)]=e[t]})),this.calMilliseconds(),this;if("string"==typeof e){var i=e.match(l);if(i){var o=i.slice(2).map((function(e){return null!=e?Number(e):0}));return this.$d.years=o[0],this.$d.months=o[1],this.$d.weeks=o[2],this.$d.days=o[3],this.$d.hours=o[4],this.$d.minutes=o[5],this.$d.seconds=o[6],this.calMilliseconds(),this}}return this}var g=f.prototype;return g.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function(t,r){return t+(e.$d[r]||0)*u[r]}),0)},g.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=h(e/s),e%=s,this.$d.months=h(e/c),e%=c,this.$d.days=h(e/o),e%=o,this.$d.hours=h(e/i),e%=i,this.$d.minutes=h(e/n),e%=n,this.$d.seconds=h(e/r),e%=r,this.$d.milliseconds=e},g.toISOString=function(){var e=v(this.$d.years,"Y"),t=v(this.$d.months,"M"),r=+this.$d.days||0;this.$d.weeks&&(r+=7*this.$d.weeks);var n=v(r,"D"),i=v(this.$d.hours,"H"),o=v(this.$d.minutes,"M"),a=this.$d.seconds||0;this.$d.milliseconds&&(a+=this.$d.milliseconds/1e3);var s=v(a,"S"),c=e.negative||t.negative||n.negative||i.negative||o.negative||s.negative,l=i.format||o.format||s.format?"T":"",u=(c?"-":"")+"P"+e.format+t.format+n.format+l+i.format+o.format+s.format;return"P"===u||"-P"===u?"P0D":u},g.toJSON=function(){return this.toISOString()},g.format=function(e){var r=e||"YYYY-MM-DDTHH:mm:ss",n={Y:this.$d.years,YY:t.s(this.$d.years,2,"0"),YYYY:t.s(this.$d.years,4,"0"),M:this.$d.months,MM:t.s(this.$d.months,2,"0"),D:this.$d.days,DD:t.s(this.$d.days,2,"0"),H:this.$d.hours,HH:t.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,"0"),SSS:t.s(this.$d.milliseconds,3,"0")};return r.replace(a,(function(e,t){return t||String(n[e])}))},g.as=function(e){return this.$ms/u[m(e)]},g.get=function(e){var t=this.$ms,r=m(e);return"milliseconds"===r?t%=1e3:t="weeks"===r?h(t/u[r]):this.$d[r],0===t?0:t},g.add=function(e,t,r){var n;return n=t?e*u[m(t)]:p(e)?e.$ms:d(e,this).$ms,d(this.$ms+n*(r?-1:1),this)},g.subtract=function(e,t){return this.add(e,t,!0)},g.locale=function(e){var t=this.clone();return t.$l=e,t},g.clone=function(){return d(this.$ms,this)},g.humanize=function(t){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!t)},g.milliseconds=function(){return this.get("milliseconds")},g.asMilliseconds=function(){return this.as("milliseconds")},g.seconds=function(){return this.get("seconds")},g.asSeconds=function(){return this.as("seconds")},g.minutes=function(){return this.get("minutes")},g.asMinutes=function(){return this.as("minutes")},g.hours=function(){return this.get("hours")},g.asHours=function(){return this.as("hours")},g.days=function(){return this.get("days")},g.asDays=function(){return this.as("days")},g.weeks=function(){return this.get("weeks")},g.asWeeks=function(){return this.as("weeks")},g.months=function(){return this.get("months")},g.asMonths=function(){return this.as("months")},g.years=function(){return this.get("years")},g.asYears=function(){return this.as("years")},f}();return function(r,n,i){e=i,t=i().$utils(),i.duration=function(e,t){var r=i.locale();return d(e,{$l:r},t)},i.isDuration=p;var o=n.prototype.add,a=n.prototype.subtract;n.prototype.add=function(e,t){return p(e)&&(e=e.asMilliseconds()),o.bind(this)(e,t)},n.prototype.subtract=function(e,t){return p(e)&&(e=e.asMilliseconds()),a.bind(this)(e,t)}}}()})),Kx=Zc((function(e,t){e.exports=function(e,t,r){var n=t.prototype,i=n.format;r.en.ordinal=function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"},n.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return i.bind(this)(e);var n=this.$utils(),o=(e||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case"Q":return Math.ceil((t.$M+1)/3);case"Do":return r.ordinal(t.$D);case"gggg":return t.weekYear();case"GGGG":return t.isoWeekYear();case"wo":return r.ordinal(t.week(),"W");case"w":case"ww":return n.s(t.week(),"w"===e?1:2,"0");case"W":case"WW":return n.s(t.isoWeek(),"W"===e?1:2,"0");case"k":case"kk":return n.s(String(0===t.$H?24:t.$H),"k"===e?1:2,"0");case"X":return Math.floor(t.$d.getTime()/1e3);case"x":return t.$d.getTime();case"z":return"["+t.offsetName()+"]";case"zzz":return"["+t.offsetName("long")+"]";default:return e}}));return i.bind(this)(o)}}})),Jx=Zc((function(e,t){e.exports=function(e,t,r){e=e||{};var n=t.prototype,i={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function o(e,t,r,i){return n.fromToBase(e,t,r,i)}r.en.relativeTime=i,n.fromToBase=function(t,n,o,a,s){for(var c,l,u,p=o.$locale().relativeTime||i,d=e.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],m=d.length,f=0;f<m;f+=1){var h=d[f];h.d&&(c=a?r(t).diff(o,h.d,!0):o.diff(t,h.d,!0));var g=(e.rounding||Math.round)(Math.abs(c));if(u=c>0,g<=h.r||!h.r){g<=1&&f>0&&(h=d[f-1]);var v=p[h.l];s&&(g=s(""+g)),l="string"==typeof v?v.replace("%d",g):v(g,n,h.l,u);break}}if(n)return l;var b=u?p.future:p.past;return"function"==typeof b?b(l):b.replace("%s",l)},n.to=function(e,t){return o(e,t,this,!0)},n.from=function(e,t){return o(e,t,this)};var a=function(e){return e.$u?r.utc():r()};n.toNow=function(e){return this.to(a(this),e)},n.fromNow=function(e){return this.from(a(this),e)}}})),Zx=Zc((function(e,t){var r,n,i;e.exports=(r="minute",n=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g,function(e,t,o){var a=t.prototype;o.utc=function(e){return new t({date:e,utc:!0,args:arguments})},a.utc=function(e){var t=o(this.toDate(),{locale:this.$L,utc:!0});return e?t.add(this.utcOffset(),r):t},a.local=function(){return o(this.toDate(),{locale:this.$L,utc:!1})};var s=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var c=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else c.call(this)};var l=a.utcOffset;a.utcOffset=function(e,t){var o=this.$utils().u;if(o(e))return this.$u?0:o(this.$offset)?l.call(this):this.$offset;if("string"==typeof e&&null===(e=function(e){void 0===e&&(e="");var t=e.match(n);if(!t)return null;var r=(""+t[0]).match(i)||["-",0,0],o=r[0],a=60*+r[1]+ +r[2];return 0===a?0:"+"===o?a:-a}(e)))return this;var a=Math.abs(e)<=16?60*e:e,s=this;if(t)return s.$offset=a,s.$u=0===e,s;if(0!==e){var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(s=this.local().add(a+c,r)).$offset=a,s.$x.$localOffset=c}else s=this.utc();return s};var u=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return u.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||(new Date).getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var p=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?o(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():p.call(this)};var d=a.diff;a.diff=function(e,t,r){if(e&&this.$u===e.$u)return d.call(this,e,t,r);var n=this.local(),i=o(e).local();return d.call(n,i,t,r)}})})),Qx=Zc((function(e,t){var r,n;e.exports=(r={year:0,month:1,day:2,hour:3,minute:4,second:5},n={},function(e,t,i){var o,a=function(e,t,r){void 0===r&&(r={});var i=new Date(e);return function(e,t){void 0===t&&(t={});var r=t.timeZoneName||"short",i=e+"|"+r,o=n[i];return o||(o=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:r}),n[i]=o),o}(t,r).formatToParts(i)},s=function(e,t){for(var n=a(e,t),o=[],s=0;s<n.length;s+=1){var c=n[s],l=c.type,u=c.value,p=r[l];p>=0&&(o[p]=parseInt(u,10))}var d=o[3],m=24===d?0:d,f=o[0]+"-"+o[1]+"-"+o[2]+" "+m+":"+o[4]+":"+o[5]+":000",h=+e;return(i.utc(f).valueOf()-(h-=h%1e3))/6e4},c=t.prototype;c.tz=function(e,t){void 0===e&&(e=o);var r=this.utcOffset(),n=this.toDate(),a=n.toLocaleString("en-US",{timeZone:e}),s=Math.round((n-new Date(a))/1e3/60),c=i(a).$set("millisecond",this.$ms).utcOffset(15*-Math.round(n.getTimezoneOffset()/15)-s,!0);if(t){var l=c.utcOffset();c=c.add(r-l,"minute")}return c.$x.$timezone=e,c},c.offsetName=function(e){var t=this.$x.$timezone||i.tz.guess(),r=a(this.valueOf(),t,{timeZoneName:e}).find((function(e){return"timezonename"===e.type.toLowerCase()}));return r&&r.value};var l=c.startOf;c.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return l.call(this,e,t);var r=i(this.format("YYYY-MM-DD HH:mm:ss:SSS"));return l.call(r,e,t).tz(this.$x.$timezone,!0)},i.tz=function(e,t,r){var n=r&&t,a=r||t||o,c=s(+i(),a);if("string"!=typeof e)return i(e).tz(a);var l=function(e,t,r){var n=e-60*t*1e3,i=s(n,r);if(t===i)return[n,t];var o=s(n-=60*(i-t)*1e3,r);return i===o?[n,i]:[e-60*Math.min(i,o)*1e3,Math.max(i,o)]}(i.utc(e,n).valueOf(),c,a),u=l[0],p=l[1],d=i(u).utcOffset(p);return d.$x.$timezone=a,d},i.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},i.tz.setDefault=function(e){o=e}})}));function ew(e){return"object"==typeof e&&"object"==typeof e.hash}function tw(e){return"object"==typeof e&&"object"==typeof e.options&&"object"==typeof e.app}function rw(e,t,r){if(ew(e))return rw({},t,e);if(ew(t))return rw(e,r,t);const n=tw(e)?e.context:{};ew(r=r||{})||(t=Object.assign({},t,r)),ew(r)&&!0===r.hash.root&&(t=Object.assign({},r.data.root,t));let i=Object.assign({},n,t,r.hash);return tw(e)||(i=Object.assign({},e,i)),tw(e)&&e.view&&e.view.data&&(i=Object.assign({},i,e.view.data)),i}function nw(e,t,r){return ew(t)&&(r=t,t=null),ew(e)&&(r=e,t=null,e=null),{str:e,pattern:t,options:r}}function iw(e,t,r){const n=nw(e,t,r),i=rw(this,{lang:"en",date:new Date(n.str)},{});Vx.locale(i.lang||i.language)}Vx.extend(Yx),Vx.extend(Kx),Vx.extend(Jx),Vx.extend(Zx),Vx.extend(Qx);var ow={date:(e,t,r)=>{const n=nw(e,t,r);if(null==n.str&&null==n.pattern)return Vx.locale("en"),Vx().format("MMMM DD, YYYY");iw(n.str,n.pattern,n.options);let i=Vx(new Date(n.str));return i="string"==typeof n.options?"utc"===n.options.toLowerCase()?i.utc():i.tz(n.options):i.tz(Vx.tz.guess()),""===n.pattern?i.toISOString():i.format(n.pattern)},duration:(e,t,r)=>{const n=nw(e,t);iw(n.str,n.pattern);const i=Vx.duration(n.str,n.pattern);return ew(r)?i.humanize():i.format(r)}},aw={HelperFunctionBuiltin:["#if","#unless","#each","#with","lookup","log","blockHelperMissing","each","helperMissing","if","unless","log","lookup","with"],HelperFunctionNames:{OBJECT:"object",ALL:"all",LITERAL:"literal",JS:"js"},LITERAL_MARKER:"%LITERAL%"},sw=Zc((function(e,t){const{date:r,duration:n}=ow,{HelperFunctionBuiltin:i}=aw,o=["math","array","number","url","string","comparison","object","regex"],a={date:r,duration:n};t.registerAll=e=>{for(let[t,r]of Object.entries(a))e.registerHelper(t,r);let r=[];for(let t of o){let n=Xx[t]();for(let e of Object.entries(n)){const t=e[0];-1===i.indexOf(t)&&-1===r.indexOf(t)&&r.push(t)}Xx[t]({handlebars:e})}t.externalHelperNames=r.concat(Object.keys(a))},t.unregisterAll=r=>{for(let e of Object.keys(a))r.unregisterHelper(e);for(let t of e.exports.externalHelperNames)r.unregisterHelper(t);t.externalHelperNames=[]},t.externalHelperNames=[]})),cw=Zc((function(e,t){const r=/^[A-Za-z0-9]+$/g;e.exports.FIND_HBS_REGEX=/{{([^{].*?)}}/g,e.exports.FIND_ANY_HBS_REGEX=/{?{{([^{].*?)}}}?/g,e.exports.FIND_TRIPLE_HBS_REGEX=/{{{([^{].*?)}}}/g,e.exports.findDoubleHbsInstances=e=>{let r=e;const n=new RegExp(t.FIND_HBS_REGEX),i=new RegExp(t.FIND_TRIPLE_HBS_REGEX),o=r.match(i);o&&o.forEach((e=>{r=r.replace(e,"")}));return r.match(n)||[]},e.exports.isAlphaNumeric=e=>e.match(r),e.exports.swapStrings=(e,t,r,n)=>e.slice(0,t)+n+e.slice(t+r),e.exports.removeHandlebarsStatements=(e,r="Invalid binding")=>{let n=new RegExp(t.FIND_HBS_REGEX),i=e.match(n);if(null==i)return e;for(let n of i){const i=e.indexOf(n);e=t.swapStrings(e,i,n.length,r)}return e},e.exports.btoa=e=>Ep.from(e,"utf-8").toString("base64"),e.exports.atob=e=>Ep.from(e,"base64").toString("utf-8")})),lw=Zc((function(e,t){(function(){function r(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function n(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(n,a,r(a),e)}return n}function i(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function o(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function a(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function s(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}function c(e,t){return!(null==e||!e.length)&&b(e,t,0)>-1}function l(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}function u(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}function p(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function d(e,t,r,n){var i=-1,o=null==e?0:e.length;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}function m(e,t,r,n){var i=null==e?0:e.length;for(n&&i&&(r=e[--i]);i--;)r=t(r,e[i],i,e);return r}function f(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function h(e){return e.match(Ye)||[]}function g(e,t,r){var n;return r(e,(function(e,r,i){if(t(e,r,i))return n=r,!1})),n}function v(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function b(e,t,r){return t==t?function(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}(e,t,r):v(e,x,r)}function y(e,t,r,n){for(var i=r-1,o=e.length;++i<o;)if(n(e[i],t))return i;return-1}function x(e){return e!=e}function w(e,t){var r=null==e?0:e.length;return r?S(e,t)/r:Q}function k(e){return function(t){return null==t?G:t[e]}}function C(e){return function(t){return null==e?G:e[t]}}function z(e,t,r,n,i){return i(e,(function(e,i,o){r=n?(n=!1,e):t(r,e,i,o)})),r}function S(e,t){for(var r,n=-1,i=e.length;++n<i;){var o=t(e[n]);o!==G&&(r=r===G?o:r+o)}return r}function A(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function D(e){return e?e.slice(0,H(e)+1).replace(Ue,""):e}function T(e){return function(t){return e(t)}}function $(e,t){return u(t,(function(t){return e[t]}))}function _(e,t){return e.has(t)}function E(e,t){for(var r=-1,n=e.length;++r<n&&b(t,e[r],0)>-1;);return r}function M(e,t){for(var r=e.length;r--&&b(t,e[r],0)>-1;);return r}function L(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}function I(e){return"\\"+Wt[e]}function O(e){return Rt.test(e)}function B(e){return Nt.test(e)}function P(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function j(e,t){return function(r){return e(t(r))}}function F(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var a=e[r];a!==t&&a!==V||(e[r]=V,o[i++]=r)}return o}function R(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}function N(e){return O(e)?function(e){for(var t=jt.lastIndex=0;jt.test(e);)++t;return t}(e):lr(e)}function q(e){return O(e)?function(e){return e.match(jt)||[]}(e):function(e){return e.split("")}(e)}function H(e){for(var t=e.length;t--&&Ge.test(e.charAt(t)););return t}function U(e){return e.match(Ft)||[]}var G,W="Expected a function",X="__lodash_hash_undefined__",V="__lodash_placeholder__",Y=32,K=128,J=1/0,Z=9007199254740991,Q=NaN,ee=4294967295,te=[["ary",K],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",Y],["partialRight",64],["rearg",256]],re="[object Arguments]",ne="[object Array]",ie="[object Boolean]",oe="[object Date]",ae="[object Error]",se="[object Function]",ce="[object GeneratorFunction]",le="[object Map]",ue="[object Number]",pe="[object Object]",de="[object Promise]",me="[object RegExp]",fe="[object Set]",he="[object String]",ge="[object Symbol]",ve="[object WeakMap]",be="[object ArrayBuffer]",ye="[object DataView]",xe="[object Float32Array]",we="[object Float64Array]",ke="[object Int8Array]",Ce="[object Int16Array]",ze="[object Int32Array]",Se="[object Uint8Array]",Ae="[object Uint8ClampedArray]",De="[object Uint16Array]",Te="[object Uint32Array]",$e=/\b__p \+= '';/g,_e=/\b(__p \+=) '' \+/g,Ee=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Me=/&(?:amp|lt|gt|quot|#39);/g,Le=/[&<>"']/g,Ie=RegExp(Me.source),Oe=RegExp(Le.source),Be=/<%-([\s\S]+?)%>/g,Pe=/<%([\s\S]+?)%>/g,je=/<%=([\s\S]+?)%>/g,Fe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Re=/^\w*$/,Ne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qe=/[\\^$.*+?()[\]{}|]/g,He=RegExp(qe.source),Ue=/^\s+/,Ge=/\s/,We=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Xe=/\{\n\/\* \[wrapped with (.+)\] \*/,Ve=/,? & /,Ye=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ke=/[()=,{}\[\]\/\s]/,Je=/\\(\\)?/g,Ze=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Qe=/\w*$/,et=/^[-+]0x[0-9a-f]+$/i,tt=/^0b[01]+$/i,rt=/^\[object .+?Constructor\]$/,nt=/^0o[0-7]+$/i,it=/^(?:0|[1-9]\d*)$/,ot=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,at=/($^)/,st=/['\n\r\u2028\u2029\\]/g,ct="\\ud800-\\udfff",lt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ut="\\u2700-\\u27bf",pt="a-z\\xdf-\\xf6\\xf8-\\xff",dt="A-Z\\xc0-\\xd6\\xd8-\\xde",mt="\\ufe0e\\ufe0f",ft="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ht="["+ct+"]",gt="["+ft+"]",vt="["+lt+"]",bt="\\d+",yt="["+ut+"]",xt="["+pt+"]",wt="[^"+ct+ft+bt+ut+pt+dt+"]",kt="\\ud83c[\\udffb-\\udfff]",Ct="[^"+ct+"]",zt="(?:\\ud83c[\\udde6-\\uddff]){2}",St="[\\ud800-\\udbff][\\udc00-\\udfff]",At="["+dt+"]",Dt="(?:"+xt+"|"+wt+")",Tt="(?:"+At+"|"+wt+")",$t="(?:['’](?:d|ll|m|re|s|t|ve))?",_t="(?:['’](?:D|LL|M|RE|S|T|VE))?",Et="(?:"+vt+"|"+kt+")?",Mt="["+mt+"]?",Lt=Mt+Et+"(?:\\u200d(?:"+[Ct,zt,St].join("|")+")"+Mt+Et+")*",It="(?:"+[yt,zt,St].join("|")+")"+Lt,Ot="(?:"+[Ct+vt+"?",vt,zt,St,ht].join("|")+")",Bt=RegExp("['’]","g"),Pt=RegExp(vt,"g"),jt=RegExp(kt+"(?="+kt+")|"+Ot+Lt,"g"),Ft=RegExp([At+"?"+xt+"+"+$t+"(?="+[gt,At,"$"].join("|")+")",Tt+"+"+_t+"(?="+[gt,At+Dt,"$"].join("|")+")",At+"?"+Dt+"+"+$t,At+"+"+_t,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",bt,It].join("|"),"g"),Rt=RegExp("[\\u200d"+ct+lt+mt+"]"),Nt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,qt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ht=-1,Ut={};Ut[xe]=Ut[we]=Ut[ke]=Ut[Ce]=Ut[ze]=Ut[Se]=Ut[Ae]=Ut[De]=Ut[Te]=!0,Ut[re]=Ut[ne]=Ut[be]=Ut[ie]=Ut[ye]=Ut[oe]=Ut[ae]=Ut[se]=Ut[le]=Ut[ue]=Ut[pe]=Ut[me]=Ut[fe]=Ut[he]=Ut[ve]=!1;var Gt={};Gt[re]=Gt[ne]=Gt[be]=Gt[ye]=Gt[ie]=Gt[oe]=Gt[xe]=Gt[we]=Gt[ke]=Gt[Ce]=Gt[ze]=Gt[le]=Gt[ue]=Gt[pe]=Gt[me]=Gt[fe]=Gt[he]=Gt[ge]=Gt[Se]=Gt[Ae]=Gt[De]=Gt[Te]=!0,Gt[ae]=Gt[se]=Gt[ve]=!1;var Wt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Xt=parseFloat,Vt=parseInt,Yt="object"==typeof Kc&&Kc&&Kc.Object===Object&&Kc,Kt="object"==typeof self&&self&&self.Object===Object&&self,Jt=Yt||Kt||Function("return this")(),Zt=t&&!t.nodeType&&t,Qt=Zt&&e&&!e.nodeType&&e,er=Qt&&Qt.exports===Zt,tr=er&&Yt.process,rr=function(){try{return Qt&&Qt.require&&Qt.require("util").types||tr&&tr.binding&&tr.binding("util")}catch(e){}}(),nr=rr&&rr.isArrayBuffer,ir=rr&&rr.isDate,or=rr&&rr.isMap,ar=rr&&rr.isRegExp,sr=rr&&rr.isSet,cr=rr&&rr.isTypedArray,lr=k("length"),ur=C({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),pr=C({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),dr=C({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),mr=function e(t){function C(e){if(Oi(e)&&!Ss(e)&&!(e instanceof ct)){if(e instanceof Ye)return e;if(So.call(e,"__wrapped__"))return si(e)}return new Ye(e)}function Ge(){}function Ye(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=G}function ct(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ee,this.__views__=[]}function lt(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ut(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function pt(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function dt(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new pt;++t<r;)this.add(e[t])}function mt(e){this.size=(this.__data__=new ut(e)).size}function ft(e,t){var r=Ss(e),n=!r&&zs(e),i=!r&&!n&&Ds(e),o=!r&&!n&&!i&&Ms(e),a=r||n||i||o,s=a?A(e.length,bo):[],c=s.length;for(var l in e)!t&&!So.call(e,l)||a&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Gn(l,c))||s.push(l);return s}function ht(e){var t=e.length;return t?e[Dr(0,t-1)]:G}function gt(e,t){return ii(on(e),St(t,0,e.length))}function vt(e){return ii(on(e))}function bt(e,t,r){(r===G||Di(e[t],r))&&(r!==G||t in e)||Ct(e,t,r)}function yt(e,t,r){var n=e[t];So.call(e,t)&&Di(n,r)&&(r!==G||t in e)||Ct(e,t,r)}function xt(e,t){for(var r=e.length;r--;)if(Di(e[r][0],t))return r;return-1}function wt(e,t,r,n){return Ca(e,(function(e,i,o){t(n,e,r(e),o)})),n}function kt(e,t){return e&&an(t,Yi(t),e)}function Ct(e,t,r){"__proto__"==t&&Ho?Ho(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function zt(e,t){for(var r=-1,n=t.length,i=uo(n),o=null==e;++r<n;)i[r]=o?G:Xi(e,t[r]);return i}function St(e,t,r){return e==e&&(r!==G&&(e=e<=r?e:r),t!==G&&(e=e>=t?e:t)),e}function At(e,t,r,n,o,a){var s,c=1&t,l=2&t,u=4&t;if(r&&(s=o?r(e,n,o,a):r(e)),s!==G)return s;if(!Ii(e))return e;var p=Ss(e);if(p){if(s=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&So.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!c)return on(e,s)}else{var d=Oa(e),m=d==se||d==ce;if(Ds(e))return Zr(e,c);if(d==pe||d==re||m&&!o){if(s=l||m?{}:Hn(e),!c)return l?function(e,t){return an(e,Ia(e),t)}(e,function(e,t){return e&&an(t,Ki(t),e)}(s,e)):function(e,t){return an(e,La(e),t)}(e,kt(s,e))}else{if(!Gt[d])return o?e:{};s=function(e,t,r){var n=e.constructor;switch(t){case be:return Qr(e);case ie:case oe:return new n(+e);case ye:return function(e,t){return new e.constructor(t?Qr(e.buffer):e.buffer,e.byteOffset,e.byteLength)}(e,r);case xe:case we:case ke:case Ce:case ze:case Se:case Ae:case De:case Te:return en(e,r);case le:return new n;case ue:case he:return new n(e);case me:return function(e){var t=new e.constructor(e.source,Qe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case fe:return new n;case ge:return function(e){return xa?go(xa.call(e)):{}}(e)}}(e,d,c)}}a||(a=new mt);var f=a.get(e);if(f)return f;a.set(e,s),Es(e)?e.forEach((function(n){s.add(At(n,t,r,n,e,a))})):$s(e)&&e.forEach((function(n,i){s.set(i,At(n,t,r,i,e,a))}));var h=p?G:(u?l?On:In:l?Ki:Yi)(e);return i(h||e,(function(n,i){h&&(n=e[i=n]),yt(s,i,At(n,t,r,i,e,a))})),s}function Dt(e,t,r){var n=r.length;if(null==e)return!n;for(e=go(e);n--;){var i=r[n],o=t[i],a=e[i];if(a===G&&!(i in e)||!o(a))return!1}return!0}function Tt(e,t,r){if("function"!=typeof e)throw new yo(W);return ja((function(){e.apply(G,r)}),t)}function $t(e,t,r,n){var i=-1,o=c,a=!0,s=e.length,p=[],d=t.length;if(!s)return p;r&&(t=u(t,T(r))),n?(o=l,a=!1):t.length>=200&&(o=_,a=!1,t=new dt(t));e:for(;++i<s;){var m=e[i],f=null==r?m:r(m);if(m=n||0!==m?m:0,a&&f==f){for(var h=d;h--;)if(t[h]===f)continue e;p.push(m)}else o(t,f,n)||p.push(m)}return p}function _t(e,t){var r=!0;return Ca(e,(function(e,n,i){return r=!!t(e,n,i)})),r}function Et(e,t,r){for(var n=-1,i=e.length;++n<i;){var o=e[n],a=t(o);if(null!=a&&(s===G?a==a&&!Fi(a):r(a,s)))var s=a,c=o}return c}function Mt(e,t){var r=[];return Ca(e,(function(e,n,i){t(e,n,i)&&r.push(e)})),r}function Lt(e,t,r,n,i){var o=-1,a=e.length;for(r||(r=Un),i||(i=[]);++o<a;){var s=e[o];t>0&&r(s)?t>1?Lt(s,t-1,r,n,i):p(i,s):n||(i[i.length]=s)}return i}function It(e,t){return e&&Sa(e,t,Yi)}function Ot(e,t){return e&&Aa(e,t,Yi)}function jt(e,t){return s(t,(function(t){return Ei(e[t])}))}function Ft(e,t){for(var r=0,n=(t=Kr(t,e)).length;null!=e&&r<n;)e=e[oi(t[r++])];return r&&r==n?e:G}function Rt(e,t,r){var n=t(e);return Ss(e)?n:p(n,r(e))}function Nt(e){return null==e?e===G?"[object Undefined]":"[object Null]":qo&&qo in go(e)?function(e){var t=So.call(e,qo),r=e[qo];try{e[qo]=G;var n=!0}catch(e){}var i=To.call(e);return n&&(t?e[qo]=r:delete e[qo]),i}(e):function(e){return To.call(e)}(e)}function Wt(e,t){return e>t}function Yt(e,t){return null!=e&&So.call(e,t)}function Kt(e,t){return null!=e&&t in go(e)}function Zt(e,t,r){for(var n=r?l:c,i=e[0].length,o=e.length,a=o,s=uo(o),p=1/0,d=[];a--;){var m=e[a];a&&t&&(m=u(m,T(t))),p=ta(m.length,p),s[a]=!r&&(t||i>=120&&m.length>=120)?new dt(a&&m):G}m=e[0];var f=-1,h=s[0];e:for(;++f<i&&d.length<p;){var g=m[f],v=t?t(g):g;if(g=r||0!==g?g:0,!(h?_(h,v):n(d,v,r))){for(a=o;--a;){var b=s[a];if(!(b?_(b,v):n(e[a],v,r)))continue e}h&&h.push(v),d.push(g)}}return d}function Qt(e,t,n){var i=null==(e=Qn(e,t=Kr(t,e)))?e:e[oi(di(t))];return null==i?G:r(i,e,n)}function tr(e){return Oi(e)&&Nt(e)==re}function rr(e,t,r,n,i){return e===t||(null==e||null==t||!Oi(e)&&!Oi(t)?e!=e&&t!=t:function(e,t,r,n,i,o){var a=Ss(e),s=Ss(t),c=a?ne:Oa(e),l=s?ne:Oa(t),u=(c=c==re?pe:c)==pe,p=(l=l==re?pe:l)==pe,d=c==l;if(d&&Ds(e)){if(!Ds(t))return!1;a=!0,u=!1}if(d&&!u)return o||(o=new mt),a||Ms(e)?Mn(e,t,r,n,i,o):function(e,t,r,n,i,o,a){switch(r){case ye:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case be:return!(e.byteLength!=t.byteLength||!o(new Io(e),new Io(t)));case ie:case oe:case ue:return Di(+e,+t);case ae:return e.name==t.name&&e.message==t.message;case me:case he:return e==t+"";case le:var s=P;case fe:var c=1&n;if(s||(s=R),e.size!=t.size&&!c)return!1;var l=a.get(e);if(l)return l==t;n|=2,a.set(e,t);var u=Mn(s(e),s(t),n,i,o,a);return a.delete(e),u;case ge:if(xa)return xa.call(e)==xa.call(t)}return!1}(e,t,c,r,n,i,o);if(!(1&r)){var m=u&&So.call(e,"__wrapped__"),f=p&&So.call(t,"__wrapped__");if(m||f){var h=m?e.value():e,g=f?t.value():t;return o||(o=new mt),i(h,g,r,n,o)}}return!!d&&(o||(o=new mt),function(e,t,r,n,i,o){var a=1&r,s=In(e),c=s.length;if(c!=In(t).length&&!a)return!1;for(var l=c;l--;){var u=s[l];if(!(a?u in t:So.call(t,u)))return!1}var p=o.get(e),d=o.get(t);if(p&&d)return p==t&&d==e;var m=!0;o.set(e,t),o.set(t,e);for(var f=a;++l<c;){var h=e[u=s[l]],g=t[u];if(n)var v=a?n(g,h,u,t,e,o):n(h,g,u,e,t,o);if(!(v===G?h===g||i(h,g,r,n,o):v)){m=!1;break}f||(f="constructor"==u)}if(m&&!f){var b=e.constructor,y=t.constructor;b!=y&&"constructor"in e&&"constructor"in t&&!("function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y)&&(m=!1)}return o.delete(e),o.delete(t),m}(e,t,r,n,i,o))}(e,t,r,n,rr,i))}function lr(e,t,r,n){var i=r.length,o=i,a=!n;if(null==e)return!o;for(e=go(e);i--;){var s=r[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){var c=(s=r[i])[0],l=e[c],u=s[1];if(a&&s[2]){if(l===G&&!(c in e))return!1}else{var p=new mt;if(n)var d=n(l,u,c,e,t,p);if(!(d===G?rr(u,l,3,n,p):d))return!1}}return!0}function fr(e){return!(!Ii(e)||function(e){return!!Do&&Do in e}(e))&&(Ei(e)?Eo:rt).test(ai(e))}function hr(e){return"function"==typeof e?e:null==e?no:"object"==typeof e?Ss(e)?xr(e[0],e[1]):yr(e):so(e)}function gr(e){if(!Yn(e))return Qo(e);var t=[];for(var r in go(e))So.call(e,r)&&"constructor"!=r&&t.push(r);return t}function vr(e,t){return e<t}function br(e,t){var r=-1,n=Ti(e)?uo(e.length):[];return Ca(e,(function(e,i,o){n[++r]=t(e,i,o)})),n}function yr(e){var t=Rn(e);return 1==t.length&&t[0][2]?Jn(t[0][0],t[0][1]):function(r){return r===e||lr(r,e,t)}}function xr(e,t){return Xn(e)&&Kn(t)?Jn(oi(e),t):function(r){var n=Xi(r,e);return n===G&&n===t?Vi(r,e):rr(t,n,3)}}function wr(e,t,r,n,i){e!==t&&Sa(t,(function(o,a){if(i||(i=new mt),Ii(o))!function(e,t,r,n,i,o,a){var s=ti(e,r),c=ti(t,r),l=a.get(c);if(l)return bt(e,r,l),G;var u=o?o(s,c,r+"",e,t,a):G,p=u===G;if(p){var d=Ss(c),m=!d&&Ds(c),f=!d&&!m&&Ms(c);u=c,d||m||f?Ss(s)?u=s:$i(s)?u=on(s):m?(p=!1,u=Zr(c,!0)):f?(p=!1,u=en(c,!0)):u=[]:Pi(c)||zs(c)?(u=s,zs(s)?u=Gi(s):Ii(s)&&!Ei(s)||(u=Hn(c))):p=!1}p&&(a.set(c,u),i(u,c,n,o,a),a.delete(c)),bt(e,r,u)}(e,t,a,r,wr,n,i);else{var s=n?n(ti(e,a),o,a+"",e,t,i):G;s===G&&(s=o),bt(e,a,s)}}),Ki)}function kr(e,t){var r=e.length;if(r)return Gn(t+=t<0?r:0,r)?e[t]:G}function Cr(e,t,r){t=t.length?u(t,(function(e){return Ss(e)?function(t){return Ft(t,1===e.length?e[0]:e)}:e})):[no];var n=-1;return t=u(t,T(jn())),function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}(br(e,(function(e,r,i){return{criteria:u(t,(function(t){return t(e)})),index:++n,value:e}})),(function(e,t){return function(e,t,r){for(var n=-1,i=e.criteria,o=t.criteria,a=i.length,s=r.length;++n<a;){var c=tn(i[n],o[n]);if(c)return n>=s?c:c*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}))}function zr(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var a=t[n],s=Ft(e,a);r(s,a)&&Mr(o,Kr(a,e),s)}return o}function Sr(e,t,r,n){var i=n?y:b,o=-1,a=t.length,s=e;for(e===t&&(t=on(t)),r&&(s=u(e,T(r)));++o<a;)for(var c=0,l=t[o],p=r?r(l):l;(c=i(s,p,c,n))>-1;)s!==e&&Fo.call(s,c,1),Fo.call(e,c,1);return e}function Ar(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==o){var o=i;Gn(i)?Fo.call(e,i,1):qr(e,i)}}return e}function Dr(e,t){return e+Vo(ia()*(t-e+1))}function Tr(e,t){var r="";if(!e||t<1||t>Z)return r;do{t%2&&(r+=e),(t=Vo(t/2))&&(e+=e)}while(t);return r}function $r(e,t){return Fa(Zn(e,t,no),e+"")}function _r(e){return ht(Zi(e))}function Er(e,t){var r=Zi(e);return ii(r,St(t,0,r.length))}function Mr(e,t,r,n){if(!Ii(e))return e;for(var i=-1,o=(t=Kr(t,e)).length,a=o-1,s=e;null!=s&&++i<o;){var c=oi(t[i]),l=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(i!=a){var u=s[c];(l=n?n(u,c,s):G)===G&&(l=Ii(u)?u:Gn(t[i+1])?[]:{})}yt(s,c,l),s=s[c]}return e}function Lr(e){return ii(Zi(e))}function Ir(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=uo(i);++n<i;)o[n]=e[n+t];return o}function Or(e,t){var r;return Ca(e,(function(e,n,i){return!(r=t(e,n,i))})),!!r}function Br(e,t,r){var n=0,i=null==e?n:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;n<i;){var o=n+i>>>1,a=e[o];null!==a&&!Fi(a)&&(r?a<=t:a<t)?n=o+1:i=o}return i}return Pr(e,t,no,r)}function Pr(e,t,r,n){var i=0,o=null==e?0:e.length;if(0===o)return 0;for(var a=(t=r(t))!=t,s=null===t,c=Fi(t),l=t===G;i<o;){var u=Vo((i+o)/2),p=r(e[u]),d=p!==G,m=null===p,f=p==p,h=Fi(p);if(a)var g=n||f;else g=l?f&&(n||d):s?f&&d&&(n||!m):c?f&&d&&!m&&(n||!h):!m&&!h&&(n?p<=t:p<t);g?i=u+1:o=u}return ta(o,4294967294)}function jr(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var a=e[r],s=t?t(a):a;if(!r||!Di(s,c)){var c=s;o[i++]=0===a?0:a}}return o}function Fr(e){return"number"==typeof e?e:Fi(e)?Q:+e}function Rr(e){if("string"==typeof e)return e;if(Ss(e))return u(e,Rr)+"";if(Fi(e))return wa?wa.call(e):"";var t=e+"";return"0"==t&&1/e==-J?"-0":t}function Nr(e,t,r){var n=-1,i=c,o=e.length,a=!0,s=[],u=s;if(r)a=!1,i=l;else if(o>=200){var p=t?null:Ea(e);if(p)return R(p);a=!1,i=_,u=new dt}else u=t?[]:s;e:for(;++n<o;){var d=e[n],m=t?t(d):d;if(d=r||0!==d?d:0,a&&m==m){for(var f=u.length;f--;)if(u[f]===m)continue e;t&&u.push(m),s.push(d)}else i(u,m,r)||(u!==s&&u.push(m),s.push(d))}return s}function qr(e,t){return null==(e=Qn(e,t=Kr(t,e)))||delete e[oi(di(t))]}function Hr(e,t,r,n){return Mr(e,t,r(Ft(e,t)),n)}function Ur(e,t,r,n){for(var i=e.length,o=n?i:-1;(n?o--:++o<i)&&t(e[o],o,e););return r?Ir(e,n?0:o,n?o+1:i):Ir(e,n?o+1:0,n?i:o)}function Gr(e,t){var r=e;return r instanceof ct&&(r=r.value()),d(t,(function(e,t){return t.func.apply(t.thisArg,p([e],t.args))}),r)}function Wr(e,t,r){var n=e.length;if(n<2)return n?Nr(e[0]):[];for(var i=-1,o=uo(n);++i<n;)for(var a=e[i],s=-1;++s<n;)s!=i&&(o[i]=$t(o[i]||a,e[s],t,r));return Nr(Lt(o,1),t,r)}function Xr(e,t,r){for(var n=-1,i=e.length,o=t.length,a={};++n<i;)r(a,e[n],n<o?t[n]:G);return a}function Vr(e){return $i(e)?e:[]}function Yr(e){return"function"==typeof e?e:no}function Kr(e,t){return Ss(e)?e:Xn(e,t)?[e]:Ra(Wi(e))}function Jr(e,t,r){var n=e.length;return r=r===G?n:r,!t&&r>=n?e:Ir(e,t,r)}function Zr(e,t){if(t)return e.slice();var r=e.length,n=Oo?Oo(r):new e.constructor(r);return e.copy(n),n}function Qr(e){var t=new e.constructor(e.byteLength);return new Io(t).set(new Io(e)),t}function en(e,t){return new e.constructor(t?Qr(e.buffer):e.buffer,e.byteOffset,e.length)}function tn(e,t){if(e!==t){var r=e!==G,n=null===e,i=e==e,o=Fi(e),a=t!==G,s=null===t,c=t==t,l=Fi(t);if(!s&&!l&&!o&&e>t||o&&a&&c&&!s&&!l||n&&a&&c||!r&&c||!i)return 1;if(!n&&!o&&!l&&e<t||l&&r&&i&&!n&&!o||s&&r&&i||!a&&i||!c)return-1}return 0}function rn(e,t,r,n){for(var i=-1,o=e.length,a=r.length,s=-1,c=t.length,l=ea(o-a,0),u=uo(c+l),p=!n;++s<c;)u[s]=t[s];for(;++i<a;)(p||i<o)&&(u[r[i]]=e[i]);for(;l--;)u[s++]=e[i++];return u}function nn(e,t,r,n){for(var i=-1,o=e.length,a=-1,s=r.length,c=-1,l=t.length,u=ea(o-s,0),p=uo(u+l),d=!n;++i<u;)p[i]=e[i];for(var m=i;++c<l;)p[m+c]=t[c];for(;++a<s;)(d||i<o)&&(p[m+r[a]]=e[i++]);return p}function on(e,t){var r=-1,n=e.length;for(t||(t=uo(n));++r<n;)t[r]=e[r];return t}function an(e,t,r,n){var i=!r;r||(r={});for(var o=-1,a=t.length;++o<a;){var s=t[o],c=n?n(r[s],e[s],s,r,e):G;c===G&&(c=e[s]),i?Ct(r,s,c):yt(r,s,c)}return r}function sn(e,t){return function(r,i){var o=Ss(r)?n:wt,a=t?t():{};return o(r,e,jn(i,2),a)}}function cn(e){return $r((function(t,r){var n=-1,i=r.length,o=i>1?r[i-1]:G,a=i>2?r[2]:G;for(o=e.length>3&&"function"==typeof o?(i--,o):G,a&&Wn(r[0],r[1],a)&&(o=i<3?G:o,i=1),t=go(t);++n<i;){var s=r[n];s&&e(t,s,n,o)}return t}))}function ln(e,t){return function(r,n){if(null==r)return r;if(!Ti(r))return e(r,n);for(var i=r.length,o=t?i:-1,a=go(r);(t?o--:++o<i)&&!1!==n(a[o],o,a););return r}}function un(e){return function(t,r,n){for(var i=-1,o=go(t),a=n(t),s=a.length;s--;){var c=a[e?s:++i];if(!1===r(o[c],c,o))break}return t}}function pn(e){return function(t){var r=O(t=Wi(t))?q(t):G,n=r?r[0]:t.charAt(0),i=r?Jr(r,1).join(""):t.slice(1);return n[e]()+i}}function dn(e){return function(t){return d(to(eo(t).replace(Bt,"")),e,"")}}function mn(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=ka(e.prototype),n=e.apply(r,t);return Ii(n)?n:r}}function fn(e,t,n){var i=mn(e);return function o(){for(var a=arguments.length,s=uo(a),c=a,l=Pn(o);c--;)s[c]=arguments[c];var u=a<3&&s[0]!==l&&s[a-1]!==l?[]:F(s,l);return(a-=u.length)<n?Sn(e,t,vn,o.placeholder,G,s,u,G,G,n-a):r(this&&this!==Jt&&this instanceof o?i:e,this,s)}}function hn(e){return function(t,r,n){var i=go(t);if(!Ti(t)){var o=jn(r,3);t=Yi(t),r=function(e){return o(i[e],e,i)}}var a=e(t,r,n);return a>-1?i[o?t[a]:a]:G}}function gn(e){return Ln((function(t){var r=t.length,n=r,i=Ye.prototype.thru;for(e&&t.reverse();n--;){var o=t[n];if("function"!=typeof o)throw new yo(W);if(i&&!a&&"wrapper"==Bn(o))var a=new Ye([],!0)}for(n=a?n:r;++n<r;){var s=Bn(o=t[n]),c="wrapper"==s?Ma(o):G;a=c&&Vn(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?a[Bn(c[0])].apply(a,c[3]):1==o.length&&Vn(o)?a[s]():a.thru(o)}return function(){var e=arguments,n=e[0];if(a&&1==e.length&&Ss(n))return a.plant(n).value();for(var i=0,o=r?t[i].apply(this,e):n;++i<r;)o=t[i].call(this,o);return o}}))}function vn(e,t,r,n,i,o,a,s,c,l){var u=t&K,p=1&t,d=2&t,m=24&t,f=512&t,h=d?G:mn(e);return function g(){for(var v=arguments.length,b=uo(v),y=v;y--;)b[y]=arguments[y];if(m)var x=Pn(g),w=L(b,x);if(n&&(b=rn(b,n,i,m)),o&&(b=nn(b,o,a,m)),v-=w,m&&v<l)return Sn(e,t,vn,g.placeholder,r,b,F(b,x),s,c,l-v);var k=p?r:this,C=d?k[e]:e;return v=b.length,s?b=ei(b,s):f&&v>1&&b.reverse(),u&&c<v&&(b.length=c),this&&this!==Jt&&this instanceof g&&(C=h||mn(C)),C.apply(k,b)}}function bn(e,t){return function(r,n){return function(e,t,r,n){return It(e,(function(e,i,o){t(n,r(e),i,o)})),n}(r,e,t(n),{})}}function yn(e,t){return function(r,n){var i;if(r===G&&n===G)return t;if(r!==G&&(i=r),n!==G){if(i===G)return n;"string"==typeof r||"string"==typeof n?(r=Rr(r),n=Rr(n)):(r=Fr(r),n=Fr(n)),i=e(r,n)}return i}}function xn(e){return Ln((function(t){return t=u(t,T(jn())),$r((function(n){var i=this;return e(t,(function(e){return r(e,i,n)}))}))}))}function wn(e,t){var r=(t=t===G?" ":Rr(t)).length;if(r<2)return r?Tr(t,e):t;var n=Tr(t,Xo(e/N(t)));return O(t)?Jr(q(n),0,e).join(""):n.slice(0,e)}function kn(e,t,n,i){var o=1&t,a=mn(e);return function t(){for(var s=-1,c=arguments.length,l=-1,u=i.length,p=uo(u+c),d=this&&this!==Jt&&this instanceof t?a:e;++l<u;)p[l]=i[l];for(;c--;)p[l++]=arguments[++s];return r(d,o?n:this,p)}}function Cn(e){return function(t,r,n){return n&&"number"!=typeof n&&Wn(t,r,n)&&(r=n=G),t=Ni(t),r===G?(r=t,t=0):r=Ni(r),function(e,t,r,n){for(var i=-1,o=ea(Xo((t-e)/(r||1)),0),a=uo(o);o--;)a[n?o:++i]=e,e+=r;return a}(t,r,n=n===G?t<r?1:-1:Ni(n),e)}}function zn(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=Ui(t),r=Ui(r)),e(t,r)}}function Sn(e,t,r,n,i,o,a,s,c,l){var u=8&t;t|=u?Y:64,4&(t&=~(u?64:Y))||(t&=-4);var p=[e,t,i,u?o:G,u?a:G,u?G:o,u?G:a,s,c,l],d=r.apply(G,p);return Vn(e)&&Pa(d,p),d.placeholder=n,ri(d,e,t)}function An(e){var t=ho[e];return function(e,r){if(e=Ui(e),(r=null==r?0:ta(qi(r),292))&&Jo(e)){var n=(Wi(e)+"e").split("e");return+((n=(Wi(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}function Dn(e){return function(t){var r=Oa(t);return r==le?P(t):r==fe?function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=[e,e]})),r}(t):function(e,t){return u(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Tn(e,t,r,n,i,o,a,s){var c=2&t;if(!c&&"function"!=typeof e)throw new yo(W);var l=n?n.length:0;if(l||(t&=-97,n=i=G),a=a===G?a:ea(qi(a),0),s=s===G?s:qi(s),l-=i?i.length:0,64&t){var u=n,p=i;n=i=G}var d=c?G:Ma(e),m=[e,t,r,n,i,u,p,o,a,s];if(d&&function(e,t){var r=e[1],n=t[1],i=r|n,o=i<131,a=n==K&&8==r||n==K&&256==r&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(!o&&!a)return e;1&n&&(e[2]=t[2],i|=1&r?0:4);var s=t[3];if(s){var c=e[3];e[3]=c?rn(c,s,t[4]):s,e[4]=c?F(e[3],V):t[4]}(s=t[5])&&(c=e[5],e[5]=c?nn(c,s,t[6]):s,e[6]=c?F(e[5],V):t[6]),(s=t[7])&&(e[7]=s),n&K&&(e[8]=null==e[8]?t[8]:ta(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(m,d),e=m[0],t=m[1],r=m[2],n=m[3],i=m[4],!(s=m[9]=m[9]===G?c?0:e.length:ea(m[9]-l,0))&&24&t&&(t&=-25),t&&1!=t)f=8==t||16==t?fn(e,t,s):t!=Y&&33!=t||i.length?vn.apply(G,m):kn(e,t,r,n);else var f=function(e,t,r){var n=1&t,i=mn(e);return function t(){return(this&&this!==Jt&&this instanceof t?i:e).apply(n?r:this,arguments)}}(e,t,r);return ri((d?Da:Pa)(f,m),e,t)}function $n(e,t,r,n){return e===G||Di(e,ko[r])&&!So.call(n,r)?t:e}function _n(e,t,r,n,i,o){return Ii(e)&&Ii(t)&&(o.set(t,e),wr(e,t,G,_n,o),o.delete(t)),e}function En(e){return Pi(e)?G:e}function Mn(e,t,r,n,i,o){var a=1&r,s=e.length,c=t.length;if(s!=c&&!(a&&c>s))return!1;var l=o.get(e),u=o.get(t);if(l&&u)return l==t&&u==e;var p=-1,d=!0,m=2&r?new dt:G;for(o.set(e,t),o.set(t,e);++p<s;){var h=e[p],g=t[p];if(n)var v=a?n(g,h,p,t,e,o):n(h,g,p,e,t,o);if(v!==G){if(v)continue;d=!1;break}if(m){if(!f(t,(function(e,t){if(!_(m,t)&&(h===e||i(h,e,r,n,o)))return m.push(t)}))){d=!1;break}}else if(h!==g&&!i(h,g,r,n,o)){d=!1;break}}return o.delete(e),o.delete(t),d}function Ln(e){return Fa(Zn(e,G,ui),e+"")}function In(e){return Rt(e,Yi,La)}function On(e){return Rt(e,Ki,Ia)}function Bn(e){for(var t=e.name+"",r=ma[t],n=So.call(ma,t)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==e)return i.name}return t}function Pn(e){return(So.call(C,"placeholder")?C:e).placeholder}function jn(){var e=C.iteratee||io;return e=e===io?hr:e,arguments.length?e(arguments[0],arguments[1]):e}function Fn(e,t){var r=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?r["string"==typeof t?"string":"hash"]:r.map}function Rn(e){for(var t=Yi(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Kn(i)]}return t}function Nn(e,t){var r=function(e,t){return null==e?G:e[t]}(e,t);return fr(r)?r:G}function qn(e,t,r){for(var n=-1,i=(t=Kr(t,e)).length,o=!1;++n<i;){var a=oi(t[n]);if(!(o=null!=e&&r(e,a)))break;e=e[a]}return o||++n!=i?o:!!(i=null==e?0:e.length)&&Li(i)&&Gn(a,i)&&(Ss(e)||zs(e))}function Hn(e){return"function"!=typeof e.constructor||Yn(e)?{}:ka(Bo(e))}function Un(e){return Ss(e)||zs(e)||!!(Ro&&e&&e[Ro])}function Gn(e,t){var r=typeof e;return!!(t=null==t?Z:t)&&("number"==r||"symbol"!=r&&it.test(e))&&e>-1&&e%1==0&&e<t}function Wn(e,t,r){if(!Ii(r))return!1;var n=typeof t;return!!("number"==n?Ti(r)&&Gn(t,r.length):"string"==n&&t in r)&&Di(r[t],e)}function Xn(e,t){if(Ss(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!Fi(e))||Re.test(e)||!Fe.test(e)||null!=t&&e in go(t)}function Vn(e){var t=Bn(e),r=C[t];if("function"!=typeof r||!(t in ct.prototype))return!1;if(e===r)return!0;var n=Ma(r);return!!n&&e===n[0]}function Yn(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ko)}function Kn(e){return e==e&&!Ii(e)}function Jn(e,t){return function(r){return null!=r&&r[e]===t&&(t!==G||e in go(r))}}function Zn(e,t,n){return t=ea(t===G?e.length-1:t,0),function(){for(var i=arguments,o=-1,a=ea(i.length-t,0),s=uo(a);++o<a;)s[o]=i[t+o];o=-1;for(var c=uo(t+1);++o<t;)c[o]=i[o];return c[t]=n(s),r(e,this,c)}}function Qn(e,t){return t.length<2?e:Ft(e,Ir(t,0,-1))}function ei(e,t){for(var r=e.length,n=ta(t.length,r),i=on(e);n--;){var o=t[n];e[n]=Gn(o,r)?i[o]:G}return e}function ti(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function ri(e,t,r){var n=t+"";return Fa(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(We,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return i(te,(function(r){var n="_."+r[0];t&r[1]&&!c(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(Xe);return t?t[1].split(Ve):[]}(n),r)))}function ni(e){var t=0,r=0;return function(){var n=ra(),i=16-(n-r);if(r=n,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(G,arguments)}}function ii(e,t){var r=-1,n=e.length,i=n-1;for(t=t===G?n:t;++r<t;){var o=Dr(r,i),a=e[o];e[o]=e[r],e[r]=a}return e.length=t,e}function oi(e){if("string"==typeof e||Fi(e))return e;var t=e+"";return"0"==t&&1/e==-J?"-0":t}function ai(e){if(null!=e){try{return zo.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function si(e){if(e instanceof ct)return e.clone();var t=new Ye(e.__wrapped__,e.__chain__);return t.__actions__=on(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function ci(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:qi(r);return i<0&&(i=ea(n+i,0)),v(e,jn(t,3),i)}function li(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=n-1;return r!==G&&(i=qi(r),i=r<0?ea(n+i,0):ta(i,n-1)),v(e,jn(t,3),i,!0)}function ui(e){return null!=e&&e.length?Lt(e,1):[]}function pi(e){return e&&e.length?e[0]:G}function di(e){var t=null==e?0:e.length;return t?e[t-1]:G}function mi(e,t){return e&&e.length&&t&&t.length?Sr(e,t):e}function fi(e){return null==e?e:oa.call(e)}function hi(e){if(!e||!e.length)return[];var t=0;return e=s(e,(function(e){if($i(e))return t=ea(e.length,t),!0})),A(t,(function(t){return u(e,k(t))}))}function gi(e,t){if(!e||!e.length)return[];var n=hi(e);return null==t?n:u(n,(function(e){return r(t,G,e)}))}function vi(e){var t=C(e);return t.__chain__=!0,t}function bi(e,t){return t(e)}function yi(e,t){return(Ss(e)?i:Ca)(e,jn(t,3))}function xi(e,t){return(Ss(e)?o:za)(e,jn(t,3))}function wi(e,t){return(Ss(e)?u:br)(e,jn(t,3))}function ki(e,t,r){return t=r?G:t,t=e&&null==t?e.length:t,Tn(e,K,G,G,G,G,t)}function Ci(e,t){var r;if("function"!=typeof t)throw new yo(W);return e=qi(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=G),r}}function zi(e,t,r){function n(t){var r=l,n=u;return l=u=G,h=t,d=e.apply(n,r)}function i(e){return h=e,m=ja(a,t),g?n(e):d}function o(e){var r=e-f;return f===G||r>=t||r<0||v&&e-h>=p}function a(){var e=ms();return o(e)?s(e):(m=ja(a,function(e){var r=t-(e-f);return v?ta(r,p-(e-h)):r}(e)),G)}function s(e){return m=G,b&&l?n(e):(l=u=G,d)}function c(){var e=ms(),r=o(e);if(l=arguments,u=this,f=e,r){if(m===G)return i(f);if(v)return _a(m),m=ja(a,t),n(f)}return m===G&&(m=ja(a,t)),d}var l,u,p,d,m,f,h=0,g=!1,v=!1,b=!0;if("function"!=typeof e)throw new yo(W);return t=Ui(t)||0,Ii(r)&&(g=!!r.leading,p=(v="maxWait"in r)?ea(Ui(r.maxWait)||0,t):p,b="trailing"in r?!!r.trailing:b),c.cancel=function(){m!==G&&_a(m),h=0,l=f=u=m=G},c.flush=function(){return m===G?d:s(ms())},c}function Si(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new yo(W);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(Si.Cache||pt),r}function Ai(e){if("function"!=typeof e)throw new yo(W);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Di(e,t){return e===t||e!=e&&t!=t}function Ti(e){return null!=e&&Li(e.length)&&!Ei(e)}function $i(e){return Oi(e)&&Ti(e)}function _i(e){if(!Oi(e))return!1;var t=Nt(e);return t==ae||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Pi(e)}function Ei(e){if(!Ii(e))return!1;var t=Nt(e);return t==se||t==ce||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Mi(e){return"number"==typeof e&&e==qi(e)}function Li(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Z}function Ii(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Oi(e){return null!=e&&"object"==typeof e}function Bi(e){return"number"==typeof e||Oi(e)&&Nt(e)==ue}function Pi(e){if(!Oi(e)||Nt(e)!=pe)return!1;var t=Bo(e);if(null===t)return!0;var r=So.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&zo.call(r)==$o}function ji(e){return"string"==typeof e||!Ss(e)&&Oi(e)&&Nt(e)==he}function Fi(e){return"symbol"==typeof e||Oi(e)&&Nt(e)==ge}function Ri(e){if(!e)return[];if(Ti(e))return ji(e)?q(e):on(e);if(No&&e[No])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[No]());var t=Oa(e);return(t==le?P:t==fe?R:Zi)(e)}function Ni(e){return e?(e=Ui(e))===J||e===-J?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function qi(e){var t=Ni(e),r=t%1;return t==t?r?t-r:t:0}function Hi(e){return e?St(qi(e),0,ee):0}function Ui(e){if("number"==typeof e)return e;if(Fi(e))return Q;if(Ii(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ii(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=D(e);var r=tt.test(e);return r||nt.test(e)?Vt(e.slice(2),r?2:8):et.test(e)?Q:+e}function Gi(e){return an(e,Ki(e))}function Wi(e){return null==e?"":Rr(e)}function Xi(e,t,r){var n=null==e?G:Ft(e,t);return n===G?r:n}function Vi(e,t){return null!=e&&qn(e,t,Kt)}function Yi(e){return Ti(e)?ft(e):gr(e)}function Ki(e){return Ti(e)?ft(e,!0):function(e){if(!Ii(e))return function(e){var t=[];if(null!=e)for(var r in go(e))t.push(r);return t}(e);var t=Yn(e),r=[];for(var n in e)("constructor"!=n||!t&&So.call(e,n))&&r.push(n);return r}(e)}function Ji(e,t){if(null==e)return{};var r=u(On(e),(function(e){return[e]}));return t=jn(t),zr(e,r,(function(e,r){return t(e,r[0])}))}function Zi(e){return null==e?[]:$(e,Yi(e))}function Qi(e){return ic(Wi(e).toLowerCase())}function eo(e){return(e=Wi(e))&&e.replace(ot,ur).replace(Pt,"")}function to(e,t,r){return e=Wi(e),(t=r?G:t)===G?B(e)?U(e):h(e):e.match(t)||[]}function ro(e){return function(){return e}}function no(e){return e}function io(e){return hr("function"==typeof e?e:At(e,1))}function oo(e,t,r){var n=Yi(t),o=jt(t,n);null!=r||Ii(t)&&(o.length||!n.length)||(r=t,t=e,e=this,o=jt(t,Yi(t)));var a=!(Ii(r)&&"chain"in r&&!r.chain),s=Ei(e);return i(o,(function(r){var n=t[r];e[r]=n,s&&(e.prototype[r]=function(){var t=this.__chain__;if(a||t){var r=e(this.__wrapped__);return(r.__actions__=on(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,p([this.value()],arguments))})})),e}function ao(){}function so(e){return Xn(e)?k(oi(e)):function(e){return function(t){return Ft(t,e)}}(e)}function co(){return[]}function lo(){return!1}var uo=(t=null==t?Jt:mr.defaults(Jt.Object(),t,mr.pick(Jt,qt))).Array,po=t.Date,mo=t.Error,fo=t.Function,ho=t.Math,go=t.Object,vo=t.RegExp,bo=t.String,yo=t.TypeError,xo=uo.prototype,wo=fo.prototype,ko=go.prototype,Co=t["__core-js_shared__"],zo=wo.toString,So=ko.hasOwnProperty,Ao=0,Do=function(){var e=/[^.]+$/.exec(Co&&Co.keys&&Co.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),To=ko.toString,$o=zo.call(go),_o=Jt._,Eo=vo("^"+zo.call(So).replace(qe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Mo=er?t.Buffer:G,Lo=t.Symbol,Io=t.Uint8Array,Oo=Mo?Mo.allocUnsafe:G,Bo=j(go.getPrototypeOf,go),Po=go.create,jo=ko.propertyIsEnumerable,Fo=xo.splice,Ro=Lo?Lo.isConcatSpreadable:G,No=Lo?Lo.iterator:G,qo=Lo?Lo.toStringTag:G,Ho=function(){try{var e=Nn(go,"defineProperty");return e({},"",{}),e}catch(e){}}(),Uo=t.clearTimeout!==Jt.clearTimeout&&t.clearTimeout,Go=po&&po.now!==Jt.Date.now&&po.now,Wo=t.setTimeout!==Jt.setTimeout&&t.setTimeout,Xo=ho.ceil,Vo=ho.floor,Yo=go.getOwnPropertySymbols,Ko=Mo?Mo.isBuffer:G,Jo=t.isFinite,Zo=xo.join,Qo=j(go.keys,go),ea=ho.max,ta=ho.min,ra=po.now,na=t.parseInt,ia=ho.random,oa=xo.reverse,aa=Nn(t,"DataView"),sa=Nn(t,"Map"),ca=Nn(t,"Promise"),la=Nn(t,"Set"),ua=Nn(t,"WeakMap"),pa=Nn(go,"create"),da=ua&&new ua,ma={},fa=ai(aa),ha=ai(sa),ga=ai(ca),va=ai(la),ba=ai(ua),ya=Lo?Lo.prototype:G,xa=ya?ya.valueOf:G,wa=ya?ya.toString:G,ka=function(){function e(){}return function(t){if(!Ii(t))return{};if(Po)return Po(t);e.prototype=t;var r=new e;return e.prototype=G,r}}();C.templateSettings={escape:Be,evaluate:Pe,interpolate:je,variable:"",imports:{_:C}},C.prototype=Ge.prototype,C.prototype.constructor=C,Ye.prototype=ka(Ge.prototype),Ye.prototype.constructor=Ye,ct.prototype=ka(Ge.prototype),ct.prototype.constructor=ct,lt.prototype.clear=function(){this.__data__=pa?pa(null):{},this.size=0},lt.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},lt.prototype.get=function(e){var t=this.__data__;if(pa){var r=t[e];return r===X?G:r}return So.call(t,e)?t[e]:G},lt.prototype.has=function(e){var t=this.__data__;return pa?t[e]!==G:So.call(t,e)},lt.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=pa&&t===G?X:t,this},ut.prototype.clear=function(){this.__data__=[],this.size=0},ut.prototype.delete=function(e){var t=this.__data__,r=xt(t,e);return!(r<0||(r==t.length-1?t.pop():Fo.call(t,r,1),--this.size,0))},ut.prototype.get=function(e){var t=this.__data__,r=xt(t,e);return r<0?G:t[r][1]},ut.prototype.has=function(e){return xt(this.__data__,e)>-1},ut.prototype.set=function(e,t){var r=this.__data__,n=xt(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},pt.prototype.clear=function(){this.size=0,this.__data__={hash:new lt,map:new(sa||ut),string:new lt}},pt.prototype.delete=function(e){var t=Fn(this,e).delete(e);return this.size-=t?1:0,t},pt.prototype.get=function(e){return Fn(this,e).get(e)},pt.prototype.has=function(e){return Fn(this,e).has(e)},pt.prototype.set=function(e,t){var r=Fn(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},dt.prototype.add=dt.prototype.push=function(e){return this.__data__.set(e,X),this},dt.prototype.has=function(e){return this.__data__.has(e)},mt.prototype.clear=function(){this.__data__=new ut,this.size=0},mt.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},mt.prototype.get=function(e){return this.__data__.get(e)},mt.prototype.has=function(e){return this.__data__.has(e)},mt.prototype.set=function(e,t){var r=this.__data__;if(r instanceof ut){var n=r.__data__;if(!sa||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new pt(n)}return r.set(e,t),this.size=r.size,this};var Ca=ln(It),za=ln(Ot,!0),Sa=un(),Aa=un(!0),Da=da?function(e,t){return da.set(e,t),e}:no,Ta=Ho?function(e,t){return Ho(e,"toString",{configurable:!0,enumerable:!1,value:ro(t),writable:!0})}:no,$a=$r,_a=Uo||function(e){return Jt.clearTimeout(e)},Ea=la&&1/R(new la([,-0]))[1]==J?function(e){return new la(e)}:ao,Ma=da?function(e){return da.get(e)}:ao,La=Yo?function(e){return null==e?[]:(e=go(e),s(Yo(e),(function(t){return jo.call(e,t)})))}:co,Ia=Yo?function(e){for(var t=[];e;)p(t,La(e)),e=Bo(e);return t}:co,Oa=Nt;(aa&&Oa(new aa(new ArrayBuffer(1)))!=ye||sa&&Oa(new sa)!=le||ca&&Oa(ca.resolve())!=de||la&&Oa(new la)!=fe||ua&&Oa(new ua)!=ve)&&(Oa=function(e){var t=Nt(e),r=t==pe?e.constructor:G,n=r?ai(r):"";if(n)switch(n){case fa:return ye;case ha:return le;case ga:return de;case va:return fe;case ba:return ve}return t});var Ba=Co?Ei:lo,Pa=ni(Da),ja=Wo||function(e,t){return Jt.setTimeout(e,t)},Fa=ni(Ta),Ra=function(e){var t=Si((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Ne,(function(e,r,n,i){t.push(n?i.replace(Je,"$1"):r||e)})),t}),(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}(),Na=$r((function(e,t){return $i(e)?$t(e,Lt(t,1,$i,!0)):[]})),qa=$r((function(e,t){var r=di(t);return $i(r)&&(r=G),$i(e)?$t(e,Lt(t,1,$i,!0),jn(r,2)):[]})),Ha=$r((function(e,t){var r=di(t);return $i(r)&&(r=G),$i(e)?$t(e,Lt(t,1,$i,!0),G,r):[]})),Ua=$r((function(e){var t=u(e,Vr);return t.length&&t[0]===e[0]?Zt(t):[]})),Ga=$r((function(e){var t=di(e),r=u(e,Vr);return t===di(r)?t=G:r.pop(),r.length&&r[0]===e[0]?Zt(r,jn(t,2)):[]})),Wa=$r((function(e){var t=di(e),r=u(e,Vr);return(t="function"==typeof t?t:G)&&r.pop(),r.length&&r[0]===e[0]?Zt(r,G,t):[]})),Xa=$r(mi),Va=Ln((function(e,t){var r=null==e?0:e.length,n=zt(e,t);return Ar(e,u(t,(function(e){return Gn(e,r)?+e:e})).sort(tn)),n})),Ya=$r((function(e){return Nr(Lt(e,1,$i,!0))})),Ka=$r((function(e){var t=di(e);return $i(t)&&(t=G),Nr(Lt(e,1,$i,!0),jn(t,2))})),Ja=$r((function(e){var t=di(e);return t="function"==typeof t?t:G,Nr(Lt(e,1,$i,!0),G,t)})),Za=$r((function(e,t){return $i(e)?$t(e,t):[]})),Qa=$r((function(e){return Wr(s(e,$i))})),es=$r((function(e){var t=di(e);return $i(t)&&(t=G),Wr(s(e,$i),jn(t,2))})),ts=$r((function(e){var t=di(e);return t="function"==typeof t?t:G,Wr(s(e,$i),G,t)})),rs=$r(hi),ns=$r((function(e){var t=e.length,r=t>1?e[t-1]:G;return r="function"==typeof r?(e.pop(),r):G,gi(e,r)})),is=Ln((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,i=function(t){return zt(t,e)};return!(t>1||this.__actions__.length)&&n instanceof ct&&Gn(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:bi,args:[i],thisArg:G}),new Ye(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(G),e}))):this.thru(i)})),os=sn((function(e,t,r){So.call(e,r)?++e[r]:Ct(e,r,1)})),as=hn(ci),ss=hn(li),cs=sn((function(e,t,r){So.call(e,r)?e[r].push(t):Ct(e,r,[t])})),ls=$r((function(e,t,n){var i=-1,o="function"==typeof t,a=Ti(e)?uo(e.length):[];return Ca(e,(function(e){a[++i]=o?r(t,e,n):Qt(e,t,n)})),a})),us=sn((function(e,t,r){Ct(e,r,t)})),ps=sn((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]})),ds=$r((function(e,t){if(null==e)return[];var r=t.length;return r>1&&Wn(e,t[0],t[1])?t=[]:r>2&&Wn(t[0],t[1],t[2])&&(t=[t[0]]),Cr(e,Lt(t,1),[])})),ms=Go||function(){return Jt.Date.now()},fs=$r((function(e,t,r){var n=1;if(r.length){var i=F(r,Pn(fs));n|=Y}return Tn(e,n,t,r,i)})),hs=$r((function(e,t,r){var n=3;if(r.length){var i=F(r,Pn(hs));n|=Y}return Tn(t,n,e,r,i)})),gs=$r((function(e,t){return Tt(e,1,t)})),vs=$r((function(e,t,r){return Tt(e,Ui(t)||0,r)}));Si.Cache=pt;var bs=$a((function(e,t){var n=(t=1==t.length&&Ss(t[0])?u(t[0],T(jn())):u(Lt(t,1),T(jn()))).length;return $r((function(i){for(var o=-1,a=ta(i.length,n);++o<a;)i[o]=t[o].call(this,i[o]);return r(e,this,i)}))})),ys=$r((function(e,t){return Tn(e,Y,G,t,F(t,Pn(ys)))})),xs=$r((function(e,t){return Tn(e,64,G,t,F(t,Pn(xs)))})),ws=Ln((function(e,t){return Tn(e,256,G,G,G,t)})),ks=zn(Wt),Cs=zn((function(e,t){return e>=t})),zs=tr(function(){return arguments}())?tr:function(e){return Oi(e)&&So.call(e,"callee")&&!jo.call(e,"callee")},Ss=uo.isArray,As=nr?T(nr):function(e){return Oi(e)&&Nt(e)==be},Ds=Ko||lo,Ts=ir?T(ir):function(e){return Oi(e)&&Nt(e)==oe},$s=or?T(or):function(e){return Oi(e)&&Oa(e)==le},_s=ar?T(ar):function(e){return Oi(e)&&Nt(e)==me},Es=sr?T(sr):function(e){return Oi(e)&&Oa(e)==fe},Ms=cr?T(cr):function(e){return Oi(e)&&Li(e.length)&&!!Ut[Nt(e)]},Ls=zn(vr),Is=zn((function(e,t){return e<=t})),Os=cn((function(e,t){if(Yn(t)||Ti(t))return an(t,Yi(t),e),G;for(var r in t)So.call(t,r)&&yt(e,r,t[r])})),Bs=cn((function(e,t){an(t,Ki(t),e)})),Ps=cn((function(e,t,r,n){an(t,Ki(t),e,n)})),js=cn((function(e,t,r,n){an(t,Yi(t),e,n)})),Fs=Ln(zt),Rs=$r((function(e,t){e=go(e);var r=-1,n=t.length,i=n>2?t[2]:G;for(i&&Wn(t[0],t[1],i)&&(n=1);++r<n;)for(var o=t[r],a=Ki(o),s=-1,c=a.length;++s<c;){var l=a[s],u=e[l];(u===G||Di(u,ko[l])&&!So.call(e,l))&&(e[l]=o[l])}return e})),Ns=$r((function(e){return e.push(G,_n),r(Ws,G,e)})),qs=bn((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=To.call(t)),e[t]=r}),ro(no)),Hs=bn((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=To.call(t)),So.call(e,t)?e[t].push(r):e[t]=[r]}),jn),Us=$r(Qt),Gs=cn((function(e,t,r){wr(e,t,r)})),Ws=cn((function(e,t,r,n){wr(e,t,r,n)})),Xs=Ln((function(e,t){var r={};if(null==e)return r;var n=!1;t=u(t,(function(t){return t=Kr(t,e),n||(n=t.length>1),t})),an(e,On(e),r),n&&(r=At(r,7,En));for(var i=t.length;i--;)qr(r,t[i]);return r})),Vs=Ln((function(e,t){return null==e?{}:function(e,t){return zr(e,t,(function(t,r){return Vi(e,r)}))}(e,t)})),Ys=Dn(Yi),Ks=Dn(Ki),Js=dn((function(e,t,r){return t=t.toLowerCase(),e+(r?Qi(t):t)})),Zs=dn((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),Qs=dn((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),ec=pn("toLowerCase"),tc=dn((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()})),rc=dn((function(e,t,r){return e+(r?" ":"")+ic(t)})),nc=dn((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),ic=pn("toUpperCase"),oc=$r((function(e,t){try{return r(e,G,t)}catch(e){return _i(e)?e:new mo(e)}})),ac=Ln((function(e,t){return i(t,(function(t){t=oi(t),Ct(e,t,fs(e[t],e))})),e})),sc=gn(),cc=gn(!0),lc=$r((function(e,t){return function(r){return Qt(r,e,t)}})),uc=$r((function(e,t){return function(r){return Qt(e,r,t)}})),pc=xn(u),dc=xn(a),mc=xn(f),fc=Cn(),hc=Cn(!0),gc=yn((function(e,t){return e+t}),0),vc=An("ceil"),bc=yn((function(e,t){return e/t}),1),yc=An("floor"),xc=yn((function(e,t){return e*t}),1),wc=An("round"),kc=yn((function(e,t){return e-t}),0);return C.after=function(e,t){if("function"!=typeof t)throw new yo(W);return e=qi(e),function(){if(--e<1)return t.apply(this,arguments)}},C.ary=ki,C.assign=Os,C.assignIn=Bs,C.assignInWith=Ps,C.assignWith=js,C.at=Fs,C.before=Ci,C.bind=fs,C.bindAll=ac,C.bindKey=hs,C.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ss(e)?e:[e]},C.chain=vi,C.chunk=function(e,t,r){t=(r?Wn(e,t,r):t===G)?1:ea(qi(t),0);var n=null==e?0:e.length;if(!n||t<1)return[];for(var i=0,o=0,a=uo(Xo(n/t));i<n;)a[o++]=Ir(e,i,i+=t);return a},C.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,i=[];++t<r;){var o=e[t];o&&(i[n++]=o)}return i},C.concat=function(){var e=arguments.length;if(!e)return[];for(var t=uo(e-1),r=arguments[0],n=e;n--;)t[n-1]=arguments[n];return p(Ss(r)?on(r):[r],Lt(t,1))},C.cond=function(e){var t=null==e?0:e.length,n=jn();return e=t?u(e,(function(e){if("function"!=typeof e[1])throw new yo(W);return[n(e[0]),e[1]]})):[],$r((function(n){for(var i=-1;++i<t;){var o=e[i];if(r(o[0],this,n))return r(o[1],this,n)}}))},C.conforms=function(e){return function(e){var t=Yi(e);return function(r){return Dt(r,e,t)}}(At(e,1))},C.constant=ro,C.countBy=os,C.create=function(e,t){var r=ka(e);return null==t?r:kt(r,t)},C.curry=function e(t,r,n){var i=Tn(t,8,G,G,G,G,G,r=n?G:r);return i.placeholder=e.placeholder,i},C.curryRight=function e(t,r,n){var i=Tn(t,16,G,G,G,G,G,r=n?G:r);return i.placeholder=e.placeholder,i},C.debounce=zi,C.defaults=Rs,C.defaultsDeep=Ns,C.defer=gs,C.delay=vs,C.difference=Na,C.differenceBy=qa,C.differenceWith=Ha,C.drop=function(e,t,r){var n=null==e?0:e.length;return n?Ir(e,(t=r||t===G?1:qi(t))<0?0:t,n):[]},C.dropRight=function(e,t,r){var n=null==e?0:e.length;return n?Ir(e,0,(t=n-(t=r||t===G?1:qi(t)))<0?0:t):[]},C.dropRightWhile=function(e,t){return e&&e.length?Ur(e,jn(t,3),!0,!0):[]},C.dropWhile=function(e,t){return e&&e.length?Ur(e,jn(t,3),!0):[]},C.fill=function(e,t,r,n){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&Wn(e,t,r)&&(r=0,n=i),function(e,t,r,n){var i=e.length;for((r=qi(r))<0&&(r=-r>i?0:i+r),(n=n===G||n>i?i:qi(n))<0&&(n+=i),n=r>n?0:Hi(n);r<n;)e[r++]=t;return e}(e,t,r,n)):[]},C.filter=function(e,t){return(Ss(e)?s:Mt)(e,jn(t,3))},C.flatMap=function(e,t){return Lt(wi(e,t),1)},C.flatMapDeep=function(e,t){return Lt(wi(e,t),J)},C.flatMapDepth=function(e,t,r){return r=r===G?1:qi(r),Lt(wi(e,t),r)},C.flatten=ui,C.flattenDeep=function(e){return null!=e&&e.length?Lt(e,J):[]},C.flattenDepth=function(e,t){return null!=e&&e.length?Lt(e,t=t===G?1:qi(t)):[]},C.flip=function(e){return Tn(e,512)},C.flow=sc,C.flowRight=cc,C.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var i=e[t];n[i[0]]=i[1]}return n},C.functions=function(e){return null==e?[]:jt(e,Yi(e))},C.functionsIn=function(e){return null==e?[]:jt(e,Ki(e))},C.groupBy=cs,C.initial=function(e){return null!=e&&e.length?Ir(e,0,-1):[]},C.intersection=Ua,C.intersectionBy=Ga,C.intersectionWith=Wa,C.invert=qs,C.invertBy=Hs,C.invokeMap=ls,C.iteratee=io,C.keyBy=us,C.keys=Yi,C.keysIn=Ki,C.map=wi,C.mapKeys=function(e,t){var r={};return t=jn(t,3),It(e,(function(e,n,i){Ct(r,t(e,n,i),e)})),r},C.mapValues=function(e,t){var r={};return t=jn(t,3),It(e,(function(e,n,i){Ct(r,n,t(e,n,i))})),r},C.matches=function(e){return yr(At(e,1))},C.matchesProperty=function(e,t){return xr(e,At(t,1))},C.memoize=Si,C.merge=Gs,C.mergeWith=Ws,C.method=lc,C.methodOf=uc,C.mixin=oo,C.negate=Ai,C.nthArg=function(e){return e=qi(e),$r((function(t){return kr(t,e)}))},C.omit=Xs,C.omitBy=function(e,t){return Ji(e,Ai(jn(t)))},C.once=function(e){return Ci(2,e)},C.orderBy=function(e,t,r,n){return null==e?[]:(Ss(t)||(t=null==t?[]:[t]),Ss(r=n?G:r)||(r=null==r?[]:[r]),Cr(e,t,r))},C.over=pc,C.overArgs=bs,C.overEvery=dc,C.overSome=mc,C.partial=ys,C.partialRight=xs,C.partition=ps,C.pick=Vs,C.pickBy=Ji,C.property=so,C.propertyOf=function(e){return function(t){return null==e?G:Ft(e,t)}},C.pull=Xa,C.pullAll=mi,C.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?Sr(e,t,jn(r,2)):e},C.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Sr(e,t,G,r):e},C.pullAt=Va,C.range=fc,C.rangeRight=hc,C.rearg=ws,C.reject=function(e,t){return(Ss(e)?s:Mt)(e,Ai(jn(t,3)))},C.remove=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,i=[],o=e.length;for(t=jn(t,3);++n<o;){var a=e[n];t(a,n,e)&&(r.push(a),i.push(n))}return Ar(e,i),r},C.rest=function(e,t){if("function"!=typeof e)throw new yo(W);return $r(e,t=t===G?t:qi(t))},C.reverse=fi,C.sampleSize=function(e,t,r){return t=(r?Wn(e,t,r):t===G)?1:qi(t),(Ss(e)?gt:Er)(e,t)},C.set=function(e,t,r){return null==e?e:Mr(e,t,r)},C.setWith=function(e,t,r,n){return n="function"==typeof n?n:G,null==e?e:Mr(e,t,r,n)},C.shuffle=function(e){return(Ss(e)?vt:Lr)(e)},C.slice=function(e,t,r){var n=null==e?0:e.length;return n?(r&&"number"!=typeof r&&Wn(e,t,r)?(t=0,r=n):(t=null==t?0:qi(t),r=r===G?n:qi(r)),Ir(e,t,r)):[]},C.sortBy=ds,C.sortedUniq=function(e){return e&&e.length?jr(e):[]},C.sortedUniqBy=function(e,t){return e&&e.length?jr(e,jn(t,2)):[]},C.split=function(e,t,r){return r&&"number"!=typeof r&&Wn(e,t,r)&&(t=r=G),(r=r===G?ee:r>>>0)?(e=Wi(e))&&("string"==typeof t||null!=t&&!_s(t))&&!(t=Rr(t))&&O(e)?Jr(q(e),0,r):e.split(t,r):[]},C.spread=function(e,t){if("function"!=typeof e)throw new yo(W);return t=null==t?0:ea(qi(t),0),$r((function(n){var i=n[t],o=Jr(n,0,t);return i&&p(o,i),r(e,this,o)}))},C.tail=function(e){var t=null==e?0:e.length;return t?Ir(e,1,t):[]},C.take=function(e,t,r){return e&&e.length?Ir(e,0,(t=r||t===G?1:qi(t))<0?0:t):[]},C.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?Ir(e,(t=n-(t=r||t===G?1:qi(t)))<0?0:t,n):[]},C.takeRightWhile=function(e,t){return e&&e.length?Ur(e,jn(t,3),!1,!0):[]},C.takeWhile=function(e,t){return e&&e.length?Ur(e,jn(t,3)):[]},C.tap=function(e,t){return t(e),e},C.throttle=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new yo(W);return Ii(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),zi(e,t,{leading:n,maxWait:t,trailing:i})},C.thru=bi,C.toArray=Ri,C.toPairs=Ys,C.toPairsIn=Ks,C.toPath=function(e){return Ss(e)?u(e,oi):Fi(e)?[e]:on(Ra(Wi(e)))},C.toPlainObject=Gi,C.transform=function(e,t,r){var n=Ss(e),o=n||Ds(e)||Ms(e);if(t=jn(t,4),null==r){var a=e&&e.constructor;r=o?n?new a:[]:Ii(e)&&Ei(a)?ka(Bo(e)):{}}return(o?i:It)(e,(function(e,n,i){return t(r,e,n,i)})),r},C.unary=function(e){return ki(e,1)},C.union=Ya,C.unionBy=Ka,C.unionWith=Ja,C.uniq=function(e){return e&&e.length?Nr(e):[]},C.uniqBy=function(e,t){return e&&e.length?Nr(e,jn(t,2)):[]},C.uniqWith=function(e,t){return t="function"==typeof t?t:G,e&&e.length?Nr(e,G,t):[]},C.unset=function(e,t){return null==e||qr(e,t)},C.unzip=hi,C.unzipWith=gi,C.update=function(e,t,r){return null==e?e:Hr(e,t,Yr(r))},C.updateWith=function(e,t,r,n){return n="function"==typeof n?n:G,null==e?e:Hr(e,t,Yr(r),n)},C.values=Zi,C.valuesIn=function(e){return null==e?[]:$(e,Ki(e))},C.without=Za,C.words=to,C.wrap=function(e,t){return ys(Yr(t),e)},C.xor=Qa,C.xorBy=es,C.xorWith=ts,C.zip=rs,C.zipObject=function(e,t){return Xr(e||[],t||[],yt)},C.zipObjectDeep=function(e,t){return Xr(e||[],t||[],Mr)},C.zipWith=ns,C.entries=Ys,C.entriesIn=Ks,C.extend=Bs,C.extendWith=Ps,oo(C,C),C.add=gc,C.attempt=oc,C.camelCase=Js,C.capitalize=Qi,C.ceil=vc,C.clamp=function(e,t,r){return r===G&&(r=t,t=G),r!==G&&(r=(r=Ui(r))==r?r:0),t!==G&&(t=(t=Ui(t))==t?t:0),St(Ui(e),t,r)},C.clone=function(e){return At(e,4)},C.cloneDeep=function(e){return At(e,5)},C.cloneDeepWith=function(e,t){return At(e,5,t="function"==typeof t?t:G)},C.cloneWith=function(e,t){return At(e,4,t="function"==typeof t?t:G)},C.conformsTo=function(e,t){return null==t||Dt(e,t,Yi(t))},C.deburr=eo,C.defaultTo=function(e,t){return null==e||e!=e?t:e},C.divide=bc,C.endsWith=function(e,t,r){e=Wi(e),t=Rr(t);var n=e.length,i=r=r===G?n:St(qi(r),0,n);return(r-=t.length)>=0&&e.slice(r,i)==t},C.eq=Di,C.escape=function(e){return(e=Wi(e))&&Oe.test(e)?e.replace(Le,pr):e},C.escapeRegExp=function(e){return(e=Wi(e))&&He.test(e)?e.replace(qe,"\\$&"):e},C.every=function(e,t,r){var n=Ss(e)?a:_t;return r&&Wn(e,t,r)&&(t=G),n(e,jn(t,3))},C.find=as,C.findIndex=ci,C.findKey=function(e,t){return g(e,jn(t,3),It)},C.findLast=ss,C.findLastIndex=li,C.findLastKey=function(e,t){return g(e,jn(t,3),Ot)},C.floor=yc,C.forEach=yi,C.forEachRight=xi,C.forIn=function(e,t){return null==e?e:Sa(e,jn(t,3),Ki)},C.forInRight=function(e,t){return null==e?e:Aa(e,jn(t,3),Ki)},C.forOwn=function(e,t){return e&&It(e,jn(t,3))},C.forOwnRight=function(e,t){return e&&Ot(e,jn(t,3))},C.get=Xi,C.gt=ks,C.gte=Cs,C.has=function(e,t){return null!=e&&qn(e,t,Yt)},C.hasIn=Vi,C.head=pi,C.identity=no,C.includes=function(e,t,r,n){e=Ti(e)?e:Zi(e),r=r&&!n?qi(r):0;var i=e.length;return r<0&&(r=ea(i+r,0)),ji(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&b(e,t,r)>-1},C.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:qi(r);return i<0&&(i=ea(n+i,0)),b(e,t,i)},C.inRange=function(e,t,r){return t=Ni(t),r===G?(r=t,t=0):r=Ni(r),function(e,t,r){return e>=ta(t,r)&&e<ea(t,r)}(e=Ui(e),t,r)},C.invoke=Us,C.isArguments=zs,C.isArray=Ss,C.isArrayBuffer=As,C.isArrayLike=Ti,C.isArrayLikeObject=$i,C.isBoolean=function(e){return!0===e||!1===e||Oi(e)&&Nt(e)==ie},C.isBuffer=Ds,C.isDate=Ts,C.isElement=function(e){return Oi(e)&&1===e.nodeType&&!Pi(e)},C.isEmpty=function(e){if(null==e)return!0;if(Ti(e)&&(Ss(e)||"string"==typeof e||"function"==typeof e.splice||Ds(e)||Ms(e)||zs(e)))return!e.length;var t=Oa(e);if(t==le||t==fe)return!e.size;if(Yn(e))return!gr(e).length;for(var r in e)if(So.call(e,r))return!1;return!0},C.isEqual=function(e,t){return rr(e,t)},C.isEqualWith=function(e,t,r){var n=(r="function"==typeof r?r:G)?r(e,t):G;return n===G?rr(e,t,G,r):!!n},C.isError=_i,C.isFinite=function(e){return"number"==typeof e&&Jo(e)},C.isFunction=Ei,C.isInteger=Mi,C.isLength=Li,C.isMap=$s,C.isMatch=function(e,t){return e===t||lr(e,t,Rn(t))},C.isMatchWith=function(e,t,r){return r="function"==typeof r?r:G,lr(e,t,Rn(t),r)},C.isNaN=function(e){return Bi(e)&&e!=+e},C.isNative=function(e){if(Ba(e))throw new mo("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return fr(e)},C.isNil=function(e){return null==e},C.isNull=function(e){return null===e},C.isNumber=Bi,C.isObject=Ii,C.isObjectLike=Oi,C.isPlainObject=Pi,C.isRegExp=_s,C.isSafeInteger=function(e){return Mi(e)&&e>=-Z&&e<=Z},C.isSet=Es,C.isString=ji,C.isSymbol=Fi,C.isTypedArray=Ms,C.isUndefined=function(e){return e===G},C.isWeakMap=function(e){return Oi(e)&&Oa(e)==ve},C.isWeakSet=function(e){return Oi(e)&&"[object WeakSet]"==Nt(e)},C.join=function(e,t){return null==e?"":Zo.call(e,t)},C.kebabCase=Zs,C.last=di,C.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=n;return r!==G&&(i=(i=qi(r))<0?ea(n+i,0):ta(i,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,i):v(e,x,i,!0)},C.lowerCase=Qs,C.lowerFirst=ec,C.lt=Ls,C.lte=Is,C.max=function(e){return e&&e.length?Et(e,no,Wt):G},C.maxBy=function(e,t){return e&&e.length?Et(e,jn(t,2),Wt):G},C.mean=function(e){return w(e,no)},C.meanBy=function(e,t){return w(e,jn(t,2))},C.min=function(e){return e&&e.length?Et(e,no,vr):G},C.minBy=function(e,t){return e&&e.length?Et(e,jn(t,2),vr):G},C.stubArray=co,C.stubFalse=lo,C.stubObject=function(){return{}},C.stubString=function(){return""},C.stubTrue=function(){return!0},C.multiply=xc,C.nth=function(e,t){return e&&e.length?kr(e,qi(t)):G},C.noConflict=function(){return Jt._===this&&(Jt._=_o),this},C.noop=ao,C.now=ms,C.pad=function(e,t,r){e=Wi(e);var n=(t=qi(t))?N(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return wn(Vo(i),r)+e+wn(Xo(i),r)},C.padEnd=function(e,t,r){e=Wi(e);var n=(t=qi(t))?N(e):0;return t&&n<t?e+wn(t-n,r):e},C.padStart=function(e,t,r){e=Wi(e);var n=(t=qi(t))?N(e):0;return t&&n<t?wn(t-n,r)+e:e},C.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),na(Wi(e).replace(Ue,""),t||0)},C.random=function(e,t,r){if(r&&"boolean"!=typeof r&&Wn(e,t,r)&&(t=r=G),r===G&&("boolean"==typeof t?(r=t,t=G):"boolean"==typeof e&&(r=e,e=G)),e===G&&t===G?(e=0,t=1):(e=Ni(e),t===G?(t=e,e=0):t=Ni(t)),e>t){var n=e;e=t,t=n}if(r||e%1||t%1){var i=ia();return ta(e+i*(t-e+Xt("1e-"+((i+"").length-1))),t)}return Dr(e,t)},C.reduce=function(e,t,r){var n=Ss(e)?d:z,i=arguments.length<3;return n(e,jn(t,4),r,i,Ca)},C.reduceRight=function(e,t,r){var n=Ss(e)?m:z,i=arguments.length<3;return n(e,jn(t,4),r,i,za)},C.repeat=function(e,t,r){return t=(r?Wn(e,t,r):t===G)?1:qi(t),Tr(Wi(e),t)},C.replace=function(){var e=arguments,t=Wi(e[0]);return e.length<3?t:t.replace(e[1],e[2])},C.result=function(e,t,r){var n=-1,i=(t=Kr(t,e)).length;for(i||(i=1,e=G);++n<i;){var o=null==e?G:e[oi(t[n])];o===G&&(n=i,o=r),e=Ei(o)?o.call(e):o}return e},C.round=wc,C.runInContext=e,C.sample=function(e){return(Ss(e)?ht:_r)(e)},C.size=function(e){if(null==e)return 0;if(Ti(e))return ji(e)?N(e):e.length;var t=Oa(e);return t==le||t==fe?e.size:gr(e).length},C.snakeCase=tc,C.some=function(e,t,r){var n=Ss(e)?f:Or;return r&&Wn(e,t,r)&&(t=G),n(e,jn(t,3))},C.sortedIndex=function(e,t){return Br(e,t)},C.sortedIndexBy=function(e,t,r){return Pr(e,t,jn(r,2))},C.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=Br(e,t);if(n<r&&Di(e[n],t))return n}return-1},C.sortedLastIndex=function(e,t){return Br(e,t,!0)},C.sortedLastIndexBy=function(e,t,r){return Pr(e,t,jn(r,2),!0)},C.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var r=Br(e,t,!0)-1;if(Di(e[r],t))return r}return-1},C.startCase=rc,C.startsWith=function(e,t,r){return e=Wi(e),r=null==r?0:St(qi(r),0,e.length),t=Rr(t),e.slice(r,r+t.length)==t},C.subtract=kc,C.sum=function(e){return e&&e.length?S(e,no):0},C.sumBy=function(e,t){return e&&e.length?S(e,jn(t,2)):0},C.template=function(e,t,r){var n=C.templateSettings;r&&Wn(e,t,r)&&(t=G),e=Wi(e),t=Ps({},t,n,$n);var i,o,a=Ps({},t.imports,n.imports,$n),s=Yi(a),c=$(a,s),l=0,u=t.interpolate||at,p="__p += '",d=vo((t.escape||at).source+"|"+u.source+"|"+(u===je?Ze:at).source+"|"+(t.evaluate||at).source+"|$","g"),m="//# sourceURL="+(So.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ht+"]")+"\n";e.replace(d,(function(t,r,n,a,s,c){return n||(n=a),p+=e.slice(l,c).replace(st,I),r&&(i=!0,p+="' +\n__e("+r+") +\n'"),s&&(o=!0,p+="';\n"+s+";\n__p += '"),n&&(p+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),l=c+t.length,t})),p+="';\n";var f=So.call(t,"variable")&&t.variable;if(f){if(Ke.test(f))throw new mo("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(o?p.replace($e,""):p).replace(_e,"$1").replace(Ee,"$1;"),p="function("+(f||"obj")+") {\n"+(f?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var h=oc((function(){return fo(s,m+"return "+p).apply(G,c)}));if(h.source=p,_i(h))throw h;return h},C.times=function(e,t){if((e=qi(e))<1||e>Z)return[];var r=ee,n=ta(e,ee);t=jn(t),e-=ee;for(var i=A(n,t);++r<e;)t(r);return i},C.toFinite=Ni,C.toInteger=qi,C.toLength=Hi,C.toLower=function(e){return Wi(e).toLowerCase()},C.toNumber=Ui,C.toSafeInteger=function(e){return e?St(qi(e),-Z,Z):0===e?e:0},C.toString=Wi,C.toUpper=function(e){return Wi(e).toUpperCase()},C.trim=function(e,t,r){if((e=Wi(e))&&(r||t===G))return D(e);if(!e||!(t=Rr(t)))return e;var n=q(e),i=q(t);return Jr(n,E(n,i),M(n,i)+1).join("")},C.trimEnd=function(e,t,r){if((e=Wi(e))&&(r||t===G))return e.slice(0,H(e)+1);if(!e||!(t=Rr(t)))return e;var n=q(e);return Jr(n,0,M(n,q(t))+1).join("")},C.trimStart=function(e,t,r){if((e=Wi(e))&&(r||t===G))return e.replace(Ue,"");if(!e||!(t=Rr(t)))return e;var n=q(e);return Jr(n,E(n,q(t))).join("")},C.truncate=function(e,t){var r=30,n="...";if(Ii(t)){var i="separator"in t?t.separator:i;r="length"in t?qi(t.length):r,n="omission"in t?Rr(t.omission):n}var o=(e=Wi(e)).length;if(O(e)){var a=q(e);o=a.length}if(r>=o)return e;var s=r-N(n);if(s<1)return n;var c=a?Jr(a,0,s).join(""):e.slice(0,s);if(i===G)return c+n;if(a&&(s+=c.length-s),_s(i)){if(e.slice(s).search(i)){var l,u=c;for(i.global||(i=vo(i.source,Wi(Qe.exec(i))+"g")),i.lastIndex=0;l=i.exec(u);)var p=l.index;c=c.slice(0,p===G?s:p)}}else if(e.indexOf(Rr(i),s)!=s){var d=c.lastIndexOf(i);d>-1&&(c=c.slice(0,d))}return c+n},C.unescape=function(e){return(e=Wi(e))&&Ie.test(e)?e.replace(Me,dr):e},C.uniqueId=function(e){var t=++Ao;return Wi(e)+t},C.upperCase=nc,C.upperFirst=ic,C.each=yi,C.eachRight=xi,C.first=pi,oo(C,function(){var e={};return It(C,(function(t,r){So.call(C.prototype,r)||(e[r]=t)})),e}(),{chain:!1}),C.VERSION="4.17.21",i(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){C[e].placeholder=C})),i(["drop","take"],(function(e,t){ct.prototype[e]=function(r){r=r===G?1:ea(qi(r),0);var n=this.__filtered__&&!t?new ct(this):this.clone();return n.__filtered__?n.__takeCount__=ta(r,n.__takeCount__):n.__views__.push({size:ta(r,ee),type:e+(n.__dir__<0?"Right":"")}),n},ct.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),i(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;ct.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:jn(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),i(["head","last"],(function(e,t){var r="take"+(t?"Right":"");ct.prototype[e]=function(){return this[r](1).value()[0]}})),i(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");ct.prototype[e]=function(){return this.__filtered__?new ct(this):this[r](1)}})),ct.prototype.compact=function(){return this.filter(no)},ct.prototype.find=function(e){return this.filter(e).head()},ct.prototype.findLast=function(e){return this.reverse().find(e)},ct.prototype.invokeMap=$r((function(e,t){return"function"==typeof e?new ct(this):this.map((function(r){return Qt(r,e,t)}))})),ct.prototype.reject=function(e){return this.filter(Ai(jn(e)))},ct.prototype.slice=function(e,t){e=qi(e);var r=this;return r.__filtered__&&(e>0||t<0)?new ct(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==G&&(r=(t=qi(t))<0?r.dropRight(-t):r.take(t-e)),r)},ct.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},ct.prototype.toArray=function(){return this.take(ee)},It(ct.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),i=C[n?"take"+("last"==t?"Right":""):t],o=n||/^find/.test(t);i&&(C.prototype[t]=function(){var t=this.__wrapped__,a=n?[1]:arguments,s=t instanceof ct,c=a[0],l=s||Ss(t),u=function(e){var t=i.apply(C,p([e],a));return n&&d?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(s=l=!1);var d=this.__chain__,m=!!this.__actions__.length,f=o&&!d,h=s&&!m;if(!o&&l){t=h?t:new ct(this);var g=e.apply(t,a);return g.__actions__.push({func:bi,args:[u],thisArg:G}),new Ye(g,d)}return f&&h?e.apply(this,a):(g=this.thru(u),f?n?g.value()[0]:g.value():g)})})),i(["pop","push","shift","sort","splice","unshift"],(function(e){var t=xo[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);C.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(Ss(i)?i:[],e)}return this[r]((function(r){return t.apply(Ss(r)?r:[],e)}))}})),It(ct.prototype,(function(e,t){var r=C[t];if(r){var n=r.name+"";So.call(ma,n)||(ma[n]=[]),ma[n].push({name:t,func:r})}})),ma[vn(G,2).name]=[{name:"wrapper",func:G}],ct.prototype.clone=function(){var e=new ct(this.__wrapped__);return e.__actions__=on(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=on(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=on(this.__views__),e},ct.prototype.reverse=function(){if(this.__filtered__){var e=new ct(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},ct.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Ss(e),n=t<0,i=r?e.length:0,o=function(e,t,r){for(var n=-1,i=r.length;++n<i;){var o=r[n],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=ta(t,e+a);break;case"takeRight":e=ea(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,c=s-a,l=n?s:a-1,u=this.__iteratees__,p=u.length,d=0,m=ta(c,this.__takeCount__);if(!r||!n&&i==c&&m==c)return Gr(e,this.__actions__);var f=[];e:for(;c--&&d<m;){for(var h=-1,g=e[l+=t];++h<p;){var v=u[h],b=v.iteratee,y=v.type,x=b(g);if(2==y)g=x;else if(!x){if(1==y)continue e;break e}}f[d++]=g}return f},C.prototype.at=is,C.prototype.chain=function(){return vi(this)},C.prototype.commit=function(){return new Ye(this.value(),this.__chain__)},C.prototype.next=function(){this.__values__===G&&(this.__values__=Ri(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?G:this.__values__[this.__index__++]}},C.prototype.plant=function(e){for(var t,r=this;r instanceof Ge;){var n=si(r);n.__index__=0,n.__values__=G,t?i.__wrapped__=n:t=n;var i=n;r=r.__wrapped__}return i.__wrapped__=e,t},C.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof ct){var t=e;return this.__actions__.length&&(t=new ct(this)),(t=t.reverse()).__actions__.push({func:bi,args:[fi],thisArg:G}),new Ye(t,this.__chain__)}return this.thru(fi)},C.prototype.toJSON=C.prototype.valueOf=C.prototype.value=function(){return Gr(this.__wrapped__,this.__actions__)},C.prototype.first=C.prototype.head,No&&(C.prototype[No]=function(){return this}),C}();Qt?((Qt.exports=mr)._=mr,Zt._=mr):Jt._=mr}).call(Kc)})),uw=Zc((function(e,t){t.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"},t.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","rangeStep","rangeStepRight","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},t.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},t.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},t.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},t.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},t.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},t.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},t.realToAlias=function(){var e=Object.prototype.hasOwnProperty,r=t.aliasToReal,n={};for(var i in r){var o=r[i];e.call(n,o)?n[o].push(i):n[o]=[i]}return n}(),t.remap={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",rangeStep:"range",rangeStepRight:"rangeRight",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},t.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},t.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}})),pw={},dw=Array.prototype.push;function mw(e,t){return 2==t?function(t,r){return e(t,r)}:function(t){return e(t)}}function fw(e){for(var t=e?e.length:0,r=Array(t);t--;)r[t]=e[t];return r}function hw(e,t){return function(){var r=arguments.length;if(r){for(var n=Array(r);r--;)n[r]=arguments[r];var i=n[0]=t.apply(void 0,n);return e.apply(void 0,n),i}}}var gw=lw.runInContext(),vw=function e(t,r,n,i){var o="function"==typeof r,a=r===Object(r);if(a&&(i=n,n=r,r=void 0),null==n)throw new TypeError;i||(i={});var s=!("cap"in i)||i.cap,c=!("curry"in i)||i.curry,l=!("fixed"in i)||i.fixed,u=!("immutable"in i)||i.immutable,p=!("rearg"in i)||i.rearg,d=o?n:pw,m="curry"in i&&i.curry,f="fixed"in i&&i.fixed,h="rearg"in i&&i.rearg,g=o?n.runInContext():void 0,v=o?n:{ary:t.ary,assign:t.assign,clone:t.clone,curry:t.curry,forEach:t.forEach,isArray:t.isArray,isError:t.isError,isFunction:t.isFunction,isWeakMap:t.isWeakMap,iteratee:t.iteratee,keys:t.keys,rearg:t.rearg,toInteger:t.toInteger,toPath:t.toPath},b=v.ary,y=v.assign,x=v.clone,w=v.curry,k=v.forEach,C=v.isArray,z=v.isError,S=v.isFunction,A=v.isWeakMap,D=v.keys,T=v.rearg,$=v.toInteger,_=v.toPath,E=D(uw.aryMethod),M={castArray:function(e){return function(){var t=arguments[0];return C(t)?e(fw(t)):e.apply(void 0,arguments)}},iteratee:function(e){return function(){var t=arguments[0],r=arguments[1],n=e(t,r),i=n.length;return s&&"number"==typeof r?(r=r>2?r-2:1,i&&i<=r?n:mw(n,r)):n}},mixin:function(e){return function(t){var r=this;if(!S(r))return e(r,Object(t));var n=[];return k(D(t),(function(e){S(t[e])&&n.push([e,r.prototype[e]])})),e(r,Object(t)),k(n,(function(e){var t=e[1];S(t)?r.prototype[e[0]]=t:delete r.prototype[e[0]]})),r}},nthArg:function(e){return function(t){var r=t<0?1:$(t)+1;return w(e(t),r)}},rearg:function(e){return function(t,r){var n=r?r.length:0;return w(e(t,r),n)}},runInContext:function(r){return function(n){return e(t,r(n),i)}}};function L(e,t){if(s){var r=uw.iterateeRearg[e];if(r)return function(e,t){return j(e,(function(e){var r=t.length;return function(e,t){return 2==t?function(t,r){return e.apply(void 0,arguments)}:function(t){return e.apply(void 0,arguments)}}(T(mw(e,r),t),r)}))}(t,r);var n=!o&&uw.iterateeAry[e];if(n)return function(e,t){return j(e,(function(e){return"function"==typeof e?mw(e,t):e}))}(t,n)}return t}function I(e,t,r){if(l&&(f||!uw.skipFixed[e])){var n=uw.methodSpread[e],i=n&&n.start;return void 0===i?b(t,r):function(e,t){return function(){for(var r=arguments.length,n=r-1,i=Array(r);r--;)i[r]=arguments[r];var o=i[t],a=i.slice(0,t);return o&&dw.apply(a,o),t!=n&&dw.apply(a,i.slice(t+1)),e.apply(this,a)}}(t,i)}return t}function O(e,t,r){return p&&r>1&&(h||!uw.skipRearg[e])?T(t,uw.methodRearg[e]||uw.aryRearg[r]):t}function B(e,t){for(var r=-1,n=(t=_(t)).length,i=n-1,o=x(Object(e)),a=o;null!=a&&++r<n;){var s=t[r],c=a[s];null==c||S(c)||z(c)||A(c)||(a[s]=x(r==i?c:Object(c))),a=a[s]}return o}function P(t,r){var n=uw.aliasToReal[t]||t,a=uw.remap[n]||n,s=i;return function(t){var i=o?g:v,c=o?g[a]:r,l=y(y({},s),t);return e(i,n,c,l)}}function j(e,t){return function(){var r=arguments.length;if(!r)return e();for(var n=Array(r);r--;)n[r]=arguments[r];var i=p?0:r-1;return n[i]=t(n[i]),e.apply(void 0,n)}}function F(e,t,r){var n,i=uw.aliasToReal[e]||e,o=t,a=M[i];return a?o=a(t):u&&(uw.mutate.array[i]?o=hw(t,fw):uw.mutate.object[i]?o=hw(t,function(e){return function(t){return e({},t)}}(t)):uw.mutate.set[i]&&(o=hw(t,B))),k(E,(function(e){return k(uw.aryMethod[e],(function(t){if(i==t){var r=uw.methodSpread[i],a=r&&r.afterRearg;return n=a?I(i,O(i,o,e),e):O(i,I(i,o,e),e),n=function(e,t,r){return m||c&&r>1?w(t,r):t}(0,n=L(i,n),e),!1}})),!n})),n||(n=o),n==t&&(n=m?w(n,1):function(){return t.apply(this,arguments)}),n.convert=P(i,t),n.placeholder=t.placeholder=r,n}if(!a)return F(r,n,d);var R=n,N=[];return k(E,(function(e){k(uw.aryMethod[e],(function(e){var t=R[uw.remap[e]||e];t&&N.push([e,F(e,t,R)])}))})),k(D(R),(function(e){var t=R[e];if("function"==typeof t){for(var r=N.length;r--;)if(N[r][0]==e)return;t.convert=P(e,t),N.push([e,t])}})),k(N,(function(e){R[e[0]]=e[1]})),R.convert=function(e){return R.runInContext.convert(e)(void 0)},R.placeholder=R,k(D(R),(function(e){k(uw.realToAlias[e]||[],(function(t){R[t]=R[e]}))})),R}(gw,gw);const{atob:bw}=cw,{cloneDeep:yw}=vw,{LITERAL_MARKER:xw}=aw;let ww;var kw=e=>ww=e,Cw={setJSRunner:kw,processJS:(e,t)=>{try{const r=`function run(){${bw(e)}};run();`,n={$:e=>((e,t)=>{let r=t;return e.split(".").forEach((e=>{if(null==r||"object"!=typeof r)return null;r=r[(e=>{if(!e||"string"!=typeof e)return e;const t=e.match(/\[+(.+)]+/);return t&&t[1]?t[1]:e})(e)]})),r})(e,yw(t))},i={data:ww(r,n)};return`{{${xw} js_result-${JSON.stringify(i)}}}`}catch(e){return"Error while executing JS"}}},zw=Zc((function(e){const{SafeString:t}=op,{processJS:r}=Cw,{HelperFunctionNames:n,HelperFunctionBuiltin:i,LITERAL_MARKER:o}=aw,a={"<":"&lt;",">":"&gt;"},s=[new sp(n.OBJECT,(e=>new t(JSON.stringify(e)))),new sp(n.JS,r,!1),new sp(n.ALL,((e,{__opts:r})=>{if(function(e){return null!=e&&"object"==typeof e&&("[object Object]"===e.toString()||e.length>0&&"object"==typeof e[0])}(e))return new t(JSON.stringify(e));if(null==e||"string"!=typeof e)return null==e?"":e;e&&e.string&&(e=e.string);let n=e;return r&&r.escapeNewlines&&(n=e.replace(/\n/g,"\\n")),n=new t(n.replace(/&amp;/g,"&")),null==n||"string"!=typeof n?n:n.replace(/[<>]/g,(e=>a[e]||e))})),new sp(n.LITERAL,(e=>{if(void 0===e)return"";const t=typeof e,r="object"===t?JSON.stringify(e):e;return`{{${o} ${t}-${r}}}`}))];e.exports.HelperNames=()=>Object.values(n).concat(i,sw.externalHelperNames),e.exports.registerMinimum=e=>{for(let t of s)t.register(e)},e.exports.registerAll=t=>{e.exports.registerMinimum(t),sw.registerAll(t)},e.exports.unregisterAll=e=>{for(let t of s)t.unregister(e);sw.unregisterAll(e)}}));const{HelperNames:Sw}=zw,{swapStrings:Aw,isAlphaNumeric:Dw}=cw,Tw=["#","else","/"],$w={SWAP_TO_DOT:"swap-to-dot-notation",FIX_FUNCTIONS:"fix-functions",FINALISE:"finalise"};class _w{constructor(e,t){this.name=e,this.fn=t}process(e,t,r){const n=this.fn(t,r),i=e.indexOf(t);return Aw(e,i,t.length,n)}}var Ew={processors:[new _w($w.SWAP_TO_DOT,(e=>{let t=e.indexOf("["),r=0;for(;-1!==t;){Dw(e.charAt(t-1))&&(e=Aw(e,t+r,1,".[")),r=t+1;const n=e.substring(r+1).indexOf("[");t=n>0?r+1+n:-1}return e})),new _w($w.FIX_FUNCTIONS,(e=>{for(let t of Tw){const r=`{ ${t}`,n=`{${t}`;e=e.replace(new RegExp(r,"g"),n)}return e})),new _w($w.FINALISE,((e,t)=>{const r=t&&t.noHelpers;let n=e.slice(2,e.length-2);" "===n.charAt(0)&&(n=n.slice(1))," "===n.charAt(n.length-1)&&(n=n.slice(0,n.length-1));const i=n.split(" ")[0];for(let t of Tw)if(i.includes(t))return e;const o=i.trim().toLowerCase();return!r&&Sw().some((e=>o===e.toLowerCase()))&&(n=`(${n})`),`{{ all ${n} }}`}))],PreprocessorNames:$w};const{LITERAL_MARKER:Mw}=aw,Lw={CONVERT_LITERALS:"convert-literals"};var Iw={PostProcessorNames:Lw,processors:[new class{constructor(e,t){this.name=e,this.fn=t}process(e){return this.fn(e)}}(Lw.CONVERT_LITERALS,(e=>{if("string"!=typeof e||!e.includes(Mw))return e;const t=e.indexOf("-"),r=e.substring(12,t),n=e.substring(t+1,e.length-2);switch(r){case"string":return n;case"number":return parseFloat(n);case"boolean":return"true"===n;case"object":return JSON.parse(n);case"js_result":return JSON.parse(n).data}return n}))]};const{FIND_HBS_REGEX:Ow}=cw;function Bw(e,t,r){for(let n of t){if("string"!=typeof e)break;let t=new RegExp(Ow),i=e.match(t);if(null!=i)for(let t of i)e=n.process(e,t,r)}return e}var Pw={math:{abs:{args:["a"],numArgs:1,example:"{{ abs 12012.1000 }} -> 12012.1",description:"<p>Return the magnitude of <code>a</code>.</p>\n"},add:{args:["a","b"],numArgs:2,example:"{{ add 1 2 }} -> 3",description:"<p>Return the sum of <code>a</code> plus <code>b</code>.</p>\n"},avg:{args:["array"],numArgs:1,example:"{{ avg 1 2 3 4 5 }} -> 3",description:"<p>Returns the average of all numbers in the given array.</p>\n"},ceil:{args:["value"],numArgs:1,example:"{{ ceil 1.2 }} -> 2",description:"<p>Get the <code>Math.ceil()</code> of the given value.</p>\n"},divide:{args:["a","b"],numArgs:2,example:"{{ divide 10 5 }} -> 2",description:"<p>Divide <code>a</code> by <code>b</code></p>\n"},floor:{args:["value"],numArgs:1,example:"{{ floor 1.2 }} -> 1",description:"<p>Get the <code>Math.floor()</code> of the given value.</p>\n"},minus:{args:["a","b"],numArgs:2,example:"{{ subtract 10 5 }} -> 5",description:"<p>Return the product of <code>a</code> minus <code>b</code>.</p>\n"},modulo:{args:["a","b"],numArgs:2,example:"{{ modulo 10 5 }} -> 0",description:"<p>Get the remainder of a division operation.</p>\n"},multiply:{args:["a","b"],numArgs:2,example:"{{ product 10 5 }} -> 50",description:"<p>Return the product of <code>a</code> times <code>b</code>.</p>\n"},plus:{args:["a","b"],numArgs:2,example:"{{ plus 10 5 }} -> 15",description:"<p>Add <code>a</code> by <code>b</code>.</p>\n"},random:{args:["min","max"],numArgs:2,example:"{{ random 0 20 }} -> 10",description:"<p>Generate a random number between two values</p>\n"},remainder:{args:["a","b"],numArgs:2,example:"{{ remainder 10 6 }} -> 4",description:"<p>Get the remainder when <code>a</code> is divided by <code>b</code>.</p>\n"},round:{args:["number"],numArgs:1,example:"{{ round 10.3 }} -> 10",description:"<p>Round the given number.</p>\n"},subtract:{args:["a","b"],numArgs:2,example:"{{ subtract 10 5 }} -> 5",description:"<p>Return the product of <code>a</code> minus <code>b</code>.</p>\n"},sum:{args:["array"],numArgs:1,example:"{{ sum [1, 2, 3] }} -> 6",description:"<p>Returns the sum of all numbers in the given array.</p>\n"},times:{args:["a","b"],numArgs:2,example:"{{ times 10 5 }} -> 50",description:"<p>Multiply number <code>a</code> by number <code>b</code>.</p>\n"}},array:{after:{args:["array","n"],numArgs:2,example:"{{ after [1, 2, 3] 1}} -> [3]",description:'<p>Returns all of the items in an array after the specified index. Opposite of <a href="#before">before</a>.</p>\n'},arrayify:{args:["value"],numArgs:1,example:"{{ arrayify 'foo' }} -> ['foo']",description:"<p>Cast the given <code>value</code> to an array.</p>\n"},before:{args:["array","n"],numArgs:2,example:"{{ before [1, 2, 3] 2}} -> [1, 2]",description:'<p>Return all of the items in the collection before the specified count. Opposite of <a href="#after">after</a>.</p>\n'},eachIndex:{args:["array","options"],numArgs:2,example:"{{#eachIndex [1, 2, 3]}} {{item}} is {{index}} {{/eachIndex}}",description:"<p>Iterates the array, listing an item and the index of it.</p>\n"},filter:{args:["array","value","options"],numArgs:3,example:"{{#filter [1, 2, 3] 2}}2 Found{{else}}2 not found{{/filter}}",description:"<p>Block helper that filters the given array and renders the block for values that evaluate to <code>true</code>, otherwise the inverse block is returned.</p>\n"},first:{args:["array","n"],numArgs:2,example:"{{first [1, 2, 3, 4] 2}} -> [1, 2]",description:"<p>Returns the first item, or first <code>n</code> items of an array.</p>\n"},forEach:{args:["array"],numArgs:1,example:"{{#forEach [{ 'name': 'John' }] }} {{ name }} {{/forEach}}",description:"<p>Iterates over each item in an array and exposes the current item in the array as context to the inner block. In addition to the current array item, the helper exposes the following variables to the inner block: - <code>index</code> - <code>total</code> - <code>isFirst</code> - <code>isLast</code> Also, <code>@index</code> is exposed as a private variable, and additional private variables may be defined as hash arguments.</p>\n"},inArray:{args:["array","value","options"],numArgs:3,example:"{{#inArray [1, 2, 3] 2}} 2 exists {{else}} 2 does not exist {{/inArray}} -> 2 exists",description:"<p>Block helper that renders the block if an array has the given <code>value</code>. Optionally specify an inverse block to render when the array does not have the given value.</p>\n"},isArray:{args:["value"],numArgs:1,example:"{{isArray [1, 2]}} -> true",description:"<p>Returns true if <code>value</code> is an es5 array.</p>\n"},itemAt:{args:["array","idx"],numArgs:2,example:"{{itemAt [1, 2, 3] 1}} -> 2",description:"<p>Returns the item from <code>array</code> at index <code>idx</code>.</p>\n"},join:{args:["array","separator"],numArgs:2,example:"{{join [1, 2, 3]}} -> '1, 2, 3'",description:"<p>Join all elements of array into a string, optionally using a given separator.</p>\n"},equalsLength:{args:["value","length","options"],numArgs:3,example:"{{equalsLength '[1,2,3]' 3}} -> true",description:"<p>Returns true if the the length of the given <code>value</code> is equal to the given <code>length</code>. Can be used as a block or inline helper.</p>\n"},last:{args:["value","n"],numArgs:2,example:"{{last [1, 2, 3]}} -> 3",description:'<p>Returns the last item, or last <code>n</code> items of an array or string. Opposite of <a href="#first">first</a>.</p>\n'},length:{args:["value"],numArgs:1,example:"{{length '[1, 2, 3]'}} -> 3",description:"<p>Returns the length of the given string or array.</p>\n"},lengthEqual:{args:["value","length","options"],numArgs:3,example:"{{equalsLength '[1,2,3]' 3}} -> true",description:"<p>Returns true if the the length of the given <code>value</code> is equal to the given <code>length</code>. Can be used as a block or inline helper.</p>\n"},map:{args:["array","fn"],numArgs:2,example:"{{map [1, 2, 3] double}} -> [2, 4, 6]",description:"<p>Returns a new array, created by calling <code>function</code> on each element of the given <code>array</code>. For example,</p>\n"},pluck:{args:["collection","prop"],numArgs:2,example:"{{pluck [{ 'name': 'Bob' }] 'name' }} -> ['Bob']",description:"<p>Map over the given object or array or objects and create an array of values from the given <code>prop</code>. Dot-notation may be used (as a string) to get nested properties.</p>\n"},reverse:{args:["value"],numArgs:1,example:"{{reverse [1, 2, 3]}} -> [3, 2, 1]",description:"<p>Reverse the elements in an array, or the characters in a string.</p>\n"},some:{args:["array","iter","provided"],numArgs:3,example:"{{#some [1, 'b', 3] isString}} string found {{else}} No string found {{/some}} -> string found",description:"<p>Block helper that returns the block if the callback returns true for some value in the given array.</p>\n"},sort:{args:["array","key"],numArgs:2,example:"{{ sort ['b', 'a', 'c'] }} -> ['a', 'b', 'c']",description:"<p>Sort the given <code>array</code>. If an array of objects is passed, you may optionally pass a <code>key</code> to sort on as the second argument. You may alternatively pass a sorting function as the second argument.</p>\n"},sortBy:{args:["array","props"],numArgs:2,example:"{{ sortBy [{a: 'zzz'}, {a: 'aaa'}] 'a' }} -> [{'a':'aaa'}, {'a':'zzz'}]",description:"<p>Sort an <code>array</code>. If an array of objects is passed, you may optionally pass a <code>key</code> to sort on as the second argument. You may alternatively pass a sorting function as the second argument.</p>\n"},withAfter:{args:["array","idx","options"],numArgs:3,example:"{{ withAfter [1, 2, 3] 1 }} {{this}} {{/withAfter}}",description:'<p>Use the items in the array <em>after</em> the specified index as context inside a block. Opposite of <a href="#withBefore">withBefore</a>.</p>\n'},withBefore:{args:["array","idx","options"],numArgs:3,example:"{{ withBefore [1, 2, 3] 2 }} {{this}} {{/withBefore}}",description:'<p>Use the items in the array <em>before</em> the specified index as context inside a block. Opposite of <a href="#withAfter">withAfter</a>.</p>\n'},withFirst:{args:["array","idx","options"],numArgs:3,example:"{{ withFirst [1, 2, 3] }} {{this}} {{/withFirst}}",description:'<p>Use the first item in a collection inside a handlebars block expression. Opposite of <a href="#withLast">withLast</a>.</p>\n'},withGroup:{args:["array","size","options"],numArgs:3,example:"{{#withGroup [1, 2, 3, 4] 2}} {{#each this}} {{.}} {{each}} <br> {{/withGroup}} -> 1,2<br> 3,4<br>",description:"<p>Block helper that groups array elements by given group <code>size</code>.</p>\n"},withLast:{args:["array","idx","options"],numArgs:3,example:"{{#withLast [1, 2, 3, 4]}} {{this}} {{/withLast}} -> 4",description:'<p>Use the last item or <code>n</code> items in an array as context inside a block. Opposite of <a href="#withFirst">withFirst</a>.</p>\n'},withSort:{args:["array","prop","options"],numArgs:3,example:"{{#withSort ['b', 'a', 'c']}} {{this}} {{/withSort}} -> abc",description:"<p>Block helper that sorts a collection and exposes the sorted collection as context inside the block.</p>\n"},unique:{args:["array","options"],numArgs:2,example:"{{#each (unique ['a', 'a', 'c', 'b', 'e', 'e']) }} {{.}} {{/each}} -> acbe",description:'<p>Block helper that return an array with all duplicate values removed. Best used along with a <a href="#each">each</a> helper.</p>\n'}},number:{bytes:{args:["number"],numArgs:1,example:"{{ bytes 1386 }} -> 1.4Kb",description:"<p>Format a number to it&#39;s equivalent in bytes. If a string is passed, it&#39;s length will be formatted and returned. <strong>Examples:</strong> - <code>&#39;foo&#39; =&gt; 3 B</code> - <code>13661855 =&gt; 13.66 MB</code> - <code>825399 =&gt; 825.39 kB</code> - <code>1396 =&gt; 1.4 kB</code></p>\n"},addCommas:{args:["num"],numArgs:1,example:"{{ addCommas 1000000 }} -> 1,000,000",description:"<p>Add commas to numbers</p>\n"},phoneNumber:{args:["num"],numArgs:1,example:"{{ phoneNumber 8005551212 }} -> (800) 555-1212",description:"<p>Convert a string or number to a formatted phone number.</p>\n"},toAbbr:{args:["number","precision"],numArgs:2,example:"{{ toAbbr 10123 2 }} -> 10.12k",description:"<p>Abbreviate numbers to the given number of <code>precision</code>. This for general numbers, not size in bytes.</p>\n"},toExponential:{args:["number","fractionDigits"],numArgs:2,example:"{{ toExponential 10123 2 }} -> 101e+4",description:"<p>Returns a string representing the given number in exponential notation.</p>\n"},toFixed:{args:["number","digits"],numArgs:2,example:"{{ toFixed 1.1234 2 }} -> 1.12",description:"<p>Formats the given number using fixed-point notation.</p>\n"},toFloat:{args:["number"],numArgs:1,description:"<p>Convert input to a float.</p>\n"},toInt:{args:["number"],numArgs:1,description:"<p>Convert input to an integer.</p>\n"},toPrecision:{args:["number","precision"],numArgs:2,example:"{{toPrecision '1.1234' 2}}",description:"<p>Returns a string representing the <code>Number</code> object to the specified precision.</p>\n"}},url:{encodeURI:{args:["str"],numArgs:1,example:"{{ encodeURI 'https://myurl?Hello There' }} -> https://myurl?Hello%20There",description:"<p>Encodes a Uniform Resource Identifier (URI) component by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character.</p>\n"},escape:{args:["str"],numArgs:1,example:"{{ escape 'https://myurl?Hello+There' }} -> https://myurl?Hello%20There",description:"<p>Escape the given string by replacing characters with escape sequences. Useful for allowing the string to be used in a URL, etc.</p>\n"},decodeURI:{args:["str"],numArgs:1,example:"{{ escape 'https://myurl?Hello%20There' }} -> https://myurl?Hello+There",description:"<p>Decode a Uniform Resource Identifier (URI) component.</p>\n"},url_encode:{args:[],numArgs:0,description:'<p>Alias for <a href="#encodeuri">encodeURI</a>.</p>\n'},url_decode:{args:[],numArgs:0,description:'<p>Alias for <a href="#decodeuri">decodeURI</a>.</p>\n'},urlResolve:{args:["base","href"],numArgs:2,example:"{{ urlResolve 'https://myurl' '/api/test' }} -> https://myurl/api/test",description:"<p>Take a base URL, and a href URL, and resolve them as a browser would for an anchor tag.</p>\n"},urlParse:{args:["str"],numArgs:1,example:"{{ urlParse 'https://myurl/api/test' }}",description:"<p>Parses a <code>url</code> string into an object.</p>\n"},stripQuerystring:{args:["url"],numArgs:1,example:"{{ stripQueryString 'https://myurl/api/test?foo=bar' }} -> 'https://myurl/api/test'",description:"<p>Strip the query string from the given <code>url</code>.</p>\n"},stripProtocol:{args:["str"],numArgs:1,example:"{{ stripProtocol 'https://myurl/api/test' }} -> 'myurl/api/test'",description:"<p>Strip protocol from a <code>url</code>. Useful for displaying media that may have an &#39;http&#39; protocol on secure connections.</p>\n"}},string:{append:{args:["str","suffix"],numArgs:2,example:"{{append 'index' '.html'}} -> index.html",description:"<p>Append the specified <code>suffix</code> to the given string.</p>\n"},camelcase:{args:["string"],numArgs:1,example:"{{camelcase 'foo bar baz'}} -> fooBarBaz",description:"<p>camelCase the characters in the given <code>string</code>.</p>\n"},capitalize:{args:["str"],numArgs:1,example:"{{capitalize 'foo bar baz'}} -> Foo bar baz",description:"<p>Capitalize the first word in a sentence.</p>\n"},capitalizeAll:{args:["str"],numArgs:1,example:"{{ capitalizeAll 'foo bar baz'}} -> Foo Bar Baz",description:"<p>Capitalize all words in a string.</p>\n"},center:{args:["str","spaces"],numArgs:2,example:"{{ center 'test' 1}} -> ' test '",description:"<p>Center a string using non-breaking spaces</p>\n"},chop:{args:["string"],numArgs:1,example:"{{ chop ' ABC '}} -> 'ABC'",description:"<p>Like trim, but removes both extraneous whitespace <strong>and non-word characters</strong> from the beginning and end of a string.</p>\n"},dashcase:{args:["string"],numArgs:1,example:"{{dashcase 'a-b-c d_e'}} -> a-b-c-d-e",description:"<p>dash-case the characters in <code>string</code>. Replaces non-word characters and periods with hyphens.</p>\n"},dotcase:{args:["string"],numArgs:1,example:"{{dotcase 'a-b-c d_e'}} -> a.b.c.d.e",description:"<p>dot.case the characters in <code>string</code>.</p>\n"},downcase:{args:["string"],numArgs:1,example:"{{downcase 'aBcDeF'}} -> abcdef",description:'<p>Lowercase all of the characters in the given string. Alias for <a href="#lowercase">lowercase</a>.</p>\n'},ellipsis:{args:["str","length"],numArgs:2,example:"{{ellipsis 'foo bar baz', 7}} -> foo bar…",description:"<p>Truncates a string to the specified <code>length</code>, and appends it with an elipsis, <code>…</code>.</p>\n"},hyphenate:{args:["str"],numArgs:1,example:"{{hyphenate 'foo bar baz qux'}} -> foo-bar-baz-qux",description:"<p>Replace spaces in a string with hyphens.</p>\n"},isString:{args:["value"],numArgs:1,example:"{{isString 'foo'}} -> true",description:"<p>Return true if <code>value</code> is a string.</p>\n"},lowercase:{args:["str"],numArgs:1,example:"{{lowercase 'Foo BAR baZ'}} -> foo bar baz",description:"<p>Lowercase all characters in the given string.</p>\n"},occurrences:{args:["str","substring"],numArgs:2,example:"{{occurrences 'foo bar foo bar baz' 'foo'}} -> 2",description:"<p>Return the number of occurrences of <code>substring</code> within the given <code>string</code>.</p>\n"},pascalcase:{args:["string"],numArgs:1,example:"{{pascalcase 'foo bar baz'}} -> FooBarBaz",description:"<p>PascalCase the characters in <code>string</code>.</p>\n"},pathcase:{args:["string"],numArgs:1,example:"{{pathcase 'a-b-c d_e'}} -> a/b/c/d/e",description:"<p>path/case the characters in <code>string</code>.</p>\n"},plusify:{args:["str"],numArgs:1,example:"{{plusify 'foo bar baz'}} -> foo+bar+baz",description:"<p>Replace spaces in the given string with pluses.</p>\n"},prepend:{args:["str","prefix"],numArgs:2,example:"{{prepend 'bar' 'foo-'}} -> foo-bar",description:"<p>Prepends the given <code>string</code> with the specified <code>prefix</code>.</p>\n"},raw:{args:["options"],numArgs:1,example:"{{{{#raw}}}} {{foo}} {{{{/raw}}}} -> {{foo}}",description:"<p>Render a block without processing mustache templates inside the block.</p>\n"},remove:{args:["str","substring"],numArgs:2,example:"{{remove 'a b a b a b' 'a '}} -> b b b",description:"<p>Remove all occurrences of <code>substring</code> from the given <code>str</code>.</p>\n"},removeFirst:{args:["str","substring"],numArgs:2,example:"{{remove 'a b a b a b' 'a'}} -> b a b a b",description:"<p>Remove the first occurrence of <code>substring</code> from the given <code>str</code>.</p>\n"},replace:{args:["str","a","b"],numArgs:3,example:"{{replace 'a b a b a b' 'a' 'z'}} -> z b z b z b",description:"<p>Replace all occurrences of substring <code>a</code> with substring <code>b</code>.</p>\n"},replaceFirst:{args:["str","a","b"],numArgs:3,example:"{{replace 'a b a b a b' 'a' 'z'}} -> z b a b a b",description:"<p>Replace the first occurrence of substring <code>a</code> with substring <code>b</code>.</p>\n"},sentence:{args:["str"],numArgs:1,example:"{{sentence 'hello world. goodbye world.'}} -> Hello world. Goodbye world.",description:"<p>Sentence case the given string</p>\n"},snakecase:{args:["string"],numArgs:1,example:"{{snakecase 'a-b-c d_e'}} -> a_b_c_d_e",description:"<p>snake_case the characters in the given <code>string</code>.</p>\n"},split:{args:["string"],numArgs:1,example:"{{split 'a,b,c'}} -> ['a', 'b', 'c']",description:"<p>Split <code>string</code> by the given <code>character</code>.</p>\n"},startsWith:{args:["prefix","testString","options"],numArgs:3,example:"{{#startsWith 'Goodbye' 'Hello, world!'}} Yep {{else}} Nope {{/startsWith}} -> Nope",description:"<p>Tests whether a string begins with the given prefix.</p>\n"},titleize:{args:["str"],numArgs:1,example:"{{#titleize 'this is title case' }} -> This Is Title Case",description:"<p>Title case the given string.</p>\n"},trim:{args:["string"],numArgs:1,example:"{{trim ' ABC ' }} -> ABC",description:"<p>Removes extraneous whitespace from the beginning and end of a string.</p>\n"},trimLeft:{args:["string"],numArgs:1,example:"{{trimLeft ' ABC ' }} -> 'ABC '",description:"<p>Removes extraneous whitespace from the beginning of a string.</p>\n"},trimRight:{args:["string"],numArgs:1,example:"{{trimRight ' ABC ' }} -> ' ABC '",description:"<p>Removes extraneous whitespace from the end of a string.</p>\n"},truncate:{args:["str","limit","suffix"],numArgs:3,example:"{{truncate 'foo bar baz' 7 }} -> foo bar",description:'<p>Truncate a string to the specified <code>length</code>. Also see <a href="#ellipsis">ellipsis</a>.</p>\n'},truncateWords:{args:["str","limit","suffix"],numArgs:3,example:"{{truncateWords 'foo bar baz' 1 }} -> foo",description:'<p>Truncate a string to have the specified number of words. Also see <a href="#truncate">truncate</a>.</p>\n'},upcase:{args:["string"],numArgs:1,example:"{{upcase 'aBcDef'}} -> ABCDEF",description:'<p>Uppercase all of the characters in the given string. Alias for <a href="#uppercase">uppercase</a>.</p>\n'},uppercase:{args:["str","options"],numArgs:2,example:"{{uppercase 'aBcDef'}} -> ABCDEF",description:"<p>Uppercase all of the characters in the given string. If used as a block helper it will uppercase the entire block. This helper does not support inverse blocks.</p>\n"}},comparison:{and:{args:["a","b","options"],numArgs:3,example:"{{#and great magnificent}}both{{else}}no{{/and}}",description:"<p>Helper that renders the block if <strong>both</strong> of the given values are truthy. If an inverse block is specified it will be rendered when falsy. Works as a block helper, inline helper or subexpression.</p>\n"},compare:{args:["a","operator","b","options"],numArgs:4,example:"{{compare 10 '<' 5 }} -> true",description:"<p>Render a block when a comparison of the first and third arguments returns true. The second argument is the [arithemetic operator][operators] to use. You may also optionally specify an inverse block to render when falsy.</p>\n"},contains:{args:["collection","value","[startIndex=0]","options"],numArgs:4,example:"{{#contains ['a', 'b', 'c'] 'd'}} This will not be rendered. {{else}} This will be rendered. {{/contains}}",description:"<p>Block helper that renders the block if <code>collection</code> has the given <code>value</code>, using strict equality (<code>===</code>) for comparison, otherwise the inverse block is rendered (if specified). If a <code>startIndex</code> is specified and is negative, it is used as the offset from the end of the collection.</p>\n"},default:{args:["value","defaultValue"],numArgs:2,example:"{{default null null 'default'}} -> default",description:"<p>Returns the first value that is not undefined, otherwise the &#39;default&#39; value is returned.</p>\n"},eq:{args:["a","b","options"],numArgs:3,example:"{{#eq 3 3}} equal{{else}} not equal{{/eq}} -> equal",description:"<p>Block helper that renders a block if <code>a</code> is <strong>equal to</strong> <code>b</code>. If an inverse block is specified it will be rendered when falsy. You may optionally use the <code>compare=&#39;&#39;</code> hash argument for the second value.</p>\n"},gt:{args:["a","b","options"],numArgs:3,example:"{{#gt 4 3}} greater than{{else}} not greater than{{/gt}} -> greater than",description:"<p>Block helper that renders a block if <code>a</code> is <strong>greater than</strong> <code>b</code>. If an inverse block is specified it will be rendered when falsy. You may optionally use the <code>compare=&#39;&#39;</code> hash argument for the second value.</p>\n"},gte:{args:["a","b","options"],numArgs:3,example:"{{#gte 4 3}} greater than or equal{{else}} not greater than{{/gte}} -> greater than or equal",description:"<p>Block helper that renders a block if <code>a</code> is <strong>greater than or equal to</strong> <code>b</code>. If an inverse block is specified it will be rendered when falsy. You may optionally use the <code>compare=&#39;&#39;</code> hash argument for the second value.</p>\n"},has:{args:["val","pattern","options"],numArgs:3,example:"{{#has 'foobar' 'foo'}} has it{{else}} doesn't{{/has}} -> has it",description:"<p>Block helper that renders a block if <code>value</code> has <code>pattern</code>. If an inverse block is specified it will be rendered when falsy.</p>\n"},isFalsey:{args:["val","options"],numArgs:2,example:"{{isFalsey '' }} -> true",description:"<p>Returns true if the given <code>value</code> is falsey. Uses the [falsey][] library for comparisons. Please see that library for more information or to report bugs with this helper.</p>\n"},isTruthy:{args:["val","options"],numArgs:2,example:"{{isTruthy '12' }} -> true",description:"<p>Returns true if the given <code>value</code> is truthy. Uses the [falsey][] library for comparisons. Please see that library for more information or to report bugs with this helper.</p>\n"},ifEven:{args:["number","options"],numArgs:2,example:"{{#ifEven 2}} even {{else}} odd {{/ifEven}} -> even",description:"<p>Return true if the given value is an even number.</p>\n"},ifNth:{args:["a","b","options"],numArgs:3,example:"{{#ifNth 10 2}} remainder {{else}} no remainder {{/ifNth}} -> remainder",description:"<p>Conditionally renders a block if the remainder is zero when <code>a</code> operand is divided by <code>b</code>. If an inverse block is specified it will be rendered when the remainder is <strong>not zero</strong>.</p>\n"},ifOdd:{args:["value","options"],numArgs:2,example:"{{#ifOdd 3}} odd {{else}} even {{/ifOdd}} -> odd",description:"<p>Block helper that renders a block if <code>value</code> is <strong>an odd number</strong>. If an inverse block is specified it will be rendered when falsy.</p>\n"},is:{args:["a","b","options"],numArgs:3,example:"{{#is 3 3}} is {{else}} is not {{/is}} -> is",description:'<p>Block helper that renders a block if <code>a</code> is <strong>equal to</strong> <code>b</code>. If an inverse block is specified it will be rendered when falsy. Similar to <a href="#eq">eq</a> but does not do strict equality.</p>\n'},isnt:{args:["a","b","options"],numArgs:3,example:"{{#isnt 3 3}} isnt {{else}} is {{/isnt}} -> is",description:'<p>Block helper that renders a block if <code>a</code> is <strong>not equal to</strong> <code>b</code>. If an inverse block is specified it will be rendered when falsy. Similar to <a href="#unlesseq">unlessEq</a> but does not use strict equality for comparisons.</p>\n'},lt:{args:["context","options"],numArgs:2,example:"{{#lt 2 3}} less than {{else}} more than or equal {{/lt}} -> less than",description:"<p>Block helper that renders a block if <code>a</code> is <strong>less than</strong> <code>b</code>. If an inverse block is specified it will be rendered when falsy. You may optionally use the <code>compare=&#39;&#39;</code> hash argument for the second value.</p>\n"},lte:{args:["a","b","options"],numArgs:3,example:"{{#lte 2 3}} less than or equal {{else}} more than {{/lte}} -> less than or equal",description:"<p>Block helper that renders a block if <code>a</code> is <strong>less than or equal to</strong> <code>b</code>. If an inverse block is specified it will be rendered when falsy. You may optionally use the <code>compare=&#39;&#39;</code> hash argument for the second value.</p>\n"},neither:{args:["a","b","options"],numArgs:3,example:"{{#neither null null}} both falsey {{else}} both not falsey {{/neither}} -> both falsey",description:"<p>Block helper that renders a block if <strong>neither of</strong> the given values are truthy. If an inverse block is specified it will be rendered when falsy.</p>\n"},not:{args:["val","options"],numArgs:2,example:"{{#not undefined }} falsey {{else}} not falsey {{/not}} -> falsey",description:"<p>Returns true if <code>val</code> is falsey. Works as a block or inline helper.</p>\n"},or:{args:["arguments","options"],numArgs:2,example:"{{#or 1 2 undefined }} at least one truthy {{else}} all falsey {{/or}} -> at least one truthy",description:"<p>Block helper that renders a block if <strong>any of</strong> the given values is truthy. If an inverse block is specified it will be rendered when falsy.</p>\n"},unlessEq:{args:["a","b","options"],numArgs:3,example:"{{#unlessEq 2 1 }} not equal {{else}} equal {{/unlessEq}} -> not equal",description:"<p>Block helper that always renders the inverse block <strong>unless <code>a</code> is equal to <code>b</code></strong>.</p>\n"},unlessGt:{args:["a","b","options"],numArgs:3,example:"{{#unlessGt 20 1 }} not greater than {{else}} greater than {{/unlessGt}} -> greater than",description:"<p>Block helper that always renders the inverse block <strong>unless <code>a</code> is greater than <code>b</code></strong>.</p>\n"},unlessLt:{args:["a","b","options"],numArgs:3,example:"{{#unlessLt 20 1 }} greater than or equal {{else}} less than {{/unlessLt}} -> greater than or equal",description:"<p>Block helper that always renders the inverse block <strong>unless <code>a</code> is less than <code>b</code></strong>.</p>\n"},unlessGteq:{args:["a","b","options"],numArgs:3,example:"{{#unlessGteq 20 1 }} less than {{else}} greater than or equal to {{/unlessGteq}} -> greater than or equal to",description:"<p>Block helper that always renders the inverse block <strong>unless <code>a</code> is greater than or equal to <code>b</code></strong>.</p>\n"},unlessLteq:{args:["a","b","options"],numArgs:3,example:"{{#unlessLteq 20 1 }} greater than {{else}} less than or equal to {{/unlessLteq}} -> greater than",description:"<p>Block helper that always renders the inverse block <strong>unless <code>a</code> is less than or equal to <code>b</code></strong>.</p>\n"}},object:{extend:{args:["objects"],numArgs:1,description:"<p>Extend the context with the properties of other objects. A shallow merge is performed to avoid mutating the context.</p>\n"},forIn:{args:["context","options"],numArgs:2,description:"<p>Block helper that iterates over the properties of an object, exposing each key and value on the context.</p>\n"},forOwn:{args:["obj","options"],numArgs:2,description:"<p>Block helper that iterates over the <strong>own</strong> properties of an object, exposing each key and value on the context.</p>\n"},toPath:{args:["prop"],numArgs:1,description:"<p>Take arguments and, if they are string or number, convert them to a dot-delineated object property path.</p>\n"},get:{args:["prop","context","options"],numArgs:3,description:"<p>Use property paths (<code>a.b.c</code>) to get a value or nested value from the context. Works as a regular helper or block helper.</p>\n"},getObject:{args:["prop","context"],numArgs:2,description:"<p>Use property paths (<code>a.b.c</code>) to get an object from the context. Differs from the <code>get</code> helper in that this helper will return the actual object, including the given property key. Also, this helper does not work as a block helper.</p>\n"},hasOwn:{args:["key","context"],numArgs:2,description:"<p>Return true if <code>key</code> is an own, enumerable property of the given <code>context</code> object.</p>\n"},isObject:{args:["value"],numArgs:1,description:"<p>Return true if <code>value</code> is an object.</p>\n"},JSONparse:{args:["string"],numArgs:1,description:"<p>Parses the given string using <code>JSON.parse</code>.</p>\n"},JSONstringify:{args:["obj"],numArgs:1,description:"<p>Stringify an object using <code>JSON.stringify</code>.</p>\n"},merge:{args:["object","objects"],numArgs:2,description:"<p>Deeply merge the properties of the given <code>objects</code> with the context object.</p>\n"},parseJSON:{args:["string"],numArgs:1,description:"<p>Parses the given string using <code>JSON.parse</code>.</p>\n"},pick:{args:["properties","context","options"],numArgs:3,description:"<p>Pick properties from the context object.</p>\n"},stringify:{args:["obj"],numArgs:1,description:"<p>Stringify an object using <code>JSON.stringify</code>.</p>\n"}},date:{date:{args:["datetime","format"],numArgs:2,example:'{{date now "DD-MM-YYYY" "America/New_York" }} -> 21-01-2021',description:"<p>Format a date using moment.js date formatting - the timezone is optional and uses the tz database.</p>\n"},duration:{args:["time","durationType"],numArgs:2,example:'{{duration timeLeft "seconds"}} -> a few seconds',description:"<p>Produce a humanized duration left/until given an amount of time and the type of time measurement.</p>\n"}}},jw=Zc((function(e,t){const{registerAll:r,registerMinimum:n}=zw,{atob:i,btoa:o}=cw,{FIND_HBS_REGEX:a,FIND_ANY_HBS_REGEX:s,findDoubleHbsInstances:c}=cw,l=op.create();r(l);const u=op.create();n(u);const p={noHelpers:!1,cacheTemplates:!1,noEscaping:!1,escapeNewlines:!1,noFinalise:!1};function d(e){try{JSON.stringify(e)}catch(e){throw"Unable to process inputs to JSON, cannot recurse"}}let m={};function f(e,r){r={...p,...r};const n=`${e}-${JSON.stringify(r)}`;if(r.cacheTemplates&&m[n])return m[n];e=((e,t)=>{let r=Ew.processors;return t.noFinalise&&(r=r.filter((e=>e.name!==Ew.PreprocessorNames.FINALISE))),Bw(e,r,t)})(e,r),r.noEscaping&&(e=t.disableEscaping(e));const i=(r.noHelpers?u:l).compile(e,{strict:!1});return m[n]=i,i}e.exports.processObject=async(t,r,n)=>{d(t);for(let i of Object.keys(t||{}))if(null!=t[i]){let o=t[i];"string"==typeof o?t[i]=await e.exports.processString(t[i],r,n):"object"==typeof o&&(t[i]=await e.exports.processObject(t[i],r,n))}return t},e.exports.processString=async(t,r,n)=>e.exports.processStringSync(t,r,n),e.exports.processObjectSync=(t,r,n)=>{d(t);for(let i of Object.keys(t||{})){let o=t[i];"string"==typeof o?t[i]=e.exports.processStringSync(t[i],r,n):"object"==typeof o&&(t[i]=e.exports.processObjectSync(t[i],r,n))}return t},e.exports.processStringSync=(e,t,r)=>{const n=e;if("string"!=typeof e)throw"Cannot process non-string types.";try{const n=f(e,r),i=1e3*Math.floor(Date.now()/1e3);return(e=>Bw(e,Iw.processors))(n({now:new Date(i).toISOString(),__opts:r,...t}))}catch(e){return n}},e.exports.disableEscaping=e=>{const t=c(e);if(null==t)return e;const r=[...new Set(t)];for(let t of r){const r=new RegExp(`${t}(?!})`,"g");e=e.replace(r,`{${t}}`)}return e},e.exports.makePropSafe=e=>`[${e}]`.replace("[[","[").replace("]]","]"),e.exports.isValid=(e,t)=>{const r=["string","number","object","array","cannot read property","undefined","json at position 0"],n=["expecting '"],i={};try{return f(e,{...t,noFinalise:!0})(i),!0}catch(e){const t=e&&e.message?e.message:e;if(!t)return!1;const i=n.some((e=>t.toLowerCase().includes(e)));return r.some((e=>t.toLowerCase().includes(e)))&&!i}},e.exports.getManifest=()=>Pw,e.exports.isJSBinding=t=>null!=e.exports.decodeJSBinding(t),e.exports.encodeJSBinding=e=>`{{ js "${o(e)}" }}`,e.exports.decodeJSBinding=e=>{if(!e||"string"!=typeof e)return null;if(!e.trim().startsWith("{{ js "))return null;const t=new RegExp(/{{ js "(.*)" }}/),r=e.match(t);return!r||r.length<2?null:i(r[1])},e.exports.doesContainStrings=(e,r)=>{let n=new RegExp(a),i=e.match(n);if(null==i)return!1;for(let e of i){let n=e;t.isJSBinding(e)&&(n=t.decodeJSBinding(e));let i=!0;for(let e of r)n.includes(e)||(i=!1);if(i)return!0}return!1},e.exports.findHBSBlocks=e=>{let t=new RegExp(s),r=e.match(t);return null==r?[]:r},e.exports.doesContainString=(e,r)=>t.doesContainStrings(e,[r])}));jw.isValid,jw.makePropSafe,jw.getManifest,jw.isJSBinding,jw.encodeJSBinding,jw.decodeJSBinding;const Fw=jw.processStringSync;jw.processObjectSync,jw.processString,jw.processObject,jw.doesContainStrings,jw.doesContainString,jw.disableEscaping,jw.findHBSBlocks,kw(((e,t)=>(t={...t,alert:void 0,setInterval:void 0,setTimeout:void 0},Vc.createContext(t),Vc.runInNewContext(e,t,{timeout:1e3}))));function Rw(e){let t,r,n;var i=e[3];function o(e){return{props:{row:e[0],schema:e[1],value:e[4],$$slots:{default:[Nw]},$$scope:{ctx:e}}}}return i&&(r=new i(o(e)),r.$on("clickrelationship",e[9])),{c(){t=_("div"),r&&Pe(r.$$.fragment),U(t,"--max-cell-width",e[1].width?"none":"200px"),j(t,"class","svelte-16j2cvj")},m(e,i){D(e,t,i),r&&je(r,t,null),n=!0},p(e,a){const s={};if(1&a&&(s.row=e[0]),2&a&&(s.schema=e[1]),16&a&&(s.value=e[4]),1024&a&&(s.$$scope={dirty:a,ctx:e}),i!==(i=e[3])){if(r){Ae();const e=r;$e(e.$$.fragment,1,0,(()=>{Fe(e,1)})),De()}i?(r=new i(o(e)),r.$on("clickrelationship",e[9]),Pe(r.$$.fragment),Te(r.$$.fragment,1),je(r,t,null)):r=null}else i&&r.$set(s);(!n||2&a)&&U(t,"--max-cell-width",e[1].width?"none":"200px")},i(e){n||(r&&Te(r.$$.fragment,e),n=!0)},o(e){r&&$e(r.$$.fragment,e),n=!1},d(e){e&&T(t),r&&Fe(r)}}}function Nw(e){let t;const r=e[8].default,n=p(r,e,e[10],null);return{c(){n&&n.c()},m(e,r){n&&n.m(e,r),t=!0},p(e,i){n&&n.p&&(!t||1024&i)&&m(n,r,e,e[10],i,null,null)},i(e){t||(Te(n,e),t=!0)},o(e){$e(n,e),t=!1},d(e){n&&n.d(e)}}}function qw(e){let t,r,n=e[3]&&(e[2]||null!=e[4]&&""!==e[4])&&Rw(e);return{c(){n&&n.c(),t=I()},m(e,i){n&&n.m(e,i),D(e,t,i),r=!0},p(e,[r]){e[3]&&(e[2]||null!=e[4]&&""!==e[4])?n?(n.p(e,r),28&r&&Te(n,1)):(n=Rw(e),n.c(),Te(n,1),n.m(t.parentNode,t)):n&&(Ae(),$e(n,1,1,(()=>{n=null})),De())},i(e){r||(Te(n),r=!0)},o(e){$e(n),r=!1},d(e){n&&n.d(e),e&&T(t)}}}function Hw(e,t,r){let n,i,o,a,{$$slots:s={},$$scope:c}=t,{row:l}=t,{schema:u}=t,{value:p}=t,{customRenderers:d=[]}=t;const m={boolean:ec,datetime:ac,link:mc,attachment:zc,string:Js,options:Js,number:Js,longform:Js,array:Ic,internal:Pc};return e.$$set=e=>{"row"in e&&r(0,l=e.row),"schema"in e&&r(1,u=e.schema),"value"in e&&r(5,p=e.value),"customRenderers"in e&&r(6,d=e.customRenderers),"$$scope"in e&&r(10,c=e.$$scope)},e.$$.update=()=>{2&e.$$.dirty&&r(7,n=u?.type??"string"),66&e.$$.dirty&&r(2,i=d?.find((e=>e.column===u?.name))),132&e.$$.dirty&&r(3,a=i?.component??m[n]??Js),2&e.$$.dirty&&u?.width,34&e.$$.dirty&&r(4,o=((e,t)=>t?Fw(t,{value:e}):e)(p,u.template))},[l,u,i,a,o,p,d,n,s,function(t){se(e,t)},c]}t("div.svelte-16j2cvj{display:contents}");class Uw extends Ne{constructor(e){super(),Re(this,e,Hw,qw,l,{row:0,schema:1,value:5,customRenderers:6})}}function Gw(e){let t,r;return t=new po({props:{value:e[0]}}),{c(){Pe(t.$$.fragment)},m(e,n){je(t,e,n),r=!0},p(e,r){const n={};1&r&&(n.value=e[0]),t.$set(n)},i(e){r||(Te(t.$$.fragment,e),r=!0)},o(e){$e(t.$$.fragment,e),r=!1},d(e){Fe(t,e)}}}function Ww(e){let t,r;return t=new mi({props:{size:"S",$$slots:{default:[Xw]},$$scope:{ctx:e}}}),t.$on("click",(function(){c(e[1])&&e[1].apply(this,arguments)})),{c(){Pe(t.$$.fragment)},m(e,n){je(t,e,n),r=!0},p(r,n){e=r;const i={};16&n&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){r||(Te(t.$$.fragment,e),r=!0)},o(e){$e(t.$$.fragment,e),r=!1},d(e){Fe(t,e)}}}function Xw(e){let t;return{c(){t=M("Edit")},m(e,r){D(e,t,r)},d(e){e&&T(t)}}}function Vw(e){let t,r,n,i=e[2]&&Gw(e),o=e[3]&&Ww(e);return{c(){t=_("div"),i&&i.c(),r=L(),o&&o.c(),j(t,"class","svelte-1fa8hd3")},m(e,a){D(e,t,a),i&&i.m(t,null),A(t,r),o&&o.m(t,null),n=!0},p(e,[n]){e[2]?i?(i.p(e,n),4&n&&Te(i,1)):(i=Gw(e),i.c(),Te(i,1),i.m(t,r)):i&&(Ae(),$e(i,1,1,(()=>{i=null})),De()),e[3]?o?(o.p(e,n),8&n&&Te(o,1)):(o=Ww(e),o.c(),Te(o,1),o.m(t,null)):o&&(Ae(),$e(o,1,1,(()=>{o=null})),De())},i(e){n||(Te(i),Te(o),n=!0)},o(e){$e(i),$e(o),n=!1},d(e){e&&T(t),i&&i.d(),o&&o.d()}}}function Yw(e,t,r){let{selected:n}=t,{onEdit:i}=t,{allowSelectRows:o=!1}=t,{allowEditRows:a=!1}=t;return e.$$set=e=>{"selected"in e&&r(0,n=e.selected),"onEdit"in e&&r(1,i=e.onEdit),"allowSelectRows"in e&&r(2,o=e.allowSelectRows),"allowEditRows"in e&&r(3,a=e.allowEditRows)},[n,i,o,a]}t("div.svelte-1fa8hd3{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;gap:var(--spacing-m)}");class Kw extends Ne{constructor(e){super(),Re(this,e,Yw,Vw,l,{selected:0,onEdit:1,allowSelectRows:2,allowEditRows:3})}}t('.wrapper.svelte-6mqswq.svelte-6mqswq{position:relative;z-index:0;--table-bg:var(--spectrum-global-color-gray-50);--table-border:1px solid var(--spectrum-alias-border-color-mid);--cell-padding:var(--spectrum-global-dimension-size-250)}.wrapper--quiet.svelte-6mqswq.svelte-6mqswq{--table-bg:var(--spectrum-alias-background-color-transparent)}.wrapper--compact.svelte-6mqswq.svelte-6mqswq{--cell-padding:var(--spectrum-global-dimension-size-150)}.loading.svelte-6mqswq.svelte-6mqswq{display:grid;place-items:center;min-height:100px}.spectrum-Table.svelte-6mqswq.svelte-6mqswq{width:100%;border-radius:0;display:grid;overflow:auto}.spectrum-Table-head.svelte-6mqswq.svelte-6mqswq{display:contents}.spectrum-Table-head.svelte-6mqswq>.svelte-6mqswq:first-child{border-left:1px solid transparent;padding-left:var(--cell-padding)}.spectrum-Table-head.svelte-6mqswq>.svelte-6mqswq:last-child{border-right:1px solid transparent;padding-right:var(--cell-padding)}.spectrum-Table-headCell.svelte-6mqswq.svelte-6mqswq{height:var(--header-height);position:sticky;top:0;text-overflow:ellipsis;white-space:nowrap;background-color:var(--spectrum-alias-background-color-secondary);z-index:2;border-bottom:var(--table-border);padding:0 calc(var(--cell-padding) / 1.33);display:flex;flex-direction:row;justify-content:flex-start;align-items:center;user-select:none;border-top:var(--table-border)}.spectrum-Table-headCell.svelte-6mqswq.svelte-6mqswq:first-of-type{border-left:var(--table-border)}.spectrum-Table-headCell.svelte-6mqswq.svelte-6mqswq:last-of-type{border-right:var(--table-border)}.spectrum-Table-headCell--alignCenter.svelte-6mqswq.svelte-6mqswq{justify-content:center}.spectrum-Table-headCell--alignRight.svelte-6mqswq.svelte-6mqswq{justify-content:flex-end}.spectrum-Table-headCell--divider.svelte-6mqswq.svelte-6mqswq{padding-right:var(--cell-padding)}.spectrum-Table-headCell--divider.svelte-6mqswq+.spectrum-Table-headCell.svelte-6mqswq{padding-left:var(--cell-padding)}.spectrum-Table-headCell--edit.svelte-6mqswq.svelte-6mqswq{position:sticky;left:0;z-index:3}.spectrum-Table-headCell.svelte-6mqswq .title.svelte-6mqswq{overflow:hidden;text-overflow:ellipsis}.spectrum-Table-headCell.svelte-6mqswq:hover .spectrum-Table-editIcon.svelte-6mqswq{opacity:1;transition:opacity 0.2s ease}.spectrum-Table-headCell.svelte-6mqswq .spectrum-Icon.svelte-6mqswq{pointer-events:all;margin-left:var(\n --spectrum-table-header-sort-icon-gap,\n var(--spectrum-global-dimension-size-125)\n )}.spectrum-Table-editIcon.svelte-6mqswq.svelte-6mqswq,.spectrum-Table-autoIcon.svelte-6mqswq.svelte-6mqswq{width:var(--spectrum-global-dimension-size-150);height:var(--spectrum-global-dimension-size-150)}.spectrum-Table-editIcon.svelte-6mqswq.svelte-6mqswq{opacity:0}.spectrum-Table-row.svelte-6mqswq.svelte-6mqswq{display:contents}.spectrum-Table-row.svelte-6mqswq:hover .spectrum-Table-cell.svelte-6mqswq:after{background-color:var(--spectrum-alias-highlight-hover)}.wrapper--quiet.svelte-6mqswq .spectrum-Table-row.svelte-6mqswq{border-left:none;border-right:none}.spectrum-Table-row.svelte-6mqswq>.svelte-6mqswq:first-child{border-left:var(--table-border);padding-left:var(--cell-padding)}.spectrum-Table-row.svelte-6mqswq>.svelte-6mqswq:last-child{border-right:var(--table-border);padding-right:var(--cell-padding)}.spectrum-Table-cell.svelte-6mqswq.svelte-6mqswq{flex:1 1 auto;padding:0 calc(var(--cell-padding) / 1.33);border-top:none;border-bottom:none;border-radius:0;text-overflow:ellipsis;white-space:nowrap;height:var(--row-height);display:flex;flex-direction:row;justify-content:flex-start;align-items:center;gap:4px;border-bottom:1px solid var(--spectrum-alias-border-color-mid);background-color:var(--table-bg);z-index:1}.spectrum-Table-cell--divider.svelte-6mqswq.svelte-6mqswq{padding-right:var(--cell-padding)}.spectrum-Table-cell--divider.svelte-6mqswq+.spectrum-Table-cell.svelte-6mqswq{padding-left:var(--cell-padding)}.spectrum-Table-cell--edit.svelte-6mqswq.svelte-6mqswq{position:sticky;left:0;z-index:2}.spectrum-Table-cell.svelte-6mqswq.svelte-6mqswq:after{content:"";position:absolute;width:100%;height:100%;background-color:transparent;top:0;left:0;pointer-events:none;transition:background-color\n var(--spectrum-global-animation-duration-100, 0.13s) ease-in-out}.placeholder.svelte-6mqswq.svelte-6mqswq{display:flex;flex-direction:row;justify-content:center;align-items:center;border:var(--table-border);border-top:none;grid-column:1 / -1;background-color:var(--table-bg);padding:40px}.placeholder--no-fields.svelte-6mqswq.svelte-6mqswq{border-top:var(--table-border)}.placeholder--custom.svelte-6mqswq.svelte-6mqswq{justify-content:flex-start}.wrapper--quiet.svelte-6mqswq .placeholder.svelte-6mqswq{border-left:none;border-right:none}.placeholder-content.svelte-6mqswq.svelte-6mqswq{display:flex;flex-direction:column;justify-content:center;align-items:center;color:var(\n --spectrum-table-cell-text-color,\n var(--spectrum-alias-text-color)\n )}.placeholder-content.svelte-6mqswq div.svelte-6mqswq{margin-top:10px;font-size:var(\n --spectrum-table-cell-text-size,\n var(--spectrum-alias-font-size-default)\n );text-align:center}');const Jw=e=>({}),Zw=e=>({});function Qw(e,t,r){const n=e.slice();return n[55]=t[r],n[57]=r,n}function ek(e,t,r){const n=e.slice();return n[58]=t[r],n}function tk(e,t,r){const n=e.slice();return n[58]=t[r],n}function rk(e){let t,r,n,i,o,a,s=e[14].length&&ik(e);const c=[mk,dk],l=[];function u(e,t){return e[18]?.length?0:1}return n=u(e),i=l[n]=c[n](e),{c(){t=_("div"),s&&s.c(),r=L(),i.c(),j(t,"class","spectrum-Table svelte-6mqswq"),j(t,"style",o=`${e[17]}${e[19]}`)},m(e,i){D(e,t,i),s&&s.m(t,null),A(t,r),l[n].m(t,null),a=!0},p(e,p){e[14].length?s?(s.p(e,p),16384&p[0]&&Te(s,1)):(s=ik(e),s.c(),Te(s,1),s.m(t,r)):s&&(Ae(),$e(s,1,1,(()=>{s=null})),De());let d=n;n=u(e),n===d?l[n].p(e,p):(Ae(),$e(l[d],1,1,(()=>{l[d]=null})),De(),i=l[n],i?i.p(e,p):(i=l[n]=c[n](e),i.c()),Te(i,1),i.m(t,null)),(!a||655360&p[0]&&o!==(o=`${e[17]}${e[19]}`))&&j(t,"style",o)},i(e){a||(Te(s),Te(i),a=!0)},o(e){$e(s),$e(i),a=!1},d(e){e&&T(t),s&&s.d(),l[n].d()}}}function nk(e){let t,r,n;return r=new $o({}),{c(){t=_("div"),Pe(r.$$.fragment),j(t,"class","loading svelte-6mqswq"),j(t,"style",e[17])},m(e,i){D(e,t,i),je(r,t,null),n=!0},p(e,r){(!n||131072&r[0])&&j(t,"style",e[17])},i(e){n||(Te(r.$$.fragment,e),n=!0)},o(e){$e(r.$$.fragment,e),n=!1},d(e){e&&T(t),Fe(r)}}}function ik(e){let t,r,n,i=e[15]&&ok(e),o=e[14],a=[];for(let t=0;t<o.length;t+=1)a[t]=pk(tk(e,o,t));return{c(){t=_("div"),i&&i.c(),r=L();for(let e=0;e<a.length;e+=1)a[e].c();j(t,"class","spectrum-Table-head svelte-6mqswq")},m(e,o){D(e,t,o),i&&i.m(t,null),A(t,r);for(let e=0;e<a.length;e+=1)a[e].m(t,null);n=!0},p(e,n){if(e[15]?i?(i.p(e,n),32768&n[0]&&Te(i,1)):(i=ok(e),i.c(),Te(i,1),i.m(t,r)):i&&(Ae(),$e(i,1,1,(()=>{i=null})),De()),29378081&n[0]){let r;for(o=e[14],r=0;r<o.length;r+=1){const i=tk(e,o,r);a[r]?a[r].p(i,n):(a[r]=pk(i),a[r].c(),a[r].m(t,null))}for(;r<a.length;r+=1)a[r].d(1);a.length=o.length}},i(e){n||(Te(i),n=!0)},o(e){$e(i),n=!1},d(e){e&&T(t),i&&i.d(),$(a,e)}}}function ok(e){let t,r,n,i;const o=[sk,ak],a=[];function s(e,t){return e[3]?0:1}return r=s(e),n=a[r]=o[r](e),{c(){t=_("div"),n.c(),j(t,"class","spectrum-Table-headCell spectrum-Table-headCell--divider spectrum-Table-headCell--edit svelte-6mqswq")},m(e,n){D(e,t,n),a[r].m(t,null),i=!0},p(e,i){let c=r;r=s(e),r===c?a[r].p(e,i):(Ae(),$e(a[c],1,1,(()=>{a[c]=null})),De(),n=a[r],n?n.p(e,i):(n=a[r]=o[r](e),n.c()),Te(n,1),n.m(t,null))},i(e){i||(Te(n),i=!0)},o(e){$e(n),i=!1},d(e){e&&T(t),a[r].d()}}}function ak(e){let t;return{c(){t=M("Edit")},m(e,r){D(e,t,r)},p:r,i:r,o:r,d(e){e&&T(t)}}}function sk(e){let t,r,n;function i(t){e[38](t)}let o={};return void 0!==e[16]&&(o.value=e[16]),t=new po({props:o}),le.push((()=>Be(t,"value",i))),t.$on("change",e[27]),{c(){Pe(t.$$.fragment)},m(e,r){je(t,e,r),n=!0},p(e,n){const i={};!r&&65536&n[0]&&(r=!0,i.value=e[16],ge((()=>r=!1))),t.$set(i)},i(e){n||(Te(t.$$.fragment,e),n=!0)},o(e){$e(t.$$.fragment,e),n=!1},d(e){Fe(t,e)}}}function ck(e){let t,r;return{c(){t=E("svg"),r=E("use"),R(r,"xlink:href","#spectrum-icon-18-MagicWand"),j(t,"class","spectrum-Icon spectrum-Table-autoIcon svelte-6mqswq"),j(t,"focusable","false")},m(e,n){D(e,t,n),A(t,r)},d(e){e&&T(t)}}}function lk(e){let t,r;return{c(){t=E("svg"),r=E("use"),R(r,"xlink:href","#spectrum-css-icon-Arrow100"),j(t,"class","spectrum-Icon spectrum-UIIcon-ArrowDown100 spectrum-Table-sortedIcon svelte-6mqswq"),j(t,"focusable","false"),j(t,"aria-hidden","true")},m(e,n){D(e,t,n),A(t,r)},d(e){e&&T(t)}}}function uk(e){let t,r,n,i;function o(...t){return e[39](e[58],...t)}return{c(){t=E("svg"),r=E("use"),R(r,"xlink:href","#spectrum-icon-18-Edit"),j(t,"class","spectrum-Icon spectrum-Table-editIcon svelte-6mqswq"),j(t,"focusable","false")},m(e,a){D(e,t,a),A(t,r),n||(i=O(t,"click",o),n=!0)},p(t,r){e=t},d(e){e&&T(t),n=!1,i()}}}function pk(e){let t,r,n,i,o,a,s,c,l,u=e[23](e[0][e[58]])+"",p=e[0][e[58]]?.autocolumn&&ck(),d=e[9]===e[58]&&lk(),m=e[5]&&!1!==e[0][e[58]]?.editable&&uk(e);function f(){return e[40](e[58])}return{c(){t=_("div"),r=_("div"),n=M(u),i=L(),p&&p.c(),o=L(),d&&d.c(),a=L(),m&&m.c(),s=L(),j(r,"class","title svelte-6mqswq"),j(t,"class","spectrum-Table-headCell svelte-6mqswq"),X(t,"spectrum-Table-headCell--alignCenter","Center"===e[0][e[58]].align),X(t,"spectrum-Table-headCell--alignRight","Right"===e[0][e[58]].align),X(t,"is-sortable",!1!==e[0][e[58]].sortable),X(t,"is-sorted-desc",e[9]===e[58]&&"Descending"===e[10]),X(t,"is-sorted-asc",e[9]===e[58]&&"Ascending"===e[10])},m(e,u){D(e,t,u),A(t,r),A(r,n),A(t,i),p&&p.m(t,null),A(t,o),d&&d.m(t,null),A(t,a),m&&m.m(t,null),A(t,s),c||(l=O(t,"click",f),c=!0)},p(r,i){e=r,16385&i[0]&&u!==(u=e[23](e[0][e[58]])+"")&&q(n,u),e[0][e[58]]?.autocolumn?p||(p=ck(),p.c(),p.m(t,o)):p&&(p.d(1),p=null),e[9]===e[58]?d||(d=lk(),d.c(),d.m(t,a)):d&&(d.d(1),d=null),e[5]&&!1!==e[0][e[58]]?.editable?m?m.p(e,i):(m=uk(e),m.c(),m.m(t,s)):m&&(m.d(1),m=null),16385&i[0]&&X(t,"spectrum-Table-headCell--alignCenter","Center"===e[0][e[58]].align),16385&i[0]&&X(t,"spectrum-Table-headCell--alignRight","Right"===e[0][e[58]].align),16385&i[0]&&X(t,"is-sortable",!1!==e[0][e[58]].sortable),17920&i[0]&&X(t,"is-sorted-desc",e[9]===e[58]&&"Descending"===e[10]),17920&i[0]&&X(t,"is-sorted-asc",e[9]===e[58]&&"Ascending"===e[10])},d(e){e&&T(t),p&&p.d(),d&&d.d(),m&&m.d(),c=!1,l()}}}function dk(e){let t,r,n,i;const o=[hk,fk],a=[];function s(e,t){return e[8]?0:1}return r=s(e),n=a[r]=o[r](e),{c(){t=_("div"),n.c(),j(t,"class","placeholder svelte-6mqswq"),X(t,"placeholder--custom",e[8]),X(t,"placeholder--no-fields",!e[14]?.length)},m(e,n){D(e,t,n),a[r].m(t,null),i=!0},p(e,i){let c=r;r=s(e),r===c?a[r].p(e,i):(Ae(),$e(a[c],1,1,(()=>{a[c]=null})),De(),n=a[r],n?n.p(e,i):(n=a[r]=o[r](e),n.c()),Te(n,1),n.m(t,null)),256&i[0]&&X(t,"placeholder--custom",e[8]),16384&i[0]&&X(t,"placeholder--no-fields",!e[14]?.length)},i(e){i||(Te(n),i=!0)},o(e){$e(n),i=!1},d(e){e&&T(t),a[r].d()}}}function mk(e){let t,r,n=e[18],i=[];for(let t=0;t<n.length;t+=1)i[t]=yk(Qw(e,n,t));const o=e=>$e(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=I()},m(e,n){for(let t=0;t<i.length;t+=1)i[t].m(e,n);D(e,t,n),r=!0},p(e,r){if(104120411&r[0]|65536&r[1]){let a;for(n=e[18],a=0;a<n.length;a+=1){const o=Qw(e,n,a);i[a]?(i[a].p(o,r),Te(i[a],1)):(i[a]=yk(o),i[a].c(),Te(i[a],1),i[a].m(t.parentNode,t))}for(Ae(),a=n.length;a<i.length;a+=1)o(a);De()}},i(e){if(!r){for(let e=0;e<n.length;e+=1)Te(i[e]);r=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)$e(i[e]);r=!1},d(e){$(i,e),e&&T(t)}}}function fk(e){let t;return{c(){t=_("div"),t.innerHTML='<svg class="spectrum-Icon spectrum-Icon--sizeXXL" focusable="false"><use xlink:href="#spectrum-icon-18-Table"></use></svg> \n <div class="svelte-6mqswq">No rows found</div>',j(t,"class","placeholder-content svelte-6mqswq")},m(e,r){D(e,t,r)},p:r,i:r,o:r,d(e){e&&T(t)}}}function hk(e){let t;const r=e[37].placeholder,n=p(r,e,e[47],Zw);return{c(){n&&n.c()},m(e,r){n&&n.m(e,r),t=!0},p(e,i){n&&n.p&&(!t||65536&i[1])&&m(n,r,e,e[47],i,Jw,Zw)},i(e){t||(Te(n,e),t=!0)},o(e){$e(n,e),t=!1},d(e){n&&n.d(e)}}}function gk(e){let t,r,n,i,o;function a(...t){return e[41](e[55],...t)}function s(...t){return e[42](e[55],...t)}function c(...t){return e[43](e[55],...t)}return r=new Kw({props:{data:e[55],selected:-1!==e[1].findIndex(a),onEdit:s,allowSelectRows:e[3],allowEditRows:e[4]}}),{c(){t=_("div"),Pe(r.$$.fragment),j(t,"class","spectrum-Table-cell spectrum-Table-cell--divider spectrum-Table-cell--edit svelte-6mqswq")},m(e,a){D(e,t,a),je(r,t,null),n=!0,i||(o=O(t,"click",c),i=!0)},p(t,n){e=t;const i={};262144&n[0]&&(i.data=e[55]),262146&n[0]&&(i.selected=-1!==e[1].findIndex(a)),262144&n[0]&&(i.onEdit=s),8&n[0]&&(i.allowSelectRows=e[3]),16&n[0]&&(i.allowEditRows=e[4]),r.$set(i)},i(e){n||(Te(r.$$.fragment,e),n=!0)},o(e){$e(r.$$.fragment,e),n=!1},d(e){e&&T(t),Fe(r),i=!1,o()}}}function vk(e){let t;const r=e[37].default,n=p(r,e,e[47],null);return{c(){n&&n.c()},m(e,r){n&&n.m(e,r),t=!0},p(e,i){n&&n.p&&(!t||65536&i[1])&&m(n,r,e,e[47],i,null,null)},i(e){t||(Te(n,e),t=!0)},o(e){$e(n,e),t=!1},d(e){n&&n.d(e)}}}function bk(e){let t,r,n,i,o,a;function s(){return e[45](e[58],e[55])}return r=new Uw({props:{customRenderers:e[6],row:e[55],schema:e[0][e[58]],value:wr(e[55],e[58]),$$slots:{default:[vk]},$$scope:{ctx:e}}}),r.$on("clickrelationship",e[44]),{c(){t=_("div"),Pe(r.$$.fragment),j(t,"class","spectrum-Table-cell svelte-6mqswq"),j(t,"style",n=e[20][e[58]]),X(t,"spectrum-Table-cell--divider",!!e[0][e[58]].divider)},m(e,n){D(e,t,n),je(r,t,null),i=!0,o||(a=O(t,"click",s),o=!0)},p(o,a){e=o;const s={};64&a[0]&&(s.customRenderers=e[6]),262144&a[0]&&(s.row=e[55]),16385&a[0]&&(s.schema=e[0][e[58]]),278528&a[0]&&(s.value=wr(e[55],e[58])),65536&a[1]&&(s.$$scope={dirty:a,ctx:e}),r.$set(s),(!i||1064960&a[0]&&n!==(n=e[20][e[58]]))&&j(t,"style",n),16385&a[0]&&X(t,"spectrum-Table-cell--divider",!!e[0][e[58]].divider)},i(e){i||(Te(r.$$.fragment,e),i=!0)},o(e){$e(r.$$.fragment,e),i=!1},d(e){e&&T(t),Fe(r),o=!1,a()}}}function yk(e){let t,r,n,i,o=e[15]&&gk(e),a=e[14],s=[];for(let t=0;t<a.length;t+=1)s[t]=bk(ek(e,a,t));const c=e=>$e(s[e],1,1,(()=>{s[e]=null}));return{c(){t=_("div"),o&&o.c(),r=L();for(let e=0;e<s.length;e+=1)s[e].c();n=L(),j(t,"class","spectrum-Table-row svelte-6mqswq")},m(e,a){D(e,t,a),o&&o.m(t,null),A(t,r);for(let e=0;e<s.length;e+=1)s[e].m(t,null);A(t,n),i=!0},p(e,i){if(e[15]?o?(o.p(e,i),32768&i[0]&&Te(o,1)):(o=gk(e),o.c(),Te(o,1),o.m(t,r)):o&&(Ae(),$e(o,1,1,(()=>{o=null})),De()),70533185&i[0]|65536&i[1]){let r;for(a=e[14],r=0;r<a.length;r+=1){const o=ek(e,a,r);s[r]?(s[r].p(o,i),Te(s[r],1)):(s[r]=bk(o),s[r].c(),Te(s[r],1),s[r].m(t,n))}for(Ae(),r=a.length;r<s.length;r+=1)c(r);De()}},i(e){if(!i){Te(o);for(let e=0;e<a.length;e+=1)Te(s[e]);i=!0}},o(e){$e(o),s=s.filter(Boolean);for(let e=0;e<s.length;e+=1)$e(s[e]);i=!1},d(e){e&&T(t),o&&o.d(),$(s,e)}}}function xk(e){let t,r,n,i,o,a;const s=[nk,rk],c=[];function l(e,t){return e[12]?1:0}return r=l(e),n=c[r]=s[r](e),{c(){t=_("div"),n.c(),j(t,"class","wrapper svelte-6mqswq"),j(t,"style",i=`--row-height: ${e[13]}px; --header-height: ${wk}px;`),he((()=>e[46].call(t))),X(t,"wrapper--quiet",e[2]),X(t,"wrapper--compact",e[7])},m(n,i){D(n,t,i),c[r].m(t,null),o=function(e,t){"static"===getComputedStyle(e).position&&(e.style.position="relative");const r=_("iframe");r.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),r.setAttribute("aria-hidden","true"),r.tabIndex=-1;const n=W();let i;return n?(r.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",i=O(window,"message",(e=>{e.source===r.contentWindow&&t()}))):(r.src="about:blank",r.onload=()=>{i=O(r.contentWindow,"resize",t)}),A(e,r),()=>{(n||i&&r.contentWindow)&&i(),T(r)}}(t,e[46].bind(t)),a=!0},p(e,o){let u=r;r=l(e),r===u?c[r].p(e,o):(Ae(),$e(c[u],1,1,(()=>{c[u]=null})),De(),n=c[r],n?n.p(e,o):(n=c[r]=s[r](e),n.c()),Te(n,1),n.m(t,null)),(!a||8192&o[0]&&i!==(i=`--row-height: ${e[13]}px; --header-height: ${wk}px;`))&&j(t,"style",i),4&o[0]&&X(t,"wrapper--quiet",e[2]),128&o[0]&&X(t,"wrapper--compact",e[7])},i(e){a||(Te(n),a=!0)},o(e){$e(n),a=!1},d(e){e&&T(t),c[r].d(),o()}}}const wk=36;function kk(e,t,r){let n,i,o,a,s,c,l,u,p,d,{$$slots:m={},$$scope:f}=t,{data:h=[]}=t,{schema:g={}}=t,{showAutoColumns:v=!1}=t,{rowCount:b=0}=t,{quiet:y=!1}=t,{loading:x=!1}=t,{allowSelectRows:w}=t,{allowEditRows:k=!0}=t,{allowEditColumns:C=!0}=t,{selectedRows:z=[]}=t,{customRenderers:S=[]}=t,{disableSorting:A=!1}=t,{autoSortColumns:D=!0}=t,{compact:T=!1}=t,{customPlaceholder:$=!1}=t;const _=ie();let E,M,L=0,I=!1,O=!1;const B=e=>{!1!==e.sortable&&(e.name===E?r(10,M="Descending"===M?"Ascending":"Descending"):(r(9,E=e.name),r(10,M="Descending")),_("sort",{column:E,order:M}))},P=e=>{let t=e?.displayName;return e&&void 0===t&&(t=e.name),t||""},j=(e,t)=>{e.stopPropagation(),_("editcolumn",t)},F=(e,t)=>{e.stopPropagation(),_("editrow",kr(t))},R=e=>{w&&(z.some((t=>t._id===e._id))?r(1,z=z.filter((t=>t._id!==e._id))):r(1,z=[...z,e]))};return e.$$set=e=>{"data"in e&&r(28,h=e.data),"schema"in e&&r(0,g=e.schema),"showAutoColumns"in e&&r(29,v=e.showAutoColumns),"rowCount"in e&&r(30,b=e.rowCount),"quiet"in e&&r(2,y=e.quiet),"loading"in e&&r(31,x=e.loading),"allowSelectRows"in e&&r(3,w=e.allowSelectRows),"allowEditRows"in e&&r(4,k=e.allowEditRows),"allowEditColumns"in e&&r(5,C=e.allowEditColumns),"selectedRows"in e&&r(1,z=e.selectedRows),"customRenderers"in e&&r(6,S=e.customRenderers),"disableSorting"in e&&r(32,A=e.disableSorting),"autoSortColumns"in e&&r(33,D=e.autoSortColumns),"compact"in e&&r(7,T=e.compact),"customPlaceholder"in e&&r(8,$=e.customPlaceholder),"$$scope"in e&&r(47,f=e.$$scope)},e.$$.update=()=>{if(128&e.$$.dirty[0]&&r(13,n=T?46:55),1&e.$$.dirty[0]&&r(0,g=(e=>{let t={};return Object.entries(e||{}).forEach((([e,r])=>{t[e]="string"==typeof r?{type:r,name:e}:{...r,name:e}})),t})(g)),1&e.$$.dirty[1]&&(x||r(12,I=!0)),536870913&e.$$.dirty[0]|4&e.$$.dirty[1]&&r(14,i=((e,t,r)=>{let n=[],i=[];return Object.entries(e||{}).forEach((([e,o])=>{e&&o&&(r&&o?.autocolumn?t&&i.push(o):n.push(o))})),n.sort(((e,t)=>{const r=e.order||Number.MAX_SAFE_INTEGER,n=t.order||Number.MAX_SAFE_INTEGER,i=P(e),o=P(t);return r!==n?r<n?r:n:i<o?e:t})).concat(i).map((e=>e.name))})(g,v,D)),268451840&e.$$.dirty[0]&&r(34,o=i?.length&&h||[]),8&e.$$.dirty[1]&&r(35,a=o?.length||0),1073756160&e.$$.dirty[0]|8&e.$$.dirty[1]&&r(36,s=((e,t,r,n,i)=>e?n?Math.min(r,n):Math.min(r,Math.ceil(t/i)):n||0)(I,L,o.length,b,n)),1073750016&e.$$.dirty[0]|48&e.$$.dirty[1]&&r(17,c=((e,t,r,n)=>!t||!e||r<=t?"":`height: ${wk+e*n}px;`)(s,b,a,n)),1536&e.$$.dirty[0]|8&e.$$.dirty[1]&&r(18,l=((e,t,r)=>t&&r&&!A?e.slice().sort(((e,n)=>{const i=e[t],o=n[t];return"Descending"===r?i>o?-1:1:i>o?1:-1})):e)(o,E,M)),24&e.$$.dirty[0]&&r(15,p=k||w),49153&e.$$.dirty[0]&&r(19,u=((e,t,r)=>{let n="grid-template-columns:";return r&&(n+=" auto"),e?.forEach((e=>{const r=t[e];r.width?n+=` ${r.width}`:n+=" minmax(auto, 1fr)"})),n+=";",n})(i,g,p)),1&e.$$.dirty[0]&&r(20,d=(e=>{let t={};return Object.keys(e||{}).forEach((r=>{t[r]="",e[r].color&&(t[r]+=`color: ${e[r].color};`),e[r].background&&(t[r]+=`background-color: ${e[r].background};`),"Center"===e[r].align&&(t[r]+="justify-content: center; text-align: center;"),"Right"===e[r].align&&(t[r]+="justify-content: flex-end; text-align: right;")})),t})(g)),2&e.$$.dirty[0]|8&e.$$.dirty[1]){0===o.filter((e=>z.some((t=>e._id===t._id)))).length&&r(16,O=!1)}},[g,z,y,w,k,C,S,T,$,E,M,L,I,n,i,p,O,c,l,u,d,_,B,P,j,F,R,e=>{!!e.detail?o.forEach((e=>{-1===z.findIndex((t=>t._id===e._id))&&z.push(e)})):r(1,z=z.filter((e=>o.every((t=>t._id!==e._id)))))},h,v,b,x,A,D,o,a,s,m,function(e){O=e,r(16,O),r(34,o),r(1,z),r(14,i),r(28,h),r(0,g),r(29,v),r(33,D)},(e,t)=>j(t,e),e=>B(g[e]),(e,t)=>t._id===e._id,(e,t)=>F(t,e),(e,t)=>{R(e),t.stopPropagation()},function(t){se(e,t)},(e,t)=>{g[e]?.preventSelectRow||(_("click",t),R(t))},function(){L=this.offsetHeight,r(11,L)},f]}class Ck extends Ne{constructor(e){super(),Re(this,e,kk,xk,l,{data:28,schema:0,showAutoColumns:29,rowCount:30,quiet:2,loading:31,allowSelectRows:3,allowEditRows:4,allowEditColumns:5,selectedRows:1,customRenderers:6,disableSorting:32,autoSortColumns:33,compact:7,customPlaceholder:8},[-1,-1,-1])}}t('.spectrum-Tabs {\n --spectrum-tabs-focus-ring-border-radius: var(--spectrum-tabs-m-focus-ring-border-radius);\n --spectrum-tabs-compact-item-height: var(--spectrum-tabs-m-compact-item-height, var(--spectrum-alias-item-height-m));\n --spectrum-tabs-compact-vertical-item-height: var(--spectrum-tabs-m-compact-vertical-item-height, var(--spectrum-global-dimension-size-400));\n --spectrum-tabs-compact-vertical-item-gap: var(--spectrum-tabs-m-compact-vertical-item-gap, var(--spectrum-global-dimension-size-50));\n --spectrum-tabs-text-font-weight: var(--spectrum-tabs-m-text-font-weight, var(--spectrum-alias-body-text-font-weight));\n --spectrum-tabs-rule-border-radius: var(--spectrum-tabs-m-rule-border-radius, var(--spectrum-global-dimension-static-size-10));\n --spectrum-tabs-rule-size: var(--spectrum-tabs-m-rule-size, var(--spectrum-alias-border-size-thick));\n --spectrum-tabs-focus-ring-size: var(--spectrum-tabs-m-focus-ring-size, var(--spectrum-alias-border-size-thick));\n --spectrum-tabs-text-size: var(--spectrum-tabs-m-text-size, var(--spectrum-alias-item-text-size-m));\n --spectrum-tabs-height: var(--spectrum-tabs-m-height, var(--spectrum-global-dimension-size-600));\n --spectrum-tabs-item-height: var(--spectrum-tabs-m-item-height, var(--spectrum-alias-item-height-m));\n --spectrum-tabs-icon-gap: var(--spectrum-tabs-m-icon-gap, var(--spectrum-alias-item-workflow-icon-gap-m));\n --spectrum-tabs-focus-ring-height: var(--spectrum-tabs-m-focus-ring-height, var(--spectrum-alias-item-height-m));\n --spectrum-tabs-focus-ring-padding-x: var(--spectrum-tabs-m-focus-ring-padding-x, var(--spectrum-alias-item-padding-m));\n --spectrum-tabs-item-gap: var(--spectrum-tabs-m-item-gap, var(--spectrum-global-dimension-size-300));\n --spectrum-tabs-selection-indicator-animation-duration: var(--spectrum-tabs-m-selection-indicator-animation-duration, var(--spectrum-global-animation-duration-100));\n --spectrum-tabs-vertical-rule-size: var(--spectrum-tabs-m-vertical-rule-size, var(--spectrum-alias-border-size-thick));\n --spectrum-tabs-vertical-item-height: var(--spectrum-tabs-m-vertical-item-height, var(--spectrum-global-dimension-size-550));\n --spectrum-tabs-vertical-item-gap: var(--spectrum-tabs-m-vertical-item-gap, var(--spectrum-global-dimension-size-50));\n --spectrum-tabs-vertical-item-margin-left: var(--spectrum-tabs-m-vertical-item-margin-left, var(--spectrum-global-dimension-size-150));\n --spectrum-tabs-quiet-compact-height: var(--spectrum-tabs-quiet-m-compact-height, var(--spectrum-alias-item-height-m));\n}\n\n.spectrum-Tabs {\n --spectrum-tabs-item-height: calc(var(--spectrum-tabs-height) - var(--spectrum-tabs-rule-size));\n --spectrum-tabs-compact-item-height: calc(var(--spectrum-tabs-quiet-compact-height) - var(--spectrum-tabs-rule-size));\n --spectrum-tabs-text-size: var(--spectrum-alias-font-size-default, var(--spectrum-global-dimension-font-size-100));\n}\n\n.spectrum-Tabs {\n display: -ms-flexbox;\n display: flex;\n position: relative;\n z-index: 0;\n\n margin: 0;\n padding-top: 0;\n padding-bottom: 0;\n padding-left: var(--spectrum-tabs-focus-ring-padding-x);\n padding-right: var(--spectrum-tabs-focus-ring-padding-x);\n vertical-align: top;\n}\n\n.spectrum-Tabs-item {\n position: relative;\n\n box-sizing: border-box;\n\n height: var(--spectrum-tabs-item-height);\n line-height: var(--spectrum-tabs-item-height);\n z-index: 1;\n\n text-decoration: none;\n white-space: nowrap;\n\n transition: color var(--spectrum-global-animation-duration-100, 130ms) ease-out;\n cursor: pointer;\n outline: none;\n}\n\n.spectrum-Tabs-item.is-disabled {\n cursor: default;\n }\n\n.spectrum-Tabs-item.is-disabled .spectrum-Tabs-itemLabel {\n cursor: default;\n }\n\n.spectrum-Tabs-item .spectrum-Icon {\n height: var(--spectrum-tabs-item-height);\n }\n\n[dir="ltr"] .spectrum-Tabs-item .spectrum-Icon + .spectrum-Tabs-itemLabel {\n margin-left: calc(var(--spectrum-tabs-icon-gap) - var(--spectrum-global-dimension-size-40));\n}\n\n[dir="rtl"] .spectrum-Tabs-item .spectrum-Icon + .spectrum-Tabs-itemLabel {\n margin-right: calc(var(--spectrum-tabs-icon-gap) - var(--spectrum-global-dimension-size-40));\n}\n\n[dir="ltr"] .spectrum-Tabs-item::before {\n left: calc(-1 * var(--spectrum-tabs-focus-ring-padding-x));\n}\n\n[dir="rtl"] .spectrum-Tabs-item::before {\n right: calc(-1 * var(--spectrum-tabs-focus-ring-padding-x));\n}\n\n[dir="ltr"] .spectrum-Tabs-item::before {\n right: calc(-1 * var(--spectrum-tabs-focus-ring-padding-x));\n}\n\n[dir="rtl"] .spectrum-Tabs-item::before {\n left: calc(-1 * var(--spectrum-tabs-focus-ring-padding-x));\n}\n\n.spectrum-Tabs-item::before {\n content: \'\';\n position: absolute;\n top: 50%;\n\n box-sizing: border-box;\n\n height: var(--spectrum-tabs-focus-ring-height);\n margin-top: calc(var(--spectrum-tabs-focus-ring-height) / -2 + var(--spectrum-tabs-rule-size) / 2);\n border: var(--spectrum-tabs-focus-ring-size) solid transparent;\n border-radius: var(--spectrum-tabs-focus-ring-border-radius);\n\n pointer-events: none;\n }\n\n.spectrum-Tabs-itemLabel {\n cursor: pointer;\n vertical-align: top;\n display: inline-block;\n\n font-size: var(--spectrum-tabs-text-size);\n font-weight: var(--spectrum-tabs-text-font-weight);\n text-decoration: none;\n}\n\n.spectrum-Tabs-itemLabel:empty {\n display: none;\n }\n\n[dir="ltr"] .spectrum-Tabs-selectionIndicator {\n left: 0;\n}\n\n[dir="rtl"] .spectrum-Tabs-selectionIndicator {\n right: 0;\n}\n\n.spectrum-Tabs-selectionIndicator {\n position: absolute;\n z-index: 0;\n\n transition: transform var(--spectrum-tabs-selection-indicator-animation-duration) ease-in-out;\n transform-origin: top left;\n\n border-radius: var(--spectrum-tabs-rule-border-radius);\n}\n\n.spectrum-Tabs--compact .spectrum-Tabs-item {\n height: var(--spectrum-tabs-compact-item-height);\n line-height: var(--spectrum-tabs-compact-item-height);\n }\n\n.spectrum-Tabs--compact .spectrum-Tabs-item .spectrum-Icon {\n height: var(--spectrum-tabs-compact-item-height);\n }\n\n.spectrum-Tabs--horizontal {\n -ms-flex-align: center;\n align-items: center;\n\n border-bottom: var(--spectrum-tabs-rule-size) solid;\n}\n\n.spectrum-Tabs--horizontal .spectrum-Tabs-item {\n vertical-align: top;\n }\n\n[dir="ltr"] .spectrum-Tabs--horizontal .spectrum-Tabs-item + *:not(.spectrum-Tabs-selectionIndicator) {\n margin-left: var(--spectrum-tabs-item-gap);\n}\n\n[dir="rtl"] .spectrum-Tabs--horizontal .spectrum-Tabs-item + *:not(.spectrum-Tabs-selectionIndicator) {\n margin-right: var(--spectrum-tabs-item-gap);\n}\n\n.spectrum-Tabs--horizontal .spectrum-Tabs-selectionIndicator {\n position: absolute;\n bottom: 0;\n height: var(--spectrum-tabs-rule-size);\n\n bottom: calc(-1 * var(--spectrum-tabs-rule-size));\n }\n\n.spectrum-Tabs--horizontal.spectrum-Tabs--compact {\n box-sizing: content-box;\n height: var(--spectrum-tabs-compact-item-height);\n -ms-flex-align: end;\n align-items: end;\n }\n\n.spectrum-Tabs--quiet {\n display: -ms-inline-flexbox;\n display: inline-flex;\n}\n\n[dir="ltr"] .spectrum-Tabs--vertical {\n border-left: var(--spectrum-tabs-vertical-rule-size) solid;\n}\n\n[dir="rtl"] .spectrum-Tabs--vertical {\n border-right: var(--spectrum-tabs-vertical-rule-size) solid;\n}\n\n.spectrum-Tabs--vertical {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-direction: column;\n flex-direction: column;\n padding: 0;\n}\n\n[dir="ltr"] .spectrum-Tabs--vertical .spectrum-Tabs-item {\n margin-left: calc(var(--spectrum-tabs-vertical-item-margin-left) - var(--spectrum-tabs-focus-ring-padding-x));\n}\n\n[dir="rtl"] .spectrum-Tabs--vertical .spectrum-Tabs-item {\n margin-right: calc(var(--spectrum-tabs-vertical-item-margin-left) - var(--spectrum-tabs-focus-ring-padding-x));\n}\n\n.spectrum-Tabs--vertical .spectrum-Tabs-item {\n height: var(--spectrum-tabs-vertical-item-height);\n padding-top: 0;\n padding-bottom: 0;\n padding-left: var(--spectrum-tabs-focus-ring-padding-x);\n padding-right: var(--spectrum-tabs-focus-ring-padding-x);\n margin-bottom: var(--spectrum-tabs-vertical-item-gap);\n }\n\n[dir="ltr"] .spectrum-Tabs--vertical .spectrum-Tabs-item::before {\n left: calc(-1 * var(--spectrum-tabs-focus-ring-size));\n}\n\n[dir="rtl"] .spectrum-Tabs--vertical .spectrum-Tabs-item::before {\n right: calc(-1 * var(--spectrum-tabs-focus-ring-size));\n}\n\n[dir="ltr"] .spectrum-Tabs--vertical .spectrum-Tabs-item::before {\n right: calc(-1 * var(--spectrum-tabs-focus-ring-size));\n}\n\n[dir="rtl"] .spectrum-Tabs--vertical .spectrum-Tabs-item::before {\n left: calc(-1 * var(--spectrum-tabs-focus-ring-size));\n}\n\n.spectrum-Tabs--vertical .spectrum-Tabs-item::before {\n margin-top: calc(var(--spectrum-tabs-focus-ring-height) / -2);\n }\n\n.spectrum-Tabs--vertical.spectrum-Tabs--compact .spectrum-Tabs-item {\n height: var(--spectrum-tabs-compact-vertical-item-height);\n line-height: var(--spectrum-tabs-compact-vertical-item-height);\n margin-bottom: var(--spectrum-tabs-compact-vertical-item-gap);\n }\n\n.spectrum-Tabs--vertical.spectrum-Tabs--compact .spectrum-Tabs-item .spectrum-Icon {\n height: var(--spectrum-tabs-compact-vertical-item-height);\n }\n\n[dir="ltr"] .spectrum-Tabs--vertical .spectrum-Tabs-selectionIndicator {\n left: 0px;\n}\n\n[dir="rtl"] .spectrum-Tabs--vertical .spectrum-Tabs-selectionIndicator {\n right: 0px;\n}\n\n[dir="ltr"] .spectrum-Tabs--vertical .spectrum-Tabs-selectionIndicator {\n\n left: calc(-1 * var(--spectrum-tabs-vertical-rule-size));\n}\n\n[dir="rtl"] .spectrum-Tabs--vertical .spectrum-Tabs-selectionIndicator {\n\n right: calc(-1 * var(--spectrum-tabs-vertical-rule-size));\n}\n\n.spectrum-Tabs--vertical .spectrum-Tabs-selectionIndicator {\n position: absolute;\n width: var(--spectrum-tabs-vertical-rule-size);\n }\n\n.spectrum-Tabs {\n border-bottom-color: var(--spectrum-tabs-m-rule-color, var(--spectrum-alias-border-color-light));\n}\n\n[dir="ltr"] .spectrum-Tabs--vertical {\n border-left-color: var(--spectrum-tabs-m-vertical-rule-color, var(--spectrum-alias-border-color-light));\n}\n\n[dir="rtl"] .spectrum-Tabs--vertical {\n border-right-color: var(--spectrum-tabs-m-vertical-rule-color, var(--spectrum-alias-border-color-light));\n}\n\n.spectrum-Tabs-selectionIndicator {\n background-color: var(--spectrum-tabs-m-selection-indicator-color, var(--spectrum-global-color-gray-900));\n}\n\n.spectrum-Tabs-item {\n color: var(--spectrum-tabs-m-text-color, var(--spectrum-alias-label-text-color));\n}\n\n.spectrum-Tabs-item .spectrum-Icon {\n color: var(--spectrum-tabs-m-icon-color, var(--spectrum-alias-icon-color))\n }\n\n.spectrum-Tabs-item:hover {\n color: var(--spectrum-tabs-m-text-color-hover, var(--spectrum-alias-text-color-hover));\n }\n\n.spectrum-Tabs-item:hover .spectrum-Icon {\n color: var(--spectrum-tabs-m-icon-color-hover, var(--spectrum-alias-icon-color-hover))\n }\n\n.spectrum-Tabs-item.is-selected {\n color: var(--spectrum-tabs-m-text-color-selected, var(--spectrum-global-color-gray-900));\n }\n\n.spectrum-Tabs-item.is-selected .spectrum-Icon {\n color: var(--spectrum-tabs-m-icon-color-selected, var(--spectrum-global-color-gray-900))\n }\n\n.spectrum-Tabs-item.focus-ring {\n color: var(--spectrum-tabs-m-text-color-key-focus, var(--spectrum-alias-text-color-hover));\n }\n\n.spectrum-Tabs-item.focus-ring::before {\n border-color: var(--spectrum-tabs-m-focus-ring-color, var(--spectrum-alias-border-color-focus));\n }\n\n.spectrum-Tabs-item.focus-ring .spectrum-Icon {\n color: var(--spectrum-tabs-m-icon-color-key-focus, var(--spectrum-alias-icon-color-focus))\n }\n\n.spectrum-Tabs-item.is-disabled {\n color: var(--spectrum-tabs-m-text-color-disabled, var(--spectrum-alias-text-color-disabled));\n }\n\n.spectrum-Tabs-item.is-disabled .spectrum-Icon {\n color: var(--spectrum-tabs-m-icon-color-disabled, var(--spectrum-alias-icon-color-disabled))\n }\n\n.spectrum-Tabs--quiet {\n border-bottom-color: var(--spectrum-tabs-quiet-m-rule-color, var(--spectrum-alias-border-color-transparent));\n}\n\n.spectrum-Tabs--quiet .spectrum-Tabs-selectionIndicator {\n background-color: var(--spectrum-tabs-quiet-m-selection-indicator-color, var(--spectrum-global-color-gray-900));\n }\n\n[dir="ltr"] .spectrum-Tabs--vertical.spectrum-Tabs--quiet,[dir="ltr"] \n .spectrum-Tabs--vertical.spectrum-Tabs--compact {\n border-left-color: var(--spectrum-tabs-quiet-m-vertical-rule-color, var(--spectrum-alias-border-color-transparent));\n}\n\n[dir="rtl"] .spectrum-Tabs--vertical.spectrum-Tabs--quiet,[dir="rtl"] \n .spectrum-Tabs--vertical.spectrum-Tabs--compact {\n border-right-color: var(--spectrum-tabs-quiet-m-vertical-rule-color, var(--spectrum-alias-border-color-transparent));\n}\n\n.spectrum-Tabs--vertical.spectrum-Tabs--quiet .spectrum-Tabs-selectionIndicator, .spectrum-Tabs--vertical.spectrum-Tabs--compact .spectrum-Tabs-selectionIndicator {\n background-color: var(--spectrum-tabs-quiet-m-selection-indicator-color, var(--spectrum-global-color-gray-900));\n }\n');function zk(e){let t,r;return{c(){t=_("div"),j(t,"class","spectrum-Tabs-selectionIndicator indicator-transition svelte-14e5lpv"),j(t,"style",r=(e[4]&&"background-color: var(--spectrum-global-color-blue-400)")+"; width: "+e[10]+"; height: "+e[11]+"; left: "+e[9]+"; top: "+e[8]+";")},m(e,r){D(e,t,r)},p(e,n){3856&n&&r!==(r=(e[4]&&"background-color: var(--spectrum-global-color-blue-400)")+"; width: "+e[10]+"; height: "+e[11]+"; left: "+e[9]+"; top: "+e[8]+";")&&j(t,"style",r)},d(e){e&&T(t)}}}function Sk(e){let t,r,n,i,o,a;const s=e[17].default,c=p(s,e,e[16],null);let l=e[6].info&&zk(e);return{c(){t=_("div"),c&&c.c(),r=L(),l&&l.c(),i=L(),o=_("div"),j(t,"class",n="selected-border spectrum-Tabs "+(e[3]&&"spectrum-Tabs--quiet")+" spectrum-Tabs--"+(e[0]?"vertical":"horizontal")+" svelte-14e5lpv"),X(t,"quiet",e[3]),X(t,"noHorizPadding",e[2]),X(t,"onTop",e[5]),j(o,"class","spectrum-Tabs-content spectrum-Tabs-content-"+e[12]+" svelte-14e5lpv"),X(o,"noPadding",e[1])},m(n,s){D(n,t,s),c&&c.m(t,null),A(t,r),l&&l.m(t,null),e[18](t),D(n,i,s),D(n,o,s),a=!0},p(e,[r]){c&&c.p&&(!a||65536&r)&&m(c,s,e,e[16],r,null,null),e[6].info?l?l.p(e,r):(l=zk(e),l.c(),l.m(t,null)):l&&(l.d(1),l=null),(!a||9&r&&n!==(n="selected-border spectrum-Tabs "+(e[3]&&"spectrum-Tabs--quiet")+" spectrum-Tabs--"+(e[0]?"vertical":"horizontal")+" svelte-14e5lpv"))&&j(t,"class",n),9&r&&X(t,"quiet",e[3]),13&r&&X(t,"noHorizPadding",e[2]),41&r&&X(t,"onTop",e[5]),2&r&&X(o,"noPadding",e[1])},i(e){a||(Te(c,e),a=!0)},o(e){$e(c,e),a=!1},d(r){r&&T(t),c&&c.d(r),l&&l.d(),e[18](null),r&&T(i),r&&T(o)}}}function Ak(e,t,r){let n,i,{$$slots:o={},$$scope:a}=t,{selected:s}=t,{vertical:c=!1}=t,{noPadding:l=!1}=t,{noHorizPadding:p=!1}=t,{quiet:d=!1}=t,{emphasized:m=!1}=t,{onTop:f=!1}=t,h="_"+Math.random().toString(36).slice(2,9);const g=bo({title:s,id:h,emphasized:m});let v;u(e,g,(e=>r(6,n=e))),oe("tab",g);const b=ie();let y,x,w,k;function C(){c?(r(11,k=n.info?.height+4+"px"),r(10,w=n.info?.width)):(r(10,w=n.info?.width+"px"),r(11,k=n.info?.height))}function z(){c?r(8,y=n.info?.top-v?.getBoundingClientRect().top+"px"):r(9,x=n.info?.left-v?.getBoundingClientRect().left+"px")}return ne((()=>{C(),z()})),e.$$set=e=>{"selected"in e&&r(14,s=e.selected),"vertical"in e&&r(0,c=e.vertical),"noPadding"in e&&r(1,l=e.noPadding),"noHorizPadding"in e&&r(2,p=e.noHorizPadding),"quiet"in e&&r(3,d=e.quiet),"emphasized"in e&&r(4,m=e.emphasized),"onTop"in e&&r(5,f=e.onTop),"$$scope"in e&&r(16,a=e.$$scope)},e.$$.update=()=>{49216&e.$$.dirty&&(i!==s?(r(15,i=s),b("select",i)):n.title!==i&&(r(15,i=n.title),r(14,s=n.title),b("select",i)),n.title!==i&&g.update((e=>(e.title=i,e)))),64&e.$$.dirty&&C(),64&e.$$.dirty&&z()},[c,l,p,d,m,f,n,v,y,x,w,k,h,g,s,i,a,o,function(e){le[e?"unshift":"push"]((()=>{v=e,r(7,v)}))}]}t(".quiet.svelte-14e5lpv.svelte-14e5lpv{border-bottom:none !important}.onTop.svelte-14e5lpv.svelte-14e5lpv{z-index:20}.spectrum-Tabs.svelte-14e5lpv.svelte-14e5lpv{padding-left:var(--spacing-xl);padding-right:var(--spacing-xl);position:relative;border-bottom:1px solid var(--spectrum-global-color-gray-300)}.spectrum-Tabs-content.svelte-14e5lpv.svelte-14e5lpv{margin-top:var(--spectrum-global-dimension-static-size-150)}.indicator-transition.svelte-14e5lpv.svelte-14e5lpv{transition:all 200ms}.spectrum-Tabs--horizontal.svelte-14e5lpv .spectrum-Tabs-selectionIndicator.svelte-14e5lpv{bottom:0 !important}.noHorizPadding.svelte-14e5lpv.svelte-14e5lpv{padding:0}.noPadding.svelte-14e5lpv.svelte-14e5lpv{margin:0}");class Dk extends Ne{constructor(e){super(),Re(this,e,Ak,Sk,l,{selected:14,vertical:0,noPadding:1,noHorizPadding:2,quiet:3,emphasized:4,onTop:5})}}function Tk(e){let t,r,n;return{c(){t=E("svg"),r=E("use"),R(r,"xlink:href",n="#spectrum-icon-18-"+e[1]),j(t,"class","spectrum-Icon spectrum-Icon--sizeM"),j(t,"focusable","false"),j(t,"aria-hidden","true"),j(t,"aria-label","Folder")},m(e,n){D(e,t,n),A(t,r)},p(e,t){2&t&&n!==(n="#spectrum-icon-18-"+e[1])&&R(r,"xlink:href",n)},d(e){e&&T(t)}}}function $k(e){let t,r;return t=new Tn({props:{target:".spectrum-Tabs-content-"+e[3].id,$$slots:{default:[_k]},$$scope:{ctx:e}}}),{c(){Pe(t.$$.fragment)},m(e,n){je(t,e,n),r=!0},p(e,r){const n={};8&r&&(n.target=".spectrum-Tabs-content-"+e[3].id),256&r&&(n.$$scope={dirty:r,ctx:e}),t.$set(n)},i(e){r||(Te(t.$$.fragment,e),r=!0)},o(e){$e(t.$$.fragment,e),r=!1},d(e){Fe(t,e)}}}function _k(e){let t;const r=e[6].default,n=p(r,e,e[8],null);return{c(){n&&n.c()},m(e,r){n&&n.m(e,r),t=!0},p(e,i){n&&n.p&&(!t||256&i)&&m(n,r,e,e[8],i,null,null)},i(e){t||(Te(n,e),t=!0)},o(e){$e(n,e),t=!1},d(e){n&&n.d(e)}}}function Ek(e){let t,r,n,i,o,a,s,c,l,u=e[1]&&Tk(e),p=e[3].title===e[0]&&$k(e);return{c(){t=_("div"),u&&u.c(),r=L(),n=_("span"),i=M(e[0]),o=L(),p&&p.c(),a=I(),j(n,"class","spectrum-Tabs-itemLabel"),j(t,"class","spectrum-Tabs-item svelte-1urx9zy"),j(t,"tabindex","0"),X(t,"is-selected",e[3].title===e[0]),X(t,"emphasized",e[3].title===e[0]&&e[3].emphasized)},m(d,m){D(d,t,m),u&&u.m(t,null),A(t,r),A(t,n),A(n,i),e[7](t),D(d,o,m),p&&p.m(d,m),D(d,a,m),s=!0,c||(l=O(t,"click",e[5]),c=!0)},p(e,[n]){e[1]?u?u.p(e,n):(u=Tk(e),u.c(),u.m(t,r)):u&&(u.d(1),u=null),(!s||1&n)&&q(i,e[0]),9&n&&X(t,"is-selected",e[3].title===e[0]),9&n&&X(t,"emphasized",e[3].title===e[0]&&e[3].emphasized),e[3].title===e[0]?p?(p.p(e,n),9&n&&Te(p,1)):(p=$k(e),p.c(),Te(p,1),p.m(a.parentNode,a)):p&&(Ae(),$e(p,1,1,(()=>{p=null})),De())},i(e){s||(Te(p),s=!0)},o(e){$e(p),s=!1},d(r){r&&T(t),u&&u.d(),e[7](null),r&&T(o),p&&p.d(r),r&&T(a),c=!1,l()}}}function Mk(e,t,r){let n,{$$slots:i={},$$scope:o}=t,{title:a}=t,{icon:s=""}=t;const c=ie();let l,p,d=ae("tab");u(e,d,(e=>r(3,n=e)));ne((()=>{setTimeout((()=>{p=l?.getBoundingClientRect(),p&&n.title===a&&b(d,n.info=p,n)}),0)}));return e.$$set=e=>{"title"in e&&r(0,a=e.title),"icon"in e&&r(1,s=e.icon),"$$scope"in e&&r(8,o=e.$$scope)},e.$$.update=()=>{13&e.$$.dirty&&n.title===a&&l&&n.info?.left!==l.getBoundingClientRect().left&&b(d,n={...n,info:l.getBoundingClientRect()},n)},[a,s,l,n,d,()=>{b(d,n={...n,title:a,info:l.getBoundingClientRect()},n),c("click")},i,function(e){le[e?"unshift":"push"]((()=>{l=e,r(2,l)}))},o]}t(".emphasized.svelte-1urx9zy{color:var(--spectrum-global-color-blue-600)}");class Lk extends Ne{constructor(e){super(),Re(this,e,Mk,Ek,l,{title:0,icon:1})}}function Ik(e){let t,r;const n=e[4].default,i=p(n,e,e[3],null);return{c(){t=_("ul"),i&&i.c(),j(t,"class","spectrum-TreeView"),U(t,"width",e[2]),X(t,"spectrum-TreeView--standalone",e[1]),X(t,"spectrum-TreeView--quiet",e[0])},m(e,n){D(e,t,n),i&&i.m(t,null),r=!0},p(e,[o]){i&&i.p&&(!r||8&o)&&m(i,n,e,e[3],o,null,null),(!r||4&o)&&U(t,"width",e[2]),2&o&&X(t,"spectrum-TreeView--standalone",e[1]),1&o&&X(t,"spectrum-TreeView--quiet",e[0])},i(e){r||(Te(i,e),r=!0)},o(e){$e(i,e),r=!1},d(e){e&&T(t),i&&i.d(e)}}}function Ok(e,t,r){let{$$slots:n={},$$scope:i}=t,{quiet:o=!1}=t,{standalone:a=!0}=t,{width:s="250px"}=t;return e.$$set=e=>{"quiet"in e&&r(0,o=e.quiet),"standalone"in e&&r(1,a=e.standalone),"width"in e&&r(2,s=e.width),"$$scope"in e&&r(3,i=e.$$scope)},[o,a,s,i,n]}t('.spectrum-TreeView {\n --spectrum-treeview-item-min-height: var(--spectrum-global-dimension-size-400);\n --spectrum-treeview-item-padding-y: var(--spectrum-global-dimension-size-75);\n --spectrum-treeview-item-icon-margin-right: var(--spectrum-global-dimension-size-125);\n --spectrum-treeview-item-affordance-width: var(--spectrum-global-dimension-size-400);\n --spectrum-treeview-item-indentation: var(--spectrum-global-dimension-size-200);\n --spectrum-treeview-heading-font-weight: var(--spectrum-global-font-weight-bold, 700);\n --spectrum-treeview-item-hover-offset: var(--spectrum-global-dimension-size-25);\n --spectrum-treeview-item-border-size-selected: var(--spectrum-alias-border-size-thin, var(--spectrum-global-dimension-static-size-10));\n\n --spectrum-treeview-item-height-layers: var(--spectrum-global-dimension-size-550);\n}\n\n.spectrum-TreeView {\n display: block;\n position: relative;\n\n padding: 0;\n\n list-style: none;\n outline: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.spectrum-TreeView-item {\n overflow: hidden;\n}\n\n[dir="ltr"] .spectrum-TreeView-item.is-open > .spectrum-TreeView-itemLink > .spectrum-TreeView-itemIndicator { transform: rotate(90deg); }\n\n[dir="rtl"] .spectrum-TreeView-item.is-open > .spectrum-TreeView-itemLink > .spectrum-TreeView-itemIndicator { transform: matrix(-1, 0, 0, 1, 0, 0) rotate(90deg); }\n\n.spectrum-TreeView-item.is-open > .spectrum-TreeView {\n height: auto;\n visibility: visible;\n }\n\n.spectrum-TreeView-item.is-drop-target .spectrum-TreeView-itemLink:before {\n border-width: var(--spectrum-treeview-item-border-size, var(--spectrum-global-dimension-static-size-25));\n }\n\n.spectrum-TreeView-item.is-selected .spectrum-TreeView-itemLink:not(.focus-ring):before {\n border-width: var(--spectrum-treeview-item-border-size-selected);\n }\n\n.spectrum-TreeView-itemLabel {\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.spectrum-TreeView-itemLink {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-align: center;\n align-items: center;\n\n box-sizing: border-box;\n cursor: pointer;\n\n padding-top: var(--spectrum-treeview-item-padding-y, var(--spectrum-global-dimension-static-size-100));\n\n padding-bottom: var(--spectrum-treeview-item-padding-y, var(--spectrum-global-dimension-static-size-100));\n padding-left: var(--spectrum-treeview-item-affordance-width);\n padding-right: var(--spectrum-treeview-item-affordance-width);\n\n text-decoration: none;\n\n height: var(--spectrum-treeview-item-min-height);\n white-space: nowrap;\n overflow: hidden;\n\n outline: none;\n}\n\n[dir="ltr"] .spectrum-TreeView-itemLink .spectrum-TreeView-itemIcon {\n margin-right: var(--spectrum-treeview-item-icon-margin-right);\n}\n\n[dir="rtl"] .spectrum-TreeView-itemLink .spectrum-TreeView-itemIcon {\n margin-left: var(--spectrum-treeview-item-icon-margin-right);\n}\n\n.spectrum-TreeView-itemLink .spectrum-TreeView-itemIcon {\n vertical-align: top;\n }\n\n[dir="ltr"] .spectrum-TreeView-itemLink:before {\n left: var(--spectrum-treeview-item-border-size, var(--spectrum-global-dimension-static-size-25));\n}\n\n[dir="rtl"] .spectrum-TreeView-itemLink:before {\n right: var(--spectrum-treeview-item-border-size, var(--spectrum-global-dimension-static-size-25));\n}\n\n[dir="ltr"] .spectrum-TreeView-itemLink:before {\n right: 0;\n}\n\n[dir="rtl"] .spectrum-TreeView-itemLink:before {\n left: 0;\n}\n\n.spectrum-TreeView-itemLink:before {\n content: \'\';\n\n box-sizing: border-box;\n\n position: absolute;\n\n height: calc(var(--spectrum-treeview-item-height, var(--spectrum-global-dimension-size-450)) - var(--spectrum-treeview-item-hover-offset) * 2);\n\n border-style: solid;\n border-color: transparent;\n border-width: var(--spectrum-treeview-item-border-size, var(--spectrum-global-dimension-static-size-25)) 0 var(--spectrum-treeview-item-border-size, var(--spectrum-global-dimension-static-size-25)) 0;\n background-color: transparent;\n }\n\n.spectrum-TreeView-itemLink.focus-ring:before {\n border-width: var(--spectrum-treeview-item-border-size, var(--spectrum-global-dimension-static-size-25));\n }\n\n.spectrum-TreeView--standalone .spectrum-TreeView-itemLink:before {\n border-radius: var(--spectrum-treeview-item-border-radius, var(--spectrum-alias-border-radius-regular));\n border-width: var(--spectrum-treeview-item-border-size, var(--spectrum-global-dimension-static-size-25));\n }\n\n[dir="ltr"] .spectrum-TreeView--thumbnail .spectrum-TreeView-itemThumbnail {\n margin-right: var(--spectrum-treeview-item-icon-margin-right);\n}\n\n[dir="rtl"] .spectrum-TreeView--thumbnail .spectrum-TreeView-itemThumbnail {\n margin-left: var(--spectrum-treeview-item-icon-margin-right);\n}\n\n.spectrum-TreeView--thumbnail .spectrum-TreeView-itemLink {\n height: var(--spectrum-treeview-item-height-layers);\n }\n\n.spectrum-TreeView--thumbnail .spectrum-TreeView-itemLink:before {\n height: var(--spectrum-treeview-item-height-layers);\n }\n\n[dir="ltr"] .spectrum-TreeView-itemIndicator {\n\n float: left;\n}\n\n[dir="rtl"] .spectrum-TreeView-itemIndicator {\n\n float: right;\n}\n\n[dir="ltr"] .spectrum-TreeView-itemIndicator {\n\n left: var(--spectrum-global-dimension-size-125);\n}\n\n[dir="rtl"] .spectrum-TreeView-itemIndicator {\n\n right: var(--spectrum-global-dimension-size-125);\n}\n\n[dir="ltr"] .spectrum-TreeView-itemIndicator {\n margin-left: calc(-1 * var(--spectrum-global-dimension-size-500));\n}\n\n[dir="rtl"] .spectrum-TreeView-itemIndicator {\n margin-right: calc(-1 * var(--spectrum-global-dimension-size-500));\n}\n\n[dir="ltr"] .spectrum-TreeView-itemIndicator {\n margin-right: var(--spectrum-global-dimension-size-85);\n}\n\n[dir="rtl"] .spectrum-TreeView-itemIndicator {\n margin-left: var(--spectrum-global-dimension-size-85);\n}\n\n[dir="rtl"] .spectrum-TreeView-itemIndicator { transform: matrix(-1, 0, 0, 1, 0, 0) ; }\n\n.spectrum-TreeView-itemIndicator {\n display: block;\n box-sizing: content-box;\n position: relative;\n z-index: 1;\n top: calc(-1 * var(--spectrum-global-dimension-size-65));\n margin-bottom: calc(-1 * var(--spectrum-global-dimension-size-125));\n\n padding-left: var(--spectrum-global-dimension-size-150);\n\n padding-right: var(--spectrum-global-dimension-size-150);\n padding-top: var(--spectrum-global-dimension-size-125);\n padding-bottom: var(--spectrum-global-dimension-size-125);\n transition: transform ease var(--spectrum-global-animation-duration-100, 130ms);\n\n pointer-events: all !important;\n}\n\n[dir="ltr"] .spectrum-TreeView .spectrum-TreeView {\n\n padding-left: var(--spectrum-treeview-item-indentation);\n}\n\n[dir="rtl"] .spectrum-TreeView .spectrum-TreeView {\n\n padding-right: var(--spectrum-treeview-item-indentation);\n}\n\n.spectrum-TreeView .spectrum-TreeView {\n position: static;\n height: 0;\n visibility: hidden;\n}\n\n[dir="ltr"] .spectrum-TreeView-item--indent1 {\n padding-left: var(--spectrum-treeview-item-indentation);\n}\n\n[dir="rtl"] .spectrum-TreeView-item--indent1 {\n padding-right: var(--spectrum-treeview-item-indentation);\n}\n\n[dir="ltr"] .spectrum-TreeView-item--indent2 {\n padding-left: calc(2 * var(--spectrum-treeview-item-indentation));\n}\n\n[dir="rtl"] .spectrum-TreeView-item--indent2 {\n padding-right: calc(2 * var(--spectrum-treeview-item-indentation));\n}\n\n[dir="ltr"] .spectrum-TreeView-item--indent3 {\n padding-left: calc(3 * var(--spectrum-treeview-item-indentation));\n}\n\n[dir="rtl"] .spectrum-TreeView-item--indent3 {\n padding-right: calc(3 * var(--spectrum-treeview-item-indentation));\n}\n\n[dir="ltr"] .spectrum-TreeView-item--indent4 {\n padding-left: calc(4 * var(--spectrum-treeview-item-indentation));\n}\n\n[dir="rtl"] .spectrum-TreeView-item--indent4 {\n padding-right: calc(4 * var(--spectrum-treeview-item-indentation));\n}\n\n[dir="ltr"] .spectrum-TreeView-item--indent5 {\n padding-left: calc(5 * var(--spectrum-treeview-item-indentation));\n}\n\n[dir="rtl"] .spectrum-TreeView-item--indent5 {\n padding-right: calc(5 * var(--spectrum-treeview-item-indentation));\n}\n\n[dir="ltr"] .spectrum-TreeView-item--indent6 {\n padding-left: calc(6 * var(--spectrum-treeview-item-indentation));\n}\n\n[dir="rtl"] .spectrum-TreeView-item--indent6 {\n padding-right: calc(6 * var(--spectrum-treeview-item-indentation));\n}\n\n[dir="ltr"] .spectrum-TreeView-item--indent7 {\n padding-left: calc(7 * var(--spectrum-treeview-item-indentation));\n}\n\n[dir="rtl"] .spectrum-TreeView-item--indent7 {\n padding-right: calc(7 * var(--spectrum-treeview-item-indentation));\n}\n\n[dir="ltr"] .spectrum-TreeView-item--indent8 {\n padding-left: calc(8 * var(--spectrum-treeview-item-indentation));\n}\n\n[dir="rtl"] .spectrum-TreeView-item--indent8 {\n padding-right: calc(8 * var(--spectrum-treeview-item-indentation));\n}\n\n[dir="ltr"] .spectrum-TreeView-item--indent9 {\n padding-left: calc(9 * var(--spectrum-treeview-item-indentation));\n}\n\n[dir="rtl"] .spectrum-TreeView-item--indent9 {\n padding-right: calc(9 * var(--spectrum-treeview-item-indentation));\n}\n\n[dir="ltr"] .spectrum-TreeView-item--indent10 {\n padding-left: calc(10 * var(--spectrum-treeview-item-indentation));\n}\n\n[dir="rtl"] .spectrum-TreeView-item--indent10 {\n padding-right: calc(10 * var(--spectrum-treeview-item-indentation));\n}\n\n.spectrum-TreeView-heading {\n padding: var(--spectrum-treeview-item-padding-y, var(--spectrum-global-dimension-static-size-100));\n font-weight: var(--spectrum-treeview-heading-font-weight);\n}\n\n.spectrum-TreeView-heading:not(:first-child) {\n margin-top: var(--spectrum-global-dimension-size-200);\n }\n\n.spectrum-TreeView {\n --spectrum-treeview-item-background-color-selected: var(--spectrum-alias-highlight-selected);\n\n --spectrum-treeview-item-background-color-quiet-selected: var(--spectrum-alias-highlight-hover);\n --spectrum-treeview-item-icon-color: var(--spectrum-alias-icon-color, var(--spectrum-global-color-gray-700));\n --spectrum-treeview-item-icon-color-hover: var(--spectrum-alias-icon-color-hover, var(--spectrum-global-color-gray-900));\n --spectrum-treeview-item-icon-color-focus: var(--spectrum-alias-icon-color-focus, var(--spectrum-global-color-gray-900));\n --spectrum-treeview-item-icon-color-selected: var(--spectrum-alias-icon-color-selected-neutral, var(--spectrum-global-color-gray-900));\n --spectrum-treeview-item-icon-color-disabled: var(--spectrum-alias-icon-color-disabled, var(--spectrum-global-color-gray-400));\n --spectrum-treeview-item-text-color-focus: var(--spectrum-alias-text-color-down, var(--spectrum-global-color-gray-900));\n --spectrum-treeview-item-text-color-selected: var(--spectrum-alias-text-color-selected-neutral, var(--spectrum-global-color-gray-900));\n --spectrum-treeview-item-text-color-disabled: var(--spectrum-alias-text-color-disabled, var(--spectrum-global-color-gray-500));\n}\n\n.spectrum-TreeView-item.is-disabled > .spectrum-TreeView-itemLink {\n color: var(--spectrum-treeview-item-text-color-disabled);\n }\n\n.spectrum-TreeView-item.is-disabled > .spectrum-TreeView-itemLink .spectrum-Icon {\n color: var(--spectrum-treeview-item-icon-color-disabled);\n }\n\n.spectrum-TreeView-item.is-selected > .spectrum-TreeView-itemLink {\n color: var(--spectrum-treeview-item-text-color-selected);\n }\n\n.spectrum-TreeView-item.is-selected > .spectrum-TreeView-itemLink:before {\n background-color: var(--spectrum-treeview-item-background-color-selected);\n border-color: var(--spectrum-treeview-item-border-color-key-focus, var(--spectrum-alias-focus-color));\n }\n\n.spectrum-TreeView-item.is-selected > .spectrum-TreeView-itemLink .spectrum-TreeView-itemIcon {\n color: var(--spectrum-treeview-item-icon-color-selected);\n }\n\n.spectrum-TreeView-item.is-drop-target > .spectrum-TreeView-itemLink:before {\n background-color: var(--spectrum-alias-highlight-selected);\n border-color: var(--spectrum-treeview-item-border-color-key-focus, var(--spectrum-alias-focus-color));\n }\n\n.spectrum-TreeView--quiet .spectrum-TreeView-item.is-selected > .spectrum-TreeView-itemLink:before {\n background-color: var(--spectrum-treeview-item-background-color-quiet-selected);\n border-color: transparent;\n }\n\n.spectrum-TreeView--quiet .spectrum-TreeView-item.is-selected > .spectrum-TreeView-itemLink.focus-ring:before {\n border-color: var(--spectrum-treeview-item-border-color-key-focus, var(--spectrum-alias-focus-color));\n }\n\n.spectrum-TreeView-itemIcon {\n color: var(--spectrum-treeview-item-icon-color);\n}\n\n.spectrum-TreeView-itemLink {\n color: var(--spectrum-treeview-item-text-color, var(--spectrum-global-color-gray-800));\n}\n\n.spectrum-TreeView-itemLink:hover {\n color: var(--spectrum-treeview-item-text-color-hover, var(--spectrum-global-color-gray-900));\n }\n\n.spectrum-TreeView-itemLink:hover:before {\n background-color: var(--spectrum-treeview-item-background-color-hover, var(--spectrum-alias-background-color-hover-overlay));\n }\n\n.spectrum-TreeView-itemLink:hover .spectrum-TreeView-itemIcon {\n color: var(--spectrum-treeview-item-icon-color-hover);\n }\n\n.spectrum-TreeView-itemLink.focus-ring {\n color: var(--spectrum-treeview-item-text-color-focus);\n }\n\n.spectrum-TreeView-itemLink.focus-ring::before {\n background-color: var(--spectrum-treeview-item-background-color-key-focus, var(--spectrum-alias-background-color-hover-overlay));\n\n border-color: var(--spectrum-treeview-item-border-color-key-focus, var(--spectrum-alias-focus-color));\n }\n\n.spectrum-TreeView-itemLink.focus-ring .spectrum-TreeView-itemIcon {\n color: var(--spectrum-treeview-item-icon-color-focus);\n }\n');class Bk extends Ne{constructor(e){super(),Re(this,e,Ok,Ik,l,{quiet:0,standalone:1,width:2})}}function Pk(e){let t,r;return{c(){t=E("svg"),r=E("use"),R(r,"xlink:href","#spectrum-css-icon-Chevron100"),j(t,"class","spectrum-Icon spectrum-UIIcon-ChevronRight100 spectrum-TreeView-itemIndicator"),j(t,"focusable","false"),j(t,"aria-hidden","true")},m(e,n){D(e,t,n),A(t,r)},d(e){e&&T(t)}}}function jk(e){let t,r,n;return{c(){t=E("svg"),r=E("use"),R(r,"xlink:href",n="#spectrum-icon-18-"+e[4]),j(t,"class","spectrum-TreeView-itemIcon spectrum-Icon spectrum-Icon--sizeM"),j(t,"focusable","false"),j(t,"aria-hidden","true"),j(t,"aria-label","Layers")},m(e,n){D(e,t,n),A(t,r)},p(e,t){16&t&&n!==(n="#spectrum-icon-18-"+e[4])&&R(r,"xlink:href",n)},d(e){e&&T(t)}}}function Fk(e){let t,r;const n=e[7].default,i=p(n,e,e[6],null);return{c(){t=_("ul"),i&&i.c(),j(t,"class","spectrum-TreeView")},m(e,n){D(e,t,n),i&&i.m(t,null),r=!0},p(e,t){i&&i.p&&(!r||64&t)&&m(i,n,e,e[6],t,null,null)},i(e){r||(Te(i,e),r=!0)},o(e){$e(i,e),r=!1},d(e){e&&T(t),i&&i.d(e)}}}function Rk(e){let t,r,n,i,o,a,s,c,l,u,p=e[5].default&&Pk(),d=e[4]&&jk(e),m=e[5].default&&Fk(e);return{c(){t=_("li"),r=_("a"),p&&p.c(),n=L(),d&&d.c(),i=L(),o=_("span"),a=M(e[3]),s=L(),m&&m.c(),j(o,"class","spectrum-TreeView-itemLabel"),j(r,"class","spectrum-TreeView-itemLink"),j(r,"href",e[2]),j(t,"class","spectrum-TreeView-item"),X(t,"is-selected",e[0]),X(t,"is-open",e[1])},m(f,h){D(f,t,h),A(t,r),p&&p.m(r,null),A(r,n),d&&d.m(r,null),A(r,i),A(r,o),A(o,a),A(t,s),m&&m.m(t,null),c=!0,l||(u=O(r,"click",e[8]),l=!0)},p(e,[o]){e[5].default?p||(p=Pk(),p.c(),p.m(r,n)):p&&(p.d(1),p=null),e[4]?d?d.p(e,o):(d=jk(e),d.c(),d.m(r,i)):d&&(d.d(1),d=null),(!c||8&o)&&q(a,e[3]),(!c||4&o)&&j(r,"href",e[2]),e[5].default?m?(m.p(e,o),32&o&&Te(m,1)):(m=Fk(e),m.c(),Te(m,1),m.m(t,null)):m&&(Ae(),$e(m,1,1,(()=>{m=null})),De()),1&o&&X(t,"is-selected",e[0]),2&o&&X(t,"is-open",e[1])},i(e){c||(Te(m),c=!0)},o(e){$e(m),c=!1},d(e){e&&T(t),p&&p.d(),d&&d.d(),m&&m.d(),l=!1,u()}}}function Nk(e,t,r){let{$$slots:n={},$$scope:i}=t;const o=g(n);let{selected:a=!1}=t,{open:s=!1}=t,{href:c=!1}=t,{title:l}=t,{icon:u}=t;return e.$$set=e=>{"selected"in e&&r(0,a=e.selected),"open"in e&&r(1,s=e.open),"href"in e&&r(2,c=e.href),"title"in e&&r(3,l=e.title),"icon"in e&&r(4,u=e.icon),"$$scope"in e&&r(6,i=e.$$scope)},[a,s,c,l,u,o,i,n,function(t){se(e,t)}]}class qk extends Ne{constructor(e){super(),Re(this,e,Nk,Rk,l,{selected:0,open:1,href:2,title:3,icon:4})}}function Hk(e){let t,r;return t=new qt({props:{updateOnChange:e[5],disabled:e[4],value:e[0],placeholder:e[3],quiet:e[6]}}),t.$on("change",e[7]),t.$on("click",e[8]),t.$on("input",e[9]),t.$on("focus",e[10]),t.$on("blur",e[11]),{c(){Pe(t.$$.fragment)},m(e,n){je(t,e,n),r=!0},p(e,r){const n={};32&r&&(n.updateOnChange=e[5]),16&r&&(n.disabled=e[4]),1&r&&(n.value=e[0]),8&r&&(n.placeholder=e[3]),64&r&&(n.quiet=e[6]),t.$set(n)},i(e){r||(Te(t.$$.fragment,e),r=!0)},o(e){$e(t.$$.fragment,e),r=!1},d(e){Fe(t,e)}}}function Uk(e){let t,r;return t=new ft({props:{label:e[1],labelPosition:e[2],$$slots:{default:[Hk]},$$scope:{ctx:e}}}),{c(){Pe(t.$$.fragment)},m(e,n){je(t,e,n),r=!0},p(e,[r]){const n={};2&r&&(n.label=e[1]),4&r&&(n.labelPosition=e[2]),8313&r&&(n.$$scope={dirty:r,ctx:e}),t.$set(n)},i(e){r||(Te(t.$$.fragment,e),r=!0)},o(e){$e(t.$$.fragment,e),r=!1},d(e){Fe(t,e)}}}function Gk(e,t,r){let{value:n=null}=t,{label:i=null}=t,{labelPosition:o="above"}=t,{placeholder:a=null}=t,{disabled:s=!1}=t,{updateOnChange:c=!0}=t,{quiet:l=!1}=t;const u=ie();return e.$$set=e=>{"value"in e&&r(0,n=e.value),"label"in e&&r(1,i=e.label),"labelPosition"in e&&r(2,o=e.labelPosition),"placeholder"in e&&r(3,a=e.placeholder),"disabled"in e&&r(4,s=e.disabled),"updateOnChange"in e&&r(5,c=e.updateOnChange),"quiet"in e&&r(6,l=e.quiet)},[n,i,o,a,s,c,l,e=>{r(0,n=e.detail),u("change",e.detail)},function(t){se(e,t)},function(t){se(e,t)},function(t){se(e,t)},function(t){se(e,t)}]}class Wk extends Ne{constructor(e){super(),Re(this,e,Gk,Uk,l,{value:0,label:1,labelPosition:2,placeholder:3,disabled:4,updateOnChange:5,quiet:6})}}t('.spectrum-Pagination--explicit,\n.spectrum-Pagination--listing {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-align: center;\n align-items: center;\n}\n\n.spectrum-Pagination-textfield {\n width: var(--spectrum-pagination-textfield-width, var(--spectrum-global-dimension-size-600));\n min-width: var(--spectrum-pagination-textfield-width, var(--spectrum-global-dimension-size-600));\n}\n\n[dir="ltr"] .spectrum-Pagination-counter {\n margin-left: var(--spectrum-pagination-counter-margin-left, var(--spectrum-global-dimension-size-65));\n}\n\n[dir="rtl"] .spectrum-Pagination-counter {\n margin-right: var(--spectrum-pagination-counter-margin-left, var(--spectrum-global-dimension-size-65));\n}\n\n[dir="ltr"] .spectrum-Pagination-prevButton {\n margin-right: var(--spectrum-pagination-page-button-margin-horizontal, var(--spectrum-global-dimension-size-65));\n}\n\n[dir="rtl"] .spectrum-Pagination-prevButton {\n margin-left: var(--spectrum-pagination-page-button-margin-horizontal, var(--spectrum-global-dimension-size-65));\n}\n\n[dir="ltr"] .spectrum-Pagination-nextButton {\n margin-left: var(--spectrum-pagination-page-button-margin-horizontal, var(--spectrum-global-dimension-size-65));\n}\n\n[dir="rtl"] .spectrum-Pagination-nextButton {\n margin-right: var(--spectrum-pagination-page-button-margin-horizontal, var(--spectrum-global-dimension-size-65));\n}\n\n[dir="rtl"] .spectrum-Pagination-prevButton .spectrum-Icon,[dir="rtl"] .spectrum-Pagination-nextButton .spectrum-Icon { transform: matrix(-1, 0, 0, 1, 0, 0) ; }\n\n.spectrum-Pagination-pageButton:hover {\n background-color: var(--spectrum-pagination-page-button-background-color-hover, var(--spectrum-alias-background-color-hover-overlay));\n }\n\n.spectrum-Pagination-pageButton:focus {\n border-color: var(--spectrum-pagination-page-button-border-color-key-focus, var(--spectrum-alias-focus-color));\n }\n\n.spectrum-Pagination-pageButton.is-selected {\n background-color: var(--spectrum-pagination-page-button-background-color-down, var(--spectrum-global-color-gray-800));\n color: var(--spectrum-pagination-page-button-text-color-down, var(--spectrum-global-color-static-white));\n }\n\n.spectrum-Pagination-counter {\n color: var(--spectrum-alias-label-text-color, var(--spectrum-global-color-gray-700));\n}\n');function Xk(e){let t,n,i,o,a,l,u,p,d,m;return{c(){t=_("nav"),n=_("div"),n.innerHTML='<svg class="spectrum-Icon spectrum-UIIcon-ChevronLeft100" focusable="false" aria-hidden="true" aria-label="ChevronLeft"><use xlink:href="#spectrum-css-icon-Chevron100"></use></svg>',i=L(),o=_("span"),a=M("Page "),l=M(e[0]),u=L(),p=_("div"),p.innerHTML='<svg class="spectrum-Icon spectrum-UIIcon-ChevronRight100" focusable="false" aria-hidden="true" aria-label="ChevronLeft"><use xlink:href="#spectrum-css-icon-Chevron100"></use></svg>',j(n,"href","#"),j(n,"class","spectrum-ActionButton spectrum-ActionButton--sizeM spectrum-ActionButton--quiet spectrum-Pagination-prevButton svelte-1w0vi9g"),X(n,"is-disabled",!e[3]),j(o,"class","spectrum-Body--secondary spectrum-Pagination-counter svelte-1w0vi9g"),j(p,"href","#"),j(p,"class","spectrum-ActionButton spectrum-ActionButton--sizeM spectrum-ActionButton--quiet spectrum-Pagination-nextButton svelte-1w0vi9g"),X(p,"is-disabled",!e[4]),j(t,"class","spectrum-Pagination spectrum-Pagination--explicit")},m(r,s){D(r,t,s),A(t,n),A(t,i),A(t,o),A(o,a),A(o,l),A(t,u),A(t,p),d||(m=[O(n,"click",(function(){c(e[3]?e[1]:null)&&(e[3]?e[1]:null).apply(this,arguments)})),O(p,"click",(function(){c(e[4]?e[2]:null)&&(e[4]?e[2]:null).apply(this,arguments)}))],d=!0)},p(t,[r]){e=t,8&r&&X(n,"is-disabled",!e[3]),1&r&&q(l,e[0]),16&r&&X(p,"is-disabled",!e[4])},i:r,o:r,d(e){e&&T(t),d=!1,s(m)}}}function Vk(e,t,r){let{page:n}=t,{goToPrevPage:i}=t,{goToNextPage:o}=t,{hasPrevPage:a=!0}=t,{hasNextPage:s=!0}=t;return e.$$set=e=>{"page"in e&&r(0,n=e.page),"goToPrevPage"in e&&r(1,i=e.goToPrevPage),"goToNextPage"in e&&r(2,o=e.goToNextPage),"hasPrevPage"in e&&r(3,a=e.hasPrevPage),"hasNextPage"in e&&r(4,s=e.hasNextPage)},[n,i,o,a,s]}t(".spectrum-Pagination-counter.svelte-1w0vi9g{margin-left:0;user-select:none}.is-disabled.svelte-1w0vi9g:hover{cursor:initial}");class Yk extends Ne{constructor(e){super(),Re(this,e,Vk,Xk,l,{page:0,goToPrevPage:1,goToNextPage:2,hasPrevPage:3,hasNextPage:4})}}function Kk(e){let t,r,n;const i=e[17].default,o=p(i,e,e[16],null);return{c(){t=_("div"),o&&o.c(),j(t,"class",r="spectrum-StatusLight spectrum-StatusLight--size"+e[0]),X(t,"spectrum-StatusLight--celery",e[1]),X(t,"spectrum-StatusLight--yellow",e[2]),X(t,"spectrum-StatusLight--fuchsia",e[3]),X(t,"spectrum-StatusLight--indigo",e[4]),X(t,"spectrum-StatusLight--seafoam",e[5]),X(t,"spectrum-StatusLight--chartreuse",e[6]),X(t,"spectrum-StatusLight--magenta",e[7]),X(t,"spectrum-StatusLight--purple",e[8]),X(t,"spectrum-StatusLight--neutral",e[9]),X(t,"spectrum-StatusLight--info",e[10]),X(t,"spectrum-StatusLight--positive",e[11]),X(t,"spectrum-StatusLight--notice",e[12]),X(t,"spectrum-StatusLight--negative",e[13]),X(t,"spectrum-StatusLight--disabled",e[14]),X(t,"spectrum-StatusLight--active",e[15])},m(e,r){D(e,t,r),o&&o.m(t,null),n=!0},p(e,[a]){o&&o.p&&(!n||65536&a)&&m(o,i,e,e[16],a,null,null),(!n||1&a&&r!==(r="spectrum-StatusLight spectrum-StatusLight--size"+e[0]))&&j(t,"class",r),3&a&&X(t,"spectrum-StatusLight--celery",e[1]),5&a&&X(t,"spectrum-StatusLight--yellow",e[2]),9&a&&X(t,"spectrum-StatusLight--fuchsia",e[3]),17&a&&X(t,"spectrum-StatusLight--indigo",e[4]),33&a&&X(t,"spectrum-StatusLight--seafoam",e[5]),65&a&&X(t,"spectrum-StatusLight--chartreuse",e[6]),129&a&&X(t,"spectrum-StatusLight--magenta",e[7]),257&a&&X(t,"spectrum-StatusLight--purple",e[8]),513&a&&X(t,"spectrum-StatusLight--neutral",e[9]),1025&a&&X(t,"spectrum-StatusLight--info",e[10]),2049&a&&X(t,"spectrum-StatusLight--positive",e[11]),4097&a&&X(t,"spectrum-StatusLight--notice",e[12]),8193&a&&X(t,"spectrum-StatusLight--negative",e[13]),16385&a&&X(t,"spectrum-StatusLight--disabled",e[14]),32769&a&&X(t,"spectrum-StatusLight--active",e[15])},i(e){n||(Te(o,e),n=!0)},o(e){$e(o,e),n=!1},d(e){e&&T(t),o&&o.d(e)}}}function Jk(e,t,r){let{$$slots:n={},$$scope:i}=t,{size:o="M"}=t,{celery:a=!1}=t,{yellow:s=!1}=t,{fuchsia:c=!1}=t,{indigo:l=!1}=t,{seafoam:u=!1}=t,{chartreuse:p=!1}=t,{magenta:d=!1}=t,{purple:m=!1}=t,{neutral:f=!1}=t,{info:h=!1}=t,{positive:g=!1}=t,{notice:v=!1}=t,{negative:b=!1}=t,{disabled:y=!1}=t,{active:x=!1}=t;return e.$$set=e=>{"size"in e&&r(0,o=e.size),"celery"in e&&r(1,a=e.celery),"yellow"in e&&r(2,s=e.yellow),"fuchsia"in e&&r(3,c=e.fuchsia),"indigo"in e&&r(4,l=e.indigo),"seafoam"in e&&r(5,u=e.seafoam),"chartreuse"in e&&r(6,p=e.chartreuse),"magenta"in e&&r(7,d=e.magenta),"purple"in e&&r(8,m=e.purple),"neutral"in e&&r(9,f=e.neutral),"info"in e&&r(10,h=e.info),"positive"in e&&r(11,g=e.positive),"notice"in e&&r(12,v=e.notice),"negative"in e&&r(13,b=e.negative),"disabled"in e&&r(14,y=e.disabled),"active"in e&&r(15,x=e.active),"$$scope"in e&&r(16,i=e.$$scope)},[o,a,s,c,l,u,p,d,m,f,h,g,v,b,y,x,i,n]}t('.spectrum-StatusLight--sizeS {\n --spectrum-statuslight-info-text-font-weight: var(--spectrum-statuslight-info-s-text-font-weight, var(--spectrum-alias-body-text-font-weight));\n --spectrum-statuslight-info-text-line-height: var(--spectrum-statuslight-info-s-text-line-height, var(--spectrum-alias-component-text-line-height));\n --spectrum-statuslight-info-text-size: var(--spectrum-statuslight-info-s-text-size, var(--spectrum-alias-item-text-size-s));\n --spectrum-statuslight-info-dot-size: var(--spectrum-statuslight-info-s-dot-size, var(--spectrum-alias-item-control-1-size-s));\n --spectrum-statuslight-info-text-gap: var(--spectrum-statuslight-info-s-text-gap, var(--spectrum-alias-item-control-gap-s));\n --spectrum-statuslight-info-height: var(--spectrum-statuslight-info-s-height, var(--spectrum-alias-item-height-s));\n}\n\n.spectrum-StatusLight--sizeM {\n --spectrum-statuslight-info-text-font-weight: var(--spectrum-statuslight-info-m-text-font-weight, var(--spectrum-alias-body-text-font-weight));\n --spectrum-statuslight-info-text-line-height: var(--spectrum-statuslight-info-m-text-line-height, var(--spectrum-alias-component-text-line-height));\n --spectrum-statuslight-info-text-size: var(--spectrum-statuslight-info-m-text-size, var(--spectrum-alias-item-text-size-m));\n --spectrum-statuslight-info-dot-size: var(--spectrum-statuslight-info-m-dot-size, var(--spectrum-alias-item-control-1-size-m));\n --spectrum-statuslight-info-text-gap: var(--spectrum-statuslight-info-m-text-gap, var(--spectrum-alias-item-control-gap-m));\n --spectrum-statuslight-info-height: var(--spectrum-statuslight-info-m-height, var(--spectrum-alias-item-height-m));\n}\n\n.spectrum-StatusLight--sizeL {\n --spectrum-statuslight-info-text-font-weight: var(--spectrum-statuslight-info-l-text-font-weight, var(--spectrum-alias-body-text-font-weight));\n --spectrum-statuslight-info-text-line-height: var(--spectrum-statuslight-info-l-text-line-height, var(--spectrum-alias-component-text-line-height));\n --spectrum-statuslight-info-text-size: var(--spectrum-statuslight-info-l-text-size, var(--spectrum-alias-item-text-size-l));\n --spectrum-statuslight-info-dot-size: var(--spectrum-statuslight-info-l-dot-size, var(--spectrum-alias-item-control-1-size-l));\n --spectrum-statuslight-info-text-gap: var(--spectrum-statuslight-info-l-text-gap, var(--spectrum-alias-item-control-gap-l));\n --spectrum-statuslight-info-height: var(--spectrum-statuslight-info-l-height, var(--spectrum-alias-item-height-l));\n}\n\n.spectrum-StatusLight--sizeXL {\n --spectrum-statuslight-info-text-font-weight: var(--spectrum-statuslight-info-xl-text-font-weight, var(--spectrum-alias-body-text-font-weight));\n --spectrum-statuslight-info-text-line-height: var(--spectrum-statuslight-info-xl-text-line-height, var(--spectrum-alias-component-text-line-height));\n --spectrum-statuslight-info-text-size: var(--spectrum-statuslight-info-xl-text-size, var(--spectrum-alias-item-text-size-xl));\n --spectrum-statuslight-info-dot-size: var(--spectrum-statuslight-info-xl-dot-size, var(--spectrum-alias-item-control-1-size-xl));\n --spectrum-statuslight-info-text-gap: var(--spectrum-statuslight-info-xl-text-gap, var(--spectrum-alias-item-control-gap-xl));\n --spectrum-statuslight-info-height: var(--spectrum-statuslight-info-xl-height, var(--spectrum-alias-item-height-xl));\n}\n\n.spectrum-StatusLight {\n --spectrum-statuslight-info-padding-y: var(\n --spectrum-global-dimension-size-65\n );\n --spectrum-statuslight-info-text-line-height: 1.44;\n --spectrum-statuslight-info-padding-top: calc(var(--spectrum-statuslight-info-padding-y) - 1px);\n --spectrum-statuslight-info-padding-bottom: calc(var(--spectrum-statuslight-info-padding-y) + 1px);\n}\n\n.spectrum-StatusLight {\n min-height: var(--spectrum-statuslight-info-height);\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-align: start;\n align-items: flex-start;\n\n padding-top: var(--spectrum-statuslight-info-padding-top);\n\n padding-bottom: var(--spectrum-statuslight-info-padding-bottom);\n padding-left: 0;\n padding-right: 0;\n box-sizing: border-box;\n\n font-size: var(--spectrum-statuslight-info-text-size);\n font-weight: var(--spectrum-statuslight-info-text-font-weight);\n line-height: var(--spectrum-statuslight-info-text-line-height);\n}\n\n.spectrum-StatusLight::before {\n content: "";\n -ms-flex-positive: 0;\n flex-grow: 0;\n -ms-flex-negative: 0;\n flex-shrink: 0;\n display: inline-block;\n width: var(--spectrum-statuslight-info-dot-size);\n height: var(--spectrum-statuslight-info-dot-size);\n border-radius: 50%;\n margin-top: var(--spectrum-statuslight-info-padding-bottom);\n margin-bottom: var(--spectrum-statuslight-info-padding-top);\n margin-left: var(--spectrum-statuslight-info-text-gap);\n margin-right: var(--spectrum-statuslight-info-text-gap);\n -ms-high-contrast-adjust: none;\n forced-color-adjust: none;\n }\n\n.spectrum-StatusLight--neutral {\n font-style: italic;\n}\n\n.spectrum-StatusLight {\n color: var(--spectrum-statuslight-info-m-text-color, var(--spectrum-alias-text-color));\n}\n\n.spectrum-StatusLight[disabled],\n .spectrum-StatusLight.is-disabled {\n color: var(--spectrum-statuslight-info-m-text-color-disabled, var(--spectrum-alias-text-color-disabled));\n }\n\n.spectrum-StatusLight[disabled]::before, .spectrum-StatusLight.is-disabled::before {\n background-color: var(--spectrum-statuslight-info-m-dot-color-disabled, var(--spectrum-global-color-gray-400));\n }\n\n.spectrum-StatusLight--negative::before {\n background-color: var(--spectrum-statuslight-negative-m-dot-color, var(--spectrum-semantic-negative-color-status));\n}\n\n.spectrum-StatusLight--notice::before {\n background-color: var(--spectrum-statuslight-notice-m-dot-color, var(--spectrum-semantic-notice-color-status));\n}\n\n.spectrum-StatusLight--positive::before {\n background-color: var(--spectrum-statuslight-positive-m-dot-color, var(--spectrum-semantic-positive-color-status));\n}\n\n.spectrum-StatusLight--info::before,\n/** @deprecated */.spectrum-StatusLight--active::before {\n background-color: var(--spectrum-statuslight-info-m-dot-color, var(--spectrum-semantic-informative-color-status));\n}\n\n.spectrum-StatusLight--neutral {\n color: var(--spectrum-statuslight-neutral-m-text-color, var(--spectrum-alias-label-text-color));\n}\n\n.spectrum-StatusLight--neutral::before {\n background-color: var(--spectrum-statuslight-neutral-m-dot-color, var(--spectrum-global-color-gray-500));\n }\n\n.spectrum-StatusLight--celery::before {\n background-color: var(--spectrum-statuslight-celery-m-dot-color, var(--spectrum-global-color-celery-400));\n}\n\n.spectrum-StatusLight--yellow::before {\n background-color: var(--spectrum-statuslight-yellow-m-dot-color, var(--spectrum-global-color-yellow-400));\n}\n\n.spectrum-StatusLight--fuchsia::before {\n background-color: var(--spectrum-statuslight-fuchsia-m-dot-color, var(--spectrum-global-color-fuchsia-400));\n}\n\n.spectrum-StatusLight--indigo::before {\n background-color: var(--spectrum-statuslight-indigo-m-dot-color, var(--spectrum-global-color-indigo-400));\n}\n\n.spectrum-StatusLight--seafoam::before {\n background-color: var(--spectrum-statuslight-seafoam-m-dot-color, var(--spectrum-global-color-seafoam-400));\n}\n\n.spectrum-StatusLight--chartreuse::before {\n background-color: var(--spectrum-statuslight-chartreuse-m-dot-color, var(--spectrum-global-color-chartreuse-400));\n}\n\n.spectrum-StatusLight--magenta::before {\n background-color: var(--spectrum-statuslight-magenta-m-dot-color, var(--spectrum-global-color-magenta-400));\n}\n\n.spectrum-StatusLight--purple::before {\n background-color: var(--spectrum-statuslight-purple-m-dot-color, var(--spectrum-global-color-purple-400));\n}\n');class Zk extends Ne{constructor(e){super(),Re(this,e,Jk,Kk,l,{size:0,celery:1,yellow:2,fuchsia:3,indigo:4,seafoam:5,chartreuse:6,magenta:7,purple:8,neutral:9,info:10,positive:11,notice:12,negative:13,disabled:14,active:15})}}function Qk(e,t,r){const n=e.slice();return n[18]=t[r],n}function eC(e,t,r){const n=e.slice();return n[21]=t[r],n}function tC(e){let t,r,n,i,o,a,s,l,u,p,d,m,f,h,g=e[7],v=[];for(let t=0;t<g.length;t+=1)v[t]=iC(Qk(e,g,t));const b=e=>$e(v[e],1,1,(()=>{v[e]=null}));return s=new kt({props:{updateOnChange:!1,quiet:!0,placeholder:"Hex, RGB, HSL...",value:e[5]}}),s.$on("change",e[12]),u=new et({props:{size:"S",name:"Close",hoverable:!0}}),u.$on("click",e[13]),{c(){t=_("div");for(let e=0;e<v.length;e+=1)v[e].c();r=L(),n=_("div"),i=_("div"),i.textContent="Custom",o=L(),a=_("div"),Pe(s.$$.fragment),l=L(),Pe(u.$$.fragment),j(i,"class","heading svelte-bfns6y"),j(a,"class","custom svelte-bfns6y"),j(n,"class","category category--custom svelte-bfns6y"),j(t,"class","spectrum-Popover spectrum-Popover--bottom spectrum-Picker-popover is-open svelte-bfns6y"),X(t,"spectrum-Popover--align-right",e[3])},m(c,d){D(c,t,d);for(let e=0;e<v.length;e+=1)v[e].m(t,null);A(t,r),A(t,n),A(n,i),A(n,o),A(n,a),je(s,a,null),A(a,l),je(u,a,null),m=!0,f||(h=y(p=Ft.call(null,t,e[14])),f=!0)},p(e,n){if(965&n){let i;for(g=e[7],i=0;i<g.length;i+=1){const o=Qk(e,g,i);v[i]?(v[i].p(o,n),Te(v[i],1)):(v[i]=iC(o),v[i].c(),Te(v[i],1),v[i].m(t,r))}for(Ae(),i=g.length;i<v.length;i+=1)b(i);De()}const i={};32&n&&(i.value=e[5]),s.$set(i),p&&c(p.update)&&16&n&&p.update.call(null,e[14]),8&n&&X(t,"spectrum-Popover--align-right",e[3])},i(e){if(!m){for(let e=0;e<g.length;e+=1)Te(v[e]);Te(s.$$.fragment,e),Te(u.$$.fragment,e),he((()=>{d||(d=Le(t,Ye,{y:-20,duration:200},!0)),d.run(1)})),m=!0}},o(e){v=v.filter(Boolean);for(let e=0;e<v.length;e+=1)$e(v[e]);$e(s.$$.fragment,e),$e(u.$$.fragment,e),d||(d=Le(t,Ye,{y:-20,duration:200},!1)),d.run(0),m=!1},d(e){e&&T(t),$(v,e),Fe(s),Fe(u),e&&d&&d.end(),f=!1,h()}}}function rC(e){let t,r;return t=new et({props:{name:"Checkmark",size:"S"}}),{c(){Pe(t.$$.fragment)},m(e,n){je(t,e,n),r=!0},i(e){r||(Te(t.$$.fragment,e),r=!0)},o(e){$e(t.$$.fragment,e),r=!1},d(e){Fe(t,e)}}}function nC(e){let t,r,n,i,o,a,s=e[0]===`var(--spectrum-global-color-${e[21]})`&&rC();function c(){return e[11](e[21])}return{c(){t=_("div"),r=_("div"),s&&s.c(),j(r,"class",n="fill "+(e[2]||"")+" svelte-bfns6y"),U(r,"background","var(--spectrum-global-color-"+e[21]+")"),U(r,"color",e[6]),j(t,"class","color svelte-bfns6y"),j(t,"title",e[9](e[21]))},m(e,n){D(e,t,n),A(t,r),s&&s.m(r,null),i=!0,o||(a=O(t,"click",c),o=!0)},p(t,o){(e=t)[0]===`var(--spectrum-global-color-${e[21]})`?s?1&o&&Te(s,1):(s=rC(),s.c(),Te(s,1),s.m(r,null)):s&&(Ae(),$e(s,1,1,(()=>{s=null})),De()),(!i||4&o&&n!==(n="fill "+(e[2]||"")+" svelte-bfns6y"))&&j(r,"class",n),(!i||64&o)&&U(r,"color",e[6])},i(e){i||(Te(s),i=!0)},o(e){$e(s),i=!1},d(e){e&&T(t),s&&s.d(),o=!1,a()}}}function iC(e){let t,r,n,i,o,a,s=e[18].label+"",c=e[18].colors,l=[];for(let t=0;t<c.length;t+=1)l[t]=nC(eC(e,c,t));const u=e=>$e(l[e],1,1,(()=>{l[e]=null}));return{c(){t=_("div"),r=_("div"),n=M(s),i=L(),o=_("div");for(let e=0;e<l.length;e+=1)l[e].c();j(r,"class","heading svelte-bfns6y"),j(o,"class","colors svelte-bfns6y"),j(t,"class","category")},m(e,s){D(e,t,s),A(t,r),A(r,n),A(t,i),A(t,o);for(let e=0;e<l.length;e+=1)l[e].m(o,null);a=!0},p(e,t){if(965&t){let r;for(c=e[18].colors,r=0;r<c.length;r+=1){const n=eC(e,c,r);l[r]?(l[r].p(n,t),Te(l[r],1)):(l[r]=nC(n),l[r].c(),Te(l[r],1),l[r].m(o,null))}for(Ae(),r=c.length;r<l.length;r+=1)u(r);De()}},i(e){if(!a){for(let e=0;e<c.length;e+=1)Te(l[e]);a=!0}},o(e){l=l.filter(Boolean);for(let e=0;e<l.length;e+=1)$e(l[e]);a=!1},d(e){e&&T(t),$(l,e)}}}function oC(e){let t,r,n,i,o,a,s,c,l,u,p=e[4]&&tC(e);return{c(){t=_("div"),r=_("div"),n=_("div"),s=L(),p&&p.c(),j(n,"class",i="fill "+(e[2]||"")+" svelte-bfns6y"),j(n,"style",o=e[0]?`background: ${e[0]};`:""),X(n,"placeholder",!e[0]),j(r,"class",a="preview size--"+(e[1]||"M")+" svelte-bfns6y"),j(t,"class","container svelte-bfns6y")},m(i,o){D(i,t,o),A(t,r),A(r,n),A(t,s),p&&p.m(t,null),c=!0,l||(u=O(r,"click",e[10]),l=!0)},p(e,[s]){(!c||4&s&&i!==(i="fill "+(e[2]||"")+" svelte-bfns6y"))&&j(n,"class",i),(!c||1&s&&o!==(o=e[0]?`background: ${e[0]};`:""))&&j(n,"style",o),5&s&&X(n,"placeholder",!e[0]),(!c||2&s&&a!==(a="preview size--"+(e[1]||"M")+" svelte-bfns6y"))&&j(r,"class",a),e[4]?p?(p.p(e,s),16&s&&Te(p,1)):(p=tC(e),p.c(),Te(p,1),p.m(t,null)):p&&(Ae(),$e(p,1,1,(()=>{p=null})),De())},i(e){c||(Te(p),c=!0)},o(e){$e(p),c=!1},d(e){e&&T(t),p&&p.d(),l=!1,u()}}}function aC(e,t,r){let n,i,{value:o}=t,{size:a="M"}=t,{spectrumTheme:s}=t,{alignRight:c=!1}=t,l=!1;const u=ie(),p=[{label:"Theme",colors:["gray-50","gray-75","gray-100","gray-200","gray-300","gray-400","gray-500","gray-600","gray-700","gray-800","gray-900"]},{label:"Colors",colors:["red-400","orange-400","yellow-400","green-400","seafoam-400","blue-400","indigo-400","magenta-400","red-500","orange-500","yellow-500","green-500","seafoam-500","blue-500","indigo-500","magenta-500","red-600","orange-600","yellow-600","green-600","seafoam-600","blue-600","indigo-600","magenta-600","red-700","orange-700","yellow-700","green-700","seafoam-700","blue-700","indigo-700","magenta-700","static-white","static-black"]}],d=e=>{u("change",e),r(4,l=!1)};return e.$$set=e=>{"value"in e&&r(0,o=e.value),"size"in e&&r(1,a=e.size),"spectrumTheme"in e&&r(2,s=e.spectrumTheme),"alignRight"in e&&r(3,c=e.alignRight)},e.$$.update=()=>{1&e.$$.dirty&&r(5,n=(e=>{if(!e)return e;let t=!1;const r=e.substring(28,e.length-1);for(let e of p)if(t=e.colors.includes(r),t)break;return t?null:e})(o)),1&e.$$.dirty&&r(6,i=(e=>e?.includes("gray")?/^.*(gray-(50|75|100|200|300|400|500))\)$/.test(e)?"var(--spectrum-global-color-gray-900)":"var(--spectrum-global-color-gray-50)":e?.includes("static-black")?"var(--spectrum-global-color-static-gray-50)":"var(--spectrum-global-color-static-gray-900)")(o))},[o,a,s,c,l,n,i,p,d,e=>xr(e.split("-").join(" ")),()=>r(4,l=!0),e=>{d(`var(--spectrum-global-color-${e})`)},function(t){se(e,t)},()=>d(null),()=>r(4,l=!1)]}t(".container.svelte-bfns6y.svelte-bfns6y{position:relative}.preview.svelte-bfns6y.svelte-bfns6y{width:32px;height:32px;border-radius:100%;position:relative;transition:border-color 130ms ease-in-out;box-shadow:0 0 0 1px var(--spectrum-global-color-gray-400)}.preview.svelte-bfns6y.svelte-bfns6y:hover{cursor:pointer;box-shadow:0 0 2px 2px var(--spectrum-global-color-gray-400)}.fill.svelte-bfns6y.svelte-bfns6y{width:100%;height:100%;border-radius:100%;position:absolute;top:0;left:0;display:grid;place-items:center}.fill.placeholder.svelte-bfns6y.svelte-bfns6y{background-position:0 0, 10px 10px;background-size:20px 20px;background-image:linear-gradient(\n 45deg,\n #eee 25%,\n transparent 25%,\n transparent 75%,\n #eee 75%,\n #eee 100%\n ),\n linear-gradient(\n 45deg,\n #eee 25%,\n white 25%,\n white 75%,\n #eee 75%,\n #eee 100%\n )}.size--S.svelte-bfns6y.svelte-bfns6y{width:20px;height:20px}.size--M.svelte-bfns6y.svelte-bfns6y{width:32px;height:32px}.size--L.svelte-bfns6y.svelte-bfns6y{width:48px;height:48px}.spectrum-Popover.svelte-bfns6y.svelte-bfns6y{width:210px;z-index:999;top:100%;padding:var(--spacing-l) var(--spacing-xl);display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;gap:var(--spacing-xl)}.spectrum-Popover--align-right.svelte-bfns6y.svelte-bfns6y{right:0}.colors.svelte-bfns6y.svelte-bfns6y{display:grid;grid-template-columns:1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;gap:var(--spacing-xs)}.heading.svelte-bfns6y.svelte-bfns6y{font-size:var(--font-size-s);font-weight:600;letter-spacing:0.14px;flex:1 1 auto;text-transform:uppercase;grid-column:1 / 5;margin-bottom:var(--spacing-s)}.color.svelte-bfns6y.svelte-bfns6y{height:16px;width:16px;border-radius:100%;box-shadow:0 0 0 1px var(--spectrum-global-color-gray-300);position:relative}.color.svelte-bfns6y.svelte-bfns6y:hover{cursor:pointer;box-shadow:0 0 2px 2px var(--spectrum-global-color-gray-300)}.custom.svelte-bfns6y.svelte-bfns6y{display:grid;grid-template-columns:1fr auto;align-items:center;gap:var(--spacing-m);margin-right:var(--spacing-xs)}.category--custom.svelte-bfns6y .heading.svelte-bfns6y{margin-bottom:var(--spacing-xs)}.spectrum-wrapper.svelte-bfns6y.svelte-bfns6y{background-color:transparent}");class sC extends Ne{constructor(e){super(),Re(this,e,aC,oC,l,{value:0,size:1,spectrumTheme:2,alignRight:3})}}t('.spectrum-InLineAlert {\n --spectrum-inlinealert-neutral-title-height: 38px;\n --spectrum-inlinealert-neutral-corner-radius: 4px;\n --spectrum-inlinealert-neutral-border-width: 2px;\n}\n\n.spectrum-InLineAlert {\n position: relative;\n\n display: inline-block;\n box-sizing: border-box;\n min-width: var(--spectrum-inlinealert-neutral-min-width, var(--spectrum-global-dimension-static-size-4600));\n min-height: var(--spectrum-inlinealert-neutral-title-height);\n margin-top: 8px;\n margin-bottom: 8px;\n margin-left: 0;\n margin-right: 0;\n padding-top: var(--spectrum-inlinealert-neutral-padding-y, var(--spectrum-global-dimension-static-size-250));\n padding-bottom: var(--spectrum-inlinealert-neutral-padding-y, var(--spectrum-global-dimension-static-size-250));\n padding-left: var(--spectrum-inlinealert-neutral-padding-x, var(--spectrum-global-dimension-static-size-250));\n padding-right: var(--spectrum-inlinealert-neutral-padding-x, var(--spectrum-global-dimension-static-size-250));\n\n border-width: var(--spectrum-inlinealert-neutral-border-width);\n border-style: solid;\n border-radius: var(--spectrum-inlinealert-neutral-corner-radius);\n}\n\n[dir="ltr"] .spectrum-InLineAlert-icon {\n right: 20px;\n}\n\n[dir="rtl"] .spectrum-InLineAlert-icon {\n left: 20px;\n}\n\n.spectrum-InLineAlert-icon {\n position: absolute;\n display: block;\n top: 20px;\n}\n\n[dir="ltr"] .spectrum-InLineAlert-header {\n padding-right: 30px;\n}\n\n[dir="rtl"] .spectrum-InLineAlert-header {\n padding-left: 30px;\n}\n\n.spectrum-InLineAlert-header {\n display: inline-block;\n height: auto;\n min-height: 0;\n margin: 0;\n padding: 0;\n\n font-size: 14px;\n font-weight: 700;\n font-style: normal;\n line-height: 14px;\n text-transform: none;\n}\n\n.spectrum-InLineAlert-content {\n display: block;\n margin: var(--spectrum-inlinealert-neutral-content-margin-top, var(--spectrum-global-dimension-static-size-100)) 0 0 0;\n padding: 0;\n\n font-size: 14px;\n word-wrap: break-word;\n}\n\n[dir="ltr"] .spectrum-InLineAlert-footer {\n\n text-align: right;\n}\n\n[dir="rtl"] .spectrum-InLineAlert-footer {\n\n text-align: left;\n}\n\n.spectrum-InLineAlert-footer {\n display: block;\n\n padding-top: 0.5rem;\n}\n\n.spectrum-InLineAlert-footer:empty {\n display: none;\n }\n\n[dir="ltr"] .spectrum-InLineAlert-footer .spectrum-Button {\n margin-right: 0;\n}\n\n[dir="rtl"] .spectrum-InLineAlert-footer .spectrum-Button {\n margin-left: 0;\n}\n\n[dir="ltr"] .spectrum-InLineAlert-footer .spectrum-Button {\n margin-left: 0.75rem;\n}\n\n[dir="rtl"] .spectrum-InLineAlert-footer .spectrum-Button {\n margin-right: 0.75rem;\n}\n\n.spectrum-InLineAlert {\n background-color: var(--spectrum-inlinealert-neutral-background-color, var(--spectrum-global-color-gray-50));\n color: var(--spectrum-inlinealert-neutral-text-color, var(--spectrum-global-color-gray-700));\n}\n\n.spectrum-InLineAlert-header {\n color: var(--spectrum-inlinealert-neutral-title-text-color, var(--spectrum-global-color-gray-900));\n}\n\n.spectrum-InLineAlert-content {\n color: var(--spectrum-inlinealert-neutral-text-color, var(--spectrum-global-color-gray-700));\n}\n\n.spectrum-InLineAlert--info {\n border-color: var(--spectrum-inlinealert-info-border-color, var(--spectrum-semantic-informative-border-color));\n}\n\n.spectrum-InLineAlert--info .spectrum-InLineAlert-icon {\n color: var(--spectrum-inlinealert-info-icon-color, var(--spectrum-semantic-informative-icon-color));\n }\n\n.spectrum-InLineAlert--help {\n border-color: var(--spectrum-inlinealert-info-border-color, var(--spectrum-semantic-informative-border-color));\n}\n\n.spectrum-InLineAlert--help .spectrum-InLineAlert-icon {\n color: var(--spectrum-inlinealert-info-icon-color, var(--spectrum-semantic-informative-icon-color));\n }\n\n.spectrum-InLineAlert--error {\n border-color: var(--spectrum-inlinealert-error-border-color, var(--spectrum-semantic-negative-border-color));\n}\n\n.spectrum-InLineAlert--error .spectrum-InLineAlert-icon {\n color: var(--spectrum-inlinealert-error-icon-color, var(--spectrum-semantic-negative-icon-color));\n }\n\n.spectrum-InLineAlert--success {\n border-color: var(--spectrum-inlinealert-success-border-color, var(--spectrum-semantic-positive-border-color));\n}\n\n.spectrum-InLineAlert--success .spectrum-InLineAlert-icon {\n color: var(--spectrum-inlinealert-success-icon-color, var(--spectrum-semantic-positive-icon-color));\n }\n\n.spectrum-InLineAlert--negative {\n border-color: var(--spectrum-inlinealert-negative-border-color, var(--spectrum-semantic-notice-border-color));\n}\n\n.spectrum-InLineAlert--negative .spectrum-InLineAlert-icon {\n color: var(--spectrum-inlinealert-negative-icon-color, var(--spectrum-semantic-notice-icon-color));\n }\n');function cC(e,t,r){const n=e.slice();return n[6]=t[r],n}function lC(e){let t,r,n=e[6]+"";return{c(){t=_("div"),r=M(n),j(t,"class","spectrum-InLineAlert-content")},m(e,n){D(e,t,n),A(t,r)},p(e,t){16&t&&n!==(n=e[6]+"")&&q(r,n)},d(e){e&&T(t)}}}function uC(e){let t,r,n;return r=new On({props:{secondary:!0,$$slots:{default:[pC]},$$scope:{ctx:e}}}),r.$on("click",(function(){c(e[2])&&e[2].apply(this,arguments)})),{c(){t=_("div"),Pe(r.$$.fragment),j(t,"class","spectrum-InLineAlert-footer")},m(e,i){D(e,t,i),je(r,t,null),n=!0},p(t,n){e=t;const i={};512&n&&(i.$$scope={dirty:n,ctx:e}),r.$set(i)},i(e){n||(Te(r.$$.fragment,e),n=!0)},o(e){$e(r.$$.fragment,e),n=!1},d(e){e&&T(t),Fe(r)}}}function pC(e){let t;return{c(){t=M("OK")},m(e,r){D(e,t,r)},d(e){e&&T(t)}}}function dC(e){let t,r,n,i,o,a,s,c,l,u,p,d=e[4],m=[];for(let t=0;t<d.length;t+=1)m[t]=lC(cC(e,d,t));let f=e[2]&&uC(e);return{c(){t=_("div"),r=E("svg"),n=E("use"),o=L(),a=_("div"),s=M(e[1]),c=L();for(let e=0;e<m.length;e+=1)m[e].c();l=L(),f&&f.c(),R(n,"xlink:href",i="#spectrum-icon-18-"+e[3]),j(r,"class","spectrum-Icon spectrum-Icon--sizeM spectrum-InLineAlert-icon"),j(r,"focusable","false"),j(r,"aria-hidden","true"),j(a,"class","spectrum-InLineAlert-header"),j(t,"class",u="spectrum-InLineAlert spectrum-InLineAlert--"+e[0]+" svelte-1ofhl9j")},m(e,i){D(e,t,i),A(t,r),A(r,n),A(t,o),A(t,a),A(a,s),A(t,c);for(let e=0;e<m.length;e+=1)m[e].m(t,null);A(t,l),f&&f.m(t,null),p=!0},p(e,[r]){if((!p||8&r&&i!==(i="#spectrum-icon-18-"+e[3]))&&R(n,"xlink:href",i),(!p||2&r)&&q(s,e[1]),16&r){let n;for(d=e[4],n=0;n<d.length;n+=1){const i=cC(e,d,n);m[n]?m[n].p(i,r):(m[n]=lC(i),m[n].c(),m[n].m(t,l))}for(;n<m.length;n+=1)m[n].d(1);m.length=d.length}e[2]?f?(f.p(e,r),4&r&&Te(f,1)):(f=uC(e),f.c(),Te(f,1),f.m(t,null)):f&&(Ae(),$e(f,1,1,(()=>{f=null})),De()),(!p||1&r&&u!==(u="spectrum-InLineAlert spectrum-InLineAlert--"+e[0]+" svelte-1ofhl9j"))&&j(t,"class",u)},i(e){p||(Te(f),p=!0)},o(e){$e(f),p=!1},d(e){e&&T(t),$(m,e),f&&f.d()}}}function mC(e,t,r){let n,i,{type:o="info"}=t,{header:a=""}=t,{message:s=""}=t,{onConfirm:c}=t;return e.$$set=e=>{"type"in e&&r(0,o=e.type),"header"in e&&r(1,a=e.header),"message"in e&&r(5,s=e.message),"onConfirm"in e&&r(2,c=e.onConfirm)},e.$$.update=()=>{1&e.$$.dirty&&r(3,n=function(e){switch(e){case"error":case"negative":return"Alert";case"success":return"CheckmarkCircle";case"help":return"Help";default:return"Info"}}(o)),32&e.$$.dirty&&r(4,i=s.split("\n"))},[o,a,c,n,i,s]}t(".spectrum-InLineAlert.svelte-1ofhl9j{--spectrum-semantic-negative-border-color:#e34850;--spectrum-semantic-positive-border-color:#2d9d78;--spectrum-semantic-positive-icon-color:#2d9d78;--spectrum-semantic-negative-icon-color:#e34850;min-width:100px}");class fC extends Ne{constructor(e){super(),Re(this,e,mC,dC,l,{type:0,header:1,message:5,onConfirm:2})}}function hC(e){let t,r,n,i,o,a,s,c,l,u,d,f,h,g,v,b,y,x;const w=e[8].default,k=p(w,e,e[7],null);let C=e[3]&&e[4]&&gC(e);return{c(){t=_("div"),r=E("svg"),n=E("use"),a=L(),s=_("div"),c=_("div"),k&&k.c(),l=L(),C&&C.c(),u=L(),d=_("div"),f=_("button"),h=_("div"),h.innerHTML='<svg class="spectrum-ClearButton-icon spectrum-Icon spectrum-UIIcon-Cross100" focusable="false" aria-hidden="true"><use xlink:href="#spectrum-css-icon-Cross100"></use></svg>',R(n,"xlink:href",i="#spectrum-icon-18-"+e[1]),j(r,"class",o="spectrum-Icon spectrum-Icon--size"+e[2]+" spectrum-Toast-typeIcon svelte-5w5398"),j(r,"focusable","false"),j(r,"aria-hidden","true"),j(c,"class","spectrum-Toast-content"),j(s,"class","spectrum-Toast-body"),j(h,"class","spectrum-ClearButton-fill"),j(f,"class",g="spectrum-ClearButton spectrum-ClearButton--overBackground spectrum-ClearButton--size"+e[2]+" svelte-5w5398"),j(d,"class","spectrum-Toast-buttons"),j(t,"class",v="spectrum-Toast spectrum-Toast--"+e[0]+" svelte-5w5398")},m(i,o){D(i,t,o),A(t,r),A(r,n),A(t,a),A(t,s),A(s,c),k&&k.m(c,null),A(s,l),C&&C.m(s,null),A(t,u),A(t,d),A(d,f),A(f,h),b=!0,y||(x=O(f,"click",e[6]),y=!0)},p(e,a){(!b||2&a&&i!==(i="#spectrum-icon-18-"+e[1]))&&R(n,"xlink:href",i),(!b||4&a&&o!==(o="spectrum-Icon spectrum-Icon--size"+e[2]+" spectrum-Toast-typeIcon svelte-5w5398"))&&j(r,"class",o),k&&k.p&&(!b||128&a)&&m(k,w,e,e[7],a,null,null),e[3]&&e[4]?C?C.p(e,a):(C=gC(e),C.c(),C.m(s,null)):C&&(C.d(1),C=null),(!b||4&a&&g!==(g="spectrum-ClearButton spectrum-ClearButton--overBackground spectrum-ClearButton--size"+e[2]+" svelte-5w5398"))&&j(f,"class",g),(!b||1&a&&v!==(v="spectrum-Toast spectrum-Toast--"+e[0]+" svelte-5w5398"))&&j(t,"class",v)},i(e){b||(Te(k,e),b=!0)},o(e){$e(k,e),b=!1},d(e){e&&T(t),k&&k.d(e),C&&C.d(),y=!1,x()}}}function gC(e){let t,r,n,i,o;return{c(){t=_("button"),r=_("span"),n=M(e[3]),j(r,"class","spectrum-Button-label"),j(t,"class","spectrum-Button spectrum-Button--sizeM spectrum-Button--overBackground spectrum-Button--quiet")},m(a,s){D(a,t,s),A(t,r),A(r,n),i||(o=O(t,"click",(function(){c(e[4])&&e[4].apply(this,arguments)})),i=!0)},p(t,r){e=t,8&r&&q(n,e[3])},d(e){e&&T(t),i=!1,o()}}}function vC(e){let t,r,n=e[5]&&hC(e);return{c(){n&&n.c(),t=I()},m(e,i){n&&n.m(e,i),D(e,t,i),r=!0},p(e,[r]){e[5]?n?(n.p(e,r),32&r&&Te(n,1)):(n=hC(e),n.c(),Te(n,1),n.m(t.parentNode,t)):n&&(Ae(),$e(n,1,1,(()=>{n=null})),De())},i(e){r||(Te(n),r=!0)},o(e){$e(n),r=!1},d(e){n&&n.d(e),e&&T(t)}}}function bC(e,t,r){let{$$slots:n={},$$scope:i}=t,o=ie(),{type:a="info"}=t,{icon:s="Info"}=t,{size:c="S"}=t,{extraButtonText:l}=t,{extraButtonAction:u}=t,p=!0;return e.$$set=e=>{"type"in e&&r(0,a=e.type),"icon"in e&&r(1,s=e.icon),"size"in e&&r(2,c=e.size),"extraButtonText"in e&&r(3,l=e.extraButtonText),"extraButtonAction"in e&&r(4,u=e.extraButtonAction),"$$scope"in e&&r(7,i=e.$$scope)},[a,s,c,l,u,p,function(){r(5,p=!1),o("change")},i,n]}t(".spectrum-Toast.svelte-5w5398{pointer-events:all;width:100%}");class yC extends Ne{constructor(e){super(),Re(this,e,bC,vC,l,{type:0,icon:1,size:2,extraButtonText:3,extraButtonAction:4})}}const xC=function(){const e=bo({});return{subscribe:e.subscribe,showStatus:async()=>{const t={message:"Some systems are experiencing issues",type:"negative",extraButtonText:"View Status",extraButtonAction:()=>window.open("https://status.budibase.com/")};await(async(t={message:message,type:type,extraButtonText:extraButtonText,extraButtonAction:extraButtonAction,onChange:onChange})=>{e.update((e=>({...e,...t})))})(t)}}}();function wC(e){let t,r,n,i;return r=new yC({props:{type:e[0].type,extraButtonText:e[0].extraButtonText,extraButtonAction:e[0].extraButtonAction,$$slots:{default:[kC]},$$scope:{ctx:e}}}),r.$on("change",(function(){c(e[0].onChange)&&e[0].onChange.apply(this,arguments)})),{c(){t=_("div"),Pe(r.$$.fragment)},m(e,n){D(e,t,n),je(r,t,null),i=!0},p(t,n){e=t;const i={};1&n&&(i.type=e[0].type),1&n&&(i.extraButtonText=e[0].extraButtonText),1&n&&(i.extraButtonAction=e[0].extraButtonAction),3&n&&(i.$$scope={dirty:n,ctx:e}),r.$set(i)},i(e){i||(Te(r.$$.fragment,e),he((()=>{n||(n=Le(t,Ye,{y:-30},!0)),n.run(1)})),i=!0)},o(e){$e(r.$$.fragment,e),n||(n=Le(t,Ye,{y:-30},!1)),n.run(0),i=!1},d(e){e&&T(t),Fe(r),e&&n&&n.end()}}}function kC(e){let t,r=e[0].message+"";return{c(){t=M(r)},m(e,r){D(e,t,r)},p(e,n){1&n&&r!==(r=e[0].message+"")&&q(t,r)},d(e){e&&T(t)}}}function CC(e){let t,r,n=e[0].message&&wC(e);return{c(){t=_("div"),n&&n.c(),j(t,"class","banner svelte-j1ssay")},m(e,i){D(e,t,i),n&&n.m(t,null),r=!0},p(e,r){e[0].message?n?(n.p(e,r),1&r&&Te(n,1)):(n=wC(e),n.c(),Te(n,1),n.m(t,null)):n&&(Ae(),$e(n,1,1,(()=>{n=null})),De())},i(e){r||(Te(n),r=!0)},o(e){$e(n),r=!1},d(e){e&&T(t),n&&n.d()}}}function zC(e){let t,r;return t=new Tn({props:{target:".banner-container",$$slots:{default:[CC]},$$scope:{ctx:e}}}),{c(){Pe(t.$$.fragment)},m(e,n){je(t,e,n),r=!0},p(e,[r]){const n={};3&r&&(n.$$scope={dirty:r,ctx:e}),t.$set(n)},i(e){r||(Te(t.$$.fragment,e),r=!0)},o(e){$e(t.$$.fragment,e),r=!1},d(e){Fe(t,e)}}}function SC(e,t,r){let n;return u(e,xC,(e=>r(0,n=e))),[n]}t(".banner.svelte-j1ssay{pointer-events:none;width:100%}");class AC extends Ne{constructor(e){super(),Re(this,e,SC,zC,l,{})}}var DC=tc((function(e,t){e.exports=function(){var e=navigator.userAgent,t=navigator.platform,r=/gecko\/\d/i.test(e),n=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),a=n||i||o,s=a&&(n?document.documentMode||6:+(o||i)[1]),c=!o&&/WebKit\//.test(e),l=c&&/Qt\/\d+\.\d+/.test(e),u=!o&&/Chrome\//.test(e),p=/Opera\//.test(e),d=/Apple Computer/.test(navigator.vendor),m=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),f=/PhantomJS/.test(e),h=d&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),g=/Android/.test(e),v=h||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),b=h||/Mac/.test(t),y=/\bCrOS\b/.test(e),x=/win/i.test(t),w=p&&e.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(p=!1,c=!0);var k=b&&(l||p&&(null==w||w<12.11)),C=r||a&&s>=9;function z(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var S,A=function(e,t){var r=e.className,n=z(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function D(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function T(e,t){return D(e).appendChild(t)}function $(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function _(e,t,r,n){var i=$(e,t,r,n);return i.setAttribute("role","presentation"),i}function E(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function M(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function L(e,t){var r=e.className;z(t).test(r)||(e.className+=(r?" ":"")+t)}function I(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!z(r[n]).test(t)&&(t+=" "+r[n]);return t}S=document.createRange?function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(e){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var O=function(e){e.select()};function B(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function P(e,t,r){for(var n in t||(t={}),e)!e.hasOwnProperty(n)||!1===r&&t.hasOwnProperty(n)||(t[n]=e[n]);return t}function j(e,t,r,n,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=n||0,a=i||0;;){var s=e.indexOf("\t",o);if(s<0||s>=t)return a+(t-o);a+=s-o,a+=r-a%r,o=s+1}}h?O=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(O=function(e){try{e.select()}catch(e){}});var F=function(){this.id=null,this.f=null,this.time=0,this.handler=B(this.onTimeout,this)};function R(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}F.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},F.prototype.set=function(e,t){this.f=t;var r=+new Date+e;(!this.id||r<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=r)};var N=50,q={toString:function(){return"CodeMirror.Pass"}},H={scroll:!1},U={origin:"*mouse"},G={origin:"+move"};function W(e,t,r){for(var n=0,i=0;;){var o=e.indexOf("\t",n);-1==o&&(o=e.length);var a=o-n;if(o==e.length||i+a>=t)return n+Math.min(a,t-i);if(i+=o-n,n=o+1,(i+=r-i%r)>=t)return n}}var X=[""];function V(e){for(;X.length<=e;)X.push(Y(X)+" ");return X[e]}function Y(e){return e[e.length-1]}function K(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function J(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}function Z(){}function Q(e,t){var r;return Object.create?r=Object.create(e):(Z.prototype=e,r=new Z),t&&P(t,r),r}var ee=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function te(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||ee.test(e))}function re(e,t){return t?!!(t.source.indexOf("\\w")>-1&&te(e))||t.test(e):te(e)}function ne(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ie=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function oe(e){return e.charCodeAt(0)>=768&&ie.test(e)}function ae(e,t,r){for(;(r<0?t>0:t<e.length)&&oe(e.charAt(t));)t+=r;return t}function se(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}function ce(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<r&&a.to>t||t==r&&a.to==t)&&(n(Math.max(a.from,t),Math.min(a.to,r),1==a.level?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}var le=null;function ue(e,t,r){var n;le=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==r?n=i:le=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:le=i)}return null!=n?n:le}var pe=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(r){return r<=247?e.charAt(r):1424<=r&&r<=1524?"R":1536<=r&&r<=1785?t.charAt(r-1536):1774<=r&&r<=2220?"r":8192<=r&&r<=8203?"w":8204==r?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,a=/[Lb1n]/,s=/[1n]/;function c(e,t,r){this.level=e,this.from=t,this.to=r}return function(e,t){var l="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!n.test(e))return!1;for(var u=e.length,p=[],d=0;d<u;++d)p.push(r(e.charCodeAt(d)));for(var m=0,f=l;m<u;++m){var h=p[m];"m"==h?p[m]=f:f=h}for(var g=0,v=l;g<u;++g){var b=p[g];"1"==b&&"r"==v?p[g]="n":o.test(b)&&(v=b,"r"==b&&(p[g]="R"))}for(var y=1,x=p[0];y<u-1;++y){var w=p[y];"+"==w&&"1"==x&&"1"==p[y+1]?p[y]="1":","!=w||x!=p[y+1]||"1"!=x&&"n"!=x||(p[y]=x),x=w}for(var k=0;k<u;++k){var C=p[k];if(","==C)p[k]="N";else if("%"==C){var z=void 0;for(z=k+1;z<u&&"%"==p[z];++z);for(var S=k&&"!"==p[k-1]||z<u&&"1"==p[z]?"1":"N",A=k;A<z;++A)p[A]=S;k=z-1}}for(var D=0,T=l;D<u;++D){var $=p[D];"L"==T&&"1"==$?p[D]="L":o.test($)&&(T=$)}for(var _=0;_<u;++_)if(i.test(p[_])){var E=void 0;for(E=_+1;E<u&&i.test(p[E]);++E);for(var M="L"==(_?p[_-1]:l),L=M==("L"==(E<u?p[E]:l))?M?"L":"R":l,I=_;I<E;++I)p[I]=L;_=E-1}for(var O,B=[],P=0;P<u;)if(a.test(p[P])){var j=P;for(++P;P<u&&a.test(p[P]);++P);B.push(new c(0,j,P))}else{var F=P,R=B.length,N="rtl"==t?1:0;for(++P;P<u&&"L"!=p[P];++P);for(var q=F;q<P;)if(s.test(p[q])){F<q&&(B.splice(R,0,new c(1,F,q)),R+=N);var H=q;for(++q;q<P&&s.test(p[q]);++q);B.splice(R,0,new c(2,H,q)),R+=N,F=q}else++q;F<P&&B.splice(R,0,new c(1,F,P))}return"ltr"==t&&(1==B[0].level&&(O=e.match(/^\s+/))&&(B[0].from=O[0].length,B.unshift(new c(0,0,O[0].length))),1==Y(B).level&&(O=e.match(/\s+$/))&&(Y(B).to-=O[0].length,B.push(new c(0,u-O[0].length,u)))),"rtl"==t?B.reverse():B}}();function de(e,t){var r=e.order;return null==r&&(r=e.order=pe(e.text,t)),r}var me=[],fe=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||me).concat(r)}};function he(e,t){return e._handlers&&e._handlers[t]||me}function ge(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var o=R(i,r);o>-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function ve(e,t){var r=he(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function be(e,t,r){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ve(e,r||t.type,e,t),ze(t)||t.codemirrorIgnore}function ye(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)-1==R(r,t[n])&&r.push(t[n])}function xe(e,t){return he(e,t).length>0}function we(e){e.prototype.on=function(e,t){fe(this,e,t)},e.prototype.off=function(e,t){ge(this,e,t)}}function ke(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ce(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function ze(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Se(e){ke(e),Ce(e)}function Ae(e){return e.target||e.srcElement}function De(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),b&&e.ctrlKey&&1==t&&(t=3),t}var Te,$e,_e=function(){if(a&&s<9)return!1;var e=$("div");return"draggable"in e||"dragDrop"in e}();function Ee(e){if(null==Te){var t=$("span","​");T(e,$("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Te=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var r=Te?$("span","​"):$("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Me(e){if(null!=$e)return $e;var t=T(e,document.createTextNode("AخA")),r=S(t,0,1).getBoundingClientRect(),n=S(t,1,2).getBoundingClientRect();return D(e),!(!r||r.left==r.right)&&($e=n.right-r.right<3)}var Le=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(r.push(o.slice(0,a)),t+=a+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},Ie=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Oe=function(){var e=$("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Be=null;function Pe(e){if(null!=Be)return Be;var t=T(e,$("span","x")),r=t.getBoundingClientRect(),n=S(t,0,1).getBoundingClientRect();return Be=Math.abs(r.left-n.left)>1}var je={},Fe={};function Re(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),je[e]=t}function Ne(e,t){Fe[e]=t}function qe(e){if("string"==typeof e&&Fe.hasOwnProperty(e))e=Fe[e];else if(e&&"string"==typeof e.name&&Fe.hasOwnProperty(e.name)){var t=Fe[e.name];"string"==typeof t&&(t={name:t}),(e=Q(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return qe("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return qe("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function He(e,t){t=qe(t);var r=je[t.name];if(!r)return He(e,"text/plain");var n=r(e,t);if(Ue.hasOwnProperty(t.name)){var i=Ue[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)n[a]=t.modeProps[a];return n}var Ue={};function Ge(e,t){P(t,Ue.hasOwnProperty(e)?Ue[e]:Ue[e]={})}function We(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function Xe(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Ve(e,t,r){return!e.startState||e.startState(t,r)}var Ye=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};function Ke(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t<o){r=i;break}t-=o}return r.lines[t]}function Je(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,(function(e){var o=e.text;i==r.line&&(o=o.slice(0,r.ch)),i==t.line&&(o=o.slice(t.ch)),n.push(o),++i})),n}function Ze(e,t,r){var n=[];return e.iter(t,r,(function(e){n.push(e.text)})),n}function Qe(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function et(e){if(null==e.parent)return null;for(var t=e.parent,r=R(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;n.children[i]!=t;++i)r+=n.children[i].chunkSize();return r+t.first}function tt(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],o=i.height;if(t<o){e=i;continue e}t-=o,r+=i.chunkSize()}return r}while(!e.lines);for(var a=0;a<e.lines.length;++a){var s=e.lines[a].height;if(t<s)break;t-=s}return r+a}function rt(e,t){return t>=e.first&&t<e.first+e.size}function nt(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function it(e,t,r){if(void 0===r&&(r=null),!(this instanceof it))return new it(e,t,r);this.line=e,this.ch=t,this.sticky=r}function ot(e,t){return e.line-t.line||e.ch-t.ch}function at(e,t){return e.sticky==t.sticky&&0==ot(e,t)}function st(e){return it(e.line,e.ch)}function ct(e,t){return ot(e,t)<0?t:e}function lt(e,t){return ot(e,t)<0?e:t}function ut(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function pt(e,t){if(t.line<e.first)return it(e.first,0);var r=e.first+e.size-1;return t.line>r?it(r,Ke(e,r).text.length):dt(t,Ke(e,t.line).text.length)}function dt(e,t){var r=e.ch;return null==r||r>t?it(e.line,t):r<0?it(e.line,0):e}function mt(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=pt(e,t[n]);return r}Ye.prototype.eol=function(){return this.pos>=this.string.length},Ye.prototype.sol=function(){return this.pos==this.lineStart},Ye.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ye.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ye.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Ye.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ye.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ye.prototype.skipToEnd=function(){this.pos=this.string.length},Ye.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ye.prototype.backUp=function(e){this.pos-=e},Ye.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=j(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?j(this.string,this.lineStart,this.tabSize):0)},Ye.prototype.indentation=function(){return j(this.string,null,this.tabSize)-(this.lineStart?j(this.string,this.lineStart,this.tabSize):0)},Ye.prototype.match=function(e,t,r){if("string"!=typeof e){var n=this.string.slice(this.pos).match(e);return n&&n.index>0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Ye.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ye.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ye.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ye.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ft=function(e,t){this.state=e,this.lookAhead=t},ht=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function gt(e,t,r,n){var i=[e.state.modeGen],o={};St(e,t.text,e.doc.mode,r,(function(e,t){return i.push(e,t)}),o,n);for(var a=r.state,s=function(n){r.baseTokens=i;var s=e.state.overlays[n],c=1,l=0;r.state=!0,St(e,t.text,s.mode,r,(function(e,t){for(var r=c;l<e;){var n=i[c];n>e&&i.splice(c,1,e,i[c+1],n),c+=2,l=Math.min(e,n)}if(t)if(s.opaque)i.splice(r,c-r,e,"overlay "+t),c=r+2;else for(;r<c;r+=2){var o=i[r+1];i[r+1]=(o?o+" ":"")+"overlay "+t}}),o),r.state=a,r.baseTokens=null,r.baseTokenPos=1},c=0;c<e.state.overlays.length;++c)s(c);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function vt(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=bt(e,et(t)),i=t.text.length>e.options.maxHighlightLength&&We(e.doc.mode,n.state),o=gt(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function bt(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new ht(n,!0,t);var o=At(e,t,r),a=o>n.first&&Ke(n,o-1).stateAfter,s=a?ht.fromSaved(n,a,o):new ht(n,Ve(n.mode),o);return n.iter(o,t,(function(r){yt(e,r.text,s);var n=s.line;r.stateAfter=n==t-1||n%5==0||n>=i.viewFrom&&n<i.viewTo?s.save():null,s.nextLine()})),r&&(n.modeFrontier=s.line),s}function yt(e,t,r,n){var i=e.doc.mode,o=new Ye(t,e.options.tabSize,r);for(o.start=o.pos=n||0,""==t&&xt(i,r.state);!o.eol();)wt(i,o,r.state),o.start=o.pos}function xt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=Xe(e,t);return r.mode.blankLine?r.mode.blankLine(r.state):void 0}}function wt(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=Xe(e,r).mode);var o=e.token(t,r);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}ht.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ht.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ht.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ht.fromSaved=function(e,t,r){return t instanceof ft?new ht(e,We(e.mode,t.state),r,t.lookAhead):new ht(e,We(e.mode,t),r)},ht.prototype.save=function(e){var t=!1!==e?We(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ft(t,this.maxLookAhead):t};var kt=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function Ct(e,t,r,n){var i,o,a=e.doc,s=a.mode,c=Ke(a,(t=pt(a,t)).line),l=bt(e,t.line,r),u=new Ye(c.text,e.options.tabSize,l);for(n&&(o=[]);(n||u.pos<t.ch)&&!u.eol();)u.start=u.pos,i=wt(s,u,l.state),n&&o.push(new kt(u,i,We(a.mode,l.state)));return n?o:new kt(u,i,l.state)}function zt(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";null==t[n]?t[n]=r[2]:new RegExp("(?:^|\\s)"+r[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+r[2])}return e}function St(e,t,r,n,i,o,a){var s=r.flattenSpans;null==s&&(s=e.options.flattenSpans);var c,l=0,u=null,p=new Ye(t,e.options.tabSize,n),d=e.options.addModeClass&&[null];for(""==t&&zt(xt(r,n.state),o);!p.eol();){if(p.pos>e.options.maxHighlightLength?(s=!1,a&&yt(e,t,n,p.pos),p.pos=t.length,c=null):c=zt(wt(r,p,n.state,d),o),d){var m=d[0].name;m&&(c="m-"+(c?m+" "+c:m))}if(!s||u!=c){for(;l<p.start;)i(l=Math.min(p.start,l+5e3),u);u=c}p.start=p.pos}for(;l<p.pos;){var f=Math.min(p.pos,l+5e3);i(f,u),l=f}}function At(e,t,r){for(var n,i,o=e.doc,a=r?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=o.first)return o.first;var c=Ke(o,s-1),l=c.stateAfter;if(l&&(!r||s+(l instanceof ft?l.lookAhead:0)<=o.modeFrontier))return s;var u=j(c.text,null,e.options.tabSize);(null==i||n>u)&&(i=s-1,n=u)}return i}function Dt(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var r=e.first,n=t-1;n>r;n--){var i=Ke(e,n).stateAfter;if(i&&(!(i instanceof ft)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}}var Tt=!1,$t=!1;function _t(){Tt=!0}function Et(){$t=!0}function Mt(e,t,r){this.marker=e,this.from=t,this.to=r}function Lt(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function It(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function Ot(e,t,r){var n=r&&window.WeakSet&&(r.markedSpans||(r.markedSpans=new WeakSet));n&&n.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],n&&n.add(e.markedSpans)),t.marker.attachLine(e)}function Bt(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==a.type&&(!r||!o.marker.insertLeft)){var s=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new Mt(a,o.from,s?null:o.to))}}return n}function Pt(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.to||(a.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!r||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(n||(n=[])).push(new Mt(a,s?null:o.from-t,null==o.to?null:o.to-t))}}return n}function jt(e,t){if(t.full)return null;var r=rt(e,t.from.line)&&Ke(e,t.from.line).markedSpans,n=rt(e,t.to.line)&&Ke(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,a=0==ot(t.from,t.to),s=Bt(r,i,a),c=Pt(n,o,a),l=1==t.text.length,u=Y(t.text).length+(l?i:0);if(s)for(var p=0;p<s.length;++p){var d=s[p];if(null==d.to){var m=Lt(c,d.marker);m?l&&(d.to=null==m.to?null:m.to+u):d.to=i}}if(c)for(var f=0;f<c.length;++f){var h=c[f];null!=h.to&&(h.to+=u),null==h.from?Lt(s,h.marker)||(h.from=u,l&&(s||(s=[])).push(h)):(h.from+=u,l&&(s||(s=[])).push(h))}s&&(s=Ft(s)),c&&c!=s&&(c=Ft(c));var g=[s];if(!l){var v,b=t.text.length-2;if(b>0&&s)for(var y=0;y<s.length;++y)null==s[y].to&&(v||(v=[])).push(new Mt(s[y].marker,null,null));for(var x=0;x<b;++x)g.push(v);g.push(c)}return g}function Ft(e){for(var t=0;t<e.length;++t){var r=e[t];null!=r.from&&r.from==r.to&&!1!==r.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Rt(e,t,r){var n=null;if(e.iter(t.line,r.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var r=e.markedSpans[t].marker;!r.readOnly||n&&-1!=R(n,r)||(n||(n=[])).push(r)}})),!n)return null;for(var i=[{from:t,to:r}],o=0;o<n.length;++o)for(var a=n[o],s=a.find(0),c=0;c<i.length;++c){var l=i[c];if(!(ot(l.to,s.from)<0||ot(l.from,s.to)>0)){var u=[c,1],p=ot(l.from,s.from),d=ot(l.to,s.to);(p<0||!a.inclusiveLeft&&!p)&&u.push({from:l.from,to:s.from}),(d>0||!a.inclusiveRight&&!d)&&u.push({from:s.to,to:l.to}),i.splice.apply(i,u),c+=u.length-3}}return i}function Nt(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function qt(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function Ht(e){return e.inclusiveLeft?-1:0}function Ut(e){return e.inclusiveRight?1:0}function Gt(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var n=e.find(),i=t.find(),o=ot(n.from,i.from)||Ht(e)-Ht(t);if(o)return-o;var a=ot(n.to,i.to)||Ut(e)-Ut(t);return a||t.id-e.id}function Wt(e,t){var r,n=$t&&e.markedSpans;if(n)for(var i=void 0,o=0;o<n.length;++o)(i=n[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!r||Gt(r,i.marker)<0)&&(r=i.marker);return r}function Xt(e){return Wt(e,!0)}function Vt(e){return Wt(e,!1)}function Yt(e,t){var r,n=$t&&e.markedSpans;if(n)for(var i=0;i<n.length;++i){var o=n[i];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!r||Gt(r,o.marker)<0)&&(r=o.marker)}return r}function Kt(e,t,r,n,i){var o=Ke(e,t),a=$t&&o.markedSpans;if(a)for(var s=0;s<a.length;++s){var c=a[s];if(c.marker.collapsed){var l=c.marker.find(0),u=ot(l.from,r)||Ht(c.marker)-Ht(i),p=ot(l.to,n)||Ut(c.marker)-Ut(i);if(!(u>=0&&p<=0||u<=0&&p>=0)&&(u<=0&&(c.marker.inclusiveRight&&i.inclusiveLeft?ot(l.to,r)>=0:ot(l.to,r)>0)||u>=0&&(c.marker.inclusiveRight&&i.inclusiveLeft?ot(l.from,n)<=0:ot(l.from,n)<0)))return!0}}}function Jt(e){for(var t;t=Xt(e);)e=t.find(-1,!0).line;return e}function Zt(e){for(var t;t=Vt(e);)e=t.find(1,!0).line;return e}function Qt(e){for(var t,r;t=Vt(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function er(e,t){var r=Ke(e,t),n=Jt(r);return r==n?t:et(n)}function tr(e,t){if(t>e.lastLine())return t;var r,n=Ke(e,t);if(!rr(e,n))return t;for(;r=Vt(n);)n=r.find(1,!0).line;return et(n)+1}function rr(e,t){var r=$t&&t.markedSpans;if(r)for(var n=void 0,i=0;i<r.length;++i)if((n=r[i]).marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&nr(e,t,n))return!0}}function nr(e,t,r){if(null==r.to){var n=r.marker.find(1,!0);return nr(e,n.line,Lt(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(null==i.to||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&nr(e,t,i))return!0}function ir(e){for(var t=0,r=(e=Jt(e)).parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var o=r.parent;o;o=(r=o).parent)for(var a=0;a<o.children.length;++a){var s=o.children[a];if(s==r)break;t+=s.height}return t}function or(e){if(0==e.height)return 0;for(var t,r=e.text.length,n=e;t=Xt(n);){var i=t.find(0,!0);n=i.from.line,r+=i.from.ch-i.to.ch}for(n=e;t=Vt(n);){var o=t.find(0,!0);r-=n.text.length-o.from.ch,r+=(n=o.to.line).text.length-o.to.ch}return r}function ar(e){var t=e.display,r=e.doc;t.maxLine=Ke(r,r.first),t.maxLineLength=or(t.maxLine),t.maxLineChanged=!0,r.iter((function(e){var r=or(e);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)}))}var sr=function(e,t,r){this.text=e,qt(this,t),this.height=r?r(this):1};function cr(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Nt(e),qt(e,r);var i=n?n(e):1;i!=e.height&&Qe(e,i)}function lr(e){e.parent=null,Nt(e)}sr.prototype.lineNo=function(){return et(this)},we(sr);var ur={},pr={};function dr(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?pr:ur;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function mr(e,t){var r=_("span",null,null,c?"padding-right: .1px":null),n={pre:_("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;n.pos=0,n.addToken=hr,Me(e.display.measure)&&(a=de(o,e.doc.direction))&&(n.addToken=vr(n.addToken,a)),n.map=[],yr(o,n,vt(e,o,t!=e.display.externalMeasured&&et(o))),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=I(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=I(o.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(Ee(e.display.measure))),0==i?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(c){var s=n.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return ve(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=I(n.pre.className,n.textClass||"")),n}function fr(e){var t=$("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function hr(e,t,r,n,i,o,c){if(t){var l,u=e.splitSpaces?gr(t,e.trailingSpace):t,p=e.cm.state.specialChars,d=!1;if(p.test(t)){l=document.createDocumentFragment();for(var m=0;;){p.lastIndex=m;var f=p.exec(t),h=f?f.index-m:t.length-m;if(h){var g=document.createTextNode(u.slice(m,m+h));a&&s<9?l.appendChild($("span",[g])):l.appendChild(g),e.map.push(e.pos,e.pos+h,g),e.col+=h,e.pos+=h}if(!f)break;m+=h+1;var v=void 0;if("\t"==f[0]){var b=e.cm.options.tabSize,y=b-e.col%b;(v=l.appendChild($("span",V(y),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=y}else"\r"==f[0]||"\n"==f[0]?((v=l.appendChild($("span","\r"==f[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",f[0]),e.col+=1):((v=e.cm.options.specialCharPlaceholder(f[0])).setAttribute("cm-text",f[0]),a&&s<9?l.appendChild($("span",[v])):l.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,l=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,l),a&&s<9&&(d=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),r||n||i||d||o||c){var x=r||"";n&&(x+=n),i&&(x+=i);var w=$("span",[l],x,o);if(c)for(var k in c)c.hasOwnProperty(k)&&"style"!=k&&"class"!=k&&w.setAttribute(k,c[k]);return e.content.appendChild(w)}e.content.appendChild(l)}}function gr(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!r||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),n+=o,r=" "==o}return n}function vr(e,t){return function(r,n,i,o,a,s,c){i=i?i+" cm-force-border":"cm-force-border";for(var l=r.pos,u=l+n.length;;){for(var p=void 0,d=0;d<t.length&&!((p=t[d]).to>l&&p.from<=l);d++);if(p.to>=u)return e(r,n,i,o,a,s,c);e(r,n.slice(0,p.to-l),i,o,null,s,c),o=null,n=n.slice(p.to-l),l=p.to}}}function br(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function yr(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var a,s,c,l,u,p,d,m=i.length,f=0,h=1,g="",v=0;;){if(v==f){c=l=u=s="",d=null,p=null,v=1/0;for(var b=[],y=void 0,x=0;x<n.length;++x){var w=n[x],k=w.marker;if("bookmark"==k.type&&w.from==f&&k.widgetNode)b.push(k);else if(w.from<=f&&(null==w.to||w.to>f||k.collapsed&&w.to==f&&w.from==f)){if(null!=w.to&&w.to!=f&&v>w.to&&(v=w.to,l=""),k.className&&(c+=" "+k.className),k.css&&(s=(s?s+";":"")+k.css),k.startStyle&&w.from==f&&(u+=" "+k.startStyle),k.endStyle&&w.to==v&&(y||(y=[])).push(k.endStyle,w.to),k.title&&((d||(d={})).title=k.title),k.attributes)for(var C in k.attributes)(d||(d={}))[C]=k.attributes[C];k.collapsed&&(!p||Gt(p.marker,k)<0)&&(p=w)}else w.from>f&&v>w.from&&(v=w.from)}if(y)for(var z=0;z<y.length;z+=2)y[z+1]==v&&(l+=" "+y[z]);if(!p||p.from==f)for(var S=0;S<b.length;++S)br(t,0,b[S]);if(p&&(p.from||0)==f){if(br(t,(null==p.to?m+1:p.to)-f,p.marker,null==p.from),null==p.to)return;p.to==f&&(p=!1)}}if(f>=m)break;for(var A=Math.min(m,v);;){if(g){var D=f+g.length;if(!p){var T=D>A?g.slice(0,A-f):g;t.addToken(t,T,a?a+c:c,u,f+T.length==v?l:"",s,d)}if(D>=A){g=g.slice(A-f),f=A;break}f=D,u=""}g=i.slice(o,o=r[h++]),a=dr(r[h++],t.cm.options)}}else for(var $=1;$<r.length;$+=2)t.addToken(t,i.slice(o,o=r[$]),dr(r[$+1],t.cm.options))}function xr(e,t,r){this.line=t,this.rest=Qt(t),this.size=this.rest?et(Y(this.rest))-r+1:1,this.node=this.text=null,this.hidden=rr(e,t)}function wr(e,t,r){for(var n,i=[],o=t;o<r;o=n){var a=new xr(e.doc,Ke(e.doc,o),o);n=o+a.size,i.push(a)}return i}var kr=null;function Cr(e){kr?kr.ops.push(e):e.ownsGroup=kr={ops:[e],delayedCallbacks:[]}}function zr(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}function Sr(e,t){var r=e.ownsGroup;if(r)try{zr(r)}finally{kr=null,t(r)}}var Ar=null;function Dr(e,t){var r=he(e,t);if(r.length){var n,i=Array.prototype.slice.call(arguments,2);kr?n=kr.delayedCallbacks:Ar?n=Ar:(n=Ar=[],setTimeout(Tr,0));for(var o=function(e){n.push((function(){return r[e].apply(null,i)}))},a=0;a<r.length;++a)o(a)}}function Tr(){var e=Ar;Ar=null;for(var t=0;t<e.length;++t)e[t]()}function $r(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?Lr(e,t):"gutter"==o?Or(e,t,r,n):"class"==o?Ir(e,t):"widget"==o&&Br(e,t,n)}t.changes=null}function _r(e){return e.node==e.text&&(e.node=$("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),a&&s<8&&(e.node.style.zIndex=2)),e.node}function Er(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var n=_r(t);t.background=n.insertBefore($("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}function Mr(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):mr(e,t)}function Lr(e,t){var r=t.text.className,n=Mr(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,Ir(e,t)):r&&(t.text.className=r)}function Ir(e,t){Er(e,t),t.line.wrapClass?_r(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function Or(e,t,r,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=_r(t);t.gutterBackground=$("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var a=_r(t),s=t.gutter=$("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(s.setAttribute("aria-hidden","true"),e.display.input.setUneditable(s),a.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild($("div",nt(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var c=0;c<e.display.gutterSpecs.length;++c){var l=e.display.gutterSpecs[c].className,u=o.hasOwnProperty(l)&&o[l];u&&s.appendChild($("div",[u],"CodeMirror-gutter-elt","left: "+n.gutterLeft[l]+"px; width: "+n.gutterWidth[l]+"px"))}}}function Br(e,t,r){t.alignable&&(t.alignable=null);for(var n=z("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,n.test(i.className)&&t.node.removeChild(i);jr(e,t,r)}function Pr(e,t,r,n){var i=Mr(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Ir(e,t),Or(e,t,r,n),jr(e,t,n),t.node}function jr(e,t,r){if(Fr(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)Fr(e,t.rest[n],t,r,!1)}function Fr(e,t,r,n,i){if(t.widgets)for(var o=_r(r),a=0,s=t.widgets;a<s.length;++a){var c=s[a],l=$("div",[c.node],"CodeMirror-linewidget"+(c.className?" "+c.className:""));c.handleMouseEvents||l.setAttribute("cm-ignore-events","true"),Rr(c,l,r,n),e.display.input.setUneditable(l),i&&c.above?o.insertBefore(l,r.gutter||r.text):o.appendChild(l),Dr(c,"redraw")}}function Rr(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function Nr(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!E(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),T(t.display.measure,$("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function qr(e,t){for(var r=Ae(t);r!=e.wrapper;r=r.parentNode)if(!r||1==r.nodeType&&"true"==r.getAttribute("cm-ignore-events")||r.parentNode==e.sizer&&r!=e.mover)return!0}function Hr(e){return e.lineSpace.offsetTop}function Ur(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Gr(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=T(e.measure,$("pre","x","CodeMirror-line-like")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return isNaN(n.left)||isNaN(n.right)||(e.cachedPaddingH=n),n}function Wr(e){return N-e.display.nativeBarWidth}function Xr(e){return e.display.scroller.clientWidth-Wr(e)-e.display.barWidth}function Vr(e){return e.display.scroller.clientHeight-Wr(e)-e.display.barHeight}function Yr(e,t,r){var n=e.options.lineWrapping,i=n&&Xr(e);if(!t.measure.heights||n&&t.measure.width!=i){var o=t.measure.heights=[];if(n){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),s=0;s<a.length-1;s++){var c=a[s],l=a[s+1];Math.abs(c.bottom-l.bottom)>2&&o.push((c.bottom+l.top)/2-r.top)}}o.push(r.bottom-r.top)}}function Kr(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var i=0;i<e.rest.length;i++)if(et(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function Jr(e,t){var r=et(t=Jt(t)),n=e.display.externalMeasured=new xr(e.doc,t,r);n.lineN=r;var i=n.built=mr(e,n);return n.text=i.pre,T(e.display.lineMeasure,i.pre),n}function Zr(e,t,r,n){return tn(e,en(e,t),r,n)}function Qr(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[On(e,t)];var r=e.display.externalMeasured;return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function en(e,t){var r=et(t),n=Qr(e,r);n&&!n.text?n=null:n&&n.changes&&($r(e,n,r,_n(e)),e.curOp.forceUpdate=!0),n||(n=Jr(e,t));var i=Kr(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function tn(e,t,r,n,i){t.before&&(r=-1);var o,a=r+(n||"");return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Yr(e,t.view,t.rect),t.hasHeights=!0),(o=sn(e,t,r,n)).bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var rn,nn={left:0,right:0,top:0,bottom:0};function on(e,t,r){for(var n,i,o,a,s,c,l=0;l<e.length;l+=3)if(s=e[l],c=e[l+1],t<s?(i=0,o=1,a="left"):t<c?o=1+(i=t-s):(l==e.length-3||t==c&&e[l+3]>t)&&(i=(o=c-s)-1,t>=c&&(a="right")),null!=i){if(n=e[l+2],s==c&&r==(n.insertLeft?"left":"right")&&(a=r),"left"==r&&0==i)for(;l&&e[l-2]==e[l-3]&&e[l-1].insertLeft;)n=e[2+(l-=3)],a="left";if("right"==r&&i==c-s)for(;l<e.length-3&&e[l+3]==e[l+4]&&!e[l+5].insertLeft;)n=e[(l+=3)+2],a="right";break}return{node:n,start:i,end:o,collapse:a,coverStart:s,coverEnd:c}}function an(e,t){var r=nn;if("left"==t)for(var n=0;n<e.length&&(r=e[n]).left==r.right;n++);else for(var i=e.length-1;i>=0&&(r=e[i]).left==r.right;i--);return r}function sn(e,t,r,n){var i,o=on(t.map,r,n),c=o.node,l=o.start,u=o.end,p=o.collapse;if(3==c.nodeType){for(var d=0;d<4;d++){for(;l&&oe(t.line.text.charAt(o.coverStart+l));)--l;for(;o.coverStart+u<o.coverEnd&&oe(t.line.text.charAt(o.coverStart+u));)++u;if((i=a&&s<9&&0==l&&u==o.coverEnd-o.coverStart?c.parentNode.getBoundingClientRect():an(S(c,l,u).getClientRects(),n)).left||i.right||0==l)break;u=l,l-=1,p="right"}a&&s<11&&(i=cn(e.display.measure,i))}else{var m;l>0&&(p=n="right"),i=e.options.lineWrapping&&(m=c.getClientRects()).length>1?m["right"==n?m.length-1:0]:c.getBoundingClientRect()}if(a&&s<9&&!l&&(!i||!i.left&&!i.right)){var f=c.parentNode.getClientRects()[0];i=f?{left:f.left,right:f.left+$n(e.display),top:f.top,bottom:f.bottom}:nn}for(var h=i.top-t.rect.top,g=i.bottom-t.rect.top,v=(h+g)/2,b=t.view.measure.heights,y=0;y<b.length-1&&!(v<b[y]);y++);var x=y?b[y-1]:0,w=b[y],k={left:("right"==p?i.right:i.left)-t.rect.left,right:("left"==p?i.left:i.right)-t.rect.left,top:x,bottom:w};return i.left||i.right||(k.bogus=!0),e.options.singleCursorHeightPerLine||(k.rtop=h,k.rbottom=g),k}function cn(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Pe(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}function ln(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function un(e){e.display.externalMeasure=null,D(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)ln(e.display.view[t])}function pn(e){un(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function dn(){return u&&g?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function mn(){return u&&g?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function fn(e){var t=Jt(e).widgets,r=0;if(t)for(var n=0;n<t.length;++n)t[n].above&&(r+=Nr(t[n]));return r}function hn(e,t,r,n,i){if(!i){var o=fn(t);r.top+=o,r.bottom+=o}if("line"==n)return r;n||(n="local");var a=ir(t);if("local"==n?a+=Hr(e.display):a-=e.display.viewOffset,"page"==n||"window"==n){var s=e.display.lineSpace.getBoundingClientRect();a+=s.top+("window"==n?0:mn());var c=s.left+("window"==n?0:dn());r.left+=c,r.right+=c}return r.top+=a,r.bottom+=a,r}function gn(e,t,r){if("div"==r)return t;var n=t.left,i=t.top;if("page"==r)n-=dn(),i-=mn();else if("local"==r||!r){var o=e.display.sizer.getBoundingClientRect();n+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:n-a.left,top:i-a.top}}function vn(e,t,r,n,i){return n||(n=Ke(e.doc,t.line)),hn(e,n,Zr(e,n,t.ch,i),r)}function bn(e,t,r,n,i,o){function a(t,a){var s=tn(e,i,t,a?"right":"left",o);return a?s.left=s.right:s.right=s.left,hn(e,n,s,r)}n=n||Ke(e.doc,t.line),i||(i=en(e,n));var s=de(n,e.doc.direction),c=t.ch,l=t.sticky;if(c>=n.text.length?(c=n.text.length,l="before"):c<=0&&(c=0,l="after"),!s)return a("before"==l?c-1:c,"before"==l);function u(e,t,r){return a(r?e-1:e,1==s[t].level!=r)}var p=ue(s,c,l),d=le,m=u(c,p,"before"==l);return null!=d&&(m.other=u(c,d,"before"!=l)),m}function yn(e,t){var r=0;t=pt(e.doc,t),e.options.lineWrapping||(r=$n(e.display)*t.ch);var n=Ke(e.doc,t.line),i=ir(n)+Hr(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function xn(e,t,r,n,i){var o=it(e,t,r);return o.xRel=i,n&&(o.outside=n),o}function wn(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return xn(n.first,0,null,-1,-1);var i=tt(n,r),o=n.first+n.size-1;if(i>o)return xn(n.first+n.size-1,Ke(n,o).text.length,null,1,1);t<0&&(t=0);for(var a=Ke(n,i);;){var s=Sn(e,a,i,t,r),c=Yt(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!c)return s;var l=c.find(1);if(l.line==i)return l;a=Ke(n,i=l.line)}}function kn(e,t,r,n){n-=fn(t);var i=t.text.length,o=se((function(t){return tn(e,r,t-1).bottom<=n}),i,0);return{begin:o,end:i=se((function(t){return tn(e,r,t).top>n}),o,i)}}function Cn(e,t,r,n){return r||(r=en(e,t)),kn(e,t,r,hn(e,t,tn(e,r,n),"line").top)}function zn(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function Sn(e,t,r,n,i){i-=ir(t);var o=en(e,t),a=fn(t),s=0,c=t.text.length,l=!0,u=de(t,e.doc.direction);if(u){var p=(e.options.lineWrapping?Dn:An)(e,t,r,o,u,n,i);s=(l=1!=p.level)?p.from:p.to-1,c=l?p.to:p.from-1}var d,m,f=null,h=null,g=se((function(t){var r=tn(e,o,t);return r.top+=a,r.bottom+=a,!!zn(r,n,i,!1)&&(r.top<=i&&r.left<=n&&(f=t,h=r),!0)}),s,c),v=!1;if(h){var b=n-h.left<h.right-n,y=b==l;g=f+(y?0:1),m=y?"after":"before",d=b?h.left:h.right}else{l||g!=c&&g!=s||g++,m=0==g?"after":g==t.text.length?"before":tn(e,o,g-(l?1:0)).bottom+a<=i==l?"after":"before";var x=bn(e,it(r,g,m),"line",t,o);d=x.left,v=i<x.top?-1:i>=x.bottom?1:0}return xn(r,g=ae(t.text,g,1),m,v,n-d)}function An(e,t,r,n,i,o,a){var s=se((function(s){var c=i[s],l=1!=c.level;return zn(bn(e,it(r,l?c.to:c.from,l?"before":"after"),"line",t,n),o,a,!0)}),0,i.length-1),c=i[s];if(s>0){var l=1!=c.level,u=bn(e,it(r,l?c.from:c.to,l?"after":"before"),"line",t,n);zn(u,o,a,!0)&&u.top>a&&(c=i[s-1])}return c}function Dn(e,t,r,n,i,o,a){var s=kn(e,t,n,a),c=s.begin,l=s.end;/\s/.test(t.text.charAt(l-1))&&l--;for(var u=null,p=null,d=0;d<i.length;d++){var m=i[d];if(!(m.from>=l||m.to<=c)){var f=tn(e,n,1!=m.level?Math.min(l,m.to)-1:Math.max(c,m.from)).right,h=f<o?o-f+1e9:f-o;(!u||p>h)&&(u=m,p=h)}}return u||(u=i[i.length-1]),u.from<c&&(u={from:c,to:u.to,level:u.level}),u.to>l&&(u={from:u.from,to:l,level:u.level}),u}function Tn(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==rn){rn=$("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)rn.appendChild(document.createTextNode("x")),rn.appendChild($("br"));rn.appendChild(document.createTextNode("x"))}T(e.measure,rn);var r=rn.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),D(e.measure),r||1}function $n(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=$("span","xxxxxxxxxx"),r=$("pre",[t],"CodeMirror-line-like");T(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function _n(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=e.display.gutterSpecs[a].className;r[s]=o.offsetLeft+o.clientLeft+i,n[s]=o.clientWidth}return{fixedPos:En(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function En(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Mn(e){var t=Tn(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/$n(e.display)-3);return function(i){if(rr(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height);return r?o+(Math.ceil(i.text.length/n)||1)*t:o+t}}function Ln(e){var t=e.doc,r=Mn(e);t.iter((function(e){var t=r(e);t!=e.height&&Qe(e,t)}))}function In(e,t,r,n){var i=e.display;if(!r&&"true"==Ae(t).getAttribute("cm-not-content"))return null;var o,a,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,a=t.clientY-s.top}catch(e){return null}var c,l=wn(e,o,a);if(n&&l.xRel>0&&(c=Ke(e.doc,l.line).text).length==l.ch){var u=j(c,c.length,e.options.tabSize)-c.length;l=it(l.line,Math.max(0,Math.round((o-Gr(e.display).left)/$n(e.display))-u))}return l}function On(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if((t-=r[n].size)<0)return n}function Bn(e,t,r,n){null==t&&(t=e.doc.first),null==r&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)$t&&er(e.doc,t)<i.viewTo&&jn(e);else if(r<=i.viewFrom)$t&&tr(e.doc,r+n)>i.viewFrom?jn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)jn(e);else if(t<=i.viewFrom){var o=Fn(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):jn(e)}else if(r>=i.viewTo){var a=Fn(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):jn(e)}else{var s=Fn(e,t,t,-1),c=Fn(e,r,r+n,1);s&&c?(i.view=i.view.slice(0,s.index).concat(wr(e,s.lineN,c.lineN)).concat(i.view.slice(c.index)),i.viewTo+=n):jn(e)}var l=i.externalMeasured;l&&(r<l.lineN?l.lineN+=n:t<l.lineN+l.size&&(i.externalMeasured=null))}function Pn(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var o=n.view[On(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==R(a,r)&&a.push(r)}}}function jn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Fn(e,t,r,n){var i,o=On(e,t),a=e.display.view;if(!$t||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var s=e.display.viewFrom,c=0;c<o;c++)s+=a[c].size;if(s!=t){if(n>0){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,r+=i}for(;er(e.doc,r)!=r;){if(o==(n<0?0:a.length-1))return null;r+=n*a[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function Rn(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=wr(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=wr(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(On(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(wr(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,On(e,r)))),n.viewTo=r}function Nn(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];i.hidden||i.node&&!i.changes||++r}return r}function qn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Hn(e,t){void 0===t&&(t=!0);var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),o=n.selection=document.createDocumentFragment(),a=e.options.$customCursor;a&&(t=!0);for(var s=0;s<r.sel.ranges.length;s++)if(t||s!=r.sel.primIndex){var c=r.sel.ranges[s];if(!(c.from().line>=e.display.viewTo||c.to().line<e.display.viewFrom)){var l=c.empty();if(a){var u=a(e,c);u&&Un(e,u,i)}else(l||e.options.showCursorWhenSelecting)&&Un(e,c.head,i);l||Wn(e,c,o)}}return n}function Un(e,t,r){var n=bn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild($("div"," ","CodeMirror-cursor"));if(i.style.left=n.left+"px",i.style.top=n.top+"px",i.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var o=vn(e,t,"div",null,null),a=o.right-o.left;i.style.width=(a>0?a:e.defaultCharWidth())+"px"}if(n.other){var s=r.appendChild($("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));s.style.display="",s.style.left=n.other.left+"px",s.style.top=n.other.top+"px",s.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function Gn(e,t){return e.top-t.top||e.left-t.left}function Wn(e,t,r){var n=e.display,i=e.doc,o=document.createDocumentFragment(),a=Gr(e.display),s=a.left,c=Math.max(n.sizerWidth,Xr(e)-n.sizer.offsetLeft)-a.right,l="ltr"==i.direction;function u(e,t,r,n){t<0&&(t=0),t=Math.round(t),n=Math.round(n),o.appendChild($("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==r?c-e:r)+"px;\n height: "+(n-t)+"px"))}function p(t,r,n){var o,a,p=Ke(i,t),d=p.text.length;function m(r,n){return vn(e,it(t,r),"div",p,n)}function f(t,r,n){var i=Cn(e,p,null,t),o="ltr"==r==("after"==n)?"left":"right";return m("after"==n?i.begin:i.end-(/\s/.test(p.text.charAt(i.end-1))?2:1),o)[o]}var h=de(p,i.direction);return ce(h,r||0,null==n?d:n,(function(e,t,i,p){var g="ltr"==i,v=m(e,g?"left":"right"),b=m(t-1,g?"right":"left"),y=null==r&&0==e,x=null==n&&t==d,w=0==p,k=!h||p==h.length-1;if(b.top-v.top<=3){var C=(l?x:y)&&k,z=(l?y:x)&&w?s:(g?v:b).left,S=C?c:(g?b:v).right;u(z,v.top,S-z,v.bottom)}else{var A,D,T,$;g?(A=l&&y&&w?s:v.left,D=l?c:f(e,i,"before"),T=l?s:f(t,i,"after"),$=l&&x&&k?c:b.right):(A=l?f(e,i,"before"):s,D=!l&&y&&w?c:v.right,T=!l&&x&&k?s:b.left,$=l?f(t,i,"after"):c),u(A,v.top,D-A,v.bottom),v.bottom<b.top&&u(s,v.bottom,null,b.top),u(T,b.top,$-T,b.bottom)}(!o||Gn(v,o)<0)&&(o=v),Gn(b,o)<0&&(o=b),(!a||Gn(v,a)<0)&&(a=v),Gn(b,a)<0&&(a=b)})),{start:o,end:a}}var d=t.from(),m=t.to();if(d.line==m.line)p(d.line,d.ch,m.ch);else{var f=Ke(i,d.line),h=Ke(i,m.line),g=Jt(f)==Jt(h),v=p(d.line,d.ch,g?f.text.length+1:null).end,b=p(m.line,g?0:null,m.ch).start;g&&(v.top<b.top-2?(u(v.right,v.top,null,v.bottom),u(s,b.top,b.left,b.bottom)):u(v.right,v.top,b.left-v.right,v.bottom)),v.bottom<b.top&&u(s,v.bottom,null,b.top)}r.appendChild(o)}function Xn(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||Jn(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Vn(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Kn(e))}function Yn(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Jn(e))}),100)}function Kn(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ve(e,"focus",e,t),e.state.focused=!0,L(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),c&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),Xn(e))}function Jn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ve(e,"blur",e,t),e.state.focused=!1,A(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Zn(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,c=0;c<t.view.length;c++){var l=t.view[c],u=e.options.lineWrapping,p=void 0,d=0;if(!l.hidden){if(i+=l.line.height,a&&s<8){var m=l.node.offsetTop+l.node.offsetHeight;p=m-r,r=m}else{var f=l.node.getBoundingClientRect();p=f.bottom-f.top,!u&&l.text.firstChild&&(d=l.text.firstChild.getBoundingClientRect().right-f.left-1)}var h=l.line.height-p;if((h>.005||h<-.005)&&(i<n&&(o-=h),Qe(l.line,p),Qn(l.line),l.rest))for(var g=0;g<l.rest.length;g++)Qn(l.rest[g]);if(d>e.display.sizerWidth){var v=Math.ceil(d/$n(e.display));v>e.display.maxLineLength&&(e.display.maxLineLength=v,e.display.maxLine=l.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function Qn(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function ei(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-Hr(e));var i=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,o=tt(t,n),a=tt(t,i);if(r&&r.ensure){var s=r.ensure.from.line,c=r.ensure.to.line;s<o?(o=s,a=tt(t,ir(Ke(t,s))+e.wrapper.clientHeight)):Math.min(c,t.lastLine())>=a&&(o=tt(t,ir(Ke(t,c))-e.wrapper.clientHeight),a=c)}return{from:o,to:Math.max(a,o+1)}}function ti(e,t){if(!be(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),i=null;if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!f){var o=$("div","​",null,"position: absolute;\n top: "+(t.top-r.viewOffset-Hr(e.display))+"px;\n height: "+(t.bottom-t.top+Wr(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function ri(e,t,r,n){var i;null==n&&(n=0),e.options.lineWrapping||t!=r||(r="before"==t.sticky?it(t.line,t.ch+1,"before"):t,t=t.ch?it(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var a=!1,s=bn(e,t),c=r&&r!=t?bn(e,r):s,l=ii(e,i={left:Math.min(s.left,c.left),top:Math.min(s.top,c.top)-n,right:Math.max(s.left,c.left),bottom:Math.max(s.bottom,c.bottom)+n}),u=e.doc.scrollTop,p=e.doc.scrollLeft;if(null!=l.scrollTop&&(pi(e,l.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=l.scrollLeft&&(mi(e,l.scrollLeft),Math.abs(e.doc.scrollLeft-p)>1&&(a=!0)),!a)break}return i}function ni(e,t){var r=ii(e,t);null!=r.scrollTop&&pi(e,r.scrollTop),null!=r.scrollLeft&&mi(e,r.scrollLeft)}function ii(e,t){var r=e.display,n=Tn(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=Vr(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+Ur(r),c=t.top<n,l=t.bottom>s-n;if(t.top<i)a.scrollTop=c?0:t.top;else if(t.bottom>i+o){var u=Math.min(t.top,(l?s:t.bottom)-o);u!=i&&(a.scrollTop=u)}var p=e.options.fixedGutter?0:r.gutters.offsetWidth,d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft-p,m=Xr(e)-r.gutters.offsetWidth,f=t.right-t.left>m;return f&&(t.right=t.left+m),t.left<10?a.scrollLeft=0:t.left<d?a.scrollLeft=Math.max(0,t.left+p-(f?0:10)):t.right>m+d-3&&(a.scrollLeft=t.right+(f?0:10)-m),a}function oi(e,t){null!=t&&(li(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function ai(e){li(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function si(e,t,r){null==t&&null==r||li(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function ci(e,t){li(e),e.curOp.scrollToPos=t}function li(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,ui(e,yn(e,t.from),yn(e,t.to),t.margin))}function ui(e,t,r,n){var i=ii(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});si(e,i.scrollLeft,i.scrollTop)}function pi(e,t){Math.abs(e.doc.scrollTop-t)<2||(r||qi(e,{top:t}),di(e,t,!0),r&&qi(e),Ii(e,100))}function di(e,t,r){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function mi(e,t,r,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,Wi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function fi(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+Ur(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+Wr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var hi=function(e,t,r){this.cm=r;var n=this.vert=$("div",[$("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=$("div",[$("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),fe(n,"scroll",(function(){n.clientHeight&&t(n.scrollTop,"vertical")})),fe(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};hi.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},hi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},hi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},hi.prototype.zeroWidthHack=function(){var e=b&&!m?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new F,this.disableVert=new F},hi.prototype.enableZeroWidthBar=function(e,t,r){function n(){var i=e.getBoundingClientRect();("vert"==r?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,n)}e.style.pointerEvents="auto",t.set(1e3,n)},hi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var gi=function(){};function vi(e,t){t||(t=fi(e));var r=e.display.barWidth,n=e.display.barHeight;bi(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&Zn(e),bi(e,fi(e)),r=e.display.barWidth,n=e.display.barHeight}function bi(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}gi.prototype.update=function(){return{bottom:0,right:0}},gi.prototype.setScrollLeft=function(){},gi.prototype.setScrollTop=function(){},gi.prototype.clear=function(){};var yi={native:hi,null:gi};function xi(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&A(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new yi[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),fe(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,r){"horizontal"==r?mi(e,t):pi(e,t)}),e),e.display.scrollbars.addClass&&L(e.display.wrapper,e.display.scrollbars.addClass)}var wi=0;function ki(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++wi,markArrays:null},Cr(e.curOp)}function Ci(e){var t=e.curOp;t&&Sr(t,(function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;zi(e)}))}function zi(e){for(var t=e.ops,r=0;r<t.length;r++)Si(t[r]);for(var n=0;n<t.length;n++)Ai(t[n]);for(var i=0;i<t.length;i++)Di(t[i]);for(var o=0;o<t.length;o++)Ti(t[o]);for(var a=0;a<t.length;a++)$i(t[a])}function Si(e){var t=e.cm,r=t.display;Pi(t),e.updateMaxLine&&ar(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Bi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Ai(e){e.updatedDisplay=e.mustUpdate&&Ri(e.cm,e.update)}function Di(e){var t=e.cm,r=t.display;e.updatedDisplay&&Zn(t),e.barMeasure=fi(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Zr(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Wr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Xr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function Ti(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&mi(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==M();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&vi(t,e.barMeasure),e.updatedDisplay&&Gi(t,e.barMeasure),e.selectionChanged&&Xn(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&Vn(e.cm)}function $i(e){var t=e.cm,r=t.display,n=t.doc;e.updatedDisplay&&Ni(t,e.update),null==r.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(r.wheelStartX=r.wheelStartY=null),null!=e.scrollTop&&di(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&mi(t,e.scrollLeft,!0,!0),e.scrollToPos&&ti(t,ri(t,pt(n,e.scrollToPos.from),pt(n,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var a=0;a<i.length;++a)i[a].lines.length||ve(i[a],"hide");if(o)for(var s=0;s<o.length;++s)o[s].lines.length&&ve(o[s],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ve(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function _i(e,t){if(e.curOp)return t();ki(e);try{return t()}finally{Ci(e)}}function Ei(e,t){return function(){if(e.curOp)return t.apply(e,arguments);ki(e);try{return t.apply(e,arguments)}finally{Ci(e)}}}function Mi(e){return function(){if(this.curOp)return e.apply(this,arguments);ki(this);try{return e.apply(this,arguments)}finally{Ci(this)}}}function Li(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);ki(t);try{return e.apply(this,arguments)}finally{Ci(t)}}}function Ii(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,B(Oi,e))}function Oi(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=bt(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(n.line>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength?We(t.mode,n.state):null,c=gt(e,o,n,!0);s&&(n.state=s),o.styles=c.styles;var l=o.styleClasses,u=c.classes;u?o.styleClasses=u:l&&(o.styleClasses=null);for(var p=!a||a.length!=o.styles.length||l!=u&&(!l||!u||l.bgClass!=u.bgClass||l.textClass!=u.textClass),d=0;!p&&d<a.length;++d)p=a[d]!=o.styles[d];p&&i.push(n.line),o.stateAfter=n.save(),n.nextLine()}else o.text.length<=e.options.maxHighlightLength&&yt(e,o.text,n),o.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return Ii(e,e.options.workDelay),!0})),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&_i(e,(function(){for(var t=0;t<i.length;t++)Pn(e,i[t],"text")}))}}var Bi=function(e,t,r){var n=e.display;this.viewport=t,this.visible=ei(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Xr(e),this.force=r,this.dims=_n(e),this.events=[]};function Pi(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Wr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Wr(e)+"px",t.scrollbarsClipped=!0)}function ji(e){if(e.hasFocus())return null;var t=M();if(!t||!E(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&E(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}function Fi(e){if(e&&e.activeElt&&e.activeElt!=M()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&E(document.body,e.anchorNode)&&E(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}function Ri(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return jn(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==Nn(e))return!1;Xi(e)&&(jn(e),t.dims=_n(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFrom<o&&o-r.viewFrom<20&&(o=Math.max(n.first,r.viewFrom)),r.viewTo>a&&r.viewTo-a<20&&(a=Math.min(i,r.viewTo)),$t&&(o=er(e.doc,o),a=tr(e.doc,a));var s=o!=r.viewFrom||a!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;Rn(e,o,a),r.viewOffset=ir(Ke(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var c=Nn(e);if(!s&&0==c&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var l=ji(e);return c>4&&(r.lineDiv.style.display="none"),Hi(e,r.updateLineNumbers,t.dims),c>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,Fi(l),D(r.cursorDiv),D(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,s&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,Ii(e,400)),r.updateLineNumbers=null,!0}function Ni(e,t){for(var r=t.viewport,n=!0;;n=!1){if(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Xr(e))n&&(t.visible=ei(e.display,e.doc,r));else if(r&&null!=r.top&&(r={top:Math.min(e.doc.height+Ur(e.display)-Vr(e),r.top)}),t.visible=ei(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!Ri(e,t))break;Zn(e);var i=fi(e);qn(e),vi(e,i),Gi(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function qi(e,t){var r=new Bi(e,t);if(Ri(e,r)){Zn(e),Ni(e,r);var n=fi(e);qn(e),vi(e,n),Gi(e,n),r.finish()}}function Hi(e,t,r){var n=e.display,i=e.options.lineNumbers,o=n.lineDiv,a=o.firstChild;function s(t){var r=t.nextSibling;return c&&b&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var l=n.view,u=n.viewFrom,p=0;p<l.length;p++){var d=l[p];if(d.hidden);else if(d.node&&d.node.parentNode==o){for(;a!=d.node;)a=s(a);var m=i&&null!=t&&t<=u&&d.lineNumber;d.changes&&(R(d.changes,"gutter")>-1&&(m=!1),$r(e,d,u,r)),m&&(D(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(nt(e.options,u)))),a=d.node.nextSibling}else{var f=Pr(e,d,u,r);o.insertBefore(f,a)}u+=d.size}for(;a;)a=s(a)}function Ui(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",Dr(e,"gutterChanged",e)}function Gi(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Wr(e)+"px"}function Wi(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=En(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",a=0;a<r.length;a++)if(!r[a].hidden){e.options.fixedGutter&&(r[a].gutter&&(r[a].gutter.style.left=o),r[a].gutterBackground&&(r[a].gutterBackground.style.left=o));var s=r[a].alignable;if(s)for(var c=0;c<s.length;c++)s[c].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}}function Xi(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=nt(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild($("div",[$("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(o,n.lineGutter.offsetWidth-a)+1,n.lineNumWidth=n.lineNumInnerWidth+a,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",Ui(e.display),!0}return!1}function Vi(e,t){for(var r=[],n=!1,i=0;i<e.length;i++){var o=e[i],a=null;if("string"!=typeof o&&(a=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!t)continue;n=!0}r.push({className:o,style:a})}return t&&!n&&r.push({className:"CodeMirror-linenumbers",style:null}),r}function Yi(e){var t=e.gutters,r=e.gutterSpecs;D(t),e.lineGutter=null;for(var n=0;n<r.length;++n){var i=r[n],o=i.className,a=i.style,s=t.appendChild($("div",null,"CodeMirror-gutter "+o));a&&(s.style.cssText=a),"CodeMirror-linenumbers"==o&&(e.lineGutter=s,s.style.width=(e.lineNumWidth||1)+"px")}t.style.display=r.length?"":"none",Ui(e)}function Ki(e){Yi(e.display),Bn(e),Wi(e)}function Ji(e,t,n,i){var o=this;this.input=n,o.scrollbarFiller=$("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=$("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=_("div",null,"CodeMirror-code"),o.selectionDiv=$("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=$("div",null,"CodeMirror-cursors"),o.measure=$("div",null,"CodeMirror-measure"),o.lineMeasure=$("div",null,"CodeMirror-measure"),o.lineSpace=_("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var l=_("div",[o.lineSpace],"CodeMirror-lines");o.mover=$("div",[l],null,"position: relative"),o.sizer=$("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=$("div",null,null,"position: absolute; height: "+N+"px; width: 1px;"),o.gutters=$("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=$("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=$("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),o.wrapper.setAttribute("translate","no"),a&&s<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),c||r&&v||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,o.gutterSpecs=Vi(i.gutters,i.lineNumbers),Yi(o),n.init(o)}Bi.prototype.signal=function(e,t){xe(e,t)&&this.events.push(arguments)},Bi.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ve.apply(null,this.events[e])};var Zi=0,Qi=null;function eo(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==r&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:null==r&&(r=e.wheelDelta),{x:t,y:r}}function to(e){var t=eo(e);return t.x*=Qi,t.y*=Qi,t}function ro(e,t){var n=eo(t),i=n.x,o=n.y,a=Qi;0===t.deltaMode&&(i=t.deltaX,o=t.deltaY,a=1);var s=e.display,l=s.scroller,u=l.scrollWidth>l.clientWidth,d=l.scrollHeight>l.clientHeight;if(i&&u||o&&d){if(o&&b&&c)e:for(var m=t.target,f=s.view;m!=l;m=m.parentNode)for(var h=0;h<f.length;h++)if(f[h].node==m){e.display.currentWheelTarget=m;break e}if(i&&!r&&!p&&null!=a)return o&&d&&pi(e,Math.max(0,l.scrollTop+o*a)),mi(e,Math.max(0,l.scrollLeft+i*a)),(!o||o&&d)&&ke(t),void(s.wheelStartX=null);if(o&&null!=a){var g=o*a,v=e.doc.scrollTop,y=v+s.wrapper.clientHeight;g<0?v=Math.max(0,v+g-50):y=Math.min(e.doc.height,y+g+50),qi(e,{top:v,bottom:y})}Zi<20&&0!==t.deltaMode&&(null==s.wheelStartX?(s.wheelStartX=l.scrollLeft,s.wheelStartY=l.scrollTop,s.wheelDX=i,s.wheelDY=o,setTimeout((function(){if(null!=s.wheelStartX){var e=l.scrollLeft-s.wheelStartX,t=l.scrollTop-s.wheelStartY,r=t&&s.wheelDY&&t/s.wheelDY||e&&s.wheelDX&&e/s.wheelDX;s.wheelStartX=s.wheelStartY=null,r&&(Qi=(Qi*Zi+r)/(Zi+1),++Zi)}}),200)):(s.wheelDX+=i,s.wheelDY+=o))}}a?Qi=-.53:r?Qi=15:u?Qi=-.7:d&&(Qi=-1/3);var no=function(e,t){this.ranges=e,this.primIndex=t};no.prototype.primary=function(){return this.ranges[this.primIndex]},no.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(!at(r.anchor,n.anchor)||!at(r.head,n.head))return!1}return!0},no.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new io(st(this.ranges[t].anchor),st(this.ranges[t].head));return new no(e,this.primIndex)},no.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},no.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(ot(t,n.from())>=0&&ot(e,n.to())<=0)return r}return-1};var io=function(e,t){this.anchor=e,this.head=t};function oo(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort((function(e,t){return ot(e.from(),t.from())})),r=R(t,i);for(var o=1;o<t.length;o++){var a=t[o],s=t[o-1],c=ot(s.to(),a.from());if(n&&!a.empty()?c>0:c>=0){var l=lt(s.from(),a.from()),u=ct(s.to(),a.to()),p=s.empty()?a.from()==a.head:s.from()==s.head;o<=r&&--r,t.splice(--o,2,new io(p?u:l,p?l:u))}}return new no(t,r)}function ao(e,t){return new no([new io(e,t||e)],0)}function so(e){return e.text?it(e.from.line+e.text.length-1,Y(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function co(e,t){if(ot(e,t.from)<0)return e;if(ot(e,t.to)<=0)return so(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=so(t).ch-t.to.ch),it(r,n)}function lo(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new io(co(i.anchor,t),co(i.head,t)))}return oo(e.cm,r,e.sel.primIndex)}function uo(e,t,r){return e.line==t.line?it(r.line,e.ch-t.ch+r.ch):it(r.line+(e.line-t.line),e.ch)}function po(e,t,r){for(var n=[],i=it(e.first,0),o=i,a=0;a<t.length;a++){var s=t[a],c=uo(s.from,i,o),l=uo(so(s),i,o);if(i=s.to,o=l,"around"==r){var u=e.sel.ranges[a],p=ot(u.head,u.anchor)<0;n[a]=new io(p?l:c,p?c:l)}else n[a]=new io(c,c)}return new no(n,e.sel.primIndex)}function mo(e){e.doc.mode=He(e.options,e.doc.modeOption),fo(e)}function fo(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Ii(e,100),e.state.modeGen++,e.curOp&&Bn(e)}function ho(e,t){return 0==t.from.ch&&0==t.to.ch&&""==Y(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function go(e,t,r,n){function i(e){return r?r[e]:null}function o(e,r,i){cr(e,r,i,n),Dr(e,"change",e,t)}function a(e,t){for(var r=[],o=e;o<t;++o)r.push(new sr(l[o],i(o),n));return r}var s=t.from,c=t.to,l=t.text,u=Ke(e,s.line),p=Ke(e,c.line),d=Y(l),m=i(l.length-1),f=c.line-s.line;if(t.full)e.insert(0,a(0,l.length)),e.remove(l.length,e.size-l.length);else if(ho(e,t)){var h=a(0,l.length-1);o(p,p.text,m),f&&e.remove(s.line,f),h.length&&e.insert(s.line,h)}else if(u==p)if(1==l.length)o(u,u.text.slice(0,s.ch)+d+u.text.slice(c.ch),m);else{var g=a(1,l.length-1);g.push(new sr(d+u.text.slice(c.ch),m,n)),o(u,u.text.slice(0,s.ch)+l[0],i(0)),e.insert(s.line+1,g)}else if(1==l.length)o(u,u.text.slice(0,s.ch)+l[0]+p.text.slice(c.ch),i(0)),e.remove(s.line+1,f);else{o(u,u.text.slice(0,s.ch)+l[0],i(0)),o(p,d+p.text.slice(c.ch),m);var v=a(1,l.length-1);f>1&&e.remove(s.line+1,f-1),e.insert(s.line+1,v)}Dr(e,"change",e,t)}function vo(e,t,r){function n(e,i,o){if(e.linked)for(var a=0;a<e.linked.length;++a){var s=e.linked[a];if(s.doc!=i){var c=o&&s.sharedHist;r&&!c||(t(s.doc,c),n(s.doc,e,c))}}}n(e,null,!0)}function bo(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Ln(e),mo(e),yo(e),e.options.direction=t.direction,e.options.lineWrapping||ar(e),e.options.mode=t.modeOption,Bn(e)}function yo(e){("rtl"==e.doc.direction?L:A)(e.display.lineDiv,"CodeMirror-rtl")}function xo(e){_i(e,(function(){yo(e),Bn(e)}))}function wo(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function ko(e,t){var r={from:st(t.from),to:so(t),text:Je(e,t.from,t.to)};return $o(e,r,t.from.line,t.to.line+1),vo(e,(function(e){return $o(e,r,t.from.line,t.to.line+1)}),!0),r}function Co(e){for(;e.length&&Y(e).ranges;)e.pop()}function zo(e,t){return t?(Co(e.done),Y(e.done)):e.done.length&&!Y(e.done).ranges?Y(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Y(e.done)):void 0}function So(e,t,r,n){var i=e.history;i.undone.length=0;var o,a,s=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=zo(i,i.lastOp==n)))a=Y(o.changes),0==ot(t.from,t.to)&&0==ot(t.from,a.to)?a.to=so(t):o.changes.push(ko(e,t));else{var c=Y(i.done);for(c&&c.ranges||To(e.sel,i.done),o={changes:[ko(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,a||ve(e,"historyAdded")}function Ao(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Do(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||Ao(e,o,Y(i.done),t))?i.done[i.done.length-1]=t:To(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&!1!==n.clearRedo&&Co(i.undone)}function To(e,t){var r=Y(t);r&&r.ranges&&r.equals(e)||t.push(e)}function $o(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),(function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o}))}function _o(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function Eo(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(_o(r[i]));return n}function Mo(e,t){var r=Eo(e,t),n=jt(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var o=r[i],a=n[i];if(o&&a)e:for(var s=0;s<a.length;++s){for(var c=a[s],l=0;l<o.length;++l)if(o[l].marker==c.marker)continue e;o.push(c)}else a&&(r[i]=a)}return r}function Lo(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)n.push(r?no.prototype.deepCopy.call(o):o);else{var a=o.changes,s=[];n.push({changes:s});for(var c=0;c<a.length;++c){var l=a[c],u=void 0;if(s.push({from:l.from,to:l.to,text:l.text}),t)for(var p in l)(u=p.match(/^spans_(\d+)$/))&&R(t,Number(u[1]))>-1&&(Y(s)[p]=l[p],delete l[p])}}}return n}function Io(e,t,r,n){if(n){var i=e.anchor;if(r){var o=ot(t,i)<0;o!=ot(r,i)<0?(i=t,t=r):o!=ot(t,r)<0&&(t=r)}return new io(i,t)}return new io(r||t,t)}function Oo(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),No(e,new no([Io(e.sel.primary(),t,r,i)],0),n)}function Bo(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)n[o]=Io(e.sel.ranges[o],t[o],null,i);No(e,oo(e.cm,n,e.sel.primIndex),r)}function Po(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,No(e,oo(e.cm,i,e.sel.primIndex),n)}function jo(e,t,r,n){No(e,ao(t,r),n)}function Fo(e,t,r){var n={ranges:t.ranges,update:function(t){this.ranges=[];for(var r=0;r<t.length;r++)this.ranges[r]=new io(pt(e,t[r].anchor),pt(e,t[r].head))},origin:r&&r.origin};return ve(e,"beforeSelectionChange",e,n),e.cm&&ve(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?oo(e.cm,n.ranges,n.ranges.length-1):t}function Ro(e,t,r){var n=e.history.done,i=Y(n);i&&i.ranges?(n[n.length-1]=t,qo(e,t,r)):No(e,t,r)}function No(e,t,r){qo(e,t,r),Do(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function qo(e,t,r){(xe(e,"beforeSelectionChange")||e.cm&&xe(e.cm,"beforeSelectionChange"))&&(t=Fo(e,t,r));var n=r&&r.bias||(ot(t.primary().head,e.sel.primary().head)<0?-1:1);Ho(e,Go(e,t,n,!0)),r&&!1===r.scroll||!e.cm||"nocursor"==e.cm.getOption("readOnly")||ai(e.cm)}function Ho(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,ye(e.cm)),Dr(e,"cursorActivity",e))}function Uo(e){Ho(e,Go(e,e.sel,null,!1))}function Go(e,t,r,n){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],c=Xo(e,a.anchor,s&&s.anchor,r,n),l=Xo(e,a.head,s&&s.head,r,n);(i||c!=a.anchor||l!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new io(c,l))}return i?oo(e.cm,i,t.primIndex):t}function Wo(e,t,r,n,i){var o=Ke(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var s=o.markedSpans[a],c=s.marker,l="selectLeft"in c?!c.selectLeft:c.inclusiveLeft,u="selectRight"in c?!c.selectRight:c.inclusiveRight;if((null==s.from||(l?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(u?s.to>=t.ch:s.to>t.ch))){if(i&&(ve(c,"beforeCursorEnter"),c.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!c.atomic)continue;if(r){var p=c.find(n<0?1:-1),d=void 0;if((n<0?u:l)&&(p=Vo(e,p,-n,p&&p.line==t.line?o:null)),p&&p.line==t.line&&(d=ot(p,r))&&(n<0?d<0:d>0))return Wo(e,p,t,n,i)}var m=c.find(n<0?-1:1);return(n<0?l:u)&&(m=Vo(e,m,n,m.line==t.line?o:null)),m?Wo(e,m,t,n,i):null}}return t}function Xo(e,t,r,n,i){var o=n||1,a=Wo(e,t,r,o,i)||!i&&Wo(e,t,r,o,!0)||Wo(e,t,r,-o,i)||!i&&Wo(e,t,r,-o,!0);return a||(e.cantEdit=!0,it(e.first,0))}function Vo(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?pt(e,it(t.line-1)):null:r>0&&t.ch==(n||Ke(e,t.line)).text.length?t.line<e.first+e.size-1?it(t.line+1,0):null:new it(t.line,t.ch+r)}function Yo(e){e.setSelection(it(e.firstLine(),0),it(e.lastLine()),H)}function Ko(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(t,r,i,o){t&&(n.from=pt(e,t)),r&&(n.to=pt(e,r)),i&&(n.text=i),void 0!==o&&(n.origin=o)}),ve(e,"beforeChange",e,n),e.cm&&ve(e.cm,"beforeChange",e.cm,n),n.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Jo(e,t,r){if(e.cm){if(!e.cm.curOp)return Ei(e.cm,Jo)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(xe(e,"beforeChange")||e.cm&&xe(e.cm,"beforeChange"))||(t=Ko(e,t,!0))){var n=Tt&&!r&&Rt(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)Zo(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else Zo(e,t)}}function Zo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=ot(t.from,t.to)){var r=lo(e,t);So(e,t,r,e.cm?e.cm.curOp.id:NaN),ta(e,t,r,jt(e,t));var n=[];vo(e,(function(e,r){r||-1!=R(n,e.history)||(aa(e.history,t),n.push(e.history)),ta(e,t,null,jt(e,t))}))}}function Qo(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(!n||r){for(var i,o=e.history,a=e.sel,s="undo"==t?o.done:o.undone,c="undo"==t?o.undone:o.done,l=0;l<s.length&&(i=s[l],r?!i.ranges||i.equals(e.sel):i.ranges);l++);if(l!=s.length){for(o.lastOrigin=o.lastSelOrigin=null;;){if(!(i=s.pop()).ranges){if(n)return void s.push(i);break}if(To(i,c),r&&!i.equals(e.sel))return void No(e,i,{clearRedo:!1});a=i}var u=[];To(a,c),c.push({changes:u,generation:o.generation}),o.generation=i.generation||++o.maxGeneration;for(var p=xe(e,"beforeChange")||e.cm&&xe(e.cm,"beforeChange"),d=function(r){var n=i.changes[r];if(n.origin=t,p&&!Ko(e,n,!1))return s.length=0,{};u.push(ko(e,n));var o=r?lo(e,n):Y(s);ta(e,n,o,Mo(e,n)),!r&&e.cm&&e.cm.scrollIntoView({from:n.from,to:so(n)});var a=[];vo(e,(function(e,t){t||-1!=R(a,e.history)||(aa(e.history,n),a.push(e.history)),ta(e,n,null,Mo(e,n))}))},m=i.changes.length-1;m>=0;--m){var f=d(m);if(f)return f.v}}}}function ea(e,t){if(0!=t&&(e.first+=t,e.sel=new no(K(e.sel.ranges,(function(e){return new io(it(e.anchor.line+t,e.anchor.ch),it(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){Bn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)Pn(e.cm,n,"gutter")}}function ta(e,t,r,n){if(e.cm&&!e.cm.curOp)return Ei(e.cm,ta)(e,t,r,n);if(t.to.line<e.first)ea(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);ea(e,i),t={from:it(e.first,0),to:it(t.to.line+i,t.to.ch),text:[Y(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:it(o,Ke(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Je(e,t.from,t.to),r||(r=lo(e,t)),e.cm?ra(e.cm,t,n):go(e,t,n),qo(e,r,H),e.cantEdit&&Xo(e,it(e.firstLine(),0))&&(e.cantEdit=!1)}}function ra(e,t,r){var n=e.doc,i=e.display,o=t.from,a=t.to,s=!1,c=o.line;e.options.lineWrapping||(c=et(Jt(Ke(n,o.line))),n.iter(c,a.line+1,(function(e){if(e==i.maxLine)return s=!0,!0}))),n.sel.contains(t.from,t.to)>-1&&ye(e),go(n,t,r,Mn(e)),e.options.lineWrapping||(n.iter(c,o.line+t.text.length,(function(e){var t=or(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),Dt(n,o.line),Ii(e,400);var l=t.text.length-(a.line-o.line)-1;t.full?Bn(e):o.line!=a.line||1!=t.text.length||ho(e.doc,t)?Bn(e,o.line,a.line+1,l):Pn(e,o.line,"text");var u=xe(e,"changes"),p=xe(e,"change");if(p||u){var d={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};p&&Dr(e,"change",e,d),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(d)}e.display.selForContextMenu=null}function na(e,t,r,n,i){var o;n||(n=r),ot(n,r)<0&&(r=(o=[n,r])[0],n=o[1]),"string"==typeof t&&(t=e.splitLines(t)),Jo(e,{from:r,to:n,text:t,origin:i})}function ia(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function oa(e,t,r,n){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var s=0;s<o.ranges.length;s++)ia(o.ranges[s].anchor,t,r,n),ia(o.ranges[s].head,t,r,n)}else{for(var c=0;c<o.changes.length;++c){var l=o.changes[c];if(r<l.from.line)l.from=it(l.from.line+n,l.from.ch),l.to=it(l.to.line+n,l.to.ch);else if(t<=l.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}}function aa(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;oa(e.done,r,n,i),oa(e.undone,r,n,i)}function sa(e,t,r,n){var i=t,o=t;return"number"==typeof t?o=Ke(e,ut(e,t)):i=et(t),null==i?null:(n(o,i)&&e.cm&&Pn(e.cm,i,r),o)}function ca(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}function la(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n];t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,this.parent=null}io.prototype.from=function(){return lt(this.anchor,this.head)},io.prototype.to=function(){return ct(this.anchor,this.head)},io.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},ca.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var i=this.lines[r];this.height-=i.height,lr(i),Dr(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}},la.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(e<i){var o=Math.min(t,i-e),a=n.height;if(n.removeInner(e,o),this.height-=a-n.height,i==o&&(this.children.splice(r--,1),n.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof ca))){var s=[];this.collapse(s),this.children=[new ca(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,r),i.lines&&i.lines.length>50){for(var a=i.lines.length%25+25,s=a;s<i.lines.length;){var c=new ca(i.lines.slice(s,s+=25));i.height-=c.height,this.children.splice(++n,0,c),c.parent=this}i.lines=i.lines.slice(0,a),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new la(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var r=R(e.parent.children,e);e.parent.children.splice(r+1,0,t)}else{var n=new la(e.children);n.parent=e,e.children=[n,t],e=n}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,r))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var ua=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};function pa(e,t,r){ir(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&oi(e,r)}function da(e,t,r,n){var i=new ua(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),sa(e,t,"widget",(function(t){var r=t.widgets||(t.widgets=[]);if(null==i.insertAt?r.push(i):r.splice(Math.min(r.length,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!rr(e,t)){var n=ir(t)<e.scrollTop;Qe(t,t.height+Nr(i)),n&&oi(o,i.height),o.curOp.forceUpdate=!0}return!0})),o&&Dr(o,"lineWidgetAdded",o,i,"number"==typeof t?t:et(t)),i}ua.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=et(r);if(null!=n&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(r.widgets=null);var o=Nr(this);Qe(r,Math.max(0,r.height-o)),e&&(_i(e,(function(){pa(e,r,-o),Pn(e,n,"widget")})),Dr(e,"lineWidgetCleared",e,this,n))}},ua.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=Nr(this)-t;i&&(rr(this.doc,n)||Qe(n,n.height+i),r&&_i(r,(function(){r.curOp.forceUpdate=!0,pa(r,n,i),Dr(r,"lineWidgetChanged",r,e,et(n))})))},we(ua);var ma=0,fa=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ma};function ha(e,t,r,n,i){if(n&&n.shared)return va(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return Ei(e.cm,ha)(e,t,r,n,i);var o=new fa(e,i),a=ot(t,r);if(n&&P(n,o,!1),a>0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=_("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Kt(e,t.line,t,r,o)||t.line!=r.line&&Kt(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Et()}o.addToHistory&&So(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var s,c=t.line,l=e.cm;if(e.iter(c,r.line+1,(function(n){l&&o.collapsed&&!l.options.lineWrapping&&Jt(n)==l.display.maxLine&&(s=!0),o.collapsed&&c!=t.line&&Qe(n,0),Ot(n,new Mt(o,c==t.line?t.ch:null,c==r.line?r.ch:null),e.cm&&e.cm.curOp),++c})),o.collapsed&&e.iter(t.line,r.line+1,(function(t){rr(e,t)&&Qe(t,0)})),o.clearOnEnter&&fe(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(_t(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ma,o.atomic=!0),l){if(s&&(l.curOp.updateMaxLine=!0),o.collapsed)Bn(l,t.line,r.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=t.line;u<=r.line;u++)Pn(l,u,"text");o.atomic&&Uo(l.doc),Dr(l,"markerAdded",l,o)}return o}fa.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&ki(e),xe(this,"clear")){var r=this.find();r&&Dr(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],s=Lt(a.markedSpans,this);e&&!this.collapsed?Pn(e,et(a),"text"):e&&(null!=s.to&&(i=et(a)),null!=s.from&&(n=et(a))),a.markedSpans=It(a.markedSpans,s),null==s.from&&this.collapsed&&!rr(this.doc,a)&&e&&Qe(a,Tn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var c=0;c<this.lines.length;++c){var l=Jt(this.lines[c]),u=or(l);u>e.display.maxLineLength&&(e.display.maxLine=l,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&Bn(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Uo(e.doc)),e&&Dr(e,"markerCleared",e,this,n,i),t&&Ci(e),this.parent&&this.parent.clear()}},fa.prototype.find=function(e,t){var r,n;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],a=Lt(o.markedSpans,this);if(null!=a.from&&(r=it(t?o:et(o),a.from),-1==e))return r;if(null!=a.to&&(n=it(t?o:et(o),a.to),1==e))return n}return r&&{from:r,to:n}},fa.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;t&&n&&_i(n,(function(){var i=t.line,o=et(t.line),a=Qr(n,o);if(a&&(ln(a),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!rr(r.doc,i)&&null!=r.height){var s=r.height;r.height=null;var c=Nr(r)-s;c&&Qe(i,i.height+c)}Dr(n,"markerChanged",n,e)}))},fa.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=R(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},fa.prototype.detachLine=function(e){if(this.lines.splice(R(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},we(fa);var ga=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};function va(e,t,r,n,i){(n=P(n)).shared=!1;var o=[ha(e,t,r,n,i)],a=o[0],s=n.widgetNode;return vo(e,(function(e){s&&(n.widgetNode=s.cloneNode(!0)),o.push(ha(e,pt(e,t),pt(e,r),n,i));for(var c=0;c<e.linked.length;++c)if(e.linked[c].isParent)return;a=Y(o)})),new ga(o,a)}function ba(e){return e.findMarks(it(e.first,0),e.clipPos(it(e.lastLine())),(function(e){return e.parent}))}function ya(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(ot(o,a)){var s=ha(e,o,a,n.primary,n.primary.type);n.markers.push(s),s.parent=n}}}function xa(e){for(var t=function(t){var r=e[t],n=[r.primary.doc];vo(r.primary.doc,(function(e){return n.push(e)}));for(var i=0;i<r.markers.length;i++){var o=r.markers[i];-1==R(n,o.doc)&&(o.parent=null,r.markers.splice(i--,1))}},r=0;r<e.length;r++)t(r)}ga.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Dr(this,"clear")}},ga.prototype.find=function(e,t){return this.primary.find(e,t)},we(ga);var wa=0,ka=function(e,t,r,n,i){if(!(this instanceof ka))return new ka(e,t,r,n,i);null==r&&(r=0),la.call(this,[new ca([new sr("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=it(r,0);this.sel=ao(o),this.history=new wo(null),this.id=++wa,this.modeOption=t,this.lineSep=n,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),go(this,{from:o,to:o,text:e}),No(this,ao(o),H)};ka.prototype=Q(la.prototype,{constructor:ka,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Ze(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:Li((function(e){var t=it(this.first,0),r=this.first+this.size-1;Jo(this,{from:t,to:it(r,Ke(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&si(this.cm,0,0),No(this,ao(t),H)})),replaceRange:function(e,t,r,n){na(this,e,t=pt(this,t),r=r?pt(this,r):t,n)},getRange:function(e,t,r){var n=Je(this,pt(this,e),pt(this,t));return!1===r?n:""===r?n.join(""):n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(rt(this,e))return Ke(this,e)},getLineNumber:function(e){return et(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Ke(this,e)),Jt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return pt(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Li((function(e,t,r){jo(this,pt(this,"number"==typeof e?it(e,t||0):e),null,r)})),setSelection:Li((function(e,t,r){jo(this,pt(this,e),pt(this,t||e),r)})),extendSelection:Li((function(e,t,r){Oo(this,pt(this,e),t&&pt(this,t),r)})),extendSelections:Li((function(e,t){Bo(this,mt(this,e),t)})),extendSelectionsBy:Li((function(e,t){Bo(this,mt(this,K(this.sel.ranges,e)),t)})),setSelections:Li((function(e,t,r){if(e.length){for(var n=[],i=0;i<e.length;i++)n[i]=new io(pt(this,e[i].anchor),pt(this,e[i].head||e[i].anchor));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),No(this,oo(this.cm,n,t),r)}})),addSelection:Li((function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new io(pt(this,e),pt(this,t||e))),No(this,oo(this.cm,n,n.length-1),r)})),getSelection:function(e){for(var t,r=this.sel.ranges,n=0;n<r.length;n++){var i=Je(this,r[n].from(),r[n].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var i=Je(this,r[n].from(),r[n].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[n]=i}return t},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:Li((function(e,t,r){for(var n=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];n[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:r}}for(var s=t&&"end"!=t&&po(this,n,t),c=n.length-1;c>=0;c--)Jo(this,n[c]);s?Ro(this,s):this.cm&&ai(this.cm)})),undo:Li((function(){Qo(this,"undo")})),redo:Li((function(){Qo(this,"redo")})),undoSelection:Li((function(){Qo(this,"undo",!0)})),redoSelection:Li((function(){Qo(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){var e=this;this.history=new wo(this.history),vo(this,(function(t){return t.history=e.history}),!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Lo(this.history.done),undone:Lo(this.history.undone)}},setHistory:function(e){var t=this.history=new wo(this.history);t.done=Lo(e.done.slice(0),null,!0),t.undone=Lo(e.undone.slice(0),null,!0)},setGutterMarker:Li((function(e,t,r){return sa(this,e,"gutter",(function(e){var n=e.gutterMarkers||(e.gutterMarkers={});return n[t]=r,!r&&ne(n)&&(e.gutterMarkers=null),!0}))})),clearGutter:Li((function(e){var t=this;this.iter((function(r){r.gutterMarkers&&r.gutterMarkers[e]&&sa(t,r,"gutter",(function(){return r.gutterMarkers[e]=null,ne(r.gutterMarkers)&&(r.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!rt(this,e))return null;if(t=e,!(e=Ke(this,e)))return null}else if(null==(t=et(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Li((function(e,t,r){return sa(this,e,"gutter"==t?"gutter":"class",(function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[n]){if(z(r).test(e[n]))return!1;e[n]+=" "+r}else e[n]=r;return!0}))})),removeLineClass:Li((function(e,t,r){return sa(this,e,"gutter"==t?"gutter":"class",(function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[n];if(!i)return!1;if(null==r)e[n]=null;else{var o=i.match(z(r));if(!o)return!1;var a=o.index+o[0].length;e[n]=i.slice(0,o.index)+(o.index&&a!=i.length?" ":"")+i.slice(a)||null}return!0}))})),addLineWidget:Li((function(e,t,r){return da(this,e,t,r)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return ha(this,pt(this,e),pt(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return ha(this,e=pt(this,e),e,r,"bookmark")},findMarksAt:function(e){var t=[],r=Ke(this,(e=pt(this,e)).line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=pt(this,e),t=pt(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var a=o.markedSpans;if(a)for(var s=0;s<a.length;s++){var c=a[s];null!=c.to&&i==e.line&&e.ch>=c.to||null==c.from&&i!=e.line||null!=c.from&&i==t.line&&c.from>=t.ch||r&&!r(c.marker)||n.push(c.marker.parent||c.marker)}++i})),n},getAllMarks:function(){var e=[];return this.iter((function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)null!=r[n].from&&e.push(r[n].marker)})),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter((function(i){var o=i.text.length+n;if(o>e)return t=e,!0;e-=o,++r})),pt(this,it(r,t))},indexFromPos:function(e){var t=(e=pt(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+r})),t},copy:function(e){var t=new ka(Ze(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<r&&(r=e.to);var n=new ka(Ze(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],ya(n,ba(this)),n},unlinkDoc:function(e){if(e instanceof Bs&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),xa(ba(this));break}if(e.history==this.history){var r=[e.id];vo(e,(function(e){return r.push(e.id)}),!0),e.history=new wo(null),e.history.done=Lo(this.history.done,r),e.history.undone=Lo(this.history.undone,r)}},iterLinkedDocs:function(e){vo(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Le(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:Li((function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&xo(this.cm))}))}),ka.prototype.eachLine=ka.prototype.iter;var Ca=0;function za(e){var t=this;if(Da(t),!be(t,e)&&!qr(t.display,e)){ke(e),a&&(Ca=+new Date);var r=In(t,e,!0),n=e.dataTransfer.files;if(r&&!t.isReadOnly())if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),s=0,c=function(){++s==i&&Ei(t,(function(){var e={from:r=pt(t.doc,r),to:r,text:t.doc.splitLines(o.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};Jo(t.doc,e),Ro(t.doc,ao(pt(t.doc,r),pt(t.doc,so(e))))}))()},l=function(e,r){if(t.options.allowDropFileTypes&&-1==R(t.options.allowDropFileTypes,e.type))c();else{var n=new FileReader;n.onerror=function(){return c()},n.onload=function(){var e=n.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(o[r]=e),c()},n.readAsText(e)}},u=0;u<n.length;u++)l(n[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var p=e.dataTransfer.getData("Text");if(p){var d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),qo(t.doc,ao(r,r)),d)for(var m=0;m<d.length;++m)na(t.doc,"",d[m].anchor,d[m].head,"drag");t.replaceSelection(p,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Sa(e,t){if(a&&(!e.state.draggingText||+new Date-Ca<100))Se(t);else if(!be(e,t)&&!qr(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!d)){var r=$("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",p&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),p&&r.parentNode.removeChild(r)}}function Aa(e,t){var r=In(e,t);if(r){var n=document.createDocumentFragment();Un(e,r,n),e.display.dragCursor||(e.display.dragCursor=$("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),T(e.display.dragCursor,n)}}function Da(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Ta(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),r=[],n=0;n<t.length;n++){var i=t[n].CodeMirror;i&&r.push(i)}r.length&&r[0].operation((function(){for(var t=0;t<r.length;t++)e(r[t])}))}}var $a=!1;function _a(){$a||(Ea(),$a=!0)}function Ea(){var e;fe(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Ta(Ma)}),100))})),fe(window,"blur",(function(){return Ta(Jn)}))}function Ma(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var La={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Ia=0;Ia<10;Ia++)La[Ia+48]=La[Ia+96]=String(Ia);for(var Oa=65;Oa<=90;Oa++)La[Oa]=String.fromCharCode(Oa);for(var Ba=1;Ba<=12;Ba++)La[Ba+111]=La[Ba+63235]="F"+Ba;var Pa={};function ja(e){var t,r,n,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(var a=0;a<o.length-1;a++){var s=o[a];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))r=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);n=!0}}return t&&(e="Alt-"+e),r&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),n&&(e="Shift-"+e),e}function Fa(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if("..."==n){delete e[r];continue}for(var i=K(r.split(" "),ja),o=0;o<i.length;o++){var a=void 0,s=void 0;o==i.length-1?(s=i.join(" "),a=n):(s=i.slice(0,o+1).join(" "),a="...");var c=t[s];if(c){if(c!=a)throw new Error("Inconsistent bindings for "+s)}else t[s]=a}delete e[r]}for(var l in t)e[l]=t[l];return e}function Ra(e,t,r,n){var i=(t=Ua(t)).call?t.call(e,n):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&r(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Ra(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var a=Ra(e,t.fallthrough[o],r,n);if(a)return a}}}function Na(e){var t="string"==typeof e?e:La[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function qa(e,t,r){var n=e;return t.altKey&&"Alt"!=n&&(e="Alt-"+e),(k?t.metaKey:t.ctrlKey)&&"Ctrl"!=n&&(e="Ctrl-"+e),(k?t.ctrlKey:t.metaKey)&&"Mod"!=n&&(e="Cmd-"+e),!r&&t.shiftKey&&"Shift"!=n&&(e="Shift-"+e),e}function Ha(e,t){if(p&&34==e.keyCode&&e.char)return!1;var r=La[e.keyCode];return null!=r&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(r=e.code),qa(r,e,t))}function Ua(e){return"string"==typeof e?Pa[e]:e}function Ga(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&ot(o.from,Y(n).to)<=0;){var a=n.pop();if(ot(a.from,o.from)<0){o.from=a.from;break}}n.push(o)}_i(e,(function(){for(var t=n.length-1;t>=0;t--)na(e.doc,"",n[t].from,n[t].to,"+delete");ai(e)}))}function Wa(e,t,r){var n=ae(e.text,t+r,r);return n<0||n>e.text.length?null:n}function Xa(e,t,r){var n=Wa(e,t.ch,r);return null==n?null:new it(t.line,n,r<0?"after":"before")}function Va(e,t,r,n,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=de(r,t.doc.direction);if(o){var a,s=i<0?Y(o):o[0],c=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var l=en(t,r);a=i<0?r.text.length-1:0;var u=tn(t,l,a).top;a=se((function(e){return tn(t,l,e).top==u}),i<0==(1==s.level)?s.from:s.to-1,a),"before"==c&&(a=Wa(r,a,1))}else a=i<0?s.to:s.from;return new it(n,a,c)}}return new it(n,i<0?r.text.length:0,i<0?"before":"after")}function Ya(e,t,r,n){var i=de(t,e.doc.direction);if(!i)return Xa(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=ue(i,r.ch,r.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(n>0?a.to>r.ch:a.from<r.ch))return Xa(t,r,n);var s,c=function(e,r){return Wa(t,e instanceof it?e.ch:e,r)},l=function(r){return e.options.lineWrapping?(s=s||en(e,t),Cn(e,t,s,r)):{begin:0,end:t.text.length}},u=l("before"==r.sticky?c(r,-1):r.ch);if("rtl"==e.doc.direction||1==a.level){var p=1==a.level==n<0,d=c(r,p?1:-1);if(null!=d&&(p?d<=a.to&&d<=u.end:d>=a.from&&d>=u.begin)){var m=p?"before":"after";return new it(r.line,d,m)}}var f=function(e,t,n){for(var o=function(e,t){return t?new it(r.line,c(e,1),"before"):new it(r.line,e,"after")};e>=0&&e<i.length;e+=t){var a=i[e],s=t>0==(1!=a.level),l=s?n.begin:c(n.end,-1);if(a.from<=l&&l<a.to)return o(l,s);if(l=s?a.from:c(a.to,-1),n.begin<=l&&l<n.end)return o(l,s)}},h=f(o+n,n,u);if(h)return h;var g=n>0?u.end:c(u.begin,-1);return null==g||n>0&&g==t.text.length||!(h=f(n>0?0:i.length-1,n,l(g)))?null:h}Pa.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Pa.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Pa.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Pa.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Pa.default=b?Pa.macDefault:Pa.pcDefault;var Ka={selectAll:Yo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),H)},killLine:function(e){return Ga(e,(function(t){if(t.empty()){var r=Ke(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:it(t.head.line+1,0)}:{from:t.head,to:it(t.head.line,r)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return Ga(e,(function(t){return{from:it(t.from().line,0),to:pt(e.doc,it(t.to().line+1,0))}}))},delLineLeft:function(e){return Ga(e,(function(e){return{from:it(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return Ga(e,(function(t){var r=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:r},"div"),to:t.from()}}))},delWrappedLineRight:function(e){return Ga(e,(function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}}))},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(it(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(it(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return Ja(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return Qa(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return Za(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")}),G)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")}),G)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?Qa(e,t.head):n}),G)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var o=r[i].from(),a=j(e.getLine(o.line),o.ch,n);t.push(V(n-a%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return _i(e,(function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var i=t[n].head,o=Ke(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new it(i.line,i.ch-1)),i.ch>0)i=new it(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),it(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Ke(e.doc,i.line-1).text;a&&(i=new it(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),it(i.line-1,a.length-1),i,"+transpose"))}r.push(new io(i,i))}e.setSelections(r)}))},newlineAndIndent:function(e){return _i(e,(function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);ai(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Ja(e,t){var r=Ke(e.doc,t),n=Jt(r);return n!=r&&(t=et(n)),Va(!0,e,n,t,1)}function Za(e,t){var r=Ke(e.doc,t),n=Zt(r);return n!=r&&(t=et(n)),Va(!0,e,r,t,-1)}function Qa(e,t){var r=Ja(e,t.line),n=Ke(e.doc,r.line),i=de(n,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(r.ch,n.text.search(/\S/)),a=t.line==r.line&&t.ch<=o&&t.ch;return it(r.line,a?0:o,r.sticky)}return r}function es(e,t,r){if("string"==typeof t&&!(t=Ka[t]))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=q}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function ts(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=Ra(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Ra(t,e.options.extraKeys,r,e)||Ra(t,e.options.keyMap,r,e)}var rs=new F;function ns(e,t,r,n){var i=e.state.keySeq;if(i){if(Na(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:rs.set(50,(function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())})),is(e,i+" "+t,r,n))return!0}return is(e,t,r,n)}function is(e,t,r,n){var i=ts(e,t,n);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&Dr(e,"keyHandled",e,t,r),"handled"!=i&&"multi"!=i||(ke(r),Xn(e)),!!i}function os(e,t){var r=Ha(t,!0);return!!r&&(t.shiftKey&&!e.state.keySeq?ns(e,"Shift-"+r,t,(function(t){return es(e,t,!0)}))||ns(e,r,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return es(e,t)})):ns(e,r,t,(function(t){return es(e,t)})))}function as(e,t,r){return ns(e,"'"+r+"'",t,(function(t){return es(e,t,!0)}))}var ss=null;function cs(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=M(),be(t,e)))){a&&s<11&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var i=os(t,e);p&&(ss=i?n:null,i||88!=n||Oe||!(b?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),r&&!b&&!i&&46==n&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||ls(t)}}function ls(e){var t=e.display.lineDiv;function r(e){18!=e.keyCode&&e.altKey||(A(t,"CodeMirror-crosshair"),ge(document,"keyup",r),ge(document,"mouseover",r))}L(t,"CodeMirror-crosshair"),fe(document,"keyup",r),fe(document,"mouseover",r)}function us(e){16==e.keyCode&&(this.doc.sel.shift=!1),be(this,e)}function ps(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||qr(t.display,e)||be(t,e)||e.ctrlKey&&!e.altKey||b&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(p&&r==ss)return ss=null,void ke(e);if(!p||e.which&&!(e.which<10)||!os(t,e)){var i=String.fromCharCode(null==n?r:n);"\b"!=i&&(as(t,e,i)||t.display.input.onKeyPress(e))}}}var ds,ms,fs=400,hs=function(e,t,r){this.time=e,this.pos=t,this.button=r};function gs(e,t){var r=+new Date;return ms&&ms.compare(r,e,t)?(ds=ms=null,"triple"):ds&&ds.compare(r,e,t)?(ms=new hs(r,e,t),ds=null,"double"):(ds=new hs(r,e,t),ms=null,"single")}function vs(e){var t=this,r=t.display;if(!(be(t,e)||r.activeTouch&&r.input.supportsTouch()))if(r.input.ensurePolled(),r.shift=e.shiftKey,qr(r,e))c||(r.scroller.draggable=!1,setTimeout((function(){return r.scroller.draggable=!0}),100));else if(!As(t,e)){var n=In(t,e),i=De(e),o=n?gs(n,i):"single";window.focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),n&&bs(t,i,n,o,e)||(1==i?n?xs(t,n,o,e):Ae(e)==r.scroller&&ke(e):2==i?(n&&Oo(t.doc,n),setTimeout((function(){return r.input.focus()}),20)):3==i&&(C?t.display.input.onContextMenu(e):Yn(t)))}}function bs(e,t,r,n,i){var o="Click";return"double"==n?o="Double"+o:"triple"==n&&(o="Triple"+o),ns(e,qa(o=(1==t?"Left":2==t?"Middle":"Right")+o,i),i,(function(t){if("string"==typeof t&&(t=Ka[t]),!t)return!1;var n=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n=t(e,r)!=q}finally{e.state.suppressEdits=!1}return n}))}function ys(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(null==i.unit){var o=y?r.shiftKey&&r.metaKey:r.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey),null==i.addNew&&(i.addNew=b?r.metaKey:r.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(b?r.altKey:r.ctrlKey)),i}function xs(e,t,r,n){a?setTimeout(B(Vn,e),0):e.curOp.focus=M();var i,o=ys(e,r,n),s=e.doc.sel;e.options.dragDrop&&_e&&!e.isReadOnly()&&"single"==r&&(i=s.contains(t))>-1&&(ot((i=s.ranges[i]).from(),t)<0||t.xRel>0)&&(ot(i.to(),t)>0||t.xRel<0)?ws(e,n,t,o):Cs(e,n,t,o)}function ws(e,t,r,n){var i=e.display,o=!1,l=Ei(e,(function(t){c&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Yn(e)),ge(i.wrapper.ownerDocument,"mouseup",l),ge(i.wrapper.ownerDocument,"mousemove",u),ge(i.scroller,"dragstart",p),ge(i.scroller,"drop",l),o||(ke(t),n.addNew||Oo(e.doc,r,null,null,n.extend),c&&!d||a&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),u=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},p=function(){return o=!0};c&&(i.scroller.draggable=!0),e.state.draggingText=l,l.copy=!n.moveOnDrag,fe(i.wrapper.ownerDocument,"mouseup",l),fe(i.wrapper.ownerDocument,"mousemove",u),fe(i.scroller,"dragstart",p),fe(i.scroller,"drop",l),e.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}function ks(e,t,r){if("char"==r)return new io(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new io(it(t.line,0),pt(e.doc,it(t.line+1,0)));var n=r(e,t);return new io(n.from,n.to)}function Cs(e,t,r,n){a&&Yn(e);var i=e.display,o=e.doc;ke(t);var s,c,l=o.sel,u=l.ranges;if(n.addNew&&!n.extend?(c=o.sel.contains(r),s=c>-1?u[c]:new io(r,r)):(s=o.sel.primary(),c=o.sel.primIndex),"rectangle"==n.unit)n.addNew||(s=new io(r,r)),r=In(e,t,!0,!0),c=-1;else{var p=ks(e,r,n.unit);s=n.extend?Io(s,p.anchor,p.head,n.extend):p}n.addNew?-1==c?(c=u.length,No(o,oo(e,u.concat([s]),c),{scroll:!1,origin:"*mouse"})):u.length>1&&u[c].empty()&&"char"==n.unit&&!n.extend?(No(o,oo(e,u.slice(0,c).concat(u.slice(c+1)),0),{scroll:!1,origin:"*mouse"}),l=o.sel):Po(o,c,s,U):(c=0,No(o,new no([s],0),U),l=o.sel);var d=r;function m(t){if(0!=ot(d,t))if(d=t,"rectangle"==n.unit){for(var i=[],a=e.options.tabSize,u=j(Ke(o,r.line).text,r.ch,a),p=j(Ke(o,t.line).text,t.ch,a),m=Math.min(u,p),f=Math.max(u,p),h=Math.min(r.line,t.line),g=Math.min(e.lastLine(),Math.max(r.line,t.line));h<=g;h++){var v=Ke(o,h).text,b=W(v,m,a);m==f?i.push(new io(it(h,b),it(h,b))):v.length>b&&i.push(new io(it(h,b),it(h,W(v,f,a))))}i.length||i.push(new io(r,r)),No(o,oo(e,l.ranges.slice(0,c).concat(i),c),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var y,x=s,w=ks(e,t,n.unit),k=x.anchor;ot(w.anchor,k)>0?(y=w.head,k=lt(x.from(),w.anchor)):(y=w.anchor,k=ct(x.to(),w.head));var C=l.ranges.slice(0);C[c]=zs(e,new io(pt(o,k),y)),No(o,oo(e,C,c),U)}}var f=i.wrapper.getBoundingClientRect(),h=0;function g(t){var r=++h,a=In(e,t,!0,"rectangle"==n.unit);if(a)if(0!=ot(a,d)){e.curOp.focus=M(),m(a);var s=ei(i,o);(a.line>=s.to||a.line<s.from)&&setTimeout(Ei(e,(function(){h==r&&g(t)})),150)}else{var c=t.clientY<f.top?-20:t.clientY>f.bottom?20:0;c&&setTimeout(Ei(e,(function(){h==r&&(i.scroller.scrollTop+=c,g(t))})),50)}}function v(t){e.state.selectingText=!1,h=1/0,t&&(ke(t),i.input.focus()),ge(i.wrapper.ownerDocument,"mousemove",b),ge(i.wrapper.ownerDocument,"mouseup",y),o.history.lastSelOrigin=null}var b=Ei(e,(function(e){0!==e.buttons&&De(e)?g(e):v(e)})),y=Ei(e,v);e.state.selectingText=y,fe(i.wrapper.ownerDocument,"mousemove",b),fe(i.wrapper.ownerDocument,"mouseup",y)}function zs(e,t){var r=t.anchor,n=t.head,i=Ke(e.doc,r.line);if(0==ot(r,n)&&r.sticky==n.sticky)return t;var o=de(i);if(!o)return t;var a=ue(o,r.ch,r.sticky),s=o[a];if(s.from!=r.ch&&s.to!=r.ch)return t;var c,l=a+(s.from==r.ch==(1!=s.level)?0:1);if(0==l||l==o.length)return t;if(n.line!=r.line)c=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=ue(o,n.ch,n.sticky),p=u-a||(n.ch-r.ch)*(1==s.level?-1:1);c=u==l-1||u==l?p<0:p>0}var d=o[l+(c?-1:0)],m=c==(1==d.level),f=m?d.from:d.to,h=m?"after":"before";return r.ch==f&&r.sticky==h?t:new io(new it(r.line,f,h),n)}function Ss(e,t,r,n){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&ke(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!xe(e,r))return ze(t);o-=s.top-a.viewOffset;for(var c=0;c<e.display.gutterSpecs.length;++c){var l=a.gutters.childNodes[c];if(l&&l.getBoundingClientRect().right>=i)return ve(e,r,e,tt(e.doc,o),e.display.gutterSpecs[c].className,t),ze(t)}}function As(e,t){return Ss(e,t,"gutterClick",!0)}function Ds(e,t){qr(e.display,t)||Ts(e,t)||be(e,t,"contextmenu")||C||e.display.input.onContextMenu(t)}function Ts(e,t){return!!xe(e,"gutterContextMenu")&&Ss(e,t,"gutterContextMenu",!1)}function $s(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),pn(e)}hs.prototype.compare=function(e,t,r){return this.time+fs>e&&0==ot(t,this.pos)&&r==this.button};var _s={toString:function(){return"CodeMirror.Init"}},Es={},Ms={};function Ls(e){var t=e.optionHandlers;function r(r,n,i,o){e.defaults[r]=n,i&&(t[r]=o?function(e,t,r){r!=_s&&i(e,t,r)}:i)}e.defineOption=r,e.Init=_s,r("value","",(function(e,t){return e.setValue(t)}),!0),r("mode",null,(function(e,t){e.doc.modeOption=t,mo(e)}),!0),r("indentUnit",2,mo,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,(function(e){fo(e),pn(e),Bn(e)}),!0),r("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,r.push(it(n,o))}n++}));for(var i=r.length-1;i>=0;i--)na(e.doc,t,r[i],it(r[i].line,r[i].ch+t.length))}})),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=_s&&e.refresh()})),r("specialCharPlaceholder",fr,(function(e){return e.refresh()}),!0),r("electricChars",!0),r("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),r("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),r("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),r("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),r("rtlMoveVisually",!x),r("wholeLineUpdateBefore",!0),r("theme","default",(function(e){$s(e),Ki(e)}),!0),r("keyMap","default",(function(e,t,r){var n=Ua(t),i=r!=_s&&Ua(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)})),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Os,!0),r("gutters",[],(function(e,t){e.display.gutterSpecs=Vi(t,e.options.lineNumbers),Ki(e)}),!0),r("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?En(e.display)+"px":"0",e.refresh()}),!0),r("coverGutterNextToScrollbar",!1,(function(e){return vi(e)}),!0),r("scrollbarStyle","native",(function(e){xi(e),vi(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),r("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=Vi(e.options.gutters,t),Ki(e)}),!0),r("firstLineNumber",1,Ki,!0),r("lineNumberFormatter",(function(e){return e}),Ki,!0),r("showCursorWhenSelecting",!1,qn,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,(function(e,t){"nocursor"==t&&(Jn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),r("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),r("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),r("dragDrop",!0,Is),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,qn,!0),r("singleCursorHeightPerLine",!0,qn,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,fo,!0),r("addModeClass",!1,fo,!0),r("pollInterval",100),r("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),r("historyEventDelay",1250),r("viewportMargin",10,(function(e){return e.refresh()}),!0),r("maxHighlightLength",1e4,fo,!0),r("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),r("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),r("autofocus",null),r("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),r("phrases",null)}function Is(e,t,r){if(!t!=!(r&&r!=_s)){var n=e.display.dragFunctions,i=t?fe:ge;i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function Os(e){e.options.lineWrapping?(L(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(A(e.display.wrapper,"CodeMirror-wrap"),ar(e)),Ln(e),Bn(e),pn(e),setTimeout((function(){return vi(e)}),100)}function Bs(e,t){var r=this;if(!(this instanceof Bs))return new Bs(e,t);this.options=t=t?P(t):{},P(Es,t,!1);var n=t.value;"string"==typeof n?n=new ka(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new Bs.inputStyles[t.inputStyle](this),o=this.display=new Ji(e,n,i,t);for(var l in o.wrapper.CodeMirror=this,$s(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),xi(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new F,keySeq:null,specialChars:null},t.autofocus&&!v&&o.input.focus(),a&&s<11&&setTimeout((function(){return r.display.input.reset(!0)}),20),Ps(this),_a(),ki(this),this.curOp.forceUpdate=!0,bo(this,n),t.autofocus&&!v||this.hasFocus()?setTimeout((function(){r.hasFocus()&&!r.state.focused&&Kn(r)}),20):Jn(this),Ms)Ms.hasOwnProperty(l)&&Ms[l](this,t[l],_s);Xi(this),t.finishInit&&t.finishInit(this);for(var u=0;u<js.length;++u)js[u](this);Ci(this),c&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}function Ps(e){var t=e.display;fe(t.scroller,"mousedown",Ei(e,vs)),fe(t.scroller,"dblclick",a&&s<11?Ei(e,(function(t){if(!be(e,t)){var r=In(e,t);if(r&&!As(e,t)&&!qr(e.display,t)){ke(t);var n=e.findWordAt(r);Oo(e.doc,n.anchor,n.head)}}})):function(t){return be(e,t)||ke(t)}),fe(t.scroller,"contextmenu",(function(t){return Ds(e,t)})),fe(t.input.getField(),"contextmenu",(function(r){t.scroller.contains(r.target)||Ds(e,r)}));var r,n={end:0};function i(){t.activeTouch&&(r=setTimeout((function(){return t.activeTouch=null}),1e3),(n=t.activeTouch).end=+new Date)}function o(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function c(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return r*r+n*n>400}fe(t.scroller,"touchstart",(function(i){if(!be(e,i)&&!o(i)&&!As(e,i)){t.input.ensurePolled(),clearTimeout(r);var a=+new Date;t.activeTouch={start:a,moved:!1,prev:a-n.end<=300?n:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),fe(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),fe(t.scroller,"touchend",(function(r){var n=t.activeTouch;if(n&&!qr(t,r)&&null!=n.left&&!n.moved&&new Date-n.start<300){var o,a=e.coordsChar(t.activeTouch,"page");o=!n.prev||c(n,n.prev)?new io(a,a):!n.prev.prev||c(n,n.prev.prev)?e.findWordAt(a):new io(it(a.line,0),pt(e.doc,it(a.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),ke(r)}i()})),fe(t.scroller,"touchcancel",i),fe(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(pi(e,t.scroller.scrollTop),mi(e,t.scroller.scrollLeft,!0),ve(e,"scroll",e))})),fe(t.scroller,"mousewheel",(function(t){return ro(e,t)})),fe(t.scroller,"DOMMouseScroll",(function(t){return ro(e,t)})),fe(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){be(e,t)||Se(t)},over:function(t){be(e,t)||(Aa(e,t),Se(t))},start:function(t){return Sa(e,t)},drop:Ei(e,za),leave:function(t){be(e,t)||Da(e)}};var l=t.input.getField();fe(l,"keyup",(function(t){return us.call(e,t)})),fe(l,"keydown",Ei(e,cs)),fe(l,"keypress",Ei(e,ps)),fe(l,"focus",(function(t){return Kn(e,t)})),fe(l,"blur",(function(t){return Jn(e,t)}))}Bs.defaults=Es,Bs.optionHandlers=Ms;var js=[];function Fs(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=bt(e,t).state:r="prev");var a=e.options.tabSize,s=Ke(o,t),c=j(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var l,u=s.text.match(/^\s*/)[0];if(n||/\S/.test(s.text)){if("smart"==r&&((l=o.mode.indent(i,s.text.slice(u.length),s.text))==q||l>150)){if(!n)return;r="prev"}}else l=0,r="not";"prev"==r?l=t>o.first?j(Ke(o,t-1).text,null,a):0:"add"==r?l=c+e.options.indentUnit:"subtract"==r?l=c-e.options.indentUnit:"number"==typeof r&&(l=c+r),l=Math.max(0,l);var p="",d=0;if(e.options.indentWithTabs)for(var m=Math.floor(l/a);m;--m)d+=a,p+="\t";if(d<l&&(p+=V(l-d)),p!=u)return na(o,p,it(t,0),it(t,u.length),"+input"),s.stateAfter=null,!0;for(var f=0;f<o.sel.ranges.length;f++){var h=o.sel.ranges[f];if(h.head.line==t&&h.head.ch<u.length){var g=it(t,u.length);Po(o,f,new io(g,g));break}}}Bs.defineInitHook=function(e){return js.push(e)};var Rs=null;function Ns(e){Rs=e}function qs(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var a=+new Date-200,s="paste"==i||e.state.pasteIncoming>a,c=Le(t),l=null;if(s&&n.ranges.length>1)if(Rs&&Rs.text.join("\n")==t){if(n.ranges.length%Rs.text.length==0){l=[];for(var u=0;u<Rs.text.length;u++)l.push(o.splitLines(Rs.text[u]))}}else c.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(l=K(c,(function(e){return[e]})));for(var p=e.curOp.updateInput,d=n.ranges.length-1;d>=0;d--){var m=n.ranges[d],f=m.from(),h=m.to();m.empty()&&(r&&r>0?f=it(f.line,f.ch-r):e.state.overwrite&&!s?h=it(h.line,Math.min(Ke(o,h.line).text.length,h.ch+Y(c).length)):s&&Rs&&Rs.lineWise&&Rs.text.join("\n")==c.join("\n")&&(f=h=it(f.line,0)));var g={from:f,to:h,text:l?l[d%l.length]:c,origin:i||(s?"paste":e.state.cutIncoming>a?"cut":"+input")};Jo(e.doc,g),Dr(e,"inputRead",e,g)}t&&!s&&Us(e,t),ai(e),e.curOp.updateInput<2&&(e.curOp.updateInput=p),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Hs(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||_i(t,(function(){return qs(t,r,0,null,"paste")})),!0}function Us(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s<o.electricChars.length;s++)if(t.indexOf(o.electricChars.charAt(s))>-1){a=Fs(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Ke(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Fs(e,i.head.line,"smart"));a&&Dr(e,"electricInput",e,i.head.line)}}}function Gs(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,o={anchor:it(i,0),head:it(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function Ws(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function Xs(){var e=$("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=$("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return c?e.style.width="1000px":e.setAttribute("wrap","off"),h&&(e.style.border="1px solid black"),Ws(e),t}function Vs(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,r){var n=this.options,i=n[e];n[e]==r&&"mode"!=e||(n[e]=r,t.hasOwnProperty(e)&&Ei(this,t[e])(this,r,i),ve(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Ua(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;r<t.length;++r)if(t[r]==e||t[r].name==e)return t.splice(r,1),!0},addOverlay:Mi((function(t,r){var n=t.token?t:e.getMode(this.options,t);if(n.startState)throw new Error("Overlays may not be stateful.");J(this.state.overlays,{mode:n,modeSpec:t,opaque:r&&r.opaque,priority:r&&r.priority||0},(function(e){return e.priority})),this.state.modeGen++,Bn(this)})),removeOverlay:Mi((function(e){for(var t=this.state.overlays,r=0;r<t.length;++r){var n=t[r].modeSpec;if(n==e||"string"==typeof e&&n.name==e)return t.splice(r,1),this.state.modeGen++,void Bn(this)}})),indentLine:Mi((function(e,t,r){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),rt(this.doc,e)&&Fs(this,e,t,r)})),indentSelection:Mi((function(e){for(var t=this.doc.sel.ranges,r=-1,n=0;n<t.length;n++){var i=t[n];if(i.empty())i.head.line>r&&(Fs(this,i.head.line,e,!0),r=i.head.line,n==this.doc.sel.primIndex&&ai(this));else{var o=i.from(),a=i.to(),s=Math.max(r,o.line);r=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var c=s;c<r;++c)Fs(this,c,e);var l=this.doc.sel.ranges;0==o.ch&&t.length==l.length&&l[n].from().ch>0&&Po(this.doc,n,new io(o,l[n].to()),H)}}})),getTokenAt:function(e,t){return Ct(this,e,t)},getLineTokens:function(e,t){return Ct(this,it(e),t,!0)},getTokenTypeAt:function(e){e=pt(this.doc,e);var t,r=vt(this,Ke(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var a=n+i>>1;if((a?r[2*a-1]:0)>=o)i=a;else{if(!(r[2*a+1]<o)){t=r[2*a+2];break}n=a+1}}var s=t?t.indexOf("overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var r=this.doc.mode;return r.innerMode?e.innerMode(r,this.getTokenAt(t).state).mode:r},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!r.hasOwnProperty(t))return n;var i=r[t],o=this.getModeAt(e);if("string"==typeof o[t])i[o[t]]&&n.push(i[o[t]]);else if(o[t])for(var a=0;a<o[t].length;a++){var s=i[o[t][a]];s&&n.push(s)}else o.helperType&&i[o.helperType]?n.push(i[o.helperType]):i[o.name]&&n.push(i[o.name]);for(var c=0;c<i._global.length;c++){var l=i._global[c];l.pred(o,this)&&-1==R(n,l.val)&&n.push(l.val)}return n},getStateAfter:function(e,t){var r=this.doc;return bt(this,(e=ut(r,null==e?r.first+r.size-1:e))+1,t).state},cursorCoords:function(e,t){var r=this.doc.sel.primary();return bn(this,null==e?r.head:"object"==typeof e?pt(this.doc,e):e?r.from():r.to(),t||"page")},charCoords:function(e,t){return vn(this,pt(this.doc,e),t||"page")},coordsChar:function(e,t){return wn(this,(e=gn(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=gn(this,{top:e,left:0},t||"page").top,tt(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,r){var n,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>o&&(e=o,i=!0),n=Ke(this.doc,e)}else n=e;return hn(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-ir(n):0)},defaultTextHeight:function(){return Tn(this.display)},defaultCharWidth:function(){return $n(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o=this.display,a=(e=bn(this,pt(this.doc,e))).bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==n)a=e.top;else if("above"==n||"near"==n){var c=Math.max(o.wrapper.clientHeight,this.doc.height),l=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>c)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=c&&(a=e.bottom),s+t.offsetWidth>l&&(s=l-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),r&&ni(this,{left:s,top:a,right:s+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:Mi(cs),triggerOnKeyPress:Mi(ps),triggerOnKeyUp:us,triggerOnMouseDown:Mi(vs),execCommand:function(e){if(Ka.hasOwnProperty(e))return Ka[e].call(null,this)},triggerElectric:Mi((function(e){Us(this,e)})),findPosH:function(e,t,r,n){var i=1;t<0&&(i=-1,t=-t);for(var o=pt(this.doc,e),a=0;a<t&&!(o=Ys(this.doc,o,i,r,n)).hitSide;++a);return o},moveH:Mi((function(e,t){var r=this;this.extendSelectionsBy((function(n){return r.display.shift||r.doc.extend||n.empty()?Ys(r.doc,n.head,e,t,r.options.rtlMoveVisually):e<0?n.from():n.to()}),G)})),deleteH:Mi((function(e,t){var r=this.doc.sel,n=this.doc;r.somethingSelected()?n.replaceSelection("",null,"+delete"):Ga(this,(function(r){var i=Ys(n,r.head,e,t,!1);return e<0?{from:i,to:r.head}:{from:r.head,to:i}}))})),findPosV:function(e,t,r,n){var i=1,o=n;t<0&&(i=-1,t=-t);for(var a=pt(this.doc,e),s=0;s<t;++s){var c=bn(this,a,"div");if(null==o?o=c.left:c.left=o,(a=Ks(this,c,i,r)).hitSide)break}return a},moveV:Mi((function(e,t){var r=this,n=this.doc,i=[],o=!this.display.shift&&!n.extend&&n.sel.somethingSelected();if(n.extendSelectionsBy((function(a){if(o)return e<0?a.from():a.to();var s=bn(r,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),i.push(s.left);var c=Ks(r,s,e,t);return"page"==t&&a==n.sel.primary()&&oi(r,vn(r,c,"div").top-s.top),c}),G),i.length)for(var a=0;a<n.sel.ranges.length;a++)n.sel.ranges[a].goalColumn=i[a]})),findWordAt:function(e){var t=Ke(this.doc,e.line).text,r=e.ch,n=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&n!=t.length||!r?++n:--r;for(var o=t.charAt(r),a=re(o,i)?function(e){return re(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!re(e)};r>0&&a(t.charAt(r-1));)--r;for(;n<t.length&&a(t.charAt(n));)++n}return new io(it(e.line,r),it(e.line,n))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?L(this.display.cursorDiv,"CodeMirror-overwrite"):A(this.display.cursorDiv,"CodeMirror-overwrite"),ve(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==M()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:Mi((function(e,t){si(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Wr(this)-this.display.barHeight,width:e.scrollWidth-Wr(this)-this.display.barWidth,clientHeight:Vr(this),clientWidth:Xr(this)}},scrollIntoView:Mi((function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:it(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?ci(this,e):ui(this,e.from,e.to,e.margin)})),setSize:Mi((function(e,t){var r=this,n=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=n(e)),null!=t&&(this.display.wrapper.style.height=n(t)),this.options.lineWrapping&&un(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Pn(r,i,"widget");break}++i})),this.curOp.forceUpdate=!0,ve(this,"refresh",this)})),operation:function(e){return _i(this,e)},startOperation:function(){return ki(this)},endOperation:function(){return Ci(this)},refresh:Mi((function(){var e=this.display.cachedTextHeight;Bn(this),this.curOp.forceUpdate=!0,pn(this),si(this,this.doc.scrollLeft,this.doc.scrollTop),Ui(this.display),(null==e||Math.abs(e-Tn(this.display))>.5||this.options.lineWrapping)&&Ln(this),ve(this,"refresh",this)})),swapDoc:Mi((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),bo(this,e),pn(this),this.display.input.reset(),si(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Dr(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},we(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}function Ys(e,t,r,n,i){var o=t,a=r,s=Ke(e,t.line),c=i&&"rtl"==e.direction?-r:r;function l(){var r=t.line+c;return!(r<e.first||r>=e.first+e.size)&&(t=new it(r,t.ch,t.sticky),s=Ke(e,r))}function u(o){var a;if("codepoint"==n){var u=s.text.charCodeAt(t.ch+(r>0?0:-1));if(isNaN(u))a=null;else{var p=r>0?u>=55296&&u<56320:u>=56320&&u<57343;a=new it(t.line,Math.max(0,Math.min(s.text.length,t.ch+r*(p?2:1))),-r)}}else a=i?Ya(e.cm,s,t,r):Xa(s,t,r);if(null==a){if(o||!l())return!1;t=Va(i,e.cm,s,t.line,c)}else t=a;return!0}if("char"==n||"codepoint"==n)u();else if("column"==n)u(!0);else if("word"==n||"group"==n)for(var p=null,d="group"==n,m=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(r<0)||u(!f);f=!1){var h=s.text.charAt(t.ch)||"\n",g=re(h,m)?"w":d&&"\n"==h?"n":!d||/\s/.test(h)?null:"p";if(!d||f||g||(g="s"),p&&p!=g){r<0&&(r=1,u(),t.sticky="after");break}if(g&&(p=g),r>0&&!u(!f))break}var v=Xo(e,t,o,a,!0);return at(o,v)&&(v.hitSide=!0),v}function Ks(e,t,r,n){var i,o,a=e.doc,s=t.left;if("page"==n){var c=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(c-.5*Tn(e.display),3);i=(r>0?t.bottom:t.top)+r*l}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(;(o=wn(e,s,i)).outside;){if(r<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*r}return o}var Js=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new F,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Zs(e,t){var r=Qr(e,t.line);if(!r||r.hidden)return null;var n=Ke(e.doc,t.line),i=Kr(r,n,t.line),o=de(n,e.doc.direction),a="left";o&&(a=ue(o,t.ch)%2?"right":"left");var s=on(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Qs(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function ec(e,t){return t&&(e.bad=!0),e}function tc(e,t,r,n,i){var o="",a=!1,s=e.doc.lineSeparator(),c=!1;function l(e){return function(t){return t.id==e}}function u(){a&&(o+=s,c&&(o+=s),a=c=!1)}function p(e){e&&(u(),o+=e)}function d(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(r)return void p(r);var o,m=t.getAttribute("cm-marker");if(m){var f=e.findMarks(it(n,0),it(i+1,0),l(+m));return void(f.length&&(o=f[0].find(0))&&p(Je(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var h=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;h&&u();for(var g=0;g<t.childNodes.length;g++)d(t.childNodes[g]);/^(pre|p)$/i.test(t.nodeName)&&(c=!0),h&&(a=!0)}else 3==t.nodeType&&p(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;d(t),t!=r;)t=t.nextSibling,c=!1;return o}function rc(e,t,r){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return ec(e.clipPos(it(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==n)return nc(o,t,r)}}function nc(e,t,r){var n=e.text.firstChild,i=!1;if(!t||!E(n,t))return ec(it(et(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var o=e.rest?Y(e.rest):e.line;return ec(it(et(o),o.text.length),i)}var a=3==t.nodeType?t:null,s=t;for(a||1!=t.childNodes.length||3!=t.firstChild.nodeType||(a=t.firstChild,r&&(r=a.nodeValue.length));s.parentNode!=n;)s=s.parentNode;var c=e.measure,l=c.maps;function u(t,r,n){for(var i=-1;i<(l?l.length:0);i++)for(var o=i<0?c.map:l[i],a=0;a<o.length;a+=3){var s=o[a+2];if(s==t||s==r){var u=et(i<0?e.line:e.rest[i]),p=o[a]+n;return(n<0||s!=t)&&(p=o[a+(n?1:0)]),it(u,p)}}}var p=u(a,s,r);if(p)return ec(p,i);for(var d=s.nextSibling,m=a?a.nodeValue.length-r:0;d;d=d.nextSibling){if(p=u(d,d.firstChild,0))return ec(it(p.line,p.ch-m),i);m+=d.textContent.length}for(var f=s.previousSibling,h=r;f;f=f.previousSibling){if(p=u(f,f.firstChild,-1))return ec(it(p.line,p.ch+h),i);h+=f.textContent.length}}Js.prototype.init=function(e){var t=this,r=this,n=r.cm,i=r.div=e.lineDiv;function o(e){for(var t=e.target;t;t=t.parentNode){if(t==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function a(e){if(o(e)&&!be(n,e)){if(n.somethingSelected())Ns({lineWise:!1,text:n.getSelections()}),"cut"==e.type&&n.replaceSelection("",null,"cut");else{if(!n.options.lineWiseCopyCut)return;var t=Gs(n);Ns({lineWise:!0,text:t.text}),"cut"==e.type&&n.operation((function(){n.setSelections(t.ranges,0,H),n.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var a=Rs.text.join("\n");if(e.clipboardData.setData("Text",a),e.clipboardData.getData("Text")==a)return void e.preventDefault()}var s=Xs(),c=s.firstChild;n.display.lineSpace.insertBefore(s,n.display.lineSpace.firstChild),c.value=Rs.text.join("\n");var l=M();O(c),setTimeout((function(){n.display.lineSpace.removeChild(s),l.focus(),l==i&&r.showPrimarySelection()}),50)}}i.contentEditable=!0,Ws(i,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize),fe(i,"paste",(function(e){!o(e)||be(n,e)||Hs(e,n)||s<=11&&setTimeout(Ei(n,(function(){return t.updateFromDOM()})),20)})),fe(i,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),fe(i,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),fe(i,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),fe(i,"touchstart",(function(){return r.forceCompositionEnd()})),fe(i,"input",(function(){t.composing||t.readFromDOMSoon()})),fe(i,"copy",a),fe(i,"cut",a)},Js.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Js.prototype.prepareSelection=function(){var e=Hn(this.cm,!1);return e.focus=M()==this.div,e},Js.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Js.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Js.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),i=n.from(),o=n.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||o.line<t.display.viewFrom)e.removeAllRanges();else{var a=rc(t,e.anchorNode,e.anchorOffset),s=rc(t,e.focusNode,e.focusOffset);if(!a||a.bad||!s||s.bad||0!=ot(lt(a,s),i)||0!=ot(ct(a,s),o)){var c=t.display.view,l=i.line>=t.display.viewFrom&&Zs(t,i)||{node:c[0].measure.map[2],offset:0},u=o.line<t.display.viewTo&&Zs(t,o);if(!u){var p=c[c.length-1].measure,d=p.maps?p.maps[p.maps.length-1]:p.map;u={node:d[d.length-1],offset:d[d.length-2]-d[d.length-3]}}if(l&&u){var m,f=e.rangeCount&&e.getRangeAt(0);try{m=S(l.node,l.offset,u.offset,u.node)}catch(e){}m&&(!r&&t.state.focused?(e.collapse(l.node,l.offset),m.collapsed||(e.removeAllRanges(),e.addRange(m))):(e.removeAllRanges(),e.addRange(m)),f&&null==e.anchorNode?e.addRange(f):r&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Js.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation((function(){return e.cm.curOp.selectionChanged=!0}))}),20)},Js.prototype.showMultipleSelections=function(e){T(this.cm.display.cursorDiv,e.cursors),T(this.cm.display.selectionDiv,e.selection)},Js.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Js.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return E(this.div,t)},Js.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&M()==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Js.prototype.blur=function(){this.div.blur()},Js.prototype.getField=function(){return this.div},Js.prototype.supportsTouch=function(){return!0},Js.prototype.receivedFocus=function(){var e=this,t=this;function r(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,r))}this.selectionInEditor()?setTimeout((function(){return e.pollSelection()}),20):_i(this.cm,(function(){return t.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,r)},Js.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Js.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(g&&u&&this.cm.display.gutterSpecs.length&&Qs(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var r=rc(t,e.anchorNode,e.anchorOffset),n=rc(t,e.focusNode,e.focusOffset);r&&n&&_i(t,(function(){No(t.doc,ao(r,n),H),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)}))}}},Js.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,r,n=this.cm,i=n.display,o=n.doc.sel.primary(),a=o.from(),s=o.to();if(0==a.ch&&a.line>n.firstLine()&&(a=it(a.line-1,Ke(n.doc,a.line-1).length)),s.ch==Ke(n.doc,s.line).text.length&&s.line<n.lastLine()&&(s=it(s.line+1,0)),a.line<i.viewFrom||s.line>i.viewTo-1)return!1;a.line==i.viewFrom||0==(e=On(n,a.line))?(t=et(i.view[0].line),r=i.view[0].node):(t=et(i.view[e].line),r=i.view[e-1].node.nextSibling);var c,l,u=On(n,s.line);if(u==i.view.length-1?(c=i.viewTo-1,l=i.lineDiv.lastChild):(c=et(i.view[u+1].line)-1,l=i.view[u+1].node.previousSibling),!r)return!1;for(var p=n.doc.splitLines(tc(n,r,l,t,c)),d=Je(n.doc,it(t,0),it(c,Ke(n.doc,c).text.length));p.length>1&&d.length>1;)if(Y(p)==Y(d))p.pop(),d.pop(),c--;else{if(p[0]!=d[0])break;p.shift(),d.shift(),t++}for(var m=0,f=0,h=p[0],g=d[0],v=Math.min(h.length,g.length);m<v&&h.charCodeAt(m)==g.charCodeAt(m);)++m;for(var b=Y(p),y=Y(d),x=Math.min(b.length-(1==p.length?m:0),y.length-(1==d.length?m:0));f<x&&b.charCodeAt(b.length-f-1)==y.charCodeAt(y.length-f-1);)++f;if(1==p.length&&1==d.length&&t==a.line)for(;m&&m>a.ch&&b.charCodeAt(b.length-f-1)==y.charCodeAt(y.length-f-1);)m--,f++;p[p.length-1]=b.slice(0,b.length-f).replace(/^\u200b+/,""),p[0]=p[0].slice(m).replace(/\u200b+$/,"");var w=it(t,m),k=it(c,d.length?Y(d).length-f:0);return p.length>1||p[0]||ot(w,k)?(na(n.doc,p,w,k,"+input"),!0):void 0},Js.prototype.ensurePolled=function(){this.forceCompositionEnd()},Js.prototype.reset=function(){this.forceCompositionEnd()},Js.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Js.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Js.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||_i(this.cm,(function(){return Bn(e.cm)}))},Js.prototype.setUneditable=function(e){e.contentEditable="false"},Js.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Ei(this.cm,qs)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Js.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Js.prototype.onContextMenu=function(){},Js.prototype.resetPosition=function(){},Js.prototype.needsContentAttribute=!0;var ic=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new F,this.hasSelection=!1,this.composing=null};function oc(e,t){if((t=t?P(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var r=M();t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}function n(){e.value=s.getValue()}var i;if(e.form&&(fe(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){n(),o.submit=i,o.submit(),o.submit=a}}catch(e){}}t.finishInit=function(r){r.save=n,r.getTextArea=function(){return e},r.toTextArea=function(){r.toTextArea=isNaN,n(),e.parentNode.removeChild(r.getWrapperElement()),e.style.display="",e.form&&(ge(e.form,"submit",n),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=Bs((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s}function ac(e){e.off=ge,e.on=fe,e.wheelEventPixels=to,e.Doc=ka,e.splitLines=Le,e.countColumn=j,e.findColumn=W,e.isWordChar=te,e.Pass=q,e.signal=ve,e.Line=sr,e.changeEnd=so,e.scrollbarModel=yi,e.Pos=it,e.cmpPos=ot,e.modes=je,e.mimeModes=Fe,e.resolveMode=qe,e.getMode=He,e.modeExtensions=Ue,e.extendMode=Ge,e.copyState=We,e.startState=Ve,e.innerMode=Xe,e.commands=Ka,e.keyMap=Pa,e.keyName=Ha,e.isModifierKey=Na,e.lookupKey=Ra,e.normalizeKeyMap=Fa,e.StringStream=Ye,e.SharedTextMarker=ga,e.TextMarker=fa,e.LineWidget=ua,e.e_preventDefault=ke,e.e_stopPropagation=Ce,e.e_stop=Se,e.addClass=L,e.contains=E,e.rmClass=A,e.keyNames=La}ic.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!be(n,e)){if(n.somethingSelected())Ns({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var t=Gs(n);Ns({lineWise:!0,text:t.text}),"cut"==e.type?n.setSelections(t.ranges,null,H):(r.prevInput="",i.value=t.text.join("\n"),O(i))}"cut"==e.type&&(n.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),h&&(i.style.width="0px"),fe(i,"input",(function(){a&&s>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()})),fe(i,"paste",(function(e){be(n,e)||Hs(e,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())})),fe(i,"cut",o),fe(i,"copy",o),fe(e.scroller,"paste",(function(t){if(!qr(e,t)&&!be(n,t)){if(!i.dispatchEvent)return n.state.pasteIncoming=+new Date,void r.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),fe(e.lineSpace,"selectstart",(function(t){qr(e,t)||ke(t)})),fe(i,"compositionstart",(function(){var e=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}})),fe(i,"compositionend",(function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)}))},ic.prototype.createField=function(e){this.wrapper=Xs(),this.textarea=this.wrapper.firstChild},ic.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},ic.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=Hn(e);if(e.options.moveInputWithCursor){var i=bn(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return n},ic.prototype.showSelection=function(e){var t=this.cm.display;T(t.cursorDiv,e.cursors),T(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ic.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&O(this.textarea),a&&s>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},ic.prototype.getField=function(){return this.textarea},ic.prototype.supportsTouch=function(){return!1},ic.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||M()!=this.textarea))try{this.textarea.focus()}catch(e){}},ic.prototype.blur=function(){this.textarea.blur()},ic.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ic.prototype.receivedFocus=function(){this.slowPoll()},ic.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},ic.prototype.fastPoll=function(){var e=!1,t=this;function r(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,r))}t.pollingFast=!0,t.polling.set(20,r)},ic.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||Ie(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===i||b&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||n||(n="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var c=0,l=Math.min(n.length,i.length);c<l&&n.charCodeAt(c)==i.charCodeAt(c);)++c;return _i(t,(function(){qs(t,i.slice(c),n.length-c,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},ic.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ic.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},ic.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=In(r,e),l=n.scroller.scrollTop;if(o&&!p){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(o)&&Ei(r,No)(r.doc,ao(o),H);var u,d=i.style.cssText,m=t.wrapper.style.cssText,f=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-f.top-5)+"px; left: "+(e.clientX-f.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",c&&(u=window.scrollY),n.input.focus(),c&&window.scrollTo(null,u),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=v,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll),a&&s>=9&&g(),C){Se(e);var h=function(){ge(window,"mouseup",h),setTimeout(v,20)};fe(window,"mouseup",h)}else setTimeout(v,50)}function g(){if(null!=i.selectionStart){var e=r.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,n.selForContextMenu=r.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=m,i.style.cssText=d,a&&s<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=l),null!=i.selectionStart)){(!a||a&&s<9)&&g();var e=0,o=function(){n.selForContextMenu==r.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?Ei(r,Yo)(r):e++<10?n.detectingSelectAll=setTimeout(o,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(o,200)}}},ic.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},ic.prototype.setUneditable=function(){},ic.prototype.needsContentAttribute=!1,Ls(Bs),Vs(Bs);var sc="iter insert remove copy getEditor constructor".split(" ");for(var cc in ka.prototype)ka.prototype.hasOwnProperty(cc)&&R(sc,cc)<0&&(Bs.prototype[cc]=function(e){return function(){return e.apply(this.doc,arguments)}}(ka.prototype[cc]));return we(ka),Bs.inputStyles={textarea:ic,contenteditable:Js},Bs.defineMode=function(e){Bs.defaults.mode||"null"==e||(Bs.defaults.mode=e),Re.apply(this,arguments)},Bs.defineMIME=Ne,Bs.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Bs.defineMIME("text/plain","null"),Bs.defineExtension=function(e,t){Bs.prototype[e]=t},Bs.defineDocExtension=function(e,t){ka.prototype[e]=t},Bs.fromTextArea=oc,ac(Bs),Bs.version="5.65.1",Bs}()}));tc((function(e,t){!function(e){var t=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,r=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,n=/[*+-]\s/;function i(e,r){var n=r.line,i=0,o=0,a=t.exec(e.getLine(n)),s=a[1];do{var c=n+(i+=1),l=e.getLine(c),u=t.exec(l);if(u){var p=u[1],d=parseInt(a[3],10)+i-o,m=parseInt(u[3],10),f=m;if(s!==p||isNaN(m)){if(s.length>p.length)return;if(s.length<p.length&&1===i)return;o+=1}else d===m&&(f=m+1),d>m&&(f=d+1),e.replaceRange(l.replace(t,p+f+u[4]+u[5]),{line:c,ch:0},{line:c,ch:l.length})}}while(u)}e.commands.newlineAndIndentContinueMarkdownList=function(o){if(o.getOption("disableInput"))return e.Pass;for(var a=o.listSelections(),s=[],c=0;c<a.length;c++){var l=a[c].head,u=o.getStateAfter(l.line),p=e.innerMode(o.getMode(),u);if("markdown"!==p.mode.name)return void o.execCommand("newlineAndIndent");var d=!1!==(u=p.state).list,m=0!==u.quote,f=o.getLine(l.line),h=t.exec(f),g=/^\s*$/.test(f.slice(0,l.ch));if(!a[c].empty()||!d&&!m||!h||g)return void o.execCommand("newlineAndIndent");if(r.test(f)){var v=m&&/>\s*$/.test(f),b=!/>\s*$/.test(f);(v||b)&&o.replaceRange("",{line:l.line,ch:0},{line:l.line,ch:l.ch+1}),s[c]="\n"}else{var y=h[1],x=h[5],w=!(n.test(h[2])||h[2].indexOf(">")>=0),k=w?parseInt(h[3],10)+1+h[4]:h[2].replace("x"," ");s[c]="\n"+y+k+x,w&&i(o,l)}}o.replaceSelections(s)}}(DC)})),DC.commands.tabAndIndentMarkdownList=function(e){var t=e.listSelections()[0].head;if(!1!==e.getStateAfter(t.line).list)e.execCommand("indentMore");else if(e.options.indentWithTabs)e.execCommand("insertTab");else{var r=Array(e.options.tabSize+1).join(" ");e.replaceSelection(r)}},DC.commands.shiftTabAndUnindentMarkdownList=function(e){var t=e.listSelections()[0].head;if(!1!==e.getStateAfter(t.line).list)e.execCommand("indentLess");else if(e.options.indentWithTabs)e.execCommand("insertTab");else{var r=Array(e.options.tabSize+1).join(" ");e.replaceSelection(r)}},tc((function(e,t){!function(e){function t(e){var t=e.getWrapperElement();e.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:t.style.width,height:t.style.height},t.style.width="",t.style.height="auto",t.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",e.refresh()}function r(e){var t=e.getWrapperElement();t.className=t.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var r=e.state.fullScreenRestore;t.style.width=r.width,t.style.height=r.height,window.scrollTo(r.scrollLeft,r.scrollTop),e.refresh()}e.defineOption("fullScreen",!1,(function(n,i,o){o==e.Init&&(o=!1),!o!=!i&&(i?t(n):r(n))}))}(DC)}));tc((function(e,t){var r,n,i;n={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},i={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1},(r=DC).defineMode("xml",(function(e,t){var o,a,s=e.indentUnit,c={},l=t.htmlMode?n:i;for(var u in l)c[u]=l[u];for(var u in t)c[u]=t[u];function p(e,t){function r(r){return t.tokenize=r,r(e,t)}var n=e.next();return"<"==n?e.eat("!")?e.eat("[")?e.match("CDATA[")?r(f("atom","]]>")):null:e.match("--")?r(f("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(h(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=f("meta","?>"),"meta"):(o=e.eat("/")?"closeTag":"openTag",t.tokenize=d,"tag bracket"):"&"==n?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function d(e,t){var r=e.next();if(">"==r||"/"==r&&e.eat(">"))return t.tokenize=p,o=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return o="equals",null;if("<"==r){t.tokenize=p,t.state=x,t.tagName=t.tagStart=null;var n=t.tokenize(e,t);return n?n+" tag error":"tag error"}return/[\'\"]/.test(r)?(t.tokenize=m(r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function m(e){var t=function(t,r){for(;!t.eol();)if(t.next()==e){r.tokenize=d;break}return"string"};return t.isInAttribute=!0,t}function f(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=p;break}r.next()}return e}}function h(e){return function(t,r){for(var n;null!=(n=t.next());){if("<"==n)return r.tokenize=h(e+1),r.tokenize(t,r);if(">"==n){if(1==e){r.tokenize=p;break}return r.tokenize=h(e-1),r.tokenize(t,r)}}return"meta"}}function g(e){return e&&e.toLowerCase()}function v(e,t,r){this.prev=e.context,this.tagName=t||"",this.indent=e.indented,this.startOfLine=r,(c.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function b(e){e.context&&(e.context=e.context.prev)}function y(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!c.contextGrabbers.hasOwnProperty(g(r))||!c.contextGrabbers[g(r)].hasOwnProperty(g(t)))return;b(e)}}function x(e,t,r){return"openTag"==e?(r.tagStart=t.column(),w):"closeTag"==e?k:x}function w(e,t,r){return"word"==e?(r.tagName=t.current(),a="tag",S):c.allowMissingTagName&&"endTag"==e?(a="tag bracket",S(e,t,r)):(a="error",w)}function k(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&c.implicitlyClosed.hasOwnProperty(g(r.context.tagName))&&b(r),r.context&&r.context.tagName==n||!1===c.matchClosing?(a="tag",C):(a="tag error",z)}return c.allowMissingTagName&&"endTag"==e?(a="tag bracket",C(e,t,r)):(a="error",z)}function C(e,t,r){return"endTag"!=e?(a="error",C):(b(r),x)}function z(e,t,r){return a="error",C(e,t,r)}function S(e,t,r){if("word"==e)return a="attribute",A;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,i=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||c.autoSelfClosers.hasOwnProperty(g(n))?y(r,n):(y(r,n),r.context=new v(r,n,i==r.indented)),x}return a="error",S}function A(e,t,r){return"equals"==e?D:(c.allowMissing||(a="error"),S(e,t,r))}function D(e,t,r){return"string"==e?T:"word"==e&&c.allowUnquoted?(a="string",S):(a="error",S(e,t,r))}function T(e,t,r){return"string"==e?T:S(e,t,r)}return p.isInText=!0,{startState:function(e){var t={tokenize:p,state:x,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;o=null;var r=t.tokenize(e,t);return(r||o)&&"comment"!=r&&(a=null,t.state=t.state(o||r,e,t),a&&(r="error"==a?r+" error":a)),r},indent:function(e,t,n){var i=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+s;if(i&&i.noIndent)return r.Pass;if(e.tokenize!=d&&e.tokenize!=p)return n?n.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==c.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+s*(c.multilineTagIndentFactor||1);if(c.alignCDATA&&/<!\[CDATA\[/.test(t))return 0;var o=t&&/^<(\/)?([\w_:\.-]*)/.exec(t);if(o&&o[1])for(;i;){if(i.tagName==o[2]){i=i.prev;break}if(!c.implicitlyClosed.hasOwnProperty(g(i.tagName)))break;i=i.prev}else if(o)for(;i;){var a=c.contextGrabbers[g(i.tagName)];if(!a||!a.hasOwnProperty(g(o[2])))break;i=i.prev}for(;i&&i.prev&&!i.startOfLine;)i=i.prev;return i?i.indent+s:e.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:c.htmlMode?"html":"xml",helperType:c.htmlMode?"html":"xml",skipAttribute:function(e){e.state==D&&(e.state=S)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],r=e.context;r;r=r.prev)t.push(r.tagName);return t.reverse()}}})),r.defineMIME("text/xml","xml"),r.defineMIME("application/xml","xml"),r.mimeModes.hasOwnProperty("text/html")||r.defineMIME("text/html",{name:"xml",htmlMode:!0})})),tc((function(e,t){!function(e){e.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy","cbl"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded JavaScript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"],alias:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var t=0;t<e.modeInfo.length;t++){var r=e.modeInfo[t];r.mimes&&(r.mime=r.mimes[0])}e.findModeByMIME=function(t){t=t.toLowerCase();for(var r=0;r<e.modeInfo.length;r++){var n=e.modeInfo[r];if(n.mime==t)return n;if(n.mimes)for(var i=0;i<n.mimes.length;i++)if(n.mimes[i]==t)return n}return/\+xml$/.test(t)?e.findModeByMIME("application/xml"):/\+json$/.test(t)?e.findModeByMIME("application/json"):void 0},e.findModeByExtension=function(t){t=t.toLowerCase();for(var r=0;r<e.modeInfo.length;r++){var n=e.modeInfo[r];if(n.ext)for(var i=0;i<n.ext.length;i++)if(n.ext[i]==t)return n}},e.findModeByFileName=function(t){for(var r=0;r<e.modeInfo.length;r++){var n=e.modeInfo[r];if(n.file&&n.file.test(t))return n}var i=t.lastIndexOf("."),o=i>-1&&t.substring(i+1,t.length);if(o)return e.findModeByExtension(o)},e.findModeByName=function(t){t=t.toLowerCase();for(var r=0;r<e.modeInfo.length;r++){var n=e.modeInfo[r];if(n.name.toLowerCase()==t)return n;if(n.alias)for(var i=0;i<n.alias.length;i++)if(n.alias[i].toLowerCase()==t)return n}}}(DC)})),tc((function(e,t){var r;(r=DC).defineMode("markdown",(function(e,t){var n=r.getMode(e,"text/html"),i="null"==n.name;function o(t){if(r.findModeByName){var n=r.findModeByName(t);n&&(t=n.mime||n.mimes[0])}var i=r.getMode(e,t);return"null"==i.name?null:i}void 0===t.highlightFormatting&&(t.highlightFormatting=!1),void 0===t.maxBlockquoteDepth&&(t.maxBlockquoteDepth=0),void 0===t.taskLists&&(t.taskLists=!1),void 0===t.strikethrough&&(t.strikethrough=!1),void 0===t.emoji&&(t.emoji=!1),void 0===t.fencedCodeBlockHighlighting&&(t.fencedCodeBlockHighlighting=!0),void 0===t.fencedCodeBlockDefaultMode&&(t.fencedCodeBlockDefaultMode="text/plain"),void 0===t.xml&&(t.xml=!0),void 0===t.tokenTypeOverrides&&(t.tokenTypeOverrides={});var a={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var s in a)a.hasOwnProperty(s)&&t.tokenTypeOverrides[s]&&(a[s]=t.tokenTypeOverrides[s]);var c=/^([*\-_])(?:\s*\1){2,}\s*$/,l=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,u=/^\[(x| )\](?=\s)/i,p=t.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,d=/^ {0,3}(?:\={1,}|-{2,})\s*$/,m=/^[^#!\[\]*_\\<>` "'(~:]+/,f=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,h=/^\s*\[[^\]]+?\]:.*$/,g=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,v=" ";function b(e,t,r){return t.f=t.inline=r,r(e,t)}function y(e,t,r){return t.f=t.block=r,r(e,t)}function x(e){return!e||!/\S/.test(e.string)}function w(e){if(e.linkTitle=!1,e.linkHref=!1,e.linkText=!1,e.em=!1,e.strong=!1,e.strikethrough=!1,e.quote=0,e.indentedCode=!1,e.f==C){var t=i;if(!t){var o=r.innerMode(n,e.htmlState);t="xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText}t&&(e.f=D,e.block=k,e.htmlState=null)}return e.trailingSpace=0,e.trailingSpaceNewLine=!1,e.prevLine=e.thisLine,e.thisLine={stream:null},null}function k(e,n){var i=e.column()===n.indentation,s=x(n.prevLine.stream),m=n.indentedCode,g=n.prevLine.hr,v=!1!==n.list,y=(n.listStack[n.listStack.length-1]||0)+3;n.indentedCode=!1;var w=n.indentation;if(null===n.indentationDiff&&(n.indentationDiff=n.indentation,v)){for(n.list=null;w<n.listStack[n.listStack.length-1];)n.listStack.pop(),n.listStack.length?n.indentation=n.listStack[n.listStack.length-1]:n.list=!1;!1!==n.list&&(n.indentationDiff=w-n.listStack[n.listStack.length-1])}var k=!(s||g||n.prevLine.header||v&&m||n.prevLine.fencedCodeEnd),C=(!1===n.list||g||s)&&n.indentation<=y&&e.match(c),A=null;if(n.indentationDiff>=4&&(m||n.prevLine.fencedCodeEnd||n.prevLine.header||s))return e.skipToEnd(),n.indentedCode=!0,a.code;if(e.eatSpace())return null;if(i&&n.indentation<=y&&(A=e.match(p))&&A[1].length<=6)return n.quote=0,n.header=A[1].length,n.thisLine.header=!0,t.highlightFormatting&&(n.formatting="header"),n.f=n.inline,S(n);if(n.indentation<=y&&e.eat(">"))return n.quote=i?1:n.quote+1,t.highlightFormatting&&(n.formatting="quote"),e.eatSpace(),S(n);if(!C&&!n.setext&&i&&n.indentation<=y&&(A=e.match(l))){var D=A[1]?"ol":"ul";return n.indentation=w+e.current().length,n.list=!0,n.quote=0,n.listStack.push(n.indentation),n.em=!1,n.strong=!1,n.code=!1,n.strikethrough=!1,t.taskLists&&e.match(u,!1)&&(n.taskList=!0),n.f=n.inline,t.highlightFormatting&&(n.formatting=["list","list-"+D]),S(n)}return i&&n.indentation<=y&&(A=e.match(f,!0))?(n.quote=0,n.fencedEndRE=new RegExp(A[1]+"+ *$"),n.localMode=t.fencedCodeBlockHighlighting&&o(A[2]||t.fencedCodeBlockDefaultMode),n.localMode&&(n.localState=r.startState(n.localMode)),n.f=n.block=z,t.highlightFormatting&&(n.formatting="code-block"),n.code=-1,S(n)):n.setext||!(k&&v||n.quote||!1!==n.list||n.code||C||h.test(e.string))&&(A=e.lookAhead(1))&&(A=A.match(d))?(n.setext?(n.header=n.setext,n.setext=0,e.skipToEnd(),t.highlightFormatting&&(n.formatting="header")):(n.header="="==A[0].charAt(0)?1:2,n.setext=n.header),n.thisLine.header=!0,n.f=n.inline,S(n)):C?(e.skipToEnd(),n.hr=!0,n.thisLine.hr=!0,a.hr):"["===e.peek()?b(e,n,M):b(e,n,n.inline)}function C(e,t){var o=n.token(e,t.htmlState);if(!i){var a=r.innerMode(n,t.htmlState);("xml"==a.mode.name&&null===a.state.tagStart&&!a.state.context&&a.state.tokenize.isInText||t.md_inside&&e.current().indexOf(">")>-1)&&(t.f=D,t.block=k,t.htmlState=null)}return o}function z(e,r){var n,i=r.listStack[r.listStack.length-1]||0,o=r.indentation<i,s=i+3;return r.fencedEndRE&&r.indentation<=s&&(o||e.match(r.fencedEndRE))?(t.highlightFormatting&&(r.formatting="code-block"),o||(n=S(r)),r.localMode=r.localState=null,r.block=k,r.f=D,r.fencedEndRE=null,r.code=0,r.thisLine.fencedCodeEnd=!0,o?y(e,r,r.block):n):r.localMode?r.localMode.token(e,r.localState):(e.skipToEnd(),a.code)}function S(e){var r=[];if(e.formatting){r.push(a.formatting),"string"==typeof e.formatting&&(e.formatting=[e.formatting]);for(var n=0;n<e.formatting.length;n++)r.push(a.formatting+"-"+e.formatting[n]),"header"===e.formatting[n]&&r.push(a.formatting+"-"+e.formatting[n]+"-"+e.header),"quote"===e.formatting[n]&&(!t.maxBlockquoteDepth||t.maxBlockquoteDepth>=e.quote?r.push(a.formatting+"-"+e.formatting[n]+"-"+e.quote):r.push("error"))}if(e.taskOpen)return r.push("meta"),r.length?r.join(" "):null;if(e.taskClosed)return r.push("property"),r.length?r.join(" "):null;if(e.linkHref?r.push(a.linkHref,"url"):(e.strong&&r.push(a.strong),e.em&&r.push(a.em),e.strikethrough&&r.push(a.strikethrough),e.emoji&&r.push(a.emoji),e.linkText&&r.push(a.linkText),e.code&&r.push(a.code),e.image&&r.push(a.image),e.imageAltText&&r.push(a.imageAltText,"link"),e.imageMarker&&r.push(a.imageMarker)),e.header&&r.push(a.header,a.header+"-"+e.header),e.quote&&(r.push(a.quote),!t.maxBlockquoteDepth||t.maxBlockquoteDepth>=e.quote?r.push(a.quote+"-"+e.quote):r.push(a.quote+"-"+t.maxBlockquoteDepth)),!1!==e.list){var i=(e.listStack.length-1)%3;i?1===i?r.push(a.list2):r.push(a.list3):r.push(a.list1)}return e.trailingSpaceNewLine?r.push("trailing-space-new-line"):e.trailingSpace&&r.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),r.length?r.join(" "):null}function A(e,t){if(e.match(m,!0))return S(t)}function D(e,i){var o=i.text(e,i);if(void 0!==o)return o;if(i.list)return i.list=null,S(i);if(i.taskList)return" "===e.match(u,!0)[1]?i.taskOpen=!0:i.taskClosed=!0,t.highlightFormatting&&(i.formatting="task"),i.taskList=!1,S(i);if(i.taskOpen=!1,i.taskClosed=!1,i.header&&e.match(/^#+$/,!0))return t.highlightFormatting&&(i.formatting="header"),S(i);var s=e.next();if(i.linkTitle){i.linkTitle=!1;var c=s;"("===s&&(c=")");var l="^\\s*(?:[^"+(c=(c+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+c;if(e.match(new RegExp(l),!0))return a.linkHref}if("`"===s){var p=i.formatting;t.highlightFormatting&&(i.formatting="code"),e.eatWhile("`");var d=e.current().length;if(0!=i.code||i.quote&&1!=d){if(d==i.code){var m=S(i);return i.code=0,m}return i.formatting=p,S(i)}return i.code=d,S(i)}if(i.code)return S(i);if("\\"===s&&(e.next(),t.highlightFormatting)){var f=S(i),h=a.formatting+"-escape";return f?f+" "+h:h}if("!"===s&&e.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return i.imageMarker=!0,i.image=!0,t.highlightFormatting&&(i.formatting="image"),S(i);if("["===s&&i.imageMarker&&e.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return i.imageMarker=!1,i.imageAltText=!0,t.highlightFormatting&&(i.formatting="image"),S(i);if("]"===s&&i.imageAltText){t.highlightFormatting&&(i.formatting="image");var f=S(i);return i.imageAltText=!1,i.image=!1,i.inline=i.f=$,f}if("["===s&&!i.image)return i.linkText&&e.match(/^.*?\]/)||(i.linkText=!0,t.highlightFormatting&&(i.formatting="link")),S(i);if("]"===s&&i.linkText){t.highlightFormatting&&(i.formatting="link");var f=S(i);return i.linkText=!1,i.inline=i.f=e.match(/\(.*?\)| ?\[.*?\]/,!1)?$:D,f}if("<"===s&&e.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=T,t.highlightFormatting&&(i.formatting="link"),(f=S(i))?f+=" ":f="",f+a.linkInline;if("<"===s&&e.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=T,t.highlightFormatting&&(i.formatting="link"),(f=S(i))?f+=" ":f="",f+a.linkEmail;if(t.xml&&"<"===s&&e.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var v=e.string.indexOf(">",e.pos);if(-1!=v){var b=e.string.substring(e.start,v);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(b)&&(i.md_inside=!0)}return e.backUp(1),i.htmlState=r.startState(n),y(e,i,C)}if(t.xml&&"<"===s&&e.match(/^\/\w*?>/))return i.md_inside=!1,"tag";if("*"===s||"_"===s){for(var x=1,w=1==e.pos?" ":e.string.charAt(e.pos-2);x<3&&e.eat(s);)x++;var k=e.peek()||" ",z=!/\s/.test(k)&&(!g.test(k)||/\s/.test(w)||g.test(w)),A=!/\s/.test(w)&&(!g.test(w)||/\s/.test(k)||g.test(k)),_=null,E=null;if(x%2&&(i.em||!z||"*"!==s&&A&&!g.test(w)?i.em!=s||!A||"*"!==s&&z&&!g.test(k)||(_=!1):_=!0),x>1&&(i.strong||!z||"*"!==s&&A&&!g.test(w)?i.strong!=s||!A||"*"!==s&&z&&!g.test(k)||(E=!1):E=!0),null!=E||null!=_)return t.highlightFormatting&&(i.formatting=null==_?"strong":null==E?"em":"strong em"),!0===_&&(i.em=s),!0===E&&(i.strong=s),m=S(i),!1===_&&(i.em=!1),!1===E&&(i.strong=!1),m}else if(" "===s&&(e.eat("*")||e.eat("_"))){if(" "===e.peek())return S(i);e.backUp(1)}if(t.strikethrough)if("~"===s&&e.eatWhile(s)){if(i.strikethrough)return t.highlightFormatting&&(i.formatting="strikethrough"),m=S(i),i.strikethrough=!1,m;if(e.match(/^[^\s]/,!1))return i.strikethrough=!0,t.highlightFormatting&&(i.formatting="strikethrough"),S(i)}else if(" "===s&&e.match("~~",!0)){if(" "===e.peek())return S(i);e.backUp(2)}if(t.emoji&&":"===s&&e.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){i.emoji=!0,t.highlightFormatting&&(i.formatting="emoji");var M=S(i);return i.emoji=!1,M}return" "===s&&(e.match(/^ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),S(i)}function T(e,r){if(">"===e.next()){r.f=r.inline=D,t.highlightFormatting&&(r.formatting="link");var n=S(r);return n?n+=" ":n="",n+a.linkInline}return e.match(/^[^>]+/,!0),a.linkInline}function $(e,r){if(e.eatSpace())return null;var n=e.next();return"("===n||"["===n?(r.f=r.inline=E("("===n?")":"]"),t.highlightFormatting&&(r.formatting="link-string"),r.linkHref=!0,S(r)):"error"}var _={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function E(e){return function(r,n){if(r.next()===e){n.f=n.inline=D,t.highlightFormatting&&(n.formatting="link-string");var i=S(n);return n.linkHref=!1,i}return r.match(_[e]),n.linkHref=!0,S(n)}}function M(e,r){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(r.f=L,e.next(),t.highlightFormatting&&(r.formatting="link"),r.linkText=!0,S(r)):b(e,r,D)}function L(e,r){if(e.match("]:",!0)){r.f=r.inline=I,t.highlightFormatting&&(r.formatting="link");var n=S(r);return r.linkText=!1,n}return e.match(/^([^\]\\]|\\.)+/,!0),a.linkText}function I(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),t.f=t.inline=D,a.linkHref+" url")}var O={startState:function(){return{f:k,prevLine:{stream:null},thisLine:{stream:null},block:k,htmlState:null,indentation:0,inline:D,text:A,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(e){return{f:e.f,prevLine:e.prevLine,thisLine:e.thisLine,block:e.block,htmlState:e.htmlState&&r.copyState(n,e.htmlState),indentation:e.indentation,localMode:e.localMode,localState:e.localMode?r.copyState(e.localMode,e.localState):null,inline:e.inline,text:e.text,formatting:!1,linkText:e.linkText,linkTitle:e.linkTitle,linkHref:e.linkHref,code:e.code,em:e.em,strong:e.strong,strikethrough:e.strikethrough,emoji:e.emoji,header:e.header,setext:e.setext,hr:e.hr,taskList:e.taskList,list:e.list,listStack:e.listStack.slice(0),quote:e.quote,indentedCode:e.indentedCode,trailingSpace:e.trailingSpace,trailingSpaceNewLine:e.trailingSpaceNewLine,md_inside:e.md_inside,fencedEndRE:e.fencedEndRE}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine.stream){if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0))return w(t),null;if(t.prevLine=t.thisLine,t.thisLine={stream:e},t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,!t.localState&&(t.f=t.block,t.f!=C)){var r=e.match(/^\s*/,!0)[0].replace(/\t/g,v).length;if(t.indentation=r,t.indentationDiff=null,r>0)return null}}return t.f(e,t)},innerMode:function(e){return e.block==C?{state:e.htmlState,mode:n}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:O}},indent:function(e,t,i){return e.block==C&&n.indent?n.indent(e.htmlState,t,i):e.localState&&e.localMode.indent?e.localMode.indent(e.localState,t,i):r.Pass},blankLine:w,getType:S,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return O}),"xml"),r.defineMIME("text/markdown","markdown"),r.defineMIME("text/x-markdown","markdown")})),tc((function(e,t){var r;(r=DC).overlayMode=function(e,t,n){return{startState:function(){return{base:r.startState(e),overlay:r.startState(t),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(n){return{base:r.copyState(e,n.base),overlay:r.copyState(t,n.overlay),basePos:n.basePos,baseCur:null,overlayPos:n.overlayPos,overlayCur:null}},token:function(r,i){return(r!=i.streamSeen||Math.min(i.basePos,i.overlayPos)<r.start)&&(i.streamSeen=r,i.basePos=i.overlayPos=r.start),r.start==i.basePos&&(i.baseCur=e.token(r,i.base),i.basePos=r.pos),r.start==i.overlayPos&&(r.pos=r.start,i.overlayCur=t.token(r,i.overlay),i.overlayPos=r.pos),r.pos=Math.min(i.basePos,i.overlayPos),null==i.overlayCur?i.baseCur:null!=i.baseCur&&i.overlay.combineTokens||n&&null==i.overlay.combineTokens?i.baseCur+" "+i.overlayCur:i.overlayCur},indent:e.indent&&function(t,r,n){return e.indent(t.base,r,n)},electricChars:e.electricChars,innerMode:function(t){return{state:t.base,mode:e}},blankLine:function(r){var i,o;return e.blankLine&&(i=e.blankLine(r.base)),t.blankLine&&(o=t.blankLine(r.overlay)),null==o?i:n&&null!=i?i+" "+o:o}}}}));tc((function(e,t){!function(e){function t(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function r(e){t(e);var r=e.state.placeholder=document.createElement("pre");r.style.cssText="height: 0; overflow: visible",r.style.direction=e.getOption("direction"),r.className="CodeMirror-placeholder CodeMirror-line-like";var n=e.getOption("placeholder");"string"==typeof n&&(n=document.createTextNode(n)),r.appendChild(n),e.display.lineSpace.insertBefore(r,e.display.lineSpace.firstChild)}function n(e){setTimeout((function(){var n=!1;if(1==e.lineCount()){var i=e.getInputField();n="TEXTAREA"==i.nodeName?!e.getLine(0).length:!/[^\u200b]/.test(i.querySelector(".CodeMirror-line").textContent)}n?r(e):t(e)}),20)}function i(e){a(e)&&r(e)}function o(e){var n=e.getWrapperElement(),i=a(e);n.className=n.className.replace(" CodeMirror-empty","")+(i?" CodeMirror-empty":""),i?r(e):t(e)}function a(e){return 1===e.lineCount()&&""===e.getLine(0)}e.defineOption("placeholder","",(function(r,a,s){var c=s&&s!=e.Init;if(a&&!c)r.on("blur",i),r.on("change",o),r.on("swapDoc",o),e.on(r.getInputField(),"compositionupdate",r.state.placeholderCompose=function(){n(r)}),o(r);else if(!a&&c){r.off("blur",i),r.off("change",o),r.off("swapDoc",o),e.off(r.getInputField(),"compositionupdate",r.state.placeholderCompose),t(r);var l=r.getWrapperElement();l.className=l.className.replace(" CodeMirror-empty","")}a&&!r.hasFocus()&&i(r)}))}(DC)})),tc((function(e,t){!function(e){function t(t,n){function i(){t.display.wrapper.offsetHeight?(r(t,n),t.display.lastWrapHeight!=t.display.wrapper.clientHeight&&t.refresh()):n.timeout=setTimeout(i,n.delay)}n.timeout=setTimeout(i,n.delay),n.hurry=function(){clearTimeout(n.timeout),n.timeout=setTimeout(i,50)},e.on(window,"mouseup",n.hurry),e.on(window,"keyup",n.hurry)}function r(t,r){clearTimeout(r.timeout),e.off(window,"mouseup",r.hurry),e.off(window,"keyup",r.hurry)}e.defineOption("autoRefresh",!1,(function(e,n){e.state.autoRefresh&&(r(e,e.state.autoRefresh),e.state.autoRefresh=null),n&&0==e.display.wrapper.offsetHeight&&t(e,e.state.autoRefresh={delay:n.delay||250})}))}(DC)})),tc((function(e,t){!function(e){function t(e){e.state.markedSelection&&e.operation((function(){l(e)}))}function r(e){e.state.markedSelection&&e.state.markedSelection.length&&e.operation((function(){s(e)}))}e.defineOption("styleSelectedText",!1,(function(n,i,o){var a=o&&o!=e.Init;i&&!a?(n.state.markedSelection=[],n.state.markedSelectionStyle="string"==typeof i?i:"CodeMirror-selectedtext",c(n),n.on("cursorActivity",t),n.on("change",r)):!i&&a&&(n.off("cursorActivity",t),n.off("change",r),s(n),n.state.markedSelection=n.state.markedSelectionStyle=null)}));var n=8,i=e.Pos,o=e.cmpPos;function a(e,t,r,a){if(0!=o(t,r))for(var s=e.state.markedSelection,c=e.state.markedSelectionStyle,l=t.line;;){var u=l==t.line?t:i(l,0),p=l+n,d=p>=r.line,m=d?r:i(p,0),f=e.markText(u,m,{className:c});if(null==a?s.push(f):s.splice(a++,0,f),d)break;l=p}}function s(e){for(var t=e.state.markedSelection,r=0;r<t.length;++r)t[r].clear();t.length=0}function c(e){s(e);for(var t=e.listSelections(),r=0;r<t.length;r++)a(e,t[r].from(),t[r].to())}function l(e){if(!e.somethingSelected())return s(e);if(e.listSelections().length>1)return c(e);var t=e.getCursor("start"),r=e.getCursor("end"),i=e.state.markedSelection;if(!i.length)return a(e,t,r);var l=i[0].find(),u=i[i.length-1].find();if(!l||!u||r.line-t.line<=n||o(t,u.to)>=0||o(r,l.from)<=0)return c(e);for(;o(t,l.from)>0;)i.shift().clear(),l=i[0].find();for(o(t,l.from)<0&&(l.to.line-t.line<n?(i.shift().clear(),a(e,t,l.to,0)):a(e,t,l.from,0));o(r,u.to)<0;)i.pop().clear(),u=i[i.length-1].find();o(r,u.to)>0&&(r.line-u.from.line<n?(i.pop().clear(),a(e,u.from,r)):a(e,u.to,r))}}(DC)})),tc((function(e,t){!function(e){var t,r,n=e.Pos;function i(e){var t=e.flags;return null!=t?t:(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}function o(e,t){for(var r=i(e),n=r,o=0;o<t.length;o++)-1==n.indexOf(t.charAt(o))&&(n+=t.charAt(o));return r==n?e:new RegExp(e.source,n)}function a(e){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source)}function s(e,t,r){t=o(t,"g");for(var i=r.line,a=r.ch,s=e.lastLine();i<=s;i++,a=0){t.lastIndex=a;var c=e.getLine(i),l=t.exec(c);if(l)return{from:n(i,l.index),to:n(i,l.index+l[0].length),match:l}}}function c(e,t,r){if(!a(t))return s(e,t,r);t=o(t,"gm");for(var i,c=1,l=r.line,u=e.lastLine();l<=u;){for(var p=0;p<c&&!(l>u);p++){var d=e.getLine(l++);i=null==i?d:i+"\n"+d}c*=2,t.lastIndex=r.ch;var m=t.exec(i);if(m){var f=i.slice(0,m.index).split("\n"),h=m[0].split("\n"),g=r.line+f.length-1,v=f[f.length-1].length;return{from:n(g,v),to:n(g+h.length-1,1==h.length?v+h[0].length:h[h.length-1].length),match:m}}}}function l(e,t,r){for(var n,i=0;i<=e.length;){t.lastIndex=i;var o=t.exec(e);if(!o)break;var a=o.index+o[0].length;if(a>e.length-r)break;(!n||a>n.index+n[0].length)&&(n=o),i=o.index+1}return n}function u(e,t,r){t=o(t,"g");for(var i=r.line,a=r.ch,s=e.firstLine();i>=s;i--,a=-1){var c=e.getLine(i),u=l(c,t,a<0?0:c.length-a);if(u)return{from:n(i,u.index),to:n(i,u.index+u[0].length),match:u}}}function p(e,t,r){if(!a(t))return u(e,t,r);t=o(t,"gm");for(var i,s=1,c=e.getLine(r.line).length-r.ch,p=r.line,d=e.firstLine();p>=d;){for(var m=0;m<s&&p>=d;m++){var f=e.getLine(p--);i=null==i?f:f+"\n"+i}s*=2;var h=l(i,t,c);if(h){var g=i.slice(0,h.index).split("\n"),v=h[0].split("\n"),b=p+g.length,y=g[g.length-1].length;return{from:n(b,y),to:n(b+v.length-1,1==v.length?y+v[0].length:v[v.length-1].length),match:h}}}}function d(e,t,r,n){if(e.length==t.length)return r;for(var i=0,o=r+Math.max(0,e.length-t.length);;){if(i==o)return i;var a=i+o>>1,s=n(e.slice(0,a)).length;if(s==r)return a;s>r?o=a:i=a+1}}function m(e,i,o,a){if(!i.length)return null;var s=a?t:r,c=s(i).split(/\r|\n\r?/);e:for(var l=o.line,u=o.ch,p=e.lastLine()+1-c.length;l<=p;l++,u=0){var m=e.getLine(l).slice(u),f=s(m);if(1==c.length){var h=f.indexOf(c[0]);if(-1==h)continue e;return o=d(m,f,h,s)+u,{from:n(l,d(m,f,h,s)+u),to:n(l,d(m,f,h+c[0].length,s)+u)}}var g=f.length-c[0].length;if(f.slice(g)==c[0]){for(var v=1;v<c.length-1;v++)if(s(e.getLine(l+v))!=c[v])continue e;var b=e.getLine(l+c.length-1),y=s(b),x=c[c.length-1];if(y.slice(0,x.length)==x)return{from:n(l,d(m,f,g,s)+u),to:n(l+c.length-1,d(b,y,x.length,s))}}}}function f(e,i,o,a){if(!i.length)return null;var s=a?t:r,c=s(i).split(/\r|\n\r?/);e:for(var l=o.line,u=o.ch,p=e.firstLine()-1+c.length;l>=p;l--,u=-1){var m=e.getLine(l);u>-1&&(m=m.slice(0,u));var f=s(m);if(1==c.length){var h=f.lastIndexOf(c[0]);if(-1==h)continue e;return{from:n(l,d(m,f,h,s)),to:n(l,d(m,f,h+c[0].length,s))}}var g=c[c.length-1];if(f.slice(0,g.length)==g){var v=1;for(o=l-c.length+1;v<c.length-1;v++)if(s(e.getLine(o+v))!=c[v])continue e;var b=e.getLine(l+1-c.length),y=s(b);if(y.slice(y.length-c[0].length)==c[0])return{from:n(l+1-c.length,d(b,y,b.length-c[0].length,s)),to:n(l,d(m,f,g.length,s))}}}}function h(e,t,r,i){var a;this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=e,r=r?e.clipPos(r):n(0,0),this.pos={from:r,to:r},"object"==typeof i?a=i.caseFold:(a=i,i=null),"string"==typeof t?(null==a&&(a=!1),this.matches=function(r,n){return(r?f:m)(e,t,n,a)}):(t=o(t,"gm"),i&&!1===i.multiline?this.matches=function(r,n){return(r?u:s)(e,t,n)}:this.matches=function(r,n){return(r?p:c)(e,t,n)})}String.prototype.normalize?(t=function(e){return e.normalize("NFD").toLowerCase()},r=function(e){return e.normalize("NFD")}):(t=function(e){return e.toLowerCase()},r=function(e){return e}),h.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(t){var r=this.doc.clipPos(t?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(r=n(r.line,r.ch),t?(r.ch--,r.ch<0&&(r.line--,r.ch=(this.doc.getLine(r.line)||"").length)):(r.ch++,r.ch>(this.doc.getLine(r.line)||"").length&&(r.ch=0,r.line++)),0!=e.cmpPos(r,this.doc.clipPos(r))))return this.atOccurrence=!1;var i=this.matches(t,r);if(this.afterEmptyMatch=i&&0==e.cmpPos(i.from,i.to),i)return this.pos=i,this.atOccurrence=!0,this.pos.match||!0;var o=n(t?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:o,to:o},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(t,r){if(this.atOccurrence){var i=e.splitLines(t);this.doc.replaceRange(i,this.pos.from,this.pos.to,r),this.pos.to=n(this.pos.from.line+i.length-1,i[i.length-1].length+(1==i.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",(function(e,t,r){return new h(this.doc,e,t,r)})),e.defineDocExtension("getSearchCursor",(function(e,t,r){return new h(this,e,t,r)})),e.defineExtension("selectMatches",(function(t,r){for(var n=[],i=this.getSearchCursor(t,this.getCursor("from"),r);i.findNext()&&!(e.cmpPos(i.to(),this.getCursor("to"))>0);)n.push({anchor:i.from(),head:i.to()});n.length&&this.setSelections(n,0)}))}(DC)})),tc((function(e,t){var r,n;n=/^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i,(r=DC).defineMode("gfm",(function(e,t){var i=0;function o(e){return e.code=!1,null}var a={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(e){return{code:e.code,codeBlock:e.codeBlock,ateSpace:e.ateSpace}},token:function(e,r){if(r.combineTokens=null,r.codeBlock)return e.match(/^```+/)?(r.codeBlock=!1,null):(e.skipToEnd(),null);if(e.sol()&&(r.code=!1),e.sol()&&e.match(/^```+/))return e.skipToEnd(),r.codeBlock=!0,null;if("`"===e.peek()){e.next();var o=e.pos;e.eatWhile("`");var a=1+e.pos-o;return r.code?a===i&&(r.code=!1):(i=a,r.code=!0),null}if(r.code)return e.next(),null;if(e.eatSpace())return r.ateSpace=!0,null;if((e.sol()||r.ateSpace)&&(r.ateSpace=!1,!1!==t.gitHubSpice)){if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/))return r.combineTokens=!0,"link";if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return r.combineTokens=!0,"link"}return e.match(n)&&"]("!=e.string.slice(e.start-2,e.start)&&(0==e.start||/\W/.test(e.string.charAt(e.start-1)))?(r.combineTokens=!0,"link"):(e.next(),null)},blankLine:o},s={taskLists:!0,strikethrough:!0,emoji:!0};for(var c in t)s[c]=t[c];return s.name="markdown",r.overlayMode(r.getMode(e,s),a)}),"markdown"),r.defineMIME("text/x-gfm","gfm")}));var TC=tc((function(t){var r;(r=function(e,t,r,n){n=n||{},this.dictionary=null,this.rules={},this.dictionaryTable={},this.compoundRules=[],this.compoundRuleCodes={},this.replacementTable=[],this.flags=n.flags||{},this.memoized={},this.loaded=!1;var i,o,a,s,c,l=this;function u(e,t){var r=l._readFile(e,null,n.asyncLoad);n.asyncLoad?r.then((function(e){t(e)})):t(r)}function p(e){t=e,r&&m()}function d(e){r=e,t&&m()}function m(){for(l.rules=l._parseAFF(t),l.compoundRuleCodes={},o=0,s=l.compoundRules.length;o<s;o++){var e=l.compoundRules[o];for(a=0,c=e.length;a<c;a++)l.compoundRuleCodes[e[a]]=[]}for(o in"ONLYINCOMPOUND"in l.flags&&(l.compoundRuleCodes[l.flags.ONLYINCOMPOUND]=[]),l.dictionaryTable=l._parseDIC(r),l.compoundRuleCodes)0===l.compoundRuleCodes[o].length&&delete l.compoundRuleCodes[o];for(o=0,s=l.compoundRules.length;o<s;o++){var i=l.compoundRules[o],u="";for(a=0,c=i.length;a<c;a++){var p=i[a];p in l.compoundRuleCodes?u+="("+l.compoundRuleCodes[p].join("|")+")":u+=p}l.compoundRules[o]=new RegExp(u,"i")}l.loaded=!0,n.asyncLoad&&n.loadedCallback&&n.loadedCallback(l)}return e&&(l.dictionary=e,t&&r?m():"undefined"!=typeof window&&"chrome"in window&&"extension"in window.chrome&&"getURL"in window.chrome.extension?(i=n.dictionaryPath?n.dictionaryPath:"typo/dictionaries",t||u(chrome.extension.getURL(i+"/"+e+"/"+e+".aff"),p),r||u(chrome.extension.getURL(i+"/"+e+"/"+e+".dic"),d)):(i=n.dictionaryPath?n.dictionaryPath:"undefined"!=typeof __dirname?__dirname+"/dictionaries":"./dictionaries",t||u(i+"/"+e+"/"+e+".aff",p),r||u(i+"/"+e+"/"+e+".dic",d))),this}).prototype={load:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);return this},_readFile:function(t,r,n){if(r=r||"utf8","undefined"!=typeof XMLHttpRequest){var i,o=new XMLHttpRequest;return o.open("GET",t,n),n&&(i=new Promise((function(e,t){o.onload=function(){200===o.status?e(o.responseText):t(o.statusText)},o.onerror=function(){t(o.statusText)}}))),o.overrideMimeType&&o.overrideMimeType("text/plain; charset="+r),o.send(null),n?i:o.responseText}var a=e;try{if(a.existsSync(t))return a.readFileSync(t,r);console.log("Path "+t+" does not exist.")}catch(e){return console.log(e),""}},_parseAFF:function(e){var t,r,n,i,o,a,s,c={},l=e.split(/\r?\n/);for(i=0,a=l.length;i<a;i++)if(t=(t=this._removeAffixComments(l[i])).trim()){var u=t.split(/\s+/),p=u[0];if("PFX"==p||"SFX"==p){var d=u[1],m=u[2],f=[];for(o=i+1,s=i+1+(r=parseInt(u[3],10));o<s;o++){var h=(n=l[o].split(/\s+/))[2],g=n[3].split("/"),v=g[0];"0"===v&&(v="");var b=this.parseRuleCodes(g[1]),y=n[4],x={};x.add=v,b.length>0&&(x.continuationClasses=b),"."!==y&&(x.match="SFX"===p?new RegExp(y+"$"):new RegExp("^"+y)),"0"!=h&&(x.remove="SFX"===p?new RegExp(h+"$"):h),f.push(x)}c[d]={type:p,combineable:"Y"==m,entries:f},i+=r}else if("COMPOUNDRULE"===p){for(o=i+1,s=i+1+(r=parseInt(u[1],10));o<s;o++)n=(t=l[o]).split(/\s+/),this.compoundRules.push(n[1]);i+=r}else"REP"===p?3===(n=t.split(/\s+/)).length&&this.replacementTable.push([n[1],n[2]]):this.flags[p]=u[1]}return c},_removeAffixComments:function(e){return e.match(/^\s*#/,"")?"":e},_parseDIC:function(e){var t=(e=this._removeDicComments(e)).split(/\r?\n/),r={};function n(e,t){r.hasOwnProperty(e)||(r[e]=null),t.length>0&&(null===r[e]&&(r[e]=[]),r[e].push(t))}for(var i=1,o=t.length;i<o;i++){var a=t[i];if(a){var s=a.split("/",2),c=s[0];if(s.length>1){var l=this.parseRuleCodes(s[1]);"NEEDAFFIX"in this.flags&&-1!=l.indexOf(this.flags.NEEDAFFIX)||n(c,l);for(var u=0,p=l.length;u<p;u++){var d=l[u],m=this.rules[d];if(m)for(var f=this._applyRule(c,m),h=0,g=f.length;h<g;h++){var v=f[h];if(n(v,[]),m.combineable)for(var b=u+1;b<p;b++){var y=l[b],x=this.rules[y];if(x&&x.combineable&&m.type!=x.type)for(var w=this._applyRule(v,x),k=0,C=w.length;k<C;k++)n(w[k],[])}}d in this.compoundRuleCodes&&this.compoundRuleCodes[d].push(c)}}else n(c.trim(),[])}}return r},_removeDicComments:function(e){return e=e.replace(/^\t.*$/gm,"")},parseRuleCodes:function(e){if(!e)return[];if(!("FLAG"in this.flags))return e.split("");if("long"===this.flags.FLAG){for(var t=[],r=0,n=e.length;r<n;r+=2)t.push(e.substr(r,2));return t}return"num"===this.flags.FLAG?e.split(","):void 0},_applyRule:function(e,t){for(var r=t.entries,n=[],i=0,o=r.length;i<o;i++){var a=r[i];if(!a.match||e.match(a.match)){var s=e;if(a.remove&&(s=s.replace(a.remove,"")),"SFX"===t.type?s+=a.add:s=a.add+s,n.push(s),"continuationClasses"in a)for(var c=0,l=a.continuationClasses.length;c<l;c++){var u=this.rules[a.continuationClasses[c]];u&&(n=n.concat(this._applyRule(s,u)))}}}return n},check:function(e){if(!this.loaded)throw"Dictionary not loaded.";var t=e.replace(/^\s\s*/,"").replace(/\s\s*$/,"");if(this.checkExact(t))return!0;if(t.toUpperCase()===t){var r=t[0]+t.substring(1).toLowerCase();if(this.hasFlag(r,"KEEPCASE"))return!1;if(this.checkExact(r))return!0;if(this.checkExact(t.toLowerCase()))return!0}var n=t[0].toLowerCase()+t.substring(1);if(n!==t){if(this.hasFlag(n,"KEEPCASE"))return!1;if(this.checkExact(n))return!0}return!1},checkExact:function(e){if(!this.loaded)throw"Dictionary not loaded.";var t,r,n=this.dictionaryTable[e];if(void 0===n){if("COMPOUNDMIN"in this.flags&&e.length>=this.flags.COMPOUNDMIN)for(t=0,r=this.compoundRules.length;t<r;t++)if(e.match(this.compoundRules[t]))return!0}else{if(null===n)return!0;if("object"==typeof n)for(t=0,r=n.length;t<r;t++)if(!this.hasFlag(e,"ONLYINCOMPOUND",n[t]))return!0}return!1},hasFlag:function(e,t,r){if(!this.loaded)throw"Dictionary not loaded.";return!(!(t in this.flags)||(void 0===r&&(r=Array.prototype.concat.apply([],this.dictionaryTable[e])),!r||-1===r.indexOf(this.flags[t])))},alphabet:"",suggest:function(e,t){if(!this.loaded)throw"Dictionary not loaded.";if(t=t||5,this.memoized.hasOwnProperty(e)){var r=this.memoized[e].limit;if(t<=r||this.memoized[e].suggestions.length<r)return this.memoized[e].suggestions.slice(0,t)}if(this.check(e))return[];for(var n=0,i=this.replacementTable.length;n<i;n++){var o=this.replacementTable[n];if(-1!==e.indexOf(o[0])){var a=e.replace(o[0],o[1]);if(this.check(a))return[a]}}var s=this;function c(e,t){var r,n,i,o,a={},c=s.alphabet.length;if("string"==typeof e){var l=e;(e={})[l]=!0}for(var l in e)for(r=0,i=l.length+1;r<i;r++){var u=[l.substring(0,r),l.substring(r)];if(u[1]&&(o=u[0]+u[1].substring(1),t&&!s.check(o)||(o in a?a[o]+=1:a[o]=1)),u[1].length>1&&u[1][1]!==u[1][0]&&(o=u[0]+u[1][1]+u[1][0]+u[1].substring(2),t&&!s.check(o)||(o in a?a[o]+=1:a[o]=1)),u[1]){var p=u[1].substring(0,1).toUpperCase()===u[1].substring(0,1)?"uppercase":"lowercase";for(n=0;n<c;n++){var d=s.alphabet[n];"uppercase"===p&&(d=d.toUpperCase()),d!=u[1].substring(0,1)&&(o=u[0]+d+u[1].substring(1),t&&!s.check(o)||(o in a?a[o]+=1:a[o]=1))}}if(u[1])for(n=0;n<c;n++)p=u[0].substring(-1).toUpperCase()===u[0].substring(-1)&&u[1].substring(0,1).toUpperCase()===u[1].substring(0,1)?"uppercase":"lowercase",d=s.alphabet[n],"uppercase"===p&&(d=d.toUpperCase()),o=u[0]+d+u[1],t&&!s.check(o)||(o in a?a[o]+=1:a[o]=1)}return a}return s.alphabet="abcdefghijklmnopqrstuvwxyz",this.memoized[e]={suggestions:function(e){var r,n=c(e),i=c(n,!0);for(var o in n)s.check(o)&&(o in i?i[o]+=n[o]:i[o]=n[o]);var a=[];for(r in i)i.hasOwnProperty(r)&&a.push([r,i[r]]);a.sort((function(e,t){var r=e[1],n=t[1];return r<n?-1:r>n?1:t[0].localeCompare(e[0])})).reverse();var l=[],u="lowercase";e.toUpperCase()===e?u="uppercase":e.substr(0,1).toUpperCase()+e.substr(1).toLowerCase()===e&&(u="capitalized");var p=t;for(r=0;r<Math.min(p,a.length);r++)"uppercase"===u?a[r][0]=a[r][0].toUpperCase():"capitalized"===u&&(a[r][0]=a[r][0].substr(0,1).toUpperCase()+a[r][0].substr(1)),s.hasFlag(a[r][0],"NOSUGGEST")||-1!=l.indexOf(a[r][0])?p++:l.push(a[r][0]);return l}(e),limit:t},this.memoized[e].suggestions}},t.exports=r}));function $C(e){"function"==typeof(e=e||{}).codeMirrorInstance&&"function"==typeof e.codeMirrorInstance.defineMode?(String.prototype.includes||(String.prototype.includes=function(){return-1!==String.prototype.indexOf.apply(this,arguments)}),e.codeMirrorInstance.defineMode("spell-checker",(function(t){if(!$C.aff_loading){$C.aff_loading=!0;var r=new XMLHttpRequest;r.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.aff",!0),r.onload=function(){4===r.readyState&&200===r.status&&($C.aff_data=r.responseText,$C.num_loaded++,2==$C.num_loaded&&($C.typo=new TC("en_US",$C.aff_data,$C.dic_data,{platform:"any"})))},r.send(null)}if(!$C.dic_loading){$C.dic_loading=!0;var n=new XMLHttpRequest;n.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.dic",!0),n.onload=function(){4===n.readyState&&200===n.status&&($C.dic_data=n.responseText,$C.num_loaded++,2==$C.num_loaded&&($C.typo=new TC("en_US",$C.aff_data,$C.dic_data,{platform:"any"})))},n.send(null)}var i='!"#$%&()*+,-./:;<=>?@[\\]^_`{|}~ ',o={token:function(e){var t=e.peek(),r="";if(i.includes(t))return e.next(),null;for(;null!=(t=e.peek())&&!i.includes(t);)r+=t,e.next();return $C.typo&&!$C.typo.check(r)?"spell-error":null}},a=e.codeMirrorInstance.getMode(t,t.backdrop||"text/plain");return e.codeMirrorInstance.overlayMode(a,o,!0)}))):console.log("CodeMirror Spell Checker: You must provide an instance of CodeMirror via the option `codeMirrorInstance`")}$C.num_loaded=0,$C.aff_loading=!1,$C.dic_loading=!1,$C.aff_data="",$C.dic_data="";var _C=$C,EC=tc((function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}Object.defineProperty(t,"__esModule",{value:!0}),t.defaults={baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};var a=/[&<>"']/,s=/[&<>"']/g,c=/[<>"']|&(?!#?\w+;)/,l=/[<>"']|&(?!#?\w+;)/g,u={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},p=function(e){return u[e]};function d(e,t){if(t){if(a.test(e))return e.replace(s,p)}else if(c.test(e))return e.replace(l,p);return e}var m=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function f(e){return e.replace(m,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var h=/(^|[^\[])\^/g;function g(e,t){e=e.source||e,t=t||"";var r={replace:function(t,n){return n=(n=n.source||n).replace(h,"$1"),e=e.replace(t,n),r},getRegex:function(){return new RegExp(e,t)}};return r}var v=/[^\w:]/g,b=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function y(e,t,r){if(e){var n;try{n=decodeURIComponent(f(r)).replace(v,"").toLowerCase()}catch(e){return null}if(0===n.indexOf("javascript:")||0===n.indexOf("vbscript:")||0===n.indexOf("data:"))return null}t&&!b.test(r)&&(r=function(e,t){x[" "+e]||(w.test(e)?x[" "+e]=e+"/":x[" "+e]=D(e,"/",!0));var r=-1===(e=x[" "+e]).indexOf(":");return"//"===t.substring(0,2)?r?t:e.replace(k,"$1")+t:"/"===t.charAt(0)?r?t:e.replace(C,"$1")+t:e+t}(t,r));try{r=encodeURI(r).replace(/%25/g,"%")}catch(e){return null}return r}var x={},w=/^[^:]+:\/*[^/]*$/,k=/^([^:]+:)[\s\S]*$/,C=/^([^:]+:\/*[^/]*)[\s\S]*$/;var z={exec:function(){}};function S(e){for(var t,r,n=1;n<arguments.length;n++)for(r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}function A(e,t){var r=e.replace(/\|/g,(function(e,t,r){for(var n=!1,i=t;--i>=0&&"\\"===r[i];)n=!n;return n?"|":" |"})).split(/ \|/),n=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;n<r.length;n++)r[n]=r[n].trim().replace(/\\\|/g,"|");return r}function D(e,t,r){var n=e.length;if(0===n)return"";for(var i=0;i<n;){var o=e.charAt(n-i-1);if(o!==t||r){if(o===t||!r)break;i++}else i++}return e.substr(0,n-i)}function T(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function $(e,t){if(t<1)return"";for(var r="";t>1;)1&t&&(r+=e),t>>=1,e+=e;return r+e}function _(e,t,r,n){var i=t.href,o=t.title?d(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){n.state.inLink=!0;var s={type:"link",raw:r,href:i,title:o,text:a,tokens:n.inlineTokens(a,[])};return n.state.inLink=!1,s}return{type:"image",raw:r,href:i,title:o,text:d(a)}}var E=function(){function e(e){this.options=e||t.defaults}var r=e.prototype;return r.space=function(e){var t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}},r.code=function(e){var t=this.rules.block.code.exec(e);if(t){var r=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?r:D(r,"\n")}}},r.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var r=t[0],n=function(e,t){var r=e.match(/^(\s+)(?:```)/);if(null===r)return t;var n=r[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=n.length?e.slice(n.length):e})).join("\n")}(r,t[3]||"");return{type:"code",raw:r,lang:t[2]?t[2].trim():t[2],text:n}}},r.heading=function(e){var t=this.rules.block.heading.exec(e);if(t){var r=t[2].trim();if(/#$/.test(r)){var n=D(r,"#");this.options.pedantic?r=n.trim():n&&!/ $/.test(n)||(r=n.trim())}var i={type:"heading",raw:t[0],depth:t[1].length,text:r,tokens:[]};return this.lexer.inline(i.text,i.tokens),i}},r.hr=function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}},r.blockquote=function(e){var t=this.rules.block.blockquote.exec(e);if(t){var r=t[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(r,[]),text:r}}},r.list=function(e){var t=this.rules.block.list.exec(e);if(t){var r,n,o,a,s,c,l,u,p,d,m,f,h=t[1].trim(),g=h.length>1,v={type:"list",raw:"",ordered:g,start:g?+h.slice(0,-1):"",loose:!1,items:[]};h=g?"\\d{1,9}\\"+h.slice(-1):"\\"+h,this.options.pedantic&&(h=g?h:"[*+-]");for(var b=new RegExp("^( {0,3}"+h+")((?: [^\\n]*)?(?:\\n|$))");e&&(f=!1,t=b.exec(e))&&!this.rules.block.hr.test(e);){if(r=t[0],e=e.substring(r.length),u=t[2].split("\n",1)[0],p=e.split("\n",1)[0],this.options.pedantic?(a=2,m=u.trimLeft()):(a=(a=t[2].search(/[^ ]/))>4?1:a,m=u.slice(a),a+=t[1].length),c=!1,!u&&/^ *$/.test(p)&&(r+=p+"\n",e=e.substring(p.length+1),f=!0),!f)for(var y=new RegExp("^ {0,"+Math.min(3,a-1)+"}(?:[*+-]|\\d{1,9}[.)])");e&&(u=d=e.split("\n",1)[0],this.options.pedantic&&(u=u.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!y.test(u));){if(u.search(/[^ ]/)>=a||!u.trim())m+="\n"+u.slice(a);else{if(c)break;m+="\n"+u}c||u.trim()||(c=!0),r+=d+"\n",e=e.substring(d.length+1)}v.loose||(l?v.loose=!0:/\n *\n *$/.test(r)&&(l=!0)),this.options.gfm&&(n=/^\[[ xX]\] /.exec(m))&&(o="[ ] "!==n[0],m=m.replace(/^\[[ xX]\] +/,"")),v.items.push({type:"list_item",raw:r,task:!!n,checked:o,loose:!1,text:m}),v.raw+=r}v.items[v.items.length-1].raw=r.trimRight(),v.items[v.items.length-1].text=m.trimRight(),v.raw=v.raw.trimRight();var x=v.items.length;for(s=0;s<x;s++){this.lexer.state.top=!1,v.items[s].tokens=this.lexer.blockTokens(v.items[s].text,[]);var w=v.items[s].tokens.filter((function(e){return"space"===e.type})),k=w.every((function(e){for(var t,r=0,n=i(e.raw.split(""));!(t=n()).done;){if("\n"===t.value&&(r+=1),r>1)return!0}return!1}));!v.loose&&w.length&&k&&(v.loose=!0,v.items[s].loose=!0)}return v}},r.html=function(e){var t=this.rules.block.html.exec(e);if(t){var r={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};return this.options.sanitize&&(r.type="paragraph",r.text=this.options.sanitizer?this.options.sanitizer(t[0]):d(t[0]),r.tokens=[],this.lexer.inline(r.text,r.tokens)),r}},r.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},r.table=function(e){var t=this.rules.block.table.exec(e);if(t){var r={type:"table",header:A(t[1]).map((function(e){return{text:e}})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(r.header.length===r.align.length){r.raw=t[0];var n,i,o,a,s=r.align.length;for(n=0;n<s;n++)/^ *-+: *$/.test(r.align[n])?r.align[n]="right":/^ *:-+: *$/.test(r.align[n])?r.align[n]="center":/^ *:-+ *$/.test(r.align[n])?r.align[n]="left":r.align[n]=null;for(s=r.rows.length,n=0;n<s;n++)r.rows[n]=A(r.rows[n],r.header.length).map((function(e){return{text:e}}));for(s=r.header.length,i=0;i<s;i++)r.header[i].tokens=[],this.lexer.inlineTokens(r.header[i].text,r.header[i].tokens);for(s=r.rows.length,i=0;i<s;i++)for(a=r.rows[i],o=0;o<a.length;o++)a[o].tokens=[],this.lexer.inlineTokens(a[o].text,a[o].tokens);return r}}},r.lheading=function(e){var t=this.rules.block.lheading.exec(e);if(t){var r={type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:[]};return this.lexer.inline(r.text,r.tokens),r}},r.paragraph=function(e){var t=this.rules.block.paragraph.exec(e);if(t){var r={type:"paragraph",raw:t[0],text:"\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1],tokens:[]};return this.lexer.inline(r.text,r.tokens),r}},r.text=function(e){var t=this.rules.block.text.exec(e);if(t){var r={type:"text",raw:t[0],text:t[0],tokens:[]};return this.lexer.inline(r.text,r.tokens),r}},r.escape=function(e){var t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:d(t[1])}},r.tag=function(e){var t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):d(t[0]):t[0]}},r.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var r=t[2].trim();if(!this.options.pedantic&&/^</.test(r)){if(!/>$/.test(r))return;var n=D(r.slice(0,-1),"\\");if((r.length-n.length)%2==0)return}else{var i=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var r=e.length,n=0,i=0;i<r;i++)if("\\"===e[i])i++;else if(e[i]===t[0])n++;else if(e[i]===t[1]&&--n<0)return i;return-1}(t[2],"()");if(i>-1){var o=(0===t[0].indexOf("!")?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,o).trim(),t[3]=""}}var a=t[2],s="";if(this.options.pedantic){var c=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(a);c&&(a=c[1],s=c[3])}else s=t[3]?t[3].slice(1,-1):"";return a=a.trim(),/^</.test(a)&&(a=this.options.pedantic&&!/>$/.test(r)?a.slice(1):a.slice(1,-1)),_(t,{href:a?a.replace(this.rules.inline._escapes,"$1"):a,title:s?s.replace(this.rules.inline._escapes,"$1"):s},t[0],this.lexer)}},r.reflink=function(e,t){var r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){var n=(r[2]||r[1]).replace(/\s+/g," ");if(!(n=t[n.toLowerCase()])||!n.href){var i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return _(r,n,r[0],this.lexer)}},r.emStrong=function(e,t,r){void 0===r&&(r="");var n=this.rules.inline.emStrong.lDelim.exec(e);if(n&&(!n[3]||!r.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var i=n[1]||n[2]||"";if(!i||i&&(""===r||this.rules.inline.punctuation.exec(r))){var o,a,s=n[0].length-1,c=s,l=0,u="*"===n[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+s);null!=(n=u.exec(t));)if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6])if(a=o.length,n[3]||n[4])c+=a;else if(!((n[5]||n[6])&&s%3)||(s+a)%3){if(!((c-=a)>0)){if(a=Math.min(a,a+c+l),Math.min(s,a)%2){var p=e.slice(1,s+n.index+a);return{type:"em",raw:e.slice(0,s+n.index+a+1),text:p,tokens:this.lexer.inlineTokens(p,[])}}var d=e.slice(2,s+n.index+a-1);return{type:"strong",raw:e.slice(0,s+n.index+a+1),text:d,tokens:this.lexer.inlineTokens(d,[])}}}else l+=a}}},r.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var r=t[2].replace(/\n/g," "),n=/[^ ]/.test(r),i=/^ /.test(r)&&/ $/.test(r);return n&&i&&(r=r.substring(1,r.length-1)),r=d(r,!0),{type:"codespan",raw:t[0],text:r}}},r.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},r.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2],[])}},r.autolink=function(e,t){var r,n,i=this.rules.inline.autolink.exec(e);if(i)return n="@"===i[2]?"mailto:"+(r=d(this.options.mangle?t(i[1]):i[1])):r=d(i[1]),{type:"link",raw:i[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}},r.url=function(e,t){var r;if(r=this.rules.inline.url.exec(e)){var n,i;if("@"===r[2])i="mailto:"+(n=d(this.options.mangle?t(r[0]):r[0]));else{var o;do{o=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0]}while(o!==r[0]);n=d(r[0]),i="www."===r[1]?"http://"+n:n}return{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}},r.inlineText=function(e,t){var r,n=this.rules.inline.text.exec(e);if(n)return r=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):d(n[0]):n[0]:d(this.options.smartypants?t(n[0]):n[0]),{type:"text",raw:n[0],text:r}},e}(),M={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)( [^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?<?([^\s>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:z,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};M.def=g(M.def).replace("label",M._label).replace("title",M._title).getRegex(),M.bullet=/(?:[*+-]|\d{1,9}[.)])/,M.listItemStart=g(/^( *)(bull) */).replace("bull",M.bullet).getRegex(),M.list=g(M.list).replace(/bull/g,M.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+M.def.source+")").getRegex(),M._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",M._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,M.html=g(M.html,"i").replace("comment",M._comment).replace("tag",M._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),M.paragraph=g(M._paragraph).replace("hr",M.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",M._tag).getRegex(),M.blockquote=g(M.blockquote).replace("paragraph",M.paragraph).getRegex(),M.normal=S({},M),M.gfm=S({},M.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),M.gfm.table=g(M.gfm.table).replace("hr",M.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",M._tag).getRegex(),M.gfm.paragraph=g(M._paragraph).replace("hr",M.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",M.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",M._tag).getRegex(),M.pedantic=S({},M.normal,{html:g("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",M._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:z,paragraph:g(M.normal._paragraph).replace("hr",M.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",M.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var L={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:z,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:z,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};function I(e){return e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function O(e){var t,r,n="",i=e.length;for(t=0;t<i;t++)r=e.charCodeAt(t),Math.random()>.5&&(r="x"+r.toString(16)),n+="&#"+r+";";return n}L._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",L.punctuation=g(L.punctuation).replace(/punctuation/g,L._punctuation).getRegex(),L.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,L.escapedEmSt=/\\\*|\\_/g,L._comment=g(M._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),L.emStrong.lDelim=g(L.emStrong.lDelim).replace(/punct/g,L._punctuation).getRegex(),L.emStrong.rDelimAst=g(L.emStrong.rDelimAst,"g").replace(/punct/g,L._punctuation).getRegex(),L.emStrong.rDelimUnd=g(L.emStrong.rDelimUnd,"g").replace(/punct/g,L._punctuation).getRegex(),L._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,L._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,L._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,L.autolink=g(L.autolink).replace("scheme",L._scheme).replace("email",L._email).getRegex(),L._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,L.tag=g(L.tag).replace("comment",L._comment).replace("attribute",L._attribute).getRegex(),L._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,L._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,L._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,L.link=g(L.link).replace("label",L._label).replace("href",L._href).replace("title",L._title).getRegex(),L.reflink=g(L.reflink).replace("label",L._label).replace("ref",M._label).getRegex(),L.nolink=g(L.nolink).replace("ref",M._label).getRegex(),L.reflinkSearch=g(L.reflinkSearch,"g").replace("reflink",L.reflink).replace("nolink",L.nolink).getRegex(),L.normal=S({},L),L.pedantic=S({},L.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:g(/^!?\[(label)\]\((.*?)\)/).replace("label",L._label).getRegex(),reflink:g(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",L._label).getRegex()}),L.gfm=S({},L.normal,{escape:g(L.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),L.gfm.url=g(L.gfm.url,"i").replace("email",L.gfm._extended_email).getRegex(),L.breaks=S({},L.gfm,{br:g(L.br).replace("{2,}","*").getRegex(),text:g(L.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var B=function(){function e(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||t.defaults,this.options.tokenizer=this.options.tokenizer||new E,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};var r={block:M.normal,inline:L.normal};this.options.pedantic?(r.block=M.pedantic,r.inline=L.pedantic):this.options.gfm&&(r.block=M.gfm,this.options.breaks?r.inline=L.breaks:r.inline=L.gfm),this.tokenizer.rules=r}e.lex=function(t,r){return new e(r).lex(t)},e.lexInline=function(t,r){return new e(r).inlineTokens(t)};var n,i,o,a=e.prototype;return a.lex=function(e){var t;for(e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens);t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens},a.blockTokens=function(e,t){var r,n,i,o,a=this;for(void 0===t&&(t=[]),this.options.pedantic&&(e=e.replace(/^ +$/gm,""));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((function(n){return!!(r=n.call({lexer:a},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)}))))if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),1===r.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(r);else if(r=this.tokenizer.code(e))e=e.substring(r.raw.length),!(n=t[t.length-1])||"paragraph"!==n.type&&"text"!==n.type?t.push(r):(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.list(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.html(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.def(e))e=e.substring(r.raw.length),!(n=t[t.length-1])||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title}):(n.raw+="\n"+r.raw,n.text+="\n"+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(r=this.tokenizer.table(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.lheading(e))e=e.substring(r.raw.length),t.push(r);else if(i=e,this.options.extensions&&this.options.extensions.startBlock&&function(){var t=1/0,r=e.slice(1),n=void 0;a.options.extensions.startBlock.forEach((function(e){"number"==typeof(n=e.call({lexer:this},r))&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}(),this.state.top&&(r=this.tokenizer.paragraph(i)))n=t[t.length-1],o&&"paragraph"===n.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(r),o=i.length!==e.length,e=e.substring(r.raw.length);else if(r=this.tokenizer.text(e))e=e.substring(r.raw.length),(n=t[t.length-1])&&"text"===n.type?(n.raw+="\n"+r.raw,n.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(r);else if(e){var s="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(s);break}throw new Error(s)}return this.state.top=!0,t},a.inline=function(e,t){this.inlineQueue.push({src:e,tokens:t})},a.inlineTokens=function(e,t){var r,n,i,o=this;void 0===t&&(t=[]);var a,s,c,l=e;if(this.tokens.links){var u=Object.keys(this.tokens.links);if(u.length>0)for(;null!=(a=this.tokenizer.rules.inline.reflinkSearch.exec(l));)u.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,a.index)+"["+$("a",a[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(a=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,a.index)+"["+$("a",a[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(a=this.tokenizer.rules.inline.escapedEmSt.exec(l));)l=l.slice(0,a.index)+"++"+l.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(s||(c=""),s=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((function(n){return!!(r=n.call({lexer:o},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)}))))if(r=this.tokenizer.escape(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.tag(e))e=e.substring(r.raw.length),(n=t[t.length-1])&&"text"===r.type&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);else if(r=this.tokenizer.link(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(r.raw.length),(n=t[t.length-1])&&"text"===r.type&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);else if(r=this.tokenizer.emStrong(e,l,c))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.codespan(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.br(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.del(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.autolink(e,O))e=e.substring(r.raw.length),t.push(r);else if(this.state.inLink||!(r=this.tokenizer.url(e,O))){if(i=e,this.options.extensions&&this.options.extensions.startInline&&function(){var t=1/0,r=e.slice(1),n=void 0;o.options.extensions.startInline.forEach((function(e){"number"==typeof(n=e.call({lexer:this},r))&&n>=0&&(t=Math.min(t,n))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}(),r=this.tokenizer.inlineText(i,I))e=e.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(c=r.raw.slice(-1)),s=!0,(n=t[t.length-1])&&"text"===n.type?(n.raw+=r.raw,n.text+=r.text):t.push(r);else if(e){var p="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(p);break}throw new Error(p)}}else e=e.substring(r.raw.length),t.push(r);return t},n=e,o=[{key:"rules",get:function(){return{block:M,inline:L}}}],(i=null)&&r(n.prototype,i),o&&r(n,o),Object.defineProperty(n,"prototype",{writable:!1}),e}(),P=function(){function e(e){this.options=e||t.defaults}var r=e.prototype;return r.code=function(e,t,r){var n=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,n);null!=i&&i!==e&&(r=!0,e=i)}return e=e.replace(/\n$/,"")+"\n",n?'<pre><code class="'+this.options.langPrefix+d(n,!0)+'">'+(r?e:d(e,!0))+"</code></pre>\n":"<pre><code>"+(r?e:d(e,!0))+"</code></pre>\n"},r.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},r.html=function(e){return e},r.heading=function(e,t,r,n){return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+n.slug(r)+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"},r.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},r.list=function(e,t,r){var n=t?"ol":"ul";return"<"+n+(t&&1!==r?' start="'+r+'"':"")+">\n"+e+"</"+n+">\n"},r.listitem=function(e){return"<li>"+e+"</li>\n"},r.checkbox=function(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},r.paragraph=function(e){return"<p>"+e+"</p>\n"},r.table=function(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"},r.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},r.tablecell=function(e,t){var r=t.header?"th":"td";return(t.align?"<"+r+' align="'+t.align+'">':"<"+r+">")+e+"</"+r+">\n"},r.strong=function(e){return"<strong>"+e+"</strong>"},r.em=function(e){return"<em>"+e+"</em>"},r.codespan=function(e){return"<code>"+e+"</code>"},r.br=function(){return this.options.xhtml?"<br/>":"<br>"},r.del=function(e){return"<del>"+e+"</del>"},r.link=function(e,t,r){if(null===(e=y(this.options.sanitize,this.options.baseUrl,e)))return r;var n='<a href="'+d(e)+'"';return t&&(n+=' title="'+t+'"'),n+=">"+r+"</a>"},r.image=function(e,t,r){if(null===(e=y(this.options.sanitize,this.options.baseUrl,e)))return r;var n='<img src="'+e+'" alt="'+r+'"';return t&&(n+=' title="'+t+'"'),n+=this.options.xhtml?"/>":">"},r.text=function(e){return e},e}(),j=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,r){return""+r},t.image=function(e,t,r){return""+r},t.br=function(){return""},e}(),F=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var r=e,n=0;if(this.seen.hasOwnProperty(r)){n=this.seen[e];do{r=e+"-"+ ++n}while(this.seen.hasOwnProperty(r))}return t||(this.seen[e]=n,this.seen[r]=0),r},t.slug=function(e,t){void 0===t&&(t={});var r=this.serialize(e);return this.getNextSafeSlug(r,t.dryrun)},e}(),R=function(){function e(e){this.options=e||t.defaults,this.options.renderer=this.options.renderer||new P,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new j,this.slugger=new F}e.parse=function(t,r){return new e(r).parse(t)},e.parseInline=function(t,r){return new e(r).parseInline(t)};var r=e.prototype;return r.parse=function(e,t){void 0===t&&(t=!0);var r,n,i,o,a,s,c,l,u,p,d,m,h,g,v,b,y,x,w,k="",C=e.length;for(r=0;r<C;r++)if(p=e[r],!(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[p.type])||!1===(w=this.options.extensions.renderers[p.type].call({parser:this},p))&&["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(p.type))switch(p.type){case"space":continue;case"hr":k+=this.renderer.hr();continue;case"heading":k+=this.renderer.heading(this.parseInline(p.tokens),p.depth,f(this.parseInline(p.tokens,this.textRenderer)),this.slugger);continue;case"code":k+=this.renderer.code(p.text,p.lang,p.escaped);continue;case"table":for(l="",c="",o=p.header.length,n=0;n<o;n++)c+=this.renderer.tablecell(this.parseInline(p.header[n].tokens),{header:!0,align:p.align[n]});for(l+=this.renderer.tablerow(c),u="",o=p.rows.length,n=0;n<o;n++){for(c="",a=(s=p.rows[n]).length,i=0;i<a;i++)c+=this.renderer.tablecell(this.parseInline(s[i].tokens),{header:!1,align:p.align[i]});u+=this.renderer.tablerow(c)}k+=this.renderer.table(l,u);continue;case"blockquote":u=this.parse(p.tokens),k+=this.renderer.blockquote(u);continue;case"list":for(d=p.ordered,m=p.start,h=p.loose,o=p.items.length,u="",n=0;n<o;n++)b=(v=p.items[n]).checked,y=v.task,g="",v.task&&(x=this.renderer.checkbox(b),h?v.tokens.length>0&&"paragraph"===v.tokens[0].type?(v.tokens[0].text=x+" "+v.tokens[0].text,v.tokens[0].tokens&&v.tokens[0].tokens.length>0&&"text"===v.tokens[0].tokens[0].type&&(v.tokens[0].tokens[0].text=x+" "+v.tokens[0].tokens[0].text)):v.tokens.unshift({type:"text",text:x}):g+=x),g+=this.parse(v.tokens,h),u+=this.renderer.listitem(g,y,b);k+=this.renderer.list(u,d,m);continue;case"html":k+=this.renderer.html(p.text);continue;case"paragraph":k+=this.renderer.paragraph(this.parseInline(p.tokens));continue;case"text":for(u=p.tokens?this.parseInline(p.tokens):p.text;r+1<C&&"text"===e[r+1].type;)u+="\n"+((p=e[++r]).tokens?this.parseInline(p.tokens):p.text);k+=t?this.renderer.paragraph(u):u;continue;default:var z='Token with "'+p.type+'" type was not found.';if(this.options.silent)return void console.error(z);throw new Error(z)}else k+=w||"";return k},r.parseInline=function(e,t){t=t||this.renderer;var r,n,i,o="",a=e.length;for(r=0;r<a;r++)if(n=e[r],!(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[n.type])||!1===(i=this.options.extensions.renderers[n.type].call({parser:this},n))&&["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type))switch(n.type){case"escape":o+=t.text(n.text);break;case"html":o+=t.html(n.text);break;case"link":o+=t.link(n.href,n.title,this.parseInline(n.tokens,t));break;case"image":o+=t.image(n.href,n.title,n.text);break;case"strong":o+=t.strong(this.parseInline(n.tokens,t));break;case"em":o+=t.em(this.parseInline(n.tokens,t));break;case"codespan":o+=t.codespan(n.text);break;case"br":o+=t.br();break;case"del":o+=t.del(this.parseInline(n.tokens,t));break;case"text":o+=t.text(n.text);break;default:var s='Token with "'+n.type+'" type was not found.';if(this.options.silent)return void console.error(s);throw new Error(s)}else o+=i||"";return o},e}();function N(e,t,r){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if("function"==typeof t&&(r=t,t=null),T(t=S({},N.defaults,t||{})),r){var n,i=t.highlight;try{n=B.lex(e,t)}catch(e){return r(e)}var o=function(e){var o;if(!e)try{t.walkTokens&&N.walkTokens(n,t.walkTokens),o=R.parse(n,t)}catch(t){e=t}return t.highlight=i,e?r(e):r(null,o)};if(!i||i.length<3)return o();if(delete t.highlight,!n.length)return o();var a=0;return N.walkTokens(n,(function(e){"code"===e.type&&(a++,setTimeout((function(){i(e.text,e.lang,(function(t,r){if(t)return o(t);null!=r&&r!==e.text&&(e.text=r,e.escaped=!0),0===--a&&o()}))}),0))})),void(0===a&&o())}try{var s=B.lex(e,t);return t.walkTokens&&N.walkTokens(s,t.walkTokens),R.parse(s,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+d(e.message+"",!0)+"</pre>";throw e}}N.options=N.setOptions=function(e){var r;return S(N.defaults,e),r=N.defaults,t.defaults=r,N},N.getDefaults=o,N.defaults=t.defaults,N.use=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,i=S.apply(void 0,[{}].concat(t)),o=N.defaults.extensions||{renderers:{},childTokens:{}};t.forEach((function(e){if(e.extensions&&(n=!0,e.extensions.forEach((function(e){if(!e.name)throw new Error("extension name required");if(e.renderer){var t=o.renderers?o.renderers[e.name]:null;o.renderers[e.name]=t?function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];var o=e.renderer.apply(this,n);return!1===o&&(o=t.apply(this,n)),o}:e.renderer}if(e.tokenizer){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");o[e.level]?o[e.level].unshift(e.tokenizer):o[e.level]=[e.tokenizer],e.start&&("block"===e.level?o.startBlock?o.startBlock.push(e.start):o.startBlock=[e.start]:"inline"===e.level&&(o.startInline?o.startInline.push(e.start):o.startInline=[e.start]))}e.childTokens&&(o.childTokens[e.name]=e.childTokens)}))),e.renderer&&function(){var t=N.defaults.renderer||new P,r=function(r){var n=t[r];t[r]=function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=e.renderer[r].apply(t,o);return!1===s&&(s=n.apply(t,o)),s}};for(var n in e.renderer)r(n);i.renderer=t}(),e.tokenizer&&function(){var t=N.defaults.tokenizer||new E,r=function(r){var n=t[r];t[r]=function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=e.tokenizer[r].apply(t,o);return!1===s&&(s=n.apply(t,o)),s}};for(var n in e.tokenizer)r(n);i.tokenizer=t}(),e.walkTokens){var t=N.defaults.walkTokens;i.walkTokens=function(r){e.walkTokens.call(this,r),t&&t.call(this,r)}}n&&(i.extensions=o),N.setOptions(i)}))},N.walkTokens=function(e,t){for(var r,n=function(){var e=r.value;switch(t.call(N,e),e.type){case"table":for(var n,o=i(e.header);!(n=o()).done;){var a=n.value;N.walkTokens(a.tokens,t)}for(var s,c=i(e.rows);!(s=c()).done;)for(var l,u=i(s.value);!(l=u()).done;){var p=l.value;N.walkTokens(p.tokens,t)}break;case"list":N.walkTokens(e.items,t);break;default:N.defaults.extensions&&N.defaults.extensions.childTokens&&N.defaults.extensions.childTokens[e.type]?N.defaults.extensions.childTokens[e.type].forEach((function(r){N.walkTokens(e[r],t)})):e.tokens&&N.walkTokens(e.tokens,t)}},o=i(e);!(r=o()).done;)n()},N.parseInline=function(e,t){if(null==e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");T(t=S({},N.defaults,t||{}));try{var r=B.lexInline(e,t);return t.walkTokens&&N.walkTokens(r,t.walkTokens),R.parseInline(r,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+d(e.message+"",!0)+"</pre>";throw e}},N.Parser=R,N.parser=R.parse,N.Renderer=P,N.TextRenderer=j,N.Lexer=B,N.lexer=B.lex,N.Tokenizer=E,N.Slugger=F,N.parse=N;var q=N.options,H=N.setOptions,U=N.use,G=N.walkTokens,W=N.parseInline,X=N,V=R.parse,Y=B.lex;t.Lexer=B,t.Parser=R,t.Renderer=P,t.Slugger=F,t.TextRenderer=j,t.Tokenizer=E,t.getDefaults=o,t.lexer=Y,t.marked=N,t.options=q,t.parse=X,t.parseInline=W,t.parser=V,t.setOptions=H,t.use=U,t.walkTokens=G})).marked,MC=/Mac/.test(navigator.platform),LC=new RegExp(/(<a.*?https?:\/\/.*?[^a]>)+?/g),IC={toggleBold:VC,toggleItalic:YC,drawLink:sz,toggleHeadingSmaller:QC,toggleHeadingBigger:ez,drawImage:cz,toggleBlockquote:ZC,toggleOrderedList:oz,toggleUnorderedList:iz,toggleCodeBlock:JC,togglePreview:gz,toggleStrikethrough:KC,toggleHeading1:tz,toggleHeading2:rz,toggleHeading3:nz,cleanBlock:az,drawTable:pz,drawHorizontalRule:dz,undo:mz,redo:fz,toggleSideBySide:hz,toggleFullScreen:XC},OC={toggleBold:"Cmd-B",toggleItalic:"Cmd-I",drawLink:"Cmd-K",toggleHeadingSmaller:"Cmd-H",toggleHeadingBigger:"Shift-Cmd-H",cleanBlock:"Cmd-E",drawImage:"Cmd-Alt-I",toggleBlockquote:"Cmd-'",toggleOrderedList:"Cmd-Alt-L",toggleUnorderedList:"Cmd-L",toggleCodeBlock:"Cmd-Alt-C",togglePreview:"Cmd-P",toggleSideBySide:"F9",toggleFullScreen:"F11"},BC=function(){var e=!1;return function(t){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(t.substr(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||window.opera),e};function PC(e){return e=MC?e.replace("Ctrl","Cmd"):e.replace("Cmd","Ctrl")}var jC={};function FC(e){return jC[e]||(jC[e]=new RegExp("\\s*"+e+"(\\s*)","g"))}function RC(e,t){if(e&&t){var r=FC(t);e.className.match(r)||(e.className+=" "+t)}}function NC(e,t){if(e&&t){var r=FC(t);e.className.match(r)&&(e.className=e.className.replace(r,"$1"))}}function qC(e,t,r,n){var i=HC(e,!1,t,r,"button",n);i.className+=" easymde-dropdown",i.onclick=function(){i.focus()};var o=document.createElement("div");o.className="easymde-dropdown-content";for(var a=0;a<e.children.length;a++){var s,c=e.children[a];(s=HC("string"==typeof c&&c in Sz?Sz[c]:c,!0,t,r,"button",n)).addEventListener("click",(function(e){e.stopPropagation()}),!1),o.appendChild(s)}return i.appendChild(o),i}function HC(e,t,r,n,i,o){e=e||{};var a=document.createElement(i);if(e.attributes)for(var s in e.attributes)Object.prototype.hasOwnProperty.call(e.attributes,s)&&a.setAttribute(s,e.attributes[s]);a.className=e.name,a.setAttribute("type",i),r=null==r||r,e.name&&e.name in n&&(IC[e.name]=e.action),e.title&&r&&(a.title=function(e,t,r){var n,i=e;t&&r[n=function(e){for(var t in IC)if(IC[t]===e)return t;return null}(t)]&&(i+=" ("+PC(r[n])+")");return i}(e.title,e.action,n),MC&&(a.title=a.title.replace("Ctrl","⌘"),a.title=a.title.replace("Alt","⌥"))),e.noDisable&&a.classList.add("no-disable"),e.noMobile&&a.classList.add("no-mobile");var c=[];void 0!==e.className&&(c=e.className.split(" "));for(var l=[],u=0;u<c.length;u++){var p=c[u];p.match(/^fa([srlb]|(-[\w-]*)|$)/)?l.push(p):a.classList.add(p)}a.tabIndex=-1;for(var d=document.createElement("i"),m=0;m<l.length;m++){var f=l[m];d.classList.add(f)}return a.appendChild(d),void 0!==e.icon&&(a.innerHTML=e.icon),e.action&&t&&("function"==typeof e.action?a.onclick=function(t){t.preventDefault(),e.action(o)}:"string"==typeof e.action&&(a.onclick=function(t){t.preventDefault(),window.open(e.action,"_blank")})),a}function UC(){var e=document.createElement("i");return e.className="separator",e.innerHTML="|",e}function GC(e,t){t=t||e.getCursor("start");var r=e.getTokenAt(t);if(!r.type)return{};for(var n,i,o=r.type.split(" "),a={},s=0;s<o.length;s++)"strong"===(n=o[s])?a.bold=!0:"variable-2"===n?(i=e.getLine(t.line),/^\s*\d+\.\s/.test(i)?a["ordered-list"]=!0:a["unordered-list"]=!0):"atom"===n?a.quote=!0:"em"===n?a.italic=!0:"quote"===n?a.quote=!0:"strikethrough"===n?a.strikethrough=!0:"comment"===n?a.code=!0:"link"===n?a.link=!0:"tag"===n?a.image=!0:n.match(/^header(-[1-6])?$/)&&(a[n.replace("header","heading")]=!0);return a}var WC="";function XC(e){var t=e.codemirror;t.setOption("fullScreen",!t.getOption("fullScreen")),t.getOption("fullScreen")?(WC=document.body.style.overflow,document.body.style.overflow="hidden"):document.body.style.overflow=WC;var r=t.getWrapperElement(),n=r.nextSibling;if(/editor-preview-active-side/.test(n.className))if(!1===e.options.sideBySideFullscreen){var i=r.parentNode;t.getOption("fullScreen")?NC(i,"sided--no-fullscreen"):RC(i,"sided--no-fullscreen")}else hz(e);if(e.options.onToggleFullScreen&&e.options.onToggleFullScreen(t.getOption("fullScreen")||!1),void 0!==e.options.maxHeight&&(t.getOption("fullScreen")?(t.getScrollerElement().style.removeProperty("height"),n.style.removeProperty("height")):(t.getScrollerElement().style.height=e.options.maxHeight,e.setPreviewMaxHeight())),/fullscreen/.test(e.toolbar_div.className)?e.toolbar_div.className=e.toolbar_div.className.replace(/\s*fullscreen\b/,""):e.toolbar_div.className+=" fullscreen",e.toolbarElements&&e.toolbarElements.fullscreen){var o=e.toolbarElements.fullscreen;/active/.test(o.className)?o.className=o.className.replace(/\s*active\s*/g,""):o.className+=" active"}}function VC(e){xz(e,"bold",e.options.blockStyles.bold)}function YC(e){xz(e,"italic",e.options.blockStyles.italic)}function KC(e){xz(e,"strikethrough","~~")}function JC(e){var t=e.options.blockStyles.code;function r(e){if("object"!=typeof e)throw"fencing_line() takes a 'line' object (not a line number, or line text). Got: "+typeof e+": "+e;return e.styles&&e.styles[2]&&-1!==e.styles[2].indexOf("formatting-code-block")}function n(e){return e.state.base.base||e.state.base}function i(e,t,i,o,a){i=i||e.getLineHandle(t),o=o||e.getTokenAt({line:t,ch:1}),a=a||!!i.text&&e.getTokenAt({line:t,ch:i.text.length-1});var s=o.type?o.type.split(" "):[];return a&&n(a).indentedCode?"indented":-1!==s.indexOf("comment")&&(n(o).fencedChars||n(a).fencedChars||r(i)?"fenced":"single")}var o,a,s,c=e.codemirror,l=c.getCursor("start"),u=c.getCursor("end"),p=c.getTokenAt({line:l.line,ch:l.ch||1}),d=c.getLineHandle(l.line),m=i(c,l.line,d,p);if("single"===m){var f=d.text.slice(0,l.ch).replace("`",""),h=d.text.slice(l.ch).replace("`","");c.replaceRange(f+h,{line:l.line,ch:0},{line:l.line,ch:99999999999999}),l.ch--,l!==u&&u.ch--,c.setSelection(l,u),c.focus()}else if("fenced"===m)if(l.line!==u.line||l.ch!==u.ch){for(o=l.line;o>=0&&!r(d=c.getLineHandle(o));o--);var g,v,b,y,x=n(c.getTokenAt({line:o,ch:1})).fencedChars;r(c.getLineHandle(l.line))?(g="",v=l.line):r(c.getLineHandle(l.line-1))?(g="",v=l.line-1):(g=x+"\n",v=l.line),r(c.getLineHandle(u.line))?(b="",y=u.line,0===u.ch&&(y+=1)):0!==u.ch&&r(c.getLineHandle(u.line+1))?(b="",y=u.line+1):(b=x+"\n",y=u.line+1),0===u.ch&&(y-=1),c.operation((function(){c.replaceRange(b,{line:y,ch:0},{line:y+(b?0:1),ch:0}),c.replaceRange(g,{line:v,ch:0},{line:v+(g?0:1),ch:0})})),c.setSelection({line:v+(g?1:0),ch:0},{line:y+(g?1:-1),ch:0}),c.focus()}else{var w=l.line;if(r(c.getLineHandle(l.line))&&("fenced"===i(c,l.line+1)?(o=l.line,w=l.line+1):(a=l.line,w=l.line-1)),void 0===o)for(o=w;o>=0&&!r(d=c.getLineHandle(o));o--);if(void 0===a)for(s=c.lineCount(),a=w;a<s&&!r(d=c.getLineHandle(a));a++);c.operation((function(){c.replaceRange("",{line:o,ch:0},{line:o+1,ch:0}),c.replaceRange("",{line:a-1,ch:0},{line:a,ch:0})})),c.focus()}else if("indented"===m){if(l.line!==u.line||l.ch!==u.ch)o=l.line,a=u.line,0===u.ch&&a--;else{for(o=l.line;o>=0;o--)if(!(d=c.getLineHandle(o)).text.match(/^\s*$/)&&"indented"!==i(c,o,d)){o+=1;break}for(s=c.lineCount(),a=l.line;a<s;a++)if(!(d=c.getLineHandle(a)).text.match(/^\s*$/)&&"indented"!==i(c,a,d)){a-=1;break}}var k=c.getLineHandle(a+1),C=k&&c.getTokenAt({line:a+1,ch:k.text.length-1});C&&n(C).indentedCode&&c.replaceRange("\n",{line:a+1,ch:0});for(var z=o;z<=a;z++)c.indentLine(z,"subtract");c.focus()}else{var S=l.line===u.line&&l.ch===u.ch&&0===l.ch,A=l.line!==u.line;S||A?function(e,t,r,n){var i=t.line+1,o=r.line+1,a=t.line!==r.line,s=n+"\n",c="\n"+n;a&&o++,a&&0===r.ch&&(c=n+"\n",o--),vz(e,!1,[s,c]),e.setSelection({line:i,ch:0},{line:o,ch:0})}(c,l,u,t):vz(c,!1,["`","`"])}}function ZC(e){yz(e.codemirror,"quote")}function QC(e){bz(e.codemirror,"smaller")}function ez(e){bz(e.codemirror,"bigger")}function tz(e){bz(e.codemirror,void 0,1)}function rz(e){bz(e.codemirror,void 0,2)}function nz(e){bz(e.codemirror,void 0,3)}function iz(e){var t=e.codemirror,r="*";["-","+","*"].includes(e.options.unorderedListStyle)&&(r=e.options.unorderedListStyle),yz(t,"unordered-list",r)}function oz(e){yz(e.codemirror,"ordered-list")}function az(e){!function(e){if(/editor-preview-active/.test(e.getWrapperElement().lastChild.className))return;for(var t,r=e.getCursor("start"),n=e.getCursor("end"),i=r.line;i<=n.line;i++)t=(t=e.getLine(i)).replace(/^[ ]*([# ]+|\*|-|[> ]+|[0-9]+(.|\)))[ ]*/,""),e.replaceRange(t,{line:i,ch:0},{line:i,ch:99999999999999})}(e.codemirror)}function sz(e){var t=e.codemirror,r=GC(t),n=e.options,i="https://";if(n.promptURLs&&!(i=prompt(n.promptTexts.link,"https://")))return!1;vz(t,r.link,n.insertTexts.link,i)}function cz(e){var t=e.codemirror,r=GC(t),n=e.options,i="https://";if(n.promptURLs&&!(i=prompt(n.promptTexts.image,"https://")))return!1;vz(t,r.image,n.insertTexts.image,i)}function lz(e){e.openBrowseFileWindow()}function uz(e,t){var r=e.codemirror,n=GC(r),i=e.options,o=t.substr(t.lastIndexOf("/")+1),a=o.substring(o.lastIndexOf(".")+1).replace(/\?.*$/,"").toLowerCase();if(["png","jpg","jpeg","gif","svg"].includes(a))vz(r,n.image,i.insertTexts.uploadedImage,t);else{var s=i.insertTexts.link;s[0]="["+o,vz(r,n.link,s,t)}e.updateStatusBar("upload-image",e.options.imageTexts.sbOnUploaded.replace("#image_name#",o)),setTimeout((function(){e.updateStatusBar("upload-image",e.options.imageTexts.sbInit)}),1e3)}function pz(e){var t=e.codemirror,r=GC(t),n=e.options;vz(t,r.table,n.insertTexts.table)}function dz(e){var t=e.codemirror,r=GC(t),n=e.options;vz(t,r.image,n.insertTexts.horizontalRule)}function mz(e){var t=e.codemirror;t.undo(),t.focus()}function fz(e){var t=e.codemirror;t.redo(),t.focus()}function hz(e){var t=e.codemirror,r=t.getWrapperElement(),n=r.nextSibling,i=e.toolbarElements&&e.toolbarElements["side-by-side"],o=!1,a=r.parentNode;/editor-preview-active-side/.test(n.className)?(!1===e.options.sideBySideFullscreen&&NC(a,"sided--no-fullscreen"),n.className=n.className.replace(/\s*editor-preview-active-side\s*/g,""),i&&(i.className=i.className.replace(/\s*active\s*/g,"")),r.className=r.className.replace(/\s*CodeMirror-sided\s*/g," ")):(setTimeout((function(){t.getOption("fullScreen")||(!1===e.options.sideBySideFullscreen?RC(a,"sided--no-fullscreen"):XC(e)),n.className+=" editor-preview-active-side"}),1),i&&(i.className+=" active"),r.className+=" CodeMirror-sided",o=!0);var s=r.lastChild;if(/editor-preview-active/.test(s.className)){s.className=s.className.replace(/\s*editor-preview-active\s*/g,"");var c=e.toolbarElements.preview,l=e.toolbar_div;c.className=c.className.replace(/\s*active\s*/g,""),l.className=l.className.replace(/\s*disabled-for-preview*/g,"")}if(t.sideBySideRenderingFunction||(t.sideBySideRenderingFunction=function(){var t=e.options.previewRender(e.value(),n);null!=t&&(n.innerHTML=t)}),o){var u=e.options.previewRender(e.value(),n);null!=u&&(n.innerHTML=u),t.on("update",t.sideBySideRenderingFunction)}else t.off("update",t.sideBySideRenderingFunction);t.refresh()}function gz(e){var t=e.codemirror,r=t.getWrapperElement(),n=e.toolbar_div,i=!!e.options.toolbar&&e.toolbarElements.preview,o=r.lastChild,a=t.getWrapperElement().nextSibling;if(/editor-preview-active-side/.test(a.className)&&hz(e),!o||!/editor-preview-full/.test(o.className)){if((o=document.createElement("div")).className="editor-preview-full",e.options.previewClass)if(Array.isArray(e.options.previewClass))for(var s=0;s<e.options.previewClass.length;s++)o.className+=" "+e.options.previewClass[s];else"string"==typeof e.options.previewClass&&(o.className+=" "+e.options.previewClass);r.appendChild(o)}/editor-preview-active/.test(o.className)?(o.className=o.className.replace(/\s*editor-preview-active\s*/g,""),i&&(i.className=i.className.replace(/\s*active\s*/g,""),n.className=n.className.replace(/\s*disabled-for-preview*/g,""))):(setTimeout((function(){o.className+=" editor-preview-active"}),1),i&&(i.className+=" active",n.className+=" disabled-for-preview")),o.innerHTML=e.options.previewRender(e.value(),o)}function vz(e,t,r,n){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){var i,o=r[0],a=r[1],s={},c={};Object.assign(s,e.getCursor("start")),Object.assign(c,e.getCursor("end")),n&&(o=o.replace("#url#",n),a=a.replace("#url#",n)),t?(o=(i=e.getLine(s.line)).slice(0,s.ch),a=i.slice(s.ch),e.replaceRange(o+a,{line:s.line,ch:0})):(i=e.getSelection(),e.replaceSelection(o+i+a),s.ch+=o.length,s!==c&&(c.ch+=o.length)),e.setSelection(s,c),e.focus()}}function bz(e,t,r){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){for(var n=e.getCursor("start"),i=e.getCursor("end"),o=n.line;o<=i.line;o++)!function(n){var i=e.getLine(n),o=i.search(/[^#]/);i=void 0!==t?o<=0?"bigger"==t?"###### "+i:"# "+i:6==o&&"smaller"==t?i.substr(7):1==o&&"bigger"==t?i.substr(2):"bigger"==t?i.substr(1):"#"+i:1==r?o<=0?"# "+i:o==r?i.substr(o+1):"# "+i.substr(o+1):2==r?o<=0?"## "+i:o==r?i.substr(o+1):"## "+i.substr(o+1):o<=0?"### "+i:o==r?i.substr(o+1):"### "+i.substr(o+1),e.replaceRange(i,{line:n,ch:0},{line:n,ch:99999999999999})}(o);e.focus()}}function yz(e,t,r){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){for(var n=/^(\s*)(\*|-|\+|\d*\.)(\s+)/,i=/^\s*/,o=GC(e),a=e.getCursor("start"),s=e.getCursor("end"),c={quote:/^(\s*)>\s+/,"unordered-list":n,"ordered-list":n},l=function(e,t,o){var a=n.exec(t),s=function(e,t){return{quote:">","unordered-list":r,"ordered-list":"%%i."}[e].replace("%%i",t)}(e,u);return null!==a?(function(e,t){var n=new RegExp({quote:">","unordered-list":"\\"+r,"ordered-list":"\\d+."}[e]);return t&&n.test(t)}(e,a[2])&&(s=""),t=a[1]+s+a[3]+t.replace(i,"").replace(c[e],"$1")):0==o&&(t=s+" "+t),t},u=1,p=a.line;p<=s.line;p++)!function(r){var n=e.getLine(r);o[t]?n=n.replace(c[t],"$1"):("unordered-list"==t&&(n=l("ordered-list",n,!0)),n=l(t,n,!1),u+=1),e.replaceRange(n,{line:r,ch:0},{line:r,ch:99999999999999})}(p);e.focus()}}function xz(e,t,r,n){if(!/editor-preview-active/.test(e.codemirror.getWrapperElement().lastChild.className)){n=void 0===n?r:n;var i,o=e.codemirror,a=GC(o),s=r,c=n,l=o.getCursor("start"),u=o.getCursor("end");a[t]?(s=(i=o.getLine(l.line)).slice(0,l.ch),c=i.slice(l.ch),"bold"==t?(s=s.replace(/(\*\*|__)(?![\s\S]*(\*\*|__))/,""),c=c.replace(/(\*\*|__)/,"")):"italic"==t?(s=s.replace(/(\*|_)(?![\s\S]*(\*|_))/,""),c=c.replace(/(\*|_)/,"")):"strikethrough"==t&&(s=s.replace(/(\*\*|~~)(?![\s\S]*(\*\*|~~))/,""),c=c.replace(/(\*\*|~~)/,"")),o.replaceRange(s+c,{line:l.line,ch:0},{line:l.line,ch:99999999999999}),"bold"==t||"strikethrough"==t?(l.ch-=2,l!==u&&(u.ch-=2)):"italic"==t&&(l.ch-=1,l!==u&&(u.ch-=1))):(i=o.getSelection(),"bold"==t?i=(i=i.split("**").join("")).split("__").join(""):"italic"==t?i=(i=i.split("*").join("")).split("_").join(""):"strikethrough"==t&&(i=i.split("~~").join("")),o.replaceSelection(s+i+c),l.ch+=r.length,u.ch=l.ch+i.length),o.setSelection(l,u),o.focus()}}function wz(e,t){if(Math.abs(e)<1024)return""+e+t[0];var r=0;do{e/=1024,++r}while(Math.abs(e)>=1024&&r<t.length);return""+e.toFixed(1)+t[r]}function kz(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]instanceof Array?e[r]=t[r].concat(e[r]instanceof Array?e[r]:[]):null!==t[r]&&"object"==typeof t[r]&&t[r].constructor===Object?e[r]=kz(e[r]||{},t[r]):e[r]=t[r]);return e}function Cz(e){for(var t=1;t<arguments.length;t++)e=kz(e,arguments[t]);return e}function zz(e){var t=e.match(/[a-zA-Z0-9_\u00A0-\u02AF\u0392-\u03c9\u0410-\u04F9]+|[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af]+/g),r=0;if(null===t)return r;for(var n=0;n<t.length;n++)t[n].charCodeAt(0)>=19968?r+=t[n].length:r+=1;return r}var Sz={bold:{name:"bold",action:VC,className:"fa fa-bold",title:"Bold",default:!0},italic:{name:"italic",action:YC,className:"fa fa-italic",title:"Italic",default:!0},strikethrough:{name:"strikethrough",action:KC,className:"fa fa-strikethrough",title:"Strikethrough"},heading:{name:"heading",action:QC,className:"fa fa-header fa-heading",title:"Heading",default:!0},"heading-smaller":{name:"heading-smaller",action:QC,className:"fa fa-header fa-heading header-smaller",title:"Smaller Heading"},"heading-bigger":{name:"heading-bigger",action:ez,className:"fa fa-header fa-heading header-bigger",title:"Bigger Heading"},"heading-1":{name:"heading-1",action:tz,className:"fa fa-header fa-heading header-1",title:"Big Heading"},"heading-2":{name:"heading-2",action:rz,className:"fa fa-header fa-heading header-2",title:"Medium Heading"},"heading-3":{name:"heading-3",action:nz,className:"fa fa-header fa-heading header-3",title:"Small Heading"},"separator-1":{name:"separator-1"},code:{name:"code",action:JC,className:"fa fa-code",title:"Code"},quote:{name:"quote",action:ZC,className:"fa fa-quote-left",title:"Quote",default:!0},"unordered-list":{name:"unordered-list",action:iz,className:"fa fa-list-ul",title:"Generic List",default:!0},"ordered-list":{name:"ordered-list",action:oz,className:"fa fa-list-ol",title:"Numbered List",default:!0},"clean-block":{name:"clean-block",action:az,className:"fa fa-eraser",title:"Clean block"},"separator-2":{name:"separator-2"},link:{name:"link",action:sz,className:"fa fa-link",title:"Create Link",default:!0},image:{name:"image",action:cz,className:"fa fa-image",title:"Insert Image",default:!0},"upload-image":{name:"upload-image",action:lz,className:"fa fa-image",title:"Import an image"},table:{name:"table",action:pz,className:"fa fa-table",title:"Insert Table"},"horizontal-rule":{name:"horizontal-rule",action:dz,className:"fa fa-minus",title:"Insert Horizontal Line"},"separator-3":{name:"separator-3"},preview:{name:"preview",action:gz,className:"fa fa-eye",noDisable:!0,title:"Toggle Preview",default:!0},"side-by-side":{name:"side-by-side",action:hz,className:"fa fa-columns",noDisable:!0,noMobile:!0,title:"Toggle Side by Side",default:!0},fullscreen:{name:"fullscreen",action:XC,className:"fa fa-arrows-alt",noDisable:!0,noMobile:!0,title:"Toggle Fullscreen",default:!0},"separator-4":{name:"separator-4"},guide:{name:"guide",action:"https://www.markdownguide.org/basic-syntax/",className:"fa fa-question-circle",noDisable:!0,title:"Markdown Guide",default:!0},"separator-5":{name:"separator-5"},undo:{name:"undo",action:mz,className:"fa fa-undo",noDisable:!0,title:"Undo"},redo:{name:"redo",action:fz,className:"fa fa-repeat fa-redo",noDisable:!0,title:"Redo"}},Az={link:["[","](#url#)"],image:["![](","#url#)"],uploadedImage:["![](#url#)",""],table:["","\n\n| Column 1 | Column 2 | Column 3 |\n| -------- | -------- | -------- |\n| Text | Text | Text |\n\n"],horizontalRule:["","\n\n-----\n\n"]},Dz={link:"URL for the link:",image:"URL of the image:"},Tz={locale:"en-US",format:{hour:"2-digit",minute:"2-digit"}},$z={bold:"**",code:"```",italic:"*"},_z={sbInit:"Attach files by drag and dropping or pasting from clipboard.",sbOnDragEnter:"Drop image to upload it.",sbOnDrop:"Uploading image #images_names#...",sbProgress:"Uploading #file_name#: #progress#%",sbOnUploaded:"Uploaded #image_name#",sizeUnits:" B, KB, MB"},Ez={noFileGiven:"You must select a file.",typeNotAllowed:"This image type is not allowed.",fileTooLarge:"Image #image_name# is too big (#image_size#).\nMaximum file size is #image_max_size#.",importError:"Something went wrong when uploading the image #image_name#."};function Mz(e){(e=e||{}).parent=this;var t=!0;if(!1===e.autoDownloadFontAwesome&&(t=!1),!0!==e.autoDownloadFontAwesome)for(var r=document.styleSheets,n=0;n<r.length;n++)r[n].href&&r[n].href.indexOf("//maxcdn.bootstrapcdn.com/font-awesome/")>-1&&(t=!1);if(t){var i=document.createElement("link");i.rel="stylesheet",i.href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css",document.getElementsByTagName("head")[0].appendChild(i)}if(e.element)this.element=e.element;else if(null===e.element)return void console.log("EasyMDE: Error. No element was found.");if(void 0===e.toolbar)for(var o in e.toolbar=[],Sz)Object.prototype.hasOwnProperty.call(Sz,o)&&(-1!=o.indexOf("separator-")&&e.toolbar.push("|"),(!0===Sz[o].default||e.showIcons&&e.showIcons.constructor===Array&&-1!=e.showIcons.indexOf(o))&&e.toolbar.push(o));if(Object.prototype.hasOwnProperty.call(e,"previewClass")||(e.previewClass="editor-preview"),Object.prototype.hasOwnProperty.call(e,"status")||(e.status=["autosave","lines","words","cursor"],e.uploadImage&&e.status.unshift("upload-image")),e.previewRender||(e.previewRender=function(e){return this.parent.markdown(e)}),e.parsingConfig=Cz({highlightFormatting:!0},e.parsingConfig||{}),e.insertTexts=Cz({},Az,e.insertTexts||{}),e.promptTexts=Cz({},Dz,e.promptTexts||{}),e.blockStyles=Cz({},$z,e.blockStyles||{}),null!=e.autosave&&(e.autosave.timeFormat=Cz({},Tz,e.autosave.timeFormat||{})),e.shortcuts=Cz({},OC,e.shortcuts||{}),e.maxHeight=e.maxHeight||void 0,e.direction=e.direction||"ltr",void 0!==e.maxHeight?e.minHeight=e.maxHeight:e.minHeight=e.minHeight||"300px",e.errorCallback=e.errorCallback||function(e){alert(e)},e.uploadImage=e.uploadImage||!1,e.imageMaxSize=e.imageMaxSize||2097152,e.imageAccept=e.imageAccept||"image/png, image/jpeg",e.imageTexts=Cz({},_z,e.imageTexts||{}),e.errorMessages=Cz({},Ez,e.errorMessages||{}),null!=e.autosave&&null!=e.autosave.unique_id&&""!=e.autosave.unique_id&&(e.autosave.uniqueId=e.autosave.unique_id),e.overlayMode&&void 0===e.overlayMode.combine&&(e.overlayMode.combine=!0),this.options=e,this.render(),!e.initialValue||this.options.autosave&&!0===this.options.autosave.foundSavedValue||this.value(e.initialValue),e.uploadImage){var a=this;this.codemirror.on("dragenter",(function(e,t){a.updateStatusBar("upload-image",a.options.imageTexts.sbOnDragEnter),t.stopPropagation(),t.preventDefault()})),this.codemirror.on("dragend",(function(e,t){a.updateStatusBar("upload-image",a.options.imageTexts.sbInit),t.stopPropagation(),t.preventDefault()})),this.codemirror.on("dragleave",(function(e,t){a.updateStatusBar("upload-image",a.options.imageTexts.sbInit),t.stopPropagation(),t.preventDefault()})),this.codemirror.on("dragover",(function(e,t){a.updateStatusBar("upload-image",a.options.imageTexts.sbOnDragEnter),t.stopPropagation(),t.preventDefault()})),this.codemirror.on("drop",(function(t,r){r.stopPropagation(),r.preventDefault(),e.imageUploadFunction?a.uploadImagesUsingCustomFunction(e.imageUploadFunction,r.dataTransfer.files):a.uploadImages(r.dataTransfer.files)})),this.codemirror.on("paste",(function(t,r){e.imageUploadFunction?a.uploadImagesUsingCustomFunction(e.imageUploadFunction,r.clipboardData.files):a.uploadImages(r.clipboardData.files)}))}}function Lz(){if("object"!=typeof localStorage)return!1;try{localStorage.setItem("smde_localStorage",1),localStorage.removeItem("smde_localStorage")}catch(e){return!1}return!0}Mz.prototype.uploadImages=function(e,t,r){if(0!==e.length){for(var n=[],i=0;i<e.length;i++)n.push(e[i].name),this.uploadImage(e[i],t,r);this.updateStatusBar("upload-image",this.options.imageTexts.sbOnDrop.replace("#images_names#",n.join(", ")))}},Mz.prototype.uploadImagesUsingCustomFunction=function(e,t){if(0!==t.length){for(var r=[],n=0;n<t.length;n++)r.push(t[n].name),this.uploadImageUsingCustomFunction(e,t[n]);this.updateStatusBar("upload-image",this.options.imageTexts.sbOnDrop.replace("#images_names#",r.join(", ")))}},Mz.prototype.updateStatusBar=function(e,t){if(this.gui.statusbar){var r=this.gui.statusbar.getElementsByClassName(e);1===r.length?this.gui.statusbar.getElementsByClassName(e)[0].textContent=t:0===r.length?console.log("EasyMDE: status bar item "+e+" was not found."):console.log("EasyMDE: Several status bar items named "+e+" was found.")}},Mz.prototype.markdown=function(e){if(EC){var t;if(t=this.options&&this.options.renderingConfig&&this.options.renderingConfig.markedOptions?this.options.renderingConfig.markedOptions:{},this.options&&this.options.renderingConfig&&!1===this.options.renderingConfig.singleLineBreaks?t.breaks=!1:t.breaks=!0,this.options&&this.options.renderingConfig&&!0===this.options.renderingConfig.codeSyntaxHighlighting){var r=this.options.renderingConfig.hljs||window.hljs;r&&(t.highlight=function(e,t){return t&&r.getLanguage(t)?r.highlight(t,e).value:r.highlightAuto(e).value})}EC.setOptions(t);var n=EC.parse(e);return this.options.renderingConfig&&"function"==typeof this.options.renderingConfig.sanitizerFunction&&(n=this.options.renderingConfig.sanitizerFunction.call(this,n)),n=function(e){for(var t=(new DOMParser).parseFromString(e,"text/html"),r=t.getElementsByTagName("li"),n=0;n<r.length;n++)for(var i=r[n],o=0;o<i.children.length;o++){var a=i.children[o];a instanceof HTMLInputElement&&"checkbox"===a.type&&(i.style.marginLeft="-1.5em",i.style.listStyleType="none")}return t.documentElement.innerHTML}(n=function(e){for(var t;null!==(t=LC.exec(e));){var r=t[0];if(-1===r.indexOf("target=")){var n=r.replace(/>$/,' target="_blank">');e=e.replace(r,n)}}return e}(n))}},Mz.prototype.render=function(e){if(e||(e=this.element||document.getElementsByTagName("textarea")[0]),!this._rendered||this._rendered!==e){this.element=e;var t,r,n=this.options,i=this,o={};for(var a in n.shortcuts)null!==n.shortcuts[a]&&null!==IC[a]&&function(e){o[PC(n.shortcuts[e])]=function(){var t=IC[e];"function"==typeof t?t(i):"string"==typeof t&&window.open(t,"_blank")}}(a);if(o.Enter="newlineAndIndentContinueMarkdownList",o.Tab="tabAndIndentMarkdownList",o["Shift-Tab"]="shiftTabAndUnindentMarkdownList",o.Esc=function(e){e.getOption("fullScreen")&&XC(i)},this.documentOnKeyDown=function(e){27==(e=e||window.event).keyCode&&i.codemirror.getOption("fullScreen")&&XC(i)},document.addEventListener("keydown",this.documentOnKeyDown,!1),n.overlayMode?(DC.defineMode("overlay-mode",(function(e){return DC.overlayMode(DC.getMode(e,!1!==n.spellChecker?"spell-checker":"gfm"),n.overlayMode.mode,n.overlayMode.combine)})),t="overlay-mode",(r=n.parsingConfig).gitHubSpice=!1):((t=n.parsingConfig).name="gfm",t.gitHubSpice=!1),!1!==n.spellChecker&&(t="spell-checker",(r=n.parsingConfig).name="gfm",r.gitHubSpice=!1,"function"==typeof n.spellChecker?n.spellChecker({codeMirrorInstance:DC}):_C({codeMirrorInstance:DC})),this.codemirror=DC.fromTextArea(e,{mode:t,backdrop:r,theme:null!=n.theme?n.theme:"easymde",tabSize:null!=n.tabSize?n.tabSize:2,indentUnit:null!=n.tabSize?n.tabSize:2,indentWithTabs:!1!==n.indentWithTabs,lineNumbers:!0===n.lineNumbers,autofocus:!0===n.autofocus,extraKeys:o,direction:n.direction,lineWrapping:!1!==n.lineWrapping,allowDropFileTypes:["text/plain"],placeholder:n.placeholder||e.getAttribute("placeholder")||"",styleSelectedText:null!=n.styleSelectedText?n.styleSelectedText:!BC(),scrollbarStyle:null!=n.scrollbarStyle?n.scrollbarStyle:"native",configureMouse:function(e,t,r){return{addNew:!1}},inputStyle:null!=n.inputStyle?n.inputStyle:BC()?"contenteditable":"textarea",spellcheck:null==n.nativeSpellcheck||n.nativeSpellcheck,autoRefresh:null!=n.autoRefresh&&n.autoRefresh}),this.codemirror.getScrollerElement().style.minHeight=n.minHeight,void 0!==n.maxHeight&&(this.codemirror.getScrollerElement().style.height=n.maxHeight),!0===n.forceSync){var s=this.codemirror;s.on("change",(function(){s.save()}))}this.gui={};var c=document.createElement("div");c.classList.add("EasyMDEContainer");var l=this.codemirror.getWrapperElement();l.parentNode.insertBefore(c,l),c.appendChild(l),!1!==n.toolbar&&(this.gui.toolbar=this.createToolbar()),!1!==n.status&&(this.gui.statusbar=this.createStatusbar()),null!=n.autosave&&!0===n.autosave.enabled&&(this.autosave(),this.codemirror.on("change",(function(){clearTimeout(i._autosave_timeout),i._autosave_timeout=setTimeout((function(){i.autosave()}),i.options.autosave.submit_delay||i.options.autosave.delay||1e3)})));var u=this;this.codemirror.on("update",(function(){n.previewImagesInEditor&&c.querySelectorAll(".cm-image-marker").forEach((function(e){var t=e.parentElement;if(t.innerText.match(/^!\[.*?\]\(.*\)/g)&&!t.hasAttribute("data-img-src")){var r=t.innerText.match("\\((.*)\\)");if(window.EMDEimagesCache||(window.EMDEimagesCache={}),r&&r.length>=2){var n=r[1];if(window.EMDEimagesCache[n])d(t,window.EMDEimagesCache[n]);else{var i=document.createElement("img");i.onload=function(){window.EMDEimagesCache[n]={naturalWidth:i.naturalWidth,naturalHeight:i.naturalHeight,url:n},d(t,window.EMDEimagesCache[n])},i.src=n}}}}))})),this.gui.sideBySide=this.createSideBySide(),this._rendered=this.element;var p=this.codemirror;setTimeout(function(){p.refresh()}.bind(p),0)}function d(e,t){var r,n;e.setAttribute("data-img-src",t.url),e.setAttribute("style","--bg-image:url("+t.url+");--width:"+t.naturalWidth+"px;--height:"+(r=t.naturalWidth,n=t.naturalHeight,r<window.getComputedStyle(document.querySelector(".CodeMirror-sizer")).width.replace("px","")?n+"px":n/r*100+"%")),u.codemirror.setSize()}},Mz.prototype.cleanup=function(){document.removeEventListener("keydown",this.documentOnKeyDown)},Mz.prototype.autosave=function(){if(Lz()){var e=this;if(null==this.options.autosave.uniqueId||""==this.options.autosave.uniqueId)return void console.log("EasyMDE: You must set a uniqueId to use the autosave feature");!0!==this.options.autosave.binded&&(null!=e.element.form&&null!=e.element.form&&e.element.form.addEventListener("submit",(function(){clearTimeout(e.autosaveTimeoutId),e.autosaveTimeoutId=void 0,localStorage.removeItem("smde_"+e.options.autosave.uniqueId)})),this.options.autosave.binded=!0),!0!==this.options.autosave.loaded&&("string"==typeof localStorage.getItem("smde_"+this.options.autosave.uniqueId)&&""!=localStorage.getItem("smde_"+this.options.autosave.uniqueId)&&(this.codemirror.setValue(localStorage.getItem("smde_"+this.options.autosave.uniqueId)),this.options.autosave.foundSavedValue=!0),this.options.autosave.loaded=!0);var t=e.value();""!==t?localStorage.setItem("smde_"+this.options.autosave.uniqueId,t):localStorage.removeItem("smde_"+this.options.autosave.uniqueId);var r=document.getElementById("autosaved");if(null!=r&&null!=r&&""!=r){var n=new Date,i=new Intl.DateTimeFormat([this.options.autosave.timeFormat.locale,"en-US"],this.options.autosave.timeFormat.format).format(n),o=null==this.options.autosave.text?"Autosaved: ":this.options.autosave.text;r.innerHTML=o+i}}else console.log("EasyMDE: localStorage not available, cannot autosave")},Mz.prototype.clearAutosavedValue=function(){if(Lz()){if(null==this.options.autosave||null==this.options.autosave.uniqueId||""==this.options.autosave.uniqueId)return void console.log("EasyMDE: You must set a uniqueId to clear the autosave value");localStorage.removeItem("smde_"+this.options.autosave.uniqueId)}else console.log("EasyMDE: localStorage not available, cannot autosave")},Mz.prototype.openBrowseFileWindow=function(e,t){var r=this,n=this.gui.toolbar.getElementsByClassName("imageInput")[0];n.click(),n.addEventListener("change",(function i(o){r.options.imageUploadFunction?r.uploadImagesUsingCustomFunction(r.options.imageUploadFunction,o.target.files):r.uploadImages(o.target.files,e,t),n.removeEventListener("change",i)}))},Mz.prototype.uploadImage=function(e,t,r){var n=this;function i(e){n.updateStatusBar("upload-image",e),setTimeout((function(){n.updateStatusBar("upload-image",n.options.imageTexts.sbInit)}),1e4),r&&"function"==typeof r&&r(e),n.options.errorCallback(e)}function o(t){var r=n.options.imageTexts.sizeUnits.split(",");return t.replace("#image_name#",e.name).replace("#image_size#",wz(e.size,r)).replace("#image_max_size#",wz(n.options.imageMaxSize,r))}if(t=t||function(e){uz(n,e)},e.size>this.options.imageMaxSize)i(o(this.options.errorMessages.fileTooLarge));else{var a=new FormData;a.append("image",e),n.options.imageCSRFToken&&a.append("csrfmiddlewaretoken",n.options.imageCSRFToken);var s=new XMLHttpRequest;s.upload.onprogress=function(t){if(t.lengthComputable){var r=""+Math.round(100*t.loaded/t.total);n.updateStatusBar("upload-image",n.options.imageTexts.sbProgress.replace("#file_name#",e.name).replace("#progress#",r))}},s.open("POST",this.options.imageUploadEndpoint),s.onload=function(){try{var e=JSON.parse(this.responseText)}catch(e){return console.error("EasyMDE: The server did not return a valid json."),void i(o(n.options.errorMessages.importError))}200===this.status&&e&&!e.error&&e.data&&e.data.filePath?t((n.options.imagePathAbsolute?"":window.location.origin+"/")+e.data.filePath):e.error&&e.error in n.options.errorMessages?i(o(n.options.errorMessages[e.error])):e.error?i(o(e.error)):(console.error("EasyMDE: Received an unexpected response after uploading the image."+this.status+" ("+this.statusText+")"),i(o(n.options.errorMessages.importError)))},s.onerror=function(e){console.error("EasyMDE: An unexpected error occurred when trying to upload the image."+e.target.status+" ("+e.target.statusText+")"),i(n.options.errorMessages.importError)},s.send(a)}},Mz.prototype.uploadImageUsingCustomFunction=function(e,t){var r=this;e.apply(this,[t,function(e){uz(r,e)},function(e){var n=function(e){var n=r.options.imageTexts.sizeUnits.split(",");return e.replace("#image_name#",t.name).replace("#image_size#",wz(t.size,n)).replace("#image_max_size#",wz(r.options.imageMaxSize,n))}(e);r.updateStatusBar("upload-image",n),setTimeout((function(){r.updateStatusBar("upload-image",r.options.imageTexts.sbInit)}),1e4),r.options.errorCallback(n)}])},Mz.prototype.setPreviewMaxHeight=function(){var e=this.codemirror.getWrapperElement(),t=e.nextSibling,r=parseInt(window.getComputedStyle(e).paddingTop),n=parseInt(window.getComputedStyle(e).borderTopWidth),i=(parseInt(this.options.maxHeight)+2*r+2*n).toString()+"px";t.style.height=i},Mz.prototype.createSideBySide=function(){var e=this.codemirror,t=e.getWrapperElement(),r=t.nextSibling;if(!r||!/editor-preview-side/.test(r.className)){if((r=document.createElement("div")).className="editor-preview-side",this.options.previewClass)if(Array.isArray(this.options.previewClass))for(var n=0;n<this.options.previewClass.length;n++)r.className+=" "+this.options.previewClass[n];else"string"==typeof this.options.previewClass&&(r.className+=" "+this.options.previewClass);t.parentNode.insertBefore(r,t.nextSibling)}if(void 0!==this.options.maxHeight&&this.setPreviewMaxHeight(),!1===this.options.syncSideBySidePreviewScroll)return r;var i=!1,o=!1;return e.on("scroll",(function(e){if(i)i=!1;else{o=!0;var t=e.getScrollInfo().height-e.getScrollInfo().clientHeight,n=parseFloat(e.getScrollInfo().top)/t,a=(r.scrollHeight-r.clientHeight)*n;r.scrollTop=a}})),r.onscroll=function(){if(o)o=!1;else{i=!0;var t=r.scrollHeight-r.clientHeight,n=parseFloat(r.scrollTop)/t,a=(e.getScrollInfo().height-e.getScrollInfo().clientHeight)*n;e.scrollTo(0,a)}},r},Mz.prototype.createToolbar=function(e){if((e=e||this.options.toolbar)&&0!==e.length){var t;for(t=0;t<e.length;t++)null!=Sz[e[t]]&&(e[t]=Sz[e[t]]);var r=document.createElement("div");r.className="editor-toolbar";var n=this,i={};for(n.toolbar=e,t=0;t<e.length;t++)if(("guide"!=e[t].name||!1!==n.options.toolbarGuideIcon)&&!(n.options.hideIcons&&-1!=n.options.hideIcons.indexOf(e[t].name)||("fullscreen"==e[t].name||"side-by-side"==e[t].name)&&BC())){if("|"===e[t]){for(var o=!1,a=t+1;a<e.length;a++)"|"===e[a]||n.options.hideIcons&&-1!=n.options.hideIcons.indexOf(e[a].name)||(o=!0);if(!o)continue}!function(e){var t;if(t="|"===e?UC():e.children?qC(e,n.options.toolbarTips,n.options.shortcuts,n):HC(e,!0,n.options.toolbarTips,n.options.shortcuts,"button",n),i[e.name||e]=t,r.appendChild(t),"upload-image"===e.name){var o=document.createElement("input");o.className="imageInput",o.type="file",o.multiple=!0,o.name="image",o.accept=n.options.imageAccept,o.style.display="none",o.style.opacity=0,r.appendChild(o)}}(e[t])}n.toolbar_div=r,n.toolbarElements=i;var s=this.codemirror;s.on("cursorActivity",(function(){var e=GC(s);for(var t in i)!function(t){var r=i[t];e[t]?r.className+=" active":"fullscreen"!=t&&"side-by-side"!=t&&(r.className=r.className.replace(/\s*active\s*/g,""))}(t)}));var c=s.getWrapperElement();return c.parentNode.insertBefore(r,c),r}},Mz.prototype.createStatusbar=function(e){e=e||this.options.status;var t=this.options,r=this.codemirror;if(e&&0!==e.length){var n,i,o,a,s=[];for(n=0;n<e.length;n++)if(i=void 0,o=void 0,a=void 0,"object"==typeof e[n])s.push({className:e[n].className,defaultValue:e[n].defaultValue,onUpdate:e[n].onUpdate,onActivity:e[n].onActivity});else{var c=e[n];"words"===c?(a=function(e){e.innerHTML=zz(r.getValue())},i=function(e){e.innerHTML=zz(r.getValue())}):"lines"===c?(a=function(e){e.innerHTML=r.lineCount()},i=function(e){e.innerHTML=r.lineCount()}):"cursor"===c?(a=function(e){e.innerHTML="1:1"},o=function(e){var t=r.getCursor(),n=t.line+1,i=t.ch+1;e.innerHTML=n+":"+i}):"autosave"===c?a=function(e){null!=t.autosave&&!0===t.autosave.enabled&&e.setAttribute("id","autosaved")}:"upload-image"===c&&(a=function(e){e.innerHTML=t.imageTexts.sbInit}),s.push({className:c,defaultValue:a,onUpdate:i,onActivity:o})}var l=document.createElement("div");for(l.className="editor-statusbar",n=0;n<s.length;n++){var u=s[n],p=document.createElement("span");p.className=u.className,"function"==typeof u.defaultValue&&u.defaultValue(p),"function"==typeof u.onUpdate&&this.codemirror.on("update",function(e,t){return function(){t.onUpdate(e)}}(p,u)),"function"==typeof u.onActivity&&this.codemirror.on("cursorActivity",function(e,t){return function(){t.onActivity(e)}}(p,u)),l.appendChild(p)}var d=this.codemirror.getWrapperElement();return d.parentNode.insertBefore(l,d.nextSibling),l}},Mz.prototype.value=function(e){var t=this.codemirror;if(void 0===e)return t.getValue();if(t.getDoc().setValue(e),this.isPreviewActive()){var r=t.getWrapperElement().lastChild;r.innerHTML=this.options.previewRender(e,r)}return this},Mz.toggleBold=VC,Mz.toggleItalic=YC,Mz.toggleStrikethrough=KC,Mz.toggleBlockquote=ZC,Mz.toggleHeadingSmaller=QC,Mz.toggleHeadingBigger=ez,Mz.toggleHeading1=tz,Mz.toggleHeading2=rz,Mz.toggleHeading3=nz,Mz.toggleCodeBlock=JC,Mz.toggleUnorderedList=iz,Mz.toggleOrderedList=oz,Mz.cleanBlock=az,Mz.drawLink=sz,Mz.drawImage=cz,Mz.drawUploadedImage=lz,Mz.drawTable=pz,Mz.drawHorizontalRule=dz,Mz.undo=mz,Mz.redo=fz,Mz.togglePreview=gz,Mz.toggleSideBySide=hz,Mz.toggleFullScreen=XC,Mz.prototype.toggleBold=function(){VC(this)},Mz.prototype.toggleItalic=function(){YC(this)},Mz.prototype.toggleStrikethrough=function(){KC(this)},Mz.prototype.toggleBlockquote=function(){ZC(this)},Mz.prototype.toggleHeadingSmaller=function(){QC(this)},Mz.prototype.toggleHeadingBigger=function(){ez(this)},Mz.prototype.toggleHeading1=function(){tz(this)},Mz.prototype.toggleHeading2=function(){rz(this)},Mz.prototype.toggleHeading3=function(){nz(this)},Mz.prototype.toggleCodeBlock=function(){JC(this)},Mz.prototype.toggleUnorderedList=function(){iz(this)},Mz.prototype.toggleOrderedList=function(){oz(this)},Mz.prototype.cleanBlock=function(){az(this)},Mz.prototype.drawLink=function(){sz(this)},Mz.prototype.drawImage=function(){cz(this)},Mz.prototype.drawUploadedImage=function(){lz(this)},Mz.prototype.drawTable=function(){pz(this)},Mz.prototype.drawHorizontalRule=function(){dz(this)},Mz.prototype.undo=function(){mz(this)},Mz.prototype.redo=function(){fz(this)},Mz.prototype.togglePreview=function(){gz(this)},Mz.prototype.toggleSideBySide=function(){hz(this)},Mz.prototype.toggleFullScreen=function(){XC(this)},Mz.prototype.isPreviewActive=function(){var e=this.codemirror.getWrapperElement().lastChild;return/editor-preview-active/.test(e.className)},Mz.prototype.isSideBySideActive=function(){var e=this.codemirror.getWrapperElement().nextSibling;return/editor-preview-active-side/.test(e.className)},Mz.prototype.isFullscreenActive=function(){return this.codemirror.getOption("fullScreen")},Mz.prototype.getState=function(){return GC(this.codemirror)},Mz.prototype.toTextArea=function(){var e=this.codemirror,t=e.getWrapperElement(),r=t.parentNode;r&&(this.gui.toolbar&&r.removeChild(this.gui.toolbar),this.gui.statusbar&&r.removeChild(this.gui.statusbar),this.gui.sideBySide&&r.removeChild(this.gui.sideBySide)),r.parentNode.insertBefore(t,r),r.remove(),e.toTextArea(),this.autosaveTimeoutId&&(clearTimeout(this.autosaveTimeoutId),this.autosaveTimeoutId=void 0,this.clearAutosavedValue())};var Iz=Mz;t('/**\n * easymde v2.16.1\n * Copyright Jeroen Akkerman\n * @link https://github.com/ionaru/easy-markdown-editor\n * @license MIT\n */\n.CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor .CodeMirror-line::selection,.cm-fat-cursor .CodeMirror-line>span::selection,.cm-fat-cursor .CodeMirror-line>span>span::selection{background:0 0}.cm-fat-cursor .CodeMirror-line::-moz-selection,.cm-fat-cursor .CodeMirror-line>span::-moz-selection,.cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:0 0}.cm-fat-cursor{caret-color:transparent}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-type,.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:red}.cm-invalidchar{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none;outline:0}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:0 0!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:0}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:\'\'}span.CodeMirror-selectedtext{background:0 0}.EasyMDEContainer{display:block}.CodeMirror-rtl pre{direction:rtl}.EasyMDEContainer.sided--no-fullscreen{display:flex;flex-direction:row;flex-wrap:wrap}.EasyMDEContainer .CodeMirror{box-sizing:border-box;height:auto;border:1px solid #ddd;border-bottom-left-radius:4px;border-bottom-right-radius:4px;padding:10px;font:inherit;z-index:0;word-wrap:break-word}.EasyMDEContainer .CodeMirror-scroll{cursor:text}.EasyMDEContainer .CodeMirror-fullscreen{background:#fff;position:fixed!important;top:50px;left:0;right:0;bottom:0;height:auto;z-index:8;border-right:none!important;border-bottom-right-radius:0!important}.EasyMDEContainer .CodeMirror-sided{width:50%!important}.EasyMDEContainer.sided--no-fullscreen .CodeMirror-sided{border-right:none!important;border-bottom-right-radius:0;position:relative;flex:1 1 auto}.EasyMDEContainer .CodeMirror-placeholder{opacity:.5}.EasyMDEContainer .CodeMirror-focused .CodeMirror-selected{background:#d9d9d9}.editor-toolbar{position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;padding:9px 10px;border-top:1px solid #bbb;border-left:1px solid #bbb;border-right:1px solid #bbb;border-top-left-radius:4px;border-top-right-radius:4px}.editor-toolbar.fullscreen{width:100%;height:50px;padding-top:10px;padding-bottom:10px;box-sizing:border-box;background:#fff;border:0;position:fixed;top:0;left:0;opacity:1;z-index:9}.editor-toolbar.fullscreen::before{width:20px;height:50px;background:-moz-linear-gradient(left,#fff 0,rgba(255,255,255,0) 100%);background:-webkit-gradient(linear,left top,right top,color-stop(0,#fff),color-stop(100%,rgba(255,255,255,0)));background:-webkit-linear-gradient(left,#fff 0,rgba(255,255,255,0) 100%);background:-o-linear-gradient(left,#fff 0,rgba(255,255,255,0) 100%);background:-ms-linear-gradient(left,#fff 0,rgba(255,255,255,0) 100%);background:linear-gradient(to right,#fff 0,rgba(255,255,255,0) 100%);position:fixed;top:0;left:0;margin:0;padding:0}.editor-toolbar.fullscreen::after{width:20px;height:50px;background:-moz-linear-gradient(left,rgba(255,255,255,0) 0,#fff 100%);background:-webkit-gradient(linear,left top,right top,color-stop(0,rgba(255,255,255,0)),color-stop(100%,#fff));background:-webkit-linear-gradient(left,rgba(255,255,255,0) 0,#fff 100%);background:-o-linear-gradient(left,rgba(255,255,255,0) 0,#fff 100%);background:-ms-linear-gradient(left,rgba(255,255,255,0) 0,#fff 100%);background:linear-gradient(to right,rgba(255,255,255,0) 0,#fff 100%);position:fixed;top:0;right:0;margin:0;padding:0}.EasyMDEContainer.sided--no-fullscreen .editor-toolbar{width:100%}.editor-toolbar .easymde-dropdown,.editor-toolbar button{background:0 0;display:inline-block;text-align:center;text-decoration:none!important;height:30px;margin:0;padding:0;border:1px solid transparent;border-radius:3px;cursor:pointer}.editor-toolbar button{width:30px}.editor-toolbar button.active,.editor-toolbar button:hover{background:#fcfcfc;border-color:#95a5a6}.editor-toolbar i.separator{display:inline-block;width:0;border-left:1px solid #d9d9d9;border-right:1px solid #fff;color:transparent;text-indent:-10px;margin:0 6px}.editor-toolbar button:after{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:65%;vertical-align:text-bottom;position:relative;top:2px}.editor-toolbar button.heading-1:after{content:"1"}.editor-toolbar button.heading-2:after{content:"2"}.editor-toolbar button.heading-3:after{content:"3"}.editor-toolbar button.heading-bigger:after{content:"▲"}.editor-toolbar button.heading-smaller:after{content:"▼"}.editor-toolbar.disabled-for-preview button:not(.no-disable){opacity:.6;pointer-events:none}@media only screen and (max-width:700px){.editor-toolbar i.no-mobile{display:none}}.editor-statusbar{padding:8px 10px;font-size:12px;color:#959694;text-align:right}.EasyMDEContainer.sided--no-fullscreen .editor-statusbar{width:100%}.editor-statusbar span{display:inline-block;min-width:4em;margin-left:1em}.editor-statusbar .lines:before{content:\'lines: \'}.editor-statusbar .words:before{content:\'words: \'}.editor-statusbar .characters:before{content:\'characters: \'}.editor-preview-full{position:absolute;width:100%;height:100%;top:0;left:0;z-index:7;overflow:auto;display:none;box-sizing:border-box}.editor-preview-side{position:fixed;bottom:0;width:50%;top:50px;right:0;z-index:9;overflow:auto;display:none;box-sizing:border-box;border:1px solid #ddd;word-wrap:break-word}.editor-preview-active-side{display:block}.EasyMDEContainer.sided--no-fullscreen .editor-preview-active-side{flex:1 1 auto;height:auto;position:static}.editor-preview-active{display:block}.editor-preview{padding:10px;background:#fafafa}.editor-preview>p{margin-top:0}.editor-preview pre{background:#eee;margin-bottom:10px}.editor-preview table td,.editor-preview table th{border:1px solid #ddd;padding:5px}.cm-s-easymde .cm-tag{color:#63a35c}.cm-s-easymde .cm-attribute{color:#795da3}.cm-s-easymde .cm-string{color:#183691}.cm-s-easymde .cm-header-1{font-size:200%;line-height:200%}.cm-s-easymde .cm-header-2{font-size:160%;line-height:160%}.cm-s-easymde .cm-header-3{font-size:125%;line-height:125%}.cm-s-easymde .cm-header-4{font-size:110%;line-height:110%}.cm-s-easymde .cm-comment{background:rgba(0,0,0,.05);border-radius:2px}.cm-s-easymde .cm-link{color:#7f8c8d}.cm-s-easymde .cm-url{color:#aab2b3}.cm-s-easymde .cm-quote{color:#7f8c8d;font-style:italic}.editor-toolbar .easymde-dropdown{position:relative;background:linear-gradient(to bottom right,#fff 0,#fff 84%,#333 50%,#333 100%);border-radius:0;border:1px solid #fff}.editor-toolbar .easymde-dropdown:hover{background:linear-gradient(to bottom right,#fff 0,#fff 84%,#333 50%,#333 100%)}.easymde-dropdown-content{display:block;visibility:hidden;position:absolute;background-color:#f9f9f9;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);padding:8px;z-index:2;top:30px}.easymde-dropdown:active .easymde-dropdown-content,.easymde-dropdown:focus .easymde-dropdown-content,.easymde-dropdown:focus-within .easymde-dropdown-content{visibility:visible}span[data-img-src]::after{content:\'\';background-image:var(--bg-image);display:block;max-height:100%;max-width:100%;background-size:contain;height:0;padding-top:var(--height);width:var(--width);background-repeat:no-repeat}.CodeMirror .cm-spell-error:not(.cm-url):not(.cm-comment):not(.cm-tag):not(.cm-word){background:rgba(255,0,0,.15)}');function Oz(e){let t,n;return{c(){t=_("div"),n=_("textarea"),n.disabled=!0,j(n,"id",e[0]),j(t,"style",e[3]),j(t,"class","svelte-1gaj2sn"),X(t,"disabled",e[1])},m(r,i){D(r,t,i),A(t,n),e[9](n)},p(e,[r]){1&r&&j(n,"id",e[0]),8&r&&j(t,"style",e[3]),2&r&&X(t,"disabled",e[1])},i:r,o:r,d(r){r&&T(t),e[9](null)}}}function Bz(e,t,r){let n,i,{height:o=null}=t,{scroll:a=!0}=t,{easyMDEOptions:s=null}=t,{mde:c=null}=t,{id:l=null}=t,{fullScreenOffset:u=null}=t,{disabled:p=!1}=t;ne((()=>(r(4,o=o||"200px"),r(5,c=new Iz({element:i,spellChecker:!1,status:!1,unorderedListStyle:"-",maxHeight:a?o:void 0,minHeight:a?void 0:o,...s})),()=>{c.toTextArea()})));return e.$$set=e=>{"height"in e&&r(4,o=e.height),"scroll"in e&&r(6,a=e.scroll),"easyMDEOptions"in e&&r(7,s=e.easyMDEOptions),"mde"in e&&r(5,c=e.mde),"id"in e&&r(0,l=e.id),"fullScreenOffset"in e&&r(8,u=e.fullScreenOffset),"disabled"in e&&r(1,p=e.disabled)},e.$$.update=()=>{256&e.$$.dirty&&r(3,n=(e=>{let t="";return t+=`--fullscreen-offset-x:${e?.x||"0px"};`,t+=`--fullscreen-offset-y:${e?.y||"0px"};`,t})(u))},[l,p,i,n,o,c,a,s,u,function(e){le[e?"unshift":"push"]((()=>{i=e,r(2,i)}))}]}t(".disabled.svelte-1gaj2sn textarea{display:none}.disabled.svelte-1gaj2sn .CodeMirror-cursor{display:none}.disabled.svelte-1gaj2sn .EasyMDEContainer{pointer-events:none}.disabled.svelte-1gaj2sn .editor-toolbar button i{color:var(--spectrum-global-color-gray-400)}.disabled.svelte-1gaj2sn .CodeMirror{color:var(--spectrum-global-color-gray-600)}.EasyMDEContainer .editor-toolbar{background:var(--spectrum-global-color-gray-50);border-top:1px solid var(--spectrum-alias-border-color);border-left:1px solid var(--spectrum-alias-border-color);border-right:1px solid var(--spectrum-alias-border-color)}.EasyMDEContainer .CodeMirror{border:1px solid var(--spectrum-alias-border-color);background:var(--spectrum-global-color-gray-50);color:var(--spectrum-alias-text-color)}.EasyMDEContainer .editor-toolbar button.active{background:var(--spectrum-global-color-gray-200);border-color:var(--spectrum-global-color-gray-400)}.EasyMDEContainer .editor-toolbar button:hover{background:var(--spectrum-global-color-gray-200);border-color:var(--spectrum-global-color-gray-400)}.EasyMDEContainer .editor-toolbar button i{color:var(--spectrum-global-color-gray-800)}.EasyMDEContainer .editor-toolbar i.separator{border-color:var(--spectrum-global-color-gray-300)}.EasyMDEContainer .CodeMirror-cursor{border-color:var(--spectrum-alias-text-color)}.EasyMDEContainer .CodeMirror-selectedtext{background:var(--spectrum-global-color-gray-400) !important}.EasyMDEContainer .CodeMirror-selected{background:var(--spectrum-global-color-gray-400) !important}.EasyMDEContainer .cm-s-easymde .cm-link{color:var(--spectrum-global-color-gray-600)}.EasyMDEContainer .cm-s-easymde .cm-url{color:var(--spectrum-global-color-gray-500)}.EasyMDEContainer .editor-preview{background:var(--spectrum-global-color-gray-50)}.EasyMDEContainer .editor-preview{border:1px solid var(--spectrum-alias-border-color)}.EasyMDEContainer .cm-s-easymde .cm-comment{background:var(--spectrum-global-color-gray-100)}.EasyMDEContainer pre{background:var(--spectrum-global-color-gray-100);padding:4px;border-radius:4px}.EasyMDEContainer code{color:#e83e8c}.EasyMDEContainer pre code{color:var(--spectrum-alias-text-color)}.EasyMDEContainer blockquote{border-left:4px solid var(--spectrum-global-color-gray-400);color:var(--spectrum-global-color-gray-700);margin-left:0;padding-left:20px}.EasyMDEContainer hr{background-color:var(--spectrum-global-color-gray-300);border:none;height:2px}.EasyMDEContainer td, .EasyMDEContainer th{border-color:var(--spectrum-alias-border-color) !important}.EasyMDEContainer a{color:var(--primaryColor)}.EasyMDEContainer a:hover{color:var(--primaryColorHover)}.EasyMDEContainer .editor-toolbar.fullscreen{left:var(--fullscreen-offset-x);top:var(--fullscreen-offset-y)}.EasyMDEContainer .CodeMirror-fullscreen{left:var(--fullscreen-offset-x);top:calc(50px + var(--fullscreen-offset-y))}.EasyMDEContainer .CodeMirror-fullscreen.CodeMirror-sided{width:calc((100% - var(--fullscreen-offset-x)) / 2) !important}.EasyMDEContainer .editor-preview-side{left:calc(50% + (var(--fullscreen-offset-x) / 2));top:calc(50px + var(--fullscreen-offset-y));width:calc((100% - var(--fullscreen-offset-x)) / 2) !important}");class Pz extends Ne{constructor(e){super(),Re(this,e,Bz,Oz,l,{height:4,scroll:6,easyMDEOptions:7,mde:5,id:0,fullScreenOffset:8,disabled:1})}}function jz(e){let t,r,n;function i(t){e[8](t)}let o={scroll:!0,height:e[1],id:e[3],fullScreenOffset:e[4],disabled:e[5],easyMDEOptions:{initialValue:e[0],placeholder:e[2],...e[6]}};return void 0!==e[7]&&(o.mde=e[7]),t=new Pz({props:o}),le.push((()=>Be(t,"mde",i))),{c(){Pe(t.$$.fragment)},m(e,r){je(t,e,r),n=!0},p(e,n){const i={};2&n&&(i.height=e[1]),8&n&&(i.id=e[3]),16&n&&(i.fullScreenOffset=e[4]),32&n&&(i.disabled=e[5]),69&n&&(i.easyMDEOptions={initialValue:e[0],placeholder:e[2],...e[6]}),!r&&128&n&&(r=!0,i.mde=e[7],ge((()=>r=!1))),t.$set(i)},i(e){n||(Te(t.$$.fragment,e),n=!0)},o(e){$e(t.$$.fragment,e),n=!1},d(e){Fe(t,e)}}}function Fz(e){let t,n,i=e[1],o=jz(e);return{c(){o.c(),t=I()},m(e,r){o.m(e,r),D(e,t,r),n=!0},p(e,[n]){2&n&&l(i,i=e[1])?(Ae(),$e(o,1,1,r),De(),o=jz(e),o.c(),Te(o),o.m(t.parentNode,t)):o.p(e,n)},i(e){n||(Te(o),n=!0)},o(e){$e(o),n=!1},d(e){e&&T(t),o.d(e)}}}function Rz(e,t,r){let{value:n=null}=t,{height:i=null}=t,{placeholder:o=null}=t,{id:a=null}=t,{fullScreenOffset:s=0}=t,{disabled:c=!1}=t,{easyMDEOptions:l}=t;const u=ie();let p,d;const m=((e,t)=>{let r;return()=>{clearTimeout(r),r=setTimeout(e,t)}})((()=>{p=d.value(),u("change",p)}),250);return e.$$set=e=>{"value"in e&&r(0,n=e.value),"height"in e&&r(1,i=e.height),"placeholder"in e&&r(2,o=e.placeholder),"id"in e&&r(3,a=e.id),"fullScreenOffset"in e&&r(4,s=e.fullScreenOffset),"disabled"in e&&r(5,c=e.disabled),"easyMDEOptions"in e&&r(6,l=e.easyMDEOptions)},e.$$.update=()=>{var t;1&e.$$.dirty&&(t=n,d&&t!==p&&d.value(t)),128&e.$$.dirty&&d?.codemirror.on("change",m)},[n,i,o,a,s,c,l,d,function(e){d=e,r(7,d)}]}class Nz extends Ne{constructor(e){super(),Re(this,e,Rz,Fz,l,{value:0,height:1,placeholder:2,id:3,fullScreenOffset:4,disabled:5,easyMDEOptions:6})}}function qz(e){let t,r,n,i;function o(t){e[3](t)}let a={scroll:!1,easyMDEOptions:{initialValue:e[0],toolbar:!1}};return void 0!==e[2]&&(a.mde=e[2]),r=new Pz({props:a}),le.push((()=>Be(r,"mde",o))),{c(){t=_("div"),Pe(r.$$.fragment),j(t,"class","markdown-viewer svelte-digdb7"),U(t,"height",e[1])},m(e,n){D(e,t,n),je(r,t,null),i=!0},p(e,[o]){const a={};1&o&&(a.easyMDEOptions={initialValue:e[0],toolbar:!1}),!n&&4&o&&(n=!0,a.mde=e[2],ge((()=>n=!1))),r.$set(a),(!i||2&o)&&U(t,"height",e[1])},i(e){i||(Te(r.$$.fragment,e),i=!0)},o(e){$e(r.$$.fragment,e),i=!1},d(e){e&&T(t),Fe(r)}}}function Hz(e,t,r){let n,{value:i}=t,{height:o}=t;return e.$$set=e=>{"value"in e&&r(0,i=e.value),"height"in e&&r(1,o=e.height)},e.$$.update=()=>{5&e.$$.dirty&&n&&n.value(i||""),4&e.$$.dirty&&n&&!n.isPreviewActive()&&n.togglePreview()},[i,o,n,function(e){n=e,r(2,n)}]}t(".markdown-viewer.svelte-digdb7{overflow:auto}.markdown-viewer.svelte-digdb7 .editor-preview{padding:0;border:none;background:transparent}.markdown-viewer.svelte-digdb7 .CodeMirror{border:none;background:transparent;padding:0}.markdown-viewer.svelte-digdb7 .EasyMDEContainer{background:transparent}.markdown-viewer.svelte-digdb7 .CodeMirror-scroll{display:none}.markdown-viewer.svelte-digdb7 .CodeMirror-vscrollbar{display:none !important}.markdown-viewer.svelte-digdb7 .editor-preview-full{position:relative}.markdown-viewer.svelte-digdb7 .editor-preview-full > :first-child{margin-top:0}.markdown-viewer.svelte-digdb7 .editor-preview-full > :last-child{margin-bottom:0}.markdown-viewer.svelte-digdb7 .editor-preview-full pre{background:var(--spectrum-global-color-gray-200)}");class Uz extends Ne{constructor(e){super(),Re(this,e,Hz,qz,l,{value:0,height:1})}}function Gz(e){let t,r,n;return r=new Nz({props:{value:e[0],placeholder:e[1],height:e[4],id:e[5],fullScreenOffset:e[6],disabled:e[2],easyMDEOptions:e[7]}}),r.$on("change",e[8]),{c(){t=_("div"),Pe(r.$$.fragment),j(t,"class","svelte-rs8sig"),X(t,"error",e[3])},m(e,i){D(e,t,i),je(r,t,null),n=!0},p(e,[n]){const i={};1&n&&(i.value=e[0]),2&n&&(i.placeholder=e[1]),16&n&&(i.height=e[4]),32&n&&(i.id=e[5]),64&n&&(i.fullScreenOffset=e[6]),4&n&&(i.disabled=e[2]),128&n&&(i.easyMDEOptions=e[7]),r.$set(i),8&n&&X(t,"error",e[3])},i(e){n||(Te(r.$$.fragment,e),n=!0)},o(e){$e(r.$$.fragment,e),n=!1},d(e){e&&T(t),Fe(r)}}}function Wz(e,t,r){let{value:n=""}=t,{placeholder:i=null}=t,{disabled:o=!1}=t,{error:a=null}=t,{height:s=null}=t,{id:c=null}=t,{fullScreenOffset:l=null}=t,{easyMDEOptions:u=null}=t;return e.$$set=e=>{"value"in e&&r(0,n=e.value),"placeholder"in e&&r(1,i=e.placeholder),"disabled"in e&&r(2,o=e.disabled),"error"in e&&r(3,a=e.error),"height"in e&&r(4,s=e.height),"id"in e&&r(5,c=e.id),"fullScreenOffset"in e&&r(6,l=e.fullScreenOffset),"easyMDEOptions"in e&&r(7,u=e.easyMDEOptions)},[n,i,o,a,s,c,l,u,function(t){se(e,t)}]}t(".error.svelte-rs8sig .EasyMDEContainer .editor-toolbar{border-top-color:var(--spectrum-semantic-negative-color-default);border-left-color:var(--spectrum-semantic-negative-color-default);border-right-color:var(--spectrum-semantic-negative-color-default)}.error.svelte-rs8sig .EasyMDEContainer .CodeMirror{border-bottom-color:var(--spectrum-semantic-negative-color-default);border-left-color:var(--spectrum-semantic-negative-color-default);border-right-color:var(--spectrum-semantic-negative-color-default)}.error.svelte-rs8sig .EasyMDEContainer .editor-preview-side{border-bottom-color:var(--spectrum-semantic-negative-color-default);border-right-color:var(--spectrum-semantic-negative-color-default)}");class Xz extends Ne{constructor(e){super(),Re(this,e,Wz,Gz,l,{value:0,placeholder:1,disabled:2,error:3,height:4,id:5,fullScreenOffset:6,easyMDEOptions:7})}}function Vz(e){let t,r;return t=new Xz({props:{error:e[5],disabled:e[4],value:e[0],placeholder:e[3],height:e[6],id:e[7],fullScreenOffset:e[8],easyMDEOptions:e[9]}}),t.$on("change",e[10]),{c(){Pe(t.$$.fragment)},m(e,n){je(t,e,n),r=!0},p(e,r){const n={};32&r&&(n.error=e[5]),16&r&&(n.disabled=e[4]),1&r&&(n.value=e[0]),8&r&&(n.placeholder=e[3]),64&r&&(n.height=e[6]),128&r&&(n.id=e[7]),256&r&&(n.fullScreenOffset=e[8]),512&r&&(n.easyMDEOptions=e[9]),t.$set(n)},i(e){r||(Te(t.$$.fragment,e),r=!0)},o(e){$e(t.$$.fragment,e),r=!1},d(e){Fe(t,e)}}}function Yz(e){let t,r;return t=new ft({props:{label:e[1],labelPosition:e[2],error:e[5],$$slots:{default:[Vz]},$$scope:{ctx:e}}}),{c(){Pe(t.$$.fragment)},m(e,n){je(t,e,n),r=!0},p(e,[r]){const n={};2&r&&(n.label=e[1]),4&r&&(n.labelPosition=e[2]),32&r&&(n.error=e[5]),5113&r&&(n.$$scope={dirty:r,ctx:e}),t.$set(n)},i(e){r||(Te(t.$$.fragment,e),r=!0)},o(e){$e(t.$$.fragment,e),r=!1},d(e){Fe(t,e)}}}function Kz(e,t,r){let{value:n=null}=t,{label:i=null}=t,{labelPosition:o="above"}=t,{placeholder:a=null}=t,{disabled:s=!1}=t,{error:c=null}=t,{height:l=null}=t,{id:u=null}=t,{fullScreenOffset:p=null}=t,{easyMDEOptions:d=null}=t;const m=ie();return e.$$set=e=>{"value"in e&&r(0,n=e.value),"label"in e&&r(1,i=e.label),"labelPosition"in e&&r(2,o=e.labelPosition),"placeholder"in e&&r(3,a=e.placeholder),"disabled"in e&&r(4,s=e.disabled),"error"in e&&r(5,c=e.error),"height"in e&&r(6,l=e.height),"id"in e&&r(7,u=e.id),"fullScreenOffset"in e&&r(8,p=e.fullScreenOffset),"easyMDEOptions"in e&&r(9,d=e.easyMDEOptions)},[n,i,o,a,s,c,l,u,p,d,e=>{r(0,n=e.detail),m("change",e.detail)}]}class Jz extends Ne{constructor(e){super(),Re(this,e,Kz,Yz,l,{value:0,label:1,labelPosition:2,placeholder:3,disabled:4,error:5,height:6,id:7,fullScreenOffset:8,easyMDEOptions:9})}}function Zz(e){let t,n;return{c(){t=_("div"),n=M(e[0]),j(t,"class","bold svelte-9amtlb")},m(e,r){D(e,t,r),A(t,n)},p(e,[t]){1&t&&q(n,e[0])},i:r,o:r,d(e){e&&T(t)}}}function Qz(e,t,r){let{value:n}=t;return e.$$set=e=>{"value"in e&&r(0,n=e.value)},[n]}t(".bold.svelte-9amtlb{font-weight:bold;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:var(--max-cell-width)}");class eS extends Ne{constructor(e){super(),Re(this,e,Qz,Zz,l,{value:0})}}function tS(e){let t,n;return{c(){t=_("code"),n=M(e[0]),j(t,"class","svelte-e82i3")},m(e,r){D(e,t,r),A(t,n)},p(e,[t]){1&t&&q(n,e[0])},i:r,o:r,d(e){e&&T(t)}}}function rS(e,t,r){let{value:n}=t;return e.$$set=e=>{"value"in e&&r(0,n=e.value)},[n]}t("code.svelte-e82i3{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:var(--max-cell-width)}");class nS extends Ne{constructor(e){super(),Re(this,e,rS,tS,l,{value:0})}}function iS(e){let t,r,n;const i=e[3].default,o=p(i,e,e[2],null);return{c(){t=_("p"),o&&o.c(),j(t,"class",r="spectrum-Detail spectrum-Detail--size"+e[0]+" svelte-129iykg"),X(t,"spectrum-Detail--serif",e[1])},m(e,r){D(e,t,r),o&&o.m(t,null),n=!0},p(e,[a]){o&&o.p&&(!n||4&a)&&m(o,i,e,e[2],a,null,null),(!n||1&a&&r!==(r="spectrum-Detail spectrum-Detail--size"+e[0]+" svelte-129iykg"))&&j(t,"class",r),3&a&&X(t,"spectrum-Detail--serif",e[1])},i(e){n||(Te(o,e),n=!0)},o(e){$e(o,e),n=!1},d(e){e&&T(t),o&&o.d(e)}}}function oS(e,t,r){let{$$slots:n={},$$scope:i}=t,{size:o="M"}=t,{serif:a=!1}=t;return e.$$set=e=>{"size"in e&&r(0,o=e.size),"serif"in e&&r(1,a=e.serif),"$$scope"in e&&r(2,i=e.$$scope)},[o,a,i,n]}t("p.svelte-129iykg{font-weight:600}");class aS extends Ne{constructor(e){super(),Re(this,e,oS,iS,l,{size:0,serif:1})}}function sS(e){let t,r,n;const i=e[2].default,o=p(i,e,e[1],null);return{c(){t=_("code"),o&&o.c(),j(t,"class",r="spectrum-Code spectrum-Code--size"+e[0])},m(e,r){D(e,t,r),o&&o.m(t,null),n=!0},p(e,[a]){o&&o.p&&(!n||2&a)&&m(o,i,e,e[1],a,null,null),(!n||1&a&&r!==(r="spectrum-Code spectrum-Code--size"+e[0]))&&j(t,"class",r)},i(e){n||(Te(o,e),n=!0)},o(e){$e(o,e),n=!1},d(e){e&&T(t),o&&o.d(e)}}}function cS(e,t,r){let{$$slots:n={},$$scope:i}=t,{size:o="M"}=t;return e.$$set=e=>{"size"in e&&r(0,o=e.size),"$$scope"in e&&r(1,i=e.$$scope)},[o,i,n]}class lS extends Ne{constructor(e){super(),Re(this,e,cS,sS,l,{size:0})}}function uS(e,t,r){const n=e.slice();return n[9]=t[r],n}function pS(e){let t,r=e[2],n=[];for(let t=0;t<r.length;t+=1)n[t]=dS(uS(e,r,t));return{c(){for(let e=0;e<n.length;e+=1)n[e].c();t=I()},m(e,r){for(let t=0;t<n.length;t+=1)n[t].m(e,r);D(e,t,r)},p(e,i){if(253&i){let o;for(r=e[2],o=0;o<r.length;o+=1){const a=uS(e,r,o);n[o]?n[o].p(a,i):(n[o]=dS(a),n[o].c(),n[o].m(t.parentNode,t))}for(;o<n.length;o+=1)n[o].d(1);n.length=r.length}},d(e){$(n,e),e&&T(t)}}}function dS(e){let t,r,n,i,o,a,s,c,l,u,p,d,m,f,h=e[5](e[9])+"";return{c(){t=_("div"),r=_("label"),n=_("input"),a=L(),s=_("span"),s.innerHTML='<svg class="spectrum-Icon spectrum-UIIcon-Checkmark100 spectrum-Checkbox-checkmark" focusable="false" aria-hidden="true"><use xlink:href="#spectrum-css-icon-Checkmark100"></use></svg>',c=L(),l=_("span"),u=M(h),p=L(),n.value=i=e[6](e[9]),j(n,"type","checkbox"),j(n,"class","spectrum-Checkbox-input svelte-rergqh"),n.disabled=e[4],n.checked=o=e[0].includes(e[6](e[9])),j(s,"class","spectrum-Checkbox-box"),j(l,"class","spectrum-Checkbox-label"),j(r,"class","spectrum-Checkbox spectrum-Checkbox--sizeM spectrum-FieldGroup-item"),j(t,"title",d=e[5](e[9])),j(t,"class","spectrum-Checkbox spectrum-FieldGroup-item"),X(t,"is-invalid",!!e[3])},m(i,o){D(i,t,o),A(t,r),A(r,n),A(r,a),A(r,s),A(r,c),A(r,l),A(l,u),A(t,p),m||(f=O(n,"change",e[7]),m=!0)},p(e,r){68&r&&i!==(i=e[6](e[9]))&&(n.value=i),16&r&&(n.disabled=e[4]),69&r&&o!==(o=e[0].includes(e[6](e[9])))&&(n.checked=o),36&r&&h!==(h=e[5](e[9])+"")&&q(u,h),36&r&&d!==(d=e[5](e[9]))&&j(t,"title",d),8&r&&X(t,"is-invalid",!!e[3])},d(e){e&&T(t),m=!1,f()}}}function mS(e){let t,n,i=e[2]&&Array.isArray(e[2]),o=i&&pS(e);return{c(){t=_("div"),o&&o.c(),j(t,"class",n=v(`spectrum-FieldGroup spectrum-FieldGroup--${e[1]}`)+" svelte-rergqh")},m(e,r){D(e,t,r),o&&o.m(t,null)},p(e,[r]){4&r&&(i=e[2]&&Array.isArray(e[2])),i?o?o.p(e,r):(o=pS(e),o.c(),o.m(t,null)):o&&(o.d(1),o=null),2&r&&n!==(n=v(`spectrum-FieldGroup spectrum-FieldGroup--${e[1]}`)+" svelte-rergqh")&&j(t,"class",n)},i:r,o:r,d(e){e&&T(t),o&&o.d()}}}function fS(e,t,r){let{direction:n="vertical"}=t,{value:i=[]}=t,{options:o=[]}=t,{error:a=null}=t,{disabled:s=!1}=t,{getOptionLabel:c=(e=>e)}=t,{getOptionValue:l=(e=>e)}=t;const u=ie();return e.$$set=e=>{"direction"in e&&r(1,n=e.direction),"value"in e&&r(0,i=e.value),"options"in e&&r(2,o=e.options),"error"in e&&r(3,a=e.error),"disabled"in e&&r(4,s=e.disabled),"getOptionLabel"in e&&r(5,c=e.getOptionLabel),"getOptionValue"in e&&r(6,l=e.getOptionValue)},[i,n,o,a,s,c,l,e=>{let t=i,n=e.target.checked;!t.includes(e.target.value)&&n&&t.push(e.target.value),r(0,i=t),u("change",t.filter((t=>t!==e.target.value||n)))}]}t(".spectrum-Checkbox-input.svelte-rergqh{opacity:0}");class hS extends Ne{constructor(e){super(),Re(this,e,fS,mS,l,{direction:1,value:0,options:2,error:3,disabled:4,getOptionLabel:5,getOptionValue:6})}}function gS({target:e}){e.style.height="1px",e.style.height=+e.scrollHeight+"px"}function vS(e){return gS({target:e}),e.style.overflow="hidden",e.addEventListener("input",gS),{destroy:()=>e.removeEventListener("input",gS)}}export{mi as ActionButton,vi as ActionGroup,Oi as ActionMenu,Mr as Avatar,Dc as Badge,yC as Banner,AC as BannerDisplay,jn as Body,eS as BoldRenderer,On as Button,Fi as ButtonGroup,po as Checkbox,Or as ClearButton,lS as Code,nS as CodeRenderer,sC as ColorPicker,br as Combobox,Yo as Context,so as CoreCheckbox,hS as CoreCheckboxGroup,fr as CoreCombobox,Ps as CoreDatePicker,wn as CoreDropzone,Us as CoreMultiselect,Qi as CoreRadioGroup,Xz as CoreRichTextField,qt as CoreSearch,nr as CoreSelect,At as CoreStepper,Hi as CoreSwitch,It as CoreTextArea,bt as CoreTextField,Ns as DatePicker,aS as Detail,go as DetailSummary,ca as Divider,ti as Drawer,si as DrawerContent,Sn as Dropzone,Nn as Heading,zr as Helpers,et as Icon,fC as InlineAlert,kt as Input,Lo as Label,Bo as Layout,Dr as Link,Nz as MarkdownEditor,Uz as MarkdownViewer,Ti as Menu,Vo as MenuItem,qo as MenuSection,Uo as MenuSeparator,oa as Modal,$a as ModalContent,Vs as Multiselect,Ba as Notification,qa as NotificationDisplay,Fo as Page,Yk as Pagination,Si as Popover,So as ProgressBar,$o as ProgressCircle,no as RadioGroup,Jz as RichTextField,Wk as Search,sr as Select,Ga as SideNavigation,Qa as SideNavigationItem,Zk as StatusLight,_t as Stepper,Lk as Tab,Ck as Table,Dk as Tabs,Nr as Tag,Ur as Tags,jt as TextArea,Xi as Toggle,We as Tooltip,qk as TreeItem,Bk as TreeView,vS as autoResizeTextArea,xC as banner,Ft as clickOutside,_a as createNotificationStore,Ze as directions,Ea as notifications,bi as positionDropdown};
210
210
  //# sourceMappingURL=bbui.es.js.map