Comparing version 9.1.5 to 9.1.6
@@ -1,4 +0,4 @@ | ||
/* Riot v9.1.5, @license MIT */ | ||
/* Riot v9.1.6, @license MIT */ | ||
import bindingTypes from '../dependencies/@riotjs/util/binding-types.js'; | ||
import { DOM_COMPONENT_INSTANCE_PROPERTY, PARENT_KEY_SYMBOL } from '../dependencies/@riotjs/util/constants.js'; | ||
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'; | ||
import expressionTypes from '../dependencies/@riotjs/util/expression-types.js'; | ||
@@ -19,2 +19,8 @@ import { template as create, createBinding as create$1, createExpression as create$4 } from '../dependencies/@riotjs/dom-bindings/dist/dom-bindings.js'; | ||
globals: { | ||
PROPS_KEY, | ||
STATE_KEY, | ||
IS_COMPONENT_UPDATING, | ||
ATTRIBUTES_KEY_SYMBOL, | ||
COMPONENTS_IMPLEMENTATION_MAP, | ||
PLUGINS_SET, | ||
DOM_COMPONENT_INSTANCE_PROPERTY, | ||
@@ -21,0 +27,0 @@ PARENT_KEY_SYMBOL, |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.1.5, @license MIT */ | ||
/* Riot v9.1.6, @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.5, @license MIT */ | ||
/* Riot v9.1.6, @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.5, @license MIT */ | ||
/* Riot v9.1.6, @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.5, @license MIT */ | ||
/* Riot v9.1.6, @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.5, @license MIT */ | ||
/* Riot v9.1.6, @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.5, @license MIT */ | ||
/* Riot v9.1.6, @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.5, @license MIT */ | ||
/* Riot v9.1.6, @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.5, @license MIT */ | ||
/* Riot v9.1.6, @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.5, @license MIT */ | ||
/* Riot v9.1.6, @license MIT */ | ||
/** @type {string} current riot version */ | ||
const version = 'v9.1.5'; | ||
const version = 'v9.1.6'; | ||
export { version }; |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.1.5, @license MIT */ | ||
/* Riot v9.1.6, @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.5, @license MIT */ | ||
/* Riot v9.1.6, @license MIT */ | ||
import { compile } from '../dependencies/@riotjs/compiler/dist/compiler.essential.js'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.1.5, @license MIT */ | ||
/* Riot v9.1.6, @license MIT */ | ||
import { compile } from '../dependencies/@riotjs/compiler/dist/compiler.essential.js'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.1.5, @license MIT */ | ||
/* Riot v9.1.6, @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.5, @license MIT */ | ||
/* Riot v9.1.6, @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.5, @license MIT */ | ||
/* Riot v9.1.6, @license MIT */ | ||
import { GLOBAL_REGISTRY } from './global-registry.js'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.1.5, @license MIT */ | ||
/* Riot v9.1.6, @license MIT */ | ||
const isBrowser = typeof process === 'undefined'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,4 +0,4 @@ | ||
/* Riot v9.1.5, @license MIT */ | ||
/* Riot v9.1.6, @license MIT */ | ||
const GLOBAL_REGISTRY = '__riot_registry__'; | ||
export { GLOBAL_REGISTRY }; |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.1.5, @license MIT */ | ||
/* Riot v9.1.6, @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.5, @license MIT */ | ||
/* Riot v9.1.6, @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.5, @license MIT */ | ||
/* Riot v9.1.6, @license MIT */ | ||
// cheap module transpilation | ||
@@ -3,0 +3,0 @@ function transpile(code) { |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.1.5, @license MIT */ | ||
/* Riot v9.1.6, @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.5, @license MIT */ | ||
/* Riot v9.1.6, @license MIT */ | ||
import { DOM_COMPONENT_INSTANCE_PROPERTY } from '../dependencies/@riotjs/util/constants.js'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.1.5, @license MIT */ | ||
/* Riot v9.1.6, @license MIT */ | ||
import $ from '../dependencies/bianco.query/index.next.js'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.1.5, @license MIT */ | ||
/* Riot v9.1.6, @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.5, @license MIT */ | ||
/* Riot v9.1.6, @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.5, @license MIT */ | ||
/* Riot v9.1.6, @license MIT */ | ||
import { callOrAssign } from '../dependencies/@riotjs/util/functions.js'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.1.5, @license MIT */ | ||
/* Riot v9.1.6, @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.5, @license MIT */ | ||
/* Riot v9.1.6, @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.5, @license MIT */ | ||
/* Riot v9.1.6, @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.5, @license MIT */ | ||
/* Riot v9.1.6, @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.5, @license MIT */ | ||
/* Riot v9.1.6, @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.5, @license MIT */ | ||
/* Riot v9.1.6, @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.5, @license MIT */ | ||
/* Riot v9.1.6, @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.5, @license MIT */ | ||
/* Riot v9.1.6, @license MIT */ | ||
import { isFunction, isObject } from '../dependencies/@riotjs/util/checks.js'; | ||
@@ -3,0 +3,0 @@ 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'; |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.1.5, @license MIT */ | ||
/* Riot v9.1.6, @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.5, @license MIT */ | ||
/* Riot v9.1.6, @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.5, @license MIT */ | ||
/* Riot v9.1.6, @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.5, @license MIT */ | ||
/* Riot v9.1.6, @license MIT */ | ||
import { PLUGINS_SET } from '../dependencies/@riotjs/util/constants.js'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.1.5, @license MIT */ | ||
/* Riot v9.1.6, @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.5, @license MIT */ | ||
/* Riot v9.1.6, @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.5, @license MIT */ | ||
/* Riot v9.1.6, @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.5, @license MIT */ | ||
/* Riot v9.1.6, @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.5, @license MIT */ | ||
/* Riot v9.1.6, @license MIT */ | ||
import '../dependencies/@riotjs/dom-bindings/dist/dom-bindings.js'; | ||
@@ -14,3 +14,3 @@ import expressionTypes from '../dependencies/@riotjs/util/expression-types.js'; | ||
(template) => | ||
template?.bindingsData?.[0].expressions?.reduce( | ||
template?.bindingsData?.[0]?.expressions?.reduce( | ||
(acc, { name, type }) => | ||
@@ -17,0 +17,0 @@ type === expressionTypes.ATTRIBUTE ? [...acc, name] : acc, |
{ | ||
"name": "riot", | ||
"version": "9.1.5", | ||
"version": "9.1.6", | ||
"description": "Simple and elegant component-based UI library", | ||
@@ -69,3 +69,3 @@ "license": "MIT", | ||
"devDependencies": { | ||
"@riotjs/compiler": "^9.0.8", | ||
"@riotjs/compiler": "^9.0.9", | ||
"@riotjs/prettier-config": "^1.1.0", | ||
@@ -77,7 +77,7 @@ "@riotjs/register": "^9.0.0", | ||
"@testing-library/user-event": "^14.5.2", | ||
"@wdio/cli": "^8.35.1", | ||
"@wdio/local-runner": "^8.35.1", | ||
"@wdio/mocha-framework": "^8.35.0", | ||
"@wdio/sauce-service": "^8.35.1", | ||
"@wdio/spec-reporter": "^8.32.4", | ||
"@wdio/cli": "^8.36.1", | ||
"@wdio/local-runner": "^8.36.1", | ||
"@wdio/mocha-framework": "^8.36.1", | ||
"@wdio/sauce-service": "^8.36.1", | ||
"@wdio/spec-reporter": "^8.36.1", | ||
"bianco.attr": "^1.1.1", | ||
@@ -96,11 +96,11 @@ "bianco.query": "^1.1.4", | ||
"prettier": "^3.2.5", | ||
"rollup": "^4.13.2", | ||
"rollup": "^4.16.4", | ||
"rollup-plugin-riot": "^9.0.2", | ||
"serve": "^14.2.1", | ||
"serve": "^14.2.3", | ||
"sinon": "^17.0.1", | ||
"sinon-chai": "^3.7.0", | ||
"start-server-and-test": "^2.0.3", | ||
"terser": "^5.30.0", | ||
"typescript": "^5.4.3" | ||
"terser": "^5.30.4", | ||
"typescript": "^5.4.5" | ||
} | ||
} |
@@ -8,2 +8,7 @@ import { | ||
BindingType, | ||
template, | ||
createBinding, | ||
createExpression, | ||
bindingTypes, | ||
expressionTypes, | ||
} from '@riotjs/dom-bindings' | ||
@@ -205,1 +210,36 @@ | ||
): Component | ||
/** | ||
* Internal stuff exposed for advanced use cases | ||
* IMPORTANT: | ||
* The things exposed under __ are not part of the official API and might break at any time | ||
* Use it at your own risk! | ||
*/ | ||
export interface CSSManager { | ||
CSS_BY_NAME: Map<string, string> | ||
add: (name: string, css: string) => CSSManager | ||
inject: () => CSSManager | ||
remove: (name: string) => CSSManager | ||
} | ||
export declare const __: { | ||
cssManager: CSSManager | ||
DOMBindings: { | ||
template: typeof template | ||
createBinding: typeof createBinding | ||
createExpression: typeof createBinding | ||
bindingTypes: typeof bindingTypes | ||
expressionTypes: typeof expressionTypes | ||
} | ||
globals: { | ||
PROPS_KEY: string | ||
STATE_KEY: string | ||
IS_COMPONENT_UPDATING: Symbol | ||
ATTRIBUTES_KEY_SYMBOL: Symbol | ||
PARENT_KEY_SYMBOL: Symbol | ||
DOM_COMPONENT_INSTANCE_PROPERTY: Symbol | ||
COMPONENTS_IMPLEMENTATION_MAP: RegisteredComponentsMap | ||
PLUGINS_SET: InstalledPluginsSet | ||
} | ||
} |
@@ -1,1 +0,1 @@ | ||
var t,e;t=this,e=function(t){"use strict";const e={EACH:0,IF:1,SIMPLE:2,TAG:3,SLOT:4};function n(t,e){return typeof t===e}function r(t){const e=t.ownerSVGElement;return!!e||null===e}function o(t){return"template"===t.tagName.toLowerCase()}function s(t){return n(t,"function")}function i(t){return!u(t)&&t.constructor===Object}function u(t){return null==t}const a=new Map,c=Symbol(),l=new Set,h="is",d="mount",p="update",m="unmount",f="shouldUpdate",b="onBeforeMount",g="onMounted",y="onBeforeUpdate",v="onUpdated",N="onBeforeUnmount",x="onUnmounted",O="props",E="state",M="slots",T="root",A=Symbol(),j=Symbol(),w=Symbol(),S=Symbol(),C=Symbol();function D(t){return t.replace(/-(\w)/g,((t,e)=>e.toUpperCase()))}function k(t){return Array.from(t.attributes).reduce(((t,e)=>(t[D(e.name)]=e.value,t)),{})}function I(t){for(;t.firstChild;)t.removeChild(t.firstChild)}const L=t=>t.remove(),B=(t,e)=>e&&e.parentNode&&e.parentNode.insertBefore(t,e),P=0,U=2,_=3,$={ATTRIBUTE:P,EVENT:1,TEXT:U,VALUE:_};function z(){return this}function R(t){return s(t)?t.prototype&&t.prototype.constructor?new t:t():t}function H(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 K(t){return t.reduce(((t,e)=>{const{value:n,type:r}=e;switch(!0){case!e.name&&r===P:return{...t,...n};case r===_:t.value=e.value;break;default:t[D(e.name)]=e.value}return t}),{})}function Y(t,e,n,r={}){return Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!1,configurable:!0,...r}),t}function F(t,e,n){return Object.entries(e).forEach((([e,r])=>{Y(t,e,r,n)})),t}function V(t,e){return Object.entries(e).forEach((([e,n])=>{t[e]||(t[e]=n)})),t}const q={[d](t){this.el=t},[p]:z,[m](t,e,n=!1){n?L(this.el):n||I(this.el)},clone:z,createDOM:z},G=Symbol(),W=Symbol(),X=Symbol(),Z={nodes:[],mount(t,e){return this.update(t,e)},update(t,e){const{placeholder:n,nodes:r,childrenMap:o}=this,s=t===X?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,p=[],m=[];return t.forEach(((t,r)=>{const f=function(t,{itemName:e,indexName:n,index:r,item:o}){return Y(t,e,o),n&&Y(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(),x=N.el||l.cloneNode(),O=h&&v?function(t){const e=t.dom.cloneNode(!0),{head:n,tail:r}=function(){const t=document.createTextNode(""),e=document.createTextNode("");return t[G]=!0,e[W]=!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?p.push((()=>N.mount(x,f,n,O))):p.push((()=>N.update(f,n))),h?y.push(...O.children):y.push(x),i.delete(b),m.push(...y),d.set(b,{nodes:y,template:N,context:f,index:r})})),{newChildrenMap:d,batches:p,futureNodes:m}}(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;)B(n(e[a++],1),t)}else if(i===a)for(;u<s;)c&&c.has(t[u])||L(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;B(n(e[a++],1),n(t[u++],-1).nextSibling),B(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;)B(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 L(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(X,e),this}},J={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();B(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}},Q="undefined"==typeof Element?{}:Element.prototype,tt=H((t=>Q.hasOwnProperty(t))),et=/^on/,nt={handleEvent(t){this[t.type](t)}},rt=new WeakMap;function ot(t){return u(t)?"":t}const st=(t,e)=>t.childNodes[e],it={[P]:function t(e,{name:r,isBoolean:o},u,a){if(!r)return a&&function(t,e,n){const r=e?Object.keys(e):[];Object.keys(n).filter((t=>!r.includes(t))).forEach((e=>t.removeAttribute(e)))}(e,u,a),void(u&&function(e,n){Object.keys(n).forEach((r=>t(e,{name:r},n[r])))}(e,u));!tt(r)&&(function(t){return n(t,"boolean")}(u)||i(u)||s(u))&&(e[r]=u),function(t,e){return e?!t&&0!==t:null==t}(u,o)?e.removeAttribute(r):function(t){return["string","number","boolean"].includes(typeof t)}(u)&&e.setAttribute(r,function(t,e,n){return!0===e&&n?t:e}(r,u,o))},1:function(t,{name:e},n){const r=e.replace(et,""),o=rt.get(t)||(t=>{const e=Object.create(nt);return rt.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},[U]:function(t,e,n){t.data=ot(n)},[_]:function(t,e,n){t.value=ot(n)}},ut={mount(t){return this.value=this.evaluate(t),at(this,this.value),this},update(t){const e=this.evaluate(t);return this.value!==e&&(at(this,e),this.value=e),this},unmount(){return 1===this.type&&at(this,null),this}};function at(t,e){return it[t.type](t.node,t,e,t.value)}function ct(t,e){return{...ut,...e,node:e.type===U?st(t,e.childNodeIndex):t}}const lt=(t,e)=>t[w]||e,ht={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),K(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=lt(t,e);return this.template=n&&vt(n.html,n.bindings).createDOM(r),this.template&&(I(this.node),this.template.mount(this.node,this.getTemplateScope(t,o),o),this.template.children=Array.from(this.node.childNodes)),dt(this.node),L(this.node),this},update(t,e){if(this.template){const n=lt(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 dt(t){const e=t&&t.firstChild;e&&(B(e,t),dt(t))}function pt(t){return t.reduce(((t,{bindings:e})=>t.concat(e)),[])}const mt={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}):vt(function(t){return t.reduce(((t,e)=>t+e.html),"")}(e),[...pt(e),{expressions:n.map((t=>({type:P,...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}},ft={1:function(t,{evaluate:e,template:n}){const r=document.createTextNode("");return B(r,t),L(t),{...J,node:t,evaluate:e,placeholder:r,template:n.createDOM(t)}},2:function(t,{expressions:e}){return n=e.map((e=>ct(t,e))),["mount","update","unmount"].reduce(((t,e)=>({...t,[e]:t=>n.map((n=>n[e](t)))&&void 0})),{});var n},0:function(t,{evaluate:e,condition:n,itemName:r,indexName:s,getKey:i,template:u}){const a=document.createTextNode(""),c=t.cloneNode();return B(a,t),L(t),{...Z,childrenMap:new Map,node:t,root:c,condition:n,evaluate:e,isTemplateTag:o(c),template:u.createDOM(t),getKey:i,indexName:s,itemName:r,placeholder:a}},3:function(t,{evaluate:e,getComponent:n,slots:r,attributes:o}){return{...mt,node:t,evaluate:e,slots:r,attributes:o,getComponent:n}},4:function(t,{name:e,attributes:n}){return{...ht,attributes:n,node:t,name:e}}};function bt(t,e){return t.map((t=>t.type===U?{...t,childNodeIndex:t.childNodeIndex+e}:t))}function gt(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(ft[o]||ft[2])(u,{...e,expressions:n&&!r?bt(a,n):a})}const yt={createDOM(t){return this.dom=this.dom||function(t,e){return e&&("string"==typeof e?function(t,e){return r(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=o(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,s={}){this.el&&this.unmount(e);const{fragment:i,children:u,avoidDOMInjection:a}=s,{parentNode:c}=u?u[0]:t,l=o(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)}(c,t,s):null;this.createDOM(t);const d=i||this.dom.cloneNode(!0);return this.el=l?c:t,this.children=l?u||Array.from(d.childNodes):null,!a&&d&&function(t,e){switch(!0){case r(t):!function(t,e){for(;t.firstChild;)e.appendChild(t.firstChild)}(e,t);break;case o(t):t.parentNode.replaceChild(e,t);break;default:t.appendChild(e)}}(t,d),this.bindings=this.bindingsData.map((t=>gt(this.el,t,h))),this.bindings.forEach((t=>t.mount(e,n))),this.meta=s,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[A]||null===n:break;case Array.isArray(this.children):!function(t){for(let e=0;e<t.length;e++)L(t[e])}(this.children);break;case!n:I(r);break;case!!n:L(r)}return this.el=null,this},clone(){return{...this,meta:{},el:null}}};function vt(t,e=[]){return{...yt,html:t,bindingsData:e}}const Nt=Object.freeze({[d]:z,[p]:z,[m]:z}),xt=(t,e)=>t[c]=e;function Ot(t){return[d,p,m].reduce(((e,n)=>(e[n]=t(n),e)),{})}function Et(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 Mt(t,e){return Et("string"==typeof t?(e||document).querySelectorAll(t):t)}const Tt=Object.freeze({$(t){return Mt(t,this.root)[0]},$$(t){return Mt(t,this.root)}}),At=Object.freeze({[f]:z,[b]:z,[g]:z,[y]:z,[v]:z,[N]:z,[x]:z}),jt=t=>1===t.length?t[0]:t;function wt(t,e,n){const r="object"==typeof e?e:{[e]:n},o=Object.keys(r);return Et(t).forEach((t=>{o.forEach((e=>t.setAttribute(e,r[e])))})),t}const St=new Map;var Ct;const Dt={CSS_BY_NAME:St,add(t,e){return St.has(t)||(St.set(t,e),this.inject()),this},inject(){return(Ct||(wt(Ct=Mt("style[riot]")[0]||document.createElement("style"),"type","text/css"),Ct.parentNode||document.head.appendChild(Ct),Ct)).innerHTML=[...St.values()].join("\n"),this},remove(t){return St.has(t)&&(St.delete(t),this.inject()),this}};function kt(t,...e){return(...n)=>(n=[...e,...n]).length<t.length?kt(t,...n):t(...n)}function It(t){return function(t,e,n){const r="string"==typeof e?[e]:e;return jt(Et(t).map((t=>jt(r.map((e=>t.getAttribute(e)))))))}(t,h)||t.tagName.toLowerCase()}function Lt(t,e){return{...t,...R(e)}}function Bt(t,e={}){return{...k(t),...R(e)}}const Pt=H((t=>t?.bindingsData?.[0].expressions?.reduce(((t,{name:e,type:n})=>n===$.ATTRIBUTE?[...t,e]:t),[])??[]));function Ut(t,{slots:e,attributes:n,props:r}){return o=function(t){return[...l].reduce(((t,e)=>e(t)||t),t)}(F(i(t)?Object.create(t):t,{mount(o,s={},i){return Y(o,A,!1),this[w]=i,this[S]=function(t,e=[]){const n=e.map((e=>ct(t,e))),r={};return Object.assign(r,{expressions:n,...Ot((t=>e=>(n.forEach((n=>n[t](e))),r)))})}(o,n).mount(i),Y(this,O,Object.freeze({...Bt(o,r),...K(this[S].expressions)})),this[E]=Lt(this[E],s),this[C]=this.template.createDOM(o).clone(),xt(o,this),t.name&&function(t,e){It(t)!==e&&wt(t,h,e)}(o,t.name),Y(this,T,o),Y(this,M,e),this[b](this[O],this[E]),this[C].mount(o,this,i),this[g](this[O],this[E]),this},update(t={},e){e&&(this[w]=e,this[S].update(e));const n=Pt(this[C]),r=k({attributes:Array.from(this[T].attributes).filter((({name:t})=>!n.includes(t)))}),{[h]:o,...s}={...r,...K(this[S].expressions)};if(!1!==this[f](s,this[O]))return Y(this,O,Object.freeze({...e?null:this[O],...s})),this[E]=Lt(this[E],t),this[y](this[O],this[E]),this[j]||(this[j]=!0,this[C].update(this,this[w])),this[v](this[O],this[E]),this[j]=!1,this},unmount(t){return this[N](this[O],this[E]),this[S].unmount(),this[C].unmount(this,this[w],null===t?null:!t),this[x](this[O],this[E]),this}})),Object.keys(t).filter((e=>s(t[e]))).forEach((t=>{o[t]=o[t].bind(o)})),o;var o}function _t({css:t,template:e,componentAPI:n,name:r}){return t&&r&&Dt.add(r,t),kt(Ut)(F(V(n,{...At,[O]:{},[E]:{}}),{[M]:null,[T]:null,...Tt,name:r,css:t,template:e}))}const $t=H(zt);function zt(t){const{css:n,template:r,exports:o,name:s}=t,i=r?function(t,n,r){return t(vt,$,e,r)}(r,0,(t=>{const e=function(t={}){return Object.entries(R(t)).reduce(((t,[e,n])=>{var r;return t[(r=e,r.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase())]=zt(n),t}),{})}(t.exports?t.exports.components:{});return n=>n===t.name?$t(t):e[n]||a.get(n)})(t)):q;return({slots:t,attributes:e,props:u})=>{if(o&&o[A])return function(t,{slots:e,attributes:n,props:r,css:o,template:s}){const i=V(t({slots:e,attributes:n,props:r}),Nt);return Ot((t=>(...e)=>{if(t===d){const[t]=e;Y(t,A,!0),xt(t,i)}return i[t](...e),i}))}(o,{slots:t,attributes:e,props:u,css:n,template:r});const a=R(o)||{},c=_t({css:n,template:i,componentAPI:a,name:s})({slots:t,attributes:e,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 Rt={cssManager:Dt,DOMBindings:{template:vt,createBinding:gt,createExpression:ct,bindingTypes:e,expressionTypes:$},globals:{DOM_COMPONENT_INSTANCE_PROPERTY:c,PARENT_KEY_SYMBOL:w}};t.__=Rt,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})),zt)(t)},t.install=function(t){return s(t),l.has(t),l.add(t),l},t.mount=function(t,e,n){return Mt(t).map((t=>function(t,e,n,r){const o=n||It(t);return a.has(o),a.get(o)({props:e,slots:void 0}).mount(t)}(t,e,n)))},t.pure=function(t){return s(t),t[A]=!0,t},t.register=function(t,{css:e,template:n,exports:r}){return a.has(t),a.set(t,zt({name:t,css:e,template:n,exports:r})),a},t.uninstall=function(t){return l.has(t),l.delete(t),l},t.unmount=function(t,e){return Mt(t).map((t=>(t[c]&&t[c].unmount(e),t)))},t.unregister=function(t){return a.has(t),a.delete(t),Dt.remove(t),a},t.version="v9.1.5",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 p=new Map,m=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,p=[],m=[];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?p.push((()=>N.mount(O,f,n,E))):p.push((()=>N.update(f,n))),h?y.push(...E.children):y.push(O),i.delete(b),m.push(...y),d.set(b,{nodes:y,template:N,context:f,index:r})})),{newChildrenMap:d,batches:p,futureNodes:m}}(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)}},pt={mount(t){return this.value=this.evaluate(t),mt(this,this.value),this},update(t){const e=this.evaluate(t);return this.value!==e&&(mt(this,e),this.value=e),this},unmount(){return 1===this.type&&mt(this,null),this}};function mt(t,e){return dt[t.type](t.node,t,e,t.value)}function ft(t,e){return{...pt,...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[m]=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=>t?.bindingsData?.[0]?.expressions?.reduce(((t,{name:e,type:n})=>n===H.ATTRIBUTE?[...t,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)};if(!1!==this[N](s,this[S]))return X(this,S,Object.freeze({...e?null: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]||p.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:p,PLUGINS_SET:f,DOM_COMPONENT_INSTANCE_PROPERTY:m,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 p.has(o),p.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 p.has(t),p.set(t,Ft({name:t,css:e,template:n,exports:r})),p},t.uninstall=function(t){return f.has(t),f.delete(t),f},t.unmount=function(t,e){return Ct(t).map((t=>(t[m]&&t[m].unmount(e),t)))},t.unregister=function(t){return p.has(t),p.delete(t),Bt.remove(t),p},t.version="v9.1.6",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
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3554411
83186