(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{1068:function(e,t,n){"use strict";n.r(t),n.d(t,"Async",function(){return W}),n.d(t,"AsyncCreatable",function(){return X}),n.d(t,"Creatable",function(){return V}),n.d(t,"Value",function(){return x}),n.d(t,"Option",function(){return A}),n.d(t,"defaultMenuRenderer",function(){return g}),n.d(t,"defaultArrowRenderer",function(){return l}),n.d(t,"defaultClearRenderer",function(){return u}),n.d(t,"defaultFilterOptions",function(){return m});var r=n(929),d=n.n(r),i=n(167),v=n.n(i),o=n(0),a=n.n(o),s=n(1),E=n.n(s),h=n(8),l=function(e){var t=e.onMouseDown;return E.a.createElement("span",{className:"Select-arrow",onMouseDown:t})};l.propTypes={onMouseDown:a.a.func};var u=function(){return E.a.createElement("span",{className:"Select-clear",dangerouslySetInnerHTML:{__html:"×"}})},c=[{base:"A",letters:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{base:"AA",letters:/[\uA732]/g},{base:"AE",letters:/[\u00C6\u01FC\u01E2]/g},{base:"AO",letters:/[\uA734]/g},{base:"AU",letters:/[\uA736]/g},{base:"AV",letters:/[\uA738\uA73A]/g},{base:"AY",letters:/[\uA73C]/g},{base:"B",letters:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},{base:"C",letters:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{base:"D",letters:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},{base:"DZ",letters:/[\u01F1\u01C4]/g},{base:"Dz",letters:/[\u01F2\u01C5]/g},{base:"E",letters:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{base:"F",letters:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},{base:"G",letters:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},{base:"H",letters:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},{base:"I",letters:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{base:"J",letters:/[\u004A\u24BF\uFF2A\u0134\u0248]/g},{base:"K",letters:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},{base:"L",letters:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},{base:"LJ",letters:/[\u01C7]/g},{base:"Lj",letters:/[\u01C8]/g},{base:"M",letters:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},{base:"N",letters:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},{base:"NJ",letters:/[\u01CA]/g},{base:"Nj",letters:/[\u01CB]/g},{base:"O",letters:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{base:"OI",letters:/[\u01A2]/g},{base:"OO",letters:/[\uA74E]/g},{base:"OU",letters:/[\u0222]/g},{base:"P",letters:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},{base:"Q",letters:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},{base:"R",letters:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},{base:"S",letters:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},{base:"T",letters:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},{base:"TZ",letters:/[\uA728]/g},{base:"U",letters:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{base:"V",letters:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},{base:"VY",letters:/[\uA760]/g},{base:"W",letters:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},{base:"X",letters:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},{base:"Y",letters:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},{base:"Z",letters:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},{base:"a",letters:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[\u01F3\u01C6]/g},{base:"e",letters:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\uA74F]/g},{base:"p",letters:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"tz",letters:/[\uA729]/g},{base:"u",letters:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}],p=function(e){for(var t=0;td.bottom?u.scrollTop=l.offsetTop+l.clientHeight-u.offsetHeight:c.topt.offsetHeight&&t.scrollHeight-t.offsetHeight-t.scrollTop<=0&&this.props.onMenuScrollToBottom()}}},{key:"getOptionLabel",value:function(e){return e[this.props.labelKey]}},{key:"getValueArray",value:function(e){var t=1r&&this.focusOption(n[r+1])}},{key:"popValue",value:function(){var e=this.getValueArray(this.props.value);e.length&&!1!==e[e.length-1].clearableValue&&this.setValue(this.props.multi?e.slice(0,e.length-1):null)}},{key:"removeValue",value:function(t){var n=this,e=this.getValueArray(this.props.value);this.setValue(e.filter(function(e){return e[n.props.valueKey]!==t[n.props.valueKey]})),this.focus()}},{key:"clearValue",value:function(e){e&&"mousedown"===e.type&&0!==e.button||(e.preventDefault(),this.setValue(this.getResetValue()),this.setState({inputValue:this.handleInputValueChange(""),isOpen:!1},this.focus),this._focusAfterClear=!0)}},{key:"getResetValue",value:function(){return void 0!==this.props.resetValue?this.props.resetValue:this.props.multi?[]:null}},{key:"focusOption",value:function(e){this.setState({focusedOption:e})}},{key:"focusNextOption",value:function(){this.focusAdjacentOption("next")}},{key:"focusPreviousOption",value:function(){this.focusAdjacentOption("previous")}},{key:"focusPageUpOption",value:function(){this.focusAdjacentOption("page_up")}},{key:"focusPageDownOption",value:function(){this.focusAdjacentOption("page_down")}},{key:"focusStartOption",value:function(){this.focusAdjacentOption("start")}},{key:"focusEndOption",value:function(){this.focusAdjacentOption("end")}},{key:"focusAdjacentOption",value:function(e){var t=this._visibleOptions.map(function(e,t){return{option:e,index:t}}).filter(function(e){return!e.option.disabled});if(this._scrollToFocusedOptionOnUpdate=!0,!this.state.isOpen){var n={focusedOption:this._focusedOption||(t.length?t["next"===e?0:t.length-1].option:null),isOpen:!0};return this.props.onSelectResetsInput&&(n.inputValue=""),void this.setState(n)}if(t.length){for(var r=-1,i=0;it.length-1?t.length-1:a}-1===r&&(r=0),this.setState({focusedIndex:t[r].index,focusedOption:t[r].option})}}},{key:"getFocusedOption",value:function(){return this._focusedOption}},{key:"selectFocusedOption",value:function(){if(this._focusedOption)return this.selectValue(this._focusedOption)}},{key:"renderLoading",value:function(){if(this.props.isLoading)return E.a.createElement("span",{className:"Select-loading-zone","aria-hidden":"true"},E.a.createElement("span",{className:"Select-loading"}))}},{key:"renderValue",value:function(e,t){var n=this,r=this.props.valueRenderer||this.getOptionLabel,i=this.props.valueComponent;if(!e.length)return function(e,t,n){var r=e.inputValue,i=e.isPseudoFocused,o=e.isFocused,a=t.onSelectResetsInput;return!r||!a&&!n&&!i&&!o}(this.state,this.props,t)?E.a.createElement("div",{className:"Select-placeholder"},this.props.placeholder):null;var o=this.props.onValueClick?this.handleValueClick:null;return this.props.multi?e.map(function(e,t){return E.a.createElement(i,{disabled:n.props.disabled||!1===e.clearableValue,id:n._instancePrefix+"-value-"+t,instancePrefix:n._instancePrefix,key:"value-"+t+"-"+e[n.props.valueKey],onClick:o,onRemove:n.removeValue,placeholder:n.props.placeholder,value:e},r(e,t),E.a.createElement("span",{className:"Select-aria-only"}," "))}):function(e,t){var n=e.inputValue,r=e.isPseudoFocused,i=e.isFocused,o=t.onSelectResetsInput;return!n||!o&&!(!i&&r||i&&!r)}(this.state,this.props)?(t&&(o=null),E.a.createElement(i,{disabled:this.props.disabled,id:this._instancePrefix+"-value-item",instancePrefix:this._instancePrefix,onClick:o,placeholder:this.props.placeholder,value:e[0]},r(e[0]))):void 0}},{key:"renderInput",value:function(e,t){var n,r=this,i=v()("Select-input",this.props.inputProps.className),o=this.state.isOpen,a=v()((S(n={},this._instancePrefix+"-list",o),S(n,this._instancePrefix+"-backspace-remove-message",this.props.multi&&!this.props.disabled&&this.state.isFocused&&!this.state.inputValue),n)),s=this.state.inputValue;!s||this.props.onSelectResetsInput||this.state.isFocused||(s="");var l=C({},this.props.inputProps,{"aria-activedescendant":o?this._instancePrefix+"-option-"+t:this._instancePrefix+"-value","aria-describedby":this.props["aria-describedby"],"aria-expanded":""+o,"aria-haspopup":""+o,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-owns":a,className:i,onBlur:this.handleInputBlur,onChange:this.handleInputChange,onFocus:this.handleInputFocus,ref:function(e){return r.input=e},role:"combobox",required:this.state.required,tabIndex:this.props.tabIndex,value:s});if(this.props.inputRenderer)return this.props.inputRenderer(l);if(!this.props.disabled&&this.props.searchable)return this.props.autosize?E.a.createElement(d.a,C({id:this.props.id},l,{minWidth:"5"})):E.a.createElement("div",{className:i,key:"input-wrap",style:{display:"inline-block"}},E.a.createElement("input",C({id:this.props.id},l)));var u=T(this.props.inputProps,[]),c=v()(S({},this._instancePrefix+"-list",o));return E.a.createElement("div",C({},u,{"aria-expanded":o,"aria-owns":c,"aria-activedescendant":o?this._instancePrefix+"-option-"+t:this._instancePrefix+"-value","aria-disabled":""+this.props.disabled,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],className:i,onBlur:this.handleInputBlur,onFocus:this.handleInputFocus,ref:function(e){return r.input=e},role:"combobox",style:{border:0,width:1,display:"inline-block"},tabIndex:this.props.tabIndex||0}))}},{key:"renderClear",value:function(){var e=this.getValueArray(this.props.value);if(this.props.clearable&&e.length&&!this.props.disabled&&!this.props.isLoading){var t=this.props.multi?this.props.clearAllText:this.props.clearValueText,n=this.props.clearRenderer();return E.a.createElement("span",{"aria-label":t,className:"Select-clear-zone",onMouseDown:this.clearValue,onTouchEnd:this.handleTouchEndClearValue,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,title:t},n)}}},{key:"renderArrow",value:function(){if(this.props.arrowRenderer){var e=this.handleMouseDownOnArrow,t=this.state.isOpen,n=this.props.arrowRenderer({onMouseDown:e,isOpen:t});return n?E.a.createElement("span",{className:"Select-arrow-zone",onMouseDown:e},n):null}}},{key:"filterOptions",value:function(e){var t=this.state.inputValue,n=this.props.options||[];if(this.props.filterOptions){var r="function"==typeof this.props.filterOptions?this.props.filterOptions:m;return r(n,t,e,{filterOption:this.props.filterOption,ignoreAccents:this.props.ignoreAccents,ignoreCase:this.props.ignoreCase,labelKey:this.props.labelKey,matchPos:this.props.matchPos,matchProp:this.props.matchProp,trimFilter:this.props.trimFilter,valueKey:this.props.valueKey})}return n}},{key:"onOptionRef",value:function(e,t){t&&(this.focused=e)}},{key:"renderMenu",value:function(e,t,n){return e&&e.length?this.props.menuRenderer({focusedOption:n,focusOption:this.focusOption,inputValue:this.state.inputValue,instancePrefix:this._instancePrefix,labelKey:this.props.labelKey,onFocus:this.focusOption,onOptionRef:this.onOptionRef,onSelect:this.selectValue,optionClassName:this.props.optionClassName,optionComponent:this.props.optionComponent,optionRenderer:this.props.optionRenderer||this.getOptionLabel,options:e,removeValue:this.removeValue,selectValue:this.selectValue,valueArray:t,valueKey:this.props.valueKey}):this.props.noResultsText?E.a.createElement("div",{className:"Select-noresults"},this.props.noResultsText):null}},{key:"renderHiddenField",value:function(e){var n=this;if(this.props.name){if(this.props.joinValues){var t=e.map(function(e){return P(e[n.props.valueKey])}).join(this.props.delimiter);return E.a.createElement("input",{disabled:this.props.disabled,name:this.props.name,ref:function(e){return n.value=e},type:"hidden",value:t})}return e.map(function(e,t){return E.a.createElement("input",{disabled:n.props.disabled,key:"hidden."+t,name:n.props.name,ref:"value"+t,type:"hidden",value:P(e[n.props.valueKey])})})}}},{key:"getFocusableOptionIndex",value:function(e){var t=this._visibleOptions;if(!t.length)return null;var r=this.props.valueKey,i=this.state.focusedOption||e;if(i&&!i.disabled){var o=-1;if(t.some(function(e,t){var n=e[r]===i[r];return n&&(o=t),n}),-1!==o)return o}for(var n=0;n .Select-control {\n background-color: #f9f9f9;\n}\n.Select.is-disabled > .Select-control:hover {\n box-shadow: none;\n}\n.Select.is-open > .Select-control {\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n background: #fff;\n border-color: #b3b3b3 #ccc #d9d9d9;\n}\n.Select.is-open > .Select-control .Select-arrow {\n top: -2px;\n border-color: transparent transparent #999;\n border-width: 0 5px 5px;\n}\n.Select.is-searchable.is-open > .Select-control {\n cursor: text;\n}\n.Select.is-searchable.is-focused:not(.is-open) > .Select-control {\n cursor: text;\n}\n.Select.is-focused > .Select-control {\n background: #fff;\n}\n.Select.is-focused:not(.is-open) > .Select-control {\n border-color: #007eff;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 0 3px rgba(0, 126, 255, 0.1);\n background: #fff;\n}\n.Select.has-value.is-clearable.Select--single > .Select-control .Select-value {\n padding-right: 42px;\n}\n.Select.has-value.Select--single > .Select-control .Select-value .Select-value-label,\n.Select.has-value.is-pseudo-focused.Select--single > .Select-control .Select-value .Select-value-label {\n color: #333;\n}\n.Select.has-value.Select--single > .Select-control .Select-value a.Select-value-label,\n.Select.has-value.is-pseudo-focused.Select--single > .Select-control .Select-value a.Select-value-label {\n cursor: pointer;\n text-decoration: none;\n}\n.Select.has-value.Select--single > .Select-control .Select-value a.Select-value-label:hover,\n.Select.has-value.is-pseudo-focused.Select--single > .Select-control .Select-value a.Select-value-label:hover,\n.Select.has-value.Select--single > .Select-control .Select-value a.Select-value-label:focus,\n.Select.has-value.is-pseudo-focused.Select--single > .Select-control .Select-value a.Select-value-label:focus {\n color: #007eff;\n outline: none;\n text-decoration: underline;\n}\n.Select.has-value.Select--single > .Select-control .Select-value a.Select-value-label:focus,\n.Select.has-value.is-pseudo-focused.Select--single > .Select-control .Select-value a.Select-value-label:focus {\n background: #fff;\n}\n.Select.has-value.is-pseudo-focused .Select-input {\n opacity: 0;\n}\n.Select.is-open .Select-arrow,\n.Select .Select-arrow-zone:hover > .Select-arrow {\n border-top-color: #666;\n}\n.Select.Select--rtl {\n direction: rtl;\n text-align: right;\n}\n.Select-control {\n background-color: #fff;\n border-color: #d9d9d9 #ccc #b3b3b3;\n border-radius: 4px;\n border: 1px solid #ccc;\n color: #333;\n cursor: default;\n display: table;\n border-spacing: 0;\n border-collapse: separate;\n height: 36px;\n outline: none;\n overflow: hidden;\n position: relative;\n width: 100%;\n}\n.Select-control:hover {\n box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);\n}\n.Select-control .Select-input:focus {\n outline: none;\n background: #fff;\n}\n.Select-placeholder,\n.Select--single > .Select-control .Select-value {\n bottom: 0;\n color: #aaa;\n left: 0;\n line-height: 34px;\n padding-left: 10px;\n padding-right: 10px;\n position: absolute;\n right: 0;\n top: 0;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.Select-input {\n height: 34px;\n padding-left: 10px;\n padding-right: 10px;\n vertical-align: middle;\n}\n.Select-input > input {\n width: 100%;\n background: none transparent;\n border: 0 none;\n box-shadow: none;\n cursor: default;\n display: inline-block;\n font-family: inherit;\n font-size: inherit;\n margin: 0;\n outline: none;\n line-height: 17px;\n /* For IE 8 compatibility */\n padding: 8px 0 12px;\n /* For IE 8 compatibility */\n -webkit-appearance: none;\n}\n.is-focused .Select-input > input {\n cursor: text;\n}\n.has-value.is-pseudo-focused .Select-input {\n opacity: 0;\n}\n.Select-control:not(.is-searchable) > .Select-input {\n outline: none;\n}\n.Select-loading-zone {\n cursor: pointer;\n display: table-cell;\n position: relative;\n text-align: center;\n vertical-align: middle;\n width: 16px;\n}\n.Select-loading {\n -webkit-animation: Select-animation-spin 400ms infinite linear;\n -o-animation: Select-animation-spin 400ms infinite linear;\n animation: Select-animation-spin 400ms infinite linear;\n width: 16px;\n height: 16px;\n box-sizing: border-box;\n border-radius: 50%;\n border: 2px solid #ccc;\n border-right-color: #333;\n display: inline-block;\n position: relative;\n vertical-align: middle;\n}\n.Select-clear-zone {\n -webkit-animation: Select-animation-fadeIn 200ms;\n -o-animation: Select-animation-fadeIn 200ms;\n animation: Select-animation-fadeIn 200ms;\n color: #999;\n cursor: pointer;\n display: table-cell;\n position: relative;\n text-align: center;\n vertical-align: middle;\n width: 17px;\n}\n.Select-clear-zone:hover {\n color: #D0021B;\n}\n.Select-clear {\n display: inline-block;\n font-size: 18px;\n line-height: 1;\n}\n.Select--multi .Select-clear-zone {\n width: 17px;\n}\n.Select-arrow-zone {\n cursor: pointer;\n display: table-cell;\n position: relative;\n text-align: center;\n vertical-align: middle;\n width: 25px;\n padding-right: 5px;\n}\n.Select--rtl .Select-arrow-zone {\n padding-right: 0;\n padding-left: 5px;\n}\n.Select-arrow {\n border-color: #999 transparent transparent;\n border-style: solid;\n border-width: 5px 5px 2.5px;\n display: inline-block;\n height: 0;\n width: 0;\n position: relative;\n}\n.Select-control > *:last-child {\n padding-right: 5px;\n}\n.Select--multi .Select-multi-value-wrapper {\n display: inline-block;\n}\n.Select .Select-aria-only {\n position: absolute;\n display: inline-block;\n height: 1px;\n width: 1px;\n margin: -1px;\n clip: rect(0, 0, 0, 0);\n overflow: hidden;\n float: left;\n}\n@-webkit-keyframes Select-animation-fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n@keyframes Select-animation-fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n.Select-menu-outer {\n border-bottom-right-radius: 4px;\n border-bottom-left-radius: 4px;\n background-color: #fff;\n border: 1px solid #ccc;\n border-top-color: #e6e6e6;\n box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);\n box-sizing: border-box;\n margin-top: -1px;\n max-height: 200px;\n position: absolute;\n left: 0;\n top: 100%;\n width: 100%;\n z-index: 1;\n -webkit-overflow-scrolling: touch;\n}\n.Select-menu {\n max-height: 198px;\n overflow-y: auto;\n}\n.Select-option {\n box-sizing: border-box;\n background-color: #fff;\n color: #666666;\n cursor: pointer;\n display: block;\n padding: 8px 10px;\n}\n.Select-option:last-child {\n border-bottom-right-radius: 4px;\n border-bottom-left-radius: 4px;\n}\n.Select-option.is-selected {\n background-color: #f5faff;\n /* Fallback color for IE 8 */\n background-color: rgba(0, 126, 255, 0.04);\n color: #333;\n}\n.Select-option.is-focused {\n background-color: #ebf5ff;\n /* Fallback color for IE 8 */\n background-color: rgba(0, 126, 255, 0.08);\n color: #333;\n}\n.Select-option.is-disabled {\n color: #cccccc;\n cursor: default;\n}\n.Select-noresults {\n box-sizing: border-box;\n color: #999999;\n cursor: default;\n display: block;\n padding: 8px 10px;\n}\n.Select--multi .Select-input {\n vertical-align: middle;\n margin-left: 10px;\n padding: 0;\n}\n.Select--multi.Select--rtl .Select-input {\n margin-left: 0;\n margin-right: 10px;\n}\n.Select--multi.has-value .Select-input {\n margin-left: 5px;\n}\n.Select--multi .Select-value {\n background-color: #ebf5ff;\n /* Fallback color for IE 8 */\n background-color: rgba(0, 126, 255, 0.08);\n border-radius: 2px;\n border: 1px solid #c2e0ff;\n /* Fallback color for IE 8 */\n border: 1px solid rgba(0, 126, 255, 0.24);\n color: #007eff;\n display: inline-block;\n font-size: 0.9em;\n line-height: 1.4;\n margin-left: 5px;\n margin-top: 5px;\n vertical-align: top;\n}\n.Select--multi .Select-value-icon,\n.Select--multi .Select-value-label {\n display: inline-block;\n vertical-align: middle;\n}\n.Select--multi .Select-value-label {\n border-bottom-right-radius: 2px;\n border-top-right-radius: 2px;\n cursor: default;\n padding: 2px 5px;\n}\n.Select--multi a.Select-value-label {\n color: #007eff;\n cursor: pointer;\n text-decoration: none;\n}\n.Select--multi a.Select-value-label:hover {\n text-decoration: underline;\n}\n.Select--multi .Select-value-icon {\n cursor: pointer;\n border-bottom-left-radius: 2px;\n border-top-left-radius: 2px;\n border-right: 1px solid #c2e0ff;\n /* Fallback color for IE 8 */\n border-right: 1px solid rgba(0, 126, 255, 0.24);\n padding: 1px 5px 3px;\n}\n.Select--multi .Select-value-icon:hover,\n.Select--multi .Select-value-icon:focus {\n background-color: #d8eafd;\n /* Fallback color for IE 8 */\n background-color: rgba(0, 113, 230, 0.08);\n color: #0071e6;\n}\n.Select--multi .Select-value-icon:active {\n background-color: #c2e0ff;\n /* Fallback color for IE 8 */\n background-color: rgba(0, 126, 255, 0.24);\n}\n.Select--multi.Select--rtl .Select-value {\n margin-left: 0;\n margin-right: 5px;\n}\n.Select--multi.Select--rtl .Select-value-icon {\n border-right: none;\n border-left: 1px solid #c2e0ff;\n /* Fallback color for IE 8 */\n border-left: 1px solid rgba(0, 126, 255, 0.24);\n}\n.Select--multi.is-disabled .Select-value {\n background-color: #fcfcfc;\n border: 1px solid #e3e3e3;\n color: #333;\n}\n.Select--multi.is-disabled .Select-value-icon {\n cursor: not-allowed;\n border-right: 1px solid #e3e3e3;\n}\n.Select--multi.is-disabled .Select-value-icon:hover,\n.Select--multi.is-disabled .Select-value-icon:focus,\n.Select--multi.is-disabled .Select-value-icon:active {\n background-color: #fcfcfc;\n}\n@keyframes Select-animation-spin {\n to {\n transform: rotate(1turn);\n }\n}\n@-webkit-keyframes Select-animation-spin {\n to {\n -webkit-transform: rotate(1turn);\n }\n}\n",""])},1429:function(e,t,n){"use strict";function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=d(n(9)),i=c(n(10)),s=c(n(799)),l=d(n(1457)),o=n(333);function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function c(e){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}function d(e){return e&&e.__esModule?e:{default:e}}var p={},f=i.makeEnum("BUTTON","LABEL","TEXT_INPUT","CHECKBOX","DROPDOWN","RADIO_BUTTON","TEXT_AREA","IMAGE","CANVAS","SCREEN","CHART","SLIDER","PHOTO_SELECT"),h={};h[f.BUTTON]=n(3096),h[f.LABEL]=n(3258),h[f.TEXT_INPUT]=n(3259),h[f.CHECKBOX]=n(3260),h[f.DROPDOWN]=n(3261),h[f.RADIO_BUTTON]=n(3263),h[f.TEXT_AREA]=n(3264),h[f.IMAGE]=n(3265),h[f.CANVAS]=n(3266),h[f.SCREEN]=n(3267),h[f.CHART]=n(3269),h[f.SLIDER]=n(3270),h[f.PHOTO_SELECT]=n(3271);var m={ElementType:f,getUnusedElementId:function(e){for(var t=p[e]||1;s.getPrefixedElementById(e+t);)t++;return p[e]=t+1,e+t},resetIds:function(){p={}},createElement:function(e,t,n,r){var i=h[e];if(!i)throw new Error("Unknown elementType: "+e);var o=i.create(r);return r||s.setId(o,this.getUnusedElementId(e.toLowerCase())),e!==f.SCREEN&&(o.style.position="absolute",o.style.left=t+"px",o.style.top=n+"px",o.style.margin="0px"),o},getElementPropertyTab:function(e){return h[e].PropertyTab},getElementEventTab:function(e){return h[e].EventTab},getElementType:function(e,t){switch(e.tagName.toLowerCase()){case"button":return f.BUTTON;case"label":return(0,r.default)(e).hasClass("img-upload")?f.PHOTO_SELECT:f.LABEL;case"select":return f.DROPDOWN;case"div":return(0,r.default)(e).hasClass("screen")?f.SCREEN:(0,r.default)(e).hasClass("chart")?f.CHART:f.TEXT_AREA;case"img":return f.IMAGE;case"canvas":return f.CANVAS;case"input":switch(e.getAttribute("type")){case"checkbox":return f.CHECKBOX;case"radio":return f.RADIO_BUTTON;case"range":return f.SLIDER;default:return f.TEXT_INPUT}}var n="Project contains an element with an unknown type"+"\nType: ".concat(e.tagName)+"\nId: ".concat(e.id)+"\nClass: ".concat(e.className);if(t)return console.warn(n),null;throw new Error(n)},getThemeValues:function(e){var t=this.getElementType(e);return(h[t]||{}).themeValues},getCurrentTheme:function(e){return e&&e.getAttribute("data-theme")||o.themeOptions[o.DEFAULT_THEME_INDEX]},setAllPropertiesToCurrentTheme:function(e,t){var n=this.getCurrentTheme(t),r=this.getThemeValues(e);for(var i in r){var o=r[i][n];l.default.updateProperty(e,i,o)}},onDeserialize:function(e,t,n){var r=this.getElementType(e,n);r&&h[r]&&h[r].onDeserialize&&h[r].onDeserialize(e,t)},getPreChangeData:function(e,t,n){var r=this.getElementType(e);return h[r].beforePropertyChange?h[r].beforePropertyChange(e,t,n):null},typeSpecificPropertyChange:function(e,t,n,r){var i=this.getElementType(e);return!!h[i].onPropertyChange&&h[i].onPropertyChange(e,t,n,r)},typeSpecificPropertyRead:function(e,t){var n=this.getElementType(e);if(h[n].readProperty)return h[n].readProperty(e,t);throw"unknown property type ".concat(t)}};t.default=m,e.exports=t.default},1431:function(e,t,n){"use strict";function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(1)),i=u(n(5)),o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(1488)),s=u(n(1487));function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(){return e.apply(this,arguments)||this}return function(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}(t,e),t.prototype.render=function(){var e=Object.assign({},o.container,o.maxWidth,{color:i.default.charcoal});return r.default.createElement("div",{style:e},s.default.addEventHeader())},t}(r.default.Component);t.default=c,e.exports=t.default},1432:function(e,t,n){"use strict";function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(0)),i=u(n(1)),o=u(n(5)),s=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(1488));function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(e){return e&&e.__esModule?e:{default:e}}var c,d,p,f=function(e){function t(){return e.apply(this,arguments)||this}return function(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}(t,e),t.prototype.render=function(){var e={container:Object.assign({},s.container,s.maxWidth),name:{color:o.default.dark_charcoal,fontWeight:"bold",fontSize:15},desc:{color:o.default.light_gray,fontStyle:"italic"}};return i.default.createElement("div",{style:e.container},i.default.createElement("div",{style:e.name},this.props.name),i.default.createElement("div",{style:e.desc},this.props.desc),i.default.createElement("div",null,i.default.createElement("a",{onClick:this.props.handleInsert,className:"hover-pointer"},"Insert and show code")))},t}(i.default.Component);t.default=f,c=f,d="propTypes",p={name:r.default.string.isRequired,desc:r.default.string.isRequired,handleInsert:r.default.func.isRequired},d in c?Object.defineProperty(c,d,{value:p,enumerable:!0,configurable:!0,writable:!0}):c[d]=p,e.exports=t.default},1433:function(e,t,n){"use strict";t.__esModule=!0,t.PaginationButton=t.Pagination=void 0;var r=o(n(1434)),i=o(n(943));function o(e){return e&&e.__esModule?e:{default:e}}t.Pagination=r.default,t.PaginationButton=i.default},1434:function(e,t,n){"use strict";t.__esModule=!0;var v=Object.assign||function(e){for(var t=1;t>n&1;this.pins[r].value=t,this.emit("digital-read-"+n,t)}.bind(this))}}},MCP23008:{ADDRESSES:{value:[32]},REGISTER:{value:{IODIR:0,GPPU:6,GPIO:9,OLAT:10}},initialize:{value:function(e){var t=d.get(this);t.iodir=[255],t.olat=[255],t.gpio=[255],t.gppu=[0],this.address=e.address||this.ADDRESSES[0],e.address=this.address,this.io.i2cConfig(e),this.io.i2cWrite(this.address,[this.REGISTER.IODIR,t.iodir[this.REGISTER.IODIR]]),Object.assign(this.MODES,this.io.MODES);for(var n=0;n<8;n++)this.pins.push({supportedModes:[this.MODES.INPUT,this.MODES.OUTPUT],mode:0,value:0,report:0,analogChannel:127}),this.pinMode(n,this.MODES.OUTPUT),this.digitalWrite(n,this.LOW);this.name="MCP23008",this.isReady=!0,this.emit("connect"),this.emit("ready")}},normalize:{value:function(e){return e}},pinMode:{value:function(e,t){var n=d.get(this),r=e,i=this.REGISTER.IODIR,o=n.iodir[i];t===this.io.MODES.INPUT?o|=1<>n&1;this.pins[r].value=t,this.emit("digital-read-"+n,t)}.bind(this))}}},PCF8574:{ADDRESSES:{value:[32]},REGISTER:{},initialize:{value:function(e){var t=d.get(this);t.port=0,t.ddr=0,t.pins=0,this.address=e.address||this.ADDRESSES[0],e.address=this.address,this.io.i2cConfig(e),Object.assign(this.MODES,this.io.MODES);for(var n=0;n<8;n++)this.pins.push({supportedModes:[this.MODES.INPUT,this.MODES.OUTPUT],mode:1,value:0,report:0,analogChannel:127}),this.pinMode(n,this.MODES.OUTPUT),this.digitalWrite(n,this.LOW);this.name="PCF8574",this.isReady=!0,this.emit("connect"),this.emit("ready")}},normalize:{value:function(e){return e}},pinMode:{value:function(e,t){var n=d.get(this),r=e,i=n.port,o=n.ddr,a=n.pins;t===this.MODES.INPUT?o&=~(1<>r&1;i.pins=t,this.pins[o].value=n,this.emit("digital-read-"+r,n)}.bind(this))}}},PCF8575:{ADDRESSES:{value:[32]},REGISTER:{},initialize:{value:function(e){var t=d.get(this);t.port=[0,1],t.gpio=[0,0],this.address=e.address||this.ADDRESSES[0],e.address=this.address,this.io.i2cConfig(e),Object.assign(this.MODES,this.io.MODES);for(var n=0;n<16;n++)this.pins.push({supportedModes:[this.MODES.INPUT,this.MODES.OUTPUT],mode:1,value:0,report:0,analogChannel:127}),this.pinMode(n,this.MODES.OUTPUT),this.digitalWrite(n,this.LOW);this.io.i2cWrite(this.address,t.gpio),this.name="PCF8575",this.isReady=!0,this.emit("connect"),this.emit("ready")}},normalize:{value:function(e){return e}},pinMode:{value:function(e,t){var n=e;this.pins[n].mode=t}},digitalWrite:{value:function(e,t){var n,r=d.get(this),i=e;e<8?n=0:(n=1,e-=8),t===this.io.HIGH?r.gpio[n]|=1<>n&1;this.pins[i].value=t,this.emit("digital-read-"+n,t)}.bind(this))}}},PCA9685:{ADDRESSES:{value:[64]},REGISTER:{value:{MODE1:0,PRESCALE:254,BASE:6}},initialize:{value:function(e){var t=d.get(this);t.frequency=.9*o.constrain(e.frequency||1526,24,1526),this.address=e.address||this.ADDRESSES[0],this.pwmRange=e.pwmRange||[0,4095],Object.defineProperties(this,{prescale:{get:function(){return Math.round(25e6/(4096*t.frequency))-1}},frequency:{get:function(){return t.frequency}}}),e.address=this.address,this.io.i2cConfig(e),this.io.i2cWriteReg(this.address,this.REGISTER.MODE1,0),this.io.i2cWriteReg(this.address,this.REGISTER.MODE1,16),this.io.i2cWriteReg(this.address,this.REGISTER.PRESCALE,this.prescale),this.io.i2cWriteReg(this.address,this.REGISTER.MODE1,0),r(5),this.io.i2cWriteReg(this.address,this.REGISTER.MODE1,161),Object.assign(this.MODES,this.io.MODES);for(var n=0;n<16;n++)this.pins.push({supportedModes:[this.MODES.OUTPUT,this.MODES.PWM,this.MODES.SERVO],mode:0,value:0,report:0,analogChannel:127}),this.pinMode(n,this.MODES.OUTPUT),this.digitalWrite(n,this.LOW);this.name="PCA9685",this.isReady=!0,this.emit("connect"),this.emit("ready")}},normalize:{value:function(e){return"Tessel 2"===this.io.name?e-1:e}},pinMode:{value:function(e,t){if(void 0===this.pins[e])throw new RangeError("Invalid PCA9685 pin: "+e);this.pins[e].mode=t}},digitalWrite:{value:function(e,t){this.pwmWrite(e,t?255:0)}},analogWrite:{value:function(e,t){this.pwmWrite(e,t)}},servoWrite:{value:function(e,t){t=o.constrain(t,0,180);var n=a.map(t,0,180,this.pwmRange[0]/4,this.pwmRange[1]/4);this.io.i2cWrite(this.address,[this.REGISTER.BASE+4*e,0,0,n,n>>8])}},pwmWrite:{value:function(e,t){if(void 0===this.pins[e])throw new RangeError("Invalid PCA9685 pin: "+e);t=o.constrain(t,0,255);var n=0,r=this.pwmRange[1]*t/255;0===t&&(n=0,r=4096),255===t&&(n=4096,r=0),this.io.i2cWrite(this.address,[this.REGISTER.BASE+4*e,n,n>>8,r,r>>8]),this.pins[e].value=t}}},PCF8591:{ADDRESSES:{value:[72]},REGISTER:{},initialize:{value:function(e){var t=d.get(this);t.control=69,t.reading=!1,this.address=e.address||this.ADDRESSES[0],e.address=this.address,this.io.i2cConfig(e),Object.assign(this.MODES,this.io.MODES);for(var n=0;n<4;n++)this.pins.push({supportedModes:[this.MODES.ANALOG],mode:1,value:0,report:0,analogChannel:n});this.analogPins.push(0,1,2,3),this.io.i2cWrite(this.address,t.control),this.name="PCF8591",this.isReady=!0,this.emit("connect"),this.emit("ready")}},normalize:{value:function(e){return"string"==typeof e&&"A"===e[0]?+e.slice(1):e}},pinMode:{value:function(e,t){this.pins[e].mode=t}},analogRead:{value:function(e,t){var n=d.get(this),r=e;this.pins[r].report=1,this.on("analog-read-"+e,t),n.reading||(n.reading=!0,this.io.i2cRead(this.address,4,function(e){for(var t,n=0;n<4;n++)t=e[n]<<2,this.pins[n].value=t,this.pins[n].report&&this.emit("analog-read-"+n,t)}.bind(this)))}}},MUXSHIELD2:{initialize:{value:function(){var e=d.get(this);e.select=[2,4,6,7],e.ios=[null,10,11,12],e.io=[null,14,15,16],e.aio=[null,0,1,2],e.outMode=8,e.pinMap={},e.rowReading=[!1,!1,!1],e.rowMode=[null,null,null],e.rowValues=[0,0,0],Object.assign(this.MODES,{INPUT:0,OUTPUT:1,ANALOG:2}),this.io.pinMode(e.select[0],this.MODES.OUTPUT),this.io.pinMode(e.select[1],this.MODES.OUTPUT),this.io.pinMode(e.select[2],this.MODES.OUTPUT),this.io.pinMode(e.select[3],this.MODES.OUTPUT),this.io.pinMode(e.outMode,this.MODES.OUTPUT),this.io.digitalWrite(e.outMode,this.LOW),this.io.pinMode(e.ios[1],this.MODES.OUTPUT),this.io.pinMode(e.ios[2],this.MODES.OUTPUT),this.io.pinMode(e.ios[3],this.MODES.OUTPUT);for(var t=1,n=16,r=0,i=0;i<48;i++){(i&n)===n&&(t++,n*=2,r=0),e.pinMap["IO"+t+"-"+r]=i,this.pins.push({row:t,index:r,supportedModes:[this.MODES.INPUT,this.MODES.OUTPUT,this.MODES.ANALOG],mode:1,value:0,report:0,analogChannel:i}),this.analogPins.push(i),r++}this.name="MUXSHIELD2",this.isReady=!0,this.emit("connect"),this.emit("ready")}},normalize:{value:function(e){return e}},pinMode:{value:function(e,t){var n=d.get(this),r=n.pinMap[e];if(void 0===r)throw new Error("MUXSHIELD2: Invalid Pin number or name: "+e);var i=this.pins[r].row,o=i-1,a=n.rowMode[o];if(a===t)return this;if(null!==a&&a!==t)throw new Error("MUXSHIELD2: Cannot set mixed modes per IO row.");n.rowMode[o]=t;for(var s=0;s<16;s++)this.pins[o+s].mode=t;var l=n.io[i],u=n.ios[i];t===this.MODES.INPUT&&this.io.pinMode(l,this.MODES.INPUT),t===this.MODES.OUTPUT&&(this.io.pinMode(l,this.MODES.OUTPUT),this.io.digitalWrite(u,this.HIGH))}},digitalWrite:{value:function(e,t){var n=d.get(this),r=n.pinMap[e];if(void 0===r)throw new Error("MUXSHIELD2: Invalid Pin number or name: "+e);var i=this.pins[r].row,o=i-1,a=n.rowValues[o],s=r-16*(i-1);t?a|=1<>c&1),this.io.digitalWrite(l,this.HIGH);this.io.digitalWrite(n.select[3],this.HIGH),this.io.digitalWrite(n.outMode,this.LOW),this.pins[r].value=t,n.rowValues[o]=a}},digitalRead:{value:function(e,t){this.ioRead("digital",e,t)}},analogRead:{value:function(e,t){this.ioRead("analog",e,t)}},ioRead:{value:function(r,e,t){var n=d.get(this),i=n.pinMap[e];if(void 0===i)throw new Error("MUXSHIELD2: Invalid Pin number or name: "+e);this.on(r+"-read-"+i,t);var o="analog"===r,a=this.pins[i].row-1,s=i-16*a;this.pins[i].report=1,this.pins[i].channel=s,this.pins[i].ioPin=o?a:14+a;var l=function(){for(var e=l.lastPinIndex+1;e>1),this.io.digitalWrite(t.select[2],(7&e)>>2),this.io.digitalWrite(t.select[3],(15&e)>>3)}}},GROVEPI:{ADDRESSES:{value:[4]},REGISTER:{},COMMANDS:{value:{DIGITAL_READ:1,DIGITAL_WRITE:2,ANALOG_READ:3,ANALOG_WRITE:4,PIN_MODE:5,PING_READ:7}},initialize:{value:function(e){var t=d.get(this);t.isReading=!1,t.pinMap={D2:2,D3:3,D4:4,D5:5,D6:6,D7:7,D8:8,A0:14,A1:15,A2:16},this.isPwm=function(e){var t="number"==typeof e?e:parseInt(e[1]);return 3===t||5===t||6===t},this.address=e.address||this.ADDRESSES[0],e.address=this.address,this.io.i2cConfig(e),Object.assign(this.MODES,this.io.MODES);for(var n=0;n<17;n++)127,n<=1||9<=n&&n<14?this.pins.push({supportedModes:[],mode:0,value:0,report:0,analogChannel:127}):(this.pins.push({supportedModes:[this.MODES.INPUT,this.MODES.OUTPUT],mode:0,value:0,report:0,analogChannel:127}),this.isPwm(n)&&this.pins[n].supportedModes.push(this.MODES.PWM),14<=n&&n<=17?(this.pins[n].analogChannel=n-14,this.pins[n].supportedModes.push(this.MODES.ANALOG),this.analogPins.push(n),this.pinMode("A"+this.pins[n].analogChannel,this.MODES.ANALOG)):(this.pinMode("D"+n,this.MODES.OUTPUT),this.digitalWrite("D"+n,this.LOW)));this.name="GROVEPI",this.isReady=!0,this.emit("connect"),this.emit("ready")}},normalize:{value:function(e){return e}},pinMode:{value:function(e,t){var n=d.get(this).pinMap[e];t===this.io.MODES.INPUT||t===this.io.MODES.ANALOG?this.pins[n].mode=0:this.pins[n].mode=1,this.io.i2cWrite(this.address,[this.COMMANDS.PIN_MODE,n,this.pins[n].mode,0])}},digitalWrite:{value:function(e,t){var n=d.get(this).pinMap[e];t=t?1:0,this.io.i2cWrite(this.address,[this.COMMANDS.DIGITAL_WRITE,n,t,0]),this.pins[n].value=t}},ioRead:{value:function(e,t,n){var r=d.get(this),i=r.pinMap[e],o="analog"===t,a=o?3:1,s=o?this.COMMANDS.ANALOG_READ:this.COMMANDS.DIGITAL_READ;this.on(t+"-read-"+i,n),this.pins[i].report=1,this.pins[i].command=s,this.pins[i].type=t,this.pins[i].length=a;var l=function(){for(var e=l.lastPinIndex+1;e>r&1}}},CD74HC4067:{ADDRESSES:{value:[10,11,12,13]},REGISTER:{},initialize:{value:function(e){d.get(this).reading=!1,this.address=e.address||this.ADDRESSES[0],e.address=this.address,this.io.i2cConfig(e),Object.assign(this.MODES,this.io.MODES);for(var t=0;t<16;t++)this.pins.push({supportedModes:[this.MODES.ANALOG],mode:1,value:0,report:0,analogChannel:t}),this.analogPins.push(t);this.name="CD74HC4067",this.isReady=!0,this.emit("connect"),this.emit("ready")}},normalize:{value:function(e){return"string"==typeof e&&"A"===e[0]?+e.slice(1):e}},pinMode:{value:function(e,t){this.pins[e].mode=t}},analogRead:{value:function(e,t){var n=d.get(this),r=e;this.pins[r].report=1,this.on("analog-read-"+e,t),this.io.i2cWrite(this.address,r,1),n.reading||(n.reading=!0,this.io.i2cRead(this.address,32,function(e){for(var t,n=0;n<16;n++){var r=2*n;t=(e[r]<<8)+e[1+r],this.pins[n].value=t,this.pins[n].report&&this.emit("analog-read-"+n,t)}}.bind(this)))}}},LIS3DH:{ADDRESSES:{value:[24]},REGISTER:{value:{OUT_ADC1_L:8,OUT_X_L:40,CTRL_REG1:32,CTRL_REG2:33,CTRL_REG3:34,CTRL_REG4:35,CTRL_REG5:36,TEMP_CFG_REG:31}},initialize:{value:function(e){d.get(this).reading=!1,this.address=e.address||this.ADDRESSES[0],e.address=this.address,this.io.i2cConfig(e);var t=7;t=-241&t|112,this.io.i2cWrite(this.address,this.REGISTER.CTRL_REG1,t),this.io.i2cWrite(this.address,this.REGISTER.CTRL_REG4,136),this.io.i2cWrite(this.address,this.REGISTER.CTRL_REG3,16),Object.assign(this.MODES,this.io.MODES);for(var n=0;n<4;n++)0===n?this.pins.push({supportedModes:[],mode:0,value:0,report:0,analogChannel:127}):(this.pins.push({supportedModes:[this.MODES.ANALOG],mode:1,value:0,report:0,analogChannel:n}),this.analogPins.push(n));this.name="LIS3DH",this.isReady=!0,this.emit("connect"),this.emit("ready")}},normalize:{value:function(e){return"string"==typeof e&&"A"===e[0]?+e.slice(1):e}},pinMode:{value:function(e,t){this.pins[e].mode=t}},analogRead:{value:function(e,t){var n=d.get(this),r=e;this.pins[r].report=1,this.on("analog-read-"+e,t),n.reading||(n.reading=!0,this.io.i2cWrite(this.address,this.REGISTER.TEMP_CFG_REG,128),this.io.i2cRead(this.address,128|this.REGISTER.OUT_ADC1_L,6,function(e){this.pins[1].value=a.scale(a.int16(e[1],e[0]),-32512,32512,1023,0),this.pins[2].value=a.scale(a.int16(e[3],e[2]),-32512,32512,1023,0),this.pins[3].value=a.scale(a.int16(e[5],e[4]),-32512,32512,1023,0);for(var t=1;t<4;t++)this.pins[t].report&&this.emit("analog-read-"+t,this.pins[t].value)}.bind(this)))}},i2cConfig:{value:function(){return this.io.i2cConfig.apply(this.io,arguments)}},i2cWrite:{value:function(){return this.io.i2cWrite.apply(this.io,arguments)}},i2cWriteReg:{value:function(){return this.io.i2cWriteReg.apply(this.io,arguments)}},i2cRead:{value:function(){return this.io.i2cRead.apply(this.io,arguments)}},i2cReadOnce:{value:function(){return this.io.i2cReadOnce.apply(this.io,arguments)}}}};u.CD74HCT4067=u.CD74HC4067,u["74HC4067"]=u.CD74HC4067,u.PCF8574A=Object.assign({},u.PCF8574,{ADDRESSES:{value:[56]}});var i=Object.keys(o.prototype);Object.keys(u).forEach(function(t){i.forEach(function(e){void 0===u[t][e]&&(u[t][e]={writable:!0,configurable:!0,value:function(){throw new Error("Expander:"+t+" does not support "+e)}})})});var c=["74HC595"];function p(e){if(!(this instanceof p))return new p(e);l.call(this);var t,n,r="Expander cannot reuse an active address",i=null;if("string"==typeof e&&(n=e),o.Component.call(this,e=o.Options(e),{normalizePin:!1,requestPin:!1}),c.includes(e.controller)&&void 0===this.address&&(this.address=a.uid()),t=s.get(this.address))throw this.bus&&void 0!==t.bus&&t.bus===this.bus&&(r+=" on this bus"),new Error(r);if(void 0===e.controller&&n&&(e.controller=n),null==(i=e.controller&&"string"==typeof e.controller?u[e.controller.toUpperCase()]:e.controller))throw new Error("Expander expects a valid controller");o.Controller.call(this,i,e),d.set(this,{}),"function"==typeof this.initialize&&this.initialize(e),s.set(this.address,this)}n.inherits(p,l),p.get=function(e){if(!e.address||!e.controller)throw new Error("Expander.get(...) requires an address and controller");if(void 0!==e.address&&(e.address=Number(e.address)),Number.isNaN(e.address))throw new Error("Expander.get(...) expects address to be a number");if("string"!=typeof e.controller)throw new Error("Expander.get(...) expects controller name to be a string");var t=s.get(e.address);return t&&t.name===e.controller.toUpperCase()?t:new p(e)},p.byAddress=function(e){return s.get(e)},p.byController=function(t){var n=null;return s.forEach(function(e){e.name===t.toUpperCase()&&(n=e)}),n},p.hasController=function(e){return void 0!==u[e]},e.env.IS_TEST_MODE&&(p.Controllers=u,p.purge=function(){d.clear(),s.clear()}),f.exports=p}).call(this,h(36))},1457:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var x=w(n(9));n(3083),n(2805),n(3089),n(3090);var d=w(n(1)),r=w(n(8)),i=n(7),p=w(n(218)),o=w(n(2807)),a=w(n(3092)),P=_(n(285)),I=w(n(1429)),D=_(n(799)),f=n(201),h=n(30),M=_(n(333)),s=w(n(2837)),k=_(n(10)),j=_(n(1491)),l=w(n(346)),u=n(2491),c=_(n(2422)),m=n(25),g=w(n(21)),b=w(n(90)),y=n(2735),v=w(n(2844));function E(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return E=function(){return e},e}function _(e){if(e&&e.__esModule)return e;if(null===e||"object"!==C(e)&&"function"!=typeof e)return{default:e};var t=E();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}function w(e){return e&&e.__esModule?e:{default:e}}function S(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t").parent().resizable({create:function(){(0,x.default)(this).children().css("z-index","")},start:function(){ne(l[0])},resize:function(e,t){var n=ee(),r=t.size.width-t.originalSize.width,i=t.size.height-t.originalSize.height,o=t.originalSize.width+r/n,a=t.originalSize.height+i/n;o=j.snapToGridSize(o),a=j.snapToGridSize(a);var s=function(e,t,n,r,i){var o=(0,x.default)("#designModeViz"),a=o.outerWidth()-e,s=o.outerHeight()-t,l=Math.min(n,a);l=Math.max(l,20);var u=Math.min(r,s);if(u=Math.max(u,20),i){var c=Math.min(l/n,u/r);l=n*c,u=r*c}return{width:l,height:u}}(t.position.left,t.position.top,o,a,!1);t.element.outerWidth(s.width),t.element.outerHeight(s.height),l.is("canvas")&&(l.attr("width",s.width+"px"),l.attr("height",s.height+"px")),l.outerWidth(s.width),l.outerHeight(s.height),F.renderDesignWorkspace(l[0])}}).draggable({cancel:!1,start:function(){ne(l[0]),F.setAppSpaceClipping(!1)},drag:function(e,t){var n=ee(),r=t.position.left/n,i=t.position.top/n;r=j.snapToGridSize(r),i=j.snapToGridSize(i),t.position.left=r,t.position.top=i,l.css({left:r,top:i}),$(e)?l.removeClass("toDelete"):l.addClass("toDelete"),F.renderDesignWorkspace(l[0])},stop:function(e,t){$(e)?F.renderDesignWorkspace(l[0]):t.helper.hide("drop",{direction:"down"},G,function(){K(l[0])}),F.setAppSpaceClipping(!0)}}).css({position:"absolute",lineHeight:"0px"});e.css({top:l.css("top"),left:l.css("left")});var t=e.parent().height();e.parent().height(t+1),e.parent().height(t),"DIV"===this.tagName&&setTimeout(function(){e.hide().show(0)},0),l.css("position","static")}),setTimeout(function(){return(0,o.default)()},0)}function Q(e,t,n,r){var i=(0,x.default)("#designModeViz"),o=i.outerWidth()-n,a=i.outerHeight()-r,s=Math.min(e,o);s=Math.max(s,0);var l=Math.min(t,a);return{left:s,top:l=Math.max(l,0)}}function $(e){var t=(0,x.default)("#designModeViz");return j.isMouseEventInBounds(e,t)}function ee(){var e=document.getElementById("designModeViz");return e.getBoundingClientRect().width/e.offsetWidth}function te(e){var n=!1;return e.each(function(){var e=(0,x.default)(this),t=(0,x.default)(J(this));e.hasClass("ui-draggable")&&(n=!0,e.resizable("destroy").draggable("destroy"),t.css("position","absolute"),t.unwrap())}),n}function ne(e){(0,x.default)("#designModeViz .ui-draggable").css({outlineStyle:"",outlineWidth:""}),(0,x.default)(e).is('#designModeViz img[src!=""], #designModeViz label')&&(0,x.default)(e).parent().css({outlineStyle:"dashed",outlineWidth:"1px"})}F.onRestoreThemeDefaults=function(e){g.default.putRecord({study:z,study_group:U,event:"restore_theme_defaults",project_id:b.default.getCurrentId(),data_json:JSON.stringify({elementId:e.id,elementTag:e.tagName,elementClass:e.className})});var t=I.default.getCurrentTheme(F.activeScreen()),n=I.default.getThemeValues(e),r=!1;for(var i in q++,n){var o="data-mod-".concat(i),a=n[i],s=a[t],l=F.readProperty(e,i);("color"===a.type?new p.default(l).toHex()!==new p.default(s).toHex():l!==s)&&(F.updateProperty(e,i,s,null,q),r=!0),e.removeAttribute(o)}r&&F.renderDesignWorkspace(e)},F.changeThemeForElement=function(e,t,n){var r=I.default.getThemeValues(e),i=!1;for(var o in q++,r){var a="data-mod-".concat(o);if(!e.getAttribute(a)){var s=r[o],l=s[t],u=s[n],c=F.readProperty(e,o),d=s.type;""===c||("color"===d?new p.default(c).toHex()===new p.default(l).toHex():c===l)?(F.updateProperty(e,o,u,null,q),i=!0):e.setAttribute(a,1)}}i&&F.renderDesignWorkspace(e)},F.changeThemeForScreen=function(e,t){if(!M.themeOptions.includes(t))throw new Error("Invalid themeValue: ".concat(t));var n=I.default.getCurrentTheme(e);e.setAttribute("data-theme",t);var r=(0,x.default)(e),i=te(r.children());[r[0]].concat(S(r.children().toArray())).forEach(function(e){return F.changeThemeForElement(e,n,t)}),i&&Z(r.children())},F.onCopyElementToScreen=function(e,t){g.default.putRecord({study:z,study_group:U,event:"copy_to_screen",project_id:b.default.getCurrentId(),data_json:JSON.stringify({elementId:e.id,elementTag:e.tagName,elementClass:e.className,destinationScreen:t})});var n=(0,x.default)(e),r=I.default.getCurrentTheme(F.activeScreen());F.changeScreen(t);var i=te(n.children()),o=n.clone()[0],a=I.default.getElementType(o);D.setId(o,I.default.getUnusedElementId(a.toLowerCase())),F.changeThemeForElement(o,r,I.default.getCurrentTheme(F.activeScreen())),F.attachElement(o),i&&Z(n.children());var s=d.default.createElement("div",{style:{textAlign:"center"}},"Copied ",d.default.createElement("b",null,D.getId(e))," to ",d.default.createElement("b",null,t)," as"," ",d.default.createElement("b",null,D.getId(o)));(0,f.singleton)().displayPlayspaceAlert(h.NOTIFICATION_ALERT_TYPE,s)},F.onDeletePropertiesButton=function(e,t){K(e)},F.onDepthChange=function(e,t){var n,r=e.parentNode,i=r.parentNode,o=Array.prototype.indexOf.call(i.children,r);switch("forward"===t&&o+2>=i.children.length&&(t="toFront"),t){case"forward":var a=r.nextSibling.nextSibling;n=i.removeChild(r),i.insertBefore(n,a);break;case"toFront":n=i.removeChild(r),i.appendChild(n);break;case"backward":var s=r.previousSibling;if(!s)return;n=i.removeChild(r),i.insertBefore(n,s);break;case"toBack":if(1===i.children.length)return;n=i.removeChild(r),i.insertBefore(n,i.children[0]);break;default:throw new Error("unknown depthDirection: "+t)}e.focus(),F.editElementProperties(e)},F.onInsertEvent=function(e){Applab.appendToEditor(e),(0,m.getStore)().dispatch(u.actions.changeInterfaceMode(V.CODE)),Applab.scrollToEnd()},F.onInsertAICode=function(e){Applab.appendToEditor(e),(0,m.getStore)().dispatch(u.actions.changeInterfaceMode(V.DESIGN)),(0,m.getStore)().dispatch(u.actions.changeInterfaceMode(V.CODE)),Applab.scrollToEnd()},F.serializeToLevelHtml=function(){var e=(0,x.default)("#designModeViz"),t=te(e.children().children()),n=e.clone();(0,x.default)(n).removeClass("withCrosshair"),n.children().each(function(){D.removeIdPrefix(this)}),n.children().children().each(function(){if(D.removeIdPrefix(this),"IMG"===this.nodeName){this.style.objectFit="",this.style.backgroundPosition="",this.style.backgroundImage="",this.style.backgroundRepeat="",this.style.backgroundOrigin="",this.style.backgroundSize="",this.style.fontFamily="",this.removeAttribute("data-ofi-undefined");var e=this.getAttribute("data-ofi-src");e&&(this.src=X(e),this.removeAttribute("data-ofi-src"))}}),n.find('[data-canonical-image-url^="'+T+'"]').each(function(){this.removeAttribute("src"),this.style.backgroundImage=""});var r=n[0]?n[0].outerHTML:"";return t&&Z(e.children().children()),Applab.levelHtml=r},F.makeUrlProtocolRelative=X,F.parseScreenFromLevelHtml=function(e,t,n,r){var i=(0,x.default)(e);return D.addIdPrefix(i[0],n),i.children().each(function(){D.addIdPrefix(this,n)}),t&&Z(i.children()),I.default.onDeserialize(i[0],F.updateProperty.bind(this)),i.children().each(function(){var e=(0,x.default)(this).hasClass("ui-draggable")?this.firstChild:this;I.default.onDeserialize(e,F.updateProperty.bind(e),r)}),i[0]},F.parseFromLevelHtml=function(e,t,n){if(e){for(;e.firstChild;)e.removeChild(e.firstChild);if(Applab.levelHtml){var r=Y(e.id),i=x.default.parseHTML((0,s.default)(Applab.levelHtml,r,!0)),o=(0,x.default)(i).children();o.each(function(){F.parseScreenFromLevelHtml(this,t,n,!0)}),o.appendTo(e)}}},F.setAppSpaceClipping=function(e){var t=(0,x.default)("#designModeViz");e?t.delay(G).addClass("clip-content",G):t.removeClass("clip-content")},F.configureDragAndDrop=function(){(0,x.default)("#visualization").droppable({accept:".new-design-element",activate:function(e,t){F.setAppSpaceClipping(!1)},deactivate:function(e,t){F.setAppSpaceClipping(!0)},drop:function(e,t){var n=t.draggable[0].getAttribute("data-element-type"),r=j.scaledDropPoint(t.helper),i=F.createElement(n,r.left,r.top);if(n===I.default.ElementType.SCREEN&&F.changeScreen(D.getId(i)),function(e){if(0===(0,x.default)(e).parent(".ui-draggable").length)return;var t=parseFloat((0,x.default)(e).css("width")),n=parseFloat((0,x.default)(e).css("height")),r=(0,x.default)(e).parent(".ui-draggable"),i=parseFloat(r.css("left")),o=parseFloat(r.css("top")),a=Q(i,o,t,n);r.animate({left:a.left,top:a.top},G),(0,x.default)(e).css({left:a.left,top:a.top})}(i),n===I.default.ElementType.IMAGE){var o=(0,x.default)(i).parent();if(0===o.width()){var a=o.css("left");o.css("visibility","hidden"),o.css("left","0px"),setTimeout(function(){o.css("left",a),o.css("visibility","")},1)}}F.renderDesignWorkspace(i)}})},F.createScreen=function(){var e=I.default.createElement("SCREEN",0,0);return(0,x.default)("#designModeViz").append(e),D.getId(e)},F.changeScreen=function(e){(0,m.getStore)().dispatch(c.changeScreen(e))},F.getAllScreenIds=function(){return D.getScreens().get().map(function(e){return D.getId(e)})},F.loadDefaultScreen=function(){var e;e=0===D.getScreens().length?F.createScreen():D.getDefaultScreenId(),F.changeScreen(e)},F.renderDesignWorkspace=function(e){var t=document.getElementById("designWorkspace");if(t){var n={handleDragStart:function(){(0,x.default)("#resetButton").is(":visible")&&(0,f.singleton)().resetButtonClick()},element:e||null,elementIdList:Applab.getIdDropdownForCurrentScreen(),handleChange:F.onPropertyChange.bind(this,e),onCopyElementToScreen:F.onCopyElementToScreen.bind(this,e),onChangeElement:F.editElementProperties.bind(this),onDepthChange:F.onDepthChange,onDuplicate:F.onDuplicate.bind(this,e,null),onRestoreThemeDefaults:F.onRestoreThemeDefaults.bind(this,e),onDelete:F.onDeletePropertiesButton.bind(this,e),onInsertEvent:F.onInsertEvent.bind(this),handleVersionHistory:Applab.handleVersionHistory,isDimmed:Applab.running,screenIds:F.getAllScreenIds(),currentTheme:I.default.getCurrentTheme(F.activeScreen()),handleScreenChange:F.onPropertyChange.bind(this,F.activeScreen()),autogenerateML:v.default};r.default.render(d.default.createElement(i.Provider,{store:(0,m.getStore)()},d.default.createElement(a.default,n)),t)}},F.addScreenIfNecessary=function(e){var t=Y("levelHtml");e=(0,s.default)(e,t,!0);var n=(0,x.default)(e);if(0===n.children().length||n.children().eq(0).hasClass("screen"))return e;var r=I.default.createElement(I.default.ElementType.SCREEN);return n.children().appendTo(r),n.append(r),n[0].outerHTML},F.setAsClipboardElement=function(e){if(e){var t,n=(0,x.default)(e),r=n.hasClass("screen");r&&(t=te(n.children())),A=n.clone()[0],W=I.default.getCurrentTheme(F.activeScreen()),r&&t&&Z(n.children())}},F.addKeyboardHandlers=function(){(0,x.default)("#designModeViz").keydown(function(e){if(Applab.isInDesignMode()&&!Applab.isRunning()){if(e.altKey||e.ctrlKey||e.metaKey)switch(e.which){case h.KeyCodes.COPY:F.setAsClipboardElement(B);break;case h.KeyCodes.PASTE:if(A){var t=F.onDuplicate(A,W);F.setAsClipboardElement(t)}break;default:return}if(B&&!(0,x.default)(B).hasClass("screen")){var n,r;switch(e.which){case h.KeyCodes.LEFT:r=parseInt(B.style.left,10)-1,n="left";break;case h.KeyCodes.RIGHT:r=parseInt(B.style.left,10)+1,n="left";break;case h.KeyCodes.UP:r=parseInt(B.style.top,10)-1,n="top";break;case h.KeyCodes.DOWN:r=parseInt(B.style.top,10)+1,n="top";break;default:return}F.onPropertyChange(B,n,r)}}})},F.resetIds=function(){I.default.resetIds()},e.exports=t.default},1458:function(e,t,n){"use strict";function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(0)),o=i(n(1)),s=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(1488));function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var d=function(i){function e(){for(var t,e=arguments.length,n=new Array(e),r=0;rthis.fallBackTime&&(this.fallBackTime=1/0,this.playLoop&&this.playLoop.stop(),this.playLoop=new l.TemporalFallback(this)),(1===this.progress&&!this.reverse||t===this.loopback&&this.reverse)&&(this.loop||this.metronomic&&!this.reverse?(this.onloop&&this.onloop(),this.metronomic&&(this.reverse=!this.reverse),this.normalizeKeyframes(),this.progress=this.loopback,this.startTime=Date.now()-this.scaledDuration*this.progress,this.endTime=this.startTime+this.scaledDuration):(this.stop(),this.oncomplete&&r.nextTick(this.oncomplete.bind(this)),0=i.right&&null!==e}),a.duration=this.cuePoints[t.right]-this.cuePoints[t.left],a.progress=(o-this.cuePoints[t.left])/a.duration,Number.isFinite(a.progress)||(a.progress=this.reverse?0:1);var n=e[t.left],r=e[t.right];return a.progress=s[r.easing](a.progress),r.position?r.position.map(function(e,t){return(e-n.position[t])*a.progress+n.position[t]}):"number"==typeof r.value&&"number"==typeof n.value?(r.value-n.value)*a.progress+n.value:this.target[l.keys].reduce(function(e,t){return e[t]=(r.value[t]-n.value[t])*a.progress+n.value[t],e},{})},this)},l.prototype.normalizeKeyframes=function(){var r,e=i.cloneDeep(this.keyFrames),n=this.cuePoints;return e=this.target[l.normalize](e),Array.isArray(e[0])||(e=[e]),e.forEach(function(e){for(var t=e.length;t=t[0]&&e<=t[1]&&r.call(this,null,e)}.bind(this)),this}};e.exports=n},197:function(m,e,g){(function(y){var i=g(203),a=g(61).EventEmitter,e=g(94),S=g(293),_=S.int16,C=S.uint16,O=S.uint24,o=new Map,s=new Map,t="accelerometer",n="altimeter",r="barometer",l="hygrometer",u="thermometer";function c(t,n){var r=o.get(this),i=Object.create(null);this.components.forEach(function(e){r[e]=new c[e](Object.assign({controller:n.controller||t,freq:n.freq,board:this.board},n)),i[e]={get:function(){return r[e]}},d[e]&&(i[d[e]]=i[e])}),Object.defineProperties(this,i)}c.accelerometer=g(2571),c.altimeter=g(2577),c.barometer=g(2578),c.gyro=g(2579),c.hygrometer=g(2580),c.magnetometer=g(2581),c.orientation=g(2886),c.thermometer=g(2582);var d={thermometer:"temperature"},p={SHT31D:{ADDRESSES:{value:[68]},REGISTER:{value:{SOFT_RESET:12450,MEASURE_HIGH_REPEATABILITY:9216}},initialize:{value:function(e,t){var n=e.io,r=t.address||this.ADDRESSES[0];t.address=r,n.i2cConfig(t),n.i2cWrite(r,[this.REGISTER.SOFT_RESET>>8,255&this.REGISTER.SOFT_RESET]);var i={temperature:null,humidity:null},o=function(){n.i2cWrite(r,[this.REGISTER.MEASURE_HIGH_REPEATABILITY>>8,255&this.REGISTER.MEASURE_HIGH_REPEATABILITY]),setTimeout(function(){n.i2cReadOnce(r,6,function(e){i.temperature=C(e[0],e[1]),i.humidity=C(e[3],e[4]),this.emit("data",i),o()}.bind(this))}.bind(this),16)}.bind(this);o()}},identifier:{value:function(e){return"sht-31d-"+(e.address||p.SHT31D.ADDRESSES.value[0])}}},HTU21D:{ADDRESSES:{value:[64]},REGISTER:{value:{HUMIDITY:229,TEMPERATURE:227,SOFT_RESET:254}},initialize:{value:function(e,t){var n=e.io,r=t.address||this.ADDRESSES[0];t.address=r,t.delay=5e4,n.i2cConfig(t),n.i2cWrite(r,this.REGISTER.SOFT_RESET);var i={temperature:null,humidity:null},o=0,a=function(){var t=0===o,e=t?this.REGISTER.TEMPERATURE:this.REGISTER.HUMIDITY;n.i2cReadOnce(r,e,2,function(e){t?i.temperature=C(e[0],e[1]):i.humidity=C(e[0],e[1]),2==++o&&(o=0,this.emit("data",i)),a()}.bind(this))}.bind(this);a()}},identifier:{value:function(e){return"htu-s1d-"+(e.address||p.HTU21D.ADDRESSES.value[0])}}},HIH6130:{ADDRESSES:{value:[39]},initialize:{value:function(e,t){var n=e.io,r=t.address||this.ADDRESSES[0];t.address=r,n.i2cConfig(t);var i={humidity:null,temperature:null},o=36.65,a=function(){n.i2cWrite(r,160,[0,0]),setTimeout(function(){n.i2cWrite(r,128,[0,0]),n.i2cReadOnce(r,4,function(e){var t=e[0]>>6;i.humidity=_(63&e[0],e[1]),i.temperature=_(e[2],e[3]>>2),0==t&&o--,1==t&&o++,this.emit("data",i),a()}.bind(this))}.bind(this),o)}.bind(this);a()}},identifier:{value:function(e){return"hih6130-"+(e.address||p.HIH6130.ADDRESSES.value[0])}}},DHT_I2C_NANO_BACKPACK:{ADDRESSES:{value:[10]},REGISTER:{value:{READ:0}},initialize:{value:function(e,t){var n=e.io,r=t.address||this.ADDRESSES[0],i=11;t.address=r,n.i2cConfig(t);var o=/(\d{2})/.exec(t.controller),a=o&&o.length&&o[0];a&&(i=+a,Number.isNaN(i)&&(i=11));var s={temperature:null,humidity:null};n.i2cWrite(r,[2,i]),n.i2cRead(r,4,function(e){s.humidity=_(e[0],e[1]),s.temperature=_(e[2],e[3]),this.emit("data",s)}.bind(this))}},identifier:{value:function(e){return"dht_i2c_nano_backpack-"+(e.address||p.DHT_I2C_NANO_BACKPACK.ADDRESSES.value[0])}}},MPU6050:{ADDRESSES:{value:[104,105]},REGISTER:{value:{SETUP:[107,0],READ:59}},initialize:{value:function(e,t){var n=e.io,r=t.address||this.ADDRESSES[0];t.address=r;var i={accelerometer:{},temperature:{},gyro:{}};n.i2cConfig(t),n.i2cWrite(r,this.REGISTER.SETUP),n.i2cRead(r,this.REGISTER.READ,14,function(e){i.accelerometer={x:_(e[0],e[1]),y:_(e[2],e[3]),z:_(e[4],e[5])},i.temperature=_(e[6],e[7]),i.gyro={x:_(e[8],e[9]),y:_(e[10],e[11]),z:_(e[12],e[13])},this.emit("data",i)}.bind(this))}},identifier:{value:function(e){return"mpu-6050-"+(e.address||p.MPU6050.ADDRESSES.value[0])}}},BNO055:{ADDRESSES:{value:[40,41]},REGISTER:{value:{READ:{ACCEL:8,MAG:14,GYRO:20,EULER:26,QUARTERNION:32,TEMP:52},LENGTH:{ACCEL:6,MAG:6,GYRO:6,EULER:6,QUARTERNION:8,TEMP:1},OPR_MODE_ADDR:61,OPR_MODES:{CONFIG:0,ACCONLY:1,MAGONLY:2,GYRONLY:3,ACCMAG:4,ACCGYRO:5,MAGGYRO:6,AMG:7,IMUPLUS:8,COMPASS:9,M4G:10,NDOF_FMC_OFF:11,NDOF:12},PWR_MODE_ADDR:62,PWR_MODES:{NORMAL:0,LOW:1,SUSPEND:2},PAGE_ID_ADDR:7,PAGE_STATES:{ZERO:0},CALIBRATION:53,SYS_TRIGGER:63,UNIT_SEL_ADDR:59,AXIS_MAP_CONFIG_ADDR:65,AXIS_MAP_SIGN_ADDR:66}},initialize:{value:function(e,r){var o=e.io,a=r.address||this.ADDRESSES[0],s=r.calibrationMask||192;r.address=a;var l={accelerometer:{x:null,y:null,z:null},gyro:{x:null,y:null,z:null},magnetometer:{x:null,y:null,z:null},orientation:{euler:{heading:null,roll:null,pitch:null},quarternion:{w:null,x:null,y:null,z:null}},temperature:null,calibration:null};o.i2cConfig(r),o.i2cWriteReg(a,this.REGISTER.OPR_MODE_ADDR,this.REGISTER.OPR_MODES.CONFIG),o.i2cWriteReg(a,this.REGISTER.PAGE_ID_ADDR,this.REGISTER.PAGE_STATES.ZERO),o.i2cWriteReg(a,this.REGISTER.SYS_TRIGGER,32),new Promise(function(n){setTimeout(function(){o.i2cWriteReg(a,this.REGISTER.PWR_MODE_ADDR,this.REGISTER.PWR_MODES.NORMAL),o.i2cWriteReg(a,this.REGISTER.SYS_TRIGGER,r.enableExternalCrystal?128:0);var e=r.axisMap||36;o.i2cWriteReg(a,this.REGISTER.AXIS_MAP_CONFIG_ADDR,e);var t=r.axisSign||0;o.i2cWriteReg(a,this.REGISTER.AXIS_MAP_SIGN_ADDR,t),setTimeout(function(){o.i2cWriteReg(a,this.REGISTER.OPR_MODE_ADDR,this.REGISTER.OPR_MODES.NDOF),n()}.bind(this),10)}.bind(this),650)}.bind(this)).then(function(){return new Promise(function(r){var i=function(){o.i2cReadOnce(a,this.REGISTER.CALIBRATION,1,function(e){var t=e[0],n=l.calibration!==t;l.calibration=t,n&&this.emit("calibration",l.calibration),(t&s)===s?(this.emit("calibrated"),r()):i()}.bind(this))}.bind(this);i()}.bind(this))}.bind(this)).then(function(){o.i2cRead(a,this.REGISTER.READ.TEMP,2,function(e){l.temperature=e[0];var t=l.calibration!==e[1];l.calibration=e[1],this.emit("data",l),t&&this.emit("calibration",l.calibration)}.bind(this)),o.i2cRead(a,this.REGISTER.READ.ACCEL,18,function(e){l.accelerometer={x:_(e[1],e[0]),y:_(e[3],e[2]),z:_(e[5],e[4])},l.magnetometer={x:_(e[7],e[6]),y:_(e[9],e[8]),z:_(e[11],e[10])},l.gyro={x:_(e[13],e[12]),y:_(e[15],e[14]),z:_(e[17],e[16])},this.emit("data",l)}.bind(this)),o.i2cRead(a,this.REGISTER.READ.EULER,14,function(e){l.orientation.euler={heading:_(e[1],e[0]),roll:_(e[3],e[2]),pitch:_(e[5],e[4])},l.orientation.quarternion={w:_(e[7],e[6]),x:_(e[9],e[8]),y:_(e[11],e[10]),z:_(e[13],e[12])},this.emit("data",l)}.bind(this))}.bind(this))}},identifier:{value:function(e){return"bno055-"+(e.address||p.BNO055.ADDRESSES.value[0])}}},MPL115A2:{ADDRESSES:{value:[96]},REGISTER:{value:{COEFFICIENTS:4,PADC_MSB:0,CONVERT:18}},initialize:{value:function(e,t){var n=e.io,r=t.address||this.ADDRESSES[0];t.address=r,n.i2cConfig(t);var i={pressure:null,temperature:null},a={a0:null,b1:null,b2:null,c12:null},o=function(e){var t=C(e[0],e[1])>>6,n=C(e[2],e[3])>>6;i.pressure=a.a0+(a.b1+a.c12*n)*t+a.b2*n,i.temperature=n,this.emit("data",i),s()}.bind(this),s=function(){n.i2cWriteReg(r,this.REGISTER.CONVERT,0),n.i2cReadOnce(r,this.REGISTER.PADC_MSB,4,o)}.bind(this);new Promise(function(o){n.i2cReadOnce(r,this.REGISTER.COEFFICIENTS,8,function(e){var t=_(e[0],e[1]),n=_(e[2],e[3]),r=_(e[4],e[5]),i=_(e[6],e[7])>>2;a.a0=t/8,a.b1=n/8192,a.b2=r/16384,a.c12=i/4194304,o()}.bind(this))}.bind(this)).then(s)}},identifier:{value:function(e){return"mpl115a2-"+(e.address||p.MPL115A2.ADDRESSES.value[0])}}},MPL3115A2:{ADDRESSES:{value:[96]},REGISTER:{value:{STATUS:0,PRESSURE:1,CONFIG:19,BAR_IN_MSB:20,BAR_IN_LSB:21,CONTROL:38}},MASK:{value:{STATUS:{PRESSURE_DATA_READ:4},CONTROL:{SBYB:1,OS128:56,ALTIMETER:128,PRESSURE:0},CONFIG:{TDEFE:1,PDEFE:2,DREM:4}}},initialize:{value:function(e,t){var o=e.io,a=t.address||this.ADDRESSES[0],s=!1,l=null,u=0;t.address=a;var c=0,d={pressure:0,altitude:0,temperature:0};void 0!==t.elevation&&(l=t.elevation),null!==l&&l<=0&&(u=Math.abs(l)+1,l=1);var n=function(t){o.i2cReadOnce(a,this.REGISTER.STATUS,1,function(e){e[0]&this.MASK.STATUS.PRESSURE_DATA_READ?t():setTimeout(function(){n(t)},100)}.bind(this))}.bind(this),p=function(){var e=s?this.MASK.CONTROL.PRESSURE:this.MASK.CONTROL.ALTIMETER,t=this.MASK.CONTROL.SBYB|this.MASK.CONTROL.OS128|e;o.i2cWrite(a,this.REGISTER.CONTROL,t),n(function(){o.i2cReadOnce(a,this.REGISTER.PRESSURE,6,function(e){var t=O(e[1],e[2],e[3])>>4,n=C(e[4],e[5])>>4;if(d.temperature=n,s)d.pressure=t,this.emit("data",d);else{var r=e[1],i=e[2],o=e[3];c=(3*c+((r<<8|i)+(o>>4)/16))/4,d.altitude=c-u}s=!s,p()}.bind(this))}.bind(this))}.bind(this),f=[],h=function(){o.i2cWrite(a,this.REGISTER.CONTROL,59),o.i2cWrite(a,this.REGISTER.CONTROL,57),setTimeout(function(){o.i2cReadOnce(a,this.REGISTER.PRESSURE,6,function(e){var t=e[1],n=e[2],r=(e[3]>>4)/4;if(f.push((t<<10|n<<2)+r),4===f.length){var i=(f[0]+f[1]+f[2]+f[3])/4/Math.pow(1-225577e-10*l,5.255);o.i2cWrite(a,this.REGISTER.BAR_IN_MSB,i/2>>8),o.i2cWrite(a,this.REGISTER.BAR_IN_LSB,i/2&255),o.i2cWrite(a,this.REGISTER.CONTROL,187),o.i2cWrite(a,this.REGISTER.CONTROL,185),setTimeout(function(){o.i2cReadOnce(a,this.REGISTER.PRESSURE,6,function(e){var t=e[1],n=e[2],r=e[3];c=(t<<8|n)+(r>>4)/16,p(!1)})}.bind(this),550)}else h()}.bind(this))}.bind(this),500)}.bind(this);o.i2cConfig(Object.assign(t,{settings:{stopTX:!0}})),o.i2cWriteReg(a,45,0),o.i2cWriteReg(a,this.REGISTER.BAR_IN_MSB,0),o.i2cWriteReg(a,this.REGISTER.BAR_IN_LSB,0),o.i2cWriteReg(a,this.REGISTER.CONFIG,this.MASK.CONFIG.TDEFE|this.MASK.CONFIG.PDEFE|this.MASK.CONFIG.DREM),null!==l?h():p()}},identifier:{value:function(e){return"mpl3115a2-"+(e.address||p.MPL3115A2.ADDRESSES.value[0])}}},BMP180:{ADDRESSES:{value:[119]},REGISTER:{value:{COEFFICIENTS:170,READ:0,READ_START:244,READ_RESULT:246}},initialize:{value:function(e,t){var r=e.io,i=t.address||this.ADDRESSES[0],b=null,y=0;void 0!==t.elevation&&(b=t.elevation),(null!=b&&b<=0||null==b)&&(y=Math.abs(b)+1,b=1),t.address=i;var n=t.mode||3,o=[5,8,14,26][n],v=S.constrain(n,0,3),E={a1:null,a2:null,a3:null,a4:null,a5:null,a6:null,b1:null,b2:null,b5:null,mb:null,mc:null,md:null};r.i2cConfig(t),new Promise(function(t){r.i2cReadOnce(i,this.REGISTER.COEFFICIENTS,22,function(e){E.a1=_(e[0],e[1]),E.a2=_(e[2],e[3]),E.a3=_(e[4],e[5]),E.a4=C(e[6],e[7]),E.a5=C(e[8],e[9]),E.a6=C(e[10],e[11]),E.b1=_(e[12],e[13]),E.b2=_(e[14],e[15]),E.mb=_(e[16],e[17]),E.mc=_(e[18],e[19]),E.md=_(e[20],e[21]),t()})}.bind(this)).then(function(){var h={altitude:null,pressure:null,temperature:null},m=0,g=function(){var f=0===m,e=f?46:52+(v<<6),t=f?2:3,n=f?5:o;r.i2cWriteReg(i,this.REGISTER.READ_START,e),setTimeout(function(){r.i2cReadOnce(i,this.REGISTER.READ_RESULT,t,function(e){var t,n,r,i,o,a,s,l,u,c;if(f)r=((n=_(e[0],e[1]))-E.a6)*E.a5>>15,i=(E.mc<<11)/(r+E.md)>>0,E.b5=r+i|0,h.temperature=(E.b5+8>>4)/10;else{n=O(e[0],e[1],e[2])>>8-v,c=(l=E.b5-4e3)*l>>12,o=(r=E.b2*c>>11)+(i=E.a2*l>>11),a=(2+(4*E.a1+o<>0,o=(r=E.a3*l>>13)+(i=E.b1*c>>16)+2>>2,s=E.a4*(o+32768)>>15,t=(u=(n-a)*(5e4>>v))>=0,t+=(r=3038*(r=(t>>8)*(t>>8))>>16)+(i=-7357*t>>16)+3791>>4;var d=(h.pressure=t)/Math.pow(1-225577e-10*b,5.255),p=44330*(1-Math.pow(t/d,1/5.255));h.altitude=Math.round(p-y)}2==++m&&(m=0,this.emit("data",h)),g()}.bind(this))}.bind(this),n)}.bind(this);g()}.bind(this))}},identifier:{value:function(e){return"bmp180-"+(e.address||p.BMP180.ADDRESSES.value[0])}}},BMP280:{ADDRESSES:{value:[119]},REGISTER:{value:{COEFFICIENTS:136,CONFIG:245,MEASURE:244,PRESSURE:247,TEMPERATURE:250,RESET:224}},initialize:{value:function(e,t){var n=e.io,r=t.address||this.ADDRESSES[0],p=null,f=0;void 0!==t.elevation&&(p=t.elevation),(null!=p&&p<=0||null==p)&&(f=Math.abs(p)+1,p=1),t.address=r;var h={T1:null,T2:null,T3:null,P1:null,P2:null,P3:null,P4:null,P5:null,P6:null,P7:null,P8:null,P9:null};n.i2cConfig(t),n.i2cWrite(r,this.REGISTER.RESET,182),new Promise(function(t){n.i2cReadOnce(r,this.REGISTER.COEFFICIENTS,24,function(e){h.T1=C(e[1],e[0]),h.T2=_(e[3],e[2]),h.T3=_(e[5],e[4]),h.P1=C(e[7],e[6]),h.P2=_(e[9],e[8]),h.P3=_(e[11],e[10]),h.P4=_(e[13],e[12]),h.P5=_(e[15],e[14]),h.P6=_(e[17],e[16]),h.P7=_(e[19],e[18]),h.P8=_(e[21],e[20]),h.P9=_(e[23],e[22]),t()})}.bind(this)).then(function(){n.i2cWrite(r,this.REGISTER.MEASURE,63);var d={altitude:null,pressure:null,temperature:null};n.i2cRead(r,this.REGISTER.PRESSURE,6,function(e){var t,n,r,i=0,o=S.s32(O(e[0],e[1],e[2])),a=S.s32(O(e[3],e[4],e[5]));o>>=4;var s=((a>>=4)>>4)-h.T1;if(t=(n=((a>>3)-(h.T1<<1))*h.T2>>11)+(r=(s*s>>12)*h.T3>>14),d.temperature=(5*t+128>>8)/100,r=n=void 0,r=(((n=S.s32(t>>1)-64e3)>>2)*(n>>2)>>11)*S.s32(h.P6),r=((r+=n*S.s32(h.P5)<<1)>>2)+(S.s32(h.P4)<<16),n=(h.P3*((n>>2)*(n>>2)>>13)>>3)+(S.s32(h.P2)*n>>1)>>18,0===(n=(S.POW_2_15+n)*S.s32(h.P1)>>15))return 0;i=(i=3125*S.u32(S.s32(S.POW_2_20)-o-(r>>12)))>>0)/S.u32(n):2*(i/S.u32(n)>>>0);var l=(i=S.u32(i)>>>0)>>3;n=S.s32(h.P9)*S.s32(l*l>>13)>>12,r=S.s32(i>>2)*S.s32(h.P8)>>13,i=S.u32(S.s32(i)+(n+r+h.P7>>4));var u=(d.pressure=i)/Math.pow(1-225577e-10*p,5.255),c=44330*(1-Math.pow(i/u,1/5.255));d.altitude=Math.round(c-f),this.emit("data",d)}.bind(this))}.bind(this))}},identifier:{value:function(e){return"bmp280-"+(e.address||p.BMP280.ADDRESSES.value[0])}}},BME280:{ADDRESSES:{value:[119]},REGISTER:{value:{COEFFICIENTS_TP:136,COEFFICIENTS_H:225,CONFIG:245,MEASURE_H:242,MEASURE_TP:244,PRESSURE:247,TEMPERATURE:250,HUMIDITY:253,RESET:224}},initialize:{value:function(e,t){var n=e.io,r=t.address||this.ADDRESSES[0],m=null,g=0;void 0!==t.elevation&&(m=t.elevation),(null!=m&&m<=0||null==m)&&(g=Math.abs(m)+1,m=1),t.address=r;var b={T1:null,T2:null,T3:null,P1:null,P2:null,P3:null,P4:null,P5:null,P6:null,P7:null,P8:null,P9:null,H1:null,H2:null,H3:null,H4:null,H5:null,H6:null};n.i2cConfig(t),n.i2cWrite(r,this.REGISTER.RESET,182),new Promise(function(e){Promise.all([new Promise(function(t){n.i2cReadOnce(r,136,24,function(e){b.T1=C(e[1],e[0]),b.T2=_(e[3],e[2]),b.T3=_(e[5],e[4]),b.P1=C(e[7],e[6]),b.P2=_(e[9],e[8]),b.P3=_(e[11],e[10]),b.P4=_(e[13],e[12]),b.P5=_(e[15],e[14]),b.P6=_(e[17],e[16]),b.P7=_(e[19],e[18]),b.P8=S.s32(_(e[21],e[20])),b.P9=S.s32(_(e[23],e[22])),t()})}),new Promise(function(t){n.i2cReadOnce(r,161,1,function(e){b.H1=S.u8(e[0]),t()})}),new Promise(function(t){n.i2cReadOnce(r,225,8,function(e){b.H2=S.s32(_(e[1],e[0])),b.H3=S.s32(e[2]),b.H4=S.s32(e[3]<<4|15&e[4]),b.H5=S.s32(e[5]<<4|e[4]>>4),b.H6=S.s8(e[6]),t()})})]).then(e)}.bind(this)).then(function(){n.i2cWrite(r,this.REGISTER.MEASURE_H,5),n.i2cWrite(r,this.REGISTER.MEASURE_TP,183);var f={altitude:null,pressure:null,humidity:null,temperature:null},h=Date.now();n.i2cRead(r,this.REGISTER.PRESSURE,8,function(e){if(y.env.IS_TEST_MODE||!(h+1e3>Date.now())){var t,n,r,i,o=0,a=S.s32(O(e[0],e[1],e[2])),s=S.s32(O(e[3],e[4],e[5])),l=S.s32(C(e[6],e[7]));a>>=4;var u=((s>>=4)>>4)-b.T1;if(t=(n=((s>>3)-(b.T1<<1))*b.T2>>11)+(r=(u*u>>12)*b.T3>>14),f.temperature=(5*t+128>>8)/100,r=n=void 0,r=(((n=S.s32(t>>1)-64e3)>>2)*(n>>2)>>11)*S.s32(b.P6),r=((r+=n*S.s32(b.P5)<<1)>>2)+(S.s32(b.P4)<<16),n=(b.P3*((n>>2)*(n>>2)>>13)>>3)+(S.s32(b.P2)*n>>1)>>18,0===(n=(S.POW_2_15+n)*S.s32(b.P1)>>15))return 0;o=(o=3125*S.u32(S.s32(S.POW_2_20)-a-(r>>12)))>>0)/S.u32(n):2*(o/S.u32(n)>>>0);var c=(o=S.u32(o)>>>0)>>3;n=S.s32(b.P9)*S.s32(c*c>>13)>>12,r=S.s32(o>>2)*b.P8>>13,o=S.u32(S.s32(o)+(n+r+b.P7>>4));var d=(f.pressure=o)/Math.pow(1-225577e-10*m,5.255),p=44330*(1-Math.pow(o/d,1/5.255));f.altitude=Math.round(p-g),i=S.s32(t-76800),i=((l<<14)-S.s32(b.H4<<20)-b.H5*i+S.POW_2_14>>15)*((((i*b.H6>>10)*((i*b.H3>>11)+S.POW_2_15)>>10)+S.POW_2_21)*b.H2+S.POW_2_13>>14),i-=((i>>15)*(i>>15)>>7)*S.s32(b.H1)>>4,i=S.constrain(i,0,419430400),f.humidity=S.u32(i>>12),this.emit("data",f)}}.bind(this))}.bind(this))}},identifier:{value:function(e){return"bme280-"+(e.address||p.BME280.ADDRESSES.value[0])}}},SI7020:{ADDRESSES:{value:[64]},REGISTER:{value:{HUMIDITY:229,TEMPERATURE:224}},initialize:{value:function(e,t){var n=e.io,r=t.address||this.ADDRESSES[0];t.address=r,t.delay=5e4,n.i2cConfig(t);var i={temperature:null,humidity:null};n.i2cRead(r,this.REGISTER.TEMPERATURE,2,function(e){i.temperature=C(e[0],e[1]),this.emit("data",i)}.bind(this)),n.i2cRead(r,this.REGISTER.HUMIDITY,2,function(e){i.humidity=C(e[0],e[1]),this.emit("data",i)}.bind(this))}},identifier:{value:function(e){return"si7020-"+(e.address||p.SI7020.ADDRESSES.value[0])}}},MS5611:{ADDRESSES:{value:[119]},REGISTER:{value:{COEFFICIENTS:162,READ:0,PRESSURE:64,TEMPERATURE:80,RESET:30}},initialize:{value:function(e,t){var g=e.io,b=t.address||this.ADDRESSES[0],y=null,v=0;void 0!==t.elevation&&(y=t.elevation),(null!=y&&y<=0||null==y)&&(v=Math.abs(y)+1,y=1),t.address=b;var E={altitude:null,pressure:null,temperature:null},n=t.mode||5,_=[1,2,3,4,5,10][n],w={C1:null,C2:null,C3:null,C4:null,C5:null,C6:null},r=Object.keys(w);t.delay=1e3*_,g.i2cConfig(t),g.i2cWrite(b,this.REGISTER.RESET),new Promise(function(t){setTimeout(function(){var e=r.map(function(n,e){var r=this.REGISTER.COEFFICIENTS+2*e;return new Promise(function(t){g.i2cReadOnce(b,r,2,function(e){w[n]=C(e[0],e[1]),t()})})}.bind(this));Promise.all(e).then(t)}.bind(this),50)}.bind(this)).then(function(){var i,o,a,s,l,u,c,d,p,f,h=0,m=function(){var r=0===h,e=(r?80:64)+n;g.i2cWrite(b,e),r?f=p=d=s=a=o=0:c=u=l=i=0,setTimeout(function(){g.i2cReadOnce(b,this.REGISTER.READ,3,function(e){if(r)o=O(e[0],e[1],e[2]),a=o-w.C5*S.POW_2_8,(s=2e3+a*w.C6/S.POW_2_23)<2e3&&(d=Math.pow(a,2)/S.POW_2_31,p=5*Math.pow(s-2e3,2)/2,f=5*Math.pow(s-2e3,2)/S.POW_2_2,s<-1500&&(p+=7*Math.pow(s+1500,2),f+=11*Math.pow(s+1500,2)/2)),s-=d,E.temperature=s/100;else{i=O(e[0],e[1],e[2]),l=w.C2*S.POW_2_16+w.C4*a/S.POW_2_7,u=w.C1*S.POW_2_15+w.C3*a/S.POW_2_8,l-=p,c=(i*(u-=f)/S.POW_2_21-l)/S.POW_2_15;var t=(E.pressure=c)/Math.pow(1-225577e-10*y,5.255),n=44330*(1-Math.pow(c/t,1/5.255));E.altitude=n-v}2==++h&&(h=0,this.emit("data",E)),m()}.bind(this))}.bind(this),_)}.bind(this);m()}.bind(this))}},identifier:{value:function(e){return"ms5611-"+(e.address||p.MS5611.ADDRESSES.value[0])}}},TH02:{ADDRESSES:{value:[64]},COMMAND:{value:{MEASURE_HUMIDITY:1,MEASURE_TEMPERATURE:17}},REGISTER:{value:{STATUS:0,READ:1,CONFIG:3}},initialize:{value:function(e,t){var r=e.io,i=t.address||this.ADDRESSES[0];t.address=i;var n={temperature:null,humidity:null},o=0;r.i2cConfig(Object.assign(t,{settings:{stopTX:!0}}));var a=function(){var t=0===o,e=t?this.COMMAND.MEASURE_TEMPERATURE:this.COMMAND.MEASURE_HUMIDITY;new Promise(function(t){r.i2cWrite(i,this.REGISTER.CONFIG,e);var n=function(){r.i2cReadOnce(i,this.REGISTER.STATUS,1,function(e){1&e[0]?n():t()})}.bind(this);n()}.bind(this)).then(function(){Promise.all([new Promise(function(t){r.i2cReadOnce(i,1,1,function(e){t(e[0])})}),new Promise(function(t){r.i2cReadOnce(i,2,1,function(e){t(e[0])})})]).then(function(e){t?n.temperature=(C(e[0],e[1])>>2)/32-50:n.humidity=(C(e[0],e[1])>>4)/16-24,2==++o&&(o=0,this.emit("data",n)),a()}.bind(this))}.bind(this))}.bind(this);a()}},identifier:{value:function(e){return"th02-"+(e.address||p.TH02.ADDRESSES.value[0])}}}};p.BMP085=p.BMP180,p.GY521=p.MPU6050,p.SI7021=p.SI7020,p.DHT11_I2C_NANO_BACKPACK=p.DHT_I2C_NANO_BACKPACK,p.DHT21_I2C_NANO_BACKPACK=p.DHT_I2C_NANO_BACKPACK,p.DHT22_I2C_NANO_BACKPACK=p.DHT_I2C_NANO_BACKPACK,p.get=function(e,t,n){var r,i,o;return s.has(e)||s.set(e,{}),n=n||{},(r=s.get(e))[i=p[t].identifier.value(n)]||(o=new a,Object.defineProperties(o,p[t]),o.initialize(e,n),r[i]=o),r[i]},p.clear=function(){s.clear()};var f={MPU6050:{initialize:{value:function(e){c.call(this,"MPU6050",e)}},components:{value:[t,"gyro",u]}},BNO055:{initialize:{value:function(e){o.get(this).calibrationMask=e.calibrationMask||192;var t=p.get(this.board,"BNO055",e);t.on("calibrated",function(){this.emit("calibrated")}.bind(this)),t.on("calibration",function(e){this.emit("calibration",e)}.bind(this)),c.call(this,"BNO055",e)}},components:{value:[t,"gyro","magnetometer","orientation",u]},calibration:{get:function(){return this.orientation.calibration}},isCalibrated:{get:function(){var e=o.get(this).calibrationMask;return(this.orientation.calibration&e)===e}}},MPL115A2:{initialize:{value:function(e){c.call(this,"MPL115A2",e)}},components:{value:[r,u]}},SHT31D:{initialize:{value:function(e){c.call(this,"SHT31D",e)}},components:{value:[l,u]}},HTU21D:{initialize:{value:function(e){c.call(this,"HTU21D",e)}},components:{value:[l,u]}},HIH6130:{initialize:{value:function(e){c.call(this,"HIH6130",e)}},components:{value:[l,u]}},DHT_I2C_NANO_BACKPACK:{initialize:{value:function(e){c.call(this,"DHT_I2C_NANO_BACKPACK",e)}},components:{value:[l,u]}},MPL3115A2:{initialize:{value:function(e){c.call(this,"MPL3115A2",e)}},components:{value:[n,r,u]}},BMP180:{initialize:{value:function(e){c.call(this,"BMP180",e)}},components:{value:[n,r,u]}},BMP280:{initialize:{value:function(e){c.call(this,"BMP280",e)}},components:{value:[n,r,u]}},BME280:{initialize:{value:function(e){c.call(this,"BME280",e)}},components:{value:[n,r,l,u]}},SI7020:{initialize:{value:function(e){c.call(this,"SI7020",e)}},components:{value:[l,u]}},MS5611:{initialize:{value:function(e){c.call(this,"MS5611",e)}},components:{value:[n,r,u]}},TH02:{initialize:{value:function(e){c.call(this,"TH02",e)}},components:{value:[l,u]}}};function h(e){if(!(this instanceof h))return new h(e);var t,n;if(i.Component.call(this,e=i.Options(e)),null==(t=e.controller&&"string"==typeof e.controller?f[e.controller.toUpperCase()]:e.controller))throw new Error("Missing IMU/Multi controller");this.freq=e.freq||20,n={},o.set(this,n),i.Controller.call(this,t,e),"function"==typeof this.initialize&&this.initialize(e),this.isReady=!1,setInterval(function(){this.isReady&&this.emit("data",this)}.bind(this),this.freq);var r=this.components.slice();this.components&&0>0},ToUint32:function(e){return Q.ToNumber(e)>>>0},ToNumber:function(e){if("[object Symbol]"===h(e))throw new TypeError("Cannot convert a Symbol value to a number");return+e},ToInteger:function(e){var t=Q.ToNumber(e);return V(t)?0:0!==t&&G(t)?(0Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:t},SameValue:function(e,t){return e===t?0!==e||1/e==1/t:V(e)&&V(t)},SameValueZero:function(e,t){return e===t||V(e)&&V(t)},IsIterable:function(e){return Q.TypeIsObject(e)&&(void 0!==e[Y]||U(e))},GetIterator:function(e){if(U(e))return new o(e,"value");var t=Q.GetMethod(e,Y);if(!Q.IsCallable(t))throw new TypeError("value is not an iterable");var n=Q.Call(t,e);if(!Q.TypeIsObject(n))throw new TypeError("bad iterator");return n},GetMethod:function(e,t){var n=Q.ToObject(e)[t];if(null!=n){if(!Q.IsCallable(n))throw new TypeError("Method not callable: "+t);return n}},IteratorComplete:function(e){return!!e.done},IteratorClose:function(e,t){var n=Q.GetMethod(e,"return");if(void 0!==n){var r,i;try{r=Q.Call(n,e)}catch(e){i=e}if(!t){if(i)throw i;if(!Q.TypeIsObject(r))throw new TypeError("Iterator's return method returned a non-object.")}}},IteratorNext:function(e){var t=1",u=l+i;return u+""+t+">"},IsRegExp:function(e){if(!Q.TypeIsObject(e))return!1;var t=e[B.match];return void 0!==t?!!t:q.regex(e)},ToString:function(e){return Z(e)}};if(i&&X){var $=function(e){if(q.symbol(B[e]))return B[e];var t=B.for("Symbol."+e);return Object.defineProperty(B,e,{configurable:!1,enumerable:!1,writable:!1,value:t}),t};if(!q.symbol(B.search)){var ee=$("search"),te=String.prototype.search;f(RegExp.prototype,ee,function(e){return Q.Call(te,e,[this])}),K(String.prototype,"search",function(e){var t=Q.RequireObjectCoercible(this);if(null!=e){var n=Q.GetMethod(e,ee);if(void 0!==n)return Q.Call(n,e,[t])}return Q.Call(te,t,[Q.ToString(e)])})}if(!q.symbol(B.replace)){var ne=$("replace"),re=String.prototype.replace;f(RegExp.prototype,ne,function(e,t){return Q.Call(re,e,[this,t])}),K(String.prototype,"replace",function(e,t){var n=Q.RequireObjectCoercible(this);if(null!=e){var r=Q.GetMethod(e,ne);if(void 0!==r)return Q.Call(r,e,[n,t])}return Q.Call(re,n,[Q.ToString(e),t])})}if(!q.symbol(B.split)){var ie=$("split"),oe=String.prototype.split;f(RegExp.prototype,ie,function(e,t){return Q.Call(oe,e,[this,t])}),K(String.prototype,"split",function(e,t){var n=Q.RequireObjectCoercible(this);if(null!=e){var r=Q.GetMethod(e,ie);if(void 0!==r)return Q.Call(r,e,[n,t])}return Q.Call(oe,n,[Q.ToString(e),t])})}var ae=q.symbol(B.match),se=ae&&function(){var e={};return e[B.match]=function(){return 42},42!=="a".match(e)}();if(!ae||se){var le=$("match"),ue=String.prototype.match;f(RegExp.prototype,le,function(e){return Q.Call(ue,e,[this])}),K(String.prototype,"match",function(e){var t=Q.RequireObjectCoercible(this);if(null!=e){var n=Q.GetMethod(e,le);if(void 0!==n)return Q.Call(n,e,[t])}return Q.Call(ue,t,[Q.ToString(e)])})}}var ce=function(t,n,r){g.preserveToString(n,t),Object.setPrototypeOf&&Object.setPrototypeOf(t,n),i?u(Object.getOwnPropertyNames(t),function(e){e in L||r[e]||g.proxy(t,e,n)}):u(Object.keys(t),function(e){e in L||r[e]||(n[e]=t[e])}),n.prototype=t.prototype,g.redefine(t.prototype,"constructor",n)},de=function(){return this},pe=function(e){i&&!N(e,W)&&g.getter(e,W,de)},fe=function(e,t){var n=t||function(){return this};f(e,Y,n),!e[Y]&&q.symbol(Y)&&(e[Y]=n)},he=function(e,t,n){if(function(e,t,n){i?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:n}):e[t]=n}(e,t,n),!Q.SameValue(e[t],n))throw new TypeError("property is nonconfigurable")},me=function(e,t,n,r){if(!Q.TypeIsObject(e))throw new TypeError("Constructor requires `new`: "+t.name);var i=t.prototype;Q.TypeIsObject(i)||(i=n);var o=b(i);for(var a in r)if(N(r,a)){var s=r[a];f(o,a,s,!0)}return o};if(String.fromCodePoint&&1!==String.fromCodePoint.length){var ge=String.fromCodePoint;K(String,"fromCodePoint",function(e){return Q.Call(ge,this,arguments)})}var be={fromCodePoint:function(e){for(var t,n=[],r=0,i=arguments.length;r>10))),R(n,String.fromCharCode(t%1024+56320)))}return n.join("")},raw:function(e){var t=Q.ToObject(e,"bad callSite"),n=Q.ToObject(t.raw,"bad raw value"),r=n.length,i=Q.ToLength(r);if(i<=0)return"";for(var o,a,s,l,u=[],c=0;c=e.length)return this._s=void 0,De();var n,r,i=e.charCodeAt(t);return r=i<55296||56319>>0)-1:0]=!0,a(function(){return v(e,n,function(){throw new RangeError("should not reach here")},[]),!0})};if(!Ve(Array.prototype.forEach)){var Ge=Array.prototype.forEach;K(Array.prototype,"forEach",function(e){return Q.Call(Ge,0<=this.length?this:[],arguments)})}if(!Ve(Array.prototype.map)){var He=Array.prototype.map;K(Array.prototype,"map",function(e){return Q.Call(He,0<=this.length?this:[],arguments)})}if(!Ve(Array.prototype.filter)){var ze=Array.prototype.filter;K(Array.prototype,"filter",function(e){return Q.Call(ze,0<=this.length?this:[],arguments)})}if(!Ve(Array.prototype.some)){var Ue=Array.prototype.some;K(Array.prototype,"some",function(e){return Q.Call(Ue,0<=this.length?this:[],arguments)})}if(!Ve(Array.prototype.every)){var qe=Array.prototype.every;K(Array.prototype,"every",function(e){return Q.Call(qe,0<=this.length?this:[],arguments)})}if(!Ve(Array.prototype.reduce)){var Ke=Array.prototype.reduce;K(Array.prototype,"reduce",function(e){return Q.Call(Ke,0<=this.length?this:[],arguments)})}if(!Ve(Array.prototype.reduceRight,!0)){var Xe=Array.prototype.reduceRight;K(Array.prototype,"reduceRight",function(e){return Q.Call(Xe,0<=this.length?this:[],arguments)})}var Ye=8!==Number("0o10"),Je=2!==Number("0b10"),Ze=p(Ae,function(e){return 0===Number(e+0+e)});if(Ye||Je||Ze){var Qe=Number,$e=/^0b[01]+$/i,et=/^0o[0-7]+$/i,tt=$e.test.bind($e),nt=et.test.bind(et),rt=xe.test.bind(xe),it=Pe.test.bind(Pe),ot=function(){var i=function(e){var t;"string"==typeof(t=0>>16&65535,o=65535&n,a=r>>>16&65535,s=65535&r;return o*s+(i*s+o*a<<16>>>0)|0},fround:function(e){var t=Number(e);if(0===t||t===1/0||t===-1/0||V(t))return t;var n=H(t),r=M(t);if(r>(7&r)&1,o.value?e.ports[t]|=a:e.ports[t]&=~a,e.emit("digital-read-"+i,o.value),e.emit("digital-read",{pin:i,value:o.value}))}};var b={};function y(e,n,t){if("function"!=typeof n&&void 0!==n||(t=n,n={}),!(this instanceof y))return new y(e,n,t);a.call(this);var r=this,i=Object.assign({},{reportVersionTimeout:5e3,samplingInterval:19,serialport:{baudRate:57600,bufferSize:256}},n);function o(){r.isReady=!0,r.emit("ready"),"function"==typeof t&&t()}this.isReady=!1,this.MODES={INPUT:0,OUTPUT:1,ANALOG:2,PWM:3,SERVO:4,SHIFT:5,I2C:6,ONEWIRE:7,STEPPER:8,SERIAL:10,PULLUP:11,IGNORE:127,PING_READ:117,UNKOWN:16},this.I2C_MODES={WRITE:0,READ:1,CONTINUOUS_READ:2,STOP_READING:3},this.STEPPER={TYPE:{DRIVER:1,TWO_WIRE:2,FOUR_WIRE:4},RUNSTATE:{STOP:0,ACCEL:1,DECEL:2,RUN:3},DIRECTION:{CCW:0,CW:1}},this.SERIAL_MODES={CONTINUOUS_READ:0,STOP_READING:1},this.SERIAL_PORT_IDs={HW_SERIAL0:0,HW_SERIAL1:1,HW_SERIAL2:2,HW_SERIAL3:3,SW_SERIAL0:8,SW_SERIAL1:9,SW_SERIAL2:16,SW_SERIAL3:17,DEFAULT:8},this.SERIAL_PIN_TYPES={RES_RX0:0,RES_TX0:1,RES_RX1:2,RES_TX1:3,RES_RX2:4,RES_TX2:5,RES_RX3:6,RES_TX3:7},this.RESOLUTION={ADC:null,DAC:null,PWM:null},this.HIGH=1,this.LOW=0,this.pins=[],this.ports=Array(16).fill(0),this.analogPins=[],this.version={},this.firmware={},this.currentBuffer=[],this.versionReceived=!1,this.name="Firmata",this.settings=i,this.pending=0,this.transport="object"==typeof e?e:new l.SerialPort(e,i.serialport),this.sp=this.transport,this.transport.on("close",function(){this.emit("close")}.bind(this)),this.transport.on("disconnect",function(){this.emit("disconnect")}.bind(this)),this.transport.on("open",function(){this.emit("open"),this.emit("connect")}.bind(this)),this.transport.on("error",function(e){this.isReady||"function"!=typeof t?this.emit("error",e):t(e)}.bind(this)),this.transport.on("data",function(e){for(var t,n,r,i,o,a,s=0;s>7&127,16384>14&127),2097152>21&127),268435456>28&127),n[n.length]=p):n.push(u|e,127&t,t>>7&127),v(this,n)},y.prototype.servoConfig=function(e,t,n){var r;if("object"==typeof e&&null!==e&&(e=(r=e).pin,t=r.min,n=r.max),void 0===e)throw new Error("servoConfig: pin must be specified");if(void 0===t)throw new Error("servoConfig: min must be specified");if(void 0===n)throw new Error("servoConfig: max must be specified");this.pins[e].mode=this.MODES.SERVO,v(this,[h,112,e,127&t,t>>7&127,127&n,n>>7&127,p])},y.prototype.servoWrite=function(e,t){this.analogWrite.apply(this,arguments)},y.prototype.pinMode=function(e,t){this.pins[e].mode=t,v(this,[244,e,t])},y.prototype.digitalWrite=function(e,t){var n=e>>3,r=1<<(7&e);(this.pins[e].value=t)?this.ports[n]|=r:this.ports[n]&=~r,v(this,[c|n,127&this.ports[n],this.ports[n]>>7&127])},y.prototype.digitalRead=function(e,t){this.reportDigitalPin(e,1),this.addListener("digital-read-"+e,t)},y.prototype.queryCapabilities=function(e){this.once("capability-query",e),v(this,[h,107,p])},y.prototype.queryAnalogMapping=function(e){this.once("analog-mapping-query",e),v(this,[h,105,p])},y.prototype.queryPinState=function(e,t){this.once("pin-state-"+e,t),v(this,[h,109,e,p])},y.prototype.sendString=function(e){var t=new s(e+"\0","utf8"),n=[];n.push(h),n.push(113);for(var r=0,i=t.length;r>7&127);n.push(p),v(this,n)},y.prototype.sendI2CConfig=function(e){return this.i2cConfig(e)},y.prototype.i2cConfig=function(e){var t,n=i.get(this);return n||(n={},i.set(this,n)),"number"==typeof e?t=e:"object"==typeof e&&null!==e&&(t=Number(e.delay),void 0!==e.address&&(n[e.address]||(n[e.address]={stopTX:!0})),void 0!==e.settings&&Object.assign(n[e.address],e.settings)),n.delay=t=t||0,E(this,[h,120,255&t,t>>8&255,p]),this},y.prototype.sendI2CWriteRequest=function(e,t){var n=[];t=t||[],n.push(h,118,e,this.I2C_MODES.WRITE<<3);for(var r=0,i=t.length;r>7&127);n.push(p),E(this,n)},y.prototype.i2cWrite=function(e,t,n){var r,i=[h,118,e,this.I2C_MODES.WRITE<<3];if(3===arguments.length&&!Array.isArray(t)&&!Array.isArray(n))return this.i2cWriteReg(e,t,n);2===arguments.length&&(Array.isArray(t)?t=(n=t.slice()).shift():n=[]);for(var o=0,a=(r=new s([t].concat(n))).length;o>7&127);return i.push(p),E(this,i),this},y.prototype.i2cWriteReg=function(e,t,n){return E(this,[h,118,e,this.I2C_MODES.WRITE<<3,127&t,t>>7&127,127&n,n>>7&127,p]),this},y.prototype.sendI2CReadRequest=function(e,t,n){E(this,[h,118,e,this.I2C_MODES.READ<<3,127&t,t>>7&127,p]),this.once("I2C-reply-"+e+"-0",n)},y.prototype.i2cRead=function(e,t,n,r){3===arguments.length&&"number"==typeof t&&"function"==typeof n&&(r=n,n=t,t=null);var i="I2C-reply-"+e+"-",o=[h,118,e,this.I2C_MODES.CONTINUOUS_READ<<3];return null!==t?o.push(127&t,t>>7&127):t=0,i+=t,o.push(127&n,n>>7&127,p),this.on(i,r),E(this,o),this},y.prototype.i2cStop=function(t){null!=t&&("number"==typeof t&&(t={address:t}),v(this,[h,118,t.address,this.I2C_MODES.STOP_READING<<3,p]),Object.keys(this._events).forEach(function(e){e.startsWith("I2C-reply-"+t.address)&&this.removeAllListeners(e)},this))},y.prototype.i2cReadOnce=function(e,t,n,r){3===arguments.length&&"number"==typeof t&&"function"==typeof n&&(r=n,n=t,t=null);var i="I2C-reply-"+e+"-",o=[h,118,e,this.I2C_MODES.READ<<3];return null!==t?o.push(127&t,t>>7&127):t=0,i+=t,o.push(127&n,n>>7&127,p),this.once(i,r),E(this,o),this},y.prototype.sendOneWireConfig=function(e,t){v(this,[h,115,65,e,t?1:0,p])},y.prototype.sendOneWireSearch=function(e,t){this._sendOneWireSearch(64,"1-wire-search-reply-"+e,e,t)},y.prototype.sendOneWireAlarmsSearch=function(e,t){this._sendOneWireSearch(68,"1-wire-search-alarms-reply-"+e,e,t)},y.prototype._sendOneWireSearch=function(e,t,n,r){v(this,[h,115,e,n,p]);var i=setTimeout(function(){r(new Error("1-Wire device search timeout - are you running ConfigurableFirmata?"))},5e3);this.once(t,function(e){clearTimeout(i),r(null,e)})},y.prototype.sendOneWireRead=function(e,t,n,r){var i=Math.floor(255*Math.random()),o=setTimeout(function(){r(new Error("1-Wire device read timeout - are you running ConfigurableFirmata?"))},5e3);this._sendOneWireRequest(e,8,t,n,i,null,null,"1-wire-read-reply-"+i,function(e){clearTimeout(o),r(null,e)})},y.prototype.sendOneWireReset=function(e){this._sendOneWireRequest(e,1)},y.prototype.sendOneWireWrite=function(e,t,n){this._sendOneWireRequest(e,32,t,null,null,null,Array.isArray(n)?n:[n])},y.prototype.sendOneWireDelay=function(e,t){this._sendOneWireRequest(e,16,null,null,null,t)},y.prototype.sendOneWireWriteAndRead=function(e,t,n,r,i){var o=Math.floor(255*Math.random()),a=setTimeout(function(){i(new Error("1-Wire device read timeout - are you running ConfigurableFirmata?"))},5e3);this._sendOneWireRequest(e,40,t,r,o,null,Array.isArray(n)?n:[n],"1-wire-read-reply-"+o,function(e){clearTimeout(a),i(null,e)})},y.prototype._sendOneWireRequest=function(e,t,n,r,i,o,a,s,l){var u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];(n||r||i||o||a)&&(t|=60),n&&u.splice.apply(u,[0,8].concat(n)),r&&(u[8]=255&r,u[9]=r>>8&255),i&&(u[10]=255&i,u[11]=i>>8&255),o&&(u[12]=255&o,u[13]=o>>8&255,u[14]=o>>16&255,u[15]=o>>24&255),a&&a.forEach(function(e){u.push(e)});var c=[h,115,t,e];(c=c.concat(d.to7BitArray(u))).push(p),v(this,c),s&&l&&this.once(s,l)},y.prototype.setSamplingInterval=function(e){var t=e<10?10:65535>7&127,p])},y.prototype.getSamplingInterval=function(){return this.settings.samplingInterval},y.prototype.reportAnalogPin=function(e,t){0!==t&&1!==t||(this.pins[this.analogPins[e]].report=t,v(this,[192|e,t]))},y.prototype.reportDigitalPin=function(e,t){var n=e>>3;0!==t&&1!==t||(this.pins[e].report=t,v(this,[208|n,t]))},y.prototype.pingRead=function(e,t){if(-1===this.pins[e.pin].supportedModes.indexOf(117))throw new Error("Please upload PingFirmata to the board");var n=e.pin,r=e.value,i=e.pulseOut||0,o=e.timeout||1e6,a=[i>>24&255,i>>16&255,i>>8&255,255&i],s=[o>>24&255,o>>16&255,o>>8&255,255&o];v(this,[h,117,n,r,127&a[0],a[0]>>7&127,127&a[1],a[1]>>7&127,127&a[2],a[2]>>7&127,127&a[3],a[3]>>7&127,127&s[0],s[0]>>7&127,127&s[1],s[1]>>7&127,127&s[2],s[2]>>7&127,127&s[3],s[3]>>7&127,p]),this.once("ping-read-"+n,t)},y.prototype.stepperConfig=function(e,t,n,r,i,o,a){var s=[h,114,0,e,t,127&n,n>>7&127,r,i];t===this.STEPPER.TYPE.FOUR_WIRE&&s.push(o,a),s.push(p),v(this,s)},y.prototype.stepperStep=function(e,t,n,r,i,o,a){"function"==typeof i&&(a=i,o=i=0);var s=[h,114,1,e,t,127&n,n>>7&127,n>>14&127,127&r,r>>7&127];(0>7&127,127&o,o>>7&127),s.push(p),v(this,s),this.once("stepper-done-"+e,a)},y.prototype.serialConfig=function(e){var t,n,r,i;if("object"==typeof e&&null!==e&&(t=e.portId,n=e.baud,r=e.rxPin,i=e.txPin),void 0===t)throw new Error("portId must be specified, see SERIAL_PORT_IDs for options.");var o=[h,96,16|t,127&(n=n||57600),n>>7&127,n>>14&127];if(7>7&127);n.push(p),0>7&127)),r.push(p),v(this,r),this.on("serial-data-"+e,n)},y.prototype.serialStop=function(e){v(this,[h,96,48|e,this.SERIAL_MODES.STOP_READING,p]),this.removeAllListeners("serial-data-"+e)},y.prototype.serialClose=function(e){v(this,[h,96,80|e,p])},y.prototype.serialFlush=function(e){v(this,[h,96,96|e,p])},y.prototype.serialListen=function(e){e<8||v(this,[h,96,112|e,p])},y.prototype.sysexResponse=function(e,t){if(y.SYSEX_RESPONSE[e])throw new Error(e+" is not an available SYSEX_RESPONSE byte");return y.SYSEX_RESPONSE[e]=function(e){t(e.currentBuffer.slice(2,-1))},this},y.prototype.sysexCommand=function(e){if(!e||!e.length)throw new Error("Sysex Command cannot be empty");var t=e.slice();return t.unshift(h),t.push(p),v(this,t),this},y.prototype.reset=function(){v(this,[255])},y.isAcceptablePort=function(e){return!!/usb|acm|^com/i.test(e.comName)},y.requestPort=function(r){l.list(function(e,t){var n=t.find(function(e){if(y.isAcceptablePort(e))return e});n?r(null,n):r(new Error("No Acceptable Port Found"),null)})},(y.Board=y).SYSEX_RESPONSE=b,y.MIDI_RESPONSE=g,y.encode=function(e){for(var t=[],n=e.length,r=0;r>7&127);return t},y.decode=function(e){var t=[];if(e.length%2!=0)throw new Error("Board.decode(data) called with odd number of data bytes");for(;e.length;){var n=e.shift(),r=e.shift();t.push(n|r<<7)}return t},e.env.IS_TEST_MODE&&(y.test={writeToTransport:v,i2cPeripheralSettings:function(e){return i.get(e)},get i2cActive(){return i}}),t.exports=y}).call(this,n(122).Buffer,n(36))},2493:function(a,e,d){(function(e){var s=d(203),t=d(61).EventEmitter,n=d(94),r=d(882),l=new Map,i={INPUT:0,OUTPUT:1,ANALOG:2,PWM:3,SERVO:4};function u(e){if(!(this instanceof u))return new u(e);if(void 0===e||"object"==typeof e&&void 0===e.addr&&void 0===e.pin)throw new Error("Pins must have a pin number");var t="object"==typeof e?e.addr||e.pin||0:e,n=u.isAnalog(e),r=!1;s.Component.call(this,e=s.Options(e)),e.addr=e.addr||e.pin,this.io.analogPins.includes(t)&&(r=!(n=!1));var i=r?t:"object"!=typeof e?e:e.addr,o=e.type||(n?"analog":"digital"),a={mode:null,last:null,value:0};l.set(this,a),Object.defineProperties(this,{type:{get:function(){return o}},addr:{get:function(){return i}},value:{get:function(){return a.value}},mode:{set:function(e){l.get(this).mode=e,this.io.pinMode(this.addr,e)},get:function(){return l.get(this).mode}}}),this.mode=void 0!==e.as?e.as:void 0!==e.mode?e.mode:n?2:1,this.freq=void 0!==e.freq?e.freq:20,0!==this.mode&&2!==this.mode||c(this),"digital"===o&&Object.defineProperties(this,{isHigh:{get:function(){return!!a.value}},isLow:{get:function(){return!a.value}}})}function c(n){var r=l.get(n);n.io[n.type+"Read"](n.addr,function(e){r.value=e}),setInterval(function(){var e,t;e=r.value?"low":"high",t=r.value?"high":"low",r.mode===i.INPUT&&(null===r.last&&(r.last=e),r.last===e&&(r.last=t,n.emit(t,r.value),n.emit("change",r.value))),n.emit("data",r.value)},n.freq)}function o(e){if(!(this instanceof o))return new o(e);Object.defineProperty(this,"type",{value:u}),r.call(this,e)}n.inherits(u,t),Object.keys(i).forEach(function(e){Object.defineProperty(u,e,{value:i[e]})}),u.isAnalog=function(e){return!("string"!=typeof e||!u.isPrefixed(e,["I","A"]))||("object"==typeof e?u.isAnalog(void 0!==e.addr?e.addr:e.pin):void 0)},u.isPrefixed=function(n,e){return n=n[0],e.reduce(function(e,t){return e||t===n},!1)},u.write=function(e,t){l.get(e).value=t,e.mode=i.OUTPUT,e.io[e.type+"Write"](e.addr,t),e.emit("write",null,t)},u.read=function(e,t){var n=!1;"digital"===e.type&&0!==e.mode&&(n=!0,e.mode=i.INPUT),"analog"===e.type&&2!==e.mode&&(n=!0,e.mode=i.ANALOG),n&&c(e),e.on("data",function(){t.call(e,null,e.value)})},u.prototype.query=function(e){var t=this.addr;return"analog"===this.type&&(t=this.io.analogPins[this.addr]),this.io.queryPinState(t,function(){e(this.io.pins[t])}.bind(this)),this},u.prototype.high=function(){var e="analog"===this.type?255:1;return u.write(this,e),this.emit("high"),this},u.prototype.low=function(){return u.write(this,0),this.emit("low"),this},["read","write"].forEach(function(t){u.prototype[t]=function(e){return u[t](this,e),this}}),n.inherits(o,r),["high","low","write"].forEach(function(n){o.prototype[n]=function(){for(var e=this.length,t=0;t>this.rows-1-i,r&=1,this.led(e,i,t,r);return this},u.prototype.draw=function(n,t){var e;if(1===arguments.length)t=n,this.each(function(e){this.draw(e,t)});else if(this.isMatrix){if(void 0!==(e=Array.isArray(t)?t:a.MATRIX_CHARS[t])){if(e.length!==this.rows&&e.length!==this.columns)throw new Error("Invalid character: "+e);for(var r=e.length,i=0;i>8);this.io.i2cWrite(this.addresses[e],t)},row:function(e,t,n){if(!this.isMatrix)throw new Error("The `row` method is only supported for Matrix devices");if("number"==typeof n&&(n=("0000000000000000"+parseInt(n,10).toString(2)).substr(0-this.columns,this.columns)),2===arguments.length)n=t,t=e,this.each(function(e){this.row(e,t,n)});else for(var r=0;r>n,this.memory[i+t]=r?this.memory[i+t]|o:(o=~o,this.memory[i+t]&o),this.send(e,t+1,this.memory[i+t])),this},row:function(e,t,n){if(!this.isMatrix)throw new Error("The `row` method is only supported for Matrix devices");var r;return"string"==typeof n&&(n=parseInt(n,2)),2===arguments.length?(n=t,t=e,this.each(function(e){this.row(e,t,n)})):(r=e*this.columns,this.memory[r+t]=n,this.send(e,t+1,this.memory[r+t])),this},scanLimit:function(e,t){return 1===arguments.length?(t=e,this.each(function(e){this.scanLimit(e,t)})):this.send(e,u.OP.SCANLIMIT,t),this},send:function(e,t,n){if(3!==arguments.length)throw new Error("`send` expects three arguments: device, opcode, data");var r=2*e,i=2*this.devices,o=[];if(e>>4}u.MATRIX_DIMENSIONS={"16x8":{rows:16,columns:8},"8x16":{rows:8,columns:16},"8x8":{rows:8,columns:8}},u.MATRIX_CHARS=a.MATRIX_CHARS,u.DIGIT_CHARS=a.DIGIT_CHARS,e.env.IS_TEST_MODE&&(u.Controllers=i,u.purge=function(){r=new Set([112,113,114,115,116,117,118,119]),s.clear()}),f.exports=u}).call(this,h(36))},2496:function(a,e,s){(function(e){var l=s(203),u=s(293),t=s(61),n=s(94),r=s(882),i=s(1947),c=new Map;function d(n){if(!(this instanceof d))return new d(n);var r=1023,i=null,t=-1,o=[];l.Component.call(this,n=l.Options(n)),n.type||(n.type="analog"),this.io.RESOLUTION&&this.io.RESOLUTION.ADC&&this.io.RESOLUTION.ADC!==r&&(r=this.io.RESOLUTION.ADC),this.mode="digital"===n.type?this.io.MODES.INPUT:this.io.MODES.ANALOG,this.io.pinMode(this.pin,this.mode);var a={enabled:void 0===n.enabled||n.enabled,booleanBarrier:"digital"===n.type?0:null,intervalId:null,scale:null,value:0,median:0,freq:n.freq||25,previousFreq:n.freq||25};c.set(this,a),this.range=n.range||[0,r],this.limit=n.limit||null,this.threshold=void 0===n.threshold?1:n.threshold,this.isScaled=!1,this.io[n.type+"Read"](this.pin,function(e){i=e,"digital"!==n.type&&o.push(i)}.bind(this));var s=function(){var e;if(null,"digital"===n.type)return this.emit("data",i),void(t!==i&&(this.emit("change",i),t=i));0=t+this.threshold)&&(this.emit("change",a.median),t=a.median),this.limit&&(a.median<=this.limit[0]&&(e="lower"),a.median>=this.limit[1]&&(e="upper"),e&&(this.emit("limit",{boundary:e,value:a.median}),this.emit("limit:"+e,a.median))),o.length=0}.bind(this);Object.defineProperties(this,{raw:{get:function(){return i}},analog:{get:function(){return"digital"===n.type?i:null===i?0:0|u.map(this.raw,0,r,0,255)}},constrained:{get:function(){return"digital"===n.type?i:null===i?0:u.constrain(this.raw,0,255)}},boolean:{get:function(){var e=c.get(this),t=e.booleanBarrier,n=e.scale||[0,r];return null===t&&(t=n[0]+(n[1]-n[0])/2),this.value>t}},scaled:{get:function(){var e,t;return a.scale&&null!==i?"digital"===n.type?a.scale[i]:(e=u.fmap(i,this.range[0],this.range[1],a.scale[0],a.scale[1]),t=Math.round(e),u.constrain(t,a.scale[0],a.scale[1])):this.constrained}},freq:{get:function(){return a.freq},set:function(e){a.freq=e,a.intervalId&&clearInterval(a.intervalId),null!==a.freq&&(a.intervalId=setInterval(s,e))}},value:{get:function(){return a.scale?(this.isScaled=!0,this.scaled):i}},resolution:{get:function(){return r}}}),e.env.IS_TEST_MODE&&Object.defineProperties(this,{state:{get:function(){return c.get(this)}}}),a.enabled&&(this.freq=a.freq)}function o(e){if(!(this instanceof o))return new o(e);Object.defineProperty(this,"type",{value:d}),r.Emitter.call(this,e)}n.inherits(d,t.EventEmitter),Object.assign(d.prototype,i),d.prototype.enable=function(){var e=c.get(this);return e.enabled||(this.freq=e.freq||e.previousFreq),this},d.prototype.disable=function(){var e=c.get(this);return e.enabled&&(e.enabled=!1,e.previousFreq=e.freq,this.freq=null),this},d.prototype.scale=function(e,t){return this.isScaled=!0,c.get(this).scale=Array.isArray(e)?e:[e,t],this},d.prototype.scaleTo=function(e,t){var n=Array.isArray(e)?e:[e,t];return u.map(this.raw,0,this.resolution,n[0],n[1])},d.prototype.fscaleTo=function(e,t){var n=Array.isArray(e)?e:[e,t];return u.fmap(this.raw,0,this.resolution,n[0],n[1])},d.prototype.booleanAt=function(e){return c.get(this).booleanBarrier=e,this},n.inherits(o,r.Emitter),r.installMethodForwarding(o.prototype,d.prototype),d.Collection=o,e.env.IS_TEST_MODE&&(d.purge=function(){c.clear()}),a.exports=d}).call(this,s(36))},2497:function(e,t,n){var o=n(2492),a=n(2476),d=(n(61).EventEmitter,n(122).Buffer),p=new Map,f=64;function r(e){var t=e.port;delete e.port,o.Board.call(this,t,e);var i={handlers:{}};p.set(this,i),r.hasRegisteredSysexResponse||(this.on("ready",function(){this.sysexResponse(f,function(e){var t=o.decode(e),n=t.shift(),r=i.handlers[n];"function"==typeof r&&r(t)})}.bind(this)),r.hasRegisteredSysexResponse=!0)}r.hasRegisteredSysexResponse=!1,r.prototype=Object.create(o.Board.prototype,{constructor:{value:r}}),r.Pixel={initialize:{value:function(e){}},write:{writable:!0,value:function(e){e.red&=255,e.green&=255,e.blue&=255,this.pin&=127;var t=e.red>>1,n=(1&e.red)<<6|e.green>>2,r=(3&e.green)<<5|e.blue>>3,i=(7&e.blue)<<4;this.io.sysexCommand([f,16,this.pin,t,n,r,i]),this.io.sysexCommand([f,17])}}},r.Piezo={frequency:{value:function(e,t){t=t||0;var n=127&(e&=16383),r=e>>7,i=127&(t&=16383),o=t>>7;this.io.sysexCommand([f,32,n,r,i,o])}},noTone:{value:function(){this.io.sysexCommand([f,33])}}},r.Accelerometer={initialize:{value:function(e,n){var i=this,t=p.get(this.io);t.handlers[54]=function(e){var t=new d(e);n({x:t.readFloatLE(0),y:t.readFloatLE(4),z:t.readFloatLE(8)})},t.handlers[55]=function(e){var t=e[0],n=0<(48&t),r={};n&&0<(16&t)&&(r.single=!0,i.emit("tap:single")),n&&0<(32&t)&&(r.double=!0,i.emit("tap:double")),n&&i.emit("tap",r)},this.on("newListener",function(e,t){"data"!==e&&"change"!==e||this.io.sysexCommand([f,58]),e.startsWith("tap")&&this.io.sysexCommand([f,56])}.bind(this))}},toGravity:{value:function(e){return e}},stop:{value:function(){var t=this;Object.keys(this._events).forEach(function(e){t.removeAllListeners(e)}),this.io.sysexCommand([f,59])}}};var h={down:["down","press","tap","impact","hit","touch"],up:["up","release"],hold:["hold"]};r.Touchpad={initialize:{value:function(s,e){var l=this,t=p.get(this.io),n=[0,1,2,3,6,9,10,12],u=a(function(e,t){var n={type:e,which:t,timestamp:Date.now()};h[e].forEach(function(e){l.listenerCount(e)&&l.emit(e,n)}),l.emit("change",n)},5),c={touches:function(e){return Array.from({length:e},function(){return{timeout:null,value:0}})}(8),timeout:null,pads:n,holdtime:s.holdtime||500};p.set(this,c),s.pads.forEach(function(e){l.io.sysexCommand([f,65,127&e])});var r=0,i=n.reduce(function(e,t,n){return e[t]=n,e},{});t.handlers[67]=function(e){var t=e[0],n=i[t];300<=new d(e).readInt16LE(1)?r|=1<=c.touches[a].timeout&&(c.touches[a].timeout=n+c.holdtime,i.hold.push(o)),c.touches[a].value=1):(1===c.touches[a].value&&(c.touches[a].timeout=null,i.up.push(o)),c.touches[a].value=0),o=null);Object.keys(i).forEach(function(e){i[e].length&&u(e,i[e])})}}},toAlias:{value:function(e){return p.get(this).pads[e]}},toIndices:{value:function(e){p.get(this);for(var t=[],n=0;n<8;n++)e&1<",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,t){t=c(t||this.defaultElement||this)[0],this.element=c(t),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=c(),this.hoverable=c(),this.focusable=c(),this.classesElementLookup={},t!==this&&(c.data(t,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===t&&this.destroy()}}),this.document=c(t.style?t.ownerDocument:t.document||t),this.window=c(this.document[0].defaultView||this.document[0].parentWindow)),this.options=c.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:c.noop,_create:c.noop,_init:c.noop,destroy:function(){var n=this;this._destroy(),c.each(this.classesElementLookup,function(e,t){n._removeClass(t,e)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:c.noop,widget:function(){return this.element},option:function(e,t){var n,r,i,o=e;if(0===arguments.length)return c.widget.extend({},this.options);if("string"==typeof e)if(o={},e=(n=e.split(".")).shift(),n.length){for(r=o[e]=c.widget.extend({},this.options[e]),i=0;it.releaseReading+t.connectedDelta&&!t.connected?(t.emit("down"),t.connected=!0):e>>3&&(u.x=p(e[0],e[1])>>4,u.y=p(e[2],e[3])>>4,u.z=p(e[4],e[5])>>4,t(u))}.bind(this)),this.io.i2cRead(r,this.REGISTER.PULSE_SRC,1,function(e){var t=e[0],n=127&t;128&t&&(this.emit("tap"),n>>2&1&&(this.emit("tap:single"),n>>3&1&&this.emit("tap:double")))}.bind(this))}},toGravity:{value:function(e){return e/(2048*f.get(this).scale)}}},MMA7660:{ADDRESSES:{value:[76]},REGISTER:{value:{READREGISTER:0,RATE:8,MODE:7}},initialize:{value:function(e,t){var n=e.address||this.ADDRESSES[0];f.get(this).sensitivity=21.33,e.address=n,this.io.i2cConfig(e),this.io.i2cWrite(n,this.REGISTER.MODE,0),this.io.i2cWrite(n,this.REGISTER.RATE,7),this.io.i2cWrite(n,this.REGISTER.MODE,1),this.io.i2cRead(n,this.REGISTER.READREGISTER,3,function(e){t({x:(e[0]<<2)/4,y:(e[1]<<2)/4,z:(e[2]<<2)/4})})}},toGravity:{value:function(e){return e/f.get(this).sensitivity}}},ESPLORA:{DEFAULTS:{value:{zeroV:[320,330,310],sensitivity:170}},initialize:{value:function(e,t){this.pins=[5,11,6],s.call(this,e,t)}},toGravity:{value:y}},LIS3DH:{ADDRESSES:{value:[24]},REGISTER:{value:{OUT_X_L:40,CTRL_REG1:32,CTRL_REG2:33,CTRL_REG3:34,CTRL_REG4:35,CTRL_REG5:36,TEMP_CFG_REG:31,CLICK_CFG:56,CLICK_SRC:57,CLICK_THS:58,TIME_LIMIT:59,TIME_LATENCY:60,TIME_WINDOW:61}},initialize:{value:function(e,n){var i=f.get(this),o=e.address||24,t={2:0,4:1,8:2,16:3}[e.range||4];void 0===t&&(t=1);var r=[16380,8190,4096,1365][t];void 0===r&&(r=1);var a=[80,40,20,10][t];void 0===a&&(a=10),i.divider=r,i.expander=l.get({address:o,controller:this.controller,bus:this.bus});var s=136|t<<4;i.expander.i2cWrite(o,this.REGISTER.CTRL_REG4,s),i.expander.i2cReadOnce(o,this.REGISTER.CTRL_REG1,1,function(e){var t=e[0];t&=-241,t|=96,i.expander.i2cWrite(o,this.REGISTER.CTRL_REG1,t),i.expander.i2cRead(o,128|this.REGISTER.OUT_X_L,6,function(e){n({x:u.int16(e[1],e[0]),y:u.int16(e[3],e[2]),z:u.int16(e[5],e[4])})}),i.expander.i2cWrite(o,this.REGISTER.CTRL_REG3,128),i.expander.i2cWrite(o,this.REGISTER.CTRL_REG5,8),i.expander.i2cWrite(o,this.REGISTER.CLICK_CFG,42);i.expander.i2cWrite(o,this.REGISTER.CLICK_THS,a),i.expander.i2cWrite(o,this.REGISTER.TIME_LIMIT,10),i.expander.i2cWrite(o,this.REGISTER.TIME_LATENCY,20),i.expander.i2cWrite(o,this.REGISTER.TIME_WINDOW,255);var r=null;i.expander.i2cRead(o,this.REGISTER.CLICK_SRC,1,function(e){var t=e[0],n=Date.now();null===r&&(r=n-101),n<]/g}},2573:function(a,e,s){(function(r){var e=s(61).EventEmitter,i=s(2881),t=s(94),o=new Map;function n(e){if(n.isActive)return n.ref;if(n.isActive=!0,!(this instanceof n))return new n(e);this.context={},this.ready=!1;var t={opts:e,board:e.board};o.set(this,t),n.ref=this}t.inherits(n,e),n.isActive=!1,n.isBlocked=!1,n.ref=null,n.prototype.initialize=function(e){var t=o.get(this);r.stdin.resume(),r.stdin.setEncoding("utf8");t.board.info("Repl","Initialized");var n=i.start({prompt:">> ",useGlobal:!1});this.ready=!0,this.cmd=n,this.context=n.context,n.on("exit",function(){t.board.emit("exit"),t.board.warn("Board","Closing.");var e=setInterval(function(){t.board.io.pending||(clearInterval(e),r.nextTick(r.reallyExit))},1)}),this.inject(t.opts),e&&r.nextTick(e)},n.prototype.close=function(){this.cmd.emit("exit")},n.prototype.inject=function(t){Object.keys(t).forEach(function(e){Object.defineProperty(this.context,e,Object.getOwnPropertyDescriptor(t,e))},this)},a.exports=n}).call(this,s(36))},2574:function(e,t){e.exports=function e(t){if(!(this instanceof e))return new e(t);var n={};"number"==typeof t||"string"==typeof t?n.pin=t:Array.isArray(t)?n.pins=t:n=t,Object.assign(this,n)}},2575:function(o,e,a){"use strict";(function(l,i){var u=a(61).EventEmitter,e=a(94),c=[7,8],d=[1,2],p=["none","even","mark","odd","space"],f=["RTSCTS"],h=9600,m="none",g=!1,b=8,y=1,v=256;function t(e,i,t,o){u.call(this);var n,r=this,a=Array.prototype.slice.call(arguments);if("function"!=typeof(o=a.pop())&&(o=null),t=null==t||t,o=o||function(e){e&&r.emit("error",e)},(i="function"!=typeof i&&i||{}).baudRate=i.baudRate||i.baudrate||h,i.dataBits=i.dataBits||i.databits||b,-1===c.indexOf(i.dataBits))return n=new Error('Invalid "databits": '+i.dataBits),void o(n);if(i.stopBits=i.stopBits||i.stopbits||y,-1===d.indexOf(i.stopBits))return n=new Error('Invalid "stopbits": '+i.stopbits),void o(n);if(i.parity=i.parity||m,-1===p.indexOf(i.parity))return n=new Error('Invalid "parity": '+i.parity),void o(n);if(!e)return n=new Error("Invalid port specified: "+e),void o(n);if(i.rtscts=g,i.flowControl||i.flowcontrol){var s=i.flowControl||i.flowcontrol;if("boolean"==typeof s)i.rtscts=!0;else if(!s.every(function(e){var t=e.toUpperCase(),n=f.indexOf(t);if(n<0){var r=new Error('Invalid "flowControl": '+t+". Valid options: "+f.join(", "));return o(r),!1}switch(n){case 0:i.rtscts=!0}return!0}))return}if(i.bufferSize=i.bufferSize||i.buffersize||v,i.serial=i.serial||"undefined"!=typeof chrome&&chrome.serial,!i.serial)throw new Error("No access to serial ports. Try loading as a Chrome Application.");this.options=function(e){switch(e.dataBits){case 7:e.dataBits="seven";break;case 8:e.dataBits="eight"}switch(e.stopBits){case 1:e.stopBits="one";break;case 2:e.stopBits="two"}switch(e.parity){case"none":e.parity="no"}return e}(i),this.options.serial.onReceiveError.addListener(function(e){switch(e.error){case"disconnected":case"device_lost":case"system_error":n=new Error("Disconnected"),r.options.disconnectedCallback?r.options.disconnectedCallback(n):r.emit("disconnect",n),0<=r.connectionId&&r.close()}}),this.path=e,t&&l.nextTick(function(){r.open(o)})}function r(e){for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),r=0;r>7):(r.push(e<>1),t=0):n=e>>8-++t)}),0>3,n=[],r=0;r>a|e[o+1]<<7-a&255}return n}}},2577:function(r,e,i){(function(e){var a=i(203),s=i(293),t=i(61).EventEmitter,n=i(94),l={MPL3115A2:{requirements:{value:{options:{elevation:{throws:!1,message:"Missing `elevation` option. Without a specified base `elevation`, the altitude measurement will be inaccurate. Use the meters value shown on whatismyelevation.com",typeof:"number"}}}},initialize:{value:function(e,t){i(197).Drivers.get(this.board,"MPL3115A2",e).on("data",function(e){t(e.altitude)})}},toMeters:{value:function(e){return s.toFixed(e,1)}}},MS5611:{initialize:{value:function(e,t){i(197).Drivers.get(this.board,"MS5611",e).on("data",function(e){t(e.altitude)})}},toMeters:{value:function(e){return s.toFixed(e,2)}}},BMP180:{initialize:{value:function(e,t){i(197).Drivers.get(this.board,"BMP180",e).on("data",function(e){t(e.altitude)})}},toMeters:{value:function(e){return s.toFixed(e,2)}}},BMP280:{initialize:{value:function(e,t){i(197).Drivers.get(this.board,"BMP280",e).on("data",function(e){t(e.altitude)})}},toMeters:{value:function(e){return s.toFixed(e,2)}}},BME280:{initialize:{value:function(e,t){i(197).Drivers.get(this.board,"BME280",e).on("data",function(e){t(e.altitude)})}},toMeters:{value:function(e){return s.toFixed(e,2)}}}};l.BMP085=l["BMP-085"]=l.BMP180;var u=new Map;function c(e){if(!(this instanceof c))return new c(e);var t,n=null,r=null,i=null;if(a.Component.call(this,e=a.Options(e)),t=e.freq||25,null==(n=e.controller&&"string"==typeof e.controller?l[e.controller.toUpperCase()]:e.controller))throw new Error("Altimeter expects a valid controller");u.set(this,{}),a.Controller.call(this,n,e),this.toMeters||(this.toMeters=e.toMeters||function(e){return e});var o={meters:{get:function(){return this.toMeters(i)}},feet:{get:function(){return s.toFixed(3.28084*this.meters,2)}}};o.m=o.meters,o.ft=o.feet,Object.defineProperties(this,o),"function"==typeof this.initialize&&this.initialize(e,function(e){i=e}),setInterval(function(){if(null!=i){var e={};e.m=e.meters=this.meters,e.ft=e.feet=this.feet,this.emit("data",e),this.meters!==r&&(r=this.meters,this.emit("change",e))}}.bind(this),t)}n.inherits(c,t),e.env.IS_TEST_MODE&&(c.Controllers=l,c.purge=function(){u.clear()}),r.exports=c}).call(this,i(36))},2578:function(r,e,i){(function(e){var t=i(61).EventEmitter,n=i(94),o=i(203),a=i(293).toFixed,s={MPL115A2:{initialize:{value:function(e,t){i(197).Drivers.get(this.board,"MPL115A2",e).on("data",function(e){t.call(this,e.pressure)}.bind(this))}},toPressure:{value:function(e){return 65/1023*e+50}}},MPL3115A2:{initialize:{value:function(e,t){i(197).Drivers.get(this.board,"MPL3115A2",e).on("data",function(e){t.call(this,e.pressure)}.bind(this))}},toPressure:{value:function(e){return 3.39*(e/4/3377)}}},BMP180:{initialize:{value:function(e,t){i(197).Drivers.get(this.board,"BMP180",e).on("data",function(e){t.call(this,e.pressure)}.bind(this))}},toPressure:{value:function(e){return e/1e3}}},BMP280:{initialize:{value:function(e,t){i(197).Drivers.get(this.board,"BMP280",e).on("data",function(e){t.call(this,e.pressure)}.bind(this))}},toPressure:{value:function(e){return e/1e3}}},BME280:{initialize:{value:function(e,t){i(197).Drivers.get(this.board,"BME280",e).on("data",function(e){t.call(this,e.pressure)}.bind(this))}},toPressure:{value:function(e){return e/1e3}}},MS5611:{initialize:{value:function(e,t){i(197).Drivers.get(this.board,"MS5611",e).on("data",function(e){t.call(this,e.pressure)}.bind(this))}},toPressure:{value:function(e){return e/1e3}}}};function l(e){if(!(this instanceof l))return new l(e);var t=null,n=null,r=null;o.Component.call(this,e=o.Options(e));var i=e.freq||25;if(null==(t=e.controller&&"string"==typeof e.controller?s[e.controller.toUpperCase()]:e.controller))throw new Error("Missing Barometer controller");o.Controller.call(this,t,e),this.toPressure||(this.toPressure=e.toPressure||function(e){return e}),"function"==typeof this.initialize&&this.initialize(e,function(e){r=e}),Object.defineProperties(this,{pressure:{get:function(){return a(this.toPressure(r),4)}}}),setInterval(function(){if(null!==r){var e={pressure:this.pressure};this.emit("data",e),this.pressure!==n&&(n=this.pressure,this.emit("change",e))}}.bind(this),i)}s.BMP085=s.BMP180,n.inherits(l,t),e.env.IS_TEST_MODE&&(l.Controllers=s,l.purge=function(){}),r.exports=l}).call(this,i(36))},2579:function(o,e,a){(function(e){var n=a(203),t=a(61),r=a(94),i=a(293),s=i.sum,l=i.toFixed,u=new Map,c=["x","y","z"],d={ANALOG:{initialize:{value:function(e,n){var t,r,i=e.pins||[],o=u.get(this),a={};if(void 0===e.sensitivity)throw new Error("Expected a Sensitivity");t=e.sensitivity,r=e.resolution||4.88,o.K=r/t,i.forEach(function(e,t){this.io.pinMode(e,this.io.MODES.ANALOG),this.io.analogRead(e,function(e){a[c[t]]=e,n(a)}.bind(this))},this)}},toNormal:{value:function(e){return e>>2}},toDegreesPerSecond:{value:function(e,t){return(this.toNormal(e)-this.toNormal(t))*u.get(this).K|0}}},MPU6050:{initialize:{value:function(e,t){var n=a(197),r=u.get(this),i=n.Drivers.get(this.board,"MPU6050",e);r.sensitivity=e.sensitivity||131,i.on("data",function(e){t(e.gyro)})}},toNormal:{value:function(e){return 127+(e>>11)}},toDegreesPerSecond:{value:function(e,t){return(e-t)/u.get(this).sensitivity}}},BNO055:{initialize:{value:function(e,t){var n=a(197),r=u.get(this),i=n.Drivers.get(this.board,"BNO055",e);r.sensitivity=16,i.on("data",function(e){t(e.gyro)})}},toNormal:{value:function(e){return e}},toDegreesPerSecond:{value:function(e){return e/u.get(this).sensitivity}}}};function p(e){if(!(this instanceof p))return new p(e);var t=null,o=!1,a={x:{angle:0,value:0,previous:0,calibration:[],stash:[0,0,0,0,0],center:0,hasValue:!1},y:{angle:0,value:0,previous:0,calibration:[],stash:[0,0,0,0,0],center:0,hasValue:!1},z:{angle:0,value:0,previous:0,calibration:[],stash:[0,0,0,0,0],center:0,hasValue:!1}};n.Component.call(this,e=n.Options(e)),null==(t=e.controller&&"string"==typeof e.controller?d[e.controller.toUpperCase()]:e.controller)&&(t=d.ANALOG),n.Controller.call(this,t,e),this.toNormal||(this.toNormal=e.toNormal||function(e){return e}),this.toDegreesPerSecond||(this.toDegreesPerSecond=e.toDegreesPerSecond||function(e){return e}),u.set(this,a),"function"==typeof this.initialize&&this.initialize(e,function(r){var i=!1;Object.keys(r).forEach(function(e){var t=r[e],n=a[e];n.previous=n.value,n.stash.shift(),n.stash.push(t),n.hasValue=!0,n.value=s(n.stash)/5|0,o||100!==a.x.calibration.length||100!==a.y.calibration.length||void 0!==this.z&&100!==a.z.calibration.length?n.calibration.length<100&&n.calibration.push(t):(o=!0,a.x.center=s(a.x.calibration)/100|0,a.y.center=s(a.y.calibration)/100|0,a.z.center=s(a.z.calibration)/100|0,a.x.calibration.length=0,a.y.calibration.length=0,a.z.calibration.length=0),n.previous!==n.value&&(i=!0)},this),o&&(a.x.angle+=this.rate.x/100,a.y.angle+=this.rate.y/100,a.z.angle+=this.rate.z/100,this.emit("data",{x:this.x,y:this.y,z:this.z}),i&&this.emit("change",{x:this.x,y:this.y,z:this.z}))}.bind(this)),Object.defineProperties(this,{isCalibrated:{get:function(){return o},set:function(e){"boolean"==typeof e&&(o=e)}},pitch:{get:function(){return{rate:l(this.rate.y,2),angle:l(a.y.angle,2)}}},roll:{get:function(){return{rate:l(this.rate.x,2),angle:l(a.x.angle,2)}}},yaw:{get:function(){return{rate:void 0!==this.z?l(this.rate.z,2):0,angle:void 0!==this.z?l(a.z.angle,2):0}}},x:{get:function(){return l(this.toNormal(a.x.value),4)}},y:{get:function(){return l(this.toNormal(a.y.value),4)}},z:{get:function(){return a.z.hasValue?l(this.toNormal(a.z.value),4):void 0}},rate:{get:function(){var e=this.toDegreesPerSecond(a.x.value,a.x.center),t=this.toDegreesPerSecond(a.y.value,a.y.center),n=a.z.hasValue?this.toDegreesPerSecond(a.z.value,a.z.center):0;return{x:l(e,2),y:l(t,2),z:l(n,2)}}}})}Object.defineProperties(p,{TK_4X:{value:.67},TK_1X:{value:.167}}),r.inherits(p,t.EventEmitter),p.prototype.recalibrate=function(){this.isCalibrated=!1},e.env.IS_TEST_MODE&&(p.Controllers=d,p.purge=function(){u.clear()}),o.exports=p}).call(this,a(36))},2580:function(o,e,c){(function(e){var a=c(203),t=c(293),n=c(61).EventEmitter,r=c(94),i=t.toFixed,s=new Map,l={SHT31D:{initialize:{value:function(e,t){c(197).Drivers.get(this.board,"SHT31D",e).on("data",function(e){t(e.humidity)})}},toRelativeHumidity:{value:function(e){return i(100*e/65535,2)}}},HTU21D:{initialize:{value:function(e,t){c(197).Drivers.get(this.board,"HTU21D",e).on("data",function(e){t(e.humidity)})}},toRelativeHumidity:{value:function(e){return 125*e/65536-6}}},HIH6130:{initialize:{value:function(e,t){c(197).Drivers.get(this.board,"HIH6130",e).on("data",function(e){t(e.humidity)})}},toRelativeHumidity:{value:function(e){return i(100*e/(t.POW_2_14-1),2)}}},DHT_I2C_NANO_BACKPACK:{initialize:{value:function(e,t){c(197).Drivers.get(this.board,"DHT_I2C_NANO_BACKPACK",e).on("data",function(e){t(e.humidity)})}},toRelativeHumidity:{value:function(e){return e/100}}},TH02:{initialize:{value:function(e,t){c(197).Drivers.get(this.board,"TH02",e).on("data",function(e){t(e.humidity)})}},toRelativeHumidity:{value:function(e){return 100>7,r.offsets.x<<1&255,r.offsets.y>>7,r.offsets.y<<1&255,r.offsets.z>>7,r.offsets.z<<1&255]),this.emit("calibrated",{x:[r.accum.x.low,r.accum.x.high],y:[r.accum.y.low,r.accum.y.high],z:[r.accum.z.low,r.accum.z.high]})),t=Math.floor(12.5),n(o)),setTimeout(a,t)}.bind(this)))}.bind(this))}.bind(this);a()}},calibrate:{value:function(e){var t=u.get(this);t.isCalibrated=!1,t.measurements=e}},toScaledHeading:{value:function(e){var t=u.get(this),n=1/(t.accum.x.high-t.accum.x.low),r=1/(t.accum.y.high-t.accum.y.low),i=Math.atan2(-e.y*r,e.x*n);return i<0&&(i+=l),Math.trunc(i*a.RAD_TO_DEG)}}}};function d(e){if(!(this instanceof d))return new d(e);o.Component.call(this,e=o.Options(e));var t=e.freq||25,n=null,r={x:null,y:null,z:null},i={x:0,y:0,z:0,scale:0,register:0,heading:0};if(null==(n=e.controller&&"string"==typeof e.controller?c[e.controller.toUpperCase()]:e.controller))throw new Error("Compass expects a valid controller");o.Controller.call(this,n,e),this.toScaledHeading||(this.toScaledHeading=e.toScaledHeading||function(e){return e}),u.set(this,i),"function"==typeof this.initialize&&this.initialize(e,function(e){r=e}),setInterval(function(){if(null!==r.x){var e=!1;i.x=r.x,i.y=r.y,i.z=r.z;var t=this.heading;t!==i.heading&&(i.heading=t,e=!0),this.emit("data",{heading:i.heading}),e&&this.emit("change",{heading:i.heading})}}.bind(this),t),Object.defineProperties(this,{bearing:{get:function(){for(var e,t=d.Points.length,n=Math.floor(this.heading),r=0;r>4;2048&t&&(t|=63488),n(t=t>>15?-1*(1+(65535^t)):t)})}},toCelsius:{value:function(e){return l(e/16,1)}}},MAX31850K:{initialize:{value:function(e,n){var t=p.get(this),r=e.address,i=c.get(this.board,"MAX31850K",e);r?(t.address=r,i.register(r)):(i.addressless&&this.emit("error","You cannot have more than one MAX31850K without an address"),i.addressless=!0),i.once("initialized",function(e){t.address||(t.address=e)}),i.on("data",function(e,t){r&&e!==r||n(t)}.bind(this))}},toCelsius:{value:function(e){return l(e/16,2)}},address:{get:function(){return p.get(this).address||0}}},DS18B20:{initialize:{value:function(e,n){var t=p.get(this),r=e.address,i=c.get(this.board,"DS18B20",e);r?(t.address=r,i.register(r)):(i.addressless&&this.emit("error","You cannot have more than one DS18B20 without an address"),i.addressless=!0),i.once("initialized",function(e){t.address||(t.address=e)}),i.on("data",function(e,t){r&&e!==r||n(t)})}},toCelsius:{value:function(e){return l(e/16,4)}},address:{get:function(){return p.get(this).address||0}}},SHT31D:{initialize:{value:function(e,t){i(197).Drivers.get(this.board,"SHT31D",e).on("data",function(e){t(e.temperature)})}},toCelsius:{value:function(e){return l(175*e/65535-45,3)}}},HTU21D:{initialize:{value:function(e,t){i(197).Drivers.get(this.board,"HTU21D",e).on("data",function(e){t(e.temperature)})}},toCelsius:{value:function(e){return l(175.72*e/65536-46.85,2)}}},HIH6130:{initialize:{value:function(e,t){i(197).Drivers.get(this.board,"HIH6130",e).on("data",function(e){t(e.temperature)})}},toCelsius:{value:function(e){return Math.round(e/1e3)}}},DHT_I2C_NANO_BACKPACK:{initialize:{value:function(e,t){i(197).Drivers.get(this.board,"DHT_I2C_NANO_BACKPACK",e).on("data",function(e){t(e.temperature)})}},toCelsius:{value:function(e){return Math.round(e/100)}}},TH02:{initialize:{value:function(e,t){i(197).Drivers.get(this.board,"TH02",e).on("data",function(e){t(e.temperature)})}},toCelsius:{value:function(e){return l(e,1)}}},MPU6050:{initialize:{value:function(e,t){i(197).Drivers.get(this.board,"MPU6050",e).on("data",function(e){t(e.temperature)})}},toCelsius:{value:function(e){return Math.round(e/340+36.53)}}},BNO055:{initialize:{value:function(e,t){i(197).Drivers.get(this.board,"BNO055",e).on("data",function(e){t(e.temperature)})}},toCelsius:{value:function(e){return Math.trunc(e)}}},MPL115A2:{initialize:{value:function(e,t){i(197).Drivers.get(this.board,"MPL115A2",e).on("data",function(e){t(e.temperature)})}},toCelsius:{value:function(e){return Math.trunc((e-498)/-5.35+25)}}},MPL3115A2:{initialize:{value:function(e,t){i(197).Drivers.get(this.board,"MPL3115A2",e).on("data",function(e){t(e.temperature)})}},toCelsius:{value:function(e){return Math.round(e/16)}}},MS5611:{initialize:{value:function(e,t){i(197).Drivers.get(this.board,"MS5611",e).on("data",function(e){t(e.temperature)})}},toCelsius:{value:function(e){return l(e,2)}}},GROVE:{initialize:{value:n},toCelsius:{value:function(e){var t=1e4*(1023-e)/e,n=1/(Math.log(t/1e4)/3975+1/298.15)-u;return Math.round(n)}}},TINKERKIT:{initialize:{value:n},toCelsius:{value:function(e){var t=1e4*(1023/e-1),n=3950/Math.log(120.6685*t);return Math.round(n-u)}}},BMP180:{initialize:{value:function(e,t){i(197).Drivers.get(this.board,"BMP180",e).on("data",function(e){t(e.temperature)})}},toCelsius:{value:function(e){return l(e,1)}}},BMP280:{initialize:{value:function(e,t){i(197).Drivers.get(this.board,"BMP280",e).on("data",function(e){t(e.temperature)})}},toCelsius:{value:function(e){return l(e,2)}}},BME280:{initialize:{value:function(e,t){i(197).Drivers.get(this.board,"BME280",e).on("data",function(e){t(e.temperature)})}},toCelsius:{value:function(e){return l(e,2)}}},SI7020:{initialize:{value:function(e,t){i(197).Drivers.get(this.board,"SI7020",e).on("data",function(e){t(e.temperature)})}},toCelsius:{value:function(e){return l(175.72*e/65536-46.85,1)}}},MCP9808:{ADDRESSES:{value:[24]},initialize:{value:function(e,n){var t=e.address||this.ADDRESSES[0];e.address=t,this.io.i2cConfig(e),this.io.i2cRead(t,5,2,function(e){var t=e[0]<<8|e[1];4096&(t=(4095&t)/16)&&(t-=256),n(t)})}},toCelsius:{value:function(e){return l(e,2)}}}};d.BMP085=d.BMP180,d.GY521=d.MPU6050,d.SI7021=d.SI7020,d.DHT11_I2C_NANO_BACKPACK=d.DHT_I2C_NANO_BACKPACK,d.DHT21_I2C_NANO_BACKPACK=d.DHT_I2C_NANO_BACKPACK,d.DHT22_I2C_NANO_BACKPACK=d.DHT_I2C_NANO_BACKPACK;var p=new Map;function f(e){if(!(this instanceof f))return new f(e);var t=null,n=null,r=null;s.Component.call(this,e=s.Options(e)),this.aref=e.aref||this.io.aref||5,null==(t=e.controller&&"string"==typeof e.controller?d[e.controller.toUpperCase()]:e.controller)&&(t=d.ANALOG);var i={enabled:void 0===e.enabled||e.enabled,intervalId:null,freq:e.freq||25,previousFreq:e.freq||25};p.set(this,i),s.Controller.call(this,t,e),this.toCelsius||(this.toCelsius=e.toCelsius||function(e){return e});var o=function(){if(null!=r){var e={};e.C=e.celsius=this.celsius,e.F=e.fahrenheit=this.fahrenheit,e.K=e.kelvin=this.kelvin,this.emit("data",e),this.celsius!==n&&(n=this.celsius,this.emit("change",e))}}.bind(this),a={celsius:{get:function(){return this.toCelsius(r)}},fahrenheit:{get:function(){return l(9*this.celsius/5+32,2)}},kelvin:{get:function(){return l(this.celsius+u,2)}},freq:{get:function(){return i.freq},set:function(e){i.freq=e,i.intervalId&&clearInterval(i.intervalId),null!==i.freq&&(i.intervalId=setInterval(o,e))}}};a.C=a.celsius,a.F=a.fahrenheit,a.K=a.kelvin,Object.defineProperties(this,a),"function"==typeof this.initialize&&this.initialize(e,function(e){r=e}),i.enabled&&(this.freq=i.freq)}t.inherits(f,o),f.prototype.enable=function(){var e=p.get(this);return e.enabled||(this.freq=e.freq||e.previousFreq),this},f.prototype.disable=function(){var e=p.get(this);return e.enabled&&(e.enabled=!1,e.previousFreq=e.freq,this.freq=null),this},f.Drivers=c,e.env.IS_TEST_MODE&&(f.Controllers=d,f.purge=function(){p.clear()}),r.exports=f}).call(this,i(36))},2583:function(h,e,m){(function(a){var i=m(203),o=i.Pins,n=m(1454),e=m(61).EventEmitter,t=m(94),r=m(882),s=m(293),l=m(1891),u=new Map,c={PCA9685:{initialize:{value:function(e){var t=u.get(this);this.address=e.address||64,this.pwmRange=e.pwmRange||[450,1850],this.frequency=e.frequency||50,t.expander=n.get({address:this.address,controller:this.controller,bus:this.bus,pwmRange:this.pwmRange,frequency:this.frequency}),this.pin=t.expander.normalize(e.pin)}},update:{writable:!0,value:function(e){u.get(this).expander.servoWrite(this.pin,e)}}},Standard:{initialize:{value:function(e){e.debug&&!this.board.pins.isServo(this.pin)&&i.Pins.Error({pin:this.pin,type:"PWM",via:"Servo"}),Array.isArray(e.pwmRange)?this.io.servoConfig(this.pin,e.pwmRange[0],e.pwmRange[1]):this.io.pinMode(this.pin,this.mode)}},update:{writable:!0,value:function(e){if(e|=0,this.last&&this.last.degrees===e)return this;this.io.servoWrite(this.pin,e)}}}};function d(e){if(!(this instanceof d))return new d(e);var t=[],n="object"==typeof e?e.pin:e,r=null;i.Component.call(this,e=i.Options(e)),this.range=e.range||[0,180],this.deadband=e.deadband||[90,90],this.fps=e.fps||100,this.offset=e.offset||0,this.mode=this.io.MODES.SERVO,this.interval=null,this.value=null,void 0===e.controller&&o.isFirmata(this)&&("string"==typeof n&&"A"===n[0]&&(n=this.io.analogPins[+n.slice(1)]),n=+n,Number.isNaN(n)||this.pin===n||(this.pin=n)),this.type=e.type||"standard",e.isInverted&&console.warn("The 'isInverted' property has been renamed 'invert'"),this.invert=e.isInverted||e.invert||!1,this.startAt=90,null==(r=e.controller&&"string"==typeof e.controller?c[e.controller.toUpperCase()]:e.controller)&&(r=c.Standard),u.set(this,{history:t}),i.Controller.call(this,r,e),Object.defineProperties(this,{history:{get:function(){return t.slice(-5)}},last:{get:function(){return t[t.length-1]}},position:{get:function(){return t.length?t[t.length-1].degrees:-1}}}),this.initialize(e),void 0!==e.startAt&&(this.startAt=e.startAt,this.to(e.startAt)),e.center&&this.center(),"continuous"===e.type&&this.stop()}function p(e){return e.map(function(e){return{value:e}})}function f(e){if(!(this instanceof f))return new f(e);Object.defineProperty(this,"type",{value:d}),r.call(this,e)}t.inherits(d,e),d.prototype.to=function(e,t,n){var r=u.get(this),i={};if("object"==typeof e)Object.assign(i,e),i.duration=e.duration||e.interval||1e3,i.cuePoints=e.cuePoints||[0,1],i.keyFrames=e.keyFrames||[null,{value:"number"==typeof e.degrees?e.degrees:this.startAt}],i.oncomplete=function(){a.nextTick(function(){"function"==typeof e.oncomplete&&e.oncomplete(),this.emit("move:complete")}.bind(this))}.bind(this),r.isRunning=!0,r.animation=r.animation||new l(this),r.animation.enqueue(i);else{var o=e;e=s.constrain(e,this.range[0],this.range[1]),e+=this.offset,this.value=e,this.invert&&(e=s.map(e,0,180,180,0)),void 0!==t?(i.duration=t,i.keyFrames=[null,{degrees:e}],i.fps=n||this.fps,this.to(i)):(this.update(e),5>1&1)*n*255,(t>>2&1)*n*255]},a.ansi256.rgb=function(e){if(232<=e){var t=10*(e-232)+8;return[t,t,t]}var n;return e-=16,[Math.floor(e/36)/5*255,Math.floor((n=e%36)/6)/5*255,n%6/5*255]},a.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},a.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}/i);if(!t)return[0,0,0];var n=parseInt(t[0],16);return[n>>16&255,n>>8&255,255&n]},a.rgb.hcg=function(e){var t,n=e[0]/255,r=e[1]/255,i=e[2]/255,o=Math.max(Math.max(n,r),i),a=Math.min(Math.min(n,r),i),s=o-a;return t=s<=0?0:o===n?(r-i)/s%6:o===r?2+(i-n)/s:4+(n-r)/s+4,t/=6,[360*(t%=1),100*s,100*(s<1?a/(1-s):0)]},a.hsl.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=1,i=0;return(r=n<.5?2*t*n:2*t*(1-n))<1&&(i=(n-.5*r)/(1-r)),[e[0],100*r,100*i]},a.hsv.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=t*n,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},a.hcg.rgb=function(e){var t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0==n)return[255*r,255*r,255*r];var i,o=[0,0,0],a=t%1*6,s=a%1,l=1-s;switch(Math.floor(a)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return i=(1-n)*r,[255*(n*o[0]+i),255*(n*o[1]+i),255*(n*o[2]+i)]},a.hcg.hsv=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return 0=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})?r.apply(t,i):r)||(e.exports=o)},2624:function(e,t,n){var r=n(2809),i=n(3111);e.exports=function(e,t){return e&&r(e,i(t))}},2625:function(e,s,l){(function(e){var t=l(1852),n=l(3107),r=s&&!s.nodeType&&s,i=r&&"object"==typeof e&&e&&!e.nodeType&&e,o=i&&i.exports===r?t.Buffer:void 0,a=(o?o.isBuffer:void 0)||n;e.exports=a}).call(this,l(91)(e))},2626:function(e,t){e.exports=function(e){return"number"==typeof e&&-1",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""}},2642:function(e){e.exports={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}},2643:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=l(n(0)),i=l(n(1)),o=l(n(3)),a=l(n(5)),s=l(n(45));function l(e){return e&&e.__esModule?e:{default:e}}function u(t){for(var e=1;e")[0],g=c.each;function b(e,t,n){var r=m[t.type]||{};return null==e?n||!t.def?null:t.def:(e=r.floor?~~e:parseFloat(e),isNaN(e)?t.def:r.mod?(e+r.mod)%r.mod:e<0?0:r.maxo.mod/2?r+=o.mod:r-i>o.mod/2&&(r-=o.mod)),u[n]=b((i-r)*a+r,t)))}),this[t](u)},blend:function(e){if(1===this._rgba[3])return this;var t=this._rgba.slice(),n=t.pop(),r=f(e)._rgba;return f(c.map(t,function(e,t){return(1-n)*r[t]+n*e}))},toRgbaString:function(){var e="rgba(",t=c.map(this._rgba,function(e,t){return null==e?2").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),t={width:n.width(),height:n.height()},i=document.activeElement;try{i.id}catch(e){i=document.body}return n.wrap(e),(n[0]===i||p.contains(n[0],i))&&p(i).trigger("focus"),e=n.parent(),"static"===n.css("position")?(e.css({position:"relative"}),n.css({position:"relative"})):(p.extend(r,{position:n.css("position"),zIndex:n.css("z-index")}),p.each(["top","left","bottom","right"],function(e,t){r[t]=n.css(t),isNaN(parseInt(r[t],10))&&(r[t]="auto")}),n.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),n.css(t),e.css(r).show()},removeWrapper:function(e){var t=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===t||p.contains(e[0],t))&&p(t).trigger("focus")),e}}),p.extend(p.effects,{version:"1.12.1",define:function(e,t,n){return n||(n=t,t="effect"),p.effects.effect[e]=n,p.effects.effect[e].mode=t,n},scaledDimensions:function(e,t,n){if(0===t)return{height:0,width:0,outerHeight:0,outerWidth:0};var r="horizontal"!==n?(t||100)/100:1,i="vertical"!==n?(t||100)/100:1;return{height:e.height()*i,width:e.width()*r,outerHeight:e.outerHeight()*i,outerWidth:e.outerWidth()*r}},clipToBox:function(e){return{width:e.clip.right-e.clip.left,height:e.clip.bottom-e.clip.top,left:e.clip.left,top:e.clip.top}},unshift:function(e,t,n){var r=e.queue();1").insertAfter(e).css({display:/^(inline|ruby)/.test(e.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight"),float:e.css("float")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass("ui-effects-placeholder"),e.data(s+"placeholder",t)),e.css({position:n,left:r.left,top:r.top}),t},removePlaceholder:function(e){var t=s+"placeholder",n=e.data(t);n&&(n.remove(),e.removeData(t))},cleanUp:function(e){p.effects.restoreStyle(e),p.effects.removePlaceholder(e)},setTransition:function(r,e,i,o){return o=o||{},p.each(e,function(e,t){var n=r.cssUnit(t);0").appendTo("body").addClass(e.className).css({top:c.top-a,left:c.left-s,height:n.innerHeight(),width:n.innerWidth(),position:i?"fixed":"absolute"}).animate(u,e.duration,e.easing,function(){d.remove(),p.isFunction(t)&&t()})}}),p.fx.step.clip=function(e){e.clipInit||(e.start=p(e.elem).cssClip(),"string"==typeof e.end&&(e.end=a(e.end,e.elem)),e.clipInit=!0),p(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),function(){var n={};p.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,e){n[e]=function(e){return Math.pow(e,t+2)}}),p.extend(n,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,n=4;e<((t=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*t-2)/22-e,2)}}),p.each(n,function(e,t){p.easing["easeIn"+e]=t,p.easing["easeOut"+e]=function(e){return 1-t(1-e)},p.easing["easeInOut"+e]=function(e){return e<.5?t(2*e)/2:1-t(-2*e+2)/2}})}(),p.effects})?r.apply(t,i):r)||(e.exports=o)},2805:function(e,t,n){var r,i,o;
/*!
* jQuery UI Draggable 1.12.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*/i=[n(9),n(2623),n(3085),n(2806),n(3086),n(3087),n(3088),n(1344),n(2524)],void 0===(o="function"==typeof(r=function(v){return v.widget("ui.draggable",v.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(e,t){this._super(e,t),"handle"===e&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(e){var t=this.options;return!(this.helper||t.disabled||0").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var t=v.ui.safeActiveElement(this.document[0]);v(e.target).closest(t).length||v.ui.safeBlur(t)},_mouseStart:function(e){var t=this.options;return this.helper=this._createHelper(e),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),v.ui.ddmanager&&(v.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=0n[2]&&(l=n[2]+this.offset.click.left),e.pageY-this.offset.click.top>n[3]&&(u=n[3]+this.offset.click.top)),a.grid&&(i=a.grid[1]?this.originalPageY+Math.round((u-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,u=n?i-this.offset.click.top>=n[1]||i-this.offset.click.top>n[3]?i:i-this.offset.click.top>=n[1]?i-a.grid[1]:i+a.grid[1]:i,o=a.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,l=n?o-this.offset.click.left>=n[0]||o-this.offset.click.left>n[2]?o:o-this.offset.click.left>=n[0]?o-a.grid[0]:o+a.grid[0]:o),"y"===a.axis&&(l=this.originalPageX),"x"===a.axis&&(u=this.originalPageY)),{top:u-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,t,n){return n=n||this._uiHash(),v.ui.plugin.call(this,e,[t,n,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),n.offset=this.positionAbs),v.Widget.prototype._trigger.call(this,e,t,n)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),v.ui.plugin.add("draggable","connectToSortable",{start:function(t,e,n){var r=v.extend({},e,{item:n.element});n.sortables=[],v(n.options.connectToSortable).each(function(){var e=v(this).sortable("instance");e&&!e.options.disabled&&(n.sortables.push(e),e.refreshPositions(),e._trigger("activate",t,r))})},stop:function(t,e,n){var r=v.extend({},e,{item:n.element});n.cancelHelperRemoval=!1,v.each(n.sortables,function(){var e=this;e.isOver?(e.isOver=0,n.cancelHelperRemoval=!0,e.cancelHelperRemoval=!1,e._storedCSS={position:e.placeholder.css("position"),top:e.placeholder.css("top"),left:e.placeholder.css("left")},e._mouseStop(t),e.options.helper=e.options._helper):(e.cancelHelperRemoval=!0,e._trigger("deactivate",t,r))})},drag:function(n,r,i){v.each(i.sortables,function(){var e=!1,t=this;t.positionAbs=i.positionAbs,t.helperProportions=i.helperProportions,t.offset.click=i.offset.click,t._intersectsWith(t.containerCache)&&(e=!0,v.each(i.sortables,function(){return this.positionAbs=i.positionAbs,this.helperProportions=i.helperProportions,this.offset.click=i.offset.click,this!==t&&this._intersectsWith(this.containerCache)&&v.contains(t.element[0],this.element[0])&&(e=!1),e})),e?(t.isOver||(t.isOver=1,i._parent=r.helper.parent(),t.currentItem=r.helper.appendTo(t.element).data("ui-sortable-item",!0),t.options._helper=t.options.helper,t.options.helper=function(){return r.helper[0]},n.target=t.currentItem[0],t._mouseCapture(n,!0),t._mouseStart(n,!0,!0),t.offset.click.top=i.offset.click.top,t.offset.click.left=i.offset.click.left,t.offset.parent.left-=i.offset.parent.left-t.offset.parent.left,t.offset.parent.top-=i.offset.parent.top-t.offset.parent.top,i._trigger("toSortable",n),i.dropped=t.element,v.each(i.sortables,function(){this.refreshPositions()}),i.currentItem=i.element,t.fromOutside=i),t.currentItem&&(t._mouseDrag(n),r.position=t.position)):t.isOver&&(t.isOver=0,t.cancelHelperRemoval=!0,t.options._revert=t.options.revert,t.options.revert=!1,t._trigger("out",n,t._uiHash(t)),t._mouseStop(n,!0),t.options.revert=t.options._revert,t.options.helper=t.options._helper,t.placeholder&&t.placeholder.remove(),r.helper.appendTo(i._parent),i._refreshOffsets(n),r.position=i._generatePosition(n,!0),i._trigger("fromSortable",n),i.dropped=!1,v.each(i.sortables,function(){this.refreshPositions()}))})}}),v.ui.plugin.add("draggable","cursor",{start:function(e,t,n){var r=v("body"),i=n.options;r.css("cursor")&&(i._cursor=r.css("cursor")),r.css("cursor",i.cursor)},stop:function(e,t,n){var r=n.options;r._cursor&&v("body").css("cursor",r._cursor)}}),v.ui.plugin.add("draggable","opacity",{start:function(e,t,n){var r=v(t.helper),i=n.options;r.css("opacity")&&(i._opacity=r.css("opacity")),r.css("opacity",i.opacity)},stop:function(e,t,n){var r=n.options;r._opacity&&v(t.helper).css("opacity",r._opacity)}}),v.ui.plugin.add("draggable","scroll",{start:function(e,t,n){n.scrollParentNotHidden||(n.scrollParentNotHidden=n.helper.scrollParent(!1)),n.scrollParentNotHidden[0]!==n.document[0]&&"HTML"!==n.scrollParentNotHidden[0].tagName&&(n.overflowOffset=n.scrollParentNotHidden.offset())},drag:function(e,t,n){var r=n.options,i=!1,o=n.scrollParentNotHidden[0],a=n.document[0];o!==a&&"HTML"!==o.tagName?(r.axis&&"x"===r.axis||(n.overflowOffset.top+o.offsetHeight-e.pageYt.width||n.img.naturalHeight>t.height?t.style.backgroundSize="contain":t.style.backgroundSize="auto"}):t.style.backgroundSize=e["object-fit"].replace("none","auto").replace("fill","100% 100%"),h(n.img,function(e){f(t,e.naturalWidth,e.naturalHeight)})}function g(e,t){var n=!p&&!e;if(t=t||{},e=e||"img",s&&!t.skipTest||!l)return!1;"img"===e?e=document.getElementsByTagName("img"):"string"==typeof e?e=document.querySelectorAll(e):"length"in e||(e=[e]);for(var r=0;rthis._sectionStart&&this._cbs.ontext(this._getSection()),this._state=d,this._sectionStart=this._index):this._decodeEntities&&this._special===pe&&"&"===e&&(this._index>this._sectionStart&&this._cbs.ontext(this._getSection()),this._baseState=c,this._state=ae,this._sectionStart=this._index)},ye.prototype._stateBeforeTagName=function(e){"/"===e?this._state=h:"<"===e?(this._cbs.ontext(this._getSection()),this._sectionStart=this._index):">"===e||this._special!==pe||me(e)?this._state=c:"!"===e?(this._state=C,this._sectionStart=this._index+1):"?"===e?(this._state=T,this._sectionStart=this._index+1):(this._state=this._xmlMode||"s"!==e&&"S"!==e?p:W,this._sectionStart=this._index)},ye.prototype._stateInTagName=function(e){("/"===e||">"===e||me(e))&&(this._emitToken("onopentagname"),this._state=b,this._index--)},ye.prototype._stateBeforeCloseingTagName=function(e){me(e)||(">"===e?this._state=c:this._special!==pe?"s"===e||"S"===e?this._state=V:(this._state=c,this._index--):(this._state=m,this._sectionStart=this._index))},ye.prototype._stateInCloseingTagName=function(e){(">"===e||me(e))&&(this._emitToken("onclosetag"),this._state=g,this._index--)},ye.prototype._stateAfterCloseingTagName=function(e){">"===e&&(this._state=c,this._sectionStart=this._index+1)},ye.prototype._stateBeforeAttributeName=function(e){">"===e?(this._cbs.onopentagend(),this._state=c,this._sectionStart=this._index+1):"/"===e?this._state=f:me(e)||(this._state=y,this._sectionStart=this._index)},ye.prototype._stateInSelfClosingTag=function(e){">"===e?(this._cbs.onselfclosingtag(),this._state=c,this._sectionStart=this._index+1):me(e)||(this._state=b,this._index--)},ye.prototype._stateInAttributeName=function(e){("="===e||"/"===e||">"===e||me(e))&&(this._cbs.onattribname(this._getSection()),this._sectionStart=-1,this._state=v,this._index--)},ye.prototype._stateAfterAttributeName=function(e){"="===e?this._state=E:"/"===e||">"===e?(this._cbs.onattribend(),this._state=b,this._index--):me(e)||(this._cbs.onattribend(),this._state=y,this._sectionStart=this._index)},ye.prototype._stateBeforeAttributeValue=function(e){'"'===e?(this._state=_,this._sectionStart=this._index+1):"'"===e?(this._state=w,this._sectionStart=this._index+1):me(e)||(this._state=S,this._sectionStart=this._index,this._index--)},ye.prototype._stateInAttributeValueDoubleQuotes=function(e){'"'===e?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=b):this._decodeEntities&&"&"===e&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=ae,this._sectionStart=this._index)},ye.prototype._stateInAttributeValueSingleQuotes=function(e){"'"===e?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=b):this._decodeEntities&&"&"===e&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=ae,this._sectionStart=this._index)},ye.prototype._stateInAttributeValueNoQuotes=function(e){me(e)||">"===e?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=b,this._index--):this._decodeEntities&&"&"===e&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=ae,this._sectionStart=this._index)},ye.prototype._stateBeforeDeclaration=function(e){this._state="["===e?I:"-"===e?R:O},ye.prototype._stateInDeclaration=function(e){">"===e&&(this._cbs.ondeclaration(this._getSection()),this._state=c,this._sectionStart=this._index+1)},ye.prototype._stateInProcessingInstruction=function(e){">"===e&&(this._cbs.onprocessinginstruction(this._getSection()),this._state=c,this._sectionStart=this._index+1)},ye.prototype._stateBeforeComment=function(e){"-"===e?(this._state=A,this._sectionStart=this._index+1):this._state=O},ye.prototype._stateInComment=function(e){"-"===e&&(this._state=x)},ye.prototype._stateAfterComment1=function(e){this._state="-"===e?P:A},ye.prototype._stateAfterComment2=function(e){">"===e?(this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2)),this._state=c,this._sectionStart=this._index+1):"-"!==e&&(this._state=A)},ye.prototype._stateBeforeCdata1=ge("C",D,O),ye.prototype._stateBeforeCdata2=ge("D",M,O),ye.prototype._stateBeforeCdata3=ge("A",k,O),ye.prototype._stateBeforeCdata4=ge("T",j,O),ye.prototype._stateBeforeCdata5=ge("A",F,O),ye.prototype._stateBeforeCdata6=function(e){"["===e?(this._state=N,this._sectionStart=this._index+1):(this._state=O,this._index--)},ye.prototype._stateInCdata=function(e){"]"===e&&(this._state=L)},ye.prototype._stateAfterCdata1=(r="]",i=B,function(e){e===r&&(this._state=i)}),ye.prototype._stateAfterCdata2=function(e){">"===e?(this._cbs.oncdata(this._buffer.substring(this._sectionStart,this._index-2)),this._state=c,this._sectionStart=this._index+1):"]"!==e&&(this._state=N)},ye.prototype._stateBeforeSpecial=function(e){"c"===e||"C"===e?this._state=G:"t"===e||"T"===e?this._state=Q:(this._state=p,this._index--)},ye.prototype._stateBeforeSpecialEnd=function(e){this._special!==fe||"c"!==e&&"C"!==e?this._special!==he||"t"!==e&&"T"!==e?this._state=c:this._state=ne:this._state=K},ye.prototype._stateBeforeScript1=be("R",H),ye.prototype._stateBeforeScript2=be("I",z),ye.prototype._stateBeforeScript3=be("P",U),ye.prototype._stateBeforeScript4=be("T",q),ye.prototype._stateBeforeScript5=function(e){("/"===e||">"===e||me(e))&&(this._special=fe),this._state=p,this._index--},ye.prototype._stateAfterScript1=ge("R",X,c),ye.prototype._stateAfterScript2=ge("I",Y,c),ye.prototype._stateAfterScript3=ge("P",J,c),ye.prototype._stateAfterScript4=ge("T",Z,c),ye.prototype._stateAfterScript5=function(e){">"===e||me(e)?(this._special=pe,this._state=m,this._sectionStart=this._index-6,this._index--):this._state=c},ye.prototype._stateBeforeStyle1=be("Y",$),ye.prototype._stateBeforeStyle2=be("L",ee),ye.prototype._stateBeforeStyle3=be("E",te),ye.prototype._stateBeforeStyle4=function(e){("/"===e||">"===e||me(e))&&(this._special=he),this._state=p,this._index--},ye.prototype._stateAfterStyle1=ge("Y",re,c),ye.prototype._stateAfterStyle2=ge("L",ie,c),ye.prototype._stateAfterStyle3=ge("E",oe,c),ye.prototype._stateAfterStyle4=function(e){">"===e||me(e)?(this._special=pe,this._state=m,this._sectionStart=this._index-5,this._index--):this._state=c},ye.prototype._stateBeforeEntity=ge("#",se,le),ye.prototype._stateBeforeNumericEntity=ge("X",ce,ue),ye.prototype._parseNamedEntityStrict=function(){if(this._sectionStart+1>>10&1023|55296),e=56320|1023&e);return t+=String.fromCharCode(e)}},2841:function(e){e.exports={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Å",aring:"å",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",iquest:"¿",Iuml:"Ï",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ò",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ"}},2842:function(e,t){var n=e.exports={get firstChild(){var e=this.children;return e&&e[0]||null},get lastChild(){var e=this.children;return e&&e[e.length-1]||null},get nodeType(){return i[this.type]||i.element}},r={tagName:"name",childNodes:"children",parentNode:"parent",previousSibling:"prev",nextSibling:"next",nodeValue:"data"},i={element:1,text:3,cdata:4,comment:8};Object.keys(r).forEach(function(e){var t=r[e];Object.defineProperty(n,e,{get:function(){return this[t]||null},set:function(e){return this[t]=e}})})},2843:function(e,t,n){e.exports=s;var i=n(2838),o=n(806).Writable||n(3286).Writable,a=n(1016).StringDecoder,r=n(122).Buffer;function s(e,t){var n=this._parser=new i(e,t),r=this._decoder=new a;o.call(this,{decodeStrings:!1}),this.once("finish",function(){n.end(r.end())})}n(166)(s,o),o.prototype._write=function(e,t,n){e instanceof r&&(e=this._decoder.write(e)),this._parser.write(e),n()}},2844:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(n){return new Promise(function(t,e){u.default.ajax({url:"/api/v1/ml_models/".concat(n),method:"GET"}).then(function(e){return function(e,t){var c=0,d="ml_model_"+e;(0,u.default)("."+d).each(function(e,t){(0,u.default)(t.parentNode).is(".ui-resizable")&&(t=t.parentNode),t.remove()}),f.default.onInsertEvent("var data = {};");var p=[];t.features.forEach(function(e){c+=18;var t,n=f.default.createElement("LABEL",20,c),r=(0,h.stripSpaceAndSpecial)(e.id);if(n.id="design_"+r+"_label",n.className=d,n.style.width="300px",c+=18,e.values){n.textContent=e.id+":",t=r+"_dropdown";var i=f.default.createElement("DROPDOWN",20,c);i.id="design_"+t,i.className=d,i.options.remove(0),i.options.remove(0),e.values.forEach(function(e){var t=document.createElement("option");t.text=e,i.options.add(t)}),c+=18}else{n.textContent=e.id;var o=f.default.createElement("TEXT_INPUT",20,c),a=e.min.toFixed(2),s=e.max.toFixed(2),l="min: ".concat(+a,", max: ").concat(+s);f.default.updateProperty(o,"placeholder",l),t=r+"_input",o.id="design_"+t,o.className=d,c+=18}var u='addPair(data, "'.concat(r,'", getText("').concat(t,'"));');p.push(u)}),c+=36;var n=f.default.createElement("LABEL",20,c);n.textContent=t.labelColumn;var r=(0,h.stripSpaceAndSpecial)(t.name);n.id="design_"+r+"_label",n.className=d,n.style.width="300px";var i=r+"_prediction",o=f.default.createElement("BUTTON",20,c);o.textContent="Predict";var a=r+"_predict";f.default.updateProperty(o,"id",a),o.className=d;var s='onEvent("'.concat(a,'", "click", function() {\n ').concat(p.join("\n\t\t"),'\n setText("').concat(i,"\", '');\n getPrediction(\"").concat(t.name,'", "').concat(e,'", data, function(value) {\n setText("').concat(i,'", value);\n });\n });');c+=45;var l=f.default.createElement("TEXT_INPUT",20,c);l.id="design_"+i,l.className=d,l.readOnly=!0,f.default.onInsertAICode(s)}(n,e),t()}).fail(function(e,t){return alert({message:"An error occurred"})})})};var u=r(n(9)),f=r(n(1457)),h=n(2845);function r(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},2845:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stripSpaceAndSpecial=function(e){return e.replace(/\W/g,"")}},2846:function(e,t,n){"use strict";function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.styles=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(1)),i=c(n(0)),o=c(n(15)),s=c(n(99)),l=c(n(5)),u=c(n(12));function c(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function p(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);ta&&this.warn("Too many columns for chart; only using the first ".concat(a,".")),t.lengththis.buttonEvents[2]}},holdtime:{get:function(){return this.holdThreshold}}})}n(10),i.inherits(r.EventEmitter),e.exports=t.default},2865:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(){function e(e){this.board=e,this.screen=[[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0]]}var t=e.prototype;return t.display=function(e){this.board.mb.displayShow(!1,e)},t.scrollString=function(e){this.board.mb.scrollString(e)},t.scrollNumber=function(e){this.board.mb.scrollInteger(e)},t.on=function(e,t){var n=2>7&127])}this.myPort.write([this.SYSEX_END])},t.scrollInteger=function(e,t){this.isScrolling=!0,null==t&&(t=120),this.myPort.write([this.SYSEX_START,this.MB_SCROLL_INTEGER,t,127&e,e>>7&127,e>>14&127,e>>21&127,e>>28&127,this.SYSEX_END])},t.setPinMode=function(e,t){e<0||20>3,r=this.DIGITAL_INPUT;0==t&&(r=this.DIGITAL_INPUT),1==t&&(r=this.INPUT_PULLUP),2==t&&(r=this.INPUT_PULLDOWN),this.myPort.write([this.SET_PIN_MODE,e,r]),this.myPort.write([this.STREAM_DIGITAL|n,1])}},t.stopTrackingDigitalPins=function(){for(var e=0;e<3;e++)this.myPort.write([this.STREAM_DIGITAL|e,0])},t.clearChannelData=function(){this.analogChannel.fill(0),this.analogUpdateCount=0,this.channelUpdateCounts.fill(0)},t.streamAnalogChannel=function(e){e<0||15>7&127,this.SYSEX_END])},t.enableLightSensor=function(){this.myPort.write([this.SET_PIN_MODE,11,this.ANALOG_INPUT])},t.setTouchMode=function(e,t){if(!(e<0||2>7&127,this.SYSEX_END])},t.turnOffOutput=function(e){e<0||20=t.state.threshold||t.state.currentReading>=t.state.threshold)&&(t.emit("data"),t.state.currentReading!==t.board.mb.analogChannel[l.SENSOR_CHANNELS.lightSensor]&&t.emit("change")),t.state.currentReading=t.board.mb.analogChannel[l.SENSOR_CHANNELS.lightSensor]}),t.start(),Object.defineProperties(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t),{value:{get:function(){return c(this.board.mb.analogChannel[l.SENSOR_CHANNELS.lightSensor],this.state.rangeMin,this.state.rangeMax)}},threshold:{set:function(e){this.state.threshold=e},get:function(e){return this.state.threshold}}}),t}!function(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}(e,n);var t=e.prototype;return t.start=function(){this.board.mb.enableLightSensor(),this.board.mb.streamAnalogChannel(l.SENSOR_CHANNELS.lightSensor)},t.stop=function(){this.board.mb.stopStreamingAnalogChannel(l.SENSOR_CHANNELS.lightSensor)},t.reset=function(){this.state.threshold=128,this.state.rangeMin=0,this.state.rangeMax=l.MAX_LIGHT_SENSOR_VALUE,this.state.currentReading=0,this.state.currentBufferWriteIndex=0,this.state.buffer&&this.state.buffer.fill(0)},t.getAveragedValue=function(e){var t={ms:e};(0,u.apiValidateTypeAndRange)(t,"lightSensor.getAveragedValue","ms",t.ms,"number",l.SAMPLE_INTERVAL,l.MAX_SENSOR_BUFFER_DURATION);var n,r=Math.ceil(e/l.SAMPLE_INTERVAL);n=r>=this.state.currentBufferWriteIndex?this.state.currentBufferWriteIndex:r;for(var i=this.state.currentBufferWriteIndex-1,o=0,a=this.state.currentBufferWriteIndex-n;a<=i;a++){var s=(a+this.state.buffer.length)%this.state.buffer.length;o+=this.state.buffer[s]}return c(o/n,this.state.rangeMin,this.state.rangeMax)},t.setRange=function(e,t){this.state.rangeMin=e,this.state.rangeMax=t},e}(r.EventEmitter);function c(e,t,n){var r=e/l.MAX_LIGHT_SENSOR_VALUE;return(0,l.roundToHundredth)(t+r*(n-t))}t.default=i,e.exports=t.default},2871:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(){function e(e){this.board=e.board,this.pin=e.pin,this.isOn=!1}var t=e.prototype;return t.on=function(){this.board.setDigitalOutput(this.pin,1),this.isOn=!0},t.off=function(){this.board.setDigitalOutput(this.pin,0),this.isOn=!1},t.toggle=function(){return this.isOn?this.off():this.on()},e}();t.default=r,e.exports=t.default},2872:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var r=n(792),i=n(61);function o(e){var n=this;this.buttonEvents=new Array(6).fill(0),this.board=e,this.pullup=r.EXTERNAL_PINS.includes(this.board.pin),this.pullup&&this.board.mb.trackDigitalPin(this.board.pin,1),this.connect=!1,this.holdThreshold=500,this.holdTimer=null,this.board.mb.trackDigitalComponent(this.board.pin,function(e,t){n.board.pin===e&&(n.buttonEvents[t]++,1!==t||n.connect?2===t&&n.connect&&(n.emit("up"),n.connect=!1,n.holdTimer&&(clearInterval(n.holdTimer),n.holdTimer=null)):(n.emit("down"),n.connect=!0,n.holdTimer=setInterval(function(){n.emit("hold")},n.holdThreshold)))}),Object.defineProperties(this,{isPressed:{get:function(){return this.buttonEvents[1]>this.buttonEvents[2]}},holdtime:{get:function(){return this.holdThreshold}}})}n(10),o.inherits(i.EventEmitter),e.exports=t.default},2873:function(g,b,y){"use strict";(function(e){Object.defineProperty(b,"__esModule",{value:!0}),b.default=void 0;var o=n(y(12)),t=y(61),l=n(y(1577)),r=n(y(2497)),u=n(y(48)),i=n(y(2492)),a=y(2920),c=y(610),d=n(y(2590)),p=n(y(2589)),f=y(2647),h=y(1890);function n(e){return e&&e.__esModule?e:{default:e}}e.hrtime=y(2928);var m={A0:12,A1:6,A2:9,A3:10,A4:3,A5:2,A6:0,A7:1},s=function(n){function s(e){var t;return(t=n.call(this)||this).port_=e,t.serialPort_=null,t.fiveBoard_=null,t.prewiredComponents_=null,t.dynamicComponents_=[],t.boardType_=f.BOARD_TYPE.OTHER,t}!function(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}(s,n);var e=s.prototype;return e.connect=function(){var e=this;return Promise.resolve().then(function(){return e.connectToFirmware()}).then(function(){return e.initializeComponents()}).then(function(){return e.initializeEventForwarding()})},e.connectToFirmware=function(){var a=this;return new Promise(function(e,t){var n=a.port_?a.port_.comName:void 0,r=s.openSerialPort(n),i=s.makePlaygroundTransport(r),o=new l.default.Board({io:i,repl:!1,debug:!1});o.once("ready",function(){a.serialPort_=r,a.fiveBoard_=o,a.fiveBoard_.samplingInterval(100),a.boardType_=(0,f.detectBoardTypeFromPort)(a.port_),a.boardType_===f.BOARD_TYPE.EXPRESS&&(a.fiveBoard_.isExpressBoard=!0),u.default.isEnabled("detect-board")&&a.detectFirmwareVersion(i),e()}),o.on("error",t),i.on("error",t)})},e.detectFirmwareVersion=function(e){e.queryFirmware(function(){console.log(e.firmware.version.major+"."+e.firmware.version.minor)})},e.initializeComponents=function(){var t=this;if(!this.fiveBoard_)throw new Error("Cannot initialize components: Not connected to board firmware.");return(0,a.createCircuitPlaygroundComponents)(this.fiveBoard_).then(function(e){t.prewiredComponents_=function(i){for(var e=1;e>=1,o&&(t^=140),r>>=1}return t},readDevices:function(e){for(var t=o.from7BitArray(e),n=[],r=0;r>6&3)}}}};function l(e){if(!(this instanceof l))return new l(e);o.Component.call(this,e=o.Options(e));var t=e.freq||25,n=null,r=null,i={euler:{heading:0,roll:0,pitch:0},quarternion:{w:0,x:0,y:0,z:0},calibration:0};if(null===(n=e.controller&&"string"==typeof e.controller?s[e.controller.toUpperCase()]:e.controller)||"object"!=typeof n)throw new Error("Missing valid Orientation controller");o.Controller.call(this,n,e),this.toScaledQuarternion||(this.toScaledQuarternion=e.toScaledQuarternion||function(e){return e}),this.toScaledEuler||(this.toScaledEuler=e.toScaledEuler||function(e){return e}),a.set(this,i),"function"==typeof this.initialize&&this.initialize(e,function(e){r=e}),setInterval(function(){if(null!==r){var t=!1,e=!1;["heading","roll","pitch"].forEach(function(e){i.euler[e]!==r.orientation.euler[e]&&(t=!0),i.euler[e]=r.orientation.euler[e]}),["w","x","y","z"].forEach(function(e){i.quarternion[e]!==r.orientation.quarternion[e]&&(t=!0),i.quarternion[e]=r.orientation.quarternion[e]}),r.calibration&&(i.calibration!==r.calibration&&(e=!0),i.calibration=r.calibration);var n={euler:this.euler,quarternion:this.quarternion,calibration:this.calibration};this.emit("data",n),t&&this.emit("change",n),e&&this.emit("calibration",this.calibration)}}.bind(this),t)}i.inherits(l,r),Object.defineProperties(l.prototype,{euler:{get:function(){var e=a.get(this);return this.toScaledEuler(e)}},quarternion:{get:function(){var e=a.get(this);return this.toScaledQuarternion(e)}}}),e.exports=l},2887:function(e,t){t.linear=function(e){return e},t.inQuad=function(e){return e*e},t.outQuad=function(e){return e*(2-e)},t.inOutQuad=function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},t.inCube=function(e){return e*e*e},t.outCube=function(e){return--e*e*e+1},t.inOutCube=function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},t.inQuart=function(e){return e*e*e*e},t.outQuart=function(e){return 1- --e*e*e*e},t.inOutQuart=function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},t.inQuint=function(e){return e*e*e*e*e},t.outQuint=function(e){return--e*e*e*e*e+1},t.inOutQuint=function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},t.inSine=function(e){return 1-Math.cos(e*Math.PI/2)},t.outSine=function(e){return Math.sin(e*Math.PI/2)},t.inOutSine=function(e){return.5*(1-Math.cos(Math.PI*e))},t.inExpo=function(e){return 0==e?0:Math.pow(1024,e-1)},t.outExpo=function(e){return 1==e?e:1-Math.pow(2,-10*e)},t.inOutExpo=function(e){return 0==e?0:1==e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))},t.inCirc=function(e){return 1-Math.sqrt(1-e*e)},t.outCirc=function(e){return Math.sqrt(1- --e*e)},t.inOutCirc=function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},t.inBack=function(e){return e*e*(2.70158*e-1.70158)},t.outBack=function(e){return--e*e*(2.70158*e+1.70158)+1},t.inOutBack=function(e){var t=2.5949095;return(e*=2)<1?e*e*((1+t)*e-t)*.5:.5*((e-=2)*e*((1+t)*e+t)+2)},t.inBounce=function(e){return 1-t.outBounce(1-e)},t.outBounce=function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},t.inOutBounce=function(e){return e<.5?.5*t.inBounce(2*e):.5*t.outBounce(2*e-1)+.5},t["in-quad"]=t.inQuad,t["out-quad"]=t.outQuad,t["in-out-quad"]=t.inOutQuad,t["in-cube"]=t.inCube,t["out-cube"]=t.outCube,t["in-out-cube"]=t.inOutCube,t["in-quart"]=t.inQuart,t["out-quart"]=t.outQuart,t["in-out-quart"]=t.inOutQuart,t["in-quint"]=t.inQuint,t["out-quint"]=t.outQuint,t["in-out-quint"]=t.inOutQuint,t["in-sine"]=t.inSine,t["out-sine"]=t.outSine,t["in-out-sine"]=t.inOutSine,t["in-expo"]=t.inExpo,t["out-expo"]=t.outExpo,t["in-out-expo"]=t.inOutExpo,t["in-circ"]=t.inCirc,t["out-circ"]=t.outCirc,t["in-out-circ"]=t.inOutCirc,t["in-back"]=t.inBack,t["out-back"]=t.outBack,t["in-out-back"]=t.inOutBack,t["in-bounce"]=t.inBounce,t["out-bounce"]=t.outBounce,t["in-out-bounce"]=t.inOutBounce},2888:function(o,e,a){(function(e,t){Object.assign&&Map||a(2336);var n=a(61).EventEmitter,r=a(94),l=new n,u={},c=!1,d=new Map,p=e.setImmediate||t.nextTick;function s(e){if(!(this instanceof s))return new s(e);this.called=0,this.now=this.calledAt=Date.now(),d.set(this,e),e.isRunnable=!0,e.later=this.now+e.time,u[e.later]||(u[e.later]=[]),u[e.later].push(this)}function i(e){d.set(this,[]),this.add(e)}r.inherits(s,n),s.deriveOp=function(e,t){return"task"!==t?t:e},s.prototype.stop=function(){d.get(this).isRunnable=!1,this.emit("stop")},r.inherits(i,n),i.prototype.stop=function(){d.get(this).forEach(function(e){e.stop()}),this.emit("stop")},i.prototype.add=function(e){var t,n,r,i,o,a=this;for(this.cumulative=this.cumulative||0,o=d.get(this);e.length;)n=e.shift(),t=Object.keys(n).reduce(s.deriveOp,""),this.cumulative+=n[t],0===e.length&&(r=n.task,n.task=function(e){r.call(a,e),a.emit("end",e),a.cumulative=0}),i="loop"===t&&0===e.length?l.delay(this.cumulative-n[t],function(){i=l.loop(n[t],n.task),o.push(i)}):l[t](this.cumulative,n.task),o.push(i)},l.queue=function(e){var t=new i(e);return h(),t};var f=Date.now();function h(){c||(c=!0,l.emit("busy"));var e,t,n,r=Object.keys(u),i=r.length&&+r[r.length-1],o=Date.now(),a=[],s=!0;for(i<=o&&(s=!1),n=f;n<=o;n++)[].push.apply(a,u[n]||[]);if(a.length){for(;a.length;)t=a.shift(),(e=d.get(t)).isRunnable&&(t.called++,t.calledAt=o,e.task.call(t,t)),"loop"===e.type&&e.isRunnable&&(s=!0,e.later=o+e.time,u[e.later]||(u[e.later]=[]),e.isRunnable&&u[e.later].push(t));for(n=f;n<=o;n++)delete u[n];a.length=0}f=o,s?p(h):(c=!1,l.emit("idle"))}["loop","delay"].forEach(function(r){l[r]=function(e,t){"function"==typeof e&&(t=e,e=10);var n=new s({time:e,type:r,task:t});return c||h(),n}}),l.wait=l.defer=l.delay,l.repeat=function(t,e,n){return l.loop(e,function(e){n(e),e.called===t&&this.stop()})},l.clear=function(){c=!1,l.removeAllListeners(),u={}},o.exports=l}).call(this,a(32),a(36))},2889:function(s,e,l){(function(e){var u=l(203),t=l(882),i=l(1946),r=u.Pins,c=l(293),n=l(61).EventEmitter,o=l(94),d=new Map,p={down:["down","press","tap","impact","hit"],up:["up","release"]},f={DEFAULT:{initialize:{value:function(e,t){var n=d.get(this);r.isFirmata(this)&&"string"==typeof e.pinValue&&"A"===e.pinValue[0]&&(e.pinValue=this.io.analogPins[+e.pinValue.slice(1)]),this.pin=Number.isNaN(+e.pinValue)?e.pinValue:+e.pinValue,this.io.pinMode(this.pin,this.io.MODES.INPUT),this.pullup&&this.io.digitalWrite(this.pin,this.io.HIGH),this.pulldown&&this.io.digitalWrite(this.pin,this.io.LOW),this.io.digitalRead(this.pin,function(e){e!==n.last&&t(e)})}},toBoolean:{value:function(e){return e===this.downValue}}},TINKERKIT:{initialize:{value:function(e,t){var n=d.get(this),r=0;this.io.pinMode(this.pin,this.io.MODES.ANALOG),this.io.analogRead(this.pin,function(e){(e=512>2,n>>2,(e[5]<<8|e[4])>>2].map(function(e){return a.constrain(e,0,255)}),i=0;i<3;i++)t+=l(r[i].toString(16),2);o(t)})}},toRGB:{value:function(n){return n=String(n),[0,0,0].map(function(e,t){return parseInt(n.slice(2*t,2*t+2),16)})}}}},c=["red","green","blue"];function d(e){if(!(this instanceof d))return new d(e);var t=null,n=e.freq||25,r=0,i=null;if(o.Component.call(this,e=o.Options(e)),null==(t="string"==typeof e.controller?u[e.controller]:e.controller))throw new Error("Color expects a valid controller");s.set(this,{}),o.Controller.call(this,t,e),this.toRGB||(this.toRGB=e.toRGB||function(e){return e}),Object.defineProperties(this,{value:{get:function(){return r}},rgb:{get:function(){return this.toRGB(r).reduce(function(e,t,n){return e[c[n]]=t,e},{})}}}),"function"==typeof this.initialize&&this.initialize(e,function(e){r=e}),setInterval(function(){if(void 0!==r){var e={rgb:this.rgb};this.emit("data",e),r!==i&&(i=r,this.emit("change",e))}}.bind(this),n)}r.inherits(d,n),d.hexCode=function(n){return void 0===n.red||void 0===n.green||void 0===n.blue?null:0===n.length?"unknown":c.reduce(function(e,t){return e+l(n[t].toString(16),2)},"")},e.env.IS_TEST_MODE&&(d.Controllers=u,d.purge=function(){s.clear()}),i.exports=d}).call(this,p(36))},2891:function(f,e,h){(function(e){var o=h(203),n=h(1454),a=o.Pins,t=h(882),l=h(293),r=h(61).EventEmitter,i=h(94),u=new Map,s={PCA9685:{initialize:{value:function(e){var t=u.get(this);this.address=e.address||64,this.pwmRange=e.pwmRange||[544,2400],this.frequency=e.frequency||50,t.expander=n.get({address:this.address,controller:this.controller,bus:this.bus,pwmRange:this.pwmRange,frequency:this.frequency}),this.pin=t.expander.normalize(e.pin)}},write:{writable:!0,value:function(e,t){u.get(this).expander.servoWrite(e,t)}}},DEFAULT:{initialize:{value:function(e){e.debug&&!this.board.pins.isServo(this.pin)&&o.Pins.Error({pin:this.pin,type:"PWM",via:"Servo"}),this.io.servoConfig(this.pin,this.pwmRange[0],this.pwmRange[1])}},write:{writable:!0,value:function(e,t){this.io.servoWrite(e,t)}}}},c={FORWARD:{deviceName:{get:function(){return"FORWARD"}},dir:{value:function(e,t){if("forward"===t.name)return this.speed(e)}}},FORWARD_REVERSE:{deviceName:{get:function(){return"FORWARD_REVERSE"}},dir:{value:function(e,t){return"forward"===t.name?this.speed(l.fscale(e,0,100,this.neutral,this.range[1])):this.speed(l.fscale(e,0,100,this.neutral,this.range[0]))}}},FORWARD_BRAKE_REVERSE:{deviceName:{get:function(){return"FORWARD_BRAKE_REVERSE"}},dir:{value:function(e,t){"forward"===t.name?this.speed(l.fscale(e,0,100,this.neutral,this.range[1])):this.speed(l.fscale(e,0,100,this.neutral,this.range[0]))}}}};function d(e){if(!(this instanceof d))return new d(e);var t,n,r=null,i={history:[],value:0};if(o.Component.call(this,e=o.Options(e)),u.set(this,i),this.startAt=void 0!==e.startAt?e.startAt:null,this.neutral=e.neutral,this.range=e.range||[0,100],this.pwmRange=e.pwmRange||[544,2400],this.interval=null,void 0===e.controller&&a.isFirmata(this)&&("string"==typeof t&&"A"===t[0]&&(t=this.io.analogPins[+t.slice(1)]),t=+t,Number.isNaN(t)||this.pin===t||(this.pin=t)),(n="string"==typeof e.device?c[e.device]:e.device)||(n=c.FORWARD),(r=e.controller&&"string"==typeof e.controller?s[e.controller.toUpperCase()]:e.controller)||(r=s.DEFAULT),Object.defineProperties(this,Object.assign({},n,r,{value:{get:function(){return i.value}},history:{get:function(){return i.history.slice(-5)}},last:{get:function(){return i.history[i.history.length-1]||{last:null}}}})),this.initialize(e),"FORWARD"!==this.deviceName){if(Number.isNaN(+this.neutral))throw new Error("Directional speed controllers require a neutral point from 0-100 (number)");this.startAt=this.neutral}null!==this.startAt&&void 0!==this.startAt&&this.speed(this.startAt)}function p(e){if(!(this instanceof p))return new p(e);Object.defineProperty(this,"type",{value:d}),t.call(this,e)}i.inherits(d,r),d.prototype.speed=function(e){var t,n,r=u.get(this),i=r.history,o=!1,a=0;if(e=l.constrain(e,this.range[0],this.range[1]),this.interval){if(this.value===e)return this;clearInterval(this.interval),this.interval=null}if(r.value=e,0===i.length&&(o=!0),this.last.speed===e)return this;if(t=this.last.speed,n=e,(a=Math.ceil(Math.abs(t-n)))&&1!==a||(o=!0),o)return this.write(this.pin,l.fscale(e,0,100,0,180)),i.push({timestamp:Date.now(),speed:e}),this;var s=t;return this.interval=setInterval(function(){sl.touches[a].timeout&&(l.touches[a].timeout=t+l.holdtime,i.hold.push(o)),l.touches[a].value=1):(1===l.touches[a].value&&(l.touches[a].timeout=null,i.up.push(o)),l.touches[a].value=0),o=null;Object.keys(i).forEach(function(e){var t=i[e];t.length&&u.call(this,e,t)},this)}.bind(this)),Object.defineProperties(this,{isMultitouch:{get:function(){return l.isMultitouch}},value:{get:function(){return s}}})}o.MPR121QR2=o.MPR121,o.MPR121QR2_SHIELD=o.MPR121,o.MPR121_KEYPAD=o.MPR121,o.MPR121_SHIELD=o.MPR121,o.QTOUCH=o.AT42QT1070,n.inherits(a,t),e.env.IS_TEST_MODE&&(a.Controllers=o,a.purge=function(){h.clear()}),s.exports=a}).call(this,l(36))},2895:function(e,t){e.exports={MAPS:{MPR121QR2_SHIELD:{KEYS:{0:1,1:2,2:3,3:4,4:5,5:6,6:7,7:8,8:9},TARGETS:{256:0,32:1,4:2,128:3,16:4,2:5,64:6,8:7,1:8}},MPR121:{KEYS:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,10:10,11:11},TARGETS:{1:0,2:1,4:2,8:3,16:4,32:5,64:6,128:7,256:8,512:9,1024:10,2048:11}},MPR121_KEYPAD:{KEYS:{0:1,1:2,2:3,3:4,4:5,5:6,6:7,7:8,8:9,9:10,10:11,11:12},TARGETS:{8:0,128:1,2048:2,4:3,64:4,1024:5,2:6,32:7,512:8,1:9,16:10,256:11}},MPR121_SHIELD:{KEYS:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,10:10,11:11},TARGETS:{1:0,2:1,4:2,8:3,16:4,32:5,64:6,128:7,256:8,512:9,1024:10,2048:11}}},MPR121_DEFAULT_ADDRESS:90,MPR121_SOFTRESET:128,ELE0_ELE7_TOUCH_STATUS:0,ELE8_ELE11_ELEPROX_TOUCH_STATUS:1,ELE0_7_OOR_STATUS:2,ELE8_11_ELEPROX_OOR_STATUS:3,ELE0_FILTERED_DATA_LSB:4,ELE0_FILTERED_DATA_MSB:5,ELE1_FILTERED_DATA_LSB:6,ELE1_FILTERED_DATA_MSB:7,ELE2_FILTERED_DATA_LSB:8,ELE2_FILTERED_DATA_MSB:9,ELE3_FILTERED_DATA_LSB:10,ELE3_FILTERED_DATA_MSB:11,ELE4_FILTERED_DATA_LSB:12,ELE4_FILTERED_DATA_MSB:13,ELE5_FILTERED_DATA_LSB:14,ELE5_FILTERED_DATA_MSB:15,ELE6_FILTERED_DATA_LSB:16,ELE6_FILTERED_DATA_MSB:17,ELE7_FILTERED_DATA_LSB:18,ELE7_FILTERED_DATA_MSB:19,ELE8_FILTERED_DATA_LSB:20,ELE8_FILTERED_DATA_MSB:21,ELE9_FILTERED_DATA_LSB:22,ELE9_FILTERED_DATA_MSB:23,ELE10_FILTERED_DATA_LSB:24,ELE10_FILTERED_DATA_MSB:25,ELE11_FILTERED_DATA_LSB:26,ELE11_FILTERED_DATA_MSB:27,ELEPROX_FILTERED_DATA_LSB:28,ELEPROX_FILTERED_DATA_MSB:29,ELE0_BASELINE_VALUE:30,ELE1_BASELINE_VALUE:31,ELE2_BASELINE_VALUE:32,ELE3_BASELINE_VALUE:33,ELE4_BASELINE_VALUE:34,ELE5_BASELINE_VALUE:35,ELE6_BASELINE_VALUE:36,ELE7_BASELINE_VALUE:37,ELE8_BASELINE_VALUE:38,ELE9_BASELINE_VALUE:39,ELE10_BASELINE_VALUE:40,ELE11_BASELINE_VALUE:41,ELEPROX_BASELINE_VALUE:42,MHD_RISING:43,NHD_AMOUNT_RISING:44,NCL_RISING:45,FDL_RISING:46,MHD_FALLING:47,NHD_AMOUNT_FALLING:48,NCL_FALLING:49,FDL_FALLING:50,NHD_AMOUNT_TOUCHED:51,NCL_TOUCHED:52,FDL_TOUCHED:53,ELEPROX_MHD_RISING:54,ELEPROX_NHD_AMOUNT_RISING:55,ELEPROX_NCL_RISING:56,ELEPROX_FDL_RISING:57,ELEPROX_MHD_FALLING:58,ELEPROX_NHD_AMOUNT_FALLING:59,ELEPROX_FDL_FALLING:60,ELEPROX_NHD_AMOUNT_TOUCHED:62,ELEPROX_NCL_TOUCHED:63,ELEPROX_FDL_TOUCHED:64,ELE0_TOUCH_THRESHOLD:65,ELE0_RELEASE_THRESHOLD:66,ELE1_TOUCH_THRESHOLD:67,ELE1_RELEASE_THRESHOLD:68,ELE2_TOUCH_THRESHOLD:69,ELE2_RELEASE_THRESHOLD:70,ELE3_TOUCH_THRESHOLD:71,ELE3_RELEASE_THRESHOLD:72,ELE4_TOUCH_THRESHOLD:73,ELE4_RELEASE_THRESHOLD:74,ELE5_TOUCH_THRESHOLD:75,ELE5_RELEASE_THRESHOLD:76,ELE6_TOUCH_THRESHOLD:77,ELE6_RELEASE_THRESHOLD:78,ELE7_TOUCH_THRESHOLD:79,ELE7_RELEASE_THRESHOLD:80,ELE8_TOUCH_THRESHOLD:81,ELE8_RELEASE_THRESHOLD:82,ELE9_TOUCH_THRESHOLD:83,ELE9_RELEASE_THRESHOLD:84,ELE10_TOUCH_THRESHOLD:85,ELE10_RELEASE_THRESHOLD:86,ELE11_TOUCH_THRESHOLD:87,ELE11_RELEASE_THRESHOLD:88,ELEPROX_TOUCH_THRESHOLD:89,ELEPROX_RELEASE_THRESHOLD:90,DEBOUNCE_TOUCH_AND_RELEASE:91,AFE_CONFIGURATION:92,FILTER_CONFIG:93,ELECTRODE_CONFIG:94,ELE0_CURRENT:95,ELE1_CURRENT:96,ELE2_CURRENT:97,ELE3_CURRENT:98,ELE4_CURRENT:99,ELE5_CURRENT:100,ELE6_CURRENT:101,ELE7_CURRENT:102,ELE8_CURRENT:103,ELE9_CURRENT:104,ELE10_CURRENT:105,ELE11_CURRENT:106,ELEPROX_CURRENT:107,ELE0_ELE1_CHARGE_TIME:108,ELE2_ELE3_CHARGE_TIME:109,ELE4_ELE5_CHARGE_TIME:110,ELE6_ELE7_CHARGE_TIME:111,ELE8_ELE9_CHARGE_TIME:112,ELE10_ELE11_CHARGE_TIME:113,ELEPROX_CHARGE_TIME:114,GPIO_CONTROL_0:115,GPIO_CONTROL_1:116,GPIO_DATA:117,GPIO_DIRECTION:118,GPIO_ENABLE:119,GPIO_SET:120,GPIO_CLEAR:121,GPIO_TOGGLE:122,AUTO_CONFIG_CONTROL_0:123,AUTO_CONFIG_CONTROL_1:124,AUTO_CONFIG_USL:125,AUTO_CONFIG_LSL:126,AUTO_CONFIG_TARGET_LEVEL:127,TOUCH_THRESHOLD:15,RELEASE_THRESHOLD:10,NUM_CHANNELS:12}},2896:function(f,e,h){(function(i){var n=h(203),o=h(2493),e=h(2897),a=h(2494),s=new Map;function r(e){for(var t,n=i.hrtime(),r=0;r>4),this.writeBits(e,15&t),this}},writeBits:{writable:!0,value:function(e,t){for(var n=s.get(this),r=0,i=0;i<4;i++)1==(1&t)&&(r|=n.data[i]),t>>=1;return e===this.REGISTER.DATA&&(e=this.REGISTER.RS),r|=e|n.backlight.statusMask,this.pulse(r),this}},pulse:{writable:!0,value:function(e){this.expander.portWrite(e|this.REGISTER.EN),this.expander.portWrite(e&~this.REGISTER.EN)}}},PARALLEL:{REGISTER:{value:t.DEFAULT},CHARS:{value:e.DEFAULT},initialize:{value:function(e){this.bitMode=e.bitMode||4,this.lines=e.lines||2,this.rows=e.rows||2,this.cols=e.cols||16,this.dots=e.dots||"5x8",Array.isArray(e.pins)?this.pins={rs:e.pins[0],en:e.pins[1],data:[e.pins[5],e.pins[4],e.pins[3],e.pins[2]]}:this.pins=e.pins;var t=this.REGISTER.DISPLAY|this.REGISTER.DISPLAYON,n={display:t,characters:{},index:this.REGISTER.MEMORYLIMIT-1,backlight:{polarity:1,pin:null,value:null}};if(s.set(this,n),e.pins.forEach(function(e){this.io.pinMode(e,1)},this),this.io.digitalWrite(this.pins.rs,this.io.LOW),this.io.digitalWrite(this.pins.en,this.io.LOW),e.backlight){if("number"==typeof e.backlight){var r=e.backlight;e.backlight={pin:r}}e.backlight.pin&&(n.backlight.pin=new o({pin:e.backlight.pin,board:this.board}),n.backlight.pin.high())}this.command(3),l(4),this.command(3),l(4),this.command(3),4===this.bitMode&&this.command(2),this.command(this.REGISTER.LINE[this.lines]|this.REGISTER.DOTS[this.dots]),this.command(t),this.clear(),this.home()}}}};function d(e){if(!(this instanceof d))return new d(e);n.Component.call(this,e=n.Options(e));var t=null;null==(t=e.controller&&"string"==typeof e.controller?c[e.controller.toUpperCase()]:e.controller)&&(t=c.PARALLEL),n.Controller.call(this,t,e),this.ctype=e.controller,this.initialize&&this.initialize(e),Object.defineProperties(this,{characters:{get:function(){return Object.assign({},s.get(this).characters)}}})}c.LCM1602=c.LCD1602=c.LCM1602IIC=c.LCD2004=c.PCF8574A=c.PCF8574AT=c.PCF8574T=c.PCF8574,c.MJKDZ=Object.assign({},c.PCF8574,{REGISTER:{value:Object.assign({},t.DEFAULT,{SHIFT_LEFT:0,COMMAND:0,DATA:6,EN:16,RW:5,RS:6,D4:0,D5:1,D6:2,D7:3})},writeBits:{writable:!0,value:function(e,t){for(var n=s.get(this),r=0,i=0;i<4;i++)1==(1&t)&&(r|=n.data[i]),t>>=1;return e===this.REGISTER.DATA&&(e=1<>4),this.send(t),this},d.prototype.send=function(e){for(var t=0,n={4:8,8:128}[this.bitMode];0>=1)this.io.digitalWrite(this.pins.data[t],this.io[e&n?"HIGH":"LOW"]),t++;return this.io.digitalWrite(this.pins.en,this.io.LOW),this.io.digitalWrite(this.pins.en,this.io.HIGH),r(1),this.io.digitalWrite(this.pins.en,this.io.LOW),r(37),this},d.prototype.hilo=function(e){this.io.digitalWrite(this.pins.rs,this.io.HIGH),e.call(this),this.io.digitalWrite(this.pins.rs,this.io.LOW)};var p=/:(\w+):/g;d.prototype.print=function(e,t){var r,n,i;return e+="",t=t||{},r=s.get(this),n=!(t.dontProcessSpecials||!1)&&p.test(e),1===e.length?this.hilo(function(){this.command(this.REGISTER.DATA,e.charCodeAt(0))}):n?(i=e.replace(p,function(e,t){var n=r.characters[t];return"number"==typeof n?String.fromCharCode(n):e}),this.print(i,{dontProcessSpecials:!0})):this.hilo(function(){Array.from(e).forEach(function(e){this.command(this.REGISTER.DATA,e.charCodeAt(0))},this)}),this},d.prototype.write=function(e){return this.hilo.call(this,function(){this.command(this.REGISTER.DATA,e)}),this},d.prototype.clear=function(){return this.command(this.REGISTER.CLEAR),l(2),this},d.prototype.home=function(){return this.command(this.REGISTER.HOME),l(2),this},d.prototype.setCursor=function(e,t){return this.command(this.REGISTER.SETDDRAMADDR|e+[0,64,20,84][t]),this},d.prototype.backlight=function(e){var t=s.get(this);return e=void 0===e,t.backlight.pin instanceof o&&(e?t.backlight.pin.high():t.backlight.pin.low()),e?t.display|=this.REGISTER.DISPLAYON:t.display&=~this.REGISTER.DISPLAYON,this.command(t.display),this},d.prototype.noBacklight=function(){var e=s.get(this);return e.backlight.pin instanceof o&&e.backlight.pin.high(),this.backlight(!1)},d.prototype.on=function(){var e=s.get(this);return e.display|=this.REGISTER.DISPLAYON,this.command(e.display),this},d.prototype.off=function(){var e=s.get(this);return e.display&=~this.REGISTER.DISPLAYON,this.command(e.display),this},d.prototype.cursor=function(e,t){if(void 0!==t&&void 0!==e)return this.setCursor(t,e);var n=s.get(this);return n.display|=this.REGISTER.CURSORON,this.command(n.display),this},d.prototype.noCursor=function(){var e=s.get(this);return e.display&=~this.REGISTER.CURSORON,this.command(e.display),this},d.prototype.blink=function(){var e=s.get(this);return e.display|=this.REGISTER.BLINKON,this.command(e.display),this},d.prototype.noBlink=function(){var e=s.get(this);return e.display&=~this.REGISTER.BLINKON,this.command(e.display),this},d.prototype.autoscroll=function(){var e=s.get(this);return e.display|=this.REGISTER.ENTRYSHIFTINCREMENT,this.command(this.REGISTER.ENTRY|e.display),this},d.prototype.noAutoscroll=function(){var e=s.get(this);return e.display&=~this.REGISTER.ENTRYSHIFTINCREMENT,this.command(this.REGISTER.ENTRY|e.display),this},d.prototype.createChar=function(e,t){var n,r=s.get(this);return"number"==typeof e?n=7&e:(n=r.index,r.index--,-1===r.index&&(r.index=this.REGISTER.MEMORYLIMIT-1)),this.command(this.REGISTER.SETCGRAMADDR|n<<3),this.hilo(function(){for(var e=0;e<8;e++)this.command(this.REGISTER.DATA,t[e])}),r.characters[e]=n},d.prototype.useChar=function(e){var t=s.get(this);if(void 0===t.characters[e]){var n=this.createChar(e,this.CHARS[e]);for(var r in t.characters)if(e!==r&&t.characters[r]===n){delete t.characters[r];break}t.characters[e]=n}return this},d.POSITIVE=0,d.NEGATIVE=1,d.Characters=e,f.exports=d}).call(this,h(36))},2897:function(e,t){e.exports={DEFAULT:{0:[14,27,27,27,27,27,14],1:[2,6,14,6,6,6,6],2:[14,27,3,6,12,24,31],3:[14,27,3,14,3,27,14],4:[3,7,15,27,31,3,3],5:[31,24,30,3,3,27,14],6:[14,27,24,30,27,27,14],7:[31,3,6,12,12,12,12],8:[14,27,27,14,27,27,14],9:[14,27,27,15,3,27,14],10:[23,21,21,21,23,0,31],11:[10,10,10,10,10,0,31],12:[23,17,23,20,23,0,31],13:[23,17,19,17,23,0,31],14:[21,21,23,17,17,0,31],15:[23,20,23,17,23,0,31],16:[23,20,23,21,23,0,31],17:[23,17,18,18,18,0,31],18:[23,21,23,21,23,0,31],19:[23,21,23,17,23,0,31],circle:[0,14,17,17,17,14,0],cdot:[0,14,17,21,17,14,0],donut:[0,14,31,27,31,14,0],ball:[0,14,31,31,31,14,0],square:[0,31,17,17,17,31,0],sdot:[0,31,17,21,17,31,0],fbox:[0,31,31,31,31,31,0],sbox:[0,0,14,10,14,0,0],sfbox:[0,0,14,14,14,0,0],bigpointerright:[8,12,10,9,10,12,8],bigpointerleft:[2,6,10,18,10,6,2],arrowright:[8,12,10,9,10,12,8],arrowleft:[2,6,10,18,10,6,2],ascprogress1:[16,16,16,16,16,16,16,16],ascprogress2:[24,24,24,24,24,24,24,24],ascprogress3:[28,28,28,28,28,28,28,28],ascprogress4:[30,30,30,30,30,30,30,30],fullprogress:[31,31,31,31,31,31,31,31],descprogress1:[1,1,1,1,1,1,1,1],descprogress2:[3,3,3,3,3,3,3,3],descprogress3:[7,7,7,7,7,7,7,7],descprogress4:[15,15,15,15,15,15,15,15],ascchart1:[31,0,0,0,0,0,0,0],ascchart2:[31,31,0,0,0,0,0,0],ascchart3:[31,31,31,0,0,0,0,0],ascchart4:[31,31,31,31,0,0,0,0],ascchart5:[31,31,31,31,31,0,0,0],ascchart6:[31,31,31,31,31,31,0,0],ascchart7:[31,31,31,31,31,31,31,0],descchart1:[0,0,0,0,0,0,0,31],descchart2:[0,0,0,0,0,0,31,31],descchart3:[0,0,0,0,0,31,31,31],descchart4:[0,0,0,0,31,31,31,31],descchart5:[0,0,0,31,31,31,31,31],descchart6:[0,0,31,31,31,31,31,31],descchart7:[0,31,31,31,31,31,31,31],borderleft1:[1,1,1,1,1,1,1,1],borderleft2:[3,2,2,2,2,2,2,3],borderleft3:[7,4,4,4,4,4,4,7],borderleft4:[15,8,8,8,8,8,8,15],borderleft5:[31,16,16,16,16,16,16,31],bordertopbottom5:[31,0,0,0,0,0,0,31],borderright1:[16,16,16,16,16,16,16,16],borderright2:[24,8,8,8,8,8,8,24],borderright3:[28,4,4,4,4,4,4,28],borderright4:[30,2,2,2,2,2,2,30],borderright5:[31,1,1,1,1,1,1,31],box1:[3,3,3,0,0,0,0],box2:[24,24,24,0,0,0,0],box3:[27,27,27,0,0,0,0],box4:[0,0,0,0,3,3,3],box5:[3,3,3,0,3,3,3],box6:[24,24,24,0,3,3,3],box7:[27,27,27,0,3,3,3],box8:[0,0,0,0,24,24,24],box9:[3,3,3,0,24,24,24],box10:[24,24,24,0,24,24,24],box11:[27,27,27,0,24,24,24],box12:[0,0,0,0,27,27,27],box13:[3,3,3,0,27,27,27],box14:[24,24,24,0,27,27,27],box15:[27,27,27,0,27,27,27],euro:[3,4,30,8,30,8,7],cent:[0,0,14,17,16,21,14,8],speaker:[1,3,15,15,15,3,1],sound:[8,16,0,24,0,16,8],x:[0,27,14,4,14,27,0],target:[0,10,17,21,17,10,0],pointerright:[0,8,12,14,12,8,0],pointerup:[0,0,4,14,31,0,0],pointerleft:[0,2,6,14,6,2,0],pointerdown:[0,0,31,14,4,0,0],arrowne:[0,15,3,5,9,16,0],arrownw:[0,30,24,20,18,1,0],arrowsw:[0,1,18,20,24,30,0],arrowse:[0,16,9,5,3,15,0],dice1:[0,0,0,4,0,0,0],dice2:[0,16,0,0,0,1,0],dice3:[0,16,0,4,0,1,0],dice4:[0,17,0,0,0,17,0],dice5:[0,17,0,4,0,17,0],dice6:[0,17,0,17,0,17,0],bell:[4,14,14,14,31,0,4],smile:[0,10,0,17,14,0,0],note:[2,3,2,14,30,12,0],clock:[0,14,21,23,17,14,0],heart:[0,10,31,31,31,14,4,0],duck:[0,12,29,15,15,6,0],check:[0,1,3,22,28,8,0],retarrow:[1,1,5,9,31,8,4],runninga:[6,6,5,14,20,4,10,17],runningb:[6,6,4,14,14,4,10,10]}}},2898:function(e,t,n){var i=n(2584),o=n(2900),a={};Object.keys(i).forEach(function(n){a[n]={},Object.defineProperty(a[n],"channels",{value:i[n].channels});var r=o(n);Object.keys(r).forEach(function(e){var t=r[e];a[n][e]=function(i){var e=function(e){if(null==e)return e;1":[8,4,2,1,2,4,8,0],"?":[14,17,1,2,4,0,4,0],"@":[14,17,1,13,21,21,14,0],"{":[2,4,4,8,4,4,2,0],"|":[4,4,4,0,4,4,4,0],"}":[8,4,4,2,4,4,8,0],"~":[8,21,2,0,0,0,0,0],0:[14,17,19,21,25,17,14,0],1:[4,12,4,4,4,4,14,0],2:[14,17,1,2,4,8,31,0],3:[31,2,4,2,1,17,14,0],4:[2,6,10,18,31,2,2,0],5:[31,16,30,1,1,17,14,0],6:[6,8,16,30,17,17,14,0],7:[31,1,2,4,4,4,4,0],8:[30,17,17,14,17,17,14,0],9:[14,17,17,15,1,2,12,0],A:[8,20,34,62,34,34,34,34],B:[60,34,34,62,34,34,60,0],C:[60,64,64,64,64,64,60,0],D:[124,66,66,66,66,66,124,0],E:[124,64,64,124,64,64,64,124],F:[124,64,64,124,64,64,64,64],G:[60,64,64,64,64,68,68,60],H:[68,68,68,124,68,68,68,68],I:[124,16,16,16,16,16,16,124],J:[60,8,8,8,8,8,72,48],K:[0,36,40,48,32,48,40,36],L:[64,64,64,64,64,64,64,124],M:[129,195,165,153,129,129,129,129],N:[0,66,98,82,74,70,66,0],O:[60,66,66,66,66,66,66,60],P:[60,34,34,34,60,32,32,32],Q:[28,34,34,34,34,38,34,29],R:[60,34,34,34,60,36,34,33],S:[0,30,32,32,62,2,2,60],T:[0,62,8,8,8,8,8,8],U:[66,66,66,66,66,66,34,28],V:[66,66,66,66,66,66,36,24],W:[0,73,73,73,73,42,28,0],X:[0,65,34,20,8,20,34,65],Y:[65,34,20,8,8,8,8,8],Z:[0,127,2,4,8,16,32,127],a:[0,0,14,1,15,17,15,0],b:[16,16,22,25,17,17,30,0],c:[0,0,14,17,16,17,14,0],d:[1,1,13,19,17,17,15,0],e:[0,0,14,17,31,16,14,0],f:[2,5,4,14,4,4,4,0],g:[0,13,19,19,13,1,14,0],h:[16,16,22,25,17,17,17,0],i:[4,0,12,4,4,4,14,0],j:[2,0,6,2,2,18,12,0],k:[8,8,9,10,12,10,9,0],l:[12,4,4,4,4,4,14,0],m:[0,0,26,21,21,21,21,0],n:[0,0,22,25,17,17,17,0],o:[0,0,14,17,17,17,14,0],p:[0,22,25,25,22,16,16,0],q:[0,13,19,19,13,1,1,0],r:[0,0,22,25,16,16,16,0],s:[0,0,15,16,30,1,31,0],t:[8,8,28,8,8,9,6,0],u:[0,0,18,18,18,18,13,0],v:[0,0,17,17,17,10,4,0],w:[0,0,17,17,21,21,10,0],x:[0,0,17,10,4,10,17,0],y:[0,0,17,17,19,13,1,14],z:[0,0,31,2,4,8,31,0],euro:[14,16,124,32,124,32,16,14],cent:[0,60,66,64,64,82,60,32],angryface:[0,102,102,0,24,36,66,129],circle:[60,66,129,129,129,129,66,60],cdot:[60,66,129,153,153,129,66,60],donut:[60,126,255,231,231,255,126,60],equality:[0,255,255,0,0,255,255,0],ball:[60,126,255,255,255,255,126,60],thinsquare:[255,129,129,129,129,129,129,255],thicksquare:[255,255,195,195,195,195,255,255],centeredsquare1:[0,0,60,60,60,60,0,0],centeredsquare2:[0,0,60,60,60,60,0,0],arrowright:[0,4,6,255,255,6,4,0],arrowleft:[0,32,96,255,255,96,32,0],note:[4,6,7,4,60,124,124,56],clock:[60,82,145,145,143,129,66,60],heartoutline:[102,153,129,129,66,36,24,0],heartfull:[102,255,255,255,126,60,24,0],thincheck:[0,0,1,2,4,136,80,32],thickcheck:[0,1,3,6,140,216,112,32],speaker:[3,7,63,63,63,63,7,3],sound:[0,64,128,0,192,0,128,64],xbig:[195,231,126,60,60,126,231,195],target:[60,126,195,219,219,195,126,60],bell:[24,60,60,60,60,126,0,24],smile:[0,102,102,0,0,129,66,60],frown:[0,102,102,0,0,60,66,129],winkright:[0,96,102,0,0,129,66,60],winkleft:[0,6,102,0,0,129,66,60],blink:[0,0,102,0,0,129,66,60],laughing:[0,102,102,0,255,129,66,60],tongueout:[0,102,102,0,0,126,10,4],expressionless:[0,102,102,0,0,255,0,0],ascprogress1:[128,128,128,128,128,128,128,128],ascprogress2:[192,192,192,192,192,192,192,192],ascprogress3:[224,224,224,224,224,224,224,224],ascprogress4:[240,240,240,240,240,240,240,240],ascprogress5:[248,248,248,248,248,248,248,248],ascprogress6:[252,252,252,252,252,252,252,252],ascprogress7:[254,254,254,254,254,254,254,254],fullprogress:[255,255,255,255,255,255,255,255],descprogress1:[127,127,127,127,127,127,127,127],descprogress2:[63,63,63,63,63,63,63,63],descprogress3:[31,31,31,31,31,31,31,31],descprogress4:[15,15,15,15,15,15,15,15],descprogress5:[7,7,7,7,7,7,7,7],descprogress6:[3,3,3,3,3,3,3,3],descprogress7:[1,1,1,1,1,1,1,1],ascchart1:[255,0,0,0,0,0,0,0],ascchart2:[255,255,0,0,0,0,0,0],ascchart3:[255,255,255,0,0,0,0,0],ascchart4:[255,255,255,255,0,0,0,0],ascchart5:[255,255,255,255,255,0,0,0],ascchart6:[255,255,255,255,255,255,0,0],ascchart7:[255,255,255,255,255,255,255,0],ascchart8:[255,255,255,255,255,255,255,255],descchart1:[0,255,255,255,255,255,255,255],descchart2:[0,0,255,255,255,255,255,255],descchart3:[0,0,0,255,255,255,255,255],descchart4:[0,0,0,0,255,255,255,255],descchart5:[0,0,0,0,0,255,255,255],descchart6:[0,0,0,0,0,0,255,255],descchart7:[0,0,0,0,0,0,0,255],descchart8:[0,0,0,0,0,0,0,0],borderleft1:[1,1,1,1,1,1,1,1],borderleft2:[3,2,2,2,2,2,2,3],borderleft3:[7,4,4,4,4,4,4,7],borderleft4:[15,8,8,8,8,8,8,15],borderleft5:[31,16,16,16,16,16,16,31],borderleft6:[63,32,32,32,32,32,32,63],borderleft7:[127,64,64,64,64,64,64,127],borderleft8:[255,128,128,128,128,128,128,255],bordertopbottom5:[255,0,0,0,0,0,0,255],borderright1:[128,128,128,128,128,128,128,128],borderright2:[192,64,64,64,64,64,64,192],borderright3:[224,32,32,32,32,32,32,224],borderright4:[240,16,16,16,16,16,16,240],borderright5:[248,8,8,8,8,8,8,248],borderright6:[252,4,4,4,4,4,4,252],borderright7:[254,2,2,2,2,2,2,254],borderright8:[255,1,1,1,1,1,1,255],box1:[224,224,224,0,0,0,0,0],box2:[7,7,7,0,0,0,0,0],box3:[231,231,231,0,0,0,0,0],box4:[0,0,0,0,0,7,7,7],box5:[7,7,7,0,0,7,7,7],box6:[224,224,224,0,0,7,7,7],box7:[231,231,231,0,0,7,7,7],box8:[0,0,0,0,0,224,224,224],box9:[7,7,7,0,0,224,224,224],box10:[224,224,224,0,0,224,224,224],box11:[231,231,231,0,0,224,224,224],box12:[0,0,0,0,0,231,231,231],box13:[7,7,7,0,0,231,231,231],box14:[224,224,224,0,0,231,231,231],box15:[231,231,231,0,0,231,231,231],checkerboard1:[170,85,170,85,170,85,170,85],checkerboard2:[85,170,85,170,85,170,85,170],checkerboard3:[93,234,87,186,85,238,85,187],checkerboard4:[204,51,51,204,204,51,51,204],checkerboard5:[204,204,51,51,204,204,51,51],checkerboard6:[51,204,204,51,51,204,204,51],checkerboard7:[51,51,204,204,51,51,204,204],pointerright:[32,48,56,60,60,56,48,32],pointerup:[0,0,24,60,126,255,0,0],pointerleft:[4,12,28,60,60,28,12,4],pointerdown:[0,0,255,126,60,24,0,0],arrowne:[0,62,6,10,18,34,64,128],arrownw:[0,124,96,80,72,68,2,1],arrowsw:[1,2,68,72,80,96,124,0],arrowse:[128,64,34,18,10,6,62,0],dice1:[0,0,0,24,24,0,0,0],dice2:[192,192,0,0,0,0,3,3],dice3:[192,192,0,24,24,0,3,3],dice4:[195,195,0,0,0,0,195,195],dice5:[195,195,0,24,24,0,195,195],dice6:[195,195,0,195,195,0,195,195],outlinedplus1:[60,36,231,129,129,231,36,60],outlinedplus2:[255,231,231,129,129,231,231,255],twoboxes1:[240,144,144,240,15,9,9,15],twoboxes2:[240,144,144,254,18,18,30,0],twoboxes3:[240,144,188,244,36,60,0,0],twoboxes4:[240,248,216,248,120,0,0,0],twoboxes5:[15,9,9,15,240,144,144,240],fourboxes:[255,153,153,255,255,153,153,255],chain1:[240,248,216,248,120,0,0,0],chain2:[240,144,188,244,47,61,9,15]},SPECIAL_CHARS:{0:[60,102,102,102,102,102,102,60],1:[24,56,120,24,24,24,24,24],2:[60,102,6,12,24,48,96,126],3:[60,102,6,28,6,6,102,60],4:[14,30,54,102,102,126,6,6],5:[126,96,96,124,6,6,102,60],6:[60,102,96,124,102,102,102,60],7:[126,126,6,12,24,24,24,24],8:[60,102,102,60,102,102,102,60],9:[60,102,102,62,6,6,102,60],10:[94,82,82,82,82,94,0,255],11:[36,36,36,36,36,36,0,255],12:[94,66,68,72,80,94,0,255],13:[94,66,78,66,66,94,0,255],14:[82,82,94,66,66,66,0,255],15:[94,80,94,66,66,94,0,255],16:[94,80,94,82,82,94,0,255],17:[94,66,68,72,72,72,0,255],18:[94,82,94,82,82,94,0,255],19:[94,82,94,66,66,94,0,255]},DIGIT_CHARS:{0:126,1:48,2:109,3:121,4:51,5:91,6:95,7:112,8:127,9:123," ":0,".":128,":":255,"!":176,A:119,a:125,B:127,b:31,C:78,c:13,D:126,d:61,E:79,e:111,F:71,f:71,G:94,g:123,H:55,h:23,I:48,i:16,J:60,j:56,K:55,k:23,L:14,l:6,M:85,m:85,N:21,n:21,O:126,o:29,P:103,p:103,Q:115,q:115,R:119,r:5,S:91,s:91,T:70,t:15,U:62,u:28,V:39,v:35,W:63,w:43,X:37,x:37,Y:59,y:51,Z:109,z:109}}},2905:function(e,t,n){var r=n(2495);function i(e){return e.isMatrix=!1,new r(e)}Object.assign(i,r,{CHARS:r.DIGIT_CHARS}),e.exports=i},2906:function(d,e,p){(function(e){var a=p(203),r=p(1946),t=p(1947),n=p(293),i=p(61).EventEmitter,o=p(94),s=new Map,m=n.uint16,l=n.toFixed,u={DEFAULT:{initialize:{value:function(e,t){this.io.pinMode(this.pin,this.io.MODES.ANALOG),this.io.analogRead(this.pin,t)}},toIntensityLevel:{value:function(e){return l(n.scale(e,0,1023,0,100)/100,2)}}},EVS_EV3:{initialize:{value:function(e,n){var t=s.get(this);e.mode&&(e.mode=e.mode.toUpperCase()),t.mode="REFLECTED"===e.mode?r.Type_EV3_LIGHT_REFLECTED:r.Type_EV3_LIGHT,t.shield=r.shieldPort(e.pin),t.ev3=new r(Object.assign(e,{io:this.io})),t.ev3.setup(t.shield,r.Type_EV3),t.ev3.write(t.shield,129+t.shield.offset,t.mode),t.ev3.read(t.shield,r.Light,r.Light_Bytes,function(e){var t=e[0]|e[1]<<8;n(t)})}},toIntensityLevel:{value:function(e){return l(e/100,2)}}},EVS_NXT:{initialize:{value:function(e,n){var t=s.get(this);e.mode&&(e.mode=e.mode.toUpperCase()),t.mode="REFLECTED"===e.mode?r.Type_NXT_LIGHT_REFLECTED:r.Type_NXT_LIGHT,t.shield=r.shieldPort(e.pin),t.ev3=new r(Object.assign(e,{io:this.io})),t.ev3.setup(t.shield,t.mode),t.ev3.read(t.shield,t.shield.analog,r.Analog_Bytes,function(e){var t=e[0]|e[1]<<8;n(t)})}},toIntensityLevel:{value:function(e){return l(n.scale(e,0,1023,100,0)/100,2)}}},TSL2561:{ADDRESSES:{value:[41,57,73]},REGISTER:{value:{CONTROL:0,TIMING:1,READ:44}},initialize:{value:function(e,u){var t=e.address||57,n=function(e){return 128|e};e.address=t,this.io.i2cConfig(e),this.io.i2cWriteReg(t,n(this.REGISTER.CONTROL),3);var r=[13,101,402],i=[15,120,450],c=[29975,4071,65536],d=16,p=0,o=r[p],f=0;Object.defineProperties(this,{gain:{get:function(){return d},set:function(e){if(0!==e&&16!==e)throw new RangeError("Invalid gain. Expected one of: 0, 16");d=e,this.io.i2cWriteReg(t,n(this.REGISTER.TIMING),p|d)}},integration:{get:function(){return o},set:function(e){if(-1===(p=r.indexOf(e)))throw new RangeError("Invalid integration. Expected one of: 13, 101, 402");o=e,this.io.i2cWriteReg(t,n(this.REGISTER.TIMING),p|d)}},lux:{get:function(){return f}}}),this.gain=d,this.integration=o;var h=function(){setTimeout(function(){this.io.i2cReadOnce(t,n(this.REGISTER.READ),4,function(e){var t=m(e[1],e[0]),n=m(e[3],e[2]),r=0,i=0,o=c[p];d||(o<<=4),n=n*o>>10;var a=0;(t=t*o>>10)&&(a=(n<<10)/t);var s=(a=Math.round(a))+1>>1;0<=s&&s<=64?(r=498,i=446):s<=128?(r=532,i=721):s<=192?(r=575,i=891):s<=256?(r=624,i=1022):s<=312?(r=367,i=508):s<=410?(r=210,i=251):s<=666?(r=24,i=18):666>>14),h()})}.bind(this),i[p])}.bind(this);h()}},toLux:{value:function(e){return e}},toIntensityLevel:{value:function(e){return l(n.scale(e,0,17e3,0,100)/100,2)}}},BH1750:{ADDRESSES:{value:[35,92]},initialize:{value:function(e,n){var t=e.address||35,r=e.mode||16;e.address=t,this.io.i2cConfig(e),this.io.i2cWrite(t,r);var i=function(){setTimeout(function(){this.io.i2cReadOnce(t,2,function(e){var t=e[0];t<<=8,t|=e[1],n(t),i()})}.bind(this),120)}.bind(this);i()}},toLux:{value:function(e){return Math.round(e/1.2)}},toIntensityLevel:{value:function(e){return l(n.scale(e/1.2,0,65535,0,100)/100,2)}}}};function c(e){if(!(this instanceof c))return new c(e);var t=null,n=0,r=0,i=e.freq||25;a.Component.call(this,e=a.Options(e)),t="string"==typeof e.controller?u[e.controller]:e.controller||u.DEFAULT,a.Controller.call(this,t,e),this.toIntensityLevel||(this.toIntensityLevel=e.toIntensityLevel||function(e){return e}),this.toLux||(this.toLux=e.toLux||function(e){return e}),Object.defineProperties(this,{value:{get:function(){return n}},level:{get:function(){return this.toIntensityLevel(n)}}}),s.set(this,{}),"function"==typeof this.initialize&&this.initialize(e,function(e){n=e}),void 0===this.lux&&Object.defineProperty(this,"lux",{get:function(){return this.toLux(n)}});var o={level:0,lux:0};setInterval(function(){o.level=this.level,o.lux=this.lux,this.emit("data",o),n!==r&&(r=n,this.emit("change",o))}.bind(this),i)}u.ALSPT19=u["ALS-PT19"]=u.DEFAULT,o.inherits(c,i),Object.assign(c.prototype,t),e.env.IS_TEST_MODE&&(c.Controllers=u,c.purge=function(){s.clear()}),d.exports=c}).call(this,p(36))},2907:function(c,e,d){(function(e){var n=d(203),t=d(61).EventEmitter,r=d(94),i=d(293),o=new Map,l=["x","y"];function u(e){this.pins=e.pins,this.io=e.io,this.io.pinMode(this.pins[0],this.io.MODES.OUTPUT),this.io.pinMode(this.pins[1],this.io.MODES.OUTPUT),this.io.pinMode(this.pins[2],this.io.MODES.OUTPUT),this.io.pinMode(this.pins[3],this.io.MODES.OUTPUT)}u.prototype.select=function(e){this.io.digitalWrite(this.pins[0],1&e?this.io.HIGH:this.io.LOW),this.io.digitalWrite(this.pins[1],2&e?this.io.HIGH:this.io.LOW),this.io.digitalWrite(this.pins[2],4&e?this.io.HIGH:this.io.LOW),this.io.digitalWrite(this.pins[3],8&e?this.io.HIGH:this.io.LOW)};var a={ANALOG:{initialize:{value:function(e,n){var r={x:null,y:null};e.pins.forEach(function(e,t){this.io.pinMode(e,this.io.MODES.ANALOG),this.io.analogRead(e,function(e){r[l[t]]=e,null!==r.x&&null!==r.y&&(n({x:r.x,y:r.y}),r.x=null,r.y=null)}.bind(this))},this)}},toAxis:{value:function(e,t){var n=o.get(this);return i.constrain(i.fscale(e-n[t].zeroV,-511,511,-1,1),-1,1)}}},ESPLORA:{initialize:{value:function(e,t){var n=new u({pins:[18,19,20,21],io:this.io}),r=[11,12],i=1,o={x:null,y:null};this.io.pinMode(4,this.io.MODES.ANALOG);var a=function(e){o[l[i]]=e,null!==o.x&&null!==o.y&&(t({x:o.x,y:o.y}),o.x=null,o.y=null),this.io.removeListener("analog-read-4",a),setTimeout(s,10)}.bind(this),s=function(){n.select(r[i^=1]),this.io.analogRead(4,a)}.bind(this);s()}},toAxis:{value:function(e,t){var n=o.get(this);return i.constrain(i.fscale(e-n[t].zeroV,-511,511,-1,1),-1,1)}}}};function s(e){if(!(this instanceof s))return new s(e);var t=null,l={x:{invert:!1,value:0,previous:0,zeroV:0,calibrated:!1},y:{invert:!1,value:0,previous:0,zeroV:0,calibrated:!1}};n.Component.call(this,e=n.Options(e)),null==(t=e.controller&&"string"==typeof e.controller?a[e.controller.toUpperCase()]:e.controller)&&(t=a.ANALOG),n.Controller.call(this,t,e),this.toAxis||(this.toAxis=e.toAxis||function(e){return e}),l.x.zeroV=void 0===e.zeroV?0:e.zeroV.x||0,l.y.zeroV=void 0===e.zeroV?0:e.zeroV.y||0,l.x.invert=e.invertX||e.invert||!1,l.y.invert=e.invertY||e.invert||!1,o.set(this,l),"function"==typeof this.initialize&&this.initialize(e,function(o){var a=!1,s={x:null,y:null};Object.keys(o).forEach(function(e){var t=o[e],n=l[e];n.value=t,l[e].calibrated||(l[e].calibrated=!0,l[e].zeroV=t,a=!0),s[e]=this[e];var r=Math.abs(s[e]),i=Math.abs(n.previous);(r>9==0}}},GP2Y0A60SZLF:{initialize:{value:i},toBoolean:{value:function(e){return e>>9==1}}}};function l(e){if(!(this instanceof l))return new l(e);var t,n,r=e.freq||25,i=!1;o.Component.call(this,e=o.Options(e)),t="string"==typeof e.controller?s[e.controller]:e.controller||s.PIR,o.Controller.call(this,t,e),n={value:!1,isCalibrated:!1},a.set(this,n),Object.defineProperties(this,{detectedMotion:{get:function(){return this.toBoolean(n.value)}},isCalibrated:{get:function(){return n.isCalibrated}}}),"function"==typeof this.initialize&&this.initialize(e,function(e){n.value=e}),setInterval(function(){var e=!1,t={timestamp:Date.now(),detectedMotion:this.detectedMotion,isCalibrated:n.isCalibrated};n.isCalibrated&&this.detectedMotion&&!i&&this.emit("motionstart",t),n.isCalibrated&&!this.detectedMotion&&i&&this.emit("motionend",t),i!==this.detectedMotion&&(e=!0),this.emit("data",t),e&&this.emit("change",t),i=this.detectedMotion}.bind(this),r)}s.GP2Y0D815Z0F=s.GP2Y0D810Z0F,s["HC-SR501"]=s.PIR,s.HCSR501=s.PIR,s["0D805"]=s.GP2Y0D805Z0F,s[805]=s.GP2Y0D805Z0F,s["0D810"]=s.GP2Y0D810Z0F,s[810]=s.GP2Y0D810Z0F,s["0D815"]=s.GP2Y0D815Z0F,s[815]=s.GP2Y0D815Z0F,s["0A60SZLF"]=s.GP2Y0A60SZLF,s["60SZLF"]=s.GP2Y0A60SZLF,r.inherits(l,n.EventEmitter),l.Collection=function(e){if(!(this instanceof l.Collection))return new l.Collection(e);Object.defineProperty(this,"type",{value:l}),t.Emitter.call(this,e)},r.inherits(l.Collection,t.Emitter),t.installMethodForwarding(l.Collection.prototype,l.prototype),e.env.IS_TEST_MODE&&(l.Controllers=s,l.purge=function(){a.clear()}),u.exports=l}).call(this,c(36))},2909:function(y,e,v){(function(n){var i=v(203),r=v(1454),a=v(1946),s=v(293),e=v(61),t=v(94),o=v(882),l=v(2496),u=v(2588),c=new Map,d=new Map;function p(n){return["clock","data","latch"].reduce(function(e,t){return e+"."+n[t]},"")}function f(e,t,n){return n?e|=1<t&&a.call(this)}.bind(this),null,e+"u",function(){}),this}},noTone:{writable:!0,value:function(){return this.io.digitalWrite(this.pin,0),a.call(this),this}}},I2C_BACKPACK:{ADDRESSES:{value:[10]},REGISTER:{value:{NO_TONE:0,TONE:1}},initialize:{value:function(e){var t=d.get(this),n=e.address||this.ADDRESSES[0];t.address=e.address=n,this.io.i2cConfig(e)}},tone:{value:function(e,t){var n=d.get(this);if(isNaN(e)||isNaN(t))throw new Error("Piezo.tone: invalid tone or duration");var r=[this.REGISTER.TONE,this.pin,e>>8&255,255&e,t>>24&255,t>>16&255,t>>8&255,255&t];return this.io.i2cWrite(n.address,r),this}},noTone:{value:function(){var e=d.get(this),t=[this.REGISTER.NO_TONE,this.pin];return this.io.i2cWrite(e.address,t),this}}}};function p(e){if(!(this instanceof p))return new p(e);r.Component.call(this,e=r.Options(e));var t=null;null==(t=e.controller&&"string"==typeof e.controller?s[e.controller.toUpperCase()]:e.controller)&&(t=s.DEFAULT),Object.defineProperties(this,t),r.Controller.call(this,t,e);var n={isPlaying:!1,timeout:null,address:null};d.set(this,n),Object.defineProperties(this,{isPlaying:{get:function(){return n.isPlaying}}}),"function"==typeof this.initialize&&this.initialize(e)}p.Notes={c0:16,"c#0":17,d0:18,"d#0":19,e0:21,f0:22,"f#0":23,g0:25,"g#0":26,a0:28,"a#0":29,b0:31,c1:33,"c#1":35,d1:37,"d#1":39,e1:41,f1:44,"f#1":47,g1:49,"g#1":52,a1:55,"a#1":58,b1:62,c2:65,"c#2":69,d2:73,"d#2":78,e2:82,f2:87,"f#2":93,g2:98,"g#2":104,a2:110,"a#2":117,b2:124,c3:131,"c#3":139,d3:147,"d#3":156,e3:165,f3:175,"f#3":185,g3:196,"g#3":208,a3:220,"a#3":233,b3:247,c4:262,"c#4":277,d4:294,"d#4":311,e4:330,f4:349,"f#4":370,g4:392,"g#4":415,a4:440,"a#4":466,b4:494,c5:523,"c#5":554,d5:587,"d#5":622,e5:659,f5:698,"f#5":740,g5:784,"g#5":831,a5:880,"a#5":932,b5:988,c6:1047,"c#6":1109,d6:1175,"d#6":1245,e6:1319,f6:1397,"f#6":1480,g6:1568,"g#6":1661,a6:1760,"a#6":1865,b6:1976,c7:2093,"c#7":2217,d7:2349,"d#7":2489,e7:2637,f7:2794,"f#7":2960,g7:3136,"g#7":3322,a7:3520,"a#7":3729,b7:3951,c8:4186,"c#8":4435,d8:4699,"d#8":4978,e8:5274,f8:5588,"f#8":5920,g8:6272,"g#8":6645,a8:7040,"a#8":7459,b8:7902},p.Frequencies=Object.keys(p.Notes).reduce(function(e,t){return e[p.Notes[t]]=t,e},{}),(p.Parsers={}).hzFromInput=function(e){var t=e;return Array.isArray(e)&&(t=e[0]),"number"==typeof t&&p.Frequencies[t]||("string"==typeof t&&(((t=t.toLowerCase().trim()).endsWith("#")||1===t.length)&&(t+=o),t=p.Notes[t]||null),isNaN(t)&&(t=null)),t},p.Parsers.beatFromNote=function(e){var t=1;return Array.isArray(e)&&void 0!==e[1]&&(t=e[1]),t},p.isValidOctave=function(e){return"number"==typeof e&&0<=e&&e<=8},p.defaultOctave=function(e){return p.isValidOctave(e)&&(o=e),o},p.ToFrequency=function(e){var t=2*(e/1e6);return Math.round(1/t)},p.ToTone=function(e){var t=1/e/2;return Math.round(1e6*t)},p.ToSong=function(e,t){t=t||1;for(var n,r,i=e.split(" "),o=[];i.length;)n=i.shift(),/^[0-9]+$/.test(n)&&(n=parseInt(n,10)),(r=o[o.length-1])&&r[0]===n?r[1]+=t:o.push([n,t]);return o},p.prototype.note=function(e,t){return this.frequency(p.Parsers.hzFromInput(e),t)},p.prototype.tone=function(e,t){return this.frequency(p.ToFrequency(e),t)},p.prototype.frequency=function(e,t){return this.tone(p.ToTone(e),t)},p.prototype.play=function(r,i){"object"!=typeof r&&(r={song:r}),"string"==typeof r.song&&(r.song=p.ToSong(r.song,r.beats)),r.song&&!Array.isArray(r.song)&&(r.song=[r.song]);var o,a=d.get(this),e=r.tempo||250,s=Math.round(6e4/e),l=r.song||[],u=0,c=function(){if(u===l.length)return a.isPlaying=!1,void("function"==typeof i&&i(r));var e=l[u],t=p.Parsers.hzFromInput(e),n=p.Parsers.beatFromNote(e);o=n*s,u++,null===t?this.noTone():this.frequency(t,o),a.timeout=setTimeout(c,o)}.bind(this);return a.isPlaying=!0,c(),this},p.prototype.off=function(){return this.noTone()},p.prototype.stop=function(){var e=d.get(this);return e.timeout&&(clearTimeout(e.timeout),e.timeout=null),this},e.exports=p},2911:function(t,e,n){(function(u,c,r){function e(e){var t=u.version,n=t.split(".")[0];n=n.split("v")[1];var r=t.split(".")[1];0==n&&r<10&&(console.log("Error: Please update to the latest version of node! This library requires 0.10.x or later"),u.exit(0)),this.intervalT1=null,this.timeOutT1=null,this.intervalCount=1,this.deferredInterval=!1,this.deferredTimeout=!1,this.deferredTimeoutRef=null,this.deferredIntervalRef=null,this.timeoutCallbackRef=null,this.intervalCallbackRef=null,this.timeoutImmediateRef=null,this.intervalImmediateRef=null,this.intervalErrorChecked=!1,this.intervalType="",e&&(this.logging=!0)}e.prototype.time=function(e,t,n,r){if(!r){o=u.hrtime();t?e.apply(null,t):e();var i=u.hrtime(o);return"s"==n?i[0]+i[1]/1e9:"m"==n?i[0]/1e3+i[1]/1e6:"u"==n?i[0]/1e6+i[1]/1e3:"n"==n?i[0]/1e9+i[1]:u.hrtime(o)}var o=u.hrtime();t?(t.push(function(){var e=u.hrtime(o);r("s"==n?e[0]+e[1]/1e9:"m"==n?e[0]/1e3+e[1]/1e6:"u"==n?e[0]/1e6+e[1]/1e3:"n"==n?e[0]/1e9+e[1]:e)}),e.apply(null,t)):e(function(){var e=u.hrtime(o);r("s"==n?e[0]+e[1]/1e9:"m"==n?e[0]/1e3+e[1]/1e6:"u"==n?e[0]/1e6+e[1]/1e3:"n"==n?e[0]/1e9+e[1]:e)})},e.prototype.setInterval=function(e,t,n,r){this.intervalErrorChecked||(e?"function"!=typeof e&&(console.log("Task argument to setInterval must be a function reference"),u.exit(1)):(console.log("A task function must be specified to setInterval"),u.exit(1)),n?"string"!=typeof n&&(console.log("Interval argument to setInterval must be a string specified as an integer followed by 's' for seconds, 'm' for milli, 'u' for micro, and 'n' for nanoseconds. Ex. 2u"),u.exit(1)):(console.log("An interval argument must be specified"),u.exit(1)),r&&("function"!=typeof r?(console.log("Callback argument to setInterval must be a function reference"),u.exit(1)):this.intervalCallbackRef=r),this.intervalType=n[n.length-1],"s"==this.intervalType?this.intervalTime=1e9*n.slice(0,n.length-1):"m"==this.intervalType?this.intervalTime=1e6*n.slice(0,n.length-1):"u"==this.intervalType?this.intervalTime=1e3*n.slice(0,n.length-1):"n"==this.intervalType?this.intervalTime=n.slice(0,n.length-1):(console.log("Error with argument: "+n+': Incorrect interval format. Format is an integer followed by "s" for seconds, "m" for milli, "u" for micro, and "n" for nanoseconds. Ex. 2u'),u.exit(1)),this.intervalErrorChecked=!0);var i=this;0=s)throw new Error("Stepper cannot exceed max steppers ("+s+")");if(Array.isArray(this.pins)){if(2===this.pins.length&&!r.type)throw new Error("Stepper requires a `type` number value (DRIVER, TWO_WIRE)");r.type===d.TYPE.DRIVER?this.pins={step:this.pins[0],dir:this.pins[1]}:this.pins=new c(this.pins)}if(r.type||(this.pins.dir?r.type=d.TYPE.DRIVER:this.pins.motor3?r.type=d.TYPE.FOUR_WIRE:r.type=d.TYPE.TWO_WIRE),t.push(this.id,r.type,r.stepsPerRev),r.type===d.TYPE.DRIVER){if(void 0===this.pins.dir||void 0===this.pins.step)throw new Error("Stepper.TYPE.DRIVER expects: `pins.dir`, `pins.step`");t.push(this.pins.dir,this.pins.step)}if(r.type===d.TYPE.TWO_WIRE){if(void 0===this.pins.motor1||void 0===this.pins.motor2)throw new Error("Stepper.TYPE.TWO_WIRE expects: `pins.motor1`, `pins.motor2`");t.push(this.pins.motor1,this.pins.motor2)}if(r.type===d.TYPE.FOUR_WIRE){if(void 0===this.pins.motor1||void 0===this.pins.motor2||void 0===this.pins.motor3||void 0===this.pins.motor4)throw new Error("Stepper.TYPE.FOUR_WIRE expects: `pins.motor1`, `pins.motor2`, `pins.motor3`, `pins.motor4`");t.push(this.pins.motor1,this.pins.motor2,this.pins.motor3,this.pins.motor4)}t.slice(3).forEach(function(e){this.io.pinMode(e,this.io.MODES.STEPPER)},this),this.io.stepperConfig.apply(this.io,t),o.get(this.board).push(this),e=u.PROPERTIES.reduce(function(e,t,n){return e[t]=void 0!==r[t]?r[t]:u.DEFAULTS[n],e},{isRunning:!1,type:r.type,pins:this.pins}),l.set(this,e),Object.defineProperties(this,{type:{get:function(){return e.type}},pins:{get:function(){return e.pins}}})}u.PROPERTIES=["rpm","direction","speed","accel","decel"],u.DEFAULTS=[180,-1,0,0,0],Object.defineProperties(d,{TYPE:{value:Object.freeze({DRIVER:1,TWO_WIRE:2,FOUR_WIRE:4})},RUNSTATE:{value:Object.freeze({STOP:0,ACCEL:1,DECEL:2,RUN:3})},DIRECTION:{value:Object.freeze({CCW:0,CW:1})}}),d.prototype.rpm=function(e){var t=l.get(this);return void 0===e?t.rpm:(t.rpm=e,t.speed=Math.round(e*a*100/60),this)},d.prototype.speed=function(e){var t=l.get(this);return void 0===e?t.speed:(t.speed=e,t.rpm=Math.round(e/a/100*60),this)},["direction","accel","decel"].forEach(function(n){d.prototype[n]=function(e){var t=l.get(this);return void 0===e?t[n]:(t[n]=e,this)}}),d.prototype.ccw=function(){return this.direction(0)},d.prototype.cw=function(){return this.direction(1)},d.prototype.step=function(t,n){var e,r,i,o,a;function s(e){a=!1,n&&n(e)}return e="object"==typeof t?t.steps||0:Math.floor(t),r=new u(this),i=l.get(this),a=!0,(o=[]).push(e),"object"==typeof t&&u.PROPERTIES.forEach(function(e){void 0!==t[e]&&this[e](t[e])},this),i.speed||(this.rpm(i.rpm),r.speed=this.speed()),u.PROPERTIES.slice(1).forEach(function(e){o.push(r[e]=this[e]())},this),0===e&&s(new Error("Must set a number of steps when calling `step()`")),r.direction<0&&s(new Error("Must set a direction before calling `step()`")),a&&(i.isRunning=!0,o.push(function(e){i.isRunning=!1,n(null,e)}),r.move.apply(r,o)),this},u.prototype.move=function(e,t,n,r,i,o){this.stepper.io.stepperStep.apply(this.stepper.io,[this.stepper.id,t,e,n,r,i,o])},e.exports=d},2917:function(e,t,n){var s=n(203),r=n(882),i=n(61).EventEmitter,l=n(293),o=n(94),u={close:["close","closed","on"],open:["open","off"]};function c(e){if(!(this instanceof c))return new c(e);var t=l.debounce(function(e){u[e].forEach(function(e){this.emit(e,null)},this)},5);e.type=e.type||"NO";var n="NO"===e.type,r=null,i=void 0!==e.invert?e.invert:n||!1,o=1,a=0;i&&(o^=1,a^=1),s.Component.call(this,e=s.Options(e)),this.io.pinMode(this.pin,this.io.MODES.INPUT),n&&this.io.digitalWrite(this.pin,this.io.HIGH),this.io.digitalRead(this.pin,function(e){r=e,t.call(this,this.isOpen?"open":"close")}.bind(this)),Object.defineProperties(this,{value:{get:function(){return Number(this.isOpen)}},invert:{get:function(){return i},set:function(e){o=(i=e)?0:1,a=i?1:0}},closeValue:{get:function(){return o},set:function(e){a=1^(o=e)}},openValue:{get:function(){return a},set:function(e){o=1^(a=e)}},isOpen:{get:function(){return r===a}},isClosed:{get:function(){return r===o}}})}function a(e){if(!(this instanceof a))return new a(e);Object.defineProperty(this,"type",{value:c}),r.Emitter.call(this,e)}o.inherits(c,i),o.inherits(a,r.Emitter),r.installMethodForwarding(a.prototype,c.prototype),c.Collection=a,e.exports=c},2918:function(e,t,n){var l,r,i,u=n(203),o=n(61),a=n(94),s={down:["down","press","tap","impact","hit"],up:["up","release"],hold:["hold"]},c=new Map,d=new Map,p=new Map;function f(e){if(!(this instanceof f))return new f(e);u.Component.call(this,e);var t=l[e.device],n=t.address,r=t.bytes,i=t.delay,o=t.data.bind(this),a=t.setup,s=t.preread;this.freq=e.freq||100,this.holdtime=e.holdtime||500,this.threshold=e.threshold||10,t.initialize.call(this),p.set(this,[0,0,0,0,0,0,0]),this.io.i2cConfig(e),a.forEach(function(e){this.io.i2cWrite(n,e)},this),setInterval(function(){s.forEach(function(e){this.io.i2cWrite(n,e)},this),this.io.i2cReadOnce(n,r,o),void 0!==t.read&&t.read.call(this)}.bind(this),i||this.freq),setInterval(function(){var e=new u.Event({target:this});this.emit("data",e)}.bind(this),this.freq)}function h(e){return 23+(23^e)}(f.Components={}).Button=function(e,t){if(!(this instanceof f.Components.Button))return new f.Components.Button(e,t);this.which=e,this.controller=t;var n={isDown:!1};c.set(this,n),Object.defineProperties(this,{isUp:{get:function(){return!n.isDown}},isDown:{get:function(){return n.isDown}}})},f.Components.Joystick=function(e){if(!(this instanceof f.Components.Joystick))return new f.Components.Joystick(e);var t,n;this.controller=e,t={},n={},["x","y","dx","dy"].forEach(function(e){t[e]=0,n[e]={get:function(){return t[e]}}},this),c.set(this,t),Object.defineProperties(this,n)},f.Components.Accelerometer=function(e){if(!(this instanceof f.Components.Accelerometer))return new f.Components.Accelerometer(e);var t,n;this.controller=e,t={},n={},["x","y","z","dx","dy","dz"].forEach(function(e){t[e]=0,n[e]={get:function(){return t[e]}}},this),c.set(this,t),Object.defineProperties(this,n)},a.inherits(f,o.EventEmitter),a.inherits(f.Components.Button,o.EventEmitter),a.inherits(f.Components.Joystick,o.EventEmitter),a.inherits(f.Components.Accelerometer,o.EventEmitter),r={button:function(e){s[e].forEach(function(e){var t=new u.Event({target:this,type:e});this.emit(e,t),this.controller.emit(e,t)},this)},component:function(n){["axischange","change"].forEach(function(e){var t;this._events&&this._events[e]&&(t=new u.Event({target:this,type:e,axis:n,direction:this["d"+n]<0?-1:1}),this.emit(e,t),this.controller.emit(e,t))},this)}},i={button:function(e){var t,n;n=!1,e!==(t=c.get(this)).isDown&&(n=!0),t.isDown=e,n&&(d.set(this,setTimeout(function(){t.isDown&&r.button.call(this,"hold")}.bind(this),this.controller.holdtime)),r.button.call(this,e?"down":"up"))},component:function(e,t){var n=c.get(this);n["d"+e]=t-n[e],n[e]=t}},l={"RVL-004":{address:82,bytes:6,delay:100,setup:[[64,0]],preread:[[0]],read:function(){var e=["x","y","z"];[this.joystick,this.accelerometer].forEach(function(n){e.forEach(function(e){var t="d"+e;void 0!==n[t]&&Math.abs(n[t])>this.threshold&&r.component.call(n,e)},this)},this)},initialize:function(){this.joystick=new f.Components.Joystick(this),this.accelerometer=new f.Components.Accelerometer(this),this.c=new f.Components.Button("c",this),this.z=new f.Components.Button("z",this)},data:function(e){254!==e[0]&&254!==e[1]&&254!==e[2]&&(i.component.call(this.joystick,"x",h(e[0])<<2),i.component.call(this.joystick,"y",h(e[1])<<2),i.component.call(this.accelerometer,"x",h(e[2])<<2),i.component.call(this.accelerometer,"y",h(e[3])<<2),i.component.call(this.accelerometer,"z",h(e[4])<<2),i.button.call(this.z,0==(1&h(e[5]))),i.button.call(this.c,0==(2&h(e[5]))),p.set(this,e))}},"RVL-005":{address:82,bytes:6,delay:100,setup:[[64,0]],preread:[[0]],initialize:function(){this.joystick={left:new f.Components.Joystick(this),right:new f.Components.Joystick(this)},["y","x","up","down","left","right","a","b","l","r","zl","zr","start","home","select"].forEach(function(e){this[e]=new f.Components.Button(e,this)},this)},data:function(e){254!==e[0]&&254!==e[1]&&254!==e[2]&&(i.button.call(this.l,0==(32&h(e[4]))),i.button.call(this.r,0==(2&h(e[4]))),i.button.call(this.up,0==(1&h(e[5]))),i.button.call(this.left,0==(2&h(e[5]))),i.button.call(this.down,0==(64&h(e[4]))),i.button.call(this.right,0==(128&h(e[4]))),i.button.call(this.zr,0==(4&h(e[5]))),i.button.call(this.zl,0==(128&h(e[5]))),i.button.call(this.x,0==(8&h(e[5]))),i.button.call(this.y,0==(32&h(e[5]))),i.button.call(this.a,0==(16&h(e[5]))),i.button.call(this.b,0==(64&h(e[5]))),i.button.call(this.select,0==(16&h(e[4]))),i.button.call(this.start,0==(4&h(e[4]))),i.button.call(this.home,0==(8&h(e[4]))),i.component.call(this.joystick.left,"x",63&h(e[0])),i.component.call(this.joystick.left,"y",63&h(e[0])),i.component.call(this.joystick.right,"x",((192&e[0])>>3)+((192&e[1])>>5)+((128&e[2])>>7)),i.component.call(this.joystick.right,"y",31&e[2]),p.set(this,e))}}},f.Nunchuk=function(e){return(e=e||{}).device="RVL-004",new f(e)},f.Classic=function(e){return(e=e||{}).device="RVL-005",new f(e)},e.exports=f},2919:function(e,t,n){var r=n(203),i=n(61),o=n(94),a=n(293),s=n(2585),l=n(2496),u=0,c=1e3,d=200,p=50,f=new Map;function h(){var n=this,e=f.get(this);if(void 0===this.opts.emitter)throw new Error("Emitter pin is required");if(!this.pins||0===this.pins.length)throw new Error("Pins must be defined");e.emitter=new s({board:this.board,pin:this.opts.emitter}),e.sensorStates=this.pins.map(function(e){var t={sensor:new l({board:this.board,freq:this.freq,pin:e}),rawValue:0,dataReceived:!1};return t.sensor.on("data",function(){(function(e,t){var n=f.get(this);e.dataReceived=!0,e.rawValue=t,n.sensorStates.every(function(e){return e.dataReceived})&&(this.emit("data",this.raw),n.autoCalibrate&&m(n.calibration,this.raw),this.isCalibrated&&(this.emit("calibratedData",this.values),this.emit("line",this.line)),n.sensorStates.forEach(function(e){e.dataReceived=!1}))}).call(n,t,this.value)}),t},this)}function m(n,e){e.forEach(function(e,t){(void 0===n.min[t]||en.max[t])&&(n.max[t]=e)})}function g(e,t){return e&&e.max&&e.max.length===t.length&&e.min&&e.min.length===t.length}function b(){return(this.sensors.length-1)*c}function y(e){if(!(this instanceof y))return new y(e);this.opts=r.Options(e),r.Component.call(this,this.opts,{requestPin:!1}),this.freq=e.freq||25;var t={lastLine:0,isOn:!1,calibration:{min:[],max:[]},autoCalibrate:e.autoCalibrate||!1};f.set(this,t),h.call(this),Object.defineProperties(this,{isOn:{get:function(){return t.emitter.isOn}},isCalibrated:{get:function(){return g(this.calibration,this.sensors)}},isOnLine:{get:function(){var e=this.line;return u>>1]===e)return n>>>1;for(var r=0;r>>1;r++){if(t[r]===e)return r;if(t[n-r-1]===e)return n-r-1}return-1},n.prototype.__prepare__=function(e){var t,n,r,i,o,a,s=Array(e.length),l=0,u=[],c=this.__index,d=this.__indexedRows,p=this.__map;if(e.length&&"object"==typeof e[0]&&null!==e[0]&&(u=Object.keys(e[0])),r=u.length,a=(i=Object.keys(this.__map)).length,c){for(f=0,h=e.length;f b__uniq ? (val) : -(val); }","if(a === undefined) { return 1; }","if(b === undefined) { return -1; }","if(a === null) { return 1; }","if(b === null) { return -1; }","if(typeof a === 'function') {"," if(typeof b === 'function') { return a__uniq > b__uniq ? (val) : -(val); }"," return -1;","}","if(typeof a === 'object') {"," if(typeof b === 'function') { return 1; }"," if(typeof b === 'object') {"," if(a instanceof Date && b instanceof Date) {"," return a.valueOf() > b.valueOf() ? (val) : -(val);"," }"," if(a instanceof Date) { return 1; }"," if(b instanceof Date) { return -1; }"," return a__uniq > b__uniq ? (val) : -(val);"," }"," return -1;","}","if(typeof a === 'string') {"," if(typeof b === 'function') { return 1; }"," if(typeof b === 'object') { return 1; }"," if(typeof b === 'string') { return a > b ? (val) : -(val); }"," return -1;","}","if(typeof a === 'boolean') {"," if(typeof b === 'boolean') { return a > b ? (val) : -(val); }"," if(typeof b === 'number') { return -1; }"," return 1;","}","if(typeof a === 'number') {"," if(typeof b === 'number') {"," if(isNaN(a) && isNaN(b)) { return a__uniq > b__uniq ? (val) : -(val); }"," if(isNaN(a)) { return 1; }"," if(isNaN(b)) { return -1; }"," return a > b ? (val) : -(val);"," }"," return 1;","}","return a__uniq > b__uniq ? (val) : -(val);"].join("\n"));try{var i=this._data.slice().sort(r)}catch(e){throw new Error("Key "+n+" could not be sorted by")}return new C(this.__parent,i)},C.prototype.values=function(e){if(this.__validate__(),!e)return this._data.slice();for(var t=this._data,n=t.length,r=Array(n),i=0;i>15?-1*(1+(65535^n)):n},i.uint16=function(e,t){return e<<8|t},i.int24=function(e,t,n){var r=e<<16|t<<8|n;return r>>23?-1*(1+(16777215^r)):r},i.uint24=function(e,t,n){return e<<16|t<<8|n},i.int32=function(e,t,n,r){var i=e<<24|t<<16|n<<8|r;return i>>31?-1*(1+(4294967295^i)):i},i.uint32=function(e,t,n,r){return(e<<24|t<<16|n<<8|r)>>>0},i.bitSize=function(e){return Math.round(Math.log2(e))};for(var r=i.bitSize(Number.MAX_SAFE_INTEGER)+1,a=0;a>>0,r=n-1;i["u"+e]=function(e){return e<0&&(e+=t),i.constrain(e,0,t-1)},i["s"+e]=function(e){return r'+e.title+"
"+e.text+"
";var n=document.createElement("div");l.default.render(s.default.createElement(h.default,{confirmText:u.default.dialogOK(),cancelText:u.default.dialogCancel()}),n),t.appendChild(n);var r=(0,b.singleton)().createModalDialog({contentDiv:t,defaultBtnSelector:"#confirm-button"}),i=n.querySelector("#again-button");i&&E.default.addClickTouchEvent(i,function(){r.hide()});var o=n.querySelector("#confirm-button");o&&E.default.addClickTouchEvent(o,function(){e.onConfirm&&e.onConfirm(),r.hide()}),r.show()},ye.onPuzzleFinish=function(){ye.onPuzzleComplete(!1)},ye.onPuzzleComplete=function(e){var t=!(0,b.singleton)().validateCodeChanged();ye.executionError?ye.result=oe.ResultType.ERROR:ye.result=t?oe.ResultType.FAILURE:oe.ResultType.SUCCESS;var n,r=ye.result===oe.ResultType.SUCCESS;if(ye.executionError)ye.testResults=(0,b.singleton)().getTestResults(r,{executionError:ye.executionError});else if(Ee.logConditions){var i=P.default.getResultsFromLog(Ee.logConditions,ye.currentExecutionLog);ye.testResults=i.testResult,ye.message=i.message}else ye.testResults=t?oe.TestResults.FREE_PLAY_UNCHANGED_FAIL:e?oe.TestResults.SUBMITTED_RESULT:oe.TestResults.FREE_PLAY;Ee.failOnLintErrors&&I.default.getJSLintAnnotations().length&&ye.testResults>oe.TestResults.GENERIC_LINT_FAIL&&(ye.testResults=oe.TestResults.GENERIC_LINT_FAIL),ye.clearEventHandlersKillTickLoop(),ye.testResults>=oe.TestResults.FREE_PLAY?(0,b.singleton)().playAudio("win"):(0,b.singleton)().playAudio("failure");var o=(0,b.singleton)().hasContainedLevels?(0,H.getContainedLevelResultInfo)():null;o?(ye.testResults=oe.TestResults.ALL_PASS,ye.message=o.feedback):n=(0,b.singleton)().getCode(),ye.waitingForReport=!0;var a;a=e?v.onSubmitComplete:ye.onReportComplete,o?(0,H.runAfterPostContainedLevel)(a):(0,b.singleton)().report({app:"applab",level:Ee.id,result:r,testResult:ye.testResults,submitted:e,program:encodeURIComponent(n),image:ye.encodedFeedbackImage,containedLevelResultsInfo:o,onComplete:a})},ye.executeCmd=function(e,t,n){var r={id:e,name:t,opts:n};return ye.callCmd(r)},ye.callCmd=function(e){var t=!1;return c.default[e.name]instanceof Function&&((0,b.singleton)().highlight(e.id),t=c.default[e.name](e.opts)),t},ye.timedOut=function(){return ye.tickCount>ye.timeoutFailureTick};var Me=function(){return Ee.goal&&Ee.goal.successCondition&&Ee.goal.successCondition()?(ye.result=oe.ResultType.SUCCESS,!0):Ee.goal&&Ee.goal.failureCondition&&Ee.goal.failureCondition()?(ye.result=oe.ResultType.FAILURE,!0):!!ye.timedOut()&&(ye.result=oe.ResultType.FAILURE,!0)};function ke(e,t){return e.id>t.id?1:-1}ye.startInDesignMode=function(){return!!Ee.designModeAtStart},ye.isInDesignMode=function(){var e=(0,k.getStore)().getState().interfaceMode;return be.DESIGN===e},ye.getIdDropdown=function(e){return ye.getIdDropdownFromDom_((0,m.default)(document),e)},ye.getIdDropdownFromDom_=function(e,t){var n=e.find('#designModeViz [id^="'+L.DESIGN_ELEMENT_ID_PREFIX+'"]');return t&&(n=n.filter(t)),n.sort(ke).map(function(e,t){var n=function(e){return'"'+e+'"'}(p.getId(t));return{text:n,display:n}}).get()},ye.getIdDropdownForCurrentScreen=function(){return ye.getIdDropdownForCurrentScreenFromDom_((0,m.default)("#designModeViz"))},ye.getIdDropdownForCurrentScreenFromDom_=function(e){var t=e.find(".screen").filter(function(){return"none"!==this.style.display}).first();return t.find('[id^="'+L.DESIGN_ELEMENT_ID_PREFIX+'"]').add(t).map(function(e,t){return p.getId(t)}).get()},ye.activeScreen=function(){return ye.getScreens().filter(function(){return"none"!==this.style.display}).first()[0]},ye.changeScreen=function(e){ye.getScreens().each(function(){(0,m.default)(this).toggle(this.id===e),this.id===e&&this.focus()}),ye.isRunning()||Ee.showTurtleBeforeRun&&o.default.turtleSetVisibility(!0)},ye.getScreens=function(){return(0,m.default)("#divApplab > .screen")},ye.updateProperty=function(e,t,n){return R.default.updateProperty(e,t,n)},ye.readProperty=function(e,t){return R.default.readProperty(e,t)},ye.getAppReducers=function(){return j.reducers},e.exports=t.default},3037:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=c(n(0)),o=c(n(1)),a=c(n(2736)),s=c(n(3)),l=c(n(21)),i=c(n(5)),u=c(n(9));function c(e){return e&&e.__esModule?e:{default:e}}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var f=function(i){function e(){for(var e,t=arguments.length,n=new Array(t),r=0;r").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),t.autoHide&&y(this.element).on("mouseenter",function(){t.disabled||(n._removeClass("ui-resizable-autohide"),n._handles.show())}).on("mouseleave",function(){t.disabled||n.resizing||(n._addClass("ui-resizable-autohide"),n._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,t=function(e){y(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(t(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_setOption:function(e,t){switch(this._super(e,t),e){case"handles":this._removeHandles(),this._setupHandles()}},_setupHandles:function(){var e,t,n,r,i,o=this.options,a=this;if(this.handles=o.handles||(y(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=y(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),n=this.handles.split(","),this.handles={},t=0;t"),this._addClass(i,"ui-resizable-handle "+r),i.css({zIndex:o.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(i);this._renderAxis=function(e){var t,n,r,i;for(t in e=e||this.element,this.handles)this.handles[t].constructor===String?this.handles[t]=this.element.children(this.handles[t]).first().show():(this.handles[t].jquery||this.handles[t].nodeType)&&(this.handles[t]=y(this.handles[t]),this._on(this.handles[t],{mousedown:a._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(n=y(this.handles[t],this.element),i=/sw|ne|nw|se|n|s/.test(t)?n.outerHeight():n.outerWidth(),r=["padding",/ne|nw|n/.test(t)?"Top":/se|sw|s/.test(t)?"Bottom":/^e$/.test(t)?"Right":"Left"].join(""),e.css(r,i),this._proportionallyResize()),this._handles=this._handles.add(this.handles[t])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){a.resizing||(this.className&&(i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=i&&i[1]?i[1]:"se")}),o.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var t,n,r=!1;for(t in this.handles)((n=y(this.handles[t])[0])===e.target||y.contains(n,e.target))&&(r=!0);return!this.options.disabled&&r},_mouseStart:function(e){var t,n,r,i=this.options,o=this.element;return this.resizing=!0,this._renderProxy(),t=this._num(this.helper.css("left")),n=this._num(this.helper.css("top")),i.containment&&(t+=y(i.containment).scrollLeft()||0,n+=y(i.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:t,top:n},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:o.width(),height:o.height()},this.originalSize=this._helper?{width:o.outerWidth(),height:o.outerHeight()}:{width:o.width(),height:o.height()},this.sizeDiff={width:o.outerWidth()-o.width(),height:o.outerHeight()-o.height()},this.originalPosition={left:t,top:n},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof i.aspectRatio?i.aspectRatio:this.originalSize.width/this.originalSize.height||1,r=y(".ui-resizable-"+this.axis).css("cursor"),y("body").css("cursor","auto"===r?this.axis+"-resize":r),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var t,n,r=this.originalMousePosition,i=this.axis,o=e.pageX-r.left||0,a=e.pageY-r.top||0,s=this._change[i];return this._updatePrevProperties(),s&&(t=s.apply(this,[e,o,a]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(t=this._updateRatio(t,e)),t=this._respectSize(t,e),this._updateCache(t),this._propagate("resize",e),n=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),y.isEmptyObject(n)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges())),!1},_mouseStop:function(e){this.resizing=!1;var t,n,r,i,o,a,s,l=this.options,u=this;return this._helper&&(r=(n=(t=this._proportionallyResizeElements).length&&/textarea/i.test(t[0].nodeName))&&this._hasScroll(t[0],"left")?0:u.sizeDiff.height,i=n?0:u.sizeDiff.width,o={width:u.helper.width()-i,height:u.helper.height()-r},a=parseFloat(u.element.css("left"))+(u.position.left-u.originalPosition.left)||null,s=parseFloat(u.element.css("top"))+(u.position.top-u.originalPosition.top)||null,l.animate||this.element.css(y.extend(o,{top:s,left:a})),u.helper.height(u.size.height),u.helper.width(u.size.width),this._helper&&!l.animate&&this._proportionallyResize()),y("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var e={};return this.position.top!==this.prevPosition.top&&(e.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(e.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(e.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(e.height=this.size.height+"px"),this.helper.css(e),e},_updateVirtualBoundaries:function(e){var t,n,r,i,o,a=this.options;o={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||e)&&(t=o.minHeight*this.aspectRatio,r=o.minWidth/this.aspectRatio,n=o.maxHeight*this.aspectRatio,i=o.maxWidth/this.aspectRatio,t>o.minWidth&&(o.minWidth=t),r>o.minHeight&&(o.minHeight=r),ne.width,a=this._isNumber(e.height)&&t.minHeight&&t.minHeight>e.height,s=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,u=/sw|nw|w/.test(n),c=/nw|ne|n/.test(n);return o&&(e.width=t.minWidth),a&&(e.height=t.minHeight),r&&(e.width=t.maxWidth),i&&(e.height=t.maxHeight),o&&u&&(e.left=s-t.minWidth),r&&u&&(e.left=s-t.maxWidth),a&&c&&(e.top=l-t.minHeight),i&&c&&(e.top=l-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_getPaddingPlusBorderDimensions:function(e){for(var t=0,n=[],r=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],i=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];t<4;t++)n[t]=parseFloat(r[t])||0,n[t]+=parseFloat(i[t])||0;return{height:n[0]+n[2],width:n[1]+n[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var e,t=0,n=this.helper||this.element;t"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++t.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var n=this.originalSize;return{left:this.originalPosition.left+t,width:n.width-t}},n:function(e,t,n){var r=this.originalSize;return{top:this.originalPosition.top+n,height:r.height-n}},s:function(e,t,n){return{height:this.originalSize.height+n}},se:function(e,t,n){return y.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,t,n]))},sw:function(e,t,n){return y.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,t,n]))},ne:function(e,t,n){return y.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,t,n]))},nw:function(e,t,n){return y.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,t,n]))}},_propagate:function(e,t){y.ui.plugin.call(this,e,[t,this.ui()]),"resize"!==e&&this._trigger(e,t,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),y.ui.plugin.add("resizable","animate",{stop:function(t){var n=y(this).resizable("instance"),e=n.options,r=n._proportionallyResizeElements,i=r.length&&/textarea/i.test(r[0].nodeName),o=i&&n._hasScroll(r[0],"left")?0:n.sizeDiff.height,a=i?0:n.sizeDiff.width,s={width:n.size.width-a,height:n.size.height-o},l=parseFloat(n.element.css("left"))+(n.position.left-n.originalPosition.left)||null,u=parseFloat(n.element.css("top"))+(n.position.top-n.originalPosition.top)||null;n.element.animate(y.extend(s,u&&l?{top:u,left:l}:{}),{duration:e.animateDuration,easing:e.animateEasing,step:function(){var e={width:parseFloat(n.element.css("width")),height:parseFloat(n.element.css("height")),top:parseFloat(n.element.css("top")),left:parseFloat(n.element.css("left"))};r&&r.length&&y(r[0]).css({width:e.width,height:e.height}),n._updateCache(e),n._propagate("resize",t)}})}}),y.ui.plugin.add("resizable","containment",{start:function(){var n,r,e,t,i,o,a,s=y(this).resizable("instance"),l=s.options,u=s.element,c=l.containment,d=c instanceof y?c.get(0):/parent/.test(c)?u.parent().get(0):c;d&&(s.containerElement=y(d),/document/.test(c)||c===document?(s.containerOffset={left:0,top:0},s.containerPosition={left:0,top:0},s.parentData={element:y(document),left:0,top:0,width:y(document).width(),height:y(document).height()||document.body.parentNode.scrollHeight}):(n=y(d),r=[],y(["Top","Right","Left","Bottom"]).each(function(e,t){r[e]=s._num(n.css("padding"+t))}),s.containerOffset=n.offset(),s.containerPosition=n.position(),s.containerSize={height:n.innerHeight()-r[3],width:n.innerWidth()-r[1]},e=s.containerOffset,t=s.containerSize.height,i=s.containerSize.width,o=s._hasScroll(d,"left")?d.scrollWidth:i,a=s._hasScroll(d)?d.scrollHeight:t,s.parentData={element:d,left:e.left,top:e.top,width:o,height:a}))},resize:function(e){var t,n,r,i,o=y(this).resizable("instance"),a=o.options,s=o.containerOffset,l=o.position,u=o._aspectRatio||e.shiftKey,c={top:0,left:0},d=o.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(c=s),l.left<(o._helper?s.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-s.left:o.position.left-c.left),u&&(o.size.height=o.size.width/o.aspectRatio,p=!1),o.position.left=a.helper?s.left:0),l.top<(o._helper?s.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-s.top:o.position.top),u&&(o.size.width=o.size.height*o.aspectRatio,p=!1),o.position.top=o._helper?s.top:0),r=o.containerElement.get(0)===o.element.parent().get(0),i=/relative|absolute/.test(o.containerElement.css("position")),r&&i?(o.offset.left=o.parentData.left+o.position.left,o.offset.top=o.parentData.top+o.position.top):(o.offset.left=o.element.offset().left,o.offset.top=o.element.offset().top),t=Math.abs(o.sizeDiff.width+(o._helper?o.offset.left-c.left:o.offset.left-s.left)),n=Math.abs(o.sizeDiff.height+(o._helper?o.offset.top-c.top:o.offset.top-s.top)),t+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-t,u&&(o.size.height=o.size.width/o.aspectRatio,p=!1)),n+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-n,u&&(o.size.width=o.size.height*o.aspectRatio,p=!1)),p||(o.position.left=o.prevPosition.left,o.position.top=o.prevPosition.top,o.size.width=o.prevSize.width,o.size.height=o.prevSize.height)},stop:function(){var e=y(this).resizable("instance"),t=e.options,n=e.containerOffset,r=e.containerPosition,i=e.containerElement,o=y(e.helper),a=o.offset(),s=o.outerWidth()-e.sizeDiff.width,l=o.outerHeight()-e.sizeDiff.height;e._helper&&!t.animate&&/relative/.test(i.css("position"))&&y(this).css({left:a.left-r.left-n.left,width:s,height:l}),e._helper&&!t.animate&&/static/.test(i.css("position"))&&y(this).css({left:a.left-r.left-n.left,width:s,height:l})}}),y.ui.plugin.add("resizable","alsoResize",{start:function(){var e=y(this).resizable("instance").options;y(e.alsoResize).each(function(){var e=y(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,n){var t=y(this).resizable("instance"),r=t.options,i=t.originalSize,o=t.originalPosition,a={height:t.size.height-i.height||0,width:t.size.width-i.width||0,top:t.position.top-o.top||0,left:t.position.left-o.left||0};y(r.alsoResize).each(function(){var e=y(this),r=y(this).data("ui-resizable-alsoresize"),i={},t=e.parents(n.originalElement[0]).length?["width","height"]:["width","height","top","left"];y.each(t,function(e,t){var n=(r[t]||0)+(a[t]||0);n&&0<=n&&(i[t]=n||null)}),e.css(i)})},stop:function(){y(this).removeData("ui-resizable-alsoresize")}}),y.ui.plugin.add("resizable","ghost",{start:function(){var e=y(this).resizable("instance"),t=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:t.height,width:t.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),!1!==y.uiBackCompat&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=y(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=y(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),y.ui.plugin.add("resizable","grid",{resize:function(){var e,t=y(this).resizable("instance"),n=t.options,r=t.size,i=t.originalSize,o=t.originalPosition,a=t.axis,s="number"==typeof n.grid?[n.grid,n.grid]:n.grid,l=s[0]||1,u=s[1]||1,c=Math.round((r.width-i.width)/l)*l,d=Math.round((r.height-i.height)/u)*u,p=i.width+c,f=i.height+d,h=n.maxWidth&&n.maxWidthp,b=n.minHeight&&n.minHeight>f;n.grid=s,g&&(p+=l),b&&(f+=u),h&&(p-=l),m&&(f-=u),/^(se|s|e)$/.test(a)?(t.size.width=p,t.size.height=f):/^(ne)$/.test(a)?(t.size.width=p,t.size.height=f,t.position.top=o.top-d):/^(sw)$/.test(a)?(t.size.width=p,t.size.height=f,t.position.left=o.left-c):((f-u<=0||p-l<=0)&&(e=t._getPaddingPlusBorderDimensions(this)),0").addClass("draggingParent");a[0].style.transform="scale("+i+", "+o+")",a[0].style.webkitTransform="scale("+i+", "+o+")",a[0].style.backgroundColor="transparent";var s=(0,c.default)(n).width()||parseInt(n.getAttribute("width"),10),l=(0,c.default)(n).height()||parseInt(n.getAttribute("height"),10),u=e.offsetY||e.pageY-(0,c.default)(e.target).offset().top;return(0,c.default)(this).draggable("option","cursorAt",{left:s/2,top:Math.min(u,l)}),a.append(n)[0]},containment:"document",appendTo:"#codeApp",revert:"invalid",zIndex:2,start:this.props.handleDragStart})},t}(i.default.Component);t.default=p,s=p,l="propTypes",u={imageUrl:r.default.string.isRequired,desc:r.default.string.isRequired,elementType:r.default.string.isRequired,handleDragStart:r.default.func.isRequired},l in s?Object.defineProperty(s,l,{value:u,enumerable:!0,configurable:!0,writable:!0}):s[l]=u,e.exports=t.default},3096:function(e,t,n){"use strict";function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=S(n(9)),i=S(n(0)),o=S(n(1)),s=S(n(1405)),l=S(n(1458)),u=S(n(1912)),c=S(n(2640)),d=S(n(1459)),p=S(n(1431)),f=S(n(1432)),h=S(n(2017)),m=S(n(2488)),g=S(n(2018)),b=S(n(1929)),y=n(333),v=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var t=w();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(799)),E=S(n(1457)),_=S(n(1429));function w(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return w=function(){return e},e}function S(e){return e&&e.__esModule?e:{default:e}}function C(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function O(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}function T(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var R=function(i){function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(f(r));return o}function O(e,t){t=t||6;for(var n=f(e).toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(f({h:r,s:i,v:o})),o=(o+s)%1;return a}f.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:u.pow((.055+e)/1.055,2.4))+.7152*(t<=.03928?t/12.92:u.pow((.055+t)/1.055,2.4))+.0722*(n<=.03928?n/12.92:u.pow((.055+n)/1.055,2.4))},setAlpha:function(e){return this._a=A(e),this._roundA=a(100*this._a)/100,this},toHsv:function(){var e=o(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=o(this._r,this._g,this._b),t=a(360*e.h),n=a(100*e.s),r=a(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=i(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=i(this._r,this._g,this._b),t=a(360*e.h),n=a(100*e.s),r=a(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return t(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,i){var o=[D(a(e).toString(16)),D(a(t).toString(16)),D(a(n).toString(16)),D(k(r))];if(i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1))return o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0);return o.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+a(this._r)+", "+a(this._g)+", "+a(this._b)+")":"rgba("+a(this._r)+", "+a(this._g)+", "+a(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:a(100*x(this._r,255))+"%",g:a(100*x(this._g,255))+"%",b:a(100*x(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+a(100*x(this._r,255))+"%, "+a(100*x(this._g,255))+"%, "+a(100*x(this._b,255))+"%)":"rgba("+a(100*x(this._r,255))+"%, "+a(100*x(this._g,255))+"%, "+a(100*x(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(R[t(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+s(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var i=f(e);n="#"+s(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&0<=this._a;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return f(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(g,arguments)},brighten:function(){return this._applyModification(b,arguments)},darken:function(){return this._applyModification(y,arguments)},desaturate:function(){return this._applyModification(n,arguments)},saturate:function(){return this._applyModification(h,arguments)},greyscale:function(){return this._applyModification(m,arguments)},spin:function(){return this._applyModification(v,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(C,arguments)},complement:function(){return this._applyCombination(E,arguments)},monochromatic:function(){return this._applyCombination(O,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(_,arguments)},tetrad:function(){return this._applyCombination(w,arguments)}},f.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:M(e[r]));e=n}return f(e,t)},f.equals=function(e,t){return!(!e||!t)&&f(e).toRgbString()==f(t).toRgbString()},f.random=function(){return f.fromRatio({r:e(),g:e(),b:e()})},f.mix=function(e,t,n){n=0===n?0:n||50;var r=f(e).toRgb(),i=f(t).toRgb(),o=n/100;return f({r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a})},f.readability=function(e,t){var n=f(e),r=f(t);return(u.max(n.getLuminance(),r.getLuminance())+.05)/(u.min(n.getLuminance(),r.getLuminance())+.05)},f.isReadable=function(e,t,n){var r,i,o=f.readability(e,t);switch(i=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":i=4.5<=o;break;case"AAlarge":i=3<=o;break;case"AAAsmall":i=7<=o}return i},f.mostReadable=function(e,t,n){var r,i,o,a,s=null,l=0;i=(n=n||{}).includeFallbackColors,o=n.level,a=n.size;for(var u=0;u')),")")},P={PropertyTab:R,EventTab:A,themeValues:h.default.dropdown,create:function(){var e=document.createElement("select");e.style.width="200px",e.style.height="30px",e.style.margin="0",e.style.borderStyle="solid",E.default.setAllPropertiesToCurrentTheme(e,v.default.activeScreen());var t=document.createElement("option");t.innerHTML="Option 1",e.appendChild(t);var n=document.createElement("option");return n.innerHTML="Option 2",e.appendChild(n),e},onDeserialize:function(e){y.setDefaultBorderStyles(e),y.setDefaultFontFamilyStyle(e),e.style.backgroundImage||(e.style.backgroundImage=x(new _.default(e.style.color).toHex())),""===e.style.padding&&(e.style.padding=h.CLASSIC_DROPDOWN_PADDING),(0,r.default)(e).on("mousedown",function(e){Applab.isRunning()||(e.preventDefault(),this.blur(),window.focus())})},onPropertyChange:function(e,t,n){switch(t){case"value":case"text":e.value=n;break;case"textColor":e.style.backgroundImage=x(new _.default(e.style.color).toHex());break;case"index":e.selectedIndex=n;break;default:return!1}return!0},readProperty:function(e,t){switch(t){case"value":return e.value;case"index":return e.selectedIndex;default:throw"unknown property name ".concat(t)}}};t.default=P,e.exports=t.default},3262:function(e,t,n){"use strict";function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(0)),i=o(n(1)),s=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(1488));function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function o(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c=function(o){function e(e){var r;u(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r=o.call(this,e)||this),"handleChangeInternal",function(e){var t=e.target.value,n=t.split("\n").filter(function(e){return""!==e});r.props.handleChange(n),r.setState({value:t})});for(var t=e.element,n="",i=0;i/g,"")).match(/^([a-zA-Z]+)\:/);if(!n)return!1;var r=n[1].toLowerCase();if(S(a.allowedSchemesByTag,e))return-1===a.allowedSchemesByTag[e].indexOf(r);return!a.allowedSchemes||-1===a.allowedSchemes.indexOf(r)}(n,e))return void delete r.attribs[t];if("class"===t&&!(e=function(e,t){return t?(e=e.split(/\s+/)).filter(function(e){return-1!==t.indexOf(e)}).join(" "):e}(e,p[n])).length)return void delete r.attribs[t];s+=" "+t,e.length&&(s+='="'+_(e)+'"')}else delete r.attribs[t]}),-1!==a.selfClosing.indexOf(n)?s+=" />":(s+=">",!r.innerText||o||a.textFilter||(s+=r.innerText)))}},ontext:function(e){if(!v){var t,n=g[g.length-1];if(n&&(t=n.tag,e=void 0!==n.innerText?n.innerText:e),"script"===t||"style"===t)s+=e;else{var r=_(e);a.textFilter?s+=a.textFilter(r):s+=r}if(g.length)g[g.length-1].text+=e}},onclosetag:function(e){if(v){if(--E)return;v=!1}var t=g.pop();if(t){if(v=!1,b[--m])return delete b[m],void t.updateParentNodeText();y[m]&&(e=y[m],delete y[m]),a.exclusiveFilter&&a.exclusiveFilter(t)?s=s.substr(0,t.tagPosition):(t.updateParentNodeText(),-1===a.selfClosing.indexOf(e)&&(s+=""+e+">"))}}},a.parser);return n.write(e),n.end(),s;function _(e){return"string"!=typeof e&&(e+=""),e.replace(/\&/g,"&").replace(//g,">").replace(/\"/g,""")}}e.exports=C;var O={decodeEntities:!0};C.defaults={allowedTags:["h3","h4","h5","h6","blockquote","p","a","ul","ol","nl","li","b","i","strong","em","strike","code","hr","br","div","table","thead","caption","tbody","tr","th","td","pre"],allowedAttributes:{a:["href","name","target"],img:["src"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto"],allowedSchemesByTag:{}},C.simpleTransform=function(r,i,o){return o=void 0===o||o,i=i||{},function(e,t){var n;if(o)for(n in i)t[n]=i[n];else t=i;return{tagName:r,attribs:t}}}},3281:function(e){e.exports={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}},3282:function(e,t,n){var r=n(2490),i=/\s+/g,o=n(2842),a=n(3283);function s(e,t,n){"object"==typeof e?(n=t,t=e,e=null):"function"==typeof t&&(n=t,t=l),this._callback=e,this._options=t||l,this._elementCB=n,this.dom=[],this._done=!1,this._tagStack=[],this._parser=this._parser||null}var l={normalizeWhitespace:!1,withStartIndices:!1};s.prototype.onparserinit=function(e){this._parser=e},s.prototype.onreset=function(){s.call(this,this._callback,this._options,this._elementCB)},s.prototype.onend=function(){this._done||(this._done=!0,this._parser=null,this._handleCallback(null))},s.prototype._handleCallback=s.prototype.onerror=function(e){if("function"==typeof this._callback)this._callback(e,this.dom);else if(e)throw e},s.prototype.onclosetag=function(){var e=this._tagStack.pop();this._elementCB&&this._elementCB(e)},s.prototype._addDomElement=function(e){var t=this._tagStack[this._tagStack.length-1],n=t?t.children:this.dom,r=n[n.length-1];e.next=null,this._options.withStartIndices&&(e.startIndex=this._parser.startIndex),this._options.withDomLvl1&&(e.__proto__="tag"===e.type?a:o),r?(e.prev=r).next=e:e.prev=null,n.push(e),e.parent=t||null},s.prototype.onopentag=function(e,t){var n={type:"script"===e?r.Script:"style"===e?r.Style:r.Tag,name:e,attribs:t,children:[]};this._addDomElement(n),this._tagStack.push(n)},s.prototype.ontext=function(e){var t,n=this._options.normalizeWhitespace||this._options.ignoreWhitespace;!this._tagStack.length&&this.dom.length&&(t=this.dom[this.dom.length-1]).type===r.Text?n?t.data=(t.data+e).replace(i," "):t.data+=e:this._tagStack.length&&(t=this._tagStack[this._tagStack.length-1])&&(t=t.children[t.children.length-1])&&t.type===r.Text?n?t.data=(t.data+e).replace(i," "):t.data+=e:(n&&(e=e.replace(i," ")),this._addDomElement({data:e,type:r.Text}))},s.prototype.oncomment=function(e){var t=this._tagStack[this._tagStack.length-1];if(t&&t.type===r.Comment)t.data+=e;else{var n={data:e,type:r.Comment};this._addDomElement(n),this._tagStack.push(n)}},s.prototype.oncdatastart=function(){var e={children:[{data:"",type:r.Text}],type:r.CDATA};this._addDomElement(e),this._tagStack.push(e)},s.prototype.oncommentend=s.prototype.oncdataend=function(){this._tagStack.pop()},s.prototype.onprocessinginstruction=function(e,t){this._addDomElement({name:e,data:t,type:r.Directive})},e.exports=s},3283:function(e,t,n){var r=n(2842),i=e.exports=Object.create(r),o={tagName:"name"};Object.keys(o).forEach(function(e){var t=o[e];Object.defineProperty(i,e,{get:function(){return this[t]||null},set:function(e){return this[t]=e}})})},3284:function(e,t,n){var r=n(2489),i=r.DomHandler,o=r.DomUtils;function a(e,t){this.init(e,t)}function s(e,t){return o.getElementsByTagName(e,t,!0)}function l(e,t){return o.getElementsByTagName(e,t,!0,1)[0]}function u(e,t,n){return o.getText(o.getElementsByTagName(e,t,n,1)).trim()}function c(e,t,n,r,i){var o=u(n,r,i);o&&(e[t]=o)}n(166)(a,i),a.prototype.init=i;var d=function(e){return"rss"===e||"feed"===e||"rdf:RDF"===e};a.prototype.onend=function(){var e,t,n={},r=l(d,this.dom);r&&("feed"===r.name?(t=r.children,n.type="atom",c(n,"id","id",t),c(n,"title","title",t),(e=l("link",t))&&(e=e.attribs)&&(e=e.href)&&(n.link=e),c(n,"description","subtitle",t),(e=u("updated",t))&&(n.updated=new Date(e)),c(n,"author","email",t,!0),n.items=s("entry",t).map(function(e){var t,n={};return c(n,"id","id",e=e.children),c(n,"title","title",e),(t=l("link",e))&&(t=t.attribs)&&(t=t.href)&&(n.link=t),(t=u("summary",e)||u("content",e))&&(n.description=t),(t=u("updated",e))&&(n.pubDate=new Date(t)),n})):(t=l("channel",r.children).children,n.type=r.name.substr(0,3),n.id="",c(n,"title","title",t),c(n,"link","link",t),c(n,"description","description",t),(e=u("lastBuildDate",t))&&(n.updated=new Date(e)),c(n,"author","managingEditor",t,!0),n.items=s("item",r.children).map(function(e){var t,n={};return c(n,"id","guid",e=e.children),c(n,"title","title",e),c(n,"link","link",e),c(n,"description","description",e),(t=u("pubDate",e))&&(n.pubDate=new Date(t)),n}))),this.dom=n,i.prototype._handleCallback.call(this,r?null:Error("couldn't find root of feed"))},e.exports=a},3285:function(e,t,n){e.exports=i;var r=n(2843);function i(e){r.call(this,new o(this),e)}function o(e){this.scope=e}n(166)(i,r),i.prototype.readable=!0;var a=n(2489).EVENTS;Object.keys(a).forEach(function(n){if(0===a[n])o.prototype["on"+n]=function(){this.scope.emit(n)};else if(1===a[n])o.prototype["on"+n]=function(e){this.scope.emit(n,e)};else{if(2!==a[n])throw Error("wrong number of arguments!");o.prototype["on"+n]=function(e,t){this.scope.emit(n,e,t)}}})},3286:function(e,t){},3287:function(e,t,n){function r(e){this._cbs=e||{}}e.exports=r;var i=n(2489).EVENTS;Object.keys(i).forEach(function(n){if(0===i[n])r.prototype[n="on"+n]=function(){this._cbs[n]&&this._cbs[n]()};else if(1===i[n])r.prototype[n="on"+n]=function(e){this._cbs[n]&&this._cbs[n](e)};else{if(2!==i[n])throw Error("wrong number of arguments");r.prototype[n="on"+n]=function(e,t){this._cbs[n]&&this._cbs[n](e,t)}}})},3288:function(e,t,n){var r=e.exports;[n(3289),n(3295),n(3296),n(3297),n(3298),n(3299)].forEach(function(t){Object.keys(t).forEach(function(e){r[e]=t[e].bind(r)})})},3289:function(e,t,n){var r=n(2490),i=n(3290),o=r.isTag;e.exports={getInnerHTML:function(e,t){return e.children?e.children.map(function(e){return i(e,t)}).join(""):""},getOuterHTML:i,getText:function e(t){if(Array.isArray(t))return t.map(e).join("");if(o(t)||t.type===r.CDATA)return e(t.children);if(t.type===r.Text)return t.data;return""}}},3290:function(e,t,n){var o=n(3291),a=n(3292),s={__proto__:null,allowfullscreen:!0,async:!0,autofocus:!0,autoplay:!0,checked:!0,controls:!0,default:!0,defer:!0,disabled:!0,hidden:!0,ismap:!0,loop:!0,multiple:!0,muted:!0,open:!0,readonly:!0,required:!0,reversed:!0,scoped:!0,seamless:!0,selected:!0,typemustmatch:!0},r={__proto__:null,style:!0,script:!0,xmp:!0,iframe:!0,noembed:!0,noframes:!0,plaintext:!0,noscript:!0};var i={__proto__:null,area:!0,base:!0,basefont:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,isindex:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},l=e.exports=function(e,t){Array.isArray(e)||e.cheerio||(e=[e]),t=t||{};for(var n="",r=0;r":i.type===o.Comment?n+="\x3c!--"+i.data+"--\x3e":i.type===o.CDATA?n+="":n+=c(i,t)}return n};function u(e,t){"svg"===e.name&&(t={decodeEntities:t.decodeEntities,xmlMode:!0});var n="<"+e.name,r=function(e,t){if(e){var n,r="";for(var i in e)r&&(r+=" "),!(n=e[i])&&s[i]?r+=i:r+=i+'="'+(t.decodeEntities?a.encodeXML(n):n)+'"';return r}}(e.attribs,t);return r&&(n+=" "+r),!t.xmlMode||e.children&&0!==e.children.length?(n+=">",e.children&&(n+=l(e.children,t)),i[e.name]&&!t.xmlMode||(n+=""+e.name+">")):n+="/>",n}function c(e,t){var n=e.data||"";return!t.decodeEntities||e.parent&&e.parent.name in r||(n=a.encodeXML(n)),n}},3291:function(e,t){e.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",isTag:function(e){return"tag"===e.type||"script"===e.type||"style"===e.type}}},3292:function(e,t,n){var r=n(3293),i=n(3294);t.decode=function(e,t){return(!t||t<=0?i.XML:i.HTML)(e)},t.decodeStrict=function(e,t){return(!t||t<=0?i.XML:i.HTMLStrict)(e)},t.encode=function(e,t){return(!t||t<=0?r.XML:r.HTML)(e)},t.encodeXML=r.XML,t.encodeHTML4=t.encodeHTML5=t.encodeHTML=r.HTML,t.decodeXML=t.decodeXMLStrict=i.XML,t.decodeHTML4=t.decodeHTML5=t.decodeHTML=i.HTML,t.decodeHTML4Strict=t.decodeHTML5Strict=t.decodeHTMLStrict=i.HTMLStrict,t.escape=r.escape},3293:function(e,t,n){var r=s(n(2642)),i=l(r);t.XML=f(r,i);var o=s(n(2641)),a=l(o);function s(n){return Object.keys(n).sort().reduce(function(e,t){return e[n[t]]="&"+t+";",e},{})}function l(e){var t=[],n=[];return Object.keys(e).forEach(function(e){1===e.length?t.push("\\"+e):n.push(e)}),n.unshift("["+t.join("")+"]"),new RegExp(n.join("|"),"g")}t.HTML=f(o,a);var u=/[^\0-\x7F]/g,c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function d(e){return""+e.charCodeAt(0).toString(16).toUpperCase()+";"}function p(e){return""+(1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)-56320+65536).toString(16).toUpperCase()+";"}function f(t,n){function r(e){return t[e]}return function(e){return e.replace(n,r).replace(c,p).replace(u,d)}}var h=l(r);t.escape=function(e){return e.replace(h,d).replace(c,p).replace(u,d)}},3294:function(e,t,n){var s=n(2641),l=n(2841),r=n(2642),i=n(2840),o=u(r),a=u(s);function u(e){var t=Object.keys(e).join("|"),n=p(e),r=new RegExp("&(?:"+(t+="|#[xX][\\da-fA-F]+|#\\d+")+");","g");return function(e){return String(e).replace(r,n)}}var c=function(){for(var e=Object.keys(l).sort(d),t=Object.keys(s).sort(d),n=0,r=0;ni.indexOf(a)?r===t?p|h:p:r===e?d|f:d)};t.uniqueSort=function(e){var t,n,r=e.length;for(e=e.slice();-1<--r;)t=e[r],-1<(n=e.indexOf(t))&&nt});case T.GREATER_THAN_OR_EQUAL:return e.filter(function(e){return e[n]>=t});case T.LESS_THAN:return e.filter(function(e){return e[n]=r?i.notify(t):n.length>e.length&&i.notify(h({},t,{target:h({},t.target,{value:""})}))})}),d(u(i),"onKeyDown",function(e){"Enter"===e.key&&i.forceNotify(e);var t=i.props.onKeyDown;t&&(e.persist(),t(e))}),d(u(i),"onBlur",function(e){i.forceNotify(e);var t=i.props.onBlur;t&&(e.persist(),t(e))}),d(u(i),"createNotifier",function(e){if(e<0)i.notify=function(){return null};else if(0===e)i.notify=i.doNotify;else{var t=(0,r.default)(function(e){i.isDebouncing=!1,i.doNotify(e)},e);i.notify=function(e){i.isDebouncing=!0,t(e)},i.flush=function(){return t.flush()},i.cancel=function(){i.isDebouncing=!1,t.cancel()}}}),d(u(i),"doNotify",function(){i.props.onChange.apply(void 0,arguments)}),d(u(i),"forceNotify",function(e){var t=i.props.debounceTimeout;if(i.isDebouncing||!(0=r?i.doNotify(e):i.doNotify(h({},e,{target:h({},e.target,{value:n})}))}}),i.isDebouncing=!1,i.state={value:e.value||""};var t=i.props.debounceTimeout;return i.createNotifier(t),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(n,p["default"].PureComponent),function(e,t,n){t&&s(e.prototype,t),n&&s(e,n)}(n,[{key:"componentDidUpdate",value:function(e){if(!this.isDebouncing){var t=this.props,n=t.value,r=t.debounceTimeout,i=e.debounceTimeout,o=e.value,a=this.state.value;void 0!==n&&o!==n&&a!==n&&this.setState({value:n}),r!==i&&this.createNotifier(r)}}},{key:"componentWillUnmount",value:function(){this.flush&&this.flush()}},{key:"render",value:function(){var e,t,n=this.props,r=n.element,i=(n.onChange,n.value,n.minLength,n.debounceTimeout,n.forceNotifyByEnter),o=n.forceNotifyOnBlur,a=n.onKeyDown,s=n.onBlur,l=n.inputRef,u=f(n,["element","onChange","value","minLength","debounceTimeout","forceNotifyByEnter","forceNotifyOnBlur","onKeyDown","onBlur","inputRef"]),c=this.state.value;e=i?{onKeyDown:this.onKeyDown}:a?{onKeyDown:a}:{},t=o?{onBlur:this.onBlur}:s?{onBlur:s}:{};var d=l?{ref:l}:{};return p.default.createElement(r,h({},u,{onChange:this.onChange,value:c},e,{},t,{},d))}}]),n}();d(t.DebounceInput=m,"defaultProps",{element:"input",type:"text",onKeyDown:void 0,onBlur:void 0,value:void 0,minLength:0,debounceTimeout:100,forceNotifyByEnter:!0,forceNotifyOnBlur:!0,inputRef:void 0})},3327:function(e,t,n){"use strict";function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=c(n(1)),i=c(n(15)),o=c(n(0)),s=c(n(3)),l=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(1488));function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var p=function(e){function t(){return e.apply(this,arguments)||this}return function(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}(t,e),t.prototype.render=function(){var t=this,e=this.props.inlineLabel?function(t){for(var e=1;et[r]?1:-1}),columns:n}}function m(e,t,n){if("number"!=typeof e)return"white";return"hsl(217, 89%, ".concat(100-(e-t)/(n-t)*44,"%)")}f.propTypes={records:r.default.array.isRequired,numericColumns:r.default.arrayOf(r.default.string).isRequired,chartTitle:r.default.string,selectedColumn1:r.default.string,selectedColumn2:r.default.string};var g={width:"100%"},b={fontFamily:'"Gotham 7r", sans-serif',fontSize:16,lineHeight:"16px",color:"black"},y={width:"100%"},v={height:"2em",border:"1px solid black",textAlign:"center"},E=d({},v,{backgroundColor:i.lightest_gray,color:"black"}),_=d({},v,{backgroundColor:i.dark_charcoal,color:"white",padding:"0 1em",whiteSpace:"nowrap"}),w=d({},v,{overflow:"hidden"}),S={fontFamily:'"Gotham 5r", sans-serif'}},3330:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=c(n(1)),r=c(n(0)),a=c(n(12)),o=n(821),s=n(2645),l=c(n(2856)),u=c(n(3));function c(e){return e&&e.__esModule?e:{default:e}}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var f=function(r){function e(){for(var o,e=arguments.length,t=new Array(e),n=0;n'+r.default.choosePrefix()+"",click:function(e){return d(l.ParamType.TABLE,e)}}]}},t.getColumns=function(){return function(e){var t=p(this,e);return[{text:r.default.choosePrefix(),display:''+r.default.choosePrefix()+"",click:function(e){return d(l.ParamType.COLUMN,e,t)}}]}},t.__TestInterface=void 0;var i=c(n(1)),o=c(n(8)),r=c(n(3)),s=n(168),l=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}n.default=e,t&&t.set(e,n);return n}(n(3336));function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t,n){var r=document.createElement("div");r.setAttribute("id","modalDiv"),document.body.appendChild(r),o.default.render(i.default.createElement(l.default,{param:e,table:n,onChoose:function(e){return t('"'.concat(e,'"'))},onClose:function(){var e=document.getElementById("modalDiv");e.parentNode.removeChild(e)}}),document.querySelector("#modalDiv"))}function p(e,t){var n=(0,s.getFirstParam)("getColumn",e.parent,t);return n.substring(1,n.length-1)}var f={getTableNameFromColumnSocket:p};t.__TestInterface=f},3336:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ParamType=void 0;var r=u(n(0)),o=u(n(1)),a=u(n(3)),i=u(n(5)),s=n(25),l=u(n(33));function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var d={TABLE:"TABLE",COLUMN:"COLUMN"};t.ParamType=d;var p=function(i){function e(){for(var e,t=arguments.length,n=new Array(t),r=0;r, 2012
* @author Martin Kleppe , 2012
* @author Ubilabs http://ubilabs.net, 2012
* @license MIT License
*/
function l(e,t,n){this.obj=e,this.left=null,this.right=null,this.parent=n,this.dimension=t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(){function e(e,t){if(Array.isArray(e)){this.dimensions=new Array(e[0].length);for(var n=0;nd&&h.pop()}for(o=0;o=i}e.exports.getResultsFromLog=function(e,s){s=s||[];var l={testResult:u.TestResults.ALL_PASS};return e.forEach(function(e,t){var n,r=u.TestResults.LOG_CONDITION_FAIL;switch(e.minTimes=e.minTimes||0,e.maxTimes=c.valueOr(e.maxTimes,1/0),e.matchType){case"exact":n=!0;case"inexact":for(var i=0,o=0,a=0;a=e.entries.length&&(i=0,++o>=e.minTimes&&e.maxTimes===1/0||o>e.maxTimes))break}else n&&(i=0);o>=e.minTimes&&o<=e.maxTimes&&(r=u.TestResults.ALL_PASS);break;default:r=u.TestResults.ALL_PASS}r> ":" ")+n+"| "+e}).join("\n");throw e.path=l,e.message=(l||"ejs")+":"+r+"\n"+u+"\n\n"+e.message,e},escapeFn=escapeFn||function(e){return null==e?"":String(e).replace(_MATCH_HTML,encode_char)};var _ENCODE_HTML_RULES={"&":"&","<":"<",">":">",'"':""","'":"'"},_MATCH_HTML=/[&<>'"]/g;function encode_char(e){return _ENCODE_HTML_RULES[e]||e}var __line=1,__lines='\n \n <%- appName %>\n \n \n \n