antos-frontend/src/libs/riot.compiler.min.js

3 lines
34 KiB
JavaScript
Raw Normal View History

2017-08-07 00:49:24 +02:00
/* Riot v3.6.1, @license MIT */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.riot=t()}(this,function(){"use strict";function e(e){return mt.test(e)}function t(e){return typeof e===st}function n(e){return e&&typeof e===rt}function r(e){return typeof e===it}function i(e){return typeof e===nt}function s(e){return r(e)||null===e||""===e}function o(e){return Array.isArray(e)||e instanceof Array}function a(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return r(e[t])||n&&n.writable}function u(e){return ht.test(e)}function c(e,t){return Array.prototype.slice.call((t||document).querySelectorAll(e))}function l(e,t){return(t||document).querySelector(e)}function p(){return document.createDocumentFragment()}function f(){return document.createTextNode("")}function h(e){return!!e.ownerSVGElement}function d(e){return"svg"===e?document.createElementNS(at,e):document.createElement(e)}function g(e,t){if(r(e.innerHTML)){var n=(new DOMParser).parseFromString(t,"application/xml"),i=e.ownerDocument.importNode(n.documentElement,!0);e.appendChild(i)}else e.innerHTML=t}function m(e,t){e.style.display=t?"":"none",e.hidden=!t}function v(e,t){e.removeAttribute(t)}function x(e){return Object.keys(e).reduce(function(t,n){return t+" "+n+": "+e[n]+";"},"")}function y(e,t){return e.getAttribute(t)}function b(e,t,n){var r=ut.exec(t);r&&r[1]?e.setAttributeNS(ot,r[1],n):e.setAttribute(t,n)}function _(e,t,n){e.insertBefore(t,n.parentNode&&n)}function w(e,t){if(e)for(var n;n=dt.exec(e);)t(n[1].toLowerCase(),n[2]||n[3]||n[4])}function O(e,t,n){if(e){var r,i=t(e,n);if(!1===i)return;for(e=e.firstChild;e;)r=e.nextSibling,O(e,t,i),e=r}}function j(e,t){for(var n=e?e.length:0,r=0;r<n;++r)t(e[r],r);return e}function N(e,t){return-1!==e.indexOf(t)}function E(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})}function C(e,t){return e.slice(0,t.length)===t}function S(e,t,n,r){return Object.defineProperty(e,t,A({value:n,enumerable:!1,writable:!1,configurable:!0},r)),e}function A(e){for(var t,n=arguments,r=1;r<n.length;++r)if(t=n[r])for(var i in t)a(e,i)&&(e[i]=t[i]);return e}function T(e,t,n){var r=this.__.parent,i=this.__.item;if(!i)for(;r&&!i;)i=r.__.item,r=r.__.parent;if(a(n,"currentTarget")&&(n.currentTarget=e),a(n,"target")&&(n.target=n.srcElement),a(n,"which")&&(n.which=n.charCode||n.keyCode),n.item=i,t.call(this,n),Lt.autoUpdate&&!n.preventUpdate){var s=ue(this);s.isMounted&&s.update()}}function L(e,t,n,r){var i,s=T.bind(r,n,t);n[e]=null,i=e.replace(ft,""),N(r.__.listeners,n)||r.__.listeners.push(n),n[tt]||(n[tt]={}),n[tt][e]&&n.removeEventListener(i,n[tt][e]),n[tt][e]=s,n.addEventListener(i,s,!1)}function k(e,t,n){var r,s,o,a;e.tag&&e.tagName===n?e.tag.update():(s="VIRTUAL"===e.dom.tagName,e.tag&&(s&&(o=e.tag.__.head,a=f(),o.parentNode.insertBefore(a,o)),e.tag.unmount(!0)),i(n)&&(e.impl=De[n],r={root:e.dom,parent:t,hasImpl:!0,tagName:n},e.tag=ae(e.impl,r,e.dom.innerHTML,t),j(e.attrs,function(t){return b(e.tag.root,t.name,t.value)}),e.tagName=n,e.tag.mount(),s&&ge(e.tag,a||e.tag.root),t.__.onUnmount=function(){var t=e.tag.opts.dataIs,n=e.tag.parent.tags,r=e.tag.__.parent.tags;he(n,t,e.tag),he(r,t,e.tag),e.tag.unmount()}))}function R(e){return e?(e=e.replace(Ke,""),gt[e]&&(e=gt[e]),e):null}function I(e){if(!this.root||!y(this.root,"virtualized")){var r,i,o,a=e.dom,u=R(e.attr),c=N([Ye,et],u),l=e.root&&"VIRTUAL"===e.root.tagName,p=a&&(e.parent||a.parentNode),f="style"===u,h="class"===u;if(e._riot_id)e.isMounted?e.update():(e.mount(),l&&ge(e,e.root));else{if(e.update)return e.update();if(o=St(e.expr,c?A({},Object.create(this.parent),this):this),r=!s(o),(i=n(o))&&(i=!h&&!f,h?o=St(JSON.stringify(o),this):f&&(o=x(o))),!e.attr||e.isAttrRemoved&&r&&!1!==o||(v(a,e.attr),e.isAttrRemoved=!0),e.bool&&(o=!!o&&u),e.isRtag)return k(e,this,o);if((!e.wasParsedOnce||e.value!==o)&&(e.value=o,e.wasParsedOnce=!0,!i||c)){if(s(o)&&(o=""),!u)return o+="",void(p&&(e.parent=p,"TEXTAREA"===p.tagName?(p.value=o,vt||(a.nodeValue=o)):a.nodeValue=o));t(o)?L(u,o,a,this):c?m(a,u===et?!o:o):(e.bool&&(a[u]=o),"value"===u