UNPKG

mfe-react

Version:

React Micro-Frontend Component Wrapper

1 lines 13.7 kB
"use strict";(self.webpackChunk_mfe_react_mfe=self.webpackChunk_mfe_react_mfe||[]).push([[662],{63:(e,t,n)=>{n.d(t,{F3:()=>y,LM:()=>D,so:()=>b,vH:()=>o});const o={};const r=(Symbol("solid-proxy"),Symbol("solid-track"),Symbol("solid-dev-component"),{equals:(e,t)=>e===t});let s=q;const l={},i={owned:null,cleanups:null,context:null,owner:null},[a,u]=v(!1);var c=null;let f=null,d=null,p=null,h=null,g=null,m=0;function b(e,t){const n=d,o=c,r=0===e.length?i:{owned:null,cleanups:null,context:null,owner:t||o};c=r,d=null;try{return M((()=>e((()=>B(r)))),!0)}finally{d=n,c=o}}function v(e,t){t=t?Object.assign({},r,t):r;const n={value:e,observers:null,observerSlots:null,pending:l,comparator:t.equals||void 0};return[A.bind(n),e=>("function"==typeof e&&(e=f&&f.running&&f.sources.has(n)?e(n.pending!==l?n.pending:n.tValue):e(n.pending!==l?n.pending:n.value)),C(n,e))]}function y(e,t,n){const o=T(e,t,!1,1);O(o)}function w(e,t,n){n=n?Object.assign({},r,n):r;const o=T(e,t,!0,0);return o.pending=l,o.observers=null,o.observerSlots=null,o.comparator=n.equals||void 0,O(o),A.bind(o)}function S(e){if(p)return e();let t;const n=p=[];try{t=e()}finally{p=null}return M((()=>{for(let e=0;e<n.length;e+=1){const t=n[e];if(t.pending!==l){const e=t.pending;t.pending=l,C(t,e)}}}),!1),t}function x(e){let t,n=d;return d=null,t=e(),d=n,t}function k(e){const t=w(e);return w((()=>V(t())))}function A(){const e=f&&f.running;if(this.sources&&(!e&&this.state||e&&this.tState)){const t=h;h=null,!e&&1===this.state||e&&1===this.tState?O(this):E(this),h=t}if(d){const e=this.observers?this.observers.length:0;d.sources?(d.sources.push(this),d.sourceSlots.push(e)):(d.sources=[this],d.sourceSlots=[e]),this.observers?(this.observers.push(d),this.observerSlots.push(d.sources.length-1)):(this.observers=[d],this.observerSlots=[d.sources.length-1])}return e&&f.sources.has(this)?this.tValue:this.value}function C(e,t,n){if(p)return e.pending===l&&p.push(e),e.pending=t,t;if(e.comparator)if(f&&f.running&&f.sources.has(e)){if(e.comparator(e.tValue,t))return t}else if(e.comparator(e.value,t))return t;let o=!1;return f?(o=f.running,(o||!n&&f.sources.has(e))&&(f.sources.add(e),e.tValue=t),o||(e.value=t)):e.value=t,e.observers&&e.observers.length&&M((()=>{for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];o&&f.disposed.has(n)||((o&&!n.tState||!o&&!n.state)&&(n.pure?h.push(n):g.push(n),n.observers&&L(n)),o?n.tState=1:n.state=1)}if(h.length>1e6)throw h=[],new Error}),!1),t}function O(e){if(!e.fn)return;B(e);const t=c,n=d,o=m;d=c=e,N(e,f&&f.running&&f.sources.has(e)?e.tValue:e.value,o),f&&!f.running&&f.sources.has(e)&&queueMicrotask((()=>{M((()=>{f&&(f.running=!0),N(e,e.tValue,o)}),!1)})),d=n,c=t}function N(e,t,n){let o;try{o=e.fn(t)}catch(e){F(e)}(!e.updatedAt||e.updatedAt<=n)&&(e.observers&&e.observers.length?C(e,o,!0):f&&f.running&&e.pure?(f.sources.add(e),e.tValue=o):e.value=o,e.updatedAt=n)}function T(e,t,n,o=1,r){const s={fn:e,state:o,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:c,context:null,pure:n};return f&&f.running&&(s.state=0,s.tState=o),null===c||c!==i&&(f&&f.running&&c.pure?c.tOwned?c.tOwned.push(s):c.tOwned=[s]:c.owned?c.owned.push(s):c.owned=[s]),s}function $(e){const t=f&&f.running;if(!t&&0===e.state||t&&0===e.tState)return;if(!t&&2===e.state||t&&2===e.tState)return E(e);if(e.suspense&&x(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<m);){if(t&&f.disposed.has(e))return;(!t&&e.state||t&&e.tState)&&n.push(e)}for(let o=n.length-1;o>=0;o--){if(e=n[o],t){let t=e,r=n[o+1];for(;(t=t.owner)&&t!==r;)if(f.disposed.has(t))return}if(!t&&1===e.state||t&&1===e.tState)O(e);else if(!t&&2===e.state||t&&2===e.tState){const t=h;h=null,E(e,n[0]),h=t}}}function M(e,t){if(h)return e();let n=!1;t||(h=[]),g?n=!0:g=[],m++;try{const t=e();return function(e){if(h&&(q(h),h=null),e)return;let t;if(f&&f.running){if(f.promises.size||f.queue.size)return f.running=!1,f.effects.push.apply(f.effects,g),g=null,void u(!0);const e=f.sources;t=f.resolve,g.forEach((e=>{"tState"in e&&(e.state=e.tState),delete e.tState})),f=null,S((()=>{e.forEach((e=>{if(e.value=e.tValue,e.owned)for(let t=0,n=e.owned.length;t<n;t++)B(e.owned[t]);e.tOwned&&(e.owned=e.tOwned),delete e.tValue,delete e.tOwned,e.tState=0})),u(!1)}))}g.length?S((()=>{s(g),g=null})):g=null,t&&t()}(n),t}catch(e){F(e)}finally{h=null,n||(g=null)}}function q(e){for(let t=0;t<e.length;t++)$(e[t])}function E(e,t){const n=f&&f.running;n?e.tState=0:e.state=0;for(let o=0;o<e.sources.length;o+=1){const r=e.sources[o];r.sources&&(!n&&1===r.state||n&&1===r.tState?r!==t&&$(r):(!n&&2===r.state||n&&2===r.tState)&&E(r,t))}}function L(e){const t=f&&f.running;for(let n=0;n<e.observers.length;n+=1){const o=e.observers[n];(!t&&!o.state||t&&!o.tState)&&(t?o.tState=2:o.state=2,o.pure?h.push(o):g.push(o),o.observers&&L(o))}}function B(e){let t;if(e.sources)for(;e.sources.length;){const t=e.sources.pop(),n=e.sourceSlots.pop(),o=t.observers;if(o&&o.length){const e=o.pop(),r=t.observerSlots.pop();n<o.length&&(e.sourceSlots[r]=n,o[n]=e,t.observerSlots[n]=r)}}if(f&&f.running&&e.pure){if(e.tOwned){for(t=0;t<e.tOwned.length;t++)B(e.tOwned[t]);delete e.tOwned}H(e,!0)}else if(e.owned){for(t=0;t<e.owned.length;t++)B(e.owned[t]);e.owned=null}if(e.cleanups){for(t=0;t<e.cleanups.length;t++)e.cleanups[t]();e.cleanups=null}f&&f.running?e.tState=0:e.state=0,e.context=null}function H(e,t){if(t||(e.tState=0,f.disposed.add(e)),e.owned)for(let t=0;t<e.owned.length;t++)H(e.owned[t])}function F(e){const t=null;if(!t)throw e;t.forEach((t=>t(e)))}function V(e){if("function"==typeof e&&!e.length)return V(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const o=V(e[n]);Array.isArray(o)?t.push.apply(t,o):t.push(o)}return t}return e}function j(e){return function(t){let n;return O(T((()=>n=x((()=>(c.context={[e]:t.value},k((()=>t.children)))))),o,!0,1)),n;var o}}Symbol("fallback");function D(e,t){return x((()=>e(t||{})))}!function(e){const t=Symbol("context");j(t)}()},662:(e,t,n)=>{n.d(t,{$T:()=>u,Oo:()=>a,Qj:()=>i,XK:()=>l,sY:()=>s});var o=n(63);new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline","allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"]),new Set(["innerHTML","textContent","innerText","children"]),new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),new Set(["html","base","head","link","meta","style","title","body","address","article","aside","footer","header","main","nav","section","body","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rp","rt","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","area","audio","img","map","track","video","embed","iframe","object","param","picture","portal","source","svg","math","canvas","noscript","script","del","ins","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr","button","datalist","fieldset","form","input","label","legend","meter","optgroup","option","output","progress","select","textarea","details","dialog","menu","summary","details","slot","template","acronym","applet","basefont","bgsound","big","blink","center","content","dir","font","frame","frameset","hgroup","image","keygen","marquee","menuitem","nobr","noembed","noframes","plaintext","rb","rtc","shadow","spacer","strike","tt","xmp","a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","portal","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp","input"]);const r="_$DX_DELEGATE";function s(e,t,n){let r;return(0,o.so)((o=>{r=o,t===document?e():u(t,e(),t.firstChild?null:void 0,n)})),()=>{r(),t.textContent=""}}function l(e,t,n){const o=document.createElement("template");o.innerHTML=e;let r=o.content.firstChild;return n&&(r=r.firstChild),r}function i(e,t=window.document){const n=t[r]||(t[r]=new Set);for(let o=0,r=e.length;o<r;o++){const r=e[o];n.has(r)||(n.add(r),t.addEventListener(r,c))}}function a(e,t,n,o){o?Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n:Array.isArray(n)?e.addEventListener(t,(e=>n[0](n[1],e))):e.addEventListener(t,n)}function u(e,t,n,r){if(void 0===n||r||(r=[]),"function"!=typeof t)return f(e,t,r,n);(0,o.F3)((o=>f(e,t(),o,n)),r)}function c(e){const t=`$$${e.type}`;let n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get:()=>n||document}),o.vH.registry&&!o.vH.done&&(o.vH.done=!0,document.querySelectorAll("[id^=pl-]").forEach((e=>e.remove())));null!==n;){const o=n[t];if(o&&!n.disabled){const r=n[`${t}Data`];if(void 0!==r?o(r,e):o(e),e.cancelBubble)return}n=n.host&&n.host!==n&&n.host instanceof Node?n.host:n.parentNode}}function f(e,t,n,r,s){for(o.vH.context&&!n&&(n=[...e.childNodes]);"function"==typeof n;)n=n();if(t===n)return n;const l=typeof t,i=void 0!==r;if(e=i&&n[0]&&n[0].parentNode||e,"string"===l||"number"===l){if(o.vH.context)return n;if("number"===l&&(t=t.toString()),i){let o=n[0];o&&3===o.nodeType?o.data=t:o=document.createTextNode(t),n=h(e,n,r,o)}else n=""!==n&&"string"==typeof n?e.firstChild.data=t:e.textContent=t}else if(null==t||"boolean"===l){if(o.vH.context)return n;n=h(e,n,r)}else{if("function"===l)return(0,o.F3)((()=>{let o=t();for(;"function"==typeof o;)o=o();n=f(e,o,n,r)})),()=>n;if(Array.isArray(t)){const l=[];if(d(l,t,s))return(0,o.F3)((()=>n=f(e,l,n,r,!0))),()=>n;if(o.vH.context)for(let e=0;e<l.length;e++)if(l[e].parentNode)return n=l;if(0===l.length){if(n=h(e,n,r),i)return n}else Array.isArray(n)?0===n.length?p(e,l,r):function(e,t,n){let o=n.length,r=t.length,s=o,l=0,i=0,a=t[r-1].nextSibling,u=null;for(;l<r||i<s;)if(t[l]!==n[i]){for(;t[r-1]===n[s-1];)r--,s--;if(r===l){const t=s<o?i?n[i-1].nextSibling:n[s-i]:a;for(;i<s;)e.insertBefore(n[i++],t)}else if(s===i)for(;l<r;)u&&u.has(t[l])||t[l].remove(),l++;else if(t[l]===n[s-1]&&n[i]===t[r-1]){const o=t[--r].nextSibling;e.insertBefore(n[i++],t[l++].nextSibling),e.insertBefore(n[--s],o),t[r]=n[s]}else{if(!u){u=new Map;let e=i;for(;e<s;)u.set(n[e],e++)}const o=u.get(t[l]);if(null!=o)if(i<o&&o<s){let a,c=l,f=1;for(;++c<r&&c<s&&null!=(a=u.get(t[c]))&&a===o+f;)f++;if(f>o-i){const r=t[l];for(;i<o;)e.insertBefore(n[i++],r)}else e.replaceChild(n[i++],t[l++])}else l++;else t[l++].remove()}}else l++,i++}(e,n,l):(n&&h(e),p(e,l));n=l}else if(t instanceof Node){if(o.vH.context&&t.parentNode)return n=i?[t]:t;if(Array.isArray(n)){if(i)return n=h(e,n,r,t);h(e,n,null,t)}else null!=n&&""!==n&&e.firstChild?e.replaceChild(t,e.firstChild):e.appendChild(t);n=t}}return n}function d(e,t,n){let o=!1;for(let r=0,s=t.length;r<s;r++){let s,l=t[r];if(l instanceof Node)e.push(l);else if(null==l||!0===l||!1===l);else if(Array.isArray(l))o=d(e,l)||o;else if("string"==(s=typeof l))e.push(document.createTextNode(l));else if("function"===s)if(n){for(;"function"==typeof l;)l=l();o=d(e,Array.isArray(l)?l:[l])||o}else e.push(l),o=!0;else e.push(document.createTextNode(l.toString()))}return o}function p(e,t,n){for(let o=0,r=t.length;o<r;o++)e.insertBefore(t[o],n)}function h(e,t,n,o){if(void 0===n)return e.textContent="";const r=o||document.createTextNode("");if(t.length){let o=!1;for(let s=t.length-1;s>=0;s--){const l=t[s];if(r!==l){const t=l.parentNode===e;o||s?t&&l.remove():t?e.replaceChild(r,l):e.insertBefore(r,n)}else o=!0}}else e.insertBefore(r,n);return[r]}}}]);