Socket
Socket
Sign inDemoInstall

riot

Package Overview
Dependencies
Maintainers
0
Versions
276
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

riot - npm Package Compare versions

Comparing version 9.1.7 to 9.1.8

2

esm/api/__.js

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import bindingTypes from '../dependencies/@riotjs/util/binding-types.js';

@@ -3,0 +3,0 @@ import { PROPS_KEY, STATE_KEY, IS_COMPONENT_UPDATING, ATTRIBUTES_KEY_SYMBOL, COMPONENTS_IMPLEMENTATION_MAP, PLUGINS_SET, DOM_COMPONENT_INSTANCE_PROPERTY, PARENT_KEY_SYMBOL } from '../dependencies/@riotjs/util/constants.js';

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import compose from '../dependencies/cumpa/index.js';

@@ -3,0 +3,0 @@ import { createComponentFromWrapper } from '../core/create-component-from-wrapper.js';

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import { isFunction } from '../dependencies/@riotjs/util/checks.js';

@@ -3,0 +3,0 @@ import { PLUGINS_SET } from '../dependencies/@riotjs/util/constants.js';

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import $ from '../dependencies/bianco.query/index.next.js';

@@ -3,0 +3,0 @@ import { mountComponent } from '../core/mount-component.js';

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import { isFunction } from '../dependencies/@riotjs/util/checks.js';

@@ -3,0 +3,0 @@ import { IS_PURE_SYMBOL } from '../dependencies/@riotjs/util/constants.js';

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import { COMPONENTS_IMPLEMENTATION_MAP } from '../dependencies/@riotjs/util/constants.js';

@@ -3,0 +3,0 @@ import { panic } from '../dependencies/@riotjs/util/misc.js';

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import { PLUGINS_SET } from '../dependencies/@riotjs/util/constants.js';

@@ -3,0 +3,0 @@ import { panic } from '../dependencies/@riotjs/util/misc.js';

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import $ from '../dependencies/bianco.query/index.next.js';

@@ -3,0 +3,0 @@ import { DOM_COMPONENT_INSTANCE_PROPERTY } from '../dependencies/@riotjs/util/constants.js';

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import { COMPONENTS_IMPLEMENTATION_MAP } from '../dependencies/@riotjs/util/constants.js';

@@ -3,0 +3,0 @@ import { panic } from '../dependencies/@riotjs/util/misc.js';

@@ -1,5 +0,5 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
/** @type {string} current riot version */
const version = 'v9.1.7';
const version = 'v9.1.8';
export { version };

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
/**

@@ -3,0 +3,0 @@ * no-op function needed to add the proper types to your component via typescript

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import { compile } from '../dependencies/@riotjs/compiler/dist/compiler.essential.js';

@@ -3,0 +3,0 @@

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import { compile } from '../dependencies/@riotjs/compiler/dist/compiler.essential.js';

@@ -3,0 +3,0 @@

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import $ from '../dependencies/bianco.query/index.next.js';

@@ -3,0 +3,0 @@ import { compileFromUrl } from './compile-from-url.js';

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import createRuntimeSlots from '../utils/create-runtime-slots.js';

@@ -3,0 +3,0 @@ import { component as component$1 } from '../api/component.js';

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import { GLOBAL_REGISTRY } from './global-registry.js';

@@ -3,0 +3,0 @@

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
const isBrowser = typeof process === 'undefined';

@@ -3,0 +3,0 @@

@@ -1,4 +0,4 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
const GLOBAL_REGISTRY = '__riot_registry__';
export { GLOBAL_REGISTRY };

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import { GLOBAL_REGISTRY } from './global-registry.js';

@@ -3,0 +3,0 @@ import { defineWindowRiotGlobalRegistry } from './define-window-riot-global-registry.js';

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import $ from '../dependencies/bianco.query/index.next.js';

@@ -3,0 +3,0 @@ import createRuntimeSlots from '../utils/create-runtime-slots.js';

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
// cheap module transpilation

@@ -3,0 +3,0 @@ function transpile(code) {

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import { IS_DIRECTIVE } from '../dependencies/@riotjs/util/constants.js';

@@ -3,0 +3,0 @@ import { getName } from '../utils/dom.js';

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import { DOM_COMPONENT_INSTANCE_PROPERTY } from '../dependencies/@riotjs/util/constants.js';

@@ -3,0 +3,0 @@

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import $ from '../dependencies/bianco.query/index.next.js';

@@ -3,0 +3,0 @@

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import { SHOULD_UPDATE_KEY, ON_BEFORE_MOUNT_KEY, ON_MOUNTED_KEY, ON_BEFORE_UPDATE_KEY, ON_UPDATED_KEY, ON_BEFORE_UNMOUNT_KEY, ON_UNMOUNTED_KEY } from '../dependencies/@riotjs/util/constants.js';

@@ -3,0 +3,0 @@ import { noop } from '../dependencies/@riotjs/util/functions.js';

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import { template as create } from '../dependencies/@riotjs/dom-bindings/dist/dom-bindings.js';

@@ -3,0 +3,0 @@ import expressionTypes from '../dependencies/@riotjs/util/expression-types.js';

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import { callOrAssign } from '../dependencies/@riotjs/util/functions.js';

@@ -3,0 +3,0 @@

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import { DOMattributesToObject } from '../dependencies/@riotjs/util/dom.js';

@@ -3,0 +3,0 @@ import { callOrAssign } from '../dependencies/@riotjs/util/functions.js';

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import { createCoreAPIMethods } from './create-core-api-methods.js';

@@ -3,0 +3,0 @@ import { createExpression as create$4 } from '../dependencies/@riotjs/dom-bindings/dist/dom-bindings.js';

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import { IS_PURE_SYMBOL, COMPONENTS_IMPLEMENTATION_MAP } from '../dependencies/@riotjs/util/constants.js';

@@ -3,0 +3,0 @@ import { camelToDashCase } from '../dependencies/@riotjs/util/strings.js';

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import { MOUNT_METHOD_KEY, UPDATE_METHOD_KEY, UNMOUNT_METHOD_KEY } from '../dependencies/@riotjs/util/constants.js';

@@ -3,0 +3,0 @@

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import { MOUNT_METHOD_KEY, IS_PURE_SYMBOL } from '../dependencies/@riotjs/util/constants.js';

@@ -3,0 +3,0 @@ import { panic } from '../dependencies/@riotjs/util/misc.js';

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import $ from '../dependencies/bianco.query/index.next.js';

@@ -3,0 +3,0 @@ import { set } from '../dependencies/bianco.attr/index.next.js';

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import { SLOTS_KEY, ROOT_KEY, PROPS_KEY, STATE_KEY } from '../dependencies/@riotjs/util/constants.js';

@@ -3,0 +3,0 @@ import { defineProperties, defineDefaults } from '../dependencies/@riotjs/util/objects.js';

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import { isFunction, isObject } from '../dependencies/@riotjs/util/checks.js';

@@ -7,3 +7,3 @@ import { IS_PURE_SYMBOL, PARENT_KEY_SYMBOL, ATTRIBUTES_KEY_SYMBOL, PROPS_KEY, STATE_KEY, TEMPLATE_KEY_SYMBOL, ROOT_KEY, SLOTS_KEY, ON_BEFORE_MOUNT_KEY, ON_MOUNTED_KEY, SHOULD_UPDATE_KEY, ON_BEFORE_UPDATE_KEY, IS_COMPONENT_UPDATING, ON_UPDATED_KEY, ON_BEFORE_UNMOUNT_KEY, ON_UNMOUNTED_KEY, IS_DIRECTIVE } from '../dependencies/@riotjs/util/constants.js';

import { evaluateAttributeExpressions } from '../dependencies/@riotjs/util/misc.js';
import { defineProperties, defineProperty, filter } from '../dependencies/@riotjs/util/objects.js';
import { defineProperties, defineProperty, pick } from '../dependencies/@riotjs/util/objects.js';
import { addCssHook } from './add-css-hook.js';

@@ -113,5 +113,3 @@ import { bindDOMNodeToComponentInstance } from './bind-dom-node-to-component-instance.js';

...(parentScope
? filter(this[PROPS_KEY], (key) =>
computedAttributeNames.includes(key),
)
? pick(this[PROPS_KEY], computedAttributeNames)
: this[PROPS_KEY]),

@@ -118,0 +116,0 @@ ...newProps,

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import { MOUNT_METHOD_KEY, UPDATE_METHOD_KEY, UNMOUNT_METHOD_KEY } from '../dependencies/@riotjs/util/constants.js';

@@ -3,0 +3,0 @@ import { removeChild, cleanNode } from '../dependencies/@riotjs/util/dom.js';

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import { COMPONENTS_IMPLEMENTATION_MAP } from '../dependencies/@riotjs/util/constants.js';

@@ -3,0 +3,0 @@ import { panic } from '../dependencies/@riotjs/util/misc.js';

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import { MOUNT_METHOD_KEY, UPDATE_METHOD_KEY, UNMOUNT_METHOD_KEY } from '../dependencies/@riotjs/util/constants.js';

@@ -3,0 +3,0 @@ import { noop } from '../dependencies/@riotjs/util/functions.js';

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import { PLUGINS_SET } from '../dependencies/@riotjs/util/constants.js';

@@ -3,0 +3,0 @@

@@ -56,15 +56,13 @@ /* Riot WIP, @license MIT */

