diff --git a/changelog.md b/changelog.md index be9bd6d..f091d75 100644 --- a/changelog.md +++ b/changelog.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) -## [Unreleased] +## [0.9.0] - 2024/07/09 ### Added @@ -232,6 +232,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add renderer for terraform files. - Import metadata instead of passing it through constructor in TerraformMetadata. +[0.9.0]: https://github.com/ditrit/terrator-plugin/blob/0.9.0/changelog.md [0.8.1]: https://github.com/ditrit/terrator-plugin/blob/0.8.1/changelog.md [0.8.0]: https://github.com/ditrit/terrator-plugin/blob/0.8.0/changelog.md [0.7.1]: https://github.com/ditrit/terrator-plugin/blob/0.7.1/changelog.md diff --git a/dist/terrator-plugin.js b/dist/terrator-plugin.js index 309e06b..fda6007 100644 --- a/dist/terrator-plugin.js +++ b/dist/terrator-plugin.js @@ -1,2 +1,2 @@ /*! For license information please see terrator-plugin.js.LICENSE.txt */ -(()=>{var e={19:(e,t,n)=>{"use strict";var r=n(354),i=n(30),o=n(6),s=n(585),a=n(492),u=n(950),c=n(845),l=n(897),h=n(740);e.exports=v,v.prototype.validate=function(e,t){var n;if("string"==typeof e){if(!(n=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var r=this._addSchema(e);n=r.validate||this._compile(r)}var i=n(t);return!0!==n.$async&&(this.errors=n.errors),i},v.prototype.compile=function(e,t){var n=this._addSchema(e,void 0,t);return n.validate||this._compile(n)},v.prototype.addSchema=function(e,t,n,r){if(Array.isArray(e)){for(var o=0;o{"use strict";var t=e.exports=function(){this._cache={}};t.prototype.put=function(e,t){this._cache[e]=t},t.prototype.get=function(e){return this._cache[e]},t.prototype.del=function(e){delete this._cache[e]},t.prototype.clear=function(){this._cache={}}},686:(e,t,n)=>{"use strict";var r=n(551).MissingRef;e.exports=function e(t,n,i){var o=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof n&&(i=n,n=void 0);var s=a(t).then((function(){var e=o._addSchema(t,void 0,n);return e.validate||u(e)}));return i&&s.then((function(e){i(null,e)}),i),s;function a(t){var n=t.$schema;return n&&!o.getSchema(n)?e.call(o,{$ref:n},!0):Promise.resolve()}function u(e){try{return o._compile(e)}catch(t){if(t instanceof r)return function(t){var r=t.missingSchema;if(c(r))throw new Error("Schema "+r+" is loaded but "+t.missingRef+" cannot be resolved");var i=o._loadingSchemas[r];return i||(i=o._loadingSchemas[r]=o._opts.loadSchema(r)).then(s,s),i.then((function(e){if(!c(r))return a(e).then((function(){c(r)||o.addSchema(e,r,void 0,n)}))})).then((function(){return u(e)}));function s(){delete o._loadingSchemas[r]}function c(e){return o._refs[e]||o._schemas[e]}}(t);throw t}}}},551:(e,t,n)=>{"use strict";var r=n(30);function i(e,t,n){this.message=n||i.message(e,t),this.missingRef=r.url(e,t),this.missingSchema=r.normalizeId(r.fullPath(this.missingRef))}function o(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}e.exports={Validation:o((function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0})),MissingRef:o(i)},i.message=function(e,t){return"can't resolve reference "+t+" from id "+e}},950:(e,t,n)=>{"use strict";var r=n(740),i=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,o=[0,31,28,31,30,31,30,31,31,30,31,30,31],s=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,a=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,u=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,c=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,l=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,h=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,f=/^(?:\/(?:[^~/]|~0|~1)*)*$/,p=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,d=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function m(e){return e="full"==e?"full":"fast",r.copy(m[e])}function y(e){var t=e.match(i);if(!t)return!1;var n=+t[1],r=+t[2],s=+t[3];return r>=1&&r<=12&&s>=1&&s<=(2==r&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(n)?29:o[r])}function v(e,t){var n=e.match(s);if(!n)return!1;var r=n[1],i=n[2],o=n[3],a=n[5];return(r<=23&&i<=59&&o<=59||23==r&&59==i&&60==o)&&(!t||a)}e.exports=m,m.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":c,url:l,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:a,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:w,uuid:h,"json-pointer":f,"json-pointer-uri-fragment":p,"relative-json-pointer":d},m.full={date:y,time:v,"date-time":function(e){var t=e.split(g);return 2==t.length&&y(t[0])&&v(t[1],!0)},uri:function(e){return _.test(e)&&u.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":c,url:l,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:a,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:w,uuid:h,"json-pointer":f,"json-pointer-uri-fragment":p,"relative-json-pointer":d};var g=/t|\s/i,_=/\/|:/,b=/[^\\]\\Z/;function w(e){if(b.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}},354:(e,t,n)=>{"use strict";var r=n(30),i=n(740),o=n(551),s=n(492),a=n(873),u=i.ucs2length,c=n(17),l=o.Validation;function h(e,t,n){var r=p.call(this,e,t,n);return r>=0?{index:r,compiling:!0}:(r=this._compilations.length,this._compilations[r]={schema:e,root:t,baseId:n},{index:r,compiling:!1})}function f(e,t,n){var r=p.call(this,e,t,n);r>=0&&this._compilations.splice(r,1)}function p(e,t,n){for(var r=0;r{"use strict";var r=n(579),i=n(17),o=n(740),s=n(585),a=n(106);function u(e,t,n){var r=this._refs[n];if("string"==typeof r){if(!this._refs[r])return u.call(this,e,t,r);r=this._refs[r]}if((r=r||this._schemas[n])instanceof s)return d(r.schema,this._opts.inlineRefs)?r.schema:r.validate||this._compile(r);var i,o,a,l=c.call(this,t,n);return l&&(i=l.schema,t=l.root,a=l.baseId),i instanceof s?o=i.validate||e.call(this,i.schema,t,void 0,a):void 0!==i&&(o=d(i,this._opts.inlineRefs)?i:e.call(this,i,t,void 0,a)),o}function c(e,t){var n=r.parse(t),i=g(n),o=v(this._getId(e.schema));if(0===Object.keys(e.schema).length||i!==o){var a=b(i),u=this._refs[a];if("string"==typeof u)return l.call(this,e,u,n);if(u instanceof s)u.validate||this._compile(u),e=u;else{if(!((u=this._schemas[a])instanceof s))return;if(u.validate||this._compile(u),a==b(t))return{schema:u,root:e,baseId:o};e=u}if(!e.schema)return;o=v(this._getId(e.schema))}return f.call(this,n,o,e.schema,e)}function l(e,t,n){var r=c.call(this,e,t);if(r){var i=r.schema,o=r.baseId;e=r.root;var s=this._getId(i);return s&&(o=w(o,s)),f.call(this,n,o,i,e)}}e.exports=u,u.normalizeId=b,u.fullPath=v,u.url=w,u.ids=function(e){var t=b(this._getId(e)),n={"":t},s={"":v(t,!1)},u={},c=this;return a(e,{allKeys:!0},(function(e,t,a,l,h,f,p){if(""!==t){var d=c._getId(e),m=n[l],y=s[l]+"/"+h;if(void 0!==p&&(y+="/"+("number"==typeof p?p:o.escapeFragment(p))),"string"==typeof d){d=m=b(m?r.resolve(m,d):d);var v=c._refs[d];if("string"==typeof v&&(v=c._refs[v]),v&&v.schema){if(!i(e,v.schema))throw new Error('id "'+d+'" resolves to more than one schema')}else if(d!=b(y))if("#"==d[0]){if(u[d]&&!i(e,u[d]))throw new Error('id "'+d+'" resolves to more than one schema');u[d]=e}else c._refs[d]=y}n[t]=m,s[t]=y}})),u},u.inlineRef=d,u.schema=c;var h=o.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function f(e,t,n,r){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var i=e.fragment.split("/"),s=1;s{"use strict";var r=n(403),i=n(740).toHash;e.exports=function(){var e=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],t=["type","$comment"];return e.all=i(t),e.types=i(["number","integer","string","array","object","boolean","null"]),e.forEach((function(n){n.rules=n.rules.map((function(n){var i;if("object"==typeof n){var o=Object.keys(n)[0];i=n[o],n=o,i.forEach((function(n){t.push(n),e.all[n]=!0}))}return t.push(n),e.all[n]={keyword:n,code:r[n],implements:i}})),e.all.$comment={keyword:"$comment",code:r.$comment},n.type&&(e.types[n.type]=n)})),e.keywords=i(t.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),e.custom={},e}},585:(e,t,n)=>{"use strict";var r=n(740);e.exports=function(e){r.copy(e,this)}},853:e=>{"use strict";e.exports=function(e){for(var t,n=0,r=e.length,i=0;i=55296&&t<=56319&&i{"use strict";function r(e,t,n,r){var i=r?" !== ":" === ",o=r?" || ":" && ",s=r?"!":"",a=r?"":"!";switch(e){case"null":return t+i+"null";case"array":return s+"Array.isArray("+t+")";case"object":return"("+s+t+o+"typeof "+t+i+'"object"'+o+a+"Array.isArray("+t+"))";case"integer":return"(typeof "+t+i+'"number"'+o+a+"("+t+" % 1)"+o+t+i+t+(n?o+s+"isFinite("+t+")":"")+")";case"number":return"(typeof "+t+i+'"'+e+'"'+(n?o+s+"isFinite("+t+")":"")+")";default:return"typeof "+t+i+'"'+e+'"'}}e.exports={copy:function(e,t){for(var n in t=t||{},e)t[n]=e[n];return t},checkDataType:r,checkDataTypes:function(e,t,n){if(1===e.length)return r(e[0],t,n,!0);var i="",s=o(e);for(var a in s.array&&s.object&&(i=s.null?"(":"(!"+t+" || ",i+="typeof "+t+' !== "object")',delete s.null,delete s.array,delete s.object),s.number&&delete s.integer,s)i+=(i?" && ":"")+r(a,t,n,!0);return i},coerceToTypes:function(e,t){if(Array.isArray(t)){for(var n=[],r=0;r=t)throw new Error("Cannot access property/index "+r+" levels up, current level is "+t);return n[t-r]}if(r>t)throw new Error("Cannot access data "+r+" levels up, current level is "+t);if(o="data"+(t-r||""),!i)return o}for(var a=o,c=i.split("/"),l=0;l{"use strict";var t=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];e.exports=function(e,n){for(var r=0;r{"use strict";var r=n(198);e.exports={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:r.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:r.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}}},667:e=>{"use strict";e.exports=function(e,t,n){var r,i=" ",o=e.level,s=e.dataLevel,a=e.schema[t],u=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,h="data"+(s||""),f=e.opts.$data&&a&&a.$data;f?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",r="schema"+o):r=a;var p="maximum"==t,d=p?"exclusiveMaximum":"exclusiveMinimum",m=e.schema[d],y=e.opts.$data&&m&&m.$data,v=p?"<":">",g=p?">":"<",_=void 0;if(!f&&"number"!=typeof a&&void 0!==a)throw new Error(t+" must be number");if(!y&&void 0!==m&&"number"!=typeof m&&"boolean"!=typeof m)throw new Error(d+" must be number or boolean");if(y){var b,w=e.util.getData(m.$data,s,e.dataPathArr),x="exclusive"+o,k="exclType"+o,E="exclIsNumber"+o,S="' + "+(A="op"+o)+" + '";i+=" var schemaExcl"+o+" = "+w+"; ",i+=" var "+x+"; var "+k+" = typeof "+(w="schemaExcl"+o)+"; if ("+k+" != 'boolean' && "+k+" != 'undefined' && "+k+" != 'number') { ",_=d,(b=b||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(_||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(i+=" , message: '"+d+" should be boolean' "),e.opts.verbose&&(i+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var T=i;i=b.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+T+"]); ":i+=" validate.errors = ["+T+"]; return false; ":i+=" var err = "+T+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else if ( ",f&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" "+k+" == 'number' ? ( ("+x+" = "+r+" === undefined || "+w+" "+v+"= "+r+") ? "+h+" "+g+"= "+w+" : "+h+" "+g+" "+r+" ) : ( ("+x+" = "+w+" === true) ? "+h+" "+g+"= "+r+" : "+h+" "+g+" "+r+" ) || "+h+" !== "+h+") { var op"+o+" = "+x+" ? '"+v+"' : '"+v+"='; ",void 0===a&&(_=d,c=e.errSchemaPath+"/"+d,r=w,f=y)}else if(S=v,(E="number"==typeof m)&&f){var A="'"+S+"'";i+=" if ( ",f&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" ( "+r+" === undefined || "+m+" "+v+"= "+r+" ? "+h+" "+g+"= "+m+" : "+h+" "+g+" "+r+" ) || "+h+" !== "+h+") { "}else E&&void 0===a?(x=!0,_=d,c=e.errSchemaPath+"/"+d,r=m,g+="="):(E&&(r=Math[p?"min":"max"](m,a)),m===(!E||r)?(x=!0,_=d,c=e.errSchemaPath+"/"+d,g+="="):(x=!1,S+="=")),A="'"+S+"'",i+=" if ( ",f&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" "+h+" "+g+" "+r+" || "+h+" !== "+h+") { ";return _=_||t,(b=b||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(_||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+A+", limit: "+r+", exclusive: "+x+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be "+S+" ",i+=f?"' + "+r:r+"'"),e.opts.verbose&&(i+=" , schema: ",i+=f?"validate.schema"+u:""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ",T=i,i=b.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+T+"]); ":i+=" validate.errors = ["+T+"]; return false; ":i+=" var err = "+T+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",l&&(i+=" else { "),i}},119:e=>{"use strict";e.exports=function(e,t,n){var r,i=" ",o=e.level,s=e.dataLevel,a=e.schema[t],u=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,h="data"+(s||""),f=e.opts.$data&&a&&a.$data;if(f?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",r="schema"+o):r=a,!f&&"number"!=typeof a)throw new Error(t+" must be number");i+="if ( ",f&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" "+h+".length "+("maxItems"==t?">":"<")+" "+r+") { ";var p=t,d=d||[];d.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(p||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxItems"==t?"more":"fewer",i+=" than ",i+=f?"' + "+r+" + '":""+a,i+=" items' "),e.opts.verbose&&(i+=" , schema: ",i+=f?"validate.schema"+u:""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var m=i;return i=d.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i}},935:e=>{"use strict";e.exports=function(e,t,n){var r,i=" ",o=e.level,s=e.dataLevel,a=e.schema[t],u=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,h="data"+(s||""),f=e.opts.$data&&a&&a.$data;if(f?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",r="schema"+o):r=a,!f&&"number"!=typeof a)throw new Error(t+" must be number");var p="maxLength"==t?">":"<";i+="if ( ",f&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),!1===e.opts.unicode?i+=" "+h+".length ":i+=" ucs2length("+h+") ",i+=" "+p+" "+r+") { ";var d=t,m=m||[];m.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(d||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT be ",i+="maxLength"==t?"longer":"shorter",i+=" than ",i+=f?"' + "+r+" + '":""+a,i+=" characters' "),e.opts.verbose&&(i+=" , schema: ",i+=f?"validate.schema"+u:""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var y=i;return i=m.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+y+"]); ":i+=" validate.errors = ["+y+"]; return false; ":i+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i}},298:e=>{"use strict";e.exports=function(e,t,n){var r,i=" ",o=e.level,s=e.dataLevel,a=e.schema[t],u=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,h="data"+(s||""),f=e.opts.$data&&a&&a.$data;if(f?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",r="schema"+o):r=a,!f&&"number"!=typeof a)throw new Error(t+" must be number");i+="if ( ",f&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" Object.keys("+h+").length "+("maxProperties"==t?">":"<")+" "+r+") { ";var p=t,d=d||[];d.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(p||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxProperties"==t?"more":"fewer",i+=" than ",i+=f?"' + "+r+" + '":""+a,i+=" properties' "),e.opts.verbose&&(i+=" , schema: ",i+=f?"validate.schema"+u:""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var m=i;return i=d.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i}},353:e=>{"use strict";e.exports=function(e,t,n){var r=" ",i=e.schema[t],o=e.schemaPath+e.util.getProperty(t),s=e.errSchemaPath+"/"+t,a=!e.opts.allErrors,u=e.util.copy(e),c="";u.level++;var l="valid"+u.level,h=u.baseId,f=!0,p=i;if(p)for(var d,m=-1,y=p.length-1;m0||!1===d:e.util.schemaHasRules(d,e.RULES.all))&&(f=!1,u.schema=d,u.schemaPath=o+"["+m+"]",u.errSchemaPath=s+"/"+m,r+=" "+e.validate(u)+" ",u.baseId=h,a&&(r+=" if ("+l+") { ",c+="}"));return a&&(r+=f?" if (true) { ":" "+c.slice(0,-1)+" "),r}},480:e=>{"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,l="data"+(o||""),h="valid"+i,f="errs__"+i,p=e.util.copy(e),d="";p.level++;var m="valid"+p.level,y=s.every((function(t){return e.opts.strictKeywords?"object"==typeof t&&Object.keys(t).length>0||!1===t:e.util.schemaHasRules(t,e.RULES.all)}));if(y){var v=p.baseId;r+=" var "+f+" = errors; var "+h+" = false; ";var g=e.compositeRule;e.compositeRule=p.compositeRule=!0;var _=s;if(_)for(var b,w=-1,x=_.length-1;w{"use strict";e.exports=function(e,t,n){var r=" ",i=e.schema[t],o=e.errSchemaPath+"/"+t,s=(e.opts.allErrors,e.util.toQuotedString(i));return!0===e.opts.$comment?r+=" console.log("+s+");":"function"==typeof e.opts.$comment&&(r+=" self._opts.$comment("+s+", "+e.util.toQuotedString(o)+", validate.root.schema);"),r}},224:e=>{"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,l="data"+(o||""),h="valid"+i,f=e.opts.$data&&s&&s.$data;f&&(r+=" var schema"+i+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; "),f||(r+=" var schema"+i+" = validate.schema"+a+";"),r+="var "+h+" = equal("+l+", schema"+i+"); if (!"+h+") { ";var p=p||[];p.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { allowedValue: schema"+i+" } ",!1!==e.opts.messages&&(r+=" , message: 'should be equal to constant' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),r+=" } "):r+=" {} ";var d=r;return r=p.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+d+"]); ":r+=" validate.errors = ["+d+"]; return false; ":r+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" }",c&&(r+=" else { "),r}},674:e=>{"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,l="data"+(o||""),h="valid"+i,f="errs__"+i,p=e.util.copy(e);p.level++;var d="valid"+p.level,m="i"+i,y=p.dataLevel=e.dataLevel+1,v="data"+y,g=e.baseId,_=e.opts.strictKeywords?"object"==typeof s&&Object.keys(s).length>0||!1===s:e.util.schemaHasRules(s,e.RULES.all);if(r+="var "+f+" = errors;var "+h+";",_){var b=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.schema=s,p.schemaPath=a,p.errSchemaPath=u,r+=" var "+d+" = false; for (var "+m+" = 0; "+m+" < "+l+".length; "+m+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0);var w=l+"["+m+"]";p.dataPathArr[y]=m;var x=e.validate(p);p.baseId=g,e.util.varOccurences(x,v)<2?r+=" "+e.util.varReplace(x,v,w)+" ":r+=" var "+v+" = "+w+"; "+x+" ",r+=" if ("+d+") break; } ",e.compositeRule=p.compositeRule=b,r+=" if (!"+d+") {"}else r+=" if ("+l+".length == 0) {";var k=k||[];k.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'should contain a valid item' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),r+=" } "):r+=" {} ";var E=r;return r=k.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+E+"]); ":r+=" validate.errors = ["+E+"]; return false; ":r+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } else { ",_&&(r+=" errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } "),e.opts.allErrors&&(r+=" } "),r}},992:e=>{"use strict";e.exports=function(e,t,n){var r,i,o=" ",s=e.level,a=e.dataLevel,u=e.schema[t],c=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,h=!e.opts.allErrors,f="data"+(a||""),p="valid"+s,d="errs__"+s,m=e.opts.$data&&u&&u.$data;m?(o+=" var schema"+s+" = "+e.util.getData(u.$data,a,e.dataPathArr)+"; ",i="schema"+s):i=u;var y,v,g,_,b,w=this,x="definition"+s,k=w.definition,E="";if(m&&k.$data){b="keywordValidate"+s;var S=k.validateSchema;o+=" var "+x+" = RULES.custom['"+t+"'].definition; var "+b+" = "+x+".validate;"}else{if(!(_=e.useCustomRule(w,u,e.schema,e)))return;i="validate.schema"+c,b=_.code,y=k.compile,v=k.inline,g=k.macro}var T=b+".errors",A="i"+s,O="ruleErr"+s,N=k.async;if(N&&!e.async)throw new Error("async keyword in sync schema");if(v||g||(o+=T+" = null;"),o+="var "+d+" = errors;var "+p+";",m&&k.$data&&(E+="}",o+=" if ("+i+" === undefined) { "+p+" = true; } else { ",S&&(E+="}",o+=" "+p+" = "+x+".validateSchema("+i+"); if ("+p+") { ")),v)k.statements?o+=" "+_.validate+" ":o+=" "+p+" = "+_.validate+"; ";else if(g){var P=e.util.copy(e);E="",P.level++;var C="valid"+P.level;P.schema=_.validate,P.schemaPath="";var R=e.compositeRule;e.compositeRule=P.compositeRule=!0;var L=e.validate(P).replace(/validate\.schema/g,b);e.compositeRule=P.compositeRule=R,o+=" "+L}else{(j=j||[]).push(o),o="",o+=" "+b+".call( ",e.opts.passContext?o+="this":o+="self",y||!1===k.schema?o+=" , "+f+" ":o+=" , "+i+" , "+f+" , validate.schema"+e.schemaPath+" ",o+=" , (dataPath || '')",'""'!=e.errorPath&&(o+=" + "+e.errorPath);var I=a?"data"+(a-1||""):"parentData",D=a?e.dataPathArr[a]:"parentDataProperty",M=o+=" , "+I+" , "+D+" , rootData ) ";o=j.pop(),!1===k.errors?(o+=" "+p+" = ",N&&(o+="await "),o+=M+"; "):o+=N?" var "+(T="customErrors"+s)+" = null; try { "+p+" = await "+M+"; } catch (e) { "+p+" = false; if (e instanceof ValidationError) "+T+" = e.errors; else throw e; } ":" "+T+" = null; "+p+" = "+M+"; "}if(k.modifying&&(o+=" if ("+I+") "+f+" = "+I+"["+D+"];"),o+=""+E,k.valid)h&&(o+=" if (true) { ");else{var j;o+=" if ( ",void 0===k.valid?(o+=" !",o+=g?""+C:""+p):o+=" "+!k.valid+" ",o+=") { ",r=w.keyword,(j=j||[]).push(o),o="",(j=j||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(r||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { keyword: '"+w.keyword+"' } ",!1!==e.opts.messages&&(o+=" , message: 'should pass \""+w.keyword+"\" keyword validation' "),e.opts.verbose&&(o+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),o+=" } "):o+=" {} ";var F=o;o=j.pop(),!e.compositeRule&&h?e.async?o+=" throw new ValidationError(["+F+"]); ":o+=" validate.errors = ["+F+"]; return false; ":o+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var B=o;o=j.pop(),v?k.errors?"full"!=k.errors&&(o+=" for (var "+A+"="+d+"; "+A+"{"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,l="data"+(o||""),h="errs__"+i,f=e.util.copy(e),p="";f.level++;var d="valid"+f.level,m={},y={},v=e.opts.ownProperties;for(w in s)if("__proto__"!=w){var g=s[w],_=Array.isArray(g)?y:m;_[w]=g}r+="var "+h+" = errors;";var b=e.errorPath;for(var w in r+="var missing"+i+";",y)if((_=y[w]).length){if(r+=" if ( "+l+e.util.getProperty(w)+" !== undefined ",v&&(r+=" && Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(w)+"') "),c){r+=" && ( ";var x=_;if(x)for(var k=-1,E=x.length-1;k0||!1===g:e.util.schemaHasRules(g,e.RULES.all))&&(r+=" "+d+" = true; if ( "+l+e.util.getProperty(w)+" !== undefined ",v&&(r+=" && Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(w)+"') "),r+=") { ",f.schema=g,f.schemaPath=a+e.util.getProperty(w),f.errSchemaPath=u+"/"+e.util.escapeFragment(w),r+=" "+e.validate(f)+" ",f.baseId=D,r+=" } ",c&&(r+=" if ("+d+") { ",p+="}"));return c&&(r+=" "+p+" if ("+h+" == errors) {"),r}},598:e=>{"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,l="data"+(o||""),h="valid"+i,f=e.opts.$data&&s&&s.$data;f&&(r+=" var schema"+i+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ");var p="i"+i,d="schema"+i;f||(r+=" var "+d+" = validate.schema"+a+";"),r+="var "+h+";",f&&(r+=" if (schema"+i+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+i+")) "+h+" = false; else {"),r+=h+" = false;for (var "+p+"=0; "+p+"<"+d+".length; "+p+"++) if (equal("+l+", "+d+"["+p+"])) { "+h+" = true; break; }",f&&(r+=" } "),r+=" if (!"+h+") { ";var m=m||[];m.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { allowedValues: schema"+i+" } ",!1!==e.opts.messages&&(r+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),r+=" } "):r+=" {} ";var y=r;return r=m.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+y+"]); ":r+=" validate.errors = ["+y+"]; return false; ":r+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" }",c&&(r+=" else { "),r}},400:e=>{"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,l="data"+(o||"");if(!1===e.opts.format)return c&&(r+=" if (true) { "),r;var h,f=e.opts.$data&&s&&s.$data;f?(r+=" var schema"+i+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",h="schema"+i):h=s;var p=e.opts.unknownFormats,d=Array.isArray(p);if(f)r+=" var "+(m="format"+i)+" = formats["+h+"]; var "+(y="isObject"+i)+" = typeof "+m+" == 'object' && !("+m+" instanceof RegExp) && "+m+".validate; var "+(v="formatType"+i)+" = "+y+" && "+m+".type || 'string'; if ("+y+") { ",e.async&&(r+=" var async"+i+" = "+m+".async; "),r+=" "+m+" = "+m+".validate; } if ( ",f&&(r+=" ("+h+" !== undefined && typeof "+h+" != 'string') || "),r+=" (","ignore"!=p&&(r+=" ("+h+" && !"+m+" ",d&&(r+=" && self._opts.unknownFormats.indexOf("+h+") == -1 "),r+=") || "),r+=" ("+m+" && "+v+" == '"+n+"' && !(typeof "+m+" == 'function' ? ",e.async?r+=" (async"+i+" ? await "+m+"("+l+") : "+m+"("+l+")) ":r+=" "+m+"("+l+") ",r+=" : "+m+".test("+l+"))))) {";else{var m;if(!(m=e.formats[s])){if("ignore"==p)return e.logger.warn('unknown format "'+s+'" ignored in schema at path "'+e.errSchemaPath+'"'),c&&(r+=" if (true) { "),r;if(d&&p.indexOf(s)>=0)return c&&(r+=" if (true) { "),r;throw new Error('unknown format "'+s+'" is used in schema at path "'+e.errSchemaPath+'"')}var y,v=(y="object"==typeof m&&!(m instanceof RegExp)&&m.validate)&&m.type||"string";if(y){var g=!0===m.async;m=m.validate}if(v!=n)return c&&(r+=" if (true) { "),r;if(g){if(!e.async)throw new Error("async format in sync schema");r+=" if (!(await "+(_="formats"+e.util.getProperty(s)+".validate")+"("+l+"))) { "}else{r+=" if (! ";var _="formats"+e.util.getProperty(s);y&&(_+=".validate"),r+="function"==typeof m?" "+_+"("+l+") ":" "+_+".test("+l+") ",r+=") { "}}var b=b||[];b.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { format: ",r+=f?""+h:""+e.util.toQuotedString(s),r+=" } ",!1!==e.opts.messages&&(r+=" , message: 'should match format \"",r+=f?"' + "+h+" + '":""+e.util.escapeQuotes(s),r+="\"' "),e.opts.verbose&&(r+=" , schema: ",r+=f?"validate.schema"+a:""+e.util.toQuotedString(s),r+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),r+=" } "):r+=" {} ";var w=r;return r=b.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+w+"]); ":r+=" validate.errors = ["+w+"]; return false; ":r+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } ",c&&(r+=" else { "),r}},532:e=>{"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,l="data"+(o||""),h="valid"+i,f="errs__"+i,p=e.util.copy(e);p.level++;var d="valid"+p.level,m=e.schema.then,y=e.schema.else,v=void 0!==m&&(e.opts.strictKeywords?"object"==typeof m&&Object.keys(m).length>0||!1===m:e.util.schemaHasRules(m,e.RULES.all)),g=void 0!==y&&(e.opts.strictKeywords?"object"==typeof y&&Object.keys(y).length>0||!1===y:e.util.schemaHasRules(y,e.RULES.all)),_=p.baseId;if(v||g){var b;p.createErrors=!1,p.schema=s,p.schemaPath=a,p.errSchemaPath=u,r+=" var "+f+" = errors; var "+h+" = true; ";var w=e.compositeRule;e.compositeRule=p.compositeRule=!0,r+=" "+e.validate(p)+" ",p.baseId=_,p.createErrors=!0,r+=" errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } ",e.compositeRule=p.compositeRule=w,v?(r+=" if ("+d+") { ",p.schema=e.schema.then,p.schemaPath=e.schemaPath+".then",p.errSchemaPath=e.errSchemaPath+"/then",r+=" "+e.validate(p)+" ",p.baseId=_,r+=" "+h+" = "+d+"; ",v&&g?r+=" var "+(b="ifClause"+i)+" = 'then'; ":b="'then'",r+=" } ",g&&(r+=" else { ")):r+=" if (!"+d+") { ",g&&(p.schema=e.schema.else,p.schemaPath=e.schemaPath+".else",p.errSchemaPath=e.errSchemaPath+"/else",r+=" "+e.validate(p)+" ",p.baseId=_,r+=" "+h+" = "+d+"; ",v&&g?r+=" var "+(b="ifClause"+i)+" = 'else'; ":b="'else'",r+=" } "),r+=" if (!"+h+") { var err = ",!1!==e.createErrors?(r+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { failingKeyword: "+b+" } ",!1!==e.opts.messages&&(r+=" , message: 'should match \"' + "+b+" + '\" schema' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),r+=" } "):r+=" {} ",r+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?r+=" throw new ValidationError(vErrors); ":r+=" validate.errors = vErrors; return false; "),r+=" } ",c&&(r+=" else { ")}else c&&(r+=" if (true) { ");return r}},403:(e,t,n)=>{"use strict";e.exports={$ref:n(990),allOf:n(353),anyOf:n(480),$comment:n(278),const:n(224),contains:n(674),dependencies:n(926),enum:n(598),format:n(400),if:n(532),items:n(371),maximum:n(667),minimum:n(667),maxItems:n(119),minItems:n(119),maxLength:n(935),minLength:n(935),maxProperties:n(298),minProperties:n(298),multipleOf:n(294),not:n(914),oneOf:n(326),pattern:n(317),properties:n(374),propertyNames:n(32),required:n(850),uniqueItems:n(898),validate:n(873)}},371:e=>{"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,l="data"+(o||""),h="valid"+i,f="errs__"+i,p=e.util.copy(e),d="";p.level++;var m="valid"+p.level,y="i"+i,v=p.dataLevel=e.dataLevel+1,g="data"+v,_=e.baseId;if(r+="var "+f+" = errors;var "+h+";",Array.isArray(s)){var b=e.schema.additionalItems;if(!1===b){r+=" "+h+" = "+l+".length <= "+s.length+"; ";var w=u;u=e.errSchemaPath+"/additionalItems",r+=" if (!"+h+") { ";var x=x||[];x.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+s.length+" } ",!1!==e.opts.messages&&(r+=" , message: 'should NOT have more than "+s.length+" items' "),e.opts.verbose&&(r+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),r+=" } "):r+=" {} ";var k=r;r=x.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+k+"]); ":r+=" validate.errors = ["+k+"]; return false; ":r+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } ",u=w,c&&(d+="}",r+=" else { ")}var E=s;if(E)for(var S,T=-1,A=E.length-1;T0||!1===S:e.util.schemaHasRules(S,e.RULES.all)){r+=" "+m+" = true; if ("+l+".length > "+T+") { ";var O=l+"["+T+"]";p.schema=S,p.schemaPath=a+"["+T+"]",p.errSchemaPath=u+"/"+T,p.errorPath=e.util.getPathExpr(e.errorPath,T,e.opts.jsonPointers,!0),p.dataPathArr[v]=T;var N=e.validate(p);p.baseId=_,e.util.varOccurences(N,g)<2?r+=" "+e.util.varReplace(N,g,O)+" ":r+=" var "+g+" = "+O+"; "+N+" ",r+=" } ",c&&(r+=" if ("+m+") { ",d+="}")}"object"==typeof b&&(e.opts.strictKeywords?"object"==typeof b&&Object.keys(b).length>0||!1===b:e.util.schemaHasRules(b,e.RULES.all))&&(p.schema=b,p.schemaPath=e.schemaPath+".additionalItems",p.errSchemaPath=e.errSchemaPath+"/additionalItems",r+=" "+m+" = true; if ("+l+".length > "+s.length+") { for (var "+y+" = "+s.length+"; "+y+" < "+l+".length; "+y+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,y,e.opts.jsonPointers,!0),O=l+"["+y+"]",p.dataPathArr[v]=y,N=e.validate(p),p.baseId=_,e.util.varOccurences(N,g)<2?r+=" "+e.util.varReplace(N,g,O)+" ":r+=" var "+g+" = "+O+"; "+N+" ",c&&(r+=" if (!"+m+") break; "),r+=" } } ",c&&(r+=" if ("+m+") { ",d+="}"))}else(e.opts.strictKeywords?"object"==typeof s&&Object.keys(s).length>0||!1===s:e.util.schemaHasRules(s,e.RULES.all))&&(p.schema=s,p.schemaPath=a,p.errSchemaPath=u,r+=" for (var "+y+" = 0; "+y+" < "+l+".length; "+y+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,y,e.opts.jsonPointers,!0),O=l+"["+y+"]",p.dataPathArr[v]=y,N=e.validate(p),p.baseId=_,e.util.varOccurences(N,g)<2?r+=" "+e.util.varReplace(N,g,O)+" ":r+=" var "+g+" = "+O+"; "+N+" ",c&&(r+=" if (!"+m+") break; "),r+=" }");return c&&(r+=" "+d+" if ("+f+" == errors) {"),r}},294:e=>{"use strict";e.exports=function(e,t,n){var r,i=" ",o=e.level,s=e.dataLevel,a=e.schema[t],u=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,h="data"+(s||""),f=e.opts.$data&&a&&a.$data;if(f?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",r="schema"+o):r=a,!f&&"number"!=typeof a)throw new Error(t+" must be number");i+="var division"+o+";if (",f&&(i+=" "+r+" !== undefined && ( typeof "+r+" != 'number' || "),i+=" (division"+o+" = "+h+" / "+r+", ",e.opts.multipleOfPrecision?i+=" Math.abs(Math.round(division"+o+") - division"+o+") > 1e-"+e.opts.multipleOfPrecision+" ":i+=" division"+o+" !== parseInt(division"+o+") ",i+=" ) ",f&&(i+=" ) "),i+=" ) { ";var p=p||[];p.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { multipleOf: "+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be multiple of ",i+=f?"' + "+r:r+"'"),e.opts.verbose&&(i+=" , schema: ",i+=f?"validate.schema"+u:""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var d=i;return i=p.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+d+"]); ":i+=" validate.errors = ["+d+"]; return false; ":i+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i}},914:e=>{"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,l="data"+(o||""),h="errs__"+i,f=e.util.copy(e);f.level++;var p="valid"+f.level;if(e.opts.strictKeywords?"object"==typeof s&&Object.keys(s).length>0||!1===s:e.util.schemaHasRules(s,e.RULES.all)){f.schema=s,f.schemaPath=a,f.errSchemaPath=u,r+=" var "+h+" = errors; ";var d,m=e.compositeRule;e.compositeRule=f.compositeRule=!0,f.createErrors=!1,f.opts.allErrors&&(d=f.opts.allErrors,f.opts.allErrors=!1),r+=" "+e.validate(f)+" ",f.createErrors=!0,d&&(f.opts.allErrors=d),e.compositeRule=f.compositeRule=m,r+=" if ("+p+") { ";var y=y||[];y.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'should NOT be valid' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),r+=" } "):r+=" {} ";var v=r;r=y.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+v+"]); ":r+=" validate.errors = ["+v+"]; return false; ":r+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.opts.allErrors&&(r+=" } ")}else r+=" var err = ",!1!==e.createErrors?(r+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'should NOT be valid' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),r+=" } "):r+=" {} ",r+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(r+=" if (false) { ");return r}},326:e=>{"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,l="data"+(o||""),h="valid"+i,f="errs__"+i,p=e.util.copy(e),d="";p.level++;var m="valid"+p.level,y=p.baseId,v="prevValid"+i,g="passingSchemas"+i;r+="var "+f+" = errors , "+v+" = false , "+h+" = false , "+g+" = null; ";var _=e.compositeRule;e.compositeRule=p.compositeRule=!0;var b=s;if(b)for(var w,x=-1,k=b.length-1;x0||!1===w:e.util.schemaHasRules(w,e.RULES.all))?(p.schema=w,p.schemaPath=a+"["+x+"]",p.errSchemaPath=u+"/"+x,r+=" "+e.validate(p)+" ",p.baseId=y):r+=" var "+m+" = true; ",x&&(r+=" if ("+m+" && "+v+") { "+h+" = false; "+g+" = ["+g+", "+x+"]; } else { ",d+="}"),r+=" if ("+m+") { "+h+" = "+v+" = true; "+g+" = "+x+"; }";return e.compositeRule=p.compositeRule=_,r+=d+"if (!"+h+") { var err = ",!1!==e.createErrors?(r+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { passingSchemas: "+g+" } ",!1!==e.opts.messages&&(r+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),r+=" } "):r+=" {} ",r+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?r+=" throw new ValidationError(vErrors); ":r+=" validate.errors = vErrors; return false; "),r+="} else { errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; }",e.opts.allErrors&&(r+=" } "),r}},317:e=>{"use strict";e.exports=function(e,t,n){var r,i=" ",o=e.level,s=e.dataLevel,a=e.schema[t],u=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,h="data"+(s||""),f=e.opts.$data&&a&&a.$data;f?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",r="schema"+o):r=a,i+="if ( ",f&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'string') || "),i+=" !"+(f?"(new RegExp("+r+"))":e.usePattern(a))+".test("+h+") ) { ";var p=p||[];p.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { pattern: ",i+=f?""+r:""+e.util.toQuotedString(a),i+=" } ",!1!==e.opts.messages&&(i+=" , message: 'should match pattern \"",i+=f?"' + "+r+" + '":""+e.util.escapeQuotes(a),i+="\"' "),e.opts.verbose&&(i+=" , schema: ",i+=f?"validate.schema"+u:""+e.util.toQuotedString(a),i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var d=i;return i=p.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+d+"]); ":i+=" validate.errors = ["+d+"]; return false; ":i+=" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i}},374:e=>{"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,l="data"+(o||""),h="errs__"+i,f=e.util.copy(e),p="";f.level++;var d="valid"+f.level,m="key"+i,y="idx"+i,v=f.dataLevel=e.dataLevel+1,g="data"+v,_="dataProperties"+i,b=Object.keys(s||{}).filter(L),w=e.schema.patternProperties||{},x=Object.keys(w).filter(L),k=e.schema.additionalProperties,E=b.length||x.length,S=!1===k,T="object"==typeof k&&Object.keys(k).length,A=e.opts.removeAdditional,O=S||T||A,N=e.opts.ownProperties,P=e.baseId,C=e.schema.required;if(C&&(!e.opts.$data||!C.$data)&&C.length8)r+=" || validate.schema"+a+".hasOwnProperty("+m+") ";else{var I=b;if(I)for(var D=-1,M=I.length-1;D0||!1===Z:e.util.schemaHasRules(Z,e.RULES.all)){var J=e.util.getProperty(Y),ee=(K=l+J,W&&void 0!==Z.default);if(f.schema=Z,f.schemaPath=a+J,f.errSchemaPath=u+"/"+e.util.escapeFragment(Y),f.errorPath=e.util.getPath(e.errorPath,Y,e.opts.jsonPointers),f.dataPathArr[v]=e.util.toQuotedString(Y),H=e.validate(f),f.baseId=P,e.util.varOccurences(H,g)<2){H=e.util.varReplace(H,g,K);var te=K}else te=g,r+=" var "+g+" = "+K+"; ";if(ee)r+=" "+H+" ";else{if(R&&R[Y]){r+=" if ( "+te+" === undefined ",N&&(r+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(Y)+"') "),r+=") { "+d+" = false; ",U=e.errorPath,V=u;var ne,re=e.util.escapeQuotes(Y);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(U,Y,e.opts.jsonPointers)),u=e.errSchemaPath+"/required",(ne=ne||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+re+"' } ",!1!==e.opts.messages&&(r+=" , message: '",e.opts._errorDataPathProperty?r+="is a required property":r+="should have required property \\'"+re+"\\'",r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),r+=" } "):r+=" {} ",$=r,r=ne.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+$+"]); ":r+=" validate.errors = ["+$+"]; return false; ":r+=" var err = "+$+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u=V,e.errorPath=U,r+=" } else { "}else c?(r+=" if ( "+te+" === undefined ",N&&(r+=" || ! Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(Y)+"') "),r+=") { "+d+" = true; } else { "):(r+=" if ("+te+" !== undefined ",N&&(r+=" && Object.prototype.hasOwnProperty.call("+l+", '"+e.util.escapeQuotes(Y)+"') "),r+=" ) { ");r+=" "+H+" } "}}c&&(r+=" if ("+d+") { ",p+="}")}}if(x.length){var ie=x;if(ie)for(var oe,se=-1,ae=ie.length-1;se0||!1===Z:e.util.schemaHasRules(Z,e.RULES.all))&&(f.schema=Z,f.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(oe),f.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(oe),r+=N?" "+_+" = "+_+" || Object.keys("+l+"); for (var "+y+"=0; "+y+"<"+_+".length; "+y+"++) { var "+m+" = "+_+"["+y+"]; ":" for (var "+m+" in "+l+") { ",r+=" if ("+e.usePattern(oe)+".test("+m+")) { ",f.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers),K=l+"["+m+"]",f.dataPathArr[v]=m,H=e.validate(f),f.baseId=P,e.util.varOccurences(H,g)<2?r+=" "+e.util.varReplace(H,g,K)+" ":r+=" var "+g+" = "+K+"; "+H+" ",c&&(r+=" if (!"+d+") break; "),r+=" } ",c&&(r+=" else "+d+" = true; "),r+=" } ",c&&(r+=" if ("+d+") { ",p+="}"))}return c&&(r+=" "+p+" if ("+h+" == errors) {"),r}},32:e=>{"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,l="data"+(o||""),h="errs__"+i,f=e.util.copy(e);f.level++;var p="valid"+f.level;if(r+="var "+h+" = errors;",e.opts.strictKeywords?"object"==typeof s&&Object.keys(s).length>0||!1===s:e.util.schemaHasRules(s,e.RULES.all)){f.schema=s,f.schemaPath=a,f.errSchemaPath=u;var d="key"+i,m="idx"+i,y="i"+i,v="' + "+d+" + '",g="data"+(f.dataLevel=e.dataLevel+1),_="dataProperties"+i,b=e.opts.ownProperties,w=e.baseId;b&&(r+=" var "+_+" = undefined; "),r+=b?" "+_+" = "+_+" || Object.keys("+l+"); for (var "+m+"=0; "+m+"<"+_+".length; "+m+"++) { var "+d+" = "+_+"["+m+"]; ":" for (var "+d+" in "+l+") { ",r+=" var startErrs"+i+" = errors; ";var x=d,k=e.compositeRule;e.compositeRule=f.compositeRule=!0;var E=e.validate(f);f.baseId=w,e.util.varOccurences(E,g)<2?r+=" "+e.util.varReplace(E,g,x)+" ":r+=" var "+g+" = "+x+"; "+E+" ",e.compositeRule=f.compositeRule=k,r+=" if (!"+p+") { for (var "+y+"=startErrs"+i+"; "+y+"{"use strict";e.exports=function(e,t,n){var r,i,o=" ",s=e.level,a=e.dataLevel,u=e.schema[t],c=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,h="data"+(a||""),f="valid"+s;if("#"==u||"#/"==u)e.isRoot?(r=e.async,i="validate"):(r=!0===e.root.schema.$async,i="root.refVal[0]");else{var p=e.resolveRef(e.baseId,u,e.isRoot);if(void 0===p){var d=e.MissingRefError.message(e.baseId,u);if("fail"==e.opts.missingRefs){e.logger.error(d),(g=g||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { ref: '"+e.util.escapeQuotes(u)+"' } ",!1!==e.opts.messages&&(o+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(u)+"' "),e.opts.verbose&&(o+=" , schema: "+e.util.toQuotedString(u)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ";var m=o;o=g.pop(),!e.compositeRule&&l?e.async?o+=" throw new ValidationError(["+m+"]); ":o+=" validate.errors = ["+m+"]; return false; ":o+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l&&(o+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,u,d);e.logger.warn(d),l&&(o+=" if (true) { ")}}else if(p.inline){var y=e.util.copy(e);y.level++;var v="valid"+y.level;y.schema=p.schema,y.schemaPath="",y.errSchemaPath=u,o+=" "+e.validate(y).replace(/validate\.schema/g,p.code)+" ",l&&(o+=" if ("+v+") { ")}else r=!0===p.$async||e.async&&!1!==p.$async,i=p.code}if(i){var g;(g=g||[]).push(o),o="",e.opts.passContext?o+=" "+i+".call(this, ":o+=" "+i+"( ",o+=" "+h+", (dataPath || '')",'""'!=e.errorPath&&(o+=" + "+e.errorPath);var _=o+=" , "+(a?"data"+(a-1||""):"parentData")+" , "+(a?e.dataPathArr[a]:"parentDataProperty")+", rootData) ";if(o=g.pop(),r){if(!e.async)throw new Error("async schema referenced by sync schema");l&&(o+=" var "+f+"; "),o+=" try { await "+_+"; ",l&&(o+=" "+f+" = true; "),o+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",l&&(o+=" "+f+" = false; "),o+=" } ",l&&(o+=" if ("+f+") { ")}else o+=" if (!"+_+") { if (vErrors === null) vErrors = "+i+".errors; else vErrors = vErrors.concat("+i+".errors); errors = vErrors.length; } ",l&&(o+=" else { ")}return o}},850:e=>{"use strict";e.exports=function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,l="data"+(o||""),h="valid"+i,f=e.opts.$data&&s&&s.$data;f&&(r+=" var schema"+i+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ");var p="schema"+i;if(!f)if(s.length0||!1===_:e.util.schemaHasRules(_,e.RULES.all))||(d[d.length]=y)}}else d=s;if(f||d.length){var b=e.errorPath,w=f||d.length>=e.opts.loopRequired,x=e.opts.ownProperties;if(c)if(r+=" var missing"+i+"; ",w){f||(r+=" var "+p+" = validate.schema"+a+"; ");var k="' + "+(N="schema"+i+"["+(A="i"+i)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(b,N,e.opts.jsonPointers)),r+=" var "+h+" = true; ",f&&(r+=" if (schema"+i+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+i+")) "+h+" = false; else {"),r+=" for (var "+A+" = 0; "+A+" < "+p+".length; "+A+"++) { "+h+" = "+l+"["+p+"["+A+"]] !== undefined ",x&&(r+=" && Object.prototype.hasOwnProperty.call("+l+", "+p+"["+A+"]) "),r+="; if (!"+h+") break; } ",f&&(r+=" } "),r+=" if (!"+h+") { ",(S=S||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+k+"' } ",!1!==e.opts.messages&&(r+=" , message: '",e.opts._errorDataPathProperty?r+="is a required property":r+="should have required property \\'"+k+"\\'",r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),r+=" } "):r+=" {} ";var E=r;r=S.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+E+"]); ":r+=" validate.errors = ["+E+"]; return false; ":r+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } else { "}else{r+=" if ( ";var S,T=d;if(T)for(var A=-1,O=T.length-1;A{"use strict";e.exports=function(e,t,n){var r,i=" ",o=e.level,s=e.dataLevel,a=e.schema[t],u=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,h="data"+(s||""),f="valid"+o,p=e.opts.$data&&a&&a.$data;if(p?(i+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ",r="schema"+o):r=a,(a||p)&&!1!==e.opts.uniqueItems){p&&(i+=" var "+f+"; if ("+r+" === false || "+r+" === undefined) "+f+" = true; else if (typeof "+r+" != 'boolean') "+f+" = false; else { "),i+=" var i = "+h+".length , "+f+" = true , j; if (i > 1) { ";var d=e.schema.items&&e.schema.items.type,m=Array.isArray(d);if(!d||"object"==d||"array"==d||m&&(d.indexOf("object")>=0||d.indexOf("array")>=0))i+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+h+"[i], "+h+"[j])) { "+f+" = false; break outer; } } } ";else{i+=" var itemIndices = {}, item; for (;i--;) { var item = "+h+"[i]; ";var y="checkDataType"+(m?"s":"");i+=" if ("+e.util[y](d,"item",e.opts.strictNumbers,!0)+") continue; ",m&&(i+=" if (typeof item == 'string') item = '\"' + item; "),i+=" if (typeof itemIndices[item] == 'number') { "+f+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}i+=" } ",p&&(i+=" } "),i+=" if (!"+f+") { ";var v=v||[];v.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(i+=" , schema: ",i+=p?"validate.schema"+u:""+a,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var g=i;i=v.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+g+"]); ":i+=" validate.errors = ["+g+"]; return false; ":i+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",l&&(i+=" else { ")}else l&&(i+=" if (true) { ");return i}},873:e=>{"use strict";e.exports=function(e,t,n){var r="",i=!0===e.schema.$async,o=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),s=e.self._getId(e.schema);if(e.opts.strictKeywords){var a=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(a){var u="unknown keyword: "+a;if("log"!==e.opts.strictKeywords)throw new Error(u);e.logger.warn(u)}}if(e.isTop&&(r+=" var validate = ",i&&(e.async=!0,r+="async "),r+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",s&&(e.opts.sourceCode||e.opts.processCode)&&(r+=" /*# sourceURL="+s+" */ ")),"boolean"==typeof e.schema||!o&&!e.schema.$ref){t="false schema";var c=e.level,l=e.dataLevel,h=e.schema[t],f=e.schemaPath+e.util.getProperty(t),p=e.errSchemaPath+"/"+t,d=!e.opts.allErrors,m="data"+(l||""),y="valid"+c;if(!1===e.schema){e.isTop?d=!0:r+=" var "+y+" = false; ",(K=K||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'boolean schema is false' "),e.opts.verbose&&(r+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),r+=" } "):r+=" {} ";var v=r;r=K.pop(),!e.compositeRule&&d?e.async?r+=" throw new ValidationError(["+v+"]); ":r+=" validate.errors = ["+v+"]; return false; ":r+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?r+=i?" return data; ":" validate.errors = null; return true; ":r+=" var "+y+" = true; ";return e.isTop&&(r+=" }; return validate; "),r}if(e.isTop){var g=e.isTop;if(c=e.level=0,l=e.dataLevel=0,m="data",e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],void 0!==e.schema.default&&e.opts.useDefaults&&e.opts.strictDefaults){var _="default is ignored in the schema root";if("log"!==e.opts.strictDefaults)throw new Error(_);e.logger.warn(_)}r+=" var vErrors = null; ",r+=" var errors = 0; ",r+=" if (rootData === undefined) rootData = data; "}else{if(c=e.level,m="data"+((l=e.dataLevel)||""),s&&(e.baseId=e.resolve.url(e.baseId,s)),i&&!e.async)throw new Error("async schema in sync schema");r+=" var errs_"+c+" = errors;"}y="valid"+c,d=!e.opts.allErrors;var b="",w="",x=e.schema.type,k=Array.isArray(x);if(x&&e.opts.nullable&&!0===e.schema.nullable&&(k?-1==x.indexOf("null")&&(x=x.concat("null")):"null"!=x&&(x=[x,"null"],k=!0)),k&&1==x.length&&(x=x[0],k=!1),e.schema.$ref&&o){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(o=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(r+=" "+e.RULES.all.$comment.code(e,"$comment")),x){if(e.opts.coerceTypes)var E=e.util.coerceToTypes(e.opts.coerceTypes,x);var S=e.RULES.types[x];if(E||k||!0===S||S&&!X(S)){f=e.schemaPath+".type",p=e.errSchemaPath+"/type",f=e.schemaPath+".type",p=e.errSchemaPath+"/type";var T=k?"checkDataTypes":"checkDataType";if(r+=" if ("+e.util[T](x,m,e.opts.strictNumbers,!0)+") { ",E){var A="dataType"+c,O="coerced"+c;r+=" var "+A+" = typeof "+m+"; var "+O+" = undefined; ","array"==e.opts.coerceTypes&&(r+=" if ("+A+" == 'object' && Array.isArray("+m+") && "+m+".length == 1) { "+m+" = "+m+"[0]; "+A+" = typeof "+m+"; if ("+e.util.checkDataType(e.schema.type,m,e.opts.strictNumbers)+") "+O+" = "+m+"; } "),r+=" if ("+O+" !== undefined) ; ";var N=E;if(N)for(var P,C=-1,R=N.length-1;C{"use strict";var r=/^[a-z_$][a-z0-9_$-]*$/i,i=n(992),o=n(659);e.exports={add:function(e,t){var n=this.RULES;if(n.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!r.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(t){this.validateKeyword(t,!0);var o=t.type;if(Array.isArray(o))for(var s=0;s{"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;0!=i--;){var s=o[i];if(!e(t[s],n[s]))return!1}return!0}return t!=t&&n!=n}},492:e=>{"use strict";e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var n,r="boolean"==typeof t.cycles&&t.cycles,i=t.cmp&&(n=t.cmp,function(e){return function(t,r){var i={key:t,value:e[t]},o={key:r,value:e[r]};return n(i,o)}}),o=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var n,s;if(Array.isArray(t)){for(s="[",n=0;n{"use strict";var t=e.exports=function(e,t,r){"function"==typeof t&&(r=t,t={}),n(t,"function"==typeof(r=t.cb||r)?r:r.pre||function(){},r.post||function(){},e,"",e)};function n(e,r,i,o,s,a,u,c,l,h){if(o&&"object"==typeof o&&!Array.isArray(o)){for(var f in r(o,s,a,u,c,l,h),o){var p=o[f];if(Array.isArray(p)){if(f in t.arrayKeywords)for(var d=0;d{(()=>{var e={326:function(e){var t;"undefined"!=typeof self&&self,t=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=11)}([function(e,t,n){"use strict";var r=Array.prototype,i=Object.prototype,o={"&":"&",'"':""","'":"'","<":"<",">":">","\\":"\"},s=/[&"'<>\\]/g;function a(e,t){return i.hasOwnProperty.call(e,t)}function u(e){return o[e]}function c(e,t,n){var r,i,o;if(e instanceof Error&&(e=(i=e).name+": "+i.message),Object.setPrototypeOf?(r=new Error(e),Object.setPrototypeOf(r,c.prototype)):(r=this,Object.defineProperty(r,"message",{enumerable:!1,writable:!0,value:e})),Object.defineProperty(r,"name",{value:"Template render error"}),Error.captureStackTrace&&Error.captureStackTrace(r,this.constructor),i){var s=Object.getOwnPropertyDescriptor(i,"stack");(o=s&&(s.get||function(){return s.value}))||(o=function(){return i.stack})}else{var a=new Error(e).stack;o=function(){return a}}return Object.defineProperty(r,"stack",{get:function(){return o.call(r)}}),Object.defineProperty(r,"cause",{value:i}),r.lineno=t,r.colno=n,r.firstUpdate=!0,r.Update=function(e){var t="("+(e||"unknown path")+")";return this.firstUpdate&&(this.lineno&&this.colno?t+=" [Line "+this.lineno+", Column "+this.colno+"]":this.lineno&&(t+=" [Line "+this.lineno+"]")),t+="\n ",this.firstUpdate&&(t+=" "),this.message=t+(this.message||""),this.firstUpdate=!1,this},r}function l(e){return"[object Function]"===i.toString.call(e)}function h(e){return"[object Array]"===i.toString.call(e)}function f(e){return"[object String]"===i.toString.call(e)}function p(e){return"[object Object]"===i.toString.call(e)}function d(e){var t,n=(t=e)?"string"==typeof t?t.split("."):[t]:[];return function(e){for(var t=e,r=0;re.length)s=i.slice(0,e.length),i.slice(s.length,c).forEach((function(e,n){n2?i-2:0),s=2;s0||!n)&&process.stdout.write(" ".repeat(t));var o=i===r.length-1?"":"\n";process.stdout.write(""+e+o)}))}e.exports={Node:u,Root:h,NodeList:l,Value:c,Literal:f,Symbol:p,Group:d,Array:m,Pair:y,Dict:v,Output:U,Capture:z,TemplateData:V,If:_,IfAsync:b,InlineIf:w,For:x,AsyncEach:k,AsyncAll:E,Macro:S,Caller:T,Import:A,FromImport:O,FunCall:N,Filter:P,FilterAsync:C,KeywordArgs:R,Block:L,Super:I,Extends:D,Include:M,Set:j,Switch:F,Case:B,LookupVal:g,BinOp:q,In:K,Is:H,Or:W,And:G,Not:Y,Add:Q,Concat:X,Sub:Z,Mul:J,Div:ee,FloorDiv:te,Mod:ne,Pow:re,Neg:ie,Pos:oe,Compare:se,CompareOperand:ae,CallExtension:ue,CallExtensionAsync:ce,printNodes:function e(t,n){if(n=n||0,le(t.typename+": ",n),t instanceof l)le("\n"),t.children.forEach((function(t){e(t,n+2)}));else if(t instanceof ue)le(t.extName+"."+t.prop+"\n"),t.args&&e(t.args,n+2),t.contentArgs&&t.contentArgs.forEach((function(t){e(t,n+2)}));else{var r=[],i=null;t.iterFields((function(e,t){e instanceof u?r.push([t,e]):(i=i||{})[t]=e})),i?le(JSON.stringify(i,null,2)+"\n",null,!0):le("\n"),r.forEach((function(t){var r=t[0],i=t[1];le("["+r+"] =>",n+2),e(i,n+4)}))}}}},function(e,t){},function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}var i=n(8),o=n(17),s=n(3),a=n(0).TemplateError,u=n(2).Frame,c=n(1).Obj,l={"==":"==","===":"===","!=":"!=","!==":"!==","<":"<",">":">","<=":"<=",">=":">="},h=function(e){var t,n;function i(){return e.apply(this,arguments)||this}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n);var o=i.prototype;return o.init=function(e,t){this.templateName=e,this.codebuf=[],this.lastId=0,this.buffer=null,this.bufferStack=[],this._scopeClosers="",this.inBlock=!1,this.throwOnUndefined=t},o.fail=function(e,t,n){throw void 0!==t&&(t+=1),void 0!==n&&(n+=1),new a(e,t,n)},o._pushBuffer=function(){var e=this._tmpid();return this.bufferStack.push(this.buffer),this.buffer=e,this._emit("var "+this.buffer+' = "";'),e},o._popBuffer=function(){this.buffer=this.bufferStack.pop()},o._emit=function(e){this.codebuf.push(e)},o._emitLine=function(e){this._emit(e+"\n")},o._emitLines=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r0&&i._emit(","),i.compile(e,t)})),r&&this._emit(r)},o._compileExpression=function(e,t){this.assertType(e,s.Literal,s.Symbol,s.Group,s.Array,s.Dict,s.FunCall,s.Caller,s.Filter,s.LookupVal,s.Compare,s.InlineIf,s.In,s.Is,s.And,s.Or,s.Not,s.Add,s.Concat,s.Sub,s.Mul,s.Div,s.FloorDiv,s.Mod,s.Pow,s.Neg,s.Pos,s.Compare,s.NodeList),this.compile(e,t)},o.assertType=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&r._emit(","),e){r._emitLine("function(cb) {"),r._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}");var i=r._pushBuffer();r._withScopedSyntax((function(){r.compile(e,t),r._emitLine("cb(null, "+i+");")})),r._popBuffer(),r._emitLine("return "+i+";"),r._emitLine("}")}else r._emit("null")})),n){var u=this._tmpid();this._emitLine(", "+this._makeCallback(u)),this._emitLine(this.buffer+" += runtime.suppressValue("+u+", "+a+" && env.opts.autoescape);"),this._addScopeLevel()}else this._emit(")"),this._emit(", "+a+" && env.opts.autoescape);\n")},o.compileCallExtensionAsync=function(e,t){this.compileCallExtension(e,t,!0)},o.compileNodeList=function(e,t){this._compileChildren(e,t)},o.compileLiteral=function(e){if("string"==typeof e.value){var t=e.value.replace(/\\/g,"\\\\");t=(t=(t=(t=(t=t.replace(/"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t")).replace(/\u2028/g,"\\u2028"),this._emit('"'+t+'"')}else null===e.value?this._emit("null"):this._emit(e.value.toString())},o.compileSymbol=function(e,t){var n=e.value,r=t.lookup(n);r?this._emit(r):this._emit('runtime.contextOrFrameLookup(context, frame, "'+n+'")')},o.compileGroup=function(e,t){this._compileAggregate(e,t,"(",")")},o.compileArray=function(e,t){this._compileAggregate(e,t,"[","]")},o.compileDict=function(e,t){this._compileAggregate(e,t,"{","}")},o.compilePair=function(e,t){var n=e.key,r=e.value;n instanceof s.Symbol?n=new s.Literal(n.lineno,n.colno,n.value):n instanceof s.Literal&&"string"==typeof n.value||this.fail("compilePair: Dict keys must be strings or names",n.lineno,n.colno),this.compile(n,t),this._emit(": "),this._compileExpression(r,t)},o.compileInlineIf=function(e,t){this._emit("("),this.compile(e.cond,t),this._emit("?"),this.compile(e.body,t),this._emit(":"),null!==e.else_?this.compile(e.else_,t):this._emit('""'),this._emit(")")},o.compileIn=function(e,t){this._emit("runtime.inOperator("),this.compile(e.left,t),this._emit(","),this.compile(e.right,t),this._emit(")")},o.compileIs=function(e,t){var n=e.right.name?e.right.name.value:e.right.value;this._emit('env.getTest("'+n+'").call(context, '),this.compile(e.left,t),e.right.args&&(this._emit(","),this.compile(e.right.args,t)),this._emit(") === true")},o._binOpEmitter=function(e,t,n){this.compile(e.left,t),this._emit(n),this.compile(e.right,t)},o.compileOr=function(e,t){return this._binOpEmitter(e,t," || ")},o.compileAnd=function(e,t){return this._binOpEmitter(e,t," && ")},o.compileAdd=function(e,t){return this._binOpEmitter(e,t," + ")},o.compileConcat=function(e,t){return this._binOpEmitter(e,t,' + "" + ')},o.compileSub=function(e,t){return this._binOpEmitter(e,t," - ")},o.compileMul=function(e,t){return this._binOpEmitter(e,t," * ")},o.compileDiv=function(e,t){return this._binOpEmitter(e,t," / ")},o.compileMod=function(e,t){return this._binOpEmitter(e,t," % ")},o.compileNot=function(e,t){this._emit("!"),this.compile(e.target,t)},o.compileFloorDiv=function(e,t){this._emit("Math.floor("),this.compile(e.left,t),this._emit(" / "),this.compile(e.right,t),this._emit(")")},o.compilePow=function(e,t){this._emit("Math.pow("),this.compile(e.left,t),this._emit(", "),this.compile(e.right,t),this._emit(")")},o.compileNeg=function(e,t){this._emit("-"),this.compile(e.target,t)},o.compilePos=function(e,t){this._emit("+"),this.compile(e.target,t)},o.compileCompare=function(e,t){var n=this;this.compile(e.expr,t),e.ops.forEach((function(e){n._emit(" "+l[e.type]+" "),n.compile(e.expr,t)}))},o.compileLookupVal=function(e,t){this._emit("runtime.memberLookup(("),this._compileExpression(e.target,t),this._emit("),"),this._compileExpression(e.val,t),this._emit(")")},o._getNodeName=function(e){switch(e.typename){case"Symbol":return e.value;case"FunCall":return"the return value of ("+this._getNodeName(e.name)+")";case"LookupVal":return this._getNodeName(e.target)+'["'+this._getNodeName(e.val)+'"]';case"Literal":return e.value.toString();default:return"--expression--"}},o.compileFunCall=function(e,t){this._emit("(lineno = "+e.lineno+", colno = "+e.colno+", "),this._emit("runtime.callWrap("),this._compileExpression(e.name,t),this._emit(', "'+this._getNodeName(e.name).replace(/"/g,'\\"')+'", context, '),this._compileAggregate(e.args,t,"[","])"),this._emit(")")},o.compileFilter=function(e,t){var n=e.name;this.assertType(n,s.Symbol),this._emit('env.getFilter("'+n.value+'").call(context, '),this._compileAggregate(e.args,t),this._emit(")")},o.compileFilterAsync=function(e,t){var n=e.name,r=e.symbol.value;this.assertType(n,s.Symbol),t.set(r,r),this._emit('env.getFilter("'+n.value+'").call(context, '),this._compileAggregate(e.args,t),this._emitLine(", "+this._makeCallback(r)),this._addScopeLevel()},o.compileKeywordArgs=function(e,t){this._emit("runtime.makeKeywordArgs("),this.compileDict(e,t),this._emit(")")},o.compileSet=function(e,t){var n=this,r=[];e.targets.forEach((function(e){var i=e.value,o=t.lookup(i);null==o&&(o=n._tmpid(),n._emitLine("var "+o+";")),r.push(o)})),e.value?(this._emit(r.join(" = ")+" = "),this._compileExpression(e.value,t),this._emitLine(";")):(this._emit(r.join(" = ")+" = "),this.compile(e.body,t),this._emitLine(";")),e.targets.forEach((function(e,t){var i=r[t],o=e.value;n._emitLine('frame.set("'+o+'", '+i+", true);"),n._emitLine("if(frame.topLevel) {"),n._emitLine('context.setVariable("'+o+'", '+i+");"),n._emitLine("}"),"_"!==o.charAt(0)&&(n._emitLine("if(frame.topLevel) {"),n._emitLine('context.addExport("'+o+'", '+i+");"),n._emitLine("}"))}))},o.compileSwitch=function(e,t){var n=this;this._emit("switch ("),this.compile(e.expr,t),this._emit(") {"),e.cases.forEach((function(e,r){n._emit("case "),n.compile(e.cond,t),n._emit(": "),n.compile(e.body,t),e.body.children.length&&n._emitLine("break;")})),e.default&&(this._emit("default:"),this.compile(e.default,t)),this._emit("}")},o.compileIf=function(e,t,n){var r=this;this._emit("if("),this._compileExpression(e.cond,t),this._emitLine(") {"),this._withScopedSyntax((function(){r.compile(e.body,t),n&&r._emit("cb()")})),e.else_?(this._emitLine("}\nelse {"),this._withScopedSyntax((function(){r.compile(e.else_,t),n&&r._emit("cb()")}))):n&&(this._emitLine("}\nelse {"),this._emit("cb()")),this._emitLine("}")},o.compileIfAsync=function(e,t){this._emit("(function(cb) {"),this.compileIf(e,t,!0),this._emit("})("+this._makeCallback()),this._addScopeLevel()},o._emitLoopBindings=function(e,t,n,r){var i=this;[{name:"index",val:n+" + 1"},{name:"index0",val:n},{name:"revindex",val:r+" - "+n},{name:"revindex0",val:r+" - "+n+" - 1"},{name:"first",val:n+" === 0"},{name:"last",val:n+" === "+r+" - 1"},{name:"length",val:r}].forEach((function(e){i._emitLine('frame.set("loop.'+e.name+'", '+e.val+");")}))},o.compileFor=function(e,t){var n=this,r=this._tmpid(),i=this._tmpid(),o=this._tmpid();if(t=t.push(),this._emitLine("frame = frame.push();"),this._emit("var "+o+" = "),this._compileExpression(e.arr,t),this._emitLine(";"),this._emit("if("+o+") {"),this._emitLine(o+" = runtime.fromIterator("+o+");"),e.name instanceof s.Array){this._emitLine("var "+r+";"),this._emitLine("if(runtime.isArray("+o+")) {"),this._emitLine("var "+i+" = "+o+".length;"),this._emitLine("for("+r+"=0; "+r+" < "+o+".length; "+r+"++) {"),e.name.children.forEach((function(i,s){var a=n._tmpid();n._emitLine("var "+a+" = "+o+"["+r+"]["+s+"];"),n._emitLine('frame.set("'+i+'", '+o+"["+r+"]["+s+"]);"),t.set(e.name.children[s].value,a)})),this._emitLoopBindings(e,o,r,i),this._withScopedSyntax((function(){n.compile(e.body,t)})),this._emitLine("}"),this._emitLine("} else {");var a=e.name.children,u=a[0],c=a[1],l=this._tmpid(),h=this._tmpid();t.set(u.value,l),t.set(c.value,h),this._emitLine(r+" = -1;"),this._emitLine("var "+i+" = runtime.keys("+o+").length;"),this._emitLine("for(var "+l+" in "+o+") {"),this._emitLine(r+"++;"),this._emitLine("var "+h+" = "+o+"["+l+"];"),this._emitLine('frame.set("'+u.value+'", '+l+");"),this._emitLine('frame.set("'+c.value+'", '+h+");"),this._emitLoopBindings(e,o,r,i),this._withScopedSyntax((function(){n.compile(e.body,t)})),this._emitLine("}"),this._emitLine("}")}else{var f=this._tmpid();t.set(e.name.value,f),this._emitLine("var "+i+" = "+o+".length;"),this._emitLine("for(var "+r+"=0; "+r+" < "+o+".length; "+r+"++) {"),this._emitLine("var "+f+" = "+o+"["+r+"];"),this._emitLine('frame.set("'+e.name.value+'", '+f+");"),this._emitLoopBindings(e,o,r,i),this._withScopedSyntax((function(){n.compile(e.body,t)})),this._emitLine("}")}this._emitLine("}"),e.else_&&(this._emitLine("if (!"+i+") {"),this.compile(e.else_,t),this._emitLine("}")),this._emitLine("frame = frame.pop();")},o._compileAsyncLoop=function(e,t,n){var r=this,i=this._tmpid(),o=this._tmpid(),a=this._tmpid(),u=n?"asyncAll":"asyncEach";if(t=t.push(),this._emitLine("frame = frame.push();"),this._emit("var "+a+" = runtime.fromIterator("),this._compileExpression(e.arr,t),this._emitLine(");"),e.name instanceof s.Array){var c=e.name.children.length;this._emit("runtime."+u+"("+a+", "+c+", function("),e.name.children.forEach((function(e){r._emit(e.value+",")})),this._emit(i+","+o+",next) {"),e.name.children.forEach((function(e){var n=e.value;t.set(n,n),r._emitLine('frame.set("'+n+'", '+n+");")}))}else{var l=e.name.value;this._emitLine("runtime."+u+"("+a+", 1, function("+l+", "+i+", "+o+",next) {"),this._emitLine('frame.set("'+l+'", '+l+");"),t.set(l,l)}this._emitLoopBindings(e,a,i,o),this._withScopedSyntax((function(){var o;n&&(o=r._pushBuffer()),r.compile(e.body,t),r._emitLine("next("+i+(o?","+o:"")+");"),n&&r._popBuffer()}));var h=this._tmpid();this._emitLine("}, "+this._makeCallback(h)),this._addScopeLevel(),n&&this._emitLine(this.buffer+" += "+h+";"),e.else_&&(this._emitLine("if (!"+a+".length) {"),this.compile(e.else_,t),this._emitLine("}")),this._emitLine("frame = frame.pop();")},o.compileAsyncEach=function(e,t){this._compileAsyncLoop(e,t)},o.compileAsyncAll=function(e,t){this._compileAsyncLoop(e,t,!0)},o._compileMacro=function(e,t){var n=this,r=[],i=null,o="macro_"+this._tmpid(),a=void 0!==t;e.args.children.forEach((function(t,o){o===e.args.children.length-1&&t instanceof s.Dict?i=t:(n.assertType(t,s.Symbol),r.push(t))}));var c,l=[].concat(r.map((function(e){return"l_"+e.value})),["kwargs"]),h=r.map((function(e){return'"'+e.value+'"'})),f=(i&&i.children||[]).map((function(e){return'"'+e.key.value+'"'}));c=a?t.push(!0):new u,this._emitLines("var "+o+" = runtime.makeMacro(","["+h.join(", ")+"], ","["+f.join(", ")+"], ","function ("+l.join(", ")+") {","var callerFrame = frame;","frame = "+(a?"frame.push(true);":"new runtime.Frame();"),"kwargs = kwargs || {};",'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {','frame.set("caller", kwargs.caller); }'),r.forEach((function(e){n._emitLine('frame.set("'+e.value+'", l_'+e.value+");"),c.set(e.value,"l_"+e.value)})),i&&i.children.forEach((function(e){var t=e.key.value;n._emit('frame.set("'+t+'", '),n._emit('Object.prototype.hasOwnProperty.call(kwargs, "'+t+'")'),n._emit(' ? kwargs["'+t+'"] : '),n._compileExpression(e.value,c),n._emit(");")}));var p=this._pushBuffer();return this._withScopedSyntax((function(){n.compile(e.body,c)})),this._emitLine("frame = "+(a?"frame.pop();":"callerFrame;")),this._emitLine("return new runtime.SafeString("+p+");"),this._emitLine("});"),this._popBuffer(),o},o.compileMacro=function(e,t){var n=this._compileMacro(e),r=e.name.value;t.set(r,n),t.parent?this._emitLine('frame.set("'+r+'", '+n+");"):("_"!==e.name.value.charAt(0)&&this._emitLine('context.addExport("'+r+'");'),this._emitLine('context.setVariable("'+r+'", '+n+");"))},o.compileCaller=function(e,t){this._emit("(function (){");var n=this._compileMacro(e,t);this._emit("return "+n+";})()")},o._compileGetTemplate=function(e,t,n,r){var i=this._tmpid(),o=this._templateName(),s=this._makeCallback(i),a=n?"true":"false",u=r?"true":"false";return this._emit("env.getTemplate("),this._compileExpression(e.template,t),this._emitLine(", "+a+", "+o+", "+u+", "+s),i},o.compileImport=function(e,t){var n=e.target.value,r=this._compileGetTemplate(e,t,!1,!1);this._addScopeLevel(),this._emitLine(r+".getExported("+(e.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(r)),this._addScopeLevel(),t.set(n,r),t.parent?this._emitLine('frame.set("'+n+'", '+r+");"):this._emitLine('context.setVariable("'+n+'", '+r+");")},o.compileFromImport=function(e,t){var n=this,r=this._compileGetTemplate(e,t,!1,!1);this._addScopeLevel(),this._emitLine(r+".getExported("+(e.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(r)),this._addScopeLevel(),e.names.children.forEach((function(e){var i,o,a=n._tmpid();e instanceof s.Pair?(i=e.key.value,o=e.value.value):o=i=e.value,n._emitLine("if(Object.prototype.hasOwnProperty.call("+r+', "'+i+'")) {'),n._emitLine("var "+a+" = "+r+"."+i+";"),n._emitLine("} else {"),n._emitLine("cb(new Error(\"cannot import '"+i+"'\")); return;"),n._emitLine("}"),t.set(o,a),t.parent?n._emitLine('frame.set("'+o+'", '+a+");"):n._emitLine('context.setVariable("'+o+'", '+a+");")}))},o.compileBlock=function(e){var t=this._tmpid();this.inBlock||this._emit('(parentTemplate ? function(e, c, f, r, cb) { cb(""); } : '),this._emit('context.getBlock("'+e.name.value+'")'),this.inBlock||this._emit(")"),this._emitLine("(env, context, frame, runtime, "+this._makeCallback(t)),this._emitLine(this.buffer+" += "+t+";"),this._addScopeLevel()},o.compileSuper=function(e,t){var n=e.blockName.value,r=e.symbol.value,i=this._makeCallback(r);this._emitLine('context.getSuper(env, "'+n+'", b_'+n+", frame, runtime, "+i),this._emitLine(r+" = runtime.markSafe("+r+");"),this._addScopeLevel(),t.set(r,r)},o.compileExtends=function(e,t){var n=this._tmpid(),r=this._compileGetTemplate(e,t,!0,!1);this._emitLine("parentTemplate = "+r),this._emitLine("for(var "+n+" in parentTemplate.blocks) {"),this._emitLine("context.addBlock("+n+", parentTemplate.blocks["+n+"]);"),this._emitLine("}"),this._addScopeLevel()},o.compileInclude=function(e,t){this._emitLine("var tasks = [];"),this._emitLine("tasks.push("),this._emitLine("function(callback) {");var n=this._compileGetTemplate(e,t,!1,e.ignoreMissing);this._emitLine("callback(null,"+n+");});"),this._emitLine("});");var r=this._tmpid();this._emitLine("tasks.push("),this._emitLine("function(template, callback){"),this._emitLine("template.render(context.getVariables(), frame, "+this._makeCallback(r)),this._emitLine("callback(null,"+r+");});"),this._emitLine("});"),this._emitLine("tasks.push("),this._emitLine("function(result, callback){"),this._emitLine(this.buffer+" += result;"),this._emitLine("callback(null);"),this._emitLine("});"),this._emitLine("env.waterfall(tasks, function(){"),this._addScopeLevel()},o.compileTemplateData=function(e,t){this.compileLiteral(e,t)},o.compileCapture=function(e,t){var n=this,r=this.buffer;this.buffer="output",this._emitLine("(function() {"),this._emitLine('var output = "";'),this._withScopedSyntax((function(){n.compile(e.body,t)})),this._emitLine("return output;"),this._emitLine("})()"),this.buffer=r},o.compileOutput=function(e,t){var n=this;e.children.forEach((function(r){r instanceof s.TemplateData?r.value&&(n._emit(n.buffer+" += "),n.compileLiteral(r,t),n._emitLine(";")):(n._emit(n.buffer+" += runtime.suppressValue("),n.throwOnUndefined&&n._emit("runtime.ensureDefined("),n.compile(r,t),n.throwOnUndefined&&n._emit(","+e.lineno+","+e.colno+")"),n._emit(", env.opts.autoescape);\n"))}))},o.compileRoot=function(e,t){var n=this;t&&this.fail("compileRoot: root node can't have frame"),t=new u,this._emitFuncBegin(e,"root"),this._emitLine("var parentTemplate = null;"),this._compileChildren(e,t),this._emitLine("if(parentTemplate) {"),this._emitLine("parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);"),this._emitLine("} else {"),this._emitLine("cb(null, "+this.buffer+");"),this._emitLine("}"),this._emitFuncEnd(!0),this.inBlock=!0;var r=[],i=e.findAll(s.Block);i.forEach((function(e,t){var i=e.name.value;if(-1!==r.indexOf(i))throw new Error('Block "'+i+'" defined more than once.');r.push(i),n._emitFuncBegin(e,"b_"+i);var o=new u;n._emitLine("var frame = frame.push(true);"),n.compile(e.body,o),n._emitFuncEnd()})),this._emitLine("return {"),i.forEach((function(e,t){var r="b_"+e.name.value;n._emitLine(r+": "+r+",")})),this._emitLine("root: root\n};")},o.compile=function(e,t){var n=this["compile"+e.typename];n?n.call(this,e,t):this.fail("compile: Cannot compile node: "+e.typename,e.lineno,e.colno)},o.getCode=function(){return this.codebuf.join("")},i}(c);e.exports={compile:function(e,t,n,r,s){void 0===s&&(s={});var a=new h(r,s.throwOnUndefined),u=(n||[]).map((function(e){return e.preprocess})).filter((function(e){return!!e})).reduce((function(e,t){return t(e)}),e);return a.compile(o.transform(i.parse(u,n,s),t,r)),a.getCode()},Compiler:h}},function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}var i=n(4),o=n(1).EmitterObj;e.exports=function(e){var t,n;function o(){return e.apply(this,arguments)||this}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n);var s=o.prototype;return s.resolve=function(e,t){return i.resolve(i.dirname(e),t)},s.isRelative=function(e){return 0===e.indexOf("./")||0===e.indexOf("../")},o}(o)},function(e,t,n){"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,i(e,t)}function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}var o=n(12),s=n(15),a=n(0),u=n(5),c=n(18),l=n(10),h=l.FileSystemLoader,f=l.WebLoader,p=l.PrecompiledLoader,d=n(20),m=n(21),y=n(1),v=y.Obj,g=y.EmitterObj,_=n(2),b=_.handleError,w=_.Frame,x=n(22);function k(e,t,n){o((function(){e(t,n)}))}var E={type:"code",obj:{root:function(e,t,n,r,i){try{i(null,"")}catch(e){i(b(e,null,null))}}}},S=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var n=t.prototype;return n.init=function(e,t){var n=this;t=this.opts=t||{},this.opts.dev=!!t.dev,this.opts.autoescape=null==t.autoescape||t.autoescape,this.opts.throwOnUndefined=!!t.throwOnUndefined,this.opts.trimBlocks=!!t.trimBlocks,this.opts.lstripBlocks=!!t.lstripBlocks,this.loaders=[],e?this.loaders=a.isArray(e)?e:[e]:h?this.loaders=[new h("views")]:f&&(this.loaders=[new f("/views")]),"undefined"!=typeof window&&window.nunjucksPrecompiled&&this.loaders.unshift(new p(window.nunjucksPrecompiled)),this._initLoaders(),this.globals=m(),this.filters={},this.tests={},this.asyncFilters=[],this.extensions={},this.extensionsList=[],a._entries(c).forEach((function(e){var t=e[0],r=e[1];return n.addFilter(t,r)})),a._entries(d).forEach((function(e){var t=e[0],r=e[1];return n.addTest(t,r)}))},n._initLoaders=function(){var e=this;this.loaders.forEach((function(t){t.cache={},"function"==typeof t.on&&(t.on("update",(function(n,r){t.cache[n]=null,e.emit("update",n,r,t)})),t.on("load",(function(n,r){e.emit("load",n,r,t)})))}))},n.invalidateCache=function(){this.loaders.forEach((function(e){e.cache={}}))},n.addExtension=function(e,t){return t.__name=e,this.extensions[e]=t,this.extensionsList.push(t),this},n.removeExtension=function(e){var t=this.getExtension(e);t&&(this.extensionsList=a.without(this.extensionsList,t),delete this.extensions[e])},n.getExtension=function(e){return this.extensions[e]},n.hasExtension=function(e){return!!this.extensions[e]},n.addGlobal=function(e,t){return this.globals[e]=t,this},n.getGlobal=function(e){if(void 0===this.globals[e])throw new Error("global not found: "+e);return this.globals[e]},n.addFilter=function(e,t,n){var r=t;return n&&this.asyncFilters.push(e),this.filters[e]=r,this},n.getFilter=function(e){if(!this.filters[e])throw new Error("filter not found: "+e);return this.filters[e]},n.addTest=function(e,t){return this.tests[e]=t,this},n.getTest=function(e){if(!this.tests[e])throw new Error("test not found: "+e);return this.tests[e]},n.resolveTemplate=function(e,t,n){return e.isRelative&&t&&e.isRelative(n)&&e.resolve?e.resolve(t,n):n},n.getTemplate=function(e,t,n,r,i){var o,s=this,u=this,c=null;if(e&&e.raw&&(e=e.raw),a.isFunction(n)&&(i=n,n=null,t=t||!1),a.isFunction(t)&&(i=t,t=!1),e instanceof A)c=e;else{if("string"!=typeof e)throw new Error("template names must be a string: "+e);for(var l=0;l0&&!this.skip(i.TOKEN_COMMA)&&this.fail("parseFrom: expected comma",e.lineno,e.colno);var a=this.parsePrimary();if("_"===a.value.charAt(0)&&this.fail("parseFrom: names starting with an underscore cannot be imported",a.lineno,a.colno),this.skipSymbol("as")){var u=this.parsePrimary();r.addChild(new o.Pair(a.lineno,a.colno,a,u))}else r.addChild(a);n=this.parseWithContext()}return new o.FromImport(e.lineno,e.colno,t,r,n)},u.parseBlock=function(){var e=this.peekToken();this.skipSymbol("block")||this.fail("parseBlock: expected block",e.lineno,e.colno);var t=new o.Block(e.lineno,e.colno);t.name=this.parsePrimary(),t.name instanceof o.Symbol||this.fail("parseBlock: variable name expected",e.lineno,e.colno),this.advanceAfterBlockEnd(e.value),t.body=this.parseUntilBlocks("endblock"),this.skipSymbol("endblock"),this.skipSymbol(t.name.value);var n=this.peekToken();return n||this.fail("parseBlock: expected endblock, got end of file"),this.advanceAfterBlockEnd(n.value),t},u.parseExtends=function(){var e="extends",t=this.peekToken();this.skipSymbol(e)||this.fail("parseTemplateRef: expected "+e);var n=new o.Extends(t.lineno,t.colno);return n.template=this.parseExpression(),this.advanceAfterBlockEnd(t.value),n},u.parseInclude=function(){var e="include",t=this.peekToken();this.skipSymbol(e)||this.fail("parseInclude: expected "+e);var n=new o.Include(t.lineno,t.colno);return n.template=this.parseExpression(),this.skipSymbol("ignore")&&this.skipSymbol("missing")&&(n.ignoreMissing=!0),this.advanceAfterBlockEnd(t.value),n},u.parseIf=function(){var e,t=this.peekToken();this.skipSymbol("if")||this.skipSymbol("elif")||this.skipSymbol("elseif")?e=new o.If(t.lineno,t.colno):this.skipSymbol("ifAsync")?e=new o.IfAsync(t.lineno,t.colno):this.fail("parseIf: expected if, elif, or elseif",t.lineno,t.colno),e.cond=this.parseExpression(),this.advanceAfterBlockEnd(t.value),e.body=this.parseUntilBlocks("elif","elseif","else","endif");var n=this.peekToken();switch(n&&n.value){case"elseif":case"elif":e.else_=this.parseIf();break;case"else":this.advanceAfterBlockEnd(),e.else_=this.parseUntilBlocks("endif"),this.advanceAfterBlockEnd();break;case"endif":e.else_=null,this.advanceAfterBlockEnd();break;default:this.fail("parseIf: expected elif, else, or endif, got end of file")}return e},u.parseSet=function(){var e=this.peekToken();this.skipSymbol("set")||this.fail("parseSet: expected set",e.lineno,e.colno);for(var t,n=new o.Set(e.lineno,e.colno,[]);(t=this.parsePrimary())&&(n.targets.push(t),this.skip(i.TOKEN_COMMA)););return this.skipValue(i.TOKEN_OPERATOR,"=")?(n.value=this.parseExpression(),this.advanceAfterBlockEnd(e.value)):this.skip(i.TOKEN_BLOCK_END)?(n.body=new o.Capture(e.lineno,e.colno,this.parseUntilBlocks("endset")),n.value=null,this.advanceAfterBlockEnd()):this.fail("parseSet: expected = or block end in set tag",e.lineno,e.colno),n},u.parseSwitch=function(){var e="switch",t="endswitch",n="case",r="default",i=this.peekToken();this.skipSymbol(e)||this.skipSymbol(n)||this.skipSymbol(r)||this.fail('parseSwitch: expected "switch," "case" or "default"',i.lineno,i.colno);var s=this.parseExpression();this.advanceAfterBlockEnd(e),this.parseUntilBlocks(n,r,t);var a,u=this.peekToken(),c=[];do{this.skipSymbol(n);var l=this.parseExpression();this.advanceAfterBlockEnd(e);var h=this.parseUntilBlocks(n,r,t);c.push(new o.Case(u.line,u.col,l,h)),u=this.peekToken()}while(u&&u.value===n);switch(u.value){case r:this.advanceAfterBlockEnd(),a=this.parseUntilBlocks(t),this.advanceAfterBlockEnd();break;case t:this.advanceAfterBlockEnd();break;default:this.fail('parseSwitch: expected "case," "default" or "endswitch," got EOF.')}return new o.Switch(i.lineno,i.colno,s,c,a)},u.parseStatement=function(){var e=this.peekToken();if(e.type!==i.TOKEN_SYMBOL&&this.fail("tag name expected",e.lineno,e.colno),this.breakOnBlocks&&-1!==a.indexOf(this.breakOnBlocks,e.value))return null;switch(e.value){case"raw":return this.parseRaw();case"verbatim":return this.parseRaw("verbatim");case"if":case"ifAsync":return this.parseIf();case"for":case"asyncEach":case"asyncAll":return this.parseFor();case"block":return this.parseBlock();case"extends":return this.parseExtends();case"include":return this.parseInclude();case"set":return this.parseSet();case"macro":return this.parseMacro();case"call":return this.parseCall();case"import":return this.parseImport();case"from":return this.parseFrom();case"filter":return this.parseFilterStatement();case"switch":return this.parseSwitch();default:if(this.extensions.length)for(var t=0;t0;){var u=s[0],c=s[1],l=s[2];l===e?r+=1:l===t&&(r-=1),0===r?(i+=c,this.tokens.backN(u.length-c.length)):i+=u}return new o.Output(a.lineno,a.colno,[new o.TemplateData(a.lineno,a.colno,i)])},u.parsePostfix=function(e){for(var t,n=this.peekToken();n;){if(n.type===i.TOKEN_LEFT_PAREN)e=new o.FunCall(n.lineno,n.colno,e,this.parseSignature());else if(n.type===i.TOKEN_LEFT_BRACKET)(t=this.parseAggregate()).children.length>1&&this.fail("invalid index"),e=new o.LookupVal(n.lineno,n.colno,e,t.children[0]);else{if(n.type!==i.TOKEN_OPERATOR||"."!==n.value)break;this.nextToken();var r=this.nextToken();r.type!==i.TOKEN_SYMBOL&&this.fail("expected name as lookup value, got "+r.value,r.lineno,r.colno),t=new o.Literal(r.lineno,r.colno,r.value),e=new o.LookupVal(n.lineno,n.colno,e,t)}n=this.peekToken()}return e},u.parseExpression=function(){return this.parseInlineIf()},u.parseInlineIf=function(){var e=this.parseOr();if(this.skipSymbol("if")){var t=this.parseOr(),n=e;(e=new o.InlineIf(e.lineno,e.colno)).body=n,e.cond=t,this.skipSymbol("else")?e.else_=this.parseOr():e.else_=null}return e},u.parseOr=function(){for(var e=this.parseAnd();this.skipSymbol("or");){var t=this.parseAnd();e=new o.Or(e.lineno,e.colno,e,t)}return e},u.parseAnd=function(){for(var e=this.parseNot();this.skipSymbol("and");){var t=this.parseNot();e=new o.And(e.lineno,e.colno,e,t)}return e},u.parseNot=function(){var e=this.peekToken();return this.skipSymbol("not")?new o.Not(e.lineno,e.colno,this.parseNot()):this.parseIn()},u.parseIn=function(){for(var e=this.parseIs();;){var t=this.nextToken();if(!t)break;var n=t.type===i.TOKEN_SYMBOL&&"not"===t.value;if(n||this.pushToken(t),!this.skipSymbol("in")){n&&this.pushToken(t);break}var r=this.parseIs();e=new o.In(e.lineno,e.colno,e,r),n&&(e=new o.Not(e.lineno,e.colno,e))}return e},u.parseIs=function(){var e=this.parseCompare();if(this.skipSymbol("is")){var t=this.skipSymbol("not"),n=this.parseCompare();e=new o.Is(e.lineno,e.colno,e,n),t&&(e=new o.Not(e.lineno,e.colno,e))}return e},u.parseCompare=function(){for(var e=["==","===","!=","!==","<",">","<=",">="],t=this.parseConcat(),n=[];;){var r=this.nextToken();if(!r)break;if(-1===e.indexOf(r.value)){this.pushToken(r);break}n.push(new o.CompareOperand(r.lineno,r.colno,this.parseConcat(),r.value))}return n.length?new o.Compare(n[0].lineno,n[0].colno,t,n):t},u.parseConcat=function(){for(var e=this.parseAdd();this.skipValue(i.TOKEN_TILDE,"~");){var t=this.parseAdd();e=new o.Concat(e.lineno,e.colno,e,t)}return e},u.parseAdd=function(){for(var e=this.parseSub();this.skipValue(i.TOKEN_OPERATOR,"+");){var t=this.parseSub();e=new o.Add(e.lineno,e.colno,e,t)}return e},u.parseSub=function(){for(var e=this.parseMul();this.skipValue(i.TOKEN_OPERATOR,"-");){var t=this.parseMul();e=new o.Sub(e.lineno,e.colno,e,t)}return e},u.parseMul=function(){for(var e=this.parseDiv();this.skipValue(i.TOKEN_OPERATOR,"*");){var t=this.parseDiv();e=new o.Mul(e.lineno,e.colno,e,t)}return e},u.parseDiv=function(){for(var e=this.parseFloorDiv();this.skipValue(i.TOKEN_OPERATOR,"/");){var t=this.parseFloorDiv();e=new o.Div(e.lineno,e.colno,e,t)}return e},u.parseFloorDiv=function(){for(var e=this.parseMod();this.skipValue(i.TOKEN_OPERATOR,"//");){var t=this.parseMod();e=new o.FloorDiv(e.lineno,e.colno,e,t)}return e},u.parseMod=function(){for(var e=this.parsePow();this.skipValue(i.TOKEN_OPERATOR,"%");){var t=this.parsePow();e=new o.Mod(e.lineno,e.colno,e,t)}return e},u.parsePow=function(){for(var e=this.parseUnary();this.skipValue(i.TOKEN_OPERATOR,"**");){var t=this.parseUnary();e=new o.Pow(e.lineno,e.colno,e,t)}return e},u.parseUnary=function(e){var t,n=this.peekToken();return t=this.skipValue(i.TOKEN_OPERATOR,"-")?new o.Neg(n.lineno,n.colno,this.parseUnary(!0)):this.skipValue(i.TOKEN_OPERATOR,"+")?new o.Pos(n.lineno,n.colno,this.parseUnary(!0)):this.parsePrimary(),e||(t=this.parseFilter(t)),t},u.parsePrimary=function(e){var t,n=this.nextToken(),r=null;if(n?n.type===i.TOKEN_STRING?t=n.value:n.type===i.TOKEN_INT?t=parseInt(n.value,10):n.type===i.TOKEN_FLOAT?t=parseFloat(n.value):n.type===i.TOKEN_BOOLEAN?"true"===n.value?t=!0:"false"===n.value?t=!1:this.fail("invalid boolean: "+n.value,n.lineno,n.colno):n.type===i.TOKEN_NONE?t=null:n.type===i.TOKEN_REGEX&&(t=new RegExp(n.value.body,n.value.flags)):this.fail("expected expression, got end of file"),void 0!==t?r=new o.Literal(n.lineno,n.colno,t):n.type===i.TOKEN_SYMBOL?r=new o.Symbol(n.lineno,n.colno,n.value):(this.pushToken(n),r=this.parseAggregate()),e||(r=this.parsePostfix(r)),r)return r;throw this.error("unexpected token: "+n.value,n.lineno,n.colno)},u.parseFilterName=function(){for(var e=this.expect(i.TOKEN_SYMBOL),t=e.value;this.skipValue(i.TOKEN_OPERATOR,".");)t+="."+this.expect(i.TOKEN_SYMBOL).value;return new o.Symbol(e.lineno,e.colno,t)},u.parseFilterArgs=function(e){return this.peekToken().type===i.TOKEN_LEFT_PAREN?this.parsePostfix(e).args.children:[]},u.parseFilter=function(e){for(;this.skip(i.TOKEN_PIPE);){var t=this.parseFilterName();e=new o.Filter(t.lineno,t.colno,t,new o.NodeList(t.lineno,t.colno,[e].concat(this.parseFilterArgs(e))))}return e},u.parseFilterStatement=function(){var e=this.peekToken();this.skipSymbol("filter")||this.fail("parseFilterStatement: expected filter");var t=this.parseFilterName(),n=this.parseFilterArgs(t);this.advanceAfterBlockEnd(e.value);var r=new o.Capture(t.lineno,t.colno,this.parseUntilBlocks("endfilter"));this.advanceAfterBlockEnd();var i=new o.Filter(t.lineno,t.colno,t,new o.NodeList(t.lineno,t.colno,[r].concat(n)));return new o.Output(t.lineno,t.colno,[i])},u.parseAggregate=function(){var e,t=this.nextToken();switch(t.type){case i.TOKEN_LEFT_PAREN:e=new o.Group(t.lineno,t.colno);break;case i.TOKEN_LEFT_BRACKET:e=new o.Array(t.lineno,t.colno);break;case i.TOKEN_LEFT_CURLY:e=new o.Dict(t.lineno,t.colno);break;default:return null}for(;;){var n=this.peekToken().type;if(n===i.TOKEN_RIGHT_PAREN||n===i.TOKEN_RIGHT_BRACKET||n===i.TOKEN_RIGHT_CURLY){this.nextToken();break}if(e.children.length>0&&(this.skip(i.TOKEN_COMMA)||this.fail("parseAggregate: expected comma after expression",t.lineno,t.colno)),e instanceof o.Dict){var r=this.parsePrimary();this.skip(i.TOKEN_COLON)||this.fail("parseAggregate: expected colon after dict key",t.lineno,t.colno);var s=this.parseExpression();e.addChild(new o.Pair(r.lineno,r.colno,r,s))}else{var a=this.parseExpression();e.addChild(a)}}return e},u.parseSignature=function(e,t){var n=this.peekToken();if(!t&&n.type!==i.TOKEN_LEFT_PAREN){if(e)return null;this.fail("expected arguments",n.lineno,n.colno)}n.type===i.TOKEN_LEFT_PAREN&&(n=this.nextToken());for(var r=new o.NodeList(n.lineno,n.colno),s=new o.KeywordArgs(n.lineno,n.colno),a=!1;;){if(n=this.peekToken(),!t&&n.type===i.TOKEN_RIGHT_PAREN){this.nextToken();break}if(t&&n.type===i.TOKEN_BLOCK_END)break;if(a&&!this.skip(i.TOKEN_COMMA))this.fail("parseSignature: expected comma after expression",n.lineno,n.colno);else{var u=this.parseExpression();this.skipValue(i.TOKEN_OPERATOR,"=")?s.addChild(new o.Pair(u.lineno,u.colno,u,this.parseExpression())):r.addChild(u)}a=!0}return s.children.length&&r.addChild(s),r},u.parseUntilBlocks=function(){for(var e=this.breakOnBlocks,t=arguments.length,n=new Array(t),r=0;r=","//","**"],j=C+this.current();switch(-1!==r.indexOf(M,j)&&(this.forward(),C=j,-1!==r.indexOf(M,j+this.current())&&(C=j+this.current(),this.forward())),C){case"(":D=d;break;case")":D=m;break;case"[":D=y;break;case"]":D=v;break;case"{":D=g;break;case"}":D=_;break;case",":D=w;break;case":":D=x;break;case"~":D=k;break;case"|":D=E;break;default:D=b}return P(D,C,t,n)}if((e=this._extractUntil(i+o)).match(/^[-+]?[0-9]+$/)){if("."===this.current()){this.forward();var F=this._extract("0123456789");return P(S,e+"."+F,t,n)}return P("int",e,t,n)}if(e.match(/^(true|false)$/))return P(T,e,t,n);if("none"===e)return P(A,e,t,n);if("null"===e)return P(A,e,t,n);if(e)return P(O,e,t,n);throw new Error("Unexpected value while parsing: "+e)}var B,U=this.tags.BLOCK_START.charAt(0)+this.tags.VARIABLE_START.charAt(0)+this.tags.COMMENT_START.charAt(0)+this.tags.COMMENT_END.charAt(0);if(this.isFinished())return null;if((e=this._extractString(this.tags.BLOCK_START+"-"))||(e=this._extractString(this.tags.BLOCK_START)))return this.in_code=!0,P(c,e,t,n);if((e=this._extractString(this.tags.VARIABLE_START+"-"))||(e=this._extractString(this.tags.VARIABLE_START)))return this.in_code=!0,P(h,e,t,n);e="";var z=!1;for(this._matches(this.tags.COMMENT_START)&&(z=!0,e=this._extractString(this.tags.COMMENT_START));null!==(B=this._extractUntil(U));){if(e+=B,(this._matches(this.tags.BLOCK_START)||this._matches(this.tags.VARIABLE_START)||this._matches(this.tags.COMMENT_START))&&!z){if(this.lstripBlocks&&this._matches(this.tags.BLOCK_START)&&this.colno>0&&this.colno<=e.length){var V=e.slice(-this.colno);if(/^\s+$/.test(V)&&!(e=e.slice(0,-this.colno)).length)return this.nextToken()}break}if(this._matches(this.tags.COMMENT_END)){if(!z)throw new Error("unexpected end of comment");e+=this._extractString(this.tags.COMMENT_END);break}e+=this.current(),this.forward()}if(null===B&&z)throw new Error("expected end of comment, got end of file");return P(z?p:u,e,t,n)},t._parseString=function(e){this.forward();for(var t="";!this.isFinished()&&this.current()!==e;){var n=this.current();if("\\"===n){switch(this.forward(),this.current()){case"n":t+="\n";break;case"t":t+="\t";break;case"r":t+="\r";break;default:t+=this.current()}this.forward()}else t+=n,this.forward()}return this.forward(),t},t._matches=function(e){return this.index+e.length>this.len?null:this.str.slice(this.index,this.index+e.length)===e},t._extractString=function(e){return this._matches(e)?(this.forwardN(e.length),e):null},t._extractUntil=function(e){return this._extractMatching(!0,e||"")},t._extract=function(e){return this._extractMatching(!1,e)},t._extractMatching=function(e,t){if(this.isFinished())return null;var n=t.indexOf(this.current());if(e&&-1===n||!e&&-1!==n){var r=this.current();this.forward();for(var i=t.indexOf(this.current());(e&&-1===i||!e&&-1!==i)&&!this.isFinished();)r+=this.current(),this.forward(),i=t.indexOf(this.current());return r}return""},t._extractRegex=function(e){var t=this.currentStr().match(e);return t?(this.forwardN(t[0].length),t):null},t.isFinished=function(){return this.index>=this.len},t.forwardN=function(e){for(var t=0;t1024){for(var t=0,n=i.length-o;t0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,a=u,console&&console.warn&&console.warn(a)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}function d(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=i[e];if(void 0===u)return!1;if("function"==typeof u)o(u,this,t);else{var c=u.length,l=y(u,c);for(n=0;n=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return d(this,e,!0)},a.prototype.rawListeners=function(e){return d(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},a.prototype.listenerCount=m,a.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){"use strict";var r=n(3),i=n(0),o=0;function s(){return"hole_"+o++}function a(e,t){for(var n=null,r=0;r=t)return e;var n=t-e.length,s=r.repeat(" ",n/2-n%2),a=r.repeat(" ",n/2);return i.copySafeness(e,s+e+a)},t.default=function(e,t,n){return n?e||t:void 0!==e?e:t},t.dictsort=function(e,t,n){if(!r.isObject(e))throw new r.TemplateError("dictsort filter: val must be an object");var i,o=[];for(var s in e)o.push([s,e[s]]);if(void 0===n||"key"===n)i=0;else{if("value"!==n)throw new r.TemplateError("dictsort filter: You can only sort by either key or value");i=1}return o.sort((function(e,n){var o=e[i],s=n[i];return t||(r.isString(o)&&(o=o.toUpperCase()),r.isString(s)&&(s=s.toUpperCase())),o>s?1:o===s?0:-1})),o},t.dump=function(e,t){return JSON.stringify(e,null,t)},t.escape=function(e){return e instanceof i.SafeString?e:(e=null==e?"":e,i.markSafe(r.escape(e.toString())))},t.safe=function(e){return e instanceof i.SafeString?e:(e=null==e?"":e,i.markSafe(e.toString()))},t.first=function(e){return e[0]},t.forceescape=function(e){return e=null==e?"":e,i.markSafe(r.escape(e.toString()))},t.groupby=function(e,t){return r.groupBy(e,t,this.env.opts.throwOnUndefined)},t.indent=function(e,t,n){if(""===(e=o(e,"")))return"";t=t||4;var s=e.split("\n"),a=r.repeat(" ",t),u=s.map((function(e,t){return 0!==t||n?""+a+e:e})).join("\n");return i.copySafeness(e,u)},t.join=function(e,t,n){return t=t||"",n&&(e=r.map(e,(function(e){return e[n]}))),e.join(t)},t.last=function(e){return e[e.length-1]},t.length=function(e){var t=o(e,"");return void 0!==t?"function"==typeof Map&&t instanceof Map||"function"==typeof Set&&t instanceof Set?t.size:!r.isObject(t)||t instanceof i.SafeString?t.length:r.keys(t).length:0},t.list=u,t.lower=function(e){return(e=o(e,"")).toLowerCase()},t.nl2br=function(e){return null==e?"":i.copySafeness(e,e.replace(/\r\n|\n/g,"
\n"))},t.random=function(e){return e[Math.floor(Math.random()*e.length)]},t.reject=c(!1),t.rejectattr=function(e,t){return e.filter((function(e){return!e[t]}))},t.select=c(!0),t.selectattr=function(e,t){return e.filter((function(e){return!!e[t]}))},t.replace=function(e,t,n,r){var o=e;if(t instanceof RegExp)return e.replace(t,n);void 0===r&&(r=-1);var s="";if("number"==typeof t)t=""+t;else if("string"!=typeof t)return e;if("number"==typeof e&&(e=""+e),"string"!=typeof e&&!(e instanceof i.SafeString))return e;if(""===t)return s=n+e.split("").join(n)+n,i.copySafeness(e,s);var a=e.indexOf(t);if(0===r||-1===a)return e;for(var u=0,c=0;a>-1&&(-1===r||c=i&&l.push(n),o.push(l)}return o},t.sum=function(e,t,n){return void 0===n&&(n=0),t&&(e=r.map(e,(function(e){return e[t]}))),n+e.reduce((function(e,t){return e+t}),0)},t.sort=i.makeMacro(["value","reverse","case_sensitive","attribute"],[],(function(e,t,n,i){var o=this,s=r.map(e,(function(e){return e})),a=r.getAttrGetter(i);return s.sort((function(e,s){var u=i?a(e):e,c=i?a(s):s;if(o.env.opts.throwOnUndefined&&i&&(void 0===u||void 0===c))throw new TypeError('sort: attribute "'+i+'" resolved to undefined');return!n&&r.isString(u)&&r.isString(c)&&(u=u.toLowerCase(),c=c.toLowerCase()),uc?t?-1:1:0})),s})),t.string=function(e){return i.copySafeness(e,e)},t.striptags=function(e,t){var n,r=l((e=o(e,"")).replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|/gi,""));return n=t?r.replace(/^ +| +$/gm,"").replace(/ +/g," ").replace(/(\r\n)/g,"\n").replace(/\n\n\n+/g,"\n\n"):r.replace(/\s+/gi," "),i.copySafeness(e,n)},t.title=function(e){var t=(e=o(e,"")).split(" ").map((function(e){return a(e)}));return i.copySafeness(e,t.join(" "))},t.trim=l,t.truncate=function(e,t,n,r){var s=e;if(t=t||255,(e=o(e,"")).length<=t)return e;if(n)e=e.substring(0,t);else{var a=e.lastIndexOf(" ",t);-1===a&&(a=t),e=e.substring(0,a)}return e+=null!=r?r:"...",i.copySafeness(s,e)},t.upper=function(e){return(e=o(e,"")).toUpperCase()},t.urlencode=function(e){var t=encodeURIComponent;return r.isString(e)?t(e):(r.isArray(e)?e:r._entries(e)).map((function(e){var n=e[0],r=e[1];return t(n)+"="+t(r)})).join("&")};var h=/^(?:\(|<|<)?(.*?)(?:\.|,|\)|\n|>)?$/,f=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,p=/^https?:\/\/.*$/,d=/^www\./,m=/\.(?:org|net|com)(?:\:|\/|$)/;t.urlize=function(e,t,n){s(t)&&(t=1/0);var r=!0===n?' rel="nofollow"':"";return e.split(/(\s+)/).filter((function(e){return e&&e.length})).map((function(e){var n=e.match(h),i=n?n[1]:e,o=i.substr(0,t);return p.test(i)?'"+o+"":d.test(i)?'"+o+"":f.test(i)?''+i+"":m.test(i)?'"+o+"":e})).join("")},t.wordcount=function(e){var t=(e=o(e,""))?e.match(/\w+/g):null;return t?t.length:null},t.float=function(e,t){var n=parseFloat(e);return s(n)?t:n};var y=i.makeMacro(["value","default","base"],[],(function(e,t,n){void 0===n&&(n=10);var r=parseInt(e,n);return s(r)?t:r}));t.int=y,t.d=t.default,t.e=t.escape},function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}var i=function(e){var t,n;function i(t){var n;return(n=e.call(this)||this).precompiled=t||{},n}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n),i.prototype.getSource=function(e){return this.precompiled[e]?{src:{type:"code",obj:this.precompiled[e]},path:e}:null},i}(n(6));e.exports={PrecompiledLoader:i}},function(e,t,n){"use strict";var r=n(2).SafeString;t.callable=function(e){return"function"==typeof e},t.defined=function(e){return void 0!==e},t.divisibleby=function(e,t){return e%t==0},t.escaped=function(e){return e instanceof r},t.equalto=function(e,t){return e===t},t.eq=t.equalto,t.sameas=t.equalto,t.even=function(e){return e%2==0},t.falsy=function(e){return!e},t.ge=function(e,t){return e>=t},t.greaterthan=function(e,t){return e>t},t.gt=t.greaterthan,t.le=function(e,t){return e<=t},t.lessthan=function(e,t){return e0)for(var i=e;it;o+=n)r.push(o);return r},cycler:function(){return e=Array.prototype.slice.call(arguments),t=-1,{current:null,reset:function(){t=-1,this.current=null},next:function(){return++t>=e.length&&(t=0),this.current=e[t],this.current}};var e,t},joiner:function(e){return function(e){e=e||",";var t=!0;return function(){var n=t?"":e;return t=!1,n}}(e)}}}},function(e,t,n){var r=n(4);e.exports=function(e,t){function n(e,t){if(this.name=e,this.path=e,this.defaultEngine=t.defaultEngine,this.ext=r.extname(e),!this.ext&&!this.defaultEngine)throw new Error("No default engine was specified and no extension was provided.");this.ext||(this.name+=this.ext=("."!==this.defaultEngine[0]?".":"")+this.defaultEngine)}return n.prototype.render=function(t,n){e.render(this.name,t,n)},t.set("view",n),t.set("nunjucksEnv",e),e}},function(e,t,n){"use strict";var r=n(4),i=n(4),o=n(0)._prettifyError,s=n(5),a=n(7).Environment,u=n(24);function c(e,t){return!!Array.isArray(t)&&t.some((function(t){return e.match(t)}))}function l(e,t){(t=t||{}).isString=!0;var n=t.env||new a([]),r=t.wrapper||u;if(!t.name)throw new Error('the "name" option is required when compiling a string');return r([h(e,t.name,n)],t)}function h(e,t,n){var r,i=(n=n||new a([])).asyncFilters,u=n.extensionsList;t=t.replace(/\\/g,"/");try{r=s.compile(e,i,u,t,n.opts)}catch(e){throw o(t,!1,e)}return{name:t,template:r}}e.exports={precompile:function(e,t){var n=(t=t||{}).env||new a([]),o=t.wrapper||u;if(t.isString)return l(e,t);var s=r.existsSync(e)&&r.statSync(e),f=[],p=[];if(s.isFile())f.push(h(r.readFileSync(e,"utf-8"),t.name||e,n));else if(s.isDirectory()){!function n(o){r.readdirSync(o).forEach((function(s){var a=i.join(o,s),u=a.substr(i.join(e,"/").length),l=r.statSync(a);l&&l.isDirectory()?c(u+="/",t.exclude)||n(a):c(u,t.include)&&p.push(a)}))}(e);for(var d=0;de.length||i>0&&s>=r||i<0&&s<=r);s+=i)o.push(n.memberLookup(e,s));return o}function p(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var d={pop:function(e){if(void 0===e)return this.pop();if(e>=this.length||e<0)throw new Error("KeyError");return this.splice(e,1)},append:function(e){return this.push(e)},remove:function(e){for(var t=0;t{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};(()=>{"use strict";r.r(i),r.d(i,{Component:()=>b,ComponentAttribute:()=>s,ComponentAttributeDefinition:()=>O,ComponentDefinition:()=>x,ComponentDrawOption:()=>f,ComponentLink:()=>D,ComponentLinkDefinition:()=>j,DefaultConfiguration:()=>GN,DefaultData:()=>zN,DefaultDrawer:()=>oN,DefaultMetadata:()=>cN,DefaultParser:()=>pN,DefaultPlugin:()=>ZN,DefaultRender:()=>vN,FileInformation:()=>l,FileInput:()=>q,ParseError:()=>EN,Tag:()=>eP,Variable:()=>aP});var e={};function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(e){var n=function(e,n){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,"string");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==t(n)?n:n+""}r.r(e),r.d(e,{Adder:()=>ve,Delaunay:()=>ju,FormatSpecifier:()=>th,InternMap:()=>be,InternSet:()=>we,Node:()=>Ty,Path:()=>Js,Voronoi:()=>Cu,ZoomTransform:()=>IT,active:()=>is,arc:()=>gE,area:()=>TE,areaRadial:()=>DE,ascending:()=>K,autoType:()=>yc,axisBottom:()=>un,axisLeft:()=>cn,axisRight:()=>an,axisTop:()=>sn,bin:()=>tt,bisect:()=>ee,bisectCenter:()=>J,bisectLeft:()=>Z,bisectRight:()=>X,bisector:()=>W,blob:()=>ol,blur:()=>te,blur2:()=>ne,blurImage:()=>re,brush:()=>Ls,brushSelection:()=>Ps,brushX:()=>Cs,brushY:()=>Rs,buffer:()=>al,chord:()=>qs,chordDirected:()=>Hs,chordTranspose:()=>Ks,cluster:()=>_y,color:()=>ei,contourDensity:()=>uu,contours:()=>eu,count:()=>ue,create:()=>Hk,creator:()=>mr,cross:()=>fe,csv:()=>fl,csvFormat:()=>rc,csvFormatBody:()=>ic,csvFormatRow:()=>sc,csvFormatRows:()=>oc,csvFormatValue:()=>ac,csvParse:()=>tc,csvParseRows:()=>nc,cubehelix:()=>qa,cumsum:()=>pe,curveBasis:()=>SS,curveBasisClosed:()=>AS,curveBasisOpen:()=>NS,curveBumpX:()=>BE,curveBumpY:()=>UE,curveBundle:()=>CS,curveCardinal:()=>IS,curveCardinalClosed:()=>MS,curveCardinalOpen:()=>FS,curveCatmullRom:()=>zS,curveCatmullRomClosed:()=>$S,curveCatmullRomOpen:()=>KS,curveLinear:()=>xE,curveLinearClosed:()=>WS,curveMonotoneX:()=>tT,curveMonotoneY:()=>nT,curveNatural:()=>oT,curveStep:()=>aT,curveStepAfter:()=>cT,curveStepBefore:()=>uT,descending:()=>H,deviation:()=>me,difference:()=>Bt,disjoint:()=>Ut,dispatch:()=>mn,drag:()=>qu,dragDisable:()=>Ir,dragEnable:()=>Dr,dsv:()=>hl,dsvFormat:()=>Ju,easeBack:()=>Jc,easeBackIn:()=>Xc,easeBackInOut:()=>Jc,easeBackOut:()=>Zc,easeBounce:()=>Gc,easeBounceIn:()=>Wc,easeBounceInOut:()=>Yc,easeBounceOut:()=>Gc,easeCircle:()=>Mc,easeCircleIn:()=>Ic,easeCircleInOut:()=>Mc,easeCircleOut:()=>Dc,easeCubic:()=>es,easeCubicIn:()=>Zo,easeCubicInOut:()=>es,easeCubicOut:()=>Jo,easeElastic:()=>nl,easeElasticIn:()=>tl,easeElasticInOut:()=>rl,easeElasticOut:()=>nl,easeExp:()=>Lc,easeExpIn:()=>Cc,easeExpInOut:()=>Lc,easeExpOut:()=>Rc,easeLinear:()=>gc,easePoly:()=>Ec,easePolyIn:()=>xc,easePolyInOut:()=>Ec,easePolyOut:()=>kc,easeQuad:()=>wc,easeQuadIn:()=>_c,easeQuadInOut:()=>wc,easeQuadOut:()=>bc,easeSin:()=>Nc,easeSinIn:()=>Ac,easeSinInOut:()=>Nc,easeSinOut:()=>Oc,every:()=>Lt,extent:()=>ye,fcumsum:()=>_e,filter:()=>Dt,flatGroup:()=>Pe,flatRollup:()=>Ce,forceCenter:()=>wl,forceCollide:()=>Il,forceLink:()=>jl,forceManyBody:()=>Hl,forceRadial:()=>Wl,forceSimulation:()=>Kl,forceX:()=>Gl,forceY:()=>Yl,format:()=>sh,formatDefaultLocale:()=>hh,formatLocale:()=>lh,formatPrefix:()=>ah,formatSpecifier:()=>eh,fsum:()=>ge,geoAlbers:()=>Im,geoAlbersUsa:()=>Dm,geoArea:()=>yf,geoAzimuthalEqualArea:()=>Bm,geoAzimuthalEqualAreaRaw:()=>Fm,geoAzimuthalEquidistant:()=>zm,geoAzimuthalEquidistantRaw:()=>Um,geoBounds:()=>Xf,geoCentroid:()=>cp,geoCircle:()=>bp,geoClipAntimeridian:()=>Cp,geoClipCircle:()=>Rp,geoClipExtent:()=>Up,geoClipRectangle:()=>Bp,geoConicConformal:()=>Wm,geoConicConformalRaw:()=>Hm,geoConicEqualArea:()=>Lm,geoConicEqualAreaRaw:()=>Rm,geoConicEquidistant:()=>Xm,geoConicEquidistantRaw:()=>Qm,geoContains:()=>rd,geoDistance:()=>Gp,geoEqualEarth:()=>iy,geoEqualEarthRaw:()=>ry,geoEquirectangular:()=>Ym,geoEquirectangularRaw:()=>Gm,geoGnomonic:()=>sy,geoGnomonicRaw:()=>oy,geoGraticule:()=>sd,geoGraticule10:()=>ad,geoIdentity:()=>ay,geoInterpolate:()=>ud,geoLength:()=>Kp,geoMercator:()=>$m,geoMercatorRaw:()=>Vm,geoNaturalEarth1:()=>cy,geoNaturalEarth1Raw:()=>uy,geoOrthographic:()=>hy,geoOrthographicRaw:()=>ly,geoPath:()=>mm,geoProjection:()=>Nm,geoProjectionMutator:()=>Pm,geoRotation:()=>vp,geoStereographic:()=>py,geoStereographicRaw:()=>fy,geoStream:()=>Kh,geoTransform:()=>ym,geoTransverseMercator:()=>my,geoTransverseMercatorRaw:()=>dy,gray:()=>Ea,greatest:()=>ut,greatestIndex:()=>St,group:()=>Ae,groupSort:()=>Ve,groups:()=>Oe,hcl:()=>La,hierarchy:()=>wy,histogram:()=>tt,hsl:()=>pi,html:()=>_l,image:()=>dl,index:()=>Ie,indexes:()=>De,interpolate:()=>Bi,interpolateArray:()=>Ci,interpolateBasis:()=>_i,interpolateBasisClosed:()=>bi,interpolateBlues:()=>_k,interpolateBrBG:()=>Cx,interpolateBuGn:()=>Yx,interpolateBuPu:()=>Xx,interpolateCividis:()=>Pk,interpolateCool:()=>Lk,interpolateCubehelix:()=>Uv,interpolateCubehelixDefault:()=>Ck,interpolateCubehelixLong:()=>zv,interpolateDate:()=>Li,interpolateDiscrete:()=>Av,interpolateGnBu:()=>Jx,interpolateGreens:()=>wk,interpolateGreys:()=>kk,interpolateHcl:()=>jv,interpolateHclLong:()=>Fv,interpolateHsl:()=>Lv,interpolateHslLong:()=>Iv,interpolateHue:()=>Ov,interpolateInferno:()=>qk,interpolateLab:()=>Dv,interpolateMagma:()=>$k,interpolateNumber:()=>Ii,interpolateNumberArray:()=>Ni,interpolateObject:()=>Di,interpolateOrRd:()=>tk,interpolateOranges:()=>Nk,interpolatePRGn:()=>Lx,interpolatePiYG:()=>Dx,interpolatePlasma:()=>Kk,interpolatePuBu:()=>ok,interpolatePuBuGn:()=>rk,interpolatePuOr:()=>jx,interpolatePuRd:()=>ak,interpolatePurples:()=>Sk,interpolateRainbow:()=>Dk,interpolateRdBu:()=>Bx,interpolateRdGy:()=>zx,interpolateRdPu:()=>ck,interpolateRdYlBu:()=>$x,interpolateRdYlGn:()=>Kx,interpolateReds:()=>Ak,interpolateRgb:()=>Si,interpolateRgbBasis:()=>Ai,interpolateRgbBasisClosed:()=>Oi,interpolateRound:()=>Nv,interpolateSinebow:()=>Bk,interpolateSpectral:()=>Wx,interpolateString:()=>Fi,interpolateTransformCss:()=>Ao,interpolateTransformSvg:()=>Oo,interpolateTurbo:()=>Uk,interpolateViridis:()=>Vk,interpolateWarm:()=>Rk,interpolateYlGn:()=>pk,interpolateYlGnBu:()=>hk,interpolateYlOrBr:()=>mk,interpolateYlOrRd:()=>vk,interpolateZoom:()=>Cv,interrupt:()=>wo,intersection:()=>zt,interval:()=>CT,isoFormat:()=>OT,isoParse:()=>PT,json:()=>yl,lab:()=>Sa,lch:()=>Ra,least:()=>kt,leastIndex:()=>Et,line:()=>SE,lineRadial:()=>IE,link:()=>qE,linkHorizontal:()=>KE,linkRadial:()=>WE,linkVertical:()=>HE,local:()=>Gk,map:()=>Mt,matcher:()=>wn,max:()=>nt,maxIndex:()=>rt,mean:()=>dt,median:()=>mt,medianIndex:()=>yt,merge:()=>vt,min:()=>it,minIndex:()=>ot,mode:()=>gt,namespace:()=>Mn,namespaces:()=>Dn,nice:()=>Je,now:()=>Ji,pack:()=>Xy,packEnclose:()=>Dy,packSiblings:()=>Yy,pairs:()=>_t,partition:()=>rv,path:()=>ea,pathRound:()=>ta,permute:()=>Fe,pie:()=>NE,piecewise:()=>Vv,pointRadial:()=>ME,pointer:()=>zi,pointers:()=>Qk,polygonArea:()=>qv,polygonCentroid:()=>Kv,polygonContains:()=>Qv,polygonHull:()=>Yv,polygonLength:()=>Xv,precisionFixed:()=>fh,precisionPrefix:()=>ph,precisionRound:()=>dh,quadtree:()=>Tl,quantile:()=>ct,quantileIndex:()=>ht,quantileSorted:()=>lt,quantize:()=>$v,quickselect:()=>st,radialArea:()=>DE,radialLine:()=>IE,randomBates:()=>ig,randomBernoulli:()=>ag,randomBeta:()=>lg,randomBinomial:()=>hg,randomCauchy:()=>pg,randomExponential:()=>og,randomGamma:()=>cg,randomGeometric:()=>ug,randomInt:()=>eg,randomIrwinHall:()=>rg,randomLcg:()=>_g,randomLogNormal:()=>ng,randomLogistic:()=>dg,randomNormal:()=>tg,randomPareto:()=>sg,randomPoisson:()=>mg,randomUniform:()=>Jv,randomWeibull:()=>fg,range:()=>wt,rank:()=>xt,reduce:()=>jt,reverse:()=>Ft,rgb:()=>ii,ribbon:()=>fa,ribbonArrow:()=>pa,rollup:()=>Re,rollups:()=>Le,scaleBand:()=>Eg,scaleDiverging:()=>px,scaleDivergingLog:()=>dx,scaleDivergingPow:()=>yx,scaleDivergingSqrt:()=>vx,scaleDivergingSymlog:()=>mx,scaleIdentity:()=>Bg,scaleImplicit:()=>xg,scaleLinear:()=>Fg,scaleLog:()=>Gg,scaleOrdinal:()=>kg,scalePoint:()=>Tg,scalePow:()=>r_,scaleQuantile:()=>a_,scaleQuantize:()=>u_,scaleRadial:()=>s_,scaleSequential:()=>sx,scaleSequentialLog:()=>ax,scaleSequentialPow:()=>cx,scaleSequentialQuantile:()=>hx,scaleSequentialSqrt:()=>lx,scaleSequentialSymlog:()=>ux,scaleSqrt:()=>i_,scaleSymlog:()=>Zg,scaleThreshold:()=>c_,scaleTime:()=>nx,scaleUtc:()=>rx,scan:()=>Tt,schemeAccent:()=>bx,schemeBlues:()=>gk,schemeBrBG:()=>Px,schemeBuGn:()=>Gx,schemeBuPu:()=>Qx,schemeCategory10:()=>_x,schemeDark2:()=>wx,schemeGnBu:()=>Zx,schemeGreens:()=>bk,schemeGreys:()=>xk,schemeOrRd:()=>ek,schemeOranges:()=>Ok,schemePRGn:()=>Rx,schemePaired:()=>xx,schemePastel1:()=>kx,schemePastel2:()=>Ex,schemePiYG:()=>Ix,schemePuBu:()=>ik,schemePuBuGn:()=>nk,schemePuOr:()=>Mx,schemePuRd:()=>sk,schemePurples:()=>Ek,schemeRdBu:()=>Fx,schemeRdGy:()=>Ux,schemeRdPu:()=>uk,schemeRdYlBu:()=>Vx,schemeRdYlGn:()=>qx,schemeReds:()=>Tk,schemeSet1:()=>Sx,schemeSet2:()=>Tx,schemeSet3:()=>Ax,schemeSpectral:()=>Hx,schemeTableau10:()=>Ox,schemeYlGn:()=>fk,schemeYlGnBu:()=>lk,schemeYlOrBr:()=>dk,schemeYlOrRd:()=>yk,select:()=>Nr,selectAll:()=>Xk,selection:()=>Or,selector:()=>vn,selectorAll:()=>bn,shuffle:()=>At,shuffler:()=>Ot,some:()=>It,sort:()=>Be,stack:()=>dT,stackOffsetDiverging:()=>yT,stackOffsetExpand:()=>mT,stackOffsetNone:()=>lT,stackOffsetSilhouette:()=>vT,stackOffsetWiggle:()=>gT,stackOrderAppearance:()=>_T,stackOrderAscending:()=>wT,stackOrderDescending:()=>kT,stackOrderInsideOut:()=>ET,stackOrderNone:()=>hT,stackOrderReverse:()=>ST,stratify:()=>cv,style:()=>Wn,subset:()=>Kt,sum:()=>Nt,superset:()=>$t,svg:()=>bl,symbol:()=>wS,symbolAsterisk:()=>YE,symbolCircle:()=>QE,symbolCross:()=>XE,symbolDiamond:()=>eS,symbolDiamond2:()=>tS,symbolPlus:()=>nS,symbolSquare:()=>rS,symbolSquare2:()=>iS,symbolStar:()=>uS,symbolTimes:()=>gS,symbolTriangle:()=>lS,symbolTriangle2:()=>fS,symbolWye:()=>vS,symbolX:()=>gS,symbols:()=>_S,symbolsFill:()=>_S,symbolsStroke:()=>bS,text:()=>cl,thresholdFreedmanDiaconis:()=>ft,thresholdScott:()=>pt,thresholdSturges:()=>et,tickFormat:()=>Mg,tickIncrement:()=>Xe,tickStep:()=>Ze,ticks:()=>Qe,timeDay:()=>C_,timeDays:()=>R_,timeFormat:()=>Cb,timeFormatDefaultLocale:()=>Zw,timeFormatLocale:()=>Nb,timeFriday:()=>$_,timeFridays:()=>Q_,timeHour:()=>A_,timeHours:()=>O_,timeInterval:()=>g_,timeMillisecond:()=>__,timeMilliseconds:()=>b_,timeMinute:()=>k_,timeMinutes:()=>E_,timeMonday:()=>B_,timeMondays:()=>H_,timeMonth:()=>pb,timeMonths:()=>db,timeParse:()=>Rb,timeSaturday:()=>q_,timeSaturdays:()=>X_,timeSecond:()=>w_,timeSeconds:()=>x_,timeSunday:()=>F_,timeSundays:()=>K_,timeThursday:()=>V_,timeThursdays:()=>Y_,timeTickInterval:()=>Sb,timeTicks:()=>Eb,timeTuesday:()=>U_,timeTuesdays:()=>W_,timeWednesday:()=>z_,timeWednesdays:()=>G_,timeWeek:()=>F_,timeWeeks:()=>K_,timeYear:()=>vb,timeYears:()=>gb,timeout:()=>ao,timer:()=>no,timerFlush:()=>ro,transition:()=>Yo,transpose:()=>Pt,tree:()=>gv,treemap:()=>kv,treemapBinary:()=>Ev,treemapDice:()=>nv,treemapResquarify:()=>Tv,treemapSlice:()=>_v,treemapSliceDice:()=>Sv,treemapSquarify:()=>xv,tsv:()=>pl,tsvFormat:()=>hc,tsvFormatBody:()=>fc,tsvFormatRow:()=>dc,tsvFormatRows:()=>pc,tsvFormatValue:()=>mc,tsvParse:()=>cc,tsvParseRows:()=>lc,union:()=>Ht,unixDay:()=>D_,unixDays:()=>M_,utcDay:()=>L_,utcDays:()=>I_,utcFormat:()=>Lb,utcFriday:()=>ib,utcFridays:()=>hb,utcHour:()=>N_,utcHours:()=>P_,utcMillisecond:()=>__,utcMilliseconds:()=>b_,utcMinute:()=>S_,utcMinutes:()=>T_,utcMonday:()=>eb,utcMondays:()=>ab,utcMonth:()=>mb,utcMonths:()=>yb,utcParse:()=>Ib,utcSaturday:()=>ob,utcSaturdays:()=>fb,utcSecond:()=>w_,utcSeconds:()=>x_,utcSunday:()=>J_,utcSundays:()=>sb,utcThursday:()=>rb,utcThursdays:()=>lb,utcTickInterval:()=>kb,utcTicks:()=>xb,utcTuesday:()=>tb,utcTuesdays:()=>ub,utcWednesday:()=>nb,utcWednesdays:()=>cb,utcWeek:()=>J_,utcWeeks:()=>sb,utcYear:()=>_b,utcYears:()=>bb,variance:()=>de,window:()=>$n,xml:()=>gl,zip:()=>Rt,zoom:()=>KT,zoomIdentity:()=>DT,zoomTransform:()=>MT});var o=function(){return e=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{name:null,value:null,type:null,definition:null};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=t.name,r=t.value,i=t.type,o=t.definition;this.name=n||null,this.value=null!=r?r:null,this.type=i||null,this.definition=o||null},r=[{key:"isVariable",get:function(){return!1}},{key:"hasError",value:function(){return null===this.definition?null===this.value||("array"===this.type.toLowerCase()?!Array.isArray(this.value):t(this.value)!==this.type.toLowerCase()):null!==this.value&&void 0!==this.value&&(this.__typeOfValueValidation()||this.__ruleValueValidation()||this.__ruleMinAndMaxValidation()||this.__ruleRegexValidation())}},{key:"__typeOfValueValidation",value:function(){var e=this.type.toLowerCase();return"Link"===this.definition.type?!Array.isArray(this.value)||this.value.some((function(e){return"string"!=typeof e})):"array"===e?!Array.isArray(this.value):t(this.value)!==e}},{key:"__ruleValueValidation",value:function(){var e=this;return this.definition.rules.values&&Array.isArray(this.value)?!this.value.every((function(t){return e.definition.rules.values.includes(t)})):this.definition.rules.values&&!this.definition.rules.values.includes(this.value)}},{key:"__ruleMinAndMaxValidation",value:function(){var e="number"==typeof this.value?this.value:this.value.length;return null!==this.definition.rules.min&&ethis.definition.rules.max}},{key:"__ruleRegexValidation",value:function(){return null!==this.definition.rules.regex&&!new RegExp(this.definition.rules.regex).test(this.value)}}],r&&function(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{path:null};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=t.path;this.path=null!=n?n:null},(t=[{key:"fileName",get:function(){return this.path?this.path.replace(/^.*[\\/]/,""):null}}])&&function(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{x:null,y:null,width:null,height:null,hide:!1};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=t.x,r=t.y,i=t.width,o=t.height,s=t.hide;this.x=n||null,this.y=r||null,this.width=i||null,this.height=o||null,this.hide=s||!1}));const f=h;function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function d(e){var t=function(e,t){if("object"!=p(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==p(t)?t:t+""}function m(e,t,n){return t=v(t),function(e,t){if(t&&("object"==p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,y()?Reflect.construct(t,n||[],v(e).constructor):t.apply(e,n))}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}var _=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:null,externalId:null,name:null,definition:null,drawOption:null,attributes:[]};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=m(this,t,[n]);var r=n.id,i=n.externalId,o=n.name,s=n.definition,a=n.drawOption,u=n.attributes;return e.__class="Component",e.id=r||null,e.externalId=i||e.id,e.name=o||null,e.definition=s||null,e.drawOption=a||new f,e.attributes=u||[],e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(t,e),n=t,r=[{key:"setExternalId",value:function(e){this.externalId=e}},{key:"getConfigurationKey",value:function(){return this.id}},{key:"setReferenceAttribute",value:function(e){var t=this.definition.definedAttributes.find((function(t){return t.containerRef===e.definition.type}));if(t){var n=this.attributes.filter((function(e){var n=e.definition;return(null==n?void 0:n.name)===t.name}));n.length>0?n.forEach((function(t){t.value=e.id})):this.attributes.push(this.createAttribute({name:t.name,value:e.id,type:"String",definition:t}))}}},{key:"__createNestedAttributes",value:function(e){var t=this,n=this.attributes;return e.slice().reverse().forEach((function(e){var r=n.find((function(t){return t.definition.name===e.name}));r||(r=t.createAttribute({name:e.name,definition:e,type:"Object",value:[]}),n.push(r)),n=r.value})),n}},{key:"createAttribute",value:function(e){return new s(e)}},{key:"removeAllReferenceAttributes",value:function(e){this.attributes=e?this.attributes.filter((function(t){return!("Reference"===t.definition.type&&t.definition.containerRef===e.definition.type&&t.value===e.id)})):this.attributes.filter((function(e){return"Reference"!==e.definition.type}))}},{key:"setLinkAttribute",value:function(e){var t=[],n=this.__getLinkAttribute(t,this.definition.definedAttributes,e),r=this.__createNestedAttributes(t),i=r.find((function(e){return e.definition.name===n.name}));i||(i=this.createAttribute({name:n.name,definition:n,type:"Array",value:[]}),r.push(i)),i.value.includes(e.target)||i.value.push(e.target)}},{key:"__getLinkAttribute",value:function(e,t,n){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:null;this.__removeLinkAttribute(this.attributes,e,t)}},{key:"__removeLinkAttribute",value:function(e,t,n){var r=this;e.forEach((function(e){var i;if("Object"===e.type&&r.__removeLinkAttribute(e.value,t,n),"Link"===(null===(i=e.definition)||void 0===i?void 0:i.type)&&(!n||e.name===n)){var o=e.value.findIndex((function(e){return e===t}));o>=0&&e.value.splice(o,1)}}))}},{key:"getAttributeByName",value:function(e){return this.__getAttributeByName(this.attributes,e)}},{key:"__getAttributeByName",value:function(e,t){for(var n=0;n3?i-3:0),s=3;s2?n-2:0),i=2;i0&&void 0!==arguments[0]?arguments[0]:{type:null,icon:null,model:null,displayName:null,description:null,url:null,parentTypes:[],childrenTypes:[],definedAttributes:[],isContainer:!1,displayType:null,workflowDirection:null,linkModel:null,defaultWidth:0,defaultHeight:0,minWidth:0,minHeight:0,reservedWidth:0,reservedHeight:0,margin:10,gap:30};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=t.type,r=t.icon,i=t.model,o=t.displayName,s=t.description,a=t.url,u=t.parentTypes,c=t.childrenTypes,l=t.definedAttributes,h=t.isContainer,f=t.displayType,p=t.workflowDirection,d=t.linkModel,m=t.defaultWidth,y=t.defaultHeight,v=t.minWidth,g=t.minHeight,_=t.reservedWidth,b=t.reservedHeight,w=t.margin,x=t.gap;this.type=n||null,this.icon=r||null,this.model=i||null,this.displayName=o||null,this.description=s||null,this.url=a||null,this.parentTypes=u||[],this.childrenTypes=c||[],this.definedAttributes=l||[],this.isContainer=void 0!==h&&h,this.displayType=f||null,this.workflowDirection=p||"horizontal",this.linkModel=d||null,this.defaultWidth=m||0,this.defaultHeight=y||0,this.minWidth=v||0,this.minHeight=g||0,this.reservedWidth=_||0,this.reservedHeight=b||0,this.margin=w||10,this.gap=x||30}));const x=w;function k(e){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function S(e,t,n){return(t=T(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function T(e){var t=function(e,t){if("object"!=k(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=k(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==k(t)?t:t+""}var A=function(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{name:null,type:null,displayName:null,description:null,url:null,linkType:null,linkRef:[],linkModel:null,containerRef:null,required:!1,definedAttributes:[],rules:{values:null,min:null,max:null,regex:null}};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=t.name,r=t.type,i=t.displayName,o=t.description,s=t.url,a=t.linkType,u=t.linkRef,c=t.linkModel,l=t.containerRef,h=t.definedAttributes,f=t.required,p=t.rules;this.name=n||null,this.type=r||null,this.displayName=i||null,this.description=o||null,this.url=s||null,this.linkType=a||null,this.linkRef=u||[],this.linkModel=c||null,this.containerRef=l||null,this.definedAttributes=h||[],this.required=f||!1,this.rules=function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{source:null,target:null,name:null,definition:null,isReverse:!1};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=P(this,t);var r=n.source,i=n.target,o=n.name,s=n.definition,a=n.isReverse;return e.__class="Link",e.source=r||null,e.target=i||null,e.name=o||null,e.definition=s||null,e.isReverse=!!a,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&L(e,t)}(t,e),n=t,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(l);const D=I;var M=function(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{attributeRef:null,sourceRef:null,targetRef:null,type:null,model:null,isTemporary:!1};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=t.attributeRef,r=t.sourceRef,i=t.targetRef,o=t.type,s=t.model,a=t.isTemporary;this.attributeRef=n||null,this.sourceRef=r||null,this.targetRef=i||null,this.type=o||null,this.model=s||null,this.isTemporary=!!a}));const j=M;function F(e){return F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},F(e)}function B(e,t,n){return t=z(t),function(e,t){if(t&&("object"==F(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,U()?Reflect.construct(t,n||[],z(e).constructor):t.apply(e,n))}function U(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(U=function(){return!!e})()}function z(e){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},z(e)}function V(e,t){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},V(e,t)}var $=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{path:null,name:null,content:null};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=B(this,t,[n]);var r=n.content;return e.content=r||null,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&V(e,t)}(t,e),n=t,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(l);const q=$;function K(e,t){return null==e||null==t?NaN:et?1:e>=t?0:NaN}function H(e,t){return null==e||null==t?NaN:te?1:t>=e?0:NaN}function W(e){let t,n,r;function i(e,r,i=0,o=e.length){if(i>>1;n(e[t],r)<0?i=t+1:o=t}while(iK(e(t),n),r=(t,n)=>e(t)-n):(t=e===K||e===H?e:G,n=e,r=e),{left:i,center:function(e,t,n=0,o=e.length){const s=i(e,t,n,o-1);return s>n&&r(e[s-1],t)>-r(e[s],t)?s-1:s},right:function(e,r,i=0,o=e.length){if(i>>1;n(e[t],r)<=0?i=t+1:o=t}while(i=0))throw new RangeError("invalid r");let n=e.length;if(!((n=Math.floor(n))>=0))throw new RangeError("invalid length");if(!n||!t)return e;const r=ae(t),i=e.slice();return r(e,i,0,n,1),r(i,e,0,n,1),r(e,i,0,n,1),e}const ne=ie(ae),re=ie((function(e){const t=ae(e);return(e,n,r,i,o)=>{t(e,n,0+(r<<=2),0+(i<<=2),o<<=2),t(e,n,r+1,i+1,o),t(e,n,r+2,i+2,o),t(e,n,r+3,i+3,o)}}));function ie(e){return function(t,n,r=n){if(!((n=+n)>=0))throw new RangeError("invalid rx");if(!((r=+r)>=0))throw new RangeError("invalid ry");let{data:i,width:o,height:s}=t;if(!((o=Math.floor(o))>=0))throw new RangeError("invalid width");if(!((s=Math.floor(void 0!==s?s:i.length/o))>=0))throw new RangeError("invalid height");if(!o||!s||!n&&!r)return t;const a=n&&e(n),u=r&&e(r),c=i.slice();return a&&u?(oe(a,c,i,o,s),oe(a,i,c,o,s),oe(a,c,i,o,s),se(u,i,c,o,s),se(u,c,i,o,s),se(u,i,c,o,s)):a?(oe(a,i,c,o,s),oe(a,c,i,o,s),oe(a,i,c,o,s)):u&&(se(u,i,c,o,s),se(u,c,i,o,s),se(u,i,c,o,s)),t}}function oe(e,t,n,r,i){for(let o=0,s=r*i;o{if(!((o-=s)>=i))return;let a=e*r[i];const u=s*e;for(let e=i,t=i+u;e{if(!((s-=a)>=o))return;let u=t*i[o];const c=a*t,l=c+a;for(let e=o,t=o+c;e=t&&++n;else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(i=+i)>=i&&++n}return n}function ce(e){return 0|e.length}function le(e){return!(e>0)}function he(e){return"object"!=typeof e||"length"in e?e:Array.from(e)}function fe(...e){const t="function"==typeof e[e.length-1]&&function(e){return t=>e(...t)}(e.pop()),n=(e=e.map(he)).map(ce),r=e.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(le))return o;for(;;){o.push(i.map(((t,n)=>e[n][t])));let s=r;for(;++i[s]===n[s];){if(0===s)return t?o.map(t):o;i[s--]=0}}}function pe(e,t){var n=0,r=0;return Float64Array.from(e,void 0===t?e=>n+=+e||0:i=>n+=+t(i,r++,e)||0)}function de(e,t){let n,r=0,i=0,o=0;if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(n=t-i,i+=n/++r,o+=n*(t-i));else{let s=-1;for(let a of e)null!=(a=t(a,++s,e))&&(a=+a)>=a&&(n=a-i,i+=n/++r,o+=n*(a-i))}if(r>1)return o/(r-1)}function me(e,t){const n=de(e,t);return n?Math.sqrt(n):n}function ye(e,t){let n,r;if(void 0===t)for(const t of e)null!=t&&(void 0===n?t>=t&&(n=r=t):(n>t&&(n=t),r=o&&(n=r=o):(n>o&&(n=o),r0){for(o=e[--i];i>0&&(t=o,n=e[--i],o=t+n,r=n-(o-t),!r););i>0&&(r<0&&e[i-1]<0||r>0&&e[i-1]>0)&&(n=2*r,t=o+n,n==t-o&&(o=t))}return o}}function ge(e,t){const n=new ve;if(void 0===t)for(let t of e)(t=+t)&&n.add(t);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&n.add(i)}return+n}function _e(e,t){const n=new ve;let r=-1;return Float64Array.from(e,void 0===t?e=>n.add(+e||0):i=>n.add(+t(i,++r,e)||0))}class be extends Map{constructor(e,t=Se){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(xe(this,e))}has(e){return super.has(xe(this,e))}set(e,t){return super.set(ke(this,e),t)}delete(e){return super.delete(Ee(this,e))}}class we extends Set{constructor(e,t=Se){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const t of e)this.add(t)}has(e){return super.has(xe(this,e))}add(e){return super.add(ke(this,e))}delete(e){return super.delete(Ee(this,e))}}function xe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function ke({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Ee({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Se(e){return null!==e&&"object"==typeof e?e.valueOf():e}function Te(e){return e}function Ae(e,...t){return je(e,Te,Te,t)}function Oe(e,...t){return je(e,Array.from,Te,t)}function Ne(e,t){for(let n=1,r=t.length;ne.pop().map((([t,n])=>[...e,t,n]))));return e}function Pe(e,...t){return Ne(Oe(e,...t),t)}function Ce(e,t,...n){return Ne(Le(e,t,...n),n)}function Re(e,t,...n){return je(e,Te,t,n)}function Le(e,t,...n){return je(e,Array.from,t,n)}function Ie(e,...t){return je(e,Te,Me,t)}function De(e,...t){return je(e,Array.from,Me,t)}function Me(e){if(1!==e.length)throw new Error("duplicate key");return e[0]}function je(e,t,n,r){return function e(i,o){if(o>=r.length)return n(i);const s=new be,a=r[o++];let u=-1;for(const e of i){const t=a(e,++u,i),n=s.get(t);n?n.push(e):s.set(t,[e])}for(const[t,n]of s)s.set(t,e(n,o));return t(s)}(e,0)}function Fe(e,t){return Array.from(t,(t=>e[t]))}function Be(e,...t){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");e=Array.from(e);let[n]=t;if(n&&2!==n.length||t.length>1){const r=Uint32Array.from(e,((e,t)=>t));return t.length>1?(t=t.map((t=>e.map(t))),r.sort(((e,n)=>{for(const r of t){const t=ze(r[e],r[n]);if(t)return t}}))):(n=e.map(n),r.sort(((e,t)=>ze(n[e],n[t])))),Fe(e,r)}return e.sort(Ue(n))}function Ue(e=K){if(e===K)return ze;if("function"!=typeof e)throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||0===r?r:(0===e(n,n))-(0===e(t,t))}}function ze(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(et?1:0)}function Ve(e,t,n){return(2!==t.length?Be(Re(e,t,n),(([e,t],[n,r])=>K(t,r)||K(e,n))):Be(Ae(e,n),(([e,n],[r,i])=>t(n,i)||K(e,r)))).map((([e])=>e))}var $e=Array.prototype,qe=$e.slice;function Ke(e){return()=>e}$e.map;const He=Math.sqrt(50),We=Math.sqrt(10),Ge=Math.sqrt(2);function Ye(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),s=o>=He?10:o>=We?5:o>=Ge?2:1;let a,u,c;return i<0?(c=Math.pow(10,-i)/s,a=Math.round(e*c),u=Math.round(t*c),a/ct&&--u,c=-c):(c=Math.pow(10,i)*s,a=Math.round(e/c),u=Math.round(t/c),a*ct&&--u),u0))return[];if((e=+e)==(t=+t))return[e];const r=t=i))return[];const a=o-i+1,u=new Array(a);if(r)if(s<0)for(let e=0;e0?(e=Math.floor(e/i)*i,t=Math.ceil(t/i)*i):i<0&&(e=Math.ceil(e*i)/i,t=Math.floor(t*i)/i),r=i}}function et(e){return Math.max(1,Math.ceil(Math.log(ue(e))/Math.LN2)+1)}function tt(){var e=Te,t=ye,n=et;function r(r){Array.isArray(r)||(r=Array.from(r));var i,o,s,a=r.length,u=new Array(a);for(i=0;i=h)if(e>=h&&t===ye){const e=Xe(l,h,n);isFinite(e)&&(e>0?h=(Math.floor(h/e)+1)*e:e<0&&(h=(Math.ceil(h*-e)+1)/-e))}else f.pop()}for(var p=f.length,d=0,m=p;f[d]<=l;)++d;for(;f[m-1]>h;)--m;(d||m0?f[i-1]:l,y.x1=i0)for(i=0;i=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n=i)&&(n=i)}return n}function rt(e,t){let n,r=-1,i=-1;if(void 0===t)for(const t of e)++i,null!=t&&(n=t)&&(n=t,r=i);else for(let o of e)null!=(o=t(o,++i,e))&&(n=o)&&(n=o,r=i);return r}function it(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function ot(e,t){let n,r=-1,i=-1;if(void 0===t)for(const t of e)++i,null!=t&&(n>t||void 0===n&&t>=t)&&(n=t,r=i);else for(let o of e)null!=(o=t(o,++i,e))&&(n>o||void 0===n&&o>=o)&&(n=o,r=i);return r}function st(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=void 0===i?ze:Ue(i);r>n;){if(r-n>600){const o=r-n+1,s=t-n+1,a=Math.log(o),u=.5*Math.exp(2*a/3),c=.5*Math.sqrt(a*u*(o-u)/o)*(s-o/2<0?-1:1);st(e,t,Math.max(n,Math.floor(t-s*u/o+c)),Math.min(r,Math.floor(t+(o-s)*u/o+c)),i)}const o=e[t];let s=n,a=r;for(at(e,n,t),i(e[r],o)>0&&at(e,n,r);s0;)--a}0===i(e[n],o)?at(e,n,a):(++a,at(e,a,r)),a<=t&&(n=a+1),t<=a&&(r=a-1)}return e}function at(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function ut(e,t=K){let n,r=!1;if(1===t.length){let i;for(const o of e){const e=t(o);(r?K(e,i)>0:0===K(e,e))&&(n=o,i=e,r=!0)}}else for(const i of e)(r?t(i,n)>0:0===t(i,i))&&(n=i,r=!0);return n}function ct(e,t,n){if(e=Float64Array.from(function*(e,t){if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)null!=(r=t(r,++n,e))&&(r=+r)>=r&&(yield r)}}(e,n)),(r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return it(e);if(t>=1)return nt(e);var r,i=(r-1)*t,o=Math.floor(i),s=nt(st(e,o).subarray(0,o+1));return s+(it(e.subarray(o+1))-s)*(i-o)}}function lt(e,t,n=Y){if((r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),s=+n(e[o],o,e);return s+(+n(e[o+1],o+1,e)-s)*(i-o)}}function ht(e,t,n=Y){if(!isNaN(t=+t)){if(r=Float64Array.from(e,((t,r)=>Y(n(e[r],r,e)))),t<=0)return ot(r);if(t>=1)return rt(r);var r,i=Uint32Array.from(e,((e,t)=>t)),o=r.length-1,s=Math.floor(o*t);return st(i,s,0,o,((e,t)=>ze(r[e],r[t]))),(s=ut(i.subarray(0,s+1),(e=>r[e])))>=0?s:-1}}function ft(e,t,n){const r=ue(e),i=ct(e,.75)-ct(e,.25);return r&&i?Math.ceil((n-t)/(2*i*Math.pow(r,-1/3))):1}function pt(e,t,n){const r=ue(e),i=me(e);return r&&i?Math.ceil((n-t)*Math.cbrt(r)/(3.49*i)):1}function dt(e,t){let n=0,r=0;if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(++n,r+=t);else{let i=-1;for(let o of e)null!=(o=t(o,++i,e))&&(o=+o)>=o&&(++n,r+=o)}if(n)return r/n}function mt(e,t){return ct(e,.5,t)}function yt(e,t){return ht(e,.5,t)}function vt(e){return Array.from(function*(e){for(const t of e)yield*t}(e))}function gt(e,t){const n=new be;if(void 0===t)for(let t of e)null!=t&&t>=t&&n.set(t,(n.get(t)||0)+1);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&i>=i&&n.set(i,(n.get(i)||0)+1)}let r,i=0;for(const[e,t]of n)t>i&&(i=t,r=e);return r}function _t(e,t=bt){const n=[];let r,i=!1;for(const o of e)i&&n.push(t(r,o)),r=o,i=!0;return n}function bt(e,t){return[e,t]}function wt(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(i);++rt(n[e],n[r]);let o,s;return e=Uint32Array.from(n,((e,t)=>t)),e.sort(t===K?(e,t)=>ze(n[e],n[t]):Ue(i)),e.forEach(((e,t)=>{const n=i(e,void 0===o?e:o);n>=0?((void 0===o||n>0)&&(o=e,s=t),r[e]=s):r[e]=NaN})),r}function kt(e,t=K){let n,r=!1;if(1===t.length){let i;for(const o of e){const e=t(o);(r?K(e,i)<0:0===K(e,e))&&(n=o,i=e,r=!0)}}else for(const i of e)(r?t(i,n)<0:0===t(i,i))&&(n=i,r=!0);return n}function Et(e,t=K){if(1===t.length)return ot(e,t);let n,r=-1,i=-1;for(const o of e)++i,(r<0?0===t(o,o):t(o,n)<0)&&(n=o,r=i);return r}function St(e,t=K){if(1===t.length)return rt(e,t);let n,r=-1,i=-1;for(const o of e)++i,(r<0?0===t(o,o):t(o,n)>0)&&(n=o,r=i);return r}function Tt(e,t){const n=Et(e,t);return n<0?void 0:n}const At=Ot(Math.random);function Ot(e){return function(t,n=0,r=t.length){let i=r-(n=+n);for(;i;){const r=e()*i--|0,o=t[i+n];t[i+n]=t[r+n],t[r+n]=o}return t}}function Nt(e,t){let n=0;if(void 0===t)for(let t of e)(t=+t)&&(n+=t);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}function Pt(e){if(!(i=e.length))return[];for(var t=-1,n=it(e,Ct),r=new Array(n);++tt(n,r,e)))}function jt(e,t,n){if("function"!=typeof t)throw new TypeError("reducer is not a function");const r=e[Symbol.iterator]();let i,o,s=-1;if(arguments.length<3){if(({done:i,value:n}=r.next()),i)return;++s}for(;({done:i,value:o}=r.next()),!i;)n=t(n,o,++s,e);return n}function Ft(e){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");return Array.from(e).reverse()}function Bt(e,...t){e=new we(e);for(const n of t)for(const t of n)e.delete(t);return e}function Ut(e,t){const n=t[Symbol.iterator](),r=new we;for(const t of e){if(r.has(t))return!1;let e,i;for(;({value:e,done:i}=n.next())&&!i;){if(Object.is(t,e))return!1;r.add(e)}}return!0}function zt(e,...t){e=new we(e),t=t.map(Vt);e:for(const n of e)for(const r of t)if(!r.has(n)){e.delete(n);continue e}return e}function Vt(e){return e instanceof we?e:new we(e)}function $t(e,t){const n=e[Symbol.iterator](),r=new Set;for(const e of t){const t=qt(e);if(r.has(t))continue;let i,o;for(;({value:i,done:o}=n.next());){if(o)return!1;const e=qt(i);if(r.add(e),Object.is(t,e))break}}return!0}function qt(e){return null!==e&&"object"==typeof e?e.valueOf():e}function Kt(e,t){return $t(t,e)}function Ht(...e){const t=new we;for(const n of e)for(const e of n)t.add(e);return t}function Wt(e){return e}var Gt=1,Yt=2,Qt=3,Xt=4,Zt=1e-6;function Jt(e){return"translate("+e+",0)"}function en(e){return"translate(0,"+e+")"}function tn(e){return t=>+e(t)}function nn(e,t){return t=Math.max(0,e.bandwidth()-2*t)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function rn(){return!this.__axis}function on(e,t){var n=[],r=null,i=null,o=6,s=6,a=3,u="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,c=e===Gt||e===Xt?-1:1,l=e===Xt||e===Yt?"x":"y",h=e===Gt||e===Qt?Jt:en;function f(f){var p=null==r?t.ticks?t.ticks.apply(t,n):t.domain():r,d=null==i?t.tickFormat?t.tickFormat.apply(t,n):Wt:i,m=Math.max(o,0)+a,y=t.range(),v=+y[0]+u,g=+y[y.length-1]+u,_=(t.bandwidth?nn:tn)(t.copy(),u),b=f.selection?f.selection():f,w=b.selectAll(".domain").data([null]),x=b.selectAll(".tick").data(p,t).order(),k=x.exit(),E=x.enter().append("g").attr("class","tick"),S=x.select("line"),T=x.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(E),S=S.merge(E.append("line").attr("stroke","currentColor").attr(l+"2",c*o)),T=T.merge(E.append("text").attr("fill","currentColor").attr(l,c*m).attr("dy",e===Gt?"0em":e===Qt?"0.71em":"0.32em")),f!==b&&(w=w.transition(f),x=x.transition(f),S=S.transition(f),T=T.transition(f),k=k.transition(f).attr("opacity",Zt).attr("transform",(function(e){return isFinite(e=_(e))?h(e+u):this.getAttribute("transform")})),E.attr("opacity",Zt).attr("transform",(function(e){var t=this.parentNode.__axis;return h((t&&isFinite(t=t(e))?t:_(e))+u)}))),k.remove(),w.attr("d",e===Xt||e===Yt?s?"M"+c*s+","+v+"H"+u+"V"+g+"H"+c*s:"M"+u+","+v+"V"+g:s?"M"+v+","+c*s+"V"+u+"H"+g+"V"+c*s:"M"+v+","+u+"H"+g),x.attr("opacity",1).attr("transform",(function(e){return h(_(e)+u)})),S.attr(l+"2",c*o),T.attr(l,c*m).text(d),b.filter(rn).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===Yt?"start":e===Xt?"end":"middle"),b.each((function(){this.__axis=_}))}return f.scale=function(e){return arguments.length?(t=e,f):t},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(e){return arguments.length?(n=null==e?[]:Array.from(e),f):n.slice()},f.tickValues=function(e){return arguments.length?(r=null==e?null:Array.from(e),f):r&&r.slice()},f.tickFormat=function(e){return arguments.length?(i=e,f):i},f.tickSize=function(e){return arguments.length?(o=s=+e,f):o},f.tickSizeInner=function(e){return arguments.length?(o=+e,f):o},f.tickSizeOuter=function(e){return arguments.length?(s=+e,f):s},f.tickPadding=function(e){return arguments.length?(a=+e,f):a},f.offset=function(e){return arguments.length?(u=+e,f):u},f}function sn(e){return on(Gt,e)}function an(e){return on(Yt,e)}function un(e){return on(Qt,e)}function cn(e){return on(Xt,e)}var ln={value:()=>{}};function hn(){for(var e,t=0,n=arguments.length,r={};t=0&&(t=e.slice(n+1),e=e.slice(0,n)),e&&!r.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}}))),s=-1,a=o.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++s0)for(var n,r,i=new Array(n),o=0;ot?1:e>=t?0:NaN}On.prototype={constructor:On,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};var In="http://www.w3.org/1999/xhtml";const Dn={svg:"http://www.w3.org/2000/svg",xhtml:In,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Mn(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),Dn.hasOwnProperty(t)?{space:Dn[t],local:e}:e}function jn(e){return function(){this.removeAttribute(e)}}function Fn(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Bn(e,t){return function(){this.setAttribute(e,t)}}function Un(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function zn(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function Vn(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function $n(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function qn(e){return function(){this.style.removeProperty(e)}}function Kn(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Hn(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Wn(e,t){return e.style.getPropertyValue(t)||$n(e).getComputedStyle(e,null).getPropertyValue(t)}function Gn(e){return function(){delete this[e]}}function Yn(e,t){return function(){this[e]=t}}function Qn(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function Xn(e){return e.trim().split(/^|\s+/)}function Zn(e){return e.classList||new Jn(e)}function Jn(e){this._node=e,this._names=Xn(e.getAttribute("class")||"")}function er(e,t){for(var n=Zn(e),r=-1,i=t.length;++r=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var Sr=[null];function Tr(e,t){this._groups=e,this._parents=t}function Ar(){return new Tr([[document.documentElement]],Sr)}Tr.prototype=Ar.prototype={constructor:Tr,select:function(e){"function"!=typeof e&&(e=vn(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i=w&&(w=b+1);!(_=v[w])&&++w=0;)(r=i[o])&&(s&&4^r.compareDocumentPosition(s)&&s.parentNode.insertBefore(r,s),s=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=Ln);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o1?this.each((null==t?qn:"function"==typeof t?Hn:Kn)(e,t,null==n?"":n)):Wn(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?Gn:"function"==typeof t?Qn:Yn)(e,t)):this.node()[e]},classed:function(e,t){var n=Xn(e+"");if(arguments.length<2){for(var r=Zn(this.node()),i=-1,o=n.length;++i=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}(e+""),s=o.length;if(!(arguments.length<2)){for(a=t?wr:br,r=0;r>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?ni(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?ni(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Kr.exec(e))?new oi(t[1],t[2],t[3],1):(t=Hr.exec(e))?new oi(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Wr.exec(e))?ni(t[1],t[2],t[3],t[4]):(t=Gr.exec(e))?ni(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Yr.exec(e))?hi(t[1],t[2]/100,t[3]/100,1):(t=Qr.exec(e))?hi(t[1],t[2]/100,t[3]/100,t[4]):Xr.hasOwnProperty(e)?ti(Xr[e]):"transparent"===e?new oi(NaN,NaN,NaN,0):null}function ti(e){return new oi(e>>16&255,e>>8&255,255&e,1)}function ni(e,t,n,r){return r<=0&&(e=t=n=NaN),new oi(e,t,n,r)}function ri(e){return e instanceof Fr||(e=ei(e)),e?new oi((e=e.rgb()).r,e.g,e.b,e.opacity):new oi}function ii(e,t,n,r){return 1===arguments.length?ri(e):new oi(e,t,n,null==r?1:r)}function oi(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function si(){return`#${li(this.r)}${li(this.g)}${li(this.b)}`}function ai(){const e=ui(this.opacity);return`${1===e?"rgb(":"rgba("}${ci(this.r)}, ${ci(this.g)}, ${ci(this.b)}${1===e?")":`, ${e})`}`}function ui(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ci(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function li(e){return((e=ci(e))<16?"0":"")+e.toString(16)}function hi(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new di(e,t,n,r)}function fi(e){if(e instanceof di)return new di(e.h,e.s,e.l,e.opacity);if(e instanceof Fr||(e=ei(e)),!e)return new di;if(e instanceof di)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),s=NaN,a=o-i,u=(o+i)/2;return a?(s=t===o?(n-r)/a+6*(n0&&u<1?0:s,new di(s,a,u,e.opacity)}function pi(e,t,n,r){return 1===arguments.length?fi(e):new di(e,t,n,null==r?1:r)}function di(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function mi(e){return(e=(e||0)%360)<0?e+360:e}function yi(e){return Math.max(0,Math.min(1,e||0))}function vi(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function gi(e,t,n,r,i){var o=e*e,s=o*e;return((1-3*e+3*o-s)*t+(4-6*o+3*s)*n+(1+3*e+3*o-3*s)*r+s*i)/6}function _i(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],o=e[r+1],s=r>0?e[r-1]:2*i-o,a=r=240?e-240:e+120,i,r),vi(e,i,r),vi(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new di(mi(this.h),yi(this.s),yi(this.l),ui(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=ui(this.opacity);return`${1===e?"hsl(":"hsla("}${mi(this.h)}, ${100*yi(this.s)}%, ${100*yi(this.l)}%${1===e?")":`, ${e})`}`}}));const wi=e=>()=>e;function xi(e,t){return function(n){return e+n*t}}function ki(e,t){var n=t-e;return n?xi(e,n>180||n<-180?n-360*Math.round(n/360):n):wi(isNaN(e)?t:e)}function Ei(e,t){var n=t-e;return n?xi(e,n):wi(isNaN(e)?t:e)}const Si=function e(t){var n=function(e){return 1==(e=+e)?Ei:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):wi(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=ii(e)).r,(t=ii(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),s=Ei(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=s(t),e+""}}return r.gamma=e,r}(1);function Ti(e){return function(t){var n,r,i=t.length,o=new Array(i),s=new Array(i),a=new Array(i);for(n=0;no&&(i=t.slice(o,i),a[s]?a[s]+=i:a[++s]=i),(n=n[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,u.push({i:s,x:Ii(n,r)})),o=ji.lastIndex;return o=0&&t._call.call(void 0,e),t=t._next;--qi}function io(){Yi=(Gi=Xi.now())+Qi,qi=Ki=0;try{ro()}finally{qi=0,function(){for(var e,t,n=Vi,r=1/0;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:Vi=t);$i=e,so(r)}(),Yi=0}}function oo(){var e=Xi.now(),t=e-Gi;t>Wi&&(Qi-=t,Gi=e)}function so(e){qi||(Ki&&(Ki=clearTimeout(Ki)),e-Yi>24?(e<1/0&&(Ki=setTimeout(io,e-Xi.now()-Qi)),Hi&&(Hi=clearInterval(Hi))):(Hi||(Gi=Xi.now(),Hi=setInterval(oo,Wi)),qi=1,Zi(io)))}function ao(e,t,n){var r=new to;return t=null==t?0:+t,r.restart((n=>{r.stop(),e(n+t)}),t,n),r}to.prototype=no.prototype={constructor:to,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?Ji():+n)+(null==t?0:+t),this._next||$i===this||($i?$i._next=this:Vi=this,$i=this),this._call=e,this._time=n,so()},stop:function(){this._call&&(this._call=null,this._time=1/0,so())}};var uo=mn("start","end","cancel","interrupt"),co=[],lo=0,ho=1,fo=2,po=3,mo=5,yo=6;function vo(e,t,n,r,i,o){var s=e.__transition;if(s){if(n in s)return}else e.__transition={};!function(e,t,n){var r,i=e.__transition;function o(u){var c,l,h,f;if(n.state!==ho)return a();for(c in i)if((f=i[c]).name===n.name){if(f.state===po)return ao(o);4===f.state?(f.state=yo,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete i[c]):+clo)throw new Error("too late; already scheduled");return n}function _o(e,t){var n=bo(e,t);if(n.state>po)throw new Error("too late; already running");return n}function bo(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function wo(e,t){var n,r,i,o=e.__transition,s=!0;if(o){for(i in t=null==t?null:t+"",o)(n=o[i]).name===t?(r=n.state>fo&&n.state180?t+=360:t-e>180&&(e+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Ii(e,t)})):t&&n.push(i(n)+"rotate("+t+r)}(o.rotate,s.rotate,a,u),function(e,t,n,o){e!==t?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Ii(e,t)}):t&&n.push(i(n)+"skewX("+t+r)}(o.skewX,s.skewX,a,u),function(e,t,n,r,o,s){if(e!==n||t!==r){var a=o.push(i(o)+"scale(",null,",",null,")");s.push({i:a-4,x:Ii(e,n)},{i:a-2,x:Ii(t,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,s.scaleX,s.scaleY,a,u),o=s=null,function(e){for(var t,n=-1,r=u.length;++n=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?go:_o;return function(){var s=o(this,e),a=s.on;a!==r&&(i=(r=a).copy()).on(t,n),s.on=i}}(n,e,t))},attr:function(e,t){var n=Mn(e),r="transform"===n?Oo:Ro;return this.attrTween(e,"function"==typeof t?(n.local?Fo:jo)(n,r,Co(this,"attr."+e,t)):null==t?(n.local?Io:Lo)(n):(n.local?Mo:Do)(n,r,t))},attrTween:function(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;var r=Mn(e);return this.tween(n,(r.local?Bo:Uo)(r,t))},style:function(e,t,n){var r="transform"==(e+="")?Ao:Ro;return null==t?this.styleTween(e,function(e,t){var n,r,i;return function(){var o=Wn(this,e),s=(this.style.removeProperty(e),Wn(this,e));return o===s?null:o===n&&s===r?i:i=t(n=o,r=s)}}(e,r)).on("end.style."+e,Ho(e)):"function"==typeof t?this.styleTween(e,function(e,t,n){var r,i,o;return function(){var s=Wn(this,e),a=n(this),u=a+"";return null==a&&(this.style.removeProperty(e),u=a=Wn(this,e)),s===u?null:s===r&&u===i?o:(i=u,o=t(r=s,a))}}(e,r,Co(this,"style."+e,t))).each(function(e,t){var n,r,i,o,s="style."+t,a="end."+s;return function(){var u=_o(this,e),c=u.on,l=null==u.value[s]?o||(o=Ho(t)):void 0;c===n&&i===l||(r=(n=c).copy()).on(a,i=l),u.on=r}}(this._id,e)):this.styleTween(e,function(e,t,n){var r,i,o=n+"";return function(){var s=Wn(this,e);return s===o?null:s===r?i:i=t(r=s,n)}}(e,r,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!=typeof t)throw new Error;return this.tween(r,function(e,t,n){var r,i;function o(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&function(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}(e,o,n)),r}return o._value=t,o}(e,t,null==n?"":n))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this);this.textContent=null==t?"":t}}(Co(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw new Error;return this.tween(t,function(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&function(e){return function(t){this.textContent=e.call(this,t)}}(r)),t}return r._value=e,r}(e))},remove:function(){return this.on("end.remove",function(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}(this._id))},tween:function(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r,i=bo(this.node(),n).tween,o=0,s=i.length;oho&&n.name===t)return new Go([[e]],rs,t,+r);return null}const os=e=>()=>e;function ss(e,{sourceEvent:t,target:n,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function as(e){e.preventDefault(),e.stopImmediatePropagation()}var us={name:"drag"},cs={name:"space"},ls={name:"handle"},hs={name:"center"};const{abs:fs,max:ps,min:ds}=Math;function ms(e){return[+e[0],+e[1]]}function ys(e){return[ms(e[0]),ms(e[1])]}var vs={name:"x",handles:["w","e"].map(Ss),input:function(e,t){return null==e?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},gs={name:"y",handles:["n","s"].map(Ss),input:function(e,t){return null==e?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},_s={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Ss),input:function(e){return null==e?null:ys(e)},output:function(e){return e}},bs={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},ws={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},xs={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},ks={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Es={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Ss(e){return{type:e}}function Ts(e){return!e.ctrlKey&&!e.button}function As(){var e=this.ownerSVGElement||this;return e.hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function Os(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ns(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function Ps(e){var t=e.__brush;return t?t.dim.output(t.selection):null}function Cs(){return Is(vs)}function Rs(){return Is(gs)}function Ls(){return Is(_s)}function Is(e){var t,n=As,r=Ts,i=Os,o=!0,s=mn("start","brush","end"),a=6;function u(t){var n=t.property("__brush",m).selectAll(".overlay").data([Ss("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",bs.overlay).merge(n).each((function(){var e=Ns(this).extent;Nr(this).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1])})),t.selectAll(".selection").data([Ss("selection")]).enter().append("rect").attr("class","selection").attr("cursor",bs.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=t.selectAll(".handle").data(e.handles,(function(e){return e.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(e){return"handle handle--"+e.type})).attr("cursor",(function(e){return bs[e.type]})),t.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(i).on("touchstart.brush",f).on("touchmove.brush",p).on("touchend.brush touchcancel.brush",d).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function c(){var e=Nr(this),t=Ns(this).selection;t?(e.selectAll(".selection").style("display",null).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1]),e.selectAll(".handle").style("display",null).attr("x",(function(e){return"e"===e.type[e.type.length-1]?t[1][0]-a/2:t[0][0]-a/2})).attr("y",(function(e){return"s"===e.type[0]?t[1][1]-a/2:t[0][1]-a/2})).attr("width",(function(e){return"n"===e.type||"s"===e.type?t[1][0]-t[0][0]+a:a})).attr("height",(function(e){return"e"===e.type||"w"===e.type?t[1][1]-t[0][1]+a:a}))):e.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function l(e,t,n){var r=e.__brush.emitter;return!r||n&&r.clean?new h(e,t,n):r}function h(e,t,n){this.that=e,this.args=t,this.state=e.__brush,this.active=0,this.clean=n}function f(n){if((!t||n.touches)&&r.apply(this,arguments)){var i,s,a,u,h,f,p,d,m,y,v,g=this,_=n.target.__data__.type,b="selection"===(o&&n.metaKey?_="overlay":_)?us:o&&n.altKey?hs:ls,w=e===gs?null:ks[_],x=e===vs?null:Es[_],k=Ns(g),E=k.extent,S=k.selection,T=E[0][0],A=E[0][1],O=E[1][0],N=E[1][1],P=0,C=0,R=w&&x&&o&&n.shiftKey,L=Array.from(n.touches||[n],(e=>{const t=e.identifier;return(e=zi(e,g)).point0=e.slice(),e.identifier=t,e}));wo(g);var I=l(g,arguments,!0).beforestart();if("overlay"===_){S&&(m=!0);const t=[L[0],L[1]||L[0]];k.selection=S=[[i=e===gs?T:ds(t[0][0],t[1][0]),a=e===vs?A:ds(t[0][1],t[1][1])],[h=e===gs?O:ps(t[0][0],t[1][0]),p=e===vs?N:ps(t[0][1],t[1][1])]],L.length>1&&B(n)}else i=S[0][0],a=S[0][1],h=S[1][0],p=S[1][1];s=i,u=a,f=h,d=p;var D=Nr(g).attr("pointer-events","none"),M=D.selectAll(".overlay").attr("cursor",bs[_]);if(n.touches)I.moved=F,I.ended=U;else{var j=Nr(n.view).on("mousemove.brush",F,!0).on("mouseup.brush",U,!0);o&&j.on("keydown.brush",(function(e){switch(e.keyCode){case 16:R=w&&x;break;case 18:b===ls&&(w&&(h=f-P*w,i=s+P*w),x&&(p=d-C*x,a=u+C*x),b=hs,B(e));break;case 32:b!==ls&&b!==hs||(w<0?h=f-P:w>0&&(i=s-P),x<0?p=d-C:x>0&&(a=u-C),b=cs,M.attr("cursor",bs.selection),B(e));break;default:return}as(e)}),!0).on("keyup.brush",(function(e){switch(e.keyCode){case 16:R&&(y=v=R=!1,B(e));break;case 18:b===hs&&(w<0?h=f:w>0&&(i=s),x<0?p=d:x>0&&(a=u),b=ls,B(e));break;case 32:b===cs&&(e.altKey?(w&&(h=f-P*w,i=s+P*w),x&&(p=d-C*x,a=u+C*x),b=hs):(w<0?h=f:w>0&&(i=s),x<0?p=d:x>0&&(a=u),b=ls),M.attr("cursor",bs[_]),B(e));break;default:return}as(e)}),!0),Ir(n.view)}c.call(g),I.start(n,b.name)}function F(e){for(const t of e.changedTouches||[e])for(const e of L)e.identifier===t.identifier&&(e.cur=zi(t,g));if(R&&!y&&!v&&1===L.length){const e=L[0];fs(e.cur[0]-e[0])>fs(e.cur[1]-e[1])?v=!0:y=!0}for(const e of L)e.cur&&(e[0]=e.cur[0],e[1]=e.cur[1]);m=!0,as(e),B(e)}function B(e){const t=L[0],n=t.point0;var r;switch(P=t[0]-n[0],C=t[1]-n[1],b){case cs:case us:w&&(P=ps(T-i,ds(O-h,P)),s=i+P,f=h+P),x&&(C=ps(A-a,ds(N-p,C)),u=a+C,d=p+C);break;case ls:L[1]?(w&&(s=ps(T,ds(O,L[0][0])),f=ps(T,ds(O,L[1][0])),w=1),x&&(u=ps(A,ds(N,L[0][1])),d=ps(A,ds(N,L[1][1])),x=1)):(w<0?(P=ps(T-i,ds(O-i,P)),s=i+P,f=h):w>0&&(P=ps(T-h,ds(O-h,P)),s=i,f=h+P),x<0?(C=ps(A-a,ds(N-a,C)),u=a+C,d=p):x>0&&(C=ps(A-p,ds(N-p,C)),u=a,d=p+C));break;case hs:w&&(s=ps(T,ds(O,i-P*w)),f=ps(T,ds(O,h+P*w))),x&&(u=ps(A,ds(N,a-C*x)),d=ps(A,ds(N,p+C*x)))}fe+n))}function qs(){return Ws(!1,!1)}function Ks(){return Ws(!1,!0)}function Hs(){return Ws(!0,!1)}function Ws(e,t){var n=0,r=null,i=null,o=null;function s(s){var a,u=s.length,c=new Array(u),l=$s(0,u),h=new Array(u*u),f=new Array(u),p=0;s=Float64Array.from({length:u*u},t?(e,t)=>s[t%u][t/u|0]:(e,t)=>s[t/u|0][t%u]);for(let t=0;tr(c[e],c[t])));for(const n of l){const r=t;if(e){const e=$s(1+~u,u).filter((e=>e<0?s[~e*u+n]:s[n*u+e]));i&&e.sort(((e,t)=>i(e<0?-s[~e*u+n]:s[n*u+e],t<0?-s[~t*u+n]:s[n*u+t])));for(const r of e)r<0?(h[~r*u+n]||(h[~r*u+n]={source:null,target:null})).target={index:n,startAngle:t,endAngle:t+=s[~r*u+n]*p,value:s[~r*u+n]}:(h[n*u+r]||(h[n*u+r]={source:null,target:null})).source={index:n,startAngle:t,endAngle:t+=s[n*u+r]*p,value:s[n*u+r]};f[n]={index:n,startAngle:r,endAngle:t,value:c[n]}}else{const e=$s(0,u).filter((e=>s[n*u+e]||s[e*u+n]));i&&e.sort(((e,t)=>i(s[n*u+e],s[n*u+t])));for(const r of e){let e;if(n=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Zs;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;tQs)if(Math.abs(l*a-u*c)>Qs&&i){let f=n-o,p=r-s,d=a*a+u*u,m=f*f+p*p,y=Math.sqrt(d),v=Math.sqrt(h),g=i*Math.tan((Gs-Math.acos((d+h-m)/(2*y*v)))/2),_=g/v,b=g/y;Math.abs(_-1)>Qs&&this._append`L${e+_*c},${t+_*l}`,this._append`A${i},${i},0,0,${+(l*f>c*p)},${this._x1=e+b*a},${this._y1=t+b*u}`}else this._append`L${this._x1=e},${this._y1=t}`}arc(e,t,n,r,i,o){if(e=+e,t=+t,o=!!o,(n=+n)<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(r),a=n*Math.sin(r),u=e+s,c=t+a,l=1^o,h=o?r-i:i-r;null===this._x1?this._append`M${u},${c}`:(Math.abs(this._x1-u)>Qs||Math.abs(this._y1-c)>Qs)&&this._append`L${u},${c}`,n&&(h<0&&(h=h%Ys+Ys),h>Xs?this._append`A${n},${n},0,1,${l},${e-s},${t-a}A${n},${n},0,1,${l},${this._x1=u},${this._y1=c}`:h>Qs&&this._append`A${n},${n},0,${+(h>=Gs)},${l},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function ea(){return new Js}function ta(e=3){return new Js(+e)}ea.prototype=Js.prototype;var na=Array.prototype.slice;function ra(e){return function(){return e}}function ia(e){return e.source}function oa(e){return e.target}function sa(e){return e.radius}function aa(e){return e.startAngle}function ua(e){return e.endAngle}function ca(){return 0}function la(){return 10}function ha(e){var t=ia,n=oa,r=sa,i=sa,o=aa,s=ua,a=ca,u=null;function c(){var c,l=t.apply(this,arguments),h=n.apply(this,arguments),f=a.apply(this,arguments)/2,p=na.call(arguments),d=+r.apply(this,(p[0]=l,p)),m=o.apply(this,p)-Bs,y=s.apply(this,p)-Bs,v=+i.apply(this,(p[0]=h,p)),g=o.apply(this,p)-Bs,_=s.apply(this,p)-Bs;if(u||(u=c=ea()),f>Vs&&(Ds(y-m)>2*f+Vs?y>m?(m+=f,y-=f):(m-=f,y+=f):m=y=(m+y)/2,Ds(_-g)>2*f+Vs?_>g?(g+=f,_-=f):(g-=f,_+=f):g=_=(g+_)/2),u.moveTo(d*Ms(m),d*js(m)),u.arc(0,0,d,m,y),m!==g||y!==_)if(e){var b=v-+e.apply(this,arguments),w=(g+_)/2;u.quadraticCurveTo(0,0,b*Ms(g),b*js(g)),u.lineTo(v*Ms(w),v*js(w)),u.lineTo(b*Ms(_),b*js(_))}else u.quadraticCurveTo(0,0,v*Ms(g),v*js(g)),u.arc(0,0,v,g,_);if(u.quadraticCurveTo(0,0,d*Ms(m),d*js(m)),u.closePath(),c)return u=null,c+""||null}return e&&(c.headRadius=function(t){return arguments.length?(e="function"==typeof t?t:ra(+t),c):e}),c.radius=function(e){return arguments.length?(r=i="function"==typeof e?e:ra(+e),c):r},c.sourceRadius=function(e){return arguments.length?(r="function"==typeof e?e:ra(+e),c):r},c.targetRadius=function(e){return arguments.length?(i="function"==typeof e?e:ra(+e),c):i},c.startAngle=function(e){return arguments.length?(o="function"==typeof e?e:ra(+e),c):o},c.endAngle=function(e){return arguments.length?(s="function"==typeof e?e:ra(+e),c):s},c.padAngle=function(e){return arguments.length?(a="function"==typeof e?e:ra(+e),c):a},c.source=function(e){return arguments.length?(t=e,c):t},c.target=function(e){return arguments.length?(n=e,c):n},c.context=function(e){return arguments.length?(u=null==e?null:e,c):u},c}function fa(){return ha()}function pa(){return ha(la)}const da=Math.PI/180,ma=180/Math.PI,ya=.96422,va=1,ga=.82521,_a=4/29,ba=6/29,wa=3*ba*ba,xa=ba*ba*ba;function ka(e){if(e instanceof Ta)return new Ta(e.l,e.a,e.b,e.opacity);if(e instanceof Ia)return Da(e);e instanceof oi||(e=ri(e));var t,n,r=Pa(e.r),i=Pa(e.g),o=Pa(e.b),s=Aa((.2225045*r+.7168786*i+.0606169*o)/va);return r===i&&i===o?t=n=s:(t=Aa((.4360747*r+.3850649*i+.1430804*o)/ya),n=Aa((.0139322*r+.0971045*i+.7141733*o)/ga)),new Ta(116*s-16,500*(t-s),200*(s-n),e.opacity)}function Ea(e,t){return new Ta(e,0,0,null==t?1:t)}function Sa(e,t,n,r){return 1===arguments.length?ka(e):new Ta(e,t,n,null==r?1:r)}function Ta(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Aa(e){return e>xa?Math.pow(e,1/3):e/wa+_a}function Oa(e){return e>ba?e*e*e:wa*(e-_a)}function Na(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Pa(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Ca(e){if(e instanceof Ia)return new Ia(e.h,e.c,e.l,e.opacity);if(e instanceof Ta||(e=ka(e)),0===e.a&&0===e.b)return new Ia(NaN,0()=>e;function Ya(e,t){for(var n,r=-1,i=t.length;++rr!=p>r&&n<(f-c)*(r-l)/(p-l)+c&&(i=-i)}return i}function Xa(e,t,n){var r,i,o,s;return function(e,t,n){return(t[0]-e[0])*(n[1]-e[1])==(n[0]-e[0])*(t[1]-e[1])}(e,t,n)&&(i=e[r=+(e[0]===t[0])],o=n[r],s=t[r],i<=o&&o<=s||s<=o&&o<=i)}function Za(){}var Ja=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function eu(){var e=1,t=1,n=et,r=a;function i(e){var t=n(e);if(Array.isArray(t))t=t.slice().sort(Wa);else{const n=ye(e,tu);for(t=Qe(...Je(n[0],n[1],t),t);t[t.length-1]>=n[1];)t.pop();for(;t[1]o(e,t)))}function o(n,i){const o=null==i?NaN:+i;if(isNaN(o))throw new Error(`invalid value: ${i}`);var a=[],u=[];return function(n,r,i){var o,a,u,c,l,h,f=new Array,p=new Array;for(o=a=-1,c=nu(n[0],r),Ja[c<<1].forEach(d);++o=r,Ja[l<<2].forEach(d);++o0?a.push([e]):u.push(e)})),u.forEach((function(e){for(var t,n=0,r=a.length;n0&&o0&&s=0&&o>=0))throw new Error("invalid size");return e=r,t=o,i},i.thresholds=function(e){return arguments.length?(n="function"==typeof e?e:Array.isArray(e)?Ga(Ha.call(e)):Ga(e),i):n},i.smooth=function(e){return arguments.length?(r=e?a:Za,i):r===a},i}function tu(e){return isFinite(e)?e:NaN}function nu(e,t){return null!=e&&+e>=t}function ru(e){return null==e||isNaN(e=+e)?-1/0:e}function iu(e,t,n,r){const i=r-t,o=n-t,s=isFinite(i)||isFinite(o)?i/o:Math.sign(i)/Math.sign(o);return isNaN(s)?e:e+s-.5}function ou(e){return e[0]}function su(e){return e[1]}function au(){return 1}function uu(){var e=ou,t=su,n=au,r=960,i=500,o=20,s=2,a=3*o,u=r+2*a>>s,c=i+2*a>>s,l=Ga(20);function h(r){var i=new Float32Array(u*c),l=Math.pow(2,-s),h=-1;for(const o of r){var f=(e(o,++h,r)+a)*l,p=(t(o,h,r)+a)*l,d=+n(o,h,r);if(d&&f>=0&&f=0&&pe*r)))(t).map(((e,t)=>(e.value=+n[t],p(e))))}function p(e){return e.coordinates.forEach(d),e}function d(e){e.forEach(m)}function m(e){e.forEach(y)}function y(e){e[0]=e[0]*Math.pow(2,s)-a,e[1]=e[1]*Math.pow(2,s)-a}function v(){return u=r+2*(a=3*o)>>s,c=i+2*a>>s,f}return f.contours=function(e){var t=h(e),n=eu().size([u,c]),r=Math.pow(2,2*s),i=e=>{e=+e;var i=p(n.contour(t,e*r));return i.value=e,i};return Object.defineProperty(i,"max",{get:()=>nt(t)/r}),i},f.x=function(t){return arguments.length?(e="function"==typeof t?t:Ga(+t),f):e},f.y=function(e){return arguments.length?(t="function"==typeof e?e:Ga(+e),f):t},f.weight=function(e){return arguments.length?(n="function"==typeof e?e:Ga(+e),f):n},f.size=function(e){if(!arguments.length)return[r,i];var t=+e[0],n=+e[1];if(!(t>=0&&n>=0))throw new Error("invalid size");return r=t,i=n,v()},f.cellSize=function(e){if(!arguments.length)return 1<=1))throw new Error("invalid cell size");return s=Math.floor(Math.log(e)/Math.LN2),v()},f.thresholds=function(e){return arguments.length?(l="function"==typeof e?e:Array.isArray(e)?Ga(Ha.call(e)):Ga(e),f):l},f.bandwidth=function(e){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((e=+e)>=0))throw new Error("invalid bandwidth");return o=(Math.sqrt(4*e*e+1)-1)/2,v()},f}const cu=134217729;function lu(e,t,n,r,i){let o,s,a,u,c=t[0],l=r[0],h=0,f=0;l>c==l>-c?(o=c,c=t[++h]):(o=l,l=r[++f]);let p=0;if(hc==l>-c?(s=c+o,a=o-(s-c),c=t[++h]):(s=l+o,a=o-(s-l),l=r[++f]),o=s,0!==a&&(i[p++]=a);hc==l>-c?(s=o+c,u=s-o,a=o-(s-u)+(c-u),c=t[++h]):(s=o+l,u=s-o,a=o-(s-u)+(l-u),l=r[++f]),o=s,0!==a&&(i[p++]=a);for(;h=33306690738754716e-32*c?u:-function(e,t,n,r,i,o,s){let a,u,c,l,h,f,p,d,m,y,v,g,_,b,w,x,k,E;const S=e-i,T=n-i,A=t-o,O=r-o;b=S*O,f=cu*S,p=f-(f-S),d=S-p,f=cu*O,m=f-(f-O),y=O-m,w=d*y-(b-p*m-d*m-p*y),x=A*T,f=cu*A,p=f-(f-A),d=A-p,f=cu*T,m=f-(f-T),y=T-m,k=d*y-(x-p*m-d*m-p*y),v=w-k,h=w-v,fu[0]=w-(v+h)+(h-k),g=b+v,h=g-b,_=b-(g-h)+(v-h),v=_-x,h=_-v,fu[1]=_-(v+h)+(h-x),E=g+v,h=E-g,fu[2]=g-(E-h)+(v-h),fu[3]=E;let N=function(e,t){let n=t[0];for(let e=1;e<4;e++)n+=t[e];return n}(0,fu),P=22204460492503146e-32*s;if(N>=P||-N>=P)return N;if(h=e-S,a=e-(S+h)+(h-i),h=n-T,c=n-(T+h)+(h-i),h=t-A,u=t-(A+h)+(h-o),h=r-O,l=r-(O+h)+(h-o),0===a&&0===u&&0===c&&0===l)return N;if(P=11093356479670487e-47*s+33306690738754706e-32*Math.abs(N),N+=S*l+O*a-(A*c+T*u),N>=P||-N>=P)return N;b=a*O,f=cu*a,p=f-(f-a),d=a-p,f=cu*O,m=f-(f-O),y=O-m,w=d*y-(b-p*m-d*m-p*y),x=u*T,f=cu*u,p=f-(f-u),d=u-p,f=cu*T,m=f-(f-T),y=T-m,k=d*y-(x-p*m-d*m-p*y),v=w-k,h=w-v,yu[0]=w-(v+h)+(h-k),g=b+v,h=g-b,_=b-(g-h)+(v-h),v=_-x,h=_-v,yu[1]=_-(v+h)+(h-x),E=g+v,h=E-g,yu[2]=g-(E-h)+(v-h),yu[3]=E;const C=lu(4,fu,4,yu,pu);b=S*l,f=cu*S,p=f-(f-S),d=S-p,f=cu*l,m=f-(f-l),y=l-m,w=d*y-(b-p*m-d*m-p*y),x=A*c,f=cu*A,p=f-(f-A),d=A-p,f=cu*c,m=f-(f-c),y=c-m,k=d*y-(x-p*m-d*m-p*y),v=w-k,h=w-v,yu[0]=w-(v+h)+(h-k),g=b+v,h=g-b,_=b-(g-h)+(v-h),v=_-x,h=_-v,yu[1]=_-(v+h)+(h-x),E=g+v,h=E-g,yu[2]=g-(E-h)+(v-h),yu[3]=E;const R=lu(C,pu,4,yu,du);b=a*l,f=cu*a,p=f-(f-a),d=a-p,f=cu*l,m=f-(f-l),y=l-m,w=d*y-(b-p*m-d*m-p*y),x=u*c,f=cu*u,p=f-(f-u),d=u-p,f=cu*c,m=f-(f-c),y=c-m,k=d*y-(x-p*m-d*m-p*y),v=w-k,h=w-v,yu[0]=w-(v+h)+(h-k),g=b+v,h=g-b,_=b-(g-h)+(v-h),v=_-x,h=_-v,yu[1]=_-(v+h)+(h-x),E=g+v,h=E-g,yu[2]=g-(E-h)+(v-h),yu[3]=E;const L=lu(R,du,4,yu,mu);return mu[L-1]}(e,t,n,r,i,o,c)}hu(4),hu(4),hu(4),hu(4),hu(4),hu(4),hu(4),hu(4),hu(4),hu(8),hu(8),hu(8),hu(4),hu(8),hu(8),hu(8),hu(12),hu(192),hu(192),hu(4),hu(4),hu(4),hu(4),hu(4),hu(4),hu(4),hu(4),hu(8),hu(8),hu(8),hu(8),hu(8),hu(8),hu(8),hu(8),hu(8),hu(4),hu(4),hu(4),hu(8),hu(16),hu(16),hu(16),hu(32),hu(32),hu(48),hu(64),hu(1152),hu(1152),hu(4),hu(4),hu(4),hu(4),hu(4),hu(4),hu(4),hu(4),hu(4),hu(4),hu(24),hu(24),hu(24),hu(24),hu(24),hu(24),hu(24),hu(24),hu(24),hu(24),hu(1152),hu(1152),hu(1152),hu(1152),hu(1152),hu(2304),hu(2304),hu(3456),hu(5760),hu(8),hu(8),hu(8),hu(16),hu(24),hu(48),hu(48),hu(96),hu(192),hu(384),hu(384),hu(384),hu(768),hu(96),hu(96),hu(96),hu(1152);const gu=Math.pow(2,-52),_u=new Uint32Array(512);class bu{static from(e,t=Tu,n=Au){const r=e.length,i=new Float64Array(2*r);for(let o=0;o>1;if(t>0&&"number"!=typeof e[0])throw new Error("Expected coords to contain numbers.");this.coords=e;const n=Math.max(2*t-5,0);this._triangles=new Uint32Array(3*n),this._halfedges=new Int32Array(3*n),this._hashSize=Math.ceil(Math.sqrt(t)),this._hullPrev=new Uint32Array(t),this._hullNext=new Uint32Array(t),this._hullTri=new Uint32Array(t),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(t),this._dists=new Float64Array(t),this.update()}update(){const{coords:e,_hullPrev:t,_hullNext:n,_hullTri:r,_hullHash:i}=this,o=e.length>>1;let s=1/0,a=1/0,u=-1/0,c=-1/0;for(let t=0;tu&&(u=n),r>c&&(c=r),this._ids[t]=t}const l=(s+u)/2,h=(a+c)/2;let f,p,d,m=1/0;for(let t=0;t0&&(p=t,m=n)}let g=e[2*p],_=e[2*p+1],b=1/0;for(let t=0;tr&&(t[n++]=i,r=this._dists[i])}return this.hull=t.subarray(0,n),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(vu(y,v,g,_,w,x)<0){const e=p,t=g,n=_;p=d,g=w,_=x,d=e,w=t,x=n}const k=function(e,t,n,r,i,o){const s=n-e,a=r-t,u=i-e,c=o-t,l=s*s+a*a,h=u*u+c*c,f=.5/(s*c-a*u);return{x:e+(c*l-a*h)*f,y:t+(s*h-u*l)*f}}(y,v,g,_,w,x);this._cx=k.x,this._cy=k.y;for(let t=0;t0&&Math.abs(c-o)<=gu&&Math.abs(l-s)<=gu)continue;if(o=c,s=l,u===f||u===p||u===d)continue;let h=0;for(let e=0,t=this._hashKey(c,l);e=0;)if(y=m,y===h){y=-1;break}if(-1===y)continue;let v=this._addTriangle(y,u,n[y],-1,-1,r[y]);r[u]=this._legalize(v+2),r[y]=v,E++;let g=n[y];for(;m=n[g],vu(c,l,e[2*g],e[2*g+1],e[2*m],e[2*m+1])<0;)v=this._addTriangle(g,u,m,r[u],-1,r[g]),r[u]=this._legalize(v+2),n[g]=g,E--,g=m;if(y===h)for(;m=t[y],vu(c,l,e[2*m],e[2*m+1],e[2*y],e[2*y+1])<0;)v=this._addTriangle(m,u,y,-1,r[y],r[m]),this._legalize(v+2),r[m]=v,n[y]=y,E--,y=m;this._hullStart=t[u]=y,n[y]=t[g]=u,n[u]=g,i[this._hashKey(c,l)]=u,i[this._hashKey(e[2*y],e[2*y+1])]=y}this.hull=new Uint32Array(E);for(let e=0,t=this._hullStart;e0?3-n:1+n)/4}(e-this._cx,t-this._cy)*this._hashSize)%this._hashSize}_legalize(e){const{_triangles:t,_halfedges:n,coords:r}=this;let i=0,o=0;for(;;){const s=n[e],a=e-e%3;if(o=a+(e+2)%3,-1===s){if(0===i)break;e=_u[--i];continue}const u=s-s%3,c=a+(e+1)%3,l=u+(s+2)%3,h=t[o],f=t[e],p=t[c],d=t[l];if(xu(r[2*h],r[2*h+1],r[2*f],r[2*f+1],r[2*p],r[2*p+1],r[2*d],r[2*d+1])){t[e]=d,t[s]=h;const r=n[l];if(-1===r){let t=this._hullStart;do{if(this._hullTri[t]===l){this._hullTri[t]=e;break}t=this._hullPrev[t]}while(t!==this._hullStart)}this._link(e,r),this._link(s,n[o]),this._link(o,l);const a=u+(s+1)%3;i<_u.length&&(_u[i++]=a)}else{if(0===i)break;e=_u[--i]}}return o}_link(e,t){this._halfedges[e]=t,-1!==t&&(this._halfedges[t]=e)}_addTriangle(e,t,n,r,i,o){const s=this.trianglesLen;return this._triangles[s]=e,this._triangles[s+1]=t,this._triangles[s+2]=n,this._link(s,r),this._link(s+1,i),this._link(s+2,o),this.trianglesLen+=3,s}}function wu(e,t,n,r){const i=e-n,o=t-r;return i*i+o*o}function xu(e,t,n,r,i,o,s,a){const u=e-s,c=t-a,l=n-s,h=r-a,f=i-s,p=o-a,d=l*l+h*h,m=f*f+p*p;return u*(h*m-d*p)-c*(l*m-d*f)+(u*u+c*c)*(l*p-h*f)<0}function ku(e,t,n,r,i,o){const s=n-e,a=r-t,u=i-e,c=o-t,l=s*s+a*a,h=u*u+c*c,f=.5/(s*c-a*u),p=(c*l-a*h)*f,d=(s*h-u*l)*f;return p*p+d*d}function Eu(e,t,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){const r=e[i],o=t[r];let s=i-1;for(;s>=n&&t[e[s]]>o;)e[s+1]=e[s--];e[s+1]=r}else{let i=n+1,o=r;Su(e,n+r>>1,i),t[e[n]]>t[e[r]]&&Su(e,n,r),t[e[i]]>t[e[r]]&&Su(e,i,r),t[e[n]]>t[e[i]]&&Su(e,n,i);const s=e[i],a=t[s];for(;;){do{i++}while(t[e[i]]a);if(o=o-n?(Eu(e,t,i,r),Eu(e,t,n,o-1)):(Eu(e,t,n,o-1),Eu(e,t,i,r))}}function Su(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Tu(e){return e[0]}function Au(e){return e[1]}const Ou=1e-6;class Nu{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(e,t){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(e,t){this._+=`L${this._x1=+e},${this._y1=+t}`}arc(e,t,n){const r=(e=+e)+(n=+n),i=t=+t;if(n<0)throw new Error("negative radius");null===this._x1?this._+=`M${r},${i}`:(Math.abs(this._x1-r)>Ou||Math.abs(this._y1-i)>Ou)&&(this._+="L"+r+","+i),n&&(this._+=`A${n},${n},0,1,1,${e-n},${t}A${n},${n},0,1,1,${this._x1=r},${this._y1=i}`)}rect(e,t,n,r){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${+n}v${+r}h${-n}Z`}value(){return this._||null}}class Pu{constructor(){this._=[]}moveTo(e,t){this._.push([e,t])}closePath(){this._.push(this._[0].slice())}lineTo(e,t){this._.push([e,t])}value(){return this._.length?this._:null}}class Cu{constructor(e,[t,n,r,i]=[0,0,960,500]){if(!((r=+r)>=(t=+t)&&(i=+i)>=(n=+n)))throw new Error("invalid bounds");this.delaunay=e,this._circumcenters=new Float64Array(2*e.points.length),this.vectors=new Float64Array(2*e.points.length),this.xmax=r,this.xmin=t,this.ymax=i,this.ymin=n,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:e,hull:t,triangles:n},vectors:r}=this;let i,o;const s=this.circumcenters=this._circumcenters.subarray(0,n.length/3*2);for(let r,a,u=0,c=0,l=n.length;u1;)i-=2;for(let e=2;e0){if(t>=this.ymax)return null;(i=(this.ymax-t)/r)0){if(e>=this.xmax)return null;(i=(this.xmax-e)/n)this.xmax?2:0)|(tthis.ymax?8:0)}_simplify(e){if(e&&e.length>4){for(let t=0;t2&&function(e){const{triangles:t,coords:n}=e;for(let e=0;e1e-10)return!1}return!0}(e)){this.collinear=Int32Array.from({length:t.length/2},((e,t)=>t)).sort(((e,n)=>t[2*e]-t[2*n]||t[2*e+1]-t[2*n+1]));const e=this.collinear[0],n=this.collinear[this.collinear.length-1],r=[t[2*e],t[2*e+1],t[2*n],t[2*n+1]],i=1e-8*Math.hypot(r[3]-r[1],r[2]-r[0]);for(let e=0,n=t.length/2;e0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=r[0],o[r[0]]=1,2===r.length&&(o[r[1]]=0,this.triangles[1]=r[1],this.triangles[2]=r[1]))}voronoi(e){return new Cu(this,e)}*neighbors(e){const{inedges:t,hull:n,_hullIndex:r,halfedges:i,triangles:o,collinear:s}=this;if(s){const t=s.indexOf(e);return t>0&&(yield s[t-1]),void(t=0&&i!==n&&i!==r;)n=i;return i}_step(e,t,n){const{inedges:r,hull:i,_hullIndex:o,halfedges:s,triangles:a,points:u}=this;if(-1===r[e]||!u.length)return(e+1)%(u.length>>1);let c=e,l=Lu(t-u[2*e],2)+Lu(n-u[2*e+1],2);const h=r[e];let f=h;do{let r=a[f];const h=Lu(t-u[2*r],2)+Lu(n-u[2*r+1],2);if(h()=>e;function Bu(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:o,x:s,y:a,dx:u,dy:c,dispatch:l}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:l}})}function Uu(e){return!e.ctrlKey&&!e.button}function zu(){return this.parentNode}function Vu(e,t){return null==t?{x:e.x,y:e.y}:t}function $u(){return navigator.maxTouchPoints||"ontouchstart"in this}function qu(){var e,t,n,r,i=Uu,o=zu,s=Vu,a=$u,u={},c=mn("start","drag","end"),l=0,h=0;function f(e){e.on("mousedown.drag",p).filter(a).on("touchstart.drag",y).on("touchmove.drag",v,Pr).on("touchend.drag touchcancel.drag",g).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(s,a){if(!r&&i.call(this,s,a)){var u=_(this,o.call(this,s,a),s,a,"mouse");u&&(Nr(s.view).on("mousemove.drag",d,Cr).on("mouseup.drag",m,Cr),Ir(s.view),Rr(s),n=!1,e=s.clientX,t=s.clientY,u("start",s))}}function d(r){if(Lr(r),!n){var i=r.clientX-e,o=r.clientY-t;n=i*i+o*o>h}u.mouse("drag",r)}function m(e){Nr(e.view).on("mousemove.drag mouseup.drag",null),Dr(e.view,n),Lr(e),u.mouse("end",e)}function y(e,t){if(i.call(this,e,t)){var n,r,s=e.changedTouches,a=o.call(this,e,t),u=s.length;for(n=0;n=o?u=!0:(r=e.charCodeAt(s++))===Gu?c=!0:r===Yu&&(c=!0,e.charCodeAt(s)===Gu&&++s),e.slice(i+1,t-1).replace(/""/g,'"')}for(;s9999?"+"+Zu(t,6):Zu(t,4))+"-"+Zu(e.getUTCMonth()+1,2)+"-"+Zu(e.getUTCDate(),2)+(o?"T"+Zu(n,2)+":"+Zu(r,2)+":"+Zu(i,2)+"."+Zu(o,3)+"Z":i?"T"+Zu(n,2)+":"+Zu(r,2)+":"+Zu(i,2)+"Z":r||n?"T"+Zu(n,2)+":"+Zu(r,2)+"Z":"")}(e):t.test(e+="")?'"'+e.replace(/"/g,'""')+'"':e}return{parse:function(e,t){var n,i,o=r(e,(function(e,r){if(n)return n(e,r-1);i=e,n=t?function(e,t){var n=Qu(e);return function(r,i){return t(n(r),i,e)}}(e,t):Qu(e)}));return o.columns=i||[],o},parseRows:r,format:function(t,n){return null==n&&(n=Xu(t)),[n.map(s).join(e)].concat(i(t,n)).join("\n")},formatBody:function(e,t){return null==t&&(t=Xu(e)),i(e,t).join("\n")},formatRows:function(e){return e.map(o).join("\n")},formatRow:o,formatValue:s}}var ec=Ju(","),tc=ec.parse,nc=ec.parseRows,rc=ec.format,ic=ec.formatBody,oc=ec.formatRows,sc=ec.formatRow,ac=ec.formatValue,uc=Ju("\t"),cc=uc.parse,lc=uc.parseRows,hc=uc.format,fc=uc.formatBody,pc=uc.formatRows,dc=uc.formatRow,mc=uc.formatValue;function yc(e){for(var t in e){var n,r,i=e[t].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;vc&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;e[t]=i}return e}const vc=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),gc=e=>+e;function _c(e){return e*e}function bc(e){return e*(2-e)}function wc(e){return((e*=2)<=1?e*e:--e*(2-e)+1)/2}var xc=function e(t){function n(e){return Math.pow(e,t)}return t=+t,n.exponent=e,n}(3),kc=function e(t){function n(e){return 1-Math.pow(1-e,t)}return t=+t,n.exponent=e,n}(3),Ec=function e(t){function n(e){return((e*=2)<=1?Math.pow(e,t):2-Math.pow(2-e,t))/2}return t=+t,n.exponent=e,n}(3),Sc=Math.PI,Tc=Sc/2;function Ac(e){return 1==+e?1:1-Math.cos(e*Tc)}function Oc(e){return Math.sin(e*Tc)}function Nc(e){return(1-Math.cos(Sc*e))/2}function Pc(e){return 1.0009775171065494*(Math.pow(2,-10*e)-.0009765625)}function Cc(e){return Pc(1-+e)}function Rc(e){return 1-Pc(e)}function Lc(e){return((e*=2)<=1?Pc(1-e):2-Pc(e-1))/2}function Ic(e){return 1-Math.sqrt(1-e*e)}function Dc(e){return Math.sqrt(1- --e*e)}function Mc(e){return((e*=2)<=1?1-Math.sqrt(1-e*e):Math.sqrt(1-(e-=2)*e)+1)/2}var jc=4/11,Fc=6/11,Bc=8/11,Uc=3/4,zc=9/11,Vc=10/11,$c=15/16,qc=21/22,Kc=63/64,Hc=1/jc/jc;function Wc(e){return 1-Gc(1-e)}function Gc(e){return(e=+e)cl(t,n).then((t=>(new DOMParser).parseFromString(t,e)))}const gl=vl("application/xml");var _l=vl("text/html"),bl=vl("image/svg+xml");function wl(e,t){var n,r=1;function i(){var i,o,s=n.length,a=0,u=0;for(i=0;i=(o=(m+v)/2))?m=o:v=o,(l=n>=(s=(y+g)/2))?y=s:g=s,i=p,!(p=p[h=l<<1|c]))return i[h]=d,e;if(a=+e._x.call(null,p.data),u=+e._y.call(null,p.data),t===a&&n===u)return d.next=p,i?i[h]=d:e._root=d,e;do{i=i?i[h]=new Array(4):e._root=new Array(4),(c=t>=(o=(m+v)/2))?m=o:v=o,(l=n>=(s=(y+g)/2))?y=s:g=s}while((h=l<<1|c)==(f=(u>=s)<<1|a>=o));return i[f]=p,i[h]=d,e}function kl(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function El(e){return e[0]}function Sl(e){return e[1]}function Tl(e,t,n){var r=new Al(null==t?El:t,null==n?Sl:n,NaN,NaN,NaN,NaN);return null==e?r:r.addAll(e)}function Al(e,t,n,r,i,o){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function Ol(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var Nl=Tl.prototype=Al.prototype;function Pl(e){return function(){return e}}function Cl(e){return 1e-6*(e()-.5)}function Rl(e){return e.x+e.vx}function Ll(e){return e.y+e.vy}function Il(e){var t,n,r,i=1,o=1;function s(){for(var e,s,u,c,l,h,f,p=t.length,d=0;dc+d||ol+d||su.index){var m=c-a.x-a.vx,y=l-a.y-a.vy,v=m*m+y*y;ve.r&&(e.r=e[t].r)}function u(){if(t){var r,i,o=t.length;for(n=new Array(o),r=0;r[a(e,t,r),e])));for(s=0,i=new Array(c);sl&&(l=r),ih&&(h=i));if(u>l||c>h)return this;for(this.cover(u,c).cover(l,h),n=0;ne||e>=i||r>t||t>=o;)switch(a=(tf||(o=u.y0)>p||(s=u.x1)=v)<<1|e>=y)&&(u=d[d.length-1],d[d.length-1]=d[d.length-1-c],d[d.length-1-c]=u)}else{var g=e-+this._x.call(null,m.data),_=t-+this._y.call(null,m.data),b=g*g+_*_;if(b=(a=(d+y)/2))?d=a:y=a,(l=s>=(u=(m+v)/2))?m=u:v=u,t=p,!(p=p[h=l<<1|c]))return this;if(!p.length)break;(t[h+1&3]||t[h+2&3]||t[h+3&3])&&(n=t,f=h)}for(;p.data!==e;)if(r=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.next,this):t?(i?t[h]=i:delete t[h],(p=t[0]||t[1]||t[2]||t[3])&&p===(t[3]||t[2]||t[1]||t[0])&&!p.length&&(n?n[f]=p:this._root=p),this):(this._root=i,this)},Nl.removeAll=function(e){for(var t=0,n=e.length;t(e=(Fl*e+Bl)%Ul)/Ul}();function h(){f(),c.call("tick",t),n1?(null==n?a.delete(e):a.set(e,d(n)),t):a.get(e)},find:function(t,n,r){var i,o,s,a,u,c=0,l=e.length;for(null==r?r=1/0:r*=r,c=0;c1?(c.on(e,n),t):c.on(e)}}}function Hl(){var e,t,n,r,i,o=Pl(-30),s=1,a=1/0,u=.81;function c(n){var i,o=e.length,s=Tl(e,zl,Vl).visitAfter(h);for(r=n,i=0;i=a)){(e.data!==t||e.next)&&(0===h&&(d+=(h=Cl(n))*h),0===f&&(d+=(f=Cl(n))*f),d1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Xl(e){return(e=Ql(Math.abs(e)))?e[1]:NaN}var Zl,Jl=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function eh(e){if(!(t=Jl.exec(e)))throw new Error("invalid format: "+e);var t;return new th({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function th(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function nh(e,t){var n=Ql(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}eh.prototype=th.prototype,th.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const rh={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>nh(100*e,t),r:nh,s:function(e,t){var n=Ql(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(Zl=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,s=r.length;return o===s?r:o>s?r+new Array(o-s+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Ql(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function ih(e){return e}var oh,sh,ah,uh=Array.prototype.map,ch=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function lh(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?ih:(t=uh.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,o=[],s=0,a=t[0],u=0;i>0&&a>0&&(u+a+1>r&&(a=Math.max(1,r-u)),o.push(e.substring(i-=a,i+a)),!((u+=a+1)>r));)a=t[s=(s+1)%t.length];return o.reverse().join(n)}),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",s=void 0===e.decimal?".":e.decimal+"",a=void 0===e.numerals?ih:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(uh.call(e.numerals,String)),u=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",l=void 0===e.nan?"NaN":e.nan+"";function h(e){var t=(e=eh(e)).fill,n=e.align,h=e.sign,f=e.symbol,p=e.zero,d=e.width,m=e.comma,y=e.precision,v=e.trim,g=e.type;"n"===g?(m=!0,g="g"):rh[g]||(void 0===y&&(y=12),v=!0,g="g"),(p||"0"===t&&"="===n)&&(p=!0,t="0",n="=");var _="$"===f?i:"#"===f&&/[boxX]/.test(g)?"0"+g.toLowerCase():"",b="$"===f?o:/[%p]/.test(g)?u:"",w=rh[g],x=/[defgprs%]/.test(g);function k(e){var i,o,u,f=_,k=b;if("c"===g)k=w(e)+k,e="";else{var E=(e=+e)<0||1/e<0;if(e=isNaN(e)?l:w(Math.abs(e),y),v&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),E&&0==+e&&"+"!==h&&(E=!1),f=(E?"("===h?h:c:"-"===h||"("===h?"":h)+f,k=("s"===g?ch[8+Zl/3]:"")+k+(E&&"("===h?")":""),x)for(i=-1,o=e.length;++i(u=e.charCodeAt(i))||u>57){k=(46===u?s+e.slice(i+1):e.slice(i))+k,e=e.slice(0,i);break}}m&&!p&&(e=r(e,1/0));var S=f.length+e.length+k.length,T=S>1)+f+e+k+T.slice(S);break;default:e=T+f+e+k}return a(e)}return y=void 0===y?6:/[gprs]/.test(g)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),k.toString=function(){return e+""},k}return{format:h,formatPrefix:function(e,t){var n=h(((e=eh(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(Xl(t)/3))),i=Math.pow(10,-r),o=ch[8+r/3];return function(e){return n(i*e)+o}}}}function hh(e){return oh=lh(e),sh=oh.format,ah=oh.formatPrefix,oh}function fh(e){return Math.max(0,-Xl(Math.abs(e)))}function ph(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Xl(t)/3)))-Xl(Math.abs(e)))}function dh(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Xl(t)-Xl(e))+1}hh({thousands:",",grouping:[3],currency:["$",""]});var mh=1e-6,yh=1e-12,vh=Math.PI,gh=vh/2,_h=vh/4,bh=2*vh,wh=180/vh,xh=vh/180,kh=Math.abs,Eh=Math.atan,Sh=Math.atan2,Th=Math.cos,Ah=Math.ceil,Oh=Math.exp,Nh=(Math.floor,Math.hypot),Ph=Math.log,Ch=Math.pow,Rh=Math.sin,Lh=Math.sign||function(e){return e>0?1:e<0?-1:0},Ih=Math.sqrt,Dh=Math.tan;function Mh(e){return e>1?0:e<-1?vh:Math.acos(e)}function jh(e){return e>1?gh:e<-1?-gh:Math.asin(e)}function Fh(e){return(e=Rh(e/2))*e}function Bh(){}function Uh(e,t){e&&Vh.hasOwnProperty(e.type)&&Vh[e.type](e,t)}var zh={Feature:function(e,t){Uh(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r=0?1:-1,i=r*n,o=Th(t=(t*=xh)/2+_h),s=Rh(t),a=Qh*s,u=Yh*o+a*Th(i),c=a*r*Rh(i);cf.add(Sh(c,u)),Gh=e,Yh=o,Qh=s}function yf(e){return lf=new ve,Kh(e,hf),2*lf}function vf(e){return[Sh(e[1],e[0]),jh(e[2])]}function gf(e){var t=e[0],n=e[1],r=Th(n);return[r*Th(t),r*Rh(t),Rh(n)]}function _f(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function bf(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function wf(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function xf(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function kf(e){var t=Ih(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var Ef,Sf,Tf,Af,Of,Nf,Pf,Cf,Rf,Lf,If,Df,Mf,jf,Ff,Bf,Uf={point:zf,lineStart:$f,lineEnd:qf,polygonStart:function(){Uf.point=Kf,Uf.lineStart=Hf,Uf.lineEnd=Wf,sf=new ve,hf.polygonStart()},polygonEnd:function(){hf.polygonEnd(),Uf.point=zf,Uf.lineStart=$f,Uf.lineEnd=qf,cf<0?(Xh=-(Jh=180),Zh=-(ef=90)):sf>mh?ef=90:sf<-mh&&(Zh=-90),uf[0]=Xh,uf[1]=Jh},sphere:function(){Xh=-(Jh=180),Zh=-(ef=90)}};function zf(e,t){af.push(uf=[Xh=e,Jh=e]),tef&&(ef=t)}function Vf(e,t){var n=gf([e*xh,t*xh]);if(of){var r=bf(of,n),i=bf([r[1],-r[0],0],r);kf(i),i=vf(i);var o,s=e-tf,a=s>0?1:-1,u=i[0]*wh*a,c=kh(s)>180;c^(a*tfef&&(ef=o):c^(a*tf<(u=(u+360)%360-180)&&uef&&(ef=t)),c?eGf(Xh,Jh)&&(Jh=e):Gf(e,Jh)>Gf(Xh,Jh)&&(Xh=e):Jh>=Xh?(eJh&&(Jh=e)):e>tf?Gf(Xh,e)>Gf(Xh,Jh)&&(Jh=e):Gf(e,Jh)>Gf(Xh,Jh)&&(Xh=e)}else af.push(uf=[Xh=e,Jh=e]);tef&&(ef=t),of=n,tf=e}function $f(){Uf.point=Vf}function qf(){uf[0]=Xh,uf[1]=Jh,Uf.point=zf,of=null}function Kf(e,t){if(of){var n=e-tf;sf.add(kh(n)>180?n+(n>0?360:-360):n)}else nf=e,rf=t;hf.point(e,t),Vf(e,t)}function Hf(){hf.lineStart()}function Wf(){Kf(nf,rf),hf.lineEnd(),kh(sf)>mh&&(Xh=-(Jh=180)),uf[0]=Xh,uf[1]=Jh,of=null}function Gf(e,t){return(t-=e)<0?t+360:t}function Yf(e,t){return e[0]-t[0]}function Qf(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tGf(r[0],r[1])&&(r[1]=i[1]),Gf(i[0],r[1])>Gf(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(s=-1/0,t=0,r=o[n=o.length-1];t<=n;r=i,++t)i=o[t],(a=Gf(r[1],i[0]))>s&&(s=a,Xh=i[0],Jh=r[1])}return af=uf=null,Xh===1/0||Zh===1/0?[[NaN,NaN],[NaN,NaN]]:[[Xh,Zh],[Jh,ef]]}var Zf={sphere:Bh,point:Jf,lineStart:tp,lineEnd:ip,polygonStart:function(){Zf.lineStart=op,Zf.lineEnd=sp},polygonEnd:function(){Zf.lineStart=tp,Zf.lineEnd=ip}};function Jf(e,t){e*=xh;var n=Th(t*=xh);ep(n*Th(e),n*Rh(e),Rh(t))}function ep(e,t,n){++Ef,Tf+=(e-Tf)/Ef,Af+=(t-Af)/Ef,Of+=(n-Of)/Ef}function tp(){Zf.point=np}function np(e,t){e*=xh;var n=Th(t*=xh);jf=n*Th(e),Ff=n*Rh(e),Bf=Rh(t),Zf.point=rp,ep(jf,Ff,Bf)}function rp(e,t){e*=xh;var n=Th(t*=xh),r=n*Th(e),i=n*Rh(e),o=Rh(t),s=Sh(Ih((s=Ff*o-Bf*i)*s+(s=Bf*r-jf*o)*s+(s=jf*i-Ff*r)*s),jf*r+Ff*i+Bf*o);Sf+=s,Nf+=s*(jf+(jf=r)),Pf+=s*(Ff+(Ff=i)),Cf+=s*(Bf+(Bf=o)),ep(jf,Ff,Bf)}function ip(){Zf.point=Jf}function op(){Zf.point=ap}function sp(){up(Df,Mf),Zf.point=Jf}function ap(e,t){Df=e,Mf=t,e*=xh,t*=xh,Zf.point=up;var n=Th(t);jf=n*Th(e),Ff=n*Rh(e),Bf=Rh(t),ep(jf,Ff,Bf)}function up(e,t){e*=xh;var n=Th(t*=xh),r=n*Th(e),i=n*Rh(e),o=Rh(t),s=Ff*o-Bf*i,a=Bf*r-jf*o,u=jf*i-Ff*r,c=Nh(s,a,u),l=jh(c),h=c&&-l/c;Rf.add(h*s),Lf.add(h*a),If.add(h*u),Sf+=l,Nf+=l*(jf+(jf=r)),Pf+=l*(Ff+(Ff=i)),Cf+=l*(Bf+(Bf=o)),ep(jf,Ff,Bf)}function cp(e){Ef=Sf=Tf=Af=Of=Nf=Pf=Cf=0,Rf=new ve,Lf=new ve,If=new ve,Kh(e,Zf);var t=+Rf,n=+Lf,r=+If,i=Nh(t,n,r);return ivh&&(e-=Math.round(e/bh)*bh),[e,t]}function pp(e,t,n){return(e%=bh)?t||n?hp(mp(e),yp(t,n)):mp(e):t||n?yp(t,n):fp}function dp(e){return function(t,n){return kh(t+=e)>vh&&(t-=Math.round(t/bh)*bh),[t,n]}}function mp(e){var t=dp(e);return t.invert=dp(-e),t}function yp(e,t){var n=Th(e),r=Rh(e),i=Th(t),o=Rh(t);function s(e,t){var s=Th(t),a=Th(e)*s,u=Rh(e)*s,c=Rh(t),l=c*n+a*r;return[Sh(u*i-l*o,a*n-c*r),jh(l*i+u*o)]}return s.invert=function(e,t){var s=Th(t),a=Th(e)*s,u=Rh(e)*s,c=Rh(t),l=c*i-u*o;return[Sh(u*i+c*o,a*n+l*r),jh(l*n-a*r)]},s}function vp(e){function t(t){return(t=e(t[0]*xh,t[1]*xh))[0]*=wh,t[1]*=wh,t}return e=pp(e[0]*xh,e[1]*xh,e.length>2?e[2]*xh:0),t.invert=function(t){return(t=e.invert(t[0]*xh,t[1]*xh))[0]*=wh,t[1]*=wh,t},t}function gp(e,t,n,r,i,o){if(n){var s=Th(t),a=Rh(t),u=r*n;null==i?(i=t+r*bh,o=t-u/2):(i=_p(s,i),o=_p(s,o),(r>0?io)&&(i+=r*bh));for(var c,l=i;r>0?l>o:l1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function xp(e,t){return kh(e[0]-t[0])=0;--o)i.point((l=c[o])[0],l[1]);else r(f.x,f.p.x,-1,i);f=f.p}c=(f=f.o).z,p=!p}while(!f.v);i.lineEnd()}}}function Sp(e){if(t=e.length){for(var t,n,r=0,i=e[0];++r=0?1:-1,T=S*E,A=T>vh,O=y*x;if(u.add(Sh(O*S*Rh(T),v*k+O*Th(T))),s+=A?E+S*bh:E,A^d>=n^b>=n){var N=bf(gf(p),gf(_));kf(N);var P=bf(o,N);kf(P);var C=(A^E>=0?-1:1)*jh(P[2]);(r>C||r===C&&(N[0]||N[1]))&&(a+=A^E>=0?1:-1)}}return(s<-mh||s0){for(h||(i.polygonStart(),h=!0),i.lineStart(),e=0;e1&&2&u&&f.push(f.pop().concat(f.shift())),s.push(f.filter(Np))}return f}}function Np(e){return e.length>1}function Pp(e,t){return((e=e.x)[0]<0?e[1]-gh-mh:gh-e[1])-((t=t.x)[0]<0?t[1]-gh-mh:gh-t[1])}fp.invert=fp;const Cp=Op((function(){return!0}),(function(e){var t,n=NaN,r=NaN,i=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(o,s){var a=o>0?vh:-vh,u=kh(o-n);kh(u-vh)0?gh:-gh),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(a,r),e.point(o,r),t=0):i!==a&&u>=vh&&(kh(n-i)mh?Eh((Rh(t)*(o=Th(r))*Rh(n)-Rh(r)*(i=Th(t))*Rh(e))/(i*o*s)):(t+r)/2}(n,r,o,s),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(a,r),t=0),e.point(n=o,r=s),i=a},lineEnd:function(){e.lineEnd(),n=r=NaN},clean:function(){return 2-t}}}),(function(e,t,n,r){var i;if(null==e)i=n*gh,r.point(-vh,i),r.point(0,i),r.point(vh,i),r.point(vh,0),r.point(vh,-i),r.point(0,-i),r.point(-vh,-i),r.point(-vh,0),r.point(-vh,i);else if(kh(e[0]-t[0])>mh){var o=e[0]0,i=kh(t)>mh;function o(e,n){return Th(e)*Th(n)>t}function s(e,n,r){var i=[1,0,0],o=bf(gf(e),gf(n)),s=_f(o,o),a=o[0],u=s-a*a;if(!u)return!r&&e;var c=t*s/u,l=-t*a/u,h=bf(i,o),f=xf(i,c);wf(f,xf(o,l));var p=h,d=_f(f,p),m=_f(p,p),y=d*d-m*(_f(f,f)-1);if(!(y<0)){var v=Ih(y),g=xf(p,(-d-v)/m);if(wf(g,f),g=vf(g),!r)return g;var _,b=e[0],w=n[0],x=e[1],k=n[1];w0^g[1]<(kh(g[0]-b)vh^(b<=g[0]&&g[0]<=w)){var T=xf(p,(-d+v)/m);return wf(T,f),[g,vf(T)]}}}function a(t,n){var i=r?e:vh-e,o=0;return t<-i?o|=1:t>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return Op(o,(function(e){var t,n,u,c,l;return{lineStart:function(){c=u=!1,l=1},point:function(h,f){var p,d=[h,f],m=o(h,f),y=r?m?0:a(h,f):m?a(h+(h<0?vh:-vh),f):0;if(!t&&(c=u=m)&&e.lineStart(),m!==u&&(!(p=s(t,d))||xp(t,p)||xp(d,p))&&(d[2]=1),m!==u)l=0,m?(e.lineStart(),p=s(d,t),e.point(p[0],p[1])):(p=s(t,d),e.point(p[0],p[1],2),e.lineEnd()),t=p;else if(i&&t&&r^m){var v;y&n||!(v=s(d,t,!0))||(l=0,r?(e.lineStart(),e.point(v[0][0],v[0][1]),e.point(v[1][0],v[1][1]),e.lineEnd()):(e.point(v[1][0],v[1][1]),e.lineEnd(),e.lineStart(),e.point(v[0][0],v[0][1],3)))}!m||t&&xp(t,d)||e.point(d[0],d[1]),t=d,u=m,n=y},lineEnd:function(){u&&e.lineEnd(),t=null},clean:function(){return l|(c&&u)<<1}}}),(function(t,r,i,o){gp(o,e,n,i,t,r)}),r?[0,-e]:[-vh,e-vh])}var Lp,Ip,Dp,Mp,jp=1e9,Fp=-jp;function Bp(e,t,n,r){function i(i,o){return e<=i&&i<=n&&t<=o&&o<=r}function o(i,o,a,c){var l=0,h=0;if(null==i||(l=s(i,a))!==(h=s(o,a))||u(i,o)<0^a>0)do{c.point(0===l||3===l?e:n,l>1?r:t)}while((l=(l+a+4)%4)!==h);else c.point(o[0],o[1])}function s(r,i){return kh(r[0]-e)0?0:3:kh(r[0]-n)0?2:1:kh(r[1]-t)0?1:0:i>0?3:2}function a(e,t){return u(e.x,t.x)}function u(e,t){var n=s(e,1),r=s(t,1);return n!==r?n-r:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}return function(s){var u,c,l,h,f,p,d,m,y,v,g,_=s,b=wp(),w={point:x,lineStart:function(){w.point=k,c&&c.push(l=[]),v=!0,y=!1,d=m=NaN},lineEnd:function(){u&&(k(h,f),p&&y&&b.rejoin(),u.push(b.result())),w.point=x,y&&_.lineEnd()},polygonStart:function(){_=b,u=[],c=[],g=!0},polygonEnd:function(){var t=function(){for(var t=0,n=0,i=c.length;nr&&(f-o)*(r-s)>(p-s)*(e-o)&&++t:p<=r&&(f-o)*(r-s)<(p-s)*(e-o)&&--t;return t}(),n=g&&t,i=(u=vt(u)).length;(n||i)&&(s.polygonStart(),n&&(s.lineStart(),o(null,null,1,s),s.lineEnd()),i&&Ep(u,a,t,o,s),s.polygonEnd()),_=s,u=c=l=null}};function x(e,t){i(e,t)&&_.point(e,t)}function k(o,s){var a=i(o,s);if(c&&l.push([o,s]),v)h=o,f=s,p=a,v=!1,a&&(_.lineStart(),_.point(o,s));else if(a&&y)_.point(o,s);else{var u=[d=Math.max(Fp,Math.min(jp,d)),m=Math.max(Fp,Math.min(jp,m))],b=[o=Math.max(Fp,Math.min(jp,o)),s=Math.max(Fp,Math.min(jp,s))];!function(e,t,n,r,i,o){var s,a=e[0],u=e[1],c=0,l=1,h=t[0]-a,f=t[1]-u;if(s=n-a,h||!(s>0)){if(s/=h,h<0){if(s0){if(s>l)return;s>c&&(c=s)}if(s=i-a,h||!(s<0)){if(s/=h,h<0){if(s>l)return;s>c&&(c=s)}else if(h>0){if(s0)){if(s/=f,f<0){if(s0){if(s>l)return;s>c&&(c=s)}if(s=o-u,f||!(s<0)){if(s/=f,f<0){if(s>l)return;s>c&&(c=s)}else if(f>0){if(s0&&(e[0]=a+c*h,e[1]=u+c*f),l<1&&(t[0]=a+l*h,t[1]=u+l*f),!0}}}}}(u,b,e,t,n,r)?a&&(_.lineStart(),_.point(o,s),g=!1):(y||(_.lineStart(),_.point(u[0],u[1])),_.point(b[0],b[1]),a||_.lineEnd(),g=!1)}d=o,m=s,y=a}return w}}function Up(){var e,t,n,r=0,i=0,o=960,s=500;return n={stream:function(n){return e&&t===n?e:e=Bp(r,i,o,s)(t=n)},extent:function(a){return arguments.length?(r=+a[0][0],i=+a[0][1],o=+a[1][0],s=+a[1][1],e=t=null,n):[[r,i],[o,s]]}}}var zp={sphere:Bh,point:Bh,lineStart:function(){zp.point=$p,zp.lineEnd=Vp},lineEnd:Bh,polygonStart:Bh,polygonEnd:Bh};function Vp(){zp.point=zp.lineEnd=Bh}function $p(e,t){Ip=e*=xh,Dp=Rh(t*=xh),Mp=Th(t),zp.point=qp}function qp(e,t){e*=xh;var n=Rh(t*=xh),r=Th(t),i=kh(e-Ip),o=Th(i),s=r*Rh(i),a=Mp*n-Dp*r*o,u=Dp*n+Mp*r*o;Lp.add(Sh(Ih(s*s+a*a),u)),Ip=e,Dp=n,Mp=r}function Kp(e){return Lp=new ve,Kh(e,zp),+Lp}var Hp=[null,null],Wp={type:"LineString",coordinates:Hp};function Gp(e,t){return Hp[0]=e,Hp[1]=t,Kp(Wp)}var Yp={Feature:function(e,t){return Xp(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r0&&(i=Gp(e[o],e[o-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))mh})).map(u)).concat(wt(Ah(o/p)*p,i,p).filter((function(e){return kh(e%m)>mh})).map(c))}return v.lines=function(){return g().map((function(e){return{type:"LineString",coordinates:e}}))},v.outline=function(){return{type:"Polygon",coordinates:[l(r).concat(h(s).slice(1),l(n).reverse().slice(1),h(a).reverse().slice(1))]}},v.extent=function(e){return arguments.length?v.extentMajor(e).extentMinor(e):v.extentMinor()},v.extentMajor=function(e){return arguments.length?(r=+e[0][0],n=+e[1][0],a=+e[0][1],s=+e[1][1],r>n&&(e=r,r=n,n=e),a>s&&(e=a,a=s,s=e),v.precision(y)):[[r,a],[n,s]]},v.extentMinor=function(n){return arguments.length?(t=+n[0][0],e=+n[1][0],o=+n[0][1],i=+n[1][1],t>e&&(n=t,t=e,e=n),o>i&&(n=o,o=i,i=n),v.precision(y)):[[t,o],[e,i]]},v.step=function(e){return arguments.length?v.stepMajor(e).stepMinor(e):v.stepMinor()},v.stepMajor=function(e){return arguments.length?(d=+e[0],m=+e[1],v):[d,m]},v.stepMinor=function(e){return arguments.length?(f=+e[0],p=+e[1],v):[f,p]},v.precision=function(f){return arguments.length?(y=+f,u=id(o,i,90),c=od(t,e,y),l=id(a,s,90),h=od(r,n,y),v):y},v.extentMajor([[-180,-90+mh],[180,90-mh]]).extentMinor([[-180,-80-mh],[180,80+mh]])}function ad(){return sd()()}function ud(e,t){var n=e[0]*xh,r=e[1]*xh,i=t[0]*xh,o=t[1]*xh,s=Th(r),a=Rh(r),u=Th(o),c=Rh(o),l=s*Th(n),h=s*Rh(n),f=u*Th(i),p=u*Rh(i),d=2*jh(Ih(Fh(o-r)+s*u*Fh(i-n))),m=Rh(d),y=d?function(e){var t=Rh(e*=d)/m,n=Rh(d-e)/m,r=n*l+t*f,i=n*h+t*p,o=n*a+t*c;return[Sh(i,r)*wh,Sh(o,Ih(r*r+i*i))*wh]}:function(){return[n*wh,r*wh]};return y.distance=d,y}const cd=e=>e;var ld,hd,fd,pd,dd=new ve,md=new ve,yd={point:Bh,lineStart:Bh,lineEnd:Bh,polygonStart:function(){yd.lineStart=vd,yd.lineEnd=bd},polygonEnd:function(){yd.lineStart=yd.lineEnd=yd.point=Bh,dd.add(kh(md)),md=new ve},result:function(){var e=dd/2;return dd=new ve,e}};function vd(){yd.point=gd}function gd(e,t){yd.point=_d,ld=fd=e,hd=pd=t}function _d(e,t){md.add(pd*e-fd*t),fd=e,pd=t}function bd(){_d(ld,hd)}const wd=yd;var xd=1/0,kd=xd,Ed=-xd,Sd=Ed,Td={point:function(e,t){eEd&&(Ed=e),tSd&&(Sd=t)},lineStart:Bh,lineEnd:Bh,polygonStart:Bh,polygonEnd:Bh,result:function(){var e=[[xd,kd],[Ed,Sd]];return Ed=Sd=-(kd=xd=1/0),e}};const Ad=Td;var Od,Nd,Pd,Cd,Rd=0,Ld=0,Id=0,Dd=0,Md=0,jd=0,Fd=0,Bd=0,Ud=0,zd={point:Vd,lineStart:$d,lineEnd:Hd,polygonStart:function(){zd.lineStart=Wd,zd.lineEnd=Gd},polygonEnd:function(){zd.point=Vd,zd.lineStart=$d,zd.lineEnd=Hd},result:function(){var e=Ud?[Fd/Ud,Bd/Ud]:jd?[Dd/jd,Md/jd]:Id?[Rd/Id,Ld/Id]:[NaN,NaN];return Rd=Ld=Id=Dd=Md=jd=Fd=Bd=Ud=0,e}};function Vd(e,t){Rd+=e,Ld+=t,++Id}function $d(){zd.point=qd}function qd(e,t){zd.point=Kd,Vd(Pd=e,Cd=t)}function Kd(e,t){var n=e-Pd,r=t-Cd,i=Ih(n*n+r*r);Dd+=i*(Pd+e)/2,Md+=i*(Cd+t)/2,jd+=i,Vd(Pd=e,Cd=t)}function Hd(){zd.point=Vd}function Wd(){zd.point=Yd}function Gd(){Qd(Od,Nd)}function Yd(e,t){zd.point=Qd,Vd(Od=Pd=e,Nd=Cd=t)}function Qd(e,t){var n=e-Pd,r=t-Cd,i=Ih(n*n+r*r);Dd+=i*(Pd+e)/2,Md+=i*(Cd+t)/2,jd+=i,Fd+=(i=Cd*e-Pd*t)*(Pd+e),Bd+=i*(Cd+t),Ud+=3*i,Vd(Pd=e,Cd=t)}const Xd=zd;function Zd(e){this._context=e}Zd.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,bh)}},result:Bh};var Jd,em,tm,nm,rm,im=new ve,om={point:Bh,lineStart:function(){om.point=sm},lineEnd:function(){Jd&&am(em,tm),om.point=Bh},polygonStart:function(){Jd=!0},polygonEnd:function(){Jd=null},result:function(){var e=+im;return im=new ve,e}};function sm(e,t){om.point=am,em=nm=e,tm=rm=t}function am(e,t){nm-=e,rm-=t,im.add(Ih(nm*nm+rm*rm)),nm=e,rm=t}const um=om;let cm,lm,hm,fm;class pm{constructor(e){this._append=null==e?dm:function(e){const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return dm;if(t!==cm){const e=10**t;cm=t,lm=function(t){let n=1;this._+=t[0];for(const r=t.length;n=0))throw new RangeError(`invalid digits: ${e}`);i=t}return null===t&&(r=new pm(i)),s},s.projection(e).digits(i).context(t)}function ym(e){return{stream:vm(e)}}function vm(e){return function(t){var n=new gm;for(var r in e)n[r]=e[r];return n.stream=t,n}}function gm(){}function _m(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),null!=r&&e.clipExtent(null),Kh(n,e.stream(Ad)),t(Ad.result()),null!=r&&e.clipExtent(r),e}function bm(e,t,n){return _m(e,(function(n){var r=t[1][0]-t[0][0],i=t[1][1]-t[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),s=+t[0][0]+(r-o*(n[1][0]+n[0][0]))/2,a=+t[0][1]+(i-o*(n[1][1]+n[0][1]))/2;e.scale(150*o).translate([s,a])}),n)}function wm(e,t,n){return bm(e,[[0,0],t],n)}function xm(e,t,n){return _m(e,(function(n){var r=+t,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,s=-i*n[0][1];e.scale(150*i).translate([o,s])}),n)}function km(e,t,n){return _m(e,(function(n){var r=+t,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],s=(r-i*(n[1][1]+n[0][1]))/2;e.scale(150*i).translate([o,s])}),n)}gm.prototype={constructor:gm,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var Em=16,Sm=Th(30*xh);function Tm(e,t){return+t?function(e,t){function n(r,i,o,s,a,u,c,l,h,f,p,d,m,y){var v=c-r,g=l-i,_=v*v+g*g;if(_>4*t&&m--){var b=s+f,w=a+p,x=u+d,k=Ih(b*b+w*w+x*x),E=jh(x/=k),S=kh(kh(x)-1)t||kh((v*N+g*P)/_-.5)>.3||s*f+a*p+u*d2?e[2]%360*xh:0,N()):[y*wh,v*wh,g*wh]},A.angle=function(e){return arguments.length?(_=e%360*xh,N()):_*wh},A.reflectX=function(e){return arguments.length?(b=e?-1:1,N()):b<0},A.reflectY=function(e){return arguments.length?(w=e?-1:1,N()):w<0},A.precision=function(e){return arguments.length?(s=Tm(a,T=e*e),P()):Ih(T)},A.fitExtent=function(e,t){return bm(A,e,t)},A.fitSize=function(e,t){return wm(A,e,t)},A.fitWidth=function(e,t){return xm(A,e,t)},A.fitHeight=function(e,t){return km(A,e,t)},function(){return t=e.apply(this,arguments),A.invert=t.invert&&O,N()}}function Cm(e){var t=0,n=vh/3,r=Pm(e),i=r(t,n);return i.parallels=function(e){return arguments.length?r(t=e[0]*xh,n=e[1]*xh):[t*wh,n*wh]},i}function Rm(e,t){var n=Rh(e),r=(n+Rh(t))/2;if(kh(r)=.12&&i<.234&&r>=-.425&&r<-.214?a:i>=.166&&i<.234&&r>=-.214&&r<-.115?u:s).invert(e)},l.stream=function(n){return e&&t===n?e:(r=[s.stream(t=n),a.stream(n),u.stream(n)],i=r.length,e={point:function(e,t){for(var n=-1;++n0?t<-gh+mh&&(t=-gh+mh):t>gh-mh&&(t=gh-mh);var n=i/Ch(Km(t),r);return[n*Rh(r*e),i-n*Th(r*e)]}return o.invert=function(e,t){var n=i-t,o=Lh(r)*Ih(e*e+n*n),s=Sh(e,kh(n))*Lh(n);return n*r<0&&(s-=vh*Lh(e)*Lh(n)),[s/r,2*Eh(Ch(i/o,1/r))-gh]},o}function Wm(){return Cm(Hm).scale(109.5).parallels([30,30])}function Gm(e,t){return[e,t]}function Ym(){return Nm(Gm).scale(152.63)}function Qm(e,t){var n=Th(e),r=e===t?Rh(e):(n-Th(t))/(t-e),i=n/r+e;if(kh(r)2?e[2]+90:90]):[(e=n())[0],e[1],e[2]-90]},n([0,0,90]).scale(159.155)}function yy(e,t){return e.parent===t.parent?1:2}function vy(e,t){return e+t.x}function gy(e,t){return Math.max(e,t.y)}function _y(){var e=yy,t=1,n=1,r=!1;function i(i){var o,s=0;i.eachAfter((function(t){var n=t.children;n?(t.x=function(e){return e.reduce(vy,0)/e.length}(n),t.y=function(e){return 1+e.reduce(gy,0)}(n)):(t.x=o?s+=e(t,o):0,t.y=0,o=t)}));var a=function(e){for(var t;t=e.children;)e=t[0];return e}(i),u=function(e){for(var t;t=e.children;)e=t[t.length-1];return e}(i),c=a.x-e(a,u)/2,l=u.x+e(u,a)/2;return i.eachAfter(r?function(e){e.x=(e.x-i.x)*t,e.y=(i.y-e.y)*n}:function(e){e.x=(e.x-c)/(l-c)*t,e.y=(1-(i.y?e.y/i.y:1))*n})}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i}function by(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function wy(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=ky)):void 0===t&&(t=xy);for(var n,r,i,o,s,a=new Ty(e),u=[a];n=u.pop();)if((i=t(n.data))&&(s=(i=Array.from(i)).length))for(n.children=i,o=s-1;o>=0;--o)u.push(r=i[o]=new Ty(i[o])),r.parent=n,r.depth=n.depth+1;return a.eachBefore(Sy)}function xy(e){return e.children}function ky(e){return Array.isArray(e)?e[1]:null}function Ey(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function Sy(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Ty(e){this.data=e,this.depth=this.height=0,this.parent=null}function Ay(e){return null==e?null:Oy(e)}function Oy(e){if("function"!=typeof e)throw new Error;return e}function Ny(){return 0}function Py(e){return function(){return e}}ry.invert=function(e,t){for(var n,r=t,i=r*r,o=i*i*i,s=0;s<12&&(o=(i=(r-=n=(r*(Zm+Jm*i+o*(ey+ty*i))-t)/(Zm+3*Jm*i+o*(7*ey+9*ty*i)))*r)*i*i,!(kh(n)mh&&--i>0);return[e/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]},ly.invert=jm(jh),fy.invert=jm((function(e){return 2*Eh(e)})),dy.invert=function(e,t){return[-t,2*Eh(Oh(e))-gh]},Ty.prototype=wy.prototype={constructor:Ty,count:function(){return this.eachAfter(by)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,o=this,s=[o],a=[],u=-1;o=s.pop();)if(a.push(o),n=o.children)for(r=0,i=n.length;r=0;--r)o.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return wy(this).eachBefore(Ey)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n(e=(Cy*e+Ry)%Ly)/Ly}function Dy(e){return My(e,Iy())}function My(e,t){for(var n,r,i=0,o=(e=function(e,t){let n,r,i=e.length;for(;i;)r=t()*i--|0,n=e[i],e[i]=e[r],e[r]=n;return e}(Array.from(e),t)).length,s=[];i0&&n*n>r*r+i*i}function Uy(e,t){for(var n=0;n1e-6?(A+Math.sqrt(A*A-4*T*O))/(2*T):O/A);return{x:r+x+k*N,y:i+E+S*N,r:N}}function qy(e,t,n){var r,i,o,s,a=e.x-t.x,u=e.y-t.y,c=a*a+u*u;c?(i=t.r+n.r,i*=i,s=e.r+n.r,i>(s*=s)?(r=(c+s-i)/(2*c),o=Math.sqrt(Math.max(0,s/c-r*r)),n.x=e.x-r*a-o*u,n.y=e.y-r*u+o*a):(r=(c+i-s)/(2*c),o=Math.sqrt(Math.max(0,i/c-r*r)),n.x=t.x+r*a-o*u,n.y=t.y+r*u+o*a)):(n.x=t.x+n.r,n.y=t.y)}function Ky(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function Hy(e){var t=e._,n=e.next._,r=t.r+n.r,i=(t.x*n.r+n.x*t.r)/r,o=(t.y*n.r+n.y*t.r)/r;return i*i+o*o}function Wy(e){this._=e,this.next=null,this.previous=null}function Gy(e,t){if(!(s=(n=e,e="object"==typeof n&&"length"in n?n:Array.from(n)).length))return 0;var n,r,i,o,s,a,u,c,l,h,f,p;if((r=e[0]).x=0,r.y=0,!(s>1))return r.r;if(i=e[1],r.x=-i.r,i.x=r.r,i.y=0,!(s>2))return r.r+i.r;qy(i,r,o=e[2]),r=new Wy(r),i=new Wy(i),o=new Wy(o),r.next=o.previous=i,i.next=r.previous=o,o.next=i.previous=r;e:for(c=3;cfunction(e){let t=(e=`${e}`).length;return hv(e,t-1)&&!hv(e,t-2)&&(e=e.slice(0,-1)),"/"===e[0]?e:`/${e}`}(e(t,n,r)))),n=t.map(lv),i=new Set(t).add("");for(const e of n)i.has(e)||(i.add(e),t.push(e),n.push(lv(e)),f.push(sv));p=(e,n)=>t[n],d=(e,t)=>n[t]}for(s=0,i=f.length;s=0&&(c=f[e]).data===sv;--e)c.data=null}if(a.parent=iv,a.eachBefore((function(e){e.depth=e.parent.depth+1,--i})).eachBefore(Sy),a.parent=null,i>0)throw new Error("cycle");return a}return r.id=function(e){return arguments.length?(t=Ay(e),r):t},r.parentId=function(e){return arguments.length?(n=Ay(e),r):n},r.path=function(t){return arguments.length?(e=Ay(t),r):e},r}function lv(e){let t=e.length;if(t<2)return"";for(;--t>1&&!hv(e,t););return e.slice(0,t)}function hv(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if(!(1&n))return!0}return!1}function fv(e,t){return e.parent===t.parent?1:2}function pv(e){var t=e.children;return t?t[0]:e.t}function dv(e){var t=e.children;return t?t[t.length-1]:e.t}function mv(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function yv(e,t,n){return e.a.parent===t.parent?e.a:n}function vv(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}function gv(){var e=fv,t=1,n=1,r=null;function i(i){var u=function(e){for(var t,n,r,i,o,s=new vv(e,0),a=[s];t=a.pop();)if(r=t._.children)for(t.children=new Array(o=r.length),i=o-1;i>=0;--i)a.push(n=t.children[i]=new vv(r[i],i)),n.parent=t;return(s.parent=new vv(null,0)).children=[s],s}(i);if(u.eachAfter(o),u.parent.m=-u.z,u.eachBefore(s),r)i.eachBefore(a);else{var c=i,l=i,h=i;i.eachBefore((function(e){e.xl.x&&(l=e),e.depth>h.depth&&(h=e)}));var f=c===l?1:e(c,l)/2,p=f-c.x,d=t/(l.x+f+p),m=n/(h.depth||1);i.eachBefore((function(e){e.x=(e.x+p)*d,e.y=e.depth*m}))}return i}function o(t){var n=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(n){!function(e){for(var t,n=0,r=0,i=e.children,o=i.length;--o>=0;)(t=i[o]).z+=n,t.m+=n,n+=t.s+(r+=t.c)}(t);var o=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-o):t.z=o}else i&&(t.z=i.z+e(t._,i._));t.parent.A=function(t,n,r){if(n){for(var i,o=t,s=t,a=n,u=o.parent.children[0],c=o.m,l=s.m,h=a.m,f=u.m;a=dv(a),o=pv(o),a&&o;)u=pv(u),(s=dv(s)).a=t,(i=a.z+h-o.z-c+e(a._,o._))>0&&(mv(yv(a,t,r),t,i),c+=i,l+=i),h+=a.m,c+=o.m,f+=u.m,l+=s.m;a&&!dv(s)&&(s.t=a,s.m+=h-l),o&&!pv(u)&&(u.t=o,u.m+=c-f,r=t)}return r}(t,i,t.parent.A||r[0])}function s(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function a(e){e.x*=t,e.y=e.depth*n}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i}function _v(e,t,n,r,i){for(var o,s=e.children,a=-1,u=s.length,c=e.value&&(i-n)/e.value;++af&&(f=a),y=l*l*m,(p=Math.max(f/y,y/h))>d){l-=a;break}d=p}v.push(s={value:l,dice:u1?t:1)},n}(bv);function kv(){var e=xv,t=!1,n=1,r=1,i=[0],o=Ny,s=Ny,a=Ny,u=Ny,c=Ny;function l(e){return e.x0=e.y0=0,e.x1=n,e.y1=r,e.eachBefore(h),i=[0],t&&e.eachBefore(tv),e}function h(t){var n=i[t.depth],r=t.x0+n,l=t.y0+n,h=t.x1-n,f=t.y1-n;h=n-1){var l=a[t];return l.x0=i,l.y0=o,l.x1=s,void(l.y1=u)}for(var h=c[t],f=r/2+h,p=t+1,d=n-1;p>>1;c[m]u-o){var g=r?(i*v+s*y)/r:s;e(t,p,y,i,o,g,u),e(p,n,v,g,o,s,u)}else{var _=r?(o*v+u*y)/r:u;e(t,p,y,i,o,s,_),e(p,n,v,i,_,s,u)}}(0,u,e.value,t,n,r,i)}function Sv(e,t,n,r,i){(1&e.depth?_v:nv)(e,t,n,r,i)}const Tv=function e(t){function n(e,n,r,i,o){if((s=e._squarify)&&s.ratio===t)for(var s,a,u,c,l,h=-1,f=s.length,p=e.value;++h1?t:1)},n}(bv);function Av(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}function Ov(e,t){var n=ki(+e,+t);return function(e){var t=n(e);return t-360*Math.floor(t/360)}}function Nv(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Pv(e){return((e=Math.exp(e))+1/e)/2}const Cv=function e(t,n,r){function i(e,i){var o,s,a=e[0],u=e[1],c=e[2],l=i[0],h=i[1],f=i[2],p=l-a,d=h-u,m=p*p+d*d;if(m<1e-12)s=Math.log(f/c)/t,o=function(e){return[a+e*p,u+e*d,c*Math.exp(t*e*s)]};else{var y=Math.sqrt(m),v=(f*f-c*c+r*m)/(2*c*n*y),g=(f*f-c*c-r*m)/(2*f*n*y),_=Math.log(Math.sqrt(v*v+1)-v),b=Math.log(Math.sqrt(g*g+1)-g);s=(b-_)/t,o=function(e){var r,i=e*s,o=Pv(_),l=c/(n*y)*(o*(r=t*i+_,((r=Math.exp(2*r))-1)/(r+1))-function(e){return((e=Math.exp(e))-1/e)/2}(_));return[a+l*p,u+l*d,c*o/Pv(t*i+_)]}}return o.duration=1e3*s*t/Math.SQRT2,o}return i.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},i}(Math.SQRT2,2,4);function Rv(e){return function(t,n){var r=e((t=pi(t)).h,(n=pi(n)).h),i=Ei(t.s,n.s),o=Ei(t.l,n.l),s=Ei(t.opacity,n.opacity);return function(e){return t.h=r(e),t.s=i(e),t.l=o(e),t.opacity=s(e),t+""}}}const Lv=Rv(ki);var Iv=Rv(Ei);function Dv(e,t){var n=Ei((e=Sa(e)).l,(t=Sa(t)).l),r=Ei(e.a,t.a),i=Ei(e.b,t.b),o=Ei(e.opacity,t.opacity);return function(t){return e.l=n(t),e.a=r(t),e.b=i(t),e.opacity=o(t),e+""}}function Mv(e){return function(t,n){var r=e((t=La(t)).h,(n=La(n)).h),i=Ei(t.c,n.c),o=Ei(t.l,n.l),s=Ei(t.opacity,n.opacity);return function(e){return t.h=r(e),t.c=i(e),t.l=o(e),t.opacity=s(e),t+""}}}const jv=Mv(ki);var Fv=Mv(Ei);function Bv(e){return function t(n){function r(t,r){var i=e((t=qa(t)).h,(r=qa(r)).h),o=Ei(t.s,r.s),s=Ei(t.l,r.l),a=Ei(t.opacity,r.opacity);return function(e){return t.h=i(e),t.s=o(e),t.l=s(Math.pow(e,n)),t.opacity=a(e),t+""}}return n=+n,r.gamma=t,r}(1)}const Uv=Bv(ki);var zv=Bv(Ei);function Vv(e,t){void 0===t&&(t=e,e=Bi);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n1&&Hv(e[n[i-2]],e[n[i-1]],e[r])<=0;)--i;n[i++]=r}return n.slice(0,i)}function Yv(e){if((n=e.length)<3)return null;var t,n,r=new Array(n),i=new Array(n);for(t=0;t=0;--t)c.push(e[r[o[t]][2]]);for(t=+a;ta!=c>a&&s<(u-n)*(a-r)/(c-r)+n&&(l=!l),u=n,c=r;return l}function Xv(e){for(var t,n,r=-1,i=e.length,o=e[i-1],s=o[0],a=o[1],u=0;++r1);return e+n*o*Math.sqrt(-2*Math.log(i)/i)}}return n.source=e,n}(Zv),ng=function e(t){var n=tg.source(t);function r(){var e=n.apply(this,arguments);return function(){return Math.exp(e())}}return r.source=e,r}(Zv),rg=function e(t){function n(e){return(e=+e)<=0?()=>0:function(){for(var n=0,r=e;r>1;--r)n+=t();return n+r*t()}}return n.source=e,n}(Zv),ig=function e(t){var n=rg.source(t);function r(e){if(0==(e=+e))return t;var r=n(e);return function(){return r()/e}}return r.source=e,r}(Zv),og=function e(t){function n(e){return function(){return-Math.log1p(-t())/e}}return n.source=e,n}(Zv),sg=function e(t){function n(e){if((e=+e)<0)throw new RangeError("invalid alpha");return e=1/-e,function(){return Math.pow(1-t(),e)}}return n.source=e,n}(Zv),ag=function e(t){function n(e){if((e=+e)<0||e>1)throw new RangeError("invalid p");return function(){return Math.floor(t()+e)}}return n.source=e,n}(Zv),ug=function e(t){function n(e){if((e=+e)<0||e>1)throw new RangeError("invalid p");return 0===e?()=>1/0:1===e?()=>1:(e=Math.log1p(-e),function(){return 1+Math.floor(Math.log1p(-t())/e)})}return n.source=e,n}(Zv),cg=function e(t){var n=tg.source(t)();function r(e,r){if((e=+e)<0)throw new RangeError("invalid k");if(0===e)return()=>0;if(r=null==r?1:+r,1===e)return()=>-Math.log1p(-t())*r;var i=(e<1?e+1:e)-1/3,o=1/(3*Math.sqrt(i)),s=e<1?()=>Math.pow(t(),1/e):()=>1;return function(){do{do{var e=n(),a=1+o*e}while(a<=0);a*=a*a;var u=1-t()}while(u>=1-.0331*e*e*e*e&&Math.log(u)>=.5*e*e+i*(1-a+Math.log(a)));return i*a*s()*r}}return r.source=e,r}(Zv),lg=function e(t){var n=cg.source(t);function r(e,t){var r=n(e),i=n(t);return function(){var e=r();return 0===e?0:e/(e+i())}}return r.source=e,r}(Zv),hg=function e(t){var n=ug.source(t),r=lg.source(t);function i(e,t){return e=+e,(t=+t)>=1?()=>e:t<=0?()=>0:function(){for(var i=0,o=e,s=t;o*s>16&&o*(1-s)>16;){var a=Math.floor((o+1)*s),u=r(a,o-a+1)();u<=s?(i+=a,o-=a,s=(s-u)/(1-u)):(o=a-1,s/=u)}for(var c=s<.5,l=n(c?s:1-s),h=l(),f=0;h<=o;++f)h+=l();return i+(c?f:o-f)}}return i.source=e,i}(Zv),fg=function e(t){function n(e,n,r){var i;return 0==(e=+e)?i=e=>-Math.log(e):(e=1/e,i=t=>Math.pow(t,e)),n=null==n?0:+n,r=null==r?1:+r,function(){return n+r*i(-Math.log1p(-t()))}}return n.source=e,n}(Zv),pg=function e(t){function n(e,n){return e=null==e?0:+e,n=null==n?1:+n,function(){return e+n*Math.tan(Math.PI*t())}}return n.source=e,n}(Zv),dg=function e(t){function n(e,n){return e=null==e?0:+e,n=null==n?1:+n,function(){var r=t();return e+n*Math.log(r/(1-r))}}return n.source=e,n}(Zv),mg=function e(t){var n=cg.source(t),r=hg.source(t);function i(e){return function(){for(var i=0,o=e;o>16;){var s=Math.floor(.875*o),a=n(s)();if(a>o)return i+r(s-1,o/a)();i+=s,o-=a}for(var u=-Math.log1p(-t()),c=0;u<=o;++c)u-=Math.log1p(-t());return i+c}}return i.source=e,i}(Zv),yg=1664525,vg=1013904223,gg=1/4294967296;function _g(e=Math.random()){let t=0|(0<=e&&e<1?e/gg:Math.abs(e));return()=>(t=yg*t+vg|0,gg*(t>>>0))}function bg(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function wg(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}const xg=Symbol("implicit");function kg(){var e=new be,t=[],n=[],r=xg;function i(i){let o=e.get(i);if(void 0===o){if(r!==xg)return r;e.set(i,o=t.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new be;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return kg(t,n).unknown(r)},bg.apply(i,arguments),i}function Eg(){var e,t,n=kg().unknown(void 0),r=n.domain,i=n.range,o=0,s=1,a=!1,u=0,c=0,l=.5;function h(){var n=r().length,h=st&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(s[0],s[e-1])),r=e>2?Rg:Cg,i=o=null,h}function h(t){return null==t||isNaN(t=+t)?n:(i||(i=r(s.map(e),a,u)))(e(c(t)))}return h.invert=function(n){return c(t((o||(o=r(a,s.map(e),Ii)))(n)))},h.domain=function(e){return arguments.length?(s=Array.from(e,Ag),l()):s.slice()},h.range=function(e){return arguments.length?(a=Array.from(e),l()):a.slice()},h.rangeRound=function(e){return a=Array.from(e),u=Nv,l()},h.clamp=function(e){return arguments.length?(c=!!e||Ng,l()):c!==Ng},h.interpolate=function(e){return arguments.length?(u=e,l()):u},h.unknown=function(e){return arguments.length?(n=e,h):n},function(n,r){return e=n,t=r,l()}}function Dg(){return Ig()(Ng,Ng)}function Mg(e,t,n,r){var i,o=Ze(e,t,n);switch((r=eh(null==r?",f":r)).type){case"s":var s=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=ph(o,s))||(r.precision=i),ah(r,s);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=dh(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=fh(o))||(r.precision=i-2*("%"===r.type))}return sh(r)}function jg(e){var t=e.domain;return e.ticks=function(e){var n=t();return Qe(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return Mg(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i,o=t(),s=0,a=o.length-1,u=o[s],c=o[a],l=10;for(c0;){if((i=Xe(u,c,n))===r)return o[s]=u,o[a]=c,t(o);if(i>0)u=Math.floor(u/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;u=Math.ceil(u*i)/i,c=Math.floor(c*i)/i}r=i}return e},e}function Fg(){var e=Dg();return e.copy=function(){return Lg(e,Fg())},bg.apply(e,arguments),jg(e)}function Bg(e){var t;function n(e){return null==e||isNaN(e=+e)?t:e}return n.invert=n,n.domain=n.range=function(t){return arguments.length?(e=Array.from(t,Ag),n):e.slice()},n.unknown=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return Bg(e).unknown(t)},e=arguments.length?Array.from(e,Ag):[0,1],jg(n)}function Ug(e,t){var n,r=0,i=(e=e.slice()).length-1,o=e[r],s=e[i];return s-e(-t,n)}function Wg(e){const t=e(zg,Vg),n=t.domain;let r,i,o=10;function s(){return r=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}(o),i=function(e){return 10===e?Kg:e===Math.E?Math.exp:t=>Math.pow(e,t)}(o),n()[0]<0?(r=Hg(r),i=Hg(i),e($g,qg)):e(zg,Vg),t}return t.base=function(e){return arguments.length?(o=+e,s()):o},t.domain=function(e){return arguments.length?(n(e),s()):n()},t.ticks=e=>{const t=n();let s=t[0],a=t[t.length-1];const u=a0){for(;h<=f;++h)for(c=1;ca)break;d.push(l)}}else for(;h<=f;++h)for(c=o-1;c>=1;--c)if(l=h>0?c/i(-h):c*i(h),!(la)break;d.push(l)}2*d.length{if(null==e&&(e=10),null==n&&(n=10===o?"s":","),"function"!=typeof n&&(o%1||null!=(n=eh(n)).precision||(n.trim=!0),n=sh(n)),e===1/0)return n;const s=Math.max(1,o*e/t.ticks().length);return e=>{let t=e/i(Math.round(r(e)));return t*on(Ug(n(),{floor:e=>i(Math.floor(r(e))),ceil:e=>i(Math.ceil(r(e)))})),t}function Gg(){const e=Wg(Ig()).domain([1,10]);return e.copy=()=>Lg(e,Gg()).base(e.base()),bg.apply(e,arguments),e}function Yg(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Qg(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Xg(e){var t=1,n=e(Yg(t),Qg(t));return n.constant=function(n){return arguments.length?e(Yg(t=+n),Qg(t)):t},jg(n)}function Zg(){var e=Xg(Ig());return e.copy=function(){return Lg(e,Zg()).constant(e.constant())},bg.apply(e,arguments)}function Jg(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function e_(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function t_(e){return e<0?-e*e:e*e}function n_(e){var t=e(Ng,Ng),n=1;return t.exponent=function(t){return arguments.length?1==(n=+t)?e(Ng,Ng):.5===n?e(e_,t_):e(Jg(n),Jg(1/n)):n},jg(t)}function r_(){var e=n_(Ig());return e.copy=function(){return Lg(e,r_()).exponent(e.exponent())},bg.apply(e,arguments),e}function i_(){return r_.apply(null,arguments).exponent(.5)}function o_(e){return Math.sign(e)*e*e}function s_(){var e,t=Dg(),n=[0,1],r=!1;function i(n){var i=function(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}(t(n));return isNaN(i)?e:r?Math.round(i):i}return i.invert=function(e){return t.invert(o_(e))},i.domain=function(e){return arguments.length?(t.domain(e),i):t.domain()},i.range=function(e){return arguments.length?(t.range((n=Array.from(e,Ag)).map(o_)),i):n.slice()},i.rangeRound=function(e){return i.range(e).round(!0)},i.round=function(e){return arguments.length?(r=!!e,i):r},i.clamp=function(e){return arguments.length?(t.clamp(e),i):t.clamp()},i.unknown=function(t){return arguments.length?(e=t,i):e},i.copy=function(){return s_(t.domain(),n).round(r).clamp(t.clamp()).unknown(e)},bg.apply(i,arguments),jg(i)}function a_(){var e,t=[],n=[],r=[];function i(){var e=0,i=Math.max(1,n.length);for(r=new Array(i-1);++e0?r[i-1]:t[0],i=r?[i[r-1],n]:[i[s-1],i[s]]},s.unknown=function(t){return arguments.length?(e=t,s):s},s.thresholds=function(){return i.slice()},s.copy=function(){return u_().domain([t,n]).range(o).unknown(e)},bg.apply(jg(s),arguments)}function c_(){var e,t=[.5],n=[0,1],r=1;function i(i){return null!=i&&i<=i?n[ee(t,i,0,r)]:e}return i.domain=function(e){return arguments.length?(t=Array.from(e),r=Math.min(t.length,n.length-1),i):t.slice()},i.range=function(e){return arguments.length?(n=Array.from(e),r=Math.min(t.length,n.length-1),i):n.slice()},i.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},i.unknown=function(t){return arguments.length?(e=t,i):e},i.copy=function(){return c_().domain(t).range(n).unknown(e)},bg.apply(i,arguments)}const l_=1e3,h_=6e4,f_=36e5,p_=864e5,d_=6048e5,m_=31536e6,y_=new Date,v_=new Date;function g_(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{const t=i(e),n=i.ceil(e);return e-t(t(e=new Date(+e),null==n?1:Math.floor(n)),e),i.range=(n,r,o)=>{const s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n0))return s;let a;do{s.push(a=new Date(+n)),t(n,o),e(n)}while(ag_((t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),((e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})),n&&(i.count=(t,r)=>(y_.setTime(+t),v_.setTime(+r),e(y_),e(v_),Math.floor(n(y_,v_))),i.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?t=>r(t)%e==0:t=>i.count(0,t)%e==0):i:null)),i}const __=g_((()=>{}),((e,t)=>{e.setTime(+e+t)}),((e,t)=>t-e));__.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?g_((t=>{t.setTime(Math.floor(t/e)*e)}),((t,n)=>{t.setTime(+t+n*e)}),((t,n)=>(n-t)/e)):__:null);const b_=__.range,w_=g_((e=>{e.setTime(e-e.getMilliseconds())}),((e,t)=>{e.setTime(+e+t*l_)}),((e,t)=>(t-e)/l_),(e=>e.getUTCSeconds())),x_=w_.range,k_=g_((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*l_)}),((e,t)=>{e.setTime(+e+t*h_)}),((e,t)=>(t-e)/h_),(e=>e.getMinutes())),E_=k_.range,S_=g_((e=>{e.setUTCSeconds(0,0)}),((e,t)=>{e.setTime(+e+t*h_)}),((e,t)=>(t-e)/h_),(e=>e.getUTCMinutes())),T_=S_.range,A_=g_((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*l_-e.getMinutes()*h_)}),((e,t)=>{e.setTime(+e+t*f_)}),((e,t)=>(t-e)/f_),(e=>e.getHours())),O_=A_.range,N_=g_((e=>{e.setUTCMinutes(0,0,0)}),((e,t)=>{e.setTime(+e+t*f_)}),((e,t)=>(t-e)/f_),(e=>e.getUTCHours())),P_=N_.range,C_=g_((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*h_)/p_),(e=>e.getDate()-1)),R_=C_.range,L_=g_((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/p_),(e=>e.getUTCDate()-1)),I_=L_.range,D_=g_((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/p_),(e=>Math.floor(e/p_))),M_=D_.range;function j_(e){return g_((t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),((e,t)=>{e.setDate(e.getDate()+7*t)}),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*h_)/d_))}const F_=j_(0),B_=j_(1),U_=j_(2),z_=j_(3),V_=j_(4),$_=j_(5),q_=j_(6),K_=F_.range,H_=B_.range,W_=U_.range,G_=z_.range,Y_=V_.range,Q_=$_.range,X_=q_.range;function Z_(e){return g_((t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)}),((e,t)=>(t-e)/d_))}const J_=Z_(0),eb=Z_(1),tb=Z_(2),nb=Z_(3),rb=Z_(4),ib=Z_(5),ob=Z_(6),sb=J_.range,ab=eb.range,ub=tb.range,cb=nb.range,lb=rb.range,hb=ib.range,fb=ob.range,pb=g_((e=>{e.setDate(1),e.setHours(0,0,0,0)}),((e,t)=>{e.setMonth(e.getMonth()+t)}),((e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())),(e=>e.getMonth())),db=pb.range,mb=g_((e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)}),((e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())),(e=>e.getUTCMonth())),yb=mb.range,vb=g_((e=>{e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,t)=>{e.setFullYear(e.getFullYear()+t)}),((e,t)=>t.getFullYear()-e.getFullYear()),(e=>e.getFullYear()));vb.every=e=>isFinite(e=Math.floor(e))&&e>0?g_((t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n*e)})):null;const gb=vb.range,_b=g_((e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)}),((e,t)=>t.getUTCFullYear()-e.getUTCFullYear()),(e=>e.getUTCFullYear()));_b.every=e=>isFinite(e=Math.floor(e))&&e>0?g_((t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null;const bb=_b.range;function wb(e,t,n,r,i,o){const s=[[w_,1,l_],[w_,5,5e3],[w_,15,15e3],[w_,30,3e4],[o,1,h_],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,f_],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,p_],[r,2,1728e5],[n,1,d_],[t,1,2592e6],[t,3,7776e6],[e,1,m_]];function a(t,n,r){const i=Math.abs(n-t)/r,o=W((([,,e])=>e)).right(s,i);if(o===s.length)return e.every(Ze(t/m_,n/m_,r));if(0===o)return __.every(Math.max(Ze(t,n,r),1));const[a,u]=s[i/s[o-1][2]=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:Qw,s:Xw,S:vw,u:gw,U:_w,V:ww,w:xw,W:kw,x:null,X:null,y:Ew,Y:Tw,Z:Ow,"%":Yw},b={a:function(e){return s[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return u[e.getUTCMonth()]},B:function(e){return a[e.getUTCMonth()]},c:null,d:Nw,e:Nw,f:Iw,g:Kw,G:Ww,H:Pw,I:Cw,j:Rw,L:Lw,m:Dw,M:Mw,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:Qw,s:Xw,S:jw,u:Fw,U:Bw,V:zw,w:Vw,W:$w,x:null,X:null,y:qw,Y:Hw,Z:Gw,"%":Yw},w={a:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=d.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=v.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return E(e,t,n,r)},d:Jb,e:Jb,f:ow,g:Yb,G:Gb,H:tw,I:tw,j:ew,L:iw,m:Zb,M:nw,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=l.get(r[0].toLowerCase()),n+r[0].length):-1},q:Xb,Q:aw,s:uw,S:rw,u:qb,U:Kb,V:Hb,w:$b,W:Wb,x:function(e,t,r){return E(e,n,t,r)},X:function(e,t,n){return E(e,r,t,n)},y:Yb,Y:Gb,Z:Qb,"%":sw};function x(e,t){return function(n){var r,i,o,s=[],a=-1,u=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++a53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Ab(Ob(o.y,0,1))).getUTCDay(),r=i>4||0===i?eb.ceil(r):eb(r),r=L_.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=Tb(Ob(o.y,0,1))).getDay(),r=i>4||0===i?B_.ceil(r):B_(r),r=C_.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Ab(Ob(o.y,0,1)).getUTCDay():Tb(Ob(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Ab(o)):Tb(o)}}function E(e,t,n,r){for(var i,o,s=0,a=t.length,u=n.length;s=u)return-1;if(37===(i=t.charCodeAt(s++))){if(i=t.charAt(s++),!(o=w[i in Db?t.charAt(s++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return _.x=x(n,_),_.X=x(r,_),_.c=x(t,_),b.x=x(n,b),b.X=x(r,b),b.c=x(t,b),{format:function(e){var t=x(e+="",_);return t.toString=function(){return e},t},parse:function(e){var t=k(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=x(e+="",b);return t.toString=function(){return e},t},utcParse:function(e){var t=k(e+="",!0);return t.toString=function(){return e},t}}}var Pb,Cb,Rb,Lb,Ib,Db={"-":"",_:" ",0:"0"},Mb=/^\s*\d+/,jb=/^%/,Fb=/[\\^$*+?|[\]().{}]/g;function Bb(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o[e.toLowerCase(),t])))}function $b(e,t,n){var r=Mb.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function qb(e,t,n){var r=Mb.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Kb(e,t,n){var r=Mb.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Hb(e,t,n){var r=Mb.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Wb(e,t,n){var r=Mb.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Gb(e,t,n){var r=Mb.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Yb(e,t,n){var r=Mb.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Qb(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Xb(e,t,n){var r=Mb.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function Zb(e,t,n){var r=Mb.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Jb(e,t,n){var r=Mb.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function ew(e,t,n){var r=Mb.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function tw(e,t,n){var r=Mb.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function nw(e,t,n){var r=Mb.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function rw(e,t,n){var r=Mb.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function iw(e,t,n){var r=Mb.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function ow(e,t,n){var r=Mb.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function sw(e,t,n){var r=jb.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function aw(e,t,n){var r=Mb.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function uw(e,t,n){var r=Mb.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function cw(e,t){return Bb(e.getDate(),t,2)}function lw(e,t){return Bb(e.getHours(),t,2)}function hw(e,t){return Bb(e.getHours()%12||12,t,2)}function fw(e,t){return Bb(1+C_.count(vb(e),e),t,3)}function pw(e,t){return Bb(e.getMilliseconds(),t,3)}function dw(e,t){return pw(e,t)+"000"}function mw(e,t){return Bb(e.getMonth()+1,t,2)}function yw(e,t){return Bb(e.getMinutes(),t,2)}function vw(e,t){return Bb(e.getSeconds(),t,2)}function gw(e){var t=e.getDay();return 0===t?7:t}function _w(e,t){return Bb(F_.count(vb(e)-1,e),t,2)}function bw(e){var t=e.getDay();return t>=4||0===t?V_(e):V_.ceil(e)}function ww(e,t){return e=bw(e),Bb(V_.count(vb(e),e)+(4===vb(e).getDay()),t,2)}function xw(e){return e.getDay()}function kw(e,t){return Bb(B_.count(vb(e)-1,e),t,2)}function Ew(e,t){return Bb(e.getFullYear()%100,t,2)}function Sw(e,t){return Bb((e=bw(e)).getFullYear()%100,t,2)}function Tw(e,t){return Bb(e.getFullYear()%1e4,t,4)}function Aw(e,t){var n=e.getDay();return Bb((e=n>=4||0===n?V_(e):V_.ceil(e)).getFullYear()%1e4,t,4)}function Ow(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Bb(t/60|0,"0",2)+Bb(t%60,"0",2)}function Nw(e,t){return Bb(e.getUTCDate(),t,2)}function Pw(e,t){return Bb(e.getUTCHours(),t,2)}function Cw(e,t){return Bb(e.getUTCHours()%12||12,t,2)}function Rw(e,t){return Bb(1+L_.count(_b(e),e),t,3)}function Lw(e,t){return Bb(e.getUTCMilliseconds(),t,3)}function Iw(e,t){return Lw(e,t)+"000"}function Dw(e,t){return Bb(e.getUTCMonth()+1,t,2)}function Mw(e,t){return Bb(e.getUTCMinutes(),t,2)}function jw(e,t){return Bb(e.getUTCSeconds(),t,2)}function Fw(e){var t=e.getUTCDay();return 0===t?7:t}function Bw(e,t){return Bb(J_.count(_b(e)-1,e),t,2)}function Uw(e){var t=e.getUTCDay();return t>=4||0===t?rb(e):rb.ceil(e)}function zw(e,t){return e=Uw(e),Bb(rb.count(_b(e),e)+(4===_b(e).getUTCDay()),t,2)}function Vw(e){return e.getUTCDay()}function $w(e,t){return Bb(eb.count(_b(e)-1,e),t,2)}function qw(e,t){return Bb(e.getUTCFullYear()%100,t,2)}function Kw(e,t){return Bb((e=Uw(e)).getUTCFullYear()%100,t,2)}function Hw(e,t){return Bb(e.getUTCFullYear()%1e4,t,4)}function Ww(e,t){var n=e.getUTCDay();return Bb((e=n>=4||0===n?rb(e):rb.ceil(e)).getUTCFullYear()%1e4,t,4)}function Gw(){return"+0000"}function Yw(){return"%"}function Qw(e){return+e}function Xw(e){return Math.floor(+e/1e3)}function Zw(e){return Pb=Nb(e),Cb=Pb.format,Rb=Pb.parse,Lb=Pb.utcFormat,Ib=Pb.utcParse,Pb}function Jw(e){return new Date(e)}function ex(e){return e instanceof Date?+e:+new Date(+e)}function tx(e,t,n,r,i,o,s,a,u,c){var l=Dg(),h=l.invert,f=l.domain,p=c(".%L"),d=c(":%S"),m=c("%I:%M"),y=c("%I %p"),v=c("%a %d"),g=c("%b %d"),_=c("%B"),b=c("%Y");function w(e){return(u(e)t(r/(e.length-1))))},n.quantiles=function(t){return Array.from({length:t+1},((n,r)=>ct(e,r/t)))},n.copy=function(){return hx(t).domain(e)},wg.apply(n,arguments)}function fx(){var e,t,n,r,i,o,s,a=0,u=.5,c=1,l=1,h=Ng,f=!1;function p(e){return isNaN(e=+e)?s:(e=.5+((e=+o(e))-t)*(l*eAi(e[e.length-1]);var Px=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(gx);const Cx=Nx(Px);var Rx=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(gx);const Lx=Nx(Rx);var Ix=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(gx);const Dx=Nx(Ix);var Mx=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(gx);const jx=Nx(Mx);var Fx=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(gx);const Bx=Nx(Fx);var Ux=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(gx);const zx=Nx(Ux);var Vx=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(gx);const $x=Nx(Vx);var qx=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(gx);const Kx=Nx(qx);var Hx=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(gx);const Wx=Nx(Hx);var Gx=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(gx);const Yx=Nx(Gx);var Qx=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(gx);const Xx=Nx(Qx);var Zx=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(gx);const Jx=Nx(Zx);var ek=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(gx);const tk=Nx(ek);var nk=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(gx);const rk=Nx(nk);var ik=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(gx);const ok=Nx(ik);var sk=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(gx);const ak=Nx(sk);var uk=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(gx);const ck=Nx(uk);var lk=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(gx);const hk=Nx(lk);var fk=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(gx);const pk=Nx(fk);var dk=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(gx);const mk=Nx(dk);var yk=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(gx);const vk=Nx(yk);var gk=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(gx);const _k=Nx(gk);var bk=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(gx);const wk=Nx(bk);var xk=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(gx);const kk=Nx(xk);var Ek=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(gx);const Sk=Nx(Ek);var Tk=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(gx);const Ak=Nx(Tk);var Ok=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(gx);const Nk=Nx(Ok);function Pk(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-2710.57*e)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-67.37*e)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-2475.67*e)))))))+")"}const Ck=zv(qa(300,.5,0),qa(-240,.5,1));var Rk=zv(qa(-100,.75,.35),qa(80,1.5,.8)),Lk=zv(qa(260,.75,.35),qa(80,1.5,.8)),Ik=qa();function Dk(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return Ik.h=360*e-100,Ik.s=1.5-1.5*t,Ik.l=.8-.9*t,Ik+""}var Mk=ii(),jk=Math.PI/3,Fk=2*Math.PI/3;function Bk(e){var t;return e=(.5-e)*Math.PI,Mk.r=255*(t=Math.sin(e))*t,Mk.g=255*(t=Math.sin(e+jk))*t,Mk.b=255*(t=Math.sin(e+Fk))*t,Mk+""}function Uk(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-14825.05*e)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+707.56*e)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-6838.66*e)))))))+")"}function zk(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}const Vk=zk(gx("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var $k=zk(gx("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),qk=zk(gx("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),Kk=zk(gx("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function Hk(e){return Nr(mr(e).call(document.documentElement))}var Wk=0;function Gk(){return new Yk}function Yk(){this._="@"+(++Wk).toString(36)}function Qk(e,t){return e.target&&(e=Ui(e),void 0===t&&(t=e.currentTarget),e=e.touches||[e]),Array.from(e,(e=>zi(e,t)))}function Xk(e){return"string"==typeof e?new Tr([document.querySelectorAll(e)],[document.documentElement]):new Tr([gn(e)],Sr)}function Zk(e){return function(){return e}}Yk.prototype=Gk.prototype={constructor:Yk,get:function(e){for(var t=this._;!(t in e);)if(!(e=e.parentNode))return;return e[t]},set:function(e,t){return e[this._]=t},remove:function(e){return this._ in e&&delete e[this._]},toString:function(){return this._}};const Jk=Math.abs,eE=Math.atan2,tE=Math.cos,nE=Math.max,rE=Math.min,iE=Math.sin,oE=Math.sqrt,sE=1e-12,aE=Math.PI,uE=aE/2,cE=2*aE;function lE(e){return e>=1?uE:e<=-1?-uE:Math.asin(e)}function hE(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new Js(t)}function fE(e){return e.innerRadius}function pE(e){return e.outerRadius}function dE(e){return e.startAngle}function mE(e){return e.endAngle}function yE(e){return e&&e.padAngle}function vE(e,t,n,r,i,o,s){var a=e-n,u=t-r,c=(s?o:-o)/oE(a*a+u*u),l=c*u,h=-c*a,f=e+l,p=t+h,d=n+l,m=r+h,y=(f+d)/2,v=(p+m)/2,g=d-f,_=m-p,b=g*g+_*_,w=i-o,x=f*m-d*p,k=(_<0?-1:1)*oE(nE(0,w*w*b-x*x)),E=(x*_-g*k)/b,S=(-x*g-_*k)/b,T=(x*_+g*k)/b,A=(-x*g+_*k)/b,O=E-y,N=S-v,P=T-y,C=A-v;return O*O+N*N>P*P+C*C&&(E=T,S=A),{cx:E,cy:S,x01:-l,y01:-h,x11:E*(i/w-1),y11:S*(i/w-1)}}function gE(){var e=fE,t=pE,n=Zk(0),r=null,i=dE,o=mE,s=yE,a=null,u=hE(c);function c(){var c,l,h,f=+e.apply(this,arguments),p=+t.apply(this,arguments),d=i.apply(this,arguments)-uE,m=o.apply(this,arguments)-uE,y=Jk(m-d),v=m>d;if(a||(a=c=u()),psE)if(y>cE-sE)a.moveTo(p*tE(d),p*iE(d)),a.arc(0,0,p,d,m,!v),f>sE&&(a.moveTo(f*tE(m),f*iE(m)),a.arc(0,0,f,m,d,v));else{var g,_,b=d,w=m,x=d,k=m,E=y,S=y,T=s.apply(this,arguments)/2,A=T>sE&&(r?+r.apply(this,arguments):oE(f*f+p*p)),O=rE(Jk(p-f)/2,+n.apply(this,arguments)),N=O,P=O;if(A>sE){var C=lE(A/f*iE(T)),R=lE(A/p*iE(T));(E-=2*C)>sE?(x+=C*=v?1:-1,k-=C):(E=0,x=k=(d+m)/2),(S-=2*R)>sE?(b+=R*=v?1:-1,w-=R):(S=0,b=w=(d+m)/2)}var L=p*tE(b),I=p*iE(b),D=f*tE(k),M=f*iE(k);if(O>sE){var j,F=p*tE(w),B=p*iE(w),U=f*tE(x),z=f*iE(x);if(y1?0:h<-1?aE:Math.acos(h))/2),W=oE(j[0]*j[0]+j[1]*j[1]);N=rE(O,(f-W)/(H-1)),P=rE(O,(p-W)/(H+1))}else N=P=0}S>sE?P>sE?(g=vE(U,z,L,I,p,P,v),_=vE(F,B,D,M,p,P,v),a.moveTo(g.cx+g.x01,g.cy+g.y01),PsE&&E>sE?N>sE?(g=vE(D,M,F,B,f,-N,v),_=vE(L,I,U,z,f,-N,v),a.lineTo(g.cx+g.x01,g.cy+g.y01),N=h;--f)a.point(v[f],g[f]);a.lineEnd(),a.areaEnd()}y&&(v[l]=+e(p,l,c),g[l]=+t(p,l,c),a.point(r?+r(p,l,c):v[l],n?+n(p,l,c):g[l]))}if(d)return a=null,d+""||null}function l(){return SE().defined(i).curve(s).context(o)}return e="function"==typeof e?e:void 0===e?kE:Zk(+e),t="function"==typeof t?t:Zk(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?EE:Zk(+n),c.x=function(t){return arguments.length?(e="function"==typeof t?t:Zk(+t),r=null,c):e},c.x0=function(t){return arguments.length?(e="function"==typeof t?t:Zk(+t),c):e},c.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:Zk(+e),c):r},c.y=function(e){return arguments.length?(t="function"==typeof e?e:Zk(+e),n=null,c):t},c.y0=function(e){return arguments.length?(t="function"==typeof e?e:Zk(+e),c):t},c.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:Zk(+e),c):n},c.lineX0=c.lineY0=function(){return l().x(e).y(t)},c.lineY1=function(){return l().x(e).y(n)},c.lineX1=function(){return l().x(r).y(t)},c.defined=function(e){return arguments.length?(i="function"==typeof e?e:Zk(!!e),c):i},c.curve=function(e){return arguments.length?(s=e,null!=o&&(a=s(o)),c):s},c.context=function(e){return arguments.length?(null==e?o=a=null:a=s(o=e),c):o},c}function AE(e,t){return te?1:t>=e?0:NaN}function OE(e){return e}function NE(){var e=OE,t=AE,n=null,r=Zk(0),i=Zk(cE),o=Zk(0);function s(s){var a,u,c,l,h,f=(s=bE(s)).length,p=0,d=new Array(f),m=new Array(f),y=+r.apply(this,arguments),v=Math.min(cE,Math.max(-cE,i.apply(this,arguments)-y)),g=Math.min(Math.abs(v)/f,o.apply(this,arguments)),_=g*(v<0?-1:1);for(a=0;a0&&(p+=h);for(null!=t?d.sort((function(e,n){return t(m[e],m[n])})):null!=n&&d.sort((function(e,t){return n(s[e],s[t])})),a=0,c=p?(v-f*_)/p:0;a0?h*c:0)+_,m[u]={data:s[u],index:a,value:h,startAngle:y,endAngle:l,padAngle:g};return m}return s.value=function(t){return arguments.length?(e="function"==typeof t?t:Zk(+t),s):e},s.sortValues=function(e){return arguments.length?(t=e,n=null,s):t},s.sort=function(e){return arguments.length?(n=e,t=null,s):n},s.startAngle=function(e){return arguments.length?(r="function"==typeof e?e:Zk(+e),s):r},s.endAngle=function(e){return arguments.length?(i="function"==typeof e?e:Zk(+e),s):i},s.padAngle=function(e){return arguments.length?(o="function"==typeof e?e:Zk(+e),s):o},s}wE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};var PE=RE(xE);function CE(e){this._curve=e}function RE(e){function t(t){return new CE(e(t))}return t._curve=e,t}function LE(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(e){return arguments.length?t(RE(e)):t()._curve},e}function IE(){return LE(SE().curve(PE))}function DE(){var e=TE().curve(PE),t=e.curve,n=e.lineX0,r=e.lineX1,i=e.lineY0,o=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return LE(n())},delete e.lineX0,e.lineEndAngle=function(){return LE(r())},delete e.lineX1,e.lineInnerRadius=function(){return LE(i())},delete e.lineY0,e.lineOuterRadius=function(){return LE(o())},delete e.lineY1,e.curve=function(e){return arguments.length?t(RE(e)):t()._curve},e}function ME(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}CE.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};class jE{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}class FE{constructor(e){this._context=e}lineStart(){this._point=0}lineEnd(){}point(e,t){if(e=+e,t=+t,0===this._point)this._point=1;else{const n=ME(this._x0,this._y0),r=ME(this._x0,this._y0=(this._y0+t)/2),i=ME(e,this._y0),o=ME(e,t);this._context.moveTo(...n),this._context.bezierCurveTo(...r,...i,...o)}this._x0=e,this._y0=t}}function BE(e){return new jE(e,!0)}function UE(e){return new jE(e,!1)}function zE(e){return new FE(e)}function VE(e){return e.source}function $E(e){return e.target}function qE(e){let t=VE,n=$E,r=kE,i=EE,o=null,s=null,a=hE(u);function u(){let u;const c=_E.call(arguments),l=t.apply(this,c),h=n.apply(this,c);if(null==o&&(s=e(u=a())),s.lineStart(),c[0]=l,s.point(+r.apply(this,c),+i.apply(this,c)),c[0]=h,s.point(+r.apply(this,c),+i.apply(this,c)),s.lineEnd(),u)return s=null,u+""||null}return u.source=function(e){return arguments.length?(t=e,u):t},u.target=function(e){return arguments.length?(n=e,u):n},u.x=function(e){return arguments.length?(r="function"==typeof e?e:Zk(+e),u):r},u.y=function(e){return arguments.length?(i="function"==typeof e?e:Zk(+e),u):i},u.context=function(t){return arguments.length?(null==t?o=s=null:s=e(o=t),u):o},u}function KE(){return qE(BE)}function HE(){return qE(UE)}function WE(){const e=qE(zE);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}const GE=oE(3),YE={draw(e,t){const n=.59436*oE(t+rE(t/28,.75)),r=n/2,i=r*GE;e.moveTo(0,n),e.lineTo(0,-n),e.moveTo(-i,-r),e.lineTo(i,r),e.moveTo(-i,r),e.lineTo(i,-r)}},QE={draw(e,t){const n=oE(t/aE);e.moveTo(n,0),e.arc(0,0,n,0,cE)}},XE={draw(e,t){const n=oE(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},ZE=oE(1/3),JE=2*ZE,eS={draw(e,t){const n=oE(t/JE),r=n*ZE;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},tS={draw(e,t){const n=.62625*oE(t);e.moveTo(0,-n),e.lineTo(n,0),e.lineTo(0,n),e.lineTo(-n,0),e.closePath()}},nS={draw(e,t){const n=.87559*oE(t-rE(t/7,2));e.moveTo(-n,0),e.lineTo(n,0),e.moveTo(0,n),e.lineTo(0,-n)}},rS={draw(e,t){const n=oE(t),r=-n/2;e.rect(r,r,n,n)}},iS={draw(e,t){const n=.4431*oE(t);e.moveTo(n,n),e.lineTo(n,-n),e.lineTo(-n,-n),e.lineTo(-n,n),e.closePath()}},oS=iE(aE/10)/iE(7*aE/10),sS=iE(cE/10)*oS,aS=-tE(cE/10)*oS,uS={draw(e,t){const n=oE(.8908130915292852*t),r=sS*n,i=aS*n;e.moveTo(0,-n),e.lineTo(r,i);for(let t=1;t<5;++t){const o=cE*t/5,s=tE(o),a=iE(o);e.lineTo(a*n,-s*n),e.lineTo(s*r-a*i,a*r+s*i)}e.closePath()}},cS=oE(3),lS={draw(e,t){const n=-oE(t/(3*cS));e.moveTo(0,2*n),e.lineTo(-cS*n,-n),e.lineTo(cS*n,-n),e.closePath()}},hS=oE(3),fS={draw(e,t){const n=.6824*oE(t),r=n/2,i=n*hS/2;e.moveTo(0,-n),e.lineTo(i,r),e.lineTo(-i,r),e.closePath()}},pS=-.5,dS=oE(3)/2,mS=1/oE(12),yS=3*(mS/2+1),vS={draw(e,t){const n=oE(t/yS),r=n/2,i=n*mS,o=r,s=n*mS+n,a=-o,u=s;e.moveTo(r,i),e.lineTo(o,s),e.lineTo(a,u),e.lineTo(pS*r-dS*i,dS*r+pS*i),e.lineTo(pS*o-dS*s,dS*o+pS*s),e.lineTo(pS*a-dS*u,dS*a+pS*u),e.lineTo(pS*r+dS*i,pS*i-dS*r),e.lineTo(pS*o+dS*s,pS*s-dS*o),e.lineTo(pS*a+dS*u,pS*u-dS*a),e.closePath()}},gS={draw(e,t){const n=.6189*oE(t-rE(t/6,1.7));e.moveTo(-n,-n),e.lineTo(n,n),e.moveTo(-n,n),e.lineTo(n,-n)}},_S=[QE,XE,eS,rS,uS,lS,vS],bS=[QE,nS,gS,fS,YE,iS,tS];function wS(e,t){let n=null,r=hE(i);function i(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return e="function"==typeof e?e:Zk(e||QE),t="function"==typeof t?t:Zk(void 0===t?64:+t),i.type=function(t){return arguments.length?(e="function"==typeof t?t:Zk(t),i):e},i.size=function(e){return arguments.length?(t="function"==typeof e?e:Zk(+e),i):t},i.context=function(e){return arguments.length?(n=null==e?null:e,i):n},i}function xS(){}function kS(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function ES(e){this._context=e}function SS(e){return new ES(e)}function TS(e){this._context=e}function AS(e){return new TS(e)}function OS(e){this._context=e}function NS(e){return new OS(e)}function PS(e,t){this._basis=new ES(e),this._beta=t}ES.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:kS(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:kS(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},TS.prototype={areaStart:xS,areaEnd:xS,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:kS(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},OS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:kS(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},PS.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r,i=e[0],o=t[0],s=e[n]-i,a=t[n]-o,u=-1;++u<=n;)r=u/n,this._basis.point(this._beta*e[u]+(1-this._beta)*(i+r*s),this._beta*t[u]+(1-this._beta)*(o+r*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const CS=function e(t){function n(e){return 1===t?new ES(e):new PS(e,t)}return n.beta=function(t){return e(+t)},n}(.85);function RS(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function LS(e,t){this._context=e,this._k=(1-t)/6}LS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:RS(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:RS(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const IS=function e(t){function n(e){return new LS(e,t)}return n.tension=function(t){return e(+t)},n}(0);function DS(e,t){this._context=e,this._k=(1-t)/6}DS.prototype={areaStart:xS,areaEnd:xS,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:RS(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const MS=function e(t){function n(e){return new DS(e,t)}return n.tension=function(t){return e(+t)},n}(0);function jS(e,t){this._context=e,this._k=(1-t)/6}jS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:RS(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const FS=function e(t){function n(e){return new jS(e,t)}return n.tension=function(t){return e(+t)},n}(0);function BS(e,t,n){var r=e._x1,i=e._y1,o=e._x2,s=e._y2;if(e._l01_a>sE){var a=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,u=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*a-e._x0*e._l12_2a+e._x2*e._l01_2a)/u,i=(i*a-e._y0*e._l12_2a+e._y2*e._l01_2a)/u}if(e._l23_a>sE){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,l=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/l,s=(s*c+e._y1*e._l23_2a-n*e._l12_2a)/l}e._context.bezierCurveTo(r,i,o,s,e._x2,e._y2)}function US(e,t){this._context=e,this._alpha=t}US.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:BS(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const zS=function e(t){function n(e){return t?new US(e,t):new LS(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function VS(e,t){this._context=e,this._alpha=t}VS.prototype={areaStart:xS,areaEnd:xS,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:BS(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const $S=function e(t){function n(e){return t?new VS(e,t):new DS(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function qS(e,t){this._context=e,this._alpha=t}qS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:BS(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const KS=function e(t){function n(e){return t?new qS(e,t):new jS(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function HS(e){this._context=e}function WS(e){return new HS(e)}function GS(e){return e<0?-1:1}function YS(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),s=(n-e._y1)/(i||r<0&&-0),a=(o*i+s*r)/(r+i);return(GS(o)+GS(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(a))||0}function QS(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function XS(e,t,n){var r=e._x0,i=e._y0,o=e._x1,s=e._y1,a=(o-r)/3;e._context.bezierCurveTo(r+a,i+a*t,o-a,s-a*n,o,s)}function ZS(e){this._context=e}function JS(e){this._context=new eT(e)}function eT(e){this._context=e}function tT(e){return new ZS(e)}function nT(e){return new JS(e)}function rT(e){this._context=e}function iT(e){var t,n,r=e.length-1,i=new Array(r),o=new Array(r),s=new Array(r);for(i[0]=0,o[0]=2,s[0]=e[0]+2*e[1],t=1;t=0;--t)i[t]=(s[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t1)for(var n,r,i,o=1,s=e[t[0]],a=s.length;o=0;)n[t]=t;return n}function fT(e,t){return e[t]}function pT(e){const t=[];return t.key=e,t}function dT(){var e=Zk([]),t=hT,n=lT,r=fT;function i(i){var o,s,a=Array.from(e.apply(this,arguments),pT),u=a.length,c=-1;for(const e of i)for(o=0,++c;o0){for(var n,r,i,o=0,s=e[0].length;o0)for(var n,r,i,o,s,a,u=0,c=e[t[0]].length;u0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=s,r[0]=s+=i):(r[0]=0,r[1]=i)}function vT(e,t){if((n=e.length)>0){for(var n,r=0,i=e[t[0]],o=i.length;r0&&(r=(n=e[t[0]]).length)>0){for(var n,r,i,o=0,s=1;so&&(o=t,r=n);return r}function wT(e){var t=e.map(xT);return hT(e).sort((function(e,n){return t[e]-t[n]}))}function xT(e){for(var t,n=0,r=-1,i=e.length;++r=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var TT="%Y-%m-%dT%H:%M:%S.%LZ",AT=Date.prototype.toISOString?function(e){return e.toISOString()}:Lb(TT);const OT=AT;var NT=+new Date("2000-01-01T00:00:00.000Z")?function(e){var t=new Date(e);return isNaN(t)?null:t}:Ib(TT);const PT=NT;function CT(e,t,n){var r=new to,i=t;return null==t?(r.restart(e,t,n),r):(r._restart=r.restart,r.restart=function(e,t,n){t=+t,n=null==n?Ji():+n,r._restart((function o(s){s+=i,r._restart(o,i+=t,n),e(s)}),t,n)},r.restart(e,t,n),r)}const RT=e=>()=>e;function LT(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function IT(e,t,n){this.k=e,this.x=t,this.y=n}IT.prototype={constructor:IT,scale:function(e){return 1===e?this:new IT(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new IT(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var DT=new IT(1,0,0);function MT(e){for(;!e.__zoom;)if(!(e=e.parentNode))return DT;return e.__zoom}function jT(e){e.stopImmediatePropagation()}function FT(e){e.preventDefault(),e.stopImmediatePropagation()}function BT(e){return!(e.ctrlKey&&"wheel"!==e.type||e.button)}function UT(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]:[[0,0],[e.clientWidth,e.clientHeight]]}function zT(){return this.__zoom||DT}function VT(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function $T(){return navigator.maxTouchPoints||"ontouchstart"in this}function qT(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}function KT(){var e,t,n,r=BT,i=UT,o=qT,s=VT,a=$T,u=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],l=250,h=Cv,f=mn("start","zoom","end"),p=500,d=150,m=0,y=10;function v(e){e.property("__zoom",zT).on("wheel.zoom",E,{passive:!1}).on("mousedown.zoom",S).on("dblclick.zoom",T).filter(a).on("touchstart.zoom",A).on("touchmove.zoom",O).on("touchend.zoom touchcancel.zoom",N).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(e,t){return(t=Math.max(u[0],Math.min(u[1],t)))===e.k?e:new IT(t,e.x,e.y)}function _(e,t,n){var r=t[0]-n[0]*e.k,i=t[1]-n[1]*e.k;return r===e.x&&i===e.y?e:new IT(e.k,r,i)}function b(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function w(e,t,n,r){e.on("start.zoom",(function(){x(this,arguments).event(r).start()})).on("interrupt.zoom end.zoom",(function(){x(this,arguments).event(r).end()})).tween("zoom",(function(){var e=this,o=arguments,s=x(e,o).event(r),a=i.apply(e,o),u=null==n?b(a):"function"==typeof n?n.apply(e,o):n,c=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),l=e.__zoom,f="function"==typeof t?t.apply(e,o):t,p=h(l.invert(u).concat(c/l.k),f.invert(u).concat(c/f.k));return function(e){if(1===e)e=f;else{var t=p(e),n=c/t[2];e=new IT(n,u[0]-t[0]*n,u[1]-t[1]*n)}s.zoom(null,e)}}))}function x(e,t,n){return!n&&e.__zooming||new k(e,t)}function k(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=i.apply(e,t),this.taps=0}function E(e,...t){if(r.apply(this,arguments)){var n=x(this,t).event(e),i=this.__zoom,a=Math.max(u[0],Math.min(u[1],i.k*Math.pow(2,s.apply(this,arguments)))),l=zi(e);if(n.wheel)n.mouse[0][0]===l[0]&&n.mouse[0][1]===l[1]||(n.mouse[1]=i.invert(n.mouse[0]=l)),clearTimeout(n.wheel);else{if(i.k===a)return;n.mouse=[l,i.invert(l)],wo(this),n.start()}FT(e),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),d),n.zoom("mouse",o(_(g(i,a),n.mouse[0],n.mouse[1]),n.extent,c))}}function S(e,...t){if(!n&&r.apply(this,arguments)){var i=e.currentTarget,s=x(this,t,!0).event(e),a=Nr(e.view).on("mousemove.zoom",(function(e){if(FT(e),!s.moved){var t=e.clientX-l,n=e.clientY-h;s.moved=t*t+n*n>m}s.event(e).zoom("mouse",o(_(s.that.__zoom,s.mouse[0]=zi(e,i),s.mouse[1]),s.extent,c))}),!0).on("mouseup.zoom",(function(e){a.on("mousemove.zoom mouseup.zoom",null),Dr(e.view,s.moved),FT(e),s.event(e).end()}),!0),u=zi(e,i),l=e.clientX,h=e.clientY;Ir(e.view),jT(e),s.mouse=[u,this.__zoom.invert(u)],wo(this),s.start()}}function T(e,...t){if(r.apply(this,arguments)){var n=this.__zoom,s=zi(e.changedTouches?e.changedTouches[0]:e,this),a=n.invert(s),u=n.k*(e.shiftKey?.5:2),h=o(_(g(n,u),s,a),i.apply(this,t),c);FT(e),l>0?Nr(this).transition().duration(l).call(w,h,s,e):Nr(this).call(v.transform,h,s,e)}}function A(n,...i){if(r.apply(this,arguments)){var o,s,a,u,c=n.touches,l=c.length,h=x(this,i,n.changedTouches.length===l).event(n);for(jT(n),s=0;s g").attr("transform","".concat(i," ").concat(o))}},{key:"getSourcesId",value:function(e){return this.pluginData.scene.selection.includes(e.subject.datum().data.id)?this.pluginData.scene.selection:[e.subject.datum().data.id]}},{key:"getSourcePosition",value:function(e){var t=this.viewport.select(".".concat(e," .model"));return{x:parseFloat(t.attr("x")),y:parseFloat(t.attr("y"))}}},{key:"getTargetsByDepth",value:function(e){var t=this,n=e.subject.datum().data.id,r=e.sourceEvent,i=r.clientX,o=r.clientY,s=[];return this.viewport.selectAll("g.component.container:not(.".concat(n,")")).each((function(e){var n=t.viewport.select(".".concat(e.data.id," .background")).node().getBoundingClientRect(),r=n.x,a=n.y,u=n.width,c=n.height;if(i>=r&&i<=r+u&&o>=a&&o<=a+c){for(var l=parseInt(t.viewport.select(".".concat(e.data.id)).attr("depth"),10)-1;s.length<=l;)s.push([]);s[l].push(e.data.id)}})),s}},{key:"getTargetsId",value:function(e){return this.getTargetsByDepth(e).flat().reverse()}},{key:"getTargetId",value:function(e){return this.getTargetsId(e)[0]}},{key:"getTransform",value:function(e,t){var n=this.viewport.select(e).node().getBoundingClientRect(),r=n.x,i=n.y,o=this.viewport.select(t).node().getBoundingClientRect();return{dx:r-o.x,dy:i-o.y}}}],t&&function(e,t){for(var n=0;nh?p:h),r.attr("height",d>f?d:f);var m=this.viewport.select(".".concat(t.data.id," .components-background")),y=m.node().getBoundingClientRect();return h=Math.max((s-y.x)/n,t.data.definition.minWidth-t.data.definition.reservedWidth),f=Math.max((a-y.y)/n,t.data.definition.minHeight-t.data.definition.reservedHeight),p=(c-y.x)/n,d=(l-y.y)/n,m.attr("width",p>h?p:h),m.attr("height",d>f?d:f),!1}},{key:"finalize",value:function(e){var t=e.subject.datum().data.id,n=this.viewport.select(".".concat(t," .model")),r=this.pluginData.getComponentById(t);return r.drawOption.width=parseFloat(n.attr("width")),r.drawOption.height=parseFloat(n.attr("height")),this.pluginData.emitEvent({components:[t],type:"Drawer",action:"resize",status:"success"}),!0}},{key:"getMaxPosition",value:function(e){var t=this,n=this.pluginData.getComponentById(e),r=0,i=0;return this.pluginData.getChildren(e).forEach((function(e){var o=t.viewport.select(".".concat(e.id," .model")).node().getBoundingClientRect(),s=o.x,a=o.y,u=o.width,c=o.height;r=Math.max(r,s+u+n.definition.margin),i=Math.max(i,a+c+n.definition.margin)})),{x:r,y:i}}}],r&&function(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&this.pluginData.emitEvent({components:o,type:"Drawer",action:"move",status:"success"}),s.length>0&&this.pluginData.emitEvent({components:s,type:"Drawer",action:"resize",status:"success"}),!0}},{key:"getNodes",value:function(){var e=this,t={id:"root",parent:null,children:[],depth:0,type:"default",isContainer:!0,margin:this.pluginData.configuration.rootContainer.margin,gap:this.pluginData.configuration.rootContainer.gap},n=new Map(this.pluginData.components.map((function(t){return[t.id,e.createNode(t)]})));return n.set("root",t),n.forEach((function(e){if(e.parent){var t=n.get(e.parent);e.parent=t,t.children.push(e)}})),n}},{key:"createNode",value:function(e){return{id:e.id,parent:e.getContainerId()||"root",type:e.definition.displayType||"default",direction:e.definition.workflowDirection,children:[],depth:this.pluginData.getComponentDepth(e.id)+1,isContainer:e.definition.isContainer,width:e.definition.defaultWidth,height:e.definition.defaultHeight,minWidth:e.definition.minWidth,minHeight:e.definition.minHeight,reservedWidth:e.definition.reservedWidth,reservedHeight:e.definition.reservedHeight,margin:e.definition.margin,gap:e.definition.gap,x:e.drawOption.x,y:e.drawOption.y}}},{key:"generateLayout",value:function(e,t,n){var r=this;t.children.forEach((function(t){r.generateLayout(e,t,n)})),t.isContainer&&"default"===t.type?this.generateDefaultLayout(t,n):t.isContainer&&this.generateWorkflowLayout(e,t)}},{key:"generateDefaultLayout",value:function(e,t){this.text=0;var n=[],r=[],i=e.margin,o=e.gap,s=e.minWidth,a=e.minHeight,u=e.reservedWidth,c=e.reservedHeight,l=0,h=0;e.children.forEach((function(e){e.x&&e.y&&t?(n.push(e),l=Math.max(e.x+e.width,l),h=Math.max(e.y+e.height,h)):r.push(e)}));for(var f,p=0,d=0,m=this.getPoints(p,i,o);r.length>0;)f||(f=r[0]),0===m.length&&(d=0,p+=1,m=this.getPoints(p,i,o)),m.length>0&&this.canBePlaced(n,f,m[d])&&(f.x=m[d].x,f.y=m[d].y,l=Math.max(f.x+f.width,l),h=Math.max(f.y+f.height,h),n.push(f),r.shift(),f=null),(d+=1)>=m.length&&(d=0,p+=1,m=this.getPoints(p,i,o));e.width=Math.max(l+i+u,s),e.height=Math.max(h+i+c,a)}},{key:"canBePlaced",value:function(e,t,n){return e.every((function(e){var r=e.x,i=e.y,o=e.width,s=e.height,a=n.x+t.widthr+o,c=n.y+t.heighti+s;return a||u||c||l}))}},{key:"getPoints",value:function(e,t,n){if(0===e)return[{x:t,y:t}];for(var r=t+n*e,i=t+n*e,o=[],s=t,a=t;a<=r&&(a!==r||i!==s);)o.push({x:a,y:i}),a+=n,o.push({x:r,y:s}),s+=n;return o.push({x:r,y:i}),o}},{key:"generateWorkflowLayout",value:function(e,t){"vertical"===t.direction?this.generateVerticalWorkflowLayout(e,t):this.generateHorizontalWorkflowLayout(e,t)}},{key:"generateHorizontalWorkflowLayout",value:function(e,t){var n=t.margin,r=t.gap,i=t.minWidth,o=t.minHeight,s=t.reservedWidth,a=t.reservedHeight,u=n,c=0;t.children.forEach((function(e){e.x=u,e.y=n,u=e.x+e.width+r,e.height>c&&(c=e.height)})),t.width=Math.max(u-r+n+s,i),t.height=Math.max(c+2*n+a,o)}},{key:"generateVerticalWorkflowLayout",value:function(e,t){var n=t.margin,r=t.gap,i=t.minWidth,o=t.minHeight,s=t.reservedWidth,a=t.reservedHeight,u=n,c=0;t.children.forEach((function(e){e.x=n,e.y=u,u=e.y+e.height+r,e.width>c&&(c=e.width)})),t.width=Math.max(c+2*n+s,i),t.height=Math.max(u-r+n+a,o)}},{key:"resize",value:function(e){var t=this.pluginData.getComponentById(e);if(!t.definition.isContainer)return!1;var n=0,r=0;this.pluginData.getChildren(e).forEach((function(e){var t=e.drawOption.x+e.drawOption.width,i=e.drawOption.y+e.drawOption.height;t>n&&(n=t),i>r&&(r=i)}));var i=t.definition,o=i.minWidth,s=i.minHeight,a=i.reservedWidth,u=i.reservedHeight,c=i.margin,l=Math.max(n+2*c+a,o),h=Math.max(r+2*c+u,s);return l===t.drawOption.width&&h===t.drawOption.height||(t.drawOption.width=l,t.drawOption.height=h,this.pluginData.emitEvent({components:[e],type:"Drawer",action:"resize",status:"success"})),!0}}],r&&function(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=Array(t);n=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=r.call(s,"catchLoc"),c=r.call(s,"finallyLoc");if(u&&c){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),N(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;N(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:C(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}function nN(e,t,n,r,i,o,s){try{var a=e[o](s),u=a.value}catch(e){return void n(e)}a.done?t(u):Promise.resolve(u).then(r,i)}function rN(e){var t=function(e,t){if("object"!=YO(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=YO(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==YO(t)?t:t+""}var iN=function(){return t=function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.pluginData=n,this.componentRenderer=null,this.linkRenderer=null,this.layout=null,this.viewport=null,this.scene=null,this.d3=e,this.actions={deleteAction:null,dragComponent:null,dragScene:null,linkAction:null,menuAction:null,resizeComponent:null,toggleSelection:null,selectionAll:null,deselectionAll:null,zoom:null},this.states={linking:!1,menuOpening:!1,moving:!1,resizing:!1,selection:!1},this.readOnly=!1},n=[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.d3.select("#".concat(e)).selectAll(null).remove(),this.d3.select("#".concat(e)).html(""),this.viewport=this.d3.select("#".concat(e)),this.componentRenderer=new LO(this.pluginData,this.viewport,t),this.linkRenderer=new jO(this.pluginData,this.viewport,t),this.layout=new GO(this.pluginData,this.viewport),this.readOnly=t,this.clearActions(),this.readOnly&&(this.pluginData.scene.x=0,this.pluginData.scene.y=0,this.pluginData.scene.zoom=1),this.initActions(),this.initScene()}},{key:"clearActions",value:function(){this.actions.deleteAction=null,this.actions.dragComponent=null,this.actions.dragScene=null,this.actions.menuAction=null,this.actions.resizeComponent=null,this.actions.toggleSelection=null,this.actions.selectionAll=null,this.actions.deselectionAll=null,this.actions.zoom=null,this.viewport.on("wheel",null),this.d3.select("body").on("keydown",null).on("keyup",null),this.viewport.on(".drag",null)}},{key:"initActions",value:function(){var e=this;this.actions.selectionAll=new vO(this.pluginData,this.viewport,this.layout),this.actions.deleteAction=new rA(this.pluginData,this.viewport,this.layout),this.actions.dragScene=new _A(this.pluginData,this.viewport,this.layout),this.actions.menuAction=new DA(this.pluginData,this.viewport,this.layout),this.actions.link=new AA(this.pluginData,this.viewport,this.layout),this.actions.zoom=new SO(this.pluginData,this.viewport,this.layout),this.actions.dragComponent=new hA(this.pluginData,this.viewport,this.layout),this.actions.resizeComponent=new $A(this.pluginData,this.viewport,this.layout),this.actions.toggleSelection=new JA(this.pluginData,this.viewport,this.layout),this.actions.deselectionAll=new aO(this.pluginData,this.viewport,this.layout),this.viewport.on("wheel",(function(t){e.actions.zoom.execute(t)&&e.draw()})),this.readOnly||this.d3.select("body").on("keydown",(function(t){var n=!1;e.pluginData.configuration.keysBinding.selection.includes(t.key)&&(e.states.selection=!0),e.pluginData.configuration.keysBinding.deleteObject.includes(t.key)&&(n=e.actions.deleteAction.execute(t)),e.pluginData.configuration.keysBinding.selectAll.includes(t.key)&&(n=e.actions.selectionAll.execute(t)),e.pluginData.configuration.keysBinding.deselectAll.includes(t.key)&&(n=e.actions.deselectionAll.execute(t)),n&&e.draw()})).on("keyup",(function(t){var n=!1;e.pluginData.configuration.keysBinding.selection.includes(t.key)&&(e.states.selection=!1),e.pluginData.configuration.keysBinding.deleteObject.includes(t.key)&&(n=e.actions.deleteAction.finalize(t)),e.pluginData.configuration.keysBinding.selectAll.includes(t.key)&&(n=e.actions.selectionAll.finalize(t)),e.pluginData.configuration.keysBinding.deselectAll.includes(t.key)&&(n=e.actions.deselectionAll.finalize(t)),n&&e.draw()}));var t=this.d3.drag().subject((function(t){var n=t.sourceEvent.target.closest(".component");if(e.states.resizing=!!t.sourceEvent.target.closest(".resize-button"),e.states.menuOpening=!!t.sourceEvent.target.closest(".menu-button"),!n)return e.scene;var r=e.viewport.select(Array.from(n.classList).map((function(e){return".".concat(e)})).join(""));return e.states.linking=!!t.sourceEvent.target.closest(".anchor")&&e.pluginData.canHaveLink(r.datum().data.definition.type),r})).on("drag",(function(t){e.states.moving=!0;var n="scene"===t.subject.datum().data.id,r=!1;e.readOnly?e.actions.dragScene.execute(t):(n?r=e.actions.dragScene.execute(t):e.states.linking?(r=e.actions.link.execute(t),e.linkRenderer.render()):e.states.resizing?(r=e.actions.resizeComponent.execute(t),e.linkRenderer.render()):(r=e.actions.dragComponent.execute(t),e.linkRenderer.render()),r&&e.draw())})).on("end",function(){var t,n=(t=tN().mark((function t(n){var r,i,o,s,a,u,c;return tN().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.states.moving,i=e.states.selection,o=e.states.menuOpening,s=e.states.resizing,a=e.states.linking,u="scene"===n.subject.datum().data.id,c=!1,!e.readOnly){t.next=10;break}return u&&r&&e.actions.dragScene.finalize(n),t.abrupt("return");case 10:a?c=e.actions.link.finalize(n):r&&u?c=e.actions.dragScene.finalize(n):s?c=e.actions.resizeComponent.finalize(n):r&&!u?c=e.actions.dragComponent.finalize(n):!r&&o?c=e.actions.menuAction.finalize(n):r||u||!i||(c=e.actions.toggleSelection.finalize(n)),c&&e.draw(),e.states.moving=!1;case 13:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function s(e){nN(o,r,i,s,a,"next",e)}function a(e){nN(o,r,i,s,a,"throw",e)}s(void 0)}))});return function(e){return n.apply(this,arguments)}}());this.viewport.call(t)}},{key:"getScene",value:function(){return this.viewport.selectAll(".scene").data(this.getSceneData()).join("svg").attr("class","scene").attr("width","100%").attr("height","100%")}},{key:"initScene",value:function(){var e=this;this.scene=this.getScene(),this.scene.append("defs").html(Object.keys(this.pluginData.resources.markers).map((function(t){return e.pluginData.resources.markers[t]})).join(""));var t=this.pluginData.scene,n=t.x,r=t.y,i=t.zoom,o="translate(".concat(n," ").concat(r,") scale(").concat(i,")");this.scene.append("g").attr("class","components").attr("transform",o),this.scene.append("g").attr("class","links").attr("transform",o)}},{key:"draw",value:function(){if(this.scene=this.getScene(),this.componentRenderer.render("scene"),this.linkRenderer.render("scene"),this.readOnly){for(var e=this.viewport.node().getBoundingClientRect(),t=e.width,n=e.height,r=this.viewport.select(".scene .components").node().getBBox(),i=r.width,o=r.height,s=t/is;)a*=.9;var u=(t-i*a)/2,c=(n-o*a)/2;this.pluginData.scene.zoom=a,this.viewport.selectAll(".scene > g").attr("transform","translate(".concat(u," ").concat(c,") scale(").concat(a,")"))}}},{key:"arrangeComponentsPosition",value:function(e,t){this.layout.generateComponentsLayout(e,t)}},{key:"resize",value:function(e){this.layout.resize(e)}},{key:"getSceneData",value:function(){var e=this;return[this.d3.hierarchy(JO({id:"scene",name:"",children:QO(this.pluginData.components.filter((function(e){return null===e.getContainerId()})))},this.pluginData.scene),(function(t){return"scene"===t.id?t.children:e.pluginData.getChildren(t.id)}))]}},{key:"dropComponent",value:function(e,t){var n=t.target.closest(".component");if(e.drawOption.width=e.definition.width,e.drawOption.height=e.definition.height,!n){var r=this.viewport.select(".scene").node().getBoundingClientRect(),i=r.x,o=r.y;return e.drawOption.x=(t.clientX-i-this.pluginData.scene.x)/this.pluginData.scene.zoom-e.definition.defaultWidth/2,void(e.drawOption.y=(t.clientY-o-this.pluginData.scene.y)/this.pluginData.scene.zoom-e.definition.defaultHeight/2)}if(n.canContain(e.definition.type)){var s=this.viewport.select(".".concat(e.id,".container")).node().getBoundingClientRect(),a=s.x,u=s.y;e.drawOption.x=(t.clientX-a-this.pluginData.scene.x)/this.pluginData.scene.zoom-e.definition.defaultWidth/2,e.drawOption.y=(t.clientY-u-this.pluginData.scene.y)/this.pluginData.scene.zoom-e.definition.defaultHeight/2}}}],n&&function(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[]).map((function(e){return e.path}))}},{key:"parseConfiguration",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=this.pluginData.emitEvent({parent:r,type:"Parser",action:"read",status:"running",files:[t.path],data:{global:!1}});if(null!=t.content){var o=JSON.parse(t.content);o[e.path]?o[e.path][this.pluginData.name]?(Object.keys(o[e.path][this.pluginData.name]).forEach((function(t){var r=n.pluginData.getComponentByConfigurationKey(t);r&&o[e.path][n.pluginData.name][t]&&(r.drawOption=new f(o[e.path][n.pluginData.name][t]))})),this.pluginData.emitEvent({id:i,status:"success"})):this.pluginData.emitEvent({id:i,status:"warning",data:{code:"no_plugin_content",global:!1}}):this.pluginData.emitEvent({id:i,status:"warning",data:{code:"no_diagram_content",global:!1}})}else this.pluginData.emitEvent({id:i,status:"warning",data:{code:"no_content",global:!1}})}},{key:"isParsable",value:function(e){return null!=e}}],t&&function(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:null,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce((function(e,t){return e[t.path]="",e}),{});return this.renderFiles(e).forEach((function(e){t[e.path]=e.content})),Object.keys(t).map((function(e){return new q({path:e,content:t[e]})}))}},{key:"renderFiles",value:function(){return[]}},{key:"renderConfiguration",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=this.pluginData.emitEvent({parent:r,type:"Render",action:"write",status:"running",files:[t.path],data:{global:!1}}),o=JSON.parse(t.content)||{};o[e.path]||(o[e.path]={}),o[e.path][this.pluginData.name]={},this.pluginData.components.filter((function(e){return e.drawOption})).forEach((function(t){var r=t.getConfigurationKey();o[e.path][n.pluginData.name][r]=t.drawOption})),t.content=JSON.stringify(o,(function(e,t){return null===t?void 0:t}),2),this.pluginData.emitEvent({id:i,status:"success"})}}],t&&function(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"Error happened when trying to parse.",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"Error";return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=xN(t),function(e,t){if(t&&("object"==gN(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,bN()?Reflect.construct(t,n||[],xN(e).constructor):t.apply(e,n))}(this,t,[n||"Error happened when trying to parse."])).name="ParseError",e.startLine=r||0,e.startColumn=i||0,e.endLine=o||0,e.endColumn=s||0,e.severity=a||"Error",e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wN(e,t)}(t,e),n=t,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(_N(Error));const EN=kN;var SN=function(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:null,parentId:null,files:null,components:null,links:null,type:null,action:null,status:null,data:null};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=t.id,r=t.parentId,i=t.files,o=t.components,s=t.links,a=t.type,u=t.action,c=t.status,l=t.data;this.id=n||null,this.parentId=r||null,this.startDate=null,this.endDate=null,this.files=i||null,this.components=o||null,this.links=s||null,this.type=a||null,this.action=u||null,this.status=c||null,this.data=l||null}));const TN=SN;function AN(e){return AN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},AN(e)}function ON(e,t,n){return t=PN(t),function(e,t){if(t&&("object"==AN(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,NN()?Reflect.construct(t,n||[],PN(e).constructor):t.apply(e,n))}function NN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(NN=function(){return!!e})()}function PN(e){return PN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},PN(e)}function CN(e,t){return CN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},CN(e,t)}var RN=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{anchorName:null};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=ON(this,t,[n])).anchorName=n.anchorName||null,e.endX=null,e.endY=null,e.isTemporary=!0,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&CN(e,t)}(t,e),n=t,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(D);const LN=RN;function IN(e){return IN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},IN(e)}function DN(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&void 0!==arguments[1]?arguments[1]:{name:null,version:null,components:[],variables:[],definitions:{components:[],links:[]},parseErrors:[],resources:{},scene:{x:0,y:0,zoom:1,selection:[],selectionRef:null}},d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=p.name||null,this.version=p.version||null,this.components=p.components||[],this.scene={x:(null===(n=p.scene)||void 0===n?void 0:n.x)||0,y:(null===(r=p.scene)||void 0===r?void 0:r.y)||0,zoom:(null===(i=p.scene)||void 0===i?void 0:i.zoom)||1,selection:(null===(o=p.scene)||void 0===o?void 0:o.selection)||[],selectionRef:(null===(s=p.scene)||void 0===s?void 0:s.selectionRef)||null},this.variables=p.variables||[],this.definitions={components:(null===(a=p.definitions)||void 0===a?void 0:a.components)||[],links:(null===(u=p.definitions)||void 0===u?void 0:u.links)||[]},this.parseErrors=p.parseErrors||[],this.__eventIndex=0,this.eventManager=d,this.eventLogs=[],this.configuration=t,this.resources={icons:jN({},null===(c=p.resources)||void 0===c?void 0:c.icons),markers:jN({},null===(l=p.resources)||void 0===l?void 0:l.markers),links:jN({},null===(h=p.resources)||void 0===h?void 0:h.links),models:jN({},null===(f=p.resources)||void 0===f?void 0:f.models)},this.temporaryLink=null},t=[{key:"coreVersion",get:function(){return"0.24.1"}},{key:"getComponentById",value:function(e){return this.components.find((function(t){return t.id===e}))||null}},{key:"getComponentDepth",value:function(e){var t=this.getComponentById(e).getContainerId();return t?this.getComponentDepth(t)+1:0}},{key:"getComponentByConfigurationKey",value:function(e){return this.getComponentById(e)}},{key:"renameComponentExternalId",value:function(e,t){this.getComponentById(e).setExternalId(t)}},{key:"getComponentsByType",value:function(e){return this.components.filter((function(t){var n=t.definition;return n&&n.type===e}))}},{key:"addComponent",value:function(e,t){var n=this.generateComponentId();return this.components.push(new b({id:n,name:n,definition:e,path:t})),n}},{key:"generateComponentId",value:function(){var e=this.components.map((function(e){return e.id})).filter((function(e){return new RegExp("".concat("id_","\\d+")).test(e)})).map((function(e){return parseInt(e.substring(3),10)})),t=0===e.length?1:Math.max.apply(Math,function(e){return function(e){if(Array.isArray(e))return DN(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return DN(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?DN(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e))+1;return"".concat("id_").concat(t)}},{key:"removeComponentById",value:function(e){var t=this;this.getChildren(e).forEach((function(e){return t.removeComponentById(e.id)})),this.components=this.components.filter((function(t){return t.id!==e})),this.components.forEach((function(t){t.removeLinkAttribute(e)}))}},{key:"removeLink",value:function(e){var t=e.source,n=e.target,r=e.definition.attributeRef;this.getComponentById(t).removeLinkAttribute(n,r)}},{key:"getLinks",value:function(){var e=this,t=[];return this.definitions.links.forEach((function(n){e.getComponentsByType(n.sourceRef).forEach((function(r){var i=r.getAttributeByName(n.attributeRef);i&&e.getLinkedComponentsIds(i).forEach((function(e){return t.push(new D({definition:n,source:r.id,target:e,isReverse:"Reverse"===i.definition.linkType}))}))}))})),this.temporaryLink&&t.push(this.temporaryLink),t.concat(this.getWorkflowLinks())}},{key:"getAttributeValue",value:function(e){return e.isVariable?this.getVariableValue(e.value):e.value}},{key:"getLinkedComponentsIds",value:function(e){var t=this.getAttributeValue(e);return null===t?[]:Array.isArray(t)?t:[t]}},{key:"getVariableValue",value:function(e){var t;return(null===(t=this.variables.find((function(t){return t.name===e})))||void 0===t?void 0:t.value)||null}},{key:"setVariableValue",value:function(e,t){var n=this.variables.find((function(t){return t.name===e}));n&&(n.value=t)}},{key:"getComponentIdFromValue",value:function(e){return e}},{key:"canHaveLink",value:function(e){return this.definitions.links.some((function(t){return t.sourceRef===e}))}},{key:"canBeLinked",value:function(e,t){return this.definitions.links.some((function(n){var r=n.sourceRef,i=n.targetRef;return r===e&&i===t}))}},{key:"createTemporaryLink",value:function(e,t){this.temporaryLink=new LN({anchorName:t,source:e,definition:this.definitions.links.find((function(e){return e.isTemporary}))})}},{key:"getWorkflowLinks",value:function(){var e=this;return this.components.filter((function(e){var t;return null===(t=e.definition.displayType)||void 0===t?void 0:t.match("workflow")})).reduce((function(t,n){var r=e.getChildren(n.id);if(r.length>1)for(var i=0;in,this.components.splice(i,0,r),this.components.splice(n+(ie}))}},{key:"emitEvent",value:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.id;return r?(t=this.getEventLogById(r),Object.keys(n).forEach((function(e){t[e]=n[e]}))):(this.__eventIndex+=1,r=this.__eventIndex,(t=new TN(jN(jN({},n),{},{id:r}))).startDate=Date.now(),this.eventLogs.push(t)),["success","warning","error"].includes(t.status)&&(t.endDate=Date.now()),null!==(e=this.eventManager)&&void 0!==e&&e.next&&this.eventManager.next({plugin:this.name,event:jN({},t)}),r}}],t&&function(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{editor:{syntax:null},restrictiveFolder:null,defaultFileName:null,defaultFileExtension:null,tags:[],isFolderTypeDiagram:!0,extraResources:[],rootContainer:{margin:30,gap:50},container:{margin:30,gap:50},keysBinding:{}};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.editor=qN({syntax:null},s.editor),this.restrictiveFolder=s.restrictiveFolder||null,this.defaultFileName=s.defaultFileName||null,this.defaultFileExtension=s.defaultFileExtension||null,this.tags=s.tags||[],this.isFolderTypeDiagram=null===(t=s.isFolderTypeDiagram)||void 0===t||t,this.extraResources=s.extraResources||[],this.rootContainer={margin:(null===(n=s.rootContainer)||void 0===n?void 0:n.margin)||30,gap:(null===(r=s.rootContainer)||void 0===r?void 0:r.gap)||50},this.container={margin:(null===(i=s.container)||void 0===i?void 0:i.margin)||30,gap:(null===(o=s.container)||void 0===o?void 0:o.gap)||50},this.keysBinding=qN({moveSceneUp:["ArrowUp"],moveSceneDown:["ArrowDown"],moveSceneLeft:["ArrowLeft"],moveSceneRight:["ArrowRight"],moveComponentUp:[],moveComponentDown:[],moveComponentLeft:[],moveComponentRight:[],zoomIn:["+"],zoomOut:["-"],deleteObject:["Delete"],editComponent:[",","?"],selection:["Shift"],selectAll:["A"],deselectAll:["D"]},s.keysBinding)}));const GN=WN;function YN(e){return YN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},YN(e)}function QN(e){var t=function(e,t){if("object"!=YN(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=YN(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==YN(t)?t:t+""}var XN=function(){return e=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{event:null,configuration:null,pluginData:null,pluginDrawer:null,pluginMetadata:null,pluginParser:null,pluginRenderer:null};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.configuration=t.configuration||new GN,this.data=t.pluginData||new zN(this.configuration,{},t.event),this.__drawer=t.pluginDrawer||new oN(this.data),this.__metadata=t.pluginMetadata||new cN(this.data),this.__parser=t.pluginParser||new pN(this.data),this.__renderer=t.pluginRenderer||new vN(this.data)},t=[{key:"init",value:function(){var e=this.data.emitEvent({type:"Plugin",action:"init",status:"running"});this.__metadata.parse(e),this.data.initLinkDefinitions(e),this.data.emitEvent({id:e,status:"success"})}},{key:"initResources",value:function(e){this.data.resources=e}},{key:"initDrawer",value:function(e,t){this.__drawer.init(e,t)}},{key:"draw",value:function(){this.__drawer.draw()}},{key:"parse",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=this.data.emitEvent({type:"Parser",action:"read",status:"running",files:n.map((function(e){return e.path})).concat(null==t?void 0:t.path),data:{global:!0}});this.__parser.parse(e,n,r),this.__parser.parseConfiguration(e,t,r),this.data.emitEvent({id:r,status:"success"})}},{key:"isParsable",value:function(e){return this.__parser.isParsable(e)}},{key:"getModels",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return this.__parser.getModels(t.filter((function(t){return e.isParsable(t)})))}},{key:"render",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=this.data.emitEvent({type:"Render",action:"write",status:"running",files:n.map((function(e){return e.path})).concat(t.path),data:{global:!0}});this.__renderer.renderConfiguration(e,t,r);var i=this.__renderer.render(n,r).concat(t);return this.data.emitEvent({id:r,status:"success"}),i}},{key:"arrangeComponentsPosition",value:function(e,t){this.__drawer.arrangeComponentsPosition(e,t)}},{key:"resize",value:function(e){this.__drawer.resize(e)}},{key:"getComponentPosition",value:function(e,t){var n=t.x,r=t.y,i=this.__drawer.actions.zoom,o=i.scale,s=i.translate,a=document.querySelector("#".concat(e)).getBoundingClientRect(),u=a.left,c=a.top;return{x:(n-u-s.x)/o,y:(r-c-s.y)/o}}},{key:"addComponent",value:function(e,t,n,r){var i=this.data.addComponent(t,n),o=this.data.getComponentById(i);if(e){var s=this.data.getComponentById(e);o.setReferenceAttribute(s)}return r&&this.__drawer.dropComponent(o,r),i}}],t&&function(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{type:null,value:null};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=t.type,r=t.value;this.type=n||null,this.value=r||null}));const eP=JN;function tP(e){return tP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tP(e)}function nP(e,t,n){return t=iP(t),function(e,t){if(t&&("object"==tP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,rP()?Reflect.construct(t,n||[],iP(e).constructor):t.apply(e,n))}function rP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(rP=function(){return!!e})()}function iP(e){return iP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},iP(e)}function oP(e,t){return oP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},oP(e,t)}var sP=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{name:null,type:null,value:null,category:null};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=nP(this,t,[n]);var r=n.name,i=n.type,o=n.value,s=n.category;return e.__class="Variable",e.name=r||null,e.type=i||null,e.value=o||null,e.category=s||null,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oP(e,t)}(t,e),n=t,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(l);const aP=sP})();var o=t;for(var s in i)o[s]=i[s];i.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})()},945:function(e){var t;"undefined"!=typeof self&&self,t=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=11)}([function(e,t,n){"use strict";var r=Array.prototype,i=Object.prototype,o={"&":"&",'"':""","'":"'","<":"<",">":">","\\":"\"},s=/[&"'<>\\]/g;function a(e,t){return i.hasOwnProperty.call(e,t)}function u(e){return o[e]}function c(e,t,n){var r,i,o;if(e instanceof Error&&(e=(i=e).name+": "+i.message),Object.setPrototypeOf?(r=new Error(e),Object.setPrototypeOf(r,c.prototype)):(r=this,Object.defineProperty(r,"message",{enumerable:!1,writable:!0,value:e})),Object.defineProperty(r,"name",{value:"Template render error"}),Error.captureStackTrace&&Error.captureStackTrace(r,this.constructor),i){var s=Object.getOwnPropertyDescriptor(i,"stack");(o=s&&(s.get||function(){return s.value}))||(o=function(){return i.stack})}else{var a=new Error(e).stack;o=function(){return a}}return Object.defineProperty(r,"stack",{get:function(){return o.call(r)}}),Object.defineProperty(r,"cause",{value:i}),r.lineno=t,r.colno=n,r.firstUpdate=!0,r.Update=function(e){var t="("+(e||"unknown path")+")";return this.firstUpdate&&(this.lineno&&this.colno?t+=" [Line "+this.lineno+", Column "+this.colno+"]":this.lineno&&(t+=" [Line "+this.lineno+"]")),t+="\n ",this.firstUpdate&&(t+=" "),this.message=t+(this.message||""),this.firstUpdate=!1,this},r}function l(e){return"[object Function]"===i.toString.call(e)}function h(e){return"[object Array]"===i.toString.call(e)}function f(e){return"[object String]"===i.toString.call(e)}function p(e){return"[object Object]"===i.toString.call(e)}function d(e){var t,n=(t=e)?"string"==typeof t?t.split("."):[t]:[];return function(e){for(var t=e,r=0;re.length)s=i.slice(0,e.length),i.slice(s.length,c).forEach((function(e,n){n2?i-2:0),s=2;s0||!n)&&process.stdout.write(" ".repeat(t));var o=i===r.length-1?"":"\n";process.stdout.write(""+e+o)}))}e.exports={Node:u,Root:h,NodeList:l,Value:c,Literal:f,Symbol:p,Group:d,Array:m,Pair:y,Dict:v,Output:U,Capture:z,TemplateData:V,If:_,IfAsync:b,InlineIf:w,For:x,AsyncEach:k,AsyncAll:E,Macro:S,Caller:T,Import:A,FromImport:O,FunCall:N,Filter:P,FilterAsync:C,KeywordArgs:R,Block:L,Super:I,Extends:D,Include:M,Set:j,Switch:F,Case:B,LookupVal:g,BinOp:q,In:K,Is:H,Or:W,And:G,Not:Y,Add:Q,Concat:X,Sub:Z,Mul:J,Div:ee,FloorDiv:te,Mod:ne,Pow:re,Neg:ie,Pos:oe,Compare:se,CompareOperand:ae,CallExtension:ue,CallExtensionAsync:ce,printNodes:function e(t,n){if(n=n||0,le(t.typename+": ",n),t instanceof l)le("\n"),t.children.forEach((function(t){e(t,n+2)}));else if(t instanceof ue)le(t.extName+"."+t.prop+"\n"),t.args&&e(t.args,n+2),t.contentArgs&&t.contentArgs.forEach((function(t){e(t,n+2)}));else{var r=[],i=null;t.iterFields((function(e,t){e instanceof u?r.push([t,e]):(i=i||{})[t]=e})),i?le(JSON.stringify(i,null,2)+"\n",null,!0):le("\n"),r.forEach((function(t){var r=t[0],i=t[1];le("["+r+"] =>",n+2),e(i,n+4)}))}}}},function(e,t){},function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}var i=n(8),o=n(17),s=n(3),a=n(0).TemplateError,u=n(2).Frame,c=n(1).Obj,l={"==":"==","===":"===","!=":"!=","!==":"!==","<":"<",">":">","<=":"<=",">=":">="},h=function(e){var t,n;function i(){return e.apply(this,arguments)||this}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n);var o=i.prototype;return o.init=function(e,t){this.templateName=e,this.codebuf=[],this.lastId=0,this.buffer=null,this.bufferStack=[],this._scopeClosers="",this.inBlock=!1,this.throwOnUndefined=t},o.fail=function(e,t,n){throw void 0!==t&&(t+=1),void 0!==n&&(n+=1),new a(e,t,n)},o._pushBuffer=function(){var e=this._tmpid();return this.bufferStack.push(this.buffer),this.buffer=e,this._emit("var "+this.buffer+' = "";'),e},o._popBuffer=function(){this.buffer=this.bufferStack.pop()},o._emit=function(e){this.codebuf.push(e)},o._emitLine=function(e){this._emit(e+"\n")},o._emitLines=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r0&&i._emit(","),i.compile(e,t)})),r&&this._emit(r)},o._compileExpression=function(e,t){this.assertType(e,s.Literal,s.Symbol,s.Group,s.Array,s.Dict,s.FunCall,s.Caller,s.Filter,s.LookupVal,s.Compare,s.InlineIf,s.In,s.Is,s.And,s.Or,s.Not,s.Add,s.Concat,s.Sub,s.Mul,s.Div,s.FloorDiv,s.Mod,s.Pow,s.Neg,s.Pos,s.Compare,s.NodeList),this.compile(e,t)},o.assertType=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&r._emit(","),e){r._emitLine("function(cb) {"),r._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}");var i=r._pushBuffer();r._withScopedSyntax((function(){r.compile(e,t),r._emitLine("cb(null, "+i+");")})),r._popBuffer(),r._emitLine("return "+i+";"),r._emitLine("}")}else r._emit("null")})),n){var u=this._tmpid();this._emitLine(", "+this._makeCallback(u)),this._emitLine(this.buffer+" += runtime.suppressValue("+u+", "+a+" && env.opts.autoescape);"),this._addScopeLevel()}else this._emit(")"),this._emit(", "+a+" && env.opts.autoescape);\n")},o.compileCallExtensionAsync=function(e,t){this.compileCallExtension(e,t,!0)},o.compileNodeList=function(e,t){this._compileChildren(e,t)},o.compileLiteral=function(e){if("string"==typeof e.value){var t=e.value.replace(/\\/g,"\\\\");t=(t=(t=(t=(t=t.replace(/"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t")).replace(/\u2028/g,"\\u2028"),this._emit('"'+t+'"')}else null===e.value?this._emit("null"):this._emit(e.value.toString())},o.compileSymbol=function(e,t){var n=e.value,r=t.lookup(n);r?this._emit(r):this._emit('runtime.contextOrFrameLookup(context, frame, "'+n+'")')},o.compileGroup=function(e,t){this._compileAggregate(e,t,"(",")")},o.compileArray=function(e,t){this._compileAggregate(e,t,"[","]")},o.compileDict=function(e,t){this._compileAggregate(e,t,"{","}")},o.compilePair=function(e,t){var n=e.key,r=e.value;n instanceof s.Symbol?n=new s.Literal(n.lineno,n.colno,n.value):n instanceof s.Literal&&"string"==typeof n.value||this.fail("compilePair: Dict keys must be strings or names",n.lineno,n.colno),this.compile(n,t),this._emit(": "),this._compileExpression(r,t)},o.compileInlineIf=function(e,t){this._emit("("),this.compile(e.cond,t),this._emit("?"),this.compile(e.body,t),this._emit(":"),null!==e.else_?this.compile(e.else_,t):this._emit('""'),this._emit(")")},o.compileIn=function(e,t){this._emit("runtime.inOperator("),this.compile(e.left,t),this._emit(","),this.compile(e.right,t),this._emit(")")},o.compileIs=function(e,t){var n=e.right.name?e.right.name.value:e.right.value;this._emit('env.getTest("'+n+'").call(context, '),this.compile(e.left,t),e.right.args&&(this._emit(","),this.compile(e.right.args,t)),this._emit(") === true")},o._binOpEmitter=function(e,t,n){this.compile(e.left,t),this._emit(n),this.compile(e.right,t)},o.compileOr=function(e,t){return this._binOpEmitter(e,t," || ")},o.compileAnd=function(e,t){return this._binOpEmitter(e,t," && ")},o.compileAdd=function(e,t){return this._binOpEmitter(e,t," + ")},o.compileConcat=function(e,t){return this._binOpEmitter(e,t,' + "" + ')},o.compileSub=function(e,t){return this._binOpEmitter(e,t," - ")},o.compileMul=function(e,t){return this._binOpEmitter(e,t," * ")},o.compileDiv=function(e,t){return this._binOpEmitter(e,t," / ")},o.compileMod=function(e,t){return this._binOpEmitter(e,t," % ")},o.compileNot=function(e,t){this._emit("!"),this.compile(e.target,t)},o.compileFloorDiv=function(e,t){this._emit("Math.floor("),this.compile(e.left,t),this._emit(" / "),this.compile(e.right,t),this._emit(")")},o.compilePow=function(e,t){this._emit("Math.pow("),this.compile(e.left,t),this._emit(", "),this.compile(e.right,t),this._emit(")")},o.compileNeg=function(e,t){this._emit("-"),this.compile(e.target,t)},o.compilePos=function(e,t){this._emit("+"),this.compile(e.target,t)},o.compileCompare=function(e,t){var n=this;this.compile(e.expr,t),e.ops.forEach((function(e){n._emit(" "+l[e.type]+" "),n.compile(e.expr,t)}))},o.compileLookupVal=function(e,t){this._emit("runtime.memberLookup(("),this._compileExpression(e.target,t),this._emit("),"),this._compileExpression(e.val,t),this._emit(")")},o._getNodeName=function(e){switch(e.typename){case"Symbol":return e.value;case"FunCall":return"the return value of ("+this._getNodeName(e.name)+")";case"LookupVal":return this._getNodeName(e.target)+'["'+this._getNodeName(e.val)+'"]';case"Literal":return e.value.toString();default:return"--expression--"}},o.compileFunCall=function(e,t){this._emit("(lineno = "+e.lineno+", colno = "+e.colno+", "),this._emit("runtime.callWrap("),this._compileExpression(e.name,t),this._emit(', "'+this._getNodeName(e.name).replace(/"/g,'\\"')+'", context, '),this._compileAggregate(e.args,t,"[","])"),this._emit(")")},o.compileFilter=function(e,t){var n=e.name;this.assertType(n,s.Symbol),this._emit('env.getFilter("'+n.value+'").call(context, '),this._compileAggregate(e.args,t),this._emit(")")},o.compileFilterAsync=function(e,t){var n=e.name,r=e.symbol.value;this.assertType(n,s.Symbol),t.set(r,r),this._emit('env.getFilter("'+n.value+'").call(context, '),this._compileAggregate(e.args,t),this._emitLine(", "+this._makeCallback(r)),this._addScopeLevel()},o.compileKeywordArgs=function(e,t){this._emit("runtime.makeKeywordArgs("),this.compileDict(e,t),this._emit(")")},o.compileSet=function(e,t){var n=this,r=[];e.targets.forEach((function(e){var i=e.value,o=t.lookup(i);null==o&&(o=n._tmpid(),n._emitLine("var "+o+";")),r.push(o)})),e.value?(this._emit(r.join(" = ")+" = "),this._compileExpression(e.value,t),this._emitLine(";")):(this._emit(r.join(" = ")+" = "),this.compile(e.body,t),this._emitLine(";")),e.targets.forEach((function(e,t){var i=r[t],o=e.value;n._emitLine('frame.set("'+o+'", '+i+", true);"),n._emitLine("if(frame.topLevel) {"),n._emitLine('context.setVariable("'+o+'", '+i+");"),n._emitLine("}"),"_"!==o.charAt(0)&&(n._emitLine("if(frame.topLevel) {"),n._emitLine('context.addExport("'+o+'", '+i+");"),n._emitLine("}"))}))},o.compileSwitch=function(e,t){var n=this;this._emit("switch ("),this.compile(e.expr,t),this._emit(") {"),e.cases.forEach((function(e,r){n._emit("case "),n.compile(e.cond,t),n._emit(": "),n.compile(e.body,t),e.body.children.length&&n._emitLine("break;")})),e.default&&(this._emit("default:"),this.compile(e.default,t)),this._emit("}")},o.compileIf=function(e,t,n){var r=this;this._emit("if("),this._compileExpression(e.cond,t),this._emitLine(") {"),this._withScopedSyntax((function(){r.compile(e.body,t),n&&r._emit("cb()")})),e.else_?(this._emitLine("}\nelse {"),this._withScopedSyntax((function(){r.compile(e.else_,t),n&&r._emit("cb()")}))):n&&(this._emitLine("}\nelse {"),this._emit("cb()")),this._emitLine("}")},o.compileIfAsync=function(e,t){this._emit("(function(cb) {"),this.compileIf(e,t,!0),this._emit("})("+this._makeCallback()),this._addScopeLevel()},o._emitLoopBindings=function(e,t,n,r){var i=this;[{name:"index",val:n+" + 1"},{name:"index0",val:n},{name:"revindex",val:r+" - "+n},{name:"revindex0",val:r+" - "+n+" - 1"},{name:"first",val:n+" === 0"},{name:"last",val:n+" === "+r+" - 1"},{name:"length",val:r}].forEach((function(e){i._emitLine('frame.set("loop.'+e.name+'", '+e.val+");")}))},o.compileFor=function(e,t){var n=this,r=this._tmpid(),i=this._tmpid(),o=this._tmpid();if(t=t.push(),this._emitLine("frame = frame.push();"),this._emit("var "+o+" = "),this._compileExpression(e.arr,t),this._emitLine(";"),this._emit("if("+o+") {"),this._emitLine(o+" = runtime.fromIterator("+o+");"),e.name instanceof s.Array){this._emitLine("var "+r+";"),this._emitLine("if(runtime.isArray("+o+")) {"),this._emitLine("var "+i+" = "+o+".length;"),this._emitLine("for("+r+"=0; "+r+" < "+o+".length; "+r+"++) {"),e.name.children.forEach((function(i,s){var a=n._tmpid();n._emitLine("var "+a+" = "+o+"["+r+"]["+s+"];"),n._emitLine('frame.set("'+i+'", '+o+"["+r+"]["+s+"]);"),t.set(e.name.children[s].value,a)})),this._emitLoopBindings(e,o,r,i),this._withScopedSyntax((function(){n.compile(e.body,t)})),this._emitLine("}"),this._emitLine("} else {");var a=e.name.children,u=a[0],c=a[1],l=this._tmpid(),h=this._tmpid();t.set(u.value,l),t.set(c.value,h),this._emitLine(r+" = -1;"),this._emitLine("var "+i+" = runtime.keys("+o+").length;"),this._emitLine("for(var "+l+" in "+o+") {"),this._emitLine(r+"++;"),this._emitLine("var "+h+" = "+o+"["+l+"];"),this._emitLine('frame.set("'+u.value+'", '+l+");"),this._emitLine('frame.set("'+c.value+'", '+h+");"),this._emitLoopBindings(e,o,r,i),this._withScopedSyntax((function(){n.compile(e.body,t)})),this._emitLine("}"),this._emitLine("}")}else{var f=this._tmpid();t.set(e.name.value,f),this._emitLine("var "+i+" = "+o+".length;"),this._emitLine("for(var "+r+"=0; "+r+" < "+o+".length; "+r+"++) {"),this._emitLine("var "+f+" = "+o+"["+r+"];"),this._emitLine('frame.set("'+e.name.value+'", '+f+");"),this._emitLoopBindings(e,o,r,i),this._withScopedSyntax((function(){n.compile(e.body,t)})),this._emitLine("}")}this._emitLine("}"),e.else_&&(this._emitLine("if (!"+i+") {"),this.compile(e.else_,t),this._emitLine("}")),this._emitLine("frame = frame.pop();")},o._compileAsyncLoop=function(e,t,n){var r=this,i=this._tmpid(),o=this._tmpid(),a=this._tmpid(),u=n?"asyncAll":"asyncEach";if(t=t.push(),this._emitLine("frame = frame.push();"),this._emit("var "+a+" = runtime.fromIterator("),this._compileExpression(e.arr,t),this._emitLine(");"),e.name instanceof s.Array){var c=e.name.children.length;this._emit("runtime."+u+"("+a+", "+c+", function("),e.name.children.forEach((function(e){r._emit(e.value+",")})),this._emit(i+","+o+",next) {"),e.name.children.forEach((function(e){var n=e.value;t.set(n,n),r._emitLine('frame.set("'+n+'", '+n+");")}))}else{var l=e.name.value;this._emitLine("runtime."+u+"("+a+", 1, function("+l+", "+i+", "+o+",next) {"),this._emitLine('frame.set("'+l+'", '+l+");"),t.set(l,l)}this._emitLoopBindings(e,a,i,o),this._withScopedSyntax((function(){var o;n&&(o=r._pushBuffer()),r.compile(e.body,t),r._emitLine("next("+i+(o?","+o:"")+");"),n&&r._popBuffer()}));var h=this._tmpid();this._emitLine("}, "+this._makeCallback(h)),this._addScopeLevel(),n&&this._emitLine(this.buffer+" += "+h+";"),e.else_&&(this._emitLine("if (!"+a+".length) {"),this.compile(e.else_,t),this._emitLine("}")),this._emitLine("frame = frame.pop();")},o.compileAsyncEach=function(e,t){this._compileAsyncLoop(e,t)},o.compileAsyncAll=function(e,t){this._compileAsyncLoop(e,t,!0)},o._compileMacro=function(e,t){var n=this,r=[],i=null,o="macro_"+this._tmpid(),a=void 0!==t;e.args.children.forEach((function(t,o){o===e.args.children.length-1&&t instanceof s.Dict?i=t:(n.assertType(t,s.Symbol),r.push(t))}));var c,l=[].concat(r.map((function(e){return"l_"+e.value})),["kwargs"]),h=r.map((function(e){return'"'+e.value+'"'})),f=(i&&i.children||[]).map((function(e){return'"'+e.key.value+'"'}));c=a?t.push(!0):new u,this._emitLines("var "+o+" = runtime.makeMacro(","["+h.join(", ")+"], ","["+f.join(", ")+"], ","function ("+l.join(", ")+") {","var callerFrame = frame;","frame = "+(a?"frame.push(true);":"new runtime.Frame();"),"kwargs = kwargs || {};",'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {','frame.set("caller", kwargs.caller); }'),r.forEach((function(e){n._emitLine('frame.set("'+e.value+'", l_'+e.value+");"),c.set(e.value,"l_"+e.value)})),i&&i.children.forEach((function(e){var t=e.key.value;n._emit('frame.set("'+t+'", '),n._emit('Object.prototype.hasOwnProperty.call(kwargs, "'+t+'")'),n._emit(' ? kwargs["'+t+'"] : '),n._compileExpression(e.value,c),n._emit(");")}));var p=this._pushBuffer();return this._withScopedSyntax((function(){n.compile(e.body,c)})),this._emitLine("frame = "+(a?"frame.pop();":"callerFrame;")),this._emitLine("return new runtime.SafeString("+p+");"),this._emitLine("});"),this._popBuffer(),o},o.compileMacro=function(e,t){var n=this._compileMacro(e),r=e.name.value;t.set(r,n),t.parent?this._emitLine('frame.set("'+r+'", '+n+");"):("_"!==e.name.value.charAt(0)&&this._emitLine('context.addExport("'+r+'");'),this._emitLine('context.setVariable("'+r+'", '+n+");"))},o.compileCaller=function(e,t){this._emit("(function (){");var n=this._compileMacro(e,t);this._emit("return "+n+";})()")},o._compileGetTemplate=function(e,t,n,r){var i=this._tmpid(),o=this._templateName(),s=this._makeCallback(i),a=n?"true":"false",u=r?"true":"false";return this._emit("env.getTemplate("),this._compileExpression(e.template,t),this._emitLine(", "+a+", "+o+", "+u+", "+s),i},o.compileImport=function(e,t){var n=e.target.value,r=this._compileGetTemplate(e,t,!1,!1);this._addScopeLevel(),this._emitLine(r+".getExported("+(e.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(r)),this._addScopeLevel(),t.set(n,r),t.parent?this._emitLine('frame.set("'+n+'", '+r+");"):this._emitLine('context.setVariable("'+n+'", '+r+");")},o.compileFromImport=function(e,t){var n=this,r=this._compileGetTemplate(e,t,!1,!1);this._addScopeLevel(),this._emitLine(r+".getExported("+(e.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(r)),this._addScopeLevel(),e.names.children.forEach((function(e){var i,o,a=n._tmpid();e instanceof s.Pair?(i=e.key.value,o=e.value.value):o=i=e.value,n._emitLine("if(Object.prototype.hasOwnProperty.call("+r+', "'+i+'")) {'),n._emitLine("var "+a+" = "+r+"."+i+";"),n._emitLine("} else {"),n._emitLine("cb(new Error(\"cannot import '"+i+"'\")); return;"),n._emitLine("}"),t.set(o,a),t.parent?n._emitLine('frame.set("'+o+'", '+a+");"):n._emitLine('context.setVariable("'+o+'", '+a+");")}))},o.compileBlock=function(e){var t=this._tmpid();this.inBlock||this._emit('(parentTemplate ? function(e, c, f, r, cb) { cb(""); } : '),this._emit('context.getBlock("'+e.name.value+'")'),this.inBlock||this._emit(")"),this._emitLine("(env, context, frame, runtime, "+this._makeCallback(t)),this._emitLine(this.buffer+" += "+t+";"),this._addScopeLevel()},o.compileSuper=function(e,t){var n=e.blockName.value,r=e.symbol.value,i=this._makeCallback(r);this._emitLine('context.getSuper(env, "'+n+'", b_'+n+", frame, runtime, "+i),this._emitLine(r+" = runtime.markSafe("+r+");"),this._addScopeLevel(),t.set(r,r)},o.compileExtends=function(e,t){var n=this._tmpid(),r=this._compileGetTemplate(e,t,!0,!1);this._emitLine("parentTemplate = "+r),this._emitLine("for(var "+n+" in parentTemplate.blocks) {"),this._emitLine("context.addBlock("+n+", parentTemplate.blocks["+n+"]);"),this._emitLine("}"),this._addScopeLevel()},o.compileInclude=function(e,t){this._emitLine("var tasks = [];"),this._emitLine("tasks.push("),this._emitLine("function(callback) {");var n=this._compileGetTemplate(e,t,!1,e.ignoreMissing);this._emitLine("callback(null,"+n+");});"),this._emitLine("});");var r=this._tmpid();this._emitLine("tasks.push("),this._emitLine("function(template, callback){"),this._emitLine("template.render(context.getVariables(), frame, "+this._makeCallback(r)),this._emitLine("callback(null,"+r+");});"),this._emitLine("});"),this._emitLine("tasks.push("),this._emitLine("function(result, callback){"),this._emitLine(this.buffer+" += result;"),this._emitLine("callback(null);"),this._emitLine("});"),this._emitLine("env.waterfall(tasks, function(){"),this._addScopeLevel()},o.compileTemplateData=function(e,t){this.compileLiteral(e,t)},o.compileCapture=function(e,t){var n=this,r=this.buffer;this.buffer="output",this._emitLine("(function() {"),this._emitLine('var output = "";'),this._withScopedSyntax((function(){n.compile(e.body,t)})),this._emitLine("return output;"),this._emitLine("})()"),this.buffer=r},o.compileOutput=function(e,t){var n=this;e.children.forEach((function(r){r instanceof s.TemplateData?r.value&&(n._emit(n.buffer+" += "),n.compileLiteral(r,t),n._emitLine(";")):(n._emit(n.buffer+" += runtime.suppressValue("),n.throwOnUndefined&&n._emit("runtime.ensureDefined("),n.compile(r,t),n.throwOnUndefined&&n._emit(","+e.lineno+","+e.colno+")"),n._emit(", env.opts.autoescape);\n"))}))},o.compileRoot=function(e,t){var n=this;t&&this.fail("compileRoot: root node can't have frame"),t=new u,this._emitFuncBegin(e,"root"),this._emitLine("var parentTemplate = null;"),this._compileChildren(e,t),this._emitLine("if(parentTemplate) {"),this._emitLine("parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);"),this._emitLine("} else {"),this._emitLine("cb(null, "+this.buffer+");"),this._emitLine("}"),this._emitFuncEnd(!0),this.inBlock=!0;var r=[],i=e.findAll(s.Block);i.forEach((function(e,t){var i=e.name.value;if(-1!==r.indexOf(i))throw new Error('Block "'+i+'" defined more than once.');r.push(i),n._emitFuncBegin(e,"b_"+i);var o=new u;n._emitLine("var frame = frame.push(true);"),n.compile(e.body,o),n._emitFuncEnd()})),this._emitLine("return {"),i.forEach((function(e,t){var r="b_"+e.name.value;n._emitLine(r+": "+r+",")})),this._emitLine("root: root\n};")},o.compile=function(e,t){var n=this["compile"+e.typename];n?n.call(this,e,t):this.fail("compile: Cannot compile node: "+e.typename,e.lineno,e.colno)},o.getCode=function(){return this.codebuf.join("")},i}(c);e.exports={compile:function(e,t,n,r,s){void 0===s&&(s={});var a=new h(r,s.throwOnUndefined),u=(n||[]).map((function(e){return e.preprocess})).filter((function(e){return!!e})).reduce((function(e,t){return t(e)}),e);return a.compile(o.transform(i.parse(u,n,s),t,r)),a.getCode()},Compiler:h}},function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}var i=n(4),o=n(1).EmitterObj;e.exports=function(e){var t,n;function o(){return e.apply(this,arguments)||this}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n);var s=o.prototype;return s.resolve=function(e,t){return i.resolve(i.dirname(e),t)},s.isRelative=function(e){return 0===e.indexOf("./")||0===e.indexOf("../")},o}(o)},function(e,t,n){"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,i(e,t)}function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}var o=n(12),s=n(15),a=n(0),u=n(5),c=n(18),l=n(10),h=l.FileSystemLoader,f=l.WebLoader,p=l.PrecompiledLoader,d=n(20),m=n(21),y=n(1),v=y.Obj,g=y.EmitterObj,_=n(2),b=_.handleError,w=_.Frame,x=n(22);function k(e,t,n){o((function(){e(t,n)}))}var E={type:"code",obj:{root:function(e,t,n,r,i){try{i(null,"")}catch(e){i(b(e,null,null))}}}},S=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var n=t.prototype;return n.init=function(e,t){var n=this;t=this.opts=t||{},this.opts.dev=!!t.dev,this.opts.autoescape=null==t.autoescape||t.autoescape,this.opts.throwOnUndefined=!!t.throwOnUndefined,this.opts.trimBlocks=!!t.trimBlocks,this.opts.lstripBlocks=!!t.lstripBlocks,this.loaders=[],e?this.loaders=a.isArray(e)?e:[e]:h?this.loaders=[new h("views")]:f&&(this.loaders=[new f("/views")]),"undefined"!=typeof window&&window.nunjucksPrecompiled&&this.loaders.unshift(new p(window.nunjucksPrecompiled)),this._initLoaders(),this.globals=m(),this.filters={},this.tests={},this.asyncFilters=[],this.extensions={},this.extensionsList=[],a._entries(c).forEach((function(e){var t=e[0],r=e[1];return n.addFilter(t,r)})),a._entries(d).forEach((function(e){var t=e[0],r=e[1];return n.addTest(t,r)}))},n._initLoaders=function(){var e=this;this.loaders.forEach((function(t){t.cache={},"function"==typeof t.on&&(t.on("update",(function(n,r){t.cache[n]=null,e.emit("update",n,r,t)})),t.on("load",(function(n,r){e.emit("load",n,r,t)})))}))},n.invalidateCache=function(){this.loaders.forEach((function(e){e.cache={}}))},n.addExtension=function(e,t){return t.__name=e,this.extensions[e]=t,this.extensionsList.push(t),this},n.removeExtension=function(e){var t=this.getExtension(e);t&&(this.extensionsList=a.without(this.extensionsList,t),delete this.extensions[e])},n.getExtension=function(e){return this.extensions[e]},n.hasExtension=function(e){return!!this.extensions[e]},n.addGlobal=function(e,t){return this.globals[e]=t,this},n.getGlobal=function(e){if(void 0===this.globals[e])throw new Error("global not found: "+e);return this.globals[e]},n.addFilter=function(e,t,n){var r=t;return n&&this.asyncFilters.push(e),this.filters[e]=r,this},n.getFilter=function(e){if(!this.filters[e])throw new Error("filter not found: "+e);return this.filters[e]},n.addTest=function(e,t){return this.tests[e]=t,this},n.getTest=function(e){if(!this.tests[e])throw new Error("test not found: "+e);return this.tests[e]},n.resolveTemplate=function(e,t,n){return e.isRelative&&t&&e.isRelative(n)&&e.resolve?e.resolve(t,n):n},n.getTemplate=function(e,t,n,r,i){var o,s=this,u=this,c=null;if(e&&e.raw&&(e=e.raw),a.isFunction(n)&&(i=n,n=null,t=t||!1),a.isFunction(t)&&(i=t,t=!1),e instanceof A)c=e;else{if("string"!=typeof e)throw new Error("template names must be a string: "+e);for(var l=0;l0&&!this.skip(i.TOKEN_COMMA)&&this.fail("parseFrom: expected comma",e.lineno,e.colno);var a=this.parsePrimary();if("_"===a.value.charAt(0)&&this.fail("parseFrom: names starting with an underscore cannot be imported",a.lineno,a.colno),this.skipSymbol("as")){var u=this.parsePrimary();r.addChild(new o.Pair(a.lineno,a.colno,a,u))}else r.addChild(a);n=this.parseWithContext()}return new o.FromImport(e.lineno,e.colno,t,r,n)},u.parseBlock=function(){var e=this.peekToken();this.skipSymbol("block")||this.fail("parseBlock: expected block",e.lineno,e.colno);var t=new o.Block(e.lineno,e.colno);t.name=this.parsePrimary(),t.name instanceof o.Symbol||this.fail("parseBlock: variable name expected",e.lineno,e.colno),this.advanceAfterBlockEnd(e.value),t.body=this.parseUntilBlocks("endblock"),this.skipSymbol("endblock"),this.skipSymbol(t.name.value);var n=this.peekToken();return n||this.fail("parseBlock: expected endblock, got end of file"),this.advanceAfterBlockEnd(n.value),t},u.parseExtends=function(){var e="extends",t=this.peekToken();this.skipSymbol(e)||this.fail("parseTemplateRef: expected "+e);var n=new o.Extends(t.lineno,t.colno);return n.template=this.parseExpression(),this.advanceAfterBlockEnd(t.value),n},u.parseInclude=function(){var e="include",t=this.peekToken();this.skipSymbol(e)||this.fail("parseInclude: expected "+e);var n=new o.Include(t.lineno,t.colno);return n.template=this.parseExpression(),this.skipSymbol("ignore")&&this.skipSymbol("missing")&&(n.ignoreMissing=!0),this.advanceAfterBlockEnd(t.value),n},u.parseIf=function(){var e,t=this.peekToken();this.skipSymbol("if")||this.skipSymbol("elif")||this.skipSymbol("elseif")?e=new o.If(t.lineno,t.colno):this.skipSymbol("ifAsync")?e=new o.IfAsync(t.lineno,t.colno):this.fail("parseIf: expected if, elif, or elseif",t.lineno,t.colno),e.cond=this.parseExpression(),this.advanceAfterBlockEnd(t.value),e.body=this.parseUntilBlocks("elif","elseif","else","endif");var n=this.peekToken();switch(n&&n.value){case"elseif":case"elif":e.else_=this.parseIf();break;case"else":this.advanceAfterBlockEnd(),e.else_=this.parseUntilBlocks("endif"),this.advanceAfterBlockEnd();break;case"endif":e.else_=null,this.advanceAfterBlockEnd();break;default:this.fail("parseIf: expected elif, else, or endif, got end of file")}return e},u.parseSet=function(){var e=this.peekToken();this.skipSymbol("set")||this.fail("parseSet: expected set",e.lineno,e.colno);for(var t,n=new o.Set(e.lineno,e.colno,[]);(t=this.parsePrimary())&&(n.targets.push(t),this.skip(i.TOKEN_COMMA)););return this.skipValue(i.TOKEN_OPERATOR,"=")?(n.value=this.parseExpression(),this.advanceAfterBlockEnd(e.value)):this.skip(i.TOKEN_BLOCK_END)?(n.body=new o.Capture(e.lineno,e.colno,this.parseUntilBlocks("endset")),n.value=null,this.advanceAfterBlockEnd()):this.fail("parseSet: expected = or block end in set tag",e.lineno,e.colno),n},u.parseSwitch=function(){var e="switch",t="endswitch",n="case",r="default",i=this.peekToken();this.skipSymbol(e)||this.skipSymbol(n)||this.skipSymbol(r)||this.fail('parseSwitch: expected "switch," "case" or "default"',i.lineno,i.colno);var s=this.parseExpression();this.advanceAfterBlockEnd(e),this.parseUntilBlocks(n,r,t);var a,u=this.peekToken(),c=[];do{this.skipSymbol(n);var l=this.parseExpression();this.advanceAfterBlockEnd(e);var h=this.parseUntilBlocks(n,r,t);c.push(new o.Case(u.line,u.col,l,h)),u=this.peekToken()}while(u&&u.value===n);switch(u.value){case r:this.advanceAfterBlockEnd(),a=this.parseUntilBlocks(t),this.advanceAfterBlockEnd();break;case t:this.advanceAfterBlockEnd();break;default:this.fail('parseSwitch: expected "case," "default" or "endswitch," got EOF.')}return new o.Switch(i.lineno,i.colno,s,c,a)},u.parseStatement=function(){var e=this.peekToken();if(e.type!==i.TOKEN_SYMBOL&&this.fail("tag name expected",e.lineno,e.colno),this.breakOnBlocks&&-1!==a.indexOf(this.breakOnBlocks,e.value))return null;switch(e.value){case"raw":return this.parseRaw();case"verbatim":return this.parseRaw("verbatim");case"if":case"ifAsync":return this.parseIf();case"for":case"asyncEach":case"asyncAll":return this.parseFor();case"block":return this.parseBlock();case"extends":return this.parseExtends();case"include":return this.parseInclude();case"set":return this.parseSet();case"macro":return this.parseMacro();case"call":return this.parseCall();case"import":return this.parseImport();case"from":return this.parseFrom();case"filter":return this.parseFilterStatement();case"switch":return this.parseSwitch();default:if(this.extensions.length)for(var t=0;t0;){var u=s[0],c=s[1],l=s[2];l===e?r+=1:l===t&&(r-=1),0===r?(i+=c,this.tokens.backN(u.length-c.length)):i+=u}return new o.Output(a.lineno,a.colno,[new o.TemplateData(a.lineno,a.colno,i)])},u.parsePostfix=function(e){for(var t,n=this.peekToken();n;){if(n.type===i.TOKEN_LEFT_PAREN)e=new o.FunCall(n.lineno,n.colno,e,this.parseSignature());else if(n.type===i.TOKEN_LEFT_BRACKET)(t=this.parseAggregate()).children.length>1&&this.fail("invalid index"),e=new o.LookupVal(n.lineno,n.colno,e,t.children[0]);else{if(n.type!==i.TOKEN_OPERATOR||"."!==n.value)break;this.nextToken();var r=this.nextToken();r.type!==i.TOKEN_SYMBOL&&this.fail("expected name as lookup value, got "+r.value,r.lineno,r.colno),t=new o.Literal(r.lineno,r.colno,r.value),e=new o.LookupVal(n.lineno,n.colno,e,t)}n=this.peekToken()}return e},u.parseExpression=function(){return this.parseInlineIf()},u.parseInlineIf=function(){var e=this.parseOr();if(this.skipSymbol("if")){var t=this.parseOr(),n=e;(e=new o.InlineIf(e.lineno,e.colno)).body=n,e.cond=t,this.skipSymbol("else")?e.else_=this.parseOr():e.else_=null}return e},u.parseOr=function(){for(var e=this.parseAnd();this.skipSymbol("or");){var t=this.parseAnd();e=new o.Or(e.lineno,e.colno,e,t)}return e},u.parseAnd=function(){for(var e=this.parseNot();this.skipSymbol("and");){var t=this.parseNot();e=new o.And(e.lineno,e.colno,e,t)}return e},u.parseNot=function(){var e=this.peekToken();return this.skipSymbol("not")?new o.Not(e.lineno,e.colno,this.parseNot()):this.parseIn()},u.parseIn=function(){for(var e=this.parseIs();;){var t=this.nextToken();if(!t)break;var n=t.type===i.TOKEN_SYMBOL&&"not"===t.value;if(n||this.pushToken(t),!this.skipSymbol("in")){n&&this.pushToken(t);break}var r=this.parseIs();e=new o.In(e.lineno,e.colno,e,r),n&&(e=new o.Not(e.lineno,e.colno,e))}return e},u.parseIs=function(){var e=this.parseCompare();if(this.skipSymbol("is")){var t=this.skipSymbol("not"),n=this.parseCompare();e=new o.Is(e.lineno,e.colno,e,n),t&&(e=new o.Not(e.lineno,e.colno,e))}return e},u.parseCompare=function(){for(var e=["==","===","!=","!==","<",">","<=",">="],t=this.parseConcat(),n=[];;){var r=this.nextToken();if(!r)break;if(-1===e.indexOf(r.value)){this.pushToken(r);break}n.push(new o.CompareOperand(r.lineno,r.colno,this.parseConcat(),r.value))}return n.length?new o.Compare(n[0].lineno,n[0].colno,t,n):t},u.parseConcat=function(){for(var e=this.parseAdd();this.skipValue(i.TOKEN_TILDE,"~");){var t=this.parseAdd();e=new o.Concat(e.lineno,e.colno,e,t)}return e},u.parseAdd=function(){for(var e=this.parseSub();this.skipValue(i.TOKEN_OPERATOR,"+");){var t=this.parseSub();e=new o.Add(e.lineno,e.colno,e,t)}return e},u.parseSub=function(){for(var e=this.parseMul();this.skipValue(i.TOKEN_OPERATOR,"-");){var t=this.parseMul();e=new o.Sub(e.lineno,e.colno,e,t)}return e},u.parseMul=function(){for(var e=this.parseDiv();this.skipValue(i.TOKEN_OPERATOR,"*");){var t=this.parseDiv();e=new o.Mul(e.lineno,e.colno,e,t)}return e},u.parseDiv=function(){for(var e=this.parseFloorDiv();this.skipValue(i.TOKEN_OPERATOR,"/");){var t=this.parseFloorDiv();e=new o.Div(e.lineno,e.colno,e,t)}return e},u.parseFloorDiv=function(){for(var e=this.parseMod();this.skipValue(i.TOKEN_OPERATOR,"//");){var t=this.parseMod();e=new o.FloorDiv(e.lineno,e.colno,e,t)}return e},u.parseMod=function(){for(var e=this.parsePow();this.skipValue(i.TOKEN_OPERATOR,"%");){var t=this.parsePow();e=new o.Mod(e.lineno,e.colno,e,t)}return e},u.parsePow=function(){for(var e=this.parseUnary();this.skipValue(i.TOKEN_OPERATOR,"**");){var t=this.parseUnary();e=new o.Pow(e.lineno,e.colno,e,t)}return e},u.parseUnary=function(e){var t,n=this.peekToken();return t=this.skipValue(i.TOKEN_OPERATOR,"-")?new o.Neg(n.lineno,n.colno,this.parseUnary(!0)):this.skipValue(i.TOKEN_OPERATOR,"+")?new o.Pos(n.lineno,n.colno,this.parseUnary(!0)):this.parsePrimary(),e||(t=this.parseFilter(t)),t},u.parsePrimary=function(e){var t,n=this.nextToken(),r=null;if(n?n.type===i.TOKEN_STRING?t=n.value:n.type===i.TOKEN_INT?t=parseInt(n.value,10):n.type===i.TOKEN_FLOAT?t=parseFloat(n.value):n.type===i.TOKEN_BOOLEAN?"true"===n.value?t=!0:"false"===n.value?t=!1:this.fail("invalid boolean: "+n.value,n.lineno,n.colno):n.type===i.TOKEN_NONE?t=null:n.type===i.TOKEN_REGEX&&(t=new RegExp(n.value.body,n.value.flags)):this.fail("expected expression, got end of file"),void 0!==t?r=new o.Literal(n.lineno,n.colno,t):n.type===i.TOKEN_SYMBOL?r=new o.Symbol(n.lineno,n.colno,n.value):(this.pushToken(n),r=this.parseAggregate()),e||(r=this.parsePostfix(r)),r)return r;throw this.error("unexpected token: "+n.value,n.lineno,n.colno)},u.parseFilterName=function(){for(var e=this.expect(i.TOKEN_SYMBOL),t=e.value;this.skipValue(i.TOKEN_OPERATOR,".");)t+="."+this.expect(i.TOKEN_SYMBOL).value;return new o.Symbol(e.lineno,e.colno,t)},u.parseFilterArgs=function(e){return this.peekToken().type===i.TOKEN_LEFT_PAREN?this.parsePostfix(e).args.children:[]},u.parseFilter=function(e){for(;this.skip(i.TOKEN_PIPE);){var t=this.parseFilterName();e=new o.Filter(t.lineno,t.colno,t,new o.NodeList(t.lineno,t.colno,[e].concat(this.parseFilterArgs(e))))}return e},u.parseFilterStatement=function(){var e=this.peekToken();this.skipSymbol("filter")||this.fail("parseFilterStatement: expected filter");var t=this.parseFilterName(),n=this.parseFilterArgs(t);this.advanceAfterBlockEnd(e.value);var r=new o.Capture(t.lineno,t.colno,this.parseUntilBlocks("endfilter"));this.advanceAfterBlockEnd();var i=new o.Filter(t.lineno,t.colno,t,new o.NodeList(t.lineno,t.colno,[r].concat(n)));return new o.Output(t.lineno,t.colno,[i])},u.parseAggregate=function(){var e,t=this.nextToken();switch(t.type){case i.TOKEN_LEFT_PAREN:e=new o.Group(t.lineno,t.colno);break;case i.TOKEN_LEFT_BRACKET:e=new o.Array(t.lineno,t.colno);break;case i.TOKEN_LEFT_CURLY:e=new o.Dict(t.lineno,t.colno);break;default:return null}for(;;){var n=this.peekToken().type;if(n===i.TOKEN_RIGHT_PAREN||n===i.TOKEN_RIGHT_BRACKET||n===i.TOKEN_RIGHT_CURLY){this.nextToken();break}if(e.children.length>0&&(this.skip(i.TOKEN_COMMA)||this.fail("parseAggregate: expected comma after expression",t.lineno,t.colno)),e instanceof o.Dict){var r=this.parsePrimary();this.skip(i.TOKEN_COLON)||this.fail("parseAggregate: expected colon after dict key",t.lineno,t.colno);var s=this.parseExpression();e.addChild(new o.Pair(r.lineno,r.colno,r,s))}else{var a=this.parseExpression();e.addChild(a)}}return e},u.parseSignature=function(e,t){var n=this.peekToken();if(!t&&n.type!==i.TOKEN_LEFT_PAREN){if(e)return null;this.fail("expected arguments",n.lineno,n.colno)}n.type===i.TOKEN_LEFT_PAREN&&(n=this.nextToken());for(var r=new o.NodeList(n.lineno,n.colno),s=new o.KeywordArgs(n.lineno,n.colno),a=!1;;){if(n=this.peekToken(),!t&&n.type===i.TOKEN_RIGHT_PAREN){this.nextToken();break}if(t&&n.type===i.TOKEN_BLOCK_END)break;if(a&&!this.skip(i.TOKEN_COMMA))this.fail("parseSignature: expected comma after expression",n.lineno,n.colno);else{var u=this.parseExpression();this.skipValue(i.TOKEN_OPERATOR,"=")?s.addChild(new o.Pair(u.lineno,u.colno,u,this.parseExpression())):r.addChild(u)}a=!0}return s.children.length&&r.addChild(s),r},u.parseUntilBlocks=function(){for(var e=this.breakOnBlocks,t=arguments.length,n=new Array(t),r=0;r=","//","**"],j=C+this.current();switch(-1!==r.indexOf(M,j)&&(this.forward(),C=j,-1!==r.indexOf(M,j+this.current())&&(C=j+this.current(),this.forward())),C){case"(":D=d;break;case")":D=m;break;case"[":D=y;break;case"]":D=v;break;case"{":D=g;break;case"}":D=_;break;case",":D=w;break;case":":D=x;break;case"~":D=k;break;case"|":D=E;break;default:D=b}return P(D,C,t,n)}if((e=this._extractUntil(i+o)).match(/^[-+]?[0-9]+$/)){if("."===this.current()){this.forward();var F=this._extract("0123456789");return P(S,e+"."+F,t,n)}return P("int",e,t,n)}if(e.match(/^(true|false)$/))return P(T,e,t,n);if("none"===e)return P(A,e,t,n);if("null"===e)return P(A,e,t,n);if(e)return P(O,e,t,n);throw new Error("Unexpected value while parsing: "+e)}var B,U=this.tags.BLOCK_START.charAt(0)+this.tags.VARIABLE_START.charAt(0)+this.tags.COMMENT_START.charAt(0)+this.tags.COMMENT_END.charAt(0);if(this.isFinished())return null;if((e=this._extractString(this.tags.BLOCK_START+"-"))||(e=this._extractString(this.tags.BLOCK_START)))return this.in_code=!0,P(c,e,t,n);if((e=this._extractString(this.tags.VARIABLE_START+"-"))||(e=this._extractString(this.tags.VARIABLE_START)))return this.in_code=!0,P(h,e,t,n);e="";var z=!1;for(this._matches(this.tags.COMMENT_START)&&(z=!0,e=this._extractString(this.tags.COMMENT_START));null!==(B=this._extractUntil(U));){if(e+=B,(this._matches(this.tags.BLOCK_START)||this._matches(this.tags.VARIABLE_START)||this._matches(this.tags.COMMENT_START))&&!z){if(this.lstripBlocks&&this._matches(this.tags.BLOCK_START)&&this.colno>0&&this.colno<=e.length){var V=e.slice(-this.colno);if(/^\s+$/.test(V)&&!(e=e.slice(0,-this.colno)).length)return this.nextToken()}break}if(this._matches(this.tags.COMMENT_END)){if(!z)throw new Error("unexpected end of comment");e+=this._extractString(this.tags.COMMENT_END);break}e+=this.current(),this.forward()}if(null===B&&z)throw new Error("expected end of comment, got end of file");return P(z?p:u,e,t,n)},t._parseString=function(e){this.forward();for(var t="";!this.isFinished()&&this.current()!==e;){var n=this.current();if("\\"===n){switch(this.forward(),this.current()){case"n":t+="\n";break;case"t":t+="\t";break;case"r":t+="\r";break;default:t+=this.current()}this.forward()}else t+=n,this.forward()}return this.forward(),t},t._matches=function(e){return this.index+e.length>this.len?null:this.str.slice(this.index,this.index+e.length)===e},t._extractString=function(e){return this._matches(e)?(this.forwardN(e.length),e):null},t._extractUntil=function(e){return this._extractMatching(!0,e||"")},t._extract=function(e){return this._extractMatching(!1,e)},t._extractMatching=function(e,t){if(this.isFinished())return null;var n=t.indexOf(this.current());if(e&&-1===n||!e&&-1!==n){var r=this.current();this.forward();for(var i=t.indexOf(this.current());(e&&-1===i||!e&&-1!==i)&&!this.isFinished();)r+=this.current(),this.forward(),i=t.indexOf(this.current());return r}return""},t._extractRegex=function(e){var t=this.currentStr().match(e);return t?(this.forwardN(t[0].length),t):null},t.isFinished=function(){return this.index>=this.len},t.forwardN=function(e){for(var t=0;t1024){for(var t=0,n=i.length-o;t0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,a=u,console&&console.warn&&console.warn(a)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}function d(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=i[e];if(void 0===u)return!1;if("function"==typeof u)o(u,this,t);else{var c=u.length,l=y(u,c);for(n=0;n=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return d(this,e,!0)},a.prototype.rawListeners=function(e){return d(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},a.prototype.listenerCount=m,a.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){"use strict";var r=n(3),i=n(0),o=0;function s(){return"hole_"+o++}function a(e,t){for(var n=null,r=0;r=t)return e;var n=t-e.length,s=r.repeat(" ",n/2-n%2),a=r.repeat(" ",n/2);return i.copySafeness(e,s+e+a)},t.default=function(e,t,n){return n?e||t:void 0!==e?e:t},t.dictsort=function(e,t,n){if(!r.isObject(e))throw new r.TemplateError("dictsort filter: val must be an object");var i,o=[];for(var s in e)o.push([s,e[s]]);if(void 0===n||"key"===n)i=0;else{if("value"!==n)throw new r.TemplateError("dictsort filter: You can only sort by either key or value");i=1}return o.sort((function(e,n){var o=e[i],s=n[i];return t||(r.isString(o)&&(o=o.toUpperCase()),r.isString(s)&&(s=s.toUpperCase())),o>s?1:o===s?0:-1})),o},t.dump=function(e,t){return JSON.stringify(e,null,t)},t.escape=function(e){return e instanceof i.SafeString?e:(e=null==e?"":e,i.markSafe(r.escape(e.toString())))},t.safe=function(e){return e instanceof i.SafeString?e:(e=null==e?"":e,i.markSafe(e.toString()))},t.first=function(e){return e[0]},t.forceescape=function(e){return e=null==e?"":e,i.markSafe(r.escape(e.toString()))},t.groupby=function(e,t){return r.groupBy(e,t,this.env.opts.throwOnUndefined)},t.indent=function(e,t,n){if(""===(e=o(e,"")))return"";t=t||4;var s=e.split("\n"),a=r.repeat(" ",t),u=s.map((function(e,t){return 0!==t||n?""+a+e:e})).join("\n");return i.copySafeness(e,u)},t.join=function(e,t,n){return t=t||"",n&&(e=r.map(e,(function(e){return e[n]}))),e.join(t)},t.last=function(e){return e[e.length-1]},t.length=function(e){var t=o(e,"");return void 0!==t?"function"==typeof Map&&t instanceof Map||"function"==typeof Set&&t instanceof Set?t.size:!r.isObject(t)||t instanceof i.SafeString?t.length:r.keys(t).length:0},t.list=u,t.lower=function(e){return(e=o(e,"")).toLowerCase()},t.nl2br=function(e){return null==e?"":i.copySafeness(e,e.replace(/\r\n|\n/g,"
\n"))},t.random=function(e){return e[Math.floor(Math.random()*e.length)]},t.reject=c(!1),t.rejectattr=function(e,t){return e.filter((function(e){return!e[t]}))},t.select=c(!0),t.selectattr=function(e,t){return e.filter((function(e){return!!e[t]}))},t.replace=function(e,t,n,r){var o=e;if(t instanceof RegExp)return e.replace(t,n);void 0===r&&(r=-1);var s="";if("number"==typeof t)t=""+t;else if("string"!=typeof t)return e;if("number"==typeof e&&(e=""+e),"string"!=typeof e&&!(e instanceof i.SafeString))return e;if(""===t)return s=n+e.split("").join(n)+n,i.copySafeness(e,s);var a=e.indexOf(t);if(0===r||-1===a)return e;for(var u=0,c=0;a>-1&&(-1===r||c=i&&l.push(n),o.push(l)}return o},t.sum=function(e,t,n){return void 0===n&&(n=0),t&&(e=r.map(e,(function(e){return e[t]}))),n+e.reduce((function(e,t){return e+t}),0)},t.sort=i.makeMacro(["value","reverse","case_sensitive","attribute"],[],(function(e,t,n,i){var o=this,s=r.map(e,(function(e){return e})),a=r.getAttrGetter(i);return s.sort((function(e,s){var u=i?a(e):e,c=i?a(s):s;if(o.env.opts.throwOnUndefined&&i&&(void 0===u||void 0===c))throw new TypeError('sort: attribute "'+i+'" resolved to undefined');return!n&&r.isString(u)&&r.isString(c)&&(u=u.toLowerCase(),c=c.toLowerCase()),uc?t?-1:1:0})),s})),t.string=function(e){return i.copySafeness(e,e)},t.striptags=function(e,t){var n,r=l((e=o(e,"")).replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|/gi,""));return n=t?r.replace(/^ +| +$/gm,"").replace(/ +/g," ").replace(/(\r\n)/g,"\n").replace(/\n\n\n+/g,"\n\n"):r.replace(/\s+/gi," "),i.copySafeness(e,n)},t.title=function(e){var t=(e=o(e,"")).split(" ").map((function(e){return a(e)}));return i.copySafeness(e,t.join(" "))},t.trim=l,t.truncate=function(e,t,n,r){var s=e;if(t=t||255,(e=o(e,"")).length<=t)return e;if(n)e=e.substring(0,t);else{var a=e.lastIndexOf(" ",t);-1===a&&(a=t),e=e.substring(0,a)}return e+=null!=r?r:"...",i.copySafeness(s,e)},t.upper=function(e){return(e=o(e,"")).toUpperCase()},t.urlencode=function(e){var t=encodeURIComponent;return r.isString(e)?t(e):(r.isArray(e)?e:r._entries(e)).map((function(e){var n=e[0],r=e[1];return t(n)+"="+t(r)})).join("&")};var h=/^(?:\(|<|<)?(.*?)(?:\.|,|\)|\n|>)?$/,f=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,p=/^https?:\/\/.*$/,d=/^www\./,m=/\.(?:org|net|com)(?:\:|\/|$)/;t.urlize=function(e,t,n){s(t)&&(t=1/0);var r=!0===n?' rel="nofollow"':"";return e.split(/(\s+)/).filter((function(e){return e&&e.length})).map((function(e){var n=e.match(h),i=n?n[1]:e,o=i.substr(0,t);return p.test(i)?'"+o+"":d.test(i)?'"+o+"":f.test(i)?''+i+"":m.test(i)?'"+o+"":e})).join("")},t.wordcount=function(e){var t=(e=o(e,""))?e.match(/\w+/g):null;return t?t.length:null},t.float=function(e,t){var n=parseFloat(e);return s(n)?t:n};var y=i.makeMacro(["value","default","base"],[],(function(e,t,n){void 0===n&&(n=10);var r=parseInt(e,n);return s(r)?t:r}));t.int=y,t.d=t.default,t.e=t.escape},function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}var i=function(e){var t,n;function i(t){var n;return(n=e.call(this)||this).precompiled=t||{},n}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n),i.prototype.getSource=function(e){return this.precompiled[e]?{src:{type:"code",obj:this.precompiled[e]},path:e}:null},i}(n(6));e.exports={PrecompiledLoader:i}},function(e,t,n){"use strict";var r=n(2).SafeString;t.callable=function(e){return"function"==typeof e},t.defined=function(e){return void 0!==e},t.divisibleby=function(e,t){return e%t==0},t.escaped=function(e){return e instanceof r},t.equalto=function(e,t){return e===t},t.eq=t.equalto,t.sameas=t.equalto,t.even=function(e){return e%2==0},t.falsy=function(e){return!e},t.ge=function(e,t){return e>=t},t.greaterthan=function(e,t){return e>t},t.gt=t.greaterthan,t.le=function(e,t){return e<=t},t.lessthan=function(e,t){return e0)for(var i=e;it;o+=n)r.push(o);return r},cycler:function(){return e=Array.prototype.slice.call(arguments),t=-1,{current:null,reset:function(){t=-1,this.current=null},next:function(){return++t>=e.length&&(t=0),this.current=e[t],this.current}};var e,t},joiner:function(e){return function(e){e=e||",";var t=!0;return function(){var n=t?"":e;return t=!1,n}}(e)}}}},function(e,t,n){var r=n(4);e.exports=function(e,t){function n(e,t){if(this.name=e,this.path=e,this.defaultEngine=t.defaultEngine,this.ext=r.extname(e),!this.ext&&!this.defaultEngine)throw new Error("No default engine was specified and no extension was provided.");this.ext||(this.name+=this.ext=("."!==this.defaultEngine[0]?".":"")+this.defaultEngine)}return n.prototype.render=function(t,n){e.render(this.name,t,n)},t.set("view",n),t.set("nunjucksEnv",e),e}},function(e,t,n){"use strict";var r=n(4),i=n(4),o=n(0)._prettifyError,s=n(5),a=n(7).Environment,u=n(24);function c(e,t){return!!Array.isArray(t)&&t.some((function(t){return e.match(t)}))}function l(e,t){(t=t||{}).isString=!0;var n=t.env||new a([]),r=t.wrapper||u;if(!t.name)throw new Error('the "name" option is required when compiling a string');return r([h(e,t.name,n)],t)}function h(e,t,n){var r,i=(n=n||new a([])).asyncFilters,u=n.extensionsList;t=t.replace(/\\/g,"/");try{r=s.compile(e,i,u,t,n.opts)}catch(e){throw o(t,!1,e)}return{name:t,template:r}}e.exports={precompile:function(e,t){var n=(t=t||{}).env||new a([]),o=t.wrapper||u;if(t.isString)return l(e,t);var s=r.existsSync(e)&&r.statSync(e),f=[],p=[];if(s.isFile())f.push(h(r.readFileSync(e,"utf-8"),t.name||e,n));else if(s.isDirectory()){!function n(o){r.readdirSync(o).forEach((function(s){var a=i.join(o,s),u=a.substr(i.join(e,"/").length),l=r.statSync(a);l&&l.isDirectory()?c(u+="/",t.exclude)||n(a):c(u,t.include)&&p.push(a)}))}(e);for(var d=0;de.length||i>0&&s>=r||i<0&&s<=r);s+=i)o.push(n.memberLookup(e,s));return o}function p(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var d={pop:function(e){if(void 0===e)return this.pop();if(e>=this.length||e<0)throw new Error("KeyError");return this.splice(e,1)},append:function(e){return this.push(e)},remove:function(e){for(var t=0;t1){t[0]=t[0].slice(0,-1);for(var r=t.length-1,i=1;i= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=Math.floor,y=String.fromCharCode;function v(e){throw new RangeError(d[e])}function g(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+function(e,t){for(var n=[],r=e.length;r--;)n[r]=t(e[r]);return n}((e=e.replace(p,".")).split("."),t).join(".")}function _(e){for(var t=[],n=0,r=e.length;n=55296&&i<=56319&&n>1,e+=m(e/t);e>455;r+=l)e=m(e/35);return m(r+36*e/(e+38))},x=function(e){var t,n=[],r=e.length,i=0,o=128,s=72,a=e.lastIndexOf("-");a<0&&(a=0);for(var u=0;u=128&&v("not-basic"),n.push(e.charCodeAt(u));for(var h=a>0?a+1:0;h=r&&v("invalid-input");var y=(t=e.charCodeAt(h++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:l;(y>=l||y>m((c-i)/p))&&v("overflow"),i+=y*p;var g=d<=s?1:d>=s+26?26:d-s;if(ym(c/_)&&v("overflow"),p*=_}var b=n.length+1;s=w(i-f,b,0==f),m(i/b)>c-o&&v("overflow"),o+=m(i/b),i%=b,n.splice(i++,0,o)}return String.fromCodePoint.apply(String,n)},k=function(e){var t=[],n=(e=_(e)).length,r=128,i=0,o=72,s=!0,a=!1,u=void 0;try{for(var h,f=e[Symbol.iterator]();!(s=(h=f.next()).done);s=!0){var p=h.value;p<128&&t.push(y(p))}}catch(e){a=!0,u=e}finally{try{!s&&f.return&&f.return()}finally{if(a)throw u}}var d=t.length,g=d;for(d&&t.push("-");g=r&&Om((c-i)/N)&&v("overflow"),i+=(x-r)*N,r=x;var P=!0,C=!1,R=void 0;try{for(var L,I=e[Symbol.iterator]();!(P=(L=I.next()).done);P=!0){var D=L.value;if(Dc&&v("overflow"),D==r){for(var M=i,j=l;;j+=l){var F=j<=o?1:j>=o+26?26:j-o;if(M>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function A(e){for(var t="",n=0,r=e.length;n=194&&i<224){if(r-n>=6){var o=parseInt(e.substr(n+4,2),16);t+=String.fromCharCode((31&i)<<6|63&o)}else t+=e.substr(n,6);n+=6}else if(i>=224){if(r-n>=9){var s=parseInt(e.substr(n+4,2),16),a=parseInt(e.substr(n+7,2),16);t+=String.fromCharCode((15&i)<<12|(63&s)<<6|63&a)}else t+=e.substr(n,9);n+=9}else t+=e.substr(n,3),n+=3}return t}function O(e,t){function n(e){var n=A(e);return n.match(t.UNRESERVED)?n:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,n).replace(t.NOT_USERINFO,T).replace(t.PCT_ENCODED,i)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_HOST,T).replace(t.PCT_ENCODED,i)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,n).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,T).replace(t.PCT_ENCODED,i)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,n).replace(t.NOT_QUERY,T).replace(t.PCT_ENCODED,i)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,n).replace(t.NOT_FRAGMENT,T).replace(t.PCT_ENCODED,i)),e}function N(e){return e.replace(/^0*(.*)/,"$1")||"0"}function P(e,t){var n=e.match(t.IPV4ADDRESS)||[],r=u(n,2)[1];return r?r.split(".").map(N).join("."):e}function C(e,t){var n=e.match(t.IPV6ADDRESS)||[],r=u(n,3),i=r[1],o=r[2];if(i){for(var s=i.toLowerCase().split("::").reverse(),a=u(s,2),c=a[0],l=a[1],h=l?l.split(":").map(N):[],f=c.split(":").map(N),p=t.IPV4ADDRESS.test(f[f.length-1]),d=p?7:8,m=f.length-d,y=Array(d),v=0;v1){var b=y.slice(0,g.index),w=y.slice(g.index+g.length);_=b.join(":")+"::"+w.join(":")}else _=y.join(":");return o&&(_+="%"+o),_}return e}var R=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,L=void 0==="".match(/(){0}/)[1];function I(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={},r=!1!==t.iri?a:s;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var i=e.match(R);if(i){L?(n.scheme=i[1],n.userinfo=i[3],n.host=i[4],n.port=parseInt(i[5],10),n.path=i[6]||"",n.query=i[7],n.fragment=i[8],isNaN(n.port)&&(n.port=i[5])):(n.scheme=i[1]||void 0,n.userinfo=-1!==e.indexOf("@")?i[3]:void 0,n.host=-1!==e.indexOf("//")?i[4]:void 0,n.port=parseInt(i[5],10),n.path=i[6]||"",n.query=-1!==e.indexOf("?")?i[7]:void 0,n.fragment=-1!==e.indexOf("#")?i[8]:void 0,isNaN(n.port)&&(n.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?i[4]:void 0)),n.host&&(n.host=C(P(n.host,r),r)),void 0!==n.scheme||void 0!==n.userinfo||void 0!==n.host||void 0!==n.port||n.path||void 0!==n.query?void 0===n.scheme?n.reference="relative":void 0===n.fragment?n.reference="absolute":n.reference="uri":n.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==n.reference&&(n.error=n.error||"URI is not a "+t.reference+" reference.");var o=S[(t.scheme||n.scheme||"").toLowerCase()];if(t.unicodeSupport||o&&o.unicodeSupport)O(n,r);else{if(n.host&&(t.domainHost||o&&o.domainHost))try{n.host=E.toASCII(n.host.replace(r.PCT_ENCODED,A).toLowerCase())}catch(e){n.error=n.error||"Host's domain name can not be converted to ASCII via punycode: "+e}O(n,s)}o&&o.parse&&o.parse(n,t)}else n.error=n.error||"URI can not be parsed.";return n}var D=/^\.\.?\//,M=/^\/\.(\/|$)/,j=/^\/\.\.(\/|$)/,F=/^\/?(?:.|\n)*?(?=\/|$)/;function B(e){for(var t=[];e.length;)if(e.match(D))e=e.replace(D,"");else if(e.match(M))e=e.replace(M,"/");else if(e.match(j))e=e.replace(j,"/"),t.pop();else if("."===e||".."===e)e="";else{var n=e.match(F);if(!n)throw new Error("Unexpected dot segment condition");var r=n[0];e=e.slice(r.length),t.push(r)}return t.join("")}function U(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.iri?a:s,r=[],i=S[(t.scheme||e.scheme||"").toLowerCase()];if(i&&i.serialize&&i.serialize(e,t),e.host)if(n.IPV6ADDRESS.test(e.host));else if(t.domainHost||i&&i.domainHost)try{e.host=t.iri?E.toUnicode(e.host):E.toASCII(e.host.replace(n.PCT_ENCODED,A).toLowerCase())}catch(n){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+n}O(e,n),"suffix"!==t.reference&&e.scheme&&(r.push(e.scheme),r.push(":"));var o=function(e,t){var n=!1!==t.iri?a:s,r=[];return void 0!==e.userinfo&&(r.push(e.userinfo),r.push("@")),void 0!==e.host&&r.push(C(P(String(e.host),n),n).replace(n.IPV6ADDRESS,(function(e,t,n){return"["+t+(n?"%25"+n:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(r.push(":"),r.push(String(e.port))),r.length?r.join(""):void 0}(e,t);if(void 0!==o&&("suffix"!==t.reference&&r.push("//"),r.push(o),e.path&&"/"!==e.path.charAt(0)&&r.push("/")),void 0!==e.path){var u=e.path;t.absolutePath||i&&i.absolutePath||(u=B(u)),void 0===o&&(u=u.replace(/^\/\//,"/%2F")),r.push(u)}return void 0!==e.query&&(r.push("?"),r.push(e.query)),void 0!==e.fragment&&(r.push("#"),r.push(e.fragment)),r.join("")}function z(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={};return arguments[3]||(e=I(U(e,n),n),t=I(U(t,n),n)),!(n=n||{}).tolerant&&t.scheme?(r.scheme=t.scheme,r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=B(t.path||""),r.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=B(t.path||""),r.query=t.query):(t.path?("/"===t.path.charAt(0)?r.path=B(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?r.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:r.path=t.path:r.path="/"+t.path,r.path=B(r.path)),r.query=t.query):(r.path=e.path,void 0!==t.query?r.query=t.query:r.query=e.query),r.userinfo=e.userinfo,r.host=e.host,r.port=e.port),r.scheme=e.scheme),r.fragment=t.fragment,r}function V(e,t){return e&&e.toString().replace(t&&t.iri?a.PCT_ENCODED:s.PCT_ENCODED,A)}var $={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var n="https"===String(e.scheme).toLowerCase();return e.port!==(n?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},q={scheme:"https",domainHost:$.domainHost,parse:$.parse,serialize:$.serialize};function K(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var H={scheme:"ws",domainHost:!0,parse:function(e,t){var n=e;return n.secure=K(n),n.resourceName=(n.path||"/")+(n.query?"?"+n.query:""),n.path=void 0,n.query=void 0,n},serialize:function(e,t){if(e.port!==(K(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var n=e.resourceName.split("?"),r=u(n,2),i=r[0],o=r[1];e.path=i&&"/"!==i?i:void 0,e.query=o,e.resourceName=void 0}return e.fragment=void 0,e}},W={scheme:"wss",domainHost:H.domainHost,parse:H.parse,serialize:H.serialize},G={},Y="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Q="[0-9A-Fa-f]",X=n(n("%[EFef]"+Q+"%"+Q+Q+"%"+Q+Q)+"|"+n("%[89A-Fa-f]"+Q+"%"+Q+Q)+"|"+n("%"+Q+Q)),Z=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),J=new RegExp(Y,"g"),ee=new RegExp(X,"g"),te=new RegExp(t("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',Z),"g"),ne=new RegExp(t("[^]",Y,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),re=ne;function ie(e){var t=A(e);return t.match(J)?t:e}var oe={scheme:"mailto",parse:function(e,t){var n=e,r=n.to=n.path?n.path.split(","):[];if(n.path=void 0,n.query){for(var i=!1,o={},s=n.query.split("&"),a=0,u=s.length;a{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON Schema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},198:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{default:()=>En});var e=n(916),t=n(19),i=n.n(t);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{blockType:null,provider:null};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=l(this,t,[a(a({},n),{},{defaultWidth:n.isContainer?186:96,defaultHeight:n.isContainer?160:80,minWidth:n.isContainer?186:96,minHeight:n.isContainer?140:80,reservedWidth:n.isContainer?12:0,reservedHeight:n.isContainer?80:0,margin:15,gap:50})])).blockType=n.blockType||null,e.provider=n.provider||null,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(t,e),function(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}(t)}(e.ComponentDefinition);const m=d;function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function v(e,t,n){return t=_(t),function(e,t){if(t&&("object"==y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,g()?Reflect.construct(t,n||[],_(e).constructor):t.apply(e,n))}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(g=function(){return!!e})()}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}var w=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{linkAttribute:"id"};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=v(this,t,[n])).linkAttribute=n.linkAttribute||"id",e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b(e,t)}(t,e),function(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}(t)}(e.ComponentAttributeDefinition);const x=w,k={$id:"https://ditrit.io/schemas",type:"object",properties:{name:{type:"string"},model:{type:"string"},icon:{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/attribute"}},data:{type:"array",items:{$ref:"#/definitions/data"}},modules:{type:"array",items:{$ref:"#/definitions/module"}},resources:{type:"array",items:{$ref:"#/definitions/resource"}},variables:{type:"array",items:{$ref:"#/definitions/variable"}},displayName:{type:"string"},description:{type:"string"},url:{type:"string"}},required:["name","attributes","data","modules","resources","variables"],definitions:{defaultObject:{type:"object",properties:{type:{type:"string"},model:{type:"string"},icon:{type:"string"},isContainer:{type:"boolean"},attributes:{type:"array",items:{$ref:"#/definitions/attribute"}},displayName:{type:"string"},description:{type:"string"},url:{type:"string"}},required:["type","attributes"]},attribute:{type:"object",properties:{name:{type:"string"},type:{type:"string",pattern:"(String|Boolean|Number|Array|Object|Link|Reference)"},required:{type:"boolean"},linkType:{type:"string",pattern:"(Default|Reverse)"},linkRef:{type:"string"},containerRef:{type:"string"},attributes:{type:"array",items:{$ref:"#/definitions/attribute"}},rules:{$ref:"#/definitions/rule"},displayName:{type:"string"},description:{type:"string"},url:{type:"string"}},required:["name","type"]},rule:{type:"object",properties:{values:{type:"array",items:{type:"string"}},min:{type:"integer"},max:{type:"integer"},regex:{type:"string"}}},data:{$ref:"#/definitions/defaultObject"},module:{$ref:"#/definitions/defaultObject"},resource:{$ref:"#/definitions/defaultObject"},variable:{$ref:"#/definitions/defaultObject"}}},E={aws:JSON.parse('{"name":"aws","displayName":"AWS provider","description":"Use the Amazon Web Services (AWS) provider to interact with the many resources supported by AWS.","icon":"aws","model":"DefaultModel","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs","attributes":[{"name":"region","displayName":"Region","description":"AWS service endpoints","required":true,"type":"String","url":"https://docs.aws.amazon.com/general/latest/gr/rande.html"},{"name":"skip_region_validation","displayName":"Skip region validation","description":"Define if region validation should be skipped or not.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#skip_region_validation"},{"name":"access_key","displayName":"Access key","description":"The ID of the access key to allow Terraform requests to authenticate with.","type":"String","url":"https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html"},{"name":"secret_key","displayName":"Secret key","description":"The secret key to allow Terraform requests to authenticate with.","type":"String","url":"https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html"},{"name":"token","displayName":"Token","description":"Used to validate session temporary credentials.","type":"String","url":"https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html"},{"name":"allowed_account_ids","displayName":"Allowed Account IDs","description":"List of allowed AWS account IDs to prevent you from mistakenly
using an incorrect one (and potentially end up destroying a live environment).","type":"Array","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#allowed_account_ids"},{"name":"forbidden_account_ids","displayName":"Forbidden Account IDs","description":"List of forbidden AWS account IDs to prevent you from mistakenly
using an incorrect one (and potentially end up destroying a live environment).","type":"Array","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#forbidden_account_ids"},{"name":"skip_requesting_account_id","displayName":"Skip requesting account ID","description":"Whether to skip requesting the account ID or not.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#skip_requesting_account_id"},{"name":"custom_ca_bundle","displayName":"Custom Certificate Authority (CA) bundle","description":"File containing custom root and intermediate certificates.","type":"String","url":"https://docs.aws.amazon.com/privateca/latest/userguide/PcaWelcome.html"},{"name":"insecure","displayName":"Insecure","description":"Whether to explicitly allow the provider to perform \\"insecure\\" SSL requests or not.","type":"Boolean","url":"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html"},{"name":"ec2_metadata_service_endpoint","displayName":"EC2 metadata service (IMDS) endpoint","description":"Address of the EC2 metadata service (IMDS) endpoint to use.","type":"String","url":"https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environments-cfg-ec2-imds.html"},{"name":"ec2_metadata_service_endpoint_mode","displayName":"EC2 metadata service (IMDS) endpoint mode","description":"Communication mode to use with the metadata service.","type":"String","url":"https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environments-cfg-ec2-imds.html","rules":{"values":["IPv4","IPv6"]}},{"name":"http_proxy","displayName":"HTTP proxy","description":"Address of an HTTP proxy to use when accessing the AWS API.","type":"String","url":"https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-http.html","rules":{"regex":"[-a-zA-Z0-9@:%._\\\\+~#=]{1,256}\\\\.[a-zA-Z0-9()]{1,6}\\\\b([-a-zA-Z0-9()@:%_\\\\+.~#?&//=]*)"}},{"name":"max_retries","displayName":"Max retries","description":"Maximum number of times an API call is retried when AWS throttles requests or on transient failures.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#max_retries"},{"name":"profile","displayName":"Profile","description":"AWS profile name as set in the shared configuration and credentials files.","type":"String","url":"https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html"},{"name":"shared_config_files","displayName":"Shared config files","description":"List of paths to AWS shared config files.","type":"String","url":"https://docs.aws.amazon.com/sdkref/latest/guide/file-format.html"},{"name":"shared_credentials_files","displayName":"Shared credentials files","description":"List of paths to the shared credentials files.","type":"String","url":"https://docs.aws.amazon.com/sdkref/latest/guide/file-format.html"},{"name":"skip_credentials_validation","displayName":"Skip credentials validation","description":"Whether to skip credentials validation via the STS API or not.","type":"Boolean","url":"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html"},{"name":"sts_region","displayName":"Security Token Servic (STS) region","description":"AWS region for Security Token Service (STS)","type":"String","url":"https://docs.aws.amazon.com/STS/latest/APIReference/welcome.html"},{"name":"s3_use_path_style","displayName":"Use path-style for S3","description":"Whether to enable the request to use path-style addressing or not
i.e., https://s3.amazonaws.com/BUCKET/KEY.","type":"Boolean","url":"https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html"},{"name":"skip_metadata_api_check","displayName":"Skip metadata API check","description":"Whether to skip the AWS Metadata API check or not.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#skip_metadata_api_check"},{"name":"use_dualstack_endpoint","displayName":"Use dual-stack endpoint","description":"Force the provider to resolve endpoints with DualStack capability.","type":"Boolean","url":"https://docs.aws.amazon.com/AmazonS3/latest/userguide/dual-stack-endpoints.html"},{"name":"use_fips_endpoint","displayName":"Use FIPS endpoint","description":"Force the provider to resolve endpoints with FIPS capability.","type":"Boolean","url":"https://aws.amazon.com/compliance/fips/"},{"name":"assume_role","displayName":"Assume role","description":"Set of temporary security credentials that you can use to access AWS resources.","type":"Object","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#assume_role","attributes":[{"name":"duration","displayName":"Duration","description":"Duration of the assume role session.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#duration"},{"name":"external_id","displayName":"External ID","description":"External identifier to use when assuming the role.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#external_id"},{"name":"policy","displayName":"Policy","description":"IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#policy"},{"name":"policy_arns","displayName":"Policy ARNs","description":"Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#policy_arns"},{"name":"role_arn","displayName":"Role ARN","description":"ARN of the IAM Role to assume. Can also be set with the AWS_ROLE_ARN environment variable.","required":true,"type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#role_arn"},{"name":"session_name","displayName":"Session name","description":"Session name to use when assuming the role. Can also be set with the AWS_ROLE_SESSION_NAME environment variable.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#session_name"},{"name":"source_identity","displayName":"Source identity","description":"Source identity specified by the principal assuming the role.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#source_identity"},{"name":"tags","displayName":"Tags","description":"Map of assume role session tags.","type":"Array","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#tags"},{"name":"transitive_tag_keys","displayName":"Transitive tag keys","description":"Set of assume role session tag keys to pass to any subsequent sessions.","type":"Array","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#transitive_tag_keys"}]},{"name":"assume_role_with_web_identity","displayName":"Assume role with web identity","description":"Configuration block for assuming an IAM role using a web identity.","type":"Object","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#assume_role_with_web_identity","attributes":[{"name":"duration","displayName":"Duration","description":"Duration of the assume role session.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#duration"},{"name":"policy","displayName":"Policy","description":"IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#policy"},{"name":"policy_arns","displayName":"Policy ARNs","description":"Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#policy_arns"},{"name":"role_arn","displayName":"Role ARN","description":"ARN of the IAM Role to assume. Can also be set with the AWS_ROLE_ARN environment variable.","required":true,"type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#role_arn"},{"name":"session_name","displayName":"Session name","description":"Session name to use when assuming the role. Can also be set with the AWS_ROLE_SESSION_NAME environment variable.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#session_name"},{"name":"web_identity_token","displayName":"Web identity token","description":"Value of a web identity token from an OpenID Connect (OIDC) or OAuth provider. One of web_identity_token or web_identity_token_file is required.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#web_identity_token"},{"name":"web_identity_token_file","displayName":"Web identity token file","description":"File containing a web identity token from an OpenID Connect (OIDC) or OAuth provider. One of web_identity_token_file or web_identity_token is required. Can also be set with the AWS_WEB_IDENTITY_TOKEN_FILE environment variable.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#web_identity_token_file"}]},{"name":"default_tags","displayName":"Default tags","description":"You can assign metadata to your AWS resources in the form of tags.
Each tag is a label consisting of a user-defined key and value.
Tags can help you manage, identify, organize, search for, and filter resources.","type":"Object","url":"https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html","attributes":[{"name":"tags","displayName":"Tags","description":"Key-value map of tags to apply to all resources.","type":"Object","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#tags"}]},{"name":"ignore_tags","displayName":"Ignore tags","description":"Configuration block with resource tag settings to ignore across all resources handled by this provider
(except any individual service tag resources such as aws_ec2_tag)
for situations where external systems are managing certain resource tags.","type":"Object","url":"https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html","attributes":[{"name":"keys","displayName":"Keys","description":"List of exact resource tag keys to ignore across all resources handled by this provider.","type":"Array","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#keys"},{"name":"key_prefixes","displayName":"Key prefixes","description":"List of resource tag key prefixes to ignore across all resources handled by this provider.","type":"Array","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#key_prefixes"}]},{"name":"endpoints","displayName":"Endpoints","description":"Configure the Terraform AWS Provider to use customized endpoints.","type":"Object","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/guides/custom-service-endpoints"}],"data":[{"type":"aws_ami","displayName":"Amazon Machine Image (AMI)","description":"An Amazon Machine Image (AMI) is a supported and maintained image provided by AWS
that provides the information required to launch an instance.","icon":"Aws_EC2_AMI","model":"DefaultModel","url":"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html","attributes":[{"name":"owners","displayName":"Owners","description":"List of AMI owners to limit search.","type":"Array","url":"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html"},{"name":"most_recent","displayName":"Most recent","description":"If more than one result is returned, use the most recent AMI.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ami#most_recent"},{"name":"executable_users","displayName":"Executable users","description":"Limit search to users with explicit launch permission on the image.","type":"Array","url":"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users.html"},{"name":"include_deprecated","displayName":"Include deprecated","description":"If true, all deprecated AMIs are included in the response.","type":"Boolean","url":"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-deprecate.html"},{"name":"name_regex","displayName":"Name regex","description":"Regex string to apply to the AMI list returned by AWS.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ami#name_regex"}]},{"type":"aws_rds_engine_version","displayName":"Relational Database Service engine version","description":"Information about a Relational Database Service engine version.

Amazon Relational Database Service (Amazon RDS) is a web service
that makes it easier to set up, operate, and scale a relational database in the AWS Cloud.","icon":"Aws_RDS","model":"DefaultModel","url":"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Welcome.html","attributes":[{"name":"engine","displayName":"Engine","description":"A DB engine is the specific relational database software that runs on your DB instance.","required":true,"type":"String","url":"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Welcome.html#Welcome.Concepts.DBInstance.engine","rules":{"values":["aurora","aurora-mysql","aurora-postgresql","docdb","mariadb","mysql","neptune","oracle-ee","oracle-se","oracle-se1","oracle-se2","postgres","sqlserver-ee","sqlserver-ex","sqlserver-se","sqlserver-web"]}},{"name":"default_only","displayName":"Default only","description":"When set to true, the default version for the specified engine or combination of engine and major version will be returned.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/rds_engine_version#default_only"},{"name":"version","displayName":"Version","description":"Version of the DB engine.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/rds_engine_version#version"},{"name":"preferred_versions","displayName":"Preferred versions","description":"Ordered list of preferred engine versions.","type":"Array","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/rds_engine_version#preferred_versions"},{"name":"include_all","displayName":"Include all","description":"When set to true, the specified version or member of prefered versions will be returned even if it is deprecated.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/rds_engine_version#include_all"},{"name":"parameter_group_family","displayName":"Parameter group family","description":"Name of a specific DB parameter group family.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/rds_engine_version#parameter_group_family"}]},{"type":"aws_availability_zones","displayName":"Availability Zones","description":"The Availability Zones data source allows access to the list of AWS Availability Zones
which can be accessed by an AWS account within the region configured in the provider.

This is different from the Availability Zone (singular).","icon":"Aws_Local-Zones","model":"DefaultModel","url":"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html","attributes":[{"name":"all_availability_zones","displayName":"All Availability Zones","description":"Set to true to include all Availability Zones and Local Zones regardless of your opt in status.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/availability_zones#all_availability_zones"},{"name":"exclude_names","displayName":"Exclude names","description":"List of Availability Zone names to exclude.","type":"Array","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/availability_zones#exclude_names"},{"name":"exclude_zone_ids","displayName":"Exclude zone IDs","description":"List of Availability Zone IDs to exclude.","type":"Array","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/availability_zones#exclude_zone_ids"},{"name":"state","displayName":"State","description":"Allows to filter list of Availability Zones based on their current state.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/availability_zones#state","rules":{"values":["available","impaired","information","unavailable"]}}]}],"modules":[{"type":"server","displayName":"Server","icon":"Aws_Servers","model":"DefaultModel"}],"resources":[{"type":"aws_security_group","displayName":"Security group","description":"A security group controls the traffic that is allowed to reach and leave the resources that it is associated with.","icon":"AwsSecurityGroup","model":"DefaultModel","url":"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html","attributes":[{"name":"description","displayName":"Description","description":"Description of the security group.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#description"},{"name":"name","displayName":"Name","description":"Name of the security group.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#name"},{"name":"name_prefix","displayName":"Name prefix","description":"Creates a unique name beginning with the specified prefix.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#name_prefix"},{"name":"revoke_rules_on_delete","displayName":"Revoke rules on delete","description":"Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#revoke_rules_on_delete"},{"name":"vpc_id","displayName":"VPC ID","description":"The ID of the VPC for which to create the security group.","containerRef":"aws_vpc","linkAttribute":"id","linkRef":"aws_vpc","linkType":"Default","linkModel":"defaultLink","type":"Link","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#vpc_id"},{"name":"egress","displayName":"Egress","description":"Configuration block for egress rules","type":"Object","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#egress","attributes":[{"name":"from_port","displayName":"From port","description":"Start port (or ICMP type number if protocol is icmp).","required":true,"type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#from_port"},{"name":"to_port","displayName":"To port","description":"End port (or ICMP code if protocol is icmp).","required":true,"type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#to_port"},{"name":"protocol","displayName":"Protocol","description":"The protocol. If not icmp, tcp, udp, or all use the -1 protocol number.","required":true,"type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#protocol"},{"name":"cidr_blocks","displayName":"CIDR blocks","description":"List of CIDR blocks.","type":"Array","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#cidr_blocks"},{"name":"ipv6_cidr_blocks","displayName":"IPv6 CIDR blocks","description":"List of IPv6 CIDR blocks.","type":"Array","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#ipv6_cidr_blocks"}]},{"name":"ingress","displayName":"Ingress","description":"Configuration block for Ingress rules","type":"Object","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#ingress","attributes":[{"name":"from_port","displayName":"From port","description":"Start port (or ICMP type number if protocol is icmp).","required":true,"type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#from_port"},{"name":"to_port","displayName":"To port","description":"End port (or ICMP code if protocol is icmp).","required":true,"type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#to_port"},{"name":"protocol","displayName":"Protocol","description":"The protocol. If not icmp, tcp, udp, or all use the -1 protocol number.","required":true,"type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#protocol"},{"name":"cidr_blocks","displayName":"CIDR blocks","description":"List of CIDR blocks.","type":"Array","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#cidr_blocks"},{"name":"ipv6_cidr_blocks","displayName":"IPv6 CIDR blocks","description":"List of IPv6 CIDR blocks.","type":"Array","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#ipv6_cidr_blocks"}]},{"name":"tags","displayName":"Tags","description":"A map of tags to assign to the resource.","type":"Object","url":"https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html"}]},{"type":"aws_instance","displayName":"EC2 Instance","description":"Provides an EC2 instance resource.","icon":"Aws_EC2-Instance","model":"DefaultModel","url":"https://docs.aws.amazon.com/ec2/index.html","attributes":[{"name":"security_groups","displayName":"Security groups","description":"List of security group names to associate with.","linkAttribute":"name","linkRef":"aws_security_group","linkType":"Reverse","linkModel":"defaultLink","type":"Link","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance#security_groups"},{"name":"vpc_security_group_ids","displayName":"VPC security group IDs","description":"List of security group IDs to associate with.","linkAttribute":"id","linkRef":"aws_security_group","linkType":"Reverse","linkModel":"defaultLink","type":"Link","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance#vpc_security_group_ids"},{"name":"subnet_id","displayName":"Subnet ID","description":"The VPC Subnet ID to launch in.","linkAttribute":"id","linkRef":"aws_subnet","linkType":"Default","linkModel":"defaultLink","type":"Link","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance#subnet_id"}]},{"type":"aws_volume_attachment","displayName":"AWS volume attachment","description":"Attach an EBS volume to one or more instances","icon":"Aws_Elastic-Block-Store_Volume","model":"DefaultModel","url":"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html","attributes":[{"name":"device_name","displayName":"Device name","description":"The device name to expose to the instance (for example, /dev/sdh or xvdh).","required":true,"type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/volume_attachment#device_name"},{"name":"volume_id","displayName":"Volume ID","description":"The ID of the Volume to attach to.","linkAttribute":"id","linkRef":"aws_ebs_volume","linkType":"Default","linkModel":"defaultLink","required":true,"type":"Link","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/volume_attachment#volume_id"},{"name":"instance_id","displayName":"Instance ID","description":"The ID of the Instance to attach to.","linkAttribute":"id","linkRef":"aws_instance","linkType":"Default","linkModel":"defaultLink","required":true,"type":"Link","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/volume_attachment#instance_id"}]},{"type":"aws_ebs_volume","displayName":"EBS Volume","description":"A durable, block-level storage device that you can attach to your instances.","icon":"Aws_Elastic-Block-Store_Volume","model":"DefaultModel","url":"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volumes.html","attributes":[{"name":"availability_zone","displayName":"Availability zone","description":"The Availability Zone where the EBS volume will exist.","required":true,"type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ebs_volume#availability_zone"}]},{"type":"aws_elb","displayName":"AWS ELB","description":"Automatically distributes incoming application traffic across multiple targets and virtual appliances in one or more Availability Zones.","icon":"Aws_Elastic-Load-Balancing_Network-Load-Balancer","model":"DefaultModel","url":"https://aws.amazon.com/elasticloadbalancing/","attributes":[{"name":"listener","displayName":"Listener","description":"A list of listener blocks. Each listener block supports fields documented below.","required":true,"type":"Object","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elb#listener","attributes":[{"name":"instance_port","displayName":"Instance port","description":"The port on the instance to route to.","required":true,"type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elb#instance_port"},{"name":"lb_port","displayName":"LB port","description":"The port to listen on for the load balancer.","required":true,"type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elb#lb_port"},{"name":"lb_protocol","displayName":"LB protocol","description":"The protocol to listen on. Valid values are HTTP, HTTPS, TCP, or SSL.","required":true,"type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elb#lb_protocol"},{"name":"instance_protocol","displayName":"Instance protocol","description":"The protocol to use to the instance. Valid values are HTTP, HTTPS, TCP, or SSL.","required":true,"type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elb#instance_protocol"}]},{"name":"subnets","displayName":"Subnets","description":"A list of subnet IDs to attach to the ELB.","linkAttribute":"id","linkRef":"aws_subnet","linkType":"Default","linkModel":"defaultLink","type":"Link","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elb#subnets"},{"name":"security_groups","displayName":"Security groups","description":"A list of security group IDs to assign to the ELB.","linkAttribute":"id","linkRef":"aws_security_group","linkType":"Default","linkModel":"defaultLink","type":"Link","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elb#security_groups"},{"name":"instances","displayName":"Instances","description":"A list of instance ids to place in the ELB pool.","linkAttribute":"id","linkRef":"aws_instance","linkType":"Default","linkModel":"defaultLink","type":"Link","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elb#instances"}]},{"type":"aws_vpc","displayName":"Virtual Private Cloud (VPC)","description":"Amazon Virtual Private Cloud (Amazon VPC) enables you to launch AWS resources into a virtual network that you\'ve defined.","icon":"Aws_Virtual-Private-Cloud","isContainer":true,"model":"DefaultContainer","url":"https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html","attributes":[{"name":"cidr_block","displayName":"CIDR block","description":"IPv4 CIDR block of the desired VPC.","type":"String","url":"https://docs.aws.amazon.com/vpc/latest/userguide/configure-your-vpc.html","rules":{"regex":"^([0-9]{1,3}\\\\.){3}[0-9]{1,3}(\\\\/([0-9]|[1-2][0-9]|3[0-2]))?$"}},{"name":"ipv4_ipam_pool_id","displayName":"IPv4 IPAM pool ID","description":"ID of an IPv4 IPAM pool you want to use for allocating this VPC\'s CIDR.","type":"String","url":"https://docs.aws.amazon.com/vpc/latest/ipam/what-it-is-ipam.html"},{"name":"ipv4_netmask_length","displayName":"IPv4 netmask length","description":"Netmask length of the IPv4 CIDR you want to allocate to this VPC.","type":"Number","url":"https://docs.aws.amazon.com/vpc/latest/userguide/configure-your-vpc.html","rules":{"max":32,"min":1}},{"name":"ipv6_cidr_block","displayName":"IPv6 CIDR block","description":"IPv6 CIDR block to request from an IPAM Pool.","type":"String","url":"https://docs.aws.amazon.com/vpc/latest/userguide/configure-your-vpc.html","rules":{"regex":"[a-fA-F0-9]{4}(:[a-fA-F0-9]{4}){7}"}},{"name":"ipv6_ipam_pool_id","displayName":"IPv6 IPAM pool ID","description":"IPAM Pool ID for a IPv6 pool","type":"String","url":"https://docs.aws.amazon.com/vpc/latest/ipam/what-it-is-ipam.html"},{"name":"ipv6_netmask_length","displayName":"IPv6 netmask length","description":"Netmask length to request from IPAM Pool.","type":"Number","url":"https://docs.aws.amazon.com/vpc/latest/userguide/configure-your-vpc.html","rules":{"values":[56]}},{"name":"ipv6_cidr_block_network_border_group","displayName":"IPv6 CIDR block network border group","description":"Restrict advertisement of public addresses to specific Network Border Groups such as LocalZones.","type":"String","url":"https://docs.aws.amazon.com/vpc/latest/userguide/Extend_VPCs.html"},{"name":"instance_tenancy","displayName":"Instance tenancy","description":"Allowed tenancy of instances launched into the selected VPC.","type":"String","url":"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html","rules":{"values":["default","dedicated"]}},{"name":"enable_dns_support","displayName":"Enable DNS support","description":"Enable DNS support in the VPC.","type":"Boolean","url":"https://docs.aws.amazon.com/vpc/latest/userguide/vpc-dns.html"},{"name":"enable_dns_hostnames","displayName":"Enable DNS hostnames","description":"Enable DNS hostnames in the VPC.","type":"Boolean","url":"https://docs.aws.amazon.com/vpc/latest/userguide/vpc-dns.html"},{"name":"enable_classiclink","displayName":"Enable ClassicLink","description":"Enable ClassicLink for the VPC, allowing you to link EC2-Classic instances to the VPC.","type":"Boolean","url":"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html"},{"name":"enable_classiclink_dns_support","displayName":"Enable ClassicLink DNS support","description":"Enable ClassicLink DNS Support for the VPC.
If set to true, DNS hostnames that are addressed between linked EC2-Classic instances and instances in the VPC will resolve to private IP addresses.","type":"Boolean","url":"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html"},{"name":"assign_generated_ipv6_cidr_block","displayName":"Assign generated IPv6 CIDR block","description":"Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC.","type":"Boolean","url":"https://docs.aws.amazon.com/vpc/latest/userguide/configure-your-vpc.html"},{"name":"enable_network_address_usage_metrics","displayName":"Enable network address usage metrics","description":"Enable network address usage metrics for the VPC.","type":"Boolean","url":"https://docs.aws.amazon.com/vpc/latest/userguide/network-address-usage.html"},{"name":"tags","displayName":"Tags","description":"A map of tags to assign to the resource.","type":"Object","url":"https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html"}]},{"type":"aws_internet_gateway","displayName":"Internet gateway","description":"An internet gateway is a horizontally scaled, redundant, and highly available VPC component
that allows communication between your VPC and the internet.","icon":"Aws_VPC_Internet-Gateway","model":"DefaultModel","url":"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Internet_Gateway.html","attributes":[{"name":"vpc_id","displayName":"VPC ID","description":"The VPC ID to create the gateway in.","containerRef":"aws_vpc","type":"Reference","url":"https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html"},{"name":"tags","displayName":"Tags","description":"A map of tags to assign to the resource.","type":"Object","url":"https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html"}]},{"type":"aws_route","displayName":"AWS route","description":"Contains a set of rules, called routes, that determine where network traffic from your subnet or gateway is directed.","icon":"Aws_Route-53","model":"DefaultModel","url":"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html","attributes":[{"name":"route_table_id","displayName":"Route table ID","description":"The ID of the routing table.","containerRef":"aws_route","required":true,"type":"Reference","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route#route_table_id"},{"name":"gateway_id","displayName":"Gateway ID","description":"Identifier of a VPC internet gateway or a virtual private gateway.","linkAttribute":"id","linkRef":"aws_internet_gateway","linkType":"Default","linkModel":"defaultLink","type":"Link","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route#gateway_id"}]},{"type":"aws_subnet","displayName":"Subnet","description":"A subnet is a range of IP addresses in your VPC. You can launch AWS resources into your subnets.","icon":"Aws_Mesh","model":"DefaultModel","url":"https://docs.aws.amazon.com/vpc/latest/userguide/configure-subnets.html","attributes":[{"name":"vpc_id","displayName":"VPC ID","description":"The VPC ID to create the subnet in.","containerRef":"aws_vpc","required":true,"type":"Reference","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#vpc_id"},{"name":"gateway_id","type":"Link","linkAttribute":"id","linkRef":"aws_internet_gateway","linkType":"Default","linkModel":"defaultLink"},{"name":"availability_zone","displayName":"Availability zone","description":"The Availability Zone for the subnet.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#availability_zone"},{"name":"availability_zone_id","displayName":"Availability zone ID","description":"The ID of the Availability Zone for the subnet.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#availability_zone_id"},{"name":"cidr_block","displayName":"CIDR block","description":"IPv4 CIDR block for the subnet","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#cidr_block","rules":{"regex":"^([0-9]{1,3}\\\\.){3}[0-9]{1,3}(\\\\/([0-9]|[1-2][0-9]|3[0-2]))?$"}},{"name":"customer_owned_ipv4_pool","displayName":"Customer owned IPv4 pool","description":"The ID of an address pool that you own.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#customer_owned_ipv4_pool"},{"name":"map_customer_owned_ip_on_launch","displayName":"Map customer owned IP on launch","description":"Specify true to indicate that network interfaces created in the subnet should be assigned a customer owned IP address.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#map_customer_owned_ip_on_launch"},{"name":"map_customer_ip_on_launch","displayName":"Map customer IP on launch","description":"Specify true to indicate that instances launched into the subnet should be assigned a public IP address.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#map_public_ip_on_launch"},{"name":"enable_dns64","displayName":"Enable DNS64","description":"Whether DNS queries made to the Amazon-provided DNS Resolver
in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#enable_dns64"},{"name":"assign_ipv6_address_on_creation","displayName":"Assign IPv6 address on creation","description":"Specify true to indicate that network interfaces created in the specified subnet should be assigned an IPv6 address.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#assign_ipv6_address_on_creation"},{"name":"ipv6_cidr_block","displayName":"IPv6 CIDR block","description":"The IPv6 network range for the subnet, in CIDR notation","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#ipv6_cidr_block","rules":{"regex":"[a-fA-F0-9]{4}(:[a-fA-F0-9]{4}){7}"}},{"name":"ipv6_native","displayName":"IPv6 native","description":"Whether to create an IPv6-only subnet.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#ipv6_native"},{"name":"enable_resource_name_dns_a_record_on_launch","displayName":"Enable ressource name DNS A record on launch","description":"Whether to respond to DNS queries for instance hostnames with DNS A records.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#enable_resource_name_dns_a_record_on_launch"},{"name":"enable_resource_name_dns_aaaa_record_on_launch","displayName":"Enable ressource name DNS AAAA record on launch","description":"Whether to respond to DNS queries for instance hostnames with DNS AAAA records.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#enable_resource_name_dns_aaaa_record_on_launch"},{"name":"private_dns_hostname_type_on_launch","displayName":"Private DNS hostname type on launch","description":"The type of hostnames to assign to instances in the subnet at launch.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#private_dns_hostname_type_on_launch"},{"name":"outpost_arn","displayName":"Outpost Amazon Resource Name (ARN)","description":"Amazon Resource Name (ARN) of the Outpost","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#outpost_arn"},{"name":"tags","displayName":"Tags","description":"A map of tags to assign to the resource.","type":"Object","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#tags"}]},{"type":"aws_db_subnet_group","displayName":"AWS DB subnet group","description":"A collection of subnets that you create in a VPC and that you then designate for your DB instances.","icon":"AwsDbSubnetGroup","model":"DefaultModel","url":"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html#USER_VPC.Subnets","attributes":[{"name":"subnet_ids","displayName":"Subnet IDs","description":"A list of VPC subnet IDs.","linkRef":"aws_subnet","linkType":"Default","linkModel":"defaultLink","required":true,"type":"Link","url":"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html"}]},{"type":"aws_route53_zone","displayName":"AWS route 53 zone","description":"A collection of records","icon":"Aws_Route-53-Hosted-Zone","isContainer":true,"model":"DefaultContainer","url":"https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zones-working-with.html","attributes":[{"name":"name","displayName":"Name","description":"This is the name of the hosted zone.","required":true,"type":"String","containerRef":"aws_route53_zone","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_zone#name"},{"name":"records","displayName":"Records","type":"Link","linkModel":"defaultLink","linkAttribute":"name","linkRef":"aws_route53_record","linkType":"Default"}]},{"type":"aws_route53_record","displayName":"AWS route 53 record","description":"Create records to tell the DNS how to route traffic for that domain.","icon":"Aws_Route-53_Route-Table","model":"DefaultModel","url":"https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/rrsets-working-with.html","attributes":[{"name":"zone_id","displayName":"Zone ID","description":"The ID of the hosted zone to contain this record.","containerRef":"aws_route53_zone","required":true,"type":"Reference","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record#zone_id"},{"name":"records","displayName":"Records","description":"A string list of records.","linkRef":"aws_route53_record","linkType":"Default","linkModel":"defaultLink","type":"Link","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record#records"}]},{"type":"aws_db_instance","displayName":"AWS DB instance","description":"An isolated database environment.","icon":"Aws_EC2_DB-Instance","model":"DefaultModel","url":"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.html","attributes":[{"name":"allocated_storage","displayName":"Allocated storage","description":"The allocated storage in gigabytes.","required":true,"type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#allocated_storage"},{"name":"db_name","displayName":"Database name","description":"The name of the database to create when the DB instance is created. If this parameter is not specified, no database is created in the DB instance.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#db_name"},{"name":"engine","displayName":"Database engine","description":"The database engine to use.","linkRef":"aws_rds_engine_version","linkType":"Default","linkModel":"defaultLink","required":true,"type":"Link","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#engine"},{"name":"vpc_security_group_ids","displayName":"VPC security groups","description":"A list of VPC security groups to associate.","linkRef":"aws_security_group","linkType":"Default","linkModel":"defaultLink","required":true,"type":"Link","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#vpc_security_group_ids"},{"name":"instance_class","displayName":"Instance class","description":"The instance type of the Relational Database Service instance.","required":true,"type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#instance_class"},{"name":"db_subnet_group_name","displayName":"Subnet group name","description":"Name of DB subnet group. DB instance will be created in the VPC associated with the DB subnet group.","linkAttribute":"name","linkRef":"aws_db_subnet_group","linkType":"Default","linkModel":"defaultLink","type":"Link","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#db_subnet_group_name"},{"name":"username","displayName":"Username","description":"Username for the master DB user.","required":true,"type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#username"},{"name":"password","displayName":"Password","description":"Password for the master DB user.","required":true,"type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#password"},{"name":"skip_final_snapshot","displayName":"Skip final snapshot","description":"Determines whether a final DB snapshot is created before the DB instance is deleted.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#skip_final_snapshot"},{"name":"publicly_accessible","displayName":"Publicly accessible","description":"Controls if instance is publicly accessible.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#publicly_accessible"},{"name":"allow_major_version_upgrade","displayName":"Allow major version upgrade","description":"Indicates that major version upgrades are allowed.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#allow_major_version_upgrade"},{"name":"apply_immediately","displayName":"Apply immediately","description":"Specifies whether any database modifications are applied immediately, or during the next maintenance window.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#apply_immediately"},{"name":"auto_minor_version_upgrade","displayName":"Auto minor version upgrade","description":"Indicates that minor engine upgrades will be applied automatically to the DB instance during the maintenance window.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#auto_minor_version_upgrade"},{"name":"availability_zone","displayName":"Availability zone","description":"The Availability Zone for the Relational Database Service instance.","linkAttribute":"id","linkRef":"aws_availability_zones","linkType":"Default","linkModel":"defaultLink","type":"Link","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#availability_zone"},{"name":"backup_retention_period","displayName":"Backup retention period","description":"The days to retain backups for.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#backup_retention_period","rules":{"max":"35","min":"0"}},{"name":"backup_window","displayName":"Backup window","description":"The daily time range (in UTC) during which automated backups are created if they are enabled.
Must not overlap with maintenance_window.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#backup_window"},{"name":"character_set_name","displayName":"Character set name","description":"Specifies the character set to associate with the DB instance.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#character_set_name"},{"name":"copy_tags_to_snapshot","displayName":"Copy tags to snapshot","description":"Whether to copy all Instance tags to snapshots, or not.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#copy_tags_to_snapshot"},{"name":"delete_automated_snapshots","displayName":"Delete automated snapshots","description":"Whether to remove automated backups when the DB instance is deleted.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#delete_automated_snapshots"},{"name":"deletion_protection","displayName":"Deletion protection","description":"If \'Deletion protection\' is set to true, the DB instance cannot be deleted. Otherwise, it can.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#deletion_protection"},{"name":"final_snapshot_identifier","displayName":"Final snapshot identifier","description":"The name of the final DB snapshot when this DB instance is deleted.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#final_snapshot_identifier"},{"name":"iam_database_authentication_enabled","displayName":"IAM database authentication enabled","description":"Specifies whether mappings of AWS Identity and Access Management (IAM) accounts to database accounts is enabled.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#iam_database_authentication_enabled"},{"name":"identifier","displayName":"Identifier","description":"The name of the Relational Database Service instance.
Conflicts with identifier_prefix.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#identifier"},{"name":"identifier_prefix","displayName":"Identifier prefix","description":"Creates a unique identifier beginning with the specified prefix.
Conflicts with identifier.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#identifier_prefix"},{"name":"iops","displayName":"IOPS","description":"The amount of provisioned IOPS.
Can only be set when storage_type is io1 or p3.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#iops"},{"name":"maintenance_window","displayName":"Maintenance window","description":"The window to perform maintenance in.
Format: ddd:hh24:mi-ddd:hh24:mi.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#maintenance_window"},{"name":"max_allocated_storage","displayName":"Max allocated storage","description":"The upper limit to which Amazon RDS can automatically scale the storage of the DB instance.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#max_allocated_storage"},{"name":"monitoring_interval","displayName":"Monitoring interval","description":"The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance.","type":"Array","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#monitoring_interval","rules":{"values":["0","1","5","10","15","30","60"]}},{"name":"multi_az","displayName":"Multi AZ","description":"Specifies if the Relational Database Service instance is on multiple Availability Zones.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#multi_az"},{"name":"network_type","displayName":"Network type","description":"The type of network connection to use for connecting to an Amazon Relational Database Service instance.","type":"Array","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#network_type","rules":{"values":["IPV4","DUAL"]}},{"name":"option_group_name","displayName":"Option group name","description":"The name of the option group to associate.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#option_group_name"},{"name":"parameter_group_name","displayName":"Parameter group name","description":"The name of the DB parameter group to associate.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#parameter_group_name"},{"name":"performance_insights_enabled","displayName":"Performance insights enabled","description":"Specifies whether Performance Insights are enabled.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#performance_insights_enabled"},{"name":"performance_insights_retention_period","displayName":"Performance insights retention period","description":"The amount of time in days to retain Performance Insights data.
Must be a multiple of 31.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#performance_insights_retention_period"},{"name":"port","displayName":"Port","description":"The port on which the DB accepts connections.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#port","rules":{"max":"65535","min":"1"}},{"name":"replica_mode","displayName":"Replica mode","description":"Specifies whether the replica is in either mounted or open-read-only mode.
This attribute is only supported by Oracle instances.","type":"Array","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#replica_mode","rules":{"values":["mounted","open-read-only"]}},{"name":"restore_to_point_in_time","displayName":"Restore to point in time","description":"Restore from a point in time.
Must be specified if restore is set to true.","type":"Object","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#restore_to_point_in_time","attributes":[{"name":"restore_time","displayName":"Restore time","description":"The date and time to restore from.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#restore_time"},{"name":"source_db_instance_identifier","displayName":"Source DB instance identifier","description":"The identifier of the source DB instance from which to restore.","linkRef":"aws_db_instance","linkType":"Default","linkModel":"defaultLink","type":"Link","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#source_db_instance_identifier"},{"name":"use_latest_restorable_time","displayName":"Use latest restorable time","description":"Specifies whether to restore the DB instance to the latest restorable backup time.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#use_latest_restorable_time"},{"name":"source_db_instance_automated_backups_arn","displayName":"Source DB instance automated backups ARN","description":"The ARN of the automated backup from which to restore.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#source_db_instance_automated_backups_arn"},{"name":"source_dbi_resource_id","displayName":"Source DBI resource ID","description":"The resource ID of the source DB instance from which to restore.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#source_dbi_resource_id"}]},{"name":"s3_import","displayName":"S3 import","description":"Import from an S3 bucket.
Must be specified if import is set to true.","type":"Object","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#s3_import","attributes":[{"name":"bucket_name","displayName":"Bucket name","description":"The name of the S3 bucket where the backup is stored.","linkRef":"aws_s3_bucket","linkType":"Default","linkModel":"defaultLink","required":true,"type":"Link","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#bucket_name"},{"name":"bucket_prefix","displayName":"Bucket prefix","description":"The path to the backup.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#bucket_prefix"},{"name":"ingestion_role","displayName":"Ingestion role","description":"Role applied to load the data.","required":true,"type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#ingestion_role"},{"name":"source_engine","displayName":"Source engine","description":"Source engine for the backup.","required":true,"type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#source_engine"},{"name":"source_engine_version","displayName":"Source engine version","description":"Version of the source engine used for the backup.","linkRef":"aws_rds_engine_version","linkType":"Default","linkModel":"defaultLink","required":true,"type":"Link","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#source_engine_version"}]},{"name":"storage_encrypted","displayName":"Storage encrypted","description":"Specifies whether the DB instance is encrypted.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#storage_encrypted"},{"name":"storage_type","displayName":"Storage type","description":"The type of storage for the DB.","type":"Array","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#storage_type","rules":{"values":["standard","gp2","gp3","io1"]}},{"name":"storage_throughput","displayName":"Storage throughput","description":"The storage throughput value for the DB instance.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#storage_throughput"},{"name":"timezone","displayName":"Timezone","description":"The timezone of the DB instance.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#timezone"},{"name":"customer_owned_ip_enabled","displayName":"Customer owned IP enabled","description":"Specifies whether the DB instance is a customer-owned IP address (CoIP) enabled.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#customer_owned_ip_enabled"},{"name":"tags","displayName":"Tags","description":"A mapping of tags to assign to the DB instance.","type":"Object","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#tags"}]},{"type":"aws_key_pair","displayName":"AWS key pair","description":"A set of security credentials to prove your identity when connecting to an Amazon EC2 instance.","icon":"Aws_Identity-Access-Management_Long-Term-Security-Credential","model":"DefaultModel","url":"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html","attributes":[{"name":"key_name","displayName":"Key name","description":"The name for the key pair.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/key_pair#key_name"},{"name":"public_key","displayName":"Public key","description":"The public key material.","required":true,"type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/key_pair#public_key"},{"name":"key_name_prefix","displayName":"Key name prefix","description":"Creates a unique name beginning with the specified prefix.
Conflicts with key_name.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/key_pair#key_name_prefix"},{"name":"tags","displayName":"Tags","description":"A mapping of tags to assign to the resource.","type":"Object","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/key_pair#tags"}]},{"type":"aws_route_table","displayName":"Route table","description":"A route table contains a set of rules, called routes, that determine where network traffic from your subnet or gateway is directed.","icon":"Aws_Route-53_Route-Table","model":"DefaultModel","url":"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html","attributes":[{"name":"vpc_id","displayName":"VPC ID","description":"The ID of the VPC for which to create the route table.","containerRef":"aws_vpc","required":true,"type":"Reference","url":"https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html"},{"name":"propagating_vgws","displayName":"Propagating Virtual GateWays (VGWS)","description":"List of virtual gateways for propagation","type":"Array","url":"https://docs.aws.amazon.com/directconnect/latest/UserGuide/virtualgateways.html"},{"name":"tags","displayName":"Tags","description":"A map of tags to assign to the resource.","type":"Object","url":"https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html"}]},{"type":"aws_route_table_association","displayName":"Route table association","description":"Association between a route table and a subnet, internet gateway, or virtual private gateway.","icon":"Aws_Connector","model":"DefaultModel","url":"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html","attributes":[{"name":"vpc_id","displayName":"VPC ID","description":"The ID of the VPC for which to create the route table association.","containerRef":"aws_vpc","type":"Reference","url":"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html"},{"name":"route_table_id","displayName":"Route table ID","description":"The ID of the route table to associate the subnet with.","linkRef":"aws_route_table","linkType":"Reverse","linkModel":"defaultLink","required":true,"type":"Link","url":"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html"},{"name":"gateway_id","displayName":"Gateway ID","description":"The ID of the gateway to associate the route table with. Conflicts with subnet_id.","linkRef":"aws_internet_gateway","linkType":"Default","linkModel":"defaultLink","type":"Link","url":"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Internet_Gateway.html"},{"name":"subnet_id","displayName":"Subnet ID","description":"The ID of the subnet to associate the route table with. Conflicts with gateway_id.","linkRef":"aws_subnet","linkType":"Default","linkModel":"defaultLink","type":"Link","url":"https://docs.aws.amazon.com/vpc/latest/userguide/configure-subnets.html"}]},{"type":"aws_s3_bucket","displayName":"S3 bucket","description":"Amazon Simple Storage Service (Amazon S3) is an object storage service.","icon":"Aws_Storage-Service_Bucket","model":"DefaultModel","url":"https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html","attributes":[{"name":"bucket","displayName":"Bucket name","description":"The name of the bucket.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket#bucket","rules":{"max":63,"min":1}},{"name":"bucket_prefix","displayName":"Bucket prefix","description":"Creates a unique bucket name beginning with the specified prefix.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket#bucket_prefix","rules":{"max":63,"min":1}},{"name":"force_destroy","displayName":"Force destroy","description":"Indicates if all objects (including any locked objects) should be deleted from the bucket
when the bucket is destroyed so that the bucket can be destroyed without error.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket#force_destroy"},{"name":"object_lock_enabled","displayName":"Object lock enabled","description":"Indicates whether this bucket has an Object Lock configuration enabled.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket#object_lock_enabled"},{"name":"tags","displayName":"Tags","description":"A map of tags to assign to the resource.","type":"Object","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket#tags"}]},{"type":"aws_s3_bucket_acl","displayName":"S3 bucket Access Control List (ACL)","description":"Amazon S3 access control lists (ACLs) enable you to manage access to buckets and objects.","icon":"Aws_Storage-Service_Bucket-ACL","model":"DefaultModel","url":"https://docs.aws.amazon.com/AmazonS3/latest/userguide/acls.html","attributes":[{"name":"bucket","displayName":"Bucket","description":"The name of the bucket to put the ACL in.","linkRef":"aws_s3_bucket","linkType":"Default","linkModel":"defaultLink","required":true,"type":"Link","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_acl#bucket"},{"name":"acl","displayName":"ACL","description":"ACL to apply to the bucket
Conflicts with access_control_policy","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_acl#acl"},{"name":"expected_bucket_owner","displayName":"Bucket owner","description":"Account ID of the expected bucket owner","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_acl#expected_bucket_owner"}]},{"type":"aws_lb","displayName":"Application Load Balancer (LB)","description":"A load balancer serves as the single point of contact for clients. The load balancer distributes incoming application traffic across multiple targets, in multiple Availability Zones.","icon":"Aws_Application-Load-Balancer","model":"DefaultModel","url":"https://docs.aws.amazon.com/elasticloadbalancing/latest/application/introduction.html","attributes":[{"name":"vpc_id","displayName":"VPC ID","description":"The ID of the VPC to create the ALB in.","containerRef":"aws_vpc","type":"Reference","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#vpc_id"},{"name":"name","displayName":"Name","description":"The name of the LB. This name must be unique within your AWS account.
If not specified, Terraform will autogenerate a name beginning with tf-lb.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#name","rules":{"regex":"^([a-zA-Z0-9]+-)*[a-zA-Z0-9]+$"}},{"name":"internal","displayName":"Internal LB","description":"If true, the LB will be internal.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#internal"},{"name":"load_balancer_type","displayName":"Load balancer type","description":"The type of load balancer to create.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#load_balancer_type","rules":{"values":["application","gateway","network"]}},{"name":"access_logs","displayName":"Access logs","description":"An Access Logs block.","type":"Object","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb","attributes":[{"name":"bucket","displayName":"Bucket","description":"The S3 bucket name to store the logs in.","linkRef":"aws_s3_bucket","linkType":"Default","linkModel":"defaultLink","type":"Link","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#bucket"},{"name":"enabled","displayName":"Enabled","description":"Boolean to enable / disable access_logs. Defaults to false, even when bucket is specified.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#enabled"},{"name":"prefix","displayName":"Prefix","description":"The S3 bucket prefix. Logs are stored in the root if not configured.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#prefix"}]},{"name":"customer_owned_ipv4_pool","displayName":"Customer owned ivp4 pool","description":"The ID of the customer owned ipv4 pool to use for this load balancer.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#customer_owned_ipv4_pool"},{"name":"desync_mitigation_mode","displayName":"Customer owned ivp4 pool","description":"Determines how the load balancer handles requests that might pose a security risk to an application due to HTTP desync.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#desync_mitigation_mode","rules":{"values":["defensive","monitor","strictest"]}},{"name":"drop_invalid_header_fields","displayName":"Drop invalid header fields","description":"Indicates whether HTTP headers with header fields that are not valid are removed by the load balancer (true) or routed to targets (false).
The default is false. Elastic Load Balancing requires that message header names contain only alphanumeric characters and hyphens. Only valid for Load Balancers of type.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#drop_invalid_header_fields"},{"name":"enable_cross_zone_load_balancing","displayName":"Enable cross zone load balancing","description":"If true, cross-zone load balancing of the load balancer will be enabled. For network and gateway type load balancers, this feature is disabled by default (false).
For application load balancer this feature is always enabled (true) and cannot be disabled. Defaults to false.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#enable_cross_zone_load_balancing"},{"name":"enable_deletion_protection","displayName":"Enable deletion protection","description":"If true, deletion of the load balancer will be disabled via the AWS API. This will prevent Terraform from deleting the load balancer. Defaults to false.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#enable_deletion_protection"},{"name":"enable_http2","displayName":"Enable http2","description":"Indicates whether HTTP/2 is enabled in application load balancers. Defaults to true.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#enable_http2"},{"name":"enable_waf_fail_open","displayName":"Enable WAF fail open","description":"Indicates whether to allow a WAF-enabled load balancer to route requests to targets
if it is unable to forward the request to AWS WAF. Defaults to false.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#enable_waf_fail_open"},{"name":"idle_timeout","displayName":"Idle timeout","description":"The time in seconds that the connection is allowed to be idle.
Only valid for Load Balancers of type application. Default: 60.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#idle_timeout"},{"name":"ip_address_type","displayName":"IP address type","description":"The type of IP addresses used by the subnets for your load balancer.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#ip_address_type","rules":{"values":["ipv4","dualstack"]}},{"name":"security_groups","displayName":"Security groups","description":"A list of security group IDs to assign to the LB. Only valid for Load Balancers of type application.","linkRef":"aws_security_group","linkType":"Default","linkModel":"defaultLink","type":"Link","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#security_groups"},{"name":"preserve_host_header","displayName":"Preserve host header","description":"Indicates whether the Application Load Balancer should preserve the Host header in the HTTP request
and send it to the target without any change. Defaults to false.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#preserve_host_header"},{"name":"subnet_mapping","displayName":"Subnet mapping","description":"A subnet mapping block.","type":"Object","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#subnet_mapping","attributes":[{"name":"subnet_id","displayName":"Subnet ID","description":"ID of the subnet of which to attach to the load balancer. You can specify only one subnet per Availability Zone.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#subnet_id"},{"name":"allocation_id","displayName":"Allocation ID","description":"The allocation ID of the Elastic IP address for an internet-facing load balancer.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#allocation_id"},{"name":"ipv6_address","displayName":"IPv6 address","description":"The IPv6 address. You associate IPv6 CIDR blocks with your VPC and choose the subnets
where you launch both internet-facing and internal Application Load Balancers or Network Load Balancers.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#ipv6_address"},{"name":"private_ipv4_address","displayName":"Private IPv4 address","description":"The private IPv4 address for an internal load balancer.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#private_ipv4_address"}]},{"name":"subnets","displayName":"Subnets","description":"A list of subnet IDs to attach to the LB. Subnets cannot be updated for Load Balancers of type network.
Changing this value for load balancers of type network will force a recreation of the resource.","linkRef":"aws_subnet","linkType":"Default","linkModel":"defaultLink","type":"Link","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#subnets"},{"name":"name_prefix","displayName":"Name prefix","description":"Creates a unique name beginning with the specified prefix. Conflicts with name.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#name_prefix"},{"name":"tags","displayName":"Tags","description":"A map of tags to assign to the resource. If configured with a provider default_tags configuration block present,
tags with matching keys will overwrite those defined at the provider-level.","type":"Object","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#tags"}]},{"type":"aws_lb_target_group","displayName":"Load balancer target group","description":"Target groups route requests to one or more registered targets, using the protocol and port number that you specify.
You can register a target with multiple target groups","icon":"Aws_Application-Load-Balancer-Target-Group","model":"DefaultModel","url":"https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html","attributes":[{"name":"connection_termination","displayName":"Connection termination","description":"Whether to terminate connections at the end of the deregistration timeout on Network Load Balancers.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#connection_termination"},{"name":"deregistration_delay","displayName":"Deregistration delay","description":"Amount time for Elastic Load Balancing to wait before changing the state of a deregistering target from draining to unused.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#deregistration_delay"},{"name":"lambda_multi_value_headers_enabled","displayName":"Lambda multi value headers enabled","description":"Whether the request and response headers exchanged between the load balancer and the Lambda function include arrays of values or strings.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#lambda_multi_value_headers_enabled"},{"name":"load_balancing_algorithm_type","displayName":"Load balancing algorithm type","description":"Determines how the load balancer selects targets when routing requests.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#load_balancing_algorithm_type","rules":{"values":["round_robin","least_outstanding_requests"]}},{"name":"name","displayName":"Name","description":"Name of the target group. If omitted, Terraform will assign a random, unique name.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#name"},{"name":"name_prefix","displayName":"Name prefix","description":"Creates a unique name beginning with the specified prefix.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#name_prefix"},{"name":"port","displayName":"Port","description":"Port on which targets receive traffic, unless overridden when registering a specific target.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#port"},{"name":"preserve_client_ip","displayName":"Preserve client IP","description":"Whether client IP preservation is enabled.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#preserve_client_ip"},{"name":"protocol","displayName":"Protocol","description":"Protocol to use for routing traffic to the targets.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#protocol","rules":{"values":["GENEVE","HTTP","HTTPS","TCP","TCP_UDP","TLS","UDP"]}},{"name":"protocol_version","displayName":"Protocol version","description":"Only applicable when protocol is HTTP or HTTPS. The protocol version.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#protocol_version"},{"name":"proxy_protocol_v2","displayName":"Proxy protocol v2","description":"Whether to enable support for proxy protocol v2 on Network Load Balancers.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#proxy_protocol_v2"},{"name":"slow_start","displayName":"Slow start","description":"Amount time for targets to warm up before the load balancer sends them a full share of requests.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#slow_start"},{"name":"target_type","displayName":"Target type","description":"Type of target that you must specify when registering targets with this target group. The default is \\"instance\\".","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#target_type"},{"name":"ip_address_type","displayName":"IP address type","description":"The type of IP addresses used by the target group, only supported when target type is set to ip.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#ip_address_type","rules":{"values":["ipv4","ipv6"]}},{"name":"vpc_id","displayName":"VPC ID","description":"Identifier of the VPC in which to create the target group.","linkRef":"aws_vpc","linkType":"Default","linkModel":"defaultLink","type":"Link","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#vpc_id"},{"name":"health_check","displayName":"Health check","description":"Health Check configuration block.","type":"Object","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#health_check","attributes":[{"name":"enabled","displayName":"Enabled","description":"Whether health checks are enabled.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#enabled"},{"name":"healthy_threshold","displayName":"Healthy threshold","description":"Number of consecutive health check successes required before considering a target healthy.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#healthy_threshold"},{"name":"interval","displayName":"Interval","description":"Approximate amount of time, in seconds, between health checks of an individual target.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#interval"},{"name":"matcher","displayName":"Matcher","description":"Response codes to use when checking for a healthy responses from a target.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#matcher"},{"name":"path","displayName":"Path","description":"Destination for the health check request.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#path"},{"name":"port","displayName":"Port","description":"The port the load balancer uses when performing health checks on targets.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#port"},{"name":"protocol","displayName":"Protocol","description":"The port the load balancer uses when performing health checks on targets.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#protocol","rules":{"values":["TCP","HTTP","HTTPS"]}},{"name":"timeout","displayName":"Timeout","description":"Amount of time, in seconds, during which no response from a target means a failed health check.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#timeout"},{"name":"unhealthy_threshold","displayName":"Unhealthy threshold","description":"Number of consecutive health check failures required before considering a target unhealthy.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#unhealthy_threshold"}]},{"name":"stickiness","displayName":"Stickiness","description":"Stickiness configuration block.","type":"Object","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#stickiness","attributes":[{"name":"cookie_duration","displayName":"Cookie duration","description":"The time period, in seconds, during which requests from a client should be routed to the same target.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#cookie_duration"},{"name":"cookie_name","displayName":"Cookie name","description":"Name of the application based cookie.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#cookie_name"},{"name":"enabled","displayName":"Enable stickiness","description":"Boolean to enable/disable stickiness.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#enabled"},{"name":"type","displayName":"Type","description":"The type of sticky sessions.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#type","rules":{"values":["lb_cookie","app_cookie","source_ip","source_ip_dest_ip","source_ip_dest_ip_proto"]}}]},{"name":"tags","displayName":"Tags","description":"A map of tags to assign to the resource.","type":"Object","url":"https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html"},{"name":"target_failover","displayName":"Target failover","description":"Target failover block.","type":"Object","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#target_failover","attributes":[{"name":"on_deregistration","displayName":"On deregistration","description":"Indicates how the Gateway Load Balancer (GWLB) handles existing flows when a target is deregistered.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#on_deregistration","rules":{"values":["rebalance","no_rebalance"]}},{"name":"on_unhealthy","displayName":"On unhealthy","description":"Indicates how the Gateway Load Balancer (GWLB) handles existing flows when a target is unhealthy.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#on_unhealthy","rules":{"values":["rebalance","no_rebalance"]}}]}]},{"type":"aws_launch_configuration","displayName":"Launch configuration","description":"A launch configuration is an instance configuration template that an Auto Scaling group uses to launch EC2 instances.
When you create a launch configuration, you specify information for the instances.","icon":"Aws_Launch-Configuration","model":"DefaultModel","url":"https://docs.aws.amazon.com/autoscaling/ec2/userguide/launch-configurations.html","attributes":[{"name":"image_id","displayName":"Image ID","description":"The EC2 image ID to launch.","linkRef":"aws_ami","linkType":"Default","linkModel":"defaultLink","required":true,"type":"Link","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#image_id"},{"name":"instance_type","displayName":"Instance type","description":"The size of instance to launch.","required":true,"type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#instance_type"},{"name":"iam_instance_profile","displayName":"IAM instance profile","description":"The name attribute of the IAM instance profile to associate with launched instances.","type":"String","url":"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html"},{"name":"associate_public_ip_address","displayName":"Associate public IP address","description":"Associate a public ip address with an instance in a VPC.","type":"Boolean","url":"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html"},{"name":"enable_monitoring","displayName":"Enable monitoring","description":"Enables/disables detailed monitoring.","type":"Boolean","url":"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring_ec2.html"},{"name":"key_name","displayName":"Key name","description":"The key name that should be used for the instance.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#key_name"},{"name":"name","displayName":"Name","description":"The name of the launch configuration.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#name"},{"name":"name_prefix","displayName":"Name prefix","description":"Creates a unique name beginning with the specified prefix.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#name_prefix"},{"name":"security_groups","displayName":"Security groups","description":"A list of associated security group IDS.","linkRef":"aws_security_group","linkType":"Default","linkModel":"defaultLink","type":"Link","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#security_groups"},{"name":"placement_tenancy","displayName":"Placement tenancy","description":"The tenancy of the instance.","type":"String","url":"https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_CreateLaunchConfiguration.html","rules":{"values":["enabled","disabled"]}},{"name":"spot_price","displayName":"Spot price","description":"The maximum price to use for reserving spot instances.","type":"Number","url":"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spot-instances.html"},{"name":"user_data","displayName":"User data","description":"The user data to provide when launching the instance.
If you need to pass gzip-compressed data via this argument, use \\"user_data_base64\\" instead.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#user_data"},{"name":"user_data_base64","displayName":"User data base64","description":"Can be used instead of \\"user_data\\" to pass base64-encoded binary data directly,
whenever the value is not a valid UTF-8 string.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#user_data_base64"},{"name":"vpc_classic_link_id","displayName":"VPC ClassicLink ID","description":"The ID of a ClassicLink-enabled VPC.","linkRef":"aws_vpc","linkType":"Default","linkModel":"defaultLink","type":"Link","url":"https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html"},{"name":"vpc_classic_link_security_groups","displayName":"VPC ClassicLink security groups","description":"The IDs of one or more security groups for the specified ClassicLink-enabled VPC.","linkRef":"aws_security_group","linkType":"Default","linkModel":"defaultLink","type":"Link","url":"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html"},{"name":"ebs_optimized","displayName":"EBS optimized","description":"If true, the launched EC2 instance will be EBS-optimized.","type":"Boolean","url":"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html"},{"name":"ebs_block_device","displayName":"EBS block device","description":"Additional EBS block devices to attach to the instance.","type":"Object","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#ebs_block_device","attributes":[{"name":"device_name","displayName":"Device name","description":"The name of the device to mount.","required":true,"type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#device_name"},{"name":"snapshot_id","displayName":"Snapshot ID","description":"The Snapshot ID to mount.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#snapshot_id"},{"name":"volume_size","displayName":"Volume size","description":"The size of the volume in gigabytes.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#volume_size"},{"name":"volume_type","displayName":"Volume type","description":"The type of volume.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration#volume_type","rules":{"values":["standard","gp2","gp3","st1","sc1","io1"]}},{"name":"iops","displayName":"IOPS","description":"The amount of provisioned Input/output Operations Per Second (IOPS). This must be set with a volume_type of \\"io1\\".","type":"Number","url":"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-io-characteristics.html"},{"name":"throughput","displayName":"Throughput","description":"The throughput (MiBps) to provision for a gp3 volume.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#throughput"},{"name":"delete_on_termination","displayName":"Delete on termination","description":"Whether the volume should be destroyed on instance termination.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#delete_on_termination"},{"name":"encrypted","displayName":"Encrypted","description":"Whether the volume should be encrypted or not.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#encrypted"},{"name":"no_device","displayName":"No device","description":"Whether the device in the block device mapping of the AMI is suppressed.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#no_device"}]},{"name":"ephemeral_block_device","displayName":"Ephemeral block device","description":"Customize Ephemeral (also known as \\"Instance Store\\") volumes on the instance.","type":"Object","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#ephemeral_block_device","attributes":[{"name":"device_name","displayName":"Device name","description":"The name of the block device to mount on the instance.","required":"true","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#ephemeral_block_device"},{"name":"no_device","displayName":"No device","description":"Whether the device in the block device mapping of the AMI is suppressed.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#ephemeral_block_device"},{"name":"virtual_name","displayName":"Virtual name","description":"The Instance Store Device Name.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#virtual_name"}]},{"name":"metadata_options","displayName":"Metadata options","description":"The metadata options for the instance.","type":"Object","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration#metadata_options","attributes":[{"name":"http_endpoint","displayName":"HTTP endpoint","description":"The state of the metadata service: enabled, disabled.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration#http_endpoint","rules":{"values":["enabled","disabled"]}},{"name":"http_tokens","displayName":"HTTP tokens","description":"Whether the HTTP tokens are required.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration#http_tokens","rules":{"values":["optional","required"]}},{"name":"http_put_response_hop_limit","displayName":"HTTP PUT response hop limit","description":"The desired HTTP PUT response hop limit for instance metadata requests.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration#http_put_response_hop_limit"}]},{"name":"root_block_device","displayName":"Root block device","description":"Customize details about the root block device of the instance.","type":"Object","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#root_block_device","attributes":[{"description":"Whether the volume should be destroyed on instance termination.","displayName":"Delete on termination","name":"delete_on_termination","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#root_block_device"},{"description":"Whether the volume should be encrypted or not. Defaults to false.","displayName":"Encrypted","name":"encrypted","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#root_block_device"},{"description":"The amount of provisioned IOPS.","displayName":"IOPS","name":"iops","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#root_block_device"},{"description":"The throughput (MiBps) to provision for a gp3 volume.","displayName":"Throughput","name":"throughput","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#root_block_device"},{"description":"The size of the volume in gigabytes.","displayName":"Volume","name":"volume_size","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#root_block_device"},{"displayName":"Volume type","name":"volume_type","rules":{"values":["standard","gp2","gp3","st1","sc1","io1"]},"type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#root_block_device"}]}]},{"type":"aws_autoscaling_policy","displayName":"Autoscaling policy","description":"Provides an Auto Scaling policy resource.","icon":"Aws_Auto-Scaling","model":"DefaultModel","url":"https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-simple-step.html","attributes":[{"name":"name","displayName":"Name","description":"Name of the policy.","required":true,"type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#name"},{"name":"autoscaling_group_name","displayName":"Autoscaling group name","description":"Name of the autoscaling group.","linkRef":"aws_autoscaling_group","linkType":"Default","linkModel":"defaultLink","required":true,"type":"Link","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#autoscaling_group_name"},{"name":"adjustment_type","displayName":"Adjustment type","description":"Whether the adjustment is an absolute number or a percentage of the current capacity.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#adjustment_type","rules":{"values":["ChangeInCapacity","ExactCapacity","PercentChangeInCapacity"]}},{"name":"policy_type","displayName":"Policy type","description":"Policy type","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#policy_type","rules":{"values":["SimpleScaling","StepScaling","TargetTrackingScaling","PredictiveScaling"]}},{"name":"cooldown","displayName":"Cooldown","description":"Amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
Only available for SimpleScaling policies.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#cooldown"},{"name":"scaling_adjustment","displayName":"Scaling adjustment","description":"Number of instances by which to scale.
Only available for SimpleScaling policies.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#scaling_adjustment"},{"name":"estimated_instance_warmup","displayName":"Estimated instance warmup","description":"Estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#estimated_instance_warmup"},{"name":"enabled","displayName":"Enabled","description":"Whether the policy should be enabled.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#enabled"},{"name":"min_adjustment_magnitude","displayName":"Min adjustment magnitude","description":"Minimum value to scale by when adjustment_type is set to PercentChangeInCapacity.
Only valid when policy_type is SimpleScaling or StepScalling.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#min_adjustment_magnitude"},{"name":"metric_aggregation_type","displayName":"Metric aggregation type","description":"The aggregation type for the CloudWatch metrics.
Only valid when policy_type is StepScaling.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#metric_aggregation_type","rules":{"values":["Average","Minimum","Maximum"]}},{"name":"step_adjustment","displayName":"Step adjustment","description":"A list of step adjustments.
Only valid when policy_type is StepScaling.","type":"Object","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#step_adjustment","attributes":[{"name":"metric_interval_lower_bound","displayName":"Metric interval lower bound","description":"The lower bound for the difference between the alarm threshold and the CloudWatch metric.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#metric_interval_lower_bound"},{"name":"metric_interval_upper_bound","displayName":"Metric interval upper bound","description":"The upper bound for the difference between the alarm threshold and the CloudWatch metric.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#metric_interval_upper_bound"},{"name":"scaling_adjustment","displayName":"Scaling adjustment","description":"The number of members by which to scale.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#scaling_adjustment"}]}]},{"type":"aws_cloudwatch_metric_alarm","displayName":"Cloudwatch metric alarm","description":"Watches a single metric over a specified time period, and performs one or more specified actions, based on the value of the metric relative to a threshold over time.","icon":"Amazon-CloudWatch_Alarm","model":"DefaultModel","url":"https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#CloudWatchAlarms","attributes":[{"name":"alarm_name","displayName":"Alarm name","description":"The descriptive name for the alarm. This name must be unique within the user\'s AWS account","required":true,"type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#alarm_name"},{"name":"comparison_operator","displayName":"Comparison operator","description":"The arithmetic operation to use when comparing the specified Statistic and Threshold.","required":true,"type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#comparison_operator","rules":{"values":["GreaterThanOrEqualToThreshold","GreaterThanThreshold","LessThanThreshold","LessThanOrEqualToThreshold","LessThanLowerOrGreaterThanUpperThreshold","LessThanLowerThreshold","GreaterThanUpperThreshold"]}},{"name":"evaluation_periods","displayName":"Evaluation periods","description":"The number of periods over which data is compared to the specified threshold.","required":true,"type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#evaluation_periods"},{"name":"metric_name","displayName":"Metric name","description":"The name for the alarm\'s associated metric.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#metric_name"},{"name":"namespace","displayName":"Namespace","description":"The namespace for the alarm\'s associated metric.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#namespace"},{"name":"period","displayName":"Period","description":"The period in seconds over which the specified statistic is applied.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#period"},{"name":"statistic","displayName":"Statistic","description":"The statistic to apply to the alarm\'s associated metric.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#statistic","rules":{"values":["SampleCount","Average","Sum","Minimum","Maximum"]}},{"name":"threshold","displayName":"Threshold","description":"The value against which the specified statistic is compared.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#threshold"},{"name":"dimensions","displayName":"Dimensions","description":"The dimensions for the alarm\'s associated metric.","type":"Object","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#dimensions","attributes":[{"name":"AutoScalingGroupName","displayName":"Auto Scaling group name","description":"Amazon EC2 Auto Scaling","linkRef":"aws_autoscaling_group","linkType":"Default","linkModel":"defaultLink","type":"Link","url":"https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html"}]},{"name":"actions_enabled","displayName":"Actions enabled","description":"Indicates whether or not actions should be executed during any changes to the alarm\'s state.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#actions_enabled"},{"name":"alarm_description","displayName":"Alarm description","description":"The description for the alarm.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#alarm_description"},{"name":"datapoints_to_alarm","displayName":"Datapoints to alarm","description":"The number of datapoints that must be breaching to trigger the alarm.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#datapoints_to_alarm"},{"name":"alarm_actions","displayName":"Alarm actions","description":"The list of actions to execute when this alarm transitions into an ALARM state from any other state.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#alarm_actions","rules":{"max":5,"min":1}},{"name":"insufficient_data_actions","displayName":"Insufficient data actions","description":"The list of actions to execute when this alarm transitions into an INSUFFICIENT_DATA state from any other state.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#insufficient_data_actions","rules":{"max":5,"min":1}},{"name":"ok_actions","displayName":"OK actions","description":"The list of actions to execute when this alarm transitions into an OK state from any other state.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#ok_actions","rules":{"max":5,"min":1}},{"name":"unit","displayName":"Unit","description":"The unit for the alarm\'s associated metric.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#unit","rules":{"values":["Seconds","Microseconds","Milliseconds","Bytes","Kilobytes","Megabytes","Gigabytes","Terabytes","Bits","Kilobits","Megabits","Gigabits","Terabits","Percent","Count","Bytes/Second","Kilobytes/Second","Megabytes/Second","Gigabytes/Second","Terabytes/Second","Bits/Second","Kilobits/Second","Megabits/Second","Gigabits/Second","Terabits/Second","Count/Second","None"]}},{"name":"extended_statistic","displayName":"Extended statistic","description":"The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#extended_statistic"},{"name":"treat_missing_data","displayName":"Treat missing data","description":"Sets how this alarm is to handle missing data points.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#treat_missing_data","rules":{"values":["breaching","notBreaching","ignore","missing"]}},{"name":"evaluate_low_sample_count_percentiles","displayName":"Evaluate low sample count percentiles","description":"Used only for alarms based on percentiles.
If ignore, the alarm state does not change during periods with too few data points to be statistically significant.
If evaluate or omit, the alarm is always evaluated and possibly changes state no matter how many data points are available.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#evaluate_low_sample_count_percentiles","rules":{"values":["evaluate","ignore"]}},{"name":"metric_query","displayName":"Metric query","description":"Enable to create an alarm based on a metric math expression.","type":"Object","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#metric_query","attributes":[{"name":"id","displayName":"ID","description":"A short name used to tie this object to the results in the response.","required":true,"type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#id"},{"name":"account_id","displayName":"Account ID","description":"The account ID to use when searching for the metric.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#account_id"},{"name":"expression","displayName":"Expression","description":"The math expression to be performed on the returned data, if this object is performing a math expression.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#expression"},{"name":"label","displayName":"Label","description":"A human-readable label for this metric or expression.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#label"},{"name":"return_data","displayName":"Return data","description":"Specify exactly one metric_query to be true to use that metric_query result as the alarm.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#return_data"}]}]},{"type":"aws_efs_file_system","displayName":"EFS File System","description":"Provides an Elastic File System (EFS) File System resource.","icon":"Amazon-EFS","model":"DefaultModel","url":"https://aws.amazon.com/efs/?nc1=h_ls","attributes":[{"name":"arn","displayName":"ARN","description":"Amazon Resource Name (ARN) of the file system.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#arn"},{"name":"availability_zone_name","displayName":"Availability zone name","description":"The AWS Availability Zone in which to create the file system.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#availability_zone_name"},{"name":"availability_zone_id","displayName":"Availability zone ID","description":"The identifier of the Availability Zone in which the file system\'s One Zone storage classes exist.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#availability_zone_id"},{"name":"creation_token","displayName":"Creation token","description":"A unique name used as reference when creating the Elastic File System to ensure idempotent file system creation.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#creation_token","rules":{"max":"64","min":"1"}},{"name":"encrypted","displayName":"Encrypted","description":"If true, the disk will be encrypted.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#encrypted"},{"name":"kms_key_id","displayName":"Encrypted","description":"Amazon Resource Name (ARN) for the Key Management Service (KMS) encryption key.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#kms_key_id"},{"name":"lifecycle_policy","displayName":"Lifecycle policy","description":"A file system lifecycle policy","type":"Object","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#lifecycle_policy","attributes":[{"name":"transition_to_ia","displayName":"Transition to IA","description":"Indicates how long it takes to transition files to the IA storage class.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#transition_to_ia","rules":{"values":["AFTER_1_DAY","AFTER_7_DAYS","AFTER_14_DAYS","AFTER_30_DAYS","AFTER_60_DAYS","AFTER_90_DAYS"]}},{"name":"transition_to_primary_storage_class","displayName":"Transition to primary storage class","description":"Describes the policy used to transition a file from infrequent access storage to primary storage.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#transition_to_primary_storage_class","rules":{"values":["AFTER_1_ACCESS"]}}]},{"name":"performance_mode","displayName":"Performance mode","description":"The file system performance mode.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#performance_mode","rules":{"values":["generalPurpose","maxIO"]}},{"name":"provisioned_throughput_in_mibps","displayName":"Provisioned throughput in Mibps","description":"The throughput, measured in MiB/s, that you want to provision for the file system.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#provisioned_throughput_in_mibps"},{"name":"throughput_mode","displayName":"Throughput mode","description":"Throughput mode for the file system.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#throughput_mode","rules":{"values":["bursting","provisioned","elastic"]}},{"name":"size_in_bytes","displayName":"Size in bytes","description":"Current byte count used by the file system.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/efs_file_system#size_in_bytes"},{"name":"tags","displayName":"Tags","description":"A mapping of tags to assign to the file system.","type":"Object","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#tags"}]},{"type":"aws_lb_listener","displayName":"Load Balancer Listener","description":"Provides a Load Balancer Listener resource.","icon":"Aws_Elastic-Load-Balancing_Network-Load-Balancer","model":"DefaultModel","url":"https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html","attributes":[{"name":"load_balancer_arn","displayName":"Load balancer ARN","description":"ARN of the load balancer.","linkRef":"aws_lb","linkType":"Default","linkModel":"defaultLink","required":true,"type":"Link","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#load_balancer_arn"},{"name":"default_action","displayName":"Default action","description":"Configuration block for the default action.","required":true,"type":"Object","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#default_action","attributes":[{"name":"type","displayName":"Type","description":"Type of routing action.","required":true,"type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#type","rules":{"values":["forward","authenticate-oidc","authenticate-cognito","redirect","fixed-response"]}},{"name":"target_group_arn","displayName":"Target group ARN","description":"ARN of the target group to which to route traffic.","linkRef":"aws_lb_target_group","linkType":"Default","linkModel":"defaultLink","type":"Link","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#target_group_arn"}]},{"name":"certificate_arn","displayName":"Cerificate ARN","description":"ARN of the default SSL server certificate.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#certificate_arn"},{"name":"port","displayName":"Port","description":"Port on which the load balancer is listening.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#port","rules":{"max":65535,"min":1}},{"name":"protocol","displayName":"Protocol","description":"Protocol for connections from clients to the load balancer.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#protocol","rules":{"values":["HTTP","HTTPS","TCP","TLS","UDP","TCP_UDP"]}},{"name":"alpn_policy","displayName":"ALPN policy","description":"Name of the Application-Layer Protocol Negotiation (ALPN) policy.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#alpn_policy","rules":{"values":["HTTP1Only","HTTP2Only","HTTP2Optional","HTTP2Preferred","None"]}},{"name":"ssl_policy","displayName":"SSL policy","description":"Name of the SSL Policy for the listener.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#ssl_policy"},{"name":"tags","displayName":"Tags","description":"A mapping of tags to assign to the resource.","type":"Object","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#tags"}]},{"type":"aws_efs_mount_target","displayName":"EFS Mount Target","description":"Provide an Elastic File System (EFS) mount target.","icon":"Amazon-EFS","model":"DefaultModel","url":"https://docs.aws.amazon.com/efs/latest/ug/accessing-fs.html","attributes":[{"name":"file_system_id","displayName":"File system ID","description":"The ID of the file system for which the mount target is intended.","linkRef":"aws_efs_file_system","linkType":"Default","linkModel":"defaultLink","required":true,"type":"Link","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_mount_target#file_system_id"},{"name":"subnet_id","displayName":"Subnet ID","description":"The ID of the subnet to add the mount target in.","linkRef":"aws_subnet","linkType":"Default","linkModel":"defaultLink","required":true,"type":"Link","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_mount_target#subnet_id"},{"name":"ip_address","displayName":"IP address","description":"The address (within the address range of the specified subnet) at which the file system may be mounted via the mount target.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_mount_target#ip_address"},{"name":"security_groups","displayName":"Security groups","description":"A list of up to 5 VPC security group IDs (that must be for the same VPC as subnet specified) in effect for the mount target.","linkRef":"aws_security_group","linkType":"Default","linkModel":"defaultLink","type":"Link","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_mount_target#security_groups"}]},{"type":"random_string","displayName":"Random String","description":"Generates a random permutation of alphanumeric characters and optionally special characters.","icon":"variable","model":"DefaultModel","url":"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string","attributes":[{"name":"length","displayName":"Length","description":"The length of the string desired.","required":true,"type":"Number","url":"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#length","rules":{"min":1}},{"name":"special","displayName":"Special","description":"Include special characters in the result.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#special"},{"name":"min_special","displayName":"Min special","description":"Minimum number of special characters to include in the result.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#min_special"},{"name":"lower","displayName":"Lower","description":"Include lowercase alphabet characters in the result.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#lower"},{"name":"min_lower","displayName":"Min lower","description":"Minimum number of lowercase characters to include in the result.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#min_lower"},{"name":"upper","displayName":"Upper","description":"Include uppercase alphabet characters in the result.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#upper"},{"name":"min_upper","displayName":"Min upper","description":"Minimum number of uppercase characters to include in the result.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#min_upper"},{"name":"numeric","displayName":"Numeric","description":"Include numeric characters in the result.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#numeric"},{"name":"min_numeric","displayName":"Min numeric","description":"Minimum number of numeric characters to include in the result.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password#min_numeric"},{"name":"override_special","displayName":"Override special","description":"Supply your own list of special characters to use for string generation.","type":"String"}]},{"type":"random_password","displayName":"Random Password","description":"Identical to random_string with the exception that the result is treated as sensitive and, thus, not displayed in console output.","icon":"variable","model":"DefaultModel","url":"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password","attributes":[{"name":"length","displayName":"Length","description":"The length of the string desired.","required":true,"type":"Number","url":"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password#length","rules":{"min":1}},{"name":"special","displayName":"Special","description":"Include special characters in the result.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password#special"},{"name":"min_special","displayName":"Min special","description":"Minimum number of special characters to include in the result.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#min_special"},{"name":"lower","displayName":"Lower","description":"Include lowercase alphabet characters in the result.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password#lower"},{"name":"min_lower","displayName":"Min lower","description":"Minimum number of lowercase characters to include in the result.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#min_lower"},{"name":"upper","displayName":"Upper","description":"Include uppercase alphabet characters in the result.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password#upper"},{"name":"min_upper","displayName":"Min upper","description":"Minimum number of uppercase characters to include in the result.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#min_upper"},{"name":"numeric","displayName":"Numeric","description":"Include numeric characters in the result.","type":"Boolean","url":"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password#numeric"},{"name":"min_numeric","displayName":"Min numeric","description":"Minimum number of numeric characters to include in the result.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password#min_numeric"},{"name":"override_special","displayName":"Override special","description":"Supply your own list of special characters to use for string generation.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password#override_special"}]},{"type":"aws_autoscaling_group","displayName":"Auto Scaling Group","description":"Provides an Auto Scaling Group resource.","icon":"Aws_Auto-Scaling","model":"DefaultModel","url":"https://docs.aws.amazon.com/autoscaling/ec2/userguide/auto-scaling-groups.html","attributes":[{"name":"name","displayName":"Name","description":"Name of the Auto Scaling Group.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group#name"},{"name":"min_size","displayName":"Min Size","description":"Minimum size of the Auto Scaling Group.","required":true,"type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group#min_size"},{"name":"max_size","displayName":"Max Size","description":"Maximum size of the Auto Scaling Group.","required":true,"type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group#max_size"},{"name":"deired_capacity","displayName":"Desired Capacity","description":"Number of Amazon EC2 instances that should be running in the group.","type":"Number","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group#desired_capacity"},{"name":"health_check_type","displayName":"Health Check Type","description":"Controls how health checking is done.","type":"String","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group#health_check_type","rules":{"values":["EC2","ELB"]}},{"name":"target_group_arns","displayName":"Target Group ARNs","description":"Set of aws_alb_target_group ARNs, for use with Application or Network Load Balancing.","type":"Array","url":"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group#target_group_arns"}]}],"variables":[{"type":"image_id","icon":"variable","model":"DefaultModel"}]}')};function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0)throw new Error("Metadata are not valid",{cause:t});return!0}},{key:"parse",value:function(){this.pluginData.definitions={components:this.getComponentDefinitions()}}},{key:"getComponentDefinitions",value:function(){var e=this,t=[];return Object.keys(this.providers).map((function(t){return e.providers[t]})).forEach((function(n){var r=[];r.push(e.getProviderDefinition(n)),n.data.forEach((function(t){return r.push(e.getBlockDefinition("data",n.name,t))})),n.modules.forEach((function(t){return r.push(e.getBlockDefinition("module",n.name,t))})),n.resources.forEach((function(t){return r.push(e.getBlockDefinition("resource",n.name,t))})),n.variables.forEach((function(t){return r.push(e.getBlockDefinition("variable",n.name,t))})),e.setChildrenTypes(r),r.forEach((function(e){t.push(e)}))})),t}},{key:"getProviderDefinition",value:function(e){var t=new m({blockType:"provider",provider:e.name,type:e.name,icon:e.icon,model:e.model,definedAttributes:e.attributes.map(this.getAttributeDefinition),isContainer:e.isContainer,displayName:e.displayName,description:e.description,url:e.url});return t.parentTypes=this.getParentTypes(t),t}},{key:"getBlockDefinition",value:function(e,t,n){var r=n.attributes||[],i=new m({blockType:e,provider:t,type:n.type,model:n.model,icon:n.icon,isContainer:n.isContainer||!1,definedAttributes:r.map(this.getAttributeDefinition),displayName:n.displayName,description:n.description,url:n.url});return i.parentTypes=this.getParentTypes(i),i}},{key:"getAttributeDefinition",value:function(e){var t=e.attributes||[];return new x(O(O({},e),{},{definedAttributes:t.map(this.getAttributeDefinition)}))}},{key:"getParentTypes",value:function(e){var t=[];return e.definedAttributes.filter((function(e){return"Reference"===e.type})).map((function(e){return e.containerRef})).filter((function(e){return!t.includes(e)})).forEach((function(e){return t.push(e)})),t}},{key:"setChildrenTypes",value:function(e){var t=e.filter((function(e){return e.parentTypes.length>0})).reduce((function(e,t){return t.parentTypes.forEach((function(n){var r;e[n]=[].concat(function(e){if(Array.isArray(e))return T(e)}(r=e[n]||[])||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return T(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[t.type])})),e}),{});e.filter((function(e){return t[e.type]})).forEach((function(e){e.childrenTypes=t[e.type]}))}}])}(e.DefaultMetadata);const j=M;var F={92:()=>{}},B={};function U(e){var t=B[e];if(void 0!==t)return t.exports;var n=B[e]={exports:{}};return F[e](n,n.exports,U),n.exports}U.d=(e,t)=>{for(var n in t)U.o(t,n)&&!U.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},U.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var z={};(()=>{U.d(z,{dx:()=>Y,q2:()=>Oe,FO:()=>kt,xf:()=>Tt,Gy:()=>Pt,s4:()=>Le,c7:()=>It,_7:()=>ut,gp:()=>_t,cK:()=>Ne,zs:()=>vt,AV:()=>Tt,Xp:()=>v,VS:()=>g,ul:()=>G,hW:()=>Fe,x1:()=>Qe,z5:()=>tt,oN:()=>ft,TB:()=>pt,u1:()=>dt,_b:()=>Mt,$F:()=>rt,_T:()=>Bt,db:()=>it,Zx:()=>et,_x:()=>Me,r8:()=>D,JI:()=>P,TP:()=>C,WU:()=>e,Nj:()=>u,ZP:()=>Kt});class e{constructor(){this.source=null,this.type=null,this.channel=null,this.start=null,this.stop=null,this.tokenIndex=null,this.line=null,this.column=null,this._text=null}getTokenSource(){return this.source[0]}getInputStream(){return this.source[1]}get text(){return this._text}set text(e){this._text=e}}function t(e,t){if(!Array.isArray(e)||!Array.isArray(t))return!1;if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n>>16)*c&65535)<<16)&4294967295,o=o<<15|o>>>17,o=(65535&o)*l+(((o>>>16)*l&65535)<<16)&4294967295,u^=o,u=u<<13|u>>>19,i=5*(65535&u)+((5*(u>>>16)&65535)<<16)&4294967295,u=27492+(65535&i)+((58964+(i>>>16)&65535)<<16);switch(o=0,s){case 3:o^=(255&r.charCodeAt(h+2))<<16;case 2:o^=(255&r.charCodeAt(h+1))<<8;case 1:o^=255&r.charCodeAt(h),o=(65535&o)*c+(((o>>>16)*c&65535)<<16)&4294967295,o=o<<15|o>>>17,o=(65535&o)*l+(((o>>>16)*l&65535)<<16)&4294967295,u^=o}return u^=r.length,u^=u>>>16,u=2246822507*(65535&u)+((2246822507*(u>>>16)&65535)<<16)&4294967295,u^=u>>>13,u=3266489909*(65535&u)+((3266489909*(u>>>16)&65535)<<16)&4294967295,u^=u>>>16,u>>>0}class i{constructor(){this.count=0,this.hash=0}update(){for(let e=0;e>>17,e*=461845907,this.count=this.count+1;let n=this.hash^e;n=n<<13|n>>>19,n=5*n+3864292196,this.hash=n}}}finish(){let e=this.hash^4*this.count;return e^=e>>>16,e*=2246822507,e^=e>>>13,e*=3266489909,e^=e>>>16,e}static hashStuff(){const e=new i;return e.update.apply(e,arguments),e.finish()}}function o(e){return e?"string"==typeof e?r(e):e.hashCode():-1}function s(e,t){return e?e.equals(t):e===t}function a(e){return null===e?"null":e}function u(e){return Array.isArray(e)?"["+e.map(a).join(", ")+"]":"null"}const c="h-";class l{constructor(e,t){this.data={},this.hashFunction=e||o,this.equalsFunction=t||s}add(e){const t=c+this.hashFunction(e);if(t in this.data){const n=this.data[t];for(let t=0;te.startsWith(c))).flatMap((e=>this.data[e]),this)}toString(){return u(this.values())}get length(){return Object.keys(this.data).filter((e=>e.startsWith(c))).map((e=>this.data[e].length),this).reduce(((e,t)=>e+t),0)}}class h{hashCode(){const e=new i;return this.updateHashCode(e),e.finish()}evaluate(e,t){}evalPrecedence(e,t){return this}static andContext(e,t){if(null===e||e===h.NONE)return t;if(null===t||t===h.NONE)return e;const n=new f(e,t);return 1===n.opnds.length?n.opnds[0]:n}static orContext(e,t){if(null===e)return t;if(null===t)return e;if(e===h.NONE||t===h.NONE)return h.NONE;const n=new p(e,t);return 1===n.opnds.length?n.opnds[0]:n}}class f extends h{constructor(e,t){super();const n=new l;e instanceof f?e.opnds.map((function(e){n.add(e)})):n.add(e),t instanceof f?t.opnds.map((function(e){n.add(e)})):n.add(t);const r=d(n);if(r.length>0){let e=null;r.map((function(t){(null===e||t.precedencee.toString()));return(e.length>3?e.slice(3):e).join("&&")}}class p extends h{constructor(e,t){super();const n=new l;e instanceof p?e.opnds.map((function(e){n.add(e)})):n.add(e),t instanceof p?t.opnds.map((function(e){n.add(e)})):n.add(t);const r=d(n);if(r.length>0){const e=r.sort((function(e,t){return e.compareTo(t)})),t=e[e.length-1];n.add(t)}this.opnds=Array.from(n.values())}equals(e){return this===e||e instanceof p&&t(this.opnds,e.opnds)}updateHashCode(e){e.update(this.opnds,"OR")}evaluate(e,t){for(let n=0;ne.toString()));return(e.length>3?e.slice(3):e).join("||")}}function d(e){const t=[];return e.values().map((function(e){e instanceof h.PrecedencePredicate&&t.push(e)})),t}function m(e,t){if(null===e){const e={state:null,alt:null,context:null,semanticContext:null};return t&&(e.reachesIntoOuterContext=0),e}{const n={};return n.state=e.state||null,n.alt=void 0===e.alt?null:e.alt,n.context=e.context||null,n.semanticContext=e.semanticContext||null,t&&(n.reachesIntoOuterContext=e.reachesIntoOuterContext||0,n.precedenceFilterSuppressed=e.precedenceFilterSuppressed||!1),n}}class y{constructor(e,t){this.checkContext(e,t),e=m(e),t=m(t,!0),this.state=null!==e.state?e.state:t.state,this.alt=null!==e.alt?e.alt:t.alt,this.context=null!==e.context?e.context:t.context,this.semanticContext=null!==e.semanticContext?e.semanticContext:null!==t.semanticContext?t.semanticContext:h.NONE,this.reachesIntoOuterContext=t.reachesIntoOuterContext,this.precedenceFilterSuppressed=t.precedenceFilterSuppressed}checkContext(e,t){null!==e.context&&void 0!==e.context||null!==t&&null!==t.context&&void 0!==t.context||(this.context=null)}hashCode(){const e=new i;return this.updateHashCode(e),e.finish()}updateHashCode(e){e.update(this.state.stateNumber,this.alt,this.context,this.semanticContext)}equals(e){return this===e||e instanceof y&&this.state.stateNumber===e.state.stateNumber&&this.alt===e.alt&&(null===this.context?null===e.context:this.context.equals(e.context))&&this.semanticContext.equals(e.semanticContext)&&this.precedenceFilterSuppressed===e.precedenceFilterSuppressed}hashCodeForConfigSet(){const e=new i;return e.update(this.state.stateNumber,this.alt,this.semanticContext),e.finish()}equalsForConfigSet(e){return this===e||e instanceof y&&this.state.stateNumber===e.state.stateNumber&&this.alt===e.alt&&this.semanticContext.equals(e.semanticContext)}toString(){return"("+this.state+","+this.alt+(null!==this.context?",["+this.context.toString()+"]":"")+(this.semanticContext!==h.NONE?","+this.semanticContext.toString():"")+(this.reachesIntoOuterContext>0?",up="+this.reachesIntoOuterContext:"")+")"}}class v{constructor(e,t){this.start=e,this.stop=t}clone(){return new v(this.start,this.stop)}contains(e){return e>=this.start&&ethis.addInterval(e)),this),this}reduce(e){if(e=n.stop?(this.intervals.splice(e+1,1),this.reduce(e)):t.stop>=n.start&&(this.intervals[e]=new v(t.start,n.stop),this.intervals.splice(e+1,1))}}complement(e,t){const n=new g;return n.addInterval(new v(e,t+1)),null!==this.intervals&&this.intervals.forEach((e=>n.removeRange(e))),n}contains(e){if(null===this.intervals)return!1;for(let t=0;tn.start&&e.stop=n.stop?(this.intervals.splice(t,1),t-=1):e.start"):t.push("'"+String.fromCharCode(r.start)+"'"):t.push("'"+String.fromCharCode(r.start)+"'..'"+String.fromCharCode(r.stop-1)+"'")}return t.length>1?"{"+t.join(", ")+"}":t[0]}toIndexString(){const t=[];for(let n=0;n"):t.push(r.start.toString()):t.push(r.start.toString()+".."+(r.stop-1).toString())}return t.length>1?"{"+t.join(", ")+"}":t[0]}toTokenString(e,t){const n=[];for(let r=0;r1?"{"+n.join(", ")+"}":n[0]}elementName(t,n,r){return r===e.EOF?"":r===e.EPSILON?"":t[r]||n[r]}get length(){return this.intervals.map((e=>e.length)).reduce(((e,t)=>e+t))}}class _{constructor(){this.atn=null,this.stateNumber=_.INVALID_STATE_NUMBER,this.stateType=null,this.ruleIndex=0,this.epsilonOnlyTransitions=!1,this.transitions=[],this.nextTokenWithinRule=null}toString(){return this.stateNumber}equals(e){return e instanceof _&&this.stateNumber===e.stateNumber}isNonGreedyExitState(){return!1}addTransition(e,t){void 0===t&&(t=-1),0===this.transitions.length?this.epsilonOnlyTransitions=e.isEpsilon:this.epsilonOnlyTransitions!==e.isEpsilon&&(this.epsilonOnlyTransitions=!1),-1===t?this.transitions.push(e):this.transitions.splice(t,1,e)}}_.INVALID_TYPE=0,_.BASIC=1,_.RULE_START=2,_.BLOCK_START=3,_.PLUS_BLOCK_START=4,_.STAR_BLOCK_START=5,_.TOKEN_START=6,_.RULE_STOP=7,_.BLOCK_END=8,_.STAR_LOOP_BACK=9,_.STAR_LOOP_ENTRY=10,_.PLUS_LOOP_BACK=11,_.LOOP_END=12,_.serializationNames=["INVALID","BASIC","RULE_START","BLOCK_START","PLUS_BLOCK_START","STAR_BLOCK_START","TOKEN_START","RULE_STOP","BLOCK_END","STAR_LOOP_BACK","STAR_LOOP_ENTRY","PLUS_LOOP_BACK","LOOP_END"],_.INVALID_STATE_NUMBER=-1;class b extends _{constructor(){return super(),this.stateType=_.RULE_STOP,this}}class w{constructor(e){if(null==e)throw"target cannot be null.";this.target=e,this.isEpsilon=!1,this.label=null}}w.EPSILON=1,w.RANGE=2,w.RULE=3,w.PREDICATE=4,w.ATOM=5,w.ACTION=6,w.SET=7,w.NOT_SET=8,w.WILDCARD=9,w.PRECEDENCE=10,w.serializationNames=["INVALID","EPSILON","RANGE","RULE","PREDICATE","ATOM","ACTION","SET","NOT_SET","WILDCARD","PRECEDENCE"],w.serializationTypes={EpsilonTransition:w.EPSILON,RangeTransition:w.RANGE,RuleTransition:w.RULE,PredicateTransition:w.PREDICATE,AtomTransition:w.ATOM,ActionTransition:w.ACTION,SetTransition:w.SET,NotSetTransition:w.NOT_SET,WildcardTransition:w.WILDCARD,PrecedencePredicateTransition:w.PRECEDENCE};class x extends w{constructor(e,t,n,r){super(e),this.ruleIndex=t,this.precedence=n,this.followState=r,this.serializationType=w.RULE,this.isEpsilon=!0}matches(e,t,n){return!1}}class k extends w{constructor(t,n){super(t),this.serializationType=w.SET,null!=n?this.label=n:(this.label=new g,this.label.addOne(e.INVALID_TYPE))}matches(e,t,n){return this.label.contains(e)}toString(){return this.label.toString()}}class E extends k{constructor(e,t){super(e,t),this.serializationType=w.NOT_SET}matches(e,t,n){return e>=t&&e<=n&&!super.matches(e,t,n)}toString(){return"~"+super.toString()}}class S extends w{constructor(e){super(e),this.serializationType=w.WILDCARD}matches(e,t,n){return e>=t&&e<=n}toString(){return"."}}class T extends w{constructor(e){super(e)}}class A{}class O extends A{}class N extends O{}class P extends N{get ruleContext(){throw new Error("missing interface implementation")}}class C extends N{}class R extends C{}const L={toStringTree:function(e,t,n){t=t||null,null!==(n=n||null)&&(t=n.ruleNames);let r=L.getNodeText(e,t);r=function(e,t){return e.replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r")}(r);const i=e.getChildCount();if(0===i)return r;let o="("+r+" ";i>0&&(r=L.toStringTree(e.getChild(0),t),o=o.concat(r));for(let n=1;n=0&&t0&&(e+=", "),this.returnStates[t]!==M.EMPTY_RETURN_STATE?(e+=this.returnStates[t],null!==this.parents[t]?e=e+" "+this.parents[t]:e+="null"):e+="$";return e+"]"}}get length(){return this.returnStates.length}}class F extends M{constructor(e,t){let n=0;const r=new i;null!==e?r.update(e,t):r.update(1),n=r.finish(),super(n),this.parentCtx=e,this.returnState=t}getParent(e){return this.parentCtx}getReturnState(e){return this.returnState}equals(e){return this===e||e instanceof F&&this.hashCode()===e.hashCode()&&this.returnState===e.returnState&&(null==this.parentCtx?null==e.parentCtx:this.parentCtx.equals(e.parentCtx))}toString(){const e=null===this.parentCtx?"":this.parentCtx.toString();return 0===e.length?this.returnState===M.EMPTY_RETURN_STATE?"$":""+this.returnState:this.returnState+" "+e}get length(){return 1}static create(e,t){return t===M.EMPTY_RETURN_STATE&&null===e?M.EMPTY:new F(e,t)}}class B extends F{constructor(){super(null,M.EMPTY_RETURN_STATE)}isEmpty(){return!0}getParent(e){return null}getReturnState(e){return this.returnState}equals(e){return this===e}toString(){return"$"}}M.EMPTY=new B;const V="h-";class ${constructor(e,t){this.data={},this.hashFunction=e||o,this.equalsFunction=t||s}set(e,t){const n=V+this.hashFunction(e);if(n in this.data){const r=this.data[n];for(let n=0;ne.startsWith(V))).flatMap((e=>this.data[e]),this)}getKeys(){return this.entries().map((e=>e.key))}getValues(){return this.entries().map((e=>e.value))}toString(){return"["+this.entries().map((e=>"{"+e.key+":"+e.value+"}")).join(", ")+"]"}get length(){return Object.keys(this.data).filter((e=>e.startsWith(V))).map((e=>this.data[e].length),this).reduce(((e,t)=>e+t),0)}}function q(e,t){if(null==t&&(t=D.EMPTY),null===t.parentCtx||t===D.EMPTY)return M.EMPTY;const n=q(e,t.parentCtx),r=e.states[t.invokingState].transitions[0];return F.create(n,r.followState.stateNumber)}function K(e,t,n){if(e.isEmpty())return e;let r=n.get(e)||null;if(null!==r)return r;if(r=t.get(e),null!==r)return n.set(e,r),r;let i=!1,o=[];for(let r=0;rt.returnState&&(i[0]=t.returnState,i[1]=e.returnState);const o=new j([n,n],i);return null!==r&&r.set(e,t,o),o}const i=[e.returnState,t.returnState];let o=[e.parentCtx,t.parentCtx];e.returnState>t.returnState&&(i[0]=t.returnState,i[1]=e.returnState,o=[t.parentCtx,e.parentCtx]);const s=new j(o,i);return null!==r&&r.set(e,t,s),s}}(e,t,n,r);if(n){if(e instanceof B)return e;if(t instanceof B)return t}return e instanceof F&&(e=new j([e.getParent()],[e.returnState])),t instanceof F&&(t=new j([t.getParent()],[t.returnState])),function(e,t,n,r){if(null!==r){let n=r.get(e,t);if(null!==n)return M.trace_atn_sim&&console.log("mergeArrays a="+e+",b="+t+" -> previous"),n;if(n=r.get(t,e),null!==n)return M.trace_atn_sim&&console.log("mergeArrays a="+e+",b="+t+" -> previous"),n}let i=0,o=0,s=0,a=new Array(e.returnStates.length+t.returnStates.length).fill(0),u=new Array(e.returnStates.length+t.returnStates.length).fill(null);for(;i a"),e):c.equals(t)?(null!==r&&r.set(e,t,t),M.trace_atn_sim&&console.log("mergeArrays a="+e+",b="+t+" -> b"),t):(function(e){const t=new $;for(let n=0;n "+c),c)}(e,t,n,r)}class W{constructor(){this.data=[]}add(e){this.data[e]=!0}or(e){Object.keys(e.data).map((e=>this.add(e)),this)}remove(e){delete this.data[e]}has(e){return!0===this.data[e]}values(){return Object.keys(this.data)}minValue(){return Math.min.apply(null,this.values())}hashCode(){return i.hashStuff(this.values())}equals(e){return e instanceof W&&t(this.data,e.data)}toString(){return"{"+this.values().join(", ")+"}"}get length(){return this.values().length}}class G{constructor(e){this.atn=e}getDecisionLookahead(e){if(null===e)return null;const t=e.transitions.length,n=[];for(let r=0;r=this.states.length)throw"Invalid state number.";const r=this.states[t];let i=this.nextTokens(r);if(!i.contains(e.EPSILON))return i;const o=new g;for(o.addSet(i),o.removeOne(e.EPSILON);null!==n&&n.invokingState>=0&&i.contains(e.EPSILON);){const t=this.states[n.invokingState].transitions[0];i=this.nextTokens(t.followState),o.addSet(i),o.removeOne(e.EPSILON),n=n.parentCtx}return i.contains(e.EPSILON)&&o.addOne(e.EOF),o}}Y.INVALID_ALT_NUMBER=0;class Q extends _{constructor(){super(),this.stateType=_.BASIC}}class X extends _{constructor(){return super(),this.decision=-1,this.nonGreedy=!1,this}}class Z extends X{constructor(){return super(),this.endState=null,this}}class J extends _{constructor(){return super(),this.stateType=_.BLOCK_END,this.startState=null,this}}class ee extends _{constructor(){return super(),this.stateType=_.LOOP_END,this.loopBackState=null,this}}class te extends _{constructor(){return super(),this.stateType=_.RULE_START,this.stopState=null,this.isPrecedenceRule=!1,this}}class ne extends X{constructor(){return super(),this.stateType=_.TOKEN_START,this}}class re extends X{constructor(){return super(),this.stateType=_.PLUS_LOOP_BACK,this}}class ie extends _{constructor(){return super(),this.stateType=_.STAR_LOOP_BACK,this}}class oe extends X{constructor(){return super(),this.stateType=_.STAR_LOOP_ENTRY,this.loopBackState=null,this.isPrecedenceDecision=null,this}}class se extends Z{constructor(){return super(),this.stateType=_.PLUS_BLOCK_START,this.loopBackState=null,this}}class ae extends Z{constructor(){return super(),this.stateType=_.STAR_BLOCK_START,this}}class ue extends Z{constructor(){return super(),this.stateType=_.BLOCK_START,this}}class ce extends w{constructor(e,t){super(e),this.label_=t,this.label=this.makeLabel(),this.serializationType=w.ATOM}makeLabel(){const e=new g;return e.addOne(this.label_),e}matches(e,t,n){return this.label_===e}toString(){return this.label_}}class le extends w{constructor(e,t,n){super(e),this.serializationType=w.RANGE,this.start=t,this.stop=n,this.label=this.makeLabel()}makeLabel(){const e=new g;return e.addRange(this.start,this.stop),e}matches(e,t,n){return e>=this.start&&e<=this.stop}toString(){return"'"+String.fromCharCode(this.start)+"'..'"+String.fromCharCode(this.stop)+"'"}}class he extends w{constructor(e,t,n,r){super(e),this.serializationType=w.ACTION,this.ruleIndex=t,this.actionIndex=void 0===n?-1:n,this.isCtxDependent=void 0!==r&&r,this.isEpsilon=!0}matches(e,t,n){return!1}toString(){return"action_"+this.ruleIndex+":"+this.actionIndex}}class fe extends w{constructor(e,t){super(e),this.serializationType=w.EPSILON,this.isEpsilon=!0,this.outermostPrecedenceReturn=t}matches(e,t,n){return!1}toString(){return"epsilon"}}class pe extends h{constructor(e,t,n){super(),this.ruleIndex=void 0===e?-1:e,this.predIndex=void 0===t?-1:t,this.isCtxDependent=void 0!==n&&n}evaluate(e,t){const n=this.isCtxDependent?t:null;return e.sempred(n,this.ruleIndex,this.predIndex)}updateHashCode(e){e.update(this.ruleIndex,this.predIndex,this.isCtxDependent)}equals(e){return this===e||e instanceof pe&&this.ruleIndex===e.ruleIndex&&this.predIndex===e.predIndex&&this.isCtxDependent===e.isCtxDependent}toString(){return"{"+this.ruleIndex+":"+this.predIndex+"}?"}}h.NONE=new pe;class de extends T{constructor(e,t,n,r){super(e),this.serializationType=w.PREDICATE,this.ruleIndex=t,this.predIndex=n,this.isCtxDependent=r,this.isEpsilon=!0}matches(e,t,n){return!1}getPredicate(){return new pe(this.ruleIndex,this.predIndex,this.isCtxDependent)}toString(){return"pred_"+this.ruleIndex+":"+this.predIndex}}class me extends h{constructor(e){super(),this.precedence=void 0===e?0:e}evaluate(e,t){return e.precpred(t,this.precedence)}evalPrecedence(e,t){return e.precpred(t,this.precedence)?h.NONE:null}compareTo(e){return this.precedence-e.precedence}updateHashCode(e){e.update(this.precedence)}equals(e){return this===e||e instanceof me&&this.precedence===e.precedence}toString(){return"{"+this.precedence+">=prec}?"}}h.PrecedencePredicate=me;class ye extends T{constructor(e,t){super(e),this.serializationType=w.PRECEDENCE,this.precedence=t,this.isEpsilon=!0}matches(e,t,n){return!1}getPredicate(){return new me(this.precedence)}toString(){return this.precedence+" >= _p"}}class ve{constructor(e){void 0===e&&(e=null),this.readOnly=!1,this.verifyATN=null===e||e.verifyATN,this.generateRuleBypassTransitions=null!==e&&e.generateRuleBypassTransitions}}ve.defaultOptions=new ve,ve.defaultOptions.readOnly=!0;class ge{constructor(e){this.actionType=e,this.isPositionDependent=!1}hashCode(){const e=new i;return this.updateHashCode(e),e.finish()}updateHashCode(e){e.update(this.actionType)}equals(e){return this===e}}class _e extends ge{constructor(){super(6)}execute(e){e.skip()}toString(){return"skip"}}_e.INSTANCE=new _e;class be extends ge{constructor(e){super(0),this.channel=e}execute(e){e._channel=this.channel}updateHashCode(e){e.update(this.actionType,this.channel)}equals(e){return this===e||e instanceof be&&this.channel===e.channel}toString(){return"channel("+this.channel+")"}}class we extends ge{constructor(e,t){super(1),this.ruleIndex=e,this.actionIndex=t,this.isPositionDependent=!0}execute(e){e.action(null,this.ruleIndex,this.actionIndex)}updateHashCode(e){e.update(this.actionType,this.ruleIndex,this.actionIndex)}equals(e){return this===e||e instanceof we&&this.ruleIndex===e.ruleIndex&&this.actionIndex===e.actionIndex}}class xe extends ge{constructor(){super(3)}execute(e){e.more()}toString(){return"more"}}xe.INSTANCE=new xe;class ke extends ge{constructor(e){super(7),this.type=e}execute(e){e.type=this.type}updateHashCode(e){e.update(this.actionType,this.type)}equals(e){return this===e||e instanceof ke&&this.type===e.type}toString(){return"type("+this.type+")"}}class Ee extends ge{constructor(e){super(5),this.mode=e}execute(e){e.pushMode(this.mode)}updateHashCode(e){e.update(this.actionType,this.mode)}equals(e){return this===e||e instanceof Ee&&this.mode===e.mode}toString(){return"pushMode("+this.mode+")"}}class Se extends ge{constructor(){super(4)}execute(e){e.popMode()}toString(){return"popMode"}}Se.INSTANCE=new Se;class Te extends ge{constructor(e){super(2),this.mode=e}execute(e){e.mode(this.mode)}updateHashCode(e){e.update(this.actionType,this.mode)}equals(e){return this===e||e instanceof Te&&this.mode===e.mode}toString(){return"mode("+this.mode+")"}}function Ae(e,t){const n=[];return n[e-1]=t,n.map((function(e){return t}))}class Oe{constructor(e){null==e&&(e=ve.defaultOptions),this.deserializationOptions=e,this.stateFactories=null,this.actionFactories=null}deserialize(e){const t=this.reset(e);this.checkVersion(t),t&&this.skipUUID();const n=this.readATN();this.readStates(n,t),this.readRules(n,t),this.readModes(n);const r=[];return this.readSets(n,r,this.readInt.bind(this)),t&&this.readSets(n,r,this.readInt32.bind(this)),this.readEdges(n,r),this.readDecisions(n),this.readLexerActions(n,t),this.markPrecedenceDecisions(n),this.verifyATN(n),this.deserializationOptions.generateRuleBypassTransitions&&1===n.grammarType&&(this.generateRuleBypassTransitions(n),this.verifyATN(n)),n}reset(e){if(3===(e.charCodeAt?e.charCodeAt(0):e[0])){const t=function(e){const t=e.charCodeAt(0);return t>1?t-2:t+65534},n=e.split("").map(t);return n[0]=e.charCodeAt(0),this.data=n,this.pos=0,!0}return this.data=e,this.pos=0,!1}skipUUID(){let e=0;for(;e++<8;)this.readInt()}checkVersion(e){const t=this.readInt();if(!e&&4!==t)throw"Could not deserialize ATN with version "+t+" (expected 4)."}readATN(){const e=this.readInt(),t=this.readInt();return new Y(e,t)}readStates(e,t){let n,r,i;const o=[],s=[],a=this.readInt();for(let n=0;n0;)i.addTransition(u.transitions[c-1]),u.transitions=u.transitions.slice(-1);e.ruleToStartState[t].addTransition(new fe(i)),o.addTransition(new fe(a));const l=new Q;e.addState(l),l.addTransition(new ce(o,e.ruleToTokenType[t])),i.addTransition(new fe(l))}stateIsEndStateFor(e,t){if(e.ruleIndex!==t)return null;if(!(e instanceof oe))return null;const n=e.transitions[e.transitions.length-1].target;return n instanceof ee&&n.epsilonOnlyTransitions&&n.transitions[0].target instanceof b?e:null}markPrecedenceDecisions(e){for(let t=0;t=0):this.checkCondition(n.transitions.length<=1||n instanceof b)}}checkCondition(e,t){if(!e)throw null==t&&(t="IllegalState"),t}readInt(){return this.data[this.pos++]}readInt32(){return this.readInt()|this.readInt()<<16}edgeFactory(t,n,r,i,o,s,a,u){const c=t.states[i];switch(n){case w.EPSILON:return new fe(c);case w.RANGE:return new le(c,0!==a?e.EOF:o,s);case w.RULE:return new x(t.states[o],s,a,c);case w.PREDICATE:return new de(c,o,s,0!==a);case w.PRECEDENCE:return new ye(c,o);case w.ATOM:return new ce(c,0!==a?e.EOF:o);case w.ACTION:return new he(c,o,s,0!==a);case w.SET:return new k(c,u[o]);case w.NOT_SET:return new E(c,u[o]);case w.WILDCARD:return new S(c);default:throw"The specified transition type: "+n+" is not valid."}}stateFactory(e,t){if(null===this.stateFactories){const e=[];e[_.INVALID_TYPE]=null,e[_.BASIC]=()=>new Q,e[_.RULE_START]=()=>new te,e[_.BLOCK_START]=()=>new ue,e[_.PLUS_BLOCK_START]=()=>new se,e[_.STAR_BLOCK_START]=()=>new ae,e[_.TOKEN_START]=()=>new ne,e[_.RULE_STOP]=()=>new b,e[_.BLOCK_END]=()=>new J,e[_.STAR_LOOP_BACK]=()=>new ie,e[_.STAR_LOOP_ENTRY]=()=>new oe,e[_.PLUS_LOOP_BACK]=()=>new re,e[_.LOOP_END]=()=>new ee,this.stateFactories=e}if(e>this.stateFactories.length||null===this.stateFactories[e])throw"The specified state type "+e+" is not valid.";{const n=this.stateFactories[e]();if(null!==n)return n.ruleIndex=t,n}}lexerActionFactory(e,t,n){if(null===this.actionFactories){const e=[];e[0]=(e,t)=>new be(e),e[1]=(e,t)=>new we(e,t),e[2]=(e,t)=>new Te(e),e[3]=(e,t)=>xe.INSTANCE,e[4]=(e,t)=>Se.INSTANCE,e[5]=(e,t)=>new Ee(e),e[6]=(e,t)=>_e.INSTANCE,e[7]=(e,t)=>new ke(e),this.actionFactories=e}if(e>this.actionFactories.length||null===this.actionFactories[e])throw"The specified lexer action type "+e+" is not valid.";return this.actionFactories[e](t,n)}}class Ne{syntaxError(e,t,n,r,i,o){}reportAmbiguity(e,t,n,r,i,o,s){}reportAttemptingFullContext(e,t,n,r,i,o){}reportContextSensitivity(e,t,n,r,i,o){}}class Pe extends Ne{constructor(){super()}syntaxError(e,t,n,r,i,o){console.error("line "+n+":"+r+" "+i)}}Pe.INSTANCE=new Pe;class Ce extends Ne{constructor(e){if(super(),null===e)throw"delegates";return this.delegates=e,this}syntaxError(e,t,n,r,i,o){this.delegates.map((s=>s.syntaxError(e,t,n,r,i,o)))}reportAmbiguity(e,t,n,r,i,o,s){this.delegates.map((a=>a.reportAmbiguity(e,t,n,r,i,o,s)))}reportAttemptingFullContext(e,t,n,r,i,o){this.delegates.map((s=>s.reportAttemptingFullContext(e,t,n,r,i,o)))}reportContextSensitivity(e,t,n,r,i,o){this.delegates.map((s=>s.reportContextSensitivity(e,t,n,r,i,o)))}}class Re{constructor(){this._listeners=[Pe.INSTANCE],this._interp=null,this._stateNumber=-1}checkVersion(e){const t="4.13.1";t!==e&&console.log("ANTLR runtime and generated code versions disagree: "+t+"!="+e)}addErrorListener(e){this._listeners.push(e)}removeErrorListeners(){this._listeners=[]}getLiteralNames(){return Object.getPrototypeOf(this).constructor.literalNames||[]}getSymbolicNames(){return Object.getPrototypeOf(this).constructor.symbolicNames||[]}getTokenNames(){if(!this.tokenNames){const e=this.getLiteralNames(),t=this.getSymbolicNames(),n=e.length>t.length?e.length:t.length;this.tokenNames=[];for(let r=0;r";let n=t.text;return null===n&&(n=t.type===e.EOF?"":"<"+t.type+">"),n=n.replace("\n","\\n").replace("\r","\\r").replace("\t","\\t"),"'"+n+"'"}getErrorListenerDispatch(){return new Ce(this._listeners)}sempred(e,t,n){return!0}precpred(e,t){return!0}get atn(){return this._interp.atn}get state(){return this._stateNumber}set state(e){this._stateNumber=e}}Re.tokenTypeMapCache={},Re.ruleIndexMapCache={};class Le extends e{constructor(t,n,r,i,o){super(),this.source=void 0!==t?t:Le.EMPTY_SOURCE,this.type=void 0!==n?n:null,this.channel=void 0!==r?r:e.DEFAULT_CHANNEL,this.start=void 0!==i?i:-1,this.stop=void 0!==o?o:-1,this.tokenIndex=-1,null!==this.source[0]?(this.line=t[0].line,this.column=t[0].column):this.column=-1}clone(){const e=new Le(this.source,this.type,this.channel,this.start,this.stop);return e.tokenIndex=this.tokenIndex,e.line=this.line,e.column=this.column,e.text=this.text,e}cloneWithType(t){const n=new Le(this.source,t,this.channel,this.start,this.stop);return n.tokenIndex=this.tokenIndex,n.line=this.line,n.column=this.column,t===e.EOF&&(n.text=""),n}toString(){let e=this.text;return e=null!==e?e.replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t"):"","[@"+this.tokenIndex+","+this.start+":"+this.stop+"='"+e+"',<"+this.type+">"+(this.channel>0?",channel="+this.channel:"")+","+this.line+":"+this.column+"]"}get text(){if(null!==this._text)return this._text;const e=this.getInputStream();if(null===e)return null;const t=e.size;return this.start"}set text(e){this._text=e}}Le.EMPTY_SOURCE=[null,null];class Ie{}class De extends Ie{constructor(e){super(),this.copyText=void 0!==e&&e}create(e,t,n,r,i,o,s,a){const u=new Le(e,t,r,i,o);return u.line=s,u.column=a,null!==n?u.text=n:this.copyText&&null!==e[1]&&(u.text=e[1].getText(i,o)),u}createThin(e,t){const n=new Le(null,e);return n.text=t,n}}De.DEFAULT=new De;class Me extends Error{constructor(e){super(e.message),Error.captureStackTrace&&Error.captureStackTrace(this,Me),this.message=e.message,this.recognizer=e.recognizer,this.input=e.input,this.ctx=e.ctx,this.offendingToken=null,this.offendingState=-1,null!==this.recognizer&&(this.offendingState=this.recognizer.state)}getExpectedTokens(){return null!==this.recognizer?this.recognizer.atn.getExpectedTokens(this.offendingState,this.ctx):null}toString(){return this.message}}class je extends Me{constructor(e,t,n,r){super({message:"",recognizer:e,input:t,ctx:null}),this.startIndex=n,this.deadEndConfigs=r}toString(){let e="";return this.startIndex>=0&&this.startIndex":"\n"===t?"\\n":"\t"===t?"\\t":"\r"===t?"\\r":t}getCharErrorDisplay(e){return"'"+this.getErrorDisplayForChar(e)+"'"}recover(t){this._input.LA(1)!==e.EOF&&(t instanceof je?this._interp.consume(this._input):this._input.consume())}get inputStream(){return this._input}set inputStream(e){this._input=null,this._tokenFactorySourcePair=[this,this._input],this.reset(),this._input=e,this._tokenFactorySourcePair=[this,this._input]}get sourceName(){return this._input.sourceName}get type(){return this._type}set type(e){this._type=e}get line(){return this._interp.line}set line(e){this._interp.line=e}get column(){return this._interp.column}set column(e){this._interp.column=e}get text(){return null!==this._text?this._text:this._interp.getText(this._input)}set text(e){this._text=e}}function Be(e){return e.hashCodeForConfigSet()}function Ue(e,t){return e===t||null!==e&&null!==t&&e.equalsForConfigSet(t)}Fe.DEFAULT_MODE=0,Fe.MORE=-2,Fe.SKIP=-3,Fe.DEFAULT_TOKEN_CHANNEL=e.DEFAULT_CHANNEL,Fe.HIDDEN=e.HIDDEN_CHANNEL,Fe.MIN_CHAR_VALUE=0,Fe.MAX_CHAR_VALUE=1114111;class ze{constructor(e){this.configLookup=new l(Be,Ue),this.fullCtx=void 0===e||e,this.readOnly=!1,this.configs=[],this.uniqueAlt=0,this.conflictingAlts=null,this.hasSemanticContext=!1,this.dipsIntoOuterContext=!1,this.cachedHashCode=-1}add(e,t){if(void 0===t&&(t=null),this.readOnly)throw"This set is readonly";e.semanticContext!==h.NONE&&(this.hasSemanticContext=!0),e.reachesIntoOuterContext>0&&(this.dipsIntoOuterContext=!0);const n=this.configLookup.add(e);if(n===e)return this.cachedHashCode=-1,this.configs.push(e),!0;const r=!this.fullCtx,i=H(n.context,e.context,r,t);return n.reachesIntoOuterContext=Math.max(n.reachesIntoOuterContext,e.reachesIntoOuterContext),e.precedenceFilterSuppressed&&(n.precedenceFilterSuppressed=!0),n.context=i,!0}getStates(){const e=new l;for(let t=0;tQe.MAX_DFA_EDGE)return null;let n=e.edges[t-Qe.MIN_DFA_EDGE];return void 0===n&&(n=null),Qe.debug&&null!==n&&console.log("reuse state "+e.stateNumber+" edge to "+n.stateNumber),n}computeTargetState(e,t,n){const r=new qe;return this.getReachableConfigSet(e,t.configs,r,n),0===r.items.length?(r.hasSemanticContext||this.addDFAEdge(t,n,$e.ERROR),$e.ERROR):this.addDFAEdge(t,n,null,r)}failOrAccept(t,n,r,i){if(null!==this.prevAccept.dfaState){const e=t.dfaState.lexerActionExecutor;return this.accept(n,e,this.startIndex,t.index,t.line,t.column),t.dfaState.prediction}if(i===e.EOF&&n.index===this.startIndex)return e.EOF;throw new je(this.recog,n,this.startIndex,r)}getReachableConfigSet(t,n,r,i){let o=Y.INVALID_ALT_NUMBER;for(let s=0;sQe.MAX_DFA_EDGE||(Qe.debug&&console.log("EDGE "+e+" -> "+n+" upon "+t),null===e.edges&&(e.edges=[]),e.edges[t-Qe.MIN_DFA_EDGE]=n),n}addDFAState(e){const t=new Ve(null,e);let n=null;for(let t=0;te.startsWith("k-"))).map((e=>this.data[e]),this)}}const Je={SLL:0,LL:1,LL_EXACT_AMBIG_DETECTION:2,hasSLLConflictTerminatingPrediction:function(e,t){if(Je.allConfigsInRuleStopStates(t))return!0;if(e===Je.SLL&&t.hasSemanticContext){const e=new ze;for(let n=0;n1)return!0;return!1},allSubsetsEqual:function(e){let t=null;for(let n=0;n "+s),0===s.items.length?null:s}removeAllConfigsNotInRuleStopState(t,n){if(et.allConfigsInRuleStopStates(t))return t;const r=new ze(t.fullCtx);for(let i=0;i0&&(o=this.getAltThatFinishedDecisionEntryRule(i),o!==Y.INVALID_ALT_NUMBER)?o:Y.INVALID_ALT_NUMBER}getAltThatFinishedDecisionEntryRule(e){const t=[];for(let n=0;n0||r.state instanceof b&&r.context.hasEmptyPath())&&t.indexOf(r.alt)<0&&t.push(r.alt)}return 0===t.length?Y.INVALID_ALT_NUMBER:Math.min.apply(null,t)}splitAccordingToSemanticValidity(e,t){const n=new ze(e.fullCtx),r=new ze(e.fullCtx);for(let i=0;i=0&&(r+=1)}this.closureCheckingStopState(h,t,n,l,i,r,s)}}}canDropLoopEntryEdgeInLeftRecursiveRule(e){const t=e.state;if(t.stateType!==_.STAR_LOOP_ENTRY)return!1;if(t.stateType!==_.STAR_LOOP_ENTRY||!t.isPrecedenceDecision||e.context.isEmpty()||e.context.hasEmptyPath())return!1;const n=e.context.length;for(let r=0;r=0?this.parser.ruleNames[e]:""}getEpsilonTarget(t,n,r,i,o,s){switch(n.serializationType){case w.RULE:return this.ruleTransition(t,n);case w.PRECEDENCE:return this.precedenceTransition(t,n,r,i,o);case w.PREDICATE:return this.predTransition(t,n,r,i,o);case w.ACTION:return this.actionTransition(t,n);case w.EPSILON:return new y({state:n.target},t);case w.ATOM:case w.RANGE:case w.SET:return s&&n.matches(e.EOF,0,1)?new y({state:n.target},t):null;default:return null}}actionTransition(e,t){if(this.debug){const e=-1===t.actionIndex?65535:t.actionIndex;console.log("ACTION edge "+t.ruleIndex+":"+e)}return new y({state:t.target},e)}precedenceTransition(e,t,n,r,i){this.debug&&(console.log("PRED (collectPredicates="+n+") "+t.precedence+">=_p, ctx dependent=true"),null!==this.parser&&console.log("context surrounding pred is "+u(this.parser.getRuleInvocationStack())));let o=null;if(n&&r)if(i){const n=this._input.index;this._input.seek(this._startIndex);const r=t.getPredicate().evaluate(this.parser,this._outerContext);this._input.seek(n),r&&(o=new y({state:t.target},e))}else{const n=h.andContext(e.semanticContext,t.getPredicate());o=new y({state:t.target,semanticContext:n},e)}else o=new y({state:t.target},e);return this.debug&&console.log("config from pred transition="+o),o}predTransition(e,t,n,r,i){this.debug&&(console.log("PRED (collectPredicates="+n+") "+t.ruleIndex+":"+t.predIndex+", ctx dependent="+t.isCtxDependent),null!==this.parser&&console.log("context surrounding pred is "+u(this.parser.getRuleInvocationStack())));let o=null;if(n&&(t.isCtxDependent&&r||!t.isCtxDependent))if(i){const n=this._input.index;this._input.seek(this._startIndex);const r=t.getPredicate().evaluate(this.parser,this._outerContext);this._input.seek(n),r&&(o=new y({state:t.target},e))}else{const n=h.andContext(e.semanticContext,t.getPredicate());o=new y({state:t.target,semanticContext:n},e)}else o=new y({state:t.target},e);return this.debug&&console.log("config from pred transition="+o),o}ruleTransition(e,t){this.debug&&console.log("CALL rule "+this.getRuleName(t.target.ruleIndex)+", ctx="+e.context);const n=t.followState,r=F.create(e.context,n.stateNumber);return new y({state:t.target,context:r},e)}getConflictingAlts(e){const t=et.getConflictingAltSubsets(e);return et.getAlts(t)}getConflictingAltsOrUniqueAlt(e){let t=null;return e.uniqueAlt!==Y.INVALID_ALT_NUMBER?(t=new W,t.add(e.uniqueAlt)):t=e.conflictingAlts,t}getTokenName(t){if(t===e.EOF)return"EOF";if(null!==this.parser&&null!==this.parser.literalNames){if(!(t>=this.parser.literalNames.length&&t>=this.parser.symbolicNames.length))return(this.parser.literalNames[t]||this.parser.symbolicNames[t])+"<"+t+">";console.log(t+" ttype out of range: "+this.parser.literalNames),console.log(""+this.parser.getInputStream().getTokens())}return""+t}getLookaheadName(e){return this.getTokenName(e.LA(1))}dumpDeadEndConfigs(e){console.log("dead end configs: ");const t=e.getDeadEndConfigs();for(let e=0;e0){const e=n.state.transitions[0];e instanceof ce?r="Atom "+this.getTokenName(e.label):e instanceof k&&(r=(e instanceof E?"~":"")+"Set "+e.set)}console.error(n.toString(this.parser,!0)+":"+r)}}noViableAlt(e,t,n,r){return new tt(this.parser,e,e.get(r),e.LT(1),n,t)}getUniqueAlt(e){let t=Y.INVALID_ALT_NUMBER;for(let n=0;n "+r+" upon "+this.getTokenName(n)),null===r)return null;if(r=this.addDFAState(e,r),null===t||n<-1||n>this.atn.maxTokenType)return r;if(null===t.edges&&(t.edges=[]),t.edges[n+1]=r,this.debug){const t=null===this.parser?null:this.parser.literalNames,n=null===this.parser?null:this.parser.symbolicNames;console.log("DFA=\n"+e.toString(t,n))}return r}addDFAState(e,t){if(t===$e.ERROR)return t;const n=e.states.get(t);return null!==n?(this.trace_atn_sim&&console.log("addDFAState "+t+" exists"),n):(t.stateNumber=e.states.length,t.configs.readOnly||(t.configs.optimizeConfigs(this),t.configs.setReadonly(!0)),this.trace_atn_sim&&console.log("addDFAState new "+t),e.states.add(t),this.debug&&console.log("adding new DFA state: "+t),t)}reportAttemptingFullContext(e,t,n,r,i){if(this.debug||this.retry_debug){const t=new v(r,i+1);console.log("reportAttemptingFullContext decision="+e.decision+":"+n+", input="+this.parser.getTokenStream().getText(t))}null!==this.parser&&this.parser.getErrorListenerDispatch().reportAttemptingFullContext(this.parser,e,r,i,t,n)}reportContextSensitivity(e,t,n,r,i){if(this.debug||this.retry_debug){const t=new v(r,i+1);console.log("reportContextSensitivity decision="+e.decision+":"+n+", input="+this.parser.getTokenStream().getText(t))}null!==this.parser&&this.parser.getErrorListenerDispatch().reportContextSensitivity(this.parser,e,r,i,t,n)}reportAmbiguity(e,t,n,r,i,o,s){if(this.debug||this.retry_debug){const e=new v(n,r+1);console.log("reportAmbiguity "+o+":"+s+", input="+this.parser.getTokenStream().getText(e))}null!==this.parser&&this.parser.getErrorListenerDispatch().reportAmbiguity(this.parser,e,n,r,i,o,s)}}class it{constructor(){this.cache=new $}add(e){if(e===M.EMPTY)return M.EMPTY;const t=this.cache.get(e)||null;return null!==t?t:(this.cache.set(e,e),e)}get(e){return this.cache.get(e)||null}get length(){return this.cache.length}}const ot={ATN:Y,ATNDeserializer:Oe,LexerATNSimulator:Qe,ParserATNSimulator:rt,PredictionMode:et,PredictionContextCache:it};class st{constructor(e,t,n){this.dfa=e,this.literalNames=t||[],this.symbolicNames=n||[]}toString(){if(null===this.dfa.s0)return null;let e="";const t=this.dfa.sortedStates();for(let n=0;n"),e=e.concat(this.getStateString(t)),e=e.concat("\n"))}}}return 0===e.length?null:e}getEdgeLabel(e){return 0===e?"EOF":null!==this.literalNames||null!==this.symbolicNames?this.literalNames[e-1]||this.symbolicNames[e-1]:String.fromCharCode(e-1)}getStateString(e){const t=(e.isAcceptState?":":"")+"s"+e.stateNumber+(e.requiresFullContext?"^":"");return e.isAcceptState?null!==e.predicates?t+"=>"+u(e.predicates):t+"=>"+e.prediction.toString():t}}class at extends st{constructor(e){super(e,null)}getEdgeLabel(e){return"'"+String.fromCharCode(e)+"'"}}class ut{constructor(e,t){if(void 0===t&&(t=0),this.atnStartState=e,this.decision=t,this._states=new l,this.s0=null,this.precedenceDfa=!1,e instanceof oe&&e.isPrecedenceDecision){this.precedenceDfa=!0;const e=new Ve(null,new ze);e.edges=[],e.isAcceptState=!1,e.requiresFullContext=!1,this.s0=e}}getPrecedenceStartState(e){if(!this.precedenceDfa)throw"Only precedence DFAs may contain a precedence start state.";return e<0||e>=this.s0.edges.length?null:this.s0.edges[e]||null}setPrecedenceStartState(e,t){if(!this.precedenceDfa)throw"Only precedence DFAs may contain a precedence start state.";e<0||(this.s0.edges[e]=t)}setPrecedenceDfa(e){if(this.precedenceDfa!==e){if(this._states=new l,e){const e=new Ve(null,new ze);e.edges=[],e.isAcceptState=!1,e.requiresFullContext=!1,this.s0=e}else this.s0=null;this.precedenceDfa=e}}sortedStates(){return this._states.values().sort((function(e,t){return e.stateNumber-t.stateNumber}))}toString(e,t){return e=e||null,t=t||null,null===this.s0?"":new st(this,e,t).toString()}toLexerString(){return null===this.s0?"":new at(this).toString()}get states(){return this._states}}const ct={DFA:ut,DFASerializer:st,LexerDFASerializer:at,PredPrediction:Xe},lt={PredictionContext:M},ht={Interval:v,IntervalSet:g};class ft{visitTerminal(e){}visitErrorNode(e){}enterEveryRule(e){}exitEveryRule(e){}}class pt{visit(e){return Array.isArray(e)?e.map((function(e){return e.accept(this)}),this):e.accept(this)}visitChildren(e){return e.children?this.visit(e.children):null}visitTerminal(e){}visitErrorNode(e){}}class dt{walk(e,t){if(t instanceof R||void 0!==t.isErrorNode&&t.isErrorNode())e.visitErrorNode(t);else if(t instanceof C)e.visitTerminal(t);else{this.enterRule(e,t);for(let n=0;n=i.length)return""+n;const o=i[r]||null;return null===o||0===o.length?""+n:`${n} (${o})`}getConflictingAlts(e,t){if(null!==e)return e;const n=new W;for(let e=0;e=0&&e.consume(),this.lastErrorIndex=e._input.index,null===this.lastErrorStates&&(this.lastErrorStates=[]),this.lastErrorStates.push(e.state);const n=this.getErrorRecoverySet(e);this.consumeUntil(e,n)}sync(t){if(this.inErrorRecoveryMode(t))return;const n=t._interp.atn.states[t.state],r=t.getTokenStream().LA(1),i=t.atn.nextTokens(n);if(i.contains(r))return this.nextTokensContext=null,void(this.nextTokenState=_.INVALID_STATE_NUMBER);if(i.contains(e.EPSILON))null===this.nextTokensContext&&(this.nextTokensContext=t._ctx,this.nextTokensState=t._stateNumber);else switch(n.stateType){case _.BLOCK_START:case _.STAR_BLOCK_START:case _.PLUS_BLOCK_START:case _.STAR_LOOP_ENTRY:if(null!==this.singleTokenDeletion(t))return;throw new yt(t);case _.PLUS_LOOP_BACK:case _.STAR_LOOP_BACK:{this.reportUnwantedToken(t);const e=new g;e.addSet(t.getExpectedTokens());const n=e.addSet(this.getErrorRecoverySet(t));this.consumeUntil(t,n)}}}reportNoViableAlternative(t,n){const r=t.getTokenStream();let i;i=null!==r?n.startToken.type===e.EOF?"":r.getText(new v(n.startToken.tokenIndex,n.offendingToken.tokenIndex)):"";const o="no viable alternative at input "+this.escapeWSAndQuote(i);t.notifyErrorListeners(o,n.offendingToken,n)}reportInputMismatch(e,t){const n="mismatched input "+this.getTokenErrorDisplay(t.offendingToken)+" expecting "+t.getExpectedTokens().toString(e.literalNames,e.symbolicNames);e.notifyErrorListeners(n,t.offendingToken,t)}reportFailedPredicate(e,t){const n="rule "+e.ruleNames[e._ctx.ruleIndex]+" "+t.message;e.notifyErrorListeners(n,t.offendingToken,t)}reportUnwantedToken(e){if(this.inErrorRecoveryMode(e))return;this.beginErrorCondition(e);const t=e.getCurrentToken(),n="extraneous input "+this.getTokenErrorDisplay(t)+" expecting "+this.getExpectedTokens(e).toString(e.literalNames,e.symbolicNames);e.notifyErrorListeners(n,t,null)}reportMissingToken(e){if(this.inErrorRecoveryMode(e))return;this.beginErrorCondition(e);const t=e.getCurrentToken(),n="missing "+this.getExpectedTokens(e).toString(e.literalNames,e.symbolicNames)+" at "+this.getTokenErrorDisplay(t);e.notifyErrorListeners(n,t,null)}recoverInline(e){const t=this.singleTokenDeletion(e);if(null!==t)return e.consume(),t;if(this.singleTokenInsertion(e))return this.getMissingSymbol(e);throw new yt(e)}singleTokenInsertion(e){const t=e.getTokenStream().LA(1),n=e._interp.atn,r=n.states[e.state].transitions[0].target;return!!n.nextTokens(r,e._ctx).contains(t)&&(this.reportMissingToken(e),!0)}singleTokenDeletion(e){const t=e.getTokenStream().LA(2);if(this.getExpectedTokens(e).contains(t)){this.reportUnwantedToken(e),e.consume();const t=e.getCurrentToken();return this.reportMatch(e),t}return null}getMissingSymbol(t){const n=t.getCurrentToken(),r=this.getExpectedTokens(t).first();let i;i=r===e.EOF?"":"";let o=n;const s=t.getTokenStream().LT(-1);return o.type===e.EOF&&null!==s&&(o=s),t.getTokenFactory().create(o.source,r,i,e.DEFAULT_CHANNEL,-1,-1,o.line,o.column)}getExpectedTokens(e){return e.getExpectedTokens()}getTokenErrorDisplay(t){if(null===t)return"";let n=t.text;return null===n&&(n=t.type===e.EOF?"":"<"+t.type+">"),this.escapeWSAndQuote(n)}escapeWSAndQuote(e){return"'"+(e=(e=(e=e.replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t"))+"'"}getErrorRecoverySet(t){const n=t._interp.atn;let r=t._ctx;const i=new g;for(;null!==r&&r.invokingState>=0;){const e=n.states[r.invokingState].transitions[0],t=n.nextTokens(e.followState);i.addSet(t),r=r.parentCtx}return i.removeOne(e.EPSILON),i}consumeUntil(t,n){let r=t.getTokenStream().LA(1);for(;r!==e.EOF&&!n.contains(r);)t.consume(),r=t.getTokenStream().LA(1)}}class kt extends xt{constructor(){super()}recover(e,t){let n=e._ctx;for(;null!==n;)n.exception=t,n=n.parentCtx;throw new bt(t)}recoverInline(e){this.recover(e,new yt(e))}sync(e){}}const Et={RecognitionException:Me,NoViableAltException:tt,LexerNoViableAltException:je,InputMismatchException:yt,FailedPredicateException:vt,DiagnosticErrorListener:_t,BailErrorStrategy:kt,DefaultErrorStrategy:xt,ErrorListener:Ne};class St{constructor(e,t){if(this.name="",this.strdata=e,this.decodeToUnicodeCodePoints=t||!1,this._index=0,this.data=[],this.decodeToUnicodeCodePoints)for(let e=0;e=this._size)throw"cannot consume EOF";this._index+=1}LA(t){if(0===t)return 0;t<0&&(t+=1);const n=this._index+t-1;return n<0||n>=this._size?e.EOF:this.data[n]}LT(e){return this.LA(e)}mark(){return-1}release(e){}seek(e){e<=this._index?this._index=e:this._index=Math.min(e,this._size)}getText(e,t){if(t>=this._size&&(t=this._size-1),e>=this._size)return"";if(this.decodeToUnicodeCodePoints){let n="";for(let r=e;r<=t;r++)n+=String.fromCodePoint(this.data[r]);return n}return this.strdata.slice(e,t+1)}toString(){return this.strdata}get index(){return this._index}get size(){return this._size}}class Tt extends St{constructor(e,t){super(e,t)}}var At=U(92);const Ot="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node;class Nt extends Tt{static fromPath(e,t,n){if(!Ot)throw new Error("FileStream is only available when running in Node!");At.readFile(e,t,(function(e,t){let r=null;null!==t&&(r=new St(t,!0)),n(e,r)}))}constructor(e,t,n){if(!Ot)throw new Error("FileStream is only available when running in Node!");super(At.readFileSync(e,t||"utf-8"),n),this.fileName=e}}const Pt={fromString:function(e){return new St(e,!0)},fromBlob:function(e,t,n,r){const i=new window.FileReader;i.onload=function(e){const t=new St(e.target.result,!0);n(t)},i.onerror=r,i.readAsText(e,t)},fromBuffer:function(e,t){return new St(e.toString(t),!0)},fromPath:function(e,t,n){Nt.fromPath(e,t,n)},fromPathSync:function(e,t){return new Nt(e,t)}},Ct={arrayToString:u,stringToCharArray:function(e){let t=new Uint16Array(e.length);for(let n=0;n=0&&(this.fetchedEOF?this.index0)||this.fetch(t)>=t}fetch(t){if(this.fetchedEOF)return 0;for(let n=0;n=this.tokens.length&&(n=this.tokens.length-1);for(let o=t;o=this.tokens.length?this.tokens[this.tokens.length-1]:this.tokens[t]}adjustSeekIndex(e){return e}lazyInit(){-1===this.index&&this.setup()}setup(){this.sync(0),this.index=this.adjustSeekIndex(0)}setTokenSource(e){this.tokenSource=e,this.tokens=[],this.index=-1,this.fetchedEOF=!1}nextTokenOnChannel(t,n){if(this.sync(t),t>=this.tokens.length)return-1;let r=this.tokens[t];for(;r.channel!==this.channel;){if(r.type===e.EOF)return-1;t+=1,this.sync(t),r=this.tokens[t]}return t}previousTokenOnChannel(e,t){for(;e>=0&&this.tokens[e].channel!==t;)e-=1;return e}getHiddenTokensToRight(e,t){if(void 0===t&&(t=-1),this.lazyInit(),e<0||e>=this.tokens.length)throw e+" not in 0.."+this.tokens.length-1;const n=this.nextTokenOnChannel(e+1,Fe.DEFAULT_TOKEN_CHANNEL),r=e+1,i=-1===n?this.tokens.length-1:n;return this.filterForChannel(r,i,t)}getHiddenTokensToLeft(e,t){if(void 0===t&&(t=-1),this.lazyInit(),e<0||e>=this.tokens.length)throw e+" not in 0.."+this.tokens.length-1;const n=this.previousTokenOnChannel(e-1,Fe.DEFAULT_TOKEN_CHANNEL);if(n===e-1)return null;const r=n+1,i=e-1;return this.filterForChannel(r,i,t)}filterForChannel(e,t,n){const r=[];for(let i=e;i=this.tokens.length&&(r=this.tokens.length-1);let i="";for(let t=n;t=0&&this._parseListeners.splice(t,1),0===this._parseListeners.length&&(this._parseListeners=null)}}removeParseListeners(){this._parseListeners=null}triggerEnterRuleEvent(){if(null!==this._parseListeners){const e=this._ctx;this._parseListeners.forEach((function(t){t.enterEveryRule(e),e.enterRule(t)}))}}triggerExitRuleEvent(){if(null!==this._parseListeners){const e=this._ctx;this._parseListeners.slice(0).reverse().forEach((function(t){e.exitRule(t),t.exitEveryRule(e)}))}}getTokenFactory(){return this._input.tokenSource._factory}setTokenFactory(e){this._input.tokenSource._factory=e}getATNWithBypassAlts(){const e=this.getSerializedATN();if(null===e)throw"The current parser does not support an ATN with bypass alternatives.";let t=this.bypassAltsAtnCache[e];if(null===t){const n=new ve;n.generateRuleBypassTransitions=!0,t=new Oe(n).deserialize(e),this.bypassAltsAtnCache[e]=t}return t}getInputStream(){return this.getTokenStream()}setInputStream(e){this.setTokenStream(e)}getTokenStream(){return this._input}setTokenStream(e){this._input=null,this.reset(),this._input=e}get syntaxErrorsCount(){return this._syntaxErrors}getCurrentToken(){return this._input.LT(1)}notifyErrorListeners(e,t,n){n=n||null,null===(t=t||null)&&(t=this.getCurrentToken()),this._syntaxErrors+=1;const r=t.line,i=t.column;this.getErrorListenerDispatch().syntaxError(this,t,r,i,e,n)}consume(){const t=this.getCurrentToken();t.type!==e.EOF&&this.getInputStream().consume();const n=null!==this._parseListeners&&this._parseListeners.length>0;if(this.buildParseTrees||n){let e;e=this._errHandler.inErrorRecoveryMode(this)?this._ctx.addErrorNode(t):this._ctx.addTokenNode(t),e.invokingState=this.state,n&&this._parseListeners.forEach((function(t){e instanceof R||void 0!==e.isErrorNode&&e.isErrorNode()?t.visitErrorNode(e):e instanceof C&&t.visitTerminal(e)}))}return t}addContextToParseTree(){null!==this._ctx.parentCtx&&this._ctx.parentCtx.addChild(this._ctx)}enterRule(e,t,n){this.state=t,this._ctx=e,this._ctx.start=this._input.LT(1),this.buildParseTrees&&this.addContextToParseTree(),this.triggerEnterRuleEvent()}exitRule(){this._ctx.stop=this._input.LT(-1),this.triggerExitRuleEvent(),this.state=this._ctx.invokingState,this._ctx=this._ctx.parentCtx}enterOuterAlt(e,t){e.setAltNumber(t),this.buildParseTrees&&this._ctx!==e&&null!==this._ctx.parentCtx&&(this._ctx.parentCtx.removeLastChild(),this._ctx.parentCtx.addChild(e)),this._ctx=e}getPrecedence(){return 0===this._precedenceStack.length?-1:this._precedenceStack[this._precedenceStack.length-1]}enterRecursionRule(e,t,n,r){this.state=t,this._precedenceStack.push(r),this._ctx=e,this._ctx.start=this._input.LT(1),this.triggerEnterRuleEvent()}pushNewRecursionContext(e,t,n){const r=this._ctx;r.parentCtx=e,r.invokingState=t,r.stop=this._input.LT(-1),this._ctx=e,this._ctx.start=r.start,this.buildParseTrees&&this._ctx.addChild(r),this.triggerEnterRuleEvent()}unrollRecursionContexts(e){this._precedenceStack.pop(),this._ctx.stop=this._input.LT(-1);const t=this._ctx,n=this.getParseListeners();if(null!==n&&n.length>0)for(;this._ctx!==e;)this.triggerExitRuleEvent(),this._ctx=this._ctx.parentCtx;else this._ctx=e;t.parentCtx=e,this.buildParseTrees&&null!==e&&e.addChild(t)}getInvokingContext(e){let t=this._ctx;for(;null!==t;){if(t.ruleIndex===e)return t;t=t.parentCtx}return null}precpred(e,t){return t>=this._precedenceStack[this._precedenceStack.length-1]}inContext(e){return!1}isExpectedToken(t){const n=this._interp.atn;let r=this._ctx;const i=n.states[this.state];let o=n.nextTokens(i);if(o.contains(t))return!0;if(!o.contains(e.EPSILON))return!1;for(;null!==r&&r.invokingState>=0&&o.contains(e.EPSILON);){const e=n.states[r.invokingState].transitions[0];if(o=n.nextTokens(e.followState),o.contains(t))return!0;r=r.parentCtx}return!(!o.contains(e.EPSILON)||t!==e.EOF)}getExpectedTokens(){return this._interp.atn.getExpectedTokens(this.state,this._ctx)}getExpectedTokensWithinCurrentRule(){const e=this._interp.atn,t=e.states[this.state];return e.nextTokens(t)}getRuleIndex(e){const t=this.getRuleIndexMap()[e];return null!==t?t:-1}getRuleInvocationStack(e){null===(e=e||null)&&(e=this._ctx);const t=[];for(;null!==e;){const n=e.ruleIndex;n<0?t.push("n/a"):t.push(this.ruleNames[n]),e=e.parentCtx}return t}getDFAStrings(){return this._interp.decisionToDFA.toString()}dumpDFA(){let e=!1;for(let t=0;t0&&(e&&console.log(),this.printer.println("Decision "+n.decision+":"),this.printer.print(n.toString(this.literalNames,this.symbolicNames)),e=!0)}}getSourceName(){return this._input.sourceName}setTrace(e){e?(null!==this._tracer&&this.removeParseListener(this._tracer),this._tracer=new Dt(this),this.addParseListener(this._tracer)):(this.removeParseListener(this._tracer),this._tracer=null)}}Mt.bypassAltsAtnCache={};class jt extends C{constructor(e){super(),this.parentCtx=null,this.symbol=e}getChild(e){return null}getSymbol(){return this.symbol}getParent(){return this.parentCtx}getPayload(){return this.symbol}getSourceInterval(){if(null===this.symbol)return v.INVALID_INTERVAL;const e=this.symbol.tokenIndex;return new v(e,e)}getChildCount(){return 0}accept(e){return e.visitTerminal(this)}getText(){return this.symbol.text}toString(){return this.symbol.type===e.EOF?"":this.symbol.text}}class Ft extends jt{constructor(e){super(e)}isErrorNode(){return!0}accept(e){return e.visitErrorNode(this)}}class Bt extends D{constructor(e,t){super(e,t),this.children=null,this.start=null,this.stop=null,this.exception=null}copyFrom(e){this.parentCtx=e.parentCtx,this.invokingState=e.invokingState,this.children=null,this.start=e.start,this.stop=e.stop,e.children&&(this.children=[],e.children.map((function(e){e instanceof Ft&&(this.children.push(e),e.parentCtx=this)}),this))}enterRule(e){}exitRule(e){}addChild(e){return null===this.children&&(this.children=[]),this.children.push(e),e}removeLastChild(){null!==this.children&&this.children.pop()}addTokenNode(e){const t=new jt(e);return this.addChild(t),t.parentCtx=this,t}addErrorNode(e){const t=new Ft(e);return this.addChild(t),t.parentCtx=this,t}getChild(e,t){if(t=t||null,null===this.children||e<0||e>=this.children.length)return null;if(null===t)return this.children[e];for(let n=0;n=this.children.length)return null;for(let n=0;n2&&void 0!==arguments[2]?arguments[2]:Ut.DEFAULT_PROGRAM_NAME;n="number"==typeof e?e:e.tokenIndex;let i=this.getProgram(r),o=new $t(this.tokens,n,i.length,t);i.push(o)}insertBefore(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ut.DEFAULT_PROGRAM_NAME;n="number"==typeof e?e:e.tokenIndex;const i=this.getProgram(r),o=new Vt(this.tokens,n,i.length,t);i.push(o)}replaceSingle(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ut.DEFAULT_PROGRAM_NAME;this.replace(e,e,t,n)}replace(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Ut.DEFAULT_PROGRAM_NAME;if("number"!=typeof e&&(e=e.tokenIndex),"number"!=typeof t&&(t=t.tokenIndex),e>t||e<0||t<0||t>=this.tokens.size)throw new RangeError(`replace: range invalid: ${e}..${t}(size=${this.tokens.size})`);let i=this.getProgram(r),o=new qt(this.tokens,e,t,i.length,n);i.push(o)}delete(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ut.DEFAULT_PROGRAM_NAME;void 0===t&&(t=e),this.replace(e,t,null,n)}getProgram(e){let t=this.programs.get(e);return null==t&&(t=this.initializeProgram(e)),t}initializeProgram(e){const t=[];return this.programs.set(e,t),t}getText(t){let n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ut.DEFAULT_PROGRAM_NAME;n=t instanceof v?t:new v(0,this.tokens.size-1),"string"==typeof t&&(r=t);const i=this.programs.get(r);let o=n.start,s=n.stop;if(s>this.tokens.size-1&&(s=this.tokens.size-1),o<0&&(o=0),null==i||0===i.length)return this.tokens.getText(new v(o,s));let a=[],u=this.reduceToSingleOperationPerIndex(i),c=o;for(;c<=s&&c=this.tokens.size-1&&a.push(e.text.toString());return a.join("")}reduceToSingleOperationPerIndex(e){for(let t=0;tr.index&&t.index<=r.lastIndex&&(e[t.instructionIndex]=void 0);let o=this.getKindOfOps(e,qt,t);for(let t of o){if(t.index>=r.index&&t.lastIndex<=r.lastIndex){e[t.instructionIndex]=void 0;continue}let n=t.lastIndexr.lastIndex;if(null!=t.text||null!=r.text||n){if(!n)throw new Error(`replace op boundaries of ${r} overlap with previous ${t}`)}else e[t.instructionIndex]=void 0,r.index=Math.min(t.index,r.index),r.lastIndex=Math.max(t.lastIndex,r.lastIndex)}}for(let t=0;t=n.index&&r.index<=n.lastIndex)throw new Error(`insert op ${r} within boundaries of previous ${n}`)}else n.text=this.catOpText(r.text,n.text),e[t]=void 0}let t=new Map;for(let n of e)if(null!=n){if(null!=t.get(n.index))throw new Error("should only be one op per index");t.set(n.index,n)}return t}catOpText(e,t){let n="",r="";return null!=e&&(n=e.toString()),null!=t&&(r=t.toString()),n+r}getKindOfOps(e,t,n){return e.slice(0,n).filter((e=>e&&e instanceof t))}}class zt{constructor(e,t,n,r){this.tokens=e,this.instructionIndex=n,this.index=t,this.text=void 0===r?"":r}toString(){let e=this.constructor.name;const t=e.indexOf("$");return e=e.substring(t+1,e.length),"<"+e+"@"+this.tokens.get(this.index)+':"'+this.text+'">'}}class Vt extends zt{constructor(e,t,n,r){super(e,t,n,r)}execute(t){return this.text&&t.push(this.text.toString()),this.tokens.get(this.index).type!==e.EOF&&t.push(String(this.tokens.get(this.index).text)),this.index+1}}class $t extends Vt{constructor(e,t,n,r){super(e,t+1,n,r)}}class qt extends zt{constructor(e,t,n,r,i){super(e,t,r,i),this.lastIndex=n}execute(e){return this.text&&e.push(this.text.toString()),this.lastIndex+1}toString(){return null==this.text?"":"'}}const Kt={atn:ot,dfa:ct,context:lt,misc:ht,tree:mt,error:Et,Token:e,CommonToken:Le,CharStreams:Pt,CharStream:Tt,InputStream:Tt,CommonTokenStream:It,Lexer:Fe,Parser:Mt,ParserRuleContext:Bt,Interval:v,IntervalSet:g,LL1Analyzer:G,Utils:Ct,TokenStreamRewriter:Ut}})();var V=z.ZP;function $(e){return $="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$(e)}function q(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{defaultValue:null};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=H(this,t,[n]);var r=n.defaultValue,i=n.description,o=n.sensitive,s=n.nullable;return e.__class="TerraformVariable",e.defaultValue=r||null,e.description=i||null,e.sensitive=o||!1,e.nullable=s||!1,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Y(e,t)}(t,e),function(e,t,n){return t&&q(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"formattedName",get:function(){var e="variable"===this.category?"var":"local";return"output"===this.category?null:"".concat(e,".").concat(this.name)}}])}(e.Variable);const X=Q;function Z(e){return Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Z(e)}function J(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{isDynamic:!1};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=te(this,t,[n])).isDynamic=n.isDynamic||!1,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ie(e,t)}(t,e),function(e,t,n){return t&&J(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"isVariable",get:function(){return null!==this.value&&"string"==typeof this.value&&(this.value.startsWith("var.")||this.value.startsWith("local."))}}])}(e.ComponentAttribute);const se=oe;function ae(e){return ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ae(e)}function ue(e,t){for(var n=0;n0){var e=this.fieldsTree.pop();e.value.push(this.currentObjectField),this.currentObjectField=e}else this.currentComponent.attributes.push(this.currentObjectField),this.currentObjectField=null}},{key:"enterBlocktype",value:function(){}},{key:"exitBlocktype",value:function(){}},{key:"enterResourcetype",value:function(e){var t=this,n=ke(e);if(this.currentComponent.definition=this.definitions.find((function(e){return e.blockType===t.currentBlockType&&e.type===n}))||new m({blockType:this.currentBlockType,type:n}),"provider"===this.currentBlockType){var r="".concat(n,".").concat(n);this.currentComponent.externalId=n,this.currentComponent.id=this.createIdFromTypeExternalId(r)}}},{key:"exitResourcetype",value:function(){}},{key:"enterName",value:function(){}},{key:"exitName",value:function(e){this.currentComponent?this.currentComponent.externalId=ke(e):this.currentVariable&&(this.currentVariable.name=ke(e))}},{key:"enterLabel",value:function(){}},{key:"exitLabel",value:function(){}},{key:"enterBlockbody",value:function(){}},{key:"exitBlockbody",value:function(){}},{key:"enterArgument",value:function(e){var t;if(null!==(t=e.expression())&&void 0!==t&&null!==(t=t.section())&&void 0!==t&&t.map_()){this.currentObjectField&&this.fieldsTree.push(this.currentObjectField);var n=e.identifier().getText();this.currentObjectField=new se({name:n,type:"Object",value:[],definition:this.getAttributeDefinition(this.currentObjectField||this.currentComponent,n)})}this.isVariable()?(this.currentVariableField=e.identifier().getText(),"default"===this.currentVariableField&&(this.currentVariableField="defaultValue")):"local"===this.currentBlockType?(this.currentVariable=new X({category:"local",name:ke(e.identifier())}),this.currentVariableField="value"):this.currentField=new se}},{key:"exitArgument",value:function(e){var t,n,r=this;if(this.isVariable()){var i=e.identifier().getText();"description"===i?this.currentVariable.description=ke(e.expression()):"sensitive"!==i&&"nullable"!==i||(this.currentVariable[i]="true"===ke(e.expression()))}else if("local"===this.currentBlockType)this.addVariable();else if(this.currentField)this.currentField.name=e.identifier().getText(),this.currentObjectField?(this.currentObjectField.value.push(this.currentField),this.currentField.definition=this.getAttributeDefinition(this.currentObjectField,this.currentField.name)):(this.currentComponent.attributes.push(this.currentField),this.currentField.definition=this.getAttributeDefinition(this.currentComponent,this.currentField.name));else if(this.currentObjectField.name=e.identifier().getText(),this.fieldsTree.length>0){var o=this.fieldsTree.pop();o.value.push(this.currentObjectField),this.currentObjectField=o}else this.currentComponent.attributes.push(this.currentObjectField),this.currentObjectField=null;if("Reference"===(null===(t=this.currentField)||void 0===t||null===(t=t.definition)||void 0===t?void 0:t.type)&&/([^.]+\.[^.]+)/.exec(this.currentField.value)&&(Array.isArray(this.currentField.value)?this.currentField.value=this.currentField.value.map((function(e){var t=/([^.]+\.[^.]+)\.([^.]+)/.exec(e);return r.createIdFromTypeExternalId(t[1])})):this.currentField.value=this.createIdFromTypeExternalId(this.currentField.value)),"Link"===(null===(n=this.currentField)||void 0===n||null===(n=n.definition)||void 0===n?void 0:n.type)){this.currentField.type="Array",Array.isArray(this.currentField.value)&&(this.currentField.value=this.currentField.value.map((function(e){var t=/([^.]+\.[^.]+)\.([^.]+)/.exec(e);return r.createIdFromTypeExternalId(t[1])})));var s=/([^.]+\.[^.]+)(\.([^.]+))?/.exec(this.currentField.value);s&&(this.currentField.value=[this.createIdFromTypeExternalId(s[1])])}this.currentField=null}},{key:"createIdFromTypeExternalId",value:function(e){if(this.ids.has(e))return this.ids.get(e);var t="id_".concat(this.idCounter);return this.idCounter+=1,this.ids.set(e,t),t}},{key:"enterIdentifier",value:function(){}},{key:"exitIdentifier",value:function(){}},{key:"enterIdentifierchain",value:function(){}},{key:"exitIdentifierchain",value:function(){}},{key:"enterInline_index",value:function(){}},{key:"exitInline_index",value:function(){}},{key:"enterExpression",value:function(){}},{key:"exitExpression",value:function(){}},{key:"enterForloop",value:function(){}},{key:"exitForloop",value:function(){}},{key:"enterSection",value:function(e){var t;if(!this.currentField&&!this.isVariable()&&null!==(t=e.val())&&void 0!==t&&t.identifier()){var n=ke(e.val());this.currentField=new se({type:"String",value:"null"===n?null:n})}}},{key:"exitSection",value:function(){}},{key:"enterVal",value:function(){}},{key:"getFieldValueTypeFromContext",value:function(e){if(e.BOOL())return{value:"true"===e.BOOL().getText(),type:"Boolean"};if(e.signed_number())return{value:parseFloat(e.signed_number().getText()),type:"Number"};var t=ke(e);return{value:"null"===t?null:t,type:"String"}}},{key:"exitVal",value:function(e){var t=this.getFieldValueTypeFromContext(e),n=t.value,r=t.type;if(this.isVariable()||"local"===this.currentBlockType){var i=this.attributeTypeToVariableType(r);Array.isArray(this.currentVariable[this.currentVariableField])?(this.currentVariable[this.currentVariableField].push(n),"defaultValue"!==this.currentVariableField&&"value"!==this.currentVariableField||(this.currentVariable.type="list(".concat(i,")"))):(this.currentVariable[this.currentVariableField]=n,"defaultValue"!==this.currentVariableField&&"value"!==this.currentVariableField||(this.currentVariable.type=i))}else"Array"===this.currentField.type?this.currentField.value.push(n):(this.currentField.value=n,this.currentField.type=r)}},{key:"enterFunctioncall",value:function(){}},{key:"exitFunctioncall",value:function(){}},{key:"enterFunctionname",value:function(){}},{key:"exitFunctionname",value:function(){}},{key:"enterFunctionarguments",value:function(){}},{key:"exitFunctionarguments",value:function(){}},{key:"enterIndex",value:function(){}},{key:"exitIndex",value:function(){}},{key:"enterFiledecl",value:function(){}},{key:"exitFiledecl",value:function(){}},{key:"enterList_",value:function(){this.currentField?this.currentField&&(this.currentField.type="Array",this.currentField.value=[]):this.currentField=new se({type:"Array",value:[]}),this.isVariable()?this.currentVariable[this.currentVariableField]=[]:"local"===this.currentBlockType&&(this.currentVariable.value=[])}},{key:"exitList_",value:function(){this.currentField&&(this.currentField.type="Array")}},{key:"enterMap_",value:function(){}},{key:"exitMap_",value:function(){}},{key:"enterString",value:function(){}},{key:"exitString",value:function(){}},{key:"enterNumber",value:function(){}},{key:"exitNumber",value:function(){}},{key:"enterSigned_number",value:function(){}},{key:"exitSigned_number",value:function(){}}])}(V.tree.ParseTreeListener);const Se=Ee;function Te(e){return Te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Te(e)}function Ae(e,t,n){return t=Ne(t),function(e,t){if(t&&("object"==Te(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Oe()?Reflect.construct(t,n||[],Ne(e).constructor):t.apply(e,n))}function Oe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Oe=function(){return!!e})()}function Ne(e){return Ne=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ne(e)}function Pe(e,t){return Pe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Pe(e,t)}function Ce(e,t,n){return(t=Re(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Re(e){var t=function(e,t){if("object"!=Te(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Te(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Te(t)?t:t+""}var Le=(new V.atn.ATNDeserializer).deserialize([4,0,49,390,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,2,34,7,34,2,35,7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,39,2,40,7,40,2,41,7,41,2,42,7,42,2,43,7,43,2,44,7,44,2,45,7,45,2,46,7,46,2,47,7,47,2,48,7,48,2,49,7,49,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,6,1,6,1,7,1,7,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,9,1,9,1,10,1,10,1,11,1,11,1,11,1,11,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,13,1,13,1,14,1,14,1,15,1,15,1,16,1,16,1,16,1,16,1,16,1,17,1,17,1,18,1,18,1,19,1,19,1,20,1,20,1,21,1,21,1,22,1,22,1,22,1,23,1,23,1,24,1,24,1,24,1,25,1,25,1,25,1,26,1,26,1,26,1,27,1,27,1,27,1,28,1,28,1,28,1,29,1,29,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,32,1,32,1,32,1,33,1,33,1,34,1,34,1,35,1,35,1,36,1,36,1,37,1,37,1,38,1,38,1,39,1,39,1,39,1,39,1,39,1,39,1,39,5,39,261,8,39,10,39,12,39,264,9,39,1,39,1,39,1,39,1,39,1,40,1,40,1,40,1,40,1,41,4,41,275,8,41,11,41,12,41,276,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,3,42,288,8,42,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,5,43,305,8,43,10,43,12,43,308,9,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,5,44,330,8,44,10,44,12,44,333,9,44,1,44,1,44,1,44,1,44,1,45,1,45,1,45,1,45,5,45,343,8,45,10,45,12,45,346,9,45,1,45,1,45,1,46,1,46,5,46,352,8,46,10,46,12,46,355,9,46,1,47,1,47,1,47,3,47,360,8,47,1,47,5,47,363,8,47,10,47,12,47,366,9,47,1,47,1,47,1,48,1,48,1,48,1,48,5,48,374,8,48,10,48,12,48,377,9,48,1,48,1,48,1,48,1,48,1,48,1,49,4,49,385,8,49,11,49,12,49,386,1,49,1,49,4,262,306,331,375,0,50,1,1,3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25,13,27,14,29,15,31,16,33,17,35,18,37,19,39,20,41,21,43,22,45,23,47,24,49,25,51,26,53,27,55,28,57,29,59,0,61,30,63,31,65,32,67,33,69,34,71,35,73,36,75,37,77,38,79,39,81,40,83,41,85,42,87,43,89,44,91,45,93,46,95,47,97,48,99,49,1,0,6,1,0,48,57,3,0,10,10,13,13,34,34,2,0,65,90,97,122,5,0,45,45,48,57,65,90,95,95,97,122,2,0,10,10,13,13,3,0,9,10,13,13,32,32,400,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0,0,47,1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57,1,0,0,0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,1,0,0,0,0,69,1,0,0,0,0,71,1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77,1,0,0,0,0,79,1,0,0,0,0,81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87,1,0,0,0,0,89,1,0,0,0,0,91,1,0,0,0,0,93,1,0,0,0,0,95,1,0,0,0,0,97,1,0,0,0,0,99,1,0,0,0,1,101,1,0,0,0,3,111,1,0,0,0,5,120,1,0,0,0,7,125,1,0,0,0,9,132,1,0,0,0,11,139,1,0,0,0,13,146,1,0,0,0,15,148,1,0,0,0,17,154,1,0,0,0,19,158,1,0,0,0,21,160,1,0,0,0,23,162,1,0,0,0,25,166,1,0,0,0,27,177,1,0,0,0,29,179,1,0,0,0,31,181,1,0,0,0,33,183,1,0,0,0,35,188,1,0,0,0,37,190,1,0,0,0,39,192,1,0,0,0,41,194,1,0,0,0,43,196,1,0,0,0,45,198,1,0,0,0,47,201,1,0,0,0,49,203,1,0,0,0,51,206,1,0,0,0,53,209,1,0,0,0,55,212,1,0,0,0,57,215,1,0,0,0,59,218,1,0,0,0,61,220,1,0,0,0,63,229,1,0,0,0,65,238,1,0,0,0,67,241,1,0,0,0,69,243,1,0,0,0,71,245,1,0,0,0,73,247,1,0,0,0,75,249,1,0,0,0,77,251,1,0,0,0,79,253,1,0,0,0,81,269,1,0,0,0,83,274,1,0,0,0,85,287,1,0,0,0,87,289,1,0,0,0,89,321,1,0,0,0,91,338,1,0,0,0,93,349,1,0,0,0,95,359,1,0,0,0,97,369,1,0,0,0,99,384,1,0,0,0,101,102,5,116,0,0,102,103,5,101,0,0,103,104,5,114,0,0,104,105,5,114,0,0,105,106,5,97,0,0,106,107,5,102,0,0,107,108,5,111,0,0,108,109,5,114,0,0,109,110,5,109,0,0,110,2,1,0,0,0,111,112,5,114,0,0,112,113,5,101,0,0,113,114,5,115,0,0,114,115,5,111,0,0,115,116,5,117,0,0,116,117,5,114,0,0,117,118,5,99,0,0,118,119,5,101,0,0,119,4,1,0,0,0,120,121,5,100,0,0,121,122,5,97,0,0,122,123,5,116,0,0,123,124,5,97,0,0,124,6,1,0,0,0,125,126,5,111,0,0,126,127,5,117,0,0,127,128,5,116,0,0,128,129,5,112,0,0,129,130,5,117,0,0,130,131,5,116,0,0,131,8,1,0,0,0,132,133,5,108,0,0,133,134,5,111,0,0,134,135,5,99,0,0,135,136,5,97,0,0,136,137,5,108,0,0,137,138,5,115,0,0,138,10,1,0,0,0,139,140,5,109,0,0,140,141,5,111,0,0,141,142,5,100,0,0,142,143,5,117,0,0,143,144,5,108,0,0,144,145,5,101,0,0,145,12,1,0,0,0,146,147,5,61,0,0,147,14,1,0,0,0,148,149,5,108,0,0,149,150,5,111,0,0,150,151,5,99,0,0,151,152,5,97,0,0,152,153,5,108,0,0,153,16,1,0,0,0,154,155,5,118,0,0,155,156,5,97,0,0,156,157,5,114,0,0,157,18,1,0,0,0,158,159,5,63,0,0,159,20,1,0,0,0,160,161,5,58,0,0,161,22,1,0,0,0,162,163,5,102,0,0,163,164,5,111,0,0,164,165,5,114,0,0,165,24,1,0,0,0,166,167,5,106,0,0,167,168,5,115,0,0,168,169,5,111,0,0,169,170,5,110,0,0,170,171,5,101,0,0,171,172,5,110,0,0,172,173,5,99,0,0,173,174,5,111,0,0,174,175,5,100,0,0,175,176,5,101,0,0,176,26,1,0,0,0,177,178,5,44,0,0,178,28,1,0,0,0,179,180,5,91,0,0,180,30,1,0,0,0,181,182,5,93,0,0,182,32,1,0,0,0,183,184,5,102,0,0,184,185,5,105,0,0,185,186,5,108,0,0,186,187,5,101,0,0,187,34,1,0,0,0,188,189,5,43,0,0,189,36,1,0,0,0,190,191,5,45,0,0,191,38,1,0,0,0,192,193,5,47,0,0,193,40,1,0,0,0,194,195,5,37,0,0,195,42,1,0,0,0,196,197,5,62,0,0,197,44,1,0,0,0,198,199,5,62,0,0,199,200,5,61,0,0,200,46,1,0,0,0,201,202,5,60,0,0,202,48,1,0,0,0,203,204,5,60,0,0,204,205,5,61,0,0,205,50,1,0,0,0,206,207,5,61,0,0,207,208,5,61,0,0,208,52,1,0,0,0,209,210,5,33,0,0,210,211,5,61,0,0,211,54,1,0,0,0,212,213,5,38,0,0,213,214,5,38,0,0,214,56,1,0,0,0,215,216,5,124,0,0,216,217,5,124,0,0,217,58,1,0,0,0,218,219,7,0,0,0,219,60,1,0,0,0,220,221,5,118,0,0,221,222,5,97,0,0,222,223,5,114,0,0,223,224,5,105,0,0,224,225,5,97,0,0,225,226,5,98,0,0,226,227,5,108,0,0,227,228,5,101,0,0,228,62,1,0,0,0,229,230,5,112,0,0,230,231,5,114,0,0,231,232,5,111,0,0,232,233,5,118,0,0,233,234,5,105,0,0,234,235,5,100,0,0,235,236,5,101,0,0,236,237,5,114,0,0,237,64,1,0,0,0,238,239,5,105,0,0,239,240,5,110,0,0,240,66,1,0,0,0,241,242,5,42,0,0,242,68,1,0,0,0,243,244,5,46,0,0,244,70,1,0,0,0,245,246,5,123,0,0,246,72,1,0,0,0,247,248,5,125,0,0,248,74,1,0,0,0,249,250,5,40,0,0,250,76,1,0,0,0,251,252,5,41,0,0,252,78,1,0,0,0,253,254,5,60,0,0,254,255,5,60,0,0,255,256,5,69,0,0,256,257,5,79,0,0,257,258,5,70,0,0,258,262,1,0,0,0,259,261,9,0,0,0,260,259,1,0,0,0,261,264,1,0,0,0,262,263,1,0,0,0,262,260,1,0,0,0,263,265,1,0,0,0,264,262,1,0,0,0,265,266,5,69,0,0,266,267,5,79,0,0,267,268,5,70,0,0,268,80,1,0,0,0,269,270,5,110,0,0,270,271,5,117,0,0,271,272,5,108,0,0,272,82,1,0,0,0,273,275,3,59,29,0,274,273,1,0,0,0,275,276,1,0,0,0,276,274,1,0,0,0,276,277,1,0,0,0,277,84,1,0,0,0,278,279,5,116,0,0,279,280,5,114,0,0,280,281,5,117,0,0,281,288,5,101,0,0,282,283,5,102,0,0,283,284,5,97,0,0,284,285,5,108,0,0,285,286,5,115,0,0,286,288,5,101,0,0,287,278,1,0,0,0,287,282,1,0,0,0,288,86,1,0,0,0,289,290,5,60,0,0,290,291,5,60,0,0,291,292,5,68,0,0,292,293,5,69,0,0,293,294,5,83,0,0,294,295,5,67,0,0,295,296,5,82,0,0,296,297,5,73,0,0,297,298,5,80,0,0,298,299,5,84,0,0,299,300,5,73,0,0,300,301,5,79,0,0,301,302,5,78,0,0,302,306,1,0,0,0,303,305,9,0,0,0,304,303,1,0,0,0,305,308,1,0,0,0,306,307,1,0,0,0,306,304,1,0,0,0,307,309,1,0,0,0,308,306,1,0,0,0,309,310,5,68,0,0,310,311,5,69,0,0,311,312,5,83,0,0,312,313,5,67,0,0,313,314,5,82,0,0,314,315,5,73,0,0,315,316,5,80,0,0,316,317,5,84,0,0,317,318,5,73,0,0,318,319,5,79,0,0,319,320,5,78,0,0,320,88,1,0,0,0,321,322,5,60,0,0,322,323,5,60,0,0,323,324,5,45,0,0,324,325,5,69,0,0,325,326,5,79,0,0,326,327,5,70,0,0,327,331,1,0,0,0,328,330,9,0,0,0,329,328,1,0,0,0,330,333,1,0,0,0,331,332,1,0,0,0,331,329,1,0,0,0,332,334,1,0,0,0,333,331,1,0,0,0,334,335,5,69,0,0,335,336,5,79,0,0,336,337,5,70,0,0,337,90,1,0,0,0,338,344,5,34,0,0,339,340,5,92,0,0,340,343,5,34,0,0,341,343,8,1,0,0,342,339,1,0,0,0,342,341,1,0,0,0,343,346,1,0,0,0,344,342,1,0,0,0,344,345,1,0,0,0,345,347,1,0,0,0,346,344,1,0,0,0,347,348,5,34,0,0,348,92,1,0,0,0,349,353,7,2,0,0,350,352,7,3,0,0,351,350,1,0,0,0,352,355,1,0,0,0,353,351,1,0,0,0,353,354,1,0,0,0,354,94,1,0,0,0,355,353,1,0,0,0,356,360,5,35,0,0,357,358,5,47,0,0,358,360,5,47,0,0,359,356,1,0,0,0,359,357,1,0,0,0,360,364,1,0,0,0,361,363,8,4,0,0,362,361,1,0,0,0,363,366,1,0,0,0,364,362,1,0,0,0,364,365,1,0,0,0,365,367,1,0,0,0,366,364,1,0,0,0,367,368,6,47,0,0,368,96,1,0,0,0,369,370,5,47,0,0,370,371,5,42,0,0,371,375,1,0,0,0,372,374,9,0,0,0,373,372,1,0,0,0,374,377,1,0,0,0,375,376,1,0,0,0,375,373,1,0,0,0,376,378,1,0,0,0,377,375,1,0,0,0,378,379,5,42,0,0,379,380,5,47,0,0,380,381,1,0,0,0,381,382,6,48,0,0,382,98,1,0,0,0,383,385,7,5,0,0,384,383,1,0,0,0,385,386,1,0,0,0,386,384,1,0,0,0,386,387,1,0,0,0,387,388,1,0,0,0,388,389,6,49,1,0,389,100,1,0,0,0,13,0,262,276,287,306,331,342,344,353,359,364,375,386,2,0,1,0,6,0,0]),Ie=Le.decisionToState.map((function(e,t){return new V.dfa.DFA(e,t)})),De=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=Ae(this,t,[e]))._interp=new V.atn.LexerATNSimulator(n,Le,Ie,new V.atn.PredictionContextCache),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pe(e,t)}(t,e),function(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}(t)}(V.Lexer);function Me(e){return Me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Me(e)}function je(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fe(e,t){for(var n=0;n'","'>='","'<'","'<='","'=='","'!='","'&&'","'||'","'variable'","'provider'","'in'","'*'","'.'","'{'","'}'","'('","')'",null,"'nul'"]),Ce(De,"symbolicNames",[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"VARIABLE","PROVIDER","IN","STAR","DOT","LCURL","RCURL","LPAREN","RPAREN","EOF_","NULL_","NATURAL_NUMBER","BOOL","DESCRIPTION","MULTILINESTRING","STRING","IDENTIFIER","COMMENT","BLOCKCOMMENT","WS"]),Ce(De,"ruleNames",["T__0","T__1","T__2","T__3","T__4","T__5","T__6","T__7","T__8","T__9","T__10","T__11","T__12","T__13","T__14","T__15","T__16","T__17","T__18","T__19","T__20","T__21","T__22","T__23","T__24","T__25","T__26","T__27","T__28","DIGIT","VARIABLE","PROVIDER","IN","STAR","DOT","LCURL","RCURL","LPAREN","RPAREN","EOF_","NULL_","NATURAL_NUMBER","BOOL","DESCRIPTION","MULTILINESTRING","STRING","IDENTIFIER","COMMENT","BLOCKCOMMENT","WS"]),De.EOF=V.Token.EOF,De.T__0=1,De.T__1=2,De.T__2=3,De.T__3=4,De.T__4=5,De.T__5=6,De.T__6=7,De.T__7=8,De.T__8=9,De.T__9=10,De.T__10=11,De.T__11=12,De.T__12=13,De.T__13=14,De.T__14=15,De.T__15=16,De.T__16=17,De.T__17=18,De.T__18=19,De.T__19=20,De.T__20=21,De.T__21=22,De.T__22=23,De.T__23=24,De.T__24=25,De.T__25=26,De.T__26=27,De.T__27=28,De.T__28=29,De.VARIABLE=30,De.PROVIDER=31,De.IN=32,De.STAR=33,De.DOT=34,De.LCURL=35,De.RCURL=36,De.LPAREN=37,De.RPAREN=38,De.EOF_=39,De.NULL_=40,De.NATURAL_NUMBER=41,De.BOOL=42,De.DESCRIPTION=43,De.MULTILINESTRING=44,De.STRING=45,De.IDENTIFIER=46,De.COMMENT=47,De.BLOCKCOMMENT=48,De.WS=49;var We=(new V.atn.ATNDeserializer).deserialize([4,1,49,310,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,4,0,77,8,0,11,0,12,0,78,1,0,1,0,1,1,1,1,1,1,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,9,1,9,5,9,117,8,9,10,9,12,9,120,9,9,1,9,1,9,1,10,1,10,1,11,1,11,1,12,1,12,1,13,1,13,1,14,1,14,1,14,5,14,135,8,14,10,14,12,14,138,9,14,1,14,1,14,1,15,1,15,1,15,1,15,1,16,1,16,3,16,148,8,16,1,16,1,16,1,17,1,17,3,17,154,8,17,1,17,1,17,5,17,158,8,17,10,17,12,17,161,9,17,1,17,1,17,1,17,5,17,166,8,17,10,17,12,17,169,9,17,1,17,1,17,1,17,5,17,174,8,17,10,17,12,17,177,9,17,3,17,179,8,17,1,18,1,18,1,19,1,19,1,19,1,19,1,19,1,19,1,19,3,19,190,8,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,5,19,202,8,19,10,19,12,19,205,9,19,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,21,1,21,1,21,3,21,217,8,21,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,3,22,228,8,22,1,23,1,23,1,23,1,23,1,23,1,23,1,23,1,23,5,23,238,8,23,10,23,12,23,241,9,23,1,23,3,23,244,8,23,1,24,1,24,1,25,1,25,1,25,1,25,5,25,252,8,25,10,25,12,25,255,9,25,3,25,257,8,25,1,26,1,26,1,26,1,26,1,27,1,27,1,27,1,27,1,27,1,28,1,28,1,28,1,28,5,28,272,8,28,10,28,12,28,275,9,28,1,28,3,28,278,8,28,3,28,280,8,28,1,28,1,28,1,29,1,29,1,29,3,29,287,8,29,5,29,289,8,29,10,29,12,29,292,9,29,1,29,1,29,1,30,1,30,1,31,3,31,299,8,31,1,31,1,31,1,32,1,32,1,33,1,33,1,33,3,33,308,8,33,1,33,1,239,1,38,34,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,0,5,3,0,3,3,6,6,8,9,2,0,30,32,46,46,1,0,44,45,1,0,18,19,2,0,18,29,33,33,318,0,76,1,0,0,0,2,82,1,0,0,0,4,85,1,0,0,0,6,90,1,0,0,0,8,95,1,0,0,0,10,99,1,0,0,0,12,103,1,0,0,0,14,106,1,0,0,0,16,110,1,0,0,0,18,114,1,0,0,0,20,123,1,0,0,0,22,125,1,0,0,0,24,127,1,0,0,0,26,129,1,0,0,0,28,131,1,0,0,0,30,141,1,0,0,0,32,147,1,0,0,0,34,178,1,0,0,0,36,180,1,0,0,0,38,189,1,0,0,0,40,206,1,0,0,0,42,216,1,0,0,0,44,227,1,0,0,0,46,243,1,0,0,0,48,245,1,0,0,0,50,256,1,0,0,0,52,258,1,0,0,0,54,262,1,0,0,0,56,267,1,0,0,0,58,283,1,0,0,0,60,295,1,0,0,0,62,298,1,0,0,0,64,302,1,0,0,0,66,304,1,0,0,0,68,77,3,12,6,0,69,77,3,14,7,0,70,77,3,10,5,0,71,77,3,8,4,0,72,77,3,16,8,0,73,77,3,6,3,0,74,77,3,4,2,0,75,77,3,2,1,0,76,68,1,0,0,0,76,69,1,0,0,0,76,70,1,0,0,0,76,71,1,0,0,0,76,72,1,0,0,0,76,73,1,0,0,0,76,74,1,0,0,0,76,75,1,0,0,0,77,78,1,0,0,0,78,76,1,0,0,0,78,79,1,0,0,0,79,80,1,0,0,0,80,81,5,0,0,1,81,1,1,0,0,0,82,83,5,1,0,0,83,84,3,28,14,0,84,3,1,0,0,0,85,86,5,2,0,0,86,87,3,22,11,0,87,88,3,24,12,0,88,89,3,28,14,0,89,5,1,0,0,0,90,91,5,3,0,0,91,92,3,22,11,0,92,93,3,24,12,0,93,94,3,28,14,0,94,7,1,0,0,0,95,96,5,31,0,0,96,97,3,22,11,0,97,98,3,28,14,0,98,9,1,0,0,0,99,100,5,4,0,0,100,101,3,24,12,0,101,102,3,28,14,0,102,11,1,0,0,0,103,104,5,5,0,0,104,105,3,28,14,0,105,13,1,0,0,0,106,107,5,6,0,0,107,108,3,24,12,0,108,109,3,28,14,0,109,15,1,0,0,0,110,111,5,30,0,0,111,112,3,24,12,0,112,113,3,28,14,0,113,17,1,0,0,0,114,118,3,20,10,0,115,117,3,26,13,0,116,115,1,0,0,0,117,120,1,0,0,0,118,116,1,0,0,0,118,119,1,0,0,0,119,121,1,0,0,0,120,118,1,0,0,0,121,122,3,28,14,0,122,19,1,0,0,0,123,124,5,46,0,0,124,21,1,0,0,0,125,126,5,45,0,0,126,23,1,0,0,0,127,128,5,45,0,0,128,25,1,0,0,0,129,130,5,45,0,0,130,27,1,0,0,0,131,136,5,35,0,0,132,135,3,30,15,0,133,135,3,18,9,0,134,132,1,0,0,0,134,133,1,0,0,0,135,138,1,0,0,0,136,134,1,0,0,0,136,137,1,0,0,0,137,139,1,0,0,0,138,136,1,0,0,0,139,140,5,36,0,0,140,29,1,0,0,0,141,142,3,32,16,0,142,143,5,7,0,0,143,144,3,38,19,0,144,31,1,0,0,0,145,146,7,0,0,0,146,148,5,34,0,0,147,145,1,0,0,0,147,148,1,0,0,0,148,149,1,0,0,0,149,150,3,34,17,0,150,33,1,0,0,0,151,153,7,1,0,0,152,154,3,52,26,0,153,152,1,0,0,0,153,154,1,0,0,0,154,159,1,0,0,0,155,156,5,34,0,0,156,158,3,34,17,0,157,155,1,0,0,0,158,161,1,0,0,0,159,157,1,0,0,0,159,160,1,0,0,0,160,179,1,0,0,0,161,159,1,0,0,0,162,167,5,33,0,0,163,164,5,34,0,0,164,166,3,34,17,0,165,163,1,0,0,0,166,169,1,0,0,0,167,165,1,0,0,0,167,168,1,0,0,0,168,179,1,0,0,0,169,167,1,0,0,0,170,175,3,36,18,0,171,172,5,34,0,0,172,174,3,34,17,0,173,171,1,0,0,0,174,177,1,0,0,0,175,173,1,0,0,0,175,176,1,0,0,0,176,179,1,0,0,0,177,175,1,0,0,0,178,151,1,0,0,0,178,162,1,0,0,0,178,170,1,0,0,0,179,35,1,0,0,0,180,181,5,41,0,0,181,37,1,0,0,0,182,183,6,19,-1,0,183,190,3,42,21,0,184,185,5,37,0,0,185,186,3,38,19,0,186,187,5,38,0,0,187,190,1,0,0,0,188,190,3,40,20,0,189,182,1,0,0,0,189,184,1,0,0,0,189,188,1,0,0,0,190,203,1,0,0,0,191,192,10,4,0,0,192,193,3,64,32,0,193,194,3,38,19,5,194,202,1,0,0,0,195,196,10,2,0,0,196,197,5,10,0,0,197,198,3,38,19,0,198,199,5,11,0,0,199,200,3,38,19,3,200,202,1,0,0,0,201,191,1,0,0,0,201,195,1,0,0,0,202,205,1,0,0,0,203,201,1,0,0,0,203,204,1,0,0,0,204,39,1,0,0,0,205,203,1,0,0,0,206,207,5,12,0,0,207,208,3,32,16,0,208,209,5,32,0,0,209,210,3,38,19,0,210,211,5,11,0,0,211,212,3,38,19,0,212,41,1,0,0,0,213,217,3,56,28,0,214,217,3,58,29,0,215,217,3,44,22,0,216,213,1,0,0,0,216,214,1,0,0,0,216,215,1,0,0,0,217,43,1,0,0,0,218,228,5,40,0,0,219,228,3,62,31,0,220,228,3,60,30,0,221,228,3,32,16,0,222,228,5,42,0,0,223,228,5,43,0,0,224,228,3,54,27,0,225,228,3,46,23,0,226,228,5,39,0,0,227,218,1,0,0,0,227,219,1,0,0,0,227,220,1,0,0,0,227,221,1,0,0,0,227,222,1,0,0,0,227,223,1,0,0,0,227,224,1,0,0,0,227,225,1,0,0,0,227,226,1,0,0,0,228,45,1,0,0,0,229,230,3,48,24,0,230,231,5,37,0,0,231,232,3,50,25,0,232,233,5,38,0,0,233,244,1,0,0,0,234,235,5,13,0,0,235,239,5,37,0,0,236,238,9,0,0,0,237,236,1,0,0,0,238,241,1,0,0,0,239,240,1,0,0,0,239,237,1,0,0,0,240,242,1,0,0,0,241,239,1,0,0,0,242,244,5,38,0,0,243,229,1,0,0,0,243,234,1,0,0,0,244,47,1,0,0,0,245,246,5,46,0,0,246,49,1,0,0,0,247,257,1,0,0,0,248,253,3,38,19,0,249,250,5,14,0,0,250,252,3,38,19,0,251,249,1,0,0,0,252,255,1,0,0,0,253,251,1,0,0,0,253,254,1,0,0,0,254,257,1,0,0,0,255,253,1,0,0,0,256,247,1,0,0,0,256,248,1,0,0,0,257,51,1,0,0,0,258,259,5,15,0,0,259,260,3,38,19,0,260,261,5,16,0,0,261,53,1,0,0,0,262,263,5,17,0,0,263,264,5,37,0,0,264,265,3,38,19,0,265,266,5,38,0,0,266,55,1,0,0,0,267,279,5,15,0,0,268,273,3,38,19,0,269,270,5,14,0,0,270,272,3,38,19,0,271,269,1,0,0,0,272,275,1,0,0,0,273,271,1,0,0,0,273,274,1,0,0,0,274,277,1,0,0,0,275,273,1,0,0,0,276,278,5,14,0,0,277,276,1,0,0,0,277,278,1,0,0,0,278,280,1,0,0,0,279,268,1,0,0,0,279,280,1,0,0,0,280,281,1,0,0,0,281,282,5,16,0,0,282,57,1,0,0,0,283,290,5,35,0,0,284,286,3,30,15,0,285,287,5,14,0,0,286,285,1,0,0,0,286,287,1,0,0,0,287,289,1,0,0,0,288,284,1,0,0,0,289,292,1,0,0,0,290,288,1,0,0,0,290,291,1,0,0,0,291,293,1,0,0,0,292,290,1,0,0,0,293,294,5,36,0,0,294,59,1,0,0,0,295,296,7,2,0,0,296,61,1,0,0,0,297,299,7,3,0,0,298,297,1,0,0,0,298,299,1,0,0,0,299,300,1,0,0,0,300,301,3,66,33,0,301,63,1,0,0,0,302,303,7,4,0,0,303,65,1,0,0,0,304,307,5,41,0,0,305,306,5,34,0,0,306,308,5,41,0,0,307,305,1,0,0,0,307,308,1,0,0,0,308,67,1,0,0,0,27,76,78,118,134,136,147,153,159,167,175,178,189,201,203,216,227,239,243,253,256,273,277,279,286,290,298,307]),Ge=We.decisionToState.map((function(e,t){return new V.dfa.DFA(e,t)})),Ye=new V.atn.PredictionContextCache,Qe=function(e){function t(e){var n;return je(this,t),(n=Ue(this,t,[e]))._interp=new V.atn.ParserATNSimulator(n,We,Ge,Ye),n.ruleNames=t.ruleNames,n.literalNames=t.literalNames,n.symbolicNames=t.symbolicNames,n}return $e(t,e),Be(t,[{key:"sempred",value:function(e,t,n){if(19===t)return this.expression_sempred(e,n);throw"No predicate with index:"+t}},{key:"expression_sempred",value:function(e,t){switch(t){case 0:return this.precpred(this._ctx,4);case 1:return this.precpred(this._ctx,2);default:throw"No predicate with index:"+t}}},{key:"file_",value:function(){var e=new Xe(this,this._ctx,this.state);this.enterRule(e,0,t.RULE_file_);var n=0;try{this.enterOuterAlt(e,1),this.state=76,this._errHandler.sync(this),n=this._input.LA(1);do{switch(this.state=76,this._errHandler.sync(this),this._input.LA(1)){case 5:this.state=68,this.local();break;case 6:this.state=69,this.module();break;case 4:this.state=70,this.output();break;case 31:this.state=71,this.provider();break;case 30:this.state=72,this.variable();break;case 3:this.state=73,this.data();break;case 2:this.state=74,this.resource();break;case 1:this.state=75,this.terraform();break;default:throw new V.error.NoViableAltException(this)}this.state=78,this._errHandler.sync(this),n=this._input.LA(1)}while(!(-32&n)&&1<'","'>='","'<'","'<='","'=='","'!='","'&&'","'||'","'variable'","'provider'","'in'","'*'","'.'","'{'","'}'","'('","')'",null,"'nul'"]),Ke(Qe,"symbolicNames",[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"VARIABLE","PROVIDER","IN","STAR","DOT","LCURL","RCURL","LPAREN","RPAREN","EOF_","NULL_","NATURAL_NUMBER","BOOL","DESCRIPTION","MULTILINESTRING","STRING","IDENTIFIER","COMMENT","BLOCKCOMMENT","WS"]),Ke(Qe,"ruleNames",["file_","terraform","resource","data","provider","output","local","module","variable","block","blocktype","resourcetype","name","label","blockbody","argument","identifier","identifierchain","inline_index","expression","forloop","section","val","functioncall","functionname","functionarguments","index","filedecl","list_","map_","string","signed_number","operator_","number"]),Qe.EOF=V.Token.EOF,Qe.T__0=1,Qe.T__1=2,Qe.T__2=3,Qe.T__3=4,Qe.T__4=5,Qe.T__5=6,Qe.T__6=7,Qe.T__7=8,Qe.T__8=9,Qe.T__9=10,Qe.T__10=11,Qe.T__11=12,Qe.T__12=13,Qe.T__13=14,Qe.T__14=15,Qe.T__15=16,Qe.T__16=17,Qe.T__17=18,Qe.T__18=19,Qe.T__19=20,Qe.T__20=21,Qe.T__21=22,Qe.T__22=23,Qe.T__23=24,Qe.T__24=25,Qe.T__25=26,Qe.T__26=27,Qe.T__27=28,Qe.T__28=29,Qe.VARIABLE=30,Qe.PROVIDER=31,Qe.IN=32,Qe.STAR=33,Qe.DOT=34,Qe.LCURL=35,Qe.RCURL=36,Qe.LPAREN=37,Qe.RPAREN=38,Qe.EOF_=39,Qe.NULL_=40,Qe.NATURAL_NUMBER=41,Qe.BOOL=42,Qe.DESCRIPTION=43,Qe.MULTILINESTRING=44,Qe.STRING=45,Qe.IDENTIFIER=46,Qe.COMMENT=47,Qe.BLOCKCOMMENT=48,Qe.WS=49,Qe.RULE_file_=0,Qe.RULE_terraform=1,Qe.RULE_resource=2,Qe.RULE_data=3,Qe.RULE_provider=4,Qe.RULE_output=5,Qe.RULE_local=6,Qe.RULE_module=7,Qe.RULE_variable=8,Qe.RULE_block=9,Qe.RULE_blocktype=10,Qe.RULE_resourcetype=11,Qe.RULE_name=12,Qe.RULE_label=13,Qe.RULE_blockbody=14,Qe.RULE_argument=15,Qe.RULE_identifier=16,Qe.RULE_identifierchain=17,Qe.RULE_inline_index=18,Qe.RULE_expression=19,Qe.RULE_forloop=20,Qe.RULE_section=21,Qe.RULE_val=22,Qe.RULE_functioncall=23,Qe.RULE_functionname=24,Qe.RULE_functionarguments=25,Qe.RULE_index=26,Qe.RULE_filedecl=27,Qe.RULE_list_=28,Qe.RULE_map_=29,Qe.RULE_string=30,Qe.RULE_signed_number=31,Qe.RULE_operator_=32,Qe.RULE_number=33;var Xe=function(e){function t(e,n,r){var i;return je(this,t),void 0===n&&(n=null),null==r&&(r=-1),Ke(i=Ue(this,t,[n,r]),"local",(function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(rt):this.getTypedRuleContext(rt,e)})),Ke(i,"module",(function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(it):this.getTypedRuleContext(it,e)})),Ke(i,"output",(function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(nt):this.getTypedRuleContext(nt,e)})),Ke(i,"provider",(function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(tt):this.getTypedRuleContext(tt,e)})),Ke(i,"variable",(function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(ot):this.getTypedRuleContext(ot,e)})),Ke(i,"data",(function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(et):this.getTypedRuleContext(et,e)})),Ke(i,"resource",(function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(Je):this.getTypedRuleContext(Je,e)})),Ke(i,"terraform",(function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(Ze):this.getTypedRuleContext(Ze,e)})),i.parser=e,i.ruleIndex=Qe.RULE_file_,i}return $e(t,e),Be(t,[{key:"EOF",value:function(){return this.getToken(Qe.EOF,0)}},{key:"enterRule",value:function(e){e instanceof Se&&e.enterFile_(this)}},{key:"exitRule",value:function(e){e instanceof Se&&e.exitFile_(this)}}])}(V.ParserRuleContext),Ze=function(e){function t(e,n,r){var i;return je(this,t),void 0===n&&(n=null),null==r&&(r=-1),(i=Ue(this,t,[n,r])).parser=e,i.ruleIndex=Qe.RULE_terraform,i}return $e(t,e),Be(t,[{key:"blockbody",value:function(){return this.getTypedRuleContext(ht,0)}},{key:"enterRule",value:function(e){e instanceof Se&&e.enterTerraform(this)}},{key:"exitRule",value:function(e){e instanceof Se&&e.exitTerraform(this)}}])}(V.ParserRuleContext),Je=function(e){function t(e,n,r){var i;return je(this,t),void 0===n&&(n=null),null==r&&(r=-1),(i=Ue(this,t,[n,r])).parser=e,i.ruleIndex=Qe.RULE_resource,i}return $e(t,e),Be(t,[{key:"resourcetype",value:function(){return this.getTypedRuleContext(ut,0)}},{key:"name",value:function(){return this.getTypedRuleContext(ct,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(ht,0)}},{key:"enterRule",value:function(e){e instanceof Se&&e.enterResource(this)}},{key:"exitRule",value:function(e){e instanceof Se&&e.exitResource(this)}}])}(V.ParserRuleContext),et=function(e){function t(e,n,r){var i;return je(this,t),void 0===n&&(n=null),null==r&&(r=-1),(i=Ue(this,t,[n,r])).parser=e,i.ruleIndex=Qe.RULE_data,i}return $e(t,e),Be(t,[{key:"resourcetype",value:function(){return this.getTypedRuleContext(ut,0)}},{key:"name",value:function(){return this.getTypedRuleContext(ct,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(ht,0)}},{key:"enterRule",value:function(e){e instanceof Se&&e.enterData(this)}},{key:"exitRule",value:function(e){e instanceof Se&&e.exitData(this)}}])}(V.ParserRuleContext),tt=function(e){function t(e,n,r){var i;return je(this,t),void 0===n&&(n=null),null==r&&(r=-1),(i=Ue(this,t,[n,r])).parser=e,i.ruleIndex=Qe.RULE_provider,i}return $e(t,e),Be(t,[{key:"PROVIDER",value:function(){return this.getToken(Qe.PROVIDER,0)}},{key:"resourcetype",value:function(){return this.getTypedRuleContext(ut,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(ht,0)}},{key:"enterRule",value:function(e){e instanceof Se&&e.enterProvider(this)}},{key:"exitRule",value:function(e){e instanceof Se&&e.exitProvider(this)}}])}(V.ParserRuleContext),nt=function(e){function t(e,n,r){var i;return je(this,t),void 0===n&&(n=null),null==r&&(r=-1),(i=Ue(this,t,[n,r])).parser=e,i.ruleIndex=Qe.RULE_output,i}return $e(t,e),Be(t,[{key:"name",value:function(){return this.getTypedRuleContext(ct,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(ht,0)}},{key:"enterRule",value:function(e){e instanceof Se&&e.enterOutput(this)}},{key:"exitRule",value:function(e){e instanceof Se&&e.exitOutput(this)}}])}(V.ParserRuleContext),rt=function(e){function t(e,n,r){var i;return je(this,t),void 0===n&&(n=null),null==r&&(r=-1),(i=Ue(this,t,[n,r])).parser=e,i.ruleIndex=Qe.RULE_local,i}return $e(t,e),Be(t,[{key:"blockbody",value:function(){return this.getTypedRuleContext(ht,0)}},{key:"enterRule",value:function(e){e instanceof Se&&e.enterLocal(this)}},{key:"exitRule",value:function(e){e instanceof Se&&e.exitLocal(this)}}])}(V.ParserRuleContext),it=function(e){function t(e,n,r){var i;return je(this,t),void 0===n&&(n=null),null==r&&(r=-1),(i=Ue(this,t,[n,r])).parser=e,i.ruleIndex=Qe.RULE_module,i}return $e(t,e),Be(t,[{key:"name",value:function(){return this.getTypedRuleContext(ct,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(ht,0)}},{key:"enterRule",value:function(e){e instanceof Se&&e.enterModule(this)}},{key:"exitRule",value:function(e){e instanceof Se&&e.exitModule(this)}}])}(V.ParserRuleContext),ot=function(e){function t(e,n,r){var i;return je(this,t),void 0===n&&(n=null),null==r&&(r=-1),(i=Ue(this,t,[n,r])).parser=e,i.ruleIndex=Qe.RULE_variable,i}return $e(t,e),Be(t,[{key:"VARIABLE",value:function(){return this.getToken(Qe.VARIABLE,0)}},{key:"name",value:function(){return this.getTypedRuleContext(ct,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(ht,0)}},{key:"enterRule",value:function(e){e instanceof Se&&e.enterVariable(this)}},{key:"exitRule",value:function(e){e instanceof Se&&e.exitVariable(this)}}])}(V.ParserRuleContext),st=function(e){function t(e,n,r){var i;return je(this,t),void 0===n&&(n=null),null==r&&(r=-1),Ke(i=Ue(this,t,[n,r]),"label",(function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(lt):this.getTypedRuleContext(lt,e)})),i.parser=e,i.ruleIndex=Qe.RULE_block,i}return $e(t,e),Be(t,[{key:"blocktype",value:function(){return this.getTypedRuleContext(at,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(ht,0)}},{key:"enterRule",value:function(e){e instanceof Se&&e.enterBlock(this)}},{key:"exitRule",value:function(e){e instanceof Se&&e.exitBlock(this)}}])}(V.ParserRuleContext),at=function(e){function t(e,n,r){var i;return je(this,t),void 0===n&&(n=null),null==r&&(r=-1),(i=Ue(this,t,[n,r])).parser=e,i.ruleIndex=Qe.RULE_blocktype,i}return $e(t,e),Be(t,[{key:"IDENTIFIER",value:function(){return this.getToken(Qe.IDENTIFIER,0)}},{key:"enterRule",value:function(e){e instanceof Se&&e.enterBlocktype(this)}},{key:"exitRule",value:function(e){e instanceof Se&&e.exitBlocktype(this)}}])}(V.ParserRuleContext),ut=function(e){function t(e,n,r){var i;return je(this,t),void 0===n&&(n=null),null==r&&(r=-1),(i=Ue(this,t,[n,r])).parser=e,i.ruleIndex=Qe.RULE_resourcetype,i}return $e(t,e),Be(t,[{key:"STRING",value:function(){return this.getToken(Qe.STRING,0)}},{key:"enterRule",value:function(e){e instanceof Se&&e.enterResourcetype(this)}},{key:"exitRule",value:function(e){e instanceof Se&&e.exitResourcetype(this)}}])}(V.ParserRuleContext),ct=function(e){function t(e,n,r){var i;return je(this,t),void 0===n&&(n=null),null==r&&(r=-1),(i=Ue(this,t,[n,r])).parser=e,i.ruleIndex=Qe.RULE_name,i}return $e(t,e),Be(t,[{key:"STRING",value:function(){return this.getToken(Qe.STRING,0)}},{key:"enterRule",value:function(e){e instanceof Se&&e.enterName(this)}},{key:"exitRule",value:function(e){e instanceof Se&&e.exitName(this)}}])}(V.ParserRuleContext),lt=function(e){function t(e,n,r){var i;return je(this,t),void 0===n&&(n=null),null==r&&(r=-1),(i=Ue(this,t,[n,r])).parser=e,i.ruleIndex=Qe.RULE_label,i}return $e(t,e),Be(t,[{key:"STRING",value:function(){return this.getToken(Qe.STRING,0)}},{key:"enterRule",value:function(e){e instanceof Se&&e.enterLabel(this)}},{key:"exitRule",value:function(e){e instanceof Se&&e.exitLabel(this)}}])}(V.ParserRuleContext),ht=function(e){function t(e,n,r){var i;return je(this,t),void 0===n&&(n=null),null==r&&(r=-1),Ke(i=Ue(this,t,[n,r]),"argument",(function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(ft):this.getTypedRuleContext(ft,e)})),Ke(i,"block",(function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(st):this.getTypedRuleContext(st,e)})),i.parser=e,i.ruleIndex=Qe.RULE_blockbody,i}return $e(t,e),Be(t,[{key:"LCURL",value:function(){return this.getToken(Qe.LCURL,0)}},{key:"RCURL",value:function(){return this.getToken(Qe.RCURL,0)}},{key:"enterRule",value:function(e){e instanceof Se&&e.enterBlockbody(this)}},{key:"exitRule",value:function(e){e instanceof Se&&e.exitBlockbody(this)}}])}(V.ParserRuleContext),ft=function(e){function t(e,n,r){var i;return je(this,t),void 0===n&&(n=null),null==r&&(r=-1),(i=Ue(this,t,[n,r])).parser=e,i.ruleIndex=Qe.RULE_argument,i}return $e(t,e),Be(t,[{key:"identifier",value:function(){return this.getTypedRuleContext(pt,0)}},{key:"expression",value:function(){return this.getTypedRuleContext(yt,0)}},{key:"enterRule",value:function(e){e instanceof Se&&e.enterArgument(this)}},{key:"exitRule",value:function(e){e instanceof Se&&e.exitArgument(this)}}])}(V.ParserRuleContext),pt=function(e){function t(e,n,r){var i;return je(this,t),void 0===n&&(n=null),null==r&&(r=-1),(i=Ue(this,t,[n,r])).parser=e,i.ruleIndex=Qe.RULE_identifier,i}return $e(t,e),Be(t,[{key:"identifierchain",value:function(){return this.getTypedRuleContext(dt,0)}},{key:"DOT",value:function(){return this.getToken(Qe.DOT,0)}},{key:"enterRule",value:function(e){e instanceof Se&&e.enterIdentifier(this)}},{key:"exitRule",value:function(e){e instanceof Se&&e.exitIdentifier(this)}}])}(V.ParserRuleContext),dt=function(e){function t(e,n,r){var i;return je(this,t),void 0===n&&(n=null),null==r&&(r=-1),Ke(i=Ue(this,t,[n,r]),"DOT",(function(e){return void 0===e&&(e=null),null===e?this.getTokens(Qe.DOT):this.getToken(Qe.DOT,e)})),Ke(i,"identifierchain",(function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(t):this.getTypedRuleContext(t,e)})),i.parser=e,i.ruleIndex=Qe.RULE_identifierchain,i}return $e(t,e),Be(t,[{key:"IDENTIFIER",value:function(){return this.getToken(Qe.IDENTIFIER,0)}},{key:"IN",value:function(){return this.getToken(Qe.IN,0)}},{key:"VARIABLE",value:function(){return this.getToken(Qe.VARIABLE,0)}},{key:"PROVIDER",value:function(){return this.getToken(Qe.PROVIDER,0)}},{key:"index",value:function(){return this.getTypedRuleContext(kt,0)}},{key:"STAR",value:function(){return this.getToken(Qe.STAR,0)}},{key:"inline_index",value:function(){return this.getTypedRuleContext(mt,0)}},{key:"enterRule",value:function(e){e instanceof Se&&e.enterIdentifierchain(this)}},{key:"exitRule",value:function(e){e instanceof Se&&e.exitIdentifierchain(this)}}])}(V.ParserRuleContext),mt=function(e){function t(e,n,r){var i;return je(this,t),void 0===n&&(n=null),null==r&&(r=-1),(i=Ue(this,t,[n,r])).parser=e,i.ruleIndex=Qe.RULE_inline_index,i}return $e(t,e),Be(t,[{key:"NATURAL_NUMBER",value:function(){return this.getToken(Qe.NATURAL_NUMBER,0)}},{key:"enterRule",value:function(e){e instanceof Se&&e.enterInline_index(this)}},{key:"exitRule",value:function(e){e instanceof Se&&e.exitInline_index(this)}}])}(V.ParserRuleContext),yt=function(e){function t(e,n,r){var i;return je(this,t),void 0===n&&(n=null),null==r&&(r=-1),Ke(i=Ue(this,t,[n,r]),"expression",(function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(t):this.getTypedRuleContext(t,e)})),i.parser=e,i.ruleIndex=Qe.RULE_expression,i}return $e(t,e),Be(t,[{key:"section",value:function(){return this.getTypedRuleContext(gt,0)}},{key:"LPAREN",value:function(){return this.getToken(Qe.LPAREN,0)}},{key:"RPAREN",value:function(){return this.getToken(Qe.RPAREN,0)}},{key:"forloop",value:function(){return this.getTypedRuleContext(vt,0)}},{key:"operator_",value:function(){return this.getTypedRuleContext(Nt,0)}},{key:"enterRule",value:function(e){e instanceof Se&&e.enterExpression(this)}},{key:"exitRule",value:function(e){e instanceof Se&&e.exitExpression(this)}}])}(V.ParserRuleContext),vt=function(e){function t(e,n,r){var i;return je(this,t),void 0===n&&(n=null),null==r&&(r=-1),Ke(i=Ue(this,t,[n,r]),"expression",(function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(yt):this.getTypedRuleContext(yt,e)})),i.parser=e,i.ruleIndex=Qe.RULE_forloop,i}return $e(t,e),Be(t,[{key:"identifier",value:function(){return this.getTypedRuleContext(pt,0)}},{key:"IN",value:function(){return this.getToken(Qe.IN,0)}},{key:"enterRule",value:function(e){e instanceof Se&&e.enterForloop(this)}},{key:"exitRule",value:function(e){e instanceof Se&&e.exitForloop(this)}}])}(V.ParserRuleContext),gt=function(e){function t(e,n,r){var i;return je(this,t),void 0===n&&(n=null),null==r&&(r=-1),(i=Ue(this,t,[n,r])).parser=e,i.ruleIndex=Qe.RULE_section,i}return $e(t,e),Be(t,[{key:"list_",value:function(){return this.getTypedRuleContext(St,0)}},{key:"map_",value:function(){return this.getTypedRuleContext(Tt,0)}},{key:"val",value:function(){return this.getTypedRuleContext(_t,0)}},{key:"enterRule",value:function(e){e instanceof Se&&e.enterSection(this)}},{key:"exitRule",value:function(e){e instanceof Se&&e.exitSection(this)}}])}(V.ParserRuleContext),_t=function(e){function t(e,n,r){var i;return je(this,t),void 0===n&&(n=null),null==r&&(r=-1),(i=Ue(this,t,[n,r])).parser=e,i.ruleIndex=Qe.RULE_val,i}return $e(t,e),Be(t,[{key:"NULL_",value:function(){return this.getToken(Qe.NULL_,0)}},{key:"signed_number",value:function(){return this.getTypedRuleContext(Ot,0)}},{key:"string",value:function(){return this.getTypedRuleContext(At,0)}},{key:"identifier",value:function(){return this.getTypedRuleContext(pt,0)}},{key:"BOOL",value:function(){return this.getToken(Qe.BOOL,0)}},{key:"DESCRIPTION",value:function(){return this.getToken(Qe.DESCRIPTION,0)}},{key:"filedecl",value:function(){return this.getTypedRuleContext(Et,0)}},{key:"functioncall",value:function(){return this.getTypedRuleContext(bt,0)}},{key:"EOF_",value:function(){return this.getToken(Qe.EOF_,0)}},{key:"enterRule",value:function(e){e instanceof Se&&e.enterVal(this)}},{key:"exitRule",value:function(e){e instanceof Se&&e.exitVal(this)}}])}(V.ParserRuleContext),bt=function(e){function t(e,n,r){var i;return je(this,t),void 0===n&&(n=null),null==r&&(r=-1),(i=Ue(this,t,[n,r])).parser=e,i.ruleIndex=Qe.RULE_functioncall,i}return $e(t,e),Be(t,[{key:"functionname",value:function(){return this.getTypedRuleContext(wt,0)}},{key:"LPAREN",value:function(){return this.getToken(Qe.LPAREN,0)}},{key:"functionarguments",value:function(){return this.getTypedRuleContext(xt,0)}},{key:"RPAREN",value:function(){return this.getToken(Qe.RPAREN,0)}},{key:"enterRule",value:function(e){e instanceof Se&&e.enterFunctioncall(this)}},{key:"exitRule",value:function(e){e instanceof Se&&e.exitFunctioncall(this)}}])}(V.ParserRuleContext),wt=function(e){function t(e,n,r){var i;return je(this,t),void 0===n&&(n=null),null==r&&(r=-1),(i=Ue(this,t,[n,r])).parser=e,i.ruleIndex=Qe.RULE_functionname,i}return $e(t,e),Be(t,[{key:"IDENTIFIER",value:function(){return this.getToken(Qe.IDENTIFIER,0)}},{key:"enterRule",value:function(e){e instanceof Se&&e.enterFunctionname(this)}},{key:"exitRule",value:function(e){e instanceof Se&&e.exitFunctionname(this)}}])}(V.ParserRuleContext),xt=function(e){function t(e,n,r){var i;return je(this,t),void 0===n&&(n=null),null==r&&(r=-1),Ke(i=Ue(this,t,[n,r]),"expression",(function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(yt):this.getTypedRuleContext(yt,e)})),i.parser=e,i.ruleIndex=Qe.RULE_functionarguments,i}return $e(t,e),Be(t,[{key:"enterRule",value:function(e){e instanceof Se&&e.enterFunctionarguments(this)}},{key:"exitRule",value:function(e){e instanceof Se&&e.exitFunctionarguments(this)}}])}(V.ParserRuleContext),kt=function(e){function t(e,n,r){var i;return je(this,t),void 0===n&&(n=null),null==r&&(r=-1),(i=Ue(this,t,[n,r])).parser=e,i.ruleIndex=Qe.RULE_index,i}return $e(t,e),Be(t,[{key:"expression",value:function(){return this.getTypedRuleContext(yt,0)}},{key:"enterRule",value:function(e){e instanceof Se&&e.enterIndex(this)}},{key:"exitRule",value:function(e){e instanceof Se&&e.exitIndex(this)}}])}(V.ParserRuleContext),Et=function(e){function t(e,n,r){var i;return je(this,t),void 0===n&&(n=null),null==r&&(r=-1),(i=Ue(this,t,[n,r])).parser=e,i.ruleIndex=Qe.RULE_filedecl,i}return $e(t,e),Be(t,[{key:"LPAREN",value:function(){return this.getToken(Qe.LPAREN,0)}},{key:"expression",value:function(){return this.getTypedRuleContext(yt,0)}},{key:"RPAREN",value:function(){return this.getToken(Qe.RPAREN,0)}},{key:"enterRule",value:function(e){e instanceof Se&&e.enterFiledecl(this)}},{key:"exitRule",value:function(e){e instanceof Se&&e.exitFiledecl(this)}}])}(V.ParserRuleContext),St=function(e){function t(e,n,r){var i;return je(this,t),void 0===n&&(n=null),null==r&&(r=-1),Ke(i=Ue(this,t,[n,r]),"expression",(function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(yt):this.getTypedRuleContext(yt,e)})),i.parser=e,i.ruleIndex=Qe.RULE_list_,i}return $e(t,e),Be(t,[{key:"enterRule",value:function(e){e instanceof Se&&e.enterList_(this)}},{key:"exitRule",value:function(e){e instanceof Se&&e.exitList_(this)}}])}(V.ParserRuleContext),Tt=function(e){function t(e,n,r){var i;return je(this,t),void 0===n&&(n=null),null==r&&(r=-1),Ke(i=Ue(this,t,[n,r]),"argument",(function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(ft):this.getTypedRuleContext(ft,e)})),i.parser=e,i.ruleIndex=Qe.RULE_map_,i}return $e(t,e),Be(t,[{key:"LCURL",value:function(){return this.getToken(Qe.LCURL,0)}},{key:"RCURL",value:function(){return this.getToken(Qe.RCURL,0)}},{key:"enterRule",value:function(e){e instanceof Se&&e.enterMap_(this)}},{key:"exitRule",value:function(e){e instanceof Se&&e.exitMap_(this)}}])}(V.ParserRuleContext),At=function(e){function t(e,n,r){var i;return je(this,t),void 0===n&&(n=null),null==r&&(r=-1),(i=Ue(this,t,[n,r])).parser=e,i.ruleIndex=Qe.RULE_string,i}return $e(t,e),Be(t,[{key:"STRING",value:function(){return this.getToken(Qe.STRING,0)}},{key:"MULTILINESTRING",value:function(){return this.getToken(Qe.MULTILINESTRING,0)}},{key:"enterRule",value:function(e){e instanceof Se&&e.enterString(this)}},{key:"exitRule",value:function(e){e instanceof Se&&e.exitString(this)}}])}(V.ParserRuleContext),Ot=function(e){function t(e,n,r){var i;return je(this,t),void 0===n&&(n=null),null==r&&(r=-1),(i=Ue(this,t,[n,r])).parser=e,i.ruleIndex=Qe.RULE_signed_number,i}return $e(t,e),Be(t,[{key:"number",value:function(){return this.getTypedRuleContext(Pt,0)}},{key:"enterRule",value:function(e){e instanceof Se&&e.enterSigned_number(this)}},{key:"exitRule",value:function(e){e instanceof Se&&e.exitSigned_number(this)}}])}(V.ParserRuleContext),Nt=function(e){function t(e,n,r){var i;return je(this,t),void 0===n&&(n=null),null==r&&(r=-1),(i=Ue(this,t,[n,r])).parser=e,i.ruleIndex=Qe.RULE_operator_,i}return $e(t,e),Be(t,[{key:"STAR",value:function(){return this.getToken(Qe.STAR,0)}},{key:"enterRule",value:function(e){e instanceof Se&&e.enterOperator_(this)}},{key:"exitRule",value:function(e){e instanceof Se&&e.exitOperator_(this)}}])}(V.ParserRuleContext),Pt=function(e){function t(e,n,r){var i;return je(this,t),void 0===n&&(n=null),null==r&&(r=-1),Ke(i=Ue(this,t,[n,r]),"NATURAL_NUMBER",(function(e){return void 0===e&&(e=null),null===e?this.getTokens(Qe.NATURAL_NUMBER):this.getToken(Qe.NATURAL_NUMBER,e)})),i.parser=e,i.ruleIndex=Qe.RULE_number,i}return $e(t,e),Be(t,[{key:"DOT",value:function(){return this.getToken(Qe.DOT,0)}},{key:"enterRule",value:function(e){e instanceof Se&&e.enterNumber(this)}},{key:"exitRule",value:function(e){e instanceof Se&&e.exitNumber(this)}}])}(V.ParserRuleContext);function Ct(e){return Ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ct(e)}function Rt(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[]).filter((function(t){return e.isParsable(t)})).reduce((function(e,t){var n=t.path.split("/").slice(0,-1).join("/");return e.includes(n)||e.push(n),e}),[])}},{key:"parse",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.pluginData.components=[],this.pluginData.variables=[];var i=new Se(this.pluginData),o=null!=e&&e.path&&0!==e.path.length?"".concat(e.path,"/"):"",s=new RegExp("^".concat(o,"[^/]+\\.tf$"));n.filter((function(e){var t=e.path;return s.test(t)})).filter((function(e){var n=e.content,i=e.path;return!(!n||""===n.trim())||(t.pluginData.emitEvent({parent:r,type:"Parser",action:"read",status:"warning",files:[i],data:{code:"no_content",global:!1}}),!1)})).forEach((function(e){var n=t.pluginData.emitEvent({parent:r,type:"Parser",action:"read",status:"running",files:[e.path],data:{global:!1}});i.currentFile=e;var o=new V.InputStream(e.content),s=new De(o),a=new V.CommonTokenStream(s),u=new Qe(a);u.buildParseTrees=!0;var c=u.file_();V.tree.ParseTreeWalker.DEFAULT.walk(i,c),t.pluginData.emitEvent({id:n,status:"success"})}))}}])}(e.DefaultParser);const Bt=Ft;var Ut=n(945),zt=n.n(Ut);const Vt={root:"".concat("{% macro displayAttributeValue(attribute, value, level) %}\n{% if attribute.isVariable %}{{ value | dump | indent(level * 4, true) }},\n{% elif attribute.definition.type == 'Link' %}{{ attribute.definition.linkRef | indent(level * 4, true) }}.{{ getExternalId(value) }}.{{attribute.definition.linkAttribute}},\n{% elif isValueReference(value) %}{{ value | indent(level * 4, true) }},\n{% else %}{{ value | dump | indent(level * 4, true) }},\n{% endif %}\n{% endmacro %}\n",'{% include "local" ignore missing %}\n{% include "block" ignore missing %}\n{% include "variable" ignore missing %}\n{% include "output" ignore missing %}\n'),block:"{% for _block in components %}\n{{ _block.definition.blockType }} {% if ['resource','data'].includes(_block.definition.blockType) %}\"{{ _block.definition.type }}\" {% endif %}{% if ['provider', 'module'].includes(_block.definition.blockType) %}\"{{ _block.definition.type }}\"{% else %}\"{{ _block.externalId }}\"{% endif %} {\n{% for attribute in _block.attributes %}{% set level = 1 %}\n{% include \"attribute\" ignore missing %}\n{% endfor %}\n}\n\n{% endfor %}",attribute:"{% if attribute.type == 'Object' %}\n{{ attribute.name | indent(level * 4, true) }} {% if not attribute.isDynamic %}= {% endif %}{\n{% set level = level+1 %}{% for attr in attribute.value %}{% set attribute = attr %}\n{% include \"attribute\" ignore missing %}\n{% set attribute = attr %}\n{% endfor %}{% set level = level-1 %}\n{{ \"}\" | indent(level * 4, true) }}\n{% else %}\n{{ attribute.name | indent(level * 4, true) }} = {% if attribute.type == 'Array' or attribute.type == 'Link' %}[\n{% set level = level+1 %}{% for value in attribute.value %}\n{% call displayAttributeValue(attribute, value, level) -%}{%- endcall %}\n{% endfor %}{% set level = level-1 %}\n{{ \"]\" | indent(level * 4, true) }}\n{% else %}\n{% if attribute.isVariable %}{{ attribute.value }}\n{% elif attribute.definition.type == 'Reference' %}{{ attribute.definition.containerRef }}.{{ getExternalId(attribute.value) }}\n{% elif attribute.type == 'Boolean' or attribute.type == 'Number' or attribute.name == 'user_data' %}{{ attribute.value }}\n{% elif attribute.type == 'String' and isValueReference(attribute.value) %}{{ attribute.value }}\n{% else %}{{ attribute.value | dump }}\n{% endif %}\n{% endif %}\n{% endif %}\n",variable:'{% for variable in variables %}\nvariable {{ variable.name | dump }} {\n{% set level = 1 %}\n{% if variable.defaultValue %}{{ "default" | indent(level * 4, true) }} = {% if isList(variable.type) %}[\n{% set level = level+1 %}{% for val in variable.defaultValue %}\n{{ val | dump | indent(level * 4, true) }},\n{% endfor %}\n{% set level = level-1 %}{{ "]" | indent(level * 4, true) }}\n{% else %}{{ variable.defaultValue | dump }}\n{% endif %}\n{% endif %}\n{% if variable.type %}{{ "type" | indent(level * 4, true) }} = {{ variable.type }}\n{% endif %}\n{% if variable.description %}{{ "description" | indent(level * 4, true) }} = {{ variable.description | dump }}\n{% endif %}\n{% if variable.sensitive %}{{ "sensitive" | indent(level * 4, true) }} = {{ variable.sensitive }}\n{% endif %}\n{% if variable.nullable %}{{ "nullable" | indent(level * 4, true) }} = {{ variable.nullable }}\n{% endif %}\n}\n\n{% endfor %}\n',output:'{% for output in outputs %}\noutput {{ output.name | dump }} {\n{% set level = 1 %}\n{% if isList(output.type) %}\n{{ "value = [" | indent(level * 4, true) }}\n{% for val in output.value %}\n{% set level = level+1 %}\n{% set argType = getListType(output.type) %}\n{% if argType == \'number\' or argType == \'bool\' or isValueReference(val) %}\n{{ val | dump | indent(level * 4, true) }},\n{% else %}\n{{ val | dump | indent(level * 4, true) }},\n{% endif %}\n{% set level = level-1 %}\n{% endfor %}{{ "]" | indent(level * 4, true) }}\n{% else %}\n{{ "value = " | indent(level * 4, true) }}{% if output.type == \'number\' or output.type == \'bool\' or isValueReference(output.value) %}\n{{ output.value }}\n{% else %}\n{{ output.value | dump }}\n{% endif %}\n{% endif %}\n{% if output.description %}{{ "description" | indent(level * 4, true) }} = {{ output.description | dump }}\n{% endif %}\n{% if output.sensitive %}{{ "sensitive" | indent(level * 4, true) }} = {{ output.sensitive }}\n{% endif %}\n}\n\n{% endfor %}\n',local:'{% if locals.length > 0 %}\nlocals {\n{% set level = 1 %}\n{% for local in locals %}\n{% if local.value %}{{ local.name | indent(level * 4, true) }} = {% if isList(local.type) %}[\n{% set level = level+1 %}{% for val in local.value %}\n{{ val | dump | indent(level * 4, true) }},\n{% endfor %}\n{% set level = level-1 %}{{ "]" | indent(level * 4, true) }}\n{% else %}{{ local.value | dump }}\n{% endif %}\n{% endif %}\n{% endfor %}{% set level = level-1 %}\n{% set level = 0 %}}\n\n{% endif %}\n'};function $t(e){return $t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$t(e)}function qt(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:null,t=this.pluginData.components.reduce((function(e,t){return e.has(t.path)?e.get(t.path).push(t):e.set(t.path,[t]),e}),new Map),n=this.pluginData.variables.reduce((function(e,t){return e.has(t.path)?e.get(t.path).push(t):e.set(t.path,[t]),e}),new Map);return this.generateFiles(t,n,e)}},{key:"generateFiles",value:function(t,n,r){var i=this,o=[];return(0===t.size?n:t).forEach((function(s,a){var u=i.pluginData.emitEvent({parent:r,type:"Render",action:"write",status:"running",files:[a],data:{global:!1}}),c=(null==n?void 0:n.get(a))||[],l=(null==t?void 0:t.get(a))||[];o.push(new e.FileInput({path:a,content:"".concat(i.template.render({components:l,variables:c.filter((function(e){return"variable"===e.category})),locals:c.filter((function(e){return"local"===e.category})),outputs:c.filter((function(e){return"output"===e.category})),getExternalId:function(e){var t;return null===(t=i.pluginData.getComponentById(e))||void 0===t?void 0:t.externalId},isValueReference:function(e){return null==e?void 0:e.match(/^(data.|var.|local.|module.|aws_|random_)/)},isList:function(e){return(null==e?void 0:e.startsWith("list("))||(null==e?void 0:e.startsWith("set("))},getListType:function(e){return e.split(/\(([^)]+)\)/)[1]}}).trim(),"\n")})),i.pluginData.emitEvent({id:u,status:"success"})})),o}}])}(e.DefaultRender);const Xt=Qt,Zt={name:"terraform",languageSettings:{id:"terraform",extensions:[".tf"],aliases:["Terraform","terraform"],mimetypes:["string"]},languageConfiguration:{comments:{lineComment:"#",blockComment:["/*","*/"]},brackets:[["(",")"],["{","}"],["[","]"]],colorizedBracketPairs:[["(",")"],["{","}"],["[","]"]],autoClosingPairs:[{open:"(",close:")"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"'",close:"'",notIn:["string"]},{open:'"',close:'"',notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'"},{open:'"',close:'"'}]},tokenProvider:{keywords:["provider","resource","data","variable","output","locals","module","for_each","if","else","true","false","null"],operators:["+","+=","-","-=","*","*=","/","/=","%","%=","==","!=","<","<=",">",">=","=","||","&&","!"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}],[/\d*\.\d+([eE][-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],comment:[[/[^/*]+/,"comment"],[/\/\*/,"comment","@push"],["\\*/","comment","@pop"],[/[/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"],[/#.*$/,"comment"]]}}};function Jt(e){return Jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jt(e)}function en(e,t,n){return t=nn(t),function(e,t){if(t&&("object"==Jt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,tn()?Reflect.construct(t,n||[],nn(e).constructor):t.apply(e,n))}function tn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(tn=function(){return!!e})()}function nn(e){return nn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},nn(e)}function rn(e,t){return rn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},rn(e,t)}var on=function(t){function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),en(this,n,[{editor:{syntax:Zt},tags:[new e.Tag({type:"language",value:"Terraform"}),new e.Tag({type:"category",value:"Infrastructure"})],extraResources:[{type:"markers",name:"startLinkMarker"},{type:"markers",name:"endLinkMarker"},{type:"links",name:"defaultLink"},{type:"links",name:"temporaryLink"},{type:"icons",name:"error"},{type:"icons",name:"menu"},{type:"icons",name:"resize"}],container:{margin:15,gap:50},defaultFileName:"new_file.tf",defaultFileExtension:"tf"}])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rn(e,t)}(n,t),function(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}(n)}(e.DefaultConfiguration);const sn=on;function an(e){return an="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},an(e)}function un(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&void 0!==arguments[0]?arguments[0]:{event:null};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=new sn,r=new yn(n,{name:vn.UU,version:vn.rE},e.event);return _n(this,t,[{pluginData:r,pluginMetadata:new j(r),pluginParser:new Bt(r),pluginRenderer:new Xt(r),configuration:n}])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xn(e,t)}(t,e),function(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}(t)}(e.DefaultPlugin);const En=kn})();var i=exports;for(var o in r)i[o]=r[o];r.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})(); \ No newline at end of file +(()=>{var t={916:(t,e)=>{(()=>{var t={326:function(t){var e;"undefined"!=typeof self&&self,e=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=11)}([function(t,e,n){"use strict";var r=Array.prototype,i=Object.prototype,o={"&":"&",'"':""","'":"'","<":"<",">":">","\\":"\"},s=/[&"'<>\\]/g;function a(t,e){return i.hasOwnProperty.call(t,e)}function c(t){return o[t]}function u(t,e,n){var r,i,o;if(t instanceof Error&&(t=(i=t).name+": "+i.message),Object.setPrototypeOf?(r=new Error(t),Object.setPrototypeOf(r,u.prototype)):(r=this,Object.defineProperty(r,"message",{enumerable:!1,writable:!0,value:t})),Object.defineProperty(r,"name",{value:"Template render error"}),Error.captureStackTrace&&Error.captureStackTrace(r,this.constructor),i){var s=Object.getOwnPropertyDescriptor(i,"stack");(o=s&&(s.get||function(){return s.value}))||(o=function(){return i.stack})}else{var a=new Error(t).stack;o=function(){return a}}return Object.defineProperty(r,"stack",{get:function(){return o.call(r)}}),Object.defineProperty(r,"cause",{value:i}),r.lineno=e,r.colno=n,r.firstUpdate=!0,r.Update=function(t){var e="("+(t||"unknown path")+")";return this.firstUpdate&&(this.lineno&&this.colno?e+=" [Line "+this.lineno+", Column "+this.colno+"]":this.lineno&&(e+=" [Line "+this.lineno+"]")),e+="\n ",this.firstUpdate&&(e+=" "),this.message=e+(this.message||""),this.firstUpdate=!1,this},r}function l(t){return"[object Function]"===i.toString.call(t)}function h(t){return"[object Array]"===i.toString.call(t)}function f(t){return"[object String]"===i.toString.call(t)}function p(t){return"[object Object]"===i.toString.call(t)}function d(t){var e,n=(e=t)?"string"==typeof e?e.split("."):[e]:[];return function(t){for(var e=t,r=0;rt.length)s=i.slice(0,t.length),i.slice(s.length,u).forEach((function(t,n){n2?i-2:0),s=2;s0||!n)&&process.stdout.write(" ".repeat(e));var o=i===r.length-1?"":"\n";process.stdout.write(""+t+o)}))}t.exports={Node:c,Root:h,NodeList:l,Value:u,Literal:f,Symbol:p,Group:d,Array:m,Pair:y,Dict:g,Output:U,Capture:z,TemplateData:V,If:_,IfAsync:b,InlineIf:w,For:x,AsyncEach:k,AsyncAll:T,Macro:S,Caller:E,Import:A,FromImport:O,FunCall:N,Filter:C,FilterAsync:L,KeywordArgs:R,Block:P,Super:I,Extends:M,Include:D,Set:j,Switch:B,Case:F,LookupVal:v,BinOp:H,In:q,Is:W,Or:G,And:Y,Not:$,Add:X,Concat:Z,Sub:J,Mul:Q,Div:tt,FloorDiv:et,Mod:nt,Pow:rt,Neg:it,Pos:ot,Compare:st,CompareOperand:at,CallExtension:ct,CallExtensionAsync:ut,printNodes:function t(e,n){if(n=n||0,lt(e.typename+": ",n),e instanceof l)lt("\n"),e.children.forEach((function(e){t(e,n+2)}));else if(e instanceof ct)lt(e.extName+"."+e.prop+"\n"),e.args&&t(e.args,n+2),e.contentArgs&&e.contentArgs.forEach((function(e){t(e,n+2)}));else{var r=[],i=null;e.iterFields((function(t,e){t instanceof c?r.push([e,t]):(i=i||{})[e]=t})),i?lt(JSON.stringify(i,null,2)+"\n",null,!0):lt("\n"),r.forEach((function(e){var r=e[0],i=e[1];lt("["+r+"] =>",n+2),t(i,n+4)}))}}}},function(t,e){},function(t,e,n){"use strict";function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}var i=n(8),o=n(17),s=n(3),a=n(0).TemplateError,c=n(2).Frame,u=n(1).Obj,l={"==":"==","===":"===","!=":"!=","!==":"!==","<":"<",">":">","<=":"<=",">=":">="},h=function(t){var e,n;function i(){return t.apply(this,arguments)||this}n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,r(e,n);var o=i.prototype;return o.init=function(t,e){this.templateName=t,this.codebuf=[],this.lastId=0,this.buffer=null,this.bufferStack=[],this._scopeClosers="",this.inBlock=!1,this.throwOnUndefined=e},o.fail=function(t,e,n){throw void 0!==e&&(e+=1),void 0!==n&&(n+=1),new a(t,e,n)},o._pushBuffer=function(){var t=this._tmpid();return this.bufferStack.push(this.buffer),this.buffer=t,this._emit("var "+this.buffer+' = "";'),t},o._popBuffer=function(){this.buffer=this.bufferStack.pop()},o._emit=function(t){this.codebuf.push(t)},o._emitLine=function(t){this._emit(t+"\n")},o._emitLines=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r0&&i._emit(","),i.compile(t,e)})),r&&this._emit(r)},o._compileExpression=function(t,e){this.assertType(t,s.Literal,s.Symbol,s.Group,s.Array,s.Dict,s.FunCall,s.Caller,s.Filter,s.LookupVal,s.Compare,s.InlineIf,s.In,s.Is,s.And,s.Or,s.Not,s.Add,s.Concat,s.Sub,s.Mul,s.Div,s.FloorDiv,s.Mod,s.Pow,s.Neg,s.Pos,s.Compare,s.NodeList),this.compile(t,e)},o.assertType=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r0&&r._emit(","),t){r._emitLine("function(cb) {"),r._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}");var i=r._pushBuffer();r._withScopedSyntax((function(){r.compile(t,e),r._emitLine("cb(null, "+i+");")})),r._popBuffer(),r._emitLine("return "+i+";"),r._emitLine("}")}else r._emit("null")})),n){var c=this._tmpid();this._emitLine(", "+this._makeCallback(c)),this._emitLine(this.buffer+" += runtime.suppressValue("+c+", "+a+" && env.opts.autoescape);"),this._addScopeLevel()}else this._emit(")"),this._emit(", "+a+" && env.opts.autoescape);\n")},o.compileCallExtensionAsync=function(t,e){this.compileCallExtension(t,e,!0)},o.compileNodeList=function(t,e){this._compileChildren(t,e)},o.compileLiteral=function(t){if("string"==typeof t.value){var e=t.value.replace(/\\/g,"\\\\");e=(e=(e=(e=(e=e.replace(/"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t")).replace(/\u2028/g,"\\u2028"),this._emit('"'+e+'"')}else null===t.value?this._emit("null"):this._emit(t.value.toString())},o.compileSymbol=function(t,e){var n=t.value,r=e.lookup(n);r?this._emit(r):this._emit('runtime.contextOrFrameLookup(context, frame, "'+n+'")')},o.compileGroup=function(t,e){this._compileAggregate(t,e,"(",")")},o.compileArray=function(t,e){this._compileAggregate(t,e,"[","]")},o.compileDict=function(t,e){this._compileAggregate(t,e,"{","}")},o.compilePair=function(t,e){var n=t.key,r=t.value;n instanceof s.Symbol?n=new s.Literal(n.lineno,n.colno,n.value):n instanceof s.Literal&&"string"==typeof n.value||this.fail("compilePair: Dict keys must be strings or names",n.lineno,n.colno),this.compile(n,e),this._emit(": "),this._compileExpression(r,e)},o.compileInlineIf=function(t,e){this._emit("("),this.compile(t.cond,e),this._emit("?"),this.compile(t.body,e),this._emit(":"),null!==t.else_?this.compile(t.else_,e):this._emit('""'),this._emit(")")},o.compileIn=function(t,e){this._emit("runtime.inOperator("),this.compile(t.left,e),this._emit(","),this.compile(t.right,e),this._emit(")")},o.compileIs=function(t,e){var n=t.right.name?t.right.name.value:t.right.value;this._emit('env.getTest("'+n+'").call(context, '),this.compile(t.left,e),t.right.args&&(this._emit(","),this.compile(t.right.args,e)),this._emit(") === true")},o._binOpEmitter=function(t,e,n){this.compile(t.left,e),this._emit(n),this.compile(t.right,e)},o.compileOr=function(t,e){return this._binOpEmitter(t,e," || ")},o.compileAnd=function(t,e){return this._binOpEmitter(t,e," && ")},o.compileAdd=function(t,e){return this._binOpEmitter(t,e," + ")},o.compileConcat=function(t,e){return this._binOpEmitter(t,e,' + "" + ')},o.compileSub=function(t,e){return this._binOpEmitter(t,e," - ")},o.compileMul=function(t,e){return this._binOpEmitter(t,e," * ")},o.compileDiv=function(t,e){return this._binOpEmitter(t,e," / ")},o.compileMod=function(t,e){return this._binOpEmitter(t,e," % ")},o.compileNot=function(t,e){this._emit("!"),this.compile(t.target,e)},o.compileFloorDiv=function(t,e){this._emit("Math.floor("),this.compile(t.left,e),this._emit(" / "),this.compile(t.right,e),this._emit(")")},o.compilePow=function(t,e){this._emit("Math.pow("),this.compile(t.left,e),this._emit(", "),this.compile(t.right,e),this._emit(")")},o.compileNeg=function(t,e){this._emit("-"),this.compile(t.target,e)},o.compilePos=function(t,e){this._emit("+"),this.compile(t.target,e)},o.compileCompare=function(t,e){var n=this;this.compile(t.expr,e),t.ops.forEach((function(t){n._emit(" "+l[t.type]+" "),n.compile(t.expr,e)}))},o.compileLookupVal=function(t,e){this._emit("runtime.memberLookup(("),this._compileExpression(t.target,e),this._emit("),"),this._compileExpression(t.val,e),this._emit(")")},o._getNodeName=function(t){switch(t.typename){case"Symbol":return t.value;case"FunCall":return"the return value of ("+this._getNodeName(t.name)+")";case"LookupVal":return this._getNodeName(t.target)+'["'+this._getNodeName(t.val)+'"]';case"Literal":return t.value.toString();default:return"--expression--"}},o.compileFunCall=function(t,e){this._emit("(lineno = "+t.lineno+", colno = "+t.colno+", "),this._emit("runtime.callWrap("),this._compileExpression(t.name,e),this._emit(', "'+this._getNodeName(t.name).replace(/"/g,'\\"')+'", context, '),this._compileAggregate(t.args,e,"[","])"),this._emit(")")},o.compileFilter=function(t,e){var n=t.name;this.assertType(n,s.Symbol),this._emit('env.getFilter("'+n.value+'").call(context, '),this._compileAggregate(t.args,e),this._emit(")")},o.compileFilterAsync=function(t,e){var n=t.name,r=t.symbol.value;this.assertType(n,s.Symbol),e.set(r,r),this._emit('env.getFilter("'+n.value+'").call(context, '),this._compileAggregate(t.args,e),this._emitLine(", "+this._makeCallback(r)),this._addScopeLevel()},o.compileKeywordArgs=function(t,e){this._emit("runtime.makeKeywordArgs("),this.compileDict(t,e),this._emit(")")},o.compileSet=function(t,e){var n=this,r=[];t.targets.forEach((function(t){var i=t.value,o=e.lookup(i);null==o&&(o=n._tmpid(),n._emitLine("var "+o+";")),r.push(o)})),t.value?(this._emit(r.join(" = ")+" = "),this._compileExpression(t.value,e),this._emitLine(";")):(this._emit(r.join(" = ")+" = "),this.compile(t.body,e),this._emitLine(";")),t.targets.forEach((function(t,e){var i=r[e],o=t.value;n._emitLine('frame.set("'+o+'", '+i+", true);"),n._emitLine("if(frame.topLevel) {"),n._emitLine('context.setVariable("'+o+'", '+i+");"),n._emitLine("}"),"_"!==o.charAt(0)&&(n._emitLine("if(frame.topLevel) {"),n._emitLine('context.addExport("'+o+'", '+i+");"),n._emitLine("}"))}))},o.compileSwitch=function(t,e){var n=this;this._emit("switch ("),this.compile(t.expr,e),this._emit(") {"),t.cases.forEach((function(t,r){n._emit("case "),n.compile(t.cond,e),n._emit(": "),n.compile(t.body,e),t.body.children.length&&n._emitLine("break;")})),t.default&&(this._emit("default:"),this.compile(t.default,e)),this._emit("}")},o.compileIf=function(t,e,n){var r=this;this._emit("if("),this._compileExpression(t.cond,e),this._emitLine(") {"),this._withScopedSyntax((function(){r.compile(t.body,e),n&&r._emit("cb()")})),t.else_?(this._emitLine("}\nelse {"),this._withScopedSyntax((function(){r.compile(t.else_,e),n&&r._emit("cb()")}))):n&&(this._emitLine("}\nelse {"),this._emit("cb()")),this._emitLine("}")},o.compileIfAsync=function(t,e){this._emit("(function(cb) {"),this.compileIf(t,e,!0),this._emit("})("+this._makeCallback()),this._addScopeLevel()},o._emitLoopBindings=function(t,e,n,r){var i=this;[{name:"index",val:n+" + 1"},{name:"index0",val:n},{name:"revindex",val:r+" - "+n},{name:"revindex0",val:r+" - "+n+" - 1"},{name:"first",val:n+" === 0"},{name:"last",val:n+" === "+r+" - 1"},{name:"length",val:r}].forEach((function(t){i._emitLine('frame.set("loop.'+t.name+'", '+t.val+");")}))},o.compileFor=function(t,e){var n=this,r=this._tmpid(),i=this._tmpid(),o=this._tmpid();if(e=e.push(),this._emitLine("frame = frame.push();"),this._emit("var "+o+" = "),this._compileExpression(t.arr,e),this._emitLine(";"),this._emit("if("+o+") {"),this._emitLine(o+" = runtime.fromIterator("+o+");"),t.name instanceof s.Array){this._emitLine("var "+r+";"),this._emitLine("if(runtime.isArray("+o+")) {"),this._emitLine("var "+i+" = "+o+".length;"),this._emitLine("for("+r+"=0; "+r+" < "+o+".length; "+r+"++) {"),t.name.children.forEach((function(i,s){var a=n._tmpid();n._emitLine("var "+a+" = "+o+"["+r+"]["+s+"];"),n._emitLine('frame.set("'+i+'", '+o+"["+r+"]["+s+"]);"),e.set(t.name.children[s].value,a)})),this._emitLoopBindings(t,o,r,i),this._withScopedSyntax((function(){n.compile(t.body,e)})),this._emitLine("}"),this._emitLine("} else {");var a=t.name.children,c=a[0],u=a[1],l=this._tmpid(),h=this._tmpid();e.set(c.value,l),e.set(u.value,h),this._emitLine(r+" = -1;"),this._emitLine("var "+i+" = runtime.keys("+o+").length;"),this._emitLine("for(var "+l+" in "+o+") {"),this._emitLine(r+"++;"),this._emitLine("var "+h+" = "+o+"["+l+"];"),this._emitLine('frame.set("'+c.value+'", '+l+");"),this._emitLine('frame.set("'+u.value+'", '+h+");"),this._emitLoopBindings(t,o,r,i),this._withScopedSyntax((function(){n.compile(t.body,e)})),this._emitLine("}"),this._emitLine("}")}else{var f=this._tmpid();e.set(t.name.value,f),this._emitLine("var "+i+" = "+o+".length;"),this._emitLine("for(var "+r+"=0; "+r+" < "+o+".length; "+r+"++) {"),this._emitLine("var "+f+" = "+o+"["+r+"];"),this._emitLine('frame.set("'+t.name.value+'", '+f+");"),this._emitLoopBindings(t,o,r,i),this._withScopedSyntax((function(){n.compile(t.body,e)})),this._emitLine("}")}this._emitLine("}"),t.else_&&(this._emitLine("if (!"+i+") {"),this.compile(t.else_,e),this._emitLine("}")),this._emitLine("frame = frame.pop();")},o._compileAsyncLoop=function(t,e,n){var r=this,i=this._tmpid(),o=this._tmpid(),a=this._tmpid(),c=n?"asyncAll":"asyncEach";if(e=e.push(),this._emitLine("frame = frame.push();"),this._emit("var "+a+" = runtime.fromIterator("),this._compileExpression(t.arr,e),this._emitLine(");"),t.name instanceof s.Array){var u=t.name.children.length;this._emit("runtime."+c+"("+a+", "+u+", function("),t.name.children.forEach((function(t){r._emit(t.value+",")})),this._emit(i+","+o+",next) {"),t.name.children.forEach((function(t){var n=t.value;e.set(n,n),r._emitLine('frame.set("'+n+'", '+n+");")}))}else{var l=t.name.value;this._emitLine("runtime."+c+"("+a+", 1, function("+l+", "+i+", "+o+",next) {"),this._emitLine('frame.set("'+l+'", '+l+");"),e.set(l,l)}this._emitLoopBindings(t,a,i,o),this._withScopedSyntax((function(){var o;n&&(o=r._pushBuffer()),r.compile(t.body,e),r._emitLine("next("+i+(o?","+o:"")+");"),n&&r._popBuffer()}));var h=this._tmpid();this._emitLine("}, "+this._makeCallback(h)),this._addScopeLevel(),n&&this._emitLine(this.buffer+" += "+h+";"),t.else_&&(this._emitLine("if (!"+a+".length) {"),this.compile(t.else_,e),this._emitLine("}")),this._emitLine("frame = frame.pop();")},o.compileAsyncEach=function(t,e){this._compileAsyncLoop(t,e)},o.compileAsyncAll=function(t,e){this._compileAsyncLoop(t,e,!0)},o._compileMacro=function(t,e){var n=this,r=[],i=null,o="macro_"+this._tmpid(),a=void 0!==e;t.args.children.forEach((function(e,o){o===t.args.children.length-1&&e instanceof s.Dict?i=e:(n.assertType(e,s.Symbol),r.push(e))}));var u,l=[].concat(r.map((function(t){return"l_"+t.value})),["kwargs"]),h=r.map((function(t){return'"'+t.value+'"'})),f=(i&&i.children||[]).map((function(t){return'"'+t.key.value+'"'}));u=a?e.push(!0):new c,this._emitLines("var "+o+" = runtime.makeMacro(","["+h.join(", ")+"], ","["+f.join(", ")+"], ","function ("+l.join(", ")+") {","var callerFrame = frame;","frame = "+(a?"frame.push(true);":"new runtime.Frame();"),"kwargs = kwargs || {};",'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {','frame.set("caller", kwargs.caller); }'),r.forEach((function(t){n._emitLine('frame.set("'+t.value+'", l_'+t.value+");"),u.set(t.value,"l_"+t.value)})),i&&i.children.forEach((function(t){var e=t.key.value;n._emit('frame.set("'+e+'", '),n._emit('Object.prototype.hasOwnProperty.call(kwargs, "'+e+'")'),n._emit(' ? kwargs["'+e+'"] : '),n._compileExpression(t.value,u),n._emit(");")}));var p=this._pushBuffer();return this._withScopedSyntax((function(){n.compile(t.body,u)})),this._emitLine("frame = "+(a?"frame.pop();":"callerFrame;")),this._emitLine("return new runtime.SafeString("+p+");"),this._emitLine("});"),this._popBuffer(),o},o.compileMacro=function(t,e){var n=this._compileMacro(t),r=t.name.value;e.set(r,n),e.parent?this._emitLine('frame.set("'+r+'", '+n+");"):("_"!==t.name.value.charAt(0)&&this._emitLine('context.addExport("'+r+'");'),this._emitLine('context.setVariable("'+r+'", '+n+");"))},o.compileCaller=function(t,e){this._emit("(function (){");var n=this._compileMacro(t,e);this._emit("return "+n+";})()")},o._compileGetTemplate=function(t,e,n,r){var i=this._tmpid(),o=this._templateName(),s=this._makeCallback(i),a=n?"true":"false",c=r?"true":"false";return this._emit("env.getTemplate("),this._compileExpression(t.template,e),this._emitLine(", "+a+", "+o+", "+c+", "+s),i},o.compileImport=function(t,e){var n=t.target.value,r=this._compileGetTemplate(t,e,!1,!1);this._addScopeLevel(),this._emitLine(r+".getExported("+(t.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(r)),this._addScopeLevel(),e.set(n,r),e.parent?this._emitLine('frame.set("'+n+'", '+r+");"):this._emitLine('context.setVariable("'+n+'", '+r+");")},o.compileFromImport=function(t,e){var n=this,r=this._compileGetTemplate(t,e,!1,!1);this._addScopeLevel(),this._emitLine(r+".getExported("+(t.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(r)),this._addScopeLevel(),t.names.children.forEach((function(t){var i,o,a=n._tmpid();t instanceof s.Pair?(i=t.key.value,o=t.value.value):o=i=t.value,n._emitLine("if(Object.prototype.hasOwnProperty.call("+r+', "'+i+'")) {'),n._emitLine("var "+a+" = "+r+"."+i+";"),n._emitLine("} else {"),n._emitLine("cb(new Error(\"cannot import '"+i+"'\")); return;"),n._emitLine("}"),e.set(o,a),e.parent?n._emitLine('frame.set("'+o+'", '+a+");"):n._emitLine('context.setVariable("'+o+'", '+a+");")}))},o.compileBlock=function(t){var e=this._tmpid();this.inBlock||this._emit('(parentTemplate ? function(e, c, f, r, cb) { cb(""); } : '),this._emit('context.getBlock("'+t.name.value+'")'),this.inBlock||this._emit(")"),this._emitLine("(env, context, frame, runtime, "+this._makeCallback(e)),this._emitLine(this.buffer+" += "+e+";"),this._addScopeLevel()},o.compileSuper=function(t,e){var n=t.blockName.value,r=t.symbol.value,i=this._makeCallback(r);this._emitLine('context.getSuper(env, "'+n+'", b_'+n+", frame, runtime, "+i),this._emitLine(r+" = runtime.markSafe("+r+");"),this._addScopeLevel(),e.set(r,r)},o.compileExtends=function(t,e){var n=this._tmpid(),r=this._compileGetTemplate(t,e,!0,!1);this._emitLine("parentTemplate = "+r),this._emitLine("for(var "+n+" in parentTemplate.blocks) {"),this._emitLine("context.addBlock("+n+", parentTemplate.blocks["+n+"]);"),this._emitLine("}"),this._addScopeLevel()},o.compileInclude=function(t,e){this._emitLine("var tasks = [];"),this._emitLine("tasks.push("),this._emitLine("function(callback) {");var n=this._compileGetTemplate(t,e,!1,t.ignoreMissing);this._emitLine("callback(null,"+n+");});"),this._emitLine("});");var r=this._tmpid();this._emitLine("tasks.push("),this._emitLine("function(template, callback){"),this._emitLine("template.render(context.getVariables(), frame, "+this._makeCallback(r)),this._emitLine("callback(null,"+r+");});"),this._emitLine("});"),this._emitLine("tasks.push("),this._emitLine("function(result, callback){"),this._emitLine(this.buffer+" += result;"),this._emitLine("callback(null);"),this._emitLine("});"),this._emitLine("env.waterfall(tasks, function(){"),this._addScopeLevel()},o.compileTemplateData=function(t,e){this.compileLiteral(t,e)},o.compileCapture=function(t,e){var n=this,r=this.buffer;this.buffer="output",this._emitLine("(function() {"),this._emitLine('var output = "";'),this._withScopedSyntax((function(){n.compile(t.body,e)})),this._emitLine("return output;"),this._emitLine("})()"),this.buffer=r},o.compileOutput=function(t,e){var n=this;t.children.forEach((function(r){r instanceof s.TemplateData?r.value&&(n._emit(n.buffer+" += "),n.compileLiteral(r,e),n._emitLine(";")):(n._emit(n.buffer+" += runtime.suppressValue("),n.throwOnUndefined&&n._emit("runtime.ensureDefined("),n.compile(r,e),n.throwOnUndefined&&n._emit(","+t.lineno+","+t.colno+")"),n._emit(", env.opts.autoescape);\n"))}))},o.compileRoot=function(t,e){var n=this;e&&this.fail("compileRoot: root node can't have frame"),e=new c,this._emitFuncBegin(t,"root"),this._emitLine("var parentTemplate = null;"),this._compileChildren(t,e),this._emitLine("if(parentTemplate) {"),this._emitLine("parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);"),this._emitLine("} else {"),this._emitLine("cb(null, "+this.buffer+");"),this._emitLine("}"),this._emitFuncEnd(!0),this.inBlock=!0;var r=[],i=t.findAll(s.Block);i.forEach((function(t,e){var i=t.name.value;if(-1!==r.indexOf(i))throw new Error('Block "'+i+'" defined more than once.');r.push(i),n._emitFuncBegin(t,"b_"+i);var o=new c;n._emitLine("var frame = frame.push(true);"),n.compile(t.body,o),n._emitFuncEnd()})),this._emitLine("return {"),i.forEach((function(t,e){var r="b_"+t.name.value;n._emitLine(r+": "+r+",")})),this._emitLine("root: root\n};")},o.compile=function(t,e){var n=this["compile"+t.typename];n?n.call(this,t,e):this.fail("compile: Cannot compile node: "+t.typename,t.lineno,t.colno)},o.getCode=function(){return this.codebuf.join("")},i}(u);t.exports={compile:function(t,e,n,r,s){void 0===s&&(s={});var a=new h(r,s.throwOnUndefined),c=(n||[]).map((function(t){return t.preprocess})).filter((function(t){return!!t})).reduce((function(t,e){return e(t)}),t);return a.compile(o.transform(i.parse(c,n,s),e,r)),a.getCode()},Compiler:h}},function(t,e,n){"use strict";function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}var i=n(4),o=n(1).EmitterObj;t.exports=function(t){var e,n;function o(){return t.apply(this,arguments)||this}n=t,(e=o).prototype=Object.create(n.prototype),e.prototype.constructor=e,r(e,n);var s=o.prototype;return s.resolve=function(t,e){return i.resolve(i.dirname(t),e)},s.isRelative=function(t){return 0===t.indexOf("./")||0===t.indexOf("../")},o}(o)},function(t,e,n){"use strict";function r(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,i(t,e)}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}var o=n(12),s=n(15),a=n(0),c=n(5),u=n(18),l=n(10),h=l.FileSystemLoader,f=l.WebLoader,p=l.PrecompiledLoader,d=n(20),m=n(21),y=n(1),g=y.Obj,v=y.EmitterObj,_=n(2),b=_.handleError,w=_.Frame,x=n(22);function k(t,e,n){o((function(){t(e,n)}))}var T={type:"code",obj:{root:function(t,e,n,r,i){try{i(null,"")}catch(t){i(b(t,null,null))}}}},S=function(t){function e(){return t.apply(this,arguments)||this}r(e,t);var n=e.prototype;return n.init=function(t,e){var n=this;e=this.opts=e||{},this.opts.dev=!!e.dev,this.opts.autoescape=null==e.autoescape||e.autoescape,this.opts.throwOnUndefined=!!e.throwOnUndefined,this.opts.trimBlocks=!!e.trimBlocks,this.opts.lstripBlocks=!!e.lstripBlocks,this.loaders=[],t?this.loaders=a.isArray(t)?t:[t]:h?this.loaders=[new h("views")]:f&&(this.loaders=[new f("/views")]),"undefined"!=typeof window&&window.nunjucksPrecompiled&&this.loaders.unshift(new p(window.nunjucksPrecompiled)),this._initLoaders(),this.globals=m(),this.filters={},this.tests={},this.asyncFilters=[],this.extensions={},this.extensionsList=[],a._entries(u).forEach((function(t){var e=t[0],r=t[1];return n.addFilter(e,r)})),a._entries(d).forEach((function(t){var e=t[0],r=t[1];return n.addTest(e,r)}))},n._initLoaders=function(){var t=this;this.loaders.forEach((function(e){e.cache={},"function"==typeof e.on&&(e.on("update",(function(n,r){e.cache[n]=null,t.emit("update",n,r,e)})),e.on("load",(function(n,r){t.emit("load",n,r,e)})))}))},n.invalidateCache=function(){this.loaders.forEach((function(t){t.cache={}}))},n.addExtension=function(t,e){return e.__name=t,this.extensions[t]=e,this.extensionsList.push(e),this},n.removeExtension=function(t){var e=this.getExtension(t);e&&(this.extensionsList=a.without(this.extensionsList,e),delete this.extensions[t])},n.getExtension=function(t){return this.extensions[t]},n.hasExtension=function(t){return!!this.extensions[t]},n.addGlobal=function(t,e){return this.globals[t]=e,this},n.getGlobal=function(t){if(void 0===this.globals[t])throw new Error("global not found: "+t);return this.globals[t]},n.addFilter=function(t,e,n){var r=e;return n&&this.asyncFilters.push(t),this.filters[t]=r,this},n.getFilter=function(t){if(!this.filters[t])throw new Error("filter not found: "+t);return this.filters[t]},n.addTest=function(t,e){return this.tests[t]=e,this},n.getTest=function(t){if(!this.tests[t])throw new Error("test not found: "+t);return this.tests[t]},n.resolveTemplate=function(t,e,n){return t.isRelative&&e&&t.isRelative(n)&&t.resolve?t.resolve(e,n):n},n.getTemplate=function(t,e,n,r,i){var o,s=this,c=this,u=null;if(t&&t.raw&&(t=t.raw),a.isFunction(n)&&(i=n,n=null,e=e||!1),a.isFunction(e)&&(i=e,e=!1),t instanceof A)u=t;else{if("string"!=typeof t)throw new Error("template names must be a string: "+t);for(var l=0;l0&&!this.skip(i.TOKEN_COMMA)&&this.fail("parseFrom: expected comma",t.lineno,t.colno);var a=this.parsePrimary();if("_"===a.value.charAt(0)&&this.fail("parseFrom: names starting with an underscore cannot be imported",a.lineno,a.colno),this.skipSymbol("as")){var c=this.parsePrimary();r.addChild(new o.Pair(a.lineno,a.colno,a,c))}else r.addChild(a);n=this.parseWithContext()}return new o.FromImport(t.lineno,t.colno,e,r,n)},c.parseBlock=function(){var t=this.peekToken();this.skipSymbol("block")||this.fail("parseBlock: expected block",t.lineno,t.colno);var e=new o.Block(t.lineno,t.colno);e.name=this.parsePrimary(),e.name instanceof o.Symbol||this.fail("parseBlock: variable name expected",t.lineno,t.colno),this.advanceAfterBlockEnd(t.value),e.body=this.parseUntilBlocks("endblock"),this.skipSymbol("endblock"),this.skipSymbol(e.name.value);var n=this.peekToken();return n||this.fail("parseBlock: expected endblock, got end of file"),this.advanceAfterBlockEnd(n.value),e},c.parseExtends=function(){var t="extends",e=this.peekToken();this.skipSymbol(t)||this.fail("parseTemplateRef: expected "+t);var n=new o.Extends(e.lineno,e.colno);return n.template=this.parseExpression(),this.advanceAfterBlockEnd(e.value),n},c.parseInclude=function(){var t="include",e=this.peekToken();this.skipSymbol(t)||this.fail("parseInclude: expected "+t);var n=new o.Include(e.lineno,e.colno);return n.template=this.parseExpression(),this.skipSymbol("ignore")&&this.skipSymbol("missing")&&(n.ignoreMissing=!0),this.advanceAfterBlockEnd(e.value),n},c.parseIf=function(){var t,e=this.peekToken();this.skipSymbol("if")||this.skipSymbol("elif")||this.skipSymbol("elseif")?t=new o.If(e.lineno,e.colno):this.skipSymbol("ifAsync")?t=new o.IfAsync(e.lineno,e.colno):this.fail("parseIf: expected if, elif, or elseif",e.lineno,e.colno),t.cond=this.parseExpression(),this.advanceAfterBlockEnd(e.value),t.body=this.parseUntilBlocks("elif","elseif","else","endif");var n=this.peekToken();switch(n&&n.value){case"elseif":case"elif":t.else_=this.parseIf();break;case"else":this.advanceAfterBlockEnd(),t.else_=this.parseUntilBlocks("endif"),this.advanceAfterBlockEnd();break;case"endif":t.else_=null,this.advanceAfterBlockEnd();break;default:this.fail("parseIf: expected elif, else, or endif, got end of file")}return t},c.parseSet=function(){var t=this.peekToken();this.skipSymbol("set")||this.fail("parseSet: expected set",t.lineno,t.colno);for(var e,n=new o.Set(t.lineno,t.colno,[]);(e=this.parsePrimary())&&(n.targets.push(e),this.skip(i.TOKEN_COMMA)););return this.skipValue(i.TOKEN_OPERATOR,"=")?(n.value=this.parseExpression(),this.advanceAfterBlockEnd(t.value)):this.skip(i.TOKEN_BLOCK_END)?(n.body=new o.Capture(t.lineno,t.colno,this.parseUntilBlocks("endset")),n.value=null,this.advanceAfterBlockEnd()):this.fail("parseSet: expected = or block end in set tag",t.lineno,t.colno),n},c.parseSwitch=function(){var t="switch",e="endswitch",n="case",r="default",i=this.peekToken();this.skipSymbol(t)||this.skipSymbol(n)||this.skipSymbol(r)||this.fail('parseSwitch: expected "switch," "case" or "default"',i.lineno,i.colno);var s=this.parseExpression();this.advanceAfterBlockEnd(t),this.parseUntilBlocks(n,r,e);var a,c=this.peekToken(),u=[];do{this.skipSymbol(n);var l=this.parseExpression();this.advanceAfterBlockEnd(t);var h=this.parseUntilBlocks(n,r,e);u.push(new o.Case(c.line,c.col,l,h)),c=this.peekToken()}while(c&&c.value===n);switch(c.value){case r:this.advanceAfterBlockEnd(),a=this.parseUntilBlocks(e),this.advanceAfterBlockEnd();break;case e:this.advanceAfterBlockEnd();break;default:this.fail('parseSwitch: expected "case," "default" or "endswitch," got EOF.')}return new o.Switch(i.lineno,i.colno,s,u,a)},c.parseStatement=function(){var t=this.peekToken();if(t.type!==i.TOKEN_SYMBOL&&this.fail("tag name expected",t.lineno,t.colno),this.breakOnBlocks&&-1!==a.indexOf(this.breakOnBlocks,t.value))return null;switch(t.value){case"raw":return this.parseRaw();case"verbatim":return this.parseRaw("verbatim");case"if":case"ifAsync":return this.parseIf();case"for":case"asyncEach":case"asyncAll":return this.parseFor();case"block":return this.parseBlock();case"extends":return this.parseExtends();case"include":return this.parseInclude();case"set":return this.parseSet();case"macro":return this.parseMacro();case"call":return this.parseCall();case"import":return this.parseImport();case"from":return this.parseFrom();case"filter":return this.parseFilterStatement();case"switch":return this.parseSwitch();default:if(this.extensions.length)for(var e=0;e0;){var c=s[0],u=s[1],l=s[2];l===t?r+=1:l===e&&(r-=1),0===r?(i+=u,this.tokens.backN(c.length-u.length)):i+=c}return new o.Output(a.lineno,a.colno,[new o.TemplateData(a.lineno,a.colno,i)])},c.parsePostfix=function(t){for(var e,n=this.peekToken();n;){if(n.type===i.TOKEN_LEFT_PAREN)t=new o.FunCall(n.lineno,n.colno,t,this.parseSignature());else if(n.type===i.TOKEN_LEFT_BRACKET)(e=this.parseAggregate()).children.length>1&&this.fail("invalid index"),t=new o.LookupVal(n.lineno,n.colno,t,e.children[0]);else{if(n.type!==i.TOKEN_OPERATOR||"."!==n.value)break;this.nextToken();var r=this.nextToken();r.type!==i.TOKEN_SYMBOL&&this.fail("expected name as lookup value, got "+r.value,r.lineno,r.colno),e=new o.Literal(r.lineno,r.colno,r.value),t=new o.LookupVal(n.lineno,n.colno,t,e)}n=this.peekToken()}return t},c.parseExpression=function(){return this.parseInlineIf()},c.parseInlineIf=function(){var t=this.parseOr();if(this.skipSymbol("if")){var e=this.parseOr(),n=t;(t=new o.InlineIf(t.lineno,t.colno)).body=n,t.cond=e,this.skipSymbol("else")?t.else_=this.parseOr():t.else_=null}return t},c.parseOr=function(){for(var t=this.parseAnd();this.skipSymbol("or");){var e=this.parseAnd();t=new o.Or(t.lineno,t.colno,t,e)}return t},c.parseAnd=function(){for(var t=this.parseNot();this.skipSymbol("and");){var e=this.parseNot();t=new o.And(t.lineno,t.colno,t,e)}return t},c.parseNot=function(){var t=this.peekToken();return this.skipSymbol("not")?new o.Not(t.lineno,t.colno,this.parseNot()):this.parseIn()},c.parseIn=function(){for(var t=this.parseIs();;){var e=this.nextToken();if(!e)break;var n=e.type===i.TOKEN_SYMBOL&&"not"===e.value;if(n||this.pushToken(e),!this.skipSymbol("in")){n&&this.pushToken(e);break}var r=this.parseIs();t=new o.In(t.lineno,t.colno,t,r),n&&(t=new o.Not(t.lineno,t.colno,t))}return t},c.parseIs=function(){var t=this.parseCompare();if(this.skipSymbol("is")){var e=this.skipSymbol("not"),n=this.parseCompare();t=new o.Is(t.lineno,t.colno,t,n),e&&(t=new o.Not(t.lineno,t.colno,t))}return t},c.parseCompare=function(){for(var t=["==","===","!=","!==","<",">","<=",">="],e=this.parseConcat(),n=[];;){var r=this.nextToken();if(!r)break;if(-1===t.indexOf(r.value)){this.pushToken(r);break}n.push(new o.CompareOperand(r.lineno,r.colno,this.parseConcat(),r.value))}return n.length?new o.Compare(n[0].lineno,n[0].colno,e,n):e},c.parseConcat=function(){for(var t=this.parseAdd();this.skipValue(i.TOKEN_TILDE,"~");){var e=this.parseAdd();t=new o.Concat(t.lineno,t.colno,t,e)}return t},c.parseAdd=function(){for(var t=this.parseSub();this.skipValue(i.TOKEN_OPERATOR,"+");){var e=this.parseSub();t=new o.Add(t.lineno,t.colno,t,e)}return t},c.parseSub=function(){for(var t=this.parseMul();this.skipValue(i.TOKEN_OPERATOR,"-");){var e=this.parseMul();t=new o.Sub(t.lineno,t.colno,t,e)}return t},c.parseMul=function(){for(var t=this.parseDiv();this.skipValue(i.TOKEN_OPERATOR,"*");){var e=this.parseDiv();t=new o.Mul(t.lineno,t.colno,t,e)}return t},c.parseDiv=function(){for(var t=this.parseFloorDiv();this.skipValue(i.TOKEN_OPERATOR,"/");){var e=this.parseFloorDiv();t=new o.Div(t.lineno,t.colno,t,e)}return t},c.parseFloorDiv=function(){for(var t=this.parseMod();this.skipValue(i.TOKEN_OPERATOR,"//");){var e=this.parseMod();t=new o.FloorDiv(t.lineno,t.colno,t,e)}return t},c.parseMod=function(){for(var t=this.parsePow();this.skipValue(i.TOKEN_OPERATOR,"%");){var e=this.parsePow();t=new o.Mod(t.lineno,t.colno,t,e)}return t},c.parsePow=function(){for(var t=this.parseUnary();this.skipValue(i.TOKEN_OPERATOR,"**");){var e=this.parseUnary();t=new o.Pow(t.lineno,t.colno,t,e)}return t},c.parseUnary=function(t){var e,n=this.peekToken();return e=this.skipValue(i.TOKEN_OPERATOR,"-")?new o.Neg(n.lineno,n.colno,this.parseUnary(!0)):this.skipValue(i.TOKEN_OPERATOR,"+")?new o.Pos(n.lineno,n.colno,this.parseUnary(!0)):this.parsePrimary(),t||(e=this.parseFilter(e)),e},c.parsePrimary=function(t){var e,n=this.nextToken(),r=null;if(n?n.type===i.TOKEN_STRING?e=n.value:n.type===i.TOKEN_INT?e=parseInt(n.value,10):n.type===i.TOKEN_FLOAT?e=parseFloat(n.value):n.type===i.TOKEN_BOOLEAN?"true"===n.value?e=!0:"false"===n.value?e=!1:this.fail("invalid boolean: "+n.value,n.lineno,n.colno):n.type===i.TOKEN_NONE?e=null:n.type===i.TOKEN_REGEX&&(e=new RegExp(n.value.body,n.value.flags)):this.fail("expected expression, got end of file"),void 0!==e?r=new o.Literal(n.lineno,n.colno,e):n.type===i.TOKEN_SYMBOL?r=new o.Symbol(n.lineno,n.colno,n.value):(this.pushToken(n),r=this.parseAggregate()),t||(r=this.parsePostfix(r)),r)return r;throw this.error("unexpected token: "+n.value,n.lineno,n.colno)},c.parseFilterName=function(){for(var t=this.expect(i.TOKEN_SYMBOL),e=t.value;this.skipValue(i.TOKEN_OPERATOR,".");)e+="."+this.expect(i.TOKEN_SYMBOL).value;return new o.Symbol(t.lineno,t.colno,e)},c.parseFilterArgs=function(t){return this.peekToken().type===i.TOKEN_LEFT_PAREN?this.parsePostfix(t).args.children:[]},c.parseFilter=function(t){for(;this.skip(i.TOKEN_PIPE);){var e=this.parseFilterName();t=new o.Filter(e.lineno,e.colno,e,new o.NodeList(e.lineno,e.colno,[t].concat(this.parseFilterArgs(t))))}return t},c.parseFilterStatement=function(){var t=this.peekToken();this.skipSymbol("filter")||this.fail("parseFilterStatement: expected filter");var e=this.parseFilterName(),n=this.parseFilterArgs(e);this.advanceAfterBlockEnd(t.value);var r=new o.Capture(e.lineno,e.colno,this.parseUntilBlocks("endfilter"));this.advanceAfterBlockEnd();var i=new o.Filter(e.lineno,e.colno,e,new o.NodeList(e.lineno,e.colno,[r].concat(n)));return new o.Output(e.lineno,e.colno,[i])},c.parseAggregate=function(){var t,e=this.nextToken();switch(e.type){case i.TOKEN_LEFT_PAREN:t=new o.Group(e.lineno,e.colno);break;case i.TOKEN_LEFT_BRACKET:t=new o.Array(e.lineno,e.colno);break;case i.TOKEN_LEFT_CURLY:t=new o.Dict(e.lineno,e.colno);break;default:return null}for(;;){var n=this.peekToken().type;if(n===i.TOKEN_RIGHT_PAREN||n===i.TOKEN_RIGHT_BRACKET||n===i.TOKEN_RIGHT_CURLY){this.nextToken();break}if(t.children.length>0&&(this.skip(i.TOKEN_COMMA)||this.fail("parseAggregate: expected comma after expression",e.lineno,e.colno)),t instanceof o.Dict){var r=this.parsePrimary();this.skip(i.TOKEN_COLON)||this.fail("parseAggregate: expected colon after dict key",e.lineno,e.colno);var s=this.parseExpression();t.addChild(new o.Pair(r.lineno,r.colno,r,s))}else{var a=this.parseExpression();t.addChild(a)}}return t},c.parseSignature=function(t,e){var n=this.peekToken();if(!e&&n.type!==i.TOKEN_LEFT_PAREN){if(t)return null;this.fail("expected arguments",n.lineno,n.colno)}n.type===i.TOKEN_LEFT_PAREN&&(n=this.nextToken());for(var r=new o.NodeList(n.lineno,n.colno),s=new o.KeywordArgs(n.lineno,n.colno),a=!1;;){if(n=this.peekToken(),!e&&n.type===i.TOKEN_RIGHT_PAREN){this.nextToken();break}if(e&&n.type===i.TOKEN_BLOCK_END)break;if(a&&!this.skip(i.TOKEN_COMMA))this.fail("parseSignature: expected comma after expression",n.lineno,n.colno);else{var c=this.parseExpression();this.skipValue(i.TOKEN_OPERATOR,"=")?s.addChild(new o.Pair(c.lineno,c.colno,c,this.parseExpression())):r.addChild(c)}a=!0}return s.children.length&&r.addChild(s),r},c.parseUntilBlocks=function(){for(var t=this.breakOnBlocks,e=arguments.length,n=new Array(e),r=0;r=","//","**"],j=L+this.current();switch(-1!==r.indexOf(D,j)&&(this.forward(),L=j,-1!==r.indexOf(D,j+this.current())&&(L=j+this.current(),this.forward())),L){case"(":M=d;break;case")":M=m;break;case"[":M=y;break;case"]":M=g;break;case"{":M=v;break;case"}":M=_;break;case",":M=w;break;case":":M=x;break;case"~":M=k;break;case"|":M=T;break;default:M=b}return C(M,L,e,n)}if((t=this._extractUntil(i+o)).match(/^[-+]?[0-9]+$/)){if("."===this.current()){this.forward();var B=this._extract("0123456789");return C(S,t+"."+B,e,n)}return C("int",t,e,n)}if(t.match(/^(true|false)$/))return C(E,t,e,n);if("none"===t)return C(A,t,e,n);if("null"===t)return C(A,t,e,n);if(t)return C(O,t,e,n);throw new Error("Unexpected value while parsing: "+t)}var F,U=this.tags.BLOCK_START.charAt(0)+this.tags.VARIABLE_START.charAt(0)+this.tags.COMMENT_START.charAt(0)+this.tags.COMMENT_END.charAt(0);if(this.isFinished())return null;if((t=this._extractString(this.tags.BLOCK_START+"-"))||(t=this._extractString(this.tags.BLOCK_START)))return this.in_code=!0,C(u,t,e,n);if((t=this._extractString(this.tags.VARIABLE_START+"-"))||(t=this._extractString(this.tags.VARIABLE_START)))return this.in_code=!0,C(h,t,e,n);t="";var z=!1;for(this._matches(this.tags.COMMENT_START)&&(z=!0,t=this._extractString(this.tags.COMMENT_START));null!==(F=this._extractUntil(U));){if(t+=F,(this._matches(this.tags.BLOCK_START)||this._matches(this.tags.VARIABLE_START)||this._matches(this.tags.COMMENT_START))&&!z){if(this.lstripBlocks&&this._matches(this.tags.BLOCK_START)&&this.colno>0&&this.colno<=t.length){var V=t.slice(-this.colno);if(/^\s+$/.test(V)&&!(t=t.slice(0,-this.colno)).length)return this.nextToken()}break}if(this._matches(this.tags.COMMENT_END)){if(!z)throw new Error("unexpected end of comment");t+=this._extractString(this.tags.COMMENT_END);break}t+=this.current(),this.forward()}if(null===F&&z)throw new Error("expected end of comment, got end of file");return C(z?p:c,t,e,n)},e._parseString=function(t){this.forward();for(var e="";!this.isFinished()&&this.current()!==t;){var n=this.current();if("\\"===n){switch(this.forward(),this.current()){case"n":e+="\n";break;case"t":e+="\t";break;case"r":e+="\r";break;default:e+=this.current()}this.forward()}else e+=n,this.forward()}return this.forward(),e},e._matches=function(t){return this.index+t.length>this.len?null:this.str.slice(this.index,this.index+t.length)===t},e._extractString=function(t){return this._matches(t)?(this.forwardN(t.length),t):null},e._extractUntil=function(t){return this._extractMatching(!0,t||"")},e._extract=function(t){return this._extractMatching(!1,t)},e._extractMatching=function(t,e){if(this.isFinished())return null;var n=e.indexOf(this.current());if(t&&-1===n||!t&&-1!==n){var r=this.current();this.forward();for(var i=e.indexOf(this.current());(t&&-1===i||!t&&-1!==i)&&!this.isFinished();)r+=this.current(),this.forward(),i=e.indexOf(this.current());return r}return""},e._extractRegex=function(t){var e=this.currentStr().match(t);return e?(this.forwardN(e[0].length),e):null},e.isFinished=function(){return this.index>=this.len},e.forwardN=function(t){for(var e=0;e1024){for(var e=0,n=i.length-o;e0&&s.length>i&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return t}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}function d(t,e,n){var r=t._events;if(void 0===r)return[];var i=r[e];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(t){for(var e=new Array(t.length),n=0;n0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=i[t];if(void 0===c)return!1;if("function"==typeof c)o(c,this,e);else{var u=c.length,l=y(c,u);for(n=0;n=0;o--)if(n[o]===e||n[o].listener===e){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(t,e){for(;e+1=0;r--)this.removeListener(t,e[r]);return this},a.prototype.listeners=function(t){return d(this,t,!0)},a.prototype.rawListeners=function(t){return d(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):m.call(t,e)},a.prototype.listenerCount=m,a.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(t,e,n){"use strict";var r=n(3),i=n(0),o=0;function s(){return"hole_"+o++}function a(t,e){for(var n=null,r=0;r=e)return t;var n=e-t.length,s=r.repeat(" ",n/2-n%2),a=r.repeat(" ",n/2);return i.copySafeness(t,s+t+a)},e.default=function(t,e,n){return n?t||e:void 0!==t?t:e},e.dictsort=function(t,e,n){if(!r.isObject(t))throw new r.TemplateError("dictsort filter: val must be an object");var i,o=[];for(var s in t)o.push([s,t[s]]);if(void 0===n||"key"===n)i=0;else{if("value"!==n)throw new r.TemplateError("dictsort filter: You can only sort by either key or value");i=1}return o.sort((function(t,n){var o=t[i],s=n[i];return e||(r.isString(o)&&(o=o.toUpperCase()),r.isString(s)&&(s=s.toUpperCase())),o>s?1:o===s?0:-1})),o},e.dump=function(t,e){return JSON.stringify(t,null,e)},e.escape=function(t){return t instanceof i.SafeString?t:(t=null==t?"":t,i.markSafe(r.escape(t.toString())))},e.safe=function(t){return t instanceof i.SafeString?t:(t=null==t?"":t,i.markSafe(t.toString()))},e.first=function(t){return t[0]},e.forceescape=function(t){return t=null==t?"":t,i.markSafe(r.escape(t.toString()))},e.groupby=function(t,e){return r.groupBy(t,e,this.env.opts.throwOnUndefined)},e.indent=function(t,e,n){if(""===(t=o(t,"")))return"";e=e||4;var s=t.split("\n"),a=r.repeat(" ",e),c=s.map((function(t,e){return 0!==e||n?""+a+t:t})).join("\n");return i.copySafeness(t,c)},e.join=function(t,e,n){return e=e||"",n&&(t=r.map(t,(function(t){return t[n]}))),t.join(e)},e.last=function(t){return t[t.length-1]},e.length=function(t){var e=o(t,"");return void 0!==e?"function"==typeof Map&&e instanceof Map||"function"==typeof Set&&e instanceof Set?e.size:!r.isObject(e)||e instanceof i.SafeString?e.length:r.keys(e).length:0},e.list=c,e.lower=function(t){return(t=o(t,"")).toLowerCase()},e.nl2br=function(t){return null==t?"":i.copySafeness(t,t.replace(/\r\n|\n/g,"
\n"))},e.random=function(t){return t[Math.floor(Math.random()*t.length)]},e.reject=u(!1),e.rejectattr=function(t,e){return t.filter((function(t){return!t[e]}))},e.select=u(!0),e.selectattr=function(t,e){return t.filter((function(t){return!!t[e]}))},e.replace=function(t,e,n,r){var o=t;if(e instanceof RegExp)return t.replace(e,n);void 0===r&&(r=-1);var s="";if("number"==typeof e)e=""+e;else if("string"!=typeof e)return t;if("number"==typeof t&&(t=""+t),"string"!=typeof t&&!(t instanceof i.SafeString))return t;if(""===e)return s=n+t.split("").join(n)+n,i.copySafeness(t,s);var a=t.indexOf(e);if(0===r||-1===a)return t;for(var c=0,u=0;a>-1&&(-1===r||u=i&&l.push(n),o.push(l)}return o},e.sum=function(t,e,n){return void 0===n&&(n=0),e&&(t=r.map(t,(function(t){return t[e]}))),n+t.reduce((function(t,e){return t+e}),0)},e.sort=i.makeMacro(["value","reverse","case_sensitive","attribute"],[],(function(t,e,n,i){var o=this,s=r.map(t,(function(t){return t})),a=r.getAttrGetter(i);return s.sort((function(t,s){var c=i?a(t):t,u=i?a(s):s;if(o.env.opts.throwOnUndefined&&i&&(void 0===c||void 0===u))throw new TypeError('sort: attribute "'+i+'" resolved to undefined');return!n&&r.isString(c)&&r.isString(u)&&(c=c.toLowerCase(),u=u.toLowerCase()),cu?e?-1:1:0})),s})),e.string=function(t){return i.copySafeness(t,t)},e.striptags=function(t,e){var n,r=l((t=o(t,"")).replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|/gi,""));return n=e?r.replace(/^ +| +$/gm,"").replace(/ +/g," ").replace(/(\r\n)/g,"\n").replace(/\n\n\n+/g,"\n\n"):r.replace(/\s+/gi," "),i.copySafeness(t,n)},e.title=function(t){var e=(t=o(t,"")).split(" ").map((function(t){return a(t)}));return i.copySafeness(t,e.join(" "))},e.trim=l,e.truncate=function(t,e,n,r){var s=t;if(e=e||255,(t=o(t,"")).length<=e)return t;if(n)t=t.substring(0,e);else{var a=t.lastIndexOf(" ",e);-1===a&&(a=e),t=t.substring(0,a)}return t+=null!=r?r:"...",i.copySafeness(s,t)},e.upper=function(t){return(t=o(t,"")).toUpperCase()},e.urlencode=function(t){var e=encodeURIComponent;return r.isString(t)?e(t):(r.isArray(t)?t:r._entries(t)).map((function(t){var n=t[0],r=t[1];return e(n)+"="+e(r)})).join("&")};var h=/^(?:\(|<|<)?(.*?)(?:\.|,|\)|\n|>)?$/,f=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,p=/^https?:\/\/.*$/,d=/^www\./,m=/\.(?:org|net|com)(?:\:|\/|$)/;e.urlize=function(t,e,n){s(e)&&(e=1/0);var r=!0===n?' rel="nofollow"':"";return t.split(/(\s+)/).filter((function(t){return t&&t.length})).map((function(t){var n=t.match(h),i=n?n[1]:t,o=i.substr(0,e);return p.test(i)?'"+o+"":d.test(i)?'"+o+"":f.test(i)?''+i+"":m.test(i)?'"+o+"":t})).join("")},e.wordcount=function(t){var e=(t=o(t,""))?t.match(/\w+/g):null;return e?e.length:null},e.float=function(t,e){var n=parseFloat(t);return s(n)?e:n};var y=i.makeMacro(["value","default","base"],[],(function(t,e,n){void 0===n&&(n=10);var r=parseInt(t,n);return s(r)?e:r}));e.int=y,e.d=e.default,e.e=e.escape},function(t,e,n){"use strict";function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}var i=function(t){var e,n;function i(e){var n;return(n=t.call(this)||this).precompiled=e||{},n}return n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,r(e,n),i.prototype.getSource=function(t){return this.precompiled[t]?{src:{type:"code",obj:this.precompiled[t]},path:t}:null},i}(n(6));t.exports={PrecompiledLoader:i}},function(t,e,n){"use strict";var r=n(2).SafeString;e.callable=function(t){return"function"==typeof t},e.defined=function(t){return void 0!==t},e.divisibleby=function(t,e){return t%e==0},e.escaped=function(t){return t instanceof r},e.equalto=function(t,e){return t===e},e.eq=e.equalto,e.sameas=e.equalto,e.even=function(t){return t%2==0},e.falsy=function(t){return!t},e.ge=function(t,e){return t>=e},e.greaterthan=function(t,e){return t>e},e.gt=e.greaterthan,e.le=function(t,e){return t<=e},e.lessthan=function(t,e){return t0)for(var i=t;ie;o+=n)r.push(o);return r},cycler:function(){return t=Array.prototype.slice.call(arguments),e=-1,{current:null,reset:function(){e=-1,this.current=null},next:function(){return++e>=t.length&&(e=0),this.current=t[e],this.current}};var t,e},joiner:function(t){return function(t){t=t||",";var e=!0;return function(){var n=e?"":t;return e=!1,n}}(t)}}}},function(t,e,n){var r=n(4);t.exports=function(t,e){function n(t,e){if(this.name=t,this.path=t,this.defaultEngine=e.defaultEngine,this.ext=r.extname(t),!this.ext&&!this.defaultEngine)throw new Error("No default engine was specified and no extension was provided.");this.ext||(this.name+=this.ext=("."!==this.defaultEngine[0]?".":"")+this.defaultEngine)}return n.prototype.render=function(e,n){t.render(this.name,e,n)},e.set("view",n),e.set("nunjucksEnv",t),t}},function(t,e,n){"use strict";var r=n(4),i=n(4),o=n(0)._prettifyError,s=n(5),a=n(7).Environment,c=n(24);function u(t,e){return!!Array.isArray(e)&&e.some((function(e){return t.match(e)}))}function l(t,e){(e=e||{}).isString=!0;var n=e.env||new a([]),r=e.wrapper||c;if(!e.name)throw new Error('the "name" option is required when compiling a string');return r([h(t,e.name,n)],e)}function h(t,e,n){var r,i=(n=n||new a([])).asyncFilters,c=n.extensionsList;e=e.replace(/\\/g,"/");try{r=s.compile(t,i,c,e,n.opts)}catch(t){throw o(e,!1,t)}return{name:e,template:r}}t.exports={precompile:function(t,e){var n=(e=e||{}).env||new a([]),o=e.wrapper||c;if(e.isString)return l(t,e);var s=r.existsSync(t)&&r.statSync(t),f=[],p=[];if(s.isFile())f.push(h(r.readFileSync(t,"utf-8"),e.name||t,n));else if(s.isDirectory()){!function n(o){r.readdirSync(o).forEach((function(s){var a=i.join(o,s),c=a.substr(i.join(t,"/").length),l=r.statSync(a);l&&l.isDirectory()?u(c+="/",e.exclude)||n(a):u(c,e.include)&&p.push(a)}))}(t);for(var d=0;dt.length||i>0&&s>=r||i<0&&s<=r);s+=i)o.push(n.memberLookup(t,s));return o}function p(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var d={pop:function(t){if(void 0===t)return this.pop();if(t>=this.length||t<0)throw new Error("KeyError");return this.splice(t,1)},append:function(t){return this.push(t)},remove:function(t){for(var e=0;e{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};(()=>{"use strict";r.r(i),r.d(i,{Component:()=>b,ComponentAttribute:()=>s,ComponentAttributeDefinition:()=>O,ComponentDefinition:()=>x,ComponentDrawOption:()=>f,ComponentLink:()=>M,ComponentLinkDefinition:()=>j,ComponentRenderer:()=>PO,DefaultConfiguration:()=>YN,DefaultData:()=>zN,DefaultDrawer:()=>oN,DefaultMetadata:()=>uN,DefaultParser:()=>pN,DefaultPlugin:()=>JN,DefaultRender:()=>gN,FileInformation:()=>l,FileInput:()=>H,LinkRenderer:()=>jO,ParseError:()=>TN,Tag:()=>tC,Variable:()=>aC});var t={};function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,"string");if("object"!=e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==e(n)?n:n+""}r.r(t),r.d(t,{Adder:()=>gt,Delaunay:()=>jc,FormatSpecifier:()=>eh,InternMap:()=>bt,InternSet:()=>wt,Node:()=>Ey,Path:()=>Qs,Voronoi:()=>Lc,ZoomTransform:()=>IE,active:()=>is,arc:()=>vT,area:()=>ET,areaRadial:()=>MT,ascending:()=>q,autoType:()=>yu,axisBottom:()=>cn,axisLeft:()=>un,axisRight:()=>an,axisTop:()=>sn,bin:()=>ee,bisect:()=>tt,bisectCenter:()=>Q,bisectLeft:()=>J,bisectRight:()=>Z,bisector:()=>G,blob:()=>ol,blur:()=>et,blur2:()=>nt,blurImage:()=>rt,brush:()=>Ps,brushSelection:()=>Cs,brushX:()=>Ls,brushY:()=>Rs,buffer:()=>al,chord:()=>Hs,chordDirected:()=>Ws,chordTranspose:()=>qs,cluster:()=>_y,color:()=>ti,contourDensity:()=>cc,contours:()=>tc,count:()=>ct,create:()=>Wk,creator:()=>mr,cross:()=>ft,csv:()=>fl,csvFormat:()=>ru,csvFormatBody:()=>iu,csvFormatRow:()=>su,csvFormatRows:()=>ou,csvFormatValue:()=>au,csvParse:()=>eu,csvParseRows:()=>nu,cubehelix:()=>Ha,cumsum:()=>pt,curveBasis:()=>SS,curveBasisClosed:()=>AS,curveBasisOpen:()=>NS,curveBumpX:()=>FT,curveBumpY:()=>UT,curveBundle:()=>LS,curveCardinal:()=>IS,curveCardinalClosed:()=>DS,curveCardinalOpen:()=>BS,curveCatmullRom:()=>zS,curveCatmullRomClosed:()=>KS,curveCatmullRomOpen:()=>qS,curveLinear:()=>xT,curveLinearClosed:()=>GS,curveMonotoneX:()=>eE,curveMonotoneY:()=>nE,curveNatural:()=>oE,curveStep:()=>aE,curveStepAfter:()=>uE,curveStepBefore:()=>cE,descending:()=>W,deviation:()=>mt,difference:()=>Fe,disjoint:()=>Ue,dispatch:()=>mn,drag:()=>Hc,dragDisable:()=>Ir,dragEnable:()=>Mr,dsv:()=>hl,dsvFormat:()=>Qc,easeBack:()=>Qu,easeBackIn:()=>Zu,easeBackInOut:()=>Qu,easeBackOut:()=>Ju,easeBounce:()=>Yu,easeBounceIn:()=>Gu,easeBounceInOut:()=>$u,easeBounceOut:()=>Yu,easeCircle:()=>Du,easeCircleIn:()=>Iu,easeCircleInOut:()=>Du,easeCircleOut:()=>Mu,easeCubic:()=>ts,easeCubicIn:()=>Jo,easeCubicInOut:()=>ts,easeCubicOut:()=>Qo,easeElastic:()=>nl,easeElasticIn:()=>el,easeElasticInOut:()=>rl,easeElasticOut:()=>nl,easeExp:()=>Pu,easeExpIn:()=>Lu,easeExpInOut:()=>Pu,easeExpOut:()=>Ru,easeLinear:()=>vu,easePoly:()=>Tu,easePolyIn:()=>xu,easePolyInOut:()=>Tu,easePolyOut:()=>ku,easeQuad:()=>wu,easeQuadIn:()=>_u,easeQuadInOut:()=>wu,easeQuadOut:()=>bu,easeSin:()=>Nu,easeSinIn:()=>Au,easeSinInOut:()=>Nu,easeSinOut:()=>Ou,every:()=>Pe,extent:()=>yt,fcumsum:()=>_t,filter:()=>Me,flatGroup:()=>Ct,flatRollup:()=>Lt,forceCenter:()=>wl,forceCollide:()=>Il,forceLink:()=>jl,forceManyBody:()=>Wl,forceRadial:()=>Gl,forceSimulation:()=>ql,forceX:()=>Yl,forceY:()=>$l,format:()=>sh,formatDefaultLocale:()=>hh,formatLocale:()=>lh,formatPrefix:()=>ah,formatSpecifier:()=>th,fsum:()=>vt,geoAlbers:()=>Im,geoAlbersUsa:()=>Mm,geoArea:()=>yf,geoAzimuthalEqualArea:()=>Fm,geoAzimuthalEqualAreaRaw:()=>Bm,geoAzimuthalEquidistant:()=>zm,geoAzimuthalEquidistantRaw:()=>Um,geoBounds:()=>Zf,geoCentroid:()=>up,geoCircle:()=>bp,geoClipAntimeridian:()=>Lp,geoClipCircle:()=>Rp,geoClipExtent:()=>Up,geoClipRectangle:()=>Fp,geoConicConformal:()=>Gm,geoConicConformalRaw:()=>Wm,geoConicEqualArea:()=>Pm,geoConicEqualAreaRaw:()=>Rm,geoConicEquidistant:()=>Zm,geoConicEquidistantRaw:()=>Xm,geoContains:()=>rd,geoDistance:()=>Yp,geoEqualEarth:()=>iy,geoEqualEarthRaw:()=>ry,geoEquirectangular:()=>$m,geoEquirectangularRaw:()=>Ym,geoGnomonic:()=>sy,geoGnomonicRaw:()=>oy,geoGraticule:()=>sd,geoGraticule10:()=>ad,geoIdentity:()=>ay,geoInterpolate:()=>cd,geoLength:()=>qp,geoMercator:()=>Km,geoMercatorRaw:()=>Vm,geoNaturalEarth1:()=>uy,geoNaturalEarth1Raw:()=>cy,geoOrthographic:()=>hy,geoOrthographicRaw:()=>ly,geoPath:()=>mm,geoProjection:()=>Nm,geoProjectionMutator:()=>Cm,geoRotation:()=>gp,geoStereographic:()=>py,geoStereographicRaw:()=>fy,geoStream:()=>qh,geoTransform:()=>ym,geoTransverseMercator:()=>my,geoTransverseMercatorRaw:()=>dy,gray:()=>Ta,greatest:()=>ce,greatestIndex:()=>Se,group:()=>At,groupSort:()=>Vt,groups:()=>Ot,hcl:()=>Pa,hierarchy:()=>wy,histogram:()=>ee,hsl:()=>pi,html:()=>_l,image:()=>dl,index:()=>It,indexes:()=>Mt,interpolate:()=>Fi,interpolateArray:()=>Li,interpolateBasis:()=>_i,interpolateBasisClosed:()=>bi,interpolateBlues:()=>_k,interpolateBrBG:()=>Lx,interpolateBuGn:()=>$x,interpolateBuPu:()=>Zx,interpolateCividis:()=>Ck,interpolateCool:()=>Pk,interpolateCubehelix:()=>Ug,interpolateCubehelixDefault:()=>Lk,interpolateCubehelixLong:()=>zg,interpolateDate:()=>Pi,interpolateDiscrete:()=>Ag,interpolateGnBu:()=>Qx,interpolateGreens:()=>wk,interpolateGreys:()=>kk,interpolateHcl:()=>jg,interpolateHclLong:()=>Bg,interpolateHsl:()=>Pg,interpolateHslLong:()=>Ig,interpolateHue:()=>Og,interpolateInferno:()=>Hk,interpolateLab:()=>Mg,interpolateMagma:()=>Kk,interpolateNumber:()=>Ii,interpolateNumberArray:()=>Ni,interpolateObject:()=>Mi,interpolateOrRd:()=>ek,interpolateOranges:()=>Nk,interpolatePRGn:()=>Px,interpolatePiYG:()=>Mx,interpolatePlasma:()=>qk,interpolatePuBu:()=>ok,interpolatePuBuGn:()=>rk,interpolatePuOr:()=>jx,interpolatePuRd:()=>ak,interpolatePurples:()=>Sk,interpolateRainbow:()=>Mk,interpolateRdBu:()=>Fx,interpolateRdGy:()=>zx,interpolateRdPu:()=>uk,interpolateRdYlBu:()=>Kx,interpolateRdYlGn:()=>qx,interpolateReds:()=>Ak,interpolateRgb:()=>Si,interpolateRgbBasis:()=>Ai,interpolateRgbBasisClosed:()=>Oi,interpolateRound:()=>Ng,interpolateSinebow:()=>Fk,interpolateSpectral:()=>Gx,interpolateString:()=>Bi,interpolateTransformCss:()=>Ao,interpolateTransformSvg:()=>Oo,interpolateTurbo:()=>Uk,interpolateViridis:()=>Vk,interpolateWarm:()=>Rk,interpolateYlGn:()=>pk,interpolateYlGnBu:()=>hk,interpolateYlOrBr:()=>mk,interpolateYlOrRd:()=>gk,interpolateZoom:()=>Lg,interrupt:()=>wo,intersection:()=>ze,interval:()=>LE,isoFormat:()=>OE,isoParse:()=>CE,json:()=>yl,lab:()=>Sa,lch:()=>Ra,least:()=>ke,leastIndex:()=>Te,line:()=>ST,lineRadial:()=>IT,link:()=>HT,linkHorizontal:()=>qT,linkRadial:()=>GT,linkVertical:()=>WT,local:()=>Yk,map:()=>De,matcher:()=>wn,max:()=>ne,maxIndex:()=>re,mean:()=>de,median:()=>me,medianIndex:()=>ye,merge:()=>ge,min:()=>ie,minIndex:()=>oe,mode:()=>ve,namespace:()=>Dn,namespaces:()=>Mn,nice:()=>Qt,now:()=>Qi,pack:()=>Zy,packEnclose:()=>My,packSiblings:()=>$y,pairs:()=>_e,partition:()=>rg,path:()=>ta,pathRound:()=>ea,permute:()=>Bt,pie:()=>NT,piecewise:()=>Vg,pointRadial:()=>DT,pointer:()=>zi,pointers:()=>Xk,polygonArea:()=>Hg,polygonCentroid:()=>qg,polygonContains:()=>Xg,polygonHull:()=>$g,polygonLength:()=>Zg,precisionFixed:()=>fh,precisionPrefix:()=>ph,precisionRound:()=>dh,quadtree:()=>El,quantile:()=>ue,quantileIndex:()=>he,quantileSorted:()=>le,quantize:()=>Kg,quickselect:()=>se,radialArea:()=>MT,radialLine:()=>IT,randomBates:()=>iv,randomBernoulli:()=>av,randomBeta:()=>lv,randomBinomial:()=>hv,randomCauchy:()=>pv,randomExponential:()=>ov,randomGamma:()=>uv,randomGeometric:()=>cv,randomInt:()=>tv,randomIrwinHall:()=>rv,randomLcg:()=>_v,randomLogNormal:()=>nv,randomLogistic:()=>dv,randomNormal:()=>ev,randomPareto:()=>sv,randomPoisson:()=>mv,randomUniform:()=>Qg,randomWeibull:()=>fv,range:()=>we,rank:()=>xe,reduce:()=>je,reverse:()=>Be,rgb:()=>ii,ribbon:()=>fa,ribbonArrow:()=>pa,rollup:()=>Rt,rollups:()=>Pt,scaleBand:()=>Tv,scaleDiverging:()=>px,scaleDivergingLog:()=>dx,scaleDivergingPow:()=>yx,scaleDivergingSqrt:()=>gx,scaleDivergingSymlog:()=>mx,scaleIdentity:()=>Fv,scaleImplicit:()=>xv,scaleLinear:()=>Bv,scaleLog:()=>Yv,scaleOrdinal:()=>kv,scalePoint:()=>Ev,scalePow:()=>r_,scaleQuantile:()=>a_,scaleQuantize:()=>c_,scaleRadial:()=>s_,scaleSequential:()=>sx,scaleSequentialLog:()=>ax,scaleSequentialPow:()=>ux,scaleSequentialQuantile:()=>hx,scaleSequentialSqrt:()=>lx,scaleSequentialSymlog:()=>cx,scaleSqrt:()=>i_,scaleSymlog:()=>Jv,scaleThreshold:()=>u_,scaleTime:()=>nx,scaleUtc:()=>rx,scan:()=>Ee,schemeAccent:()=>bx,schemeBlues:()=>vk,schemeBrBG:()=>Cx,schemeBuGn:()=>Yx,schemeBuPu:()=>Xx,schemeCategory10:()=>_x,schemeDark2:()=>wx,schemeGnBu:()=>Jx,schemeGreens:()=>bk,schemeGreys:()=>xk,schemeOrRd:()=>tk,schemeOranges:()=>Ok,schemePRGn:()=>Rx,schemePaired:()=>xx,schemePastel1:()=>kx,schemePastel2:()=>Tx,schemePiYG:()=>Ix,schemePuBu:()=>ik,schemePuBuGn:()=>nk,schemePuOr:()=>Dx,schemePuRd:()=>sk,schemePurples:()=>Tk,schemeRdBu:()=>Bx,schemeRdGy:()=>Ux,schemeRdPu:()=>ck,schemeRdYlBu:()=>Vx,schemeRdYlGn:()=>Hx,schemeReds:()=>Ek,schemeSet1:()=>Sx,schemeSet2:()=>Ex,schemeSet3:()=>Ax,schemeSpectral:()=>Wx,schemeTableau10:()=>Ox,schemeYlGn:()=>fk,schemeYlGnBu:()=>lk,schemeYlOrBr:()=>dk,schemeYlOrRd:()=>yk,select:()=>Nr,selectAll:()=>Zk,selection:()=>Or,selector:()=>gn,selectorAll:()=>bn,shuffle:()=>Ae,shuffler:()=>Oe,some:()=>Ie,sort:()=>Ft,stack:()=>dE,stackOffsetDiverging:()=>yE,stackOffsetExpand:()=>mE,stackOffsetNone:()=>lE,stackOffsetSilhouette:()=>gE,stackOffsetWiggle:()=>vE,stackOrderAppearance:()=>_E,stackOrderAscending:()=>wE,stackOrderDescending:()=>kE,stackOrderInsideOut:()=>TE,stackOrderNone:()=>hE,stackOrderReverse:()=>SE,stratify:()=>ug,style:()=>Gn,subset:()=>qe,sum:()=>Ne,superset:()=>Ke,svg:()=>bl,symbol:()=>wS,symbolAsterisk:()=>$T,symbolCircle:()=>XT,symbolCross:()=>ZT,symbolDiamond:()=>tS,symbolDiamond2:()=>eS,symbolPlus:()=>nS,symbolSquare:()=>rS,symbolSquare2:()=>iS,symbolStar:()=>cS,symbolTimes:()=>vS,symbolTriangle:()=>lS,symbolTriangle2:()=>fS,symbolWye:()=>gS,symbolX:()=>vS,symbols:()=>_S,symbolsFill:()=>_S,symbolsStroke:()=>bS,text:()=>ul,thresholdFreedmanDiaconis:()=>fe,thresholdScott:()=>pe,thresholdSturges:()=>te,tickFormat:()=>Dv,tickIncrement:()=>Zt,tickStep:()=>Jt,ticks:()=>Xt,timeDay:()=>L_,timeDays:()=>R_,timeFormat:()=>Lb,timeFormatDefaultLocale:()=>Jw,timeFormatLocale:()=>Nb,timeFriday:()=>K_,timeFridays:()=>X_,timeHour:()=>A_,timeHours:()=>O_,timeInterval:()=>v_,timeMillisecond:()=>__,timeMilliseconds:()=>b_,timeMinute:()=>k_,timeMinutes:()=>T_,timeMonday:()=>F_,timeMondays:()=>W_,timeMonth:()=>pb,timeMonths:()=>db,timeParse:()=>Rb,timeSaturday:()=>H_,timeSaturdays:()=>Z_,timeSecond:()=>w_,timeSeconds:()=>x_,timeSunday:()=>B_,timeSundays:()=>q_,timeThursday:()=>V_,timeThursdays:()=>$_,timeTickInterval:()=>Sb,timeTicks:()=>Tb,timeTuesday:()=>U_,timeTuesdays:()=>G_,timeWednesday:()=>z_,timeWednesdays:()=>Y_,timeWeek:()=>B_,timeWeeks:()=>q_,timeYear:()=>gb,timeYears:()=>vb,timeout:()=>ao,timer:()=>no,timerFlush:()=>ro,transition:()=>$o,transpose:()=>Ce,tree:()=>vg,treemap:()=>kg,treemapBinary:()=>Tg,treemapDice:()=>ng,treemapResquarify:()=>Eg,treemapSlice:()=>_g,treemapSliceDice:()=>Sg,treemapSquarify:()=>xg,tsv:()=>pl,tsvFormat:()=>hu,tsvFormatBody:()=>fu,tsvFormatRow:()=>du,tsvFormatRows:()=>pu,tsvFormatValue:()=>mu,tsvParse:()=>uu,tsvParseRows:()=>lu,union:()=>We,unixDay:()=>M_,unixDays:()=>D_,utcDay:()=>P_,utcDays:()=>I_,utcFormat:()=>Pb,utcFriday:()=>ib,utcFridays:()=>hb,utcHour:()=>N_,utcHours:()=>C_,utcMillisecond:()=>__,utcMilliseconds:()=>b_,utcMinute:()=>S_,utcMinutes:()=>E_,utcMonday:()=>tb,utcMondays:()=>ab,utcMonth:()=>mb,utcMonths:()=>yb,utcParse:()=>Ib,utcSaturday:()=>ob,utcSaturdays:()=>fb,utcSecond:()=>w_,utcSeconds:()=>x_,utcSunday:()=>Q_,utcSundays:()=>sb,utcThursday:()=>rb,utcThursdays:()=>lb,utcTickInterval:()=>kb,utcTicks:()=>xb,utcTuesday:()=>eb,utcTuesdays:()=>cb,utcWednesday:()=>nb,utcWednesdays:()=>ub,utcWeek:()=>Q_,utcWeeks:()=>sb,utcYear:()=>_b,utcYears:()=>bb,variance:()=>dt,window:()=>Kn,xml:()=>vl,zip:()=>Re,zoom:()=>qE,zoomIdentity:()=>ME,zoomTransform:()=>DE});var o=function(){return t=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{name:null,value:null,type:null,definition:null};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=e.name,r=e.value,i=e.type,o=e.definition;this.name=n||null,this.value=null!=r?r:null,this.type=i||null,this.definition=o||null},r=[{key:"isVariable",get:function(){return!1}},{key:"hasError",value:function(){return null===this.definition?null===this.value||("array"===this.type.toLowerCase()?!Array.isArray(this.value):e(this.value)!==this.type.toLowerCase()):null!==this.value&&void 0!==this.value&&(this.__typeOfValueValidation()||this.__ruleValueValidation()||this.__ruleMinAndMaxValidation()||this.__ruleRegexValidation())}},{key:"__typeOfValueValidation",value:function(){var t=this.type.toLowerCase();return"Link"===this.definition.type?!Array.isArray(this.value)||this.value.some((function(t){return"string"!=typeof t})):"array"===t?!Array.isArray(this.value):e(this.value)!==t}},{key:"__ruleValueValidation",value:function(){var t=this;return this.definition.rules.values&&Array.isArray(this.value)?!this.value.every((function(e){return t.definition.rules.values.includes(e)})):this.definition.rules.values&&!this.definition.rules.values.includes(this.value)}},{key:"__ruleMinAndMaxValidation",value:function(){var t="number"==typeof this.value?this.value:this.value.length;return null!==this.definition.rules.min&&tthis.definition.rules.max}},{key:"__ruleRegexValidation",value:function(){return null!==this.definition.rules.regex&&!new RegExp(this.definition.rules.regex).test(this.value)}}],r&&function(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{path:null};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=e.path;this.path=null!=n?n:null},(e=[{key:"fileName",get:function(){return this.path?this.path.replace(/^.*[\\/]/,""):null}}])&&function(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{x:null,y:null,width:null,height:null,hide:!1};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=e.x,r=e.y,i=e.width,o=e.height,s=e.hide;this.x=n||null,this.y=r||null,this.width=i||null,this.height=o||null,this.hide=s||!1}));const f=h;function p(t){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(t)}function d(t){var e=function(t,e){if("object"!=p(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==p(e)?e:e+""}function m(t,e,n){return e=g(e),function(t,e){if(e&&("object"==p(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,y()?Reflect.construct(e,n||[],g(t).constructor):e.apply(t,n))}function y(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(y=function(){return!!t})()}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},g(t)}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}var _=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:null,externalId:null,name:null,definition:null,drawOption:null,attributes:[]};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t=m(this,e,[n]);var r=n.id,i=n.externalId,o=n.name,s=n.definition,a=n.drawOption,c=n.attributes;return t.__class="Component",t.id=r||null,t.externalId=i||t.id,t.name=o||null,t.definition=s||null,t.drawOption=a||new f,t.attributes=c||[],t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v(t,e)}(e,t),n=e,r=[{key:"setExternalId",value:function(t){this.externalId=t}},{key:"getConfigurationKey",value:function(){return this.id}},{key:"setReferenceAttribute",value:function(t){var e=this.definition.definedAttributes.find((function(e){return e.containerRef===t.definition.type}));if(e){var n=this.attributes.filter((function(t){var n=t.definition;return(null==n?void 0:n.name)===e.name}));n.length>0?n.forEach((function(e){e.value=t.id})):this.attributes.push(this.createAttribute({name:e.name,value:t.id,type:"String",definition:e}))}}},{key:"__createNestedAttributes",value:function(t){var e=this,n=this.attributes;return t.slice().reverse().forEach((function(t){var r=n.find((function(e){return e.definition.name===t.name}));r||(r=e.createAttribute({name:t.name,definition:t,type:"Object",value:[]}),n.push(r)),n=r.value})),n}},{key:"createAttribute",value:function(t){return new s(t)}},{key:"removeAllReferenceAttributes",value:function(t){this.attributes=t?this.attributes.filter((function(e){return!("Reference"===e.definition.type&&e.definition.containerRef===t.definition.type&&e.value===t.id)})):this.attributes.filter((function(t){return"Reference"!==t.definition.type}))}},{key:"setLinkAttribute",value:function(t){var e=[],n=this.__getLinkAttribute(e,this.definition.definedAttributes,t),r=this.__createNestedAttributes(e),i=r.find((function(t){return t.definition.name===n.name}));i||(i=this.createAttribute({name:n.name,definition:n,type:"Array",value:[]}),r.push(i)),i.value.includes(t.target)||i.value.push(t.target)}},{key:"__getLinkAttribute",value:function(t,e,n){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:null;this.__removeLinkAttribute(this.attributes,t,e)}},{key:"__removeLinkAttribute",value:function(t,e,n){var r=this;t.forEach((function(t){var i;if("Object"===t.type&&r.__removeLinkAttribute(t.value,e,n),"Link"===(null===(i=t.definition)||void 0===i?void 0:i.type)&&(!n||t.name===n)){var o=t.value.findIndex((function(t){return t===e}));o>=0&&t.value.splice(o,1)}}))}},{key:"getAttributeByName",value:function(t){return this.__getAttributeByName(this.attributes,t)}},{key:"__getAttributeByName",value:function(t,e){for(var n=0;n3?i-3:0),s=3;s2?n-2:0),i=2;i0&&void 0!==arguments[0]?arguments[0]:{type:null,icon:null,model:null,displayName:null,description:null,categories:[],tags:[],url:null,parentTypes:[],childrenTypes:[],definedAttributes:[],isContainer:!1,displayType:null,workflowDirection:null,linkModel:null,defaultWidth:0,defaultHeight:0,minWidth:0,minHeight:0,reservedWidth:0,reservedHeight:0,margin:10,gap:30};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=e.type,r=e.icon,i=e.model,o=e.displayName,s=e.description,a=e.categories,c=e.tags,u=e.url,l=e.parentTypes,h=e.childrenTypes,f=e.definedAttributes,p=e.isContainer,d=e.displayType,m=e.workflowDirection,y=e.linkModel,g=e.defaultWidth,v=e.defaultHeight,_=e.minWidth,b=e.minHeight,w=e.reservedWidth,x=e.reservedHeight,k=e.margin,T=e.gap;this.type=n||null,this.icon=r||null,this.model=i||null,this.displayName=o||null,this.description=s||null,this.categories=a||[],this.tags=c||[],this.url=u||null,this.parentTypes=l||[],this.childrenTypes=h||[],this.definedAttributes=f||[],this.isContainer=void 0!==p&&p,this.displayType=d||null,this.workflowDirection=m||"horizontal",this.linkModel=y||null,this.defaultWidth=g||0,this.defaultHeight=v||0,this.minWidth=_||0,this.minHeight=b||0,this.reservedWidth=w||0,this.reservedHeight=x||0,this.margin=k||10,this.gap=T||30}));const x=w;function k(t){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},k(t)}function T(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function S(t,e,n){return(e=E(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function E(t){var e=function(t,e){if("object"!=k(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=k(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==k(e)?e:e+""}var A=function(t,e,n){return Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{name:null,type:null,displayName:null,description:null,tags:[],url:null,linkType:null,linkRef:[],linkModel:null,containerRef:null,required:!1,definedAttributes:[],rules:{values:null,min:null,max:null,regex:null}};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=e.name,r=e.type,i=e.displayName,o=e.description,s=e.tags,a=e.url,c=e.linkType,u=e.linkRef,l=e.linkModel,h=e.containerRef,f=e.definedAttributes,p=e.required,d=e.rules;this.name=n||null,this.type=r||null,this.displayName=i||null,this.description=o||null,this.tags=s||[],this.url=a||null,this.linkType=c||null,this.linkRef=u||[],this.linkModel=l||null,this.containerRef=h||null,this.definedAttributes=f||[],this.required=p||!1,this.rules=function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{source:null,target:null,name:null,definition:null,isReverse:!1};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t=C(this,e);var r=n.source,i=n.target,o=n.name,s=n.definition,a=n.isReverse;return t.__class="Link",t.source=r||null,t.target=i||null,t.name=o||null,t.definition=s||null,t.isReverse=!!a,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&P(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(l);const M=I;var D=function(t,e,n){return Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{attributeRef:null,sourceRef:null,targetRef:null,type:null,model:null,isTemporary:!1};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=e.attributeRef,r=e.sourceRef,i=e.targetRef,o=e.type,s=e.model,a=e.isTemporary;this.attributeRef=n||null,this.sourceRef=r||null,this.targetRef=i||null,this.type=o||null,this.model=s||null,this.isTemporary=!!a}));const j=D;function B(t){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},B(t)}function F(t,e,n){return e=z(e),function(t,e){if(e&&("object"==B(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,U()?Reflect.construct(e,n||[],z(t).constructor):e.apply(t,n))}function U(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(U=function(){return!!t})()}function z(t){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},z(t)}function V(t,e){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},V(t,e)}var K=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{path:null,name:null,content:null};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t=F(this,e,[n]);var r=n.content;return t.content=r||null,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&V(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(l);const H=K;function q(t,e){return null==t||null==e?NaN:te?1:t>=e?0:NaN}function W(t,e){return null==t||null==e?NaN:et?1:e>=t?0:NaN}function G(t){let e,n,r;function i(t,r,i=0,o=t.length){if(i>>1;n(t[e],r)<0?i=e+1:o=e}while(iq(t(e),n),r=(e,n)=>t(e)-n):(e=t===q||t===W?t:Y,n=t,r=t),{left:i,center:function(t,e,n=0,o=t.length){const s=i(t,e,n,o-1);return s>n&&r(t[s-1],e)>-r(t[s],e)?s-1:s},right:function(t,r,i=0,o=t.length){if(i>>1;n(t[e],r)<=0?i=e+1:o=e}while(i=0))throw new RangeError("invalid r");let n=t.length;if(!((n=Math.floor(n))>=0))throw new RangeError("invalid length");if(!n||!e)return t;const r=at(e),i=t.slice();return r(t,i,0,n,1),r(i,t,0,n,1),r(t,i,0,n,1),t}const nt=it(at),rt=it((function(t){const e=at(t);return(t,n,r,i,o)=>{e(t,n,0+(r<<=2),0+(i<<=2),o<<=2),e(t,n,r+1,i+1,o),e(t,n,r+2,i+2,o),e(t,n,r+3,i+3,o)}}));function it(t){return function(e,n,r=n){if(!((n=+n)>=0))throw new RangeError("invalid rx");if(!((r=+r)>=0))throw new RangeError("invalid ry");let{data:i,width:o,height:s}=e;if(!((o=Math.floor(o))>=0))throw new RangeError("invalid width");if(!((s=Math.floor(void 0!==s?s:i.length/o))>=0))throw new RangeError("invalid height");if(!o||!s||!n&&!r)return e;const a=n&&t(n),c=r&&t(r),u=i.slice();return a&&c?(ot(a,u,i,o,s),ot(a,i,u,o,s),ot(a,u,i,o,s),st(c,i,u,o,s),st(c,u,i,o,s),st(c,i,u,o,s)):a?(ot(a,i,u,o,s),ot(a,u,i,o,s),ot(a,i,u,o,s)):c&&(st(c,i,u,o,s),st(c,u,i,o,s),st(c,i,u,o,s)),e}}function ot(t,e,n,r,i){for(let o=0,s=r*i;o{if(!((o-=s)>=i))return;let a=t*r[i];const c=s*t;for(let t=i,e=i+c;t{if(!((s-=a)>=o))return;let c=e*i[o];const u=a*e,l=u+a;for(let t=o,e=o+u;t=e&&++n;else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(i=+i)>=i&&++n}return n}function ut(t){return 0|t.length}function lt(t){return!(t>0)}function ht(t){return"object"!=typeof t||"length"in t?t:Array.from(t)}function ft(...t){const e="function"==typeof t[t.length-1]&&function(t){return e=>t(...e)}(t.pop()),n=(t=t.map(ht)).map(ut),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(lt))return o;for(;;){o.push(i.map(((e,n)=>t[n][e])));let s=r;for(;++i[s]===n[s];){if(0===s)return e?o.map(e):o;i[s--]=0}}}function pt(t,e){var n=0,r=0;return Float64Array.from(t,void 0===e?t=>n+=+t||0:i=>n+=+e(i,r++,t)||0)}function dt(t,e){let n,r=0,i=0,o=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(n=e-i,i+=n/++r,o+=n*(e-i));else{let s=-1;for(let a of t)null!=(a=e(a,++s,t))&&(a=+a)>=a&&(n=a-i,i+=n/++r,o+=n*(a-i))}if(r>1)return o/(r-1)}function mt(t,e){const n=dt(t,e);return n?Math.sqrt(n):n}function yt(t,e){let n,r;if(void 0===e)for(const e of t)null!=e&&(void 0===n?e>=e&&(n=r=e):(n>e&&(n=e),r=o&&(n=r=o):(n>o&&(n=o),r0){for(o=t[--i];i>0&&(e=o,n=t[--i],o=e+n,r=n-(o-e),!r););i>0&&(r<0&&t[i-1]<0||r>0&&t[i-1]>0)&&(n=2*r,e=o+n,n==e-o&&(o=e))}return o}}function vt(t,e){const n=new gt;if(void 0===e)for(let e of t)(e=+e)&&n.add(e);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&n.add(i)}return+n}function _t(t,e){const n=new gt;let r=-1;return Float64Array.from(t,void 0===e?t=>n.add(+t||0):i=>n.add(+e(i,++r,t)||0))}class bt extends Map{constructor(t,e=St){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(xt(this,t))}has(t){return super.has(xt(this,t))}set(t,e){return super.set(kt(this,t),e)}delete(t){return super.delete(Tt(this,t))}}class wt extends Set{constructor(t,e=St){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const e of t)this.add(e)}has(t){return super.has(xt(this,t))}add(t){return super.add(kt(this,t))}delete(t){return super.delete(Tt(this,t))}}function xt({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function kt({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function Tt({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function St(t){return null!==t&&"object"==typeof t?t.valueOf():t}function Et(t){return t}function At(t,...e){return jt(t,Et,Et,e)}function Ot(t,...e){return jt(t,Array.from,Et,e)}function Nt(t,e){for(let n=1,r=e.length;nt.pop().map((([e,n])=>[...t,e,n]))));return t}function Ct(t,...e){return Nt(Ot(t,...e),e)}function Lt(t,e,...n){return Nt(Pt(t,e,...n),n)}function Rt(t,e,...n){return jt(t,Et,e,n)}function Pt(t,e,...n){return jt(t,Array.from,e,n)}function It(t,...e){return jt(t,Et,Dt,e)}function Mt(t,...e){return jt(t,Array.from,Dt,e)}function Dt(t){if(1!==t.length)throw new Error("duplicate key");return t[0]}function jt(t,e,n,r){return function t(i,o){if(o>=r.length)return n(i);const s=new bt,a=r[o++];let c=-1;for(const t of i){const e=a(t,++c,i),n=s.get(e);n?n.push(t):s.set(e,[t])}for(const[e,n]of s)s.set(e,t(n,o));return e(s)}(t,0)}function Bt(t,e){return Array.from(e,(e=>t[e]))}function Ft(t,...e){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&2!==n.length||e.length>1){const r=Uint32Array.from(t,((t,e)=>e));return e.length>1?(e=e.map((e=>t.map(e))),r.sort(((t,n)=>{for(const r of e){const e=zt(r[t],r[n]);if(e)return e}}))):(n=t.map(n),r.sort(((t,e)=>zt(n[t],n[e])))),Bt(t,r)}return t.sort(Ut(n))}function Ut(t=q){if(t===q)return zt;if("function"!=typeof t)throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||0===r?r:(0===t(n,n))-(0===t(e,e))}}function zt(t,e){return(null==t||!(t>=t))-(null==e||!(e>=e))||(te?1:0)}function Vt(t,e,n){return(2!==e.length?Ft(Rt(t,e,n),(([t,e],[n,r])=>q(e,r)||q(t,n))):Ft(At(t,n),(([t,n],[r,i])=>e(n,i)||q(t,r)))).map((([t])=>t))}var Kt=Array.prototype,Ht=Kt.slice;function qt(t){return()=>t}Kt.map;const Wt=Math.sqrt(50),Gt=Math.sqrt(10),Yt=Math.sqrt(2);function $t(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),s=o>=Wt?10:o>=Gt?5:o>=Yt?2:1;let a,c,u;return i<0?(u=Math.pow(10,-i)/s,a=Math.round(t*u),c=Math.round(e*u),a/ue&&--c,u=-u):(u=Math.pow(10,i)*s,a=Math.round(t/u),c=Math.round(e/u),a*ue&&--c),c0))return[];if((t=+t)==(e=+e))return[t];const r=e=i))return[];const a=o-i+1,c=new Array(a);if(r)if(s<0)for(let t=0;t0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}function te(t){return Math.max(1,Math.ceil(Math.log(ct(t))/Math.LN2)+1)}function ee(){var t=Et,e=yt,n=te;function r(r){Array.isArray(r)||(r=Array.from(r));var i,o,s,a=r.length,c=new Array(a);for(i=0;i=h)if(t>=h&&e===yt){const t=Zt(l,h,n);isFinite(t)&&(t>0?h=(Math.floor(h/t)+1)*t:t<0&&(h=(Math.ceil(h*-t)+1)/-t))}else f.pop()}for(var p=f.length,d=0,m=p;f[d]<=l;)++d;for(;f[m-1]>h;)--m;(d||m0?f[i-1]:l,y.x1=i0)for(i=0;i=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n=i)&&(n=i)}return n}function re(t,e){let n,r=-1,i=-1;if(void 0===e)for(const e of t)++i,null!=e&&(n=e)&&(n=e,r=i);else for(let o of t)null!=(o=e(o,++i,t))&&(n=o)&&(n=o,r=i);return r}function ie(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function oe(t,e){let n,r=-1,i=-1;if(void 0===e)for(const e of t)++i,null!=e&&(n>e||void 0===n&&e>=e)&&(n=e,r=i);else for(let o of t)null!=(o=e(o,++i,t))&&(n>o||void 0===n&&o>=o)&&(n=o,r=i);return r}function se(t,e,n=0,r=1/0,i){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=void 0===i?zt:Ut(i);r>n;){if(r-n>600){const o=r-n+1,s=e-n+1,a=Math.log(o),c=.5*Math.exp(2*a/3),u=.5*Math.sqrt(a*c*(o-c)/o)*(s-o/2<0?-1:1);se(t,e,Math.max(n,Math.floor(e-s*c/o+u)),Math.min(r,Math.floor(e+(o-s)*c/o+u)),i)}const o=t[e];let s=n,a=r;for(ae(t,n,e),i(t[r],o)>0&&ae(t,n,r);s0;)--a}0===i(t[n],o)?ae(t,n,a):(++a,ae(t,a,r)),a<=e&&(n=a+1),e<=a&&(r=a-1)}return t}function ae(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function ce(t,e=q){let n,r=!1;if(1===e.length){let i;for(const o of t){const t=e(o);(r?q(t,i)>0:0===q(t,t))&&(n=o,i=t,r=!0)}}else for(const i of t)(r?e(i,n)>0:0===e(i,i))&&(n=i,r=!0);return n}function ue(t,e,n){if(t=Float64Array.from(function*(t,e){if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(yield e);else{let n=-1;for(let r of t)null!=(r=e(r,++n,t))&&(r=+r)>=r&&(yield r)}}(t,n)),(r=t.length)&&!isNaN(e=+e)){if(e<=0||r<2)return ie(t);if(e>=1)return ne(t);var r,i=(r-1)*e,o=Math.floor(i),s=ne(se(t,o).subarray(0,o+1));return s+(ie(t.subarray(o+1))-s)*(i-o)}}function le(t,e,n=$){if((r=t.length)&&!isNaN(e=+e)){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),s=+n(t[o],o,t);return s+(+n(t[o+1],o+1,t)-s)*(i-o)}}function he(t,e,n=$){if(!isNaN(e=+e)){if(r=Float64Array.from(t,((e,r)=>$(n(t[r],r,t)))),e<=0)return oe(r);if(e>=1)return re(r);var r,i=Uint32Array.from(t,((t,e)=>e)),o=r.length-1,s=Math.floor(o*e);return se(i,s,0,o,((t,e)=>zt(r[t],r[e]))),(s=ce(i.subarray(0,s+1),(t=>r[t])))>=0?s:-1}}function fe(t,e,n){const r=ct(t),i=ue(t,.75)-ue(t,.25);return r&&i?Math.ceil((n-e)/(2*i*Math.pow(r,-1/3))):1}function pe(t,e,n){const r=ct(t),i=mt(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}function de(t,e){let n=0,r=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(++n,r+=e);else{let i=-1;for(let o of t)null!=(o=e(o,++i,t))&&(o=+o)>=o&&(++n,r+=o)}if(n)return r/n}function me(t,e){return ue(t,.5,e)}function ye(t,e){return he(t,.5,e)}function ge(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function ve(t,e){const n=new bt;if(void 0===e)for(let e of t)null!=e&&e>=e&&n.set(e,(n.get(e)||0)+1);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&i>=i&&n.set(i,(n.get(i)||0)+1)}let r,i=0;for(const[t,e]of n)e>i&&(i=e,r=t);return r}function _e(t,e=be){const n=[];let r,i=!1;for(const o of t)i&&n.push(e(r,o)),r=o,i=!0;return n}function be(t,e){return[t,e]}function we(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(i);++re(n[t],n[r]);let o,s;return t=Uint32Array.from(n,((t,e)=>e)),t.sort(e===q?(t,e)=>zt(n[t],n[e]):Ut(i)),t.forEach(((t,e)=>{const n=i(t,void 0===o?t:o);n>=0?((void 0===o||n>0)&&(o=t,s=e),r[t]=s):r[t]=NaN})),r}function ke(t,e=q){let n,r=!1;if(1===e.length){let i;for(const o of t){const t=e(o);(r?q(t,i)<0:0===q(t,t))&&(n=o,i=t,r=!0)}}else for(const i of t)(r?e(i,n)<0:0===e(i,i))&&(n=i,r=!0);return n}function Te(t,e=q){if(1===e.length)return oe(t,e);let n,r=-1,i=-1;for(const o of t)++i,(r<0?0===e(o,o):e(o,n)<0)&&(n=o,r=i);return r}function Se(t,e=q){if(1===e.length)return re(t,e);let n,r=-1,i=-1;for(const o of t)++i,(r<0?0===e(o,o):e(o,n)>0)&&(n=o,r=i);return r}function Ee(t,e){const n=Te(t,e);return n<0?void 0:n}const Ae=Oe(Math.random);function Oe(t){return function(e,n=0,r=e.length){let i=r-(n=+n);for(;i;){const r=t()*i--|0,o=e[i+n];e[i+n]=e[r+n],e[r+n]=o}return e}}function Ne(t,e){let n=0;if(void 0===e)for(let e of t)(e=+e)&&(n+=e);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function Ce(t){if(!(i=t.length))return[];for(var e=-1,n=ie(t,Le),r=new Array(n);++ee(n,r,t)))}function je(t,e,n){if("function"!=typeof e)throw new TypeError("reducer is not a function");const r=t[Symbol.iterator]();let i,o,s=-1;if(arguments.length<3){if(({done:i,value:n}=r.next()),i)return;++s}for(;({done:i,value:o}=r.next()),!i;)n=e(n,o,++s,t);return n}function Be(t){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");return Array.from(t).reverse()}function Fe(t,...e){t=new wt(t);for(const n of e)for(const e of n)t.delete(e);return t}function Ue(t,e){const n=e[Symbol.iterator](),r=new wt;for(const e of t){if(r.has(e))return!1;let t,i;for(;({value:t,done:i}=n.next())&&!i;){if(Object.is(e,t))return!1;r.add(t)}}return!0}function ze(t,...e){t=new wt(t),e=e.map(Ve);t:for(const n of t)for(const r of e)if(!r.has(n)){t.delete(n);continue t}return t}function Ve(t){return t instanceof wt?t:new wt(t)}function Ke(t,e){const n=t[Symbol.iterator](),r=new Set;for(const t of e){const e=He(t);if(r.has(e))continue;let i,o;for(;({value:i,done:o}=n.next());){if(o)return!1;const t=He(i);if(r.add(t),Object.is(e,t))break}}return!0}function He(t){return null!==t&&"object"==typeof t?t.valueOf():t}function qe(t,e){return Ke(e,t)}function We(...t){const e=new wt;for(const n of t)for(const t of n)e.add(t);return e}function Ge(t){return t}var Ye=1,$e=2,Xe=3,Ze=4,Je=1e-6;function Qe(t){return"translate("+t+",0)"}function tn(t){return"translate(0,"+t+")"}function en(t){return e=>+t(e)}function nn(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function rn(){return!this.__axis}function on(t,e){var n=[],r=null,i=null,o=6,s=6,a=3,c="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,u=t===Ye||t===Ze?-1:1,l=t===Ze||t===$e?"x":"y",h=t===Ye||t===Xe?Qe:tn;function f(f){var p=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,d=null==i?e.tickFormat?e.tickFormat.apply(e,n):Ge:i,m=Math.max(o,0)+a,y=e.range(),g=+y[0]+c,v=+y[y.length-1]+c,_=(e.bandwidth?nn:en)(e.copy(),c),b=f.selection?f.selection():f,w=b.selectAll(".domain").data([null]),x=b.selectAll(".tick").data(p,e).order(),k=x.exit(),T=x.enter().append("g").attr("class","tick"),S=x.select("line"),E=x.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(T),S=S.merge(T.append("line").attr("stroke","currentColor").attr(l+"2",u*o)),E=E.merge(T.append("text").attr("fill","currentColor").attr(l,u*m).attr("dy",t===Ye?"0em":t===Xe?"0.71em":"0.32em")),f!==b&&(w=w.transition(f),x=x.transition(f),S=S.transition(f),E=E.transition(f),k=k.transition(f).attr("opacity",Je).attr("transform",(function(t){return isFinite(t=_(t))?h(t+c):this.getAttribute("transform")})),T.attr("opacity",Je).attr("transform",(function(t){var e=this.parentNode.__axis;return h((e&&isFinite(e=e(t))?e:_(t))+c)}))),k.remove(),w.attr("d",t===Ze||t===$e?s?"M"+u*s+","+g+"H"+c+"V"+v+"H"+u*s:"M"+c+","+g+"V"+v:s?"M"+g+","+u*s+"V"+c+"H"+v+"V"+u*s:"M"+g+","+c+"H"+v),x.attr("opacity",1).attr("transform",(function(t){return h(_(t)+c)})),S.attr(l+"2",u*o),E.attr(l,u*m).text(d),b.filter(rn).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===$e?"start":t===Ze?"end":"middle"),b.each((function(){this.__axis=_}))}return f.scale=function(t){return arguments.length?(e=t,f):e},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),f):n.slice()},f.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),f):r&&r.slice()},f.tickFormat=function(t){return arguments.length?(i=t,f):i},f.tickSize=function(t){return arguments.length?(o=s=+t,f):o},f.tickSizeInner=function(t){return arguments.length?(o=+t,f):o},f.tickSizeOuter=function(t){return arguments.length?(s=+t,f):s},f.tickPadding=function(t){return arguments.length?(a=+t,f):a},f.offset=function(t){return arguments.length?(c=+t,f):c},f}function sn(t){return on(Ye,t)}function an(t){return on($e,t)}function cn(t){return on(Xe,t)}function un(t){return on(Ze,t)}var ln={value:()=>{}};function hn(){for(var t,e=0,n=arguments.length,r={};e=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),s=-1,a=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++s0)for(var n,r,i=new Array(n),o=0;oe?1:t>=e?0:NaN}On.prototype={constructor:On,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var In="http://www.w3.org/1999/xhtml";const Mn={svg:"http://www.w3.org/2000/svg",xhtml:In,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Dn(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Mn.hasOwnProperty(e)?{space:Mn[e],local:t}:t}function jn(t){return function(){this.removeAttribute(t)}}function Bn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Fn(t,e){return function(){this.setAttribute(t,e)}}function Un(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function zn(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Vn(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Kn(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Hn(t){return function(){this.style.removeProperty(t)}}function qn(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Wn(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Gn(t,e){return t.style.getPropertyValue(e)||Kn(t).getComputedStyle(t,null).getPropertyValue(e)}function Yn(t){return function(){delete this[t]}}function $n(t,e){return function(){this[t]=e}}function Xn(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Zn(t){return t.trim().split(/^|\s+/)}function Jn(t){return t.classList||new Qn(t)}function Qn(t){this._node=t,this._names=Zn(t.getAttribute("class")||"")}function tr(t,e){for(var n=Jn(t),r=-1,i=e.length;++r=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Sr=[null];function Er(t,e){this._groups=t,this._parents=e}function Ar(){return new Er([[document.documentElement]],Sr)}Er.prototype=Ar.prototype={constructor:Er,select:function(t){"function"!=typeof t&&(t=gn(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i=w&&(w=b+1);!(_=g[w])&&++w=0;)(r=i[o])&&(s&&4^r.compareDocumentPosition(s)&&s.parentNode.insertBefore(r,s),s=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Pn);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o1?this.each((null==e?Hn:"function"==typeof e?Wn:qn)(t,e,null==n?"":n)):Gn(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Yn:"function"==typeof e?Xn:$n)(t,e)):this.node()[t]},classed:function(t,e){var n=Zn(t+"");if(arguments.length<2){for(var r=Jn(this.node()),i=-1,o=n.length;++i=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),s=o.length;if(!(arguments.length<2)){for(a=e?wr:br,r=0;r>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?ni(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?ni(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=qr.exec(t))?new oi(e[1],e[2],e[3],1):(e=Wr.exec(t))?new oi(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Gr.exec(t))?ni(e[1],e[2],e[3],e[4]):(e=Yr.exec(t))?ni(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=$r.exec(t))?hi(e[1],e[2]/100,e[3]/100,1):(e=Xr.exec(t))?hi(e[1],e[2]/100,e[3]/100,e[4]):Zr.hasOwnProperty(t)?ei(Zr[t]):"transparent"===t?new oi(NaN,NaN,NaN,0):null}function ei(t){return new oi(t>>16&255,t>>8&255,255&t,1)}function ni(t,e,n,r){return r<=0&&(t=e=n=NaN),new oi(t,e,n,r)}function ri(t){return t instanceof Br||(t=ti(t)),t?new oi((t=t.rgb()).r,t.g,t.b,t.opacity):new oi}function ii(t,e,n,r){return 1===arguments.length?ri(t):new oi(t,e,n,null==r?1:r)}function oi(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function si(){return`#${li(this.r)}${li(this.g)}${li(this.b)}`}function ai(){const t=ci(this.opacity);return`${1===t?"rgb(":"rgba("}${ui(this.r)}, ${ui(this.g)}, ${ui(this.b)}${1===t?")":`, ${t})`}`}function ci(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ui(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function li(t){return((t=ui(t))<16?"0":"")+t.toString(16)}function hi(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new di(t,e,n,r)}function fi(t){if(t instanceof di)return new di(t.h,t.s,t.l,t.opacity);if(t instanceof Br||(t=ti(t)),!t)return new di;if(t instanceof di)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),s=NaN,a=o-i,c=(o+i)/2;return a?(s=e===o?(n-r)/a+6*(n0&&c<1?0:s,new di(s,a,c,t.opacity)}function pi(t,e,n,r){return 1===arguments.length?fi(t):new di(t,e,n,null==r?1:r)}function di(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function mi(t){return(t=(t||0)%360)<0?t+360:t}function yi(t){return Math.max(0,Math.min(1,t||0))}function gi(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function vi(t,e,n,r,i){var o=t*t,s=o*t;return((1-3*t+3*o-s)*e+(4-6*o+3*s)*n+(1+3*t+3*o-3*s)*r+s*i)/6}function _i(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],s=r>0?t[r-1]:2*i-o,a=r=240?t-240:t+120,i,r),gi(t,i,r),gi(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new di(mi(this.h),yi(this.s),yi(this.l),ci(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=ci(this.opacity);return`${1===t?"hsl(":"hsla("}${mi(this.h)}, ${100*yi(this.s)}%, ${100*yi(this.l)}%${1===t?")":`, ${t})`}`}}));const wi=t=>()=>t;function xi(t,e){return function(n){return t+n*e}}function ki(t,e){var n=e-t;return n?xi(t,n>180||n<-180?n-360*Math.round(n/360):n):wi(isNaN(t)?e:t)}function Ti(t,e){var n=e-t;return n?xi(t,n):wi(isNaN(t)?e:t)}const Si=function t(e){var n=function(t){return 1==(t=+t)?Ti:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):wi(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=ii(t)).r,(e=ii(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),s=Ti(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=s(e),t+""}}return r.gamma=t,r}(1);function Ei(t){return function(e){var n,r,i=e.length,o=new Array(i),s=new Array(i),a=new Array(i);for(n=0;no&&(i=e.slice(o,i),a[s]?a[s]+=i:a[++s]=i),(n=n[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,c.push({i:s,x:Ii(n,r)})),o=ji.lastIndex;return o=0&&e._call.call(void 0,t),e=e._next;--Hi}function io(){$i=(Yi=Zi.now())+Xi,Hi=qi=0;try{ro()}finally{Hi=0,function(){for(var t,e,n=Vi,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Vi=e);Ki=t,so(r)}(),$i=0}}function oo(){var t=Zi.now(),e=t-Yi;e>Gi&&(Xi-=e,Yi=t)}function so(t){Hi||(qi&&(qi=clearTimeout(qi)),t-$i>24?(t<1/0&&(qi=setTimeout(io,t-Zi.now()-Xi)),Wi&&(Wi=clearInterval(Wi))):(Wi||(Yi=Zi.now(),Wi=setInterval(oo,Gi)),Hi=1,Ji(io)))}function ao(t,e,n){var r=new eo;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}eo.prototype=no.prototype={constructor:eo,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Qi():+n)+(null==e?0:+e),this._next||Ki===this||(Ki?Ki._next=this:Vi=this,Ki=this),this._call=t,this._time=n,so()},stop:function(){this._call&&(this._call=null,this._time=1/0,so())}};var co=mn("start","end","cancel","interrupt"),uo=[],lo=0,ho=1,fo=2,po=3,mo=5,yo=6;function go(t,e,n,r,i,o){var s=t.__transition;if(s){if(n in s)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(c){var u,l,h,f;if(n.state!==ho)return a();for(u in i)if((f=i[u]).name===n.name){if(f.state===po)return ao(o);4===f.state?(f.state=yo,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[u]):+ulo)throw new Error("too late; already scheduled");return n}function _o(t,e){var n=bo(t,e);if(n.state>po)throw new Error("too late; already running");return n}function bo(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function wo(t,e){var n,r,i,o=t.__transition,s=!0;if(o){for(i in e=null==e?null:e+"",o)(n=o[i]).name===e?(r=n.state>fo&&n.state180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Ii(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,s.rotate,a,c),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Ii(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,s.skewX,a,c),function(t,e,n,r,o,s){if(t!==n||e!==r){var a=o.push(i(o)+"scale(",null,",",null,")");s.push({i:a-4,x:Ii(t,n)},{i:a-2,x:Ii(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,s.scaleX,s.scaleY,a,c),o=s=null,function(t){for(var e,n=-1,r=c.length;++n=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?vo:_o;return function(){var s=o(this,t),a=s.on;a!==r&&(i=(r=a).copy()).on(e,n),s.on=i}}(n,t,e))},attr:function(t,e){var n=Dn(t),r="transform"===n?Oo:Ro;return this.attrTween(t,"function"==typeof e?(n.local?Bo:jo)(n,r,Lo(this,"attr."+t,e)):null==e?(n.local?Io:Po)(n):(n.local?Do:Mo)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=Dn(t);return this.tween(n,(r.local?Fo:Uo)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Ao:Ro;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=Gn(this,t),s=(this.style.removeProperty(t),Gn(this,t));return o===s?null:o===n&&s===r?i:i=e(n=o,r=s)}}(t,r)).on("end.style."+t,Wo(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var s=Gn(this,t),a=n(this),c=a+"";return null==a&&(this.style.removeProperty(t),c=a=Gn(this,t)),s===c?null:s===r&&c===i?o:(i=c,o=e(r=s,a))}}(t,r,Lo(this,"style."+t,e))).each(function(t,e){var n,r,i,o,s="style."+e,a="end."+s;return function(){var c=_o(this,t),u=c.on,l=null==c.value[s]?o||(o=Wo(e)):void 0;u===n&&i===l||(r=(n=u).copy()).on(a,i=l),c.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,o=n+"";return function(){var s=Gn(this,t);return s===o?null:s===r?i:i=e(r=s,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,function(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}(t,o,n)),r}return o._value=e,o}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Lo(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&function(t){return function(e){this.textContent=t.call(this,e)}}(r)),e}return r._value=t,r}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=bo(this.node(),n).tween,o=0,s=i.length;oho&&n.name===e)return new Yo([[t]],rs,e,+r);return null}const os=t=>()=>t;function ss(t,{sourceEvent:e,target:n,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function as(t){t.preventDefault(),t.stopImmediatePropagation()}var cs={name:"drag"},us={name:"space"},ls={name:"handle"},hs={name:"center"};const{abs:fs,max:ps,min:ds}=Math;function ms(t){return[+t[0],+t[1]]}function ys(t){return[ms(t[0]),ms(t[1])]}var gs={name:"x",handles:["w","e"].map(Ss),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},vs={name:"y",handles:["n","s"].map(Ss),input:function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},_s={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Ss),input:function(t){return null==t?null:ys(t)},output:function(t){return t}},bs={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},ws={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},xs={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},ks={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Ts={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Ss(t){return{type:t}}function Es(t){return!t.ctrlKey&&!t.button}function As(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function Os(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ns(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Cs(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function Ls(){return Is(gs)}function Rs(){return Is(vs)}function Ps(){return Is(_s)}function Is(t){var e,n=As,r=Es,i=Os,o=!0,s=mn("start","brush","end"),a=6;function c(e){var n=e.property("__brush",m).selectAll(".overlay").data([Ss("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",bs.overlay).merge(n).each((function(){var t=Ns(this).extent;Nr(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),e.selectAll(".selection").data([Ss("selection")]).enter().append("rect").attr("class","selection").attr("cursor",bs.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return bs[t.type]})),e.each(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(i).on("touchstart.brush",f).on("touchmove.brush",p).on("touchend.brush touchcancel.brush",d).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function u(){var t=Nr(this),e=Ns(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?e[1][0]-a/2:e[0][0]-a/2})).attr("y",(function(t){return"s"===t.type[0]?e[1][1]-a/2:e[0][1]-a/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+a:a})).attr("height",(function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+a:a}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function l(t,e,n){var r=t.__brush.emitter;return!r||n&&r.clean?new h(t,e,n):r}function h(t,e,n){this.that=t,this.args=e,this.state=t.__brush,this.active=0,this.clean=n}function f(n){if((!e||n.touches)&&r.apply(this,arguments)){var i,s,a,c,h,f,p,d,m,y,g,v=this,_=n.target.__data__.type,b="selection"===(o&&n.metaKey?_="overlay":_)?cs:o&&n.altKey?hs:ls,w=t===vs?null:ks[_],x=t===gs?null:Ts[_],k=Ns(v),T=k.extent,S=k.selection,E=T[0][0],A=T[0][1],O=T[1][0],N=T[1][1],C=0,L=0,R=w&&x&&o&&n.shiftKey,P=Array.from(n.touches||[n],(t=>{const e=t.identifier;return(t=zi(t,v)).point0=t.slice(),t.identifier=e,t}));wo(v);var I=l(v,arguments,!0).beforestart();if("overlay"===_){S&&(m=!0);const e=[P[0],P[1]||P[0]];k.selection=S=[[i=t===vs?E:ds(e[0][0],e[1][0]),a=t===gs?A:ds(e[0][1],e[1][1])],[h=t===vs?O:ps(e[0][0],e[1][0]),p=t===gs?N:ps(e[0][1],e[1][1])]],P.length>1&&F(n)}else i=S[0][0],a=S[0][1],h=S[1][0],p=S[1][1];s=i,c=a,f=h,d=p;var M=Nr(v).attr("pointer-events","none"),D=M.selectAll(".overlay").attr("cursor",bs[_]);if(n.touches)I.moved=B,I.ended=U;else{var j=Nr(n.view).on("mousemove.brush",B,!0).on("mouseup.brush",U,!0);o&&j.on("keydown.brush",(function(t){switch(t.keyCode){case 16:R=w&&x;break;case 18:b===ls&&(w&&(h=f-C*w,i=s+C*w),x&&(p=d-L*x,a=c+L*x),b=hs,F(t));break;case 32:b!==ls&&b!==hs||(w<0?h=f-C:w>0&&(i=s-C),x<0?p=d-L:x>0&&(a=c-L),b=us,D.attr("cursor",bs.selection),F(t));break;default:return}as(t)}),!0).on("keyup.brush",(function(t){switch(t.keyCode){case 16:R&&(y=g=R=!1,F(t));break;case 18:b===hs&&(w<0?h=f:w>0&&(i=s),x<0?p=d:x>0&&(a=c),b=ls,F(t));break;case 32:b===us&&(t.altKey?(w&&(h=f-C*w,i=s+C*w),x&&(p=d-L*x,a=c+L*x),b=hs):(w<0?h=f:w>0&&(i=s),x<0?p=d:x>0&&(a=c),b=ls),D.attr("cursor",bs[_]),F(t));break;default:return}as(t)}),!0),Ir(n.view)}u.call(v),I.start(n,b.name)}function B(t){for(const e of t.changedTouches||[t])for(const t of P)t.identifier===e.identifier&&(t.cur=zi(e,v));if(R&&!y&&!g&&1===P.length){const t=P[0];fs(t.cur[0]-t[0])>fs(t.cur[1]-t[1])?g=!0:y=!0}for(const t of P)t.cur&&(t[0]=t.cur[0],t[1]=t.cur[1]);m=!0,as(t),F(t)}function F(t){const e=P[0],n=e.point0;var r;switch(C=e[0]-n[0],L=e[1]-n[1],b){case us:case cs:w&&(C=ps(E-i,ds(O-h,C)),s=i+C,f=h+C),x&&(L=ps(A-a,ds(N-p,L)),c=a+L,d=p+L);break;case ls:P[1]?(w&&(s=ps(E,ds(O,P[0][0])),f=ps(E,ds(O,P[1][0])),w=1),x&&(c=ps(A,ds(N,P[0][1])),d=ps(A,ds(N,P[1][1])),x=1)):(w<0?(C=ps(E-i,ds(O-i,C)),s=i+C,f=h):w>0&&(C=ps(E-h,ds(O-h,C)),s=i,f=h+C),x<0?(L=ps(A-a,ds(N-a,L)),c=a+L,d=p):x>0&&(L=ps(A-p,ds(N-p,L)),c=a,d=p+L));break;case hs:w&&(s=ps(E,ds(O,i-C*w)),f=ps(E,ds(O,h+C*w))),x&&(c=ps(A,ds(N,a-L*x)),d=ps(A,ds(N,p+L*x)))}ft+n))}function Hs(){return Gs(!1,!1)}function qs(){return Gs(!1,!0)}function Ws(){return Gs(!0,!1)}function Gs(t,e){var n=0,r=null,i=null,o=null;function s(s){var a,c=s.length,u=new Array(c),l=Ks(0,c),h=new Array(c*c),f=new Array(c),p=0;s=Float64Array.from({length:c*c},e?(t,e)=>s[e%c][e/c|0]:(t,e)=>s[e/c|0][e%c]);for(let e=0;er(u[t],u[e])));for(const n of l){const r=e;if(t){const t=Ks(1+~c,c).filter((t=>t<0?s[~t*c+n]:s[n*c+t]));i&&t.sort(((t,e)=>i(t<0?-s[~t*c+n]:s[n*c+t],e<0?-s[~e*c+n]:s[n*c+e])));for(const r of t)r<0?(h[~r*c+n]||(h[~r*c+n]={source:null,target:null})).target={index:n,startAngle:e,endAngle:e+=s[~r*c+n]*p,value:s[~r*c+n]}:(h[n*c+r]||(h[n*c+r]={source:null,target:null})).source={index:n,startAngle:e,endAngle:e+=s[n*c+r]*p,value:s[n*c+r]};f[n]={index:n,startAngle:r,endAngle:e,value:u[n]}}else{const t=Ks(0,c).filter((t=>s[n*c+t]||s[t*c+n]));i&&t.sort(((t,e)=>i(s[n*c+t],s[n*c+e])));for(const r of t){let t;if(n=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Js;const n=10**e;return function(t){this._+=t[0];for(let e=1,r=t.length;eXs)if(Math.abs(l*a-c*u)>Xs&&i){let f=n-o,p=r-s,d=a*a+c*c,m=f*f+p*p,y=Math.sqrt(d),g=Math.sqrt(h),v=i*Math.tan((Ys-Math.acos((d+h-m)/(2*y*g)))/2),_=v/g,b=v/y;Math.abs(_-1)>Xs&&this._append`L${t+_*u},${e+_*l}`,this._append`A${i},${i},0,0,${+(l*f>u*p)},${this._x1=t+b*a},${this._y1=e+b*c}`}else this._append`L${this._x1=t},${this._y1=e}`}arc(t,e,n,r,i,o){if(t=+t,e=+e,o=!!o,(n=+n)<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(r),a=n*Math.sin(r),c=t+s,u=e+a,l=1^o,h=o?r-i:i-r;null===this._x1?this._append`M${c},${u}`:(Math.abs(this._x1-c)>Xs||Math.abs(this._y1-u)>Xs)&&this._append`L${c},${u}`,n&&(h<0&&(h=h%$s+$s),h>Zs?this._append`A${n},${n},0,1,${l},${t-s},${e-a}A${n},${n},0,1,${l},${this._x1=c},${this._y1=u}`:h>Xs&&this._append`A${n},${n},0,${+(h>=Ys)},${l},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function ta(){return new Qs}function ea(t=3){return new Qs(+t)}ta.prototype=Qs.prototype;var na=Array.prototype.slice;function ra(t){return function(){return t}}function ia(t){return t.source}function oa(t){return t.target}function sa(t){return t.radius}function aa(t){return t.startAngle}function ca(t){return t.endAngle}function ua(){return 0}function la(){return 10}function ha(t){var e=ia,n=oa,r=sa,i=sa,o=aa,s=ca,a=ua,c=null;function u(){var u,l=e.apply(this,arguments),h=n.apply(this,arguments),f=a.apply(this,arguments)/2,p=na.call(arguments),d=+r.apply(this,(p[0]=l,p)),m=o.apply(this,p)-Fs,y=s.apply(this,p)-Fs,g=+i.apply(this,(p[0]=h,p)),v=o.apply(this,p)-Fs,_=s.apply(this,p)-Fs;if(c||(c=u=ta()),f>Vs&&(Ms(y-m)>2*f+Vs?y>m?(m+=f,y-=f):(m-=f,y+=f):m=y=(m+y)/2,Ms(_-v)>2*f+Vs?_>v?(v+=f,_-=f):(v-=f,_+=f):v=_=(v+_)/2),c.moveTo(d*Ds(m),d*js(m)),c.arc(0,0,d,m,y),m!==v||y!==_)if(t){var b=g-+t.apply(this,arguments),w=(v+_)/2;c.quadraticCurveTo(0,0,b*Ds(v),b*js(v)),c.lineTo(g*Ds(w),g*js(w)),c.lineTo(b*Ds(_),b*js(_))}else c.quadraticCurveTo(0,0,g*Ds(v),g*js(v)),c.arc(0,0,g,v,_);if(c.quadraticCurveTo(0,0,d*Ds(m),d*js(m)),c.closePath(),u)return c=null,u+""||null}return t&&(u.headRadius=function(e){return arguments.length?(t="function"==typeof e?e:ra(+e),u):t}),u.radius=function(t){return arguments.length?(r=i="function"==typeof t?t:ra(+t),u):r},u.sourceRadius=function(t){return arguments.length?(r="function"==typeof t?t:ra(+t),u):r},u.targetRadius=function(t){return arguments.length?(i="function"==typeof t?t:ra(+t),u):i},u.startAngle=function(t){return arguments.length?(o="function"==typeof t?t:ra(+t),u):o},u.endAngle=function(t){return arguments.length?(s="function"==typeof t?t:ra(+t),u):s},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:ra(+t),u):a},u.source=function(t){return arguments.length?(e=t,u):e},u.target=function(t){return arguments.length?(n=t,u):n},u.context=function(t){return arguments.length?(c=null==t?null:t,u):c},u}function fa(){return ha()}function pa(){return ha(la)}const da=Math.PI/180,ma=180/Math.PI,ya=.96422,ga=1,va=.82521,_a=4/29,ba=6/29,wa=3*ba*ba,xa=ba*ba*ba;function ka(t){if(t instanceof Ea)return new Ea(t.l,t.a,t.b,t.opacity);if(t instanceof Ia)return Ma(t);t instanceof oi||(t=ri(t));var e,n,r=Ca(t.r),i=Ca(t.g),o=Ca(t.b),s=Aa((.2225045*r+.7168786*i+.0606169*o)/ga);return r===i&&i===o?e=n=s:(e=Aa((.4360747*r+.3850649*i+.1430804*o)/ya),n=Aa((.0139322*r+.0971045*i+.7141733*o)/va)),new Ea(116*s-16,500*(e-s),200*(s-n),t.opacity)}function Ta(t,e){return new Ea(t,0,0,null==e?1:e)}function Sa(t,e,n,r){return 1===arguments.length?ka(t):new Ea(t,e,n,null==r?1:r)}function Ea(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Aa(t){return t>xa?Math.pow(t,1/3):t/wa+_a}function Oa(t){return t>ba?t*t*t:wa*(t-_a)}function Na(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ca(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function La(t){if(t instanceof Ia)return new Ia(t.h,t.c,t.l,t.opacity);if(t instanceof Ea||(t=ka(t)),0===t.a&&0===t.b)return new Ia(NaN,0()=>t;function $a(t,e){for(var n,r=-1,i=e.length;++rr!=p>r&&n<(f-u)*(r-l)/(p-l)+u&&(i=-i)}return i}function Za(t,e,n){var r,i,o,s;return function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&(i=t[r=+(t[0]===e[0])],o=n[r],s=e[r],i<=o&&o<=s||s<=o&&o<=i)}function Ja(){}var Qa=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function tc(){var t=1,e=1,n=te,r=a;function i(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(Ga);else{const n=yt(t,ec);for(e=Xt(...Qt(n[0],n[1],e),e);e[e.length-1]>=n[1];)e.pop();for(;e[1]o(t,e)))}function o(n,i){const o=null==i?NaN:+i;if(isNaN(o))throw new Error(`invalid value: ${i}`);var a=[],c=[];return function(n,r,i){var o,a,c,u,l,h,f=new Array,p=new Array;for(o=a=-1,u=nc(n[0],r),Qa[u<<1].forEach(d);++o=r,Qa[l<<2].forEach(d);++o0?a.push([t]):c.push(t)})),c.forEach((function(t){for(var e,n=0,r=a.length;n0&&o0&&s=0&&o>=0))throw new Error("invalid size");return t=r,e=o,i},i.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?Ya(Wa.call(t)):Ya(t),i):n},i.smooth=function(t){return arguments.length?(r=t?a:Ja,i):r===a},i}function ec(t){return isFinite(t)?t:NaN}function nc(t,e){return null!=t&&+t>=e}function rc(t){return null==t||isNaN(t=+t)?-1/0:t}function ic(t,e,n,r){const i=r-e,o=n-e,s=isFinite(i)||isFinite(o)?i/o:Math.sign(i)/Math.sign(o);return isNaN(s)?t:t+s-.5}function oc(t){return t[0]}function sc(t){return t[1]}function ac(){return 1}function cc(){var t=oc,e=sc,n=ac,r=960,i=500,o=20,s=2,a=3*o,c=r+2*a>>s,u=i+2*a>>s,l=Ya(20);function h(r){var i=new Float32Array(c*u),l=Math.pow(2,-s),h=-1;for(const o of r){var f=(t(o,++h,r)+a)*l,p=(e(o,h,r)+a)*l,d=+n(o,h,r);if(d&&f>=0&&f=0&&pt*r)))(e).map(((t,e)=>(t.value=+n[e],p(t))))}function p(t){return t.coordinates.forEach(d),t}function d(t){t.forEach(m)}function m(t){t.forEach(y)}function y(t){t[0]=t[0]*Math.pow(2,s)-a,t[1]=t[1]*Math.pow(2,s)-a}function g(){return c=r+2*(a=3*o)>>s,u=i+2*a>>s,f}return f.contours=function(t){var e=h(t),n=tc().size([c,u]),r=Math.pow(2,2*s),i=t=>{t=+t;var i=p(n.contour(e,t*r));return i.value=t,i};return Object.defineProperty(i,"max",{get:()=>ne(e)/r}),i},f.x=function(e){return arguments.length?(t="function"==typeof e?e:Ya(+e),f):t},f.y=function(t){return arguments.length?(e="function"==typeof t?t:Ya(+t),f):e},f.weight=function(t){return arguments.length?(n="function"==typeof t?t:Ya(+t),f):n},f.size=function(t){if(!arguments.length)return[r,i];var e=+t[0],n=+t[1];if(!(e>=0&&n>=0))throw new Error("invalid size");return r=e,i=n,g()},f.cellSize=function(t){if(!arguments.length)return 1<=1))throw new Error("invalid cell size");return s=Math.floor(Math.log(t)/Math.LN2),g()},f.thresholds=function(t){return arguments.length?(l="function"==typeof t?t:Array.isArray(t)?Ya(Wa.call(t)):Ya(t),f):l},f.bandwidth=function(t){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return o=(Math.sqrt(4*t*t+1)-1)/2,g()},f}const uc=134217729;function lc(t,e,n,r,i){let o,s,a,c,u=e[0],l=r[0],h=0,f=0;l>u==l>-u?(o=u,u=e[++h]):(o=l,l=r[++f]);let p=0;if(hu==l>-u?(s=u+o,a=o-(s-u),u=e[++h]):(s=l+o,a=o-(s-l),l=r[++f]),o=s,0!==a&&(i[p++]=a);hu==l>-u?(s=o+u,c=s-o,a=o-(s-c)+(u-c),u=e[++h]):(s=o+l,c=s-o,a=o-(s-c)+(l-c),l=r[++f]),o=s,0!==a&&(i[p++]=a);for(;h=33306690738754716e-32*u?c:-function(t,e,n,r,i,o,s){let a,c,u,l,h,f,p,d,m,y,g,v,_,b,w,x,k,T;const S=t-i,E=n-i,A=e-o,O=r-o;b=S*O,f=uc*S,p=f-(f-S),d=S-p,f=uc*O,m=f-(f-O),y=O-m,w=d*y-(b-p*m-d*m-p*y),x=A*E,f=uc*A,p=f-(f-A),d=A-p,f=uc*E,m=f-(f-E),y=E-m,k=d*y-(x-p*m-d*m-p*y),g=w-k,h=w-g,fc[0]=w-(g+h)+(h-k),v=b+g,h=v-b,_=b-(v-h)+(g-h),g=_-x,h=_-g,fc[1]=_-(g+h)+(h-x),T=v+g,h=T-v,fc[2]=v-(T-h)+(g-h),fc[3]=T;let N=function(t,e){let n=e[0];for(let t=1;t<4;t++)n+=e[t];return n}(0,fc),C=22204460492503146e-32*s;if(N>=C||-N>=C)return N;if(h=t-S,a=t-(S+h)+(h-i),h=n-E,u=n-(E+h)+(h-i),h=e-A,c=e-(A+h)+(h-o),h=r-O,l=r-(O+h)+(h-o),0===a&&0===c&&0===u&&0===l)return N;if(C=11093356479670487e-47*s+33306690738754706e-32*Math.abs(N),N+=S*l+O*a-(A*u+E*c),N>=C||-N>=C)return N;b=a*O,f=uc*a,p=f-(f-a),d=a-p,f=uc*O,m=f-(f-O),y=O-m,w=d*y-(b-p*m-d*m-p*y),x=c*E,f=uc*c,p=f-(f-c),d=c-p,f=uc*E,m=f-(f-E),y=E-m,k=d*y-(x-p*m-d*m-p*y),g=w-k,h=w-g,yc[0]=w-(g+h)+(h-k),v=b+g,h=v-b,_=b-(v-h)+(g-h),g=_-x,h=_-g,yc[1]=_-(g+h)+(h-x),T=v+g,h=T-v,yc[2]=v-(T-h)+(g-h),yc[3]=T;const L=lc(4,fc,4,yc,pc);b=S*l,f=uc*S,p=f-(f-S),d=S-p,f=uc*l,m=f-(f-l),y=l-m,w=d*y-(b-p*m-d*m-p*y),x=A*u,f=uc*A,p=f-(f-A),d=A-p,f=uc*u,m=f-(f-u),y=u-m,k=d*y-(x-p*m-d*m-p*y),g=w-k,h=w-g,yc[0]=w-(g+h)+(h-k),v=b+g,h=v-b,_=b-(v-h)+(g-h),g=_-x,h=_-g,yc[1]=_-(g+h)+(h-x),T=v+g,h=T-v,yc[2]=v-(T-h)+(g-h),yc[3]=T;const R=lc(L,pc,4,yc,dc);b=a*l,f=uc*a,p=f-(f-a),d=a-p,f=uc*l,m=f-(f-l),y=l-m,w=d*y-(b-p*m-d*m-p*y),x=c*u,f=uc*c,p=f-(f-c),d=c-p,f=uc*u,m=f-(f-u),y=u-m,k=d*y-(x-p*m-d*m-p*y),g=w-k,h=w-g,yc[0]=w-(g+h)+(h-k),v=b+g,h=v-b,_=b-(v-h)+(g-h),g=_-x,h=_-g,yc[1]=_-(g+h)+(h-x),T=v+g,h=T-v,yc[2]=v-(T-h)+(g-h),yc[3]=T;const P=lc(R,dc,4,yc,mc);return mc[P-1]}(t,e,n,r,i,o,u)}hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(8),hc(8),hc(8),hc(4),hc(8),hc(8),hc(8),hc(12),hc(192),hc(192),hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(8),hc(8),hc(8),hc(8),hc(8),hc(8),hc(8),hc(8),hc(8),hc(4),hc(4),hc(4),hc(8),hc(16),hc(16),hc(16),hc(32),hc(32),hc(48),hc(64),hc(1152),hc(1152),hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(4),hc(24),hc(24),hc(24),hc(24),hc(24),hc(24),hc(24),hc(24),hc(24),hc(24),hc(1152),hc(1152),hc(1152),hc(1152),hc(1152),hc(2304),hc(2304),hc(3456),hc(5760),hc(8),hc(8),hc(8),hc(16),hc(24),hc(48),hc(48),hc(96),hc(192),hc(384),hc(384),hc(384),hc(768),hc(96),hc(96),hc(96),hc(1152);const vc=Math.pow(2,-52),_c=new Uint32Array(512);class bc{static from(t,e=Ec,n=Ac){const r=t.length,i=new Float64Array(2*r);for(let o=0;o>1;if(e>0&&"number"!=typeof t[0])throw new Error("Expected coords to contain numbers.");this.coords=t;const n=Math.max(2*e-5,0);this._triangles=new Uint32Array(3*n),this._halfedges=new Int32Array(3*n),this._hashSize=Math.ceil(Math.sqrt(e)),this._hullPrev=new Uint32Array(e),this._hullNext=new Uint32Array(e),this._hullTri=new Uint32Array(e),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(e),this._dists=new Float64Array(e),this.update()}update(){const{coords:t,_hullPrev:e,_hullNext:n,_hullTri:r,_hullHash:i}=this,o=t.length>>1;let s=1/0,a=1/0,c=-1/0,u=-1/0;for(let e=0;ec&&(c=n),r>u&&(u=r),this._ids[e]=e}const l=(s+c)/2,h=(a+u)/2;let f,p,d,m=1/0;for(let e=0;e0&&(p=e,m=n)}let v=t[2*p],_=t[2*p+1],b=1/0;for(let e=0;er&&(e[n++]=i,r=this._dists[i])}return this.hull=e.subarray(0,n),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(gc(y,g,v,_,w,x)<0){const t=p,e=v,n=_;p=d,v=w,_=x,d=t,w=e,x=n}const k=function(t,e,n,r,i,o){const s=n-t,a=r-e,c=i-t,u=o-e,l=s*s+a*a,h=c*c+u*u,f=.5/(s*u-a*c);return{x:t+(u*l-a*h)*f,y:e+(s*h-c*l)*f}}(y,g,v,_,w,x);this._cx=k.x,this._cy=k.y;for(let e=0;e0&&Math.abs(u-o)<=vc&&Math.abs(l-s)<=vc)continue;if(o=u,s=l,c===f||c===p||c===d)continue;let h=0;for(let t=0,e=this._hashKey(u,l);t=0;)if(y=m,y===h){y=-1;break}if(-1===y)continue;let g=this._addTriangle(y,c,n[y],-1,-1,r[y]);r[c]=this._legalize(g+2),r[y]=g,T++;let v=n[y];for(;m=n[v],gc(u,l,t[2*v],t[2*v+1],t[2*m],t[2*m+1])<0;)g=this._addTriangle(v,c,m,r[c],-1,r[v]),r[c]=this._legalize(g+2),n[v]=v,T--,v=m;if(y===h)for(;m=e[y],gc(u,l,t[2*m],t[2*m+1],t[2*y],t[2*y+1])<0;)g=this._addTriangle(m,c,y,-1,r[y],r[m]),this._legalize(g+2),r[m]=g,n[y]=y,T--,y=m;this._hullStart=e[c]=y,n[y]=e[v]=c,n[c]=v,i[this._hashKey(u,l)]=c,i[this._hashKey(t[2*y],t[2*y+1])]=y}this.hull=new Uint32Array(T);for(let t=0,e=this._hullStart;t0?3-n:1+n)/4}(t-this._cx,e-this._cy)*this._hashSize)%this._hashSize}_legalize(t){const{_triangles:e,_halfedges:n,coords:r}=this;let i=0,o=0;for(;;){const s=n[t],a=t-t%3;if(o=a+(t+2)%3,-1===s){if(0===i)break;t=_c[--i];continue}const c=s-s%3,u=a+(t+1)%3,l=c+(s+2)%3,h=e[o],f=e[t],p=e[u],d=e[l];if(xc(r[2*h],r[2*h+1],r[2*f],r[2*f+1],r[2*p],r[2*p+1],r[2*d],r[2*d+1])){e[t]=d,e[s]=h;const r=n[l];if(-1===r){let e=this._hullStart;do{if(this._hullTri[e]===l){this._hullTri[e]=t;break}e=this._hullPrev[e]}while(e!==this._hullStart)}this._link(t,r),this._link(s,n[o]),this._link(o,l);const a=c+(s+1)%3;i<_c.length&&(_c[i++]=a)}else{if(0===i)break;t=_c[--i]}}return o}_link(t,e){this._halfedges[t]=e,-1!==e&&(this._halfedges[e]=t)}_addTriangle(t,e,n,r,i,o){const s=this.trianglesLen;return this._triangles[s]=t,this._triangles[s+1]=e,this._triangles[s+2]=n,this._link(s,r),this._link(s+1,i),this._link(s+2,o),this.trianglesLen+=3,s}}function wc(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}function xc(t,e,n,r,i,o,s,a){const c=t-s,u=e-a,l=n-s,h=r-a,f=i-s,p=o-a,d=l*l+h*h,m=f*f+p*p;return c*(h*m-d*p)-u*(l*m-d*f)+(c*c+u*u)*(l*p-h*f)<0}function kc(t,e,n,r,i,o){const s=n-t,a=r-e,c=i-t,u=o-e,l=s*s+a*a,h=c*c+u*u,f=.5/(s*u-a*c),p=(u*l-a*h)*f,d=(s*h-c*l)*f;return p*p+d*d}function Tc(t,e,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){const r=t[i],o=e[r];let s=i-1;for(;s>=n&&e[t[s]]>o;)t[s+1]=t[s--];t[s+1]=r}else{let i=n+1,o=r;Sc(t,n+r>>1,i),e[t[n]]>e[t[r]]&&Sc(t,n,r),e[t[i]]>e[t[r]]&&Sc(t,i,r),e[t[n]]>e[t[i]]&&Sc(t,n,i);const s=t[i],a=e[s];for(;;){do{i++}while(e[t[i]]a);if(o=o-n?(Tc(t,e,i,r),Tc(t,e,n,o-1)):(Tc(t,e,n,o-1),Tc(t,e,i,r))}}function Sc(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Ec(t){return t[0]}function Ac(t){return t[1]}const Oc=1e-6;class Nc{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(t,e){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(t,e){this._+=`L${this._x1=+t},${this._y1=+e}`}arc(t,e,n){const r=(t=+t)+(n=+n),i=e=+e;if(n<0)throw new Error("negative radius");null===this._x1?this._+=`M${r},${i}`:(Math.abs(this._x1-r)>Oc||Math.abs(this._y1-i)>Oc)&&(this._+="L"+r+","+i),n&&(this._+=`A${n},${n},0,1,1,${t-n},${e}A${n},${n},0,1,1,${this._x1=r},${this._y1=i}`)}rect(t,e,n,r){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${+n}v${+r}h${-n}Z`}value(){return this._||null}}class Cc{constructor(){this._=[]}moveTo(t,e){this._.push([t,e])}closePath(){this._.push(this._[0].slice())}lineTo(t,e){this._.push([t,e])}value(){return this._.length?this._:null}}class Lc{constructor(t,[e,n,r,i]=[0,0,960,500]){if(!((r=+r)>=(e=+e)&&(i=+i)>=(n=+n)))throw new Error("invalid bounds");this.delaunay=t,this._circumcenters=new Float64Array(2*t.points.length),this.vectors=new Float64Array(2*t.points.length),this.xmax=r,this.xmin=e,this.ymax=i,this.ymin=n,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:t,hull:e,triangles:n},vectors:r}=this;let i,o;const s=this.circumcenters=this._circumcenters.subarray(0,n.length/3*2);for(let r,a,c=0,u=0,l=n.length;c1;)i-=2;for(let t=2;t0){if(e>=this.ymax)return null;(i=(this.ymax-e)/r)0){if(t>=this.xmax)return null;(i=(this.xmax-t)/n)this.xmax?2:0)|(ethis.ymax?8:0)}_simplify(t){if(t&&t.length>4){for(let e=0;e2&&function(t){const{triangles:e,coords:n}=t;for(let t=0;t1e-10)return!1}return!0}(t)){this.collinear=Int32Array.from({length:e.length/2},((t,e)=>e)).sort(((t,n)=>e[2*t]-e[2*n]||e[2*t+1]-e[2*n+1]));const t=this.collinear[0],n=this.collinear[this.collinear.length-1],r=[e[2*t],e[2*t+1],e[2*n],e[2*n+1]],i=1e-8*Math.hypot(r[3]-r[1],r[2]-r[0]);for(let t=0,n=e.length/2;t0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=r[0],o[r[0]]=1,2===r.length&&(o[r[1]]=0,this.triangles[1]=r[1],this.triangles[2]=r[1]))}voronoi(t){return new Lc(this,t)}*neighbors(t){const{inedges:e,hull:n,_hullIndex:r,halfedges:i,triangles:o,collinear:s}=this;if(s){const e=s.indexOf(t);return e>0&&(yield s[e-1]),void(e=0&&i!==n&&i!==r;)n=i;return i}_step(t,e,n){const{inedges:r,hull:i,_hullIndex:o,halfedges:s,triangles:a,points:c}=this;if(-1===r[t]||!c.length)return(t+1)%(c.length>>1);let u=t,l=Pc(e-c[2*t],2)+Pc(n-c[2*t+1],2);const h=r[t];let f=h;do{let r=a[f];const h=Pc(e-c[2*r],2)+Pc(n-c[2*r+1],2);if(h()=>t;function Fc(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:o,x:s,y:a,dx:c,dy:u,dispatch:l}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:l}})}function Uc(t){return!t.ctrlKey&&!t.button}function zc(){return this.parentNode}function Vc(t,e){return null==e?{x:t.x,y:t.y}:e}function Kc(){return navigator.maxTouchPoints||"ontouchstart"in this}function Hc(){var t,e,n,r,i=Uc,o=zc,s=Vc,a=Kc,c={},u=mn("start","drag","end"),l=0,h=0;function f(t){t.on("mousedown.drag",p).filter(a).on("touchstart.drag",y).on("touchmove.drag",g,Cr).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(s,a){if(!r&&i.call(this,s,a)){var c=_(this,o.call(this,s,a),s,a,"mouse");c&&(Nr(s.view).on("mousemove.drag",d,Lr).on("mouseup.drag",m,Lr),Ir(s.view),Rr(s),n=!1,t=s.clientX,e=s.clientY,c("start",s))}}function d(r){if(Pr(r),!n){var i=r.clientX-t,o=r.clientY-e;n=i*i+o*o>h}c.mouse("drag",r)}function m(t){Nr(t.view).on("mousemove.drag mouseup.drag",null),Mr(t.view,n),Pr(t),c.mouse("end",t)}function y(t,e){if(i.call(this,t,e)){var n,r,s=t.changedTouches,a=o.call(this,t,e),c=s.length;for(n=0;n=o?c=!0:(r=t.charCodeAt(s++))===Yc?u=!0:r===$c&&(u=!0,t.charCodeAt(s)===Yc&&++s),t.slice(i+1,e-1).replace(/""/g,'"')}for(;s9999?"+"+Jc(e,6):Jc(e,4))+"-"+Jc(t.getUTCMonth()+1,2)+"-"+Jc(t.getUTCDate(),2)+(o?"T"+Jc(n,2)+":"+Jc(r,2)+":"+Jc(i,2)+"."+Jc(o,3)+"Z":i?"T"+Jc(n,2)+":"+Jc(r,2)+":"+Jc(i,2)+"Z":r||n?"T"+Jc(n,2)+":"+Jc(r,2)+"Z":"")}(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,o=r(t,(function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=Xc(t);return function(r,i){return e(n(r),i,t)}}(t,e):Xc(t)}));return o.columns=i||[],o},parseRows:r,format:function(e,n){return null==n&&(n=Zc(e)),[n.map(s).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=Zc(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(o).join("\n")},formatRow:o,formatValue:s}}var tu=Qc(","),eu=tu.parse,nu=tu.parseRows,ru=tu.format,iu=tu.formatBody,ou=tu.formatRows,su=tu.formatRow,au=tu.formatValue,cu=Qc("\t"),uu=cu.parse,lu=cu.parseRows,hu=cu.format,fu=cu.formatBody,pu=cu.formatRows,du=cu.formatRow,mu=cu.formatValue;function yu(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;gu&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t}const gu=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),vu=t=>+t;function _u(t){return t*t}function bu(t){return t*(2-t)}function wu(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}var xu=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),ku=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),Tu=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),Su=Math.PI,Eu=Su/2;function Au(t){return 1==+t?1:1-Math.cos(t*Eu)}function Ou(t){return Math.sin(t*Eu)}function Nu(t){return(1-Math.cos(Su*t))/2}function Cu(t){return 1.0009775171065494*(Math.pow(2,-10*t)-.0009765625)}function Lu(t){return Cu(1-+t)}function Ru(t){return 1-Cu(t)}function Pu(t){return((t*=2)<=1?Cu(1-t):2-Cu(t-1))/2}function Iu(t){return 1-Math.sqrt(1-t*t)}function Mu(t){return Math.sqrt(1- --t*t)}function Du(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var ju=4/11,Bu=6/11,Fu=8/11,Uu=3/4,zu=9/11,Vu=10/11,Ku=15/16,Hu=21/22,qu=63/64,Wu=1/ju/ju;function Gu(t){return 1-Yu(1-t)}function Yu(t){return(t=+t)ul(e,n).then((e=>(new DOMParser).parseFromString(e,t)))}const vl=gl("application/xml");var _l=gl("text/html"),bl=gl("image/svg+xml");function wl(t,e){var n,r=1;function i(){var i,o,s=n.length,a=0,c=0;for(i=0;i=(o=(m+g)/2))?m=o:g=o,(l=n>=(s=(y+v)/2))?y=s:v=s,i=p,!(p=p[h=l<<1|u]))return i[h]=d,t;if(a=+t._x.call(null,p.data),c=+t._y.call(null,p.data),e===a&&n===c)return d.next=p,i?i[h]=d:t._root=d,t;do{i=i?i[h]=new Array(4):t._root=new Array(4),(u=e>=(o=(m+g)/2))?m=o:g=o,(l=n>=(s=(y+v)/2))?y=s:v=s}while((h=l<<1|u)==(f=(c>=s)<<1|a>=o));return i[f]=p,i[h]=d,t}function kl(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function Tl(t){return t[0]}function Sl(t){return t[1]}function El(t,e,n){var r=new Al(null==e?Tl:e,null==n?Sl:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Al(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function Ol(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Nl=El.prototype=Al.prototype;function Cl(t){return function(){return t}}function Ll(t){return 1e-6*(t()-.5)}function Rl(t){return t.x+t.vx}function Pl(t){return t.y+t.vy}function Il(t){var e,n,r,i=1,o=1;function s(){for(var t,s,c,u,l,h,f,p=e.length,d=0;du+d||ol+d||sc.index){var m=u-a.x-a.vx,y=l-a.y-a.vy,g=m*m+y*y;gt.r&&(t.r=t[e].r)}function c(){if(e){var r,i,o=e.length;for(n=new Array(o),r=0;r[a(t,e,r),t])));for(s=0,i=new Array(u);sl&&(l=r),ih&&(h=i));if(c>l||u>h)return this;for(this.cover(c,u).cover(l,h),n=0;nt||t>=i||r>e||e>=o;)switch(a=(ef||(o=c.y0)>p||(s=c.x1)=g)<<1|t>=y)&&(c=d[d.length-1],d[d.length-1]=d[d.length-1-u],d[d.length-1-u]=c)}else{var v=t-+this._x.call(null,m.data),_=e-+this._y.call(null,m.data),b=v*v+_*_;if(b=(a=(d+y)/2))?d=a:y=a,(l=s>=(c=(m+g)/2))?m=c:g=c,e=p,!(p=p[h=l<<1|u]))return this;if(!p.length)break;(e[h+1&3]||e[h+2&3]||e[h+3&3])&&(n=e,f=h)}for(;p.data!==t;)if(r=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.next,this):e?(i?e[h]=i:delete e[h],(p=e[0]||e[1]||e[2]||e[3])&&p===(e[3]||e[2]||e[1]||e[0])&&!p.length&&(n?n[f]=p:this._root=p),this):(this._root=i,this)},Nl.removeAll=function(t){for(var e=0,n=t.length;e(t=(Bl*t+Fl)%Ul)/Ul}();function h(){f(),u.call("tick",e),n1?(null==n?a.delete(t):a.set(t,d(n)),e):a.get(t)},find:function(e,n,r){var i,o,s,a,c,u=0,l=t.length;for(null==r?r=1/0:r*=r,u=0;u1?(u.on(t,n),e):u.on(t)}}}function Wl(){var t,e,n,r,i,o=Cl(-30),s=1,a=1/0,c=.81;function u(n){var i,o=t.length,s=El(t,zl,Vl).visitAfter(h);for(r=n,i=0;i=a)){(t.data!==e||t.next)&&(0===h&&(d+=(h=Ll(n))*h),0===f&&(d+=(f=Ll(n))*f),d1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Zl(t){return(t=Xl(Math.abs(t)))?t[1]:NaN}var Jl,Ql=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function th(t){if(!(e=Ql.exec(t)))throw new Error("invalid format: "+t);var e;return new eh({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function eh(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function nh(t,e){var n=Xl(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}th.prototype=eh.prototype,eh.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const rh={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>nh(100*t,e),r:nh,s:function(t,e){var n=Xl(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Jl=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,s=r.length;return o===s?r:o>s?r+new Array(o-s+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Xl(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function ih(t){return t}var oh,sh,ah,ch=Array.prototype.map,uh=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function lh(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?ih:(e=ch.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,o=[],s=0,a=e[0],c=0;i>0&&a>0&&(c+a+1>r&&(a=Math.max(1,r-c)),o.push(t.substring(i-=a,i+a)),!((c+=a+1)>r));)a=e[s=(s+1)%e.length];return o.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",s=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?ih:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(ch.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"−":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=th(t)).fill,n=t.align,h=t.sign,f=t.symbol,p=t.zero,d=t.width,m=t.comma,y=t.precision,g=t.trim,v=t.type;"n"===v?(m=!0,v="g"):rh[v]||(void 0===y&&(y=12),g=!0,v="g"),(p||"0"===e&&"="===n)&&(p=!0,e="0",n="=");var _="$"===f?i:"#"===f&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",b="$"===f?o:/[%p]/.test(v)?c:"",w=rh[v],x=/[defgprs%]/.test(v);function k(t){var i,o,c,f=_,k=b;if("c"===v)k=w(t)+k,t="";else{var T=(t=+t)<0||1/t<0;if(t=isNaN(t)?l:w(Math.abs(t),y),g&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),T&&0==+t&&"+"!==h&&(T=!1),f=(T?"("===h?h:u:"-"===h||"("===h?"":h)+f,k=("s"===v?uh[8+Jl/3]:"")+k+(T&&"("===h?")":""),x)for(i=-1,o=t.length;++i(c=t.charCodeAt(i))||c>57){k=(46===c?s+t.slice(i+1):t.slice(i))+k,t=t.slice(0,i);break}}m&&!p&&(t=r(t,1/0));var S=f.length+t.length+k.length,E=S>1)+f+t+k+E.slice(S);break;default:t=E+f+t+k}return a(t)}return y=void 0===y?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),k.toString=function(){return t+""},k}return{format:h,formatPrefix:function(t,e){var n=h(((t=th(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Zl(e)/3))),i=Math.pow(10,-r),o=uh[8+r/3];return function(t){return n(i*t)+o}}}}function hh(t){return oh=lh(t),sh=oh.format,ah=oh.formatPrefix,oh}function fh(t){return Math.max(0,-Zl(Math.abs(t)))}function ph(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Zl(e)/3)))-Zl(Math.abs(t)))}function dh(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Zl(e)-Zl(t))+1}hh({thousands:",",grouping:[3],currency:["$",""]});var mh=1e-6,yh=1e-12,gh=Math.PI,vh=gh/2,_h=gh/4,bh=2*gh,wh=180/gh,xh=gh/180,kh=Math.abs,Th=Math.atan,Sh=Math.atan2,Eh=Math.cos,Ah=Math.ceil,Oh=Math.exp,Nh=(Math.floor,Math.hypot),Ch=Math.log,Lh=Math.pow,Rh=Math.sin,Ph=Math.sign||function(t){return t>0?1:t<0?-1:0},Ih=Math.sqrt,Mh=Math.tan;function Dh(t){return t>1?0:t<-1?gh:Math.acos(t)}function jh(t){return t>1?vh:t<-1?-vh:Math.asin(t)}function Bh(t){return(t=Rh(t/2))*t}function Fh(){}function Uh(t,e){t&&Vh.hasOwnProperty(t.type)&&Vh[t.type](t,e)}var zh={Feature:function(t,e){Uh(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r=0?1:-1,i=r*n,o=Eh(e=(e*=xh)/2+_h),s=Rh(e),a=Xh*s,c=$h*o+a*Eh(i),u=a*r*Rh(i);uf.add(Sh(u,c)),Yh=t,$h=o,Xh=s}function yf(t){return lf=new gt,qh(t,hf),2*lf}function gf(t){return[Sh(t[1],t[0]),jh(t[2])]}function vf(t){var e=t[0],n=t[1],r=Eh(n);return[r*Eh(e),r*Rh(e),Rh(n)]}function _f(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function bf(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function wf(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function xf(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function kf(t){var e=Ih(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var Tf,Sf,Ef,Af,Of,Nf,Cf,Lf,Rf,Pf,If,Mf,Df,jf,Bf,Ff,Uf={point:zf,lineStart:Kf,lineEnd:Hf,polygonStart:function(){Uf.point=qf,Uf.lineStart=Wf,Uf.lineEnd=Gf,sf=new gt,hf.polygonStart()},polygonEnd:function(){hf.polygonEnd(),Uf.point=zf,Uf.lineStart=Kf,Uf.lineEnd=Hf,uf<0?(Zh=-(Qh=180),Jh=-(tf=90)):sf>mh?tf=90:sf<-mh&&(Jh=-90),cf[0]=Zh,cf[1]=Qh},sphere:function(){Zh=-(Qh=180),Jh=-(tf=90)}};function zf(t,e){af.push(cf=[Zh=t,Qh=t]),etf&&(tf=e)}function Vf(t,e){var n=vf([t*xh,e*xh]);if(of){var r=bf(of,n),i=bf([r[1],-r[0],0],r);kf(i),i=gf(i);var o,s=t-ef,a=s>0?1:-1,c=i[0]*wh*a,u=kh(s)>180;u^(a*eftf&&(tf=o):u^(a*ef<(c=(c+360)%360-180)&&ctf&&(tf=e)),u?tYf(Zh,Qh)&&(Qh=t):Yf(t,Qh)>Yf(Zh,Qh)&&(Zh=t):Qh>=Zh?(tQh&&(Qh=t)):t>ef?Yf(Zh,t)>Yf(Zh,Qh)&&(Qh=t):Yf(t,Qh)>Yf(Zh,Qh)&&(Zh=t)}else af.push(cf=[Zh=t,Qh=t]);etf&&(tf=e),of=n,ef=t}function Kf(){Uf.point=Vf}function Hf(){cf[0]=Zh,cf[1]=Qh,Uf.point=zf,of=null}function qf(t,e){if(of){var n=t-ef;sf.add(kh(n)>180?n+(n>0?360:-360):n)}else nf=t,rf=e;hf.point(t,e),Vf(t,e)}function Wf(){hf.lineStart()}function Gf(){qf(nf,rf),hf.lineEnd(),kh(sf)>mh&&(Zh=-(Qh=180)),cf[0]=Zh,cf[1]=Qh,of=null}function Yf(t,e){return(e-=t)<0?e+360:e}function $f(t,e){return t[0]-e[0]}function Xf(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:eYf(r[0],r[1])&&(r[1]=i[1]),Yf(i[0],r[1])>Yf(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(s=-1/0,e=0,r=o[n=o.length-1];e<=n;r=i,++e)i=o[e],(a=Yf(r[1],i[0]))>s&&(s=a,Zh=i[0],Qh=r[1])}return af=cf=null,Zh===1/0||Jh===1/0?[[NaN,NaN],[NaN,NaN]]:[[Zh,Jh],[Qh,tf]]}var Jf={sphere:Fh,point:Qf,lineStart:ep,lineEnd:ip,polygonStart:function(){Jf.lineStart=op,Jf.lineEnd=sp},polygonEnd:function(){Jf.lineStart=ep,Jf.lineEnd=ip}};function Qf(t,e){t*=xh;var n=Eh(e*=xh);tp(n*Eh(t),n*Rh(t),Rh(e))}function tp(t,e,n){++Tf,Ef+=(t-Ef)/Tf,Af+=(e-Af)/Tf,Of+=(n-Of)/Tf}function ep(){Jf.point=np}function np(t,e){t*=xh;var n=Eh(e*=xh);jf=n*Eh(t),Bf=n*Rh(t),Ff=Rh(e),Jf.point=rp,tp(jf,Bf,Ff)}function rp(t,e){t*=xh;var n=Eh(e*=xh),r=n*Eh(t),i=n*Rh(t),o=Rh(e),s=Sh(Ih((s=Bf*o-Ff*i)*s+(s=Ff*r-jf*o)*s+(s=jf*i-Bf*r)*s),jf*r+Bf*i+Ff*o);Sf+=s,Nf+=s*(jf+(jf=r)),Cf+=s*(Bf+(Bf=i)),Lf+=s*(Ff+(Ff=o)),tp(jf,Bf,Ff)}function ip(){Jf.point=Qf}function op(){Jf.point=ap}function sp(){cp(Mf,Df),Jf.point=Qf}function ap(t,e){Mf=t,Df=e,t*=xh,e*=xh,Jf.point=cp;var n=Eh(e);jf=n*Eh(t),Bf=n*Rh(t),Ff=Rh(e),tp(jf,Bf,Ff)}function cp(t,e){t*=xh;var n=Eh(e*=xh),r=n*Eh(t),i=n*Rh(t),o=Rh(e),s=Bf*o-Ff*i,a=Ff*r-jf*o,c=jf*i-Bf*r,u=Nh(s,a,c),l=jh(u),h=u&&-l/u;Rf.add(h*s),Pf.add(h*a),If.add(h*c),Sf+=l,Nf+=l*(jf+(jf=r)),Cf+=l*(Bf+(Bf=i)),Lf+=l*(Ff+(Ff=o)),tp(jf,Bf,Ff)}function up(t){Tf=Sf=Ef=Af=Of=Nf=Cf=Lf=0,Rf=new gt,Pf=new gt,If=new gt,qh(t,Jf);var e=+Rf,n=+Pf,r=+If,i=Nh(e,n,r);return igh&&(t-=Math.round(t/bh)*bh),[t,e]}function pp(t,e,n){return(t%=bh)?e||n?hp(mp(t),yp(e,n)):mp(t):e||n?yp(e,n):fp}function dp(t){return function(e,n){return kh(e+=t)>gh&&(e-=Math.round(e/bh)*bh),[e,n]}}function mp(t){var e=dp(t);return e.invert=dp(-t),e}function yp(t,e){var n=Eh(t),r=Rh(t),i=Eh(e),o=Rh(e);function s(t,e){var s=Eh(e),a=Eh(t)*s,c=Rh(t)*s,u=Rh(e),l=u*n+a*r;return[Sh(c*i-l*o,a*n-u*r),jh(l*i+c*o)]}return s.invert=function(t,e){var s=Eh(e),a=Eh(t)*s,c=Rh(t)*s,u=Rh(e),l=u*i-c*o;return[Sh(c*i+u*o,a*n+l*r),jh(l*n-a*r)]},s}function gp(t){function e(e){return(e=t(e[0]*xh,e[1]*xh))[0]*=wh,e[1]*=wh,e}return t=pp(t[0]*xh,t[1]*xh,t.length>2?t[2]*xh:0),e.invert=function(e){return(e=t.invert(e[0]*xh,e[1]*xh))[0]*=wh,e[1]*=wh,e},e}function vp(t,e,n,r,i,o){if(n){var s=Eh(e),a=Rh(e),c=r*n;null==i?(i=e+r*bh,o=e-c/2):(i=_p(s,i),o=_p(s,o),(r>0?io)&&(i+=r*bh));for(var u,l=i;r>0?l>o:l1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function xp(t,e){return kh(t[0]-e[0])=0;--o)i.point((l=u[o])[0],l[1]);else r(f.x,f.p.x,-1,i);f=f.p}u=(f=f.o).z,p=!p}while(!f.v);i.lineEnd()}}}function Sp(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r=0?1:-1,E=S*T,A=E>gh,O=y*x;if(c.add(Sh(O*S*Rh(E),g*k+O*Eh(E))),s+=A?T+S*bh:T,A^d>=n^b>=n){var N=bf(vf(p),vf(_));kf(N);var C=bf(o,N);kf(C);var L=(A^T>=0?-1:1)*jh(C[2]);(r>L||r===L&&(N[0]||N[1]))&&(a+=A^T>=0?1:-1)}}return(s<-mh||s0){for(h||(i.polygonStart(),h=!0),i.lineStart(),t=0;t1&&2&c&&f.push(f.pop().concat(f.shift())),s.push(f.filter(Np))}return f}}function Np(t){return t.length>1}function Cp(t,e){return((t=t.x)[0]<0?t[1]-vh-mh:vh-t[1])-((e=e.x)[0]<0?e[1]-vh-mh:vh-e[1])}fp.invert=fp;const Lp=Op((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,s){var a=o>0?gh:-gh,c=kh(o-n);kh(c-gh)0?vh:-vh),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),t.point(o,r),e=0):i!==a&&c>=gh&&(kh(n-i)mh?Th((Rh(e)*(o=Eh(r))*Rh(n)-Rh(r)*(i=Eh(e))*Rh(t))/(i*o*s)):(e+r)/2}(n,r,o,s),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),e=0),t.point(n=o,r=s),i=a},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*vh,r.point(-gh,i),r.point(0,i),r.point(gh,i),r.point(gh,0),r.point(gh,-i),r.point(0,-i),r.point(-gh,-i),r.point(-gh,0),r.point(-gh,i);else if(kh(t[0]-e[0])>mh){var o=t[0]0,i=kh(e)>mh;function o(t,n){return Eh(t)*Eh(n)>e}function s(t,n,r){var i=[1,0,0],o=bf(vf(t),vf(n)),s=_f(o,o),a=o[0],c=s-a*a;if(!c)return!r&&t;var u=e*s/c,l=-e*a/c,h=bf(i,o),f=xf(i,u);wf(f,xf(o,l));var p=h,d=_f(f,p),m=_f(p,p),y=d*d-m*(_f(f,f)-1);if(!(y<0)){var g=Ih(y),v=xf(p,(-d-g)/m);if(wf(v,f),v=gf(v),!r)return v;var _,b=t[0],w=n[0],x=t[1],k=n[1];w0^v[1]<(kh(v[0]-b)gh^(b<=v[0]&&v[0]<=w)){var E=xf(p,(-d+g)/m);return wf(E,f),[v,gf(E)]}}}function a(e,n){var i=r?t:gh-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return Op(o,(function(t){var e,n,c,u,l;return{lineStart:function(){u=c=!1,l=1},point:function(h,f){var p,d=[h,f],m=o(h,f),y=r?m?0:a(h,f):m?a(h+(h<0?gh:-gh),f):0;if(!e&&(u=c=m)&&t.lineStart(),m!==c&&(!(p=s(e,d))||xp(e,p)||xp(d,p))&&(d[2]=1),m!==c)l=0,m?(t.lineStart(),p=s(d,e),t.point(p[0],p[1])):(p=s(e,d),t.point(p[0],p[1],2),t.lineEnd()),e=p;else if(i&&e&&r^m){var g;y&n||!(g=s(d,e,!0))||(l=0,r?(t.lineStart(),t.point(g[0][0],g[0][1]),t.point(g[1][0],g[1][1]),t.lineEnd()):(t.point(g[1][0],g[1][1]),t.lineEnd(),t.lineStart(),t.point(g[0][0],g[0][1],3)))}!m||e&&xp(e,d)||t.point(d[0],d[1]),e=d,c=m,n=y},lineEnd:function(){c&&t.lineEnd(),e=null},clean:function(){return l|(u&&c)<<1}}}),(function(e,r,i,o){vp(o,t,n,i,e,r)}),r?[0,-t]:[-gh,t-gh])}var Pp,Ip,Mp,Dp,jp=1e9,Bp=-jp;function Fp(t,e,n,r){function i(i,o){return t<=i&&i<=n&&e<=o&&o<=r}function o(i,o,a,u){var l=0,h=0;if(null==i||(l=s(i,a))!==(h=s(o,a))||c(i,o)<0^a>0)do{u.point(0===l||3===l?t:n,l>1?r:e)}while((l=(l+a+4)%4)!==h);else u.point(o[0],o[1])}function s(r,i){return kh(r[0]-t)0?0:3:kh(r[0]-n)0?2:1:kh(r[1]-e)0?1:0:i>0?3:2}function a(t,e){return c(t.x,e.x)}function c(t,e){var n=s(t,1),r=s(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(s){var c,u,l,h,f,p,d,m,y,g,v,_=s,b=wp(),w={point:x,lineStart:function(){w.point=k,u&&u.push(l=[]),g=!0,y=!1,d=m=NaN},lineEnd:function(){c&&(k(h,f),p&&y&&b.rejoin(),c.push(b.result())),w.point=x,y&&_.lineEnd()},polygonStart:function(){_=b,c=[],u=[],v=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=u.length;nr&&(f-o)*(r-s)>(p-s)*(t-o)&&++e:p<=r&&(f-o)*(r-s)<(p-s)*(t-o)&&--e;return e}(),n=v&&e,i=(c=ge(c)).length;(n||i)&&(s.polygonStart(),n&&(s.lineStart(),o(null,null,1,s),s.lineEnd()),i&&Tp(c,a,e,o,s),s.polygonEnd()),_=s,c=u=l=null}};function x(t,e){i(t,e)&&_.point(t,e)}function k(o,s){var a=i(o,s);if(u&&l.push([o,s]),g)h=o,f=s,p=a,g=!1,a&&(_.lineStart(),_.point(o,s));else if(a&&y)_.point(o,s);else{var c=[d=Math.max(Bp,Math.min(jp,d)),m=Math.max(Bp,Math.min(jp,m))],b=[o=Math.max(Bp,Math.min(jp,o)),s=Math.max(Bp,Math.min(jp,s))];!function(t,e,n,r,i,o){var s,a=t[0],c=t[1],u=0,l=1,h=e[0]-a,f=e[1]-c;if(s=n-a,h||!(s>0)){if(s/=h,h<0){if(s0){if(s>l)return;s>u&&(u=s)}if(s=i-a,h||!(s<0)){if(s/=h,h<0){if(s>l)return;s>u&&(u=s)}else if(h>0){if(s0)){if(s/=f,f<0){if(s0){if(s>l)return;s>u&&(u=s)}if(s=o-c,f||!(s<0)){if(s/=f,f<0){if(s>l)return;s>u&&(u=s)}else if(f>0){if(s0&&(t[0]=a+u*h,t[1]=c+u*f),l<1&&(e[0]=a+l*h,e[1]=c+l*f),!0}}}}}(c,b,t,e,n,r)?a&&(_.lineStart(),_.point(o,s),v=!1):(y||(_.lineStart(),_.point(c[0],c[1])),_.point(b[0],b[1]),a||_.lineEnd(),v=!1)}d=o,m=s,y=a}return w}}function Up(){var t,e,n,r=0,i=0,o=960,s=500;return n={stream:function(n){return t&&e===n?t:t=Fp(r,i,o,s)(e=n)},extent:function(a){return arguments.length?(r=+a[0][0],i=+a[0][1],o=+a[1][0],s=+a[1][1],t=e=null,n):[[r,i],[o,s]]}}}var zp={sphere:Fh,point:Fh,lineStart:function(){zp.point=Kp,zp.lineEnd=Vp},lineEnd:Fh,polygonStart:Fh,polygonEnd:Fh};function Vp(){zp.point=zp.lineEnd=Fh}function Kp(t,e){Ip=t*=xh,Mp=Rh(e*=xh),Dp=Eh(e),zp.point=Hp}function Hp(t,e){t*=xh;var n=Rh(e*=xh),r=Eh(e),i=kh(t-Ip),o=Eh(i),s=r*Rh(i),a=Dp*n-Mp*r*o,c=Mp*n+Dp*r*o;Pp.add(Sh(Ih(s*s+a*a),c)),Ip=t,Mp=n,Dp=r}function qp(t){return Pp=new gt,qh(t,zp),+Pp}var Wp=[null,null],Gp={type:"LineString",coordinates:Wp};function Yp(t,e){return Wp[0]=t,Wp[1]=e,qp(Gp)}var $p={Feature:function(t,e){return Zp(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r0&&(i=Yp(t[o],t[o-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))mh})).map(c)).concat(we(Ah(o/p)*p,i,p).filter((function(t){return kh(t%m)>mh})).map(u))}return g.lines=function(){return v().map((function(t){return{type:"LineString",coordinates:t}}))},g.outline=function(){return{type:"Polygon",coordinates:[l(r).concat(h(s).slice(1),l(n).reverse().slice(1),h(a).reverse().slice(1))]}},g.extent=function(t){return arguments.length?g.extentMajor(t).extentMinor(t):g.extentMinor()},g.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],a=+t[0][1],s=+t[1][1],r>n&&(t=r,r=n,n=t),a>s&&(t=a,a=s,s=t),g.precision(y)):[[r,a],[n,s]]},g.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],o=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),o>i&&(n=o,o=i,i=n),g.precision(y)):[[e,o],[t,i]]},g.step=function(t){return arguments.length?g.stepMajor(t).stepMinor(t):g.stepMinor()},g.stepMajor=function(t){return arguments.length?(d=+t[0],m=+t[1],g):[d,m]},g.stepMinor=function(t){return arguments.length?(f=+t[0],p=+t[1],g):[f,p]},g.precision=function(f){return arguments.length?(y=+f,c=id(o,i,90),u=od(e,t,y),l=id(a,s,90),h=od(r,n,y),g):y},g.extentMajor([[-180,-90+mh],[180,90-mh]]).extentMinor([[-180,-80-mh],[180,80+mh]])}function ad(){return sd()()}function cd(t,e){var n=t[0]*xh,r=t[1]*xh,i=e[0]*xh,o=e[1]*xh,s=Eh(r),a=Rh(r),c=Eh(o),u=Rh(o),l=s*Eh(n),h=s*Rh(n),f=c*Eh(i),p=c*Rh(i),d=2*jh(Ih(Bh(o-r)+s*c*Bh(i-n))),m=Rh(d),y=d?function(t){var e=Rh(t*=d)/m,n=Rh(d-t)/m,r=n*l+e*f,i=n*h+e*p,o=n*a+e*u;return[Sh(i,r)*wh,Sh(o,Ih(r*r+i*i))*wh]}:function(){return[n*wh,r*wh]};return y.distance=d,y}const ud=t=>t;var ld,hd,fd,pd,dd=new gt,md=new gt,yd={point:Fh,lineStart:Fh,lineEnd:Fh,polygonStart:function(){yd.lineStart=gd,yd.lineEnd=bd},polygonEnd:function(){yd.lineStart=yd.lineEnd=yd.point=Fh,dd.add(kh(md)),md=new gt},result:function(){var t=dd/2;return dd=new gt,t}};function gd(){yd.point=vd}function vd(t,e){yd.point=_d,ld=fd=t,hd=pd=e}function _d(t,e){md.add(pd*t-fd*e),fd=t,pd=e}function bd(){_d(ld,hd)}const wd=yd;var xd=1/0,kd=xd,Td=-xd,Sd=Td,Ed={point:function(t,e){tTd&&(Td=t),eSd&&(Sd=e)},lineStart:Fh,lineEnd:Fh,polygonStart:Fh,polygonEnd:Fh,result:function(){var t=[[xd,kd],[Td,Sd]];return Td=Sd=-(kd=xd=1/0),t}};const Ad=Ed;var Od,Nd,Cd,Ld,Rd=0,Pd=0,Id=0,Md=0,Dd=0,jd=0,Bd=0,Fd=0,Ud=0,zd={point:Vd,lineStart:Kd,lineEnd:Wd,polygonStart:function(){zd.lineStart=Gd,zd.lineEnd=Yd},polygonEnd:function(){zd.point=Vd,zd.lineStart=Kd,zd.lineEnd=Wd},result:function(){var t=Ud?[Bd/Ud,Fd/Ud]:jd?[Md/jd,Dd/jd]:Id?[Rd/Id,Pd/Id]:[NaN,NaN];return Rd=Pd=Id=Md=Dd=jd=Bd=Fd=Ud=0,t}};function Vd(t,e){Rd+=t,Pd+=e,++Id}function Kd(){zd.point=Hd}function Hd(t,e){zd.point=qd,Vd(Cd=t,Ld=e)}function qd(t,e){var n=t-Cd,r=e-Ld,i=Ih(n*n+r*r);Md+=i*(Cd+t)/2,Dd+=i*(Ld+e)/2,jd+=i,Vd(Cd=t,Ld=e)}function Wd(){zd.point=Vd}function Gd(){zd.point=$d}function Yd(){Xd(Od,Nd)}function $d(t,e){zd.point=Xd,Vd(Od=Cd=t,Nd=Ld=e)}function Xd(t,e){var n=t-Cd,r=e-Ld,i=Ih(n*n+r*r);Md+=i*(Cd+t)/2,Dd+=i*(Ld+e)/2,jd+=i,Bd+=(i=Ld*t-Cd*e)*(Cd+t),Fd+=i*(Ld+e),Ud+=3*i,Vd(Cd=t,Ld=e)}const Zd=zd;function Jd(t){this._context=t}Jd.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,bh)}},result:Fh};var Qd,tm,em,nm,rm,im=new gt,om={point:Fh,lineStart:function(){om.point=sm},lineEnd:function(){Qd&&am(tm,em),om.point=Fh},polygonStart:function(){Qd=!0},polygonEnd:function(){Qd=null},result:function(){var t=+im;return im=new gt,t}};function sm(t,e){om.point=am,tm=nm=t,em=rm=e}function am(t,e){nm-=t,rm-=e,im.add(Ih(nm*nm+rm*rm)),nm=t,rm=e}const cm=om;let um,lm,hm,fm;class pm{constructor(t){this._append=null==t?dm:function(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return dm;if(e!==um){const t=10**e;um=e,lm=function(e){let n=1;this._+=e[0];for(const r=e.length;n=0))throw new RangeError(`invalid digits: ${t}`);i=e}return null===e&&(r=new pm(i)),s},s.projection(t).digits(i).context(e)}function ym(t){return{stream:gm(t)}}function gm(t){return function(e){var n=new vm;for(var r in t)n[r]=t[r];return n.stream=e,n}}function vm(){}function _m(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),qh(n,t.stream(Ad)),e(Ad.result()),null!=r&&t.clipExtent(r),t}function bm(t,e,n){return _m(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),s=+e[0][0]+(r-o*(n[1][0]+n[0][0]))/2,a=+e[0][1]+(i-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([s,a])}),n)}function wm(t,e,n){return bm(t,[[0,0],e],n)}function xm(t,e,n){return _m(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,s=-i*n[0][1];t.scale(150*i).translate([o,s])}),n)}function km(t,e,n){return _m(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],s=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([o,s])}),n)}vm.prototype={constructor:vm,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var Tm=16,Sm=Eh(30*xh);function Em(t,e){return+e?function(t,e){function n(r,i,o,s,a,c,u,l,h,f,p,d,m,y){var g=u-r,v=l-i,_=g*g+v*v;if(_>4*e&&m--){var b=s+f,w=a+p,x=c+d,k=Ih(b*b+w*w+x*x),T=jh(x/=k),S=kh(kh(x)-1)e||kh((g*N+v*C)/_-.5)>.3||s*f+a*p+c*d2?t[2]%360*xh:0,N()):[y*wh,g*wh,v*wh]},A.angle=function(t){return arguments.length?(_=t%360*xh,N()):_*wh},A.reflectX=function(t){return arguments.length?(b=t?-1:1,N()):b<0},A.reflectY=function(t){return arguments.length?(w=t?-1:1,N()):w<0},A.precision=function(t){return arguments.length?(s=Em(a,E=t*t),C()):Ih(E)},A.fitExtent=function(t,e){return bm(A,t,e)},A.fitSize=function(t,e){return wm(A,t,e)},A.fitWidth=function(t,e){return xm(A,t,e)},A.fitHeight=function(t,e){return km(A,t,e)},function(){return e=t.apply(this,arguments),A.invert=e.invert&&O,N()}}function Lm(t){var e=0,n=gh/3,r=Cm(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*xh,n=t[1]*xh):[e*wh,n*wh]},i}function Rm(t,e){var n=Rh(t),r=(n+Rh(e))/2;if(kh(r)=.12&&i<.234&&r>=-.425&&r<-.214?a:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:s).invert(t)},l.stream=function(n){return t&&e===n?t:(r=[s.stream(e=n),a.stream(n),c.stream(n)],i=r.length,t={point:function(t,e){for(var n=-1;++n0?e<-vh+mh&&(e=-vh+mh):e>vh-mh&&(e=vh-mh);var n=i/Lh(qm(e),r);return[n*Rh(r*t),i-n*Eh(r*t)]}return o.invert=function(t,e){var n=i-e,o=Ph(r)*Ih(t*t+n*n),s=Sh(t,kh(n))*Ph(n);return n*r<0&&(s-=gh*Ph(t)*Ph(n)),[s/r,2*Th(Lh(i/o,1/r))-vh]},o}function Gm(){return Lm(Wm).scale(109.5).parallels([30,30])}function Ym(t,e){return[t,e]}function $m(){return Nm(Ym).scale(152.63)}function Xm(t,e){var n=Eh(t),r=t===e?Rh(t):(n-Eh(e))/(e-t),i=n/r+t;if(kh(r)2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}function yy(t,e){return t.parent===e.parent?1:2}function gy(t,e){return t+e.x}function vy(t,e){return Math.max(t,e.y)}function _y(){var t=yy,e=1,n=1,r=!1;function i(i){var o,s=0;i.eachAfter((function(e){var n=e.children;n?(e.x=function(t){return t.reduce(gy,0)/t.length}(n),e.y=function(t){return 1+t.reduce(vy,0)}(n)):(e.x=o?s+=t(e,o):0,e.y=0,o=e)}));var a=function(t){for(var e;e=t.children;)t=e[0];return t}(i),c=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),u=a.x-t(a,c)/2,l=c.x+t(c,a)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-u)/(l-u)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function by(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function wy(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=ky)):void 0===e&&(e=xy);for(var n,r,i,o,s,a=new Ey(t),c=[a];n=c.pop();)if((i=e(n.data))&&(s=(i=Array.from(i)).length))for(n.children=i,o=s-1;o>=0;--o)c.push(r=i[o]=new Ey(i[o])),r.parent=n,r.depth=n.depth+1;return a.eachBefore(Sy)}function xy(t){return t.children}function ky(t){return Array.isArray(t)?t[1]:null}function Ty(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Sy(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Ey(t){this.data=t,this.depth=this.height=0,this.parent=null}function Ay(t){return null==t?null:Oy(t)}function Oy(t){if("function"!=typeof t)throw new Error;return t}function Ny(){return 0}function Cy(t){return function(){return t}}ry.invert=function(t,e){for(var n,r=e,i=r*r,o=i*i*i,s=0;s<12&&(o=(i=(r-=n=(r*(Jm+Qm*i+o*(ty+ey*i))-e)/(Jm+3*Qm*i+o*(7*ty+9*ey*i)))*r)*i*i,!(kh(n)mh&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]},ly.invert=jm(jh),fy.invert=jm((function(t){return 2*Th(t)})),dy.invert=function(t,e){return[-e,2*Th(Oh(t))-vh]},Ey.prototype=wy.prototype={constructor:Ey,count:function(){return this.eachAfter(by)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,o=this,s=[o],a=[],c=-1;o=s.pop();)if(a.push(o),n=o.children)for(r=0,i=n.length;r=0;--r)o.push(n[r]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return wy(this).eachBefore(Ty)},[Symbol.iterator]:function*(){var t,e,n,r,i=this,o=[i];do{for(t=o.reverse(),o=[];i=t.pop();)if(yield i,e=i.children)for(n=0,r=e.length;n(t=(Ly*t+Ry)%Py)/Py}function My(t){return Dy(t,Iy())}function Dy(t,e){for(var n,r,i=0,o=(t=function(t,e){let n,r,i=t.length;for(;i;)r=e()*i--|0,n=t[i],t[i]=t[r],t[r]=n;return t}(Array.from(t),e)).length,s=[];i0&&n*n>r*r+i*i}function Uy(t,e){for(var n=0;n1e-6?(A+Math.sqrt(A*A-4*E*O))/(2*E):O/A);return{x:r+x+k*N,y:i+T+S*N,r:N}}function Hy(t,e,n){var r,i,o,s,a=t.x-e.x,c=t.y-e.y,u=a*a+c*c;u?(i=e.r+n.r,i*=i,s=t.r+n.r,i>(s*=s)?(r=(u+s-i)/(2*u),o=Math.sqrt(Math.max(0,s/u-r*r)),n.x=t.x-r*a-o*c,n.y=t.y-r*c+o*a):(r=(u+i-s)/(2*u),o=Math.sqrt(Math.max(0,i/u-r*r)),n.x=e.x+r*a-o*c,n.y=e.y+r*c+o*a)):(n.x=e.x+n.r,n.y=e.y)}function qy(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Wy(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function Gy(t){this._=t,this.next=null,this.previous=null}function Yy(t,e){if(!(s=(n=t,t="object"==typeof n&&"length"in n?n:Array.from(n)).length))return 0;var n,r,i,o,s,a,c,u,l,h,f,p;if((r=t[0]).x=0,r.y=0,!(s>1))return r.r;if(i=t[1],r.x=-i.r,i.x=r.r,i.y=0,!(s>2))return r.r+i.r;Hy(i,r,o=t[2]),r=new Gy(r),i=new Gy(i),o=new Gy(o),r.next=o.previous=i,i.next=r.previous=o,o.next=i.previous=r;t:for(u=3;ufunction(t){let e=(t=`${t}`).length;return hg(t,e-1)&&!hg(t,e-2)&&(t=t.slice(0,-1)),"/"===t[0]?t:`/${t}`}(t(e,n,r)))),n=e.map(lg),i=new Set(e).add("");for(const t of n)i.has(t)||(i.add(t),e.push(t),n.push(lg(t)),f.push(sg));p=(t,n)=>e[n],d=(t,e)=>n[e]}for(s=0,i=f.length;s=0&&(u=f[t]).data===sg;--t)u.data=null}if(a.parent=ig,a.eachBefore((function(t){t.depth=t.parent.depth+1,--i})).eachBefore(Sy),a.parent=null,i>0)throw new Error("cycle");return a}return r.id=function(t){return arguments.length?(e=Ay(t),r):e},r.parentId=function(t){return arguments.length?(n=Ay(t),r):n},r.path=function(e){return arguments.length?(t=Ay(e),r):t},r}function lg(t){let e=t.length;if(e<2)return"";for(;--e>1&&!hg(t,e););return t.slice(0,e)}function hg(t,e){if("/"===t[e]){let n=0;for(;e>0&&"\\"===t[--e];)++n;if(!(1&n))return!0}return!1}function fg(t,e){return t.parent===e.parent?1:2}function pg(t){var e=t.children;return e?e[0]:t.t}function dg(t){var e=t.children;return e?e[e.length-1]:t.t}function mg(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function yg(t,e,n){return t.a.parent===e.parent?t.a:n}function gg(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function vg(){var t=fg,e=1,n=1,r=null;function i(i){var c=function(t){for(var e,n,r,i,o,s=new gg(t,0),a=[s];e=a.pop();)if(r=e._.children)for(e.children=new Array(o=r.length),i=o-1;i>=0;--i)a.push(n=e.children[i]=new gg(r[i],i)),n.parent=e;return(s.parent=new gg(null,0)).children=[s],s}(i);if(c.eachAfter(o),c.parent.m=-c.z,c.eachBefore(s),r)i.eachBefore(a);else{var u=i,l=i,h=i;i.eachBefore((function(t){t.xl.x&&(l=t),t.depth>h.depth&&(h=t)}));var f=u===l?1:t(u,l)/2,p=f-u.x,d=e/(l.x+f+p),m=n/(h.depth||1);i.eachBefore((function(t){t.x=(t.x+p)*d,t.y=t.depth*m}))}return i}function o(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,o=i.length;--o>=0;)(e=i[o]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var o=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-o):e.z=o}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,o=e,s=e,a=n,c=o.parent.children[0],u=o.m,l=s.m,h=a.m,f=c.m;a=dg(a),o=pg(o),a&&o;)c=pg(c),(s=dg(s)).a=e,(i=a.z+h-o.z-u+t(a._,o._))>0&&(mg(yg(a,e,r),e,i),u+=i,l+=i),h+=a.m,u+=o.m,f+=c.m,l+=s.m;a&&!dg(s)&&(s.t=a,s.m+=h-l),o&&!pg(c)&&(c.t=o,c.m+=u-f,r=e)}return r}(e,i,e.parent.A||r[0])}function s(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function a(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function _g(t,e,n,r,i){for(var o,s=t.children,a=-1,c=s.length,u=t.value&&(i-n)/t.value;++af&&(f=a),y=l*l*m,(p=Math.max(f/y,y/h))>d){l-=a;break}d=p}g.push(s={value:l,dice:c1?e:1)},n}(bg);function kg(){var t=xg,e=!1,n=1,r=1,i=[0],o=Ny,s=Ny,a=Ny,c=Ny,u=Ny;function l(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(eg),t}function h(e){var n=i[e.depth],r=e.x0+n,l=e.y0+n,h=e.x1-n,f=e.y1-n;h=n-1){var l=a[e];return l.x0=i,l.y0=o,l.x1=s,void(l.y1=c)}for(var h=u[e],f=r/2+h,p=e+1,d=n-1;p>>1;u[m]c-o){var v=r?(i*g+s*y)/r:s;t(e,p,y,i,o,v,c),t(p,n,g,v,o,s,c)}else{var _=r?(o*g+c*y)/r:c;t(e,p,y,i,o,s,_),t(p,n,g,i,_,s,c)}}(0,c,t.value,e,n,r,i)}function Sg(t,e,n,r,i){(1&t.depth?_g:ng)(t,e,n,r,i)}const Eg=function t(e){function n(t,n,r,i,o){if((s=t._squarify)&&s.ratio===e)for(var s,a,c,u,l,h=-1,f=s.length,p=t.value;++h1?e:1)},n}(bg);function Ag(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function Og(t,e){var n=ki(+t,+e);return function(t){var e=n(t);return e-360*Math.floor(e/360)}}function Ng(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function Cg(t){return((t=Math.exp(t))+1/t)/2}const Lg=function t(e,n,r){function i(t,i){var o,s,a=t[0],c=t[1],u=t[2],l=i[0],h=i[1],f=i[2],p=l-a,d=h-c,m=p*p+d*d;if(m<1e-12)s=Math.log(f/u)/e,o=function(t){return[a+t*p,c+t*d,u*Math.exp(e*t*s)]};else{var y=Math.sqrt(m),g=(f*f-u*u+r*m)/(2*u*n*y),v=(f*f-u*u-r*m)/(2*f*n*y),_=Math.log(Math.sqrt(g*g+1)-g),b=Math.log(Math.sqrt(v*v+1)-v);s=(b-_)/e,o=function(t){var r,i=t*s,o=Cg(_),l=u/(n*y)*(o*(r=e*i+_,((r=Math.exp(2*r))-1)/(r+1))-function(t){return((t=Math.exp(t))-1/t)/2}(_));return[a+l*p,c+l*d,u*o/Cg(e*i+_)]}}return o.duration=1e3*s*e/Math.SQRT2,o}return i.rho=function(e){var n=Math.max(.001,+e),r=n*n;return t(n,r,r*r)},i}(Math.SQRT2,2,4);function Rg(t){return function(e,n){var r=t((e=pi(e)).h,(n=pi(n)).h),i=Ti(e.s,n.s),o=Ti(e.l,n.l),s=Ti(e.opacity,n.opacity);return function(t){return e.h=r(t),e.s=i(t),e.l=o(t),e.opacity=s(t),e+""}}}const Pg=Rg(ki);var Ig=Rg(Ti);function Mg(t,e){var n=Ti((t=Sa(t)).l,(e=Sa(e)).l),r=Ti(t.a,e.a),i=Ti(t.b,e.b),o=Ti(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=r(e),t.b=i(e),t.opacity=o(e),t+""}}function Dg(t){return function(e,n){var r=t((e=Pa(e)).h,(n=Pa(n)).h),i=Ti(e.c,n.c),o=Ti(e.l,n.l),s=Ti(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=o(t),e.opacity=s(t),e+""}}}const jg=Dg(ki);var Bg=Dg(Ti);function Fg(t){return function e(n){function r(e,r){var i=t((e=Ha(e)).h,(r=Ha(r)).h),o=Ti(e.s,r.s),s=Ti(e.l,r.l),a=Ti(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=o(t),e.l=s(Math.pow(t,n)),e.opacity=a(t),e+""}}return n=+n,r.gamma=e,r}(1)}const Ug=Fg(ki);var zg=Fg(Ti);function Vg(t,e){void 0===e&&(e=t,t=Fi);for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n1&&Wg(t[n[i-2]],t[n[i-1]],t[r])<=0;)--i;n[i++]=r}return n.slice(0,i)}function $g(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e=0;--e)u.push(t[r[o[e]][2]]);for(e=+a;ea!=u>a&&s<(c-n)*(a-r)/(u-r)+n&&(l=!l),c=n,u=r;return l}function Zg(t){for(var e,n,r=-1,i=t.length,o=t[i-1],s=o[0],a=o[1],c=0;++r1);return t+n*o*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(Jg),nv=function t(e){var n=ev.source(e);function r(){var t=n.apply(this,arguments);return function(){return Math.exp(t())}}return r.source=t,r}(Jg),rv=function t(e){function n(t){return(t=+t)<=0?()=>0:function(){for(var n=0,r=t;r>1;--r)n+=e();return n+r*e()}}return n.source=t,n}(Jg),iv=function t(e){var n=rv.source(e);function r(t){if(0==(t=+t))return e;var r=n(t);return function(){return r()/t}}return r.source=t,r}(Jg),ov=function t(e){function n(t){return function(){return-Math.log1p(-e())/t}}return n.source=t,n}(Jg),sv=function t(e){function n(t){if((t=+t)<0)throw new RangeError("invalid alpha");return t=1/-t,function(){return Math.pow(1-e(),t)}}return n.source=t,n}(Jg),av=function t(e){function n(t){if((t=+t)<0||t>1)throw new RangeError("invalid p");return function(){return Math.floor(e()+t)}}return n.source=t,n}(Jg),cv=function t(e){function n(t){if((t=+t)<0||t>1)throw new RangeError("invalid p");return 0===t?()=>1/0:1===t?()=>1:(t=Math.log1p(-t),function(){return 1+Math.floor(Math.log1p(-e())/t)})}return n.source=t,n}(Jg),uv=function t(e){var n=ev.source(e)();function r(t,r){if((t=+t)<0)throw new RangeError("invalid k");if(0===t)return()=>0;if(r=null==r?1:+r,1===t)return()=>-Math.log1p(-e())*r;var i=(t<1?t+1:t)-1/3,o=1/(3*Math.sqrt(i)),s=t<1?()=>Math.pow(e(),1/t):()=>1;return function(){do{do{var t=n(),a=1+o*t}while(a<=0);a*=a*a;var c=1-e()}while(c>=1-.0331*t*t*t*t&&Math.log(c)>=.5*t*t+i*(1-a+Math.log(a)));return i*a*s()*r}}return r.source=t,r}(Jg),lv=function t(e){var n=uv.source(e);function r(t,e){var r=n(t),i=n(e);return function(){var t=r();return 0===t?0:t/(t+i())}}return r.source=t,r}(Jg),hv=function t(e){var n=cv.source(e),r=lv.source(e);function i(t,e){return t=+t,(e=+e)>=1?()=>t:e<=0?()=>0:function(){for(var i=0,o=t,s=e;o*s>16&&o*(1-s)>16;){var a=Math.floor((o+1)*s),c=r(a,o-a+1)();c<=s?(i+=a,o-=a,s=(s-c)/(1-c)):(o=a-1,s/=c)}for(var u=s<.5,l=n(u?s:1-s),h=l(),f=0;h<=o;++f)h+=l();return i+(u?f:o-f)}}return i.source=t,i}(Jg),fv=function t(e){function n(t,n,r){var i;return 0==(t=+t)?i=t=>-Math.log(t):(t=1/t,i=e=>Math.pow(e,t)),n=null==n?0:+n,r=null==r?1:+r,function(){return n+r*i(-Math.log1p(-e()))}}return n.source=t,n}(Jg),pv=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,function(){return t+n*Math.tan(Math.PI*e())}}return n.source=t,n}(Jg),dv=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,function(){var r=e();return t+n*Math.log(r/(1-r))}}return n.source=t,n}(Jg),mv=function t(e){var n=uv.source(e),r=hv.source(e);function i(t){return function(){for(var i=0,o=t;o>16;){var s=Math.floor(.875*o),a=n(s)();if(a>o)return i+r(s-1,o/a)();i+=s,o-=a}for(var c=-Math.log1p(-e()),u=0;c<=o;++u)c-=Math.log1p(-e());return i+u}}return i.source=t,i}(Jg),yv=1664525,gv=1013904223,vv=1/4294967296;function _v(t=Math.random()){let e=0|(0<=t&&t<1?t/vv:Math.abs(t));return()=>(e=yv*e+gv|0,vv*(e>>>0))}function bv(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function wv(t,e){switch(arguments.length){case 0:break;case 1:"function"==typeof t?this.interpolator(t):this.range(t);break;default:this.domain(t),"function"==typeof e?this.interpolator(e):this.range(e)}return this}const xv=Symbol("implicit");function kv(){var t=new bt,e=[],n=[],r=xv;function i(i){let o=t.get(i);if(void 0===o){if(r!==xv)return r;t.set(i,o=e.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new bt;for(const r of n)t.has(r)||t.set(r,e.push(r)-1);return i},i.range=function(t){return arguments.length?(n=Array.from(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return kv(e,n).unknown(r)},bv.apply(i,arguments),i}function Tv(){var t,e,n=kv().unknown(void 0),r=n.domain,i=n.range,o=0,s=1,a=!1,c=0,u=0,l=.5;function h(){var n=r().length,h=se&&(n=t,t=e,e=n),function(n){return Math.max(t,Math.min(e,n))}}(s[0],s[t-1])),r=t>2?Rv:Lv,i=o=null,h}function h(e){return null==e||isNaN(e=+e)?n:(i||(i=r(s.map(t),a,c)))(t(u(e)))}return h.invert=function(n){return u(e((o||(o=r(a,s.map(t),Ii)))(n)))},h.domain=function(t){return arguments.length?(s=Array.from(t,Av),l()):s.slice()},h.range=function(t){return arguments.length?(a=Array.from(t),l()):a.slice()},h.rangeRound=function(t){return a=Array.from(t),c=Ng,l()},h.clamp=function(t){return arguments.length?(u=!!t||Nv,l()):u!==Nv},h.interpolate=function(t){return arguments.length?(c=t,l()):c},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,l()}}function Mv(){return Iv()(Nv,Nv)}function Dv(t,e,n,r){var i,o=Jt(t,e,n);switch((r=th(null==r?",f":r)).type){case"s":var s=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=ph(o,s))||(r.precision=i),ah(r,s);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=dh(o,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=fh(o))||(r.precision=i-2*("%"===r.type))}return sh(r)}function jv(t){var e=t.domain;return t.ticks=function(t){var n=e();return Xt(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return Dv(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i,o=e(),s=0,a=o.length-1,c=o[s],u=o[a],l=10;for(u0;){if((i=Zt(c,u,n))===r)return o[s]=c,o[a]=u,e(o);if(i>0)c=Math.floor(c/i)*i,u=Math.ceil(u/i)*i;else{if(!(i<0))break;c=Math.ceil(c*i)/i,u=Math.floor(u*i)/i}r=i}return t},t}function Bv(){var t=Mv();return t.copy=function(){return Pv(t,Bv())},bv.apply(t,arguments),jv(t)}function Fv(t){var e;function n(t){return null==t||isNaN(t=+t)?e:t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=Array.from(e,Av),n):t.slice()},n.unknown=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return Fv(t).unknown(e)},t=arguments.length?Array.from(t,Av):[0,1],jv(n)}function Uv(t,e){var n,r=0,i=(t=t.slice()).length-1,o=t[r],s=t[i];return s-t(-e,n)}function Gv(t){const e=t(zv,Vv),n=e.domain;let r,i,o=10;function s(){return r=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}(o),i=function(t){return 10===t?qv:t===Math.E?Math.exp:e=>Math.pow(t,e)}(o),n()[0]<0?(r=Wv(r),i=Wv(i),t(Kv,Hv)):t(zv,Vv),e}return e.base=function(t){return arguments.length?(o=+t,s()):o},e.domain=function(t){return arguments.length?(n(t),s()):n()},e.ticks=t=>{const e=n();let s=e[0],a=e[e.length-1];const c=a0){for(;h<=f;++h)for(u=1;ua)break;d.push(l)}}else for(;h<=f;++h)for(u=o-1;u>=1;--u)if(l=h>0?u/i(-h):u*i(h),!(la)break;d.push(l)}2*d.length{if(null==t&&(t=10),null==n&&(n=10===o?"s":","),"function"!=typeof n&&(o%1||null!=(n=th(n)).precision||(n.trim=!0),n=sh(n)),t===1/0)return n;const s=Math.max(1,o*t/e.ticks().length);return t=>{let e=t/i(Math.round(r(t)));return e*on(Uv(n(),{floor:t=>i(Math.floor(r(t))),ceil:t=>i(Math.ceil(r(t)))})),e}function Yv(){const t=Gv(Iv()).domain([1,10]);return t.copy=()=>Pv(t,Yv()).base(t.base()),bv.apply(t,arguments),t}function $v(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Xv(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Zv(t){var e=1,n=t($v(e),Xv(e));return n.constant=function(n){return arguments.length?t($v(e=+n),Xv(e)):e},jv(n)}function Jv(){var t=Zv(Iv());return t.copy=function(){return Pv(t,Jv()).constant(t.constant())},bv.apply(t,arguments)}function Qv(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function t_(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function e_(t){return t<0?-t*t:t*t}function n_(t){var e=t(Nv,Nv),n=1;return e.exponent=function(e){return arguments.length?1==(n=+e)?t(Nv,Nv):.5===n?t(t_,e_):t(Qv(n),Qv(1/n)):n},jv(e)}function r_(){var t=n_(Iv());return t.copy=function(){return Pv(t,r_()).exponent(t.exponent())},bv.apply(t,arguments),t}function i_(){return r_.apply(null,arguments).exponent(.5)}function o_(t){return Math.sign(t)*t*t}function s_(){var t,e=Mv(),n=[0,1],r=!1;function i(n){var i=function(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}(e(n));return isNaN(i)?t:r?Math.round(i):i}return i.invert=function(t){return e.invert(o_(t))},i.domain=function(t){return arguments.length?(e.domain(t),i):e.domain()},i.range=function(t){return arguments.length?(e.range((n=Array.from(t,Av)).map(o_)),i):n.slice()},i.rangeRound=function(t){return i.range(t).round(!0)},i.round=function(t){return arguments.length?(r=!!t,i):r},i.clamp=function(t){return arguments.length?(e.clamp(t),i):e.clamp()},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return s_(e.domain(),n).round(r).clamp(e.clamp()).unknown(t)},bv.apply(i,arguments),jv(i)}function a_(){var t,e=[],n=[],r=[];function i(){var t=0,i=Math.max(1,n.length);for(r=new Array(i-1);++t0?r[i-1]:e[0],i=r?[i[r-1],n]:[i[s-1],i[s]]},s.unknown=function(e){return arguments.length?(t=e,s):s},s.thresholds=function(){return i.slice()},s.copy=function(){return c_().domain([e,n]).range(o).unknown(t)},bv.apply(jv(s),arguments)}function u_(){var t,e=[.5],n=[0,1],r=1;function i(i){return null!=i&&i<=i?n[tt(e,i,0,r)]:t}return i.domain=function(t){return arguments.length?(e=Array.from(t),r=Math.min(e.length,n.length-1),i):e.slice()},i.range=function(t){return arguments.length?(n=Array.from(t),r=Math.min(e.length,n.length-1),i):n.slice()},i.invertExtent=function(t){var r=n.indexOf(t);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return u_().domain(e).range(n).unknown(t)},bv.apply(i,arguments)}const l_=1e3,h_=6e4,f_=36e5,p_=864e5,d_=6048e5,m_=31536e6,y_=new Date,g_=new Date;function v_(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=e=>(t(e=new Date(+e)),e),i.ceil=n=>(t(n=new Date(n-1)),e(n,1),t(n),n),i.round=t=>{const e=i(t),n=i.ceil(t);return t-e(e(t=new Date(+t),null==n?1:Math.floor(n)),t),i.range=(n,r,o)=>{const s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n0))return s;let a;do{s.push(a=new Date(+n)),e(n,o),t(n)}while(av_((e=>{if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),((t,r)=>{if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););})),n&&(i.count=(e,r)=>(y_.setTime(+e),g_.setTime(+r),t(y_),t(g_),Math.floor(n(y_,g_))),i.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?e=>r(e)%t==0:e=>i.count(0,e)%t==0):i:null)),i}const __=v_((()=>{}),((t,e)=>{t.setTime(+t+e)}),((t,e)=>e-t));__.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?v_((e=>{e.setTime(Math.floor(e/t)*t)}),((e,n)=>{e.setTime(+e+n*t)}),((e,n)=>(n-e)/t)):__:null);const b_=__.range,w_=v_((t=>{t.setTime(t-t.getMilliseconds())}),((t,e)=>{t.setTime(+t+e*l_)}),((t,e)=>(e-t)/l_),(t=>t.getUTCSeconds())),x_=w_.range,k_=v_((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*l_)}),((t,e)=>{t.setTime(+t+e*h_)}),((t,e)=>(e-t)/h_),(t=>t.getMinutes())),T_=k_.range,S_=v_((t=>{t.setUTCSeconds(0,0)}),((t,e)=>{t.setTime(+t+e*h_)}),((t,e)=>(e-t)/h_),(t=>t.getUTCMinutes())),E_=S_.range,A_=v_((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*l_-t.getMinutes()*h_)}),((t,e)=>{t.setTime(+t+e*f_)}),((t,e)=>(e-t)/f_),(t=>t.getHours())),O_=A_.range,N_=v_((t=>{t.setUTCMinutes(0,0,0)}),((t,e)=>{t.setTime(+t+e*f_)}),((t,e)=>(e-t)/f_),(t=>t.getUTCHours())),C_=N_.range,L_=v_((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*h_)/p_),(t=>t.getDate()-1)),R_=L_.range,P_=v_((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/p_),(t=>t.getUTCDate()-1)),I_=P_.range,M_=v_((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/p_),(t=>Math.floor(t/p_))),D_=M_.range;function j_(t){return v_((e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),((t,e)=>{t.setDate(t.getDate()+7*e)}),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*h_)/d_))}const B_=j_(0),F_=j_(1),U_=j_(2),z_=j_(3),V_=j_(4),K_=j_(5),H_=j_(6),q_=B_.range,W_=F_.range,G_=U_.range,Y_=z_.range,$_=V_.range,X_=K_.range,Z_=H_.range;function J_(t){return v_((e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)}),((t,e)=>(e-t)/d_))}const Q_=J_(0),tb=J_(1),eb=J_(2),nb=J_(3),rb=J_(4),ib=J_(5),ob=J_(6),sb=Q_.range,ab=tb.range,cb=eb.range,ub=nb.range,lb=rb.range,hb=ib.range,fb=ob.range,pb=v_((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,e)=>{t.setMonth(t.getMonth()+e)}),((t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())),(t=>t.getMonth())),db=pb.range,mb=v_((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)}),((t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth())),yb=mb.range,gb=v_((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,e)=>{t.setFullYear(t.getFullYear()+e)}),((t,e)=>e.getFullYear()-t.getFullYear()),(t=>t.getFullYear()));gb.every=t=>isFinite(t=Math.floor(t))&&t>0?v_((e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,n)=>{e.setFullYear(e.getFullYear()+n*t)})):null;const vb=gb.range,_b=v_((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)}),((t,e)=>e.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));_b.every=t=>isFinite(t=Math.floor(t))&&t>0?v_((e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null;const bb=_b.range;function wb(t,e,n,r,i,o){const s=[[w_,1,l_],[w_,5,5e3],[w_,15,15e3],[w_,30,3e4],[o,1,h_],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,f_],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,p_],[r,2,1728e5],[n,1,d_],[e,1,2592e6],[e,3,7776e6],[t,1,m_]];function a(e,n,r){const i=Math.abs(n-e)/r,o=G((([,,t])=>t)).right(s,i);if(o===s.length)return t.every(Jt(e/m_,n/m_,r));if(0===o)return __.every(Math.max(Jt(e,n,r),1));const[a,c]=s[i/s[o-1][2]=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Xw,s:Zw,S:gw,u:vw,U:_w,V:ww,w:xw,W:kw,x:null,X:null,y:Tw,Y:Ew,Z:Ow,"%":$w},b={a:function(t){return s[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:Nw,e:Nw,f:Iw,g:qw,G:Gw,H:Cw,I:Lw,j:Rw,L:Pw,m:Mw,M:Dw,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Xw,s:Zw,S:jw,u:Bw,U:Fw,V:zw,w:Vw,W:Kw,x:null,X:null,y:Hw,Y:Ww,Z:Yw,"%":$w},w={a:function(t,e,n){var r=p.exec(e.slice(n));return r?(t.w=d.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,n,r){return T(t,e,n,r)},d:Qb,e:Qb,f:ow,g:$b,G:Yb,H:ew,I:ew,j:tw,L:iw,m:Jb,M:nw,p:function(t,e,n){var r=u.exec(e.slice(n));return r?(t.p=l.get(r[0].toLowerCase()),n+r[0].length):-1},q:Zb,Q:aw,s:cw,S:rw,u:Hb,U:qb,V:Wb,w:Kb,W:Gb,x:function(t,e,r){return T(t,n,e,r)},X:function(t,e,n){return T(t,r,e,n)},y:$b,Y:Yb,Z:Xb,"%":sw};function x(t,e){return function(n){var r,i,o,s=[],a=-1,c=0,u=t.length;for(n instanceof Date||(n=new Date(+n));++a53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Ab(Ob(o.y,0,1))).getUTCDay(),r=i>4||0===i?tb.ceil(r):tb(r),r=P_.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=Eb(Ob(o.y,0,1))).getDay(),r=i>4||0===i?F_.ceil(r):F_(r),r=L_.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Ab(Ob(o.y,0,1)).getUTCDay():Eb(Ob(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Ab(o)):Eb(o)}}function T(t,e,n,r){for(var i,o,s=0,a=e.length,c=n.length;s=c)return-1;if(37===(i=e.charCodeAt(s++))){if(i=e.charAt(s++),!(o=w[i in Mb?e.charAt(s++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return _.x=x(n,_),_.X=x(r,_),_.c=x(e,_),b.x=x(n,b),b.X=x(r,b),b.c=x(e,b),{format:function(t){var e=x(t+="",_);return e.toString=function(){return t},e},parse:function(t){var e=k(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=x(t+="",b);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t+="",!0);return e.toString=function(){return t},e}}}var Cb,Lb,Rb,Pb,Ib,Mb={"-":"",_:" ",0:"0"},Db=/^\s*\d+/,jb=/^%/,Bb=/[\\^$*+?|[\]().{}]/g;function Fb(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o[t.toLowerCase(),e])))}function Kb(t,e,n){var r=Db.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Hb(t,e,n){var r=Db.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function qb(t,e,n){var r=Db.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Wb(t,e,n){var r=Db.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Gb(t,e,n){var r=Db.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Yb(t,e,n){var r=Db.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function $b(t,e,n){var r=Db.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Xb(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Zb(t,e,n){var r=Db.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Jb(t,e,n){var r=Db.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Qb(t,e,n){var r=Db.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function tw(t,e,n){var r=Db.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function ew(t,e,n){var r=Db.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function nw(t,e,n){var r=Db.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function rw(t,e,n){var r=Db.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function iw(t,e,n){var r=Db.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function ow(t,e,n){var r=Db.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function sw(t,e,n){var r=jb.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function aw(t,e,n){var r=Db.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function cw(t,e,n){var r=Db.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function uw(t,e){return Fb(t.getDate(),e,2)}function lw(t,e){return Fb(t.getHours(),e,2)}function hw(t,e){return Fb(t.getHours()%12||12,e,2)}function fw(t,e){return Fb(1+L_.count(gb(t),t),e,3)}function pw(t,e){return Fb(t.getMilliseconds(),e,3)}function dw(t,e){return pw(t,e)+"000"}function mw(t,e){return Fb(t.getMonth()+1,e,2)}function yw(t,e){return Fb(t.getMinutes(),e,2)}function gw(t,e){return Fb(t.getSeconds(),e,2)}function vw(t){var e=t.getDay();return 0===e?7:e}function _w(t,e){return Fb(B_.count(gb(t)-1,t),e,2)}function bw(t){var e=t.getDay();return e>=4||0===e?V_(t):V_.ceil(t)}function ww(t,e){return t=bw(t),Fb(V_.count(gb(t),t)+(4===gb(t).getDay()),e,2)}function xw(t){return t.getDay()}function kw(t,e){return Fb(F_.count(gb(t)-1,t),e,2)}function Tw(t,e){return Fb(t.getFullYear()%100,e,2)}function Sw(t,e){return Fb((t=bw(t)).getFullYear()%100,e,2)}function Ew(t,e){return Fb(t.getFullYear()%1e4,e,4)}function Aw(t,e){var n=t.getDay();return Fb((t=n>=4||0===n?V_(t):V_.ceil(t)).getFullYear()%1e4,e,4)}function Ow(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Fb(e/60|0,"0",2)+Fb(e%60,"0",2)}function Nw(t,e){return Fb(t.getUTCDate(),e,2)}function Cw(t,e){return Fb(t.getUTCHours(),e,2)}function Lw(t,e){return Fb(t.getUTCHours()%12||12,e,2)}function Rw(t,e){return Fb(1+P_.count(_b(t),t),e,3)}function Pw(t,e){return Fb(t.getUTCMilliseconds(),e,3)}function Iw(t,e){return Pw(t,e)+"000"}function Mw(t,e){return Fb(t.getUTCMonth()+1,e,2)}function Dw(t,e){return Fb(t.getUTCMinutes(),e,2)}function jw(t,e){return Fb(t.getUTCSeconds(),e,2)}function Bw(t){var e=t.getUTCDay();return 0===e?7:e}function Fw(t,e){return Fb(Q_.count(_b(t)-1,t),e,2)}function Uw(t){var e=t.getUTCDay();return e>=4||0===e?rb(t):rb.ceil(t)}function zw(t,e){return t=Uw(t),Fb(rb.count(_b(t),t)+(4===_b(t).getUTCDay()),e,2)}function Vw(t){return t.getUTCDay()}function Kw(t,e){return Fb(tb.count(_b(t)-1,t),e,2)}function Hw(t,e){return Fb(t.getUTCFullYear()%100,e,2)}function qw(t,e){return Fb((t=Uw(t)).getUTCFullYear()%100,e,2)}function Ww(t,e){return Fb(t.getUTCFullYear()%1e4,e,4)}function Gw(t,e){var n=t.getUTCDay();return Fb((t=n>=4||0===n?rb(t):rb.ceil(t)).getUTCFullYear()%1e4,e,4)}function Yw(){return"+0000"}function $w(){return"%"}function Xw(t){return+t}function Zw(t){return Math.floor(+t/1e3)}function Jw(t){return Cb=Nb(t),Lb=Cb.format,Rb=Cb.parse,Pb=Cb.utcFormat,Ib=Cb.utcParse,Cb}function Qw(t){return new Date(t)}function tx(t){return t instanceof Date?+t:+new Date(+t)}function ex(t,e,n,r,i,o,s,a,c,u){var l=Mv(),h=l.invert,f=l.domain,p=u(".%L"),d=u(":%S"),m=u("%I:%M"),y=u("%I %p"),g=u("%a %d"),v=u("%b %d"),_=u("%B"),b=u("%Y");function w(t){return(c(t)e(r/(t.length-1))))},n.quantiles=function(e){return Array.from({length:e+1},((n,r)=>ue(t,r/e)))},n.copy=function(){return hx(e).domain(t)},wv.apply(n,arguments)}function fx(){var t,e,n,r,i,o,s,a=0,c=.5,u=1,l=1,h=Nv,f=!1;function p(t){return isNaN(t=+t)?s:(t=.5+((t=+o(t))-e)*(l*tAi(t[t.length-1]);var Cx=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(vx);const Lx=Nx(Cx);var Rx=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(vx);const Px=Nx(Rx);var Ix=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(vx);const Mx=Nx(Ix);var Dx=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(vx);const jx=Nx(Dx);var Bx=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(vx);const Fx=Nx(Bx);var Ux=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(vx);const zx=Nx(Ux);var Vx=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(vx);const Kx=Nx(Vx);var Hx=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(vx);const qx=Nx(Hx);var Wx=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(vx);const Gx=Nx(Wx);var Yx=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(vx);const $x=Nx(Yx);var Xx=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(vx);const Zx=Nx(Xx);var Jx=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(vx);const Qx=Nx(Jx);var tk=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(vx);const ek=Nx(tk);var nk=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(vx);const rk=Nx(nk);var ik=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(vx);const ok=Nx(ik);var sk=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(vx);const ak=Nx(sk);var ck=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(vx);const uk=Nx(ck);var lk=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(vx);const hk=Nx(lk);var fk=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(vx);const pk=Nx(fk);var dk=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(vx);const mk=Nx(dk);var yk=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(vx);const gk=Nx(yk);var vk=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(vx);const _k=Nx(vk);var bk=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(vx);const wk=Nx(bk);var xk=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(vx);const kk=Nx(xk);var Tk=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(vx);const Sk=Nx(Tk);var Ek=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(vx);const Ak=Nx(Ek);var Ok=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(vx);const Nk=Nx(Ok);function Ck(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"}const Lk=zg(Ha(300,.5,0),Ha(-240,.5,1));var Rk=zg(Ha(-100,.75,.35),Ha(80,1.5,.8)),Pk=zg(Ha(260,.75,.35),Ha(80,1.5,.8)),Ik=Ha();function Mk(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return Ik.h=360*t-100,Ik.s=1.5-1.5*e,Ik.l=.8-.9*e,Ik+""}var Dk=ii(),jk=Math.PI/3,Bk=2*Math.PI/3;function Fk(t){var e;return t=(.5-t)*Math.PI,Dk.r=255*(e=Math.sin(t))*e,Dk.g=255*(e=Math.sin(t+jk))*e,Dk.b=255*(e=Math.sin(t+Bk))*e,Dk+""}function Uk(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"}function zk(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const Vk=zk(vx("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var Kk=zk(vx("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),Hk=zk(vx("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),qk=zk(vx("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function Wk(t){return Nr(mr(t).call(document.documentElement))}var Gk=0;function Yk(){return new $k}function $k(){this._="@"+(++Gk).toString(36)}function Xk(t,e){return t.target&&(t=Ui(t),void 0===e&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,(t=>zi(t,e)))}function Zk(t){return"string"==typeof t?new Er([document.querySelectorAll(t)],[document.documentElement]):new Er([vn(t)],Sr)}function Jk(t){return function(){return t}}$k.prototype=Yk.prototype={constructor:$k,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};const Qk=Math.abs,tT=Math.atan2,eT=Math.cos,nT=Math.max,rT=Math.min,iT=Math.sin,oT=Math.sqrt,sT=1e-12,aT=Math.PI,cT=aT/2,uT=2*aT;function lT(t){return t>=1?cT:t<=-1?-cT:Math.asin(t)}function hT(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{const t=Math.floor(n);if(!(t>=0))throw new RangeError(`invalid digits: ${n}`);e=t}return t},()=>new Qs(e)}function fT(t){return t.innerRadius}function pT(t){return t.outerRadius}function dT(t){return t.startAngle}function mT(t){return t.endAngle}function yT(t){return t&&t.padAngle}function gT(t,e,n,r,i,o,s){var a=t-n,c=e-r,u=(s?o:-o)/oT(a*a+c*c),l=u*c,h=-u*a,f=t+l,p=e+h,d=n+l,m=r+h,y=(f+d)/2,g=(p+m)/2,v=d-f,_=m-p,b=v*v+_*_,w=i-o,x=f*m-d*p,k=(_<0?-1:1)*oT(nT(0,w*w*b-x*x)),T=(x*_-v*k)/b,S=(-x*v-_*k)/b,E=(x*_+v*k)/b,A=(-x*v+_*k)/b,O=T-y,N=S-g,C=E-y,L=A-g;return O*O+N*N>C*C+L*L&&(T=E,S=A),{cx:T,cy:S,x01:-l,y01:-h,x11:T*(i/w-1),y11:S*(i/w-1)}}function vT(){var t=fT,e=pT,n=Jk(0),r=null,i=dT,o=mT,s=yT,a=null,c=hT(u);function u(){var u,l,h,f=+t.apply(this,arguments),p=+e.apply(this,arguments),d=i.apply(this,arguments)-cT,m=o.apply(this,arguments)-cT,y=Qk(m-d),g=m>d;if(a||(a=u=c()),psT)if(y>uT-sT)a.moveTo(p*eT(d),p*iT(d)),a.arc(0,0,p,d,m,!g),f>sT&&(a.moveTo(f*eT(m),f*iT(m)),a.arc(0,0,f,m,d,g));else{var v,_,b=d,w=m,x=d,k=m,T=y,S=y,E=s.apply(this,arguments)/2,A=E>sT&&(r?+r.apply(this,arguments):oT(f*f+p*p)),O=rT(Qk(p-f)/2,+n.apply(this,arguments)),N=O,C=O;if(A>sT){var L=lT(A/f*iT(E)),R=lT(A/p*iT(E));(T-=2*L)>sT?(x+=L*=g?1:-1,k-=L):(T=0,x=k=(d+m)/2),(S-=2*R)>sT?(b+=R*=g?1:-1,w-=R):(S=0,b=w=(d+m)/2)}var P=p*eT(b),I=p*iT(b),M=f*eT(k),D=f*iT(k);if(O>sT){var j,B=p*eT(w),F=p*iT(w),U=f*eT(x),z=f*iT(x);if(y1?0:h<-1?aT:Math.acos(h))/2),G=oT(j[0]*j[0]+j[1]*j[1]);N=rT(O,(f-G)/(W-1)),C=rT(O,(p-G)/(W+1))}else N=C=0}S>sT?C>sT?(v=gT(U,z,P,I,p,C,g),_=gT(B,F,M,D,p,C,g),a.moveTo(v.cx+v.x01,v.cy+v.y01),CsT&&T>sT?N>sT?(v=gT(M,D,B,F,f,-N,g),_=gT(P,I,U,z,f,-N,g),a.lineTo(v.cx+v.x01,v.cy+v.y01),N=h;--f)a.point(g[f],v[f]);a.lineEnd(),a.areaEnd()}y&&(g[l]=+t(p,l,u),v[l]=+e(p,l,u),a.point(r?+r(p,l,u):g[l],n?+n(p,l,u):v[l]))}if(d)return a=null,d+""||null}function l(){return ST().defined(i).curve(s).context(o)}return t="function"==typeof t?t:void 0===t?kT:Jk(+t),e="function"==typeof e?e:Jk(void 0===e?0:+e),n="function"==typeof n?n:void 0===n?TT:Jk(+n),u.x=function(e){return arguments.length?(t="function"==typeof e?e:Jk(+e),r=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:Jk(+e),u):t},u.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Jk(+t),u):r},u.y=function(t){return arguments.length?(e="function"==typeof t?t:Jk(+t),n=null,u):e},u.y0=function(t){return arguments.length?(e="function"==typeof t?t:Jk(+t),u):e},u.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:Jk(+t),u):n},u.lineX0=u.lineY0=function(){return l().x(t).y(e)},u.lineY1=function(){return l().x(t).y(n)},u.lineX1=function(){return l().x(r).y(e)},u.defined=function(t){return arguments.length?(i="function"==typeof t?t:Jk(!!t),u):i},u.curve=function(t){return arguments.length?(s=t,null!=o&&(a=s(o)),u):s},u.context=function(t){return arguments.length?(null==t?o=a=null:a=s(o=t),u):o},u}function AT(t,e){return et?1:e>=t?0:NaN}function OT(t){return t}function NT(){var t=OT,e=AT,n=null,r=Jk(0),i=Jk(uT),o=Jk(0);function s(s){var a,c,u,l,h,f=(s=bT(s)).length,p=0,d=new Array(f),m=new Array(f),y=+r.apply(this,arguments),g=Math.min(uT,Math.max(-uT,i.apply(this,arguments)-y)),v=Math.min(Math.abs(g)/f,o.apply(this,arguments)),_=v*(g<0?-1:1);for(a=0;a0&&(p+=h);for(null!=e?d.sort((function(t,n){return e(m[t],m[n])})):null!=n&&d.sort((function(t,e){return n(s[t],s[e])})),a=0,u=p?(g-f*_)/p:0;a0?h*u:0)+_,m[c]={data:s[c],index:a,value:h,startAngle:y,endAngle:l,padAngle:v};return m}return s.value=function(e){return arguments.length?(t="function"==typeof e?e:Jk(+e),s):t},s.sortValues=function(t){return arguments.length?(e=t,n=null,s):e},s.sort=function(t){return arguments.length?(n=t,e=null,s):n},s.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Jk(+t),s):r},s.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Jk(+t),s):i},s.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Jk(+t),s):o},s}wT.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var CT=RT(xT);function LT(t){this._curve=t}function RT(t){function e(e){return new LT(t(e))}return e._curve=t,e}function PT(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(RT(t)):e()._curve},t}function IT(){return PT(ST().curve(CT))}function MT(){var t=ET().curve(CT),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return PT(n())},delete t.lineX0,t.lineEndAngle=function(){return PT(r())},delete t.lineX1,t.lineInnerRadius=function(){return PT(i())},delete t.lineY0,t.lineOuterRadius=function(){return PT(o())},delete t.lineY1,t.curve=function(t){return arguments.length?e(RT(t)):e()._curve},t}function DT(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}LT.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};class jT{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}class BT{constructor(t){this._context=t}lineStart(){this._point=0}lineEnd(){}point(t,e){if(t=+t,e=+e,0===this._point)this._point=1;else{const n=DT(this._x0,this._y0),r=DT(this._x0,this._y0=(this._y0+e)/2),i=DT(t,this._y0),o=DT(t,e);this._context.moveTo(...n),this._context.bezierCurveTo(...r,...i,...o)}this._x0=t,this._y0=e}}function FT(t){return new jT(t,!0)}function UT(t){return new jT(t,!1)}function zT(t){return new BT(t)}function VT(t){return t.source}function KT(t){return t.target}function HT(t){let e=VT,n=KT,r=kT,i=TT,o=null,s=null,a=hT(c);function c(){let c;const u=_T.call(arguments),l=e.apply(this,u),h=n.apply(this,u);if(null==o&&(s=t(c=a())),s.lineStart(),u[0]=l,s.point(+r.apply(this,u),+i.apply(this,u)),u[0]=h,s.point(+r.apply(this,u),+i.apply(this,u)),s.lineEnd(),c)return s=null,c+""||null}return c.source=function(t){return arguments.length?(e=t,c):e},c.target=function(t){return arguments.length?(n=t,c):n},c.x=function(t){return arguments.length?(r="function"==typeof t?t:Jk(+t),c):r},c.y=function(t){return arguments.length?(i="function"==typeof t?t:Jk(+t),c):i},c.context=function(e){return arguments.length?(null==e?o=s=null:s=t(o=e),c):o},c}function qT(){return HT(FT)}function WT(){return HT(UT)}function GT(){const t=HT(zT);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const YT=oT(3),$T={draw(t,e){const n=.59436*oT(e+rT(e/28,.75)),r=n/2,i=r*YT;t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-i,-r),t.lineTo(i,r),t.moveTo(-i,r),t.lineTo(i,-r)}},XT={draw(t,e){const n=oT(e/aT);t.moveTo(n,0),t.arc(0,0,n,0,uT)}},ZT={draw(t,e){const n=oT(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},JT=oT(1/3),QT=2*JT,tS={draw(t,e){const n=oT(e/QT),r=n*JT;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},eS={draw(t,e){const n=.62625*oT(e);t.moveTo(0,-n),t.lineTo(n,0),t.lineTo(0,n),t.lineTo(-n,0),t.closePath()}},nS={draw(t,e){const n=.87559*oT(e-rT(e/7,2));t.moveTo(-n,0),t.lineTo(n,0),t.moveTo(0,n),t.lineTo(0,-n)}},rS={draw(t,e){const n=oT(e),r=-n/2;t.rect(r,r,n,n)}},iS={draw(t,e){const n=.4431*oT(e);t.moveTo(n,n),t.lineTo(n,-n),t.lineTo(-n,-n),t.lineTo(-n,n),t.closePath()}},oS=iT(aT/10)/iT(7*aT/10),sS=iT(uT/10)*oS,aS=-eT(uT/10)*oS,cS={draw(t,e){const n=oT(.8908130915292852*e),r=sS*n,i=aS*n;t.moveTo(0,-n),t.lineTo(r,i);for(let e=1;e<5;++e){const o=uT*e/5,s=eT(o),a=iT(o);t.lineTo(a*n,-s*n),t.lineTo(s*r-a*i,a*r+s*i)}t.closePath()}},uS=oT(3),lS={draw(t,e){const n=-oT(e/(3*uS));t.moveTo(0,2*n),t.lineTo(-uS*n,-n),t.lineTo(uS*n,-n),t.closePath()}},hS=oT(3),fS={draw(t,e){const n=.6824*oT(e),r=n/2,i=n*hS/2;t.moveTo(0,-n),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}},pS=-.5,dS=oT(3)/2,mS=1/oT(12),yS=3*(mS/2+1),gS={draw(t,e){const n=oT(e/yS),r=n/2,i=n*mS,o=r,s=n*mS+n,a=-o,c=s;t.moveTo(r,i),t.lineTo(o,s),t.lineTo(a,c),t.lineTo(pS*r-dS*i,dS*r+pS*i),t.lineTo(pS*o-dS*s,dS*o+pS*s),t.lineTo(pS*a-dS*c,dS*a+pS*c),t.lineTo(pS*r+dS*i,pS*i-dS*r),t.lineTo(pS*o+dS*s,pS*s-dS*o),t.lineTo(pS*a+dS*c,pS*c-dS*a),t.closePath()}},vS={draw(t,e){const n=.6189*oT(e-rT(e/6,1.7));t.moveTo(-n,-n),t.lineTo(n,n),t.moveTo(-n,n),t.lineTo(n,-n)}},_S=[XT,ZT,tS,rS,cS,lS,gS],bS=[XT,nS,vS,fS,$T,iS,eS];function wS(t,e){let n=null,r=hT(i);function i(){let i;if(n||(n=i=r()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),i)return n=null,i+""||null}return t="function"==typeof t?t:Jk(t||XT),e="function"==typeof e?e:Jk(void 0===e?64:+e),i.type=function(e){return arguments.length?(t="function"==typeof e?e:Jk(e),i):t},i.size=function(t){return arguments.length?(e="function"==typeof t?t:Jk(+t),i):e},i.context=function(t){return arguments.length?(n=null==t?null:t,i):n},i}function xS(){}function kS(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function TS(t){this._context=t}function SS(t){return new TS(t)}function ES(t){this._context=t}function AS(t){return new ES(t)}function OS(t){this._context=t}function NS(t){return new OS(t)}function CS(t,e){this._basis=new TS(t),this._beta=e}TS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:kS(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:kS(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ES.prototype={areaStart:xS,areaEnd:xS,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:kS(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},OS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:kS(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},CS.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],o=e[0],s=t[n]-i,a=e[n]-o,c=-1;++c<=n;)r=c/n,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*s),this._beta*e[c]+(1-this._beta)*(o+r*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const LS=function t(e){function n(t){return 1===e?new TS(t):new CS(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function RS(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function PS(t,e){this._context=t,this._k=(1-e)/6}PS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:RS(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:RS(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const IS=function t(e){function n(t){return new PS(t,e)}return n.tension=function(e){return t(+e)},n}(0);function MS(t,e){this._context=t,this._k=(1-e)/6}MS.prototype={areaStart:xS,areaEnd:xS,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:RS(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const DS=function t(e){function n(t){return new MS(t,e)}return n.tension=function(e){return t(+e)},n}(0);function jS(t,e){this._context=t,this._k=(1-e)/6}jS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:RS(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const BS=function t(e){function n(t){return new jS(t,e)}return n.tension=function(e){return t(+e)},n}(0);function FS(t,e,n){var r=t._x1,i=t._y1,o=t._x2,s=t._y2;if(t._l01_a>sT){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>sT){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*u+t._x1*t._l23_2a-e*t._l12_2a)/l,s=(s*u+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,o,s,t._x2,t._y2)}function US(t,e){this._context=t,this._alpha=e}US.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:FS(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const zS=function t(e){function n(t){return e?new US(t,e):new PS(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function VS(t,e){this._context=t,this._alpha=e}VS.prototype={areaStart:xS,areaEnd:xS,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:FS(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const KS=function t(e){function n(t){return e?new VS(t,e):new MS(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function HS(t,e){this._context=t,this._alpha=e}HS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:FS(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const qS=function t(e){function n(t){return e?new HS(t,e):new jS(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function WS(t){this._context=t}function GS(t){return new WS(t)}function YS(t){return t<0?-1:1}function $S(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),s=(n-t._y1)/(i||r<0&&-0),a=(o*i+s*r)/(r+i);return(YS(o)+YS(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(a))||0}function XS(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function ZS(t,e,n){var r=t._x0,i=t._y0,o=t._x1,s=t._y1,a=(o-r)/3;t._context.bezierCurveTo(r+a,i+a*e,o-a,s-a*n,o,s)}function JS(t){this._context=t}function QS(t){this._context=new tE(t)}function tE(t){this._context=t}function eE(t){return new JS(t)}function nE(t){return new QS(t)}function rE(t){this._context=t}function iE(t){var e,n,r=t.length-1,i=new Array(r),o=new Array(r),s=new Array(r);for(i[0]=0,o[0]=2,s[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(s[e]-i[e+1])/o[e];for(o[r-1]=(t[r]+i[r-1])/2,e=0;e1)for(var n,r,i,o=1,s=t[e[0]],a=s.length;o=0;)n[e]=e;return n}function fE(t,e){return t[e]}function pE(t){const e=[];return e.key=t,e}function dE(){var t=Jk([]),e=hE,n=lE,r=fE;function i(i){var o,s,a=Array.from(t.apply(this,arguments),pE),c=a.length,u=-1;for(const t of i)for(o=0,++u;o0){for(var n,r,i,o=0,s=t[0].length;o0)for(var n,r,i,o,s,a,c=0,u=t[e[0]].length;c0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=s,r[0]=s+=i):(r[0]=0,r[1]=i)}function gE(t,e){if((n=t.length)>0){for(var n,r=0,i=t[e[0]],o=i.length;r0&&(r=(n=t[e[0]]).length)>0){for(var n,r,i,o=0,s=1;so&&(o=e,r=n);return r}function wE(t){var e=t.map(xE);return hE(t).sort((function(t,n){return e[t]-e[n]}))}function xE(t){for(var e,n=0,r=-1,i=t.length;++r=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var EE="%Y-%m-%dT%H:%M:%S.%LZ",AE=Date.prototype.toISOString?function(t){return t.toISOString()}:Pb(EE);const OE=AE;var NE=+new Date("2000-01-01T00:00:00.000Z")?function(t){var e=new Date(t);return isNaN(e)?null:e}:Ib(EE);const CE=NE;function LE(t,e,n){var r=new eo,i=e;return null==e?(r.restart(t,e,n),r):(r._restart=r.restart,r.restart=function(t,e,n){e=+e,n=null==n?Qi():+n,r._restart((function o(s){s+=i,r._restart(o,i+=e,n),t(s)}),e,n)},r.restart(t,e,n),r)}const RE=t=>()=>t;function PE(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function IE(t,e,n){this.k=t,this.x=e,this.y=n}IE.prototype={constructor:IE,scale:function(t){return 1===t?this:new IE(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new IE(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var ME=new IE(1,0,0);function DE(t){for(;!t.__zoom;)if(!(t=t.parentNode))return ME;return t.__zoom}function jE(t){t.stopImmediatePropagation()}function BE(t){t.preventDefault(),t.stopImmediatePropagation()}function FE(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function UE(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function zE(){return this.__zoom||ME}function VE(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function KE(){return navigator.maxTouchPoints||"ontouchstart"in this}function HE(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],s=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}function qE(){var t,e,n,r=FE,i=UE,o=HE,s=VE,a=KE,c=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],l=250,h=Lg,f=mn("start","zoom","end"),p=500,d=150,m=0,y=10;function g(t){t.property("__zoom",zE).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",S).on("dblclick.zoom",E).filter(a).on("touchstart.zoom",A).on("touchmove.zoom",O).on("touchend.zoom touchcancel.zoom",N).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(t,e){return(e=Math.max(c[0],Math.min(c[1],e)))===t.k?t:new IE(e,t.x,t.y)}function _(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new IE(t.k,r,i)}function b(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function w(t,e,n,r){t.on("start.zoom",(function(){x(this,arguments).event(r).start()})).on("interrupt.zoom end.zoom",(function(){x(this,arguments).event(r).end()})).tween("zoom",(function(){var t=this,o=arguments,s=x(t,o).event(r),a=i.apply(t,o),c=null==n?b(a):"function"==typeof n?n.apply(t,o):n,u=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),l=t.__zoom,f="function"==typeof e?e.apply(t,o):e,p=h(l.invert(c).concat(u/l.k),f.invert(c).concat(u/f.k));return function(t){if(1===t)t=f;else{var e=p(t),n=u/e[2];t=new IE(n,c[0]-e[0]*n,c[1]-e[1]*n)}s.zoom(null,t)}}))}function x(t,e,n){return!n&&t.__zooming||new k(t,e)}function k(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=i.apply(t,e),this.taps=0}function T(t,...e){if(r.apply(this,arguments)){var n=x(this,e).event(t),i=this.__zoom,a=Math.max(c[0],Math.min(c[1],i.k*Math.pow(2,s.apply(this,arguments)))),l=zi(t);if(n.wheel)n.mouse[0][0]===l[0]&&n.mouse[0][1]===l[1]||(n.mouse[1]=i.invert(n.mouse[0]=l)),clearTimeout(n.wheel);else{if(i.k===a)return;n.mouse=[l,i.invert(l)],wo(this),n.start()}BE(t),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),d),n.zoom("mouse",o(_(v(i,a),n.mouse[0],n.mouse[1]),n.extent,u))}}function S(t,...e){if(!n&&r.apply(this,arguments)){var i=t.currentTarget,s=x(this,e,!0).event(t),a=Nr(t.view).on("mousemove.zoom",(function(t){if(BE(t),!s.moved){var e=t.clientX-l,n=t.clientY-h;s.moved=e*e+n*n>m}s.event(t).zoom("mouse",o(_(s.that.__zoom,s.mouse[0]=zi(t,i),s.mouse[1]),s.extent,u))}),!0).on("mouseup.zoom",(function(t){a.on("mousemove.zoom mouseup.zoom",null),Mr(t.view,s.moved),BE(t),s.event(t).end()}),!0),c=zi(t,i),l=t.clientX,h=t.clientY;Ir(t.view),jE(t),s.mouse=[c,this.__zoom.invert(c)],wo(this),s.start()}}function E(t,...e){if(r.apply(this,arguments)){var n=this.__zoom,s=zi(t.changedTouches?t.changedTouches[0]:t,this),a=n.invert(s),c=n.k*(t.shiftKey?.5:2),h=o(_(v(n,c),s,a),i.apply(this,e),u);BE(t),l>0?Nr(this).transition().duration(l).call(w,h,s,t):Nr(this).call(g.transform,h,s,t)}}function A(n,...i){if(r.apply(this,arguments)){var o,s,a,c,u=n.touches,l=u.length,h=x(this,i,n.changedTouches.length===l).event(n);for(jE(n),s=0;s g").attr("transform","".concat(i," ").concat(o))}},{key:"getSourcesId",value:function(t){return this.pluginData.scene.selection.includes(t.subject.datum().data.id)?this.pluginData.scene.selection:[t.subject.datum().data.id]}},{key:"getSourcePosition",value:function(t){var e=this.viewport.select(".".concat(t," .model"));return{x:parseFloat(e.attr("x")),y:parseFloat(e.attr("y"))}}},{key:"getTargetsByDepth",value:function(t){var e=this,n=t.subject.datum().data.id,r=t.sourceEvent,i=r.clientX,o=r.clientY,s=[];return this.viewport.selectAll("g.component.container:not(.".concat(n,")")).each((function(t){var n=e.viewport.select(".".concat(t.data.id," .background")).node().getBoundingClientRect(),r=n.x,a=n.y,c=n.width,u=n.height;if(i>=r&&i<=r+c&&o>=a&&o<=a+u){for(var l=parseInt(e.viewport.select(".".concat(t.data.id)).attr("depth"),10)-1;s.length<=l;)s.push([]);s[l].push(t.data.id)}})),s}},{key:"getTargetsId",value:function(t){return this.getTargetsByDepth(t).flat().reverse()}},{key:"getTargetId",value:function(t){return this.getTargetsId(t)[0]}},{key:"getTransform",value:function(t,e){var n=this.viewport.select(t).node().getBoundingClientRect(),r=n.x,i=n.y,o=this.viewport.select(e).node().getBoundingClientRect();return{dx:r-o.x,dy:i-o.y}}}],e&&function(t,e){for(var n=0;nh?p:h),r.attr("height",d>f?d:f);var m=this.viewport.select(".".concat(e.data.id," .components-background")),y=m.node().getBoundingClientRect();return h=Math.max((s-y.x)/n,e.data.definition.minWidth-e.data.definition.reservedWidth),f=Math.max((a-y.y)/n,e.data.definition.minHeight-e.data.definition.reservedHeight),p=(u-y.x)/n,d=(l-y.y)/n,m.attr("width",p>h?p:h),m.attr("height",d>f?d:f),!1}},{key:"finalize",value:function(t){var e=t.subject.datum().data.id,n=this.viewport.select(".".concat(e," .model")),r=this.pluginData.getComponentById(e);return r.drawOption.width=parseFloat(n.attr("width")),r.drawOption.height=parseFloat(n.attr("height")),this.pluginData.emitEvent({components:[e],type:"Drawer",action:"resize",status:"success"}),!0}},{key:"getMaxPosition",value:function(t){var e=this,n=this.pluginData.getComponentById(t),r=0,i=0;return this.pluginData.getChildren(t).forEach((function(t){var o=e.viewport.select(".".concat(t.id," .model")).node().getBoundingClientRect(),s=o.x,a=o.y,c=o.width,u=o.height;r=Math.max(r,s+c+n.definition.margin),i=Math.max(i,a+u+n.definition.margin)})),{x:r,y:i}}}],r&&function(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=Array(e);nt.length)&&(e=t.length);for(var n=0,r=Array(e);n0&&this.pluginData.emitEvent({components:o,type:"Drawer",action:"move",status:"success"}),s.length>0&&this.pluginData.emitEvent({components:s,type:"Drawer",action:"resize",status:"success"}),!0}},{key:"getNodes",value:function(){var t=this,e={id:"root",parent:null,children:[],depth:0,type:"default",isContainer:!0,margin:this.pluginData.configuration.rootContainer.margin,gap:this.pluginData.configuration.rootContainer.gap},n=new Map(this.pluginData.components.map((function(e){return[e.id,t.createNode(e)]})));return n.set("root",e),n.forEach((function(t){if(t.parent){var e=n.get(t.parent);t.parent=e,e.children.push(t)}})),n}},{key:"createNode",value:function(t){return{id:t.id,parent:t.getContainerId()||"root",type:t.definition.displayType||"default",direction:t.definition.workflowDirection,children:[],depth:this.pluginData.getComponentDepth(t.id)+1,isContainer:t.definition.isContainer,width:t.definition.defaultWidth,height:t.definition.defaultHeight,minWidth:t.definition.minWidth,minHeight:t.definition.minHeight,reservedWidth:t.definition.reservedWidth,reservedHeight:t.definition.reservedHeight,margin:t.definition.margin,gap:t.definition.gap,x:t.drawOption.x,y:t.drawOption.y}}},{key:"generateLayout",value:function(t,e,n){var r=this;e.children.forEach((function(e){r.generateLayout(t,e,n)})),e.isContainer&&"default"===e.type?this.generateDefaultLayout(e,n):e.isContainer&&this.generateWorkflowLayout(t,e)}},{key:"generateDefaultLayout",value:function(t,e){this.text=0;var n=[],r=[],i=t.margin,o=t.gap,s=t.minWidth,a=t.minHeight,c=t.reservedWidth,u=t.reservedHeight,l=0,h=0;t.children.forEach((function(t){t.x&&t.y&&e?(n.push(t),l=Math.max(t.x+t.width,l),h=Math.max(t.y+t.height,h)):r.push(t)}));for(var f,p=0,d=0,m=this.getPoints(p,i,o);r.length>0;)f||(f=r[0]),0===m.length&&(d=0,p+=1,m=this.getPoints(p,i,o)),m.length>0&&this.canBePlaced(n,f,m[d])&&(f.x=m[d].x,f.y=m[d].y,l=Math.max(f.x+f.width,l),h=Math.max(f.y+f.height,h),n.push(f),r.shift(),f=null),(d+=1)>=m.length&&(d=0,p+=1,m=this.getPoints(p,i,o));t.width=Math.max(l+i+c,s),t.height=Math.max(h+i+u,a)}},{key:"canBePlaced",value:function(t,e,n){return t.every((function(t){var r=t.x,i=t.y,o=t.width,s=t.height,a=n.x+e.widthr+o,u=n.y+e.heighti+s;return a||c||u||l}))}},{key:"getPoints",value:function(t,e,n){if(0===t)return[{x:e,y:e}];for(var r=e+n*t,i=e+n*t,o=[],s=e,a=e;a<=r&&(a!==r||i!==s);)o.push({x:a,y:i}),a+=n,o.push({x:r,y:s}),s+=n;return o.push({x:r,y:i}),o}},{key:"generateWorkflowLayout",value:function(t,e){"vertical"===e.direction?this.generateVerticalWorkflowLayout(t,e):this.generateHorizontalWorkflowLayout(t,e)}},{key:"generateHorizontalWorkflowLayout",value:function(t,e){var n=e.margin,r=e.gap,i=e.minWidth,o=e.minHeight,s=e.reservedWidth,a=e.reservedHeight,c=n,u=0;e.children.forEach((function(t){t.x=c,t.y=n,c=t.x+t.width+r,t.height>u&&(u=t.height)})),e.width=Math.max(c-r+n+s,i),e.height=Math.max(u+2*n+a,o)}},{key:"generateVerticalWorkflowLayout",value:function(t,e){var n=e.margin,r=e.gap,i=e.minWidth,o=e.minHeight,s=e.reservedWidth,a=e.reservedHeight,c=n,u=0;e.children.forEach((function(t){t.x=n,t.y=c,c=t.y+t.height+r,t.width>u&&(u=t.width)})),e.width=Math.max(u+2*n+s,i),e.height=Math.max(c-r+n+a,o)}},{key:"resize",value:function(t){var e=this.pluginData.getComponentById(t);if(!e.definition.isContainer)return!1;var n=0,r=0;this.pluginData.getChildren(t).forEach((function(t){var e=t.drawOption.x+t.drawOption.width,i=t.drawOption.y+t.drawOption.height;e>n&&(n=e),i>r&&(r=i)}));var i=e.definition,o=i.minWidth,s=i.minHeight,a=i.reservedWidth,c=i.reservedHeight,u=i.margin,l=Math.max(n+2*u+a,o),h=Math.max(r+2*u+c,s);return l===e.drawOption.width&&h===e.drawOption.height||(e.drawOption.width=l,e.drawOption.height=h,this.pluginData.emitEvent({components:[t],type:"Drawer",action:"resize",status:"success"})),!0}}],r&&function(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=Array(e);n=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var c=r.call(s,"catchLoc"),u=r.call(s,"finallyLoc");if(c&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),N(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;N(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),y}},e}function nN(t,e,n,r,i,o,s){try{var a=t[o](s),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,i)}function rN(t){var e=function(t,e){if("object"!=$O(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=$O(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==$O(e)?e:e+""}var iN=function(){return e=function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.pluginData=n,this.componentRenderer=null,this.linkRenderer=null,this.layout=null,this.viewport=null,this.scene=null,this.d3=t,this.actions={deleteAction:null,dragComponent:null,dragScene:null,linkAction:null,menuAction:null,resizeComponent:null,toggleSelection:null,selectionAll:null,deselectionAll:null,zoom:null},this.states={linking:!1,menuOpening:!1,moving:!1,resizing:!1,selection:!1},this.readOnly=!1},n=[{key:"init",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.d3.select("#".concat(t)).selectAll(null).remove(),this.d3.select("#".concat(t)).html(""),this.viewport=this.d3.select("#".concat(t)),this.componentRenderer=this.initComponentRenderer(e),this.linkRenderer=this.initLinkRenderer(e),this.layout=new YO(this.pluginData,this.viewport),this.readOnly=e,this.clearActions(),this.readOnly&&(this.pluginData.scene.x=0,this.pluginData.scene.y=0,this.pluginData.scene.zoom=1),this.initActions(),this.initScene()}},{key:"initComponentRenderer",value:function(t){return new PO(this.pluginData,this.viewport,t)}},{key:"initLinkRenderer",value:function(t){return new jO(this.pluginData,this.viewport,t)}},{key:"clearActions",value:function(){this.actions.deleteAction=null,this.actions.dragComponent=null,this.actions.dragScene=null,this.actions.menuAction=null,this.actions.resizeComponent=null,this.actions.toggleSelection=null,this.actions.selectionAll=null,this.actions.deselectionAll=null,this.actions.zoom=null,this.viewport.on("wheel",null),this.d3.select("body").on("keydown",null).on("keyup",null),this.viewport.on(".drag",null)}},{key:"initActions",value:function(){var t=this;this.actions.selectionAll=new gO(this.pluginData,this.viewport,this.layout),this.actions.deleteAction=new rA(this.pluginData,this.viewport,this.layout),this.actions.dragScene=new _A(this.pluginData,this.viewport,this.layout),this.actions.menuAction=new MA(this.pluginData,this.viewport,this.layout),this.actions.link=new AA(this.pluginData,this.viewport,this.layout),this.actions.zoom=new SO(this.pluginData,this.viewport,this.layout),this.actions.dragComponent=new hA(this.pluginData,this.viewport,this.layout),this.actions.resizeComponent=new KA(this.pluginData,this.viewport,this.layout),this.actions.toggleSelection=new QA(this.pluginData,this.viewport,this.layout),this.actions.deselectionAll=new aO(this.pluginData,this.viewport,this.layout),this.viewport.on("wheel",(function(e){t.actions.zoom.execute(e)&&t.draw()})),this.readOnly||this.d3.select("body").on("keydown",(function(e){var n=!1;t.pluginData.configuration.keysBinding.selection.includes(e.key)&&(t.states.selection=!0),t.pluginData.configuration.keysBinding.deleteObject.includes(e.key)&&(n=t.actions.deleteAction.execute(e)),t.pluginData.configuration.keysBinding.selectAll.includes(e.key)&&(n=t.actions.selectionAll.execute(e)),t.pluginData.configuration.keysBinding.deselectAll.includes(e.key)&&(n=t.actions.deselectionAll.execute(e)),n&&t.draw()})).on("keyup",(function(e){var n=!1;t.pluginData.configuration.keysBinding.selection.includes(e.key)&&(t.states.selection=!1),t.pluginData.configuration.keysBinding.deleteObject.includes(e.key)&&(n=t.actions.deleteAction.finalize(e)),t.pluginData.configuration.keysBinding.selectAll.includes(e.key)&&(n=t.actions.selectionAll.finalize(e)),t.pluginData.configuration.keysBinding.deselectAll.includes(e.key)&&(n=t.actions.deselectionAll.finalize(e)),n&&t.draw()}));var e=this.d3.drag().subject((function(e){var n=e.sourceEvent.target.closest(".component");if(t.states.resizing=!!e.sourceEvent.target.closest(".resize-button"),t.states.menuOpening=!!e.sourceEvent.target.closest(".menu-button"),!n)return t.scene;var r=t.viewport.select(Array.from(n.classList).map((function(t){return".".concat(t)})).join(""));return t.states.linking=!!e.sourceEvent.target.closest(".anchor")&&t.pluginData.canHaveLink(r.datum().data.definition.type),r})).on("drag",(function(e){t.states.moving=!0;var n="scene"===e.subject.datum().data.id,r=!1;t.readOnly?t.actions.dragScene.execute(e):(n?r=t.actions.dragScene.execute(e):t.states.linking?(r=t.actions.link.execute(e),t.linkRenderer.render()):t.states.resizing?(r=t.actions.resizeComponent.execute(e),t.linkRenderer.render()):(r=t.actions.dragComponent.execute(e),t.linkRenderer.render()),r&&t.draw())})).on("end",function(){var e,n=(e=eN().mark((function e(n){var r,i,o,s,a,c,u;return eN().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.states.moving,i=t.states.selection,o=t.states.menuOpening,s=t.states.resizing,a=t.states.linking,c="scene"===n.subject.datum().data.id,u=!1,!t.readOnly){e.next=10;break}return c&&r&&t.actions.dragScene.finalize(n),e.abrupt("return");case 10:a?u=t.actions.link.finalize(n):r&&c?u=t.actions.dragScene.finalize(n):s?u=t.actions.resizeComponent.finalize(n):r&&!c?u=t.actions.dragComponent.finalize(n):!r&&o?u=t.actions.menuAction.finalize(n):r||c||!i||(u=t.actions.toggleSelection.finalize(n)),u&&t.draw(),t.states.moving=!1;case 13:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(t){nN(o,r,i,s,a,"next",t)}function a(t){nN(o,r,i,s,a,"throw",t)}s(void 0)}))});return function(t){return n.apply(this,arguments)}}());this.viewport.call(e)}},{key:"getScene",value:function(){return this.viewport.selectAll(".scene").data(this.getSceneData()).join("svg").attr("class","scene").attr("width","100%").attr("height","100%")}},{key:"initScene",value:function(){var t=this;this.viewport.append("style").text(this.pluginData.resources.style),this.scene=this.getScene(),this.scene.attr("version","1.1"),this.scene.attr("xmlns","http://www.w3.org/2000/svg"),this.scene.append("defs").html(Object.keys(this.pluginData.resources.markers).map((function(e){return t.pluginData.resources.markers[e]})).join(""));var e=this.pluginData.scene,n=e.x,r=e.y,i=e.zoom,o="translate(".concat(n," ").concat(r,") scale(").concat(i,")");this.scene.append("g").attr("class","components").attr("transform",o),this.scene.append("g").attr("class","links").attr("transform",o)}},{key:"draw",value:function(){if(this.scene=this.getScene(),this.componentRenderer.render("scene"),this.linkRenderer.render("scene"),this.readOnly){for(var t=this.viewport.node().getBoundingClientRect(),e=t.width,n=t.height,r=this.viewport.select(".scene .components").node().getBBox(),i=r.width,o=r.height,s=r.x,a=r.y,c=e/ic;)u*=.9;this.scene.attr("viewBox","".concat(s-15," ").concat(a-15," ").concat(i+s+15," ").concat(o+a+15)),this.pluginData.scene.zoom=u}}},{key:"arrangeComponentsPosition",value:function(t,e){this.layout.generateComponentsLayout(t,e)}},{key:"resize",value:function(t){this.layout.resize(t)}},{key:"getSceneData",value:function(){var t=this;return[this.d3.hierarchy(QO({id:"scene",name:"",children:XO(this.pluginData.components.filter((function(t){return null===t.getContainerId()})))},this.pluginData.scene),(function(e){return"scene"===e.id?e.children:t.pluginData.getChildren(e.id)}))]}},{key:"dropComponent",value:function(t,e){var n=e.target.closest(".component");if(t.drawOption.width=t.definition.width,t.drawOption.height=t.definition.height,!n){var r=this.viewport.select(".scene").node().getBoundingClientRect(),i=r.x,o=r.y;return t.drawOption.x=(e.clientX-i-this.pluginData.scene.x)/this.pluginData.scene.zoom-t.definition.defaultWidth/2,void(t.drawOption.y=(e.clientY-o-this.pluginData.scene.y)/this.pluginData.scene.zoom-t.definition.defaultHeight/2)}if(n.canContain(t.definition.type)){var s=this.viewport.select(".".concat(t.id,".container")).node().getBoundingClientRect(),a=s.x,c=s.y;t.drawOption.x=(e.clientX-a-this.pluginData.scene.x)/this.pluginData.scene.zoom-t.definition.defaultWidth/2,t.drawOption.y=(e.clientY-c-this.pluginData.scene.y)/this.pluginData.scene.zoom-t.definition.defaultHeight/2}}},{key:"exportSvg",value:function(){return this.viewport.selectAll(".scene > g").attr("transform",""),document.querySelector("#view-port .scene").outerHTML}}],n&&function(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[]).map((function(t){return t.path}))}},{key:"parseConfiguration",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=this.pluginData.emitEvent({parent:r,type:"Parser",action:"read",status:"running",files:[e.path],data:{global:!1}});if(null!=e.content){var o=JSON.parse(e.content);o[t.path]?o[t.path][this.pluginData.name]?(Object.keys(o[t.path][this.pluginData.name]).forEach((function(e){var r=n.pluginData.getComponentByConfigurationKey(e);r&&o[t.path][n.pluginData.name][e]&&(r.drawOption=new f(o[t.path][n.pluginData.name][e]))})),this.pluginData.emitEvent({id:i,status:"success"})):this.pluginData.emitEvent({id:i,status:"warning",data:{code:"no_plugin_content",global:!1}}):this.pluginData.emitEvent({id:i,status:"warning",data:{code:"no_diagram_content",global:!1}})}else this.pluginData.emitEvent({id:i,status:"warning",data:{code:"no_content",global:!1}})}},{key:"isParsable",value:function(t){return null!=t}}],e&&function(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:null,e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce((function(t,e){return t[e.path]="",t}),{});return this.renderFiles(t).forEach((function(t){e[t.path]=t.content})),Object.keys(e).map((function(t){return new H({path:t,content:e[t]})}))}},{key:"renderFiles",value:function(){return[]}},{key:"renderConfiguration",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=this.pluginData.emitEvent({parent:r,type:"Render",action:"write",status:"running",files:[e.path],data:{global:!1}}),o=JSON.parse(e.content)||{};o[t.path]||(o[t.path]={}),o[t.path][this.pluginData.name]={},this.pluginData.components.filter((function(t){return t.drawOption})).forEach((function(e){var r=e.getConfigurationKey();o[t.path][n.pluginData.name][r]=e.drawOption})),e.content=JSON.stringify(o,(function(t,e){return null===e?void 0:e}),2),this.pluginData.emitEvent({id:i,status:"success"})}}],e&&function(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"Error happened when trying to parse.",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"Error";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,n){return e=xN(e),function(t,e){if(e&&("object"==vN(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,bN()?Reflect.construct(e,n||[],xN(t).constructor):e.apply(t,n))}(this,e,[n||"Error happened when trying to parse."])).name="ParseError",t.startLine=r||0,t.startColumn=i||0,t.endLine=o||0,t.endColumn=s||0,t.severity=a||"Error",t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wN(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(_N(Error));const TN=kN;var SN=function(t,e,n){return Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:null,parentId:null,files:null,components:null,links:null,type:null,action:null,status:null,data:null};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=e.id,r=e.parentId,i=e.files,o=e.components,s=e.links,a=e.type,c=e.action,u=e.status,l=e.data;this.id=n||null,this.parentId=r||null,this.startDate=null,this.endDate=null,this.files=i||null,this.components=o||null,this.links=s||null,this.type=a||null,this.action=c||null,this.status=u||null,this.data=l||null}));const EN=SN;function AN(t){return AN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},AN(t)}function ON(t,e,n){return e=CN(e),function(t,e){if(e&&("object"==AN(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,NN()?Reflect.construct(e,n||[],CN(t).constructor):e.apply(t,n))}function NN(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(NN=function(){return!!t})()}function CN(t){return CN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},CN(t)}function LN(t,e){return LN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},LN(t,e)}var RN=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{anchorName:null};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=ON(this,e,[n])).anchorName=n.anchorName||null,t.endX=null,t.endY=null,t.isTemporary=!0,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&LN(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(M);const PN=RN;function IN(t){return IN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},IN(t)}function MN(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n1&&void 0!==arguments[1]?arguments[1]:{name:null,version:null,components:[],variables:[],definitions:{components:[],links:[]},parseErrors:[],resources:{},scene:{x:0,y:0,zoom:1,selection:[],selectionRef:null}},m=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.name=d.name||null,this.version=d.version||null,this.components=d.components||[],this.scene={x:(null===(n=d.scene)||void 0===n?void 0:n.x)||0,y:(null===(r=d.scene)||void 0===r?void 0:r.y)||0,zoom:(null===(i=d.scene)||void 0===i?void 0:i.zoom)||1,selection:(null===(o=d.scene)||void 0===o?void 0:o.selection)||[],selectionRef:(null===(s=d.scene)||void 0===s?void 0:s.selectionRef)||null},this.variables=d.variables||[],this.definitions={components:(null===(a=d.definitions)||void 0===a?void 0:a.components)||[],links:(null===(c=d.definitions)||void 0===c?void 0:c.links)||[]},this.parseErrors=d.parseErrors||[],this.__eventIndex=0,this.eventManager=m,this.eventLogs=[],this.configuration=e,this.resources={icons:jN({},null===(u=d.resources)||void 0===u?void 0:u.icons),markers:jN({},null===(l=d.resources)||void 0===l?void 0:l.markers),links:jN({},null===(h=d.resources)||void 0===h?void 0:h.links),models:jN({},null===(f=d.resources)||void 0===f?void 0:f.models),style:(null===(p=d.resources)||void 0===p?void 0:p.style)||""},this.temporaryLink=null},e=[{key:"coreVersion",get:function(){return"0.25.0"}},{key:"getComponentById",value:function(t){return this.components.find((function(e){return e.id===t}))||null}},{key:"getComponentDepth",value:function(t){var e=this.getComponentById(t).getContainerId();return e?this.getComponentDepth(e)+1:0}},{key:"getComponentByConfigurationKey",value:function(t){return this.getComponentById(t)}},{key:"renameComponentExternalId",value:function(t,e){this.getComponentById(t).setExternalId(e)}},{key:"getComponentsByType",value:function(t){return this.components.filter((function(e){var n=e.definition;return n&&n.type===t}))}},{key:"addComponent",value:function(t,e){var n=this.generateComponentId();return this.components.push(new b({id:n,name:n,definition:t,path:e})),n}},{key:"generateComponentId",value:function(){var t=this.components.map((function(t){return t.id})).filter((function(t){return new RegExp("".concat("id_","\\d+")).test(t)})).map((function(t){return parseInt(t.substring(3),10)})),e=0===t.length?1:Math.max.apply(Math,function(t){return function(t){if(Array.isArray(t))return MN(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return MN(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?MN(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t))+1;return"".concat("id_").concat(e)}},{key:"removeComponentById",value:function(t){var e=this;this.getChildren(t).forEach((function(t){return e.removeComponentById(t.id)})),this.components=this.components.filter((function(e){return e.id!==t})),this.components.forEach((function(e){e.removeLinkAttribute(t)}))}},{key:"removeLink",value:function(t){var e=t.source,n=t.target,r=t.definition.attributeRef;this.getComponentById(e).removeLinkAttribute(n,r)}},{key:"getLinks",value:function(){var t=this,e=[];return this.definitions.links.forEach((function(n){t.getComponentsByType(n.sourceRef).forEach((function(r){var i=r.getAttributeByName(n.attributeRef);i&&t.getLinkedComponentsIds(i).forEach((function(t){return e.push(new M({definition:n,source:r.id,target:t,isReverse:"Reverse"===i.definition.linkType}))}))}))})),this.temporaryLink&&e.push(this.temporaryLink),e.concat(this.getWorkflowLinks())}},{key:"getAttributeValue",value:function(t){return t.isVariable?this.getVariableValue(t.value):t.value}},{key:"getLinkedComponentsIds",value:function(t){var e=this.getAttributeValue(t);return null===e?[]:Array.isArray(e)?e:[e]}},{key:"getVariableValue",value:function(t){var e;return(null===(e=this.variables.find((function(e){return e.name===t})))||void 0===e?void 0:e.value)||null}},{key:"setVariableValue",value:function(t,e){var n=this.variables.find((function(e){return e.name===t}));n&&(n.value=e)}},{key:"getComponentIdFromValue",value:function(t){return t}},{key:"canHaveLink",value:function(t){return this.definitions.links.some((function(e){return e.sourceRef===t}))}},{key:"canBeLinked",value:function(t,e){return this.definitions.links.some((function(n){var r=n.sourceRef,i=n.targetRef;return r===t&&i===e}))}},{key:"createTemporaryLink",value:function(t,e){this.temporaryLink=new PN({anchorName:e,source:t,definition:this.definitions.links.find((function(t){return t.isTemporary}))})}},{key:"getWorkflowLinks",value:function(){var t=this;return this.components.filter((function(t){var e;return null===(e=t.definition.displayType)||void 0===e?void 0:e.match("workflow")})).reduce((function(e,n){var r=t.getChildren(n.id);if(r.length>1)for(var i=0;in,this.components.splice(i,0,r),this.components.splice(n+(it}))}},{key:"emitEvent",value:function(){var t,e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.id;return r?(e=this.getEventLogById(r),Object.keys(n).forEach((function(t){e[t]=n[t]}))):(this.__eventIndex+=1,r=this.__eventIndex,(e=new EN(jN(jN({},n),{},{id:r}))).startDate=Date.now(),this.eventLogs.push(e)),["success","warning","error"].includes(e.status)&&(e.endDate=Date.now()),null!==(t=this.eventManager)&&void 0!==t&&t.next&&this.eventManager.next({plugin:this.name,event:jN({},e)}),r}}],e&&function(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{editor:{syntax:null},restrictiveFolder:null,defaultFileName:null,defaultFileExtension:null,tags:[],isFolderTypeDiagram:!0,extraResources:[],rootContainer:{margin:30,gap:50},container:{margin:30,gap:50},keysBinding:{}};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.editor=HN({syntax:null},s.editor),this.restrictiveFolder=s.restrictiveFolder||null,this.defaultFileName=s.defaultFileName||null,this.defaultFileExtension=s.defaultFileExtension||null,this.tags=s.tags||[],this.isFolderTypeDiagram=null===(e=s.isFolderTypeDiagram)||void 0===e||e,this.extraResources=s.extraResources||[],this.rootContainer={margin:(null===(n=s.rootContainer)||void 0===n?void 0:n.margin)||30,gap:(null===(r=s.rootContainer)||void 0===r?void 0:r.gap)||50},this.container={margin:(null===(i=s.container)||void 0===i?void 0:i.margin)||30,gap:(null===(o=s.container)||void 0===o?void 0:o.gap)||50},this.keysBinding=HN({moveSceneUp:["ArrowUp"],moveSceneDown:["ArrowDown"],moveSceneLeft:["ArrowLeft"],moveSceneRight:["ArrowRight"],moveComponentUp:[],moveComponentDown:[],moveComponentLeft:[],moveComponentRight:[],zoomIn:["+"],zoomOut:["-"],deleteObject:["Delete"],editComponent:[",","?"],selection:["Shift"],selectAll:["A"],deselectAll:["D"]},s.keysBinding)}));const YN=GN;function $N(t){return $N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$N(t)}function XN(t){var e=function(t,e){if("object"!=$N(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=$N(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==$N(e)?e:e+""}var ZN=function(){return t=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{event:null,configuration:null,pluginData:null,pluginDrawer:null,pluginMetadata:null,pluginParser:null,pluginRenderer:null};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.configuration=e.configuration||new YN,this.data=e.pluginData||new zN(this.configuration,{},e.event),this.__drawer=e.pluginDrawer||new oN(this.data),this.__metadata=e.pluginMetadata||new uN(this.data),this.__parser=e.pluginParser||new pN(this.data),this.__renderer=e.pluginRenderer||new gN(this.data)},e=[{key:"init",value:function(){var t=this.data.emitEvent({type:"Plugin",action:"init",status:"running"});this.__metadata.parse(t),this.data.initLinkDefinitions(t),this.data.emitEvent({id:t,status:"success"})}},{key:"initResources",value:function(t){this.data.resources=t}},{key:"initDrawer",value:function(t,e){this.__drawer.init(t,e)}},{key:"draw",value:function(){this.__drawer.draw()}},{key:"parse",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=this.data.emitEvent({type:"Parser",action:"read",status:"running",files:n.map((function(t){return t.path})).concat(null==e?void 0:e.path),data:{global:!0}});this.__parser.parse(t,n,r),this.__parser.parseConfiguration(t,e,r),this.data.emitEvent({id:r,status:"success"})}},{key:"isParsable",value:function(t){return this.__parser.isParsable(t)}},{key:"getModels",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return this.__parser.getModels(e.filter((function(e){return t.isParsable(e)})))}},{key:"render",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=this.data.emitEvent({type:"Render",action:"write",status:"running",files:n.map((function(t){return t.path})).concat(e.path),data:{global:!0}});this.__renderer.renderConfiguration(t,e,r);var i=this.__renderer.render(n,r).concat(e);return this.data.emitEvent({id:r,status:"success"}),i}},{key:"arrangeComponentsPosition",value:function(t,e){this.__drawer.arrangeComponentsPosition(t,e)}},{key:"resize",value:function(t){this.__drawer.resize(t)}},{key:"exportSvg",value:function(t){this.__drawer.init(t,!0),this.draw();var e=this.__drawer.exportSvg();return this.__drawer.init(t,!1),this.draw(),e}},{key:"getComponentPosition",value:function(t,e){var n=e.x,r=e.y,i=this.__drawer.actions.zoom,o=i.scale,s=i.translate,a=document.querySelector("#".concat(t)).getBoundingClientRect(),c=a.left,u=a.top;return{x:(n-c-s.x)/o,y:(r-u-s.y)/o}}},{key:"addComponent",value:function(t,e,n,r){var i=this.data.addComponent(e,n),o=this.data.getComponentById(i);if(t){var s=this.data.getComponentById(t);o.setReferenceAttribute(s)}return r&&this.__drawer.dropComponent(o,r),i}}],e&&function(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{type:null,value:null};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=e.type,r=e.value;this.type=n||null,this.value=r||null}));const tC=QN;function eC(t){return eC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},eC(t)}function nC(t,e,n){return e=iC(e),function(t,e){if(e&&("object"==eC(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,rC()?Reflect.construct(e,n||[],iC(t).constructor):e.apply(t,n))}function rC(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(rC=function(){return!!t})()}function iC(t){return iC=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},iC(t)}function oC(t,e){return oC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},oC(t,e)}var sC=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{name:null,type:null,value:null,category:null};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t=nC(this,e,[n]);var r=n.name,i=n.type,o=n.value,s=n.category;return t.__class="Variable",t.name=r||null,t.type=i||null,t.value=o||null,t.category=s||null,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&oC(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(l);const aC=sC})();var o=e;for(var s in i)o[s]=i[s];i.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})()},326:function(t){var e;"undefined"!=typeof self&&self,e=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=11)}([function(t,e,n){"use strict";var r=Array.prototype,i=Object.prototype,o={"&":"&",'"':""","'":"'","<":"<",">":">","\\":"\"},s=/[&"'<>\\]/g;function a(t,e){return i.hasOwnProperty.call(t,e)}function c(t){return o[t]}function u(t,e,n){var r,i,o;if(t instanceof Error&&(t=(i=t).name+": "+i.message),Object.setPrototypeOf?(r=new Error(t),Object.setPrototypeOf(r,u.prototype)):(r=this,Object.defineProperty(r,"message",{enumerable:!1,writable:!0,value:t})),Object.defineProperty(r,"name",{value:"Template render error"}),Error.captureStackTrace&&Error.captureStackTrace(r,this.constructor),i){var s=Object.getOwnPropertyDescriptor(i,"stack");(o=s&&(s.get||function(){return s.value}))||(o=function(){return i.stack})}else{var a=new Error(t).stack;o=function(){return a}}return Object.defineProperty(r,"stack",{get:function(){return o.call(r)}}),Object.defineProperty(r,"cause",{value:i}),r.lineno=e,r.colno=n,r.firstUpdate=!0,r.Update=function(t){var e="("+(t||"unknown path")+")";return this.firstUpdate&&(this.lineno&&this.colno?e+=" [Line "+this.lineno+", Column "+this.colno+"]":this.lineno&&(e+=" [Line "+this.lineno+"]")),e+="\n ",this.firstUpdate&&(e+=" "),this.message=e+(this.message||""),this.firstUpdate=!1,this},r}function l(t){return"[object Function]"===i.toString.call(t)}function h(t){return"[object Array]"===i.toString.call(t)}function f(t){return"[object String]"===i.toString.call(t)}function p(t){return"[object Object]"===i.toString.call(t)}function d(t){var e,n=(e=t)?"string"==typeof e?e.split("."):[e]:[];return function(t){for(var e=t,r=0;rt.length)s=i.slice(0,t.length),i.slice(s.length,u).forEach((function(t,n){n2?i-2:0),s=2;s0||!n)&&process.stdout.write(" ".repeat(e));var o=i===r.length-1?"":"\n";process.stdout.write(""+t+o)}))}t.exports={Node:c,Root:h,NodeList:l,Value:u,Literal:f,Symbol:p,Group:d,Array:m,Pair:y,Dict:g,Output:U,Capture:z,TemplateData:V,If:_,IfAsync:b,InlineIf:w,For:x,AsyncEach:k,AsyncAll:T,Macro:S,Caller:E,Import:A,FromImport:O,FunCall:N,Filter:C,FilterAsync:L,KeywordArgs:R,Block:P,Super:I,Extends:M,Include:D,Set:j,Switch:B,Case:F,LookupVal:v,BinOp:H,In:q,Is:W,Or:G,And:Y,Not:$,Add:X,Concat:Z,Sub:J,Mul:Q,Div:tt,FloorDiv:et,Mod:nt,Pow:rt,Neg:it,Pos:ot,Compare:st,CompareOperand:at,CallExtension:ct,CallExtensionAsync:ut,printNodes:function t(e,n){if(n=n||0,lt(e.typename+": ",n),e instanceof l)lt("\n"),e.children.forEach((function(e){t(e,n+2)}));else if(e instanceof ct)lt(e.extName+"."+e.prop+"\n"),e.args&&t(e.args,n+2),e.contentArgs&&e.contentArgs.forEach((function(e){t(e,n+2)}));else{var r=[],i=null;e.iterFields((function(t,e){t instanceof c?r.push([e,t]):(i=i||{})[e]=t})),i?lt(JSON.stringify(i,null,2)+"\n",null,!0):lt("\n"),r.forEach((function(e){var r=e[0],i=e[1];lt("["+r+"] =>",n+2),t(i,n+4)}))}}}},function(t,e){},function(t,e,n){"use strict";function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}var i=n(8),o=n(17),s=n(3),a=n(0).TemplateError,c=n(2).Frame,u=n(1).Obj,l={"==":"==","===":"===","!=":"!=","!==":"!==","<":"<",">":">","<=":"<=",">=":">="},h=function(t){var e,n;function i(){return t.apply(this,arguments)||this}n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,r(e,n);var o=i.prototype;return o.init=function(t,e){this.templateName=t,this.codebuf=[],this.lastId=0,this.buffer=null,this.bufferStack=[],this._scopeClosers="",this.inBlock=!1,this.throwOnUndefined=e},o.fail=function(t,e,n){throw void 0!==e&&(e+=1),void 0!==n&&(n+=1),new a(t,e,n)},o._pushBuffer=function(){var t=this._tmpid();return this.bufferStack.push(this.buffer),this.buffer=t,this._emit("var "+this.buffer+' = "";'),t},o._popBuffer=function(){this.buffer=this.bufferStack.pop()},o._emit=function(t){this.codebuf.push(t)},o._emitLine=function(t){this._emit(t+"\n")},o._emitLines=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r0&&i._emit(","),i.compile(t,e)})),r&&this._emit(r)},o._compileExpression=function(t,e){this.assertType(t,s.Literal,s.Symbol,s.Group,s.Array,s.Dict,s.FunCall,s.Caller,s.Filter,s.LookupVal,s.Compare,s.InlineIf,s.In,s.Is,s.And,s.Or,s.Not,s.Add,s.Concat,s.Sub,s.Mul,s.Div,s.FloorDiv,s.Mod,s.Pow,s.Neg,s.Pos,s.Compare,s.NodeList),this.compile(t,e)},o.assertType=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r0&&r._emit(","),t){r._emitLine("function(cb) {"),r._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}");var i=r._pushBuffer();r._withScopedSyntax((function(){r.compile(t,e),r._emitLine("cb(null, "+i+");")})),r._popBuffer(),r._emitLine("return "+i+";"),r._emitLine("}")}else r._emit("null")})),n){var c=this._tmpid();this._emitLine(", "+this._makeCallback(c)),this._emitLine(this.buffer+" += runtime.suppressValue("+c+", "+a+" && env.opts.autoescape);"),this._addScopeLevel()}else this._emit(")"),this._emit(", "+a+" && env.opts.autoescape);\n")},o.compileCallExtensionAsync=function(t,e){this.compileCallExtension(t,e,!0)},o.compileNodeList=function(t,e){this._compileChildren(t,e)},o.compileLiteral=function(t){if("string"==typeof t.value){var e=t.value.replace(/\\/g,"\\\\");e=(e=(e=(e=(e=e.replace(/"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t")).replace(/\u2028/g,"\\u2028"),this._emit('"'+e+'"')}else null===t.value?this._emit("null"):this._emit(t.value.toString())},o.compileSymbol=function(t,e){var n=t.value,r=e.lookup(n);r?this._emit(r):this._emit('runtime.contextOrFrameLookup(context, frame, "'+n+'")')},o.compileGroup=function(t,e){this._compileAggregate(t,e,"(",")")},o.compileArray=function(t,e){this._compileAggregate(t,e,"[","]")},o.compileDict=function(t,e){this._compileAggregate(t,e,"{","}")},o.compilePair=function(t,e){var n=t.key,r=t.value;n instanceof s.Symbol?n=new s.Literal(n.lineno,n.colno,n.value):n instanceof s.Literal&&"string"==typeof n.value||this.fail("compilePair: Dict keys must be strings or names",n.lineno,n.colno),this.compile(n,e),this._emit(": "),this._compileExpression(r,e)},o.compileInlineIf=function(t,e){this._emit("("),this.compile(t.cond,e),this._emit("?"),this.compile(t.body,e),this._emit(":"),null!==t.else_?this.compile(t.else_,e):this._emit('""'),this._emit(")")},o.compileIn=function(t,e){this._emit("runtime.inOperator("),this.compile(t.left,e),this._emit(","),this.compile(t.right,e),this._emit(")")},o.compileIs=function(t,e){var n=t.right.name?t.right.name.value:t.right.value;this._emit('env.getTest("'+n+'").call(context, '),this.compile(t.left,e),t.right.args&&(this._emit(","),this.compile(t.right.args,e)),this._emit(") === true")},o._binOpEmitter=function(t,e,n){this.compile(t.left,e),this._emit(n),this.compile(t.right,e)},o.compileOr=function(t,e){return this._binOpEmitter(t,e," || ")},o.compileAnd=function(t,e){return this._binOpEmitter(t,e," && ")},o.compileAdd=function(t,e){return this._binOpEmitter(t,e," + ")},o.compileConcat=function(t,e){return this._binOpEmitter(t,e,' + "" + ')},o.compileSub=function(t,e){return this._binOpEmitter(t,e," - ")},o.compileMul=function(t,e){return this._binOpEmitter(t,e," * ")},o.compileDiv=function(t,e){return this._binOpEmitter(t,e," / ")},o.compileMod=function(t,e){return this._binOpEmitter(t,e," % ")},o.compileNot=function(t,e){this._emit("!"),this.compile(t.target,e)},o.compileFloorDiv=function(t,e){this._emit("Math.floor("),this.compile(t.left,e),this._emit(" / "),this.compile(t.right,e),this._emit(")")},o.compilePow=function(t,e){this._emit("Math.pow("),this.compile(t.left,e),this._emit(", "),this.compile(t.right,e),this._emit(")")},o.compileNeg=function(t,e){this._emit("-"),this.compile(t.target,e)},o.compilePos=function(t,e){this._emit("+"),this.compile(t.target,e)},o.compileCompare=function(t,e){var n=this;this.compile(t.expr,e),t.ops.forEach((function(t){n._emit(" "+l[t.type]+" "),n.compile(t.expr,e)}))},o.compileLookupVal=function(t,e){this._emit("runtime.memberLookup(("),this._compileExpression(t.target,e),this._emit("),"),this._compileExpression(t.val,e),this._emit(")")},o._getNodeName=function(t){switch(t.typename){case"Symbol":return t.value;case"FunCall":return"the return value of ("+this._getNodeName(t.name)+")";case"LookupVal":return this._getNodeName(t.target)+'["'+this._getNodeName(t.val)+'"]';case"Literal":return t.value.toString();default:return"--expression--"}},o.compileFunCall=function(t,e){this._emit("(lineno = "+t.lineno+", colno = "+t.colno+", "),this._emit("runtime.callWrap("),this._compileExpression(t.name,e),this._emit(', "'+this._getNodeName(t.name).replace(/"/g,'\\"')+'", context, '),this._compileAggregate(t.args,e,"[","])"),this._emit(")")},o.compileFilter=function(t,e){var n=t.name;this.assertType(n,s.Symbol),this._emit('env.getFilter("'+n.value+'").call(context, '),this._compileAggregate(t.args,e),this._emit(")")},o.compileFilterAsync=function(t,e){var n=t.name,r=t.symbol.value;this.assertType(n,s.Symbol),e.set(r,r),this._emit('env.getFilter("'+n.value+'").call(context, '),this._compileAggregate(t.args,e),this._emitLine(", "+this._makeCallback(r)),this._addScopeLevel()},o.compileKeywordArgs=function(t,e){this._emit("runtime.makeKeywordArgs("),this.compileDict(t,e),this._emit(")")},o.compileSet=function(t,e){var n=this,r=[];t.targets.forEach((function(t){var i=t.value,o=e.lookup(i);null==o&&(o=n._tmpid(),n._emitLine("var "+o+";")),r.push(o)})),t.value?(this._emit(r.join(" = ")+" = "),this._compileExpression(t.value,e),this._emitLine(";")):(this._emit(r.join(" = ")+" = "),this.compile(t.body,e),this._emitLine(";")),t.targets.forEach((function(t,e){var i=r[e],o=t.value;n._emitLine('frame.set("'+o+'", '+i+", true);"),n._emitLine("if(frame.topLevel) {"),n._emitLine('context.setVariable("'+o+'", '+i+");"),n._emitLine("}"),"_"!==o.charAt(0)&&(n._emitLine("if(frame.topLevel) {"),n._emitLine('context.addExport("'+o+'", '+i+");"),n._emitLine("}"))}))},o.compileSwitch=function(t,e){var n=this;this._emit("switch ("),this.compile(t.expr,e),this._emit(") {"),t.cases.forEach((function(t,r){n._emit("case "),n.compile(t.cond,e),n._emit(": "),n.compile(t.body,e),t.body.children.length&&n._emitLine("break;")})),t.default&&(this._emit("default:"),this.compile(t.default,e)),this._emit("}")},o.compileIf=function(t,e,n){var r=this;this._emit("if("),this._compileExpression(t.cond,e),this._emitLine(") {"),this._withScopedSyntax((function(){r.compile(t.body,e),n&&r._emit("cb()")})),t.else_?(this._emitLine("}\nelse {"),this._withScopedSyntax((function(){r.compile(t.else_,e),n&&r._emit("cb()")}))):n&&(this._emitLine("}\nelse {"),this._emit("cb()")),this._emitLine("}")},o.compileIfAsync=function(t,e){this._emit("(function(cb) {"),this.compileIf(t,e,!0),this._emit("})("+this._makeCallback()),this._addScopeLevel()},o._emitLoopBindings=function(t,e,n,r){var i=this;[{name:"index",val:n+" + 1"},{name:"index0",val:n},{name:"revindex",val:r+" - "+n},{name:"revindex0",val:r+" - "+n+" - 1"},{name:"first",val:n+" === 0"},{name:"last",val:n+" === "+r+" - 1"},{name:"length",val:r}].forEach((function(t){i._emitLine('frame.set("loop.'+t.name+'", '+t.val+");")}))},o.compileFor=function(t,e){var n=this,r=this._tmpid(),i=this._tmpid(),o=this._tmpid();if(e=e.push(),this._emitLine("frame = frame.push();"),this._emit("var "+o+" = "),this._compileExpression(t.arr,e),this._emitLine(";"),this._emit("if("+o+") {"),this._emitLine(o+" = runtime.fromIterator("+o+");"),t.name instanceof s.Array){this._emitLine("var "+r+";"),this._emitLine("if(runtime.isArray("+o+")) {"),this._emitLine("var "+i+" = "+o+".length;"),this._emitLine("for("+r+"=0; "+r+" < "+o+".length; "+r+"++) {"),t.name.children.forEach((function(i,s){var a=n._tmpid();n._emitLine("var "+a+" = "+o+"["+r+"]["+s+"];"),n._emitLine('frame.set("'+i+'", '+o+"["+r+"]["+s+"]);"),e.set(t.name.children[s].value,a)})),this._emitLoopBindings(t,o,r,i),this._withScopedSyntax((function(){n.compile(t.body,e)})),this._emitLine("}"),this._emitLine("} else {");var a=t.name.children,c=a[0],u=a[1],l=this._tmpid(),h=this._tmpid();e.set(c.value,l),e.set(u.value,h),this._emitLine(r+" = -1;"),this._emitLine("var "+i+" = runtime.keys("+o+").length;"),this._emitLine("for(var "+l+" in "+o+") {"),this._emitLine(r+"++;"),this._emitLine("var "+h+" = "+o+"["+l+"];"),this._emitLine('frame.set("'+c.value+'", '+l+");"),this._emitLine('frame.set("'+u.value+'", '+h+");"),this._emitLoopBindings(t,o,r,i),this._withScopedSyntax((function(){n.compile(t.body,e)})),this._emitLine("}"),this._emitLine("}")}else{var f=this._tmpid();e.set(t.name.value,f),this._emitLine("var "+i+" = "+o+".length;"),this._emitLine("for(var "+r+"=0; "+r+" < "+o+".length; "+r+"++) {"),this._emitLine("var "+f+" = "+o+"["+r+"];"),this._emitLine('frame.set("'+t.name.value+'", '+f+");"),this._emitLoopBindings(t,o,r,i),this._withScopedSyntax((function(){n.compile(t.body,e)})),this._emitLine("}")}this._emitLine("}"),t.else_&&(this._emitLine("if (!"+i+") {"),this.compile(t.else_,e),this._emitLine("}")),this._emitLine("frame = frame.pop();")},o._compileAsyncLoop=function(t,e,n){var r=this,i=this._tmpid(),o=this._tmpid(),a=this._tmpid(),c=n?"asyncAll":"asyncEach";if(e=e.push(),this._emitLine("frame = frame.push();"),this._emit("var "+a+" = runtime.fromIterator("),this._compileExpression(t.arr,e),this._emitLine(");"),t.name instanceof s.Array){var u=t.name.children.length;this._emit("runtime."+c+"("+a+", "+u+", function("),t.name.children.forEach((function(t){r._emit(t.value+",")})),this._emit(i+","+o+",next) {"),t.name.children.forEach((function(t){var n=t.value;e.set(n,n),r._emitLine('frame.set("'+n+'", '+n+");")}))}else{var l=t.name.value;this._emitLine("runtime."+c+"("+a+", 1, function("+l+", "+i+", "+o+",next) {"),this._emitLine('frame.set("'+l+'", '+l+");"),e.set(l,l)}this._emitLoopBindings(t,a,i,o),this._withScopedSyntax((function(){var o;n&&(o=r._pushBuffer()),r.compile(t.body,e),r._emitLine("next("+i+(o?","+o:"")+");"),n&&r._popBuffer()}));var h=this._tmpid();this._emitLine("}, "+this._makeCallback(h)),this._addScopeLevel(),n&&this._emitLine(this.buffer+" += "+h+";"),t.else_&&(this._emitLine("if (!"+a+".length) {"),this.compile(t.else_,e),this._emitLine("}")),this._emitLine("frame = frame.pop();")},o.compileAsyncEach=function(t,e){this._compileAsyncLoop(t,e)},o.compileAsyncAll=function(t,e){this._compileAsyncLoop(t,e,!0)},o._compileMacro=function(t,e){var n=this,r=[],i=null,o="macro_"+this._tmpid(),a=void 0!==e;t.args.children.forEach((function(e,o){o===t.args.children.length-1&&e instanceof s.Dict?i=e:(n.assertType(e,s.Symbol),r.push(e))}));var u,l=[].concat(r.map((function(t){return"l_"+t.value})),["kwargs"]),h=r.map((function(t){return'"'+t.value+'"'})),f=(i&&i.children||[]).map((function(t){return'"'+t.key.value+'"'}));u=a?e.push(!0):new c,this._emitLines("var "+o+" = runtime.makeMacro(","["+h.join(", ")+"], ","["+f.join(", ")+"], ","function ("+l.join(", ")+") {","var callerFrame = frame;","frame = "+(a?"frame.push(true);":"new runtime.Frame();"),"kwargs = kwargs || {};",'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {','frame.set("caller", kwargs.caller); }'),r.forEach((function(t){n._emitLine('frame.set("'+t.value+'", l_'+t.value+");"),u.set(t.value,"l_"+t.value)})),i&&i.children.forEach((function(t){var e=t.key.value;n._emit('frame.set("'+e+'", '),n._emit('Object.prototype.hasOwnProperty.call(kwargs, "'+e+'")'),n._emit(' ? kwargs["'+e+'"] : '),n._compileExpression(t.value,u),n._emit(");")}));var p=this._pushBuffer();return this._withScopedSyntax((function(){n.compile(t.body,u)})),this._emitLine("frame = "+(a?"frame.pop();":"callerFrame;")),this._emitLine("return new runtime.SafeString("+p+");"),this._emitLine("});"),this._popBuffer(),o},o.compileMacro=function(t,e){var n=this._compileMacro(t),r=t.name.value;e.set(r,n),e.parent?this._emitLine('frame.set("'+r+'", '+n+");"):("_"!==t.name.value.charAt(0)&&this._emitLine('context.addExport("'+r+'");'),this._emitLine('context.setVariable("'+r+'", '+n+");"))},o.compileCaller=function(t,e){this._emit("(function (){");var n=this._compileMacro(t,e);this._emit("return "+n+";})()")},o._compileGetTemplate=function(t,e,n,r){var i=this._tmpid(),o=this._templateName(),s=this._makeCallback(i),a=n?"true":"false",c=r?"true":"false";return this._emit("env.getTemplate("),this._compileExpression(t.template,e),this._emitLine(", "+a+", "+o+", "+c+", "+s),i},o.compileImport=function(t,e){var n=t.target.value,r=this._compileGetTemplate(t,e,!1,!1);this._addScopeLevel(),this._emitLine(r+".getExported("+(t.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(r)),this._addScopeLevel(),e.set(n,r),e.parent?this._emitLine('frame.set("'+n+'", '+r+");"):this._emitLine('context.setVariable("'+n+'", '+r+");")},o.compileFromImport=function(t,e){var n=this,r=this._compileGetTemplate(t,e,!1,!1);this._addScopeLevel(),this._emitLine(r+".getExported("+(t.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(r)),this._addScopeLevel(),t.names.children.forEach((function(t){var i,o,a=n._tmpid();t instanceof s.Pair?(i=t.key.value,o=t.value.value):o=i=t.value,n._emitLine("if(Object.prototype.hasOwnProperty.call("+r+', "'+i+'")) {'),n._emitLine("var "+a+" = "+r+"."+i+";"),n._emitLine("} else {"),n._emitLine("cb(new Error(\"cannot import '"+i+"'\")); return;"),n._emitLine("}"),e.set(o,a),e.parent?n._emitLine('frame.set("'+o+'", '+a+");"):n._emitLine('context.setVariable("'+o+'", '+a+");")}))},o.compileBlock=function(t){var e=this._tmpid();this.inBlock||this._emit('(parentTemplate ? function(e, c, f, r, cb) { cb(""); } : '),this._emit('context.getBlock("'+t.name.value+'")'),this.inBlock||this._emit(")"),this._emitLine("(env, context, frame, runtime, "+this._makeCallback(e)),this._emitLine(this.buffer+" += "+e+";"),this._addScopeLevel()},o.compileSuper=function(t,e){var n=t.blockName.value,r=t.symbol.value,i=this._makeCallback(r);this._emitLine('context.getSuper(env, "'+n+'", b_'+n+", frame, runtime, "+i),this._emitLine(r+" = runtime.markSafe("+r+");"),this._addScopeLevel(),e.set(r,r)},o.compileExtends=function(t,e){var n=this._tmpid(),r=this._compileGetTemplate(t,e,!0,!1);this._emitLine("parentTemplate = "+r),this._emitLine("for(var "+n+" in parentTemplate.blocks) {"),this._emitLine("context.addBlock("+n+", parentTemplate.blocks["+n+"]);"),this._emitLine("}"),this._addScopeLevel()},o.compileInclude=function(t,e){this._emitLine("var tasks = [];"),this._emitLine("tasks.push("),this._emitLine("function(callback) {");var n=this._compileGetTemplate(t,e,!1,t.ignoreMissing);this._emitLine("callback(null,"+n+");});"),this._emitLine("});");var r=this._tmpid();this._emitLine("tasks.push("),this._emitLine("function(template, callback){"),this._emitLine("template.render(context.getVariables(), frame, "+this._makeCallback(r)),this._emitLine("callback(null,"+r+");});"),this._emitLine("});"),this._emitLine("tasks.push("),this._emitLine("function(result, callback){"),this._emitLine(this.buffer+" += result;"),this._emitLine("callback(null);"),this._emitLine("});"),this._emitLine("env.waterfall(tasks, function(){"),this._addScopeLevel()},o.compileTemplateData=function(t,e){this.compileLiteral(t,e)},o.compileCapture=function(t,e){var n=this,r=this.buffer;this.buffer="output",this._emitLine("(function() {"),this._emitLine('var output = "";'),this._withScopedSyntax((function(){n.compile(t.body,e)})),this._emitLine("return output;"),this._emitLine("})()"),this.buffer=r},o.compileOutput=function(t,e){var n=this;t.children.forEach((function(r){r instanceof s.TemplateData?r.value&&(n._emit(n.buffer+" += "),n.compileLiteral(r,e),n._emitLine(";")):(n._emit(n.buffer+" += runtime.suppressValue("),n.throwOnUndefined&&n._emit("runtime.ensureDefined("),n.compile(r,e),n.throwOnUndefined&&n._emit(","+t.lineno+","+t.colno+")"),n._emit(", env.opts.autoescape);\n"))}))},o.compileRoot=function(t,e){var n=this;e&&this.fail("compileRoot: root node can't have frame"),e=new c,this._emitFuncBegin(t,"root"),this._emitLine("var parentTemplate = null;"),this._compileChildren(t,e),this._emitLine("if(parentTemplate) {"),this._emitLine("parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);"),this._emitLine("} else {"),this._emitLine("cb(null, "+this.buffer+");"),this._emitLine("}"),this._emitFuncEnd(!0),this.inBlock=!0;var r=[],i=t.findAll(s.Block);i.forEach((function(t,e){var i=t.name.value;if(-1!==r.indexOf(i))throw new Error('Block "'+i+'" defined more than once.');r.push(i),n._emitFuncBegin(t,"b_"+i);var o=new c;n._emitLine("var frame = frame.push(true);"),n.compile(t.body,o),n._emitFuncEnd()})),this._emitLine("return {"),i.forEach((function(t,e){var r="b_"+t.name.value;n._emitLine(r+": "+r+",")})),this._emitLine("root: root\n};")},o.compile=function(t,e){var n=this["compile"+t.typename];n?n.call(this,t,e):this.fail("compile: Cannot compile node: "+t.typename,t.lineno,t.colno)},o.getCode=function(){return this.codebuf.join("")},i}(u);t.exports={compile:function(t,e,n,r,s){void 0===s&&(s={});var a=new h(r,s.throwOnUndefined),c=(n||[]).map((function(t){return t.preprocess})).filter((function(t){return!!t})).reduce((function(t,e){return e(t)}),t);return a.compile(o.transform(i.parse(c,n,s),e,r)),a.getCode()},Compiler:h}},function(t,e,n){"use strict";function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}var i=n(4),o=n(1).EmitterObj;t.exports=function(t){var e,n;function o(){return t.apply(this,arguments)||this}n=t,(e=o).prototype=Object.create(n.prototype),e.prototype.constructor=e,r(e,n);var s=o.prototype;return s.resolve=function(t,e){return i.resolve(i.dirname(t),e)},s.isRelative=function(t){return 0===t.indexOf("./")||0===t.indexOf("../")},o}(o)},function(t,e,n){"use strict";function r(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,i(t,e)}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}var o=n(12),s=n(15),a=n(0),c=n(5),u=n(18),l=n(10),h=l.FileSystemLoader,f=l.WebLoader,p=l.PrecompiledLoader,d=n(20),m=n(21),y=n(1),g=y.Obj,v=y.EmitterObj,_=n(2),b=_.handleError,w=_.Frame,x=n(22);function k(t,e,n){o((function(){t(e,n)}))}var T={type:"code",obj:{root:function(t,e,n,r,i){try{i(null,"")}catch(t){i(b(t,null,null))}}}},S=function(t){function e(){return t.apply(this,arguments)||this}r(e,t);var n=e.prototype;return n.init=function(t,e){var n=this;e=this.opts=e||{},this.opts.dev=!!e.dev,this.opts.autoescape=null==e.autoescape||e.autoescape,this.opts.throwOnUndefined=!!e.throwOnUndefined,this.opts.trimBlocks=!!e.trimBlocks,this.opts.lstripBlocks=!!e.lstripBlocks,this.loaders=[],t?this.loaders=a.isArray(t)?t:[t]:h?this.loaders=[new h("views")]:f&&(this.loaders=[new f("/views")]),"undefined"!=typeof window&&window.nunjucksPrecompiled&&this.loaders.unshift(new p(window.nunjucksPrecompiled)),this._initLoaders(),this.globals=m(),this.filters={},this.tests={},this.asyncFilters=[],this.extensions={},this.extensionsList=[],a._entries(u).forEach((function(t){var e=t[0],r=t[1];return n.addFilter(e,r)})),a._entries(d).forEach((function(t){var e=t[0],r=t[1];return n.addTest(e,r)}))},n._initLoaders=function(){var t=this;this.loaders.forEach((function(e){e.cache={},"function"==typeof e.on&&(e.on("update",(function(n,r){e.cache[n]=null,t.emit("update",n,r,e)})),e.on("load",(function(n,r){t.emit("load",n,r,e)})))}))},n.invalidateCache=function(){this.loaders.forEach((function(t){t.cache={}}))},n.addExtension=function(t,e){return e.__name=t,this.extensions[t]=e,this.extensionsList.push(e),this},n.removeExtension=function(t){var e=this.getExtension(t);e&&(this.extensionsList=a.without(this.extensionsList,e),delete this.extensions[t])},n.getExtension=function(t){return this.extensions[t]},n.hasExtension=function(t){return!!this.extensions[t]},n.addGlobal=function(t,e){return this.globals[t]=e,this},n.getGlobal=function(t){if(void 0===this.globals[t])throw new Error("global not found: "+t);return this.globals[t]},n.addFilter=function(t,e,n){var r=e;return n&&this.asyncFilters.push(t),this.filters[t]=r,this},n.getFilter=function(t){if(!this.filters[t])throw new Error("filter not found: "+t);return this.filters[t]},n.addTest=function(t,e){return this.tests[t]=e,this},n.getTest=function(t){if(!this.tests[t])throw new Error("test not found: "+t);return this.tests[t]},n.resolveTemplate=function(t,e,n){return t.isRelative&&e&&t.isRelative(n)&&t.resolve?t.resolve(e,n):n},n.getTemplate=function(t,e,n,r,i){var o,s=this,c=this,u=null;if(t&&t.raw&&(t=t.raw),a.isFunction(n)&&(i=n,n=null,e=e||!1),a.isFunction(e)&&(i=e,e=!1),t instanceof A)u=t;else{if("string"!=typeof t)throw new Error("template names must be a string: "+t);for(var l=0;l0&&!this.skip(i.TOKEN_COMMA)&&this.fail("parseFrom: expected comma",t.lineno,t.colno);var a=this.parsePrimary();if("_"===a.value.charAt(0)&&this.fail("parseFrom: names starting with an underscore cannot be imported",a.lineno,a.colno),this.skipSymbol("as")){var c=this.parsePrimary();r.addChild(new o.Pair(a.lineno,a.colno,a,c))}else r.addChild(a);n=this.parseWithContext()}return new o.FromImport(t.lineno,t.colno,e,r,n)},c.parseBlock=function(){var t=this.peekToken();this.skipSymbol("block")||this.fail("parseBlock: expected block",t.lineno,t.colno);var e=new o.Block(t.lineno,t.colno);e.name=this.parsePrimary(),e.name instanceof o.Symbol||this.fail("parseBlock: variable name expected",t.lineno,t.colno),this.advanceAfterBlockEnd(t.value),e.body=this.parseUntilBlocks("endblock"),this.skipSymbol("endblock"),this.skipSymbol(e.name.value);var n=this.peekToken();return n||this.fail("parseBlock: expected endblock, got end of file"),this.advanceAfterBlockEnd(n.value),e},c.parseExtends=function(){var t="extends",e=this.peekToken();this.skipSymbol(t)||this.fail("parseTemplateRef: expected "+t);var n=new o.Extends(e.lineno,e.colno);return n.template=this.parseExpression(),this.advanceAfterBlockEnd(e.value),n},c.parseInclude=function(){var t="include",e=this.peekToken();this.skipSymbol(t)||this.fail("parseInclude: expected "+t);var n=new o.Include(e.lineno,e.colno);return n.template=this.parseExpression(),this.skipSymbol("ignore")&&this.skipSymbol("missing")&&(n.ignoreMissing=!0),this.advanceAfterBlockEnd(e.value),n},c.parseIf=function(){var t,e=this.peekToken();this.skipSymbol("if")||this.skipSymbol("elif")||this.skipSymbol("elseif")?t=new o.If(e.lineno,e.colno):this.skipSymbol("ifAsync")?t=new o.IfAsync(e.lineno,e.colno):this.fail("parseIf: expected if, elif, or elseif",e.lineno,e.colno),t.cond=this.parseExpression(),this.advanceAfterBlockEnd(e.value),t.body=this.parseUntilBlocks("elif","elseif","else","endif");var n=this.peekToken();switch(n&&n.value){case"elseif":case"elif":t.else_=this.parseIf();break;case"else":this.advanceAfterBlockEnd(),t.else_=this.parseUntilBlocks("endif"),this.advanceAfterBlockEnd();break;case"endif":t.else_=null,this.advanceAfterBlockEnd();break;default:this.fail("parseIf: expected elif, else, or endif, got end of file")}return t},c.parseSet=function(){var t=this.peekToken();this.skipSymbol("set")||this.fail("parseSet: expected set",t.lineno,t.colno);for(var e,n=new o.Set(t.lineno,t.colno,[]);(e=this.parsePrimary())&&(n.targets.push(e),this.skip(i.TOKEN_COMMA)););return this.skipValue(i.TOKEN_OPERATOR,"=")?(n.value=this.parseExpression(),this.advanceAfterBlockEnd(t.value)):this.skip(i.TOKEN_BLOCK_END)?(n.body=new o.Capture(t.lineno,t.colno,this.parseUntilBlocks("endset")),n.value=null,this.advanceAfterBlockEnd()):this.fail("parseSet: expected = or block end in set tag",t.lineno,t.colno),n},c.parseSwitch=function(){var t="switch",e="endswitch",n="case",r="default",i=this.peekToken();this.skipSymbol(t)||this.skipSymbol(n)||this.skipSymbol(r)||this.fail('parseSwitch: expected "switch," "case" or "default"',i.lineno,i.colno);var s=this.parseExpression();this.advanceAfterBlockEnd(t),this.parseUntilBlocks(n,r,e);var a,c=this.peekToken(),u=[];do{this.skipSymbol(n);var l=this.parseExpression();this.advanceAfterBlockEnd(t);var h=this.parseUntilBlocks(n,r,e);u.push(new o.Case(c.line,c.col,l,h)),c=this.peekToken()}while(c&&c.value===n);switch(c.value){case r:this.advanceAfterBlockEnd(),a=this.parseUntilBlocks(e),this.advanceAfterBlockEnd();break;case e:this.advanceAfterBlockEnd();break;default:this.fail('parseSwitch: expected "case," "default" or "endswitch," got EOF.')}return new o.Switch(i.lineno,i.colno,s,u,a)},c.parseStatement=function(){var t=this.peekToken();if(t.type!==i.TOKEN_SYMBOL&&this.fail("tag name expected",t.lineno,t.colno),this.breakOnBlocks&&-1!==a.indexOf(this.breakOnBlocks,t.value))return null;switch(t.value){case"raw":return this.parseRaw();case"verbatim":return this.parseRaw("verbatim");case"if":case"ifAsync":return this.parseIf();case"for":case"asyncEach":case"asyncAll":return this.parseFor();case"block":return this.parseBlock();case"extends":return this.parseExtends();case"include":return this.parseInclude();case"set":return this.parseSet();case"macro":return this.parseMacro();case"call":return this.parseCall();case"import":return this.parseImport();case"from":return this.parseFrom();case"filter":return this.parseFilterStatement();case"switch":return this.parseSwitch();default:if(this.extensions.length)for(var e=0;e0;){var c=s[0],u=s[1],l=s[2];l===t?r+=1:l===e&&(r-=1),0===r?(i+=u,this.tokens.backN(c.length-u.length)):i+=c}return new o.Output(a.lineno,a.colno,[new o.TemplateData(a.lineno,a.colno,i)])},c.parsePostfix=function(t){for(var e,n=this.peekToken();n;){if(n.type===i.TOKEN_LEFT_PAREN)t=new o.FunCall(n.lineno,n.colno,t,this.parseSignature());else if(n.type===i.TOKEN_LEFT_BRACKET)(e=this.parseAggregate()).children.length>1&&this.fail("invalid index"),t=new o.LookupVal(n.lineno,n.colno,t,e.children[0]);else{if(n.type!==i.TOKEN_OPERATOR||"."!==n.value)break;this.nextToken();var r=this.nextToken();r.type!==i.TOKEN_SYMBOL&&this.fail("expected name as lookup value, got "+r.value,r.lineno,r.colno),e=new o.Literal(r.lineno,r.colno,r.value),t=new o.LookupVal(n.lineno,n.colno,t,e)}n=this.peekToken()}return t},c.parseExpression=function(){return this.parseInlineIf()},c.parseInlineIf=function(){var t=this.parseOr();if(this.skipSymbol("if")){var e=this.parseOr(),n=t;(t=new o.InlineIf(t.lineno,t.colno)).body=n,t.cond=e,this.skipSymbol("else")?t.else_=this.parseOr():t.else_=null}return t},c.parseOr=function(){for(var t=this.parseAnd();this.skipSymbol("or");){var e=this.parseAnd();t=new o.Or(t.lineno,t.colno,t,e)}return t},c.parseAnd=function(){for(var t=this.parseNot();this.skipSymbol("and");){var e=this.parseNot();t=new o.And(t.lineno,t.colno,t,e)}return t},c.parseNot=function(){var t=this.peekToken();return this.skipSymbol("not")?new o.Not(t.lineno,t.colno,this.parseNot()):this.parseIn()},c.parseIn=function(){for(var t=this.parseIs();;){var e=this.nextToken();if(!e)break;var n=e.type===i.TOKEN_SYMBOL&&"not"===e.value;if(n||this.pushToken(e),!this.skipSymbol("in")){n&&this.pushToken(e);break}var r=this.parseIs();t=new o.In(t.lineno,t.colno,t,r),n&&(t=new o.Not(t.lineno,t.colno,t))}return t},c.parseIs=function(){var t=this.parseCompare();if(this.skipSymbol("is")){var e=this.skipSymbol("not"),n=this.parseCompare();t=new o.Is(t.lineno,t.colno,t,n),e&&(t=new o.Not(t.lineno,t.colno,t))}return t},c.parseCompare=function(){for(var t=["==","===","!=","!==","<",">","<=",">="],e=this.parseConcat(),n=[];;){var r=this.nextToken();if(!r)break;if(-1===t.indexOf(r.value)){this.pushToken(r);break}n.push(new o.CompareOperand(r.lineno,r.colno,this.parseConcat(),r.value))}return n.length?new o.Compare(n[0].lineno,n[0].colno,e,n):e},c.parseConcat=function(){for(var t=this.parseAdd();this.skipValue(i.TOKEN_TILDE,"~");){var e=this.parseAdd();t=new o.Concat(t.lineno,t.colno,t,e)}return t},c.parseAdd=function(){for(var t=this.parseSub();this.skipValue(i.TOKEN_OPERATOR,"+");){var e=this.parseSub();t=new o.Add(t.lineno,t.colno,t,e)}return t},c.parseSub=function(){for(var t=this.parseMul();this.skipValue(i.TOKEN_OPERATOR,"-");){var e=this.parseMul();t=new o.Sub(t.lineno,t.colno,t,e)}return t},c.parseMul=function(){for(var t=this.parseDiv();this.skipValue(i.TOKEN_OPERATOR,"*");){var e=this.parseDiv();t=new o.Mul(t.lineno,t.colno,t,e)}return t},c.parseDiv=function(){for(var t=this.parseFloorDiv();this.skipValue(i.TOKEN_OPERATOR,"/");){var e=this.parseFloorDiv();t=new o.Div(t.lineno,t.colno,t,e)}return t},c.parseFloorDiv=function(){for(var t=this.parseMod();this.skipValue(i.TOKEN_OPERATOR,"//");){var e=this.parseMod();t=new o.FloorDiv(t.lineno,t.colno,t,e)}return t},c.parseMod=function(){for(var t=this.parsePow();this.skipValue(i.TOKEN_OPERATOR,"%");){var e=this.parsePow();t=new o.Mod(t.lineno,t.colno,t,e)}return t},c.parsePow=function(){for(var t=this.parseUnary();this.skipValue(i.TOKEN_OPERATOR,"**");){var e=this.parseUnary();t=new o.Pow(t.lineno,t.colno,t,e)}return t},c.parseUnary=function(t){var e,n=this.peekToken();return e=this.skipValue(i.TOKEN_OPERATOR,"-")?new o.Neg(n.lineno,n.colno,this.parseUnary(!0)):this.skipValue(i.TOKEN_OPERATOR,"+")?new o.Pos(n.lineno,n.colno,this.parseUnary(!0)):this.parsePrimary(),t||(e=this.parseFilter(e)),e},c.parsePrimary=function(t){var e,n=this.nextToken(),r=null;if(n?n.type===i.TOKEN_STRING?e=n.value:n.type===i.TOKEN_INT?e=parseInt(n.value,10):n.type===i.TOKEN_FLOAT?e=parseFloat(n.value):n.type===i.TOKEN_BOOLEAN?"true"===n.value?e=!0:"false"===n.value?e=!1:this.fail("invalid boolean: "+n.value,n.lineno,n.colno):n.type===i.TOKEN_NONE?e=null:n.type===i.TOKEN_REGEX&&(e=new RegExp(n.value.body,n.value.flags)):this.fail("expected expression, got end of file"),void 0!==e?r=new o.Literal(n.lineno,n.colno,e):n.type===i.TOKEN_SYMBOL?r=new o.Symbol(n.lineno,n.colno,n.value):(this.pushToken(n),r=this.parseAggregate()),t||(r=this.parsePostfix(r)),r)return r;throw this.error("unexpected token: "+n.value,n.lineno,n.colno)},c.parseFilterName=function(){for(var t=this.expect(i.TOKEN_SYMBOL),e=t.value;this.skipValue(i.TOKEN_OPERATOR,".");)e+="."+this.expect(i.TOKEN_SYMBOL).value;return new o.Symbol(t.lineno,t.colno,e)},c.parseFilterArgs=function(t){return this.peekToken().type===i.TOKEN_LEFT_PAREN?this.parsePostfix(t).args.children:[]},c.parseFilter=function(t){for(;this.skip(i.TOKEN_PIPE);){var e=this.parseFilterName();t=new o.Filter(e.lineno,e.colno,e,new o.NodeList(e.lineno,e.colno,[t].concat(this.parseFilterArgs(t))))}return t},c.parseFilterStatement=function(){var t=this.peekToken();this.skipSymbol("filter")||this.fail("parseFilterStatement: expected filter");var e=this.parseFilterName(),n=this.parseFilterArgs(e);this.advanceAfterBlockEnd(t.value);var r=new o.Capture(e.lineno,e.colno,this.parseUntilBlocks("endfilter"));this.advanceAfterBlockEnd();var i=new o.Filter(e.lineno,e.colno,e,new o.NodeList(e.lineno,e.colno,[r].concat(n)));return new o.Output(e.lineno,e.colno,[i])},c.parseAggregate=function(){var t,e=this.nextToken();switch(e.type){case i.TOKEN_LEFT_PAREN:t=new o.Group(e.lineno,e.colno);break;case i.TOKEN_LEFT_BRACKET:t=new o.Array(e.lineno,e.colno);break;case i.TOKEN_LEFT_CURLY:t=new o.Dict(e.lineno,e.colno);break;default:return null}for(;;){var n=this.peekToken().type;if(n===i.TOKEN_RIGHT_PAREN||n===i.TOKEN_RIGHT_BRACKET||n===i.TOKEN_RIGHT_CURLY){this.nextToken();break}if(t.children.length>0&&(this.skip(i.TOKEN_COMMA)||this.fail("parseAggregate: expected comma after expression",e.lineno,e.colno)),t instanceof o.Dict){var r=this.parsePrimary();this.skip(i.TOKEN_COLON)||this.fail("parseAggregate: expected colon after dict key",e.lineno,e.colno);var s=this.parseExpression();t.addChild(new o.Pair(r.lineno,r.colno,r,s))}else{var a=this.parseExpression();t.addChild(a)}}return t},c.parseSignature=function(t,e){var n=this.peekToken();if(!e&&n.type!==i.TOKEN_LEFT_PAREN){if(t)return null;this.fail("expected arguments",n.lineno,n.colno)}n.type===i.TOKEN_LEFT_PAREN&&(n=this.nextToken());for(var r=new o.NodeList(n.lineno,n.colno),s=new o.KeywordArgs(n.lineno,n.colno),a=!1;;){if(n=this.peekToken(),!e&&n.type===i.TOKEN_RIGHT_PAREN){this.nextToken();break}if(e&&n.type===i.TOKEN_BLOCK_END)break;if(a&&!this.skip(i.TOKEN_COMMA))this.fail("parseSignature: expected comma after expression",n.lineno,n.colno);else{var c=this.parseExpression();this.skipValue(i.TOKEN_OPERATOR,"=")?s.addChild(new o.Pair(c.lineno,c.colno,c,this.parseExpression())):r.addChild(c)}a=!0}return s.children.length&&r.addChild(s),r},c.parseUntilBlocks=function(){for(var t=this.breakOnBlocks,e=arguments.length,n=new Array(e),r=0;r=","//","**"],j=L+this.current();switch(-1!==r.indexOf(D,j)&&(this.forward(),L=j,-1!==r.indexOf(D,j+this.current())&&(L=j+this.current(),this.forward())),L){case"(":M=d;break;case")":M=m;break;case"[":M=y;break;case"]":M=g;break;case"{":M=v;break;case"}":M=_;break;case",":M=w;break;case":":M=x;break;case"~":M=k;break;case"|":M=T;break;default:M=b}return C(M,L,e,n)}if((t=this._extractUntil(i+o)).match(/^[-+]?[0-9]+$/)){if("."===this.current()){this.forward();var B=this._extract("0123456789");return C(S,t+"."+B,e,n)}return C("int",t,e,n)}if(t.match(/^(true|false)$/))return C(E,t,e,n);if("none"===t)return C(A,t,e,n);if("null"===t)return C(A,t,e,n);if(t)return C(O,t,e,n);throw new Error("Unexpected value while parsing: "+t)}var F,U=this.tags.BLOCK_START.charAt(0)+this.tags.VARIABLE_START.charAt(0)+this.tags.COMMENT_START.charAt(0)+this.tags.COMMENT_END.charAt(0);if(this.isFinished())return null;if((t=this._extractString(this.tags.BLOCK_START+"-"))||(t=this._extractString(this.tags.BLOCK_START)))return this.in_code=!0,C(u,t,e,n);if((t=this._extractString(this.tags.VARIABLE_START+"-"))||(t=this._extractString(this.tags.VARIABLE_START)))return this.in_code=!0,C(h,t,e,n);t="";var z=!1;for(this._matches(this.tags.COMMENT_START)&&(z=!0,t=this._extractString(this.tags.COMMENT_START));null!==(F=this._extractUntil(U));){if(t+=F,(this._matches(this.tags.BLOCK_START)||this._matches(this.tags.VARIABLE_START)||this._matches(this.tags.COMMENT_START))&&!z){if(this.lstripBlocks&&this._matches(this.tags.BLOCK_START)&&this.colno>0&&this.colno<=t.length){var V=t.slice(-this.colno);if(/^\s+$/.test(V)&&!(t=t.slice(0,-this.colno)).length)return this.nextToken()}break}if(this._matches(this.tags.COMMENT_END)){if(!z)throw new Error("unexpected end of comment");t+=this._extractString(this.tags.COMMENT_END);break}t+=this.current(),this.forward()}if(null===F&&z)throw new Error("expected end of comment, got end of file");return C(z?p:c,t,e,n)},e._parseString=function(t){this.forward();for(var e="";!this.isFinished()&&this.current()!==t;){var n=this.current();if("\\"===n){switch(this.forward(),this.current()){case"n":e+="\n";break;case"t":e+="\t";break;case"r":e+="\r";break;default:e+=this.current()}this.forward()}else e+=n,this.forward()}return this.forward(),e},e._matches=function(t){return this.index+t.length>this.len?null:this.str.slice(this.index,this.index+t.length)===t},e._extractString=function(t){return this._matches(t)?(this.forwardN(t.length),t):null},e._extractUntil=function(t){return this._extractMatching(!0,t||"")},e._extract=function(t){return this._extractMatching(!1,t)},e._extractMatching=function(t,e){if(this.isFinished())return null;var n=e.indexOf(this.current());if(t&&-1===n||!t&&-1!==n){var r=this.current();this.forward();for(var i=e.indexOf(this.current());(t&&-1===i||!t&&-1!==i)&&!this.isFinished();)r+=this.current(),this.forward(),i=e.indexOf(this.current());return r}return""},e._extractRegex=function(t){var e=this.currentStr().match(t);return e?(this.forwardN(e[0].length),e):null},e.isFinished=function(){return this.index>=this.len},e.forwardN=function(t){for(var e=0;e1024){for(var e=0,n=i.length-o;e0&&s.length>i&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return t}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}function d(t,e,n){var r=t._events;if(void 0===r)return[];var i=r[e];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(t){for(var e=new Array(t.length),n=0;n0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=i[t];if(void 0===c)return!1;if("function"==typeof c)o(c,this,e);else{var u=c.length,l=y(c,u);for(n=0;n=0;o--)if(n[o]===e||n[o].listener===e){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(t,e){for(;e+1=0;r--)this.removeListener(t,e[r]);return this},a.prototype.listeners=function(t){return d(this,t,!0)},a.prototype.rawListeners=function(t){return d(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):m.call(t,e)},a.prototype.listenerCount=m,a.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(t,e,n){"use strict";var r=n(3),i=n(0),o=0;function s(){return"hole_"+o++}function a(t,e){for(var n=null,r=0;r=e)return t;var n=e-t.length,s=r.repeat(" ",n/2-n%2),a=r.repeat(" ",n/2);return i.copySafeness(t,s+t+a)},e.default=function(t,e,n){return n?t||e:void 0!==t?t:e},e.dictsort=function(t,e,n){if(!r.isObject(t))throw new r.TemplateError("dictsort filter: val must be an object");var i,o=[];for(var s in t)o.push([s,t[s]]);if(void 0===n||"key"===n)i=0;else{if("value"!==n)throw new r.TemplateError("dictsort filter: You can only sort by either key or value");i=1}return o.sort((function(t,n){var o=t[i],s=n[i];return e||(r.isString(o)&&(o=o.toUpperCase()),r.isString(s)&&(s=s.toUpperCase())),o>s?1:o===s?0:-1})),o},e.dump=function(t,e){return JSON.stringify(t,null,e)},e.escape=function(t){return t instanceof i.SafeString?t:(t=null==t?"":t,i.markSafe(r.escape(t.toString())))},e.safe=function(t){return t instanceof i.SafeString?t:(t=null==t?"":t,i.markSafe(t.toString()))},e.first=function(t){return t[0]},e.forceescape=function(t){return t=null==t?"":t,i.markSafe(r.escape(t.toString()))},e.groupby=function(t,e){return r.groupBy(t,e,this.env.opts.throwOnUndefined)},e.indent=function(t,e,n){if(""===(t=o(t,"")))return"";e=e||4;var s=t.split("\n"),a=r.repeat(" ",e),c=s.map((function(t,e){return 0!==e||n?""+a+t:t})).join("\n");return i.copySafeness(t,c)},e.join=function(t,e,n){return e=e||"",n&&(t=r.map(t,(function(t){return t[n]}))),t.join(e)},e.last=function(t){return t[t.length-1]},e.length=function(t){var e=o(t,"");return void 0!==e?"function"==typeof Map&&e instanceof Map||"function"==typeof Set&&e instanceof Set?e.size:!r.isObject(e)||e instanceof i.SafeString?e.length:r.keys(e).length:0},e.list=c,e.lower=function(t){return(t=o(t,"")).toLowerCase()},e.nl2br=function(t){return null==t?"":i.copySafeness(t,t.replace(/\r\n|\n/g,"
\n"))},e.random=function(t){return t[Math.floor(Math.random()*t.length)]},e.reject=u(!1),e.rejectattr=function(t,e){return t.filter((function(t){return!t[e]}))},e.select=u(!0),e.selectattr=function(t,e){return t.filter((function(t){return!!t[e]}))},e.replace=function(t,e,n,r){var o=t;if(e instanceof RegExp)return t.replace(e,n);void 0===r&&(r=-1);var s="";if("number"==typeof e)e=""+e;else if("string"!=typeof e)return t;if("number"==typeof t&&(t=""+t),"string"!=typeof t&&!(t instanceof i.SafeString))return t;if(""===e)return s=n+t.split("").join(n)+n,i.copySafeness(t,s);var a=t.indexOf(e);if(0===r||-1===a)return t;for(var c=0,u=0;a>-1&&(-1===r||u=i&&l.push(n),o.push(l)}return o},e.sum=function(t,e,n){return void 0===n&&(n=0),e&&(t=r.map(t,(function(t){return t[e]}))),n+t.reduce((function(t,e){return t+e}),0)},e.sort=i.makeMacro(["value","reverse","case_sensitive","attribute"],[],(function(t,e,n,i){var o=this,s=r.map(t,(function(t){return t})),a=r.getAttrGetter(i);return s.sort((function(t,s){var c=i?a(t):t,u=i?a(s):s;if(o.env.opts.throwOnUndefined&&i&&(void 0===c||void 0===u))throw new TypeError('sort: attribute "'+i+'" resolved to undefined');return!n&&r.isString(c)&&r.isString(u)&&(c=c.toLowerCase(),u=u.toLowerCase()),cu?e?-1:1:0})),s})),e.string=function(t){return i.copySafeness(t,t)},e.striptags=function(t,e){var n,r=l((t=o(t,"")).replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|/gi,""));return n=e?r.replace(/^ +| +$/gm,"").replace(/ +/g," ").replace(/(\r\n)/g,"\n").replace(/\n\n\n+/g,"\n\n"):r.replace(/\s+/gi," "),i.copySafeness(t,n)},e.title=function(t){var e=(t=o(t,"")).split(" ").map((function(t){return a(t)}));return i.copySafeness(t,e.join(" "))},e.trim=l,e.truncate=function(t,e,n,r){var s=t;if(e=e||255,(t=o(t,"")).length<=e)return t;if(n)t=t.substring(0,e);else{var a=t.lastIndexOf(" ",e);-1===a&&(a=e),t=t.substring(0,a)}return t+=null!=r?r:"...",i.copySafeness(s,t)},e.upper=function(t){return(t=o(t,"")).toUpperCase()},e.urlencode=function(t){var e=encodeURIComponent;return r.isString(t)?e(t):(r.isArray(t)?t:r._entries(t)).map((function(t){var n=t[0],r=t[1];return e(n)+"="+e(r)})).join("&")};var h=/^(?:\(|<|<)?(.*?)(?:\.|,|\)|\n|>)?$/,f=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,p=/^https?:\/\/.*$/,d=/^www\./,m=/\.(?:org|net|com)(?:\:|\/|$)/;e.urlize=function(t,e,n){s(e)&&(e=1/0);var r=!0===n?' rel="nofollow"':"";return t.split(/(\s+)/).filter((function(t){return t&&t.length})).map((function(t){var n=t.match(h),i=n?n[1]:t,o=i.substr(0,e);return p.test(i)?'"+o+"":d.test(i)?'"+o+"":f.test(i)?''+i+"":m.test(i)?'"+o+"":t})).join("")},e.wordcount=function(t){var e=(t=o(t,""))?t.match(/\w+/g):null;return e?e.length:null},e.float=function(t,e){var n=parseFloat(t);return s(n)?e:n};var y=i.makeMacro(["value","default","base"],[],(function(t,e,n){void 0===n&&(n=10);var r=parseInt(t,n);return s(r)?e:r}));e.int=y,e.d=e.default,e.e=e.escape},function(t,e,n){"use strict";function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}var i=function(t){var e,n;function i(e){var n;return(n=t.call(this)||this).precompiled=e||{},n}return n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,r(e,n),i.prototype.getSource=function(t){return this.precompiled[t]?{src:{type:"code",obj:this.precompiled[t]},path:t}:null},i}(n(6));t.exports={PrecompiledLoader:i}},function(t,e,n){"use strict";var r=n(2).SafeString;e.callable=function(t){return"function"==typeof t},e.defined=function(t){return void 0!==t},e.divisibleby=function(t,e){return t%e==0},e.escaped=function(t){return t instanceof r},e.equalto=function(t,e){return t===e},e.eq=e.equalto,e.sameas=e.equalto,e.even=function(t){return t%2==0},e.falsy=function(t){return!t},e.ge=function(t,e){return t>=e},e.greaterthan=function(t,e){return t>e},e.gt=e.greaterthan,e.le=function(t,e){return t<=e},e.lessthan=function(t,e){return t0)for(var i=t;ie;o+=n)r.push(o);return r},cycler:function(){return t=Array.prototype.slice.call(arguments),e=-1,{current:null,reset:function(){e=-1,this.current=null},next:function(){return++e>=t.length&&(e=0),this.current=t[e],this.current}};var t,e},joiner:function(t){return function(t){t=t||",";var e=!0;return function(){var n=e?"":t;return e=!1,n}}(t)}}}},function(t,e,n){var r=n(4);t.exports=function(t,e){function n(t,e){if(this.name=t,this.path=t,this.defaultEngine=e.defaultEngine,this.ext=r.extname(t),!this.ext&&!this.defaultEngine)throw new Error("No default engine was specified and no extension was provided.");this.ext||(this.name+=this.ext=("."!==this.defaultEngine[0]?".":"")+this.defaultEngine)}return n.prototype.render=function(e,n){t.render(this.name,e,n)},e.set("view",n),e.set("nunjucksEnv",t),t}},function(t,e,n){"use strict";var r=n(4),i=n(4),o=n(0)._prettifyError,s=n(5),a=n(7).Environment,c=n(24);function u(t,e){return!!Array.isArray(e)&&e.some((function(e){return t.match(e)}))}function l(t,e){(e=e||{}).isString=!0;var n=e.env||new a([]),r=e.wrapper||c;if(!e.name)throw new Error('the "name" option is required when compiling a string');return r([h(t,e.name,n)],e)}function h(t,e,n){var r,i=(n=n||new a([])).asyncFilters,c=n.extensionsList;e=e.replace(/\\/g,"/");try{r=s.compile(t,i,c,e,n.opts)}catch(t){throw o(e,!1,t)}return{name:e,template:r}}t.exports={precompile:function(t,e){var n=(e=e||{}).env||new a([]),o=e.wrapper||c;if(e.isString)return l(t,e);var s=r.existsSync(t)&&r.statSync(t),f=[],p=[];if(s.isFile())f.push(h(r.readFileSync(t,"utf-8"),e.name||t,n));else if(s.isDirectory()){!function n(o){r.readdirSync(o).forEach((function(s){var a=i.join(o,s),c=a.substr(i.join(t,"/").length),l=r.statSync(a);l&&l.isDirectory()?u(c+="/",e.exclude)||n(a):u(c,e.include)&&p.push(a)}))}(t);for(var d=0;dt.length||i>0&&s>=r||i<0&&s<=r);s+=i)o.push(n.memberLookup(t,s));return o}function p(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var d={pop:function(t){if(void 0===t)return this.pop();if(t>=this.length||t<0)throw new Error("KeyError");return this.splice(t,1)},append:function(t){return this.push(t)},remove:function(t){for(var e=0;e{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{default:()=>Gn});var t=n(916);function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{blockType:null,provider:null};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=c(this,e,[o(o({},n),{},{defaultWidth:n.isContainer?186:96,defaultHeight:n.isContainer?160:80,minWidth:n.isContainer?186:96,minHeight:n.isContainer?140:80,reservedWidth:n.isContainer?12:0,reservedHeight:n.isContainer?80:0,margin:15,gap:50})])).blockType=n.blockType||null,t.provider=n.provider||null,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e)}(e,t),function(t,e,n){return Object.defineProperty(t,"prototype",{writable:!1}),t}(e)}(t.ComponentDefinition);const p=f;function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function m(t,e,n){return e=g(e),function(t,e){if(e&&("object"==d(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,y()?Reflect.construct(e,n||[],g(t).constructor):e.apply(t,n))}function y(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(y=function(){return!!t})()}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},g(t)}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}var _=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{linkAttribute:"id"};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=m(this,e,[n])).linkAttribute=n.linkAttribute||"id",t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v(t,e)}(e,t),function(t,e,n){return Object.defineProperty(t,"prototype",{writable:!1}),t}(e)}(t.ComponentAttributeDefinition);const b=_;function w(t){return function(t){if(Array.isArray(t))return x(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return x(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);nt.length)&&(e=t.length);for(var n=0,r=Array(e);nusing an incorrect one (and potentially end up destroying a live environment).",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#allowed_account_ids"},{name:"forbidden_account_ids",displayName:"Forbidden Account IDs",description:"List of forbidden AWS account IDs to prevent you from mistakenly
using an incorrect one (and potentially end up destroying a live environment).",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#forbidden_account_ids"},{name:"skip_requesting_account_id",displayName:"Skip requesting account ID",description:"Whether to skip requesting the account ID or not.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#skip_requesting_account_id"},{name:"custom_ca_bundle",displayName:"Custom Certificate Authority (CA) bundle",description:"File containing custom root and intermediate certificates.",type:"String",url:"https://docs.aws.amazon.com/privateca/latest/userguide/PcaWelcome.html"},{name:"insecure",displayName:"Insecure",description:'Whether to explicitly allow the provider to perform "insecure" SSL requests or not.',type:"Boolean",url:"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html"},{name:"ec2_metadata_service_endpoint",displayName:"EC2 metadata service (IMDS) endpoint",description:"Address of the EC2 metadata service (IMDS) endpoint to use.",type:"String",url:"https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environments-cfg-ec2-imds.html"},{name:"ec2_metadata_service_endpoint_mode",displayName:"EC2 metadata service (IMDS) endpoint mode",description:"Communication mode to use with the metadata service.",type:"String",url:"https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environments-cfg-ec2-imds.html",rules:{values:["IPv4","IPv6"]}},{name:"http_proxy",displayName:"HTTP proxy",description:"Address of an HTTP proxy to use when accessing the AWS API.",type:"String",url:"https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-http.html",rules:{regex:"[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\\+.~#?&//=]*)"}},{name:"max_retries",displayName:"Max retries",description:"Maximum number of times an API call is retried when AWS throttles requests or on transient failures.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#max_retries"},{name:"profile",displayName:"Profile",description:"AWS profile name as set in the shared configuration and credentials files.",type:"String",url:"https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html"},{name:"shared_config_files",displayName:"Shared config files",description:"List of paths to AWS shared config files.",type:"String",url:"https://docs.aws.amazon.com/sdkref/latest/guide/file-format.html"},{name:"shared_credentials_files",displayName:"Shared credentials files",description:"List of paths to the shared credentials files.",type:"String",url:"https://docs.aws.amazon.com/sdkref/latest/guide/file-format.html"},{name:"skip_credentials_validation",displayName:"Skip credentials validation",description:"Whether to skip credentials validation via the STS API or not.",type:"Boolean",url:"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html"},{name:"sts_region",displayName:"Security Token Service (STS) region",description:"AWS region for Security Token Service (STS)",type:"String",url:"https://docs.aws.amazon.com/STS/latest/APIReference/welcome.html"},{name:"s3_use_path_style",displayName:"Use path-style for S3",description:"Whether to enable the request to use path-style addressing or not
i.e., https://s3.amazonaws.com/BUCKET/KEY.",type:"Boolean",url:"https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html"},{name:"skip_metadata_api_check",displayName:"Skip metadata API check",description:"Whether to skip the AWS Metadata API check or not.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#skip_metadata_api_check"},{name:"use_dualstack_endpoint",displayName:"Use dual-stack endpoint",description:"Force the provider to resolve endpoints with DualStack capability.",type:"Boolean",url:"https://docs.aws.amazon.com/AmazonS3/latest/userguide/dual-stack-endpoints.html"},{name:"use_fips_endpoint",displayName:"Use FIPS endpoint",description:"Force the provider to resolve endpoints with FIPS capability.",type:"Boolean",url:"https://aws.amazon.com/compliance/fips/"},{name:"assume_role",displayName:"Assume role",description:"Set of temporary security credentials that you can use to access AWS resources.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#assume_role",definedAttributes:[{name:"duration",displayName:"Duration",description:"Duration of the assume role session.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#duration"},{name:"external_id",displayName:"External ID",description:"External identifier to use when assuming the role.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#external_id"},{name:"policy",displayName:"Policy",description:"IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#policy"},{name:"policy_arns",displayName:"Policy ARNs",description:"Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#policy_arns"},{name:"role_arn",displayName:"Role ARN",description:"ARN of the IAM Role to assume. Can also be set with the AWS_ROLE_ARN environment variable.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#role_arn"},{name:"session_name",displayName:"Session name",description:"Session name to use when assuming the role. Can also be set with the AWS_ROLE_SESSION_NAME environment variable.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#session_name"},{name:"source_identity",displayName:"Source identity",description:"Source identity specified by the principal assuming the role.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#source_identity"},{name:"tags",displayName:"Tags",description:"Map of assume role session tags.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#tags"},{name:"transitive_tag_keys",displayName:"Transitive tag keys",description:"Set of assume role session tag keys to pass to any subsequent sessions.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#transitive_tag_keys"}]},{name:"assume_role_with_web_identity",displayName:"Assume role with web identity",description:"Configuration block for assuming an IAM role using a web identity.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#assume_role_with_web_identity",definedAttributes:[{name:"duration",displayName:"Duration",description:"Duration of the assume role session.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#duration"},{name:"policy",displayName:"Policy",description:"IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#policy"},{name:"policy_arns",displayName:"Policy ARNs",description:"Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the IAM Role being assumed.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#policy_arns"},{name:"role_arn",displayName:"Role ARN",description:"ARN of the IAM Role to assume. Can also be set with the AWS_ROLE_ARN environment variable.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#role_arn"},{name:"session_name",displayName:"Session name",description:"Session name to use when assuming the role. Can also be set with the AWS_ROLE_SESSION_NAME environment variable.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#session_name"},{name:"web_identity_token",displayName:"Web identity token",description:"Value of a web identity token from an OpenID Connect (OIDC) or OAuth provider. One of web_identity_token or web_identity_token_file is required.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#web_identity_token"},{name:"web_identity_token_file",displayName:"Web identity token file",description:"File containing a web identity token from an OpenID Connect (OIDC) or OAuth provider. One of web_identity_token_file or web_identity_token is required. Can also be set with the AWS_WEB_IDENTITY_TOKEN_FILE environment variable.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#web_identity_token_file"}]},{name:"default_tags",displayName:"Default tags",description:"You can assign metadata to your AWS resources in the form of tags.
Each tag is a label consisting of a user-defined key and value.
Tags can help you manage, identify, organize, search for, and filter resources.",type:"Object",url:"https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html",definedAttributes:[{name:"tags",displayName:"Tags",description:"Key-value map of tags to apply to all resources.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#tags"}]},{name:"ignore_tags",displayName:"Ignore tags",description:"Configuration block with resource tag settings to ignore across all resources handled by this provider
(except any individual service tag resources such as aws_ec2_tag)
for situations where external systems are managing certain resource tags.",type:"Object",url:"https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html",definedAttributes:[{name:"keys",displayName:"Keys",description:"List of exact resource tag keys to ignore across all resources handled by this provider.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#keys"},{name:"key_prefixes",displayName:"Key prefixes",description:"List of resource tag key prefixes to ignore across all resources handled by this provider.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs#key_prefixes"}]},{name:"endpoints",displayName:"Endpoints",description:"Configure the Terraform AWS Provider to use customized endpoints.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/guides/custom-service-endpoints"}]}]),w([{type:"aws_ami",blockType:"data",displayName:"Amazon Machine Image (AMI)",description:"An Amazon Machine Image (AMI) is a supported and maintained image provided by AWS
that provides the information required to launch an instance.",icon:"Aws_EC2_AMI",model:"DefaultModel",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html",categories:["AWS","Data Sources"],tags:[],definedAttributes:[{name:"owners",displayName:"Owners",description:"List of AMI owners to limit search.",type:"Array",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html"},{name:"most_recent",displayName:"Most recent",description:"If more than one result is returned, use the most recent AMI.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ami#most_recent"},{name:"executable_users",displayName:"Executable users",description:"Limit search to users with explicit launch permission on the image.",type:"Array",url:"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users.html"},{name:"include_deprecated",displayName:"Include deprecated",description:"If true, all deprecated AMIs are included in the response.",type:"Boolean",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-deprecate.html"},{name:"name_regex",displayName:"Name regex",description:"Regex string to apply to the AMI list returned by AWS.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ami#name_regex"}]},{type:"aws_rds_engine_version",blockType:"data",displayName:"Relational Database Service engine version",description:"Information about a Relational Database Service engine version.

Amazon Relational Database Service (Amazon RDS) is a web service
that makes it easier to set up, operate, and scale a relational database in the AWS Cloud.",icon:"Aws_RDS",model:"DefaultModel",url:"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Welcome.html",categories:["AWS","Data Sources"],tags:[],definedAttributes:[{name:"engine",displayName:"Engine",description:"A DB engine is the specific relational database software that runs on your DB instance.",required:!0,type:"String",url:"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Welcome.html#Welcome.Concepts.DBInstance.engine",rules:{values:["aurora","aurora-mysql","aurora-postgresql","docdb","mariadb","mysql","neptune","oracle-ee","oracle-se","oracle-se1","oracle-se2","postgres","sqlserver-ee","sqlserver-ex","sqlserver-se","sqlserver-web"]}},{name:"default_only",displayName:"Default only",description:"When set to true, the default version for the specified engine or combination of engine and major version will be returned.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/rds_engine_version#default_only"},{name:"version",displayName:"Version",description:"Version of the DB engine.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/rds_engine_version#version"},{name:"preferred_versions",displayName:"Preferred versions",description:"Ordered list of preferred engine versions.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/rds_engine_version#preferred_versions"},{name:"include_all",displayName:"Include all",description:"When set to true, the specified version or member of prefered versions will be returned even if it is deprecated.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/rds_engine_version#include_all"},{name:"parameter_group_family",displayName:"Parameter group family",description:"Name of a specific DB parameter group family.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/rds_engine_version#parameter_group_family"}]},{type:"aws_availability_zones",blockType:"data",displayName:"Availability Zones",description:"The Availability Zones data source allows access to the list of AWS Availability Zones
which can be accessed by an AWS account within the region configured in the provider.

This is different from the Availability Zone (singular).",icon:"Aws_Local-Zones",model:"DefaultModel",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html",categories:["AWS","Data Sources"],tags:[],definedAttributes:[{name:"all_availability_zones",displayName:"All Availability Zones",description:"Set to true to include all Availability Zones and Local Zones regardless of your opt in status.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/availability_zones#all_availability_zones"},{name:"exclude_names",displayName:"Exclude names",description:"List of Availability Zone names to exclude.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/availability_zones#exclude_names"},{name:"exclude_zone_ids",displayName:"Exclude zone IDs",description:"List of Availability Zone IDs to exclude.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/availability_zones#exclude_zone_ids"},{name:"state",displayName:"State",description:"Allows to filter list of Availability Zones based on their current state.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/availability_zones#state",rules:{values:["available","impaired","information","unavailable"]}}]}]),w([{type:"aws_vpc",blockType:"resource",provider:"aws",displayName:"Virtual Private Cloud (VPC)",description:"Amazon Virtual Private Cloud (Amazon VPC) enables you to launch AWS resources into a virtual network that you've defined.",icon:"Aws_Virtual-Private-Cloud",isContainer:!0,model:"DefaultContainer",url:"https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html",categories:["AWS","Networking"],tags:[],definedAttributes:[{name:"cidr_block",displayName:"CIDR block",description:"IPv4 CIDR block of the desired VPC.",type:"String",url:"https://docs.aws.amazon.com/vpc/latest/userguide/configure-your-vpc.html",rules:{regex:"^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$"}},{name:"ipv4_ipam_pool_id",displayName:"IPv4 IPAM pool ID",description:"ID of an IPv4 IPAM pool you want to use for allocating this VPC's CIDR.",type:"String",url:"https://docs.aws.amazon.com/vpc/latest/ipam/what-it-is-ipam.html"},{name:"ipv4_netmask_length",displayName:"IPv4 netmask length",description:"Netmask length of the IPv4 CIDR you want to allocate to this VPC.",type:"Number",url:"https://docs.aws.amazon.com/vpc/latest/userguide/configure-your-vpc.html",rules:{max:32,min:1}},{name:"ipv6_cidr_block",displayName:"IPv6 CIDR block",description:"IPv6 CIDR block to request from an IPAM Pool.",type:"String",url:"https://docs.aws.amazon.com/vpc/latest/userguide/configure-your-vpc.html",rules:{regex:"[a-fA-F0-9]{4}(:[a-fA-F0-9]{4}){7}"}},{name:"ipv6_ipam_pool_id",displayName:"IPv6 IPAM pool ID",description:"IPAM Pool ID for a IPv6 pool",type:"String",url:"https://docs.aws.amazon.com/vpc/latest/ipam/what-it-is-ipam.html"},{name:"ipv6_netmask_length",displayName:"IPv6 netmask length",description:"Netmask length to request from IPAM Pool.",type:"Number",url:"https://docs.aws.amazon.com/vpc/latest/userguide/configure-your-vpc.html",rules:{values:[56]}},{name:"ipv6_cidr_block_network_border_group",displayName:"IPv6 CIDR block network border group",description:"Restrict advertisement of public addresses to specific Network Border Groups such as LocalZones.",type:"String",url:"https://docs.aws.amazon.com/vpc/latest/userguide/Extend_VPCs.html"},{name:"instance_tenancy",displayName:"Instance tenancy",description:"Allowed tenancy of instances launched into the selected VPC.",type:"String",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html",rules:{values:["default","dedicated"]}},{name:"enable_dns_support",displayName:"Enable DNS support",description:"Enable DNS support in the VPC.",type:"Boolean",url:"https://docs.aws.amazon.com/vpc/latest/userguide/vpc-dns.html"},{name:"enable_dns_hostnames",displayName:"Enable DNS hostnames",description:"Enable DNS hostnames in the VPC.",type:"Boolean",url:"https://docs.aws.amazon.com/vpc/latest/userguide/vpc-dns.html"},{name:"enable_classiclink",displayName:"Enable ClassicLink",description:"Enable ClassicLink for the VPC, allowing you to link EC2-Classic instances to the VPC.",type:"Boolean",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html"},{name:"enable_classiclink_dns_support",displayName:"Enable ClassicLink DNS support",description:"Enable ClassicLink DNS Support for the VPC.
If set to true, DNS hostnames that are addressed between linked EC2-Classic instances and instances in the VPC will resolve to private IP addresses.",type:"Boolean",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html"},{name:"assign_generated_ipv6_cidr_block",displayName:"Assign generated IPv6 CIDR block",description:"Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC.",type:"Boolean",url:"https://docs.aws.amazon.com/vpc/latest/userguide/configure-your-vpc.html"},{name:"enable_network_address_usage_metrics",displayName:"Enable network address usage metrics",description:"Enable network address usage metrics for the VPC.",type:"Boolean",url:"https://docs.aws.amazon.com/vpc/latest/userguide/network-address-usage.html"},{name:"tags",displayName:"Tags",description:"A map of tags to assign to the resource.",type:"Object",url:"https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html"}]},{type:"aws_subnet",blockType:"resource",provider:"aws",displayName:"Subnet",description:"A subnet is a range of IP addresses in your VPC. You can launch AWS resources into your subnets.",icon:"Aws_Mesh",model:"DefaultModel",url:"https://docs.aws.amazon.com/vpc/latest/userguide/configure-subnets.html",categories:["AWS","Networking"],tags:[],definedAttributes:[{name:"vpc_id",displayName:"VPC ID",description:"The VPC ID to create the subnet in.",containerRef:"aws_vpc",required:!0,type:"Reference",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#vpc_id"},{name:"gateway_id",type:"Link",linkAttribute:"id",linkRef:"aws_internet_gateway",linkType:"Default",linkModel:"defaultLink"},{name:"availability_zone",displayName:"Availability zone",description:"The Availability Zone for the subnet.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#availability_zone"},{name:"availability_zone_id",displayName:"Availability zone ID",description:"The ID of the Availability Zone for the subnet.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#availability_zone_id"},{name:"cidr_block",displayName:"CIDR block",description:"IPv4 CIDR block for the subnet",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#cidr_block",rules:{regex:"^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$"}},{name:"customer_owned_ipv4_pool",displayName:"Customer owned IPv4 pool",description:"The ID of an address pool that you own.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#customer_owned_ipv4_pool"},{name:"map_customer_owned_ip_on_launch",displayName:"Map customer owned IP on launch",description:"Specify true to indicate that network interfaces created in the subnet should be assigned a customer owned IP address.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#map_customer_owned_ip_on_launch"},{name:"map_customer_ip_on_launch",displayName:"Map customer IP on launch",description:"Specify true to indicate that instances launched into the subnet should be assigned a public IP address.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#map_public_ip_on_launch"},{name:"enable_dns64",displayName:"Enable DNS64",description:"Whether DNS queries made to the Amazon-provided DNS Resolver
in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#enable_dns64"},{name:"assign_ipv6_address_on_creation",displayName:"Assign IPv6 address on creation",description:"Specify true to indicate that network interfaces created in the specified subnet should be assigned an IPv6 address.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#assign_ipv6_address_on_creation"},{name:"ipv6_cidr_block",displayName:"IPv6 CIDR block",description:"The IPv6 network range for the subnet, in CIDR notation",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#ipv6_cidr_block",rules:{regex:"[a-fA-F0-9]{4}(:[a-fA-F0-9]{4}){7}"}},{name:"ipv6_native",displayName:"IPv6 native",description:"Whether to create an IPv6-only subnet.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#ipv6_native"},{name:"enable_resource_name_dns_a_record_on_launch",displayName:"Enable ressource name DNS A record on launch",description:"Whether to respond to DNS queries for instance hostnames with DNS A records.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#enable_resource_name_dns_a_record_on_launch"},{name:"enable_resource_name_dns_aaaa_record_on_launch",displayName:"Enable ressource name DNS AAAA record on launch",description:"Whether to respond to DNS queries for instance hostnames with DNS AAAA records.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#enable_resource_name_dns_aaaa_record_on_launch"},{name:"private_dns_hostname_type_on_launch",displayName:"Private DNS hostname type on launch",description:"The type of hostnames to assign to instances in the subnet at launch.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#private_dns_hostname_type_on_launch"},{name:"outpost_arn",displayName:"Outpost Amazon Resource Name (ARN)",description:"Amazon Resource Name (ARN) of the Outpost",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#outpost_arn"},{name:"tags",displayName:"Tags",description:"A map of tags to assign to the resource.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet#tags"}]},{type:"aws_db_subnet_group",blockType:"resource",provider:"aws",displayName:"AWS DB subnet group",description:"A collection of subnets that you create in a VPC and that you then designate for your DB instances.",icon:"AwsDbSubnetGroup",model:"DefaultModel",url:"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html#USER_VPC.Subnets",categories:["AWS","Networking"],tags:[],definedAttributes:[{name:"subnet_ids",displayName:"Subnet IDs",description:"A list of VPC subnet IDs.",linkRef:"aws_subnet",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",url:"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html"}]},{type:"aws_route",blockType:"resource",provider:"aws",displayName:"AWS route",description:"Contains a set of rules, called routes, that determine where network traffic from your subnet or gateway is directed.",icon:"Aws_Route-53",model:"DefaultModel",url:"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html",categories:["AWS","Networking"],tags:[],definedAttributes:[{name:"route_table_id",displayName:"Route table ID",description:"The ID of the routing table.",containerRef:"aws_route",required:!0,type:"Reference",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route#route_table_id"},{name:"gateway_id",displayName:"Gateway ID",description:"Identifier of a VPC internet gateway or a virtual private gateway.",linkAttribute:"id",linkRef:"aws_internet_gateway",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route#gateway_id"}]},{type:"aws_route_table",blockType:"resource",provider:"aws",displayName:"Route table",description:"A route table contains a set of rules, called routes, that determine where network traffic from your subnet or gateway is directed.",icon:"Aws_Route-53_Route-Table",model:"DefaultModel",url:"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html",categories:["AWS","Networking"],tags:[],definedAttributes:[{name:"vpc_id",displayName:"VPC ID",description:"The ID of the VPC for which to create the route table.",containerRef:"aws_vpc",required:!0,type:"Reference",url:"https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html"},{name:"propagating_vgws",displayName:"Propagating Virtual GateWays (VGWS)",description:"List of virtual gateways for propagation",type:"Array",url:"https://docs.aws.amazon.com/directconnect/latest/UserGuide/virtualgateways.html"},{name:"tags",displayName:"Tags",description:"A map of tags to assign to the resource.",type:"Object",url:"https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html"}]},{type:"aws_route_table_association",blockType:"resource",provider:"aws",displayName:"Route table association",description:"Association between a route table and a subnet, internet gateway, or virtual private gateway.",icon:"Aws_Connector",model:"DefaultModel",url:"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html",categories:["AWS","Networking"],tags:[],definedAttributes:[{name:"vpc_id",displayName:"VPC ID",description:"The ID of the VPC for which to create the route table association.",containerRef:"aws_vpc",type:"Reference",url:"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html"},{name:"route_table_id",displayName:"Route table ID",description:"The ID of the route table to associate the subnet with.",linkRef:"aws_route_table",linkType:"Reverse",linkModel:"defaultLink",required:!0,type:"Link",url:"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html"},{name:"gateway_id",displayName:"Gateway ID",description:"The ID of the gateway to associate the route table with. Conflicts with subnet_id.",linkRef:"aws_internet_gateway",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Internet_Gateway.html"},{name:"subnet_id",displayName:"Subnet ID",description:"The ID of the subnet to associate the route table with. Conflicts with gateway_id.",linkRef:"aws_subnet",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://docs.aws.amazon.com/vpc/latest/userguide/configure-subnets.html"}]},{type:"aws_internet_gateway",blockType:"resource",provider:"aws",displayName:"Internet gateway",description:"An internet gateway is a horizontally scaled, redundant, and highly available VPC component
that allows communication between your VPC and the internet.",icon:"Aws_VPC_Internet-Gateway",model:"DefaultModel",url:"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Internet_Gateway.html",categories:["AWS","Networking"],tags:[],definedAttributes:[{name:"vpc_id",displayName:"VPC ID",description:"The VPC ID to create the gateway in.",containerRef:"aws_vpc",type:"Reference",url:"https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html"},{name:"tags",displayName:"Tags",description:"A map of tags to assign to the resource.",type:"Object",url:"https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html"}]}]),w([{type:"aws_security_group",blockType:"resource",provider:"aws",displayName:"Security group",description:"A security group controls the traffic that is allowed to reach and leave the resources that it is associated with.",icon:"AwsSecurityGroup",model:"DefaultModel",url:"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html",categories:["AWS","Security"],tags:[],definedAttributes:[{name:"description",displayName:"Description",description:"Description of the security group.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#description"},{name:"name",displayName:"Name",description:"Name of the security group.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#name"},{name:"name_prefix",displayName:"Name prefix",description:"Creates a unique name beginning with the specified prefix.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#name_prefix"},{name:"revoke_rules_on_delete",displayName:"Revoke rules on delete",description:"Instruct Terraform to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#revoke_rules_on_delete"},{name:"vpc_id",displayName:"VPC ID",description:"The ID of the VPC for which to create the security group.",containerRef:"aws_vpc",linkAttribute:"id",linkRef:"aws_vpc",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#vpc_id"},{name:"egress",displayName:"Egress",description:"Configuration block for egress rules",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#egress",definedAttributes:[{name:"from_port",displayName:"From port",description:"Start port (or ICMP type number if protocol is icmp).",required:!0,type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#from_port"},{name:"to_port",displayName:"To port",description:"End port (or ICMP code if protocol is icmp).",required:!0,type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#to_port"},{name:"protocol",displayName:"Protocol",description:"The protocol. If not icmp, tcp, udp, or all use the -1 protocol number.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#protocol"},{name:"cidr_blocks",displayName:"CIDR blocks",description:"List of CIDR blocks.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#cidr_blocks"},{name:"ipv6_cidr_blocks",displayName:"IPv6 CIDR blocks",description:"List of IPv6 CIDR blocks.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#ipv6_cidr_blocks"}]},{name:"ingress",displayName:"Ingress",description:"Configuration block for Ingress rules",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#ingress",definedAttributes:[{name:"from_port",displayName:"From port",description:"Start port (or ICMP type number if protocol is icmp).",required:!0,type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#from_port"},{name:"to_port",displayName:"To port",description:"End port (or ICMP code if protocol is icmp).",required:!0,type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#to_port"},{name:"protocol",displayName:"Protocol",description:"The protocol. If not icmp, tcp, udp, or all use the -1 protocol number.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#protocol"},{name:"cidr_blocks",displayName:"CIDR blocks",description:"List of CIDR blocks.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#cidr_blocks"},{name:"ipv6_cidr_blocks",displayName:"IPv6 CIDR blocks",description:"List of IPv6 CIDR blocks.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group#ipv6_cidr_blocks"}]},{name:"tags",displayName:"Tags",description:"A map of tags to assign to the resource.",type:"Object",url:"https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html"}]},{type:"aws_key_pair",blockType:"resource",provider:"aws",displayName:"AWS key pair",description:"A set of security credentials to prove your identity when connecting to an Amazon EC2 instance.",icon:"Aws_Identity-Access-Management_Long-Term-Security-Credential",model:"DefaultModel",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html",categories:["AWS","Security"],tags:[],definedAttributes:[{name:"key_name",displayName:"Key name",description:"The name for the key pair.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/key_pair#key_name"},{name:"public_key",displayName:"Public key",description:"The public key material.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/key_pair#public_key"},{name:"key_name_prefix",displayName:"Key name prefix",description:"Creates a unique name beginning with the specified prefix.
Conflicts with key_name.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/key_pair#key_name_prefix"},{name:"tags",displayName:"Tags",description:"A mapping of tags to assign to the resource.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/key_pair#tags"}]}]),w([{type:"aws_instance",blockType:"resource",provider:"aws",displayName:"EC2 Instance",description:"Provides an EC2 instance resource.",icon:"Aws_EC2-Instance",model:"DefaultModel",url:"https://docs.aws.amazon.com/ec2/index.html",categories:["AWS","Compute"],tags:[],definedAttributes:[{name:"security_groups",displayName:"Security groups",description:"List of security group names to associate with.",linkAttribute:"name",linkRef:"aws_security_group",linkType:"Reverse",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance#security_groups"},{name:"vpc_security_group_ids",displayName:"VPC security group IDs",description:"List of security group IDs to associate with.",linkAttribute:"id",linkRef:"aws_security_group",linkType:"Reverse",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance#vpc_security_group_ids"},{name:"subnet_id",displayName:"Subnet ID",description:"The VPC Subnet ID to launch in.",linkAttribute:"id",linkRef:"aws_subnet",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance#subnet_id"}]},{type:"aws_launch_configuration",blockType:"resource",provider:"aws",displayName:"Launch configuration",description:"A launch configuration is an instance configuration template that an Auto Scaling group uses to launch EC2 instances.
When you create a launch configuration, you specify information for the instances.",icon:"Aws_Launch-Configuration",model:"DefaultModel",url:"https://docs.aws.amazon.com/autoscaling/ec2/userguide/launch-configurations.html",categories:["AWS","Compute"],tags:[],definedAttributes:[{name:"image_id",displayName:"Image ID",description:"The EC2 image ID to launch.",linkRef:"aws_ami",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#image_id"},{name:"instance_type",displayName:"Instance type",description:"The size of instance to launch.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#instance_type"},{name:"iam_instance_profile",displayName:"IAM instance profile",description:"The name attribute of the IAM instance profile to associate with launched instances.",type:"String",url:"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html"},{name:"associate_public_ip_address",displayName:"Associate public IP address",description:"Associate a public ip address with an instance in a VPC.",type:"Boolean",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html"},{name:"enable_monitoring",displayName:"Enable monitoring",description:"Enables/disables detailed monitoring.",type:"Boolean",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring_ec2.html"},{name:"key_name",displayName:"Key name",description:"The key name that should be used for the instance.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#key_name"},{name:"name",displayName:"Name",description:"The name of the launch configuration.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#name"},{name:"name_prefix",displayName:"Name prefix",description:"Creates a unique name beginning with the specified prefix.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#name_prefix"},{name:"security_groups",displayName:"Security groups",description:"A list of associated security group IDS.",linkRef:"aws_security_group",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#security_groups"},{name:"placement_tenancy",displayName:"Placement tenancy",description:"The tenancy of the instance.",type:"String",url:"https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_CreateLaunchConfiguration.html",rules:{values:["enabled","disabled"]}},{name:"spot_price",displayName:"Spot price",description:"The maximum price to use for reserving spot instances.",type:"Number",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spot-instances.html"},{name:"user_data",displayName:"User data",description:'The user data to provide when launching the instance.
If you need to pass gzip-compressed data via this argument, use "user_data_base64" instead.',type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#user_data"},{name:"user_data_base64",displayName:"User data base64",description:'Can be used instead of "user_data" to pass base64-encoded binary data directly,
whenever the value is not a valid UTF-8 string.',type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#user_data_base64"},{name:"vpc_classic_link_id",displayName:"VPC ClassicLink ID",description:"The ID of a ClassicLink-enabled VPC.",linkRef:"aws_vpc",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html"},{name:"vpc_classic_link_security_groups",displayName:"VPC ClassicLink security groups",description:"The IDs of one or more security groups for the specified ClassicLink-enabled VPC.",linkRef:"aws_security_group",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html"},{name:"ebs_optimized",displayName:"EBS optimized",description:"If true, the launched EC2 instance will be EBS-optimized.",type:"Boolean",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html"},{name:"ebs_block_device",displayName:"EBS block device",description:"Additional EBS block devices to attach to the instance.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#ebs_block_device",definedAttributes:[{name:"device_name",displayName:"Device name",description:"The name of the device to mount.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#device_name"},{name:"snapshot_id",displayName:"Snapshot ID",description:"The Snapshot ID to mount.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#snapshot_id"},{name:"volume_size",displayName:"Volume size",description:"The size of the volume in gigabytes.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#volume_size"},{name:"volume_type",displayName:"Volume type",description:"The type of volume.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration#volume_type",rules:{values:["standard","gp2","gp3","st1","sc1","io1"]}},{name:"iops",displayName:"IOPS",description:'The amount of provisioned Input/output Operations Per Second (IOPS). This must be set with a volume_type of "io1".',type:"Number",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-io-characteristics.html"},{name:"throughput",displayName:"Throughput",description:"The throughput (MiBps) to provision for a gp3 volume.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#throughput"},{name:"delete_on_termination",displayName:"Delete on termination",description:"Whether the volume should be destroyed on instance termination.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#delete_on_termination"},{name:"encrypted",displayName:"Encrypted",description:"Whether the volume should be encrypted or not.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#encrypted"},{name:"no_device",displayName:"No device",description:"Whether the device in the block device mapping of the AMI is suppressed.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#no_device"}]},{name:"ephemeral_block_device",displayName:"Ephemeral block device",description:'Customize Ephemeral (also known as "Instance Store") volumes on the instance.',type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#ephemeral_block_device",definedAttributes:[{name:"device_name",displayName:"Device name",description:"The name of the block device to mount on the instance.",required:"true",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#ephemeral_block_device"},{name:"no_device",displayName:"No device",description:"Whether the device in the block device mapping of the AMI is suppressed.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#ephemeral_block_device"},{name:"virtual_name",displayName:"Virtual name",description:"The Instance Store Device Name.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#virtual_name"}]},{name:"metadata_options",displayName:"Metadata options",description:"The metadata options for the instance.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration#metadata_options",definedAttributes:[{name:"http_endpoint",displayName:"HTTP endpoint",description:"The state of the metadata service: enabled, disabled.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration#http_endpoint",rules:{values:["enabled","disabled"]}},{name:"http_tokens",displayName:"HTTP tokens",description:"Whether the HTTP tokens are required.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration#http_tokens",rules:{values:["optional","required"]}},{name:"http_put_response_hop_limit",displayName:"HTTP PUT response hop limit",description:"The desired HTTP PUT response hop limit for instance metadata requests.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration#http_put_response_hop_limit"}]},{name:"root_block_device",displayName:"Root block device",description:"Customize details about the root block device of the instance.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#root_block_device",definedAttributes:[{description:"Whether the volume should be destroyed on instance termination.",displayName:"Delete on termination",name:"delete_on_termination",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#root_block_device"},{description:"Whether the volume should be encrypted or not. Defaults to false.",displayName:"Encrypted",name:"encrypted",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#root_block_device"},{description:"The amount of provisioned IOPS.",displayName:"IOPS",name:"iops",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#root_block_device"},{description:"The throughput (MiBps) to provision for a gp3 volume.",displayName:"Throughput",name:"throughput",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#root_block_device"},{description:"The size of the volume in gigabytes.",displayName:"Volume",name:"volume_size",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#root_block_device"},{displayName:"Volume type",name:"volume_type",rules:{values:["standard","gp2","gp3","st1","sc1","io1"]},type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_configuration.html#root_block_device"}]}]},{type:"aws_autoscaling_group",blockType:"resource",provider:"aws",displayName:"Auto Scaling Group",description:"Provides an Auto Scaling Group resource.",icon:"Aws_Auto-Scaling",model:"DefaultModel",url:"https://docs.aws.amazon.com/autoscaling/ec2/userguide/auto-scaling-groups.html",categories:["AWS","Compute"],tags:[],definedAttributes:[{name:"name",displayName:"Name",description:"Name of the Auto Scaling Group.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group#name"},{name:"min_size",displayName:"Min Size",description:"Minimum size of the Auto Scaling Group.",required:!0,type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group#min_size"},{name:"max_size",displayName:"Max Size",description:"Maximum size of the Auto Scaling Group.",required:!0,type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group#max_size"},{name:"deired_capacity",displayName:"Desired Capacity",description:"Number of Amazon EC2 instances that should be running in the group.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group#desired_capacity"},{name:"health_check_type",displayName:"Health Check Type",description:"Controls how health checking is done.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group#health_check_type",rules:{values:["EC2","ELB"]}},{name:"target_group_arns",displayName:"Target Group ARNs",description:"Set of aws_alb_target_group ARNs, for use with Application or Network Load Balancing.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group#target_group_arns"}]},{type:"aws_autoscaling_policy",blockType:"resource",provider:"aws",displayName:"Autoscaling policy",description:"Provides an Auto Scaling policy resource.",icon:"Aws_Auto-Scaling",model:"DefaultModel",url:"https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-simple-step.html",categories:["AWS","Compute"],tags:[],definedAttributes:[{name:"name",displayName:"Name",description:"Name of the policy.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#name"},{name:"autoscaling_group_name",displayName:"Autoscaling group name",description:"Name of the autoscaling group.",linkRef:"aws_autoscaling_group",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#autoscaling_group_name"},{name:"adjustment_type",displayName:"Adjustment type",description:"Whether the adjustment is an absolute number or a percentage of the current capacity.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#adjustment_type",rules:{values:["ChangeInCapacity","ExactCapacity","PercentChangeInCapacity"]}},{name:"policy_type",displayName:"Policy type",description:"Policy type",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#policy_type",rules:{values:["SimpleScaling","StepScaling","TargetTrackingScaling","PredictiveScaling"]}},{name:"cooldown",displayName:"Cooldown",description:"Amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.
Only available for SimpleScaling policies.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#cooldown"},{name:"scaling_adjustment",displayName:"Scaling adjustment",description:"Number of instances by which to scale.
Only available for SimpleScaling policies.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#scaling_adjustment"},{name:"estimated_instance_warmup",displayName:"Estimated instance warmup",description:"Estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#estimated_instance_warmup"},{name:"enabled",displayName:"Enabled",description:"Whether the policy should be enabled.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#enabled"},{name:"min_adjustment_magnitude",displayName:"Min adjustment magnitude",description:"Minimum value to scale by when adjustment_type is set to PercentChangeInCapacity.
Only valid when policy_type is SimpleScaling or StepScalling.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#min_adjustment_magnitude"},{name:"metric_aggregation_type",displayName:"Metric aggregation type",description:"The aggregation type for the CloudWatch metrics.
Only valid when policy_type is StepScaling.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#metric_aggregation_type",rules:{values:["Average","Minimum","Maximum"]}},{name:"step_adjustment",displayName:"Step adjustment",description:"A list of step adjustments.
Only valid when policy_type is StepScaling.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#step_adjustment",definedAttributes:[{name:"metric_interval_lower_bound",displayName:"Metric interval lower bound",description:"The lower bound for the difference between the alarm threshold and the CloudWatch metric.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#metric_interval_lower_bound"},{name:"metric_interval_upper_bound",displayName:"Metric interval upper bound",description:"The upper bound for the difference between the alarm threshold and the CloudWatch metric.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#metric_interval_upper_bound"},{name:"scaling_adjustment",displayName:"Scaling adjustment",description:"The number of members by which to scale.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_policy#scaling_adjustment"}]}]}]),w([{type:"aws_ebs_volume",blockType:"resource",provider:"aws",displayName:"EBS Volume",description:"A durable, block-level storage device that you can attach to your instances.",icon:"Aws_Elastic-Block-Store_Volume",model:"DefaultModel",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volumes.html",categories:["AWS","Storage"],tags:[],definedAttributes:[{name:"availability_zone",displayName:"Availability zone",description:"The Availability Zone where the EBS volume will exist.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ebs_volume#availability_zone"}]},{type:"aws_volume_attachment",blockType:"resource",provider:"aws",displayName:"AWS volume attachment",description:"Attach an EBS volume to one or more instances",icon:"Aws_Elastic-Block-Store_Volume",model:"DefaultModel",url:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html",categories:["AWS","Storage"],tags:[],definedAttributes:[{name:"device_name",displayName:"Device name",description:"The device name to expose to the instance (for example, /dev/sdh or xvdh).",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/volume_attachment#device_name"},{name:"volume_id",displayName:"Volume ID",description:"The ID of the Volume to attach to.",linkAttribute:"id",linkRef:"aws_ebs_volume",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/volume_attachment#volume_id"},{name:"instance_id",displayName:"Instance ID",description:"The ID of the Instance to attach to.",linkAttribute:"id",linkRef:"aws_instance",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/volume_attachment#instance_id"}]},{type:"aws_s3_bucket",blockType:"resource",provider:"aws",displayName:"S3 bucket",description:"Amazon Simple Storage Service (Amazon S3) is an object storage service.",icon:"Aws_Storage-Service_Bucket",model:"DefaultModel",url:"https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html",categories:["AWS","Storage"],tags:[],definedAttributes:[{name:"bucket",displayName:"Bucket name",description:"The name of the bucket.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket#bucket",rules:{max:63,min:1}},{name:"bucket_prefix",displayName:"Bucket prefix",description:"Creates a unique bucket name beginning with the specified prefix.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket#bucket_prefix",rules:{max:63,min:1}},{name:"force_destroy",displayName:"Force destroy",description:"Indicates if all objects (including any locked objects) should be deleted from the bucket
when the bucket is destroyed so that the bucket can be destroyed without error.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket#force_destroy"},{name:"object_lock_enabled",displayName:"Object lock enabled",description:"Indicates whether this bucket has an Object Lock configuration enabled.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket#object_lock_enabled"},{name:"tags",displayName:"Tags",description:"A map of tags to assign to the resource.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket#tags"}]},{type:"aws_s3_bucket_acl",blockType:"resource",provider:"aws",displayName:"S3 bucket Access Control List (ACL)",description:"Amazon S3 access control lists (ACLs) enable you to manage access to buckets and objects.",icon:"Aws_Storage-Service_Bucket-ACL",model:"DefaultModel",url:"https://docs.aws.amazon.com/AmazonS3/latest/userguide/acls.html",categories:["AWS","Storage"],tags:[],definedAttributes:[{name:"bucket",displayName:"Bucket",description:"The name of the bucket to put the ACL in.",linkRef:"aws_s3_bucket",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_acl#bucket"},{name:"acl",displayName:"ACL",description:"ACL to apply to the bucket
Conflicts with access_control_policy",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_acl#acl"},{name:"expected_bucket_owner",displayName:"Bucket owner",description:"Account ID of the expected bucket owner",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_acl#expected_bucket_owner"}]},{type:"aws_efs_file_system",blockType:"resource",provider:"aws",displayName:"EFS File System",description:"Provides an Elastic File System (EFS) File System resource.",icon:"Amazon-EFS",model:"DefaultModel",url:"https://aws.amazon.com/efs/?nc1=h_ls",categories:["AWS","Storage"],tags:[],definedAttributes:[{name:"arn",displayName:"ARN",description:"Amazon Resource Name (ARN) of the file system.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#arn"},{name:"availability_zone_name",displayName:"Availability zone name",description:"The AWS Availability Zone in which to create the file system.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#availability_zone_name"},{name:"availability_zone_id",displayName:"Availability zone ID",description:"The identifier of the Availability Zone in which the file system's One Zone storage classes exist.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#availability_zone_id"},{name:"creation_token",displayName:"Creation token",description:"A unique name used as reference when creating the Elastic File System to ensure idempotent file system creation.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#creation_token",rules:{max:"64",min:"1"}},{name:"encrypted",displayName:"Encrypted",description:"If true, the disk will be encrypted.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#encrypted"},{name:"kms_key_id",displayName:"Encrypted",description:"Amazon Resource Name (ARN) for the Key Management Service (KMS) encryption key.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#kms_key_id"},{name:"lifecycle_policy",displayName:"Lifecycle policy",description:"A file system lifecycle policy",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#lifecycle_policy",definedAttributes:[{name:"transition_to_ia",displayName:"Transition to IA",description:"Indicates how long it takes to transition files to the IA storage class.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#transition_to_ia",rules:{values:["AFTER_1_DAY","AFTER_7_DAYS","AFTER_14_DAYS","AFTER_30_DAYS","AFTER_60_DAYS","AFTER_90_DAYS"]}},{name:"transition_to_primary_storage_class",displayName:"Transition to primary storage class",description:"Describes the policy used to transition a file from infrequent access storage to primary storage.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#transition_to_primary_storage_class",rules:{values:["AFTER_1_ACCESS"]}}]},{name:"performance_mode",displayName:"Performance mode",description:"The file system performance mode.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#performance_mode",rules:{values:["generalPurpose","maxIO"]}},{name:"provisioned_throughput_in_mibps",displayName:"Provisioned throughput in Mibps",description:"The throughput, measured in MiB/s, that you want to provision for the file system.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#provisioned_throughput_in_mibps"},{name:"throughput_mode",displayName:"Throughput mode",description:"Throughput mode for the file system.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#throughput_mode",rules:{values:["bursting","provisioned","elastic"]}},{name:"size_in_bytes",displayName:"Size in bytes",description:"Current byte count used by the file system.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/efs_file_system#size_in_bytes"},{name:"tags",displayName:"Tags",description:"A mapping of tags to assign to the file system.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#tags"}]},{type:"aws_efs_mount_target",blockType:"resource",provider:"aws",displayName:"EFS Mount Target",description:"Provide an Elastic File System (EFS) mount target.",icon:"Amazon-EFS",model:"DefaultModel",url:"https://docs.aws.amazon.com/efs/latest/ug/accessing-fs.html",categories:["AWS","Storage"],tags:[],definedAttributes:[{name:"file_system_id",displayName:"File system ID",description:"The ID of the file system for which the mount target is intended.",linkRef:"aws_efs_file_system",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_mount_target#file_system_id"},{name:"subnet_id",displayName:"Subnet ID",description:"The ID of the subnet to add the mount target in.",linkRef:"aws_subnet",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_mount_target#subnet_id"},{name:"ip_address",displayName:"IP address",description:"The address (within the address range of the specified subnet) at which the file system may be mounted via the mount target.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_mount_target#ip_address"},{name:"security_groups",displayName:"Security groups",description:"A list of up to 5 VPC security group IDs (that must be for the same VPC as subnet specified) in effect for the mount target.",linkRef:"aws_security_group",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_mount_target#security_groups"}]}]),w([{type:"aws_db_instance",blockType:"resource",provider:"aws",displayName:"AWS DB instance",description:"An isolated database environment.",icon:"Aws_EC2_DB-Instance",model:"DefaultModel",url:"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.html",categories:["AWS","Databases"],tags:[],definedAttributes:[{name:"allocated_storage",displayName:"Allocated storage",description:"The allocated storage in gigabytes.",required:!0,type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#allocated_storage"},{name:"db_name",displayName:"Database name",description:"The name of the database to create when the DB instance is created. If this parameter is not specified, no database is created in the DB instance.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#db_name"},{name:"engine",displayName:"Database engine",description:"The database engine to use.",linkRef:"aws_rds_engine_version",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#engine"},{name:"vpc_security_group_ids",displayName:"VPC security groups",description:"A list of VPC security groups to associate.",linkRef:"aws_security_group",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#vpc_security_group_ids"},{name:"instance_class",displayName:"Instance class",description:"The instance type of the Relational Database Service instance.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#instance_class"},{name:"db_subnet_group_name",displayName:"Subnet group name",description:"Name of DB subnet group. DB instance will be created in the VPC associated with the DB subnet group.",linkAttribute:"name",linkRef:"aws_db_subnet_group",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#db_subnet_group_name"},{name:"username",displayName:"Username",description:"Username for the master DB user.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#username"},{name:"password",displayName:"Password",description:"Password for the master DB user.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#password"},{name:"skip_final_snapshot",displayName:"Skip final snapshot",description:"Determines whether a final DB snapshot is created before the DB instance is deleted.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#skip_final_snapshot"},{name:"publicly_accessible",displayName:"Publicly accessible",description:"Controls if instance is publicly accessible.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#publicly_accessible"},{name:"allow_major_version_upgrade",displayName:"Allow major version upgrade",description:"Indicates that major version upgrades are allowed.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#allow_major_version_upgrade"},{name:"apply_immediately",displayName:"Apply immediately",description:"Specifies whether any database modifications are applied immediately, or during the next maintenance window.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#apply_immediately"},{name:"auto_minor_version_upgrade",displayName:"Auto minor version upgrade",description:"Indicates that minor engine upgrades will be applied automatically to the DB instance during the maintenance window.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#auto_minor_version_upgrade"},{name:"availability_zone",displayName:"Availability zone",description:"The Availability Zone for the Relational Database Service instance.",linkAttribute:"id",linkRef:"aws_availability_zones",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#availability_zone"},{name:"backup_retention_period",displayName:"Backup retention period",description:"The days to retain backups for.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#backup_retention_period",rules:{max:"35",min:"0"}},{name:"backup_window",displayName:"Backup window",description:"The daily time range (in UTC) during which automated backups are created if they are enabled.
Must not overlap with maintenance_window.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#backup_window"},{name:"character_set_name",displayName:"Character set name",description:"Specifies the character set to associate with the DB instance.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#character_set_name"},{name:"copy_tags_to_snapshot",displayName:"Copy tags to snapshot",description:"Whether to copy all Instance tags to snapshots, or not.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#copy_tags_to_snapshot"},{name:"delete_automated_snapshots",displayName:"Delete automated snapshots",description:"Whether to remove automated backups when the DB instance is deleted.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#delete_automated_snapshots"},{name:"deletion_protection",displayName:"Deletion protection",description:"If 'Deletion protection' is set to true, the DB instance cannot be deleted. Otherwise, it can.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#deletion_protection"},{name:"final_snapshot_identifier",displayName:"Final snapshot identifier",description:"The name of the final DB snapshot when this DB instance is deleted.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#final_snapshot_identifier"},{name:"iam_database_authentication_enabled",displayName:"IAM database authentication enabled",description:"Specifies whether mappings of AWS Identity and Access Management (IAM) accounts to database accounts is enabled.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#iam_database_authentication_enabled"},{name:"identifier",displayName:"Identifier",description:"The name of the Relational Database Service instance.
Conflicts with identifier_prefix.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#identifier"},{name:"identifier_prefix",displayName:"Identifier prefix",description:"Creates a unique identifier beginning with the specified prefix.
Conflicts with identifier.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#identifier_prefix"},{name:"iops",displayName:"IOPS",description:"The amount of provisioned IOPS.
Can only be set when storage_type is io1 or p3.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#iops"},{name:"maintenance_window",displayName:"Maintenance window",description:"The window to perform maintenance in.
Format: ddd:hh24:mi-ddd:hh24:mi.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#maintenance_window"},{name:"max_allocated_storage",displayName:"Max allocated storage",description:"The upper limit to which Amazon RDS can automatically scale the storage of the DB instance.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#max_allocated_storage"},{name:"monitoring_interval",displayName:"Monitoring interval",description:"The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#monitoring_interval",rules:{values:["0","1","5","10","15","30","60"]}},{name:"multi_az",displayName:"Multi AZ",description:"Specifies if the Relational Database Service instance is on multiple Availability Zones.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#multi_az"},{name:"network_type",displayName:"Network type",description:"The type of network connection to use for connecting to an Amazon Relational Database Service instance.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#network_type",rules:{values:["IPV4","DUAL"]}},{name:"option_group_name",displayName:"Option group name",description:"The name of the option group to associate.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#option_group_name"},{name:"parameter_group_name",displayName:"Parameter group name",description:"The name of the DB parameter group to associate.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#parameter_group_name"},{name:"performance_insights_enabled",displayName:"Performance insights enabled",description:"Specifies whether Performance Insights are enabled.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#performance_insights_enabled"},{name:"performance_insights_retention_period",displayName:"Performance insights retention period",description:"The amount of time in days to retain Performance Insights data.
Must be a multiple of 31.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#performance_insights_retention_period"},{name:"port",displayName:"Port",description:"The port on which the DB accepts connections.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#port",rules:{max:"65535",min:"1"}},{name:"replica_mode",displayName:"Replica mode",description:"Specifies whether the replica is in either mounted or open-read-only mode.
This attribute is only supported by Oracle instances.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#replica_mode",rules:{values:["mounted","open-read-only"]}},{name:"restore_to_point_in_time",displayName:"Restore to point in time",description:"Restore from a point in time.
Must be specified if restore is set to true.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#restore_to_point_in_time",definedAttributes:[{name:"restore_time",displayName:"Restore time",description:"The date and time to restore from.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#restore_time"},{name:"source_db_instance_identifier",displayName:"Source DB instance identifier",description:"The identifier of the source DB instance from which to restore.",linkRef:"aws_db_instance",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#source_db_instance_identifier"},{name:"use_latest_restorable_time",displayName:"Use latest restorable time",description:"Specifies whether to restore the DB instance to the latest restorable backup time.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#use_latest_restorable_time"},{name:"source_db_instance_automated_backups_arn",displayName:"Source DB instance automated backups ARN",description:"The ARN of the automated backup from which to restore.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#source_db_instance_automated_backups_arn"},{name:"source_dbi_resource_id",displayName:"Source DBI resource ID",description:"The resource ID of the source DB instance from which to restore.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#source_dbi_resource_id"}]},{name:"s3_import",displayName:"S3 import",description:"Import from an S3 bucket.
Must be specified if import is set to true.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#s3_import",definedAttributes:[{name:"bucket_name",displayName:"Bucket name",description:"The name of the S3 bucket where the backup is stored.",linkRef:"aws_s3_bucket",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#bucket_name"},{name:"bucket_prefix",displayName:"Bucket prefix",description:"The path to the backup.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#bucket_prefix"},{name:"ingestion_role",displayName:"Ingestion role",description:"Role applied to load the data.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#ingestion_role"},{name:"source_engine",displayName:"Source engine",description:"Source engine for the backup.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#source_engine"},{name:"source_engine_version",displayName:"Source engine version",description:"Version of the source engine used for the backup.",linkRef:"aws_rds_engine_version",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#source_engine_version"}]},{name:"storage_encrypted",displayName:"Storage encrypted",description:"Specifies whether the DB instance is encrypted.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#storage_encrypted"},{name:"storage_type",displayName:"Storage type",description:"The type of storage for the DB.",type:"Array",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#storage_type",rules:{values:["standard","gp2","gp3","io1"]}},{name:"storage_throughput",displayName:"Storage throughput",description:"The storage throughput value for the DB instance.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#storage_throughput"},{name:"timezone",displayName:"Timezone",description:"The timezone of the DB instance.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#timezone"},{name:"customer_owned_ip_enabled",displayName:"Customer owned IP enabled",description:"Specifies whether the DB instance is a customer-owned IP address (CoIP) enabled.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#customer_owned_ip_enabled"},{name:"tags",displayName:"Tags",description:"A mapping of tags to assign to the DB instance.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#tags"}]}]),w([{type:"aws_elb",blockType:"resource",provider:"aws",displayName:"AWS ELB",description:"Automatically distributes incoming application traffic across multiple targets and virtual appliances in one or more Availability Zones.",icon:"Aws_Elastic-Load-Balancing_Network-Load-Balancer",model:"DefaultModel",url:"https://aws.amazon.com/elasticloadbalancing/",categories:["AWS","Load Balancing"],tags:[],definedAttributes:[{name:"listener",displayName:"Listener",description:"A list of listener blocks. Each listener block supports fields documented below.",required:!0,type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elb#listener",definedAttributes:[{name:"instance_port",displayName:"Instance port",description:"The port on the instance to route to.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elb#instance_port"},{name:"lb_port",displayName:"LB port",description:"The port to listen on for the load balancer.",required:!0,type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elb#lb_port"},{name:"lb_protocol",displayName:"LB protocol",description:"The protocol to listen on. Valid values are HTTP, HTTPS, TCP, or SSL.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elb#lb_protocol"},{name:"instance_protocol",displayName:"Instance protocol",description:"The protocol to use to the instance. Valid values are HTTP, HTTPS, TCP, or SSL.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elb#instance_protocol"}]},{name:"subnets",displayName:"Subnets",description:"A list of subnet IDs to attach to the ELB.",linkAttribute:"id",linkRef:"aws_subnet",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elb#subnets"},{name:"security_groups",displayName:"Security groups",description:"A list of security group IDs to assign to the ELB.",linkAttribute:"id",linkRef:"aws_security_group",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elb#security_groups"},{name:"instances",displayName:"Instances",description:"A list of instance ids to place in the ELB pool.",linkAttribute:"id",linkRef:"aws_instance",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elb#instances"}]},{type:"aws_lb",blockType:"resource",provider:"aws",displayName:"Application Load Balancer (LB)",description:"A load balancer serves as the single point of contact for clients. The load balancer distributes incoming application traffic across multiple targets, in multiple Availability Zones.",icon:"Aws_Application-Load-Balancer",model:"DefaultModel",url:"https://docs.aws.amazon.com/elasticloadbalancing/latest/application/introduction.html",categories:["AWS","Load Balancing"],tags:[],definedAttributes:[{name:"vpc_id",displayName:"VPC ID",description:"The ID of the VPC to create the ALB in.",containerRef:"aws_vpc",type:"Reference",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#vpc_id"},{name:"name",displayName:"Name",description:"The name of the LB. This name must be unique within your AWS account.
If not specified, Terraform will autogenerate a name beginning with tf-lb.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#name",rules:{regex:"^([a-zA-Z0-9]+-)*[a-zA-Z0-9]+$"}},{name:"internal",displayName:"Internal LB",description:"If true, the LB will be internal.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#internal"},{name:"load_balancer_type",displayName:"Load balancer type",description:"The type of load balancer to create.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#load_balancer_type",rules:{values:["application","gateway","network"]}},{name:"access_logs",displayName:"Access logs",description:"An Access Logs block.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb",definedAttributes:[{name:"bucket",displayName:"Bucket",description:"The S3 bucket name to store the logs in.",linkRef:"aws_s3_bucket",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#bucket"},{name:"enabled",displayName:"Enabled",description:"Boolean to enable / disable access_logs. Defaults to false, even when bucket is specified.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#enabled"},{name:"prefix",displayName:"Prefix",description:"The S3 bucket prefix. Logs are stored in the root if not configured.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#prefix"}]},{name:"customer_owned_ipv4_pool",displayName:"Customer owned ivp4 pool",description:"The ID of the customer owned ipv4 pool to use for this load balancer.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#customer_owned_ipv4_pool"},{name:"desync_mitigation_mode",displayName:"Customer owned ivp4 pool",description:"Determines how the load balancer handles requests that might pose a security risk to an application due to HTTP desync.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#desync_mitigation_mode",rules:{values:["defensive","monitor","strictest"]}},{name:"drop_invalid_header_fields",displayName:"Drop invalid header fields",description:"Indicates whether HTTP headers with header fields that are not valid are removed by the load balancer (true) or routed to targets (false).
The default is false. Elastic Load Balancing requires that message header names contain only alphanumeric characters and hyphens. Only valid for Load Balancers of type.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#drop_invalid_header_fields"},{name:"enable_cross_zone_load_balancing",displayName:"Enable cross zone load balancing",description:"If true, cross-zone load balancing of the load balancer will be enabled. For network and gateway type load balancers, this feature is disabled by default (false).
For application load balancer this feature is always enabled (true) and cannot be disabled. Defaults to false.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#enable_cross_zone_load_balancing"},{name:"enable_deletion_protection",displayName:"Enable deletion protection",description:"If true, deletion of the load balancer will be disabled via the AWS API. This will prevent Terraform from deleting the load balancer. Defaults to false.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#enable_deletion_protection"},{name:"enable_http2",displayName:"Enable http2",description:"Indicates whether HTTP/2 is enabled in application load balancers. Defaults to true.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#enable_http2"},{name:"enable_waf_fail_open",displayName:"Enable WAF fail open",description:"Indicates whether to allow a WAF-enabled load balancer to route requests to targets
if it is unable to forward the request to AWS WAF. Defaults to false.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#enable_waf_fail_open"},{name:"idle_timeout",displayName:"Idle timeout",description:"The time in seconds that the connection is allowed to be idle.
Only valid for Load Balancers of type application. Default: 60.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#idle_timeout"},{name:"ip_address_type",displayName:"IP address type",description:"The type of IP addresses used by the subnets for your load balancer.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#ip_address_type",rules:{values:["ipv4","dualstack"]}},{name:"security_groups",displayName:"Security groups",description:"A list of security group IDs to assign to the LB. Only valid for Load Balancers of type application.",linkRef:"aws_security_group",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#security_groups"},{name:"preserve_host_header",displayName:"Preserve host header",description:"Indicates whether the Application Load Balancer should preserve the Host header in the HTTP request
and send it to the target without any change. Defaults to false.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#preserve_host_header"},{name:"subnet_mapping",displayName:"Subnet mapping",description:"A subnet mapping block.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#subnet_mapping",definedAttributes:[{name:"subnet_id",displayName:"Subnet ID",description:"ID of the subnet of which to attach to the load balancer. You can specify only one subnet per Availability Zone.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#subnet_id"},{name:"allocation_id",displayName:"Allocation ID",description:"The allocation ID of the Elastic IP address for an internet-facing load balancer.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#allocation_id"},{name:"ipv6_address",displayName:"IPv6 address",description:"The IPv6 address. You associate IPv6 CIDR blocks with your VPC and choose the subnets
where you launch both internet-facing and internal Application Load Balancers or Network Load Balancers.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#ipv6_address"},{name:"private_ipv4_address",displayName:"Private IPv4 address",description:"The private IPv4 address for an internal load balancer.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#private_ipv4_address"}]},{name:"subnets",displayName:"Subnets",description:"A list of subnet IDs to attach to the LB. Subnets cannot be updated for Load Balancers of type network.
Changing this value for load balancers of type network will force a recreation of the resource.",linkRef:"aws_subnet",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#subnets"},{name:"name_prefix",displayName:"Name prefix",description:"Creates a unique name beginning with the specified prefix. Conflicts with name.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#name_prefix"},{name:"tags",displayName:"Tags",description:"A map of tags to assign to the resource. If configured with a provider default_tags configuration block present,
tags with matching keys will overwrite those defined at the provider-level.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb#tags"}]},{type:"aws_lb_target_group",blockType:"resource",provider:"aws",displayName:"Load balancer target group",description:"Target groups route requests to one or more registered targets, using the protocol and port number that you specify.
You can register a target with multiple target groups",icon:"Aws_Application-Load-Balancer-Target-Group",model:"DefaultModel",url:"https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html",categories:["AWS","Load Balancing"],tags:[],definedAttributes:[{name:"connection_termination",displayName:"Connection termination",description:"Whether to terminate connections at the end of the deregistration timeout on Network Load Balancers.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#connection_termination"},{name:"deregistration_delay",displayName:"Deregistration delay",description:"Amount time for Elastic Load Balancing to wait before changing the state of a deregistering target from draining to unused.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#deregistration_delay"},{name:"lambda_multi_value_headers_enabled",displayName:"Lambda multi value headers enabled",description:"Whether the request and response headers exchanged between the load balancer and the Lambda function include arrays of values or strings.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#lambda_multi_value_headers_enabled"},{name:"load_balancing_algorithm_type",displayName:"Load balancing algorithm type",description:"Determines how the load balancer selects targets when routing requests.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#load_balancing_algorithm_type",rules:{values:["round_robin","least_outstanding_requests"]}},{name:"name",displayName:"Name",description:"Name of the target group. If omitted, Terraform will assign a random, unique name.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#name"},{name:"name_prefix",displayName:"Name prefix",description:"Creates a unique name beginning with the specified prefix.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#name_prefix"},{name:"port",displayName:"Port",description:"Port on which targets receive traffic, unless overridden when registering a specific target.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#port"},{name:"preserve_client_ip",displayName:"Preserve client IP",description:"Whether client IP preservation is enabled.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#preserve_client_ip"},{name:"protocol",displayName:"Protocol",description:"Protocol to use for routing traffic to the targets.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#protocol",rules:{values:["GENEVE","HTTP","HTTPS","TCP","TCP_UDP","TLS","UDP"]}},{name:"protocol_version",displayName:"Protocol version",description:"Only applicable when protocol is HTTP or HTTPS. The protocol version.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#protocol_version"},{name:"proxy_protocol_v2",displayName:"Proxy protocol v2",description:"Whether to enable support for proxy protocol v2 on Network Load Balancers.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#proxy_protocol_v2"},{name:"slow_start",displayName:"Slow start",description:"Amount time for targets to warm up before the load balancer sends them a full share of requests.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#slow_start"},{name:"target_type",displayName:"Target type",description:'Type of target that you must specify when registering targets with this target group. The default is "instance".',type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#target_type"},{name:"ip_address_type",displayName:"IP address type",description:"The type of IP addresses used by the target group, only supported when target type is set to ip.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#ip_address_type",rules:{values:["ipv4","ipv6"]}},{name:"vpc_id",displayName:"VPC ID",description:"Identifier of the VPC in which to create the target group.",linkRef:"aws_vpc",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#vpc_id"},{name:"health_check",displayName:"Health check",description:"Health Check configuration block.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#health_check",definedAttributes:[{name:"enabled",displayName:"Enabled",description:"Whether health checks are enabled.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#enabled"},{name:"healthy_threshold",displayName:"Healthy threshold",description:"Number of consecutive health check successes required before considering a target healthy.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#healthy_threshold"},{name:"interval",displayName:"Interval",description:"Approximate amount of time, in seconds, between health checks of an individual target.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#interval"},{name:"matcher",displayName:"Matcher",description:"Response codes to use when checking for a healthy responses from a target.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#matcher"},{name:"path",displayName:"Path",description:"Destination for the health check request.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#path"},{name:"port",displayName:"Port",description:"The port the load balancer uses when performing health checks on targets.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#port"},{name:"protocol",displayName:"Protocol",description:"The port the load balancer uses when performing health checks on targets.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#protocol",rules:{values:["TCP","HTTP","HTTPS"]}},{name:"timeout",displayName:"Timeout",description:"Amount of time, in seconds, during which no response from a target means a failed health check.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#timeout"},{name:"unhealthy_threshold",displayName:"Unhealthy threshold",description:"Number of consecutive health check failures required before considering a target unhealthy.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#unhealthy_threshold"}]},{name:"stickiness",displayName:"Stickiness",description:"Stickiness configuration block.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#stickiness",definedAttributes:[{name:"cookie_duration",displayName:"Cookie duration",description:"The time period, in seconds, during which requests from a client should be routed to the same target.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#cookie_duration"},{name:"cookie_name",displayName:"Cookie name",description:"Name of the application based cookie.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#cookie_name"},{name:"enabled",displayName:"Enable stickiness",description:"Boolean to enable/disable stickiness.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#enabled"},{name:"type",displayName:"Type",description:"The type of sticky sessions.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#type",rules:{values:["lb_cookie","app_cookie","source_ip","source_ip_dest_ip","source_ip_dest_ip_proto"]}}]},{name:"tags",displayName:"Tags",description:"A map of tags to assign to the resource.",type:"Object",url:"https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html"},{name:"target_failover",displayName:"Target failover",description:"Target failover block.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#target_failover",definedAttributes:[{name:"on_deregistration",displayName:"On deregistration",description:"Indicates how the Gateway Load Balancer (GWLB) handles existing flows when a target is deregistered.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#on_deregistration",rules:{values:["rebalance","no_rebalance"]}},{name:"on_unhealthy",displayName:"On unhealthy",description:"Indicates how the Gateway Load Balancer (GWLB) handles existing flows when a target is unhealthy.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#on_unhealthy",rules:{values:["rebalance","no_rebalance"]}}]}]},{type:"aws_lb_listener",blockType:"resource",provider:"aws",displayName:"Load Balancer Listener",description:"Provides a Load Balancer Listener resource.",icon:"Aws_Elastic-Load-Balancing_Network-Load-Balancer",model:"DefaultModel",url:"https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html",categories:["AWS","Load Balancing"],tags:[],definedAttributes:[{name:"load_balancer_arn",displayName:"Load balancer ARN",description:"ARN of the load balancer.",linkRef:"aws_lb",linkType:"Default",linkModel:"defaultLink",required:!0,type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#load_balancer_arn"},{name:"default_action",displayName:"Default action",description:"Configuration block for the default action.",required:!0,type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#default_action",definedAttributes:[{name:"type",displayName:"Type",description:"Type of routing action.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#type",rules:{values:["forward","authenticate-oidc","authenticate-cognito","redirect","fixed-response"]}},{name:"target_group_arn",displayName:"Target group ARN",description:"ARN of the target group to which to route traffic.",linkRef:"aws_lb_target_group",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#target_group_arn"}]},{name:"certificate_arn",displayName:"Cerificate ARN",description:"ARN of the default SSL server certificate.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#certificate_arn"},{name:"port",displayName:"Port",description:"Port on which the load balancer is listening.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#port",rules:{max:65535,min:1}},{name:"protocol",displayName:"Protocol",description:"Protocol for connections from clients to the load balancer.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#protocol",rules:{values:["HTTP","HTTPS","TCP","TLS","UDP","TCP_UDP"]}},{name:"alpn_policy",displayName:"ALPN policy",description:"Name of the Application-Layer Protocol Negotiation (ALPN) policy.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#alpn_policy",rules:{values:["HTTP1Only","HTTP2Only","HTTP2Optional","HTTP2Preferred","None"]}},{name:"ssl_policy",displayName:"SSL policy",description:"Name of the SSL Policy for the listener.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#ssl_policy"},{name:"tags",displayName:"Tags",description:"A mapping of tags to assign to the resource.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener#tags"}]}]),w([{type:"aws_route53_zone",blockType:"resource",displayName:"AWS route 53 zone",description:"A collection of records",icon:"Aws_Route-53-Hosted-Zone",isContainer:!0,model:"DefaultContainer",url:"https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zones-working-with.html",categories:["AWS","DNS and Routing"],tags:[],definedAttributes:[{name:"name",displayName:"Name",description:"This is the name of the hosted zone.",required:!0,type:"String",containerRef:"aws_route53_zone",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_zone#name"},{name:"records",displayName:"Records",type:"Link",linkModel:"defaultLink",linkAttribute:"name",linkRef:"aws_route53_record",linkType:"Default"}]},{type:"aws_route53_record",blockType:"resource",displayName:"AWS route 53 record",description:"Create records to tell the DNS how to route traffic for that domain.",icon:"Aws_Route-53_Route-Table",model:"DefaultModel",url:"https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/rrsets-working-with.html",categories:["AWS","DNS and Routing"],tags:[],definedAttributes:[{name:"zone_id",displayName:"Zone ID",description:"The ID of the hosted zone to contain this record.",containerRef:"aws_route53_zone",required:!0,type:"Reference",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record#zone_id"},{name:"records",displayName:"Records",description:"A string list of records.",linkRef:"aws_route53_record",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record#records"}]}]),w([{type:"aws_cloudwatch_metric_alarm",blockType:"resource",provider:"aws",displayName:"Cloudwatch metric alarm",description:"Watches a single metric over a specified time period, and performs one or more specified actions, based on the value of the metric relative to a threshold over time.",icon:"Amazon-CloudWatch_Alarm",model:"DefaultModel",url:"https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#CloudWatchAlarms",categories:["AWS","Monitoring and Logging"],tags:[],definedAttributes:[{name:"alarm_name",displayName:"Alarm name",description:"The descriptive name for the alarm. This name must be unique within the user's AWS account",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#alarm_name"},{name:"comparison_operator",displayName:"Comparison operator",description:"The arithmetic operation to use when comparing the specified Statistic and Threshold.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#comparison_operator",rules:{values:["GreaterThanOrEqualToThreshold","GreaterThanThreshold","LessThanThreshold","LessThanOrEqualToThreshold","LessThanLowerOrGreaterThanUpperThreshold","LessThanLowerThreshold","GreaterThanUpperThreshold"]}},{name:"evaluation_periods",displayName:"Evaluation periods",description:"The number of periods over which data is compared to the specified threshold.",required:!0,type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#evaluation_periods"},{name:"metric_name",displayName:"Metric name",description:"The name for the alarm's associated metric.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#metric_name"},{name:"namespace",displayName:"Namespace",description:"The namespace for the alarm's associated metric.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#namespace"},{name:"period",displayName:"Period",description:"The period in seconds over which the specified statistic is applied.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#period"},{name:"statistic",displayName:"Statistic",description:"The statistic to apply to the alarm's associated metric.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#statistic",rules:{values:["SampleCount","Average","Sum","Minimum","Maximum"]}},{name:"threshold",displayName:"Threshold",description:"The value against which the specified statistic is compared.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#threshold"},{name:"dimensions",displayName:"Dimensions",description:"The dimensions for the alarm's associated metric.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#dimensions",definedAttributes:[{name:"AutoScalingGroupName",displayName:"Auto Scaling group name",description:"Amazon EC2 Auto Scaling",linkRef:"aws_autoscaling_group",linkType:"Default",linkModel:"defaultLink",type:"Link",url:"https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html"}]},{name:"actions_enabled",displayName:"Actions enabled",description:"Indicates whether or not actions should be executed during any changes to the alarm's state.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#actions_enabled"},{name:"alarm_description",displayName:"Alarm description",description:"The description for the alarm.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#alarm_description"},{name:"datapoints_to_alarm",displayName:"Datapoints to alarm",description:"The number of datapoints that must be breaching to trigger the alarm.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#datapoints_to_alarm"},{name:"alarm_actions",displayName:"Alarm actions",description:"The list of actions to execute when this alarm transitions into an ALARM state from any other state.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#alarm_actions",rules:{max:5,min:1}},{name:"insufficient_data_actions",displayName:"Insufficient data actions",description:"The list of actions to execute when this alarm transitions into an INSUFFICIENT_DATA state from any other state.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#insufficient_data_actions",rules:{max:5,min:1}},{name:"ok_actions",displayName:"OK actions",description:"The list of actions to execute when this alarm transitions into an OK state from any other state.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#ok_actions",rules:{max:5,min:1}},{name:"unit",displayName:"Unit",description:"The unit for the alarm's associated metric.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#unit",rules:{values:["Seconds","Microseconds","Milliseconds","Bytes","Kilobytes","Megabytes","Gigabytes","Terabytes","Bits","Kilobits","Megabits","Gigabits","Terabits","Percent","Count","Bytes/Second","Kilobytes/Second","Megabytes/Second","Gigabytes/Second","Terabytes/Second","Bits/Second","Kilobits/Second","Megabits/Second","Gigabits/Second","Terabits/Second","Count/Second","None"]}},{name:"extended_statistic",displayName:"Extended statistic",description:"The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#extended_statistic"},{name:"treat_missing_data",displayName:"Treat missing data",description:"Sets how this alarm is to handle missing data points.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#treat_missing_data",rules:{values:["breaching","notBreaching","ignore","missing"]}},{name:"evaluate_low_sample_count_percentiles",displayName:"Evaluate low sample count percentiles",description:"Used only for alarms based on percentiles.
If ignore, the alarm state does not change during periods with too few data points to be statistically significant.
If evaluate or omit, the alarm is always evaluated and possibly changes state no matter how many data points are available.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#evaluate_low_sample_count_percentiles",rules:{values:["evaluate","ignore"]}},{name:"metric_query",displayName:"Metric query",description:"Enable to create an alarm based on a metric math expression.",type:"Object",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#metric_query",definedAttributes:[{name:"id",displayName:"ID",description:"A short name used to tie this object to the results in the response.",required:!0,type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#id"},{name:"account_id",displayName:"Account ID",description:"The account ID to use when searching for the metric.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#account_id"},{name:"expression",displayName:"Expression",description:"The math expression to be performed on the returned data, if this object is performing a math expression.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#expression"},{name:"label",displayName:"Label",description:"A human-readable label for this metric or expression.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#label"},{name:"return_data",displayName:"Return data",description:"Specify exactly one metric_query to be true to use that metric_query result as the alarm.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm#return_data"}]}]}]),w([{type:"random_string",blockType:"resource",provider:"aws",displayName:"Random String",description:"Generates a random permutation of alphanumeric characters and optionally special characters.",icon:"variable",model:"DefaultModel",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string",categories:["AWS","Miscellaneous"],tags:[],definedAttributes:[{name:"length",displayName:"Length",description:"The length of the string desired.",required:!0,type:"Number",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#length",rules:{min:1}},{name:"special",displayName:"Special",description:"Include special characters in the result.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#special"},{name:"min_special",displayName:"Min special",description:"Minimum number of special characters to include in the result.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#min_special"},{name:"lower",displayName:"Lower",description:"Include lowercase alphabet characters in the result.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#lower"},{name:"min_lower",displayName:"Min lower",description:"Minimum number of lowercase characters to include in the result.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#min_lower"},{name:"upper",displayName:"Upper",description:"Include uppercase alphabet characters in the result.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#upper"},{name:"min_upper",displayName:"Min upper",description:"Minimum number of uppercase characters to include in the result.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#min_upper"},{name:"numeric",displayName:"Numeric",description:"Include numeric characters in the result.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#numeric"},{name:"min_numeric",displayName:"Min numeric",description:"Minimum number of numeric characters to include in the result.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password#min_numeric"},{name:"override_special",displayName:"Override special",description:"Supply your own list of special characters to use for string generation.",type:"String"}]},{type:"random_password",blockType:"resource",provider:"aws",displayName:"Random Password",description:"Identical to random_string with the exception that the result is treated as sensitive and, thus, not displayed in console output.",icon:"variable",model:"DefaultModel",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password",categories:["AWS","Miscellaneous"],tags:[],definedAttributes:[{name:"length",displayName:"Length",description:"The length of the string desired.",required:!0,type:"Number",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password#length",rules:{min:1}},{name:"special",displayName:"Special",description:"Include special characters in the result.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password#special"},{name:"min_special",displayName:"Min special",description:"Minimum number of special characters to include in the result.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#min_special"},{name:"lower",displayName:"Lower",description:"Include lowercase alphabet characters in the result.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password#lower"},{name:"min_lower",displayName:"Min lower",description:"Minimum number of lowercase characters to include in the result.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#min_lower"},{name:"upper",displayName:"Upper",description:"Include uppercase alphabet characters in the result.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password#upper"},{name:"min_upper",displayName:"Min upper",description:"Minimum number of uppercase characters to include in the result.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string#min_upper"},{name:"numeric",displayName:"Numeric",description:"Include numeric characters in the result.",type:"Boolean",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password#numeric"},{name:"min_numeric",displayName:"Min numeric",description:"Minimum number of numeric characters to include in the result.",type:"Number",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password#min_numeric"},{name:"override_special",displayName:"Override special",description:"Supply your own list of special characters to use for string generation.",type:"String",url:"https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password#override_special"}]}]),w([{type:"server",blockType:"module",provider:"aws",displayName:"Server",icon:"Aws_Servers",model:"DefaultModel",categories:["AWS","Modules"],tags:[],definedAttributes:[]}]),w([{type:"image_id",blockType:"variable",provider:"aws",icon:"variable",model:"DefaultModel",categories:["AWS","Variables"],tags:[],definedAttributes:[]}])))||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(S)||function(t,e){if(t){if("string"==typeof t)return k(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(t,e):void 0}}(S)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();var S;function E(t){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},E(t)}function A(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n0})).reduce((function(t,e){return e.parentTypes.forEach((function(n){t[n]=[].concat(function(t){return function(t){if(Array.isArray(t))return A(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return A(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t[n]||[]),[e.type])})),t}),{});t.filter((function(t){return e[t.type]})).forEach((function(t){t.childrenTypes=e[t.type]}))}}])}(t.DefaultMetadata);const B=j;var F={92:()=>{}},U={};function z(t){var e=U[t];if(void 0!==e)return e.exports;var n=U[t]={exports:{}};return F[t](n,n.exports,z),n.exports}z.d=(t,e)=>{for(var n in e)z.o(e,n)&&!z.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},z.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var V={};(()=>{z.d(V,{dx:()=>$,q2:()=>Ot,FO:()=>ke,xf:()=>Ee,Gy:()=>Ce,s4:()=>Pt,c7:()=>Ie,_7:()=>ce,gp:()=>_e,cK:()=>Nt,zs:()=>ge,AV:()=>Ee,Xp:()=>g,VS:()=>v,ul:()=>Y,hW:()=>Bt,x1:()=>Xt,z5:()=>ee,oN:()=>fe,TB:()=>pe,u1:()=>de,_b:()=>De,$F:()=>re,_T:()=>Fe,db:()=>ie,Zx:()=>te,_x:()=>Dt,r8:()=>M,JI:()=>C,TP:()=>L,WU:()=>t,Nj:()=>c,ZP:()=>qe});class t{constructor(){this.source=null,this.type=null,this.channel=null,this.start=null,this.stop=null,this.tokenIndex=null,this.line=null,this.column=null,this._text=null}getTokenSource(){return this.source[0]}getInputStream(){return this.source[1]}get text(){return this._text}set text(t){this._text=t}}function e(t,e){if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n>>16)*u&65535)<<16)&4294967295,o=o<<15|o>>>17,o=(65535&o)*l+(((o>>>16)*l&65535)<<16)&4294967295,c^=o,c=c<<13|c>>>19,i=5*(65535&c)+((5*(c>>>16)&65535)<<16)&4294967295,c=27492+(65535&i)+((58964+(i>>>16)&65535)<<16);switch(o=0,s){case 3:o^=(255&r.charCodeAt(h+2))<<16;case 2:o^=(255&r.charCodeAt(h+1))<<8;case 1:o^=255&r.charCodeAt(h),o=(65535&o)*u+(((o>>>16)*u&65535)<<16)&4294967295,o=o<<15|o>>>17,o=(65535&o)*l+(((o>>>16)*l&65535)<<16)&4294967295,c^=o}return c^=r.length,c^=c>>>16,c=2246822507*(65535&c)+((2246822507*(c>>>16)&65535)<<16)&4294967295,c^=c>>>13,c=3266489909*(65535&c)+((3266489909*(c>>>16)&65535)<<16)&4294967295,c^=c>>>16,c>>>0}class i{constructor(){this.count=0,this.hash=0}update(){for(let t=0;t>>17,t*=461845907,this.count=this.count+1;let n=this.hash^t;n=n<<13|n>>>19,n=5*n+3864292196,this.hash=n}}}finish(){let t=this.hash^4*this.count;return t^=t>>>16,t*=2246822507,t^=t>>>13,t*=3266489909,t^=t>>>16,t}static hashStuff(){const t=new i;return t.update.apply(t,arguments),t.finish()}}function o(t){return t?"string"==typeof t?r(t):t.hashCode():-1}function s(t,e){return t?t.equals(e):t===e}function a(t){return null===t?"null":t}function c(t){return Array.isArray(t)?"["+t.map(a).join(", ")+"]":"null"}const u="h-";class l{constructor(t,e){this.data={},this.hashFunction=t||o,this.equalsFunction=e||s}add(t){const e=u+this.hashFunction(t);if(e in this.data){const n=this.data[e];for(let e=0;et.startsWith(u))).flatMap((t=>this.data[t]),this)}toString(){return c(this.values())}get length(){return Object.keys(this.data).filter((t=>t.startsWith(u))).map((t=>this.data[t].length),this).reduce(((t,e)=>t+e),0)}}class h{hashCode(){const t=new i;return this.updateHashCode(t),t.finish()}evaluate(t,e){}evalPrecedence(t,e){return this}static andContext(t,e){if(null===t||t===h.NONE)return e;if(null===e||e===h.NONE)return t;const n=new f(t,e);return 1===n.opnds.length?n.opnds[0]:n}static orContext(t,e){if(null===t)return e;if(null===e)return t;if(t===h.NONE||e===h.NONE)return h.NONE;const n=new p(t,e);return 1===n.opnds.length?n.opnds[0]:n}}class f extends h{constructor(t,e){super();const n=new l;t instanceof f?t.opnds.map((function(t){n.add(t)})):n.add(t),e instanceof f?e.opnds.map((function(t){n.add(t)})):n.add(e);const r=d(n);if(r.length>0){let t=null;r.map((function(e){(null===t||e.precedencet.toString()));return(t.length>3?t.slice(3):t).join("&&")}}class p extends h{constructor(t,e){super();const n=new l;t instanceof p?t.opnds.map((function(t){n.add(t)})):n.add(t),e instanceof p?e.opnds.map((function(t){n.add(t)})):n.add(e);const r=d(n);if(r.length>0){const t=r.sort((function(t,e){return t.compareTo(e)})),e=t[t.length-1];n.add(e)}this.opnds=Array.from(n.values())}equals(t){return this===t||t instanceof p&&e(this.opnds,t.opnds)}updateHashCode(t){t.update(this.opnds,"OR")}evaluate(t,e){for(let n=0;nt.toString()));return(t.length>3?t.slice(3):t).join("||")}}function d(t){const e=[];return t.values().map((function(t){t instanceof h.PrecedencePredicate&&e.push(t)})),e}function m(t,e){if(null===t){const t={state:null,alt:null,context:null,semanticContext:null};return e&&(t.reachesIntoOuterContext=0),t}{const n={};return n.state=t.state||null,n.alt=void 0===t.alt?null:t.alt,n.context=t.context||null,n.semanticContext=t.semanticContext||null,e&&(n.reachesIntoOuterContext=t.reachesIntoOuterContext||0,n.precedenceFilterSuppressed=t.precedenceFilterSuppressed||!1),n}}class y{constructor(t,e){this.checkContext(t,e),t=m(t),e=m(e,!0),this.state=null!==t.state?t.state:e.state,this.alt=null!==t.alt?t.alt:e.alt,this.context=null!==t.context?t.context:e.context,this.semanticContext=null!==t.semanticContext?t.semanticContext:null!==e.semanticContext?e.semanticContext:h.NONE,this.reachesIntoOuterContext=e.reachesIntoOuterContext,this.precedenceFilterSuppressed=e.precedenceFilterSuppressed}checkContext(t,e){null!==t.context&&void 0!==t.context||null!==e&&null!==e.context&&void 0!==e.context||(this.context=null)}hashCode(){const t=new i;return this.updateHashCode(t),t.finish()}updateHashCode(t){t.update(this.state.stateNumber,this.alt,this.context,this.semanticContext)}equals(t){return this===t||t instanceof y&&this.state.stateNumber===t.state.stateNumber&&this.alt===t.alt&&(null===this.context?null===t.context:this.context.equals(t.context))&&this.semanticContext.equals(t.semanticContext)&&this.precedenceFilterSuppressed===t.precedenceFilterSuppressed}hashCodeForConfigSet(){const t=new i;return t.update(this.state.stateNumber,this.alt,this.semanticContext),t.finish()}equalsForConfigSet(t){return this===t||t instanceof y&&this.state.stateNumber===t.state.stateNumber&&this.alt===t.alt&&this.semanticContext.equals(t.semanticContext)}toString(){return"("+this.state+","+this.alt+(null!==this.context?",["+this.context.toString()+"]":"")+(this.semanticContext!==h.NONE?","+this.semanticContext.toString():"")+(this.reachesIntoOuterContext>0?",up="+this.reachesIntoOuterContext:"")+")"}}class g{constructor(t,e){this.start=t,this.stop=e}clone(){return new g(this.start,this.stop)}contains(t){return t>=this.start&&tthis.addInterval(t)),this),this}reduce(t){if(t=n.stop?(this.intervals.splice(t+1,1),this.reduce(t)):e.stop>=n.start&&(this.intervals[t]=new g(e.start,n.stop),this.intervals.splice(t+1,1))}}complement(t,e){const n=new v;return n.addInterval(new g(t,e+1)),null!==this.intervals&&this.intervals.forEach((t=>n.removeRange(t))),n}contains(t){if(null===this.intervals)return!1;for(let e=0;en.start&&t.stop=n.stop?(this.intervals.splice(e,1),e-=1):t.start"):e.push("'"+String.fromCharCode(r.start)+"'"):e.push("'"+String.fromCharCode(r.start)+"'..'"+String.fromCharCode(r.stop-1)+"'")}return e.length>1?"{"+e.join(", ")+"}":e[0]}toIndexString(){const e=[];for(let n=0;n"):e.push(r.start.toString()):e.push(r.start.toString()+".."+(r.stop-1).toString())}return e.length>1?"{"+e.join(", ")+"}":e[0]}toTokenString(t,e){const n=[];for(let r=0;r1?"{"+n.join(", ")+"}":n[0]}elementName(e,n,r){return r===t.EOF?"":r===t.EPSILON?"":e[r]||n[r]}get length(){return this.intervals.map((t=>t.length)).reduce(((t,e)=>t+e))}}class _{constructor(){this.atn=null,this.stateNumber=_.INVALID_STATE_NUMBER,this.stateType=null,this.ruleIndex=0,this.epsilonOnlyTransitions=!1,this.transitions=[],this.nextTokenWithinRule=null}toString(){return this.stateNumber}equals(t){return t instanceof _&&this.stateNumber===t.stateNumber}isNonGreedyExitState(){return!1}addTransition(t,e){void 0===e&&(e=-1),0===this.transitions.length?this.epsilonOnlyTransitions=t.isEpsilon:this.epsilonOnlyTransitions!==t.isEpsilon&&(this.epsilonOnlyTransitions=!1),-1===e?this.transitions.push(t):this.transitions.splice(e,1,t)}}_.INVALID_TYPE=0,_.BASIC=1,_.RULE_START=2,_.BLOCK_START=3,_.PLUS_BLOCK_START=4,_.STAR_BLOCK_START=5,_.TOKEN_START=6,_.RULE_STOP=7,_.BLOCK_END=8,_.STAR_LOOP_BACK=9,_.STAR_LOOP_ENTRY=10,_.PLUS_LOOP_BACK=11,_.LOOP_END=12,_.serializationNames=["INVALID","BASIC","RULE_START","BLOCK_START","PLUS_BLOCK_START","STAR_BLOCK_START","TOKEN_START","RULE_STOP","BLOCK_END","STAR_LOOP_BACK","STAR_LOOP_ENTRY","PLUS_LOOP_BACK","LOOP_END"],_.INVALID_STATE_NUMBER=-1;class b extends _{constructor(){return super(),this.stateType=_.RULE_STOP,this}}class w{constructor(t){if(null==t)throw"target cannot be null.";this.target=t,this.isEpsilon=!1,this.label=null}}w.EPSILON=1,w.RANGE=2,w.RULE=3,w.PREDICATE=4,w.ATOM=5,w.ACTION=6,w.SET=7,w.NOT_SET=8,w.WILDCARD=9,w.PRECEDENCE=10,w.serializationNames=["INVALID","EPSILON","RANGE","RULE","PREDICATE","ATOM","ACTION","SET","NOT_SET","WILDCARD","PRECEDENCE"],w.serializationTypes={EpsilonTransition:w.EPSILON,RangeTransition:w.RANGE,RuleTransition:w.RULE,PredicateTransition:w.PREDICATE,AtomTransition:w.ATOM,ActionTransition:w.ACTION,SetTransition:w.SET,NotSetTransition:w.NOT_SET,WildcardTransition:w.WILDCARD,PrecedencePredicateTransition:w.PRECEDENCE};class x extends w{constructor(t,e,n,r){super(t),this.ruleIndex=e,this.precedence=n,this.followState=r,this.serializationType=w.RULE,this.isEpsilon=!0}matches(t,e,n){return!1}}class k extends w{constructor(e,n){super(e),this.serializationType=w.SET,null!=n?this.label=n:(this.label=new v,this.label.addOne(t.INVALID_TYPE))}matches(t,e,n){return this.label.contains(t)}toString(){return this.label.toString()}}class T extends k{constructor(t,e){super(t,e),this.serializationType=w.NOT_SET}matches(t,e,n){return t>=e&&t<=n&&!super.matches(t,e,n)}toString(){return"~"+super.toString()}}class S extends w{constructor(t){super(t),this.serializationType=w.WILDCARD}matches(t,e,n){return t>=e&&t<=n}toString(){return"."}}class E extends w{constructor(t){super(t)}}class A{}class O extends A{}class N extends O{}class C extends N{get ruleContext(){throw new Error("missing interface implementation")}}class L extends N{}class R extends L{}const P={toStringTree:function(t,e,n){e=e||null,null!==(n=n||null)&&(e=n.ruleNames);let r=P.getNodeText(t,e);r=function(t,e){return t.replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r")}(r);const i=t.getChildCount();if(0===i)return r;let o="("+r+" ";i>0&&(r=P.toStringTree(t.getChild(0),e),o=o.concat(r));for(let n=1;n=0&&e0&&(t+=", "),this.returnStates[e]!==D.EMPTY_RETURN_STATE?(t+=this.returnStates[e],null!==this.parents[e]?t=t+" "+this.parents[e]:t+="null"):t+="$";return t+"]"}}get length(){return this.returnStates.length}}class B extends D{constructor(t,e){let n=0;const r=new i;null!==t?r.update(t,e):r.update(1),n=r.finish(),super(n),this.parentCtx=t,this.returnState=e}getParent(t){return this.parentCtx}getReturnState(t){return this.returnState}equals(t){return this===t||t instanceof B&&this.hashCode()===t.hashCode()&&this.returnState===t.returnState&&(null==this.parentCtx?null==t.parentCtx:this.parentCtx.equals(t.parentCtx))}toString(){const t=null===this.parentCtx?"":this.parentCtx.toString();return 0===t.length?this.returnState===D.EMPTY_RETURN_STATE?"$":""+this.returnState:this.returnState+" "+t}get length(){return 1}static create(t,e){return e===D.EMPTY_RETURN_STATE&&null===t?D.EMPTY:new B(t,e)}}class F extends B{constructor(){super(null,D.EMPTY_RETURN_STATE)}isEmpty(){return!0}getParent(t){return null}getReturnState(t){return this.returnState}equals(t){return this===t}toString(){return"$"}}D.EMPTY=new F;const U="h-";class K{constructor(t,e){this.data={},this.hashFunction=t||o,this.equalsFunction=e||s}set(t,e){const n=U+this.hashFunction(t);if(n in this.data){const r=this.data[n];for(let n=0;nt.startsWith(U))).flatMap((t=>this.data[t]),this)}getKeys(){return this.entries().map((t=>t.key))}getValues(){return this.entries().map((t=>t.value))}toString(){return"["+this.entries().map((t=>"{"+t.key+":"+t.value+"}")).join(", ")+"]"}get length(){return Object.keys(this.data).filter((t=>t.startsWith(U))).map((t=>this.data[t].length),this).reduce(((t,e)=>t+e),0)}}function H(t,e){if(null==e&&(e=M.EMPTY),null===e.parentCtx||e===M.EMPTY)return D.EMPTY;const n=H(t,e.parentCtx),r=t.states[e.invokingState].transitions[0];return B.create(n,r.followState.stateNumber)}function q(t,e,n){if(t.isEmpty())return t;let r=n.get(t)||null;if(null!==r)return r;if(r=e.get(t),null!==r)return n.set(t,r),r;let i=!1,o=[];for(let r=0;re.returnState&&(i[0]=e.returnState,i[1]=t.returnState);const o=new j([n,n],i);return null!==r&&r.set(t,e,o),o}const i=[t.returnState,e.returnState];let o=[t.parentCtx,e.parentCtx];t.returnState>e.returnState&&(i[0]=e.returnState,i[1]=t.returnState,o=[e.parentCtx,t.parentCtx]);const s=new j(o,i);return null!==r&&r.set(t,e,s),s}}(t,e,n,r);if(n){if(t instanceof F)return t;if(e instanceof F)return e}return t instanceof B&&(t=new j([t.getParent()],[t.returnState])),e instanceof B&&(e=new j([e.getParent()],[e.returnState])),function(t,e,n,r){if(null!==r){let n=r.get(t,e);if(null!==n)return D.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> previous"),n;if(n=r.get(e,t),null!==n)return D.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> previous"),n}let i=0,o=0,s=0,a=new Array(t.returnStates.length+e.returnStates.length).fill(0),c=new Array(t.returnStates.length+e.returnStates.length).fill(null);for(;i a"),t):u.equals(e)?(null!==r&&r.set(t,e,e),D.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> b"),e):(function(t){const e=new K;for(let n=0;n "+u),u)}(t,e,n,r)}class G{constructor(){this.data=[]}add(t){this.data[t]=!0}or(t){Object.keys(t.data).map((t=>this.add(t)),this)}remove(t){delete this.data[t]}has(t){return!0===this.data[t]}values(){return Object.keys(this.data)}minValue(){return Math.min.apply(null,this.values())}hashCode(){return i.hashStuff(this.values())}equals(t){return t instanceof G&&e(this.data,t.data)}toString(){return"{"+this.values().join(", ")+"}"}get length(){return this.values().length}}class Y{constructor(t){this.atn=t}getDecisionLookahead(t){if(null===t)return null;const e=t.transitions.length,n=[];for(let r=0;r=this.states.length)throw"Invalid state number.";const r=this.states[e];let i=this.nextTokens(r);if(!i.contains(t.EPSILON))return i;const o=new v;for(o.addSet(i),o.removeOne(t.EPSILON);null!==n&&n.invokingState>=0&&i.contains(t.EPSILON);){const e=this.states[n.invokingState].transitions[0];i=this.nextTokens(e.followState),o.addSet(i),o.removeOne(t.EPSILON),n=n.parentCtx}return i.contains(t.EPSILON)&&o.addOne(t.EOF),o}}$.INVALID_ALT_NUMBER=0;class X extends _{constructor(){super(),this.stateType=_.BASIC}}class Z extends _{constructor(){return super(),this.decision=-1,this.nonGreedy=!1,this}}class J extends Z{constructor(){return super(),this.endState=null,this}}class Q extends _{constructor(){return super(),this.stateType=_.BLOCK_END,this.startState=null,this}}class tt extends _{constructor(){return super(),this.stateType=_.LOOP_END,this.loopBackState=null,this}}class et extends _{constructor(){return super(),this.stateType=_.RULE_START,this.stopState=null,this.isPrecedenceRule=!1,this}}class nt extends Z{constructor(){return super(),this.stateType=_.TOKEN_START,this}}class rt extends Z{constructor(){return super(),this.stateType=_.PLUS_LOOP_BACK,this}}class it extends _{constructor(){return super(),this.stateType=_.STAR_LOOP_BACK,this}}class ot extends Z{constructor(){return super(),this.stateType=_.STAR_LOOP_ENTRY,this.loopBackState=null,this.isPrecedenceDecision=null,this}}class st extends J{constructor(){return super(),this.stateType=_.PLUS_BLOCK_START,this.loopBackState=null,this}}class at extends J{constructor(){return super(),this.stateType=_.STAR_BLOCK_START,this}}class ct extends J{constructor(){return super(),this.stateType=_.BLOCK_START,this}}class ut extends w{constructor(t,e){super(t),this.label_=e,this.label=this.makeLabel(),this.serializationType=w.ATOM}makeLabel(){const t=new v;return t.addOne(this.label_),t}matches(t,e,n){return this.label_===t}toString(){return this.label_}}class lt extends w{constructor(t,e,n){super(t),this.serializationType=w.RANGE,this.start=e,this.stop=n,this.label=this.makeLabel()}makeLabel(){const t=new v;return t.addRange(this.start,this.stop),t}matches(t,e,n){return t>=this.start&&t<=this.stop}toString(){return"'"+String.fromCharCode(this.start)+"'..'"+String.fromCharCode(this.stop)+"'"}}class ht extends w{constructor(t,e,n,r){super(t),this.serializationType=w.ACTION,this.ruleIndex=e,this.actionIndex=void 0===n?-1:n,this.isCtxDependent=void 0!==r&&r,this.isEpsilon=!0}matches(t,e,n){return!1}toString(){return"action_"+this.ruleIndex+":"+this.actionIndex}}class ft extends w{constructor(t,e){super(t),this.serializationType=w.EPSILON,this.isEpsilon=!0,this.outermostPrecedenceReturn=e}matches(t,e,n){return!1}toString(){return"epsilon"}}class pt extends h{constructor(t,e,n){super(),this.ruleIndex=void 0===t?-1:t,this.predIndex=void 0===e?-1:e,this.isCtxDependent=void 0!==n&&n}evaluate(t,e){const n=this.isCtxDependent?e:null;return t.sempred(n,this.ruleIndex,this.predIndex)}updateHashCode(t){t.update(this.ruleIndex,this.predIndex,this.isCtxDependent)}equals(t){return this===t||t instanceof pt&&this.ruleIndex===t.ruleIndex&&this.predIndex===t.predIndex&&this.isCtxDependent===t.isCtxDependent}toString(){return"{"+this.ruleIndex+":"+this.predIndex+"}?"}}h.NONE=new pt;class dt extends E{constructor(t,e,n,r){super(t),this.serializationType=w.PREDICATE,this.ruleIndex=e,this.predIndex=n,this.isCtxDependent=r,this.isEpsilon=!0}matches(t,e,n){return!1}getPredicate(){return new pt(this.ruleIndex,this.predIndex,this.isCtxDependent)}toString(){return"pred_"+this.ruleIndex+":"+this.predIndex}}class mt extends h{constructor(t){super(),this.precedence=void 0===t?0:t}evaluate(t,e){return t.precpred(e,this.precedence)}evalPrecedence(t,e){return t.precpred(e,this.precedence)?h.NONE:null}compareTo(t){return this.precedence-t.precedence}updateHashCode(t){t.update(this.precedence)}equals(t){return this===t||t instanceof mt&&this.precedence===t.precedence}toString(){return"{"+this.precedence+">=prec}?"}}h.PrecedencePredicate=mt;class yt extends E{constructor(t,e){super(t),this.serializationType=w.PRECEDENCE,this.precedence=e,this.isEpsilon=!0}matches(t,e,n){return!1}getPredicate(){return new mt(this.precedence)}toString(){return this.precedence+" >= _p"}}class gt{constructor(t){void 0===t&&(t=null),this.readOnly=!1,this.verifyATN=null===t||t.verifyATN,this.generateRuleBypassTransitions=null!==t&&t.generateRuleBypassTransitions}}gt.defaultOptions=new gt,gt.defaultOptions.readOnly=!0;class vt{constructor(t){this.actionType=t,this.isPositionDependent=!1}hashCode(){const t=new i;return this.updateHashCode(t),t.finish()}updateHashCode(t){t.update(this.actionType)}equals(t){return this===t}}class _t extends vt{constructor(){super(6)}execute(t){t.skip()}toString(){return"skip"}}_t.INSTANCE=new _t;class bt extends vt{constructor(t){super(0),this.channel=t}execute(t){t._channel=this.channel}updateHashCode(t){t.update(this.actionType,this.channel)}equals(t){return this===t||t instanceof bt&&this.channel===t.channel}toString(){return"channel("+this.channel+")"}}class wt extends vt{constructor(t,e){super(1),this.ruleIndex=t,this.actionIndex=e,this.isPositionDependent=!0}execute(t){t.action(null,this.ruleIndex,this.actionIndex)}updateHashCode(t){t.update(this.actionType,this.ruleIndex,this.actionIndex)}equals(t){return this===t||t instanceof wt&&this.ruleIndex===t.ruleIndex&&this.actionIndex===t.actionIndex}}class xt extends vt{constructor(){super(3)}execute(t){t.more()}toString(){return"more"}}xt.INSTANCE=new xt;class kt extends vt{constructor(t){super(7),this.type=t}execute(t){t.type=this.type}updateHashCode(t){t.update(this.actionType,this.type)}equals(t){return this===t||t instanceof kt&&this.type===t.type}toString(){return"type("+this.type+")"}}class Tt extends vt{constructor(t){super(5),this.mode=t}execute(t){t.pushMode(this.mode)}updateHashCode(t){t.update(this.actionType,this.mode)}equals(t){return this===t||t instanceof Tt&&this.mode===t.mode}toString(){return"pushMode("+this.mode+")"}}class St extends vt{constructor(){super(4)}execute(t){t.popMode()}toString(){return"popMode"}}St.INSTANCE=new St;class Et extends vt{constructor(t){super(2),this.mode=t}execute(t){t.mode(this.mode)}updateHashCode(t){t.update(this.actionType,this.mode)}equals(t){return this===t||t instanceof Et&&this.mode===t.mode}toString(){return"mode("+this.mode+")"}}function At(t,e){const n=[];return n[t-1]=e,n.map((function(t){return e}))}class Ot{constructor(t){null==t&&(t=gt.defaultOptions),this.deserializationOptions=t,this.stateFactories=null,this.actionFactories=null}deserialize(t){const e=this.reset(t);this.checkVersion(e),e&&this.skipUUID();const n=this.readATN();this.readStates(n,e),this.readRules(n,e),this.readModes(n);const r=[];return this.readSets(n,r,this.readInt.bind(this)),e&&this.readSets(n,r,this.readInt32.bind(this)),this.readEdges(n,r),this.readDecisions(n),this.readLexerActions(n,e),this.markPrecedenceDecisions(n),this.verifyATN(n),this.deserializationOptions.generateRuleBypassTransitions&&1===n.grammarType&&(this.generateRuleBypassTransitions(n),this.verifyATN(n)),n}reset(t){if(3===(t.charCodeAt?t.charCodeAt(0):t[0])){const e=function(t){const e=t.charCodeAt(0);return e>1?e-2:e+65534},n=t.split("").map(e);return n[0]=t.charCodeAt(0),this.data=n,this.pos=0,!0}return this.data=t,this.pos=0,!1}skipUUID(){let t=0;for(;t++<8;)this.readInt()}checkVersion(t){const e=this.readInt();if(!t&&4!==e)throw"Could not deserialize ATN with version "+e+" (expected 4)."}readATN(){const t=this.readInt(),e=this.readInt();return new $(t,e)}readStates(t,e){let n,r,i;const o=[],s=[],a=this.readInt();for(let n=0;n0;)i.addTransition(c.transitions[u-1]),c.transitions=c.transitions.slice(-1);t.ruleToStartState[e].addTransition(new ft(i)),o.addTransition(new ft(a));const l=new X;t.addState(l),l.addTransition(new ut(o,t.ruleToTokenType[e])),i.addTransition(new ft(l))}stateIsEndStateFor(t,e){if(t.ruleIndex!==e)return null;if(!(t instanceof ot))return null;const n=t.transitions[t.transitions.length-1].target;return n instanceof tt&&n.epsilonOnlyTransitions&&n.transitions[0].target instanceof b?t:null}markPrecedenceDecisions(t){for(let e=0;e=0):this.checkCondition(n.transitions.length<=1||n instanceof b)}}checkCondition(t,e){if(!t)throw null==e&&(e="IllegalState"),e}readInt(){return this.data[this.pos++]}readInt32(){return this.readInt()|this.readInt()<<16}edgeFactory(e,n,r,i,o,s,a,c){const u=e.states[i];switch(n){case w.EPSILON:return new ft(u);case w.RANGE:return new lt(u,0!==a?t.EOF:o,s);case w.RULE:return new x(e.states[o],s,a,u);case w.PREDICATE:return new dt(u,o,s,0!==a);case w.PRECEDENCE:return new yt(u,o);case w.ATOM:return new ut(u,0!==a?t.EOF:o);case w.ACTION:return new ht(u,o,s,0!==a);case w.SET:return new k(u,c[o]);case w.NOT_SET:return new T(u,c[o]);case w.WILDCARD:return new S(u);default:throw"The specified transition type: "+n+" is not valid."}}stateFactory(t,e){if(null===this.stateFactories){const t=[];t[_.INVALID_TYPE]=null,t[_.BASIC]=()=>new X,t[_.RULE_START]=()=>new et,t[_.BLOCK_START]=()=>new ct,t[_.PLUS_BLOCK_START]=()=>new st,t[_.STAR_BLOCK_START]=()=>new at,t[_.TOKEN_START]=()=>new nt,t[_.RULE_STOP]=()=>new b,t[_.BLOCK_END]=()=>new Q,t[_.STAR_LOOP_BACK]=()=>new it,t[_.STAR_LOOP_ENTRY]=()=>new ot,t[_.PLUS_LOOP_BACK]=()=>new rt,t[_.LOOP_END]=()=>new tt,this.stateFactories=t}if(t>this.stateFactories.length||null===this.stateFactories[t])throw"The specified state type "+t+" is not valid.";{const n=this.stateFactories[t]();if(null!==n)return n.ruleIndex=e,n}}lexerActionFactory(t,e,n){if(null===this.actionFactories){const t=[];t[0]=(t,e)=>new bt(t),t[1]=(t,e)=>new wt(t,e),t[2]=(t,e)=>new Et(t),t[3]=(t,e)=>xt.INSTANCE,t[4]=(t,e)=>St.INSTANCE,t[5]=(t,e)=>new Tt(t),t[6]=(t,e)=>_t.INSTANCE,t[7]=(t,e)=>new kt(t),this.actionFactories=t}if(t>this.actionFactories.length||null===this.actionFactories[t])throw"The specified lexer action type "+t+" is not valid.";return this.actionFactories[t](e,n)}}class Nt{syntaxError(t,e,n,r,i,o){}reportAmbiguity(t,e,n,r,i,o,s){}reportAttemptingFullContext(t,e,n,r,i,o){}reportContextSensitivity(t,e,n,r,i,o){}}class Ct extends Nt{constructor(){super()}syntaxError(t,e,n,r,i,o){console.error("line "+n+":"+r+" "+i)}}Ct.INSTANCE=new Ct;class Lt extends Nt{constructor(t){if(super(),null===t)throw"delegates";return this.delegates=t,this}syntaxError(t,e,n,r,i,o){this.delegates.map((s=>s.syntaxError(t,e,n,r,i,o)))}reportAmbiguity(t,e,n,r,i,o,s){this.delegates.map((a=>a.reportAmbiguity(t,e,n,r,i,o,s)))}reportAttemptingFullContext(t,e,n,r,i,o){this.delegates.map((s=>s.reportAttemptingFullContext(t,e,n,r,i,o)))}reportContextSensitivity(t,e,n,r,i,o){this.delegates.map((s=>s.reportContextSensitivity(t,e,n,r,i,o)))}}class Rt{constructor(){this._listeners=[Ct.INSTANCE],this._interp=null,this._stateNumber=-1}checkVersion(t){const e="4.13.1";e!==t&&console.log("ANTLR runtime and generated code versions disagree: "+e+"!="+t)}addErrorListener(t){this._listeners.push(t)}removeErrorListeners(){this._listeners=[]}getLiteralNames(){return Object.getPrototypeOf(this).constructor.literalNames||[]}getSymbolicNames(){return Object.getPrototypeOf(this).constructor.symbolicNames||[]}getTokenNames(){if(!this.tokenNames){const t=this.getLiteralNames(),e=this.getSymbolicNames(),n=t.length>e.length?t.length:e.length;this.tokenNames=[];for(let r=0;r";let n=e.text;return null===n&&(n=e.type===t.EOF?"":"<"+e.type+">"),n=n.replace("\n","\\n").replace("\r","\\r").replace("\t","\\t"),"'"+n+"'"}getErrorListenerDispatch(){return new Lt(this._listeners)}sempred(t,e,n){return!0}precpred(t,e){return!0}get atn(){return this._interp.atn}get state(){return this._stateNumber}set state(t){this._stateNumber=t}}Rt.tokenTypeMapCache={},Rt.ruleIndexMapCache={};class Pt extends t{constructor(e,n,r,i,o){super(),this.source=void 0!==e?e:Pt.EMPTY_SOURCE,this.type=void 0!==n?n:null,this.channel=void 0!==r?r:t.DEFAULT_CHANNEL,this.start=void 0!==i?i:-1,this.stop=void 0!==o?o:-1,this.tokenIndex=-1,null!==this.source[0]?(this.line=e[0].line,this.column=e[0].column):this.column=-1}clone(){const t=new Pt(this.source,this.type,this.channel,this.start,this.stop);return t.tokenIndex=this.tokenIndex,t.line=this.line,t.column=this.column,t.text=this.text,t}cloneWithType(e){const n=new Pt(this.source,e,this.channel,this.start,this.stop);return n.tokenIndex=this.tokenIndex,n.line=this.line,n.column=this.column,e===t.EOF&&(n.text=""),n}toString(){let t=this.text;return t=null!==t?t.replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t"):"","[@"+this.tokenIndex+","+this.start+":"+this.stop+"='"+t+"',<"+this.type+">"+(this.channel>0?",channel="+this.channel:"")+","+this.line+":"+this.column+"]"}get text(){if(null!==this._text)return this._text;const t=this.getInputStream();if(null===t)return null;const e=t.size;return this.start"}set text(t){this._text=t}}Pt.EMPTY_SOURCE=[null,null];class It{}class Mt extends It{constructor(t){super(),this.copyText=void 0!==t&&t}create(t,e,n,r,i,o,s,a){const c=new Pt(t,e,r,i,o);return c.line=s,c.column=a,null!==n?c.text=n:this.copyText&&null!==t[1]&&(c.text=t[1].getText(i,o)),c}createThin(t,e){const n=new Pt(null,t);return n.text=e,n}}Mt.DEFAULT=new Mt;class Dt extends Error{constructor(t){super(t.message),Error.captureStackTrace&&Error.captureStackTrace(this,Dt),this.message=t.message,this.recognizer=t.recognizer,this.input=t.input,this.ctx=t.ctx,this.offendingToken=null,this.offendingState=-1,null!==this.recognizer&&(this.offendingState=this.recognizer.state)}getExpectedTokens(){return null!==this.recognizer?this.recognizer.atn.getExpectedTokens(this.offendingState,this.ctx):null}toString(){return this.message}}class jt extends Dt{constructor(t,e,n,r){super({message:"",recognizer:t,input:e,ctx:null}),this.startIndex=n,this.deadEndConfigs=r}toString(){let t="";return this.startIndex>=0&&this.startIndex":"\n"===e?"\\n":"\t"===e?"\\t":"\r"===e?"\\r":e}getCharErrorDisplay(t){return"'"+this.getErrorDisplayForChar(t)+"'"}recover(e){this._input.LA(1)!==t.EOF&&(e instanceof jt?this._interp.consume(this._input):this._input.consume())}get inputStream(){return this._input}set inputStream(t){this._input=null,this._tokenFactorySourcePair=[this,this._input],this.reset(),this._input=t,this._tokenFactorySourcePair=[this,this._input]}get sourceName(){return this._input.sourceName}get type(){return this._type}set type(t){this._type=t}get line(){return this._interp.line}set line(t){this._interp.line=t}get column(){return this._interp.column}set column(t){this._interp.column=t}get text(){return null!==this._text?this._text:this._interp.getText(this._input)}set text(t){this._text=t}}function Ft(t){return t.hashCodeForConfigSet()}function Ut(t,e){return t===e||null!==t&&null!==e&&t.equalsForConfigSet(e)}Bt.DEFAULT_MODE=0,Bt.MORE=-2,Bt.SKIP=-3,Bt.DEFAULT_TOKEN_CHANNEL=t.DEFAULT_CHANNEL,Bt.HIDDEN=t.HIDDEN_CHANNEL,Bt.MIN_CHAR_VALUE=0,Bt.MAX_CHAR_VALUE=1114111;class zt{constructor(t){this.configLookup=new l(Ft,Ut),this.fullCtx=void 0===t||t,this.readOnly=!1,this.configs=[],this.uniqueAlt=0,this.conflictingAlts=null,this.hasSemanticContext=!1,this.dipsIntoOuterContext=!1,this.cachedHashCode=-1}add(t,e){if(void 0===e&&(e=null),this.readOnly)throw"This set is readonly";t.semanticContext!==h.NONE&&(this.hasSemanticContext=!0),t.reachesIntoOuterContext>0&&(this.dipsIntoOuterContext=!0);const n=this.configLookup.add(t);if(n===t)return this.cachedHashCode=-1,this.configs.push(t),!0;const r=!this.fullCtx,i=W(n.context,t.context,r,e);return n.reachesIntoOuterContext=Math.max(n.reachesIntoOuterContext,t.reachesIntoOuterContext),t.precedenceFilterSuppressed&&(n.precedenceFilterSuppressed=!0),n.context=i,!0}getStates(){const t=new l;for(let e=0;eXt.MAX_DFA_EDGE)return null;let n=t.edges[e-Xt.MIN_DFA_EDGE];return void 0===n&&(n=null),Xt.debug&&null!==n&&console.log("reuse state "+t.stateNumber+" edge to "+n.stateNumber),n}computeTargetState(t,e,n){const r=new Ht;return this.getReachableConfigSet(t,e.configs,r,n),0===r.items.length?(r.hasSemanticContext||this.addDFAEdge(e,n,Kt.ERROR),Kt.ERROR):this.addDFAEdge(e,n,null,r)}failOrAccept(e,n,r,i){if(null!==this.prevAccept.dfaState){const t=e.dfaState.lexerActionExecutor;return this.accept(n,t,this.startIndex,e.index,e.line,e.column),e.dfaState.prediction}if(i===t.EOF&&n.index===this.startIndex)return t.EOF;throw new jt(this.recog,n,this.startIndex,r)}getReachableConfigSet(e,n,r,i){let o=$.INVALID_ALT_NUMBER;for(let s=0;sXt.MAX_DFA_EDGE||(Xt.debug&&console.log("EDGE "+t+" -> "+n+" upon "+e),null===t.edges&&(t.edges=[]),t.edges[e-Xt.MIN_DFA_EDGE]=n),n}addDFAState(t){const e=new Vt(null,t);let n=null;for(let e=0;et.startsWith("k-"))).map((t=>this.data[t]),this)}}const Qt={SLL:0,LL:1,LL_EXACT_AMBIG_DETECTION:2,hasSLLConflictTerminatingPrediction:function(t,e){if(Qt.allConfigsInRuleStopStates(e))return!0;if(t===Qt.SLL&&e.hasSemanticContext){const t=new zt;for(let n=0;n1)return!0;return!1},allSubsetsEqual:function(t){let e=null;for(let n=0;n "+s),0===s.items.length?null:s}removeAllConfigsNotInRuleStopState(e,n){if(te.allConfigsInRuleStopStates(e))return e;const r=new zt(e.fullCtx);for(let i=0;i0&&(o=this.getAltThatFinishedDecisionEntryRule(i),o!==$.INVALID_ALT_NUMBER)?o:$.INVALID_ALT_NUMBER}getAltThatFinishedDecisionEntryRule(t){const e=[];for(let n=0;n0||r.state instanceof b&&r.context.hasEmptyPath())&&e.indexOf(r.alt)<0&&e.push(r.alt)}return 0===e.length?$.INVALID_ALT_NUMBER:Math.min.apply(null,e)}splitAccordingToSemanticValidity(t,e){const n=new zt(t.fullCtx),r=new zt(t.fullCtx);for(let i=0;i=0&&(r+=1)}this.closureCheckingStopState(h,e,n,l,i,r,s)}}}canDropLoopEntryEdgeInLeftRecursiveRule(t){const e=t.state;if(e.stateType!==_.STAR_LOOP_ENTRY)return!1;if(e.stateType!==_.STAR_LOOP_ENTRY||!e.isPrecedenceDecision||t.context.isEmpty()||t.context.hasEmptyPath())return!1;const n=t.context.length;for(let r=0;r=0?this.parser.ruleNames[t]:""}getEpsilonTarget(e,n,r,i,o,s){switch(n.serializationType){case w.RULE:return this.ruleTransition(e,n);case w.PRECEDENCE:return this.precedenceTransition(e,n,r,i,o);case w.PREDICATE:return this.predTransition(e,n,r,i,o);case w.ACTION:return this.actionTransition(e,n);case w.EPSILON:return new y({state:n.target},e);case w.ATOM:case w.RANGE:case w.SET:return s&&n.matches(t.EOF,0,1)?new y({state:n.target},e):null;default:return null}}actionTransition(t,e){if(this.debug){const t=-1===e.actionIndex?65535:e.actionIndex;console.log("ACTION edge "+e.ruleIndex+":"+t)}return new y({state:e.target},t)}precedenceTransition(t,e,n,r,i){this.debug&&(console.log("PRED (collectPredicates="+n+") "+e.precedence+">=_p, ctx dependent=true"),null!==this.parser&&console.log("context surrounding pred is "+c(this.parser.getRuleInvocationStack())));let o=null;if(n&&r)if(i){const n=this._input.index;this._input.seek(this._startIndex);const r=e.getPredicate().evaluate(this.parser,this._outerContext);this._input.seek(n),r&&(o=new y({state:e.target},t))}else{const n=h.andContext(t.semanticContext,e.getPredicate());o=new y({state:e.target,semanticContext:n},t)}else o=new y({state:e.target},t);return this.debug&&console.log("config from pred transition="+o),o}predTransition(t,e,n,r,i){this.debug&&(console.log("PRED (collectPredicates="+n+") "+e.ruleIndex+":"+e.predIndex+", ctx dependent="+e.isCtxDependent),null!==this.parser&&console.log("context surrounding pred is "+c(this.parser.getRuleInvocationStack())));let o=null;if(n&&(e.isCtxDependent&&r||!e.isCtxDependent))if(i){const n=this._input.index;this._input.seek(this._startIndex);const r=e.getPredicate().evaluate(this.parser,this._outerContext);this._input.seek(n),r&&(o=new y({state:e.target},t))}else{const n=h.andContext(t.semanticContext,e.getPredicate());o=new y({state:e.target,semanticContext:n},t)}else o=new y({state:e.target},t);return this.debug&&console.log("config from pred transition="+o),o}ruleTransition(t,e){this.debug&&console.log("CALL rule "+this.getRuleName(e.target.ruleIndex)+", ctx="+t.context);const n=e.followState,r=B.create(t.context,n.stateNumber);return new y({state:e.target,context:r},t)}getConflictingAlts(t){const e=te.getConflictingAltSubsets(t);return te.getAlts(e)}getConflictingAltsOrUniqueAlt(t){let e=null;return t.uniqueAlt!==$.INVALID_ALT_NUMBER?(e=new G,e.add(t.uniqueAlt)):e=t.conflictingAlts,e}getTokenName(e){if(e===t.EOF)return"EOF";if(null!==this.parser&&null!==this.parser.literalNames){if(!(e>=this.parser.literalNames.length&&e>=this.parser.symbolicNames.length))return(this.parser.literalNames[e]||this.parser.symbolicNames[e])+"<"+e+">";console.log(e+" ttype out of range: "+this.parser.literalNames),console.log(""+this.parser.getInputStream().getTokens())}return""+e}getLookaheadName(t){return this.getTokenName(t.LA(1))}dumpDeadEndConfigs(t){console.log("dead end configs: ");const e=t.getDeadEndConfigs();for(let t=0;t0){const t=n.state.transitions[0];t instanceof ut?r="Atom "+this.getTokenName(t.label):t instanceof k&&(r=(t instanceof T?"~":"")+"Set "+t.set)}console.error(n.toString(this.parser,!0)+":"+r)}}noViableAlt(t,e,n,r){return new ee(this.parser,t,t.get(r),t.LT(1),n,e)}getUniqueAlt(t){let e=$.INVALID_ALT_NUMBER;for(let n=0;n "+r+" upon "+this.getTokenName(n)),null===r)return null;if(r=this.addDFAState(t,r),null===e||n<-1||n>this.atn.maxTokenType)return r;if(null===e.edges&&(e.edges=[]),e.edges[n+1]=r,this.debug){const e=null===this.parser?null:this.parser.literalNames,n=null===this.parser?null:this.parser.symbolicNames;console.log("DFA=\n"+t.toString(e,n))}return r}addDFAState(t,e){if(e===Kt.ERROR)return e;const n=t.states.get(e);return null!==n?(this.trace_atn_sim&&console.log("addDFAState "+e+" exists"),n):(e.stateNumber=t.states.length,e.configs.readOnly||(e.configs.optimizeConfigs(this),e.configs.setReadonly(!0)),this.trace_atn_sim&&console.log("addDFAState new "+e),t.states.add(e),this.debug&&console.log("adding new DFA state: "+e),e)}reportAttemptingFullContext(t,e,n,r,i){if(this.debug||this.retry_debug){const e=new g(r,i+1);console.log("reportAttemptingFullContext decision="+t.decision+":"+n+", input="+this.parser.getTokenStream().getText(e))}null!==this.parser&&this.parser.getErrorListenerDispatch().reportAttemptingFullContext(this.parser,t,r,i,e,n)}reportContextSensitivity(t,e,n,r,i){if(this.debug||this.retry_debug){const e=new g(r,i+1);console.log("reportContextSensitivity decision="+t.decision+":"+n+", input="+this.parser.getTokenStream().getText(e))}null!==this.parser&&this.parser.getErrorListenerDispatch().reportContextSensitivity(this.parser,t,r,i,e,n)}reportAmbiguity(t,e,n,r,i,o,s){if(this.debug||this.retry_debug){const t=new g(n,r+1);console.log("reportAmbiguity "+o+":"+s+", input="+this.parser.getTokenStream().getText(t))}null!==this.parser&&this.parser.getErrorListenerDispatch().reportAmbiguity(this.parser,t,n,r,i,o,s)}}class ie{constructor(){this.cache=new K}add(t){if(t===D.EMPTY)return D.EMPTY;const e=this.cache.get(t)||null;return null!==e?e:(this.cache.set(t,t),t)}get(t){return this.cache.get(t)||null}get length(){return this.cache.length}}const oe={ATN:$,ATNDeserializer:Ot,LexerATNSimulator:Xt,ParserATNSimulator:re,PredictionMode:te,PredictionContextCache:ie};class se{constructor(t,e,n){this.dfa=t,this.literalNames=e||[],this.symbolicNames=n||[]}toString(){if(null===this.dfa.s0)return null;let t="";const e=this.dfa.sortedStates();for(let n=0;n"),t=t.concat(this.getStateString(e)),t=t.concat("\n"))}}}return 0===t.length?null:t}getEdgeLabel(t){return 0===t?"EOF":null!==this.literalNames||null!==this.symbolicNames?this.literalNames[t-1]||this.symbolicNames[t-1]:String.fromCharCode(t-1)}getStateString(t){const e=(t.isAcceptState?":":"")+"s"+t.stateNumber+(t.requiresFullContext?"^":"");return t.isAcceptState?null!==t.predicates?e+"=>"+c(t.predicates):e+"=>"+t.prediction.toString():e}}class ae extends se{constructor(t){super(t,null)}getEdgeLabel(t){return"'"+String.fromCharCode(t)+"'"}}class ce{constructor(t,e){if(void 0===e&&(e=0),this.atnStartState=t,this.decision=e,this._states=new l,this.s0=null,this.precedenceDfa=!1,t instanceof ot&&t.isPrecedenceDecision){this.precedenceDfa=!0;const t=new Vt(null,new zt);t.edges=[],t.isAcceptState=!1,t.requiresFullContext=!1,this.s0=t}}getPrecedenceStartState(t){if(!this.precedenceDfa)throw"Only precedence DFAs may contain a precedence start state.";return t<0||t>=this.s0.edges.length?null:this.s0.edges[t]||null}setPrecedenceStartState(t,e){if(!this.precedenceDfa)throw"Only precedence DFAs may contain a precedence start state.";t<0||(this.s0.edges[t]=e)}setPrecedenceDfa(t){if(this.precedenceDfa!==t){if(this._states=new l,t){const t=new Vt(null,new zt);t.edges=[],t.isAcceptState=!1,t.requiresFullContext=!1,this.s0=t}else this.s0=null;this.precedenceDfa=t}}sortedStates(){return this._states.values().sort((function(t,e){return t.stateNumber-e.stateNumber}))}toString(t,e){return t=t||null,e=e||null,null===this.s0?"":new se(this,t,e).toString()}toLexerString(){return null===this.s0?"":new ae(this).toString()}get states(){return this._states}}const ue={DFA:ce,DFASerializer:se,LexerDFASerializer:ae,PredPrediction:Zt},le={PredictionContext:D},he={Interval:g,IntervalSet:v};class fe{visitTerminal(t){}visitErrorNode(t){}enterEveryRule(t){}exitEveryRule(t){}}class pe{visit(t){return Array.isArray(t)?t.map((function(t){return t.accept(this)}),this):t.accept(this)}visitChildren(t){return t.children?this.visit(t.children):null}visitTerminal(t){}visitErrorNode(t){}}class de{walk(t,e){if(e instanceof R||void 0!==e.isErrorNode&&e.isErrorNode())t.visitErrorNode(e);else if(e instanceof L)t.visitTerminal(e);else{this.enterRule(t,e);for(let n=0;n=i.length)return""+n;const o=i[r]||null;return null===o||0===o.length?""+n:`${n} (${o})`}getConflictingAlts(t,e){if(null!==t)return t;const n=new G;for(let t=0;t=0&&t.consume(),this.lastErrorIndex=t._input.index,null===this.lastErrorStates&&(this.lastErrorStates=[]),this.lastErrorStates.push(t.state);const n=this.getErrorRecoverySet(t);this.consumeUntil(t,n)}sync(e){if(this.inErrorRecoveryMode(e))return;const n=e._interp.atn.states[e.state],r=e.getTokenStream().LA(1),i=e.atn.nextTokens(n);if(i.contains(r))return this.nextTokensContext=null,void(this.nextTokenState=_.INVALID_STATE_NUMBER);if(i.contains(t.EPSILON))null===this.nextTokensContext&&(this.nextTokensContext=e._ctx,this.nextTokensState=e._stateNumber);else switch(n.stateType){case _.BLOCK_START:case _.STAR_BLOCK_START:case _.PLUS_BLOCK_START:case _.STAR_LOOP_ENTRY:if(null!==this.singleTokenDeletion(e))return;throw new ye(e);case _.PLUS_LOOP_BACK:case _.STAR_LOOP_BACK:{this.reportUnwantedToken(e);const t=new v;t.addSet(e.getExpectedTokens());const n=t.addSet(this.getErrorRecoverySet(e));this.consumeUntil(e,n)}}}reportNoViableAlternative(e,n){const r=e.getTokenStream();let i;i=null!==r?n.startToken.type===t.EOF?"":r.getText(new g(n.startToken.tokenIndex,n.offendingToken.tokenIndex)):"";const o="no viable alternative at input "+this.escapeWSAndQuote(i);e.notifyErrorListeners(o,n.offendingToken,n)}reportInputMismatch(t,e){const n="mismatched input "+this.getTokenErrorDisplay(e.offendingToken)+" expecting "+e.getExpectedTokens().toString(t.literalNames,t.symbolicNames);t.notifyErrorListeners(n,e.offendingToken,e)}reportFailedPredicate(t,e){const n="rule "+t.ruleNames[t._ctx.ruleIndex]+" "+e.message;t.notifyErrorListeners(n,e.offendingToken,e)}reportUnwantedToken(t){if(this.inErrorRecoveryMode(t))return;this.beginErrorCondition(t);const e=t.getCurrentToken(),n="extraneous input "+this.getTokenErrorDisplay(e)+" expecting "+this.getExpectedTokens(t).toString(t.literalNames,t.symbolicNames);t.notifyErrorListeners(n,e,null)}reportMissingToken(t){if(this.inErrorRecoveryMode(t))return;this.beginErrorCondition(t);const e=t.getCurrentToken(),n="missing "+this.getExpectedTokens(t).toString(t.literalNames,t.symbolicNames)+" at "+this.getTokenErrorDisplay(e);t.notifyErrorListeners(n,e,null)}recoverInline(t){const e=this.singleTokenDeletion(t);if(null!==e)return t.consume(),e;if(this.singleTokenInsertion(t))return this.getMissingSymbol(t);throw new ye(t)}singleTokenInsertion(t){const e=t.getTokenStream().LA(1),n=t._interp.atn,r=n.states[t.state].transitions[0].target;return!!n.nextTokens(r,t._ctx).contains(e)&&(this.reportMissingToken(t),!0)}singleTokenDeletion(t){const e=t.getTokenStream().LA(2);if(this.getExpectedTokens(t).contains(e)){this.reportUnwantedToken(t),t.consume();const e=t.getCurrentToken();return this.reportMatch(t),e}return null}getMissingSymbol(e){const n=e.getCurrentToken(),r=this.getExpectedTokens(e).first();let i;i=r===t.EOF?"":"";let o=n;const s=e.getTokenStream().LT(-1);return o.type===t.EOF&&null!==s&&(o=s),e.getTokenFactory().create(o.source,r,i,t.DEFAULT_CHANNEL,-1,-1,o.line,o.column)}getExpectedTokens(t){return t.getExpectedTokens()}getTokenErrorDisplay(e){if(null===e)return"";let n=e.text;return null===n&&(n=e.type===t.EOF?"":"<"+e.type+">"),this.escapeWSAndQuote(n)}escapeWSAndQuote(t){return"'"+(t=(t=(t=t.replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t"))+"'"}getErrorRecoverySet(e){const n=e._interp.atn;let r=e._ctx;const i=new v;for(;null!==r&&r.invokingState>=0;){const t=n.states[r.invokingState].transitions[0],e=n.nextTokens(t.followState);i.addSet(e),r=r.parentCtx}return i.removeOne(t.EPSILON),i}consumeUntil(e,n){let r=e.getTokenStream().LA(1);for(;r!==t.EOF&&!n.contains(r);)e.consume(),r=e.getTokenStream().LA(1)}}class ke extends xe{constructor(){super()}recover(t,e){let n=t._ctx;for(;null!==n;)n.exception=e,n=n.parentCtx;throw new be(e)}recoverInline(t){this.recover(t,new ye(t))}sync(t){}}const Te={RecognitionException:Dt,NoViableAltException:ee,LexerNoViableAltException:jt,InputMismatchException:ye,FailedPredicateException:ge,DiagnosticErrorListener:_e,BailErrorStrategy:ke,DefaultErrorStrategy:xe,ErrorListener:Nt};class Se{constructor(t,e){if(this.name="",this.strdata=t,this.decodeToUnicodeCodePoints=e||!1,this._index=0,this.data=[],this.decodeToUnicodeCodePoints)for(let t=0;t=this._size)throw"cannot consume EOF";this._index+=1}LA(e){if(0===e)return 0;e<0&&(e+=1);const n=this._index+e-1;return n<0||n>=this._size?t.EOF:this.data[n]}LT(t){return this.LA(t)}mark(){return-1}release(t){}seek(t){t<=this._index?this._index=t:this._index=Math.min(t,this._size)}getText(t,e){if(e>=this._size&&(e=this._size-1),t>=this._size)return"";if(this.decodeToUnicodeCodePoints){let n="";for(let r=t;r<=e;r++)n+=String.fromCodePoint(this.data[r]);return n}return this.strdata.slice(t,e+1)}toString(){return this.strdata}get index(){return this._index}get size(){return this._size}}class Ee extends Se{constructor(t,e){super(t,e)}}var Ae=z(92);const Oe="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node;class Ne extends Ee{static fromPath(t,e,n){if(!Oe)throw new Error("FileStream is only available when running in Node!");Ae.readFile(t,e,(function(t,e){let r=null;null!==e&&(r=new Se(e,!0)),n(t,r)}))}constructor(t,e,n){if(!Oe)throw new Error("FileStream is only available when running in Node!");super(Ae.readFileSync(t,e||"utf-8"),n),this.fileName=t}}const Ce={fromString:function(t){return new Se(t,!0)},fromBlob:function(t,e,n,r){const i=new window.FileReader;i.onload=function(t){const e=new Se(t.target.result,!0);n(e)},i.onerror=r,i.readAsText(t,e)},fromBuffer:function(t,e){return new Se(t.toString(e),!0)},fromPath:function(t,e,n){Ne.fromPath(t,e,n)},fromPathSync:function(t,e){return new Ne(t,e)}},Le={arrayToString:c,stringToCharArray:function(t){let e=new Uint16Array(t.length);for(let n=0;n=0&&(this.fetchedEOF?this.index0)||this.fetch(e)>=e}fetch(e){if(this.fetchedEOF)return 0;for(let n=0;n=this.tokens.length&&(n=this.tokens.length-1);for(let o=e;o=this.tokens.length?this.tokens[this.tokens.length-1]:this.tokens[e]}adjustSeekIndex(t){return t}lazyInit(){-1===this.index&&this.setup()}setup(){this.sync(0),this.index=this.adjustSeekIndex(0)}setTokenSource(t){this.tokenSource=t,this.tokens=[],this.index=-1,this.fetchedEOF=!1}nextTokenOnChannel(e,n){if(this.sync(e),e>=this.tokens.length)return-1;let r=this.tokens[e];for(;r.channel!==this.channel;){if(r.type===t.EOF)return-1;e+=1,this.sync(e),r=this.tokens[e]}return e}previousTokenOnChannel(t,e){for(;t>=0&&this.tokens[t].channel!==e;)t-=1;return t}getHiddenTokensToRight(t,e){if(void 0===e&&(e=-1),this.lazyInit(),t<0||t>=this.tokens.length)throw t+" not in 0.."+this.tokens.length-1;const n=this.nextTokenOnChannel(t+1,Bt.DEFAULT_TOKEN_CHANNEL),r=t+1,i=-1===n?this.tokens.length-1:n;return this.filterForChannel(r,i,e)}getHiddenTokensToLeft(t,e){if(void 0===e&&(e=-1),this.lazyInit(),t<0||t>=this.tokens.length)throw t+" not in 0.."+this.tokens.length-1;const n=this.previousTokenOnChannel(t-1,Bt.DEFAULT_TOKEN_CHANNEL);if(n===t-1)return null;const r=n+1,i=t-1;return this.filterForChannel(r,i,e)}filterForChannel(t,e,n){const r=[];for(let i=t;i=this.tokens.length&&(r=this.tokens.length-1);let i="";for(let e=n;e=0&&this._parseListeners.splice(e,1),0===this._parseListeners.length&&(this._parseListeners=null)}}removeParseListeners(){this._parseListeners=null}triggerEnterRuleEvent(){if(null!==this._parseListeners){const t=this._ctx;this._parseListeners.forEach((function(e){e.enterEveryRule(t),t.enterRule(e)}))}}triggerExitRuleEvent(){if(null!==this._parseListeners){const t=this._ctx;this._parseListeners.slice(0).reverse().forEach((function(e){t.exitRule(e),e.exitEveryRule(t)}))}}getTokenFactory(){return this._input.tokenSource._factory}setTokenFactory(t){this._input.tokenSource._factory=t}getATNWithBypassAlts(){const t=this.getSerializedATN();if(null===t)throw"The current parser does not support an ATN with bypass alternatives.";let e=this.bypassAltsAtnCache[t];if(null===e){const n=new gt;n.generateRuleBypassTransitions=!0,e=new Ot(n).deserialize(t),this.bypassAltsAtnCache[t]=e}return e}getInputStream(){return this.getTokenStream()}setInputStream(t){this.setTokenStream(t)}getTokenStream(){return this._input}setTokenStream(t){this._input=null,this.reset(),this._input=t}get syntaxErrorsCount(){return this._syntaxErrors}getCurrentToken(){return this._input.LT(1)}notifyErrorListeners(t,e,n){n=n||null,null===(e=e||null)&&(e=this.getCurrentToken()),this._syntaxErrors+=1;const r=e.line,i=e.column;this.getErrorListenerDispatch().syntaxError(this,e,r,i,t,n)}consume(){const e=this.getCurrentToken();e.type!==t.EOF&&this.getInputStream().consume();const n=null!==this._parseListeners&&this._parseListeners.length>0;if(this.buildParseTrees||n){let t;t=this._errHandler.inErrorRecoveryMode(this)?this._ctx.addErrorNode(e):this._ctx.addTokenNode(e),t.invokingState=this.state,n&&this._parseListeners.forEach((function(e){t instanceof R||void 0!==t.isErrorNode&&t.isErrorNode()?e.visitErrorNode(t):t instanceof L&&e.visitTerminal(t)}))}return e}addContextToParseTree(){null!==this._ctx.parentCtx&&this._ctx.parentCtx.addChild(this._ctx)}enterRule(t,e,n){this.state=e,this._ctx=t,this._ctx.start=this._input.LT(1),this.buildParseTrees&&this.addContextToParseTree(),this.triggerEnterRuleEvent()}exitRule(){this._ctx.stop=this._input.LT(-1),this.triggerExitRuleEvent(),this.state=this._ctx.invokingState,this._ctx=this._ctx.parentCtx}enterOuterAlt(t,e){t.setAltNumber(e),this.buildParseTrees&&this._ctx!==t&&null!==this._ctx.parentCtx&&(this._ctx.parentCtx.removeLastChild(),this._ctx.parentCtx.addChild(t)),this._ctx=t}getPrecedence(){return 0===this._precedenceStack.length?-1:this._precedenceStack[this._precedenceStack.length-1]}enterRecursionRule(t,e,n,r){this.state=e,this._precedenceStack.push(r),this._ctx=t,this._ctx.start=this._input.LT(1),this.triggerEnterRuleEvent()}pushNewRecursionContext(t,e,n){const r=this._ctx;r.parentCtx=t,r.invokingState=e,r.stop=this._input.LT(-1),this._ctx=t,this._ctx.start=r.start,this.buildParseTrees&&this._ctx.addChild(r),this.triggerEnterRuleEvent()}unrollRecursionContexts(t){this._precedenceStack.pop(),this._ctx.stop=this._input.LT(-1);const e=this._ctx,n=this.getParseListeners();if(null!==n&&n.length>0)for(;this._ctx!==t;)this.triggerExitRuleEvent(),this._ctx=this._ctx.parentCtx;else this._ctx=t;e.parentCtx=t,this.buildParseTrees&&null!==t&&t.addChild(e)}getInvokingContext(t){let e=this._ctx;for(;null!==e;){if(e.ruleIndex===t)return e;e=e.parentCtx}return null}precpred(t,e){return e>=this._precedenceStack[this._precedenceStack.length-1]}inContext(t){return!1}isExpectedToken(e){const n=this._interp.atn;let r=this._ctx;const i=n.states[this.state];let o=n.nextTokens(i);if(o.contains(e))return!0;if(!o.contains(t.EPSILON))return!1;for(;null!==r&&r.invokingState>=0&&o.contains(t.EPSILON);){const t=n.states[r.invokingState].transitions[0];if(o=n.nextTokens(t.followState),o.contains(e))return!0;r=r.parentCtx}return!(!o.contains(t.EPSILON)||e!==t.EOF)}getExpectedTokens(){return this._interp.atn.getExpectedTokens(this.state,this._ctx)}getExpectedTokensWithinCurrentRule(){const t=this._interp.atn,e=t.states[this.state];return t.nextTokens(e)}getRuleIndex(t){const e=this.getRuleIndexMap()[t];return null!==e?e:-1}getRuleInvocationStack(t){null===(t=t||null)&&(t=this._ctx);const e=[];for(;null!==t;){const n=t.ruleIndex;n<0?e.push("n/a"):e.push(this.ruleNames[n]),t=t.parentCtx}return e}getDFAStrings(){return this._interp.decisionToDFA.toString()}dumpDFA(){let t=!1;for(let e=0;e0&&(t&&console.log(),this.printer.println("Decision "+n.decision+":"),this.printer.print(n.toString(this.literalNames,this.symbolicNames)),t=!0)}}getSourceName(){return this._input.sourceName}setTrace(t){t?(null!==this._tracer&&this.removeParseListener(this._tracer),this._tracer=new Me(this),this.addParseListener(this._tracer)):(this.removeParseListener(this._tracer),this._tracer=null)}}De.bypassAltsAtnCache={};class je extends L{constructor(t){super(),this.parentCtx=null,this.symbol=t}getChild(t){return null}getSymbol(){return this.symbol}getParent(){return this.parentCtx}getPayload(){return this.symbol}getSourceInterval(){if(null===this.symbol)return g.INVALID_INTERVAL;const t=this.symbol.tokenIndex;return new g(t,t)}getChildCount(){return 0}accept(t){return t.visitTerminal(this)}getText(){return this.symbol.text}toString(){return this.symbol.type===t.EOF?"":this.symbol.text}}class Be extends je{constructor(t){super(t)}isErrorNode(){return!0}accept(t){return t.visitErrorNode(this)}}class Fe extends M{constructor(t,e){super(t,e),this.children=null,this.start=null,this.stop=null,this.exception=null}copyFrom(t){this.parentCtx=t.parentCtx,this.invokingState=t.invokingState,this.children=null,this.start=t.start,this.stop=t.stop,t.children&&(this.children=[],t.children.map((function(t){t instanceof Be&&(this.children.push(t),t.parentCtx=this)}),this))}enterRule(t){}exitRule(t){}addChild(t){return null===this.children&&(this.children=[]),this.children.push(t),t}removeLastChild(){null!==this.children&&this.children.pop()}addTokenNode(t){const e=new je(t);return this.addChild(e),e.parentCtx=this,e}addErrorNode(t){const e=new Be(t);return this.addChild(e),e.parentCtx=this,e}getChild(t,e){if(e=e||null,null===this.children||t<0||t>=this.children.length)return null;if(null===e)return this.children[t];for(let n=0;n=this.children.length)return null;for(let n=0;n2&&void 0!==arguments[2]?arguments[2]:Ue.DEFAULT_PROGRAM_NAME;n="number"==typeof t?t:t.tokenIndex;let i=this.getProgram(r),o=new Ke(this.tokens,n,i.length,e);i.push(o)}insertBefore(t,e){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ue.DEFAULT_PROGRAM_NAME;n="number"==typeof t?t:t.tokenIndex;const i=this.getProgram(r),o=new Ve(this.tokens,n,i.length,e);i.push(o)}replaceSingle(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ue.DEFAULT_PROGRAM_NAME;this.replace(t,t,e,n)}replace(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Ue.DEFAULT_PROGRAM_NAME;if("number"!=typeof t&&(t=t.tokenIndex),"number"!=typeof e&&(e=e.tokenIndex),t>e||t<0||e<0||e>=this.tokens.size)throw new RangeError(`replace: range invalid: ${t}..${e}(size=${this.tokens.size})`);let i=this.getProgram(r),o=new He(this.tokens,t,e,i.length,n);i.push(o)}delete(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ue.DEFAULT_PROGRAM_NAME;void 0===e&&(e=t),this.replace(t,e,null,n)}getProgram(t){let e=this.programs.get(t);return null==e&&(e=this.initializeProgram(t)),e}initializeProgram(t){const e=[];return this.programs.set(t,e),e}getText(e){let n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ue.DEFAULT_PROGRAM_NAME;n=e instanceof g?e:new g(0,this.tokens.size-1),"string"==typeof e&&(r=e);const i=this.programs.get(r);let o=n.start,s=n.stop;if(s>this.tokens.size-1&&(s=this.tokens.size-1),o<0&&(o=0),null==i||0===i.length)return this.tokens.getText(new g(o,s));let a=[],c=this.reduceToSingleOperationPerIndex(i),u=o;for(;u<=s&&u=this.tokens.size-1&&a.push(t.text.toString());return a.join("")}reduceToSingleOperationPerIndex(t){for(let e=0;er.index&&e.index<=r.lastIndex&&(t[e.instructionIndex]=void 0);let o=this.getKindOfOps(t,He,e);for(let e of o){if(e.index>=r.index&&e.lastIndex<=r.lastIndex){t[e.instructionIndex]=void 0;continue}let n=e.lastIndexr.lastIndex;if(null!=e.text||null!=r.text||n){if(!n)throw new Error(`replace op boundaries of ${r} overlap with previous ${e}`)}else t[e.instructionIndex]=void 0,r.index=Math.min(e.index,r.index),r.lastIndex=Math.max(e.lastIndex,r.lastIndex)}}for(let e=0;e=n.index&&r.index<=n.lastIndex)throw new Error(`insert op ${r} within boundaries of previous ${n}`)}else n.text=this.catOpText(r.text,n.text),t[e]=void 0}let e=new Map;for(let n of t)if(null!=n){if(null!=e.get(n.index))throw new Error("should only be one op per index");e.set(n.index,n)}return e}catOpText(t,e){let n="",r="";return null!=t&&(n=t.toString()),null!=e&&(r=e.toString()),n+r}getKindOfOps(t,e,n){return t.slice(0,n).filter((t=>t&&t instanceof e))}}class ze{constructor(t,e,n,r){this.tokens=t,this.instructionIndex=n,this.index=e,this.text=void 0===r?"":r}toString(){let t=this.constructor.name;const e=t.indexOf("$");return t=t.substring(e+1,t.length),"<"+t+"@"+this.tokens.get(this.index)+':"'+this.text+'">'}}class Ve extends ze{constructor(t,e,n,r){super(t,e,n,r)}execute(e){return this.text&&e.push(this.text.toString()),this.tokens.get(this.index).type!==t.EOF&&e.push(String(this.tokens.get(this.index).text)),this.index+1}}class Ke extends Ve{constructor(t,e,n,r){super(t,e+1,n,r)}}class He extends ze{constructor(t,e,n,r,i){super(t,e,r,i),this.lastIndex=n}execute(t){return this.text&&t.push(this.text.toString()),this.lastIndex+1}toString(){return null==this.text?"":"'}}const qe={atn:oe,dfa:ue,context:le,misc:he,tree:me,error:Te,Token:t,CommonToken:Pt,CharStreams:Ce,CharStream:Ee,InputStream:Ee,CommonTokenStream:Ie,Lexer:Bt,Parser:De,ParserRuleContext:Fe,Interval:g,IntervalSet:v,LL1Analyzer:Y,Utils:Le,TokenStreamRewriter:Ue}})();var K=V.ZP;function H(t){return H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},H(t)}function q(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{defaultValue:null};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t=G(this,e,[n]);var r=n.defaultValue,i=n.description,o=n.sensitive,s=n.nullable;return t.__class="TerraformVariable",t.defaultValue=r||null,t.description=i||null,t.sensitive=o||!1,t.nullable=s||!1,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&X(t,e)}(e,t),function(t,e,n){return e&&q(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(e,[{key:"formattedName",get:function(){var t="variable"===this.category?"var":"local";return"output"===this.category?null:"".concat(t,".").concat(this.name)}}])}(t.Variable);const J=Z;function Q(t){return Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Q(t)}function tt(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{isDynamic:!1};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=nt(this,e,[n])).isDynamic=n.isDynamic||!1,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ot(t,e)}(e,t),function(t,e,n){return e&&tt(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}(e,[{key:"isVariable",get:function(){return null!==this.value&&"string"==typeof this.value&&(this.value.startsWith("var.")||this.value.startsWith("local."))}}])}(t.ComponentAttribute);const at=st;function ct(t){return ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ct(t)}function ut(t,e){for(var n=0;n0){var t=this.fieldsTree.pop();t.value.push(this.currentObjectField),this.currentObjectField=t}else this.currentComponent.attributes.push(this.currentObjectField),this.currentObjectField=null}},{key:"enterBlocktype",value:function(){}},{key:"exitBlocktype",value:function(){}},{key:"enterResourcetype",value:function(t){var e=this,n=Tt(t);if(this.currentComponent.definition=this.definitions.find((function(t){return t.blockType===e.currentBlockType&&t.type===n}))||this.getUnknownDefinition(n),"provider"===this.currentBlockType){var r="".concat(n,".").concat(n);this.currentComponent.externalId=n,this.currentComponent.id=this.createIdFromTypeExternalId(r)}}},{key:"exitResourcetype",value:function(){}},{key:"enterName",value:function(){}},{key:"exitName",value:function(t){this.currentComponent?this.currentComponent.externalId=Tt(t):this.currentVariable&&(this.currentVariable.name=Tt(t))}},{key:"enterLabel",value:function(){}},{key:"exitLabel",value:function(){}},{key:"enterBlockbody",value:function(){}},{key:"exitBlockbody",value:function(){}},{key:"enterArgument",value:function(t){var e;if(null!==(e=t.expression())&&void 0!==e&&null!==(e=e.section())&&void 0!==e&&e.map_()){this.currentObjectField&&this.fieldsTree.push(this.currentObjectField);var n=t.identifier().getText();this.currentObjectField=new at({name:n,type:"Object",value:[],definition:this.getAttributeDefinition(this.currentObjectField||this.currentComponent,n)})}this.isVariable()?(this.currentVariableField=t.identifier().getText(),"default"===this.currentVariableField&&(this.currentVariableField="defaultValue")):"local"===this.currentBlockType?(this.currentVariable=new J({category:"local",name:Tt(t.identifier())}),this.currentVariableField="value"):this.currentField=new at}},{key:"exitArgument",value:function(t){var e,n,r=this;if(this.isVariable()){var i=t.identifier().getText();"description"===i?this.currentVariable.description=Tt(t.expression()):"sensitive"!==i&&"nullable"!==i||(this.currentVariable[i]="true"===Tt(t.expression()))}else if("local"===this.currentBlockType)this.addVariable();else if(this.currentField)this.currentField.name=t.identifier().getText(),this.currentObjectField?(this.currentObjectField.value.push(this.currentField),this.currentField.definition=this.getAttributeDefinition(this.currentObjectField,this.currentField.name)):(this.currentComponent.attributes.push(this.currentField),this.currentField.definition=this.getAttributeDefinition(this.currentComponent,this.currentField.name));else if(this.currentObjectField.name=t.identifier().getText(),this.fieldsTree.length>0){var o=this.fieldsTree.pop();o.value.push(this.currentObjectField),this.currentObjectField=o}else this.currentComponent.attributes.push(this.currentObjectField),this.currentObjectField=null;if("Reference"===(null===(e=this.currentField)||void 0===e||null===(e=e.definition)||void 0===e?void 0:e.type)&&/([^.]+\.[^.]+)/.exec(this.currentField.value)&&(Array.isArray(this.currentField.value)?this.currentField.value=this.currentField.value.map((function(t){var e=/([^.]+\.[^.]+)\.([^.]+)/.exec(t);return r.createIdFromTypeExternalId(e[1])})):this.currentField.value=this.createIdFromTypeExternalId(this.currentField.value)),"Link"===(null===(n=this.currentField)||void 0===n||null===(n=n.definition)||void 0===n?void 0:n.type)){this.currentField.type="Array",Array.isArray(this.currentField.value)&&(this.currentField.value=this.currentField.value.map((function(t){var e=/([^.]+\.[^.]+)\.([^.]+)/.exec(t);return r.createIdFromTypeExternalId(e[1])})));var s=/([^.]+\.[^.]+)(\.([^.]+))?/.exec(this.currentField.value);s&&(this.currentField.value=[this.createIdFromTypeExternalId(s[1])])}this.currentField=null}},{key:"createIdFromTypeExternalId",value:function(t){if(this.ids.has(t))return this.ids.get(t);var e="id_".concat(this.idCounter);return this.idCounter+=1,this.ids.set(t,e),e}},{key:"enterIdentifier",value:function(){}},{key:"exitIdentifier",value:function(){}},{key:"enterIdentifierchain",value:function(){}},{key:"exitIdentifierchain",value:function(){}},{key:"enterInline_index",value:function(){}},{key:"exitInline_index",value:function(){}},{key:"enterExpression",value:function(){}},{key:"exitExpression",value:function(){}},{key:"enterForloop",value:function(){}},{key:"exitForloop",value:function(){}},{key:"enterSection",value:function(t){var e;if(!this.currentField&&!this.isVariable()&&null!==(e=t.val())&&void 0!==e&&e.identifier()){var n=Tt(t.val());this.currentField=new at({type:"String",value:"null"===n?null:n})}}},{key:"exitSection",value:function(){}},{key:"enterVal",value:function(){}},{key:"getFieldValueTypeFromContext",value:function(t){if(t.BOOL())return{value:"true"===t.BOOL().getText(),type:"Boolean"};if(t.signed_number())return{value:parseFloat(t.signed_number().getText()),type:"Number"};var e=Tt(t);return{value:"null"===e?null:e,type:"String"}}},{key:"exitVal",value:function(t){var e=this.getFieldValueTypeFromContext(t),n=e.value,r=e.type;if(this.isVariable()||"local"===this.currentBlockType){var i=this.attributeTypeToVariableType(r);Array.isArray(this.currentVariable[this.currentVariableField])?(this.currentVariable[this.currentVariableField].push(n),"defaultValue"!==this.currentVariableField&&"value"!==this.currentVariableField||(this.currentVariable.type="list(".concat(i,")"))):(this.currentVariable[this.currentVariableField]=n,"defaultValue"!==this.currentVariableField&&"value"!==this.currentVariableField||(this.currentVariable.type=i))}else"Array"===this.currentField.type?this.currentField.value.push(n):(this.currentField.value=n,this.currentField.type=r)}},{key:"enterFunctioncall",value:function(){}},{key:"exitFunctioncall",value:function(){}},{key:"enterFunctionname",value:function(){}},{key:"exitFunctionname",value:function(){}},{key:"enterFunctionarguments",value:function(){}},{key:"exitFunctionarguments",value:function(){}},{key:"enterIndex",value:function(){}},{key:"exitIndex",value:function(){}},{key:"enterFiledecl",value:function(){}},{key:"exitFiledecl",value:function(){}},{key:"enterList_",value:function(){this.currentField?this.currentField&&(this.currentField.type="Array",this.currentField.value=[]):this.currentField=new at({type:"Array",value:[]}),this.isVariable()?this.currentVariable[this.currentVariableField]=[]:"local"===this.currentBlockType&&(this.currentVariable.value=[])}},{key:"exitList_",value:function(){this.currentField&&(this.currentField.type="Array")}},{key:"enterMap_",value:function(){}},{key:"exitMap_",value:function(){}},{key:"enterString",value:function(){}},{key:"exitString",value:function(){}},{key:"enterNumber",value:function(){}},{key:"exitNumber",value:function(){}},{key:"enterSigned_number",value:function(){}},{key:"exitSigned_number",value:function(){}}])}(K.tree.ParseTreeListener);const Et=St;function At(t){return At="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},At(t)}function Ot(t,e,n){return e=Ct(e),function(t,e){if(e&&("object"==At(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Nt()?Reflect.construct(e,n||[],Ct(t).constructor):e.apply(t,n))}function Nt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Nt=function(){return!!t})()}function Ct(t){return Ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ct(t)}function Lt(t,e){return Lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Lt(t,e)}function Rt(t,e,n){return(e=Pt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Pt(t){var e=function(t,e){if("object"!=At(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=At(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==At(e)?e:e+""}var It=(new K.atn.ATNDeserializer).deserialize([4,0,49,390,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,2,34,7,34,2,35,7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,39,2,40,7,40,2,41,7,41,2,42,7,42,2,43,7,43,2,44,7,44,2,45,7,45,2,46,7,46,2,47,7,47,2,48,7,48,2,49,7,49,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,6,1,6,1,7,1,7,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,9,1,9,1,10,1,10,1,11,1,11,1,11,1,11,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,13,1,13,1,14,1,14,1,15,1,15,1,16,1,16,1,16,1,16,1,16,1,17,1,17,1,18,1,18,1,19,1,19,1,20,1,20,1,21,1,21,1,22,1,22,1,22,1,23,1,23,1,24,1,24,1,24,1,25,1,25,1,25,1,26,1,26,1,26,1,27,1,27,1,27,1,28,1,28,1,28,1,29,1,29,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,32,1,32,1,32,1,33,1,33,1,34,1,34,1,35,1,35,1,36,1,36,1,37,1,37,1,38,1,38,1,39,1,39,1,39,1,39,1,39,1,39,1,39,5,39,261,8,39,10,39,12,39,264,9,39,1,39,1,39,1,39,1,39,1,40,1,40,1,40,1,40,1,41,4,41,275,8,41,11,41,12,41,276,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,3,42,288,8,42,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,5,43,305,8,43,10,43,12,43,308,9,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,43,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,5,44,330,8,44,10,44,12,44,333,9,44,1,44,1,44,1,44,1,44,1,45,1,45,1,45,1,45,5,45,343,8,45,10,45,12,45,346,9,45,1,45,1,45,1,46,1,46,5,46,352,8,46,10,46,12,46,355,9,46,1,47,1,47,1,47,3,47,360,8,47,1,47,5,47,363,8,47,10,47,12,47,366,9,47,1,47,1,47,1,48,1,48,1,48,1,48,5,48,374,8,48,10,48,12,48,377,9,48,1,48,1,48,1,48,1,48,1,48,1,49,4,49,385,8,49,11,49,12,49,386,1,49,1,49,4,262,306,331,375,0,50,1,1,3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25,13,27,14,29,15,31,16,33,17,35,18,37,19,39,20,41,21,43,22,45,23,47,24,49,25,51,26,53,27,55,28,57,29,59,0,61,30,63,31,65,32,67,33,69,34,71,35,73,36,75,37,77,38,79,39,81,40,83,41,85,42,87,43,89,44,91,45,93,46,95,47,97,48,99,49,1,0,6,1,0,48,57,3,0,10,10,13,13,34,34,2,0,65,90,97,122,5,0,45,45,48,57,65,90,95,95,97,122,2,0,10,10,13,13,3,0,9,10,13,13,32,32,400,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0,0,47,1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57,1,0,0,0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,1,0,0,0,0,69,1,0,0,0,0,71,1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77,1,0,0,0,0,79,1,0,0,0,0,81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87,1,0,0,0,0,89,1,0,0,0,0,91,1,0,0,0,0,93,1,0,0,0,0,95,1,0,0,0,0,97,1,0,0,0,0,99,1,0,0,0,1,101,1,0,0,0,3,111,1,0,0,0,5,120,1,0,0,0,7,125,1,0,0,0,9,132,1,0,0,0,11,139,1,0,0,0,13,146,1,0,0,0,15,148,1,0,0,0,17,154,1,0,0,0,19,158,1,0,0,0,21,160,1,0,0,0,23,162,1,0,0,0,25,166,1,0,0,0,27,177,1,0,0,0,29,179,1,0,0,0,31,181,1,0,0,0,33,183,1,0,0,0,35,188,1,0,0,0,37,190,1,0,0,0,39,192,1,0,0,0,41,194,1,0,0,0,43,196,1,0,0,0,45,198,1,0,0,0,47,201,1,0,0,0,49,203,1,0,0,0,51,206,1,0,0,0,53,209,1,0,0,0,55,212,1,0,0,0,57,215,1,0,0,0,59,218,1,0,0,0,61,220,1,0,0,0,63,229,1,0,0,0,65,238,1,0,0,0,67,241,1,0,0,0,69,243,1,0,0,0,71,245,1,0,0,0,73,247,1,0,0,0,75,249,1,0,0,0,77,251,1,0,0,0,79,253,1,0,0,0,81,269,1,0,0,0,83,274,1,0,0,0,85,287,1,0,0,0,87,289,1,0,0,0,89,321,1,0,0,0,91,338,1,0,0,0,93,349,1,0,0,0,95,359,1,0,0,0,97,369,1,0,0,0,99,384,1,0,0,0,101,102,5,116,0,0,102,103,5,101,0,0,103,104,5,114,0,0,104,105,5,114,0,0,105,106,5,97,0,0,106,107,5,102,0,0,107,108,5,111,0,0,108,109,5,114,0,0,109,110,5,109,0,0,110,2,1,0,0,0,111,112,5,114,0,0,112,113,5,101,0,0,113,114,5,115,0,0,114,115,5,111,0,0,115,116,5,117,0,0,116,117,5,114,0,0,117,118,5,99,0,0,118,119,5,101,0,0,119,4,1,0,0,0,120,121,5,100,0,0,121,122,5,97,0,0,122,123,5,116,0,0,123,124,5,97,0,0,124,6,1,0,0,0,125,126,5,111,0,0,126,127,5,117,0,0,127,128,5,116,0,0,128,129,5,112,0,0,129,130,5,117,0,0,130,131,5,116,0,0,131,8,1,0,0,0,132,133,5,108,0,0,133,134,5,111,0,0,134,135,5,99,0,0,135,136,5,97,0,0,136,137,5,108,0,0,137,138,5,115,0,0,138,10,1,0,0,0,139,140,5,109,0,0,140,141,5,111,0,0,141,142,5,100,0,0,142,143,5,117,0,0,143,144,5,108,0,0,144,145,5,101,0,0,145,12,1,0,0,0,146,147,5,61,0,0,147,14,1,0,0,0,148,149,5,108,0,0,149,150,5,111,0,0,150,151,5,99,0,0,151,152,5,97,0,0,152,153,5,108,0,0,153,16,1,0,0,0,154,155,5,118,0,0,155,156,5,97,0,0,156,157,5,114,0,0,157,18,1,0,0,0,158,159,5,63,0,0,159,20,1,0,0,0,160,161,5,58,0,0,161,22,1,0,0,0,162,163,5,102,0,0,163,164,5,111,0,0,164,165,5,114,0,0,165,24,1,0,0,0,166,167,5,106,0,0,167,168,5,115,0,0,168,169,5,111,0,0,169,170,5,110,0,0,170,171,5,101,0,0,171,172,5,110,0,0,172,173,5,99,0,0,173,174,5,111,0,0,174,175,5,100,0,0,175,176,5,101,0,0,176,26,1,0,0,0,177,178,5,44,0,0,178,28,1,0,0,0,179,180,5,91,0,0,180,30,1,0,0,0,181,182,5,93,0,0,182,32,1,0,0,0,183,184,5,102,0,0,184,185,5,105,0,0,185,186,5,108,0,0,186,187,5,101,0,0,187,34,1,0,0,0,188,189,5,43,0,0,189,36,1,0,0,0,190,191,5,45,0,0,191,38,1,0,0,0,192,193,5,47,0,0,193,40,1,0,0,0,194,195,5,37,0,0,195,42,1,0,0,0,196,197,5,62,0,0,197,44,1,0,0,0,198,199,5,62,0,0,199,200,5,61,0,0,200,46,1,0,0,0,201,202,5,60,0,0,202,48,1,0,0,0,203,204,5,60,0,0,204,205,5,61,0,0,205,50,1,0,0,0,206,207,5,61,0,0,207,208,5,61,0,0,208,52,1,0,0,0,209,210,5,33,0,0,210,211,5,61,0,0,211,54,1,0,0,0,212,213,5,38,0,0,213,214,5,38,0,0,214,56,1,0,0,0,215,216,5,124,0,0,216,217,5,124,0,0,217,58,1,0,0,0,218,219,7,0,0,0,219,60,1,0,0,0,220,221,5,118,0,0,221,222,5,97,0,0,222,223,5,114,0,0,223,224,5,105,0,0,224,225,5,97,0,0,225,226,5,98,0,0,226,227,5,108,0,0,227,228,5,101,0,0,228,62,1,0,0,0,229,230,5,112,0,0,230,231,5,114,0,0,231,232,5,111,0,0,232,233,5,118,0,0,233,234,5,105,0,0,234,235,5,100,0,0,235,236,5,101,0,0,236,237,5,114,0,0,237,64,1,0,0,0,238,239,5,105,0,0,239,240,5,110,0,0,240,66,1,0,0,0,241,242,5,42,0,0,242,68,1,0,0,0,243,244,5,46,0,0,244,70,1,0,0,0,245,246,5,123,0,0,246,72,1,0,0,0,247,248,5,125,0,0,248,74,1,0,0,0,249,250,5,40,0,0,250,76,1,0,0,0,251,252,5,41,0,0,252,78,1,0,0,0,253,254,5,60,0,0,254,255,5,60,0,0,255,256,5,69,0,0,256,257,5,79,0,0,257,258,5,70,0,0,258,262,1,0,0,0,259,261,9,0,0,0,260,259,1,0,0,0,261,264,1,0,0,0,262,263,1,0,0,0,262,260,1,0,0,0,263,265,1,0,0,0,264,262,1,0,0,0,265,266,5,69,0,0,266,267,5,79,0,0,267,268,5,70,0,0,268,80,1,0,0,0,269,270,5,110,0,0,270,271,5,117,0,0,271,272,5,108,0,0,272,82,1,0,0,0,273,275,3,59,29,0,274,273,1,0,0,0,275,276,1,0,0,0,276,274,1,0,0,0,276,277,1,0,0,0,277,84,1,0,0,0,278,279,5,116,0,0,279,280,5,114,0,0,280,281,5,117,0,0,281,288,5,101,0,0,282,283,5,102,0,0,283,284,5,97,0,0,284,285,5,108,0,0,285,286,5,115,0,0,286,288,5,101,0,0,287,278,1,0,0,0,287,282,1,0,0,0,288,86,1,0,0,0,289,290,5,60,0,0,290,291,5,60,0,0,291,292,5,68,0,0,292,293,5,69,0,0,293,294,5,83,0,0,294,295,5,67,0,0,295,296,5,82,0,0,296,297,5,73,0,0,297,298,5,80,0,0,298,299,5,84,0,0,299,300,5,73,0,0,300,301,5,79,0,0,301,302,5,78,0,0,302,306,1,0,0,0,303,305,9,0,0,0,304,303,1,0,0,0,305,308,1,0,0,0,306,307,1,0,0,0,306,304,1,0,0,0,307,309,1,0,0,0,308,306,1,0,0,0,309,310,5,68,0,0,310,311,5,69,0,0,311,312,5,83,0,0,312,313,5,67,0,0,313,314,5,82,0,0,314,315,5,73,0,0,315,316,5,80,0,0,316,317,5,84,0,0,317,318,5,73,0,0,318,319,5,79,0,0,319,320,5,78,0,0,320,88,1,0,0,0,321,322,5,60,0,0,322,323,5,60,0,0,323,324,5,45,0,0,324,325,5,69,0,0,325,326,5,79,0,0,326,327,5,70,0,0,327,331,1,0,0,0,328,330,9,0,0,0,329,328,1,0,0,0,330,333,1,0,0,0,331,332,1,0,0,0,331,329,1,0,0,0,332,334,1,0,0,0,333,331,1,0,0,0,334,335,5,69,0,0,335,336,5,79,0,0,336,337,5,70,0,0,337,90,1,0,0,0,338,344,5,34,0,0,339,340,5,92,0,0,340,343,5,34,0,0,341,343,8,1,0,0,342,339,1,0,0,0,342,341,1,0,0,0,343,346,1,0,0,0,344,342,1,0,0,0,344,345,1,0,0,0,345,347,1,0,0,0,346,344,1,0,0,0,347,348,5,34,0,0,348,92,1,0,0,0,349,353,7,2,0,0,350,352,7,3,0,0,351,350,1,0,0,0,352,355,1,0,0,0,353,351,1,0,0,0,353,354,1,0,0,0,354,94,1,0,0,0,355,353,1,0,0,0,356,360,5,35,0,0,357,358,5,47,0,0,358,360,5,47,0,0,359,356,1,0,0,0,359,357,1,0,0,0,360,364,1,0,0,0,361,363,8,4,0,0,362,361,1,0,0,0,363,366,1,0,0,0,364,362,1,0,0,0,364,365,1,0,0,0,365,367,1,0,0,0,366,364,1,0,0,0,367,368,6,47,0,0,368,96,1,0,0,0,369,370,5,47,0,0,370,371,5,42,0,0,371,375,1,0,0,0,372,374,9,0,0,0,373,372,1,0,0,0,374,377,1,0,0,0,375,376,1,0,0,0,375,373,1,0,0,0,376,378,1,0,0,0,377,375,1,0,0,0,378,379,5,42,0,0,379,380,5,47,0,0,380,381,1,0,0,0,381,382,6,48,0,0,382,98,1,0,0,0,383,385,7,5,0,0,384,383,1,0,0,0,385,386,1,0,0,0,386,384,1,0,0,0,386,387,1,0,0,0,387,388,1,0,0,0,388,389,6,49,1,0,389,100,1,0,0,0,13,0,262,276,287,306,331,342,344,353,359,364,375,386,2,0,1,0,6,0,0]),Mt=It.decisionToState.map((function(t,e){return new K.dfa.DFA(t,e)})),Dt=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=Ot(this,e,[t]))._interp=new K.atn.LexerATNSimulator(n,It,Mt,new K.atn.PredictionContextCache),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Lt(t,e)}(e,t),function(t,e,n){return Object.defineProperty(t,"prototype",{writable:!1}),t}(e)}(K.Lexer);function jt(t){return jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jt(t)}function Bt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ft(t,e){for(var n=0;n'","'>='","'<'","'<='","'=='","'!='","'&&'","'||'","'variable'","'provider'","'in'","'*'","'.'","'{'","'}'","'('","')'",null,"'nul'"]),Rt(Dt,"symbolicNames",[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"VARIABLE","PROVIDER","IN","STAR","DOT","LCURL","RCURL","LPAREN","RPAREN","EOF_","NULL_","NATURAL_NUMBER","BOOL","DESCRIPTION","MULTILINESTRING","STRING","IDENTIFIER","COMMENT","BLOCKCOMMENT","WS"]),Rt(Dt,"ruleNames",["T__0","T__1","T__2","T__3","T__4","T__5","T__6","T__7","T__8","T__9","T__10","T__11","T__12","T__13","T__14","T__15","T__16","T__17","T__18","T__19","T__20","T__21","T__22","T__23","T__24","T__25","T__26","T__27","T__28","DIGIT","VARIABLE","PROVIDER","IN","STAR","DOT","LCURL","RCURL","LPAREN","RPAREN","EOF_","NULL_","NATURAL_NUMBER","BOOL","DESCRIPTION","MULTILINESTRING","STRING","IDENTIFIER","COMMENT","BLOCKCOMMENT","WS"]),Dt.EOF=K.Token.EOF,Dt.T__0=1,Dt.T__1=2,Dt.T__2=3,Dt.T__3=4,Dt.T__4=5,Dt.T__5=6,Dt.T__6=7,Dt.T__7=8,Dt.T__8=9,Dt.T__9=10,Dt.T__10=11,Dt.T__11=12,Dt.T__12=13,Dt.T__13=14,Dt.T__14=15,Dt.T__15=16,Dt.T__16=17,Dt.T__17=18,Dt.T__18=19,Dt.T__19=20,Dt.T__20=21,Dt.T__21=22,Dt.T__22=23,Dt.T__23=24,Dt.T__24=25,Dt.T__25=26,Dt.T__26=27,Dt.T__27=28,Dt.T__28=29,Dt.VARIABLE=30,Dt.PROVIDER=31,Dt.IN=32,Dt.STAR=33,Dt.DOT=34,Dt.LCURL=35,Dt.RCURL=36,Dt.LPAREN=37,Dt.RPAREN=38,Dt.EOF_=39,Dt.NULL_=40,Dt.NATURAL_NUMBER=41,Dt.BOOL=42,Dt.DESCRIPTION=43,Dt.MULTILINESTRING=44,Dt.STRING=45,Dt.IDENTIFIER=46,Dt.COMMENT=47,Dt.BLOCKCOMMENT=48,Dt.WS=49;var Yt=(new K.atn.ATNDeserializer).deserialize([4,1,49,310,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,4,0,77,8,0,11,0,12,0,78,1,0,1,0,1,1,1,1,1,1,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,9,1,9,5,9,117,8,9,10,9,12,9,120,9,9,1,9,1,9,1,10,1,10,1,11,1,11,1,12,1,12,1,13,1,13,1,14,1,14,1,14,5,14,135,8,14,10,14,12,14,138,9,14,1,14,1,14,1,15,1,15,1,15,1,15,1,16,1,16,3,16,148,8,16,1,16,1,16,1,17,1,17,3,17,154,8,17,1,17,1,17,5,17,158,8,17,10,17,12,17,161,9,17,1,17,1,17,1,17,5,17,166,8,17,10,17,12,17,169,9,17,1,17,1,17,1,17,5,17,174,8,17,10,17,12,17,177,9,17,3,17,179,8,17,1,18,1,18,1,19,1,19,1,19,1,19,1,19,1,19,1,19,3,19,190,8,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,5,19,202,8,19,10,19,12,19,205,9,19,1,20,1,20,1,20,1,20,1,20,1,20,1,20,1,21,1,21,1,21,3,21,217,8,21,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,3,22,228,8,22,1,23,1,23,1,23,1,23,1,23,1,23,1,23,1,23,5,23,238,8,23,10,23,12,23,241,9,23,1,23,3,23,244,8,23,1,24,1,24,1,25,1,25,1,25,1,25,5,25,252,8,25,10,25,12,25,255,9,25,3,25,257,8,25,1,26,1,26,1,26,1,26,1,27,1,27,1,27,1,27,1,27,1,28,1,28,1,28,1,28,5,28,272,8,28,10,28,12,28,275,9,28,1,28,3,28,278,8,28,3,28,280,8,28,1,28,1,28,1,29,1,29,1,29,3,29,287,8,29,5,29,289,8,29,10,29,12,29,292,9,29,1,29,1,29,1,30,1,30,1,31,3,31,299,8,31,1,31,1,31,1,32,1,32,1,33,1,33,1,33,3,33,308,8,33,1,33,1,239,1,38,34,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,0,5,3,0,3,3,6,6,8,9,2,0,30,32,46,46,1,0,44,45,1,0,18,19,2,0,18,29,33,33,318,0,76,1,0,0,0,2,82,1,0,0,0,4,85,1,0,0,0,6,90,1,0,0,0,8,95,1,0,0,0,10,99,1,0,0,0,12,103,1,0,0,0,14,106,1,0,0,0,16,110,1,0,0,0,18,114,1,0,0,0,20,123,1,0,0,0,22,125,1,0,0,0,24,127,1,0,0,0,26,129,1,0,0,0,28,131,1,0,0,0,30,141,1,0,0,0,32,147,1,0,0,0,34,178,1,0,0,0,36,180,1,0,0,0,38,189,1,0,0,0,40,206,1,0,0,0,42,216,1,0,0,0,44,227,1,0,0,0,46,243,1,0,0,0,48,245,1,0,0,0,50,256,1,0,0,0,52,258,1,0,0,0,54,262,1,0,0,0,56,267,1,0,0,0,58,283,1,0,0,0,60,295,1,0,0,0,62,298,1,0,0,0,64,302,1,0,0,0,66,304,1,0,0,0,68,77,3,12,6,0,69,77,3,14,7,0,70,77,3,10,5,0,71,77,3,8,4,0,72,77,3,16,8,0,73,77,3,6,3,0,74,77,3,4,2,0,75,77,3,2,1,0,76,68,1,0,0,0,76,69,1,0,0,0,76,70,1,0,0,0,76,71,1,0,0,0,76,72,1,0,0,0,76,73,1,0,0,0,76,74,1,0,0,0,76,75,1,0,0,0,77,78,1,0,0,0,78,76,1,0,0,0,78,79,1,0,0,0,79,80,1,0,0,0,80,81,5,0,0,1,81,1,1,0,0,0,82,83,5,1,0,0,83,84,3,28,14,0,84,3,1,0,0,0,85,86,5,2,0,0,86,87,3,22,11,0,87,88,3,24,12,0,88,89,3,28,14,0,89,5,1,0,0,0,90,91,5,3,0,0,91,92,3,22,11,0,92,93,3,24,12,0,93,94,3,28,14,0,94,7,1,0,0,0,95,96,5,31,0,0,96,97,3,22,11,0,97,98,3,28,14,0,98,9,1,0,0,0,99,100,5,4,0,0,100,101,3,24,12,0,101,102,3,28,14,0,102,11,1,0,0,0,103,104,5,5,0,0,104,105,3,28,14,0,105,13,1,0,0,0,106,107,5,6,0,0,107,108,3,24,12,0,108,109,3,28,14,0,109,15,1,0,0,0,110,111,5,30,0,0,111,112,3,24,12,0,112,113,3,28,14,0,113,17,1,0,0,0,114,118,3,20,10,0,115,117,3,26,13,0,116,115,1,0,0,0,117,120,1,0,0,0,118,116,1,0,0,0,118,119,1,0,0,0,119,121,1,0,0,0,120,118,1,0,0,0,121,122,3,28,14,0,122,19,1,0,0,0,123,124,5,46,0,0,124,21,1,0,0,0,125,126,5,45,0,0,126,23,1,0,0,0,127,128,5,45,0,0,128,25,1,0,0,0,129,130,5,45,0,0,130,27,1,0,0,0,131,136,5,35,0,0,132,135,3,30,15,0,133,135,3,18,9,0,134,132,1,0,0,0,134,133,1,0,0,0,135,138,1,0,0,0,136,134,1,0,0,0,136,137,1,0,0,0,137,139,1,0,0,0,138,136,1,0,0,0,139,140,5,36,0,0,140,29,1,0,0,0,141,142,3,32,16,0,142,143,5,7,0,0,143,144,3,38,19,0,144,31,1,0,0,0,145,146,7,0,0,0,146,148,5,34,0,0,147,145,1,0,0,0,147,148,1,0,0,0,148,149,1,0,0,0,149,150,3,34,17,0,150,33,1,0,0,0,151,153,7,1,0,0,152,154,3,52,26,0,153,152,1,0,0,0,153,154,1,0,0,0,154,159,1,0,0,0,155,156,5,34,0,0,156,158,3,34,17,0,157,155,1,0,0,0,158,161,1,0,0,0,159,157,1,0,0,0,159,160,1,0,0,0,160,179,1,0,0,0,161,159,1,0,0,0,162,167,5,33,0,0,163,164,5,34,0,0,164,166,3,34,17,0,165,163,1,0,0,0,166,169,1,0,0,0,167,165,1,0,0,0,167,168,1,0,0,0,168,179,1,0,0,0,169,167,1,0,0,0,170,175,3,36,18,0,171,172,5,34,0,0,172,174,3,34,17,0,173,171,1,0,0,0,174,177,1,0,0,0,175,173,1,0,0,0,175,176,1,0,0,0,176,179,1,0,0,0,177,175,1,0,0,0,178,151,1,0,0,0,178,162,1,0,0,0,178,170,1,0,0,0,179,35,1,0,0,0,180,181,5,41,0,0,181,37,1,0,0,0,182,183,6,19,-1,0,183,190,3,42,21,0,184,185,5,37,0,0,185,186,3,38,19,0,186,187,5,38,0,0,187,190,1,0,0,0,188,190,3,40,20,0,189,182,1,0,0,0,189,184,1,0,0,0,189,188,1,0,0,0,190,203,1,0,0,0,191,192,10,4,0,0,192,193,3,64,32,0,193,194,3,38,19,5,194,202,1,0,0,0,195,196,10,2,0,0,196,197,5,10,0,0,197,198,3,38,19,0,198,199,5,11,0,0,199,200,3,38,19,3,200,202,1,0,0,0,201,191,1,0,0,0,201,195,1,0,0,0,202,205,1,0,0,0,203,201,1,0,0,0,203,204,1,0,0,0,204,39,1,0,0,0,205,203,1,0,0,0,206,207,5,12,0,0,207,208,3,32,16,0,208,209,5,32,0,0,209,210,3,38,19,0,210,211,5,11,0,0,211,212,3,38,19,0,212,41,1,0,0,0,213,217,3,56,28,0,214,217,3,58,29,0,215,217,3,44,22,0,216,213,1,0,0,0,216,214,1,0,0,0,216,215,1,0,0,0,217,43,1,0,0,0,218,228,5,40,0,0,219,228,3,62,31,0,220,228,3,60,30,0,221,228,3,32,16,0,222,228,5,42,0,0,223,228,5,43,0,0,224,228,3,54,27,0,225,228,3,46,23,0,226,228,5,39,0,0,227,218,1,0,0,0,227,219,1,0,0,0,227,220,1,0,0,0,227,221,1,0,0,0,227,222,1,0,0,0,227,223,1,0,0,0,227,224,1,0,0,0,227,225,1,0,0,0,227,226,1,0,0,0,228,45,1,0,0,0,229,230,3,48,24,0,230,231,5,37,0,0,231,232,3,50,25,0,232,233,5,38,0,0,233,244,1,0,0,0,234,235,5,13,0,0,235,239,5,37,0,0,236,238,9,0,0,0,237,236,1,0,0,0,238,241,1,0,0,0,239,240,1,0,0,0,239,237,1,0,0,0,240,242,1,0,0,0,241,239,1,0,0,0,242,244,5,38,0,0,243,229,1,0,0,0,243,234,1,0,0,0,244,47,1,0,0,0,245,246,5,46,0,0,246,49,1,0,0,0,247,257,1,0,0,0,248,253,3,38,19,0,249,250,5,14,0,0,250,252,3,38,19,0,251,249,1,0,0,0,252,255,1,0,0,0,253,251,1,0,0,0,253,254,1,0,0,0,254,257,1,0,0,0,255,253,1,0,0,0,256,247,1,0,0,0,256,248,1,0,0,0,257,51,1,0,0,0,258,259,5,15,0,0,259,260,3,38,19,0,260,261,5,16,0,0,261,53,1,0,0,0,262,263,5,17,0,0,263,264,5,37,0,0,264,265,3,38,19,0,265,266,5,38,0,0,266,55,1,0,0,0,267,279,5,15,0,0,268,273,3,38,19,0,269,270,5,14,0,0,270,272,3,38,19,0,271,269,1,0,0,0,272,275,1,0,0,0,273,271,1,0,0,0,273,274,1,0,0,0,274,277,1,0,0,0,275,273,1,0,0,0,276,278,5,14,0,0,277,276,1,0,0,0,277,278,1,0,0,0,278,280,1,0,0,0,279,268,1,0,0,0,279,280,1,0,0,0,280,281,1,0,0,0,281,282,5,16,0,0,282,57,1,0,0,0,283,290,5,35,0,0,284,286,3,30,15,0,285,287,5,14,0,0,286,285,1,0,0,0,286,287,1,0,0,0,287,289,1,0,0,0,288,284,1,0,0,0,289,292,1,0,0,0,290,288,1,0,0,0,290,291,1,0,0,0,291,293,1,0,0,0,292,290,1,0,0,0,293,294,5,36,0,0,294,59,1,0,0,0,295,296,7,2,0,0,296,61,1,0,0,0,297,299,7,3,0,0,298,297,1,0,0,0,298,299,1,0,0,0,299,300,1,0,0,0,300,301,3,66,33,0,301,63,1,0,0,0,302,303,7,4,0,0,303,65,1,0,0,0,304,307,5,41,0,0,305,306,5,34,0,0,306,308,5,41,0,0,307,305,1,0,0,0,307,308,1,0,0,0,308,67,1,0,0,0,27,76,78,118,134,136,147,153,159,167,175,178,189,201,203,216,227,239,243,253,256,273,277,279,286,290,298,307]),$t=Yt.decisionToState.map((function(t,e){return new K.dfa.DFA(t,e)})),Xt=new K.atn.PredictionContextCache,Zt=function(t){function e(t){var n;return Bt(this,e),(n=zt(this,e,[t]))._interp=new K.atn.ParserATNSimulator(n,Yt,$t,Xt),n.ruleNames=e.ruleNames,n.literalNames=e.literalNames,n.symbolicNames=e.symbolicNames,n}return Ht(e,t),Ut(e,[{key:"sempred",value:function(t,e,n){if(19===e)return this.expression_sempred(t,n);throw"No predicate with index:"+e}},{key:"expression_sempred",value:function(t,e){switch(e){case 0:return this.precpred(this._ctx,4);case 1:return this.precpred(this._ctx,2);default:throw"No predicate with index:"+e}}},{key:"file_",value:function(){var t=new Jt(this,this._ctx,this.state);this.enterRule(t,0,e.RULE_file_);var n=0;try{this.enterOuterAlt(t,1),this.state=76,this._errHandler.sync(this),n=this._input.LA(1);do{switch(this.state=76,this._errHandler.sync(this),this._input.LA(1)){case 5:this.state=68,this.local();break;case 6:this.state=69,this.module();break;case 4:this.state=70,this.output();break;case 31:this.state=71,this.provider();break;case 30:this.state=72,this.variable();break;case 3:this.state=73,this.data();break;case 2:this.state=74,this.resource();break;case 1:this.state=75,this.terraform();break;default:throw new K.error.NoViableAltException(this)}this.state=78,this._errHandler.sync(this),n=this._input.LA(1)}while(!(-32&n)&&1<'","'>='","'<'","'<='","'=='","'!='","'&&'","'||'","'variable'","'provider'","'in'","'*'","'.'","'{'","'}'","'('","')'",null,"'nul'"]),Wt(Zt,"symbolicNames",[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"VARIABLE","PROVIDER","IN","STAR","DOT","LCURL","RCURL","LPAREN","RPAREN","EOF_","NULL_","NATURAL_NUMBER","BOOL","DESCRIPTION","MULTILINESTRING","STRING","IDENTIFIER","COMMENT","BLOCKCOMMENT","WS"]),Wt(Zt,"ruleNames",["file_","terraform","resource","data","provider","output","local","module","variable","block","blocktype","resourcetype","name","label","blockbody","argument","identifier","identifierchain","inline_index","expression","forloop","section","val","functioncall","functionname","functionarguments","index","filedecl","list_","map_","string","signed_number","operator_","number"]),Zt.EOF=K.Token.EOF,Zt.T__0=1,Zt.T__1=2,Zt.T__2=3,Zt.T__3=4,Zt.T__4=5,Zt.T__5=6,Zt.T__6=7,Zt.T__7=8,Zt.T__8=9,Zt.T__9=10,Zt.T__10=11,Zt.T__11=12,Zt.T__12=13,Zt.T__13=14,Zt.T__14=15,Zt.T__15=16,Zt.T__16=17,Zt.T__17=18,Zt.T__18=19,Zt.T__19=20,Zt.T__20=21,Zt.T__21=22,Zt.T__22=23,Zt.T__23=24,Zt.T__24=25,Zt.T__25=26,Zt.T__26=27,Zt.T__27=28,Zt.T__28=29,Zt.VARIABLE=30,Zt.PROVIDER=31,Zt.IN=32,Zt.STAR=33,Zt.DOT=34,Zt.LCURL=35,Zt.RCURL=36,Zt.LPAREN=37,Zt.RPAREN=38,Zt.EOF_=39,Zt.NULL_=40,Zt.NATURAL_NUMBER=41,Zt.BOOL=42,Zt.DESCRIPTION=43,Zt.MULTILINESTRING=44,Zt.STRING=45,Zt.IDENTIFIER=46,Zt.COMMENT=47,Zt.BLOCKCOMMENT=48,Zt.WS=49,Zt.RULE_file_=0,Zt.RULE_terraform=1,Zt.RULE_resource=2,Zt.RULE_data=3,Zt.RULE_provider=4,Zt.RULE_output=5,Zt.RULE_local=6,Zt.RULE_module=7,Zt.RULE_variable=8,Zt.RULE_block=9,Zt.RULE_blocktype=10,Zt.RULE_resourcetype=11,Zt.RULE_name=12,Zt.RULE_label=13,Zt.RULE_blockbody=14,Zt.RULE_argument=15,Zt.RULE_identifier=16,Zt.RULE_identifierchain=17,Zt.RULE_inline_index=18,Zt.RULE_expression=19,Zt.RULE_forloop=20,Zt.RULE_section=21,Zt.RULE_val=22,Zt.RULE_functioncall=23,Zt.RULE_functionname=24,Zt.RULE_functionarguments=25,Zt.RULE_index=26,Zt.RULE_filedecl=27,Zt.RULE_list_=28,Zt.RULE_map_=29,Zt.RULE_string=30,Zt.RULE_signed_number=31,Zt.RULE_operator_=32,Zt.RULE_number=33;var Jt=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),Wt(i=zt(this,e,[n,r]),"local",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(ie):this.getTypedRuleContext(ie,t)})),Wt(i,"module",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(oe):this.getTypedRuleContext(oe,t)})),Wt(i,"output",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(re):this.getTypedRuleContext(re,t)})),Wt(i,"provider",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(ne):this.getTypedRuleContext(ne,t)})),Wt(i,"variable",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(se):this.getTypedRuleContext(se,t)})),Wt(i,"data",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(ee):this.getTypedRuleContext(ee,t)})),Wt(i,"resource",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(te):this.getTypedRuleContext(te,t)})),Wt(i,"terraform",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(Qt):this.getTypedRuleContext(Qt,t)})),i.parser=t,i.ruleIndex=Zt.RULE_file_,i}return Ht(e,t),Ut(e,[{key:"EOF",value:function(){return this.getToken(Zt.EOF,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterFile_(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitFile_(this)}}])}(K.ParserRuleContext),Qt=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_terraform,i}return Ht(e,t),Ut(e,[{key:"blockbody",value:function(){return this.getTypedRuleContext(fe,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterTerraform(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitTerraform(this)}}])}(K.ParserRuleContext),te=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_resource,i}return Ht(e,t),Ut(e,[{key:"resourcetype",value:function(){return this.getTypedRuleContext(ue,0)}},{key:"name",value:function(){return this.getTypedRuleContext(le,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(fe,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterResource(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitResource(this)}}])}(K.ParserRuleContext),ee=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_data,i}return Ht(e,t),Ut(e,[{key:"resourcetype",value:function(){return this.getTypedRuleContext(ue,0)}},{key:"name",value:function(){return this.getTypedRuleContext(le,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(fe,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterData(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitData(this)}}])}(K.ParserRuleContext),ne=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_provider,i}return Ht(e,t),Ut(e,[{key:"PROVIDER",value:function(){return this.getToken(Zt.PROVIDER,0)}},{key:"resourcetype",value:function(){return this.getTypedRuleContext(ue,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(fe,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterProvider(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitProvider(this)}}])}(K.ParserRuleContext),re=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_output,i}return Ht(e,t),Ut(e,[{key:"name",value:function(){return this.getTypedRuleContext(le,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(fe,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterOutput(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitOutput(this)}}])}(K.ParserRuleContext),ie=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_local,i}return Ht(e,t),Ut(e,[{key:"blockbody",value:function(){return this.getTypedRuleContext(fe,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterLocal(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitLocal(this)}}])}(K.ParserRuleContext),oe=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_module,i}return Ht(e,t),Ut(e,[{key:"name",value:function(){return this.getTypedRuleContext(le,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(fe,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterModule(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitModule(this)}}])}(K.ParserRuleContext),se=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_variable,i}return Ht(e,t),Ut(e,[{key:"VARIABLE",value:function(){return this.getToken(Zt.VARIABLE,0)}},{key:"name",value:function(){return this.getTypedRuleContext(le,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(fe,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterVariable(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitVariable(this)}}])}(K.ParserRuleContext),ae=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),Wt(i=zt(this,e,[n,r]),"label",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(he):this.getTypedRuleContext(he,t)})),i.parser=t,i.ruleIndex=Zt.RULE_block,i}return Ht(e,t),Ut(e,[{key:"blocktype",value:function(){return this.getTypedRuleContext(ce,0)}},{key:"blockbody",value:function(){return this.getTypedRuleContext(fe,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterBlock(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitBlock(this)}}])}(K.ParserRuleContext),ce=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_blocktype,i}return Ht(e,t),Ut(e,[{key:"IDENTIFIER",value:function(){return this.getToken(Zt.IDENTIFIER,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterBlocktype(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitBlocktype(this)}}])}(K.ParserRuleContext),ue=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_resourcetype,i}return Ht(e,t),Ut(e,[{key:"STRING",value:function(){return this.getToken(Zt.STRING,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterResourcetype(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitResourcetype(this)}}])}(K.ParserRuleContext),le=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_name,i}return Ht(e,t),Ut(e,[{key:"STRING",value:function(){return this.getToken(Zt.STRING,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterName(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitName(this)}}])}(K.ParserRuleContext),he=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_label,i}return Ht(e,t),Ut(e,[{key:"STRING",value:function(){return this.getToken(Zt.STRING,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterLabel(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitLabel(this)}}])}(K.ParserRuleContext),fe=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),Wt(i=zt(this,e,[n,r]),"argument",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(pe):this.getTypedRuleContext(pe,t)})),Wt(i,"block",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(ae):this.getTypedRuleContext(ae,t)})),i.parser=t,i.ruleIndex=Zt.RULE_blockbody,i}return Ht(e,t),Ut(e,[{key:"LCURL",value:function(){return this.getToken(Zt.LCURL,0)}},{key:"RCURL",value:function(){return this.getToken(Zt.RCURL,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterBlockbody(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitBlockbody(this)}}])}(K.ParserRuleContext),pe=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_argument,i}return Ht(e,t),Ut(e,[{key:"identifier",value:function(){return this.getTypedRuleContext(de,0)}},{key:"expression",value:function(){return this.getTypedRuleContext(ge,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterArgument(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitArgument(this)}}])}(K.ParserRuleContext),de=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_identifier,i}return Ht(e,t),Ut(e,[{key:"identifierchain",value:function(){return this.getTypedRuleContext(me,0)}},{key:"DOT",value:function(){return this.getToken(Zt.DOT,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterIdentifier(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitIdentifier(this)}}])}(K.ParserRuleContext),me=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),Wt(i=zt(this,e,[n,r]),"DOT",(function(t){return void 0===t&&(t=null),null===t?this.getTokens(Zt.DOT):this.getToken(Zt.DOT,t)})),Wt(i,"identifierchain",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(e):this.getTypedRuleContext(e,t)})),i.parser=t,i.ruleIndex=Zt.RULE_identifierchain,i}return Ht(e,t),Ut(e,[{key:"IDENTIFIER",value:function(){return this.getToken(Zt.IDENTIFIER,0)}},{key:"IN",value:function(){return this.getToken(Zt.IN,0)}},{key:"VARIABLE",value:function(){return this.getToken(Zt.VARIABLE,0)}},{key:"PROVIDER",value:function(){return this.getToken(Zt.PROVIDER,0)}},{key:"index",value:function(){return this.getTypedRuleContext(Te,0)}},{key:"STAR",value:function(){return this.getToken(Zt.STAR,0)}},{key:"inline_index",value:function(){return this.getTypedRuleContext(ye,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterIdentifierchain(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitIdentifierchain(this)}}])}(K.ParserRuleContext),ye=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_inline_index,i}return Ht(e,t),Ut(e,[{key:"NATURAL_NUMBER",value:function(){return this.getToken(Zt.NATURAL_NUMBER,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterInline_index(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitInline_index(this)}}])}(K.ParserRuleContext),ge=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),Wt(i=zt(this,e,[n,r]),"expression",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(e):this.getTypedRuleContext(e,t)})),i.parser=t,i.ruleIndex=Zt.RULE_expression,i}return Ht(e,t),Ut(e,[{key:"section",value:function(){return this.getTypedRuleContext(_e,0)}},{key:"LPAREN",value:function(){return this.getToken(Zt.LPAREN,0)}},{key:"RPAREN",value:function(){return this.getToken(Zt.RPAREN,0)}},{key:"forloop",value:function(){return this.getTypedRuleContext(ve,0)}},{key:"operator_",value:function(){return this.getTypedRuleContext(Ce,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterExpression(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitExpression(this)}}])}(K.ParserRuleContext),ve=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),Wt(i=zt(this,e,[n,r]),"expression",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(ge):this.getTypedRuleContext(ge,t)})),i.parser=t,i.ruleIndex=Zt.RULE_forloop,i}return Ht(e,t),Ut(e,[{key:"identifier",value:function(){return this.getTypedRuleContext(de,0)}},{key:"IN",value:function(){return this.getToken(Zt.IN,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterForloop(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitForloop(this)}}])}(K.ParserRuleContext),_e=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_section,i}return Ht(e,t),Ut(e,[{key:"list_",value:function(){return this.getTypedRuleContext(Ee,0)}},{key:"map_",value:function(){return this.getTypedRuleContext(Ae,0)}},{key:"val",value:function(){return this.getTypedRuleContext(be,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterSection(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitSection(this)}}])}(K.ParserRuleContext),be=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_val,i}return Ht(e,t),Ut(e,[{key:"NULL_",value:function(){return this.getToken(Zt.NULL_,0)}},{key:"signed_number",value:function(){return this.getTypedRuleContext(Ne,0)}},{key:"string",value:function(){return this.getTypedRuleContext(Oe,0)}},{key:"identifier",value:function(){return this.getTypedRuleContext(de,0)}},{key:"BOOL",value:function(){return this.getToken(Zt.BOOL,0)}},{key:"DESCRIPTION",value:function(){return this.getToken(Zt.DESCRIPTION,0)}},{key:"filedecl",value:function(){return this.getTypedRuleContext(Se,0)}},{key:"functioncall",value:function(){return this.getTypedRuleContext(we,0)}},{key:"EOF_",value:function(){return this.getToken(Zt.EOF_,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterVal(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitVal(this)}}])}(K.ParserRuleContext),we=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_functioncall,i}return Ht(e,t),Ut(e,[{key:"functionname",value:function(){return this.getTypedRuleContext(xe,0)}},{key:"LPAREN",value:function(){return this.getToken(Zt.LPAREN,0)}},{key:"functionarguments",value:function(){return this.getTypedRuleContext(ke,0)}},{key:"RPAREN",value:function(){return this.getToken(Zt.RPAREN,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterFunctioncall(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitFunctioncall(this)}}])}(K.ParserRuleContext),xe=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_functionname,i}return Ht(e,t),Ut(e,[{key:"IDENTIFIER",value:function(){return this.getToken(Zt.IDENTIFIER,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterFunctionname(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitFunctionname(this)}}])}(K.ParserRuleContext),ke=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),Wt(i=zt(this,e,[n,r]),"expression",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(ge):this.getTypedRuleContext(ge,t)})),i.parser=t,i.ruleIndex=Zt.RULE_functionarguments,i}return Ht(e,t),Ut(e,[{key:"enterRule",value:function(t){t instanceof Et&&t.enterFunctionarguments(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitFunctionarguments(this)}}])}(K.ParserRuleContext),Te=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_index,i}return Ht(e,t),Ut(e,[{key:"expression",value:function(){return this.getTypedRuleContext(ge,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterIndex(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitIndex(this)}}])}(K.ParserRuleContext),Se=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_filedecl,i}return Ht(e,t),Ut(e,[{key:"LPAREN",value:function(){return this.getToken(Zt.LPAREN,0)}},{key:"expression",value:function(){return this.getTypedRuleContext(ge,0)}},{key:"RPAREN",value:function(){return this.getToken(Zt.RPAREN,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterFiledecl(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitFiledecl(this)}}])}(K.ParserRuleContext),Ee=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),Wt(i=zt(this,e,[n,r]),"expression",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(ge):this.getTypedRuleContext(ge,t)})),i.parser=t,i.ruleIndex=Zt.RULE_list_,i}return Ht(e,t),Ut(e,[{key:"enterRule",value:function(t){t instanceof Et&&t.enterList_(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitList_(this)}}])}(K.ParserRuleContext),Ae=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),Wt(i=zt(this,e,[n,r]),"argument",(function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(pe):this.getTypedRuleContext(pe,t)})),i.parser=t,i.ruleIndex=Zt.RULE_map_,i}return Ht(e,t),Ut(e,[{key:"LCURL",value:function(){return this.getToken(Zt.LCURL,0)}},{key:"RCURL",value:function(){return this.getToken(Zt.RCURL,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterMap_(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitMap_(this)}}])}(K.ParserRuleContext),Oe=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_string,i}return Ht(e,t),Ut(e,[{key:"STRING",value:function(){return this.getToken(Zt.STRING,0)}},{key:"MULTILINESTRING",value:function(){return this.getToken(Zt.MULTILINESTRING,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterString(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitString(this)}}])}(K.ParserRuleContext),Ne=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_signed_number,i}return Ht(e,t),Ut(e,[{key:"number",value:function(){return this.getTypedRuleContext(Le,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterSigned_number(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitSigned_number(this)}}])}(K.ParserRuleContext),Ce=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),(i=zt(this,e,[n,r])).parser=t,i.ruleIndex=Zt.RULE_operator_,i}return Ht(e,t),Ut(e,[{key:"STAR",value:function(){return this.getToken(Zt.STAR,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterOperator_(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitOperator_(this)}}])}(K.ParserRuleContext),Le=function(t){function e(t,n,r){var i;return Bt(this,e),void 0===n&&(n=null),null==r&&(r=-1),Wt(i=zt(this,e,[n,r]),"NATURAL_NUMBER",(function(t){return void 0===t&&(t=null),null===t?this.getTokens(Zt.NATURAL_NUMBER):this.getToken(Zt.NATURAL_NUMBER,t)})),i.parser=t,i.ruleIndex=Zt.RULE_number,i}return Ht(e,t),Ut(e,[{key:"DOT",value:function(){return this.getToken(Zt.DOT,0)}},{key:"enterRule",value:function(t){t instanceof Et&&t.enterNumber(this)}},{key:"exitRule",value:function(t){t instanceof Et&&t.exitNumber(this)}}])}(K.ParserRuleContext);function Re(t){return Re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Re(t)}function Pe(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[]).filter((function(e){return t.isParsable(e)})).reduce((function(t,e){var n=e.path.split("/").slice(0,-1).join("/");return t.includes(n)||t.push(n),t}),[])}},{key:"parse",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.pluginData.components=[],this.pluginData.variables=[];var i=new Et(this.pluginData),o=null!=t&&t.path&&0!==t.path.length?"".concat(t.path,"/"):"",s=new RegExp("^".concat(o,"[^/]+\\.tf$"));n.filter((function(t){var e=t.path;return s.test(e)})).filter((function(t){var n=t.content,i=t.path;return!(!n||""===n.trim())||(e.pluginData.emitEvent({parent:r,type:"Parser",action:"read",status:"warning",files:[i],data:{code:"no_content",global:!1}}),!1)})).forEach((function(t){var n=e.pluginData.emitEvent({parent:r,type:"Parser",action:"read",status:"running",files:[t.path],data:{global:!1}});i.currentFile=t;var o=new K.InputStream(t.content),s=new Dt(o),a=new K.CommonTokenStream(s),c=new Zt(a);c.buildParseTrees=!0;var u=c.file_();K.tree.ParseTreeWalker.DEFAULT.walk(i,u),e.pluginData.emitEvent({id:n,status:"success"})}))}}])}(t.DefaultParser);const Ue=Fe;var ze=n(326),Ve=n.n(ze);const Ke={root:"".concat("{% macro displayAttributeValue(attribute, value, level) %}\n{% if attribute.isVariable %}{{ value | dump | indent(level * 4, true) }},\n{% elif attribute.definition.type == 'Link' %}{{ attribute.definition.linkRef | indent(level * 4, true) }}.{{ getExternalId(value) }}.{{attribute.definition.linkAttribute}},\n{% elif isValueReference(value) %}{{ value | indent(level * 4, true) }},\n{% else %}{{ value | dump | indent(level * 4, true) }},\n{% endif %}\n{% endmacro %}\n",'{% include "local" ignore missing %}\n{% include "block" ignore missing %}\n{% include "variable" ignore missing %}\n{% include "output" ignore missing %}\n'),block:"{% for _block in components %}\n{{ _block.definition.blockType }} {% if ['resource','data'].includes(_block.definition.blockType) %}\"{{ _block.definition.type }}\" {% endif %}{% if ['provider', 'module'].includes(_block.definition.blockType) %}\"{{ _block.definition.type }}\"{% else %}\"{{ _block.externalId }}\"{% endif %} {\n{% for attribute in _block.attributes %}{% set level = 1 %}\n{% include \"attribute\" ignore missing %}\n{% endfor %}\n}\n\n{% endfor %}",attribute:"{% if attribute.type == 'Object' %}\n{{ attribute.name | indent(level * 4, true) }} {% if not attribute.isDynamic %}= {% endif %}{\n{% set level = level+1 %}{% for attr in attribute.value %}{% set attribute = attr %}\n{% include \"attribute\" ignore missing %}\n{% set attribute = attr %}\n{% endfor %}{% set level = level-1 %}\n{{ \"}\" | indent(level * 4, true) }}\n{% else %}\n{{ attribute.name | indent(level * 4, true) }} = {% if attribute.type == 'Array' or attribute.type == 'Link' %}[\n{% set level = level+1 %}{% for value in attribute.value %}\n{% call displayAttributeValue(attribute, value, level) -%}{%- endcall %}\n{% endfor %}{% set level = level-1 %}\n{{ \"]\" | indent(level * 4, true) }}\n{% else %}\n{% if attribute.isVariable %}{{ attribute.value }}\n{% elif attribute.definition.type == 'Reference' %}{{ attribute.definition.containerRef }}.{{ getExternalId(attribute.value) }}\n{% elif attribute.type == 'Boolean' or attribute.type == 'Number' or attribute.name == 'user_data' %}{{ attribute.value }}\n{% elif attribute.type == 'String' and isValueReference(attribute.value) %}{{ attribute.value }}\n{% else %}{{ attribute.value | dump }}\n{% endif %}\n{% endif %}\n{% endif %}\n",variable:'{% for variable in variables %}\nvariable {{ variable.name | dump }} {\n{% set level = 1 %}\n{% if variable.defaultValue %}{{ "default" | indent(level * 4, true) }} = {% if isList(variable.type) %}[\n{% set level = level+1 %}{% for val in variable.defaultValue %}\n{{ val | dump | indent(level * 4, true) }},\n{% endfor %}\n{% set level = level-1 %}{{ "]" | indent(level * 4, true) }}\n{% else %}{{ variable.defaultValue | dump }}\n{% endif %}\n{% endif %}\n{% if variable.type %}{{ "type" | indent(level * 4, true) }} = {{ variable.type }}\n{% endif %}\n{% if variable.description %}{{ "description" | indent(level * 4, true) }} = {{ variable.description | dump }}\n{% endif %}\n{% if variable.sensitive %}{{ "sensitive" | indent(level * 4, true) }} = {{ variable.sensitive }}\n{% endif %}\n{% if variable.nullable %}{{ "nullable" | indent(level * 4, true) }} = {{ variable.nullable }}\n{% endif %}\n}\n\n{% endfor %}\n',output:'{% for output in outputs %}\noutput {{ output.name | dump }} {\n{% set level = 1 %}\n{% if isList(output.type) %}\n{{ "value = [" | indent(level * 4, true) }}\n{% for val in output.value %}\n{% set level = level+1 %}\n{% set argType = getListType(output.type) %}\n{% if argType == \'number\' or argType == \'bool\' or isValueReference(val) %}\n{{ val | dump | indent(level * 4, true) }},\n{% else %}\n{{ val | dump | indent(level * 4, true) }},\n{% endif %}\n{% set level = level-1 %}\n{% endfor %}{{ "]" | indent(level * 4, true) }}\n{% else %}\n{{ "value = " | indent(level * 4, true) }}{% if output.type == \'number\' or output.type == \'bool\' or isValueReference(output.value) %}\n{{ output.value }}\n{% else %}\n{{ output.value | dump }}\n{% endif %}\n{% endif %}\n{% if output.description %}{{ "description" | indent(level * 4, true) }} = {{ output.description | dump }}\n{% endif %}\n{% if output.sensitive %}{{ "sensitive" | indent(level * 4, true) }} = {{ output.sensitive }}\n{% endif %}\n}\n\n{% endfor %}\n',local:'{% if locals.length > 0 %}\nlocals {\n{% set level = 1 %}\n{% for local in locals %}\n{% if local.value %}{{ local.name | indent(level * 4, true) }} = {% if isList(local.type) %}[\n{% set level = level+1 %}{% for val in local.value %}\n{{ val | dump | indent(level * 4, true) }},\n{% endfor %}\n{% set level = level-1 %}{{ "]" | indent(level * 4, true) }}\n{% else %}{{ local.value | dump }}\n{% endif %}\n{% endif %}\n{% endfor %}{% set level = level-1 %}\n{% set level = 0 %}}\n\n{% endif %}\n'};function He(t){return He="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},He(t)}function qe(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:null,e=this.pluginData.components.reduce((function(t,e){return t.has(e.path)?t.get(e.path).push(e):t.set(e.path,[e]),t}),new Map),n=this.pluginData.variables.reduce((function(t,e){return t.has(e.path)?t.get(e.path).push(e):t.set(e.path,[e]),t}),new Map);return this.generateFiles(e,n,t)}},{key:"generateFiles",value:function(e,n,r){var i=this,o=[];return(0===e.size?n:e).forEach((function(s,a){var c=i.pluginData.emitEvent({parent:r,type:"Render",action:"write",status:"running",files:[a],data:{global:!1}}),u=(null==n?void 0:n.get(a))||[],l=(null==e?void 0:e.get(a))||[];o.push(new t.FileInput({path:a,content:"".concat(i.template.render({components:l,variables:u.filter((function(t){return"variable"===t.category})),locals:u.filter((function(t){return"local"===t.category})),outputs:u.filter((function(t){return"output"===t.category})),getExternalId:function(t){var e;return null===(e=i.pluginData.getComponentById(t))||void 0===e?void 0:e.externalId},isValueReference:function(t){return null==t?void 0:t.match(/^(data.|var.|local.|module.|aws_|random_)/)},isList:function(t){return(null==t?void 0:t.startsWith("list("))||(null==t?void 0:t.startsWith("set("))},getListType:function(t){return t.split(/\(([^)]+)\)/)[1]}}).trim(),"\n")})),i.pluginData.emitEvent({id:c,status:"success"})})),o}}])}(t.DefaultRender);const Je=Ze,Qe={name:"terraform",languageSettings:{id:"terraform",extensions:[".tf"],aliases:["Terraform","terraform"],mimetypes:["string"]},languageConfiguration:{comments:{lineComment:"#",blockComment:["/*","*/"]},brackets:[["(",")"],["{","}"],["[","]"]],colorizedBracketPairs:[["(",")"],["{","}"],["[","]"]],autoClosingPairs:[{open:"(",close:")"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"'",close:"'",notIn:["string"]},{open:'"',close:'"',notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'"},{open:'"',close:'"'}]},tokenProvider:{keywords:["provider","resource","data","variable","output","locals","module","for_each","if","else","true","false","null"],operators:["+","+=","-","-=","*","*=","/","/=","%","%=","==","!=","<","<=",">",">=","=","||","&&","!"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}],[/\d*\.\d+([eE][-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],comment:[[/[^/*]+/,"comment"],[/\/\*/,"comment","@push"],["\\*/","comment","@pop"],[/[/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"],[/#.*$/,"comment"]]}}};function tn(t){return tn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tn(t)}function en(t,e,n){return e=rn(e),function(t,e){if(e&&("object"==tn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,nn()?Reflect.construct(e,n||[],rn(t).constructor):e.apply(t,n))}function nn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(nn=function(){return!!t})()}function rn(t){return rn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},rn(t)}function on(t,e){return on=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},on(t,e)}var sn=function(e){function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),en(this,n,[{editor:{syntax:Qe},tags:[new t.Tag({type:"language",value:"Terraform"}),new t.Tag({type:"category",value:"Infrastructure"})],extraResources:[{type:"markers",name:"startLinkMarker"},{type:"markers",name:"endLinkMarker"},{type:"links",name:"defaultLink"},{type:"links",name:"temporaryLink"},{type:"icons",name:"error"},{type:"icons",name:"menu"},{type:"icons",name:"resize"}],container:{margin:15,gap:50},defaultFileName:"new_file.tf",defaultFileExtension:"tf"}])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&on(t,e)}(n,e),function(t,e,n){return Object.defineProperty(t,"prototype",{writable:!1}),t}(n)}(t.DefaultConfiguration);const an=sn;function cn(t){return cn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cn(t)}function un(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n0&&void 0!==arguments[0]?arguments[0]:{event:null};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=new an,r=new gn(n,{name:Un.UU,version:Un.rE},t.event);return Vn(this,e,[{pluginData:r,pluginDrawer:new Fn(r),pluginMetadata:new B(r),pluginParser:new Ue(r),pluginRenderer:new Je(r),configuration:n}])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qn(t,e)}(e,t),function(t,e,n){return Object.defineProperty(t,"prototype",{writable:!1}),t}(e)}(t.DefaultPlugin);const Gn=Wn})();var i=exports;for(var o in r)i[o]=r[o];r.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})(); \ No newline at end of file diff --git a/dist/terrator-plugin.js.LICENSE.txt b/dist/terrator-plugin.js.LICENSE.txt index 98729fa..7cbae2e 100644 --- a/dist/terrator-plugin.js.LICENSE.txt +++ b/dist/terrator-plugin.js.LICENSE.txt @@ -1,5 +1,3 @@ /*! Browser bundle of nunjucks 3.2.4 */ /*! For license information please see leto-modelizer-plugin-core.js.LICENSE.txt */ - -/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ diff --git a/package-lock.json b/package-lock.json index 7545a74..5622d4b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "terrator-plugin", - "version": "0.8.1", + "version": "0.9.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "terrator-plugin", - "version": "0.8.1", + "version": "0.9.0", "license": "Mozilla Public License 2.0", "dependencies": { "antlr4": "=4.13.1", diff --git a/package.json b/package.json index 63f0dbe..baf308b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "terrator-plugin", - "version": "0.8.1", + "version": "0.9.0", "description": "Terraform plugin for Leto-Modelizer.", "main": "dist/terrator-plugin.js", "exports": "./dist/terrator-plugin.js",