diff --git a/docs/909.bundle.js b/docs/909.bundle.js index 01e7790..795bbba 100644 --- a/docs/909.bundle.js +++ b/docs/909.bundle.js @@ -13,5 +13,5 @@ ${n}

`}],[/\s?<\/ul>\s?'),this.$slides.each(function(t,e){var i=s('
  • ');n.$indicators.append(i[0])}),this.$el.append(this.$indicators[0]),this.$indicators=this.$indicators.children(\"li.indicator-item\"))}},{key:\"_removeIndicators\",value:function(){this.$el.find(\"ul.indicators\").remove()}},{key:\"set\",value:function(t){var e=this;if(t>=this.$slides.length?t=0:t<0&&(t=this.$slides.length-1),this.activeIndex!=t){this.$active=this.$slides.eq(this.activeIndex);var i=this.$active.find(\".caption\");this.$active.removeClass(\"active\"),o({targets:this.$active[0],opacity:0,duration:this.options.duration,easing:\"easeOutQuad\",complete:function(){e.$slides.not(\".active\").each(function(t){o({targets:t,opacity:0,translateX:0,translateY:0,duration:0,easing:\"easeOutQuad\"})})}}),this._animateCaptionIn(i[0],this.options.duration),this.options.indicators&&(this.$indicators.eq(this.activeIndex).removeClass(\"active\"),this.$indicators.eq(t).addClass(\"active\")),o({targets:this.$slides.eq(t)[0],opacity:1,duration:this.options.duration,easing:\"easeOutQuad\"}),o({targets:this.$slides.eq(t).find(\".caption\")[0],opacity:1,translateX:0,translateY:0,duration:this.options.duration,delay:this.options.duration,easing:\"easeOutQuad\"}),this.$slides.eq(t).addClass(\"active\"),this.activeIndex=t,this.start()}}},{key:\"pause\",value:function(){clearInterval(this.interval)}},{key:\"start\",value:function(){clearInterval(this.interval),this.interval=setInterval(this._handleIntervalBound,this.options.duration+this.options.interval)}},{key:\"next\",value:function(){var t=this.activeIndex+1;t>=this.$slides.length?t=0:t<0&&(t=this.$slides.length-1),this.set(t)}},{key:\"prev\",value:function(){var t=this.activeIndex-1;t>=this.$slides.length?t=0:t<0&&(t=this.$slides.length-1),this.set(t)}}],[{key:\"init\",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),\"init\",this).call(this,this,t,e)}},{key:\"getInstance\",value:function(t){return(t.jquery?t[0]:t).M_Slider}},{key:\"defaults\",get:function(){return e}}]),n}();M.Slider=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,\"slider\",\"M_Slider\")}(cash,M.anime),function(n,s){n(document).on(\"click\",\".card\",function(t){if(n(this).children(\".card-reveal\").length){var i=n(t.target).closest(\".card\");void 0===i.data(\"initialOverflow\")&&i.data(\"initialOverflow\",void 0===i.css(\"overflow\")?\"\":i.css(\"overflow\"));var e=n(this).find(\".card-reveal\");n(t.target).is(n(\".card-reveal .card-title\"))||n(t.target).is(n(\".card-reveal .card-title i\"))?s({targets:e[0],translateY:0,duration:225,easing:\"easeInOutQuad\",complete:function(t){var e=t.animatables[0].target;n(e).css({display:\"none\"}),i.css(\"overflow\",i.data(\"initialOverflow\"))}}):(n(t.target).is(n(\".card .activator\"))||n(t.target).is(n(\".card .activator i\")))&&(i.css(\"overflow\",\"hidden\"),e.css({display:\"block\"}),s({targets:e[0],translateY:\"-100%\",duration:300,easing:\"easeInOutQuad\"}))}})}(cash,M.anime),function(h){\"use strict\";var e={data:[],placeholder:\"\",secondaryPlaceholder:\"\",autocompleteOptions:{},limit:1/0,onChipAdd:null,onChipSelect:null,onChipDelete:null},t=function(t){function l(t,e){_classCallCheck(this,l);var i=_possibleConstructorReturn(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,l,t,e));return(i.el.M_Chips=i).options=h.extend({},l.defaults,e),i.$el.addClass(\"chips input-field\"),i.chipsData=[],i.$chips=h(),i._setupInput(),i.hasAutocomplete=0\"),this.$el.append(this.$input)),this.$input.addClass(\"input\")}},{key:\"_setupLabel\",value:function(){this.$label=this.$el.find(\"label\"),this.$label.length&&this.$label.setAttribute(\"for\",this.$input.attr(\"id\"))}},{key:\"_setPlaceholder\",value:function(){void 0!==this.chipsData&&!this.chipsData.length&&this.options.placeholder?h(this.$input).prop(\"placeholder\",this.options.placeholder):(void 0===this.chipsData||this.chipsData.length)&&this.options.secondaryPlaceholder&&h(this.$input).prop(\"placeholder\",this.options.secondaryPlaceholder)}},{key:\"_isValid\",value:function(t){if(t.hasOwnProperty(\"tag\")&&\"\"!==t.tag){for(var e=!1,i=0;i=this.options.limit)){var e=this._renderChip(t);this.$chips.add(e),this.chipsData.push(t),h(this.$input).before(e),this._setPlaceholder(),\"function\"==typeof this.options.onChipAdd&&this.options.onChipAdd.call(this,this.$el,e)}}},{key:\"deleteChip\",value:function(t){var e=this.$chips.eq(t);this.$chips.eq(t).remove(),this.$chips=this.$chips.filter(function(t){return 0<=h(t).index()}),this.chipsData.splice(t,1),this._setPlaceholder(),\"function\"==typeof this.options.onChipDelete&&this.options.onChipDelete.call(this,this.$el,e[0])}},{key:\"selectChip\",value:function(t){var e=this.$chips.eq(t);(this._selectedChip=e)[0].focus(),\"function\"==typeof this.options.onChipSelect&&this.options.onChipSelect.call(this,this.$el,e[0])}}],[{key:\"init\",value:function(t,e){return _get(l.__proto__||Object.getPrototypeOf(l),\"init\",this).call(this,this,t,e)}},{key:\"getInstance\",value:function(t){return(t.jquery?t[0]:t).M_Chips}},{key:\"_handleChipsKeydown\",value:function(t){l._keydown=!0;var e=h(t.target).closest(\".chips\"),i=t.target&&e.length;if(!h(t.target).is(\"input, textarea\")&&i){var n=e[0].M_Chips;if(8===t.keyCode||46===t.keyCode){t.preventDefault();var s=n.chipsData.length;if(n._selectedChip){var o=n._selectedChip.index();n.deleteChip(o),n._selectedChip=null,s=Math.max(o-1,0)}n.chipsData.length&&n.selectChip(s)}else if(37===t.keyCode){if(n._selectedChip){var a=n._selectedChip.index()-1;if(a<0)return;n.selectChip(a)}}else if(39===t.keyCode&&n._selectedChip){var r=n._selectedChip.index()+1;r>=n.chipsData.length?n.$input[0].focus():n.selectChip(r)}}}},{key:\"_handleChipsKeyup\",value:function(t){l._keydown=!1}},{key:\"_handleChipsBlur\",value:function(t){l._keydown||(h(t.target).closest(\".chips\")[0].M_Chips._selectedChip=null)}},{key:\"defaults\",get:function(){return e}}]),l}();t._keydown=!1,M.Chips=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,\"chips\",\"M_Chips\"),h(document).ready(function(){h(document.body).on(\"click\",\".chip .close\",function(){var t=h(this).closest(\".chips\");t.length&&t[0].M_Chips||h(this).closest(\".chip\").remove()})})}(cash),function(s){\"use strict\";var e={top:0,bottom:1/0,offset:0,onPositionChange:null},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Pushpin=i).options=s.extend({},n.defaults,e),i.originalOffset=i.el.offsetTop,n._pushpins.push(i),i._setupEventHandlers(),i._updatePosition(),i}return _inherits(n,Component),_createClass(n,[{key:\"destroy\",value:function(){this.el.style.top=null,this._removePinClasses(),this._removeEventHandlers();var t=n._pushpins.indexOf(this);n._pushpins.splice(t,1)}},{key:\"_setupEventHandlers\",value:function(){document.addEventListener(\"scroll\",n._updateElements)}},{key:\"_removeEventHandlers\",value:function(){document.removeEventListener(\"scroll\",n._updateElements)}},{key:\"_updatePosition\",value:function(){var t=M.getDocumentScrollTop()+this.options.offset;this.options.top<=t&&this.options.bottom>=t&&!this.el.classList.contains(\"pinned\")&&(this._removePinClasses(),this.el.style.top=this.options.offset+\"px\",this.el.classList.add(\"pinned\"),\"function\"==typeof this.options.onPositionChange&&this.options.onPositionChange.call(this,\"pinned\")),tthis.options.bottom&&!this.el.classList.contains(\"pin-bottom\")&&(this._removePinClasses(),this.el.classList.add(\"pin-bottom\"),this.el.style.top=this.options.bottom-this.originalOffset+\"px\",\"function\"==typeof this.options.onPositionChange&&this.options.onPositionChange.call(this,\"pin-bottom\"))}},{key:\"_removePinClasses\",value:function(){this.el.classList.remove(\"pin-top\"),this.el.classList.remove(\"pinned\"),this.el.classList.remove(\"pin-bottom\")}}],[{key:\"init\",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),\"init\",this).call(this,this,t,e)}},{key:\"getInstance\",value:function(t){return(t.jquery?t[0]:t).M_Pushpin}},{key:\"_updateElements\",value:function(){for(var t in n._pushpins){n._pushpins[t]._updatePosition()}}},{key:\"defaults\",get:function(){return e}}]),n}();t._pushpins=[],M.Pushpin=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,\"pushpin\",\"M_Pushpin\")}(cash),function(r,s){\"use strict\";var e={direction:\"top\",hoverEnabled:!0,toolbarEnabled:!1};r.fn.reverse=[].reverse;var t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_FloatingActionButton=i).options=r.extend({},n.defaults,e),i.isOpen=!1,i.$anchor=i.$el.children(\"a\").first(),i.$menu=i.$el.children(\"ul\").first(),i.$floatingBtns=i.$el.find(\"ul .btn-floating\"),i.$floatingBtnsReverse=i.$el.find(\"ul .btn-floating\").reverse(),i.offsetY=0,i.offsetX=0,i.$el.addClass(\"direction-\"+i.options.direction),\"top\"===i.options.direction?i.offsetY=40:\"right\"===i.options.direction?i.offsetX=-40:\"bottom\"===i.options.direction?i.offsetY=-40:i.offsetX=40,i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:\"destroy\",value:function(){this._removeEventHandlers(),this.el.M_FloatingActionButton=void 0}},{key:\"_setupEventHandlers\",value:function(){this._handleFABClickBound=this._handleFABClick.bind(this),this._handleOpenBound=this.open.bind(this),this._handleCloseBound=this.close.bind(this),this.options.hoverEnabled&&!this.options.toolbarEnabled?(this.el.addEventListener(\"mouseenter\",this._handleOpenBound),this.el.addEventListener(\"mouseleave\",this._handleCloseBound)):this.el.addEventListener(\"click\",this._handleFABClickBound)}},{key:\"_removeEventHandlers\",value:function(){this.options.hoverEnabled&&!this.options.toolbarEnabled?(this.el.removeEventListener(\"mouseenter\",this._handleOpenBound),this.el.removeEventListener(\"mouseleave\",this._handleCloseBound)):this.el.removeEventListener(\"click\",this._handleFABClickBound)}},{key:\"_handleFABClick\",value:function(){this.isOpen?this.close():this.open()}},{key:\"_handleDocumentClick\",value:function(t){r(t.target).closest(this.$menu).length||this.close()}},{key:\"open\",value:function(){this.isOpen||(this.options.toolbarEnabled?this._animateInToolbar():this._animateInFAB(),this.isOpen=!0)}},{key:\"close\",value:function(){this.isOpen&&(this.options.toolbarEnabled?(window.removeEventListener(\"scroll\",this._handleCloseBound,!0),document.body.removeEventListener(\"click\",this._handleDocumentClickBound,!0),this._animateOutToolbar()):this._animateOutFAB(),this.isOpen=!1)}},{key:\"_animateInFAB\",value:function(){var e=this;this.$el.addClass(\"active\");var i=0;this.$floatingBtnsReverse.each(function(t){s({targets:t,opacity:1,scale:[.4,1],translateY:[e.offsetY,0],translateX:[e.offsetX,0],duration:275,delay:i,easing:\"easeInOutQuad\"}),i+=40})}},{key:\"_animateOutFAB\",value:function(){var e=this;this.$floatingBtnsReverse.each(function(t){s.remove(t),s({targets:t,opacity:0,scale:.4,translateY:e.offsetY,translateX:e.offsetX,duration:175,easing:\"easeOutQuad\",complete:function(){e.$el.removeClass(\"active\")}})})}},{key:\"_animateInToolbar\",value:function(){var t,e=this,i=window.innerWidth,n=window.innerHeight,s=this.el.getBoundingClientRect(),o=r('
    '),a=this.$anchor.css(\"background-color\");this.$anchor.append(o),this.offsetX=s.left-i/2+s.width/2,this.offsetY=n-s.bottom,t=i/o[0].clientWidth,this.btnBottom=s.bottom,this.btnLeft=s.left,this.btnWidth=s.width,this.$el.addClass(\"active\"),this.$el.css({\"text-align\":\"center\",width:\"100%\",bottom:0,left:0,transform:\"translateX(\"+this.offsetX+\"px)\",transition:\"none\"}),this.$anchor.css({transform:\"translateY(\"+-this.offsetY+\"px)\",transition:\"none\"}),o.css({\"background-color\":a}),setTimeout(function(){e.$el.css({transform:\"\",transition:\"transform .2s cubic-bezier(0.550, 0.085, 0.680, 0.530), background-color 0s linear .2s\"}),e.$anchor.css({overflow:\"visible\",transform:\"\",transition:\"transform .2s\"}),setTimeout(function(){e.$el.css({overflow:\"hidden\",\"background-color\":a}),o.css({transform:\"scale(\"+t+\")\",transition:\"transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)\"}),e.$menu.children(\"li\").children(\"a\").css({opacity:1}),e._handleDocumentClickBound=e._handleDocumentClick.bind(e),window.addEventListener(\"scroll\",e._handleCloseBound,!0),document.body.addEventListener(\"click\",e._handleDocumentClickBound,!0)},100)},0)}},{key:\"_animateOutToolbar\",value:function(){var t=this,e=window.innerWidth,i=window.innerHeight,n=this.$el.find(\".fab-backdrop\"),s=this.$anchor.css(\"background-color\");this.offsetX=this.btnLeft-e/2+this.btnWidth/2,this.offsetY=i-this.btnBottom,this.$el.removeClass(\"active\"),this.$el.css({\"background-color\":\"transparent\",transition:\"none\"}),this.$anchor.css({transition:\"none\"}),n.css({transform:\"scale(0)\",\"background-color\":s}),this.$menu.children(\"li\").children(\"a\").css({opacity:\"\"}),setTimeout(function(){n.remove(),t.$el.css({\"text-align\":\"\",width:\"\",bottom:\"\",left:\"\",overflow:\"\",\"background-color\":\"\",transform:\"translate3d(\"+-t.offsetX+\"px,0,0)\"}),t.$anchor.css({overflow:\"\",transform:\"translate3d(0,\"+t.offsetY+\"px,0)\"}),setTimeout(function(){t.$el.css({transform:\"translate3d(0,0,0)\",transition:\"transform .2s\"}),t.$anchor.css({transform:\"translate3d(0,0,0)\",transition:\"transform .2s cubic-bezier(0.550, 0.055, 0.675, 0.190)\"})},20)},200)}}],[{key:\"init\",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),\"init\",this).call(this,this,t,e)}},{key:\"getInstance\",value:function(t){return(t.jquery?t[0]:t).M_FloatingActionButton}},{key:\"defaults\",get:function(){return e}}]),n}();M.FloatingActionButton=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,\"floatingActionButton\",\"M_FloatingActionButton\")}(cash,M.anime),function(g){\"use strict\";var e={autoClose:!1,format:\"mmm dd, yyyy\",parse:null,defaultDate:null,setDefaultDate:!1,disableWeekends:!1,disableDayFn:null,firstDay:0,minDate:null,maxDate:null,yearRange:10,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,container:null,showClearBtn:!1,i18n:{cancel:\"Cancel\",clear:\"Clear\",done:\"Ok\",previousMonth:\"‹\",nextMonth:\"›\",months:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],monthsShort:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],weekdays:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],weekdaysShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],weekdaysAbbrev:[\"S\",\"M\",\"T\",\"W\",\"T\",\"F\",\"S\"]},events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null},t=function(t){function B(t,e){_classCallCheck(this,B);var i=_possibleConstructorReturn(this,(B.__proto__||Object.getPrototypeOf(B)).call(this,B,t,e));(i.el.M_Datepicker=i).options=g.extend({},B.defaults,e),e&&e.hasOwnProperty(\"i18n\")&&\"object\"==typeof e.i18n&&(i.options.i18n=g.extend({},B.defaults.i18n,e.i18n)),i.options.minDate&&i.options.minDate.setHours(0,0,0,0),i.options.maxDate&&i.options.maxDate.setHours(0,0,0,0),i.id=M.guid(),i._setupVariables(),i._insertHTMLIntoDOM(),i._setupModal(),i._setupEventHandlers(),i.options.defaultDate||(i.options.defaultDate=new Date(Date.parse(i.el.value)));var n=i.options.defaultDate;return B._isDate(n)?i.options.setDefaultDate?(i.setDate(n,!0),i.setInputValue()):i.gotoDate(n):i.gotoDate(new Date),i.isOpen=!1,i}return _inherits(B,Component),_createClass(B,[{key:\"destroy\",value:function(){this._removeEventHandlers(),this.modal.destroy(),g(this.modalEl).remove(),this.destroySelects(),this.el.M_Datepicker=void 0}},{key:\"destroySelects\",value:function(){var t=this.calendarEl.querySelector(\".orig-select-year\");t&&M.FormSelect.getInstance(t).destroy();var e=this.calendarEl.querySelector(\".orig-select-month\");e&&M.FormSelect.getInstance(e).destroy()}},{key:\"_insertHTMLIntoDOM\",value:function(){this.options.showClearBtn&&(g(this.clearBtn).css({visibility:\"\"}),this.clearBtn.innerHTML=this.options.i18n.clear),this.doneBtn.innerHTML=this.options.i18n.done,this.cancelBtn.innerHTML=this.options.i18n.cancel,this.options.container?this.$modalEl.appendTo(this.options.container):this.$modalEl.insertBefore(this.el)}},{key:\"_setupModal\",value:function(){var t=this;this.modalEl.id=\"modal-\"+this.id,this.modal=M.Modal.init(this.modalEl,{onCloseEnd:function(){t.isOpen=!1}})}},{key:\"toString\",value:function(t){var e=this;return t=t||this.options.format,B._isDate(this.date)?t.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g).map(function(t){return e.formats[t]?e.formats[t]():t}).join(\"\"):\"\"}},{key:\"setDate\",value:function(t,e){if(!t)return this.date=null,this._renderDateDisplay(),this.draw();if(\"string\"==typeof t&&(t=new Date(Date.parse(t))),B._isDate(t)){var i=this.options.minDate,n=this.options.maxDate;B._isDate(i)&&tn.maxDate||n.disableWeekends&&B._isWeekend(y)||n.disableDayFn&&n.disableDayFn(y),isEmpty:C,isStartRange:x,isEndRange:L,isInRange:T,showDaysInNextAndPreviousMonths:n.showDaysInNextAndPreviousMonths};l.push(this.renderDay($)),7==++_&&(r.push(this.renderRow(l,n.isRTL,m)),_=0,m=!(l=[]))}return this.renderTable(n,r,i)}},{key:\"renderDay\",value:function(t){var e=[],i=\"false\";if(t.isEmpty){if(!t.showDaysInNextAndPreviousMonths)return'';e.push(\"is-outside-current-month\"),e.push(\"is-selection-disabled\")}return t.isDisabled&&e.push(\"is-disabled\"),t.isToday&&e.push(\"is-today\"),t.isSelected&&(e.push(\"is-selected\"),i=\"true\"),t.hasEvent&&e.push(\"has-event\"),t.isInRange&&e.push(\"is-inrange\"),t.isStartRange&&e.push(\"is-startrange\"),t.isEndRange&&e.push(\"is-endrange\"),'\"}},{key:\"renderRow\",value:function(t,e,i){return''+(e?t.reverse():t).join(\"\")+\"\"}},{key:\"renderTable\",value:function(t,e,i){return'
    '+this.renderHead(t)+this.renderBody(e)+\"
    \"}},{key:\"renderHead\",value:function(t){var e=void 0,i=[];for(e=0;e<7;e++)i.push(''+this.renderDayName(t,e,!0)+\"\");return\"\"+(t.isRTL?i.reverse():i).join(\"\")+\"\"}},{key:\"renderBody\",value:function(t){return\"\"+t.join(\"\")+\"\"}},{key:\"renderTitle\",value:function(t,e,i,n,s,o){var a,r,l=void 0,h=void 0,d=void 0,u=this.options,c=i===u.minYear,p=i===u.maxYear,v='
    ',f=!0,m=!0;for(d=[],l=0;l<12;l++)d.push('\");for(a='\",g.isArray(u.yearRange)?(l=u.yearRange[0],h=u.yearRange[1]+1):(l=i-u.yearRange,h=1+i+u.yearRange),d=[];l=u.minYear&&d.push('\");r='\";v+='',v+='
    ',u.showMonthAfterYear?v+=r+a:v+=a+r,v+=\"
    \",c&&(0===n||u.minMonth>=n)&&(f=!1),p&&(11===n||u.maxMonth<=n)&&(m=!1);return(v+='')+\"
    \"}},{key:\"draw\",value:function(t){if(this.isOpen||t){var e,i=this.options,n=i.minYear,s=i.maxYear,o=i.minMonth,a=i.maxMonth,r=\"\";this._y<=n&&(this._y=n,!isNaN(o)&&this._m=s&&(this._y=s,!isNaN(a)&&this._m>a&&(this._m=a)),e=\"datepicker-title-\"+Math.random().toString(36).replace(/[^a-z]+/g,\"\").substr(0,2);for(var l=0;l<1;l++)this._renderDateDisplay(),r+=this.renderTitle(this,l,this.calendars[l].year,this.calendars[l].month,this.calendars[0].year,e)+this.render(this.calendars[l].year,this.calendars[l].month,e);this.destroySelects(),this.calendarEl.innerHTML=r;var h=this.calendarEl.querySelector(\".orig-select-year\"),d=this.calendarEl.querySelector(\".orig-select-month\");M.FormSelect.init(h,{classes:\"select-year\",dropdownOptions:{container:document.body,constrainWidth:!1}}),M.FormSelect.init(d,{classes:\"select-month\",dropdownOptions:{container:document.body,constrainWidth:!1}}),h.addEventListener(\"change\",this._handleYearChange.bind(this)),d.addEventListener(\"change\",this._handleMonthChange.bind(this)),\"function\"==typeof this.options.onDraw&&this.options.onDraw(this)}}},{key:\"_setupEventHandlers\",value:function(){this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),this._handleInputChangeBound=this._handleInputChange.bind(this),this._handleCalendarClickBound=this._handleCalendarClick.bind(this),this._finishSelectionBound=this._finishSelection.bind(this),this._handleMonthChange=this._handleMonthChange.bind(this),this._closeBound=this.close.bind(this),this.el.addEventListener(\"click\",this._handleInputClickBound),this.el.addEventListener(\"keydown\",this._handleInputKeydownBound),this.el.addEventListener(\"change\",this._handleInputChangeBound),this.calendarEl.addEventListener(\"click\",this._handleCalendarClickBound),this.doneBtn.addEventListener(\"click\",this._finishSelectionBound),this.cancelBtn.addEventListener(\"click\",this._closeBound),this.options.showClearBtn&&(this._handleClearClickBound=this._handleClearClick.bind(this),this.clearBtn.addEventListener(\"click\",this._handleClearClickBound))}},{key:\"_setupVariables\",value:function(){var e=this;this.$modalEl=g(B._template),this.modalEl=this.$modalEl[0],this.calendarEl=this.modalEl.querySelector(\".datepicker-calendar\"),this.yearTextEl=this.modalEl.querySelector(\".year-text\"),this.dateTextEl=this.modalEl.querySelector(\".date-text\"),this.options.showClearBtn&&(this.clearBtn=this.modalEl.querySelector(\".datepicker-clear\")),this.doneBtn=this.modalEl.querySelector(\".datepicker-done\"),this.cancelBtn=this.modalEl.querySelector(\".datepicker-cancel\"),this.formats={d:function(){return e.date.getDate()},dd:function(){var t=e.date.getDate();return(t<10?\"0\":\"\")+t},ddd:function(){return e.options.i18n.weekdaysShort[e.date.getDay()]},dddd:function(){return e.options.i18n.weekdays[e.date.getDay()]},m:function(){return e.date.getMonth()+1},mm:function(){var t=e.date.getMonth()+1;return(t<10?\"0\":\"\")+t},mmm:function(){return e.options.i18n.monthsShort[e.date.getMonth()]},mmmm:function(){return e.options.i18n.months[e.date.getMonth()]},yy:function(){return(\"\"+e.date.getFullYear()).slice(2)},yyyy:function(){return e.date.getFullYear()}}}},{key:\"_removeEventHandlers\",value:function(){this.el.removeEventListener(\"click\",this._handleInputClickBound),this.el.removeEventListener(\"keydown\",this._handleInputKeydownBound),this.el.removeEventListener(\"change\",this._handleInputChangeBound),this.calendarEl.removeEventListener(\"click\",this._handleCalendarClickBound)}},{key:\"_handleInputClick\",value:function(){this.open()}},{key:\"_handleInputKeydown\",value:function(t){t.which===M.keys.ENTER&&(t.preventDefault(),this.open())}},{key:\"_handleCalendarClick\",value:function(t){if(this.isOpen){var e=g(t.target);e.hasClass(\"is-disabled\")||(!e.hasClass(\"datepicker-day-button\")||e.hasClass(\"is-empty\")||e.parent().hasClass(\"is-disabled\")?e.closest(\".month-prev\").length?this.prevMonth():e.closest(\".month-next\").length&&this.nextMonth():(this.setDate(new Date(t.target.getAttribute(\"data-year\"),t.target.getAttribute(\"data-month\"),t.target.getAttribute(\"data-day\"))),this.options.autoClose&&this._finishSelection()))}}},{key:\"_handleClearClick\",value:function(){this.date=null,this.setInputValue(),this.close()}},{key:\"_handleMonthChange\",value:function(t){this.gotoMonth(t.target.value)}},{key:\"_handleYearChange\",value:function(t){this.gotoYear(t.target.value)}},{key:\"gotoMonth\",value:function(t){isNaN(t)||(this.calendars[0].month=parseInt(t,10),this.adjustCalendars())}},{key:\"gotoYear\",value:function(t){isNaN(t)||(this.calendars[0].year=parseInt(t,10),this.adjustCalendars())}},{key:\"_handleInputChange\",value:function(t){var e=void 0;t.firedBy!==this&&(e=this.options.parse?this.options.parse(this.el.value,this.options.format):new Date(Date.parse(this.el.value)),B._isDate(e)&&this.setDate(e))}},{key:\"renderDayName\",value:function(t,e,i){for(e+=t.firstDay;7<=e;)e-=7;return i?t.i18n.weekdaysAbbrev[e]:t.i18n.weekdays[e]}},{key:\"_finishSelection\",value:function(){this.setInputValue(),this.close()}},{key:\"open\",value:function(){if(!this.isOpen)return this.isOpen=!0,\"function\"==typeof this.options.onOpen&&this.options.onOpen.call(this),this.draw(),this.modal.open(),this}},{key:\"close\",value:function(){if(this.isOpen)return this.isOpen=!1,\"function\"==typeof this.options.onClose&&this.options.onClose.call(this),this.modal.close(),this}}],[{key:\"init\",value:function(t,e){return _get(B.__proto__||Object.getPrototypeOf(B),\"init\",this).call(this,this,t,e)}},{key:\"_isDate\",value:function(t){return/Date/.test(Object.prototype.toString.call(t))&&!isNaN(t.getTime())}},{key:\"_isWeekend\",value:function(t){var e=t.getDay();return 0===e||6===e}},{key:\"_setToStartOfDay\",value:function(t){B._isDate(t)&&t.setHours(0,0,0,0)}},{key:\"_getDaysInMonth\",value:function(t,e){return[31,B._isLeapYear(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]}},{key:\"_isLeapYear\",value:function(t){return t%4==0&&t%100!=0||t%400==0}},{key:\"_compareDates\",value:function(t,e){return t.getTime()===e.getTime()}},{key:\"_setToStartOfDay\",value:function(t){B._isDate(t)&&t.setHours(0,0,0,0)}},{key:\"getInstance\",value:function(t){return(t.jquery?t[0]:t).M_Datepicker}},{key:\"defaults\",get:function(){return e}}]),B}();t._template=['
    ','
    ','
    ','','',\"
    \",'
    ','
    ','
    ','','
    ','','',\"
    \",\"
    \",\"
    \",\"
    \",\"
    \"].join(\"\"),M.Datepicker=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,\"datepicker\",\"M_Datepicker\")}(cash),function(h){\"use strict\";var e={dialRadius:135,outerRadius:105,innerRadius:70,tickRadius:20,duration:350,container:null,defaultTime:\"now\",fromNow:0,showClearBtn:!1,i18n:{cancel:\"Cancel\",clear:\"Clear\",done:\"Ok\"},autoClose:!1,twelveHour:!0,vibrate:!0,onOpenStart:null,onOpenEnd:null,onCloseStart:null,onCloseEnd:null,onSelect:null},t=function(t){function f(t,e){_classCallCheck(this,f);var i=_possibleConstructorReturn(this,(f.__proto__||Object.getPrototypeOf(f)).call(this,f,t,e));return(i.el.M_Timepicker=i).options=h.extend({},f.defaults,e),i.id=M.guid(),i._insertHTMLIntoDOM(),i._setupModal(),i._setupVariables(),i._setupEventHandlers(),i._clockSetup(),i._pickerSetup(),i}return _inherits(f,Component),_createClass(f,[{key:\"destroy\",value:function(){this._removeEventHandlers(),this.modal.destroy(),h(this.modalEl).remove(),this.el.M_Timepicker=void 0}},{key:\"_setupEventHandlers\",value:function(){this._handleInputKeydownBound=this._handleInputKeydown.bind(this),this._handleInputClickBound=this._handleInputClick.bind(this),this._handleClockClickStartBound=this._handleClockClickStart.bind(this),this._handleDocumentClickMoveBound=this._handleDocumentClickMove.bind(this),this._handleDocumentClickEndBound=this._handleDocumentClickEnd.bind(this),this.el.addEventListener(\"click\",this._handleInputClickBound),this.el.addEventListener(\"keydown\",this._handleInputKeydownBound),this.plate.addEventListener(\"mousedown\",this._handleClockClickStartBound),this.plate.addEventListener(\"touchstart\",this._handleClockClickStartBound),h(this.spanHours).on(\"click\",this.showView.bind(this,\"hours\")),h(this.spanMinutes).on(\"click\",this.showView.bind(this,\"minutes\"))}},{key:\"_removeEventHandlers\",value:function(){this.el.removeEventListener(\"click\",this._handleInputClickBound),this.el.removeEventListener(\"keydown\",this._handleInputKeydownBound)}},{key:\"_handleInputClick\",value:function(){this.open()}},{key:\"_handleInputKeydown\",value:function(t){t.which===M.keys.ENTER&&(t.preventDefault(),this.open())}},{key:\"_handleClockClickStart\",value:function(t){t.preventDefault();var e=this.plate.getBoundingClientRect(),i=e.left,n=e.top;this.x0=i+this.options.dialRadius,this.y0=n+this.options.dialRadius,this.moved=!1;var s=f._Pos(t);this.dx=s.x-this.x0,this.dy=s.y-this.y0,this.setHand(this.dx,this.dy,!1),document.addEventListener(\"mousemove\",this._handleDocumentClickMoveBound),document.addEventListener(\"touchmove\",this._handleDocumentClickMoveBound),document.addEventListener(\"mouseup\",this._handleDocumentClickEndBound),document.addEventListener(\"touchend\",this._handleDocumentClickEndBound)}},{key:\"_handleDocumentClickMove\",value:function(t){t.preventDefault();var e=f._Pos(t),i=e.x-this.x0,n=e.y-this.y0;this.moved=!0,this.setHand(i,n,!1,!0)}},{key:\"_handleDocumentClickEnd\",value:function(t){var e=this;t.preventDefault(),document.removeEventListener(\"mouseup\",this._handleDocumentClickEndBound),document.removeEventListener(\"touchend\",this._handleDocumentClickEndBound);var i=f._Pos(t),n=i.x-this.x0,s=i.y-this.y0;this.moved&&n===this.dx&&s===this.dy&&this.setHand(n,s),\"hours\"===this.currentView?this.showView(\"minutes\",this.options.duration/2):this.options.autoClose&&(h(this.minutesView).addClass(\"timepicker-dial-out\"),setTimeout(function(){e.done()},this.options.duration/2)),\"function\"==typeof this.options.onSelect&&this.options.onSelect.call(this,this.hours,this.minutes),document.removeEventListener(\"mousemove\",this._handleDocumentClickMoveBound),document.removeEventListener(\"touchmove\",this._handleDocumentClickMoveBound)}},{key:\"_insertHTMLIntoDOM\",value:function(){this.$modalEl=h(f._template),this.modalEl=this.$modalEl[0],this.modalEl.id=\"modal-\"+this.id;var t=document.querySelector(this.options.container);this.options.container&&t?this.$modalEl.appendTo(t):this.$modalEl.insertBefore(this.el)}},{key:\"_setupModal\",value:function(){var t=this;this.modal=M.Modal.init(this.modalEl,{onOpenStart:this.options.onOpenStart,onOpenEnd:this.options.onOpenEnd,onCloseStart:this.options.onCloseStart,onCloseEnd:function(){\"function\"==typeof t.options.onCloseEnd&&t.options.onCloseEnd.call(t),t.isOpen=!1}})}},{key:\"_setupVariables\",value:function(){this.currentView=\"hours\",this.vibrate=navigator.vibrate?\"vibrate\":navigator.webkitVibrate?\"webkitVibrate\":null,this._canvas=this.modalEl.querySelector(\".timepicker-canvas\"),this.plate=this.modalEl.querySelector(\".timepicker-plate\"),this.hoursView=this.modalEl.querySelector(\".timepicker-hours\"),this.minutesView=this.modalEl.querySelector(\".timepicker-minutes\"),this.spanHours=this.modalEl.querySelector(\".timepicker-span-hours\"),this.spanMinutes=this.modalEl.querySelector(\".timepicker-span-minutes\"),this.spanAmPm=this.modalEl.querySelector(\".timepicker-span-am-pm\"),this.footer=this.modalEl.querySelector(\".timepicker-footer\"),this.amOrPm=\"PM\"}},{key:\"_pickerSetup\",value:function(){var t=h('\").appendTo(this.footer).on(\"click\",this.clear.bind(this));this.options.showClearBtn&&t.css({visibility:\"\"});var e=h('
    ');h('\").appendTo(e).on(\"click\",this.close.bind(this)),h('\").appendTo(e).on(\"click\",this.done.bind(this)),e.appendTo(this.footer)}},{key:\"_clockSetup\",value:function(){this.options.twelveHour&&(this.$amBtn=h('
    AM
    '),this.$pmBtn=h('
    PM
    '),this.$amBtn.on(\"click\",this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm),this.$pmBtn.on(\"click\",this._handleAmPmClick.bind(this)).appendTo(this.spanAmPm)),this._buildHoursView(),this._buildMinutesView(),this._buildSVGClock()}},{key:\"_buildSVGClock\",value:function(){var t=this.options.dialRadius,e=this.options.tickRadius,i=2*t,n=f._createSVGEl(\"svg\");n.setAttribute(\"class\",\"timepicker-svg\"),n.setAttribute(\"width\",i),n.setAttribute(\"height\",i);var s=f._createSVGEl(\"g\");s.setAttribute(\"transform\",\"translate(\"+t+\",\"+t+\")\");var o=f._createSVGEl(\"circle\");o.setAttribute(\"class\",\"timepicker-canvas-bearing\"),o.setAttribute(\"cx\",0),o.setAttribute(\"cy\",0),o.setAttribute(\"r\",4);var a=f._createSVGEl(\"line\");a.setAttribute(\"x1\",0),a.setAttribute(\"y1\",0);var r=f._createSVGEl(\"circle\");r.setAttribute(\"class\",\"timepicker-canvas-bg\"),r.setAttribute(\"r\",e),s.appendChild(a),s.appendChild(r),s.appendChild(o),n.appendChild(s),this._canvas.appendChild(n),this.hand=a,this.bg=r,this.bearing=o,this.g=s}},{key:\"_buildHoursView\",value:function(){var t=h('
    ');if(this.options.twelveHour)for(var e=1;e<13;e+=1){var i=t.clone(),n=e/6*Math.PI,s=this.options.outerRadius;i.css({left:this.options.dialRadius+Math.sin(n)*s-this.options.tickRadius+\"px\",top:this.options.dialRadius-Math.cos(n)*s-this.options.tickRadius+\"px\"}),i.html(0===e?\"00\":e),this.hoursView.appendChild(i[0])}else for(var o=0;o<24;o+=1){var a=t.clone(),r=o/6*Math.PI,l=0'),e=0;e<60;e+=5){var i=t.clone(),n=e/30*Math.PI;i.css({left:this.options.dialRadius+Math.sin(n)*this.options.outerRadius-this.options.tickRadius+\"px\",top:this.options.dialRadius-Math.cos(n)*this.options.outerRadius-this.options.tickRadius+\"px\"}),i.html(f._addLeadingZero(e)),this.minutesView.appendChild(i[0])}}},{key:\"_handleAmPmClick\",value:function(t){var e=h(t.target);this.amOrPm=e.hasClass(\"am-btn\")?\"AM\":\"PM\",this._updateAmPmView()}},{key:\"_updateAmPmView\",value:function(){this.options.twelveHour&&(this.$amBtn.toggleClass(\"text-primary\",\"AM\"===this.amOrPm),this.$pmBtn.toggleClass(\"text-primary\",\"PM\"===this.amOrPm))}},{key:\"_updateTimeFromInput\",value:function(){var t=((this.el.value||this.options.defaultTime||\"\")+\"\").split(\":\");if(this.options.twelveHour&&void 0!==t[1]&&(0','
    ','
    ','
    ','
    ','',\":\",'',\"
    \",'
    ','
    ',\"
    \",\"
    \",\"
    \",'
    ','
    ','
    ','
    ','
    ',\"
    \",'
    ',\"
    \",\"
    \",\"\"].join(\"\"),M.Timepicker=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,\"timepicker\",\"M_Timepicker\")}(cash),function(s){\"use strict\";var e={},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_CharacterCounter=i).options=s.extend({},n.defaults,e),i.isInvalid=!1,i.isValidLength=!1,i._setupCounter(),i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:\"destroy\",value:function(){this._removeEventHandlers(),this.el.CharacterCounter=void 0,this._removeCounter()}},{key:\"_setupEventHandlers\",value:function(){this._handleUpdateCounterBound=this.updateCounter.bind(this),this.el.addEventListener(\"focus\",this._handleUpdateCounterBound,!0),this.el.addEventListener(\"input\",this._handleUpdateCounterBound,!0)}},{key:\"_removeEventHandlers\",value:function(){this.el.removeEventListener(\"focus\",this._handleUpdateCounterBound,!0),this.el.removeEventListener(\"input\",this._handleUpdateCounterBound,!0)}},{key:\"_setupCounter\",value:function(){this.counterEl=document.createElement(\"span\"),s(this.counterEl).addClass(\"character-counter\").css({float:\"right\",\"font-size\":\"12px\",height:1}),this.$el.parent().append(this.counterEl)}},{key:\"_removeCounter\",value:function(){s(this.counterEl).remove()}},{key:\"updateCounter\",value:function(){var t=+this.$el.attr(\"data-length\"),e=this.el.value.length;this.isValidLength=e<=t;var i=e;t&&(i+=\"/\"+t,this._validateInput()),s(this.counterEl).html(i)}},{key:\"_validateInput\",value:function(){this.isValidLength&&this.isInvalid?(this.isInvalid=!1,this.$el.removeClass(\"invalid\")):this.isValidLength||this.isInvalid||(this.isInvalid=!0,this.$el.removeClass(\"valid\"),this.$el.addClass(\"invalid\"))}}],[{key:\"init\",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),\"init\",this).call(this,this,t,e)}},{key:\"getInstance\",value:function(t){return(t.jquery?t[0]:t).M_CharacterCounter}},{key:\"defaults\",get:function(){return e}}]),n}();M.CharacterCounter=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,\"characterCounter\",\"M_CharacterCounter\")}(cash),function(b){\"use strict\";var e={duration:200,dist:-100,shift:0,padding:0,numVisible:5,fullWidth:!1,indicators:!1,noWrap:!1,onCycleTo:null},t=function(t){function i(t,e){_classCallCheck(this,i);var n=_possibleConstructorReturn(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,i,t,e));return(n.el.M_Carousel=n).options=b.extend({},i.defaults,e),n.hasMultipleSlides=1'),n.$el.find(\".carousel-item\").each(function(t,e){if(n.images.push(t),n.showIndicators){var i=b('
  • ');0===e&&i[0].classList.add(\"active\"),n.$indicators.append(i)}}),n.showIndicators&&n.$el.append(n.$indicators),n.count=n.images.length,n.options.numVisible=Math.min(n.count,n.options.numVisible),n.xform=\"transform\",[\"webkit\",\"Moz\",\"O\",\"ms\"].every(function(t){var e=t+\"Transform\";return void 0===document.body.style[e]||(n.xform=e,!1)}),n._setupEventHandlers(),n._scroll(n.offset),n}return _inherits(i,Component),_createClass(i,[{key:\"destroy\",value:function(){this._removeEventHandlers(),this.el.M_Carousel=void 0}},{key:\"_setupEventHandlers\",value:function(){var i=this;this._handleCarouselTapBound=this._handleCarouselTap.bind(this),this._handleCarouselDragBound=this._handleCarouselDrag.bind(this),this._handleCarouselReleaseBound=this._handleCarouselRelease.bind(this),this._handleCarouselClickBound=this._handleCarouselClick.bind(this),void 0!==window.ontouchstart&&(this.el.addEventListener(\"touchstart\",this._handleCarouselTapBound),this.el.addEventListener(\"touchmove\",this._handleCarouselDragBound),this.el.addEventListener(\"touchend\",this._handleCarouselReleaseBound)),this.el.addEventListener(\"mousedown\",this._handleCarouselTapBound),this.el.addEventListener(\"mousemove\",this._handleCarouselDragBound),this.el.addEventListener(\"mouseup\",this._handleCarouselReleaseBound),this.el.addEventListener(\"mouseleave\",this._handleCarouselReleaseBound),this.el.addEventListener(\"click\",this._handleCarouselClickBound),this.showIndicators&&this.$indicators&&(this._handleIndicatorClickBound=this._handleIndicatorClick.bind(this),this.$indicators.find(\".indicator-item\").each(function(t,e){t.addEventListener(\"click\",i._handleIndicatorClickBound)}));var t=M.throttle(this._handleResize,200);this._handleThrottledResizeBound=t.bind(this),window.addEventListener(\"resize\",this._handleThrottledResizeBound)}},{key:\"_removeEventHandlers\",value:function(){var i=this;void 0!==window.ontouchstart&&(this.el.removeEventListener(\"touchstart\",this._handleCarouselTapBound),this.el.removeEventListener(\"touchmove\",this._handleCarouselDragBound),this.el.removeEventListener(\"touchend\",this._handleCarouselReleaseBound)),this.el.removeEventListener(\"mousedown\",this._handleCarouselTapBound),this.el.removeEventListener(\"mousemove\",this._handleCarouselDragBound),this.el.removeEventListener(\"mouseup\",this._handleCarouselReleaseBound),this.el.removeEventListener(\"mouseleave\",this._handleCarouselReleaseBound),this.el.removeEventListener(\"click\",this._handleCarouselClickBound),this.showIndicators&&this.$indicators&&this.$indicators.find(\".indicator-item\").each(function(t,e){t.removeEventListener(\"click\",i._handleIndicatorClickBound)}),window.removeEventListener(\"resize\",this._handleThrottledResizeBound)}},{key:\"_handleCarouselTap\",value:function(t){\"mousedown\"===t.type&&b(t.target).is(\"img\")&&t.preventDefault(),this.pressed=!0,this.dragged=!1,this.verticalDragged=!1,this.reference=this._xpos(t),this.referenceY=this._ypos(t),this.velocity=this.amplitude=0,this.frame=this.offset,this.timestamp=Date.now(),clearInterval(this.ticker),this.ticker=setInterval(this._trackBound,100)}},{key:\"_handleCarouselDrag\",value:function(t){var e=void 0,i=void 0,n=void 0;if(this.pressed)if(e=this._xpos(t),i=this._ypos(t),n=this.reference-e,Math.abs(this.referenceY-i)<30&&!this.verticalDragged)(2=this.dim*(this.count-1)?this.target=this.dim*(this.count-1):this.target<0&&(this.target=0)),this.amplitude=this.target-this.offset,this.timestamp=Date.now(),requestAnimationFrame(this._autoScrollBound),this.dragged&&(t.preventDefault(),t.stopPropagation()),!1}},{key:\"_handleCarouselClick\",value:function(t){if(this.dragged)return t.preventDefault(),t.stopPropagation(),!1;if(!this.options.fullWidth){var e=b(t.target).closest(\".carousel-item\").index();0!==this._wrap(this.center)-e&&(t.preventDefault(),t.stopPropagation()),this._cycleTo(e)}}},{key:\"_handleIndicatorClick\",value:function(t){t.stopPropagation();var e=b(t.target).closest(\".indicator-item\");e.length&&this._cycleTo(e.index())}},{key:\"_handleResize\",value:function(t){this.options.fullWidth?(this.itemWidth=this.$el.find(\".carousel-item\").first().innerWidth(),this.imageHeight=this.$el.find(\".carousel-item.active\").height(),this.dim=2*this.itemWidth+this.options.padding,this.offset=2*this.center*this.itemWidth,this.target=this.offset,this._setCarouselHeight(!0)):this._scroll()}},{key:\"_setCarouselHeight\",value:function(t){var i=this,e=this.$el.find(\".carousel-item.active\").length?this.$el.find(\".carousel-item.active\").first():this.$el.find(\".carousel-item\").first(),n=e.find(\"img\").first();if(n.length)if(n[0].complete){var s=n.height();if(0=this.count?t%this.count:t<0?this._wrap(this.count+t%this.count):t}},{key:\"_track\",value:function(){var t,e,i,n;e=(t=Date.now())-this.timestamp,this.timestamp=t,i=this.offset-this.frame,this.frame=this.offset,n=1e3*i/(1+e),this.velocity=.8*n+.2*this.velocity}},{key:\"_autoScroll\",value:function(){var t=void 0,e=void 0;this.amplitude&&(t=Date.now()-this.timestamp,2<(e=this.amplitude*Math.exp(-t/this.options.duration))||e<-2?(this._scroll(this.target-e),requestAnimationFrame(this._autoScrollBound)):this._scroll(this.target))}},{key:\"_scroll\",value:function(t){var e=this;this.$el.hasClass(\"scrolling\")||this.el.classList.add(\"scrolling\"),null!=this.scrollingTimeout&&window.clearTimeout(this.scrollingTimeout),this.scrollingTimeout=window.setTimeout(function(){e.$el.removeClass(\"scrolling\")},this.options.duration);var i,n,s,o,a=void 0,r=void 0,l=void 0,h=void 0,d=void 0,u=void 0,c=this.center,p=1/this.options.numVisible;if(this.offset=\"number\"==typeof t?t:this.offset,this.center=Math.floor((this.offset+this.dim/2)/this.dim),o=-(s=(n=this.offset-this.center*this.dim)<0?1:-1)*n*2/this.dim,i=this.count>>1,this.options.fullWidth?(l=\"translateX(0)\",u=1):(l=\"translateX(\"+(this.el.clientWidth-this.itemWidth)/2+\"px) \",l+=\"translateY(\"+(this.el.clientHeight-this.itemHeight)/2+\"px)\",u=1-p*o),this.showIndicators){var v=this.center%this.count,f=this.$indicators.find(\".indicator-item.active\");f.index()!==v&&(f.removeClass(\"active\"),this.$indicators.find(\".indicator-item\").eq(v)[0].classList.add(\"active\"))}if(!this.noWrap||0<=this.center&&this.center=this.count||e<0){if(this.noWrap)return;e=this._wrap(e)}this._cycleTo(e)}},{key:\"prev\",value:function(t){(void 0===t||isNaN(t))&&(t=1);var e=this.center-t;if(e>=this.count||e<0){if(this.noWrap)return;e=this._wrap(e)}this._cycleTo(e)}},{key:\"set\",value:function(t,e){if((void 0===t||isNaN(t))&&(t=0),t>this.count||t<0){if(this.noWrap)return;t=this._wrap(t)}this._cycleTo(t,e)}}],[{key:\"init\",value:function(t,e){return _get(i.__proto__||Object.getPrototypeOf(i),\"init\",this).call(this,this,t,e)}},{key:\"getInstance\",value:function(t){return(t.jquery?t[0]:t).M_Carousel}},{key:\"defaults\",get:function(){return e}}]),i}();M.Carousel=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,\"carousel\",\"M_Carousel\")}(cash),function(S){\"use strict\";var e={onOpen:void 0,onClose:void 0},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_TapTarget=i).options=S.extend({},n.defaults,e),i.isOpen=!1,i.$origin=S(\"#\"+i.$el.attr(\"data-target\")),i._setup(),i._calculatePositioning(),i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:\"destroy\",value:function(){this._removeEventHandlers(),this.el.TapTarget=void 0}},{key:\"_setupEventHandlers\",value:function(){this._handleDocumentClickBound=this._handleDocumentClick.bind(this),this._handleTargetClickBound=this._handleTargetClick.bind(this),this._handleOriginClickBound=this._handleOriginClick.bind(this),this.el.addEventListener(\"click\",this._handleTargetClickBound),this.originEl.addEventListener(\"click\",this._handleOriginClickBound);var t=M.throttle(this._handleResize,200);this._handleThrottledResizeBound=t.bind(this),window.addEventListener(\"resize\",this._handleThrottledResizeBound)}},{key:\"_removeEventHandlers\",value:function(){this.el.removeEventListener(\"click\",this._handleTargetClickBound),this.originEl.removeEventListener(\"click\",this._handleOriginClickBound),window.removeEventListener(\"resize\",this._handleThrottledResizeBound)}},{key:\"_handleTargetClick\",value:function(t){this.open()}},{key:\"_handleOriginClick\",value:function(t){this.close()}},{key:\"_handleResize\",value:function(t){this._calculatePositioning()}},{key:\"_handleDocumentClick\",value:function(t){S(t.target).closest(\".tap-target-wrapper\").length||(this.close(),t.preventDefault(),t.stopPropagation())}},{key:\"_setup\",value:function(){this.wrapper=this.$el.parent()[0],this.waveEl=S(this.wrapper).find(\".tap-target-wave\")[0],this.originEl=S(this.wrapper).find(\".tap-target-origin\")[0],this.contentEl=this.$el.find(\".tap-target-content\")[0],S(this.wrapper).hasClass(\".tap-target-wrapper\")||(this.wrapper=document.createElement(\"div\"),this.wrapper.classList.add(\"tap-target-wrapper\"),this.$el.before(S(this.wrapper)),this.wrapper.append(this.el)),this.contentEl||(this.contentEl=document.createElement(\"div\"),this.contentEl.classList.add(\"tap-target-content\"),this.$el.append(this.contentEl)),this.waveEl||(this.waveEl=document.createElement(\"div\"),this.waveEl.classList.add(\"tap-target-wave\"),this.originEl||(this.originEl=this.$origin.clone(!0,!0),this.originEl.addClass(\"tap-target-origin\"),this.originEl.removeAttr(\"id\"),this.originEl.removeAttr(\"style\"),this.originEl=this.originEl[0],this.waveEl.append(this.originEl)),this.wrapper.append(this.waveEl))}},{key:\"_calculatePositioning\",value:function(){var t=\"fixed\"===this.$origin.css(\"position\");if(!t)for(var e=this.$origin.parents(),i=0;i'+t.getAttribute(\"label\")+\"\")[0]),i.each(function(t){var e=n._appendOptionWithIcon(n.$el,t,\"optgroup-option\");n._addOptionToValueDict(t,e)})}}),this.$el.after(this.dropdownOptions),this.input=document.createElement(\"input\"),d(this.input).addClass(\"select-dropdown dropdown-trigger\"),this.input.setAttribute(\"type\",\"text\"),this.input.setAttribute(\"readonly\",\"true\"),this.input.setAttribute(\"data-target\",this.dropdownOptions.id),this.el.disabled&&d(this.input).prop(\"disabled\",\"true\"),this.$el.before(this.input),this._setValueToInput();var t=d('');if(this.$el.before(t[0]),!this.el.disabled){var e=d.extend({},this.options.dropdownOptions);e.onOpenEnd=function(t){var e=d(n.dropdownOptions).find(\".selected\").first();if(e.length&&(M.keyDown=!0,n.dropdown.focusedIndex=e.index(),n.dropdown._focusFocusedItem(),M.keyDown=!1,n.dropdown.isScrollable)){var i=e[0].getBoundingClientRect().top-n.dropdownOptions.getBoundingClientRect().top;i-=n.dropdownOptions.clientHeight/2,n.dropdownOptions.scrollTop=i}},this.isMultiple&&(e.closeOnClick=!1),this.dropdown=M.Dropdown.init(this.input,e)}this._setSelectedStates()}},{key:\"_addOptionToValueDict\",value:function(t,e){var i=Object.keys(this._valueDict).length,n=this.dropdownOptions.id+i,s={};e.id=n,s.el=t,s.optionEl=e,this._valueDict[n]=s}},{key:\"_removeDropdown\",value:function(){d(this.wrapper).find(\".caret\").remove(),d(this.input).remove(),d(this.dropdownOptions).remove(),d(this.wrapper).before(this.$el),d(this.wrapper).remove()}},{key:\"_appendOptionWithIcon\",value:function(t,e,i){var n=e.disabled?\"disabled \":\"\",s=\"optgroup-option\"===i?\"optgroup-option \":\"\",o=this.isMultiple?'\":e.innerHTML,a=d(\"
  • \"),r=d(\"\");r.html(o),a.addClass(n+\" \"+s),a.append(r);var l=e.getAttribute(\"data-icon\");if(l){var h=d('\"\"');a.prepend(h)}return d(this.dropdownOptions).append(a[0]),a[0]}},{key:\"_toggleEntryFromArray\",value:function(t){var e=!this._keysSelected.hasOwnProperty(t),i=d(this._valueDict[t].optionEl);return e?this._keysSelected[t]=!0:delete this._keysSelected[t],i.toggleClass(\"selected\",e),i.find('input[type=\"checkbox\"]').prop(\"checked\",e),i.prop(\"selected\",e),e}},{key:\"_setValueToInput\",value:function(){var i=[];if(this.$el.find(\"option\").each(function(t){if(d(t).prop(\"selected\")){var e=d(t).text();i.push(e)}}),!i.length){var t=this.$el.find(\"option:disabled\").eq(0);t.length&&\"\"===t[0].value&&i.push(t.text())}this.input.value=i.join(\", \")}},{key:\"_setSelectedStates\",value:function(){for(var t in this._keysSelected={},this._valueDict){var e=this._valueDict[t],i=d(e.el).prop(\"selected\");d(e.optionEl).find('input[type=\"checkbox\"]').prop(\"checked\",i),i?(this._activateOption(d(this.dropdownOptions),d(e.optionEl)),this._keysSelected[t]=!0):d(e.optionEl).removeClass(\"selected\")}}},{key:\"_activateOption\",value:function(t,e){e&&(this.isMultiple||t.find(\"li.selected\").removeClass(\"selected\"),d(e).addClass(\"selected\"))}},{key:\"getSelectedValues\",value:function(){var t=[];for(var e in this._keysSelected)t.push(this._valueDict[e].el.value);return t}}],[{key:\"init\",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),\"init\",this).call(this,this,t,e)}},{key:\"getInstance\",value:function(t){return(t.jquery?t[0]:t).M_FormSelect}},{key:\"defaults\",get:function(){return e}}]),n}();M.FormSelect=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,\"formSelect\",\"M_FormSelect\")}(cash),function(s,e){\"use strict\";var i={},t=function(t){function n(t,e){_classCallCheck(this,n);var i=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,n,t,e));return(i.el.M_Range=i).options=s.extend({},n.defaults,e),i._mousedown=!1,i._setupThumb(),i._setupEventHandlers(),i}return _inherits(n,Component),_createClass(n,[{key:\"destroy\",value:function(){this._removeEventHandlers(),this._removeThumb(),this.el.M_Range=void 0}},{key:\"_setupEventHandlers\",value:function(){this._handleRangeChangeBound=this._handleRangeChange.bind(this),this._handleRangeMousedownTouchstartBound=this._handleRangeMousedownTouchstart.bind(this),this._handleRangeInputMousemoveTouchmoveBound=this._handleRangeInputMousemoveTouchmove.bind(this),this._handleRangeMouseupTouchendBound=this._handleRangeMouseupTouchend.bind(this),this._handleRangeBlurMouseoutTouchleaveBound=this._handleRangeBlurMouseoutTouchleave.bind(this),this.el.addEventListener(\"change\",this._handleRangeChangeBound),this.el.addEventListener(\"mousedown\",this._handleRangeMousedownTouchstartBound),this.el.addEventListener(\"touchstart\",this._handleRangeMousedownTouchstartBound),this.el.addEventListener(\"input\",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener(\"mousemove\",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener(\"touchmove\",this._handleRangeInputMousemoveTouchmoveBound),this.el.addEventListener(\"mouseup\",this._handleRangeMouseupTouchendBound),this.el.addEventListener(\"touchend\",this._handleRangeMouseupTouchendBound),this.el.addEventListener(\"blur\",this._handleRangeBlurMouseoutTouchleaveBound),this.el.addEventListener(\"mouseout\",this._handleRangeBlurMouseoutTouchleaveBound),this.el.addEventListener(\"touchleave\",this._handleRangeBlurMouseoutTouchleaveBound)}},{key:\"_removeEventHandlers\",value:function(){this.el.removeEventListener(\"change\",this._handleRangeChangeBound),this.el.removeEventListener(\"mousedown\",this._handleRangeMousedownTouchstartBound),this.el.removeEventListener(\"touchstart\",this._handleRangeMousedownTouchstartBound),this.el.removeEventListener(\"input\",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener(\"mousemove\",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener(\"touchmove\",this._handleRangeInputMousemoveTouchmoveBound),this.el.removeEventListener(\"mouseup\",this._handleRangeMouseupTouchendBound),this.el.removeEventListener(\"touchend\",this._handleRangeMouseupTouchendBound),this.el.removeEventListener(\"blur\",this._handleRangeBlurMouseoutTouchleaveBound),this.el.removeEventListener(\"mouseout\",this._handleRangeBlurMouseoutTouchleaveBound),this.el.removeEventListener(\"touchleave\",this._handleRangeBlurMouseoutTouchleaveBound)}},{key:\"_handleRangeChange\",value:function(){s(this.value).html(this.$el.val()),s(this.thumb).hasClass(\"active\")||this._showRangeBubble();var t=this._calcRangeOffset();s(this.thumb).addClass(\"active\").css(\"left\",t+\"px\")}},{key:\"_handleRangeMousedownTouchstart\",value:function(t){if(s(this.value).html(this.$el.val()),this._mousedown=!0,this.$el.addClass(\"active\"),s(this.thumb).hasClass(\"active\")||this._showRangeBubble(),\"input\"!==t.type){var e=this._calcRangeOffset();s(this.thumb).addClass(\"active\").css(\"left\",e+\"px\")}}},{key:\"_handleRangeInputMousemoveTouchmove\",value:function(){if(this._mousedown){s(this.thumb).hasClass(\"active\")||this._showRangeBubble();var t=this._calcRangeOffset();s(this.thumb).addClass(\"active\").css(\"left\",t+\"px\"),s(this.value).html(this.$el.val())}}},{key:\"_handleRangeMouseupTouchend\",value:function(){this._mousedown=!1,this.$el.removeClass(\"active\")}},{key:\"_handleRangeBlurMouseoutTouchleave\",value:function(){if(!this._mousedown){var t=7+parseInt(this.$el.css(\"padding-left\"))+\"px\";s(this.thumb).hasClass(\"active\")&&(e.remove(this.thumb),e({targets:this.thumb,height:0,width:0,top:10,easing:\"easeOutQuad\",marginLeft:t,duration:100})),s(this.thumb).removeClass(\"active\")}}},{key:\"_setupThumb\",value:function(){this.thumb=document.createElement(\"span\"),this.value=document.createElement(\"span\"),s(this.thumb).addClass(\"thumb\"),s(this.value).addClass(\"value\"),s(this.thumb).append(this.value),this.$el.after(this.thumb)}},{key:\"_removeThumb\",value:function(){s(this.thumb).remove()}},{key:\"_showRangeBubble\",value:function(){var t=-7+parseInt(s(this.thumb).parent().css(\"padding-left\"))+\"px\";e.remove(this.thumb),e({targets:this.thumb,height:30,width:30,top:-30,marginLeft:t,duration:300,easing:\"easeOutQuint\"})}},{key:\"_calcRangeOffset\",value:function(){var t=this.$el.width()-15,e=parseFloat(this.$el.attr(\"max\"))||100,i=parseFloat(this.$el.attr(\"min\"))||0;return(parseFloat(this.$el.val())-i)/(e-i)*t}}],[{key:\"init\",value:function(t,e){return _get(n.__proto__||Object.getPrototypeOf(n),\"init\",this).call(this,this,t,e)}},{key:\"getInstance\",value:function(t){return(t.jquery?t[0]:t).M_Range}},{key:\"defaults\",get:function(){return i}}]),n}();M.Range=t,M.jQueryLoaded&&M.initializeJqueryWrapper(t,\"range\",\"M_Range\"),t.init(s(\"input[type=range]\"))}(cash,M.anime);","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.meiosisSetup = void 0;\nvar setup_1 = require(\"./setup\");\nObject.defineProperty(exports, \"meiosisSetup\", { enumerable: true, get: function () { return setup_1.meiosisSetup; } });\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.meiosisSetup = void 0;\nconst simple_stream_1 = require(\"./simple-stream\");\nconst util_1 = require(\"./util\");\nconst mergerino_1 = __importDefault(require(\"mergerino\"));\nconst assoc = (prop, value, target) => {\n target[prop] = value;\n return target;\n};\nconst concatIfPresent = (target, source) => source ? target.concat(source) : target;\nconst assembleInitialState = (nestedComponents) => nestedComponents\n ? Object.keys(nestedComponents).reduce((result, key) => assoc(key, Object.assign({}, nestedComponents[key].initial, assembleInitialState(nestedComponents[key].nested)), result), {})\n : {};\nconst getInitialState = (app) => Object.assign({}, app.initial, assembleInitialState(app.nested));\nconst assembleView = (nestedComponents) => nestedComponents\n ? Object.keys(nestedComponents).reduce((result, key) => {\n const nestedApp = nestedComponents[key];\n if (nestedApp.view !== undefined) {\n const view = nestedApp.view;\n return assoc(key, {\n view: (cell, ...args) => view(cell.nest(key), ...args),\n nested: assembleView(nestedApp.nested)\n }, result);\n }\n return result;\n }, {})\n : {};\nconst getView = (app) => assembleView(app.nested);\nconst assembleServices = (nestedComponents, getCell = (cell) => cell, getState = (state) => state) => nestedComponents\n ? Object.keys(nestedComponents).reduce((result, key) => {\n var _a;\n const nextGetCell = (cell) => getCell(cell).nest(key);\n const nextGetState = (state) => getState(state)[key];\n const nestedApp = nestedComponents[key];\n return concatIfPresent(result, (_a = nestedApp.services) === null || _a === void 0 ? void 0 : _a.map((service) => ({\n onchange: (state) => (service.onchange ? service.onchange(nextGetState(state)) : state),\n run: (cell) => service.run(nextGetCell(cell))\n }))).concat(assembleServices(nestedApp.nested, nextGetCell, nextGetState));\n }, [])\n : [];\nconst getServices = (app) => concatIfPresent([], app.services).concat(assembleServices(app.nested));\nconst baseSetup = ({ stream, app }) => {\n if (!stream) {\n stream = simple_stream_1.simpleStream;\n }\n const safeApp = app || {};\n const initial = getInitialState(safeApp);\n const view = getView(safeApp);\n const createStream = typeof stream === 'function' ? stream : stream.stream;\n const scan = stream.scan;\n const update = createStream();\n const states = scan((state, patch) => (0, mergerino_1.default)(state, patch), initial, update);\n return {\n states,\n update,\n view\n };\n};\nconst nestPatch = (patch, prop) => ({ [prop]: patch });\nconst nestUpdate = (parentUpdate, prop) => (patch) => parentUpdate(nestPatch(patch, prop));\nconst nestCell = (states, parentUpdate, components) => (prop) => {\n const nestedStates = states.map((state) => state[prop]);\n const getNestedState = () => states()[prop];\n const nestedUpdate = nestUpdate(parentUpdate, prop);\n const nestedComponents = (0, util_1.get)(components, [prop, 'nested']);\n return {\n states: nestedStates,\n state: getNestedState(),\n getState: getNestedState,\n update: nestedUpdate,\n nest: nestCell(nestedStates, nestedUpdate, nestedComponents),\n nested: nestedComponents\n };\n};\n/**\n * Helper to setup the Meiosis pattern with [Mergerino](https://github.com/fuzetsu/mergerino).\n *\n * @template S the State type.\n *\n * @param config the Meiosis config for use with Mergerino\n *\n * @returns a stream of Meiosis cells.\n */\nconst meiosisSetup = (config) => {\n const stream = config === null || config === void 0 ? void 0 : config.stream;\n const app = config === null || config === void 0 ? void 0 : config.app;\n const { states, update, view } = baseSetup({\n stream,\n app\n });\n const nest = nestCell(states, update, view);\n const getState = () => states();\n const getCell = (state) => ({ states, state, getState, update, nest, nested: view });\n const dropRepeats = (0, simple_stream_1.createDropRepeats)(stream);\n if (app) {\n getServices(app).forEach((service) => {\n dropRepeats(states, service.onchange).map((state) => service.run(getCell(state)));\n });\n }\n const cells = dropRepeats(states).map(getCell);\n return cells;\n};\nexports.meiosisSetup = meiosisSetup;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.dropRepeats = exports.createDropRepeats = exports.simpleStream = exports.scan = exports.stream = void 0;\n/**\n * Creates a stream.\n *\n * @template T the type of the stream's values.\n *\n * @param initial the stream's initial value.\n *\n * @returns the created stream.\n */\nconst stream = (initial) => {\n const mapFunctions = [];\n let latestValue = initial;\n const createdStream = function (value) {\n if (arguments.length > 0 && !createdStream.ended) {\n latestValue = value;\n for (const i in mapFunctions) {\n // credit @cmnstmntmn for discovering this bug.\n // Make sure to send the latest value.\n // Otherwise, if f1 triggers another update, f2 will be called with value2 and\n // then value1 (old value).\n mapFunctions[i](latestValue);\n }\n }\n return latestValue;\n };\n createdStream.map = (mapFunction) => {\n const newStream = (0, exports.stream)();\n const mappedFunction = (value) => {\n newStream(mapFunction(value));\n };\n mapFunctions.push(mappedFunction);\n newStream.end = (_value) => {\n const idx = mapFunctions.indexOf(mappedFunction);\n newStream.ended = true;\n mapFunctions.splice(idx, 1);\n };\n if (latestValue !== undefined) {\n newStream(mapFunction(latestValue));\n }\n return newStream;\n };\n createdStream.end = (_value) => {\n createdStream.ended = true;\n };\n return createdStream;\n};\nexports.stream = stream;\n/**\n * Creates a new stream that starts with the initial value and, for each value arriving onto the\n * source stream, emits the result of calling the accumulator function with the latest result and\n * the source stream value.\n */\nconst scan = (accumulator, initial, sourceStream) => {\n const newStream = (0, exports.stream)(initial);\n let accumulated = initial;\n sourceStream.map((value) => {\n accumulated = accumulator(accumulated, value);\n newStream(accumulated);\n });\n return newStream;\n};\nexports.scan = scan;\nexports.simpleStream = {\n stream: exports.stream,\n scan: exports.scan\n};\n/**\n * Credit: James Forbes (https://james-forbes.com/)\n *\n * Creates a `dropRepeats` function, which returns new stream that drops repeated values from the\n * source stream.\n *\n * @param stream the stream library, defaults to simpleStream.\n */\nconst createDropRepeats = (stream = exports.simpleStream) => \n/**\n * @param source the source stream.\n * @param onchange function that receives the current state of the source stream and returns the\n * value for which changes will emit onto the returned stream.\n * @returns a stream that does not emit repeated values.\n */\n(source, onchange = (state) => state) => {\n const createStream = typeof stream === 'function' ? stream : stream.stream;\n let prev = undefined;\n const result = createStream();\n source.map((state) => {\n const next = onchange(state);\n if (next !== prev) {\n prev = next;\n result(state);\n }\n });\n return result;\n};\nexports.createDropRepeats = createDropRepeats;\n/**\n * `dropRepeats` function that uses `simpleStream`.\n */\nexports.dropRepeats = (0, exports.createDropRepeats)();\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.updateFormFloatValue = exports.updateFormIntValue = exports.updateFormValue = exports.get = void 0;\n/**\n * Safely gets a property path from an object. The path is an array. If any property along the path\n * is `undefined`, the function returns `undefined`.\n *\n * @param object the object on which to get the property.\n * @param path the property path.\n *\n * @returns the property value, or `undefined` if any property along the path is `undefined`.\n */\nconst get = (object, path) => path.reduce((obj, key) => (obj == undefined ? undefined : obj[key]), object);\nexports.get = get;\nconst intoPath = (path, value) => ({\n [path[0]]: path.length === 1 ? value : intoPath(path.slice(1), value)\n});\nconst toPath = (pathOrProp) => Array.isArray(pathOrProp) ? pathOrProp : [pathOrProp];\nconst updateParseValue = (parseFn, cell, path) => (evt) => {\n const value = parseFn(evt.currentTarget.value);\n if (!isNaN(value)) {\n cell.update(intoPath(toPath(path), value));\n }\n};\n/**\n * Convenience function to update a form value. Pass the Meiosis cell and the state property (such\n * as `'firstName'`) or path (such as `['person', 'firstName']`) into which to update the value.\n * Returns a function that you can pass to a DOM handler, such as `oninput` (Mithril) or `onInput`\n * (Preact, React). For example:\n *\n * ```js\n * // Using Mithil\n * m('input[type=text]', { oninput: updateFormValue(cell, 'firstName') })\n *\n * // Using Preact/React\n * \n * ```\n *\n * @param cell the Meiosis cell.\n * @param path the property or path into which to update the value.\n * @param fn (optional) a function to modify the value before updating it.\n *\n * @returns a function that accepts a DOM event and updates the value on the Meiosis state.\n */\nconst updateFormValue = (cell, path, fn = (value) => value) => (evt) => cell.update(intoPath(toPath(path), fn(evt.currentTarget.value)));\nexports.updateFormValue = updateFormValue;\n/**\n * Convenience function to update a form value with an Integer value. If the user input does not\n * return a number with `parseInt`, no state change occurs. Pass the Meiosis cell and the state\n * property (such as `'counter'`) or path (such as `['book', 'counter']`) into which to update the\n * value. Returns a function that you can pass to a DOM handler, such as `oninput` (Mithril) or\n * `onInput` (Preact, React). For example:\n *\n * ```js\n * // Using Mithil\n * m('input[type=text]', { oninput: updateFormIntValue(cell, 'counter') })\n *\n * // Using Preact/React\n * \n * ```\n *\n * @param cell the Meiosis cell.\n * @param path the property or path into which to update the value.\n *\n * @returns a function that accepts a DOM event and updates the value on the Meiosis state.\n */\nconst updateFormIntValue = (cell, path) => (evt) => updateParseValue(parseInt, cell, path)(evt);\nexports.updateFormIntValue = updateFormIntValue;\n/**\n * Convenience function to update a form value with a Float value. If the user input does not return\n * a number with `parseFloat`, no state change occurs. Pass the Meiosis cell and the state property\n * (such as `'pH'`) or path (such as `['water', 'pH']`) into which to update the value. Returns a\n * function that you can pass to a DOM handler, such as `oninput` (Mithril) or `onInput` (Preact,\n * React). For example:\n *\n * ```js\n * // Using Mithil\n * m('input[type=text]', { oninput: updateFormFloatValue(cell, 'pH') })\n *\n * // Using Preact/React\n * \n * ```\n *\n * @param cell the Meiosis cell.\n * @param path the property or path into which to update the value.\n *\n * @returns a function that accepts a DOM event and updates the value on the Meiosis state.\n */\nconst updateFormFloatValue = (cell, path) => (evt) => updateParseValue(parseFloat, cell, path)(evt);\nexports.updateFormFloatValue = updateFormFloatValue;\n","const e=Object.assign||((e,t)=>(t&&Object.keys(t).forEach(o=>e[o]=t[o]),e)),t=(e,r,s)=>{const c=typeof s;if(s&&\"object\"===c)if(Array.isArray(s))for(const o of s)r=t(e,r,o);else for(const c of Object.keys(s)){const f=s[c];\"function\"==typeof f?r[c]=f(r[c],o):void 0===f?e&&!isNaN(c)?r.splice(c,1):delete r[c]:null===f||\"object\"!=typeof f||Array.isArray(f)?r[c]=f:\"object\"==typeof r[c]?r[c]=f===r[c]?f:o(r[c],f):r[c]=t(!1,{},f)}else\"function\"===c&&(r=s(r,o));return r},o=(o,...r)=>{const s=Array.isArray(o);return t(s,s?o.slice():e({},o),r)};export default o;\n//# sourceMappingURL=mergerino.min.js.map","import e from\"mithril\";const t=()=>\"idxxxxxxxx\".replace(/[x]/g,()=>(16*Math.random()|0).toString(16)),a=()=>\"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return(\"x\"===e?t:3&t|8).toString(16)}),i=(...e)=>t=>e.reduceRight((e,t)=>t(e),t),l=e=>t=>Array.prototype.map.call(t,e),o=e=>t=>Array.prototype.join.call(t,e),n=e=>e.replace(/([A-Z])/g,e=>\"-\"+e.toLowerCase()),s=e=>e?i(o(\"\"),l(t=>`[${n(t)}=\"${((e=\"\")=>e.toString().replace(/\"/g,\""\"))(e[t])}\"]`),Object.keys)(e):\"\",r=[\"min\",\"max\",\"minLength\",\"maxLength\",\"rows\",\"cols\",\"placeholder\",\"autocomplete\",\"pattern\",\"readOnly\",\"step\"],c=e=>r.indexOf(e)>=0,d=({disabled:e})=>e?\"[disabled]\":\"\",p=({required:e,isMandatory:t})=>e||t?\"[required][aria-required=true]\":\"\",m=e=>(e=>{const t=(a=e,e=>void 0!==a[e]);var a;return Object.keys(e).filter(c).filter(t).reduce((t,a)=>{const i=e[a];return t.push(`[${a.toLowerCase()}=${i}]`),t},[]).join(\"\")})(e)+(e=>e.maxLength?`[data-length=${e.maxLength}]`:\"\")(e)+d(e)+p(e)+(({autofocus:e})=>\"boolean\"==typeof e&&e||e&&e()?\"[autofocus]\":\"\")(e),u=e=>!isNaN(parseFloat(e))&&isFinite(e),h=(...e)=>t=>e.reduce((e,t)=>t(e),t),v=(e,t=2,a=\"0\")=>(e+=\"\").length>=t?e:new Array(t-e.length+1).join(a)+e,b=(e,t,a)=>{const i=e[t];e[t]=e[a],e[a]=i},g=(e,t,a)=>{const i=e[t];e.splice(t,1),e.splice(a,0,i)};function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(l[a]=e[a]);return l}const w=[\"label\",\"id\",\"isMandatory\",\"isActive\"],x={view:({attrs:t})=>e(\"span.mandatory\",t,\"*\")},k=()=>({view:t=>{let{attrs:{label:a,id:i,isMandatory:l,isActive:o}}=t,n=f(t.attrs,w);return a?e(`label${o?\".active\":\"\"}${i?`[for=${i}]`:\"\"}`,n,[e.trust(a),l?e(x):void 0]):void 0}}),N=()=>({view:({attrs:{helperText:t,dataError:a,dataSuccess:i,className:l}})=>t||a||i?e(\"span.helper-text\",{className:l,dataError:a,dataSuccess:i},t?e.trust(t):\"\"):void 0}),$=()=>{const a={id:t()};return{view:({attrs:t})=>{const i=t.id||a.id,l=m(t),{label:o,helperText:n,initialValue:s,onchange:r,newRow:c,className:d=\"col s12\",style:p,iconName:u,isMandatory:h}=t;return e(\".input-field\"+(c?\".clear\":\"\"),{className:c?d+\" clear\":d,style:p},[u?e(\"i.material-icons.prefix\",u):\"\",e(`input.autocomplete[type=text][tabindex=0]${l}`,{id:i,oncreate:({dom:e})=>{M.Autocomplete.init(e,t)},onchange:r?e=>{e.target&&e.target.value&&r(e.target.value)}:void 0,value:s}),e(k,{label:o,id:i,isMandatory:h,isActive:s}),e(N,{helperText:n})])}}},C=[\"iconName\"],I=()=>({view:t=>{let{attrs:{iconName:a}}=t,i=f(t.attrs,C);return e(\"i.material-icons\",i,a)}}),T=[\"modalId\",\"tooltip\",\"tooltipPostion\",\"iconName\",\"iconClass\",\"label\",\"attr\"],A=(t,a=\"\")=>()=>{const i=`${t}${a}`;return{view:({attrs:t})=>{const{modalId:a,tooltip:l,tooltipPostion:o,iconName:n,iconClass:r,label:c,attr:d}=t,p=f(t,T);return e(`${i}${a?`.modal-trigger[href=#${a}]`:\"\"}${l?`.tooltipped[data-position=${o||\"top\"}][data-tooltip=${l}]`:\"\"}${s(d)}`,p,n?e(I,{iconName:n,className:r||\"left\"}):void 0,c||void 0)}}},O=A(\"a.waves-effect.waves-light.btn\",\"[type=button]\"),V=A(\"a.waves-effect.waves-light.btn-large\",\"[type=button]\"),S=A(\"a.waves-effect.waves-light.btn-small\",\"[type=button]\"),R=A(\"a.waves-effect.waves-teal.btn-flat\",\"[type=button]\"),L=A(\"button.btn-floating.btn-large.waves-effect.waves-light\",\"[type=button]\"),j=A(\"button.btn.waves-effect.waves-light\",\"[type=submit]\"),E=()=>({view:({attrs:{href:t,src:a}})=>e(\"a.carousel-item\",{href:t},e(`img[src=${a}]`))}),F=()=>({view:({attrs:t})=>{const{items:a}=t;return a&&a.length>0?e(\".carousel\",{oncreate:({dom:e})=>{M.Carousel.init(e,t)}},a.map(t=>e(E,t))):void 0}}),D=()=>({oncreate:({attrs:e,dom:t})=>{const{onchange:a,onChipAdd:i,onChipDelete:l}=e,o=M.Chips.getInstance(t.children[0]),n=i?i.bind(o):void 0;e.onChipAdd=function(e,t){a&&a(this.chipsData),n&&n(e,t)};const s=l?l.bind(o):void 0;e.onChipDelete=function(e,t){a&&a(this.chipsData),s&&s(e,t)},M.Chips.init(t.children[0],e)},onupdate:({dom:e,attrs:{data:t}})=>{if(!t||0===t.length)return;const a=M.Chips.getInstance(e.children[0]);t.forEach(e=>a.addChip(e))},view:({attrs:{placeholder:t,required:a,isMandatory:i=a,data:l,className:o=\"col s12\",label:n,helperText:s}})=>e(\".input-field\",{className:o},[e(`.chips.chips-autocomplete${t?\".chips-placeholder\":\"\"}${l?\".chips-initial\":\"\"}`),n?e(k,{label:n,isMandatory:i,className:\"active\"}):void 0,s?e(N,{helperText:s}):void 0])}),K=()=>({view:({attrs:t})=>{const{newRow:a,code:i,language:l}=t,o=l||\"lang-TypeScript\",n=o.replace(\"lang-\",\"\"),s=i instanceof Array?i.join(\"\\n\"):i;return e(\"pre.codeblock\"+(a?\".clear\":\"\"),t,[e(\"div\",e(\"label\",n)),e(`code.${o}`,s)])}}),B=()=>({view:({attrs:{header:t,body:a,active:i,iconName:l}})=>e(i?\"li.active\":\"li\",[t||l?e(\".collapsible-header\",[l?e(\"i.material-icons\",l):void 0,t?\"string\"==typeof t?e(\"span\",t):t:void 0]):void 0,a?e(\".collapsible-body\",a):void 0])}),_=()=>({oncreate:({dom:e,attrs:t})=>{M.Collapsible.init(e,t)},view:({attrs:t})=>{const{items:a,class:i,className:l,style:o,id:n}=t;return a&&a.length>0?e(\"ul.collapsible\",{class:i||l,style:o,id:n},a.map(t=>e(B,t))):void 0}}),H=[\"header\",\"items\",\"mode\"],z=[\"title\",\"active\",\"href\"],P=[\"items\",\"header\"],q=[\"items\",\"header\",\"mode\"];var U;!function(e){e[e.BASIC=0]=\"BASIC\",e[e.LINKS=1]=\"LINKS\",e[e.AVATAR=2]=\"AVATAR\"}(U||(U={}));const W=e=>e&&/https?:\\/\\//.test(e),Y=()=>({view:({attrs:t})=>{const{href:a,iconName:i=\"send\",onclick:l,style:o={cursor:\"pointer\"}}=t,n={href:a,style:o,className:\"secondary-content\",onclick:l?()=>l(t):void 0};return W(a)||!a?e(\"a[target=_]\",n,e(I,{iconName:i})):e(e.route.Link,n,e(I,{iconName:i}))}}),Z=(e=\"\")=>/\\./.test(e),G=()=>({view:({attrs:{item:t,mode:a}})=>{const{title:i,content:l=\"\",active:o,iconName:n,avatar:s,className:r,onclick:c}=t;return a===U.AVATAR?e(\"li.collection-item.avatar\"+(o?\".active\":\"\"),{onclick:c?()=>c(t):void 0},[Z(s)?e(\"img.circle\",{src:s}):e(\"i.material-icons.circle\",{className:r},s),e(\"span.title\",i),e(\"p\",e.trust(l)),e(Y,t)]):e(\"li.collection-item\"+(o?\".active\":\"\"),n?e(\"div\",[i,e(Y,t)]):i)}}),J=()=>({view:t=>{let{attrs:{header:a,items:i,mode:l=U.BASIC}}=t,o=f(t.attrs,H);const n=i.map(t=>e(G,{key:t.id,item:t,mode:l}));return a?e(\"ul.collection.with-header\",o,[e(\"li.collection-header\",e(\"h4\",a)),n]):e(\"ul.collection\",o,n)}}),Q=()=>({view:({attrs:{item:t}})=>{const{title:a,active:i,href:l}=t,o=y({},f(t,z),{className:\"collection-item \"+(i?\"active\":\"\"),href:l});return W(l)||!l?e(\"a[target=_]\",o,a):e(e.route.Link,o,a)}}),X=()=>({view:t=>{let{attrs:{items:a,header:i}}=t,l=f(t.attrs,P);return i?e(\".collection.with-header\",l,[e(\".collection-header\",e(\"h4\",i)),a.map(t=>e(Q,{key:t.id,item:t}))]):e(\".collection\",l,a.map(t=>e(Q,{key:t.id,item:t})))}}),ee=()=>({view:t=>{let{attrs:{items:a,header:i,mode:l=U.BASIC}}=t,o=f(t.attrs,q);return i||a&&a.length>0?l===U.LINKS?e(X,y({header:i,items:a},o)):e(J,y({header:i,items:a,mode:l},o)):void 0}}),te=[\"key\",\"label\",\"onchange\",\"disabled\",\"items\",\"iconName\",\"helperText\",\"style\",\"className\"],ae=()=>{const a={};return{oninit:({attrs:{id:e=t(),initialValue:i,checkedId:l}})=>{a.id=e,a.initialValue=i||l},view:t=>{let{attrs:{key:i,label:l,onchange:o,disabled:n=!1,items:s,iconName:r,helperText:c,style:d,className:p=\"col s12\"}}=t,m=f(t.attrs,te);const{id:u,initialValue:h}=a,v=h?s.filter(e=>e.id?e.id===h:e.label===h).shift():void 0,b=v?v.label:l||\"Select\";return e(\".input-field\",{className:p,key:i,style:d},[r?e(\"i.material-icons.prefix\",r):void 0,e(N,{helperText:c}),e(`a.dropdown-trigger.btn.truncate[href=#][data-target=${u}]${n?\"[disabled]\":\"\"}`,{className:\"col s12\",style:d||(r?\"margin: 0.2em 0 0 3em;\":void 0),oncreate:({dom:e})=>{M.Dropdown.init(e,m)}},b),e(`ul.dropdown-content[id=${u}]`,s.map(t=>e(\"li\"+(t.divider?\".divider[tabindex=-1]\":\"\"),t.divider?void 0:e(\"a\",{onclick:o?()=>{a.initialValue=t.id||t.label,o(a.initialValue)}:void 0},[t.iconName?e(\"i.material-icons\",t.iconName):void 0,t.label]))))])}}},ie=[\"className\",\"iconName\",\"iconClass\",\"position\",\"style\",\"buttons\"],le=()=>({view:t=>{let{attrs:{className:a,iconName:i,iconClass:l=\"large\",position:o,style:n=(\"left\"===o||\"inline-left\"===o?\"position: absolute; display: inline-block; left: 24px;\":\"right\"===o||\"inline-right\"===o?\"position: absolute; display: inline-block; right: 24px;\":void 0),buttons:s}}=t,r=f(t.attrs,ie);const c=e(\".fixed-action-btn\",{style:n,oncreate:({dom:e})=>M.FloatingActionButton.init(e,r)},[e(\"a.btn-floating.btn-large\",{className:a},e(\"i.material-icons\",{classNames:l},i)),s?e(\"ul\",s.map(t=>e(\"li\",e(\"a.btn-floating\",{className:t.className,onclick:e=>t.onClick&&t.onClick(e)},e(\"i.material-icons\",{className:t.iconClass},t.iconName))))):void 0]);return\"inline-right\"===o||\"inline-left\"===o?e(\"div\",{style:\"position: relative; height: 70px;\"},c):c}}),oe=[\"className\",\"helperText\",\"iconName\",\"id\",\"initialValue\",\"isMandatory\",\"label\",\"onchange\",\"onkeydown\",\"onkeypress\",\"onkeyup\",\"onblur\",\"style\"],ne=[\"className\",\"dataError\",\"dataSuccess\",\"helperText\",\"iconName\",\"id\",\"initialValue\",\"isMandatory\",\"label\",\"maxLength\",\"newRow\",\"onchange\",\"onkeydown\",\"onkeypress\",\"onkeyup\",\"onblur\",\"style\",\"validate\"],se=()=>{const a={id:t()};return{view:({attrs:t})=>{const{className:i=\"col s12\",helperText:l,iconName:o,id:n=a.id,initialValue:s,isMandatory:r,label:c,onchange:d,onkeydown:p,onkeypress:u,onkeyup:h,onblur:v,style:b}=t,g=f(t,oe),y=m(g);return e(\".input-field\",{className:i,style:b},[o?e(\"i.material-icons.prefix\",o):\"\",e(`textarea.materialize-textarea[tabindex=0][id=${n}]${y}`,{oncreate:({dom:e})=>{M.textareaAutoResize(e),t.maxLength&&M.CharacterCounter.init(e)},onchange:d?e=>{const t=e.target;d(t&&\"string\"==typeof t.value?t.value:\"\")}:void 0,value:s,onkeyup:h?e=>{h(e,e.target.value)}:void 0,onkeydown:p?e=>{p(e,e.target.value)}:void 0,onkeypress:u?e=>{u(e,e.target.value)}:void 0,onblur:v}),e(k,{label:c,id:n,isMandatory:r,isActive:s||t.placeholder}),e(N,{helperText:l})])}}},re=(a,i=\"\")=>()=>{const l={id:t()},o=e=>{const t=e.value;return!t||\"number\"!==a&&\"range\"!==a?t:+t},n=(e,t)=>{e.setCustomValidity(\"boolean\"==typeof t?t?\"\":\"Custom validation failed\":t)};return{view:({attrs:t})=>{const{className:s=\"col s12\",dataError:r,dataSuccess:c,helperText:d,iconName:p,id:u=l.id,initialValue:h,isMandatory:v,label:b,maxLength:g,newRow:y,onchange:w,onkeydown:x,onkeypress:$,onkeyup:C,onblur:I,style:T,validate:A}=t,O=f(t,ne),V=m(O);return e(`.input-field${y?\".clear\":\"\"}${i}`,{className:s,style:T},[p?e(\"i.material-icons.prefix\",p):void 0,e(`input.validate[type=${a}][tabindex=0][id=${u}]${V}`,{oncreate:({dom:e})=>{(({autofocus:e})=>!!e&&(\"boolean\"==typeof e?e:e()))(t)&&e.focus(),g&&M.CharacterCounter.init(e),\"range\"===a&&M.Range.init(e)},onkeyup:C?e=>{C(e,o(e.target))}:void 0,onkeydown:x?e=>{x(e,o(e.target))}:void 0,onkeypress:$?e=>{$(e,o(e.target))}:void 0,onblur:I,onupdate:A?({dom:e})=>{const t=e;n(t,A(o(t),t))}:void 0,onchange:e=>{const t=e.target;if(t){const e=o(t);w&&w(e),A&&n(t,A(e,t))}},value:h}),e(k,{label:b,id:u,isMandatory:v,isActive:!(void 0===h&&!t.placeholder&&\"number\"!==a&&\"color\"!==a&&\"range\"!==a)}),e(N,{helperText:d,dataError:r,dataSuccess:c})])}}},ce=re(\"text\"),de=re(\"password\"),pe=re(\"number\"),me=re(\"url\"),ue=re(\"color\"),he=re(\"range\",\".range-field\"),ve=re(\"email\"),be=()=>{let t,a=!1;return{view:({attrs:i})=>{const{multiple:l,disabled:o,initialValue:n,placeholder:s,onchange:r,className:c=\"col s12\",accept:d,label:p=\"File\"}=i,m=d?d instanceof Array?d.join(\", \"):d:void 0,u=m?`[accept=${m}]`:\"\",h=l?\"[multiple]\":\"\",v=o?\"[disabled]\":\"\",b=s?`[placeholder=${s}]`:\"\";return e(\".file-field.input-field\",{className:i.class||c},[e(\".btn\",[e(\"span\",p),e(`input[type=file]${h}${v}${u}`,{onchange:r?e=>{const t=e.target;t&&t.files&&r&&(a=!0,r(t.files))}:void 0})]),e(\".file-path-wrapper\",e(`input.file-path.validate${b}[type=text]`,{oncreate:({dom:e})=>{t=e,n&&(t.value=n)}})),(a||n)&&e(\"a.waves-effect.waves-teal.btn-flat\",{style:\"float: right;position: relative;top: -3rem; padding: 0\",onclick:()=>{a=!1,t.value=\"\",r&&r({})}},e(\"i.material-icons\",\"clear\"))])}}},ge=()=>({view:({attrs:{className:t=\"col s12\",onchange:a,label:i,checked:l,disabled:o,description:n,style:s}})=>e(\"div\",{className:t,style:s},e(\"label\",[e(\"input[type=checkbox][tabindex=0]\",{checked:l,disabled:o,onclick:a?e=>{e.target&&void 0!==e.target.checked&&a(e.target.checked)}:void 0}),i?\"string\"==typeof i?e(\"span\",i):i:void 0]),n&&e(N,{className:\"input-checkbox-desc\",helperText:n}))}),ye=()=>{const t={},a=e=>t.checkedIds.indexOf(e)>=0;return{oninit:({attrs:{initialValue:e,checkedId:a}})=>{const i=a||e;t.checkedId=a,t.checkedIds=i?i instanceof Array?[...i]:[i]:[]},view:({attrs:{label:i,id:l,options:o,checkedId:n,description:s,className:r=\"col s12\",style:c,disabled:d,checkboxClass:p,newRow:m,isMandatory:u,onchange:h}})=>{n&&t.checkedId!==n&&(t.checkedId=n,t.checkedIds=n instanceof Array?n:[n]);const v=h?(e,a)=>{const i=t.checkedIds.filter(t=>t!==e);a&&i.push(e),t.checkedIds=i,h(i)}:void 0;return e(\"div\"+(m?\".clear\":\"\"),{className:r,style:c},[e(\"div\",{className:\"input-field options\"},e(k,{id:l,label:i,isMandatory:u})),e(N,{helperText:s}),...o.map(t=>e(ge,{disabled:d||t.disabled,label:t.label,onchange:v?e=>v(t.id,e):void 0,className:t.className||p,checked:a(t.id),description:t.description}))])}}},fe=()=>{const a=e=>i.curKey=i.id=e,i={elementId:t(),id:\"\",curKey:\"\",kvc:(t,a,i)=>{const{keyClass:l=\".col.s4\",valueClass:o=\".col.s8\"}=i,n=a instanceof Array?a.join(\", \"):\"boolean\"==typeof a?e(ge,{label:\" \",checked:a,disabled:!0,className:\"checkbox-in-collection\"}):a.toString();return{title:e(\".row\",{style:\"margin-bottom: 0\"},[e(l,e(\"b\",t)),e(o,n)])}}},l=()=>{i.id=\"\",i.curKey=\"\"};return{oninit:({attrs:{keyValueConverter:e,id:t}})=>{e&&(i.kvc=e),t&&(i.elementId=t)},view:({attrs:{className:t=\"col s12\",disabled:o,disallowArrays:n,header:s,iconName:r,iconNameKey:c=(r?\"label\":void 0),isMandatory:d,label:p,labelKey:m=\"Key\",labelValue:u=\"Value\",properties:h,keyClass:v,valueClass:b,onchange:g,falsy:y=[\"false\"],truthy:f=[\"true\"]}})=>{const w=()=>g?g(h):void 0,x=((e,t)=>Object.keys(e).map(t=>({key:t,value:e[t]})).map(e=>((e,t)=>{const l=t.onclick;return t.id=t.id||e,t.active=e===i.curKey,t.onclick=l?()=>a(e)&&l(t):()=>a(e),t})(e.key,i.kvc(e.key,e.value,{keyClass:t.keyClass,valueClass:t.valueClass}))))(h,{keyClass:v,valueClass:b}),N=i.curKey,$=h[N],C=\"boolean\"==typeof $||\"number\"==typeof $?$:$?$ instanceof Array?`[${$.join(\", \")}]`:$:\"\",M=i.elementId;return[e(\".map-editor\",e(\".input-field\",{className:t,style:\"min-height: 1.5em;\"},[r?e(\"i.material-icons.prefix\",r):\"\",e(k,{label:p,isMandatory:d,isActive:x.length>0}),e(ee,{id:M,items:x,mode:U.LINKS,header:s})])),o?void 0:[e(ce,{label:m,iconName:c,className:\"col s5\",initialValue:N,onchange:e=>{i.curKey=e,i.id&&(delete h[i.id],h[e]=$,i.id=e),w()}}),\"string\"==typeof C?e(se,{label:u,initialValue:C,className:\"col s7\",onchange:e=>{const t=(i=y,f.indexOf(a=e)>=0||!(i.indexOf(a)>=0)&&void 0);var a,i;const l=void 0===t&&/^\\s*\\d+\\s*$/i.test(e)?+e:void 0;h[N]=\"boolean\"==typeof t?t:\"number\"==typeof l?l:((e,t=!1)=>{if(t)return e;if(!e)return;const a=/\\s*\\[(.*)\\]\\s*/gi.exec(e);return a&&2===a.length?a[1].split(\",\").map(e=>e.trim()).map(e=>/^\\d+$/g.test(e)?+e:e):void 0})(e,n)||e,w()}}):\"number\"==typeof C?e(pe,{label:u,initialValue:C,className:\"col s7\",onchange:e=>{h[N]=e,w()}}):e(ge,{label:u,checked:C,className:\"input-field col s7\",onchange:e=>{h[N]=e,w()}}),e(\".col.s12.right-align\",[e(R,{iconName:\"add\",onclick:l}),e(R,{iconName:\"delete\",disabled:!N,onclick:()=>{delete h[N],l(),w()}})])]]}}},we=()=>({oncreate:({dom:e,attrs:t})=>{M.Materialbox.init(e,t)},view:({attrs:t})=>{const{src:a,width:i,height:l}=t;return e(`img.materialboxed[src=${a}]${i?`[width=${i}]`:\"\"}${l?`[height=${l}]`:\"\"}`,t)}}),xe=()=>({oncreate:({dom:e,attrs:{options:t,onCreate:a}})=>{const i=M.Modal.init(e,t);a&&a(i)},view:({attrs:{id:t,title:a,description:i,fixedFooter:l,bottomSheet:o,buttons:n,richContent:s}})=>e(`.modal${l?\".modal-fixed-footer\":\"\"}${o?\".bottom-sheet\":\"\"}[id=${t}]`,[e(\".modal-content\",[e(\"h4\",a),s&&\"string\"==typeof i?e.trust(i||\"\"):\"string\"==typeof i?e(\"p\",i):i]),n?e(\".modal-footer\",n.map(t=>e(R,y({},t,{className:\"modal-close\"})))):void 0])}),ke=()=>({view:({attrs:{title:t,href:a,active:i,disabled:l}})=>e(\"li\",{className:i?\"active\":l?\"disabled\":\"waves-effect\"},\"number\"==typeof t?e(e.route.Link,{href:a},t):t)}),Ne=()=>{const t={pagIndex:0};return{view:({attrs:{items:a,curPage:i=1,size:l=Math.min(9,a.length)}})=>{const{pagIndex:o}=t,n=o*l,s=n+l,r=o>0,c=sr&&t.pagIndex--},e(\"i.material-icons\",\"chevron_left\")),disabled:!r},...a.filter((e,t)=>n<=t&&tc&&t.pagIndex++},e(\"i.material-icons\",\"chevron_right\")),disabled:!c}];return e(\"ul.pagination\",d.map((t,a)=>e(ke,y({title:n+a},t,{active:n+a===i}))))}}},$e=()=>({oncreate:({dom:e,attrs:t})=>{M.Parallax.init(e,t)},view:({attrs:{src:t}})=>t?e(\".parallax-container\",e(\".parallax\",e(`img[src=${t}]`))):void 0}),Ce=[\"label\",\"helperText\",\"initialValue\",\"newRow\",\"className\",\"iconName\",\"isMandatory\",\"onchange\",\"disabled\"],Me=[\"label\",\"helperText\",\"initialValue\",\"newRow\",\"className\",\"iconName\",\"isMandatory\",\"onchange\",\"disabled\"],Ie=()=>{const a={id:t()};return{view:t=>{let{attrs:{label:i,helperText:l,initialValue:o,newRow:n,className:s=\"col s12\",iconName:r,isMandatory:c,onchange:d,disabled:p}}=t,u=f(t.attrs,Ce);const h=a.id,v=m(u),b=d?()=>a.dp&&d(a.dp.date):void 0;return e(\".input-field\"+(n?\".clear\":\"\"),{className:s,onremove:()=>a.dp&&a.dp.destroy()},[r?e(\"i.material-icons.prefix\",r):\"\",e(`input.datepicker[type=text][tabindex=0][id=${h}]${v}${p?\"[disabled]\":\"\"}`,{oncreate:({dom:e})=>{a.dp=M.Datepicker.init(e,y({format:\"yyyy/mm/dd\",showClearBtn:!0,setDefaultDate:!0,defaultDate:o?new Date(o):new Date},u,{onClose:b}))}}),e(k,{label:i,id:h,isMandatory:c,isActive:!!o}),e(N,{helperText:l})])}}},Te=()=>{const a={id:t()};return{view:t=>{let{attrs:{label:i,helperText:l,initialValue:o,newRow:n,className:s=\"col s12\",iconName:r,isMandatory:c,onchange:d,disabled:p}}=t,u=f(t.attrs,Me);const h=a.id,v=m(u),b=n?\".clear\":\"\",g=new Date,w=d?()=>a.tp&&d(a.tp.time||o||`${g.getHours()}:${g.getMinutes()}`):void 0;return e(`.input-field.timepicker${b}`,{className:s,onremove:()=>a.tp&&a.tp.destroy()},[r?e(\"i.material-icons.prefix\",r):\"\",e(`input[type=text][tabindex=0][id=${h}]${v}${p?\"[disabled]\":\"\"}`,{value:o,oncreate:({dom:e})=>{a.tp=M.Timepicker.init(e,y({twelveHour:!1,showClearBtn:!0,defaultTime:o},u,{onCloseEnd:w}))}}),e(k,{label:i,id:h,isMandatory:c,isActive:o}),e(N,{helperText:l})])}}},Ae=()=>({view:({attrs:{id:t,groupId:a,label:i,onchange:l,className:o=\"col s12\",checked:n,disabled:s}})=>e(\"div\",{className:o},e(\"label\",[e(`input[type=radio][tabindex=0][name=${a}]${n?\"[checked=checked]\":\"\"}${s?\"[disabled]\":\"\"}`,{onclick:l?()=>l(t):void 0}),e(\"span\",e.trust(i))]))}),Oe=()=>{const a={groupId:t()};return{oninit:({attrs:{checkedId:e,initialValue:t}})=>{a.oldCheckedId=e,a.checkedId=e||t},view:({attrs:{id:t,checkedId:i,newRow:l,className:o=\"col s12\",label:n=\"\",disabled:s,description:r,options:c,isMandatory:d,checkboxClass:p,onchange:m}})=>{a.oldCheckedId!==i&&(a.oldCheckedId=a.checkedId=i);const{groupId:u,checkedId:h}=a,v=e=>{a.checkedId=e,m&&m(e)};return l&&(o+=\" clear\"),e(\"div\",{id:t,className:o},[e(\"div\",{className:\"input-field options\"},e(k,{id:t,label:n,isMandatory:d})),r?e(\"p.helper-text\",e.trust(r)):\"\",...c.map(t=>e(Ae,y({},t,{onchange:v,groupId:u,disabled:s,className:p,checked:t.id===h})))])}}},Ve=()=>{const t={},a=e=>e.map(e=>e.id).join(\"\"),i=(e,t,a=!1)=>a||(t instanceof Array&&(e||\"number\"==typeof e)?t.indexOf(e)>=0:t===e);return{oninit:({attrs:{checkedId:e,initialValue:i,options:l}})=>{t.ids=a(l);const o=e||i;t.checkedId=e instanceof Array?[...e]:e,t.initialValue=null!=o?o instanceof Array?o.filter(e=>null!=e):[o]:[]},view:({attrs:{id:l,newRow:o,className:n=\"col s12\",checkedId:s,key:r,options:c,multiple:d,label:p,helperText:m,placeholder:h=\"\",isMandatory:v,iconName:b,disabled:g,classes:y=\"\",dropdownOptions:f,onchange:w}})=>{t.checkedId!==s&&(t.initialValue=s?s instanceof Array?s:[s]:void 0);const{initialValue:x}=t,$=w?d?()=>{const e=t.instance&&t.instance.getSelectedValues(),a=e?e.length>0&&u(e[0])?e.map(e=>+e):e.filter(e=>null!==e||void 0!==e):void 0;t.initialValue=a||[],w(t.initialValue)}:e=>{if(e&&e.currentTarget){const a=e.currentTarget,i=u(a.value)?+a.value:a.value;t.initialValue=void 0!==typeof i?[i]:[]}t.initialValue&&w(t.initialValue)}:void 0;o&&(n+=\" clear\");const C=!c.some(e=>i(e.id,x)),I=c.reduce((e,t)=>(t.group&&e.indexOf(t.group)<0&&e.push(t.group),e),[]);return e(\".input-field.select-space\",{className:n,key:r,oncreate:d?({dom:e})=>t.wrapper=e:void 0},[b&&e(\"i.material-icons.prefix\",b),e(\"select\",{id:l,title:p,disabled:g,multiple:d,oncreate:({dom:e})=>{t.instance=M.FormSelect.init(e,{classes:y,dropdownOptions:f})},onupdate:({dom:e})=>{if(d){const e=b?1:0;!t.inputEl&&t.wrapper&&t.wrapper.childNodes&&t.wrapper.childNodes.length>0&&t.wrapper.childNodes[e].childNodes&&t.wrapper.childNodes[e].childNodes[0]&&(t.inputEl=t.wrapper.childNodes[e].childNodes[0]),t.inputEl&&t.inputEl.value&&t.inputEl.value.startsWith(`${h}, `)&&(t.inputEl.value=t.inputEl.value.replace(`${h}, `,\"\"))}const i=a(c);let l=s&&t.checkedId!==s.toString();t.ids!==i&&(t.ids=i,l=!0),(t.checkedId instanceof Array&&s instanceof Array?t.checkedId.join()!==s.join():t.checkedId!==s)&&(t.checkedId=s,l=!0),l&&(t.instance=M.FormSelect.init(e,{classes:y,dropdownOptions:f}))},onchange:$},e(\"option\",{value:\"\",disabled:!0,selected:!!C||void 0},h),0===I.length?c.map((t,a)=>{var l;return e(\"option\",{value:t.id,title:t.title||void 0,disabled:t.disabled?\"true\":void 0,\"data-icon\":t.img||void 0,selected:i(t.id,x,0===a&&C&&!h)},null==(l=t.label)?void 0:l.replace(\"&\",\"&\"))}):I.map(t=>e(\"optgroup\",{label:t},c.filter(e=>e.group===t).map((t,a)=>{var l;return e(\"option\",{value:t.id,title:t.title||void 0,disabled:t.disabled?\"true\":void 0,\"data-icon\":t.img||void 0,selected:i(t.id,x,0===a&&C&&!h)},null==(l=t.label)?void 0:l.replace(\"&\",\"&\"))})))),e(k,{label:p,isMandatory:v}),m&&e(N,{helperText:m})])}}},Se=[\"label\",\"left\",\"right\",\"disabled\",\"newRow\",\"onchange\",\"checked\",\"isMandatory\",\"className\"],Re=()=>{const a={id:t()};return{view:({attrs:t})=>{const i=t.id||a.id,{label:l,left:o,right:n,disabled:s,newRow:r,onchange:c,checked:p,isMandatory:m,className:u=\"col s12\"}=t,h=f(t,Se);return e(\"div\"+(r?\".clear\":\"\"),{className:u},[l?e(k,{label:l||\"\",id:i,isMandatory:m}):void 0,e(\".switch\",h,e(\"label\",[o||\"Off\",e(`input[id=${i}][type=checkbox]${d({disabled:s})}${p?\"[checked]\":\"\"}`,{onclick:c?e=>{e.target&&void 0!==e.target.checked&&c(e.target.checked)}:void 0}),e(\"span.lever\"),n||\"On\"]))])}}},Le=()=>{const t={},a=(e,t)=>t||e.replace(/ /g,\"\").toLowerCase();return{view:({attrs:{tabWidth:i,selectedTabId:l,tabs:o,className:n,style:s,duration:r,onShow:c,swipeable:d,responsiveThreshold:p}})=>{const m=o.filter(e=>e.active).shift(),u=l||(m?a(m.title,m.id):\"\");return e(\".row\",[e(\".col.s12\",e(\"ul.tabs\"+(\"fill\"===i?\".tabs-fixed-width\":\"\"),{className:n,style:s,oncreate:({dom:e})=>{t.instance=M.Tabs.init(e,{duration:r,onShow:c,responsiveThreshold:p,swipeable:d})},onupdate:()=>{if(u){const e=document.getElementById(`tab_${u}`);e&&e.click()}},onremove:()=>t.instance.destroy()},o.map(({className:t,title:l,id:n,active:s,disabled:r,target:c,href:d})=>e(`li.tab${r?\".disabled\":\"\"}${\"fixed\"===i?`.col.s${Math.floor(12/o.length)}`:\"\"}`,{className:t},e(`a[id=tab_${a(l,n)}]${s?\".active\":\"\"}`,{target:c,href:d||`#${a(l,n)}`},l))))),o.filter(({href:e})=>void 0===e).map(({id:t,title:i,vnode:l,contentClass:o})=>e(`.col.s12[id=${a(i,t)}]`,{className:o},l))])}}},je=()=>({view:({attrs:{id:t,title:a,datetime:i,active:l,content:o,iconName:n,dateFormatter:s,timeFormatter:r,onSelect:c}})=>e(`li${l?\".active\":\"\"}${t?`[id=${t}]`:\"\"}`,{onclick:c?()=>c({id:t,title:a,datetime:i,active:l,content:o}):void 0,style:c?\"cursor: pointer;\":void 0},[e(\".mm_time\",{datetime:i},[e(\"span\",s(i)),e(\"span\",r(i))]),n?e(\".mm_icon\",e(\"i.material-icons\",n)):void 0,e(\".mm_label\",[a?\"string\"==typeof a?e(\"h5\",a):a:void 0,o?\"string\"==typeof o?e(\"p\",o):o:void 0])])}),Ee=()=>{const t=e=>`${e.getUTCDate()}/${e.getUTCMonth()+1}/${e.getUTCFullYear()}`,a=e=>`${v(e.getUTCHours())}:${v(e.getUTCMinutes())}`;return{view:({attrs:{items:i,onSelect:l,timeFormatter:o=a,dateFormatter:n=t}})=>e(\"ul.mm_timeline\",i.map(t=>e(je,y({onSelect:l,dateFormatter:n,timeFormatter:o},t))))}},Fe=()=>{const t={isOpen:!1,selectedOptions:[],searchTerm:\"\",options:[],inputRef:null,dropdownRef:null},a=a=>{const i=a.target;t.inputRef&&t.inputRef.contains(i)?(t.isOpen=!t.isOpen,e.redraw()):t.dropdownRef&&!t.dropdownRef.contains(i)&&(t.isOpen=!1,e.redraw())};return{oninit:({attrs:{options:e=[],initialValue:a=[]}})=>{t.options=e,t.selectedOptions=e.filter(e=>a.includes(e.id))},oncreate(){document.addEventListener(\"click\",a)},onremove(){document.removeEventListener(\"click\",a)},view({attrs:{onchange:a,className:i,placeholder:l,label:o,maxHeight:n=\"25rem\"}}){const s=t.options.filter(e=>(e.label||e.id.toString()).toLowerCase().includes((t.searchTerm||\"\").toLowerCase())&&!t.selectedOptions.some(t=>t.id===e.id));return e(\".multi-select-dropdown.input-field\",{className:i},[e(\"label\",{class:l||t.selectedOptions.length>0?\"active\":\"\"},o),e(\".dropdown-trigger\",{oncreate:({dom:e})=>{t.inputRef=e},style:{borderBottom:\"2px solid #d1d5db\",display:\"flex\",justifyContent:\"space-between\",alignItems:\"center\",cursor:\"pointer\"}},[e(\".selected-options\",{style:{display:\"flex\",flexWrap:\"wrap\",minHeight:\"50px\",paddingTop:\"12px\"}},0===t.selectedOptions.length?[e(\"span\",l)]:t.selectedOptions.map(i=>e(\".chip\",[i.label,e(\"button\",{onclick:l=>{l.stopPropagation(),(i=>{t.selectedOptions=t.selectedOptions.filter(e=>e.id!==i.id),a&&a(t.selectedOptions.map(e=>e.id)),e.redraw()})(i)},style:{marginLeft:\"0.25rem\",background:\"none\",border:\"none\",cursor:\"pointer\"}},\"×\")]))),e(\"svg.caret\",{class:\"caret\",height:\"24\",viewBox:\"0 0 24 24\",width:\"24\",xmlns:\"http://www.w3.org/2000/svg\"},[e(\"path\",{d:\"M7 10l5 5 5-5z\"}),e(\"path\",{d:\"M0 0h24v24H0z\",fill:\"none\"})])]),t.isOpen&&e(\".dropdown-menu\",{oncreate:({dom:e})=>{t.dropdownRef=e},onremove:()=>{t.dropdownRef=null},style:{position:\"absolute\",width:\"98%\",marginTop:\"0.4rem\"}},[e(\"ul.dropdown-content.select-dropdown\",{style:{maxHeight:n,opacity:1,display:\"block\",width:\"100%\"}},e(\"li\",e(\".search-input\",{style:{padding:\"0 16px\"}},[e(\"input\",{type:\"text\",placeholder:\"Search options...\",value:t.searchTerm||\"\",oninput:a=>{t.searchTerm=a.target.value,e.redraw()},style:{width:\"100%\",outline:\"none\",fontSize:\"0.875rem\"}})])),0===s.length?[e(\"li\",{style:{padding:\"0.5rem\",textAlign:\"center\",color:\"#9ca3af\"}},\"No options found\")]:s.map(i=>e(\"li\",{onclick:()=>i.disabled?void 0:(i=>{t.selectedOptions=t.selectedOptions.some(e=>e.id===i.id)?t.selectedOptions.filter(e=>e.id!==i.id):[...t.selectedOptions,i],t.searchTerm=\"\",a&&a(t.selectedOptions.map(e=>e.id)),e.redraw()})(i),class:i.disabled?\"disabled\":void 0,style:{display:\"flex\",alignItems:\"center\",cursor:\"pointer\",lineHeight:\"22px\",padding:\"14px 16px\"}},[e(\"input\",{type:\"checkbox\",checked:t.selectedOptions.some(e=>e.id===i.id),style:{marginRight:\"0.5rem\"}}),i.label])))])])}}};export{Q as AnchorItem,$ as Autocomplete,O as Button,A as ButtonFactory,F as Carousel,E as CarouselItem,D as Chips,K as CodeBlock,_ as Collapsible,B as CollapsibleItem,ee as Collection,U as CollectionMode,ue as ColorInput,Ie as DatePicker,ae as Dropdown,ve as EmailInput,be as FileInput,R as FlatButton,le as FloatingActionButton,N as HelperText,I as Icon,ge as InputCheckbox,k as Label,V as LargeButton,G as ListItem,x as Mandatory,fe as MapEditor,we as MaterialBox,xe as ModalPanel,pe as NumberInput,ye as Options,Ne as Pagination,$e as Parallax,de as PasswordInput,Ae as RadioButton,Oe as RadioButtons,he as RangeInput,L as RoundIconButton,Fe as SearchSelect,Y as SecondaryContent,Ve as Select,S as SmallButton,j as SubmitButton,Re as Switch,Le as Tabs,se as TextArea,ce as TextInput,Te as TimePicker,Ee as Timeline,me as UrlInput,n as camelToSnake,i as compose,d as disable,u as isNumeric,o as join,l as map,g as move,v as padLeft,h as pipe,p as req,b as swap,s as toAttributeString,m as toAttrs,t as uniqueId,a as uuid4};\n//# sourceMappingURL=index.modern.js.map\n","import e from\"mithril\";import{render as t}from\"slimdown-js\";export{addRule,render}from\"slimdown-js\";const a=()=>\"idxxxxxxxx\".replace(/[x]/g,()=>(16*Math.random()|0).toString(16)),i=[\"min\",\"max\",\"minLength\",\"maxLength\",\"rows\",\"cols\",\"placeholder\",\"autocomplete\",\"pattern\",\"readOnly\",\"step\"],n=e=>i.indexOf(e)>=0,o=({disabled:e})=>e?\"[disabled]\":\"\",r=e=>(e=>{const t=(a=e,e=>void 0!==a[e]);var a;return Object.keys(e).filter(n).filter(t).reduce((t,a)=>{const i=e[a];return t.push(`[${a.toLowerCase()}=${i}]`),t},[]).join(\"\")})(e)+(e=>e.maxLength?`[data-length=${e.maxLength}]`:\"\")(e)+o(e)+(({required:e,isMandatory:t})=>e||t?\"[required][aria-required=true]\":\"\")(e)+(({autofocus:e})=>\"boolean\"==typeof e&&e||e&&e()?\"[autofocus]\":\"\")(e),l=e=>!isNaN(parseFloat(e))&&isFinite(e);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(n[a]=e[a]);return n}const d=[\"label\",\"id\",\"isMandatory\",\"isActive\"],p={view:({attrs:t})=>e(\"span.mandatory\",t,\"*\")},u=()=>({view:t=>{let{attrs:{label:a,id:i,isMandatory:n,isActive:o}}=t,r=c(t.attrs,d);return a?e(`label${o?\".active\":\"\"}${i?`[for=${i}]`:\"\"}`,r,[e.trust(a),n?e(p):void 0]):void 0}}),m=()=>({view:({attrs:{helperText:t,dataError:a,dataSuccess:i,className:n}})=>t||a||i?e(\"span.helper-text\",{className:n,dataError:a,dataSuccess:i},t?e.trust(t):\"\"):void 0}),h=()=>{const t={id:a()};return{view:({attrs:a})=>{const i=a.id||t.id,n=r(a),{label:o,helperText:l,initialValue:s,onchange:c,newRow:d,className:p=\"col s12\",style:h,iconName:f,isMandatory:g}=a;return e(\".input-field\"+(d?\".clear\":\"\"),{className:d?p+\" clear\":p,style:h},[f?e(\"i.material-icons.prefix\",f):\"\",e(`input.autocomplete[type=text][tabindex=0]${n}`,{id:i,oncreate:({dom:e})=>{M.Autocomplete.init(e,a)},onchange:c?e=>{e.target&&e.target.value&&c(e.target.value)}:void 0,value:s}),e(u,{label:o,id:i,isMandatory:g,isActive:s}),e(m,{helperText:l})])}}},f=[\"iconName\"],g=()=>({view:t=>{let{attrs:{iconName:a}}=t,i=c(t.attrs,f);return e(\"i.material-icons\",i,a)}}),b=[\"modalId\",\"tooltip\",\"tooltipPostion\",\"iconName\",\"iconClass\",\"label\",\"attr\"],y=(t,a=\"\")=>()=>{const i=`${t}${a}`;return{view:({attrs:t})=>{const{modalId:a,tooltip:n,tooltipPostion:o,iconName:r,iconClass:l,label:s,attr:d}=t,p=c(t,b);return e(`${i}${a?`.modal-trigger[href=#${a}]`:\"\"}${n?`.tooltipped[data-position=${o||\"top\"}][data-tooltip=${n}]`:\"\"}${(e=>e?((...e)=>t=>e.reduceRight((e,t)=>t(e),t))(e=>Array.prototype.join.call(e,\"\"),(e=>t=>Array.prototype.map.call(t,e))(t=>`[${(e=>e.replace(/([A-Z])/g,e=>\"-\"+e.toLowerCase()))(t)}=\"${((e=\"\")=>e.toString().replace(/\"/g,\""\"))(e[t])}\"]`),Object.keys)(e):\"\")(d)}`,p,r?e(g,{iconName:r,className:l||\"left\"}):void 0,s||void 0)}}},v=y(\"a.waves-effect.waves-teal.btn-flat\",\"[type=button]\"),w=y(\"button.btn-floating.btn-large.waves-effect.waves-light\",\"[type=button]\"),x=()=>({oncreate:({attrs:e,dom:t})=>{const{onchange:a,onChipAdd:i,onChipDelete:n}=e,o=M.Chips.getInstance(t.children[0]),r=i?i.bind(o):void 0;e.onChipAdd=function(e,t){a&&a(this.chipsData),r&&r(e,t)};const l=n?n.bind(o):void 0;e.onChipDelete=function(e,t){a&&a(this.chipsData),l&&l(e,t)},M.Chips.init(t.children[0],e)},onupdate:({dom:e,attrs:{data:t}})=>{if(!t||0===t.length)return;const a=M.Chips.getInstance(e.children[0]);t.forEach(e=>a.addChip(e))},view:({attrs:{placeholder:t,required:a,isMandatory:i=a,data:n,className:o=\"col s12\",label:r,helperText:l}})=>e(\".input-field\",{className:o},[e(`.chips.chips-autocomplete${t?\".chips-placeholder\":\"\"}${n?\".chips-initial\":\"\"}`),r?e(u,{label:r,isMandatory:i,className:\"active\"}):void 0,l?e(m,{helperText:l}):void 0])}),k=()=>({view:({attrs:{header:t,body:a,active:i,iconName:n}})=>e(i?\"li.active\":\"li\",[t||n?e(\".collapsible-header\",[n?e(\"i.material-icons\",n):void 0,t?\"string\"==typeof t?e(\"span\",t):t:void 0]):void 0,a?e(\".collapsible-body\",a):void 0])}),N=()=>({oncreate:({dom:e,attrs:t})=>{M.Collapsible.init(e,t)},view:({attrs:t})=>{const{items:a,class:i,className:n,style:o,id:r}=t;return a&&a.length>0?e(\"ul.collapsible\",{class:i||n,style:o,id:r},a.map(t=>e(k,t))):void 0}});var $;!function(e){e[e.BASIC=0]=\"BASIC\",e[e.LINKS=1]=\"LINKS\",e[e.AVATAR=2]=\"AVATAR\"}($||($={}));const I=[\"className\",\"helperText\",\"iconName\",\"id\",\"initialValue\",\"isMandatory\",\"label\",\"onchange\",\"onkeydown\",\"onkeypress\",\"onkeyup\",\"onblur\",\"style\"],O=[\"className\",\"dataError\",\"dataSuccess\",\"helperText\",\"iconName\",\"id\",\"initialValue\",\"isMandatory\",\"label\",\"maxLength\",\"newRow\",\"onchange\",\"onkeydown\",\"onkeypress\",\"onkeyup\",\"onblur\",\"style\",\"validate\"],A=()=>{const t={id:a()};return{view:({attrs:a})=>{const{className:i=\"col s12\",helperText:n,iconName:o,id:l=t.id,initialValue:s,isMandatory:d,label:p,onchange:h,onkeydown:f,onkeypress:g,onkeyup:b,onblur:y,style:v}=a,w=c(a,I),x=r(w);return e(\".input-field\",{className:i,style:v},[o?e(\"i.material-icons.prefix\",o):\"\",e(`textarea.materialize-textarea[tabindex=0][id=${l}]${x}`,{oncreate:({dom:e})=>{M.textareaAutoResize(e),a.maxLength&&M.CharacterCounter.init(e)},onchange:h?e=>{const t=e.target;h(t&&\"string\"==typeof t.value?t.value:\"\")}:void 0,value:s,onkeyup:b?e=>{b(e,e.target.value)}:void 0,onkeydown:f?e=>{f(e,e.target.value)}:void 0,onkeypress:g?e=>{g(e,e.target.value)}:void 0,onblur:y}),e(u,{label:p,id:l,isMandatory:d,isActive:s||a.placeholder}),e(m,{helperText:n})])}}},D=(t,i=\"\")=>()=>{const n={id:a()},o=e=>{const a=e.value;return!a||\"number\"!==t&&\"range\"!==t?a:+a},l=(e,t)=>{e.setCustomValidity(\"boolean\"==typeof t?t?\"\":\"Custom validation failed\":t)};return{view:({attrs:a})=>{const{className:s=\"col s12\",dataError:d,dataSuccess:p,helperText:h,iconName:f,id:g=n.id,initialValue:b,isMandatory:y,label:v,maxLength:w,newRow:x,onchange:k,onkeydown:N,onkeypress:$,onkeyup:I,onblur:A,style:D,validate:S}=a,T=c(a,O),C=r(T);return e(`.input-field${x?\".clear\":\"\"}${i}`,{className:s,style:D},[f?e(\"i.material-icons.prefix\",f):void 0,e(`input.validate[type=${t}][tabindex=0][id=${g}]${C}`,{oncreate:({dom:e})=>{(({autofocus:e})=>!!e&&(\"boolean\"==typeof e?e:e()))(a)&&e.focus(),w&&M.CharacterCounter.init(e),\"range\"===t&&M.Range.init(e)},onkeyup:I?e=>{I(e,o(e.target))}:void 0,onkeydown:N?e=>{N(e,o(e.target))}:void 0,onkeypress:$?e=>{$(e,o(e.target))}:void 0,onblur:A,onupdate:S?({dom:e})=>{const t=e;l(t,S(o(t),t))}:void 0,onchange:e=>{const t=e.target;if(t){const e=o(t);k&&k(e),S&&l(t,S(e,t))}},value:b}),e(u,{label:v,id:g,isMandatory:y,isActive:!(void 0===b&&!a.placeholder&&\"number\"!==t&&\"color\"!==t&&\"range\"!==t)}),e(m,{helperText:h,dataError:d,dataSuccess:p})])}}},S=D(\"text\"),T=D(\"number\"),C=D(\"url\"),V=D(\"color\"),j=D(\"email\"),L=()=>{let t,a=!1;return{view:({attrs:i})=>{const{multiple:n,disabled:o,initialValue:r,placeholder:l,onchange:s,className:c=\"col s12\",accept:d,label:p=\"File\"}=i,u=d?d instanceof Array?d.join(\", \"):d:void 0,m=u?`[accept=${u}]`:\"\",h=n?\"[multiple]\":\"\",f=o?\"[disabled]\":\"\",g=l?`[placeholder=${l}]`:\"\";return e(\".file-field.input-field\",{className:i.class||c},[e(\".btn\",[e(\"span\",p),e(`input[type=file]${h}${f}${m}`,{onchange:s?e=>{const t=e.target;t&&t.files&&s&&(a=!0,s(t.files))}:void 0})]),e(\".file-path-wrapper\",e(`input.file-path.validate${g}[type=text]`,{oncreate:({dom:e})=>{t=e,r&&(t.value=r)}})),(a||r)&&e(\"a.waves-effect.waves-teal.btn-flat\",{style:\"float: right;position: relative;top: -3rem; padding: 0\",onclick:()=>{a=!1,t.value=\"\",s&&s({})}},e(\"i.material-icons\",\"clear\"))])}}},R=()=>({view:({attrs:{className:t=\"col s12\",onchange:a,label:i,checked:n,disabled:o,description:r}})=>e(\"div\",{className:t},e(\"label\",[e(\"input[type=checkbox][tabindex=0]\",{checked:n,disabled:o,onclick:a?e=>{e.target&&void 0!==e.target.checked&&a(e.target.checked)}:void 0}),i?\"string\"==typeof i?e(\"span\",i):i:void 0]),r&&e(m,{className:\"input-checkbox-desc\",helperText:r}))}),P=()=>{const t={},a=e=>t.checkedIds.indexOf(e)>=0;return{oninit:({attrs:{initialValue:e,checkedId:a}})=>{const i=a||e;t.checkedId=a,t.checkedIds=i?i instanceof Array?[...i]:[i]:[]},view:({attrs:{label:i,id:n,options:o,checkedId:r,description:l,className:s=\"col s12\",disabled:c,checkboxClass:d,newRow:p,isMandatory:h,onchange:f}})=>{r&&t.checkedId!==r&&(t.checkedId=r,t.checkedIds=r instanceof Array?r:[r]);const g=f?(e,a)=>{const i=t.checkedIds.filter(t=>t!==e);a&&i.push(e),t.checkedIds=i,f(i)}:void 0;return e(\"div\"+(p?\".clear\":\"\"),{className:s},[e(\"div\",{className:\"input-field options\"},e(u,{id:n,label:i,isMandatory:h})),e(m,{helperText:l}),...o.map(t=>e(R,{disabled:c||t.disabled,label:t.label,onchange:g?e=>g(t.id,e):void 0,className:t.className||d,checked:a(t.id),description:t.description}))])}}},E=()=>({oncreate:({dom:e,attrs:{options:t,onCreate:a}})=>{const i=M.Modal.init(e,t);a&&a(i)},view:({attrs:{id:t,title:a,description:i,fixedFooter:n,bottomSheet:o,buttons:r,richContent:l}})=>e(`.modal${n?\".modal-fixed-footer\":\"\"}${o?\".bottom-sheet\":\"\"}[id=${t}]`,[e(\".modal-content\",[e(\"h4\",a),l&&\"string\"==typeof i?e.trust(i||\"\"):\"string\"==typeof i?e(\"p\",i):i]),r?e(\".modal-footer\",r.map(t=>e(v,s({},t,{className:\"modal-close\"})))):void 0])}),F=()=>({view:({attrs:{title:t,href:a,active:i,disabled:n}})=>e(\"li\",{className:i?\"active\":n?\"disabled\":\"waves-effect\"},\"number\"==typeof t?e(e.route.Link,{href:a},t):t)}),_=()=>{const t={pagIndex:0};return{view:({attrs:{items:a,curPage:i=1,size:n=Math.min(9,a.length)}})=>{const{pagIndex:o}=t,r=o*n,l=r+n,c=o>0,d=lc&&t.pagIndex--},e(\"i.material-icons\",\"chevron_left\")),disabled:!c},...a.filter((e,t)=>r<=t&&td&&t.pagIndex++},e(\"i.material-icons\",\"chevron_right\")),disabled:!d}];return e(\"ul.pagination\",p.map((t,a)=>e(F,s({title:r+a},t,{active:r+a===i}))))}}},H=[\"label\",\"helperText\",\"initialValue\",\"newRow\",\"className\",\"iconName\",\"isMandatory\",\"onchange\",\"disabled\"],U=[\"label\",\"helperText\",\"initialValue\",\"newRow\",\"className\",\"iconName\",\"isMandatory\",\"onchange\",\"disabled\"],q=()=>{const t={id:a()};return{view:a=>{let{attrs:{label:i,helperText:n,initialValue:o,newRow:l,className:d=\"col s12\",iconName:p,isMandatory:h,onchange:f,disabled:g}}=a,b=c(a.attrs,H);const y=t.id,v=r(b),w=f?()=>t.dp&&f(t.dp.date):void 0;return e(\".input-field\"+(l?\".clear\":\"\"),{className:d,onremove:()=>t.dp&&t.dp.destroy()},[p?e(\"i.material-icons.prefix\",p):\"\",e(`input.datepicker[type=text][tabindex=0][id=${y}]${v}${g?\"[disabled]\":\"\"}`,{oncreate:({dom:e})=>{t.dp=M.Datepicker.init(e,s({format:\"yyyy/mm/dd\",showClearBtn:!0,setDefaultDate:!0,defaultDate:o?new Date(o):new Date},b,{onClose:w}))}}),e(u,{label:i,id:y,isMandatory:h,isActive:!!o}),e(m,{helperText:n})])}}},B=()=>{const t={id:a()};return{view:a=>{let{attrs:{label:i,helperText:n,initialValue:o,newRow:l,className:d=\"col s12\",iconName:p,isMandatory:h,onchange:f,disabled:g}}=a,b=c(a.attrs,U);const y=t.id,v=r(b),w=l?\".clear\":\"\",x=new Date,k=f?()=>t.tp&&f(t.tp.time||o||`${x.getHours()}:${x.getMinutes()}`):void 0;return e(`.input-field.timepicker${w}`,{className:d,onremove:()=>t.tp&&t.tp.destroy()},[p?e(\"i.material-icons.prefix\",p):\"\",e(`input[type=text][tabindex=0][id=${y}]${v}${g?\"[disabled]\":\"\"}`,{value:o,oncreate:({dom:e})=>{t.tp=M.Timepicker.init(e,s({twelveHour:!1,showClearBtn:!0,defaultTime:o},b,{onCloseEnd:k}))}}),e(u,{label:i,id:y,isMandatory:h,isActive:o}),e(m,{helperText:n})])}}},J=()=>({view:({attrs:{id:t,groupId:a,label:i,onchange:n,className:o=\"col s12\",checked:r,disabled:l}})=>e(\"div\",{className:o},e(\"label\",[e(`input[type=radio][tabindex=0][name=${a}]${r?\"[checked=checked]\":\"\"}${l?\"[disabled]\":\"\"}`,{onclick:n?()=>n(t):void 0}),e(\"span\",e.trust(i))]))}),z=()=>{const t={groupId:a()};return{oninit:({attrs:{checkedId:e,initialValue:a}})=>{t.oldCheckedId=e,t.checkedId=e||a},view:({attrs:{id:a,checkedId:i,newRow:n,className:o=\"col s12\",label:r=\"\",disabled:l,description:c,options:d,isMandatory:p,checkboxClass:m,onchange:h}})=>{t.oldCheckedId!==i&&(t.oldCheckedId=t.checkedId=i);const{groupId:f,checkedId:g}=t,b=e=>{t.checkedId=e,h&&h(e)};return n&&(o+=\" clear\"),e(\"div\",{id:a,className:o},[e(\"div\",{className:\"input-field options\"},e(u,{id:a,label:r,isMandatory:p})),c?e(\"p.helper-text\",e.trust(c)):\"\",...d.map(t=>e(J,s({},t,{onchange:b,groupId:f,disabled:l,className:m,checked:t.id===g})))])}}},W=()=>{const t={},a=e=>e.map(e=>e.id).join(\"\"),i=(e,t,a=!1)=>a||(t instanceof Array&&(e||\"number\"==typeof e)?t.indexOf(e)>=0:t===e);return{oninit:({attrs:{checkedId:e,initialValue:i,options:n}})=>{t.ids=a(n);const o=e||i;t.checkedId=e instanceof Array?[...e]:e,t.initialValue=null!=o?o instanceof Array?o.filter(e=>null!=e):[o]:[]},view:({attrs:{id:n,newRow:o,className:r=\"col s12\",checkedId:s,key:c,options:d,multiple:p,label:h,helperText:f,placeholder:g=\"\",isMandatory:b,iconName:y,disabled:v,classes:w=\"\",dropdownOptions:x,onchange:k}})=>{t.checkedId!==s&&(t.initialValue=s?s instanceof Array?s:[s]:void 0);const{initialValue:N}=t,$=k?p?()=>{const e=t.instance&&t.instance.getSelectedValues(),a=e?e.length>0&&l(e[0])?e.map(e=>+e):e.filter(e=>null!==e||void 0!==e):void 0;t.initialValue=a||[],k(t.initialValue)}:e=>{if(e&&e.currentTarget){const a=e.currentTarget,i=l(a.value)?+a.value:a.value;t.initialValue=void 0!==typeof i?[i]:[]}t.initialValue&&k(t.initialValue)}:void 0;o&&(r+=\" clear\");const I=!d.some(e=>i(e.id,N)),O=d.reduce((e,t)=>(t.group&&e.indexOf(t.group)<0&&e.push(t.group),e),[]);return e(\".input-field.select-space\",{className:r,key:c,oncreate:p?({dom:e})=>t.wrapper=e:void 0},[y&&e(\"i.material-icons.prefix\",y),e(\"select\",{id:n,title:h,disabled:v,multiple:p,oncreate:({dom:e})=>{t.instance=M.FormSelect.init(e,{classes:w,dropdownOptions:x})},onupdate:({dom:e})=>{if(p){const e=y?1:0;!t.inputEl&&t.wrapper&&t.wrapper.childNodes&&t.wrapper.childNodes.length>0&&t.wrapper.childNodes[e].childNodes&&t.wrapper.childNodes[e].childNodes[0]&&(t.inputEl=t.wrapper.childNodes[e].childNodes[0]),t.inputEl&&t.inputEl.value&&t.inputEl.value.startsWith(`${g}, `)&&(t.inputEl.value=t.inputEl.value.replace(`${g}, `,\"\"))}const i=a(d);let n=s&&t.checkedId!==s.toString();t.ids!==i&&(t.ids=i,n=!0),(t.checkedId instanceof Array&&s instanceof Array?t.checkedId.join()!==s.join():t.checkedId!==s)&&(t.checkedId=s,n=!0),n&&(t.instance=M.FormSelect.init(e,{classes:w,dropdownOptions:x}))},onchange:$},e(\"option\",{value:\"\",disabled:!0,selected:!!I||void 0},g),0===O.length?d.map((t,a)=>{var n;return e(\"option\",{value:t.id,title:t.title||void 0,disabled:t.disabled?\"true\":void 0,\"data-icon\":t.img||void 0,selected:i(t.id,N,0===a&&I&&!g)},null==(n=t.label)?void 0:n.replace(\"&\",\"&\"))}):O.map(t=>e(\"optgroup\",{label:t},d.filter(e=>e.group===t).map((t,a)=>{var n;return e(\"option\",{value:t.id,title:t.title||void 0,disabled:t.disabled?\"true\":void 0,\"data-icon\":t.img||void 0,selected:i(t.id,N,0===a&&I&&!g)},null==(n=t.label)?void 0:n.replace(\"&\",\"&\"))})))),e(u,{label:h,isMandatory:b}),f&&e(m,{helperText:f})])}}},K=[\"label\",\"left\",\"right\",\"disabled\",\"newRow\",\"onchange\",\"checked\",\"isMandatory\",\"className\"],Y=()=>{const t={id:a()};return{view:({attrs:a})=>{const i=a.id||t.id,{label:n,left:r,right:l,disabled:s,newRow:d,onchange:p,checked:m,isMandatory:h,className:f=\"col s12\"}=a,g=c(a,K);return e(\"div\"+(d?\".clear\":\"\"),{className:f},[n?e(u,{label:n||\"\",id:i,isMandatory:h}):void 0,e(\".switch\",g,e(\"label\",[r||\"Off\",e(`input[id=${i}][type=checkbox]${o({disabled:s})}${m?\"[checked]\":\"\"}`,{onclick:p?e=>{e.target&&void 0!==e.target.checked&&p(e.target.checked)}:void 0}),e(\"span.lever\"),l||\"On\"]))])}}},Z=()=>{const t={},a=(e,t)=>t||e.replace(/ /g,\"\").toLowerCase();return{view:({attrs:{tabWidth:i,selectedTabId:n,tabs:o,className:r,style:l,duration:s,onShow:c,swipeable:d,responsiveThreshold:p}})=>{const u=o.filter(e=>e.active).shift(),m=n||(u?a(u.title,u.id):\"\");return e(\".row\",[e(\".col.s12\",e(\"ul.tabs\"+(\"fill\"===i?\".tabs-fixed-width\":\"\"),{className:r,style:l,oncreate:({dom:e})=>{t.instance=M.Tabs.init(e,{duration:s,onShow:c,responsiveThreshold:p,swipeable:d})},onupdate:()=>{if(m){const e=document.getElementById(`tab_${m}`);e&&e.click()}},onremove:()=>t.instance.destroy()},o.map(({className:t,title:n,id:r,active:l,disabled:s,target:c,href:d})=>e(`li.tab${s?\".disabled\":\"\"}${\"fixed\"===i?`.col.s${Math.floor(12/o.length)}`:\"\"}`,{className:t},e(`a[id=tab_${a(n,r)}]${l?\".active\":\"\"}`,{target:c,href:d||`#${a(n,r)}`},n))))),o.filter(({href:e})=>void 0===e).map(({id:t,title:i,vnode:n,contentClass:o})=>e(`.col.s12[id=${a(i,t)}]`,{className:o},n))])}}},G=e=>e.charAt(0).toUpperCase()+e.slice(1),Q=e=>\"string\"==typeof e,X=(e,t=2,a=\"0\")=>e.toString().length>=t?e.toString():X(a+e,t,a),ee=e=>e?`${X(e.getHours())}:${X(e.getMinutes())}`:\"00:00\",te=(e,t)=>{const a=(t=(t=t.replace(/\\[(\\w+)\\]/g,\".$1\")).replace(/^\\./,\"\")).split(\".\");let i={...e};for(let t=0,n=a.length;te[o]===t).shift();if(!r)return;i=r}}}return i},ae=e=>e.reduce((e,t)=>t instanceof Array?[...e,...t]:[...e,t],[]),ie=/([^ =><]*)\\s*([=><]*)\\s*(\\S*)/i,ne=/^\\s*!\\s*/,oe=/===?|[^<>=]/i,re=function(e){var t=[].slice.call(arguments,1);return 0===e.length||(e instanceof Array?e:[e]).some(e=>((e,t)=>e.split(\"&\").reduce((e,a)=>{const i=ne.test(a),n=i?a.replace(ne,\"\"):a;return e=e&&t.filter(Boolean).reduce((e,t)=>e||((e,t)=>{if(!t||0===Object.keys(t).length)return!1;const a=ie.exec(e);if(a){const[e,i,n,o]=a,r=te(t,i.trim());if(void 0===r||\"string\"==typeof r&&0===r.length)return!1;if(!n||!o)return!0;{const t=isNaN(+o)?\"true\"===o||\"false\"!==o&&o:+o;switch(n){case\"=\":case\"==\":case\"===\":return r instanceof Array?r.indexOf(t)>=0:r===t;case\"<=\":return r<=t;case\">=\":return r>=t;case\"<\":return r\":return r>t;default:return console.error(`Unrecognized operand (${n}) in expression: ${e}`),!1}}}return!0})(n.trim(),t),!1),i?!e:e},!0))(e,oe.test(e)?[t[0]]:ae(t)))},le=(e,t)=>te(t.filter(Boolean).reduceRight((e,t)=>({...t,...e})),e.trim()),se=(e,t)=>void 0!==le(e,t),ce=/{{\\s*([^\\s\"'`:]*):?([^\\s]*)\\s*}}/g,de=function(e){if(!ce.test(e))return!0;let t;ce.lastIndex=0;let a=!0;do{t=ce.exec(e),t&&(t.index===ce.lastIndex&&ce.lastIndex++,t.forEach((e,t,[,i])=>{a=a&&se(i,[].slice.call(arguments,1))}))}while(a&&null!==t);return a},pe=(e,t)=>{if(void 0===e)return\"\";if(e instanceof Array)return e.map(e=>pe(e,t)).join(\", \");if(!t)return e.toString();if(\"boolean\"==typeof e){const a=t.indexOf(\":\");return e?t.substring(0,a):t.substring(a+1)}switch(t){default:return e.toString();case\"date\":return new Date(e).toLocaleDateString();case\"time\":return new Date(e).toLocaleTimeString();case\"iso\":return new Date(e).toISOString();case\"utc\":return new Date(e).toUTCString()}},ue=function(e){if(!ce.test(e))return e;let t;ce.lastIndex=0;do{t=ce.exec(e),t&&(t.index===ce.lastIndex&&ce.lastIndex++,t.forEach((t,a,[i,n,o])=>{const r=le(n,[].slice.call(arguments,1));!r||r instanceof Array||(e=e.replace(i,pe(r,o)))}))}while(null!==t);return e},me=e=>{if(null===e)return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Array){const t=[];return e.forEach(e=>{t.push(e)}),t.map(e=>me(e))}if(\"object\"==typeof e){const t={...e};return Object.keys(t).forEach(e=>{t[e]=me(t[e])}),t}return e},he=e=>{const t=(e,a=\"\")=>{const i=e.filter(e=>\"section\"!==e.type&&\"md\"!==e.type).reduce((e,i)=>{const n=(a?`${a}.`:\"\")+String(i.id),o=i.type||(i.options&&i.options.length>0?\"select\":\"text\");return\"string\"==typeof o?e[n]=i:e={...e,...t(o,n)},e},{});return i},a=t(e),i=(e,t)=>{if(!a.hasOwnProperty(e)||void 0===t)return t;const i=a[e],n=t instanceof Array?t.filter(e=>null!=e):[t];switch(i.type||(i.options?\"options\":\"none\")){default:return t;case\"radio\":case\"select\":case\"options\":const e=\"string\"==typeof i.options?le(i.options,[a]):i.options;return n.map(t=>e.filter(e=>e.id===t).map(e=>e.label||G(e.id)).shift()).filter(e=>void 0!==e)}},n=(e,t=\"\")=>{if(e&&(\"object\"!=typeof e||0!==Object.keys(e).length)){if(e instanceof Array)return e.map(e=>n(e,t));{const a={};return Object.keys(e).forEach(o=>{const r=t?`${t}.${o}`:o,l=e[o];if(\"boolean\"==typeof l)a[o]=l;else if(\"number\"==typeof l||\"string\"==typeof l){const e=i(r,l);e&&(a[o]=e instanceof Array&&1===e.length?e[0]:e)}else if(l instanceof Array)if(\"string\"==typeof l[0]||null===l[0]){const e=i(r,l);e&&(a[o]=e)}else a[o]=n(l,o);else\"object\"==typeof l&&(a[o]=l)}),a}}};return n},fe=(e=\"\")=>e.replace(/\\s|,|\\./g,\"\").toLowerCase(),ge=(e,t,a=1)=>{const i=[];for(let n=e;n<=t;n+=a)i.push(n);return i},be=e=>{\"string\"!=typeof e&&(e=JSON.stringify(e));let t=0;if(0===e.length)return t;for(var a=0;a{const i=Object.assign({},t,a);return`${e}?${Object.keys(i).map(e=>`${e}=${i[e]}`).join(\"&\")}`},ve=()=>({view:({attrs:{md:a=\"\",removeParagraphs:i=!1,externalLinks:n=!1,...o}})=>e(\".slimdown-view.markdown\",o,e.trust(t(a,i,n)))}),we=()=>({view:({attrs:{type:t,props:a,label:i=\"\",initialValue:n,inline:o=!1}})=>{const r={className:a.className||\"col s12\"};if(n instanceof Array&&n.length>3)return e(\".readonly\",r,[e(\"label\",i),e(ve,{md:\"\\n- \"+n.join(\"\\n- \")})]);if(\"string\"==typeof n)return e(\".readonly\",r,\"url\"===t?[e(\"label\",`${i.trim()}: `),e(\"a[target=_blank]\",{href:n},n)]:\"color\"===t?[e(\"label\",`${i.trim()}: `),e(\".color\",{style:`height: 1rem; width: 40px; border-radius: 4px; background-color: ${n}`})]:[e(\"label\",i),e(ve,{md:n})]);const l=n instanceof Array?n.join(\", \"):n;return e(\".readonly\",r,[i&&e(\"label\",i),o?e(\"span\",l?`: ${l}`:e.trust(\" \")):e(\"p\",l||e.trust(\" \"))])}}),xe=(i={},n={})=>()=>{const o={key:Date.now()};return{view:({attrs:{i18n:r,field:l,obj:s,autofocus:c,onchange:d,context:p=[],containerId:u,disabled:m,readonly:f}})=>{const{id:g=\"\",type:b,disabled:y=m,readonly:w=f,value:k,required:N,autogenerate:$,show:I,label:O,description:D,i18n:M=r||{},checkAllOptions:E,transform:F,effect:_,onkeyup:H,onkeydown:U,onblur:J}=l;if(I&&!re(I,s,p)||O&&!de(O,s,p)||D&&!de(D,s,p))return;const K=\"string\"==typeof l.options?le(l.options,[s,...p]):l.options,Z=K&&K instanceof Array?K.filter(e=>void 0!==e.id&&(e.label||isNaN(Number(e.id)))&&(!e.show||re(e.show,s,p))).map(e=>e.label?e:{...e,label:G(e.id)}):[],Q=\"boolean\"==typeof m&&m,X=((e,i=!1,n=!1)=>{const{id:o=\"\",label:r,description:l,required:s,multiple:c,className:d,checkboxClass:p,icon:u,iconClass:m,placeholder:h,maxLength:f,minLength:g,max:b,min:y,step:v,dateTimeOutput:w,dateTimeSeconds:x,dateFormat:k,twelveHour:N}=e,$={id:`mui_${String(o)}-${a()}`,label:r};return void 0===r&&o&&($.label=G(String(o))),l&&($.helperText=t(l,!0)),d&&($.className=d),u&&($.iconName=u),m&&($.iconClass=m),p&&($.checkboxClass=p),h&&($.placeholder=h),s&&($.isMandatory=!0),c&&($.multiple=c),n&&($.disabled=!0),i&&($.autofocus=!0),void 0!==f&&($.maxLength=f),void 0!==g&&($.minLength=g),void 0!==b&&($.max=b),void 0!==y&&($.min=y),void 0!==v&&($.step=v),w&&($.dateTimeOutput=w),x&&($.dateTimeSeconds=x),k&&($.dateFormat=k),N&&($.twelveHour=N),$})(l,c,\"boolean\"==typeof y||void 0===y?Q||y:Q||re(y,s,p));O&&(X.label=t(ue(X.label||O,s,p),!0)),D&&(X.description=t(ue(X.description||D,s,p),!0));const te=N?e=>e instanceof Array?e&&e.length>0:void 0!==typeof e:void 0;if(s instanceof Array)return void console.warn(\"Only a repeat list can deal with arrays!\");const ae=function(e){try{return void 0===e||\"undefined\"===e?(delete s[g],d(s),Promise.resolve()):(s[g]=F?F(\"to\",e):e,_?Promise.resolve(_(s,s[g],p)).then(function(e){d(void 0!==e?e:s)}):Promise.resolve(d(s)))}catch(e){return Promise.reject(e)}};if(b instanceof Array)return g?(s.hasOwnProperty(g)||(s[g]={}),e(\".muf-form\",{className:l.className},[e(\".muf-form-header\",e.trust(t(X.label||G(String(g)),!0))),X.description&&e(\"div\",e.trust(t(X.description))),e(\".row\",e(De,{...X,i18n:M,readonly:w,form:b,obj:s[g],context:p instanceof Array?[s,...p]:[s,p],onchange:()=>d&&d(s),containerId:u}))])):void console.warn(\"Missing ID for type \"+JSON.stringify(b));$&&!s[g]&&(s[g]=\"guid\"===$?\"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return(\"x\"===e?t:3&t|8).toString(16)}):\"id\"===$?a():Date.now());const ie=s.hasOwnProperty(g)&&void 0!==s[g]?F?F(\"from\",s[g]):s[g]:k;g&&void 0!==k&&void 0!==ie&&(s[g]=F?F(\"to\",ie):ie);const[ne,oe]=E?E.split(\"|\"):[\"\",\"\"];if(w&&b&&[\"md\",\"none\"].indexOf(b)<0){if(n.hasOwnProperty(b))return e(n[b],{iv:ie,field:l,props:X,label:X.label,obj:s,context:p});if(b&&i.hasOwnProperty(b))return e(i[b],{iv:ie,field:l,props:X,label:X.label,onchange:ae,obj:s,context:p});switch(b){case\"time\":{const t=M.dateTimeOptions?{hour:\"2-digit\",minute:\"2-digit\",second:void 0,...M.dateTimeOptions,weekday:void 0,month:void 0,day:void 0,year:void 0}:void 0,a=\"number\"==typeof ie||\"string\"==typeof ie||ie instanceof Date?new Date(ie):void 0,i=a?a.toLocaleTimeString(M.locales,t):\"\";return e(we,{props:X,label:X.label,initialValue:i})}case\"date\":{const t=M.dateTimeOptions?{...M.dateTimeOptions,hour:void 0,hour12:void 0,minute:void 0,second:void 0}:void 0,a=\"number\"==typeof ie||\"string\"==typeof ie||ie instanceof Date?new Date(ie):void 0,i=a?a.toLocaleDateString(M.locales,t):\"\";return e(we,{props:X,label:X.label,initialValue:i})}case\"datetime\":{const t=M.dateTimeOptions?{hour:\"2-digit\",minute:\"2-digit\",month:\"numeric\",day:\"numeric\",...M.dateTimeOptions}:void 0,a=\"number\"==typeof ie||\"string\"==typeof ie||ie instanceof Date?new Date(ie):void 0,i=a?a.toLocaleTimeString(M.locales,t):\"\";return e(we,{props:X,label:X.label,initialValue:i})}case\"switch\":case\"checkbox\":return e(we,{props:X,label:X.label,initialValue:ie?\"✔\":\"✘\",inline:!0});case\"tags\":return e(we,{props:X,label:X.label,initialValue:ie||[]});case\"options\":case\"select\":{const t=void 0!==ie?ie instanceof Array?ie:[ie]:[],a=Z.filter(e=>t.indexOf(e.id)>=0),i=a&&0===a.length?\"?\":1===a.length?a[0].label:a.map(e=>e.label);return e(we,{props:X,label:X.label,initialValue:i})}case\"radio\":{const t=ie,a=Z.filter(e=>e.id===t);return e(we,{props:X,label:X.label,initialValue:a&&a.length?a[0].label:\"?\"})}case\"base64\":{const t=ie;return!(!t||!/data:image/i.test(t))&&e(\"div\",e(\"img.responsive-img\",{src:t,alt:s.title||s.alt||s.name||\"\",style:`max-height: ${l.max||50}px`}))}case\"file\":return e(\"div\",X,(ie instanceof Array?ie:[ie]).map((t=\"\")=>{const a=/data:image|.jpg$|.jpeg$|.png$|.gif$|.svg$|.bmp$|.tif$|.tiff$/i.test(t),i=`${new URL(l.url).origin}${t}`;return e(\"a[target=_blank]\",{href:i},a?e(\"img\",{src:i,alt:i,style:`max-height: ${l.max||50}`}):e(we,{props:X,label:l.placeholder||\"File\",initialValue:t}))}));case\"md\":case\"markdown\":{const a=\"string\"==typeof ie&&ie?t(ie):\"\";return e(we,{props:X,label:X.label,initialValue:a})}default:return e(we,{props:X,type:b,label:X.label,initialValue:ie})}}else{if(b&&i.hasOwnProperty(b))return e(i[b],{iv:ie,field:l,props:X,label:X.label,onchange:ae,obj:s,context:p});switch(b){case\"colour\":case\"color\":{const t=ie;return e(V,{...X,initialValue:t,onchange:ae,onblur:J})}case\"time\":{const{twelveHour:t=!1}=X,a=ie?\"number\"==typeof ie||\"string\"==typeof ie?new Date(ie):ie:new Date,i=ee(a);return s[g]=F?F(\"to\",a):a,e(B,{...X,twelveHour:t,initialValue:i,onchange:e=>{const t=e.split(\":\").map(e=>+e);a.setHours(t[0],t[1]),ae(a)},container:u})}case\"date\":{const{format:t=\"mmmm d, yyyy\"}=X,a=\"number\"==typeof ie||\"string\"==typeof ie?new Date(ie):ie;s[g]=a?F?F(\"to\",a.valueOf()):a.valueOf():a;const{min:i,max:n}=X,o=i?!a||ia.valueOf()?new Date(n):a:void 0;return e(q,{...X,minDate:o,maxDate:r,setDefaultDate:!!a,format:t,initialValue:a,onchange:e=>{ae(new Date(e))},container:u})}case\"datetime\":{const{label:t,className:a=\"col s12\",dateTimeSeconds:i=!1,twelveHour:n=!1,format:o=\"mmmm d, yyyy\",...r}=X,l=\"number\"==typeof ie||\"string\"==typeof ie?new Date(ie):ie,s={initialDateTime:l},c=l||void 0,d=l?ee(l):\"\",{min:p,max:m}=X,h=p?!l||pl.valueOf()?new Date(m):l:void 0,g=X.dateTimeOutput||\"UTC\",b=e=>{s.initialDateTime=e,ae(\"UTC\"===g?e.toUTCString():\"ISO\"===g?e.toISOString():e.valueOf())};return e(\"div\",{className:a},e(\".row\",[e(i?\".col.s6\":\".col.s8\",{style:\"padding: 0\"},e(q,{...r,label:t,minDate:h,maxDate:f,setDefaultDate:!!l,format:o,initialValue:c,container:u,onchange:e=>{const t=new Date(s.initialDateTime);t.setFullYear(e.getFullYear()),t.setMonth(e.getMonth()),t.setDate(e.getDate()),b(t)}})),e(\".col.s4\",{style:\"min-width: 6rem; padding-right: 0; padding-left: 0\"},e(B,{...r,label:\"\",helperText:\"\",twelveHour:n,initialValue:d,container:u,onchange:e=>{const t=e.split(\":\").map(e=>+e),a=s.initialDateTime||new Date((new Date).setSeconds(0,0));a.setHours(t[0],t[1]),b(a)}})),i&&e(T,{style:\"min-width: 4rem; padding-right: 0; padding-left: 0\",className:\"col s2\",min:0,max:59,onchange:e=>{const t=s.initialDateTime||new Date((new Date).setSeconds(0,0));t.setSeconds(e,0),b(t)}})]))}case\"email\":{const t=ie;return e(j,{...X,validate:te,autofocus:c,onchange:ae,initialValue:t,onkeydown:U,onkeyup:H,onblur:J})}case\"number\":{const t=ie;return e(T,{...X,validate:te,autofocus:c,onchange:ae,initialValue:t,onkeydown:U,onkeyup:H,onblur:J})}case\"radio\":{const t=ie;return e(z,{label:\"\",...X,options:Z,checkedId:t,onchange:ae})}case\"checkbox\":{const t=ie;return e(R,{...X,checked:t,onchange:ae})}case\"options\":{const t=ie;return[[e(P,{key:o.key,checkboxClass:\"col s6 m4 l3\",className:\"input-field col s12\",...X,disabled:X.disabled||!Z||0===Z.length,options:Z,checkedId:t,onchange:e=>ae(1===e.length?e[0]:e.filter(e=>null!==e))})],void 0!==E&&e(\".col.s12.option-buttons\",[e(v,{disabled:X.disabled,label:ne,iconName:\"check\",onclick:()=>{o.key=Date.now(),ae(Z.map(e=>e.id))}}),oe&&e(v,{disabled:X.disabled,label:oe,iconName:\"check_box_outline_blank\",onclick:()=>{const e=s[g]||[];e.length=0,o.key=Date.now(),ae(e)}})])]}case\"select\":{const t=ie;return e(W,{placeholder:X.multiple?M.pickOneOrMore||\"Pick one or more\":M.pickOne||\"Pick one\",...X,disabled:X.disabled||!Z||0===Z.length,options:Z,initialValue:t,onchange:e=>ae(1!==e.length||X.multiple?e.filter(e=>null!==e||void 0!==e):e[0])})}case\"markdown\":case\"md\":{const{label:t,className:a=\"col s12\"}=X,i=ue((g?ie:k||t)||\"\",s,p);return e(ve,{md:i,className:a})}case\"section\":return e(\".divider\");case\"switch\":{const t=ie,a=Z&&Z.length>0?Z[0].label:\"\",i=Z&&Z.length>1?Z[1].label:\"\";return e(Y,{...X,left:a,right:i,checked:t,onchange:ae})}case\"tags\":{const t=(ie?ie instanceof Array?ie:[ie]:[]).map(e=>({tag:e})),a=Z&&Z.length>0?{data:Z.reduce((e,t)=>(e[t.id]=null,e),{}),limit:l.maxLength||Infinity,minLength:l.minLength||1}:{},{label:i,isMandatory:n,className:o,helperText:r}=X;return e(x,{className:o,label:i,isMandatory:n,helperText:r,onchange:e=>ae(e.map(e=>e.tag)),placeholder:l.placeholder||\"Add a tag\",secondaryPlaceholder:l.secondaryPlaceholder||\"+tag\",data:t,autocompleteOptions:a,onblur:J})}case\"autocomplete\":{const t=ie,a=Z&&Z.length>0?{data:Z.reduce((e,t)=>(e[t.id]=null,e),{}),limit:l.maxLength||Infinity,minLength:l.minLength||1}:{data:{}},{label:i,isMandatory:n,className:o,helperText:r}=X;return e(h,{initialValue:t,className:o,label:i,isMandatory:n,helperText:r,onchange:ae,onblur:J,placeholder:l.placeholder||\"...\",...a})}case\"textarea\":{const t=ie;return e(A,{...X,validate:te,autofocus:c,onchange:ae,initialValue:t,onkeyup:H,onkeydown:U,onblur:J})}case\"file\":{const t=ie,{url:a,placeholder:i}=l;if(!a)throw Error('Input field \"url\" not defined, which indicates the URL to the upload folder.');const n=Z?Z.map(e=>e.id):void 0,o=t=>{if(!t||t.length<1)return void ae(\"\");const i=new FormData;i.append(\"file\",t[0]),e.request({method:\"POST\",url:a,body:i}).then(e=>ae(e)).catch(console.error)};return e(L,{...X,accept:n,placeholder:i,onchange:o,initialValue:t})}case\"base64\":{const t=ie,a=!(!t||!/data:image/i.test(t)),{placeholder:i}=l,n=Z?Z.map(e=>e.id).join(\",\"):void 0,o=t=>{if(!t||t.length<1)return void ae(\"\");const a=new FileReader;a.onloadend=()=>{\"string\"==typeof a.result&&ae(a.result),e.redraw()},a.readAsDataURL(t[0])};return a?e(\"div\",[e(\"img.responsive-img\",{src:t,alt:s.title||s.alt||s.name||\"\",style:`max-height: ${l.max||50}px`}),e(v,{iconName:\"clear\",onclick:()=>ae(\"\")})]):e(L,{...X,accept:n,placeholder:i,onchange:o,initialValue:t})}case\"url\":{const t=ie;return e(C,{placeholder:\"http(s)://www.example.com\",...X,validate:te,autofocus:c,onchange:ae,initialValue:t,onkeydown:U,onkeyup:H,onblur:J})}case\"text\":{const t=ie;return e(S,{...X,validate:te,autofocus:c,onchange:ae,initialValue:t,onkeydown:U,onkeyup:H,onblur:J})}default:return}}}}},ke=()=>{const t={},a=(e,a)=>{const i=e instanceof Array?e.length:e.hasOwnProperty(a)?e[a].length:0,n=t.onNewItem?t.onNewItem(e,a,i):{};e instanceof Array?e.push(n):e.hasOwnProperty(a)?e[a].push(n):e[a]=[n]};let i;const n=e=>{e.preventDefault()};return{oninit:({attrs:{i18n:e={},field:{id:a=\"\",sortProperty:n,onNewItem:o}}})=>{t.editLabel=e.editRepeat||`Edit ${String(a)}`,t.createLabel=e.createRepeat||`Create new ${String(a)}`,t.onNewItem=o,i=(e=>{if(!e)return(e,t)=>0;const t=\"!\"===e[0],a=t?e.substring(1):e;return t?(e,t)=>e[a]>t[a]?-1:e[a]e[a]>t[a]?1:e[a]{const{filterValue:f}=t,{id:g,label:b,type:y,min:x,max:k,pageSize:N,propertyFilter:$,filterLabel:I,readonly:O=u,repeatItemClass:A=\"\"}=o,D=((e,t)=>e instanceof Array?e:(e.hasOwnProperty(t)||(e[t]=[]),e[t]))(r,g),T=f?fe(f):void 0,M=$&&T&&T.length>2?D.filter(e=>fe(`${e[$]}`).indexOf(T)>=0):D,C=(e=>{const t=window.location.hash.split(\"?\")[1];return t?new URLSearchParams(t).get(e):null})(String(g)),V=C?Math.min(M.length,+C):1,j=N&&M&&(V-1)*N(j-1)*N<=t&&t!0,R=e.route.get()||location.href.replace(location.origin,\"\").replace(\"/#!\",\"\"),P=N?Math.ceil(M.length/N):0,F=!!(k&&M.length>=k),H=!p&&!O&&(!x||M.length>x),U=R?R.split(\"?\")[0]:\"\",q=(e=>{const t=e?e.split(\"?\")[1]:window.location.search.slice(1),a={};if(t){const e=t.split(\"&\");for(var i=0;i{a(r,String(g)),g&&e.route.set(U,Object.assign(q,{[g]:M.length})),h&&h(r)},style:{padding:0},className:\"left\",disabled:p||F,readonly:O}),P>1&&e(\".right\",e(_,{curPage:j,items:ge(1,P).map(e=>({href:ye(U,q,{[g]:e})}))})),(M.length>1||f)&&$&&!p&&e(S,{style:\"margin-top: -6px; margin-bottom: -1rem;\",iconName:\"filter_list\",iconClass:\"small\",placeholder:I,onkeyup:(e,a)=>t.filterValue=a,className:\"right\",disabled:p,readonly:O})])),M&&M.length>0&&\"string\"!=typeof y&&M.sort(i).filter(L).map((a,i)=>e(\".mui-repeat-item\",{key:i,draggable:J,ondragstart:J?e=>((e,t)=>{e.dataTransfer?.setData(\"text/plain\",t.toString())})(e,i):void 0,ondragover:J?n:void 0,ondrop:J?e=>((e,t,a,i,n)=>{const o=parseInt(e.dataTransfer?.getData(\"text\")||\"0\",10),r=[...a[i]],[l]=r.splice(o,1);r.splice(t,0,l),a[i]=r,n&&n(a),e.preventDefault()})(e,i,r,g,h):void 0,style:{display:\"flex\",cursor:J?\"move\":void 0}},[H&&[(!N||N>1)&&e(\"span.mui-show-item-number left\",{style:`flex: 0 0 ${B}px;`},`[${(N?(j-1)*N+i:i)+1}]`)],[e(\".row.repeat-item\",{className:A,key:V+be(a),style:\"flex: 1;\"},[y&&e(De,{form:y,obj:a,i18n:m,context:l instanceof Array?[r,...l]:[r,l],section:c,containerId:d,disabled:p,readonly:O,onchange:()=>h&&h(r)})])],H&&[e(v,{iconName:\"delete\",className:\"mui-delete-item\",iconClass:\"mui-delete-icon\",style:{flex:\"0 0 20px\",padding:0},disabled:p,readonly:O,onclick:()=>{t.curItemIdx=N?(j-1)*N+i:i}})]])),!(p||F||O||!M||0===M.length||1===N)&&e(w,{iconName:\"add\",className:\"row mui-add-new-item btn-small right\",title:b,style:\"padding: 0; margin-top: -10px; margin-right: -25px\",onclick:()=>{a(r,String(g)),e.route.set(U,Object.assign(q,{[g]:M.length})),h&&h(r)}})])],void 0!==t.curItemIdx&&e(E,{id:\"deleteItem\",onCreate:e=>e.open(),options:{onCloseStart:()=>{t.curItemIdx=void 0,e.redraw()}},fixedFooter:!0,title:m.deleteItem||\"Delete item\",description:e(De,{form:y,obj:M[t.curItemIdx],context:l instanceof Array?[r,...l]:[r,l],section:c,containerId:d,readonly:!0,i18n:m}),buttons:[{label:m.disagree||\"Disagree\"},{label:m.agree||\"Agree\",onclick:()=>{void 0!==t.curItemIdx&&(M.splice(t.curItemIdx,1),r instanceof Array?r=[...M]:r[g]=[...M],h&&h(r))}}]})]}}},Ne=()=>{const t={};return{oninit:({attrs:{i18n:e={}}})=>{const{raw:a=\"RAW\",view:i=\"VIEW\"}=e;t.raw=a,t.view=i},view:({attrs:{field:{id:a=\"\",type:i,onSelect:n},obj:o,context:r,containerId:l,disabled:s,readonly:c,i18n:d,onchange:p}})=>{if(o instanceof Array)return;const u=o[a],m=u?JSON.parse(u):void 0,h=m&&m.features||[],f=[],g={title:t.raw,vnode:e(A,{class:\"col s12\",initialValue:m?JSON.stringify(m,null,2):void 0,placeholder:\"Enter GeoJSON\",onchange:e=>o[a]=e})};if(!i||\"string\"==typeof i)return;const b=i,y=b.length>0?b[0].id:void 0,v={title:t.view,vnode:h.length?e(N,{oncreate:({dom:e})=>t.dom=e,onOpenStart:n?e=>{const a=t.dom.children||[];for(let t=0;t(t.properties||(t.properties={}),{id:\"erik_\"+i,key:i,header:y&&t.properties[y]||t.geometry.type,body:e(\".row\",e(De,{class:\"col s12\",form:b,obj:t.properties,i18n:d,context:r instanceof Array?[o,...r]:[o,r],containerId:l,disabled:s,readonly:c,onchange:(e,t)=>{t&&(h[i].properties=t),o[a]=JSON.stringify(m,null,2),p&&p(o)}}))}))}):e(\"span\",\"...\")};return f.push(v),f.push(g),e(Z,{tabs:f,tabWidth:\"fill\"})}}},$e={},Ie={},Oe=(e,t,a)=>{$e[e]=t,a&&(Ie[e]=a)},Ae=xe($e,Ie),De=()=>({view:({attrs:{i18n:t,form:a,obj:i,onchange:n,disabled:o,readonly:r,context:l,section:s}})=>{const c=e=>n&&n(((e,t)=>t.filter(e=>e.required&&void 0!==typeof e.id).reduce((t,a)=>t&&!(a.id&&(void 0===e[a.id]||e[a.id]instanceof Array&&0===e[a.id].length||\"string\"==typeof e[a.id]&&0===e[a.id].length)),!0))(e,a),e);return a.filter((e=>{if(!e)return e=>!0;let t=!1;return({type:a,id:i})=>\"section\"===a?(t=i===e,!1):t})(s)).filter(e=>!e.show||re(e.show,i,...l||[])).reduce((a,n)=>(n.type||(n.type=(e=>{const{autogenerate:t,value:a,options:i}=e;return t?\"none\":a?\"string\"==typeof a?\"md\":\"number\"==typeof a?\"number\":\"boolean\"==typeof a?\"checkbox\":\"none\":i&&i.length>0?\"select\":\"none\"})(n)),[...a,void 0===n.repeat||!1===n.repeat?e(Ae,{i18n:t,field:n,obj:i,onchange:c,disabled:o,readonly:r,context:l,section:s,containerId:\"body\"}):e(\"geojson\"===n.repeat?Ne:ke,{obj:i,field:n,onchange:c,context:l,i18n:t,containerId:\"body\",disabled:o,readonly:r})]),[])}});export{xe as FormFieldFactory,De as LayoutForm,we as ReadonlyComponent,ke as RepeatList,ve as SlimdownView,G as capitalizeFirstLetter,me as deepCopy,ae as flatten,pe as formatExpression,te as getPath,Q as isComponentType,he as labelResolver,X as padLeft,ge as range,Oe as registerPlugin,le as resolveExpression,fe as stripSpaces,ee as toHourMin};\n//# sourceMappingURL=index.esm.js.map\n","const t={\"&\":\"&\",\"<\":\"<\",\">\":\">\",'\"':\""\",\"'\":\"'\"},n=new RegExp(`[${Object.keys(t).join(\"\")}]`,\"g\"),e=[[/\\r\\n/g,\"\\n\"],[/\\n(#+)(.*)/g,(t,n,e=\"\")=>{const r=n.length;return`${e.trim()}`}],[/!\\[([^\\[]+)\\]\\((?:javascript:)?([^\\)]+)\\)/g,'\"$1\"'],[/\\[([^\\[]+)\\]\\((?:javascript:)?([^\\)]+)\\)/g,'
    $1'],[/([^\\\\])(\\*\\*|__)(.*?(_|\\*)?)\\2/g,\"$1$3\"],[/([^\\\\])(\\*|_)(.*?)\\2/g,\"$1$3\"],[/\\\\_/g,\"_\"],[/\\~\\~(.*?)\\~\\~/g,\"$1\"],[/\\:\\\"(.*?)\\\"\\:/g,\"$1\"],[/\\n\\s*```\\n([^]*?)\\n\\s*```\\s*\\n/g,\"\\n
    $1
    \"],[/`(.*?)`/g,(e,r)=>{return`${l=r,l.replace(n,n=>t[n])}`;var l}],[/\\n(\\*|\\-|\\+)(.*)/g,(t,n,e=\"\")=>``],[/\\n[0-9]+\\.(.*)/g,(t,n=\"\")=>`
      \\n\\t
    1. ${n.trim()}
    2. \\n
    `],[/\\n(>|\\>)(.*)/g,(t,n,e=\"\")=>`\\n
    ${e.trim()}
    `],[/(\\^)(.*?)\\1/g,\"$2\"],[/(\\~)(.*?)\\1/g,\"$2\"],[/\\n-{5,}/g,\"\\n
    \"],[/( *\\|[^\\n]+\\|\\r?\\n)((?: *\\|:?[ -]+:?)+ *\\|)(\\n(?: *\\|[^\\n]+\\|\\r?\\n?)*)?/g,(t,n,e,r)=>{const l=e.split(\"|\").filter((t,n,e)=>n>0&&n/:-+:/g.test(t)?\"center\":/-+:/g.test(t)?\"right\":/:-+/.test(t)?\"left\":\"\"),g=t=>{const n=l[t];return n?` align=\"${n}\"`:\"\"};return`\\n${n.split(\"|\").map(t=>t.trim()).filter(t=>t&&t.length).map((t,n)=>`${t}`).join(\"\")}${r.split(\"\\n\").map(t=>t.trim()).filter(t=>t&&t.length).map(t=>`${t.split(\"|\").filter((t,n,e)=>n>0&&n`${t.trim()}`).join(\"\")}`).join(\"\")}
    \\n`}],[/\\n([^\\n]+)\\n/g,(t,n)=>{const e=n.trim();return/^<\\/?(ul|ol|li|h|p|bl|table|tr|td)/i.test(e)?`\\n${n}\\n`:`\\n

    \\n${e}\\n

    \\n`}],[/\\s?<\\/ul>\\s?