/**
* Like Array.prototype.filter but for objects
* Generate a new object picking only the properties from a given array
* @param {Object} source - target object
* @param {Funciton} filter - filter function
* @return {Object} filtered source or the original source received
* @param {Array} keys - list of keys that we want to copy over to the new object
* @return {Object} a new object conaining only the keys that we have picked from the keys array list
*/
function filter(source, filter) {
function pick(source, keys) {
return isObject(source)
? Object.fromEntries(
Object.entries(source).filter(([key, value]) => filter(key, value)),
)
? Object.fromEntries(keys.map((key) => [key, source[key]]))
: source
}
export { defineDefaults, defineProperties, defineProperty, filter };
export { defineDefaults, defineProperties, defineProperty, pick };

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import * as compiler_essential from './dependencies/@riotjs/compiler/dist/compiler.essential.js';

@@ -3,0 +3,0 @@ export { compiler_essential as compiler };

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
export { register } from './api/register.js';

@@ -3,0 +3,0 @@ export { unregister } from './api/unregister.js';

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import { template as create } from '../dependencies/@riotjs/dom-bindings/dist/dom-bindings.js';

@@ -3,0 +3,0 @@ import bindingTypes from '../dependencies/@riotjs/util/binding-types.js';

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import { IS_DIRECTIVE } from '../dependencies/@riotjs/util/constants.js';

@@ -3,0 +3,0 @@ import { get } from '../dependencies/bianco.attr/index.next.js';

@@ -1,2 +0,2 @@

/* Riot v9.1.7, @license MIT */
/* Riot v9.1.8, @license MIT */
import '../dependencies/@riotjs/dom-bindings/dist/dom-bindings.js';

@@ -21,3 +21,3 @@ import expressionTypes from '../dependencies/@riotjs/util/expression-types.js';

(acc, { name, type }) =>
type === expressionTypes.ATTRIBUTE ? [...acc, name] : acc,
type === expressionTypes.ATTRIBUTE ? acc.concat([name]) : acc,
[],

@@ -24,0 +24,0 @@ ) ?? []

{
"name": "riot",
"version": "9.1.7",
"version": "9.1.8",
"description": "Simple and elegant component-based UI library",

@@ -72,11 +72,11 @@ "license": "MIT",

"@riotjs/register": "^9.1.0",
"@riotjs/util": "^2.3.0",
"@riotjs/util": "^2.4.0",
"@rollup/plugin-commonjs": "^26.0.1",
"@rollup/plugin-node-resolve": "^15.2.3",
"@testing-library/user-event": "^14.5.2",
"@wdio/cli": "^8.38.2",
"@wdio/local-runner": "^8.38.2",
"@wdio/mocha-framework": "^8.38.2",
"@wdio/sauce-service": "^8.38.2",
"@wdio/spec-reporter": "^8.38.2",
"@wdio/cli": "^8.39.0",
"@wdio/local-runner": "^8.39.0",
"@wdio/mocha-framework": "^8.39.0",
"@wdio/sauce-service": "^8.39.0",
"@wdio/spec-reporter": "^8.39.0",
"bianco.attr": "^1.1.1",

@@ -102,4 +102,4 @@ "bianco.query": "^1.1.4",

"terser": "^5.31.1",
"typescript": "^5.4.5"
"typescript": "^5.5.2"
}
}

@@ -1,1 +0,1 @@

