From b8c3c795a9962d721a69d7688f0253dcb54f5014 Mon Sep 17 00:00:00 2001 From: Valexr Date: Sun, 14 Apr 2024 15:47:55 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20Valexr/c?= =?UTF-8?q?ounty@efdc9871e8881329e41938f1f61d6890e6c2fd67=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/app.css | 2 +- build/app.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/app.css b/build/app.css index 319c77e..6aef3e4 100644 --- a/build/app.css +++ b/build/app.css @@ -1 +1 @@ -:root{--dark: #1c1b22;--light: #f2f2f2;--back: #e9e9ed;--hover: #d0d0d7;--active: #b1b1b9}@media (prefers-color-scheme: dark){:root{color-scheme:dark;--light: #1c1b22;--dark: #f2f2f2;--back: #2b2a33;--hover: #52525e;--active: #5b5b66}}body,html{height:100%}body{margin:0;display:grid;grid-template-rows:auto 1fr auto;grid-template-columns:1fr;font-family:system-ui;text-align:center;background-color:var(--light)}body:after{content:"";background:#00000045;position:absolute;z-index:-1;inset:0}header{display:flex;align-items:center;justify-content:space-between;padding:1rem}header>*{margin:0}button{text-align:inherit;color:inherit;background-color:var(--back);padding:.45rem 1rem;margin:0;border:0;border-radius:.25rem;font-size:inherit;user-select:none;-webkit-user-select:none;cursor:pointer}button:hover{background-color:var(--hover)}button:hover:active{background-color:var(--active)}a{color:inherit}*{box-sizing:border-box}header.svelte-1p6an5p.svelte-1p6an5p{justify-content:center}main.svelte-1p6an5p.svelte-1p6an5p{padding:1em;display:grid;place-content:center}form.svelte-1p6an5p.svelte-1p6an5p{align-items:center;justify-content:center}input.svelte-1p6an5p.svelte-1p6an5p{font-size:1.5em;font-weight:700;font-family:inherit;background:transparent;border:0;color:inherit}ul.svelte-1p6an5p.svelte-1p6an5p{list-style:none;padding:0;margin:0 0 .25em;font-size:min(27.5vw,25vh);font-weight:700;display:flex;justify-content:center;gap:.25em}ul.svelte-1p6an5p li.svelte-1p6an5p{position:relative}ul.svelte-1p6an5p li.svelte-1p6an5p:after{content:attr(id);font-size:15%;font-weight:400;position:absolute;inset:90% 0 0}blockquote.svelte-1p6an5p p.svelte-1p6an5p{font-style:italic} +input.svelte-11nu7tx{font-size:1.5em;font-weight:700;font-family:inherit;background:transparent;border:0;color:inherit;outline:0}:root{--dark: #1c1b22;--light: #f2f2f2;--back: #e9e9ed;--hover: #d0d0d7;--active: #b1b1b9}@media (prefers-color-scheme: dark){:root{color-scheme:dark;--light: #1c1b22;--dark: #f2f2f2;--back: #2b2a33;--hover: #52525e;--active: #5b5b66}}body,html{height:100%}body{margin:0;display:grid;grid-template-rows:auto 1fr auto;grid-template-columns:1fr;font-family:system-ui;text-align:center;background-color:var(--light)}body:after{content:"";background:#00000045;position:absolute;z-index:-1;inset:0}header,footer{display:flex;align-items:center;justify-content:space-between;padding:1rem}header>*{margin:0}button{text-align:inherit;color:inherit;background-color:var(--back);padding:.45rem 1rem;margin:0;border:0;border-radius:.25rem;font-size:inherit;user-select:none;-webkit-user-select:none;cursor:pointer}button:hover{background-color:var(--hover)}button:hover:active{background-color:var(--active)}a{color:inherit}*{box-sizing:border-box}header.svelte-k7poqf.svelte-k7poqf{justify-content:center}footer.svelte-k7poqf h2.svelte-k7poqf{margin:0}main.svelte-k7poqf.svelte-k7poqf{padding:1em;display:grid;place-content:center}ul.svelte-k7poqf.svelte-k7poqf{list-style:none;padding:0;margin:0 0 .25em;font-size:min(27.5vw,25vh);font-weight:700;display:flex;justify-content:center;gap:.25em}ul.svelte-k7poqf li.svelte-k7poqf{position:relative}ul.svelte-k7poqf li.svelte-k7poqf:after{content:attr(id);font-size:15%;font-weight:400;position:absolute;inset:90% 0 0}blockquote.svelte-k7poqf p.svelte-k7poqf{font-style:italic}blockquote.svelte-k7poqf cite.svelte-k7poqf{font-style:normal} diff --git a/build/app.js b/build/app.js index 8e2a909..0c55368 100644 --- a/build/app.js +++ b/build/app.js @@ -1,4 +1,4 @@ -var xt="county";var bt={type:"git",url:"https://github.com/Valexr/county.git"};function f(){}function yt(t){return!!t&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}function rt(t){return t()}function J(){return Object.create(null)}function b(t){t.forEach(rt)}function N(t){return typeof t=="function"}function gt(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}function $t(t,e){return t!=t?e==e:t!==e}function Ft(t){return Object.keys(t).length===0}function ot(t,...e){if(t==null){for(let r of e)r(void 0);return f}let n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function G(t,e,n){t.$$.on_destroy.push(ot(e,n))}function wt(t,e,n){return t.set(n),e}var O=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;var W=class t{_listeners="WeakMap"in O?new WeakMap:void 0;_observer=void 0;options;constructor(e){this.options=e}observe(e,n){return this._listeners.set(e,n),this._getObserver().observe(e,this.options),()=>{this._listeners.delete(e),this._observer.unobserve(e)}}_getObserver(){return this._observer??(this._observer=new ResizeObserver(e=>{for(let n of e)t.entries.set(n.target,n),this._listeners.get(n.target)?.(n)}))}};W.entries="WeakMap"in O?new WeakMap:void 0;var vt=!1;function Qt(){vt=!0}function Et(){vt=!1}function d(t,e){t.appendChild(e)}function w(t,e,n){t.insertBefore(e,n||null)}function y(t){t.parentNode&&t.parentNode.removeChild(t)}function m(t){return document.createElement(t)}function U(t){return document.createTextNode(t)}function k(){return U(" ")}function kt(){return U("")}function H(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function St(t){return function(e){return e.preventDefault(),t.call(this,e)}}function h(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function Bt(t){return Array.from(t.childNodes)}function R(t,e){e=""+e,t.data!==e&&(t.data=e)}function it(t,e){t.value=e??""}function Ut(t){let e={};return t.childNodes.forEach(n=>{e[n.slot||"default"]=!0}),e}var S;function g(t){S=t}function Dt(){if(!S)throw new Error("Function called outside component initialization");return S}function Nt(t,e){let n=t.$$.callbacks[e.type];n&&n.slice().forEach(r=>r.call(this,e))}var L=[];var Ct=[],T=[],Tt=[],oe=Promise.resolve(),ct=!1;function Mt(){ct||(ct=!0,oe.then(A))}function j(t){T.push(t)}var st=new Set,C=0;function A(){if(C!==0)return;let t=S;do{try{for(;Ct.indexOf(r)===-1?e.push(r):n.push(r)),n.forEach(r=>r()),T=e}var X=new Set,D;function Rt(){D={r:0,c:[],p:D}}function jt(){D.r||b(D.c),D=D.p}function I(t,e){t&&t.i&&(X.delete(t),t.i(e))}function lt(t,e,n,r){if(t&&t.o){if(X.has(t))return;X.add(t),D.c.push(()=>{X.delete(t),r&&(n&&t.d(1),r())}),t.o(e)}else r&&r()}function ut(t,e){let n=e.token={};function r(o,i,u,l){if(e.token!==n)return;e.resolved=l;let c=e.ctx;u!==void 0&&(c=c.slice(),c[u]=l);let s=o&&(e.current=o)(c),a=!1;e.block&&(e.blocks?e.blocks.forEach((p,_)=>{_!==i&&p&&(Rt(),lt(p,1,1,()=>{e.blocks[_]===p&&(e.blocks[_]=null)}),jt())}):e.block.d(1),s.c(),I(s,1),s.m(e.mount(),e.anchor),a=!0),e.block=s,e.blocks&&(e.blocks[i]=s),a&&A()}if(yt(t)){let o=Dt();if(t.then(i=>{g(o),r(e.then,1,e.value,i),g(null)},i=>{if(g(o),r(e.catch,2,e.error,i),g(null),!e.hasCatch)throw i}),e.current!==e.pending)return r(e.pending,0),!0}else{if(e.current!==e.then)return r(e.then,1,e.value,t),!0;e.resolved=t}}function at(t,e,n){let r=e.slice(),{resolved:o}=t;t.current===t.then&&(r[t.value]=o),t.current===t.catch&&(r[t.error]=o),t.block.p(r,n)}var se=["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"],ce=new Set([...se]);function ae(t,e,n){let{fragment:r,after_update:o}=t.$$;r&&r.m(e,n),j(()=>{let i=t.$$.on_mount.map(rt).filter(N);t.$$.on_destroy?t.$$.on_destroy.push(...i):b(i),t.$$.on_mount=[]}),o.forEach(j)}function fe(t,e){let n=t.$$;n.fragment!==null&&(Ot(n.after_update),b(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function pe(t,e){t.$$.dirty[0]===-1&&(L.push(t),Mt(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{let x=$.length?$[0]:_;return s.ctx&&o(s.ctx[p],s.ctx[p]=x)&&(!s.skip_bound&&s.bound[p]&&s.bound[p](x),a&&pe(t,p)),_}):[],s.update(),a=!0,b(s.before_update),s.fragment=r?r(s.ctx):!1,e.target){if(e.hydrate){Qt();let p=Bt(e.target);s.fragment&&s.fragment.l(p),p.forEach(y)}else s.fragment&&s.fragment.c();e.intro&&I(t.$$.fragment),ae(t,e.target,e.anchor),Et(),A()}g(c)}var de;typeof HTMLElement=="function"&&(de=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;constructor(t,e,n){super(),this.$$ctor=t,this.$$s=e,n&&this.attachShadow({mode:"open"})}addEventListener(t,e,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){let r=this.$$c.$on(t,e);this.$$l_u.set(e,r)}super.addEventListener(t,e,n)}removeEventListener(t,e,n){if(super.removeEventListener(t,e,n),this.$$c){let r=this.$$l_u.get(e);r&&(r(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(o){return()=>{let i;return{c:function(){i=m("slot"),o!=="default"&&h(i,"name",o)},m:function(c,s){w(c,i,s)},d:function(c){c&&y(i)}}}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;let e={},n=Ut(this);for(let o of this.$$s)o in n&&(e[o]=[t(o)]);for(let o of this.attributes){let i=this.$$g_p(o.name);i in this.$$d||(this.$$d[i]=ft(i,o.value,this.$$p_d,"toProp"))}for(let o in this.$$p_d)!(o in this.$$d)&&this[o]!==void 0&&(this.$$d[o]=this[o],delete this[o]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:e,$$scope:{ctx:[]}}});let r=()=>{this.$$r=!0;for(let o in this.$$p_d)if(this.$$d[o]=this.$$c.$$.ctx[this.$$c.$$.props[o]],this.$$p_d[o].reflect){let i=ft(o,this.$$d[o],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[o].attribute||o):this.setAttribute(this.$$p_d[o].attribute||o,i)}this.$$r=!1};this.$$c.$$.after_update.push(r),r();for(let o in this.$$l)for(let i of this.$$l[o]){let u=this.$$c.$on(o,i);this.$$l_u.set(i,u)}this.$$l={}}}attributeChangedCallback(t,e,n){this.$$r||(t=this.$$g_p(t),this.$$d[t]=ft(t,n,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{this.$$cn||(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(t){return Object.keys(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function ft(t,e,n,r){let o=n[t]?.type;if(e=o==="Boolean"&&typeof e!="boolean"?e!=null:e,!r||!n[t])return e;if(r==="toAttribute")switch(o){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(o){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}var P=class{$$=void 0;$$set=void 0;$destroy(){fe(this,1),this.$destroy=f}$on(e,n){if(!N(n))return f;let r=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return r.push(n),()=>{let o=r.indexOf(n);o!==-1&&r.splice(o,1)}}$set(e){this.$$set&&!Ft(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var It="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(It);async function Pt(t=5,{width:e=window.innerWidth,height:n=window.innerHeight}){try{return await he(t,{width:e,height:n})}catch(r){console.error(`Could not fetch photos: ${r}`)}}async function he(t=9,e={width:window.innerWidth,height:window.innerHeight}){let n="https://valexr.github.io/county/assets/photos.json",r=Array.from({length:t},()=>Math.floor(Math.random()*24644));return(await(await fetch(n)).json()).reduce((c,[s,a,p],_)=>{if(r.includes(_)){let $={width:e.height*(a/10),height:e.height},x={width:e.width,height:e.height},E=`?w=${u(l($,x).width)}`;c.push({id:_,src:`https://images.unsplash.com/photo-${s}${E}`,alt:`Image by ${p} from Unsplash`,...l($,x)})}return c},[]);function u(c){return c*devicePixelRatio}function l(c,s){let a=Math.min(s.width/c.width,s.height,c.height);return{width:Math.round(c.width*a),height:Math.round(c.height*a)}}}var M=[];function Y(t,e){return{subscribe:pt(t,e).subscribe}}function pt(t,e=f){let n,r=new Set;function o(l){if(gt(t,l)&&(t=l,n)){let c=!M.length;for(let s of r)s[1](),M.push(s,t);if(c){for(let s=0;s{r.delete(s),r.size===0&&n&&(n(),n=null)}}return{set:o,update:i,subscribe:u}}function qt(t,e,n){let r=!Array.isArray(t),o=r?[t]:t;if(!o.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");let i=e.length<2;return Y(n,(u,l)=>{let c=!1,s=[],a=0,p=f,_=()=>{if(a)return;p();let x=e(r?s[0]:s,u,l);i?u(x):p=N(x)?x:f},$=o.map((x,E)=>ot(x,B=>{s[E]=B,a&=~(1<{a|=1<e,set:c=>l(c),update:c=>l(c(e)),remove:()=>i?.removeItem(t),clear:()=>i?.clear(),subscribe:r}}var q=Vt("startDate","",!0),zt=qt(q,(t,e)=>{let n=new Date,r=new Date(t),o=n.getTime()-r.getTime(),i=n.getMonth()-r.getMonth(),u=n.getDate()-r.getDate(),l=new Date(n.getFullYear(),n.getMonth()+1,0).getDate(),c=new Date(o).getFullYear()-1970,s=(c*12+i)%12,a=(s*l+u)%l;e({years:c,months:s,days:a})},{years:0,months:0,days:0}),Jt=Y(new Date().toLocaleTimeString("ru"),t=>{let e=setInterval(()=>{let n=new Date().toLocaleTimeString("ru");t(n)},1e3);return()=>clearInterval(e)}),dr=Y(new Date().toLocaleDateString("ru"));var{document:Gt}=O;function Wt(t){t[7]=t[9].quote,t[8]=t[9].author}function _e(t){return{c:f,m:f,p:f,d:f}}function me(t){let e,n,r,o,i,u,l,c,s=t[2].years+"",a,p,_,$=t[2].months+"",x,E,B,V=t[2].days+"",Z,ht,Xt,K,z,tt,et,nt,_t,v={ctx:t,current:null,token:null,hasCatch:!1,pending:ye,then:be,catch:xe,value:9};return ut(Xt=we(),v),{c(){e=m("header"),n=m("form"),r=m("label"),o=m("input"),i=k(),u=m("main"),l=m("ul"),c=m("li"),a=U(s),p=k(),_=m("li"),x=U($),E=k(),B=m("li"),Z=U(V),ht=k(),v.block.c(),K=k(),z=m("footer"),tt=m("h2"),et=U(t[3]),h(o,"type","date"),h(o,"placeholder","Set start date"),h(o,"class","svelte-1p6an5p"),h(n,"action","POST"),h(n,"class","svelte-1p6an5p"),h(e,"class","svelte-1p6an5p"),h(c,"id","years"),h(c,"class","svelte-1p6an5p"),h(_,"id","months"),h(_,"class","svelte-1p6an5p"),h(B,"id","days"),h(B,"class","svelte-1p6an5p"),h(l,"class","svelte-1p6an5p"),h(u,"class","svelte-1p6an5p")},m(Q,F){w(Q,e,F),d(e,n),d(n,r),d(r,o),it(o,t[1]),w(Q,i,F),w(Q,u,F),d(u,l),d(l,c),d(c,a),d(l,p),d(l,_),d(_,x),d(l,E),d(l,B),d(B,Z),d(u,ht),v.block.m(u,v.anchor=null),v.mount=()=>u,v.anchor=null,w(Q,K,F),w(Q,z,F),d(z,tt),d(tt,et),nt||(_t=[H(o,"input",t[6]),H(n,"submit",St(t[5]))],nt=!0)},p(Q,F){t=Q,F&2&&it(o,t[1]),F&4&&s!==(s=t[2].years+"")&&R(a,s),F&4&&$!==($=t[2].months+"")&&R(x,$),F&4&&V!==(V=t[2].days+"")&&R(Z,V),at(v,t,F),F&8&&R(et,t[3])},d(Q){Q&&(y(e),y(i),y(u),y(K),y(z)),v.block.d(),v.token=null,v=null,nt=!1,b(_t)}}}function xe(t){return{c:f,m:f,p:f,d:f}}function be(t){Wt(t);let e,n,r,o;return{c(){e=m("blockquote"),n=m("p"),n.textContent=`${t[7]}`,r=k(),o=m("footer"),o.textContent=`~ ${t[8]}`,h(n,"class","svelte-1p6an5p"),h(e,"class","svelte-1p6an5p")},m(i,u){w(i,e,u),d(e,n),d(e,r),d(e,o)},p(i,u){Wt(i)},d(i){i&&y(e)}}}function ye(t){return{c:f,m:f,p:f,d:f}}function ge(t){return{c:f,m:f,p:f,d:f}}function $e(t){let e,n,r,o;Gt.title=e=t[0];let i={ctx:t,current:null,token:null,hasCatch:!1,pending:ge,then:me,catch:_e};return ut(o=Fe(),i),{c(){n=k(),r=kt(),i.block.c()},m(u,l){w(u,n,l),w(u,r,l),i.block.m(u,i.anchor=l),i.mount=()=>r.parentNode,i.anchor=r},p(u,[l]){t=u,l&1&&e!==(e=t[0])&&(Gt.title=e),at(i,t,l)},i:f,o:f,d(u){u&&(y(n),y(r)),i.block.d(u),i.token=null,i=null}}}async function Fe(){let t=await Pt(1,{});t&&(document.body.style.cssText=` +var Nt="county";var Ct={type:"git",url:"https://github.com/Valexr/county.git"};function f(){}function Ot(t){return!!t&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}function ft(t){return t()}function K(){return Object.create(null)}function w(t){t.forEach(ft)}function I(t){return typeof t=="function"}function Mt(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}function tt(t,e){return t!=t?e==e:t!==e}function It(t){return Object.keys(t).length===0}function pt(t,...e){if(t==null){for(let o of e)o(void 0);return f}let n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function V(t,e,n){t.$$.on_destroy.push(pt(e,n))}var J=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;var et=class t{_listeners="WeakMap"in J?new WeakMap:void 0;_observer=void 0;options;constructor(e){this.options=e}observe(e,n){return this._listeners.set(e,n),this._getObserver().observe(e,this.options),()=>{this._listeners.delete(e),this._observer.unobserve(e)}}_getObserver(){return this._observer??(this._observer=new ResizeObserver(e=>{for(let n of e)t.entries.set(n.target,n),this._listeners.get(n.target)?.(n)}))}};et.entries="WeakMap"in J?new WeakMap:void 0;var Rt=!1;function qt(){Rt=!0}function Tt(){Rt=!1}function d(t,e){t.appendChild(e)}function g(t,e,n){t.insertBefore(e,n||null)}function b(t){t.parentNode&&t.parentNode.removeChild(t)}function h(t){return document.createElement(t)}function L(t){return document.createTextNode(t)}function Q(){return L(" ")}function jt(){return L("")}function R(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function At(t){return function(e){return e.preventDefault(),t.call(this,e)}}function m(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function Pt(t){return Array.from(t.childNodes)}function q(t,e){e=""+e,t.data!==e&&(t.data=e)}function dt(t,e){t.value=e??""}function zt(t){let e={};return t.childNodes.forEach(n=>{e[n.slot||"default"]=!0}),e}var N;function v(t){N=t}function Jt(){if(!N)throw new Error("Function called outside component initialization");return N}function Wt(t,e){let n=t.$$.callbacks[e.type];n&&n.slice().forEach(o=>o.call(this,e))}var C=[];var W=[],j=[],ht=[],_e=Promise.resolve(),mt=!1;function Zt(){mt||(mt=!0,_e.then(G))}function Z(t){j.push(t)}function xt(t){ht.push(t)}var _t=new Set,T=0;function G(){if(T!==0)return;let t=N;do{try{for(;Tt.indexOf(o)===-1?e.push(o):n.push(o)),n.forEach(o=>o()),j=e}var nt=new Set,O;function H(){O={r:0,c:[],p:O}}function X(){O.r||w(O.c),O=O.p}function k(t,e){t&&t.i&&(nt.delete(t),t.i(e))}function E(t,e,n,o){if(t&&t.o){if(nt.has(t))return;nt.add(t),O.c.push(()=>{nt.delete(t),o&&(n&&t.d(1),o())}),t.o(e)}else o&&o()}function bt(t,e){let n=e.token={};function o(r,s,c,l){if(e.token!==n)return;e.resolved=l;let i=e.ctx;c!==void 0&&(i=i.slice(),i[c]=l);let u=r&&(e.current=r)(i),p=!1;e.block&&(e.blocks?e.blocks.forEach((a,x)=>{x!==s&&a&&(H(),E(a,1,1,()=>{e.blocks[x]===a&&(e.blocks[x]=null)}),X())}):e.block.d(1),u.c(),k(u,1),u.m(e.mount(),e.anchor),p=!0),e.block=u,e.blocks&&(e.blocks[s]=u),p&&G()}if(Ot(t)){let r=Jt();if(t.then(s=>{v(r),o(e.then,1,e.value,s),v(null)},s=>{if(v(r),o(e.catch,2,e.error,s),v(null),!e.hasCatch)throw s}),e.current!==e.pending)return o(e.pending,0),!0}else{if(e.current!==e.then)return o(e.then,1,e.value,t),!0;e.resolved=t}}function yt(t,e,n){let o=e.slice(),{resolved:r}=t;t.current===t.then&&(o[t.value]=r),t.current===t.catch&&(o[t.error]=r),t.block.p(o,n)}var me=["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"],xe=new Set([...me]);function $t(t,e,n){let o=t.$$.props[e];o!==void 0&&(t.$$.bound[o]=n,n(t.$$.ctx[o]))}function Ft(t){t&&t.c()}function ot(t,e,n){let{fragment:o,after_update:r}=t.$$;o&&o.m(e,n),Z(()=>{let s=t.$$.on_mount.map(ft).filter(I);t.$$.on_destroy?t.$$.on_destroy.push(...s):w(s),t.$$.on_mount=[]}),r.forEach(Z)}function rt(t,e){let n=t.$$;n.fragment!==null&&(Gt(n.after_update),w(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function ge(t,e){t.$$.dirty[0]===-1&&(C.push(t),Zt(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{let _=y.length?y[0]:x;return u.ctx&&r(u.ctx[a],u.ctx[a]=_)&&(!u.skip_bound&&u.bound[a]&&u.bound[a](_),p&&ge(t,a)),x}):[],u.update(),p=!0,w(u.before_update),u.fragment=o?o(u.ctx):!1,e.target){if(e.hydrate){qt();let a=Pt(e.target);u.fragment&&u.fragment.l(a),a.forEach(b)}else u.fragment&&u.fragment.c();e.intro&&k(t.$$.fragment),ot(t,e.target,e.anchor),Tt(),G()}v(i)}var $e;typeof HTMLElement=="function"&&($e=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;constructor(t,e,n){super(),this.$$ctor=t,this.$$s=e,n&&this.attachShadow({mode:"open"})}addEventListener(t,e,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){let o=this.$$c.$on(t,e);this.$$l_u.set(e,o)}super.addEventListener(t,e,n)}removeEventListener(t,e,n){if(super.removeEventListener(t,e,n),this.$$c){let o=this.$$l_u.get(e);o&&(o(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(r){return()=>{let s;return{c:function(){s=h("slot"),r!=="default"&&m(s,"name",r)},m:function(i,u){g(i,s,u)},d:function(i){i&&b(s)}}}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;let e={},n=zt(this);for(let r of this.$$s)r in n&&(e[r]=[t(r)]);for(let r of this.attributes){let s=this.$$g_p(r.name);s in this.$$d||(this.$$d[s]=gt(s,r.value,this.$$p_d,"toProp"))}for(let r in this.$$p_d)!(r in this.$$d)&&this[r]!==void 0&&(this.$$d[r]=this[r],delete this[r]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:e,$$scope:{ctx:[]}}});let o=()=>{this.$$r=!0;for(let r in this.$$p_d)if(this.$$d[r]=this.$$c.$$.ctx[this.$$c.$$.props[r]],this.$$p_d[r].reflect){let s=gt(r,this.$$d[r],this.$$p_d,"toAttribute");s==null?this.removeAttribute(this.$$p_d[r].attribute||r):this.setAttribute(this.$$p_d[r].attribute||r,s)}this.$$r=!1};this.$$c.$$.after_update.push(o),o();for(let r in this.$$l)for(let s of this.$$l[r]){let c=this.$$c.$on(r,s);this.$$l_u.set(s,c)}this.$$l={}}}attributeChangedCallback(t,e,n){this.$$r||(t=this.$$g_p(t),this.$$d[t]=gt(t,n,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{this.$$cn||(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(t){return Object.keys(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function gt(t,e,n,o){let r=n[t]?.type;if(e=r==="Boolean"&&typeof e!="boolean"?e!=null:e,!o||!n[t])return e;if(o==="toAttribute")switch(r){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(r){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}var M=class{$$=void 0;$$set=void 0;$destroy(){rt(this,1),this.$destroy=f}$on(e,n){if(!I(n))return f;let o=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return o.push(n),()=>{let r=o.indexOf(n);r!==-1&&o.splice(r,1)}}$set(e){this.$$set&&!It(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var Ht="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Ht);async function Xt(t=5,{width:e=window.innerWidth,height:n=window.innerHeight}){try{return await Fe(t,{width:e,height:n})}catch(o){console.error(`Could not fetch photos: ${o}`)}}async function Fe(t=9,e={width:window.innerWidth,height:window.innerHeight}){let n="https://valexr.github.io/county/assets/photos.json",o=Array.from({length:t},()=>Math.floor(Math.random()*24644));return(await(await fetch(n)).json()).reduce((i,[u,p,a],x)=>{if(o.includes(x)){let y={width:e.height*(p/10),height:e.height},_={width:e.width,height:e.height},B=`?w=${c(l(y,_).width)}`;i.push({id:x,src:`https://images.unsplash.com/photo-${u}${B}`,alt:`Image by ${a} from Unsplash`,...l(y,_)})}return i},[]);function c(i){return i*devicePixelRatio}function l(i,u){let p=Math.min(u.width/i.width,u.height,i.height);return{width:Math.round(i.width*p),height:Math.round(i.height*p)}}}var A=[];function st(t,e){return{subscribe:wt(t,e).subscribe}}function wt(t,e=f){let n,o=new Set;function r(l){if(Mt(t,l)&&(t=l,n)){let i=!A.length;for(let u of o)u[1](),A.push(u,t);if(i){for(let u=0;u{o.delete(u),o.size===0&&n&&(n(),n=null)}}return{set:r,update:s,subscribe:c}}function Yt(t,e,n){let o=!Array.isArray(t),r=o?[t]:t;if(!r.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");let s=e.length<2;return st(n,(c,l)=>{let i=!1,u=[],p=0,a=f,x=()=>{if(p)return;a();let _=e(o?u[0]:u,c,l);s?c(_):a=I(_)?_:f},y=r.map((_,B)=>pt(_,Y=>{u[B]=Y,p&=~(1<{p|=1<e,set:i=>l(i),update:i=>l(i(e)),remove:()=>s?.removeItem(t),clear:()=>s?.clear(),subscribe:o}}var P=Kt("startDate","",!0),te=Yt(P,(t,e)=>{if(P){let n=new Date,o=new Date(t),r=n.getTime()-o.getTime(),s=n.getMonth()-o.getMonth(),c=n.getDate()-o.getDate(),l=new Date(n.getFullYear(),n.getMonth()+1,0).getDate(),i=new Date(r).getFullYear()-1970,u=(i*12+s)%12,p=(u*l+c)%l;e({years:i,months:u,days:p})}},{years:0,months:0,days:0}),ee=st(new Date().toLocaleTimeString("ru"),t=>{let e=setInterval(()=>{let n=new Date().toLocaleTimeString("ru");t(n)},1e3);return()=>clearInterval(e)}),ne=st(new Date().toLocaleDateString("ru"));function we(t){let e,n,o,r,s,c;return{c(){e=h("form"),n=h("label"),o=h("input"),m(o,"type","date"),m(o,"max",r=new Date().toLocaleString("ru")),m(o,"class","svelte-11nu7tx")},m(l,i){g(l,e,i),d(e,n),d(n,o),dt(o,t[0]),s||(c=[R(o,"input",t[2]),R(e,"submit",At(t[1]))],s=!0)},p(l,[i]){i&1&&dt(o,l[0])},i:f,o:f,d(l){l&&b(e),s=!1,w(c)}}}function ve(t,e,n){let{value:o=""}=e;function r(c){Wt.call(this,t,c)}function s(){o=this.value,n(0,o)}return t.$$set=c=>{"value"in c&&n(0,o=c.value)},[o,r,s]}var vt=class extends M{constructor(e){super(),it(this,e,ve,we,tt,{value:0})}},kt=vt;var{document:oe}=J;function re(t){t[8]=t[10].quote,t[9]=t[10].author}function ke(t){return{c:f,m:f,p:f,i:f,o:f,d:f}}function Qe(t){let e,n,o,r,s,c,l,i,u,p,a,x,y,_,B,Y,ct,z,lt,Et,St=[Se,Ee],U=[];function Bt(F,$){return F[1]?0:1}n=Bt(t,-1),o=U[n]=St[n](t);let Ut=[Ue,Be],D=[];function Dt(F,$){return F[1]?0:1}c=Dt(t,-1),l=D[c]=Ut[c](t);let S={ctx:t,current:null,token:null,hasCatch:!1,pending:Ne,then:Le,catch:De,value:10};return bt(u=Me(),S),{c(){e=h("header"),o.c(),r=Q(),s=h("main"),l.c(),i=Q(),S.block.c(),p=Q(),a=h("footer"),x=h("button"),x.textContent="Image",y=Q(),_=h("h2"),B=L(t[4]),Y=Q(),ct=h("button"),ct.textContent="Settings",m(e,"class","svelte-k7poqf"),m(s,"class","svelte-k7poqf"),m(_,"class","svelte-k7poqf"),m(a,"class","svelte-k7poqf")},m(F,$){g(F,e,$),U[n].m(e,null),g(F,r,$),g(F,s,$),D[c].m(s,null),d(s,i),S.block.m(s,S.anchor=null),S.mount=()=>s,S.anchor=null,g(F,p,$),g(F,a,$),d(a,x),d(a,y),d(a,_),d(_,B),d(a,Y),d(a,ct),z=!0,lt||(Et=R(x,"click",ie),lt=!0)},p(F,$){t=F;let ut=n;n=Bt(t,$),n===ut?U[n].p(t,$):(H(),E(U[ut],1,1,()=>{U[ut]=null}),X(),o=U[n],o?o.p(t,$):(o=U[n]=St[n](t),o.c()),k(o,1),o.m(e,null));let at=c;c=Dt(t,$),c===at?D[c].p(t,$):(H(),E(D[at],1,1,()=>{D[at]=null}),X(),l=D[c],l?l.p(t,$):(l=D[c]=Ut[c](t),l.c()),k(l,1),l.m(s,i)),yt(S,t,$),(!z||$&16)&&q(B,t[4])},i(F){z||(k(o),k(l),z=!0)},o(F){E(o),E(l),z=!1},d(F){F&&(b(e),b(r),b(s),b(p),b(a)),U[n].d(),D[c].d(),S.block.d(),S.token=null,S=null,lt=!1,Et()}}}function Ee(t){let e,n;return{c(){e=h("h2"),n=L(t[2])},m(o,r){g(o,e,r),d(e,n)},p(o,r){r&4&&q(n,o[2])},i:f,o:f,d(o){o&&b(e)}}}function Se(t){let e,n,o;function r(c){t[6](c)}let s={};return t[1]!==void 0&&(s.value=t[1]),e=new kt({props:s}),W.push(()=>$t(e,"value",r)),{c(){Ft(e.$$.fragment)},m(c,l){ot(e,c,l),o=!0},p(c,l){let i={};!n&&l&2&&(n=!0,i.value=c[1],xt(()=>n=!1)),e.$set(i)},i(c){o||(k(e.$$.fragment,c),o=!0)},o(c){E(e.$$.fragment,c),o=!1},d(c){rt(e,c)}}}function Be(t){let e,n,o,r,s;function c(i){t[7](i)}let l={};return t[1]!==void 0&&(l.value=t[1]),o=new kt({props:l}),W.push(()=>$t(o,"value",c)),{c(){e=h("h2"),e.textContent="Set start date",n=Q(),Ft(o.$$.fragment)},m(i,u){g(i,e,u),g(i,n,u),ot(o,i,u),s=!0},p(i,u){let p={};!r&&u&2&&(r=!0,p.value=i[1],xt(()=>r=!1)),o.$set(p)},i(i){s||(k(o.$$.fragment,i),s=!0)},o(i){E(o.$$.fragment,i),s=!1},d(i){i&&(b(e),b(n)),rt(o,i)}}}function Ue(t){let e,n,o=t[3].years+"",r,s,c,l=t[3].months+"",i,u,p,a=t[3].days+"",x;return{c(){e=h("ul"),n=h("li"),r=L(o),s=Q(),c=h("li"),i=L(l),u=Q(),p=h("li"),x=L(a),m(n,"id","years"),m(n,"class","svelte-k7poqf"),m(c,"id","months"),m(c,"class","svelte-k7poqf"),m(p,"id","days"),m(p,"class","svelte-k7poqf"),m(e,"class","svelte-k7poqf")},m(y,_){g(y,e,_),d(e,n),d(n,r),d(e,s),d(e,c),d(c,i),d(e,u),d(e,p),d(p,x)},p(y,_){_&8&&o!==(o=y[3].years+"")&&q(r,o),_&8&&l!==(l=y[3].months+"")&&q(i,l),_&8&&a!==(a=y[3].days+"")&&q(x,a)},i:f,o:f,d(y){y&&b(e)}}}function De(t){return{c:f,m:f,p:f,d:f}}function Le(t){re(t);let e,n,o,r;return{c(){e=h("blockquote"),n=h("p"),n.textContent=`${t[8]}`,o=Q(),r=h("cite"),r.textContent=`~ ${t[9]}`,m(n,"class","svelte-k7poqf"),m(r,"class","svelte-k7poqf"),m(e,"class","svelte-k7poqf")},m(s,c){g(s,e,c),d(e,n),d(e,o),d(e,r)},p(s,c){re(s)},d(s){s&&b(e)}}}function Ne(t){return{c:f,m:f,p:f,d:f}}function Ce(t){return{c:f,m:f,p:f,i:f,o:f,d:f}}function Oe(t){let e,n,o,r,s;oe.title=e=t[0];let c={ctx:t,current:null,token:null,hasCatch:!1,pending:Ce,then:Qe,catch:ke,blocks:[,,,]};return bt(r=ie(),c),{c(){n=Q(),o=jt(),c.block.c()},m(l,i){g(l,n,i),g(l,o,i),c.block.m(l,c.anchor=i),c.mount=()=>o.parentNode,c.anchor=o,s=!0},p(l,[i]){t=l,(!s||i&1)&&e!==(e=t[0])&&(oe.title=e),yt(c,t,i)},i(l){s||(k(c.block),s=!0)},o(l){for(let i=0;i<3;i+=1){let u=c.blocks[i];E(u)}s=!1},d(l){l&&(b(n),b(o)),c.block.d(l),c.token=null,c=null}}}async function ie(){let t=await Xt(1,{});t&&(document.body.style.cssText=` background: url(${t[0].src}) center no-repeat; background-size: cover; - `)}async function we(){return(await fetch("https://dummyjson.com/quotes/random")).json()}function ve(t,e,n){let r,o,i;G(t,q,a=>n(1,r=a)),G(t,zt,a=>n(2,o=a)),G(t,Jt,a=>n(3,i=a));let{name:u}=e,{repository:l}=e;wt(q,r="2013-04-09",r);function c(a){Nt.call(this,t,a)}function s(){r=this.value,q.set(r)}return t.$$set=a=>{"name"in a&&n(0,u=a.name),"repository"in a&&n(4,l=a.repository)},[u,r,o,i,l,c,s]}var dt=class extends P{constructor(e){super(),At(this,e,ve,$e,$t,{name:0,repository:4})}},Ht=dt;var Qr=new Ht({target:document.body,props:{name:xt,repository:bt}});export{Qr as default}; + `)}async function Me(){return(await fetch("https://dummyjson.com/quotes/random")).json()}function Ie(t,e,n){let o,r,s,c;V(t,P,a=>n(1,o=a)),V(t,ne,a=>n(2,r=a)),V(t,te,a=>n(3,s=a)),V(t,ee,a=>n(4,c=a));let{name:l}=e,{repository:i}=e;function u(a){o=a,P.set(o)}function p(a){o=a,P.set(o)}return t.$$set=a=>{"name"in a&&n(0,l=a.name),"repository"in a&&n(5,i=a.repository)},[l,o,r,s,c,i,u,p]}var Qt=class extends M{constructor(e){super(),it(this,e,Ie,Oe,tt,{name:0,repository:5})}},se=Qt;var Vo=new se({target:document.body,props:{name:Nt,repository:Ct}});export{Vo as default};