zen-wdg 2.2.3 → 2.2.4
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.css +1 -1
- package/dist/zen-wdg.es.js +2 -2
- package/dist/zen-wdg.umd.js +1 -1
- package/package.json +1 -1
- package/src/widgets/z-marked-widget.vue +6 -2
package/dist/zen-wdg.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.clock-container[data-v-e9445086]{display:flex;justify-content:center;align-items:center;height:100%;width:100%}.clock[data-v-e9445086]{text-align:center;font-family:Arial,sans-serif;color:#333;background-color:#14141466;backdrop-filter:blur(.2rem);border-radius:15px;padding:20px;width:100%}.time[data-v-e9445086]{font-size:4em;font-weight:700;color:#fff;display:flex;justify-content:center}.date[data-v-e9445086]{font-size:1.2em;color:#fff;margin-top:10px}@media (max-width: 500px){.time[data-v-e9445086]{font-size:3em}.date[data-v-e9445086]{font-size:1em}}input[data-v-2ad90286]{padding:.5rem 1rem;border:none}.full-width[data-v-2ad90286]{width:100%}input[data-v-2ad90286]:focus{outline:none}.round[data-v-2ad90286]{border-radius:.2rem}.rounded[data-v-2ad90286]{border-radius:10rem}button[data-v-10678914]{cursor:pointer;border:none;padding:.5rem;display:flex;align-items:center;justify-content:center;gap:.5rem;transition:.5s ease-in-out background}.w-full[data-v-10678914]{width:100%}.bound[data-v-10678914]{border-radius:.2rem}.bounded[data-v-10678914]{border-radius:50%}.flat[data-v-10678914]{padding:0;line-height:0;background-color:transparent}.search[data-v-365b4ae7]{width:100%;background-color:var(--bg-color);display:flex;align-items:center;padding:.2rem 1rem;border-radius:5rem;border:.01rem solid var(--orange);box-shadow:0 0 .4rem var(--border-color)}.search img[data-v-365b4ae7]{width:20px}.todo-widget[data-v-3560194d]{width:100%;background-color:#14141466;backdrop-filter:blur(.2rem);border-radius:16px;padding:20px;color:#fff;box-shadow:0 4px 10px #0000004d;max-width:500px;margin:0 auto}.title[data-v-3560194d]{margin-bottom:16px;text-align:center}.todo-form[data-v-3560194d]{display:flex;gap:10px;margin-bottom:20px}.todo-form input[data-v-3560194d]{flex:1;padding:10px 12px;border:none;border-radius:8px;background-color:#2a2a2a;color:#fff}.todo-form button[data-v-3560194d]{background-color:#007bff;color:#fff;border:none;border-radius:8px;padding:10px 16px;cursor:pointer}.task-section[data-v-3560194d]{margin-bottom:20px}.task-section h3[data-v-3560194d]{margin-bottom:8px;font-size:1rem;color:#ccc}.task-section ul[data-v-3560194d]{list-style:none;padding:0}.task-section li[data-v-3560194d]{background-color:#292929;padding:10px 12px;border-radius:10px;margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.actions button[data-v-3560194d]{margin-left:8px;background:none;border:none;color:#bbb;cursor:pointer;font-size:1rem}.actions button[data-v-3560194d]:hover{color:#fff}.empty[data-v-3560194d]{font-size:.9rem;color:#666}.done[data-v-3560194d]{text-decoration:line-through;color:#777}.container-marked[data-v-
|
|
1
|
+
.clock-container[data-v-e9445086]{display:flex;justify-content:center;align-items:center;height:100%;width:100%}.clock[data-v-e9445086]{text-align:center;font-family:Arial,sans-serif;color:#333;background-color:#14141466;backdrop-filter:blur(.2rem);border-radius:15px;padding:20px;width:100%}.time[data-v-e9445086]{font-size:4em;font-weight:700;color:#fff;display:flex;justify-content:center}.date[data-v-e9445086]{font-size:1.2em;color:#fff;margin-top:10px}@media (max-width: 500px){.time[data-v-e9445086]{font-size:3em}.date[data-v-e9445086]{font-size:1em}}input[data-v-2ad90286]{padding:.5rem 1rem;border:none}.full-width[data-v-2ad90286]{width:100%}input[data-v-2ad90286]:focus{outline:none}.round[data-v-2ad90286]{border-radius:.2rem}.rounded[data-v-2ad90286]{border-radius:10rem}button[data-v-10678914]{cursor:pointer;border:none;padding:.5rem;display:flex;align-items:center;justify-content:center;gap:.5rem;transition:.5s ease-in-out background}.w-full[data-v-10678914]{width:100%}.bound[data-v-10678914]{border-radius:.2rem}.bounded[data-v-10678914]{border-radius:50%}.flat[data-v-10678914]{padding:0;line-height:0;background-color:transparent}.search[data-v-365b4ae7]{width:100%;background-color:var(--bg-color);display:flex;align-items:center;padding:.2rem 1rem;border-radius:5rem;border:.01rem solid var(--orange);box-shadow:0 0 .4rem var(--border-color)}.search img[data-v-365b4ae7]{width:20px}.todo-widget[data-v-3560194d]{width:100%;background-color:#14141466;backdrop-filter:blur(.2rem);border-radius:16px;padding:20px;color:#fff;box-shadow:0 4px 10px #0000004d;max-width:500px;margin:0 auto}.title[data-v-3560194d]{margin-bottom:16px;text-align:center}.todo-form[data-v-3560194d]{display:flex;gap:10px;margin-bottom:20px}.todo-form input[data-v-3560194d]{flex:1;padding:10px 12px;border:none;border-radius:8px;background-color:#2a2a2a;color:#fff}.todo-form button[data-v-3560194d]{background-color:#007bff;color:#fff;border:none;border-radius:8px;padding:10px 16px;cursor:pointer}.task-section[data-v-3560194d]{margin-bottom:20px}.task-section h3[data-v-3560194d]{margin-bottom:8px;font-size:1rem;color:#ccc}.task-section ul[data-v-3560194d]{list-style:none;padding:0}.task-section li[data-v-3560194d]{background-color:#292929;padding:10px 12px;border-radius:10px;margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.actions button[data-v-3560194d]{margin-left:8px;background:none;border:none;color:#bbb;cursor:pointer;font-size:1rem}.actions button[data-v-3560194d]:hover{color:#fff}.empty[data-v-3560194d]{font-size:.9rem;color:#666}.done[data-v-3560194d]{text-decoration:line-through;color:#777}.container-marked[data-v-618b61ef]{width:100%;display:flex;flex-direction:column;gap:10px}.tabs[data-v-618b61ef]{width:auto;height:auto;display:flex;gap:10px;flex-wrap:wrap;background:#dcdcdc66;color:#444;padding:.2rem;border-radius:.6rem;align-self:start}.tabs.dark[data-v-618b61ef]{background:#0006;color:#dfdfdf}.container-tab[data-v-618b61ef]{position:relative}.tab[data-v-618b61ef]{padding:8px 2rem;border:none;cursor:pointer;transition:.3s;font-weight:600;background-color:transparent;color:unset}.tab.active[data-v-618b61ef]{background-color:#066d5a;color:#fff;border-radius:.5rem}.grid[data-v-618b61ef]{display:flex;flex-wrap:wrap;gap:.4rem}.grid.small[data-v-618b61ef]{gap:1.4rem}.card[data-v-618b61ef]{position:relative;flex:1 1 80px}.card.small[data-v-618b61ef]{flex:1 1 180px}.card-link[data-v-618b61ef]{height:106px;padding:16px;border-radius:1rem;box-shadow:0 2px 4px #0000004d;background-color:#c8c8c84d;backdrop-filter:blur(.2rem);text-align:center;cursor:pointer;text-decoration:none;color:#202020;display:flex;justify-content:center;flex-direction:column}.card-link.dark[data-v-618b61ef]{background-color:#0006;backdrop-filter:blur(.2rem);color:#fff}.option-app[data-v-618b61ef]{display:none;position:absolute;top:10px;right:10px;z-index:2;gap:.4rem}.card:hover .option-app[data-v-618b61ef]{display:flex;justify-content:center;align-items:center}.delete-app[data-v-618b61ef],.edit-app[data-v-618b61ef]{cursor:pointer;border-radius:.2rem;width:23px;height:23px;border:none;font-size:.8rem}.edit-app[data-v-618b61ef]{font-size:1rem}.card-link img[data-v-618b61ef]{width:100%;max-width:40px;border-radius:.4rem;margin-bottom:8px}.card-link img.small[data-v-618b61ef]{max-width:50px}.column[data-v-618b61ef]{display:flex;flex-direction:column;align-items:center;gap:5px}.add[data-v-618b61ef]{width:50px;height:50px;background:gray;border-radius:.5rem;display:flex;justify-content:center;font-size:2rem;line-height:50px;color:#fff;user-select:none}
|
package/dist/zen-wdg.es.js
CHANGED
|
@@ -2043,7 +2043,7 @@ const _sfc_main = {
|
|
|
2043
2043
|
},
|
|
2044
2044
|
small: {
|
|
2045
2045
|
type: Boolean,
|
|
2046
|
-
default:
|
|
2046
|
+
default: false
|
|
2047
2047
|
},
|
|
2048
2048
|
categories: {
|
|
2049
2049
|
type: Array,
|
|
@@ -2250,7 +2250,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2250
2250
|
])
|
|
2251
2251
|
]);
|
|
2252
2252
|
}
|
|
2253
|
-
const ZMarkedWidget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
2253
|
+
const ZMarkedWidget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-618b61ef"]]);
|
|
2254
2254
|
const ZClockElement = defineCustomElement(ZClockWidget);
|
|
2255
2255
|
const ZSearchElement = defineCustomElement(ZSearchWidget);
|
|
2256
2256
|
const ZTodoElement = defineCustomElement(ZTodoWidget);
|
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 o=Object.defineProperty,n=Object.defineProperties,r=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,a=(e,t,n)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,c=(e,t)=>{for(var o in t||(t={}))s.call(t,o)&&a(e,o,t[o]);if(i)for(var o of i(t))l.call(t,o)&&a(e,o,t[o]);return e},d=(e,t)=>n(e,r(t));const u=(e,t)=>{const o=e.__vccOpts||e;for(const[n,r]of t)o[n]=r;return o},p={class:"clock-container"},f={class:"clock"},m={class:"time"},h={class:"date"};const g=u({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,o,n,r,i,s){return t.openBlock(),t.createElementBlock("div",p,[t.createElementVNode("div",f,[t.createElementVNode("div",m,[t.createElementVNode("span",null,t.toDisplayString(i.hours),1),o[0]||(o[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"]]),k={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)}}},y=["placeholder","value"];const v=u(k,[["render",function(e,o,n,r,i,s){return t.openBlock(),t.createElementBlock("input",{placeholder:n.placeholder,value:n.modelValue,onInput:o[0]||(o[0]=(...e)=>s.onInput&&s.onInput(...e)),onKeydown:o[1]||(o[1]=t.withKeys((...e)=>s.onEnter&&s.onEnter(...e),["enter"])),class:t.normalizeClass([{"full-width":n.full},{round:n.round},{rounded:n.rounded}])},null,42,y)}],["__scopeId","data-v-2ad90286"]]),b=/^[a-z0-9]+(-[a-z0-9]+)*$/,w=(e,t,o,n="")=>{const r=e.split(":");if("@"===e.slice(0,1)){if(r.length<2||r.length>3)return null;n=r.shift().slice(1)}if(r.length>3||!r.length)return null;if(r.length>1){const e=r.pop(),o=r.pop(),i={provider:r.length>0?r[0]:n,prefix:o,name:e};return t&&!E(i)?null:i}const i=r[0],s=i.split("-");if(s.length>1){const e={provider:n,prefix:s.shift(),name:s.join("-")};return t&&!E(e)?null:e}if(o&&""===n){const e={provider:n,prefix:"",name:i};return t&&!E(e,o)?null:e}return null},E=(e,t)=>!!e&&!(!(t&&""===e.prefix||e.prefix)||!e.name),x=Object.freeze({left:0,top:0,width:16,height:16}),S=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),T=Object.freeze(c(c({},x),S)),C=Object.freeze(d(c({},T),{body:"",hidden:!1}));function B(e,t){const o=function(e,t){const o={};!e.hFlip!=!t.hFlip&&(o.hFlip=!0),!e.vFlip!=!t.vFlip&&(o.vFlip=!0);const n=((e.rotate||0)+(t.rotate||0))%4;return n&&(o.rotate=n),o}(e,t);for(const n in C)n in S?n in e&&!(n in o)&&(o[n]=S[n]):n in t?o[n]=t[n]:n in e&&(o[n]=e[n]);return o}function N(e,t,o){const n=e.icons,r=e.aliases||Object.create(null);let i={};function s(e){i=B(n[e]||r[e],i)}return s(t),o.forEach(s),B(e,i)}function z(e,t){const o=[];if("object"!=typeof e||"object"!=typeof e.icons)return o;e.not_found instanceof Array&&e.not_found.forEach(e=>{t(e,null),o.push(e)});const n=function(e){const t=e.icons,o=e.aliases||Object.create(null),n=Object.create(null);return Object.keys(t).concat(Object.keys(o)).forEach(function e(r){if(t[r])return n[r]=[];if(!(r in n)){n[r]=null;const t=o[r]&&o[r].parent,i=t&&e(t);i&&(n[r]=[t].concat(i))}return n[r]}),n}(e);for(const r in n){const i=n[r];i&&(t(r,N(e,r,i)),o.push(r))}return o}const V=c({provider:"",aliases:{},not_found:{}},x);function j(e,t){for(const o in t)if(o in e&&typeof e[o]!=typeof t[o])return!1;return!0}function O(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(!j(e,V))return null;const o=t.icons;for(const r in o){const e=o[r];if(!r||"string"!=typeof e.body||!j(e,C))return null}const n=t.aliases||Object.create(null);for(const r in n){const e=n[r],t=e.parent;if(!r||"string"!=typeof t||!o[t]&&!n[t]||!j(e,C))return null}return t}const I=Object.create(null);function F(e,t){const o=I[e]||(I[e]=Object.create(null));return o[t]||(o[t]=function(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}(e,t))}function M(e,t){return O(t)?z(t,(t,o)=>{o?e.icons[t]=o:e.missing.add(t)}):[]}let L=!1;function D(e){return"boolean"==typeof e&&(L=e),L}function P(e,t){const o=w(e,!0,L);if(!o)return!1;const n=F(o.provider,o.prefix);return t?function(e,t,o){try{if("string"==typeof o.body)return e.icons[t]=c({},o),!0}catch(n){}return!1}(n,o.name,t):(n.missing.add(o.name),!0)}const _=Object.freeze({width:null,height:null}),A=Object.freeze(c(c({},_),S)),R=/(-?[0-9.]*[0-9]+[0-9.]*)/g,W=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function U(e,t,o){if(1===t)return e;if(o=o||100,"number"==typeof e)return Math.ceil(e*t*o)/o;if("string"!=typeof e)return e;const n=e.split(R);if(null===n||!n.length)return e;const r=[];let i=n.shift(),s=W.test(i);for(;;){if(s){const e=parseFloat(i);isNaN(e)?r.push(i):r.push(Math.ceil(e*t*o)/o)}else r.push(i);if(i=n.shift(),void 0===i)return r.join("");s=!s}}const $=/\sid="(\S+)"/g,q="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16);let Z=0;const H=Object.create(null);function J(e){return H[e]||H[""]}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"],Q=[];for(;G.length>0;)1===G.length||Math.random()>.5?Q.push(G.shift()):Q.push(G.pop());function X(e,t){const o=K(t);return null!==o&&(Y[e]=o,!0)}function ee(e){return Y[e]}Y[""]=K({resources:["https://api.iconify.design"].concat(Q)});let te=(()=>{let e;try{if(e=fetch,"function"==typeof e)return e}catch(t){}})();const oe={prepare:(e,t,o)=>{const n=[],r=function(e,t){const o=ee(e);if(!o)return 0;let n;if(o.maxURL){let e=0;o.resources.forEach(t=>{const o=t;e=Math.max(e,o.length)});const r=t+".json?icons=";n=o.maxURL-e-o.path.length-r.length}else n=0;return n}(e,t),i="icons";let s={type:i,provider:e,prefix:t,icons:[]},l=0;return o.forEach((o,a)=>{l+=o.length+1,l>=r&&a>0&&(n.push(s),s={type:i,provider:e,prefix:t,icons:[]},l=o.length),s.icons.push(o)}),n.push(s),n},send:(e,t,o)=>{if(!te)return void o("abort",424);let n=function(e){if("string"==typeof e){const t=ee(e);if(t)return t.path}return"/"}(t.provider);switch(t.type){case"icons":{const e=t.prefix,o=t.icons.join(",");n+=e+".json?"+new URLSearchParams({icons:o}).toString();break}case"custom":{const e=t.uri;n+="/"===e.slice(0,1)?e.slice(1):e;break}default:return void o("abort",400)}let r=503;te(e+n).then(e=>{const t=e.status;if(200===t)return r=501,e.json();setTimeout(()=>{o(function(e){return 404===e}(t)?"abort":"next",t)})}).then(e=>{"object"==typeof e&&null!==e?setTimeout(()=>{o("success",e)}):setTimeout(()=>{404===e?o("abort",e):o("next",r)})}).catch(()=>{o("next",r)})}};function ne(e,t){e.forEach(e=>{const o=e.loaderCallbacks;o&&(e.loaderCallbacks=o.filter(e=>e.id!==t))})}let re=0;var ie={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function se(e,t,o,n){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 a,c="pending",d=0,u=null,p=[],f=[];function m(){u&&(clearTimeout(u),u=null)}function h(){"pending"===c&&(c="aborted"),m(),p.forEach(e=>{"pending"===e.status&&(e.status="aborted")}),p=[]}function g(e,t){t&&(f=[]),"function"==typeof e&&f.push(e)}function k(){c="failed",f.forEach(e=>{e(void 0,a)})}function y(){p.forEach(e=>{"pending"===e.status&&(e.status="aborted")}),p=[]}function v(){if("pending"!==c)return;m();const n=s.shift();if(void 0===n)return p.length?void(u=setTimeout(()=>{m(),"pending"===c&&(y(),k())},e.timeout)):void k();const r={status:"pending",resource:n,callback:(t,o)=>{!function(t,o,n){const r="success"!==o;switch(p=p.filter(e=>e!==t),c){case"pending":break;case"failed":if(r||!e.dataAfterTimeout)return;break;default:return}if("abort"===o)return a=n,void k();if(r)return a=n,void(p.length||(s.length?v():k()));if(m(),y(),!e.random){const o=e.resources.indexOf(t.resource);-1!==o&&o!==e.index&&(e.index=o)}c="completed",f.forEach(e=>{e(n)})}(r,t,o)}};p.push(r),d++,u=setTimeout(v,e.rotate),o(n,t,r.callback)}return"function"==typeof n&&f.push(n),setTimeout(v),function(){return{startTime:l,payload:t,status:c,queriesSent:d,queriesPending:p.length,subscribe:g,abort:h}}}function le(e){const t=c(c({},ie),e);let o=[];function n(){o=o.filter(e=>"pending"===e().status)}return{query:function(e,r,i){const s=se(t,e,r,(e,t)=>{n(),i&&i(e,t)});return o.push(s),s},find:function(e){return o.find(t=>e(t))||null},setIndex:e=>{t.index=e},getIndex:()=>t.index,cleanup:n}}function ae(){}const ce=Object.create(null);function de(e,t,o){let n,r;if("string"==typeof e){const t=J(e);if(!t)return o(void 0,424),ae;r=t.send;const i=function(e){if(!ce[e]){const t=ee(e);if(!t)return;const o={config:t,redundancy:le(t)};ce[e]=o}return ce[e]}(e);i&&(n=i.redundancy)}else{const t=K(e);if(t){n=le(t);const o=J(e.resources?e.resources[0]:"");o&&(r=o.send)}}return n&&r?n.query(t,r,o)().abort:(o(void 0,424),ae)}function ue(){}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 o=!1;const n=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:n,prefix:r,name:s});else{if(!e.missing.has(s))return o=!0,!0;i.missing.push({provider:n,prefix:r,name:s})}return!1}),i.pending.length!==s&&(o||ne([e],t.id),t.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),t.abort))})}))}(e)}))}function fe(e,t,o){function n(){const o=e.pendingIcons;t.forEach(t=>{o&&o.delete(t),e.icons[t]||e.missing.add(t)})}if(o&&"object"==typeof o)try{if(!M(e,o).length)return void n()}catch(r){console.error(r)}n(),pe(e)}function me(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:o}=e,n=e.iconsToLoad;if(delete e.iconsToLoad,!n||!n.length)return;const r=e.loadIcon;if(e.loadIcons&&(n.length>1||!r))return void me(e.loadIcons(n,o,t),t=>{fe(e,n,t)});if(r)return void n.forEach(n=>{me(r(n,o,t),t=>{fe(e,[n],t?{prefix:o,icons:{[n]:t}}:null)})});const{valid:i,invalid:s}=function(e){const t=[],o=[];return e.forEach(e=>{(e.match(b)?t:o).push(e)}),{valid:t,invalid:o}}(n);if(s.length&&fe(e,s,null),!i.length)return;const l=o.match(b)?J(t):null;if(!l)return void fe(e,i,null);l.prepare(t,o,i).forEach(o=>{de(t,o,t=>{fe(e,o.icons,t)})})}))}const ge=(e,t)=>{const o=function(e){const t={loaded:[],missing:[],pending:[]},o=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 n={provider:"",prefix:"",name:""};return e.forEach(e=>{if(n.name===e.name&&n.prefix===e.prefix&&n.provider===e.provider)return;n=e;const r=e.provider,i=e.prefix,s=e.name,l=o[r]||(o[r]=Object.create(null)),a=l[i]||(l[i]=F(r,i));let c;c=s in a.icons?t.loaded:""===i||a.missing.has(s)?t.missing:t.pending;const d={provider:r,prefix:i,name:s};c.push(d)}),t}(function(e,t=!0,o=!1){const n=[];return e.forEach(e=>{const r="string"==typeof e?w(e,t,o):e;r&&n.push(r)}),n}(e,!0,D()));if(!o.pending.length){let e=!0;return t&&setTimeout(()=>{e&&t(o.loaded,o.missing,o.pending,ue)}),()=>{e=!1}}const n=Object.create(null),r=[];let i,s;return o.pending.forEach(e=>{const{provider:t,prefix:o}=e;if(o===s&&t===i)return;i=t,s=o,r.push(F(t,o));const l=n[t]||(n[t]=Object.create(null));l[o]||(l[o]=[])}),o.pending.forEach(e=>{const{provider:t,prefix:o,name:r}=e,i=F(t,o),s=i.pendingIcons||(i.pendingIcons=new Set);s.has(r)||(s.add(r),n[t][o].push(r))}),r.forEach(e=>{const t=n[e.provider][e.prefix];t.length&&he(e,t)}),t?function(e,t,o){const n=re++,r=ne.bind(null,o,n);if(!t.pending.length)return r;const i={id:n,icons:t,callback:e,abort:r};return o.forEach(e=>{(e.loaderCallbacks||(e.loaderCallbacks=[])).push(i)}),r}(t,o,r):ue};const ke=/[\s,]+/;function ye(e,t){t.split(ke).forEach(t=>{switch(t.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0}})}function ve(e,t=0){const o=e.replace(/^-?[0-9.]*/,"");function n(e){for(;e<0;)e+=4;return e%4}if(""===o){const t=parseInt(e);return isNaN(t)?0:n(t)}if(o!==e){let t=0;switch(o){case"%":t=25;break;case"deg":t=90}if(t){let r=parseFloat(e.slice(0,e.length-o.length));return isNaN(r)?0:(r/=t,r%1==0?n(r):0)}}return t}const be=d(c({},A),{inline:!1}),we={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Ee={display:"inline-block"},xe={backgroundColor:"currentColor"},Se={backgroundColor:"transparent"},Te={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Ce={webkitMask:xe,mask:xe,background:Se};for(const ct in Ce){const e=Ce[ct];for(const t in Te)e[ct+t]=Te[t]}const Be={};function Ne(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 ze=(e,o)=>{const n=function(e,t){const o=c({},e);for(const n in t){const e=t[n],r=typeof e;n in _?(null===e||e&&("string"===r||"number"===r))&&(o[n]=e):r===typeof o[n]&&(o[n]="rotate"===n?e%4:e)}return o}(be,o),r=c({},we),i=o.mode||"svg",s={},l=o.style,a="object"!=typeof l||l instanceof Array?{}:l;for(let t in o){const e=o[t];if(void 0!==e)switch(t){case"icon":case"style":case"onLoad":case"mode":case"ssr":break;case"inline":case"hFlip":case"vFlip":n[t]=!0===e||"true"===e||1===e;break;case"flip":"string"==typeof e&&ye(n,e);break;case"color":s.color=e;break;case"rotate":"string"==typeof e?n[t]=ve(e):"number"==typeof e&&(n[t]=e);break;case"ariaHidden":case"aria-hidden":!0!==e&&"true"!==e&&delete r["aria-hidden"];break;default:{const o=Be[t];o?!0!==e&&"true"!==e&&1!==e||(n[o]=!0):void 0===be[t]&&(r[t]=e)}}}const u=function(e,t){const o=c(c({},T),e),n=c(c({},A),t),r={left:o.left,top:o.top,width:o.width,height:o.height};let i=o.body;[o,n].forEach(e=>{const t=[],o=e.hFlip,n=e.vFlip;let s,l=e.rotate;switch(o?n?l+=2:(t.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),t.push("scale(-1 1)"),r.top=r.left=0):n&&(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,o){const n=function(e,t="defs"){let o="";const n=e.indexOf("<"+t);for(;n>=0;){const r=e.indexOf(">",n),i=e.indexOf("</"+t);if(-1===r||-1===i)break;const s=e.indexOf(">",i);if(-1===s)break;o+=e.slice(r+1,i).trim(),e=e.slice(0,n).trim()+e.slice(s+1)}return{defs:o,content:e}}(e);return r=n.defs,i=t+n.content+o,r?"<defs>"+r+"</defs>"+i:i;var r,i}(i,'<g transform="'+t.join(" ")+'">',"</g>"))});const s=n.width,l=n.height,a=r.width,d=r.height;let u,p;null===s?(p=null===l?"1em":"auto"===l?d:l,u=U(p,a/d)):(u="auto"===s?a:s,p=null===l?U(u,d/a):"auto"===l?d:l);const f={},m=(e,t)=>{(e=>"unset"===e||"undefined"===e||"none"===e)(t)||(f[e]=t.toString())};m("width",u),m("height",p);const h=[r.left,r.top,a,d];return f.viewBox=h.join(" "),{attributes:f,viewBox:h,body:i}}(e,n),p=u.attributes;if(n.inline&&(s.verticalAlign="-0.125em"),"svg"===i){r.style=c(c({},s),a),Object.assign(r,p);let e=0,n=o.id;return"string"==typeof n&&(n=n.replace(/-/g,"_")),r.innerHTML=function(e,t=q){const o=[];let n;for(;n=$.exec(e);)o.push(n[1]);if(!o.length)return e;const r="suffix"+(16777216*Math.random()|Date.now()).toString(16);return o.forEach(o=>{const n="function"==typeof t?t(o):t+(Z++).toString(),i=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+i+')([")]|\\.[a-z])',"g"),"$1"+n+r+"$3")}),e=e.replace(new RegExp(r,"g"),"")}(u.body,n?()=>n+"ID"+e++:"iconifyVue"),t.h("svg",r)}const{body:f,width:m,height:h}=e,g="mask"===i||"bg"!==i&&-1!==f.indexOf("currentColor"),k=function(e,t){let o=-1===e.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in t)o+=" "+n+'="'+t[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+o+">"+e+"</svg>"}(f,d(c({},p),{width:m+"",height:h+""}));var y;return r.style=c(c(c(d(c({},s),{"--svg":(y=k,'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:Ne(p.width),height:Ne(p.height)}),Ee),g?xe:Se),a),t.h("span",r)};var Ve;if(D(!0),Ve=oe,H[""]=Ve,"undefined"!=typeof document&&"undefined"!=typeof window){const e=window;if(void 0!==e.IconifyPreload){const t=e.IconifyPreload,o="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||""),L&&!t&&!e.prefix){let t=!1;return O(e)&&(e.prefix="",z(e,(e,o)=>{P(e,o)&&(t=!0)})),t}const o=e.prefix;return!!E({prefix:o,name:"a"})&&!!M(F(t,o),e)}(e))&&console.error(o)}catch(t){console.error(o)}})}if(void 0!==e.IconifyProviders){const t=e.IconifyProviders;if("object"==typeof t&&null!==t)for(let e in t){const o="IconifyProviders["+e+"] is invalid.";try{const n=t[e];if("object"!=typeof n||!n||void 0===n.resources)continue;X(e,n)||console.error(o)}catch(at){console.error(o)}}}}const je=d(c({},T),{body:""}),Oe={data:()=>({}),components:{Icon:t.defineComponent((e,{emit:o})=>{const n=t.ref(null);function r(){var e,t;n.value&&(null==(t=(e=n.value).abort)||t.call(e),n.value=null)}const i=t.ref(!!e.ssr),s=t.ref(""),l=t.shallowRef(null);function a(){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=w(i,!1,!0)))return null;let a=function(e){const t="string"==typeof e?w(e,!0,L):e;if(t){const e=F(t.provider,t.prefix),o=t.name;return e.icons[o]||(e.missing.has(o)?null:void 0)}}(l);if(!a){const e=n.value;return e&&e.name===i||(n.value=null===a?{name:i}:{name:i,abort:ge([l],u)}),null}r(),s.value!==i&&(s.value=i,t.nextTick(()=>{o("load",i)}));const c=e.customise;if(c){a=Object.assign({},a);const e=c(a.body,l.name,l.prefix,l.provider);"string"==typeof e&&(a.body=e)}const d=["iconify"];return""!==l.prefix&&d.push("iconify--"+l.prefix),""!==l.provider&&d.push("iconify--"+l.provider),{data:a,classes:d}}function u(){var e;const t=a();t?t.data!==(null==(e=l.value)?void 0:e.data)&&(l.value=t):l.value=null}return i.value?u():t.onMounted(()=>{i.value=!0,u()}),t.watch(()=>e.icon,u),t.onUnmounted(r),()=>{const t=l.value;if(!t)return ze(je,e);let o=e;return t.classes&&(o=d(c({},e),{class:t.classes.join(" ")})),ze(c(c({},T),t.data),o)}},{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"},Fe=["src"];const Me=u({name:"ZSearchWidget",data:()=>({text:""}),props:{searchTarget:{type:String,require:!1,default:"same"},logo:{type:String,require:!1}},components:{Input:v,Button:u(Oe,[["render",function(e,o,n,r,i,s){const l=t.resolveComponent("Icon");return t.openBlock(),t.createElementBlock("button",{class:t.normalizeClass([{flat:n.flat},{bound:n.bound},{bounded:n.bounded},{"w-full":n.wFull},{transparent:n.noBg}]),style:t.normalizeStyle([{"font-size":n.size},{color:n.color}])},[n.iconLeft?(t.openBlock(),t.createBlock(l,{key:0,icon:n.icon,style:t.normalizeStyle({"font-size":n.iconSize})},null,8,["icon","style"])):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(n.title)+" ",1),n.icon&&!n.iconLeft?(t.openBlock(),t.createBlock(l,{key:1,icon:n.icon,width:n.iconSize,height:n.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,o,n,r,i,s){const l=t.resolveComponent("Input"),a=t.resolveComponent("Button");return t.openBlock(),t.createElementBlock("div",Ie,[n.logo?(t.openBlock(),t.createElementBlock("img",{key:0,src:n.logo},null,8,Fe)):t.createCommentVNode("",!0),t.createVNode(l,{placeholder:"Search something",full:"",class:"bg",modelValue:i.text,"onUpdate:modelValue":o[0]||(o[0]=e=>i.text=e),onEnterPressed:o[1]||(o[1]=e=>s.search())},null,8,["modelValue"]),t.createVNode(a,{icon:"material-symbols-light:search-rounded",size:"25px",flat:"",class:"text-color",onClick:o[2]||(o[2]=e=>s.search())})])}],["__scopeId","data-v-365b4ae7"]]),Le={class:"todo-widget"},De={class:"task-section"},Pe={key:0,class:"empty"},_e={class:"actions"},Ae=["onClick"],Re=["onClick"],We={class:"task-section completed"},Ue={key:0,class:"empty"},$e={class:"done"},qe=["onClick"];const Ze=u({name:"ZTodoWidget",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,o,n,r,i,s){return t.openBlock(),t.createElementBlock("div",Le,[o[5]||(o[5]=t.createElementVNode("h2",{class:"title"},"📝 Mis Tareas",-1)),t.createElementVNode("form",{onSubmit:o[1]||(o[1]=t.withModifiers((...e)=>s.addTask&&s.addTask(...e),["prevent"])),class:"todo-form"},[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":o[0]||(o[0]=e=>i.newTask=e),type:"text",placeholder:"Escribe una nueva tarea..."},null,512),[[t.vModelText,i.newTask]]),o[2]||(o[2]=t.createElementVNode("button",{type:"submit"},"Agregar",-1))],32),t.createElementVNode("div",De,[o[3]||(o[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,o)=>(t.openBlock(),t.createElementBlock("li",{key:o},[t.createElementVNode("span",null,t.toDisplayString(e.text),1),t.createElementVNode("div",_e,[t.createElementVNode("button",{onClick:e=>s.completeTask(o)},"✔️",8,Ae),t.createElementVNode("button",{onClick:e=>s.deleteTask(o)},"🗑️",8,Re)])]))),128))])]),t.createElementVNode("div",We,[o[4]||(o[4]=t.createElementVNode("h3",null,"Completadas",-1)),0===i.completedTasks.length?(t.openBlock(),t.createElementBlock("div",Ue,"Ninguna aún.")):t.createCommentVNode("",!0),t.createElementVNode("ul",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.completedTasks,(e,o)=>(t.openBlock(),t.createElementBlock("li",{key:"c"+o},[t.createElementVNode("span",$e,t.toDisplayString(e.text),1),t.createElementVNode("button",{onClick:e=>s.deleteCompleted(o)},"❌",8,qe)]))),128))])])])}],["__scopeId","data-v-3560194d"]]),He={name:"ZMarkedWidget",props:{theme:{type:String,default:"light"},small:{type:Boolean,default:!0},categories:{type:Array,default:()=>["Personal","Work","Study"]},open:{type:String,default:"self"},useStorage:{type:Boolean,default:!1}},data(){const e="bookmark_manager_state",t={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"}]};return{STORAGE_KEY:e,bookmarks:this.useStorage&&JSON.parse(localStorage.getItem(e))||t,activeTab:"Personal"}},computed:{currentBookmarks(){return this.bookmarks[this.activeTab]||[]},getIconStyle(){return{position:"relative",width:this.small?"50px":"40px",height:this.small?"50px":"40px",marginBottom:"8px",borderRadius:".4rem",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold",fontSize:"1.8rem",color:"light"===this.theme?"#555":"#eee",userSelect:"none"}}},methods:{saveState(){this.useStorage&&localStorage.setItem(this.STORAGE_KEY,JSON.stringify(this.bookmarks))},setActiveTab(e){this.activeTab=e},openLink(e){"self"===this.open?window.location.href=e:window.open(e,"_blank")},deleteBookmark(e){const t=this.bookmarks[this.activeTab][e];confirm(`¿Estás seguro de eliminar ${t.title}?`)&&(this.bookmarks[this.activeTab].splice(e,1),this.saveState())},editBookmark(e){const t=this.bookmarks[this.activeTab][e],o=prompt("Nuevo título:",t.title);if(null===o)return;const n=prompt("Nueva URL:",t.url);null!==n&&(t.title=o,t.url=n,t.logo=`https://www.google.com/s2/favicons?domain=${new URL(n).hostname}&sz=64`,this.saveState())},addBookmarkPrompt(){const e=prompt("Nombre del marcador:");if(!e)return;const t=prompt("URL del marcador:");if(!t)return;const o=`https://www.google.com/s2/favicons?domain=${new URL(t).hostname}&sz=64`;this.bookmarks[this.activeTab].push({title:e,url:t,logo:o}),this.saveState()},onImageError(e,t){const o=e.target;o.style.display="none";const n=o.parentNode;n.style.backgroundColor="#066D5A",n.textContent=t.charAt(0).toUpperCase()}},watch:{bookmarks:{handler(){this.saveState()},deep:!0}}},Je={class:"container-marked"},Ke=["onClick"],Ye={class:"grid"},Ge={class:"option-app"},Qe=["onClick"],Xe=["onClick"],et=["onClick"],tt={class:"column"},ot=["src","alt","onError"];const nt=u(He,[["render",function(e,o,n,r,i,s){return t.openBlock(),t.createElementBlock("div",Je,[t.createElementVNode("div",{class:t.normalizeClass(["tabs",["dark"==n.theme?"dark":"light"]])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.categories,e=>(t.openBlock(),t.createElementBlock("div",{key:e,class:"container-tab"},[t.createElementVNode("button",{class:t.normalizeClass(["tab",{active:e===i.activeTab}]),onClick:t=>s.setActiveTab(e)},t.toDisplayString(e),11,Ke)]))),128))],2),t.createElementVNode("div",Ye,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.currentBookmarks,(e,o)=>(t.openBlock(),t.createElementBlock("div",{key:o,class:t.normalizeClass(["card",n.small?"small":""])},[t.createElementVNode("div",Ge,[t.createElementVNode("button",{class:"edit-app",onClick:t.withModifiers(e=>s.editBookmark(o),["prevent"])},"✏️",8,Qe),t.createElementVNode("button",{class:"delete-app",onClick:t.withModifiers(e=>s.deleteBookmark(o),["prevent"])},"🗑️",8,Xe)]),t.createElementVNode("a",{href:"#",class:t.normalizeClass(["card-link","dark"==n.theme?"dark":"light"]),onClick:t.withModifiers(t=>s.openLink(e.url),["prevent"])},[t.createElementVNode("div",tt,[t.createElementVNode("div",{class:"icon-container",style:t.normalizeStyle(s.getIconStyle)},[t.createElementVNode("img",{src:e.logo,alt:e.title+" logo",class:t.normalizeClass({small:n.small}),onError:t=>s.onImageError(t,e.title)},null,42,ot)],4),t.createTextVNode(" "+t.toDisplayString(e.title),1)])],10,et)],2))),128)),s.currentBookmarks.length<8?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["card",n.small?"small":""])},[t.createElementVNode("a",{href:"#",class:t.normalizeClass(["card-link","dark"==n.theme?"dark":"light"]),onClick:o[0]||(o[0]=t.withModifiers((...e)=>s.addBookmarkPrompt&&s.addBookmarkPrompt(...e),["prevent"]))},o[1]||(o[1]=[t.createElementVNode("div",{class:"column"},[t.createElementVNode("span",{class:"add"},"+"),t.createTextVNode(" Add ")],-1)]),2)],2)):t.createCommentVNode("",!0)])])}],["__scopeId","data-v-4f5391c1"]]),rt=t.defineCustomElement(g),it=t.defineCustomElement(Me),st=t.defineCustomElement(Ze),lt=t.defineCustomElement(nt);customElements.get("z-clock-widget")||customElements.define("z-clock-widget",rt),customElements.get("z-search-widget")||customElements.define("z-search-widget",it),customElements.get("z-todo-widget")||customElements.define("z-todo-widget",st),customElements.get("z-marked-widget")||customElements.define("z-marked-widget",lt),e.ZClockWidget=g,e.ZMarkedWidget=nt,e.ZSearchWidget=Me,e.ZTodoWidget=Ze,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 o=Object.defineProperty,n=Object.defineProperties,r=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,a=(e,t,n)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,c=(e,t)=>{for(var o in t||(t={}))s.call(t,o)&&a(e,o,t[o]);if(i)for(var o of i(t))l.call(t,o)&&a(e,o,t[o]);return e},d=(e,t)=>n(e,r(t));const u=(e,t)=>{const o=e.__vccOpts||e;for(const[n,r]of t)o[n]=r;return o},p={class:"clock-container"},f={class:"clock"},m={class:"time"},h={class:"date"};const g=u({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,o,n,r,i,s){return t.openBlock(),t.createElementBlock("div",p,[t.createElementVNode("div",f,[t.createElementVNode("div",m,[t.createElementVNode("span",null,t.toDisplayString(i.hours),1),o[0]||(o[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"]]),k={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)}}},y=["placeholder","value"];const v=u(k,[["render",function(e,o,n,r,i,s){return t.openBlock(),t.createElementBlock("input",{placeholder:n.placeholder,value:n.modelValue,onInput:o[0]||(o[0]=(...e)=>s.onInput&&s.onInput(...e)),onKeydown:o[1]||(o[1]=t.withKeys((...e)=>s.onEnter&&s.onEnter(...e),["enter"])),class:t.normalizeClass([{"full-width":n.full},{round:n.round},{rounded:n.rounded}])},null,42,y)}],["__scopeId","data-v-2ad90286"]]),b=/^[a-z0-9]+(-[a-z0-9]+)*$/,w=(e,t,o,n="")=>{const r=e.split(":");if("@"===e.slice(0,1)){if(r.length<2||r.length>3)return null;n=r.shift().slice(1)}if(r.length>3||!r.length)return null;if(r.length>1){const e=r.pop(),o=r.pop(),i={provider:r.length>0?r[0]:n,prefix:o,name:e};return t&&!E(i)?null:i}const i=r[0],s=i.split("-");if(s.length>1){const e={provider:n,prefix:s.shift(),name:s.join("-")};return t&&!E(e)?null:e}if(o&&""===n){const e={provider:n,prefix:"",name:i};return t&&!E(e,o)?null:e}return null},E=(e,t)=>!!e&&!(!(t&&""===e.prefix||e.prefix)||!e.name),x=Object.freeze({left:0,top:0,width:16,height:16}),S=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),T=Object.freeze(c(c({},x),S)),C=Object.freeze(d(c({},T),{body:"",hidden:!1}));function B(e,t){const o=function(e,t){const o={};!e.hFlip!=!t.hFlip&&(o.hFlip=!0),!e.vFlip!=!t.vFlip&&(o.vFlip=!0);const n=((e.rotate||0)+(t.rotate||0))%4;return n&&(o.rotate=n),o}(e,t);for(const n in C)n in S?n in e&&!(n in o)&&(o[n]=S[n]):n in t?o[n]=t[n]:n in e&&(o[n]=e[n]);return o}function N(e,t,o){const n=e.icons,r=e.aliases||Object.create(null);let i={};function s(e){i=B(n[e]||r[e],i)}return s(t),o.forEach(s),B(e,i)}function z(e,t){const o=[];if("object"!=typeof e||"object"!=typeof e.icons)return o;e.not_found instanceof Array&&e.not_found.forEach(e=>{t(e,null),o.push(e)});const n=function(e){const t=e.icons,o=e.aliases||Object.create(null),n=Object.create(null);return Object.keys(t).concat(Object.keys(o)).forEach(function e(r){if(t[r])return n[r]=[];if(!(r in n)){n[r]=null;const t=o[r]&&o[r].parent,i=t&&e(t);i&&(n[r]=[t].concat(i))}return n[r]}),n}(e);for(const r in n){const i=n[r];i&&(t(r,N(e,r,i)),o.push(r))}return o}const V=c({provider:"",aliases:{},not_found:{}},x);function j(e,t){for(const o in t)if(o in e&&typeof e[o]!=typeof t[o])return!1;return!0}function O(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(!j(e,V))return null;const o=t.icons;for(const r in o){const e=o[r];if(!r||"string"!=typeof e.body||!j(e,C))return null}const n=t.aliases||Object.create(null);for(const r in n){const e=n[r],t=e.parent;if(!r||"string"!=typeof t||!o[t]&&!n[t]||!j(e,C))return null}return t}const I=Object.create(null);function F(e,t){const o=I[e]||(I[e]=Object.create(null));return o[t]||(o[t]=function(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}(e,t))}function M(e,t){return O(t)?z(t,(t,o)=>{o?e.icons[t]=o:e.missing.add(t)}):[]}let L=!1;function D(e){return"boolean"==typeof e&&(L=e),L}function P(e,t){const o=w(e,!0,L);if(!o)return!1;const n=F(o.provider,o.prefix);return t?function(e,t,o){try{if("string"==typeof o.body)return e.icons[t]=c({},o),!0}catch(n){}return!1}(n,o.name,t):(n.missing.add(o.name),!0)}const _=Object.freeze({width:null,height:null}),A=Object.freeze(c(c({},_),S)),R=/(-?[0-9.]*[0-9]+[0-9.]*)/g,W=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function U(e,t,o){if(1===t)return e;if(o=o||100,"number"==typeof e)return Math.ceil(e*t*o)/o;if("string"!=typeof e)return e;const n=e.split(R);if(null===n||!n.length)return e;const r=[];let i=n.shift(),s=W.test(i);for(;;){if(s){const e=parseFloat(i);isNaN(e)?r.push(i):r.push(Math.ceil(e*t*o)/o)}else r.push(i);if(i=n.shift(),void 0===i)return r.join("");s=!s}}const $=/\sid="(\S+)"/g,q="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16);let Z=0;const H=Object.create(null);function J(e){return H[e]||H[""]}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"],Q=[];for(;G.length>0;)1===G.length||Math.random()>.5?Q.push(G.shift()):Q.push(G.pop());function X(e,t){const o=K(t);return null!==o&&(Y[e]=o,!0)}function ee(e){return Y[e]}Y[""]=K({resources:["https://api.iconify.design"].concat(Q)});let te=(()=>{let e;try{if(e=fetch,"function"==typeof e)return e}catch(t){}})();const oe={prepare:(e,t,o)=>{const n=[],r=function(e,t){const o=ee(e);if(!o)return 0;let n;if(o.maxURL){let e=0;o.resources.forEach(t=>{const o=t;e=Math.max(e,o.length)});const r=t+".json?icons=";n=o.maxURL-e-o.path.length-r.length}else n=0;return n}(e,t),i="icons";let s={type:i,provider:e,prefix:t,icons:[]},l=0;return o.forEach((o,a)=>{l+=o.length+1,l>=r&&a>0&&(n.push(s),s={type:i,provider:e,prefix:t,icons:[]},l=o.length),s.icons.push(o)}),n.push(s),n},send:(e,t,o)=>{if(!te)return void o("abort",424);let n=function(e){if("string"==typeof e){const t=ee(e);if(t)return t.path}return"/"}(t.provider);switch(t.type){case"icons":{const e=t.prefix,o=t.icons.join(",");n+=e+".json?"+new URLSearchParams({icons:o}).toString();break}case"custom":{const e=t.uri;n+="/"===e.slice(0,1)?e.slice(1):e;break}default:return void o("abort",400)}let r=503;te(e+n).then(e=>{const t=e.status;if(200===t)return r=501,e.json();setTimeout(()=>{o(function(e){return 404===e}(t)?"abort":"next",t)})}).then(e=>{"object"==typeof e&&null!==e?setTimeout(()=>{o("success",e)}):setTimeout(()=>{404===e?o("abort",e):o("next",r)})}).catch(()=>{o("next",r)})}};function ne(e,t){e.forEach(e=>{const o=e.loaderCallbacks;o&&(e.loaderCallbacks=o.filter(e=>e.id!==t))})}let re=0;var ie={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function se(e,t,o,n){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 a,c="pending",d=0,u=null,p=[],f=[];function m(){u&&(clearTimeout(u),u=null)}function h(){"pending"===c&&(c="aborted"),m(),p.forEach(e=>{"pending"===e.status&&(e.status="aborted")}),p=[]}function g(e,t){t&&(f=[]),"function"==typeof e&&f.push(e)}function k(){c="failed",f.forEach(e=>{e(void 0,a)})}function y(){p.forEach(e=>{"pending"===e.status&&(e.status="aborted")}),p=[]}function v(){if("pending"!==c)return;m();const n=s.shift();if(void 0===n)return p.length?void(u=setTimeout(()=>{m(),"pending"===c&&(y(),k())},e.timeout)):void k();const r={status:"pending",resource:n,callback:(t,o)=>{!function(t,o,n){const r="success"!==o;switch(p=p.filter(e=>e!==t),c){case"pending":break;case"failed":if(r||!e.dataAfterTimeout)return;break;default:return}if("abort"===o)return a=n,void k();if(r)return a=n,void(p.length||(s.length?v():k()));if(m(),y(),!e.random){const o=e.resources.indexOf(t.resource);-1!==o&&o!==e.index&&(e.index=o)}c="completed",f.forEach(e=>{e(n)})}(r,t,o)}};p.push(r),d++,u=setTimeout(v,e.rotate),o(n,t,r.callback)}return"function"==typeof n&&f.push(n),setTimeout(v),function(){return{startTime:l,payload:t,status:c,queriesSent:d,queriesPending:p.length,subscribe:g,abort:h}}}function le(e){const t=c(c({},ie),e);let o=[];function n(){o=o.filter(e=>"pending"===e().status)}return{query:function(e,r,i){const s=se(t,e,r,(e,t)=>{n(),i&&i(e,t)});return o.push(s),s},find:function(e){return o.find(t=>e(t))||null},setIndex:e=>{t.index=e},getIndex:()=>t.index,cleanup:n}}function ae(){}const ce=Object.create(null);function de(e,t,o){let n,r;if("string"==typeof e){const t=J(e);if(!t)return o(void 0,424),ae;r=t.send;const i=function(e){if(!ce[e]){const t=ee(e);if(!t)return;const o={config:t,redundancy:le(t)};ce[e]=o}return ce[e]}(e);i&&(n=i.redundancy)}else{const t=K(e);if(t){n=le(t);const o=J(e.resources?e.resources[0]:"");o&&(r=o.send)}}return n&&r?n.query(t,r,o)().abort:(o(void 0,424),ae)}function ue(){}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 o=!1;const n=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:n,prefix:r,name:s});else{if(!e.missing.has(s))return o=!0,!0;i.missing.push({provider:n,prefix:r,name:s})}return!1}),i.pending.length!==s&&(o||ne([e],t.id),t.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),t.abort))})}))}(e)}))}function fe(e,t,o){function n(){const o=e.pendingIcons;t.forEach(t=>{o&&o.delete(t),e.icons[t]||e.missing.add(t)})}if(o&&"object"==typeof o)try{if(!M(e,o).length)return void n()}catch(r){console.error(r)}n(),pe(e)}function me(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:o}=e,n=e.iconsToLoad;if(delete e.iconsToLoad,!n||!n.length)return;const r=e.loadIcon;if(e.loadIcons&&(n.length>1||!r))return void me(e.loadIcons(n,o,t),t=>{fe(e,n,t)});if(r)return void n.forEach(n=>{me(r(n,o,t),t=>{fe(e,[n],t?{prefix:o,icons:{[n]:t}}:null)})});const{valid:i,invalid:s}=function(e){const t=[],o=[];return e.forEach(e=>{(e.match(b)?t:o).push(e)}),{valid:t,invalid:o}}(n);if(s.length&&fe(e,s,null),!i.length)return;const l=o.match(b)?J(t):null;if(!l)return void fe(e,i,null);l.prepare(t,o,i).forEach(o=>{de(t,o,t=>{fe(e,o.icons,t)})})}))}const ge=(e,t)=>{const o=function(e){const t={loaded:[],missing:[],pending:[]},o=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 n={provider:"",prefix:"",name:""};return e.forEach(e=>{if(n.name===e.name&&n.prefix===e.prefix&&n.provider===e.provider)return;n=e;const r=e.provider,i=e.prefix,s=e.name,l=o[r]||(o[r]=Object.create(null)),a=l[i]||(l[i]=F(r,i));let c;c=s in a.icons?t.loaded:""===i||a.missing.has(s)?t.missing:t.pending;const d={provider:r,prefix:i,name:s};c.push(d)}),t}(function(e,t=!0,o=!1){const n=[];return e.forEach(e=>{const r="string"==typeof e?w(e,t,o):e;r&&n.push(r)}),n}(e,!0,D()));if(!o.pending.length){let e=!0;return t&&setTimeout(()=>{e&&t(o.loaded,o.missing,o.pending,ue)}),()=>{e=!1}}const n=Object.create(null),r=[];let i,s;return o.pending.forEach(e=>{const{provider:t,prefix:o}=e;if(o===s&&t===i)return;i=t,s=o,r.push(F(t,o));const l=n[t]||(n[t]=Object.create(null));l[o]||(l[o]=[])}),o.pending.forEach(e=>{const{provider:t,prefix:o,name:r}=e,i=F(t,o),s=i.pendingIcons||(i.pendingIcons=new Set);s.has(r)||(s.add(r),n[t][o].push(r))}),r.forEach(e=>{const t=n[e.provider][e.prefix];t.length&&he(e,t)}),t?function(e,t,o){const n=re++,r=ne.bind(null,o,n);if(!t.pending.length)return r;const i={id:n,icons:t,callback:e,abort:r};return o.forEach(e=>{(e.loaderCallbacks||(e.loaderCallbacks=[])).push(i)}),r}(t,o,r):ue};const ke=/[\s,]+/;function ye(e,t){t.split(ke).forEach(t=>{switch(t.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0}})}function ve(e,t=0){const o=e.replace(/^-?[0-9.]*/,"");function n(e){for(;e<0;)e+=4;return e%4}if(""===o){const t=parseInt(e);return isNaN(t)?0:n(t)}if(o!==e){let t=0;switch(o){case"%":t=25;break;case"deg":t=90}if(t){let r=parseFloat(e.slice(0,e.length-o.length));return isNaN(r)?0:(r/=t,r%1==0?n(r):0)}}return t}const be=d(c({},A),{inline:!1}),we={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Ee={display:"inline-block"},xe={backgroundColor:"currentColor"},Se={backgroundColor:"transparent"},Te={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Ce={webkitMask:xe,mask:xe,background:Se};for(const ct in Ce){const e=Ce[ct];for(const t in Te)e[ct+t]=Te[t]}const Be={};function Ne(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 ze=(e,o)=>{const n=function(e,t){const o=c({},e);for(const n in t){const e=t[n],r=typeof e;n in _?(null===e||e&&("string"===r||"number"===r))&&(o[n]=e):r===typeof o[n]&&(o[n]="rotate"===n?e%4:e)}return o}(be,o),r=c({},we),i=o.mode||"svg",s={},l=o.style,a="object"!=typeof l||l instanceof Array?{}:l;for(let t in o){const e=o[t];if(void 0!==e)switch(t){case"icon":case"style":case"onLoad":case"mode":case"ssr":break;case"inline":case"hFlip":case"vFlip":n[t]=!0===e||"true"===e||1===e;break;case"flip":"string"==typeof e&&ye(n,e);break;case"color":s.color=e;break;case"rotate":"string"==typeof e?n[t]=ve(e):"number"==typeof e&&(n[t]=e);break;case"ariaHidden":case"aria-hidden":!0!==e&&"true"!==e&&delete r["aria-hidden"];break;default:{const o=Be[t];o?!0!==e&&"true"!==e&&1!==e||(n[o]=!0):void 0===be[t]&&(r[t]=e)}}}const u=function(e,t){const o=c(c({},T),e),n=c(c({},A),t),r={left:o.left,top:o.top,width:o.width,height:o.height};let i=o.body;[o,n].forEach(e=>{const t=[],o=e.hFlip,n=e.vFlip;let s,l=e.rotate;switch(o?n?l+=2:(t.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),t.push("scale(-1 1)"),r.top=r.left=0):n&&(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,o){const n=function(e,t="defs"){let o="";const n=e.indexOf("<"+t);for(;n>=0;){const r=e.indexOf(">",n),i=e.indexOf("</"+t);if(-1===r||-1===i)break;const s=e.indexOf(">",i);if(-1===s)break;o+=e.slice(r+1,i).trim(),e=e.slice(0,n).trim()+e.slice(s+1)}return{defs:o,content:e}}(e);return r=n.defs,i=t+n.content+o,r?"<defs>"+r+"</defs>"+i:i;var r,i}(i,'<g transform="'+t.join(" ")+'">',"</g>"))});const s=n.width,l=n.height,a=r.width,d=r.height;let u,p;null===s?(p=null===l?"1em":"auto"===l?d:l,u=U(p,a/d)):(u="auto"===s?a:s,p=null===l?U(u,d/a):"auto"===l?d:l);const f={},m=(e,t)=>{(e=>"unset"===e||"undefined"===e||"none"===e)(t)||(f[e]=t.toString())};m("width",u),m("height",p);const h=[r.left,r.top,a,d];return f.viewBox=h.join(" "),{attributes:f,viewBox:h,body:i}}(e,n),p=u.attributes;if(n.inline&&(s.verticalAlign="-0.125em"),"svg"===i){r.style=c(c({},s),a),Object.assign(r,p);let e=0,n=o.id;return"string"==typeof n&&(n=n.replace(/-/g,"_")),r.innerHTML=function(e,t=q){const o=[];let n;for(;n=$.exec(e);)o.push(n[1]);if(!o.length)return e;const r="suffix"+(16777216*Math.random()|Date.now()).toString(16);return o.forEach(o=>{const n="function"==typeof t?t(o):t+(Z++).toString(),i=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+i+')([")]|\\.[a-z])',"g"),"$1"+n+r+"$3")}),e=e.replace(new RegExp(r,"g"),"")}(u.body,n?()=>n+"ID"+e++:"iconifyVue"),t.h("svg",r)}const{body:f,width:m,height:h}=e,g="mask"===i||"bg"!==i&&-1!==f.indexOf("currentColor"),k=function(e,t){let o=-1===e.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in t)o+=" "+n+'="'+t[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+o+">"+e+"</svg>"}(f,d(c({},p),{width:m+"",height:h+""}));var y;return r.style=c(c(c(d(c({},s),{"--svg":(y=k,'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:Ne(p.width),height:Ne(p.height)}),Ee),g?xe:Se),a),t.h("span",r)};var Ve;if(D(!0),Ve=oe,H[""]=Ve,"undefined"!=typeof document&&"undefined"!=typeof window){const e=window;if(void 0!==e.IconifyPreload){const t=e.IconifyPreload,o="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||""),L&&!t&&!e.prefix){let t=!1;return O(e)&&(e.prefix="",z(e,(e,o)=>{P(e,o)&&(t=!0)})),t}const o=e.prefix;return!!E({prefix:o,name:"a"})&&!!M(F(t,o),e)}(e))&&console.error(o)}catch(t){console.error(o)}})}if(void 0!==e.IconifyProviders){const t=e.IconifyProviders;if("object"==typeof t&&null!==t)for(let e in t){const o="IconifyProviders["+e+"] is invalid.";try{const n=t[e];if("object"!=typeof n||!n||void 0===n.resources)continue;X(e,n)||console.error(o)}catch(at){console.error(o)}}}}const je=d(c({},T),{body:""}),Oe={data:()=>({}),components:{Icon:t.defineComponent((e,{emit:o})=>{const n=t.ref(null);function r(){var e,t;n.value&&(null==(t=(e=n.value).abort)||t.call(e),n.value=null)}const i=t.ref(!!e.ssr),s=t.ref(""),l=t.shallowRef(null);function a(){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=w(i,!1,!0)))return null;let a=function(e){const t="string"==typeof e?w(e,!0,L):e;if(t){const e=F(t.provider,t.prefix),o=t.name;return e.icons[o]||(e.missing.has(o)?null:void 0)}}(l);if(!a){const e=n.value;return e&&e.name===i||(n.value=null===a?{name:i}:{name:i,abort:ge([l],u)}),null}r(),s.value!==i&&(s.value=i,t.nextTick(()=>{o("load",i)}));const c=e.customise;if(c){a=Object.assign({},a);const e=c(a.body,l.name,l.prefix,l.provider);"string"==typeof e&&(a.body=e)}const d=["iconify"];return""!==l.prefix&&d.push("iconify--"+l.prefix),""!==l.provider&&d.push("iconify--"+l.provider),{data:a,classes:d}}function u(){var e;const t=a();t?t.data!==(null==(e=l.value)?void 0:e.data)&&(l.value=t):l.value=null}return i.value?u():t.onMounted(()=>{i.value=!0,u()}),t.watch(()=>e.icon,u),t.onUnmounted(r),()=>{const t=l.value;if(!t)return ze(je,e);let o=e;return t.classes&&(o=d(c({},e),{class:t.classes.join(" ")})),ze(c(c({},T),t.data),o)}},{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"},Fe=["src"];const Me=u({name:"ZSearchWidget",data:()=>({text:""}),props:{searchTarget:{type:String,require:!1,default:"same"},logo:{type:String,require:!1}},components:{Input:v,Button:u(Oe,[["render",function(e,o,n,r,i,s){const l=t.resolveComponent("Icon");return t.openBlock(),t.createElementBlock("button",{class:t.normalizeClass([{flat:n.flat},{bound:n.bound},{bounded:n.bounded},{"w-full":n.wFull},{transparent:n.noBg}]),style:t.normalizeStyle([{"font-size":n.size},{color:n.color}])},[n.iconLeft?(t.openBlock(),t.createBlock(l,{key:0,icon:n.icon,style:t.normalizeStyle({"font-size":n.iconSize})},null,8,["icon","style"])):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(n.title)+" ",1),n.icon&&!n.iconLeft?(t.openBlock(),t.createBlock(l,{key:1,icon:n.icon,width:n.iconSize,height:n.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,o,n,r,i,s){const l=t.resolveComponent("Input"),a=t.resolveComponent("Button");return t.openBlock(),t.createElementBlock("div",Ie,[n.logo?(t.openBlock(),t.createElementBlock("img",{key:0,src:n.logo},null,8,Fe)):t.createCommentVNode("",!0),t.createVNode(l,{placeholder:"Search something",full:"",class:"bg",modelValue:i.text,"onUpdate:modelValue":o[0]||(o[0]=e=>i.text=e),onEnterPressed:o[1]||(o[1]=e=>s.search())},null,8,["modelValue"]),t.createVNode(a,{icon:"material-symbols-light:search-rounded",size:"25px",flat:"",class:"text-color",onClick:o[2]||(o[2]=e=>s.search())})])}],["__scopeId","data-v-365b4ae7"]]),Le={class:"todo-widget"},De={class:"task-section"},Pe={key:0,class:"empty"},_e={class:"actions"},Ae=["onClick"],Re=["onClick"],We={class:"task-section completed"},Ue={key:0,class:"empty"},$e={class:"done"},qe=["onClick"];const Ze=u({name:"ZTodoWidget",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,o,n,r,i,s){return t.openBlock(),t.createElementBlock("div",Le,[o[5]||(o[5]=t.createElementVNode("h2",{class:"title"},"📝 Mis Tareas",-1)),t.createElementVNode("form",{onSubmit:o[1]||(o[1]=t.withModifiers((...e)=>s.addTask&&s.addTask(...e),["prevent"])),class:"todo-form"},[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":o[0]||(o[0]=e=>i.newTask=e),type:"text",placeholder:"Escribe una nueva tarea..."},null,512),[[t.vModelText,i.newTask]]),o[2]||(o[2]=t.createElementVNode("button",{type:"submit"},"Agregar",-1))],32),t.createElementVNode("div",De,[o[3]||(o[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,o)=>(t.openBlock(),t.createElementBlock("li",{key:o},[t.createElementVNode("span",null,t.toDisplayString(e.text),1),t.createElementVNode("div",_e,[t.createElementVNode("button",{onClick:e=>s.completeTask(o)},"✔️",8,Ae),t.createElementVNode("button",{onClick:e=>s.deleteTask(o)},"🗑️",8,Re)])]))),128))])]),t.createElementVNode("div",We,[o[4]||(o[4]=t.createElementVNode("h3",null,"Completadas",-1)),0===i.completedTasks.length?(t.openBlock(),t.createElementBlock("div",Ue,"Ninguna aún.")):t.createCommentVNode("",!0),t.createElementVNode("ul",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.completedTasks,(e,o)=>(t.openBlock(),t.createElementBlock("li",{key:"c"+o},[t.createElementVNode("span",$e,t.toDisplayString(e.text),1),t.createElementVNode("button",{onClick:e=>s.deleteCompleted(o)},"❌",8,qe)]))),128))])])])}],["__scopeId","data-v-3560194d"]]),He={name:"ZMarkedWidget",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}},data(){const e="bookmark_manager_state",t={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"}]};return{STORAGE_KEY:e,bookmarks:this.useStorage&&JSON.parse(localStorage.getItem(e))||t,activeTab:"Personal"}},computed:{currentBookmarks(){return this.bookmarks[this.activeTab]||[]},getIconStyle(){return{position:"relative",width:this.small?"50px":"40px",height:this.small?"50px":"40px",marginBottom:"8px",borderRadius:".4rem",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold",fontSize:"1.8rem",color:"light"===this.theme?"#555":"#eee",userSelect:"none"}}},methods:{saveState(){this.useStorage&&localStorage.setItem(this.STORAGE_KEY,JSON.stringify(this.bookmarks))},setActiveTab(e){this.activeTab=e},openLink(e){"self"===this.open?window.location.href=e:window.open(e,"_blank")},deleteBookmark(e){const t=this.bookmarks[this.activeTab][e];confirm(`¿Estás seguro de eliminar ${t.title}?`)&&(this.bookmarks[this.activeTab].splice(e,1),this.saveState())},editBookmark(e){const t=this.bookmarks[this.activeTab][e],o=prompt("Nuevo título:",t.title);if(null===o)return;const n=prompt("Nueva URL:",t.url);null!==n&&(t.title=o,t.url=n,t.logo=`https://www.google.com/s2/favicons?domain=${new URL(n).hostname}&sz=64`,this.saveState())},addBookmarkPrompt(){const e=prompt("Nombre del marcador:");if(!e)return;const t=prompt("URL del marcador:");if(!t)return;const o=`https://www.google.com/s2/favicons?domain=${new URL(t).hostname}&sz=64`;this.bookmarks[this.activeTab].push({title:e,url:t,logo:o}),this.saveState()},onImageError(e,t){const o=e.target;o.style.display="none";const n=o.parentNode;n.style.backgroundColor="#066D5A",n.textContent=t.charAt(0).toUpperCase()}},watch:{bookmarks:{handler(){this.saveState()},deep:!0}}},Je={class:"container-marked"},Ke=["onClick"],Ye={class:"grid"},Ge={class:"option-app"},Qe=["onClick"],Xe=["onClick"],et=["onClick"],tt={class:"column"},ot=["src","alt","onError"];const nt=u(He,[["render",function(e,o,n,r,i,s){return t.openBlock(),t.createElementBlock("div",Je,[t.createElementVNode("div",{class:t.normalizeClass(["tabs",["dark"==n.theme?"dark":"light"]])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.categories,e=>(t.openBlock(),t.createElementBlock("div",{key:e,class:"container-tab"},[t.createElementVNode("button",{class:t.normalizeClass(["tab",{active:e===i.activeTab}]),onClick:t=>s.setActiveTab(e)},t.toDisplayString(e),11,Ke)]))),128))],2),t.createElementVNode("div",Ye,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.currentBookmarks,(e,o)=>(t.openBlock(),t.createElementBlock("div",{key:o,class:t.normalizeClass(["card",n.small?"small":""])},[t.createElementVNode("div",Ge,[t.createElementVNode("button",{class:"edit-app",onClick:t.withModifiers(e=>s.editBookmark(o),["prevent"])},"✏️",8,Qe),t.createElementVNode("button",{class:"delete-app",onClick:t.withModifiers(e=>s.deleteBookmark(o),["prevent"])},"🗑️",8,Xe)]),t.createElementVNode("a",{href:"#",class:t.normalizeClass(["card-link","dark"==n.theme?"dark":"light"]),onClick:t.withModifiers(t=>s.openLink(e.url),["prevent"])},[t.createElementVNode("div",tt,[t.createElementVNode("div",{class:"icon-container",style:t.normalizeStyle(s.getIconStyle)},[t.createElementVNode("img",{src:e.logo,alt:e.title+" logo",class:t.normalizeClass({small:n.small}),onError:t=>s.onImageError(t,e.title)},null,42,ot)],4),t.createTextVNode(" "+t.toDisplayString(e.title),1)])],10,et)],2))),128)),s.currentBookmarks.length<8?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["card",n.small?"small":""])},[t.createElementVNode("a",{href:"#",class:t.normalizeClass(["card-link","dark"==n.theme?"dark":"light"]),onClick:o[0]||(o[0]=t.withModifiers((...e)=>s.addBookmarkPrompt&&s.addBookmarkPrompt(...e),["prevent"]))},o[1]||(o[1]=[t.createElementVNode("div",{class:"column"},[t.createElementVNode("span",{class:"add"},"+"),t.createTextVNode(" Add ")],-1)]),2)],2)):t.createCommentVNode("",!0)])])}],["__scopeId","data-v-618b61ef"]]),rt=t.defineCustomElement(g),it=t.defineCustomElement(Me),st=t.defineCustomElement(Ze),lt=t.defineCustomElement(nt);customElements.get("z-clock-widget")||customElements.define("z-clock-widget",rt),customElements.get("z-search-widget")||customElements.define("z-search-widget",it),customElements.get("z-todo-widget")||customElements.define("z-todo-widget",st),customElements.get("z-marked-widget")||customElements.define("z-marked-widget",lt),e.ZClockWidget=g,e.ZMarkedWidget=nt,e.ZSearchWidget=Me,e.ZTodoWidget=Ze,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -63,7 +63,7 @@ export default {
|
|
|
63
63
|
},
|
|
64
64
|
small: {
|
|
65
65
|
type: Boolean,
|
|
66
|
-
default:
|
|
66
|
+
default: false
|
|
67
67
|
},
|
|
68
68
|
categories: {
|
|
69
69
|
type: Array,
|
|
@@ -245,12 +245,16 @@ export default {
|
|
|
245
245
|
.grid {
|
|
246
246
|
display: flex;
|
|
247
247
|
flex-wrap: wrap;
|
|
248
|
+
gap: .4rem;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.grid.small {
|
|
248
252
|
gap: 1.4rem;
|
|
249
253
|
}
|
|
250
254
|
|
|
251
255
|
.card {
|
|
252
256
|
position: relative;
|
|
253
|
-
flex: 1 1
|
|
257
|
+
flex: 1 1 80px;
|
|
254
258
|
}
|
|
255
259
|
|
|
256
260
|
.card.small {
|