var t,e;t=this,e=function(t){"use strict";const e=0,n=1,r=2,o=3,s=4,i={EACH:0,IF:1,SIMPLE:2,TAG:3,SLOT:4};function u(t,e){return typeof t===e}function a(t){const e=t.ownerSVGElement;return!!e||null===e}function c(t){return"template"===t.tagName.toLowerCase()}function l(t){return u(t,"function")}function h(t){return!d(t)&&t.constructor===Object}function d(t){return null==t}const m=new Map,p=Symbol(),f=new Set,b="is",g="mount",y="update",v="unmount",N="shouldUpdate",O="onBeforeMount",E="onMounted",T="onBeforeUpdate",x="onUpdated",M="onBeforeUnmount",A="onUnmounted",S="props",j="state",w="slots",C="root",I=Symbol(),P=Symbol(),D=Symbol(),_=Symbol(),L=Symbol();function k(t){return t.replace(/-(\w)/g,((t,e)=>e.toUpperCase()))}function B(t){return Array.from(t.attributes).reduce(((t,e)=>(t[k(e.name)]=e.value,t)),{})}function U(t){for(;t.firstChild;)t.removeChild(t.firstChild)}const Y=t=>t.remove(),K=(t,e)=>e&&e.parentNode&&e.parentNode.insertBefore(t,e),R=0,$=1,z=2,G=3,H={ATTRIBUTE:R,EVENT:1,TEXT:z,VALUE:G};function F(){return this}function V(t){return l(t)?t.prototype&&t.prototype.constructor?new t:t():t}function q(t){const e=new Map,n=n=>(e.has(n)||e.set(n,t.call(this,n)))&&e.get(n);return n.cache=e,n}function W(t){return t.reduce(((t,e)=>{const{value:n,type:r}=e;switch(!0){case!e.name&&r===R:return{...t,...n};case r===G:t.value=e.value;break;default:t[k(e.name)]=e.value}return t}),{})}function X(t,e,n,r={}){return Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!1,configurable:!0,...r}),t}function Z(t,e,n){return Object.entries(e).forEach((([e,r])=>{X(t,e,r,n)})),t}function J(t,e){return Object.entries(e).forEach((([e,n])=>{t[e]||(t[e]=n)})),t}function Q(t,e){return h(t)?Object.fromEntries(Object.entries(t).filter((([t,n])=>e(t,n)))):t}const tt={[g](t){this.el=t},[y]:F,[v](t,e,n=!1){n?Y(this.el):n||U(this.el)},clone:F,createDOM:F},et=Symbol(),nt=Symbol(),rt=Symbol(),ot={nodes:[],mount(t,e){return this.update(t,e)},update(t,e){const{placeholder:n,nodes:r,childrenMap:o}=this,s=t===rt?null:this.evaluate(t),i=s?Array.from(s):[],{newChildrenMap:u,batches:a,futureNodes:c}=function(t,e,n,r){const{condition:o,template:s,childrenMap:i,itemName:u,getKey:a,indexName:c,root:l,isTemplateTag:h}=r,d=new Map,m=[],p=[];return t.forEach(((t,r)=>{const f=function(t,{itemName:e,indexName:n,index:r,item:o}){return X(t,e,o),n&&X(t,n,r),t}(Object.create(e),{itemName:u,indexName:c,index:r,item:t}),b=a?a(f):r,g=i.get(b),y=[];if(function(t,e){return!!t&&!t(e)}(o,f))return;const v=!g,N=g?g.template:s.clone(),O=N.el||l.cloneNode(),E=h&&v?function(t){const e=t.dom.cloneNode(!0),{head:n,tail:r}=function(){const t=document.createTextNode(""),e=document.createTextNode("");return t[et]=!0,e[nt]=!0,{head:t,tail:e}}();return{avoidDOMInjection:!0,fragment:e,head:n,tail:r,children:[n,...Array.from(e.childNodes),r]}}(N):N.meta;v?m.push((()=>N.mount(O,f,n,E))):m.push((()=>N.update(f,n))),h?y.push(...E.children):y.push(O),i.delete(b),p.push(...y),d.set(b,{nodes:y,template:N,context:f,index:r})})),{newChildrenMap:d,batches:m,futureNodes:p}}(i,t,e,this);return((t,e,n,r)=>{const o=e.length;let s=t.length,i=o,u=0,a=0,c=null;for(;u<s||a<i;)if(s===u){const t=i<o?a?n(e[a-1],-0).nextSibling:n(e[i-a],0):r;for(;a<i;)K(n(e[a++],1),t)}else if(i===a)for(;u<s;)c&&c.has(t[u])||Y(n(t[u],-1)),u++;else if(t[u]===e[a])u++,a++;else if(t[s-1]===e[i-1])s--,i--;else if(t[u]===e[i-1]&&e[a]===t[s-1]){const r=n(t[--s],-1).nextSibling;K(n(e[a++],1),n(t[u++],-1).nextSibling),K(n(e[--i],1),r),t[s]=e[i]}else{if(!c){c=new Map;let t=a;for(;t<i;)c.set(e[t],t++)}if(c.has(t[u])){const r=c.get(t[u]);if(a<r&&r<i){let o=u,d=1;for(;++o<s&&o<i&&c.get(t[o])===r+d;)d++;if(d>r-a){const o=n(t[u],0);for(;a<r;)K(n(e[a++],1),o)}else l=n(e[a++],1),(h=n(t[u++],-1))&&h.parentNode&&h.parentNode.replaceChild(l,h)}else u++}else Y(n(t[u++],-1))}var l,h})(r,c,function(t,e){return(n,r)=>{if(r<0){const n=t[t.length-1];if(n){const{template:r,nodes:o,context:s}=n;o.pop(),o.length||(t.pop(),r.unmount(s,e,null))}}return n}}(Array.from(o.values()),e),n),a.forEach((t=>t())),this.childrenMap=u,this.nodes=c,this},unmount(t,e){return this.update(rt,e),this}},st={mount(t,e){return this.update(t,e)},update(t,e){const n=!!this.evaluate(t),r=!this.value&&n,o=this.value&&!n,s=()=>{const n=this.node.cloneNode();K(n,this.placeholder),this.template=this.template.clone(),this.template.mount(n,t,e)};switch(!0){case r:s();break;case o:this.unmount(t);break;default:n&&this.template.update(t,e)}return this.value=n,this},unmount(t,e){return this.template.unmount(t,e,!0),this}},it="undefined"==typeof Element?{}:Element.prototype,ut=q((t=>it.hasOwnProperty(t))),at=/^on/,ct={handleEvent(t){this[t.type](t)}},lt=new WeakMap;function ht(t){return d(t)?"":t}const dt=(t,e)=>t.childNodes[e],mt={[R]:function t(e,{name:n,isBoolean:r},o,s){if(!n)return s&&function(t,e,n){const r=e?Object.keys(e):[];Object.keys(n).filter((t=>!r.includes(t))).forEach((e=>t.removeAttribute(e)))}(e,o,s),void(o&&function(e,n){Object.keys(n).forEach((r=>t(e,{name:r},n[r])))}(e,o));!ut(n)&&(function(t){return u(t,"boolean")}(o)||h(o)||l(o))&&(e[n]=o),function(t,e){return e?!t&&0!==t:null==t}(o,r)?e.removeAttribute(n):function(t){return["string","number","boolean"].includes(typeof t)}(o)&&e.setAttribute(n,function(t,e,n){return!0===e&&n?t:e}(n,o,r))},[$]:function(t,{name:e},n){const r=e.replace(at,""),o=lt.get(t)||(t=>{const e=Object.create(ct);return lt.set(t,e),e})(t),[s,i]=(t=>Array.isArray(t)?t:[t,!1])(n),u=o[r],a=s&&!u;u&&!s&&t.removeEventListener(r,o),a&&t.addEventListener(r,o,i),o[r]=s},[z]:function(t,e,n){t.data=ht(n)},[G]:function(t,e,n){t.value=ht(n)}},pt={mount(t){return this.value=this.evaluate(t),ft(this,this.value),this},update(t){const e=this.evaluate(t);return this.value!==e&&(ft(this,e),this.value=e),this},unmount(){return 1===this.type&&ft(this,null),this}};function ft(t,e){return mt[t.type](t.node,t,e,t.value)}function bt(t,e){return{...pt,...e,node:e.type===z?dt(t,e.childNodeIndex):t}}const gt=(t,e)=>t[D]||e,yt={attributes:[],getTemplateScope(t,e){return function(t,e,n){if(!t||!t.length)return n;const r=t.map((t=>({...t,value:t.evaluate(e)})));return Object.assign(Object.create(n||null),W(r))}(this.attributes,t,e)},mount(t,e){const n=!!t.slots&&t.slots.find((({id:t})=>t===this.name)),{parentNode:r}=this.node,o=gt(t,e);return this.template=n&&At(n.html,n.bindings).createDOM(r),this.template&&(U(this.node),this.template.mount(this.node,this.getTemplateScope(t,o),o),this.template.children=Array.from(this.node.childNodes)),vt(this.node),Y(this.node),this},update(t,e){if(this.template){const n=gt(t,e);this.template.update(this.getTemplateScope(t,n),n)}return this},unmount(t,e,n){return this.template&&this.template.unmount(this.getTemplateScope(t,e),null,n),this}};function vt(t){const e=t&&t.firstChild;e&&(K(e,t),vt(t))}function Nt(t){return t.reduce(((t,{bindings:e})=>t.concat(e)),[])}const Ot={mount(t){return this.update(t)},update(t,e){const n=this.evaluate(t);return n&&n===this.name?this.tag.update(t):(this.unmount(t,e,!0),this.name=n,this.tag=function(t,e=[],n=[]){return t?t({slots:e,attributes:n}):At(function(t){return t.reduce(((t,e)=>t+e.html),"")}(e),[...Nt(e),{expressions:n.map((t=>({type:R,...t})))}])}(this.getComponent(n),this.slots,this.attributes),this.tag.mount(this.node,t)),this},unmount(t,e,n){return this.tag&&this.tag.unmount(n),this}},Et={[n]:function(t,{evaluate:e,template:n}){const r=document.createTextNode("");return K(r,t),Y(t),{...st,node:t,evaluate:e,placeholder:r,template:n.createDOM(t)}},[r]:function(t,{expressions:e}){return n=e.map((e=>bt(t,e))),["mount","update","unmount"].reduce(((t,e)=>({...t,[e]:t=>n.map((n=>n[e](t)))&&void 0})),{});var n},[e]:function(t,{evaluate:e,condition:n,itemName:r,indexName:o,getKey:s,template:i}){const u=document.createTextNode(""),a=t.cloneNode();return K(u,t),Y(t),{...ot,childrenMap:new Map,node:t,root:a,condition:n,evaluate:e,isTemplateTag:c(a),template:i.createDOM(t),getKey:s,indexName:o,itemName:r,placeholder:u}},[o]:function(t,{evaluate:e,getComponent:n,slots:r,attributes:o}){return{...Ot,node:t,evaluate:e,slots:r,attributes:o,getComponent:n}},[s]:function(t,{name:e,attributes:n}){return{...yt,attributes:n,node:t,name:e}}};function Tt(t,e){return t.map((t=>t.type===z?{...t,childNodeIndex:t.childNodeIndex+e}:t))}function xt(t,e,n){const{selector:r,type:o,redundantAttribute:s,expressions:i}=e,u=r?t.querySelector(r):t;s&&u.removeAttribute(s);const a=i||[];return(Et[o]||Et[2])(u,{...e,expressions:n&&!r?Tt(a,n):a})}const Mt={createDOM(t){return this.dom=this.dom||function(t,e){return e&&("string"==typeof e?function(t,e){return a(t)?function(t,e){return e.ownerDocument.importNode((new window.DOMParser).parseFromString(`<svg xmlns="http://www.w3.org/2000/svg">${t}</svg>`,"application/xml").documentElement,!0)}(e,t):function(t,e){const n=c(e)?e:document.createElement("template");return n.innerHTML=t,n.content}(e,t)}(t,e):e)}(t,this.html)||document.createDocumentFragment(),this},mount(t,e,n,r={}){this.el&&this.unmount(e);const{fragment:o,children:s,avoidDOMInjection:i}=r,{parentNode:u}=s?s[0]:t,l=c(t),h=l?function(t,e,n){const r=Array.from(t.childNodes);return Math.max(r.indexOf(e),r.indexOf(n.head)+1,0)}(u,t,r):null;this.createDOM(t);const d=o||this.dom.cloneNode(!0);return this.el=l?u:t,this.children=l?s||Array.from(d.childNodes):null,!i&&d&&function(t,e){switch(!0){case a(t):!function(t,e){for(;t.firstChild;)e.appendChild(t.firstChild)}(e,t);break;case c(t):t.parentNode.replaceChild(e,t);break;default:t.appendChild(e)}}(t,d),this.bindings=this.bindingsData.map((t=>xt(this.el,t,h))),this.bindings.forEach((t=>t.mount(e,n))),this.meta=r,this},update(t,e){return this.bindings.forEach((n=>n.update(t,e))),this},unmount(t,e,n=!1){const r=this.el;if(!r)return this;switch(this.bindings.forEach((r=>r.unmount(t,e,n))),!0){case r[I]||null===n:break;case Array.isArray(this.children):!function(t){for(let e=0;e<t.length;e++)Y(t[e])}(this.children);break;case!n:U(r);break;case!!n:Y(r)}return this.el=null,this},clone(){return{...this,meta:{},el:null}}};function At(t,e=[]){return{...Mt,html:t,bindingsData:e}}const St=Object.freeze({[g]:F,[y]:F,[v]:F}),jt=(t,e)=>t[p]=e;function wt(t){return[g,y,v].reduce(((e,n)=>(e[n]=t(n),e)),{})}function Ct(t){return Array.isArray(t)?t:/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(t))&&"number"==typeof t.length?Array.from(t):[t]}function It(t,e){return Ct("string"==typeof t?(e||document).querySelectorAll(t):t)}const Pt=Object.freeze({$(t){return It(t,this.root)[0]},$$(t){return It(t,this.root)}}),Dt=Object.freeze({[N]:F,[O]:F,[E]:F,[T]:F,[x]:F,[M]:F,[A]:F}),_t=t=>1===t.length?t[0]:t;function Lt(t,e,n){const r="object"==typeof e?e:{[e]:n},o=Object.keys(r);return Ct(t).forEach((t=>{o.forEach((e=>t.setAttribute(e,r[e])))})),t}const kt=new Map;var Bt;const Ut={CSS_BY_NAME:kt,add(t,e){return kt.has(t)||(kt.set(t,e),this.inject()),this},inject(){return(Bt||(Lt(Bt=It("style[riot]")[0]||document.createElement("style"),"type","text/css"),Bt.parentNode||document.head.appendChild(Bt),Bt)).innerHTML=[...kt.values()].join("\n"),this},remove(t){return kt.has(t)&&(kt.delete(t),this.inject()),this}};function Yt(t,...e){return(...n)=>(n=[...e,...n]).length<t.length?Yt(t,...n):t(...n)}function Kt(t){return function(t,e,n){const r="string"==typeof e?[e]:e;return _t(Ct(t).map((t=>_t(r.map((e=>t.getAttribute(e)))))))}(t,b)||t.tagName.toLowerCase()}function Rt(t,e){return{...t,...V(e)}}function $t(t,e={}){return{...B(t),...V(e)}}const zt=q((t=>{const e=t?.bindingsData?.[0];return e?.selector?[]:e?.expressions?.reduce(((t,{name:e,type:n})=>n===H.ATTRIBUTE?[...t,e]:t),[])??[]}));function Gt(t,{slots:e,attributes:n,props:r}){return o=function(t){return[...f].reduce(((t,e)=>e(t)||t),t)}(Z(h(t)?Object.create(t):t,{mount(o,s={},i){return X(o,I,!1),this[D]=i,this[_]=function(t,e=[]){const n=e.map((e=>bt(t,e))),r={};return Object.assign(r,{expressions:n,...wt((t=>e=>(n.forEach((n=>n[t](e))),r)))})}(o,n).mount(i),X(this,S,Object.freeze({...$t(o,r),...W(this[_].expressions)})),this[j]=Rt(this[j],s),this[L]=this.template.createDOM(o).clone(),jt(o,this),t.name&&function(t,e){Kt(t)!==e&&Lt(t,b,e)}(o,t.name),X(this,C,o),X(this,w,e),this[O](this[S],this[j]),this[L].mount(o,this,i),this[E](this[S],this[j]),this},update(t={},e){e&&(this[D]=e,this[_].update(e));const n=zt(this[L]),r=B({attributes:Array.from(this[C].attributes).filter((({name:t})=>!n.includes(t)))}),{[b]:o,...s}={...r,...W(this[_].expressions)};if(!1!==this[N](s,this[S]))return X(this,S,Object.freeze({...e?Q(this[S],(t=>n.includes(t))):this[S],...s})),this[j]=Rt(this[j],t),this[T](this[S],this[j]),this[P]||(this[P]=!0,this[L].update(this,this[D])),this[x](this[S],this[j]),this[P]=!1,this},unmount(t){return this[M](this[S],this[j]),this[_].unmount(),this[L].unmount(this,this[D],null===t?null:!t),this[A](this[S],this[j]),this}})),Object.keys(t).filter((e=>l(t[e]))).forEach((t=>{o[t]=o[t].bind(o)})),o;var o}function Ht({css:t,template:e,componentAPI:n,name:r}){return t&&r&&Ut.add(r,t),Yt(Gt)(Z(J(n,{...Dt,[S]:{},[j]:{}}),{[w]:null,[C]:null,...Pt,name:r,css:t,template:e}))}const Ft=q(Vt);function Vt(t){const{css:e,template:n,exports:r,name:o}=t,s=n?function(t,e,n){return t(At,H,i,n)}(n,0,(t=>{const e=function(t={}){return Object.entries(V(t)).reduce(((t,[e,n])=>{var r;return t[(r=e,r.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase())]=Vt(n),t}),{})}(t.exports?t.exports.components:{});return n=>n===t.name?Ft(t):e[n]||m.get(n)})(t)):tt;return({slots:t,attributes:i,props:u})=>{if(r&&r[I])return function(t,{slots:e,attributes:n,props:r,css:o,template:s}){const i=J(t({slots:e,attributes:n,props:r}),St);return wt((t=>(...e)=>{if(t===g){const[t]=e;X(t,I,!0),jt(t,i)}return i[t](...e),i}))}(r,{slots:t,attributes:i,props:u,css:e,template:n});const a=V(r)||{},c=Ht({css:e,template:s,componentAPI:a,name:o})({slots:t,attributes:i,props:u});return{mount:(t,e,n)=>c.mount(t,n,e),update:(t,e)=>c.update(e,t),unmount:t=>c.unmount(t)}}}const qt={cssManager:Ut,DOMBindings:{template:At,createBinding:xt,createExpression:bt,bindingTypes:i,expressionTypes:H},globals:{PROPS_KEY:S,STATE_KEY:j,IS_COMPONENT_UPDATING:P,ATTRIBUTES_KEY_SYMBOL:_,COMPONENTS_IMPLEMENTATION_MAP:m,PLUGINS_SET:f,DOM_COMPONENT_INSTANCE_PROPERTY:p,PARENT_KEY_SYMBOL:D}};t.__=qt,t.component=function(t){return(e,n,{slots:r,attributes:o,parentScope:s}={})=>function(...t){return t.reduce(((t,e)=>(...n)=>t(e(...n))))}((t=>t.mount(e,s)),(t=>t({props:n,slots:r,attributes:o})),Vt)(t)},t.install=function(t){return l(t),f.has(t),f.add(t),f},t.mount=function(t,e,n){return It(t).map((t=>function(t,e,n,r){const o=n||Kt(t);return m.has(o),m.get(o)({props:e,slots:void 0}).mount(t)}(t,e,n)))},t.pure=function(t){return l(t),t[I]=!0,t},t.register=function(t,{css:e,template:n,exports:r}){return m.has(t),m.set(t,Vt({name:t,css:e,template:n,exports:r})),m},t.uninstall=function(t){return f.has(t),f.delete(t),f},t.unmount=function(t,e){return It(t).map((t=>(t[p]&&t[p].unmount(e),t)))},t.unregister=function(t){return m.has(t),m.delete(t),Ut.remove(t),m},t.version="v9.1.7",t.withTypes=t=>t},"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).riot={});
var t,e;t=this,e=function(t){"use strict";const e=0,n=1,r=2,o=3,s=4,i={EACH:0,IF:1,SIMPLE:2,TAG:3,SLOT:4};function u(t,e){return typeof t===e}function a(t){const e=t.ownerSVGElement;return!!e||null===e}function c(t){return"template"===t.tagName.toLowerCase()}function l(t){return u(t,"function")}function h(t){return!d(t)&&t.constructor===Object}function d(t){return null==t}const m=new Map,p=Symbol(),f=new Set,b="is",g="mount",y="update",v="unmount",N="shouldUpdate",O="onBeforeMount",E="onMounted",T="onBeforeUpdate",x="onUpdated",M="onBeforeUnmount",A="onUnmounted",S="props",j="state",w="slots",C="root",I=Symbol(),P=Symbol(),D=Symbol(),_=Symbol(),L=Symbol();function k(t){return t.replace(/-(\w)/g,((t,e)=>e.toUpperCase()))}function B(t){return Array.from(t.attributes).reduce(((t,e)=>(t[k(e.name)]=e.value,t)),{})}function U(t){for(;t.firstChild;)t.removeChild(t.firstChild)}const Y=t=>t.remove(),K=(t,e)=>e&&e.parentNode&&e.parentNode.insertBefore(t,e),R=0,$=1,z=2,G=3,H={ATTRIBUTE:R,EVENT:1,TEXT:z,VALUE:G};function F(){return this}function V(t){return l(t)?t.prototype&&t.prototype.constructor?new t:t():t}function q(t){const e=new Map,n=n=>(e.has(n)||e.set(n,t.call(this,n)))&&e.get(n);return n.cache=e,n}function W(t){return t.reduce(((t,e)=>{const{value:n,type:r}=e;switch(!0){case!e.name&&r===R:return{...t,...n};case r===G:t.value=e.value;break;default:t[k(e.name)]=e.value}return t}),{})}function X(t,e,n,r={}){return Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!1,configurable:!0,...r}),t}function Z(t,e,n){return Object.entries(e).forEach((([e,r])=>{X(t,e,r,n)})),t}function J(t,e){return Object.entries(e).forEach((([e,n])=>{t[e]||(t[e]=n)})),t}const Q={[g](t){this.el=t},[y]:F,[v](t,e,n=!1){n?Y(this.el):n||U(this.el)},clone:F,createDOM:F},tt=Symbol(),et=Symbol(),nt=Symbol(),rt={nodes:[],mount(t,e){return this.update(t,e)},update(t,e){const{placeholder:n,nodes:r,childrenMap:o}=this,s=t===nt?null:this.evaluate(t),i=s?Array.from(s):[],{newChildrenMap:u,batches:a,futureNodes:c}=function(t,e,n,r){const{condition:o,template:s,childrenMap:i,itemName:u,getKey:a,indexName:c,root:l,isTemplateTag:h}=r,d=new Map,m=[],p=[];return t.forEach(((t,r)=>{const f=function(t,{itemName:e,indexName:n,index:r,item:o}){return X(t,e,o),n&&X(t,n,r),t}(Object.create(e),{itemName:u,indexName:c,index:r,item:t}),b=a?a(f):r,g=i.get(b),y=[];if(function(t,e){return!!t&&!t(e)}(o,f))return;const v=!g,N=g?g.template:s.clone(),O=N.el||l.cloneNode(),E=h&&v?function(t){const e=t.dom.cloneNode(!0),{head:n,tail:r}=function(){const t=document.createTextNode(""),e=document.createTextNode("");return t[tt]=!0,e[et]=!0,{head:t,tail:e}}();return{avoidDOMInjection:!0,fragment:e,head:n,tail:r,children:[n,...Array.from(e.childNodes),r]}}(N):N.meta;v?m.push((()=>N.mount(O,f,n,E))):m.push((()=>N.update(f,n))),h?y.push(...E.children):y.push(O),i.delete(b),p.push(...y),d.set(b,{nodes:y,template:N,context:f,index:r})})),{newChildrenMap:d,batches:m,futureNodes:p}}(i,t,e,this);return((t,e,n,r)=>{const o=e.length;let s=t.length,i=o,u=0,a=0,c=null;for(;u<s||a<i;)if(s===u){const t=i<o?a?n(e[a-1],-0).nextSibling:n(e[i-a],0):r;for(;a<i;)K(n(e[a++],1),t)}else if(i===a)for(;u<s;)c&&c.has(t[u])||Y(n(t[u],-1)),u++;else if(t[u]===e[a])u++,a++;else if(t[s-1]===e[i-1])s--,i--;else if(t[u]===e[i-1]&&e[a]===t[s-1]){const r=n(t[--s],-1).nextSibling;K(n(e[a++],1),n(t[u++],-1).nextSibling),K(n(e[--i],1),r),t[s]=e[i]}else{if(!c){c=new Map;let t=a;for(;t<i;)c.set(e[t],t++)}if(c.has(t[u])){const r=c.get(t[u]);if(a<r&&r<i){let o=u,d=1;for(;++o<s&&o<i&&c.get(t[o])===r+d;)d++;if(d>r-a){const o=n(t[u],0);for(;a<r;)K(n(e[a++],1),o)}else l=n(e[a++],1),(h=n(t[u++],-1))&&h.parentNode&&h.parentNode.replaceChild(l,h)}else u++}else Y(n(t[u++],-1))}var l,h})(r,c,function(t,e){return(n,r)=>{if(r<0){const n=t[t.length-1];if(n){const{template:r,nodes:o,context:s}=n;o.pop(),o.length||(t.pop(),r.unmount(s,e,null))}}return n}}(Array.from(o.values()),e),n),a.forEach((t=>t())),this.childrenMap=u,this.nodes=c,this},unmount(t,e){return this.update(nt,e),this}},ot={mount(t,e){return this.update(t,e)},update(t,e){const n=!!this.evaluate(t),r=!this.value&&n,o=this.value&&!n,s=()=>{const n=this.node.cloneNode();K(n,this.placeholder),this.template=this.template.clone(),this.template.mount(n,t,e)};switch(!0){case r:s();break;case o:this.unmount(t);break;default:n&&this.template.update(t,e)}return this.value=n,this},unmount(t,e){return this.template.unmount(t,e,!0),this}},st="undefined"==typeof Element?{}:Element.prototype,it=q((t=>st.hasOwnProperty(t))),ut=/^on/,at={handleEvent(t){this[t.type](t)}},ct=new WeakMap;function lt(t){return d(t)?"":t}const ht=(t,e)=>t.childNodes[e],dt={[R]:function t(e,{name:n,isBoolean:r},o,s){if(!n)return s&&function(t,e,n){const r=e?Object.keys(e):[];Object.keys(n).filter((t=>!r.includes(t))).forEach((e=>t.removeAttribute(e)))}(e,o,s),void(o&&function(e,n){Object.keys(n).forEach((r=>t(e,{name:r},n[r])))}(e,o));!it(n)&&(function(t){return u(t,"boolean")}(o)||h(o)||l(o))&&(e[n]=o),function(t,e){return e?!t&&0!==t:null==t}(o,r)?e.removeAttribute(n):function(t){return["string","number","boolean"].includes(typeof t)}(o)&&e.setAttribute(n,function(t,e,n){return!0===e&&n?t:e}(n,o,r))},[$]:function(t,{name:e},n){const r=e.replace(ut,""),o=ct.get(t)||(t=>{const e=Object.create(at);return ct.set(t,e),e})(t),[s,i]=(t=>Array.isArray(t)?t:[t,!1])(n),u=o[r],a=s&&!u;u&&!s&&t.removeEventListener(r,o),a&&t.addEventListener(r,o,i),o[r]=s},[z]:function(t,e,n){t.data=lt(n)},[G]:function(t,e,n){t.value=lt(n)}},mt={mount(t){return this.value=this.evaluate(t),pt(this,this.value),this},update(t){const e=this.evaluate(t);return this.value!==e&&(pt(this,e),this.value=e),this},unmount(){return 1===this.type&&pt(this,null),this}};function pt(t,e){return dt[t.type](t.node,t,e,t.value)}function ft(t,e){return{...mt,...e,node:e.type===z?ht(t,e.childNodeIndex):t}}const bt=(t,e)=>t[D]||e,gt={attributes:[],getTemplateScope(t,e){return function(t,e,n){if(!t||!t.length)return n;const r=t.map((t=>({...t,value:t.evaluate(e)})));return Object.assign(Object.create(n||null),W(r))}(this.attributes,t,e)},mount(t,e){const n=!!t.slots&&t.slots.find((({id:t})=>t===this.name)),{parentNode:r}=this.node,o=bt(t,e);return this.template=n&&Mt(n.html,n.bindings).createDOM(r),this.template&&(U(this.node),this.template.mount(this.node,this.getTemplateScope(t,o),o),this.template.children=Array.from(this.node.childNodes)),yt(this.node),Y(this.node),this},update(t,e){if(this.template){const n=bt(t,e);this.template.update(this.getTemplateScope(t,n),n)}return this},unmount(t,e,n){return this.template&&this.template.unmount(this.getTemplateScope(t,e),null,n),this}};function yt(t){const e=t&&t.firstChild;e&&(K(e,t),yt(t))}function vt(t){return t.reduce(((t,{bindings:e})=>t.concat(e)),[])}const Nt={mount(t){return this.update(t)},update(t,e){const n=this.evaluate(t);return n&&n===this.name?this.tag.update(t):(this.unmount(t,e,!0),this.name=n,this.tag=function(t,e=[],n=[]){return t?t({slots:e,attributes:n}):Mt(function(t){return t.reduce(((t,e)=>t+e.html),"")}(e),[...vt(e),{expressions:n.map((t=>({type:R,...t})))}])}(this.getComponent(n),this.slots,this.attributes),this.tag.mount(this.node,t)),this},unmount(t,e,n){return this.tag&&this.tag.unmount(n),this}},Ot={[n]:function(t,{evaluate:e,template:n}){const r=document.createTextNode("");return K(r,t),Y(t),{...ot,node:t,evaluate:e,placeholder:r,template:n.createDOM(t)}},[r]:function(t,{expressions:e}){return n=e.map((e=>ft(t,e))),["mount","update","unmount"].reduce(((t,e)=>({...t,[e]:t=>n.map((n=>n[e](t)))&&void 0})),{});var n},[e]:function(t,{evaluate:e,condition:n,itemName:r,indexName:o,getKey:s,template:i}){const u=document.createTextNode(""),a=t.cloneNode();return K(u,t),Y(t),{...rt,childrenMap:new Map,node:t,root:a,condition:n,evaluate:e,isTemplateTag:c(a),template:i.createDOM(t),getKey:s,indexName:o,itemName:r,placeholder:u}},[o]:function(t,{evaluate:e,getComponent:n,slots:r,attributes:o}){return{...Nt,node:t,evaluate:e,slots:r,attributes:o,getComponent:n}},[s]:function(t,{name:e,attributes:n}){return{...gt,attributes:n,node:t,name:e}}};function Et(t,e){return t.map((t=>t.type===z?{...t,childNodeIndex:t.childNodeIndex+e}:t))}function Tt(t,e,n){const{selector:r,type:o,redundantAttribute:s,expressions:i}=e,u=r?t.querySelector(r):t;s&&u.removeAttribute(s);const a=i||[];return(Ot[o]||Ot[2])(u,{...e,expressions:n&&!r?Et(a,n):a})}const xt={createDOM(t){return this.dom=this.dom||function(t,e){return e&&("string"==typeof e?function(t,e){return a(t)?function(t,e){return e.ownerDocument.importNode((new window.DOMParser).parseFromString(`<svg xmlns="http://www.w3.org/2000/svg">${t}</svg>`,"application/xml").documentElement,!0)}(e,t):function(t,e){const n=c(e)?e:document.createElement("template");return n.innerHTML=t,n.content}(e,t)}(t,e):e)}(t,this.html)||document.createDocumentFragment(),this},mount(t,e,n,r={}){this.el&&this.unmount(e);const{fragment:o,children:s,avoidDOMInjection:i}=r,{parentNode:u}=s?s[0]:t,l=c(t),h=l?function(t,e,n){const r=Array.from(t.childNodes);return Math.max(r.indexOf(e),r.indexOf(n.head)+1,0)}(u,t,r):null;this.createDOM(t);const d=o||this.dom.cloneNode(!0);return this.el=l?u:t,this.children=l?s||Array.from(d.childNodes):null,!i&&d&&function(t,e){switch(!0){case a(t):!function(t,e){for(;t.firstChild;)e.appendChild(t.firstChild)}(e,t);break;case c(t):t.parentNode.replaceChild(e,t);break;default:t.appendChild(e)}}(t,d),this.bindings=this.bindingsData.map((t=>Tt(this.el,t,h))),this.bindings.forEach((t=>t.mount(e,n))),this.meta=r,this},update(t,e){return this.bindings.forEach((n=>n.update(t,e))),this},unmount(t,e,n=!1){const r=this.el;if(!r)return this;switch(this.bindings.forEach((r=>r.unmount(t,e,n))),!0){case r[I]||null===n:break;case Array.isArray(this.children):!function(t){for(let e=0;e<t.length;e++)Y(t[e])}(this.children);break;case!n:U(r);break;case!!n:Y(r)}return this.el=null,this},clone(){return{...this,meta:{},el:null}}};function Mt(t,e=[]){return{...xt,html:t,bindingsData:e}}const At=Object.freeze({[g]:F,[y]:F,[v]:F}),St=(t,e)=>t[p]=e;function jt(t){return[g,y,v].reduce(((e,n)=>(e[n]=t(n),e)),{})}function wt(t){return Array.isArray(t)?t:/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(t))&&"number"==typeof t.length?Array.from(t):[t]}function Ct(t,e){return wt("string"==typeof t?(e||document).querySelectorAll(t):t)}const It=Object.freeze({$(t){return Ct(t,this.root)[0]},$$(t){return Ct(t,this.root)}}),Pt=Object.freeze({[N]:F,[O]:F,[E]:F,[T]:F,[x]:F,[M]:F,[A]:F}),Dt=t=>1===t.length?t[0]:t;function _t(t,e,n){const r="object"==typeof e?e:{[e]:n},o=Object.keys(r);return wt(t).forEach((t=>{o.forEach((e=>t.setAttribute(e,r[e])))})),t}const Lt=new Map;var kt;const Bt={CSS_BY_NAME:Lt,add(t,e){return Lt.has(t)||(Lt.set(t,e),this.inject()),this},inject(){return(kt||(_t(kt=Ct("style[riot]")[0]||document.createElement("style"),"type","text/css"),kt.parentNode||document.head.appendChild(kt),kt)).innerHTML=[...Lt.values()].join("\n"),this},remove(t){return Lt.has(t)&&(Lt.delete(t),this.inject()),this}};function Ut(t,...e){return(...n)=>(n=[...e,...n]).length<t.length?Ut(t,...n):t(...n)}function Yt(t){return function(t,e,n){const r="string"==typeof e?[e]:e;return Dt(wt(t).map((t=>Dt(r.map((e=>t.getAttribute(e)))))))}(t,b)||t.tagName.toLowerCase()}function Kt(t,e){return{...t,...V(e)}}function Rt(t,e={}){return{...B(t),...V(e)}}const $t=q((t=>{const e=t?.bindingsData?.[0];return e?.selector?[]:e?.expressions?.reduce(((t,{name:e,type:n})=>n===H.ATTRIBUTE?t.concat([e]):t),[])??[]}));function zt(t,{slots:e,attributes:n,props:r}){return o=function(t){return[...f].reduce(((t,e)=>e(t)||t),t)}(Z(h(t)?Object.create(t):t,{mount(o,s={},i){return X(o,I,!1),this[D]=i,this[_]=function(t,e=[]){const n=e.map((e=>ft(t,e))),r={};return Object.assign(r,{expressions:n,...jt((t=>e=>(n.forEach((n=>n[t](e))),r)))})}(o,n).mount(i),X(this,S,Object.freeze({...Rt(o,r),...W(this[_].expressions)})),this[j]=Kt(this[j],s),this[L]=this.template.createDOM(o).clone(),St(o,this),t.name&&function(t,e){Yt(t)!==e&&_t(t,b,e)}(o,t.name),X(this,C,o),X(this,w,e),this[O](this[S],this[j]),this[L].mount(o,this,i),this[E](this[S],this[j]),this},update(t={},e){e&&(this[D]=e,this[_].update(e));const n=$t(this[L]),r=B({attributes:Array.from(this[C].attributes).filter((({name:t})=>!n.includes(t)))}),{[b]:o,...s}={...r,...W(this[_].expressions)};var i,u;if(!1!==this[N](s,this[S]))return X(this,S,Object.freeze({...e?(i=this[S],u=n,h(i)?Object.fromEntries(u.map((t=>[t,i[t]]))):i):this[S],...s})),this[j]=Kt(this[j],t),this[T](this[S],this[j]),this[P]||(this[P]=!0,this[L].update(this,this[D])),this[x](this[S],this[j]),this[P]=!1,this},unmount(t){return this[M](this[S],this[j]),this[_].unmount(),this[L].unmount(this,this[D],null===t?null:!t),this[A](this[S],this[j]),this}})),Object.keys(t).filter((e=>l(t[e]))).forEach((t=>{o[t]=o[t].bind(o)})),o;var o}function Gt({css:t,template:e,componentAPI:n,name:r}){return t&&r&&Bt.add(r,t),Ut(zt)(Z(J(n,{...Pt,[S]:{},[j]:{}}),{[w]:null,[C]:null,...It,name:r,css:t,template:e}))}const Ht=q(Ft);function Ft(t){const{css:e,template:n,exports:r,name:o}=t,s=n?function(t,e,n){return t(Mt,H,i,n)}(n,0,(t=>{const e=function(t={}){return Object.entries(V(t)).reduce(((t,[e,n])=>{var r;return t[(r=e,r.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase())]=Ft(n),t}),{})}(t.exports?t.exports.components:{});return n=>n===t.name?Ht(t):e[n]||m.get(n)})(t)):Q;return({slots:t,attributes:i,props:u})=>{if(r&&r[I])return function(t,{slots:e,attributes:n,props:r,css:o,template:s}){const i=J(t({slots:e,attributes:n,props:r}),At);return jt((t=>(...e)=>{if(t===g){const[t]=e;X(t,I,!0),St(t,i)}return i[t](...e),i}))}(r,{slots:t,attributes:i,props:u,css:e,template:n});const a=V(r)||{},c=Gt({css:e,template:s,componentAPI:a,name:o})({slots:t,attributes:i,props:u});return{mount:(t,e,n)=>c.mount(t,n,e),update:(t,e)=>c.update(e,t),unmount:t=>c.unmount(t)}}}const Vt={cssManager:Bt,DOMBindings:{template:Mt,createBinding:Tt,createExpression:ft,bindingTypes:i,expressionTypes:H},globals:{PROPS_KEY:S,STATE_KEY:j,IS_COMPONENT_UPDATING:P,ATTRIBUTES_KEY_SYMBOL:_,COMPONENTS_IMPLEMENTATION_MAP:m,PLUGINS_SET:f,DOM_COMPONENT_INSTANCE_PROPERTY:p,PARENT_KEY_SYMBOL:D}};t.__=Vt,t.component=function(t){return(e,n,{slots:r,attributes:o,parentScope:s}={})=>function(...t){return t.reduce(((t,e)=>(...n)=>t(e(...n))))}((t=>t.mount(e,s)),(t=>t({props:n,slots:r,attributes:o})),Ft)(t)},t.install=function(t){return l(t),f.has(t),f.add(t),f},t.mount=function(t,e,n){return Ct(t).map((t=>function(t,e,n,r){const o=n||Yt(t);return m.has(o),m.get(o)({props:e,slots:void 0}).mount(t)}(t,e,n)))},t.pure=function(t){return l(t),t[I]=!0,t},t.register=function(t,{css:e,template:n,exports:r}){return m.has(t),m.set(t,Ft({name:t,css:e,template:n,exports:r})),m},t.uninstall=function(t){return f.has(t),f.delete(t),f},t.unmount=function(t,e){return Ct(t).map((t=>(t[p]&&t[p].unmount(e),t)))},t.unregister=function(t){return m.has(t),m.delete(t),Bt.remove(t),m},t.version="v9.1.8",t.withTypes=t=>t},"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).riot={});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc