@uxland/primary-shell 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +334 -225
- package/dist/index.js.map +1 -0
- package/dist/index.umd.cjs +63 -0
- package/dist/index.umd.cjs.map +1 -0
- package/package.json +3 -1
- package/dist/index.mjs +0 -3187
package/dist/index.js
CHANGED
|
@@ -1,236 +1,318 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
* All rights reserved.
|
|
8
|
-
* Redistribution and use in source and binary forms, with or without
|
|
9
|
-
* modification, are permitted provided that the following conditions are met:
|
|
10
|
-
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
11
|
-
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
12
|
-
* 3. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by the <copyright holder>.
|
|
13
|
-
* 4. Neither the name of the <copyright holder> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
14
|
-
*
|
|
15
|
-
* THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
16
|
-
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
17
|
-
*/const Mr=()=>{};function f(r){return r!=null&&typeof r=="object"&&r["@@functional/placeholder"]===!0}function $(r){return function t(e){return arguments.length===0||f(e)?t:r.apply(this,arguments)}}function g(r){return function t(e,i){switch(arguments.length){case 0:return t;case 1:return f(e)?t:$(function(s){return r(e,s)});default:return f(e)&&f(i)?t:f(e)?$(function(s){return r(s,i)}):f(i)?$(function(s){return r(e,s)}):r(e,i)}}}function Ur(r){var t=Object.prototype.toString.call(r);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"}function me(r){for(var t=[],e;!(e=r.next()).done;)t.push(e.value);return t}function ye(r,t,e){for(var i=0,s=e.length;i<s;){if(r(t,e[i]))return!0;i+=1}return!1}function Hr(r){var t=String(r).match(/^function (\w*)/);return t==null?"":t[1]}function $t(r,t){return Object.prototype.hasOwnProperty.call(t,r)}function jr(r,t){return r===t?r!==0||1/r===1/t:r!==r&&t!==t}const Tt=typeof Object.is=="function"?Object.is:jr;var $e=Object.prototype.toString,Lr=function(){return $e.call(arguments)==="[object Arguments]"?function(t){return $e.call(t)==="[object Arguments]"}:function(t){return $t("callee",t)}}(),Vr=!{toString:null}.propertyIsEnumerable("toString"),_e=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],be=function(){return arguments.propertyIsEnumerable("length")}(),Dr=function(t,e){for(var i=0;i<t.length;){if(t[i]===e)return!0;i+=1}return!1},k=$(typeof Object.keys=="function"&&!be?function(t){return Object(t)!==t?[]:Object.keys(t)}:function(t){if(Object(t)!==t)return[];var e,i,s=[],n=be&&Lr(t);for(e in t)$t(e,t)&&(!n||e!=="length")&&(s[s.length]=e);if(Vr)for(i=_e.length-1;i>=0;)e=_e[i],$t(e,t)&&!Dr(s,e)&&(s[s.length]=e),i-=1;return s}),we=$(function(t){return t===null?"Null":t===void 0?"Undefined":Object.prototype.toString.call(t).slice(8,-1)});function Ae(r,t,e,i){var s=me(r),n=me(t);function o(a,c){return ee(a,c,e.slice(),i.slice())}return!ye(function(a,c){return!ye(o,c,a)},n,s)}function ee(r,t,e,i){if(Tt(r,t))return!0;var s=we(r);if(s!==we(t)||r==null||t==null)return!1;if(typeof r["fantasy-land/equals"]=="function"||typeof t["fantasy-land/equals"]=="function")return typeof r["fantasy-land/equals"]=="function"&&r["fantasy-land/equals"](t)&&typeof t["fantasy-land/equals"]=="function"&&t["fantasy-land/equals"](r);if(typeof r.equals=="function"||typeof t.equals=="function")return typeof r.equals=="function"&&r.equals(t)&&typeof t.equals=="function"&&t.equals(r);switch(s){case"Arguments":case"Array":case"Object":if(typeof r.constructor=="function"&&Hr(r.constructor)==="Promise")return r===t;break;case"Boolean":case"Number":case"String":if(!(typeof r==typeof t&&Tt(r.valueOf(),t.valueOf())))return!1;break;case"Date":if(!Tt(r.valueOf(),t.valueOf()))return!1;break;case"Error":return r.name===t.name&&r.message===t.message;case"RegExp":if(!(r.source===t.source&&r.global===t.global&&r.ignoreCase===t.ignoreCase&&r.multiline===t.multiline&&r.sticky===t.sticky&&r.unicode===t.unicode))return!1;break}for(var n=e.length-1;n>=0;){if(e[n]===r)return i[n]===t;n-=1}switch(s){case"Map":return r.size!==t.size?!1:Ae(r.entries(),t.entries(),e.concat([r]),i.concat([t]));case"Set":return r.size!==t.size?!1:Ae(r.values(),t.values(),e.concat([r]),i.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var o=k(r);if(o.length!==k(t).length)return!1;var a=e.concat([r]),c=i.concat([t]);for(n=o.length-1;n>=0;){var l=o[n];if(!($t(l,t)&&ee(t[l],r[l],a,c)))return!1;n-=1}return!0}var zr=g(function(t,e){return ee(t,e,[],[])});function Br(r,t,e){var i,s;if(typeof r.indexOf=="function")switch(typeof t){case"number":if(t===0){for(i=1/t;e<r.length;){if(s=r[e],s===0&&1/s===i)return e;e+=1}return-1}else if(t!==t){for(;e<r.length;){if(s=r[e],typeof s=="number"&&s!==s)return e;e+=1}return-1}return r.indexOf(t,e);case"string":case"boolean":case"function":case"undefined":return r.indexOf(t,e);case"object":if(t===null)return r.indexOf(t,e)}for(;e<r.length;){if(zr(r[e],t))return e;e+=1}return-1}function Fr(r,t){return Br(t,r,0)>=0}function ft(r,t){for(var e=0,i=t.length,s=Array(i);e<i;)s[e]=r(t[e]),e+=1;return s}function Ot(r){var t=r.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0");return'"'+t.replace(/"/g,'\\"')+'"'}var X=function(t){return(t<10?"0":"")+t},qr=typeof Date.prototype.toISOString=="function"?function(t){return t.toISOString()}:function(t){return t.getUTCFullYear()+"-"+X(t.getUTCMonth()+1)+"-"+X(t.getUTCDate())+"T"+X(t.getUTCHours())+":"+X(t.getUTCMinutes())+":"+X(t.getUTCSeconds())+"."+(t.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};function Wr(r){return function(){return!r.apply(this,arguments)}}const re=Array.isArray||function(t){return t!=null&&t.length>=0&&Object.prototype.toString.call(t)==="[object Array]"};function Gr(r){return r!=null&&typeof r["@@transducer/step"]=="function"}function nr(r,t,e){return function(){if(arguments.length===0)return e();var i=Array.prototype.slice.call(arguments,0),s=i.pop();if(!re(s)){for(var n=0;n<r.length;){if(typeof s[r[n]]=="function")return s[r[n]].apply(s,i);n+=1}if(Gr(s)){var o=t.apply(null,i);return o(s)}}return e.apply(this,arguments)}}function Kr(r,t){for(var e=0,i=t.length,s=[];e<i;)r(t[e])&&(s[s.length]=t[e]),e+=1;return s}function Yr(r){return Object.prototype.toString.call(r)==="[object Object]"}function or(r){return Object.prototype.toString.call(r)==="[object String]"}var Xr=$(function(t){return re(t)?!0:!t||typeof t!="object"||or(t)?!1:t.nodeType===1?!!t.length:t.length===0?!0:t.length>0?t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1):!1}),Zr=function(){function r(t){this.f=t}return r.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},r.prototype["@@transducer/result"]=function(t){return t},r.prototype["@@transducer/step"]=function(t,e){return this.f(t,e)},r}();function Qr(r){return new Zr(r)}function at(r,t){switch(r){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,i){return t.apply(this,arguments)};case 3:return function(e,i,s){return t.apply(this,arguments)};case 4:return function(e,i,s,n){return t.apply(this,arguments)};case 5:return function(e,i,s,n,o){return t.apply(this,arguments)};case 6:return function(e,i,s,n,o,a){return t.apply(this,arguments)};case 7:return function(e,i,s,n,o,a,c){return t.apply(this,arguments)};case 8:return function(e,i,s,n,o,a,c,l){return t.apply(this,arguments)};case 9:return function(e,i,s,n,o,a,c,l,u){return t.apply(this,arguments)};case 10:return function(e,i,s,n,o,a,c,l,u,h){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}var B=g(function(t,e){return at(t.length,function(){return t.apply(e,arguments)})});function Jr(r,t,e){for(var i=0,s=e.length;i<s;){if(t=r["@@transducer/step"](t,e[i]),t&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}i+=1}return r["@@transducer/result"](t)}function Ee(r,t,e){for(var i=e.next();!i.done;){if(t=r["@@transducer/step"](t,i.value),t&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}i=e.next()}return r["@@transducer/result"](t)}function Se(r,t,e,i){return r["@@transducer/result"](e[i](B(r["@@transducer/step"],r),t))}var Ce=typeof Symbol<"u"?Symbol.iterator:"@@iterator";function ie(r,t,e){if(typeof r=="function"&&(r=Qr(r)),Xr(e))return Jr(r,t,e);if(typeof e["fantasy-land/reduce"]=="function")return Se(r,t,e,"fantasy-land/reduce");if(e[Ce]!=null)return Ee(r,t,e[Ce]());if(typeof e.next=="function")return Ee(r,t,e);if(typeof e.reduce=="function")return Se(r,t,e,"reduce");throw new TypeError("reduce: list must be array or iterable")}const _t={init:function(){return this.xf["@@transducer/init"]()},result:function(r){return this.xf["@@transducer/result"](r)}};var ti=function(){function r(t,e){this.xf=e,this.f=t}return r.prototype["@@transducer/init"]=_t.init,r.prototype["@@transducer/result"]=_t.result,r.prototype["@@transducer/step"]=function(t,e){return this.f(e)?this.xf["@@transducer/step"](t,e):t},r}(),ei=g(function(t,e){return new ti(t,e)}),ri=g(nr(["filter"],ei,function(r,t){return Yr(t)?ie(function(e,i){return r(t[i])&&(e[i]=t[i]),e},{},k(t)):Kr(r,t)})),ar=g(function(t,e){return ri(Wr(t),e)});function cr(r,t){var e=function(o){var a=t.concat([r]);return Fr(o,a)?"<Circular>":cr(o,a)},i=function(n,o){return ft(function(a){return Ot(a)+": "+e(n[a])},o.slice().sort())};switch(Object.prototype.toString.call(r)){case"[object Arguments]":return"(function() { return arguments; }("+ft(e,r).join(", ")+"))";case"[object Array]":return"["+ft(e,r).concat(i(r,ar(function(n){return/^\d+$/.test(n)},k(r)))).join(", ")+"]";case"[object Boolean]":return typeof r=="object"?"new Boolean("+e(r.valueOf())+")":r.toString();case"[object Date]":return"new Date("+(isNaN(r.valueOf())?e(NaN):Ot(qr(r)))+")";case"[object Null]":return"null";case"[object Number]":return typeof r=="object"?"new Number("+e(r.valueOf())+")":1/r===-1/0?"-0":r.toString(10);case"[object String]":return typeof r=="object"?"new String("+e(r.valueOf())+")":Ot(r);case"[object Undefined]":return"undefined";default:if(typeof r.toString=="function"){var s=r.toString();if(s!=="[object Object]")return s}return"{"+i(r,k(r)).join(", ")+"}"}}function ii(r,t){if(t==null||!Ur(t.then))throw new TypeError("`"+r+"` expected a Promise, received "+cr(t,[]))}var F=g(function(t,e){return ii("andThen",e),e.then(t)}),si=function(){function r(t,e){this.xf=e,this.f=t}return r.prototype["@@transducer/init"]=_t.init,r.prototype["@@transducer/result"]=_t.result,r.prototype["@@transducer/step"]=function(t,e){return this.xf["@@transducer/step"](t,this.f(e))},r}(),ni=g(function(t,e){return new si(t,e)});function lr(r,t,e){return function(){for(var i=[],s=0,n=r,o=0;o<t.length||s<arguments.length;){var a;o<t.length&&(!f(t[o])||s>=arguments.length)?a=t[o]:(a=arguments[s],s+=1),i[o]=a,f(a)||(n-=1),o+=1}return n<=0?e.apply(this,i):at(n,lr(r,i,e))}}var oi=g(function(t,e){return t===1?$(e):at(t,lr(t,[],e))}),ct=g(nr(["fantasy-land/map","map"],ni,function(t,e){switch(Object.prototype.toString.call(e)){case"[object Function]":return oi(e.length,function(){return t.call(this,e.apply(this,arguments))});case"[object Object]":return ie(function(i,s){return i[s]=t(e[s]),i},{},k(e));default:return ft(t,e)}}));function ai(r,t){return function(){return t.call(this,r.apply(this,arguments))}}function hr(r){return function t(e,i,s){switch(arguments.length){case 0:return t;case 1:return f(e)?t:g(function(n,o){return r(e,n,o)});case 2:return f(e)&&f(i)?t:f(e)?g(function(n,o){return r(n,i,o)}):f(i)?g(function(n,o){return r(e,n,o)}):$(function(n){return r(e,i,n)});default:return f(e)&&f(i)&&f(s)?t:f(e)&&f(i)?g(function(n,o){return r(n,o,s)}):f(e)&&f(s)?g(function(n,o){return r(n,i,o)}):f(i)&&f(s)?g(function(n,o){return r(e,n,o)}):f(e)?$(function(n){return r(n,i,s)}):f(i)?$(function(n){return r(e,n,s)}):f(s)?$(function(n){return r(e,i,n)}):r(e,i,s)}}}var ur=hr(ie);function se(r,t){return function(){var e=arguments.length;if(e===0)return t();var i=arguments[e-1];return re(i)||typeof i[r]!="function"?t.apply(this,arguments):i[r].apply(i,Array.prototype.slice.call(arguments,0,e-1))}}var ci=hr(se("slice",function(t,e,i){return Array.prototype.slice.call(i,t,e)})),li=$(se("tail",ci(1,1/0)));function j(){if(arguments.length===0)throw new Error("pipe requires at least one argument");return at(arguments[0].length,ur(ai,arguments[0],li(arguments)))}let hi=class{constructor(t){this.targetRegion=t}async attach(){const t=this.targetRegion.regionManager.getRegisteredViews(this.targetRegion.name);return j(ct(e=>this.targetRegion.addView(e.key,e.view)),B(Promise.all,Promise),F(Mr))(t)}detach(){return Promise.resolve()}},ui=class{constructor(){this.registry=[]}get behaviors(){return[...this.registry]}register(t){this.behaviors.some(e=>e===t)||this.registry.push(t)}};const dr=new ui;dr.register(hi);const di=dr;let pi=class{constructor(t){this.host=t}get behaviors(){return di.behaviors.map(t=>new t(this.host.uxlRegion))}activateView(t){return this.host.contains(t)||this.addViewToHost(t),t.hidden=!1,Promise.resolve(void 0)}deactivateView(t){return t.view&&t.view.removeFromDomWhenDeactivated?this.removeViewFromHost(t):t.hidden=!0,Promise.resolve(null)}removeView(t){this.removeViewFromHost(t)}viewAdded(t){}addViewToHost(t){this.host.appendChild(t)}removeViewFromHost(t){this.host.removeChild(t),this.host.uxlRegion.viewRemovedFromDom(t.view)}};const fi=(r,t)=>!r.sortHint&&!t.sortHint||!t.sortHint?-1:r.sortHint?r.sortHint.localeCompare(t.sortHint):1;let gi=class extends pi{async viewAdded(t){await this.host.uxlRegion.activate(t)}addViewToHost(t){const e=this.host.uxlRegion.currentActiveViews.sort(fi).indexOf(t.view);e>=this.host.children.length?super.addViewToHost(t):this.host.insertBefore(t,this.host.children[e])}};const vi=(r,t)=>new gi(t),x=(r,t)=>{if(r=typeof r=="function"?r():r,!r)throw new Error(t)},mi=r=>typeof HTMLElement=="object"?r instanceof HTMLElement:r&&typeof r=="object"&&r!=null&&r.nodeType===1&&typeof r.nodeName=="string",yi=r=>{if(!r.htmlTag&&!r.element&&!r.factory)throw new Error("One of properties htmlTag, factory or element must be set");return r.htmlTag&&x(typeof r.htmlTag=="string","htmlTag property must be an string"),r.factory&&x(typeof r.factory=="function","factory property must be a function"),r.element&&x(mi(r.element),"element property must be an HTMLElement"),!0},$i=async(r,t,e)=>{let i;return r.element?i=r.element:r.factory?i=await r.factory():r.htmlTag&&(r.htmlUrl&&await import(r.htmlUrl),i=window.document.createElement(r.htmlTag)),i.view=r,i.region=t,i.viewKey=e,i};let _i=class{constructor(t,e,i,s,n){this.name=t,this.regionManager=e,this.host=i,this.adapter=s,this.definition=n,this.views={},this.activeViews=[],this.components=new WeakMap,this.host.uxlRegion=this}async addView(t,e){return yi(e),x(typeof this.getView(t)>"u",`Already exists a view with key ${t}`),this.views[t]=e,await this.adapter.viewAdded(e),this}async removeView(t){await this.deactivate(t),this.remove(t),delete this.views[t]}async removeViews(){Object.keys(this.views).forEach(t=>this.removeView(t))}get context(){return this._context}set context(t){this._context=t,Object.keys(this.views).forEach(e=>{const i=this.views[e];if(this.components.has(i)){const s=this.components.get(i);s&&(s.regionContext=this._context)}})}async activate(t){let e=t;if(typeof t=="string"?(e=this.getView(t),x(e,`Region does not contain a view with key ${t}`)):x(Object.keys(this.views).some(i=>typeof this.views[i]<"u"),"Region does not contain this view"),!this.activeViews.some(i=>i===e)){if(!this.components.has(e)){const s=await $i(e,this,typeof t=="string"?t:this.getKey(e));s.regionContext=this.context,this.components.set(e,s)}const i=this.components.get(e);this.activeViews.push(e),i.active=!0,await this.adapter.activateView(i)}return this}viewRemovedFromDom(t){this.components.delete(t)}remove(t){const e=typeof t=="string"?this.getView(t):t,i=this.components.get(e);i&&this.adapter.removeView(i)}async deactivate(t){const e=typeof t=="string"?this.getView(t):t,i=this.activeViews.indexOf(e);i!==-1&&this.activeViews.splice(i,1);const s=this.components.get(e);s&&(s.active=!1,await this.adapter.deactivateView(s))}getView(t){return this.views[t]}get currentViews(){return Object.keys(this.views).map(t=>this.views[t])}get currentActiveViews(){return[...this.activeViews]}getKey(t){return Object.keys(this.views).find(e=>this.views[e]==t)}containsView(t){return typeof t=="string"?this.getView(t)!==void 0:Object.keys(this.views).some(e=>this.views[e]==t)}isViewActive(t){if(this.containsView(t)){const e=typeof t=="string"?this.getView(t):t;return this.activeViews.indexOf(e)!==-1}throw new Error(`region ${this.name} doest not contain this view`)}async toggleViewActive(t){if(this.containsView(t))return this.isViewActive(t)?(await this.deactivate(t),!1):(await this.activate(t),!0);throw new Error(`region ${this.name} doest not contain this view`)}};const It="default",xe="dynamic";let bi=class{constructor(){this.adapterRegistry=new Map,this.adapterRegistry.set(xe,[])}registerAdapterFactory(t,e){this.adapterRegistry.set(t,e)}get dynamicFactories(){return this.adapterRegistry.get(xe)}registerDynamicAdapterFactory(t){this.dynamicFactories.indexOf(t)===-1&&this.dynamicFactories.push(t)}getDynamicFactory(t){return this.dynamicFactories.reduce((e,i)=>e||i(t),null)}getAdapterFactory(t){return this.getDynamicFactory(t)||(this.adapterRegistry.has(t.constructor)?this.adapterRegistry.get(t.constructor):this.adapterRegistry.has(t.localName)?this.adapterRegistry.get(t.localName):this.adapterRegistry.has(t.tagName)?this.adapterRegistry.get(t.tagName):this.adapterRegistry.has(It)?this.adapterRegistry.get(It):null)}registerDefaultAdapterFactory(t){this.adapterRegistry.set(It,t)}};const pr=new bi,Wt="__uxl_regions__",xt=r=>(t,e)=>{t.constructor[Wt]={...t.constructor[Wt],[e]:r}},wi=(r,t,e)=>{const i=e.getAdapterFactory(t);return x(typeof i=="function","No region adapter factory found for the host"),i(r,t)},Ai=async(r,t,e,i)=>{await t._updatePromise;const s=t.shadowRoot.querySelector(`#${r.targetId}`);if(s){const n=r.adapterFactory?r.adapterFactory(r,s):wi(r,s,i);x(n,"No region adapter found for the host");const o=r.scoped?e.createRegionManager():e,a=new _i(r.name,o,s,n,r);return o.add(r.name,a),a}else console.warn(`region host with id ${r.targetId} not found for region named ${r.name}`)};/*
|
|
18
|
-
* @license
|
|
19
|
-
* BSD License
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) 2020, UXLand
|
|
22
|
-
*
|
|
23
|
-
* All rights reserved.
|
|
24
|
-
* Redistribution and use in source and binary forms, with or without
|
|
25
|
-
* modification, are permitted provided that the following conditions are met:
|
|
26
|
-
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
27
|
-
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
28
|
-
* 3. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by the <copyright holder>.
|
|
29
|
-
* 4. Neither the name of the <copyright holder> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
30
|
-
*
|
|
31
|
-
* THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
32
|
-
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
33
|
-
*/let Ei=class{constructor(t){this._ownQueue=[],this.isProcessing=!1,this.executor=t}enqueueItem(...t){this._ownQueue.push([...t]),this.tryProcessQueue()}async tryProcessQueue(){if(!this.isProcessing&&this._ownQueue.length){this.isProcessing=!0;const t=this._ownQueue.pop();await this.executor.apply(void 0,[...t]),this.isProcessing=!1,this.tryProcessQueue()}}};const fr=new WeakMap;function Si(r,t){let e=t;for(;e;){if(fr.get(e)===r)return!0;e=Object.getPrototypeOf(e)}return!1}function ne(r){return t=>{if(Si(r,t))return t;const e=r(t);return fr.set(e,r),e}}/**
|
|
34
|
-
* @license
|
|
35
|
-
* Copyright 2019 Google LLC
|
|
36
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
37
|
-
*/const gt=window,oe=gt.ShadowRoot&&(gt.ShadyCSS===void 0||gt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,gr=Symbol(),Re=new WeakMap;let Ci=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==gr)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(oe&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=Re.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&Re.set(e,t))}return t}toString(){return this.cssText}};const xi=r=>new Ci(typeof r=="string"?r:r+"",void 0,gr),Ri=(r,t)=>{oe?r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const i=document.createElement("style"),s=gt.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=e.cssText,r.appendChild(i)})},Pe=oe?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return xi(e)})(r):r;/**
|
|
38
|
-
* @license
|
|
39
|
-
* Copyright 2017 Google LLC
|
|
40
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
41
|
-
*/var Nt;const bt=window,Te=bt.trustedTypes,Pi=Te?Te.emptyScript:"",Oe=bt.reactiveElementPolyfillSupport,Gt={toAttribute(r,t){switch(t){case Boolean:r=r?Pi:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},ae=(r,t)=>t!==r&&(t==t||r==r),kt={attribute:!0,type:String,converter:Gt,reflect:!1,hasChanged:ae},Kt="finalized";let D=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,i)=>{const s=this._$Ep(i,e);s!==void 0&&(this._$Ev.set(s,i),t.push(s))}),t}static createProperty(t,e=kt){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i=typeof t=="symbol"?Symbol():"__"+t,s=this.getPropertyDescriptor(t,i,e);s!==void 0&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(s){const n=this[t];this[e]=s,this.requestUpdate(t,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||kt}static finalize(){if(this.hasOwnProperty(Kt))return!1;this[Kt]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,i=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const s of i)this.createProperty(s,e[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const s of i)e.unshift(Pe(s))}else t!==void 0&&e.push(Pe(t));return e}static _$Ep(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,i;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((i=t.hostConnected)===null||i===void 0||i.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;const e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return Ri(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostConnected)===null||i===void 0?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostDisconnected)===null||i===void 0?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=kt){var s;const n=this.constructor._$Ep(t,i);if(n!==void 0&&i.reflect===!0){const o=(((s=i.converter)===null||s===void 0?void 0:s.toAttribute)!==void 0?i.converter:Gt).toAttribute(e,i.type);this._$El=t,o==null?this.removeAttribute(n):this.setAttribute(n,o),this._$El=null}}_$AK(t,e){var i;const s=this.constructor,n=s._$Ev.get(t);if(n!==void 0&&this._$El!==n){const o=s.getPropertyOptions(n),a=typeof o.converter=="function"?{fromAttribute:o.converter}:((i=o.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?o.converter:Gt;this._$El=n,this[n]=a.fromAttribute(e,o.type),this._$El=null}}requestUpdate(t,e,i){let s=!0;t!==void 0&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||ae)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,i))):s=!1),!this.isUpdatePending&&s&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((s,n)=>this[n]=s),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),(t=this._$ES)===null||t===void 0||t.forEach(s=>{var n;return(n=s.hostUpdate)===null||n===void 0?void 0:n.call(s)}),this.update(i)):this._$Ek()}catch(s){throw e=!1,this._$Ek(),s}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(i=>{var s;return(s=i.hostUpdated)===null||s===void 0?void 0:s.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,i)=>this._$EO(i,this[i],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}};D[Kt]=!0,D.elementProperties=new Map,D.elementStyles=[],D.shadowRootOptions={mode:"open"},Oe==null||Oe({ReactiveElement:D}),((Nt=bt.reactiveElementVersions)!==null&&Nt!==void 0?Nt:bt.reactiveElementVersions=[]).push("1.6.3");/**
|
|
1
|
+
import { ShellLitRegionHost as P } from "@uxland/fim-core";
|
|
2
|
+
import { region as u } from "@uxland/regions";
|
|
3
|
+
import { LitElement as U, html as x, css as C } from "lit";
|
|
4
|
+
import "@uxland/primary-ui-components";
|
|
5
|
+
/**
|
|
42
6
|
* @license
|
|
43
7
|
* Copyright 2017 Google LLC
|
|
44
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
45
|
-
*/
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
* @license
|
|
53
|
-
* Copyright 2017 Google LLC
|
|
54
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
55
|
-
*/const ns=(r,t)=>t.kind==="method"&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(e){e.createProperty(t.key,r)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){typeof t.initializer=="function"&&(this[t.key]=t.initializer.call(this))},finisher(e){e.createProperty(t.key,r)}},os=(r,t,e)=>{t.constructor.createProperty(e,r)};function De(r){return(t,e)=>e!==void 0?os(r,t,e):ns(r,t)}/**
|
|
56
|
-
* @license
|
|
57
|
-
* Copyright 2021 Google LLC
|
|
58
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
59
|
-
*/var Lt;((Lt=window.HTMLSlotElement)===null||Lt===void 0?void 0:Lt.prototype.assignedElements)!=null;var as=Object.defineProperty,ze=(r,t,e,i)=>{for(var s=void 0,n=r.length-1,o;n>=0;n--)(o=r[n])&&(s=o(t,e,s)||s);return s&&as(t,e,s),s};const cs=ne(r=>{class t extends Bi(r){activeChanged(i,s){}regionContextChanged(i,s){}}return ze([De({type:Boolean})],t.prototype,"active"),ze([De()],t.prototype,"regionContext"),t});function ls(r){return cs(r)}const hs=r=>ss(r,pr);class us{constructor(){this.viewsByRegion={},this.regions={}}registerRegion(t,e){this.regions[t]=[...this.regions[t]||[],e]}unregisterRegion(t,e){this.regions[t]=this.getRegionsByName(t).filter(i=>i!==e)}registerView(t,e,i){this.viewsByRegion[t]=[...this.viewsByRegion[t]||[],{key:e,view:i}]}getRegisteredViews(t){return this.viewsByRegion[t]||[]}getRegionsByName(t){return this.regions[t]||[]}destroy(){this.viewsByRegion={},this.regions={}}clear(){this.viewsByRegion={}}}class he{constructor(t){this._viewRegistry=t,this._regions={}}add(t,e){if(this.getRegion(t))throw new Error("A region with the same name already exists");return this._regions[t]=e,this._viewRegistry.registerRegion(t,e),this}getRegion(t){return this._regions[t]}remove(t){let e,i="";return typeof t=="string"?(e=this.getRegion(t),i=t,delete this._regions[t]):typeof t=="object"&&(i=Object.keys(this._regions).find(s=>this._regions[s]===t),i&&(e=t,delete this._regions[i])),i&&e&&this._viewRegistry.unregisterRegion(i,e),e}addViewToRegion(t,e,i){const s=this.getRegion(t);if(!s)throw new Error(`Couldn't find a region with name: ${t}`);return s.addView(e,i),this}registerViewWithRegion(t,e,i){return this._viewRegistry.registerView(t,e,i),this._viewRegistry.getRegionsByName(t).forEach(s=>s.addView(e,i)),this}getRegisteredViews(t){return this._viewRegistry.getRegisteredViews(t)}clear(){return Object.values(this._viewRegistry.regions).forEach(t=>{t!=null&&t.length&&Object.keys(t[0].views).forEach(e=>{var i;return(i=t[0])==null?void 0:i.removeView(e)})}),this}destroy(){return this.clear(),Object.values(this._viewRegistry.regions).forEach(t=>this.remove(t[0])),this._regions={},this}createRegionManager(){return new he(this._viewRegistry)}}class ds extends he{constructor(t){const e=new us;super(e),this._name=t}clear(){return super.clear(),this._viewRegistry.clear(),this}destroy(){return super.destroy(),this._viewRegistry.destroy(),this}}const ps=r=>new ds(r),fs=ps("SHELL-LIT"),gs=hs(fs);/**
|
|
9
|
+
*/
|
|
10
|
+
const O = (r) => (t, e) => {
|
|
11
|
+
e !== void 0 ? e.addInitializer(() => {
|
|
12
|
+
customElements.define(r, t);
|
|
13
|
+
}) : customElements.define(r, t);
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
60
16
|
* @license
|
|
61
17
|
* Copyright 2019 Google LLC
|
|
62
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
63
|
-
*/
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
* Copyright 2022 Google LLC
|
|
100
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
101
|
-
*/class Ls extends E{render(){return A`<slot></slot>`}connectedCallback(){if(super.connectedCallback(),this.getAttribute("aria-hidden")==="false"){this.removeAttribute("aria-hidden");return}this.setAttribute("aria-hidden","true")}}/**
|
|
102
|
-
* @license
|
|
103
|
-
* Copyright 2024 Google LLC
|
|
104
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
105
|
-
*/const Vs=L`:host{font-size:var(--md-icon-size, 24px);width:var(--md-icon-size, 24px);height:var(--md-icon-size, 24px);color:inherit;font-variation-settings:inherit;font-weight:400;font-family:var(--md-icon-font, Material Symbols Outlined);display:inline-flex;font-style:normal;place-items:center;place-content:center;line-height:1;overflow:hidden;letter-spacing:normal;text-transform:none;user-select:none;white-space:nowrap;word-wrap:normal;flex-shrink:0;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}::slotted(svg){fill:currentColor}::slotted(*){height:100%;width:100%}
|
|
106
|
-
`;/**
|
|
107
|
-
* @license
|
|
108
|
-
* Copyright 2022 Google LLC
|
|
109
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
110
|
-
*/let Zt=class extends Ls{};Zt.styles=[Vs];Zt=v([Y("md-icon")],Zt);/**
|
|
111
|
-
* @license
|
|
112
|
-
* Copyright 2023 Google LLC
|
|
113
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
114
|
-
*/const Pr=Symbol("attachableController");let yt;yt=new MutationObserver(r=>{var t;for(const e of r)(t=e.target[Pr])==null||t.hostConnected()});class Tr{get htmlFor(){return this.host.getAttribute("for")}set htmlFor(t){t===null?this.host.removeAttribute("for"):this.host.setAttribute("for",t)}get control(){return this.host.hasAttribute("for")?!this.htmlFor||!this.host.isConnected?null:this.host.getRootNode().querySelector(`#${this.htmlFor}`):this.currentControl||this.host.parentElement}set control(t){t?this.attach(t):this.detach()}constructor(t,e){this.host=t,this.onControlChange=e,this.currentControl=null,t.addController(this),t[Pr]=this,yt==null||yt.observe(t,{attributeFilter:["for"]})}attach(t){t!==this.currentControl&&(this.setCurrentControl(t),this.host.removeAttribute("for"))}detach(){this.setCurrentControl(null),this.host.setAttribute("for","")}hostConnected(){this.setCurrentControl(this.control)}hostDisconnected(){this.setCurrentControl(null)}setCurrentControl(t){this.onControlChange(this.currentControl,t),this.currentControl=t}}/**
|
|
115
|
-
* @license
|
|
116
|
-
* Copyright 2021 Google LLC
|
|
117
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
118
|
-
*/const Ds=["focusin","focusout","pointerdown"];class ge extends E{constructor(){super(...arguments),this.visible=!1,this.inward=!1,this.attachableController=new Tr(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(t){this.attachableController.htmlFor=t}get control(){return this.attachableController.control}set control(t){this.attachableController.control=t}attach(t){this.attachableController.attach(t)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}handleEvent(t){var e;if(!t[Je]){switch(t.type){default:return;case"focusin":this.visible=((e=this.control)==null?void 0:e.matches(":focus-visible"))??!1;break;case"focusout":case"pointerdown":this.visible=!1;break}t[Je]=!0}}onControlChange(t,e){for(const i of Ds)t==null||t.removeEventListener(i,this),e==null||e.addEventListener(i,this)}update(t){t.has("visible")&&this.dispatchEvent(new Event("visibility-changed")),super.update(t)}}v([w({type:Boolean,reflect:!0})],ge.prototype,"visible",void 0);v([w({type:Boolean,reflect:!0})],ge.prototype,"inward",void 0);const Je=Symbol("handledByFocusRing");/**
|
|
119
|
-
* @license
|
|
120
|
-
* Copyright 2024 Google LLC
|
|
121
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
122
|
-
*/const zs=L`:host{animation-delay:0s,calc(var(--md-focus-ring-duration, 600ms)*.25);animation-duration:calc(var(--md-focus-ring-duration, 600ms)*.25),calc(var(--md-focus-ring-duration, 600ms)*.75);animation-timing-function:cubic-bezier(0.2, 0, 0, 1);box-sizing:border-box;color:var(--md-focus-ring-color, var(--md-sys-color-secondary, #625b71));display:none;pointer-events:none;position:absolute}:host([visible]){display:flex}:host(:not([inward])){animation-name:outward-grow,outward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));inset:calc(-1*var(--md-focus-ring-outward-offset, 2px));outline:var(--md-focus-ring-width, 3px) solid currentColor}:host([inward]){animation-name:inward-grow,inward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border:var(--md-focus-ring-width, 3px) solid currentColor;inset:var(--md-focus-ring-inward-offset, 0px)}@keyframes outward-grow{from{outline-width:0}to{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes outward-shrink{from{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-grow{from{border-width:0}to{border-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-shrink{from{border-width:var(--md-focus-ring-active-width, 8px)}}@media(prefers-reduced-motion){:host{animation:none}}
|
|
123
|
-
`;/**
|
|
124
|
-
* @license
|
|
125
|
-
* Copyright 2021 Google LLC
|
|
126
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
127
|
-
*/let Qt=class extends ge{};Qt.styles=[zs];Qt=v([Y("md-focus-ring")],Qt);/**
|
|
19
|
+
*/
|
|
20
|
+
const p = globalThis, b = p.ShadowRoot && (p.ShadyCSS === void 0 || p.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, v = Symbol(), _ = /* @__PURE__ */ new WeakMap();
|
|
21
|
+
let A = class {
|
|
22
|
+
constructor(t, e, i) {
|
|
23
|
+
if (this._$cssResult$ = !0, i !== v)
|
|
24
|
+
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
25
|
+
this.cssText = t, this.t = e;
|
|
26
|
+
}
|
|
27
|
+
get styleSheet() {
|
|
28
|
+
let t = this.o;
|
|
29
|
+
const e = this.t;
|
|
30
|
+
if (b && t === void 0) {
|
|
31
|
+
const i = e !== void 0 && e.length === 1;
|
|
32
|
+
i && (t = _.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && _.set(e, t));
|
|
33
|
+
}
|
|
34
|
+
return t;
|
|
35
|
+
}
|
|
36
|
+
toString() {
|
|
37
|
+
return this.cssText;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
const R = (r) => new A(typeof r == "string" ? r : r + "", void 0, v), z = (r, t) => {
|
|
41
|
+
if (b)
|
|
42
|
+
r.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
43
|
+
else
|
|
44
|
+
for (const e of t) {
|
|
45
|
+
const i = document.createElement("style"), s = p.litNonce;
|
|
46
|
+
s !== void 0 && i.setAttribute("nonce", s), i.textContent = e.cssText, r.appendChild(i);
|
|
47
|
+
}
|
|
48
|
+
}, $ = b ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
|
|
49
|
+
let e = "";
|
|
50
|
+
for (const i of t.cssRules)
|
|
51
|
+
e += i.cssText;
|
|
52
|
+
return R(e);
|
|
53
|
+
})(r) : r;
|
|
54
|
+
/**
|
|
128
55
|
* @license
|
|
129
56
|
* Copyright 2017 Google LLC
|
|
130
57
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
131
|
-
*/
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
58
|
+
*/
|
|
59
|
+
const { is: T, defineProperty: M, getOwnPropertyDescriptor: j, getOwnPropertyNames: k, getOwnPropertySymbols: L, getPrototypeOf: D } = Object, a = globalThis, E = a.trustedTypes, I = E ? E.emptyScript : "", m = a.reactiveElementPolyfillSupport, l = (r, t) => r, y = { toAttribute(r, t) {
|
|
60
|
+
switch (t) {
|
|
61
|
+
case Boolean:
|
|
62
|
+
r = r ? I : null;
|
|
63
|
+
break;
|
|
64
|
+
case Object:
|
|
65
|
+
case Array:
|
|
66
|
+
r = r == null ? r : JSON.stringify(r);
|
|
67
|
+
}
|
|
68
|
+
return r;
|
|
69
|
+
}, fromAttribute(r, t) {
|
|
70
|
+
let e = r;
|
|
71
|
+
switch (t) {
|
|
72
|
+
case Boolean:
|
|
73
|
+
e = r !== null;
|
|
74
|
+
break;
|
|
75
|
+
case Number:
|
|
76
|
+
e = r === null ? null : Number(r);
|
|
77
|
+
break;
|
|
78
|
+
case Object:
|
|
79
|
+
case Array:
|
|
80
|
+
try {
|
|
81
|
+
e = JSON.parse(r);
|
|
82
|
+
} catch {
|
|
83
|
+
e = null;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return e;
|
|
87
|
+
} }, w = (r, t) => !T(r, t), S = { attribute: !0, type: String, converter: y, reflect: !1, hasChanged: w };
|
|
88
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), a.litPropertyMetadata ?? (a.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
89
|
+
class c extends HTMLElement {
|
|
90
|
+
static addInitializer(t) {
|
|
91
|
+
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
|
92
|
+
}
|
|
93
|
+
static get observedAttributes() {
|
|
94
|
+
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
95
|
+
}
|
|
96
|
+
static createProperty(t, e = S) {
|
|
97
|
+
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
98
|
+
const i = Symbol(), s = this.getPropertyDescriptor(t, i, e);
|
|
99
|
+
s !== void 0 && M(this.prototype, t, s);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
static getPropertyDescriptor(t, e, i) {
|
|
103
|
+
const { get: s, set: o } = j(this.prototype, t) ?? { get() {
|
|
104
|
+
return this[e];
|
|
105
|
+
}, set(n) {
|
|
106
|
+
this[e] = n;
|
|
107
|
+
} };
|
|
108
|
+
return { get() {
|
|
109
|
+
return s == null ? void 0 : s.call(this);
|
|
110
|
+
}, set(n) {
|
|
111
|
+
const g = s == null ? void 0 : s.call(this);
|
|
112
|
+
o.call(this, n), this.requestUpdate(t, g, i);
|
|
113
|
+
}, configurable: !0, enumerable: !0 };
|
|
114
|
+
}
|
|
115
|
+
static getPropertyOptions(t) {
|
|
116
|
+
return this.elementProperties.get(t) ?? S;
|
|
117
|
+
}
|
|
118
|
+
static _$Ei() {
|
|
119
|
+
if (this.hasOwnProperty(l("elementProperties")))
|
|
120
|
+
return;
|
|
121
|
+
const t = D(this);
|
|
122
|
+
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
123
|
+
}
|
|
124
|
+
static finalize() {
|
|
125
|
+
if (this.hasOwnProperty(l("finalized")))
|
|
126
|
+
return;
|
|
127
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(l("properties"))) {
|
|
128
|
+
const e = this.properties, i = [...k(e), ...L(e)];
|
|
129
|
+
for (const s of i)
|
|
130
|
+
this.createProperty(s, e[s]);
|
|
131
|
+
}
|
|
132
|
+
const t = this[Symbol.metadata];
|
|
133
|
+
if (t !== null) {
|
|
134
|
+
const e = litPropertyMetadata.get(t);
|
|
135
|
+
if (e !== void 0)
|
|
136
|
+
for (const [i, s] of e)
|
|
137
|
+
this.elementProperties.set(i, s);
|
|
138
|
+
}
|
|
139
|
+
this._$Eh = /* @__PURE__ */ new Map();
|
|
140
|
+
for (const [e, i] of this.elementProperties) {
|
|
141
|
+
const s = this._$Eu(e, i);
|
|
142
|
+
s !== void 0 && this._$Eh.set(s, e);
|
|
143
|
+
}
|
|
144
|
+
this.elementStyles = this.finalizeStyles(this.styles);
|
|
145
|
+
}
|
|
146
|
+
static finalizeStyles(t) {
|
|
147
|
+
const e = [];
|
|
148
|
+
if (Array.isArray(t)) {
|
|
149
|
+
const i = new Set(t.flat(1 / 0).reverse());
|
|
150
|
+
for (const s of i)
|
|
151
|
+
e.unshift($(s));
|
|
152
|
+
} else
|
|
153
|
+
t !== void 0 && e.push($(t));
|
|
154
|
+
return e;
|
|
155
|
+
}
|
|
156
|
+
static _$Eu(t, e) {
|
|
157
|
+
const i = e.attribute;
|
|
158
|
+
return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
|
|
159
|
+
}
|
|
160
|
+
constructor() {
|
|
161
|
+
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
162
|
+
}
|
|
163
|
+
_$Ev() {
|
|
164
|
+
var t;
|
|
165
|
+
this._$ES = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (t = this.constructor.l) == null || t.forEach((e) => e(this));
|
|
166
|
+
}
|
|
167
|
+
addController(t) {
|
|
168
|
+
var e;
|
|
169
|
+
(this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(t), this.renderRoot !== void 0 && this.isConnected && ((e = t.hostConnected) == null || e.call(t));
|
|
170
|
+
}
|
|
171
|
+
removeController(t) {
|
|
172
|
+
var e;
|
|
173
|
+
(e = this._$EO) == null || e.delete(t);
|
|
174
|
+
}
|
|
175
|
+
_$E_() {
|
|
176
|
+
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
|
|
177
|
+
for (const i of e.keys())
|
|
178
|
+
this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
|
|
179
|
+
t.size > 0 && (this._$Ep = t);
|
|
180
|
+
}
|
|
181
|
+
createRenderRoot() {
|
|
182
|
+
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
183
|
+
return z(t, this.constructor.elementStyles), t;
|
|
184
|
+
}
|
|
185
|
+
connectedCallback() {
|
|
186
|
+
var t;
|
|
187
|
+
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach((e) => {
|
|
188
|
+
var i;
|
|
189
|
+
return (i = e.hostConnected) == null ? void 0 : i.call(e);
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
enableUpdating(t) {
|
|
193
|
+
}
|
|
194
|
+
disconnectedCallback() {
|
|
195
|
+
var t;
|
|
196
|
+
(t = this._$EO) == null || t.forEach((e) => {
|
|
197
|
+
var i;
|
|
198
|
+
return (i = e.hostDisconnected) == null ? void 0 : i.call(e);
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
attributeChangedCallback(t, e, i) {
|
|
202
|
+
this._$AK(t, i);
|
|
203
|
+
}
|
|
204
|
+
_$EC(t, e) {
|
|
205
|
+
var o;
|
|
206
|
+
const i = this.constructor.elementProperties.get(t), s = this.constructor._$Eu(t, i);
|
|
207
|
+
if (s !== void 0 && i.reflect === !0) {
|
|
208
|
+
const n = (((o = i.converter) == null ? void 0 : o.toAttribute) !== void 0 ? i.converter : y).toAttribute(e, i.type);
|
|
209
|
+
this._$Em = t, n == null ? this.removeAttribute(s) : this.setAttribute(s, n), this._$Em = null;
|
|
232
210
|
}
|
|
233
|
-
|
|
211
|
+
}
|
|
212
|
+
_$AK(t, e) {
|
|
213
|
+
var o;
|
|
214
|
+
const i = this.constructor, s = i._$Eh.get(t);
|
|
215
|
+
if (s !== void 0 && this._$Em !== s) {
|
|
216
|
+
const n = i.getPropertyOptions(s), g = typeof n.converter == "function" ? { fromAttribute: n.converter } : ((o = n.converter) == null ? void 0 : o.fromAttribute) !== void 0 ? n.converter : y;
|
|
217
|
+
this._$Em = s, this[s] = g.fromAttribute(e, n.type), this._$Em = null;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
requestUpdate(t, e, i) {
|
|
221
|
+
if (t !== void 0) {
|
|
222
|
+
if (i ?? (i = this.constructor.getPropertyOptions(t)), !(i.hasChanged ?? w)(this[t], e))
|
|
223
|
+
return;
|
|
224
|
+
this.P(t, e, i);
|
|
225
|
+
}
|
|
226
|
+
this.isUpdatePending === !1 && (this._$ES = this._$ET());
|
|
227
|
+
}
|
|
228
|
+
P(t, e, i) {
|
|
229
|
+
this._$AL.has(t) || this._$AL.set(t, e), i.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
|
|
230
|
+
}
|
|
231
|
+
async _$ET() {
|
|
232
|
+
this.isUpdatePending = !0;
|
|
233
|
+
try {
|
|
234
|
+
await this._$ES;
|
|
235
|
+
} catch (e) {
|
|
236
|
+
Promise.reject(e);
|
|
237
|
+
}
|
|
238
|
+
const t = this.scheduleUpdate();
|
|
239
|
+
return t != null && await t, !this.isUpdatePending;
|
|
240
|
+
}
|
|
241
|
+
scheduleUpdate() {
|
|
242
|
+
return this.performUpdate();
|
|
243
|
+
}
|
|
244
|
+
performUpdate() {
|
|
245
|
+
var i;
|
|
246
|
+
if (!this.isUpdatePending)
|
|
247
|
+
return;
|
|
248
|
+
if (!this.hasUpdated) {
|
|
249
|
+
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
|
|
250
|
+
for (const [o, n] of this._$Ep)
|
|
251
|
+
this[o] = n;
|
|
252
|
+
this._$Ep = void 0;
|
|
253
|
+
}
|
|
254
|
+
const s = this.constructor.elementProperties;
|
|
255
|
+
if (s.size > 0)
|
|
256
|
+
for (const [o, n] of s)
|
|
257
|
+
n.wrapped !== !0 || this._$AL.has(o) || this[o] === void 0 || this.P(o, this[o], n);
|
|
258
|
+
}
|
|
259
|
+
let t = !1;
|
|
260
|
+
const e = this._$AL;
|
|
261
|
+
try {
|
|
262
|
+
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (i = this._$EO) == null || i.forEach((s) => {
|
|
263
|
+
var o;
|
|
264
|
+
return (o = s.hostUpdate) == null ? void 0 : o.call(s);
|
|
265
|
+
}), this.update(e)) : this._$EU();
|
|
266
|
+
} catch (s) {
|
|
267
|
+
throw t = !1, this._$EU(), s;
|
|
268
|
+
}
|
|
269
|
+
t && this._$AE(e);
|
|
270
|
+
}
|
|
271
|
+
willUpdate(t) {
|
|
272
|
+
}
|
|
273
|
+
_$AE(t) {
|
|
274
|
+
var e;
|
|
275
|
+
(e = this._$EO) == null || e.forEach((i) => {
|
|
276
|
+
var s;
|
|
277
|
+
return (s = i.hostUpdated) == null ? void 0 : s.call(i);
|
|
278
|
+
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
279
|
+
}
|
|
280
|
+
_$EU() {
|
|
281
|
+
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
282
|
+
}
|
|
283
|
+
get updateComplete() {
|
|
284
|
+
return this.getUpdateComplete();
|
|
285
|
+
}
|
|
286
|
+
getUpdateComplete() {
|
|
287
|
+
return this._$ES;
|
|
288
|
+
}
|
|
289
|
+
shouldUpdate(t) {
|
|
290
|
+
return !0;
|
|
291
|
+
}
|
|
292
|
+
update(t) {
|
|
293
|
+
this._$Ej && (this._$Ej = this._$Ej.forEach((e) => this._$EC(e, this[e]))), this._$EU();
|
|
294
|
+
}
|
|
295
|
+
updated(t) {
|
|
296
|
+
}
|
|
297
|
+
firstUpdated(t) {
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
c.elementStyles = [], c.shadowRootOptions = { mode: "open" }, c[l("elementProperties")] = /* @__PURE__ */ new Map(), c[l("finalized")] = /* @__PURE__ */ new Map(), m == null || m({ ReactiveElement: c }), (a.reactiveElementVersions ?? (a.reactiveElementVersions = [])).push("2.0.4");
|
|
301
|
+
const f = {
|
|
302
|
+
header: "header-region",
|
|
303
|
+
actionsToolbar: "actions-toolbar-region",
|
|
304
|
+
main: "main-region",
|
|
305
|
+
sidebar: "asidebar-region",
|
|
306
|
+
footer: "footer-region"
|
|
307
|
+
};
|
|
308
|
+
var N = Object.defineProperty, q = Object.getOwnPropertyDescriptor, d = (r, t, e, i) => {
|
|
309
|
+
for (var s = i > 1 ? void 0 : i ? q(t, e) : t, o = r.length - 1, n; o >= 0; o--)
|
|
310
|
+
(n = r[o]) && (s = (i ? n(t, e, s) : n(s)) || s);
|
|
311
|
+
return i && s && N(t, e, s), s;
|
|
312
|
+
};
|
|
313
|
+
let h = class extends P(U) {
|
|
314
|
+
render() {
|
|
315
|
+
return x` <div class="container">
|
|
234
316
|
<div class="header">
|
|
235
317
|
<div id="header-region-container"></div>
|
|
236
318
|
<div id="actions-toolbar-region-container"></div>
|
|
@@ -240,7 +322,10 @@
|
|
|
240
322
|
<div id="sidebar-region-region-container"></div>
|
|
241
323
|
<div id="main-region-region-container"></div>
|
|
242
324
|
</div>
|
|
243
|
-
</div
|
|
325
|
+
</div>`;
|
|
326
|
+
}
|
|
327
|
+
};
|
|
328
|
+
h.styles = C`
|
|
244
329
|
:host {
|
|
245
330
|
width: 100%;
|
|
246
331
|
overflow: hidden;
|
|
@@ -279,4 +364,28 @@
|
|
|
279
364
|
box-shadow: rgba(0, 0, 0, 0.12) 4px -1px 3px, rgba(0, 0, 0, 0.24) 0px 1px 2px;
|
|
280
365
|
}
|
|
281
366
|
}
|
|
282
|
-
`;
|
|
367
|
+
`;
|
|
368
|
+
d([
|
|
369
|
+
u({ targetId: "header-region-container", name: f.header })
|
|
370
|
+
], h.prototype, "headerRegion", 2);
|
|
371
|
+
d([
|
|
372
|
+
u({ targetId: "actions-toolbar-region-container", name: f.actionsToolbar })
|
|
373
|
+
], h.prototype, "actionsToolbarRegion", 2);
|
|
374
|
+
d([
|
|
375
|
+
u({ targetId: "sidebar-region-region-container", name: f.sidebar })
|
|
376
|
+
], h.prototype, "sidebarRegion", 2);
|
|
377
|
+
d([
|
|
378
|
+
u({ targetId: "main-region-region-container", name: f.main })
|
|
379
|
+
], h.prototype, "mainRegion", 2);
|
|
380
|
+
h = d([
|
|
381
|
+
O("primary-shell")
|
|
382
|
+
], h);
|
|
383
|
+
const V = (r) => {
|
|
384
|
+
const t = new h();
|
|
385
|
+
r.appendChild(t);
|
|
386
|
+
};
|
|
387
|
+
export {
|
|
388
|
+
V as initializeShell,
|
|
389
|
+
f as regions
|
|
390
|
+
};
|
|
391
|
+
//# sourceMappingURL=index.js.map
|