Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo-mod-jslibs-dist.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'alpinejs/packages/morph/dist/cdn.min.js')
-rw-r--r--alpinejs/packages/morph/dist/cdn.min.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/alpinejs/packages/morph/dist/cdn.min.js b/alpinejs/packages/morph/dist/cdn.min.js
index cad56f2..dff89d4 100644
--- a/alpinejs/packages/morph/dist/cdn.min.js
+++ b/alpinejs/packages/morph/dist/cdn.min.js
@@ -1 +1,2 @@
-(()=>{function C(e,t,i){return T(i),b(e,K(t)),e}var N,v,w,g,y,S,m,x,h=()=>{};function T(e={}){let t=i=>i.getAttribute("key");N=e.key||t,v=e.lookahead||!1,w=e.updating||h,g=e.updated||h,y=e.removing||h,S=e.removed||h,m=e.adding||h,x=e.added||h}function K(e){return document.createRange().createContextualFragment(e).firstElementChild}function b(e,t){if(e.isEqualNode(t))return;if(k(e,t))return V(e,t);let i=!1;if(!p(w,e,t,()=>i=!0)){if(O(t)){F(e,t),g(e,t);return}i||q(e,t),g(e,t),B(e,t)}}function k(e,t){return e.nodeType!=t.nodeType||e.nodeName!=t.nodeName||s(e)!=s(t)}function O(e){return e.nodeType===3||e.nodeType===8}function V(e,t){if(p(y,e))return;let i=t.cloneNode(!0);p(m,i)||(e.parentNode.replaceChild(i,e),S(e),x(i))}function F(e,t){let i=t.nodeValue;e.nodeValue!==i&&(e.nodeValue=i)}function q(e,t){if(e._x_isShown&&!t._x_isShown||!e._x_isShown&&t._x_isShown)return;let i=Array.from(e.attributes),o=Array.from(t.attributes);for(let u=i.length-1;u>=0;u--){let a=i[u].name;t.hasAttribute(a)||e.removeAttribute(a)}for(let u=o.length-1;u>=0;u--){let a=o[u].name,r=o[u].value;e.getAttribute(a)!==r&&e.setAttribute(a,r)}}function B(e,t){let i=e.childNodes,o=t.childNodes,u=A(o),a=A(i),r=t.firstChild,n=e.firstChild,c={};for(;r;){let l=s(r),d=s(n);if(!n)if(l&&c[l]){let f=c[l];e.appendChild(f),n=f}else{H(r,e),r=r.nextSibling;continue}if(v){let f=r.nextElementSibling;f&&n.isEqualNode(f)&&(n=_(r,n),d=s(n))}if(l!==d){if(!l&&d){c[d]=n,n=_(r,n),c[d].remove(),n=n.nextSibling,r=r.nextSibling;continue}if(l&&!d&&a[l]&&(n.parentElement.replaceChild(a[l],n),n=a[l]),l&&d){c[d]=n;let f=a[l];if(f)n.parentElement.replaceChild(f,n),n=f;else{c[d]=n,n=_(r,n),c[d].remove(),n=n.nextSibling,r=r.nextSibling;continue}}}b(n,r),r=r&&r.nextSibling,n=n&&n.nextSibling}for(;n;){if(!p(y,n)){let l=n;e.removeChild(l),S(l)}n=n.nextSibling}}function s(e){return e&&e.nodeType===1&&N(e)}function A(e){let t={};return e.forEach(i=>{let o=s(i);o&&(t[o]=i)}),t}function p(e,...t){let i=!1;return e(...t,()=>i=!0),i}function H(e,t){if(!p(m,e)){let i=e.cloneNode(!0);t.appendChild(i),x(i)}}function _(e,t){if(!p(m,e)){let i=e.cloneNode(!0);return t.parentElement.insertBefore(i,t),x(i),i}return t}function E(e){e.directive("morph",(t,{expression:i},{effect:o,evaluateLater:u})=>{let a=u(i);o(()=>{a(r=>{let n=t.firstElementChild||t.firstChild||t.appendChild(document.createTextNode(""));C(n,r)})})})}document.addEventListener("alpine:init",()=>{window.Alpine.plugin(E)});})();
+(()=>{var C=()=>{},E=()=>{},_,f;function d(e){if(!!K)return E((e||"").replace(`
+`,"\\n"),_,f),new Promise(t=>C=()=>t())}async function y(e,t,n){return H(n),_=e,f=L(t),window.Alpine&&!e._x_dataStack&&(f._x_dataStack=window.Alpine.closestDataStack(e),f._x_dataStack&&window.Alpine.clone(e,f)),await d(),await B(e,f),_=void 0,f=void 0,e}y.step=()=>C();y.log=e=>{E=e};var O,M,V,b,A,N,v,g,K,w=()=>{};function H(e={}){let t=n=>n.getAttribute("key");V=e.updating||w,b=e.updated||w,A=e.removing||w,N=e.removed||w,v=e.adding||w,g=e.added||w,O=e.key||t,M=e.lookahead||!1,K=e.debug||!1}function L(e){return document.createRange().createContextualFragment(e).firstElementChild}async function B(e,t){if($(e,t)){let u=q(e,t);return await d("Swap elements"),u}let n=!1;if(!x(V,e,t,()=>n=!0)){if(window.Alpine&&P(e,t,()=>n=!0),j(t)){await z(e,t),b(e,t);return}n||await G(e,t),b(e,t),await I(e,t)}}function $(e,t){return e.nodeType!=t.nodeType||e.nodeName!=t.nodeName||m(e)!=m(t)}function j(e){return e.nodeType===3||e.nodeType===8}function q(e,t){if(x(A,e))return;let n=t.cloneNode(!0);x(v,n)||(a(e).replace(n),N(e),g(n))}async function z(e,t){let n=t.nodeValue;e.nodeValue!==n&&(e.nodeValue=n,await d("Change text node to: "+n))}async function G(e,t){if(e._x_isShown&&!t._x_isShown||!e._x_isShown&&t._x_isShown)return;let n=Array.from(e.attributes),u=Array.from(t.attributes);for(let p=n.length-1;p>=0;p--){let s=n[p].name;t.hasAttribute(s)||(e.removeAttribute(s),await d("Remove attribute"))}for(let p=u.length-1;p>=0;p--){let s=u[p].name,r=u[p].value;e.getAttribute(s)!==r&&(e.setAttribute(s,r),await d(`Set [${s}] attribute to: "${r}"`))}}async function I(e,t){let n=e.childNodes,u=t.childNodes,p=F(u),s=F(n),r=a(t).nodes().first(),i=a(e).nodes().first(),h={};for(;r;){let l=m(r),c=m(i);if(!i)if(l&&h[l]){let o=h[l];a(e).append(o),i=o,await d("Add element (from key)")}else{let o=J(r,e)||{};await d("Add element: "+o.outerHTML||o.nodeValue),r=a(r).nodes().next();continue}if(M){let o=a(r).next(),S=!1;for(;!S&&o;)i.isEqualNode(o)&&(S=!0,i=T(r,i),c=m(i),await d("Move element (lookahead)")),o=a(o).next()}if(l!==c){if(!l&&c){h[c]=i,i=T(r,i),h[c].remove(),i=a(i).nodes().next(),r=a(r).nodes().next(),await d('No "to" key');continue}if(l&&!c&&s[l]&&(i=a(i).replace(s[l]),await d('No "from" key')),l&&c){h[c]=i;let o=s[l];if(o)i=a(i).replace(o),await d('Move "from" key');else{h[c]=i,i=T(r,i),h[c].remove(),i=a(i).next(),r=a(r).next(),await d("I dont even know what this does");continue}}}await B(i,r),r=r&&a(r).nodes().next(),i=i&&a(i).nodes().next()}let k=[];for(;i;)x(A,i)||k.push(i),i=a(i).nodes().next();for(;k.length;){let l=k.pop();l.remove(),await d("remove el"),N(l)}}function m(e){return e&&e.nodeType===1&&O(e)}function F(e){let t={};return e.forEach(n=>{let u=m(n);u&&(t[u]=n)}),t}function x(e,...t){let n=!1;return e(...t,()=>n=!0),n}function J(e,t){if(!x(v,e)){let n=e.cloneNode(!0);return a(t).append(n),g(n),n}return null}function T(e,t){if(!x(v,e)){let n=e.cloneNode(!0);return a(t).before(n),g(n),n}return t}function P(e,t,n){e.nodeType===1&&e._x_dataStack&&window.Alpine.clone(e,t)}function a(e){return new R(e)}var R=class{el=void 0;constructor(t){this.el=t}traversals={first:"firstElementChild",next:"nextElementSibling",parent:"parentElement"};nodes(){return this.traversals={first:"firstChild",next:"nextSibling",parent:"parentNode"},this}first(){return this.teleportTo(this.el[this.traversals.first])}next(){return this.teleportTo(this.teleportBack(this.el[this.traversals.next]))}before(t){return this.el[this.traversals.parent].insertBefore(t,this.el),t}replace(t){return this.el[this.traversals.parent].replaceChild(t,this.el),t}append(t){return this.el.appendChild(t),t}teleportTo(t){return t&&(t._x_teleport?t._x_teleport:t)}teleportBack(t){return t&&(t._x_teleportBack?t._x_teleportBack:t)}};function D(e){e.morph=y}document.addEventListener("alpine:init",()=>{window.Alpine.plugin(D)});})();