-1){b++;continue}break}for(;++d12*n.length)return!1;for(a=-1;++ar)return!1;return!0}}).call(this)},"O/eQ":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"SingleResourceComponent",props:["prettyResourceName","resourceId","resourceName","resourceFields","pathPrefix"],data:function(){return{loading:!1,resourceData:{}}},created:function(){this.fetchResource()},mounted:function(){},methods:{fetchResource:function(){var e=this;axios.get("/api/"+this.pathPrefix+"/"+this.resourceName+"/"+this.resourceId).then(function(t){e.resourceData=t.data.data}).catch(function(t){e.error="Could not retrieve "+e.resourceName+". Server error."}).finally(function(){e.loading=!1})}}}},PYAz:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",{staticClass:"card"},[n("div",{staticClass:"card-header"},[n("h3",{staticClass:"card-title"},[e.prettyResourceName?n("span",[e._v(e._s(e._f("beautify")(e.prettyResourceName)))]):n("span",[e._v(e._s(e._f("beautify")(e.resourceName)))])]),e._v(" "),n("div",{staticClass:"card-options"},[n("div",{staticClass:"dropdown card-options-dropdown"},[e._m(0),e._v(" "),n("div",{staticClass:"dropdown-menu dropdown-menu-dark dropdown-menu-right"},[n("a",{staticClass:"dropdown-item",attrs:{href:"/"+e.pathPrefix+"/"+e.resourceName+"/"+e.resourceId+"/"}},[n("i",{staticClass:"fe fe-eye mr-3"}),e._v("View\n ")]),e._v(" "),n("a",{staticClass:"dropdown-item",attrs:{href:"/"+e.pathPrefix+"/"+e.resourceName+"/"+e.resourceId+"/edit/"}},[n("i",{staticClass:"fe fe-edit mr-3"}),e._v("Edit\n ")])])])])]),e._v(" "),n("div",{staticClass:"card-body"},[n("div",{staticClass:"row"},e._l(e.resourceFields,function(t,r){return n("div",{staticClass:"col-12"},[n("div",{staticClass:"h6"},[e._v(e._s(e._f("beautify")(r)))]),e._v(" "),"textarea"==t?n("pre",[e._v(e._s(e.resourceData[""+r]))]):"wysiwyg"==t?n("pre",{domProps:{innerHTML:e._s(e.resourceData[""+r])}}):n("p",[e._v(e._s(e.resourceData[""+r]))])])}),0)])])])},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("button",{staticClass:"btn btn-option dropdown-toggle",attrs:{type:"button","data-toggle":"dropdown"}},[t("i",{staticClass:"fe fe-more-vertical"})])}]}},PvM9:function(e,t,n){(function(){var t,r,i,a,o,s,u;u=n("LQFp"),r=u.countDir,a=u.getExtension,e.exports=function(){return function(e,n){var o,u,l;if(o=(l=null!=n?n:{}).optCharRegEx,u=l.pathSeparator,!e||!e.length)return null;this.query=e,this.query_lw=e.toLowerCase(),this.core=t(e,o),this.core_lw=this.core.toLowerCase(),this.core_up=s(this.core),this.depth=r(e,e.length,u),this.ext=a(this.query_lw),this.charCodes=i(this.query_lw)}}(),o=/[ _\-:\/\\]/g,t=function(e,t){return null==t&&(t=o),e.replace(t,"")},s=function(e){var t,n,r;for(t="",n=0,r=e.length;n1)for(var n=1;n-1&&(u=e(t,f,d,c),l=s(l,u)),l)):[]},t.wrap=function(e,t,n){var r,i,a,s,u,l,c,d,f;if(null!=n.wrap&&(l=(f=n.wrap).tagClass,d=f.tagOpen,c=f.tagClose),null==l&&(l="highlight"),null==d&&(d=''),null==c&&(c=" "),e===t)return d+e+c;if(0===(a=o(e,0,n)).length)return e;for(s="",r=-1,u=0;++ru&&(s+=e.substring(u,i),u=i);++ru&&(s+=d,s+=e.substring(u,i),s+=c,u=i)}return u<=e.length-1&&(s+=e.substring(u)),s},e=function(e,t,n,i){var a,o,s;for(s=e.length-1;e[s]===i;)s--;if(-1===(a=e.lastIndexOf(i,s)))return[];for(o=n.depth;o-- >0;)if(-1===(a=e.lastIndexOf(i,a-1)))return[];return a++,s++,r(e.slice(a,s),t.slice(a,s),n,a)},s=function(e,t){var n,r,i,a,o,s,u;if(o=e.length,0===(s=t.length))return e.slice();if(0===o)return t.slice();for(i=-1,r=t[a=0],u=[];++i0?d:c(e,t,w,x,v,h,k),o=C+l(v,h,k,i,p)),D=T[h],d=f[h],$>D?y=2:($=D,y=1),o>$?($=o,y=3):p=0,T[h]=$,f[h]=p,O[++_]=$>0?y:0;for(_=(v=m-1)*b+(h=b-1),s=!0,g=[];s&&v>=0&&h>=0;)switch(O[_]){case 1:v--,_-=b;break;case 2:h--,_--;break;case 3:g.push(v+r),h--,v--,_-=b+1;break;default:s=!1}return g.reverse(),g}}).call(this)},aPsK:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"ShowComponent",props:["resourceId","resourceName","resourceFields","pathPrefix"],data:function(){return{loading:!1,resourceData:{}}},created:function(){this.fetchResource()},mounted:function(){},methods:{fetchResource:function(){var e=this;axios.get("/api/"+this.pathPrefix+"/"+this.resourceName+"/"+this.resourceId).then(function(t){e.resourceData=t.data.data}).catch(function(t){e.error="Could not retrieve "+e.resourceName+". Server error."}).finally(function(){e.loading=!1})}}}},cU7V:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",e._l(e.allResourceNames,function(t,r){return n("li",{staticClass:"nav-item"},[n("a",{staticClass:"nav-link dropdown-toggle pl-4",attrs:{href:"#"+t+"-menu","data-toggle":"collapse","aria-expanded":"false"}},[e._v(e._s(e._f("beautify")(t)))]),e._v(" "),n("ul",{staticClass:"nav nav-tabs border-0 justify-content-center collapse",attrs:{id:t+"-menu"}},[n("li",{staticClass:"nav-item"},[n("a",{staticClass:"nav-link pl-6",attrs:{href:"/"+e.pathPrefix+"/"+t}},[e._v("View")])]),e._v(" "),n("li",{staticClass:"nav-item"},[n("a",{staticClass:"nav-link pl-6",attrs:{href:"/"+e.pathPrefix+"/"+t+"/create"}},[e._v("Create")])])])])}),0)},staticRenderFns:[]}},eURO:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"FormComponent",props:["resourceId","resourceName","resourceFields","validationFields","relationalFields","singularResourceName","action","pathPrefix"],data:function(){return{handleText:"Create",handleButtonText:"Create",loading:!1,selectizeEventFired:!1,alertData:[],resourceData:{},relationalData:{},trumbowygData:{}}},created:function(){"update"===this.action?(this.handleText="Edit",this.handleButtonText="Update",this.fetchResource()):"create"===this.action&&(this.handleText="Create",this.handleButtonText="Create"),this.fetchRelationalItems()},mounted:function(){},updated:function(){},methods:{initTrumbowyg:function(e,t){var n=this;$(".trumbowyg-textarea").trumbowyg({svgPath:"/assets/fonts/trumbowygicons.svg",removeformatPasted:!0,resetCss:!0,autogrow:!0}).on("tbwchange",function(t){t.target.value!==n.resourceData[""+e]&&n.setTrumbowygValue(e,t.target.value)}),$("textarea[name='"+e+"'].trumbowyg-textarea").trumbowyg("html",t)},setTrumbowygValue:function(e,t){t!==this.trumbowygData[e]&&(this.trumbowygData[e]=t)},getTrumbowygValue:function(e){return this.trumbowygData[e]},fetchResource:function(){var e=this;axios.get("/api/"+this.pathPrefix+"/"+this.resourceName+"/"+this.resourceId).then(function(t){e.resourceData=t.data.data}).catch(function(t){e.error="Could not retrieve "+e.resourceName+". Server error."}).finally(function(){})},fetchRelationalItems:function(){var e=this;axios.get("/api/"+this.pathPrefix+"/"+this.resourceName+"/relational").then(function(t){e.relationalData=t.data.data}).catch(function(t){e.error="Could not retrieve "+e.resourceName+". Server error."}).finally(function(){var t=e;$("select").selectize({}).on("change",function(e){if(t.selectizeEventFired)t.selectizeEventFired=!1;else{t.selectizeEventFired=!0;var n=new Event("change");e.target.dispatchEvent(n)}})})},handleAction:function(e){var t=this;this.$validator.validate().then(function(n){n&&(t.loading=!0,"update"===e?t.handleUpdate():"create"===e&&t.handleStore())})},handleStore:function(e){var t=this;this.resourceData.relationalFields=this.relationalFields,axios.post("/api/"+this.pathPrefix+"/"+this.resourceName,this.resourceData).then(function(e){console.log("success"),window.location="/"+t.pathPrefix+"/"+t.resourceName}).catch(function(e){t.alertData.push({level:"danger",message:t.$options.filters.beautify(t.singularResourceName)+" could not be saved. Please check your values or try again later."})}).finally(function(){t.loading=!1})},handleUpdate:function(e){var t=this;Object.keys(this.resourceFields).forEach(function(e){"wysiwyg"===t.resourceFields[e]&&(t.resourceData[""+e]=t.getTrumbowygValue(e))}),this.resourceData.relationalFields=this.relationalFields,axios.patch("/api/"+this.pathPrefix+"/"+this.resourceName+"/"+this.resourceId,this.resourceData).then(function(e){t.fetchResource(),t.alertData.push({level:"success",message:t.$options.filters.beautify(t.singularResourceName)+" has been successfully updated"})}).catch(function(e){t.alertData.push({level:"danger",message:t.$options.filters.beautify(t.singularResourceName)+" could not be updated. Please check your values or try again later."})}).finally(function(){t.loading=!1})}}}},ix13:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("form",[n("div",{staticClass:"card"},[n("div",{staticClass:"card-header"},[n("h3",{staticClass:"card-title"},[e._v(e._s(e.handleText)+" "+e._s(e._f("beautify")(e.resourceName)))])]),e._v(" "),n("div",{staticClass:"card-body"},[n("div",{class:["dimmer",this.loading?"active":""]},[n("div",{staticClass:"loader"}),e._v(" "),n("div",{staticClass:"dimmer-content"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-md-12"},[e._l(e.resourceFields,function(t,r){return n("div",{staticClass:"form-group"},[n("label",{staticClass:"form-label"},[e._v(e._s(e._f("beautify")(r)))]),e._v(" "),"textarea"===t||"wysiwyg"===t?n("textarea",{directives:[{name:"model",rawName:"v-model",value:e.resourceData[""+r],expression:"resourceData[`${fieldKey}`]"},{name:"validate",rawName:"v-validate",value:e.validationFields?e.validationFields[r]:"",expression:"(validationFields ? validationFields[fieldKey] : '')"}],class:["form-control","wysiwyg"===t?"trumbowyg-textarea":"",e.errors.first(r)?"is-invalid":"",e.fields[r]&&e.fields[r].dirty&&!e.errors.first(r)?"is-valid":""],attrs:{name:r,"data-vv-as":e._f("beautify")(r)},domProps:{value:e.resourceData[""+r]},on:{input:function(t){t.target.composing||e.$set(e.resourceData,""+r,t.target.value)}}},[e._v(" "+e._s("wysiwyg"===t?e.initTrumbowyg(r,e.resourceData[""+r]):e.resourceData[""+r])+"\n ")]):n("input","checkbox"===t?{directives:[{name:"model",rawName:"v-model",value:e.resourceData[""+r],expression:"resourceData[`${fieldKey}`]"},{name:"validate",rawName:"v-validate",value:e.validationFields?e.validationFields[r]:"",expression:"(validationFields ? validationFields[fieldKey] : '')"}],class:["form-control",e.errors.first(r)?"is-invalid":"",e.fields[r]&&e.fields[r].dirty&&!e.errors.first(r)?"is-valid":""],attrs:{name:r,"data-vv-as":e._f("beautify")(r),type:"checkbox"},domProps:{checked:Array.isArray(e.resourceData[""+r])?e._i(e.resourceData[""+r],null)>-1:e.resourceData[""+r]},on:{change:function(t){var n=e.resourceData[""+r],i=t.target,a=!!i.checked;if(Array.isArray(n)){var o=e._i(n,null);i.checked?o<0&&e.$set(e.resourceData,""+r,n.concat([null])):o>-1&&e.$set(e.resourceData,""+r,n.slice(0,o).concat(n.slice(o+1)))}else e.$set(e.resourceData,""+r,a)}}}:"radio"===t?{directives:[{name:"model",rawName:"v-model",value:e.resourceData[""+r],expression:"resourceData[`${fieldKey}`]"},{name:"validate",rawName:"v-validate",value:e.validationFields?e.validationFields[r]:"",expression:"(validationFields ? validationFields[fieldKey] : '')"}],class:["form-control",e.errors.first(r)?"is-invalid":"",e.fields[r]&&e.fields[r].dirty&&!e.errors.first(r)?"is-valid":""],attrs:{name:r,"data-vv-as":e._f("beautify")(r),type:"radio"},domProps:{checked:e._q(e.resourceData[""+r],null)},on:{change:function(t){e.$set(e.resourceData,""+r,null)}}}:{directives:[{name:"model",rawName:"v-model",value:e.resourceData[""+r],expression:"resourceData[`${fieldKey}`]"},{name:"validate",rawName:"v-validate",value:e.validationFields?e.validationFields[r]:"",expression:"(validationFields ? validationFields[fieldKey] : '')"}],class:["form-control",e.errors.first(r)?"is-invalid":"",e.fields[r]&&e.fields[r].dirty&&!e.errors.first(r)?"is-valid":""],attrs:{name:r,"data-vv-as":e._f("beautify")(r),type:t},domProps:{value:e.resourceData[""+r]},on:{input:function(t){t.target.composing||e.$set(e.resourceData,""+r,t.target.value)}}}),e._v(" "),n("div",{staticClass:"invalid-feedback"},[e._v(e._s(e.errors.first(r)))])])}),e._v(" "),e._l(e.relationalFields,function(t,r){return e.relationalData&&"BelongsTo"===t.relationshipType||"BelongsToMany"===t.relationshipType||"HasOne"===t.relationshipType||"HasMany"===t.relationshipType?n("div",{staticClass:"form-group"},[n("label",{staticClass:"form-label"},[e._v(e._s(e._f("beautify")(r)))]),e._v(" "),e.relationalData&&"BelongsToMany"===t.relationshipType||"HasMany"===t.relationshipType?n("select",{directives:[{name:"model",rawName:"v-model",value:t.relationshipId,expression:"relationalMetaData.relationshipId"}],staticClass:"form-control",attrs:{multiple:"true"},on:{change:function(n){var r=Array.prototype.filter.call(n.target.options,function(e){return e.selected}).map(function(e){return"_value"in e?e._value:e.value});e.$set(t,"relationshipId",n.target.multiple?r:r[0])}}},[n("option",{attrs:{disabled:"",selected:"",value:""}},[e._v("Select "+e._s(e._f("beautify")(r)))]),e._v(" "),e._l(e.relationalData[""+r],function(r){return e.relationalData?n("option",{domProps:{value:r.id}},[e._v(e._s(r[""+t.resourceTitle]))]):e._e()})],2):e._e(),e._v(" "),"HasMany"===t.relationshipType?n("p",{staticStyle:{color:"red"}},[e._v("*Removing data from a HasMany relationship will delete the record")]):e._e(),e._v(" "),e.relationalData&&"BelongsTo"===t.relationshipType||"HasOne"===t.relationshipType?n("select",{directives:[{name:"model",rawName:"v-model",value:t.relationshipId,expression:"relationalMetaData.relationshipId"}],staticClass:"form-control",on:{change:function(n){var r=Array.prototype.filter.call(n.target.options,function(e){return e.selected}).map(function(e){return"_value"in e?e._value:e.value});e.$set(t,"relationshipId",n.target.multiple?r:r[0])}}},[n("option",{attrs:{disabled:"",selected:"",value:""}},[e._v("Select "+e._s(e._f("beautify")(r)))]),e._v(" "),e._l(e.relationalData[""+r],function(r){return e.relationalData?n("option",{domProps:{value:r.id}},[e._v(e._s(r[""+t.resourceTitle]))]):e._e()})],2):e._e()]):e._e()})],2)])])])]),e._v(" "),n("div",{staticClass:"card-footer text-right"},[e._l(e.alertData,function(e,t){return n("alert-component",{key:t,attrs:{alertLevel:e.level,alertMessage:e.message}})}),e._v(" "),n("button",{class:["btn","btn-primary","btn-block","btn-black",this.loading?"btn-loading":""],attrs:{type:"button"},on:{click:function(t){e.handleAction(e.action)}}},[e._v(e._s(e.handleButtonText))])],2)])])])},staticRenderFns:[]}},ka9d:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"SidebarComponent",props:["allResourceNames","pathPrefix"],mounted:function(){}}},mypn:function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,i,a,o,s,u=1,l={},c=!1,d=e.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(e);f=f&&f.setTimeout?f:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick(function(){v(e)})}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((a=new MessageChannel).port1.onmessage=function(e){v(e.data)},r=function(e){a.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(i=d.documentElement,r=function(e){var t=d.createElement("script");t.onreadystatechange=function(){v(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):r=function(e){setTimeout(v,0,e)}:(o="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&v(+t.data.slice(o.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(o+t,"*")}),f.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;nn.parts.length&&(r.parts.length=n.parts.length)}else{var o=[];for(i=0;i0;)t[n]=arguments[n+1];if(m(Object.assign))return Object.assign.apply(Object,[e].concat(t));if(null==e)throw new TypeError("Cannot convert undefined or null to object");var r=Object(e);return t.forEach(function(e){null!=e&&Object.keys(e).forEach(function(t){r[t]=e[t]})}),r},w=0,x="{id}",$=function(e,t){for(var n=Array.isArray(e)?e:b(e),r=0;r=0&&e.maxLength<524288&&(t=d("max:"+e.maxLength,t)),e.minLength>0&&(t=d("min:"+e.minLength,t)),"number"===e.type&&(t=d("decimal",t),""!==e.min&&(t=d("min_value:"+e.min,t)),""!==e.max&&(t=d("max_value:"+e.max,t))),t;if(function(e){return O(["date","week","month","datetime-local","time"],e.type)}(e)){var n=e.step&&Number(e.step)<60?"HH:mm:ss":"HH:mm";if("date"===e.type)return d("date_format:YYYY-MM-DD",t);if("datetime-local"===e.type)return d("date_format:YYYY-MM-DDT"+n,t);if("month"===e.type)return d("date_format:YYYY-MM",t);if("week"===e.type)return d("date_format:YYYY-[W]WW",t);if("time"===e.type)return d("date_format:"+n,t)}return t},k=function(e){return m(Object.values)?Object.values(e):Object.keys(e).map(function(t){return e[t]})},O=function(e,t){return-1!==e.indexOf(t)},S=function(e){return Array.isArray(e)&&0===e.length},I="en",M=function(e){void 0===e&&(e={}),this.container={},this.merge(e)},N={locale:{configurable:!0}};N.locale.get=function(){return I},N.locale.set=function(e){I=e||"en"},M.prototype.hasLocale=function(e){return!!this.container[e]},M.prototype.setDateFormat=function(e,t){this.container[e]||(this.container[e]={}),this.container[e].dateFormat=t},M.prototype.getDateFormat=function(e){return this.container[e]&&this.container[e].dateFormat?this.container[e].dateFormat:null},M.prototype.getMessage=function(e,t,n){var r=null;return r=this.hasMessage(e,t)?this.container[e].messages[t]:this._getDefaultMessage(e),m(r)?r.apply(void 0,n):r},M.prototype.getFieldMessage=function(e,t,n,r){if(!this.hasLocale(e))return this.getMessage(e,n,r);var i=this.container[e].custom&&this.container[e].custom[t];if(!i||!i[n])return this.getMessage(e,n,r);var a=i[n];return m(a)?a.apply(void 0,r):a},M.prototype._getDefaultMessage=function(e){return this.hasMessage(e,"_default")?this.container[e].messages._default:this.container.en.messages._default},M.prototype.getAttribute=function(e,t,n){return void 0===n&&(n=""),this.hasAttribute(e,t)?this.container[e].attributes[t]:n},M.prototype.hasMessage=function(e,t){return!!(this.hasLocale(e)&&this.container[e].messages&&this.container[e].messages[t])},M.prototype.hasAttribute=function(e,t){return!!(this.hasLocale(e)&&this.container[e].attributes&&this.container[e].attributes[t])},M.prototype.merge=function(e){D(this.container,e)},M.prototype.setMessage=function(e,t,n){this.hasLocale(e)||(this.container[e]={messages:{},attributes:{}}),this.container[e].messages[t]=n},M.prototype.setAttribute=function(e,t,n){this.hasLocale(e)||(this.container[e]={messages:{},attributes:{}}),this.container[e].attributes[t]=n},Object.defineProperties(M.prototype,N);var E={default:new M({en:{messages:{},attributes:{},custom:{}}})},F="default",L=function(){};L._checkDriverName=function(e){if(!e)throw v("you must provide a name to the dictionary driver")},L.setDriver=function(e,t){void 0===t&&(t=null),this._checkDriverName(e),t&&(E[e]=t),F=e},L.getDriver=function(){return E[F]};var P=function e(t,n){void 0===t&&(t=null),void 0===n&&(n=null),this.vmId=n||null,this.items=t&&t instanceof e?t.items:[]};function j(e){return e.data?e.data.model?e.data.model:!!e.data.directives&&$(e.data.directives,function(e){return"model"===e.name}):null}function R(e){return e.componentOptions?e.componentOptions.Ctor.options.model:null}function U(e,t,n){if(m(e[t])){var r=e[t];e[t]=[r]}Array.isArray(e[t])?e[t].push(n):o(e[t])&&(e[t]=[n])}function V(e,t,n){e.componentOptions&&function(e,t,n){e.componentOptions.listeners||(e.componentOptions.listeners={}),U(e.componentOptions.listeners,t,n)}(e,t,n),function(e,t,n){o(e.data.on)&&(e.data.on={}),U(e.data.on,t,n)}(e,t,n)}function H(e,t){return e.componentOptions?(R(e)||{event:"input"}).event:t&&t.modifiers&&t.modifiers.lazy?"change":e.data.attrs&&r({type:e.data.attrs.type||"text"})?"input":"change"}function z(e,t){return Array.isArray(t)&&1===t.length?t[0]:t}P.prototype["function"==typeof Symbol?Symbol.iterator:"@@iterator"]=function(){var e=this,t=0;return{next:function(){return{value:e.items[t++],done:t>e.items.length}}}},P.prototype.add=function(e){var t;(t=this.items).push.apply(t,this._normalizeError(e))},P.prototype._normalizeError=function(e){var t=this;return Array.isArray(e)?e.map(function(e){return e.scope=o(e.scope)?null:e.scope,e.vmId=o(e.vmId)?t.vmId||null:e.vmId,e}):(e.scope=o(e.scope)?null:e.scope,e.vmId=o(e.vmId)?this.vmId||null:e.vmId,[e])},P.prototype.regenerate=function(){this.items.forEach(function(e){e.msg=m(e.regenerate)?e.regenerate():e.msg})},P.prototype.update=function(e,t){var n=$(this.items,function(t){return t.id===e});if(n){var r=this.items.indexOf(n);this.items.splice(r,1),n.scope=t.scope,this.items.push(n)}},P.prototype.all=function(e){var t=this;return this.items.filter(function(n){var r=!0,i=!0;return o(e)||(r=n.scope===e),o(t.vmId)||(i=n.vmId===t.vmId),i&&r}).map(function(e){return e.msg})},P.prototype.any=function(e){var t=this;return!!this.items.filter(function(n){var r=!0,i=!0;return o(e)||(r=n.scope===e),o(t.vmId)||(i=n.vmId===t.vmId),i&&r}).length},P.prototype.clear=function(e){var t=this,n=o(this.vmId)?function(){return!0}:function(e){return e.vmId===t.vmId};o(e)&&(e=null);for(var r=0;r=9999&&(w=0,x=x.replace("{id}","_{id}")),w++,x.replace("{id}",String(w))),this.el=e.el,this.updated=!1,this.dependencies=[],this.vmId=e.vmId,this.watchers=[],this.events=[],this.delay=0,this.rules={},this._cacheId(e),this.classNames=_({},J.classNames),e=_({},J,e),this._delay=o(e.delay)?0:e.delay,this.validity=e.validity,this.aria=e.aria,this.flags={untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1,changed:!1},this.vm=e.vm,this.componentInstance=e.component,this.ctorConfig=this.componentInstance?l("$options.$_veeValidate",this.componentInstance):void 0,this.update(e),this.initialValue=this.value,this.updated=!1},ee={validator:{configurable:!0},isRequired:{configurable:!0},isDisabled:{configurable:!0},alias:{configurable:!0},value:{configurable:!0},bails:{configurable:!0},rejectsFalse:{configurable:!0}};ee.validator.get=function(){return this.vm&&this.vm.$validator?this.vm.$validator:{validate:function(){}}},ee.isRequired.get=function(){return!!this.rules.required},ee.isDisabled.get=function(){return!(!this.componentInstance||!this.componentInstance.disabled)||!(!this.el||!this.el.disabled)},ee.alias.get=function(){if(this._alias)return this._alias;var e=null;return this.ctorConfig&&this.ctorConfig.alias&&(e=m(this.ctorConfig.alias)?this.ctorConfig.alias.call(this.componentInstance):this.ctorConfig.alias),!e&&this.el&&(e=a(this.el,"as")),!e&&this.componentInstance?this.componentInstance.$attrs&&this.componentInstance.$attrs["data-vv-as"]:e},ee.value.get=function(){if(m(this.getter))return this.getter()},ee.bails.get=function(){return this._bails},ee.rejectsFalse.get=function(){return this.componentInstance&&this.ctorConfig?!!this.ctorConfig.rejectsFalse:!!this.el&&"checkbox"===this.el.type},X.prototype.matches=function(e){var t=this;return!e||(e.id?this.id===e.id:!!(o(e.vmId)?function(){return!0}:function(e){return e===t.vmId})(e.vmId)&&(void 0===e.name&&void 0===e.scope||(void 0===e.scope?this.name===e.name:void 0===e.name?this.scope===e.scope:e.name===this.name&&e.scope===this.scope)))},X.prototype._cacheId=function(e){this.el&&!e.targetOf&&(this.el._veeValidateId=this.id)},X.prototype.waitFor=function(e){this._waitingFor=e},X.prototype.isWaitingFor=function(e){return this._waitingFor===e},X.prototype.update=function(e){var t,n,r;this.targetOf=e.targetOf||null,this.immediate=e.immediate||this.immediate||!1,!o(e.scope)&&e.scope!==this.scope&&m(this.validator.update)&&this.validator.update(this.id,{scope:e.scope}),this.scope=o(e.scope)?o(this.scope)?null:this.scope:e.scope,this.name=(o(e.name)?e.name:String(e.name))||this.name||null,this.rules=void 0!==e.rules?f(e.rules):this.rules,this._bails=void 0!==e.bails?e.bails:this._bails,this.model=e.model||this.model,this.listen=void 0!==e.listen?e.listen:this.listen,this.classes=!(!e.classes&&!this.classes)&&!this.componentInstance,this.classNames=h(e.classNames)?D(this.classNames,e.classNames):this.classNames,this.getter=m(e.getter)?e.getter:this.getter,this._alias=e.alias||this._alias,this.events=e.events?K(e.events):this.events,this.delay=(t=this.events,n=e.delay||this.delay,r=this._delay,"number"==typeof n?t.reduce(function(e,t){return e[t]=n,e},{}):t.reduce(function(e,t){return"object"==typeof n&&t in n?(e[t]=n[t],e):"number"==typeof r?(e[t]=r,e):(e[t]=r&&r[t]||0,e)},{})),this.updateDependencies(),this.addActionListeners(),void 0!==e.rules&&(this.flags.required=this.isRequired),this.flags.validated&&void 0!==e.rules&&this.updated&&this.validator.validate("#"+this.id),this.updated=!0,this.addValueListeners(),this.el&&(this.updateClasses(),this.updateAriaAttrs())},X.prototype.reset=function(){var e=this;this._cancellationToken&&(this._cancellationToken.cancelled=!0,delete this._cancellationToken);var t={untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1,changed:!1};Object.keys(this.flags).filter(function(e){return"required"!==e}).forEach(function(n){e.flags[n]=t[n]}),this.addValueListeners(),this.addActionListeners(),this.updateClasses(),this.updateAriaAttrs(),this.updateCustomValidity()},X.prototype.setFlags=function(e){var t=this,n={pristine:"dirty",dirty:"pristine",valid:"invalid",invalid:"valid",touched:"untouched",untouched:"touched"};Object.keys(e).forEach(function(r){t.flags[r]=e[r],n[r]&&void 0===e[n[r]]&&(t.flags[n[r]]=!e[r])}),void 0===e.untouched&&void 0===e.touched&&void 0===e.dirty&&void 0===e.pristine||this.addActionListeners(),this.updateClasses(),this.updateAriaAttrs(),this.updateCustomValidity()},X.prototype.updateDependencies=function(){var e=this;this.dependencies.forEach(function(e){return e.field.destroy()}),this.dependencies=[];var t=Object.keys(this.rules).reduce(function(t,n){return q.isTargetRule(n)&&t.push({selector:e.rules[n][0],name:n}),t},[]);t.length&&this.vm&&this.vm.$el&&t.forEach(function(t){var n=t.selector,r=t.name,i=e.vm.$refs[n],a=Array.isArray(i)?i[0]:i;if(a){var o={vm:e.vm,classes:e.classes,classNames:e.classNames,delay:e.delay,scope:e.scope,events:e.events.join("|"),immediate:e.immediate,targetOf:e.id};m(a.$watch)?(o.component=a,o.el=a.$el,o.getter=B.resolveGetter(a.$el,a.$vnode)):(o.el=a,o.getter=B.resolveGetter(a,{})),e.dependencies.push({name:r,field:new X(o)})}})},X.prototype.unwatch=function(e){if(void 0===e&&(e=null),!e)return this.watchers.forEach(function(e){return e.unwatch()}),void(this.watchers=[]);this.watchers.filter(function(t){return e.test(t.tag)}).forEach(function(e){return e.unwatch()}),this.watchers=this.watchers.filter(function(t){return!e.test(t.tag)})},X.prototype.updateClasses=function(){var e=this;if(this.classes&&!this.isDisabled){var t=function(t){y(t,e.classNames.dirty,e.flags.dirty),y(t,e.classNames.pristine,e.flags.pristine),y(t,e.classNames.touched,e.flags.touched),y(t,e.classNames.untouched,e.flags.untouched),!o(e.flags.valid)&&e.flags.validated&&y(t,e.classNames.valid,e.flags.valid),!o(e.flags.invalid)&&e.flags.validated&&y(t,e.classNames.invalid,e.flags.invalid)};if(i(this.el)){var n=document.querySelectorAll('input[name="'+this.el.name+'"]');b(n).forEach(t)}else t(this.el)}},X.prototype.addActionListeners=function(){var e=this;if(this.unwatch(/class/),this.el){var t=function(){e.flags.touched=!0,e.flags.untouched=!1,e.classes&&(y(e.el,e.classNames.touched,!0),y(e.el,e.classNames.untouched,!1)),e.unwatch(/^class_blur$/)},n=r(this.el)?"input":"change",a=function(){e.flags.dirty=!0,e.flags.pristine=!1,e.classes&&(y(e.el,e.classNames.pristine,!1),y(e.el,e.classNames.dirty,!0)),e.unwatch(/^class_input$/)};if(this.componentInstance&&m(this.componentInstance.$once))return this.componentInstance.$once("input",a),this.componentInstance.$once("blur",t),this.watchers.push({tag:"class_input",unwatch:function(){e.componentInstance.$off("input",a)}}),void this.watchers.push({tag:"class_blur",unwatch:function(){e.componentInstance.$off("blur",t)}});if(this.el){Q(this.el,n,a);var o=i(this.el)?"change":"blur";Q(this.el,o,t),this.watchers.push({tag:"class_input",unwatch:function(){e.el.removeEventListener(n,a)}}),this.watchers.push({tag:"class_blur",unwatch:function(){e.el.removeEventListener(o,t)}})}}},X.prototype.checkValueChanged=function(){return(null!==this.initialValue||""!==this.value||!r(this.el))&&this.value!==this.initialValue},X.prototype._determineInputEvent=function(){return this.componentInstance?this.componentInstance.$options.model&&this.componentInstance.$options.model.event||"input":this.model&&this.model.lazy?"change":r(this.el)?"input":"change"},X.prototype._determineEventList=function(e){var t=this;return!this.events.length||this.componentInstance||r(this.el)?[].concat(this.events).map(function(e){return"input"===e&&t.model&&t.model.lazy?"change":e}):this.events.map(function(t){return"input"===t?e:t})},X.prototype.addValueListeners=function(){var e=this;if(this.unwatch(/^input_.+/),this.listen&&this.el){var t={cancelled:!1},n=this.targetOf?function(){e.flags.changed=e.checkValueChanged(),e.validator.validate("#"+e.targetOf)}:function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];(0===t.length||W(t[0]))&&(t[0]=e.value),e.flags.changed=e.checkValueChanged(),e.validator.validate("#"+e.id,t[0])},r=this._determineInputEvent(),i=this._determineEventList(r);if(this.model&&O(i,r)){var a=null,o=this.model.expression;if(this.model.expression&&(a=this.vm,o=this.model.expression),!o&&this.componentInstance&&this.componentInstance.$options.model&&(a=this.componentInstance,o=this.componentInstance.$options.model.prop||"value"),a&&o){var s=c(n,this.delay[r],t),u=a.$watch(o,function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];e.flags.pending=!0,e._cancellationToken=t,s.apply(void 0,n)});this.watchers.push({tag:"input_model",unwatch:u}),i=i.filter(function(e){return e!==r})}}i.forEach(function(r){var i=c(n,e.delay[r],t),a=function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];e.flags.pending=!0,e._cancellationToken=t,i.apply(void 0,n)};e._addComponentEventListener(r,a),e._addHTMLEventListener(r,a)})}},X.prototype._addComponentEventListener=function(e,t){var n=this;this.componentInstance&&(this.componentInstance.$on(e,t),this.watchers.push({tag:"input_vue",unwatch:function(){n.componentInstance.$off(e,t)}}))},X.prototype._addHTMLEventListener=function(e,t){var n=this;if(this.el&&!this.componentInstance){var r=function(r){Q(r,e,t),n.watchers.push({tag:"input_native",unwatch:function(){r.removeEventListener(e,t)}})};if(r(this.el),i(this.el)){var a=document.querySelectorAll('input[name="'+this.el.name+'"]');b(a).forEach(function(e){e._veeValidateId&&e!==n.el||r(e)})}}},X.prototype.updateAriaAttrs=function(){var e=this;if(this.aria&&this.el&&m(this.el.setAttribute)){var t=function(t){t.setAttribute("aria-required",e.isRequired?"true":"false"),t.setAttribute("aria-invalid",e.flags.invalid?"true":"false")};if(i(this.el)){var n=document.querySelectorAll('input[name="'+this.el.name+'"]');b(n).forEach(t)}else t(this.el)}},X.prototype.updateCustomValidity=function(){this.validity&&this.el&&m(this.el.setCustomValidity)&&this.validator.errors&&this.el.setCustomValidity(this.flags.valid?"":this.validator.errors.firstById(this.id)||"")},X.prototype.destroy=function(){this._cancellationToken&&(this._cancellationToken.cancelled=!0),this.unwatch(),this.dependencies.forEach(function(e){return e.field.destroy()}),this.dependencies=[]},Object.defineProperties(X.prototype,ee);var te=function(e){void 0===e&&(e=[]),this.items=e||[]},ne={length:{configurable:!0}};te.prototype["function"==typeof Symbol?Symbol.iterator:"@@iterator"]=function(){var e=this,t=0;return{next:function(){return{value:e.items[t++],done:t>e.items.length}}}},ne.length.get=function(){return this.items.length},te.prototype.find=function(e){return $(this.items,function(t){return t.matches(e)})},te.prototype.filter=function(e){return Array.isArray(e)?this.items.filter(function(t){return e.some(function(e){return t.matches(e)})}):this.items.filter(function(t){return t.matches(e)})},te.prototype.map=function(e){return this.items.map(e)},te.prototype.remove=function(e){var t=null;if(!(t=e instanceof X?e:this.find(e)))return null;var n=this.items.indexOf(t);return this.items.splice(n,1),t},te.prototype.push=function(e){if(!(e instanceof X))throw v("FieldBag only accepts instances of Field that has an id defined.");if(!e.id)throw v("Field id must be defined.");if(this.find({id:e.id}))throw v("Field with id "+e.id+" is already added.");this.items.push(e)},Object.defineProperties(te.prototype,ne);var re=function(e,t){this.id=t._uid,this._base=e,this._paused=!1,this.errors=new P(e.errors,this.id)},ie={flags:{configurable:!0},rules:{configurable:!0},fields:{configurable:!0},dictionary:{configurable:!0},locale:{configurable:!0}};ie.flags.get=function(){var e=this;return this._base.fields.items.filter(function(t){return t.vmId===e.id}).reduce(function(e,t){return t.scope&&(e["$"+t.scope]||(e["$"+t.scope]={}),e["$"+t.scope][t.name]=t.flags),e[t.name]=t.flags,e},{})},ie.rules.get=function(){return this._base.rules},ie.fields.get=function(){return new te(this._base.fields.filter({vmId:this.id}))},ie.dictionary.get=function(){return this._base.dictionary},ie.locale.get=function(){return this._base.locale},ie.locale.set=function(e){this._base.locale=e},re.prototype.localize=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];return(e=this._base).localize.apply(e,t)},re.prototype.update=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];return(e=this._base).update.apply(e,t)},re.prototype.attach=function(e){var t=_({},e,{vmId:this.id});return this._base.attach(t)},re.prototype.pause=function(){this._paused=!0},re.prototype.resume=function(){this._paused=!1},re.prototype.remove=function(e){return this._base.remove(e)},re.prototype.detach=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];return(e=this._base).detach.apply(e,t.concat([this.id]))},re.prototype.extend=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];return(e=this._base).extend.apply(e,t)},re.prototype.validate=function(e,t,n){return void 0===n&&(n={}),this._paused?Promise.resolve(!0):this._base.validate(e,t,_({},{vmId:this.id},n||{}))},re.prototype.validateAll=function(e,t){return void 0===t&&(t={}),this._paused?Promise.resolve(!0):this._base.validateAll(e,_({},{vmId:this.id},t||{}))},re.prototype.validateScopes=function(e){return void 0===e&&(e={}),this._paused?Promise.resolve(!0):this._base.validateScopes(_({},{vmId:this.id},e||{}))},re.prototype.destroy=function(){delete this.id,delete this._base},re.prototype.reset=function(e){return this._base.reset(Object.assign({},e||{},{vmId:this.id}))},re.prototype.flag=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];return(e=this._base).flag.apply(e,t.concat([this.id]))},Object.defineProperties(re.prototype,ie);var ae={provide:function(){return this.$validator&&!C(this.$vnode)?{$validator:this.$validator}:{}},beforeCreate:function(){if(!C(this.$vnode)&&!1!==this.$options.$__veeInject){this.$parent||ke.configure(this.$options.$_veeValidate||{});var e=ke.resolveConfig(this);(!this.$parent||this.$options.$_veeValidate&&/new/.test(this.$options.$_veeValidate.validator))&&(this.$validator=new re(ke._validator,this));var t,n=(t=this.$options.inject,!(!h(t)||!t.$validator));if(this.$validator||!e.inject||n||(this.$validator=new re(ke._validator,this)),n||this.$validator){if(!n&&this.$validator)this.$options._base.util.defineReactive(this.$validator,"errors",this.$validator.errors);this.$options.computed||(this.$options.computed={}),this.$options.computed[e.errorBagName||"errors"]=function(){return this.$validator.errors},this.$options.computed[e.fieldsBagName||"fields"]=function(){return this.$validator.fields.items.reduce(function(e,t){return t.scope?(e["$"+t.scope]||(e["$"+t.scope]={}),e["$"+t.scope][t.name]=t.flags,e):(e[t.name]=t.flags,e)},{})}}}},beforeDestroy:function(){this.$validator&&this._uid===this.$validator.id&&this.$validator.errors.clear()}};function oe(e,t){return t&&t.$validator?t.$validator.fields.find({id:e._veeValidateId}):null}var se={bind:function(e,t,n){var r=n.context.$validator;if(r){var i=B.generate(e,t,n);r.attach(i)}},inserted:function(e,t,n){var r=oe(e,n.context),i=B.resolveScope(e,t,n);r&&i!==r.scope&&(r.update({scope:i}),r.updated=!1)},update:function(e,t,n){var r=oe(e,n.context);if(!(!r||r.updated&&s(t.value,t.oldValue))){var i=B.resolveScope(e,t,n),a=B.resolveRules(e,t,n);r.update({scope:i,rules:a})}},unbind:function(e,t,n){var r=n.context,i=oe(e,r);i&&r.$validator.detach(i)}},ue=function(e,t){void 0===t&&(t={fastExit:!0}),this.errors=new P,this.fields=new te,this._createFields(e),this.paused=!1,this.fastExit=!!o(t&&t.fastExit)||t.fastExit},le={rules:{configurable:!0},dictionary:{configurable:!0},flags:{configurable:!0},locale:{configurable:!0}},ce={rules:{configurable:!0},dictionary:{configurable:!0},locale:{configurable:!0}};ce.rules.get=function(){return q.rules},le.rules.get=function(){return q.rules},le.dictionary.get=function(){return Se.i18nDriver},ce.dictionary.get=function(){return Se.i18nDriver},le.flags.get=function(){return this.fields.items.reduce(function(e,t){var n;return t.scope?(e["$"+t.scope]=((n={})[t.name]=t.flags,n),e):(e[t.name]=t.flags,e)},{})},le.locale.get=function(){return ue.locale},le.locale.set=function(e){ue.locale=e},ce.locale.get=function(){return Se.i18nDriver.locale},ce.locale.set=function(e){var t=e!==Se.i18nDriver.locale;Se.i18nDriver.locale=e,t&&Se.instance&&Se.instance._vm&&Se.instance._vm.$emit("localeChanged")},ue.create=function(e,t){return new ue(e,t)},ue.extend=function(e,t,n){void 0===n&&(n={}),ue._guardExtend(e,t),ue._merge(e,{validator:t,paramNames:n&&n.paramNames,options:_({},{hasTarget:!1,immediate:!0},n||{})})},ue.remove=function(e){q.remove(e)},ue.isTargetRule=function(e){return q.isTargetRule(e)},ue.prototype.localize=function(e,t){ue.localize(e,t)},ue.localize=function(e,t){var n;if(h(e))Se.i18nDriver.merge(e);else{if(t){var r=e||t.name;t=_({},t),Se.i18nDriver.merge(((n={})[r]=t,n))}e&&(ue.locale=e)}},ue.prototype.attach=function(e){var t=this,n=e.initialValue,r=new X(e);return this.fields.push(r),r.immediate?Se.instance._vm.$nextTick(function(){return t.validate("#"+r.id,n||r.value,{vmId:e.vmId})}):this._validate(r,n||r.value,{initial:!0}).then(function(e){r.flags.valid=e.valid,r.flags.invalid=!e.valid}),r},ue.prototype.flag=function(e,t,n){void 0===n&&(n=null);var r=this._resolveField(e,void 0,n);r&&t&&r.setFlags(t)},ue.prototype.detach=function(e,t,n){var r=m(e.destroy)?e:this._resolveField(e,t,n);r&&(r.destroy(),this.errors.remove(r.name,r.scope,r.vmId),this.fields.remove(r))},ue.prototype.extend=function(e,t,n){void 0===n&&(n={}),ue.extend(e,t,n)},ue.prototype.reset=function(e){var t=this;return Se.instance._vm.$nextTick().then(function(){return Se.instance._vm.$nextTick()}).then(function(){t.fields.filter(e).forEach(function(n){n.waitFor(null),n.reset(),t.errors.remove(n.name,n.scope,e&&e.vmId)})})},ue.prototype.update=function(e,t){var n=t.scope;this._resolveField("#"+e)&&this.errors.update(e,{scope:n})},ue.prototype.remove=function(e){ue.remove(e)},ue.prototype.validate=function(e,t,n){var r=this;void 0===n&&(n={});var i=n.silent,a=n.vmId;if(this.paused)return Promise.resolve(!0);if(o(e))return this.validateScopes({silent:i,vmId:a});if("*"===e)return this.validateAll(void 0,{silent:i,vmId:a});if(/^(.+)\.\*$/.test(e)){var s=e.match(/^(.+)\.\*$/)[1];return this.validateAll(s)}var u=this._resolveField(e);if(!u)return this._handleFieldNotFound(name);i||(u.flags.pending=!0),void 0===t&&(t=u.value);var l=this._validate(u,t);return u.waitFor(l),l.then(function(e){return!i&&u.isWaitingFor(l)&&(u.waitFor(null),r._handleValidationResults([e],a)),e.valid})},ue.prototype.pause=function(){return this.paused=!0,this},ue.prototype.resume=function(){return this.paused=!1,this},ue.prototype.validateAll=function(e,t){var n=this;void 0===t&&(t={});var r=t.silent,i=t.vmId;if(this.paused)return Promise.resolve(!0);var a=null,o=!1;return"string"==typeof e?a={scope:e,vmId:i}:h(e)?(a=Object.keys(e).map(function(e){return{name:e,vmId:i,scope:null}}),o=!0):a=Array.isArray(e)?e.map(function(e){return{name:e,vmId:i}}):{scope:null,vmId:i},Promise.all(this.fields.filter(a).map(function(t){return n._validate(t,o?e[t.name]:t.value)})).then(function(e){return r||n._handleValidationResults(e,i),e.every(function(e){return e.valid})})},ue.prototype.validateScopes=function(e){var t=this;void 0===e&&(e={});var n=e.silent,r=e.vmId;return this.paused?Promise.resolve(!0):Promise.all(this.fields.filter({vmId:r}).map(function(e){return t._validate(e,e.value)})).then(function(e){return n||t._handleValidationResults(e,r),e.every(function(e){return e.valid})})},ue.prototype.verify=function(e,t,n){void 0===n&&(n={});var r={name:n&&n.name||"{field}",rules:f(t),bails:l("bails",n,!0)};r.isRequired=r.rules.required;var i=Object.keys(r.rules).filter(ue.isTargetRule);return i.length&&n&&h(n.values)&&i.forEach(function(e){var t=r.rules[e],i=t[0],a=t.slice(1);r.rules[e]=[n.values[i]].concat(a)}),this._validate(r,e).then(function(e){return{valid:e.valid,errors:e.errors.map(function(e){return e.msg})}})},ue.prototype.destroy=function(){Se.instance._vm.$off("localeChanged")},ue.prototype._createFields=function(e){var t=this;e&&Object.keys(e).forEach(function(n){var r=_({},{name:n,rules:e[n]});t.attach(r)})},ue.prototype._getDateFormat=function(e){var t=null;return e.date_format&&Array.isArray(e.date_format)&&(t=e.date_format[0]),t||Se.i18nDriver.getDateFormat(this.locale)},ue.prototype._formatErrorMessage=function(e,t,n,r){void 0===n&&(n={}),void 0===r&&(r=null);var i=this._getFieldDisplayName(e),a=this._getLocalizedParams(t,r);return Se.i18nDriver.getFieldMessage(this.locale,e.name,t.name,[i,a,n])},ue.prototype._convertParamObjectToArray=function(e,t){if(Array.isArray(e))return e;var n=q.getParamNames(t);return n&&h(e)?n.reduce(function(t,n){return n in e&&t.push(e[n]),t},[]):e},ue.prototype._getLocalizedParams=function(e,t){void 0===t&&(t=null);var n=this._convertParamObjectToArray(e.params,e.name);return e.options.hasTarget&&n&&n[0]?[t||Se.i18nDriver.getAttribute(this.locale,n[0],n[0])].concat(n.slice(1)):n},ue.prototype._getFieldDisplayName=function(e){return e.alias||Se.i18nDriver.getAttribute(this.locale,e.name,e.name)},ue.prototype._convertParamArrayToObj=function(e,t){var n=q.getParamNames(t);if(!n)return e;if(h(e)){if(n.some(function(t){return-1!==Object.keys(e).indexOf(t)}))return e;e=[e]}return e.reduce(function(e,t,r){return e[n[r]]=t,e},{})},ue.prototype._test=function(e,t,n){var r=this,i=q.getValidatorMethod(n.name),a=Array.isArray(n.params)?b(n.params):n.params;a||(a=[]);var o=null;if(!i||"function"!=typeof i)return Promise.reject(v("No such validator '"+n.name+"' exists."));if(n.options.hasTarget&&e.dependencies){var s=$(e.dependencies,function(e){return e.name===n.name});s&&(o=s.field.alias,a=[s.field.value].concat(a.slice(1)))}else"required"===n.name&&e.rejectsFalse&&(a=a.length?a:[!0]);if(n.options.isDate){var u=this._getDateFormat(e.rules);"date_format"!==n.name&&a.push(u)}var l=i(t,this._convertParamArrayToObj(a,n.name));return m(l.then)?l.then(function(t){var i=!0,a={};return Array.isArray(t)?i=t.every(function(e){return h(e)?e.valid:e}):(i=h(t)?t.valid:t,a=t.data),{valid:i,errors:i?[]:[r._createFieldError(e,n,a,o)]}}):(h(l)||(l={valid:l,data:{}}),{valid:l.valid,errors:l.valid?[]:[this._createFieldError(e,n,l.data,o)]})},ue._merge=function(e,t){var n=t.validator,r=t.options,i=t.paramNames,a=m(n)?n:n.validate;n.getMessage&&Se.i18nDriver.setMessage(ue.locale,e,n.getMessage),q.add(e,{validate:a,options:r,paramNames:i})},ue._guardExtend=function(e,t){if(!m(t)&&!m(t.validate))throw v("Extension Error: The validator '"+e+"' must be a function or have a 'validate' method.")},ue.prototype._createFieldError=function(e,t,n,r){var i=this;return{id:e.id,vmId:e.vmId,field:e.name,msg:this._formatErrorMessage(e,t,n,r),rule:t.name,scope:e.scope,regenerate:function(){return i._formatErrorMessage(e,t,n,r)}}},ue.prototype._resolveField=function(e,t,n){if("#"===e[0])return this.fields.find({id:e.slice(1)});if(!o(t))return this.fields.find({name:e,scope:t,vmId:n});if(O(e,".")){var r=e.split("."),i=r[0],a=r.slice(1),s=this.fields.find({name:a.join("."),scope:i,vmId:n});if(s)return s}return this.fields.find({name:e,scope:null,vmId:n})},ue.prototype._handleFieldNotFound=function(e,t){var n=o(t)?e:(o(t)?"":t+".")+e;return Promise.reject(v('Validating a non-existent field: "'+n+'". Use "attach()" first.'))},ue.prototype._handleValidationResults=function(e,t){var n=this,r=e.map(function(e){return{id:e.id}});this.errors.removeById(r.map(function(e){return e.id})),e.forEach(function(e){n.errors.remove(e.field,e.scope,t)});var i=e.reduce(function(e,t){return e.push.apply(e,t.errors),e},[]);this.errors.add(i),this.fields.filter(r).forEach(function(t){var n=$(e,function(e){return e.id===t.id});t.setFlags({pending:!1,valid:n.valid,validated:!0})})},ue.prototype._shouldSkip=function(e,t){return!1!==e.bails&&(!!e.isDisabled||!e.isRequired&&(o(t)||""===t||S(t)))},ue.prototype._shouldBail=function(e){return void 0!==e.bails?e.bails:this.fastExit},ue.prototype._validate=function(e,t,n){var r=this;void 0===n&&(n={});var i=n.initial;if(this._shouldSkip(e,t))return Promise.resolve({valid:!0,id:e.id,field:e.name,scope:e.scope,errors:[]});var a=[],o=[],s=!1;return Object.keys(e.rules).filter(function(e){return!i||!q.has(e)||q.isImmediate(e)}).some(function(n){var i=q.getOptions(n),u=r._test(e,t,{name:n,params:e.rules[n],options:i});return m(u.then)?a.push(u):!u.valid&&r._shouldBail(e)?(o.push.apply(o,u.errors),s=!0):a.push(new Promise(function(e){return e(u)})),s}),s?Promise.resolve({valid:!1,errors:o,id:e.id,field:e.name,scope:e.scope}):Promise.all(a).then(function(t){return t.reduce(function(e,t){var n;return t.valid||(n=e.errors).push.apply(n,t.errors),e.valid=e.valid&&t.valid,e},{valid:!0,errors:o,id:e.id,field:e.name,scope:e.scope})})},Object.defineProperties(ue.prototype,le),Object.defineProperties(ue,ce);var de=function(e,t){var n={pristine:function(e,t){return e&&t},dirty:function(e,t){return e||t},touched:function(e,t){return e||t},untouched:function(e,t){return e&&t},valid:function(e,t){return e&&t},invalid:function(e,t){return e||t},pending:function(e,t){return e||t},required:function(e,t){return e||t},validated:function(e,t){return e&&t}};return Object.keys(n).reduce(function(r,i){return r[i]=n[i](e[i],t[i]),r},{})},fe=function(e,t){return void 0===t&&(t=!0),Object.keys(e).reduce(function(n,r){if(!n)return n=_({},e[r]);var i=0===r.indexOf("$");return t&&i?de(fe(e[r]),n):!t&&i?n:n=de(n,e[r])},null)},pe=function(e){if(!e)return function(){return fe(this.$validator.flags)};var t=function(e){return Array.isArray(e)?e.reduce(function(e,t){return O(t,".")?e[t.split(".")[1]]=t:e[t]=t,e},{}):e}(e);return Object.keys(t).reduce(function(e,n){var r=t[n];return e[n]=function(){if(this.$validator.flags[r])return this.$validator.flags[r];if("*"===t[n])return fe(this.$validator.flags,!1);if(r.indexOf(".")<=0)return{};var e=r.split("."),i=e[0],a=e.slice(1);return i=this.$validator.flags["$"+i],"*"===(a=a.join("."))&&i?fe(i):i&&i[a]?i[a]:{}},e},{})},ve=null;function he(e){return{errors:e.messages,flags:e.flags,classes:e.classes,valid:e.isValid,reset:function(){return e.reset()},validate:function(t){return e.syncValue(t),e.validate().then(e.applyResult)},aria:{"aria-invalid":e.flags.invalid?"true":"false","aria-required":e.isRequired?"true":"false"}}}function me(e){var t=this,n=this.value!==e.value||this._needsValidation,r=this.flags.validated;if(this.initialized||(this.initialValue=e.value),this.initialized||void 0!==e.value||(n=!0),n){this.value=e.value,this.validate().then(this.immediate||r?this.applyResult:function(e){var n=e.valid;t.setFlags({valid:n,invalid:!n})})}this._needsValidation=!1}function ge(e){return{onInput:function(t){e.syncValue(t),e.setFlags({dirty:!0,pristine:!1})},onBlur:function(){e.setFlags({touched:!0,untouched:!1})},onValidate:c(function(){var t=e.validate();e._waiting=t,t.then(function(n){t===e._waiting&&(e.applyResult(n),e._waiting=null)})},e.debounce)}}var ye=0,be={$__veeInject:!1,inject:{$_veeObserver:{from:"$_veeObserver",default:function(){return this.$vnode.context.$_veeObserver||(this.$vnode.context.$_veeObserver={refs:{},$subscribe:function(e){this.refs[e.vid]=e},$unsubscribe:function(e){delete this.refs[e.vid]}}),this.$vnode.context.$_veeObserver}}},props:{vid:{type:[String,Number],default:function(){return++ye}},name:{type:String,default:null},events:{type:[Array,String],default:function(){return["input"]}},rules:{type:[Object,String],default:null},immediate:{type:Boolean,default:!1},bails:{type:Boolean,default:function(){return Se.config.fastExit}},debounce:{type:Number,default:function(){return Se.config.delay||0}}},watch:{rules:{deep:!0,handler:function(){this._needsValidation=!0}}},data:function(){return{messages:[],value:void 0,initialized:!1,initialValue:void 0,flags:{untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1,changed:!1},id:null}},methods:{setFlags:function(e){var t=this;Object.keys(e).forEach(function(n){t.flags[n]=e[n]})},syncValue:function(e){var t=W(e)?e.target.value:e;this.value=t,this.flags.changed=this.initialValue===t},reset:function(){this.messages=[],this._waiting=null,this.initialValue=this.value;var e={untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1,changed:!1};e.changed=!1,this.setFlags(e)},validate:function(){var e,t,n=this;return this.setFlags({pending:!0}),ve.verify(this.value,this.rules,{name:this.name,values:(e=this,t=e.$_veeObserver.refs,e.fieldDeps.reduce(function(n,r){if(!t[r])return n;n[r]=t[r].value;var i="$__"+r;return m(e[i])||(e[i]=t[r].$watch("value",function(){e.validate(e.value).then(e.applyResult),e[i]()})),n},{})),bails:this.bails}).then(function(e){return n.setFlags({pending:!1}),e})},applyResult:function(e){var t=e.errors;this.messages=t,this.setFlags({valid:!t.length,changed:this.value!==this.initialValue,invalid:!!t.length,validated:!0})},registerField:function(){var e,t,n;ve||(ve=Se.instance._validator),t=(e=this).id,n=e.vid,t===n&&e.$_veeObserver.refs[t]||(t!==n&&e.$_veeObserver.refs[t]===e&&e.$_veeObserver.$unsubscribe(e),e.$_veeObserver.$subscribe(e),e.id=n)}},computed:{isValid:function(){return this.flags.valid},fieldDeps:function(){var e=f(this.rules);return Object.keys(e).filter(q.isTargetRule).map(function(t){return e[t][0]})},normalizedEvents:function(){var e=this;return K(this.events).map(function(t){return"input"===t?e._inputEventName:t})},isRequired:function(){return!!f(this.rules).required},classes:function(){var e=this,t=Se.config.classNames;return Object.keys(this.flags).reduce(function(n,r){var i=t&&t[r]||r;return i&&(n[i]=e.flags[r]),n},{})}},render:function(e){var t=this;this.registerField();var n=he(this),r=this.$scopedSlots.default;if(!m(r))return z(0,this.$slots.default);var i=r(n);return function e(t){if(j(t))return[t];var n=Array.isArray(t)?t:t.children;return Array.isArray(n)?n.reduce(function(t,n){var r=e(n);return r.length&&t.push.apply(t,r),t},[]):[]}(i).forEach(function(e){(function(e){var t=j(e);this._inputEventName=this._inputEventName||H(e,t),me.call(this,t);var n=ge(this),r=n.onInput,i=n.onBlur,a=n.onValidate;V(e,this._inputEventName,r),V(e,"blur",i),this.normalizedEvents.forEach(function(t){V(e,t,a)}),this.initialized=!0}).call(t,e)}),z(0,i)},beforeDestroy:function(){this.$_veeObserver.$unsubscribe(this)}},_e={pristine:"every",dirty:"some",touched:"some",untouched:"every",valid:"every",invalid:"some",pending:"some",validated:"every"};var we={name:"ValidationObserver",provide:function(){return{$_veeObserver:this}},data:function(){return{refs:{}}},methods:{$subscribe:function(e){var t;this.refs=Object.assign({},this.refs,((t={})[e.vid]=e,t))},$unsubscribe:function(e){var t=e.vid;delete this.refs[t],this.refs=Object.assign({},this.refs)},validate:function(){return Promise.all(k(this.refs).map(function(e){return e.validate().then(function(t){return e.applyResult(t),t})})).then(function(e){return e.every(function(e){return e.valid})})},reset:function(){return k(this.refs).forEach(function(e){e.reset()})}},computed:{ctx:function(){var e=this,t={errors:{},validate:function(){var t=e.validate();return{then:function(e){t.then(function(t){return t&&m(e)?Promise.resolve(e()):Promise.resolve(t)})}}},reset:function(){return e.reset()}};return k(this.refs).reduce(function(e,t){return Object.keys(_e).forEach(function(n){var r,i;n in e?e[n]=(r=e[n],i=t.flags[n],[r,i][_e[n]](function(e){return e})):e[n]=t.flags[n]}),e.errors[t.vid]=t.messages,e},t)}},render:function(e){var t=this.$scopedSlots.default;return m(t)?z(0,t(this.ctx)):z(0,this.$slots.default)}};function xe(e,t){void 0===t&&(t=null);var n=m(e)?e.options:e;n.$__veeInject=!1;var r={name:(n.name||"AnonymousHoc")+"WithValidation",props:_({},be.props),data:be.data,computed:_({},be.computed),methods:_({},be.methods),$__veeInject:!1,beforeDestroy:be.beforeDestroy,inject:be.inject};t||(t=function(e){return e});var i=n.model&&n.model.event||"input";return r.render=function(e){var r;this.registerField();var a=he(this),o=_({},this.$listeners),s=j(this.$vnode);this._inputEventName=this._inputEventName||H(this.$vnode,s),me.call(this,s);var u=ge(this),l=u.onInput,c=u.onBlur,d=u.onValidate;U(o,i,l),U(o,"blur",c),this.normalizedEvents.forEach(function(e,t){U(o,e,d)});var f,p,v=(R(this.$vnode)||{prop:"value"}).prop,h=_({},this.$attrs,((r={})[v]=s.value,r),t(a));return e(n,{attrs:this.$attrs,props:h,on:o},(f=this.$slots,p=this.$vnode.context,Object.keys(f).reduce(function(e,t){return f[t].forEach(function(e){e.context||(f[t].context=p,e.data||(e.data={}),e.data.slot=t)}),e.concat(f[t])},[])))},r}var $e=function(e){return h(e)?Object.keys(e).reduce(function(t,n){return t[n]=$e(e[n]),t},{}):m(e)?e("{0}",["{1}","{2}","{3}"]):e},Ce=function(e,t){this.i18n=e,this.rootKey=t},Te={locale:{configurable:!0}};Te.locale.get=function(){return this.i18n.locale},Te.locale.set=function(e){p("Cannot set locale from the validator when using vue-i18n, use i18n.locale setter instead")},Ce.prototype.getDateFormat=function(e){return this.i18n.getDateTimeFormat(e||this.locale)},Ce.prototype.setDateFormat=function(e,t){this.i18n.setDateTimeFormat(e||this.locale,t)},Ce.prototype.getMessage=function(e,t,n){var r=this.rootKey+".messages."+t,i=this.i18n.t(r,n);return i!==r?i:this.i18n.t(this.rootKey+".messages._default",n)},Ce.prototype.getAttribute=function(e,t,n){void 0===n&&(n="");var r=this.rootKey+".attributes."+t,i=this.i18n.t(r);return i!==r?i:n},Ce.prototype.getFieldMessage=function(e,t,n,r){var i=this.rootKey+".custom."+t+"."+n,a=this.i18n.t(i,r);return a!==i?a:this.getMessage(e,n,r)},Ce.prototype.merge=function(e){var t=this;Object.keys(e).forEach(function(n){var r,i=D({},l(n+"."+t.rootKey,t.i18n.messages,{})),a=D(i,function(e){var t={};return e.messages&&(t.messages=$e(e.messages)),e.custom&&(t.custom=$e(e.custom)),e.attributes&&(t.attributes=e.attributes),o(e.dateFormat)||(t.dateFormat=e.dateFormat),t}(e[n]));t.i18n.mergeLocaleMessage(n,((r={})[t.rootKey]=a,r)),a.dateFormat&&t.i18n.setDateTimeFormat(n,a.dateFormat)})},Ce.prototype.setMessage=function(e,t,n){var r,i;this.merge(((i={})[e]={messages:(r={},r[t]=n,r)},i))},Ce.prototype.setAttribute=function(e,t,n){var r,i;this.merge(((i={})[e]={attributes:(r={},r[t]=n,r)},i))},Object.defineProperties(Ce.prototype,Te);var De,Ae,ke,Oe=_({},{locale:"en",delay:0,errorBagName:"errors",dictionary:null,fieldsBagName:"fields",classes:!1,classNames:null,events:"input",inject:!0,fastExit:!0,aria:!0,validity:!1,i18n:null,i18nRootKey:"validation"}),Se=function(e,t){this.configure(e),ke=this,t&&(De=t),this._validator=new ue(null,{fastExit:e&&e.fastExit}),this._initVM(this.config),this._initI18n(this.config)},Ie={i18nDriver:{configurable:!0},config:{configurable:!0}},Me={instance:{configurable:!0},i18nDriver:{configurable:!0},config:{configurable:!0}};Se.setI18nDriver=function(e,t){L.setDriver(e,t)},Se.configure=function(e){Oe=_({},Oe,e)},Se.use=function(e,t){return void 0===t&&(t={}),m(e)?ke?void e({Validator:ue,ErrorBag:P,Rules:ue.rules},t):(Ae||(Ae=[]),void Ae.push({plugin:e,options:t})):p("The plugin must be a callable function")},Se.install=function(e,t){De&&e===De||(De=e,ke=new Se(t),function(){try{var e=Object.defineProperty({},"passive",{get:function(){G=!0}});window.addEventListener("testPassive",null,e),window.removeEventListener("testPassive",null,e)}catch(e){G=!1}}(),De.mixin(ae),De.directive("validate",se),Ae&&(Ae.forEach(function(e){var t=e.plugin,n=e.options;Se.use(t,n)}),Ae=null))},Me.instance.get=function(){return ke},Ie.i18nDriver.get=function(){return L.getDriver()},Me.i18nDriver.get=function(){return L.getDriver()},Ie.config.get=function(){return Oe},Me.config.get=function(){return Oe},Se.prototype._initVM=function(e){var t=this;this._vm=new De({data:function(){return{errors:t._validator.errors,fields:t._validator.fields}}})},Se.prototype._initI18n=function(e){var t=this,n=e.dictionary,r=e.i18n,i=e.i18nRootKey,a=e.locale,o=function(){t._validator.errors.regenerate()};r?(Se.setI18nDriver("i18n",new Ce(r,i)),r._vm.$watch("locale",o)):"undefined"!=typeof window&&this._vm.$on("localeChanged",o),n&&this.i18nDriver.merge(n),a&&!r&&this._validator.localize(a)},Se.prototype.configure=function(e){Se.configure(e)},Se.prototype.resolveConfig=function(e){var t=l("$options.$_veeValidate",e,{});return _({},this.config,t)},Object.defineProperties(Se.prototype,Ie),Object.defineProperties(Se,Me),Se.version="2.1.4",Se.mixin=ae,Se.directive=se,Se.Validator=ue,Se.ErrorBag=P,Se.mapFields=pe,Se.ValidationProvider=be,Se.ValidationObserver=we,Se.withValidation=xe;var Ne,Ee={name:"en",messages:{_default:function(e){return"The "+e+" value is not valid."},after:function(e,t){var n=t[0];return"The "+e+" must be after "+(t[1]?"or equal to ":"")+n+"."},alpha:function(e){return"The "+e+" field may only contain alphabetic characters."},alpha_dash:function(e){return"The "+e+" field may contain alpha-numeric characters as well as dashes and underscores."},alpha_num:function(e){return"The "+e+" field may only contain alpha-numeric characters."},alpha_spaces:function(e){return"The "+e+" field may only contain alphabetic characters as well as spaces."},before:function(e,t){var n=t[0];return"The "+e+" must be before "+(t[1]?"or equal to ":"")+n+"."},between:function(e,t){return"The "+e+" field must be between "+t[0]+" and "+t[1]+"."},confirmed:function(e){return"The "+e+" confirmation does not match."},credit_card:function(e){return"The "+e+" field is invalid."},date_between:function(e,t){return"The "+e+" must be between "+t[0]+" and "+t[1]+"."},date_format:function(e,t){return"The "+e+" must be in the format "+t[0]+"."},decimal:function(e,t){void 0===t&&(t=[]);var n=t[0];return void 0===n&&(n="*"),"The "+e+" field must be numeric and may contain "+(n&&"*"!==n?n:"")+" decimal points."},digits:function(e,t){return"The "+e+" field must be numeric and exactly contain "+t[0]+" digits."},dimensions:function(e,t){return"The "+e+" field must be "+t[0]+" pixels by "+t[1]+" pixels."},email:function(e){return"The "+e+" field must be a valid email."},excluded:function(e){return"The "+e+" field must be a valid value."},ext:function(e){return"The "+e+" field must be a valid file."},image:function(e){return"The "+e+" field must be an image."},included:function(e){return"The "+e+" field must be a valid value."},integer:function(e){return"The "+e+" field must be an integer."},ip:function(e){return"The "+e+" field must be a valid ip address."},length:function(e,t){var n=t[0],r=t[1];return r?"The "+e+" length must be between "+n+" and "+r+".":"The "+e+" length must be "+n+"."},max:function(e,t){return"The "+e+" field may not be greater than "+t[0]+" characters."},max_value:function(e,t){return"The "+e+" field must be "+t[0]+" or less."},mimes:function(e){return"The "+e+" field must have a valid file type."},min:function(e,t){return"The "+e+" field must be at least "+t[0]+" characters."},min_value:function(e,t){return"The "+e+" field must be "+t[0]+" or more."},numeric:function(e){return"The "+e+" field may only contain numeric characters."},regex:function(e){return"The "+e+" field format is invalid."},required:function(e){return"The "+e+" field is required."},size:function(e,t){return"The "+e+" size must be less than "+function(e){var t=0==(e=1024*Number(e))?0:Math.floor(Math.log(e)/Math.log(1024));return 1*(e/Math.pow(1024,t)).toFixed(2)+" "+["Byte","KB","MB","GB","TB","PB","EB","ZB","YB"][t]}(t[0])+"."},url:function(e){return"The "+e+" field is not a valid URL."}},attributes:{}};"undefined"!=typeof VeeValidate&&VeeValidate.Validator.localize(((Ne={})[Ee.name]=Ee,Ne));var Fe=36e5,Le=6e4,Pe=2,je={dateTimeDelimeter:/[T ]/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-])(\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Re(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(null===e)return new Date(NaN);var n=t||{},r=void 0===n.additionalDigits?Pe:Number(n.additionalDigits);if(2!==r&&1!==r&&0!==r)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date)return new Date(e.getTime());if("string"!=typeof e)return new Date(e);var i=function(e){var t,n={},r=e.split(je.dateTimeDelimeter);je.plainTime.test(r[0])?(n.date=null,t=r[0]):(n.date=r[0],t=r[1]);if(t){var i=je.timezone.exec(t);i?(n.time=t.replace(i[1],""),n.timezone=i[1]):n.time=t}return n}(e),a=function(e,t){var n,r=je.YYY[t],i=je.YYYYY[t];if(n=je.YYYY.exec(e)||i.exec(e)){var a=n[1];return{year:parseInt(a,10),restDateString:e.slice(a.length)}}if(n=je.YY.exec(e)||r.exec(e)){var o=n[1];return{year:100*parseInt(o,10),restDateString:e.slice(o.length)}}return{year:null}}(i.date,r),o=a.year,s=function(e,t){if(null===t)return null;var n,r,i,a;if(0===e.length)return(r=new Date(0)).setUTCFullYear(t),r;if(n=je.MM.exec(e))return r=new Date(0),i=parseInt(n[1],10)-1,r.setUTCFullYear(t,i),r;if(n=je.DDD.exec(e)){r=new Date(0);var o=parseInt(n[1],10);return r.setUTCFullYear(t,0,o),r}if(n=je.MMDD.exec(e)){r=new Date(0),i=parseInt(n[1],10)-1;var s=parseInt(n[2],10);return r.setUTCFullYear(t,i,s),r}if(n=je.Www.exec(e))return a=parseInt(n[1],10)-1,Ue(t,a);if(n=je.WwwD.exec(e)){a=parseInt(n[1],10)-1;var u=parseInt(n[2],10)-1;return Ue(t,a,u)}return null}(a.restDateString,o);if(s){var u,l=s.getTime(),c=0;return i.time&&(c=function(e){var t,n,r;if(t=je.HH.exec(e))return(n=parseFloat(t[1].replace(",",".")))%24*Fe;if(t=je.HHMM.exec(e))return n=parseInt(t[1],10),r=parseFloat(t[2].replace(",",".")),n%24*Fe+r*Le;if(t=je.HHMMSS.exec(e)){n=parseInt(t[1],10),r=parseInt(t[2],10);var i=parseFloat(t[3].replace(",","."));return n%24*Fe+r*Le+1e3*i}return null}(i.time)),i.timezone?u=function(e){var t,n;if(t=je.timezoneZ.exec(e))return 0;if(t=je.timezoneHH.exec(e))return n=60*parseInt(t[2],10),"+"===t[1]?-n:n;if(t=je.timezoneHHMM.exec(e))return n=60*parseInt(t[2],10)+parseInt(t[3],10),"+"===t[1]?-n:n;return 0}(i.timezone):(u=new Date(l+c).getTimezoneOffset(),u=new Date(l+c+u*Le).getTimezoneOffset()),new Date(l+c+u*Le)}return new Date(e)}function Ue(e,t,n){t=t||0,n=n||0;var r=new Date(0);r.setUTCFullYear(e,0,4);var i=7*t+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+i),r}function Ve(e){e=e||{};var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var He=6e4;function ze(e,t,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");return function(e,t,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Re(e,n).getTime(),i=Number(t);return new Date(r+i)}(e,Number(t)*He,n)}function Be(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Re(e,t);return!isNaN(n)}var Ye={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};var qe=/MMMM|MM|DD|dddd/g;function Ze(e){return e.replace(qe,function(e){return e.slice(1)})}var We={lastWeek:"[last] dddd [at] LT",yesterday:"[yesterday at] LT",today:"[today at] LT",tomorrow:"[tomorrow at] LT",nextWeek:"dddd [at] LT",other:"L"};function Ke(e,t,n){return function(r,i){var a=i||{},o=a.type?String(a.type):t;return(e[o]||e[t])[n?n(Number(r)):Number(r)]}}function Ge(e,t){return function(n){var r=n||{},i=r.type?String(r.type):t;return e[i]||e[t]}}var Qe={narrow:["Su","Mo","Tu","We","Th","Fr","Sa"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Je={short:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],long:["January","February","March","April","May","June","July","August","September","October","November","December"]},Xe={uppercase:["AM","PM"],lowercase:["am","pm"],long:["a.m.","p.m."]};function et(e,t){return function(n,r){var i=r||{},a=i.type?String(i.type):t,o=e[a]||e[t];return String(n).match(o)}}function tt(e,t){return function(n,r){var i=r||{},a=i.type?String(i.type):t,o=e[a]||e[t],s=n[1];return o.findIndex(function(e){return e.test(s)})}}var nt,rt={formatDistance:function(e,t,n){var r;return n=n||{},r="string"==typeof Ye[e]?Ye[e]:1===t?Ye[e].one:Ye[e].other.replace("{{count}}",t),n.addSuffix?n.comparison>0?"in "+r:r+" ago":r},formatLong:function(e){var t={LTS:e.LTS,LT:e.LT,L:e.L,LL:e.LL,LLL:e.LLL,LLLL:e.LLLL,l:e.l||Ze(e.L),ll:e.ll||Ze(e.LL),lll:e.lll||Ze(e.LLL),llll:e.llll||Ze(e.LLLL)};return function(e){return t[e]}}({LT:"h:mm aa",LTS:"h:mm:ss aa",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY h:mm aa",LLLL:"dddd, MMMM D YYYY h:mm aa"}),formatRelative:function(e,t,n,r){return We[e]},localize:{ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},weekday:Ke(Qe,"long"),weekdays:Ge(Qe,"long"),month:Ke(Je,"long"),months:Ge(Je,"long"),timeOfDay:Ke(Xe,"long",function(e){return e/12>=1?1:0}),timesOfDay:Ge(Xe,"long")},match:{ordinalNumbers:(nt=/^(\d+)(th|st|nd|rd)?/i,function(e){return String(e).match(nt)}),ordinalNumber:function(e){return parseInt(e[1],10)},weekdays:et({narrow:/^(su|mo|tu|we|th|fr|sa)/i,short:/^(sun|mon|tue|wed|thu|fri|sat)/i,long:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},"long"),weekday:tt({any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},"any"),months:et({short:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,long:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},"long"),month:tt({any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},"any"),timesOfDay:et({short:/^(am|pm)/i,long:/^([ap]\.?\s?m\.?)/i},"long"),timeOfDay:tt({any:[/^a/i,/^p/i]},"any")},options:{weekStartsOn:0,firstWeekContainsDate:1}},it=864e5;function at(e,t){var n=Re(e,t),r=n.getTime();n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0);var i=r-n.getTime();return Math.floor(i/it)+1}function ot(e,t){var n=Re(e,t),r=n.getUTCDay(),i=(r<1?7:0)+r-1;return n.setUTCDate(n.getUTCDate()-i),n.setUTCHours(0,0,0,0),n}function st(e,t){var n=Re(e,t),r=n.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(r+1,0,4),i.setUTCHours(0,0,0,0);var a=ot(i,t),o=new Date(0);o.setUTCFullYear(r,0,4),o.setUTCHours(0,0,0,0);var s=ot(o,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function ut(e,t){var n=st(e,t),r=new Date(0);return r.setUTCFullYear(n,0,4),r.setUTCHours(0,0,0,0),ot(r,t)}var lt=6048e5;function ct(e,t){var n=Re(e,t),r=ot(n,t).getTime()-ut(n,t).getTime();return Math.round(r/lt)+1}var dt={M:function(e){return e.getUTCMonth()+1},Mo:function(e,t){var n=e.getUTCMonth()+1;return t.locale.localize.ordinalNumber(n,{unit:"month"})},MM:function(e){return pt(e.getUTCMonth()+1,2)},MMM:function(e,t){return t.locale.localize.month(e.getUTCMonth(),{type:"short"})},MMMM:function(e,t){return t.locale.localize.month(e.getUTCMonth(),{type:"long"})},Q:function(e){return Math.ceil((e.getUTCMonth()+1)/3)},Qo:function(e,t){var n=Math.ceil((e.getUTCMonth()+1)/3);return t.locale.localize.ordinalNumber(n,{unit:"quarter"})},D:function(e){return e.getUTCDate()},Do:function(e,t){return t.locale.localize.ordinalNumber(e.getUTCDate(),{unit:"dayOfMonth"})},DD:function(e){return pt(e.getUTCDate(),2)},DDD:function(e){return at(e)},DDDo:function(e,t){return t.locale.localize.ordinalNumber(at(e),{unit:"dayOfYear"})},DDDD:function(e){return pt(at(e),3)},dd:function(e,t){return t.locale.localize.weekday(e.getUTCDay(),{type:"narrow"})},ddd:function(e,t){return t.locale.localize.weekday(e.getUTCDay(),{type:"short"})},dddd:function(e,t){return t.locale.localize.weekday(e.getUTCDay(),{type:"long"})},d:function(e){return e.getUTCDay()},do:function(e,t){return t.locale.localize.ordinalNumber(e.getUTCDay(),{unit:"dayOfWeek"})},E:function(e){return e.getUTCDay()||7},W:function(e){return ct(e)},Wo:function(e,t){return t.locale.localize.ordinalNumber(ct(e),{unit:"isoWeek"})},WW:function(e){return pt(ct(e),2)},YY:function(e){return pt(e.getUTCFullYear(),4).substr(2)},YYYY:function(e){return pt(e.getUTCFullYear(),4)},GG:function(e){return String(st(e)).substr(2)},GGGG:function(e){return st(e)},H:function(e){return e.getUTCHours()},HH:function(e){return pt(e.getUTCHours(),2)},h:function(e){var t=e.getUTCHours();return 0===t?12:t>12?t%12:t},hh:function(e){return pt(dt.h(e),2)},m:function(e){return e.getUTCMinutes()},mm:function(e){return pt(e.getUTCMinutes(),2)},s:function(e){return e.getUTCSeconds()},ss:function(e){return pt(e.getUTCSeconds(),2)},S:function(e){return Math.floor(e.getUTCMilliseconds()/100)},SS:function(e){return pt(Math.floor(e.getUTCMilliseconds()/10),2)},SSS:function(e){return pt(e.getUTCMilliseconds(),3)},Z:function(e,t){return ft((t._originalDate||e).getTimezoneOffset(),":")},ZZ:function(e,t){return ft((t._originalDate||e).getTimezoneOffset())},X:function(e,t){var n=t._originalDate||e;return Math.floor(n.getTime()/1e3)},x:function(e,t){return(t._originalDate||e).getTime()},A:function(e,t){return t.locale.localize.timeOfDay(e.getUTCHours(),{type:"uppercase"})},a:function(e,t){return t.locale.localize.timeOfDay(e.getUTCHours(),{type:"lowercase"})},aa:function(e,t){return t.locale.localize.timeOfDay(e.getUTCHours(),{type:"long"})}};function ft(e,t){t=t||"";var n=e>0?"-":"+",r=Math.abs(e),i=r%60;return n+pt(Math.floor(r/60),2)+t+pt(i,2)}function pt(e,t){for(var n=Math.abs(e).toString();n.lengthi.getTime()}function bt(e,t,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=Re(e,n),i=Re(t,n);return r.getTime()=0&&s<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=Re(e,n),l=Number(t),c=u.getUTCDay(),d=((l%7+7)%7=0&&o<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=a.locale||rt,u=s.parsers||{},l=s.units||{};if(!s.match)throw new RangeError("locale must contain match property");if(!s.formatLong)throw new RangeError("locale must contain formatLong property");var c=String(t).replace(kt,function(e){return"["===e[0]?e:"\\"===e[0]?function(e){if(e.match(/\[[\s\S]/))return e.replace(/^\[|]$/g,"");return e.replace(/\\/g,"")}(e):s.formatLong(e)});if(""===c)return""===i?Re(n,a):new Date(NaN);var d=Ve(a);d.locale=s;var f,p=c.match(s.parsingTokensRegExp||Ot),v=p.length,h=[{priority:Dt,set:It,index:0}];for(f=0;f=e},Wt={validate:Zt,paramNames:["min","max"]},Kt={validate:function(e,t){var n=t.targetValue;return String(e)===String(n)},options:{hasTarget:!0},paramNames:["targetValue"]};function Gt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Qt(e,t){return e(t={exports:{}},t.exports),t.exports}var Jt=Qt(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=function(e){if(!("string"==typeof e||e instanceof String)){var t=void 0;throw t=null===e?"null":"object"===(t=void 0===e?"undefined":n(e))&&e.constructor&&e.constructor.hasOwnProperty("name")?e.constructor.name:"a "+t,new TypeError("Expected string but received "+t+".")}},e.exports=t.default});Gt(Jt);var Xt=Gt(Qt(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,r.default)(e);var t=e.replace(/[- ]+/g,"");if(!i.test(t))return!1;for(var n=0,a=void 0,o=void 0,s=void 0,u=t.length-1;u>=0;u--)a=t.substring(u,u+1),o=parseInt(a,10),n+=s&&(o*=2)>=10?o%10+1:o,s=!s;return!(n%10!=0||!t)};var n,r=(n=Jt)&&n.__esModule?n:{default:n};var i=/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11}|6[27][0-9]{14})$/;e.exports=t.default})),en={validate:function(e){return Xt(String(e))}},tn={validate:function(e,t){void 0===t&&(t={});var n=t.min,r=t.max,i=t.inclusivity;void 0===i&&(i="()");var a=t.format;void 0===a&&(a=i,i="()");var o=Mt(String(n),a),s=Mt(String(r),a),u=Mt(String(e),a);return!!(o&&s&&u)&&("()"===i?yt(u,o)&&bt(u,s):"(]"===i?yt(u,o)&&(_t(u,s)||bt(u,s)):"[)"===i?bt(u,s)&&(_t(u,o)||yt(u,o)):_t(u,s)||_t(u,o)||bt(u,s)&&yt(u,o))},options:{isDate:!0},paramNames:["min","max","inclusivity","format"]},nn={validate:function(e,t){return!!Mt(e,t.format)},options:{isDate:!0},paramNames:["format"]},rn=function(e,t){void 0===t&&(t={});var n=t.decimals;void 0===n&&(n="*");var r=t.separator;if(void 0===r&&(r="."),Array.isArray(e))return e.every(function(e){return rn(e,{decimals:n,separator:r})});if(null===e||void 0===e||""===e)return!1;if(0===Number(n))return/^-?\d*$/.test(e);if(!new RegExp("^[-+]?\\d*(\\"+r+"\\d"+("*"===n?"+":"{1,"+n+"}")+")?$").test(e))return!1;var i=parseFloat(e);return i==i},an={validate:rn,paramNames:["decimals","separator"]},on=function(e,t){var n=t[0];if(Array.isArray(e))return e.every(function(e){return on(e,[n])});var r=String(e);return/^[0-9]*$/.test(r)&&r.length===Number(n)},sn={validate:on},un={validate:function(e,t){for(var n=t[0],r=t[1],i=[],a=0;a0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];for(var n in t)void 0===e[n]&&(e[n]=t[n]);return e},e.exports=t.default});Gt(ln);var cn=Qt(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=function(e,t){(0,i.default)(e);var r=void 0,a=void 0;"object"===(void 0===t?"undefined":n(t))?(r=t.min||0,a=t.max):(r=arguments[1],a=arguments[2]);var o=encodeURI(e).split(/%..|./).length-1;return o>=r&&(void 0===a||o<=a)};var r,i=(r=Jt)&&r.__esModule?r:{default:r};e.exports=t.default});Gt(cn);var dn=Qt(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,n.default)(e),(t=(0,r.default)(t,a)).allow_trailing_dot&&"."===e[e.length-1]&&(e=e.substring(0,e.length-1));for(var i=e.split("."),o=0;o63)return!1;if(t.require_tld){var s=i.pop();if(!i.length||!/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(s))return!1;if(/[\s\u2002-\u200B\u202F\u205F\u3000\uFEFF\uDB40\uDC20]/.test(s))return!1}for(var u,l=0;l1&&void 0!==arguments[1]?arguments[1]:"";(0,r.default)(t);n=String(n);if(!n)return e(t,4)||e(t,6);if("4"===n){if(!i.test(t))return!1;var o=t.split(".").sort(function(e,t){return e-t});return o[3]<=255}if("6"===n){var s=t.split(":"),u=!1,l=e(s[s.length-1],4),c=l?7:8;if(s.length>c)return!1;if("::"===t)return!0;"::"===t.substr(0,2)?(s.shift(),s.shift(),u=!0):"::"===t.substr(t.length-2)&&(s.pop(),s.pop(),u=!0);for(var d=0;d0&&d=1:s.length===c}return!1};var n,r=(n=Jt)&&n.__esModule?n:{default:n};var i=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,a=/^[0-9A-F]{1,4}$/i;e.exports=t.default}),pn=Gt(fn),vn=Gt(Qt(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,n.default)(e),(t=(0,r.default)(t,u)).require_display_name||t.allow_display_name){var s=e.match(l);if(s)e=s[1];else if(t.require_display_name)return!1}var h=e.split("@"),m=h.pop(),g=h.join("@"),y=m.toLowerCase();if(t.domain_specific_validation&&("gmail.com"===y||"googlemail.com"===y)){var b=(g=g.toLowerCase()).split("+")[0];if(!(0,i.default)(b.replace(".",""),{min:6,max:30}))return!1;for(var _=b.split("."),w=0;w<_.length;w++)if(!d.test(_[w]))return!1}if(!(0,i.default)(g,{max:64})||!(0,i.default)(m,{max:254}))return!1;if(!(0,a.default)(m,{require_tld:t.require_tld})){if(!t.allow_ip_domain)return!1;if(!(0,o.default)(m)){if(!m.startsWith("[")||!m.endsWith("]"))return!1;var x=m.substr(1,m.length-2);if(0===x.length||!(0,o.default)(x))return!1}}if('"'===g[0])return g=g.slice(1,g.length-1),t.allow_utf8_local_part?v.test(g):f.test(g);for(var $=t.allow_utf8_local_part?p:c,C=g.split("."),T=0;T$/i,c=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,d=/^[a-z\d]+$/,f=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,p=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,v=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i;e.exports=t.default})),hn={validate:function(e,t){return void 0===t&&(t={}),t.multiple&&(e=e.split(",").map(function(e){return e.trim()})),Array.isArray(e)?e.every(function(e){return vn(String(e),t)}):vn(String(e),t)}},mn=function(e,t){return Array.isArray(e)?e.every(function(e){return mn(e,t)}):b(t).some(function(t){return t==e})},gn={validate:mn},yn={validate:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return!mn.apply(void 0,e)}},bn={validate:function(e,t){var n=new RegExp(".("+t.join("|")+")$","i");return e.every(function(e){return n.test(e.name)})}},_n={validate:function(e){return e.every(function(e){return/\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(e.name)})}},wn={validate:function(e){return Array.isArray(e)?e.every(function(e){return/^-?[0-9]+$/.test(String(e))}):/^-?[0-9]+$/.test(String(e))}},xn={validate:function(e,t){void 0===t&&(t={});var n=t.version;return void 0===n&&(n=4),o(e)&&(e=""),Array.isArray(e)?e.every(function(e){return pn(e,n)}):pn(e,n)},paramNames:["version"]},$n={validate:function(e,t){return void 0===t&&(t=[]),e===t[0]}},Cn={validate:function(e,t){return void 0===t&&(t=[]),e!==t[0]}},Tn={validate:function(e,t){var n=t[0],r=t[1];return void 0===r&&(r=void 0),n=Number(n),void 0!==e&&null!==e&&("number"==typeof e&&(e=String(e)),e.length||(e=b(e)),function(e,t,n){return void 0===n?e.length===t:(n=Number(n),e.length>=t&&e.length<=n)}(e,n,r))}},Dn=function(e,t){var n=t[0];return void 0===e||null===e?n>=0:Array.isArray(e)?e.every(function(e){return Dn(e,[n])}):String(e).length<=n},An={validate:Dn},kn=function(e,t){var n=t[0];return null!==e&&void 0!==e&&""!==e&&(Array.isArray(e)?e.length>0&&e.every(function(e){return kn(e,[n])}):Number(e)<=n)},On={validate:kn},Sn={validate:function(e,t){var n=new RegExp(t.join("|").replace("*",".+")+"$","i");return e.every(function(e){return n.test(e.type)})}},In=function(e,t){var n=t[0];return void 0!==e&&null!==e&&(Array.isArray(e)?e.every(function(e){return In(e,[n])}):String(e).length>=n)},Mn={validate:In},Nn=function(e,t){var n=t[0];return null!==e&&void 0!==e&&""!==e&&(Array.isArray(e)?e.length>0&&e.every(function(e){return Nn(e,[n])}):Number(e)>=n)},En={validate:Nn},Fn={validate:function(e){return Array.isArray(e)?e.every(function(e){return/^[0-9]+$/.test(String(e))}):/^[0-9]+$/.test(String(e))}},Ln=function(e,t){var n=t.expression;return"string"==typeof n&&(n=new RegExp(n)),Array.isArray(e)?e.every(function(e){return Ln(e,{expression:n})}):n.test(String(e))},Pn={validate:Ln,paramNames:["expression"]},jn={validate:function(e,t){void 0===t&&(t=[]);var n=t[0];return void 0===n&&(n=!1),!(S(e)||!1===e&&n||void 0===e||null===e||!String(e).trim().length)}},Rn={validate:function(e,t){var n=t[0];if(isNaN(n))return!1;for(var r=1024*Number(n),i=0;ir)return!1;return!0}},Un=Gt(Qt(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,n.default)(e),!e||e.length>=2083||/[\s<>]/.test(e))return!1;if(0===e.indexOf("mailto:"))return!1;t=(0,a.default)(t,s);var o=void 0,c=void 0,d=void 0,f=void 0,p=void 0,v=void 0,h=void 0,m=void 0;if(h=e.split("#"),e=h.shift(),h=e.split("?"),e=h.shift(),(h=e.split("://")).length>1){if(o=h.shift().toLowerCase(),t.require_valid_protocol&&-1===t.protocols.indexOf(o))return!1}else{if(t.require_protocol)return!1;if("//"===e.substr(0,2)){if(!t.allow_protocol_relative_urls)return!1;h[0]=e.substr(2)}}if(""===(e=h.join("://")))return!1;if(h=e.split("/"),""===(e=h.shift())&&!t.require_host)return!0;if((h=e.split("@")).length>1&&(c=h.shift()).indexOf(":")>=0&&c.split(":").length>2)return!1;f=h.join("@"),v=null,m=null;var g=f.match(u);g?(d="",m=g[1],v=g[2]||null):(h=f.split(":"),d=h.shift(),h.length&&(v=h.join(":")));if(null!==v&&(p=parseInt(v,10),!/^[0-9]+$/.test(v)||p<=0||p>65535))return!1;if(!((0,i.default)(d)||(0,r.default)(d,t)||m&&(0,i.default)(m,6)))return!1;if(d=d||m,t.host_whitelist&&!l(d,t.host_whitelist))return!1;if(t.host_blacklist&&l(d,t.host_blacklist))return!1;return!0};var n=o(Jt),r=o(dn),i=o(fn),a=o(ln);function o(e){return e&&e.__esModule?e:{default:e}}var s={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1},u=/^\[([^\]]+)\](?::([0-9]+))?$/;function l(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:300,n=null;return function(){clearTimeout(n);var r=arguments,i=this;n=setTimeout(function(){e.apply(i,r)},t)}},Vue.directive("debounce",function(e,t){t.value!==t.oldValue&&(e.oninput=debounce(function(t){e.dispatchEvent(new Event("change"))},parseInt(t.value)||300))}),Vue.filter("capitalize",function(e){return e?(e=e.toString()).charAt(0).toUpperCase()+e.slice(1):""}),Vue.filter("beautify",function(e){return e?(e=e.toString().match(/[A-Za-z][a-z]*/g)||[]).join(" ").replace(/\b\w/g,function(e){return e.toUpperCase()}):""});new Vue({el:"#app"})},tTVk:function(e,t){e.exports=function(e,t){for(var n=[],r={},i=0;i",{class:n+"box "+n+"editor-visible "+n+e.o.lang+" trumbowyg"}),e.isTextarea=e.$ta.is("textarea"),e.isTextarea?(i=e.$ta.val(),e.$ed=r("
"),e.$box.insertAfter(e.$ta).append(e.$ed,e.$ta)):(e.$ed=e.$ta,i=e.$ed.html(),e.$ta=r("",{name:e.$ta.attr("id"),height:e.height}).val(i),e.$box.insertAfter(e.$ed).append(e.$ta,e.$ed),e.syncCode()),e.$ta.addClass(n+"textarea").attr("tabindex",-1),e.$ed.addClass(n+"editor").attr({contenteditable:!0,dir:e.lang._dir||"ltr"}).html(i),e.o.tabindex&&e.$ed.attr("tabindex",e.o.tabindex),e.$c.is("[placeholder]")&&e.$ed.attr("placeholder",e.$c.attr("placeholder")),e.$c.is("[spellcheck]")&&e.$ed.attr("spellcheck",e.$c.attr("spellcheck")),e.o.resetCss&&e.$ed.addClass(n+"reset-css"),e.o.autogrow||e.$ta.add(e.$ed).css({height:e.height}),e.semanticCode(),e.o.autogrowOnEnter&&e.$ed.addClass(n+"autogrow-on-enter");var a,o=!1,s=!1;e.$ed.on("dblclick","img",e.o.imgDblClickHandler).on("keydown",function(t){if(!t.ctrlKey&&!t.metaKey||t.altKey){if(e.o.tabToIndent&&"Tab"===t.key)try{return t.shiftKey?e.execCmd("outdent",!0,null):e.execCmd("indent",!0,null),!1}catch(e){}}else{o=!0;var n=e.keys[String.fromCharCode(t.which).toUpperCase()];try{return e.execCmd(n.fn,n.param),!1}catch(e){}}}).on("compositionstart compositionupdate",function(){s=!0}).on("keyup compositionend",function(t){if("compositionend"===t.type)s=!1;else if(s)return;var n=t.which;if(!(n>=37&&n<=40)){if(!t.ctrlKey&&!t.metaKey||89!==n&&90!==n)if(o||17===n)void 0===t.which&&e.semanticCode(!1,!1,!0);else{var r=!e.isIE||"compositionend"===t.type;e.semanticCode(!1,r&&13===n),e.$c.trigger("tbwchange")}else e.semanticCode(!1,!0),e.$c.trigger("tbwchange");setTimeout(function(){o=!1},50)}}).on("mouseup keydown keyup",function(t){(!t.ctrlKey&&!t.metaKey||t.altKey)&&setTimeout(function(){o=!1},50),clearTimeout(a),a=setTimeout(function(){e.updateButtonPaneStatus()},50)}).on("focus blur",function(t){if(e.$c.trigger("tbw"+t.type),"blur"===t.type&&e.clearButtonPaneStatus(),e.o.autogrowOnEnter){if(e.autogrowOnEnterDontClose)return;"focus"===t.type?(e.autogrowOnEnterWasFocused=!0,e.autogrowEditorOnEnter()):e.o.autogrow||(e.$ed.css({height:e.$ed.css("min-height")}),e.$c.trigger("tbwresize"))}}).on("cut drop",function(){setTimeout(function(){e.semanticCode(!1,!0),e.$c.trigger("tbwchange")},0)}).on("paste",function(n){if(e.o.removeformatPasted){n.preventDefault(),t.getSelection&&t.getSelection().deleteFromDocument&&t.getSelection().deleteFromDocument();try{var i=t.clipboardData.getData("Text");try{e.doc.selection.createRange().pasteHTML(i)}catch(t){e.doc.getSelection().getRangeAt(0).insertNode(e.doc.createTextNode(i))}e.$c.trigger("tbwchange",n)}catch(t){e.execCmd("insertText",(n.originalEvent||n).clipboardData.getData("text/plain"))}}r.each(e.pasteHandlers,function(e,t){t(n)}),setTimeout(function(){e.semanticCode(!1,!0),e.$c.trigger("tbwpaste",n),e.$c.trigger("tbwchange")},0)}),e.$ta.on("keyup",function(){e.$c.trigger("tbwchange")}).on("paste",function(){setTimeout(function(){e.$c.trigger("tbwchange")},0)}),e.$box.on("keydown",function(t){if(27===t.which&&1===r("."+n+"modal-box",e.$box).length)return e.closeModal(),!1})},autogrowEditorOnEnter:function(){var e=this;e.$ed.removeClass("autogrow-on-enter");var t=e.$ed[0].clientHeight;e.$ed.height("auto");var n=e.$ed[0].scrollHeight;e.$ed.addClass("autogrow-on-enter"),t!==n&&(e.$ed.height(t),setTimeout(function(){e.$ed.css({height:n}),e.$c.trigger("tbwresize")},0))},buildBtnPane:function(){var e=this,t=e.o.prefix,n=e.$btnPane=r("
",{class:t+"button-pane"});r.each(e.o.btns,function(i,a){r.isArray(a)||(a=[a]);var o=r("
",{class:t+"button-group "+(a.indexOf("fullscreen")>=0?t+"right":"")});r.each(a,function(t,n){try{e.isSupportedBtn(n)&&o.append(e.buildBtn(n))}catch(e){}}),o.html().trim().length>0&&n.append(o)}),e.$box.prepend(n)},buildBtn:function(e){var t=this,n=t.o.prefix,i=t.btnsDef[e],a=i.dropdown,o=null==i.hasIcon||i.hasIcon,s=t.lang[e]||e,u=r(" ",{type:"button",class:n+e+"-button "+(i.class||"")+(o?"":" "+n+"textual-button"),html:t.hasSvg&&o?' ':t.hideButtonTexts?"":i.text||i.title||t.lang[e]||e,title:(i.title||i.text||s)+(i.key?" ("+(t.isMac?"Cmd":"Ctrl")+" + "+i.key+")":""),tabindex:-1,mousedown:function(){return a&&!r("."+e+"-"+n+"dropdown",t.$box).is(":hidden")||r("body",t.doc).trigger("mousedown"),!((t.$btnPane.hasClass(n+"disable")||t.$box.hasClass(n+"disabled"))&&!r(this).hasClass(n+"active")&&!r(this).hasClass(n+"not-disable"))&&(t.execCmd((!a?i.fn:"dropdown")||e,i.param||e,i.forceCss),!1)}});if(a){u.addClass(n+"open-dropdown");var l=n+"dropdown",c={class:l+"-"+e+" "+l+" "+n+"fixed-top "+(i.dropdownClass||"")};c["data-"+l]=e;var d=r("
",c);r.each(a,function(e,n){t.btnsDef[n]&&t.isSupportedBtn(n)&&d.append(t.buildSubBtn(n))}),t.$box.append(d.hide())}else i.key&&(t.keys[i.key]={fn:i.fn||e,param:i.param||e});return a||(t.tagToButton[(i.tag||e).toLowerCase()]=e),u},buildSubBtn:function(e){var t=this,n=t.o.prefix,i=t.btnsDef[e],a=null==i.hasIcon||i.hasIcon;return i.key&&(t.keys[i.key]={fn:i.fn||e,param:i.param||e}),t.tagToButton[(i.tag||e).toLowerCase()]=e,r(" ",{type:"button",class:n+e+"-dropdown-button "+(i.class||"")+(i.ico?" "+n+i.ico+"-button":""),html:t.hasSvg&&a?' '+(i.text||i.title||t.lang[e]||e):i.text||i.title||t.lang[e]||e,title:i.key?"("+(t.isMac?"Cmd":"Ctrl")+" + "+i.key+")":null,style:i.style||null,mousedown:function(){return r("body",t.doc).trigger("mousedown"),t.execCmd(i.fn||e,i.param||e,i.forceCss),!1}})},isSupportedBtn:function(e){try{return this.btnsDef[e].isSupported()}catch(e){}return!0},buildOverlay:function(){var e=this;return e.$overlay=r("
",{class:e.o.prefix+"overlay"}).appendTo(e.$box),e.$overlay},showOverlay:function(){var e=this;r(t).trigger("scroll"),e.$overlay.fadeIn(200),e.$box.addClass(e.o.prefix+"box-blur")},hideOverlay:function(){var e=this;e.$overlay.fadeOut(50),e.$box.removeClass(e.o.prefix+"box-blur")},fixedBtnPaneEvents:function(){var e=this,n=e.o.fixedFullWidth,i=e.$box;e.o.fixedBtnPane&&(e.isFixed=!1,r(t).on("scroll."+e.eventNamespace+" resize."+e.eventNamespace,function(){if(i){e.syncCode();var a=r(t).scrollTop(),o=i.offset().top+1,s=e.$btnPane,u=s.outerHeight()-2;a-o>0&&a-o-e.height<0?(e.isFixed||(e.isFixed=!0,s.css({position:"fixed",top:0,left:n?0:"auto",zIndex:7}),e.$box.css({paddingTop:s.height()})),s.css({width:n?"100%":i.width()-1}),r("."+e.o.prefix+"fixed-top",i).css({position:n?"fixed":"absolute",top:n?u:u+(a-o),zIndex:15})):e.isFixed&&(e.isFixed=!1,s.removeAttr("style"),e.$box.css({paddingTop:0}),r("."+e.o.prefix+"fixed-top",i).css({position:"absolute",top:u}))}}))},setDisabled:function(e){var t=this,n=t.o.prefix;t.disabled=e,e?t.$ta.attr("disabled",!0):t.$ta.removeAttr("disabled"),t.$box.toggleClass(n+"disabled",e),t.$ed.attr("contenteditable",!e)},destroy:function(){var e=this,n=e.o.prefix;e.isTextarea?e.$box.after(e.$ta.css({height:""}).val(e.html()).removeClass(n+"textarea").show()):e.$box.after(e.$ed.css({height:""}).removeClass(n+"editor").removeAttr("contenteditable").removeAttr("dir").html(e.html()).show()),e.$ed.off("dblclick","img"),e.destroyPlugins(),e.$box.remove(),e.$c.removeData("trumbowyg"),r("body").removeClass(n+"body-fullscreen"),e.$c.trigger("tbwclose"),r(t).off("scroll."+e.eventNamespace+" resize."+e.eventNamespace)},empty:function(){this.$ta.val(""),this.syncCode(!0)},toggle:function(){var e=this,t=e.o.prefix;e.o.autogrowOnEnter&&(e.autogrowOnEnterDontClose=!e.$box.hasClass(t+"editor-hidden")),e.semanticCode(!1,!0),setTimeout(function(){e.doc.activeElement.blur(),e.$box.toggleClass(t+"editor-hidden "+t+"editor-visible"),e.$btnPane.toggleClass(t+"disable"),r("."+t+"viewHTML-button",e.$btnPane).toggleClass(t+"active"),e.$box.hasClass(t+"editor-visible")?e.$ta.attr("tabindex",-1):e.$ta.removeAttr("tabindex"),e.o.autogrowOnEnter&&!e.autogrowOnEnterDontClose&&e.autogrowEditorOnEnter()},0)},dropdown:function(e){var n=this,i=r("body",n.doc),a=n.o.prefix,o=r("[data-"+a+"dropdown="+e+"]",n.$box),s=r("."+a+e+"-button",n.$btnPane),u=o.is(":hidden");if(i.trigger("mousedown"),u){var l=s.offset().left;s.addClass(a+"active"),o.css({position:"absolute",top:s.offset().top-n.$btnPane.offset().top+s.outerHeight(),left:n.o.fixedFullWidth&&n.isFixed?l:l-n.$btnPane.offset().left}).show(),r(t).trigger("scroll"),i.on("mousedown."+n.eventNamespace,function(e){o.is(e.target)||(r("."+a+"dropdown",n.$box).hide(),r("."+a+"active",n.$btnPane).removeClass(a+"active"),i.off("mousedown."+n.eventNamespace))})}},html:function(e){var t=this;return null!=e?(t.$ta.val(e),t.syncCode(!0),t.$c.trigger("tbwchange"),t):t.$ta.val()},syncTextarea:function(){var e=this;e.$ta.val(e.$ed.text().trim().length>0||e.$ed.find(e.o.tagsToKeep.join(",")).length>0?e.$ed.html():"")},syncCode:function(e){var t=this;if(!e&&t.$ed.is(":visible"))t.syncTextarea();else{var n=r("").html(t.$ta.val()),i=r("
").append(n);r(t.o.tagsToRemove.join(","),i).remove(),t.$ed.html(i.contents().html())}if(t.o.autogrow&&(t.height=t.$ed.height(),t.height!==t.$ta.css("height")&&(t.$ta.css({height:t.height}),t.$c.trigger("tbwresize"))),t.o.autogrowOnEnter){t.$ed.height("auto");var a=t.autogrowOnEnterWasFocused?t.$ed[0].scrollHeight:t.$ed.css("min-height");a!==t.$ta.css("height")&&(t.$ed.css({height:a}),t.$c.trigger("tbwresize"))}},semanticCode:function(e,t,n){var i=this;if(i.saveRange(),i.syncCode(e),i.o.semantic){if(i.semanticTag("b",i.o.semanticKeepAttributes),i.semanticTag("i",i.o.semanticKeepAttributes),i.semanticTag("s",i.o.semanticKeepAttributes),i.semanticTag("strike",i.o.semanticKeepAttributes),t){var a=i.o.inlineElementsSelector,o=":not("+a+")";i.$ed.contents().filter(function(){return 3===this.nodeType&&this.nodeValue.trim().length>0}).wrap("
");var s=function(e){if(0!==e.length){var t=e.nextUntil(o).addBack().wrapAll("
").parent(),n=t.nextAll(a).first();t.next("br").remove(),s(n)}};s(i.$ed.children(a).first()),i.semanticTag("div",!0),i.$ed.find("p").filter(function(){return(!i.range||this!==i.range.startContainer)&&(0===r(this).text().trim().length&&0===r(this).children().not("br,span").length)}).contents().unwrap(),r("[data-tbw]",i.$ed).contents().unwrap(),i.$ed.find("p:empty").remove()}n||i.restoreRange(),i.syncTextarea()}},semanticTag:function(e,t){var n;if(null!=this.o.semantic&&"object"==typeof this.o.semantic&&this.o.semantic.hasOwnProperty(e))n=this.o.semantic[e];else{if(!0!==this.o.semantic||!this.DEFAULT_SEMANTIC_MAP.hasOwnProperty(e))return;n=this.DEFAULT_SEMANTIC_MAP[e]}r(e,this.$ed).each(function(){var e=r(this);if(0===e.contents().length)return!1;e.wrap("<"+n+"/>"),t&&r.each(e.prop("attributes"),function(){e.parent().attr(this.name,this.value)}),e.contents().unwrap()})},createLink:function(){for(var e,t,n,i=this,a=i.doc.getSelection(),o=a.focusNode,s=(new XMLSerializer).serializeToString(a.getRangeAt(0).cloneContents());["A","DIV"].indexOf(o.nodeName)<0;)o=o.parentNode;if(o&&"A"===o.nodeName){var u=r(o);s=u.text(),e=u.attr("href"),i.o.minimalLinks||(t=u.attr("title"),n=u.attr("target"));var l=i.doc.createRange();l.selectNode(o),a.removeAllRanges(),a.addRange(l)}i.saveRange();var c={url:{label:"URL",required:!0,value:e},text:{label:i.lang.text,value:s}};i.o.minimalLinks||Object.assign(c,{title:{label:i.lang.title,value:t},target:{label:i.lang.target,value:n}}),i.openModalInsert(i.lang.createLink,c,function(e){var t=i.prependUrlPrefix(e.url);if(!t.length)return!1;var n=r(['
',e.text||e.url," "].join(""));return i.o.minimalLinks||(e.title.length>0&&n.attr("title",e.title),e.target.length>0&&n.attr("target",e.target)),i.range.deleteContents(),i.range.insertNode(n[0]),i.syncCode(),i.$c.trigger("tbwchange"),!0})},prependUrlPrefix:function(e){if(!this.urlPrefix)return e;if(/^([a-z][-+.a-z0-9]*:|\/|#)/i.test(e))return e;return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)?"mailto:"+e:this.urlPrefix+e},unlink:function(){var e=this,t=e.doc.getSelection(),n=t.focusNode;if(t.isCollapsed){for(;["A","DIV"].indexOf(n.nodeName)<0;)n=n.parentNode;if(n&&"A"===n.nodeName){var r=e.doc.createRange();r.selectNode(n),t.removeAllRanges(),t.addRange(r)}}e.execCmd("unlink",void 0,void 0,!0)},insertImage:function(){var e=this;e.saveRange();var t={url:{label:"URL",required:!0},alt:{label:e.lang.description,value:e.getRangeText()}};e.o.imageWidthModalEdit&&(t.width={}),e.openModalInsert(e.lang.insertImage,t,function(t){e.execCmd("insertImage",t.url,!1,!0);var n=r('img[src="'+t.url+'"]:not([alt])',e.$box);return n.attr("alt",t.alt),e.o.imageWidthModalEdit&&n.attr({width:t.width}),e.syncCode(),e.$c.trigger("tbwchange"),!0})},fullscreen:function(){var e,n=this,i=n.o.prefix,a=i+"fullscreen",o=a+"-placeholder",s=n.$box.outerHeight();n.$box.toggleClass(a),(e=n.$box.hasClass(a))?n.$box.before(r("
",{class:o}).css({height:s})):r("."+o).remove(),r("body").toggleClass(i+"body-fullscreen",e),r(t).trigger("scroll"),n.$c.trigger("tbw"+(e?"open":"close")+"fullscreen")},execCmd:function(e,t,n,r){var i=this;r=!!r||"","dropdown"!==e&&i.$ed.focus();try{i.doc.execCommand("styleWithCSS",!1,n||!1)}catch(e){}try{i[e+r](t)}catch(n){try{e(t)}catch(n){"insertHorizontalRule"===e?t=void 0:"formatBlock"===e&&i.isIE&&(t="<"+t+">"),i.doc.execCommand(e,!1,t),i.syncCode(),i.semanticCode(!1,!0)}"dropdown"!==e&&(i.updateButtonPaneStatus(),i.$c.trigger("tbwchange"))}},openModal:function(e,n){var i=this,a=i.o.prefix;if(r("."+a+"modal-box",i.$box).length>0)return!1;i.o.autogrowOnEnter&&(i.autogrowOnEnterDontClose=!0),i.saveRange(),i.showOverlay(),i.$btnPane.addClass(a+"disable");var o=r("
",{class:a+"modal "+a+"fixed-top"}).css({top:i.$box.offset().top+i.$btnPane.height(),zIndex:99999}).appendTo(r(i.doc.body));i.$overlay.one("click",function(){return o.trigger("tbwcancel"),!1});var s=r("
",{action:"",html:n}).on("submit",function(){return o.trigger("tbwconfirm"),!1}).on("reset",function(){return o.trigger("tbwcancel"),!1}).on("submit reset",function(){i.o.autogrowOnEnter&&(i.autogrowOnEnterDontClose=!1)}),u=r("
",{class:a+"modal-box",html:s}).css({top:"-"+i.$btnPane.outerHeight(),opacity:0}).appendTo(o).animate({top:0,opacity:1},100);return r("
",{text:e,class:a+"modal-title"}).prependTo(u),o.height(u.outerHeight()+10),r("input:first",u).focus(),i.buildModalBtn("submit",u),i.buildModalBtn("reset",u),r(t).trigger("scroll"),o},buildModalBtn:function(e,t){var n=this.o.prefix;return r("
",{class:n+"modal-button "+n+"modal-"+e,type:e,text:this.lang[e]||e}).appendTo(r("form",t))},closeModal:function(){var e=this,t=e.o.prefix;e.$btnPane.removeClass(t+"disable"),e.$overlay.off();var n=r("."+t+"modal-box",r(e.doc.body));n.animate({top:"-"+n.height()},100,function(){n.parent().remove(),e.hideOverlay()}),e.restoreRange()},openModalInsert:function(e,t,n){var i=this,a=i.o.prefix,o=i.lang,s="";return r.each(t,function(e,t){var n=t.label||e,r=t.name||e,i=t.attributes||{},u=Object.keys(i).map(function(e){return e+'="'+i[e]+'"'}).join(" ");s+='
'+(o[n]?o[n]:n)+" "}),i.openModal(e,s).on("tbwconfirm",function(){var e=r("form",r(this)),a=!0,o={};r.each(t,function(t,n){var s=n.name||t,u=r('input[name="'+s+'"]',e);switch(u.attr("type").toLowerCase()){case"checkbox":o[s]=u.is(":checked");break;case"radio":o[s]=u.filter(":checked").val();break;default:o[s]=r.trim(u.val())}n.required&&""===o[s]?(a=!1,i.addErrorOnModalField(u,i.lang.required)):n.pattern&&!n.pattern.test(o[s])&&(a=!1,i.addErrorOnModalField(u,n.patternError))}),a&&(i.restoreRange(),n(o,t)&&(i.syncCode(),i.$c.trigger("tbwchange"),i.closeModal(),r(this).off("tbwconfirm")))}).one("tbwcancel",function(){r(this).off("tbwconfirm"),i.closeModal()})},addErrorOnModalField:function(e,t){var n=this.o.prefix,i=n+"msg-error",a=e.parent();e.on("change keyup",function(){a.removeClass(n+"input-error"),setTimeout(function(){a.find("."+i).remove()},150)}),a.addClass(n+"input-error").find("input+span").append(r("
",{class:i,text:t}))},getDefaultImgDblClickHandler:function(){var e=this;return function(){var t=r(this),n=t.attr("src");0===n.indexOf("data:image")&&(n="(Base64)");var i={url:{label:"URL",value:n,required:!0},alt:{label:e.lang.description,value:t.attr("alt")}};return e.o.imageWidthModalEdit&&(i.width={value:t.attr("width")?t.attr("width"):""}),e.openModalInsert(e.lang.insertImage,i,function(n){return"(Base64)"!==n.url&&t.attr({src:n.url}),t.attr({alt:n.alt}),e.o.imageWidthModalEdit&&(parseInt(n.width)>0?t.attr({width:n.width}):t.removeAttr("width")),!0}),!1}},saveRange:function(){var e=this,t=e.doc.getSelection();if(e.range=null,t&&t.rangeCount){var n,r=e.range=t.getRangeAt(0),i=e.doc.createRange();i.selectNodeContents(e.$ed[0]),i.setEnd(r.startContainer,r.startOffset),n=(i+"").length,e.metaRange={start:n,end:n+(r+"").length}}},restoreRange:function(){var e,t=this,n=t.metaRange,r=t.range,i=t.doc.getSelection();if(r){if(n&&n.start!==n.end){var a,o=0,s=[t.$ed[0]],u=!1,l=!1;for(e=t.doc.createRange();!l&&(a=s.pop());)if(3===a.nodeType){var c=o+a.length;!u&&n.start>=o&&n.start<=c&&(e.setStart(a,n.start-o),u=!0),u&&n.end>=o&&n.end<=c&&(e.setEnd(a,n.end-o),l=!0),o=c}else for(var d=a.childNodes,f=d.length;f>0;)f-=1,s.push(d[f])}try{i.removeAllRanges()}catch(e){}i.addRange(e||r)}},getRangeText:function(){return this.range+""},clearButtonPaneStatus:function(){var e=this,t=e.o.prefix,n=t+"active-button "+t+"active",i=t+"original-icon";r("."+t+"active-button",e.$btnPane).removeClass(n),r("."+i,e.$btnPane).each(function(){r(this).find("svg use").attr("xlink:href",r(this).data(i))})},updateButtonPaneStatus:function(){var e=this,t=e.o.prefix,n=t+"active-button "+t+"active",i=t+"original-icon",a=e.getTagsRecursive(e.doc.getSelection().focusNode);e.clearButtonPaneStatus(),r.each(a,function(a,o){var s=e.tagToButton[o.toLowerCase()],u=r("."+t+s+"-button",e.$btnPane);if(u.length>0)u.addClass(n);else try{var l=(u=r("."+t+"dropdown ."+t+s+"-dropdown-button",e.$box)).find("svg use"),c=u.parent().data(t+"dropdown"),d=r("."+t+c+"-button",e.$box),f=d.find("svg use");d.addClass(n),e.o.changeActiveDropdownIcon&&l.length>0&&(d.addClass(i).data(i,f.attr("xlink:href")),f.attr("xlink:href",l.attr("xlink:href")))}catch(e){}})},getTagsRecursive:function(e,t){var n=this;if(t=t||(e&&e.tagName?[e.tagName]:[]),!e||!e.parentNode)return t;var i=(e=e.parentNode).tagName;return"DIV"===i?t:("P"===i&&""!==e.style.textAlign&&t.push(e.style.textAlign),r.each(n.tagHandlers,function(r,i){t=t.concat(i(e,n))}),t.push(i),n.getTagsRecursive(e,t).filter(function(e){return null!=e}))},initPlugins:function(){var e=this;e.loadedPlugins=[],r.each(r.trumbowyg.plugins,function(t,n){n.shouldInit&&!n.shouldInit(e)||(n.init(e),n.tagHandler&&e.tagHandlers.push(n.tagHandler),e.loadedPlugins.push(n))})},destroyPlugins:function(){var e=this;r.each(this.loadedPlugins,function(t,n){n.destroy&&n.destroy(e)})}}}(navigator,window,document,jQuery)},yPLO:function(e,t,n){(function(t){(function(){var r,i,a,o,s,u,l,c;a=n("Lbik"),o=n("YzBv"),c=n("N2t0"),u=n("LQFp"),r=n("PvM9"),l=null,i="win32"===(void 0!==t&&null!==t?t.platform:void 0)?"\\":"/",e.exports={filter:function(e,t,n){return null==n&&(n={}),(null!=t?t.length:void 0)&&(null!=e?e.length:void 0)?(n=s(n,t),a(e,t,n)):[]},score:function(e,t,n){return null==n&&(n={}),(null!=e?e.length:void 0)&&(null!=t?t.length:void 0)?(n=s(n,t)).usePathScoring?u.score(e,t,n):c.score(e,t,n):0},match:function(e,t,n){var r;return null==n&&(n={}),e&&t?e===t?function(){r=[];for(var t=0,n=e.length;0<=n?t
n;0<=n?t++:t--)r.push(t);return r}.apply(this):(n=s(n,t),o.match(e,t,n)):[]},wrap:function(e,t,n){return null==n&&(n={}),e&&t?(n=s(n,t),o.wrap(e,t,n)):[]},prepareQuery:function(e,t){return null==t&&(t={}),(t=s(t,e)).preparedQuery}},s=function(e,t){return null==e.allowErrors&&(e.allowErrors=!1),null==e.usePathScoring&&(e.usePathScoring=!0),null==e.useExtensionBonus&&(e.useExtensionBonus=!1),null==e.pathSeparator&&(e.pathSeparator=i),null==e.optCharRegEx&&(e.optCharRegEx=null),null==e.wrap&&(e.wrap=null),null==e.preparedQuery&&(e.preparedQuery=l&&l.query===t?l:l=new r(t,e)),e}}).call(this)}).call(t,n("W2nU"))}},[1]);
================================================
FILE: public/assets/js/bootstrap.js
================================================
webpackJsonp([1],{"/GsU":function(t,e){},0:function(t,e,n){n("WRGp"),n("UZhg"),n("J82y"),n("ObXH"),t.exports=n("/GsU")},"1HhM":function(t,e,n){var r,i,o,s;s=function(t){function e(t){this.init(t)}e.prototype={value:0,size:100,startAngle:-Math.PI,thickness:"auto",fill:{gradient:["#3aeabb","#fdd250"]},emptyFill:"rgba(0, 0, 0, .1)",animation:{duration:1200,easing:"circleProgressEasing"},animationStartValue:0,reverse:!1,lineCap:"butt",insertMode:"prepend",constructor:e,el:null,canvas:null,ctx:null,radius:0,arcFill:null,lastFrameValue:0,init:function(e){t.extend(this,e),this.radius=this.size/2,this.initWidget(),this.initFill(),this.draw(),this.el.trigger("circle-inited")},initWidget:function(){this.canvas||(this.canvas=t("")["prepend"==this.insertMode?"prependTo":"appendTo"](this.el)[0]);var e=this.canvas;if(e.width=this.size,e.height=this.size,this.ctx=e.getContext("2d"),window.devicePixelRatio>1){var n=window.devicePixelRatio;e.style.width=e.style.height=this.size+"px",e.width=e.height=this.size*n,this.ctx.scale(n,n)}},initFill:function(){function e(){var e=t("")[0];e.width=r.size,e.height=r.size,e.getContext("2d").drawImage(n,0,0,s,s),r.arcFill=r.ctx.createPattern(e,"no-repeat"),r.drawFrame(r.lastFrameValue)}var n,r=this,i=this.fill,o=this.ctx,s=this.size;if(!i)throw Error("The fill is not specified!");if("string"==typeof i&&(i={color:i}),i.color&&(this.arcFill=i.color),i.gradient){var a=i.gradient;if(1==a.length)this.arcFill=a[0];else if(a.length>1){for(var u=i.gradientAngle||0,l=i.gradientDirection||[s/2*(1-Math.cos(u)),s/2*(1+Math.sin(u)),s/2*(1+Math.cos(u)),s/2*(1-Math.sin(u))],c=o.createLinearGradient.apply(o,l),f=0;f0,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var e=t.prototype;return e.next=function(){this._isSliding||this._slide(k)},e.nextWhenVisible=function(){!document.hidden&&n(this._element).is(":visible")&&"hidden"!==n(this._element).css("visibility")&&this.next()},e.prev=function(){this._isSliding||this._slide(P)},e.pause=function(t){t||(this._isPaused=!0),this._element.querySelector(z.NEXT_PREV)&&(l.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},e.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},e.to=function(t){var e=this;this._activeElement=this._element.querySelector(z.ACTIVE_ITEM);var r=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)n(this._element).one(R.SLID,function(){return e.to(t)});else{if(r===t)return this.pause(),void this.cycle();var i=t>r?k:P;this._slide(i,this._items[t])}},e.dispose=function(){n(this._element).off(A),n.removeData(this._element,"bs.carousel"),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},e._getConfig=function(t){return t=s({},x,t),l.typeCheckConfig(I,t,N),t},e._handleSwipe=function(){var t=Math.abs(this.touchDeltaX);if(!(t<=40)){var e=t/this.touchDeltaX;e>0&&this.prev(),e<0&&this.next()}},e._addEventListeners=function(){var t=this;this._config.keyboard&&n(this._element).on(R.KEYDOWN,function(e){return t._keydown(e)}),"hover"===this._config.pause&&n(this._element).on(R.MOUSEENTER,function(e){return t.pause(e)}).on(R.MOUSELEAVE,function(e){return t.cycle(e)}),this._addTouchEventListeners()},e._addTouchEventListeners=function(){var t=this;if(this._touchSupported){var e=function(e){t._pointerEvent&&V[e.originalEvent.pointerType.toUpperCase()]?t.touchStartX=e.originalEvent.clientX:t._pointerEvent||(t.touchStartX=e.originalEvent.touches[0].clientX)},r=function(e){t._pointerEvent&&V[e.originalEvent.pointerType.toUpperCase()]&&(t.touchDeltaX=e.originalEvent.clientX-t.touchStartX),t._handleSwipe(),"hover"===t._config.pause&&(t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout(function(e){return t.cycle(e)},500+t._config.interval))};n(this._element.querySelectorAll(z.ITEM_IMG)).on(R.DRAG_START,function(t){return t.preventDefault()}),this._pointerEvent?(n(this._element).on(R.POINTERDOWN,function(t){return e(t)}),n(this._element).on(R.POINTERUP,function(t){return r(t)}),this._element.classList.add(q)):(n(this._element).on(R.TOUCHSTART,function(t){return e(t)}),n(this._element).on(R.TOUCHMOVE,function(e){return function(e){e.originalEvent.touches&&e.originalEvent.touches.length>1?t.touchDeltaX=0:t.touchDeltaX=e.originalEvent.touches[0].clientX-t.touchStartX}(e)}),n(this._element).on(R.TOUCHEND,function(t){return r(t)}))}},e._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},e._getItemIndex=function(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(z.ITEM)):[],this._items.indexOf(t)},e._getItemByDirection=function(t,e){var n=t===k,r=t===P,i=this._getItemIndex(e),o=this._items.length-1;if((r&&0===i||n&&i===o)&&!this._config.wrap)return e;var s=(i+(t===P?-1:1))%this._items.length;return-1===s?this._items[this._items.length-1]:this._items[s]},e._triggerSlideEvent=function(t,e){var r=this._getItemIndex(t),i=this._getItemIndex(this._element.querySelector(z.ACTIVE_ITEM)),o=n.Event(R.SLIDE,{relatedTarget:t,direction:e,from:i,to:r});return n(this._element).trigger(o),o},e._setActiveIndicatorElement=function(t){if(this._indicatorsElement){var e=[].slice.call(this._indicatorsElement.querySelectorAll(z.ACTIVE));n(e).removeClass($);var r=this._indicatorsElement.children[this._getItemIndex(t)];r&&n(r).addClass($)}},e._slide=function(t,e){var r,i,o,s=this,a=this._element.querySelector(z.ACTIVE_ITEM),u=this._getItemIndex(a),c=e||a&&this._getItemByDirection(t,a),f=this._getItemIndex(c),h=Boolean(this._interval);if(t===k?(r=H,i=U,o=L):(r=W,i=B,o=j),c&&n(c).hasClass($))this._isSliding=!1;else if(!this._triggerSlideEvent(c,o).isDefaultPrevented()&&a&&c){this._isSliding=!0,h&&this.pause(),this._setActiveIndicatorElement(c);var p=n.Event(R.SLID,{relatedTarget:c,direction:o,from:u,to:f});if(n(this._element).hasClass(M)){n(c).addClass(i),l.reflow(c),n(a).addClass(r),n(c).addClass(r);var d=parseInt(c.getAttribute("data-interval"),10);d?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=d):this._config.interval=this._config.defaultInterval||this._config.interval;var g=l.getTransitionDurationFromElement(a);n(a).one(l.TRANSITION_END,function(){n(c).removeClass(r+" "+i).addClass($),n(a).removeClass($+" "+i+" "+r),s._isSliding=!1,setTimeout(function(){return n(s._element).trigger(p)},0)}).emulateTransitionEnd(g)}else n(a).removeClass($),n(c).addClass($),this._isSliding=!1,n(this._element).trigger(p);h&&this.cycle()}},t._jQueryInterface=function(e){return this.each(function(){var r=n(this).data("bs.carousel"),i=s({},x,n(this).data());"object"==typeof e&&(i=s({},i,e));var o="string"==typeof e?e:i.slide;if(r||(r=new t(this,i),n(this).data("bs.carousel",r)),"number"==typeof e)r.to(e);else if("string"==typeof o){if(void 0===r[o])throw new TypeError('No method named "'+o+'"');r[o]()}else i.interval&&(r.pause(),r.cycle())})},t._dataApiClickHandler=function(e){var r=l.getSelectorFromElement(this);if(r){var i=n(r)[0];if(i&&n(i).hasClass(F)){var o=s({},n(i).data(),n(this).data()),a=this.getAttribute("data-slide-to");a&&(o.interval=!1),t._jQueryInterface.call(n(i),o),a&&n(i).data("bs.carousel").to(a),e.preventDefault()}}},i(t,null,[{key:"VERSION",get:function(){return"4.2.1"}},{key:"Default",get:function(){return x}}]),t}();n(document).on(R.CLICK_DATA_API,z.DATA_SLIDE,K._dataApiClickHandler),n(window).on(R.LOAD_DATA_API,function(){for(var t=[].slice.call(document.querySelectorAll(z.DATA_RIDE)),e=0,r=t.length;e0&&(this._selector=s,this._triggerArray.push(o))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var e=t.prototype;return e.toggle=function(){n(this._element).hasClass(Z)?this.hide():this.show()},e.show=function(){var e,r,i=this;if(!this._isTransitioning&&!n(this._element).hasClass(Z)&&(this._parent&&0===(e=[].slice.call(this._parent.querySelectorAll(ot.ACTIVES)).filter(function(t){return"string"==typeof i._config.parent?t.getAttribute("data-parent")===i._config.parent:t.classList.contains(tt)})).length&&(e=null),!(e&&(r=n(e).not(this._selector).data("bs.collapse"))&&r._isTransitioning))){var o=n.Event(J.SHOW);if(n(this._element).trigger(o),!o.isDefaultPrevented()){e&&(t._jQueryInterface.call(n(e).not(this._selector),"hide"),r||n(e).data("bs.collapse",null));var s=this._getDimension();n(this._element).removeClass(tt).addClass(et),this._element.style[s]=0,this._triggerArray.length&&n(this._triggerArray).removeClass(nt).attr("aria-expanded",!0),this.setTransitioning(!0);var a="scroll"+(s[0].toUpperCase()+s.slice(1)),u=l.getTransitionDurationFromElement(this._element);n(this._element).one(l.TRANSITION_END,function(){n(i._element).removeClass(et).addClass(tt).addClass(Z),i._element.style[s]="",i.setTransitioning(!1),n(i._element).trigger(J.SHOWN)}).emulateTransitionEnd(u),this._element.style[s]=this._element[a]+"px"}}},e.hide=function(){var t=this;if(!this._isTransitioning&&n(this._element).hasClass(Z)){var e=n.Event(J.HIDE);if(n(this._element).trigger(e),!e.isDefaultPrevented()){var r=this._getDimension();this._element.style[r]=this._element.getBoundingClientRect()[r]+"px",l.reflow(this._element),n(this._element).addClass(et).removeClass(tt).removeClass(Z);var i=this._triggerArray.length;if(i>0)for(var o=0;o0},r._getPopperConfig=function(){var t=this,e={};"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=s({},e.offsets,t._config.offset(e.offsets)||{}),e}:e.offset=this._config.offset;var n={placement:this._getPlacement(),modifiers:{offset:e,flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(n.modifiers.applyStyle={enabled:!1}),n},t._jQueryInterface=function(e){return this.each(function(){var r=n(this).data("bs.dropdown");if(r||(r=new t(this,"object"==typeof e?e:null),n(this).data("bs.dropdown",r)),"string"==typeof e){if(void 0===r[e])throw new TypeError('No method named "'+e+'"');r[e]()}})},t._clearMenus=function(e){if(!e||3!==e.which&&("keyup"!==e.type||9===e.which))for(var r=[].slice.call(document.querySelectorAll(_t)),i=0,o=r.length;i0&&s--,40===e.which&&sdocument.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},e._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},e._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right
',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent"},Qt="show",Yt="out",Xt={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},Jt="fade",Zt="show",te=".tooltip-inner",ee=".arrow",ne="hover",re="focus",ie="click",oe="manual",se=function(){function t(t,n){if(void 0===e)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(n),this.tip=null,this._setListeners()}var r=t.prototype;return r.enable=function(){this._isEnabled=!0},r.disable=function(){this._isEnabled=!1},r.toggleEnabled=function(){this._isEnabled=!this._isEnabled},r.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,r=n(t.currentTarget).data(e);r||(r=new this.constructor(t.currentTarget,this._getDelegateConfig()),n(t.currentTarget).data(e,r)),r._activeTrigger.click=!r._activeTrigger.click,r._isWithActiveTrigger()?r._enter(null,r):r._leave(null,r)}else{if(n(this.getTipElement()).hasClass(Zt))return void this._leave(null,this);this._enter(null,this)}},r.dispose=function(){clearTimeout(this._timeout),n.removeData(this.element,this.constructor.DATA_KEY),n(this.element).off(this.constructor.EVENT_KEY),n(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&n(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,null!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},r.show=function(){var t=this;if("none"===n(this.element).css("display"))throw new Error("Please use show on visible elements");var r=n.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){n(this.element).trigger(r);var i=l.findShadowRoot(this.element),o=n.contains(null!==i?i:this.element.ownerDocument.documentElement,this.element);if(r.isDefaultPrevented()||!o)return;var s=this.getTipElement(),a=l.getUID(this.constructor.NAME);s.setAttribute("id",a),this.element.setAttribute("aria-describedby",a),this.setContent(),this.config.animation&&n(s).addClass(Jt);var u="function"==typeof this.config.placement?this.config.placement.call(this,s,this.element):this.config.placement,c=this._getAttachment(u);this.addAttachmentClass(c);var f=this._getContainer();n(s).data(this.constructor.DATA_KEY,this),n.contains(this.element.ownerDocument.documentElement,this.tip)||n(s).appendTo(f),n(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new e(this.element,s,{placement:c,modifiers:{offset:{offset:this.config.offset},flip:{behavior:this.config.fallbackPlacement},arrow:{element:ee},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(e){e.originalPlacement!==e.placement&&t._handlePopperPlacementChange(e)},onUpdate:function(e){return t._handlePopperPlacementChange(e)}}),n(s).addClass(Zt),"ontouchstart"in document.documentElement&&n(document.body).children().on("mouseover",null,n.noop);var h=function(){t.config.animation&&t._fixTransition();var e=t._hoverState;t._hoverState=null,n(t.element).trigger(t.constructor.Event.SHOWN),e===Yt&&t._leave(null,t)};if(n(this.tip).hasClass(Jt)){var p=l.getTransitionDurationFromElement(this.tip);n(this.tip).one(l.TRANSITION_END,h).emulateTransitionEnd(p)}else h()}},r.hide=function(t){var e=this,r=this.getTipElement(),i=n.Event(this.constructor.Event.HIDE),o=function(){e._hoverState!==Qt&&r.parentNode&&r.parentNode.removeChild(r),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),n(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(n(this.element).trigger(i),!i.isDefaultPrevented()){if(n(r).removeClass(Zt),"ontouchstart"in document.documentElement&&n(document.body).children().off("mouseover",null,n.noop),this._activeTrigger[ie]=!1,this._activeTrigger[re]=!1,this._activeTrigger[ne]=!1,n(this.tip).hasClass(Jt)){var s=l.getTransitionDurationFromElement(r);n(r).one(l.TRANSITION_END,o).emulateTransitionEnd(s)}else o();this._hoverState=""}},r.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},r.isWithContent=function(){return Boolean(this.getTitle())},r.addAttachmentClass=function(t){n(this.getTipElement()).addClass("bs-tooltip-"+t)},r.getTipElement=function(){return this.tip=this.tip||n(this.config.template)[0],this.tip},r.setContent=function(){var t=this.getTipElement();this.setElementContent(n(t.querySelectorAll(te)),this.getTitle()),n(t).removeClass(Jt+" "+Zt)},r.setElementContent=function(t,e){var r=this.config.html;"object"==typeof e&&(e.nodeType||e.jquery)?r?n(e).parent().is(t)||t.empty().append(e):t.text(n(e).text()):t[r?"html":"text"](e)},r.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},r._getContainer=function(){return!1===this.config.container?document.body:l.isElement(this.config.container)?n(this.config.container):n(document).find(this.config.container)},r._getAttachment=function(t){return Kt[t.toUpperCase()]},r._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach(function(e){if("click"===e)n(t.element).on(t.constructor.Event.CLICK,t.config.selector,function(e){return t.toggle(e)});else if(e!==oe){var r=e===ne?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,i=e===ne?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;n(t.element).on(r,t.config.selector,function(e){return t._enter(e)}).on(i,t.config.selector,function(e){return t._leave(e)})}}),n(this.element).closest(".modal").on("hide.bs.modal",function(){t.element&&t.hide()}),this.config.selector?this.config=s({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},r._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},r._enter=function(t,e){var r=this.constructor.DATA_KEY;(e=e||n(t.currentTarget).data(r))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),n(t.currentTarget).data(r,e)),t&&(e._activeTrigger["focusin"===t.type?re:ne]=!0),n(e.getTipElement()).hasClass(Zt)||e._hoverState===Qt?e._hoverState=Qt:(clearTimeout(e._timeout),e._hoverState=Qt,e.config.delay&&e.config.delay.show?e._timeout=setTimeout(function(){e._hoverState===Qt&&e.show()},e.config.delay.show):e.show())},r._leave=function(t,e){var r=this.constructor.DATA_KEY;(e=e||n(t.currentTarget).data(r))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),n(t.currentTarget).data(r,e)),t&&(e._activeTrigger["focusout"===t.type?re:ne]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=Yt,e.config.delay&&e.config.delay.hide?e._timeout=setTimeout(function(){e._hoverState===Yt&&e.hide()},e.config.delay.hide):e.hide())},r._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},r._getConfig=function(t){return"number"==typeof(t=s({},this.constructor.Default,n(this.element).data(),"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),l.typeCheckConfig(Bt,t,this.constructor.DefaultType),t},r._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},r._cleanTipClass=function(){var t=n(this.getTipElement()),e=t.attr("class").match(zt);null!==e&&e.length&&t.removeClass(e.join(""))},r._handlePopperPlacementChange=function(t){var e=t.instance;this.tip=e.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},r._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(n(t).removeClass(Jt),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},t._jQueryInterface=function(e){return this.each(function(){var r=n(this).data("bs.tooltip"),i="object"==typeof e&&e;if((r||!/dispose|hide/.test(e))&&(r||(r=new t(this,i),n(this).data("bs.tooltip",r)),"string"==typeof e)){if(void 0===r[e])throw new TypeError('No method named "'+e+'"');r[e]()}})},i(t,null,[{key:"VERSION",get:function(){return"4.2.1"}},{key:"Default",get:function(){return Gt}},{key:"NAME",get:function(){return Bt}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return Xt}},{key:"EVENT_KEY",get:function(){return".bs.tooltip"}},{key:"DefaultType",get:function(){return Vt}}]),t}();n.fn.tooltip=se._jQueryInterface,n.fn.tooltip.Constructor=se,n.fn.tooltip.noConflict=function(){return n.fn.tooltip=qt,se._jQueryInterface};var ae="popover",ue=n.fn.popover,le=new RegExp("(^|\\s)bs-popover\\S+","g"),ce=s({},se.Default,{placement:"right",trigger:"click",content:"",template:'
'}),fe=s({},se.DefaultType,{content:"(string|element|function)"}),he="fade",pe="show",de=".popover-header",ge=".popover-body",ve={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},me=function(t){var e,r;function o(){return t.apply(this,arguments)||this}r=t,(e=o).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r;var s=o.prototype;return s.isWithContent=function(){return this.getTitle()||this._getContent()},s.addAttachmentClass=function(t){n(this.getTipElement()).addClass("bs-popover-"+t)},s.getTipElement=function(){return this.tip=this.tip||n(this.config.template)[0],this.tip},s.setContent=function(){var t=n(this.getTipElement());this.setElementContent(t.find(de),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(ge),e),t.removeClass(he+" "+pe)},s._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},s._cleanTipClass=function(){var t=n(this.getTipElement()),e=t.attr("class").match(le);null!==e&&e.length>0&&t.removeClass(e.join(""))},o._jQueryInterface=function(t){return this.each(function(){var e=n(this).data("bs.popover"),r="object"==typeof t?t:null;if((e||!/dispose|hide/.test(t))&&(e||(e=new o(this,r),n(this).data("bs.popover",e)),"string"==typeof t)){if(void 0===e[t])throw new TypeError('No method named "'+t+'"');e[t]()}})},i(o,null,[{key:"VERSION",get:function(){return"4.2.1"}},{key:"Default",get:function(){return ce}},{key:"NAME",get:function(){return ae}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return ve}},{key:"EVENT_KEY",get:function(){return".bs.popover"}},{key:"DefaultType",get:function(){return fe}}]),o}(se);n.fn.popover=me._jQueryInterface,n.fn.popover.Constructor=me,n.fn.popover.noConflict=function(){return n.fn.popover=ue,me._jQueryInterface};var _e="scrollspy",ye=n.fn[_e],be={offset:10,method:"auto",target:""},we={offset:"number",method:"string",target:"(string|element)"},Ee={ACTIVATE:"activate.bs.scrollspy",SCROLL:"scroll.bs.scrollspy",LOAD_DATA_API:"load.bs.scrollspy.data-api"},Ce="dropdown-item",Se="active",Te={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",NAV_LIST_GROUP:".nav, .list-group",NAV_LINKS:".nav-link",NAV_ITEMS:".nav-item",LIST_ITEMS:".list-group-item",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},Oe="offset",Ie="position",Ae=function(){function t(t,e){var r=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(e),this._selector=this._config.target+" "+Te.NAV_LINKS+","+this._config.target+" "+Te.LIST_ITEMS+","+this._config.target+" "+Te.DROPDOWN_ITEMS,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,n(this._scrollElement).on(Ee.SCROLL,function(t){return r._process(t)}),this.refresh(),this._process()}var e=t.prototype;return e.refresh=function(){var t=this,e=this._scrollElement===this._scrollElement.window?Oe:Ie,r="auto"===this._config.method?e:this._config.method,i=r===Ie?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map(function(t){var e,o=l.getSelectorFromElement(t);if(o&&(e=document.querySelector(o)),e){var s=e.getBoundingClientRect();if(s.width||s.height)return[n(e)[r]().top+i,o]}return null}).filter(function(t){return t}).sort(function(t,e){return t[0]-e[0]}).forEach(function(e){t._offsets.push(e[0]),t._targets.push(e[1])})},e.dispose=function(){n.removeData(this._element,"bs.scrollspy"),n(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},e._getConfig=function(t){if("string"!=typeof(t=s({},be,"object"==typeof t&&t?t:{})).target){var e=n(t.target).attr("id");e||(e=l.getUID(_e),n(t.target).attr("id",e)),t.target="#"+e}return l.typeCheckConfig(_e,t,we),t},e._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},e._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},e._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},e._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var r=this._targets[this._targets.length-1];this._activeTarget!==r&&this._activate(r)}else{if(this._activeTarget&&t
0)return this._activeTarget=null,void this._clear();for(var i=this._offsets.length;i--;){this._activeTarget!==this._targets[i]&&t>=this._offsets[i]&&(void 0===this._offsets[i+1]||t li > .active",We='[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',He=".dropdown-toggle",Ue="> .dropdown-menu .active",Be=function(){function t(t){this._element=t}var e=t.prototype;return e.show=function(){var t=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&n(this._element).hasClass(ke)||n(this._element).hasClass(Pe))){var e,r,i=n(this._element).closest(Fe)[0],o=l.getSelectorFromElement(this._element);if(i){var s="UL"===i.nodeName||"OL"===i.nodeName?Me:$e;r=(r=n.makeArray(n(i).find(s)))[r.length-1]}var a=n.Event(xe.HIDE,{relatedTarget:this._element}),u=n.Event(xe.SHOW,{relatedTarget:r});if(r&&n(r).trigger(a),n(this._element).trigger(u),!u.isDefaultPrevented()&&!a.isDefaultPrevented()){o&&(e=document.querySelector(o)),this._activate(this._element,i);var c=function(){var e=n.Event(xe.HIDDEN,{relatedTarget:t._element}),i=n.Event(xe.SHOWN,{relatedTarget:r});n(r).trigger(e),n(t._element).trigger(i)};e?this._activate(e,e.parentNode,c):c()}}},e.dispose=function(){n.removeData(this._element,"bs.tab"),this._element=null},e._activate=function(t,e,r){var i=this,o=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?n(e).children($e):n(e).find(Me))[0],s=r&&o&&n(o).hasClass(Le),a=function(){return i._transitionComplete(t,o,r)};if(o&&s){var u=l.getTransitionDurationFromElement(o);n(o).removeClass(je).one(l.TRANSITION_END,a).emulateTransitionEnd(u)}else a()},e._transitionComplete=function(t,e,r){if(e){n(e).removeClass(ke);var i=n(e.parentNode).find(Ue)[0];i&&n(i).removeClass(ke),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}if(n(t).addClass(ke),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),l.reflow(t),n(t).addClass(je),t.parentNode&&n(t.parentNode).hasClass(Ne)){var o=n(t).closest(Re)[0];if(o){var s=[].slice.call(o.querySelectorAll(He));n(s).addClass(ke)}t.setAttribute("aria-expanded",!0)}r&&r()},t._jQueryInterface=function(e){return this.each(function(){var r=n(this),i=r.data("bs.tab");if(i||(i=new t(this),r.data("bs.tab",i)),"string"==typeof e){if(void 0===i[e])throw new TypeError('No method named "'+e+'"');i[e]()}})},i(t,null,[{key:"VERSION",get:function(){return"4.2.1"}}]),t}();n(document).on(xe.CLICK_DATA_API,We,function(t){t.preventDefault(),Be._jQueryInterface.call(n(this),"show")}),n.fn.tab=Be._jQueryInterface,n.fn.tab.Constructor=Be,n.fn.tab.noConflict=function(){return n.fn.tab=De,Be._jQueryInterface};var qe=n.fn.toast,ze={CLICK_DISMISS:"click.dismiss.bs.toast",HIDE:"hide.bs.toast",HIDDEN:"hidden.bs.toast",SHOW:"show.bs.toast",SHOWN:"shown.bs.toast"},Ve="fade",Ke="hide",Ge="show",Qe="showing",Ye={animation:"boolean",autohide:"boolean",delay:"number"},Xe={animation:!0,autohide:!0,delay:500},Je='[data-dismiss="toast"]',Ze=function(){function t(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}var e=t.prototype;return e.show=function(){var t=this;n(this._element).trigger(ze.SHOW),this._config.animation&&this._element.classList.add(Ve);var e=function(){t._element.classList.remove(Qe),t._element.classList.add(Ge),n(t._element).trigger(ze.SHOWN),t._config.autohide&&t.hide()};if(this._element.classList.remove(Ke),this._element.classList.add(Qe),this._config.animation){var r=l.getTransitionDurationFromElement(this._element);n(this._element).one(l.TRANSITION_END,e).emulateTransitionEnd(r)}else e()},e.hide=function(t){var e=this;this._element.classList.contains(Ge)&&(n(this._element).trigger(ze.HIDE),t?this._close():this._timeout=setTimeout(function(){e._close()},this._config.delay))},e.dispose=function(){clearTimeout(this._timeout),this._timeout=null,this._element.classList.contains(Ge)&&this._element.classList.remove(Ge),n(this._element).off(ze.CLICK_DISMISS),n.removeData(this._element,"bs.toast"),this._element=null,this._config=null},e._getConfig=function(t){return t=s({},Xe,n(this._element).data(),"object"==typeof t&&t?t:{}),l.typeCheckConfig("toast",t,this.constructor.DefaultType),t},e._setListeners=function(){var t=this;n(this._element).on(ze.CLICK_DISMISS,Je,function(){return t.hide(!0)})},e._close=function(){var t=this,e=function(){t._element.classList.add(Ke),n(t._element).trigger(ze.HIDDEN)};if(this._element.classList.remove(Ge),this._config.animation){var r=l.getTransitionDurationFromElement(this._element);n(this._element).one(l.TRANSITION_END,e).emulateTransitionEnd(r)}else e()},t._jQueryInterface=function(e){return this.each(function(){var r=n(this),i=r.data("bs.toast");if(i||(i=new t(this,"object"==typeof e&&e),r.data("bs.toast",i)),"string"==typeof e){if(void 0===i[e])throw new TypeError('No method named "'+e+'"');i[e](this)}})},i(t,null,[{key:"VERSION",get:function(){return"4.2.1"}},{key:"DefaultType",get:function(){return Ye}}]),t}();n.fn.toast=Ze._jQueryInterface,n.fn.toast.Constructor=Ze,n.fn.toast.noConflict=function(){return n.fn.toast=qe,Ze._jQueryInterface},function(){if(void 0===n)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=n.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||t[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(),t.Util=l,t.Alert=g,t.Button=O,t.Carousel=K,t.Collapse=st,t.Dropdown=Nt,t.Modal=Ut,t.Popover=me,t.Scrollspy=Ae,t.Tab=Be,t.Toast=Ze,t.Tooltip=se,Object.defineProperty(t,"__esModule",{value:!0})})(e,n("Zgw8"),n("7t+N"))},KCLY:function(t,e,n){"use strict";(function(e){var r=n("cGG2"),i=n("5VQ+"),o={"Content-Type":"application/x-www-form-urlencoded"};function s(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var a,u={adapter:("undefined"!=typeof XMLHttpRequest?a=n("7GwW"):void 0!==e&&(a=n("7GwW")),a),transformRequest:[function(t,e){return i(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(s(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)?(s(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],function(t){u.headers[t]={}}),r.forEach(["post","put","patch"],function(t){u.headers[t]=r.merge(o)}),t.exports=u}).call(e,n("W2nU"))},M4fF:function(t,e,n){(function(t,r){var i;(function(){var o,s=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",l="__lodash_hash_undefined__",c=500,f="__lodash_placeholder__",h=1,p=2,d=4,g=1,v=2,m=1,_=2,y=4,b=8,w=16,E=32,C=64,S=128,T=256,O=512,I=30,A="...",D=800,x=16,N=1,k=2,P=1/0,L=9007199254740991,j=1.7976931348623157e308,R=NaN,F=4294967295,$=F-1,M=F>>>1,W=[["ary",S],["bind",m],["bindKey",_],["curry",b],["curryRight",w],["flip",O],["partial",E],["partialRight",C],["rearg",T]],H="[object Arguments]",U="[object Array]",B="[object AsyncFunction]",q="[object Boolean]",z="[object Date]",V="[object DOMException]",K="[object Error]",G="[object Function]",Q="[object GeneratorFunction]",Y="[object Map]",X="[object Number]",J="[object Null]",Z="[object Object]",tt="[object Proxy]",et="[object RegExp]",nt="[object Set]",rt="[object String]",it="[object Symbol]",ot="[object Undefined]",st="[object WeakMap]",at="[object WeakSet]",ut="[object ArrayBuffer]",lt="[object DataView]",ct="[object Float32Array]",ft="[object Float64Array]",ht="[object Int8Array]",pt="[object Int16Array]",dt="[object Int32Array]",gt="[object Uint8Array]",vt="[object Uint8ClampedArray]",mt="[object Uint16Array]",_t="[object Uint32Array]",yt=/\b__p \+= '';/g,bt=/\b(__p \+=) '' \+/g,wt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Et=/&(?:amp|lt|gt|quot|#39);/g,Ct=/[&<>"']/g,St=RegExp(Et.source),Tt=RegExp(Ct.source),Ot=/<%-([\s\S]+?)%>/g,It=/<%([\s\S]+?)%>/g,At=/<%=([\s\S]+?)%>/g,Dt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xt=/^\w*$/,Nt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kt=/[\\^$.*+?()[\]{}|]/g,Pt=RegExp(kt.source),Lt=/^\s+|\s+$/g,jt=/^\s+/,Rt=/\s+$/,Ft=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,$t=/\{\n\/\* \[wrapped with (.+)\] \*/,Mt=/,? & /,Wt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ht=/\\(\\)?/g,Ut=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Bt=/\w*$/,qt=/^[-+]0x[0-9a-f]+$/i,zt=/^0b[01]+$/i,Vt=/^\[object .+?Constructor\]$/,Kt=/^0o[0-7]+$/i,Gt=/^(?:0|[1-9]\d*)$/,Qt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Yt=/($^)/,Xt=/['\n\r\u2028\u2029\\]/g,Jt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Zt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",te="[\\ud800-\\udfff]",ee="["+Zt+"]",ne="["+Jt+"]",re="\\d+",ie="[\\u2700-\\u27bf]",oe="[a-z\\xdf-\\xf6\\xf8-\\xff]",se="[^\\ud800-\\udfff"+Zt+re+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",ae="\\ud83c[\\udffb-\\udfff]",ue="[^\\ud800-\\udfff]",le="(?:\\ud83c[\\udde6-\\uddff]){2}",ce="[\\ud800-\\udbff][\\udc00-\\udfff]",fe="[A-Z\\xc0-\\xd6\\xd8-\\xde]",he="(?:"+oe+"|"+se+")",pe="(?:"+fe+"|"+se+")",de="(?:"+ne+"|"+ae+")"+"?",ge="[\\ufe0e\\ufe0f]?"+de+("(?:\\u200d(?:"+[ue,le,ce].join("|")+")[\\ufe0e\\ufe0f]?"+de+")*"),ve="(?:"+[ie,le,ce].join("|")+")"+ge,me="(?:"+[ue+ne+"?",ne,le,ce,te].join("|")+")",_e=RegExp("['’]","g"),ye=RegExp(ne,"g"),be=RegExp(ae+"(?="+ae+")|"+me+ge,"g"),we=RegExp([fe+"?"+oe+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[ee,fe,"$"].join("|")+")",pe+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[ee,fe+he,"$"].join("|")+")",fe+"?"+he+"+(?:['’](?:d|ll|m|re|s|t|ve))?",fe+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",re,ve].join("|"),"g"),Ee=RegExp("[\\u200d\\ud800-\\udfff"+Jt+"\\ufe0e\\ufe0f]"),Ce=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Se=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Te=-1,Oe={};Oe[ct]=Oe[ft]=Oe[ht]=Oe[pt]=Oe[dt]=Oe[gt]=Oe[vt]=Oe[mt]=Oe[_t]=!0,Oe[H]=Oe[U]=Oe[ut]=Oe[q]=Oe[lt]=Oe[z]=Oe[K]=Oe[G]=Oe[Y]=Oe[X]=Oe[Z]=Oe[et]=Oe[nt]=Oe[rt]=Oe[st]=!1;var Ie={};Ie[H]=Ie[U]=Ie[ut]=Ie[lt]=Ie[q]=Ie[z]=Ie[ct]=Ie[ft]=Ie[ht]=Ie[pt]=Ie[dt]=Ie[Y]=Ie[X]=Ie[Z]=Ie[et]=Ie[nt]=Ie[rt]=Ie[it]=Ie[gt]=Ie[vt]=Ie[mt]=Ie[_t]=!0,Ie[K]=Ie[G]=Ie[st]=!1;var Ae={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},De=parseFloat,xe=parseInt,Ne="object"==typeof t&&t&&t.Object===Object&&t,ke="object"==typeof self&&self&&self.Object===Object&&self,Pe=Ne||ke||Function("return this")(),Le="object"==typeof e&&e&&!e.nodeType&&e,je=Le&&"object"==typeof r&&r&&!r.nodeType&&r,Re=je&&je.exports===Le,Fe=Re&&Ne.process,$e=function(){try{var t=je&&je.require&&je.require("util").types;return t||Fe&&Fe.binding&&Fe.binding("util")}catch(t){}}(),Me=$e&&$e.isArrayBuffer,We=$e&&$e.isDate,He=$e&&$e.isMap,Ue=$e&&$e.isRegExp,Be=$e&&$e.isSet,qe=$e&&$e.isTypedArray;function ze(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ve(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i-1}function Je(t,e,n){for(var r=-1,i=null==t?0:t.length;++r-1;);return n}function wn(t,e){for(var n=t.length;n--&&un(e,t[n],0)>-1;);return n}var En=pn({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Cn=pn({"&":"&","<":"<",">":">",'"':""","'":"'"});function Sn(t){return"\\"+Ae[t]}function Tn(t){return Ee.test(t)}function On(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function In(t,e){return function(n){return t(e(n))}}function An(t,e){for(var n=-1,r=t.length,i=0,o=[];++n",""":'"',"'":"'"});var Ln=function t(e){var n,r=(e=null==e?Pe:Ln.defaults(Pe.Object(),e,Ln.pick(Pe,Se))).Array,i=e.Date,Jt=e.Error,Zt=e.Function,te=e.Math,ee=e.Object,ne=e.RegExp,re=e.String,ie=e.TypeError,oe=r.prototype,se=Zt.prototype,ae=ee.prototype,ue=e["__core-js_shared__"],le=se.toString,ce=ae.hasOwnProperty,fe=0,he=(n=/[^.]+$/.exec(ue&&ue.keys&&ue.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",pe=ae.toString,de=le.call(ee),ge=Pe._,ve=ne("^"+le.call(ce).replace(kt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),me=Re?e.Buffer:o,be=e.Symbol,Ee=e.Uint8Array,Ae=me?me.allocUnsafe:o,Ne=In(ee.getPrototypeOf,ee),ke=ee.create,Le=ae.propertyIsEnumerable,je=oe.splice,Fe=be?be.isConcatSpreadable:o,$e=be?be.iterator:o,on=be?be.toStringTag:o,pn=function(){try{var t=Mo(ee,"defineProperty");return t({},"",{}),t}catch(t){}}(),jn=e.clearTimeout!==Pe.clearTimeout&&e.clearTimeout,Rn=i&&i.now!==Pe.Date.now&&i.now,Fn=e.setTimeout!==Pe.setTimeout&&e.setTimeout,$n=te.ceil,Mn=te.floor,Wn=ee.getOwnPropertySymbols,Hn=me?me.isBuffer:o,Un=e.isFinite,Bn=oe.join,qn=In(ee.keys,ee),zn=te.max,Vn=te.min,Kn=i.now,Gn=e.parseInt,Qn=te.random,Yn=oe.reverse,Xn=Mo(e,"DataView"),Jn=Mo(e,"Map"),Zn=Mo(e,"Promise"),tr=Mo(e,"Set"),er=Mo(e,"WeakMap"),nr=Mo(ee,"create"),rr=er&&new er,ir={},or=fs(Xn),sr=fs(Jn),ar=fs(Zn),ur=fs(tr),lr=fs(er),cr=be?be.prototype:o,fr=cr?cr.valueOf:o,hr=cr?cr.toString:o;function pr(t){if(Aa(t)&&!ma(t)&&!(t instanceof mr)){if(t instanceof vr)return t;if(ce.call(t,"__wrapped__"))return hs(t)}return new vr(t)}var dr=function(){function t(){}return function(e){if(!Ia(e))return{};if(ke)return ke(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function gr(){}function vr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function mr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=F,this.__views__=[]}function _r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e=e?t:e)),t}function jr(t,e,n,r,i,s){var a,u=e&h,l=e&p,c=e&d;if(n&&(a=i?n(t,r,i,s):n(t)),a!==o)return a;if(!Ia(t))return t;var f=ma(t);if(f){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&ce.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!u)return no(t,a)}else{var g=Uo(t),v=g==G||g==Q;if(wa(t))return Yi(t,u);if(g==Z||g==H||v&&!i){if(a=l||v?{}:qo(t),!u)return l?function(t,e){return ro(t,Ho(t),e)}(t,function(t,e){return t&&ro(e,ou(e),t)}(a,t)):function(t,e){return ro(t,Wo(t),e)}(t,Nr(a,t))}else{if(!Ie[g])return i?t:{};a=function(t,e,n){var r,i,o,s=t.constructor;switch(e){case ut:return Xi(t);case q:case z:return new s(+t);case lt:return function(t,e){var n=e?Xi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case ct:case ft:case ht:case pt:case dt:case gt:case vt:case mt:case _t:return Ji(t,n);case Y:return new s;case X:case rt:return new s(t);case et:return(o=new(i=t).constructor(i.source,Bt.exec(i))).lastIndex=i.lastIndex,o;case nt:return new s;case it:return r=t,fr?ee(fr.call(r)):{}}}(t,g,u)}}s||(s=new Er);var m=s.get(t);if(m)return m;if(s.set(t,a),Pa(t))return t.forEach(function(r){a.add(jr(r,e,n,r,t,s))}),a;if(Da(t))return t.forEach(function(r,i){a.set(i,jr(r,e,n,i,t,s))}),a;var _=f?o:(c?l?ko:No:l?ou:iu)(t);return Ke(_||t,function(r,i){_&&(r=t[i=r]),Ar(a,i,jr(r,e,n,i,t,s))}),a}function Rr(t,e,n){var r=n.length;if(null==t)return!r;for(t=ee(t);r--;){var i=n[r],s=e[i],a=t[i];if(a===o&&!(i in t)||!s(a))return!1}return!0}function Fr(t,e,n){if("function"!=typeof t)throw new ie(u);return is(function(){t.apply(o,n)},e)}function $r(t,e,n,r){var i=-1,o=Xe,a=!0,u=t.length,l=[],c=e.length;if(!u)return l;n&&(e=Ze(e,mn(n))),r?(o=Je,a=!1):e.length>=s&&(o=yn,a=!1,e=new wr(e));t:for(;++i-1},yr.prototype.set=function(t,e){var n=this.__data__,r=Dr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},br.prototype.clear=function(){this.size=0,this.__data__={hash:new _r,map:new(Jn||yr),string:new _r}},br.prototype.delete=function(t){var e=Fo(this,t).delete(t);return this.size-=e?1:0,e},br.prototype.get=function(t){return Fo(this,t).get(t)},br.prototype.has=function(t){return Fo(this,t).has(t)},br.prototype.set=function(t,e){var n=Fo(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},wr.prototype.add=wr.prototype.push=function(t){return this.__data__.set(t,l),this},wr.prototype.has=function(t){return this.__data__.has(t)},Er.prototype.clear=function(){this.__data__=new yr,this.size=0},Er.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Er.prototype.get=function(t){return this.__data__.get(t)},Er.prototype.has=function(t){return this.__data__.has(t)},Er.prototype.set=function(t,e){var n=this.__data__;if(n instanceof yr){var r=n.__data__;if(!Jn||r.length0&&n(a)?e>1?qr(a,e-1,n,r,i):tn(i,a):r||(i[i.length]=a)}return i}var zr=ao(),Vr=ao(!0);function Kr(t,e){return t&&zr(t,e,iu)}function Gr(t,e){return t&&Vr(t,e,iu)}function Qr(t,e){return Ye(e,function(e){return Sa(t[e])})}function Yr(t,e){for(var n=0,r=(e=Vi(e,t)).length;null!=t&&ne}function ti(t,e){return null!=t&&ce.call(t,e)}function ei(t,e){return null!=t&&e in ee(t)}function ni(t,e,n){for(var i=n?Je:Xe,s=t[0].length,a=t.length,u=a,l=r(a),c=1/0,f=[];u--;){var h=t[u];u&&e&&(h=Ze(h,mn(e))),c=Vn(h.length,c),l[u]=!n&&(e||s>=120&&h.length>=120)?new wr(u&&h):o}h=t[0];var p=-1,d=l[0];t:for(;++p=a)return u;var l=n[r];return u*("desc"==l?-1:1)}}return t.index-e.index}(t,e,n)})}function _i(t,e,n){for(var r=-1,i=e.length,o={};++r-1;)a!==t&&je.call(a,u,1),je.call(t,u,1);return t}function bi(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;Vo(i)?je.call(t,i,1):$i(t,i)}}return t}function wi(t,e){return t+Mn(Qn()*(e-t+1))}function Ei(t,e){var n="";if(!t||e<1||e>L)return n;do{e%2&&(n+=t),(e=Mn(e/2))&&(t+=t)}while(e);return n}function Ci(t,e){return os(ts(t,e,xu),t+"")}function Si(t){return Sr(pu(t))}function Ti(t,e){var n=pu(t);return us(n,Lr(e,0,n.length))}function Oi(t,e,n,r){if(!Ia(t))return t;for(var i=-1,s=(e=Vi(e,t)).length,a=s-1,u=t;null!=u&&++io?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var s=r(o);++i>>1,s=t[o];null!==s&&!ja(s)&&(n?s<=e:s=s){var c=e?null:Co(t);if(c)return Dn(c);a=!1,i=yn,l=new wr}else l=e?[]:u;t:for(;++r=r?t:xi(t,e,n)}var Qi=jn||function(t){return Pe.clearTimeout(t)};function Yi(t,e){if(e)return t.slice();var n=t.length,r=Ae?Ae(n):new t.constructor(n);return t.copy(r),r}function Xi(t){var e=new t.constructor(t.byteLength);return new Ee(e).set(new Ee(t)),e}function Ji(t,e){var n=e?Xi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Zi(t,e){if(t!==e){var n=t!==o,r=null===t,i=t==t,s=ja(t),a=e!==o,u=null===e,l=e==e,c=ja(e);if(!u&&!c&&!s&&t>e||s&&a&&l&&!u&&!c||r&&a&&l||!n&&l||!i)return 1;if(!r&&!s&&!c&&t1?n[i-1]:o,a=i>2?n[2]:o;for(s=t.length>3&&"function"==typeof s?(i--,s):o,a&&Ko(n[0],n[1],a)&&(s=i<3?o:s,i=1),e=ee(e);++r-1?i[s?e[a]:a]:o}}function ho(t){return xo(function(e){var n=e.length,r=n,i=vr.prototype.thru;for(t&&e.reverse();r--;){var s=e[r];if("function"!=typeof s)throw new ie(u);if(i&&!a&&"wrapper"==Lo(s))var a=new vr([],!0)}for(r=a?r:n;++r1&&b.reverse(),h&&c<_&&(b.length=c),this&&this!==Pe&&this instanceof m&&(O=y||co(O)),O.apply(T,b)}}function go(t,e){return function(n,r){return function(t,e,n,r){return Kr(t,function(t,i,o){e(r,n(t),i,o)}),r}(n,t,e(r),{})}}function vo(t,e){return function(n,r){var i;if(n===o&&r===o)return e;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=Ri(n),r=Ri(r)):(n=ji(n),r=ji(r)),i=t(n,r)}return i}}function mo(t){return xo(function(e){return e=Ze(e,mn(Ro())),Ci(function(n){var r=this;return t(e,function(t){return ze(t,r,n)})})})}function _o(t,e){var n=(e=e===o?" ":Ri(e)).length;if(n<2)return n?Ei(e,t):e;var r=Ei(e,$n(t/Nn(e)));return Tn(e)?Gi(kn(r),0,t).join(""):r.slice(0,t)}function yo(t){return function(e,n,i){return i&&"number"!=typeof i&&Ko(e,n,i)&&(n=i=o),e=Wa(e),n===o?(n=e,e=0):n=Wa(n),function(t,e,n,i){for(var o=-1,s=zn($n((e-t)/(n||1)),0),a=r(s);s--;)a[i?s:++o]=t,t+=n;return a}(e,n,i=i===o?eu))return!1;var c=s.get(t);if(c&&s.get(e))return c==e;var f=-1,h=!0,p=n&v?new wr:o;for(s.set(t,e),s.set(e,t);++f-1&&t%1==0&&t1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Ft,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Ke(W,function(n){var r="_."+n[0];e&n[1]&&!Xe(t,r)&&t.push(r)}),t.sort()}(function(t){var e=t.match($t);return e?e[1].split(Mt):[]}(r),n)))}function as(t){var e=0,n=0;return function(){var r=Kn(),i=x-(r-n);if(n=r,i>0){if(++e>=D)return arguments[0]}else e=0;return t.apply(o,arguments)}}function us(t,e){var n=-1,r=t.length,i=r-1;for(e=e===o?r:e;++n1?t[e-1]:o;return ks(t,n="function"==typeof n?(t.pop(),n):o)});function Ms(t){var e=pr(t);return e.__chain__=!0,e}function Ws(t,e){return e(t)}var Hs=xo(function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return Pr(e,t)};return!(e>1||this.__actions__.length)&&r instanceof mr&&Vo(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:Ws,args:[i],thisArg:o}),new vr(r,this.__chain__).thru(function(t){return e&&!t.length&&t.push(o),t})):this.thru(i)});var Us=io(function(t,e,n){ce.call(t,n)?++t[n]:kr(t,n,1)});var Bs=fo(vs),qs=fo(ms);function zs(t,e){return(ma(t)?Ke:Mr)(t,Ro(e,3))}function Vs(t,e){return(ma(t)?Ge:Wr)(t,Ro(e,3))}var Ks=io(function(t,e,n){ce.call(t,n)?t[n].push(e):kr(t,n,[e])});var Gs=Ci(function(t,e,n){var i=-1,o="function"==typeof e,s=ya(t)?r(t.length):[];return Mr(t,function(t){s[++i]=o?ze(e,t,n):ri(t,e,n)}),s}),Qs=io(function(t,e,n){kr(t,n,e)});function Ys(t,e){return(ma(t)?Ze:hi)(t,Ro(e,3))}var Xs=io(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]});var Js=Ci(function(t,e){if(null==t)return[];var n=e.length;return n>1&&Ko(t,e[0],e[1])?e=[]:n>2&&Ko(e[0],e[1],e[2])&&(e=[e[0]]),mi(t,qr(e,1),[])}),Zs=Rn||function(){return Pe.Date.now()};function ta(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,To(t,S,o,o,o,o,e)}function ea(t,e){var n;if("function"!=typeof e)throw new ie(u);return t=Ha(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var na=Ci(function(t,e,n){var r=m;if(n.length){var i=An(n,jo(na));r|=E}return To(t,r,e,n,i)}),ra=Ci(function(t,e,n){var r=m|_;if(n.length){var i=An(n,jo(ra));r|=E}return To(e,r,t,n,i)});function ia(t,e,n){var r,i,s,a,l,c,f=0,h=!1,p=!1,d=!0;if("function"!=typeof t)throw new ie(u);function g(e){var n=r,s=i;return r=i=o,f=e,a=t.apply(s,n)}function v(t){var n=t-c;return c===o||n>=e||n<0||p&&t-f>=s}function m(){var t=Zs();if(v(t))return _(t);l=is(m,function(t){var n=e-(t-c);return p?Vn(n,s-(t-f)):n}(t))}function _(t){return l=o,d&&r?g(t):(r=i=o,a)}function y(){var t=Zs(),n=v(t);if(r=arguments,i=this,c=t,n){if(l===o)return function(t){return f=t,l=is(m,e),h?g(t):a}(c);if(p)return l=is(m,e),g(c)}return l===o&&(l=is(m,e)),a}return e=Ba(e)||0,Ia(n)&&(h=!!n.leading,s=(p="maxWait"in n)?zn(Ba(n.maxWait)||0,e):s,d="trailing"in n?!!n.trailing:d),y.cancel=function(){l!==o&&Qi(l),f=0,r=c=i=l=o},y.flush=function(){return l===o?a:_(Zs())},y}var oa=Ci(function(t,e){return Fr(t,1,e)}),sa=Ci(function(t,e,n){return Fr(t,Ba(e)||0,n)});function aa(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new ie(u);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(aa.Cache||br),n}function ua(t){if("function"!=typeof t)throw new ie(u);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}aa.Cache=br;var la=Ki(function(t,e){var n=(e=1==e.length&&ma(e[0])?Ze(e[0],mn(Ro())):Ze(qr(e,1),mn(Ro()))).length;return Ci(function(r){for(var i=-1,o=Vn(r.length,n);++i=e}),va=ii(function(){return arguments}())?ii:function(t){return Aa(t)&&ce.call(t,"callee")&&!Le.call(t,"callee")},ma=r.isArray,_a=Me?mn(Me):function(t){return Aa(t)&&Jr(t)==ut};function ya(t){return null!=t&&Oa(t.length)&&!Sa(t)}function ba(t){return Aa(t)&&ya(t)}var wa=Hn||Bu,Ea=We?mn(We):function(t){return Aa(t)&&Jr(t)==z};function Ca(t){if(!Aa(t))return!1;var e=Jr(t);return e==K||e==V||"string"==typeof t.message&&"string"==typeof t.name&&!Na(t)}function Sa(t){if(!Ia(t))return!1;var e=Jr(t);return e==G||e==Q||e==B||e==tt}function Ta(t){return"number"==typeof t&&t==Ha(t)}function Oa(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=L}function Ia(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Aa(t){return null!=t&&"object"==typeof t}var Da=He?mn(He):function(t){return Aa(t)&&Uo(t)==Y};function xa(t){return"number"==typeof t||Aa(t)&&Jr(t)==X}function Na(t){if(!Aa(t)||Jr(t)!=Z)return!1;var e=Ne(t);if(null===e)return!0;var n=ce.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&le.call(n)==de}var ka=Ue?mn(Ue):function(t){return Aa(t)&&Jr(t)==et};var Pa=Be?mn(Be):function(t){return Aa(t)&&Uo(t)==nt};function La(t){return"string"==typeof t||!ma(t)&&Aa(t)&&Jr(t)==rt}function ja(t){return"symbol"==typeof t||Aa(t)&&Jr(t)==it}var Ra=qe?mn(qe):function(t){return Aa(t)&&Oa(t.length)&&!!Oe[Jr(t)]};var Fa=bo(fi),$a=bo(function(t,e){return t<=e});function Ma(t){if(!t)return[];if(ya(t))return La(t)?kn(t):no(t);if($e&&t[$e])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[$e]());var e=Uo(t);return(e==Y?On:e==nt?Dn:pu)(t)}function Wa(t){return t?(t=Ba(t))===P||t===-P?(t<0?-1:1)*j:t==t?t:0:0===t?t:0}function Ha(t){var e=Wa(t),n=e%1;return e==e?n?e-n:e:0}function Ua(t){return t?Lr(Ha(t),0,F):0}function Ba(t){if("number"==typeof t)return t;if(ja(t))return R;if(Ia(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Ia(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Lt,"");var n=zt.test(t);return n||Kt.test(t)?xe(t.slice(2),n?2:8):qt.test(t)?R:+t}function qa(t){return ro(t,ou(t))}function za(t){return null==t?"":Ri(t)}var Va=oo(function(t,e){if(Xo(e)||ya(e))ro(e,iu(e),t);else for(var n in e)ce.call(e,n)&&Ar(t,n,e[n])}),Ka=oo(function(t,e){ro(e,ou(e),t)}),Ga=oo(function(t,e,n,r){ro(e,ou(e),t,r)}),Qa=oo(function(t,e,n,r){ro(e,iu(e),t,r)}),Ya=xo(Pr);var Xa=Ci(function(t,e){t=ee(t);var n=-1,r=e.length,i=r>2?e[2]:o;for(i&&Ko(e[0],e[1],i)&&(r=1);++n1),e}),ro(t,ko(t),n),r&&(n=jr(n,h|p|d,Ao));for(var i=e.length;i--;)$i(n,e[i]);return n});var lu=xo(function(t,e){return null==t?{}:function(t,e){return _i(t,e,function(e,n){return tu(t,n)})}(t,e)});function cu(t,e){if(null==t)return{};var n=Ze(ko(t),function(t){return[t]});return e=Ro(e),_i(t,n,function(t,n){return e(t,n[0])})}var fu=So(iu),hu=So(ou);function pu(t){return null==t?[]:_n(t,iu(t))}var du=lo(function(t,e,n){return e=e.toLowerCase(),t+(n?gu(e):e)});function gu(t){return Cu(za(t).toLowerCase())}function vu(t){return(t=za(t))&&t.replace(Qt,En).replace(ye,"")}var mu=lo(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),_u=lo(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),yu=uo("toLowerCase");var bu=lo(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()});var wu=lo(function(t,e,n){return t+(n?" ":"")+Cu(e)});var Eu=lo(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),Cu=uo("toUpperCase");function Su(t,e,n){return t=za(t),(e=n?o:e)===o?function(t){return Ce.test(t)}(t)?function(t){return t.match(we)||[]}(t):function(t){return t.match(Wt)||[]}(t):t.match(e)||[]}var Tu=Ci(function(t,e){try{return ze(t,o,e)}catch(t){return Ca(t)?t:new Jt(t)}}),Ou=xo(function(t,e){return Ke(e,function(e){e=cs(e),kr(t,e,na(t[e],t))}),t});function Iu(t){return function(){return t}}var Au=ho(),Du=ho(!0);function xu(t){return t}function Nu(t){return ui("function"==typeof t?t:jr(t,h))}var ku=Ci(function(t,e){return function(n){return ri(n,t,e)}}),Pu=Ci(function(t,e){return function(n){return ri(t,n,e)}});function Lu(t,e,n){var r=iu(e),i=Qr(e,r);null!=n||Ia(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Qr(e,iu(e)));var o=!(Ia(n)&&"chain"in n&&!n.chain),s=Sa(t);return Ke(i,function(n){var r=e[n];t[n]=r,s&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=no(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,tn([this.value()],arguments))})}),t}function ju(){}var Ru=mo(Ze),Fu=mo(Qe),$u=mo(rn);function Mu(t){return Go(t)?hn(cs(t)):function(t){return function(e){return Yr(e,t)}}(t)}var Wu=yo(),Hu=yo(!0);function Uu(){return[]}function Bu(){return!1}var qu=vo(function(t,e){return t+e},0),zu=Eo("ceil"),Vu=vo(function(t,e){return t/e},1),Ku=Eo("floor");var Gu,Qu=vo(function(t,e){return t*e},1),Yu=Eo("round"),Xu=vo(function(t,e){return t-e},0);return pr.after=function(t,e){if("function"!=typeof e)throw new ie(u);return t=Ha(t),function(){if(--t<1)return e.apply(this,arguments)}},pr.ary=ta,pr.assign=Va,pr.assignIn=Ka,pr.assignInWith=Ga,pr.assignWith=Qa,pr.at=Ya,pr.before=ea,pr.bind=na,pr.bindAll=Ou,pr.bindKey=ra,pr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return ma(t)?t:[t]},pr.chain=Ms,pr.chunk=function(t,e,n){e=(n?Ko(t,e,n):e===o)?1:zn(Ha(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var s=0,a=0,u=r($n(i/e));si?0:i+n),(r=r===o||r>i?i:Ha(r))<0&&(r+=i),r=n>r?0:Ua(r);n>>0)?(t=za(t))&&("string"==typeof e||null!=e&&!ka(e))&&!(e=Ri(e))&&Tn(t)?Gi(kn(t),0,n):t.split(e,n):[]},pr.spread=function(t,e){if("function"!=typeof t)throw new ie(u);return e=null==e?0:zn(Ha(e),0),Ci(function(n){var r=n[e],i=Gi(n,0,e);return r&&tn(i,r),ze(t,this,i)})},pr.tail=function(t){var e=null==t?0:t.length;return e?xi(t,1,e):[]},pr.take=function(t,e,n){return t&&t.length?xi(t,0,(e=n||e===o?1:Ha(e))<0?0:e):[]},pr.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?xi(t,(e=r-(e=n||e===o?1:Ha(e)))<0?0:e,r):[]},pr.takeRightWhile=function(t,e){return t&&t.length?Wi(t,Ro(e,3),!1,!0):[]},pr.takeWhile=function(t,e){return t&&t.length?Wi(t,Ro(e,3)):[]},pr.tap=function(t,e){return e(t),t},pr.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new ie(u);return Ia(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),ia(t,e,{leading:r,maxWait:e,trailing:i})},pr.thru=Ws,pr.toArray=Ma,pr.toPairs=fu,pr.toPairsIn=hu,pr.toPath=function(t){return ma(t)?Ze(t,cs):ja(t)?[t]:no(ls(za(t)))},pr.toPlainObject=qa,pr.transform=function(t,e,n){var r=ma(t),i=r||wa(t)||Ra(t);if(e=Ro(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:Ia(t)&&Sa(o)?dr(Ne(t)):{}}return(i?Ke:Kr)(t,function(t,r,i){return e(n,t,r,i)}),n},pr.unary=function(t){return ta(t,1)},pr.union=As,pr.unionBy=Ds,pr.unionWith=xs,pr.uniq=function(t){return t&&t.length?Fi(t):[]},pr.uniqBy=function(t,e){return t&&t.length?Fi(t,Ro(e,2)):[]},pr.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?Fi(t,o,e):[]},pr.unset=function(t,e){return null==t||$i(t,e)},pr.unzip=Ns,pr.unzipWith=ks,pr.update=function(t,e,n){return null==t?t:Mi(t,e,zi(n))},pr.updateWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:Mi(t,e,zi(n),r)},pr.values=pu,pr.valuesIn=function(t){return null==t?[]:_n(t,ou(t))},pr.without=Ps,pr.words=Su,pr.wrap=function(t,e){return ca(zi(e),t)},pr.xor=Ls,pr.xorBy=js,pr.xorWith=Rs,pr.zip=Fs,pr.zipObject=function(t,e){return Bi(t||[],e||[],Ar)},pr.zipObjectDeep=function(t,e){return Bi(t||[],e||[],Oi)},pr.zipWith=$s,pr.entries=fu,pr.entriesIn=hu,pr.extend=Ka,pr.extendWith=Ga,Lu(pr,pr),pr.add=qu,pr.attempt=Tu,pr.camelCase=du,pr.capitalize=gu,pr.ceil=zu,pr.clamp=function(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=(n=Ba(n))==n?n:0),e!==o&&(e=(e=Ba(e))==e?e:0),Lr(Ba(t),e,n)},pr.clone=function(t){return jr(t,d)},pr.cloneDeep=function(t){return jr(t,h|d)},pr.cloneDeepWith=function(t,e){return jr(t,h|d,e="function"==typeof e?e:o)},pr.cloneWith=function(t,e){return jr(t,d,e="function"==typeof e?e:o)},pr.conformsTo=function(t,e){return null==e||Rr(t,e,iu(e))},pr.deburr=vu,pr.defaultTo=function(t,e){return null==t||t!=t?e:t},pr.divide=Vu,pr.endsWith=function(t,e,n){t=za(t),e=Ri(e);var r=t.length,i=n=n===o?r:Lr(Ha(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},pr.eq=pa,pr.escape=function(t){return(t=za(t))&&Tt.test(t)?t.replace(Ct,Cn):t},pr.escapeRegExp=function(t){return(t=za(t))&&Pt.test(t)?t.replace(kt,"\\$&"):t},pr.every=function(t,e,n){var r=ma(t)?Qe:Hr;return n&&Ko(t,e,n)&&(e=o),r(t,Ro(e,3))},pr.find=Bs,pr.findIndex=vs,pr.findKey=function(t,e){return sn(t,Ro(e,3),Kr)},pr.findLast=qs,pr.findLastIndex=ms,pr.findLastKey=function(t,e){return sn(t,Ro(e,3),Gr)},pr.floor=Ku,pr.forEach=zs,pr.forEachRight=Vs,pr.forIn=function(t,e){return null==t?t:zr(t,Ro(e,3),ou)},pr.forInRight=function(t,e){return null==t?t:Vr(t,Ro(e,3),ou)},pr.forOwn=function(t,e){return t&&Kr(t,Ro(e,3))},pr.forOwnRight=function(t,e){return t&&Gr(t,Ro(e,3))},pr.get=Za,pr.gt=da,pr.gte=ga,pr.has=function(t,e){return null!=t&&Bo(t,e,ti)},pr.hasIn=tu,pr.head=ys,pr.identity=xu,pr.includes=function(t,e,n,r){t=ya(t)?t:pu(t),n=n&&!r?Ha(n):0;var i=t.length;return n<0&&(n=zn(i+n,0)),La(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&un(t,e,n)>-1},pr.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:Ha(n);return i<0&&(i=zn(r+i,0)),un(t,e,i)},pr.inRange=function(t,e,n){return e=Wa(e),n===o?(n=e,e=0):n=Wa(n),function(t,e,n){return t>=Vn(e,n)&&t=-L&&t<=L},pr.isSet=Pa,pr.isString=La,pr.isSymbol=ja,pr.isTypedArray=Ra,pr.isUndefined=function(t){return t===o},pr.isWeakMap=function(t){return Aa(t)&&Uo(t)==st},pr.isWeakSet=function(t){return Aa(t)&&Jr(t)==at},pr.join=function(t,e){return null==t?"":Bn.call(t,e)},pr.kebabCase=mu,pr.last=Cs,pr.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=Ha(n))<0?zn(r+i,0):Vn(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):an(t,cn,i,!0)},pr.lowerCase=_u,pr.lowerFirst=yu,pr.lt=Fa,pr.lte=$a,pr.max=function(t){return t&&t.length?Ur(t,xu,Zr):o},pr.maxBy=function(t,e){return t&&t.length?Ur(t,Ro(e,2),Zr):o},pr.mean=function(t){return fn(t,xu)},pr.meanBy=function(t,e){return fn(t,Ro(e,2))},pr.min=function(t){return t&&t.length?Ur(t,xu,fi):o},pr.minBy=function(t,e){return t&&t.length?Ur(t,Ro(e,2),fi):o},pr.stubArray=Uu,pr.stubFalse=Bu,pr.stubObject=function(){return{}},pr.stubString=function(){return""},pr.stubTrue=function(){return!0},pr.multiply=Qu,pr.nth=function(t,e){return t&&t.length?vi(t,Ha(e)):o},pr.noConflict=function(){return Pe._===this&&(Pe._=ge),this},pr.noop=ju,pr.now=Zs,pr.pad=function(t,e,n){t=za(t);var r=(e=Ha(e))?Nn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return _o(Mn(i),n)+t+_o($n(i),n)},pr.padEnd=function(t,e,n){t=za(t);var r=(e=Ha(e))?Nn(t):0;return e&&re){var r=t;t=e,e=r}if(n||t%1||e%1){var i=Qn();return Vn(t+i*(e-t+De("1e-"+((i+"").length-1))),e)}return wi(t,e)},pr.reduce=function(t,e,n){var r=ma(t)?en:dn,i=arguments.length<3;return r(t,Ro(e,4),n,i,Mr)},pr.reduceRight=function(t,e,n){var r=ma(t)?nn:dn,i=arguments.length<3;return r(t,Ro(e,4),n,i,Wr)},pr.repeat=function(t,e,n){return e=(n?Ko(t,e,n):e===o)?1:Ha(e),Ei(za(t),e)},pr.replace=function(){var t=arguments,e=za(t[0]);return t.length<3?e:e.replace(t[1],t[2])},pr.result=function(t,e,n){var r=-1,i=(e=Vi(e,t)).length;for(i||(i=1,t=o);++rL)return[];var n=F,r=Vn(t,F);e=Ro(e),t-=F;for(var i=vn(r,e);++n=s)return t;var u=n-Nn(r);if(u<1)return r;var l=a?Gi(a,0,u).join(""):t.slice(0,u);if(i===o)return l+r;if(a&&(u+=l.length-u),ka(i)){if(t.slice(u).search(i)){var c,f=l;for(i.global||(i=ne(i.source,za(Bt.exec(i))+"g")),i.lastIndex=0;c=i.exec(f);)var h=c.index;l=l.slice(0,h===o?u:h)}}else if(t.indexOf(Ri(i),u)!=u){var p=l.lastIndexOf(i);p>-1&&(l=l.slice(0,p))}return l+r},pr.unescape=function(t){return(t=za(t))&&St.test(t)?t.replace(Et,Pn):t},pr.uniqueId=function(t){var e=++fe;return za(t)+e},pr.upperCase=Eu,pr.upperFirst=Cu,pr.each=zs,pr.eachRight=Vs,pr.first=ys,Lu(pr,(Gu={},Kr(pr,function(t,e){ce.call(pr.prototype,e)||(Gu[e]=t)}),Gu),{chain:!1}),pr.VERSION="4.17.11",Ke(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){pr[t].placeholder=pr}),Ke(["drop","take"],function(t,e){mr.prototype[t]=function(n){n=n===o?1:zn(Ha(n),0);var r=this.__filtered__&&!e?new mr(this):this.clone();return r.__filtered__?r.__takeCount__=Vn(n,r.__takeCount__):r.__views__.push({size:Vn(n,F),type:t+(r.__dir__<0?"Right":"")}),r},mr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),Ke(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==N||3==n;mr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Ro(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}}),Ke(["head","last"],function(t,e){var n="take"+(e?"Right":"");mr.prototype[t]=function(){return this[n](1).value()[0]}}),Ke(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");mr.prototype[t]=function(){return this.__filtered__?new mr(this):this[n](1)}}),mr.prototype.compact=function(){return this.filter(xu)},mr.prototype.find=function(t){return this.filter(t).head()},mr.prototype.findLast=function(t){return this.reverse().find(t)},mr.prototype.invokeMap=Ci(function(t,e){return"function"==typeof t?new mr(this):this.map(function(n){return ri(n,t,e)})}),mr.prototype.reject=function(t){return this.filter(ua(Ro(t)))},mr.prototype.slice=function(t,e){t=Ha(t);var n=this;return n.__filtered__&&(t>0||e<0)?new mr(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(n=(e=Ha(e))<0?n.dropRight(-e):n.take(e-t)),n)},mr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},mr.prototype.toArray=function(){return this.take(F)},Kr(mr.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=pr[r?"take"+("last"==e?"Right":""):e],s=r||/^find/.test(e);i&&(pr.prototype[e]=function(){var e=this.__wrapped__,a=r?[1]:arguments,u=e instanceof mr,l=a[0],c=u||ma(e),f=function(t){var e=i.apply(pr,tn([t],a));return r&&h?e[0]:e};c&&n&&"function"==typeof l&&1!=l.length&&(u=c=!1);var h=this.__chain__,p=!!this.__actions__.length,d=s&&!h,g=u&&!p;if(!s&&c){e=g?e:new mr(this);var v=t.apply(e,a);return v.__actions__.push({func:Ws,args:[f],thisArg:o}),new vr(v,h)}return d&&g?t.apply(this,a):(v=this.thru(f),d?r?v.value()[0]:v.value():v)})}),Ke(["pop","push","shift","sort","splice","unshift"],function(t){var e=oe[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);pr.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(ma(i)?i:[],t)}return this[n](function(n){return e.apply(ma(n)?n:[],t)})}}),Kr(mr.prototype,function(t,e){var n=pr[e];if(n){var r=n.name+"";(ir[r]||(ir[r]=[])).push({name:e,func:n})}}),ir[po(o,_).name]=[{name:"wrapper",func:o}],mr.prototype.clone=function(){var t=new mr(this.__wrapped__);return t.__actions__=no(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=no(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=no(this.__views__),t},mr.prototype.reverse=function(){if(this.__filtered__){var t=new mr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},mr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=ma(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},pr.prototype.plant=function(t){for(var e,n=this;n instanceof gr;){var r=hs(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},pr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof mr){var e=t;return this.__actions__.length&&(e=new mr(this)),(e=e.reverse()).__actions__.push({func:Ws,args:[Is],thisArg:o}),new vr(e,this.__chain__)}return this.thru(Is)},pr.prototype.toJSON=pr.prototype.valueOf=pr.prototype.value=function(){return Hi(this.__wrapped__,this.__actions__)},pr.prototype.first=pr.prototype.head,$e&&(pr.prototype[$e]=function(){return this}),pr}();Pe._=Ln,(i=function(){return Ln}.call(e,n,e,r))===o||(r.exports=i)}).call(this)}).call(e,n("DuR2"),n("3IRH")(t))},ObXH:function(t,e){},Re3r:function(t,e){function n(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}t.exports=function(t){return null!=t&&(n(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&n(t.slice(0,0))}(t)||!!t._isBuffer)}},TNV1:function(t,e,n){"use strict";var r=n("cGG2");t.exports=function(t,e,n){return r.forEach(n,function(n){t=n(t,e)}),t}},UZhg:function(t,e){},W2nU:function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var u,l=[],c=!1,f=-1;function h(){c&&u&&(c=!1,u.length?l=u.concat(l):f=-1,l.length&&p())}function p(){if(!c){var t=a(h);c=!0;for(var e=l.length;e;){for(u=l,l=[];++f1)for(var n=1;n=0){i=1;break}var s=n&&window.Promise?function(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then(function(){e=!1,t()}))}}:function(t){var e=!1;return function(){e||(e=!0,setTimeout(function(){e=!1,t()},i))}};function a(t){return t&&"[object Function]"==={}.toString.call(t)}function u(t,e){if(1!==t.nodeType)return[];var n=t.ownerDocument.defaultView.getComputedStyle(t,null);return e?n[e]:n}function l(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function c(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=u(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/(auto|scroll|overlay)/.test(n+i+r)?t:c(l(t))}var f=n&&!(!window.MSInputMethodContext||!document.documentMode),h=n&&/MSIE 10/.test(navigator.userAgent);function p(t){return 11===t?f:10===t?h:f||h}function d(t){if(!t)return document.documentElement;for(var e=p(10)?document.body:null,n=t.offsetParent||null;n===e&&t.nextElementSibling;)n=(t=t.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===u(n,"position")?d(n):n:t?t.ownerDocument.documentElement:document.documentElement}function g(t){return null!==t.parentNode?g(t.parentNode):t}function v(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?t:e,i=n?e:t,o=document.createRange();o.setStart(r,0),o.setEnd(i,0);var s,a,u=o.commonAncestorContainer;if(t!==u&&e!==u||r.contains(i))return"BODY"===(a=(s=u).nodeName)||"HTML"!==a&&d(s.firstElementChild)!==s?d(u):u;var l=g(t);return l.host?v(l.host,e):v(t,g(e).host)}function m(t){var e="top"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",n=t.nodeName;if("BODY"===n||"HTML"===n){var r=t.ownerDocument.documentElement;return(t.ownerDocument.scrollingElement||r)[e]}return t[e]}function _(t,e){var n="x"===e?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(t["border"+n+"Width"],10)+parseFloat(t["border"+r+"Width"],10)}function y(t,e,n,r){return Math.max(e["offset"+t],e["scroll"+t],n["client"+t],n["offset"+t],n["scroll"+t],p(10)?parseInt(n["offset"+t])+parseInt(r["margin"+("Height"===t?"Top":"Left")])+parseInt(r["margin"+("Height"===t?"Bottom":"Right")]):0)}function b(t){var e=t.body,n=t.documentElement,r=p(10)&&getComputedStyle(n);return{height:y("Height",e,n,r),width:y("Width",e,n,r)}}var w=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},E=function(){function t(t,e){for(var n=0;n2&&void 0!==arguments[2]&&arguments[2],r=p(10),i="HTML"===e.nodeName,o=O(t),s=O(e),a=c(t),l=u(e),f=parseFloat(l.borderTopWidth,10),h=parseFloat(l.borderLeftWidth,10);n&&i&&(s.top=Math.max(s.top,0),s.left=Math.max(s.left,0));var d=T({top:o.top-s.top-f,left:o.left-s.left-h,width:o.width,height:o.height});if(d.marginTop=0,d.marginLeft=0,!r&&i){var g=parseFloat(l.marginTop,10),v=parseFloat(l.marginLeft,10);d.top-=f-g,d.bottom-=f-g,d.left-=h-v,d.right-=h-v,d.marginTop=g,d.marginLeft=v}return(r&&!n?e.contains(a):e===a&&"BODY"!==a.nodeName)&&(d=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=m(e,"top"),i=m(e,"left"),o=n?-1:1;return t.top+=r*o,t.bottom+=r*o,t.left+=i*o,t.right+=i*o,t}(d,e)),d}function A(t){if(!t||!t.parentElement||p())return document.documentElement;for(var e=t.parentElement;e&&"none"===u(e,"transform");)e=e.parentElement;return e||document.documentElement}function D(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},s=i?A(t):v(t,e);if("viewport"===r)o=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.ownerDocument.documentElement,r=I(t,n),i=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),s=e?0:m(n),a=e?0:m(n,"left");return T({top:s-r.top+r.marginTop,left:a-r.left+r.marginLeft,width:i,height:o})}(s,i);else{var a=void 0;"scrollParent"===r?"BODY"===(a=c(l(e))).nodeName&&(a=t.ownerDocument.documentElement):a="window"===r?t.ownerDocument.documentElement:r;var f=I(a,s,i);if("HTML"!==a.nodeName||function t(e){var n=e.nodeName;return"BODY"!==n&&"HTML"!==n&&("fixed"===u(e,"position")||t(l(e)))}(s))o=f;else{var h=b(t.ownerDocument),p=h.height,d=h.width;o.top+=f.top-f.marginTop,o.bottom=p+f.top,o.left+=f.left-f.marginLeft,o.right=d+f.left}}var g="number"==typeof(n=n||0);return o.left+=g?n:n.left||0,o.top+=g?n:n.top||0,o.right-=g?n:n.right||0,o.bottom-=g?n:n.bottom||0,o}function x(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var s=D(n,r,o,i),a={top:{width:s.width,height:e.top-s.top},right:{width:s.right-e.right,height:s.height},bottom:{width:s.width,height:s.bottom-e.bottom},left:{width:e.left-s.left,height:s.height}},u=Object.keys(a).map(function(t){return S({key:t},a[t],{area:(e=a[t],e.width*e.height)});var e}).sort(function(t,e){return e.area-t.area}),l=u.filter(function(t){var e=t.width,r=t.height;return e>=n.clientWidth&&r>=n.clientHeight}),c=l.length>0?l[0].key:u[0].key,f=t.split("-")[1];return c+(f?"-"+f:"")}function N(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return I(n,r?A(e):v(e,n),r)}function k(t){var e=t.ownerDocument.defaultView.getComputedStyle(t),n=parseFloat(e.marginTop||0)+parseFloat(e.marginBottom||0),r=parseFloat(e.marginLeft||0)+parseFloat(e.marginRight||0);return{width:t.offsetWidth+r,height:t.offsetHeight+n}}function P(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,function(t){return e[t]})}function L(t,e,n){n=n.split("-")[0];var r=k(t),i={width:r.width,height:r.height},o=-1!==["right","left"].indexOf(n),s=o?"top":"left",a=o?"left":"top",u=o?"height":"width",l=o?"width":"height";return i[s]=e[s]+e[u]/2-r[u]/2,i[a]=n===a?e[a]-r[l]:e[P(a)],i}function j(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function R(t,e,n){return(void 0===n?t:t.slice(0,function(t,e,n){if(Array.prototype.findIndex)return t.findIndex(function(t){return t[e]===n});var r=j(t,function(t){return t[e]===n});return t.indexOf(r)}(t,"name",n))).forEach(function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=t.function||t.fn;t.enabled&&a(n)&&(e.offsets.popper=T(e.offsets.popper),e.offsets.reference=T(e.offsets.reference),e=n(e,t))}),e}function F(t,e){return t.some(function(t){var n=t.name;return t.enabled&&n===e})}function $(t){for(var e=[!1,"ms","Webkit","Moz","O"],n=t.charAt(0).toUpperCase()+t.slice(1),r=0;r1&&void 0!==arguments[1]&&arguments[1],n=K.indexOf(t),r=K.slice(n+1).concat(K.slice(0,n));return e?r.reverse():r}var Q={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function Y(t,e,n,r){var i=[0,0],o=-1!==["right","left"].indexOf(r),s=t.split(/(\+|\-)/).map(function(t){return t.trim()}),a=s.indexOf(j(s,function(t){return-1!==t.search(/,|\s/)}));s[a]&&-1===s[a].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var u=/\s*,\s*|\s+/,l=-1!==a?[s.slice(0,a).concat([s[a].split(u)[0]]),[s[a].split(u)[1]].concat(s.slice(a+1))]:[s];return(l=l.map(function(t,r){var i=(1===r?!o:o)?"height":"width",s=!1;return t.reduce(function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,s=!0,t):s?(t[t.length-1]+=e,s=!1,t):t.concat(e)},[]).map(function(t){return function(t,e,n,r){var i=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+i[1],s=i[2];if(!o)return t;if(0===s.indexOf("%")){var a=void 0;switch(s){case"%p":a=n;break;case"%":case"%r":default:a=r}return T(a)[e]/100*o}if("vh"===s||"vw"===s)return("vh"===s?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o;return o}(t,i,e,n)})})).forEach(function(t,e){t.forEach(function(n,r){U(n)&&(i[e]+=n*("-"===t[r-1]?-1:1))})}),i}var X={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var e=t.placement,n=e.split("-")[0],r=e.split("-")[1];if(r){var i=t.offsets,o=i.reference,s=i.popper,a=-1!==["bottom","top"].indexOf(n),u=a?"left":"top",l=a?"width":"height",c={start:C({},u,o[u]),end:C({},u,o[u]+o[l]-s[l])};t.offsets.popper=S({},s,c[r])}return t}},offset:{order:200,enabled:!0,fn:function(t,e){var n=e.offset,r=t.placement,i=t.offsets,o=i.popper,s=i.reference,a=r.split("-")[0],u=void 0;return u=U(+n)?[+n,0]:Y(n,o,s,a),"left"===a?(o.top+=u[0],o.left-=u[1]):"right"===a?(o.top+=u[0],o.left+=u[1]):"top"===a?(o.left+=u[0],o.top-=u[1]):"bottom"===a&&(o.left+=u[0],o.top+=u[1]),t.popper=o,t},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,e){var n=e.boundariesElement||d(t.instance.popper);t.instance.reference===n&&(n=d(n));var r=$("transform"),i=t.instance.popper.style,o=i.top,s=i.left,a=i[r];i.top="",i.left="",i[r]="";var u=D(t.instance.popper,t.instance.reference,e.padding,n,t.positionFixed);i.top=o,i.left=s,i[r]=a,e.boundaries=u;var l=e.priority,c=t.offsets.popper,f={primary:function(t){var n=c[t];return c[t]u[t]&&!e.escapeWithReference&&(r=Math.min(c[n],u[t]-("right"===t?c.width:c.height))),C({},n,r)}};return l.forEach(function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";c=S({},c,f[e](t))}),t.offsets.popper=c,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,n=e.popper,r=e.reference,i=t.placement.split("-")[0],o=Math.floor,s=-1!==["top","bottom"].indexOf(i),a=s?"right":"bottom",u=s?"left":"top",l=s?"width":"height";return n[a]o(r[a])&&(t.offsets.popper[u]=o(r[a])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var n;if(!z(t.instance.modifiers,"arrow","keepTogether"))return t;var r=e.element;if("string"==typeof r){if(!(r=t.instance.popper.querySelector(r)))return t}else if(!t.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var i=t.placement.split("-")[0],o=t.offsets,s=o.popper,a=o.reference,l=-1!==["left","right"].indexOf(i),c=l?"height":"width",f=l?"Top":"Left",h=f.toLowerCase(),p=l?"left":"top",d=l?"bottom":"right",g=k(r)[c];a[d]-gs[d]&&(t.offsets.popper[h]+=a[h]+g-s[d]),t.offsets.popper=T(t.offsets.popper);var v=a[h]+a[c]/2-g/2,m=u(t.instance.popper),_=parseFloat(m["margin"+f],10),y=parseFloat(m["border"+f+"Width"],10),b=v-t.offsets.popper[h]-_-y;return b=Math.max(Math.min(s[c]-g,b),0),t.arrowElement=r,t.offsets.arrow=(C(n={},h,Math.round(b)),C(n,p,""),n),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,e){if(F(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var n=D(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),r=t.placement.split("-")[0],i=P(r),o=t.placement.split("-")[1]||"",s=[];switch(e.behavior){case Q.FLIP:s=[r,i];break;case Q.CLOCKWISE:s=G(r);break;case Q.COUNTERCLOCKWISE:s=G(r,!0);break;default:s=e.behavior}return s.forEach(function(a,u){if(r!==a||s.length===u+1)return t;r=t.placement.split("-")[0],i=P(r);var l=t.offsets.popper,c=t.offsets.reference,f=Math.floor,h="left"===r&&f(l.right)>f(c.left)||"right"===r&&f(l.left)f(c.top)||"bottom"===r&&f(l.top)f(n.right),g=f(l.top)f(n.bottom),m="left"===r&&p||"right"===r&&d||"top"===r&&g||"bottom"===r&&v,_=-1!==["top","bottom"].indexOf(r),y=!!e.flipVariations&&(_&&"start"===o&&p||_&&"end"===o&&d||!_&&"start"===o&&g||!_&&"end"===o&&v);(h||m||y)&&(t.flipped=!0,(h||m)&&(r=s[u+1]),y&&(o=function(t){return"end"===t?"start":"start"===t?"end":t}(o)),t.placement=r+(o?"-"+o:""),t.offsets.popper=S({},t.offsets.popper,L(t.instance.popper,t.offsets.reference,t.placement)),t=R(t.instance.modifiers,t,"flip"))}),t},behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,n=e.split("-")[0],r=t.offsets,i=r.popper,o=r.reference,s=-1!==["left","right"].indexOf(n),a=-1===["top","left"].indexOf(n);return i[s?"left":"top"]=o[n]-(a?i[s?"width":"height"]:0),t.placement=P(e),t.offsets.popper=T(i),t}},hide:{order:800,enabled:!0,fn:function(t){if(!z(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=j(t.instance.modifiers,function(t){return"preventOverflow"===t.name}).boundaries;if(e.bottomn.right||e.top>n.bottom||e.right2&&void 0!==arguments[2]?arguments[2]:{};w(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=s(this.update.bind(this)),this.options=S({},t.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(S({},t.Defaults.modifiers,i.modifiers)).forEach(function(e){r.options.modifiers[e]=S({},t.Defaults.modifiers[e]||{},i.modifiers?i.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(t){return S({name:t},r.options.modifiers[t])}).sort(function(t,e){return t.order-e.order}),this.modifiers.forEach(function(t){t.enabled&&a(t.onLoad)&&t.onLoad(r.reference,r.popper,r.options,t,r.state)}),this.update();var o=this.options.eventsEnabled;o&&this.enableEventListeners(),this.state.eventsEnabled=o}return E(t,[{key:"update",value:function(){return function(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=N(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=x(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed,t.offsets.popper=L(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=R(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}.call(this)}},{key:"destroy",value:function(){return function(){return this.state.isDestroyed=!0,F(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[$("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}.call(this)}},{key:"enableEventListeners",value:function(){return function(){this.state.eventsEnabled||(this.state=W(this.reference,this.options,this.state,this.scheduleUpdate))}.call(this)}},{key:"disableEventListeners",value:function(){return H.call(this)}}]),t}();J.Utils=("undefined"!=typeof window?window:t).PopperUtils,J.placements=V,J.Defaults=X,e.default=J}.call(e,n("DuR2"))},"a53+":function(t,e,n){var r,i;void 0===(i="function"==typeof(r=function(){var t=function(t,e){this.items=t,this.settings=e||{diacritics:!0}};t.prototype.tokenize=function(t){if(!(t=i(String(t||"").toLowerCase()))||!t.length)return[];var e,n,r,s,u=[],l=t.split(/ +/);for(e=0,n=l.length;e0)&&r.items.push({score:n,id:i})}):this.iterator(this.items,function(t,e){r.items.push({score:1,id:e})}),(i=this.getSortFunction(r,e))&&r.items.sort(i),r.total=r.items.length,"number"==typeof e.limit&&(r.items=r.items.slice(0,e.limit)),r};var e=function(t,e){return"number"==typeof t&&"number"==typeof e?t>e?1:t(e=u(String(e||"")))?1:e>t?-1:0},n=function(t,e){var n,r,i,o;for(n=1,r=arguments.length;n=0&&t.data.length>0){var o=t.data.match(n),s=document.createElement("span");s.className="highlight";var a=t.splitText(i),u=(a.splitText(o[0].length),a.cloneNode(!0));s.appendChild(u),a.parentNode.replaceChild(s,a),e=1}}else if(1===t.nodeType&&t.childNodes&&!/(script|style)/i.test(t.tagName)&&("highlight"!==t.className||"SPAN"!==t.tagName))for(var l=0;l /g,">").replace(/"/g,""")},h={before:function(t,e,n){var r=t[e];t[e]=function(){return n.apply(t,arguments),r.apply(t,arguments)}},after:function(t,e,n){var r=t[e];t[e]=function(){var e=r.apply(t,arguments);return n.apply(t,arguments),e}}},p=function(t,e,n){var r,i=t.trigger,o={};for(r in t.trigger=function(){var n=arguments[0];if(-1===e.indexOf(n))return i.apply(t,arguments);o[n]=arguments},n.apply(t,[]),t.trigger=i,o)o.hasOwnProperty(r)&&i.apply(t,o[r])},d=function(t){var e={};if("selectionStart"in t)e.start=t.selectionStart,e.length=t.selectionEnd-e.start;else if(document.selection){t.focus();var n=document.selection.createRange(),r=document.selection.createRange().text.length;n.moveStart("character",-t.value.length),e.start=n.text.length-r,e.length=r}return e},g=function(e){var n=null,r=function(r,i){var o,s,a,u,l,c,f,h,p,g;(r=r||window.event||{},i=i||{},r.metaKey||r.altKey)||(i.force||!1!==e.data("grow"))&&(o=e.val(),r.type&&"keydown"===r.type.toLowerCase()&&(a=(s=r.keyCode)>=48&&s<=57||s>=65&&s<=90||s>=96&&s<=111||s>=186&&s<=222||32===s,46===s||8===s?(h=d(e[0])).length?o=o.substring(0,h.start)+o.substring(h.start+h.length):8===s&&h.start?o=o.substring(0,h.start-1)+o.substring(h.start+1):46===s&&void 0!==h.start&&(o=o.substring(0,h.start)+o.substring(h.start+1)):a&&(c=r.shiftKey,f=String.fromCharCode(r.keyCode),o+=f=c?f.toUpperCase():f.toLowerCase())),u=e.attr("placeholder"),!o&&u&&(o=u),g=e,(l=((p=o)?(v.$testInput||(v.$testInput=t(" ").css({position:"absolute",top:-99999,left:-99999,width:"auto",padding:0,whiteSpace:"pre"}).appendTo("body")),v.$testInput.text(p),function(t,e,n){var r,i,o={};if(n)for(r=0,i=n.length;r").addClass(w.wrapperClass).addClass(h).addClass(f),n=t("").addClass(w.inputClass).addClass("items").appendTo(e),r=t('
').appendTo(n).attr("tabindex",T.is(":disabled")?"-1":b.tabIndex),c=t(w.dropdownParent||e),i=t("
").addClass(w.dropdownClass).addClass(f).hide().appendTo(c),l=t("
").addClass(w.dropdownContentClass).appendTo(i),(d=T.attr("id"))&&(r.attr("id",d+"-selectized"),t("label[for='"+d+"']").attr("for",d+"-selectized")),b.settings.copyClassesToDropdown&&i.addClass(h),e.css({width:T[0].style.width}),b.plugins.names.length&&(p="plugin-"+b.plugins.names.join(" plugin-"),e.addClass(p),i.addClass(p)),(null===w.maxItems||w.maxItems>1)&&1===b.tagType&&T.attr("multiple","multiple"),b.settings.placeholder&&r.attr("placeholder",w.placeholder),!b.settings.splitOn&&b.settings.delimiter){var O=b.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");b.settings.splitOn=new RegExp("\\s*"+O+"+\\s*")}T.attr("autocorrect")&&r.attr("autocorrect",T.attr("autocorrect")),T.attr("autocapitalize")&&r.attr("autocapitalize",T.attr("autocapitalize")),r[0].type=T[0].type,b.$wrapper=e,b.$control=n,b.$control_input=r,b.$dropdown=i,b.$dropdown_content=l,i.on("mouseenter mousedown click","[data-disabled]>[data-selectable]",function(t){t.stopImmediatePropagation()}),i.on("mouseenter","[data-selectable]",function(){return b.onOptionHover.apply(b,arguments)}),i.on("mousedown click","[data-selectable]",function(){return b.onOptionSelect.apply(b,arguments)}),m="mousedown",_="*:not(input)",y=function(){return b.onItemSelect.apply(b,arguments)},(v=n).on(m,_,function(t){for(var e=t.target;e&&e.parentNode!==v[0];)e=e.parentNode;return t.currentTarget=e,y.apply(this,[t])}),g(r),n.on({mousedown:function(){return b.onMouseDown.apply(b,arguments)},click:function(){return b.onClick.apply(b,arguments)}}),r.on({mousedown:function(t){t.stopPropagation()},keydown:function(){return b.onKeyDown.apply(b,arguments)},keyup:function(){return b.onKeyUp.apply(b,arguments)},keypress:function(){return b.onKeyPress.apply(b,arguments)},resize:function(){b.positionDropdown.apply(b,[])},blur:function(){return b.onBlur.apply(b,arguments)},focus:function(){return b.ignoreBlur=!1,b.onFocus.apply(b,arguments)},paste:function(){return b.onPaste.apply(b,arguments)}}),S.on("keydown"+E,function(t){b.isCmdDown=t[o?"metaKey":"ctrlKey"],b.isCtrlDown=t[o?"altKey":"ctrlKey"],b.isShiftDown=t.shiftKey}),S.on("keyup"+E,function(t){t.keyCode===a&&(b.isCtrlDown=!1),16===t.keyCode&&(b.isShiftDown=!1),t.keyCode===s&&(b.isCmdDown=!1)}),S.on("mousedown"+E,function(t){if(b.isFocused){if(t.target===b.$dropdown[0]||t.target.parentNode===b.$dropdown[0])return!1;b.$control.has(t.target).length||t.target===b.$control[0]||b.blur(t.target)}}),C.on(["scroll"+E,"resize"+E].join(" "),function(){b.isOpen&&b.positionDropdown.apply(b,arguments)}),C.on("mousemove"+E,function(){b.ignoreHover=!1}),this.revertSettings={$children:T.children().detach(),tabindex:T.attr("tabindex")},T.attr("tabindex",-1).hide().after(b.$wrapper),t.isArray(w.items)&&(b.setValue(w.items),delete w.items),u&&T.on("invalid"+E,function(t){t.preventDefault(),b.isInvalid=!0,b.refreshState()}),b.updateOriginalInput(),b.refreshItems(),b.refreshState(),b.updatePlaceholder(),b.isSetup=!0,T.is(":disabled")&&b.disable(),b.on("change",this.onChange),T.data("selectize",b),T.addClass("selectized"),b.trigger("initialize"),!0===w.preload&&b.onSearchChange("")},setupTemplates:function(){var e=this.settings.labelField,n=this.settings.optgroupLabelField,r={optgroup:function(t){return'
'+t.html+"
"},optgroup_header:function(t,e){return'"},option:function(t,n){return'
'+n(t[e])+"
"},item:function(t,n){return'
'+n(t[e])+"
"},option_create:function(t,e){return'
Add '+e(t.input)+" …
"}};this.settings.render=t.extend({},r,this.settings.render)},setupCallbacks:function(){var t,e,n={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(t in n)n.hasOwnProperty(t)&&(e=this.settings[n[t]])&&this.on(t,e)},onClick:function(t){this.isFocused&&this.isOpen||(this.focus(),t.preventDefault())},onMouseDown:function(e){var n=this,r=e.isDefaultPrevented();t(e.target);if(n.isFocused){if(e.target!==n.$control_input[0])return"single"===n.settings.mode?n.isOpen?n.close():n.open():r||n.setActiveItem(null),!1}else r||window.setTimeout(function(){n.focus()},0)},onChange:function(){this.$input.trigger("change")},onPaste:function(e){var n=this;n.isFull()||n.isInputHidden||n.isLocked?e.preventDefault():n.settings.splitOn&&setTimeout(function(){var e=n.$control_input.val();if(e.match(n.settings.splitOn))for(var r=t.trim(e).split(n.settings.splitOn),i=0,o=r.length;i
(a=Array.prototype.indexOf.apply(this.$control[0].childNodes,[e[0]]))&&(l=s,s=a,a=l),i=s;i<=a;i++)u=this.$control[0].childNodes[i],-1===this.$activeItems.indexOf(u)&&(t(u).addClass("active"),this.$activeItems.push(u));n.preventDefault()}else"mousedown"===r&&this.isCtrlDown||"keydown"===r&&this.isShiftDown?e.hasClass("active")?(o=this.$activeItems.indexOf(e[0]),this.$activeItems.splice(o,1),e.removeClass("active")):this.$activeItems.push(e.addClass("active")[0]):(t(this.$activeItems).removeClass("active"),this.$activeItems=[e.addClass("active")[0]]);this.hideInput(),this.isFocused||this.focus()}},setActiveOption:function(e,n,r){var i,o,s,a,u;this.$activeOption&&this.$activeOption.removeClass("active"),this.$activeOption=null,(e=t(e)).length&&(this.$activeOption=e.addClass("active"),!n&&l(n)||(i=this.$dropdown_content.height(),o=this.$activeOption.outerHeight(!0),n=this.$dropdown_content.scrollTop()||0,a=s=this.$activeOption.offset().top-this.$dropdown_content.offset().top+n,u=s-i+o,s+o>i+n?this.$dropdown_content.stop().animate({scrollTop:u},r?this.settings.scrollDuration:0):s=0;n--)-1!==this.items.indexOf(c(r.items[n].id))&&r.items.splice(n,1);return r},refreshOptions:function(e){var n,i,o,s,a,u,l,f,h,p,d,g,v,m,_,y;void 0===e&&(e=!0);var b,w,E=this,C=t.trim(E.$control_input.val()),S=E.search(C),T=E.$dropdown_content,O=E.$activeOption&&c(E.$activeOption.attr("data-value"));for(s=S.items.length,"number"==typeof E.settings.maxOptions&&(s=Math.min(s,E.settings.maxOptions)),a={},u=[],n=0;n0||v,E.hasOptions?(S.items.length>0?((_=O&&E.getOption(O))&&_.length?m=_:"single"===E.settings.mode&&E.items.length&&(m=E.getOption(E.items[0])),m&&m.length||(m=y&&!E.settings.addPrecedence?E.getAdjacentOption(y,1):T.find("[data-selectable]:first"))):m=y,E.setActiveOption(m),e&&!E.isOpen&&E.open()):(E.setActiveOption(null),e&&E.isOpen&&E.close())},addOption:function(e){var n,r,i;if(t.isArray(e))for(n=0,r=e.length;n=0&&i0),this.$control_input.data("grow",!e&&!n)},isFull:function(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems},updateOriginalInput:function(t){var e,n,r,i;if(t=t||{},1===this.tagType){for(r=[],e=0,n=this.items.length;e'+f(i)+"");r.length||this.$input.attr("multiple")||r.push(' '),this.$input.html(r.join(""))}else this.$input.val(this.getValue()),this.$input.attr("value",this.$input.val());this.isSetup&&(t.silent||this.trigger("change",this.$input.val()))},updatePlaceholder:function(){if(this.settings.placeholder){var t=this.$control_input;this.items.length?t.removeAttr("placeholder"):t.attr("placeholder",this.settings.placeholder),t.triggerHandler("update",{force:!0})}},open:function(){this.isLocked||this.isOpen||"multi"===this.settings.mode&&this.isFull()||(this.focus(),this.isOpen=!0,this.refreshState(),this.$dropdown.css({visibility:"hidden",display:"block"}),this.positionDropdown(),this.$dropdown.css({visibility:"visible"}),this.trigger("dropdown_open",this.$dropdown))},close:function(){var t=this.isOpen;"single"===this.settings.mode&&this.items.length&&(this.hideInput(),this.isBlurring||this.$control_input.blur()),this.isOpen=!1,this.$dropdown.hide(),this.setActiveOption(null),this.refreshState(),t&&this.trigger("dropdown_close",this.$dropdown)},positionDropdown:function(){var t=this.$control,e="body"===this.settings.dropdownParent?t.offset():t.position();e.top+=t.outerHeight(!0),this.$dropdown.css({width:t[0].getBoundingClientRect().width,top:e.top,left:e.left})},clear:function(t){this.items.length&&(this.$control.children(":not(input)").remove(),this.items=[],this.lastQuery=null,this.setCaret(0),this.setActiveItem(null),this.updatePlaceholder(),this.updateOriginalInput({silent:t}),this.refreshState(),this.showInput(),this.trigger("clear"))},insertAtCaret:function(t){var e=Math.min(this.caretPos,this.items.length),n=t[0],r=this.buffer||this.$control[0];0===e?r.insertBefore(n,r.firstChild):r.insertBefore(n,r.childNodes[e]),this.setCaret(e+1)},deleteSelection:function(e){var n,r,i,o,s,a,u,l,c;if(i=e&&8===e.keyCode?-1:1,o=d(this.$control_input[0]),this.$activeOption&&!this.settings.hideSelected&&(u=this.getAdjacentOption(this.$activeOption,-1).attr("data-value")),s=[],this.$activeItems.length){for(c=this.$control.children(".active:"+(i>0?"last":"first")),a=this.$control.children(":not(input)").index(c),i>0&&a++,n=0,r=this.$activeItems.length;n0&&o.start===this.$control_input.val().length&&s.push(this.items[this.caretPos]));if(!s.length||"function"==typeof this.settings.onDelete&&!1===this.settings.onDelete.apply(this,[s]))return!1;for(void 0!==a&&this.setCaret(a);s.length;)this.removeItem(s.pop());return this.showInput(),this.positionDropdown(),this.refreshOptions(!0),u&&(l=this.getOption(u)).length&&this.setActiveOption(l),!0},advanceSelection:function(t,e){var n,r,i,o,s;0!==t&&(this.rtl&&(t*=-1),n=t>0?"last":"first",r=d(this.$control_input[0]),this.isFocused&&!this.isInputHidden?(o=this.$control_input.val().length,(t<0?0===r.start&&0===r.length:r.start===o)&&!o&&this.advanceCaret(t,e)):(s=this.$control.children(".active:"+n)).length&&(i=this.$control.children(":not(input)").index(s),this.setActiveItem(null),this.setCaret(t>0?i+1:i)))},advanceCaret:function(t,e){var n,r;0!==t&&(n=t>0?"next":"prev",this.isShiftDown?(r=this.$control_input[n]()).length&&(this.hideInput(),this.setActiveItem(r),e&&e.preventDefault()):this.setCaret(this.caretPos+t))},setCaret:function(e){var n,r,i,o;if(e="single"===this.settings.mode?this.items.length:Math.max(0,Math.min(this.items.length,e)),!this.isPending)for(n=0,r=(i=this.$control.children(":not(input)")).length;n '}},e),r.setup=(n=r.setup,function(){n.apply(r,arguments),r.$dropdown_header=t(e.html(e)),r.$dropdown.prepend(r.$dropdown_header)})}),v.define("optgroup_columns",function(e){var n,r=this;e=t.extend({equalizeWidth:!0,equalizeHeight:!0},e),this.getAdjacentOption=function(e,n){var r=e.closest("[data-group]").find("[data-selectable]"),i=r.index(e)+n;return i>=0&&i
',t=t.firstChild,n.body.appendChild(t),e=i.width=t.offsetWidth-t.clientWidth,n.body.removeChild(t)),e},o=function(){var n,o,s,a,u,l,c;if((o=(c=t("[data-group]",r.$dropdown_content)).length)&&r.$dropdown_content.width()){if(e.equalizeHeight){for(s=0,n=0;n
1&&(u=l-a*(o-1),c.eq(o-1).css({width:u})))}};(e.equalizeHeight||e.equalizeWidth)&&(h.after(this,"positionDropdown",o),h.after(this,"refreshOptions",o))}),v.define("remove_button",function(e){e=t.extend({label:"×",title:"Remove",className:"remove",append:!0},e);"single"!==this.settings.mode?function(e,n){var r,i=e,o=''+n.label+" ";e.setup=(r=i.setup,function(){if(n.append){var s=i.settings.render.item;i.settings.render.item=function(t){return n=s.apply(e,arguments),r=o,i=n.search(/(<\/[^>]+>\s*)$/),n.substring(0,i)+r+n.substring(i);var n,r,i}}r.apply(e,arguments),e.$control.on("click","."+n.className,function(e){if(e.preventDefault(),!i.isLocked){var n=t(e.currentTarget).parent();i.setActiveItem(n),i.deleteSelection()&&i.setCaret(i.items.length)}})})}(this,e):function(e,n){n.className="remove-single";var r,i=e,o=''+n.label+" ";e.setup=(r=i.setup,function(){if(n.append){var s=t(i.$input.context).attr("id"),a=(t("#"+s),i.settings.render.item);i.settings.render.item=function(n){return r=a.apply(e,arguments),i=o,t("").append(r).append(i);var r,i}}r.apply(e,arguments),e.$control.on("click","."+n.className,function(t){t.preventDefault(),i.isLocked||i.clear()})})}(this,e)}),v.define("restore_on_backspace",function(t){var e,n=this;t.text=t.text||function(t){return t[this.settings.labelField]},this.onKeyDown=(e=n.onKeyDown,function(n){var r,i;return 8===n.keyCode&&""===this.$control_input.val()&&!this.$activeItems.length&&(r=this.caretPos-1)>=0&&r=0)return;s[e]="set-cookie"===e?(s[e]?s[e]:[]).concat([n]):s[e]?s[e]+", "+n:n}}),s):s}},p1b6:function(t,e,n){"use strict";var r=n("cGG2");t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,i,o,s){var a=[];a.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(i)&&a.push("path="+i),r.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},pBtG:function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},pxG4:function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},qRfI:function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},t8qj:function(t,e,n){"use strict";t.exports=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t}},tIFN:function(t,e,n){"use strict";var r=n("cGG2"),i=n("JP+z"),o=n("XmWM"),s=n("KCLY");function a(t){var e=new o(t),n=i(o.prototype.request,e);return r.extend(n,o.prototype,e),r.extend(n,e),n}var u=a(s);u.Axios=o,u.create=function(t){return a(r.merge(s,t))},u.Cancel=n("dVOP"),u.CancelToken=n("cWxy"),u.isCancel=n("pBtG"),u.all=function(t){return Promise.all(t)},u.spread=n("pxG4"),t.exports=u,t.exports.default=u},thJu:function(t,e,n){"use strict";var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function i(){this.message="String contains an invalid character"}i.prototype=new Error,i.prototype.code=5,i.prototype.name="InvalidCharacterError",t.exports=function(t){for(var e,n,o=String(t),s="",a=0,u=r;o.charAt(0|a)||(u="=",a%1);s+=u.charAt(63&e>>8-a%1*8)){if((n=o.charCodeAt(a+=.75))>255)throw new i;e=e<<8|n}return s}},xLtR:function(t,e,n){"use strict";var r=n("cGG2"),i=n("TNV1"),o=n("pBtG"),s=n("KCLY"),a=n("dIwP"),u=n("qRfI");function l(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return l(t),t.baseURL&&!a(t.url)&&(t.url=u(t.baseURL,t.url)),t.headers=t.headers||{},t.data=i(t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),r.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||s.adapter)(t).then(function(e){return l(t),e.data=i(e.data,e.headers,t.transformResponse),e},function(e){return o(e)||(l(t),e&&e.response&&(e.response.data=i(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}}},[0]);
================================================
FILE: public/assets/js/core.js
================================================
webpackJsonp([2],{2:function(e,t,o){e.exports=o("TcLE")},TcLE:function(e,t,o){$(document).ready(function(){if($('[data-toggle="tooltip"]').tooltip(),$('[data-toggle="popover"]').popover({html:!0}),$('[data-toggle="card-remove"]').on("click",function(e){return $(this).closest("div.card").remove(),e.preventDefault(),!1}),$('[data-toggle="card-collapse"]').on("click",function(e){return $(this).closest("div.card").toggleClass("card-collapsed"),e.preventDefault(),!1}),$('[data-toggle="card-fullscreen"]').on("click",function(e){return $(this).closest("div.card").toggleClass("card-fullscreen").removeClass("card-collapsed"),e.preventDefault(),!1}),$("[data-sparkline]").length){let e=function(e,t,o){e.sparkline(t,{type:e.attr("data-sparkline-type"),height:"100%",barColor:o.color,lineColor:o.color,fillColor:"transparent",spotColor:o.color,spotRadius:0,lineWidth:2,highlightColor:function(e,t){let o=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e),r=o?{r:parseInt(o[1],16),g:parseInt(o[2],16),b:parseInt(o[3],16)}:null;return"rgba("+r.r+", "+r.g+", "+r.b+", "+t+")"}(o.color,.6),highlightLineColor:"#666",defaultPixelsPerValue:5})};new Promise(function(e){e()}).then(function(){var t=[o("jHIs")];(function(){$("[data-sparkline]").each(function(){let t=$(this);e(t,JSON.parse(t.attr("data-sparkline")),{color:t.attr("data-sparkline-color")})})}).apply(null,t)}).catch(o.oe)}$(".chart-circle").length&&new Promise(function(e){e()}).then(function(){var e=[o("twYD")];(function(){$(".chart-circle").each(function(){let e=$(this);e.circleProgress({fill:{color:tabler.colors[e.attr("data-color")]||tabler.colors.blue},size:e.height(),startAngle:-Math.PI/4*2,emptyFill:"#F4F4F4",lineCap:"round"})})}).apply(null,e)}).catch(o.oe)})},jHIs:function(e,t){e.exports=__webpack_require__("./node_modules/tabler-ui/dist/assets/js/vendors/jquery.sparkline.min.js")},twYD:function(e,t){e.exports=__webpack_require__("./node_modules/tabler-ui/dist/assets/js/vendors/circle-progress.min.js")}},[2]);
================================================
FILE: public/assets/js/manifest.js
================================================
!function(r){var n=window.webpackJsonp;window.webpackJsonp=function(e,u,c){for(var f,i,p,a=0,l=[];a0&&t-1 in e)}C.fn=C.prototype={jquery:"3.3.1",constructor:C,length:0,toArray:function(){return u.call(this)},get:function(e){return null==e?u.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=C.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return C.each(this,e)},map:function(e){return this.pushStack(C.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(u.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|"+M+")"+M+"*"),z=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),X=new RegExp(W),U=new RegExp("^"+R+"$"),V={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+W),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},G=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,K=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ee=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},re=function(){p()},ie=me(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{L.apply(A=H.call(w.childNodes),w.childNodes),A[w.childNodes.length].nodeType}catch(e){L={apply:A.length?function(e,t){q.apply(e,H.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function oe(e,t,r,i){var o,s,l,c,f,h,y,m=t&&t.ownerDocument,T=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==T&&9!==T&&11!==T)return r;if(!i&&((t?t.ownerDocument||t:w)!==d&&p(t),t=t||d,g)){if(11!==T&&(f=J.exec(e)))if(o=f[1]){if(9===T){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(m&&(l=m.getElementById(o))&&x(t,l)&&l.id===o)return r.push(l),r}else{if(f[2])return L.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return L.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!S[e+" "]&&(!v||!v.test(e))){if(1!==T)m=t,y=e;else if("object"!==t.nodeName.toLowerCase()){for((c=t.getAttribute("id"))?c=c.replace(te,ne):t.setAttribute("id",c=b),s=(h=a(e)).length;s--;)h[s]="#"+c+" "+ye(h[s]);y=h.join(","),m=K.test(e)&&ge(t.parentNode)||t}if(y)try{return L.apply(r,m.querySelectorAll(y)),r}catch(e){}finally{c===b&&t.removeAttribute("id")}}}return u(e.replace(B,"$1"),t,r,i)}function ae(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function se(e){return e[b]=!0,e}function ue(e){var t=d.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function le(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function ce(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function de(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ie(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function he(e){return se(function(t){return t=+t,se(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function ge(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=oe.support={},o=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},p=oe.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!==d&&9===a.nodeType&&a.documentElement?(h=(d=a).documentElement,g=!o(d),w!==d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",re,!1):i.attachEvent&&i.attachEvent("onunload",re)),n.attributes=ue(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ue(function(e){return e.appendChild(d.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=Q.test(d.getElementsByClassName),n.getById=ue(function(e){return h.appendChild(e).id=b,!d.getElementsByName||!d.getElementsByName(b).length}),n.getById?(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},y=[],v=[],(n.qsa=Q.test(d.querySelectorAll))&&(ue(function(e){h.appendChild(e).innerHTML=" ",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+P+")"),e.querySelectorAll("[id~="+b+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||v.push(".#.+[+~]")}),ue(function(e){e.innerHTML=" ";var t=d.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(n.matchesSelector=Q.test(m=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ue(function(e){n.disconnectedMatch=m.call(e,"*"),m.call(e,"[s!='']:x"),y.push("!=",W)}),v=v.length&&new RegExp(v.join("|")),y=y.length&&new RegExp(y.join("|")),t=Q.test(h.compareDocumentPosition),x=t||Q.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},N=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===d||e.ownerDocument===w&&x(w,e)?-1:t===d||t.ownerDocument===w&&x(w,t)?1:c?O(c,e)-O(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===d?-1:t===d?1:i?-1:o?1:c?O(c,e)-O(c,t):0;if(i===o)return ce(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?ce(a[r],s[r]):a[r]===w?-1:s[r]===w?1:0},d):d},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==d&&p(e),t=t.replace(z,"='$1']"),n.matchesSelector&&g&&!S[t+" "]&&(!y||!y.test(t))&&(!v||!v.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return oe(t,d,null,[e]).length>0},oe.contains=function(e,t){return(e.ownerDocument||e)!==d&&p(e),x(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==d&&p(e);var i=r.attrHandle[t.toLowerCase()],o=i&&D.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},oe.escape=function(e){return(e+"").replace(te,ne)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(N),f){for(;t=e[o++];)t===e[o]&&(i=r.push(o));for(;i--;)e.splice(r[i],1)}return c=null,e},i=oe.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=i(t);return n},(r=oe.selectors={cacheLength:50,createPseudo:se,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||oe.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return V.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Z,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=E[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&E(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=oe.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace($," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",v=t.parentNode,y=s&&t.nodeName.toLowerCase(),m=!u&&!s,x=!1;if(v){if(o){for(;g;){for(p=t;p=p[g];)if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?v.firstChild:v.lastChild],a&&m){for(x=(d=(l=(c=(f=(p=v)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1])&&l[2],p=d&&v.childNodes[d];p=++d&&p&&p[g]||(x=d=0)||h.pop();)if(1===p.nodeType&&++x&&p===t){c[e]=[T,d,x];break}}else if(m&&(x=d=(l=(c=(f=(p=t)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1]),!1===x)for(;(p=++d&&p&&p[g]||(x=d=0)||h.pop())&&((s?p.nodeName.toLowerCase()!==y:1!==p.nodeType)||!++x||(m&&((c=(f=p[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]=[T,x]),p!==t)););return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return i[b]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?se(function(e,n){for(var r,o=i(e,t),a=o.length;a--;)e[r=O(e,o[a])]=!(n[r]=o[a])}):function(e){return i(e,0,n)}):i}},pseudos:{not:se(function(e){var t=[],n=[],r=s(e.replace(B,"$1"));return r[b]?se(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:se(function(e){return function(t){return oe(e,t).length>0}}),contains:se(function(e){return e=e.replace(Z,ee),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:se(function(e){return U.test(e||"")||oe.error("unsupported lang: "+e),e=e.replace(Z,ee).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:de(!1),disabled:de(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return Y.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:he(function(){return[0]}),last:he(function(e,t){return[t-1]}),eq:he(function(e,t,n){return[n<0?n+t:n]}),even:he(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:he(function(e,t,n){for(var r=n<0?n+t:n;++r1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function be(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s-1&&(o[l]=!(a[l]=f))}}else y=be(y===a?y.splice(h,y.length):y),i?i(null,a,y,u):L.apply(a,y)})}function Te(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,c=me(function(e){return e===t},s,!0),f=me(function(e){return O(t,e)>-1},s,!0),p=[function(e,n,r){var i=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):f(e,n,r));return t=null,i}];u1&&xe(p),u>1&&ye(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(B,"$1"),n,u0,i=e.length>0,o=function(o,a,s,u,c){var f,h,v,y=0,m="0",x=o&&[],b=[],w=l,C=o||i&&r.find.TAG("*",c),E=T+=null==w?1:Math.random()||.1,k=C.length;for(c&&(l=a===d||a||c);m!==k&&null!=(f=C[m]);m++){if(i&&f){for(h=0,a||f.ownerDocument===d||(p(f),s=!g);v=e[h++];)if(v(f,a||d,s)){u.push(f);break}c&&(T=E)}n&&((f=!v&&f)&&y--,o&&x.push(f))}if(y+=m,n&&m!==y){for(h=0;v=t[h++];)v(x,b,a,s);if(o){if(y>0)for(;m--;)x[m]||b[m]||(b[m]=j.call(u));b=be(b)}L.apply(u,b),c&&!o&&b.length>0&&y+t.length>1&&oe.uniqueSort(u)}return c&&(T=E,l=w),x};return n?se(o):o}(o,i))).selector=e}return s},u=oe.select=function(e,t,n,i){var o,u,l,c,f,p="function"==typeof e&&e,d=!i&&a(e=p.selector||e);if(n=n||[],1===d.length){if((u=d[0]=d[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&g&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(Z,ee),t)||[])[0]))return n;p&&(t=t.parentNode),e=e.slice(u.shift().value.length)}for(o=V.needsContext.test(e)?0:u.length;o--&&(l=u[o],!r.relative[c=l.type]);)if((f=r.find[c])&&(i=f(l.matches[0].replace(Z,ee),K.test(u[0].type)&&ge(t.parentNode)||t))){if(u.splice(o,1),!(e=i.length&&ye(u)))return L.apply(n,i),n;break}}return(p||s(e,d))(i,t,!g,n,!t||K.test(e)&&ge(t.parentNode)||t),n},n.sortStable=b.split("").sort(N).join("")===b,n.detectDuplicates=!!f,p(),n.sortDetached=ue(function(e){return 1&e.compareDocumentPosition(d.createElement("fieldset"))}),ue(function(e){return e.innerHTML=" ","#"===e.firstChild.getAttribute("href")})||le("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ue(function(e){return e.innerHTML=" ",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||le("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ue(function(e){return null==e.getAttribute("disabled")})||le(P,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),oe}(n);C.find=S,C.expr=S.selectors,C.expr[":"]=C.expr.pseudos,C.uniqueSort=C.unique=S.uniqueSort,C.text=S.getText,C.isXMLDoc=S.isXML,C.contains=S.contains,C.escapeSelector=S.escape;var N=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&C(e).is(n))break;r.push(e)}return r},D=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},A=C.expr.match.needsContext;function j(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var q=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function L(e,t,n){return m(t)?C.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?C.grep(e,function(e){return e===t!==n}):"string"!=typeof t?C.grep(e,function(e){return f.call(t,e)>-1!==n}):C.filter(t,e,n)}C.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?C.find.matchesSelector(r,e)?[r]:[]:C.find.matches(e,C.grep(t,function(e){return 1===e.nodeType}))},C.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(C(e).filter(function(){for(t=0;t1?C.uniqueSort(n):n},filter:function(e){return this.pushStack(L(this,e||[],!1))},not:function(e){return this.pushStack(L(this,e||[],!0))},is:function(e){return!!L(this,"string"==typeof e&&A.test(e)?C(e):e||[],!1).length}});var H,O=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(C.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||H,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:O.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof C?t[0]:t,C.merge(this,C.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:a,!0)),q.test(r[1])&&C.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=a.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(C):C.makeArray(e,this)}).prototype=C.fn,H=C(a);var P=/^(?:parents|prev(?:Until|All))/,M={children:!0,contents:!0,next:!0,prev:!0};function R(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}C.fn.extend({has:function(e){var t=C(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&C.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?C.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?f.call(C(e),this[0]):f.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(C.uniqueSort(C.merge(this.get(),C(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),C.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return N(e,"parentNode")},parentsUntil:function(e,t,n){return N(e,"parentNode",n)},next:function(e){return R(e,"nextSibling")},prev:function(e){return R(e,"previousSibling")},nextAll:function(e){return N(e,"nextSibling")},prevAll:function(e){return N(e,"previousSibling")},nextUntil:function(e,t,n){return N(e,"nextSibling",n)},prevUntil:function(e,t,n){return N(e,"previousSibling",n)},siblings:function(e){return D((e.parentNode||{}).firstChild,e)},children:function(e){return D(e.firstChild)},contents:function(e){return j(e,"iframe")?e.contentDocument:(j(e,"template")&&(e=e.content||e),C.merge([],e.childNodes))}},function(e,t){C.fn[e]=function(n,r){var i=C.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=C.filter(r,i)),this.length>1&&(M[e]||C.uniqueSort(i),P.test(e)&&i.reverse()),this.pushStack(i)}});var I=/[^\x20\t\r\n\f]+/g;function W(e){return e}function $(e){throw e}function B(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}C.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return C.each(e.match(I)||[],function(e,n){t[n]=!0}),t}(e):C.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s-1;)o.splice(n,1),n<=s&&s--}),this},has:function(e){return e?C.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},C.extend({Deferred:function(e){var t=[["notify","progress",C.Callbacks("memory"),C.Callbacks("memory"),2],["resolve","done",C.Callbacks("once memory"),C.Callbacks("once memory"),0,"resolved"],["reject","fail",C.Callbacks("once memory"),C.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return C.Deferred(function(n){C.each(t,function(t,r){var i=m(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&m(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(e,r,i){var o=0;function a(e,t,r,i){return function(){var s=this,u=arguments,l=function(){var n,l;if(!(e=o&&(r!==$&&(s=void 0,u=[n]),t.rejectWith(s,u))}};e?c():(C.Deferred.getStackHook&&(c.stackTrace=C.Deferred.getStackHook()),n.setTimeout(c))}}return C.Deferred(function(n){t[0][3].add(a(0,n,m(i)?i:W,n.notifyWith)),t[1][3].add(a(0,n,m(e)?e:W)),t[2][3].add(a(0,n,m(r)?r:$))}).promise()},promise:function(e){return null!=e?C.extend(e,i):i}},o={};return C.each(t,function(e,n){var a=n[2],s=n[5];i[n[1]]=a.add,s&&a.add(function(){r=s},t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),a.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=a.fireWith}),i.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=u.call(arguments),o=C.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?u.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(B(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||m(i[n]&&i[n].then)))return o.then();for(;n--;)B(i[n],a(n),o.reject);return o.promise()}});var F=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;C.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&F.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},C.readyException=function(e){n.setTimeout(function(){throw e})};var _=C.Deferred();function z(){a.removeEventListener("DOMContentLoaded",z),n.removeEventListener("load",z),C.ready()}C.fn.ready=function(e){return _.then(e).catch(function(e){C.readyException(e)}),this},C.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--C.readyWait:C.isReady)||(C.isReady=!0,!0!==e&&--C.readyWait>0||_.resolveWith(a,[C]))}}),C.ready.then=_.then,"complete"===a.readyState||"loading"!==a.readyState&&!a.documentElement.doScroll?n.setTimeout(C.ready):(a.addEventListener("DOMContentLoaded",z),n.addEventListener("load",z));var X=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===T(n))for(s in i=!0,n)X(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(C(e),n)})),t))for(;s1,null,!0)},removeData:function(e){return this.each(function(){Z.remove(this,e)})}}),C.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=K.get(e,t),n&&(!r||Array.isArray(n)?r=K.access(e,t,C.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=C.queue(e,t),r=n.length,i=n.shift(),o=C._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){C.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return K.get(e,n)||K.access(e,n,{empty:C.Callbacks("once memory").add(function(){K.remove(e,[t+"queue",n])})})}}),C.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]+)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""," "],thead:[1,""],col:[2,""],tr:[2,""],td:[3,""],_default:[0,"",""]};function ve(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&j(e,t)?C.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n-1)i&&i.push(o);else if(l=C.contains(o.ownerDocument,o),a=ve(f.appendChild(o),"script"),l&&ye(a),n)for(c=0;o=a[c++];)he.test(o.type||"")&&n.push(o);return f}me=a.createDocumentFragment().appendChild(a.createElement("div")),(xe=a.createElement("input")).setAttribute("type","radio"),xe.setAttribute("checked","checked"),xe.setAttribute("name","t"),me.appendChild(xe),y.checkClone=me.cloneNode(!0).cloneNode(!0).lastChild.checked,me.innerHTML="",y.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue;var Te=a.documentElement,Ce=/^key/,Ee=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ke=/^([^.]*)(?:\.(.+)|)/;function Se(){return!0}function Ne(){return!1}function De(){try{return a.activeElement}catch(e){}}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Ne;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return C().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=C.guid++)),e.each(function(){C.event.add(this,t,i,r,n)})}C.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=K.get(e);if(v)for(n.handler&&(n=(o=n).handler,i=o.selector),i&&C.find.matchesSelector(Te,i),n.guid||(n.guid=C.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(t){return void 0!==C&&C.event.triggered!==t.type?C.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(I)||[""]).length;l--;)d=g=(s=ke.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=C.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=C.event.special[d]||{},c=C.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&C.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),C.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=K.hasData(e)&&K.get(e);if(v&&(u=v.events)){for(l=(t=(t||"").match(I)||[""]).length;l--;)if(d=g=(s=ke.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){for(f=C.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||C.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)C.event.remove(e,d+t[l],n,r,!0);C.isEmptyObject(u)&&K.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=C.event.fix(e),u=new Array(arguments.length),l=(K.get(this,"events")||{})[s.type]||[],c=C.event.special[s.type]||{};for(u[0]=s,t=1;t=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n-1:C.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u\x20\t\r\n\f]*)[^>]*)\/>/gi,qe=/
================================================
FILE: resources/assets/js/components/FormComponent.vue
================================================
================================================
FILE: resources/assets/js/components/HeaderComponent.vue
================================================
================================================
FILE: resources/assets/js/components/ModalComponent.vue
================================================
================================================
FILE: resources/assets/js/components/ShowComponent.vue
================================================
================================================
FILE: resources/assets/js/components/SidebarComponent.vue
================================================
================================================
FILE: resources/assets/js/components/SingleResourceComponent.vue
================================================
{{ fieldKey | beautify }}
{{ resourceData[`${fieldKey}`] }}
{{ resourceData[`${fieldKey}`] }}
================================================
FILE: resources/assets/js/components/TableComponent.vue
================================================
{{ tableKey | beautify }}
{{ resource[`${fieldKey}`] }}
View
Action
{{ modal.action }} Resource?
Close
{{ modal.action }}
================================================
FILE: resources/assets/sass/_app.scss
================================================
.header .nav-tabs .nav-item, .sidebar .nav-tabs .nav-item {
width: 100%;
display: block;
}
.nav-tabs .nav-link.active + .nav-child {
display: block;
}
.nav-child {
display: none;
}
.sidebar {
background-color: #ffffff;
}
.sidebar.fixed {
display: none;
}
.sidebar .nav-tabs .nav-link {
border-bottom: 1px solid rgba(0, 40, 100, 0.12);
}
a[data-toggle="collapse"] {
position: relative;
}
.sidebar .dropdown-toggle::after {
display: block;
position: absolute;
top: 50%;
right: 20px;
transform: translateY(-50%);
}
.sidebar .dropdown-toggle::after {
display: inline-block;
width: 0;
height: 0;
margin-left: .255em;
vertical-align: .255em;
content: "";
border-top: .3em solid;
border-right: .3em solid transparent;
border-bottom: 0;
border-left: .3em solid transparent;
}
.action-container {
position: absolute;
right: 20px;
}
.card-options a.dropdown-item:active {
color: #fff;
}
.card-options a.dropdown-item:not(.btn) {
margin-left: 0;
}
th.sortable {
cursor: pointer;
}
th.sortable.sorted-by.asc::after, th.sortable.sorted-by.desc::after {
position: absolute;
content: "";
width: 0;
height: 0;
border-style: solid;
margin-top: 8px;
margin-left: 4px;
}
th.sortable.sorted-by.asc::after {
border-width: 0 5px 5px 5px;
border-color: transparent transparent #6e7687 transparent;
}
th.sortable.sorted-by.desc::after {
border-width: 5px 5px 0 5px;
border-color: #6e7687 transparent transparent transparent;
}
.header-brand-img {
height: 3.5rem;
line-height: 3.5rem;
}
.flex-grow {
flex:1;
}
@media (min-width: 992px) {
.fixed {
flex: 0 0 200px;
min-height: 100vh;
}
.col .fluid {
min-height: 100vh;
}
.sidebar.fixed {
display: block;
}
.header .header-brand {
display: none;
}
}
================================================
FILE: resources/assets/sass/_theme.scss
================================================
body {
color: #E2EDF4;
background-color: #1C1C1C;
}
.page span {
color: #E2EDF4;
}
.header {
background-color: #1C1C1C;
color: #E2EDF4;
border-bottom: 1px solid rgba(210, 188, 167, 0.12);
}
.footer {
background-color: #1C1C1C;
color: #E2EDF4;
border-top: 1px solid rgba(210, 188, 167, 0.12);
}
.sidebar {
background-color: #1C1C1C;
color: #E2EDF4;
border-right: 1px solid rgba(210, 188, 167, 0.12);
}
.card {
color: #E2EDF4;
background-color: #120F12;
border: none;
}
.card .card-header {
border-bottom: 1px solid rgba(210, 188, 167, 0.12);
}
.card .card-footer {
border-top: 1px solid rgba(210, 188, 167, 0.12);
}
.btn-black {
color: #E2EDF4;
background-color: #343434;
border-color: #343434;
}
.btn-black:hover, .btn-black:focus {
background-color: #343434;
border-color: #343434;
}
.btn.btn-pill.btn-secondary.btn-resource-navigation {
color: #E2EDF4;
background-color: #120F12;
border: none;
}
.btn.btn-pill.btn-secondary.btn-resource-navigation:disabled {
background-color: #343434;
}
.btn.btn-pill.btn-secondary.btn-resource-navigation:hover:enabled {
color: #D2BCA7;
background-color: #343434;
}
.btn.btn-secondary.btn-action, .btn.btn-secondary.btn-dropdown-action {
color: #E2EDF4;
background-color: #1C1C1C;
}
.btn.btn-secondary.btn-action:active, .btn.btn-secondary.btn-dropdown-action:active {
color: #D2BCA7;
background-color: #343434;
}
.dropdown-menu.dropdown-menu-dark {
color: #E2EDF4;
background-color: #1C1C1C;
}
.dropdown-menu.dropdown-menu-dark .dropdown-item {
color: #E2EDF4;
}
.dropdown-menu.dropdown-menu-dark .dropdown-item:hover,
.dropdown-menu.dropdown-menu-dark .dropdown-item:focus,
.dropdown-menu.dropdown-menu-dark .dropdown-item:active {
color: #D2BCA7;
background-color: #343434;
}
.dropdown-menu.dropdown-menu-dark-alternate {
color: #E2EDF4;
background-color: #120F12;
}
.dropdown-menu.dropdown-menu-dark-alternate.dropdown-menu-arrow:after {
border-bottom: 5px solid #120F12;
}
.dropdown-menu.dropdown-menu-dark-alternate .dropdown-item {
color: #E2EDF4;
}
.dropdown-menu.dropdown-menu-dark-alternate .dropdown-item:hover,
.dropdown-menu.dropdown-menu-dark-alternate .dropdown-item:focus,
.dropdown-menu.dropdown-menu-dark-alternate .dropdown-item:active {
color: #D2BCA7;
background-color: #343434;
}
input.form-control,
.selectize-control.form-control .selectize-input,
.selectize-control.form-control .selectize-dropdown,
.selectize-control.form-control.single .selectize-input.input-active {
color: #E2EDF4;
background-color: #343434;
}
input.form-control:focus, input.form-control:active {
color: #E2EDF4;
background-color: #1C1C1C;
}
.selectize-control.single .selectize-input:after {
background: transparent;
display: inline-block;
width: 0;
height: 0;
margin-top: .200em;
margin-left: .255em;
vertical-align: .255em;
border-top: .3em solid;
border-right: .3em solid transparent;
border-bottom: 0;
border-left: .3em solid transparent;
}
.header .nav-tabs .nav-link:hover:not(.disabled) {
color: #D2BCA7;
background-color: #343434;
border-bottom: 1px solid rgba(210, 188, 167, 0.12);
}
.highlight {
background-color: #343434;
}
.alert span {
color: initial;
}
//Shared CSS
.sidebar .nav-tabs .nav-item a {
color: #E2EDF4;
}
.sidebar .nav-tabs .nav-item a:hover {
color: #D2BCA7;
background-color: #343434;
}
================================================
FILE: resources/assets/sass/app-dark-theme.scss
================================================
@import 'app';
@import 'theme';
================================================
FILE: resources/assets/sass/app-light-theme.scss
================================================
@import 'app';
================================================
FILE: resources/views/layouts/app.blade.php
================================================
Otter
@yield("head")
@include("otter::partials/sidebar")
@include("otter::partials/header")
@yield("content")
@include("otter::partials/footer")
@yield("scripts")
================================================
FILE: resources/views/pages/create.blade.php
================================================
@extends("otter::layouts.app")
@section("head")
@stop
@section("content")
@stop
@section("scripts")
@stop
================================================
FILE: resources/views/pages/dashboard.blade.php
================================================
@extends("otter::layouts.app")
@section("head")
@stop
@section("content")
@stop
@section("scripts")
@stop
================================================
FILE: resources/views/pages/edit.blade.php
================================================
@extends("otter::layouts.app")
@section("head")
@stop
@section("content")
@stop
@section("scripts")
@stop
================================================
FILE: resources/views/pages/index.blade.php
================================================
@extends("otter::layouts.app")
@section("head")
@stop
@section("content")
@stop
@section("scripts")
@stop
================================================
FILE: resources/views/pages/show.blade.php
================================================
@extends("otter::layouts.app")
@section("head")
@stop
@section("content")
@stop
@section("scripts")
@stop
================================================
FILE: resources/views/partials/footer.blade.php
================================================
@section("footer")
@show
================================================
FILE: resources/views/partials/header.blade.php
================================================
@section("header")
@show
================================================
FILE: resources/views/partials/sidebar.blade.php
================================================
@section("sidebar")
@show
================================================
FILE: routes/web.php
================================================
name('web.otter.dashboard');
================================================
FILE: src/Console/InstallCommand.php
================================================
comment('Publishing Otter Service Provider...');
$this->callSilent('vendor:publish', ['--tag' => 'otter-provider']);
$this->comment('Publishing Otter Assets...');
$this->callSilent('vendor:publish', ['--tag' => 'otter-assets']);
$this->comment('Publishing Otter Configuration...');
$this->callSilent('vendor:publish', ['--tag' => 'otter-config']);
$this->registerOtterServiceProvider();
$this->info('Otter scaffolding installed successfully.');
}
/**
* Register the Otter service provider in the application configuration file.
*
* @return void
*/
protected function registerOtterServiceProvider()
{
$namespace = Str::replaceLast('\\', '', $this->getAppNamespace());
$appConfig = file_get_contents(config_path('app.php'));
if (Str::contains($appConfig, $namespace.'\\Providers\\OtterServiceProvider::class')) {
return;
}
file_put_contents(config_path('app.php'), str_replace(
"{$namespace}\\Providers\EventServiceProvider::class,".PHP_EOL,
"{$namespace}\\Providers\EventServiceProvider::class,".PHP_EOL." {$namespace}\Providers\OtterServiceProvider::class,".PHP_EOL,
$appConfig
));
file_put_contents(app_path('Providers/OtterServiceProvider.php'), str_replace(
"namespace App\Providers;",
"namespace {$namespace}\Providers;",
file_get_contents(app_path('Providers/OtterServiceProvider.php'))
));
}
}
================================================
FILE: src/Console/PublishCommand.php
================================================
call('vendor:publish', [
'--tag' => 'otter-config',
'--force' => $this->option('force'),
]);
$this->call('vendor:publish', [
'--tag' => 'otter-assets',
'--force' => true,
]);
}
}
================================================
FILE: src/Console/ResourceCommand.php
================================================
rootNamespace(), '', $name);
return $this->laravel->basePath().'/app'.str_replace('\\', '/', $name).'.php';
}
/**
* Build the class with the given name.
*
* @param string $name
* @return string
*/
protected function buildClass($name)
{
$model = $this->option('model');
//Check if class name of the model is supplied and use that, otherwise use the root name space and append the name of the model for the classname
$fullModelClassName = ($model) ? str_replace('/', '\\', $model) : $this->rootNamespace().'\\'.$this->argument('name');
//Replace the text with the full model classname and execute the buildclass to generate the rest of the stub
return str_replace('DummyFullClass', $fullModelClassName, parent::buildClass($name));
}
/**
* Get the default namespace for the class.
*
* @param string $rootNamespace
* @return string
*/
protected function getDefaultNamespace($rootNamespace)
{
return $rootNamespace.Otter::$otterBaseNamespace;
}
/**
* Get the root namespace for the class.
*
* @return string
*/
protected function rootNamespace()
{
return 'App';
}
}
================================================
FILE: src/Http/Controllers/API/OtterController.php
================================================
route()->uri);
if (! app()->runningInConsole()) {
//TODO: Retreiving the resource name like this means it's highly reliant on the singular and plural words of the model
// Wondering if there is a way to decouple it.
$this->resourceName = explode('.', $request->route()->getName())[2];
$this->resourceNamespace = Otter::$otterResourceNamespace;
$this->baseResourceName = Otter::getClassNameFromRouteName($this->resourceName);
$this->resource = $this->resourceNamespace.$this->baseResourceName;
$this->modelName = $this->resource::$model;
$this->resourceRouteKeyName = $this->resource::$routeKeyName;
}
}
/**
* Display a listing of the resource.
*
* @param Request $request
* @return void
*/
public function index(Request $request)
{
$modelName = $this->modelName;
//Instantiate new model instance
$modelInstance = new $modelName;
//Return an Otter resource of the model
if ($request->has('resourceId') && $request->has('relationshipName') && $request->has('relationshipResourceName')) {
$resourceId = $request->query('resourceId');
$relationshipName = $request->query('relationshipName');
$relationshipResourceName = $request->query('relationshipResourceName');
$modelInstance = $modelInstance->findOrFail($resourceId);
$relationshipResource = $this->resourceNamespace.Otter::getClassNameFromRouteName($relationshipResourceName);
$data = $modelInstance->{$relationshipName}()->paginate(config('otter.pagination', 10));
return $relationshipResource::collection($data);
} else {
return $this->resource::collection(($modelInstance)::paginate(config('otter.pagination', 10)));
}
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$resource = $this->resource;
$modelName = $this->modelName;
$baseResourceName = $this->baseResourceName;
//Instantiate new model instance
$modelInstance = new $modelName;
$validationRules = ($resource::validations() && $resource::validations()['server'] && $resource::validations()['server']['create']) ? $resource::validations()['server']['create'] : [];
$validator = Validator::make($request->all(), $validationRules);
if ($validator->fails()) {
return response()->json([
'status' => 'error',
'message' => "Failed creating a new {$baseResourceName} resource",
'errors' => $validator->messages(),
], 422);
}
$relationalFields = null;
if ($request->has('relationalFields')) {
$relationalFields = $request->input('relationalFields');
$request->request->remove('relationalFields');
}
//Force filling of variables into model instance
$modelInstance->forceFill($request->all());
if ($relationalFields) {
foreach ($relationalFields as $relationalField) {
$relationshipModel = $relationalField['relationshipModel'];
$relationshipName = $relationalField['relationshipName'];
$relationshipType = $relationalField['relationshipType'];
$relationshipId = $relationalField['relationshipId'];
if ($relationshipType === 'BelongsTo') {
$modelInstance->{$relationshipName}()->associate($relationshipId);
} elseif ($relationshipType === 'BelongsToMany') {
$modelInstance->{$relationshipName}()->attach($relationshipId);
}
}
}
//Save model instance
$modelInstance->save();
//Return response
return response()->json([
'status' => 'success',
'data' => new $this->resource($modelInstance),
]);
}
/**
* Display the specified resource.
*
* @param $modelInstance
* @return \Illuminate\Http\Response
*/
public function show($modelInstance)
{
//Retrieve the model instance
$modelInstance = Otter::getModelInstance($modelInstance, $this->modelName, $this->resourceRouteKeyName);
return new $this->resource($modelInstance);
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param $modelInstance
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $modelInstance)
{
//Retrieve the model instance
$resource = $this->resource;
$baseResourceName = $this->baseResourceName;
$validationRules = ($resource::validations() && $resource::validations()['server'] && $resource::validations()['server']['update']) ? $resource::validations()['server']['update'] : [];
$validator = Validator::make($request->all(), $validationRules);
if ($validator->fails()) {
return response()->json([
'status' => 'error',
'message' => "Failed creating a new {$baseResourceName} resource",
'errors' => $validator->messages(),
], 422);
}
//Cleanup request before saving data
$request->request->remove('relations');
$request->request->remove('route_key');
$modelInstance = Otter::getModelInstance($modelInstance, $this->modelName, $this->resourceRouteKeyName);
if ($request->has('relationalFields')) {
$relationalFields = $request->input('relationalFields');
$request->request->remove('relationalFields');
foreach ($relationalFields as $relationalField) {
$relationshipModel = $relationalField['relationshipModel'];
$relationshipName = $relationalField['relationshipName'];
$relationshipType = $relationalField['relationshipType'];
$relationshipId = $relationalField['relationshipId'];
if ($relationshipType === 'BelongsTo') {
$modelInstance->{$relationshipName}()->associate($relationshipId);
} elseif ($relationshipType === 'BelongsToMany') {
$modelInstance->{$relationshipName}()->sync($relationshipId);
} elseif ($relationshipType === 'HasMany') {
$modelInstance->{$relationshipName}()->whereNotin('id', $relationshipId)->delete();
}
}
$modelInstance->save();
}
$relationalForeignKeys = Otter::getRelationalForeignKeys($resource);
foreach ($relationalForeignKeys as $relationalForeignKey) {
$request->request->remove($relationalForeignKey);
}
$modelInstance->forceFill($request->all());
$modelInstance->save();
return response()->json([
'status' => 'success',
'data' => new $this->resource($modelInstance),
]);
}
/**
* Remove the specified resource from storage.
*
* @param $modelInstance
* @return \Illuminate\Http\Response
*/
public function destroy($modelInstance)
{
//Retrieve the model instance
$modelInstance = Otter::getModelInstance($modelInstance, $this->modelName, $this->resourceRouteKeyName);
$modelInstance->delete();
return response()->json([
'status' => 'success',
]);
}
/**
* Get all relational data from the OtterResource.
*
* @return \Illuminate\Http\Response
*/
public function relational()
{
$resource = $this->resource;
$relationalData = Otter::getRelationalData($resource);
return response()->json([
'data' => $relationalData,
]);
}
}
================================================
FILE: src/Http/Controllers/Controller.php
================================================
middleware(Authenticate::class);
}
}
================================================
FILE: src/Http/Controllers/OtterViewController.php
================================================
runningInConsole()) {
$this->resourceName = explode('.', $request->route()->getName())[2];
$this->resourceNamespace = Otter::$otterResourceNamespace;
$this->baseResourceName = Otter::getClassNameFromRouteName($this->resourceName);
$this->resource = $this->resourceNamespace.$this->baseResourceName;
$this->prettyResourceName = Str::singular(ucwords(str_replace('_', ' ', $this->resourceName)));
if (class_exists($this->resource)) {
$this->resourceRouteKeyName = $this->resource::$routeKeyName;
}
/* @var TYPE_NAME $model */
$this->modelName = ($request->is(config('otter.path', 'otter'))) ? null : $this->resource::$model;
}
$this->allResourceNames = Otter::getResourceNames();
}
/**
* Display the dashboard page.
*
* @return \Illuminate\Http\Response
*/
public function dashboard()
{
//Retrieve all the otter resource names that are available
$allResourceNames = $this->allResourceNames;
return view('otter::pages.dashboard', compact('allResourceNames'));
}
/**
* Display a listing of the resource.
*
* @return void
*/
public function index()
{
//Retrieve all the otter resource names that are available
$allResourceNames = $this->allResourceNames;
$prettyResourceName = $this->prettyResourceName;
$resourceName = $this->resourceName;
$resourceFields = json_encode(Otter::getAvailableFields($this->resource));
return view('otter::pages.index', compact('allResourceNames', 'prettyResourceName', 'resourceName', 'resourceFields'));
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
//Retrieve all the otter resource names that are available
$allResourceNames = $this->allResourceNames;
$prettyResourceName = $this->prettyResourceName;
$resourceName = $this->resourceName;
$resource = $this->resource;
$resourceFields = json_encode($resource::fields());
$relationalFields = json_encode(Otter::getRelationalFields($resource));
$validationRules = ($resource::validations() && $resource::validations()['client'] && $resource::validations()['client']['create']) ? $resource::validations()['client']['create'] : null;
$validationFields = json_encode($validationRules);
return view('otter::pages.create', compact('allResourceNames', 'prettyResourceName', 'resourceName', 'resourceFields', 'relationalFields', 'validationFields'));
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return void
*/
public function store(Request $request)
{
//Intentionally Not Implemented
}
/**
* Display the specified resource.
*
* @param \Illuminate\Database\Eloquent\Model $modelInstance
* @return \Illuminate\Http\Response
*/
public function show($modelInstance)
{
//Retrieve the model instance
$modelInstance = Otter::getModelInstance($modelInstance, $this->modelName, $this->resourceRouteKeyName);
//Retrieve all the otter resource names that are available
$allResourceNames = $this->allResourceNames;
$prettyResourceName = $this->prettyResourceName;
$resourceName = $this->resourceName;
$resourceFields = json_encode(Otter::getAvailableFields($this->resource));
$resourceId = $modelInstance->{$modelInstance->getRouteKeyName()};
return view('otter::pages.show', compact('allResourceNames', 'prettyResourceName', 'resourceId', 'resourceName', 'resourceFields'));
}
/**
* Show the form for editing the specified resource.
*
* @param \Illuminate\Database\Eloquent\Model $modelInstance
* @return \Illuminate\Http\Response
*/
public function edit($modelInstance)
{
//Retrieve the model instance
$modelInstance = Otter::getModelInstance($modelInstance, $this->modelName, $this->resourceRouteKeyName);
//Retrieve all the otter resource names that are available
$allResourceNames = $this->allResourceNames;
$prettyResourceName = $this->prettyResourceName;
$resourceName = $this->resourceName;
$resource = $this->resource;
$resourceFields = json_encode($resource::fields());
$resourceId = $modelInstance->{$modelInstance->getRouteKeyName()};
$relationalFields = json_encode(Otter::getRelationalFields($resource, $modelInstance));
$validationRules = ($resource::validations() && $resource::validations()['client'] && $resource::validations()['client']['update']) ? $resource::validations()['client']['update'] : null;
$validationFields = json_encode($validationRules);
return view('otter::pages.edit', compact('allResourceNames', 'prettyResourceName', 'resourceId', 'resourceName', 'resourceFields', 'relationalFields', 'validationFields'));
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Database\Eloquent\Model $modelInstance
* @return void
*/
public function update(Request $request, $modelInstance)
{
//Intentionally Not Implemented
}
/**
* Remove the specified resource from storage.
*
* @param \Illuminate\Database\Eloquent\Model $modelInstance
* @return void
*/
public function destroy($modelInstance)
{
//Intentionally Not Implemented
}
}
================================================
FILE: src/Http/Middleware/Authenticate.php
================================================
{parent::getRouteKeyName()};
$transformed['relations'] = ! empty($this->getRelationships()) ? $this->getRelationships() : null;
$transformed['created_at'] = $this->created_at ? $this->created_at->format('Y-m-d H:i:s') : null;
$transformed['updated_at'] = $this->updated_at ? $this->updated_at->format('Y-m-d H:i:s') : null;
$transformed['deleted_at'] = $this->deleted_at ? $this->deleted_at->format('Y-m-d H:i:s') : null;
return $transformed;
}
/**
* Resource route key name.
*/
public static $routeKeyName = 'id';
/**
* Get the fields and types used by the resource.
*
* @return array
*/
public static function fields()
{
return [];
}
/**
* Get the validations used by the resource.
*
* @return array
*/
public static function validations()
{
return [
];
}
/**
* Get the fields to be hidden in the index.
*
* @return array
*/
public static function hidden()
{
return [];
}
/**
* Get the relations used by the resource.
*
* @return array
*/
public static function relations()
{
return [
];
}
/**
* Get the relational data and the relational type.
*
* @return array
*/
private function getRelationships()
{
return Otter::getRelationalFields($this, $this->resource);
}
}
================================================
FILE: src/Otter.php
================================================
environment('local');
})($request);
}
/**
* Set the callback that should be used to authenticate Otter users.
*
* @param \Closure $callback
* @return static
*/
public static function auth($callback)
{
static::$authUsing = $callback;
return new static;
}
/**
* Retrieve the Names of the Otter Resources.
*
* @param bool $pretty
* @return Collection
*/
public static function getResourceNames($pretty = false)
{
$directory = app_path('Otter/');
if (! File::exists($directory)) {
return new Collection;
}
$files = File::files($directory);
$names = new Collection;
foreach ($files as $file) {
$path = $file->getPathname();
$class = str_replace('.php', '', $path);
$baseResourceName = basename($class);
$resourceName = ($pretty) ? Str::plural(preg_replace('/\B([A-Z])/', ' $1', $baseResourceName)) : self::getRouteNameFromClassName($baseResourceName);
$names->push($resourceName);
}
return $names;
}
/**
* Retrieve them class name from a route name.
*
* Example:
* user_addresses = UserAddress
*
* @param $routeName
* @return string
*/
public static function getClassNameFromRouteName($routeName)
{
return str_replace(' ', '', Str::singular(ucwords(str_replace('_', ' ', $routeName))));
}
/**
* Get the route name from a class name.
*
* Example:
* UserAddress = user_addresses
*
* @param $className
* @return string
*/
public static function getRouteNameFromClassName($className)
{
return Str::plural(strtolower(preg_replace('/\B([A-Z])/', '_$1', $className)));
}
/**
* Get the base class name from a fully qualified class name.
*
* @param $className
* @return string
*/
public static function getBaseClassName($className)
{
return preg_replace('@.*(\\\|\/)@', '', $className);
}
/**
* Retrieve the users's gravatar photo.
*
* @param $email
* @return string
*/
public static function getGravatarLink($email)
{
$hash = md5(strtolower(trim($email)));
return "//www.gravatar.com/avatar/$hash";
}
/**
* Specifies that Otter should use the dark theme.
*
* @return static
*/
public static function night()
{
static::$useDarkTheme = true;
return new static;
}
/**
* Retrieve the model instance
* This method checks if the object is an instance of the model and if it is not,
* it will take the object as the primary key of the model and retrieve it.
*
* @param $object
* @param $modelName
* @param $routeKeyName
*
* @return static
*/
public static function getModelInstance($object, $modelName, $routeKeyName)
{
if ($object instanceof $modelName) {
return $object;
} elseif ($routeKeyName != 'id') {
return $modelName::where($routeKeyName, '=', $object)->firstOrFail();
} else {
return $modelName::findOrFail($object);
}
}
/**
* Retrieve all the fields that are not hidden in the resource collection.
*
* @param OtterResource $otterResource
* @return array
*/
public static function getAvailableFields($otterResource)
{
return array_diff_key($otterResource::fields(), array_flip($otterResource::hidden()));
}
/**
* Retrieve all the fields that are relational in an OtterResource.
*
* $otterRelationBaseClassName is the class name of the OtterResource
* $otterRelationResource is the full class name of the OtterResource
*
* $relationshipModel is the full class name of the Eloquent Model defined in the OtterResource
* $relationshipModelInstance is an instance of the Eloquent Model defined in the OtterResource
* $relationshipType is the type of Eloquent Relation
* $relationshipForeignKey is the name of the Foreign Key used for the Eloquent Relation
* $relation['relationshipId'] is the actual id of relationship that ties the models together
*
* $relation['resourceName'] is the plural name of the resource used to generate the routes
* $relation['resourceTitle'] is the title column of the resource to display the listing in options
* $relation['resourceFields'] is the fields of the resource
* $relation['resourceId'] is the the model key value so that it works with route model binding or without
*
* @param OtterResource $otterResource
* @param null $modelObject
* @return array
*/
public static function getRelationalFields($otterResource, $modelObject = null)
{
$relationalDataArray = [];
$otterResourceNamespace = self::$otterResourceNamespace;
$modelInstance = ($modelObject) ? self::getModelInstance($modelObject, $otterResource::$model, $otterResource::$routeKeyName) : new $otterResource::$model;
foreach ($otterResource::relations() as $relationshipName => $otterRelationData) {
$otterRelationBaseClassName = (is_array($otterRelationData)) ? $otterRelationData[0] : $otterRelationData;
$otterRelationResource = $otterResourceNamespace.$otterRelationBaseClassName;
$relationshipType = self::getBaseClassName(get_class($modelInstance->{$relationshipName}()));
$relationshipModel = $otterRelationResource::$model;
$relationshipModelInstance = new $relationshipModel;
//Check if a foreign key is manually specified and if so, use the specified foreign key
$relationshipForeignKey = (is_array($otterRelationData)) ? $otterRelationData[1] : $relationshipModelInstance->getForeignKey();
$relation = [];
$relation['relationshipName'] = $relationshipName;
$relation['relationshipType'] = $relationshipType;
$relation['relationshipModel'] = $relationshipModel;
$relation['relationshipForeignKey'] = $relationshipForeignKey;
$relation['relationshipId'] = 'null';
$relation['resourceName'] = self::getRouteNameFromClassName($otterRelationBaseClassName);
$relation['resourceTitle'] = $otterRelationResource::$title;
$relation['resourceFields'] = self::getAvailableFields($otterRelationResource);
$relation['resourceId'] = 'null';
if ($relationshipType === 'BelongsTo') {
$relationModelInstance = $modelInstance->{$relationshipName};
$relation['relationshipId'] = ($modelInstance->{$relationshipForeignKey}) ? $modelInstance->{$relationshipForeignKey} : null;
$relation['resourceId'] = ($relationModelInstance) ? $relationModelInstance->{$relationModelInstance->getRouteKeyName()} : null;
} elseif ($relationshipType === 'BelongsToMany') {
$relation['relationshipId'] = ($modelInstance->{$relationshipName}) ? $modelInstance->{$relationshipName}()->allRelatedIds() : null;
$relation['resourceId'] = ($modelInstance) ? $modelInstance->id : null;
} elseif ($relationshipType === 'HasOne') {
$relationModelInstance = $modelInstance->{$relationshipName};
$relation['relationshipId'] = ($relationModelInstance) ? $relationModelInstance->id : null;
$relation['resourceId'] = ($relationModelInstance) ? $relationModelInstance->{$relationModelInstance->getRouteKeyName()} : null;
} elseif ($relationshipType === 'HasMany') {
$relation['relationshipId'] = ($modelInstance->{$relationshipName}) ? $modelInstance->{$relationshipName}()->pluck('id') : null;
$relation['resourceId'] = ($modelInstance) ? $modelInstance->id : null;
}
$relationalDataArray[$relationshipName] = $relation;
}
return $relationalDataArray;
}
/**
* Retrieve all the foreign keys in an OtterResource.
*
* @param OtterResource $otterResource
* @return array
*/
public static function getRelationalForeignKeys($otterResource)
{
$relationalForeignKeysArray = [];
$otterResourceNamespace = self::$otterResourceNamespace;
foreach ($otterResource::relations() as $relationshipName => $otterRelationData) {
$otterRelationBaseClassName = (is_array($otterRelationData)) ? $otterRelationData[0] : $otterRelationData;
$otterRelationResource = $otterResourceNamespace.$otterRelationBaseClassName;
$relationshipModel = $otterRelationResource::$model;
$relationshipModelInstance = new $relationshipModel;
//Check if a foreign key is manually specified and if so, use the specified foreign key
$relationshipForeignKey = (is_array($otterRelationData)) ? $otterRelationData[1] : $relationshipModelInstance->getForeignKey();
array_push($relationalForeignKeysArray, $relationshipForeignKey);
}
return $relationalForeignKeysArray;
}
/**
* Retrieve all the relational data in an OtterResource.
*
* @param OtterResource $otterResource
* @return array
*/
public static function getRelationalData($otterResource)
{
$relationalDataArray = [];
$otterResourceNamespace = self::$otterResourceNamespace;
foreach ($otterResource::relations() as $relationshipName => $otterRelationData) {
$otterRelationBaseClassName = (is_array($otterRelationData)) ? $otterRelationData[0] : $otterRelationData;
$otterRelationResource = $otterResourceNamespace.$otterRelationBaseClassName;
/* @var TYPE_NAME $model */
$relationalDataArray[$relationshipName] = $otterRelationResource::collection((new $otterRelationResource::$model())::all());
}
return $relationalDataArray;
}
}
================================================
FILE: src/OtterApplicationServiceProvider.php
================================================
authorization();
}
/**
* Configure the Otter authorization services.
*
* @return void
*/
protected function authorization()
{
$this->gate();
Otter::auth(function ($request) {
return app()->environment('local') ||
Gate::check('viewOtter', [$request->user()]);
});
}
/**
* Register the Otter gate.
*
* This gate determines who can access Otter in non-local environments.
*
* @return void
*/
protected function gate()
{
Gate::define('viewOtter', function ($user) {
return in_array($user->email, [
//
]);
});
}
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
}
================================================
FILE: src/OtterServiceProvider.php
================================================
registerPublishing();
$this->registerResources();
$this->registerRoutes();
$this->registerResourceRoutes();
}
/**
* Register the Otter routes.
*
* @return void
*/
protected function registerRoutes()
{
Route::group([
'prefix' => config('otter.path', 'otter'),
'namespace' => 'Poowf\Otter\Http\Controllers',
'middleware' => config('otter.middleware.web', 'web'),
], function () {
$this->loadRoutesFrom(__DIR__.'/../routes/web.php');
});
}
/**
* Register the Otter Resource Routes.
*
* @return void
*/
protected function registerResourceRoutes()
{
$names = Otter::getResourceNames();
Route::group([
'prefix' => 'api/'.config('otter.path', 'otter'),
'namespace' => 'Poowf\Otter\Http\Controllers\API',
'middleware' => config('otter.middleware.api', 'api'),
], function () use ($names) {
foreach ($names as $pluralName) {
Route::get("{$pluralName}/relational", 'OtterController@relational')->name("api.otter.{$pluralName}.relational");
Route::apiResource($pluralName, 'OtterController', ['as' => 'api.otter']);
}
});
Route::group([
'prefix' => config('otter.path', 'otter'),
'namespace' => 'Poowf\Otter\Http\Controllers',
'middleware' => config('otter.middleware.web', 'web'),
], function () use ($names) {
foreach ($names as $pluralName) {
Route::resource($pluralName, 'OtterViewController', ['as' => 'web.otter'])->only([
'index', 'show', 'create', 'edit',
]);
}
});
}
/**
* Register the Otter resources.
*
* @return void
*/
protected function registerResources()
{
$this->loadViewsFrom(__DIR__.'/../resources/views', 'otter');
}
/**
* Merge configuration.
*
* @return void
*/
private function mergeConfig()
{
$this->mergeConfigFrom(
__DIR__.'/../config/otter.php', 'otter'
);
}
/**
* Register the package's publishable resources.
*
* @return void
*/
protected function registerPublishing()
{
if ($this->app->runningInConsole()) {
$this->publishes([
__DIR__.'/../public' => public_path('vendor/otter'),
], 'otter-assets');
$this->publishes([
__DIR__.'/../stubs/OtterServiceProvider.stub' => app_path('Providers/OtterServiceProvider.php'),
], 'otter-provider');
$this->publishes([
__DIR__.'/../config/otter.php' => config_path('otter.php'),
], 'otter-config');
}
}
/**
* Setup the commands for Otter.
*
* @return void
*/
protected function registerCommands()
{
$this->commands([
Console\InstallCommand::class,
Console\PublishCommand::class,
Console\ResourceCommand::class,
]);
}
/**
* Register the application services.
*
* @return void
*/
public function register()
{
$this->mergeConfig();
$this->registerCommands();
}
}
================================================
FILE: stubs/OtterResource.stub
================================================
[
'create' => [
/**
* Client side create resource validation
*/
],
'update' => [
/**
* Client side update resource validation
*/
]
],
'server' => [
'create' => [
/**
* Server side create resource validation
*/
],
'update' => [
/**
* Server side update resource validation
*/
]
],
];
}
/**
* Get the relations used by the resource
*
* @return array
*/
public static function relations()
{
return [
];
}
}
================================================
FILE: stubs/OtterServiceProvider.stub
================================================
email, [
//
]);
});
}
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
}
================================================
FILE: tests/Feature/AuthorizationTest.php
================================================
artisan('otter:install');
$this->withoutMiddleware([VerifyCsrfToken::class]);
}
protected function tearDown()
{
parent::tearDown();
Otter::auth(null);
}
public function test_clean_otter_installation_denies_access_by_default()
{
$this->get('/otter')
->assertStatus(403);
}
public function test_clean_otter_installation_denies_access_by_default_for_any_auth_user()
{
$this->actingAs(new Authenticated);
$this->get('/otter')
->assertStatus(403);
}
public function test_guests_gets_unauthorized_by_gate()
{
Otter::auth(function (Request $request) {
return Gate::check('viewOtter', [$request->user()]);
});
Gate::define('viewOtter', function ($user) {
return true;
});
$this->get('/otter')
->assertStatus(403);
}
public function test_authenticated_user_gets_authorized_by_gate()
{
$this->actingAs(new Authenticated);
Otter::auth(function (Request $request) {
return Gate::check('viewOtter', [$request->user()]);
});
Gate::define('viewOtter', function (Authenticatable $user) {
return $user->getAuthIdentifier() === 'otter-test';
});
$this->get('/otter')
->assertStatus(200);
}
public function test_guests_can_be_authorized()
{
Otter::auth(function (Request $request) {
return Gate::check('viewOtter', [$request->user()]);
});
Gate::define('viewOtter', function (?Authenticatable $user) {
return true;
});
$this->get('/otter')
->assertStatus(200);
}
public function test_unauthorized_requests()
{
Otter::auth(function () {
return false;
});
$this->get('/otter')
->assertStatus(403);
}
public function test_authorized_requests()
{
Otter::auth(function () {
return true;
});
$this->get('/otter')
->assertSuccessful();
}
}
class Authenticated implements Authenticatable
{
public $email;
public function getAuthIdentifierName()
{
return 'Otter Test';
}
public function getAuthIdentifier()
{
return 'otter-test';
}
public function getAuthPassword()
{
return 'secret';
}
public function getRememberToken()
{
return 'otter-ottermatic';
}
public function setRememberToken($value)
{
//
}
public function getRememberTokenName()
{
//
}
}
================================================
FILE: tests/FeatureTestCase.php
================================================
detectEnvironment(function () {
return 'self-testing';
});
}
/**
* @param \Illuminate\Foundation\Application $app
* @return void
*/
protected function getEnvironmentSetUp($app)
{
$config = $app->get('config');
$config->set('logging.default', 'errorlog');
$config->set('database.default', 'testbench');
$config->set('database.connections.testbench', [
'driver' => 'sqlite',
'database' => ':memory:',
'prefix' => '',
]);
}
}
================================================
FILE: webpack.mix.js
================================================
const mix = require('laravel-mix');
const ImageminPlugin = require('imagemin-webpack-plugin').default;
const CopyWebpackPlugin = require('copy-webpack-plugin');
const imageminMozjpeg = require('imagemin-mozjpeg');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
|
*/
mix
.setPublicPath('public')
.options({
fileLoaderDirs: {
fonts: 'assets/fonts'
}
})
.webpackConfig({
plugins: [
new CopyWebpackPlugin([{
from: 'resources/assets/img',
to: 'assets/img', // Laravel mix will place this in 'public/img'
}]),
new ImageminPlugin({
test: /\.(jpe?g|png|gif|svg)$/i,
plugins: [
imageminMozjpeg({
quality: 100,
})
]
})
],
externals: {
'sparkline': '__webpack_require__("./node_modules/tabler-ui/dist/assets/js/vendors/jquery.sparkline.min.js")',
'circle-progress': '__webpack_require__("./node_modules/tabler-ui/dist/assets/js/vendors/circle-progress.min.js")'
}
})
.js('resources/assets/js/bootstrap.js', 'assets/js')
.js('resources/assets/js/app.js', 'assets/js')
.js('node_modules/tabler-ui/dist/assets/js/core.js', 'assets/js')
.js('node_modules/trumbowyg/dist/plugins/colors/trumbowyg.colors.min.js', 'assets/js')
.js('node_modules/trumbowyg/dist/plugins/cleanpaste/trumbowyg.cleanpaste.min.js', 'assets/js')
.js('node_modules/trumbowyg/dist/plugins/fontsize/trumbowyg.fontsize.min.js', 'assets/js')
.js('node_modules/trumbowyg/dist/plugins/history/trumbowyg.history.min.js', 'assets/js')
.sass('resources/assets/sass/app-light-theme.scss', 'public/assets/css/app.css')
.sass('resources/assets/sass/app-dark-theme.scss', 'public/assets/css/app-dark.css')
.sass('node_modules/trumbowyg/dist/ui/sass/trumbowyg.scss', 'assets/css')
.sass('node_modules/trumbowyg/dist/plugins/colors/ui/sass/trumbowyg.colors.scss', 'assets/css')
.copy('node_modules/tabler-ui/dist/assets/css/tabler.css', 'public/assets/css/tabler.css')
.copy('node_modules/tabler-ui/dist/assets/fonts/feather/feather-webfont.eot', 'public/assets/fonts/feather/feather-webfont.eot')
.copy('node_modules/tabler-ui/dist/assets/fonts/feather/feather-webfont.svg', 'public/assets/fonts/feather/feather-webfont.svg')
.copy('node_modules/tabler-ui/dist/assets/fonts/feather/feather-webfont.ttf', 'public/assets/fonts/feather/feather-webfont.ttf')
.copy('node_modules/tabler-ui/dist/assets/fonts/feather/feather-webfont.woff', 'public/assets/fonts/feather/feather-webfont.woff')
.copy('node_modules/trumbowyg/dist/ui/icons.svg', 'public/assets/fonts/trumbowygicons.svg')
.extract(['jquery'])
.version();