zen-wdg 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/zen-wdg.es.js +1 -1
- package/dist/zen-wdg.umd.js +1 -1
- package/package.json +1 -1
- package/src/index.js +1 -1
package/dist/zen-wdg.es.js
CHANGED
|
@@ -2265,7 +2265,7 @@ if (!customElements.get("z-todo-widget")) {
|
|
|
2265
2265
|
customElements.define("z-todo-widget", ZTodoElement);
|
|
2266
2266
|
}
|
|
2267
2267
|
if (!customElements.get("z-marked-widget")) {
|
|
2268
|
-
customElements.define("z-
|
|
2268
|
+
customElements.define("z-marked-widget", ZMarkedElement);
|
|
2269
2269
|
}
|
|
2270
2270
|
export {
|
|
2271
2271
|
ZClockWidget,
|
package/dist/zen-wdg.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ZenWdg={},e.Vue)}(this,function(e,t){"use strict";var n=Object.defineProperty,o=Object.defineProperties,r=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,c=(e,t,o)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,a=(e,t)=>{for(var n in t||(t={}))s.call(t,n)&&c(e,n,t[n]);if(i)for(var n of i(t))l.call(t,n)&&c(e,n,t[n]);return e},u=(e,t)=>o(e,r(t)),d=(e,t,n)=>new Promise((o,r)=>{var i=e=>{try{l(n.next(e))}catch(t){r(t)}},s=e=>{try{l(n.throw(e))}catch(t){r(t)}},l=e=>e.done?o(e.value):Promise.resolve(e.value).then(i,s);l((n=n.apply(e,t)).next())});const f=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},p={class:"clock-container"},m={class:"clock"},h={class:"time"},g={class:"date"};const v=f({name:"ZClockWidget",data:()=>({hours:"00",minutes:"00",seconds:"00",dayOfWeek:"",day:"",month:"",year:""}),mounted(){this.updateClock(),setInterval(this.updateClock,1e3)},methods:{updateClock(){const e=new Date;this.hours=e.getHours().toString().padStart(2,"0"),this.minutes=e.getMinutes().toString().padStart(2,"0"),this.seconds=e.getSeconds().toString().padStart(2,"0"),this.dayOfWeek=this.getDayOfWeek(e.getDay()),this.day=e.getDate(),this.month=this.getMonthName(e.getMonth()),this.year=e.getFullYear()},getDayOfWeek:e=>["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"][e],getMonthName:e=>["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"][e]}},[["render",function(e,n,o,r,i,s){return t.openBlock(),t.createElementBlock("div",p,[t.createElementVNode("div",m,[t.createElementVNode("div",h,[t.createElementVNode("span",null,t.toDisplayString(i.hours),1),n[0]||(n[0]=t.createTextVNode(":",-1)),t.createElementVNode("span",null,t.toDisplayString(i.minutes),1)]),t.createElementVNode("div",g,[t.createElementVNode("span",null,t.toDisplayString(i.dayOfWeek)+", "+t.toDisplayString(i.day)+" "+t.toDisplayString(i.month)+" "+t.toDisplayString(i.year),1)])])])}],["__scopeId","data-v-e9445086"]]),y={data:()=>({}),props:{placeholder:String,modelValue:{type:String,default:""},round:{type:Boolean,default:!1},full:{type:Boolean},rounded:{type:Boolean,default:!1}},methods:{onInput(e){this.$emit("update:modelValue",e.target.value)},onEnter(){this.$emit("enter-pressed",this.modelValue)}}},b=["placeholder","value"];const k=f(y,[["render",function(e,n,o,r,i,s){return t.openBlock(),t.createElementBlock("input",{placeholder:o.placeholder,value:o.modelValue,onInput:n[0]||(n[0]=(...e)=>s.onInput&&s.onInput(...e)),onKeydown:n[1]||(n[1]=t.withKeys((...e)=>s.onEnter&&s.onEnter(...e),["enter"])),class:t.normalizeClass([{"full-width":o.full},{round:o.round},{rounded:o.rounded}])},null,42,b)}],["__scopeId","data-v-2ad90286"]]),w=/^[a-z0-9]+(-[a-z0-9]+)*$/,x=(e,t,n,o="")=>{const r=e.split(":");if("@"===e.slice(0,1)){if(r.length<2||r.length>3)return null;o=r.shift().slice(1)}if(r.length>3||!r.length)return null;if(r.length>1){const e=r.pop(),n=r.pop(),i={provider:r.length>0?r[0]:o,prefix:n,name:e};return t&&!E(i)?null:i}const i=r[0],s=i.split("-");if(s.length>1){const e={provider:o,prefix:s.shift(),name:s.join("-")};return t&&!E(e)?null:e}if(n&&""===o){const e={provider:o,prefix:"",name:i};return t&&!E(e,n)?null:e}return null},E=(e,t)=>!!e&&!(!(t&&""===e.prefix||e.prefix)||!e.name),S=Object.freeze({left:0,top:0,width:16,height:16}),T=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),C=Object.freeze(a(a({},S),T)),N=Object.freeze(u(a({},C),{body:"",hidden:!1}));function B(e,t){const n=function(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const o=((e.rotate||0)+(t.rotate||0))%4;return o&&(n.rotate=o),n}(e,t);for(const o in N)o in T?o in e&&!(o in n)&&(n[o]=T[o]):o in t?n[o]=t[o]:o in e&&(n[o]=e[o]);return n}function z(e,t,n){const o=e.icons,r=e.aliases||Object.create(null);let i={};function s(e){i=B(o[e]||r[e],i)}return s(t),n.forEach(s),B(e,i)}function V(e,t){const n=[];if("object"!=typeof e||"object"!=typeof e.icons)return n;e.not_found instanceof Array&&e.not_found.forEach(e=>{t(e,null),n.push(e)});const o=function(e){const t=e.icons,n=e.aliases||Object.create(null),o=Object.create(null);return Object.keys(t).concat(Object.keys(n)).forEach(function e(r){if(t[r])return o[r]=[];if(!(r in o)){o[r]=null;const t=n[r]&&n[r].parent,i=t&&e(t);i&&(o[r]=[t].concat(i))}return o[r]}),o}(e);for(const r in o){const i=o[r];i&&(t(r,z(e,r,i)),n.push(r))}return n}const j=a({provider:"",aliases:{},not_found:{}},S);function O(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function F(e){if("object"!=typeof e||null===e)return null;const t=e;if("string"!=typeof t.prefix||!e.icons||"object"!=typeof e.icons)return null;if(!O(e,j))return null;const n=t.icons;for(const r in n){const e=n[r];if(!r||"string"!=typeof e.body||!O(e,N))return null}const o=t.aliases||Object.create(null);for(const r in o){const e=o[r],t=e.parent;if(!r||"string"!=typeof t||!n[t]&&!o[t]||!O(e,N))return null}return t}const I=Object.create(null);function M(e,t){const n=I[e]||(I[e]=Object.create(null));return n[t]||(n[t]=function(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}(e,t))}function L(e,t){return F(t)?V(t,(t,n)=>{n?e.icons[t]=n:e.missing.add(t)}):[]}let D=!1;function _(e){return"boolean"==typeof e&&(D=e),D}function P(e,t){const n=x(e,!0,D);if(!n)return!1;const o=M(n.provider,n.prefix);return t?function(e,t,n){try{if("string"==typeof n.body)return e.icons[t]=a({},n),!0}catch(o){}return!1}(o,n.name,t):(o.missing.add(n.name),!0)}const A=Object.freeze({width:null,height:null}),W=Object.freeze(a(a({},A),T)),R=/(-?[0-9.]*[0-9]+[0-9.]*)/g,U=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function $(e,t,n){if(1===t)return e;if(n=n||100,"number"==typeof e)return Math.ceil(e*t*n)/n;if("string"!=typeof e)return e;const o=e.split(R);if(null===o||!o.length)return e;const r=[];let i=o.shift(),s=U.test(i);for(;;){if(s){const e=parseFloat(i);isNaN(e)?r.push(i):r.push(Math.ceil(e*t*n)/n)}else r.push(i);if(i=o.shift(),void 0===i)return r.join("");s=!s}}const q=/\sid="(\S+)"/g,Z="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16);let H=0;const J=Object.create(null);function Q(e){return J[e]||J[""]}function K(e){let t;if("string"==typeof e.resources)t=[e.resources];else if(t=e.resources,!(t instanceof Array&&t.length))return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:!0===e.random,index:e.index||0,dataAfterTimeout:!1!==e.dataAfterTimeout}}const Y=Object.create(null),G=["https://api.simplesvg.com","https://api.unisvg.com"],X=[];for(;G.length>0;)1===G.length||Math.random()>.5?X.push(G.shift()):X.push(G.pop());function ee(e,t){const n=K(t);return null!==n&&(Y[e]=n,!0)}function te(e){return Y[e]}Y[""]=K({resources:["https://api.iconify.design"].concat(X)});let ne=(()=>{let e;try{if(e=fetch,"function"==typeof e)return e}catch(t){}})();const oe={prepare:(e,t,n)=>{const o=[],r=function(e,t){const n=te(e);if(!n)return 0;let o;if(n.maxURL){let e=0;n.resources.forEach(t=>{const n=t;e=Math.max(e,n.length)});const r=t+".json?icons=";o=n.maxURL-e-n.path.length-r.length}else o=0;return o}(e,t),i="icons";let s={type:i,provider:e,prefix:t,icons:[]},l=0;return n.forEach((n,c)=>{l+=n.length+1,l>=r&&c>0&&(o.push(s),s={type:i,provider:e,prefix:t,icons:[]},l=n.length),s.icons.push(n)}),o.push(s),o},send:(e,t,n)=>{if(!ne)return void n("abort",424);let o=function(e){if("string"==typeof e){const t=te(e);if(t)return t.path}return"/"}(t.provider);switch(t.type){case"icons":{const e=t.prefix,n=t.icons.join(",");o+=e+".json?"+new URLSearchParams({icons:n}).toString();break}case"custom":{const e=t.uri;o+="/"===e.slice(0,1)?e.slice(1):e;break}default:return void n("abort",400)}let r=503;ne(e+o).then(e=>{const t=e.status;if(200===t)return r=501,e.json();setTimeout(()=>{n(function(e){return 404===e}(t)?"abort":"next",t)})}).then(e=>{"object"==typeof e&&null!==e?setTimeout(()=>{n("success",e)}):setTimeout(()=>{404===e?n("abort",e):n("next",r)})}).catch(()=>{n("next",r)})}};function re(e,t){e.forEach(e=>{const n=e.loaderCallbacks;n&&(e.loaderCallbacks=n.filter(e=>e.id!==t))})}let ie=0;var se={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function le(e,t,n,o){const r=e.resources.length,i=e.random?Math.floor(Math.random()*r):e.index;let s;if(e.random){let t=e.resources.slice(0);for(s=[];t.length>1;){const e=Math.floor(Math.random()*t.length);s.push(t[e]),t=t.slice(0,e).concat(t.slice(e+1))}s=s.concat(t)}else s=e.resources.slice(i).concat(e.resources.slice(0,i));const l=Date.now();let c,a="pending",u=0,d=null,f=[],p=[];function m(){d&&(clearTimeout(d),d=null)}function h(){"pending"===a&&(a="aborted"),m(),f.forEach(e=>{"pending"===e.status&&(e.status="aborted")}),f=[]}function g(e,t){t&&(p=[]),"function"==typeof e&&p.push(e)}function v(){a="failed",p.forEach(e=>{e(void 0,c)})}function y(){f.forEach(e=>{"pending"===e.status&&(e.status="aborted")}),f=[]}function b(){if("pending"!==a)return;m();const o=s.shift();if(void 0===o)return f.length?void(d=setTimeout(()=>{m(),"pending"===a&&(y(),v())},e.timeout)):void v();const r={status:"pending",resource:o,callback:(t,n)=>{!function(t,n,o){const r="success"!==n;switch(f=f.filter(e=>e!==t),a){case"pending":break;case"failed":if(r||!e.dataAfterTimeout)return;break;default:return}if("abort"===n)return c=o,void v();if(r)return c=o,void(f.length||(s.length?b():v()));if(m(),y(),!e.random){const n=e.resources.indexOf(t.resource);-1!==n&&n!==e.index&&(e.index=n)}a="completed",p.forEach(e=>{e(o)})}(r,t,n)}};f.push(r),u++,d=setTimeout(b,e.rotate),n(o,t,r.callback)}return"function"==typeof o&&p.push(o),setTimeout(b),function(){return{startTime:l,payload:t,status:a,queriesSent:u,queriesPending:f.length,subscribe:g,abort:h}}}function ce(e){const t=a(a({},se),e);let n=[];function o(){n=n.filter(e=>"pending"===e().status)}return{query:function(e,r,i){const s=le(t,e,r,(e,t)=>{o(),i&&i(e,t)});return n.push(s),s},find:function(e){return n.find(t=>e(t))||null},setIndex:e=>{t.index=e},getIndex:()=>t.index,cleanup:o}}function ae(){}const ue=Object.create(null);function de(e,t,n){let o,r;if("string"==typeof e){const t=Q(e);if(!t)return n(void 0,424),ae;r=t.send;const i=function(e){if(!ue[e]){const t=te(e);if(!t)return;const n={config:t,redundancy:ce(t)};ue[e]=n}return ue[e]}(e);i&&(o=i.redundancy)}else{const t=K(e);if(t){o=ce(t);const n=Q(e.resources?e.resources[0]:"");n&&(r=n.send)}}return o&&r?o.query(t,r,n)().abort:(n(void 0,424),ae)}function fe(){}function pe(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,function(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const o=e.provider,r=e.prefix;t.forEach(t=>{const i=t.icons,s=i.pending.length;i.pending=i.pending.filter(t=>{if(t.prefix!==r)return!0;const s=t.name;if(e.icons[s])i.loaded.push({provider:o,prefix:r,name:s});else{if(!e.missing.has(s))return n=!0,!0;i.missing.push({provider:o,prefix:r,name:s})}return!1}),i.pending.length!==s&&(n||re([e],t.id),t.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),t.abort))})}))}(e)}))}function me(e,t,n){function o(){const n=e.pendingIcons;t.forEach(t=>{n&&n.delete(t),e.icons[t]||e.missing.add(t)})}if(n&&"object"==typeof n)try{if(!L(e,n).length)return void o()}catch(r){console.error(r)}o(),pe(e)}function he(e,t){e instanceof Promise?e.then(e=>{t(e)}).catch(()=>{t(null)}):t(e)}function ge(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:t,prefix:n}=e,o=e.iconsToLoad;if(delete e.iconsToLoad,!o||!o.length)return;const r=e.loadIcon;if(e.loadIcons&&(o.length>1||!r))return void he(e.loadIcons(o,n,t),t=>{me(e,o,t)});if(r)return void o.forEach(o=>{he(r(o,n,t),t=>{me(e,[o],t?{prefix:n,icons:{[o]:t}}:null)})});const{valid:i,invalid:s}=function(e){const t=[],n=[];return e.forEach(e=>{(e.match(w)?t:n).push(e)}),{valid:t,invalid:n}}(o);if(s.length&&me(e,s,null),!i.length)return;const l=n.match(w)?Q(t):null;if(!l)return void me(e,i,null);l.prepare(t,n,i).forEach(n=>{de(t,n,t=>{me(e,n.icons,t)})})}))}const ve=(e,t)=>{const n=function(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((e,t)=>e.provider!==t.provider?e.provider.localeCompare(t.provider):e.prefix!==t.prefix?e.prefix.localeCompare(t.prefix):e.name.localeCompare(t.name));let o={provider:"",prefix:"",name:""};return e.forEach(e=>{if(o.name===e.name&&o.prefix===e.prefix&&o.provider===e.provider)return;o=e;const r=e.provider,i=e.prefix,s=e.name,l=n[r]||(n[r]=Object.create(null)),c=l[i]||(l[i]=M(r,i));let a;a=s in c.icons?t.loaded:""===i||c.missing.has(s)?t.missing:t.pending;const u={provider:r,prefix:i,name:s};a.push(u)}),t}(function(e,t=!0,n=!1){const o=[];return e.forEach(e=>{const r="string"==typeof e?x(e,t,n):e;r&&o.push(r)}),o}(e,!0,_()));if(!n.pending.length){let e=!0;return t&&setTimeout(()=>{e&&t(n.loaded,n.missing,n.pending,fe)}),()=>{e=!1}}const o=Object.create(null),r=[];let i,s;return n.pending.forEach(e=>{const{provider:t,prefix:n}=e;if(n===s&&t===i)return;i=t,s=n,r.push(M(t,n));const l=o[t]||(o[t]=Object.create(null));l[n]||(l[n]=[])}),n.pending.forEach(e=>{const{provider:t,prefix:n,name:r}=e,i=M(t,n),s=i.pendingIcons||(i.pendingIcons=new Set);s.has(r)||(s.add(r),o[t][n].push(r))}),r.forEach(e=>{const t=o[e.provider][e.prefix];t.length&&ge(e,t)}),t?function(e,t,n){const o=ie++,r=re.bind(null,n,o);if(!t.pending.length)return r;const i={id:o,icons:t,callback:e,abort:r};return n.forEach(e=>{(e.loaderCallbacks||(e.loaderCallbacks=[])).push(i)}),r}(t,n,r):fe};const ye=/[\s,]+/;function be(e,t){t.split(ye).forEach(t=>{switch(t.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0}})}function ke(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function o(e){for(;e<0;)e+=4;return e%4}if(""===n){const t=parseInt(e);return isNaN(t)?0:o(t)}if(n!==e){let t=0;switch(n){case"%":t=25;break;case"deg":t=90}if(t){let r=parseFloat(e.slice(0,e.length-n.length));return isNaN(r)?0:(r/=t,r%1==0?o(r):0)}}return t}const we=u(a({},W),{inline:!1}),xe={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Ee={display:"inline-block"},Se={backgroundColor:"currentColor"},Te={backgroundColor:"transparent"},Ce={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Ne={webkitMask:Se,mask:Se,background:Te};for(const dt in Ne){const e=Ne[dt];for(const t in Ce)e[dt+t]=Ce[t]}const Be={};function ze(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}["horizontal","vertical"].forEach(e=>{const t=e.slice(0,1)+"Flip";Be[e+"-flip"]=t,Be[e.slice(0,1)+"-flip"]=t,Be[e+"Flip"]=t});const Ve=(e,n)=>{const o=function(e,t){const n=a({},e);for(const o in t){const e=t[o],r=typeof e;o in A?(null===e||e&&("string"===r||"number"===r))&&(n[o]=e):r===typeof n[o]&&(n[o]="rotate"===o?e%4:e)}return n}(we,n),r=a({},xe),i=n.mode||"svg",s={},l=n.style,c="object"!=typeof l||l instanceof Array?{}:l;for(let t in n){const e=n[t];if(void 0!==e)switch(t){case"icon":case"style":case"onLoad":case"mode":case"ssr":break;case"inline":case"hFlip":case"vFlip":o[t]=!0===e||"true"===e||1===e;break;case"flip":"string"==typeof e&&be(o,e);break;case"color":s.color=e;break;case"rotate":"string"==typeof e?o[t]=ke(e):"number"==typeof e&&(o[t]=e);break;case"ariaHidden":case"aria-hidden":!0!==e&&"true"!==e&&delete r["aria-hidden"];break;default:{const n=Be[t];n?!0!==e&&"true"!==e&&1!==e||(o[n]=!0):void 0===we[t]&&(r[t]=e)}}}const d=function(e,t){const n=a(a({},C),e),o=a(a({},W),t),r={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,o].forEach(e=>{const t=[],n=e.hFlip,o=e.vFlip;let s,l=e.rotate;switch(n?o?l+=2:(t.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),t.push("scale(-1 1)"),r.top=r.left=0):o&&(t.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),t.push("scale(1 -1)"),r.top=r.left=0),l<0&&(l-=4*Math.floor(l/4)),l%=4,l){case 1:s=r.height/2+r.top,t.unshift("rotate(90 "+s.toString()+" "+s.toString()+")");break;case 2:t.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:s=r.width/2+r.left,t.unshift("rotate(-90 "+s.toString()+" "+s.toString()+")")}l%2==1&&(r.left!==r.top&&(s=r.left,r.left=r.top,r.top=s),r.width!==r.height&&(s=r.width,r.width=r.height,r.height=s)),t.length&&(i=function(e,t,n){const o=function(e,t="defs"){let n="";const o=e.indexOf("<"+t);for(;o>=0;){const r=e.indexOf(">",o),i=e.indexOf("</"+t);if(-1===r||-1===i)break;const s=e.indexOf(">",i);if(-1===s)break;n+=e.slice(r+1,i).trim(),e=e.slice(0,o).trim()+e.slice(s+1)}return{defs:n,content:e}}(e);return r=o.defs,i=t+o.content+n,r?"<defs>"+r+"</defs>"+i:i;var r,i}(i,'<g transform="'+t.join(" ")+'">',"</g>"))});const s=o.width,l=o.height,c=r.width,u=r.height;let d,f;null===s?(f=null===l?"1em":"auto"===l?u:l,d=$(f,c/u)):(d="auto"===s?c:s,f=null===l?$(d,u/c):"auto"===l?u:l);const p={},m=(e,t)=>{(e=>"unset"===e||"undefined"===e||"none"===e)(t)||(p[e]=t.toString())};m("width",d),m("height",f);const h=[r.left,r.top,c,u];return p.viewBox=h.join(" "),{attributes:p,viewBox:h,body:i}}(e,o),f=d.attributes;if(o.inline&&(s.verticalAlign="-0.125em"),"svg"===i){r.style=a(a({},s),c),Object.assign(r,f);let e=0,o=n.id;return"string"==typeof o&&(o=o.replace(/-/g,"_")),r.innerHTML=function(e,t=Z){const n=[];let o;for(;o=q.exec(e);)n.push(o[1]);if(!n.length)return e;const r="suffix"+(16777216*Math.random()|Date.now()).toString(16);return n.forEach(n=>{const o="function"==typeof t?t(n):t+(H++).toString(),i=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+i+')([")]|\\.[a-z])',"g"),"$1"+o+r+"$3")}),e=e.replace(new RegExp(r,"g"),"")}(d.body,o?()=>o+"ID"+e++:"iconifyVue"),t.h("svg",r)}const{body:p,width:m,height:h}=e,g="mask"===i||"bg"!==i&&-1!==p.indexOf("currentColor"),v=function(e,t){let n=-1===e.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const o in t)n+=" "+o+'="'+t[o]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}(p,u(a({},f),{width:m+"",height:h+""}));var y;return r.style=a(a(a(u(a({},s),{"--svg":(y=v,'url("'+function(e){return"data:image/svg+xml,"+function(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}(e)}(y)+'")'),width:ze(f.width),height:ze(f.height)}),Ee),g?Se:Te),c),t.h("span",r)};var je;if(_(!0),je=oe,J[""]=je,"undefined"!=typeof document&&"undefined"!=typeof window){const e=window;if(void 0!==e.IconifyPreload){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";"object"==typeof t&&null!==t&&(t instanceof Array?t:[t]).forEach(e=>{try{("object"!=typeof e||null===e||e instanceof Array||"object"!=typeof e.icons||"string"!=typeof e.prefix||!function(e,t){if("object"!=typeof e)return!1;if("string"!=typeof t&&(t=e.provider||""),D&&!t&&!e.prefix){let t=!1;return F(e)&&(e.prefix="",V(e,(e,n)=>{P(e,n)&&(t=!0)})),t}const n=e.prefix;return!!E({prefix:n,name:"a"})&&!!L(M(t,n),e)}(e))&&console.error(n)}catch(t){console.error(n)}})}if(void 0!==e.IconifyProviders){const t=e.IconifyProviders;if("object"==typeof t&&null!==t)for(let e in t){const n="IconifyProviders["+e+"] is invalid.";try{const o=t[e];if("object"!=typeof o||!o||void 0===o.resources)continue;ee(e,o)||console.error(n)}catch(ut){console.error(n)}}}}const Oe=u(a({},C),{body:""}),Fe={data:()=>({}),components:{Icon:t.defineComponent((e,{emit:n})=>{const o=t.ref(null);function r(){var e,t;o.value&&(null==(t=(e=o.value).abort)||t.call(e),o.value=null)}const i=t.ref(!!e.ssr),s=t.ref(""),l=t.shallowRef(null);function c(){const i=e.icon;if("object"==typeof i&&null!==i&&"string"==typeof i.body)return s.value="",{data:i};let l;if("string"!=typeof i||null===(l=x(i,!1,!0)))return null;let c=function(e){const t="string"==typeof e?x(e,!0,D):e;if(t){const e=M(t.provider,t.prefix),n=t.name;return e.icons[n]||(e.missing.has(n)?null:void 0)}}(l);if(!c){const e=o.value;return e&&e.name===i||(o.value=null===c?{name:i}:{name:i,abort:ve([l],d)}),null}r(),s.value!==i&&(s.value=i,t.nextTick(()=>{n("load",i)}));const a=e.customise;if(a){c=Object.assign({},c);const e=a(c.body,l.name,l.prefix,l.provider);"string"==typeof e&&(c.body=e)}const u=["iconify"];return""!==l.prefix&&u.push("iconify--"+l.prefix),""!==l.provider&&u.push("iconify--"+l.provider),{data:c,classes:u}}function d(){var e;const t=c();t?t.data!==(null==(e=l.value)?void 0:e.data)&&(l.value=t):l.value=null}return i.value?d():t.onMounted(()=>{i.value=!0,d()}),t.watch(()=>e.icon,d),t.onUnmounted(r),()=>{const t=l.value;if(!t)return Ve(Oe,e);let n=e;return t.classes&&(n=u(a({},e),{class:t.classes.join(" ")})),Ve(a(a({},C),t.data),n)}},{props:["icon","mode","ssr","width","height","style","color","inline","rotate","hFlip","horizontalFlip","vFlip","verticalFlip","flip","id","ariaHidden","customise","title"],emits:["load"]})},props:{title:{type:String,required:!1},bound:{type:Boolean,default:!1},bounded:{type:Boolean,default:!1},flat:{type:Boolean,default:!1},iconLeft:{type:Boolean,required:!1,default:!1},iconRight:{type:Boolean,default:!1},icon:{type:String},size:{type:String},iconSize:{type:String},wFull:{type:Boolean,default:!1},noBg:{type:Boolean,default:!1},color:String},methods:{}};const Ie={class:"search"},Me=["src"];const Le=f({name:"ZSearchWidget",data:()=>({text:""}),props:{searchTarget:{type:String,require:!1,default:"same"},logo:{type:String,require:!1}},components:{Input:k,Button:f(Fe,[["render",function(e,n,o,r,i,s){const l=t.resolveComponent("Icon");return t.openBlock(),t.createElementBlock("button",{class:t.normalizeClass([{flat:o.flat},{bound:o.bound},{bounded:o.bounded},{"w-full":o.wFull},{transparent:o.noBg}]),style:t.normalizeStyle([{"font-size":o.size},{color:o.color}])},[o.iconLeft?(t.openBlock(),t.createBlock(l,{key:0,icon:o.icon,style:t.normalizeStyle({"font-size":o.iconSize})},null,8,["icon","style"])):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(o.title)+" ",1),o.icon&&!o.iconLeft?(t.openBlock(),t.createBlock(l,{key:1,icon:o.icon,width:o.iconSize,height:o.iconSize},null,8,["icon","width","height"])):t.createCommentVNode("",!0)],6)}],["__scopeId","data-v-10678914"]])},methods:{search(){const e=`https://astiango.co/?q=${encodeURIComponent(this.text)}`;"new"==this.searchTarget?chrome.tabs.create({url:e}):"same"==this.searchTarget&&chrome.tabs.update({url:e})}}},[["render",function(e,n,o,r,i,s){const l=t.resolveComponent("Input"),c=t.resolveComponent("Button");return t.openBlock(),t.createElementBlock("div",Ie,[o.logo?(t.openBlock(),t.createElementBlock("img",{key:0,src:o.logo},null,8,Me)):t.createCommentVNode("",!0),t.createVNode(l,{placeholder:"Search something",full:"",class:"bg",modelValue:i.text,"onUpdate:modelValue":n[0]||(n[0]=e=>i.text=e),onEnterPressed:n[1]||(n[1]=e=>s.search())},null,8,["modelValue"]),t.createVNode(c,{icon:"material-symbols-light:search-rounded",size:"25px",flat:"",class:"text-color",onClick:n[2]||(n[2]=e=>s.search())})])}],["__scopeId","data-v-50392e2c"]]),De={class:"todo-widget"},_e={class:"task-section"},Pe={key:0,class:"empty"},Ae={class:"actions"},We=["onClick"],Re=["onClick"],Ue={class:"task-section completed"},$e={key:0,class:"empty"},qe={class:"done"},Ze=["onClick"];const He=f({name:"TodoWidget",data:()=>({newTask:"",pendingTasks:[],completedTasks:[]}),methods:{addTask(){this.newTask.trim()&&(this.pendingTasks.push({text:this.newTask.trim()}),this.newTask="")},completeTask(e){const t=this.pendingTasks.splice(e,1)[0];this.completedTasks.push(t)},deleteTask(e){this.pendingTasks.splice(e,1)},deleteCompleted(e){this.completedTasks.splice(e,1)}}},[["render",function(e,n,o,r,i,s){return t.openBlock(),t.createElementBlock("div",De,[n[5]||(n[5]=t.createElementVNode("h2",{class:"title"},"📝 Mis Tareas",-1)),t.createElementVNode("form",{onSubmit:n[1]||(n[1]=t.withModifiers((...e)=>s.addTask&&s.addTask(...e),["prevent"])),class:"todo-form"},[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[0]||(n[0]=e=>i.newTask=e),type:"text",placeholder:"Escribe una nueva tarea..."},null,512),[[t.vModelText,i.newTask]]),n[2]||(n[2]=t.createElementVNode("button",{type:"submit"},"Agregar",-1))],32),t.createElementVNode("div",_e,[n[3]||(n[3]=t.createElementVNode("h3",null,"Tareas Pendientes",-1)),0===i.pendingTasks.length?(t.openBlock(),t.createElementBlock("div",Pe,"Sin tareas.")):t.createCommentVNode("",!0),t.createElementVNode("ul",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.pendingTasks,(e,n)=>(t.openBlock(),t.createElementBlock("li",{key:n},[t.createElementVNode("span",null,t.toDisplayString(e.text),1),t.createElementVNode("div",Ae,[t.createElementVNode("button",{onClick:e=>s.completeTask(n)},"✔️",8,We),t.createElementVNode("button",{onClick:e=>s.deleteTask(n)},"🗑️",8,Re)])]))),128))])]),t.createElementVNode("div",Ue,[n[4]||(n[4]=t.createElementVNode("h3",null,"Completadas",-1)),0===i.completedTasks.length?(t.openBlock(),t.createElementBlock("div",$e,"Ninguna aún.")):t.createCommentVNode("",!0),t.createElementVNode("ul",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.completedTasks,(e,n)=>(t.openBlock(),t.createElementBlock("li",{key:"c"+n},[t.createElementVNode("span",qe,t.toDisplayString(e.text),1),t.createElementVNode("button",{onClick:e=>s.deleteCompleted(n)},"❌",8,Ze)]))),128))])])])}],["__scopeId","data-v-edabf7fa"]]),Je={class:"tabs"},Qe=["onClick"],Ke={class:"grid"},Ye={class:"option-app"},Ge=["onClick"],Xe=["onClick"],et=["onClick"],tt={class:"column"},nt=["src","alt","onError"],ot="bookmark_manager_state",rt={__name:"z-marked-widget",props:{theme:{type:String,default:"light"},small:{type:Boolean,default:!1},categories:{type:Array,default:()=>["Personal","Work","Study"]},open:{type:String,default:"self"},useStorage:{type:Boolean,default:!1}},setup(e){const n=e,o={Personal:[{title:"Reddit",url:"https://reddit.com",logo:"https://www.google.com/s2/favicons?domain=reddit.com&sz=64"},{title:"Spotify",url:"https://spotify.com",logo:"https://www.google.com/s2/favicons?domain=spotify.com&sz=64"},{title:"Youtube",url:"https://youtube.com",logo:"https://www.google.com/s2/favicons?domain=youtube.com&sz=64"},{title:"Instagram",url:"https://instagram.com",logo:"https://www.google.com/s2/favicons?domain=instagram.com&sz=64"},{title:"Facebook",url:"https://facebook.com",logo:"https://www.google.com/s2/favicons?domain=facebook.com&sz=64"},{title:"WhatsApp",url:"https://whatsapp.com",logo:"https://www.google.com/s2/favicons?domain=whatsapp.com&sz=64"},{title:"Telegram",url:"https://web.telegram.org/",logo:"https://www.google.com/s2/favicons?domain=web.telegram.org&sz=64"},{title:"Spotify",url:"https://spotify.com",logo:"https://www.google.com/s2/favicons?domain=spotify.com&sz=64"}],Work:[{title:"GitHub",url:"https://github.com",logo:"https://www.google.com/s2/favicons?domain=github.com&sz=64"},{title:"Notion",url:"https://notion.so",logo:"https://www.google.com/s2/favicons?domain=notion.so&sz=64"}],Study:[{title:"MDN Web Docs",url:"https://developer.mozilla.org",logo:"https://www.google.com/s2/favicons?domain=mozilla.org&sz=64"},{title:"FreeCodeCamp",url:"https://freecodecamp.org",logo:"https://www.google.com/s2/favicons?domain=freecodecamp.org&sz=64"}]},r=t.reactive({bookmarks:n.useStorage&&JSON.parse(localStorage.getItem(ot))||o,activeTab:"Personal"}),i=t.ref([...n.categories]),s=t.ref(n.small),l=t.ref(n.theme),c=t.ref(n.open),a=t.ref(n.useStorage),u=computed(()=>r.bookmarks[r.activeTab]||[]);function f(){a.value&&localStorage.setItem(ot,JSON.stringify(r.bookmarks))}function p(){const e=prompt("Nombre del marcador:");if(!e)return;const t=prompt("URL del marcador:");if(!t)return;const n=`https://www.google.com/s2/favicons?domain=${new URL(t).hostname}&sz=64`;r.bookmarks[r.activeTab]||(r.bookmarks[r.activeTab]=[]),r.bookmarks[r.activeTab].push({title:e,url:t,logo:n}),f()}const m=computed(()=>({position:"relative",width:s.value?"50px":"40px",height:s.value?"50px":"40px",marginBottom:"8px",borderRadius:".4rem",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold",fontSize:"1.8rem",color:"light"===l.value?"#555":"#eee",userSelect:"none"}));return t.watch(()=>r.bookmarks,()=>f(),{deep:!0}),(e,n)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",Je,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.value,e=>(t.openBlock(),t.createElementBlock("div",{key:e,class:"container-tab"},[t.createElementVNode("button",{class:t.normalizeClass(["tab",{active:e===r.activeTab}]),onClick:t=>function(e){r.activeTab=e}(e)},t.toDisplayString(e),11,Qe)]))),128))]),t.createElementVNode("div",Ke,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(u),(e,n)=>(t.openBlock(),t.createElementBlock("div",{key:n,class:t.normalizeClass(["card",s.value?"small":""])},[t.createElementVNode("div",Ye,[t.createElementVNode("button",{class:"edit-app",onClick:t.withModifiers(e=>function(e){return d(this,null,function*(){const t=r.bookmarks[r.activeTab][e],n=prompt("Nuevo título:",t.title);if(null===n)return;const o=prompt("Nueva URL:",t.url);null!==o&&(t.title=n,t.url=o,t.logo=`https://www.google.com/s2/favicons?domain=${new URL(o).hostname}&sz=64`,f())})}(n),["prevent"])},"✏️",8,Ge),t.createElementVNode("button",{class:"delete-app",onClick:t.withModifiers(e=>function(e){return d(this,null,function*(){confirm(`¿Estás seguro de eliminar ${r.bookmarks[r.activeTab][e].title}?`)&&(r.bookmarks[r.activeTab].splice(e,1),f())})}(n),["prevent"])},"🗑️",8,Xe)]),t.createElementVNode("a",{href:"#",class:"card-link",onClick:t.withModifiers(t=>{return n=e.url,void("self"===c.value?window.location.href=n:window.open(n,"_blank"));var n},["prevent"])},[t.createElementVNode("div",tt,[t.createElementVNode("div",{class:"icon-container",style:t.normalizeStyle(t.unref(m)),ref_for:!0,ref:"iconContainers"},[t.createElementVNode("img",{src:e.logo,alt:e.title+" logo",class:t.normalizeClass({small:s.value}),onError:t=>function(e,t){const n=e.target;n.style.display="none";const o=n.parentNode;o.style.backgroundColor="#066D5A",o.textContent=t.charAt(0).toUpperCase()}(t,e.title)},null,42,nt)],4),t.createTextVNode(" "+t.toDisplayString(e.title),1)])],8,et)],2))),128)),t.unref(u).length<8?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["card",s.value?"small":""])},[t.createElementVNode("a",{href:"#",class:"card-link",onClick:t.withModifiers(p,["prevent"])},n[0]||(n[0]=[t.createElementVNode("div",{class:"column"},[t.createElementVNode("span",{class:"add"},"+"),t.createTextVNode(" Add ")],-1)]))],2)):t.createCommentVNode("",!0)])]))}},it=f(rt,[["__scopeId","data-v-5fb970f5"]]),st=t.defineCustomElement(v),lt=t.defineCustomElement(Le),ct=t.defineCustomElement(He),at=t.defineCustomElement(it);customElements.get("z-clock-widget")||customElements.define("z-clock-widget",st),customElements.get("z-search-widget")||customElements.define("z-search-widget",lt),customElements.get("z-todo-widget")||customElements.define("z-todo-widget",ct),customElements.get("z-marked-widget")||customElements.define("z-search-widget",at),e.ZClockWidget=v,e.ZMarkedWidget=it,e.ZSearchWidget=Le,e.ZTodoWidget=He,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ZenWdg={},e.Vue)}(this,function(e,t){"use strict";var n=Object.defineProperty,o=Object.defineProperties,r=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,c=(e,t,o)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,a=(e,t)=>{for(var n in t||(t={}))s.call(t,n)&&c(e,n,t[n]);if(i)for(var n of i(t))l.call(t,n)&&c(e,n,t[n]);return e},u=(e,t)=>o(e,r(t)),d=(e,t,n)=>new Promise((o,r)=>{var i=e=>{try{l(n.next(e))}catch(t){r(t)}},s=e=>{try{l(n.throw(e))}catch(t){r(t)}},l=e=>e.done?o(e.value):Promise.resolve(e.value).then(i,s);l((n=n.apply(e,t)).next())});const f=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},p={class:"clock-container"},m={class:"clock"},g={class:"time"},h={class:"date"};const v=f({name:"ZClockWidget",data:()=>({hours:"00",minutes:"00",seconds:"00",dayOfWeek:"",day:"",month:"",year:""}),mounted(){this.updateClock(),setInterval(this.updateClock,1e3)},methods:{updateClock(){const e=new Date;this.hours=e.getHours().toString().padStart(2,"0"),this.minutes=e.getMinutes().toString().padStart(2,"0"),this.seconds=e.getSeconds().toString().padStart(2,"0"),this.dayOfWeek=this.getDayOfWeek(e.getDay()),this.day=e.getDate(),this.month=this.getMonthName(e.getMonth()),this.year=e.getFullYear()},getDayOfWeek:e=>["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"][e],getMonthName:e=>["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"][e]}},[["render",function(e,n,o,r,i,s){return t.openBlock(),t.createElementBlock("div",p,[t.createElementVNode("div",m,[t.createElementVNode("div",g,[t.createElementVNode("span",null,t.toDisplayString(i.hours),1),n[0]||(n[0]=t.createTextVNode(":",-1)),t.createElementVNode("span",null,t.toDisplayString(i.minutes),1)]),t.createElementVNode("div",h,[t.createElementVNode("span",null,t.toDisplayString(i.dayOfWeek)+", "+t.toDisplayString(i.day)+" "+t.toDisplayString(i.month)+" "+t.toDisplayString(i.year),1)])])])}],["__scopeId","data-v-e9445086"]]),y={data:()=>({}),props:{placeholder:String,modelValue:{type:String,default:""},round:{type:Boolean,default:!1},full:{type:Boolean},rounded:{type:Boolean,default:!1}},methods:{onInput(e){this.$emit("update:modelValue",e.target.value)},onEnter(){this.$emit("enter-pressed",this.modelValue)}}},b=["placeholder","value"];const k=f(y,[["render",function(e,n,o,r,i,s){return t.openBlock(),t.createElementBlock("input",{placeholder:o.placeholder,value:o.modelValue,onInput:n[0]||(n[0]=(...e)=>s.onInput&&s.onInput(...e)),onKeydown:n[1]||(n[1]=t.withKeys((...e)=>s.onEnter&&s.onEnter(...e),["enter"])),class:t.normalizeClass([{"full-width":o.full},{round:o.round},{rounded:o.rounded}])},null,42,b)}],["__scopeId","data-v-2ad90286"]]),w=/^[a-z0-9]+(-[a-z0-9]+)*$/,x=(e,t,n,o="")=>{const r=e.split(":");if("@"===e.slice(0,1)){if(r.length<2||r.length>3)return null;o=r.shift().slice(1)}if(r.length>3||!r.length)return null;if(r.length>1){const e=r.pop(),n=r.pop(),i={provider:r.length>0?r[0]:o,prefix:n,name:e};return t&&!E(i)?null:i}const i=r[0],s=i.split("-");if(s.length>1){const e={provider:o,prefix:s.shift(),name:s.join("-")};return t&&!E(e)?null:e}if(n&&""===o){const e={provider:o,prefix:"",name:i};return t&&!E(e,n)?null:e}return null},E=(e,t)=>!!e&&!(!(t&&""===e.prefix||e.prefix)||!e.name),S=Object.freeze({left:0,top:0,width:16,height:16}),T=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),C=Object.freeze(a(a({},S),T)),N=Object.freeze(u(a({},C),{body:"",hidden:!1}));function B(e,t){const n=function(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const o=((e.rotate||0)+(t.rotate||0))%4;return o&&(n.rotate=o),n}(e,t);for(const o in N)o in T?o in e&&!(o in n)&&(n[o]=T[o]):o in t?n[o]=t[o]:o in e&&(n[o]=e[o]);return n}function z(e,t,n){const o=e.icons,r=e.aliases||Object.create(null);let i={};function s(e){i=B(o[e]||r[e],i)}return s(t),n.forEach(s),B(e,i)}function V(e,t){const n=[];if("object"!=typeof e||"object"!=typeof e.icons)return n;e.not_found instanceof Array&&e.not_found.forEach(e=>{t(e,null),n.push(e)});const o=function(e){const t=e.icons,n=e.aliases||Object.create(null),o=Object.create(null);return Object.keys(t).concat(Object.keys(n)).forEach(function e(r){if(t[r])return o[r]=[];if(!(r in o)){o[r]=null;const t=n[r]&&n[r].parent,i=t&&e(t);i&&(o[r]=[t].concat(i))}return o[r]}),o}(e);for(const r in o){const i=o[r];i&&(t(r,z(e,r,i)),n.push(r))}return n}const j=a({provider:"",aliases:{},not_found:{}},S);function O(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function F(e){if("object"!=typeof e||null===e)return null;const t=e;if("string"!=typeof t.prefix||!e.icons||"object"!=typeof e.icons)return null;if(!O(e,j))return null;const n=t.icons;for(const r in n){const e=n[r];if(!r||"string"!=typeof e.body||!O(e,N))return null}const o=t.aliases||Object.create(null);for(const r in o){const e=o[r],t=e.parent;if(!r||"string"!=typeof t||!n[t]&&!o[t]||!O(e,N))return null}return t}const I=Object.create(null);function M(e,t){const n=I[e]||(I[e]=Object.create(null));return n[t]||(n[t]=function(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}(e,t))}function L(e,t){return F(t)?V(t,(t,n)=>{n?e.icons[t]=n:e.missing.add(t)}):[]}let D=!1;function _(e){return"boolean"==typeof e&&(D=e),D}function P(e,t){const n=x(e,!0,D);if(!n)return!1;const o=M(n.provider,n.prefix);return t?function(e,t,n){try{if("string"==typeof n.body)return e.icons[t]=a({},n),!0}catch(o){}return!1}(o,n.name,t):(o.missing.add(n.name),!0)}const A=Object.freeze({width:null,height:null}),W=Object.freeze(a(a({},A),T)),R=/(-?[0-9.]*[0-9]+[0-9.]*)/g,U=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function $(e,t,n){if(1===t)return e;if(n=n||100,"number"==typeof e)return Math.ceil(e*t*n)/n;if("string"!=typeof e)return e;const o=e.split(R);if(null===o||!o.length)return e;const r=[];let i=o.shift(),s=U.test(i);for(;;){if(s){const e=parseFloat(i);isNaN(e)?r.push(i):r.push(Math.ceil(e*t*n)/n)}else r.push(i);if(i=o.shift(),void 0===i)return r.join("");s=!s}}const q=/\sid="(\S+)"/g,Z="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16);let H=0;const J=Object.create(null);function Q(e){return J[e]||J[""]}function K(e){let t;if("string"==typeof e.resources)t=[e.resources];else if(t=e.resources,!(t instanceof Array&&t.length))return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:!0===e.random,index:e.index||0,dataAfterTimeout:!1!==e.dataAfterTimeout}}const Y=Object.create(null),G=["https://api.simplesvg.com","https://api.unisvg.com"],X=[];for(;G.length>0;)1===G.length||Math.random()>.5?X.push(G.shift()):X.push(G.pop());function ee(e,t){const n=K(t);return null!==n&&(Y[e]=n,!0)}function te(e){return Y[e]}Y[""]=K({resources:["https://api.iconify.design"].concat(X)});let ne=(()=>{let e;try{if(e=fetch,"function"==typeof e)return e}catch(t){}})();const oe={prepare:(e,t,n)=>{const o=[],r=function(e,t){const n=te(e);if(!n)return 0;let o;if(n.maxURL){let e=0;n.resources.forEach(t=>{const n=t;e=Math.max(e,n.length)});const r=t+".json?icons=";o=n.maxURL-e-n.path.length-r.length}else o=0;return o}(e,t),i="icons";let s={type:i,provider:e,prefix:t,icons:[]},l=0;return n.forEach((n,c)=>{l+=n.length+1,l>=r&&c>0&&(o.push(s),s={type:i,provider:e,prefix:t,icons:[]},l=n.length),s.icons.push(n)}),o.push(s),o},send:(e,t,n)=>{if(!ne)return void n("abort",424);let o=function(e){if("string"==typeof e){const t=te(e);if(t)return t.path}return"/"}(t.provider);switch(t.type){case"icons":{const e=t.prefix,n=t.icons.join(",");o+=e+".json?"+new URLSearchParams({icons:n}).toString();break}case"custom":{const e=t.uri;o+="/"===e.slice(0,1)?e.slice(1):e;break}default:return void n("abort",400)}let r=503;ne(e+o).then(e=>{const t=e.status;if(200===t)return r=501,e.json();setTimeout(()=>{n(function(e){return 404===e}(t)?"abort":"next",t)})}).then(e=>{"object"==typeof e&&null!==e?setTimeout(()=>{n("success",e)}):setTimeout(()=>{404===e?n("abort",e):n("next",r)})}).catch(()=>{n("next",r)})}};function re(e,t){e.forEach(e=>{const n=e.loaderCallbacks;n&&(e.loaderCallbacks=n.filter(e=>e.id!==t))})}let ie=0;var se={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function le(e,t,n,o){const r=e.resources.length,i=e.random?Math.floor(Math.random()*r):e.index;let s;if(e.random){let t=e.resources.slice(0);for(s=[];t.length>1;){const e=Math.floor(Math.random()*t.length);s.push(t[e]),t=t.slice(0,e).concat(t.slice(e+1))}s=s.concat(t)}else s=e.resources.slice(i).concat(e.resources.slice(0,i));const l=Date.now();let c,a="pending",u=0,d=null,f=[],p=[];function m(){d&&(clearTimeout(d),d=null)}function g(){"pending"===a&&(a="aborted"),m(),f.forEach(e=>{"pending"===e.status&&(e.status="aborted")}),f=[]}function h(e,t){t&&(p=[]),"function"==typeof e&&p.push(e)}function v(){a="failed",p.forEach(e=>{e(void 0,c)})}function y(){f.forEach(e=>{"pending"===e.status&&(e.status="aborted")}),f=[]}function b(){if("pending"!==a)return;m();const o=s.shift();if(void 0===o)return f.length?void(d=setTimeout(()=>{m(),"pending"===a&&(y(),v())},e.timeout)):void v();const r={status:"pending",resource:o,callback:(t,n)=>{!function(t,n,o){const r="success"!==n;switch(f=f.filter(e=>e!==t),a){case"pending":break;case"failed":if(r||!e.dataAfterTimeout)return;break;default:return}if("abort"===n)return c=o,void v();if(r)return c=o,void(f.length||(s.length?b():v()));if(m(),y(),!e.random){const n=e.resources.indexOf(t.resource);-1!==n&&n!==e.index&&(e.index=n)}a="completed",p.forEach(e=>{e(o)})}(r,t,n)}};f.push(r),u++,d=setTimeout(b,e.rotate),n(o,t,r.callback)}return"function"==typeof o&&p.push(o),setTimeout(b),function(){return{startTime:l,payload:t,status:a,queriesSent:u,queriesPending:f.length,subscribe:h,abort:g}}}function ce(e){const t=a(a({},se),e);let n=[];function o(){n=n.filter(e=>"pending"===e().status)}return{query:function(e,r,i){const s=le(t,e,r,(e,t)=>{o(),i&&i(e,t)});return n.push(s),s},find:function(e){return n.find(t=>e(t))||null},setIndex:e=>{t.index=e},getIndex:()=>t.index,cleanup:o}}function ae(){}const ue=Object.create(null);function de(e,t,n){let o,r;if("string"==typeof e){const t=Q(e);if(!t)return n(void 0,424),ae;r=t.send;const i=function(e){if(!ue[e]){const t=te(e);if(!t)return;const n={config:t,redundancy:ce(t)};ue[e]=n}return ue[e]}(e);i&&(o=i.redundancy)}else{const t=K(e);if(t){o=ce(t);const n=Q(e.resources?e.resources[0]:"");n&&(r=n.send)}}return o&&r?o.query(t,r,n)().abort:(n(void 0,424),ae)}function fe(){}function pe(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,function(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const o=e.provider,r=e.prefix;t.forEach(t=>{const i=t.icons,s=i.pending.length;i.pending=i.pending.filter(t=>{if(t.prefix!==r)return!0;const s=t.name;if(e.icons[s])i.loaded.push({provider:o,prefix:r,name:s});else{if(!e.missing.has(s))return n=!0,!0;i.missing.push({provider:o,prefix:r,name:s})}return!1}),i.pending.length!==s&&(n||re([e],t.id),t.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),t.abort))})}))}(e)}))}function me(e,t,n){function o(){const n=e.pendingIcons;t.forEach(t=>{n&&n.delete(t),e.icons[t]||e.missing.add(t)})}if(n&&"object"==typeof n)try{if(!L(e,n).length)return void o()}catch(r){console.error(r)}o(),pe(e)}function ge(e,t){e instanceof Promise?e.then(e=>{t(e)}).catch(()=>{t(null)}):t(e)}function he(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:t,prefix:n}=e,o=e.iconsToLoad;if(delete e.iconsToLoad,!o||!o.length)return;const r=e.loadIcon;if(e.loadIcons&&(o.length>1||!r))return void ge(e.loadIcons(o,n,t),t=>{me(e,o,t)});if(r)return void o.forEach(o=>{ge(r(o,n,t),t=>{me(e,[o],t?{prefix:n,icons:{[o]:t}}:null)})});const{valid:i,invalid:s}=function(e){const t=[],n=[];return e.forEach(e=>{(e.match(w)?t:n).push(e)}),{valid:t,invalid:n}}(o);if(s.length&&me(e,s,null),!i.length)return;const l=n.match(w)?Q(t):null;if(!l)return void me(e,i,null);l.prepare(t,n,i).forEach(n=>{de(t,n,t=>{me(e,n.icons,t)})})}))}const ve=(e,t)=>{const n=function(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((e,t)=>e.provider!==t.provider?e.provider.localeCompare(t.provider):e.prefix!==t.prefix?e.prefix.localeCompare(t.prefix):e.name.localeCompare(t.name));let o={provider:"",prefix:"",name:""};return e.forEach(e=>{if(o.name===e.name&&o.prefix===e.prefix&&o.provider===e.provider)return;o=e;const r=e.provider,i=e.prefix,s=e.name,l=n[r]||(n[r]=Object.create(null)),c=l[i]||(l[i]=M(r,i));let a;a=s in c.icons?t.loaded:""===i||c.missing.has(s)?t.missing:t.pending;const u={provider:r,prefix:i,name:s};a.push(u)}),t}(function(e,t=!0,n=!1){const o=[];return e.forEach(e=>{const r="string"==typeof e?x(e,t,n):e;r&&o.push(r)}),o}(e,!0,_()));if(!n.pending.length){let e=!0;return t&&setTimeout(()=>{e&&t(n.loaded,n.missing,n.pending,fe)}),()=>{e=!1}}const o=Object.create(null),r=[];let i,s;return n.pending.forEach(e=>{const{provider:t,prefix:n}=e;if(n===s&&t===i)return;i=t,s=n,r.push(M(t,n));const l=o[t]||(o[t]=Object.create(null));l[n]||(l[n]=[])}),n.pending.forEach(e=>{const{provider:t,prefix:n,name:r}=e,i=M(t,n),s=i.pendingIcons||(i.pendingIcons=new Set);s.has(r)||(s.add(r),o[t][n].push(r))}),r.forEach(e=>{const t=o[e.provider][e.prefix];t.length&&he(e,t)}),t?function(e,t,n){const o=ie++,r=re.bind(null,n,o);if(!t.pending.length)return r;const i={id:o,icons:t,callback:e,abort:r};return n.forEach(e=>{(e.loaderCallbacks||(e.loaderCallbacks=[])).push(i)}),r}(t,n,r):fe};const ye=/[\s,]+/;function be(e,t){t.split(ye).forEach(t=>{switch(t.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0}})}function ke(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function o(e){for(;e<0;)e+=4;return e%4}if(""===n){const t=parseInt(e);return isNaN(t)?0:o(t)}if(n!==e){let t=0;switch(n){case"%":t=25;break;case"deg":t=90}if(t){let r=parseFloat(e.slice(0,e.length-n.length));return isNaN(r)?0:(r/=t,r%1==0?o(r):0)}}return t}const we=u(a({},W),{inline:!1}),xe={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Ee={display:"inline-block"},Se={backgroundColor:"currentColor"},Te={backgroundColor:"transparent"},Ce={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Ne={webkitMask:Se,mask:Se,background:Te};for(const dt in Ne){const e=Ne[dt];for(const t in Ce)e[dt+t]=Ce[t]}const Be={};function ze(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}["horizontal","vertical"].forEach(e=>{const t=e.slice(0,1)+"Flip";Be[e+"-flip"]=t,Be[e.slice(0,1)+"-flip"]=t,Be[e+"Flip"]=t});const Ve=(e,n)=>{const o=function(e,t){const n=a({},e);for(const o in t){const e=t[o],r=typeof e;o in A?(null===e||e&&("string"===r||"number"===r))&&(n[o]=e):r===typeof n[o]&&(n[o]="rotate"===o?e%4:e)}return n}(we,n),r=a({},xe),i=n.mode||"svg",s={},l=n.style,c="object"!=typeof l||l instanceof Array?{}:l;for(let t in n){const e=n[t];if(void 0!==e)switch(t){case"icon":case"style":case"onLoad":case"mode":case"ssr":break;case"inline":case"hFlip":case"vFlip":o[t]=!0===e||"true"===e||1===e;break;case"flip":"string"==typeof e&&be(o,e);break;case"color":s.color=e;break;case"rotate":"string"==typeof e?o[t]=ke(e):"number"==typeof e&&(o[t]=e);break;case"ariaHidden":case"aria-hidden":!0!==e&&"true"!==e&&delete r["aria-hidden"];break;default:{const n=Be[t];n?!0!==e&&"true"!==e&&1!==e||(o[n]=!0):void 0===we[t]&&(r[t]=e)}}}const d=function(e,t){const n=a(a({},C),e),o=a(a({},W),t),r={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,o].forEach(e=>{const t=[],n=e.hFlip,o=e.vFlip;let s,l=e.rotate;switch(n?o?l+=2:(t.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),t.push("scale(-1 1)"),r.top=r.left=0):o&&(t.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),t.push("scale(1 -1)"),r.top=r.left=0),l<0&&(l-=4*Math.floor(l/4)),l%=4,l){case 1:s=r.height/2+r.top,t.unshift("rotate(90 "+s.toString()+" "+s.toString()+")");break;case 2:t.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:s=r.width/2+r.left,t.unshift("rotate(-90 "+s.toString()+" "+s.toString()+")")}l%2==1&&(r.left!==r.top&&(s=r.left,r.left=r.top,r.top=s),r.width!==r.height&&(s=r.width,r.width=r.height,r.height=s)),t.length&&(i=function(e,t,n){const o=function(e,t="defs"){let n="";const o=e.indexOf("<"+t);for(;o>=0;){const r=e.indexOf(">",o),i=e.indexOf("</"+t);if(-1===r||-1===i)break;const s=e.indexOf(">",i);if(-1===s)break;n+=e.slice(r+1,i).trim(),e=e.slice(0,o).trim()+e.slice(s+1)}return{defs:n,content:e}}(e);return r=o.defs,i=t+o.content+n,r?"<defs>"+r+"</defs>"+i:i;var r,i}(i,'<g transform="'+t.join(" ")+'">',"</g>"))});const s=o.width,l=o.height,c=r.width,u=r.height;let d,f;null===s?(f=null===l?"1em":"auto"===l?u:l,d=$(f,c/u)):(d="auto"===s?c:s,f=null===l?$(d,u/c):"auto"===l?u:l);const p={},m=(e,t)=>{(e=>"unset"===e||"undefined"===e||"none"===e)(t)||(p[e]=t.toString())};m("width",d),m("height",f);const g=[r.left,r.top,c,u];return p.viewBox=g.join(" "),{attributes:p,viewBox:g,body:i}}(e,o),f=d.attributes;if(o.inline&&(s.verticalAlign="-0.125em"),"svg"===i){r.style=a(a({},s),c),Object.assign(r,f);let e=0,o=n.id;return"string"==typeof o&&(o=o.replace(/-/g,"_")),r.innerHTML=function(e,t=Z){const n=[];let o;for(;o=q.exec(e);)n.push(o[1]);if(!n.length)return e;const r="suffix"+(16777216*Math.random()|Date.now()).toString(16);return n.forEach(n=>{const o="function"==typeof t?t(n):t+(H++).toString(),i=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+i+')([")]|\\.[a-z])',"g"),"$1"+o+r+"$3")}),e=e.replace(new RegExp(r,"g"),"")}(d.body,o?()=>o+"ID"+e++:"iconifyVue"),t.h("svg",r)}const{body:p,width:m,height:g}=e,h="mask"===i||"bg"!==i&&-1!==p.indexOf("currentColor"),v=function(e,t){let n=-1===e.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const o in t)n+=" "+o+'="'+t[o]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}(p,u(a({},f),{width:m+"",height:g+""}));var y;return r.style=a(a(a(u(a({},s),{"--svg":(y=v,'url("'+function(e){return"data:image/svg+xml,"+function(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}(e)}(y)+'")'),width:ze(f.width),height:ze(f.height)}),Ee),h?Se:Te),c),t.h("span",r)};var je;if(_(!0),je=oe,J[""]=je,"undefined"!=typeof document&&"undefined"!=typeof window){const e=window;if(void 0!==e.IconifyPreload){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";"object"==typeof t&&null!==t&&(t instanceof Array?t:[t]).forEach(e=>{try{("object"!=typeof e||null===e||e instanceof Array||"object"!=typeof e.icons||"string"!=typeof e.prefix||!function(e,t){if("object"!=typeof e)return!1;if("string"!=typeof t&&(t=e.provider||""),D&&!t&&!e.prefix){let t=!1;return F(e)&&(e.prefix="",V(e,(e,n)=>{P(e,n)&&(t=!0)})),t}const n=e.prefix;return!!E({prefix:n,name:"a"})&&!!L(M(t,n),e)}(e))&&console.error(n)}catch(t){console.error(n)}})}if(void 0!==e.IconifyProviders){const t=e.IconifyProviders;if("object"==typeof t&&null!==t)for(let e in t){const n="IconifyProviders["+e+"] is invalid.";try{const o=t[e];if("object"!=typeof o||!o||void 0===o.resources)continue;ee(e,o)||console.error(n)}catch(ut){console.error(n)}}}}const Oe=u(a({},C),{body:""}),Fe={data:()=>({}),components:{Icon:t.defineComponent((e,{emit:n})=>{const o=t.ref(null);function r(){var e,t;o.value&&(null==(t=(e=o.value).abort)||t.call(e),o.value=null)}const i=t.ref(!!e.ssr),s=t.ref(""),l=t.shallowRef(null);function c(){const i=e.icon;if("object"==typeof i&&null!==i&&"string"==typeof i.body)return s.value="",{data:i};let l;if("string"!=typeof i||null===(l=x(i,!1,!0)))return null;let c=function(e){const t="string"==typeof e?x(e,!0,D):e;if(t){const e=M(t.provider,t.prefix),n=t.name;return e.icons[n]||(e.missing.has(n)?null:void 0)}}(l);if(!c){const e=o.value;return e&&e.name===i||(o.value=null===c?{name:i}:{name:i,abort:ve([l],d)}),null}r(),s.value!==i&&(s.value=i,t.nextTick(()=>{n("load",i)}));const a=e.customise;if(a){c=Object.assign({},c);const e=a(c.body,l.name,l.prefix,l.provider);"string"==typeof e&&(c.body=e)}const u=["iconify"];return""!==l.prefix&&u.push("iconify--"+l.prefix),""!==l.provider&&u.push("iconify--"+l.provider),{data:c,classes:u}}function d(){var e;const t=c();t?t.data!==(null==(e=l.value)?void 0:e.data)&&(l.value=t):l.value=null}return i.value?d():t.onMounted(()=>{i.value=!0,d()}),t.watch(()=>e.icon,d),t.onUnmounted(r),()=>{const t=l.value;if(!t)return Ve(Oe,e);let n=e;return t.classes&&(n=u(a({},e),{class:t.classes.join(" ")})),Ve(a(a({},C),t.data),n)}},{props:["icon","mode","ssr","width","height","style","color","inline","rotate","hFlip","horizontalFlip","vFlip","verticalFlip","flip","id","ariaHidden","customise","title"],emits:["load"]})},props:{title:{type:String,required:!1},bound:{type:Boolean,default:!1},bounded:{type:Boolean,default:!1},flat:{type:Boolean,default:!1},iconLeft:{type:Boolean,required:!1,default:!1},iconRight:{type:Boolean,default:!1},icon:{type:String},size:{type:String},iconSize:{type:String},wFull:{type:Boolean,default:!1},noBg:{type:Boolean,default:!1},color:String},methods:{}};const Ie={class:"search"},Me=["src"];const Le=f({name:"ZSearchWidget",data:()=>({text:""}),props:{searchTarget:{type:String,require:!1,default:"same"},logo:{type:String,require:!1}},components:{Input:k,Button:f(Fe,[["render",function(e,n,o,r,i,s){const l=t.resolveComponent("Icon");return t.openBlock(),t.createElementBlock("button",{class:t.normalizeClass([{flat:o.flat},{bound:o.bound},{bounded:o.bounded},{"w-full":o.wFull},{transparent:o.noBg}]),style:t.normalizeStyle([{"font-size":o.size},{color:o.color}])},[o.iconLeft?(t.openBlock(),t.createBlock(l,{key:0,icon:o.icon,style:t.normalizeStyle({"font-size":o.iconSize})},null,8,["icon","style"])):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(o.title)+" ",1),o.icon&&!o.iconLeft?(t.openBlock(),t.createBlock(l,{key:1,icon:o.icon,width:o.iconSize,height:o.iconSize},null,8,["icon","width","height"])):t.createCommentVNode("",!0)],6)}],["__scopeId","data-v-10678914"]])},methods:{search(){const e=`https://astiango.co/?q=${encodeURIComponent(this.text)}`;"new"==this.searchTarget?chrome.tabs.create({url:e}):"same"==this.searchTarget&&chrome.tabs.update({url:e})}}},[["render",function(e,n,o,r,i,s){const l=t.resolveComponent("Input"),c=t.resolveComponent("Button");return t.openBlock(),t.createElementBlock("div",Ie,[o.logo?(t.openBlock(),t.createElementBlock("img",{key:0,src:o.logo},null,8,Me)):t.createCommentVNode("",!0),t.createVNode(l,{placeholder:"Search something",full:"",class:"bg",modelValue:i.text,"onUpdate:modelValue":n[0]||(n[0]=e=>i.text=e),onEnterPressed:n[1]||(n[1]=e=>s.search())},null,8,["modelValue"]),t.createVNode(c,{icon:"material-symbols-light:search-rounded",size:"25px",flat:"",class:"text-color",onClick:n[2]||(n[2]=e=>s.search())})])}],["__scopeId","data-v-50392e2c"]]),De={class:"todo-widget"},_e={class:"task-section"},Pe={key:0,class:"empty"},Ae={class:"actions"},We=["onClick"],Re=["onClick"],Ue={class:"task-section completed"},$e={key:0,class:"empty"},qe={class:"done"},Ze=["onClick"];const He=f({name:"TodoWidget",data:()=>({newTask:"",pendingTasks:[],completedTasks:[]}),methods:{addTask(){this.newTask.trim()&&(this.pendingTasks.push({text:this.newTask.trim()}),this.newTask="")},completeTask(e){const t=this.pendingTasks.splice(e,1)[0];this.completedTasks.push(t)},deleteTask(e){this.pendingTasks.splice(e,1)},deleteCompleted(e){this.completedTasks.splice(e,1)}}},[["render",function(e,n,o,r,i,s){return t.openBlock(),t.createElementBlock("div",De,[n[5]||(n[5]=t.createElementVNode("h2",{class:"title"},"📝 Mis Tareas",-1)),t.createElementVNode("form",{onSubmit:n[1]||(n[1]=t.withModifiers((...e)=>s.addTask&&s.addTask(...e),["prevent"])),class:"todo-form"},[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[0]||(n[0]=e=>i.newTask=e),type:"text",placeholder:"Escribe una nueva tarea..."},null,512),[[t.vModelText,i.newTask]]),n[2]||(n[2]=t.createElementVNode("button",{type:"submit"},"Agregar",-1))],32),t.createElementVNode("div",_e,[n[3]||(n[3]=t.createElementVNode("h3",null,"Tareas Pendientes",-1)),0===i.pendingTasks.length?(t.openBlock(),t.createElementBlock("div",Pe,"Sin tareas.")):t.createCommentVNode("",!0),t.createElementVNode("ul",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.pendingTasks,(e,n)=>(t.openBlock(),t.createElementBlock("li",{key:n},[t.createElementVNode("span",null,t.toDisplayString(e.text),1),t.createElementVNode("div",Ae,[t.createElementVNode("button",{onClick:e=>s.completeTask(n)},"✔️",8,We),t.createElementVNode("button",{onClick:e=>s.deleteTask(n)},"🗑️",8,Re)])]))),128))])]),t.createElementVNode("div",Ue,[n[4]||(n[4]=t.createElementVNode("h3",null,"Completadas",-1)),0===i.completedTasks.length?(t.openBlock(),t.createElementBlock("div",$e,"Ninguna aún.")):t.createCommentVNode("",!0),t.createElementVNode("ul",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.completedTasks,(e,n)=>(t.openBlock(),t.createElementBlock("li",{key:"c"+n},[t.createElementVNode("span",qe,t.toDisplayString(e.text),1),t.createElementVNode("button",{onClick:e=>s.deleteCompleted(n)},"❌",8,Ze)]))),128))])])])}],["__scopeId","data-v-edabf7fa"]]),Je={class:"tabs"},Qe=["onClick"],Ke={class:"grid"},Ye={class:"option-app"},Ge=["onClick"],Xe=["onClick"],et=["onClick"],tt={class:"column"},nt=["src","alt","onError"],ot="bookmark_manager_state",rt={__name:"z-marked-widget",props:{theme:{type:String,default:"light"},small:{type:Boolean,default:!1},categories:{type:Array,default:()=>["Personal","Work","Study"]},open:{type:String,default:"self"},useStorage:{type:Boolean,default:!1}},setup(e){const n=e,o={Personal:[{title:"Reddit",url:"https://reddit.com",logo:"https://www.google.com/s2/favicons?domain=reddit.com&sz=64"},{title:"Spotify",url:"https://spotify.com",logo:"https://www.google.com/s2/favicons?domain=spotify.com&sz=64"},{title:"Youtube",url:"https://youtube.com",logo:"https://www.google.com/s2/favicons?domain=youtube.com&sz=64"},{title:"Instagram",url:"https://instagram.com",logo:"https://www.google.com/s2/favicons?domain=instagram.com&sz=64"},{title:"Facebook",url:"https://facebook.com",logo:"https://www.google.com/s2/favicons?domain=facebook.com&sz=64"},{title:"WhatsApp",url:"https://whatsapp.com",logo:"https://www.google.com/s2/favicons?domain=whatsapp.com&sz=64"},{title:"Telegram",url:"https://web.telegram.org/",logo:"https://www.google.com/s2/favicons?domain=web.telegram.org&sz=64"},{title:"Spotify",url:"https://spotify.com",logo:"https://www.google.com/s2/favicons?domain=spotify.com&sz=64"}],Work:[{title:"GitHub",url:"https://github.com",logo:"https://www.google.com/s2/favicons?domain=github.com&sz=64"},{title:"Notion",url:"https://notion.so",logo:"https://www.google.com/s2/favicons?domain=notion.so&sz=64"}],Study:[{title:"MDN Web Docs",url:"https://developer.mozilla.org",logo:"https://www.google.com/s2/favicons?domain=mozilla.org&sz=64"},{title:"FreeCodeCamp",url:"https://freecodecamp.org",logo:"https://www.google.com/s2/favicons?domain=freecodecamp.org&sz=64"}]},r=t.reactive({bookmarks:n.useStorage&&JSON.parse(localStorage.getItem(ot))||o,activeTab:"Personal"}),i=t.ref([...n.categories]),s=t.ref(n.small),l=t.ref(n.theme),c=t.ref(n.open),a=t.ref(n.useStorage),u=computed(()=>r.bookmarks[r.activeTab]||[]);function f(){a.value&&localStorage.setItem(ot,JSON.stringify(r.bookmarks))}function p(){const e=prompt("Nombre del marcador:");if(!e)return;const t=prompt("URL del marcador:");if(!t)return;const n=`https://www.google.com/s2/favicons?domain=${new URL(t).hostname}&sz=64`;r.bookmarks[r.activeTab]||(r.bookmarks[r.activeTab]=[]),r.bookmarks[r.activeTab].push({title:e,url:t,logo:n}),f()}const m=computed(()=>({position:"relative",width:s.value?"50px":"40px",height:s.value?"50px":"40px",marginBottom:"8px",borderRadius:".4rem",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold",fontSize:"1.8rem",color:"light"===l.value?"#555":"#eee",userSelect:"none"}));return t.watch(()=>r.bookmarks,()=>f(),{deep:!0}),(e,n)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",Je,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.value,e=>(t.openBlock(),t.createElementBlock("div",{key:e,class:"container-tab"},[t.createElementVNode("button",{class:t.normalizeClass(["tab",{active:e===r.activeTab}]),onClick:t=>function(e){r.activeTab=e}(e)},t.toDisplayString(e),11,Qe)]))),128))]),t.createElementVNode("div",Ke,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(u),(e,n)=>(t.openBlock(),t.createElementBlock("div",{key:n,class:t.normalizeClass(["card",s.value?"small":""])},[t.createElementVNode("div",Ye,[t.createElementVNode("button",{class:"edit-app",onClick:t.withModifiers(e=>function(e){return d(this,null,function*(){const t=r.bookmarks[r.activeTab][e],n=prompt("Nuevo título:",t.title);if(null===n)return;const o=prompt("Nueva URL:",t.url);null!==o&&(t.title=n,t.url=o,t.logo=`https://www.google.com/s2/favicons?domain=${new URL(o).hostname}&sz=64`,f())})}(n),["prevent"])},"✏️",8,Ge),t.createElementVNode("button",{class:"delete-app",onClick:t.withModifiers(e=>function(e){return d(this,null,function*(){confirm(`¿Estás seguro de eliminar ${r.bookmarks[r.activeTab][e].title}?`)&&(r.bookmarks[r.activeTab].splice(e,1),f())})}(n),["prevent"])},"🗑️",8,Xe)]),t.createElementVNode("a",{href:"#",class:"card-link",onClick:t.withModifiers(t=>{return n=e.url,void("self"===c.value?window.location.href=n:window.open(n,"_blank"));var n},["prevent"])},[t.createElementVNode("div",tt,[t.createElementVNode("div",{class:"icon-container",style:t.normalizeStyle(t.unref(m)),ref_for:!0,ref:"iconContainers"},[t.createElementVNode("img",{src:e.logo,alt:e.title+" logo",class:t.normalizeClass({small:s.value}),onError:t=>function(e,t){const n=e.target;n.style.display="none";const o=n.parentNode;o.style.backgroundColor="#066D5A",o.textContent=t.charAt(0).toUpperCase()}(t,e.title)},null,42,nt)],4),t.createTextVNode(" "+t.toDisplayString(e.title),1)])],8,et)],2))),128)),t.unref(u).length<8?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["card",s.value?"small":""])},[t.createElementVNode("a",{href:"#",class:"card-link",onClick:t.withModifiers(p,["prevent"])},n[0]||(n[0]=[t.createElementVNode("div",{class:"column"},[t.createElementVNode("span",{class:"add"},"+"),t.createTextVNode(" Add ")],-1)]))],2)):t.createCommentVNode("",!0)])]))}},it=f(rt,[["__scopeId","data-v-5fb970f5"]]),st=t.defineCustomElement(v),lt=t.defineCustomElement(Le),ct=t.defineCustomElement(He),at=t.defineCustomElement(it);customElements.get("z-clock-widget")||customElements.define("z-clock-widget",st),customElements.get("z-search-widget")||customElements.define("z-search-widget",lt),customElements.get("z-todo-widget")||customElements.define("z-todo-widget",ct),customElements.get("z-marked-widget")||customElements.define("z-marked-widget",at),e.ZClockWidget=v,e.ZMarkedWidget=it,e.ZSearchWidget=Le,e.ZTodoWidget=He,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -24,7 +24,7 @@ if (!customElements.get('z-todo-widget')) {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
if (!customElements.get('z-marked-widget')) {
|
|
27
|
-
customElements.define('z-
|
|
27
|
+
customElements.define('z-marked-widget', ZMarkedElement)
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
// Exportar el componente para uso tradicional Vue
|