origami-zen
Version:
Collection of reusable web components. Built for Origami CMS.
76 lines (75 loc) • 46.5 kB
JavaScript
function __decorate(e,t,n,a){var o,s=arguments.length,l=3>s?t:null===a?a=Object.getOwnPropertyDescriptor(t,n):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,n,a);else for(var p=e.length-1;0<=p;p--)(o=e[p])&&(l=(3>s?o(l):3<s?o(t,n,l):o(t,n))||l);return 3<s&&l&&Object.defineProperty(t,n,l),l}function __metadata(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}window.JSCompiler_renameProperty=function(e){return e};let dedupeId=0;const dedupingMixin=function(e){function t(t){let r=t.__mixinSet;if(r&&r[a])return t;let i=n,o=i.get(t);o||(o=e(t),i.set(t,o));let d=Object.create(o.__mixinSet||r||null);return d[a]=!0,o.__mixinSet=d,o}let n=e.__mixinApplications;n||(n=new WeakMap,e.__mixinApplications=n);let a=dedupeId++;return t};let microtaskCurrHandle=0,microtaskLastHandle=0,microtaskCallbacks=[],microtaskNodeContent=0,microtaskNode=document.createTextNode("");new window.MutationObserver(microtaskFlush).observe(microtaskNode,{characterData:!0});function microtaskFlush(){const e=microtaskCallbacks.length;for(let t,n=0;n<e;n++)if(t=microtaskCallbacks[n],t)try{t()}catch(t){setTimeout(()=>{throw t})}microtaskCallbacks.splice(0,e),microtaskLastHandle+=e}const microTask={run(e){return microtaskNode.textContent=microtaskNodeContent++,microtaskCallbacks.push(e),microtaskCurrHandle++},cancel(e){const t=e-microtaskLastHandle;if(0<=t){if(!microtaskCallbacks[t])throw new Error("invalid async handle: "+e);microtaskCallbacks[t]=null}}},microtask=microTask,PropertiesChanged=dedupingMixin(e=>{return class extends e{static createProperties(e){const t=this.prototype;for(let n in e)n in t||t._createPropertyAccessor(n)}static attributeNameForProperty(e){return e.toLowerCase()}static typeForProperty(){}_createPropertyAccessor(e,t){this._addPropertyToAttributeMap(e),this.hasOwnProperty("__dataHasAccessor")||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[e]||(this.__dataHasAccessor[e]=!0,this._definePropertyAccessor(e,t))}_addPropertyToAttributeMap(e){if(this.hasOwnProperty("__dataAttributes")||(this.__dataAttributes=Object.assign({},this.__dataAttributes)),!this.__dataAttributes[e]){const t=this.constructor.attributeNameForProperty(e);this.__dataAttributes[t]=e}}_definePropertyAccessor(e,t){Object.defineProperty(this,e,{get(){return this._getProperty(e)},set:t?function(){}:function(t){this._setProperty(e,t)}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let e in this.__dataHasAccessor)this.hasOwnProperty(e)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[e]=this[e],delete this[e])}_initializeInstanceProperties(e){Object.assign(this,e)}_setProperty(e,t){this._setPendingProperty(e,t)&&this._invalidateProperties()}_getProperty(e){return this.__data[e]}_setPendingProperty(e,t){let n=this.__data[e],a=this._shouldPropertyChange(e,t,n);return a&&(!this.__dataPending&&(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(e in this.__dataOld)&&(this.__dataOld[e]=n),this.__data[e]=t,this.__dataPending[e]=t),a}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,microtask.run(()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())}))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){const e=this.__data,t=this.__dataPending,n=this.__dataOld;this._shouldPropertiesChange(e,t,n)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(e,t,n))}_shouldPropertiesChange(e,t){return!!t}_propertiesChanged(){}_shouldPropertyChange(e,t,n){return n!==t&&(n===n||t===t)}attributeChangedCallback(e,t,n,a){t!==n&&this._attributeToProperty(e,n),super.attributeChangedCallback&&super.attributeChangedCallback(e,t,n,a)}_attributeToProperty(e,t,n){if(!this.__serializing){const a=this.__dataAttributes,r=a&&a[e]||e;this[r]=this._deserializeValue(t,n||this.constructor.typeForProperty(r))}}_propertyToAttribute(e,t,n){this.__serializing=!0,n=3>arguments.length?this[e]:n,this._valueToNodeAttribute(this,n,t||this.constructor.attributeNameForProperty(e)),this.__serializing=!1}_valueToNodeAttribute(e,t,n){const a=this._serializeValue(t);a===void 0?e.removeAttribute(n):e.setAttribute(n,a)}_serializeValue(e){switch(typeof e){case"boolean":return e?"":void 0;default:return null==e?void 0:e.toString();}}_deserializeValue(e,t){return t===Boolean?null!==e:t===Number?+e:e}}});function normalizeProperties(e){const t={};for(let n in e){const a=e[n];t[n]="function"==typeof a?{type:a}:a}return t}const PropertiesMixin=dedupingMixin(e=>{function t(e){const t=Object.getPrototypeOf(e);return t.prototype instanceof r?t:null}function n(e){if(!e.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",e))){let t=null;e.hasOwnProperty(JSCompiler_renameProperty("properties",e))&&e.properties&&(t=normalizeProperties(e.properties)),e.__ownProperties=t}return e.__ownProperties}const a=PropertiesChanged(e);class r extends a{static get observedAttributes(){const e=this._properties;return e?Object.keys(e).map(e=>this.attributeNameForProperty(e)):[]}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const e=t(this);e&&e.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const e=n(this);e&&this.createProperties(e)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const e=t(this);this.__properties=Object.assign({},e&&e._properties,n(this))}return this.__properties}static typeForProperty(e){const t=this._properties[e];return t&&t.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return r}),templateCaches=new Map;class TemplateResult{constructor(e,t,n,a=defaultPartCallback){this.strings=e,this.values=t,this.type=n,this.partCallback=a}getHTML(){const e=this.strings.length-1;let t="",n=!0;for(let a=0;a<e;a++){const e=this.strings[a];t+=e;const r=findTagClose(e);n=-1<r?r<e.length:n,t+=n?nodeMarker:marker}return t+=this.strings[e],t}getTemplateElement(){const e=document.createElement("template");return e.innerHTML=this.getHTML(),e}}function defaultTemplateFactory(e){let t=templateCaches.get(e.type);void 0===t&&(t=new Map,templateCaches.set(e.type,t));let n=t.get(e.strings);return void 0===n&&(n=new Template(e,e.getTemplateElement()),t.set(e.strings,n)),n}function render(e,t,n=defaultTemplateFactory){const a=n(e);let r=t.__templateInstance;if(void 0!==r&&r.template===a&&r._partCallback===e.partCallback)return void r.update(e.values);r=new TemplateInstance(a,e.partCallback,n),t.__templateInstance=r;const i=r._clone();r.update(e.values),removeNodes(t,t.firstChild),t.appendChild(i)}const marker=`{{lit-${(Math.random()+"").slice(2)}}}`,nodeMarker=`<!--${marker}-->`,markerRegex=new RegExp(`${marker}|${nodeMarker}`),lastAttributeNameRegex=/[ \x09\x0a\x0c\x0d]([^\0-\x1F\x7F-\x9F \x09\x0a\x0c\x0d"'>=/]+)[ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*)$/;function findTagClose(e){const t=e.lastIndexOf(">"),n=e.indexOf("<",t+1);return-1<n?e.length:t}class TemplatePart{constructor(e,t,n,a,r){this.type=e,this.index=t,this.name=n,this.rawName=a,this.strings=r}}class Template{constructor(e,t){this.parts=[],this.element=t;const n=this.element.content,a=document.createTreeWalker(n,133,null,!1);let r=-1,i=0;const o=[];for(let n,d;a.nextNode();){r++,n=d;const t=d=a.currentNode;if(1===t.nodeType){if(!t.hasAttributes())continue;const n=t.attributes;let a=0;for(let e=0;e<n.length;e++)0<=n[e].value.indexOf(marker)&&a++;for(;0<a--;){const a=e.strings[i],o=lastAttributeNameRegex.exec(a)[1],d=n.getNamedItem(o),s=d.value.split(markerRegex);this.parts.push(new TemplatePart("attribute",r,d.name,o,s)),t.removeAttribute(d.name),i+=s.length-1}}else if(3===t.nodeType){const e=t.nodeValue;if(0>e.indexOf(marker))continue;const n=t.parentNode,a=e.split(markerRegex),d=a.length-1;i+=d;for(let e=0;e<d;e++)n.insertBefore(""===a[e]?document.createComment(""):document.createTextNode(a[e]),t),this.parts.push(new TemplatePart("node",r++));n.insertBefore(""===a[d]?document.createComment(""):document.createTextNode(a[d]),t),o.push(t)}else if(8===t.nodeType&&t.nodeValue===marker){const e=t.parentNode,a=t.previousSibling;null===a||a!==n||a.nodeType!==Node.TEXT_NODE?e.insertBefore(document.createComment(""),t):r--,this.parts.push(new TemplatePart("node",r++)),o.push(t),null===t.nextSibling?e.insertBefore(document.createComment(""),t):r--,d=n,i++}}for(const a of o)a.parentNode.removeChild(a)}}const getValue=(e,t)=>isDirective(t)?(t=t(e),directiveValue):null===t?void 0:t,isDirective=e=>"function"==typeof e&&!0===e.__litDirective,directiveValue={},isPrimitiveValue=e=>null===e||"object"!=typeof e&&"function"!=typeof e;class AttributePart{constructor(e,t,n,a){this.instance=e,this.element=t,this.name=n,this.strings=a,this.size=a.length-1,this._previousValues=[]}_interpolate(e,t){const n=this.strings,a=n.length-1;let r="";for(let o=0;o<a;o++){r+=n[o];const a=getValue(this,e[t+o]);if(a&&a!==directiveValue&&(Array.isArray(a)||"string"!=typeof a&&a[Symbol.iterator]))for(const e of a)r+=e;else r+=a}return r+n[a]}_equalToPreviousValues(e,t){for(let n=t;n<t+this.size;n++)if(this._previousValues[n]!==e[n]||!isPrimitiveValue(e[n]))return!1;return!0}setValue(e,t){if(this._equalToPreviousValues(e,t))return;const n=this.strings;let a;2===n.length&&""===n[0]&&""===n[1]?(a=getValue(this,e[t]),Array.isArray(a)&&(a=a.join(""))):a=this._interpolate(e,t),a!==directiveValue&&this.element.setAttribute(this.name,a),this._previousValues=e}}class NodePart{constructor(e,t,n){this.instance=e,this.startNode=t,this.endNode=n,this._previousValue=void 0}setValue(e){if(e=getValue(this,e),e!==directiveValue)if(isPrimitiveValue(e)){if(e===this._previousValue)return;this._setText(e)}else e instanceof TemplateResult?this._setTemplateResult(e):Array.isArray(e)||e[Symbol.iterator]?this._setIterable(e):e instanceof Node?this._setNode(e):void 0===e.then?this._setText(e):this._setPromise(e)}_insert(e){this.endNode.parentNode.insertBefore(e,this.endNode)}_setNode(e){this._previousValue===e||(this.clear(),this._insert(e),this._previousValue=e)}_setText(e){const t=this.startNode.nextSibling;e=e===void 0?"":e,t===this.endNode.previousSibling&&t.nodeType===Node.TEXT_NODE?t.textContent=e:this._setNode(document.createTextNode(e)),this._previousValue=e}_setTemplateResult(e){const t=this.instance._getTemplate(e);let n;this._previousValue&&this._previousValue.template===t?n=this._previousValue:(n=new TemplateInstance(t,this.instance._partCallback,this.instance._getTemplate),this._setNode(n._clone()),this._previousValue=n),n.update(e.values)}_setIterable(e){Array.isArray(this._previousValue)||(this.clear(),this._previousValue=[]);const t=this._previousValue;let n=0;for(const a of e){let e=t[n];if(e===void 0){let a=this.startNode;if(0<n){const e=t[n-1];a=e.endNode=document.createTextNode(""),this._insert(a)}e=new NodePart(this.instance,a,this.endNode),t.push(e)}e.setValue(a),n++}if(0==n)this.clear(),this._previousValue=void 0;else if(n<t.length){const e=t[n-1];t.length=n,this.clear(e.endNode.previousSibling),e.endNode=this.endNode}}_setPromise(e){this._previousValue=e,e.then(t=>{this._previousValue===e&&this.setValue(t)})}clear(e=this.startNode){removeNodes(this.startNode.parentNode,e.nextSibling,this.endNode)}}const defaultPartCallback=(e,t,n)=>{if("attribute"===t.type)return new AttributePart(e,n,t.name,t.strings);if("node"===t.type)return new NodePart(e,n,n.nextSibling);throw new Error(`Unknown part type ${t.type}`)};class TemplateInstance{constructor(e,t,n){this._parts=[],this.template=e,this._partCallback=t,this._getTemplate=n}update(e){let t=0;for(const n of this._parts)void 0===n.size?(n.setValue(e[t]),t++):(n.setValue(e,t),t+=n.size)}_clone(){const e=document.importNode(this.template.element.content,!0),t=this.template.parts;if(0<t.length){const n=document.createTreeWalker(e,133,null,!1);let a=-1;for(let e=0;e<t.length;e++){const r=t[e];for(;a<r.index;)a++,n.nextNode();this._parts.push(this._partCallback(this,r,n.currentNode))}}return e}}const removeNodes=(e,t,n=null)=>{for(let a=t;a!==n;){const t=a.nextSibling;e.removeChild(a),a=t}},shadyTemplateFactory=e=>t=>{const n=`${t.type}--${e}`;let a=templateCaches.get(n);a===void 0&&(a=new Map,templateCaches.set(n,a));let r=a.get(t.strings);if(r===void 0){const n=t.getTemplateElement();"object"==typeof window.ShadyCSS&&window.ShadyCSS.prepareTemplate(n,e),r=new Template(t,n),a.set(t.strings,r)}return r};function render$1(e,t,n){return render(e,t,shadyTemplateFactory(n))}const html$1=(e,...t)=>new TemplateResult(e,t,"html",extendedPartCallback),extendedPartCallback=(e,t,n)=>{if("attribute"===t.type){if("on-"===t.rawName.substr(0,3)){const a=t.rawName.slice(3);return new EventPart(e,n,a)}const a=t.name.substr(t.name.length-1);if("$"===a){const a=t.name.slice(0,-1);return new AttributePart(e,n,a,t.strings)}if("?"===a){const a=t.name.slice(0,-1);return new BooleanAttributePart(e,n,a,t.strings)}return new PropertyPart(e,n,t.rawName,t.strings)}return defaultPartCallback(e,t,n)};class BooleanAttributePart extends AttributePart{setValue(e,t){const n=this.strings;if(2===n.length&&""===n[0]&&""===n[1]){const n=getValue(this,e[t]);if(n===directiveValue)return;n?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name)}else throw new Error("boolean attributes can only contain a single expression")}}class PropertyPart extends AttributePart{setValue(e,t){const n=this.strings;let a;this._equalToPreviousValues(e,t)||(a=2===n.length&&""===n[0]&&""===n[1]?getValue(this,e[t]):this._interpolate(e,t),a!==directiveValue&&(this.element[this.name]=a),this._previousValues=e)}}class EventPart{constructor(e,t,n){this.instance=e,this.element=t,this.eventName=n}setValue(e){const t=getValue(this,e);t===this._listener||(null==t?this.element.removeEventListener(this.eventName,this):null==this._listener&&this.element.addEventListener(this.eventName,this),this._listener=t)}handleEvent(e){"function"==typeof this._listener?this._listener.call(this.element,e):"function"==typeof this._listener.handleEvent&&this._listener.handleEvent(e)}}class LitElement extends PropertiesMixin(HTMLElement){constructor(){super(...arguments),this.__renderComplete=null,this.__resolveRenderComplete=null,this.__isInvalid=!1,this.__isChanging=!1}ready(){this._root=this._createRoot(),super.ready(),this._firstRendered()}_firstRendered(){}_createRoot(){return this.attachShadow({mode:"open"})}_shouldPropertiesChange(e,t,n){const a=this._shouldRender(e,t,n);return!a&&this.__resolveRenderComplete&&this.__resolveRenderComplete(!1),a}_shouldRender(){return!0}_propertiesChanged(e,t,n){super._propertiesChanged(e,t,n);const a=this._render(e);a&&this._root!==void 0&&this._applyRender(a,this._root),this._didRender(e,t,n),this.__resolveRenderComplete&&this.__resolveRenderComplete(!0)}_flushProperties(){this.__isChanging=!0,this.__isInvalid=!1,super._flushProperties(),this.__isChanging=!1}_shouldPropertyChange(e,t,n){const a=super._shouldPropertyChange(e,t,n);return a&&this.__isChanging&&console.trace(`Setting properties in response to other properties changing `+`considered harmful. Setting '${e}' from `+`'${this._getProperty(e)}' to '${t}'.`),a}_render(){throw new Error("_render() not implemented")}_applyRender(e,t){render$1(e,t,this.localName)}_didRender(){}_requestRender(){this._invalidateProperties()}_invalidateProperties(){this.__isInvalid=!0,super._invalidateProperties()}get renderComplete(){return this.__renderComplete||(this.__renderComplete=new Promise(e=>{this.__resolveRenderComplete=t=>{this.__resolveRenderComplete=this.__renderComplete=null,e(t)}}),!this.__isInvalid&&this.__resolveRenderComplete&&Promise.resolve().then(()=>this.__resolveRenderComplete(!1))),this.__renderComplete}}var Reflect$1,commonjsGlobal="undefined"==typeof window?"undefined"==typeof global?"undefined"==typeof self?{}:self:global:window;(function(e){(function(t){function n(e,t){return function(n,a){"function"!=typeof e[n]&&Object.defineProperty(e,n,{configurable:!0,writable:!0,value:a}),t&&t(n,a)}}var a="object"==typeof commonjsGlobal?commonjsGlobal:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),r=n(e);"undefined"==typeof a.Reflect?a.Reflect=e:r=n(a.Reflect,r),t(r)})(function(e){function t(e,t){for(var n=e.length-1;0<=n;--n){var a=e[n],r=a(t);if(!u(r)&&!c(r)){if(!k(r))throw new TypeError;t=r}}return t}function n(e,t,n,a){for(var r=e.length-1;0<=r;--r){var o=e[r],d=o(t,n,a);if(!u(d)&&!c(d)){if(!g(d))throw new TypeError;a=d}}return a}function a(e,t,n){var a=W.get(e);if(u(a)){if(!n)return;a=new F,W.set(e,a)}var r=a.get(t);if(u(r)){if(!n)return;r=new F,a.set(t,r)}return r}function r(e,t,n){var a=i(e,t,n);if(a)return!0;var o=w(t);return!c(o)&&r(e,o,n)}function i(e,t,n){var r=a(t,n,!1);return!u(r)&&f(r.has(e))}function o(e,t,n){var a=i(e,t,n);if(a)return d(e,t,n);var r=w(t);return c(r)?void 0:o(e,r,n)}function d(e,t,n){var r=a(t,n,!1);return u(r)?void 0:r.get(e)}function s(e,t,n,r){var i=a(n,r,!0);i.set(e,t)}function l(e,t){var n=p(e,t),a=w(e);if(null===a)return n;var r=l(a,t);if(0>=r.length)return n;if(0>=n.length)return r;for(var i=new B,o=[],d=0,s=n;d<s.length;d++){var _=s[d],u=i.has(_);u||(i.add(_),o.push(_))}for(var c=0,y=r;c<y.length;c++){var _=y[c],u=i.has(_);u||(i.add(_),o.push(_))}return o}function p(e,t){var n=[],r=a(e,t,!1);if(u(r))return n;for(var i=r.keys(),o=A(i),d=0;;){var s=T(o);if(!s)return n.length=d,n;var l=I(s);try{n[d]=l}catch(t){try{O(o)}finally{throw t}}d++}}function _(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6;}}function u(e){return e===void 0}function c(e){return null===e}function y(e){return"symbol"==typeof e}function g(e){return"object"==typeof e?null!==e:"function"==typeof e}function m(e,t){switch(_(e)){case 0:return e;case 1:return e;case 2:return e;case 3:return e;case 4:return e;case 5:return e;}var n=3===t?"string":5===t?"number":"default",a=N(e,R);if(a!==void 0){var r=a.call(e,n);if(g(r))throw new TypeError;return r}return h(e,"default"==n?"number":n)}function h(e,t){if("string"===t){var n=e.toString;if(x(n)){var a=n.call(e);if(!g(a))return a}var r=e.valueOf;if(x(r)){var a=r.call(e);if(!g(a))return a}}else{var r=e.valueOf;if(x(r)){var a=r.call(e);if(!g(a))return a}var i=e.toString;if(x(i)){var a=i.call(e);if(!g(a))return a}}throw new TypeError}function f(e){return!!e}function b(e){return""+e}function v(e){var t=m(e,3);return y(t)?t:b(t)}function P(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function x(e){return"function"==typeof e}function k(e){return"function"==typeof e}function C(e){switch(_(e)){case 3:return!0;case 4:return!0;default:return!1;}}function N(e,t){var n=e[t];if(void 0!==n&&null!==n){if(!x(n))throw new TypeError;return n}}function A(e){var t=N(e,z);if(!x(t))throw new TypeError;var n=t.call(e);if(!g(n))throw new TypeError;return n}function I(e){return e.value}function T(e){var t=e.next();return!t.done&&t}function O(e){var t=e["return"];t&&t.call(e)}function w(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===H)return t;if(t!==H)return t;var n=e.prototype,a=n&&Object.getPrototypeOf(n);if(null==a||a===Object.prototype)return t;var r=a.constructor;return"function"==typeof r?r===e?t:r:t}function V(e){return e.__=void 0,delete e.__,e}var S=Object.prototype.hasOwnProperty,E="function"==typeof Symbol,R=E&&"undefined"!=typeof Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",z=E&&"undefined"!=typeof Symbol.iterator?Symbol.iterator:"@@iterator",M="function"==typeof Object.create,j={__proto__:[]}instanceof Array,K=!M&&!j,L={create:M?function(){return V(Object.create(null))}:j?function(){return V({__proto__:null})}:function(){return V({})},has:K?function(e,t){return S.call(e,t)}:function(e,t){return t in e},get:K?function(e,t){return S.call(e,t)?e[t]:void 0}:function(e,t){return e[t]}},H=Object.getPrototypeOf(Function),D="object"==typeof process&&process.env&&"true"===process.env.REFLECT_METADATA_USE_MAP_POLYFILL,F=D||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?function(){function e(e){return e}function t(e,t){return t}function n(e,t){return[e,t]}var a={},r=[],i=function(){function e(e,t,n){this._index=0,this._keys=e,this._values=t,this._selector=n}return e.prototype["@@iterator"]=function(){return this},e.prototype[z]=function(){return this},e.prototype.next=function(){var e=this._index;if(0<=e&&e<this._keys.length){var t=this._selector(this._keys[e],this._values[e]);return e+1>=this._keys.length?(this._index=-1,this._keys=r,this._values=r):this._index++,{value:t,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw 0<=this._index&&(this._index=-1,this._keys=r,this._values=r),e},e.prototype.return=function(e){return 0<=this._index&&(this._index=-1,this._keys=r,this._values=r),{value:e,done:!0}},e}();return function(){function r(){this._keys=[],this._values=[],this._cacheKey=a,this._cacheIndex=-2}return Object.defineProperty(r.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),r.prototype.has=function(e){return 0<=this._find(e,!1)},r.prototype.get=function(e){var t=this._find(e,!1);return 0<=t?this._values[t]:void 0},r.prototype.set=function(e,t){var n=this._find(e,!0);return this._values[n]=t,this},r.prototype.delete=function(e){var t=this._find(e,!1);if(0<=t){for(var n=this._keys.length,r=t+1;r<n;r++)this._keys[r-1]=this._keys[r],this._values[r-1]=this._values[r];return this._keys.length--,this._values.length--,e===this._cacheKey&&(this._cacheKey=a,this._cacheIndex=-2),!0}return!1},r.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=a,this._cacheIndex=-2},r.prototype.keys=function(){return new i(this._keys,this._values,e)},r.prototype.values=function(){return new i(this._keys,this._values,t)},r.prototype.entries=function(){return new i(this._keys,this._values,n)},r.prototype["@@iterator"]=function(){return this.entries()},r.prototype[z]=function(){return this.entries()},r.prototype._find=function(e,t){return this._cacheKey!==e&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=e)),0>this._cacheIndex&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},r}()}():Map,B=D||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?function(){return function(){function e(){this._map=new F}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.values()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[z]=function(){return this.keys()},e}()}():Set,q=D||"function"!=typeof WeakMap?function(){function e(){var e;do e="@@WeakMap@@"+r();while(L.has(i,e));return i[e]=!0,e}function t(e,t){if(!S.call(e,o)){if(!t)return;Object.defineProperty(e,o,{value:L.create()})}return e[o]}function n(e,t){for(var n=0;n<t;++n)e[n]=0|255*Math.random();return e}function a(e){return"function"==typeof Uint8Array?"undefined"==typeof crypto?"undefined"==typeof msCrypto?n(new Uint8Array(e),e):msCrypto.getRandomValues(new Uint8Array(e)):crypto.getRandomValues(new Uint8Array(e)):n(Array(e),e)}function r(){var e=a(16);e[6]=64|79&e[6],e[8]=128|191&e[8];for(var t,n="",r=0;r<16;++r)t=e[r],(4===r||6===r||8===r)&&(n+="-"),16>t&&(n+="0"),n+=t.toString(16).toLowerCase();return n}var i=L.create(),o=e();return function(){function n(){this._key=e()}return n.prototype.has=function(e){var n=t(e,!1);return void 0!==n&&L.has(n,this._key)},n.prototype.get=function(e){var n=t(e,!1);return void 0===n?void 0:L.get(n,this._key)},n.prototype.set=function(e,n){var a=t(e,!0);return a[this._key]=n,this},n.prototype.delete=function(e){var n=t(e,!1);return void 0!==n&&delete n[this._key]},n.prototype.clear=function(){this._key=e()},n}()}():WeakMap,W=new q;e("decorate",function(e,a,r,i){if(!u(r)){if(!P(e))throw new TypeError;if(!g(a))throw new TypeError;if(!g(i)&&!u(i)&&!c(i))throw new TypeError;return c(i)&&(i=void 0),r=v(r),n(e,a,r,i)}if(!P(e))throw new TypeError;if(!k(a))throw new TypeError;return t(e,a)}),e("metadata",function(e,t){return function(n,a){if(!g(n))throw new TypeError;if(!u(a)&&!C(a))throw new TypeError;s(e,t,n,a)}}),e("defineMetadata",function(e,t,n,a){if(!g(n))throw new TypeError;return u(a)||(a=v(a)),s(e,t,n,a)}),e("hasMetadata",function(e,t,n){if(!g(t))throw new TypeError;return u(n)||(n=v(n)),r(e,t,n)}),e("hasOwnMetadata",function(e,t,n){if(!g(t))throw new TypeError;return u(n)||(n=v(n)),i(e,t,n)}),e("getMetadata",function(e,t,n){if(!g(t))throw new TypeError;return u(n)||(n=v(n)),o(e,t,n)}),e("getOwnMetadata",function(e,t,n){if(!g(t))throw new TypeError;return u(n)||(n=v(n)),d(e,t,n)}),e("getMetadataKeys",function(e,t){if(!g(e))throw new TypeError;return u(t)||(t=v(t)),l(e,t)}),e("getOwnMetadataKeys",function(e,t){if(!g(e))throw new TypeError;return u(t)||(t=v(t)),p(e,t)}),e("deleteMetadata",function(e,t,n){if(!g(t))throw new TypeError;u(n)||(n=v(n));var r=a(t,n,!1);if(u(r))return!1;if(!r.delete(e))return!1;if(0<r.size)return!0;var i=W.get(t);return!(i.delete(n),!(0<i.size))||(W.delete(t),!0)})})})(Reflect$1||(Reflect$1={}));const bindAttributes=function(e){return class extends e{_propertiesChanged(e,t,n){super._propertiesChanged(e,t,n);const a=this.constructor._boundAttributes;a&&t&&Object.keys(t).forEach(t=>{if(a.includes(t)){const n=e[t];n||0===n?this.setAttribute(t,e[t]):this.removeAttribute(t)}})}}},component=e=>function(t){window.customElements.define(e,t)};function property(e,t){function n(e,t){Reflect.hasMetadata("design:type",e,t)&&(a.type=Reflect.getMetadata("design:type",e,t)),e.constructor.properties=e.constructor.properties||{},e.constructor.properties[t]=Object.assign(a,e.constructor.properties[t]||{})}let a,r=!1;return void 0===t?(a=e||{},r=!0):a={},r?n:n(e,t)}const dispatchChange=(e="value",t="change")=>function(n){return class extends n{_propertiesChanged(n,a,r){super._propertiesChanged(n,a,r),a&&a[e]!==void 0&&this.dispatchEvent(new CustomEvent(t))}}};var CSS=html$1`<style>:host input[type="submit"],:host zen-button[size=large]{display:inline-block;width:auto;text-transform:uppercase;font-weight:600;letter-spacing:2px;border:none;height:var(--btn-height, var(--size-main, 4rem));line-height:var(--btn-height, var(--size-main, 4rem));padding:0 var(--btn-padding, var(--size-small, 2rem));border-radius:var(--btn-border-radius, var(--border-radius, .4rem));color:var(--color-white, #fff);transition:color var(--transition-time, .35s),background var(--transition-time, .35s);user-select:none;font-family:var(--btn-font-family, var(--font-family, "Work Sans",sans-serif));cursor:pointer;font-size:var(--btn-font-size, var(--font-size-main, 1.6rem));text-align:center;white-space:nowrap}:host input:not([color])[type="submit"],:host zen-button:not([color])[size=large]{background-color:var(--btn-bg, linear-gradient(to bottom right, var(--color-main-alt, #b155ba), var(--color-main, var(--color-purple, #693a91))));background:var(--btn-bg, linear-gradient(to bottom right, var(--color-main-alt, #b155ba), var(--color-main, var(--color-purple, #693a91))))}:host input[type="submit"] *,:host zen-button[size=large] *{vertical-align:middle}:host input[type="submit"]+input[type="submit"],:host zen-button[size=large]+input[type="submit"],:host input[type="submit"]+zen-button[size=large],:host zen-button[size=large]+zen-button[size=large]{margin-left:var(--size-small)}:host input:hover[type="submit"],:host zen-button:hover[size=large]{filter:brightness(1.1)}:host input:focus[type="submit"],:host zen-button:focus[size=large]{border:none;filter:brightness(0.9)}:host input.round[type="submit"],:host zen-button.round[size=large]{padding:0;border-radius:50%}:host input.has-icon[type="submit"],:host zen-button.has-icon[size=large]{padding-left:var(--size-small, 2rem)}:host input.has-icon[type="submit"] .i,:host zen-button.has-icon[size=large] .i{vertical-align:top;margin-right:var(--size-small, 2rem)}:host input.has-icon[type="submit"] .loader,:host zen-button.has-icon[size=large] .loader{margin-top:calc(default('size-small') / 2)}:host input.no-text[type="submit"],:host zen-button.no-text[size=large]{padding:0}:host input.no-text[type="submit"] .i,:host zen-button.no-text[size=large] .i{margin:0}:host input:disabled[type="submit"],:host zen-button:disabled[size=large]{opacity:0.5;pointer-events:none}:host input[type="submit"]>span,:host zen-button[size=large]>span{display:inline-block;vertical-align:middle}:host input.size-tiny[type="submit"],:host zen-button.size-tiny[size=large],:host input[size=tiny][type="submit"],:host zen-button[size=tiny][size=large]{width:auto;height:var(--size-tiny, 1rem);line-height:var(--size-tiny, 1rem);padding:0 calc(var(--size-tiny, 1rem) / 2)}:host input.size-tiny.icon-right[type="submit"],:host zen-button.size-tiny.icon-right[size=large],:host input[size=tiny].icon-right[type="submit"],:host zen-button[size=tiny].icon-right[size=large]{padding-right:var(--size-tiny, 1rem)}:host input.size-small[type="submit"],:host zen-button.size-small[size=large],:host input[size=small][type="submit"],:host zen-button[size=small][size=large]{width:auto;height:var(--size-small, 2rem);line-height:var(--size-small, 2rem);padding:0 calc(var(--size-small, 2rem) / 2)}:host input.size-small.icon-right[type="submit"],:host zen-button.size-small.icon-right[size=large],:host input[size=small].icon-right[type="submit"],:host zen-button[size=small].icon-right[size=large]{padding-right:var(--size-small, 2rem)}:host input.size-medium[type="submit"],:host zen-button.size-medium[size=large],:host input[size=medium][type="submit"],:host zen-button[size=medium][size=large]{width:auto;height:var(--size-medium, 3rem);line-height:var(--size-medium, 3rem);padding:0 calc(var(--size-medium, 3rem) / 2)}:host input.size-medium.icon-right[type="submit"],:host zen-button.size-medium.icon-right[size=large],:host input[size=medium].icon-right[type="submit"],:host zen-button[size=medium].icon-right[size=large]{padding-right:var(--size-medium, 3rem)}:host input.size-main[type="submit"],:host zen-button.size-main[size=large],:host input[size=main][type="submit"],:host zen-button[size=main][size=large]{width:auto;height:var(--size-main, 4rem);line-height:var(--size-main, 4rem);padding:0 calc(var(--size-main, 4rem) / 2)}:host input.size-main.icon-right[type="submit"],:host zen-button.size-main.icon-right[size=large],:host input[size=main].icon-right[type="submit"],:host zen-button[size=main].icon-right[size=large]{padding-right:var(--size-main, 4rem)}:host input.size-large[type="submit"],:host zen-button.size-large[size=large],:host input[size=large][type="submit"],:host zen-button[size=large]{width:auto;height:var(--size-large, 6rem);line-height:var(--size-large, 6rem);padding:0 calc(var(--size-large, 6rem) / 2)}:host input.size-large.icon-right[type="submit"],:host zen-button.size-large.icon-right[size=large],:host input[size=large].icon-right[type="submit"],:host zen-button[size=large].icon-right{padding-right:var(--size-large, 6rem)}:host input.size-huge[type="submit"],:host zen-button.size-huge[size=large],:host input[size=huge][type="submit"],:host zen-button[size=huge][size=large]{width:auto;height:var(--size-huge, 8rem);line-height:var(--size-huge, 8rem);padding:0 calc(var(--size-huge, 8rem) / 2)}:host input.size-huge.icon-right[type="submit"],:host zen-button.size-huge.icon-right[size=large],:host input[size=huge].icon-right[type="submit"],:host zen-button[size=huge].icon-right[size=large]{padding-right:var(--size-huge, 8rem)}:host input.size-super[type="submit"],:host zen-button.size-super[size=large],:host input[size=super][type="submit"],:host zen-button[size=super][size=large]{width:auto;height:var(--size-super, 12rem);line-height:var(--size-super, 12rem);padding:0 calc(var(--size-super, 12rem) / 2)}:host input.size-super.icon-right[type="submit"],:host zen-button.size-super.icon-right[size=large],:host input[size=super].icon-right[type="submit"],:host zen-button[size=super].icon-right[size=large]{padding-right:var(--size-super, 12rem)}:host input.size-hero[type="submit"],:host zen-button.size-hero[size=large],:host input[size=hero][type="submit"],:host zen-button[size=hero][size=large]{width:auto;height:var(--size-hero, 24rem);line-height:var(--size-hero, 24rem);padding:0 calc(var(--size-hero, 24rem) / 2)}:host input.size-hero.icon-right[type="submit"],:host zen-button.size-hero.icon-right[size=large],:host input[size=hero].icon-right[type="submit"],:host zen-button[size=hero].icon-right[size=large]{padding-right:var(--size-hero, 24rem)}:host input.hollow[type="submit"],:host zen-button.hollow[size=large],:host input[hollow][type="submit"],:host zen-button[hollow][size=large]{background:transparent ;color:var(--color-main, var(--color-purple, #693a91));padding-left:0;padding-right:0}:host input.hollow[color=main][type="submit"],:host zen-button.hollow[color=main][size=large],:host input[color=main][hollow][type="submit"],:host zen-button[color=main][hollow][size=large]{color:var(--color-main)}:host input.hollow[color=alt][type="submit"],:host zen-button.hollow[color=alt][size=large],:host input[color=alt][hollow][type="submit"],:host zen-button[color=alt][hollow][size=large]{color:var(--color-alt)}:host input.hollow[color=text][type="submit"],:host zen-button.hollow[color=text][size=large],:host input[color=text][hollow][type="submit"],:host zen-button[color=text][hollow][size=large]{color:var(--color-text)}:host input.hollow[color=white][type="submit"],:host zen-button.hollow[color=white][size=large],:host input[color=white][hollow][type="submit"],:host zen-button[color=white][hollow][size=large]{color:var(--color-white)}:host input.hollow[color=grey-50][type="submit"],:host zen-button.hollow[color=grey-50][size=large],:host input[color=grey-50][hollow][type="submit"],:host zen-button[color=grey-50][hollow][size=large]{color:var(--color-grey-50)}:host input.hollow[color=grey-100][type="submit"],:host zen-button.hollow[color=grey-100][size=large],:host input[color=grey-100][hollow][type="submit"],:host zen-button[color=grey-100][hollow][size=large]{color:var(--color-grey-100)}:host input.hollow[color=grey-200][type="submit"],:host zen-button.hollow[color=grey-200][size=large],:host input[color=grey-200][hollow][type="submit"],:host zen-button[color=grey-200][hollow][size=large]{color:var(--color-grey-200)}:host input.hollow[color=grey-300][type="submit"],:host zen-button.hollow[color=grey-300][size=large],:host input[color=grey-300][hollow][type="submit"],:host zen-button[color=grey-300][hollow][size=large]{color:var(--color-grey-300)}:host input.hollow[color=grey-400][type="submit"],:host zen-button.hollow[color=grey-400][size=large],:host input[color=grey-400][hollow][type="submit"],:host zen-button[color=grey-400][hollow][size=large]{color:var(--color-grey-400)}:host input.hollow[color=grey-500][type="submit"],:host zen-button.hollow[color=grey-500][size=large],:host input[color=grey-500][hollow][type="submit"],:host zen-button[color=grey-500][hollow][size=large]{color:var(--color-grey-500)}:host input.hollow[color=grey-600][type="submit"],:host zen-button.hollow[color=grey-600][size=large],:host input[color=grey-600][hollow][type="submit"],:host zen-button[color=grey-600][hollow][size=large]{color:var(--color-grey-600)}:host input.hollow[color=grey-700][type="submit"],:host zen-button.hollow[color=grey-700][size=large],:host input[color=grey-700][hollow][type="submit"],:host zen-button[color=grey-700][hollow][size=large]{color:var(--color-grey-700)}:host input.hollow[color=grey-800][type="submit"],:host zen-button.hollow[color=grey-800][size=large],:host input[color=grey-800][hollow][type="submit"],:host zen-button[color=grey-800][hollow][size=large]{color:var(--color-grey-800)}:host input.hollow[color=grey-900][type="submit"],:host zen-button.hollow[color=grey-900][size=large],:host input[color=grey-900][hollow][type="submit"],:host zen-button[color=grey-900][hollow][size=large]{color:var(--color-grey-900)}:host input.hollow[color=black][type="submit"],:host zen-button.hollow[color=black][size=large],:host input[color=black][hollow][type="submit"],:host zen-button[color=black][hollow][size=large]{color:var(--color-black)}:host input.hollow[color=error][type="submit"],:host zen-button.hollow[color=error][size=large],:host input[color=error][hollow][type="submit"],:host zen-button[color=error][hollow][size=large]{color:var(--color-error)}:host input,:host select,:host textarea,:host input[type="file"]+span.input{display:inline-block;color:var(--color-text, var(--color-grey-900, #443750));background-color:var(--input-bg, rgba(0,0,0,0));height:var(--input-height, var(--size-large, 6rem));line-height:var(--input-height, var(--size-large, 6rem));padding:0 var(--input-padding, var(--size-small, 2rem));border-radius:var(--input-border-radius, var(--border-radius, .4rem));border:none;width:100%;border:var(--input-border, var(--border-200, 2px solid var(--color-grey-200, #eae3f0)));transition:border var(--transition-time, .35s);font-size:var(--input-font-size, var(--font-size-main, 1.6rem));box-shadow:var(--input-shadow, );font-family:var(--font-family, "Work Sans",sans-serif)}:host input:focus,:host select:focus,:host textarea:focus,:host input[type="file"]+span.input:focus{border:var(--input-border-focus, var(--border-main, 2px solid var(--color-main, var(--color-purple, #693a91))))}:host input::placeholder,:host select::placeholder,:host textarea::placeholder,:host input[type="file"]+span.input::placeholder{color:var(--color-grey-300, #bda9cf)}:host input:disabled,:host select:disabled,:host textarea:disabled,:host input[type="file"]+span.input:disabled{opacity:0.5;user-select:none}:host input:read-only,:host select:read-only,:host textarea:read-only,:host input[type="file"]+span.input:read-only{user-select:none}:host input.error,:host select.error,:host textarea.error,:host input[type="file"]+span.error.input{border-color:var(--color-error, var(--color-red, #ff5554))}:host>.i textarea,:host>zen-icon textarea,:host textarea{resize:none;min-height:calc(var(--input-height, var(--size-large, 6rem)) * 2);max-width:100%;outline:none}:host select{padding-right:4rem;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0idmFyKC0tY29sb3ItZ3JleS0zMDAsICNlZGVkZWQpIiBkPSJNMjkuNyAxNC44Yy0uNC0uNC0xLS40LTEuNCAwTDIwIDIzLjFsLTguMy04LjNjLS40LS40LTEtLjQtMS40IDBzLS40IDEgMCAxLjRsOSA5Yy4yLjIuNS4zLjcuM3MuNS0uMS43LS4zbDktOWMuNC0uNC40LTEgMC0xLjR6Ii8+PC9zdmc+);background-repeat:no-repeat;background-position:right center}:host{display:flex;flex-wrap:wrap;margin-bottom:var(--size-small, 2rem);position:relative;flex-basis:100%}:host>*{align-self:flex-end;width:100%}:host>.i,:host>zen-icon{position:absolute;left:0;bottom:0;margin:1rem;z-index:1}:host>.i:not(.hide)+input,:host>.i:not(.hide)+select,:host>.i:not(.hide)+*+input,:host>.i:not(.hide)+*+select,:host>zen-icon:not(.hide)+input,:host>zen-icon:not(.hide)+select,:host>zen-icon:not(.hide)+*+input,:host>zen-icon:not(.hide)+*+select{padding-left:var(--input-height, var(--size-large, 6rem))}:host>.i+zen-autocomplete,:host>zen-icon+zen-autocomplete{--autocomplete-padding-left: default('input-height')}:host span.error{display:block;flex-basis:100%;color:var(--color-error, var(--color-red, #ff5554))}:host span.error *{vertical-align:middle}.width-50:host,[rowwidth=half]:host{flex:1;margin-right:var(--size-small, 2rem)}.width-50:nth-of-type(2n):host,[rowwidth=half]:nth-of-type(2n):host{margin-right:0}:host button{flex-basis:var(--btn-height, var(--size-main, 4rem));padding:0;margin-left:var(--size-small, 2rem)}.disabled:host .i{opacity:0.5}:host zen-checkbox+span{margin-left:var(--size-small, 2rem)}:host input[type="submit"],:host zen-button[size=large]{width:100%}:host .label{display:block;margin:calc(var(--input-height) / 4) 0;color:var(--label-color, var(--color-grey-600, #777))}:host .hide-empty:empty{display:none}:host .hide{display:none}:host zen-icon:not(.hide)+zen-input{--input-padding-left: default('input-height')}:host zen-button{width:100%;box-sizing:border-box;height:var(--input-height, var(--size-large, 6rem));line-height:var(--input-height, var(--size-large, 6rem))}:host-context([rowwidth=half]){flex:1;margin-right:var(--size-small, 2rem)}:host-context([rowwidth=half]):nth-of-type(2n){margin-right:0}
</style>`;let FormRow=class extends LitElement{constructor(){super(),this.hidden=!1,this.disabled=!1,this._handleChange=this._handleChange.bind(this),this.submit=this.submit.bind(this),this.addEventListener("keyup",this._handleKeyUp.bind(this))}_render({error:t,field:n,value:a}){let r;if(t&&(r=Object.values(t)[0]),!n)return html$1``;const i=this._renderField(n,a);return html$1`
${CSS}
${r?html$1`<span class="error">
<zen-icon type="error" color="error"></zen-icon>
${r}
</span>`:""}
${n.label?html$1`<span class="label">${n.label}</span>`:""}
${i}
`}focus(){!this.field||["text","number","password","email","date","tel"].includes(this.field.type)&&this.shadowRoot.querySelector("zen-input").focus()}_handleChange(n){const e=n.target;return"ZEN-CHECKBOX"===e.tagName?this.value=e.checked:void(this.value=e.value)}submit(){this.dispatchEvent(new CustomEvent("submit"))}_renderField(e,t){const n=t,a=this._handleChange;switch(e.type){case"text":case"number":case"password":case"email":case"date":case"tel":return html$1`<zen-input
type=${e.type}
icon=${e.icon}
value=${n}
on-change=${a}
placeholder=${e.placeholder}
disabled=${e.disabled}
></zen-input>`;case"color":return html$1`<zen-input-color
type=${e.type}
value=${n}
on-change=${a}
placeholder=${e.placeholder}
disabled=${e.disabled}
></zen-input-color>`;case"textarea":return html$1`<textarea
value=${n}
on-change=${a}
placeholder=${e.placeholder}
disabled=${e.disabled}
></textarea>`;case"submit":return html$1`<zen-button
icon=${e.icon}
on-click=${this.submit}
color=${e.color}
disabled=${e.disabled}
>${e.value}</zen-button>`;case"select":return html$1`<zen-select
value=${n}
on-change=${a}
options=${e.options}
placeholder=${e.placeholder}
disabled=${e.disabled}
></zen-select>`;case"checkbox":return html$1`<zen-checkbox
checked=${n}
on-change=${a}
disabled=${e.disabled}
></zen-checkbox>`;case"radio":return html$1`<zen-radio
value=${n}
on-change=${a}
options=${e.options}
disabled=${e.disabled}
></zen-radio>`;case"radio-tabs":return html$1`<zen-radio-tabs
value=${n}
on-change=${a}
options=${e.options}
disabled=${e.disabled}
></zen-radio-tabs>`;case"radio-icons":return html$1`<zen-radio-icons
value=${n}
on-change=${a}
options=${e.options}
columns=${e.columns}
disabled=${e.disabled}
></zen-radio-icons>`;case"checkbox-icons":return html$1`<zen-checkbox-icons
value=${n}
on-change=${a}
options=${e.options}
columns=${e.columns}
disabled=${e.disabled}
></zen-checkbox-icons>`;case"autocomplete":return html$1`<zen-autocomplete
icon=${e.icon}
value=${n}
on-change=${a}
minlength=${e.minlength}
placeholder=${e.placeholder}
options=${e.options}
disabled=${e.disabled}
query=${e.query}
></<zen-autocomplete>`;}}_handleKeyUp(t){switch(t.key){case"Enter":this.dispatchEvent(new CustomEvent("submit"));}}};FormRow._boundAttributes=["rowwidth","disabled"],__decorate([property,__metadata("design:type",Object)],FormRow.prototype,"field",void 0),__decorate([property,__metadata("design:type",String)],FormRow.prototype,"name",void 0),__decorate([property,__metadata("design:type",Object)],FormRow.prototype,"value",void 0),__decorate([property,__metadata("design:type",Object)],FormRow.prototype,"error",void 0),__decorate([property,__metadata("design:type",String)],FormRow.prototype,"rowwidth",void 0),__decorate([property,__metadata("design:type",Boolean)],FormRow.prototype,"disabled",void 0),FormRow=__decorate([component("zen-form-row"),dispatchChange(),bindAttributes,__metadata("design:paramtypes",[])],FormRow);
//# sourceMappingURL=FormRow.js.map