@werckmeister/components 1.1.6-141 → 1.1.6-143
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/werckmeister-components.js +5 -5
- package/werckmeister.js +1 -1
- package/werckmeister.wasm +0 -0
|
@@ -39,15 +39,15 @@ var define;
|
|
|
39
39
|
var t;parcelRequire=function(e,n,r,i){var o,a="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function c(t,r){if(!n[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!r&&i)return i(t,!0);if(a)return a(t,!0);if(u&&"string"==typeof t)return u(t);var o=new Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o}f.resolve=function(n){return e[t][1][n]||n},f.cache={};var s=n[t]=new c.Module(t);e[t][0].call(s.exports,f,s,s.exports,this)}return n[t].exports;function f(t){return c(f.resolve(t))}}c.isParcelRequire=!0,c.Module=function(t){this.id=t,this.bundle=c,this.exports={}},c.modules=e,c.cache=n,c.parent=a,c.register=function(t,n){e[t]=[function(t,e){e.exports=n},{}]};for(var s=0;s<r.length;s++)try{c(r[s])}catch(e){o||(o=e)}if(r.length){var f=c(r[r.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=f:"function"==typeof t&&t.amd&&t(function(){return f})}if(parcelRequire=c,o)throw o;return c}({sarP:[function(t,e,n){!function(t){var e={"&":"&","<":"<",">":">","'":"'",""":'"'};function r(t){return t&&t.replace(/^\s+|\s+$/g,"")}function i(t){return t.replace(/(&(?:lt|gt|amp|apos|quot|#(?:\d{1,6}|x[0-9a-fA-F]{1,5}));)/g,function(t){if("#"===t[1]){var n="x"===t[2]?parseInt(t.substr(3),16):parseInt(t.substr(2),10);if(n>-1)return String.fromCharCode(n)}return e[t]||t})}function o(t,e,n){if(void 0!==n){var r=t[e];r instanceof Array?r.push(n):t[e]=e in t?[r,n]:n}}("object"==typeof n&&n||{}).fromXML=function(t,e){return function t(e,n){if("string"==typeof e)return e;var a=e.r;if(a)return a;var u,c=function(t,e){if(t.t){for(var n,a,u=t.t.split(/([^\s='"]+(?:\s*=\s*(?:'[\S\s]*?'|"[\S\s]*?"|[^\s'"]*))?)/),c=u.length,s=0;s<c;s++){var f=r(u[s]);if(f){n||(n={});var l=f.indexOf("=");if(l<0)f="@"+f,a=null;else{a=f.substr(l+1).replace(/^\s+/,""),f="@"+f.substr(0,l).replace(/\s+$/,"");var p=a[0];p!==a[a.length-1]||"'"!==p&&'"'!==p||(a=a.substr(1,a.length-2)),a=i(a)}e&&(a=e(f,a)),o(n,f,a)}}return n}}(e,n),s=e.f,f=s.length;if(c||f>1)u=c||{},s.forEach(function(e){"string"==typeof e?o(u,"#",e):o(u,e.n,t(e,n))});else if(f){var l=s[0];if(u=t(l,n),l.n){var p={};p[l.n]=u,u=p}}else u=e.c?null:"";return n&&(u=n(e.n||"",u)),u}(function(t){for(var e=String.prototype.split.call(t,/<([^!<>?](?:'[\S\s]*?'|"[\S\s]*?"|[^'"<>])*|!(?:--[\S\s]*?--|\[[^\[\]'"<>]+\[[\S\s]*?]]|DOCTYPE[^\[<>]*?\[[\S\s]*?]|(?:ENTITY[^"<>]*?"[\S\s]*?")?[\S\s]*?)|\?[\S\s]*?\?)>/),n=e.length,o={f:[]},a=o,u=[],c=0;c<n;){var s=e[c++];s&&h(s);var f=e[c++];f&&l(f)}return o;function l(t){var e=t.length,n=t[0];if("/"===n)for(var r=t.replace(/^\/|[\s\/].*$/g,"").toLowerCase();u.length;){var i=a.n&&a.n.toLowerCase();if(a=u.pop(),i===r)break}else if("?"===n)p({n:"?",r:t.substr(1,e-2)});else if("!"===n)"[CDATA["===t.substr(1,7)&&"]]"===t.substr(-2)?h(t.substr(8,e-10)):p({n:"!",r:t.substr(1)});else{var o=function(t){var e={f:[]},n=(t=t.replace(/\s*\/?$/,"")).search(/[\s='"\/]/);return n<0?e.n=t:(e.n=t.substr(0,n),e.t=t.substr(n)),e}(t);p(o),"/"===t[e-1]?o.c=1:(u.push(a),a=o)}}function p(t){a.f.push(t)}function h(t){(t=r(t))&&p(i(t))}}(t),e)}}()},{}],ol4r:[function(t,e,n){"use strict";function r(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=i(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return u=t.done,t},e:function(t){c=!0,a=t},f:function(){try{u||null==n.return||n.return()}finally{if(c)throw a}}}}function i(t,e){if(t){if("string"==typeof t)return o(t,e);var n=Object.prototype.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)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function c(t,e,n){return e&&u(t.prototype,e),n&&u(t,n),t}Object.defineProperty(n,"__esModule",{value:!0}),n.DocParser=n.parseCommandDbJson=void 0;var s=t("from-xml"),f="https://werckme.github.io",l=function(){function t(e){a(this,t),this.rawObject=e}return c(t,[{key:"getName",value:function(){return(this.rawObject||{})["@name"]}},{key:"getIsOptional",value:function(){return"1"===(this.rawObject||{})["@optional"]}},{key:"getType",value:function(){return(this.rawObject||{})["@type"]}},{key:"getDescription",value:function(){var t=(this.rawObject||{})["#"];return t&&t.join?t.join("\n"):t}},{key:"getIsDeprecated",value:function(){return(this.rawObject||{})["@deprecated"].length>0}},{key:"getDeprecatedText",value:function(){return(this.rawObject||{})["@deprecated"]}}]),t}(),p=function(){function t(e){a(this,t),this.rawObject=e}return c(t,[{key:"getDocumentContext",value:function(){var t,e,n=((null===(e=null===(t=this.rawObject)||void 0===t?void 0:t.doc)||void 0===e?void 0:e.command)||{})["@where"];return n?n.split(",").map(function(t){return t.trim()}):[]}},{key:"getName",value:function(){var t,e;return((null===(e=null===(t=this.rawObject)||void 0===t?void 0:t.doc)||void 0===e?void 0:e.command)||{})["@name"]}},{key:"getUrl",value:function(){return"https://werckme.github.io/manual#".concat(this.getName())}},{key:"getDescription",value:function(){var t,e,n=((null===(e=null===(t=this.rawObject)||void 0===t?void 0:t.doc)||void 0===e?void 0:e.command)||{})["#"];return n&&n.join&&(n=n.join("\n")),n}},{key:"getParameter",value:function(){var t,e,n=null===(e=null===(t=this.rawObject)||void 0===t?void 0:t.doc)||void 0===e?void 0:e.param;return n?(Array.isArray(n)||(n=[n]),(n||[]).map(function(t){return new l(t)})):[]}}]),t}();n.parseCommandDbJson=function(t){var e={},n=JSON.parse(t);for(var r in n)e[r]=new p(n[r].rawObject);return e};var h=function(){function t(){a(this,t),this.commandDb={}}return c(t,[{key:"getDocComment",value:function(t,e){var n,i=[],o=!1,a=r(t.split("\n"));try{for(a.s();!(n=a.n()).done;){var u=n.value,c=u.trim().startsWith(e);if(!o&&c&&(o=!0),o&&!c)break;c&&i.push(u.replace(e,"").trim())}}catch(p){a.e(p)}finally{a.f()}return i.join("\n")}},{key:"normalizeText",value:function(t){return t.replace(/(\[.*\])\(\s*\/{0,1}manual(.*)\)/g,"$1(".concat(f,"/manual$2)")).replace(/(\[.*\])\((?!(\s*http|\s*https|\s*ftp))\s*(.*)\)/g,"$1(".concat(f,"/manual$3)")).replace(/\\n/g,"")}},{key:"parseDocumentText",value:function(t){t=this.normalizeText(t);var e=s.fromXML("<doc>".concat(t,"</doc>")),n=new p(e),r=n.getName();r&&(this.commandDb[r]=n)}},{key:"parseLua",value:function(t){t=this.normalizeText(t);var e=this.getDocComment(t,"--");e&&this.parseDocumentText(e)}},{key:"parseHpp",value:function(t){t=this.normalizeText(t);var e=this.getDocComment(t,"///");e&&this.parseDocumentText(e)}}]),t}();n.DocParser=h},{"from-xml":"sarP"}],f88W:[function(t,e,n){},{}],Y3F9:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getPreInstalledAuxFiles=n.getAutoHintDb=void 0;var r=t("./parser/docParser"),i=(t("fs"),r.parseCommandDbJson('{"device":{"rawObject":{"doc":{"command":{"@name":"device","@where":"document","#":"Defines a device which can be used when adding instruments (see [instrumentDef](https://werckme.github.io/manual#instrumentDef))\\nsee [instrumentDef](https://werckme.github.io/manual#instrumentDef), [instrument](https://werckme.github.io/manual#instrument)\\n#### example\\ndefine an device, an instrument and assign it to a track.\\n```\\ndevice: MyDevice midi 0;\\ninstrumentDef: organ _onDevice=MyDevice _ch=0 _pc=16;\\n[\\ninstrument: organ;\\n{\\nc d e f\\n}\\n]\\n```\\n**Fluidsynth**\\nIf you want to use [fluidSynth](http://www.fluidsynth.org) as output device, you can achieve this with a command like this:\\n`device: MyDevice fluidSynth _useFont=\\"PATH OF A SOUNDFONT FILE\\";`\\nOn mac, make sure that you have fluidsynth installed."},"param":[{"@name":"setName","@position":"0","@type":"text","#":"An arbitary name."},{"@name":"isType","@position":"1","@type":"[midi,fluidSynth]","#":"The type of the device."},{"@name":"usePort","@position":"2","@type":"0..N","#":"The midi port id of your device. You can get a list of your connected devices, by executing `sheetp --list`"},{"@name":"withOffset","@position":"","@optional":"1","@type":"0..N","#":"Defines an offset in milliseconds. Can be used to keep different devices in sync."},{"@name":"useFont","@position":"","@optional":"1","@type":"a file path","#":"Only valid if isType=`fluidsynth`. Sets the location of the soundfont file, which will be used by FluidSynth"}]}}},"instrumentConf":{"rawObject":{"doc":{"command":{"@name":"instrumentConf","@where":"document","#":"With `instrumentConf` you are able to setup a specific instrument.\\nFollowing settings can be applied:\\n* volume\\n* pan\\n* voicing strategy\\n* mod\\n* velocity remap\\n#### examples\\n##### mixed settings\\n`instrumentConf: piano volume 100 pan 50;`\\n##### setup a mod\\n`instrumentConf: piano mod myLuaMod someValue; --the `someValue` argument belongs to \\"myLuaMod\\"`\\n##### setup a velocity remap\\nWith `remapVelocity` you are able to change the velocity values behind `ppppp..fffff` for a specific instrument.\\nIn the example below the velocity for `p` will be set to 100 and the value for `f` will be set to 10.\\nThe value range is 0..100. (100=127 Midi velocity)\\n`instrumentConf: _set=remapVelocity _p=100 _f=10;`"},"param":{"@name":"for","@position":"0","#":"The name of the target instrument. This is the only \\"unique\\" parameter for this command. All further parameters are specific to its related setting."}}}},"mod":{"rawObject":{"doc":{"command":{"@name":"mod","@where":"voice","#":"Adds a modification to the track. Every `mod` statement adds a further modification to the related voice.\\nIf you want to use ony one modification at the time use [do](https://werckme.github.io/manual#do) instead.\\n#### examples\\n`/mod: arpeggio/`\\nMods can be external lua scripts, or one of these internal mods:\\n##### Bend\\nPerforms a pitch bend from or to the pitch of a note. The value range is 0..100 where 50 means the pichbend center.\\n```language=Werckmeister,type=single,tempo=140\\n/doOnce: bend _from=0/ c1 | /doOnce: bend _to=0/ c1\\n```\\n##### Arpeggio\\nPerforms an arpeggio over a given chord.\\n**Arpeggio is deprecated. Use the lua mod [myArpeggio](https://werckme.github.io/manual#myarpeggio) instead.**"},"param":{"@name":"use","@position":"0","@type":"text","#":"The name of the modification to load. This is the only \\"unique\\" parameter for this command. All further parameters are specific to its related modification."}}}},"modOnce":{"rawObject":{"doc":{"command":{"@name":"modOnce","@where":"voice","#":"Like [mod](https://werckme.github.io/manual#mod). But with the difference, that the loaded mod will be only executed once for the following event.\\n#### examples\\n`/modOnce: arpeggio/`"},"param":{"@name":"use","@position":"0","@type":"text","#":"The name of the modification to load. This is the only \\"unique\\" parameter for this command. All further parameters are specific to its related modification."}}}},"cue":{"rawObject":{"doc":{"command":{"@name":"cue","@where":"voice","#":"adds a cue MIDI meta message to the corresponding midi track\\n#### examples\\n`/cue: cueText/`\\n> If a cue was visited several times during a repeat or jump an additional repeat index will be added.\\n> For example:\\n> `/cue: myCue/ c d e f :|` will create two cue MIDI messages: \\"myCue\\" and \\"myCue1\\"\\n>"},"param":{"@name":"text","@type":"text","#":"the text which appears in the MIDI message"}}}},"instrumentSection":{"rawObject":{"doc":{"command":{"@name":"instrumentSection","@where":"document","#":["Layers arbitrary instruments into one.\\nsee [instrumentDef](#instrumentDef), [instrument](https://werckme.github.io/manual#instrument), [device](https://werckme.github.io/manual#device)\\n#### example\\ncreate 3 instruments and assign them to the section `myNewInstrument`.","```language=Werckmeister\\ntempo: 120;\\ndevice: MyDevice midi _usePort=0;\\ninstrumentDef:piano _onDevice=MyDevice _ch=0 _pc=0;\\ninstrumentDef:guitar _onDevice=MyDevice _ch=1 _pc=29;\\ninstrumentDef:organ _onDevice=MyDevice _ch=2 _pc=16;\\ninstrumentSection: myNewInstrument piano guitar organ;\\n\\n[\\ninstrument: myNewInstrument;\\n{\\na,,1 | a, | d#,~ | &\\n}\\n]\\n```"]},"param":{"@name":"setName","@position":"0","@type":"text","#":"An arbitary name."}}}},"instrumentDef":{"rawObject":{"doc":{"command":{"@name":"instrumentDef","@where":"document","#":"Adds a new MIDI instrument.\\nsee [instrument](https://werckme.github.io/manual#instrument), [device](https://werckme.github.io/manual#device)\\n#### example\\ndefine an device, an instrument and assign it to a track.\\n```\\ndevice: MyDevice midi 0;\\ninstrumentDef: organ _onDevice=MyDevice _ch=0 _pc=16;\\n[\\ninstrument: organ;\\n{\\nc d e f\\n}\\n]\\n```"},"param":[{"@name":"setName","@position":"0","@type":"text","#":"An arbitary name."},{"@name":"onDevice","@position":"1","@type":"text","#":"The device which to use (The name of the device, see [device](https://werckme.github.io/manual#device))."},{"@name":"ch","@position":"2","@type":"0..15","#":"The MIDI channel."},{"@name":"bankMsb","@position":"3","@type":"0..127","#":"A MIDI `bank select MSB` value."},{"@name":"pc","@position":"4","@type":"0..127","#":"A MIDI `program change` value."},{"@name":"bankLsb","@type":"0..127","#":"A MIDI `bank select LSB` value."},{"@name":"cc","@type":"0..127","@deprecated":"use bankMsb instead","#":"A MIDI `bank select MSB. Deprecated use bankMsb instead` value."}]}}},"fill":{"rawObject":{"doc":{"command":{"@name":"fill","@where":"accomp","#":["Plays a template only once. Is also able to replace the performance of another template during its playback.\\nUseful for fill ins.","```language=Werckmeister\\nusing \\"chords/default.chords\\";\\ntempo: 90;\\ndevice: MyDevice midi _usePort=0;\\ninstrumentDef:drums _onDevice=MyDevice _ch=9 _pc=0;\\n\\n[\\ntype: template;\\nname: drums.fill;\\ninstrument: drums;\\n{\\n(c, & &)4 (b,, & &)4 (a,, & &)4 (g,, & &)4 |\\n}\\n]\\n\\n[\\ntype: template;\\nname: drums.main;\\ninstrument: drums;\\n{\\nr8 f#,, r & r & r & |\\n}\\n{\\nr4 d,, r4 & |\\n}\\n{\\nc,,4 r & r |\\n}\\n]\\n\\n[\\ntype: accomp;\\n{\\n/template: drums.main/\\nC |\\n/fill: drums.fill/ -- play fill and drum beat together\\nC | C |\\n/fill: drums.fill _replace=\\"drums.main\\"/ -- play only the fill in\\nC | C |\\n}\\n]\\n```"]},"param":{"@name":"replace","@type":"text","#":"the name of the template to be replaced by the fill"}}}},"jump":{"rawObject":{"doc":{"command":{"@name":"jump","@where":"voice","#":["Jumps to a previous defined mark See [mark](https://werckme.github.io/manual/#mark).\\n#### example","```language=Werckmeister\\ndevice: _usePort=0 _setName=MyDevice _isType=midi;\\ninstrumentDef: _setName=piano _onDevice=MyDevice _ch=0 _pc=1 _cc=8;\\n[\\ninstrument: piano;\\n{\\n/signature: 5 4/\\n/mark: A/ -- valid & unique to this voice\\nc4 d e f g |\\n/jump: A/ -- jumps to A once\\na b c\'2\\n}\\n]\\n```"]},"param":[{"@name":"to","@position":"0","@type":"text","#":"the destination marker"},{"@name":"ignore","@position":"","@optional":"1","@type":"0..100","#":"Ignores the jump N times"},{"@name":"repeat","@position":"","@optional":"1","@type":"0..100","#":"Repeats the jump N times. (A repeat value of 1 performs 2 jumps)"}]}}},"mark":{"rawObject":{"doc":{"command":{"@name":"mark","@where":"voice","#":["adds a mark to the voice. Us it in combination with [jump](https://werckme.github.io/manual/#jump).\\n#### examples","```language=Werckmeister\\ndevice: _usePort=0 _setName=MyDevice _isType=midi;\\ninstrumentDef: _setName=piano _onDevice=MyDevice _ch=0 _pc=1 _cc=8;\\n[\\ninstrument: piano;\\n{\\n/signature: 5 4/\\n/mark: A/ -- valid & unique to this voice\\nc4 d e f g |\\n/jump: A/ -- jumps to A once\\na b c\'2\\n}\\n]\\n```"]},"param":{"@name":"name","@position":"0","@type":"word","#":"the name of the mark"}}}},"fade":{"rawObject":{"doc":{"command":{"@name":"fade","@where":"voice","#":"Fades the volume over a given duration in quarters.\\n#### example\\n```language=Werckmeister,type=full\\ndevice: myDevice midi _usePort=0;\\ninstrumentDef: organ myDevice _ch=0 _pc=16;\\ntempo: 75;\\n[\\ninstrument: organ;\\n{\\n\\\\fff\\n/fade: _from=0 _to=100 _duration=4/\\nc1 |\\n/fade: _from=0 _to=100 _duration=4 _curve=\\"quad\\"/\\nc1 |\\n/fade: _from=0 _to=100 _duration=4 _curve=\\"cub\\"/\\nc1 |\\n/fade: _from=0 _to=100 _duration=4 _curve=\\"quart\\"/\\nc1 |\\n/fade: _from=0 _to=100 _duration=4 _curve=\\"quint\\"/\\nc1 |\\n/fade: _from=0 _to=100 _duration=4 _curve=\\"exp\\"/\\nc1 |\\n}\\n]\\n```\\n"},"param":[{"@name":"duration","@position":"0","@type":"0..N","#":"the duration in quarters."},{"@name":"from","@position":"1","@default":"0","@type":"0..100","#":"The source volume value."},{"@name":"to","@position":"2","@default":"100","@type":"0..100","#":"The target volume value."},{"@name":"curve","@position":"3","@default":"lin","@type":"lin,quad,cub,quart,quint,exp","#":"The fade curve type."}]}}},"instrument":{"rawObject":{"doc":{"command":{"@name":"instrument","@where":"track, voice","#":"Set or change the instrument of a track.\\n#### examples\\n**set an instrument for a track**\\n```\\n[\\ninstrument: myInstrument;\\n{\\nc d e f\\n}\\n]\\n```\\n**change current instrument within a track**\\n```\\n[\\n{\\nc d e f |\\n/instrument: myOtherInstrument/\\nc d e f\\n}\\n]\\n```"},"param":{"@name":"use","@position":"0","@type":"text","#":"The instrument name."}}}},"pan":{"rawObject":{"doc":{"command":{"@name":"pan","@where":"voice","#":"set the pan of the current track\\n#### example\\n`/pan: 50/`"},"param":{"@name":"to","@position":"0","@type":"0..100","#":"The pan value. Where 50 means the center"}}}},"signature":{"rawObject":{"doc":{"command":{"@name":"signature","@where":"voice","#":"Set the time signature of the current track.\\n#### example\\n`/signature: 3 4/`"},"param":[{"@name":"upper","@position":"0","#":"The upper value of the signature."},{"@name":"lower","@position":"1","#":"The lower value of the signature."}]}}},"do":{"rawObject":{"doc":{"command":{"@name":"do","@where":"voice","#":"Such as [mod](https://werckme.github.io/manual#mod) `do` adds a modification to the track.\\nThe difference is: every `mod` command adds a further modification to a voice.\\n`do` replaces the previous modification.\\n#### example\\n`/do: arpeggio/`"},"param":{"@name":"use","@position":"0","@type":"text","#":"The name of the modification to load. This is the only \\"unique\\" parameter for this command. All further parameters are specific to its related modification."}}}},"doOnce":{"rawObject":{"doc":{"command":{"@name":"doOnce","@where":"voice","#":"Like [do](https://werckme.github.io/manual#do). But with the difference, that the loaded mod will be only executed once for the following event.\\n#### example\\n`/doOnce: arpeggio/`"},"param":{"@name":"use","@position":"0","@type":"text","#":"The name of the modification to load. This is the only \\"unique\\" parameter for this command. All further parameters are specific to its related modification."}}}},"tempo":{"rawObject":{"doc":{"command":{"@name":"tempo","@where":"document, track","#":"`tempo` defines or changes the current tempo.\\n#### example\\n`tempo: 120;`\\nIt is also possible to set different tempo values for several tracks:\\n[see here](https://werckme.github.io/manual#tempo)"},"param":{"@name":"bpm","@position":"0","#":"The tempo bpm value."}}}},"voicingStrategy":{"rawObject":{"doc":{"command":{"@name":"voicingStrategy","@where":"voice","#":"Adds a modification to the track.\\n#### example\\n`/voicingStrategy: asNotated/`\\nVoicing strategies can be external lua scripts, or one of these internal strategies:\\n* asNotated\\n* simpleGuitar"},"param":{"@name":"use","@position":"0","@type":"text","#":"The name of the strategy to load. This is the only \\"unique\\" parameter for this command. All further parameters are specific to its related strategy."}}}},"volume":{"rawObject":{"doc":{"command":{"@name":"volume","@where":"voice","#":"set the volume of the current instrument\\n#### examples\\n`/volume: 50/`"},"param":{"@name":"to","@position":"0","@type":"0..100","#":"The volume value."}}}},"drumRudiments":{"rawObject":{"doc":{"command":{"@name":"drumRudiments","@where":"mod","@using":"lua/mod/drumRudiments.lua","#":"Implements a collection of different drum rudiments. ([see Wikipedia](https://en.wikipedia.org/wiki/Drum_rudiment))\\nYou can specify which notes are for `L` and `R` and performing duration.\\nThis will be achieved by using an chord as source material.\\nThe chord pitches will be used for `L` and `R`.\\nThe length of the chord event defines over which time the rudiment will be peformed.\\nAn event tag specifies which rudiment will be performed.\\nFor example:\\nThis plays one paradiddle over a length of 1 quarter\\nusing `sn1` for R and `sn2` for L:\\n```\\n/mod: drumRudiments/\\nR L\\n\\"paradiddle\\"@<\\"sn1\\" \\"sn2\\">4\\n```\\nExamples:\\n**a single paradiddle**\\n```language=Werckmeister\\nusing \\"lua/mods/drumRudiments.lua\\";\\ntempo: 150;\\ndevice: MyDevice midi 0;\\ninstrumentDef:piano MyDevice _ch=0 _pc=118;\\n[\\ninstrument: piano;\\n{\\n/mod: drumRudiments/\\n-- a paradiddle (RLRR) with c\' for R and c for L\\n\\"paradiddle\\"@<c\' c>1\\n}\\n]\\n```\\n**repeating**\\n```language=Werckmeister\\nusing \\"lua/mods/drumRudiments.lua\\";\\ntempo: 120;\\ndevice: MyDevice midi 0;\\ninstrumentDef:piano MyDevice _ch=0 _pc=118;\\n[\\ninstrument: piano;\\n{\\n/mod: drumRudiments/\\n-- performs 4 paradiddles (RLRR LRLL RLRR LRLL) with c\' for R and c for L\\n\\"4x paradiddle\\"@<c\' c>1\\n}\\n]\\n```\\n**orchestration**\\nIf you want to orchestrate a rudiment over a drum set,\\nyou are able to define more R & L notes. *(The total number of the notes has to be even.)*\\n```language=Werckmeister\\nusing \\"lua/mods/drumRudiments.lua\\";\\ntempo: 120;\\ndevice: MyDevice midi 0;\\ninstrumentDef:piano MyDevice _ch=0 _pc=118;\\n[\\ninstrument: piano;\\n{\\n/mod: drumRudiments/\\n-- performs 4 paradiddles (RLRR LRLL RLRR LRLL) with\\n-- c\' for R1 and c for L1\\n-- and c, for R2 and c,, for L2.\\n-- The final sequence will be: c\'(R1) c(L1) c,(R2) c,,(R1) ...\\n\\"4x paradiddle\\"@<c\' c c, c,,>1\\n}\\n]\\n```\\n**Supported Rudiments**\\n<ul style=\\"font-size: 0.9em;\\">\\n<li>singleStrokeRoll</li>\\n<li>doubleStrokeRoll</li>\\n<li>trippleStrokeRoll</li>\\n<li>fiveStrokeRoll</li>\\n<li>singleStrokeFour</li>\\n<li>singleStrokeSeven</li>\\n<li>multipleBounceRoll</li>\\n<li>sixStrokeRoll</li>\\n<li>sevenStrokeRoll</li>\\n<li>nineStrokeRoll</li>\\n<li>tenStrokeRoll</li>\\n<li>elevenStrokeRoll</li>\\n<li>thirteenStrokeRoll</li>\\n<li>fifteenStrokeRoll</li>\\n<li>seventeenStrokeRoll</li>\\n<li>paradiddle</li>\\n<li>doubleParadiddle</li>\\n<li>trippleParadiddle</li>\\n<li>paradiddlediddle</li>\\n<li>flam</li>\\n<li>flamAccent</li>\\n<li>flamTap</li>\\n<li>flamacue</li>\\n<li>flamParadiddle</li>\\n<li>singleFlammedMill</li>\\n<li>pataflafla</li>\\n<li>swissArmytriplet</li>\\n<li>invertedFlamTap</li>\\n<li>flamDrag</li>\\n<li>singleDragTap</li>\\n<li>doubleDragTap</li>\\n<li>lesson25</li>\\n<li>singleDragadiddle</li>\\n<li>dragParadiddle1</li>\\n<li>dragParadiddle2</li>\\n<li>singleRatamacue</li>\\n<li>doubleRatamacue</li>\\n<li>trippleRatamacue</li>\\n</ul>"},"param":[{"@name":"velocityFactorAccented","@optional":"1","@type":"0..1","#":"The velocity factor for accented notes (Default=1)"},{"@name":"velocityFactorUnaccented","@optional":"1","@type":"0..1","#":"The velocity factor for unaccented notes (Default=0.7)"},{"@name":"velocityFactorGraceNote","@optional":"1","@type":"0..1","#":"The velocity factor for accented notes (Default=1)"},{"@name":"flamOffset","@optional":"1","@type":"0..N","#":"The offset in quartes when to perform the grace note before the actual note (Default=0.05)"},{"@name":"dragOffset","@optional":"1","@type":"0..N","#":"The offset in quartes when to perform the two grace notes before the actual note (Default=0.05)"}]}}},"guitarStroke":{"rawObject":{"doc":{"command":{"@name":"guitarStroke","@where":"mod","@using":"lua/mod/guitarStroke.lua","#":"Simulates guitar strokes as mini arpeggios.\\n*Note: the alternate mode works only if this mod is set via instrumentConf.*\\n```\\n-- does not work:\\n[\\n{\\n/mod: guitarStroke _mode=alternate/\\n}\\n]\\n```\\n```\\n-- does work:\\ninstrumentConf: myInstrument mod guitarStroke _mode=alternate;\\n```\\n**Example**\\n```language=Werckmeister\\nusing \\"lua/mods/guitarStroke.lua\\";\\ntempo: 120;\\ndevice: MyDevice midi 0;\\ninstrumentDef: piano MyDevice _ch=0 _pc=24;\\ninstrumentConf: piano mod guitarStroke _mode=alternate _value=16;\\n[\\ninstrument: piano;\\n{\\n<c e g b>4 <c e g b>4 <c eb g bb>2 | <c eb g bb>2 <c eb g bb>2\\n}\\n]\\n```"},"param":[{"@name":"direction","@optional":"1","@type":"[up,down]","#":"Specifies the start direction of the stroke"},{"@name":"value","@optional":"1","@type":"[1,2,4,8,...]","#":"the duration of one arpeggio event. (Default=64)"},{"@name":"mode","@optional":"1","@type":"[normal,alternate]","#":"Perform only one stroke direction (normal) or alternates between up and down. (Default=normal)"}]}}},"legato":{"rawObject":{"doc":{"command":{"@name":"legato","@where":"mod","@using":"lua/mod/legato.lua","#":"Performs every note legato. It is also possible to tag single notes.\\nIf a tag is given, only the tagged notes are performed legato.\\n```language=Werckmeister\\nusing \\"lua/mods/legato.lua\\";\\ntempo: 140;\\ndevice: MyDevice midi 0;\\ninstrumentDef:piano MyDevice _ch=0 _pc=0;\\n[\\ninstrument: piano;\\n{\\n/mod: legato _forTag=leg _amount=100/\\n-- only the `d` will be performed legato.\\nc \\"leg\\"@d e f\\n}\\n]\\n```"},"param":[{"@name":"forTag","@optional":"1","@type":"text","#":"Specifies a tag name. If set only events with this tag name will be affected by the legato mod."},{"@name":"amount","@optional":"1","@type":"0..100","#":"The ammount of the legato effect"}]}}},"myArpeggio":{"rawObject":{"doc":{"command":{"@name":"myArpeggio","@where":"mod","@using":"lua/mod/myArpeggio.lua","#":"A simple arpeggio implementation.\\n**Example**\\n```language=Werckmeister\\nusing \\"lua/mods/myArpeggio.lua\\";\\ntempo: 120;\\ndevice: MyDevice midi 0;\\ninstrumentDef: piano MyDevice _ch=0 _pc=0;\\n[\\ninstrument: piano;\\n{\\n/do: myArpeggio/\\n<c e g b>2\\n/do: myArpeggio _direction=down/\\n<c eb g bb>2\\n}\\n]\\n```"},"param":[{"@name":"style","@optional":"1","@type":"[normal,legato]","#":"Performs the arpeggio normal or legato"},{"@name":"direction","@optional":"1","@type":"[up,down]","#":"the direction of the arpeggio. (Default=up)"}]}}},"staccato":{"rawObject":{"doc":{"command":{"@name":"staccato","@where":"mod","@using":"lua/mod/staccato.lua","#":"Performs every note staccato. It is also possible to tag single notes.\\nIf a tag is given, only the tagged notes are performed staccato.\\n```language=Werckmeister\\nusing \\"lua/mods/staccato.lua\\";\\ntempo: 140;\\ndevice: MyDevice midi 0;\\ninstrumentDef:piano MyDevice _ch=0 _pc=0;\\n[\\ninstrument: piano;\\n{\\n/mod: staccato _forTag=stac _amount=100/\\n-- only the `d` will be performed staccato.\\nc \\"stac\\"@d e f\\n}\\n]\\n```"},"param":[{"@name":"forTag","@optional":"1","@type":"text","#":"Specifies a tag name. If set only events with this tag name will be affected by the staccato mod."},{"@name":"amount","@optional":"1","@type":"0..100","#":"The ammount of the staccato effect"}]}}},"swing":{"rawObject":{"doc":{"command":{"@name":"swing","@where":"mod","@using":"lua/mod/swing.lua","#":"Performs a swing groove.\\n```language=Werckmeister\\nusing \\"lua/mods/swing.lua\\";\\ntempo: 120;\\ndevice: MyDevice midi 0;\\ninstrumentDef: piano MyDevice _ch=0 _pc=0;\\n[\\ninstrument: piano;\\n{\\n/mod: swing/\\nc8 c c c c c c c\\n}\\n]\\n```"},"param":[{"@name":"grid","@optional":"1","@type":"[8, 16]","#":"Performs the swing offset either on 8th or 16th. (Default=8)"},{"@name":"offset","@optional":"1","@type":"0..100","#":"The ammount of the swing offset"}]}}},"guitar":{"rawObject":{"doc":{"command":{"@name":"guitar","@where":"voicingStrategy","@using":"lua/voicings/guitar.lua","#":"Tries to simulate the chord voicing of an guitar.\\n```language=Werckmeister\\nusing \\"lua/voicings/guitar.lua\\";\\nusing \\"chords/default.chords\\";\\ntempo: 120;\\ndevice: MyDevice midi 0;\\ninstrumentDef:piano MyDevice _ch=0 _pc=0;\\n[\\ntype: template;\\nname: myTemplate;\\ninstrument: piano;\\n{\\n/voicingStrategy: guitar/\\n<I II III IV V VI VII>1\\n}\\n]\\n[\\ntype: accomp;\\n{\\nC | F | G | C |\\n}\\n]\\n```"},"param":{"@name":"range","@optional":"1","@type":"[contrabass,bass,baritone,tenor,alto,mezzosoprano,soprano]","#":"If given the strategy tries to keeps the range by shifting the octave of the chord."}}}},"simple":{"rawObject":{"doc":{"command":{"@name":"simple","@where":"voicingStrategy","@using":"lua/voicings/simple.lua","#":"The simple approach with no strategy.\\n```language=Werckmeister\\nusing \\"lua/voicings/simple.lua\\";\\nusing \\"chords/default.chords\\";\\ntempo: 120;\\ndevice: MyDevice midi 0;\\ninstrumentDef:piano MyDevice _ch=0 _pc=0;\\n[\\ntype: template;\\nname: myTemplate;\\ninstrument: piano;\\n{\\n/voicingStrategy: simple/\\n<I II III IV V VI VII>1\\n}\\n]\\n[\\ntype: accomp;\\n{\\nC | F | G | C |\\n}\\n]\\n```"},"param":{"@name":"range","@optional":"1","@type":"[contrabass,bass,baritone,tenor,alto,mezzosoprano,soprano]","#":"If given the strategy tries to keeps the range by shifting the octave of the chord."}}}},"voicelead":{"rawObject":{"doc":{"command":{"@name":"voicelead","@where":"voicingStrategy","@using":"lua/voicings/voicelead.lua","#":"Tries to simulates a voice leading approach:\\nthe octaves of a chord are rearranged, so that the actual pitch distance between the previous chord is kept minimal.\\n```language=Werckmeister\\nusing \\"lua/voicings/voicelead.lua\\";\\nusing \\"chords/default.chords\\";\\ntempo: 120;\\ndevice: MyDevice midi 0;\\ninstrumentDef:piano MyDevice _ch=0 _pc=0;\\n[\\ntype: template;\\nname: myTemplate;\\ninstrument: piano;\\n{\\n/voicingStrategy: voicelead/\\n<I II III IV V VI VII>1\\n}\\n]\\n[\\ntype: accomp;\\n{\\nC | F | G | C |\\n}\\n]\\n```"},"param":{"@name":"range","@optional":"1","@type":"[contrabass,bass,baritone,tenor,alto,mezzosoprano,soprano]","#":"If given the strategy tries to keeps the range by shifting the octave of the chord."}}}}}'));n.getAutoHintDb=function(){return i};var o=JSON.parse('{"/":[{"name":"chords","isDirectory":true},{"name":"lua","isDirectory":true},{"name":"pitchmaps","isDirectory":true},{"name":"templates","isDirectory":true}],"/chords":[{"name":"default.chords"}],"/lua/com":[{"name":"com.lua"},{"name":"globals.lua"},{"name":"inspect.lua"},{"name":"tests.lua"}],"/lua/mods":[{"name":"drumRudiments.lua"},{"name":"guitarStroke.lua"},{"name":"legato.lua"},{"name":"myArpeggio.lua"},{"name":"staccato.lua"},{"name":"swing.lua"}],"/lua/voicings":[{"name":"solvers","isDirectory":true},{"name":"config.lua"},{"name":"guitar.lua"},{"name":"simple.lua"},{"name":"voicelead.lua"}],"/lua/voicings/solvers":[{"name":"asolver.lua"},{"name":"config.lua"},{"name":"guitar.lua"},{"name":"simple.lua"},{"name":"voicelead.lua"}],"/lua":[{"name":"com","isDirectory":true},{"name":"mods","isDirectory":true},{"name":"voicings","isDirectory":true}],"/pitchmaps":[{"name":"battery3.tight.pitchmap"},{"name":"defaultMIDI.pitchmap"},{"name":"defaultMidiDrumMap.pitchmap"}],"/templates":[{"name":"bass.blues.template"},{"name":"bass.bossanova.template"},{"name":"bass.country.template"},{"name":"bass.disco.template"},{"name":"bass.jazzSwing.template"},{"name":"bass.reggae.template"},{"name":"bass.soca.template"},{"name":"bossanova.template"},{"name":"countryschlager1.template"},{"name":"drums.bossanova.template"},{"name":"drums.country.template"},{"name":"drums.disco.template"},{"name":"drums.jazzSwing.template"},{"name":"drums.purdie.template"},{"name":"drums.reggae.template"},{"name":"drums.soca.template"},{"name":"ennio.template"},{"name":"guitar.bossanova.template"},{"name":"guitar.country.template"},{"name":"rhythm.bossanova.template"},{"name":"rhythm.country.template"},{"name":"rhythm.jazzSwing.template"},{"name":"rhythm.reggae.template"}]}');n.getPreInstalledAuxFiles=function(){return o}},{"./parser/docParser":"ol4r",fs:"f88W"}],yh9p:[function(t,e,n){"use strict";n.byteLength=function(t){var e=s(t),n=e[0],r=e[1];return 3*(n+r)/4-r},n.toByteArray=function(t){var e,n,r=s(t),a=r[0],u=r[1],c=new o(function(t,e,n){return 3*(e+n)/4-n}(0,a,u)),f=0,l=u>0?a-4:a;for(n=0;n<l;n+=4)e=i[t.charCodeAt(n)]<<18|i[t.charCodeAt(n+1)]<<12|i[t.charCodeAt(n+2)]<<6|i[t.charCodeAt(n+3)],c[f++]=e>>16&255,c[f++]=e>>8&255,c[f++]=255&e;return 2===u&&(e=i[t.charCodeAt(n)]<<2|i[t.charCodeAt(n+1)]>>4,c[f++]=255&e),1===u&&(e=i[t.charCodeAt(n)]<<10|i[t.charCodeAt(n+1)]<<4|i[t.charCodeAt(n+2)]>>2,c[f++]=e>>8&255,c[f++]=255&e),c},n.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],a=0,u=n-i;a<u;a+=16383)o.push(l(t,a,a+16383>u?u:a+16383));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,c=a.length;u<c;++u)r[u]=a[u],i[a.charCodeAt(u)]=u;function s(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function f(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function l(t,e,n){for(var r,i=[],o=e;o<n;o+=3)r=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),i.push(f(r));return i.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],JgNJ:[function(t,e,n){n.read=function(t,e,n,r,i){var o,a,u=8*i-r-1,c=(1<<u)-1,s=c>>1,f=-7,l=n?i-1:0,p=n?-1:1,h=t[e+l];for(l+=p,o=h&(1<<-f)-1,h>>=-f,f+=u;f>0;o=256*o+t[e+l],l+=p,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=r;f>0;a=256*a+t[e+l],l+=p,f-=8);if(0===o)o=1-s;else{if(o===c)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),o-=s}return(h?-1:1)*a*Math.pow(2,o-r)},n.write=function(t,e,n,r,i,o){var a,u,c,s=8*o-i-1,f=(1<<s)-1,l=f>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,m=r?1:-1,d=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-a))<1&&(a--,c*=2),(e+=a+l>=1?p/c:p*Math.pow(2,1-l))*c>=2&&(a++,c/=2),a+l>=f?(u=0,a=f):a+l>=1?(u=(e*c-1)*Math.pow(2,i),a+=l):(u=e*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;t[n+h]=255&u,h+=m,u/=256,i-=8);for(a=a<<i|u,s+=i;s>0;t[n+h]=255&a,h+=m,a/=256,s-=8);t[n+h-m]|=128*d}},{}],REa7:[function(t,e,n){var r={}.toString;e.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},{}],dskh:[function(t,e,n){arguments[3];var r=arguments[3],i=t("base64-js"),o=t("ieee754"),a=t("isarray");function u(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function c(t,e){if(u()<e)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=s.prototype:(null===t&&(t=new s(e)),t.length=e),t}function s(t,e,n){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return p(this,t)}return f(this,t,e,n)}function f(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r),s.TYPED_ARRAY_SUPPORT?(t=e).__proto__=s.prototype:t=h(t,e),t}(t,e,n,r):"string"==typeof e?function(t,e,n){if("string"==typeof n&&""!==n||(n="utf8"),!s.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|g(e,n),i=(t=c(t,r)).write(e,n);return i!==r&&(t=t.slice(0,i)),t}(t,e,n):m(t,e)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function p(t,e){if(l(e),t=c(t,e<0?0:0|d(e)),!s.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function h(t,e){var n=e.length<0?0:0|d(e.length);t=c(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function m(t,e){if(s.isBuffer(e)){var n=0|d(e.length);return 0===(t=c(t,n)).length?t:(e.copy(t,0,0,n),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||function(t){return t!=t}(e.length)?c(t,0):h(t,e);if("Buffer"===e.type&&a(e.data))return h(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function d(t){if(t>=u())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u().toString(16)+" bytes");return 0|t}function g(t,e){if(s.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return W(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Y(t).length;default:if(r)return W(t).length;e=(""+e).toLowerCase(),r=!0}}function v(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function y(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=s.from(e,r)),s.isBuffer(e))return 0===e.length?-1:_(t,e,n,r,i);if("number"==typeof e)return e&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):_(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function _(t,e,n,r,i){var o,a=1,u=t.length,c=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,u/=2,c/=2,n/=2}function s(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var f=-1;for(o=n;o<u;o++)if(s(t,o)===s(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===c)return f*a}else-1!==f&&(o-=o-f),f=-1}else for(n+c>u&&(n=u-c),o=n;o>=0;o--){for(var l=!0,p=0;p<c;p++)if(s(t,o+p)!==s(e,p)){l=!1;break}if(l)return o}return-1}function b(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var u=parseInt(e.substr(2*a,2),16);if(isNaN(u))return a;t[n+a]=u}return a}function w(t,e,n,r){return q(W(e,t.length-n),t,n,r)}function x(t,e,n,r){return q(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function A(t,e,n,r){return x(t,e,n,r)}function k(t,e,n,r){return q(Y(e),t,n,r)}function S(t,e,n,r){return q(function(t,e){for(var n,r,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)r=(n=t.charCodeAt(a))>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function R(t,e,n){return 0===e&&n===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,n))}function D(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o,a,u,c,s=t[i],f=null,l=s>239?4:s>223?3:s>191?2:1;if(i+l<=n)switch(l){case 1:s<128&&(f=s);break;case 2:128==(192&(o=t[i+1]))&&(c=(31&s)<<6|63&o)>127&&(f=c);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(c=(15&s)<<12|(63&o)<<6|63&a)>2047&&(c<55296||c>57343)&&(f=c);break;case 4:o=t[i+1],a=t[i+2],u=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&u)&&(c=(15&s)<<18|(63&o)<<12|(63&a)<<6|63&u)>65535&&c<1114112&&(f=c)}null===f?(f=65533,l=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),i+=l}return function(t){var e=t.length;if(e<=I)return String.fromCharCode.apply(String,t);for(var n="",r=0;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=I));return n}(r)}n.Buffer=s,n.SlowBuffer=function(t){return+t!=t&&(t=0),s.alloc(+t)},n.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==r.TYPED_ARRAY_SUPPORT?r.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(i){return!1}}(),n.kMaxLength=u(),s.poolSize=8192,s._augment=function(t){return t.__proto__=s.prototype,t},s.from=function(t,e,n){return f(null,t,e,n)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(t,e,n){return function(t,e,n,r){return l(e),e<=0?c(t,e):void 0!==n?"string"==typeof r?c(t,e).fill(n,r):c(t,e).fill(n):c(t,e)}(null,t,e,n)},s.allocUnsafe=function(t){return p(null,t)},s.allocUnsafeSlow=function(t){return p(null,t)},s.isBuffer=function(t){return!(null==t||!t._isBuffer)},s.compare=function(t,e){if(!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(t,e){if(!a(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=s.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var o=t[n];if(!s.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},s.byteLength=g,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)v(this,e,e+1);return this},s.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)v(this,e,e+3),v(this,e+1,e+2);return this},s.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)v(this,e,e+7),v(this,e+1,e+6),v(this,e+2,e+5),v(this,e+3,e+4);return this},s.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?D(this,0,t):function(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return O(this,e,n);case"utf8":case"utf-8":return D(this,e,n);case"ascii":return E(this,e,n);case"latin1":case"binary":return T(this,e,n);case"base64":return R(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}.apply(this,arguments)},s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t="",e=n.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},s.prototype.compare=function(t,e,n,r,i){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),u=Math.min(o,a),c=this.slice(r,i),f=t.slice(e,n),l=0;l<u;++l)if(c[l]!==f[l]){o=c[l],a=f[l];break}return o<a?-1:a<o?1:0},s.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},s.prototype.indexOf=function(t,e,n){return y(this,t,e,n,!0)},s.prototype.lastIndexOf=function(t,e,n){return y(this,t,e,n,!1)},s.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":return x(this,t,e,n);case"latin1":case"binary":return A(this,t,e,n);case"base64":return k(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function E(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function T(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function O(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=F(t[o]);return i}function j(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function P(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function C(t,e,n,r,i,o){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function M(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i<o;++i)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function B(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i<o;++i)t[n+i]=e>>>8*(r?i:3-i)&255}function L(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function U(t,e,n,r,i){return i||L(t,0,n,4),o.write(t,e,n,r,23,4),n+4}function z(t,e,n,r,i){return i||L(t,0,n,8),o.write(t,e,n,r,52,8),n+8}s.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),s.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=s.prototype;else{var i=e-t;n=new s(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+t]}return n},s.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},s.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},s.prototype.readUInt8=function(t,e){return e||P(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,e){return e||P(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,e){return e||P(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,e){return e||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,e){return e||P(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},s.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},s.prototype.readInt8=function(t,e){return e||P(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){e||P(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(t,e){e||P(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(t,e){return e||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return e||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,e){return e||P(t,4,this.length),o.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return e||P(t,4,this.length),o.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return e||P(t,8,this.length),o.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return e||P(t,8,this.length),o.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,e,n,r){t=+t,e|=0,n|=0,r||C(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},s.prototype.writeUIntBE=function(t,e,n,r){t=+t,e|=0,n|=0,r||C(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},s.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,1,255,0),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},s.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):M(this,t,e,!0),e+2},s.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):M(this,t,e,!1),e+2},s.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):B(this,t,e,!0),e+4},s.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):B(this,t,e,!1),e+4},s.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);C(this,t,e,n,i-1,-i)}var o=0,a=1,u=0;for(this[e]=255&t;++o<n&&(a*=256);)t<0&&0===u&&0!==this[e+o-1]&&(u=1),this[e+o]=(t/a>>0)-u&255;return e+n},s.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);C(this,t,e,n,i-1,-i)}var o=n-1,a=1,u=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===u&&0!==this[e+o+1]&&(u=1),this[e+o]=(t/a>>0)-u&255;return e+n},s.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,1,127,-128),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):M(this,t,e,!0),e+2},s.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):M(this,t,e,!1),e+2},s.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):B(this,t,e,!0),e+4},s.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):B(this,t,e,!1),e+4},s.prototype.writeFloatLE=function(t,e,n){return U(this,t,e,!0,n)},s.prototype.writeFloatBE=function(t,e,n){return U(this,t,e,!1,n)},s.prototype.writeDoubleLE=function(t,e,n){return z(this,t,e,!0,n)},s.prototype.writeDoubleBE=function(t,e,n){return z(this,t,e,!1,n)},s.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,o=r-n;if(this===t&&n<e&&e<r)for(i=o-1;i>=0;--i)t[i+e]=this[i+n];else if(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o},s.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!s.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o<n;++o)this[o]=t;else{var a=s.isBuffer(t)?t:W(new s(t,r).toString()),u=a.length;for(o=0;o<n-e;++o)this[o+e]=a[o%u]}return this};var N=/[^+\/0-9A-Za-z-_]/g;function F(t){return t<16?"0"+t.toString(16):t.toString(16)}function W(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],a=0;a<r;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function Y(t){return i.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(N,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function q(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}},{"base64-js":"yh9p",ieee754:"JgNJ",isarray:"REa7",buffer:"dskh"}],B1iE:[function(t,e,n){arguments[3],t("buffer").Buffer;var r=arguments[3];t("buffer").Buffer;(function(){var t,i=200,o="Expected a function",a="__lodash_hash_undefined__",u="__lodash_placeholder__",c=1,s=2,f=4,l=1,p=2,h=1,m=2,d=4,g=8,v=16,y=32,_=64,b=128,w=256,x=512,A=800,k=16,S=1/0,R=9007199254740991,D=1.7976931348623157e308,I=NaN,E=4294967295,T=E-1,O=E>>>1,j=[["ary",b],["bind",h],["bindKey",m],["curry",g],["curryRight",v],["flip",x],["partial",y],["partialRight",_],["rearg",w]],P="[object Arguments]",C="[object Array]",M="[object AsyncFunction]",B="[object Boolean]",L="[object Date]",U="[object DOMException]",z="[object Error]",N="[object Function]",F="[object GeneratorFunction]",W="[object Map]",Y="[object Number]",q="[object Null]",$="[object Object]",V="[object Proxy]",K="[object RegExp]",G="[object Set]",H="[object String]",Z="[object Symbol]",J="[object Undefined]",X="[object WeakMap]",Q="[object ArrayBuffer]",tt="[object DataView]",et="[object Float32Array]",nt="[object Float64Array]",rt="[object Int8Array]",it="[object Int16Array]",ot="[object Int32Array]",at="[object Uint8Array]",ut="[object Uint8ClampedArray]",ct="[object Uint16Array]",st="[object Uint32Array]",ft=/\b__p \+= '';/g,lt=/\b(__p \+=) '' \+/g,pt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ht=/&(?:amp|lt|gt|quot|#39);/g,mt=/[&<>"']/g,dt=RegExp(ht.source),gt=RegExp(mt.source),vt=/<%-([\s\S]+?)%>/g,yt=/<%([\s\S]+?)%>/g,_t=/<%=([\s\S]+?)%>/g,bt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wt=/^\w*$/,xt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,At=/[\\^$.*+?()[\]{}|]/g,kt=RegExp(At.source),St=/^\s+/,Rt=/\s/,Dt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,It=/\{\n\/\* \[wrapped with (.+)\] \*/,Et=/,? & /,Tt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ot=/[()=,{}\[\]\/\s]/,jt=/\\(\\)?/g,Pt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ct=/\w*$/,Mt=/^[-+]0x[0-9a-f]+$/i,Bt=/^0b[01]+$/i,Lt=/^\[object .+?Constructor\]$/,Ut=/^0o[0-7]+$/i,zt=/^(?:0|[1-9]\d*)$/,Nt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ft=/($^)/,Wt=/['\n\r\u2028\u2029\\]/g,Yt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",qt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",$t="["+qt+"]",Vt="["+Yt+"]",Kt="\\d+",Gt="[a-z\\xdf-\\xf6\\xf8-\\xff]",Ht="[^\\ud800-\\udfff"+qt+Kt+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",Zt="\\ud83c[\\udffb-\\udfff]",Jt="[^\\ud800-\\udfff]",Xt="(?:\\ud83c[\\udde6-\\uddff]){2}",Qt="[\\ud800-\\udbff][\\udc00-\\udfff]",te="[A-Z\\xc0-\\xd6\\xd8-\\xde]",ee="(?:"+Gt+"|"+Ht+")",ne="(?:"+te+"|"+Ht+")",re="(?:"+Vt+"|"+Zt+")?",ie="[\\ufe0e\\ufe0f]?"+re+"(?:\\u200d(?:"+[Jt,Xt,Qt].join("|")+")[\\ufe0e\\ufe0f]?"+re+")*",oe="(?:"+["[\\u2700-\\u27bf]",Xt,Qt].join("|")+")"+ie,ae="(?:"+[Jt+Vt+"?",Vt,Xt,Qt,"[\\ud800-\\udfff]"].join("|")+")",ue=RegExp("['’]","g"),ce=RegExp(Vt,"g"),se=RegExp(Zt+"(?="+Zt+")|"+ae+ie,"g"),fe=RegExp([te+"?"+Gt+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[$t,te,"$"].join("|")+")",ne+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[$t,te+ee,"$"].join("|")+")",te+"?"+ee+"+(?:['’](?:d|ll|m|re|s|t|ve))?",te+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Kt,oe].join("|"),"g"),le=RegExp("[\\u200d\\ud800-\\udfff"+Yt+"\\ufe0e\\ufe0f]"),pe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,he=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],me=-1,de={};de[et]=de[nt]=de[rt]=de[it]=de[ot]=de[at]=de[ut]=de[ct]=de[st]=!0,de[P]=de[C]=de[Q]=de[B]=de[tt]=de[L]=de[z]=de[N]=de[W]=de[Y]=de[$]=de[K]=de[G]=de[H]=de[X]=!1;var ge={};ge[P]=ge[C]=ge[Q]=ge[tt]=ge[B]=ge[L]=ge[et]=ge[nt]=ge[rt]=ge[it]=ge[ot]=ge[W]=ge[Y]=ge[$]=ge[K]=ge[G]=ge[H]=ge[Z]=ge[at]=ge[ut]=ge[ct]=ge[st]=!0,ge[z]=ge[N]=ge[X]=!1;var ve={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ye=parseFloat,_e=parseInt,be="object"==typeof r&&r&&r.Object===Object&&r,we="object"==typeof self&&self&&self.Object===Object&&self,xe=be||we||Function("return this")(),Ae="object"==typeof n&&n&&!n.nodeType&&n,ke=Ae&&"object"==typeof e&&e&&!e.nodeType&&e,Se=ke&&ke.exports===Ae,Re=Se&&be.process,De=function(){try{return ke&&ke.require&&ke.require("util").types||Re&&Re.binding&&Re.binding("util")}catch(r){}}(),Ie=De&&De.isArrayBuffer,Ee=De&&De.isDate,Te=De&&De.isMap,Oe=De&&De.isRegExp,je=De&&De.isSet,Pe=De&&De.isTypedArray;function Ce(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Me(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function Be(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Le(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Ue(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function ze(t,e){return!(null==t||!t.length)&&He(t,e,0)>-1}function Ne(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function Fe(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function We(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function Ye(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function qe(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function $e(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var Ve=Qe("length");function Ke(t,e,n){var r;return n(t,function(t,n,i){if(e(t,n,i))return r=n,!1}),r}function Ge(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function He(t,e,n){return e==e?function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):Ge(t,Je,n)}function Ze(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function Je(t){return t!=t}function Xe(t,e){var n=null==t?0:t.length;return n?nn(t,e)/n:I}function Qe(e){return function(n){return null==n?t:n[e]}}function tn(e){return function(n){return null==e?t:e[n]}}function en(t,e,n,r,i){return i(t,function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)}),n}function nn(e,n){for(var r,i=-1,o=e.length;++i<o;){var a=n(e[i]);a!==t&&(r=r===t?a:r+a)}return r}function rn(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function on(t){return t?t.slice(0,wn(t)+1).replace(St,""):t}function an(t){return function(e){return t(e)}}function un(t,e){return Fe(e,function(e){return t[e]})}function cn(t,e){return t.has(e)}function sn(t,e){for(var n=-1,r=t.length;++n<r&&He(e,t[n],0)>-1;);return n}function fn(t,e){for(var n=t.length;n--&&He(e,t[n],0)>-1;);return n}var ln=tn({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),pn=tn({"&":"&","<":"<",">":">",'"':""","'":"'"});function hn(t){return"\\"+ve[t]}function mn(t){return le.test(t)}function dn(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function gn(t,e){return function(n){return t(e(n))}}function vn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];a!==e&&a!==u||(t[n]=u,o[i++]=n)}return o}function yn(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function _n(t){return mn(t)?function(t){for(var e=se.lastIndex=0;se.test(t);)++e;return e}(t):Ve(t)}function bn(t){return mn(t)?function(t){return t.match(se)||[]}(t):function(t){return t.split("")}(t)}function wn(t){for(var e=t.length;e--&&Rt.test(t.charAt(e)););return e}var xn=tn({"&":"&","<":"<",">":">",""":'"',"'":"'"}),An=function e(n){var r,Rt=(n=null==n?xe:An.defaults(xe.Object(),n,An.pick(xe,he))).Array,Yt=n.Date,qt=n.Error,$t=n.Function,Vt=n.Math,Kt=n.Object,Gt=n.RegExp,Ht=n.String,Zt=n.TypeError,Jt=Rt.prototype,Xt=$t.prototype,Qt=Kt.prototype,te=n["__core-js_shared__"],ee=Xt.toString,ne=Qt.hasOwnProperty,re=0,ie=(r=/[^.]+$/.exec(te&&te.keys&&te.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",oe=Qt.toString,ae=ee.call(Kt),se=xe._,le=Gt("^"+ee.call(ne).replace(At,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ve=Se?n.Buffer:t,be=n.Symbol,we=n.Uint8Array,Ae=ve?ve.allocUnsafe:t,ke=gn(Kt.getPrototypeOf,Kt),Re=Kt.create,De=Qt.propertyIsEnumerable,Ve=Jt.splice,tn=be?be.isConcatSpreadable:t,kn=be?be.iterator:t,Sn=be?be.toStringTag:t,Rn=function(){try{var t=So(Kt,"defineProperty");return t({},"",{}),t}catch(n){}}(),Dn=n.clearTimeout!==xe.clearTimeout&&n.clearTimeout,In=Yt&&Yt.now!==xe.Date.now&&Yt.now,En=n.setTimeout!==xe.setTimeout&&n.setTimeout,Tn=Vt.ceil,On=Vt.floor,jn=Kt.getOwnPropertySymbols,Pn=ve?ve.isBuffer:t,Cn=n.isFinite,Mn=Jt.join,Bn=gn(Kt.keys,Kt),Ln=Vt.max,Un=Vt.min,zn=Yt.now,Nn=n.parseInt,Fn=Vt.random,Wn=Jt.reverse,Yn=So(n,"DataView"),qn=So(n,"Map"),$n=So(n,"Promise"),Vn=So(n,"Set"),Kn=So(n,"WeakMap"),Gn=So(Kt,"create"),Hn=Kn&&new Kn,Zn={},Jn=Jo(Yn),Xn=Jo(qn),Qn=Jo($n),tr=Jo(Vn),er=Jo(Kn),nr=be?be.prototype:t,rr=nr?nr.valueOf:t,ir=nr?nr.toString:t;function or(t){if(mu(t)&&!ru(t)&&!(t instanceof sr)){if(t instanceof cr)return t;if(ne.call(t,"__wrapped__"))return Xo(t)}return new cr(t)}var ar=function(){function e(){}return function(n){if(!hu(n))return{};if(Re)return Re(n);e.prototype=n;var r=new e;return e.prototype=t,r}}();function ur(){}function cr(e,n){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=t}function sr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=E,this.__views__=[]}function fr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function lr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function pr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function hr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new pr;++e<n;)this.add(t[e])}function mr(t){var e=this.__data__=new lr(t);this.size=e.size}function dr(t,e){var n=ru(t),r=!n&&nu(t),i=!n&&!r&&uu(t),o=!n&&!r&&!i&&xu(t),a=n||r||i||o,u=a?rn(t.length,Ht):[],c=u.length;for(var s in t)!e&&!ne.call(t,s)||a&&("length"==s||i&&("offset"==s||"parent"==s)||o&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||jo(s,c))||u.push(s);return u}function gr(e){var n=e.length;return n?e[fi(0,n-1)]:t}function vr(e,n,r){(r===t||Qa(e[n],r))&&(r!==t||n in e)||xr(e,n,r)}function yr(e,n,r){var i=e[n];ne.call(e,n)&&Qa(i,r)&&(r!==t||n in e)||xr(e,n,r)}function _r(t,e){for(var n=t.length;n--;)if(Qa(t[n][0],e))return n;return-1}function br(t,e,n,r){return Er(t,function(t,i,o){e(r,t,n(t),o)}),r}function wr(t,e){return t&&Yi(e,qu(e),t)}function xr(t,e,n){"__proto__"==e&&Rn?Rn(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Ar(e,n){for(var r=-1,i=n.length,o=Rt(i),a=null==e;++r<i;)o[r]=a?t:zu(e,n[r]);return o}function kr(e,n,r){return e==e&&(r!==t&&(e=e<=r?e:r),n!==t&&(e=e>=n?e:n)),e}function Sr(e,n,r,i,o,a){var u,l=n&c,p=n&s,h=n&f;if(r&&(u=o?r(e,i,o,a):r(e)),u!==t)return u;if(!hu(e))return e;var m=ru(e);if(m){if(u=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&ne.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(e),!l)return Wi(e,u)}else{var d=Io(e),g=d==N||d==F;if(uu(e))return Bi(e,l);if(d==$||d==P||g&&!o){if(u=p||g?{}:To(e),!l)return p?function(t,e){return Yi(t,Do(t),e)}(e,function(t,e){return t&&Yi(e,$u(e),t)}(u,e)):function(t,e){return Yi(t,Ro(t),e)}(e,wr(u,e))}else{if(!ge[d])return o?e:{};u=function(t,e,n){var r,i,o,a=t.constructor;switch(e){case Q:return Li(t);case B:case L:return new a(+t);case tt:return function(t,e){var n=e?Li(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case et:case nt:case rt:case it:case ot:case at:case ut:case ct:case st:return Ui(t,n);case W:return new a;case Y:case H:return new a(t);case K:return(o=new(i=t).constructor(i.source,Ct.exec(i))).lastIndex=i.lastIndex,o;case G:return new a;case Z:return r=t,rr?Kt(rr.call(r)):{}}}(e,d,l)}}a||(a=new mr);var v=a.get(e);if(v)return v;a.set(e,u),_u(e)?e.forEach(function(t){u.add(Sr(t,n,r,t,e,a))}):du(e)&&e.forEach(function(t,i){u.set(i,Sr(t,n,r,i,e,a))});var y=m?t:(h?p?yo:vo:p?$u:qu)(e);return Be(y||e,function(t,i){y&&(t=e[i=t]),yr(u,i,Sr(t,n,r,i,e,a))}),u}function Rr(e,n,r){var i=r.length;if(null==e)return!i;for(e=Kt(e);i--;){var o=r[i],a=n[o],u=e[o];if(u===t&&!(o in e)||!a(u))return!1}return!0}function Dr(e,n,r){if("function"!=typeof e)throw new Zt(o);return qo(function(){e.apply(t,r)},n)}function Ir(t,e,n,r){var o=-1,a=ze,u=!0,c=t.length,s=[],f=e.length;if(!c)return s;n&&(e=Fe(e,an(n))),r?(a=Ne,u=!1):e.length>=i&&(a=cn,u=!1,e=new hr(e));t:for(;++o<c;){var l=t[o],p=null==n?l:n(l);if(l=r||0!==l?l:0,u&&p==p){for(var h=f;h--;)if(e[h]===p)continue t;s.push(l)}else a(e,p,r)||s.push(l)}return s}or.templateSettings={escape:vt,evaluate:yt,interpolate:_t,variable:"",imports:{_:or}},or.prototype=ur.prototype,or.prototype.constructor=or,cr.prototype=ar(ur.prototype),cr.prototype.constructor=cr,sr.prototype=ar(ur.prototype),sr.prototype.constructor=sr,fr.prototype.clear=function(){this.__data__=Gn?Gn(null):{},this.size=0},fr.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},fr.prototype.get=function(e){var n=this.__data__;if(Gn){var r=n[e];return r===a?t:r}return ne.call(n,e)?n[e]:t},fr.prototype.has=function(e){var n=this.__data__;return Gn?n[e]!==t:ne.call(n,e)},fr.prototype.set=function(e,n){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Gn&&n===t?a:n,this},lr.prototype.clear=function(){this.__data__=[],this.size=0},lr.prototype.delete=function(t){var e=this.__data__,n=_r(e,t);return!(n<0||(n==e.length-1?e.pop():Ve.call(e,n,1),--this.size,0))},lr.prototype.get=function(e){var n=this.__data__,r=_r(n,e);return r<0?t:n[r][1]},lr.prototype.has=function(t){return _r(this.__data__,t)>-1},lr.prototype.set=function(t,e){var n=this.__data__,r=_r(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},pr.prototype.clear=function(){this.size=0,this.__data__={hash:new fr,map:new(qn||lr),string:new fr}},pr.prototype.delete=function(t){var e=Ao(this,t).delete(t);return this.size-=e?1:0,e},pr.prototype.get=function(t){return Ao(this,t).get(t)},pr.prototype.has=function(t){return Ao(this,t).has(t)},pr.prototype.set=function(t,e){var n=Ao(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},hr.prototype.add=hr.prototype.push=function(t){return this.__data__.set(t,a),this},hr.prototype.has=function(t){return this.__data__.has(t)},mr.prototype.clear=function(){this.__data__=new lr,this.size=0},mr.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},mr.prototype.get=function(t){return this.__data__.get(t)},mr.prototype.has=function(t){return this.__data__.has(t)},mr.prototype.set=function(t,e){var n=this.__data__;if(n instanceof lr){var r=n.__data__;if(!qn||r.length<i-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new pr(r)}return n.set(t,e),this.size=n.size,this};var Er=Vi(Lr),Tr=Vi(Ur,!0);function Or(t,e){var n=!0;return Er(t,function(t,r,i){return n=!!e(t,r,i)}),n}function jr(e,n,r){for(var i=-1,o=e.length;++i<o;){var a=e[i],u=n(a);if(null!=u&&(c===t?u==u&&!wu(u):r(u,c)))var c=u,s=a}return s}function Pr(t,e){var n=[];return Er(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function Cr(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=Oo),i||(i=[]);++o<a;){var u=t[o];e>0&&n(u)?e>1?Cr(u,e-1,n,r,i):We(i,u):r||(i[i.length]=u)}return i}var Mr=Ki(),Br=Ki(!0);function Lr(t,e){return t&&Mr(t,e,qu)}function Ur(t,e){return t&&Br(t,e,qu)}function zr(t,e){return Ue(e,function(e){return fu(t[e])})}function Nr(e,n){for(var r=0,i=(n=ji(n,e)).length;null!=e&&r<i;)e=e[Zo(n[r++])];return r&&r==i?e:t}function Fr(t,e,n){var r=e(t);return ru(t)?r:We(r,n(t))}function Wr(e){return null==e?e===t?J:q:Sn&&Sn in Kt(e)?function(e){var n=ne.call(e,Sn),r=e[Sn];try{e[Sn]=t;var i=!0}catch(a){}var o=oe.call(e);return i&&(n?e[Sn]=r:delete e[Sn]),o}(e):function(t){return oe.call(t)}(e)}function Yr(t,e){return t>e}function qr(t,e){return null!=t&&ne.call(t,e)}function $r(t,e){return null!=t&&e in Kt(t)}function Vr(e,n,r){for(var i=r?Ne:ze,o=e[0].length,a=e.length,u=a,c=Rt(a),s=1/0,f=[];u--;){var l=e[u];u&&n&&(l=Fe(l,an(n))),s=Un(l.length,s),c[u]=!r&&(n||o>=120&&l.length>=120)?new hr(u&&l):t}l=e[0];var p=-1,h=c[0];t:for(;++p<o&&f.length<s;){var m=l[p],d=n?n(m):m;if(m=r||0!==m?m:0,!(h?cn(h,d):i(f,d,r))){for(u=a;--u;){var g=c[u];if(!(g?cn(g,d):i(e[u],d,r)))continue t}h&&h.push(d),f.push(m)}}return f}function Kr(e,n,r){var i=null==(e=Fo(e,n=ji(n,e)))?e:e[Zo(sa(n))];return null==i?t:Ce(i,e,r)}function Gr(t){return mu(t)&&Wr(t)==P}function Hr(e,n,r,i,o){return e===n||(null==e||null==n||!mu(e)&&!mu(n)?e!=e&&n!=n:function(e,n,r,i,o,a){var u=ru(e),c=ru(n),s=u?C:Io(e),f=c?C:Io(n),h=(s=s==P?$:s)==$,m=(f=f==P?$:f)==$,d=s==f;if(d&&uu(e)){if(!uu(n))return!1;u=!0,h=!1}if(d&&!h)return a||(a=new mr),u||xu(e)?mo(e,n,r,i,o,a):function(t,e,n,r,i,o,a){switch(n){case tt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Q:return!(t.byteLength!=e.byteLength||!o(new we(t),new we(e)));case B:case L:case Y:return Qa(+t,+e);case z:return t.name==e.name&&t.message==e.message;case K:case H:return t==e+"";case W:var u=dn;case G:var c=r&l;if(u||(u=yn),t.size!=e.size&&!c)return!1;var s=a.get(t);if(s)return s==e;r|=p,a.set(t,e);var f=mo(u(t),u(e),r,i,o,a);return a.delete(t),f;case Z:if(rr)return rr.call(t)==rr.call(e)}return!1}(e,n,s,r,i,o,a);if(!(r&l)){var g=h&&ne.call(e,"__wrapped__"),v=m&&ne.call(n,"__wrapped__");if(g||v){var y=g?e.value():e,_=v?n.value():n;return a||(a=new mr),o(y,_,r,i,a)}}return!!d&&(a||(a=new mr),function(e,n,r,i,o,a){var u=r&l,c=vo(e),s=c.length;if(s!=vo(n).length&&!u)return!1;for(var f=s;f--;){var p=c[f];if(!(u?p in n:ne.call(n,p)))return!1}var h=a.get(e),m=a.get(n);if(h&&m)return h==n&&m==e;var d=!0;a.set(e,n),a.set(n,e);for(var g=u;++f<s;){var v=e[p=c[f]],y=n[p];if(i)var _=u?i(y,v,p,n,e,a):i(v,y,p,e,n,a);if(!(_===t?v===y||o(v,y,r,i,a):_)){d=!1;break}g||(g="constructor"==p)}if(d&&!g){var b=e.constructor,w=n.constructor;b!=w&&"constructor"in e&&"constructor"in n&&!("function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w)&&(d=!1)}return a.delete(e),a.delete(n),d}(e,n,r,i,o,a))}(e,n,r,i,Hr,o))}function Zr(e,n,r,i){var o=r.length,a=o,u=!i;if(null==e)return!a;for(e=Kt(e);o--;){var c=r[o];if(u&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++o<a;){var s=(c=r[o])[0],f=e[s],h=c[1];if(u&&c[2]){if(f===t&&!(s in e))return!1}else{var m=new mr;if(i)var d=i(f,h,s,e,n,m);if(!(d===t?Hr(h,f,l|p,i,m):d))return!1}}return!0}function Jr(t){return!(!hu(t)||(e=t,ie&&ie in e))&&(fu(t)?le:Lt).test(Jo(t));var e}function Xr(t){return"function"==typeof t?t:null==t?gc:"object"==typeof t?ru(t)?ri(t[0],t[1]):ni(t):Sc(t)}function Qr(t){if(!Lo(t))return Bn(t);var e=[];for(var n in Kt(t))ne.call(t,n)&&"constructor"!=n&&e.push(n);return e}function ti(t,e){return t<e}function ei(t,e){var n=-1,r=ou(t)?Rt(t.length):[];return Er(t,function(t,i,o){r[++n]=e(t,i,o)}),r}function ni(t){var e=ko(t);return 1==e.length&&e[0][2]?zo(e[0][0],e[0][1]):function(n){return n===t||Zr(n,t,e)}}function ri(e,n){return Co(e)&&Uo(n)?zo(Zo(e),n):function(r){var i=zu(r,e);return i===t&&i===n?Nu(r,e):Hr(n,i,l|p)}}function ii(e,n,r,i,o){e!==n&&Mr(n,function(a,u){if(o||(o=new mr),hu(a))!function(e,n,r,i,o,a,u){var c=Wo(e,r),s=Wo(n,r),f=u.get(s);if(f)vr(e,r,f);else{var l=a?a(c,s,r+"",e,n,u):t,p=l===t;if(p){var h=ru(s),m=!h&&uu(s),d=!h&&!m&&xu(s);l=s,h||m||d?ru(c)?l=c:au(c)?l=Wi(c):m?(p=!1,l=Bi(s,!0)):d?(p=!1,l=Ui(s,!0)):l=[]:vu(s)||nu(s)?(l=c,nu(c)?l=Tu(c):hu(c)&&!fu(c)||(l=To(s))):p=!1}p&&(u.set(s,l),o(l,s,i,a,u),u.delete(s)),vr(e,r,l)}}(e,n,u,r,ii,i,o);else{var c=i?i(Wo(e,u),a,u+"",e,n,o):t;c===t&&(c=a),vr(e,u,c)}},$u)}function oi(e,n){var r=e.length;if(r)return jo(n+=n<0?r:0,r)?e[n]:t}function ai(t,e,n){e=e.length?Fe(e,function(t){return ru(t)?function(e){return Nr(e,1===t.length?t[0]:t)}:t}):[gc];var r=-1;return e=Fe(e,an(xo())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(ei(t,function(t,n,i){return{criteria:Fe(e,function(e){return e(t)}),index:++r,value:t}}),function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,o=e.criteria,a=i.length,u=n.length;++r<a;){var c=zi(i[r],o[r]);if(c)return r>=u?c:c*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)})}function ui(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],u=Nr(t,a);n(u,a)&&hi(o,ji(a,t),u)}return o}function ci(t,e,n,r){var i=r?Ze:He,o=-1,a=e.length,u=t;for(t===e&&(e=Wi(e)),n&&(u=Fe(t,an(n)));++o<a;)for(var c=0,s=e[o],f=n?n(s):s;(c=i(u,f,c,r))>-1;)u!==t&&Ve.call(u,c,1),Ve.call(t,c,1);return t}function si(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;jo(i)?Ve.call(t,i,1):ki(t,i)}}return t}function fi(t,e){return t+On(Fn()*(e-t+1))}function li(t,e){var n="";if(!t||e<1||e>R)return n;do{e%2&&(n+=t),(e=On(e/2))&&(t+=t)}while(e);return n}function pi(t,e){return $o(No(t,e,gc),t+"")}function hi(e,n,r,i){if(!hu(e))return e;for(var o=-1,a=(n=ji(n,e)).length,u=a-1,c=e;null!=c&&++o<a;){var s=Zo(n[o]),f=r;if("__proto__"===s||"constructor"===s||"prototype"===s)return e;if(o!=u){var l=c[s];(f=i?i(l,s,c):t)===t&&(f=hu(l)?l:jo(n[o+1])?[]:{})}yr(c,s,f),c=c[s]}return e}var mi=Hn?function(t,e){return Hn.set(t,e),t}:gc,di=Rn?function(t,e){return Rn(t,"toString",{configurable:!0,enumerable:!1,value:hc(e),writable:!0})}:gc;function gi(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Rt(i);++r<i;)o[r]=t[r+e];return o}function vi(t,e){var n;return Er(t,function(t,r,i){return!(n=e(t,r,i))}),!!n}function yi(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=O){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!wu(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return _i(t,e,gc,n)}function _i(e,n,r,i){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var u=(n=r(n))!=n,c=null===n,s=wu(n),f=n===t;o<a;){var l=On((o+a)/2),p=r(e[l]),h=p!==t,m=null===p,d=p==p,g=wu(p);if(u)var v=i||d;else v=f?d&&(i||h):c?d&&h&&(i||!m):s?d&&h&&!m&&(i||!g):!m&&!g&&(i?p<=n:p<n);v?o=l+1:a=l}return Un(a,T)}function bi(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],u=e?e(a):a;if(!n||!Qa(u,c)){var c=u;o[i++]=0===a?0:a}}return o}function wi(t){return"number"==typeof t?t:wu(t)?I:+t}function xi(t){if("string"==typeof t)return t;if(ru(t))return Fe(t,xi)+"";if(wu(t))return ir?ir.call(t):"";var e=t+"";return"0"==e&&1/t==-S?"-0":e}function Ai(t,e,n){var r=-1,o=ze,a=t.length,u=!0,c=[],s=c;if(n)u=!1,o=Ne;else if(a>=i){var f=e?null:co(t);if(f)return yn(f);u=!1,o=cn,s=new hr}else s=e?[]:c;t:for(;++r<a;){var l=t[r],p=e?e(l):l;if(l=n||0!==l?l:0,u&&p==p){for(var h=s.length;h--;)if(s[h]===p)continue t;e&&s.push(p),c.push(l)}else o(s,p,n)||(s!==c&&s.push(p),c.push(l))}return c}function ki(t,e){return null==(t=Fo(t,e=ji(e,t)))||delete t[Zo(sa(e))]}function Si(t,e,n,r){return hi(t,e,n(Nr(t,e)),r)}function Ri(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?gi(t,r?0:o,r?o+1:i):gi(t,r?o+1:0,r?i:o)}function Di(t,e){var n=t;return n instanceof sr&&(n=n.value()),Ye(e,function(t,e){return e.func.apply(e.thisArg,We([t],e.args))},n)}function Ii(t,e,n){var r=t.length;if(r<2)return r?Ai(t[0]):[];for(var i=-1,o=Rt(r);++i<r;)for(var a=t[i],u=-1;++u<r;)u!=i&&(o[i]=Ir(o[i]||a,t[u],e,n));return Ai(Cr(o,1),e,n)}function Ei(e,n,r){for(var i=-1,o=e.length,a=n.length,u={};++i<o;){var c=i<a?n[i]:t;r(u,e[i],c)}return u}function Ti(t){return au(t)?t:[]}function Oi(t){return"function"==typeof t?t:gc}function ji(t,e){return ru(t)?t:Co(t,e)?[t]:Ho(Ou(t))}var Pi=pi;function Ci(e,n,r){var i=e.length;return r=r===t?i:r,!n&&r>=i?e:gi(e,n,r)}var Mi=Dn||function(t){return xe.clearTimeout(t)};function Bi(t,e){if(e)return t.slice();var n=t.length,r=Ae?Ae(n):new t.constructor(n);return t.copy(r),r}function Li(t){var e=new t.constructor(t.byteLength);return new we(e).set(new we(t)),e}function Ui(t,e){var n=e?Li(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function zi(e,n){if(e!==n){var r=e!==t,i=null===e,o=e==e,a=wu(e),u=n!==t,c=null===n,s=n==n,f=wu(n);if(!c&&!f&&!a&&e>n||a&&u&&s&&!c&&!f||i&&u&&s||!r&&s||!o)return 1;if(!i&&!a&&!f&&e<n||f&&r&&o&&!i&&!a||c&&r&&o||!u&&o||!s)return-1}return 0}function Ni(t,e,n,r){for(var i=-1,o=t.length,a=n.length,u=-1,c=e.length,s=Ln(o-a,0),f=Rt(c+s),l=!r;++u<c;)f[u]=e[u];for(;++i<a;)(l||i<o)&&(f[n[i]]=t[i]);for(;s--;)f[u++]=t[i++];return f}function Fi(t,e,n,r){for(var i=-1,o=t.length,a=-1,u=n.length,c=-1,s=e.length,f=Ln(o-u,0),l=Rt(f+s),p=!r;++i<f;)l[i]=t[i];for(var h=i;++c<s;)l[h+c]=e[c];for(;++a<u;)(p||i<o)&&(l[h+n[a]]=t[i++]);return l}function Wi(t,e){var n=-1,r=t.length;for(e||(e=Rt(r));++n<r;)e[n]=t[n];return e}function Yi(e,n,r,i){var o=!r;r||(r={});for(var a=-1,u=n.length;++a<u;){var c=n[a],s=i?i(r[c],e[c],c,r,e):t;s===t&&(s=e[c]),o?xr(r,c,s):yr(r,c,s)}return r}function qi(t,e){return function(n,r){var i=ru(n)?Me:br,o=e?e():{};return i(n,t,xo(r,2),o)}}function $i(e){return pi(function(n,r){var i=-1,o=r.length,a=o>1?r[o-1]:t,u=o>2?r[2]:t;for(a=e.length>3&&"function"==typeof a?(o--,a):t,u&&Po(r[0],r[1],u)&&(a=o<3?t:a,o=1),n=Kt(n);++i<o;){var c=r[i];c&&e(n,c,i,a)}return n})}function Vi(t,e){return function(n,r){if(null==n)return n;if(!ou(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=Kt(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Ki(t){return function(e,n,r){for(var i=-1,o=Kt(e),a=r(e),u=a.length;u--;){var c=a[t?u:++i];if(!1===n(o[c],c,o))break}return e}}function Gi(e){return function(n){var r=mn(n=Ou(n))?bn(n):t,i=r?r[0]:n.charAt(0),o=r?Ci(r,1).join(""):n.slice(1);return i[e]()+o}}function Hi(t){return function(e){return Ye(fc(nc(e).replace(ue,"")),t,"")}}function Zi(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=ar(t.prototype),r=t.apply(n,e);return hu(r)?r:n}}function Ji(e){return function(n,r,i){var o=Kt(n);if(!ou(n)){var a=xo(r,3);n=qu(n),r=function(t){return a(o[t],t,o)}}var u=e(n,r,i);return u>-1?o[a?n[u]:u]:t}}function Xi(e){return go(function(n){var r=n.length,i=r,a=cr.prototype.thru;for(e&&n.reverse();i--;){var u=n[i];if("function"!=typeof u)throw new Zt(o);if(a&&!c&&"wrapper"==bo(u))var c=new cr([],!0)}for(i=c?i:r;++i<r;){var s=bo(u=n[i]),f="wrapper"==s?_o(u):t;c=f&&Mo(f[0])&&f[1]==(b|g|y|w)&&!f[4].length&&1==f[9]?c[bo(f[0])].apply(c,f[3]):1==u.length&&Mo(u)?c[s]():c.thru(u)}return function(){var t=arguments,e=t[0];if(c&&1==t.length&&ru(e))return c.plant(e).value();for(var i=0,o=r?n[i].apply(this,t):e;++i<r;)o=n[i].call(this,o);return o}})}function Qi(e,n,r,i,o,a,u,c,s,f){var l=n&b,p=n&h,d=n&m,y=n&(g|v),_=n&x,w=d?t:Zi(e);return function h(){for(var m=arguments.length,g=Rt(m),v=m;v--;)g[v]=arguments[v];if(y)var b=wo(h),x=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(g,b);if(i&&(g=Ni(g,i,o,y)),a&&(g=Fi(g,a,u,y)),m-=x,y&&m<f){var A=vn(g,b);return ao(e,n,Qi,h.placeholder,r,g,A,c,s,f-m)}var k=p?r:this,S=d?k[e]:e;return m=g.length,c?g=function(e,n){for(var r=e.length,i=Un(n.length,r),o=Wi(e);i--;){var a=n[i];e[i]=jo(a,r)?o[a]:t}return e}(g,c):_&&m>1&&g.reverse(),l&&s<m&&(g.length=s),this&&this!==xe&&this instanceof h&&(S=w||Zi(S)),S.apply(k,g)}}function to(t,e){return function(n,r){return function(t,e,n,r){return Lr(t,function(t,i,o){e(r,n(t),i,o)}),r}(n,t,e(r),{})}}function eo(e,n){return function(r,i){var o;if(r===t&&i===t)return n;if(r!==t&&(o=r),i!==t){if(o===t)return i;"string"==typeof r||"string"==typeof i?(r=xi(r),i=xi(i)):(r=wi(r),i=wi(i)),o=e(r,i)}return o}}function no(t){return go(function(e){return e=Fe(e,an(xo())),pi(function(n){var r=this;return t(e,function(t){return Ce(t,r,n)})})})}function ro(e,n){var r=(n=n===t?" ":xi(n)).length;if(r<2)return r?li(n,e):n;var i=li(n,Tn(e/_n(n)));return mn(n)?Ci(bn(i),0,e).join(""):i.slice(0,e)}function io(e){return function(n,r,i){return i&&"number"!=typeof i&&Po(n,r,i)&&(r=i=t),n=Ru(n),r===t?(r=n,n=0):r=Ru(r),function(t,e,n,r){for(var i=-1,o=Ln(Tn((e-t)/(n||1)),0),a=Rt(o);o--;)a[r?o:++i]=t,t+=n;return a}(n,r,i=i===t?n<r?1:-1:Ru(i),e)}}function oo(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=Eu(e),n=Eu(n)),t(e,n)}}function ao(e,n,r,i,o,a,u,c,s,f){var l=n&g;n|=l?y:_,(n&=~(l?_:y))&d||(n&=~(h|m));var p=[e,n,o,l?a:t,l?u:t,l?t:a,l?t:u,c,s,f],v=r.apply(t,p);return Mo(e)&&Yo(v,p),v.placeholder=i,Vo(v,e,n)}function uo(t){var e=Vt[t];return function(t,n){if(t=Eu(t),(n=null==n?0:Un(Du(n),292))&&Cn(t)){var r=(Ou(t)+"e").split("e");return+((r=(Ou(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var co=Vn&&1/yn(new Vn([,-0]))[1]==S?function(t){return new Vn(t)}:wc;function so(t){return function(e){var n=Io(e);return n==W?dn(e):n==G?function(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=[t,t]}),n}(e):function(t,e){return Fe(e,function(e){return[e,t[e]]})}(e,t(e))}}function fo(e,n,r,i,a,c,s,f){var l=n&m;if(!l&&"function"!=typeof e)throw new Zt(o);var p=i?i.length:0;if(p||(n&=~(y|_),i=a=t),s=s===t?s:Ln(Du(s),0),f=f===t?f:Du(f),p-=a?a.length:0,n&_){var x=i,A=a;i=a=t}var k=l?t:_o(e),S=[e,n,r,i,a,x,A,c,s,f];if(k&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<(h|m|b),a=r==b&&n==g||r==b&&n==w&&t[7].length<=e[8]||r==(b|w)&&e[7].length<=e[8]&&n==g;if(!o&&!a)return t;r&h&&(t[2]=e[2],i|=n&h?0:d);var c=e[3];if(c){var s=t[3];t[3]=s?Ni(s,c,e[4]):c,t[4]=s?vn(t[3],u):e[4]}(c=e[5])&&(s=t[5],t[5]=s?Fi(s,c,e[6]):c,t[6]=s?vn(t[5],u):e[6]),(c=e[7])&&(t[7]=c),r&b&&(t[8]=null==t[8]?e[8]:Un(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(S,k),e=S[0],n=S[1],r=S[2],i=S[3],a=S[4],!(f=S[9]=S[9]===t?l?0:e.length:Ln(S[9]-p,0))&&n&(g|v)&&(n&=~(g|v)),n&&n!=h)R=n==g||n==v?function(e,n,r){var i=Zi(e);return function o(){for(var a=arguments.length,u=Rt(a),c=a,s=wo(o);c--;)u[c]=arguments[c];var f=a<3&&u[0]!==s&&u[a-1]!==s?[]:vn(u,s);return(a-=f.length)<r?ao(e,n,Qi,o.placeholder,t,u,f,t,t,r-a):Ce(this&&this!==xe&&this instanceof o?i:e,this,u)}}(e,n,f):n!=y&&n!=(h|y)||a.length?Qi.apply(t,S):function(t,e,n,r){var i=e&h,o=Zi(t);return function e(){for(var a=-1,u=arguments.length,c=-1,s=r.length,f=Rt(s+u),l=this&&this!==xe&&this instanceof e?o:t;++c<s;)f[c]=r[c];for(;u--;)f[c++]=arguments[++a];return Ce(l,i?n:this,f)}}(e,n,r,i);else var R=function(t,e,n){var r=e&h,i=Zi(t);return function e(){return(this&&this!==xe&&this instanceof e?i:t).apply(r?n:this,arguments)}}(e,n,r);return Vo((k?mi:Yo)(R,S),e,n)}function lo(e,n,r,i){return e===t||Qa(e,Qt[r])&&!ne.call(i,r)?n:e}function po(e,n,r,i,o,a){return hu(e)&&hu(n)&&(a.set(n,e),ii(e,n,t,po,a),a.delete(n)),e}function ho(e){return vu(e)?t:e}function mo(e,n,r,i,o,a){var u=r&l,c=e.length,s=n.length;if(c!=s&&!(u&&s>c))return!1;var f=a.get(e),h=a.get(n);if(f&&h)return f==n&&h==e;var m=-1,d=!0,g=r&p?new hr:t;for(a.set(e,n),a.set(n,e);++m<c;){var v=e[m],y=n[m];if(i)var _=u?i(y,v,m,n,e,a):i(v,y,m,e,n,a);if(_!==t){if(_)continue;d=!1;break}if(g){if(!$e(n,function(t,e){if(!cn(g,e)&&(v===t||o(v,t,r,i,a)))return g.push(e)})){d=!1;break}}else if(v!==y&&!o(v,y,r,i,a)){d=!1;break}}return a.delete(e),a.delete(n),d}function go(e){return $o(No(e,t,ia),e+"")}function vo(t){return Fr(t,qu,Ro)}function yo(t){return Fr(t,$u,Do)}var _o=Hn?function(t){return Hn.get(t)}:wc;function bo(t){for(var e=t.name+"",n=Zn[e],r=ne.call(Zn,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function wo(t){return(ne.call(or,"placeholder")?or:t).placeholder}function xo(){var t=or.iteratee||vc;return t=t===vc?Xr:t,arguments.length?t(arguments[0],arguments[1]):t}function Ao(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function ko(t){for(var e=qu(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Uo(i)]}return e}function So(e,n){var r=function(e,n){return null==e?t:e[n]}(e,n);return Jr(r)?r:t}var Ro=jn?function(t){return null==t?[]:(t=Kt(t),Ue(jn(t),function(e){return De.call(t,e)}))}:Ic,Do=jn?function(t){for(var e=[];t;)We(e,Ro(t)),t=ke(t);return e}:Ic,Io=Wr;function Eo(t,e,n){for(var r=-1,i=(e=ji(e,t)).length,o=!1;++r<i;){var a=Zo(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&pu(i)&&jo(a,i)&&(ru(t)||nu(t))}function To(t){return"function"!=typeof t.constructor||Lo(t)?{}:ar(ke(t))}function Oo(t){return ru(t)||nu(t)||!!(tn&&t&&t[tn])}function jo(t,e){var n=typeof t;return!!(e=null==e?R:e)&&("number"==n||"symbol"!=n&&zt.test(t))&&t>-1&&t%1==0&&t<e}function Po(t,e,n){if(!hu(n))return!1;var r=typeof e;return!!("number"==r?ou(n)&&jo(e,n.length):"string"==r&&e in n)&&Qa(n[e],t)}function Co(t,e){if(ru(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!wu(t))||wt.test(t)||!bt.test(t)||null!=e&&t in Kt(e)}function Mo(t){var e=bo(t),n=or[e];if("function"!=typeof n||!(e in sr.prototype))return!1;if(t===n)return!0;var r=_o(n);return!!r&&t===r[0]}(Yn&&Io(new Yn(new ArrayBuffer(1)))!=tt||qn&&Io(new qn)!=W||$n&&"[object Promise]"!=Io($n.resolve())||Vn&&Io(new Vn)!=G||Kn&&Io(new Kn)!=X)&&(Io=function(e){var n=Wr(e),r=n==$?e.constructor:t,i=r?Jo(r):"";if(i)switch(i){case Jn:return tt;case Xn:return W;case Qn:return"[object Promise]";case tr:return G;case er:return X}return n});var Bo=te?fu:Ec;function Lo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Qt)}function Uo(t){return t==t&&!hu(t)}function zo(e,n){return function(r){return null!=r&&r[e]===n&&(n!==t||e in Kt(r))}}function No(e,n,r){return n=Ln(n===t?e.length-1:n,0),function(){for(var t=arguments,i=-1,o=Ln(t.length-n,0),a=Rt(o);++i<o;)a[i]=t[n+i];i=-1;for(var u=Rt(n+1);++i<n;)u[i]=t[i];return u[n]=r(a),Ce(e,this,u)}}function Fo(t,e){return e.length<2?t:Nr(t,gi(e,0,-1))}function Wo(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Yo=Ko(mi),qo=En||function(t,e){return xe.setTimeout(t,e)},$o=Ko(di);function Vo(t,e,n){var r=e+"";return $o(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Dt,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Be(j,function(n){var r="_."+n[0];e&n[1]&&!ze(t,r)&&t.push(r)}),t.sort()}(function(t){var e=r.match(It);return e?e[1].split(Et):[]}(),n)))}function Ko(e){var n=0,r=0;return function(){var i=zn(),o=k-(i-r);if(r=i,o>0){if(++n>=A)return arguments[0]}else n=0;return e.apply(t,arguments)}}function Go(e,n){var r=-1,i=e.length,o=i-1;for(n=n===t?i:n;++r<n;){var a=fi(r,o),u=e[a];e[a]=e[r],e[r]=u}return e.length=n,e}var Ho=function(t){var e=Ka(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(xt,function(t,n,r,i){e.push(r?i.replace(jt,"$1"):n||t)}),e},function(t){return 500===n.size&&n.clear(),t}),n=e.cache;return e}();function Zo(t){if("string"==typeof t||wu(t))return t;var e=t+"";return"0"==e&&1/t==-S?"-0":e}function Jo(t){if(null!=t){try{return ee.call(t)}catch(n){}try{return t+""}catch(n){}}return""}function Xo(t){if(t instanceof sr)return t.clone();var e=new cr(t.__wrapped__,t.__chain__);return e.__actions__=Wi(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Qo=pi(function(t,e){return au(t)?Ir(t,Cr(e,1,au,!0)):[]}),ta=pi(function(e,n){var r=sa(n);return au(r)&&(r=t),au(e)?Ir(e,Cr(n,1,au,!0),xo(r,2)):[]}),ea=pi(function(e,n){var r=sa(n);return au(r)&&(r=t),au(e)?Ir(e,Cr(n,1,au,!0),t,r):[]});function na(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:Du(n);return i<0&&(i=Ln(r+i,0)),Ge(t,xo(e,3),i)}function ra(e,n,r){var i=null==e?0:e.length;if(!i)return-1;var o=i-1;return r!==t&&(o=Du(r),o=r<0?Ln(i+o,0):Un(o,i-1)),Ge(e,xo(n,3),o,!0)}function ia(t){return null!=t&&t.length?Cr(t,1):[]}function oa(e){return e&&e.length?e[0]:t}var aa=pi(function(t){var e=Fe(t,Ti);return e.length&&e[0]===t[0]?Vr(e):[]}),ua=pi(function(e){var n=sa(e),r=Fe(e,Ti);return n===sa(r)?n=t:r.pop(),r.length&&r[0]===e[0]?Vr(r,xo(n,2)):[]}),ca=pi(function(e){var n=sa(e),r=Fe(e,Ti);return(n="function"==typeof n?n:t)&&r.pop(),r.length&&r[0]===e[0]?Vr(r,t,n):[]});function sa(e){var n=null==e?0:e.length;return n?e[n-1]:t}var fa=pi(la);function la(t,e){return t&&t.length&&e&&e.length?ci(t,e):t}var pa=go(function(t,e){var n=null==t?0:t.length,r=Ar(t,e);return si(t,Fe(e,function(t){return jo(t,n)?+t:t}).sort(zi)),r});function ha(t){return null==t?t:Wn.call(t)}var ma=pi(function(t){return Ai(Cr(t,1,au,!0))}),da=pi(function(e){var n=sa(e);return au(n)&&(n=t),Ai(Cr(e,1,au,!0),xo(n,2))}),ga=pi(function(e){var n=sa(e);return n="function"==typeof n?n:t,Ai(Cr(e,1,au,!0),t,n)});function va(t){if(!t||!t.length)return[];var e=0;return t=Ue(t,function(t){if(au(t))return e=Ln(t.length,e),!0}),rn(e,function(e){return Fe(t,Qe(e))})}function ya(e,n){if(!e||!e.length)return[];var r=va(e);return null==n?r:Fe(r,function(e){return Ce(n,t,e)})}var _a=pi(function(t,e){return au(t)?Ir(t,e):[]}),ba=pi(function(t){return Ii(Ue(t,au))}),wa=pi(function(e){var n=sa(e);return au(n)&&(n=t),Ii(Ue(e,au),xo(n,2))}),xa=pi(function(e){var n=sa(e);return n="function"==typeof n?n:t,Ii(Ue(e,au),t,n)}),Aa=pi(va),ka=pi(function(e){var n=e.length,r=n>1?e[n-1]:t;return r="function"==typeof r?(e.pop(),r):t,ya(e,r)});function Sa(t){var e=or(t);return e.__chain__=!0,e}function Ra(t,e){return e(t)}var Da=go(function(e){var n=e.length,r=n?e[0]:0,i=this.__wrapped__,o=function(t){return Ar(t,e)};return!(n>1||this.__actions__.length)&&i instanceof sr&&jo(r)?((i=i.slice(r,+r+(n?1:0))).__actions__.push({func:Ra,args:[o],thisArg:t}),new cr(i,this.__chain__).thru(function(e){return n&&!e.length&&e.push(t),e})):this.thru(o)}),Ia=qi(function(t,e,n){ne.call(t,n)?++t[n]:xr(t,n,1)}),Ea=Ji(na),Ta=Ji(ra);function Oa(t,e){return(ru(t)?Be:Er)(t,xo(e,3))}function ja(t,e){return(ru(t)?function(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}:Tr)(t,xo(e,3))}var Pa=qi(function(t,e,n){ne.call(t,n)?t[n].push(e):xr(t,n,[e])}),Ca=pi(function(t,e,n){var r=-1,i="function"==typeof e,o=ou(t)?Rt(t.length):[];return Er(t,function(t){o[++r]=i?Ce(e,t,n):Kr(t,e,n)}),o}),Ma=qi(function(t,e,n){xr(t,n,e)});function Ba(t,e){return(ru(t)?Fe:ei)(t,xo(e,3))}var La=qi(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]}),Ua=pi(function(t,e){if(null==t)return[];var n=e.length;return n>1&&Po(t,e[0],e[1])?e=[]:n>2&&Po(e[0],e[1],e[2])&&(e=[e[0]]),ai(t,Cr(e,1),[])}),za=In||function(){return xe.Date.now()};function Na(e,n,r){return n=r?t:n,n=e&&null==n?e.length:n,fo(e,b,t,t,t,t,n)}function Fa(e,n){var r;if("function"!=typeof n)throw new Zt(o);return e=Du(e),function(){return--e>0&&(r=n.apply(this,arguments)),e<=1&&(n=t),r}}var Wa=pi(function(t,e,n){var r=h;if(n.length){var i=vn(n,wo(Wa));r|=y}return fo(t,r,e,n,i)}),Ya=pi(function(t,e,n){var r=h|m;if(n.length){var i=vn(n,wo(Ya));r|=y}return fo(e,r,t,n,i)});function qa(e,n,r){var i,a,u,c,s,f,l=0,p=!1,h=!1,m=!0;if("function"!=typeof e)throw new Zt(o);function d(n){var r=i,o=a;return i=a=t,l=n,c=e.apply(o,r)}function g(e){var r=e-f;return f===t||r>=n||r<0||h&&e-l>=u}function v(){var t=za();if(g(t))return y(t);s=qo(v,function(t){var e=n-(t-f);return h?Un(e,u-(t-l)):e}(t))}function y(e){return s=t,m&&i?d(e):(i=a=t,c)}function _(){var e=za(),r=g(e);if(i=arguments,a=this,f=e,r){if(s===t)return function(t){return l=t,s=qo(v,n),p?d(t):c}(f);if(h)return Mi(s),s=qo(v,n),d(f)}return s===t&&(s=qo(v,n)),c}return n=Eu(n)||0,hu(r)&&(p=!!r.leading,u=(h="maxWait"in r)?Ln(Eu(r.maxWait)||0,n):u,m="trailing"in r?!!r.trailing:m),_.cancel=function(){s!==t&&Mi(s),l=0,i=f=a=s=t},_.flush=function(){return s===t?c:y(za())},_}var $a=pi(function(t,e){return Dr(t,1,e)}),Va=pi(function(t,e,n){return Dr(t,Eu(e)||0,n)});function Ka(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Zt(o);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Ka.Cache||pr),n}function Ga(t){if("function"!=typeof t)throw new Zt(o);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Ka.Cache=pr;var Ha=Pi(function(t,e){var n=(e=1==e.length&&ru(e[0])?Fe(e[0],an(xo())):Fe(Cr(e,1),an(xo()))).length;return pi(function(r){for(var i=-1,o=Un(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return Ce(t,this,r)})}),Za=pi(function(e,n){var r=vn(n,wo(Za));return fo(e,y,t,n,r)}),Ja=pi(function(e,n){var r=vn(n,wo(Ja));return fo(e,_,t,n,r)}),Xa=go(function(e,n){return fo(e,w,t,t,t,n)});function Qa(t,e){return t===e||t!=t&&e!=e}var tu=oo(Yr),eu=oo(function(t,e){return t>=e}),nu=Gr(function(){return arguments}())?Gr:function(t){return mu(t)&&ne.call(t,"callee")&&!De.call(t,"callee")},ru=Rt.isArray,iu=Ie?an(Ie):function(t){return mu(t)&&Wr(t)==Q};function ou(t){return null!=t&&pu(t.length)&&!fu(t)}function au(t){return mu(t)&&ou(t)}var uu=Pn||Ec,cu=Ee?an(Ee):function(t){return mu(t)&&Wr(t)==L};function su(t){if(!mu(t))return!1;var e=Wr(t);return e==z||e==U||"string"==typeof t.message&&"string"==typeof t.name&&!vu(t)}function fu(t){if(!hu(t))return!1;var e=Wr(t);return e==N||e==F||e==M||e==V}function lu(t){return"number"==typeof t&&t==Du(t)}function pu(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=R}function hu(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function mu(t){return null!=t&&"object"==typeof t}var du=Te?an(Te):function(t){return mu(t)&&Io(t)==W};function gu(t){return"number"==typeof t||mu(t)&&Wr(t)==Y}function vu(t){if(!mu(t)||Wr(t)!=$)return!1;var e=ke(t);if(null===e)return!0;var n=ne.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ee.call(n)==ae}var yu=Oe?an(Oe):function(t){return mu(t)&&Wr(t)==K},_u=je?an(je):function(t){return mu(t)&&Io(t)==G};function bu(t){return"string"==typeof t||!ru(t)&&mu(t)&&Wr(t)==H}function wu(t){return"symbol"==typeof t||mu(t)&&Wr(t)==Z}var xu=Pe?an(Pe):function(t){return mu(t)&&pu(t.length)&&!!de[Wr(t)]},Au=oo(ti),ku=oo(function(t,e){return t<=e});function Su(t){if(!t)return[];if(ou(t))return bu(t)?bn(t):Wi(t);if(kn&&t[kn])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[kn]());var e=Io(t);return(e==W?dn:e==G?yn:Qu)(t)}function Ru(t){return t?(t=Eu(t))===S||t===-S?(t<0?-1:1)*D:t==t?t:0:0===t?t:0}function Du(t){var e=Ru(t),n=e%1;return e==e?n?e-n:e:0}function Iu(t){return t?kr(Du(t),0,E):0}function Eu(t){if("number"==typeof t)return t;if(wu(t))return I;if(hu(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=hu(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=on(t);var n=Bt.test(t);return n||Ut.test(t)?_e(t.slice(2),n?2:8):Mt.test(t)?I:+t}function Tu(t){return Yi(t,$u(t))}function Ou(t){return null==t?"":xi(t)}var ju=$i(function(t,e){if(Lo(e)||ou(e))Yi(e,qu(e),t);else for(var n in e)ne.call(e,n)&&yr(t,n,e[n])}),Pu=$i(function(t,e){Yi(e,$u(e),t)}),Cu=$i(function(t,e,n,r){Yi(e,$u(e),t,r)}),Mu=$i(function(t,e,n,r){Yi(e,qu(e),t,r)}),Bu=go(Ar),Lu=pi(function(e,n){e=Kt(e);var r=-1,i=n.length,o=i>2?n[2]:t;for(o&&Po(n[0],n[1],o)&&(i=1);++r<i;)for(var a=n[r],u=$u(a),c=-1,s=u.length;++c<s;){var f=u[c],l=e[f];(l===t||Qa(l,Qt[f])&&!ne.call(e,f))&&(e[f]=a[f])}return e}),Uu=pi(function(e){return e.push(t,po),Ce(Ku,t,e)});function zu(e,n,r){var i=null==e?t:Nr(e,n);return i===t?r:i}function Nu(t,e){return null!=t&&Eo(t,e,$r)}var Fu=to(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=oe.call(e)),t[e]=n},hc(gc)),Wu=to(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=oe.call(e)),ne.call(t,e)?t[e].push(n):t[e]=[n]},xo),Yu=pi(Kr);function qu(t){return ou(t)?dr(t):Qr(t)}function $u(t){return ou(t)?dr(t,!0):function(t){if(!hu(t))return function(t){var e=[];if(null!=t)for(var n in Kt(t))e.push(n);return e}(t);var e=Lo(t),n=[];for(var r in t)("constructor"!=r||!e&&ne.call(t,r))&&n.push(r);return n}(t)}var Vu=$i(function(t,e,n){ii(t,e,n)}),Ku=$i(function(t,e,n,r){ii(t,e,n,r)}),Gu=go(function(t,e){var n={};if(null==t)return n;var r=!1;e=Fe(e,function(e){return e=ji(e,t),r||(r=e.length>1),e}),Yi(t,yo(t),n),r&&(n=Sr(n,c|s|f,ho));for(var i=e.length;i--;)ki(n,e[i]);return n}),Hu=go(function(t,e){return null==t?{}:function(t,e){return ui(t,e,function(e,n){return Nu(t,n)})}(t,e)});function Zu(t,e){if(null==t)return{};var n=Fe(yo(t),function(t){return[t]});return e=xo(e),ui(t,n,function(t,n){return e(t,n[0])})}var Ju=so(qu),Xu=so($u);function Qu(t){return null==t?[]:un(t,qu(t))}var tc=Hi(function(t,e,n){return e=e.toLowerCase(),t+(n?ec(e):e)});function ec(t){return sc(Ou(t).toLowerCase())}function nc(t){return(t=Ou(t))&&t.replace(Nt,ln).replace(ce,"")}var rc=Hi(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),ic=Hi(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),oc=Gi("toLowerCase"),ac=Hi(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}),uc=Hi(function(t,e,n){return t+(n?" ":"")+sc(e)}),cc=Hi(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),sc=Gi("toUpperCase");function fc(e,n,r){return e=Ou(e),(n=r?t:n)===t?function(t){return pe.test(t)}(e)?function(t){return t.match(fe)||[]}(e):function(t){return t.match(Tt)||[]}(e):e.match(n)||[]}var lc=pi(function(e,n){try{return Ce(e,t,n)}catch(i){return su(i)?i:new qt(i)}}),pc=go(function(t,e){return Be(e,function(e){e=Zo(e),xr(t,e,Wa(t[e],t))}),t});function hc(t){return function(){return t}}var mc=Xi(),dc=Xi(!0);function gc(t){return t}function vc(t){return Xr("function"==typeof t?t:Sr(t,c))}var yc=pi(function(t,e){return function(n){return Kr(n,t,e)}}),_c=pi(function(t,e){return function(n){return Kr(t,n,e)}});function bc(t,e,n){var r=qu(e),i=zr(e,r);null!=n||hu(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=zr(e,qu(e)));var o=!(hu(n)&&"chain"in n&&!n.chain),a=fu(t);return Be(i,function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=Wi(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,We([this.value()],arguments))})}),t}function wc(){}var xc=no(Fe),Ac=no(Le),kc=no($e);function Sc(t){return Co(t)?Qe(Zo(t)):function(t){return function(e){return Nr(e,t)}}(t)}var Rc=io(),Dc=io(!0);function Ic(){return[]}function Ec(){return!1}var Tc,Oc=eo(function(t,e){return t+e},0),jc=uo("ceil"),Pc=eo(function(t,e){return t/e},1),Cc=uo("floor"),Mc=eo(function(t,e){return t*e},1),Bc=uo("round"),Lc=eo(function(t,e){return t-e},0);return or.after=function(t,e){if("function"!=typeof e)throw new Zt(o);return t=Du(t),function(){if(--t<1)return e.apply(this,arguments)}},or.ary=Na,or.assign=ju,or.assignIn=Pu,or.assignInWith=Cu,or.assignWith=Mu,or.at=Bu,or.before=Fa,or.bind=Wa,or.bindAll=pc,or.bindKey=Ya,or.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return ru(t)?t:[t]},or.chain=Sa,or.chunk=function(e,n,r){n=(r?Po(e,n,r):n===t)?1:Ln(Du(n),0);var i=null==e?0:e.length;if(!i||n<1)return[];for(var o=0,a=0,u=Rt(Tn(i/n));o<i;)u[a++]=gi(e,o,o+=n);return u},or.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},or.concat=function(){var t=arguments.length;if(!t)return[];for(var e=Rt(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return We(ru(n)?Wi(n):[n],Cr(e,1))},or.cond=function(t){var e=null==t?0:t.length,n=xo();return t=e?Fe(t,function(t){if("function"!=typeof t[1])throw new Zt(o);return[n(t[0]),t[1]]}):[],pi(function(n){for(var r=-1;++r<e;){var i=t[r];if(Ce(i[0],this,n))return Ce(i[1],this,n)}})},or.conforms=function(t){return function(t){var e=qu(t);return function(n){return Rr(n,t,e)}}(Sr(t,c))},or.constant=hc,or.countBy=Ia,or.create=function(t,e){var n=ar(t);return null==e?n:wr(n,e)},or.curry=function e(n,r,i){var o=fo(n,g,t,t,t,t,t,r=i?t:r);return o.placeholder=e.placeholder,o},or.curryRight=function e(n,r,i){var o=fo(n,v,t,t,t,t,t,r=i?t:r);return o.placeholder=e.placeholder,o},or.debounce=qa,or.defaults=Lu,or.defaultsDeep=Uu,or.defer=$a,or.delay=Va,or.difference=Qo,or.differenceBy=ta,or.differenceWith=ea,or.drop=function(e,n,r){var i=null==e?0:e.length;return i?gi(e,(n=r||n===t?1:Du(n))<0?0:n,i):[]},or.dropRight=function(e,n,r){var i=null==e?0:e.length;return i?gi(e,0,(n=i-(n=r||n===t?1:Du(n)))<0?0:n):[]},or.dropRightWhile=function(t,e){return t&&t.length?Ri(t,xo(e,3),!0,!0):[]},or.dropWhile=function(t,e){return t&&t.length?Ri(t,xo(e,3),!0):[]},or.fill=function(e,n,r,i){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&Po(e,n,r)&&(r=0,i=o),function(e,n,r,i){var o=e.length;for((r=Du(r))<0&&(r=-r>o?0:o+r),(i=i===t||i>o?o:Du(i))<0&&(i+=o),i=r>i?0:Iu(i);r<i;)e[r++]=n;return e}(e,n,r,i)):[]},or.filter=function(t,e){return(ru(t)?Ue:Pr)(t,xo(e,3))},or.flatMap=function(t,e){return Cr(Ba(t,e),1)},or.flatMapDeep=function(t,e){return Cr(Ba(t,e),S)},or.flatMapDepth=function(e,n,r){return r=r===t?1:Du(r),Cr(Ba(e,n),r)},or.flatten=ia,or.flattenDeep=function(t){return null!=t&&t.length?Cr(t,S):[]},or.flattenDepth=function(e,n){return null!=e&&e.length?Cr(e,n=n===t?1:Du(n)):[]},or.flip=function(t){return fo(t,x)},or.flow=mc,or.flowRight=dc,or.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},or.functions=function(t){return null==t?[]:zr(t,qu(t))},or.functionsIn=function(t){return null==t?[]:zr(t,$u(t))},or.groupBy=Pa,or.initial=function(t){return null!=t&&t.length?gi(t,0,-1):[]},or.intersection=aa,or.intersectionBy=ua,or.intersectionWith=ca,or.invert=Fu,or.invertBy=Wu,or.invokeMap=Ca,or.iteratee=vc,or.keyBy=Ma,or.keys=qu,or.keysIn=$u,or.map=Ba,or.mapKeys=function(t,e){var n={};return e=xo(e,3),Lr(t,function(t,r,i){xr(n,e(t,r,i),t)}),n},or.mapValues=function(t,e){var n={};return e=xo(e,3),Lr(t,function(t,r,i){xr(n,r,e(t,r,i))}),n},or.matches=function(t){return ni(Sr(t,c))},or.matchesProperty=function(t,e){return ri(t,Sr(e,c))},or.memoize=Ka,or.merge=Vu,or.mergeWith=Ku,or.method=yc,or.methodOf=_c,or.mixin=bc,or.negate=Ga,or.nthArg=function(t){return t=Du(t),pi(function(e){return oi(e,t)})},or.omit=Gu,or.omitBy=function(t,e){return Zu(t,Ga(xo(e)))},or.once=function(t){return Fa(2,t)},or.orderBy=function(e,n,r,i){return null==e?[]:(ru(n)||(n=null==n?[]:[n]),ru(r=i?t:r)||(r=null==r?[]:[r]),ai(e,n,r))},or.over=xc,or.overArgs=Ha,or.overEvery=Ac,or.overSome=kc,or.partial=Za,or.partialRight=Ja,or.partition=La,or.pick=Hu,or.pickBy=Zu,or.property=Sc,or.propertyOf=function(e){return function(n){return null==e?t:Nr(e,n)}},or.pull=fa,or.pullAll=la,or.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?ci(t,e,xo(n,2)):t},or.pullAllWith=function(e,n,r){return e&&e.length&&n&&n.length?ci(e,n,t,r):e},or.pullAt=pa,or.range=Rc,or.rangeRight=Dc,or.rearg=Xa,or.reject=function(t,e){return(ru(t)?Ue:Pr)(t,Ga(xo(e,3)))},or.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=xo(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return si(t,i),n},or.rest=function(e,n){if("function"!=typeof e)throw new Zt(o);return pi(e,n=n===t?n:Du(n))},or.reverse=ha,or.sampleSize=function(e,n,r){return n=(r?Po(e,n,r):n===t)?1:Du(n),(ru(e)?function(t,e){return Go(Wi(t),kr(e,0,t.length))}:function(t,e){var n=Qu(t);return Go(n,kr(e,0,n.length))})(e,n)},or.set=function(t,e,n){return null==t?t:hi(t,e,n)},or.setWith=function(e,n,r,i){return i="function"==typeof i?i:t,null==e?e:hi(e,n,r,i)},or.shuffle=function(t){return(ru(t)?function(t){return Go(Wi(t))}:function(t){return Go(Qu(t))})(t)},or.slice=function(e,n,r){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&Po(e,n,r)?(n=0,r=i):(n=null==n?0:Du(n),r=r===t?i:Du(r)),gi(e,n,r)):[]},or.sortBy=Ua,or.sortedUniq=function(t){return t&&t.length?bi(t):[]},or.sortedUniqBy=function(t,e){return t&&t.length?bi(t,xo(e,2)):[]},or.split=function(e,n,r){return r&&"number"!=typeof r&&Po(e,n,r)&&(n=r=t),(r=r===t?E:r>>>0)?(e=Ou(e))&&("string"==typeof n||null!=n&&!yu(n))&&!(n=xi(n))&&mn(e)?Ci(bn(e),0,r):e.split(n,r):[]},or.spread=function(t,e){if("function"!=typeof t)throw new Zt(o);return e=null==e?0:Ln(Du(e),0),pi(function(n){var r=n[e],i=Ci(n,0,e);return r&&We(i,r),Ce(t,this,i)})},or.tail=function(t){var e=null==t?0:t.length;return e?gi(t,1,e):[]},or.take=function(e,n,r){return e&&e.length?gi(e,0,(n=r||n===t?1:Du(n))<0?0:n):[]},or.takeRight=function(e,n,r){var i=null==e?0:e.length;return i?gi(e,(n=i-(n=r||n===t?1:Du(n)))<0?0:n,i):[]},or.takeRightWhile=function(t,e){return t&&t.length?Ri(t,xo(e,3),!1,!0):[]},or.takeWhile=function(t,e){return t&&t.length?Ri(t,xo(e,3)):[]},or.tap=function(t,e){return e(t),t},or.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new Zt(o);return hu(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),qa(t,e,{leading:r,maxWait:e,trailing:i})},or.thru=Ra,or.toArray=Su,or.toPairs=Ju,or.toPairsIn=Xu,or.toPath=function(t){return ru(t)?Fe(t,Zo):wu(t)?[t]:Wi(Ho(Ou(t)))},or.toPlainObject=Tu,or.transform=function(t,e,n){var r=ru(t),i=r||uu(t)||xu(t);if(e=xo(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:hu(t)&&fu(o)?ar(ke(t)):{}}return(i?Be:Lr)(t,function(t,r,i){return e(n,t,r,i)}),n},or.unary=function(t){return Na(t,1)},or.union=ma,or.unionBy=da,or.unionWith=ga,or.uniq=function(t){return t&&t.length?Ai(t):[]},or.uniqBy=function(t,e){return t&&t.length?Ai(t,xo(e,2)):[]},or.uniqWith=function(e,n){return n="function"==typeof n?n:t,e&&e.length?Ai(e,t,n):[]},or.unset=function(t,e){return null==t||ki(t,e)},or.unzip=va,or.unzipWith=ya,or.update=function(t,e,n){return null==t?t:Si(t,e,Oi(n))},or.updateWith=function(e,n,r,i){return i="function"==typeof i?i:t,null==e?e:Si(e,n,Oi(r),i)},or.values=Qu,or.valuesIn=function(t){return null==t?[]:un(t,$u(t))},or.without=_a,or.words=fc,or.wrap=function(t,e){return Za(Oi(e),t)},or.xor=ba,or.xorBy=wa,or.xorWith=xa,or.zip=Aa,or.zipObject=function(t,e){return Ei(t||[],e||[],yr)},or.zipObjectDeep=function(t,e){return Ei(t||[],e||[],hi)},or.zipWith=ka,or.entries=Ju,or.entriesIn=Xu,or.extend=Pu,or.extendWith=Cu,bc(or,or),or.add=Oc,or.attempt=lc,or.camelCase=tc,or.capitalize=ec,or.ceil=jc,or.clamp=function(e,n,r){return r===t&&(r=n,n=t),r!==t&&(r=(r=Eu(r))==r?r:0),n!==t&&(n=(n=Eu(n))==n?n:0),kr(Eu(e),n,r)},or.clone=function(t){return Sr(t,f)},or.cloneDeep=function(t){return Sr(t,c|f)},or.cloneDeepWith=function(e,n){return Sr(e,c|f,n="function"==typeof n?n:t)},or.cloneWith=function(e,n){return Sr(e,f,n="function"==typeof n?n:t)},or.conformsTo=function(t,e){return null==e||Rr(t,e,qu(e))},or.deburr=nc,or.defaultTo=function(t,e){return null==t||t!=t?e:t},or.divide=Pc,or.endsWith=function(e,n,r){e=Ou(e),n=xi(n);var i=e.length,o=r=r===t?i:kr(Du(r),0,i);return(r-=n.length)>=0&&e.slice(r,o)==n},or.eq=Qa,or.escape=function(t){return(t=Ou(t))&>.test(t)?t.replace(mt,pn):t},or.escapeRegExp=function(t){return(t=Ou(t))&&kt.test(t)?t.replace(At,"\\$&"):t},or.every=function(e,n,r){var i=ru(e)?Le:Or;return r&&Po(e,n,r)&&(n=t),i(e,xo(n,3))},or.find=Ea,or.findIndex=na,or.findKey=function(t,e){return Ke(t,xo(e,3),Lr)},or.findLast=Ta,or.findLastIndex=ra,or.findLastKey=function(t,e){return Ke(t,xo(e,3),Ur)},or.floor=Cc,or.forEach=Oa,or.forEachRight=ja,or.forIn=function(t,e){return null==t?t:Mr(t,xo(e,3),$u)},or.forInRight=function(t,e){return null==t?t:Br(t,xo(e,3),$u)},or.forOwn=function(t,e){return t&&Lr(t,xo(e,3))},or.forOwnRight=function(t,e){return t&&Ur(t,xo(e,3))},or.get=zu,or.gt=tu,or.gte=eu,or.has=function(t,e){return null!=t&&Eo(t,e,qr)},or.hasIn=Nu,or.head=oa,or.identity=gc,or.includes=function(t,e,n,r){t=ou(t)?t:Qu(t),n=n&&!r?Du(n):0;var i=t.length;return n<0&&(n=Ln(i+n,0)),bu(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&He(t,e,n)>-1},or.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:Du(n);return i<0&&(i=Ln(r+i,0)),He(t,e,i)},or.inRange=function(e,n,r){return n=Ru(n),r===t?(r=n,n=0):r=Ru(r),function(t,e,n){return t>=Un(e,n)&&t<Ln(e,n)}(e=Eu(e),n,r)},or.invoke=Yu,or.isArguments=nu,or.isArray=ru,or.isArrayBuffer=iu,or.isArrayLike=ou,or.isArrayLikeObject=au,or.isBoolean=function(t){return!0===t||!1===t||mu(t)&&Wr(t)==B},or.isBuffer=uu,or.isDate=cu,or.isElement=function(t){return mu(t)&&1===t.nodeType&&!vu(t)},or.isEmpty=function(t){if(null==t)return!0;if(ou(t)&&(ru(t)||"string"==typeof t||"function"==typeof t.splice||uu(t)||xu(t)||nu(t)))return!t.length;var e=Io(t);if(e==W||e==G)return!t.size;if(Lo(t))return!Qr(t).length;for(var n in t)if(ne.call(t,n))return!1;return!0},or.isEqual=function(t,e){return Hr(t,e)},or.isEqualWith=function(e,n,r){var i=(r="function"==typeof r?r:t)?r(e,n):t;return i===t?Hr(e,n,t,r):!!i},or.isError=su,or.isFinite=function(t){return"number"==typeof t&&Cn(t)},or.isFunction=fu,or.isInteger=lu,or.isLength=pu,or.isMap=du,or.isMatch=function(t,e){return t===e||Zr(t,e,ko(e))},or.isMatchWith=function(e,n,r){return r="function"==typeof r?r:t,Zr(e,n,ko(n),r)},or.isNaN=function(t){return gu(t)&&t!=+t},or.isNative=function(t){if(Bo(t))throw new qt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Jr(t)},or.isNil=function(t){return null==t},or.isNull=function(t){return null===t},or.isNumber=gu,or.isObject=hu,or.isObjectLike=mu,or.isPlainObject=vu,or.isRegExp=yu,or.isSafeInteger=function(t){return lu(t)&&t>=-R&&t<=R},or.isSet=_u,or.isString=bu,or.isSymbol=wu,or.isTypedArray=xu,or.isUndefined=function(e){return e===t},or.isWeakMap=function(t){return mu(t)&&Io(t)==X},or.isWeakSet=function(t){return mu(t)&&"[object WeakSet]"==Wr(t)},or.join=function(t,e){return null==t?"":Mn.call(t,e)},or.kebabCase=rc,or.last=sa,or.lastIndexOf=function(e,n,r){var i=null==e?0:e.length;if(!i)return-1;var o=i;return r!==t&&(o=(o=Du(r))<0?Ln(i+o,0):Un(o,i-1)),n==n?function(t,e,n){for(var r=o+1;r--;)if(t[r]===e)return r;return r}(e,n):Ge(e,Je,o,!0)},or.lowerCase=ic,or.lowerFirst=oc,or.lt=Au,or.lte=ku,or.max=function(e){return e&&e.length?jr(e,gc,Yr):t},or.maxBy=function(e,n){return e&&e.length?jr(e,xo(n,2),Yr):t},or.mean=function(t){return Xe(t,gc)},or.meanBy=function(t,e){return Xe(t,xo(e,2))},or.min=function(e){return e&&e.length?jr(e,gc,ti):t},or.minBy=function(e,n){return e&&e.length?jr(e,xo(n,2),ti):t},or.stubArray=Ic,or.stubFalse=Ec,or.stubObject=function(){return{}},or.stubString=function(){return""},or.stubTrue=function(){return!0},or.multiply=Mc,or.nth=function(e,n){return e&&e.length?oi(e,Du(n)):t},or.noConflict=function(){return xe._===this&&(xe._=se),this},or.noop=wc,or.now=za,or.pad=function(t,e,n){t=Ou(t);var r=(e=Du(e))?_n(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return ro(On(i),n)+t+ro(Tn(i),n)},or.padEnd=function(t,e,n){t=Ou(t);var r=(e=Du(e))?_n(t):0;return e&&r<e?t+ro(e-r,n):t},or.padStart=function(t,e,n){t=Ou(t);var r=(e=Du(e))?_n(t):0;return e&&r<e?ro(e-r,n)+t:t},or.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),Nn(Ou(t).replace(St,""),e||0)},or.random=function(e,n,r){if(r&&"boolean"!=typeof r&&Po(e,n,r)&&(n=r=t),r===t&&("boolean"==typeof n?(r=n,n=t):"boolean"==typeof e&&(r=e,e=t)),e===t&&n===t?(e=0,n=1):(e=Ru(e),n===t?(n=e,e=0):n=Ru(n)),e>n){var i=e;e=n,n=i}if(r||e%1||n%1){var o=Fn();return Un(e+o*(n-e+ye("1e-"+((o+"").length-1))),n)}return fi(e,n)},or.reduce=function(t,e,n){var r=ru(t)?Ye:en,i=arguments.length<3;return r(t,xo(e,4),n,i,Er)},or.reduceRight=function(t,e,n){var r=ru(t)?qe:en,i=arguments.length<3;return r(t,xo(e,4),n,i,Tr)},or.repeat=function(e,n,r){return n=(r?Po(e,n,r):n===t)?1:Du(n),li(Ou(e),n)},or.replace=function(){var t=arguments,e=Ou(t[0]);return t.length<3?e:e.replace(t[1],t[2])},or.result=function(e,n,r){var i=-1,o=(n=ji(n,e)).length;for(o||(o=1,e=t);++i<o;){var a=null==e?t:e[Zo(n[i])];a===t&&(i=o,a=r),e=fu(a)?a.call(e):a}return e},or.round=Bc,or.runInContext=e,or.sample=function(t){return(ru(t)?gr:function(t){return gr(Qu(t))})(t)},or.size=function(t){if(null==t)return 0;if(ou(t))return bu(t)?_n(t):t.length;var e=Io(t);return e==W||e==G?t.size:Qr(t).length},or.snakeCase=ac,or.some=function(e,n,r){var i=ru(e)?$e:vi;return r&&Po(e,n,r)&&(n=t),i(e,xo(n,3))},or.sortedIndex=function(t,e){return yi(t,e)},or.sortedIndexBy=function(t,e,n){return _i(t,e,xo(n,2))},or.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=yi(t,e);if(r<n&&Qa(t[r],e))return r}return-1},or.sortedLastIndex=function(t,e){return yi(t,e,!0)},or.sortedLastIndexBy=function(t,e,n){return _i(t,e,xo(n,2),!0)},or.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=yi(t,e,!0)-1;if(Qa(t[n],e))return n}return-1},or.startCase=uc,or.startsWith=function(t,e,n){return t=Ou(t),n=null==n?0:kr(Du(n),0,t.length),e=xi(e),t.slice(n,n+e.length)==e},or.subtract=Lc,or.sum=function(t){return t&&t.length?nn(t,gc):0},or.sumBy=function(t,e){return t&&t.length?nn(t,xo(e,2)):0},or.template=function(e,n,r){var i=or.templateSettings;r&&Po(e,n,r)&&(n=t),e=Ou(e),n=Cu({},n,i,lo);var o,a,u=Cu({},n.imports,i.imports,lo),c=qu(u),s=un(u,c),f=0,l=n.interpolate||Ft,p="__p += '",h=Gt((n.escape||Ft).source+"|"+l.source+"|"+(l===_t?Pt:Ft).source+"|"+(n.evaluate||Ft).source+"|$","g"),m="//# sourceURL="+(ne.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++me+"]")+"\n";e.replace(h,function(t,n,r,i,u,c){return r||(r=i),p+=e.slice(f,c).replace(Wt,hn),n&&(o=!0,p+="' +\n__e("+n+") +\n'"),u&&(a=!0,p+="';\n"+u+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),f=c+t.length,t}),p+="';\n";var d=ne.call(n,"variable")&&n.variable;if(d){if(Ot.test(d))throw new qt("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(a?p.replace(ft,""):p).replace(lt,"$1").replace(pt,"$1;"),p="function("+(d||"obj")+") {\n"+(d?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var g=lc(function(){return $t(c,m+"return "+p).apply(t,s)});if(g.source=p,su(g))throw g;return g},or.times=function(t,e){if((t=Du(t))<1||t>R)return[];var n=E,r=Un(t,E);e=xo(e),t-=E;for(var i=rn(r,e);++n<t;)e(n);return i},or.toFinite=Ru,or.toInteger=Du,or.toLength=Iu,or.toLower=function(t){return Ou(t).toLowerCase()},or.toNumber=Eu,or.toSafeInteger=function(t){return t?kr(Du(t),-R,R):0===t?t:0},or.toString=Ou,or.toUpper=function(t){return Ou(t).toUpperCase()},or.trim=function(e,n,r){if((e=Ou(e))&&(r||n===t))return on(e);if(!e||!(n=xi(n)))return e;var i=bn(e),o=bn(n);return Ci(i,sn(i,o),fn(i,o)+1).join("")},or.trimEnd=function(e,n,r){if((e=Ou(e))&&(r||n===t))return e.slice(0,wn(e)+1);if(!e||!(n=xi(n)))return e;var i=bn(e);return Ci(i,0,fn(i,bn(n))+1).join("")},or.trimStart=function(e,n,r){if((e=Ou(e))&&(r||n===t))return e.replace(St,"");if(!e||!(n=xi(n)))return e;var i=bn(e);return Ci(i,sn(i,bn(n))).join("")},or.truncate=function(e,n){var r=30,i="...";if(hu(n)){var o="separator"in n?n.separator:o;r="length"in n?Du(n.length):r,i="omission"in n?xi(n.omission):i}var a=(e=Ou(e)).length;if(mn(e)){var u=bn(e);a=u.length}if(r>=a)return e;var c=r-_n(i);if(c<1)return i;var s=u?Ci(u,0,c).join(""):e.slice(0,c);if(o===t)return s+i;if(u&&(c+=s.length-c),yu(o)){if(e.slice(c).search(o)){var f,l=s;for(o.global||(o=Gt(o.source,Ou(Ct.exec(o))+"g")),o.lastIndex=0;f=o.exec(l);)var p=f.index;s=s.slice(0,p===t?c:p)}}else if(e.indexOf(xi(o),c)!=c){var h=s.lastIndexOf(o);h>-1&&(s=s.slice(0,h))}return s+i},or.unescape=function(t){return(t=Ou(t))&&dt.test(t)?t.replace(ht,xn):t},or.uniqueId=function(t){var e=++re;return Ou(t)+e},or.upperCase=cc,or.upperFirst=sc,or.each=Oa,or.eachRight=ja,or.first=oa,bc(or,(Tc={},Lr(or,function(t,e){ne.call(or.prototype,e)||(Tc[e]=t)}),Tc),{chain:!1}),or.VERSION="4.17.21",Be(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){or[t].placeholder=or}),Be(["drop","take"],function(e,n){sr.prototype[e]=function(r){r=r===t?1:Ln(Du(r),0);var i=this.__filtered__&&!n?new sr(this):this.clone();return i.__filtered__?i.__takeCount__=Un(r,i.__takeCount__):i.__views__.push({size:Un(r,E),type:e+(i.__dir__<0?"Right":"")}),i},sr.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),Be(["filter","map","takeWhile"],function(t,e){var n=e+1,r=1==n||3==n;sr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:xo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}}),Be(["head","last"],function(t,e){var n="take"+(e?"Right":"");sr.prototype[t]=function(){return this[n](1).value()[0]}}),Be(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");sr.prototype[t]=function(){return this.__filtered__?new sr(this):this[n](1)}}),sr.prototype.compact=function(){return this.filter(gc)},sr.prototype.find=function(t){return this.filter(t).head()},sr.prototype.findLast=function(t){return this.reverse().find(t)},sr.prototype.invokeMap=pi(function(t,e){return"function"==typeof t?new sr(this):this.map(function(n){return Kr(n,t,e)})}),sr.prototype.reject=function(t){return this.filter(Ga(xo(t)))},sr.prototype.slice=function(e,n){e=Du(e);var r=this;return r.__filtered__&&(e>0||n<0)?new sr(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),n!==t&&(r=(n=Du(n))<0?r.dropRight(-n):r.take(n-e)),r)},sr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},sr.prototype.toArray=function(){return this.take(E)},Lr(sr.prototype,function(e,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),i=/^(?:head|last)$/.test(n),o=or[i?"take"+("last"==n?"Right":""):n],a=i||/^find/.test(n);o&&(or.prototype[n]=function(){var n=this.__wrapped__,u=i?[1]:arguments,c=n instanceof sr,s=u[0],f=c||ru(n),l=function(t){var e=o.apply(or,We([t],u));return i&&p?e[0]:e};f&&r&&"function"==typeof s&&1!=s.length&&(c=f=!1);var p=this.__chain__,h=!!this.__actions__.length,m=a&&!p,d=c&&!h;if(!a&&f){n=d?n:new sr(this);var g=e.apply(n,u);return g.__actions__.push({func:Ra,args:[l],thisArg:t}),new cr(g,p)}return m&&d?e.apply(this,u):(g=this.thru(l),m?i?g.value()[0]:g.value():g)})}),Be(["pop","push","shift","sort","splice","unshift"],function(t){var e=Jt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);or.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(ru(i)?i:[],t)}return this[n](function(n){return e.apply(ru(n)?n:[],t)})}}),Lr(sr.prototype,function(t,e){var n=or[e];if(n){var r=n.name+"";ne.call(Zn,r)||(Zn[r]=[]),Zn[r].push({name:e,func:n})}}),Zn[Qi(t,m).name]=[{name:"wrapper",func:t}],sr.prototype.clone=function(){var t=new sr(this.__wrapped__);return t.__actions__=Wi(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Wi(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Wi(this.__views__),t},sr.prototype.reverse=function(){if(this.__filtered__){var t=new sr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},sr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=ru(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=Un(e,t+a);break;case"takeRight":t=Ln(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,u=o.end,c=u-a,s=r?u:a-1,f=this.__iteratees__,l=f.length,p=0,h=Un(c,this.__takeCount__);if(!n||!r&&i==c&&h==c)return Di(t,this.__actions__);var m=[];t:for(;c--&&p<h;){for(var d=-1,g=t[s+=e];++d<l;){var v=f[d],y=v.iteratee,_=v.type,b=y(g);if(2==_)g=b;else if(!b){if(1==_)continue t;break t}}m[p++]=g}return m},or.prototype.at=Da,or.prototype.chain=function(){return Sa(this)},or.prototype.commit=function(){return new cr(this.value(),this.__chain__)},or.prototype.next=function(){this.__values__===t&&(this.__values__=Su(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?t:this.__values__[this.__index__++]}},or.prototype.plant=function(e){for(var n,r=this;r instanceof ur;){var i=Xo(r);i.__index__=0,i.__values__=t,n?o.__wrapped__=i:n=i;var o=i;r=r.__wrapped__}return o.__wrapped__=e,n},or.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof sr){var n=e;return this.__actions__.length&&(n=new sr(this)),(n=n.reverse()).__actions__.push({func:Ra,args:[ha],thisArg:t}),new cr(n,this.__chain__)}return this.thru(ha)},or.prototype.toJSON=or.prototype.valueOf=or.prototype.value=function(){return Di(this.__wrapped__,this.__actions__)},or.prototype.first=or.prototype.head,kn&&(or.prototype[kn]=function(){return this}),or}();ke?((ke.exports=An)._=An,Ae._=An):xe._=An}).call(this)},{buffer:"dskh"}],I6jy:[function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function o(){o=function(t,e){return new n(t,void 0,e)};var t=RegExp.prototype,e=new WeakMap;function n(t,r,i){var o=new RegExp(t,r);return e.set(o,i||e.get(t)),a(o,n.prototype)}function i(t,n){var r=e.get(n);return Object.keys(r).reduce(function(e,n){return e[n]=t[r[n]],e},Object.create(null))}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}}),e&&a(t,e)}(n,RegExp),n.prototype.exec=function(e){var n=t.exec.call(this,e);return n&&(n.groups=i(n,this)),n},n.prototype[Symbol.replace]=function(n,o){if("string"==typeof o){var a=e.get(this);return t[Symbol.replace].call(this,n,o.replace(/\$<([^>]+)>/g,function(t,e){return"$"+a[e]}))}if("function"==typeof o){var u=this;return t[Symbol.replace].call(this,n,function(){var t=arguments;return"object"!==r(t[t.length-1])&&(t=[].slice.call(t)).push(i(t,u)),o.apply(this,t)})}return t[Symbol.replace].call(this,n,o)},o.apply(this,arguments)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),c=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&u(e,t,n);return c(e,t),e},f=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{c(r.next(t))}catch(e){o(e)}}function u(t){try{c(r.throw(t))}catch(e){o(e)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,u)}c((r=r.apply(t,e||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.getExpressionDocContext=n.getExpressionLine=n.getFileExtension=n.SupportedFileExtensions=n.AllMetaCommands=n.AllKeywords=n.Keywords=n.MetaCommands=n.SupportedUsingFileExtensions=n.SupportedDocumentContextValues=void 0;var l=t("./WerckmeisterAutoHintDb"),p=s(t("lodash"));n.SupportedDocumentContextValues={voice:"voice",document:"document",track:"track",accomp:"accomp",mod:"mod",voicingStrategy:"voicingStrategy"},n.SupportedUsingFileExtensions=[".lua",".template",".chords",".pitchmap",".config",".conductions"],n.MetaCommands=p.fromPairs(p.map(l.getAutoHintDb(),function(t,e){return[e,e]})),n.Keywords=Object.assign({using:"using"},n.MetaCommands),n.AllKeywords=p.values(n.Keywords),n.AllMetaCommands=p.values(n.MetaCommands);var h=["(".concat(n.AllMetaCommands.join("|"),")\\s*:\\s*[^/;]*$"),"".concat(n.Keywords.using,"[^;]*$")],m=new RegExp(".*?(".concat(h.join("|"),")"),"s"),d=o(/(.*\/([0-9A-Z_a-z]+$))|(^([A-Za-z]+)$)/,{a:2,b:4}),g=/\.*?\{[^}]*$/,v=/\.*?\[[^\]]*$/;n.SupportedFileExtensions=[].concat(function(t){return function(t){if(Array.isArray(t))return i(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 i(t,e);var n=Object.prototype.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)?i(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.")}()}(n.SupportedUsingFileExtensions),[".sheet"]),n.getFileExtension=function(t){if(t)return(t.match(/^.*(\.\w+)$/)||[])[1]},n.getExpressionLine=function(t,e){var n;return f(this,void 0,void 0,regeneratorRuntime.mark(function r(){var i,o,a,u,c,s,f,l;return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:i=e.line;case 1:if(!(i>=0)){r.next=16;break}return o={line:i,col:0},r.next=5,t.getRange(o,e);case 5:if(a=r.sent,!(u=m.exec(a))){r.next=10;break}return c=u[1],r.abrupt("return",c.replace(/\n/g," "));case 10:if(!(p.findIndex(a,function(t){return"]"===t||"}"===t||";"===t})>=0)){r.next=13;break}return r.abrupt("break",16);case 13:--i,r.next=1;break;case 16:return r.next=18,t.getRange({line:e.line,col:0},e);case 18:if(s=r.sent,f=(null===(n=s.match(d))||void 0===n?void 0:n.groups)||{},!(l=f.a||f.b)){r.next=23;break}return r.abrupt("return",l);case 23:return r.abrupt("return","");case 24:case"end":return r.stop()}},r)}))},n.getExpressionDocContext=function(t,e){return f(this,void 0,void 0,regeneratorRuntime.mark(function r(){var i,o;return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return i={line:0,col:0},r.next=3,t.getRange(i,e);case 3:if(!(o=r.sent).match(g)){r.next=6;break}return r.abrupt("return",n.SupportedDocumentContextValues.voice);case 6:if(!o.match(v)){r.next=8;break}return r.abrupt("return",n.SupportedDocumentContextValues.track);case 8:return r.abrupt("return",n.SupportedDocumentContextValues.document);case 9:case"end":return r.stop()}},r)}))}},{"./WerckmeisterAutoHintDb":"Y3F9",lodash:"B1iE"}],zyF4:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.GMInstruments=void 0,n.GMInstruments=["Acoustic Grand Piano","Bright Acoustic Piano","Electric Grand Piano","Honky-tonk Piano","Electric Piano 1","Electric Piano 2","Harpsichord","Clavi","Celesta","Glockenspiel","Music Box","Vibraphone","Marimba","Xylophone","Tubular Bells","Dulcimer","Drawbar Organ","Percussive Organ","Rock Organ","Church Organ","Reed Organ","Accordion","Harmonica","Tango Accordion","Acoustic Guitar Nylon","Acoustic Guitar Steel","Electric Guitar Jazz","Electric Guitar Clean","Electric Guitar Muted","Overdriven Guitar","Distortion Guitar","Guitar harmonics","Acoustic Bass","Electric Bass Finger","Electric Bass Pick","Fretless Bass","Slap Bass 1","Slap Bass 2","Synth Bass 1","Synth Bass 2","Violin","Viola","Cello","Contrabass","Tremolo Strings","Pizzicato Strings","Orchestral Harp","Timpani","String Ensemble 1","String Ensemble 2","SynthStrings 1","SynthStrings 2","Choir Aahs","Voice Oohs","Synth Voice","Orchestra Hit","Trumpet","Trombone","Tuba","Muted Trumpet","French Horn","Brass Section","SynthBrass 1","SynthBrass 2","Soprano Sax","Alto Sax","Tenor Sax","Baritone Sax","Oboe","English Horn","Bassoon","Clarinet","Piccolo","Flute","Recorder","Pan Flute","Blown Bottle","Shakuhachi","Whistle","Ocarina","Lead 1 Square","Lead 2 Sawtooth","Lead 3 Calliope","Lead 4 Chiff","Lead 5 Charang","Lead 6 Voice","Lead 7 Fifths","Lead 8 Bass+Lead","Pad 1 New Age","Pad 2 Warm","Pad 3 Polysynth","Pad 4 Choir","Pad 5 Bowed","Pad 6 Metallic","Pad 7 Halo","Pad 8 Sweep","FX 1 Rain","FX 2 Soundtrack","FX 3 Crystal","FX 4 Atmosphere","FX 5 Brightness","FX 6 Goblins","FX 7 Echoes","FX 8 Sci-Fi","Sitar","Banjo","Shamisen","Koto","Kalimba","Bag pipe","Fiddle","Shanai","Tinkle Bell","Agogo","Steel Drums","Woodblock","Taiko Drum","Melodic Tom","Synth Drum","Reverse Cymbal","Guitar Fret Noise","Breath Noise","Seashore","Bird Tweet","Telephone Ring","Helicopter","Applause","Gunshot"]},{}],ykR4:[function(t,e,n){"use strict";function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}var o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{c(r.next(t))}catch(e){o(e)}}function u(t){try{c(r.throw(t))}catch(e){o(e)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,u)}c((r=r.apply(t,e||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.CommandArgument=void 0;var a=t("../../Common"),u=t("./GMInstruments"),c=t("../../WerckmeisterAutoHintDb"),s=[a.Keywords.mod,a.Keywords.voicingStrategy,a.Keywords.do,a.Keywords.doOnce],f=[a.Keywords.volume,a.Keywords.pan],l=[].concat(f,s),p=function(){function t(e){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.environmentInspector=e,this.autoHintDb=c.getAutoHintDb()}return i(t,[{key:"getModName",value:function(t){t=t||"";var e=l.join("|"),n=new RegExp("\\s*(".concat(a.Keywords.modOnce,"|").concat(e,')\\s*:.*_use="?([a-zA-Z0-9]+)"?')).exec(t);return n||(n=new RegExp("\\s*(".concat(a.Keywords.modOnce,"|").concat(e,")\\s*:\\s*([a-zA-Z0-9]+)")).exec(t)),!n||n.length<2?"":n[2]}},{key:"getInstrumentConfModName",value:function(t){t=t||"";var e=l.join("|"),n=(new RegExp(".*(".concat(e,").*")).exec(t)||[])[1];if(n&&f.includes(n))return n;e=l.map(function(t){return"".concat(t,".*")}).join("|");var r=(new RegExp(".*(".concat(e,")")).exec(t)||[])[1];if(r){var i=r.match(/\s*_use="?([a-zA-Z0-9]+)"?/);return i&&i.length>1?i[1]:(e=l.join("|"),!(i=new RegExp("\\s*(".concat(e,")\\s*([a-zA-Z0-9]+)")).exec(r))||i.length<2?"":i[2])}}},{key:"isMod",value:function(t){return t===a.Keywords.mod||t===a.Keywords.modOnce||t===a.Keywords.voicingStrategy}},{key:"isInstrumentConf",value:function(t){return t===a.Keywords.instrumentConf}},{key:"getParameterSuggestion",value:function(t,e){var n=t.getParameter();return e&&(n=n.filter(function(t){return t.getName().startsWith(e)})),n.sort(function(t,e){return t.getName().localeCompare(e.getName())}).map(function(e){return{displayText:e.getName(),text:"_".concat(e.getName()),deprecated:e.getDeprecatedText(),command:t,description:e.getDescription()}})}},{key:"getInstrumentDefPcSuggestions",value:function(t,e,n){var r=u.GMInstruments.map(function(n,r){return{displayText:"".concat(n," (").concat(r,")"),text:r.toString(),command:t,parameter:e}});return n&&(r=r.filter(function(t){return t.displayText.toLowerCase().indexOf(n.toLowerCase())>=0})),r}},{key:"getDeviceList",value:function(t,e,n){return o(this,void 0,void 0,regeneratorRuntime.mark(function r(){var i,o;return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.environmentInspector.getMidiOutputDevices();case 2:return i=r.sent,o=i.map(function(n){return{displayText:"".concat(n.name," (").concat(n.id,")"),text:n.id,command:t,parameter:e}}),n&&(o=o.filter(function(t){return t.displayText.toLowerCase().indexOf(n.toLowerCase())>=0})),r.abrupt("return",o);case 6:case"end":return r.stop()}},r,this)}))}},{key:"getValueSuggestion",value:function(t,e,n){return o(this,void 0,void 0,regeneratorRuntime.mark(function r(){var i,o,u,c;return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(i=t.getParameter().filter(function(t){return t.getName()===e})[0]){r.next=3;break}return r.abrupt("return",[]);case 3:if(t.getName()!==a.Keywords.instrumentDef||"pc"!=e){r.next=5;break}return r.abrupt("return",this.getInstrumentDefPcSuggestions(t,i,n));case 5:if(t.getName()!==a.Keywords.device||"usePort"!=e){r.next=9;break}return r.next=8,this.getDeviceList(t,i,n);case 8:return r.abrupt("return",r.sent);case 9:if("web"!==this.environmentInspector.environment||t.getName()!==a.Keywords.device||"isType"!=e){r.next=11;break}return r.abrupt("return",[{command:t,displayText:"webPlayer",text:"webPlayer"}]);case 11:if("web"!==this.environmentInspector.environment||t.getName()!==a.Keywords.device||"useFont"!=e){r.next=13;break}return r.abrupt("return",(this.environmentInspector.webplayerPresets||[]).map(function(e){return{command:t,displayText:e,text:e}}));case 13:if(o=i.getType()||"",(u=o.match(/\[(.*)\]/))&&u[1]){r.next=17;break}return r.abrupt("return",[]);case 17:return c=u[1].split(",").map(function(t){return t.trim()}),n&&(c=c.filter(function(t){return t.startsWith(n)})),r.abrupt("return",c.map(function(e){return{displayText:e,text:'"'.concat(e,'"'),command:t,parameter:i}}));case 20:case"end":return r.stop()}},r,this)}))}},{key:"getSuggestions",value:function(t,e,n){return o(this,void 0,void 0,regeneratorRuntime.mark(function e(){var n,r,i,o,a,u,c;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return",[]);case 2:if(n=t.match(/.*?(\w+)\s*:.*?_(\w*)(="?(\w*))?$/)){e.next=5;break}return e.abrupt("return",[]);case 5:if(r=(n[1]||"").trim(),i=void 0!==n[3],o=(n[2]||"").trim(),this.isMod(r)&&(r=this.getModName(t)),this.isInstrumentConf(r)&&(r=this.getInstrumentConfModName(t)),a=this.autoHintDb[r]){e.next=13;break}return e.abrupt("return",[]);case 13:if(!i){e.next=19;break}return u=(n[2]||"").trim(),c=(n[4]||"").trim(),e.next=18,this.getValueSuggestion(a,u,c);case 18:return e.abrupt("return",e.sent);case 19:return e.abrupt("return",this.getParameterSuggestion(a,o));case 20:case"end":return e.stop()}},e,this)}))}}]),t}();n.CommandArgument=p},{"../../Common":"I6jy","./GMInstruments":"zyF4","../../WerckmeisterAutoHintDb":"Y3F9"}],nviV:[function(t,e,n){"use strict";function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}var o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{c(r.next(t))}catch(e){o(e)}}function u(t){try{c(r.throw(t))}catch(e){o(e)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,u)}c((r=r.apply(t,e||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.Command=void 0;var a=t("lodash"),u=t("../../WerckmeisterAutoHintDb"),c=function(){function t(){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.commandDb=u.getAutoHintDb()}return i(t,[{key:"getSuggestions",value:function(t,e,n){return o(this,void 0,void 0,regeneratorRuntime.mark(function e(){var r,i;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.toLowerCase(),i=a(this.commandDb).filter(function(t,e){return e.toLowerCase().indexOf(r)>=0&&t.getDocumentContext().includes(n)}).value(),e.abrupt("return",i.map(function(t){return{displayText:t.getName(),text:t.getName(),description:t.getDescription(),url:t.getUrl()}}));case 3:case"end":return e.stop()}},e,this)}))}}]),t}();n.Command=c},{lodash:"B1iE","../../WerckmeisterAutoHintDb":"Y3F9"}],Tlxz:[function(t,e,n){"use strict";function r(t){return function(t){if(Array.isArray(t))return i(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 i(t,e);var n=Object.prototype.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)?i(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 i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var a=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),u=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),c=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&a(e,t,n);return u(e,t),e},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{c(r.next(t))}catch(e){o(e)}}function u(t){try{c(r.throw(t))}catch(e){o(e)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,u)}c((r=r.apply(t,e||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.Using=void 0;var f=t("../../Common"),l=c(t("lodash")),p=t("../../WerckmeisterAutoHintDb").getPreInstalledAuxFiles(),h=function(){function t(e){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.fileInspector=e}return function(t,e,n){e&&o(t.prototype,e),n&&o(t,n)}(t,[{key:"ls",value:function(t,e){return s(this,void 0,void 0,regeneratorRuntime.mark(function n(){var i,o,a;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.fileInspector.ls(t);case 2:return i=n.sent,(e=e.trim()).endsWith("/")&&e.length>1&&(e=l.trimEnd(e,"/")),(o=p[e])&&(a=i).push.apply(a,r(o.map(function(t){return{name:t.name,isDirectory:t.isDirectory||!1}}))),i=l.uniqBy(i,function(t){return t.name}),n.abrupt("return",i);case 9:case"end":return n.stop()}},n,this)}))}},{key:"getSuggestions",value:function(t,e,n){return s(this,void 0,void 0,regeneratorRuntime.mark(function n(){var r,i,o,a,u,c;return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(t){n.next=2;break}return n.abrupt("return",[]);case 2:if(t.match(/^\s*using\s*"{0,1}[^"]*$/)){n.next=5;break}return n.abrupt("return",[]);case 5:if(r=(t.match(/.+"(.*)/)||[])[1]){n.next=8;break}return n.abrupt("return",[]);case 8:return i=r?l.last(r.split("/")):"",n.next=11,e.getAbsolutePath();case 11:return o=n.sent,n.next=14,this.fileInspector.getParentPath(o);case 14:if(o=n.sent,a=r,!i){n.next=20;break}return n.next=19,this.fileInspector.getParentPath(r);case 19:a=n.sent;case 20:return n.next=22,this.fileInspector.resolve(o,a);case 22:return a=n.sent,n.next=25,this.ls(a,r);case 25:return u=n.sent,c=u.filter(function(t){return t.isDirectory||f.SupportedUsingFileExtensions.includes(f.getFileExtension(t.name))}),i&&(c=c.filter(function(t){return t.name.startsWith(i)})),n.abrupt("return",c.sort(function(t,e){return t.isDirectory&&!e.isDirectory?-1:!t.isDirectory&&e.isDirectory?1:t.name.localeCompare(e.name)}).map(function(t){return{displayText:t.name,text:t.name,file:t}}));case 29:case"end":return n.stop()}},n,this)}))}}]),t}();n.Using=h},{"../../Common":"I6jy",lodash:"B1iE","../../WerckmeisterAutoHintDb":"Y3F9"}],xTxX:[function(t,e,n){"use strict";function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}var o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{c(r.next(t))}catch(e){o(e)}}function u(t){try{c(r.throw(t))}catch(e){o(e)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,u)}c((r=r.apply(t,e||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.DummyEnvironmentInspector=void 0;var a=function(){function t(){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.environment="local"}return i(t,[{key:"getMidiOutputDevices",value:function(){return o(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",[]);case 1:case"end":return t.stop()}},t)}))}}]),t}();n.DummyEnvironmentInspector=a},{}],bvdo:[function(t,e,n){"use strict";function r(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)||o(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 i(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=o(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return u=t.done,t},e:function(t){c=!0,a=t},f:function(){try{u||null==n.return||n.return()}finally{if(c)throw a}}}}function o(t,e){if(t){if("string"==typeof t)return a(t,e);var n=Object.prototype.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}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var c=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{c(r.next(t))}catch(e){o(e)}}function u(t){try{c(r.throw(t))}catch(e){o(e)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,u)}c((r=r.apply(t,e||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.LanguageFeatures=void 0;var s=t("./Common"),f=t("./features/autocomplete/CommandArgument"),l=t("./features/autocomplete/Command"),p=t("./features/autocomplete/Using"),h=t("./DummyEnvironmentInspector"),m=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new h.DummyEnvironmentInspector;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.fileSystemInspector=e,this.environmentInspector=n,this.features={autoCompletes:[new p.Using(this.fileSystemInspector),new l.Command,new f.CommandArgument(this.environmentInspector)]}}return function(t,e,n){e&&u(t.prototype,e),n&&u(t,n)}(t,[{key:"autoComplete",value:function(t){return c(this,void 0,void 0,regeneratorRuntime.mark(function e(){var n,o,a,u,c,f,l,p;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getCursor();case 2:return n=e.sent,e.next=5,s.getExpressionLine(t,n);case 5:if(o=e.sent){e.next=8;break}return e.abrupt("return",[]);case 8:return e.next=10,s.getExpressionDocContext(t,n);case 10:a=e.sent,u=[],c=i(this.features.autoCompletes),e.prev=13,c.s();case 15:if((f=c.n()).done){e.next=25;break}return l=f.value,e.next=19,l.getSuggestions(o,t,a);case 19:if(p=e.sent){e.next=22;break}return e.abrupt("continue",23);case 22:u.push.apply(u,r(p));case 23:e.next=15;break;case 25:e.next=30;break;case 27:e.prev=27,e.t0=e.catch(13),c.e(e.t0);case 30:return e.prev=30,c.f(),e.finish(30);case 33:return e.abrupt("return",u);case 34:case"end":return e.stop()}},e,this,[[13,27,30,33]])}))}}]),t}();n.LanguageFeatures=m},{"./Common":"I6jy","./features/autocomplete/CommandArgument":"ykR4","./features/autocomplete/Command":"nviV","./features/autocomplete/Using":"Tlxz","./DummyEnvironmentInspector":"xTxX"}]},{},["bvdo"]);
|
|
40
40
|
},{}],"vSbS":[function(require,module,exports) {
|
|
41
41
|
"use strict";var t=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(u,a){function o(t){try{i(r.next(t))}catch(e){a(e)}}function c(t){try{i(r.throw(t))}catch(e){a(e)}}function i(t){var e;t.done?u(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(o,c)}i((r=r.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.fetchText=void 0;var e=new Map;function n(n){return t(this,void 0,void 0,regeneratorRuntime.mark(function t(){var r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.has(n)){t.next=2;break}return t.abrupt("return",e.get(n));case 2:return r=fetch(n).then(function(t){return t.text()}),e.set(n,r),t.abrupt("return",r);case 5:case"end":return t.stop()}},t)}))}exports.fetchText=n;
|
|
42
|
-
},{}],"rDCW":[function(require,module,exports) {
|
|
43
|
-
|
|
44
42
|
},{}],"pBGv":[function(require,module,exports) {
|
|
45
43
|
|
|
46
44
|
var t,e,n=module.exports={};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===r||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}function u(t){if(e===clearTimeout)return clearTimeout(t);if((e===o||!e)&&clearTimeout)return e=clearTimeout,clearTimeout(t);try{return e(t)}catch(n){try{return e.call(null,t)}catch(n){return e.call(this,t)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:r}catch(n){t=r}try{e="function"==typeof clearTimeout?clearTimeout:o}catch(n){e=o}}();var c,s=[],l=!1,a=-1;function f(){l&&c&&(l=!1,c.length?s=c.concat(s):a=-1,s.length&&h())}function h(){if(!l){var t=i(f);l=!0;for(var e=s.length;e;){for(c=s,s=[];++a<e;)c&&c[a].run();a=-1,e=s.length}c=null,l=!1,u(t)}}function m(t,e){this.fun=t,this.array=e}function p(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];s.push(new m(t,e)),1!==s.length||l||i(h)},m.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0};
|
|
47
45
|
},{}],"UUq2":[function(require,module,exports) {
|
|
48
46
|
var process = require("process");
|
|
49
47
|
var r=require("process");function t(r,t){for(var e=0,n=r.length-1;n>=0;n--){var o=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),e++):e&&(r.splice(n,1),e--)}if(t)for(;e--;e)r.unshift("..");return r}function e(r){"string"!=typeof r&&(r+="");var t,e=0,n=-1,o=!0;for(t=r.length-1;t>=0;--t)if(47===r.charCodeAt(t)){if(!o){e=t+1;break}}else-1===n&&(o=!1,n=t+1);return-1===n?"":r.slice(e,n)}function n(r,t){if(r.filter)return r.filter(t);for(var e=[],n=0;n<r.length;n++)t(r[n],n,r)&&e.push(r[n]);return e}exports.resolve=function(){for(var e="",o=!1,s=arguments.length-1;s>=-1&&!o;s--){var i=s>=0?arguments[s]:r.cwd();if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");i&&(e=i+"/"+e,o="/"===i.charAt(0))}return(o?"/":"")+(e=t(n(e.split("/"),function(r){return!!r}),!o).join("/"))||"."},exports.normalize=function(r){var e=exports.isAbsolute(r),s="/"===o(r,-1);return(r=t(n(r.split("/"),function(r){return!!r}),!e).join("/"))||e||(r="."),r&&s&&(r+="/"),(e?"/":"")+r},exports.isAbsolute=function(r){return"/"===r.charAt(0)},exports.join=function(){var r=Array.prototype.slice.call(arguments,0);return exports.normalize(n(r,function(r,t){if("string"!=typeof r)throw new TypeError("Arguments to path.join must be strings");return r}).join("/"))},exports.relative=function(r,t){function e(r){for(var t=0;t<r.length&&""===r[t];t++);for(var e=r.length-1;e>=0&&""===r[e];e--);return t>e?[]:r.slice(t,e-t+1)}r=exports.resolve(r).substr(1),t=exports.resolve(t).substr(1);for(var n=e(r.split("/")),o=e(t.split("/")),s=Math.min(n.length,o.length),i=s,u=0;u<s;u++)if(n[u]!==o[u]){i=u;break}var f=[];for(u=i;u<n.length;u++)f.push("..");return(f=f.concat(o.slice(i))).join("/")},exports.sep="/",exports.delimiter=":",exports.dirname=function(r){if("string"!=typeof r&&(r+=""),0===r.length)return".";for(var t=r.charCodeAt(0),e=47===t,n=-1,o=!0,s=r.length-1;s>=1;--s)if(47===(t=r.charCodeAt(s))){if(!o){n=s;break}}else o=!1;return-1===n?e?"/":".":e&&1===n?"/":r.slice(0,n)},exports.basename=function(r,t){var n=e(r);return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},exports.extname=function(r){"string"!=typeof r&&(r+="");for(var t=-1,e=0,n=-1,o=!0,s=0,i=r.length-1;i>=0;--i){var u=r.charCodeAt(i);if(47!==u)-1===n&&(o=!1,n=i+1),46===u?-1===t?t=i:1!==s&&(s=1):-1!==t&&(s=-1);else if(!o){e=i+1;break}}return-1===t||-1===n||0===s||1===s&&t===n-1&&t===e+1?"":r.slice(t,n)};var o="b"==="ab".substr(-1)?function(r,t,e){return r.substr(t,e)}:function(r,t,e){return t<0&&(t=r.length+t),r.substr(t,e)};
|
|
50
|
-
},{"process":"pBGv"}],"
|
|
48
|
+
},{"process":"pBGv"}],"rDCW":[function(require,module,exports) {
|
|
49
|
+
|
|
50
|
+
},{}],"Wugr":[function(require,module,exports) {
|
|
51
51
|
|
|
52
52
|
var r=require("buffer"),e=r.Buffer;function n(r,e){for(var n in r)e[n]=r[n]}function o(r,n,o){return e(r,n,o)}e.from&&e.alloc&&e.allocUnsafe&&e.allocUnsafeSlow?module.exports=r:(n(r,exports),exports.Buffer=o),n(e,o),o.from=function(r,n,o){if("number"==typeof r)throw new TypeError("Argument must not be a number");return e(r,n,o)},o.alloc=function(r,n,o){if("number"!=typeof r)throw new TypeError("Argument must be a number");var f=e(r);return void 0!==n?"string"==typeof o?f.fill(n,o):f.fill(n):f.fill(0),f},o.allocUnsafe=function(r){if("number"!=typeof r)throw new TypeError("Argument must be a number");return e(r)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)};
|
|
53
53
|
},{"buffer":"dskh"}],"XJNj":[function(require,module,exports) {
|
|
@@ -487,8 +487,8 @@ var process = require("process");
|
|
|
487
487
|
var __dirname = "/home/runner/work/werckmeister-component/werckmeister-component/node_modules/@werckmeister/compilerjs";
|
|
488
488
|
var Buffer = require("buffer").Buffer;
|
|
489
489
|
var define;
|
|
490
|
-
var r,t="/home/runner/work/werckmeister-component/werckmeister-component/node_modules/@werckmeister/compilerjs/werckmeister.js",e=require("process"),n="/home/runner/work/werckmeister-component/werckmeister-component/node_modules/@werckmeister/compilerjs",o=require("buffer").Buffer,a=(()=>{var r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0;return void 0!==t&&(r=r||t),function(t){var a,i,s=void 0!==(t=t||{})?t:{};s.ready=new Promise(function(r,t){a=r,i=t});var u,c,f,l=Object.assign({},s),d=[],h="./this.program",m=(r,t)=>{throw t},p="object"==typeof window,v="function"==typeof importScripts,w="object"==typeof e&&"object"==typeof e.versions&&"string"==typeof e.versions.node,y="";if(w){var g=require("fs"),_=require("path");y=v?_.dirname(y)+"/":n+"/",u=((r,t)=>(r=ar(r)?new URL(r):_.normalize(r),g.readFileSync(r,t?void 0:"utf8"))),f=(r=>{var t=u(r,!0);return t.buffer||(t=new Uint8Array(t)),t}),c=((r,t,e)=>{r=ar(r)?new URL(r):_.normalize(r),g.readFile(r,function(r,n){r?e(r):t(n.buffer)})}),e.argv.length>1&&(h=e.argv[1].replace(/\\/g,"/")),d=e.argv.slice(2),e.on("uncaughtException",function(r){if(!(r instanceof sr))throw r}),e.on("unhandledRejection",function(r){throw r}),m=((r,t)=>{if(G())throw e.exitCode=r,t;!function(r){if(r instanceof sr)return;k("exiting due to exception: "+r)}(t),e.exit(r)}),s.inspect=function(){return"[Emscripten Module object]"}}else(p||v)&&(v?y=self.location.href:"undefined"!=typeof document&&document.currentScript&&(y=document.currentScript.src),r&&(y=r),y=0!==y.indexOf("blob:")?y.substr(0,y.replace(/[?#].*/,"").lastIndexOf("/")+1):"",u=(r=>{var t=new XMLHttpRequest;return t.open("GET",r,!1),t.send(null),t.responseText}),v&&(f=(r=>{var t=new XMLHttpRequest;return t.open("GET",r,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)})),c=((r,t,e)=>{var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="arraybuffer",n.onload=(()=>{200==n.status||0==n.status&&n.response?t(n.response):e()}),n.onerror=e,n.send(null)}),r=>document.title=r);var E,b=s.print||console.log.bind(console),k=s.printErr||console.warn.bind(console);Object.assign(s,l),l=null,s.arguments&&(d=s.arguments),s.thisProgram&&(h=s.thisProgram),s.quit&&(m=s.quit),s.wasmBinary&&(E=s.wasmBinary);var D,S=s.noExitRuntime||!0;"object"!=typeof WebAssembly&&Z("no native wasm support detected");var j,M=!1;var F,A,P,x,T,C,R="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function O(r,t,e){for(var n=t+e,o=t;r[o]&&!(o>=n);)++o;if(o-t>16&&r.buffer&&R)return R.decode(r.subarray(t,o));for(var a="";t<o;){var i=r[t++];if(128&i){var s=63&r[t++];if(192!=(224&i)){var u=63&r[t++];if((i=224==(240&i)?(15&i)<<12|s<<6|u:(7&i)<<18|s<<12|u<<6|63&r[t++])<65536)a+=String.fromCharCode(i);else{var c=i-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a}function z(r,t){return r?O(P,r,t):""}function N(r,t,e,n){if(!(n>0))return 0;for(var o=e,a=e+n-1,i=0;i<r.length;++i){var s=r.charCodeAt(i);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&r.charCodeAt(++i);if(s<=127){if(e>=a)break;t[e++]=s}else if(s<=2047){if(e+1>=a)break;t[e++]=192|s>>6,t[e++]=128|63&s}else if(s<=65535){if(e+2>=a)break;t[e++]=224|s>>12,t[e++]=128|s>>6&63,t[e++]=128|63&s}else{if(e+3>=a)break;t[e++]=240|s>>18,t[e++]=128|s>>12&63,t[e++]=128|s>>6&63,t[e++]=128|63&s}}return t[e]=0,e-o}function B(r,t,e){return N(r,P,t,e)}function I(r){for(var t=0,e=0;e<r.length;++e){var n=r.charCodeAt(e);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++e):t+=3}return t}s.INITIAL_MEMORY;var L,U=[],H=[],Y=[],q=[];function G(){return S}var W=0,X=null,V=null;function K(r){return r}function J(r){W++,s.monitorRunDependencies&&s.monitorRunDependencies(W)}function $(r){if(W--,s.monitorRunDependencies&&s.monitorRunDependencies(W),0==W&&(null!==X&&(clearInterval(X),X=null),V)){var t=V;V=null,t()}}function Z(r){s.onAbort&&s.onAbort(r),k(r="Aborted("+r+")"),M=!0,j=1,r+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(r);throw i(t),t}var Q,rr,tr,er,nr="data:application/octet-stream;base64,";function or(r){return r.startsWith(nr)}function ar(r){return r.startsWith("file://")}function ir(r){try{if(r==Q&&E)return new Uint8Array(E);if(f)return f(r);throw"both async and sync fetching of the wasm failed"}catch(k){Z(k)}}function sr(r){this.name="ExitStatus",this.message="Program terminated with exit("+r+")",this.status=r}function ur(r){for(;r.length>0;)r.shift()(s)}or(Q="werckmeister.wasm")||(rr=Q,Q=s.locateFile?s.locateFile(rr,y):y+rr);var cr=[];var fr=0;var lr=0;function dr(r){return L.get(r)}function hr(r){this.excPtr=r,this.ptr=r-24,this.set_type=function(r){C[this.ptr+4>>2]=r},this.get_type=function(){return C[this.ptr+4>>2]},this.set_destructor=function(r){C[this.ptr+8>>2]=r},this.get_destructor=function(){return C[this.ptr+8>>2]},this.set_refcount=function(r){T[this.ptr>>2]=r},this.set_caught=function(r){r=r?1:0,A[this.ptr+12>>0]=r},this.get_caught=function(){return 0!=A[this.ptr+12>>0]},this.set_rethrown=function(r){r=r?1:0,A[this.ptr+13>>0]=r},this.get_rethrown=function(){return 0!=A[this.ptr+13>>0]},this.init=function(r,t){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(t),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var r=T[this.ptr>>2];T[this.ptr>>2]=r+1},this.release_ref=function(){var r=T[this.ptr>>2];return T[this.ptr>>2]=r-1,1===r},this.set_adjusted_ptr=function(r){C[this.ptr+16>>2]=r},this.get_adjusted_ptr=function(){return C[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Qr(this.get_type()))return C[this.excPtr>>2];var r=this.get_adjusted_ptr();return 0!==r?r:this.excPtr}}var mr={isAbs:r=>"/"===r.charAt(0),splitPath:r=>{return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(r).slice(1)},normalizeArray:(r,t)=>{for(var e=0,n=r.length-1;n>=0;n--){var o=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),e++):e&&(r.splice(n,1),e--)}if(t)for(;e;e--)r.unshift("..");return r},normalize:r=>{var t=mr.isAbs(r),e="/"===r.substr(-1);return(r=mr.normalizeArray(r.split("/").filter(r=>!!r),!t).join("/"))||t||(r="."),r&&e&&(r+="/"),(t?"/":"")+r},dirname:r=>{var t=mr.splitPath(r),e=t[0],n=t[1];return e||n?(n&&(n=n.substr(0,n.length-1)),e+n):"."},basename:r=>{if("/"===r)return"/";var t=(r=(r=mr.normalize(r)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?r:r.substr(t+1)},join:function(){var r=Array.prototype.slice.call(arguments);return mr.normalize(r.join("/"))},join2:(r,t)=>mr.normalize(r+"/"+t)};var pr={resolve:function(){for(var r="",t=!1,e=arguments.length-1;e>=-1&&!t;e--){var n=e>=0?arguments[e]:Er.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";r=n+"/"+r,t=mr.isAbs(n)}return(t?"/":"")+(r=mr.normalizeArray(r.split("/").filter(r=>!!r),!t).join("/"))||"."},relative:(r,t)=>{function e(r){for(var t=0;t<r.length&&""===r[t];t++);for(var e=r.length-1;e>=0&&""===r[e];e--);return t>e?[]:r.slice(t,e-t+1)}r=pr.resolve(r).substr(1),t=pr.resolve(t).substr(1);for(var n=e(r.split("/")),o=e(t.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var u=[];for(s=i;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(i))).join("/")}};function vr(r,t,e){var n=e>0?e:I(r)+1,o=new Array(n),a=N(r,o,0,o.length);return t&&(o.length=a),o}var wr={ttys:[],init:function(){},shutdown:function(){},register:function(r,t){wr.ttys[r]={input:[],output:[],ops:t},Er.registerDevice(r,wr.stream_ops)},stream_ops:{open:function(r){var t=wr.ttys[r.node.rdev];if(!t)throw new Er.ErrnoError(43);r.tty=t,r.seekable=!1},close:function(r){r.tty.ops.fsync(r.tty)},fsync:function(r){r.tty.ops.fsync(r.tty)},read:function(r,t,e,n,o){if(!r.tty||!r.tty.ops.get_char)throw new Er.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=r.tty.ops.get_char(r.tty)}catch(u){throw new Er.ErrnoError(29)}if(void 0===s&&0===a)throw new Er.ErrnoError(6);if(null==s)break;a++,t[e+i]=s}return a&&(r.node.timestamp=Date.now()),a},write:function(r,t,e,n,o){if(!r.tty||!r.tty.ops.put_char)throw new Er.ErrnoError(60);try{for(var a=0;a<n;a++)r.tty.ops.put_char(r.tty,t[e+a])}catch(i){throw new Er.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:function(r){if(!r.input.length){var t=null;if(w){var n=o.alloc(256),a=0;try{a=g.readSync(e.stdin.fd,n,0,256,-1)}catch(i){if(!i.toString().includes("EOF"))throw i;a=0}t=a>0?n.slice(0,a).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n");if(!t)return null;r.input=vr(t,!0)}return r.input.shift()},put_char:function(r,t){null===t||10===t?(b(O(r.output,0)),r.output=[]):0!=t&&r.output.push(t)},fsync:function(r){r.output&&r.output.length>0&&(b(O(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,t){null===t||10===t?(k(O(r.output,0)),r.output=[]):0!=t&&r.output.push(t)},fsync:function(r){r.output&&r.output.length>0&&(k(O(r.output,0)),r.output=[])}}};function yr(r){Z()}var gr={ops_table:null,mount:function(r){return gr.createNode(null,"/",16895,0)},createNode:function(r,t,e,n){if(Er.isBlkdev(e)||Er.isFIFO(e))throw new Er.ErrnoError(63);gr.ops_table||(gr.ops_table={dir:{node:{getattr:gr.node_ops.getattr,setattr:gr.node_ops.setattr,lookup:gr.node_ops.lookup,mknod:gr.node_ops.mknod,rename:gr.node_ops.rename,unlink:gr.node_ops.unlink,rmdir:gr.node_ops.rmdir,readdir:gr.node_ops.readdir,symlink:gr.node_ops.symlink},stream:{llseek:gr.stream_ops.llseek}},file:{node:{getattr:gr.node_ops.getattr,setattr:gr.node_ops.setattr},stream:{llseek:gr.stream_ops.llseek,read:gr.stream_ops.read,write:gr.stream_ops.write,allocate:gr.stream_ops.allocate,mmap:gr.stream_ops.mmap,msync:gr.stream_ops.msync}},link:{node:{getattr:gr.node_ops.getattr,setattr:gr.node_ops.setattr,readlink:gr.node_ops.readlink},stream:{}},chrdev:{node:{getattr:gr.node_ops.getattr,setattr:gr.node_ops.setattr},stream:Er.chrdev_stream_ops}});var o=Er.createNode(r,t,e,n);return Er.isDir(o.mode)?(o.node_ops=gr.ops_table.dir.node,o.stream_ops=gr.ops_table.dir.stream,o.contents={}):Er.isFile(o.mode)?(o.node_ops=gr.ops_table.file.node,o.stream_ops=gr.ops_table.file.stream,o.usedBytes=0,o.contents=null):Er.isLink(o.mode)?(o.node_ops=gr.ops_table.link.node,o.stream_ops=gr.ops_table.link.stream):Er.isChrdev(o.mode)&&(o.node_ops=gr.ops_table.chrdev.node,o.stream_ops=gr.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[t]=o,r.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(r){return r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0)},expandFileStorage:function(r,t){var e=r.contents?r.contents.length:0;if(!(e>=t)){t=Math.max(t,e*(e<1048576?2:1.125)>>>0),0!=e&&(t=Math.max(t,256));var n=r.contents;r.contents=new Uint8Array(t),r.usedBytes>0&&r.contents.set(n.subarray(0,r.usedBytes),0)}},resizeFileStorage:function(r,t){if(r.usedBytes!=t)if(0==t)r.contents=null,r.usedBytes=0;else{var e=r.contents;r.contents=new Uint8Array(t),e&&r.contents.set(e.subarray(0,Math.min(t,r.usedBytes))),r.usedBytes=t}},node_ops:{getattr:function(r){var t={};return t.dev=Er.isChrdev(r.mode)?r.id:1,t.ino=r.id,t.mode=r.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=r.rdev,Er.isDir(r.mode)?t.size=4096:Er.isFile(r.mode)?t.size=r.usedBytes:Er.isLink(r.mode)?t.size=r.link.length:t.size=0,t.atime=new Date(r.timestamp),t.mtime=new Date(r.timestamp),t.ctime=new Date(r.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(r,t){void 0!==t.mode&&(r.mode=t.mode),void 0!==t.timestamp&&(r.timestamp=t.timestamp),void 0!==t.size&&gr.resizeFileStorage(r,t.size)},lookup:function(r,t){throw Er.genericErrors[44]},mknod:function(r,t,e,n){return gr.createNode(r,t,e,n)},rename:function(r,t,e){if(Er.isDir(r.mode)){var n;try{n=Er.lookupNode(t,e)}catch(a){}if(n)for(var o in n.contents)throw new Er.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=e,t.contents[e]=r,t.timestamp=r.parent.timestamp,r.parent=t},unlink:function(r,t){delete r.contents[t],r.timestamp=Date.now()},rmdir:function(r,t){var e=Er.lookupNode(r,t);for(var n in e.contents)throw new Er.ErrnoError(55);delete r.contents[t],r.timestamp=Date.now()},readdir:function(r){var t=[".",".."];for(var e in r.contents)r.contents.hasOwnProperty(e)&&t.push(e);return t},symlink:function(r,t,e){var n=gr.createNode(r,t,41471,0);return n.link=e,n},readlink:function(r){if(!Er.isLink(r.mode))throw new Er.ErrnoError(28);return r.link}},stream_ops:{read:function(r,t,e,n,o){var a=r.node.contents;if(o>=r.node.usedBytes)return 0;var i=Math.min(r.node.usedBytes-o,n);if(i>8&&a.subarray)t.set(a.subarray(o,o+i),e);else for(var s=0;s<i;s++)t[e+s]=a[o+s];return i},write:function(r,t,e,n,o,a){if(!n)return 0;var i=r.node;if(i.timestamp=Date.now(),t.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=t.subarray(e,e+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=t.slice(e,e+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(t.subarray(e,e+n),o),n}if(gr.expandFileStorage(i,o+n),i.contents.subarray&&t.subarray)i.contents.set(t.subarray(e,e+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=t[e+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek:function(r,t,e){var n=t;if(1===e?n+=r.position:2===e&&Er.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new Er.ErrnoError(28);return n},allocate:function(r,t,e){gr.expandFileStorage(r.node,t+e),r.node.usedBytes=Math.max(r.node.usedBytes,t+e)},mmap:function(r,t,e,n,o){if(!Er.isFile(r.node.mode))throw new Er.ErrnoError(43);var a,i,s=r.node.contents;if(2&o||s.buffer!==F){if((e>0||e+t<s.length)&&(s=s.subarray?s.subarray(e,e+t):Array.prototype.slice.call(s,e,e+t)),i=!0,!(a=yr()))throw new Er.ErrnoError(48);A.set(s,a)}else i=!1,a=s.byteOffset;return{ptr:a,allocated:i}},msync:function(r,t,e,n,o){return gr.stream_ops.write(r,t,0,n,e,!1),0}}};function _r(r,t,e,n){var o=n?"":K("al "+r);c(r,e=>{!function(r,t){r||Z(t)}(e,'Loading data file "'+r+'" failed (no arrayBuffer).'),t(new Uint8Array(e)),o&&$()},t=>{if(!e)throw'Loading data file "'+r+'" failed.';e()}),o&&J()}var Er={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(r,t={})=>{if(!(r=pr.resolve(r)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new Er.ErrnoError(32);for(var e=r.split("/").filter(r=>!!r),n=Er.root,o="/",a=0;a<e.length;a++){var i=a===e.length-1;if(i&&t.parent)break;if(n=Er.lookupNode(n,e[a]),o=mr.join2(o,e[a]),Er.isMountpoint(n)&&(!i||i&&t.follow_mount)&&(n=n.mounted.root),!i||t.follow)for(var s=0;Er.isLink(n.mode);){var u=Er.readlink(o);if(o=pr.resolve(mr.dirname(o),u),n=Er.lookupPath(o,{recurse_count:t.recurse_count+1}).node,s++>40)throw new Er.ErrnoError(32)}}return{path:o,node:n}},getPath:r=>{for(var t;;){if(Er.isRoot(r)){var e=r.mount.mountpoint;return t?"/"!==e[e.length-1]?e+"/"+t:e+t:e}t=t?r.name+"/"+t:r.name,r=r.parent}},hashName:(r,t)=>{for(var e=0,n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n)|0;return(r+e>>>0)%Er.nameTable.length},hashAddNode:r=>{var t=Er.hashName(r.parent.id,r.name);r.name_next=Er.nameTable[t],Er.nameTable[t]=r},hashRemoveNode:r=>{var t=Er.hashName(r.parent.id,r.name);if(Er.nameTable[t]===r)Er.nameTable[t]=r.name_next;else for(var e=Er.nameTable[t];e;){if(e.name_next===r){e.name_next=r.name_next;break}e=e.name_next}},lookupNode:(r,t)=>{var e=Er.mayLookup(r);if(e)throw new Er.ErrnoError(e,r);for(var n=Er.hashName(r.id,t),o=Er.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===r.id&&a===t)return o}return Er.lookup(r,t)},createNode:(r,t,e,n)=>{var o=new Er.FSNode(r,t,e,n);return Er.hashAddNode(o),o},destroyNode:r=>{Er.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>32768==(61440&r),isDir:r=>16384==(61440&r),isLink:r=>40960==(61440&r),isChrdev:r=>8192==(61440&r),isBlkdev:r=>24576==(61440&r),isFIFO:r=>4096==(61440&r),isSocket:r=>49152==(49152&r),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:r=>{var t=Er.flagModes[r];if(void 0===t)throw new Error("Unknown file open mode: "+r);return t},flagsToPermissionString:r=>{var t=["r","w","rw"][3&r];return 512&r&&(t+="w"),t},nodePermissions:(r,t)=>Er.ignorePermissions?0:(!t.includes("r")||292&r.mode)&&(!t.includes("w")||146&r.mode)&&(!t.includes("x")||73&r.mode)?0:2,mayLookup:r=>{var t=Er.nodePermissions(r,"x");return t||(r.node_ops.lookup?0:2)},mayCreate:(r,t)=>{try{Er.lookupNode(r,t);return 20}catch(e){}return Er.nodePermissions(r,"wx")},mayDelete:(r,t,e)=>{var n;try{n=Er.lookupNode(r,t)}catch(a){return a.errno}var o=Er.nodePermissions(r,"wx");if(o)return o;if(e){if(!Er.isDir(n.mode))return 54;if(Er.isRoot(n)||Er.getPath(n)===Er.cwd())return 10}else if(Er.isDir(n.mode))return 31;return 0},mayOpen:(r,t)=>r?Er.isLink(r.mode)?32:Er.isDir(r.mode)&&("r"!==Er.flagsToPermissionString(t)||512&t)?31:Er.nodePermissions(r,Er.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd:(r=0,t=Er.MAX_OPEN_FDS)=>{for(var e=r;e<=t;e++)if(!Er.streams[e])return e;throw new Er.ErrnoError(33)},getStream:r=>Er.streams[r],createStream:(r,t,e)=>{Er.FSStream||(Er.FSStream=function(){this.shared={}},Er.FSStream.prototype={},Object.defineProperties(Er.FSStream.prototype,{object:{get:function(){return this.node},set:function(r){this.node=r}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(r){this.shared.flags=r}},position:{get:function(){return this.shared.position},set:function(r){this.shared.position=r}}})),r=Object.assign(new Er.FSStream,r);var n=Er.nextfd(t,e);return r.fd=n,Er.streams[n]=r,r},closeStream:r=>{Er.streams[r]=null},chrdev_stream_ops:{open:r=>{var t=Er.getDevice(r.node.rdev);r.stream_ops=t.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:()=>{throw new Er.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,t)=>r<<8|t,registerDevice:(r,t)=>{Er.devices[r]={stream_ops:t}},getDevice:r=>Er.devices[r],getMounts:r=>{for(var t=[],e=[r];e.length;){var n=e.pop();t.push(n),e.push.apply(e,n.mounts)}return t},syncfs:(r,t)=>{"function"==typeof r&&(t=r,r=!1),Er.syncFSRequests++,Er.syncFSRequests>1&&k("warning: "+Er.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var e=Er.getMounts(Er.root.mount),n=0;function o(r){return Er.syncFSRequests--,t(r)}function a(r){if(r)return a.errored?void 0:(a.errored=!0,o(r));++n>=e.length&&o(null)}e.forEach(t=>{if(!t.type.syncfs)return a(null);t.type.syncfs(t,r,a)})},mount:(r,t,e)=>{var n,o="/"===e,a=!e;if(o&&Er.root)throw new Er.ErrnoError(10);if(!o&&!a){var i=Er.lookupPath(e,{follow_mount:!1});if(e=i.path,n=i.node,Er.isMountpoint(n))throw new Er.ErrnoError(10);if(!Er.isDir(n.mode))throw new Er.ErrnoError(54)}var s={type:r,opts:t,mountpoint:e,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?Er.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:r=>{var t=Er.lookupPath(r,{follow_mount:!1});if(!Er.isMountpoint(t.node))throw new Er.ErrnoError(28);var e=t.node,n=e.mounted,o=Er.getMounts(n);Object.keys(Er.nameTable).forEach(r=>{for(var t=Er.nameTable[r];t;){var e=t.name_next;o.includes(t.mount)&&Er.destroyNode(t),t=e}}),e.mounted=null;var a=e.mount.mounts.indexOf(n);e.mount.mounts.splice(a,1)},lookup:(r,t)=>r.node_ops.lookup(r,t),mknod:(r,t,e)=>{var n=Er.lookupPath(r,{parent:!0}).node,o=mr.basename(r);if(!o||"."===o||".."===o)throw new Er.ErrnoError(28);var a=Er.mayCreate(n,o);if(a)throw new Er.ErrnoError(a);if(!n.node_ops.mknod)throw new Er.ErrnoError(63);return n.node_ops.mknod(n,o,t,e)},create:(r,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,Er.mknod(r,t,0)),mkdir:(r,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,Er.mknod(r,t,0)),mkdirTree:(r,t)=>{for(var e=r.split("/"),n="",o=0;o<e.length;++o)if(e[o]){n+="/"+e[o];try{Er.mkdir(n,t)}catch(a){if(20!=a.errno)throw a}}},mkdev:(r,t,e)=>(void 0===e&&(e=t,t=438),t|=8192,Er.mknod(r,t,e)),symlink:(r,t)=>{if(!pr.resolve(r))throw new Er.ErrnoError(44);var e=Er.lookupPath(t,{parent:!0}).node;if(!e)throw new Er.ErrnoError(44);var n=mr.basename(t),o=Er.mayCreate(e,n);if(o)throw new Er.ErrnoError(o);if(!e.node_ops.symlink)throw new Er.ErrnoError(63);return e.node_ops.symlink(e,n,r)},rename:(r,t)=>{var e,n,o=mr.dirname(r),a=mr.dirname(t),i=mr.basename(r),s=mr.basename(t);if(e=Er.lookupPath(r,{parent:!0}).node,n=Er.lookupPath(t,{parent:!0}).node,!e||!n)throw new Er.ErrnoError(44);if(e.mount!==n.mount)throw new Er.ErrnoError(75);var u,c=Er.lookupNode(e,i),f=pr.relative(r,a);if("."!==f.charAt(0))throw new Er.ErrnoError(28);if("."!==(f=pr.relative(t,o)).charAt(0))throw new Er.ErrnoError(55);try{u=Er.lookupNode(n,s)}catch(h){}if(c!==u){var l=Er.isDir(c.mode),d=Er.mayDelete(e,i,l);if(d)throw new Er.ErrnoError(d);if(d=u?Er.mayDelete(n,s,l):Er.mayCreate(n,s))throw new Er.ErrnoError(d);if(!e.node_ops.rename)throw new Er.ErrnoError(63);if(Er.isMountpoint(c)||u&&Er.isMountpoint(u))throw new Er.ErrnoError(10);if(n!==e&&(d=Er.nodePermissions(e,"w")))throw new Er.ErrnoError(d);Er.hashRemoveNode(c);try{e.node_ops.rename(c,n,s)}catch(h){throw h}finally{Er.hashAddNode(c)}}},rmdir:r=>{var t=Er.lookupPath(r,{parent:!0}).node,e=mr.basename(r),n=Er.lookupNode(t,e),o=Er.mayDelete(t,e,!0);if(o)throw new Er.ErrnoError(o);if(!t.node_ops.rmdir)throw new Er.ErrnoError(63);if(Er.isMountpoint(n))throw new Er.ErrnoError(10);t.node_ops.rmdir(t,e),Er.destroyNode(n)},readdir:r=>{var t=Er.lookupPath(r,{follow:!0}).node;if(!t.node_ops.readdir)throw new Er.ErrnoError(54);return t.node_ops.readdir(t)},unlink:r=>{var t=Er.lookupPath(r,{parent:!0}).node;if(!t)throw new Er.ErrnoError(44);var e=mr.basename(r),n=Er.lookupNode(t,e),o=Er.mayDelete(t,e,!1);if(o)throw new Er.ErrnoError(o);if(!t.node_ops.unlink)throw new Er.ErrnoError(63);if(Er.isMountpoint(n))throw new Er.ErrnoError(10);t.node_ops.unlink(t,e),Er.destroyNode(n)},readlink:r=>{var t=Er.lookupPath(r).node;if(!t)throw new Er.ErrnoError(44);if(!t.node_ops.readlink)throw new Er.ErrnoError(28);return pr.resolve(Er.getPath(t.parent),t.node_ops.readlink(t))},stat:(r,t)=>{var e=Er.lookupPath(r,{follow:!t}).node;if(!e)throw new Er.ErrnoError(44);if(!e.node_ops.getattr)throw new Er.ErrnoError(63);return e.node_ops.getattr(e)},lstat:r=>Er.stat(r,!0),chmod:(r,t,e)=>{var n;"string"==typeof r?n=Er.lookupPath(r,{follow:!e}).node:n=r;if(!n.node_ops.setattr)throw new Er.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod:(r,t)=>{Er.chmod(r,t,!0)},fchmod:(r,t)=>{var e=Er.getStream(r);if(!e)throw new Er.ErrnoError(8);Er.chmod(e.node,t)},chown:(r,t,e,n)=>{var o;"string"==typeof r?o=Er.lookupPath(r,{follow:!n}).node:o=r;if(!o.node_ops.setattr)throw new Er.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(r,t,e)=>{Er.chown(r,t,e,!0)},fchown:(r,t,e)=>{var n=Er.getStream(r);if(!n)throw new Er.ErrnoError(8);Er.chown(n.node,t,e)},truncate:(r,t)=>{if(t<0)throw new Er.ErrnoError(28);var e;"string"==typeof r?e=Er.lookupPath(r,{follow:!0}).node:e=r;if(!e.node_ops.setattr)throw new Er.ErrnoError(63);if(Er.isDir(e.mode))throw new Er.ErrnoError(31);if(!Er.isFile(e.mode))throw new Er.ErrnoError(28);var n=Er.nodePermissions(e,"w");if(n)throw new Er.ErrnoError(n);e.node_ops.setattr(e,{size:t,timestamp:Date.now()})},ftruncate:(r,t)=>{var e=Er.getStream(r);if(!e)throw new Er.ErrnoError(8);if(0==(2097155&e.flags))throw new Er.ErrnoError(28);Er.truncate(e.node,t)},utime:(r,t,e)=>{var n=Er.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,e)})},open:(r,t,e)=>{if(""===r)throw new Er.ErrnoError(44);var n;if(e=void 0===e?438:e,e=64&(t="string"==typeof t?Er.modeStringToFlags(t):t)?4095&e|32768:0,"object"==typeof r)n=r;else{r=mr.normalize(r);try{n=Er.lookupPath(r,{follow:!(131072&t)}).node}catch(u){}}var o=!1;if(64&t)if(n){if(128&t)throw new Er.ErrnoError(20)}else n=Er.mknod(r,e,0),o=!0;if(!n)throw new Er.ErrnoError(44);if(Er.isChrdev(n.mode)&&(t&=-513),65536&t&&!Er.isDir(n.mode))throw new Er.ErrnoError(54);if(!o){var a=Er.mayOpen(n,t);if(a)throw new Er.ErrnoError(a)}512&t&&!o&&Er.truncate(n,0),t&=-131713;var i=Er.createStream({node:n,path:Er.getPath(n),flags:t,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return i.stream_ops.open&&i.stream_ops.open(i),!s.logReadFiles||1&t||(Er.readFiles||(Er.readFiles={}),r in Er.readFiles||(Er.readFiles[r]=1)),i},close:r=>{if(Er.isClosed(r))throw new Er.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(t){throw t}finally{Er.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek:(r,t,e)=>{if(Er.isClosed(r))throw new Er.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new Er.ErrnoError(70);if(0!=e&&1!=e&&2!=e)throw new Er.ErrnoError(28);return r.position=r.stream_ops.llseek(r,t,e),r.ungotten=[],r.position},read:(r,t,e,n,o)=>{if(n<0||o<0)throw new Er.ErrnoError(28);if(Er.isClosed(r))throw new Er.ErrnoError(8);if(1==(2097155&r.flags))throw new Er.ErrnoError(8);if(Er.isDir(r.node.mode))throw new Er.ErrnoError(31);if(!r.stream_ops.read)throw new Er.ErrnoError(28);var a=void 0!==o;if(a){if(!r.seekable)throw new Er.ErrnoError(70)}else o=r.position;var i=r.stream_ops.read(r,t,e,n,o);return a||(r.position+=i),i},write:(r,t,e,n,o,a)=>{if(n<0||o<0)throw new Er.ErrnoError(28);if(Er.isClosed(r))throw new Er.ErrnoError(8);if(0==(2097155&r.flags))throw new Er.ErrnoError(8);if(Er.isDir(r.node.mode))throw new Er.ErrnoError(31);if(!r.stream_ops.write)throw new Er.ErrnoError(28);r.seekable&&1024&r.flags&&Er.llseek(r,0,2);var i=void 0!==o;if(i){if(!r.seekable)throw new Er.ErrnoError(70)}else o=r.position;var s=r.stream_ops.write(r,t,e,n,o,a);return i||(r.position+=s),s},allocate:(r,t,e)=>{if(Er.isClosed(r))throw new Er.ErrnoError(8);if(t<0||e<=0)throw new Er.ErrnoError(28);if(0==(2097155&r.flags))throw new Er.ErrnoError(8);if(!Er.isFile(r.node.mode)&&!Er.isDir(r.node.mode))throw new Er.ErrnoError(43);if(!r.stream_ops.allocate)throw new Er.ErrnoError(138);r.stream_ops.allocate(r,t,e)},mmap:(r,t,e,n,o)=>{if(0!=(2&n)&&0==(2&o)&&2!=(2097155&r.flags))throw new Er.ErrnoError(2);if(1==(2097155&r.flags))throw new Er.ErrnoError(2);if(!r.stream_ops.mmap)throw new Er.ErrnoError(43);return r.stream_ops.mmap(r,t,e,n,o)},msync:(r,t,e,n,o)=>r.stream_ops.msync?r.stream_ops.msync(r,t,e,n,o):0,munmap:r=>0,ioctl:(r,t,e)=>{if(!r.stream_ops.ioctl)throw new Er.ErrnoError(59);return r.stream_ops.ioctl(r,t,e)},readFile:(r,t={})=>{if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var e,n=Er.open(r,t.flags),o=Er.stat(r).size,a=new Uint8Array(o);return Er.read(n,a,0,o,0),"utf8"===t.encoding?e=O(a,0):"binary"===t.encoding&&(e=a),Er.close(n),e},writeFile:(r,t,e={})=>{e.flags=e.flags||577;var n=Er.open(r,e.flags,e.mode);if("string"==typeof t){var o=new Uint8Array(I(t)+1),a=N(t,o,0,o.length);Er.write(n,o,0,a,void 0,e.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");Er.write(n,t,0,t.byteLength,void 0,e.canOwn)}Er.close(n)},cwd:()=>Er.currentPath,chdir:r=>{var t=Er.lookupPath(r,{follow:!0});if(null===t.node)throw new Er.ErrnoError(44);if(!Er.isDir(t.node.mode))throw new Er.ErrnoError(54);var e=Er.nodePermissions(t.node,"x");if(e)throw new Er.ErrnoError(e);Er.currentPath=t.path},createDefaultDirectories:()=>{Er.mkdir("/tmp"),Er.mkdir("/home"),Er.mkdir("/home/web_user")},createDefaultDevices:()=>{Er.mkdir("/dev"),Er.registerDevice(Er.makedev(1,3),{read:()=>0,write:(r,t,e,n,o)=>n}),Er.mkdev("/dev/null",Er.makedev(1,3)),wr.register(Er.makedev(5,0),wr.default_tty_ops),wr.register(Er.makedev(6,0),wr.default_tty1_ops),Er.mkdev("/dev/tty",Er.makedev(5,0)),Er.mkdev("/dev/tty1",Er.makedev(6,0));var r=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var r=new Uint8Array(1);return()=>(crypto.getRandomValues(r),r[0])}if(w)try{var t=require("crypto");return()=>t.randomBytes(1)[0]}catch(e){}return()=>Z("randomDevice")}();Er.createDevice("/dev","random",r),Er.createDevice("/dev","urandom",r),Er.mkdir("/dev/shm"),Er.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{Er.mkdir("/proc");var r=Er.mkdir("/proc/self");Er.mkdir("/proc/self/fd"),Er.mount({mount:()=>{var t=Er.createNode(r,"fd",16895,73);return t.node_ops={lookup:(r,t)=>{var e=+t,n=Er.getStream(e);if(!n)throw new Er.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},t}},{},"/proc/self/fd")},createStandardStreams:()=>{s.stdin?Er.createDevice("/dev","stdin",s.stdin):Er.symlink("/dev/tty","/dev/stdin"),s.stdout?Er.createDevice("/dev","stdout",null,s.stdout):Er.symlink("/dev/tty","/dev/stdout"),s.stderr?Er.createDevice("/dev","stderr",null,s.stderr):Er.symlink("/dev/tty1","/dev/stderr");Er.open("/dev/stdin",0),Er.open("/dev/stdout",1),Er.open("/dev/stderr",1)},ensureErrnoError:()=>{Er.ErrnoError||(Er.ErrnoError=function(r,t){this.node=t,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message="FS error"},Er.ErrnoError.prototype=new Error,Er.ErrnoError.prototype.constructor=Er.ErrnoError,[44].forEach(r=>{Er.genericErrors[r]=new Er.ErrnoError(r),Er.genericErrors[r].stack="<generic error, no stack>"}))},staticInit:()=>{Er.ensureErrnoError(),Er.nameTable=new Array(4096),Er.mount(gr,{},"/"),Er.createDefaultDirectories(),Er.createDefaultDevices(),Er.createSpecialDirectories(),Er.filesystems={MEMFS:gr}},init:(r,t,e)=>{Er.init.initialized=!0,Er.ensureErrnoError(),s.stdin=r||s.stdin,s.stdout=t||s.stdout,s.stderr=e||s.stderr,Er.createStandardStreams()},quit:()=>{Er.init.initialized=!1;for(var r=0;r<Er.streams.length;r++){var t=Er.streams[r];t&&Er.close(t)}},getMode:(r,t)=>{var e=0;return r&&(e|=365),t&&(e|=146),e},findObject:(r,t)=>{var e=Er.analyzePath(r,t);return e.exists?e.object:null},analyzePath:(r,t)=>{try{r=(n=Er.lookupPath(r,{follow:!t})).path}catch(o){}var e={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=Er.lookupPath(r,{parent:!0});e.parentExists=!0,e.parentPath=n.path,e.parentObject=n.node,e.name=mr.basename(r),n=Er.lookupPath(r,{follow:!t}),e.exists=!0,e.path=n.path,e.object=n.node,e.name=n.node.name,e.isRoot="/"===n.path}catch(o){e.error=o.errno}return e},createPath:(r,t,e,n)=>{r="string"==typeof r?r:Er.getPath(r);for(var o=t.split("/").reverse();o.length;){var a=o.pop();if(a){var i=mr.join2(r,a);try{Er.mkdir(i)}catch(s){}r=i}}return i},createFile:(r,t,e,n,o)=>{var a=mr.join2("string"==typeof r?r:Er.getPath(r),t),i=Er.getMode(n,o);return Er.create(a,i)},createDataFile:(r,t,e,n,o,a)=>{var i=t;r&&(r="string"==typeof r?r:Er.getPath(r),i=t?mr.join2(r,t):r);var s=Er.getMode(n,o),u=Er.create(i,s);if(e){if("string"==typeof e){for(var c=new Array(e.length),f=0,l=e.length;f<l;++f)c[f]=e.charCodeAt(f);e=c}Er.chmod(u,146|s);var d=Er.open(u,577);Er.write(d,e,0,e.length,0,a),Er.close(d),Er.chmod(u,s)}return u},createDevice:(r,t,e,n)=>{var o=mr.join2("string"==typeof r?r:Er.getPath(r),t),a=Er.getMode(!!e,!!n);Er.createDevice.major||(Er.createDevice.major=64);var i=Er.makedev(Er.createDevice.major++,0);return Er.registerDevice(i,{open:r=>{r.seekable=!1},close:r=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(r,t,n,o,a)=>{for(var i=0,s=0;s<o;s++){var u;try{u=e()}catch(c){throw new Er.ErrnoError(29)}if(void 0===u&&0===i)throw new Er.ErrnoError(6);if(null==u)break;i++,t[n+s]=u}return i&&(r.node.timestamp=Date.now()),i},write:(r,t,e,o,a)=>{for(var i=0;i<o;i++)try{n(t[e+i])}catch(s){throw new Er.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),i}}),Er.mkdev(o,a,i)},forceLoadFile:r=>{if(r.isDevice||r.isFolder||r.link||r.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!u)throw new Error("Cannot load without read() or XMLHttpRequest.");try{r.contents=vr(u(r.url),!0),r.usedBytes=r.contents.length}catch(t){throw new Er.ErrnoError(29)}},createLazyFile:(r,t,e,n,o)=>{function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(r){if(!(r>this.length-1||r<0)){var t=r%this.chunkSize,e=r/this.chunkSize|0;return this.getter(e)[t]}},a.prototype.setDataGetter=function(r){this.getter=r},a.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open("HEAD",e,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+e+". Status: "+r.status);var t,n=Number(r.getResponseHeader("Content-length")),o=(t=r.getResponseHeader("Accept-Ranges"))&&"bytes"===t,a=(t=r.getResponseHeader("Content-Encoding"))&&"gzip"===t,i=1048576;o||(i=n);var s=this;s.setDataGetter(r=>{var t=r*i,o=(r+1)*i-1;if(o=Math.min(o,n-1),void 0===s.chunks[r]&&(s.chunks[r]=((r,t)=>{if(r>t)throw new Error("invalid range ("+r+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",e,!1),n!==i&&o.setRequestHeader("Range","bytes="+r+"-"+t),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+e+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):vr(o.responseText||"",!0)})(t,o)),void 0===s.chunks[r])throw new Error("doXHR failed!");return s.chunks[r]}),!a&&n||(i=n=1,n=this.getter(0).length,i=n,b("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!v)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i=new a;Object.defineProperties(i,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:i}}else s={isDevice:!1,url:e};var u=Er.createFile(r,t,s,n,o);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={};function f(r,t,e,n,o){var a=r.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)t[e+s]=a[o+s];else for(s=0;s<i;s++)t[e+s]=a.get(o+s);return i}return Object.keys(u.stream_ops).forEach(r=>{var t=u.stream_ops[r];c[r]=function(){return Er.forceLoadFile(u),t.apply(null,arguments)}}),c.read=((r,t,e,n,o)=>(Er.forceLoadFile(u),f(r,t,e,n,o))),c.mmap=((r,t,e,n,o)=>{Er.forceLoadFile(u);var a=yr();if(!a)throw new Er.ErrnoError(48);return f(r,A,a,t,e),{ptr:a,allocated:!0}}),u.stream_ops=c,u},createPreloadedFile:(r,t,e,n,o,a,i,s,u,c)=>{var f=t?pr.resolve(mr.join2(r,t)):r;K("cp "+f);function l(e){function l(e){c&&c(),s||Er.createDataFile(r,t,e,n,o,u),a&&a(),$()}Browser.handledByPreloadPlugin(e,f,l,()=>{i&&i(),$()})||l(e)}J(),"string"==typeof e?_r(e,r=>l(r),i):l(e)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(r,t,e)=>{t=t||(()=>{}),e=e||(()=>{});var n=Er.indexedDB();try{var o=n.open(Er.DB_NAME(),Er.DB_VERSION)}catch(a){return e(a)}o.onupgradeneeded=(()=>{b("creating db"),o.result.createObjectStore(Er.DB_STORE_NAME)}),o.onsuccess=(()=>{var n=o.result.transaction([Er.DB_STORE_NAME],"readwrite"),a=n.objectStore(Er.DB_STORE_NAME),i=0,s=0,u=r.length;function c(){0==s?t():e()}r.forEach(r=>{var t=a.put(Er.analyzePath(r).object.contents,r);t.onsuccess=(()=>{++i+s==u&&c()}),t.onerror=(()=>{i+ ++s==u&&c()})}),n.onerror=e}),o.onerror=e},loadFilesFromDB:(r,t,e)=>{t=t||(()=>{}),e=e||(()=>{});var n=Er.indexedDB();try{var o=n.open(Er.DB_NAME(),Er.DB_VERSION)}catch(a){return e(a)}o.onupgradeneeded=e,o.onsuccess=(()=>{var n=o.result;try{var i=n.transaction([Er.DB_STORE_NAME],"readonly")}catch(a){return void e(a)}var s=i.objectStore(Er.DB_STORE_NAME),u=0,c=0,f=r.length;function l(){0==c?t():e()}r.forEach(r=>{var t=s.get(r);t.onsuccess=(()=>{Er.analyzePath(r).exists&&Er.unlink(r),Er.createDataFile(mr.dirname(r),mr.basename(r),t.result,!0,!0,!0),++u+c==f&&l()}),t.onerror=(()=>{u+ ++c==f&&l()})}),i.onerror=e}),o.onerror=e}},br={DEFAULT_POLLMASK:5,calculateAt:function(r,t,e){if(mr.isAbs(t))return t;var n;-100===r?n=Er.cwd():n=br.getStreamFromFD(r).path;if(0==t.length){if(!e)throw new Er.ErrnoError(44);return n}return mr.join2(n,t)},doStat:function(r,t,e){try{var n=r(t)}catch(s){if(s&&s.node&&mr.normalize(t)!==mr.normalize(Er.getPath(s.node)))return-54;throw s}T[e>>2]=n.dev,T[e+8>>2]=n.ino,T[e+12>>2]=n.mode,C[e+16>>2]=n.nlink,T[e+20>>2]=n.uid,T[e+24>>2]=n.gid,T[e+28>>2]=n.rdev,er=[n.size>>>0,(tr=n.size,+Math.abs(tr)>=1?tr>0?(0|Math.min(+Math.floor(tr/4294967296),4294967295))>>>0:~~+Math.ceil((tr-+(~~tr>>>0))/4294967296)>>>0:0)],T[e+40>>2]=er[0],T[e+44>>2]=er[1],T[e+48>>2]=4096,T[e+52>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),i=n.ctime.getTime();return er=[Math.floor(o/1e3)>>>0,(tr=Math.floor(o/1e3),+Math.abs(tr)>=1?tr>0?(0|Math.min(+Math.floor(tr/4294967296),4294967295))>>>0:~~+Math.ceil((tr-+(~~tr>>>0))/4294967296)>>>0:0)],T[e+56>>2]=er[0],T[e+60>>2]=er[1],C[e+64>>2]=o%1e3*1e3,er=[Math.floor(a/1e3)>>>0,(tr=Math.floor(a/1e3),+Math.abs(tr)>=1?tr>0?(0|Math.min(+Math.floor(tr/4294967296),4294967295))>>>0:~~+Math.ceil((tr-+(~~tr>>>0))/4294967296)>>>0:0)],T[e+72>>2]=er[0],T[e+76>>2]=er[1],C[e+80>>2]=a%1e3*1e3,er=[Math.floor(i/1e3)>>>0,(tr=Math.floor(i/1e3),+Math.abs(tr)>=1?tr>0?(0|Math.min(+Math.floor(tr/4294967296),4294967295))>>>0:~~+Math.ceil((tr-+(~~tr>>>0))/4294967296)>>>0:0)],T[e+88>>2]=er[0],T[e+92>>2]=er[1],C[e+96>>2]=i%1e3*1e3,er=[n.ino>>>0,(tr=n.ino,+Math.abs(tr)>=1?tr>0?(0|Math.min(+Math.floor(tr/4294967296),4294967295))>>>0:~~+Math.ceil((tr-+(~~tr>>>0))/4294967296)>>>0:0)],T[e+104>>2]=er[0],T[e+108>>2]=er[1],0},doMsync:function(r,t,e,n,o){if(!Er.isFile(t.node.mode))throw new Er.ErrnoError(43);if(2&n)return 0;var a=P.slice(r,r+e);Er.msync(t,a,o,e,n)},varargs:void 0,get:function(){return br.varargs+=4,T[br.varargs-4>>2]},getStr:function(r){return z(r)},getStreamFromFD:function(r){var t=Er.getStream(r);if(!t)throw new Er.ErrnoError(8);return t}};function kr(r){return T[Wr()>>2]=r,r}var Dr=!0;function Sr(r){return C[r>>2]+4294967296*T[r+4>>2]}function jr(r){return r%4==0&&(r%100!=0||r%400==0)}var Mr=[0,31,60,91,121,152,182,213,244,274,305,335],Fr=[0,31,59,90,120,151,181,212,243,273,304,334];function Ar(r){return(jr(r.getFullYear())?Mr:Fr)[r.getMonth()]+r.getDate()-1}function Pr(r){var t=I(r)+1,e=Gr(t);return e&&N(r,A,e,t),e}var xr={};function Tr(){if(!Tr.strings){var r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:h||"./this.program"};for(var t in xr)void 0===xr[t]?delete r[t]:r[t]=xr[t];var e=[];for(var t in r)e.push(t+"="+r[t]);Tr.strings=e}return Tr.strings}function Cr(r,t){var e;j=r,j=e=r,G()||(s.onExit&&s.onExit(e),M=!0),m(e,new sr(e))}var Rr=Cr;var Or=[31,29,31,30,31,30,31,31,30,31,30,31],zr=[31,28,31,30,31,30,31,31,30,31,30,31];function Nr(r,t){A.set(r,t)}function Br(r,t,e,n){var o=T[n+40>>2],a={tm_sec:T[n>>2],tm_min:T[n+4>>2],tm_hour:T[n+8>>2],tm_mday:T[n+12>>2],tm_mon:T[n+16>>2],tm_year:T[n+20>>2],tm_wday:T[n+24>>2],tm_yday:T[n+28>>2],tm_isdst:T[n+32>>2],tm_gmtoff:T[n+36>>2],tm_zone:o?z(o):""},i=z(e),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)i=i.replace(new RegExp(u,"g"),s[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],f=["January","February","March","April","May","June","July","August","September","October","November","December"];function l(r,t,e){for(var n="number"==typeof r?r.toString():r||"";n.length<t;)n=e[0]+n;return n}function d(r,t){return l(r,t,"0")}function h(r,t){function e(r){return r<0?-1:r>0?1:0}var n;return 0===(n=e(r.getFullYear()-t.getFullYear()))&&0===(n=e(r.getMonth()-t.getMonth()))&&(n=e(r.getDate()-t.getDate())),n}function m(r){switch(r.getDay()){case 0:return new Date(r.getFullYear()-1,11,29);case 1:return r;case 2:return new Date(r.getFullYear(),0,3);case 3:return new Date(r.getFullYear(),0,2);case 4:return new Date(r.getFullYear(),0,1);case 5:return new Date(r.getFullYear()-1,11,31);case 6:return new Date(r.getFullYear()-1,11,30)}}function p(r){var t=function(r,t){for(var e=new Date(r.getTime());t>0;){var n=jr(e.getFullYear()),o=e.getMonth(),a=(n?Or:zr)[o];if(!(t>a-e.getDate()))return e.setDate(e.getDate()+t),e;t-=a-e.getDate()+1,e.setDate(1),o<11?e.setMonth(o+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1))}return e}(new Date(r.tm_year+1900,0,1),r.tm_yday),e=new Date(t.getFullYear(),0,4),n=new Date(t.getFullYear()+1,0,4),o=m(e),a=m(n);return h(o,t)<=0?h(a,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var v={"%a":function(r){return c[r.tm_wday].substring(0,3)},"%A":function(r){return c[r.tm_wday]},"%b":function(r){return f[r.tm_mon].substring(0,3)},"%B":function(r){return f[r.tm_mon]},"%C":function(r){return d((r.tm_year+1900)/100|0,2)},"%d":function(r){return d(r.tm_mday,2)},"%e":function(r){return l(r.tm_mday,2," ")},"%g":function(r){return p(r).toString().substring(2)},"%G":function(r){return p(r)},"%H":function(r){return d(r.tm_hour,2)},"%I":function(r){var t=r.tm_hour;return 0==t?t=12:t>12&&(t-=12),d(t,2)},"%j":function(r){return d(r.tm_mday+function(r,t){for(var e=0,n=0;n<=t;e+=r[n++]);return e}(jr(r.tm_year+1900)?Or:zr,r.tm_mon-1),3)},"%m":function(r){return d(r.tm_mon+1,2)},"%M":function(r){return d(r.tm_min,2)},"%n":function(){return"\n"},"%p":function(r){return r.tm_hour>=0&&r.tm_hour<12?"AM":"PM"},"%S":function(r){return d(r.tm_sec,2)},"%t":function(){return"\t"},"%u":function(r){return r.tm_wday||7},"%U":function(r){var t=r.tm_yday+7-r.tm_wday;return d(Math.floor(t/7),2)},"%V":function(r){var t=Math.floor((r.tm_yday+7-(r.tm_wday+6)%7)/7);if((r.tm_wday+371-r.tm_yday-2)%7<=2&&t++,t){if(53==t){var e=(r.tm_wday+371-r.tm_yday)%7;4==e||3==e&&jr(r.tm_year)||(t=1)}}else{t=52;var n=(r.tm_wday+7-r.tm_yday-1)%7;(4==n||5==n&&jr(r.tm_year%400-1))&&t++}return d(t,2)},"%w":function(r){return r.tm_wday},"%W":function(r){var t=r.tm_yday+7-(r.tm_wday+6)%7;return d(Math.floor(t/7),2)},"%y":function(r){return(r.tm_year+1900).toString().substring(2)},"%Y":function(r){return r.tm_year+1900},"%z":function(r){var t=r.tm_gmtoff,e=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(e?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(r){return r.tm_zone},"%%":function(){return"%"}};for(var u in i=i.replace(/%%/g,"\0\0"),v)i.includes(u)&&(i=i.replace(new RegExp(u,"g"),v[u](a)));var w=vr(i=i.replace(/\0\0/g,"%"),!1);return w.length>t?0:(Nr(w,r),w.length-1)}function Ir(r){return s["_"+r]}function Lr(r,t,e,n,o){var a={string:r=>{var t=0;if(null!=r&&0!==r){var e=1+(r.length<<2);B(r,t=$r(e),e)}return t},array:r=>{var t=$r(r.length);return Nr(r,t),t}};var i=Ir(r),s=[],u=0;if(n)for(var c=0;c<n.length;c++){var f=a[e[c]];f?(0===u&&(u=Kr()),s[c]=f(n[c])):s[c]=n[c]}var l=i.apply(null,s);return l=function(r){return 0!==u&&Jr(u),function(r){return"string"===t?z(r):"boolean"===t?Boolean(r):r}(r)}(l)}var Ur=function(r,t,e,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=Er.nextInode++,this.name=t,this.mode=e,this.node_ops={},this.stream_ops={},this.rdev=n};Object.defineProperties(Ur.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(r){r?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(r){r?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return Er.isDir(this.mode)}},isDevice:{get:function(){return Er.isChrdev(this.mode)}}}),Er.FSNode=Ur,Er.staticInit();var Hr,Yr={n:function(r){var t=new hr(r);return t.get_caught()||(t.set_caught(!0),fr--),t.set_rethrown(!1),cr.push(t),function(r){r.add_ref()}(t),t.get_exception_ptr()},u:function(){Vr(0),function(r){if(r.release_ref()&&!r.get_rethrown()){var t=r.get_destructor();t&&dr(t)(r.excPtr),qr(r.excPtr)}}(cr.pop()),lr=0},a:function(){var r=lr;if(!r)return Xr(0),0;var t=new hr(r);t.set_adjusted_ptr(r);var e=t.get_type();if(!e)return Xr(0),r;for(var n=0;n<arguments.length;n++){var o=arguments[n];if(0===o||o===e)break;var a=t.ptr+16;if(Zr(o,e,a))return Xr(o),r}return Xr(e),r},h:function(){var r=lr;if(!r)return Xr(0),0;var t=new hr(r);t.set_adjusted_ptr(r);var e=t.get_type();if(!e)return Xr(0),r;for(var n=0;n<arguments.length;n++){var o=arguments[n];if(0===o||o===e)break;var a=t.ptr+16;if(Zr(o,e,a))return Xr(o),r}return Xr(e),r},y:function(){var r=lr;if(!r)return Xr(0),0;var t=new hr(r);t.set_adjusted_ptr(r);var e=t.get_type();if(!e)return Xr(0),r;for(var n=0;n<arguments.length;n++){var o=arguments[n];if(0===o||o===e)break;var a=t.ptr+16;if(Zr(o,e,a))return Xr(o),r}return Xr(e),r},H:function(){var r=lr;if(!r)return Xr(0),0;var t=new hr(r);t.set_adjusted_ptr(r);var e=t.get_type();if(!e)return Xr(0),r;for(var n=0;n<arguments.length;n++){var o=arguments[n];if(0===o||o===e)break;var a=t.ptr+16;if(Zr(o,e,a))return Xr(o),r}return Xr(e),r},R:function(){var r=cr.pop();r||Z("no exception to throw");var t=r.excPtr;throw r.get_rethrown()||(cr.push(r),r.set_rethrown(!0),r.set_caught(!1),fr++),lr=t,t},s:function(r,t,e){throw new hr(r).init(t,e),lr=r,fr++,r},ja:function(){return fr},c:function(r){throw lr||(lr=r),r},ta:function(r,t,e){try{var n=br.getStreamFromFD(r);if(n.fd===t)return-28;var o=Er.getStream(t);return o&&Er.close(o),Er.createStream(n,t,t+1).fd}catch(a){if(void 0===Er||!(a instanceof Er.ErrnoError))throw a;return-a.errno}},D:function(r,t,e){br.varargs=e;try{var n=br.getStreamFromFD(r);switch(t){case 0:return(o=br.get())<0?-28:Er.createStream(n,o).fd;case 1:case 2:return 0;case 3:return n.flags;case 4:var o=br.get();return n.flags|=o,0;case 5:return o=br.get(),x[o+0>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return kr(28),-1;default:return-28}}catch(a){if(void 0===Er||!(a instanceof Er.ErrnoError))throw a;return-a.errno}},sa:function(r,t){try{if(0===t)return-28;var e=Er.cwd(),n=I(e)+1;return t<n?-68:(B(e,r,t),n)}catch(o){if(void 0===Er||!(o instanceof Er.ErrnoError))throw o;return-o.errno}},va:function(r,t,e){br.varargs=e;try{var n=br.getStreamFromFD(r);switch(t){case 21509:case 21505:return n.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=br.get();return T[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=br.get(),Er.ioctl(n,t,o);case 21523:case 21524:return n.tty?0:-59;default:return-28}}catch(a){if(void 0===Er||!(a instanceof Er.ErrnoError))throw a;return-a.errno}},M:function(r,t){try{return r=br.getStr(r),br.doStat(Er.lstat,r,t)}catch(e){if(void 0===Er||!(e instanceof Er.ErrnoError))throw e;return-e.errno}},wa:function(r,t,e,n){try{t=br.getStr(t);var o=256&n,a=4096&n;return n&=-6401,t=br.calculateAt(r,t,a),br.doStat(o?Er.lstat:Er.stat,t,e)}catch(i){if(void 0===Er||!(i instanceof Er.ErrnoError))throw i;return-i.errno}},O:function(r,t,e,n){br.varargs=n;try{t=br.getStr(t),t=br.calculateAt(r,t);var o=n?br.get():0;return Er.open(t,e,o).fd}catch(a){if(void 0===Er||!(a instanceof Er.ErrnoError))throw a;return-a.errno}},oa:function(r,t,e,n){try{if(t=br.getStr(t),t=br.calculateAt(r,t),n<=0)return-28;var o=Er.readlink(t),a=Math.min(n,I(o)),i=A[e+a];return B(o,e,n+1),A[e+a]=i,a}catch(s){if(void 0===Er||!(s instanceof Er.ErrnoError))throw s;return-s.errno}},ma:function(r,t,e,n){try{return t=br.getStr(t),n=br.getStr(n),t=br.calculateAt(r,t),n=br.calculateAt(e,n),Er.rename(t,n),0}catch(o){if(void 0===Er||!(o instanceof Er.ErrnoError))throw o;return-o.errno}},na:function(r){try{return r=br.getStr(r),Er.rmdir(r),0}catch(t){if(void 0===Er||!(t instanceof Er.ErrnoError))throw t;return-t.errno}},pa:function(r,t){try{return r=br.getStr(r),br.doStat(Er.stat,r,t)}catch(e){if(void 0===Er||!(e instanceof Er.ErrnoError))throw e;return-e.errno}},L:function(r,t,e){try{return t=br.getStr(t),t=br.calculateAt(r,t),0===e?Er.unlink(t):512===e?Er.rmdir(t):Z("Invalid flags passed to unlinkat"),0}catch(n){if(void 0===Er||!(n instanceof Er.ErrnoError))throw n;return-n.errno}},xa:function(){return Dr},ka:function(){throw 1/0},ya:function(r,t){var e=new Date(1e3*Sr(r));T[t>>2]=e.getUTCSeconds(),T[t+4>>2]=e.getUTCMinutes(),T[t+8>>2]=e.getUTCHours(),T[t+12>>2]=e.getUTCDate(),T[t+16>>2]=e.getUTCMonth(),T[t+20>>2]=e.getUTCFullYear()-1900,T[t+24>>2]=e.getUTCDay();var n=Date.UTC(e.getUTCFullYear(),0,1,0,0,0,0),o=(e.getTime()-n)/864e5|0;T[t+28>>2]=o},za:function(r,t){var e=new Date(1e3*Sr(r));T[t>>2]=e.getSeconds(),T[t+4>>2]=e.getMinutes(),T[t+8>>2]=e.getHours(),T[t+12>>2]=e.getDate(),T[t+16>>2]=e.getMonth(),T[t+20>>2]=e.getFullYear()-1900,T[t+24>>2]=e.getDay();var n=0|Ar(e);T[t+28>>2]=n,T[t+36>>2]=-60*e.getTimezoneOffset();var o=new Date(e.getFullYear(),0,1),a=new Date(e.getFullYear(),6,1).getTimezoneOffset(),i=o.getTimezoneOffset(),s=0|(a!=i&&e.getTimezoneOffset()==Math.min(i,a));T[t+32>>2]=s},Aa:function(r){var t=new Date(T[r+20>>2]+1900,T[r+16>>2],T[r+12>>2],T[r+8>>2],T[r+4>>2],T[r>>2],0),e=T[r+32>>2],n=t.getTimezoneOffset(),o=new Date(t.getFullYear(),0,1),a=new Date(t.getFullYear(),6,1).getTimezoneOffset(),i=o.getTimezoneOffset(),s=Math.min(i,a);if(e<0)T[r+32>>2]=Number(a!=i&&s==n);else if(e>0!=(s==n)){var u=Math.max(i,a),c=e>0?s:u;t.setTime(t.getTime()+6e4*(c-n))}T[r+24>>2]=t.getDay();var f=0|Ar(t);return T[r+28>>2]=f,T[r>>2]=t.getSeconds(),T[r+4>>2]=t.getMinutes(),T[r+8>>2]=t.getHours(),T[r+12>>2]=t.getDate(),T[r+16>>2]=t.getMonth(),T[r+20>>2]=t.getYear(),t.getTime()/1e3|0},Ba:function(r,t,e){var n=(new Date).getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),i=o.getTimezoneOffset(),s=a.getTimezoneOffset(),u=Math.max(i,s);function c(r){var t=r.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}C[r>>2]=60*u,T[t>>2]=Number(i!=s);var f=c(o),l=c(a),d=Pr(f),h=Pr(l);s<i?(C[e>>2]=d,C[e+4>>2]=h):(C[e>>2]=h,C[e+4>>2]=d)},C:function(){Z("")},B:function(){return Date.now()},la:function(r){P.length,Z("OOM")},qa:function(r,t){var e=0;return Tr().forEach(function(n,o){var a=t+e;C[r+4*o>>2]=a,function(r,t,e){for(var n=0;n<r.length;++n)A[t++>>0]=r.charCodeAt(n);e||(A[t>>0]=0)}(n,a),e+=n.length+1}),0},ra:function(r,t){var e=Tr();C[r>>2]=e.length;var n=0;return e.forEach(function(r){n+=r.length+1}),C[t>>2]=n,0},Ca:Rr,E:function(r){try{var t=br.getStreamFromFD(r);return Er.close(t),0}catch(e){if(void 0===Er||!(e instanceof Er.ErrnoError))throw e;return e.errno}},ua:function(r,t,e,n){try{var o=function(r,t,e,n){for(var o=0,a=0;a<e;a++){var i=C[t>>2],s=C[t+4>>2];t+=8;var u=Er.read(r,A,i,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o}(br.getStreamFromFD(r),t,e);return C[n>>2]=o,0}catch(a){if(void 0===Er||!(a instanceof Er.ErrnoError))throw a;return a.errno}},U:function(r,t,e,n,o){try{var a=(u=e)+2097152>>>0<4194305-!!(s=t)?(s>>>0)+4294967296*u:NaN;if(isNaN(a))return 61;var i=br.getStreamFromFD(r);return Er.llseek(i,a,n),er=[i.position>>>0,(tr=i.position,+Math.abs(tr)>=1?tr>0?(0|Math.min(+Math.floor(tr/4294967296),4294967295))>>>0:~~+Math.ceil((tr-+(~~tr>>>0))/4294967296)>>>0:0)],T[o>>2]=er[0],T[o+4>>2]=er[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(c){if(void 0===Er||!(c instanceof Er.ErrnoError))throw c;return c.errno}var s,u},N:function(r,t,e,n){try{var o=function(r,t,e,n){for(var o=0,a=0;a<e;a++){var i=C[t>>2],s=C[t+4>>2];t+=8;var u=Er.write(r,A,i,s,n);if(u<0)return-1;o+=u}return o}(br.getStreamFromFD(r),t,e);return C[n>>2]=o,0}catch(a){if(void 0===Er||!(a instanceof Er.ErrnoError))throw a;return a.errno}},t:function(r,t){var e=Kr();try{return dr(r)(t)}catch(n){if(Jr(e),n!==n+0)throw n;Vr(1,0)}},I:function(r,t,e,n){var o=Kr();try{return dr(r)(t,e,n)}catch(a){if(Jr(o),a!==a+0)throw a;Vr(1,0)}},J:function(r,t,e,n){var o=Kr();try{return dr(r)(t,e,n)}catch(a){if(Jr(o),a!==a+0)throw a;Vr(1,0)}},p:function(r){var t=Kr();try{return dr(r)()}catch(e){if(Jr(t),e!==e+0)throw e;Vr(1,0)}},g:function(r,t){var e=Kr();try{return dr(r)(t)}catch(n){if(Jr(e),n!==n+0)throw n;Vr(1,0)}},b:function(r,t,e){var n=Kr();try{return dr(r)(t,e)}catch(o){if(Jr(n),o!==o+0)throw o;Vr(1,0)}},f:function(r,t,e,n){var o=Kr();try{return dr(r)(t,e,n)}catch(a){if(Jr(o),a!==a+0)throw a;Vr(1,0)}},i:function(r,t,e,n,o){var a=Kr();try{return dr(r)(t,e,n,o)}catch(i){if(Jr(a),i!==i+0)throw i;Vr(1,0)}},q:function(r,t,e,n,o,a){var i=Kr();try{return dr(r)(t,e,n,o,a)}catch(s){if(Jr(i),s!==s+0)throw s;Vr(1,0)}},r:function(r,t,e,n,o,a,i){var s=Kr();try{return dr(r)(t,e,n,o,a,i)}catch(u){if(Jr(s),u!==u+0)throw u;Vr(1,0)}},K:function(r,t,e,n,o,a,i,s){var u=Kr();try{return dr(r)(t,e,n,o,a,i,s)}catch(c){if(Jr(u),c!==c+0)throw c;Vr(1,0)}},X:function(r,t,e,n,o,a,i,s,u,c,f){var l=Kr();try{return dr(r)(t,e,n,o,a,i,s,u,c,f)}catch(d){if(Jr(l),d!==d+0)throw d;Vr(1,0)}},A:function(r,t,e,n,o,a,i,s,u,c,f,l){var d=Kr();try{return dr(r)(t,e,n,o,a,i,s,u,c,f,l)}catch(h){if(Jr(d),h!==h+0)throw h;Vr(1,0)}},P:function(r,t,e,n,o,a,i,s,u,c,f,l,d){var h=Kr();try{return dr(r)(t,e,n,o,a,i,s,u,c,f,l,d)}catch(m){if(Jr(h),m!==m+0)throw m;Vr(1,0)}},T:function(r,t,e,n,o,a,i,s,u){var c=Kr();try{return mt(r,t,e,n,o,a,i,s,u)}catch(f){if(Jr(c),f!==f+0)throw f;Vr(1,0)}},ea:function(r,t,e,n,o,a){var i=Kr();try{return nt(r,t,e,n,o,a)}catch(s){if(Jr(i),s!==s+0)throw s;Vr(1,0)}},da:function(r,t,e,n,o,a,i,s){var u=Kr();try{return ot(r,t,e,n,o,a,i,s)}catch(c){if(Jr(u),c!==c+0)throw c;Vr(1,0)}},V:function(r,t,e,n){var o=Kr();try{return ht(r,t,e,n)}catch(a){if(Jr(o),a!==a+0)throw a;Vr(1,0)}},S:function(r,t,e,n,o){var a=Kr();try{return pt(r,t,e,n,o)}catch(i){if(Jr(a),i!==i+0)throw i;Vr(1,0)}},j:function(r){var t=Kr();try{dr(r)()}catch(e){if(Jr(t),e!==e+0)throw e;Vr(1,0)}},k:function(r,t){var e=Kr();try{dr(r)(t)}catch(n){if(Jr(e),n!==n+0)throw n;Vr(1,0)}},w:function(r,t,e){var n=Kr();try{dr(r)(t,e)}catch(o){if(Jr(n),o!==o+0)throw o;Vr(1,0)}},Y:function(r,t,e,n,o,a,i){var s=Kr();try{ut(r,t,e,n,o,a,i)}catch(u){if(Jr(s),u!==u+0)throw u;Vr(1,0)}},d:function(r,t,e){var n=Kr();try{dr(r)(t,e)}catch(o){if(Jr(n),o!==o+0)throw o;Vr(1,0)}},e:function(r,t,e,n){var o=Kr();try{dr(r)(t,e,n)}catch(a){if(Jr(o),a!==a+0)throw a;Vr(1,0)}},F:function(r,t,e,n,o,a,i,s,u,c,f,l){var d=Kr();try{dr(r)(t,e,n,o,a,i,s,u,c,f,l)}catch(h){if(Jr(d),h!==h+0)throw h;Vr(1,0)}},m:function(r,t,e,n,o){var a=Kr();try{dr(r)(t,e,n,o)}catch(i){if(Jr(a),i!==i+0)throw i;Vr(1,0)}},l:function(r,t,e,n,o,a){var i=Kr();try{dr(r)(t,e,n,o,a)}catch(s){if(Jr(i),s!==s+0)throw s;Vr(1,0)}},G:function(r,t,e,n,o,a,i){var s=Kr();try{dr(r)(t,e,n,o,a,i)}catch(u){if(Jr(s),u!==u+0)throw u;Vr(1,0)}},v:function(r,t,e,n,o,a,i,s){var u=Kr();try{dr(r)(t,e,n,o,a,i,s)}catch(c){if(Jr(u),c!==c+0)throw c;Vr(1,0)}},Q:function(r,t,e,n,o,a,i,s,u){var c=Kr();try{dr(r)(t,e,n,o,a,i,s,u)}catch(f){if(Jr(c),f!==f+0)throw f;Vr(1,0)}},x:function(r,t,e,n,o,a,i,s,u,c,f){var l=Kr();try{dr(r)(t,e,n,o,a,i,s,u,c,f)}catch(d){if(Jr(l),d!==d+0)throw d;Vr(1,0)}},z:function(r,t,e,n,o,a,i,s,u,c,f,l,d,h,m,p){var v=Kr();try{dr(r)(t,e,n,o,a,i,s,u,c,f,l,d,h,m,p)}catch(w){if(Jr(v),w!==w+0)throw w;Vr(1,0)}},$:function(r,t,e,n,o,a,i){var s=Kr();try{ct(r,t,e,n,o,a,i)}catch(u){if(Jr(s),u!==u+0)throw u;Vr(1,0)}},aa:function(r,t,e,n,o,a,i,s){var u=Kr();try{st(r,t,e,n,o,a,i,s)}catch(c){if(Jr(u),c!==c+0)throw c;Vr(1,0)}},Z:function(r,t,e,n,o,a,i,s,u){var c=Kr();try{ft(r,t,e,n,o,a,i,s,u)}catch(f){if(Jr(c),f!==f+0)throw f;Vr(1,0)}},_:function(r,t,e,n,o,a,i,s,u,c,f,l){var d=Kr();try{lt(r,t,e,n,o,a,i,s,u,c,f,l)}catch(h){if(Jr(d),h!==h+0)throw h;Vr(1,0)}},ga:function(r,t,e,n,o,a,i,s){var u=Kr();try{tt(r,t,e,n,o,a,i,s)}catch(c){if(Jr(u),c!==c+0)throw c;Vr(1,0)}},ba:function(r,t,e,n,o,a,i,s,u){var c=Kr();try{it(r,t,e,n,o,a,i,s,u)}catch(f){if(Jr(c),f!==f+0)throw f;Vr(1,0)}},fa:function(r,t,e,n,o,a,i,s,u,c){var f=Kr();try{et(r,t,e,n,o,a,i,s,u,c)}catch(l){if(Jr(f),l!==l+0)throw l;Vr(1,0)}},W:function(r,t,e,n){var o=Kr();try{dt(r,t,e,n)}catch(a){if(Jr(o),a!==a+0)throw a;Vr(1,0)}},ca:function(r,t,e,n,o,a){var i=Kr();try{at(r,t,e,n,o,a)}catch(s){if(Jr(i),s!==s+0)throw s;Vr(1,0)}},ha:function(r,t,e,n,o,a,i,s,u,c){var f=Kr();try{rt(r,t,e,n,o,a,i,s,u,c)}catch(l){if(Jr(f),l!==l+0)throw l;Vr(1,0)}},o:function(r){return r},Ea:Br,ia:function(r,t,e,n,o){return Br(r,t,e,n)},Da:function(r){if(w){if(!r)return 1;var t=z(r);if(!t.length)return 0;var e=require("child_process").spawnSync(t,[],{shell:!0,stdio:"inherit"}),n=(r,t)=>r<<8|t;return null===e.status?n(0,(r=>{switch(r){case"SIGHUP":return 1;case"SIGINT":return 2;case"SIGQUIT":return 3;case"SIGFPE":return 8;case"SIGKILL":return 9;case"SIGALRM":return 14;case"SIGTERM":return 15}return 2})(e.signal)):n(e.status,0)}return r?(kr(52),-1):0}},qr=(function(){var r={a:Yr};function t(r,t){var e,n,o=r.exports;s.asm=o,D=s.asm.Fa,e=D.buffer,F=e,s.HEAP8=A=new Int8Array(e),s.HEAP16=x=new Int16Array(e),s.HEAP32=T=new Int32Array(e),s.HEAPU8=P=new Uint8Array(e),s.HEAPU16=new Uint16Array(e),s.HEAPU32=C=new Uint32Array(e),s.HEAPF32=new Float32Array(e),s.HEAPF64=new Float64Array(e),L=s.asm.Ka,n=s.asm.Ga,H.unshift(n),$()}function e(r){t(r.instance)}function n(t){return function(){if(!E&&(p||v)){if("function"==typeof fetch&&!ar(Q))return fetch(Q,{credentials:"same-origin"}).then(function(r){if(!r.ok)throw"failed to load wasm binary file at '"+Q+"'";return r.arrayBuffer()}).catch(function(){return ir(Q)});if(c)return new Promise(function(r,t){c(Q,function(t){r(new Uint8Array(t))},t)})}return Promise.resolve().then(function(){return ir(Q)})}().then(function(t){return WebAssembly.instantiate(t,r)}).then(function(r){return r}).then(t,function(r){k("failed to asynchronously prepare wasm: "+r),Z(r)})}if(J(),s.instantiateWasm)try{return s.instantiateWasm(r,t)}catch(o){k("Module.instantiateWasm callback failed with error: "+o),i(o)}(E||"function"!=typeof WebAssembly.instantiateStreaming||or(Q)||ar(Q)||w||"function"!=typeof fetch?n(e):fetch(Q,{credentials:"same-origin"}).then(function(t){return WebAssembly.instantiateStreaming(t,r).then(e,function(r){return k("wasm streaming compile failed: "+r),k("falling back to ArrayBuffer instantiation"),n(e)})})).catch(i)}(),s.___wasm_call_ctors=function(){return(s.___wasm_call_ctors=s.asm.Ga).apply(null,arguments)},s._create_compile_result=function(){return(s._create_compile_result=s.asm.Ha).apply(null,arguments)},s._main=function(){return(s._main=s.asm.Ia).apply(null,arguments)},s.___cxa_free_exception=function(){return(qr=s.___cxa_free_exception=s.asm.Ja).apply(null,arguments)}),Gr=s._malloc=function(){return(Gr=s._malloc=s.asm.La).apply(null,arguments)},Wr=s.___errno_location=function(){return(Wr=s.___errno_location=s.asm.Ma).apply(null,arguments)},Xr=s.setTempRet0=function(){return(Xr=s.setTempRet0=s.asm.Na).apply(null,arguments)},Vr=s._setThrew=function(){return(Vr=s._setThrew=s.asm.Oa).apply(null,arguments)},Kr=s.stackSave=function(){return(Kr=s.stackSave=s.asm.Pa).apply(null,arguments)},Jr=s.stackRestore=function(){return(Jr=s.stackRestore=s.asm.Qa).apply(null,arguments)},$r=s.stackAlloc=function(){return($r=s.stackAlloc=s.asm.Ra).apply(null,arguments)},Zr=s.___cxa_can_catch=function(){return(Zr=s.___cxa_can_catch=s.asm.Sa).apply(null,arguments)},Qr=s.___cxa_is_pointer_type=function(){return(Qr=s.___cxa_is_pointer_type=s.asm.Ta).apply(null,arguments)},rt=s.dynCall_vijjjj=function(){return(rt=s.dynCall_vijjjj=s.asm.Ua).apply(null,arguments)},tt=s.dynCall_viijji=function(){return(tt=s.dynCall_viijji=s.asm.Va).apply(null,arguments)},et=s.dynCall_viijjiii=function(){return(et=s.dynCall_viijjiii=s.asm.Wa).apply(null,arguments)},nt=s.dynCall_iijj=function(){return(nt=s.dynCall_iijj=s.asm.Xa).apply(null,arguments)},ot=s.dynCall_iijjii=function(){return(ot=s.dynCall_iijjii=s.asm.Ya).apply(null,arguments)},at=s.dynCall_vijj=function(){return(at=s.dynCall_vijj=s.asm.Za).apply(null,arguments)},it=s.dynCall_viijjii=function(){return(it=s.dynCall_viijjii=s.asm._a).apply(null,arguments)},st=s.dynCall_viijjd=function(){return(st=s.dynCall_viijjd=s.asm.$a).apply(null,arguments)},ut=s.dynCall_vidjj=function(){return(ut=s.dynCall_vidjj=s.asm.ab).apply(null,arguments)},ct=s.dynCall_viijj=function(){return(ct=s.dynCall_viijj=s.asm.bb).apply(null,arguments)},ft=s.dynCall_viijjdi=function(){return(ft=s.dynCall_viijjdi=s.asm.cb).apply(null,arguments)},lt=s.dynCall_viijjdjj=function(){return(lt=s.dynCall_viijjdjj=s.asm.db).apply(null,arguments)},dt=s.dynCall_vij=function(){return(dt=s.dynCall_vij=s.asm.eb).apply(null,arguments)},ht=s.dynCall_jiii=function(){return(ht=s.dynCall_jiii=s.asm.fb).apply(null,arguments)},mt=s.dynCall_iiiiijj=function(){return(mt=s.dynCall_iiiiijj=s.asm.gb).apply(null,arguments)},pt=s.dynCall_jiiii=function(){return(pt=s.dynCall_jiiii=s.asm.hb).apply(null,arguments)};function vt(r){var t=s._main;(r=r||[]).unshift(h);var e=r.length,n=$r(4*(e+1)),o=n>>2;r.forEach(r=>{T[o++]=function(r){var t=I(r)+1,e=$r(t);return N(r,A,e,t),e}(r)}),T[o]=0;try{var a=t(e,n);return Cr(a),a}catch(i){return function(r){if(r instanceof sr||"unwind"==r)return j;m(1,r)}(i)}}function wt(r){function t(){Hr||(Hr=!0,s.calledRun=!0,M||(!0,s.noFSInit||Er.init.initialized||Er.init(),Er.ignorePermissions=!1,wr.init(),ur(H),ur(Y),a(s),s.onRuntimeInitialized&&s.onRuntimeInitialized(),yt&&vt(r),function(){if(s.postRun)for("function"==typeof s.postRun&&(s.postRun=[s.postRun]);s.postRun.length;)r=s.postRun.shift(),q.unshift(r);var r;ur(q)}()))}r=r||d,W>0||(!function(){if(s.preRun)for("function"==typeof s.preRun&&(s.preRun=[s.preRun]);s.preRun.length;)r=s.preRun.shift(),U.unshift(r);var r;ur(U)}(),W>0||(s.setStatus?(s.setStatus("Running..."),setTimeout(function(){setTimeout(function(){s.setStatus("")},1),t()},1)):t()))}if(s.UTF8ToString=z,s.cwrap=function(r,t,e,n){var o=(e=e||[]).every(r=>"number"===r||"boolean"===r);return"string"!==t&&o&&!n?Ir(r):function(){return Lr(r,t,e,arguments)}},s.FS=Er,V=function r(){Hr||wt(),Hr||(V=r)},s.preInit)for("function"==typeof s.preInit&&(s.preInit=[s.preInit]);s.preInit.length>0;)s.preInit.pop()();var yt=!0;return s.noInitialRun&&(yt=!1),wt(),t.ready}})();"object"==typeof exports&&"object"==typeof module?module.exports=a:"function"==typeof r&&r.amd?r([],function(){return a}):"object"==typeof exports&&(exports.startWerckmeisterJs=a);
|
|
491
|
-
},{"
|
|
490
|
+
var r,t="/home/runner/work/werckmeister-component/werckmeister-component/node_modules/@werckmeister/compilerjs/werckmeister.js",e=require("process"),n="/home/runner/work/werckmeister-component/werckmeister-component/node_modules/@werckmeister/compilerjs",o=require("buffer").Buffer,a=(()=>{var r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0;return void 0!==t&&(r=r||t),function(t){var a,i,s=void 0!==(t=t||{})?t:{};s.ready=new Promise(function(r,t){a=r,i=t});var u,c,f,l,d,h=Object.assign({},s),m=[],p="./this.program",v=(r,t)=>{throw t},w="object"==typeof window,y="function"==typeof importScripts,g="object"==typeof e&&"object"==typeof e.versions&&"string"==typeof e.versions.node,_="";g?(_=y?require("path").dirname(_)+"/":n+"/","function"==typeof require&&(l=require("fs"),d=require("path")),u=((r,t)=>(r=d.normalize(r),l.readFileSync(r,t?void 0:"utf8"))),f=(r=>{var t=u(r,!0);return t.buffer||(t=new Uint8Array(t)),t}),c=((r,t,e)=>{r=d.normalize(r),l.readFile(r,function(r,n){r?e(r):t(n.buffer)})}),e.argv.length>1&&(p=e.argv[1].replace(/\\/g,"/")),m=e.argv.slice(2),e.on("uncaughtException",function(r){if(!(r instanceof sr))throw r}),e.on("unhandledRejection",function(r){throw r}),v=((r,t)=>{if(G())throw e.exitCode=r,t;!function(r){if(r instanceof sr)return;k("exiting due to exception: "+r)}(t),e.exit(r)}),s.inspect=function(){return"[Emscripten Module object]"}):(w||y)&&(y?_=self.location.href:"undefined"!=typeof document&&document.currentScript&&(_=document.currentScript.src),r&&(_=r),_=0!==_.indexOf("blob:")?_.substr(0,_.replace(/[?#].*/,"").lastIndexOf("/")+1):"",u=(r=>{var t=new XMLHttpRequest;return t.open("GET",r,!1),t.send(null),t.responseText}),y&&(f=(r=>{var t=new XMLHttpRequest;return t.open("GET",r,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)})),c=((r,t,e)=>{var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="arraybuffer",n.onload=(()=>{200==n.status||0==n.status&&n.response?t(n.response):e()}),n.onerror=e,n.send(null)}));var E,b=s.print||console.log.bind(console),k=s.printErr||console.warn.bind(console);Object.assign(s,h),h=null,s.arguments&&(m=s.arguments),s.thisProgram&&(p=s.thisProgram),s.quit&&(v=s.quit),s.wasmBinary&&(E=s.wasmBinary);var D,S=s.noExitRuntime||!0;"object"!=typeof WebAssembly&&Z("no native wasm support detected");var j,M=!1;var F,A,T,P,x,C,R="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function O(r,t,e){for(var n=t+e,o=t;r[o]&&!(o>=n);)++o;if(o-t>16&&r.buffer&&R)return R.decode(r.subarray(t,o));for(var a="";t<o;){var i=r[t++];if(128&i){var s=63&r[t++];if(192!=(224&i)){var u=63&r[t++];if((i=224==(240&i)?(15&i)<<12|s<<6|u:(7&i)<<18|s<<12|u<<6|63&r[t++])<65536)a+=String.fromCharCode(i);else{var c=i-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a}function z(r,t){return r?O(T,r,t):""}function N(r,t,e,n){if(!(n>0))return 0;for(var o=e,a=e+n-1,i=0;i<r.length;++i){var s=r.charCodeAt(i);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&r.charCodeAt(++i);if(s<=127){if(e>=a)break;t[e++]=s}else if(s<=2047){if(e+1>=a)break;t[e++]=192|s>>6,t[e++]=128|63&s}else if(s<=65535){if(e+2>=a)break;t[e++]=224|s>>12,t[e++]=128|s>>6&63,t[e++]=128|63&s}else{if(e+3>=a)break;t[e++]=240|s>>18,t[e++]=128|s>>12&63,t[e++]=128|s>>6&63,t[e++]=128|63&s}}return t[e]=0,e-o}function B(r,t,e){return N(r,T,t,e)}function I(r){for(var t=0,e=0;e<r.length;++e){var n=r.charCodeAt(e);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++e):t+=3}return t}s.INITIAL_MEMORY;var L,U=[],H=[],Y=[],q=[];function G(){return S}var W=0,X=null,V=null;function K(r){return r}function J(r){W++,s.monitorRunDependencies&&s.monitorRunDependencies(W)}function $(r){if(W--,s.monitorRunDependencies&&s.monitorRunDependencies(W),0==W&&(null!==X&&(clearInterval(X),X=null),V)){var t=V;V=null,t()}}function Z(r){s.onAbort&&s.onAbort(r),k(r="Aborted("+r+")"),M=!0,j=1,r+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(r);throw i(t),t}var Q,rr,tr,er,nr="data:application/octet-stream;base64,";function or(r){return r.startsWith(nr)}function ar(r){return r.startsWith("file://")}function ir(r){try{if(r==Q&&E)return new Uint8Array(E);if(f)return f(r);throw"both async and sync fetching of the wasm failed"}catch(k){Z(k)}}function sr(r){this.name="ExitStatus",this.message="Program terminated with exit("+r+")",this.status=r}function ur(r){for(;r.length>0;)r.shift()(s)}function cr(r,t){A.set(r,t)}or(Q="werckmeister.wasm")||(rr=Q,Q=s.locateFile?s.locateFile(rr,_):_+rr);var fr=[];var lr=0;var dr=0;function hr(r){this.excPtr=r,this.ptr=r-24,this.set_type=function(r){C[this.ptr+4>>2]=r},this.get_type=function(){return C[this.ptr+4>>2]},this.set_destructor=function(r){C[this.ptr+8>>2]=r},this.get_destructor=function(){return C[this.ptr+8>>2]},this.set_refcount=function(r){x[this.ptr>>2]=r},this.set_caught=function(r){r=r?1:0,A[this.ptr+12>>0]=r},this.get_caught=function(){return 0!=A[this.ptr+12>>0]},this.set_rethrown=function(r){r=r?1:0,A[this.ptr+13>>0]=r},this.get_rethrown=function(){return 0!=A[this.ptr+13>>0]},this.init=function(r,t){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(t),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var r=x[this.ptr>>2];x[this.ptr>>2]=r+1},this.release_ref=function(){var r=x[this.ptr>>2];return x[this.ptr>>2]=r-1,1===r},this.set_adjusted_ptr=function(r){C[this.ptr+16>>2]=r},this.get_adjusted_ptr=function(){return C[this.ptr+16>>2]},this.get_exception_ptr=function(){if($r(this.get_type()))return C[this.excPtr>>2];var r=this.get_adjusted_ptr();return 0!==r?r:this.excPtr}}function mr(r){try{return Hr(new hr(r).ptr)}catch(t){}}function pr(r){return L.get(r)}var vr={isAbs:r=>"/"===r.charAt(0),splitPath:r=>{return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(r).slice(1)},normalizeArray:(r,t)=>{for(var e=0,n=r.length-1;n>=0;n--){var o=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),e++):e&&(r.splice(n,1),e--)}if(t)for(;e;e--)r.unshift("..");return r},normalize:r=>{var t=vr.isAbs(r),e="/"===r.substr(-1);return(r=vr.normalizeArray(r.split("/").filter(r=>!!r),!t).join("/"))||t||(r="."),r&&e&&(r+="/"),(t?"/":"")+r},dirname:r=>{var t=vr.splitPath(r),e=t[0],n=t[1];return e||n?(n&&(n=n.substr(0,n.length-1)),e+n):"."},basename:r=>{if("/"===r)return"/";var t=(r=(r=vr.normalize(r)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?r:r.substr(t+1)},join:function(){var r=Array.prototype.slice.call(arguments);return vr.normalize(r.join("/"))},join2:(r,t)=>vr.normalize(r+"/"+t)};var wr={resolve:function(){for(var r="",t=!1,e=arguments.length-1;e>=-1&&!t;e--){var n=e>=0?arguments[e]:kr.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";r=n+"/"+r,t=vr.isAbs(n)}return(t?"/":"")+(r=vr.normalizeArray(r.split("/").filter(r=>!!r),!t).join("/"))||"."},relative:(r,t)=>{function e(r){for(var t=0;t<r.length&&""===r[t];t++);for(var e=r.length-1;e>=0&&""===r[e];e--);return t>e?[]:r.slice(t,e-t+1)}r=wr.resolve(r).substr(1),t=wr.resolve(t).substr(1);for(var n=e(r.split("/")),o=e(t.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var u=[];for(s=i;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(i))).join("/")}};function yr(r,t,e){var n=e>0?e:I(r)+1,o=new Array(n),a=N(r,o,0,o.length);return t&&(o.length=a),o}var gr={ttys:[],init:function(){},shutdown:function(){},register:function(r,t){gr.ttys[r]={input:[],output:[],ops:t},kr.registerDevice(r,gr.stream_ops)},stream_ops:{open:function(r){var t=gr.ttys[r.node.rdev];if(!t)throw new kr.ErrnoError(43);r.tty=t,r.seekable=!1},close:function(r){r.tty.ops.fsync(r.tty)},fsync:function(r){r.tty.ops.fsync(r.tty)},read:function(r,t,e,n,o){if(!r.tty||!r.tty.ops.get_char)throw new kr.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=r.tty.ops.get_char(r.tty)}catch(u){throw new kr.ErrnoError(29)}if(void 0===s&&0===a)throw new kr.ErrnoError(6);if(null==s)break;a++,t[e+i]=s}return a&&(r.node.timestamp=Date.now()),a},write:function(r,t,e,n,o){if(!r.tty||!r.tty.ops.put_char)throw new kr.ErrnoError(60);try{for(var a=0;a<n;a++)r.tty.ops.put_char(r.tty,t[e+a])}catch(i){throw new kr.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:function(r){if(!r.input.length){var t=null;if(g){var n=o.alloc(256),a=0;try{a=l.readSync(e.stdin.fd,n,0,256,-1)}catch(i){if(!i.toString().includes("EOF"))throw i;a=0}t=a>0?n.slice(0,a).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n");if(!t)return null;r.input=yr(t,!0)}return r.input.shift()},put_char:function(r,t){null===t||10===t?(b(O(r.output,0)),r.output=[]):0!=t&&r.output.push(t)},fsync:function(r){r.output&&r.output.length>0&&(b(O(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,t){null===t||10===t?(k(O(r.output,0)),r.output=[]):0!=t&&r.output.push(t)},fsync:function(r){r.output&&r.output.length>0&&(k(O(r.output,0)),r.output=[])}}};function _r(r){Z()}var Er={ops_table:null,mount:function(r){return Er.createNode(null,"/",16895,0)},createNode:function(r,t,e,n){if(kr.isBlkdev(e)||kr.isFIFO(e))throw new kr.ErrnoError(63);Er.ops_table||(Er.ops_table={dir:{node:{getattr:Er.node_ops.getattr,setattr:Er.node_ops.setattr,lookup:Er.node_ops.lookup,mknod:Er.node_ops.mknod,rename:Er.node_ops.rename,unlink:Er.node_ops.unlink,rmdir:Er.node_ops.rmdir,readdir:Er.node_ops.readdir,symlink:Er.node_ops.symlink},stream:{llseek:Er.stream_ops.llseek}},file:{node:{getattr:Er.node_ops.getattr,setattr:Er.node_ops.setattr},stream:{llseek:Er.stream_ops.llseek,read:Er.stream_ops.read,write:Er.stream_ops.write,allocate:Er.stream_ops.allocate,mmap:Er.stream_ops.mmap,msync:Er.stream_ops.msync}},link:{node:{getattr:Er.node_ops.getattr,setattr:Er.node_ops.setattr,readlink:Er.node_ops.readlink},stream:{}},chrdev:{node:{getattr:Er.node_ops.getattr,setattr:Er.node_ops.setattr},stream:kr.chrdev_stream_ops}});var o=kr.createNode(r,t,e,n);return kr.isDir(o.mode)?(o.node_ops=Er.ops_table.dir.node,o.stream_ops=Er.ops_table.dir.stream,o.contents={}):kr.isFile(o.mode)?(o.node_ops=Er.ops_table.file.node,o.stream_ops=Er.ops_table.file.stream,o.usedBytes=0,o.contents=null):kr.isLink(o.mode)?(o.node_ops=Er.ops_table.link.node,o.stream_ops=Er.ops_table.link.stream):kr.isChrdev(o.mode)&&(o.node_ops=Er.ops_table.chrdev.node,o.stream_ops=Er.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[t]=o,r.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(r){return r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0)},expandFileStorage:function(r,t){var e=r.contents?r.contents.length:0;if(!(e>=t)){t=Math.max(t,e*(e<1048576?2:1.125)>>>0),0!=e&&(t=Math.max(t,256));var n=r.contents;r.contents=new Uint8Array(t),r.usedBytes>0&&r.contents.set(n.subarray(0,r.usedBytes),0)}},resizeFileStorage:function(r,t){if(r.usedBytes!=t)if(0==t)r.contents=null,r.usedBytes=0;else{var e=r.contents;r.contents=new Uint8Array(t),e&&r.contents.set(e.subarray(0,Math.min(t,r.usedBytes))),r.usedBytes=t}},node_ops:{getattr:function(r){var t={};return t.dev=kr.isChrdev(r.mode)?r.id:1,t.ino=r.id,t.mode=r.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=r.rdev,kr.isDir(r.mode)?t.size=4096:kr.isFile(r.mode)?t.size=r.usedBytes:kr.isLink(r.mode)?t.size=r.link.length:t.size=0,t.atime=new Date(r.timestamp),t.mtime=new Date(r.timestamp),t.ctime=new Date(r.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(r,t){void 0!==t.mode&&(r.mode=t.mode),void 0!==t.timestamp&&(r.timestamp=t.timestamp),void 0!==t.size&&Er.resizeFileStorage(r,t.size)},lookup:function(r,t){throw kr.genericErrors[44]},mknod:function(r,t,e,n){return Er.createNode(r,t,e,n)},rename:function(r,t,e){if(kr.isDir(r.mode)){var n;try{n=kr.lookupNode(t,e)}catch(a){}if(n)for(var o in n.contents)throw new kr.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=e,t.contents[e]=r,t.timestamp=r.parent.timestamp,r.parent=t},unlink:function(r,t){delete r.contents[t],r.timestamp=Date.now()},rmdir:function(r,t){var e=kr.lookupNode(r,t);for(var n in e.contents)throw new kr.ErrnoError(55);delete r.contents[t],r.timestamp=Date.now()},readdir:function(r){var t=[".",".."];for(var e in r.contents)r.contents.hasOwnProperty(e)&&t.push(e);return t},symlink:function(r,t,e){var n=Er.createNode(r,t,41471,0);return n.link=e,n},readlink:function(r){if(!kr.isLink(r.mode))throw new kr.ErrnoError(28);return r.link}},stream_ops:{read:function(r,t,e,n,o){var a=r.node.contents;if(o>=r.node.usedBytes)return 0;var i=Math.min(r.node.usedBytes-o,n);if(i>8&&a.subarray)t.set(a.subarray(o,o+i),e);else for(var s=0;s<i;s++)t[e+s]=a[o+s];return i},write:function(r,t,e,n,o,a){if(!n)return 0;var i=r.node;if(i.timestamp=Date.now(),t.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=t.subarray(e,e+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=t.slice(e,e+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(t.subarray(e,e+n),o),n}if(Er.expandFileStorage(i,o+n),i.contents.subarray&&t.subarray)i.contents.set(t.subarray(e,e+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=t[e+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek:function(r,t,e){var n=t;if(1===e?n+=r.position:2===e&&kr.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new kr.ErrnoError(28);return n},allocate:function(r,t,e){Er.expandFileStorage(r.node,t+e),r.node.usedBytes=Math.max(r.node.usedBytes,t+e)},mmap:function(r,t,e,n,o){if(!kr.isFile(r.node.mode))throw new kr.ErrnoError(43);var a,i,s=r.node.contents;if(2&o||s.buffer!==F){if((e>0||e+t<s.length)&&(s=s.subarray?s.subarray(e,e+t):Array.prototype.slice.call(s,e,e+t)),i=!0,!(a=_r()))throw new kr.ErrnoError(48);A.set(s,a)}else i=!1,a=s.byteOffset;return{ptr:a,allocated:i}},msync:function(r,t,e,n,o){return Er.stream_ops.write(r,t,0,n,e,!1),0}}};function br(r,t,e,n){var o=n?"":K("al "+r);c(r,e=>{!function(r,t){r||Z(t)}(e,'Loading data file "'+r+'" failed (no arrayBuffer).'),t(new Uint8Array(e)),o&&$()},t=>{if(!e)throw'Loading data file "'+r+'" failed.';e()}),o&&J()}var kr={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(r,t={})=>{if(!(r=wr.resolve(kr.cwd(),r)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new kr.ErrnoError(32);for(var e=vr.normalizeArray(r.split("/").filter(r=>!!r),!1),n=kr.root,o="/",a=0;a<e.length;a++){var i=a===e.length-1;if(i&&t.parent)break;if(n=kr.lookupNode(n,e[a]),o=vr.join2(o,e[a]),kr.isMountpoint(n)&&(!i||i&&t.follow_mount)&&(n=n.mounted.root),!i||t.follow)for(var s=0;kr.isLink(n.mode);){var u=kr.readlink(o);if(o=wr.resolve(vr.dirname(o),u),n=kr.lookupPath(o,{recurse_count:t.recurse_count+1}).node,s++>40)throw new kr.ErrnoError(32)}}return{path:o,node:n}},getPath:r=>{for(var t;;){if(kr.isRoot(r)){var e=r.mount.mountpoint;return t?"/"!==e[e.length-1]?e+"/"+t:e+t:e}t=t?r.name+"/"+t:r.name,r=r.parent}},hashName:(r,t)=>{for(var e=0,n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n)|0;return(r+e>>>0)%kr.nameTable.length},hashAddNode:r=>{var t=kr.hashName(r.parent.id,r.name);r.name_next=kr.nameTable[t],kr.nameTable[t]=r},hashRemoveNode:r=>{var t=kr.hashName(r.parent.id,r.name);if(kr.nameTable[t]===r)kr.nameTable[t]=r.name_next;else for(var e=kr.nameTable[t];e;){if(e.name_next===r){e.name_next=r.name_next;break}e=e.name_next}},lookupNode:(r,t)=>{var e=kr.mayLookup(r);if(e)throw new kr.ErrnoError(e,r);for(var n=kr.hashName(r.id,t),o=kr.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===r.id&&a===t)return o}return kr.lookup(r,t)},createNode:(r,t,e,n)=>{var o=new kr.FSNode(r,t,e,n);return kr.hashAddNode(o),o},destroyNode:r=>{kr.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>32768==(61440&r),isDir:r=>16384==(61440&r),isLink:r=>40960==(61440&r),isChrdev:r=>8192==(61440&r),isBlkdev:r=>24576==(61440&r),isFIFO:r=>4096==(61440&r),isSocket:r=>49152==(49152&r),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:r=>{var t=kr.flagModes[r];if(void 0===t)throw new Error("Unknown file open mode: "+r);return t},flagsToPermissionString:r=>{var t=["r","w","rw"][3&r];return 512&r&&(t+="w"),t},nodePermissions:(r,t)=>kr.ignorePermissions?0:(!t.includes("r")||292&r.mode)&&(!t.includes("w")||146&r.mode)&&(!t.includes("x")||73&r.mode)?0:2,mayLookup:r=>{var t=kr.nodePermissions(r,"x");return t||(r.node_ops.lookup?0:2)},mayCreate:(r,t)=>{try{kr.lookupNode(r,t);return 20}catch(e){}return kr.nodePermissions(r,"wx")},mayDelete:(r,t,e)=>{var n;try{n=kr.lookupNode(r,t)}catch(a){return a.errno}var o=kr.nodePermissions(r,"wx");if(o)return o;if(e){if(!kr.isDir(n.mode))return 54;if(kr.isRoot(n)||kr.getPath(n)===kr.cwd())return 10}else if(kr.isDir(n.mode))return 31;return 0},mayOpen:(r,t)=>r?kr.isLink(r.mode)?32:kr.isDir(r.mode)&&("r"!==kr.flagsToPermissionString(t)||512&t)?31:kr.nodePermissions(r,kr.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd:(r=0,t=kr.MAX_OPEN_FDS)=>{for(var e=r;e<=t;e++)if(!kr.streams[e])return e;throw new kr.ErrnoError(33)},getStream:r=>kr.streams[r],createStream:(r,t,e)=>{kr.FSStream||(kr.FSStream=function(){this.shared={}},kr.FSStream.prototype={},Object.defineProperties(kr.FSStream.prototype,{object:{get:function(){return this.node},set:function(r){this.node=r}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(r){this.shared.flags=r}},position:{get:function(){return this.shared.position},set:function(r){this.shared.position=r}}})),r=Object.assign(new kr.FSStream,r);var n=kr.nextfd(t,e);return r.fd=n,kr.streams[n]=r,r},closeStream:r=>{kr.streams[r]=null},chrdev_stream_ops:{open:r=>{var t=kr.getDevice(r.node.rdev);r.stream_ops=t.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:()=>{throw new kr.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,t)=>r<<8|t,registerDevice:(r,t)=>{kr.devices[r]={stream_ops:t}},getDevice:r=>kr.devices[r],getMounts:r=>{for(var t=[],e=[r];e.length;){var n=e.pop();t.push(n),e.push.apply(e,n.mounts)}return t},syncfs:(r,t)=>{"function"==typeof r&&(t=r,r=!1),kr.syncFSRequests++,kr.syncFSRequests>1&&k("warning: "+kr.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var e=kr.getMounts(kr.root.mount),n=0;function o(r){return kr.syncFSRequests--,t(r)}function a(r){if(r)return a.errored?void 0:(a.errored=!0,o(r));++n>=e.length&&o(null)}e.forEach(t=>{if(!t.type.syncfs)return a(null);t.type.syncfs(t,r,a)})},mount:(r,t,e)=>{var n,o="/"===e,a=!e;if(o&&kr.root)throw new kr.ErrnoError(10);if(!o&&!a){var i=kr.lookupPath(e,{follow_mount:!1});if(e=i.path,n=i.node,kr.isMountpoint(n))throw new kr.ErrnoError(10);if(!kr.isDir(n.mode))throw new kr.ErrnoError(54)}var s={type:r,opts:t,mountpoint:e,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?kr.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:r=>{var t=kr.lookupPath(r,{follow_mount:!1});if(!kr.isMountpoint(t.node))throw new kr.ErrnoError(28);var e=t.node,n=e.mounted,o=kr.getMounts(n);Object.keys(kr.nameTable).forEach(r=>{for(var t=kr.nameTable[r];t;){var e=t.name_next;o.includes(t.mount)&&kr.destroyNode(t),t=e}}),e.mounted=null;var a=e.mount.mounts.indexOf(n);e.mount.mounts.splice(a,1)},lookup:(r,t)=>r.node_ops.lookup(r,t),mknod:(r,t,e)=>{var n=kr.lookupPath(r,{parent:!0}).node,o=vr.basename(r);if(!o||"."===o||".."===o)throw new kr.ErrnoError(28);var a=kr.mayCreate(n,o);if(a)throw new kr.ErrnoError(a);if(!n.node_ops.mknod)throw new kr.ErrnoError(63);return n.node_ops.mknod(n,o,t,e)},create:(r,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,kr.mknod(r,t,0)),mkdir:(r,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,kr.mknod(r,t,0)),mkdirTree:(r,t)=>{for(var e=r.split("/"),n="",o=0;o<e.length;++o)if(e[o]){n+="/"+e[o];try{kr.mkdir(n,t)}catch(a){if(20!=a.errno)throw a}}},mkdev:(r,t,e)=>(void 0===e&&(e=t,t=438),t|=8192,kr.mknod(r,t,e)),symlink:(r,t)=>{if(!wr.resolve(r))throw new kr.ErrnoError(44);var e=kr.lookupPath(t,{parent:!0}).node;if(!e)throw new kr.ErrnoError(44);var n=vr.basename(t),o=kr.mayCreate(e,n);if(o)throw new kr.ErrnoError(o);if(!e.node_ops.symlink)throw new kr.ErrnoError(63);return e.node_ops.symlink(e,n,r)},rename:(r,t)=>{var e,n,o=vr.dirname(r),a=vr.dirname(t),i=vr.basename(r),s=vr.basename(t);if(e=kr.lookupPath(r,{parent:!0}).node,n=kr.lookupPath(t,{parent:!0}).node,!e||!n)throw new kr.ErrnoError(44);if(e.mount!==n.mount)throw new kr.ErrnoError(75);var u,c=kr.lookupNode(e,i),f=wr.relative(r,a);if("."!==f.charAt(0))throw new kr.ErrnoError(28);if("."!==(f=wr.relative(t,o)).charAt(0))throw new kr.ErrnoError(55);try{u=kr.lookupNode(n,s)}catch(h){}if(c!==u){var l=kr.isDir(c.mode),d=kr.mayDelete(e,i,l);if(d)throw new kr.ErrnoError(d);if(d=u?kr.mayDelete(n,s,l):kr.mayCreate(n,s))throw new kr.ErrnoError(d);if(!e.node_ops.rename)throw new kr.ErrnoError(63);if(kr.isMountpoint(c)||u&&kr.isMountpoint(u))throw new kr.ErrnoError(10);if(n!==e&&(d=kr.nodePermissions(e,"w")))throw new kr.ErrnoError(d);kr.hashRemoveNode(c);try{e.node_ops.rename(c,n,s)}catch(h){throw h}finally{kr.hashAddNode(c)}}},rmdir:r=>{var t=kr.lookupPath(r,{parent:!0}).node,e=vr.basename(r),n=kr.lookupNode(t,e),o=kr.mayDelete(t,e,!0);if(o)throw new kr.ErrnoError(o);if(!t.node_ops.rmdir)throw new kr.ErrnoError(63);if(kr.isMountpoint(n))throw new kr.ErrnoError(10);t.node_ops.rmdir(t,e),kr.destroyNode(n)},readdir:r=>{var t=kr.lookupPath(r,{follow:!0}).node;if(!t.node_ops.readdir)throw new kr.ErrnoError(54);return t.node_ops.readdir(t)},unlink:r=>{var t=kr.lookupPath(r,{parent:!0}).node;if(!t)throw new kr.ErrnoError(44);var e=vr.basename(r),n=kr.lookupNode(t,e),o=kr.mayDelete(t,e,!1);if(o)throw new kr.ErrnoError(o);if(!t.node_ops.unlink)throw new kr.ErrnoError(63);if(kr.isMountpoint(n))throw new kr.ErrnoError(10);t.node_ops.unlink(t,e),kr.destroyNode(n)},readlink:r=>{var t=kr.lookupPath(r).node;if(!t)throw new kr.ErrnoError(44);if(!t.node_ops.readlink)throw new kr.ErrnoError(28);return wr.resolve(kr.getPath(t.parent),t.node_ops.readlink(t))},stat:(r,t)=>{var e=kr.lookupPath(r,{follow:!t}).node;if(!e)throw new kr.ErrnoError(44);if(!e.node_ops.getattr)throw new kr.ErrnoError(63);return e.node_ops.getattr(e)},lstat:r=>kr.stat(r,!0),chmod:(r,t,e)=>{var n;"string"==typeof r?n=kr.lookupPath(r,{follow:!e}).node:n=r;if(!n.node_ops.setattr)throw new kr.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod:(r,t)=>{kr.chmod(r,t,!0)},fchmod:(r,t)=>{var e=kr.getStream(r);if(!e)throw new kr.ErrnoError(8);kr.chmod(e.node,t)},chown:(r,t,e,n)=>{var o;"string"==typeof r?o=kr.lookupPath(r,{follow:!n}).node:o=r;if(!o.node_ops.setattr)throw new kr.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(r,t,e)=>{kr.chown(r,t,e,!0)},fchown:(r,t,e)=>{var n=kr.getStream(r);if(!n)throw new kr.ErrnoError(8);kr.chown(n.node,t,e)},truncate:(r,t)=>{if(t<0)throw new kr.ErrnoError(28);var e;"string"==typeof r?e=kr.lookupPath(r,{follow:!0}).node:e=r;if(!e.node_ops.setattr)throw new kr.ErrnoError(63);if(kr.isDir(e.mode))throw new kr.ErrnoError(31);if(!kr.isFile(e.mode))throw new kr.ErrnoError(28);var n=kr.nodePermissions(e,"w");if(n)throw new kr.ErrnoError(n);e.node_ops.setattr(e,{size:t,timestamp:Date.now()})},ftruncate:(r,t)=>{var e=kr.getStream(r);if(!e)throw new kr.ErrnoError(8);if(0==(2097155&e.flags))throw new kr.ErrnoError(28);kr.truncate(e.node,t)},utime:(r,t,e)=>{var n=kr.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,e)})},open:(r,t,e)=>{if(""===r)throw new kr.ErrnoError(44);var n;if(e=void 0===e?438:e,e=64&(t="string"==typeof t?kr.modeStringToFlags(t):t)?4095&e|32768:0,"object"==typeof r)n=r;else{r=vr.normalize(r);try{n=kr.lookupPath(r,{follow:!(131072&t)}).node}catch(u){}}var o=!1;if(64&t)if(n){if(128&t)throw new kr.ErrnoError(20)}else n=kr.mknod(r,e,0),o=!0;if(!n)throw new kr.ErrnoError(44);if(kr.isChrdev(n.mode)&&(t&=-513),65536&t&&!kr.isDir(n.mode))throw new kr.ErrnoError(54);if(!o){var a=kr.mayOpen(n,t);if(a)throw new kr.ErrnoError(a)}512&t&&!o&&kr.truncate(n,0),t&=-131713;var i=kr.createStream({node:n,path:kr.getPath(n),flags:t,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return i.stream_ops.open&&i.stream_ops.open(i),!s.logReadFiles||1&t||(kr.readFiles||(kr.readFiles={}),r in kr.readFiles||(kr.readFiles[r]=1)),i},close:r=>{if(kr.isClosed(r))throw new kr.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(t){throw t}finally{kr.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek:(r,t,e)=>{if(kr.isClosed(r))throw new kr.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new kr.ErrnoError(70);if(0!=e&&1!=e&&2!=e)throw new kr.ErrnoError(28);return r.position=r.stream_ops.llseek(r,t,e),r.ungotten=[],r.position},read:(r,t,e,n,o)=>{if(n<0||o<0)throw new kr.ErrnoError(28);if(kr.isClosed(r))throw new kr.ErrnoError(8);if(1==(2097155&r.flags))throw new kr.ErrnoError(8);if(kr.isDir(r.node.mode))throw new kr.ErrnoError(31);if(!r.stream_ops.read)throw new kr.ErrnoError(28);var a=void 0!==o;if(a){if(!r.seekable)throw new kr.ErrnoError(70)}else o=r.position;var i=r.stream_ops.read(r,t,e,n,o);return a||(r.position+=i),i},write:(r,t,e,n,o,a)=>{if(n<0||o<0)throw new kr.ErrnoError(28);if(kr.isClosed(r))throw new kr.ErrnoError(8);if(0==(2097155&r.flags))throw new kr.ErrnoError(8);if(kr.isDir(r.node.mode))throw new kr.ErrnoError(31);if(!r.stream_ops.write)throw new kr.ErrnoError(28);r.seekable&&1024&r.flags&&kr.llseek(r,0,2);var i=void 0!==o;if(i){if(!r.seekable)throw new kr.ErrnoError(70)}else o=r.position;var s=r.stream_ops.write(r,t,e,n,o,a);return i||(r.position+=s),s},allocate:(r,t,e)=>{if(kr.isClosed(r))throw new kr.ErrnoError(8);if(t<0||e<=0)throw new kr.ErrnoError(28);if(0==(2097155&r.flags))throw new kr.ErrnoError(8);if(!kr.isFile(r.node.mode)&&!kr.isDir(r.node.mode))throw new kr.ErrnoError(43);if(!r.stream_ops.allocate)throw new kr.ErrnoError(138);r.stream_ops.allocate(r,t,e)},mmap:(r,t,e,n,o)=>{if(0!=(2&n)&&0==(2&o)&&2!=(2097155&r.flags))throw new kr.ErrnoError(2);if(1==(2097155&r.flags))throw new kr.ErrnoError(2);if(!r.stream_ops.mmap)throw new kr.ErrnoError(43);return r.stream_ops.mmap(r,t,e,n,o)},msync:(r,t,e,n,o)=>r.stream_ops.msync?r.stream_ops.msync(r,t,e,n,o):0,munmap:r=>0,ioctl:(r,t,e)=>{if(!r.stream_ops.ioctl)throw new kr.ErrnoError(59);return r.stream_ops.ioctl(r,t,e)},readFile:(r,t={})=>{if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var e,n=kr.open(r,t.flags),o=kr.stat(r).size,a=new Uint8Array(o);return kr.read(n,a,0,o,0),"utf8"===t.encoding?e=O(a,0):"binary"===t.encoding&&(e=a),kr.close(n),e},writeFile:(r,t,e={})=>{e.flags=e.flags||577;var n=kr.open(r,e.flags,e.mode);if("string"==typeof t){var o=new Uint8Array(I(t)+1),a=N(t,o,0,o.length);kr.write(n,o,0,a,void 0,e.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");kr.write(n,t,0,t.byteLength,void 0,e.canOwn)}kr.close(n)},cwd:()=>kr.currentPath,chdir:r=>{var t=kr.lookupPath(r,{follow:!0});if(null===t.node)throw new kr.ErrnoError(44);if(!kr.isDir(t.node.mode))throw new kr.ErrnoError(54);var e=kr.nodePermissions(t.node,"x");if(e)throw new kr.ErrnoError(e);kr.currentPath=t.path},createDefaultDirectories:()=>{kr.mkdir("/tmp"),kr.mkdir("/home"),kr.mkdir("/home/web_user")},createDefaultDevices:()=>{kr.mkdir("/dev"),kr.registerDevice(kr.makedev(1,3),{read:()=>0,write:(r,t,e,n,o)=>n}),kr.mkdev("/dev/null",kr.makedev(1,3)),gr.register(kr.makedev(5,0),gr.default_tty_ops),gr.register(kr.makedev(6,0),gr.default_tty1_ops),kr.mkdev("/dev/tty",kr.makedev(5,0)),kr.mkdev("/dev/tty1",kr.makedev(6,0));var r=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var r=new Uint8Array(1);return()=>(crypto.getRandomValues(r),r[0])}if(g)try{var t=require("crypto");return()=>t.randomBytes(1)[0]}catch(e){}return()=>Z("randomDevice")}();kr.createDevice("/dev","random",r),kr.createDevice("/dev","urandom",r),kr.mkdir("/dev/shm"),kr.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{kr.mkdir("/proc");var r=kr.mkdir("/proc/self");kr.mkdir("/proc/self/fd"),kr.mount({mount:()=>{var t=kr.createNode(r,"fd",16895,73);return t.node_ops={lookup:(r,t)=>{var e=+t,n=kr.getStream(e);if(!n)throw new kr.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},t}},{},"/proc/self/fd")},createStandardStreams:()=>{s.stdin?kr.createDevice("/dev","stdin",s.stdin):kr.symlink("/dev/tty","/dev/stdin"),s.stdout?kr.createDevice("/dev","stdout",null,s.stdout):kr.symlink("/dev/tty","/dev/stdout"),s.stderr?kr.createDevice("/dev","stderr",null,s.stderr):kr.symlink("/dev/tty1","/dev/stderr");kr.open("/dev/stdin",0),kr.open("/dev/stdout",1),kr.open("/dev/stderr",1)},ensureErrnoError:()=>{kr.ErrnoError||(kr.ErrnoError=function(r,t){this.node=t,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message="FS error"},kr.ErrnoError.prototype=new Error,kr.ErrnoError.prototype.constructor=kr.ErrnoError,[44].forEach(r=>{kr.genericErrors[r]=new kr.ErrnoError(r),kr.genericErrors[r].stack="<generic error, no stack>"}))},staticInit:()=>{kr.ensureErrnoError(),kr.nameTable=new Array(4096),kr.mount(Er,{},"/"),kr.createDefaultDirectories(),kr.createDefaultDevices(),kr.createSpecialDirectories(),kr.filesystems={MEMFS:Er}},init:(r,t,e)=>{kr.init.initialized=!0,kr.ensureErrnoError(),s.stdin=r||s.stdin,s.stdout=t||s.stdout,s.stderr=e||s.stderr,kr.createStandardStreams()},quit:()=>{kr.init.initialized=!1;for(var r=0;r<kr.streams.length;r++){var t=kr.streams[r];t&&kr.close(t)}},getMode:(r,t)=>{var e=0;return r&&(e|=365),t&&(e|=146),e},findObject:(r,t)=>{var e=kr.analyzePath(r,t);return e.exists?e.object:null},analyzePath:(r,t)=>{try{r=(n=kr.lookupPath(r,{follow:!t})).path}catch(o){}var e={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=kr.lookupPath(r,{parent:!0});e.parentExists=!0,e.parentPath=n.path,e.parentObject=n.node,e.name=vr.basename(r),n=kr.lookupPath(r,{follow:!t}),e.exists=!0,e.path=n.path,e.object=n.node,e.name=n.node.name,e.isRoot="/"===n.path}catch(o){e.error=o.errno}return e},createPath:(r,t,e,n)=>{r="string"==typeof r?r:kr.getPath(r);for(var o=t.split("/").reverse();o.length;){var a=o.pop();if(a){var i=vr.join2(r,a);try{kr.mkdir(i)}catch(s){}r=i}}return i},createFile:(r,t,e,n,o)=>{var a=vr.join2("string"==typeof r?r:kr.getPath(r),t),i=kr.getMode(n,o);return kr.create(a,i)},createDataFile:(r,t,e,n,o,a)=>{var i=t;r&&(r="string"==typeof r?r:kr.getPath(r),i=t?vr.join2(r,t):r);var s=kr.getMode(n,o),u=kr.create(i,s);if(e){if("string"==typeof e){for(var c=new Array(e.length),f=0,l=e.length;f<l;++f)c[f]=e.charCodeAt(f);e=c}kr.chmod(u,146|s);var d=kr.open(u,577);kr.write(d,e,0,e.length,0,a),kr.close(d),kr.chmod(u,s)}return u},createDevice:(r,t,e,n)=>{var o=vr.join2("string"==typeof r?r:kr.getPath(r),t),a=kr.getMode(!!e,!!n);kr.createDevice.major||(kr.createDevice.major=64);var i=kr.makedev(kr.createDevice.major++,0);return kr.registerDevice(i,{open:r=>{r.seekable=!1},close:r=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(r,t,n,o,a)=>{for(var i=0,s=0;s<o;s++){var u;try{u=e()}catch(c){throw new kr.ErrnoError(29)}if(void 0===u&&0===i)throw new kr.ErrnoError(6);if(null==u)break;i++,t[n+s]=u}return i&&(r.node.timestamp=Date.now()),i},write:(r,t,e,o,a)=>{for(var i=0;i<o;i++)try{n(t[e+i])}catch(s){throw new kr.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),i}}),kr.mkdev(o,a,i)},forceLoadFile:r=>{if(r.isDevice||r.isFolder||r.link||r.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!u)throw new Error("Cannot load without read() or XMLHttpRequest.");try{r.contents=yr(u(r.url),!0),r.usedBytes=r.contents.length}catch(t){throw new kr.ErrnoError(29)}},createLazyFile:(r,t,e,n,o)=>{function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(r){if(!(r>this.length-1||r<0)){var t=r%this.chunkSize,e=r/this.chunkSize|0;return this.getter(e)[t]}},a.prototype.setDataGetter=function(r){this.getter=r},a.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open("HEAD",e,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+e+". Status: "+r.status);var t,n=Number(r.getResponseHeader("Content-length")),o=(t=r.getResponseHeader("Accept-Ranges"))&&"bytes"===t,a=(t=r.getResponseHeader("Content-Encoding"))&&"gzip"===t,i=1048576;o||(i=n);var s=this;s.setDataGetter(r=>{var t=r*i,o=(r+1)*i-1;if(o=Math.min(o,n-1),void 0===s.chunks[r]&&(s.chunks[r]=((r,t)=>{if(r>t)throw new Error("invalid range ("+r+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",e,!1),n!==i&&o.setRequestHeader("Range","bytes="+r+"-"+t),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+e+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):yr(o.responseText||"",!0)})(t,o)),void 0===s.chunks[r])throw new Error("doXHR failed!");return s.chunks[r]}),!a&&n||(i=n=1,n=this.getter(0).length,i=n,b("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!y)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i=new a;Object.defineProperties(i,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:i}}else s={isDevice:!1,url:e};var u=kr.createFile(r,t,s,n,o);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={};function f(r,t,e,n,o){var a=r.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)t[e+s]=a[o+s];else for(s=0;s<i;s++)t[e+s]=a.get(o+s);return i}return Object.keys(u.stream_ops).forEach(r=>{var t=u.stream_ops[r];c[r]=function(){return kr.forceLoadFile(u),t.apply(null,arguments)}}),c.read=((r,t,e,n,o)=>(kr.forceLoadFile(u),f(r,t,e,n,o))),c.mmap=((r,t,e,n,o)=>{kr.forceLoadFile(u);var a=_r();if(!a)throw new kr.ErrnoError(48);return f(r,A,a,t,e),{ptr:a,allocated:!0}}),u.stream_ops=c,u},createPreloadedFile:(r,t,e,n,o,a,i,s,u,c)=>{var f=t?wr.resolve(vr.join2(r,t)):r;K("cp "+f);function l(e){function l(e){c&&c(),s||kr.createDataFile(r,t,e,n,o,u),a&&a(),$()}Browser.handledByPreloadPlugin(e,f,l,()=>{i&&i(),$()})||l(e)}J(),"string"==typeof e?br(e,r=>l(r),i):l(e)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(r,t,e)=>{t=t||(()=>{}),e=e||(()=>{});var n=kr.indexedDB();try{var o=n.open(kr.DB_NAME(),kr.DB_VERSION)}catch(a){return e(a)}o.onupgradeneeded=(()=>{b("creating db"),o.result.createObjectStore(kr.DB_STORE_NAME)}),o.onsuccess=(()=>{var n=o.result.transaction([kr.DB_STORE_NAME],"readwrite"),a=n.objectStore(kr.DB_STORE_NAME),i=0,s=0,u=r.length;function c(){0==s?t():e()}r.forEach(r=>{var t=a.put(kr.analyzePath(r).object.contents,r);t.onsuccess=(()=>{++i+s==u&&c()}),t.onerror=(()=>{i+ ++s==u&&c()})}),n.onerror=e}),o.onerror=e},loadFilesFromDB:(r,t,e)=>{t=t||(()=>{}),e=e||(()=>{});var n=kr.indexedDB();try{var o=n.open(kr.DB_NAME(),kr.DB_VERSION)}catch(a){return e(a)}o.onupgradeneeded=e,o.onsuccess=(()=>{var n=o.result;try{var i=n.transaction([kr.DB_STORE_NAME],"readonly")}catch(a){return void e(a)}var s=i.objectStore(kr.DB_STORE_NAME),u=0,c=0,f=r.length;function l(){0==c?t():e()}r.forEach(r=>{var t=s.get(r);t.onsuccess=(()=>{kr.analyzePath(r).exists&&kr.unlink(r),kr.createDataFile(vr.dirname(r),vr.basename(r),t.result,!0,!0,!0),++u+c==f&&l()}),t.onerror=(()=>{u+ ++c==f&&l()})}),i.onerror=e}),o.onerror=e}},Dr={DEFAULT_POLLMASK:5,calculateAt:function(r,t,e){if(vr.isAbs(t))return t;var n;-100===r?n=kr.cwd():n=Dr.getStreamFromFD(r).path;if(0==t.length){if(!e)throw new kr.ErrnoError(44);return n}return vr.join2(n,t)},doStat:function(r,t,e){try{var n=r(t)}catch(o){if(o&&o.node&&vr.normalize(t)!==vr.normalize(kr.getPath(o.node)))return-54;throw o}return x[e>>2]=n.dev,x[e+8>>2]=n.ino,x[e+12>>2]=n.mode,C[e+16>>2]=n.nlink,x[e+20>>2]=n.uid,x[e+24>>2]=n.gid,x[e+28>>2]=n.rdev,er=[n.size>>>0,(tr=n.size,+Math.abs(tr)>=1?tr>0?(0|Math.min(+Math.floor(tr/4294967296),4294967295))>>>0:~~+Math.ceil((tr-+(~~tr>>>0))/4294967296)>>>0:0)],x[e+40>>2]=er[0],x[e+44>>2]=er[1],x[e+48>>2]=4096,x[e+52>>2]=n.blocks,er=[Math.floor(n.atime.getTime()/1e3)>>>0,(tr=Math.floor(n.atime.getTime()/1e3),+Math.abs(tr)>=1?tr>0?(0|Math.min(+Math.floor(tr/4294967296),4294967295))>>>0:~~+Math.ceil((tr-+(~~tr>>>0))/4294967296)>>>0:0)],x[e+56>>2]=er[0],x[e+60>>2]=er[1],C[e+64>>2]=0,er=[Math.floor(n.mtime.getTime()/1e3)>>>0,(tr=Math.floor(n.mtime.getTime()/1e3),+Math.abs(tr)>=1?tr>0?(0|Math.min(+Math.floor(tr/4294967296),4294967295))>>>0:~~+Math.ceil((tr-+(~~tr>>>0))/4294967296)>>>0:0)],x[e+72>>2]=er[0],x[e+76>>2]=er[1],C[e+80>>2]=0,er=[Math.floor(n.ctime.getTime()/1e3)>>>0,(tr=Math.floor(n.ctime.getTime()/1e3),+Math.abs(tr)>=1?tr>0?(0|Math.min(+Math.floor(tr/4294967296),4294967295))>>>0:~~+Math.ceil((tr-+(~~tr>>>0))/4294967296)>>>0:0)],x[e+88>>2]=er[0],x[e+92>>2]=er[1],C[e+96>>2]=0,er=[n.ino>>>0,(tr=n.ino,+Math.abs(tr)>=1?tr>0?(0|Math.min(+Math.floor(tr/4294967296),4294967295))>>>0:~~+Math.ceil((tr-+(~~tr>>>0))/4294967296)>>>0:0)],x[e+104>>2]=er[0],x[e+108>>2]=er[1],0},doMsync:function(r,t,e,n,o){if(!kr.isFile(t.node.mode))throw new kr.ErrnoError(43);if(2&n)return 0;var a=T.slice(r,r+e);kr.msync(t,a,o,e,n)},varargs:void 0,get:function(){return Dr.varargs+=4,x[Dr.varargs-4>>2]},getStr:function(r){return z(r)},getStreamFromFD:function(r){var t=kr.getStream(r);if(!t)throw new kr.ErrnoError(8);return t}};function Sr(r){return x[qr()>>2]=r,r}var jr=!0;function Mr(r){return C[r>>2]+4294967296*x[r+4>>2]}function Fr(r){var t=I(r)+1,e=Yr(t);return e&&N(r,A,e,t),e}var Ar={};function Tr(){if(!Tr.strings){var r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:p||"./this.program"};for(var t in Ar)void 0===Ar[t]?delete r[t]:r[t]=Ar[t];var e=[];for(var t in r)e.push(t+"="+r[t]);Tr.strings=e}return Tr.strings}function Pr(r,t){var e;j=r,j=e=r,G()||(s.onExit&&s.onExit(e),M=!0),v(e,new sr(e))}var xr=Pr;function Cr(r){return r%4==0&&(r%100!=0||r%400==0)}var Rr=[31,29,31,30,31,30,31,31,30,31,30,31],Or=[31,28,31,30,31,30,31,31,30,31,30,31];function zr(r,t,e,n){var o=x[n+40>>2],a={tm_sec:x[n>>2],tm_min:x[n+4>>2],tm_hour:x[n+8>>2],tm_mday:x[n+12>>2],tm_mon:x[n+16>>2],tm_year:x[n+20>>2],tm_wday:x[n+24>>2],tm_yday:x[n+28>>2],tm_isdst:x[n+32>>2],tm_gmtoff:x[n+36>>2],tm_zone:o?z(o):""},i=z(e),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)i=i.replace(new RegExp(u,"g"),s[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],f=["January","February","March","April","May","June","July","August","September","October","November","December"];function l(r,t,e){for(var n="number"==typeof r?r.toString():r||"";n.length<t;)n=e[0]+n;return n}function d(r,t){return l(r,t,"0")}function h(r,t){function e(r){return r<0?-1:r>0?1:0}var n;return 0===(n=e(r.getFullYear()-t.getFullYear()))&&0===(n=e(r.getMonth()-t.getMonth()))&&(n=e(r.getDate()-t.getDate())),n}function m(r){switch(r.getDay()){case 0:return new Date(r.getFullYear()-1,11,29);case 1:return r;case 2:return new Date(r.getFullYear(),0,3);case 3:return new Date(r.getFullYear(),0,2);case 4:return new Date(r.getFullYear(),0,1);case 5:return new Date(r.getFullYear()-1,11,31);case 6:return new Date(r.getFullYear()-1,11,30)}}function p(r){var t=function(r,t){for(var e=new Date(r.getTime());t>0;){var n=Cr(e.getFullYear()),o=e.getMonth(),a=(n?Rr:Or)[o];if(!(t>a-e.getDate()))return e.setDate(e.getDate()+t),e;t-=a-e.getDate()+1,e.setDate(1),o<11?e.setMonth(o+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1))}return e}(new Date(r.tm_year+1900,0,1),r.tm_yday),e=new Date(t.getFullYear(),0,4),n=new Date(t.getFullYear()+1,0,4),o=m(e),a=m(n);return h(o,t)<=0?h(a,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var v={"%a":function(r){return c[r.tm_wday].substring(0,3)},"%A":function(r){return c[r.tm_wday]},"%b":function(r){return f[r.tm_mon].substring(0,3)},"%B":function(r){return f[r.tm_mon]},"%C":function(r){return d((r.tm_year+1900)/100|0,2)},"%d":function(r){return d(r.tm_mday,2)},"%e":function(r){return l(r.tm_mday,2," ")},"%g":function(r){return p(r).toString().substring(2)},"%G":function(r){return p(r)},"%H":function(r){return d(r.tm_hour,2)},"%I":function(r){var t=r.tm_hour;return 0==t?t=12:t>12&&(t-=12),d(t,2)},"%j":function(r){return d(r.tm_mday+function(r,t){for(var e=0,n=0;n<=t;e+=r[n++]);return e}(Cr(r.tm_year+1900)?Rr:Or,r.tm_mon-1),3)},"%m":function(r){return d(r.tm_mon+1,2)},"%M":function(r){return d(r.tm_min,2)},"%n":function(){return"\n"},"%p":function(r){return r.tm_hour>=0&&r.tm_hour<12?"AM":"PM"},"%S":function(r){return d(r.tm_sec,2)},"%t":function(){return"\t"},"%u":function(r){return r.tm_wday||7},"%U":function(r){var t=r.tm_yday+7-r.tm_wday;return d(Math.floor(t/7),2)},"%V":function(r){var t=Math.floor((r.tm_yday+7-(r.tm_wday+6)%7)/7);if((r.tm_wday+371-r.tm_yday-2)%7<=2&&t++,t){if(53==t){var e=(r.tm_wday+371-r.tm_yday)%7;4==e||3==e&&Cr(r.tm_year)||(t=1)}}else{t=52;var n=(r.tm_wday+7-r.tm_yday-1)%7;(4==n||5==n&&Cr(r.tm_year%400-1))&&t++}return d(t,2)},"%w":function(r){return r.tm_wday},"%W":function(r){var t=r.tm_yday+7-(r.tm_wday+6)%7;return d(Math.floor(t/7),2)},"%y":function(r){return(r.tm_year+1900).toString().substring(2)},"%Y":function(r){return r.tm_year+1900},"%z":function(r){var t=r.tm_gmtoff,e=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(e?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(r){return r.tm_zone},"%%":function(){return"%"}};for(var u in i=i.replace(/%%/g,"\0\0"),v)i.includes(u)&&(i=i.replace(new RegExp(u,"g"),v[u](a)));var w=yr(i=i.replace(/\0\0/g,"%"),!1);return w.length>t?0:(cr(w,r),w.length-1)}function Nr(r){return s["_"+r]}function Br(r,t,e,n,o){var a={string:r=>{var t=0;if(null!=r&&0!==r){var e=1+(r.length<<2);B(r,t=Kr(e),e)}return t},array:r=>{var t=Kr(r.length);return cr(r,t),t}};var i=Nr(r),s=[],u=0;if(n)for(var c=0;c<n.length;c++){var f=a[e[c]];f?(0===u&&(u=Xr()),s[c]=f(n[c])):s[c]=n[c]}var l=i.apply(null,s);return l=function(r){return 0!==u&&Vr(u),function(r){return"string"===t?z(r):"boolean"===t?Boolean(r):r}(r)}(l)}var Ir=function(r,t,e,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=kr.nextInode++,this.name=t,this.mode=e,this.node_ops={},this.stream_ops={},this.rdev=n};Object.defineProperties(Ir.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(r){r?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(r){r?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return kr.isDir(this.mode)}},isDevice:{get:function(){return kr.isChrdev(this.mode)}}}),kr.FSNode=Ir,kr.staticInit();var Lr,Ur={j:function(r){return Yr(r+24)+24},p:function(r){var t=new hr(r);return t.get_caught()||(t.set_caught(!0),lr--),t.set_rethrown(!1),fr.push(t),function(r){r.add_ref()}(t),t.get_exception_ptr()},w:function(){Wr(0),function(r){if(r.release_ref()&&!r.get_rethrown()){var t=r.get_destructor();t&&pr(t)(r.excPtr),mr(r.excPtr)}}(fr.pop()),dr=0},a:function(){var r=dr;if(!r)return Gr(0),0;var t=new hr(r);t.set_adjusted_ptr(r);var e=t.get_type();if(!e)return Gr(0),r;for(var n=0;n<arguments.length;n++){var o=arguments[n];if(0===o||o===e)break;var a=t.ptr+16;if(Jr(o,e,a))return Gr(o),r}return Gr(e),r},h:function(){var r=dr;if(!r)return Gr(0),0;var t=new hr(r);t.set_adjusted_ptr(r);var e=t.get_type();if(!e)return Gr(0),r;for(var n=0;n<arguments.length;n++){var o=arguments[n];if(0===o||o===e)break;var a=t.ptr+16;if(Jr(o,e,a))return Gr(o),r}return Gr(e),r},A:function(){var r=dr;if(!r)return Gr(0),0;var t=new hr(r);t.set_adjusted_ptr(r);var e=t.get_type();if(!e)return Gr(0),r;for(var n=0;n<arguments.length;n++){var o=arguments[n];if(0===o||o===e)break;var a=t.ptr+16;if(Jr(o,e,a))return Gr(o),r}return Gr(e),r},J:function(){var r=dr;if(!r)return Gr(0),0;var t=new hr(r);t.set_adjusted_ptr(r);var e=t.get_type();if(!e)return Gr(0),r;for(var n=0;n<arguments.length;n++){var o=arguments[n];if(0===o||o===e)break;var a=t.ptr+16;if(Jr(o,e,a))return Gr(o),r}return Gr(e),r},k:mr,T:function(){var r=fr.pop();r||Z("no exception to throw");var t=r.excPtr;throw r.get_rethrown()||(fr.push(r),r.set_rethrown(!0),r.set_caught(!1),lr++),dr=t,t},u:function(r,t,e){throw new hr(r).init(t,e),dr=r,lr++,r},la:function(){return lr},c:function(r){throw dr||(dr=r),r},va:function(r,t,e){try{var n=Dr.getStreamFromFD(r);if(n.fd===t)return-28;var o=kr.getStream(t);return o&&kr.close(o),kr.createStream(n,t,t+1).fd}catch(a){if(void 0===kr||!(a instanceof kr.ErrnoError))throw a;return-a.errno}},F:function(r,t,e){Dr.varargs=e;try{var n=Dr.getStreamFromFD(r);switch(t){case 0:return(o=Dr.get())<0?-28:kr.createStream(n,o).fd;case 1:case 2:return 0;case 3:return n.flags;case 4:var o=Dr.get();return n.flags|=o,0;case 5:return o=Dr.get(),P[o+0>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return Sr(28),-1;default:return-28}}catch(a){if(void 0===kr||!(a instanceof kr.ErrnoError))throw a;return-a.errno}},ua:function(r,t){try{if(0===t)return-28;var e=kr.cwd(),n=I(e)+1;return t<n?-68:(B(e,r,t),n)}catch(o){if(void 0===kr||!(o instanceof kr.ErrnoError))throw o;return-o.errno}},xa:function(r,t,e){Dr.varargs=e;try{var n=Dr.getStreamFromFD(r);switch(t){case 21509:case 21505:return n.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=Dr.get();return x[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=Dr.get(),kr.ioctl(n,t,o);case 21523:case 21524:return n.tty?0:-59;default:return-28}}catch(a){if(void 0===kr||!(a instanceof kr.ErrnoError))throw a;return-a.errno}},O:function(r,t){try{return r=Dr.getStr(r),Dr.doStat(kr.lstat,r,t)}catch(e){if(void 0===kr||!(e instanceof kr.ErrnoError))throw e;return-e.errno}},ya:function(r,t,e,n){try{t=Dr.getStr(t);var o=256&n,a=4096&n;return n&=-4353,t=Dr.calculateAt(r,t,a),Dr.doStat(o?kr.lstat:kr.stat,t,e)}catch(i){if(void 0===kr||!(i instanceof kr.ErrnoError))throw i;return-i.errno}},Q:function(r,t,e,n){Dr.varargs=n;try{t=Dr.getStr(t),t=Dr.calculateAt(r,t);var o=n?Dr.get():0;return kr.open(t,e,o).fd}catch(a){if(void 0===kr||!(a instanceof kr.ErrnoError))throw a;return-a.errno}},qa:function(r,t,e,n){try{if(t=Dr.getStr(t),t=Dr.calculateAt(r,t),n<=0)return-28;var o=kr.readlink(t),a=Math.min(n,I(o)),i=A[e+a];return B(o,e,n+1),A[e+a]=i,a}catch(s){if(void 0===kr||!(s instanceof kr.ErrnoError))throw s;return-s.errno}},oa:function(r,t,e,n){try{return t=Dr.getStr(t),n=Dr.getStr(n),t=Dr.calculateAt(r,t),n=Dr.calculateAt(e,n),kr.rename(t,n),0}catch(o){if(void 0===kr||!(o instanceof kr.ErrnoError))throw o;return-o.errno}},pa:function(r){try{return r=Dr.getStr(r),kr.rmdir(r),0}catch(t){if(void 0===kr||!(t instanceof kr.ErrnoError))throw t;return-t.errno}},ra:function(r,t){try{return r=Dr.getStr(r),Dr.doStat(kr.stat,r,t)}catch(e){if(void 0===kr||!(e instanceof kr.ErrnoError))throw e;return-e.errno}},N:function(r,t,e){try{return t=Dr.getStr(t),t=Dr.calculateAt(r,t),0===e?kr.unlink(t):512===e?kr.rmdir(t):Z("Invalid flags passed to unlinkat"),0}catch(n){if(void 0===kr||!(n instanceof kr.ErrnoError))throw n;return-n.errno}},za:function(){return jr},ma:function(){throw 1/0},Aa:function(r,t){var e=new Date(1e3*Mr(r));x[t>>2]=e.getUTCSeconds(),x[t+4>>2]=e.getUTCMinutes(),x[t+8>>2]=e.getUTCHours(),x[t+12>>2]=e.getUTCDate(),x[t+16>>2]=e.getUTCMonth(),x[t+20>>2]=e.getUTCFullYear()-1900,x[t+24>>2]=e.getUTCDay();var n=Date.UTC(e.getUTCFullYear(),0,1,0,0,0,0),o=(e.getTime()-n)/864e5|0;x[t+28>>2]=o},Ba:function(r,t){var e=new Date(1e3*Mr(r));x[t>>2]=e.getSeconds(),x[t+4>>2]=e.getMinutes(),x[t+8>>2]=e.getHours(),x[t+12>>2]=e.getDate(),x[t+16>>2]=e.getMonth(),x[t+20>>2]=e.getFullYear()-1900,x[t+24>>2]=e.getDay();var n=new Date(e.getFullYear(),0,1),o=(e.getTime()-n.getTime())/864e5|0;x[t+28>>2]=o,x[t+36>>2]=-60*e.getTimezoneOffset();var a=new Date(e.getFullYear(),6,1).getTimezoneOffset(),i=n.getTimezoneOffset(),s=0|(a!=i&&e.getTimezoneOffset()==Math.min(i,a));x[t+32>>2]=s},Ca:function(r){var t=new Date(x[r+20>>2]+1900,x[r+16>>2],x[r+12>>2],x[r+8>>2],x[r+4>>2],x[r>>2],0),e=x[r+32>>2],n=t.getTimezoneOffset(),o=new Date(t.getFullYear(),0,1),a=new Date(t.getFullYear(),6,1).getTimezoneOffset(),i=o.getTimezoneOffset(),s=Math.min(i,a);if(e<0)x[r+32>>2]=Number(a!=i&&s==n);else if(e>0!=(s==n)){var u=Math.max(i,a),c=e>0?s:u;t.setTime(t.getTime()+6e4*(c-n))}x[r+24>>2]=t.getDay();var f=(t.getTime()-o.getTime())/864e5|0;return x[r+28>>2]=f,x[r>>2]=t.getSeconds(),x[r+4>>2]=t.getMinutes(),x[r+8>>2]=t.getHours(),x[r+12>>2]=t.getDate(),x[r+16>>2]=t.getMonth(),x[r+20>>2]=t.getYear(),t.getTime()/1e3|0},Da:function r(t,e,n){r.called||(r.called=!0,function(r,t,e){var n=(new Date).getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),i=o.getTimezoneOffset(),s=a.getTimezoneOffset(),u=Math.max(i,s);function c(r){var t=r.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}x[r>>2]=60*u,x[t>>2]=Number(i!=s);var f=c(o),l=c(a),d=Fr(f),h=Fr(l);s<i?(C[e>>2]=d,C[e+4>>2]=h):(C[e>>2]=h,C[e+4>>2]=d)}(t,e,n))},E:function(){Z("")},D:function(){return Date.now()},na:function(r){T.length,Z("OOM")},sa:function(r,t){var e=0;return Tr().forEach(function(n,o){var a=t+e;C[r+4*o>>2]=a,function(r,t,e){for(var n=0;n<r.length;++n)A[t++>>0]=r.charCodeAt(n);e||(A[t>>0]=0)}(n,a),e+=n.length+1}),0},ta:function(r,t){var e=Tr();C[r>>2]=e.length;var n=0;return e.forEach(function(r){n+=r.length+1}),C[t>>2]=n,0},Ea:xr,G:function(r){try{var t=Dr.getStreamFromFD(r);return kr.close(t),0}catch(e){if(void 0===kr||!(e instanceof kr.ErrnoError))throw e;return e.errno}},wa:function(r,t,e,n){try{var o=function(r,t,e,n){for(var o=0,a=0;a<e;a++){var i=C[t>>2],s=C[t+4>>2];t+=8;var u=kr.read(r,A,i,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o}(Dr.getStreamFromFD(r),t,e);return C[n>>2]=o,0}catch(a){if(void 0===kr||!(a instanceof kr.ErrnoError))throw a;return a.errno}},W:function(r,t,e,n,o){try{var a=(u=e)+2097152>>>0<4194305-!!(s=t)?(s>>>0)+4294967296*u:NaN;if(isNaN(a))return 61;var i=Dr.getStreamFromFD(r);return kr.llseek(i,a,n),er=[i.position>>>0,(tr=i.position,+Math.abs(tr)>=1?tr>0?(0|Math.min(+Math.floor(tr/4294967296),4294967295))>>>0:~~+Math.ceil((tr-+(~~tr>>>0))/4294967296)>>>0:0)],x[o>>2]=er[0],x[o+4>>2]=er[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(c){if(void 0===kr||!(c instanceof kr.ErrnoError))throw c;return c.errno}var s,u},P:function(r,t,e,n){try{var o=function(r,t,e,n){for(var o=0,a=0;a<e;a++){var i=C[t>>2],s=C[t+4>>2];t+=8;var u=kr.write(r,A,i,s,n);if(u<0)return-1;o+=u}return o}(Dr.getStreamFromFD(r),t,e);return C[n>>2]=o,0}catch(a){if(void 0===kr||!(a instanceof kr.ErrnoError))throw a;return a.errno}},v:function(r,t){var e=Xr();try{return pr(r)(t)}catch(n){if(Vr(e),n!==n+0)throw n;Wr(1,0)}},K:function(r,t,e,n){var o=Xr();try{return pr(r)(t,e,n)}catch(a){if(Vr(o),a!==a+0)throw a;Wr(1,0)}},L:function(r,t,e,n){var o=Xr();try{return pr(r)(t,e,n)}catch(a){if(Vr(o),a!==a+0)throw a;Wr(1,0)}},r:function(r){var t=Xr();try{return pr(r)()}catch(e){if(Vr(t),e!==e+0)throw e;Wr(1,0)}},g:function(r,t){var e=Xr();try{return pr(r)(t)}catch(n){if(Vr(e),n!==n+0)throw n;Wr(1,0)}},b:function(r,t,e){var n=Xr();try{return pr(r)(t,e)}catch(o){if(Vr(n),o!==o+0)throw o;Wr(1,0)}},f:function(r,t,e,n){var o=Xr();try{return pr(r)(t,e,n)}catch(a){if(Vr(o),a!==a+0)throw a;Wr(1,0)}},i:function(r,t,e,n,o){var a=Xr();try{return pr(r)(t,e,n,o)}catch(i){if(Vr(a),i!==i+0)throw i;Wr(1,0)}},s:function(r,t,e,n,o,a){var i=Xr();try{return pr(r)(t,e,n,o,a)}catch(s){if(Vr(i),s!==s+0)throw s;Wr(1,0)}},t:function(r,t,e,n,o,a,i){var s=Xr();try{return pr(r)(t,e,n,o,a,i)}catch(u){if(Vr(s),u!==u+0)throw u;Wr(1,0)}},M:function(r,t,e,n,o,a,i,s){var u=Xr();try{return pr(r)(t,e,n,o,a,i,s)}catch(c){if(Vr(u),c!==c+0)throw c;Wr(1,0)}},$:function(r,t,e,n,o,a,i,s,u,c,f){var l=Xr();try{return pr(r)(t,e,n,o,a,i,s,u,c,f)}catch(d){if(Vr(l),d!==d+0)throw d;Wr(1,0)}},C:function(r,t,e,n,o,a,i,s,u,c,f,l){var d=Xr();try{return pr(r)(t,e,n,o,a,i,s,u,c,f,l)}catch(h){if(Vr(d),h!==h+0)throw h;Wr(1,0)}},R:function(r,t,e,n,o,a,i,s,u,c,f,l,d){var h=Xr();try{return pr(r)(t,e,n,o,a,i,s,u,c,f,l,d)}catch(m){if(Vr(h),m!==m+0)throw m;Wr(1,0)}},V:function(r,t,e,n,o,a,i,s,u){var c=Xr();try{return dt(r,t,e,n,o,a,i,s,u)}catch(f){if(Vr(c),f!==f+0)throw f;Wr(1,0)}},ga:function(r,t,e,n,o,a){var i=Xr();try{return tt(r,t,e,n,o,a)}catch(s){if(Vr(i),s!==s+0)throw s;Wr(1,0)}},fa:function(r,t,e,n,o,a,i,s){var u=Xr();try{return et(r,t,e,n,o,a,i,s)}catch(c){if(Vr(u),c!==c+0)throw c;Wr(1,0)}},X:function(r,t,e,n){var o=Xr();try{return lt(r,t,e,n)}catch(a){if(Vr(o),a!==a+0)throw a;Wr(1,0)}},U:function(r,t,e,n,o){var a=Xr();try{return ht(r,t,e,n,o)}catch(i){if(Vr(a),i!==i+0)throw i;Wr(1,0)}},l:function(r){var t=Xr();try{pr(r)()}catch(e){if(Vr(t),e!==e+0)throw e;Wr(1,0)}},n:function(r,t){var e=Xr();try{pr(r)(t)}catch(n){if(Vr(e),n!==n+0)throw n;Wr(1,0)}},y:function(r,t,e){var n=Xr();try{pr(r)(t,e)}catch(o){if(Vr(n),o!==o+0)throw o;Wr(1,0)}},Z:function(r,t,e,n,o,a,i){var s=Xr();try{it(r,t,e,n,o,a,i)}catch(u){if(Vr(s),u!==u+0)throw u;Wr(1,0)}},d:function(r,t,e){var n=Xr();try{pr(r)(t,e)}catch(o){if(Vr(n),o!==o+0)throw o;Wr(1,0)}},e:function(r,t,e,n){var o=Xr();try{pr(r)(t,e,n)}catch(a){if(Vr(o),a!==a+0)throw a;Wr(1,0)}},H:function(r,t,e,n,o,a,i,s,u,c,f,l){var d=Xr();try{pr(r)(t,e,n,o,a,i,s,u,c,f,l)}catch(h){if(Vr(d),h!==h+0)throw h;Wr(1,0)}},m:function(r,t,e,n,o){var a=Xr();try{pr(r)(t,e,n,o)}catch(i){if(Vr(a),i!==i+0)throw i;Wr(1,0)}},o:function(r,t,e,n,o,a){var i=Xr();try{pr(r)(t,e,n,o,a)}catch(s){if(Vr(i),s!==s+0)throw s;Wr(1,0)}},I:function(r,t,e,n,o,a,i){var s=Xr();try{pr(r)(t,e,n,o,a,i)}catch(u){if(Vr(s),u!==u+0)throw u;Wr(1,0)}},x:function(r,t,e,n,o,a,i,s){var u=Xr();try{pr(r)(t,e,n,o,a,i,s)}catch(c){if(Vr(u),c!==c+0)throw c;Wr(1,0)}},S:function(r,t,e,n,o,a,i,s,u){var c=Xr();try{pr(r)(t,e,n,o,a,i,s,u)}catch(f){if(Vr(c),f!==f+0)throw f;Wr(1,0)}},z:function(r,t,e,n,o,a,i,s,u,c,f){var l=Xr();try{pr(r)(t,e,n,o,a,i,s,u,c,f)}catch(d){if(Vr(l),d!==d+0)throw d;Wr(1,0)}},B:function(r,t,e,n,o,a,i,s,u,c,f,l,d,h,m,p){var v=Xr();try{pr(r)(t,e,n,o,a,i,s,u,c,f,l,d,h,m,p)}catch(w){if(Vr(v),w!==w+0)throw w;Wr(1,0)}},ba:function(r,t,e,n,o,a,i){var s=Xr();try{st(r,t,e,n,o,a,i)}catch(u){if(Vr(s),u!==u+0)throw u;Wr(1,0)}},ca:function(r,t,e,n,o,a,i,s){var u=Xr();try{at(r,t,e,n,o,a,i,s)}catch(c){if(Vr(u),c!==c+0)throw c;Wr(1,0)}},_:function(r,t,e,n,o,a,i,s,u){var c=Xr();try{ut(r,t,e,n,o,a,i,s,u)}catch(f){if(Vr(c),f!==f+0)throw f;Wr(1,0)}},aa:function(r,t,e,n,o,a,i,s,u,c,f,l){var d=Xr();try{ct(r,t,e,n,o,a,i,s,u,c,f,l)}catch(h){if(Vr(d),h!==h+0)throw h;Wr(1,0)}},ia:function(r,t,e,n,o,a,i,s){var u=Xr();try{Qr(r,t,e,n,o,a,i,s)}catch(c){if(Vr(u),c!==c+0)throw c;Wr(1,0)}},da:function(r,t,e,n,o,a,i,s,u){var c=Xr();try{ot(r,t,e,n,o,a,i,s,u)}catch(f){if(Vr(c),f!==f+0)throw f;Wr(1,0)}},ha:function(r,t,e,n,o,a,i,s,u,c){var f=Xr();try{rt(r,t,e,n,o,a,i,s,u,c)}catch(l){if(Vr(f),l!==l+0)throw l;Wr(1,0)}},Y:function(r,t,e,n){var o=Xr();try{ft(r,t,e,n)}catch(a){if(Vr(o),a!==a+0)throw a;Wr(1,0)}},ea:function(r,t,e,n,o,a){var i=Xr();try{nt(r,t,e,n,o,a)}catch(s){if(Vr(i),s!==s+0)throw s;Wr(1,0)}},ja:function(r,t,e,n,o,a,i,s,u,c){var f=Xr();try{Zr(r,t,e,n,o,a,i,s,u,c)}catch(l){if(Vr(f),l!==l+0)throw l;Wr(1,0)}},q:function(r){return r},Ga:zr,ka:function(r,t,e,n){return zr(r,t,e,n)},Fa:function(r){if(g){if(!r)return 1;var t=z(r);if(!t.length)return 0;var e=require("child_process").spawnSync(t,[],{shell:!0,stdio:"inherit"}),n=(r,t)=>r<<8|t;return null===e.status?n(0,(r=>{switch(r){case"SIGHUP":return 1;case"SIGINT":return 2;case"SIGQUIT":return 3;case"SIGFPE":return 8;case"SIGKILL":return 9;case"SIGALRM":return 14;case"SIGTERM":return 15}return 2})(e.signal)):n(e.status,0)}return r?(Sr(52),-1):0}},Hr=(function(){var r={a:Ur};function t(r,t){var e,n,o=r.exports;s.asm=o,D=s.asm.Ha,e=D.buffer,F=e,s.HEAP8=A=new Int8Array(e),s.HEAP16=P=new Int16Array(e),s.HEAP32=x=new Int32Array(e),s.HEAPU8=T=new Uint8Array(e),s.HEAPU16=new Uint16Array(e),s.HEAPU32=C=new Uint32Array(e),s.HEAPF32=new Float32Array(e),s.HEAPF64=new Float64Array(e),L=s.asm.La,n=s.asm.Ia,H.unshift(n),$()}function e(r){t(r.instance)}function n(t){return function(){if(!E&&(w||y)){if("function"==typeof fetch&&!ar(Q))return fetch(Q,{credentials:"same-origin"}).then(function(r){if(!r.ok)throw"failed to load wasm binary file at '"+Q+"'";return r.arrayBuffer()}).catch(function(){return ir(Q)});if(c)return new Promise(function(r,t){c(Q,function(t){r(new Uint8Array(t))},t)})}return Promise.resolve().then(function(){return ir(Q)})}().then(function(t){return WebAssembly.instantiate(t,r)}).then(function(r){return r}).then(t,function(r){k("failed to asynchronously prepare wasm: "+r),Z(r)})}if(J(),s.instantiateWasm)try{return s.instantiateWasm(r,t)}catch(o){k("Module.instantiateWasm callback failed with error: "+o),i(o)}(E||"function"!=typeof WebAssembly.instantiateStreaming||or(Q)||ar(Q)||g||"function"!=typeof fetch?n(e):fetch(Q,{credentials:"same-origin"}).then(function(t){return WebAssembly.instantiateStreaming(t,r).then(e,function(r){return k("wasm streaming compile failed: "+r),k("falling back to ArrayBuffer instantiation"),n(e)})})).catch(i)}(),s.___wasm_call_ctors=function(){return(s.___wasm_call_ctors=s.asm.Ia).apply(null,arguments)},s._create_compile_result=function(){return(s._create_compile_result=s.asm.Ja).apply(null,arguments)},s._main=function(){return(s._main=s.asm.Ka).apply(null,arguments)},s._free=function(){return(Hr=s._free=s.asm.Ma).apply(null,arguments)}),Yr=s._malloc=function(){return(Yr=s._malloc=s.asm.Na).apply(null,arguments)},qr=s.___errno_location=function(){return(qr=s.___errno_location=s.asm.Oa).apply(null,arguments)},Gr=s.setTempRet0=function(){return(Gr=s.setTempRet0=s.asm.Pa).apply(null,arguments)},Wr=s._setThrew=function(){return(Wr=s._setThrew=s.asm.Qa).apply(null,arguments)},Xr=s.stackSave=function(){return(Xr=s.stackSave=s.asm.Ra).apply(null,arguments)},Vr=s.stackRestore=function(){return(Vr=s.stackRestore=s.asm.Sa).apply(null,arguments)},Kr=s.stackAlloc=function(){return(Kr=s.stackAlloc=s.asm.Ta).apply(null,arguments)},Jr=s.___cxa_can_catch=function(){return(Jr=s.___cxa_can_catch=s.asm.Ua).apply(null,arguments)},$r=s.___cxa_is_pointer_type=function(){return($r=s.___cxa_is_pointer_type=s.asm.Va).apply(null,arguments)},Zr=s.dynCall_vijjjj=function(){return(Zr=s.dynCall_vijjjj=s.asm.Wa).apply(null,arguments)},Qr=s.dynCall_viijji=function(){return(Qr=s.dynCall_viijji=s.asm.Xa).apply(null,arguments)},rt=s.dynCall_viijjiii=function(){return(rt=s.dynCall_viijjiii=s.asm.Ya).apply(null,arguments)},tt=s.dynCall_iijj=function(){return(tt=s.dynCall_iijj=s.asm.Za).apply(null,arguments)},et=s.dynCall_iijjii=function(){return(et=s.dynCall_iijjii=s.asm._a).apply(null,arguments)},nt=s.dynCall_vijj=function(){return(nt=s.dynCall_vijj=s.asm.$a).apply(null,arguments)},ot=s.dynCall_viijjii=function(){return(ot=s.dynCall_viijjii=s.asm.ab).apply(null,arguments)},at=s.dynCall_viijjd=function(){return(at=s.dynCall_viijjd=s.asm.bb).apply(null,arguments)},it=s.dynCall_vidjj=function(){return(it=s.dynCall_vidjj=s.asm.cb).apply(null,arguments)},st=s.dynCall_viijj=function(){return(st=s.dynCall_viijj=s.asm.db).apply(null,arguments)},ut=s.dynCall_viijjdi=function(){return(ut=s.dynCall_viijjdi=s.asm.eb).apply(null,arguments)},ct=s.dynCall_viijjdjj=function(){return(ct=s.dynCall_viijjdjj=s.asm.fb).apply(null,arguments)},ft=s.dynCall_vij=function(){return(ft=s.dynCall_vij=s.asm.gb).apply(null,arguments)},lt=s.dynCall_jiii=function(){return(lt=s.dynCall_jiii=s.asm.hb).apply(null,arguments)},dt=s.dynCall_iiiiijj=function(){return(dt=s.dynCall_iiiiijj=s.asm.ib).apply(null,arguments)},ht=s.dynCall_jiiii=function(){return(ht=s.dynCall_jiiii=s.asm.jb).apply(null,arguments)};function mt(r){var t=s._main;(r=r||[]).unshift(p);var e=r.length,n=Kr(4*(e+1)),o=n>>2;r.forEach(r=>{x[o++]=function(r){var t=I(r)+1,e=Kr(t);return N(r,A,e,t),e}(r)}),x[o]=0;try{var a=t(e,n);return Pr(a),a}catch(i){return function(r){if(r instanceof sr||"unwind"==r)return j;v(1,r)}(i)}}function pt(r){function t(){Lr||(Lr=!0,s.calledRun=!0,M||(!0,s.noFSInit||kr.init.initialized||kr.init(),kr.ignorePermissions=!1,gr.init(),ur(H),ur(Y),a(s),s.onRuntimeInitialized&&s.onRuntimeInitialized(),vt&&mt(r),function(){if(s.postRun)for("function"==typeof s.postRun&&(s.postRun=[s.postRun]);s.postRun.length;)r=s.postRun.shift(),q.unshift(r);var r;ur(q)}()))}r=r||m,W>0||(!function(){if(s.preRun)for("function"==typeof s.preRun&&(s.preRun=[s.preRun]);s.preRun.length;)r=s.preRun.shift(),U.unshift(r);var r;ur(U)}(),W>0||(s.setStatus?(s.setStatus("Running..."),setTimeout(function(){setTimeout(function(){s.setStatus("")},1),t()},1)):t()))}if(s.UTF8ToString=z,s.cwrap=function(r,t,e,n){var o=(e=e||[]).every(r=>"number"===r||"boolean"===r);return"string"!==t&&o&&!n?Nr(r):function(){return Br(r,t,e,arguments)}},s.FS=kr,V=function r(){Lr||pt(),Lr||(V=r)},s.preInit)for("function"==typeof s.preInit&&(s.preInit=[s.preInit]);s.preInit.length>0;)s.preInit.pop()();var vt=!0;return s.noInitialRun&&(vt=!1),pt(),t.ready}})();"object"==typeof exports&&"object"==typeof module?module.exports=a:"function"==typeof r&&r.amd?r([],function(){return a}):"object"==typeof exports&&(exports.startWerckmeisterJs=a);
|
|
491
|
+
},{"path":"UUq2","fs":"rDCW","crypto":"mRF4","child_process":"rDCW","process":"pBGv","buffer":"dskh"}],"RSuL":[function(require,module,exports) {
|
|
492
492
|
"use strict";function n(n,t){var a;if("undefined"==typeof Symbol||null==n[Symbol.iterator]){if(Array.isArray(n)||(a=e(n))||t&&n&&"number"==typeof n.length){a&&(n=a);var r=0,o=function(){};return{s:o,n:function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,l=!1;return{s:function(){a=n[Symbol.iterator]()},n:function(){var n=a.next();return s=n.done,n},e:function(n){l=!0,i=n},f:function(){try{s||null==a.return||a.return()}finally{if(l)throw i}}}}function e(n,e){if(n){if("string"==typeof n)return t(n,e);var a=Object.prototype.toString.call(n).slice(8,-1);return"Object"===a&&n.constructor&&(a=n.constructor.name),"Map"===a||"Set"===a?Array.from(n):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?t(n,e):void 0}}function t(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,a=new Array(e);t<e;t++)a[t]=n[t];return a}function a(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function r(n,e){for(var t=0;t<e.length;t++){var a=e[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(n,a.key,a)}}function o(n,e,t){return e&&r(n.prototype,e),t&&r(n,t),n}var i=this&&this.__awaiter||function(n,e,t,a){return new(t||(t=Promise))(function(r,o){function i(n){try{l(a.next(n))}catch(e){o(e)}}function s(n){try{l(a.throw(n))}catch(e){o(e)}}function l(n){var e;n.done?r(n.value):(e=n.value,e instanceof t?e:new t(function(n){n(e)})).then(i,s)}l((a=a.apply(n,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.WerckmeisterCompiler=exports.CompilerError=void 0;var s=require("@werckmeister/compilerjs/werckmeister"),l=require("fs"),c=JSON.parse('[{"path": "chords/default.chords", "data": "-------------------------------------------------------------------------\\n-- Here you can define your chord symbols, containing its degrees and its semitones.\\n-- A degree in parantheses specifies chord adjunct degrees. \\n-- Those degrees are not being rendered, unless your force them to appear using a leading !.\\n-- see https://werckme.github.io/manual#adjunct-chord-tones\\n-------------------------------------------------------------------------\\nX: I=0 (II=2) III=4 (IV=5) V=7 (VI=9) (VII=11)\\nXmin: I=0 (II=2) III=3 (IV=5) V=7 (VI=9) (VII=10)\\nX-: I=0 (II=2) III=3 (IV=5) V=7 (VI=9) (VII=10)\\nX/7: I=0 (II=2) III=4 (IV=5) V=7 (VI=9) VII=-2\\nX-/7: I=0 (II=2) III=3 (IV=5) V=7 (VI=9) VII=-2\\nX/maj7: I=0 (II=2) III=4 (IV=5) V=7 (VI=9) VII=-1\\nX/5: I=0 (II=2) III=4 (IV=5) V=-5 (VI=9) (VII=10)\\nX-/5: I=0 (II=2) III=3 (IV=5) V=-5 (VI=9) (VII=11)\\nX/4: I=0 (II=2) III=4 IV=-7 V=7 (VI=9) (VII=10)\\nX-/4: I=0 (II=2) III=3 IV=-7 V=7 (VI=9) (VII=10)\\nX-/3: I=0 (II=2) III=-9 (IV=5) V=7 (VI=9) (VII=10)\\nX/3: I=0 (II=2) III=-8 (IV=5) V=7 (VI=9) (VII=11)\\nX/2: I=0 II=-10 III=4 (IV=5) V=7 (VI=9) (VII=11)\\nX-7b5/b5: \\tI=0 (II=2) III=3 (IV=5) V=-6 (VI=9) VII=10\\n-------------------------------------------------------------------------\\nXsus4: I=0 (II=2) (III=4) IV=5 V=7 (VI=9) (VII=11) \\nX7sus4: I=0 (II=2) (III=4) IV=5 V=7 (VI=9) VII=10\\nX9sus4: I=0 II=2 (III=4) IV=5 V=7 (VI=9) (VII=11)\\nXsus2: I=0 II=2 (III=4) (IV=5) V=7 (VI=9) (VII=11)\\n-------------------------------------------------------------------------\\nX6: I=0 (II=2) III=4 (IV=5) V=7 VI=9 (VII=11)\\nX-6: I=0 (II=2) III=3 (IV=5) V=7 VI=9 (VII=11)\\nX-6/9: I=0 II=2 III=3 (IV=5) V=7 VI=9 (VII=11)\\n-------------------------------------------------------------------------\\nX7: I=0 (II=2) III=4 (IV=5) V=7 (VI=9) VII=10\\nXmin7: I=0 (II=2) III=3 (IV=5) V=7 (VI=9) VII=10\\nX-7: I=0 (II=2) III=3 (IV=5) V=7 (VI=9) VII=10\\nXmaj7: I=0 (II=2) III=4 (IV=5) V=7 (VI=9) VII=11\\nXmaj7b5: I=0 (II=2) III=4 (IV=5) V=6 (VI=9) VII=11\\nX-7b5: I=0 (II=2) III=3 (IV=5) V=6 (VI=9) VII=10\\nXmaj7#11: I=0 (II=2) III=4 IV=6 (V=7) (VI=9) VII=11\\nX7b5: I=0 (II=2) III=4 (IV=5) V=6 (VI=9) VII=10\\nX07: I=0 (II=2) III=3 (IV=5) V=6 (VI=8) VII=9\\nX7#5: I=0 (II=2) III=4 (IV=5) V=8 (VI=9) VII=10\\nX7#5#9: I=0 II=3 III=4 (IV=5) V=8 (VI=9) VII=10\\n-------------------------------------------------------------------------\\nX2: I=0 II=2 (III=4) (IV=5) V=7 (VI=9) (VII=11) \\nX9: I=0 II=2 III=4 (IV=5) V=7 (VI=9) VII=10\\n-- to distinguish between Xb9 (Xflat and 9) and Xb9 (X and flat 9)\\n-- we write Xflat9 for the latter.\\nXflat9: I=0 II=1 III=4 (IV=5) V=7 (VI=9) (VII=11) \\nXsharp9: I=0 II=3 III=4 (IV=5) V=7 (VI=9) (VII=11) \\nXmin9: I=0 II=2 III=3 (IV=5) V=7 (VI=9) VII=10\\nX-9: I=0 II=2 III=3 (IV=5) V=7 (VI=9) VII=10\\nXminAdd9: I=0 II=2 III=3 (IV=5) V=7 (VI=9) (VII=10)\\nX-add9: I=0 II=2 III=3 (IV=5) V=7 (VI=9) (VII=10)\\nXmaj9: I=0 II=2 III=4 (IV=5) V=7 (VI=9) VII=11\\nX7#9: I=0 II=3 III=4 (IV=5) V=7 (VI=9) VII=10\\nX7b9: I=0 II=1 III=4 (IV=5) V=7 (VI=9) VII=10\\nXmaj7b9: I=0 II=1 III=4 (IV=5) V=7 (VI=9) VII=11\\n-------------------------------------------------------------------------\\nX11: I=0 (II=2) III=4 IV=5 V=7 (VI=9) VII=10\\n-- to distinguish between Xb11 (Xflat and 11) and Xb11 (X and flat 11)\\n-- we write Xflat9 for the latter.\\nXflat11: I=0 (II=2) III=3 IV=4 V=7 (VI=9) (VII=11)\\nXsharp11: I=0 (II=2) III=4 IV=6 (V=7) (VI=9) VII=10\\nXmin11: I=0 (II=2) III=3 IV=5 V=7 (VI=9) VII=10\\nX-11: I=0 (II=2) III=3 IV=5 V=7 (VI=9) VII=10\\nXmaj11: I=0 (II=2) III=4 IV=5 V=7 (VI=9) VII=11\\n------------------------------------------------------------------\\nX13: I=0 (II=2) III=4 (IV=5) V=7 VI=9 VII=10\\nXflat13: I=0 (II=2) III=4 (IV=5) (V=7) VI=8 (VII=11)\\nXsharp13: I=0 (II=2) III=4 (IV=5) (V=7) VI=10 (VII=11)\\nXmin13: I=0 (II=2) III=3 (IV=5) V=7 VI=9 VII=10\\nX-13: I=0 (II=2) III=3 (IV=5) V=7 VI=9 VII=10\\nXmaj13: I=0 (II=2) III=4 (IV=5) V=7 VI=9 VII=11"}, {"path": "lua/com/com.lua", "data": "local _inspect = require \\"lua/com/inspect\\"\\n\\nlocal MidiSchluesselCOffset = 60\\nParameterValueNoTag = \'__noTagValue\'\\n\\nfunction istable(t) return type(t) == \'table\' end\\nfunction isnumber(t) return type(t) == \'number\' end\\nfunction inspect(x) return print(_inspect(x)) end\\nfunction dump(x) print(inspect(x)) end\\n\\n\\nfunction checkLegacyNamedParams(params, ...)\\n local args = table.pack(...)\\n for k, v in pairs(params) do\\n if contains(args, v) then\\n local msg = \\"Error: legacy named parameter with the argument \'\\" .. v .. \\"\'. \\"\\n msg = msg .. \\" Use this expression instead: _\\" .. v .. \\"=...\\" \\n error(msg)\\n end\\n end\\nend\\n\\n-- returns the minimum amount of semitones between the relative pitches x and y.\\n-- e.g.: from c(0) to b(11) = -1\\nfunction relpitchdiff(x, y)\\n x = x % 12\\n y = y % 12\\n if math.abs(x-y) < 6 then\\n return -(x-y)\\n end\\n if x < 6 then \\n x = x + 12 \\n end\\n if y < 6 then\\n y = y + 12\\n end\\n return -(x-y)\\nend\\n\\n-- [a, 1, b, 2, c, 3] => {a=1, b=2, c=3}\\n-- @deprecated use the native named parameter feature: _name=value\\nfunction tokeyvalue(args)\\n assert(#args % 2 == 0)\\n local result = {}\\n for i=1, #args, 2 do\\n result[ args[i] ] = args[i+1]\\n end\\n return result\\nend\\n\\nfunction toMidiPitch(pitch)\\n return MidiSchluesselCOffset + pitch.pitch + (pitch.octave * 12)\\nend\\n\\nfunction deepcopy(o, seen)\\n seen = seen or {}\\n if o == nil then return nil end\\n if seen[o] then return seen[o] end\\n \\n local no\\n if type(o) == \'table\' then\\n no = {}\\n seen[o] = no\\n \\n for k, v in next, o, nil do\\n no[deepcopy(k, seen)] = deepcopy(v, seen)\\n end\\n setmetatable(no, deepcopy(getmetatable(o), seen))\\n else -- number, string, boolean, etc\\n no = o\\n end\\n return no\\nend\\n\\nfunction contains(table, value)\\n if table == nil then\\n return false\\n end\\n for k, v in pairs(table) do\\n if v == value then\\n return true\\n end\\n end\\n return false\\nend\\n\\n-- https://stackoverflow.com/questions/1426954/split-string-in-lua#1426970\\nfunction split(pString, pPattern)\\n local Table = {} -- NOTE: use {n = 0} in Lua-5.0\\n local fpat = \\"(.-)\\" .. pPattern\\n local last_end = 1\\n local s, e, cap = pString:find(fpat, 1)\\n while s do\\n if s ~= 1 or cap ~= \\"\\" then\\n table.insert(Table,cap)\\n end\\n last_end = e+1\\n s, e, cap = pString:find(fpat, last_end)\\n end\\n if last_end <= #pString then\\n cap = pString:sub(last_end)\\n table.insert(Table, cap)\\n end\\n return Table\\n end"}, {"path": "lua/com/globals.lua", "data": "I = 1\\nII = 2\\nIII = 3\\nIV = 4\\nV = 5\\nVI = 6\\nVII = 7\\n\\nDegreeStringValues = {\\n I = I,\\n II = II,\\n III = III,\\n IV = IV,\\n V = V,\\n VI = VI,\\n VII = VII\\n}\\n\\nMajorScaleSemitones = {\\n I = 0,\\n II = 2,\\n III = 4,\\n IV = 5,\\n V = 7,\\n VI = 9,\\n VII = 11\\n}\\n\\nC = 0\\nCIS = 1\\nDES = 1\\nD = 2\\nDIS = 3\\nES = 3\\nE = 4\\nFES = 4\\nF = 5\\nFIS = 6\\nGES = 6\\nG = 7\\nGIS = 8\\nAS = 8\\nA = 9\\nAIS = 10\\nBES = 10\\nB = 11\\nCES = 11\\n"}, {"path": "lua/com/inspect.lua", "data": "local inspect ={\\n _VERSION = \'inspect.lua 3.1.0\',\\n _URL = \'http://github.com/kikito/inspect.lua\',\\n _DESCRIPTION = \'human-readable representations of tables\',\\n _LICENSE = [[\\n MIT LICENSE\\n\\n Copyright (c) 2013 Enrique Garc\\u00eda Cota\\n\\n Permission is hereby granted, free of charge, to any person obtaining a\\n copy of this software and associated documentation files (the\\n \\"Software\\"), to deal in the Software without restriction, including\\n without limitation the rights to use, copy, modify, merge, publish,\\n distribute, sublicense, and/or sell copies of the Software, and to\\n permit persons to whom the Software is furnished to do so, subject to\\n the following conditions:\\n\\n The above copyright notice and this permission notice shall be included\\n in all copies or substantial portions of the Software.\\n\\n THE SOFTWARE IS PROVIDED \\"AS IS\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\\n OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\\n IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\\n CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\\n TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\\n SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n ]]\\n}\\n\\nlocal tostring = tostring\\n\\ninspect.KEY = setmetatable({}, {__tostring = function() return \'inspect.KEY\' end})\\ninspect.METATABLE = setmetatable({}, {__tostring = function() return \'inspect.METATABLE\' end})\\n\\nlocal function rawpairs(t)\\n return next, t, nil\\nend\\n\\n-- Apostrophizes the string if it has quotes, but not aphostrophes\\n-- Otherwise, it returns a regular quoted string\\nlocal function smartQuote(str)\\n if str:match(\'\\"\') and not str:match(\\"\'\\") then\\n return \\"\'\\" .. str .. \\"\'\\"\\n end\\n return \'\\"\' .. str:gsub(\'\\"\', \'\\\\\\\\\\"\') .. \'\\"\'\\nend\\n\\n-- \\\\a => \'\\\\\\\\a\', \\\\0 => \'\\\\\\\\0\', 31 => \'\\\\31\'\\nlocal shortControlCharEscapes = {\\n [\\"\\\\a\\"] = \\"\\\\\\\\a\\", [\\"\\\\b\\"] = \\"\\\\\\\\b\\", [\\"\\\\f\\"] = \\"\\\\\\\\f\\", [\\"\\\\n\\"] = \\"\\\\\\\\n\\",\\n [\\"\\\\r\\"] = \\"\\\\\\\\r\\", [\\"\\\\t\\"] = \\"\\\\\\\\t\\", [\\"\\\\v\\"] = \\"\\\\\\\\v\\"\\n}\\nlocal longControlCharEscapes = {} -- \\\\a => nil, \\\\0 => \\\\000, 31 => \\\\031\\nfor i=0, 31 do\\n local ch = string.char(i)\\n if not shortControlCharEscapes[ch] then\\n shortControlCharEscapes[ch] = \\"\\\\\\\\\\"..i\\n longControlCharEscapes[ch] = string.format(\\"\\\\\\\\%03d\\", i)\\n end\\nend\\n\\nlocal function escape(str)\\n return (str:gsub(\\"\\\\\\\\\\", \\"\\\\\\\\\\\\\\\\\\")\\n :gsub(\\"(%c)%f[0-9]\\", longControlCharEscapes)\\n :gsub(\\"%c\\", shortControlCharEscapes))\\nend\\n\\nlocal function isIdentifier(str)\\n return type(str) == \'string\' and str:match( \\"^[_%a][_%a%d]*$\\" )\\nend\\n\\nlocal function isSequenceKey(k, sequenceLength)\\n return type(k) == \'number\'\\n and 1 <= k\\n and k <= sequenceLength\\n and math.floor(k) == k\\nend\\n\\nlocal defaultTypeOrders = {\\n [\'number\'] = 1, [\'boolean\'] = 2, [\'string\'] = 3, [\'table\'] = 4,\\n [\'function\'] = 5, [\'userdata\'] = 6, [\'thread\'] = 7\\n}\\n\\nlocal function sortKeys(a, b)\\n local ta, tb = type(a), type(b)\\n\\n -- strings and numbers are sorted numerically/alphabetically\\n if ta == tb and (ta == \'string\' or ta == \'number\') then return a < b end\\n\\n local dta, dtb = defaultTypeOrders[ta], defaultTypeOrders[tb]\\n -- Two default types are compared according to the defaultTypeOrders table\\n if dta and dtb then return defaultTypeOrders[ta] < defaultTypeOrders[tb]\\n elseif dta then return true -- default types before custom ones\\n elseif dtb then return false -- custom types after default ones\\n end\\n\\n -- custom types are sorted out alphabetically\\n return ta < tb\\nend\\n\\n-- For implementation reasons, the behavior of rawlen & # is \\"undefined\\" when\\n-- tables aren\'t pure sequences. So we implement our own # operator.\\nlocal function getSequenceLength(t)\\n local len = 1\\n local v = rawget(t,len)\\n while v ~= nil do\\n len = len + 1\\n v = rawget(t,len)\\n end\\n return len - 1\\nend\\n\\nlocal function getNonSequentialKeys(t)\\n local keys, keysLength = {}, 0\\n local sequenceLength = getSequenceLength(t)\\n for k,_ in rawpairs(t) do\\n if not isSequenceKey(k, sequenceLength) then\\n keysLength = keysLength + 1\\n keys[keysLength] = k\\n end\\n end\\n table.sort(keys, sortKeys)\\n return keys, keysLength, sequenceLength\\nend\\n\\nlocal function countTableAppearances(t, tableAppearances)\\n tableAppearances = tableAppearances or {}\\n\\n if type(t) == \'table\' then\\n if not tableAppearances[t] then\\n tableAppearances[t] = 1\\n for k,v in rawpairs(t) do\\n countTableAppearances(k, tableAppearances)\\n countTableAppearances(v, tableAppearances)\\n end\\n countTableAppearances(getmetatable(t), tableAppearances)\\n else\\n tableAppearances[t] = tableAppearances[t] + 1\\n end\\n end\\n\\n return tableAppearances\\nend\\n\\nlocal copySequence = function(s)\\n local copy, len = {}, #s\\n for i=1, len do copy[i] = s[i] end\\n return copy, len\\nend\\n\\nlocal function makePath(path, ...)\\n local keys = {...}\\n local newPath, len = copySequence(path)\\n for i=1, #keys do\\n newPath[len + i] = keys[i]\\n end\\n return newPath\\nend\\n\\nlocal function processRecursive(process, item, path, visited)\\n if item == nil then return nil end\\n if visited[item] then return visited[item] end\\n\\n local processed = process(item, path)\\n if type(processed) == \'table\' then\\n local processedCopy = {}\\n visited[item] = processedCopy\\n local processedKey\\n\\n for k,v in rawpairs(processed) do\\n processedKey = processRecursive(process, k, makePath(path, k, inspect.KEY), visited)\\n if processedKey ~= nil then\\n processedCopy[processedKey] = processRecursive(process, v, makePath(path, processedKey), visited)\\n end\\n end\\n\\n local mt = processRecursive(process, getmetatable(processed), makePath(path, inspect.METATABLE), visited)\\n if type(mt) ~= \'table\' then mt = nil end -- ignore not nil/table __metatable field\\n setmetatable(processedCopy, mt)\\n processed = processedCopy\\n end\\n return processed\\nend\\n\\n\\n\\n-------------------------------------------------------------------\\n\\nlocal Inspector = {}\\nlocal Inspector_mt = {__index = Inspector}\\n\\nfunction Inspector:puts(...)\\n local args = {...}\\n local buffer = self.buffer\\n local len = #buffer\\n for i=1, #args do\\n len = len + 1\\n buffer[len] = args[i]\\n end\\nend\\n\\nfunction Inspector:down(f)\\n self.level = self.level + 1\\n f()\\n self.level = self.level - 1\\nend\\n\\nfunction Inspector:tabify()\\n self:puts(self.newline, string.rep(self.indent, self.level))\\nend\\n\\nfunction Inspector:alreadyVisited(v)\\n return self.ids[v] ~= nil\\nend\\n\\nfunction Inspector:getId(v)\\n local id = self.ids[v]\\n if not id then\\n local tv = type(v)\\n id = (self.maxIds[tv] or 0) + 1\\n self.maxIds[tv] = id\\n self.ids[v] = id\\n end\\n return tostring(id)\\nend\\n\\nfunction Inspector:putKey(k)\\n if isIdentifier(k) then return self:puts(k) end\\n self:puts(\\"[\\")\\n self:putValue(k)\\n self:puts(\\"]\\")\\nend\\n\\nfunction Inspector:putTable(t)\\n if t == inspect.KEY or t == inspect.METATABLE then\\n self:puts(tostring(t))\\n elseif self:alreadyVisited(t) then\\n self:puts(\'<table \', self:getId(t), \'>\')\\n elseif self.level >= self.depth then\\n self:puts(\'{...}\')\\n else\\n if self.tableAppearances[t] > 1 then self:puts(\'<\', self:getId(t), \'>\') end\\n\\n local nonSequentialKeys, nonSequentialKeysLength, sequenceLength = getNonSequentialKeys(t)\\n local mt = getmetatable(t)\\n\\n self:puts(\'{\')\\n self:down(function()\\n local count = 0\\n for i=1, sequenceLength do\\n if count > 0 then self:puts(\',\') end\\n self:puts(\' \')\\n self:putValue(t[i])\\n count = count + 1\\n end\\n\\n for i=1, nonSequentialKeysLength do\\n local k = nonSequentialKeys[i]\\n if count > 0 then self:puts(\',\') end\\n self:tabify()\\n self:putKey(k)\\n self:puts(\' = \')\\n self:putValue(t[k])\\n count = count + 1\\n end\\n\\n if type(mt) == \'table\' then\\n if count > 0 then self:puts(\',\') end\\n self:tabify()\\n self:puts(\'<metatable> = \')\\n self:putValue(mt)\\n end\\n end)\\n\\n if nonSequentialKeysLength > 0 or type(mt) == \'table\' then -- result is multi-lined. Justify closing }\\n self:tabify()\\n elseif sequenceLength > 0 then -- array tables have one extra space before closing }\\n self:puts(\' \')\\n end\\n\\n self:puts(\'}\')\\n end\\nend\\n\\nfunction Inspector:putValue(v)\\n local tv = type(v)\\n\\n if tv == \'string\' then\\n self:puts(smartQuote(escape(v)))\\n elseif tv == \'number\' or tv == \'boolean\' or tv == \'nil\' or\\n tv == \'cdata\' or tv == \'ctype\' then\\n self:puts(tostring(v))\\n elseif tv == \'table\' then\\n self:putTable(v)\\n else\\n self:puts(\'<\', tv, \' \', self:getId(v), \'>\')\\n end\\nend\\n\\n-------------------------------------------------------------------\\n\\nfunction inspect.inspect(root, options)\\n options = options or {}\\n\\n local depth = options.depth or math.huge\\n local newline = options.newline or \'\\\\n\'\\n local indent = options.indent or \' \'\\n local process = options.process\\n\\n if process then\\n root = processRecursive(process, root, {}, {})\\n end\\n\\n local inspector = setmetatable({\\n depth = depth,\\n level = 0,\\n buffer = {},\\n ids = {},\\n maxIds = {},\\n newline = newline,\\n indent = indent,\\n tableAppearances = countTableAppearances(root)\\n }, Inspector_mt)\\n\\n inspector:putValue(root)\\n\\n return table.concat(inspector.buffer)\\nend\\n\\nsetmetatable(inspect, { __call = function(_, ...) return inspect.inspect(...) end })\\n\\nreturn inspect\\n"}, {"path": "lua/com/tests.lua", "data": "require \\"com/com\\"\\nrequire \\"com/globals\\"\\n\\nfunction testpitchdiff(a, b, expected)\\n local diff = relpitchdiff(a, b)\\n if diff ~= expected then\\n print(\\"pitchdiff: \\" .. a .. \\"-\\" .. b .. \\"~=\\" .. expected .. \\"(\\" .. diff .. \\")\\" )\\n end\\nend\\n\\ntestpitchdiff( 0, 0, 0)\\ntestpitchdiff( 0, 5, 5)\\ntestpitchdiff( 5, 0, -5)\\ntestpitchdiff( 0, 6, -6)\\ntestpitchdiff( 6, 0, 6)\\ntestpitchdiff( 7, 0, 5)\\ntestpitchdiff( 0, 7, -5)\\ntestpitchdiff( 7, 1, 6)\\ntestpitchdiff( 1, 7, -6)\\ntestpitchdiff( 7, 11, 4)\\ntestpitchdiff(11, 7, -4)\\ntestpitchdiff( 0, 10, -2)\\ntestpitchdiff(10, 0, 2)\\ntestpitchdiff( 5, 9, 4)\\ntestpitchdiff( 9, 5, -4)\\ntestpitchdiff( 5, 11, -6)\\ntestpitchdiff(11, 5, 6)\\ntestpitchdiff( 9, 11, 2)\\ntestpitchdiff(11, 9, -2)\\ntestpitchdiff(11, 1, 2)\\ntestpitchdiff( 1, 11, -2)\\ntestpitchdiff( 12, 24, 0)\\n\\n\\nx = tokeyvalue({\\"a\\", 100, \\"b\\", 200, \\"c\\", 300})\\nassert(x.a == 100)\\nassert(x.b == 200)\\nassert(x.c == 300)\\n\\n\\nassert( toMidiPitch({pitch=C, octave=0}) == 60)\\nassert( toMidiPitch({pitch=C, octave=1}) == 72)\\nassert( toMidiPitch({pitch=CIS, octave=1}) == 73)\\nassert( toMidiPitch({pitch=C, octave=-1}) == 48)"}, {"path": "lua/mods/_drumRudimentsRepository.lua", "data": "-- A definition of drum rudiments.\\n-- The actual rudiment duration dosen\'t matter. At the end, the sequence\\n-- will be ajdusted, so that it fits into the duration of the related event.\\n-- The relations between the different durations is what matters.\\n-- For example\\n-- A rudiment with four quarters, played over the duration of one eight:\\n-- every rudiment quarter will become eventually a 32th\\nR=\\"R\\"\\nL=\\"L\\"\\n\\nFlamType = \\"flam\\"\\nDragType = \\"drag\\"\\n\\n-- durations\\nlocal _4 = 1\\nlocal _8 = 1/2\\nlocal _16 = 1/4\\nlocal _32 = 1/8 \\nlocal _4t = _4 / 3\\nlocal _8t = _8 / 3\\nlocal _16t = _16 / 3\\nlocal _32t = _32 / 3\\n-- velocity factors\\nAccent = \\"accent\\"\\nUnaccented = \\"unaccented\\"\\nGraceNote = \\"grace note\\"\\n\\nlocal ac = Accent\\nlocal un = Unaccented\\n\\n\\n-- create a rudiment sequence event\\nlocal function Stroke(which, duration, velocityClass)\\n if velocityClass == nil then\\n velocityClass = Accent\\n end\\n return { which=which, duration=duration, velocityClass = velocityClass }\\nend\\n\\nlocal function Flam(which, duration, velocityClass)\\n if velocityClass == nil then\\n velocityClass = Accent\\n end\\n return { which=which, duration=duration, velocityClass = velocityClass, type = FlamType}\\nend\\n\\nlocal function Drag(which, duration, velocityClass)\\n if velocityClass == nil then\\n velocityClass = Accent\\n end\\n return { which=which, duration=duration, velocityClass = velocityClass, type = DragType}\\nend\\n\\nlocal S = Stroke\\n\\nlocal function Diddle(which, duration)\\n return {\\n S(which, duration, un), S(which, duration, un)\\n }\\nend\\n\\n-- returns L for R and R for L.\\nfunction Alt(which)\\n if which == L then\\n return R\\n elseif which == R then\\n return L\\n end\\n return nil\\nend\\n\\n-- alternates the \\"Hand\\" value (which).\\n-- \\"L\\" -> \\"R\\"\\n-- \\"R\\" -> \\"L\\"\\nfunction AlternateEvent(event)\\n local copy = deepcopy(event)\\n copy.which = Alt(event.which)\\n return copy\\nend\\n\\n-- Creates a alternating stroke sequence RL...n or LR...n.\\n-- @param startingEvent: the first event. All further created events are unaccented.\\n-- @param numberOfPerformances: the number of the total performances. One RL means one performance.\\nlocal function Alternate(startingEvent, numberOfPerformances)\\n if numberOfPerformances == nil then\\n numberOfPerformances = 1\\n end\\n local result = {startingEvent}\\n local which = startingEvent.which\\n for i = 0, (numberOfPerformances-1)*2, 1 do\\n which = Alt(which)\\n table.insert(result, S(which, startingEvent.duration, un))\\n end\\n return result\\nend\\n\\n-- Creates a sequence of variable args.\\n-- An argument can be either a array of events or a single event\\nlocal function Seq(...)\\n local args = table.pack(...)\\n local result = {}\\n for i=1,args.n do\\n local arg = args[i]\\n local isEvent = arg.which ~= nil\\n if isEvent then\\n table.insert(result, arg)\\n else\\n for key, event in pairs(arg) do\\n table.insert(result, event)\\n end\\n end\\n end\\n return result\\nend\\n\\nRudiments = {\\n [\\"singleStrokeRoll\\"] =\\n { S(R, _4), S(L, _4) },\\n [\\"doubleStrokeRoll\\"] =\\n { S(R, _4), S(R, _4), S(L, _4), S(L, _4) },\\n [\\"trippleStrokeRoll\\"] =\\n { S(R, _4), S(R, _4), S(R, _4), S(L, _4), S(L, _4), S(L, _4) },\\n [\\"fiveStrokeRoll\\"] =\\n { S(R, _32, un), S(R, _32, un), S(L, _32, un), S(L, _32, un), S(R, _8, ac) },\\n [\\"singleStrokeFour\\"] =\\n { S(R, _4t), S(L, _4t), S(R, _4t), S(L, _4) },\\n [\\"singleStrokeSeven\\"] =\\n { S(R, _8t), S(L, _8t), S(R, _8t), S(L, _8t), S(R, _8t), S(L, _8t), S(R, _4) },\\n [\\"multipleBounceRoll\\"] =\\n { S(R, _32, un), S(R, _32, un), S(R, _32, un), S(R, _32, un),\\n S(L, _32, un), S(L, _32, un), S(L, _32, un), S(L, _32, un)},\\n [\\"sixStrokeRoll\\"] =\\n Seq(S(R, _8, ac), Diddle(L, _16), Diddle(R, _16), S(L, _8, ac)),\\n [\\"sevenStrokeRoll\\"] =\\n Seq(Diddle(L, _16), Diddle(R, _16), Diddle(L, _16), S(R, _8, ac)),\\n [\\"nineStrokeRoll\\"] =\\n Seq(Diddle(R, _16), Diddle(L, _16), Diddle(R, _16), Diddle(L, _16), S(R, _8, ac)),\\n [\\"tenStrokeRoll\\"] =\\n Seq(Diddle(R, _16), Diddle(L, _16), Diddle(R, _16), Diddle(L, _16), S(R, _8, ac), S(L, _8, ac)),\\n [\\"elevenStrokeRoll\\"] =\\n Seq(Diddle(R, _16), Diddle(L, _16), Diddle(R, _16), Diddle(L, _16), Diddle(R, _16), S(L, _8, ac)),\\n [\\"thirteenStrokeRoll\\"] =\\n Seq(Diddle(R, _16), Diddle(L, _16), Diddle(R, _16), Diddle(L, _16), Diddle(R, _16), Diddle(L, _16), S(R, _8, ac)),\\n [\\"fifteenStrokeRoll\\"] =\\n Seq(Diddle(R, _16), Diddle(L, _16), Diddle(R, _16), Diddle(L, _16), Diddle(R, _16), Diddle(L, _16), Diddle(R, _16), S(L, _8, ac)),\\n [\\"seventeenStrokeRoll\\"] =\\n Seq(Diddle(R, _16), Diddle(L, _16), Diddle(R, _16), Diddle(L, _16), Diddle(R, _16), Diddle(L, _16), Diddle(R, _16), Diddle(L, _16), S(R, _8, ac)),\\n [\\"paradiddle\\"] =\\n Seq(Alternate(S(R, _16, ac)), Diddle(R, _16)),\\n [\\"doubleParadiddle\\"] =\\n Seq(Alternate(S(R, _16, ac), 2), Diddle(R, _16)),\\n [\\"trippleParadiddle\\"] =\\n Seq(Alternate(S(R, _16, ac), 3), Diddle(R, _16)),\\n [\\"paradiddlediddle\\"] =\\n Seq(Alternate(S(R, _16, ac)), Diddle(R, _16), Diddle(L, _16)),\\n [\\"flam\\"] =\\n Seq(Flam(R, _4)),\\n [\\"flamAccent\\"] =\\n Seq(Flam(R, _8, ac), S(L, _8, un), S(R, _8, un)),\\n [\\"flamTap\\"] =\\n Seq(Flam(R, _16, ac), S(R, _16, un)),\\n [\\"flamacue\\"] =\\n Seq(Flam(R, _16, un), S(L, _16, ac), S(R, _16, un), S(L, _16, un), Flam(R, _4, un)),\\n [\\"flamParadiddle\\"] =\\n Seq(Flam(R, _16, ac), S(L, _16, un), Diddle(R, _16)),\\n [\\"singleFlammedMill\\"] =\\n Seq(Flam(R, _16, ac), S(R, _16, un), S(L, _16, un), S(R, _16, un)),\\n [\\"pataflafla\\"] =\\n Seq(Flam(R, _16, ac), S(L, _16, un), Diddle(R, _16), Flam(L, _16, ac)),\\n [\\"swissArmytriplet\\"] =\\n Seq(Flam(R, _16t, ac), S(R, _16t, un), S(L, _16t, un)),\\n [\\"invertedFlamTap\\"] =\\n Seq(Flam(R, _16, ac), S(L, _16, un)),\\n [\\"flamDrag\\"] =\\n Seq(Flam(R, _8, ac), S(L, _16, un), S(L, _16, un), S(R, _8, un)),\\n [\\"drag\\"] =\\n Seq(Drag(R, _4, ac)),\\n [\\"singleDragTap\\"] =\\n Seq(Drag(R, _8, un), S(L, _8, ac)),\\n [\\"doubleDragTap\\"] =\\n Seq(Drag(R, _8, un), Drag(R, _8, un), S(L, _8, ac)),\\n [\\"lesson25\\"] =\\n Seq(Drag(R, _16, un), S(L, _16, un), S(R, _8, ac)),\\n [\\"singleDragadiddle\\"] =\\n Seq(Drag(R, _16, ac), S(L, _16, un), Diddle(R, _16)),\\n [\\"dragParadiddle1\\"] =\\n Seq(S(R, _8, ac), Drag(R, _16, un), S(L, _16, un), Diddle(R, _16)),\\n [\\"dragParadiddle2\\"] =\\n Seq(S(R, _8, ac), Drag(R, _8, un), Drag(R, _16, un), S(L, _16, un), Diddle(R, _16)),\\n [\\"singleRatamacue\\"] =\\n Seq(Drag(R, _8t, un), S(L, _8t, un), S(R, _8t, un), S(L, _8, ac)),\\n [\\"doubleRatamacue\\"] =\\n Seq(Drag(R, _8, un), Drag(R, _8t, un), S(L, _8t, un), S(R, _8t, un), S(L, _8, ac)),\\n [\\"trippleRatamacue\\"] =\\n Seq(Drag(R, _8, un), Drag(R, _8, un), Drag(R, _8t, un), S(L, _8t, un), S(R, _8t, un), S(L, _8, ac)) \\n}\\n"}, {"path": "lua/mods/_events.lua", "data": "\\nNote = {}\\n\\nfunction Note:new()\\n local o = {}\\n setmetatable(o, self)\\n self.__index = self\\n o.duration = 0\\n o.isTied = false\\n o.offset = 0\\n o.pitches = {}\\n o.type = \\"note\\"\\n o.velocity = 0\\n return o \\nend\\n\\nfunction Note:addPitch(pitch, octave)\\n table.insert(self.pitches, {pitch=pitch, octave=octave})\\nend\\n\\nfunction pitchCompare(a, b)\\n a = a.pitch + (a.octave * 12)\\n b = b.pitch + (b.octave * 12)\\n return a < b\\nend\\n\\nfunction pitchCompareReversed(a, b)\\n a = a.pitch + (a.octave * 12)\\n b = b.pitch + (b.octave * 12)\\n return a > b\\nend\\n"}, {"path": "lua/mods/drumRudiments.lua", "data": "-- <command name=\\"drumRudiments\\" where=\\"mod\\" using=\\"lua/mod/drumRudiments.lua\\">\\n-- <)\\n-- You can specify which notes are for `L` and `R` and performing duration.\\n-- This will be achieved by using an chord as source material.\\n-- The chord pitches will be used for `L` and `R`.\\n-- The length of the chord event defines over which time the rudiment will be peformed.\\n-- An event tag specifies which rudiment will be performed.\\n-- For example:\\n-- This plays one paradiddle over a length of 1 quarter\\n-- using `sn1` for R and `sn2` for L:\\n-- ```\\n-- /mod: drumRudiments/\\\\n\\n-- R L \\\\n\\n-- \\"paradiddle\\"@<\\"sn1\\" \\"sn2\\">4\\\\n\\n-- ```\\n-- Examples:\\n-- **a single paradiddle**\\n-- ```language=Werckmeister\\\\n\\n--using \\"lua/mods/drumRudiments.lua\\";\\\\n\\n--tempo: 150;\\\\n\\n--device: MyDevice midi 0;\\\\n\\n--instrumentDef:piano MyDevice _ch=0 _pc=118;\\\\n\\n--[\\\\n\\n--instrument: piano;\\\\n\\n--{\\\\n\\n-- /mod: drumRudiments/\\\\n\\n-- -- a paradiddle (RLRR) with c\' for R and c for L\\\\n\\n-- \\"paradiddle\\"@<c\' c>1\\\\n\\n--}\\\\n\\n--]\\\\n\\n-- ```\\n-- **repeating**\\n-- ```language=Werckmeister\\\\n\\n--using \\"lua/mods/drumRudiments.lua\\";\\\\n\\n--tempo: 120;\\\\n\\n--device: MyDevice midi 0;\\\\n\\n--instrumentDef:piano MyDevice _ch=0 _pc=118;\\\\n\\n--[\\\\n\\n--instrument: piano;\\\\n\\n--{\\\\n\\n-- /mod: drumRudiments/\\\\n\\n-- -- performs 4 paradiddles (RLRR LRLL RLRR LRLL) with c\' for R and c for L\\\\n\\n-- \\"4x paradiddle\\"@<c\' c>1\\\\n\\n--}\\\\n\\n--]\\\\n\\n-- ```\\n-- **orchestration**\\n-- If you want to orchestrate a rudiment over a drum set,\\n-- you are able to define more R & L notes. *(The total number of the notes has to be even.)*\\n-- ```language=Werckmeister\\\\n\\n--using \\"lua/mods/drumRudiments.lua\\";\\\\n\\n--tempo: 120;\\\\n\\n--device: MyDevice midi 0;\\\\n\\n--instrumentDef:piano MyDevice _ch=0 _pc=118;\\\\n\\n--[\\\\n\\n--instrument: piano;\\\\n\\n--{\\\\n\\n-- /mod: drumRudiments/\\\\n\\n-- -- performs 4 paradiddles (RLRR LRLL RLRR LRLL) with \\\\n\\n-- -- c\' for R1 and c for L1\\\\n\\n-- -- and c, for R2 and c,, for L2.\\\\n\\n-- -- The final sequence will be: c\'(R1) c(L1) c,(R2) c,,(R1) ... \\\\n\\n-- \\"4x paradiddle\\"@<c\' c c, c,,>1\\n--}\\\\n\\n--]\\\\n\\n-- ```\\n-- **Supported Rudiments**\\n--<ul style=\\"font-size: 0.9em;\\">\\n--<li>singleStrokeRoll</li>\\n--<li>doubleStrokeRoll</li>\\n--<li>trippleStrokeRoll</li>\\n--<li>fiveStrokeRoll</li>\\n--<li>singleStrokeFour</li>\\n--<li>singleStrokeSeven</li>\\n--<li>multipleBounceRoll</li>\\n--<li>sixStrokeRoll</li>\\n--<li>sevenStrokeRoll</li>\\n--<li>nineStrokeRoll</li>\\n--<li>tenStrokeRoll</li>\\n--<li>elevenStrokeRoll</li>\\n--<li>thirteenStrokeRoll</li>\\n--<li>fifteenStrokeRoll</li>\\n--<li>seventeenStrokeRoll</li>\\n--<li>paradiddle</li>\\n--<li>doubleParadiddle</li>\\n--<li>trippleParadiddle</li>\\n--<li>paradiddlediddle</li>\\n--<li>flam</li>\\n--<li>flamAccent</li>\\n--<li>flamTap</li>\\n--<li>flamacue</li>\\n--<li>flamParadiddle</li>\\n--<li>singleFlammedMill</li>\\n--<li>pataflafla</li>\\n--<li>swissArmytriplet</li>\\n--<li>invertedFlamTap</li>\\n--<li>flamDrag</li>\\n--<li>singleDragTap</li>\\n--<li>doubleDragTap</li>\\n--<li>lesson25</li>\\n--<li>singleDragadiddle</li>\\n--<li>dragParadiddle1</li>\\n--<li>dragParadiddle2</li>\\n--<li>singleRatamacue</li>\\n--<li>doubleRatamacue</li>\\n--<li>trippleRatamacue</li>\\n--</ul>\\n-- ]]>\\n-- </command>\\n-- <param name=\\"velocityFactorAccented\\" optional=\\"1\\" type=\\"0..1\\">The velocity factor for accented notes (Default=1)</param>\\n-- <param name=\\"velocityFactorUnaccented\\" optional=\\"1\\" type=\\"0..1\\">The velocity factor for unaccented notes (Default=0.7)</param>\\n-- <param name=\\"velocityFactorGraceNote\\" optional=\\"1\\" type=\\"0..1\\">The velocity factor for accented notes (Default=1)</param>\\n-- <param name=\\"flamOffset\\" optional=\\"1\\" type=\\"0..N\\">The offset in quartes when to perform the grace note before the actual note (Default=0.05)</param>\\n-- <param name=\\"dragOffset\\" optional=\\"1\\" type=\\"0..N\\">The offset in quartes when to perform the two grace notes before the actual note (Default=0.05)</param>\\n\\n\\n\\nrequire \\"lua/com/com\\"\\nrequire \\"_drumRudimentsRepository\\"\\nrequire \\"_events\\"\\n\\nparameters = {\\n { name=\\"velocityFactorAccented\\", default=\\"1\\" },\\n { name=\\"velocityFactorUnaccented\\", default=\\"0.7\\" },\\n { name=\\"velocityFactorGraceNote\\", default=\\"0.2\\" },\\n { name=\\"flamOffset\\", default=\\"0.05\\" },\\n { name=\\"dragOffset\\", default=\\"0.05\\" },\\n}\\n\\n\\nSupportedRepeatTags = {\\n [\\"2x\\"] = 2,\\n [\\"3x\\"] = 3,\\n [\\"4x\\"] = 4,\\n [\\"5x\\"] = 5,\\n [\\"6x\\"] = 6,\\n [\\"7x\\"] = 7,\\n [\\"8x\\"] = 8,\\n [\\"9x\\"] = 9,\\n [\\"10x\\"] = 10,\\n [\\"11x\\"] = 11,\\n [\\"12x\\"] = 12,\\n [\\"13x\\"] = 13,\\n [\\"14x\\"] = 14,\\n [\\"15x\\"] = 15,\\n [\\"16x\\"] = 16,\\n [\\"17x\\"] = 17,\\n [\\"18x\\"] = 18,\\n [\\"19x\\"] = 19,\\n [\\"20x\\"] = 20,\\n [\\"21x\\"] = 21,\\n [\\"22x\\"] = 22,\\n [\\"23x\\"] = 23,\\n [\\"24x\\"] = 24,\\n [\\"25x\\"] = 25,\\n [\\"26x\\"] = 26,\\n [\\"27x\\"] = 27,\\n [\\"28x\\"] = 28,\\n [\\"29x\\"] = 29,\\n [\\"30x\\"] = 30,\\n [\\"31x\\"] = 31,\\n [\\"32x\\"] = 32,\\n}\\n\\nlocal tiedEventCache = {\\n [\\"offset\\"] = 0,\\n [\\"duration\\"] = 0,\\n [\\"originEvent\\"] = nil\\n}\\n\\nlocal function newTiedEventCache(event)\\n tiedEventCache.duration = event.duration\\n tiedEventCache.originEvent = event\\nend\\n\\nlocal function isTiedEventCacheEmpty()\\n return tiedEventCache.originEvent == nil\\nend\\n\\nlocal function clearTiedEventCache()\\n tiedEventCache.originEvent = nil\\n tiedEventCache.duration = 0\\n tiedEventCache.offset = 0\\nend\\n\\nlocal function getPossibleRudimentEvent(events)\\n local firstEvent = events[1]\\n if not isTiedEventCacheEmpty() then\\n tiedEventCache.duration = tiedEventCache.duration + firstEvent.duration\\n tiedEventCache.offset = tiedEventCache.offset - firstEvent.duration\\n if firstEvent.isTied then\\n return nil\\n end\\n end\\n if not isTiedEventCacheEmpty() and not firstEvent.isTied then\\n firstEvent = tiedEventCache.originEvent\\n firstEvent.isTied = false\\n firstEvent.offset = tiedEventCache.offset\\n firstEvent.duration = tiedEventCache.duration\\n clearTiedEventCache()\\n end\\n return firstEvent\\nend\\n\\n\\nfunction perform(events, params, timeinfo)\\n local firstEvent = getPossibleRudimentEvent(events)\\n if (firstEvent == nil) then\\n return {}\\n end\\n if #events == 0 or #firstEvent.tags == 0 then\\n return events\\n end\\n if firstEvent.duration == 0 then\\n return events\\n end\\n local rudimentPerformer = RudimentPerformer:new()\\n rudimentPerformer.velocityFactorAccented = tonumber(params.velocityFactorAccented)\\n rudimentPerformer.velocityFactorUnaccented = tonumber(params.velocityFactorUnaccented)\\n rudimentPerformer.velocityFactorGraceNote = tonumber(params.velocityFactorGraceNote)\\n rudimentPerformer.flamOffset = tonumber(params.flamOffset)\\n rudimentPerformer.dragOffset = tonumber(params.dragOffset)\\n rudimentPerformer:setSourceEvent(firstEvent)\\n if rudimentPerformer.rudiment == nil then\\n return events\\n end\\n if firstEvent.isTied then\\n newTiedEventCache(firstEvent)\\n return {}\\n end\\n local rudimentEvents = rudimentPerformer:perform();\\n return rudimentEvents\\nend\\n\\nRudimentPerformer = {}\\nfunction RudimentPerformer:new(o)\\n local o = o or {}\\n setmetatable(o, self)\\n self.__index = self\\n self.idxL = 1\\n self.idxR = 1\\n self.offset = 0\\n self.velocityFactorAccented = 1\\n self.velocityFactorUnaccented = 0.7\\n self.velocityFactorGraceNote = 0.2\\n self.flamOffset = 0.05\\n self.dragOffset = 0.05\\n return o\\nend\\n\\nfunction RudimentPerformer:findRudimentName(tags)\\n for idx, tag in pairs(tags) do\\n local val = Rudiments[tag]\\n if val ~= nil then\\n return tag\\n end\\n end\\n return nil\\nend\\n\\nfunction RudimentPerformer:findRepeatTagValue(tags)\\n for idx, tag in pairs(tags) do\\n local val = SupportedRepeatTags[tag]\\n if val ~= nil then\\n return val\\n end\\n end\\n return nil\\nend\\n\\nfunction RudimentPerformer:setSourceEvent(event)\\n local rudimentName = self:findRudimentName(event.tags)\\n local source = event.pitches\\n self.offset = event.offset\\n self.rudiment = Rudiments[rudimentName]\\n if self.rudiment == nil then\\n return\\n end\\n if #source % 2 ~= 0 then\\n -- not enough events\\n error(\\"not enough chord pitches for rudiment \\" .. rudimentName)\\n end\\n local repeatCount = self:findRepeatTagValue(event.tags)\\n if repeatCount ~= nil then\\n self:repeat_(repeatCount)\\n end\\n self.duration = event.duration\\n self.ls = {}\\n self.rs = {}\\n self.velocity = event.velocity\\n for idx, pitch in pairs(source) do\\n if idx % 2 == 0 then\\n table.insert(self.ls, pitch)\\n else\\n table.insert(self.rs, pitch)\\n end\\n end\\nend\\n\\nfunction RudimentPerformer:repeat_(count)\\n local sequence = {}\\n for i=1,count do\\n local useAlternation = i % 2 == 1\\n for idx, rudimentEvent in pairs(self.rudiment) do\\n local event = rudimentEvent\\n if (useAlternation) then\\n event = AlternateEvent(event)\\n end\\n table.insert(sequence, event)\\n end\\n end\\n self.rudiment = sequence\\nend\\n\\nfunction RudimentPerformer:l()\\n local l = self.ls[self.idxL]\\n self.idxL = self.idxL + 1\\n if self.idxL > #self.ls then\\n self.idxL = 1\\n end\\n return l\\nend\\n\\nfunction RudimentPerformer:r()\\n local r = self.rs[self.idxR]\\n self.idxR = self.idxR + 1\\n if self.idxR > #self.ls then\\n self.idxR = 1\\n end\\n return r\\nend\\n\\nfunction RudimentPerformer:nextPitch(lOrR)\\n if lOrR == nil then\\n error(\\"invalid L R value for rudiment: nil\\")\\n end\\n if lOrR == L then\\n return self:l()\\n elseif lOrR == R then\\n return self:r()\\n end\\n error(\\"invalid L R value for rudiment: \\" .. lOrR)\\nend\\n\\n-- duration of the rudiment definition\\nfunction RudimentPerformer:defDuration()\\n local duration = 0\\n for idx, rudiment in pairs(self.rudiment) do\\n duration = duration + rudiment.duration\\n end\\n return duration\\nend\\n\\nfunction RudimentPerformer:getVelocityFactor(rudiment)\\n if rudiment.velocityClass == Accent then\\n return self.velocityFactorAccented\\n end\\n if rudiment.velocityClass == Unaccented then\\n return self.velocityFactorUnaccented\\n end\\n if rudiment.velocityClass == GraceNote then\\n return self.velocityFactorGraceNote\\n end\\n error(\\"no velocity value for class \\" .. rudiment.velocityClass)\\nend\\n\\nfunction RudimentPerformer:perform()\\n local events = {}\\n local offset = self.offset\\n local durationFactor = self.duration / self:defDuration()\\n for idx, rudiment in pairs(self.rudiment) do\\n local type = rudiment.type\\n local which = rudiment.which\\n local duration = rudiment.duration\\n local velocityFactor = self:getVelocityFactor(rudiment)\\n local note = Note:new()\\n note.duration = duration * durationFactor\\n note.velocity = self.velocity * velocityFactor\\n note.offset = offset\\n local pitch = self:nextPitch(which)\\n note:addPitch(pitch.pitch, pitch.octave)\\n if type == FlamType then\\n self:performFlam(events, note, Alt(which))\\n end\\n if type == DragType then\\n self:performDrag(events, note, Alt(which))\\n end \\n table.insert(events, note)\\n offset = offset + note.duration\\n end\\n return events\\nend\\n\\n\\nfunction RudimentPerformer:performFlam(events, note, which)\\n local flamDuration = self.flamOffset\\n local flam = Note:new()\\n local pitch = self:nextPitch(which)\\n flam:addPitch(pitch.pitch, pitch.octave)\\n flam.duration = flamDuration\\n flam.velocity = note.velocity * self.velocityFactorGraceNote\\n flam.offset = note.offset\\n note.offset = note.offset + flamDuration\\n note.duration = note.duration\\n table.insert(events, flam)\\nend\\n\\nfunction RudimentPerformer:performDrag(events, note, which)\\n local flamDuration = self.dragOffset\\n local pitch = self:nextPitch(which)\\n local flam = Note:new()\\n flam:addPitch(pitch.pitch, pitch.octave)\\n flam.duration = flamDuration\\n flam.velocity = note.velocity * self.velocityFactorGraceNote\\n flam.offset = note.offset\\n table.insert(events, flam)\\n\\n flam = Note:new()\\n flam:addPitch(pitch.pitch, pitch.octave)\\n flam.duration = flamDuration\\n flam.velocity = note.velocity * self.velocityFactorGraceNote\\n flam.offset = note.offset + flamDuration\\n table.insert(events, flam)\\n\\n note.offset = note.offset + flamDuration * 2\\n note.duration = note.duration\\n\\nend\\n"}, {"path": "lua/mods/guitarStroke.lua", "data": "-- <command name=\\"guitarStroke\\" where=\\"mod\\" using=\\"lua/mod/guitarStroke.lua\\">\\n-- <![CDATA[\\n-- Simulates guitar strokes as mini arpeggios.\\n-- *Note: the alternate mode works only if this mod is set via instrumentConf.*\\n-- ```\\n-- -- does not work: \\\\n\\n-- [ \\\\n\\n-- { \\\\n\\n-- /mod: guitarStroke _mode=alternate/\\\\n\\n-- } \\\\n\\n-- ] \\\\n\\n-- ```\\n-- ```\\n-- -- does work: \\\\n\\n-- instrumentConf: myInstrument mod guitarStroke _mode=alternate; \\\\n\\n-- ```\\n-- **Example**\\n-- ```language=Werckmeister\\\\n\\n--using \\"lua/mods/guitarStroke.lua\\";\\\\n\\n--tempo: 120;\\\\n\\n--device: MyDevice midi 0;\\\\n\\n--instrumentDef: piano MyDevice _ch=0 _pc=24;\\\\n\\n--instrumentConf: piano mod guitarStroke _mode=alternate _value=16; \\\\n\\n--[\\\\n\\n--instrument: piano;\\\\n\\n--{\\\\n\\n-- <c e g b>4 <c e g b>4 <c eb g bb>2 | <c eb g bb>2 <c eb g bb>2\\\\n\\n--}\\\\n\\n--]\\\\n\\n-- ```\\n-- ]]>\\n-- </command>\\n-- <param name=\\"direction\\" optional=\\"1\\" type=\\"[up,down]\\">Specifies the start direction of the stroke</param>\\n-- <param name=\\"value\\" optional=\\"1\\" type=\\"[1,2,4,8,...]\\">the duration of one arpeggio event. (Default=64)</param>\\n-- <param name=\\"mode\\" optional=\\"1\\" type=\\"[normal,alternate]\\">Perform only one stroke direction (normal) or alternates between up and down. (Default=normal)</param>\\n\\nrequire \\"lua/com/com\\"\\nrequire \\"_events\\"\\n\\n\\nparameters = {\\n -- can be up, down\\n { name=\\"direction\\", default=\\"up\\" },\\n -- can be 1, 2, 4, 8, 16, 32, 64, ...\\n { name=\\"value\\", default=\\"64\\" },\\n -- can be normal, alternate\\n { name=\\"mode\\", default=\\"normal\\" }\\n\\n}\\n\\nlocal direction = nil\\nlocal mode = nil\\n\\nfunction perform(eventsOrigin, params, timeinfo)\\n if #eventsOrigin > 2 then\\n return eventsOrigin\\n end\\n checkLegacyNamedParams(params, \\"direction\\", \\"mode\\", \\"value\\")\\n local directionParam = params.direction\\n local modeParam = params.mode\\n local value = params.value\\n value = tonumber(value)\\n local event = eventsOrigin[1]\\n local events = { }\\n local comparer = pitchCompare\\n \\n if mode == nil then\\n mode = modeParam\\n end\\n\\n if direction ==nil then\\n direction = directionParam\\n end\\n\\n if direction == \\"down\\" then\\n comparer = pitchCompareReversed\\n if mode == \\"alternate\\" then\\n direction = \\"up\\"\\n end\\n else\\n comparer = pitchCompare\\n if mode == \\"alternate\\" then\\n direction = \\"down\\"\\n end\\n end\\n\\n local duration = 1 / value\\n table.sort( event.pitches, comparer)\\n for i, pitch in pairs(event.pitches) do\\n local note = Note:new()\\n local newOffset = event.offset + (i-1) * duration\\n note.offset = newOffset\\n note.duration = event.duration - newOffset\\n note.isTied = event.isTied\\n note.velocity = event.velocity\\n note:addPitch(pitch.pitch, pitch.octave)\\n table.insert(events, note) \\n end\\n return events\\nend"}, {"path": "lua/mods/legato.lua", "data": "-- <command name=\\"legato\\" where=\\"mod\\" using=\\"lua/mod/legato.lua\\">\\n-- Performs every note legato. It is also possible to tag single notes.\\n-- If a tag is given, only the tagged notes are performed legato.\\n-- ```language=Werckmeister\\\\n\\n--using \\"lua/mods/legato.lua\\";\\\\n\\n--tempo: 140;\\\\n\\n--device: MyDevice midi 0;\\\\n\\n--instrumentDef:piano MyDevice _ch=0 _pc=0;\\\\n\\n--[\\\\n\\n--instrument: piano;\\\\n\\n--{\\\\n\\n-- /mod: legato _forTag=leg _amount=100/\\\\n\\n-- -- only the `d` will be performed legato. \\\\n\\n-- c \\"leg\\"@d e f\\\\n\\n--}\\\\n\\n--]\\\\n\\n-- ```\\n-- </command>\\n-- <param name=\\"forTag\\" optional=\\"1\\" type=\\"text\\">Specifies a tag name. If set only events with this tag name will be affected by the legato mod.</param>\\n-- <param name=\\"amount\\" optional=\\"1\\" type=\\"0..100\\">The ammount of the legato effect</param>\\n\\nrequire \\"lua/com/com\\"\\n\\nlocal defaultAmountValue = 50\\n\\nparameters = {\\n -- specify a tag name. If set only events with this tag name will be affected by the staccato mod. \\n { name=\\"forTag\\", default=ParameterValueNoTag },\\n -- the ammount of the staccato mod. Can be between 0 and 100\\n { name=\\"amount\\", default=\\"50\\" }\\n}\\n\\nfunction perform(events, params, timeinfo)\\n checkLegacyNamedParams(params, \\"forTag\\", \\"amount\\")\\n local tag = params.forTag\\n if tag == ParameterValueNoTag then\\n tag = nil\\n end\\n local amount = tonumber(params.amount)\\n local factor = 100 - ((amount/100) * 90)\\n factor = factor / 100\\n for i, event in pairs(events) do\\n if tag == nil or contains(event.tags, tag) then\\n event.duration = event.duration / factor\\n end\\n end\\n return events\\nend"}, {"path": "lua/mods/myArpeggio.lua", "data": "-- <command name=\\"myArpeggio\\" where=\\"mod\\" using=\\"lua/mod/myArpeggio.lua\\">\\n-- <![CDATA[\\n-- A simple arpeggio implementation.\\n-- **Example**\\n-- ```language=Werckmeister\\\\n\\n--using \\"lua/mods/myArpeggio.lua\\";\\\\n\\n--tempo: 120;\\\\n\\n--device: MyDevice midi 0;\\\\n\\n--instrumentDef: piano MyDevice _ch=0 _pc=0;\\\\n\\n--[\\\\n\\n--instrument: piano;\\\\n\\n--{\\\\n\\n-- /do: myArpeggio/ \\\\n\\n-- <c e g b>2 \\\\n\\n-- /do: myArpeggio _direction=down/ \\\\n\\n-- <c eb g bb>2 \\\\n\\n--}\\\\n\\n--]\\\\n\\n-- ```\\n-- ]]>\\n-- </command>\\n-- <param name=\\"style\\" optional=\\"1\\" type=\\"[normal,legato]\\">Performs the arpeggio normal or legato</param>\\n-- <param name=\\"direction\\" optional=\\"1\\" type=\\"[up,down]\\">the direction of the arpeggio. (Default=up)</param>\\n\\nrequire \\"lua/com/com\\"\\nrequire \\"_events\\"\\n\\n\\nparameters = {\\n -- can be legato, normal\\n { name=\\"style\\", default=\\"normal\\" },\\n -- can be up, down\\n { name=\\"direction\\", default=\\"up\\" }\\n}\\n\\nfunction perform(eventsOrigin, params, timeinfo)\\n checkLegacyNamedParams(params, \\"direction\\", \\"style\\")\\n local event = eventsOrigin[1]\\n local events = { }\\n local comparer = pitchCompare\\n local direction = params.direction\\n local style = params.style\\n\\n if direction == \\"down\\" then\\n comparer = pitchCompareReversed\\n end\\n local duration = event.duration / #event.pitches\\n table.sort( event.pitches, comparer)\\n for i, pitch in pairs(event.pitches) do\\n local note = Note:new()\\n note.duration = duration\\n if style == \\"legato\\" then\\n note.duration = event.duration\\n end\\n note.velocity = event.velocity\\n note.offset = (i-1) * duration\\n note.isTied = event.isTied\\n note:addPitch(pitch.pitch, pitch.octave)\\n table.insert(events, note) \\n end\\n return events\\nend"}, {"path": "lua/mods/staccato.lua", "data": "-- <command name=\\"staccato\\" where=\\"mod\\" using=\\"lua/mod/staccato.lua\\">\\n-- Performs every note staccato. It is also possible to tag single notes.\\n-- If a tag is given, only the tagged notes are performed staccato.\\n-- ```language=Werckmeister\\\\n\\n--using \\"lua/mods/staccato.lua\\";\\\\n\\n--tempo: 140;\\\\n\\n--device: MyDevice midi 0;\\\\n\\n--instrumentDef:piano MyDevice _ch=0 _pc=0;\\\\n\\n--[\\\\n\\n--instrument: piano;\\\\n\\n--{\\\\n\\n-- /mod: staccato _forTag=stac _amount=100/\\\\n\\n-- -- only the `d` will be performed staccato. \\\\n\\n-- c \\"stac\\"@d e f\\\\n\\n--}\\\\n\\n--]\\\\n\\n-- ``` \\n-- </command>\\n-- <param name=\\"forTag\\" optional=\\"1\\" type=\\"text\\">Specifies a tag name. If set only events with this tag name will be affected by the staccato mod.</param>\\n-- <param name=\\"amount\\" optional=\\"1\\" type=\\"0..100\\">The ammount of the staccato effect</param>\\n\\nrequire \\"lua/com/com\\"\\n\\n\\nparameters = {\\n -- specify a tag name. If set only events with this tag name will be affected by the staccato mod. \\n { name=\\"forTag\\", default=ParameterValueNoTag },\\n -- the ammount of the staccato mod. Can be between 0 and 100\\n { name=\\"amount\\", default=\\"50\\" }\\n}\\n\\nfunction perform(events, params, timeinfo)\\n checkLegacyNamedParams(params, \\"forTag\\", \\"amount\\")\\n local tag = params.forTag\\n if tag == ParameterValueNoTag then\\n tag = nil\\n end\\n local amount = tonumber(params.amount)\\n local factor = 100 - ((amount/100) * 90)\\n factor = factor / 100\\n for i, event in pairs(events) do\\n if tag == nil or contains(event.tags, tag) then\\n event.duration = event.duration * factor\\n end\\n end\\n return events\\nend"}, {"path": "lua/mods/swing.lua", "data": "-- <command name=\\"swing\\" where=\\"mod\\" using=\\"lua/mod/swing.lua\\">\\n-- Performs a swing groove.\\n-- ```language=Werckmeister\\\\n\\n--using \\"lua/mods/swing.lua\\";\\\\n\\n--tempo: 120;\\\\n\\n--device: MyDevice midi 0;\\\\n\\n--instrumentDef: piano MyDevice _ch=0 _pc=0;\\\\n\\n--[\\\\n\\n--instrument: piano;\\\\n\\n--{\\\\n\\n-- /mod: swing/\\\\n\\n-- c8 c c c c c c c\\n--}\\\\n\\n--]\\\\n\\n-- ```\\n-- </command>\\n-- <param name=\\"grid\\" optional=\\"1\\" type=\\"[8, 16]\\">Performs the swing offset either on 8th or 16th. (Default=8)</param>\\n-- <param name=\\"offset\\" optional=\\"1\\" type=\\"0..100\\">The ammount of the swing offset</param>\\n\\nrequire \\"lua/com/com\\"\\n\\nparameters = {\\n -- can be 8, 16\\n { name=\\"grid\\", default=\\"8\\" },\\n -- can be between 0 and 100\\n { name=\\"offset\\", default=\\"100\\" }\\n}\\n\\n\\nfunction compareQuarters(a, b)\\n return math.abs(a-b) <= 0.1\\nend\\n\\nfunction isLaidBack(timeinfo, grid)\\n local q = timeinfo.quarterPosition\\n q = q - math.floor(q)\\n if grid == 16 then\\n return compareQuarters(q, 0.25) or compareQuarters(q, 0.75)\\n end\\n return compareQuarters(q, 0.5)\\nend\\n\\nfunction offset(grid, offset)\\n if offset == nil then\\n offset = 100\\n end\\n offset = offset / 100\\n local max = 0.25\\n if grid == 16 then\\n max = 0.09\\n end\\n return offset * max\\nend\\n\\nfunction perform(events, params, timeinfo)\\n checkLegacyNamedParams(params, \\"grid\\", \\"offset\\")\\n local gridValue = tonumber(params.grid)\\n local offsetValue = tonumber(params.offset)\\n for i, event in pairs(events) do\\n if isLaidBack(timeinfo, gridValue) then\\n event.offset = offset(gridValue, offsetValue)\\n event.velocity = event.velocity\\n end\\n end\\n return events\\nend"}, {"path": "lua/voicings/config.lua", "data": "PitchRanges = {\\n contrabass = { min=28, max=55 },\\n bass = { min=40, max=60 },\\n baritone = { min=45, max=69 },\\n tenor = { min=48, max=72 },\\n alto = { min=53, max=77 },\\n mezzosoprano = { min=57, max=81 },\\n soprano = { min=60, max=84 }\\n}"}, {"path": "lua/voicings/guitar.lua", "data": "-- <command name=\\"guitar\\" where=\\"voicingStrategy\\" using=\\"lua/voicings/guitar.lua\\">\\n-- <![CDATA[\\n-- Tries to simulate the chord voicing of an guitar.\\n-- ```language=Werckmeister\\\\n\\n--using \\"lua/voicings/guitar.lua\\";\\\\n\\n--using \\"chords/default.chords\\";\\n--tempo: 120;\\\\n\\n--device: MyDevice midi 0;\\\\n\\n--instrumentDef:piano MyDevice _ch=0 _pc=0;\\\\n\\n--[\\\\n\\n--type: template;\\\\n\\n--name: myTemplate;\\\\n\\n--instrument: piano;\\\\n\\n--{\\\\n\\n-- /voicingStrategy: guitar/\\\\n\\n-- <I II III IV V VI VII>1\\\\n\\n--}\\\\n\\n--]\\\\n\\n--[\\\\n\\n--type: accomp;\\n--{\\\\n\\n-- C | F | G | C |\\\\n\\n--}\\\\n\\n--]\\\\n\\n-- ```\\n-- ]]>\\n-- </command>\\n-- <param name=\\"range\\" optional=\\"1\\" type=\\"[contrabass,bass,baritone,tenor,alto,mezzosoprano,soprano]\\">If given the strategy tries to keeps the range by shifting the octave of the chord.</param>\\n\\nrequire \\"lua/com/com\\"\\nrequire \\"lua/com/globals\\"\\nrequire \\"solvers/guitar\\"\\n\\nparameters = {\\n table.unpack(ASolverDefaultParameter)\\n}\\n\\nlocal solver = GuitarSolver:new()\\n\\nfunction solve(chord, degrees, params, timeinfo)\\n return solver:solve(chord, degrees, params)\\nend"}, {"path": "lua/voicings/simple.lua", "data": "-- <command name=\\"simple\\" where=\\"voicingStrategy\\" using=\\"lua/voicings/simple.lua\\">\\n-- <![CDATA[\\n-- The simple approach with no strategy.\\n-- ```language=Werckmeister\\\\n\\n--using \\"lua/voicings/simple.lua\\";\\\\n\\n--using \\"chords/default.chords\\";\\n--tempo: 120;\\\\n\\n--device: MyDevice midi 0;\\\\n\\n--instrumentDef:piano MyDevice _ch=0 _pc=0;\\\\n\\n--[\\\\n\\n--type: template;\\\\n\\n--name: myTemplate;\\\\n\\n--instrument: piano;\\\\n\\n--{\\\\n\\n-- /voicingStrategy: simple/\\\\n\\n-- <I II III IV V VI VII>1\\\\n\\n--}\\\\n\\n--]\\\\n\\n--[\\\\n\\n--type: accomp;\\n--{\\\\n\\n-- C | F | G | C |\\\\n\\n--}\\\\n\\n--]\\\\n\\n-- ```\\n-- ]]>\\n-- </command>\\n-- <param name=\\"range\\" optional=\\"1\\" type=\\"[contrabass,bass,baritone,tenor,alto,mezzosoprano,soprano]\\">If given the strategy tries to keeps the range by shifting the octave of the chord.</param>\\n\\nrequire \\"lua/com/com\\"\\nrequire \\"solvers/simple\\"\\nrequire \\"solvers/asolver\\"\\n\\nparameters = {\\n table.unpack(ASolverDefaultParameter)\\n}\\n\\nlocal solver = Simple:new()\\n\\nfunction solve(chord, degrees, parameters)\\n return solver:solve(chord, degrees, parameters)\\nend"}, {"path": "lua/voicings/voicelead.lua", "data": "-- <command name=\\"voicelead\\" where=\\"voicingStrategy\\" using=\\"lua/voicings/voicelead.lua\\">\\n-- <![CDATA[\\n-- Tries to simulates a voice leading approach:\\n-- the octaves of a chord are rearranged, so that the actual pitch distance between the previous chord is kept minimal.\\n-- ```language=Werckmeister\\\\n\\n--using \\"lua/voicings/voicelead.lua\\";\\\\n\\n--using \\"chords/default.chords\\";\\n--tempo: 120;\\\\n\\n--device: MyDevice midi 0;\\\\n\\n--instrumentDef:piano MyDevice _ch=0 _pc=0;\\\\n\\n--[\\\\n\\n--type: template;\\\\n\\n--name: myTemplate;\\\\n\\n--instrument: piano;\\\\n\\n--{\\\\n\\n-- /voicingStrategy: voicelead/\\\\n\\n-- <I II III IV V VI VII>1\\\\n\\n--}\\\\n\\n--]\\\\n\\n--[\\\\n\\n--type: accomp;\\n--{\\\\n\\n-- C | F | G | C |\\\\n\\n--}\\\\n\\n--]\\\\n\\n-- ```\\n-- ]]>\\n-- </command>\\n-- <param name=\\"range\\" optional=\\"1\\" type=\\"[contrabass,bass,baritone,tenor,alto,mezzosoprano,soprano]\\">If given the strategy tries to keeps the range by shifting the octave of the chord.</param>\\n\\nrequire \\"lua/com/com\\"\\nrequire \\"lua/com/globals\\"\\nrequire \\"solvers/voicelead\\"\\n\\nparameters = {\\n table.unpack(ASolverDefaultParameter)\\n}\\n\\nlocal solver = VoiceLeadSolver:new()\\n\\nfunction solve(chord, degrees, params)\\n return solver:solve(chord, degrees, params)\\nend"}, {"path": "lua/voicings/solvers/asolver.lua", "data": "require \\"config\\"\\nrequire \\"lua/com/com\\"\\n\\nNoRangeSet = \\"__noRangeSet\\"\\nNoImportantDegreesSet = \\"_noImportantDegreesSet\\"\\n\\nASolverDefaultParameter = {\\n -- can be contrabass, bass, baritone, tenor, alto, mezzosoprano, soprano\\n { name=\\"range\\", default=NoRangeSet },\\n { name=\\"importantDegrees\\", default=NoImportantDegreesSet },\\n { name=\\"importantDegree\\", default=NoImportantDegreesSet },\\n}\\nASolver = {}\\n\\nfunction ASolver:new(o)\\n local o = o or {}\\n setmetatable(o, self)\\n self.__index = self\\n return o\\nend\\n\\nfunction ASolver:checkForLegacyParameters(params)\\n checkLegacyNamedParams(params, \\"range\\", \\"importantDegrees\\", \\"importantDegree\\")\\nend\\n\\n-- returns the a degree def from the given degree def collection\\n-- if more than one degree def defined, it will return the first one\\nfunction ASolver:getDefaultDegreeDef(degreeValue, degrees)\\n local default = degrees[degreeValue]\\n if default == nil \\n then\\n return nil\\n end\\n return default[1]\\nend\\n\\n-- creates a absolute pitch using the given chord\\nfunction ASolver:createPitch(chord, degreeDef, octave)\\n if degreeDef == nil or degreeDef.degreeValue == nil\\n then\\n return nil\\n end\\n return { [\\"pitch\\"]= self:degreeToPitch(degreeDef, chord), [\\"octave\\"]=octave }\\nend\\n\\nfunction ASolver:degreeToPitch(degreeDef, chord)\\n return chord.rootPitch + degreeDef.degreeValue\\nend\\n\\nfunction ASolver:getAbsolutePitch(pitch)\\n return pitch.pitch + (pitch.octave * 12)\\nend\\n\\nfunction ASolver:_addImportantDegree(degrees, degreeVal, semitone)\\n local degreeInfo = self:getDefaultDegreeDef(degreeVal, degrees)\\n if degreeInfo==nil then\\n return\\n end\\n local degrObj = {\\n degreeValue= semitone,\\n octave= degreeInfo.octave\\n }\\n degrees[degreeVal] = {degrObj}\\nend\\n\\n-- set important degrees if defined in params\\n-- more informations about important degrees:\\n-- https://github.com/werckme/werckmeister/issues/123\\nfunction ASolver:_setImportantDegreesIfExists(params, degrees)\\n local strDegree = params.importantDegree\\n if (strDegree == nil or strDegree == NoImportantDegreesSet) then\\n strDegree = params.importantDegrees\\n if strDegree == nil or strDegree == NoImportantDegreesSet then\\n return\\n end\\n end\\n local strDegrees = split(strDegree, \\" \\")\\n for i, degree in pairs(strDegrees) do \\n local degreeVal = DegreeStringValues[degree]\\n if degreeVal ~= nil then\\n local semitone = MajorScaleSemitones[degree]\\n self:_addImportantDegree(degrees, degreeVal, semitone)\\n end\\n end\\nend\\n\\n-- solves degrees into absolute pitches\\n-- @param chord: the current cord informations\\n-- @param degrees: the current degree event including the semitone informations from \\n-- the chord definition eg.: { II= {degreeValue, octave} }\\n-- If the current chord has no information about a degree\\n-- the value is empty eg.: II= {} \\nfunction ASolver:solve(chord, degrees, params)\\n self:checkForLegacyParameters(params)\\n self:_setImportantDegreesIfExists(params, degrees)\\n local result = self:_solveImpl(chord, degrees, params)\\n if params.range ~= nil and params.range ~=NoRangeSet then\\n self:_keepRange(result, params.range)\\n end\\n return result\\nend\\n\\nfunction ASolver:_solveImpl(chord, degrees, args)\\n error(\\"this is an abstract function\\")\\nend\\n\\nfunction ASolver:_transpose(pitches, numOctaves)\\n for i, pitch in pairs(pitches) do\\n pitch.octave = pitch.octave + numOctaves\\n end\\nend\\n\\nfunction ASolver:_keepRange(pitches, strRange)\\n local destinationRange = PitchRanges[strRange]\\n if destinationRange == nil then\\n error(\\"strRange \\" .. strRange .. \\" not defined\\")\\n end\\n local nbUnder = 0\\n local nbOver = 0\\n local mindiff = math.maxinteger\\n local maxdiff = math.mininteger\\n for i, pitch in pairs(pitches) do\\n local midipitch = toMidiPitch(pitch)\\n if midipitch > destinationRange.max then\\n local diff = midipitch - destinationRange.max\\n if diff > maxdiff then\\n maxdiff = diff\\n end\\n nbOver = nbOver + 1\\n end\\n if midipitch < destinationRange.min then\\n local diff = destinationRange.min - midipitch\\n if diff < mindiff then\\n mindiff = diff\\n end\\n nbUnder = nbUnder + 1\\n end\\n end\\n if nbUnder > nbOver then\\n local octaves = math.ceil(mindiff/12)\\n self:_transpose(pitches, octaves)\\n end\\n if nbUnder < nbOver then\\n local octaves = -math.ceil(maxdiff/12)\\n self:_transpose(pitches, octaves)\\n end\\nend"}, {"path": "lua/voicings/solvers/config.lua", "data": "PitchRanges = {\\n contrabass = { min=28, max=55 },\\n bass = { min=40, max=60 },\\n baritone = { min=45, max=69 },\\n tenor = { min=48, max=72 },\\n alto = { min=53, max=77 },\\n mezzosoprano = { min=57, max=81 },\\n soprano = { min=60, max=84 }\\n}"}, {"path": "lua/voicings/solvers/guitar.lua", "data": "require \\"lua/voicings/solvers/asolver\\"\\nrequire \\"lua/com/globals\\"\\n\\n-- https://www.8notes.com \\n-- https://www.oolimo.de/gitarrenakkorde/find\\n-- https://www.scales-chords.com/chord/piano/\\nVoicingMatrix = {\\n [\\"1234567/bass\\"] = nil,\\n [\\"1010100\\"] = {I, V, I, III, I}, -- base\\n [\\"1100100\\"] = {I, V, I, II }, -- sus2\\n [\\"1001100\\"] = {I, V, I, IV, V }, -- sus4\\n [\\"1001101\\"] = {I, V, VII, IV, V}, -- 7sus4\\n [\\"1101101\\"] = {I, IV, VII, II, V}, -- 9sus4\\n [\\"1010110\\"] = {I, VI, III, V}, -- 6\\n [\\"1110110\\"] = {I, VI, III, V, II}, -- 6/9\\n [\\"1010101\\"] = {I, V, VII, III, I}, -- 7\\n [\\"1110101\\"] = {I, III, VII, II}, -- 9\\n [\\"1110100\\"] = {I, V, II, III}, -- add9\\n [\\"1011101\\"] = {I, IV, VII, III}, -- 11\\n [\\"1011001\\"] = {I, VII, III, IV}, -- 7#11\\n [\\"1010111\\"] = {I, V, VII, III, VI}, -- 13\\n [\\"1010101/7\\"] = {VII, V, I, III}, -- /7\\n [\\"1010100/5\\"] = {V, I, III, V}, -- /5\\n [\\"1011100/4\\"] = {IV, V, I, III}, -- /4\\n [\\"1010100/3\\"] = {III, V, I, III}, -- /3\\n [\\"1110100/2\\"] = {II, V, I, III}, -- /2\\n}\\n\\n\\n-- returns the degrees defined for a chord as a bit string.\\n-- e.g.: Xmaj\'s degrees are defined as I III V\\n-- 1234567\\n-- as bitstring = 1010100\\n-- if chord is a slash chord, the degree value will be appended as number.\\n-- e.g.: X/V = 1010100/5\\nfunction chordToHashString(chord)\\n local bits = {}\\n local slashAppendings = {}\\n local degrees = chord.degrees\\n for i=1, 7 do\\n if degrees[i] == nil or chord:isDegreeAdjunct(i) then\\n bits[i] = 0\\n else\\n bits[i] = 1\\n if chord.degrees[i] < 0 then\\n table.insert(slashAppendings, i)\\n end\\n end\\n end\\n if #slashAppendings == 0 then\\n return table.concat(bits)\\n end\\n return table.concat(bits) .. \\"/\\" .. table.concat(slashAppendings)\\nend\\n\\nGuitarSolver = ASolver:new()\\n\\nfunction GuitarSolver:degreeToPitch(degreeDef, chord)\\n return chord.rootPitch + (degreeDef.degreeValue % 12)\\nend\\n\\nfunction GuitarSolver:_solveImpl(chord, degrees, params)\\n local d = function(degreeValue) return self:getDefaultDegreeDef(degreeValue, degrees) end\\n local strDegrees = chordToHashString(chord)\\n local voicing = VoicingMatrix[strDegrees]\\n if voicing == nil then\\n error(\\"no voicing found defined for \\" .. chord.strBase .. chord.strOptions .. \\" \\" .. strDegrees)\\n end\\n local result = {}\\n local octave = -1\\n local lastDegree = -1\\n for idx, degree in pairs(voicing) do\\n if degree <= lastDegree then \\n octave = octave + 1\\n end\\n lastDegree = degree\\n result[idx] = self:createPitch(chord, d(degree ), octave)\\n end\\n return result\\nend"}, {"path": "lua/voicings/solvers/simple.lua", "data": "require \\"lua/voicings/solvers/asolver\\"\\nrequire \\"lua/com/globals\\"\\n\\nSimple = ASolver:new()\\n\\nfunction Simple:degreeToPitch(degreeDef, chord)\\n return chord.rootPitch + degreeDef.degreeValue\\nend\\n\\nfunction Simple:_solveImpl(chord, degrees, parameters)\\n local pitches = {}\\n for degree, degreeDefs in pairs(degrees)\\n do\\n if isnumber(degree)\\n then\\n for idx, degreeDef in pairs(degreeDefs)\\n do\\n table.insert(pitches, self:createPitch(chord, degreeDef, degreeDef.octave))\\n end\\n end\\n end\\n return pitches\\nend"}, {"path": "lua/voicings/solvers/voicelead.lua", "data": "require \\"simple\\"\\nrequire \\"lua/com/globals\\"\\n\\nVoiceLeadSolver = Simple:new()\\n\\nfunction VoiceLeadSolver:getPitchWithMinDistance(pitch, pitches)\\n local min = math.maxinteger\\n local minPitch = nil\\n local relPitch = pitch.pitch % 12\\n for i, refpitch in pairs(pitches) do\\n local diff = relpitchdiff(refpitch.pitch, relPitch)\\n diff = math.abs(diff)\\n if (diff < min) then\\n minPitch = refpitch\\n min = diff\\n end\\n end\\n return minPitch\\nend\\n\\n-- changes the octave of pitch, so that the interval\\n-- between pitch and targetPitch is minimal\\nfunction VoiceLeadSolver:toPitchNextTo(pitch, targetPitch)\\n if targetPitch == nil then\\n return pitch\\n end\\n local diff = pitch.pitch - targetPitch.pitch\\n pitch.octave = targetPitch.octave\\n --print(pitch.pitch, targetPitch.pitch, diff)\\n if (diff > 6) then\\n pitch.octave = pitch.octave - 1\\n end\\n if (diff < -6) then\\n pitch.octave = pitch.octave + 1\\n end\\n return pitch\\nend\\n\\n\\n-- compare pitches with a reference and adjust octaves\\nfunction VoiceLeadSolver:adjustOctaves(pitches, reference)\\n for i, pitch in pairs(pitches) do\\n local min = self:getPitchWithMinDistance(pitch, reference) \\n self:toPitchNextTo(pitch, min)\\n end\\n return pitches\\nend\\n\\nfunction VoiceLeadSolver:_solveImpl(chord, degrees, params)\\n local pitches = Simple:_solveImpl(chord, degrees, params)\\n if #pitches < 2\\n then\\n return pitches\\n end\\n if self.previous ~= nil \\n then\\n pitches = self:adjustOctaves(pitches, self.previous)\\n end\\n return pitches\\nend\\n\\nfunction VoiceLeadSolver:solve(chord, degrees, params)\\n self:checkForLegacyParameters(params)\\n local result = self:_solveImpl(chord, degrees, params)\\n if params.range ~=nil and params.range ~=NoRangeSet then\\n self:_keepRange(result, params.range)\\n end\\n self.previous = result\\n return result\\nend"}, {"path": "pitchmaps/battery3.tight.pitchmap", "data": "\\"bd\\": c,,\\n\\"sn\\": d,,\\n\\"sng\\": g# --snare ghost notes\\n\\"ss\\": c#,, -- sidestick\\n\\"hc\\": d#,, -- handclap\\n\\"ht\\": f#,, -- hihat closed\\n\\"hf\\": g#,, -- hihat foot\\n\\"ho\\": bb,, -- hihat open\\n\\"ho1\\": g\' -- hihat half open1\\n\\"ho2\\": g#\' -- hihat half open2\\n\\"ho3\\": a\' -- hihat half open3\\n\\"cy\\": c#,\\n\\"hto\\": c,\\n\\"hto1\\": c,\\n\\"hto2\\": d,\\n\\"mto\\": b,,\\n\\"mto1\\": b,,\\n\\"mto2\\": a,,\\n\\"lto\\": g,,\\n\\"lto1\\": g,,\\n\\"lto2\\": f,,\\n\\"rdbell\\": f#,\\n\\"mtr\\": ab\'\\n\\"otr\\": a\'\\n-- r&l\\n\\"snl\\": d,,\\n\\"snr\\": e,,\\n\\"riml\\": c#,,\\n\\"rimr\\": d#,,\\n\\"htol\\": e,\\n\\"htor\\": f,\\n\\"mtol\\": c,\\n\\"mtor\\": d,\\n\\"ltol\\": b,,\\n\\"ltor\\": a,,\\n\\"ftol\\": g,,\\n\\"ftor\\": f,,\\n"}, {"path": "pitchmaps/defaultMIDI.pitchmap", "data": "\\"bd\\": c,,,,\\n\\"bd2\\": b,,,\\n\\"o\\": b,,,\\n\\"sn\\": d,,\\n\\"x\\": d,,\\n\\"sn2\\": e,,\\n\\"esn\\": e,, -- electric snare\\n\\"sng\\": d,, --snare ghost notes\\n\\"ss\\": c#,, -- sidestick\\n\\"hc\\": d#,, -- handclap\\n\\"ht\\": f#,, -- hihat closed\\n\\"h\\": f#,, -- hihat closed\\n\\"hf\\": g#,, -- hihat foot\\n\\"h,\\": g#,, -- hihat foot\\n\\"ho\\": bb,, -- hihat open\\n\\"h\'\\": bb,, -- hihat open\\n\\"ho1\\": bb,, -- hihat half open1\\n\\"ho2\\": bb,, -- hihat half open2\\n\\"ho3\\": bb,, -- hihat half open3\\n\\"cy\\": c#, -- crash cymbal\\n\\"spl\\": g, -- splash cymbal\\n\\"hto\\": c, -- high tom \\n\\"m\'\\": c, -- high tom \\n\\"hto1\\": c,\\n\\"hto2\\": d,\\n\\"mto\\": b,, -- middle tom\\n\\"m\\": b,, -- middle tom\\n\\"mto1\\": b,,\\n\\"mto2\\": a,,\\n\\"lto\\": g,, -- low tom\\n\\"m,\\": g,, -- low tom\\n\\"lto1\\": g,,\\n\\"lto2\\": f,,\\n\\"rcym1\\": d#, -- ride cymbal 1\\n\\"rcym2\\": b, -- ride cymbal 2\\n\\"rbell\\": f, -- ride bell\\n\\"mtr\\": ab\' -- muted triangle\\n\\"otr\\": a\' -- open triangle\\n\\"bo1\\": c --bongo 1\\n\\"bo2\\": c# --bongo 2\\n\\"tim1\\": f --timbale 1\\n\\"tim2\\": f# --timbale 2\\n\\"ago1\\": g --agogo 1\\n\\"ago2\\": g# --agogo 2\\n\\"cui1\\": f#\' -- cuica 1\\n\\"cui2\\": g\' -- cuica 2\\n\\"cwb\\": g#, -- cowbell\\n\\"cla\\": d#\' -- claves\\n\\"mcon\\":d -- mute high conga\\n\\"ocon\\":d# -- open conga\\n\\"lcon\\":e -- low conga\\n\\"tmb\\":f#, -- tambourine \\n\\n\\n\\"brsw\\": e,, -- brush swirl\\n\\"brtp\\": d,, -- brush tap\\n\\"brsp\\": d#,, -- brush slap"}, {"path": "pitchmaps/defaultMidiDrumMap.pitchmap", "data": "\\"bd\\": c,,,,\\n\\"sn\\": d,,\\n\\"sng\\": d,, --snare ghost notes\\n\\"ss\\": c#,, -- sidestick\\n\\"hc\\": d#,, -- handclap\\n\\"ht\\": f#,, -- hihat closed\\n\\"hf\\": g#,, -- hihat foot\\n\\"ho\\": bb,, -- hihat open\\n\\"ho1\\": bb,, -- hihat half open1\\n\\"ho2\\": bb,, -- hihat half open2\\n\\"ho2\\": bb,, -- hihat half open3\\n\\"cy\\": c#, -- crash cymal\\n\\"spl\\": g, -- splash cymal\\n\\"hto\\": c, -- high tom \\n\\"hto1\\": c,\\n\\"hto2\\": d,\\n\\"mto\\": b,, -- middle tom\\n\\"mto1\\": b,,\\n\\"mto2\\": a,,\\n\\"lto\\": g,, -- low tom\\n\\"lto1\\": g,,\\n\\"lto2\\": f,,\\n\\"rdbell\\": b,\\n\\"mtr\\": ab\' -- muted triangle\\n\\"otr\\": a\' -- open triangle\\n\\"bo1\\": c --bongo 1\\n\\"bo2\\": c# --bongo 2\\n\\"tim1\\": f --timbale 1\\n\\"tim2\\": f# --timbale 2\\n\\"ago1\\": g --agogo 1\\n\\"ago2\\": g# --agogo 2\\n\\"cui1\\": f#\' -- cuica 1\\n\\"cui2\\": g\' -- cuica 2\\n\\"cwb\\": g#, -- cowbell\\n\\"cla\\": d#\' -- claves\\n\\n\\"cr\\": c#, -- crash cymal\\n\\"t1\\": c, -- high tom \\n\\"t2\\": b,, -- middle tom\\n\\"t3\\": g,, -- low tom\\n\\"t4\\": f,,"}, {"path": "templates/bass.blues.template", "data": "[\\ntype: template;\\nname: bass.blues.normal; \\ninstrument: bass;\\n{\\n /do: swing _grid=8 _offset =60/\\n I,,,8 & I,,& VII,,,& V,,,& |\\n}\\n]"}, {"path": "templates/bass.bossanova.template", "data": "[\\ntype: template;\\nname: bass.bossanova.normal;\\ninstrument: bass; \\n{\\n \\\\fff\\n I,,4. V,,8 V,,4. I,,8 |\\n I,,4. V,,8 V,,4 I,,4 |\\n I,,4. V,,8 V,,4. I,,8 |\\n I,,4. V,,8 V,,4 I,,8 V,,8 |\\n} \\n] \\n"}, {"path": "templates/bass.country.template", "data": "[\\ntype: template;\\nname: bass.country.normal;\\ninstrument: bass; \\n{\\n I,,4. I,,8 V,,,4. V,,,8 |\\n} \\n] \\n\\n[\\ntype: template;\\nname: bass.country.ende;\\ninstrument: bass; \\n{\\n I,,1 |\\n} \\n] "}, {"path": "templates/bass.disco.template", "data": "[\\ntype: template;\\nname: bass.disco.normal;\\ninstrument: bass;\\n{\\n \\\\ffff\\n I,,8 I,16 I,16 I,,8 I,16 I,16 I,,8 I,16 I,16 I,,8 I,16 I,16 |\\n} \\n]\\n"}, {"path": "templates/bass.jazzSwing.template", "data": "-- tempo: 155\\n-- signature: 4/4\\n-- parts: normal\\n[\\ntype: template;\\nname: bass.jazzSwing.normal;\\ninstrument: bass; \\n{\\n I,,2 V,, | \\n I,, V,,,4 I,, |\\n}\\n\\n]\\n"}, {"path": "templates/bass.reggae.template", "data": "using \\"lua/mods/swing.lua\\";\\n\\n[\\ntype: template;\\nname: bass.reggae.normal;\\ninstrument: bass;\\n{\\n /do: swing _grid=8 _offset =30/\\n I,,16 r16 I,,8 r2 V,,,4 |\\n I,,16 r16 r8 I,,8 r4. V,,,4 |\\n I,,16 r16 I,,8 r2 V,,,4 |\\n I,,16 r16 I,,8 r2 V,,,4 |\\n}\\n]"}, {"path": "templates/bass.soca.template", "data": "[\\ntype: template;\\nname: bass.soca.normal;\\ninstrument: bass;\\n{\\n r8 r16 I,,32 r32 I,,8 I,,16 r \\n r8 r16 I,,32 r32 r16 I,,32 r V,,, r I,, r |\\n}\\n]"}, {"path": "templates/bossanova.template", "data": "using \\"lua/voicings/voicelead.lua\\";\\nusing \\"lua/voicings/simple.lua\\";\\nusing \\"lua/voicings/guitar.lua\\";\\nusing \\"lua/mods/guitarStroke.lua\\";\\n\\n[\\ntype: template;\\nname: bossanova.normal;\\ninstrument: drums;\\n{\\n \\"ht\\"8 !f\\"ht\\" \\"ht\\" !f\\"ht\\" \\"ht\\" \\"ht\\" \\"ht\\" !f\\"ht\\" |\\n} \\n{\\n \\\\fff\\n r4 \\"ss\\"8 r4 \\"ss\\"8 r4 | \\"ss\\"4. \\"ss\\"8 r4 \\"ss\\" |\\n} \\n{\\n \\"bd\\"4. \\"bd\\"8 \\"bd\\"4. \\"bd\\"8 |\\n} \\n]\\n\\n[\\ntype: template;\\nname: bossanova.normal;\\ninstrument: guitar; \\n{\\n /do: guitarStroke _value=32/\\n /voicingStrategy: guitar/\\n \\\\f\\n <I II III IV V VI VII>4 <I II III IV V VI VII>4 r8 <I II III IV V VI VII>8 r8 <I II III IV V VI VII>8 |\\n r8 <I II III IV V VI VII>8 r8 <I II III IV V VI VII>8 r4 <I II III IV V VI VII>4 |\\n <I II III IV V VI VII>4 <I II III IV V VI VII>4 r8 <I II III IV V VI VII>8 r8 <I II III IV V VI VII>8 |\\n r4 r8 <I II III IV V VI VII>8 r8 <I II III IV V VI VII>4. |\\n} \\n] \\n\\n[\\ntype: template;\\nname: bossanova.normal;\\ninstrument: piano; \\n{\\n -- /voicingStrategy: simple _range=tenor/\\n <VII, VII>4 <III, V,>8 <V, V>8 r8 <III, V,>8 r8 <V, V> | r8 <III, V,>8 r8 <V, V> r8 <III, V,> r8 <VII, VII> |\\n} \\n] \\n\\n[\\ntype: template;\\nname: bossanova.normal;\\ninstrument: bass; \\n{\\n \\\\fff\\n I,,4. V,,8 V,,4. I,,8 |\\n I,,4. V,,8 V,,4 I,,4 |\\n I,,4. V,,8 V,,4. I,,8 |\\n I,,4. V,,8 V,,4 I,,8 V,,8 |\\n} \\n] \\n"}, {"path": "templates/countryschlager1.template", "data": "using \\"lua/voicings/guitar.lua\\";\\nusing \\"lua/voicings/voicelead.lua\\";\\nusing \\"lua/mods/guitarStroke.lua\\";\\n\\n[\\ntype: template;\\nname: countryschlager1.normal;\\ninstrument: guitar; \\n{\\n /do: guitarStroke/\\n /voicingStrategy: guitar _range=tenor/\\n \\\\f\\n <I II III IV V VI VII>8 <I II III IV V VI VII>8 r8 \\n <I II III IV V VI VII>4 <I II III IV V VI VII>8 <I II III IV V VI VII>8 <I II III IV V VI VII>8 |\\n} \\n]\\n\\n[\\ntype: template;\\nname: countryschlager1.normal;\\ninstrument: slide; \\n{\\n \\\\f\\n /modOnce: bend from 0/\\n r1 |\\n r1 |\\n r1 |\\n <I\' II\' III\' IV\' V\' VI\' VII\'>1 |\\n r1 |\\n r1 |\\n r1 |\\n /modOnce: bend to 100/\\n <I\' II\' III\' IV\' V\' VI\' VII\'>1 |\\n} \\n] \\n\\n[\\ntype: template;\\nname: countryschlager1.normal;\\ninstrument: bass; \\n{\\n I,,4. I,,8 V,,,4. V,,,8 |\\n} \\n] \\n\\n[\\ntype: template;\\nname: countryschlager1.normal;\\ninstrument: drums;\\n{\\n \\"ht\\"8 !f\\"ht\\"8 \\"ht\\"8 !f\\"ht\\"8 \\"ht\\"8 !f\\"ht\\"8 \\"ht\\"8 !f\\"ht\\"8 |\\n} \\n{\\n r4 \\"sn\\" r \\"sn\\" |\\n}\\n{\\n \\"bd\\"4. \\"bd\\"8 \\"bd\\"4. \\"bd\\"8 |\\n \\"bd\\"4. \\"bd\\"8 \\"bd\\"4. \\"bd\\"8 |\\n \\"bd\\"4. \\"bd\\"8 \\"bd\\"8 !f\\"bd\\"8 r8 \\"bd\\"8 |\\n} \\n] \\n\\n[\\ntype: template;\\nname: countryschlager1.ende;\\ninstrument: guitar; \\n{\\n /do: guitarStroke _value=8/\\n <I II III IV V VI VII>1 |\\n} \\n] \\n\\n[\\ntype: template;\\nname: countryschlager1.ende;\\ninstrument: bass; \\n{\\n I,,1 |\\n} \\n] \\n\\n[\\ntype: template;\\nname: countryschlager1.ende;\\ninstrument: drums;\\n{\\n \\"cy\\"1 |\\n} \\n{\\n \\"bd\\"1|\\n} \\n]\\n\\n[\\ntype: template;\\nname: countryschlager1.ende;\\ninstrument: slide; \\n{\\n \\\\f\\n /modOnce: bend from 1/\\n <I\' II\' III\' IV\' V\' VI\' VII\'>1 |\\n} \\n] \\n"}, {"path": "templates/drums.bossanova.template", "data": "[\\ntype: template;\\nname: drums.bossanova.normal;\\ninstrument: drums;\\n{\\n \\"ht\\"8 !f\\"ht\\" \\"ht\\" !f\\"ht\\" \\"ht\\" \\"ht\\" \\"ht\\" !f\\"ht\\" |\\n} \\n{\\n \\\\fff\\n r4 \\"ss\\"8 r4 \\"ss\\"8 r4 | \\"ss\\"4. \\"ss\\"8 r4 \\"ss\\" |\\n} \\n{\\n \\"bd\\"4. \\"bd\\"8 \\"bd\\"4. \\"bd\\"8 |\\n} \\n]"}, {"path": "templates/drums.country.template", "data": "[\\ntype: template;\\nname: drums.country.normal;\\ninstrument: drums;\\n{\\n \\"ht\\"8 !f\\"ht\\"8 \\"ht\\"8 !f\\"ht\\"8 \\"ht\\"8 !f\\"ht\\"8 \\"ht\\"8 !f\\"ht\\"8 |\\n} \\n{\\n r4 \\"sn\\" r \\"sn\\" |\\n}\\n{\\n \\"bd\\"4. \\"bd\\"8 \\"bd\\"4. \\"bd\\"8 |\\n \\"bd\\"4. \\"bd\\"8 \\"bd\\"4. \\"bd\\"8 |\\n \\"bd\\"4. \\"bd\\"8 \\"bd\\"8 !f\\"bd\\"8 r8 \\"bd\\"8 |\\n} \\n] \\n\\n[\\ntype: template;\\nname: drums.country.cymbal;\\ninstrument: drums;\\n{\\n \\"cy\\"4 \\"ht\\"8 !f\\"ht\\"8 \\"ht\\"8 !f\\"ht\\"8 \\"ht\\"8 !f\\"ht\\"8 |\\n} \\n{\\n r4 \\"sn\\" r \\"sn\\" |\\n}\\n{\\n \\"bd\\"4. \\"bd\\"8 \\"bd\\"4. \\"bd\\"8 |\\n} \\n] \\n\\n[\\ntype: template;\\nname: drums.country.ende;\\ninstrument: drums;\\n{\\n \\"cy\\"1 |\\n} \\n{\\n \\"bd\\"1|\\n} \\n]"}, {"path": "templates/drums.disco.template", "data": "[\\ntype: template;\\nname: drums.disco.normal;\\ninstrument: drums;\\n{\\n r8 \\"ht\\"16 \\"ht\\"16 !ffff\\"sn\\"8 \\"ht\\"16 \\"ht\\"16 r8 \\"ht\\"16 \\"ht\\"16 !ffff\\"sn\\"8 \\"ht\\"16 \\"ht\\"16 |\\n r8 \\"ht\\"16 \\"ht\\"16 !ffff\\"sn\\"8 \\"ht\\"16 \\"ht\\"16 r8 \\"ht\\"16 \\"ht\\"16 !ffff\\"sn\\"8 !ffff<\\"sn\\" \\"ht\\">16 !fffff\\"sn\\"16 |\\n \\"cy\\"8 \\"ht\\"16 \\"ht\\"16 !ffff\\"sn\\"8 \\"ht\\"16 \\"ht\\"16 r8 \\"ht\\"16 \\"ht\\"16 !ffff\\"sn\\"8 \\"ht\\"16 \\"ht\\"16 |\\n r8 \\"ht\\"16 \\"ht\\"16 !ffff\\"sn\\"8 \\"ht\\"16 \\"ht\\"16 r8 \\"ht\\"16 \\"ht\\"16 !ffff\\"sn\\"8 <\\"sn\\" \\"ht\\">16 !fffff\\"sn\\"16 |\\n} \\n{\\n \\"bd\\"4 \\"bd\\" \\"bd\\" \\"bd\\" |\\n} \\n] \\n\\n[\\ntype: template;\\nname: drums.disco.solo;\\ninstrument: drums;\\n{\\n \\"bd\\"4 \\"bd\\" \\"bd\\" \\"bd\\" |\\n} \\n] \\n\\n[\\ntype: template;\\nname: drums.disco.solo2;\\ninstrument: drums;\\n{\\n \\"cy\\"8 \\"ht\\"16 \\"ht\\"16 !ffff\\"sn\\"8 \\"ht\\"16 \\"ht\\"16 r8 \\"ht\\"16 \\"ht\\"16 !ffff\\"sn\\"8 \\"ht\\"16 \\"ht\\"16 |\\n r8 \\"ht\\"16 \\"ht\\"16 !ffff\\"sn\\"8 \\"ht\\"16 \\"ht\\"16 r8 \\"ht\\"16 \\"ht\\"16 !ffff\\"sn\\"8 <\\"sn\\" \\"ht\\">16 !fffff\\"sn\\"16 |\\n} \\n{\\n \\"bd\\"4 \\"bd\\" \\"bd\\" \\"bd\\" |\\n} \\n] "}, {"path": "templates/drums.jazzSwing.template", "data": "-- tempo: 155\\n-- signature: 4/4\\n-- parts: normal, bridge\\n[\\ntype: template;\\nname: drums.jazzSwing.bridge;\\ninstrument: drumsBrushes; \\n{\\n (!ff\\"rcym1\\" r r)4 (\\"rcym1\\" r !p\\"rcym1\\") (!ff\\"rcym1\\" r r) (\\"rcym1\\" r !p\\"rcym1\\")\\n}\\n{\\n (r r \\"brtp\\")4 r4 (r r !p\\"brtp\\")4 r4 |\\n (r r !p\\"brtp\\")4 r4 (r r !p\\"brtp\\")4 r4 |\\n (r r !p\\"brtp\\")4 r4 (r r !p\\"brtp\\")4 r4 |\\n (r r !p\\"brtp\\")4 (r !pp\\"brtp\\"4 r) (r r !p\\"brtp\\")4 r4 |\\n}\\n{\\n \\\\pp\\n \\"bd2\\"4 (r r \\"bd2\\")4 r2 |\\n}\\n]\\n\\n[\\ntype: template;\\nname: drums.jazzSwing.normal;\\ninstrument: drumsBrushes; \\n{\\n \\\\pp\\n (\\"brtp\\" !pppp\\"brsw\\" r)4 (!ppp\\"brsp\\" r \\"brtp\\") (\\"brtp\\" !pppp\\"brsw\\" r) (!pp\\"brsp\\" r !p\\"brtp\\") \\n}\\n{\\n \\\\p\\n r4 \\"ht\\" r &\\n}\\n{\\n !pp\\"bd2\\"1 |\\n}\\n]"}, {"path": "templates/drums.purdie.template", "data": "[\\ntype: template;\\nname: drums.purdie.normal;\\ninstrument: drums; \\n{\\n \\\\p\\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t |\\n \\\\p\\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t |\\n \\\\p\\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t |\\n \\\\p\\"ho\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t |\\n\\n \\\\p\\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t |\\n \\\\p\\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t |\\n \\\\p\\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t r8t !pp\\"ho\\"8t !pp\\"ht\\"8t |\\n \\\\p\\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t |\\n\\n \\\\p\\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t |\\n \\\\p\\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t |\\n \\\\p\\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t |\\n \\\\f\\"ho\\"8t \\"ht\\"8t \\"bd\\"8t \\\\f\\"ho\\"8t \\"ht\\"8t r8t \\"ht\\"8t r8t !pp\\"ht\\"8t \\"ht\\"8t r8t !pp\\"ht\\"8t |\\n}\\n{\\n r8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t \\\\ff\\"sn\\"8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t |\\n r8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t \\\\ff\\"sn\\"8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t | \\n r8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t \\\\ff\\"sn\\"8t !pppp\\"sng\\"8t r8t r8t !ppp\\"sn\\"8t !pp\\"sn\\"8t |\\n r8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t \\\\ff\\"sn\\"8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t |\\n\\n r8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t \\\\ff\\"sn\\"8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t |\\n r8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t \\\\ff\\"sn\\"8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t | \\n r8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t \\\\ff\\"sn\\"8t !pppp\\"sng\\"8t r8t r4t r8t | \\n r8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t \\\\ff\\"sn\\"8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t |\\n\\n r8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t \\\\ff\\"sn\\"8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t |\\n r8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t \\\\ff\\"sn\\"8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t | \\n r8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t \\\\ff\\"sn\\"8t !pppp\\"sng\\"8t r8t r8t !ppp\\"sn\\"8t !pp\\"sn\\"8t |\\n r8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t \\\\ff\\"sn\\"8t !pppp\\"sng\\"8t r8t r8t !pppp\\"sng\\"8t r8t | \\n}\\n{\\n \\"bd\\"4t r8t r4t \\"bd\\"8t r4t r8t \\"bd\\"4t r8t |\\n}\\n]"}, {"path": "templates/drums.reggae.template", "data": "using \\"lua/mods/swing.lua\\";\\n\\n\\n[\\ntype: template;\\nname: drums.reggae.normal;\\ninstrument: drums; \\n{\\n\\n}\\n{\\n /do: swing _grid=8 _offset =50/\\n !f\\"ht\\"4 &8 !p& \\"ht\\"4 &8 !p&|\\n !f\\"ht\\"4 \\"ht\\"8t & & \\"ht\\"4 &8 !p&|\\n !f\\"ht\\"4 !pp\\"ho1\\"4 \\"ht\\"4 &8 !p&|\\n}\\n{\\n r r \\"bd\\"4 r |\\n r r \\"sn\\"4 r |\\n}\\n]\\n\\n--\\n\\n[\\ntype: template;\\nname: drums.reggae.fill1;\\ninstrument: drums; \\n{\\n\\n}\\n{\\n /do: swing _grid=8 _offset =50/\\n !f\\"ht\\"4 !p\\"ho2\\"4 r2 |\\n}\\n{\\n /do: swing _grid=8 _offset =50/\\n r \\"hto1\\"64->\\"hto1\\"4. \\"mto1\\"8 \\"mto1\\"8t r \\"mto1\\" |\\n}\\n]\\n\\n[\\ntype: template;\\nname: drums.reggae.fill2;\\ninstrument: drums; \\n{\\n\\n}\\n{\\n /do: swing _grid=8 _offset =50/\\n !f\\"ht\\"4 \\"ht\\"4 r2 |\\n}\\n{\\n /do: swing _grid=16 _offset =50/\\n !f\\"tim1\\"32->!p\\"tim2\\"8t & & \\"hto1\\"4 r2 |\\n}\\n]\\n"}, {"path": "templates/drums.soca.template", "data": "[\\ntype: template;\\nname: drums.soca.normal;\\ninstrument: drums;\\n{\\n \\"ago1\\"16 & \\"ago2\\" & \\"ago1\\" & \\"ago2\\" & \\"ago1\\"16 & \\"ago2\\" & \\"ago1\\" & \\"ago2\\" & |\\n}\\n{\\n \\"cwb\\"8 & &16 & r \\"cwb\\" r16 \\"cwb\\" r \\"cwb\\" \\"cwb\\" r & r | \\n}\\n{\\n \\\\p\\n \\"ht\\"16 & \\"ho\\"8 \\"ht\\"16 & \\"ho\\"8 \\"ht\\"16 & \\"ho\\"8 \\"ht\\"16 & \\"ho\\"8 |\\n}\\n{\\n \\\\ffff\\n r8. \\"sn\\"16 r8 \\"sn\\" r8. \\"sn\\"16 r8 \\"sn\\" |\\n}\\n{\\n \\"bd\\"4 \\"bd\\" \\"bd\\" \\"bd\\" |\\n}\\n]\\n\\n[\\ntype: template;\\nname: drums.soca.bridge;\\ninstrument: drums;\\n{\\n \\"ago1\\"16 & \\"ago2\\" & \\"ago1\\" & \\"ago2\\" & \\"ago1\\"16 & \\"ago2\\" & \\"ago1\\" & \\"ago2\\" & |\\n}\\n{\\n \\"cwb\\"8 & &16 & r \\"cwb\\" r16 \\"cwb\\" r \\"cwb\\" \\"cwb\\" r & r | \\n}\\n{\\n \\\\fff\\n \\"mtr\\"16 & \\"otr\\"8 \\"mtr\\"16 & \\"otr\\"8 \\"mtr\\"16 & \\"otr\\"8 \\"mtr\\"16 & \\"otr\\"8 |\\n}\\n{\\n \\\\p\\n !ff\\"spl\\"16 \\"ht\\" \\"ho\\"8 \\"ht\\"16 & \\"ho\\"8 \\"ht\\"16 & \\"ho\\"8 \\"ht\\"16 & \\"ho\\"8 |\\n \\"ht\\"16 & \\"ho\\"8 \\"ht\\"16 & \\"ho\\"8 \\"ht\\"16 & \\"ho\\"8 \\"ht\\"16 & \\"ho\\"8 |\\n}\\n{\\n \\\\f\\n r4 r16 \\"bo1\\" \\"bo2\\" & r4 r16 \\"bo1\\" \\"bo2\\" & |\\n}\\n{\\n \\\\pp\\n r4 r16 \\"cla\\" r8 \\"cla\\" r16 \\"cla\\"16 r4 |\\n}\\n{\\n \\\\fffff\\n r8. \\"sn\\"16 r8 \\"sn\\" r8. \\"sn\\"16 r8 \\"sn\\" |\\n r8. \\"sn\\"16 r8 \\"sn\\" r4 r16 !fff\\"sn\\" !ffff& !fffff& |\\n}\\n{\\n \\"bd\\"4 \\"bd\\" \\"bd\\" \\"bd\\" |\\n}\\n]"}, {"path": "templates/ennio.template", "data": "[\\ntype: template;\\nname: ennio.normal;\\ninstrument: piano; \\n{\\n !ffffI,,4 <II, III, IV, V, VI, VII,> <II, III, IV, V, VI, VII,> !fffV,,, |\\n}\\n] \\n"}, {"path": "templates/guitar.bossanova.template", "data": "[\\ntype: template;\\nname: guitar.bossanova.normal;\\ninstrument: guitar; \\n{\\n /voicingStrategy: simpleGuitar/\\n \\\\f\\n <I II III IV V VI VII>4 <I II III IV V VI VII>4 r8 <I II III IV V VI VII>8 r8 <I II III IV V VI VII>8 |\\n r8 <I II III IV V VI VII>8 r8 <I II III IV V VI VII>8 r4 <I II III IV V VI VII>4 |\\n <I II III IV V VI VII>4 <I II III IV V VI VII>4 r8 <I II III IV V VI VII>8 r8 <I II III IV V VI VII>8 |\\n r4 r8 <I II III IV V VI VII>8 r8 <I II III IV V VI VII>4. |\\n} \\n] "}, {"path": "templates/guitar.country.template", "data": "using \\"lua/voicings/guitar.lua\\";\\n\\n[\\ntype: template;\\nname: guitar.country.normal;\\ninstrument: guitar; \\n{\\n /voicingStrategy: guitar _range=mezzosoprano/\\n \\\\f\\n <I II III IV V VI VII>8 <I II III IV V VI VII>8 r8 \\n <I II III IV V VI VII>4 <I II III IV V VI VII>8 <I II III IV V VI VII>8 <I II III IV V VI VII>8 |\\n} \\n]\\n\\n[\\ntype: template;\\nname: guitar.country.ende;\\ninstrument: guitar; \\n{\\n <I II III IV V VI VII>1 |\\n} \\n] \\n"}, {"path": "templates/rhythm.bossanova.template", "data": "[\\ntype: template;\\nname: rhythm.bossanova.normal;\\ninstrument: rhythm; \\n{\\n \\\\f\\n <I II III IV V VI VII>4 <I II III IV V VI VII>4 r8 <I II III IV V VI VII>8 r8 <I II III IV V VI VII>8 |\\n r8 <I II III IV V VI VII>8 r8 <I II III IV V VI VII>8 r4 <I II III IV V VI VII>4 |\\n <I II III IV V VI VII>4 <I II III IV V VI VII>4 r8 <I II III IV V VI VII>8 r8 <I II III IV V VI VII>8 |\\n r4 r8 <I II III IV V VI VII>8 r8 <I II III IV V VI VII>4. |\\n} \\n] "}, {"path": "templates/rhythm.country.template", "data": "using \\"lua/voicings/guitar.lua\\";\\n\\n[\\ntype: template;\\nname: rhythm.country.normal;\\ninstrument: rhythm; \\n{\\n \\\\f\\n <I II III IV V VI VII>8 <I II III IV V VI VII>8 r8 \\n <I II III IV V VI VII>4 <I II III IV V VI VII>8 <I II III IV V VI VII>8 <I II III IV V VI VII>8 |\\n} \\n]\\n\\n[\\ntype: template;\\nname: rhythm.country.ende;\\ninstrument: rhythm; \\n{\\n /doOnce: arpeggio/\\n <I II III IV V VI VII>4~ <I II III IV V VI VII>2. |\\n} \\n] \\n"}, {"path": "templates/rhythm.jazzSwing.template", "data": "-- tempo: 155\\n-- signature: 4/4\\n-- parts: normal\\n[\\ntype: template;\\nname: rhythm.jazzSwing.normal;\\ninstrument: rhythm2; \\n{\\n \\\\f\\n <I,, V, VII, I III>1~ | &4 (r r &) r2 |\\n\\n (<V, VII, I III> r r)4 r <V, VII, I III>4 r |\\n \\n (<V, VII, I III> r I,,)4 r <V, VII, I III>4 r |\\n\\n <I,, V, VII, I III>1~ | &4 (r r &) r2 |\\n\\n (<V, VII, I III> r r)4 r <V, VII, I III>4 r |\\n\\n <V, VII, I III> r I,,4 (I,, r <V, VII, I III>~) (<V, VII, I III> r I,,) |\\n}\\n]\\n"}, {"path": "templates/rhythm.reggae.template", "data": "using \\"lua/mods/swing.lua\\";\\nusing \\"lua/mods/staccato.lua\\";\\n\\n[\\ntype: template;\\nname: rhythm.reggae.normal;\\ninstrument: rhythm;\\n{\\n \\\\f\\n /do: swing _grid=8 _offset =40/\\n r4 /modOnce: staccato _amount=100/ <I II III IV V VI VII>8 /modOnce: staccato _amount=40/ <I II III IV V VI VII>8 \\n r4 /modOnce: staccato _amount=100/ <I II III IV V VI VII>8 /modOnce: staccato _amount=40/ <I II III IV V VI VII>8 \\n |\\n\\n}\\n]"}]'),d=require("lodash"),I=function(){function n(e){a(this,n),this.module=e,this.blacklist=["/dev","/home","/proc","/tmp"]}return o(n,[{key:"resolve",value:function(n,e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.replace("./",n));case 1:case"end":return t.stop()}},t)}))}},{key:"ls",value:function(n){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,a,r,o,i,s;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.module.FS,a=t.analyzePath(n,!1),a.exists&&a.object&&a.object.isFolder){e.next=5;break}return e.abrupt("return",[]);case 5:r=[],o=a.object.contents,e.t0=regeneratorRuntime.keys(o);case 8:if((e.t1=e.t0()).done){e.next=18;break}if(i=e.t1.value,s=o[i],!this.blacklist.includes("".concat(a.parentPath).concat(i))){e.next=13;break}return e.abrupt("continue",8);case 13:if("_"!==i[0]&&"."!==i[0]){e.next=15;break}return e.abrupt("continue",8);case 15:r.push({name:i,isDirectory:s.isFolder}),e.next=8;break;case 18:return e.abrupt("return",r);case 19:case"end":return e.stop()}},e,this)}))}},{key:"getParentPath",value:function(n){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,a;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.module.FS,a=t.analyzePath(n,!1),e.abrupt("return",a.parentPath);case 3:case"end":return e.stop()}},e,this)}))}}]),n}(),p=function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";a(this,n),this.errorMessage=e};exports.CompilerError=p;var u=function(){function e(){var n=this;a(this,e),this.cwdFiles=[],this.module=s().then(function(e){return i(n,void 0,void 0,regeneratorRuntime.mark(function n(){return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.init(e);case 2:return n.abrupt("return",e);case 3:case"end":return n.stop()}},n,this)}))})}return o(e,[{key:"init",value:function(n){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.prepareModule(n),e.next=3,this.prepareFileSystem(n);case 3:case"end":return e.stop()}},e,this)}))}},{key:"getFileSystemInspector",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function n(){return regeneratorRuntime.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.t0=I,n.next=3,this.module;case 3:return n.t1=n.sent,n.abrupt("return",new n.t0(n.t1));case 5:case"end":return n.stop()}},n,this)}))}},{key:"prepareModule",value:function(n){this.createCompileResult=n.cwrap("create_compile_result","number",["string","number"])}},{key:"mkdir_p",value:function(n,e){for(var t=n.split("/"),a=[],r=0;r<t.length&&r!==t.length-1;++r){var o=t[r];a.push(o);var i=a.join("/");e.FS.analyzePath(i,!1).exists||e.FS.mkdir(i)}}},{key:"prepareFileSystem",value:function(e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){var a,r,o,i,s;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:a=d.cloneDeep(c),r=e.FS,o=n(a);try{for(o.s();!(i=o.n()).done;){s=i.value;try{this.mkdir_p(s.path,e),r.writeFile(s.path,s.data)}catch(l){console.error(l)}}}catch(I){o.e(I)}finally{o.f()}case 4:case"end":return t.stop()}},t,this)}))}},{key:"writeFileToFS",value:function(n,e){return i(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.module;case 2:t.sent.FS.writeFile(n,e),this.cwdFiles.push(n);case 5:case"end":return t.stop()}},t,this)}))}},{key:"removeFileFromFS",value:function(n){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(l.analyzePath(n,!1).exists){e.next=3;break}throw new Error('file "'.concat(n,'" does not exist.'));case 3:l.unlink(n);case 4:case"end":return e.stop()}},e)}))}},{key:"cleanCWD",value:function(){return i(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,a,r,o;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.module;case 2:t=e.sent.FS,a=n(this.cwdFiles);try{for(a.s();!(r=a.n()).done;)o=r.value,t.analyzePath(o,!1).exists&&t.unlink(o)}catch(i){a.e(i)}finally{a.f()}this.cwdFiles.splice(0,this.cwdFiles.length);case 6:case"end":return e.stop()}},e,this)}))}},{key:"compile",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return i(this,void 0,void 0,regeneratorRuntime.mark(function a(){var r,o,i,s,l,c,d,I;return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,this.cleanCWD();case 2:if(e&&0!==e.length){a.next=4;break}throw new p("no content to compile");case 4:return a.next=6,this.module;case 6:r=a.sent,o=0,i=null,s=n(e),a.prev=10,s.s();case 12:if((l=s.n()).done){a.next=21;break}if((c=l.value).path&&c.path.trim()){a.next=16;break}throw new p("sheet file has no path");case 16:return a.next=18,this.writeFileToFS(c.path,c.data);case 18:c.path.trim().endsWith(".sheet")&&(i=c);case 19:a.next=12;break;case 21:a.next=26;break;case 23:a.prev=23,a.t0=a.catch(10),s.e(a.t0);case 26:return a.prev=26,s.f(),a.finish(26);case 29:if(i){a.next=31;break}throw new p("missing main sheet file (.sheet)");case 31:if(o=this.createCompileResult(i.path,t),d=r.UTF8ToString(o),r._free(o),!(I=JSON.parse(d)).errorMessage){a.next=37;break}throw{error:I};case 37:return a.abrupt("return",I);case 38:case"end":return a.stop()}},a,this,[[10,23,26,29]])}))}}]),e}();exports.WerckmeisterCompiler=u;
|
|
493
493
|
},{"@werckmeister/compilerjs/werckmeister":"ouOZ","fs":"rDCW","lodash":"B1iE"}],"X3ym":[function(require,module,exports) {
|
|
494
494
|
var define;
|