skatejs-named-slots
Advanced tools
Comparing version 1.3.1 to 1.3.2
@@ -885,2 +885,7 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
// safari doesn't update its children properly for some reason, so it needs a little push | ||
if (!_canPatchNativeAccessors2.default && parentNode) { | ||
parentNode.removeChild(newNode); | ||
} | ||
if (nodeType === 'node') { | ||
@@ -887,0 +892,0 @@ if (_canPatchNativeAccessors2.default) { |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.skatejsNamedSlots=t():e.skatejsNamedSlots=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.v1=t.v0=void 0,n(1);var o=n(2),i=n(3),u=r(i),a=n(4),l=r(a);o.shadowDomV1||(o.shadowDomV0?(0,u["default"])():(0,l["default"])()),t.v0=u["default"],t.v1=l["default"]},function(e,t){try{var n=new window.CustomEvent("test");if(n.preventDefault(),n.defaultPrevented!==!0)throw new Error("Could not prevent default")}catch(r){var o=function(e,t){var n,r;return t=t||{bubbles:!1,cancelable:!1,detail:void 0},n=document.createEvent("CustomEvent"),n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),r=n.preventDefault,n.preventDefault=function(){r.call(this);try{Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})}catch(e){this.defaultPrevented=!0}},n};o.prototype=window.Event.prototype,window.CustomEvent=o}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=document.createElement("div");t.shadowDomV0=!!n.createShadowRoot,t.shadowDomV1=!!n.attachShadow},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(1);var r="__shadowRoot";t["default"]=function(){function e(e){for(var t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT),n=[];t.nextNode();){var r=t.currentNode;"SLOT"===r.tagName&&n.push(r)}n.forEach(function(e){var t=e.getAttribute("name"),n=document.createElement("slot");for(t&&n.setAttribute("name",t),e.parentNode.replaceChild(n,e);e.hasChildNodes();)n.appendChild(e.firstChild)})}var t=function(e){for(var t=e.getAttribute("name"),n=e;n;){var o=n[r];if(o&&o.contains(e))break;n=n.parentNode}if(!n)return[];for(var i=n.childNodes,u=i.length,a=[],l=0;l<u;l++){var s=i[l],c=s.getAttribute?s.getAttribute("slot"):null;t===c&&a.push(s)}return a},n=HTMLElement.prototype,o=n.getAttribute,i=n.setAttribute,u=Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML"),a=Object.getOwnPropertyDescriptor(ShadowRoot.prototype,"innerHTML"),l=function(e){return"slot"===e?"content":e},s=document.createElement.bind(document),c=document.createElementNS.bind(document);document.createElement=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return s.apply(void 0,[l(e)].concat(n))},document.createElementNS=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return c.apply(void 0,[e,l(t)].concat(r))},Object.defineProperty(Element.prototype,"innerHTML",{configurable:!0,get:u.get,set:function(t){u.set.call(this,t),e(this)}}),Object.defineProperty(ShadowRoot.prototype,"innerHTML",{configurable:!0,get:a.get,set:function(t){a.set.call(this,t),e(this)}}),Object.defineProperty(Node.prototype,"assignedSlot",{get:function(){var e=this.parentNode;if(e){var t=e.shadowRoot;if(!t)return null;for(var n=t.querySelectorAll("content"),r=0;r<n.length;r++){var o=n[r];if(o.assignedNodes().indexOf(this)>-1)return o}}return null}}),HTMLElement.prototype.attachShadow=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.mode;if("closed"!==n&&"open"!==n)throw new Error('You must specify { mode } as "open" or "closed" to attachShadow().');var o=this.createShadowRoot();"closed"===n&&Object.defineProperty(this,"shadowRoot",{configurable:!0,get:function(){return null}}),Object.defineProperty(o,"parentNode",{get:function(){return e}});var i=new MutationObserver(function(t){var n=e[r];t.forEach(function(e){var t=e.addedNodes,r=e.removedNodes,o={},i=function(e){return o[e.getAttribute&&e.getAttribute("slot")||"__default"]=!0};if(t)for(var u=t.length,a=0;a<u;a++)i(t[a]);if(r)for(var l=r.length,s=0;s<l;s++)i(r[s]);Object.keys(o).forEach(function(e){var t="__default"===e?n.querySelector("content:not([name])")||n.querySelector('content[name=""]'):n.querySelector('content[name="'+e+'"]');t&&t.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1}))})})});return i.observe(this,{childList:!0}),this[r]=o},Object.defineProperty(HTMLContentElement.prototype,"name",{get:function(){return this.getAttribute("name")},set:function(e){return this.setAttribute("name",e)}}),Object.defineProperty(HTMLElement.prototype,"slot",{get:function(){return this.getAttribute("slot")},set:function(e){return this.setAttribute("slot",e)}}),HTMLContentElement.prototype.assignedNodes=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.deep,r=[],o=n?this.getDistributedNodes():t(this),i=0;i<o.length;i++){var u=o[i],a=u.nodeType;a!==Node.ELEMENT_NODE&&a!==Node.TEXT_NODE||r.push(u)}return r},HTMLContentElement.prototype.getAttribute=function(e){if("name"===e){var t=o.call(this,"select");return t?t.match(/\[slot=['"]?(.*?)['"]?\]/)[1]:null}return o.call(this,e)},HTMLContentElement.prototype.setAttribute=function(e,t){return"name"===e&&(e="select",t="[slot='"+t+"']"),i.call(this,e,t)}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=document.createElement("div");if(F["default"])return t.__innerHTML=e,t;for(var n=me.parseFromString("<div>"+e+"</div>","text/html").body.firstChild;n.hasChildNodes();){var r=n.firstChild;n.removeChild(r),t.appendChild(r)}return document.importNode(t,!0)}function i(e,t,n){Object.defineProperty(e,t,{configurable:!0,get:function(){return n}})}function u(e){return this[e]}function a(e){return e.item=u,e}function l(e){return!!de.get(e)}function s(e){return l(e)?"host":(0,K["default"])(e)?"slot":(0,z["default"])(e)?"root":"node"}function c(e,t){for(;e&&e!==document;){if(t(e))return e;e=e.parentNode}}function d(e){return e.getAttribute&&e.getAttribute("name")||"default"}function f(e){return e.getAttribute&&e.getAttribute("slot")||"default"}function h(e,t,n){if(le.indexOf(t.nodeType)!==-1){var r=e.assignedNodes(),o=0===r.length,i=r.indexOf(n);pe.set(t,e),o&&te.call(e.childNodes,function(t){return e.__removeChild(t)}),i>-1?(e.__insertBefore(t,void 0!==n?n:null),r.splice(i,0,t)):(e.__appendChild(t),r.push(t)),e.____triggerSlotChangeEvent()}}function p(e){var t=pe.get(e);if(t){var n=t.assignedNodes(),r=n.indexOf(e);if(r>-1){var o=1===n.length;n.splice(r,1),pe.set(e,null),t.__removeChild(e),o&&te.call(t.childNodes,function(e){return t.__appendChild(e)}),t.____triggerSlotChangeEvent()}}}function v(e,t){for(var n=e.childNodes,r=n.length,o=0;o<r;o++)if(n[o]===t)return o;return-1}function _(e,t,n,r){var o=v(e,n);(0,k.eachNodeOrFragmentNodes)(t,function(t,n){r(t,n),F["default"]?he.set(t,e):i(t,"parentNode",e),o>-1?ee.splice.call(e.childNodes,o+n,0,t):ee.push.call(e.childNodes,t)})}function g(e,t,n){var r=v(e,t);r>-1&&(n(t,0),F["default"]?he.set(t,null):i(t,"parentNode",null),ee.splice.call(e.childNodes,r,1))}function m(e,t,n){_(e,t,n,function(t){e.__insertBefore(t,void 0!==n?n:null)})}function N(e,t,n){_(e,t,n,function(t){var r=de.get(e),o=_e.get(r),i=o[f(t)];i&&h(i,t,n)})}function y(e,t){var n=d(t);F["default"]||Array.isArray(t.childNodes)||i(t,"childNodes",(0,Z["default"])(t.childNodes)),_e.get(e)[n]=t,ge.has(t)||ge.set(t,e),(0,k.eachChildNode)(ve.get(e),function(e){e.assignedSlot||n!==f(e)||h(t,e)})}function b(e,t,n){(0,k.eachNodeOrFragmentNodes)(t,function(t){if((0,K["default"])(t))y(e,t);else{var n=(0,U["default"])(t);if(n)for(var r=n.length,o=0;o<r;o++)y(e,n[o])}}),m(e,t,n)}function E(e,t,n){var r=0===e.assignedNodes().length;_(e,t,n,function(t){r&&e.__insertBefore(t,void 0!==n?n:null)})}function O(e,t){var n=0===e.assignedNodes().length;g(e,t,function(){n&&e.__removeChild(t)})}function C(e,t){g(e,t,function(){e.__removeChild(t)})}function w(e,t){g(e,t,function(){p(t)})}function T(e,t){var n=Array.prototype.slice.call(t.assignedNodes());n.forEach(p),delete _e.get(e)[d(t)],ge["delete"](t)}function M(e,t){g(e,t,function(){if((0,K["default"])(t))T(e,t);else{var n=(0,U["default"])(t);if(n)for(var r=0;r<n.length;r++)T(e,n[r])}e.__removeChild(t)})}function j(e){if((0,z["default"])(e))return e;if(e.parentNode)return j(e.parentNode)}function A(e,t,n){var r=s(e),o=t.parentNode,u=j(e);return F["default"]||Array.isArray(e.childNodes)||i(e,"childNodes",(0,Z["default"])(e.childNodes)),u&&"slot"===s(t)&&y(u,t),o&&"host"===s(o)&&(F["default"]?he.set(t,null):i(t,"parentNode",null)),"node"===r?F["default"]?(he.set(t,e),e.__insertBefore(t,void 0!==n?n:null)):m(e,t,n):"slot"===r?E(e,t,n):"host"===r?N(e,t,n):"root"===r?b(e,t,n):void 0}function L(e){if(F["default"]&&"slot"===s(e)&&e.__childNodes.length!==e.childNodes.length){for(;e.hasChildNodes();)e.removeChild(e.firstChild);te.call(e.__childNodes,function(t){return e.appendChild(t)})}}Object.defineProperty(t,"__esModule",{value:!0});var P=n(5),x=r(P),S=n(7),D=r(S),k=n(8),H=n(9),F=r(H),R=n(10),W=r(R),V=n(11),B=r(V),q=n(12),X=r(q),G=n(13),I=r(G),Y=n(14),U=r(Y),$=n(16),z=r($),J=n(15),K=r(J),Q=n(17),Z=r(Q),ee=Array.prototype,te=ee.forEach,ne="_shadow_root_",re=["childNodes","parentNode"],oe=["textContent"],ie=["assignedSlot"],ue=["textContent"],ae=[],le=[Node.ELEMENT_NODE,Node.TEXT_NODE],se=new D["default"],ce=new D["default"],de=new D["default"],fe=new D["default"],he=new D["default"],pe=new D["default"],ve=new D["default"],_e=new D["default"],ge=new D["default"],me=new DOMParser,Ne={____assignedNodes:{get:function(){return this.______assignedNodes||(this.______assignedNodes=[])}},____isInFallbackMode:{get:function(){return 0===this.assignedNodes().length}},____slotChangeListeners:{get:function(){return"undefined"==typeof this.______slotChangeListeners&&(this.______slotChangeListeners=0),this.______slotChangeListeners},set:function(e){this.______slotChangeListeners=e}},____triggerSlotChangeEvent:{value:(0,x["default"])(function(){this.____slotChangeListeners&&this.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1}))})},addEventListener:{value:function(e,t,n){return"slotchange"===e&&(0,K["default"])(this)&&this.____slotChangeListeners++,this.__addEventListener(e,t,n)}},appendChild:{value:function(e){return A(this,e),e}},assignedSlot:{get:function(){var e=pe.get(this);if(!e)return null;var t=ge.get(e),n=ve.get(t),r=ce.get(n);return"open"===r?e:null}},attachShadow:{value:function(e){var t=this,n=e&&e.mode;if("closed"!==n&&"open"!==n)throw new Error('You must specify { mode } as "open" or "closed" to attachShadow().');var r=de.get(this);if(r)return r;var o=a([].slice.call(this.childNodes)),u=document.createElement(e.polyfillShadowRootTagName||ne);return ce.set(this,n),de.set(this,u),ve.set(u,this),_e.set(u,{}),F["default"]?fe.set(this,o):i(this,"childNodes",o),o.forEach(function(e){t.__removeChild(e),F["default"]?he.set(e,t):i(e,"parentNode",t)}),this.__appendChild(u)}},childElementCount:{get:function(){return this.children.length}},childNodes:{get:function(){if(F["default"]&&"node"===s(this))return this.__childNodes;var e=fe.get(this);return e||fe.set(this,e=a([])),e}},children:{get:function(){var e=[];return(0,k.eachChildNode)(this,function(t){1===t.nodeType&&e.push(t)}),a(e)}},firstChild:{get:function(){return this.childNodes[0]||null}},firstElementChild:{get:function(){return this.children[0]||null}},assignedNodes:{value:function(){if((0,K["default"])(this)){var e=se.get(this);return e||se.set(this,e=[]),e}}},hasChildNodes:{value:function(){return this.childNodes.length>0}},innerHTML:{get:function(){function e(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName.toLowerCase()in o}var t="",n=function(e){return e.outerHTML},r={};r[Node.ELEMENT_NODE]=n,r[Node.COMMENT_NODE]=I["default"];var o={style:!0,script:!0,xmp:!0,iframe:!0,noembed:!0,noframes:!0,noscript:!0,plaintext:!0},i=e(this);return(0,k.eachChildNode)(this,function(e){var o=void 0;o=e.nodeType===Node.TEXT_NODE?i?X["default"]:B["default"]:r[e.nodeType]||n,t+=o(e)}),t},set:function(e){for(var t=o(e);this.hasChildNodes();)this.removeChild(this.firstChild);var n=(0,U["default"])(t);for(te.call(n,function(e){return L(e)});t.hasChildNodes();){var r=t.firstChild;t.removeChild(r),this.appendChild(r)}}},insertBefore:{value:function(e,t){return A(this,e,t),e}},lastChild:{get:function(){var e=this.childNodes;return e[e.length-1]||null}},lastElementChild:{get:function(){var e=this.children;return e[e.length-1]||null}},name:{get:function(){return this.getAttribute("name")},set:function(e){var t=this.name,n=this.__setAttribute("name",e);if(e===t)return n;if(!(0,K["default"])(this))return n;var r=ge.get(this);return r&&(T(r,this),y(r,this)),n}},nextSibling:{get:function(){var e=this;return(0,k.eachChildNode)(this.parentNode,function(t,n,r){if(e===t)return r[n+1]||null})}},nextElementSibling:{get:function(){var e=this,t=void 0;return(0,k.eachChildNode)(this.parentNode,function(n){return t&&1===n.nodeType?n:void(e===n&&(t=!0))})}},outerHTML:{get:function(){var e=this.tagName.toLowerCase(),t=Array.prototype.slice.call(this.attributes).map(function(e){return" "+e.name+(e.value?'="'+e.value+'"':"")}).join("");return"<"+e+t+">"+this.innerHTML+"</"+e+">"},set:function(e){if(this.parentNode){var t=o(e);this.parentNode.replaceChild(t.firstChild,this)}else{if(!F["default"])throw new Error("Failed to set the 'outerHTML' property on 'Element': This element has no parent node.");this.__outerHTML=e}}},parentElement:{get:function(){return c(this.parentNode,function(e){return 1===e.nodeType})}},parentNode:{get:function(){return he.get(this)||this.__parentNode||null}},previousSibling:{get:function(){var e=this;return(0,k.eachChildNode)(this.parentNode,function(t,n,r){if(e===t)return r[n-1]||null})}},previousElementSibling:{get:function(){var e=this,t=void 0;return(0,k.eachChildNode)(this.parentNode,function(n){return t&&e===n?t:void(1===n.nodeType&&(t=n))})}},removeChild:{value:function(e){var t=s(this);switch(t){case"node":if(F["default"])return he.set(e,null),this.__removeChild(e);C(this,e);break;case"slot":O(this,e);break;case"host":w(this,e);break;case"root":M(this,e)}return e}},removeEventListener:{value:function(e,t,n){return"slotchange"===e&&this.____slotChangeListeners&&(0,K["default"])(this)&&this.____slotChangeListeners--,this.__removeEventListener(e,t,n)}},replaceChild:{value:function(e,t){return this.insertBefore(e,t),this.removeChild(t)}},setAttribute:{value:function(e,t){return"slot"===e&&(this[e]=t),(0,K["default"])(this)&&"name"===e&&(this[e]=t),this.__setAttribute(e,t)}},shadowRoot:{get:function(){return"open"===ce.get(this)?de.get(this):null}},slot:{get:function(){return this.getAttribute("slot")},set:function(e){var t=this.name,n=this.__setAttribute("slot",e);if(t===e)return n;var r=pe.get(this),o=r&&ge.get(r),i=o&&ve.get(o);return i&&(w(i,this),N(i,this)),n}},textContent:{get:function(){var e="";return(0,k.eachChildNode)(this,function(t){t.nodeType!==Node.COMMENT_NODE&&(e+=t.textContent)}),e},set:function(e){for(;this.hasChildNodes();)this.removeChild(this.firstChild);e&&this.appendChild(document.createTextNode(e))}}};t["default"]=function(){var e=Comment.prototype,t=HTMLElement.prototype,n=SVGElement.prototype,r=Text.prototype,o=document.createTextNode(""),i=document.createComment("");Object.keys(Ne).forEach(function(u){var a=Ne[u];if(a.configurable=!0,a.enumerable=!0,a.hasOwnProperty("value")&&(a.writable=!0),F["default"]||re.indexOf(u)===-1){var l=(0,W["default"])(t,u),s=(0,W["default"])(r,u),c=(0,W["default"])(e,u),d=u in o&&oe.indexOf(u)===-1||~ie.indexOf(u),f=u in i&&ue.indexOf(u)===-1||~ae.indexOf(u),h="__"+u;Object.defineProperty(t,u,a),Object.defineProperty(n,u,a),l&&(Object.defineProperty(t,h,l),Object.defineProperty(n,h,l)),d&&Object.defineProperty(r,u,a),d&&s&&Object.defineProperty(r,h,s),f&&Object.defineProperty(e,u,a),f&&c&&Object.defineProperty(e,h,c)}})}},function(e,t,n){var r=n(6);e.exports=function(e,t,n){function o(){var c=r()-l;c<t&&c>0?i=setTimeout(o,t-c):(i=null,n||(s=e.apply(a,u),i||(a=u=null)))}var i,u,a,l,s;return null==t&&(t=100),function(){a=this,u=arguments,l=r();var c=n&&!i;return i||(i=setTimeout(o,t)),c&&(s=e.apply(a,u),a=u=null),s}}},function(e,t){function n(){return(new Date).getTime()}e.exports=Date.now||n},function(e,t,n){void function(t,n,r){function o(e,t,n){return"function"==typeof t&&(n=t,t=i(n).replace(/_$/,"")),l(e,t,{configurable:!0,writable:!0,value:n})}function i(e){return"function"!=typeof e?"":"name"in e?e.name:s.call(e).match(f)[1]}function u(e){function t(t,o){return o||2===arguments.length?n.set(t,o):(o=n.get(t),o===r&&(o=e(t),n.set(t,o))),o}var n=new p;return e||(e=v),t}var a=Object.getOwnPropertyNames,l=Object.defineProperty,s=Function.prototype.toString,c=Object.create,d=Object.prototype.hasOwnProperty,f=/^\n?function\s?(\w*)?_?\(/,h=function(){function e(){var e=u(),r={};this.unlock=function(o){var i=f(o);if(d.call(i,e))return i[e](r);var u=c(null,t);return l(i,e,{value:new Function("s","l",n)(r,u)}),u}}var t={value:{writable:!0,value:r}},n="return function(k){if(k===s)return l}",i=c(null),u=function(){var e=Math.random().toString(36).slice(2);return e in i?u():i[e]=e},s=u(),f=function(e){if(d.call(e,s))return e[s];if(!Object.isExtensible(e))throw new TypeError("Object must be extensible");var t=c(null);return l(e,s,{value:t}),t};return o(Object,function(e){var t=a(e);return d.call(e,s)&&t.splice(t.indexOf(s),1),t}),o(e.prototype,function(e){return this.unlock(e).value}),o(e.prototype,function(e,t){this.unlock(e).value=t}),e}(),p=function(e){function u(e){return this===t||null==this||this===u.prototype?new u(e):(p(this,new h),void _(this,e))}function a(e){f(e);var t=v(this).get(e);return t===n?r:t}function l(e,t){f(e),v(this).set(e,t===r?n:t)}function s(e){return f(e),v(this).get(e)!==r}function c(e){f(e);var t=v(this),n=t.get(e)!==r;return t.set(e,r),n}function d(){return v(this),"[object WeakMap]"}var f=function(e){if(null==e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("Invalid WeakMap key")},p=function(t,n){var r=e.unlock(t);if(r.value)throw new TypeError("Object is already a WeakMap");r.value=n},v=function(t){var n=e.unlock(t).value;if(!n)throw new TypeError("WeakMap is not generic");return n},_=function(e,t){null!==t&&"object"==typeof t&&"function"==typeof t.forEach&&t.forEach(function(n,r){n instanceof Array&&2===n.length&&l.call(e,t[r][0],t[r][1])})};try{var g=("return "+c).replace("e_","\\u0065"),m=new Function("unwrap","validate",g)(v,f)}catch(N){var m=c}var g=(""+Object).split("Object"),y=function(){return g[0]+i(this)+g[1]};o(y,y);var b={__proto__:[]}instanceof Array?function(e){e.__proto__=y}:function(e){o(e,y)};return b(u),[d,a,l,s,m].forEach(function(e){o(u.prototype,e),b(e)}),u}(new h),v=Object.create?function(){return Object.create(null)}:function(){return{}};e.exports=p,p.createStorage=u,t.WeakMap&&(t.WeakMap.createStorage=u)}((0,eval)("this"))},function(e,t){"use strict";function n(e,t){if(e)for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var i=t(n[o],o,n);if("undefined"!=typeof i)return i}}function r(e){for(var t=[],n=e.length-1;n>=0;n--)t.push(e[n]);return t}function o(e,t){if(e instanceof DocumentFragment)for(var n=e.childNodes,o=n.length,i=o-1;i>=0;i--){var u=r(e.childNodes)[i];t(u,i)}else t(e,0)}Object.defineProperty(t,"__esModule",{value:!0}),t.eachChildNode=n,t.eachNodeOrFragmentNodes=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(10),i=r(o),u=(0,i["default"])(Element.prototype,"innerHTML");t["default"]=!!u},function(e,t){"use strict";function n(e,t){for(var n=void 0;e&&!(n=Object.getOwnPropertyDescriptor(e,t));)e=Object.getPrototypeOf(e);return n}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e,t){e instanceof Node&&(e=r);var o=n(e,t);if(o){var i=o.get,u=o.set,a={configurable:!0,enumerable:!0};if(i)return a.get=i,a.set=u,a;if("function"==typeof e[t])return a.value=e[t],a}var l=Object.getOwnPropertyDescriptor(e,t);if(l&&l.get)return l};var r=document.createElement("div")},function(e,t){"use strict";function n(e){return e.textContent.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n},function(e,t){"use strict";function n(e){return e.textContent}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n},function(e,t){"use strict";function n(e){return e.text||"<!--"+e.textContent+"-->"}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.childNodes;if(u.shadowDomV0&&!u.shadowDomV1)return[].concat(o(e.querySelectorAll("content")));if(!n||[Node.ELEMENT_NODE,Node.DOCUMENT_FRAGMENT_NODE].indexOf(e.nodeType)===-1)return t;for(var r=n.length,a=0;a<r;a++){var s=n[a];(0,l["default"])(s)&&t.push(s),i(s,t)}return t}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=i;var u=n(2),a=n(15),l=r(a)},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){return"SLOT"===e.tagName}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){return"_SHADOW_ROOT_"===e.tagName}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){return Array.prototype.slice.call(e)}}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.skatejsNamedSlots=t():e.skatejsNamedSlots=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.v1=t.v0=void 0,n(1);var o=n(2),i=n(3),u=r(i),a=n(4),l=r(a);o.shadowDomV1||(o.shadowDomV0?(0,u["default"])():(0,l["default"])()),t.v0=u["default"],t.v1=l["default"]},function(e,t){try{var n=new window.CustomEvent("test");if(n.preventDefault(),n.defaultPrevented!==!0)throw new Error("Could not prevent default")}catch(r){var o=function(e,t){var n,r;return t=t||{bubbles:!1,cancelable:!1,detail:void 0},n=document.createEvent("CustomEvent"),n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),r=n.preventDefault,n.preventDefault=function(){r.call(this);try{Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})}catch(e){this.defaultPrevented=!0}},n};o.prototype=window.Event.prototype,window.CustomEvent=o}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=document.createElement("div");t.shadowDomV0=!!n.createShadowRoot,t.shadowDomV1=!!n.attachShadow},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(1);var r="__shadowRoot";t["default"]=function(){function e(e){for(var t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT),n=[];t.nextNode();){var r=t.currentNode;"SLOT"===r.tagName&&n.push(r)}n.forEach(function(e){var t=e.getAttribute("name"),n=document.createElement("slot");for(t&&n.setAttribute("name",t),e.parentNode.replaceChild(n,e);e.hasChildNodes();)n.appendChild(e.firstChild)})}var t=function(e){for(var t=e.getAttribute("name"),n=e;n;){var o=n[r];if(o&&o.contains(e))break;n=n.parentNode}if(!n)return[];for(var i=n.childNodes,u=i.length,a=[],l=0;l<u;l++){var s=i[l],c=s.getAttribute?s.getAttribute("slot"):null;t===c&&a.push(s)}return a},n=HTMLElement.prototype,o=n.getAttribute,i=n.setAttribute,u=Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML"),a=Object.getOwnPropertyDescriptor(ShadowRoot.prototype,"innerHTML"),l=function(e){return"slot"===e?"content":e},s=document.createElement.bind(document),c=document.createElementNS.bind(document);document.createElement=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return s.apply(void 0,[l(e)].concat(n))},document.createElementNS=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return c.apply(void 0,[e,l(t)].concat(r))},Object.defineProperty(Element.prototype,"innerHTML",{configurable:!0,get:u.get,set:function(t){u.set.call(this,t),e(this)}}),Object.defineProperty(ShadowRoot.prototype,"innerHTML",{configurable:!0,get:a.get,set:function(t){a.set.call(this,t),e(this)}}),Object.defineProperty(Node.prototype,"assignedSlot",{get:function(){var e=this.parentNode;if(e){var t=e.shadowRoot;if(!t)return null;for(var n=t.querySelectorAll("content"),r=0;r<n.length;r++){var o=n[r];if(o.assignedNodes().indexOf(this)>-1)return o}}return null}}),HTMLElement.prototype.attachShadow=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.mode;if("closed"!==n&&"open"!==n)throw new Error('You must specify { mode } as "open" or "closed" to attachShadow().');var o=this.createShadowRoot();"closed"===n&&Object.defineProperty(this,"shadowRoot",{configurable:!0,get:function(){return null}}),Object.defineProperty(o,"parentNode",{get:function(){return e}});var i=new MutationObserver(function(t){var n=e[r];t.forEach(function(e){var t=e.addedNodes,r=e.removedNodes,o={},i=function(e){return o[e.getAttribute&&e.getAttribute("slot")||"__default"]=!0};if(t)for(var u=t.length,a=0;a<u;a++)i(t[a]);if(r)for(var l=r.length,s=0;s<l;s++)i(r[s]);Object.keys(o).forEach(function(e){var t="__default"===e?n.querySelector("content:not([name])")||n.querySelector('content[name=""]'):n.querySelector('content[name="'+e+'"]');t&&t.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1}))})})});return i.observe(this,{childList:!0}),this[r]=o},Object.defineProperty(HTMLContentElement.prototype,"name",{get:function(){return this.getAttribute("name")},set:function(e){return this.setAttribute("name",e)}}),Object.defineProperty(HTMLElement.prototype,"slot",{get:function(){return this.getAttribute("slot")},set:function(e){return this.setAttribute("slot",e)}}),HTMLContentElement.prototype.assignedNodes=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.deep,r=[],o=n?this.getDistributedNodes():t(this),i=0;i<o.length;i++){var u=o[i],a=u.nodeType;a!==Node.ELEMENT_NODE&&a!==Node.TEXT_NODE||r.push(u)}return r},HTMLContentElement.prototype.getAttribute=function(e){if("name"===e){var t=o.call(this,"select");return t?t.match(/\[slot=['"]?(.*?)['"]?\]/)[1]:null}return o.call(this,e)},HTMLContentElement.prototype.setAttribute=function(e,t){return"name"===e&&(e="select",t="[slot='"+t+"']"),i.call(this,e,t)}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=document.createElement("div");if(F["default"])return t.__innerHTML=e,t;for(var n=me.parseFromString("<div>"+e+"</div>","text/html").body.firstChild;n.hasChildNodes();){var r=n.firstChild;n.removeChild(r),t.appendChild(r)}return document.importNode(t,!0)}function i(e,t,n){Object.defineProperty(e,t,{configurable:!0,get:function(){return n}})}function u(e){return this[e]}function a(e){return e.item=u,e}function l(e){return!!de.get(e)}function s(e){return l(e)?"host":(0,K["default"])(e)?"slot":(0,z["default"])(e)?"root":"node"}function c(e,t){for(;e&&e!==document;){if(t(e))return e;e=e.parentNode}}function d(e){return e.getAttribute&&e.getAttribute("name")||"default"}function f(e){return e.getAttribute&&e.getAttribute("slot")||"default"}function h(e,t,n){if(le.indexOf(t.nodeType)!==-1){var r=e.assignedNodes(),o=0===r.length,i=r.indexOf(n);pe.set(t,e),o&&te.call(e.childNodes,function(t){return e.__removeChild(t)}),i>-1?(e.__insertBefore(t,void 0!==n?n:null),r.splice(i,0,t)):(e.__appendChild(t),r.push(t)),e.____triggerSlotChangeEvent()}}function p(e){var t=pe.get(e);if(t){var n=t.assignedNodes(),r=n.indexOf(e);if(r>-1){var o=1===n.length;n.splice(r,1),pe.set(e,null),t.__removeChild(e),o&&te.call(t.childNodes,function(e){return t.__appendChild(e)}),t.____triggerSlotChangeEvent()}}}function v(e,t){for(var n=e.childNodes,r=n.length,o=0;o<r;o++)if(n[o]===t)return o;return-1}function _(e,t,n,r){var o=v(e,n);(0,k.eachNodeOrFragmentNodes)(t,function(t,n){r(t,n),F["default"]?he.set(t,e):i(t,"parentNode",e),o>-1?ee.splice.call(e.childNodes,o+n,0,t):ee.push.call(e.childNodes,t)})}function g(e,t,n){var r=v(e,t);r>-1&&(n(t,0),F["default"]?he.set(t,null):i(t,"parentNode",null),ee.splice.call(e.childNodes,r,1))}function m(e,t,n){_(e,t,n,function(t){e.__insertBefore(t,void 0!==n?n:null)})}function N(e,t,n){_(e,t,n,function(t){var r=de.get(e),o=_e.get(r),i=o[f(t)];i&&h(i,t,n)})}function y(e,t){var n=d(t);F["default"]||Array.isArray(t.childNodes)||i(t,"childNodes",(0,Z["default"])(t.childNodes)),_e.get(e)[n]=t,ge.has(t)||ge.set(t,e),(0,k.eachChildNode)(ve.get(e),function(e){e.assignedSlot||n!==f(e)||h(t,e)})}function b(e,t,n){(0,k.eachNodeOrFragmentNodes)(t,function(t){if((0,K["default"])(t))y(e,t);else{var n=(0,U["default"])(t);if(n)for(var r=n.length,o=0;o<r;o++)y(e,n[o])}}),m(e,t,n)}function E(e,t,n){var r=0===e.assignedNodes().length;_(e,t,n,function(t){r&&e.__insertBefore(t,void 0!==n?n:null)})}function O(e,t){var n=0===e.assignedNodes().length;g(e,t,function(){n&&e.__removeChild(t)})}function C(e,t){g(e,t,function(){e.__removeChild(t)})}function w(e,t){g(e,t,function(){p(t)})}function T(e,t){var n=Array.prototype.slice.call(t.assignedNodes());n.forEach(p),delete _e.get(e)[d(t)],ge["delete"](t)}function M(e,t){g(e,t,function(){if((0,K["default"])(t))T(e,t);else{var n=(0,U["default"])(t);if(n)for(var r=0;r<n.length;r++)T(e,n[r])}e.__removeChild(t)})}function j(e){if((0,z["default"])(e))return e;if(e.parentNode)return j(e.parentNode)}function A(e,t,n){var r=s(e),o=t.parentNode,u=j(e);return F["default"]||Array.isArray(e.childNodes)||i(e,"childNodes",(0,Z["default"])(e.childNodes)),u&&"slot"===s(t)&&y(u,t),o&&"host"===s(o)&&(F["default"]?he.set(t,null):i(t,"parentNode",null)),!F["default"]&&o&&o.removeChild(t),"node"===r?F["default"]?(he.set(t,e),e.__insertBefore(t,void 0!==n?n:null)):m(e,t,n):"slot"===r?E(e,t,n):"host"===r?N(e,t,n):"root"===r?b(e,t,n):void 0}function L(e){if(F["default"]&&"slot"===s(e)&&e.__childNodes.length!==e.childNodes.length){for(;e.hasChildNodes();)e.removeChild(e.firstChild);te.call(e.__childNodes,function(t){return e.appendChild(t)})}}Object.defineProperty(t,"__esModule",{value:!0});var P=n(5),x=r(P),S=n(7),D=r(S),k=n(8),H=n(9),F=r(H),R=n(10),W=r(R),V=n(11),B=r(V),q=n(12),X=r(q),G=n(13),I=r(G),Y=n(14),U=r(Y),$=n(16),z=r($),J=n(15),K=r(J),Q=n(17),Z=r(Q),ee=Array.prototype,te=ee.forEach,ne="_shadow_root_",re=["childNodes","parentNode"],oe=["textContent"],ie=["assignedSlot"],ue=["textContent"],ae=[],le=[Node.ELEMENT_NODE,Node.TEXT_NODE],se=new D["default"],ce=new D["default"],de=new D["default"],fe=new D["default"],he=new D["default"],pe=new D["default"],ve=new D["default"],_e=new D["default"],ge=new D["default"],me=new DOMParser,Ne={____assignedNodes:{get:function(){return this.______assignedNodes||(this.______assignedNodes=[])}},____isInFallbackMode:{get:function(){return 0===this.assignedNodes().length}},____slotChangeListeners:{get:function(){return"undefined"==typeof this.______slotChangeListeners&&(this.______slotChangeListeners=0),this.______slotChangeListeners},set:function(e){this.______slotChangeListeners=e}},____triggerSlotChangeEvent:{value:(0,x["default"])(function(){this.____slotChangeListeners&&this.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1}))})},addEventListener:{value:function(e,t,n){return"slotchange"===e&&(0,K["default"])(this)&&this.____slotChangeListeners++,this.__addEventListener(e,t,n)}},appendChild:{value:function(e){return A(this,e),e}},assignedSlot:{get:function(){var e=pe.get(this);if(!e)return null;var t=ge.get(e),n=ve.get(t),r=ce.get(n);return"open"===r?e:null}},attachShadow:{value:function(e){var t=this,n=e&&e.mode;if("closed"!==n&&"open"!==n)throw new Error('You must specify { mode } as "open" or "closed" to attachShadow().');var r=de.get(this);if(r)return r;var o=a([].slice.call(this.childNodes)),u=document.createElement(e.polyfillShadowRootTagName||ne);return ce.set(this,n),de.set(this,u),ve.set(u,this),_e.set(u,{}),F["default"]?fe.set(this,o):i(this,"childNodes",o),o.forEach(function(e){t.__removeChild(e),F["default"]?he.set(e,t):i(e,"parentNode",t)}),this.__appendChild(u)}},childElementCount:{get:function(){return this.children.length}},childNodes:{get:function(){if(F["default"]&&"node"===s(this))return this.__childNodes;var e=fe.get(this);return e||fe.set(this,e=a([])),e}},children:{get:function(){var e=[];return(0,k.eachChildNode)(this,function(t){1===t.nodeType&&e.push(t)}),a(e)}},firstChild:{get:function(){return this.childNodes[0]||null}},firstElementChild:{get:function(){return this.children[0]||null}},assignedNodes:{value:function(){if((0,K["default"])(this)){var e=se.get(this);return e||se.set(this,e=[]),e}}},hasChildNodes:{value:function(){return this.childNodes.length>0}},innerHTML:{get:function(){function e(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName.toLowerCase()in o}var t="",n=function(e){return e.outerHTML},r={};r[Node.ELEMENT_NODE]=n,r[Node.COMMENT_NODE]=I["default"];var o={style:!0,script:!0,xmp:!0,iframe:!0,noembed:!0,noframes:!0,noscript:!0,plaintext:!0},i=e(this);return(0,k.eachChildNode)(this,function(e){var o=void 0;o=e.nodeType===Node.TEXT_NODE?i?X["default"]:B["default"]:r[e.nodeType]||n,t+=o(e)}),t},set:function(e){for(var t=o(e);this.hasChildNodes();)this.removeChild(this.firstChild);var n=(0,U["default"])(t);for(te.call(n,function(e){return L(e)});t.hasChildNodes();){var r=t.firstChild;t.removeChild(r),this.appendChild(r)}}},insertBefore:{value:function(e,t){return A(this,e,t),e}},lastChild:{get:function(){var e=this.childNodes;return e[e.length-1]||null}},lastElementChild:{get:function(){var e=this.children;return e[e.length-1]||null}},name:{get:function(){return this.getAttribute("name")},set:function(e){var t=this.name,n=this.__setAttribute("name",e);if(e===t)return n;if(!(0,K["default"])(this))return n;var r=ge.get(this);return r&&(T(r,this),y(r,this)),n}},nextSibling:{get:function(){var e=this;return(0,k.eachChildNode)(this.parentNode,function(t,n,r){if(e===t)return r[n+1]||null})}},nextElementSibling:{get:function(){var e=this,t=void 0;return(0,k.eachChildNode)(this.parentNode,function(n){return t&&1===n.nodeType?n:void(e===n&&(t=!0))})}},outerHTML:{get:function(){var e=this.tagName.toLowerCase(),t=Array.prototype.slice.call(this.attributes).map(function(e){return" "+e.name+(e.value?'="'+e.value+'"':"")}).join("");return"<"+e+t+">"+this.innerHTML+"</"+e+">"},set:function(e){if(this.parentNode){var t=o(e);this.parentNode.replaceChild(t.firstChild,this)}else{if(!F["default"])throw new Error("Failed to set the 'outerHTML' property on 'Element': This element has no parent node.");this.__outerHTML=e}}},parentElement:{get:function(){return c(this.parentNode,function(e){return 1===e.nodeType})}},parentNode:{get:function(){return he.get(this)||this.__parentNode||null}},previousSibling:{get:function(){var e=this;return(0,k.eachChildNode)(this.parentNode,function(t,n,r){if(e===t)return r[n-1]||null})}},previousElementSibling:{get:function(){var e=this,t=void 0;return(0,k.eachChildNode)(this.parentNode,function(n){return t&&e===n?t:void(1===n.nodeType&&(t=n))})}},removeChild:{value:function(e){var t=s(this);switch(t){case"node":if(F["default"])return he.set(e,null),this.__removeChild(e);C(this,e);break;case"slot":O(this,e);break;case"host":w(this,e);break;case"root":M(this,e)}return e}},removeEventListener:{value:function(e,t,n){return"slotchange"===e&&this.____slotChangeListeners&&(0,K["default"])(this)&&this.____slotChangeListeners--,this.__removeEventListener(e,t,n)}},replaceChild:{value:function(e,t){return this.insertBefore(e,t),this.removeChild(t)}},setAttribute:{value:function(e,t){return"slot"===e&&(this[e]=t),(0,K["default"])(this)&&"name"===e&&(this[e]=t),this.__setAttribute(e,t)}},shadowRoot:{get:function(){return"open"===ce.get(this)?de.get(this):null}},slot:{get:function(){return this.getAttribute("slot")},set:function(e){var t=this.name,n=this.__setAttribute("slot",e);if(t===e)return n;var r=pe.get(this),o=r&&ge.get(r),i=o&&ve.get(o);return i&&(w(i,this),N(i,this)),n}},textContent:{get:function(){var e="";return(0,k.eachChildNode)(this,function(t){t.nodeType!==Node.COMMENT_NODE&&(e+=t.textContent)}),e},set:function(e){for(;this.hasChildNodes();)this.removeChild(this.firstChild);e&&this.appendChild(document.createTextNode(e))}}};t["default"]=function(){var e=Comment.prototype,t=HTMLElement.prototype,n=SVGElement.prototype,r=Text.prototype,o=document.createTextNode(""),i=document.createComment("");Object.keys(Ne).forEach(function(u){var a=Ne[u];if(a.configurable=!0,a.enumerable=!0,a.hasOwnProperty("value")&&(a.writable=!0),F["default"]||re.indexOf(u)===-1){var l=(0,W["default"])(t,u),s=(0,W["default"])(r,u),c=(0,W["default"])(e,u),d=u in o&&oe.indexOf(u)===-1||~ie.indexOf(u),f=u in i&&ue.indexOf(u)===-1||~ae.indexOf(u),h="__"+u;Object.defineProperty(t,u,a),Object.defineProperty(n,u,a),l&&(Object.defineProperty(t,h,l),Object.defineProperty(n,h,l)),d&&Object.defineProperty(r,u,a),d&&s&&Object.defineProperty(r,h,s),f&&Object.defineProperty(e,u,a),f&&c&&Object.defineProperty(e,h,c)}})}},function(e,t,n){var r=n(6);e.exports=function(e,t,n){function o(){var c=r()-l;c<t&&c>0?i=setTimeout(o,t-c):(i=null,n||(s=e.apply(a,u),i||(a=u=null)))}var i,u,a,l,s;return null==t&&(t=100),function(){a=this,u=arguments,l=r();var c=n&&!i;return i||(i=setTimeout(o,t)),c&&(s=e.apply(a,u),a=u=null),s}}},function(e,t){function n(){return(new Date).getTime()}e.exports=Date.now||n},function(e,t,n){void function(t,n,r){function o(e,t,n){return"function"==typeof t&&(n=t,t=i(n).replace(/_$/,"")),l(e,t,{configurable:!0,writable:!0,value:n})}function i(e){return"function"!=typeof e?"":"name"in e?e.name:s.call(e).match(f)[1]}function u(e){function t(t,o){return o||2===arguments.length?n.set(t,o):(o=n.get(t),o===r&&(o=e(t),n.set(t,o))),o}var n=new p;return e||(e=v),t}var a=Object.getOwnPropertyNames,l=Object.defineProperty,s=Function.prototype.toString,c=Object.create,d=Object.prototype.hasOwnProperty,f=/^\n?function\s?(\w*)?_?\(/,h=function(){function e(){var e=u(),r={};this.unlock=function(o){var i=f(o);if(d.call(i,e))return i[e](r);var u=c(null,t);return l(i,e,{value:new Function("s","l",n)(r,u)}),u}}var t={value:{writable:!0,value:r}},n="return function(k){if(k===s)return l}",i=c(null),u=function(){var e=Math.random().toString(36).slice(2);return e in i?u():i[e]=e},s=u(),f=function(e){if(d.call(e,s))return e[s];if(!Object.isExtensible(e))throw new TypeError("Object must be extensible");var t=c(null);return l(e,s,{value:t}),t};return o(Object,function(e){var t=a(e);return d.call(e,s)&&t.splice(t.indexOf(s),1),t}),o(e.prototype,function(e){return this.unlock(e).value}),o(e.prototype,function(e,t){this.unlock(e).value=t}),e}(),p=function(e){function u(e){return this===t||null==this||this===u.prototype?new u(e):(p(this,new h),void _(this,e))}function a(e){f(e);var t=v(this).get(e);return t===n?r:t}function l(e,t){f(e),v(this).set(e,t===r?n:t)}function s(e){return f(e),v(this).get(e)!==r}function c(e){f(e);var t=v(this),n=t.get(e)!==r;return t.set(e,r),n}function d(){return v(this),"[object WeakMap]"}var f=function(e){if(null==e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("Invalid WeakMap key")},p=function(t,n){var r=e.unlock(t);if(r.value)throw new TypeError("Object is already a WeakMap");r.value=n},v=function(t){var n=e.unlock(t).value;if(!n)throw new TypeError("WeakMap is not generic");return n},_=function(e,t){null!==t&&"object"==typeof t&&"function"==typeof t.forEach&&t.forEach(function(n,r){n instanceof Array&&2===n.length&&l.call(e,t[r][0],t[r][1])})};try{var g=("return "+c).replace("e_","\\u0065"),m=new Function("unwrap","validate",g)(v,f)}catch(N){var m=c}var g=(""+Object).split("Object"),y=function(){return g[0]+i(this)+g[1]};o(y,y);var b={__proto__:[]}instanceof Array?function(e){e.__proto__=y}:function(e){o(e,y)};return b(u),[d,a,l,s,m].forEach(function(e){o(u.prototype,e),b(e)}),u}(new h),v=Object.create?function(){return Object.create(null)}:function(){return{}};e.exports=p,p.createStorage=u,t.WeakMap&&(t.WeakMap.createStorage=u)}((0,eval)("this"))},function(e,t){"use strict";function n(e,t){if(e)for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var i=t(n[o],o,n);if("undefined"!=typeof i)return i}}function r(e){for(var t=[],n=e.length-1;n>=0;n--)t.push(e[n]);return t}function o(e,t){if(e instanceof DocumentFragment)for(var n=e.childNodes,o=n.length,i=o-1;i>=0;i--){var u=r(e.childNodes)[i];t(u,i)}else t(e,0)}Object.defineProperty(t,"__esModule",{value:!0}),t.eachChildNode=n,t.eachNodeOrFragmentNodes=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(10),i=r(o),u=(0,i["default"])(Element.prototype,"innerHTML");t["default"]=!!u},function(e,t){"use strict";function n(e,t){for(var n=void 0;e&&!(n=Object.getOwnPropertyDescriptor(e,t));)e=Object.getPrototypeOf(e);return n}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e,t){e instanceof Node&&(e=r);var o=n(e,t);if(o){var i=o.get,u=o.set,a={configurable:!0,enumerable:!0};if(i)return a.get=i,a.set=u,a;if("function"==typeof e[t])return a.value=e[t],a}var l=Object.getOwnPropertyDescriptor(e,t);if(l&&l.get)return l};var r=document.createElement("div")},function(e,t){"use strict";function n(e){return e.textContent.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n},function(e,t){"use strict";function n(e){return e.textContent}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n},function(e,t){"use strict";function n(e){return e.text||"<!--"+e.textContent+"-->"}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.childNodes;if(u.shadowDomV0&&!u.shadowDomV1)return[].concat(o(e.querySelectorAll("content")));if(!n||[Node.ELEMENT_NODE,Node.DOCUMENT_FRAGMENT_NODE].indexOf(e.nodeType)===-1)return t;for(var r=n.length,a=0;a<r;a++){var s=n[a];(0,l["default"])(s)&&t.push(s),i(s,t)}return t}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=i;var u=n(2),a=n(15),l=r(a)},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){return"SLOT"===e.tagName}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){return"_SHADOW_ROOT_"===e.tagName}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){return Array.prototype.slice.call(e)}}])}); | ||
//# sourceMappingURL=index-with-deps.min.js.map |
@@ -1048,2 +1048,7 @@ (function (global, factory) { | ||
// safari doesn't update its children properly for some reason, so it needs a little push | ||
if (!canPatchNativeAccessors && parentNode) { | ||
parentNode.removeChild(newNode); | ||
} | ||
if (nodeType === 'node') { | ||
@@ -1050,0 +1055,0 @@ if (canPatchNativeAccessors) { |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("custom-event-polyfill"),require("debounce"),require("weakmap")):"function"==typeof define&&define.amd?define(["exports","custom-event-polyfill","debounce","weakmap"],t):t(e.skatejsNamedSlots=e.skatejsNamedSlots||{},e.customEventPolyfill,e.debounce,e.WeakMap)}(this,function(e,t,n,r){function o(e,t){if(e)for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var i=t(n[o],o,n);if("undefined"!=typeof i)return i}}function i(e){for(var t=[],n=e.length-1;n>=0;n--)t.push(e[n]);return t}function s(e,t){if(e instanceof DocumentFragment)for(var n=e.childNodes,r=n.length,o=r-1;o>=0;o--){var s=i(e.childNodes)[o];t(s,o)}else t(e,0)}function u(e,t){for(var n=void 0;e&&!(n=Object.getOwnPropertyDescriptor(e,t));)e=Object.getPrototypeOf(e);return n}function a(e){return e.textContent.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function l(e){return e.textContent}function c(e){return e.text||"<!--"+e.textContent+"-->"}function d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.childNodes;if(F&&!W)return[].concat(J(e.querySelectorAll("content")));if(!n||[Node.ELEMENT_NODE,Node.DOCUMENT_FRAGMENT_NODE].indexOf(e.nodeType)===-1)return t;for(var r=n.length,o=0;o<r;o++){var i=n[o];z(i)&&t.push(i),d(i,t)}return t}function h(e){var t=document.createElement("div");if(V)return t.__innerHTML=e,t;for(var n=ge.parseFromString("<div>"+e+"</div>","text/html").body.firstChild;n.hasChildNodes();){var r=n.firstChild;n.removeChild(r),t.appendChild(r)}return document.importNode(t,!0)}function f(e,t,n){Object.defineProperty(e,t,{configurable:!0,get:function(){return n}})}function p(e){return this[e]}function v(e){return e.item=p,e}function g(e){return!!le.get(e)}function _(e){return g(e)?"host":z(e)?"slot":K(e)?"root":"node"}function m(e,t){for(;e&&e!==document;){if(t(e))return e;e=e.parentNode}}function N(e){return e.getAttribute&&e.getAttribute("name")||"default"}function y(e){return e.getAttribute&&e.getAttribute("slot")||"default"}function b(e,t,n){if(se.indexOf(t.nodeType)!==-1){var r=e.assignedNodes(),o=0===r.length,i=r.indexOf(n);he.set(t,e),o&&$.call(e.childNodes,function(t){return e.__removeChild(t)}),i>-1?(e.__insertBefore(t,void 0!==n?n:null),r.splice(i,0,t)):(e.__appendChild(t),r.push(t)),e.____triggerSlotChangeEvent()}}function E(e){var t=he.get(e);if(t){var n=t.assignedNodes(),r=n.indexOf(e);if(r>-1){var o=1===n.length;n.splice(r,1),he.set(e,null),t.__removeChild(e),o&&$.call(t.childNodes,function(e){return t.__appendChild(e)}),t.____triggerSlotChangeEvent()}}}function C(e,t){for(var n=e.childNodes,r=n.length,o=0;o<r;o++)if(n[o]===t)return o;return-1}function O(e,t,n,r){var o=C(e,n);s(t,function(t,n){r(t,n),V?de.set(t,e):f(t,"parentNode",e),o>-1?Z.splice.call(e.childNodes,o+n,0,t):Z.push.call(e.childNodes,t)})}function w(e,t,n){var r=C(e,t);r>-1&&(n(t,0),V?de.set(t,null):f(t,"parentNode",null),Z.splice.call(e.childNodes,r,1))}function T(e,t,n){O(e,t,n,function(t){e.__insertBefore(t,void 0!==n?n:null)})}function L(e,t,n){O(e,t,n,function(t){var r=le.get(e),o=pe.get(r),i=o[y(t)];i&&b(i,t,n)})}function A(e,t){var n=N(t);V||Array.isArray(t.childNodes)||f(t,"childNodes",Q(t.childNodes)),pe.get(e)[n]=t,ve.has(t)||ve.set(t,e),o(fe.get(e),function(e){e.assignedSlot||n!==y(e)||b(t,e)})}function S(e,t,n){s(t,function(t){if(z(t))A(e,t);else{var n=d(t);if(n)for(var r=n.length,o=0;o<r;o++)A(e,n[o])}}),T(e,t,n)}function M(e,t,n){var r=0===e.assignedNodes().length;O(e,t,n,function(t){r&&e.__insertBefore(t,void 0!==n?n:null)})}function x(e,t){var n=0===e.assignedNodes().length;w(e,t,function(){n&&e.__removeChild(t)})}function j(e,t){w(e,t,function(){e.__removeChild(t)})}function P(e,t){w(e,t,function(){E(t)})}function H(e,t){var n=Array.prototype.slice.call(t.assignedNodes());n.forEach(E),delete pe.get(e)[N(t)],ve.delete(t)}function k(e,t){w(e,t,function(){if(z(t))H(e,t);else{var n=d(t);if(n)for(var r=0;r<n.length;r++)H(e,n[r])}e.__removeChild(t)})}function D(e){if(K(e))return e;if(e.parentNode)return D(e.parentNode)}function R(e,t,n){var r=_(e),o=t.parentNode,i=D(e);return V||Array.isArray(e.childNodes)||f(e,"childNodes",Q(e.childNodes)),i&&"slot"===_(t)&&A(i,t),o&&"host"===_(o)&&(V?de.set(t,null):f(t,"parentNode",null)),"node"===r?V?(de.set(t,e),e.__insertBefore(t,void 0!==n?n:null)):T(e,t,n):"slot"===r?M(e,t,n):"host"===r?L(e,t,n):"root"===r?S(e,t,n):void 0}function q(e){if(V&&"slot"===_(e)&&e.__childNodes.length!==e.childNodes.length){for(;e.hasChildNodes();)e.removeChild(e.firstChild);$.call(e.__childNodes,function(t){return e.appendChild(t)})}}n="default"in n?n.default:n,r="default"in r?r.default:r;var B=document.createElement("div"),F=!!B.createShadowRoot,W=!!B.attachShadow,I="__shadowRoot",X=function(){function e(e){for(var t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT),n=[];t.nextNode();){var r=t.currentNode;"SLOT"===r.tagName&&n.push(r)}n.forEach(function(e){var t=e.getAttribute("name"),n=document.createElement("slot");for(t&&n.setAttribute("name",t),e.parentNode.replaceChild(n,e);e.hasChildNodes();)n.appendChild(e.firstChild)})}var t=function(e){for(var t=e.getAttribute("name"),n=e;n;){var r=n[I];if(r&&r.contains(e))break;n=n.parentNode}if(!n)return[];for(var o=n.childNodes,i=o.length,s=[],u=0;u<i;u++){var a=o[u],l=a.getAttribute?a.getAttribute("slot"):null;t===l&&s.push(a)}return s},n=HTMLElement.prototype,r=n.getAttribute,o=n.setAttribute,i=Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML"),s=Object.getOwnPropertyDescriptor(ShadowRoot.prototype,"innerHTML"),u=function(e){return"slot"===e?"content":e},a=document.createElement.bind(document),l=document.createElementNS.bind(document);document.createElement=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return a.apply(void 0,[u(e)].concat(n))},document.createElementNS=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return l.apply(void 0,[e,u(t)].concat(r))},Object.defineProperty(Element.prototype,"innerHTML",{configurable:!0,get:i.get,set:function(t){i.set.call(this,t),e(this)}}),Object.defineProperty(ShadowRoot.prototype,"innerHTML",{configurable:!0,get:s.get,set:function(t){s.set.call(this,t),e(this)}}),Object.defineProperty(Node.prototype,"assignedSlot",{get:function(){var e=this.parentNode;if(e){var t=e.shadowRoot;if(!t)return null;for(var n=t.querySelectorAll("content"),r=0;r<n.length;r++){var o=n[r];if(o.assignedNodes().indexOf(this)>-1)return o}}return null}}),HTMLElement.prototype.attachShadow=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.mode;if("closed"!==n&&"open"!==n)throw new Error('You must specify { mode } as "open" or "closed" to attachShadow().');var r=this.createShadowRoot();"closed"===n&&Object.defineProperty(this,"shadowRoot",{configurable:!0,get:function(){return null}}),Object.defineProperty(r,"parentNode",{get:function(){return e}});var o=new MutationObserver(function(t){var n=e[I];t.forEach(function(e){var t=e.addedNodes,r=e.removedNodes,o={},i=function(e){return o[e.getAttribute&&e.getAttribute("slot")||"__default"]=!0};if(t)for(var s=t.length,u=0;u<s;u++)i(t[u]);if(r)for(var a=r.length,l=0;l<a;l++)i(r[l]);Object.keys(o).forEach(function(e){var t="__default"===e?n.querySelector("content:not([name])")||n.querySelector('content[name=""]'):n.querySelector('content[name="'+e+'"]');t&&t.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1}))})})});return o.observe(this,{childList:!0}),this[I]=r},Object.defineProperty(HTMLContentElement.prototype,"name",{get:function(){return this.getAttribute("name")},set:function(e){return this.setAttribute("name",e)}}),Object.defineProperty(HTMLElement.prototype,"slot",{get:function(){return this.getAttribute("slot")},set:function(e){return this.setAttribute("slot",e)}}),HTMLContentElement.prototype.assignedNodes=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.deep,r=[],o=n?this.getDistributedNodes():t(this),i=0;i<o.length;i++){var s=o[i],u=s.nodeType;u!==Node.ELEMENT_NODE&&u!==Node.TEXT_NODE||r.push(s)}return r},HTMLContentElement.prototype.getAttribute=function(e){if("name"===e){var t=r.call(this,"select");return t?t.match(/\[slot=['"]?(.*?)['"]?\]/)[1]:null}return r.call(this,e)},HTMLContentElement.prototype.setAttribute=function(e,t){return"name"===e&&(e="select",t="[slot='"+t+"']"),o.call(this,e,t)}},G=document.createElement("div"),Y=function(e,t){e instanceof Node&&(e=G);var n=u(e,t);if(n){var r=n.get,o=n.set,i={configurable:!0,enumerable:!0};if(r)return i.get=r,i.set=o,i;if("function"==typeof e[t])return i.value=e[t],i}var s=Object.getOwnPropertyDescriptor(e,t);if(s&&s.get)return s},U=Y(Element.prototype,"innerHTML"),V=!!U,z=function(e){return"SLOT"===e.tagName},J=(function(){function e(e){this.value=e}function t(t){function n(e,t){return new Promise(function(n,o){var u={key:e,arg:t,resolve:n,reject:o,next:null};s?s=s.next=u:(i=s=u,r(e,t))})}function r(n,i){try{var s=t[n](i),u=s.value;u instanceof e?Promise.resolve(u.value).then(function(e){r("next",e)},function(e){r("throw",e)}):o(s.done?"return":"normal",s.value)}catch(e){o("throw",e)}}function o(e,t){switch(e){case"return":i.resolve({value:t,done:!0});break;case"throw":i.reject(t);break;default:i.resolve({value:t,done:!1})}i=i.next,i?r(i.key,i.arg):s=null}var i,s;this._invoke=n,"function"!=typeof t.return&&(this.return=void 0)}return"function"==typeof Symbol&&Symbol.asyncIterator&&(t.prototype[Symbol.asyncIterator]=function(){return this}),t.prototype.next=function(e){return this._invoke("next",e)},t.prototype.throw=function(e){return this._invoke("throw",e)},t.prototype.return=function(e){return this._invoke("return",e)},{wrap:function(e){return function(){return new t(e.apply(this,arguments))}},await:function(t){return new e(t)}}}(),function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}),K=function(e){return"_SHADOW_ROOT_"===e.tagName},Q=function(e){return Array.prototype.slice.call(e)},Z=Array.prototype,$=Z.forEach,ee="_shadow_root_",te=["childNodes","parentNode"],ne=["textContent"],re=["assignedSlot"],oe=["textContent"],ie=[],se=[Node.ELEMENT_NODE,Node.TEXT_NODE],ue=new r,ae=new r,le=new r,ce=new r,de=new r,he=new r,fe=new r,pe=new r,ve=new r,ge=new DOMParser,_e={____assignedNodes:{get:function(){return this.______assignedNodes||(this.______assignedNodes=[])}},____isInFallbackMode:{get:function(){return 0===this.assignedNodes().length}},____slotChangeListeners:{get:function(){return"undefined"==typeof this.______slotChangeListeners&&(this.______slotChangeListeners=0),this.______slotChangeListeners},set:function(e){this.______slotChangeListeners=e}},____triggerSlotChangeEvent:{value:n(function(){this.____slotChangeListeners&&this.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1}))})},addEventListener:{value:function(e,t,n){return"slotchange"===e&&z(this)&&this.____slotChangeListeners++,this.__addEventListener(e,t,n)}},appendChild:{value:function(e){return R(this,e),e}},assignedSlot:{get:function(){var e=he.get(this);if(!e)return null;var t=ve.get(e),n=fe.get(t),r=ae.get(n);return"open"===r?e:null}},attachShadow:{value:function(e){var t=this,n=e&&e.mode;if("closed"!==n&&"open"!==n)throw new Error('You must specify { mode } as "open" or "closed" to attachShadow().');var r=le.get(this);if(r)return r;var o=v([].slice.call(this.childNodes)),i=document.createElement(e.polyfillShadowRootTagName||ee);return ae.set(this,n),le.set(this,i),fe.set(i,this),pe.set(i,{}),V?ce.set(this,o):f(this,"childNodes",o),o.forEach(function(e){t.__removeChild(e),V?de.set(e,t):f(e,"parentNode",t)}),this.__appendChild(i)}},childElementCount:{get:function(){return this.children.length}},childNodes:{get:function(){if(V&&"node"===_(this))return this.__childNodes;var e=ce.get(this);return e||ce.set(this,e=v([])),e}},children:{get:function(){var e=[];return o(this,function(t){1===t.nodeType&&e.push(t)}),v(e)}},firstChild:{get:function(){return this.childNodes[0]||null}},firstElementChild:{get:function(){return this.children[0]||null}},assignedNodes:{value:function(){if(z(this)){var e=ue.get(this);return e||ue.set(this,e=[]),e}}},hasChildNodes:{value:function(){return this.childNodes.length>0}},innerHTML:{get:function(){function e(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName.toLowerCase()in i}var t="",n=function(e){return e.outerHTML},r={};r[Node.ELEMENT_NODE]=n,r[Node.COMMENT_NODE]=c;var i={style:!0,script:!0,xmp:!0,iframe:!0,noembed:!0,noframes:!0,noscript:!0,plaintext:!0},s=e(this);return o(this,function(e){var o=void 0;o=e.nodeType===Node.TEXT_NODE?s?l:a:r[e.nodeType]||n,t+=o(e)}),t},set:function(e){for(var t=h(e);this.hasChildNodes();)this.removeChild(this.firstChild);var n=d(t);for($.call(n,function(e){return q(e)});t.hasChildNodes();){var r=t.firstChild;t.removeChild(r),this.appendChild(r)}}},insertBefore:{value:function(e,t){return R(this,e,t),e}},lastChild:{get:function(){var e=this.childNodes;return e[e.length-1]||null}},lastElementChild:{get:function(){var e=this.children;return e[e.length-1]||null}},name:{get:function(){return this.getAttribute("name")},set:function(e){var t=this.name,n=this.__setAttribute("name",e);if(e===t)return n;if(!z(this))return n;var r=ve.get(this);return r&&(H(r,this),A(r,this)),n}},nextSibling:{get:function(){var e=this;return o(this.parentNode,function(t,n,r){if(e===t)return r[n+1]||null})}},nextElementSibling:{get:function(){var e=this,t=void 0;return o(this.parentNode,function(n){return t&&1===n.nodeType?n:void(e===n&&(t=!0))})}},outerHTML:{get:function(){var e=this.tagName.toLowerCase(),t=Array.prototype.slice.call(this.attributes).map(function(e){return" "+e.name+(e.value?'="'+e.value+'"':"")}).join("");return"<"+e+t+">"+this.innerHTML+"</"+e+">"},set:function(e){if(this.parentNode){var t=h(e);this.parentNode.replaceChild(t.firstChild,this)}else{if(!V)throw new Error("Failed to set the 'outerHTML' property on 'Element': This element has no parent node.");this.__outerHTML=e}}},parentElement:{get:function(){return m(this.parentNode,function(e){return 1===e.nodeType})}},parentNode:{get:function(){return de.get(this)||this.__parentNode||null}},previousSibling:{get:function(){var e=this;return o(this.parentNode,function(t,n,r){if(e===t)return r[n-1]||null})}},previousElementSibling:{get:function(){var e=this,t=void 0;return o(this.parentNode,function(n){return t&&e===n?t:void(1===n.nodeType&&(t=n))})}},removeChild:{value:function(e){var t=_(this);switch(t){case"node":if(V)return de.set(e,null),this.__removeChild(e);j(this,e);break;case"slot":x(this,e);break;case"host":P(this,e);break;case"root":k(this,e)}return e}},removeEventListener:{value:function(e,t,n){return"slotchange"===e&&this.____slotChangeListeners&&z(this)&&this.____slotChangeListeners--,this.__removeEventListener(e,t,n)}},replaceChild:{value:function(e,t){return this.insertBefore(e,t),this.removeChild(t)}},setAttribute:{value:function(e,t){return"slot"===e&&(this[e]=t),z(this)&&"name"===e&&(this[e]=t),this.__setAttribute(e,t)}},shadowRoot:{get:function(){return"open"===ae.get(this)?le.get(this):null}},slot:{get:function(){return this.getAttribute("slot")},set:function(e){var t=this.name,n=this.__setAttribute("slot",e);if(t===e)return n;var r=he.get(this),o=r&&ve.get(r),i=o&&fe.get(o);return i&&(P(i,this),L(i,this)),n}},textContent:{get:function(){var e="";return o(this,function(t){t.nodeType!==Node.COMMENT_NODE&&(e+=t.textContent)}),e},set:function(e){for(;this.hasChildNodes();)this.removeChild(this.firstChild);e&&this.appendChild(document.createTextNode(e))}}},me=function(){var e=Comment.prototype,t=HTMLElement.prototype,n=SVGElement.prototype,r=Text.prototype,o=document.createTextNode(""),i=document.createComment("");Object.keys(_e).forEach(function(s){var u=_e[s];if(u.configurable=!0,u.enumerable=!0,u.hasOwnProperty("value")&&(u.writable=!0),V||te.indexOf(s)===-1){var a=Y(t,s),l=Y(r,s),c=Y(e,s),d=s in o&&ne.indexOf(s)===-1||~re.indexOf(s),h=s in i&&oe.indexOf(s)===-1||~ie.indexOf(s),f="__"+s;Object.defineProperty(t,s,u),Object.defineProperty(n,s,u),a&&(Object.defineProperty(t,f,a),Object.defineProperty(n,f,a)),d&&Object.defineProperty(r,s,u),d&&l&&Object.defineProperty(r,f,l),h&&Object.defineProperty(e,s,u),h&&c&&Object.defineProperty(e,f,c)}})};W||(F?X():me()),e.v0=X,e.v1=me,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("custom-event-polyfill"),require("debounce"),require("weakmap")):"function"==typeof define&&define.amd?define(["exports","custom-event-polyfill","debounce","weakmap"],t):t(e.skatejsNamedSlots=e.skatejsNamedSlots||{},e.customEventPolyfill,e.debounce,e.WeakMap)}(this,function(e,t,n,r){function o(e,t){if(e)for(var n=e.childNodes,r=n.length,o=0;o<r;o++){var i=t(n[o],o,n);if("undefined"!=typeof i)return i}}function i(e){for(var t=[],n=e.length-1;n>=0;n--)t.push(e[n]);return t}function s(e,t){if(e instanceof DocumentFragment)for(var n=e.childNodes,r=n.length,o=r-1;o>=0;o--){var s=i(e.childNodes)[o];t(s,o)}else t(e,0)}function u(e,t){for(var n=void 0;e&&!(n=Object.getOwnPropertyDescriptor(e,t));)e=Object.getPrototypeOf(e);return n}function a(e){return e.textContent.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function l(e){return e.textContent}function c(e){return e.text||"<!--"+e.textContent+"-->"}function d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.childNodes;if(F&&!W)return[].concat(J(e.querySelectorAll("content")));if(!n||[Node.ELEMENT_NODE,Node.DOCUMENT_FRAGMENT_NODE].indexOf(e.nodeType)===-1)return t;for(var r=n.length,o=0;o<r;o++){var i=n[o];z(i)&&t.push(i),d(i,t)}return t}function h(e){var t=document.createElement("div");if(V)return t.__innerHTML=e,t;for(var n=ge.parseFromString("<div>"+e+"</div>","text/html").body.firstChild;n.hasChildNodes();){var r=n.firstChild;n.removeChild(r),t.appendChild(r)}return document.importNode(t,!0)}function f(e,t,n){Object.defineProperty(e,t,{configurable:!0,get:function(){return n}})}function p(e){return this[e]}function v(e){return e.item=p,e}function g(e){return!!le.get(e)}function _(e){return g(e)?"host":z(e)?"slot":K(e)?"root":"node"}function m(e,t){for(;e&&e!==document;){if(t(e))return e;e=e.parentNode}}function N(e){return e.getAttribute&&e.getAttribute("name")||"default"}function y(e){return e.getAttribute&&e.getAttribute("slot")||"default"}function b(e,t,n){if(se.indexOf(t.nodeType)!==-1){var r=e.assignedNodes(),o=0===r.length,i=r.indexOf(n);he.set(t,e),o&&$.call(e.childNodes,function(t){return e.__removeChild(t)}),i>-1?(e.__insertBefore(t,void 0!==n?n:null),r.splice(i,0,t)):(e.__appendChild(t),r.push(t)),e.____triggerSlotChangeEvent()}}function E(e){var t=he.get(e);if(t){var n=t.assignedNodes(),r=n.indexOf(e);if(r>-1){var o=1===n.length;n.splice(r,1),he.set(e,null),t.__removeChild(e),o&&$.call(t.childNodes,function(e){return t.__appendChild(e)}),t.____triggerSlotChangeEvent()}}}function C(e,t){for(var n=e.childNodes,r=n.length,o=0;o<r;o++)if(n[o]===t)return o;return-1}function O(e,t,n,r){var o=C(e,n);s(t,function(t,n){r(t,n),V?de.set(t,e):f(t,"parentNode",e),o>-1?Z.splice.call(e.childNodes,o+n,0,t):Z.push.call(e.childNodes,t)})}function w(e,t,n){var r=C(e,t);r>-1&&(n(t,0),V?de.set(t,null):f(t,"parentNode",null),Z.splice.call(e.childNodes,r,1))}function T(e,t,n){O(e,t,n,function(t){e.__insertBefore(t,void 0!==n?n:null)})}function L(e,t,n){O(e,t,n,function(t){var r=le.get(e),o=pe.get(r),i=o[y(t)];i&&b(i,t,n)})}function A(e,t){var n=N(t);V||Array.isArray(t.childNodes)||f(t,"childNodes",Q(t.childNodes)),pe.get(e)[n]=t,ve.has(t)||ve.set(t,e),o(fe.get(e),function(e){e.assignedSlot||n!==y(e)||b(t,e)})}function S(e,t,n){s(t,function(t){if(z(t))A(e,t);else{var n=d(t);if(n)for(var r=n.length,o=0;o<r;o++)A(e,n[o])}}),T(e,t,n)}function M(e,t,n){var r=0===e.assignedNodes().length;O(e,t,n,function(t){r&&e.__insertBefore(t,void 0!==n?n:null)})}function x(e,t){var n=0===e.assignedNodes().length;w(e,t,function(){n&&e.__removeChild(t)})}function j(e,t){w(e,t,function(){e.__removeChild(t)})}function P(e,t){w(e,t,function(){E(t)})}function H(e,t){var n=Array.prototype.slice.call(t.assignedNodes());n.forEach(E),delete pe.get(e)[N(t)],ve.delete(t)}function k(e,t){w(e,t,function(){if(z(t))H(e,t);else{var n=d(t);if(n)for(var r=0;r<n.length;r++)H(e,n[r])}e.__removeChild(t)})}function D(e){if(K(e))return e;if(e.parentNode)return D(e.parentNode)}function R(e,t,n){var r=_(e),o=t.parentNode,i=D(e);return V||Array.isArray(e.childNodes)||f(e,"childNodes",Q(e.childNodes)),i&&"slot"===_(t)&&A(i,t),o&&"host"===_(o)&&(V?de.set(t,null):f(t,"parentNode",null)),!V&&o&&o.removeChild(t),"node"===r?V?(de.set(t,e),e.__insertBefore(t,void 0!==n?n:null)):T(e,t,n):"slot"===r?M(e,t,n):"host"===r?L(e,t,n):"root"===r?S(e,t,n):void 0}function q(e){if(V&&"slot"===_(e)&&e.__childNodes.length!==e.childNodes.length){for(;e.hasChildNodes();)e.removeChild(e.firstChild);$.call(e.__childNodes,function(t){return e.appendChild(t)})}}n="default"in n?n.default:n,r="default"in r?r.default:r;var B=document.createElement("div"),F=!!B.createShadowRoot,W=!!B.attachShadow,I="__shadowRoot",X=function(){function e(e){for(var t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT),n=[];t.nextNode();){var r=t.currentNode;"SLOT"===r.tagName&&n.push(r)}n.forEach(function(e){var t=e.getAttribute("name"),n=document.createElement("slot");for(t&&n.setAttribute("name",t),e.parentNode.replaceChild(n,e);e.hasChildNodes();)n.appendChild(e.firstChild)})}var t=function(e){for(var t=e.getAttribute("name"),n=e;n;){var r=n[I];if(r&&r.contains(e))break;n=n.parentNode}if(!n)return[];for(var o=n.childNodes,i=o.length,s=[],u=0;u<i;u++){var a=o[u],l=a.getAttribute?a.getAttribute("slot"):null;t===l&&s.push(a)}return s},n=HTMLElement.prototype,r=n.getAttribute,o=n.setAttribute,i=Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML"),s=Object.getOwnPropertyDescriptor(ShadowRoot.prototype,"innerHTML"),u=function(e){return"slot"===e?"content":e},a=document.createElement.bind(document),l=document.createElementNS.bind(document);document.createElement=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return a.apply(void 0,[u(e)].concat(n))},document.createElementNS=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return l.apply(void 0,[e,u(t)].concat(r))},Object.defineProperty(Element.prototype,"innerHTML",{configurable:!0,get:i.get,set:function(t){i.set.call(this,t),e(this)}}),Object.defineProperty(ShadowRoot.prototype,"innerHTML",{configurable:!0,get:s.get,set:function(t){s.set.call(this,t),e(this)}}),Object.defineProperty(Node.prototype,"assignedSlot",{get:function(){var e=this.parentNode;if(e){var t=e.shadowRoot;if(!t)return null;for(var n=t.querySelectorAll("content"),r=0;r<n.length;r++){var o=n[r];if(o.assignedNodes().indexOf(this)>-1)return o}}return null}}),HTMLElement.prototype.attachShadow=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.mode;if("closed"!==n&&"open"!==n)throw new Error('You must specify { mode } as "open" or "closed" to attachShadow().');var r=this.createShadowRoot();"closed"===n&&Object.defineProperty(this,"shadowRoot",{configurable:!0,get:function(){return null}}),Object.defineProperty(r,"parentNode",{get:function(){return e}});var o=new MutationObserver(function(t){var n=e[I];t.forEach(function(e){var t=e.addedNodes,r=e.removedNodes,o={},i=function(e){return o[e.getAttribute&&e.getAttribute("slot")||"__default"]=!0};if(t)for(var s=t.length,u=0;u<s;u++)i(t[u]);if(r)for(var a=r.length,l=0;l<a;l++)i(r[l]);Object.keys(o).forEach(function(e){var t="__default"===e?n.querySelector("content:not([name])")||n.querySelector('content[name=""]'):n.querySelector('content[name="'+e+'"]');t&&t.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1}))})})});return o.observe(this,{childList:!0}),this[I]=r},Object.defineProperty(HTMLContentElement.prototype,"name",{get:function(){return this.getAttribute("name")},set:function(e){return this.setAttribute("name",e)}}),Object.defineProperty(HTMLElement.prototype,"slot",{get:function(){return this.getAttribute("slot")},set:function(e){return this.setAttribute("slot",e)}}),HTMLContentElement.prototype.assignedNodes=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.deep,r=[],o=n?this.getDistributedNodes():t(this),i=0;i<o.length;i++){var s=o[i],u=s.nodeType;u!==Node.ELEMENT_NODE&&u!==Node.TEXT_NODE||r.push(s)}return r},HTMLContentElement.prototype.getAttribute=function(e){if("name"===e){var t=r.call(this,"select");return t?t.match(/\[slot=['"]?(.*?)['"]?\]/)[1]:null}return r.call(this,e)},HTMLContentElement.prototype.setAttribute=function(e,t){return"name"===e&&(e="select",t="[slot='"+t+"']"),o.call(this,e,t)}},G=document.createElement("div"),Y=function(e,t){e instanceof Node&&(e=G);var n=u(e,t);if(n){var r=n.get,o=n.set,i={configurable:!0,enumerable:!0};if(r)return i.get=r,i.set=o,i;if("function"==typeof e[t])return i.value=e[t],i}var s=Object.getOwnPropertyDescriptor(e,t);if(s&&s.get)return s},U=Y(Element.prototype,"innerHTML"),V=!!U,z=function(e){return"SLOT"===e.tagName},J=(function(){function e(e){this.value=e}function t(t){function n(e,t){return new Promise(function(n,o){var u={key:e,arg:t,resolve:n,reject:o,next:null};s?s=s.next=u:(i=s=u,r(e,t))})}function r(n,i){try{var s=t[n](i),u=s.value;u instanceof e?Promise.resolve(u.value).then(function(e){r("next",e)},function(e){r("throw",e)}):o(s.done?"return":"normal",s.value)}catch(e){o("throw",e)}}function o(e,t){switch(e){case"return":i.resolve({value:t,done:!0});break;case"throw":i.reject(t);break;default:i.resolve({value:t,done:!1})}i=i.next,i?r(i.key,i.arg):s=null}var i,s;this._invoke=n,"function"!=typeof t.return&&(this.return=void 0)}return"function"==typeof Symbol&&Symbol.asyncIterator&&(t.prototype[Symbol.asyncIterator]=function(){return this}),t.prototype.next=function(e){return this._invoke("next",e)},t.prototype.throw=function(e){return this._invoke("throw",e)},t.prototype.return=function(e){return this._invoke("return",e)},{wrap:function(e){return function(){return new t(e.apply(this,arguments))}},await:function(t){return new e(t)}}}(),function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}),K=function(e){return"_SHADOW_ROOT_"===e.tagName},Q=function(e){return Array.prototype.slice.call(e)},Z=Array.prototype,$=Z.forEach,ee="_shadow_root_",te=["childNodes","parentNode"],ne=["textContent"],re=["assignedSlot"],oe=["textContent"],ie=[],se=[Node.ELEMENT_NODE,Node.TEXT_NODE],ue=new r,ae=new r,le=new r,ce=new r,de=new r,he=new r,fe=new r,pe=new r,ve=new r,ge=new DOMParser,_e={____assignedNodes:{get:function(){return this.______assignedNodes||(this.______assignedNodes=[])}},____isInFallbackMode:{get:function(){return 0===this.assignedNodes().length}},____slotChangeListeners:{get:function(){return"undefined"==typeof this.______slotChangeListeners&&(this.______slotChangeListeners=0),this.______slotChangeListeners},set:function(e){this.______slotChangeListeners=e}},____triggerSlotChangeEvent:{value:n(function(){this.____slotChangeListeners&&this.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1}))})},addEventListener:{value:function(e,t,n){return"slotchange"===e&&z(this)&&this.____slotChangeListeners++,this.__addEventListener(e,t,n)}},appendChild:{value:function(e){return R(this,e),e}},assignedSlot:{get:function(){var e=he.get(this);if(!e)return null;var t=ve.get(e),n=fe.get(t),r=ae.get(n);return"open"===r?e:null}},attachShadow:{value:function(e){var t=this,n=e&&e.mode;if("closed"!==n&&"open"!==n)throw new Error('You must specify { mode } as "open" or "closed" to attachShadow().');var r=le.get(this);if(r)return r;var o=v([].slice.call(this.childNodes)),i=document.createElement(e.polyfillShadowRootTagName||ee);return ae.set(this,n),le.set(this,i),fe.set(i,this),pe.set(i,{}),V?ce.set(this,o):f(this,"childNodes",o),o.forEach(function(e){t.__removeChild(e),V?de.set(e,t):f(e,"parentNode",t)}),this.__appendChild(i)}},childElementCount:{get:function(){return this.children.length}},childNodes:{get:function(){if(V&&"node"===_(this))return this.__childNodes;var e=ce.get(this);return e||ce.set(this,e=v([])),e}},children:{get:function(){var e=[];return o(this,function(t){1===t.nodeType&&e.push(t)}),v(e)}},firstChild:{get:function(){return this.childNodes[0]||null}},firstElementChild:{get:function(){return this.children[0]||null}},assignedNodes:{value:function(){if(z(this)){var e=ue.get(this);return e||ue.set(this,e=[]),e}}},hasChildNodes:{value:function(){return this.childNodes.length>0}},innerHTML:{get:function(){function e(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName.toLowerCase()in i}var t="",n=function(e){return e.outerHTML},r={};r[Node.ELEMENT_NODE]=n,r[Node.COMMENT_NODE]=c;var i={style:!0,script:!0,xmp:!0,iframe:!0,noembed:!0,noframes:!0,noscript:!0,plaintext:!0},s=e(this);return o(this,function(e){var o=void 0;o=e.nodeType===Node.TEXT_NODE?s?l:a:r[e.nodeType]||n,t+=o(e)}),t},set:function(e){for(var t=h(e);this.hasChildNodes();)this.removeChild(this.firstChild);var n=d(t);for($.call(n,function(e){return q(e)});t.hasChildNodes();){var r=t.firstChild;t.removeChild(r),this.appendChild(r)}}},insertBefore:{value:function(e,t){return R(this,e,t),e}},lastChild:{get:function(){var e=this.childNodes;return e[e.length-1]||null}},lastElementChild:{get:function(){var e=this.children;return e[e.length-1]||null}},name:{get:function(){return this.getAttribute("name")},set:function(e){var t=this.name,n=this.__setAttribute("name",e);if(e===t)return n;if(!z(this))return n;var r=ve.get(this);return r&&(H(r,this),A(r,this)),n}},nextSibling:{get:function(){var e=this;return o(this.parentNode,function(t,n,r){if(e===t)return r[n+1]||null})}},nextElementSibling:{get:function(){var e=this,t=void 0;return o(this.parentNode,function(n){return t&&1===n.nodeType?n:void(e===n&&(t=!0))})}},outerHTML:{get:function(){var e=this.tagName.toLowerCase(),t=Array.prototype.slice.call(this.attributes).map(function(e){return" "+e.name+(e.value?'="'+e.value+'"':"")}).join("");return"<"+e+t+">"+this.innerHTML+"</"+e+">"},set:function(e){if(this.parentNode){var t=h(e);this.parentNode.replaceChild(t.firstChild,this)}else{if(!V)throw new Error("Failed to set the 'outerHTML' property on 'Element': This element has no parent node.");this.__outerHTML=e}}},parentElement:{get:function(){return m(this.parentNode,function(e){return 1===e.nodeType})}},parentNode:{get:function(){return de.get(this)||this.__parentNode||null}},previousSibling:{get:function(){var e=this;return o(this.parentNode,function(t,n,r){if(e===t)return r[n-1]||null})}},previousElementSibling:{get:function(){var e=this,t=void 0;return o(this.parentNode,function(n){return t&&e===n?t:void(1===n.nodeType&&(t=n))})}},removeChild:{value:function(e){var t=_(this);switch(t){case"node":if(V)return de.set(e,null),this.__removeChild(e);j(this,e);break;case"slot":x(this,e);break;case"host":P(this,e);break;case"root":k(this,e)}return e}},removeEventListener:{value:function(e,t,n){return"slotchange"===e&&this.____slotChangeListeners&&z(this)&&this.____slotChangeListeners--,this.__removeEventListener(e,t,n)}},replaceChild:{value:function(e,t){return this.insertBefore(e,t),this.removeChild(t)}},setAttribute:{value:function(e,t){return"slot"===e&&(this[e]=t),z(this)&&"name"===e&&(this[e]=t),this.__setAttribute(e,t)}},shadowRoot:{get:function(){return"open"===ae.get(this)?le.get(this):null}},slot:{get:function(){return this.getAttribute("slot")},set:function(e){var t=this.name,n=this.__setAttribute("slot",e);if(t===e)return n;var r=he.get(this),o=r&&ve.get(r),i=o&&fe.get(o);return i&&(P(i,this),L(i,this)),n}},textContent:{get:function(){var e="";return o(this,function(t){t.nodeType!==Node.COMMENT_NODE&&(e+=t.textContent)}),e},set:function(e){for(;this.hasChildNodes();)this.removeChild(this.firstChild);e&&this.appendChild(document.createTextNode(e))}}},me=function(){var e=Comment.prototype,t=HTMLElement.prototype,n=SVGElement.prototype,r=Text.prototype,o=document.createTextNode(""),i=document.createComment("");Object.keys(_e).forEach(function(s){var u=_e[s];if(u.configurable=!0,u.enumerable=!0,u.hasOwnProperty("value")&&(u.writable=!0),V||te.indexOf(s)===-1){var a=Y(t,s),l=Y(r,s),c=Y(e,s),d=s in o&&ne.indexOf(s)===-1||~re.indexOf(s),h=s in i&&oe.indexOf(s)===-1||~ie.indexOf(s),f="__"+s;Object.defineProperty(t,s,u),Object.defineProperty(n,s,u),a&&(Object.defineProperty(t,f,a),Object.defineProperty(n,f,a)),d&&Object.defineProperty(r,s,u),d&&l&&Object.defineProperty(r,f,l),h&&Object.defineProperty(e,s,u),h&&c&&Object.defineProperty(e,f,c)}})};W||(F?X():me()),e.v0=X,e.v1=me,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=index.min.js.map |
@@ -53,3 +53,3 @@ { | ||
}, | ||
"version": "1.3.1" | ||
"version": "1.3.2" | ||
} |
@@ -398,2 +398,7 @@ import debounce from 'debounce'; | ||
// safari doesn't update its children properly for some reason, so it needs a little push | ||
if (!canPatchNativeAccessors && parentNode) { | ||
parentNode.removeChild(newNode); | ||
} | ||
if (nodeType === 'node') { | ||
@@ -400,0 +405,0 @@ if (canPatchNativeAccessors) { |
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 not supported yet
Sorry, the diff of this file is not supported yet
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
562347
4408