hot-form
Version:
A project developed based on ant-design-vue and vant whitch do some things on create/render/modify and etc. for forms. Also can custom some component on the form items if you want. 一个基于antdv/vant开发的创建表单组件,包含表单渲染、表单编辑页面、以及植入自定义附加内容的组件
5 lines • 3.18 MB
JavaScript
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("vuedraggable"),require("vue")):"function"===typeof define&&define.amd?define(["vuedraggable","vue"],t):"object"===typeof exports?exports["hot-form"]=t(require("vuedraggable"),require("vue")):e["hot-form"]=t(e["vuedraggable"],e["vue"])})("undefined"!==typeof self?self:this,(function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="fb15")}({"00ee":function(e,t,n){var r=n("b622"),o=r("toStringTag"),i={};i[o]="z",e.exports="[object z]"===String(i)},"00fd":function(e,t,n){var r=n("9e69"),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,u=r?r.toStringTag:void 0;function l(e){var t=i.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(l){}var o=a.call(e);return r&&(t?e[u]=n:delete e[u]),o}e.exports=l},"010e":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
//! moment.js locale configuration
var t=e.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",ss:"%d soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}});return t}))},"02fb":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
//! moment.js locale configuration
var t=e.defineLocale("ml",{months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),monthsParseExact:!0,weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),longDateFormat:{LT:"A h:mm -നു",LTS:"A h:mm:ss -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -നു",LLLL:"dddd, D MMMM YYYY, A h:mm -നു"},calendar:{sameDay:"[ഇന്ന്] LT",nextDay:"[നാളെ] LT",nextWeek:"dddd, LT",lastDay:"[ഇന്നലെ] LT",lastWeek:"[കഴിഞ്ഞ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",ss:"%d സെക്കൻഡ്",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"},meridiemParse:/രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,meridiemHour:function(e,t){return 12===e&&(e=0),"രാത്രി"===t&&e>=4||"ഉച്ച കഴിഞ്ഞ്"===t||"വൈകുന്നേരം"===t?e+12:e},meridiem:function(e,t,n){return e<4?"രാത്രി":e<12?"രാവിലെ":e<17?"ഉച്ച കഴിഞ്ഞ്":e<20?"വൈകുന്നേരം":"രാത്രി"}});return t}))},"030f":function(e,t,n){(function(e){(function(){"use strict";var t=function(e){var t=typeof e;return null===e?"null":"object"===t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"===t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t},n=function(e){return function(n){return t(n)===e}},r=function(e){return function(t){return typeof t===e}},o=function(e){return function(t){return e===t}},i=n("string"),a=n("object"),u=n("array"),l=o(null),c=r("boolean"),s=o(void 0),f=function(e){return null===e||void 0===e},d=function(e){return!f(e)},h=r("function"),m=r("number"),v=function(e,t){if(u(e)){for(var n=0,r=e.length;n<r;++n)if(!t(e[n]))return!1;return!0}return!1},p=function(){},g=function(e){return function(){return e()}},b=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e(t.apply(null,n))}},y=function(e,t){return function(n){return e(t(n))}},_=function(e){return function(){return e}},w=function(e){return e},M=function(e,t){return e===t};function x(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=t.concat(n);return e.apply(null,o)}}var k=function(e){return function(t){return!e(t)}},C=function(e){return function(){throw new Error(e)}},S=_(!1),L=_(!0),T=tinymce.util.Tools.resolve("tinymce.ThemeManager"),O=function(){return O=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},O.apply(this,arguments)};function z(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function D(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}var H=function(){return A},A=function(){var e=function(e){return e()},t=w,n={fold:function(e,t){return e()},isSome:S,isNone:L,getOr:t,getOrThunk:e,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:_(null),getOrUndefined:_(void 0),or:t,orThunk:e,map:H,each:p,bind:H,exists:S,forall:L,filter:function(){return H()},toArray:function(){return[]},toString:_("none()")};return n}(),V=function(e){var t=_(e),n=function(){return o},r=function(t){return t(e)},o={fold:function(t,n){return n(e)},isSome:L,isNone:S,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:n,orThunk:n,map:function(t){return V(t(e))},each:function(t){t(e)},bind:r,exists:r,forall:r,filter:function(t){return t(e)?o:A},toArray:function(){return[e]},toString:function(){return"some("+e+")"}};return o},E=function(e){return null===e||void 0===e?A:V(e)},P={some:V,none:H,from:E},j=Array.prototype.slice,Y=Array.prototype.indexOf,N=Array.prototype.push,F=function(e,t){return Y.call(e,t)},I=function(e,t){var n=F(e,t);return-1===n?P.none():P.some(n)},R=function(e,t){return F(e,t)>-1},B=function(e,t){for(var n=0,r=e.length;n<r;n++){var o=e[n];if(t(o,n))return!0}return!1},$=function(e,t){for(var n=[],r=0;r<e;r++)n.push(t(r));return n},W=function(e,t){for(var n=[],r=0;r<e.length;r+=t){var o=j.call(e,r,r+t);n.push(o)}return n},U=function(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o)}return r},q=function(e,t){for(var n=0,r=e.length;n<r;n++){var o=e[n];t(o,n)}},K=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];t(r,n)}},G=function(e,t){for(var n=[],r=[],o=0,i=e.length;o<i;o++){var a=e[o],u=t(a,o)?n:r;u.push(a)}return{pass:n,fail:r}},X=function(e,t){for(var n=[],r=0,o=e.length;r<o;r++){var i=e[r];t(i,r)&&n.push(i)}return n},J=function(e,t,n){return K(e,(function(e,r){n=t(n,e,r)})),n},Z=function(e,t,n){return q(e,(function(e,r){n=t(n,e,r)})),n},Q=function(e,t,n){for(var r=0,o=e.length;r<o;r++){var i=e[r];if(t(i,r))return P.some(i);if(n(i,r))break}return P.none()},ee=function(e,t){return Q(e,t,S)},te=function(e,t){for(var n=0,r=e.length;n<r;n++){var o=e[n];if(t(o,n))return P.some(n)}return P.none()},ne=function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!u(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);N.apply(t,e[n])}return t},re=function(e,t){return ne(U(e,t))},oe=function(e,t){for(var n=0,r=e.length;n<r;++n){var o=e[n];if(!0!==t(o,n))return!1}return!0},ie=function(e){var t=j.call(e,0);return t.reverse(),t},ae=function(e,t){return X(e,(function(e){return!R(t,e)}))},ue=function(e,t){for(var n={},r=0,o=e.length;r<o;r++){var i=e[r];n[String(i)]=t(i,r)}return n},le=function(e){return[e]},ce=function(e,t){var n=j.call(e,0);return n.sort(t),n},se=function(e,t){return t>=0&&t<e.length?P.some(e[t]):P.none()},fe=function(e){return se(e,0)},de=function(e){return se(e,e.length-1)},he=h(Array.from)?Array.from:function(e){return j.call(e)},me=function(e,t){for(var n=0;n<e.length;n++){var r=t(e[n],n);if(r.isSome())return r}return P.none()},ve=Object.keys,pe=Object.hasOwnProperty,ge=function(e,t){for(var n=ve(e),r=0,o=n.length;r<o;r++){var i=n[r],a=e[i];t(a,i)}},be=function(e,t){return ye(e,(function(e,n){return{k:n,v:t(e,n)}}))},ye=function(e,t){var n={};return ge(e,(function(e,r){var o=t(e,r);n[o.k]=o.v})),n},_e=function(e){return function(t,n){e[n]=t}},we=function(e,t,n,r){var o={};return ge(e,(function(e,o){(t(e,o)?n:r)(e,o)})),o},Me=function(e,t){var n={};return we(e,t,_e(n),p),n},xe=function(e,t){var n=[];return ge(e,(function(e,r){n.push(t(e,r))})),n},ke=function(e,t){for(var n=ve(e),r=0,o=n.length;r<o;r++){var i=n[r],a=e[i];if(t(a,i,e))return P.some(a)}return P.none()},Ce=function(e){return xe(e,w)},Se=function(e,t){return Le(e,t)?P.from(e[t]):P.none()},Le=function(e,t){return pe.call(e,t)},Te=function(e,t){return Le(e,t)&&void 0!==e[t]&&null!==e[t]},Oe=function(e,t,n){return void 0===n&&(n=M),e.exists((function(e){return n(e,t)}))},ze=function(e,t,n){return void 0===n&&(n=M),Ae(e,t,n).getOr(e.isNone()&&t.isNone())},De=function(e){for(var t=[],n=function(e){t.push(e)},r=0;r<e.length;r++)e[r].each(n);return t},He=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];if(!r.isSome())return P.none();t.push(r.getOrDie())}return P.some(t)},Ae=function(e,t,n){return e.isSome()&&t.isSome()?P.some(n(e.getOrDie(),t.getOrDie())):P.none()},Ve=function(e,t,n,r){return e.isSome()&&t.isSome()&&n.isSome()?P.some(r(e.getOrDie(),t.getOrDie(),n.getOrDie())):P.none()},Ee=function(e,t){return void 0!==e&&null!==e?P.some(t(e)):P.none()},Pe=function(e,t){return e?P.some(t):P.none()},je=function(e,t){return e+t},Ye=function(e,t){return e.substring(t)},Ne=function(e,t,n){return""===t||e.length>=t.length&&e.substr(n,n+t.length)===t},Fe=function(e,t){return Be(e,t)?Ye(e,t.length):e},Ie=function(e,t){return $e(e,t)?e:je(e,t)},Re=function(e,t){return-1!==e.indexOf(t)},Be=function(e,t){return Ne(e,t,0)},$e=function(e,t){return Ne(e,t,e.length-t.length)},We=function(e){return function(t){return t.replace(e,"")}},Ue=We(/^\s+|\s+$/g),qe=function(e){return e.length>0},Ke=function(e){return!qe(e)},Ge=function(e){return void 0!==e.style&&h(e.style.getPropertyValue)},Xe=function(e,t){var n=t||document,r=n.createElement("div");if(r.innerHTML=e,!r.hasChildNodes()||r.childNodes.length>1)throw console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return Qe(r.childNodes[0])},Je=function(e,t){var n=t||document,r=n.createElement(e);return Qe(r)},Ze=function(e,t){var n=t||document,r=n.createTextNode(e);return Qe(r)},Qe=function(e){if(null===e||void 0===e)throw new Error("Node cannot be null or undefined");return{dom:e}},et=function(e,t,n){return P.from(e.dom.elementFromPoint(t,n)).map(Qe)},tt={fromHtml:Xe,fromTag:Je,fromText:Ze,fromDom:Qe,fromPoint:et};"undefined"!==typeof window?window:Function("return this;")();var nt,rt=9,ot=11,it=1,at=3,ut=function(e){var t=e.dom.nodeName;return t.toLowerCase()},lt=function(e){return e.dom.nodeType},ct=function(e){return function(t){return lt(t)===e}},st=ct(it),ft=ct(at),dt=ct(rt),ht=ct(ot),mt=function(e){var t,n=!1;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return n||(n=!0,t=e.apply(null,r)),t}},vt=function(e,t,n,r){var o=e.isiOS()&&!0===/ipad/i.test(n),i=e.isiOS()&&!o,a=e.isiOS()||e.isAndroid(),u=a||r("(pointer:coarse)"),l=o||!i&&a&&r("(min-device-width:768px)"),c=i||a&&!l,s=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(n),f=!c&&!l&&!s;return{isiPad:_(o),isiPhone:_(i),isTablet:_(l),isPhone:_(c),isTouch:_(u),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:_(s),isDesktop:_(f)}},pt=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.test(t))return r}},gt=function(e,t){var n=pt(e,t);if(!n)return{major:0,minor:0};var r=function(e){return Number(t.replace(n,"$"+e))};return _t(r(1),r(2))},bt=function(e,t){var n=String(t).toLowerCase();return 0===e.length?yt():gt(e,n)},yt=function(){return _t(0,0)},_t=function(e,t){return{major:e,minor:t}},wt={nu:_t,detect:bt,unknown:yt},Mt=function(e,t){return me(t.brands,(function(t){var n=t.brand.toLowerCase();return ee(e,(function(e){var t;return n===(null===(t=e.brand)||void 0===t?void 0:t.toLowerCase())})).map((function(e){return{current:e.name,version:wt.nu(parseInt(t.version,10),0)}}))}))},xt=function(e,t){var n=String(t).toLowerCase();return ee(e,(function(e){return e.search(n)}))},kt=function(e,t){return xt(e,t).map((function(e){var n=wt.detect(e.versionRegexes,t);return{current:e.name,version:n}}))},Ct=function(e,t){return xt(e,t).map((function(e){var n=wt.detect(e.versionRegexes,t);return{current:e.name,version:n}}))},St=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Lt=function(e){return function(t){return Re(t,e)}},Tt=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return Re(e,"edge/")&&Re(e,"chrome")&&Re(e,"safari")&&Re(e,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,St],search:function(e){return Re(e,"chrome")&&!Re(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return Re(e,"msie")||Re(e,"trident")}},{name:"Opera",versionRegexes:[St,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Lt("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Lt("firefox")},{name:"Safari",versionRegexes:[St,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(Re(e,"safari")||Re(e,"mobile/"))&&Re(e,"applewebkit")}}],Ot=[{name:"Windows",search:Lt("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return Re(e,"iphone")||Re(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Lt("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Lt("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Lt("linux"),versionRegexes:[]},{name:"Solaris",search:Lt("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Lt("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Lt("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],zt={browsers:_(Tt),oses:_(Ot)},Dt="Edge",Ht="Chrome",At="IE",Vt="Opera",Et="Firefox",Pt="Safari",jt=function(){return Yt({current:void 0,version:wt.unknown()})},Yt=function(e){var t=e.current,n=e.version,r=function(e){return function(){return t===e}};return{current:t,version:n,isEdge:r(Dt),isChrome:r(Ht),isIE:r(At),isOpera:r(Vt),isFirefox:r(Et),isSafari:r(Pt)}},Nt={unknown:jt,nu:Yt,edge:_(Dt),chrome:_(Ht),ie:_(At),opera:_(Vt),firefox:_(Et),safari:_(Pt)},Ft="Windows",It="iOS",Rt="Android",Bt="Linux",$t="OSX",Wt="Solaris",Ut="FreeBSD",qt="ChromeOS",Kt=function(){return Gt({current:void 0,version:wt.unknown()})},Gt=function(e){var t=e.current,n=e.version,r=function(e){return function(){return t===e}};return{current:t,version:n,isWindows:r(Ft),isiOS:r(It),isAndroid:r(Rt),isOSX:r($t),isLinux:r(Bt),isSolaris:r(Wt),isFreeBSD:r(Ut),isChromeOS:r(qt)}},Xt={unknown:Kt,nu:Gt,windows:_(Ft),ios:_(It),android:_(Rt),linux:_(Bt),osx:_($t),solaris:_(Wt),freebsd:_(Ut),chromeos:_(qt)},Jt=function(e,t,n){var r=zt.browsers(),o=zt.oses(),i=t.bind((function(e){return Mt(r,e)})).orThunk((function(){return kt(r,e)})).fold(Nt.unknown,Nt.nu),a=Ct(o,e).fold(Xt.unknown,Xt.nu),u=vt(a,i,e,n);return{browser:i,os:a,deviceType:u}},Zt={detect:Jt},Qt=function(e){return window.matchMedia(e).matches},en=mt((function(){return Zt.detect(navigator.userAgent,P.from(navigator.userAgentData),Qt)})),tn=function(){return en()},nn=function(e,t,n){return 0!==(e.compareDocumentPosition(t)&n)},rn=function(e,t){return nn(e,t,Node.DOCUMENT_POSITION_CONTAINED_BY)},on=function(e,t){var n=e.dom;if(n.nodeType!==it)return!1;var r=n;if(void 0!==r.matches)return r.matches(t);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(t);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(t);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},an=function(e){return e.nodeType!==it&&e.nodeType!==rt&&e.nodeType!==ot||0===e.childElementCount},un=function(e,t){var n=void 0===t?document:t.dom;return an(n)?[]:U(n.querySelectorAll(e),tt.fromDom)},ln=function(e,t){var n=void 0===t?document:t.dom;return an(n)?P.none():P.from(n.querySelector(e)).map(tt.fromDom)},cn=function(e,t){return e.dom===t.dom},sn=function(e,t){var n=e.dom,r=t.dom;return n!==r&&n.contains(r)},fn=function(e,t){return rn(e.dom,t.dom)},dn=function(e,t){return tn().browser.isIE()?fn(e,t):sn(e,t)},hn=function(e){return tt.fromDom(e.dom.ownerDocument)},mn=function(e){return dt(e)?e:hn(e)},vn=function(e){return tt.fromDom(mn(e).dom.documentElement)},pn=function(e){return tt.fromDom(mn(e).dom.defaultView)},gn=function(e){return P.from(e.dom.parentNode).map(tt.fromDom)},bn=function(e){return gn(e)},yn=function(e){return P.from(e.dom.offsetParent).map(tt.fromDom)},_n=function(e){return P.from(e.dom.nextSibling).map(tt.fromDom)},wn=function(e){return U(e.dom.childNodes,tt.fromDom)},Mn=function(e,t){var n=e.dom.childNodes;return P.from(n[t]).map(tt.fromDom)},xn=function(e){return Mn(e,0)},kn=function(e,t){return{element:e,offset:t}},Cn=function(e,t){var n=wn(e);return n.length>0&&t<n.length?kn(n[t],0):kn(e,t)},Sn=function(e){return ht(e)&&d(e.dom.host)},Ln=h(Element.prototype.attachShadow)&&h(Node.prototype.getRootNode),Tn=_(Ln),On=Ln?function(e){return tt.fromDom(e.dom.getRootNode())}:mn,zn=function(e){return Sn(e)?e:tt.fromDom(mn(e).dom.body)},Dn=function(e){return Hn(e).isSome()},Hn=function(e){var t=On(e);return Sn(t)?P.some(t):P.none()},An=function(e){return tt.fromDom(e.dom.host)},Vn=function(e){if(Tn()&&d(e.target)){var t=tt.fromDom(e.target);if(st(t)&&En(t)&&e.composed&&e.composedPath){var n=e.composedPath();if(n)return fe(n)}}return P.from(e.target)},En=function(e){return d(e.dom.shadowRoot)},Pn=function(e){var t=ft(e)?e.dom.parentNode:e.dom;if(void 0===t||null===t||null===t.ownerDocument)return!1;var n=t.ownerDocument;return Hn(tt.fromDom(t)).fold((function(){return n.body.contains(t)}),y(Pn,An))},jn=function(){return Yn(tt.fromDom(document))},Yn=function(e){var t=e.dom.body;if(null===t||void 0===t)throw new Error("Body is not available yet");return tt.fromDom(t)},Nn=function(e,t,n){if(!(i(n)||c(n)||m(n)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")},Fn=function(e,t,n){Nn(e.dom,t,n)},In=function(e,t){var n=e.dom;ge(t,(function(e,t){Nn(n,t,e)}))},Rn=function(e,t){var n=e.dom.getAttribute(t);return null===n?void 0:n},Bn=function(e,t){return P.from(Rn(e,t))},$n=function(e,t){var n=e.dom;return!(!n||!n.hasAttribute)&&n.hasAttribute(t)},Wn=function(e,t){e.dom.removeAttribute(t)},Un=function(e,t,n){if(!i(n))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",n,":: Element ",e),new Error("CSS value must be a string: "+n);Ge(e)&&e.style.setProperty(t,n)},qn=function(e,t){Ge(e)&&e.style.removeProperty(t)},Kn=function(e,t,n){var r=e.dom;Un(r,t,n)},Gn=function(e,t){var n=e.dom;ge(t,(function(e,t){Un(n,t,e)}))},Xn=function(e,t){var n=e.dom;ge(t,(function(e,t){e.fold((function(){qn(n,t)}),(function(e){Un(n,t,e)}))}))},Jn=function(e,t){var n=e.dom,r=window.getComputedStyle(n),o=r.getPropertyValue(t);return""!==o||Pn(e)?o:Zn(n,t)},Zn=function(e,t){return Ge(e)?e.style.getPropertyValue(t):""},Qn=function(e,t){var n=e.dom,r=Zn(n,t);return P.from(r).filter((function(e){return e.length>0}))},er=function(e){var t={},n=e.dom;if(Ge(n))for(var r=0;r<n.style.length;r++){var o=n.style.item(r);t[o]=n.style[o]}return t},tr=function(e,t,n){var r=tt.fromTag(e);Kn(r,t,n);var o=Qn(r,t);return o.isSome()},nr=function(e,t){var n=e.dom;qn(n,t),Oe(Bn(e,"style").map(Ue),"")&&Wn(e,"style")},rr=function(e){return e.dom.offsetWidth},or=function(e,t){var n=function(t,n){if(!m(n)&&!n.match(/^[0-9]+$/))throw new Error(e+".set accepts only positive integer values. Value was "+n);var r=t.dom;Ge(r)&&(r.style[e]=n+"px")},r=function(n){var r=t(n);if(r<=0||null===r){var o=Jn(n,e);return parseFloat(o)||0}return r},o=r,i=function(e,t){return Z(t,(function(t,n){var r=Jn(e,n),o=void 0===r?0:parseInt(r,10);return isNaN(o)?t:t+o}),0)},a=function(e,t,n){var r=i(e,n),o=t>r?t-r:0;return o};return{set:n,get:r,getOuter:o,aggregate:i,max:a}},ir=or("height",(function(e){var t=e.dom;return Pn(e)?t.getBoundingClientRect().height:t.offsetHeight})),ar=function(e){return ir.get(e)},ur=function(e){return ir.getOuter(e)},lr=function(e,t){var n=["margin-top","border-top-width","padding-top","padding-bottom","border-bottom-width","margin-bottom"],r=ir.max(e,t,n);Kn(e,"max-height",r+"px")},cr=function(e,t){var n=function(n,r){return cr(e+n,t+r)};return{left:e,top:t,translate:n}},sr=cr,fr=function(e){var t=e.getBoundingClientRect();return sr(t.left,t.top)},dr=function(e,t){return void 0!==e?e:void 0!==t?t:0},hr=function(e){var t=e.dom.ownerDocument,n=t.body,r=t.defaultView,o=t.documentElement;if(n===e.dom)return sr(n.offsetLeft,n.offsetTop);var i=dr(null===r||void 0===r?void 0:r.pageYOffset,o.scrollTop),a=dr(null===r||void 0===r?void 0:r.pageXOffset,o.scrollLeft),u=dr(o.clientTop,n.clientTop),l=dr(o.clientLeft,n.clientLeft);return mr(e).translate(a-l,i-u)},mr=function(e){var t=e.dom,n=t.ownerDocument,r=n.body;return r===t?sr(r.offsetLeft,r.offsetTop):Pn(e)?fr(t):sr(0,0)},vr=or("width",(function(e){return e.dom.offsetWidth})),pr=function(e,t){return vr.set(e,t)},gr=function(e){return vr.get(e)},br=function(e){return vr.getOuter(e)},yr=function(e,t){var n=["margin-left","border-left-width","padding-left","padding-right","border-right-width","margin-right"],r=vr.max(e,t,n);Kn(e,"max-width",r+"px")},_r=function(e,t,n,r,o,i,a){return{target:e,x:t,y:n,stop:r,prevent:o,kill:i,raw:a}},wr=function(e){var t=tt.fromDom(Vn(e).getOr(e.target)),n=function(){return e.stopPropagation()},r=function(){return e.preventDefault()},o=b(r,n);return _r(t,e.clientX,e.clientY,n,r,o,e)},Mr=function(e,t){return function(n){e(n)&&t(wr(n))}},xr=function(e,t,n,r,o){var i=Mr(n,r);return e.dom.addEventListener(t,i,o),{unbind:x(Sr,e,t,i,o)}},kr=function(e,t,n,r){return xr(e,t,n,r,!1)},Cr=function(e,t,n,r){return xr(e,t,n,r,!0)},Sr=function(e,t,n,r){e.dom.removeEventListener(t,n,r)},Lr=function(e,t){var n=gn(e);n.each((function(n){n.dom.insertBefore(t.dom,e.dom)}))},Tr=function(e,t){var n=_n(e);n.fold((function(){var n=gn(e);n.each((function(e){zr(e,t)}))}),(function(e){Lr(e,t)}))},Or=function(e,t){var n=xn(e);n.fold((function(){zr(e,t)}),(function(n){e.dom.insertBefore(t.dom,n.dom)}))},zr=function(e,t){e.dom.appendChild(t.dom)},Dr=function(e,t,n){Mn(e,n).fold((function(){zr(e,t)}),(function(e){Lr(e,t)}))},Hr=function(e,t){q(t,(function(t){Lr(e,t)}))},Ar=function(e,t){q(t,(function(t){zr(e,t)}))},Vr=function(e){e.dom.textContent="",q(wn(e),(function(e){Er(e)}))},Er=function(e){var t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},Pr=function(e){var t=wn(e);t.length>0&&Hr(e,t),Er(e)},jr=function(e){var t=void 0!==e?e.dom:document,n=t.body.scrollLeft||t.documentElement.scrollLeft,r=t.body.scrollTop||t.documentElement.scrollTop;return sr(n,r)},Yr=function(e,t,n){var r=void 0!==n?n.dom:document,o=r.defaultView;o&&o.scrollTo(e,t)},Nr=function(e){var t=void 0===e?window:e;return tn().browser.isFirefox()?P.none():P.from(t["visualViewport"])},Fr=function(e,t,n,r){return{x:e,y:t,width:n,height:r,right:e+n,bottom:t+r}},Ir=function(e){var t=void 0===e?window:e,n=t.document,r=jr(tt.fromDom(n));return Nr(t).fold((function(){var e=t.document.documentElement,n=e.clientWidth,o=e.clientHeight;return Fr(r.left,r.top,n,o)}),(function(e){return Fr(Math.max(e.pageLeft,r.left),Math.max(e.pageTop,r.top),e.width,e.height)}))},Rr=function(e,t){var n=e.view(t);return n.fold(_([]),(function(t){var n=e.owner(t),r=Rr(e,n);return[t].concat(r)}))},Br=function(e,t){var n=t.owner(e),r=Rr(t,n);return P.some(r)},$r=function(e){var t,n=e.dom===document?P.none():P.from(null===(t=e.dom.defaultView)||void 0===t?void 0:t.frameElement);return n.map(tt.fromDom)},Wr=function(e){return hn(e)},Ur=Object.freeze({__proto__:null,view:$r,owner:Wr}),qr=function(e){var t=tt.fromDom(document),n=jr(t),r=Br(e,Ur);return r.fold(x(hr,e),(function(t){var r=mr(e),o=J(t,(function(e,t){var n=mr(t);return{left:e.left+n.left,top:e.top+n.top}}),{left:0,top:0});return sr(o.left+r.left+n.left,o.top+r.top+n.top)}))},Kr=function(e,t,n){return{point:e,width:t,height:n}},Gr=function(e,t,n,r){return{x:e,y:t,width:n,height:r}},Xr=function(e,t,n,r){return{x:e,y:t,width:n,height:r,right:e+n,bottom:t+r}},Jr=function(e){var t=hr(e),n=br(e),r=ur(e);return Xr(t.left,t.top,n,r)},Zr=function(e){var t=qr(e),n=br(e),r=ur(e);return Xr(t.left,t.top,n,r)},Qr=function(){return Ir(window)},eo=function(e){var t=function(t){return eo(e)},n=function(t){return eo(e)},r=function(t){return eo(t(e))},o=function(t){return eo(e)},i=function(t){t(e)},a=function(t){return t(e)},u=function(t,n){return n(e)},l=function(t){return t(e)},c=function(t){return t(e)},s=function(){return P.some(e)};return{isValue:L,isError:S,getOr:_(e),getOrThunk:_(e),getOrDie:_(e),or:t,orThunk:n,fold:u,map:r,mapError:o,each:i,bind:a,exists:l,forall:c,toOptional:s}},to=function(e){var t=function(e){return e()},n=function(){return C(String(e))()},r=w,o=function(e){return e()},i=function(t){return to(e)},a=function(t){return to(t(e))},u=function(t){return to(e)},l=function(t,n){return t(e)};return{isValue:S,isError:L,getOr:w,getOrThunk:t,getOrDie:n,or:r,orThunk:o,fold:l,map:i,mapError:a,each:p,bind:u,exists:S,forall:L,toOptional:P.none}},no=function(e,t){return e.fold((function(){return to(t)}),eo)},ro={value:eo,error:to,fromOption:no};(function(e){e[e["Error"]=0]="Error",e[e["Value"]=1]="Value"})(nt||(nt={}));var oo=function(e,t,n){return e.stype===nt.Error?t(e.serror):n(e.svalue)},io=function(e){var t=[],n=[];return q(e,(function(e){oo(e,(function(e){return n.push(e)}),(function(e){return t.push(e)}))})),{values:t,errors:n}},ao=function(e,t){return e.stype===nt.Error?{stype:nt.Error,serror:t(e.serror)}:e},uo=function(e,t){return e.stype===nt.Value?{stype:nt.Value,svalue:t(e.svalue)}:e},lo=function(e,t){return e.stype===nt.Value?t(e.svalue):e},co=function(e,t){return e.stype===nt.Error?t(e.serror):e},so=function(e){return{stype:nt.Value,svalue:e}},fo=function(e){return{stype:nt.Error,serror:e}},ho=function(e){return oo(e,ro.error,ro.value)},mo=function(e){return e.fold(fo,so)},vo={fromResult:mo,toResult:ho,svalue:so,partition:io,serror:fo,bind:lo,bindError:co,map:uo,mapError:ao,fold:oo},po=function(e,t,n,r){return{tag:"field",key:e,newKey:t,presence:n,prop:r}},go=function(e,t){return{tag:"custom",newKey:e,instantiator:t}},bo=function(e,t,n){switch(e.tag){case"field":return t(e.key,e.newKey,e.presence,e.prop);case"custom":return n(e.newKey,e.instantiator)}},yo=function(e,t){return t},_o=function(e,t){var n=a(e)&&a(t);return n?Mo(e,t):t},wo=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(0===t.length)throw new Error("Can't merge zero objects");for(var r={},o=0;o<t.length;o++){var i=t[o];for(var a in i)Le(i,a)&&(r[a]=e(r[a],i[a]))}return r}},Mo=wo(_o),xo=wo(yo),ko=function(){return{tag:"required",process:{}}},Co=function(e){return{tag:"defaultedThunk",process:e}},So=function(e){return Co(_(e))},Lo=function(){return{tag:"option",process:{}}},To=function(e){return{tag:"mergeWithThunk",process:e}},Oo=function(e){return To(_(e))},zo=function(e,t){return e.length>0?vo.svalue(Mo(t,xo.apply(void 0,e))):vo.svalue(t)},Do=function(e){return b(vo.serror,ne)(e)},Ho=function(e,t){var n=vo.partition(e);return n.errors.length>0?Do(n.errors):zo(n.values,t)},Ao=function(e){var t=vo.partition(e);return t.errors.length>0?Do(t.errors):vo.svalue(t.values)},Vo={consolidateObj:Ho,consolidateArr:Ao},Eo=function(e){return a(e)&&ve(e).length>100?" removed due to size":JSON.stringify(e,null,2)},Po=function(e){var t=e.length>10?e.slice(0,10).concat([{path:[],getErrorInfo:_("... (only showing first ten failures)")}]):e;return U(t,(function(e){return"Failed path: ("+e.path.join(" > ")+")\n"+e.getErrorInfo()}))},jo=function(e,t){return vo.serror([{path:e,getErrorInfo:t}])},Yo=function(e,t,n){return jo(e,(function(){return'Could not find valid *required* value for "'+t+'" in '+Eo(n)}))},No=function(e,t){return jo(e,(function(){return'Choice schema did not contain choice key: "'+t+'"'}))},Fo=function(e,t,n){return jo(e,(function(){return'The chosen schema: "'+n+'" did not exist in branches: '+Eo(t)}))},Io=function(e,t){return jo(e,(function(){return"There are unsupported fields: ["+t.join(", ")+"] specified"}))},Ro=function(e,t){return jo(e,_(t))},Bo=function(e){var t=function(t,n){return vo.bindError(e(n),(function(e){return Ro(t,e)}))},n=_("val");return{extract:t,toString:n}},$o=Bo(vo.svalue),Wo=function(e,t,n,r){return Se(t,n).fold((function(){return Yo(e,n,t)}),r)},Uo=function(e,t,n,r){var o=Se(e,t).getOrThunk((function(){return n(e)}));return r(o)},qo=function(e,t,n){return n(Se(e,t))},Ko=function(e,t,n,r){var o=Se(e,t).map((function(t){return!0===t?n(e):t}));return r(o)},Go=function(e,t,n,r,o){var i=function(e){return o.extract(t.concat([r]),e)},a=function(e){return e.fold((function(){return vo.svalue(P.none())}),(function(e){var n=o.extract(t.concat([r]),e);return vo.map(n,P.some)}))};switch(e.tag){case"required":return Wo(t,n,r,i);case"defaultedThunk":return Uo(n,r,e.process,i);case"option":return qo(n,r,a);case"defaultedOptionThunk":return Ko(n,r,e.process,a);case"mergeWithThunk":return Uo(n,r,_({}),(function(t){var r=Mo(e.process(n),t);return i(r)}))}},Xo=function(e,t,n){for(var r={},o=[],i=0,a=n;i<a.length;i++){var u=a[i];bo(u,(function(n,i,a,u){var l=Go(a,e,t,n,u);vo.fold(l,(function(e){o.push.apply(o,e)}),(function(e){r[i]=e}))}),(function(e,n){r[e]=n(t)}))}return o.length>0?vo.serror(o):vo.svalue(r)},Jo=function(e){var t=function(t,n){return e().extract(t,n)},n=function(){return e().toString()};return{extract:t,toString:n}},Zo=function(e){return ve(Me(e,d))},Qo=function(e){var t=ei(e),n=J(e,(function(e,t){return bo(t,(function(t){var n;return Mo(e,(n={},n[t]=!0,n))}),_(e))}),{}),r=function(e,r){var o=c(r)?[]:Zo(r),i=X(o,(function(e){return!Te(n,e)}));return 0===i.length?t.extract(e,r):Io(e,i)};return{extract:r,toString:t.toString}},ei=function(e){var t=function(t,n){return Xo(t,n,e)},n=function(){var t=U(e,(function(e){return bo(e,(function(e,t,n,r){return e+" -> "+r.toString()}),(function(e,t){return"state("+e+")"}))}));return"obj{\n"+t.join("\n")+"}"};return{extract:t,toString:n}},ti=function(e){var t=function(t,n){var r=U(n,(function(n,r){return e.extract(t.concat(["["+r+"]"]),n)}));return Vo.consolidateArr(r)},n=function(){return"array("+e.toString()+")"};return{extract:t,toString:n}},ni=function(e){var t=function(t,n){for(var r=[],o=0,i=e;o<i.length;o++){var a=i[o],u=a.extract(t,n);if(u.stype===nt.Value)return u;r.push(u)}return Vo.consolidateArr(r)},n=function(){return"oneOf("+U(e,(function(e){return e.toString()})).join(", ")+")"};return{extract:t,toString:n}},ri=function(e,t){var n=function(t,n){return ti(Bo(e)).extract(t,n)},r=function(e,r){var o=ve(r),i=n(e,o);return vo.bind(i,(function(n){var o=U(n,(function(e){return po(e,e,ko(),t)}));return ei(o).extract(e,r)}))},o=function(){return"setOf("+t.toString()+")"};return{extract:r,toString:o}},oi=function(e,t){var n=mt(t),r=function(e,t){return n().extract(e,t)},o=function(){return n().toString()};return{extract:r,toString:o}},ii=b(ti,ei),ai=_($o),ui=function(e,t){return Bo((function(n){var r=typeof n;return e(n)?vo.svalue(n):vo.serror("Expected type: "+t+" but got: "+r)}))},li=ui(m,"number"),ci=ui(i,"string"),si=ui(c,"boolean"),fi=ui(h,"function"),di=function(e){if(Object(e)!==e)return!0;switch({}.toString.call(e).slice(8,-1)){case"Boolean":case"Number":case"String":case"Date":case"RegExp":case"Blob":case"FileList":case"ImageData":case"ImageBitmap":case"ArrayBuffer":return!0;case"Array":case"Object":return Object.keys(e).every((function(t){return di(e[t])}));default:return!1}},hi=Bo((function(e){return di(e)?vo.svalue(e):vo.serror("Expected value to be acceptable for sending via postMessage")})),mi=function(e,t,n,r){var o=Se(n,r);return o.fold((function(){return Fo(e,n,r)}),(function(n){return n.extract(e.concat(["branch: "+r]),t)}))},vi=function(e,t){var n=function(n,r){var o=Se(r,e);return o.fold((function(){return No(n,e)}),(function(e){return mi(n,r,t,e)}))},r=function(){return"chooseOn("+e+"). Possible values: "+ve(t)};return{extract:n,toString:r}},pi=function(){return ti($o)},gi=function(e){return Bo((function(t){return e(t).fold(vo.serror,vo.svalue)}))},bi=function(e,t){return ri((function(t){return vo.fromResult(e(t))}),t)},yi=function(e,t,n){var r=t.extract([e],n);return vo.mapError(r,(function(e){return{input:n,errors:e}}))},_i=function(e,t,n){return vo.toResult(yi(e,t,n))},wi=function(e){return e.fold((function(e){throw new Error(xi(e))}),w)},Mi=function(e,t,n){return wi(_i(e,t,n))},xi=function(e){return"Errors: \n"+Po(e.errors).join("\n")+"\n\nInput object: "+Eo(e.input)},ki=function(e,t){return vi(e,be(t,ei))},Ci=function(e,t){return oi(e,t)},Si=po,Li=go,Ti=function(e){return gi((function(t){return R(e,t)?ro.value(t):ro.error('Unsupported value: "'+t+'", choose one of "'+e.join(", ")+'".')}))},Oi=function(e){return Si(e,e,ko(),ai())},zi=function(e,t){return Si(e,e,ko(),t)},Di=function(e){return zi(e,li)},Hi=function(e){return zi(e,ci)},Ai=function(e,t){return Si(e,e,ko(),Ti(t))},Vi=function(e){return zi(e,si)},Ei=function(e){return zi(e,fi)},Pi=function(e,t){return Si(e,e,Lo(),Bo((function(n){return vo.serror("The field: "+e+" is forbidden. "+t)})))},ji=function(e,t){return Si(e,e,ko(),ei(t))},Yi=function(e,t){return Si(e,e,ko(),ii(t))},Ni=function(e,t){return Si(e,e,ko(),ti(t))},Fi=function(e){return Si(e,e,Lo(),ai())},Ii=function(e,t){return Si(e,e,Lo(),t)},Ri=function(e){return Ii(e,li)},Bi=function(e){return Ii(e,ci)},$i=function(e){return Ii(e,fi)},Wi=function(e,t){return Ii(e,ti(t))},Ui=function(e,t){return Ii(e,ei(t))},qi=function(e,t){return Ii(e,Qo(t))},Ki=function(e,t){return Si(e,e,So(t),ai())},Gi=function(e,t,n){return Si(e,e,So(t),n)},Xi=function(e,t){return Gi(e,t,li)},Ji=function(e,t){return Gi(e,t,ci)},Zi=function(e,t,n){return Gi(e,t,Ti(n))},Qi=function(e,t){return Gi(e,t,si)},ea=function(e,t){return Gi(e,t,fi)},ta=function(e,t){return Gi(e,t,hi)},na=function(e,t,n){return Gi(e,t,ti(n))},ra=function(e,t,n){return Gi(e,t,ei(n))},oa=function(e){var t=e,n=function(){return t},r=function(e){t=e};return{get:n,set:r}},ia=function(e){if(!u(e))throw new Error("cases must be an array");if(0===e.length)throw new Error("there must be at least one case");var t=[],n={};return q(e,(function(r,o){var i=ve(r);if(1!==i.length)throw new Error("one and only one name per case");var a=i[0],l=r[a];if(void 0!==n[a])throw new Error("duplicate key detected:"+a);if("cata"===a)throw new Error("cannot have a case named cata (sorry)");if(!u(l))throw new Error("case arguments must be an array");t.push(a),n[a]=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n.length;if(i!==l.length)throw new Error("Wrong number of arguments to case "+a+". Expected "+l.length+" ("+l+"), got "+i);var u=function(e){var r=ve(e);if(t.length!==r.length)throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+"\nActual: "+r.join(","));var o=oe(t,(function(e){return R(r,e)}));if(!o)throw new Error("Not all branches were specified when using match. Specified: "+r.join(", ")+"\nRequired: "+t.join(", "));return e[a].apply(null,n)};return{fold:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(t.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+t.length);var i=t[o];return i.apply(null,n)},match:u,log:function(e){console.log(e,{constructors:t,constructor:a,params:n})}}}})),n},aa={generate:ia};aa.generate([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);var ua,la=function(e){var t=[],n=[];return q(e,(function(e){e.fold((function(e){t.push(e)}),(function(e){n.push(e)}))})),{errors:t,values:n}},ca=function(e,t){var n={};return ge(e,(function(e,r){R(t,r)||(n[r]=e)})),n},sa=function(e,t){var n;return n={},n[e]=t,n},fa=function(e){var t={};return q(e,(function(e){t[e.key]=e.value})),t},da=function(e,t){return ca(e,t)},ha=function(e,t){return sa(e,t)},ma=function(e){return fa(e)},va=function(e,t){return 0===e.length?ro.value(t):ro.value(Mo(t,xo.apply(void 0,e)))},pa=function(e){return ro.error(ne(e))},ga=function(e,t){var n=la(e);return n.errors.length>0?pa(n.errors):va(n.values,t)},ba=function(e){return h(e)?e:S},ya=function(e,t,n){var r=e.dom,o=ba(n);while(r.parentNode){r=r.parentNode;var i=tt.fromDom(r),a=t(i);if(a.isSome())return a;if(o(i))break}return P.none()},_a=function(e,t,n){var r=t(e),o=ba(n);return r.orThunk((function(){return o(e)?P.none():ya(e,t,o)}))},wa=function(e,t){return cn(e.element,t.event.target)},Ma={can:L,abort:S,run:p},xa=function(e){if(!Te(e,"can")&&!Te(e,"abort")&&!Te(e,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(e,null,2)+" does not have can, abort, or run!");return O(O({},Ma),e)},ka=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return Z(e,(function(e,r){return e&&t(r).apply(void 0,n)}),!0)}},Ca=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return Z(e,(function(e,r){return e||t(r).apply(void 0,n)}),!1)}},Sa=function(e){return h(e)?{can:L,abort:S,run:e}:e},La=function(e){var t=ka(e,(function(e){return e.can})),n=Ca(e,(function(e){return e.abort})),r=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];q(e,(function(e){e.run.apply(void 0,t)}))};return{can:t,abort:n,run:r}},Ta=_,Oa=Ta("touchstart"),za=Ta("touchmove"),Da=Ta("touchend"),Ha=Ta("touchcancel"),Aa=Ta("mousedown"),Va=Ta("mousemove"),Ea=Ta("mouseout"),Pa=Ta("mouseup"),ja=Ta("mouseover"),Ya=Ta("focusin"),Na=Ta("focusout"),Fa=Ta("keydown"),Ia=Ta("keyup"),Ra=Ta("input"),Ba=Ta("change"),$a=Ta("click"),Wa=Ta("transitioncancel"),Ua=Ta("transitionend"),qa=Ta("transitionstart"),Ka=Ta("selectstart"),Ga=function(e){return _("alloy."+e)},Xa={tap:Ga("tap")},Ja=Ga("focus"),Za=Ga("blur.post"),Qa=Ga("paste.post"),eu=Ga("receive"),tu=Ga("execute"),nu=Ga("focus.item"),ru=Xa.tap,ou=Ga("longpress"),iu=Ga("sandbox.close"),au=Ga("typeahead.cancel"),uu=Ga("system.init"),lu=Ga("system.touchmove"),cu=Ga("system.touchend"),su=Ga("system.scroll"),fu=Ga("system.resize"),du=Ga("system.attached"),hu=Ga("system.detached"),mu=Ga("system.dismissRequested"),vu=Ga("system.repositionRequested"),pu=Ga("focusmanager.shifted"),gu=Ga("slotcontainer.visibility"),bu=Ga("change.tab"),yu=Ga("dismiss.tab"),_u=Ga("highlight"),wu=Ga("dehighlight"),Mu=function(e,t){Su(e,e.element,t,{})},xu=function(e,t,n){Su(e,e.element,t,n)},ku=function(e){Mu(e,tu())},Cu=function(e,t,n){Su(e,t,n,{})},Su=function(e,t,n,r){var o=O({target:t},r);e.getSystem().triggerEvent(n,t,o)},Lu=function(e,t,n,r){e.getSystem().triggerEvent(n,t,r.event)},Tu=function(e){return ma(e)},Ou=function(e,t){return{key:e,value:xa({abort:t})}},zu=function(e,t){return{key:e,value:xa({can:t})}},Du=function(e){return{key:e,value:xa({run:function(e,t){t.event.prevent()}})}},Hu=function(e,t){return{key:e,value:xa({run:t})}},Au=function(e,t,n){return{key:e,value:xa({run:function(e,r){t.apply(void 0,[e,r].concat(n))}})}},Vu=function(e){return function(t){return Hu(e,t)}},Eu=function(e){return function(t){return{key:e,value:xa({run:function(e,n){wa(e,n)&&t(e,n)}})}}},Pu=function(e,t){return Hu(e,(function(n,r){n.getSystem().getByUid(t).each((function(t){Lu(t,t.element,e,r)}))}))},ju=function(e,t,n){var r=t.partUids[n];return Pu(e,r)},Yu=function(e,t){return Hu(e,(function(e,n){var r=n.event,o=e.getSystem().getByDom(r.target).getOrThunk((function(){var t=_a(r.target,(function(t){return e.getSystem().getByDom(t).toOptional()}),S);return t.getOr(e)}));t(e,o,n)}))},Nu=function(e){return Hu(e,(function(e,t){t.cut()}))},Fu=function(e){return Hu(e,(function(e,t){t.stop()}))},Iu=function(e,t){return Eu(e)(t)},Ru=Eu(du()),Bu=Eu(hu()),$u=Eu(uu()),Wu=Vu(tu()),Uu=function(e,t){var n=t||document,r=n.createElement("div");return r.innerHTML=e,wn(tt.fromDom(r))},qu=function(e){return e.dom.innerHTML},Ku=function(e,t){var n=hn(e),r=n.dom,o=tt.fromDom(r.createDocumentFragment()),i=Uu(t,r);Ar(o,i),Vr(e),zr(e,o)},Gu=function(e){var t=tt.fromTag("div"),n=tt.fromDom(e.dom.cloneNode(!0));return zr(t,n),qu(t)},Xu=function(e,t){return tt.fromDom(e.dom.cloneNode(t))},Ju=function(e){return Xu(e,!1)},Zu=function(e){if(Sn(e))return"#shadow-root";var t=Ju(e);return Gu(t)},Qu=function(e){return Zu(e)},el=function(e,t,n){return cn(t,e.element)&&!cn(t,n)},tl=Tu([zu(Ja(),(function(e,t){var n=t.event,r=n.originator,o=n.target;return!el(e,r,o)||(console.warn(Ja()+" did not get interpreted by the desired target. \nOriginator: "+Qu(r)+"\nTarget: "+Qu(o)+"\nCheck the "+Ja()+" event handlers"),!1)}))]),nl=Object.freeze({__proto__:null,events:tl}),rl=0,ol=function(e){var t=new Date,n=t.getTime(),r=Math.floor(1e9*Math.random());return rl++,e+"_"+r+rl+String(n)},il=_("alloy-id-"),al=_("data-alloy-id"),ul=il(),ll=al(),cl=function(e,t){var n=ol(ul+e);return sl(t,n),n},sl=function(e,t){Object.defineProperty(e.dom,ll,{value:t,writable:!0})},fl=function(e){var t=st(e)?e.dom[ll]:null;return P.from(t)},dl=function(e){return ol(e)},hl=w,ml=function(e){var t=function(t){return"The component must be in a context to execute: "+t+(e?"\n"+Qu(e().element)+" is not in context.":"")},n=function(e){return function(){throw new Error(t(e))}},r=function(e){return function(){console.warn(t(e))}};return{debugInfo:_("fake"),triggerEvent:r("triggerEvent"),triggerFocus:r("triggerFocus"),triggerEscape:r("triggerEscape"),broadcast:r("broadcast"),broadcastOn:r("broadcastOn"),broadcastEvent:r("broadcastEvent"),build:n("build"),addToWorld:n("addToWorld"),removeFromWorld:n("removeFromWorld"),addToGui:n("addToGui"),removeFromGui:n("removeFromGui"),getByUid:n("getByUid"),getByDom:n("getByDom"),isConnected:S}},vl=ml(),pl=function(e,t,n){var r=n.toString(),o=r.indexOf(")")+1,i=r.indexOf("("),a=r.substring(i+1,o-1).split(/,\s*/);return e.toFunctionAnnotation=function(){return{name:t,parameters:gl(a.slice(0,1).concat(a.slice(3)))}},e},gl=function(e){return U(e,(function(e){return $e(e,"/*")?e.substring(0,e.length-"/*".length):e}))},bl=function(e,t){var n=e.toString(),r=n.indexOf(")")+1,o=n.indexOf("("),i=n.substring(o+1,r-1).split(/,\s*/);return e.toFunctionAnnotation=function(){return{name:t,parameters:gl(i)}},e},yl=function(e,t){var n=t.toString(),r=n.indexOf(")")+1,o=n.indexOf("("),i=n.substring(o+1,r-1).split(/,\s*/);return e.toFunctionAnnotation=function(){return{name:"OVERRIDE",parameters:gl(i.slice(1))}},e},_l=ol("alloy-premade"),wl=function(e){return ha(_l,e)},Ml=function(e){return Se(e,_l)},xl=function(e){return yl((function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return e.apply(void 0,D([t.getApis(),t],n,!1))}),e)},kl={init:function(){return Cl({readState:_("No State required")})}},Cl=function(e){return e},Sl=function(e,t){var n=U(t,(function(e){return Ui(e.name(),[Oi("config"),Ki("state",kl)])})),r=_i("component.behaviours",ei(n),e.behaviours).fold((function(t){throw new Error(xi(t)+"\nComplete spec:\n"+JSON.stringify(e,null,2))}),w);return{list:t,data:be(r,(function(e){var t=e.map((function(e){return{config:e.config,state:e.state.init(e.config)}}));return _(t)}))}},Ll=function(e){return e.list},Tl=function(e){return e.data},Ol=function(e,t){var n={};return ge(e,(function(e,r){ge(e,(function(e,o){var i=Se(n,o).getOr([]);n[o]=i.concat([t(r,e)])}))})),n},zl=function(e){return{classes:s(e.classes)?[]:e.classes,attributes:s(e.attributes)?{}:e.attributes,styles:s(e.styles)?{}:e.styles}},Dl=function(e,t){return O(O({},e),{attributes:O(O({},e.attributes),t.attributes),styles:O(O({},e.styles),t.styles),classes:e.classes.concat(t.classes)})},Hl=function(e,t,n,r){var o=O({},t);q(n,(function(t){o[t.name()]=t.exhibit(e,r)}));var i=Ol(o,(function(e,t){return{name:e,modification:t}})),a=function(e){return J(e,(function(e,t){return O(O({},t.modification),e)}),{})},u=J(i.classes,(function(e,t){return t.modification.concat(e)}),[]),l=a(i.attributes),c=a(i.styles);return zl({classes:u,attributes:l,styles:c})},Al=function(e,t,n,r){try{var o=ce(n,(function(n,o){var i=n[t],a=o[t],u=r.indexOf(i),l=r.indexOf(a);if(-1===u)throw new Error("The ordering for "+e+" does not have an entry for "+i+".\nOrder specified: "+JSON.stringify(r,null,2));if(-1===l)throw new Error("The ordering for "+e+" does not have an entry for "+a+".\nOrder specified: "+JSON.stringify(r,null,2));return u<l?-1:l<u?1:0}));return ro.value(o)}catch(i){return ro.error([i])}},Vl=function(e,t){return{handler:e,purpose:t}},El=function(e,t){return{cHandler:e,purpose:t}},Pl=function(e,t){return El(x.apply(void 0,[e.handler].concat(t)),e.purpose)},jl=function(e){return e.cHandler},Yl=function(e,t){return{name:e,handler:t}},Nl=function(e,t){var n={};return q(e,(function(e){n[e.name()]=e.handlers(t)})),n},Fl=function(e,t,n){var r=O(O({},n),Nl(t,e));return Ol(r,Yl)},Il=function(e,t,n,r){var o=Fl(e,n,r);return Wl(o,t)},Rl=function(e){var t=Sa(e);return function(e,n){for(var r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];var i=[e,n].concat(r);t.abort.apply(void 0,i)?n.stop():t.can.apply(void 0,i)&&t.run.apply(void 0,i)}},Bl=function(e,t){return ro.error(["The event ("+e+') has more than one behaviour that listens to it.\nWhen this occurs, you must specify an event ordering for the behaviours in your spec (e.g. [ "listing", "toggling" ]).\nThe behaviours that can trigger it are: '+JSON.stringify(U(t,(function(e){return e.name})),null,2)])},$l=function(e,t,n){var r=t[n];return r?Al("Event: "+n,"name",e,r).map((function(e){var t=U(e,(function(e){return e.handler}));return La(t)})):Bl(n,e)},Wl=function(e,t){var n=xe(e,(function(e,n){var r=1===e.length?ro.value(e[0].handler):$l(e,t,n);return r.map((function(r){var o=Rl(r),i=e.length>1?X(t[n],(function(t){return B(e,(function(e){return e.name===t}))})).join(" > "):e[0].name;return ha(n,Vl(o,i))}))}));return ga(n,{})},Ul="alloy.base.behaviour",ql=ei([Si("dom","dom",ko(),ei([Oi("tag"),Ki("styles",{}),Ki("classes",[]),Ki("attributes",{}),Fi("value"),Fi("innerHtml")])),Oi("components"),Oi("uid"),Ki("events",{}),Ki("apis",{}),Si("eventOrder","eventOrder",Oo((ua={},ua[tu()]=["disabling",Ul,"toggling","typeaheadevents"],ua[Ja()]=[Ul,"focusing","keying"],ua[uu()]=[Ul,"disabling","toggling","representing"],ua[Ra()]=[Ul,"representing","streaming","invalidating"],ua[hu()]=[Ul,"representing","item-events","tooltipping"],ua[Aa()]=["focusing",Ul,"item-type-events"],ua[Oa()]=["focusing",Ul,"item-type-events"],ua[ja()]=["item-type-events","tooltipping"],ua[eu()]=["receiving","reflecting","tooltipping"],ua)),ai()),Fi("domModification")]),Kl=function(e){return _i("custom.definition",ql,e)},Gl=function(e){return O(O({},e.dom),{uid:e.uid,domChildren:U(e.components,(function(e){return e.element}))})},Xl=function(e){return e.domModification.fold((function(){return zl({})}),zl)},Jl=function(e){return e.events},Zl=function(e,t){var n=Rn(e,t);return void 0===n||""===n?[]:n.split(" ")},Ql=function(e,t,n){var r=Zl(e,t),o=r.concat([n]);return Fn(e,t,o.join(" ")),!0},ec=function(e,t,n){var r=X(Zl(e,t),(function(e){return e!==n}));return r.length>0?Fn(e,t,r.join(" ")):Wn(e,t),!1},tc=function(e){return void 0!==e.dom.classList},nc=function(e){return Zl(e,"class")},rc=function(e,t){return Ql(e,"class",t)},oc=function(e,t){return ec(e,"class",t)},ic=function(e,t){tc(e)?e.dom.classList.add(t):rc(e,t)},ac=function(e){var t=tc(e)?e.dom.classList:nc(e);0===t.length&&Wn(e,"class")},uc=function(e,t){if(tc(e)){var n=e.dom.classList;n.remove(t)}else oc(e,t);ac(e)},lc=function(e,t){return tc(e)&&e.dom.classList.contains(t)},cc=function(e,t){q(t,(function(t){ic(e,t)}))},sc=function(e,t){q(t,(function(t){uc(e,t)}))},fc=function(e,t){return oe(t,(function(t){return lc(e,t)}))},dc=function(e){return e.dom.value},hc=function(e,t){if(void 0===t)throw new Error("Value.set was undefined");e.dom.value=t},mc=function(e){var t=tt.fromTag(e.tag);In(t,e.attributes),cc(t,e.classes),Gn(t,e.styles),e.innerHtml.each((function(e){return Ku(t,e)}));var n=e.domChildren;return Ar(t,n),e.value.each((function(e){hc(t,e)})),e.uid,sl(t,e.uid),t},vc=function(e){var t=Se(e,"behaviours").getOr({});return re(ve(t),(function(e){var n=t[e];return d(n)?[n.me]:[]