plano/_static/theme.js

3 lines
55 KiB
JavaScript
Raw Normal View History

(()=>{var e={122(e){e.exports=function(){var e={686:function(e,t,n){"use strict";n.d(t,{default:function(){return x}});var r=n(279),i=n.n(r),o=n(370),a=n.n(o),l=n(817),s=n.n(l);function c(e){try{return document.execCommand(e)}catch(e){return!1}}var u=function(e){var t=s()(e);return c("cut"),t},f=function(e,t){var n,r,i,o=(n="rtl"===document.documentElement.getAttribute("dir"),(r=document.createElement("textarea")).style.fontSize="12pt",r.style.border="0",r.style.padding="0",r.style.margin="0",r.style.position="absolute",r.style[n?"right":"left"]="-9999px",i=window.pageYOffset||document.documentElement.scrollTop,r.style.top="".concat(i,"px"),r.setAttribute("readonly",""),r.value=e,r);t.container.appendChild(o);var a=s()(o);return c("copy"),o.remove(),a},d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body},n="";return"string"==typeof e?n=f(e,t):e instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(null==e?void 0:e.type)?n=f(e.value,t):(n=s()(e),c("copy")),n};function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var _=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.action,n=void 0===t?"copy":t,r=e.container,i=e.target,o=e.text;if("copy"!==n&&"cut"!==n)throw Error('Invalid "action" value, use either "copy" or "cut"');if(void 0!==i)if(i&&"object"===p(i)&&1===i.nodeType){if("copy"===n&&i.hasAttribute("disabled"))throw Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===n&&(i.hasAttribute("readonly")||i.hasAttribute("disabled")))throw Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}else throw Error('Invalid "target" value, use a valid Element');return o?d(o,{container:r}):i?"cut"===n?u(i):d(i,{container:r}):void 0};function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t){var n="data-clipboard-".concat(e);if(t.hasAttribute(n))return t.getAttribute(n)}var x=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");o.prototype=Object.create(e&&e.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),e&&m(o,e);var t,n,r,i=(t=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n,r,i=g(o);return r=t?Reflect.construct(i,arguments,g(this).constructor):i.apply(this,arguments),e=this,(n=r)&&("object"===h(n)||"function"==typeof n)?n:function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)});function o(e,t){var n;if(!(this instanceof o))throw TypeError("Cannot call a class as a function");return(n=i.call(this)).resolveOptions(t),n.listenClick(e),n}return n=[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===h(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;thi
${n?'Expression: "'+n+'"\n\n':""}`,t),setTimeout(()=>{throw e},0)},G=!0;function Q(e){let t=G;G=!1;let n=e();return G=t,n}function ee(e,t,n={}){let r;return et(e,t)(e=>r=e,n),r}function et(...e){return en(...e)}var en=er;function er(e,t){var n,r,i,o,a;let l,s={};K(s,e);let c=[s,...B(e)],u="function"==typeof t?(n=c,r=t,(e=()=>{},{scope:t={},params:i=[],context:o}={})=>{G?eo(e,r.apply(F([t,...n]),i)):eo(e,r,F([t,...n]),i)}):(i=c,l=function(e,t){if(ei[e])return ei[e];let n=Object.getPrototypeOf(async function(){}).constructor,r=/^[\n\s]*if.*\(.*\)/.test(e.trim())||/^(let|const)\s/.test(e.trim())?`(async()=>{ ${e} })()`:e,i=(()=>{try{let t=new n(["__self","scope"],`with (scope) { __self.result = ${r} }; __self.finished = true; return __self.result;`);return Object.defineProperty(t,"name",{value:`[Alpine] ${e}`}),t}catch(n){return X(n,t,e),Promise.resolve()}})();return ei[e]=i,i}(o=t,a=e),(e=()=>{},{scope:t={},params:n=[],context:r}={})=>{l.result=void 0,l.finished=!1;let s=F([t,...i]);if("function"==typeof l){let t=l.call(r,l,s).catch(e=>X(e,a,o));l.finished?(eo(e,l.result,s,n,a),l.result=void 0):t.then(t=>{eo(e,t,s,n,a)}).catch(e=>X(e,a,o)).finally(()=>l.result=void 0)}});return Z.bind(null,e,t,u)}var ei={};function eo(e,t,n,r,i){if(G&&"function"==typeof t){let o=t.apply(n,r);o instanceof Promise?o.then(t=>eo(e,t,n,r)).catch(e=>X(e,i,t)):e(o)}else"object"==typeof t&&t instanceof Promise?t.then(t=>e(t)):e(t)}var ea="x-";function el(e=""){return ea+e}var es={};function ec(e,t){return es[e]=t,{before(t){if(!es[t])return void console.warn(String.raw`Cannot find directive \`${t}\`. \`${e}\` will use the default order of execution`);let n=eE.indexOf(t);eE.splice(n>=0?n:eE.indexOf("DEFAULT"),0,e)}}}function eu(e,t,n){var r,i;if(t=Array.from(t),e._x_virtualDirectives){let n=Object.entries(e._x_virtualDirectives).map(([e,t])=>({name:e,value:t})),r=ef(n);n=n.map(e=>r.find(t=>t.name===e.name)?{name:`x-bind:${e.name}`,value:`"${e.value}"`}:e),t=t.concat(n)}let o={};return t.map(em((e,t)=>o[e]=t)).filter(ex).map((r=o,i=n,({name:e,value:t})=>{e===t&&(t="");let n=e.match(eb()),o=e.match(/:([a-zA-Z0-9\-_:]+)/),a=e.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],l=i||r[e]||e;return{type:n?n[1]:null,value:o?o[1]:null,modifiers:a.map(e=>e.replace(".","")),expression:t,original:l}})).sort(eS).map(t=>(function(e,t){let n=es[t.type]||(()=>{}),[r,i]=eh(e);j(e,t.original,i);let o=()=>{e._x_ignore||e._x_ignoreSelf||(n.inline&&n.inline(e,t,r),n=n.bind(n,e,t,r),ed?ep.get(e_).push(n):n())};return o.runCleanups=i,o})(e,t))}function ef(e){return Array.from(e).map(em()).filter(e=>!ex(e))}var ed=!1,ep=new Map,e_=Symbol();function eh(e){let t,n=[],[r,i]=(t=()=>{},[n=>{let r=u(n);return e._x_effects||(e._x_effects=new Set,e._x_runEffects=()=>{e._x_effects.forEach(e=>e())}),e._x_effects.add(r),t=()=>{void 0!==r&&(e._x_effects.delete(r),f(r))},r},()=>{t()}]);return n.push(i),[{Alpine:tu,effect:r,cleanup:e=>n.push(e),evaluateLater:et.bind(et,e),evaluate:ee.bind(ee,e)},()=>n.forEach(e=>e())]}var ey=(e,t)=>({name:n,value:r})=>(n.startsWith(e)&&(n=n.replace(e,t)),{name:n,value:r});function em(e=()=>{}){return({name:t,value:n})=>{let{name:r,value:i}=eg.reduce((e,t)=>t(e),{name:t,value:n});return r!==t&&e(r,t),{name:r,value:i}}}var eg=[];function ev(e){eg.push(e)}function ex({name:e}){return eb().test(e)}var eb=()=>RegExp(`^${ea}([^:^.]+)\\b`),ew="DEFAULT",eE=["ignore","ref","data","id","anchor","bind","init","for","model","modelable","transition","show","if",ew,"teleport"];function eS(e,t){let n=-1===eE.indexOf(e.type)?ew:e.type,r=-1===eE.indexOf(t.type)?ew:t.type;return eE.indexOf(n)-eE.indexOf(r)}function eA(e,t,n={}){e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0,composed:!0,cancelable:!0}))}function eO(e,t){if("function"==typeof ShadowRoot&&e instanceof ShadowRoot)return void Array.from(e.children).forEach(e=>eO(e,t));let n=!1;if(t(e,()=>n=!0),n)return;let r=e.firstElementChild;for(;r;)eO(r,t,!1),r=r.nextElementSibling}function ek(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}var ej=!1,eC=[],e$=[];function eT(){return eC.map(e=>e())}function eL(){return eC.con