diff --git a/404.html b/404.html new file mode 100644 index 0000000..01bb79c --- /dev/null +++ b/404.html @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + +
+ +
+ +

+
+ + + + + diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..18795fc --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +portfolio.thetyster.dev diff --git a/assets/404-6900c71a.css b/assets/404-6900c71a.css new file mode 100644 index 0000000..dc70ede --- /dev/null +++ b/assets/404-6900c71a.css @@ -0,0 +1 @@ +@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-ExtraLight.woff2) format("woff2"),url(/static/fonts/Nunito-ExtraLight.woff) format("woff");font-weight:200;font-style:normal;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-Light.woff2) format("woff2"),url(/static/fonts/Nunito-Light.woff) format("woff");font-weight:300;font-style:normal;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-Medium.woff2) format("woff2"),url(/static/fonts/Nunito-Medium.woff) format("woff");font-weight:500;font-style:normal;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-BoldItalic.woff2) format("woff2"),url(/static/fonts/Nunito-BoldItalic.woff) format("woff");font-weight:700;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-Bold.woff2) format("woff2"),url(/static/fonts/Nunito-Bold.woff) format("woff");font-weight:700;font-style:normal;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-Regular.woff2) format("woff2"),url(/static/fonts/Nunito-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-BlackItalic.woff2) format("woff2"),url(/static/fonts/Nunito-BlackItalic.woff) format("woff");font-weight:900;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-LightItalic.woff2) format("woff2"),url(/static/fonts/Nunito-LightItalic.woff) format("woff");font-weight:300;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-ExtraBoldItalic.woff2) format("woff2"),url(/static/fonts/Nunito-ExtraBoldItalic.woff) format("woff");font-weight:700;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-ExtraLightItalic.woff2) format("woff2"),url(/static/fonts/Nunito-ExtraLightItalic.woff) format("woff");font-weight:200;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-Italic.woff2) format("woff2"),url(/static/fonts/Nunito-Italic.woff) format("woff");font-weight:400;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-ExtraLight.woff2) format("woff2"),url(/static/fonts/Nunito-ExtraLight.woff) format("woff");font-weight:200;font-style:normal;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-ExtraLightItalic.woff2) format("woff2"),url(/static/fonts/Nunito-ExtraLightItalic.woff) format("woff");font-weight:200;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-SemiBold.woff2) format("woff2"),url(/static/fonts/Nunito-SemiBold.woff) format("woff");font-weight:600;font-style:normal;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-ExtraBold.woff2) format("woff2"),url(/static/fonts/Nunito-ExtraBold.woff) format("woff");font-weight:700;font-style:normal;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-SemiBoldItalic.woff2) format("woff2"),url(/static/fonts/Nunito-SemiBoldItalic.woff) format("woff");font-weight:600;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-MediumItalic.woff2) format("woff2"),url(/static/fonts/Nunito-MediumItalic.woff) format("woff");font-weight:500;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-Black.woff2) format("woff2"),url(/static/fonts/Nunito-Black.woff) format("woff");font-weight:900;font-style:normal;font-display:swap}html{max-height:100% vh;max-width:100% vw;overflow-x:hidden}body{background-color:#e1ce7a;background-image:url(/static/img/splat-dark.svg);background-attachment:fixed;transition:background-color 2s}body div#content,body div#noscript-content{display:flex;flex-direction:column;align-items:stretch}.page-title{text-align:center;padding:2rem}header{display:block}header .home-button{width:100%;display:block;border-radius:100%;text-align:center;cursor:pointer;transition:transform .4s}header .home-button img{max-width:350px}header .home-button:hover{transform:translateY(10px)}header .home-button:active{transform:translateY(20px)}header .home-button svg{display:block;width:100%;height:auto}main{position:relative;flex-grow:1;margin:0 auto;display:block;max-width:800px;padding:2rem;background:white;border-radius:7px}aside{background-color:#f0dcc6;padding:2rem;margin:2rem 0;border-radius:7px;color:#56493e;text-align:left}aside a{color:#836f5e}p,span{font:16px/20.8px Nunito}h1{font:900 60px/84px Nunito;margin:.75rem}h2{font:700 36px/50.4px Nunito;margin:.6rem}h3{font:700 30px/42px Nunito;margin:.45rem}h4{font:500 24px/33.6px Nunito;margin:.3rem}h5{font:500 18px/25.2px Nunito;margin:.15rem}button,.button,li,ul,a{font:700 16px/20.8px Nunito}a button,.button{text-decoration:none}a{color:#836f5e}button,.button{padding:.7em;border-radius:7px;user-select:none;-webkit-user-select:none;-ms-user-select:none;color:#fff;background-color:#424b54}button:hover,.button:hover{background-color:#545d65}button:hover:active,.button:hover:active{background-color:#2e343a}:focus-visible{outline:9px double black;box-shadow:0 0 0 6px #fff}hr{margin:4em auto 2em;display:block;max-width:100%;background-image:url(/static/img/curlywave.svg);background-size:contain;border:none;height:52px;background-repeat:no-repeat;background-position-x:center}.npm-back{background-color:#b02a2a}img.hero{display:block;max-width:100%;height:auto;border-radius:7px;margin:0 auto}footer{padding-top:2rem;padding-bottom:2rem;text-align:center}@media (max-width: 900px){header{box-sizing:border-box;margin:0 auto;display:block;max-width:600px}main{box-sizing:border-box;margin:0 auto;display:block;max-width:600px}footer{box-sizing:border-box;margin:0 auto;display:block;max-width:600px}}@media (max-width: 700px){header{box-sizing:border-box;margin:0 auto;display:block;max-width:500px}main{margin:0 auto;display:block;max-width:500px;box-sizing:border-box}footer{box-sizing:border-box;margin:0 auto;display:block;max-width:500px}}@media (max-width: calc(500px + 2rem)){header{box-sizing:border-box;margin:0 auto;display:block;max-width:500px}main{display:block;max-width:500px;box-sizing:border-box;margin:0;padding:1rem}footer{box-sizing:border-box;margin:0 auto;display:block;max-width:500px}}main a.button{border:none;margin:0 auto;display:block;max-width:fit-content}main svg{margin:0 auto;display:block;max-width:fit-content;width:300px} diff --git a/assets/404-92137524.js b/assets/404-92137524.js new file mode 100644 index 0000000..009aab2 --- /dev/null +++ b/assets/404-92137524.js @@ -0,0 +1 @@ +import{s as n}from"./utils-bf63a336.js";import{j as t,c as e,r as s,N as o}from"./nav-0789d0b5.js";const c=r=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:279.16,height:216.02,...r,children:[t.jsx("title",{children:"A dotted line meandering to a question mark."}),t.jsxs("g",{transform:"translate(-3.874 -120.702) scale(1.54)",children:[t.jsx("path",{fill:"none",stroke:"#b4a461",strokeDasharray:9.525,strokeDashoffset:4.286,strokeLinecap:"round",strokeWidth:4.763,d:"M88.79 155.46c.65 11.139-3.857 22.474-11.978 30.125-5.593 5.27-13.01 8.841-20.695 8.856-4.466.01-8.89-1.167-12.931-3.07s-7.716-4.519-11.092-7.443c-6.927-5.998-12.645-13.315-17.3-21.207-5.669-9.61-9.862-20.43-9.759-31.587.032-3.488.49-6.989 1.584-10.3s2.84-6.434 5.266-8.941c4.61-4.767 11.573-7.014 18.16-6.248 1.875.217 3.734.666 5.446 1.459 1.713.792 3.278 1.938 4.444 3.422 1.442 1.835 2.227 4.122 2.55 6.434.324 2.31.21 4.66.01 6.986-.72 8.29-2.548 16.554-1.899 24.85.138 1.759.39 3.522.97 5.19s1.506 3.24 2.835 4.4c1.14.997 2.555 1.664 4.04 1.962 1.484.297 3.034.228 4.5-.149 2.857-.734 5.356-2.643 6.99-5.098 1.369-2.055 2.148-4.452 2.629-6.874s.679-4.89.98-7.34c.967-7.85 3.135-15.812 8.077-21.988 3.61-4.51 8.706-7.915 14.372-9.036 3.833-.759 7.826-.472 11.62.468 3.792.939 7.4 2.515 10.861 4.33 5.677 2.977 11.211 6.834 14.254 12.475 1.382 2.561 2.205 5.506 1.828 8.391-.299 2.286-1.333 4.427-2.671 6.304s-2.976 3.517-4.621 5.132c-1.793 1.76-3.609 3.509-5.177 5.472-1.569 1.963-2.893 4.161-3.57 6.58-.336 1.2-.51 2.45-.433 3.692s.412 2.477 1.043 3.55c.962 1.634 2.59 2.83 4.393 3.42s3.767.6 5.62.195c2.369-.519 4.557-1.693 6.498-3.145 1.942-1.453 3.657-3.184 5.333-4.937 2.784-2.91 5.497-5.915 7.698-9.287 4.617-7.075 6.816-15.684 6.23-24.111-.413-5.959-2.167-11.78-2.365-17.75-.057-1.696.015-3.41.405-5.062s1.112-3.248 2.244-4.514c1.528-1.71 3.74-2.729 6.01-3.054 2.27-.326 4.598.003 6.792.674 5.508 1.686 10.216 5.506 13.603 10.164 6.17 8.485 8.048 19.375 8.208 29.864.079 5.163-.236 10.435-2.108 15.248-2.426 6.236-7.42 11.332-13.392 14.346-6.695 3.378-14.354 4.205-21.48 6.544-2.026.665-4.033 1.464-5.783 2.683s-3.241 2.893-3.939 4.909c-.61 1.767-.58 3.738.027 5.507s1.776 3.33 3.264 4.462c1.825 1.39 4.058 2.117 6.26 2.763q3.187.935 6.418 1.71"}),t.jsxs("g",{transform:"translate(4.569 3.945)",children:[t.jsx("path",{fill:"none",stroke:"#2e343a",strokeLinecap:"round",strokeWidth:4.763,d:"M162 184.37a3.32 3.32 0 0 1 .184-2.238 3.4 3.4 0 0 1 1.119-1.344 3.6 3.6 0 0 1 1.632-.633c.656-.083 1.322.01 1.967.157 1.091.248 2.15.654 3.106 1.237.907.553 1.744 1.3 2.14 2.287.296.74.319 1.591.027 2.333-.346.88-1.09 1.543-1.878 2.066-1.014.674-2.17 1.201-2.919 2.16-.414.53-.677 1.162-.875 1.804a10.65 10.65 0 0 0-.346 4.712"}),t.jsx("circle",{cx:166.13,cy:204.78,r:3,fill:"#2e343a",opacity:.998,style:{paintOrder:"markers stroke fill"}})]}),t.jsx("path",{fill:"#424b54",d:"M148.43 202.47c.966 1.287 10.966-2.675 11.185-3.913.218-1.24-7.922-8.054-8.982-7.73s-3.169 10.356-2.203 11.643z",opacity:.998,style:{paintOrder:"markers stroke fill"}}),t.jsx("circle",{cx:88.867,cy:144.95,r:4.982,fill:"#424b54",opacity:.998,style:{paintOrder:"markers stroke fill"}})]})]});const a=()=>(n("Lost?"),t.jsxs("main",{children:[t.jsx("h2",{children:"That doesn't seem right..."}),t.jsx(c,{}),t.jsx("p",{children:"Try heading back to the home page."}),t.jsx("a",{className:"button",href:"/",children:"Go Home"})]})),i=e.createRoot(document.getElementById("nav"));i.render(t.jsx(s.StrictMode,{children:t.jsx(o,{})}));const l=e.createRoot(document.getElementById("content"));l.render(t.jsx(s.StrictMode,{children:t.jsx(a,{})})); diff --git a/assets/app-1b41d2b9.js b/assets/app-1b41d2b9.js new file mode 100644 index 0000000..8bdc0f4 --- /dev/null +++ b/assets/app-1b41d2b9.js @@ -0,0 +1,68 @@ +var ol=Object.defineProperty;var ll=(r,n,t)=>n in r?ol(r,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[n]=t;var g=(r,n,t)=>(ll(r,typeof n!="symbol"?n+"":n,t),t);import{c as ml,n as hl,t as Fc,s as vl,a as Hc}from"./utils-bf63a336.js";import{j as d,r as me,a as Ki,P as te,c as ps,N as _l}from"./nav-0789d0b5.js";import{a as Fi}from"./axios-1779699b.js";import{A as ed,S as gl,T as bl}from"./showcase-048341fb.js";function Ol({id:r,title:n,org:t,timeframe:a,logo:i,summary:u,responsibilities:c}){r=r??0,n=n??"",t=t??"",a=a??{},i=i??[],u=u??"",c=c??[];const s=a.from.getFullYear(),f=a.from.getMonth(),o=a.to.getFullYear(),m=a.to.getMonth();new Date().getFullYear();const v=new Date().getMonth();let _=o-s,b=m-f;const $=b<0?{y:--_,m:b+=12}:{y:_,m:b},D=` + ${a.from.toLocaleString("en",{month:"long"})}, ${s} - + ${m===v?"Present":`${a.to.toLocaleString("en",{month:"long"})}, ${o}`} + `,x=` + ${$.y?`${$.y} year${$.y>1?"s":""}`:""} + ${$.y&&$.m?"and":""} + ${$.m?`${$.m} month${$.m>1?"s":""}`:""} + `;return d.jsx(d.Fragment,{children:d.jsxs("div",{className:`jobHistory-${r}-details`,children:[d.jsx(ed,{imgClass:`jobHistory-${r}-logo`,imgSrc:i[0],imgAlt:i[1],imgLink:i[2]?i[2]:void 0,sideText_classPrefix:`jobHistory-${r}`,sideText:d.jsxs(d.Fragment,{children:[d.jsx("h3",{className:`jobHistory-${r}-title`,children:n}),t?d.jsx("h4",{className:`jobHistory-${r}-org`,children:t}):void 0,d.jsx("p",{className:`jobHistory-${r}-timeframe`,children:D}),d.jsx("p",{className:`jobHistory-${r}-elapsed-time`,children:x})]})}),d.jsxs("div",{className:`jobHistory-${r}-summary`,children:[u,d.jsx("ul",{children:c.map(M=>d.jsx("li",{className:`jobHistory-${r}-responsibilities`,children:M},M.toString()))})]})]})})}function ye({children:r}){return d.jsx("p",{className:"preamble",children:r})}const $l=()=>{const r=[{id:3,title:"Software Engineer",org:"Cherry Lane Farms Dog Breeding",timeframe:{from:new Date(2024,2),to:new Date},logo:["/static/img/cherry-lane-farm-logo.png","Cherry Lane Farms Logo","https://cherrylanefarmdoodles.com/about/developmen"],summary:d.jsxs(d.Fragment,{children:[d.jsx("p",{children:"I came on board at Cherry Lane to build a maintainable web app that would allow us to sell, track, and advertise puppies. A major goal of this project was minimal cost. I was able to achieve this by using Cloudflare Pages and Workers to host the site and serverless functions. In the end, the only overhead cost was the domain name."}),d.jsx("p",{children:"I covered just about every aspect of the project. From the front end to the back end, I was the only developer on the team. Some of my responsibilities included:"})]}),responsibilities:["Unit and integration testing with Vitest, Jest, and Jasmine","Building reusable JSX components with Sass styles","Engineering with Typescript and SQL","Continuous Deployment and Integration with Cloudflare Pages serverless functions","Bootstrapping full-stack sites on a shoestring budget","Maintaining DNS security and Web Application Firewalls","Setting up an SMTP provider for email marketing","Integrating Zoho CRM with Cloudflare Workers","Engineering with Cloudflare Workers, R2, D1, and KV storage","Designing and testing backend systems","Static site generation with Next.js","Search engine optimization (SEO)","Consistently deploying a fully accessible user interface","Developing custom NPM packages for internal use"]},{id:2,title:"Student",org:"Springboard Boot Camp",timeframe:{from:new Date(2023,9),to:new Date(2024,2)},logo:["/static/img/springboard-logo.svg","Springboard's Logo","https://springboard.com"],summary:d.jsx("p",{children:"Springboard is a bootcamp I decided to team up to further my expertise in software development. My track focused on JavaScript, Python, and SQL. I started with Springboard after self-teaching for about a year. At Springboard I learned:"}),responsibilities:["Advanced front end development.","Advanced JavaScript.","Advanced Python.","SQL.","Unit and Integration Testing.","Back end development."]},{id:1,title:"Director of Communications",org:"Director's Choice Tour and Travel",timeframe:{from:new Date(2021,7),to:new Date(2023,0)},logo:["/static/img/directorschoice-logo.png","Director's Choice Logo","https://directorschoice.com"],summary:d.jsx("p",{children:"Working at Director's Choice changed me. I realized at Director's choice that I wanted to focus my career more on software development. While working there some of my responsibilities included:"}),responsibilities:["Maintaining the front-end of the company website.",d.jsxs(d.Fragment,{children:["Ground-up development and maintenance of a"," ",d.jsx(Ki,{link:"https://github.com/theTyster/DC-marketing-funneltron",children:"sales funnel automation back end"}),". (Python)"]}),"Updating and maintaining the WordPress instance and site theme for the company website.","Developing and maintaining interactive product pages.","Writing HTML and CSS for marketing emails.","Optimizing all digital media for Search Engine crawlers. (SEO)","Integrating data in Google sheets and HubSpot with various applications. (Python)","Designing and gathering visual media for marketing and public-facing events. (Adobe)","Crisis prevention and management.","Brand Management."]},{id:0,title:"Account Manager and Consultant",org:"RaiderComm Public Relations",timeframe:{from:new Date(2020,2),to:new Date(2021,4)},logo:["/static/img/raidercomm-logo.jpeg","RaiderComm Public Relations Logo","https://raidercommpr.wixsite.com/rcpr"],summary:d.jsxs(d.Fragment,{children:[d.jsx("p",{children:"RaiderComm is a student run PR Agency that works to help local organizations. I had such fulfilling experiences working with these organizations. My favorite client was a small shaved ice stand that provided jobs for neuro-atypical kids."}),d.jsxs("p",{children:["I also worked with an organization supporting parents of children with"," ",d.jsx(Ki,{link:"https://en.wikipedia.org/wiki/Anoxia",children:"Anoxia"}),". We were able to prioritize this organizations search engine results page rank with search engine optimized content. My time at RaiderComm set the foundation for how I build content for websites today. Here's a few more things I learned from my time there:"]})]}),responsibilities:[d.jsxs(d.Fragment,{children:["Experience with lots of:",d.jsxs("ul",{children:[d.jsx("li",{children:"clients,"}),d.jsx("li",{children:"teams,"}),d.jsx("li",{children:"and deadlines."})]})]}),"How to host online events that engage stakeholder audiences effectively.","How to create attractive and deliverable assets that can be used for a range of purposes.","What it's like to collaborate with many fast moving companies while simultaneously a college student.","How to be stressed effectively.","How to manage a team.","Why delegation is important","Laws and governances surrounding copyright, fair-use, and how it all works on the web.","Why we should build accessible services that can be used by anyone."]}];return d.jsxs("div",{className:"jobHistory",children:[d.jsx("img",{className:"hero",src:"/static/img/freelance-webdev.jpg",alt:"HTML code on a screen"}),d.jsx(ye,{children:"I am a software engineer with a background in public relations and advertising. Engineering dynamic, interactive, engaging, and search engine optimized content is my specialty."}),d.jsx(ye,{children:"Everything I build is lean, fast, secure, and accessible. I am a firm believer in the idea that the internet should be for everyone."}),d.jsx(ye,{children:"Good tests usher good software. I meticulously test everything I build and can use any testing suite."}),d.jsx(ye,{children:"Typescript seems to be what I work with the most, but Python is a close second. My database experience ranges from SQLite to PostgreSQL to NoSQL."}),d.jsx(ye,{children:"Recently, I have taken up creating my own SaaS built on Rust. (The code is not yet open but plans to be in the future.)"}),d.jsx(ye,{children:"Flipping between front-end and back-end development is something I am fairly comfortable with, although I tend to work on the front-end more."}),r.map(n=>d.jsxs(me.Fragment,{children:[n.idd.jsxs("article",{children:[d.jsx("h3",{children:n.category}),n.par,n.examples]},n.id))})}var rd={},Sr={},td={},ki={},ue={},O={},h={};h.secondsInYear=h.secondsInWeek=h.secondsInQuarter=h.secondsInMonth=h.secondsInMinute=h.secondsInHour=h.secondsInDay=h.quartersInYear=h.monthsInYear=h.monthsInQuarter=h.minutesInYear=h.minutesInMonth=h.minutesInHour=h.minutesInDay=h.minTime=h.millisecondsInWeek=h.millisecondsInSecond=h.millisecondsInMinute=h.millisecondsInHour=h.millisecondsInDay=h.maxTime=h.daysInYear=h.daysInWeek=h.constructFromSymbol=void 0;h.daysInWeek=7;const Dl=h.daysInYear=365.2425,wl=h.maxTime=Math.pow(10,8)*24*60*60*1e3;h.minTime=-wl;h.millisecondsInWeek=6048e5;h.millisecondsInDay=864e5;h.millisecondsInMinute=6e4;h.millisecondsInHour=36e5;h.millisecondsInSecond=1e3;h.minutesInYear=525600;h.minutesInMonth=43200;h.minutesInDay=1440;h.minutesInHour=60;h.monthsInQuarter=3;h.monthsInYear=12;h.quartersInYear=4;const Pl=h.secondsInHour=3600;h.secondsInMinute=60;const nd=h.secondsInDay=Pl*24;h.secondsInWeek=nd*7;const jl=h.secondsInYear=nd*Dl,xl=h.secondsInMonth=jl/12;h.secondsInQuarter=xl*3;h.constructFromSymbol=Symbol.for("constructDateFrom");O.constructFrom=Il;var Cc=h;function Il(r,n){return typeof r=="function"?r(n):r&&typeof r=="object"&&Cc.constructFromSymbol in r?r[Cc.constructFromSymbol](n):r instanceof Date?new r.constructor(n):new Date(n)}var l={};l.toDate=Sl;var Tl=O;function Sl(r,n){return(0,Tl.constructFrom)(n||r,r)}ue.addDays=Wl;var El=O,Yl=l;function Wl(r,n,t){const a=(0,Yl.toDate)(r,t==null?void 0:t.in);return isNaN(n)?(0,El.constructFrom)((t==null?void 0:t.in)||r,NaN):(n&&a.setDate(a.getDate()+n),a)}var Ge={};Ge.addMonths=Fl;var Lc=O,Nl=l;function Fl(r,n,t){const a=(0,Nl.toDate)(r,t==null?void 0:t.in);if(isNaN(n))return(0,Lc.constructFrom)((t==null?void 0:t.in)||r,NaN);if(!n)return a;const i=a.getDate(),u=(0,Lc.constructFrom)((t==null?void 0:t.in)||r,a.getTime());u.setMonth(a.getMonth()+n+1,0);const c=u.getDate();return i>=c?u:(a.setFullYear(u.getFullYear(),u.getMonth(),i),a)}ki.add=yl;var Hl=ue,Cl=Ge,Ll=O,Al=l;function yl(r,n,t){const{years:a=0,months:i=0,weeks:u=0,days:c=0,hours:s=0,minutes:f=0,seconds:o=0}=n,m=(0,Al.toDate)(r,t==null?void 0:t.in),v=i||a?(0,Cl.addMonths)(m,i+a*12):m,_=c||u?(0,Hl.addDays)(v,c+u*7):v,b=f+s*60,D=(o+b*60)*1e3;return(0,Ll.constructFrom)((t==null?void 0:t.in)||r,+_+D)}var pi={},eu={};eu.isSaturday=Ql;var zl=l;function Ql(r,n){return(0,zl.toDate)(r,n==null?void 0:n.in).getDay()===6}var ru={};ru.isSunday=ql;var Rl=l;function ql(r,n){return(0,Rl.toDate)(r,n==null?void 0:n.in).getDay()===0}var cr={};cr.isWeekend=Zl;var Bl=l;function Zl(r,n){const t=(0,Bl.toDate)(r,n==null?void 0:n.in).getDay();return t===0||t===6}pi.addBusinessDays=Jl;var Gl=O,Vl=eu,Ul=ru,Hi=cr,Xl=l;function Jl(r,n,t){const a=(0,Xl.toDate)(r,t==null?void 0:t.in),i=(0,Hi.isWeekend)(a,t);if(isNaN(n))return(0,Gl.constructFrom)(t==null?void 0:t.in,NaN);const u=a.getHours(),c=n<0?-1:1,s=Math.trunc(n/5);a.setDate(a.getDate()+s*7);let f=Math.abs(n%5);for(;f>0;)a.setDate(a.getDate()+c),(0,Hi.isWeekend)(a,t)||(f-=1);return i&&(0,Hi.isWeekend)(a,t)&&n!==0&&((0,Vl.isSaturday)(a,t)&&a.setDate(a.getDate()+(c<0?2:-1)),(0,Ul.isSunday)(a,t)&&a.setDate(a.getDate()+(c<0?1:-2))),a.setHours(u),a}var tu={},sr={};sr.addMilliseconds=pl;var Kl=O,kl=l;function pl(r,n,t){return(0,Kl.constructFrom)((t==null?void 0:t.in)||r,+(0,kl.toDate)(r)+n)}tu.addHours=tm;var em=sr,rm=h;function tm(r,n,t){return(0,em.addMilliseconds)(r,n*rm.millisecondsInHour,t)}var nu={},Ee={},ce={},ne={},Q={};Q.getDefaultOptions=nm;Q.setDefaultOptions=am;let ad={};function nm(){return ad}function am(r){ad=r}ne.startOfWeek=cm;var im=Q,um=l;function cm(r,n){var s,f,o,m;const t=(0,im.getDefaultOptions)(),a=(n==null?void 0:n.weekStartsOn)??((f=(s=n==null?void 0:n.locale)==null?void 0:s.options)==null?void 0:f.weekStartsOn)??t.weekStartsOn??((m=(o=t.locale)==null?void 0:o.options)==null?void 0:m.weekStartsOn)??0,i=(0,um.toDate)(r,n==null?void 0:n.in),u=i.getDay(),c=(u=u.getTime()?a+1:t.getTime()>=s.getTime()?a:a-1}var au={},he={},ve={};ve.getTimezoneOffsetInMilliseconds=mm;var lm=l;function mm(r){const n=(0,lm.toDate)(r),t=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return t.setUTCFullYear(n.getFullYear()),+r-+t}var E={};E.normalizeDates=vm;var hm=O;function vm(r,...n){const t=hm.constructFrom.bind(null,r||n.find(a=>typeof a=="object"));return n.map(t)}var dr={};dr.startOfDay=gm;var _m=l;function gm(r,n){const t=(0,_m.toDate)(r,n==null?void 0:n.in);return t.setHours(0,0,0,0),t}he.differenceInCalendarDays=$m;var zc=ve,bm=E,Om=h,Qc=dr;function $m(r,n,t){const[a,i]=(0,bm.normalizeDates)(t==null?void 0:t.in,r,n),u=(0,Qc.startOfDay)(a),c=(0,Qc.startOfDay)(i),s=+u-(0,zc.getTimezoneOffsetInMilliseconds)(u),f=+c-(0,zc.getTimezoneOffsetInMilliseconds)(c);return Math.round((s-f)/Om.millisecondsInDay)}var Ve={};Ve.startOfISOWeekYear=Pm;var Mm=O,Dm=Ee,wm=ce;function Pm(r,n){const t=(0,Dm.getISOWeekYear)(r,n),a=(0,Mm.constructFrom)((n==null?void 0:n.in)||r,0);return a.setFullYear(t,0,4),a.setHours(0,0,0,0),(0,wm.startOfISOWeek)(a)}au.setISOWeekYear=Tm;var jm=O,xm=he,Rc=Ve,Im=l;function Tm(r,n,t){let a=(0,Im.toDate)(r,t==null?void 0:t.in);const i=(0,xm.differenceInCalendarDays)(a,(0,Rc.startOfISOWeekYear)(a,t)),u=(0,jm.constructFrom)((t==null?void 0:t.in)||r,0);return u.setFullYear(n,0,4),u.setHours(0,0,0,0),a=(0,Rc.startOfISOWeekYear)(u),a.setDate(a.getDate()+i),a}nu.addISOWeekYears=Ym;var Sm=Ee,Em=au;function Ym(r,n,t){return(0,Em.setISOWeekYear)(r,(0,Sm.getISOWeekYear)(r,t)+n,t)}var Er={};Er.addMinutes=Fm;var Wm=h,Nm=l;function Fm(r,n,t){const a=(0,Nm.toDate)(r,t==null?void 0:t.in);return a.setTime(a.getTime()+n*Wm.millisecondsInMinute),a}var Yr={};Yr.addQuarters=Cm;var Hm=Ge;function Cm(r,n,t){return(0,Hm.addMonths)(r,n*3,t)}var iu={};iu.addSeconds=Am;var Lm=sr;function Am(r,n,t){return(0,Lm.addMilliseconds)(r,n*1e3,t)}var fr={};fr.addWeeks=zm;var ym=ue;function zm(r,n,t){return(0,ym.addDays)(r,n*7,t)}var uu={};uu.addYears=Rm;var Qm=Ge;function Rm(r,n,t){return(0,Qm.addMonths)(r,n*12,t)}var id={};id.areIntervalsOverlapping=qm;var Or=l;function qm(r,n,t){const[a,i]=[+(0,Or.toDate)(r.start,t==null?void 0:t.in),+(0,Or.toDate)(r.end,t==null?void 0:t.in)].sort((s,f)=>s-f),[u,c]=[+(0,Or.toDate)(n.start,t==null?void 0:t.in),+(0,Or.toDate)(n.end,t==null?void 0:t.in)].sort((s,f)=>s-f);return t!=null&&t.inclusive?a<=c&&u<=i:a{!a&&typeof i=="object"&&(a=qc.constructFrom.bind(null,i));const u=(0,Bm.toDate)(i,a);(!t||t{!a&&typeof i=="object"&&(a=Bc.constructFrom.bind(null,i));const u=(0,Gm.toDate)(i,a);(!t||t>u||isNaN(+u))&&(t=u)}),(0,Bc.constructFrom)(a,t||NaN)}ud.clamp=Km;var Um=E,Xm=cu,Jm=su;function Km(r,n,t){const[a,i,u]=(0,Um.normalizeDates)(t==null?void 0:t.in,r,n.start,n.end);return(0,Jm.min)([(0,Xm.max)([a,i],t),u],t)}var du={};du.closestIndexTo=km;var Zc=l;function km(r,n){const t=+(0,Zc.toDate)(r);if(isNaN(t))return NaN;let a,i;return n.forEach((u,c)=>{const s=(0,Zc.toDate)(u);if(isNaN(+s)){a=NaN,i=NaN;return}const f=Math.abs(t-+s);(a==null||f0?1:t}var sd={};sd.compareDesc=ah;var Vc=l;function ah(r,n){const t=+(0,Vc.toDate)(r)-+(0,Vc.toDate)(n);return t>0?-1:t<0?1:t}var L={};L.constructNow=uh;var ih=O;function uh(r){return(0,ih.constructFrom)(r,Date.now())}var dd={};dd.daysToWeeks=sh;var ch=h;function sh(r){const n=Math.trunc(r/ch.daysInWeek);return n===0?0:n}var fd={},Ue={};Ue.isSameDay=fh;var dh=E,Uc=dr;function fh(r,n,t){const[a,i]=(0,dh.normalizeDates)(t==null?void 0:t.in,r,n);return+(0,Uc.startOfDay)(a)==+(0,Uc.startOfDay)(i)}var _e={},fu={};fu.isDate=oh;function oh(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}_e.isValid=hh;var lh=fu,mh=l;function hh(r){return!(!(0,lh.isDate)(r)&&typeof r!="number"||isNaN(+(0,mh.toDate)(r)))}fd.differenceInBusinessDays=Oh;var vh=E,Xc=ue,_h=he,gh=Ue,Jc=_e,bh=cr;function Oh(r,n,t){const[a,i]=(0,vh.normalizeDates)(t==null?void 0:t.in,r,n);if(!(0,Jc.isValid)(a)||!(0,Jc.isValid)(i))return NaN;const u=(0,_h.differenceInCalendarDays)(a,i),c=u<0?-1:1,s=Math.trunc(u/7);let f=s*5,o=(0,Xc.addDays)(i,s*7);for(;!(0,gh.isSameDay)(a,o);)f+=(0,bh.isWeekend)(o,t)?0:c,o=(0,Xc.addDays)(o,c);return f===0?0:f}var ou={};ou.differenceInCalendarISOWeekYears=Mh;var $h=E,Kc=Ee;function Mh(r,n,t){const[a,i]=(0,$h.normalizeDates)(t==null?void 0:t.in,r,n);return(0,Kc.getISOWeekYear)(a,t)-(0,Kc.getISOWeekYear)(i,t)}var od={};od.differenceInCalendarISOWeeks=Ph;var kc=ve,Dh=E,wh=h,pc=ce;function Ph(r,n,t){const[a,i]=(0,Dh.normalizeDates)(t==null?void 0:t.in,r,n),u=(0,pc.startOfISOWeek)(a),c=(0,pc.startOfISOWeek)(i),s=+u-(0,kc.getTimezoneOffsetInMilliseconds)(u),f=+c-(0,kc.getTimezoneOffsetInMilliseconds)(c);return Math.round((s-f)/wh.millisecondsInWeek)}var Wr={};Wr.differenceInCalendarMonths=xh;var jh=E;function xh(r,n,t){const[a,i]=(0,jh.normalizeDates)(t==null?void 0:t.in,r,n),u=a.getFullYear()-i.getFullYear(),c=a.getMonth()-i.getMonth();return u*12+c}var lu={},mu={};mu.getQuarter=Th;var Ih=l;function Th(r,n){const t=(0,Ih.toDate)(r,n==null?void 0:n.in);return Math.trunc(t.getMonth()/3)+1}lu.differenceInCalendarQuarters=Eh;var Sh=E,es=mu;function Eh(r,n,t){const[a,i]=(0,Sh.normalizeDates)(t==null?void 0:t.in,r,n),u=a.getFullYear()-i.getFullYear(),c=(0,es.getQuarter)(a)-(0,es.getQuarter)(i);return u*4+c}var Nr={};Nr.differenceInCalendarWeeks=Nh;var rs=ve,Yh=E,Wh=h,ts=ne;function Nh(r,n,t){const[a,i]=(0,Yh.normalizeDates)(t==null?void 0:t.in,r,n),u=(0,ts.startOfWeek)(a,t),c=(0,ts.startOfWeek)(i,t),s=+u-(0,rs.getTimezoneOffsetInMilliseconds)(u),f=+c-(0,rs.getTimezoneOffsetInMilliseconds)(c);return Math.round((s-f)/Wh.millisecondsInWeek)}var Fr={};Fr.differenceInCalendarYears=Hh;var Fh=E;function Hh(r,n,t){const[a,i]=(0,Fh.normalizeDates)(t==null?void 0:t.in,r,n);return a.getFullYear()-i.getFullYear()}var Hr={};Hr.differenceInDays=Ah;var Ch=E,Lh=he;function Ah(r,n,t){const[a,i]=(0,Ch.normalizeDates)(t==null?void 0:t.in,r,n),u=ns(a,i),c=Math.abs((0,Lh.differenceInCalendarDays)(a,i));a.setDate(a.getDate()-u*c);const s=+(ns(a,i)===-u),f=u*(c-s);return f===0?0:f}function ns(r,n){const t=r.getFullYear()-n.getFullYear()||r.getMonth()-n.getMonth()||r.getDate()-n.getDate()||r.getHours()-n.getHours()||r.getMinutes()-n.getMinutes()||r.getSeconds()-n.getSeconds()||r.getMilliseconds()-n.getMilliseconds();return t<0?-1:t>0?1:t}var Cr={},ge={};ge.getRoundingMethod=yh;function yh(r){return n=>{const a=(r?Math[r]:Math.trunc)(n);return a===0?0:a}}Cr.differenceInHours=qh;var zh=ge,Qh=E,Rh=h;function qh(r,n,t){const[a,i]=(0,Qh.normalizeDates)(t==null?void 0:t.in,r,n),u=(+a-+i)/Rh.millisecondsInHour;return(0,zh.getRoundingMethod)(t==null?void 0:t.roundingMethod)(u)}var ld={},hu={};hu.subISOWeekYears=Zh;var Bh=nu;function Zh(r,n,t){return(0,Bh.addISOWeekYears)(r,-n,t)}ld.differenceInISOWeekYears=Xh;var Gh=E,as=He,Vh=ou,Uh=hu;function Xh(r,n,t){const[a,i]=(0,Gh.normalizeDates)(t==null?void 0:t.in,r,n),u=(0,as.compareAsc)(a,i),c=Math.abs((0,Vh.differenceInCalendarISOWeekYears)(a,i,t)),s=(0,Uh.subISOWeekYears)(a,u*c,t),f=+((0,as.compareAsc)(s,i)===-u),o=u*(c-f);return o===0?0:o}var Lr={};Lr.differenceInMilliseconds=Jh;var is=l;function Jh(r,n){return+(0,is.toDate)(r)-+(0,is.toDate)(n)}var Ar={};Ar.differenceInMinutes=e0;var Kh=ge,kh=h,ph=Lr;function e0(r,n,t){const a=(0,ph.differenceInMilliseconds)(r,n)/kh.millisecondsInMinute;return(0,Kh.getRoundingMethod)(t==null?void 0:t.roundingMethod)(a)}var or={},vu={},yr={};yr.endOfDay=t0;var r0=l;function t0(r,n){const t=(0,r0.toDate)(r,n==null?void 0:n.in);return t.setHours(23,59,59,999),t}var zr={};zr.endOfMonth=a0;var n0=l;function a0(r,n){const t=(0,n0.toDate)(r,n==null?void 0:n.in),a=t.getMonth();return t.setFullYear(t.getFullYear(),a+1,0),t.setHours(23,59,59,999),t}vu.isLastDayOfMonth=s0;var i0=yr,u0=zr,c0=l;function s0(r,n){const t=(0,c0.toDate)(r,n==null?void 0:n.in);return+(0,i0.endOfDay)(t,n)==+(0,u0.endOfMonth)(t,n)}or.differenceInMonths=l0;var d0=E,Ci=He,f0=Wr,o0=vu;function l0(r,n,t){const[a,i,u]=(0,d0.normalizeDates)(t==null?void 0:t.in,r,r,n),c=(0,Ci.compareAsc)(i,u),s=Math.abs((0,f0.differenceInCalendarMonths)(i,u));if(s<1)return 0;i.getMonth()===1&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-c*s);let f=(0,Ci.compareAsc)(i,u)===-c;(0,o0.isLastDayOfMonth)(a)&&s===1&&(0,Ci.compareAsc)(a,u)===1&&(f=!1);const o=c*(s-+f);return o===0?0:o}var md={};md.differenceInQuarters=v0;var m0=ge,h0=or;function v0(r,n,t){const a=(0,h0.differenceInMonths)(r,n,t)/3;return(0,m0.getRoundingMethod)(t==null?void 0:t.roundingMethod)(a)}var lr={};lr.differenceInSeconds=b0;var _0=ge,g0=Lr;function b0(r,n,t){const a=(0,g0.differenceInMilliseconds)(r,n)/1e3;return(0,_0.getRoundingMethod)(t==null?void 0:t.roundingMethod)(a)}var hd={};hd.differenceInWeeks=M0;var O0=ge,$0=Hr;function M0(r,n,t){const a=(0,$0.differenceInDays)(r,n,t)/7;return(0,O0.getRoundingMethod)(t==null?void 0:t.roundingMethod)(a)}var _u={};_u.differenceInYears=P0;var D0=E,us=He,w0=Fr;function P0(r,n,t){const[a,i]=(0,D0.normalizeDates)(t==null?void 0:t.in,r,n),u=(0,us.compareAsc)(a,i),c=Math.abs((0,w0.differenceInCalendarYears)(a,i));a.setFullYear(1584),i.setFullYear(1584);const s=(0,us.compareAsc)(a,i)===-u,f=u*(c-+s);return f===0?0:f}var gu={},se={};se.normalizeInterval=x0;var j0=E;function x0(r,n){const[t,a]=(0,j0.normalizeDates)(r,n.start,n.end);return{start:t,end:a}}gu.eachDayOfInterval=S0;var I0=se,T0=O;function S0(r,n){const{start:t,end:a}=(0,I0.normalizeInterval)(n==null?void 0:n.in,r);let i=+t>+a;const u=i?+t:+a,c=i?a:t;c.setHours(0,0,0,0);let s=(n==null?void 0:n.step)??1;if(!s)return[];s<0&&(s=-s,i=!i);const f=[];for(;+c<=u;)f.push((0,T0.constructFrom)(t,c)),c.setDate(c.getDate()+s),c.setHours(0,0,0,0);return i?f.reverse():f}var vd={};vd.eachHourOfInterval=W0;var E0=se,Y0=O;function W0(r,n){const{start:t,end:a}=(0,E0.normalizeInterval)(n==null?void 0:n.in,r);let i=+t>+a;const u=i?+t:+a,c=i?a:t;c.setMinutes(0,0,0);let s=(n==null?void 0:n.step)??1;if(!s)return[];s<0&&(s=-s,i=!i);const f=[];for(;+c<=u;)f.push((0,Y0.constructFrom)(t,c)),c.setHours(c.getHours()+s);return i?f.reverse():f}var _d={};_d.eachMinuteOfInterval=C0;var N0=se,F0=Er,H0=O;function C0(r,n){const{start:t,end:a}=(0,N0.normalizeInterval)(n==null?void 0:n.in,r);t.setSeconds(0,0);let i=+t>+a;const u=i?+t:+a;let c=i?a:t,s=(n==null?void 0:n.step)??1;if(!s)return[];s<0&&(s=-s,i=!i);const f=[];for(;+c<=u;)f.push((0,H0.constructFrom)(t,c)),c=(0,F0.addMinutes)(c,s);return i?f.reverse():f}var gd={};gd.eachMonthOfInterval=y0;var L0=se,A0=O;function y0(r,n){const{start:t,end:a}=(0,L0.normalizeInterval)(n==null?void 0:n.in,r);let i=+t>+a;const u=i?+t:+a,c=i?a:t;c.setHours(0,0,0,0),c.setDate(1);let s=(n==null?void 0:n.step)??1;if(!s)return[];s<0&&(s=-s,i=!i);const f=[];for(;+c<=u;)f.push((0,A0.constructFrom)(t,c)),c.setMonth(c.getMonth()+s);return i?f.reverse():f}var bd={},Qr={};Qr.startOfQuarter=Q0;var z0=l;function Q0(r,n){const t=(0,z0.toDate)(r,n==null?void 0:n.in),a=t.getMonth(),i=a-a%3;return t.setMonth(i,1),t.setHours(0,0,0,0),t}bd.eachQuarterOfInterval=Z0;var R0=se,q0=Yr,B0=O,$r=Qr;function Z0(r,n){const{start:t,end:a}=(0,R0.normalizeInterval)(n==null?void 0:n.in,r);let i=+t>+a;const u=i?+(0,$r.startOfQuarter)(t):+(0,$r.startOfQuarter)(a);let c=i?(0,$r.startOfQuarter)(a):(0,$r.startOfQuarter)(t),s=(n==null?void 0:n.step)??1;if(!s)return[];s<0&&(s=-s,i=!i);const f=[];for(;+c<=u;)f.push((0,B0.constructFrom)(t,c)),c=(0,q0.addQuarters)(c,s);return i?f.reverse():f}var Od={};Od.eachWeekOfInterval=X0;var G0=se,V0=fr,U0=O,Mr=ne;function X0(r,n){const{start:t,end:a}=(0,G0.normalizeInterval)(n==null?void 0:n.in,r);let i=+t>+a;const u=i?(0,Mr.startOfWeek)(a,n):(0,Mr.startOfWeek)(t,n),c=i?(0,Mr.startOfWeek)(t,n):(0,Mr.startOfWeek)(a,n);u.setHours(15),c.setHours(15);const s=+c.getTime();let f=u,o=(n==null?void 0:n.step)??1;if(!o)return[];o<0&&(o=-o,i=!i);const m=[];for(;+f<=s;)f.setHours(0),m.push((0,U0.constructFrom)(t,f)),f=(0,V0.addWeeks)(f,o),f.setHours(15);return i?m.reverse():m}var Rr={};Rr.eachWeekendOfInterval=ev;var J0=se,K0=O,k0=gu,p0=cr;function ev(r,n){const{start:t,end:a}=(0,J0.normalizeInterval)(n==null?void 0:n.in,r),i=(0,k0.eachDayOfInterval)({start:t,end:a},n),u=[];let c=0;for(;c+a;const u=i?+t:+a,c=i?a:t;c.setHours(0,0,0,0),c.setMonth(0,1);let s=(n==null?void 0:n.step)??1;if(!s)return[];s<0&&(s=-s,i=!i);const f=[];for(;+c<=u;)f.push((0,_v.constructFrom)(t,c)),c.setFullYear(c.getFullYear()+s);return i?f.reverse():f}var wd={};wd.endOfDecade=Ov;var bv=l;function Ov(r,n){const t=(0,bv.toDate)(r,n==null?void 0:n.in),a=t.getFullYear(),i=9+Math.floor(a/10)*10;return t.setFullYear(i,11,31),t.setHours(23,59,59,999),t}var Pd={};Pd.endOfHour=Mv;var $v=l;function Mv(r,n){const t=(0,$v.toDate)(r,n==null?void 0:n.in);return t.setMinutes(59,59,999),t}var jd={},Ou={};Ou.endOfWeek=Pv;var Dv=Q,wv=l;function Pv(r,n){var s,f,o,m;const t=(0,Dv.getDefaultOptions)(),a=(n==null?void 0:n.weekStartsOn)??((f=(s=n==null?void 0:n.locale)==null?void 0:s.options)==null?void 0:f.weekStartsOn)??t.weekStartsOn??((m=(o=t.locale)==null?void 0:o.options)==null?void 0:m.weekStartsOn)??0,i=(0,wv.toDate)(r,n==null?void 0:n.in),u=i.getDay(),c=(u{let a;const i=qv[r];return typeof i=="string"?a=i:n===1?a=i.one:a=i.other.replace("{{count}}",n.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+a:a+" ago":a};Du.formatDistance=Bv;var wu={},Nd={};Nd.buildFormatLongFn=Zv;function Zv(r){return(n={})=>{const t=n.width?String(n.width):r.defaultWidth;return r.formats[t]||r.formats[r.defaultWidth]}}wu.formatLong=void 0;var Li=Nd;const Gv={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Vv={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Uv={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"};wu.formatLong={date:(0,Li.buildFormatLongFn)({formats:Gv,defaultWidth:"full"}),time:(0,Li.buildFormatLongFn)({formats:Vv,defaultWidth:"full"}),dateTime:(0,Li.buildFormatLongFn)({formats:Uv,defaultWidth:"full"})};var Pu={};Pu.formatRelative=void 0;const Xv={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Jv=(r,n,t,a)=>Xv[r];Pu.formatRelative=Jv;var ju={},Fd={};Fd.buildLocalizeFn=Kv;function Kv(r){return(n,t)=>{const a=t!=null&&t.context?String(t.context):"standalone";let i;if(a==="formatting"&&r.formattingValues){const c=r.defaultFormattingWidth||r.defaultWidth,s=t!=null&&t.width?String(t.width):c;i=r.formattingValues[s]||r.formattingValues[c]}else{const c=r.defaultWidth,s=t!=null&&t.width?String(t.width):r.defaultWidth;i=r.values[s]||r.values[c]}const u=r.argumentCallback?r.argumentCallback(n):n;return i[u]}}ju.localize=void 0;var Xe=Fd;const kv={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},pv={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},e_={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},r_={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},t_={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},n_={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},a_=(r,n)=>{const t=Number(r),a=t%100;if(a>20||a<10)switch(a%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"};ju.localize={ordinalNumber:a_,era:(0,Xe.buildLocalizeFn)({values:kv,defaultWidth:"wide"}),quarter:(0,Xe.buildLocalizeFn)({values:pv,defaultWidth:"wide",argumentCallback:r=>r-1}),month:(0,Xe.buildLocalizeFn)({values:e_,defaultWidth:"wide"}),day:(0,Xe.buildLocalizeFn)({values:r_,defaultWidth:"wide"}),dayPeriod:(0,Xe.buildLocalizeFn)({values:t_,defaultWidth:"wide",formattingValues:n_,defaultFormattingWidth:"wide"})};var xu={},Hd={};Hd.buildMatchFn=i_;function i_(r){return(n,t={})=>{const a=t.width,i=a&&r.matchPatterns[a]||r.matchPatterns[r.defaultMatchWidth],u=n.match(i);if(!u)return null;const c=u[0],s=a&&r.parsePatterns[a]||r.parsePatterns[r.defaultParseWidth],f=Array.isArray(s)?c_(s,v=>v.test(c)):u_(s,v=>v.test(c));let o;o=r.valueCallback?r.valueCallback(f):f,o=t.valueCallback?t.valueCallback(o):o;const m=n.slice(c.length);return{value:o,rest:m}}}function u_(r,n){for(const t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&n(r[t]))return t}function c_(r,n){for(let t=0;t{const a=n.match(r.matchPattern);if(!a)return null;const i=a[0],u=n.match(r.parsePattern);if(!u)return null;let c=r.valueCallback?r.valueCallback(u[0]):u[0];c=t.valueCallback?t.valueCallback(c):c;const s=n.slice(i.length);return{value:c,rest:s}}}xu.match=void 0;var Je=Hd,d_=Cd;const f_=/^(\d+)(th|st|nd|rd)?/i,o_=/\d+/i,l_={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},m_={any:[/^b/i,/^(a|c)/i]},h_={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},v_={any:[/1/i,/2/i,/3/i,/4/i]},__={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},g_={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},b_={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},O_={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},$_={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},M_={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}};xu.match={ordinalNumber:(0,d_.buildMatchPatternFn)({matchPattern:f_,parsePattern:o_,valueCallback:r=>parseInt(r,10)}),era:(0,Je.buildMatchFn)({matchPatterns:l_,defaultMatchWidth:"wide",parsePatterns:m_,defaultParseWidth:"any"}),quarter:(0,Je.buildMatchFn)({matchPatterns:h_,defaultMatchWidth:"wide",parsePatterns:v_,defaultParseWidth:"any",valueCallback:r=>r+1}),month:(0,Je.buildMatchFn)({matchPatterns:__,defaultMatchWidth:"wide",parsePatterns:g_,defaultParseWidth:"any"}),day:(0,Je.buildMatchFn)({matchPatterns:b_,defaultMatchWidth:"wide",parsePatterns:O_,defaultParseWidth:"any"}),dayPeriod:(0,Je.buildMatchFn)({matchPatterns:$_,defaultMatchWidth:"any",parsePatterns:M_,defaultParseWidth:"any"})};Mu.enUS=void 0;var D_=Du,w_=wu,P_=Pu,j_=ju,x_=xu;Mu.enUS={code:"en-US",formatDistance:D_.formatDistance,formatLong:w_.formatLong,formatRelative:P_.formatRelative,localize:j_.localize,match:x_.match,options:{weekStartsOn:0,firstWeekContainsDate:1}};(function(r){Object.defineProperty(r,"defaultLocale",{enumerable:!0,get:function(){return n.enUS}});var n=Mu})(Ce);var Iu={},Tu={};Tu.getDayOfYear=E_;var I_=he,T_=qr,S_=l;function E_(r,n){const t=(0,S_.toDate)(r,n==null?void 0:n.in);return(0,I_.differenceInCalendarDays)(t,(0,T_.startOfYear)(t))+1}var Br={};Br.getISOWeek=H_;var Y_=h,W_=ce,N_=Ve,F_=l;function H_(r,n){const t=(0,F_.toDate)(r,n==null?void 0:n.in),a=+(0,W_.startOfISOWeek)(t)-+(0,N_.startOfISOWeekYear)(t);return Math.round(a/Y_.millisecondsInWeek)+1}var Zr={},Gr={},hr={};hr.getWeekYear=A_;var C_=Q,ss=O,ds=ne,L_=l;function A_(r,n){var m,v,_,b;const t=(0,L_.toDate)(r,n==null?void 0:n.in),a=t.getFullYear(),i=(0,C_.getDefaultOptions)(),u=(n==null?void 0:n.firstWeekContainsDate)??((v=(m=n==null?void 0:n.locale)==null?void 0:m.options)==null?void 0:v.firstWeekContainsDate)??i.firstWeekContainsDate??((b=(_=i.locale)==null?void 0:_.options)==null?void 0:b.firstWeekContainsDate)??1,c=(0,ss.constructFrom)((n==null?void 0:n.in)||r,0);c.setFullYear(a+1,0,u),c.setHours(0,0,0,0);const s=(0,ds.startOfWeek)(c,n),f=(0,ss.constructFrom)((n==null?void 0:n.in)||r,0);f.setFullYear(a,0,u),f.setHours(0,0,0,0);const o=(0,ds.startOfWeek)(f,n);return+t>=+s?a+1:+t>=+o?a:a-1}Gr.startOfWeekYear=q_;var y_=Q,z_=O,Q_=hr,R_=ne;function q_(r,n){var s,f,o,m;const t=(0,y_.getDefaultOptions)(),a=(n==null?void 0:n.firstWeekContainsDate)??((f=(s=n==null?void 0:n.locale)==null?void 0:s.options)==null?void 0:f.firstWeekContainsDate)??t.firstWeekContainsDate??((m=(o=t.locale)==null?void 0:o.options)==null?void 0:m.firstWeekContainsDate)??1,i=(0,Q_.getWeekYear)(r,n),u=(0,z_.constructFrom)((n==null?void 0:n.in)||r,0);return u.setFullYear(i,0,a),u.setHours(0,0,0,0),(0,R_.startOfWeek)(u,n)}Zr.getWeek=U_;var B_=h,Z_=ne,G_=Gr,V_=l;function U_(r,n){const t=(0,V_.toDate)(r,n==null?void 0:n.in),a=+(0,Z_.startOfWeek)(t,n)-+(0,G_.startOfWeekYear)(t,n);return Math.round(a/B_.millisecondsInWeek)+1}var Le={};Le.addLeadingZeros=X_;function X_(r,n){const t=r<0?"-":"",a=Math.abs(r).toString().padStart(n,"0");return t+a}var Vr={};Vr.lightFormatters=void 0;var we=Le;Vr.lightFormatters={y(r,n){const t=r.getFullYear(),a=t>0?t:1-t;return(0,we.addLeadingZeros)(n==="yy"?a%100:a,n.length)},M(r,n){const t=r.getMonth();return n==="M"?String(t+1):(0,we.addLeadingZeros)(t+1,2)},d(r,n){return(0,we.addLeadingZeros)(r.getDate(),n.length)},a(r,n){const t=r.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(r,n){return(0,we.addLeadingZeros)(r.getHours()%12||12,n.length)},H(r,n){return(0,we.addLeadingZeros)(r.getHours(),n.length)},m(r,n){return(0,we.addLeadingZeros)(r.getMinutes(),n.length)},s(r,n){return(0,we.addLeadingZeros)(r.getSeconds(),n.length)},S(r,n){const t=n.length,a=r.getMilliseconds(),i=Math.trunc(a*Math.pow(10,t-3));return(0,we.addLeadingZeros)(i,n.length)}};Iu.formatters=void 0;var J_=Tu,K_=Br,k_=Ee,p_=Zr,eg=hr,N=Le,Pe=Vr;const ze={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"};Iu.formatters={G:function(r,n,t){const a=r.getFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return t.era(a,{width:"abbreviated"});case"GGGGG":return t.era(a,{width:"narrow"});case"GGGG":default:return t.era(a,{width:"wide"})}},y:function(r,n,t){if(n==="yo"){const a=r.getFullYear(),i=a>0?a:1-a;return t.ordinalNumber(i,{unit:"year"})}return Pe.lightFormatters.y(r,n)},Y:function(r,n,t,a){const i=(0,eg.getWeekYear)(r,a),u=i>0?i:1-i;if(n==="YY"){const c=u%100;return(0,N.addLeadingZeros)(c,2)}return n==="Yo"?t.ordinalNumber(u,{unit:"year"}):(0,N.addLeadingZeros)(u,n.length)},R:function(r,n){const t=(0,k_.getISOWeekYear)(r);return(0,N.addLeadingZeros)(t,n.length)},u:function(r,n){const t=r.getFullYear();return(0,N.addLeadingZeros)(t,n.length)},Q:function(r,n,t){const a=Math.ceil((r.getMonth()+1)/3);switch(n){case"Q":return String(a);case"QQ":return(0,N.addLeadingZeros)(a,2);case"Qo":return t.ordinalNumber(a,{unit:"quarter"});case"QQQ":return t.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(a,{width:"wide",context:"formatting"})}},q:function(r,n,t){const a=Math.ceil((r.getMonth()+1)/3);switch(n){case"q":return String(a);case"qq":return(0,N.addLeadingZeros)(a,2);case"qo":return t.ordinalNumber(a,{unit:"quarter"});case"qqq":return t.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(a,{width:"wide",context:"standalone"})}},M:function(r,n,t){const a=r.getMonth();switch(n){case"M":case"MM":return Pe.lightFormatters.M(r,n);case"Mo":return t.ordinalNumber(a+1,{unit:"month"});case"MMM":return t.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(a,{width:"wide",context:"formatting"})}},L:function(r,n,t){const a=r.getMonth();switch(n){case"L":return String(a+1);case"LL":return(0,N.addLeadingZeros)(a+1,2);case"Lo":return t.ordinalNumber(a+1,{unit:"month"});case"LLL":return t.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(a,{width:"wide",context:"standalone"})}},w:function(r,n,t,a){const i=(0,p_.getWeek)(r,a);return n==="wo"?t.ordinalNumber(i,{unit:"week"}):(0,N.addLeadingZeros)(i,n.length)},I:function(r,n,t){const a=(0,K_.getISOWeek)(r);return n==="Io"?t.ordinalNumber(a,{unit:"week"}):(0,N.addLeadingZeros)(a,n.length)},d:function(r,n,t){return n==="do"?t.ordinalNumber(r.getDate(),{unit:"date"}):Pe.lightFormatters.d(r,n)},D:function(r,n,t){const a=(0,J_.getDayOfYear)(r);return n==="Do"?t.ordinalNumber(a,{unit:"dayOfYear"}):(0,N.addLeadingZeros)(a,n.length)},E:function(r,n,t){const a=r.getDay();switch(n){case"E":case"EE":case"EEE":return t.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(a,{width:"short",context:"formatting"});case"EEEE":default:return t.day(a,{width:"wide",context:"formatting"})}},e:function(r,n,t,a){const i=r.getDay(),u=(i-a.weekStartsOn+8)%7||7;switch(n){case"e":return String(u);case"ee":return(0,N.addLeadingZeros)(u,2);case"eo":return t.ordinalNumber(u,{unit:"day"});case"eee":return t.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(i,{width:"short",context:"formatting"});case"eeee":default:return t.day(i,{width:"wide",context:"formatting"})}},c:function(r,n,t,a){const i=r.getDay(),u=(i-a.weekStartsOn+8)%7||7;switch(n){case"c":return String(u);case"cc":return(0,N.addLeadingZeros)(u,n.length);case"co":return t.ordinalNumber(u,{unit:"day"});case"ccc":return t.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(i,{width:"narrow",context:"standalone"});case"cccccc":return t.day(i,{width:"short",context:"standalone"});case"cccc":default:return t.day(i,{width:"wide",context:"standalone"})}},i:function(r,n,t){const a=r.getDay(),i=a===0?7:a;switch(n){case"i":return String(i);case"ii":return(0,N.addLeadingZeros)(i,n.length);case"io":return t.ordinalNumber(i,{unit:"day"});case"iii":return t.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(a,{width:"short",context:"formatting"});case"iiii":default:return t.day(a,{width:"wide",context:"formatting"})}},a:function(r,n,t){const i=r.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(r,n,t){const a=r.getHours();let i;switch(a===12?i=ze.noon:a===0?i=ze.midnight:i=a/12>=1?"pm":"am",n){case"b":case"bb":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(r,n,t){const a=r.getHours();let i;switch(a>=17?i=ze.evening:a>=12?i=ze.afternoon:a>=4?i=ze.morning:i=ze.night,n){case"B":case"BB":case"BBB":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(r,n,t){if(n==="ho"){let a=r.getHours()%12;return a===0&&(a=12),t.ordinalNumber(a,{unit:"hour"})}return Pe.lightFormatters.h(r,n)},H:function(r,n,t){return n==="Ho"?t.ordinalNumber(r.getHours(),{unit:"hour"}):Pe.lightFormatters.H(r,n)},K:function(r,n,t){const a=r.getHours()%12;return n==="Ko"?t.ordinalNumber(a,{unit:"hour"}):(0,N.addLeadingZeros)(a,n.length)},k:function(r,n,t){let a=r.getHours();return a===0&&(a=24),n==="ko"?t.ordinalNumber(a,{unit:"hour"}):(0,N.addLeadingZeros)(a,n.length)},m:function(r,n,t){return n==="mo"?t.ordinalNumber(r.getMinutes(),{unit:"minute"}):Pe.lightFormatters.m(r,n)},s:function(r,n,t){return n==="so"?t.ordinalNumber(r.getSeconds(),{unit:"second"}):Pe.lightFormatters.s(r,n)},S:function(r,n){return Pe.lightFormatters.S(r,n)},X:function(r,n,t){const a=r.getTimezoneOffset();if(a===0)return"Z";switch(n){case"X":return os(a);case"XXXX":case"XX":return Ne(a);case"XXXXX":case"XXX":default:return Ne(a,":")}},x:function(r,n,t){const a=r.getTimezoneOffset();switch(n){case"x":return os(a);case"xxxx":case"xx":return Ne(a);case"xxxxx":case"xxx":default:return Ne(a,":")}},O:function(r,n,t){const a=r.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+fs(a,":");case"OOOO":default:return"GMT"+Ne(a,":")}},z:function(r,n,t){const a=r.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+fs(a,":");case"zzzz":default:return"GMT"+Ne(a,":")}},t:function(r,n,t){const a=Math.trunc(+r/1e3);return(0,N.addLeadingZeros)(a,n.length)},T:function(r,n,t){return(0,N.addLeadingZeros)(+r,n.length)}};function fs(r,n=""){const t=r>0?"-":"+",a=Math.abs(r),i=Math.trunc(a/60),u=a%60;return u===0?t+String(i):t+String(i)+n+(0,N.addLeadingZeros)(u,2)}function os(r,n){return r%60===0?(r>0?"-":"+")+(0,N.addLeadingZeros)(Math.abs(r)/60,2):Ne(r,n)}function Ne(r,n=""){const t=r>0?"-":"+",a=Math.abs(r),i=(0,N.addLeadingZeros)(Math.trunc(a/60),2),u=(0,N.addLeadingZeros)(a%60,2);return t+i+n+u}var Ur={};Ur.longFormatters=void 0;const ls=(r,n)=>{switch(r){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},Ld=(r,n)=>{switch(r){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},rg=(r,n)=>{const t=r.match(/(P+)(p+)?/)||[],a=t[1],i=t[2];if(!i)return ls(r,n);let u;switch(a){case"P":u=n.dateTime({width:"short"});break;case"PP":u=n.dateTime({width:"medium"});break;case"PPP":u=n.dateTime({width:"long"});break;case"PPPP":default:u=n.dateTime({width:"full"});break}return u.replace("{{date}}",ls(a,n)).replace("{{time}}",Ld(i,n))};Ur.longFormatters={p:Ld,P:rg};var vr={};vr.isProtectedDayOfYearToken=ig;vr.isProtectedWeekYearToken=ug;vr.warnOrThrowProtectedError=cg;const tg=/^D+$/,ng=/^Y+$/,ag=["D","DD","YY","YYYY"];function ig(r){return tg.test(r)}function ug(r){return ng.test(r)}function cg(r,n,t){const a=sg(r,n,t);if(console.warn(a),ag.includes(r))throw new RangeError(a)}function sg(r,n,t){const a=r[0]==="Y"?"years":"days of the month";return`Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${n}\`) for formatting ${a} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(function(r){r.format=r.formatDate=b,Object.defineProperty(r,"formatters",{enumerable:!0,get:function(){return a.formatters}}),Object.defineProperty(r,"longFormatters",{enumerable:!0,get:function(){return i.longFormatters}});var n=Ce,t=Q,a=Iu,i=Ur,u=vr,c=_e,s=l;const f=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,o=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,m=/^'([^]*?)'?$/,v=/''/g,_=/[a-zA-Z]/;function b(D,x,M){var ie,U,G,R,V,X,q,p;const F=(0,t.getDefaultOptions)(),A=(M==null?void 0:M.locale)??F.locale??n.defaultLocale,j=(M==null?void 0:M.firstWeekContainsDate)??((U=(ie=M==null?void 0:M.locale)==null?void 0:ie.options)==null?void 0:U.firstWeekContainsDate)??F.firstWeekContainsDate??((R=(G=F.locale)==null?void 0:G.options)==null?void 0:R.firstWeekContainsDate)??1,Z=(M==null?void 0:M.weekStartsOn)??((X=(V=M==null?void 0:M.locale)==null?void 0:V.options)==null?void 0:X.weekStartsOn)??F.weekStartsOn??((p=(q=F.locale)==null?void 0:q.options)==null?void 0:p.weekStartsOn)??0,B=(0,s.toDate)(D,M==null?void 0:M.in);if(!(0,c.isValid)(B))throw new RangeError("Invalid time value");let y=x.match(o).map(W=>{const Y=W[0];if(Y==="p"||Y==="P"){const J=i.longFormatters[Y];return J(W,A.formatLong)}return W}).join("").match(f).map(W=>{if(W==="''")return{isToken:!1,value:"'"};const Y=W[0];if(Y==="'")return{isToken:!1,value:$(W)};if(a.formatters[Y])return{isToken:!0,value:W};if(Y.match(_))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Y+"`");return{isToken:!1,value:W}});A.localize.preprocessor&&(y=A.localize.preprocessor(B,y));const ae={firstWeekContainsDate:j,weekStartsOn:Z,locale:A};return y.map(W=>{if(!W.isToken)return W.value;const Y=W.value;(!(M!=null&&M.useAdditionalWeekYearTokens)&&(0,u.isProtectedWeekYearToken)(Y)||!(M!=null&&M.useAdditionalDayOfYearTokens)&&(0,u.isProtectedDayOfYearToken)(Y))&&(0,u.warnOrThrowProtectedError)(Y,x,String(D));const J=a.formatters[Y[0]];return J(B,Y,A.localize,ae)}).join("")}function $(D){const x=D.match(m);return x?x[1].replace(v,"'"):D}})($u);var Su={};Su.formatDistance=vg;var dg=Ce,fg=Q,ms=ve,og=E,lg=He,Qe=h,mg=or,hg=lr;function vg(r,n,t){const a=(0,fg.getDefaultOptions)(),i=(t==null?void 0:t.locale)??a.locale??dg.defaultLocale,u=2520,c=(0,lg.compareAsc)(r,n);if(isNaN(c))throw new RangeError("Invalid time value");const s=Object.assign({},t,{addSuffix:t==null?void 0:t.addSuffix,comparison:c}),[f,o]=(0,og.normalizeDates)(t==null?void 0:t.in,...c>0?[n,r]:[r,n]),m=(0,hg.differenceInSeconds)(o,f),v=((0,ms.getTimezoneOffsetInMilliseconds)(o)-(0,ms.getTimezoneOffsetInMilliseconds)(f))/1e3,_=Math.round((m-v)/60);let b;if(_<2)return t!=null&&t.includeSeconds?m<5?i.formatDistance("lessThanXSeconds",5,s):m<10?i.formatDistance("lessThanXSeconds",10,s):m<20?i.formatDistance("lessThanXSeconds",20,s):m<40?i.formatDistance("halfAMinute",0,s):m<60?i.formatDistance("lessThanXMinutes",1,s):i.formatDistance("xMinutes",1,s):_===0?i.formatDistance("lessThanXMinutes",1,s):i.formatDistance("xMinutes",_,s);if(_<45)return i.formatDistance("xMinutes",_,s);if(_<90)return i.formatDistance("aboutXHours",1,s);if(_0?[n,r]:[r,n]),o=(0,bg.getRoundingMethod)((t==null?void 0:t.roundingMethod)??"round"),m=f.getTime()-s.getTime(),v=m/je.millisecondsInMinute,_=(0,hs.getTimezoneOffsetInMilliseconds)(f)-(0,hs.getTimezoneOffsetInMilliseconds)(s),b=(m-_)/je.millisecondsInMinute,$=t==null?void 0:t.unit;let D;if($?D=$:v<1?D="second":v<60?D="minute":v{const m=`x${o.replace(/(^.)/,_=>_.toUpperCase())}`,v=r[o];return v!==void 0&&(u||r[o])?f.concat(a.formatDistance(m,v)):f},[]).join(c):""}var Qd={};Qd.formatISO=Ng;var xe=Le,Wg=l;function Ng(r,n){const t=(0,Wg.toDate)(r,n==null?void 0:n.in);if(isNaN(+t))throw new RangeError("Invalid time value");const a=(n==null?void 0:n.format)??"extended",i=(n==null?void 0:n.representation)??"complete";let u="",c="";const s=a==="extended"?"-":"",f=a==="extended"?":":"";if(i!=="time"){const o=(0,xe.addLeadingZeros)(t.getDate(),2),m=(0,xe.addLeadingZeros)(t.getMonth()+1,2);u=`${(0,xe.addLeadingZeros)(t.getFullYear(),4)}${s}${m}${s}${o}`}if(i!=="date"){const o=t.getTimezoneOffset();if(o!==0){const D=Math.abs(o),x=(0,xe.addLeadingZeros)(Math.trunc(D/60),2),M=(0,xe.addLeadingZeros)(D%60,2);c=`${o<0?"+":"-"}${x}:${M}`}else c="Z";const m=(0,xe.addLeadingZeros)(t.getHours(),2),v=(0,xe.addLeadingZeros)(t.getMinutes(),2),_=(0,xe.addLeadingZeros)(t.getSeconds(),2),b=u===""?"":"T",$=[m,v,_].join(f);u=`${u}${b}${$}${c}`}return u}var Rd={};Rd.formatISO9075=Cg;var Re=Le,Fg=_e,Hg=l;function Cg(r,n){const t=(0,Hg.toDate)(r,n==null?void 0:n.in);if(!(0,Fg.isValid)(t))throw new RangeError("Invalid time value");const a=(n==null?void 0:n.format)??"extended",i=(n==null?void 0:n.representation)??"complete";let u="";const c=a==="extended"?"-":"",s=a==="extended"?":":"";if(i!=="time"){const f=(0,Re.addLeadingZeros)(t.getDate(),2),o=(0,Re.addLeadingZeros)(t.getMonth()+1,2);u=`${(0,Re.addLeadingZeros)(t.getFullYear(),4)}${c}${o}${c}${f}`}if(i!=="date"){const f=(0,Re.addLeadingZeros)(t.getHours(),2),o=(0,Re.addLeadingZeros)(t.getMinutes(),2),m=(0,Re.addLeadingZeros)(t.getSeconds(),2);u=`${u}${u===""?"":" "}${f}${s}${o}${s}${m}`}return u}var qd={};qd.formatISODuration=Lg;function Lg(r){const{years:n=0,months:t=0,days:a=0,hours:i=0,minutes:u=0,seconds:c=0}=r;return`P${n}Y${t}M${a}DT${i}H${u}M${c}S`}var Bd={};Bd.formatRFC3339=zg;var Ie=Le,Ag=_e,yg=l;function zg(r,n){const t=(0,yg.toDate)(r,n==null?void 0:n.in);if(!(0,Ag.isValid)(t))throw new RangeError("Invalid time value");const a=(n==null?void 0:n.fractionDigits)??0,i=(0,Ie.addLeadingZeros)(t.getDate(),2),u=(0,Ie.addLeadingZeros)(t.getMonth()+1,2),c=t.getFullYear(),s=(0,Ie.addLeadingZeros)(t.getHours(),2),f=(0,Ie.addLeadingZeros)(t.getMinutes(),2),o=(0,Ie.addLeadingZeros)(t.getSeconds(),2);let m="";if(a>0){const b=t.getMilliseconds(),$=Math.trunc(b*Math.pow(10,a-3));m="."+(0,Ie.addLeadingZeros)($,a)}let v="";const _=t.getTimezoneOffset();if(_!==0){const b=Math.abs(_),$=(0,Ie.addLeadingZeros)(Math.trunc(b/60),2),D=(0,Ie.addLeadingZeros)(b%60,2);v=`${_<0?"+":"-"}${$}:${D}`}else v="Z";return`${c}-${u}-${i}T${s}:${f}:${o}${m}${v}`}var Zd={};Zd.formatRFC7231=Zg;var Dr=Le,Qg=_e,Rg=l;const qg=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Bg=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Zg(r){const n=(0,Rg.toDate)(r);if(!(0,Qg.isValid)(n))throw new RangeError("Invalid time value");const t=qg[n.getUTCDay()],a=(0,Dr.addLeadingZeros)(n.getUTCDate(),2),i=Bg[n.getUTCMonth()],u=n.getUTCFullYear(),c=(0,Dr.addLeadingZeros)(n.getUTCHours(),2),s=(0,Dr.addLeadingZeros)(n.getUTCMinutes(),2),f=(0,Dr.addLeadingZeros)(n.getUTCSeconds(),2);return`${t}, ${a} ${i} ${u} ${c}:${s}:${f} GMT`}var Gd={};Gd.formatRelative=Kg;var Gg=Ce,Vg=Q,Ug=E,Xg=he,Jg=$u;function Kg(r,n,t){var v,_,b,$;const[a,i]=(0,Ug.normalizeDates)(t==null?void 0:t.in,r,n),u=(0,Vg.getDefaultOptions)(),c=(t==null?void 0:t.locale)??u.locale??Gg.defaultLocale,s=(t==null?void 0:t.weekStartsOn)??((_=(v=t==null?void 0:t.locale)==null?void 0:v.options)==null?void 0:_.weekStartsOn)??u.weekStartsOn??(($=(b=u.locale)==null?void 0:b.options)==null?void 0:$.weekStartsOn)??0,f=(0,Xg.differenceInCalendarDays)(a,i);if(isNaN(f))throw new RangeError("Invalid time value");let o;f<-6?o="other":f<-1?o="lastWeek":f<0?o="yesterday":f<1?o="today":f<2?o="tomorrow":f<7?o="nextWeek":o="other";const m=c.formatRelative(o,a,i,{locale:c,weekStartsOn:s});return(0,Jg.format)(a,m,{locale:c,weekStartsOn:s})}var Vd={};Vd.fromUnixTime=pg;var kg=l;function pg(r,n){return(0,kg.toDate)(r*1e3,n==null?void 0:n.in)}var Yu={};Yu.getDate=rb;var eb=l;function rb(r,n){return(0,eb.toDate)(r,n==null?void 0:n.in).getDate()}var _r={};_r.getDay=nb;var tb=l;function nb(r,n){return(0,tb.toDate)(r,n==null?void 0:n.in).getDay()}var Wu={};Wu.getDaysInMonth=ub;var ab=O,ib=l;function ub(r,n){const t=(0,ib.toDate)(r,n==null?void 0:n.in),a=t.getFullYear(),i=t.getMonth(),u=(0,ab.constructFrom)(t,0);return u.setFullYear(a,i+1,0),u.setHours(0,0,0,0),u.getDate()}var Ud={},Nu={};Nu.isLeapYear=sb;var cb=l;function sb(r,n){const a=(0,cb.toDate)(r,n==null?void 0:n.in).getFullYear();return a%400===0||a%4===0&&a%100!==0}Ud.getDaysInYear=ob;var db=Nu,fb=l;function ob(r,n){const t=(0,fb.toDate)(r,n==null?void 0:n.in);return Number.isNaN(+t)?NaN:(0,db.isLeapYear)(t)?366:365}var Xd={};Xd.getDecade=mb;var lb=l;function mb(r,n){const a=(0,lb.toDate)(r,n==null?void 0:n.in).getFullYear();return Math.floor(a/10)*10}var Fu={};Fu.getDefaultOptions=vb;var hb=Q;function vb(){return Object.assign({},(0,hb.getDefaultOptions)())}var Jd={};Jd.getHours=gb;var _b=l;function gb(r,n){return(0,_b.toDate)(r,n==null?void 0:n.in).getHours()}var Hu={};Hu.getISODay=Ob;var bb=l;function Ob(r,n){const t=(0,bb.toDate)(r,n==null?void 0:n.in).getDay();return t===0?7:t}var Kd={};Kd.getISOWeeksInYear=Db;var $b=fr,Mb=h,vs=Ve;function Db(r,n){const t=(0,vs.startOfISOWeekYear)(r,n),i=+(0,vs.startOfISOWeekYear)((0,$b.addWeeks)(t,60))-+t;return Math.round(i/Mb.millisecondsInWeek)}var kd={};kd.getMilliseconds=Pb;var wb=l;function Pb(r){return(0,wb.toDate)(r).getMilliseconds()}var pd={};pd.getMinutes=xb;var jb=l;function xb(r,n){return(0,jb.toDate)(r,n==null?void 0:n.in).getMinutes()}var ef={};ef.getMonth=Tb;var Ib=l;function Tb(r,n){return(0,Ib.toDate)(r,n==null?void 0:n.in).getMonth()}var rf={};rf.getOverlappingDaysInIntervals=Eb;var _s=ve,Sb=h,wr=l;function Eb(r,n){const[t,a]=[+(0,wr.toDate)(r.start),+(0,wr.toDate)(r.end)].sort((v,_)=>v-_),[i,u]=[+(0,wr.toDate)(n.start),+(0,wr.toDate)(n.end)].sort((v,_)=>v-_);if(!(ta?a:u,m=o-(0,_s.getTimezoneOffsetInMilliseconds)(o);return Math.ceil((m-f)/Sb.millisecondsInDay)}var tf={};tf.getSeconds=Wb;var Yb=l;function Wb(r){return(0,Yb.toDate)(r).getSeconds()}var nf={};nf.getTime=Fb;var Nb=l;function Fb(r){return+(0,Nb.toDate)(r)}var af={};af.getUnixTime=Cb;var Hb=l;function Cb(r){return Math.trunc(+(0,Hb.toDate)(r)/1e3)}var uf={};uf.getWeekOfMonth=Rb;var Lb=Q,Ab=Yu,yb=_r,zb=mr,Qb=l;function Rb(r,n){var f,o,m,v;const t=(0,Lb.getDefaultOptions)(),a=(n==null?void 0:n.weekStartsOn)??((o=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:o.weekStartsOn)??t.weekStartsOn??((v=(m=t.locale)==null?void 0:m.options)==null?void 0:v.weekStartsOn)??0,i=(0,Ab.getDate)((0,Qb.toDate)(r,n==null?void 0:n.in));if(isNaN(i))return NaN;const u=(0,yb.getDay)((0,zb.startOfMonth)(r,n));let c=a-u;c<=0&&(c+=7);const s=i-c;return Math.ceil(s/7)+1}var cf={},Cu={};Cu.lastDayOfMonth=qb;var gs=l;function qb(r,n){const t=(0,gs.toDate)(r,n==null?void 0:n.in),a=t.getMonth();return t.setFullYear(t.getFullYear(),a+1,0),t.setHours(0,0,0,0),(0,gs.toDate)(t,n==null?void 0:n.in)}cf.getWeeksInMonth=Ub;var Bb=Nr,Zb=Cu,Gb=mr,Vb=l;function Ub(r,n){const t=(0,Vb.toDate)(r,n==null?void 0:n.in);return(0,Bb.differenceInCalendarWeeks)((0,Zb.lastDayOfMonth)(t,n),(0,Gb.startOfMonth)(t,n),n)+1}var sf={};sf.getYear=Jb;var Xb=l;function Jb(r,n){return(0,Xb.toDate)(r,n==null?void 0:n.in).getFullYear()}var df={};df.hoursToMilliseconds=kb;var Kb=h;function kb(r){return Math.trunc(r*Kb.millisecondsInHour)}var ff={};ff.hoursToMinutes=eO;var pb=h;function eO(r){return Math.trunc(r*pb.minutesInHour)}var of={};of.hoursToSeconds=tO;var rO=h;function tO(r){return Math.trunc(r*rO.secondsInHour)}var lf={};lf.interval=aO;var nO=E;function aO(r,n,t){const[a,i]=(0,nO.normalizeDates)(t==null?void 0:t.in,r,n);if(isNaN(+a))throw new TypeError("Start date is invalid");if(isNaN(+i))throw new TypeError("End date is invalid");if(t!=null&&t.assertPositive&&+a>+i)throw new TypeError("End date must be after start date");return{start:a,end:i}}var mf={};mf.intervalToDuration=lO;var iO=se,Ke=ki,uO=Hr,cO=Cr,sO=Ar,dO=or,fO=lr,oO=_u;function lO(r,n){const{start:t,end:a}=(0,iO.normalizeInterval)(n==null?void 0:n.in,r),i={},u=(0,oO.differenceInYears)(a,t);u&&(i.years=u);const c=(0,Ke.add)(t,{years:i.years}),s=(0,dO.differenceInMonths)(a,c);s&&(i.months=s);const f=(0,Ke.add)(c,{months:i.months}),o=(0,uO.differenceInDays)(a,f);o&&(i.days=o);const m=(0,Ke.add)(f,{days:i.days}),v=(0,cO.differenceInHours)(a,m);v&&(i.hours=v);const _=(0,Ke.add)(m,{hours:i.hours}),b=(0,sO.differenceInMinutes)(a,_);b&&(i.minutes=b);const $=(0,Ke.add)(_,{minutes:i.minutes}),D=(0,fO.differenceInSeconds)(a,$);return D&&(i.seconds=D),i}var hf={};hf.intlFormat=hO;var mO=l;function hO(r,n,t){let a;return vO(n)?a=n:t=n,new Intl.DateTimeFormat(t==null?void 0:t.locale,a).format((0,mO.toDate)(r))}function vO(r){return r!==void 0&&!("locale"in r)}var vf={};vf.intlFormatDistance=gO;var _O=E,Ye=h,Ai=he,bs=Wr,yi=lu,Os=Nr,zi=Fr,$s=Cr,Ms=Ar,Qi=lr;function gO(r,n,t){let a=0,i;const[u,c]=(0,_O.normalizeDates)(t==null?void 0:t.in,r,n);if(t!=null&&t.unit)i=t==null?void 0:t.unit,i==="second"?a=(0,Qi.differenceInSeconds)(u,c):i==="minute"?a=(0,Ms.differenceInMinutes)(u,c):i==="hour"?a=(0,$s.differenceInHours)(u,c):i==="day"?a=(0,Ai.differenceInCalendarDays)(u,c):i==="week"?a=(0,Os.differenceInCalendarWeeks)(u,c):i==="month"?a=(0,bs.differenceInCalendarMonths)(u,c):i==="quarter"?a=(0,yi.differenceInCalendarQuarters)(u,c):i==="year"&&(a=(0,zi.differenceInCalendarYears)(u,c));else{const f=(0,Qi.differenceInSeconds)(u,c);Math.abs(f)+(0,Ds.toDate)(n)}var gf={};gf.isBefore=OO;var ws=l;function OO(r,n){return+(0,ws.toDate)(r)<+(0,ws.toDate)(n)}var bf={};bf.isEqual=$O;var Ps=l;function $O(r,n){return+(0,Ps.toDate)(r)==+(0,Ps.toDate)(n)}var Of={};Of.isExists=MO;function MO(r,n,t){const a=new Date(r,n,t);return a.getFullYear()===r&&a.getMonth()===n&&a.getDate()===t}var $f={};$f.isFirstDayOfMonth=wO;var DO=l;function wO(r,n){return(0,DO.toDate)(r,n==null?void 0:n.in).getDate()===1}var Mf={};Mf.isFriday=jO;var PO=l;function jO(r,n){return(0,PO.toDate)(r,n==null?void 0:n.in).getDay()===5}var Df={};Df.isFuture=IO;var xO=l;function IO(r){return+(0,xO.toDate)(r)>Date.now()}var wf={},Lu={},Te={},Au={};Au.transpose=SO;var TO=O;function SO(r,n){const t=EO(n)?new n(0):(0,TO.constructFrom)(n,0);return t.setFullYear(r.getFullYear(),r.getMonth(),r.getDate()),t.setHours(r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()),t}function EO(r){var n;return typeof r=="function"&&((n=r.prototype)==null?void 0:n.constructor)===r}Te.ValueSetter=Te.Setter=Te.DateTimezoneSetter=void 0;var js=O,YO=Au;const WO=10;class yu{constructor(){g(this,"subPriority",0)}validate(n,t){return!0}}Te.Setter=yu;class NO extends yu{constructor(n,t,a,i,u){super(),this.value=n,this.validateValue=t,this.setValue=a,this.priority=i,u&&(this.subPriority=u)}validate(n,t){return this.validateValue(n,this.value,t)}set(n,t,a){return this.setValue(n,t,this.value,a)}}Te.ValueSetter=NO;class FO extends yu{constructor(t,a){super();g(this,"priority",WO);g(this,"subPriority",-1);this.context=t||(i=>(0,js.constructFrom)(a,i))}set(t,a){return a.timestampIsSet?t:(0,js.constructFrom)(t,(0,YO.transpose)(t,this.context))}}Te.DateTimezoneSetter=FO;var zu={},Qu={},T={};T.Parser=void 0;var HO=Te;class CO{run(n,t,a,i){const u=this.parse(n,t,a,i);return u?{setter:new HO.ValueSetter(u.value,this.validate,this.set,this.priority,this.subPriority),rest:u.rest}:null}validate(n,t,a){return!0}}T.Parser=CO;Qu.EraParser=void 0;var LO=T;class AO extends LO.Parser{constructor(){super(...arguments);g(this,"priority",140);g(this,"incompatibleTokens",["R","u","t","T"])}parse(t,a,i){switch(a){case"G":case"GG":case"GGG":return i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"});case"GGGGG":return i.era(t,{width:"narrow"});case"GGGG":default:return i.era(t,{width:"wide"})||i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"})}}set(t,a,i){return a.era=i,t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}}Qu.EraParser=AO;var Ru={},I={},C={};C.timezonePatterns=C.numericPatterns=void 0;C.numericPatterns={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/};C.timezonePatterns={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};I.dayPeriodEnumToHours=BO;I.isLeapYearIndex=GO;I.mapValue=yO;I.normalizeTwoDigitYear=ZO;I.parseAnyDigitsSigned=QO;I.parseNDigits=RO;I.parseNDigitsSigned=qO;I.parseNumericPattern=k;I.parseTimezonePattern=zO;var Ri=h,le=C;function yO(r,n){return r&&{value:n(r.value),rest:r.rest}}function k(r,n){const t=n.match(r);return t?{value:parseInt(t[0],10),rest:n.slice(t[0].length)}:null}function zO(r,n){const t=n.match(r);if(!t)return null;if(t[0]==="Z")return{value:0,rest:n.slice(1)};const a=t[1]==="+"?1:-1,i=t[2]?parseInt(t[2],10):0,u=t[3]?parseInt(t[3],10):0,c=t[5]?parseInt(t[5],10):0;return{value:a*(i*Ri.millisecondsInHour+u*Ri.millisecondsInMinute+c*Ri.millisecondsInSecond),rest:n.slice(t[0].length)}}function QO(r){return k(le.numericPatterns.anyDigitsSigned,r)}function RO(r,n){switch(r){case 1:return k(le.numericPatterns.singleDigit,n);case 2:return k(le.numericPatterns.twoDigits,n);case 3:return k(le.numericPatterns.threeDigits,n);case 4:return k(le.numericPatterns.fourDigits,n);default:return k(new RegExp("^\\d{1,"+r+"}"),n)}}function qO(r,n){switch(r){case 1:return k(le.numericPatterns.singleDigitSigned,n);case 2:return k(le.numericPatterns.twoDigitsSigned,n);case 3:return k(le.numericPatterns.threeDigitsSigned,n);case 4:return k(le.numericPatterns.fourDigitsSigned,n);default:return k(new RegExp("^-?\\d{1,"+r+"}"),n)}}function BO(r){switch(r){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function ZO(r,n){const t=n>0,a=t?n:1-n;let i;if(a<=50)i=r||100;else{const u=a+50,c=Math.trunc(u/100)*100,s=r>=u%100;i=r+c-(s?100:0)}return t?i:1-i}function GO(r){return r%400===0||r%4===0&&r%100!==0}Ru.YearParser=void 0;var VO=T,qe=I;class UO extends VO.Parser{constructor(){super(...arguments);g(this,"priority",130);g(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(t,a,i){const u=c=>({year:c,isTwoDigitYear:a==="yy"});switch(a){case"y":return(0,qe.mapValue)((0,qe.parseNDigits)(4,t),u);case"yo":return(0,qe.mapValue)(i.ordinalNumber(t,{unit:"year"}),u);default:return(0,qe.mapValue)((0,qe.parseNDigits)(a.length,t),u)}}validate(t,a){return a.isTwoDigitYear||a.year>0}set(t,a,i){const u=t.getFullYear();if(i.isTwoDigitYear){const s=(0,qe.normalizeTwoDigitYear)(i.year,u);return t.setFullYear(s,0,1),t.setHours(0,0,0,0),t}const c=!("era"in a)||a.era===1?i.year:1-i.year;return t.setFullYear(c,0,1),t.setHours(0,0,0,0),t}}Ru.YearParser=UO;var qu={};qu.LocalWeekYearParser=void 0;var XO=hr,xs=ne,JO=T,Be=I;class KO extends JO.Parser{constructor(){super(...arguments);g(this,"priority",130);g(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(t,a,i){const u=c=>({year:c,isTwoDigitYear:a==="YY"});switch(a){case"Y":return(0,Be.mapValue)((0,Be.parseNDigits)(4,t),u);case"Yo":return(0,Be.mapValue)(i.ordinalNumber(t,{unit:"year"}),u);default:return(0,Be.mapValue)((0,Be.parseNDigits)(a.length,t),u)}}validate(t,a){return a.isTwoDigitYear||a.year>0}set(t,a,i,u){const c=(0,XO.getWeekYear)(t,u);if(i.isTwoDigitYear){const f=(0,Be.normalizeTwoDigitYear)(i.year,c);return t.setFullYear(f,0,u.firstWeekContainsDate),t.setHours(0,0,0,0),(0,xs.startOfWeek)(t,u)}const s=!("era"in a)||a.era===1?i.year:1-i.year;return t.setFullYear(s,0,u.firstWeekContainsDate),t.setHours(0,0,0,0),(0,xs.startOfWeek)(t,u)}}qu.LocalWeekYearParser=KO;var Bu={};Bu.ISOWeekYearParser=void 0;var kO=ce,pO=O,e1=T,Is=I;class r1 extends e1.Parser{constructor(){super(...arguments);g(this,"priority",130);g(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(t,a){return a==="R"?(0,Is.parseNDigitsSigned)(4,t):(0,Is.parseNDigitsSigned)(a.length,t)}set(t,a,i){const u=(0,pO.constructFrom)(t,0);return u.setFullYear(i,0,4),u.setHours(0,0,0,0),(0,kO.startOfISOWeek)(u)}}Bu.ISOWeekYearParser=r1;var Zu={};Zu.ExtendedYearParser=void 0;var t1=T,Ts=I;class n1 extends t1.Parser{constructor(){super(...arguments);g(this,"priority",130);g(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(t,a){return a==="u"?(0,Ts.parseNDigitsSigned)(4,t):(0,Ts.parseNDigitsSigned)(a.length,t)}set(t,a,i){return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}}Zu.ExtendedYearParser=n1;var Gu={};Gu.QuarterParser=void 0;var a1=T,i1=I;class u1 extends a1.Parser{constructor(){super(...arguments);g(this,"priority",120);g(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,a,i){switch(a){case"Q":case"QQ":return(0,i1.parseNDigits)(a.length,t);case"Qo":return i.ordinalNumber(t,{unit:"quarter"});case"QQQ":return i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(t,{width:"wide",context:"formatting"})||i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,a){return a>=1&&a<=4}set(t,a,i){return t.setMonth((i-1)*3,1),t.setHours(0,0,0,0),t}}Gu.QuarterParser=u1;var Vu={};Vu.StandAloneQuarterParser=void 0;var c1=T,s1=I;class d1 extends c1.Parser{constructor(){super(...arguments);g(this,"priority",120);g(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,a,i){switch(a){case"q":case"qq":return(0,s1.parseNDigits)(a.length,t);case"qo":return i.ordinalNumber(t,{unit:"quarter"});case"qqq":return i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(t,{width:"wide",context:"standalone"})||i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,a){return a>=1&&a<=4}set(t,a,i){return t.setMonth((i-1)*3,1),t.setHours(0,0,0,0),t}}Vu.StandAloneQuarterParser=d1;var Uu={};Uu.MonthParser=void 0;var f1=C,o1=T,ke=I;class l1 extends o1.Parser{constructor(){super(...arguments);g(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);g(this,"priority",110)}parse(t,a,i){const u=c=>c-1;switch(a){case"M":return(0,ke.mapValue)((0,ke.parseNumericPattern)(f1.numericPatterns.month,t),u);case"MM":return(0,ke.mapValue)((0,ke.parseNDigits)(2,t),u);case"Mo":return(0,ke.mapValue)(i.ordinalNumber(t,{unit:"month"}),u);case"MMM":return i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(t,{width:"wide",context:"formatting"})||i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"})}}validate(t,a){return a>=0&&a<=11}set(t,a,i){return t.setMonth(i,1),t.setHours(0,0,0,0),t}}Uu.MonthParser=l1;var Xu={};Xu.StandAloneMonthParser=void 0;var m1=C,h1=T,pe=I;class v1 extends h1.Parser{constructor(){super(...arguments);g(this,"priority",110);g(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(t,a,i){const u=c=>c-1;switch(a){case"L":return(0,pe.mapValue)((0,pe.parseNumericPattern)(m1.numericPatterns.month,t),u);case"LL":return(0,pe.mapValue)((0,pe.parseNDigits)(2,t),u);case"Lo":return(0,pe.mapValue)(i.ordinalNumber(t,{unit:"month"}),u);case"LLL":return i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(t,{width:"wide",context:"standalone"})||i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"})}}validate(t,a){return a>=0&&a<=11}set(t,a,i){return t.setMonth(i,1),t.setHours(0,0,0,0),t}}Xu.StandAloneMonthParser=v1;var Ju={},Ku={};Ku.setWeek=g1;var _1=Zr,Ss=l;function g1(r,n,t){const a=(0,Ss.toDate)(r,t==null?void 0:t.in),i=(0,_1.getWeek)(a,t)-n;return a.setDate(a.getDate()-i*7),(0,Ss.toDate)(a,t==null?void 0:t.in)}Ju.LocalWeekParser=void 0;var b1=Ku,O1=ne,$1=C,M1=T,Es=I;class D1 extends M1.Parser{constructor(){super(...arguments);g(this,"priority",100);g(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(t,a,i){switch(a){case"w":return(0,Es.parseNumericPattern)($1.numericPatterns.week,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return(0,Es.parseNDigits)(a.length,t)}}validate(t,a){return a>=1&&a<=53}set(t,a,i,u){return(0,O1.startOfWeek)((0,b1.setWeek)(t,i,u),u)}}Ju.LocalWeekParser=D1;var ku={},pu={};pu.setISOWeek=j1;var w1=Br,P1=l;function j1(r,n,t){const a=(0,P1.toDate)(r,t==null?void 0:t.in),i=(0,w1.getISOWeek)(a,t)-n;return a.setDate(a.getDate()-i*7),a}ku.ISOWeekParser=void 0;var x1=pu,I1=ce,T1=C,S1=T,Ys=I;class E1 extends S1.Parser{constructor(){super(...arguments);g(this,"priority",100);g(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(t,a,i){switch(a){case"I":return(0,Ys.parseNumericPattern)(T1.numericPatterns.week,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return(0,Ys.parseNDigits)(a.length,t)}}validate(t,a){return a>=1&&a<=53}set(t,a,i){return(0,I1.startOfISOWeek)((0,x1.setISOWeek)(t,i))}}ku.ISOWeekParser=E1;var ec={};ec.DateParser=void 0;var Y1=C,W1=T,qi=I;const N1=[31,28,31,30,31,30,31,31,30,31,30,31],F1=[31,29,31,30,31,30,31,31,30,31,30,31];class H1 extends W1.Parser{constructor(){super(...arguments);g(this,"priority",90);g(this,"subPriority",1);g(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(t,a,i){switch(a){case"d":return(0,qi.parseNumericPattern)(Y1.numericPatterns.date,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return(0,qi.parseNDigits)(a.length,t)}}validate(t,a){const i=t.getFullYear(),u=(0,qi.isLeapYearIndex)(i),c=t.getMonth();return u?a>=1&&a<=F1[c]:a>=1&&a<=N1[c]}set(t,a,i){return t.setDate(i),t.setHours(0,0,0,0),t}}ec.DateParser=H1;var rc={};rc.DayOfYearParser=void 0;var C1=C,L1=T,Bi=I;class A1 extends L1.Parser{constructor(){super(...arguments);g(this,"priority",90);g(this,"subpriority",1);g(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(t,a,i){switch(a){case"D":case"DD":return(0,Bi.parseNumericPattern)(C1.numericPatterns.dayOfYear,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return(0,Bi.parseNDigits)(a.length,t)}}validate(t,a){const i=t.getFullYear();return(0,Bi.isLeapYearIndex)(i)?a>=1&&a<=366:a>=1&&a<=365}set(t,a,i){return t.setMonth(0,i),t.setHours(0,0,0,0),t}}rc.DayOfYearParser=A1;var tc={},gr={};gr.setDay=R1;var y1=Q,z1=ue,Q1=l;function R1(r,n,t){var v,_,b,$;const a=(0,y1.getDefaultOptions)(),i=(t==null?void 0:t.weekStartsOn)??((_=(v=t==null?void 0:t.locale)==null?void 0:v.options)==null?void 0:_.weekStartsOn)??a.weekStartsOn??(($=(b=a.locale)==null?void 0:b.options)==null?void 0:$.weekStartsOn)??0,u=(0,Q1.toDate)(r,t==null?void 0:t.in),c=u.getDay(),f=(n%7+7)%7,o=7-i,m=n<0||n>6?n-(c+o)%7:(f+o)%7-(c+o)%7;return(0,z1.addDays)(u,m,t)}tc.DayParser=void 0;var q1=gr,B1=T;class Z1 extends B1.Parser{constructor(){super(...arguments);g(this,"priority",90);g(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(t,a,i){switch(a){case"E":case"EE":case"EEE":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}validate(t,a){return a>=0&&a<=6}set(t,a,i,u){return t=(0,q1.setDay)(t,i,u),t.setHours(0,0,0,0),t}}tc.DayParser=Z1;var nc={};nc.LocalDayParser=void 0;var G1=gr,V1=T,Zi=I;class U1 extends V1.Parser{constructor(){super(...arguments);g(this,"priority",90);g(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(t,a,i,u){const c=s=>{const f=Math.floor((s-1)/7)*7;return(s+u.weekStartsOn+6)%7+f};switch(a){case"e":case"ee":return(0,Zi.mapValue)((0,Zi.parseNDigits)(a.length,t),c);case"eo":return(0,Zi.mapValue)(i.ordinalNumber(t,{unit:"day"}),c);case"eee":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeeee":return i.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}validate(t,a){return a>=0&&a<=6}set(t,a,i,u){return t=(0,G1.setDay)(t,i,u),t.setHours(0,0,0,0),t}}nc.LocalDayParser=U1;var ac={};ac.StandAloneLocalDayParser=void 0;var X1=gr,J1=T,Gi=I;class K1 extends J1.Parser{constructor(){super(...arguments);g(this,"priority",90);g(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(t,a,i,u){const c=s=>{const f=Math.floor((s-1)/7)*7;return(s+u.weekStartsOn+6)%7+f};switch(a){case"c":case"cc":return(0,Gi.mapValue)((0,Gi.parseNDigits)(a.length,t),c);case"co":return(0,Gi.mapValue)(i.ordinalNumber(t,{unit:"day"}),c);case"ccc":return i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"ccccc":return i.day(t,{width:"narrow",context:"standalone"});case"cccccc":return i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return i.day(t,{width:"wide",context:"standalone"})||i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"})}}validate(t,a){return a>=0&&a<=6}set(t,a,i,u){return t=(0,X1.setDay)(t,i,u),t.setHours(0,0,0,0),t}}ac.StandAloneLocalDayParser=K1;var ic={},uc={};uc.setISODay=r$;var k1=ue,p1=Hu,e$=l;function r$(r,n,t){const a=(0,e$.toDate)(r,t==null?void 0:t.in),i=(0,p1.getISODay)(a,t),u=n-i;return(0,k1.addDays)(a,u,t)}ic.ISODayParser=void 0;var t$=uc,n$=T,er=I;class a$ extends n$.Parser{constructor(){super(...arguments);g(this,"priority",90);g(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(t,a,i){const u=c=>c===0?7:c;switch(a){case"i":case"ii":return(0,er.parseNDigits)(a.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return(0,er.mapValue)(i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),u);case"iiiii":return(0,er.mapValue)(i.day(t,{width:"narrow",context:"formatting"}),u);case"iiiiii":return(0,er.mapValue)(i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),u);case"iiii":default:return(0,er.mapValue)(i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),u)}}validate(t,a){return a>=1&&a<=7}set(t,a,i){return t=(0,t$.setISODay)(t,i),t.setHours(0,0,0,0),t}}ic.ISODayParser=a$;var cc={};cc.AMPMParser=void 0;var i$=T,u$=I;class c$ extends i$.Parser{constructor(){super(...arguments);g(this,"priority",80);g(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(t,a,i){switch(a){case"a":case"aa":case"aaa":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,a,i){return t.setHours((0,u$.dayPeriodEnumToHours)(i),0,0,0),t}}cc.AMPMParser=c$;var sc={};sc.AMPMMidnightParser=void 0;var s$=T,d$=I;class f$ extends s$.Parser{constructor(){super(...arguments);g(this,"priority",80);g(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(t,a,i){switch(a){case"b":case"bb":case"bbb":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,a,i){return t.setHours((0,d$.dayPeriodEnumToHours)(i),0,0,0),t}}sc.AMPMMidnightParser=f$;var dc={};dc.DayPeriodParser=void 0;var o$=T,l$=I;class m$ extends o$.Parser{constructor(){super(...arguments);g(this,"priority",80);g(this,"incompatibleTokens",["a","b","t","T"])}parse(t,a,i){switch(a){case"B":case"BB":case"BBB":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,a,i){return t.setHours((0,l$.dayPeriodEnumToHours)(i),0,0,0),t}}dc.DayPeriodParser=m$;var fc={};fc.Hour1to12Parser=void 0;var h$=C,v$=T,Ws=I;class _$ extends v$.Parser{constructor(){super(...arguments);g(this,"priority",70);g(this,"incompatibleTokens",["H","K","k","t","T"])}parse(t,a,i){switch(a){case"h":return(0,Ws.parseNumericPattern)(h$.numericPatterns.hour12h,t);case"ho":return i.ordinalNumber(t,{unit:"hour"});default:return(0,Ws.parseNDigits)(a.length,t)}}validate(t,a){return a>=1&&a<=12}set(t,a,i){const u=t.getHours()>=12;return u&&i<12?t.setHours(i+12,0,0,0):!u&&i===12?t.setHours(0,0,0,0):t.setHours(i,0,0,0),t}}fc.Hour1to12Parser=_$;var oc={};oc.Hour0to23Parser=void 0;var g$=C,b$=T,Ns=I;class O$ extends b$.Parser{constructor(){super(...arguments);g(this,"priority",70);g(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(t,a,i){switch(a){case"H":return(0,Ns.parseNumericPattern)(g$.numericPatterns.hour23h,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return(0,Ns.parseNDigits)(a.length,t)}}validate(t,a){return a>=0&&a<=23}set(t,a,i){return t.setHours(i,0,0,0),t}}oc.Hour0to23Parser=O$;var lc={};lc.Hour0To11Parser=void 0;var $$=C,M$=T,Fs=I;class D$ extends M$.Parser{constructor(){super(...arguments);g(this,"priority",70);g(this,"incompatibleTokens",["h","H","k","t","T"])}parse(t,a,i){switch(a){case"K":return(0,Fs.parseNumericPattern)($$.numericPatterns.hour11h,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return(0,Fs.parseNDigits)(a.length,t)}}validate(t,a){return a>=0&&a<=11}set(t,a,i){return t.getHours()>=12&&i<12?t.setHours(i+12,0,0,0):t.setHours(i,0,0,0),t}}lc.Hour0To11Parser=D$;var mc={};mc.Hour1To24Parser=void 0;var w$=C,P$=T,Hs=I;class j$ extends P$.Parser{constructor(){super(...arguments);g(this,"priority",70);g(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(t,a,i){switch(a){case"k":return(0,Hs.parseNumericPattern)(w$.numericPatterns.hour24h,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return(0,Hs.parseNDigits)(a.length,t)}}validate(t,a){return a>=1&&a<=24}set(t,a,i){const u=i<=24?i%24:i;return t.setHours(u,0,0,0),t}}mc.Hour1To24Parser=j$;var hc={};hc.MinuteParser=void 0;var x$=C,I$=T,Cs=I;class T$ extends I$.Parser{constructor(){super(...arguments);g(this,"priority",60);g(this,"incompatibleTokens",["t","T"])}parse(t,a,i){switch(a){case"m":return(0,Cs.parseNumericPattern)(x$.numericPatterns.minute,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return(0,Cs.parseNDigits)(a.length,t)}}validate(t,a){return a>=0&&a<=59}set(t,a,i){return t.setMinutes(i,0,0),t}}hc.MinuteParser=T$;var vc={};vc.SecondParser=void 0;var S$=C,E$=T,Ls=I;class Y$ extends E$.Parser{constructor(){super(...arguments);g(this,"priority",50);g(this,"incompatibleTokens",["t","T"])}parse(t,a,i){switch(a){case"s":return(0,Ls.parseNumericPattern)(S$.numericPatterns.second,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return(0,Ls.parseNDigits)(a.length,t)}}validate(t,a){return a>=0&&a<=59}set(t,a,i){return t.setSeconds(i,0),t}}vc.SecondParser=Y$;var _c={};_c.FractionOfSecondParser=void 0;var W$=T,As=I;class N$ extends W$.Parser{constructor(){super(...arguments);g(this,"priority",30);g(this,"incompatibleTokens",["t","T"])}parse(t,a){const i=u=>Math.trunc(u*Math.pow(10,-a.length+3));return(0,As.mapValue)((0,As.parseNDigits)(a.length,t),i)}set(t,a,i){return t.setMilliseconds(i),t}}_c.FractionOfSecondParser=N$;var gc={};gc.ISOTimezoneWithZParser=void 0;var F$=O,H$=ve,rr=C,C$=T,tr=I;class L$ extends C$.Parser{constructor(){super(...arguments);g(this,"priority",10);g(this,"incompatibleTokens",["t","T","x"])}parse(t,a){switch(a){case"X":return(0,tr.parseTimezonePattern)(rr.timezonePatterns.basicOptionalMinutes,t);case"XX":return(0,tr.parseTimezonePattern)(rr.timezonePatterns.basic,t);case"XXXX":return(0,tr.parseTimezonePattern)(rr.timezonePatterns.basicOptionalSeconds,t);case"XXXXX":return(0,tr.parseTimezonePattern)(rr.timezonePatterns.extendedOptionalSeconds,t);case"XXX":default:return(0,tr.parseTimezonePattern)(rr.timezonePatterns.extended,t)}}set(t,a,i){return a.timestampIsSet?t:(0,F$.constructFrom)(t,t.getTime()-(0,H$.getTimezoneOffsetInMilliseconds)(t)-i)}}gc.ISOTimezoneWithZParser=L$;var bc={};bc.ISOTimezoneParser=void 0;var A$=O,y$=ve,nr=C,z$=T,ar=I;class Q$ extends z$.Parser{constructor(){super(...arguments);g(this,"priority",10);g(this,"incompatibleTokens",["t","T","X"])}parse(t,a){switch(a){case"x":return(0,ar.parseTimezonePattern)(nr.timezonePatterns.basicOptionalMinutes,t);case"xx":return(0,ar.parseTimezonePattern)(nr.timezonePatterns.basic,t);case"xxxx":return(0,ar.parseTimezonePattern)(nr.timezonePatterns.basicOptionalSeconds,t);case"xxxxx":return(0,ar.parseTimezonePattern)(nr.timezonePatterns.extendedOptionalSeconds,t);case"xxx":default:return(0,ar.parseTimezonePattern)(nr.timezonePatterns.extended,t)}}set(t,a,i){return a.timestampIsSet?t:(0,A$.constructFrom)(t,t.getTime()-(0,y$.getTimezoneOffsetInMilliseconds)(t)-i)}}bc.ISOTimezoneParser=Q$;var Oc={};Oc.TimestampSecondsParser=void 0;var R$=O,q$=T,B$=I;class Z$ extends q$.Parser{constructor(){super(...arguments);g(this,"priority",40);g(this,"incompatibleTokens","*")}parse(t){return(0,B$.parseAnyDigitsSigned)(t)}set(t,a,i){return[(0,R$.constructFrom)(t,i*1e3),{timestampIsSet:!0}]}}Oc.TimestampSecondsParser=Z$;var $c={};$c.TimestampMillisecondsParser=void 0;var G$=O,V$=T,U$=I;class X$ extends V$.Parser{constructor(){super(...arguments);g(this,"priority",20);g(this,"incompatibleTokens","*")}parse(t){return(0,U$.parseAnyDigitsSigned)(t)}set(t,a,i){return[(0,G$.constructFrom)(t,i),{timestampIsSet:!0}]}}$c.TimestampMillisecondsParser=X$;zu.parsers=void 0;var J$=Qu,K$=Ru,k$=qu,p$=Bu,eM=Zu,rM=Gu,tM=Vu,nM=Uu,aM=Xu,iM=Ju,uM=ku,cM=ec,sM=rc,dM=tc,fM=nc,oM=ac,lM=ic,mM=cc,hM=sc,vM=dc,_M=fc,gM=oc,bM=lc,OM=mc,$M=hc,MM=vc,DM=_c,wM=gc,PM=bc,jM=Oc,xM=$c;zu.parsers={G:new J$.EraParser,y:new K$.YearParser,Y:new k$.LocalWeekYearParser,R:new p$.ISOWeekYearParser,u:new eM.ExtendedYearParser,Q:new rM.QuarterParser,q:new tM.StandAloneQuarterParser,M:new nM.MonthParser,L:new aM.StandAloneMonthParser,w:new iM.LocalWeekParser,I:new uM.ISOWeekParser,d:new cM.DateParser,D:new sM.DayOfYearParser,E:new dM.DayParser,e:new fM.LocalDayParser,c:new oM.StandAloneLocalDayParser,i:new lM.ISODayParser,a:new mM.AMPMParser,b:new hM.AMPMMidnightParser,B:new vM.DayPeriodParser,h:new _M.Hour1to12Parser,H:new gM.Hour0to23Parser,K:new bM.Hour0To11Parser,k:new OM.Hour1To24Parser,m:new $M.MinuteParser,s:new MM.SecondParser,S:new DM.FractionOfSecondParser,X:new wM.ISOTimezoneWithZParser,x:new PM.ISOTimezoneParser,t:new jM.TimestampSecondsParser,T:new xM.TimestampMillisecondsParser};(function(r){Object.defineProperty(r,"longFormatters",{enumerable:!0,get:function(){return t.longFormatters}}),r.parse=D,Object.defineProperty(r,"parsers",{enumerable:!0,get:function(){return f.parsers}});var n=Ce,t=Ur,a=vr,i=O,u=Fu,c=l,s=Te,f=zu;const o=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,m=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,v=/^'([^]*?)'?$/,_=/''/g,b=/\S/,$=/[a-zA-Z]/;function D(M,F,A,j){var W,Y,J,$e,Me,de,fe,De;const Z=()=>(0,i.constructFrom)((j==null?void 0:j.in)||A,NaN),B=(0,u.getDefaultOptions)(),y=(j==null?void 0:j.locale)??B.locale??n.defaultLocale,ae=(j==null?void 0:j.firstWeekContainsDate)??((Y=(W=j==null?void 0:j.locale)==null?void 0:W.options)==null?void 0:Y.firstWeekContainsDate)??B.firstWeekContainsDate??(($e=(J=B.locale)==null?void 0:J.options)==null?void 0:$e.firstWeekContainsDate)??1,ie=(j==null?void 0:j.weekStartsOn)??((de=(Me=j==null?void 0:j.locale)==null?void 0:Me.options)==null?void 0:de.weekStartsOn)??B.weekStartsOn??((De=(fe=B.locale)==null?void 0:fe.options)==null?void 0:De.weekStartsOn)??0;if(!F)return M?Z():(0,c.toDate)(A,j==null?void 0:j.in);const U={firstWeekContainsDate:ae,weekStartsOn:ie,locale:y},G=[new s.DateTimezoneSetter(j==null?void 0:j.in,A)],R=F.match(m).map(w=>{const P=w[0];if(P in t.longFormatters){const S=t.longFormatters[P];return S(w,y.formatLong)}return w}).join("").match(o),V=[];for(let w of R){!(j!=null&&j.useAdditionalWeekYearTokens)&&(0,a.isProtectedWeekYearToken)(w)&&(0,a.warnOrThrowProtectedError)(w,F,M),!(j!=null&&j.useAdditionalDayOfYearTokens)&&(0,a.isProtectedDayOfYearToken)(w)&&(0,a.warnOrThrowProtectedError)(w,F,M);const P=w[0],S=f.parsers[P];if(S){const{incompatibleTokens:ee}=S;if(Array.isArray(ee)){const oe=V.find(Ae=>ee.includes(Ae.token)||Ae.token===P);if(oe)throw new RangeError(`The format string mustn't contain \`${oe.fullToken}\` and \`${w}\` at the same time`)}else if(S.incompatibleTokens==="*"&&V.length>0)throw new RangeError(`The format string mustn't contain \`${w}\` and any other token at the same time`);V.push({token:P,fullToken:w});const K=S.run(M,w,y.match,U);if(!K)return Z();G.push(K.setter),M=K.rest}else{if(P.match($))throw new RangeError("Format string contains an unescaped latin alphabet character `"+P+"`");if(w==="''"?w="'":P==="'"&&(w=x(w)),M.indexOf(w)===0)M=M.slice(w.length);else return Z()}}if(M.length>0&&b.test(M))return Z();const X=G.map(w=>w.priority).sort((w,P)=>P-w).filter((w,P,S)=>S.indexOf(w)===P).map(w=>G.filter(P=>P.priority===w).sort((P,S)=>S.subPriority-P.subPriority)).map(w=>w[0]);let q=(0,c.toDate)(A,j==null?void 0:j.in);if(isNaN(+q))return Z();const p={};for(const w of X){if(!w.validate(q,U))return Z();const P=w.set(q,p,U);Array.isArray(P)?(q=P[0],Object.assign(p,P[1])):q=P}return q}function x(M){return M.match(v)[1].replace(_,"'")}})(Lu);wf.isMatch=SM;var IM=_e,TM=Lu;function SM(r,n,t){return(0,IM.isValid)((0,TM.parse)(r,n,new Date,t))}var Pf={};Pf.isMonday=YM;var EM=l;function YM(r,n){return(0,EM.toDate)(r,n==null?void 0:n.in).getDay()===1}var jf={};jf.isPast=NM;var WM=l;function NM(r){return+(0,WM.toDate)(r)c-s);return a>=i&&a<=u}var Qf={},br={};br.subDays=UD;var VD=ue;function UD(r,n,t){return(0,VD.addDays)(r,-n,t)}Qf.isYesterday=pD;var XD=O,JD=L,KD=Ue,kD=br;function pD(r,n){return(0,KD.isSameDay)((0,XD.constructFrom)((n==null?void 0:n.in)||r,r),(0,kD.subDays)((0,JD.constructNow)((n==null?void 0:n.in)||r),1))}var Rf={};Rf.lastDayOfDecade=ew;var Zs=l;function ew(r,n){const t=(0,Zs.toDate)(r,n==null?void 0:n.in),a=t.getFullYear(),i=9+Math.floor(a/10)*10;return t.setFullYear(i+1,0,0),t.setHours(0,0,0,0),(0,Zs.toDate)(t,n==null?void 0:n.in)}var qf={},Yc={};Yc.lastDayOfWeek=nw;var rw=Q,tw=l;function nw(r,n){var s,f,o,m;const t=(0,rw.getDefaultOptions)(),a=(n==null?void 0:n.weekStartsOn)??((f=(s=n==null?void 0:n.locale)==null?void 0:s.options)==null?void 0:f.weekStartsOn)??t.weekStartsOn??((m=(o=t.locale)==null?void 0:o.options)==null?void 0:m.weekStartsOn)??0,i=(0,tw.toDate)(r,n==null?void 0:n.in),u=i.getDay(),c=(u{if(D==="''")return"'";const x=D[0];if(x==="'")return o(D);const M=n.lightFormatters[x];if(M)return M(_,D);if(x.match(s))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");return D}).join(""):""}function o(m){const v=m.match(u);return v?v[1].replace(c,"'"):m}})(Vf);var Uf={};Uf.milliseconds=hw;var Gs=h;function hw({years:r,months:n,weeks:t,days:a,hours:i,minutes:u,seconds:c}){let s=0;r&&(s+=r*Gs.daysInYear),n&&(s+=n*(Gs.daysInYear/12)),t&&(s+=t*7),a&&(s+=a);let f=s*24*60*60;return i&&(f+=i*60*60),u&&(f+=u*60),c&&(f+=c),Math.trunc(f*1e3)}var Xf={};Xf.millisecondsToHours=_w;var vw=h;function _w(r){const n=r/vw.millisecondsInHour;return Math.trunc(n)}var Jf={};Jf.millisecondsToMinutes=bw;var gw=h;function bw(r){const n=r/gw.millisecondsInMinute;return Math.trunc(n)}var Kf={};Kf.millisecondsToSeconds=$w;var Ow=h;function $w(r){const n=r/Ow.millisecondsInSecond;return Math.trunc(n)}var kf={};kf.minutesToHours=Dw;var Mw=h;function Dw(r){const n=r/Mw.minutesInHour;return Math.trunc(n)}var pf={};pf.minutesToMilliseconds=Pw;var ww=h;function Pw(r){return Math.trunc(r*ww.millisecondsInMinute)}var eo={};eo.minutesToSeconds=xw;var jw=h;function xw(r){return Math.trunc(r*jw.secondsInMinute)}var ro={};ro.monthsToQuarters=Tw;var Iw=h;function Tw(r){const n=r/Iw.monthsInQuarter;return Math.trunc(n)}var to={};to.monthsToYears=Ew;var Sw=h;function Ew(r){const n=r/Sw.monthsInYear;return Math.trunc(n)}var be={};be.nextDay=Nw;var Yw=ue,Ww=_r;function Nw(r,n,t){let a=n-(0,Ww.getDay)(r,t);return a<=0&&(a+=7),(0,Yw.addDays)(r,a,t)}var no={};no.nextFriday=Hw;var Fw=be;function Hw(r,n){return(0,Fw.nextDay)(r,5,n)}var ao={};ao.nextMonday=Lw;var Cw=be;function Lw(r,n){return(0,Cw.nextDay)(r,1,n)}var io={};io.nextSaturday=yw;var Aw=be;function yw(r,n){return(0,Aw.nextDay)(r,6,n)}var uo={};uo.nextSunday=Qw;var zw=be;function Qw(r,n){return(0,zw.nextDay)(r,0,n)}var co={};co.nextThursday=qw;var Rw=be;function qw(r,n){return(0,Rw.nextDay)(r,4,n)}var so={};so.nextTuesday=Zw;var Bw=be;function Zw(r,n){return(0,Bw.nextDay)(r,2,n)}var fo={};fo.nextWednesday=Vw;var Gw=be;function Vw(r,n){return(0,Gw.nextDay)(r,3,n)}var oo={};oo.parseISO=Xw;var jr=h,Uw=O,Vs=l;function Xw(r,n){const t=()=>(0,Uw.constructFrom)(n==null?void 0:n.in,NaN),a=(n==null?void 0:n.additionalDigits)??2,i=pw(r);let u;if(i.date){const o=eP(i.date,a);u=rP(o.restDateString,o.year)}if(!u||isNaN(+u))return t();const c=+u;let s=0,f;if(i.time&&(s=tP(i.time),isNaN(s)))return t();if(i.timezone){if(f=nP(i.timezone),isNaN(f))return t()}else{const o=new Date(c+s),m=(0,Vs.toDate)(0,n==null?void 0:n.in);return m.setFullYear(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()),m.setHours(o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds()),m}return(0,Vs.toDate)(c+s+f,n==null?void 0:n.in)}const Pr={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Jw=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Kw=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,kw=/^([+-])(\d{2})(?::?(\d{2}))?$/;function pw(r){const n={},t=r.split(Pr.dateTimeDelimiter);let a;if(t.length>2)return n;if(/:/.test(t[0])?a=t[0]:(n.date=t[0],a=t[1],Pr.timeZoneDelimiter.test(n.date)&&(n.date=r.split(Pr.timeZoneDelimiter)[0],a=r.substr(n.date.length,r.length))),a){const i=Pr.timezone.exec(a);i?(n.time=a.replace(i[1],""),n.timezone=i[1]):n.time=a}return n}function eP(r,n){const t=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+n)+"})|(\\d{2}|[+-]\\d{"+(2+n)+"})$)"),a=r.match(t);if(!a)return{year:NaN,restDateString:""};const i=a[1]?parseInt(a[1]):null,u=a[2]?parseInt(a[2]):null;return{year:u===null?i:u*100,restDateString:r.slice((a[1]||a[2]).length)}}function rP(r,n){if(n===null)return new Date(NaN);const t=r.match(Jw);if(!t)return new Date(NaN);const a=!!t[4],i=ir(t[1]),u=ir(t[2])-1,c=ir(t[3]),s=ir(t[4]),f=ir(t[5])-1;if(a)return sP(n,s,f)?aP(n,s,f):new Date(NaN);{const o=new Date(0);return!uP(n,u,c)||!cP(n,i)?new Date(NaN):(o.setUTCFullYear(n,u,Math.max(i,c)),o)}}function ir(r){return r?parseInt(r):1}function tP(r){const n=r.match(Kw);if(!n)return NaN;const t=Ui(n[1]),a=Ui(n[2]),i=Ui(n[3]);return dP(t,a,i)?t*jr.millisecondsInHour+a*jr.millisecondsInMinute+i*1e3:NaN}function Ui(r){return r&&parseFloat(r.replace(",","."))||0}function nP(r){if(r==="Z")return 0;const n=r.match(kw);if(!n)return 0;const t=n[1]==="+"?-1:1,a=parseInt(n[2]),i=n[3]&&parseInt(n[3])||0;return fP(a,i)?t*(a*jr.millisecondsInHour+i*jr.millisecondsInMinute):NaN}function aP(r,n,t){const a=new Date(0);a.setUTCFullYear(r,0,4);const i=a.getUTCDay()||7,u=(n-1)*7+t+1-i;return a.setUTCDate(a.getUTCDate()+u),a}const iP=[31,null,31,30,31,30,31,31,30,31,30,31];function lo(r){return r%400===0||r%4===0&&r%100!==0}function uP(r,n,t){return n>=0&&n<=11&&t>=1&&t<=(iP[n]||(lo(r)?29:28))}function cP(r,n){return n>=1&&n<=(lo(r)?366:365)}function sP(r,n,t){return n>=1&&n<=53&&t>=0&&t<=6}function dP(r,n,t){return r===24?n===0&&t===0:t>=0&&t<60&&n>=0&&n<60&&r>=0&&r<25}function fP(r,n){return n>=0&&n<=59}var mo={};mo.parseJSON=oP;var Us=l;function oP(r,n){const t=r.match(/(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2}):(\d{2})(?:\.(\d{0,7}))?(?:Z|(.)(\d{2}):?(\d{2})?)?/);return t?(0,Us.toDate)(Date.UTC(+t[1],+t[2]-1,+t[3],+t[4]-(+t[9]||0)*(t[8]=="-"?-1:1),+t[5]-(+t[10]||0)*(t[8]=="-"?-1:1),+t[6],+((t[7]||"0")+"00").substring(0,3)),n==null?void 0:n.in):(0,Us.toDate)(NaN,n==null?void 0:n.in)}var Oe={};Oe.previousDay=hP;var lP=_r,mP=br;function hP(r,n,t){let a=(0,lP.getDay)(r,t)-n;return a<=0&&(a+=7),(0,mP.subDays)(r,a,t)}var ho={};ho.previousFriday=_P;var vP=Oe;function _P(r,n){return(0,vP.previousDay)(r,5,n)}var vo={};vo.previousMonday=bP;var gP=Oe;function bP(r,n){return(0,gP.previousDay)(r,1,n)}var _o={};_o.previousSaturday=$P;var OP=Oe;function $P(r,n){return(0,OP.previousDay)(r,6,n)}var go={};go.previousSunday=DP;var MP=Oe;function DP(r,n){return(0,MP.previousDay)(r,0,n)}var bo={};bo.previousThursday=PP;var wP=Oe;function PP(r,n){return(0,wP.previousDay)(r,4,n)}var Oo={};Oo.previousTuesday=xP;var jP=Oe;function xP(r,n){return(0,jP.previousDay)(r,2,n)}var $o={};$o.previousWednesday=TP;var IP=Oe;function TP(r,n){return(0,IP.previousDay)(r,3,n)}var Mo={};Mo.quartersToMonths=EP;var SP=h;function EP(r){return Math.trunc(r*SP.monthsInQuarter)}var Do={};Do.quartersToYears=WP;var YP=h;function WP(r){const n=r/YP.quartersInYear;return Math.trunc(n)}var wo={};wo.roundToNearestHours=CP;var NP=ge,FP=O,HP=l;function CP(r,n){const t=(n==null?void 0:n.nearestTo)??1;if(t<1||t>12)return(0,FP.constructFrom)((n==null?void 0:n.in)||r,NaN);const a=(0,HP.toDate)(r,n==null?void 0:n.in),i=a.getMinutes()/60,u=a.getSeconds()/60/60,c=a.getMilliseconds()/1e3/60/60,s=a.getHours()+i+u+c,f=(n==null?void 0:n.roundingMethod)??"round",m=(0,NP.getRoundingMethod)(f)(s/t)*t;return a.setHours(m,0,0,0),a}var Po={};Po.roundToNearestMinutes=zP;var LP=ge,AP=O,yP=l;function zP(r,n){const t=(n==null?void 0:n.nearestTo)??1;if(t<1||t>30)return(0,AP.constructFrom)(r,NaN);const a=(0,yP.toDate)(r,n==null?void 0:n.in),i=a.getSeconds()/60,u=a.getMilliseconds()/1e3/60,c=a.getMinutes()+i+u,s=(n==null?void 0:n.roundingMethod)??"round",o=(0,LP.getRoundingMethod)(s)(c/t)*t;return a.setMinutes(o,0,0),a}var jo={};jo.secondsToHours=RP;var QP=h;function RP(r){const n=r/QP.secondsInHour;return Math.trunc(n)}var xo={};xo.secondsToMilliseconds=BP;var qP=h;function BP(r){return r*qP.millisecondsInSecond}var Io={};Io.secondsToMinutes=GP;var ZP=h;function GP(r){const n=r/ZP.secondsInMinute;return Math.trunc(n)}var To={},Jr={};Jr.setMonth=JP;var VP=O,UP=Wu,XP=l;function JP(r,n,t){const a=(0,XP.toDate)(r,t==null?void 0:t.in),i=a.getFullYear(),u=a.getDate(),c=(0,VP.constructFrom)((t==null?void 0:t.in)||r,0);c.setFullYear(i,n,15),c.setHours(0,0,0,0);const s=(0,UP.getDaysInMonth)(c);return a.setMonth(n,Math.min(u,s)),a}To.set=ej;var KP=O,kP=Jr,pP=l;function ej(r,n,t){let a=(0,pP.toDate)(r,t==null?void 0:t.in);return isNaN(+a)?(0,KP.constructFrom)((t==null?void 0:t.in)||r,NaN):(n.year!=null&&a.setFullYear(n.year),n.month!=null&&(a=(0,kP.setMonth)(a,n.month)),n.date!=null&&a.setDate(n.date),n.hours!=null&&a.setHours(n.hours),n.minutes!=null&&a.setMinutes(n.minutes),n.seconds!=null&&a.setSeconds(n.seconds),n.milliseconds!=null&&a.setMilliseconds(n.milliseconds),a)}var So={};So.setDate=tj;var rj=l;function tj(r,n,t){const a=(0,rj.toDate)(r,t==null?void 0:t.in);return a.setDate(n),a}var Eo={};Eo.setDayOfYear=aj;var nj=l;function aj(r,n,t){const a=(0,nj.toDate)(r,t==null?void 0:t.in);return a.setMonth(0),a.setDate(n),a}var Yo={};Yo.setDefaultOptions=ij;var Xs=Q;function ij(r){const n={},t=(0,Xs.getDefaultOptions)();for(const a in t)Object.prototype.hasOwnProperty.call(t,a)&&(n[a]=t[a]);for(const a in r)Object.prototype.hasOwnProperty.call(r,a)&&(r[a]===void 0?delete n[a]:n[a]=r[a]);(0,Xs.setDefaultOptions)(n)}var Wo={};Wo.setHours=cj;var uj=l;function cj(r,n,t){const a=(0,uj.toDate)(r,t==null?void 0:t.in);return a.setHours(n),a}var No={};No.setMilliseconds=dj;var sj=l;function dj(r,n,t){const a=(0,sj.toDate)(r,t==null?void 0:t.in);return a.setMilliseconds(n),a}var Fo={};Fo.setMinutes=oj;var fj=l;function oj(r,n,t){const a=(0,fj.toDate)(r,t==null?void 0:t.in);return a.setMinutes(n),a}var Ho={};Ho.setQuarter=hj;var lj=Jr,mj=l;function hj(r,n,t){const a=(0,mj.toDate)(r,t==null?void 0:t.in),i=Math.trunc(a.getMonth()/3)+1,u=n-i;return(0,lj.setMonth)(a,a.getMonth()+u*3)}var Co={};Co.setSeconds=_j;var vj=l;function _j(r,n,t){const a=(0,vj.toDate)(r,t==null?void 0:t.in);return a.setSeconds(n),a}var Lo={};Lo.setWeekYear=Mj;var gj=Q,bj=O,Oj=he,Js=Gr,$j=l;function Mj(r,n,t){var f,o,m,v;const a=(0,gj.getDefaultOptions)(),i=(t==null?void 0:t.firstWeekContainsDate)??((o=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:o.firstWeekContainsDate)??a.firstWeekContainsDate??((v=(m=a.locale)==null?void 0:m.options)==null?void 0:v.firstWeekContainsDate)??1,u=(0,Oj.differenceInCalendarDays)((0,$j.toDate)(r,t==null?void 0:t.in),(0,Js.startOfWeekYear)(r,t),t),c=(0,bj.constructFrom)((t==null?void 0:t.in)||r,0);c.setFullYear(n,0,i),c.setHours(0,0,0,0);const s=(0,Js.startOfWeekYear)(c,t);return s.setDate(s.getDate()+u),s}var Ao={};Ao.setYear=Pj;var Dj=O,wj=l;function Pj(r,n,t){const a=(0,wj.toDate)(r,t==null?void 0:t.in);return isNaN(+a)?(0,Dj.constructFrom)((t==null?void 0:t.in)||r,NaN):(a.setFullYear(n),a)}var yo={};yo.startOfDecade=xj;var jj=l;function xj(r,n){const t=(0,jj.toDate)(r,n==null?void 0:n.in),a=t.getFullYear(),i=Math.floor(a/10)*10;return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}var zo={};zo.startOfToday=Tj;var Ij=dr;function Tj(r){return(0,Ij.startOfDay)(Date.now(),r)}var Qo={};Qo.startOfTomorrow=Yj;var Sj=O,Ej=L;function Yj(r){const n=(0,Ej.constructNow)(r==null?void 0:r.in),t=n.getFullYear(),a=n.getMonth(),i=n.getDate(),u=(0,Sj.constructFrom)(r==null?void 0:r.in,0);return u.setFullYear(t,a,i+1),u.setHours(0,0,0,0),u}var Ro={};Ro.startOfYesterday=Wj;var Ks=L;function Wj(r){const n=(0,Ks.constructNow)(r==null?void 0:r.in),t=n.getFullYear(),a=n.getMonth(),i=n.getDate(),u=(0,Ks.constructNow)(r==null?void 0:r.in);return u.setFullYear(t,a,i-1),u.setHours(0,0,0,0),u}var qo={},Wc={};Wc.subMonths=Fj;var Nj=Ge;function Fj(r,n,t){return(0,Nj.addMonths)(r,-n,t)}qo.sub=Aj;var Hj=O,Cj=br,Lj=Wc;function Aj(r,n,t){const{years:a=0,months:i=0,weeks:u=0,days:c=0,hours:s=0,minutes:f=0,seconds:o=0}=n,m=(0,Lj.subMonths)(r,i+a*12,t),v=(0,Cj.subDays)(m,c+u*7,t),_=f+s*60,$=(o+_*60)*1e3;return(0,Hj.constructFrom)((t==null?void 0:t.in)||r,+v-$)}var Bo={};Bo.subBusinessDays=zj;var yj=pi;function zj(r,n,t){return(0,yj.addBusinessDays)(r,-n,t)}var Zo={};Zo.subHours=Rj;var Qj=tu;function Rj(r,n,t){return(0,Qj.addHours)(r,-n,t)}var Go={};Go.subMilliseconds=Bj;var qj=sr;function Bj(r,n,t){return(0,qj.addMilliseconds)(r,-n,t)}var Vo={};Vo.subMinutes=Gj;var Zj=Er;function Gj(r,n,t){return(0,Zj.addMinutes)(r,-n,t)}var Uo={};Uo.subQuarters=Uj;var Vj=Yr;function Uj(r,n,t){return(0,Vj.addQuarters)(r,-n,t)}var Xo={};Xo.subSeconds=Jj;var Xj=iu;function Jj(r,n,t){return(0,Xj.addSeconds)(r,-n,t)}var Jo={};Jo.subWeeks=kj;var Kj=fr;function kj(r,n,t){return(0,Kj.addWeeks)(r,-n,t)}var Ko={};Ko.subYears=ex;var pj=uu;function ex(r,n,t){return(0,pj.addYears)(r,-n,t)}var ko={};ko.weeksToDays=tx;var rx=h;function tx(r){return Math.trunc(r*rx.daysInWeek)}var po={};po.yearsToDays=ax;var nx=h;function ax(r){return Math.trunc(r*nx.daysInYear)}var el={};el.yearsToMonths=ux;var ix=h;function ux(r){return Math.trunc(r*ix.monthsInYear)}var rl={};rl.yearsToQuarters=sx;var cx=h;function sx(r){return Math.trunc(r*cx.quartersInYear)}(function(r){var n=ki;Object.keys(n).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===n[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return n[e]}})});var t=pi;Object.keys(t).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===t[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return t[e]}})});var a=ue;Object.keys(a).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===a[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return a[e]}})});var i=tu;Object.keys(i).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===i[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return i[e]}})});var u=nu;Object.keys(u).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===u[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return u[e]}})});var c=sr;Object.keys(c).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===c[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return c[e]}})});var s=Er;Object.keys(s).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===s[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return s[e]}})});var f=Ge;Object.keys(f).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===f[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return f[e]}})});var o=Yr;Object.keys(o).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===o[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return o[e]}})});var m=iu;Object.keys(m).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===m[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return m[e]}})});var v=fr;Object.keys(v).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===v[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return v[e]}})});var _=uu;Object.keys(_).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===_[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return _[e]}})});var b=id;Object.keys(b).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===b[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return b[e]}})});var $=ud;Object.keys($).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===$[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return $[e]}})});var D=du;Object.keys(D).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===D[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return D[e]}})});var x=cd;Object.keys(x).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===x[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return x[e]}})});var M=He;Object.keys(M).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===M[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return M[e]}})});var F=sd;Object.keys(F).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===F[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return F[e]}})});var A=O;Object.keys(A).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===A[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return A[e]}})});var j=L;Object.keys(j).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===j[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return j[e]}})});var Z=dd;Object.keys(Z).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Z[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Z[e]}})});var B=fd;Object.keys(B).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===B[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return B[e]}})});var y=he;Object.keys(y).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===y[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return y[e]}})});var ae=ou;Object.keys(ae).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===ae[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return ae[e]}})});var ie=od;Object.keys(ie).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===ie[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return ie[e]}})});var U=Wr;Object.keys(U).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===U[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return U[e]}})});var G=lu;Object.keys(G).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===G[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return G[e]}})});var R=Nr;Object.keys(R).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===R[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return R[e]}})});var V=Fr;Object.keys(V).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===V[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return V[e]}})});var X=Hr;Object.keys(X).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===X[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return X[e]}})});var q=Cr;Object.keys(q).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===q[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return q[e]}})});var p=ld;Object.keys(p).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===p[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return p[e]}})});var W=Lr;Object.keys(W).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===W[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return W[e]}})});var Y=Ar;Object.keys(Y).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Y[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Y[e]}})});var J=or;Object.keys(J).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===J[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return J[e]}})});var $e=md;Object.keys($e).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===$e[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return $e[e]}})});var Me=lr;Object.keys(Me).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Me[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Me[e]}})});var de=hd;Object.keys(de).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===de[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return de[e]}})});var fe=_u;Object.keys(fe).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===fe[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return fe[e]}})});var De=gu;Object.keys(De).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===De[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return De[e]}})});var w=vd;Object.keys(w).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===w[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return w[e]}})});var P=_d;Object.keys(P).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===P[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return P[e]}})});var S=gd;Object.keys(S).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===S[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return S[e]}})});var ee=bd;Object.keys(ee).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===ee[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return ee[e]}})});var K=Od;Object.keys(K).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===K[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return K[e]}})});var oe=Rr;Object.keys(oe).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===oe[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return oe[e]}})});var Ae=$d;Object.keys(Ae).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Ae[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Ae[e]}})});var Kr=Md;Object.keys(Kr).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Kr[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Kr[e]}})});var kr=Dd;Object.keys(kr).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===kr[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return kr[e]}})});var pr=yr;Object.keys(pr).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===pr[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return pr[e]}})});var et=wd;Object.keys(et).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===et[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return et[e]}})});var rt=Pd;Object.keys(rt).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===rt[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return rt[e]}})});var tt=jd;Object.keys(tt).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===tt[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return tt[e]}})});var nt=xd;Object.keys(nt).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===nt[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return nt[e]}})});var at=Id;Object.keys(at).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===at[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return at[e]}})});var it=zr;Object.keys(it).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===it[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return it[e]}})});var ut=Td;Object.keys(ut).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===ut[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return ut[e]}})});var ct=Sd;Object.keys(ct).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===ct[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return ct[e]}})});var st=Ed;Object.keys(st).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===st[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return st[e]}})});var dt=Yd;Object.keys(dt).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===dt[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return dt[e]}})});var ft=Ou;Object.keys(ft).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===ft[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return ft[e]}})});var ot=bu;Object.keys(ot).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===ot[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return ot[e]}})});var lt=Wd;Object.keys(lt).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===lt[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return lt[e]}})});var mt=$u;Object.keys(mt).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===mt[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return mt[e]}})});var ht=Su;Object.keys(ht).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===ht[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return ht[e]}})});var vt=Eu;Object.keys(vt).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===vt[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return vt[e]}})});var _t=Ad;Object.keys(_t).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===_t[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return _t[e]}})});var gt=yd;Object.keys(gt).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===gt[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return gt[e]}})});var bt=zd;Object.keys(bt).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===bt[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return bt[e]}})});var Ot=Qd;Object.keys(Ot).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Ot[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Ot[e]}})});var $t=Rd;Object.keys($t).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===$t[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return $t[e]}})});var Mt=qd;Object.keys(Mt).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Mt[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Mt[e]}})});var Dt=Bd;Object.keys(Dt).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Dt[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Dt[e]}})});var wt=Zd;Object.keys(wt).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===wt[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return wt[e]}})});var Pt=Gd;Object.keys(Pt).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Pt[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Pt[e]}})});var jt=Vd;Object.keys(jt).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===jt[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return jt[e]}})});var xt=Yu;Object.keys(xt).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===xt[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return xt[e]}})});var It=_r;Object.keys(It).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===It[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return It[e]}})});var Tt=Tu;Object.keys(Tt).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Tt[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Tt[e]}})});var St=Wu;Object.keys(St).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===St[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return St[e]}})});var Et=Ud;Object.keys(Et).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Et[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Et[e]}})});var Yt=Xd;Object.keys(Yt).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Yt[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Yt[e]}})});var Wt=Fu;Object.keys(Wt).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Wt[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Wt[e]}})});var Nt=Jd;Object.keys(Nt).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Nt[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Nt[e]}})});var Ft=Hu;Object.keys(Ft).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Ft[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Ft[e]}})});var Ht=Br;Object.keys(Ht).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Ht[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Ht[e]}})});var Ct=Ee;Object.keys(Ct).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Ct[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Ct[e]}})});var Lt=Kd;Object.keys(Lt).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Lt[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Lt[e]}})});var At=kd;Object.keys(At).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===At[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return At[e]}})});var yt=pd;Object.keys(yt).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===yt[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return yt[e]}})});var zt=ef;Object.keys(zt).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===zt[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return zt[e]}})});var Qt=rf;Object.keys(Qt).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Qt[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Qt[e]}})});var Rt=mu;Object.keys(Rt).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Rt[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Rt[e]}})});var qt=tf;Object.keys(qt).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===qt[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return qt[e]}})});var Bt=nf;Object.keys(Bt).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Bt[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Bt[e]}})});var Zt=af;Object.keys(Zt).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Zt[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Zt[e]}})});var Gt=Zr;Object.keys(Gt).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Gt[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Gt[e]}})});var Vt=uf;Object.keys(Vt).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Vt[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Vt[e]}})});var Ut=hr;Object.keys(Ut).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Ut[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Ut[e]}})});var Xt=cf;Object.keys(Xt).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Xt[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Xt[e]}})});var Jt=sf;Object.keys(Jt).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Jt[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Jt[e]}})});var Kt=df;Object.keys(Kt).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Kt[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Kt[e]}})});var kt=ff;Object.keys(kt).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===kt[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return kt[e]}})});var pt=of;Object.keys(pt).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===pt[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return pt[e]}})});var en=lf;Object.keys(en).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===en[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return en[e]}})});var rn=mf;Object.keys(rn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===rn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return rn[e]}})});var tn=hf;Object.keys(tn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===tn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return tn[e]}})});var nn=vf;Object.keys(nn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===nn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return nn[e]}})});var an=_f;Object.keys(an).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===an[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return an[e]}})});var un=gf;Object.keys(un).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===un[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return un[e]}})});var cn=fu;Object.keys(cn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===cn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return cn[e]}})});var sn=bf;Object.keys(sn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===sn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return sn[e]}})});var dn=Of;Object.keys(dn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===dn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return dn[e]}})});var fn=$f;Object.keys(fn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===fn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return fn[e]}})});var on=Mf;Object.keys(on).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===on[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return on[e]}})});var ln=Df;Object.keys(ln).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===ln[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return ln[e]}})});var mn=vu;Object.keys(mn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===mn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return mn[e]}})});var hn=Nu;Object.keys(hn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===hn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return hn[e]}})});var vn=wf;Object.keys(vn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===vn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return vn[e]}})});var _n=Pf;Object.keys(_n).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===_n[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return _n[e]}})});var gn=jf;Object.keys(gn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===gn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return gn[e]}})});var bn=Ue;Object.keys(bn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===bn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return bn[e]}})});var On=Mc;Object.keys(On).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===On[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return On[e]}})});var $n=wc;Object.keys($n).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===$n[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return $n[e]}})});var Mn=xf;Object.keys(Mn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Mn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Mn[e]}})});var Dn=Pc;Object.keys(Dn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Dn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Dn[e]}})});var wn=xc;Object.keys(wn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===wn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return wn[e]}})});var Pn=Ic;Object.keys(Pn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Pn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Pn[e]}})});var jn=Tc;Object.keys(jn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===jn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return jn[e]}})});var xn=Xr;Object.keys(xn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===xn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return xn[e]}})});var In=Ec;Object.keys(In).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===In[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return In[e]}})});var Tn=eu;Object.keys(Tn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Tn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Tn[e]}})});var Sn=ru;Object.keys(Sn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Sn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Sn[e]}})});var En=If;Object.keys(En).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===En[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return En[e]}})});var Yn=Tf;Object.keys(Yn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Yn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Yn[e]}})});var Wn=Sf;Object.keys(Wn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Wn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Wn[e]}})});var Nn=Ef;Object.keys(Nn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Nn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Nn[e]}})});var Fn=Yf;Object.keys(Fn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Fn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Fn[e]}})});var Hn=Wf;Object.keys(Hn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Hn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Hn[e]}})});var Cn=Nf;Object.keys(Cn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Cn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Cn[e]}})});var Ln=Ff;Object.keys(Ln).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Ln[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Ln[e]}})});var An=Hf;Object.keys(An).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===An[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return An[e]}})});var yn=Cf;Object.keys(yn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===yn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return yn[e]}})});var zn=Lf;Object.keys(zn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===zn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return zn[e]}})});var Qn=Af;Object.keys(Qn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Qn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Qn[e]}})});var Rn=_e;Object.keys(Rn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Rn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Rn[e]}})});var qn=yf;Object.keys(qn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===qn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return qn[e]}})});var Bn=cr;Object.keys(Bn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Bn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Bn[e]}})});var Zn=zf;Object.keys(Zn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Zn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Zn[e]}})});var Gn=Qf;Object.keys(Gn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Gn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Gn[e]}})});var Vn=Rf;Object.keys(Vn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Vn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Vn[e]}})});var Un=qf;Object.keys(Un).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Un[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Un[e]}})});var Xn=Bf;Object.keys(Xn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Xn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Xn[e]}})});var Jn=Cu;Object.keys(Jn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Jn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Jn[e]}})});var Kn=Zf;Object.keys(Kn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Kn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Kn[e]}})});var kn=Yc;Object.keys(kn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===kn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return kn[e]}})});var pn=Gf;Object.keys(pn).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===pn[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return pn[e]}})});var ea=Vf;Object.keys(ea).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===ea[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return ea[e]}})});var ra=cu;Object.keys(ra).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===ra[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return ra[e]}})});var ta=Uf;Object.keys(ta).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===ta[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return ta[e]}})});var na=Xf;Object.keys(na).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===na[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return na[e]}})});var aa=Jf;Object.keys(aa).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===aa[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return aa[e]}})});var ia=Kf;Object.keys(ia).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===ia[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return ia[e]}})});var ua=su;Object.keys(ua).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===ua[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return ua[e]}})});var ca=kf;Object.keys(ca).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===ca[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return ca[e]}})});var sa=pf;Object.keys(sa).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===sa[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return sa[e]}})});var da=eo;Object.keys(da).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===da[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return da[e]}})});var fa=ro;Object.keys(fa).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===fa[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return fa[e]}})});var oa=to;Object.keys(oa).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===oa[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return oa[e]}})});var la=be;Object.keys(la).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===la[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return la[e]}})});var ma=no;Object.keys(ma).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===ma[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return ma[e]}})});var ha=ao;Object.keys(ha).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===ha[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return ha[e]}})});var va=io;Object.keys(va).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===va[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return va[e]}})});var _a=uo;Object.keys(_a).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===_a[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return _a[e]}})});var ga=co;Object.keys(ga).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===ga[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return ga[e]}})});var ba=so;Object.keys(ba).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===ba[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return ba[e]}})});var Oa=fo;Object.keys(Oa).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Oa[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Oa[e]}})});var $a=Lu;Object.keys($a).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===$a[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return $a[e]}})});var Ma=oo;Object.keys(Ma).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Ma[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Ma[e]}})});var Da=mo;Object.keys(Da).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Da[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Da[e]}})});var wa=Oe;Object.keys(wa).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===wa[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return wa[e]}})});var Pa=ho;Object.keys(Pa).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Pa[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Pa[e]}})});var ja=vo;Object.keys(ja).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===ja[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return ja[e]}})});var xa=_o;Object.keys(xa).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===xa[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return xa[e]}})});var Ia=go;Object.keys(Ia).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Ia[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Ia[e]}})});var Ta=bo;Object.keys(Ta).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Ta[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Ta[e]}})});var Sa=Oo;Object.keys(Sa).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Sa[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Sa[e]}})});var Ea=$o;Object.keys(Ea).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Ea[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Ea[e]}})});var Ya=Mo;Object.keys(Ya).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Ya[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Ya[e]}})});var Wa=Do;Object.keys(Wa).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Wa[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Wa[e]}})});var Na=wo;Object.keys(Na).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Na[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Na[e]}})});var Fa=Po;Object.keys(Fa).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Fa[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Fa[e]}})});var Ha=jo;Object.keys(Ha).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Ha[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Ha[e]}})});var Ca=xo;Object.keys(Ca).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Ca[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Ca[e]}})});var La=Io;Object.keys(La).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===La[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return La[e]}})});var Aa=To;Object.keys(Aa).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Aa[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Aa[e]}})});var ya=So;Object.keys(ya).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===ya[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return ya[e]}})});var za=gr;Object.keys(za).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===za[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return za[e]}})});var Qa=Eo;Object.keys(Qa).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Qa[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Qa[e]}})});var Ra=Yo;Object.keys(Ra).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Ra[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Ra[e]}})});var qa=Wo;Object.keys(qa).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===qa[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return qa[e]}})});var Ba=uc;Object.keys(Ba).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Ba[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Ba[e]}})});var Za=pu;Object.keys(Za).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Za[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Za[e]}})});var Ga=au;Object.keys(Ga).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Ga[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Ga[e]}})});var Va=No;Object.keys(Va).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Va[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Va[e]}})});var Ua=Fo;Object.keys(Ua).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Ua[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Ua[e]}})});var Xa=Jr;Object.keys(Xa).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Xa[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Xa[e]}})});var Ja=Ho;Object.keys(Ja).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Ja[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Ja[e]}})});var Ka=Co;Object.keys(Ka).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Ka[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Ka[e]}})});var ka=Ku;Object.keys(ka).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===ka[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return ka[e]}})});var pa=Lo;Object.keys(pa).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===pa[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return pa[e]}})});var ei=Ao;Object.keys(ei).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===ei[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return ei[e]}})});var ri=dr;Object.keys(ri).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===ri[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return ri[e]}})});var ti=yo;Object.keys(ti).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===ti[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return ti[e]}})});var ni=Dc;Object.keys(ni).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===ni[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return ni[e]}})});var ai=ce;Object.keys(ai).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===ai[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return ai[e]}})});var ii=Ve;Object.keys(ii).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===ii[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return ii[e]}})});var ui=jc;Object.keys(ui).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===ui[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return ui[e]}})});var ci=mr;Object.keys(ci).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===ci[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return ci[e]}})});var si=Qr;Object.keys(si).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===si[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return si[e]}})});var di=Sc;Object.keys(di).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===di[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return di[e]}})});var fi=zo;Object.keys(fi).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===fi[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return fi[e]}})});var oi=Qo;Object.keys(oi).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===oi[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return oi[e]}})});var li=ne;Object.keys(li).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===li[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return li[e]}})});var mi=Gr;Object.keys(mi).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===mi[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return mi[e]}})});var hi=qr;Object.keys(hi).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===hi[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return hi[e]}})});var vi=Ro;Object.keys(vi).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===vi[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return vi[e]}})});var _i=qo;Object.keys(_i).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===_i[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return _i[e]}})});var gi=Bo;Object.keys(gi).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===gi[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return gi[e]}})});var bi=br;Object.keys(bi).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===bi[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return bi[e]}})});var Oi=Zo;Object.keys(Oi).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Oi[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Oi[e]}})});var $i=hu;Object.keys($i).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===$i[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return $i[e]}})});var Mi=Go;Object.keys(Mi).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Mi[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Mi[e]}})});var Di=Vo;Object.keys(Di).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Di[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Di[e]}})});var wi=Wc;Object.keys(wi).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===wi[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return wi[e]}})});var Pi=Uo;Object.keys(Pi).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Pi[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Pi[e]}})});var ji=Xo;Object.keys(ji).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===ji[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return ji[e]}})});var xi=Jo;Object.keys(xi).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===xi[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return xi[e]}})});var Ii=Ko;Object.keys(Ii).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Ii[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Ii[e]}})});var Ti=l;Object.keys(Ti).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Ti[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Ti[e]}})});var Si=Au;Object.keys(Si).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Si[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Si[e]}})});var Ei=ko;Object.keys(Ei).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Ei[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Ei[e]}})});var Yi=po;Object.keys(Yi).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Yi[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Yi[e]}})});var Wi=el;Object.keys(Wi).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Wi[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Wi[e]}})});var Ni=rl;Object.keys(Ni).forEach(function(e){e==="default"||e==="__esModule"||e in r&&r[e]===Ni[e]||Object.defineProperty(r,e,{enumerable:!0,get:function(){return Ni[e]}})})})(td);Object.defineProperty(Sr,"__esModule",{value:!0});var Se=me,z=td,H=d;const ur="react-activity-calendar",Xi=8,tl=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dx={months:tl,weekdays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],totalCount:"{{count}} activities in {{year}}",legend:{less:"Less",more:"More"}};function fx(){const[r,n]=Se.useState("light"),t=a=>{n(a.matches?"dark":"light")};return Se.useEffect(()=>{const a=window.matchMedia("(prefers-color-scheme: dark)");return n(a.matches?"dark":"light"),a.addEventListener("change",t),()=>{a.removeEventListener("change",t)}},[]),r}const ox="(prefers-reduced-motion: reduce)";function lx(){const[r,n]=Se.useState(!0);return Se.useEffect(()=>{const t=window.matchMedia(ox);n(t.matches);const a=i=>{n(i.matches)};return t.addEventListener("change",a),()=>{t.removeEventListener("change",a)}},[]),r}function mx(r,n){n===void 0&&(n={});var t=n.insertAt;if(!(typeof document>"u")){var a=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",t==="top"&&a.firstChild?a.insertBefore(i,a.firstChild):a.appendChild(i),i.styleSheet?i.styleSheet.cssText=r:i.appendChild(document.createTextNode(r))}}var hx=`.styles-module_container__GBNxC { + width: max-content; /* Calendar should not grow */ + max-width: 100%; /* Do not remove - flexbox parents */ + display: flex; + flex-direction: column; + gap: 8px; +} + +.styles-module_container__GBNxC rect { + stroke: rgba(0, 0, 0, 0.08); + stroke-width: 1px; + shape-rendering: geometricPrecision; +} + +@media (prefers-color-scheme: dark) { + .styles-module_container__GBNxC rect { + stroke: rgba(255, 255, 255, 0.04); + } +} + +.styles-module_scrollContainer__-bJC8 { + max-width: 100%; + overflow-x: auto; + overflow-y: hidden; +} + +.styles-module_calendar__sT1ND { + display: block; /* SVGs are inline-block by default */ + overflow: visible; /* Weekday labels are rendered left of the container */ +} + +.styles-module_calendar__sT1ND text { + fill: currentColor; +} + +.styles-module_footer__ZQ-Bl { + display: flex; + flex-wrap: wrap; + gap: 4px 16px; + white-space: nowrap; +} + +.styles-module_legendColors__kFY2e { + margin-left: auto; + display: flex; + align-items: center; + gap: 3px; +} + +@keyframes styles-module_loadingAnimation__V0w3h { + 0% { + fill: var(--react-activity-calendar-loading); + } + 50% { + fill: var(--react-activity-calendar-loading-active); + } + 100% { + fill: var(--react-activity-calendar-loading); + } +} +`,Ze={container:"styles-module_container__GBNxC",scrollContainer:"styles-module_scrollContainer__-bJC8",calendar:"styles-module_calendar__sT1ND",footer:"styles-module_footer__ZQ-Bl",legendColors:"styles-module_legendColors__kFY2e",loadingAnimation:"styles-module_loadingAnimation__V0w3h"};mx(hx);function vx(r,n){if(r.length===0)throw new Error("Activity data must not be empty.");for(const{date:t,level:a,count:i}of r){if(!z.isValid(z.parseISO(t)))throw new Error(`Activity date '${t}' is not a valid ISO 8601 date string.`);if(i<0)throw new RangeError(`Activity count must not be negative, found ${i}.`);if(a<0||a>n)throw new RangeError(`Activity level ${a} for ${t} is out of range. It must be between 0 and ${n}.`)}}function _x(r,n=0){const t=gx(r),a=t[0],i=z.parseISO(a.date),u=z.getDay(i)===n?i:z.subWeeks(z.nextDay(i,n),1),c=[...Array(z.differenceInCalendarDays(i,u)).fill(void 0),...t],s=Math.ceil(c.length/7);return xr(s).map(f=>c.slice(f*7,f*7+7))}function gx(r){const n=new Map(r.map(i=>[i.date,i])),t=r[0],a=r[r.length-1];return z.eachDayOfInterval({start:z.parseISO(t.date),end:z.parseISO(a.date)}).map(i=>{const u=z.formatISO(i,{representation:"date"});return n.has(u)?n.get(u):{date:u,count:0,level:0}})}function We(r,n){return n?`${ur}__${r} ${n}`:`${ur}__${r}`}function bx(){const r=new Date().getFullYear();return z.eachDayOfInterval({start:new Date(r,0,1),end:new Date(r,11,31)}).map(t=>({date:z.formatISO(t,{representation:"date"}),count:0,level:0}))}function xr(r){return[...Array(r).keys()]}function Ox(r,n=tl){return r.reduce((t,a,i)=>{const u=a.find(f=>f!==void 0);if(!u)throw new Error(`Unexpected error: Week ${i+1} is empty: [${a}].`);const c=n[z.getMonth(z.parseISO(u.date))];if(!c){const f=new Date(u.date).toLocaleString("en-US",{month:"short"});throw new Error(`Unexpected error: undefined month label for ${f}.`)}const s=t[t.length-1];return i===0||!s||s.label!==c?[...t,{weekIndex:i,label:c}]:t},[]).filter(({weekIndex:t},a,i)=>a===0?i[1]&&i[1].weekIndex-t>=3:a===i.length-1?r.slice(t).length>=3:!0)}function $x(r,n,t){if(r.length!==7)throw new Error("Exactly 7 labels, one for each weekday must be passed.");return r.reduce((a,i,u)=>n.byDayIndex(u)?Math.max(a,Math.ceil(Mx(i,t).width)):a,0)}function Mx(r,n){if(n<1)throw new RangeError("fontSize must be positive");if(r.length===0)return{width:0,height:0};const t="http://www.w3.org/2000/svg",a=document.createElementNS(t,"svg");a.style.position="absolute",a.style.visibility="hidden",a.style.fontFamily=window.getComputedStyle(document.body).fontFamily,a.style.fontSize=`${n}px`;const i=document.createElementNS(t,"text");i.textContent=r,a.appendChild(i),document.body.appendChild(a);const u=i.getBBox();return document.body.removeChild(a),{width:u.width,height:u.height}}function Dx(r,n){if(!r)return{byDayIndex:()=>!1,shouldShow:!1};if(r===!0)return{byDayIndex:a=>(7+a-n)%7%2!==0,shouldShow:!0};const t=[];for(const a of r){const i=wx[a.toLowerCase()];t[i]=!0}return{byDayIndex:a=>t[a]??!1,shouldShow:r.length>0}}const wx={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function Px(r,n=5){const t=jx(n);return r?(xx(r,n),r.light=r.light??t.light,r.dark=r.dark??t.dark,{light:ks(r.light)?Ir(r.light,n):r.light,dark:ks(r.dark)?Ir(r.dark,n):r.dark}):t}function jx(r){return{light:Ir(["hsl(0, 0%, 92%)","hsl(0, 0%, 26%)"],r),dark:Ir(["hsl(0, 0%, 22%)","hsl(0, 0%, 92%)"],r)}}function xx(r,n){if(typeof r!="object"||r.light===void 0&&r.dark===void 0)throw new Error(`The theme object must contain at least one of the fields "light" and "dark" with exactly 2 or ${n} colors respectively.`);if(r.light){const{length:t}=r.light;if(t!==2&&t!==n)throw new Error(`theme.light must contain exactly 2 or ${n} colors, ${t} passed.`);for(const a of r.light)if(!CSS.supports("color",a))throw new Error(`Invalid color "${String(a)}" passed. All CSS color formats are accepted.`)}if(r.dark){const{length:t}=r.dark;if(t!==2&&t!==n)throw new Error(`theme.dark must contain exactly 2 or ${n} colors, ${t} passed.`);for(const a of r.dark)if(!CSS.supports("color",a))throw new Error(`Invalid color "${String(a)}" passed. All CSS color formats are accepted.`)}}function Ir(r,n){return xr(n).map(t=>{const a=t/(n-1)*100;return`color-mix(in oklab, ${r[1]} ${parseFloat(a.toFixed(2))}%, ${r[0]})`})}function ks(r){return r.length===2}const Nc=Se.forwardRef(({data:r,blockMargin:n=4,blockRadius:t=2,blockSize:a=12,colorScheme:i=void 0,eventHandlers:u={},fontSize:c=14,hideColorLegend:s=!1,hideMonthLabels:f=!1,hideTotalCount:o=!1,labels:m=void 0,maxLevel:v=4,loading:_=!1,renderBlock:b=void 0,renderColorLegend:$=void 0,showWeekdayLabels:D=!1,style:x={},theme:M=void 0,totalCount:F=void 0,weekStart:A=0},j)=>{v=Math.max(1,v);const Z=Px(M,v+1),B=fx(),y=Z[i??B],ae=!lx();_&&(r=bx()),vx(r,v);const ie=r[0],U=z.getYear(z.parseISO(ie.date)),G=_x(r,A),R=Object.assign({},dx,m),V=f?0:c+Xi,X=Dx(D,A),q=X.shouldShow?$x(R.weekdays,X,c)+Xi:void 0;function p(){return{width:G.length*(a+n)-n,height:V+(a+n)*7-n}}function W(w){return Object.keys(u).reduce((P,S)=>({...P,[S]:ee=>{var K;return(K=u[S])==null?void 0:K.call(u,ee)(w)}}),{})}function Y(){return G.map((w,P)=>w.map((S,ee)=>{if(!S)return null;const K=_&&ae?{animation:`${Ze.loadingAnimation} 1.75s ease-in-out infinite`,animationDelay:`${P*20+ee*20}ms`}:void 0,oe=H.jsx("rect",{...W(S),x:0,y:V+(a+n)*ee,width:a,height:a,rx:t,ry:t,fill:y[S.level],"data-date":S.date,"data-level":S.level,style:K});return H.jsx(Se.Fragment,{children:b?b(oe,S):oe},S.date)})).map((w,P)=>H.jsx("g",{transform:`translate(${(a+n)*P}, 0)`,children:w},P))}function J(){if(o&&s)return null;const w=typeof F=="number"?F:r.reduce((P,S)=>P+S.count,0);return H.jsxs("footer",{className:We("footer",Ze.footer),style:{marginLeft:q},children:[_&&H.jsx("div",{children:" "}),!_&&!o&&H.jsx("div",{className:We("count"),children:R.totalCount?R.totalCount.replace("{{count}}",String(w)).replace("{{year}}",String(U)):`${w} activities in ${U}`}),!_&&!s&&H.jsxs("div",{className:We("legend-colors",Ze.legendColors),children:[H.jsx("span",{style:{marginRight:"0.4em"},children:R.legend.less}),xr(v+1).map(P=>{const S=H.jsx("svg",{width:a,height:a,children:H.jsx("rect",{width:a,height:a,fill:y[P],rx:t,ry:t})},P);return $?$(S,P):S}),H.jsx("span",{style:{marginLeft:"0.4em"},children:R.legend.more})]})]})}function $e(){return X.shouldShow?H.jsx("g",{className:We("legend-weekday"),children:xr(7).map(w=>{const P=(w+A)%7;return X.byDayIndex(P)?H.jsx("text",{x:-Xi,y:V+(a+n)*w+a/2,dominantBaseline:"central",textAnchor:"end",children:R.weekdays[P]},w):null})}):null}function Me(){return f?null:H.jsx("g",{className:We("legend-month"),children:Ox(G,R.months).map(({label:w,weekIndex:P})=>H.jsx("text",{x:(a+n)*P,dominantBaseline:"hanging",children:w},P))})}const{width:de,height:fe}=p(),De={fontSize:c,...ae&&{[`--${ur}-loading`]:`oklab(from ${y[0]} l a b)`,[`--${ur}-loading-active`]:i==="light"?`oklab(from ${y[0]} calc(l * 0.96) a b)`:`oklab(from ${y[0]} calc(l * 1.08) a b)`}};return H.jsxs("article",{ref:j,className:`${ur} ${Ze.container}`,style:{...x,...De},children:[H.jsx("div",{className:We("scroll-container",Ze.scrollContainer),children:H.jsxs("svg",{width:de,height:fe,viewBox:`0 0 ${de} ${fe}`,className:We("calendar",Ze.calendar),style:{marginLeft:q},children:[!_&&$e(),!_&&Me(),Y()]})}),J()]})});Nc.displayName="ActivityCalendar";const Ix=r=>H.jsx(Nc,{data:[],...r});function Tx(r){const[n,t]=Se.useState(!1);return Se.useEffect(()=>{t(!0)},[]),n?H.jsx(Nc,{...r}):null}Sr.Skeleton=Ix;Sr.default=Tx;Object.defineProperty(rd,"__esModule",{value:!0});var Fe=me,nl=Sr;function al(r){return r&&r.__esModule?r:{default:r}}var Ji=al(Fe),Sx=al(nl);function Tr(){return Tr=Object.assign?Object.assign.bind():function(r){for(var n=1;n{if(typeof n!="function")return r;const t=n(r);if(!Array.isArray(t))throw Error("Passed function transformData must return a list of Day objects.");if(t.length>0){const a=t[0];if(typeof a.count!="number"||a.count<0)throw Error(`Required property "count: number" missing or invalid. Got: ${a.count}`);if(!/\d{4}-\d{2}-\d{2}/.test(a.date))throw Error(`Required property "date: YYYY-MM-DD" missing or invalid. Got: ${a.date}`);if(typeof a.level!="number"||a.level<0||a.level>4)throw Error(`Required property "level: 0 | 1 | 2 | 3 | 4" missing or invalid: Got: ${a.level}.`)}return t};async function Nx(r,n){const t=await fetch(`${Ex}${r}?y=${n}`),a=await t.json();if(!t.ok)throw Error(`Fetching GitHub contribution data for "${r}" failed: ${a.error}`);return a}const il=Fe.forwardRef(({username:r,year:n="last",labels:t,transformData:a,transformTotalCount:i=!0,throwOnError:u=!1,errorMessage:c=`Error – Fetching GitHub contribution data for "${r}" failed.`,...s},f)=>{const[o,m]=Fe.useState(null),[v,_]=Fe.useState(!1),[b,$]=Fe.useState(null),D=Fe.useCallback(()=>{_(!0),$(null),Nx(r,n).then(m).catch($).finally(()=>_(!1))},[r,n]);if(Fe.useEffect(D,[D]),b){if(u)throw b;return Ji.default.createElement("div",null,c)}if(v||!o)return Ji.default.createElement(nl.Skeleton,Tr({},s,{loading:!0}));const x=s.theme??Yx,M={totalCount:`{{count}} contributions in ${n==="last"?"the last year":"{{year}}"}`},F=n==="last"?o.total.lastYear:o.total[n];return Ji.default.createElement(Sx.default,Tr({data:Wx(o.contributions,a),labels:Object.assign({},M,t),ref:f,totalCount:a&&i?void 0:F},s,{theme:x,loading:!!s.loading||v,maxLevel:4}))});il.displayName="GitHubCalendar";var Fx=rd.default=il;const ul=r=>(ul.proptypes={className:te.string},d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"-100 -100 712 712",width:"1em",height:"1em",...r,children:[d.jsx("title",{children:"Pull-requesst Icon"}),d.jsx("path",{d:"M305.8 2.1C314.4 5.9 320 14.5 320 24v40h16c70.7 0 128 57.3 128 128v166.7c28.3 12.3 48 40.5 48 73.3 0 44.2-35.8 80-80 80s-80-35.8-80-80c0-32.8 19.7-61 48-73.3V192c0-35.3-28.7-64-64-64h-16v40c0 9.5-5.6 18.1-14.2 21.9s-18.8 2.3-25.8-4.1l-80-72c-5.1-4.6-7.9-11-7.9-17.8s2.9-13.3 7.9-17.8l80-72c7-6.3 17.2-7.9 25.8-4.1M104 80a24 24 0 1 0-48 0 24 24 0 1 0 48 0m8 73.3v205.4c28.3 12.3 48 40.5 48 73.3 0 44.2-35.8 80-80 80S0 476.2 0 432c0-32.8 19.7-61 48-73.3V153.3C19.7 141 0 112.8 0 80 0 35.8 35.8 0 80 0s80 35.8 80 80c0 32.8-19.7 61-48 73.3M104 432a24 24 0 1 0-48 0 24 24 0 1 0 48 0m328 24a24 24 0 1 0 0-48 24 24 0 1 0 0 48"})]}));function cl({pr:r,org:n}){cl.propTypes={pr:te.object.isRequired,org:te.object.isRequired};const t=r.user,a=r.pull_request,i=a.merged_at?"prt-merged":"prt-open",u={"-1":"👎","+1":"👍",confused:"😕",eyes:"👀",heart:"❤",hooray:"🎉",laugh:"😆",rocket:"🚀"};return d.jsxs("div",{className:`pull-request-tile ${i}`,children:[d.jsx("a",{href:r.html_url+"/files",target:"_blank",rel:"noreferrer noopener",children:d.jsxs("h4",{className:i,children:["#",r.url.split("/").slice(-1)[0]," - ",a.merged_at?"Merged":"Open"]})}),d.jsx("h5",{children:r.title}),d.jsxs("div",{className:"prt-visual-aid",children:[d.jsx("a",{href:n.html_url,target:"_blank",rel:"noreferrer noopener",className:"prt-org-link",children:d.jsx("img",{className:"prt-org-avatar",src:n.owner.avatar_url,alt:`${n.login}'s profile.`})}),d.jsx("a",{href:r.html_url+"/files",target:"_blank",rel:"noreferrer noopenner",children:d.jsx(ul,{className:i})}),d.jsx("a",{href:t.html_url,target:"_blank",rel:"noreferrer noopener",className:"prt-user-link",children:d.jsx("img",{className:"prt-user-avatar",src:t.avatar_url,alt:"My Github user profile."})})]}),d.jsx("p",{className:"prt-org-description",children:n.description}),d.jsx("div",{className:"prt-labels"}),d.jsx("div",{className:"prt-reactions",children:(()=>{let c=[];for(let s in r.reactions)s==="total_count"||s==="url"||r.reactions[s]&&c.push(d.jsx("span",{className:"prt-reaction",children:d.jsxs("a",{href:r.html_url,rel:"noreferrer noopenner",target:"_blank",children:[r.reactions[s]>1?d.jsx("span",{className:"prt-reaction-count",children:`+${r.reactions[s]}`},`prt-reaction: ${s}-count`):void 0,u[s]]})},`prt-reaction: ${s}`));return c})()}),d.jsxs("p",{className:"prt-create-date",children:["Created ",hl(r.created_at),"."]})]})}const sl=r=>(sl.propTypes={className:te.string},d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:512,height:512,viewBox:"0 0 13.229 13.229",...r,children:[d.jsx("title",{children:"Loading Icon"}),d.jsx("defs",{children:d.jsxs("linearGradient",{id:"a",x1:96.978,x2:101.12,y1:125.04,y2:129.18,gradientUnits:"userSpaceOnUse",children:[d.jsx("stop",{offset:0}),d.jsx("stop",{stopOpacity:0,offset:1})]})}),d.jsx("g",{transform:"translate(-90.364 -122.57)",children:d.jsx("path",{d:"m96.978 122.57a6.6145 6.6145 0 0 0-6.6145 6.6145 6.6145 6.6145 0 0 0 6.6145 6.6145 6.6145 6.6145 0 0 0 6.6145-6.6145h-2.4727a4.1419 4.1419 0 0 1-4.1418 4.1418 4.1419 4.1419 0 0 1-4.1418-4.1418 4.1419 4.1419 0 0 1 4.1418-4.1418v-2.4727z",opacity:.998,fill:"url(#a)"})})]})),Hx=r=>d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:40,height:40,viewBox:"0 0 26.458 26.458",...r,children:[d.jsx("title",{children:"Exit Button"}),d.jsxs("g",{strokeLinecap:"round",children:[d.jsx("circle",{id:"exit-button-svg-circle",cx:13.229,cy:13.229,r:12.259,fill:"none",stroke:Fc.lightcharcoal,strokeLinejoin:"round",strokeWidth:1.5}),d.jsx("path",{id:"exit-button-svg-x",fill:"none",stroke:Fc.lightcharcoal,strokeWidth:1.5,d:"m6.952 6.952 12.555 12.555M19.507 6.952 6.952 19.507"})]})]});const dl=({msg:r,imgSrc:n,imgAlt:t,buttonLink:a,buttonText:i})=>{dl.propTypes={msg:te.string.isRequired,imgSrc:te.string,imgAlt:te.string,buttonLink:te.string,buttonText:te.string};const[u,c]=me.useState(!1),s=()=>c(!0);return u?void 0:d.jsxs("div",{className:"error-msg",children:[d.jsx("button",{className:"error-message-exit",onClick:s,children:d.jsx(Hx,{className:"error-message-exit"})}),d.jsx("h3",{children:"Whoops!"}),(()=>{if(n)return d.jsx("img",{src:n,alt:t})})(),d.jsx("p",{children:r}),(()=>{if(a)return d.jsx(Ki,{link:a,children:d.jsx("button",{children:i})})})()]})};function fl({orgs:r,pullRequests:n}){fl.propTypes={orgs:te.object.isRequired,pullRequests:te.array.isRequired};const t="https://github.com/search?q=author%3Athetyster+type%3Apr";return d.jsxs("div",{className:"contributions",children:[d.jsx("h3",{children:"Free and Open Source Software"}),d.jsx("p",{children:"This is something I care a lot about. Most of the software that I use falls under this umbrella. By creating software that is reusable by anyone, we help build each other up and give one another greater control over our digital world. Here's some projects I have contributed to."}),d.jsxs("ul",{children:[d.jsx(Fx,{username:"thetyster",colorScheme:"light",style:{width:"unset",maxWidth:`${window.innerWidth<600?220:window.innerWidth<800?600:800}px`,display:"block",margin:"0 auto",padding:0},transformTotalCount:!1,labels:{totalCount:"{{count}} contributions"}}),r?n.map(a=>d.jsx(cl,{pr:a,org:r[a.repository_url]},a.id)):d.jsxs(d.Fragment,{children:[d.jsx(sl,{className:"loading"}),d.jsx("p",{className:"loading-msg",children:"Content will refresh as data becomes available."}),d.jsx(dl,{msg:"Github's unauthenticated API rate limit is 60 requests per hour. This may have been exceeded. View my contributions on Github Instead!",imgSrc:"static/github-mark.svg",imgAlt:"Github Logo",buttonLink:t,buttonText:"Visit Now"})]})]})]})}const Cx=({title:r,titleId:n,desc:t,descId:a,...i})=>d.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 804 480","aria-labelledby":n,"aria-describedby":a,...i,children:[t?d.jsx("desc",{id:a,children:t}):null,r?d.jsx("title",{id:n,children:r}):null,d.jsx("rect",{width:804,height:480,fill:"#b02a2a",rx:20}),d.jsx("path",{fill:"#FFF",d:"M263 377.5h95V330h95V140H263zm95-190h47.5v95H358zM491 140v190h95V187.5h47.5V330H681V187.5h47.5V330H776V140zM35 330h95V187.5h47.5V330H225V140H35z"})]}),Lx=()=>{const r=new Map([[{"Cherry Lane Farm Doodles":0,CripToe:1,"Fruit Search":2,"Giphy Search":3,"Hacker News Clone":4,Jeopardy:5,"Meme Generator":6,"Memory Game":7,"Duck Story":8,"ToDo App":9},[{id:"Cherry Lane Farm Doodles",title:"Cherry Lane Farm Doodles",link:["my-work/cherry-lane-farms/"],img:d.jsx("img",{src:"static/img/cherrylane-farm-ss.png",alt:"Cherry Lane Farm App Screenshot"})},{id:"CripToe",title:"CripToe.js",link:["https://www.npmjs.com/package/criptoe","_blank"],img:d.jsx(Cx,{title:"CripToe NPM Package Icon",titleId:"criptoe-npm-title",desc:"CripToe NPM Package Icon",descId:"criptoe-npm-desc","aria-label":"CripToe NPM Package Icon"})},{id:"Fruit Search",title:"Fruit Search",link:["my-work/fruit-search/","_blank"],img:d.jsx("img",{src:"static/img/fruit-search-ss.png",alt:"Fruit Search App Screenshot"})},{id:"Giphy Search",title:"Giphy Search",link:["my-work/giphy-search/","_blank"],img:d.jsx("img",{src:"static/img/giphy-search-ss.png",alt:"Giphy Search App Screenshot"})},{id:"Hacker News Clone",title:"Hacker News Clone",link:["my-work/hacker-news-clone/","_blank"],img:d.jsx("img",{src:"static/img/hacker-news-clone-ss.png",alt:"Hacker News Clone App Screenshot"})},{id:"Jeopardy",title:"Jeopardy",link:["my-work/jeopardy/","_blank"],img:d.jsx("img",{src:"static/img/jeopardy-ss.png",alt:"Jeopardy App Screenshot"})},{id:"Meme Generator",title:"Meme Generator",link:["my-work/meme-generator/","_blank"],img:d.jsx("img",{src:"static/img/meme-generator-ss.png",alt:"Meme Generator App Screenshot"})},{id:"Memory Game",title:"Memory Game",link:["my-work/memory-game/","_blank"],img:d.jsx("img",{src:"static/img/memory-game-ss.png",alt:"Memory Game App Screenshot"})},{id:"Duck Story",title:"Duck Story",link:["my-work/duck-story-v1/","_blank"],img:d.jsx("img",{src:"static/img/duck-story-v1-ss.png",alt:"Duck Story App Screenshot"})},{id:"ToDo App",title:"ToDo App",link:["my-work/todo-app/","_blank"],img:d.jsx("img",{src:"static/img/todo-app-ss.png",alt:"ToDo App Screenshot"})}]]]);return d.jsx("nav",{children:d.jsx("menu",{className:"my-work",children:d.jsx(gl,{db:r})})})},Ax=()=>d.jsx(d.Fragment,{children:d.jsxs("span",{children:[d.jsx("i",{children:"I like to keep things lean, fast, simple and usable. The web was meant to make information accessible to anyone."}),d.jsxs("blockquote",{children:[d.jsx("i",{children:'"Web pages are designed for people."'}),d.jsx("p",{children:"-Tim Berners-Lee"})]})]})});function yx(){vl("Ty Davis");const r="https://api.github.com/search/issues?q=author%3Athetyster+type%3Apr";let[n,t]=me.useState(),[a,i]=me.useState();me.useEffect(()=>{(async()=>{let c;for(;!c;)try{c=(await Fi(r)).data.items}catch(m){console.warn("API Error. Trying Again. ",m),await Hc(120)}const s=c.filter(m=>m.author_association==="CONTRIBUTOR"&&m.pull_request.merged_at&&m.state==="closed"||m.state==="open"),f=Array.from(new Set(s.map(m=>m.repository_url)));let o={};for(;Object.keys(o).length===0;)try{await Fi.all(f.map(m=>Fi(m))).then(m=>[...m].map(v=>o[v.data.url]=v.data))}catch(m){console.warn("API Error. Trying Again. ",m),await Hc(120)}t(s),i(o)})()},[]);const u=new Map([[{"job-history":0,initial:1,contributions:2,hobbies:3},[{id:"job-history",component:d.jsx($l,{}),title:"Job History"},{id:"initial",component:d.jsx(Lx,{}),title:"My Work"},{id:"contributions",component:d.jsx(fl,{orgs:a,pullRequests:n}),title:"Contributions"},{id:"hobbies",component:d.jsx(Ml,{}),title:"Hobbies"}]]]);return d.jsxs("div",{className:"landing-page",children:[d.jsx(ed,{imgClass:"my-headshot",sideText_classPrefix:"headshot-text",imgSrc:"static/img/me.jpg",imgAlt:"My Face.",imgLink:"https://www.linkedin.com/in/tyler-d-webdev/",sideText:d.jsx(Ax,{})}),d.jsx("hr",{}),d.jsx(bl,{menuItems:u})]})}const zx=()=>d.jsx("main",{children:d.jsx(yx,{})}),Qx=ps.createRoot(document.getElementById("nav"));Qx.render(d.jsx(me.StrictMode,{children:d.jsx(_l,{})}));const Rx=ps.createRoot(document.getElementById("content"));Rx.render(d.jsx(me.StrictMode,{children:d.jsx(zx,{})})); diff --git a/assets/axios-1779699b.js b/assets/axios-1779699b.js new file mode 100644 index 0000000..c628268 --- /dev/null +++ b/assets/axios-1779699b.js @@ -0,0 +1,6 @@ +function Fe(e,t){return function(){return e.apply(t,arguments)}}const{toString:tt}=Object.prototype,{getPrototypeOf:ue}=Object,W=(e=>t=>{const n=tt.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),C=e=>(e=e.toLowerCase(),t=>W(t)===e),v=e=>t=>typeof t===e,{isArray:D}=Array,j=v("undefined");function nt(e){return e!==null&&!j(e)&&e.constructor!==null&&!j(e.constructor)&&A(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Le=C("ArrayBuffer");function rt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Le(e.buffer),t}const st=v("string"),A=v("function"),Be=v("number"),K=e=>e!==null&&typeof e=="object",ot=e=>e===!0||e===!1,I=e=>{if(W(e)!=="object")return!1;const t=ue(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},it=C("Date"),at=C("File"),ct=C("Blob"),ut=C("FileList"),lt=e=>K(e)&&A(e.pipe),ft=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||A(e.append)&&((t=W(e))==="formdata"||t==="object"&&A(e.toString)&&e.toString()==="[object FormData]"))},dt=C("URLSearchParams"),[pt,ht,mt,yt]=["ReadableStream","Request","Response","Headers"].map(C),bt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function q(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),D(e))for(r=0,s=e.length;r0;)if(s=n[r],t===s.toLowerCase())return s;return null}const L=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Ue=e=>!j(e)&&e!==L;function ne(){const{caseless:e}=Ue(this)&&this||{},t={},n=(r,s)=>{const o=e&&De(t,s)||s;I(t[o])&&I(r)?t[o]=ne(t[o],r):I(r)?t[o]=ne({},r):D(r)?t[o]=r.slice():t[o]=r};for(let r=0,s=arguments.length;r(q(t,(s,o)=>{n&&A(s)?e[o]=Fe(s,n):e[o]=s},{allOwnKeys:r}),e),Et=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),St=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Rt=(e,t,n,r)=>{let s,o,i;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=n!==!1&&ue(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},gt=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Ot=e=>{if(!e)return null;if(D(e))return e;let t=e.length;if(!Be(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Tt=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ue(Uint8Array)),At=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},xt=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Ct=C("HTMLFormElement"),Nt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),be=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Pt=C("RegExp"),ke=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};q(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},_t=e=>{ke(e,(t,n)=>{if(A(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(A(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Ft=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return D(e)?r(e):r(String(e).split(t)),n},Lt=()=>{},Bt=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Z="abcdefghijklmnopqrstuvwxyz",we="0123456789",je={DIGIT:we,ALPHA:Z,ALPHA_DIGIT:Z+Z.toUpperCase()+we},Dt=(e=16,t=je.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Ut(e){return!!(e&&A(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const kt=e=>{const t=new Array(10),n=(r,s)=>{if(K(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const o=D(r)?[]:{};return q(r,(i,c)=>{const f=n(i,s+1);!j(f)&&(o[c]=f)}),t[s]=void 0,o}}return r};return n(e,0)},jt=C("AsyncFunction"),qt=e=>e&&(K(e)||A(e))&&A(e.then)&&A(e.catch),qe=((e,t)=>e?setImmediate:t?((n,r)=>(L.addEventListener("message",({source:s,data:o})=>{s===L&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),L.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",A(L.postMessage)),Ht=typeof queueMicrotask<"u"?queueMicrotask.bind(L):typeof process<"u"&&process.nextTick||qe,a={isArray:D,isArrayBuffer:Le,isBuffer:nt,isFormData:ft,isArrayBufferView:rt,isString:st,isNumber:Be,isBoolean:ot,isObject:K,isPlainObject:I,isReadableStream:pt,isRequest:ht,isResponse:mt,isHeaders:yt,isUndefined:j,isDate:it,isFile:at,isBlob:ct,isRegExp:Pt,isFunction:A,isStream:lt,isURLSearchParams:dt,isTypedArray:Tt,isFileList:ut,forEach:q,merge:ne,extend:wt,trim:bt,stripBOM:Et,inherits:St,toFlatObject:Rt,kindOf:W,kindOfTest:C,endsWith:gt,toArray:Ot,forEachEntry:At,matchAll:xt,isHTMLForm:Ct,hasOwnProperty:be,hasOwnProp:be,reduceDescriptors:ke,freezeMethods:_t,toObjectSet:Ft,toCamelCase:Nt,noop:Lt,toFiniteNumber:Bt,findKey:De,global:L,isContextDefined:Ue,ALPHABET:je,generateString:Dt,isSpecCompliantForm:Ut,toJSONObject:kt,isAsyncFn:jt,isThenable:qt,setImmediate:qe,asap:Ht};function m(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}a.inherits(m,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.status}}});const He=m.prototype,Ie={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Ie[e]={value:e}});Object.defineProperties(m,Ie);Object.defineProperty(He,"isAxiosError",{value:!0});m.from=(e,t,n,r,s,o)=>{const i=Object.create(He);return a.toFlatObject(e,i,function(f){return f!==Error.prototype},c=>c!=="isAxiosError"),m.call(i,e.message,t,n,r,s),i.cause=e,i.name=e.name,o&&Object.assign(i,o),i};const It=null;function re(e){return a.isPlainObject(e)||a.isArray(e)}function Me(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function Ee(e,t,n){return e?e.concat(t).map(function(s,o){return s=Me(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function Mt(e){return a.isArray(e)&&!e.some(re)}const zt=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function G(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,h){return!a.isUndefined(h[y])});const r=n.metaTokens,s=n.visitor||l,o=n.dots,i=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(a.isDate(p))return p.toISOString();if(!f&&a.isBlob(p))throw new m("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(p)||a.isTypedArray(p)?f&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function l(p,y,h){let w=p;if(p&&!h&&typeof p=="object"){if(a.endsWith(y,"{}"))y=r?y:y.slice(0,-2),p=JSON.stringify(p);else if(a.isArray(p)&&Mt(p)||(a.isFileList(p)||a.endsWith(y,"[]"))&&(w=a.toArray(p)))return y=Me(y),w.forEach(function(g,N){!(a.isUndefined(g)||g===null)&&t.append(i===!0?Ee([y],N,o):i===null?y:y+"[]",u(g))}),!1}return re(p)?!0:(t.append(Ee(h,y,o),u(p)),!1)}const d=[],b=Object.assign(zt,{defaultVisitor:l,convertValue:u,isVisitable:re});function S(p,y){if(!a.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+y.join("."));d.push(p),a.forEach(p,function(w,R){(!(a.isUndefined(w)||w===null)&&s.call(t,w,a.isString(R)?R.trim():R,y,b))===!0&&S(w,y?y.concat(R):[R])}),d.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return S(e),t}function Se(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function le(e,t){this._pairs=[],e&&G(e,this,t)}const ze=le.prototype;ze.append=function(t,n){this._pairs.push([t,n])};ze.toString=function(t){const n=t?function(r){return t.call(this,r,Se)}:Se;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Jt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Je(e,t,n){if(!t)return e;const r=n&&n.encode||Jt,s=n&&n.serialize;let o;if(s?o=s(t,n):o=a.isURLSearchParams(t)?t.toString():new le(t,n).toString(r),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class $t{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Re=$t,$e={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Vt=typeof URLSearchParams<"u"?URLSearchParams:le,Wt=typeof FormData<"u"?FormData:null,vt=typeof Blob<"u"?Blob:null,Kt={isBrowser:!0,classes:{URLSearchParams:Vt,FormData:Wt,Blob:vt},protocols:["http","https","file","blob","url","data"]},fe=typeof window<"u"&&typeof document<"u",se=typeof navigator=="object"&&navigator||void 0,Gt=fe&&(!se||["ReactNative","NativeScript","NS"].indexOf(se.product)<0),Xt=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Qt=fe&&window.location.href||"http://localhost",Zt=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:fe,hasStandardBrowserEnv:Gt,hasStandardBrowserWebWorkerEnv:Xt,navigator:se,origin:Qt},Symbol.toStringTag,{value:"Module"})),T={...Zt,...Kt};function Yt(e,t){return G(e,new T.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,o){return T.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function en(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function tn(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r=n.length;return i=!i&&a.isArray(s)?s.length:i,f?(a.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!c):((!s[i]||!a.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&a.isArray(s[i])&&(s[i]=tn(s[i])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(en(r),s,n,0)}),n}return null}function nn(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const de={transitional:$e,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=a.isObject(t);if(o&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s?JSON.stringify(Ve(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Yt(t,this.formSerializer).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return G(c?{"files[]":t}:t,f&&new f,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),nn(t)):t}],transformResponse:[function(t){const n=this.transitional||de.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(c){if(i)throw c.name==="SyntaxError"?m.from(c,m.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:T.classes.FormData,Blob:T.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{de.headers[e]={}});const pe=de,rn=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),sn=e=>{const t={};let n,r,s;return e&&e.split(` +`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||t[n]&&rn[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},ge=Symbol("internals");function k(e){return e&&String(e).trim().toLowerCase()}function M(e){return e===!1||e==null?e:a.isArray(e)?e.map(M):String(e)}function on(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const an=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Y(e,t,n,r,s){if(a.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function cn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function un(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}class X{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(c,f,u){const l=k(f);if(!l)throw new Error("header name must be a non-empty string");const d=a.findKey(s,l);(!d||s[d]===void 0||u===!0||u===void 0&&s[d]!==!1)&&(s[d||f]=M(c))}const i=(c,f)=>a.forEach(c,(u,l)=>o(u,l,f));if(a.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(a.isString(t)&&(t=t.trim())&&!an(t))i(sn(t),n);else if(a.isHeaders(t))for(const[c,f]of t.entries())o(f,c,r);else t!=null&&o(n,t,r);return this}get(t,n){if(t=k(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return on(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=k(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Y(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=k(i),i){const c=a.findKey(r,i);c&&(!n||Y(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||Y(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return a.forEach(this,(s,o)=>{const i=a.findKey(r,o);if(i){n[i]=M(s),delete n[o];return}const c=t?cn(o):String(o).trim();c!==o&&delete n[o],n[c]=M(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[ge]=this[ge]={accessors:{}}).accessors,s=this.prototype;function o(i){const c=k(i);r[c]||(un(s,i),r[c]=!0)}return a.isArray(t)?t.forEach(o):o(t),this}}X.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(X.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});a.freezeMethods(X);const x=X;function ee(e,t){const n=this||pe,r=t||n,s=x.from(r.headers);let o=r.data;return a.forEach(e,function(c){o=c.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function We(e){return!!(e&&e.__CANCEL__)}function U(e,t,n){m.call(this,e??"canceled",m.ERR_CANCELED,t,n),this.name="CanceledError"}a.inherits(U,m,{__CANCEL__:!0});function ve(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new m("Request failed with status code "+n.status,[m.ERR_BAD_REQUEST,m.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function ln(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function fn(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(f){const u=Date.now(),l=r[o];i||(i=u),n[s]=f,r[s]=u;let d=o,b=0;for(;d!==s;)b+=n[d++],d=d%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),u-i{n=l,s=null,o&&(clearTimeout(o),o=null),e.apply(null,u)};return[(...u)=>{const l=Date.now(),d=l-n;d>=r?i(u,l):(s=u,o||(o=setTimeout(()=>{o=null,i(s)},r-d)))},()=>s&&i(s)]}const J=(e,t,n=3)=>{let r=0;const s=fn(50,250);return dn(o=>{const i=o.loaded,c=o.lengthComputable?o.total:void 0,f=i-r,u=s(f),l=i<=c;r=i;const d={loaded:i,total:c,progress:c?i/c:void 0,bytes:f,rate:u||void 0,estimated:u&&c&&l?(c-i)/u:void 0,event:o,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(d)},n)},Oe=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Te=e=>(...t)=>a.asap(()=>e(...t)),pn=T.hasStandardBrowserEnv?function(){const t=T.navigator&&/(msie|trident)/i.test(T.navigator.userAgent),n=document.createElement("a");let r;function s(o){let i=o;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=s(window.location.href),function(i){const c=a.isString(i)?s(i):i;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}(),hn=T.hasStandardBrowserEnv?{write(e,t,n,r,s,o){const i=[e+"="+encodeURIComponent(t)];a.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),a.isString(r)&&i.push("path="+r),a.isString(s)&&i.push("domain="+s),o===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function mn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function yn(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ke(e,t){return e&&!mn(t)?yn(e,t):t}const Ae=e=>e instanceof x?{...e}:e;function B(e,t){t=t||{};const n={};function r(u,l,d){return a.isPlainObject(u)&&a.isPlainObject(l)?a.merge.call({caseless:d},u,l):a.isPlainObject(l)?a.merge({},l):a.isArray(l)?l.slice():l}function s(u,l,d){if(a.isUndefined(l)){if(!a.isUndefined(u))return r(void 0,u,d)}else return r(u,l,d)}function o(u,l){if(!a.isUndefined(l))return r(void 0,l)}function i(u,l){if(a.isUndefined(l)){if(!a.isUndefined(u))return r(void 0,u)}else return r(void 0,l)}function c(u,l,d){if(d in t)return r(u,l);if(d in e)return r(void 0,u)}const f={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(u,l)=>s(Ae(u),Ae(l),!0)};return a.forEach(Object.keys(Object.assign({},e,t)),function(l){const d=f[l]||s,b=d(e[l],t[l],l);a.isUndefined(b)&&d!==c||(n[l]=b)}),n}const Ge=e=>{const t=B({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:c}=t;t.headers=i=x.from(i),t.url=Je(Ke(t.baseURL,t.url),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let f;if(a.isFormData(n)){if(T.hasStandardBrowserEnv||T.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((f=i.getContentType())!==!1){const[u,...l]=f?f.split(";").map(d=>d.trim()).filter(Boolean):[];i.setContentType([u||"multipart/form-data",...l].join("; "))}}if(T.hasStandardBrowserEnv&&(r&&a.isFunction(r)&&(r=r(t)),r||r!==!1&&pn(t.url))){const u=s&&o&&hn.read(o);u&&i.set(s,u)}return t},bn=typeof XMLHttpRequest<"u",wn=bn&&function(e){return new Promise(function(n,r){const s=Ge(e);let o=s.data;const i=x.from(s.headers).normalize();let{responseType:c,onUploadProgress:f,onDownloadProgress:u}=s,l,d,b,S,p;function y(){S&&S(),p&&p(),s.cancelToken&&s.cancelToken.unsubscribe(l),s.signal&&s.signal.removeEventListener("abort",l)}let h=new XMLHttpRequest;h.open(s.method.toUpperCase(),s.url,!0),h.timeout=s.timeout;function w(){if(!h)return;const g=x.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),O={data:!c||c==="text"||c==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:g,config:e,request:h};ve(function(F){n(F),y()},function(F){r(F),y()},O),h=null}"onloadend"in h?h.onloadend=w:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(w)},h.onabort=function(){h&&(r(new m("Request aborted",m.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new m("Network Error",m.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let N=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const O=s.transitional||$e;s.timeoutErrorMessage&&(N=s.timeoutErrorMessage),r(new m(N,O.clarifyTimeoutError?m.ETIMEDOUT:m.ECONNABORTED,e,h)),h=null},o===void 0&&i.setContentType(null),"setRequestHeader"in h&&a.forEach(i.toJSON(),function(N,O){h.setRequestHeader(O,N)}),a.isUndefined(s.withCredentials)||(h.withCredentials=!!s.withCredentials),c&&c!=="json"&&(h.responseType=s.responseType),u&&([b,p]=J(u,!0),h.addEventListener("progress",b)),f&&h.upload&&([d,S]=J(f),h.upload.addEventListener("progress",d),h.upload.addEventListener("loadend",S)),(s.cancelToken||s.signal)&&(l=g=>{h&&(r(!g||g.type?new U(null,e,h):g),h.abort(),h=null)},s.cancelToken&&s.cancelToken.subscribe(l),s.signal&&(s.signal.aborted?l():s.signal.addEventListener("abort",l)));const R=ln(s.url);if(R&&T.protocols.indexOf(R)===-1){r(new m("Unsupported protocol "+R+":",m.ERR_BAD_REQUEST,e));return}h.send(o||null)})},En=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const o=function(u){if(!s){s=!0,c();const l=u instanceof Error?u:this.reason;r.abort(l instanceof m?l:new U(l instanceof Error?l.message:l))}};let i=t&&setTimeout(()=>{i=null,o(new m(`timeout ${t} of ms exceeded`,m.ETIMEDOUT))},t);const c=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),e=null)};e.forEach(u=>u.addEventListener("abort",o));const{signal:f}=r;return f.unsubscribe=()=>a.asap(c),f}},Sn=En,Rn=function*(e,t){let n=e.byteLength;if(!t||n{const s=gn(e,t);let o=0,i,c=f=>{i||(i=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:u,value:l}=await s.next();if(u){c(),f.close();return}let d=l.byteLength;if(n){let b=o+=d;n(b)}f.enqueue(new Uint8Array(l))}catch(u){throw c(u),u}},cancel(f){return c(f),s.return()}},{highWaterMark:2})},Q=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Xe=Q&&typeof ReadableStream=="function",Tn=Q&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Qe=(e,...t)=>{try{return!!e(...t)}catch{return!1}},An=Xe&&Qe(()=>{let e=!1;const t=new Request(T.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Ce=64*1024,oe=Xe&&Qe(()=>a.isReadableStream(new Response("").body)),$={stream:oe&&(e=>e.body)};Q&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!$[t]&&($[t]=a.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new m(`Response type '${t}' is not supported`,m.ERR_NOT_SUPPORT,r)})})})(new Response);const xn=async e=>{if(e==null)return 0;if(a.isBlob(e))return e.size;if(a.isSpecCompliantForm(e))return(await new Request(T.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(a.isArrayBufferView(e)||a.isArrayBuffer(e))return e.byteLength;if(a.isURLSearchParams(e)&&(e=e+""),a.isString(e))return(await Tn(e)).byteLength},Cn=async(e,t)=>{const n=a.toFiniteNumber(e.getContentLength());return n??xn(t)},Nn=Q&&(async e=>{let{url:t,method:n,data:r,signal:s,cancelToken:o,timeout:i,onDownloadProgress:c,onUploadProgress:f,responseType:u,headers:l,withCredentials:d="same-origin",fetchOptions:b}=Ge(e);u=u?(u+"").toLowerCase():"text";let S=Sn([s,o&&o.toAbortSignal()],i),p;const y=S&&S.unsubscribe&&(()=>{S.unsubscribe()});let h;try{if(f&&An&&n!=="get"&&n!=="head"&&(h=await Cn(l,r))!==0){let O=new Request(t,{method:"POST",body:r,duplex:"half"}),P;if(a.isFormData(r)&&(P=O.headers.get("content-type"))&&l.setContentType(P),O.body){const[F,H]=Oe(h,J(Te(f)));r=xe(O.body,Ce,F,H)}}a.isString(d)||(d=d?"include":"omit");const w="credentials"in Request.prototype;p=new Request(t,{...b,signal:S,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:r,duplex:"half",credentials:w?d:void 0});let R=await fetch(p);const g=oe&&(u==="stream"||u==="response");if(oe&&(c||g&&y)){const O={};["status","statusText","headers"].forEach(ye=>{O[ye]=R[ye]});const P=a.toFiniteNumber(R.headers.get("content-length")),[F,H]=c&&Oe(P,J(Te(c),!0))||[];R=new Response(xe(R.body,Ce,F,()=>{H&&H(),y&&y()}),O)}u=u||"text";let N=await $[a.findKey($,u)||"text"](R,e);return!g&&y&&y(),await new Promise((O,P)=>{ve(O,P,{data:N,headers:x.from(R.headers),status:R.status,statusText:R.statusText,config:e,request:p})})}catch(w){throw y&&y(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new m("Network Error",m.ERR_NETWORK,e,p),{cause:w.cause||w}):m.from(w,w&&w.code,e,p)}}),ie={http:It,xhr:wn,fetch:Nn};a.forEach(ie,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ne=e=>`- ${e}`,Pn=e=>a.isFunction(e)||e===null||e===!1,Ze={getAdapter:e=>{e=a.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let o=0;o`adapter ${c} `+(f===!1?"is not supported by the environment":"is not available in the build"));let i=t?o.length>1?`since : +`+o.map(Ne).join(` +`):" "+Ne(o[0]):"as no adapter specified";throw new m("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:ie};function te(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new U(null,e)}function Pe(e){return te(e),e.headers=x.from(e.headers),e.data=ee.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ze.getAdapter(e.adapter||pe.adapter)(e).then(function(r){return te(e),r.data=ee.call(e,e.transformResponse,r),r.headers=x.from(r.headers),r},function(r){return We(r)||(te(e),r&&r.response&&(r.response.data=ee.call(e,e.transformResponse,r.response),r.response.headers=x.from(r.response.headers))),Promise.reject(r)})}const Ye="1.7.7",he={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{he[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const _e={};he.transitional=function(t,n,r){function s(o,i){return"[Axios v"+Ye+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,c)=>{if(t===!1)throw new m(s(i," has been removed"+(n?" in "+n:"")),m.ERR_DEPRECATED);return n&&!_e[i]&&(_e[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,c):!0}};function _n(e,t,n){if(typeof e!="object")throw new m("options must be an object",m.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=t[o];if(i){const c=e[o],f=c===void 0||i(c,o,e);if(f!==!0)throw new m("option "+o+" must be "+f,m.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new m("Unknown option "+o,m.ERR_BAD_OPTION)}}const ae={assertOptions:_n,validators:he},_=ae.validators;class V{constructor(t){this.defaults=t,this.interceptors={request:new Re,response:new Re}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` +`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=B(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&ae.assertOptions(r,{silentJSONParsing:_.transitional(_.boolean),forcedJSONParsing:_.transitional(_.boolean),clarifyTimeoutError:_.transitional(_.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:ae.assertOptions(s,{encode:_.function,serialize:_.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&a.merge(o.common,o[n.method]);o&&a.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),n.headers=x.concat(i,o);const c=[];let f=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(f=f&&y.synchronous,c.unshift(y.fulfilled,y.rejected))});const u=[];this.interceptors.response.forEach(function(y){u.push(y.fulfilled,y.rejected)});let l,d=0,b;if(!f){const p=[Pe.bind(this),void 0];for(p.unshift.apply(p,c),p.push.apply(p,u),b=p.length,l=Promise.resolve(n);d{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(c=>{r.subscribe(c),o=c}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,c){r.reason||(r.reason=new U(o,i,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new me(function(s){t=s}),cancel:t}}}const Fn=me;function Ln(e){return function(n){return e.apply(null,n)}}function Bn(e){return a.isObject(e)&&e.isAxiosError===!0}const ce={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ce).forEach(([e,t])=>{ce[t]=e});const Dn=ce;function et(e){const t=new z(e),n=Fe(z.prototype.request,t);return a.extend(n,z.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return et(B(e,s))},n}const E=et(pe);E.Axios=z;E.CanceledError=U;E.CancelToken=Fn;E.isCancel=We;E.VERSION=Ye;E.toFormData=G;E.AxiosError=m;E.Cancel=E.CanceledError;E.all=function(t){return Promise.all(t)};E.spread=Ln;E.isAxiosError=Bn;E.mergeConfig=B;E.AxiosHeaders=x;E.formToJSON=e=>Ve(a.isHTMLForm(e)?new FormData(e):e);E.getAdapter=Ze.getAdapter;E.HttpStatusCode=Dn;E.default=E;const Un=E;export{Un as a}; diff --git a/assets/clf-1594e706.js b/assets/clf-1594e706.js new file mode 100644 index 0000000..17e928b --- /dev/null +++ b/assets/clf-1594e706.js @@ -0,0 +1,35 @@ +var T=Object.defineProperty;var C=(t,s,i)=>s in t?T(t,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[s]=i;var l=(t,s,i)=>(C(t,typeof s!="symbol"?s+"":s,i),i);import{s as S}from"./utils-bf63a336.js";import{j as e,r as o,g as w,a as f,c as v,N as F}from"./nav-0789d0b5.js";import{S as k,A as M,T as z}from"./showcase-048341fb.js";function P({children:t,heading:s,...i}){return e.jsxs("div",{className:"details",children:[s||"",e.jsxs("details",{...i,children:[e.jsx("summary",{children:""}),t]})]})}function A(){return e.jsxs(e.Fragment,{children:[e.jsx("h3",{children:"Phase One: Planning"}),e.jsx("p",{children:"The most important part to ensuring a quality website is knowing what to build. After talking with the owner, it was determined that their primary concerns were a simple design and strong Search Engine Optimization."}),e.jsx(P,{open:!0,heading:e.jsx("h4",{children:"Questions I asked before building the site"}),children:e.jsxs("ol",{children:[e.jsx("li",{children:"What does the site do? What should users be able to accomplish?"}),e.jsx("p",{children:"The site should allow people to view puppies and their parents as well as past litters from parents. The focus should be on informing people about puppies we have available. The end goal would be to users fill out a form to apply for a puppy or sign up to be notified about the next litter."}),e.jsxs("li",{children:["What are some similar sites that you like? How about ones you don’t like?",e.jsxs("p",{children:["Example sites are featured ",e.jsx("a",{href:"#example-sites",children:"below"}),"."]})]}),e.jsxs("li",{children:["Is this a completely new site, or are giving the existing one a makeover?",e.jsx("p",{children:"This will be a completely new site done from scratch."})]}),e.jsxs("li",{children:["Are we talking a webpage or a web of pages?",e.jsx("p",{children:"It will likely operate more like a web app. So, a web of pages is closer."})]}),e.jsxs("li",{children:["Will you want to add, edit, and delete pages yourself?",e.jsx("p",{children:"Updating pictures and information about dogs and puppies should be all that is needed to keep things running."})]}),e.jsxs("li",{children:["Think you’ll want to do some blogging on there? If so, is there a CMS you already like?",e.jsx("p",{children:"No blog will be necessary. Engages with audience on social media."})]}),e.jsxs("li",{children:["Do you have a certain design in mind, or can it be some out-of-the-box template?",e.jsx("p",{children:"The design should be completely uniue."})]}),e.jsxs("li",{children:["Should visitors be able to contact you through a form? Where do you plan on storing form submissions? (Many more questions were included here.)",e.jsx("p",{children:"Visitors and contacts will be managed through Zoho. Owners' email address will be made public with the help of a scrape shield for a bit of protection. A privacy policy will need to be created before collecting any information from visitors."})]}),e.jsxs("li",{children:["Are you planning to sell these puppies through the site?",e.jsx("p",{children:"The site will only need to manage the acceptance of Applications. Owner will handle payment processing."})]}),e.jsxs("li",{children:["Do you have content and images, or will you need help with those?",e.jsx("p",{children:"Plenty of Images. Graphics will need to be created for the design."})]}),e.jsxs("li",{children:["Does it need to support multiple languages?",e.jsx("p",{children:"U.S. English will be all. This is a locally operated business."})]}),e.jsxs("li",{children:["Who will be responsible for looking after the site after it’s done? Will someone need to be trained, or are you looking for a contractor to maintain things?",e.jsx("p",{children:"The site should be simple enough for the owner to maintain on their own after completion."})]}),e.jsxs("li",{children:["How do you want people to find your site?",e.jsx("p",{children:"Search Engine Optimization is a major priority."})]}),e.jsxs("li",{children:["If you want your site to be “better, faster, and cheaper” but can only pick two of them, which two would you choose?",e.jsx("p",{children:"Managed to do all of these. 😉"})]}),e.jsxs("li",{children:["What’s your budget?",e.jsx("p",{children:"Domain will be the only cost."})]})]})}),e.jsx("div",{id:"example-sites",children:e.jsx(k,{db:new Map([[{empty:0,hilltop:1,gravelle:2},[{id:"empty",img:e.jsx(e.Fragment,{children:e.jsxs("div",{style:{textAlign:"left"},children:[e.jsx("h3",{children:"Example Sites"}),e.jsx("p",{children:"These two sites were given as a pattern to work from."}),e.jsx("p",{children:"They both had a focused on whitespace, artistic fonts, and simplicity, I wanted to take things a little bit further."})]})})},{id:"hilltop",title:"Hilltop Poodles and Doodles",link:["https://www.hilltopdoodlesandpoodles.com","_blank"],img:e.jsx("img",{src:"/static/img/hilltop-doodles-ss.png",alt:"Screenshot taken from hilltopdoodlesandpoodles.com"})},{id:"gravelle",title:"Gravelle Family Farm",link:["https://www.gravellefamilyfarm.com/","_blank"],img:e.jsx("img",{src:"/static/img/gravelle-family-farm-ss.png",alt:"Screenshot taken from gravellefamilyfarm.com"})}]]])})})]})}/*! + * @gsap/react 2.1.1 + * https://gsap.com + * + * Copyright 2008-2024, GreenSock. All rights reserved. + * Subject to the terms at https://gsap.com/standard-license or for + * Club GSAP members, the agreement issued with that membership. + * @author: Jack Doyle, jack@greensock.com +*/let j=typeof window<"u"?o.useLayoutEffect:o.useEffect,b=t=>t&&!Array.isArray(t)&&typeof t=="object",u=[],L={},I=w;const y=(t,s=u)=>{let i=L;b(t)?(i=t,t=null,s="dependencies"in i?i.dependencies:u):b(s)&&(i=s,s="dependencies"in i?i.dependencies:u),t&&typeof t!="function"&&console.warn("First parameter must be a function or config object");const{scope:n,revertOnUpdate:c}=i,r=o.useRef(!1),a=o.useRef(I.context(()=>{},n)),h=o.useRef(m=>a.current.add(null,m)),d=s&&s.length&&!c;return j(()=>{if(t&&a.current.add(t,n),!d||!r.current)return()=>a.current.revert()},s),d&&j(()=>(r.current=!0,()=>a.current.revert()),u),{context:a.current,contextSafe:h.current}};y.register=t=>{I=t};y.headless=!0;class N{constructor(s,i,n){l(this,"zoomTl");l(this,"container");l(this,"selector");l(this,"initialWidth");this.selector=i,this.container=s,this.initialWidth=n}createTimeline(){const s={duration:.5,ease:"power2.inOut"};this.zoomTl=w.timeline({defaults:s}).to([this.selector,this.container],{width:"100%",flex:1}).to("svg",{duration:0,opacity:1,zIndex:2,width:"revert",height:"revert"}),this.zoom()}async zoom(){if(this.zoomTl||this.createTimeline(),!this.zoomTl)throw new Error("Zoom Animation was not successfully created");await this.zoomTl.reversed(!this.zoomTl.reversed())}}function D({img:t,container:s,initialWidth:i}){const n=s||o.useRef(null),c=o.useRef(null),r=o.useRef(null),a=o.useRef(null),h=o.useRef(null),{contextSafe:d}=y(async()=>{a.current=new N(n.current,h.current,i),r.current=w.timeline(),r.current.to(c.current,{opacity:1,height:"initial",duration:.2,ease:"power2.inOut"}),await r.current.play()},{scope:n}),m=d(()=>{if(!a.current)throw new Error("Zoom Animation not successfully created");a.current.zoom(),r.current.reversed(!r.current.reversed())}),x=g=>{(g.key==="Enter"||g.key===" "||g.key==="Escape")&&m()},p=25;return e.jsxs("button",{className:"zoomable-image",style:{width:i+p+"px"},ref:n,onClick:m,onKeyUp:x,children:[e.jsxs("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-label":"Zoom Image",role:"button",tabIndex:0,width:p*2,height:p*2,viewBox:"-5,-5,266,266",onKeyUp:x,children:[e.jsx("rect",{fill:"#ffffff",stroke:"#424b54",strokeWidth:"10",width:"256",height:"256",rx:"40"}),e.jsx("g",{transform:"scale(5.12,5.12)",children:e.jsx("path",{fill:"#424b54",d:"M5.97852,3.98047c-0.81349,0.00101 -1.54534,0.49459 -1.85108,1.24844c-0.30574,0.75385 -0.12447,1.61777 0.4585,2.18515l10.58594,10.58594h-5.17187c-0.72127,-0.0102 -1.39216,0.36875 -1.75578,0.99175c-0.36361,0.623 -0.36361,1.39351 0,2.01651c0.36361,0.623 1.0345,1.00195 1.75578,0.99175h12v-12c0.00739,-0.54026 -0.2041,-1.06052 -0.58634,-1.44239c-0.38224,-0.38187 -0.90271,-0.59286 -1.44296,-0.58495c-1.1038,0.01618 -1.9858,0.92353 -1.9707,2.02734v5.17188l-10.58594,-10.58594c-0.37701,-0.38755 -0.89487,-0.60596 -1.43555,-0.60547zM43.96094,3.98047c-0.5196,0.01548 -1.01276,0.23264 -1.375,0.60547l-10.58594,10.58594v-5.17187c0.00739,-0.54026 -0.2041,-1.06052 -0.58634,-1.44239c-0.38224,-0.38187 -0.90271,-0.59286 -1.44296,-0.58495c-1.1038,0.01618 -1.9858,0.92353 -1.9707,2.02734v12h12c0.72127,0.0102 1.39216,-0.36875 1.75578,-0.99175c0.36361,-0.623 0.36361,-1.39351 0,-2.01651c-0.36361,-0.623 -1.0345,-1.00195 -1.75578,-0.99175h-5.17187l10.58594,-10.58594c0.59152,-0.57498 0.76938,-1.45413 0.44787,-2.21383c-0.32151,-0.75969 -1.07643,-1.24409 -1.90099,-1.21977zM10,28c-0.72127,-0.0102 -1.39216,0.36875 -1.75578,0.99175c-0.36361,0.623 -0.36361,1.39351 0,2.01651c0.36361,0.623 1.0345,1.00195 1.75578,0.99175h5.17188l-10.58594,10.58594c-0.52247,0.50163 -0.73294,1.24653 -0.55022,1.94741c0.18271,0.70088 0.73006,1.24822 1.43094,1.43094c0.70088,0.18271 1.44578,-0.02775 1.94741,-0.55022l10.58594,-10.58594v5.17188c-0.0102,0.72127 0.36875,1.39216 0.99175,1.75578c0.623,0.36361 1.39351,0.36361 2.01651,0c0.623,-0.36361 1.00195,-1.0345 0.99175,-1.75578v-12zM28,28v12c-0.0102,0.72127 0.36875,1.39216 0.99175,1.75578c0.623,0.36361 1.39351,0.36361 2.01651,0c0.623,-0.36361 1.00195,-1.0345 0.99175,-1.75578v-5.17187l10.58594,10.58594c0.50163,0.52248 1.24653,0.73295 1.94742,0.55024c0.70088,-0.18271 1.24823,-0.73006 1.43094,-1.43094c0.18271,-0.70088 -0.02776,-1.44578 -0.55024,-1.94742l-10.58594,-10.58594h5.17188c0.72127,0.0102 1.39216,-0.36875 1.75578,-0.99175c0.36361,-0.623 0.36361,-1.39351 0,-2.01651c-0.36361,-0.623 -1.0345,-1.00195 -1.75578,-0.99175z"})})]}),e.jsx("p",{className:"zoomable-image_clickExpand",style:{width:i},ref:c,children:"Click to Expand"}),e.jsx("img",{...t,width:i,src:t.src,className:t.className?t.className:"",ref:h})]})}function E(){const[t,s]=o.useState("section-1"),i=400,n=new Map([[{showcased:0,"clf-section-2":1,"clf-section-3":2,"clf-404":3,"clf-section-1":4},[{id:"showcased",img:e.jsx(e.Fragment,{children:e.jsx(D,{initialWidth:i,img:{className:"showcase_zoomable-image",src:`/static/img/CLF-${t}.png`,alt:"Mock-up of Cherry Lane Farms"}})})},{id:"clf-section-2",title:"Wood Section",onClick:()=>s("section-2"),img:e.jsx("img",{src:"/static/img/CLF-section-2.png",alt:"Mock-up of Cherry Lane Farms"})},{id:"clf-section-3",title:"Tan Section",onClick:()=>s("section-3"),img:e.jsx("img",{src:"/static/img/CLF-section-3.png",alt:"Mock-up of Cherry Lane Farms"})},{id:"clf-404",title:"404 Page",onClick:()=>s("404"),img:e.jsx("img",{src:"/static/img/CLF-404.png",alt:"Mock-up of Cherry Lane Farms"})},{id:"clf-section-1",title:"Topmost Section",onClick:()=>s("section-1"),img:e.jsx("img",{src:"/static/img/CLF-section-1.png",alt:"Mock-up of Cherry Lane Farms"})}]]]);return e.jsxs(e.Fragment,{children:[e.jsx("h3",{children:"Phase Two: Design"}),e.jsx(M,{sideText:e.jsx("i",{children:e.jsx("p",{children:"The color scheme I created is characterized by a uniform luminance and contrast ratio across the entire pallete."})}),sideText_classPrefix:"clf-figma",imgClass:"clf-figma-color-theme",imgSrc:"/static/img/CLF-color-theme.png",imgAlt:"Color pallete for Cherry Lane Farms"}),e.jsxs("p",{children:["Figma is one of the foremost tools for web design. It has a focus on collaboration very similar to"," ",e.jsx(f,{link:"https://apps.nextcloud.com/apps/whiteboard",children:"Nextcloud's new Whiteboard app"}),". I used Figma to create a mock-up of the site. Allowing me a space to collaborate with the owner on the UX and UI of the site before anything was hardcoded."]}),e.jsx(k,{db:n}),e.jsx("p",{children:"This process included building out all components and other visual graphics that would be used in the site early on. There was definitely a learning curve with Figma, but taking the time to plan the design of the site before building it saved me a lot of time reworking things later on."}),e.jsx("h4",{children:"If I could go back"}),e.jsx("p",{children:"I think I wouldn't have spent so much effort with the little details, like filling the mock-up with up-to-date content. Although this provided a very clear picture for the client, the extra time it took to gather and create some of these timely visual elements of the site did not help when I didn't end up using them."}),e.jsx("p",{children:`As great as Figma is, some design aspects are still better done as code is being written. In fact, I found that parts of Figma's interface were more cumbersome than straight code would have been in design. For example, Figma's "auto-layout" tools are very similar to how flex-box and grid displays work in CSS. Despite this, they are definitely not easier to mock. I found myself wanting to simply use my browser Dev Tools to write out what I wanted instead of trying to wrestle with Figma's 'auto-layout'. To its credit, Figma's variable system did translate very easily into Sass variables.`})]})}function R({children:t}){return e.jsx("div",{className:"pre",children:e.jsx("pre",{children:t})})}function W(){return e.jsxs(e.Fragment,{children:[e.jsx("h3",{children:"Phase Three: Backend"}),e.jsx("h4",{children:"Cloudflare"}),e.jsx("p",{children:"The backend system for the site was built entirely serverless. Cloudflare, despite their many crimes against the internet, offer an unmatchable amount of free services. Everything from the relational database to the Next.js cache, all the way to the image delivery system was built using Cloudflare's services."}),e.jsx("h4",{children:"Relational Database"}),e.jsx("p",{children:"Initially, I thought I would be using Cloudflare Workers KV for the database. KV is a NoSQL solution though. I needed a relational database in order to define dog families. I quickly realized this was going to be a non-negotiable feature for this dog breeding site. After careful consideration of many options, I decided to use Cloudflare's D1 Sqlite database."}),e.jsxs("aside",{children:[e.jsx("h4",{children:"D1 is still new"}),e.jsxs("p",{children:["D1 is still being adopted by the devolpment community. So, I quickly became deeply familiar with Cloudflare's documentation. This lead me to making"," ",e.jsx(f,{link:"https://github.com/search?q=is%3Apr%20author%3AtheTyster%20archived%3Afalse%20cloudflare%20&type=pullrequests",children:"several contributions"})," ","to their documentation during the development of the site."]})]}),e.jsx("h5",{children:"Here's a visual example of the schema I ended up creating for this Database"}),e.jsx(R,{children:` + ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ + │ Group_Photos │ │ Headshots_Lg │ │ Headshots_Sm │ + └──────────────┘ └──────────────┘ └──────────────┘ + 1:M │ │ │ │ + │ └──────────┼─────────┘ + │ └────┐ + v V 1:1 + ┌─────────────────────┐ M:M ┌──────┐ + │ Dog_To_Group_Photos │<=====>│ Dogs │ + └─────────────────────┘ └──────┘ + / 1:1 \\ + / \\ + / \\ + v v + ┌─────────┐ ┌────────┐ + │ Puppies │ │ Adults │ + └─────────┘ └────────┘ + \\ M:1 / \\ 2:1 / + \\ / \\ / + \\ / \\ / + │ │ + v v + ┌─────────┐ 1:1 ┌──────────┐ + │ Litters │────>│ Families │ + └─────────┘ └──────────┘ + `}),e.jsx("p",{children:"This boiled down to only five total queries for site data and one complex query requiring aggregated 'Select' statements. Nevertheless, in the interest of squeezing every bit of speed I knew how to out of the site, I built a caching and validation function to cache the results of these six queries in Cloudflare's KV storage three times a day."}),e.jsx("img",{src:"/static/img/backend-architecture.svg",alt:"Cherry Lane Farms Back End Image Management map."}),e.jsx("p",{children:"This not only reduces queries, to a standard rate, (Something that could eventually cost money if it got out of hand.) but it also stores the results closer to users since KV storage is more distributed across Cloudflares CDN than D1 is currently."}),e.jsx("h4",{children:"Image Delivery"}),e.jsx("p",{children:"Protecting proprietary images was a priority for the owner. Apparently it is not uncommon for puppy mills to steal images off the internet and use them to market off their own dogs."}),e.jsx("p",{children:"With this in mind, I devised a way to not only optimize images, but also secure them, and the image optimization service from abuse."}),e.jsx("img",{src:"/static/img/image-delivery.svg",alt:"Cherry Lane Farms Image Delivery Architectural map."}),e.jsx("p",{children:"Cloudflare's image delivery service optimizes images as they are accessed and immediately caches them on the edge. The first time an image is accessed, it is optimized and then stored on the edge server."}),e.jsx("p",{children:"Using this service is very easy. It simply requires a minor change to the sources image URL. The problem was that, once enabled, anyone savvy enough to discover that the service is in use can make the same alteration and siphon optimizations from your image delivery worker. This can lead to a large bill from Cloudflare."}),e.jsx("h5",{children:"The Creation of CripToe"}),e.jsx("p",{children:"For a small website like this that would otherwise have no costs for image delivery, I was determined to lock everything down."}),e.jsxs("p",{children:["So, I created my first NPM package,"," ",e.jsx(f,{link:"https://www.npmjs.com/package/criptoe",children:"CripToe"}),". CripToe simply encrypts and decrypts URL strings. I used this to encrypt the image delivery URL and programmed the worker to reject any optimizations that could not be decrypted. Then, all that was left was to encrypt and hash all of the images and store the encrypted URLs in the database."]})]})}function q(){return e.jsxs(e.Fragment,{children:[e.jsx("h3",{children:"Phase Four: Frontend"}),e.jsx("h4",{children:"Typescript & Next.JS"}),e.jsx("p",{children:"I chose to use Next.js for this project because of its support for TypeScript and its ability to generate static sites. Since Search Engine optimization was such a priority for this client, I wanted to be have an end product that was as SEO friendly as possible. Next.js has the most community support and is by far the most widely used static site generator. In an interest to learn a framework that could be used in a professional setting, I chose Next.js."}),e.jsx("img",{src:"/static/img/typescript-and-next.png",alt:"Typescript + Next.JS"}),e.jsx("p",{children:"Typescript was chosen for similar reasons as Next.js. I was only really aware of Typescript's existence and what it was on a surface level before starting this project. But, I knew I wanted something that would produce stable code, and I wanted an opportunity to get experience with a statically typed language. Typescript, once again being the most popular choice, was the reason I used it in this project."}),e.jsx("p",{children:"Having never used any of these tools before, I have to say that I was happy with how easily I was able to pick them up."}),e.jsx("h4",{children:"CMS"}),e.jsx("img",{src:"/static/img/zoho-logo.png",alt:"Zoho's Logo"}),e.jsx("p",{children:"One of the first things I did was to set up a CMS for the owner to use. I chose to use Zoho CRM for this because it was free and easy to set up. I also set up a system for the owner to receive emails when a new customer signed up on the site. This was done using Gmail and an SMTP server that I connected to the domain."}),e.jsx("h4",{children:"Business Email"}),e.jsx("p",{children:"Setting up a business email was not too difficult. I used Gmail and MailerSend, a free SMTP server that I connected to the domain. Then, I connected that business address and SMTP provider directly to the owner's Gmail account. This allowed the owner to receive and respond to emails from clients without needing a new inbox."}),e.jsx("p",{children:"Additionally, since we were using our own SMTP provider instead of routing them through Gmail's SMTP, the owner's primary Gmail email will not be visible in email headers and they have a much stronger deliverability rate."})]})}const U=()=>(S("The Creation of Cherry Lane Farms"),e.jsxs("main",{children:[e.jsx("img",{className:"hero",src:"/static/img/mt_fuji.jpg",alt:"Painting of Mt. Fuji."}),e.jsxs("p",{children:[e.jsxs("a",{href:"https://original.cherrylanefarmdoodles.com/about/development",children:["Cherry Lane Farm Doodles"," "]}),"is a family-owned and operated business that breeds and raises Goldendoodles. This website/webapp was created to help them manage their business."]}),e.jsx("p",{children:"I had 5 goals in mind:"}),e.jsxs("ol",{children:[e.jsx("li",{children:"Easy to use."}),e.jsx("li",{children:"Only pay for the domain."}),e.jsx("li",{children:"Lightning fast."}),e.jsx("li",{children:"Maximum Accessibility."}),e.jsxs("li",{children:["Full-featured. Should accommodate:",e.jsxs("ul",{children:[e.jsx("li",{children:"Marketing"}),e.jsx("li",{children:"Sales"}),e.jsx("li",{children:"Customer Management"}),e.jsx("li",{children:"Product Management"})]})]})]}),e.jsx("p",{children:"This project turned out to be an excellent opportunity for me to express my full range of capability in web development. Everything from design to implementation was done by me."}),e.jsx("h2",{children:"When I started this project, I had never…"}),e.jsxs("ul",{children:[e.jsxs("li",{children:["Successfully created a custom email address for free.",e.jsx("p",{children:"I learned how to integrate the owner's Gmail accounts with an SMTP server that I connected to their domain."})]}),e.jsxs("li",{children:["Used Zoho.",e.jsx("p",{children:"I learned how to use Zoho as a customer relationship manager for the owners. My familiarity with Hubspot helped, but every CRM is a bit different."})]}),e.jsxs("li",{children:["Worked with a web design tool.",e.jsx("p",{children:"I learned to use Figma to create design components and mock-ups."})]}),e.jsxs("li",{children:["Touched Typescript; Next.js; Cloudflare Pages, D1, R2, Workers, or KV.",e.jsx("p",{children:"I learned how to use all of these tools for the first time as I built the site."})]}),e.jsxs("li",{children:["Built my own NPM package.",e.jsx("p",{children:"This was something that was necessary for the project in order to have a set of utilities that could be used across the site various environments that I was working with."})]})]}),e.jsx("h4",{children:"Why is this is so great?"}),e.jsx("p",{children:"This project included the first backend system I have ever designed from beginning to end. I suppose it might not be the most complex system, but I am proud of the fact that I was able to learn it from scratch and implement it from beginning to end."}),e.jsx("p",{children:"In the end, the only cost to build this website was the domain. If the rate of images created stays constant, the only potential cost could be for the SMTP server if the volume of emails sent ever surpasses a few thousand in a single day."}),e.jsx("p",{children:"The site is completely serverless and hosted entirely on the edge. On top of that, the statically generated assets and asynchronous loading done by Next.JS means that this website turned out to be remarkably fast."}),e.jsx("h2",{children:"Four Phases in Four Months"}),e.jsx(z,{menuItems:new Map([[{initial:0,design:1,backend:2,frontend:3},[{id:"initial",title:"Planning",component:e.jsx(A,{})},{id:"design",title:"Design",component:e.jsx(E,{})},{id:"backend",title:"Backend",component:e.jsx(W,{})},{id:"frontend",title:"Frontend",component:e.jsx(q,{})}]]])})]})),G=v.createRoot(document.getElementById("nav"));G.render(e.jsx(o.StrictMode,{children:e.jsx(F,{})}));const _=v.createRoot(document.getElementById("content"));_.render(e.jsx(o.StrictMode,{children:e.jsx(U,{})})); diff --git a/assets/fonts-780f77ae.css b/assets/fonts-780f77ae.css new file mode 100644 index 0000000..7dd9e14 --- /dev/null +++ b/assets/fonts-780f77ae.css @@ -0,0 +1 @@ +@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-ExtraLight.woff2) format("woff2"),url(/static/fonts/Nunito-ExtraLight.woff) format("woff");font-weight:200;font-style:normal;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-Light.woff2) format("woff2"),url(/static/fonts/Nunito-Light.woff) format("woff");font-weight:300;font-style:normal;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-Medium.woff2) format("woff2"),url(/static/fonts/Nunito-Medium.woff) format("woff");font-weight:500;font-style:normal;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-BoldItalic.woff2) format("woff2"),url(/static/fonts/Nunito-BoldItalic.woff) format("woff");font-weight:700;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-Bold.woff2) format("woff2"),url(/static/fonts/Nunito-Bold.woff) format("woff");font-weight:700;font-style:normal;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-Regular.woff2) format("woff2"),url(/static/fonts/Nunito-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-BlackItalic.woff2) format("woff2"),url(/static/fonts/Nunito-BlackItalic.woff) format("woff");font-weight:900;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-LightItalic.woff2) format("woff2"),url(/static/fonts/Nunito-LightItalic.woff) format("woff");font-weight:300;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-ExtraBoldItalic.woff2) format("woff2"),url(/static/fonts/Nunito-ExtraBoldItalic.woff) format("woff");font-weight:700;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-ExtraLightItalic.woff2) format("woff2"),url(/static/fonts/Nunito-ExtraLightItalic.woff) format("woff");font-weight:200;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-Italic.woff2) format("woff2"),url(/static/fonts/Nunito-Italic.woff) format("woff");font-weight:400;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-ExtraLight.woff2) format("woff2"),url(/static/fonts/Nunito-ExtraLight.woff) format("woff");font-weight:200;font-style:normal;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-ExtraLightItalic.woff2) format("woff2"),url(/static/fonts/Nunito-ExtraLightItalic.woff) format("woff");font-weight:200;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-SemiBold.woff2) format("woff2"),url(/static/fonts/Nunito-SemiBold.woff) format("woff");font-weight:600;font-style:normal;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-ExtraBold.woff2) format("woff2"),url(/static/fonts/Nunito-ExtraBold.woff) format("woff");font-weight:700;font-style:normal;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-SemiBoldItalic.woff2) format("woff2"),url(/static/fonts/Nunito-SemiBoldItalic.woff) format("woff");font-weight:600;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-MediumItalic.woff2) format("woff2"),url(/static/fonts/Nunito-MediumItalic.woff) format("woff");font-weight:500;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-Black.woff2) format("woff2"),url(/static/fonts/Nunito-Black.woff) format("woff");font-weight:900;font-style:normal;font-display:swap} diff --git a/assets/index-3f6eae5c.css b/assets/index-3f6eae5c.css new file mode 100644 index 0000000..c8c6cc2 --- /dev/null +++ b/assets/index-3f6eae5c.css @@ -0,0 +1 @@ +*{margin:0}html,body{height:100%}:root{--light-blue: #115ff4;--dark-blue: #060ce9;--green: #28a200;--light-purple: #8d2ab5;--dark-purple: #74119c}body{background:#333;color:#fff}.container{display:flex}.flex-items{flex:1}.game{flex:.8}img{display:block;border-radius:10px;margin:10px auto;animation:3s linear infinite shimmy}button{display:block;margin:20px auto;background:var(--light-purple);color:#fff;border:none;border-radius:7px;padding:10px}button:hover{filter:drop-shadow(0 0 4px black)}button:active{background:var(--dark-purple);filter:none}.answer,table{display:none}.loading{margin:50px auto;animation:3s linear infinite rotate}tr{height:100px}.answer,.question{text-transform:capitalize;display:none}.answer,strong,.question{cursor:default}th{max-height:70px;text-transform:capitalize;background-color:var(--dark-blue);border:5px solid white;box-sizing:border-box}td{text-align:center;font-size:10pt;background-color:var(--dark-blue);border:1px solid white;min-width:100px;box-sizing:border-box}@media screen and (max-width: 400px){img:not(.loading){width:100vw}}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes shimmy{33%{transform:rotate(-3deg)}66%{transform:rotate(3deg)}}.noscript{position:relative;top:-50%;padding:50px;text-align:center;background:darkred;color:#fff} diff --git a/assets/index-b264da58.css b/assets/index-b264da58.css new file mode 100644 index 0000000..b1ec722 --- /dev/null +++ b/assets/index-b264da58.css @@ -0,0 +1 @@ +@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-ExtraLight.woff2) format("woff2"),url(/static/fonts/Nunito-ExtraLight.woff) format("woff");font-weight:200;font-style:normal;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-Light.woff2) format("woff2"),url(/static/fonts/Nunito-Light.woff) format("woff");font-weight:300;font-style:normal;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-Medium.woff2) format("woff2"),url(/static/fonts/Nunito-Medium.woff) format("woff");font-weight:500;font-style:normal;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-BoldItalic.woff2) format("woff2"),url(/static/fonts/Nunito-BoldItalic.woff) format("woff");font-weight:700;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-Bold.woff2) format("woff2"),url(/static/fonts/Nunito-Bold.woff) format("woff");font-weight:700;font-style:normal;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-Regular.woff2) format("woff2"),url(/static/fonts/Nunito-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-BlackItalic.woff2) format("woff2"),url(/static/fonts/Nunito-BlackItalic.woff) format("woff");font-weight:900;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-LightItalic.woff2) format("woff2"),url(/static/fonts/Nunito-LightItalic.woff) format("woff");font-weight:300;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-ExtraBoldItalic.woff2) format("woff2"),url(/static/fonts/Nunito-ExtraBoldItalic.woff) format("woff");font-weight:700;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-ExtraLightItalic.woff2) format("woff2"),url(/static/fonts/Nunito-ExtraLightItalic.woff) format("woff");font-weight:200;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-Italic.woff2) format("woff2"),url(/static/fonts/Nunito-Italic.woff) format("woff");font-weight:400;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-ExtraLight.woff2) format("woff2"),url(/static/fonts/Nunito-ExtraLight.woff) format("woff");font-weight:200;font-style:normal;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-ExtraLightItalic.woff2) format("woff2"),url(/static/fonts/Nunito-ExtraLightItalic.woff) format("woff");font-weight:200;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-SemiBold.woff2) format("woff2"),url(/static/fonts/Nunito-SemiBold.woff) format("woff");font-weight:600;font-style:normal;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-ExtraBold.woff2) format("woff2"),url(/static/fonts/Nunito-ExtraBold.woff) format("woff");font-weight:700;font-style:normal;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-SemiBoldItalic.woff2) format("woff2"),url(/static/fonts/Nunito-SemiBoldItalic.woff) format("woff");font-weight:600;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-MediumItalic.woff2) format("woff2"),url(/static/fonts/Nunito-MediumItalic.woff) format("woff");font-weight:500;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-Black.woff2) format("woff2"),url(/static/fonts/Nunito-Black.woff) format("woff");font-weight:900;font-style:normal;font-display:swap}html{max-height:100% vh;max-width:100% vw;overflow-x:hidden}body{background-color:#e1ce7a;background-image:url(/static/img/splat-dark.svg);background-attachment:fixed;transition:background-color 2s}body div#content,body div#noscript-content{display:flex;flex-direction:column;align-items:stretch}.page-title{text-align:center;padding:2rem}header{display:block}header .home-button{width:100%;display:block;border-radius:100%;text-align:center;cursor:pointer;transition:transform .4s}header .home-button img{max-width:350px}header .home-button:hover{transform:translateY(10px)}header .home-button:active{transform:translateY(20px)}header .home-button svg{display:block;width:100%;height:auto}main{position:relative;flex-grow:1;margin:0 auto;display:block;max-width:800px;padding:2rem;background:white;border-radius:7px}aside{background-color:#f0dcc6;padding:2rem;margin:2rem 0;border-radius:7px;color:#56493e;text-align:left}aside a{color:#836f5e}p,span{font:16px/20.8px Nunito}h1{font:900 60px/84px Nunito;margin:.75rem}h2{font:700 36px/50.4px Nunito;margin:.6rem}h3{font:700 30px/42px Nunito;margin:.45rem}h4{font:500 24px/33.6px Nunito;margin:.3rem}h5{font:500 18px/25.2px Nunito;margin:.15rem}button,.button,li,ul,a{font:700 16px/20.8px Nunito}a button,.button{text-decoration:none}a{color:#836f5e}button,.button{padding:.7em;border-radius:7px;user-select:none;-webkit-user-select:none;-ms-user-select:none;color:#fff;background-color:#424b54}button:hover,.button:hover{background-color:#545d65}button:hover:active,.button:hover:active{background-color:#2e343a}:focus-visible{outline:9px double black;box-shadow:0 0 0 6px #fff}hr{margin:4em auto 2em;display:block;max-width:100%;background-image:url(/static/img/curlywave.svg);background-size:contain;border:none;height:52px;background-repeat:no-repeat;background-position-x:center}.npm-back{background-color:#b02a2a}img.hero{display:block;max-width:100%;height:auto;border-radius:7px;margin:0 auto}footer{padding-top:2rem;padding-bottom:2rem;text-align:center}@media (max-width: 900px){header{box-sizing:border-box;margin:0 auto;display:block;max-width:600px}main{box-sizing:border-box;margin:0 auto;display:block;max-width:600px}footer{box-sizing:border-box;margin:0 auto;display:block;max-width:600px}}@media (max-width: 700px){header{box-sizing:border-box;margin:0 auto;display:block;max-width:500px}main{margin:0 auto;display:block;max-width:500px;box-sizing:border-box}footer{box-sizing:border-box;margin:0 auto;display:block;max-width:500px}}@media (max-width: calc(500px + 2rem)){header{box-sizing:border-box;margin:0 auto;display:block;max-width:500px}main{display:block;max-width:500px;box-sizing:border-box;margin:0;padding:1rem}footer{box-sizing:border-box;margin:0 auto;display:block;max-width:500px}}div.jobHistory p.preamble{text-indent:24px}div.jobHistory p.preamble:last-of-type{margin-bottom:2em}div.jobHistory article [class^=jobHistory] img[class$=logo]{width:100%}div.jobHistory article [class^=jobHistory] a:has([class$=logo]){width:200px}div.jobHistory article [class^=jobHistory][class$=summary]{text-indent:24px}div.jobHistory article [class^=jobHistory][class$=title]{line-height:25.2px;padding:.3em}div.jobHistory article [class^=jobHistory][class$=org]{line-height:25.2px;padding:.3em}div.jobHistory article [class^=jobHistory][class$=timeframe]{font-weight:300;font-size:16px;line-height:20.8px;margin:0}div.jobHistory article [class^=jobHistory][class$=elapsed-time]{font-weight:300;font-size:11.2px;line-height:14.56px;margin:0}div.jobHistory article [class^=jobHistory][class$=responsibilities]{text-indent:0}div.jobHistory article [class^=jobHistory] div.attention-getter{display:flex}div.jobHistory article [class^=jobHistory] div.attention-getter div[class^=jobHistory][class$=item]{flex:1 0 25em;max-width:700px}@media (max-width: 900px){div.jobHistory article [class^=jobHistory] div.attention-getter div[class^=jobHistory][class$=item]{max-width:500px}}@media (max-width: 700px){div.jobHistory article [class^=jobHistory] div.attention-getter div[class^=jobHistory][class$=item]{max-width:250px}}div.jobHistory article [class^=jobHistory] div.attention-getter div[class^=jobHistory][class$=centering-box]{flex:1}div.jobHistory article [class^=jobHistory] div.sideText-container *{text-align:center}div.hobbies details{list-style:none;padding-left:1.5rem}div.pull-request-tile{border:1px solid #e0b68a;padding:2rem;border-radius:7px;margin:.5rem}@media (max-width: 900px){div.pull-request-tile{padding:.6666666667rem}}div.pull-request-tile h4{cursor:pointer;text-decoration:underline;text-decoration-thickness:2px}div.pull-request-tile h4.prt-merged{color:#8957e5}div.pull-request-tile h4.prt-open{color:#238636}div.pull-request-tile div.prt-visual-aid{display:flex;width:100%;margin-top:2em}div.pull-request-tile div.prt-visual-aid img[class$=-avatar]{border-radius:100%;width:100%}div.pull-request-tile div.prt-visual-aid a:has(svg){flex:1 0 auto;width:15%;height:15%;margin:0 8px}div.pull-request-tile div.prt-visual-aid svg:hover,div.pull-request-tile div.prt-visual-aid img[class$=-avatar]:hover{box-shadow:3px 3px 10px #000}div.pull-request-tile div.prt-visual-aid svg:active,div.pull-request-tile div.prt-visual-aid img[class$=-avatar]:active{box-shadow:unset}div.pull-request-tile div.prt-visual-aid svg.prt-merged,div.pull-request-tile div.prt-visual-aid svg.prt-open{fill:#fff;width:100%;height:100%;border-radius:25%}div.pull-request-tile div.prt-visual-aid svg.prt-merged{background-color:#8957e5}div.pull-request-tile div.prt-visual-aid svg.prt-open{background-color:#238636}div.pull-request-tile p.prt-org-description{text-align:center;font:500 18px/25.2px Nunito;font-weight:400;margin-top:2em;margin-bottom:2em}div.pull-request-tile div.prt-labels{display:flex;flex-wrap:wrap}div.pull-request-tile div.prt-labels span{margin:.2em;padding:0 .6em;white-space:nowrap;border-radius:2em}div.pull-request-tile div.prt-reactions{display:flex;flex-wrap:wrap}div.pull-request-tile div.prt-reactions span.prt-reaction{position:relative;display:flex;margin-bottom:1em;margin-right:1em;border-radius:100%;background-color:#878d93}div.pull-request-tile div.prt-reactions span.prt-reaction a{position:relative;display:flex;align-items:center;justify-content:center;width:40px;height:40px}div.pull-request-tile div.prt-reactions span.prt-reaction-count{display:flex;align-items:center;position:absolute;top:30px;right:-1em;height:16px;padding:5px;border-radius:7px;color:#fff;background-color:#9f0000}div.pull-request-tile p.prt-create-date{font-size:11.8518518519px;line-height:0;margin:2em 0 0;text-align:right}div.error-msg{position:absolute;background:#ffeeee;border-radius:7px;padding:2rem;border:1px solid red}@media (max-width: 900px){div.error-msg{padding:1rem}}div.error-msg button.error-message-exit{display:flex;border:none;background:none;margin-right:0}div.error-msg button.error-message-exit svg.error-message-exit{margin-left:auto}div.error-msg button.error-message-exit svg.error-message-exit:hover #exit-button-svg-circle{fill:#545d65}div.error-msg button.error-message-exit svg.error-message-exit:hover #exit-button-svg-x{stroke:#fff}div.error-msg button.error-message-exit svg.error-message-exit:hover:active #exit-button-svg-circle{fill:#2e343a;stroke:#2e343a}div.error-msg h3{text-align:center;color:#9f0000}div.error-msg img{margin:2rem auto;display:block;max-width:98px;border-radius:100%}div.error-msg p{text-align:center}div.error-msg a,div.error-msg button{margin:0 auto;display:block;max-width:fit-content;text-decoration:none}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}div.contributions ul{position:relative;padding:0}div.contributions ul .loading{animation:3s linear infinite rotate;margin:0 auto;display:block;max-width:50px}div.contributions ul p.loading-msg{text-align:center;position:relative;top:-400px}div.contributions ul div.error-msg{top:10%} diff --git a/assets/index-e9612670.css b/assets/index-e9612670.css new file mode 100644 index 0000000..6ccb7fc --- /dev/null +++ b/assets/index-e9612670.css @@ -0,0 +1 @@ +@charset "UTF-8";@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-ExtraLight.woff2) format("woff2"),url(/static/fonts/Nunito-ExtraLight.woff) format("woff");font-weight:200;font-style:normal;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-Light.woff2) format("woff2"),url(/static/fonts/Nunito-Light.woff) format("woff");font-weight:300;font-style:normal;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-Medium.woff2) format("woff2"),url(/static/fonts/Nunito-Medium.woff) format("woff");font-weight:500;font-style:normal;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-BoldItalic.woff2) format("woff2"),url(/static/fonts/Nunito-BoldItalic.woff) format("woff");font-weight:700;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-Bold.woff2) format("woff2"),url(/static/fonts/Nunito-Bold.woff) format("woff");font-weight:700;font-style:normal;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-Regular.woff2) format("woff2"),url(/static/fonts/Nunito-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-BlackItalic.woff2) format("woff2"),url(/static/fonts/Nunito-BlackItalic.woff) format("woff");font-weight:900;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-LightItalic.woff2) format("woff2"),url(/static/fonts/Nunito-LightItalic.woff) format("woff");font-weight:300;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-ExtraBoldItalic.woff2) format("woff2"),url(/static/fonts/Nunito-ExtraBoldItalic.woff) format("woff");font-weight:700;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-ExtraLightItalic.woff2) format("woff2"),url(/static/fonts/Nunito-ExtraLightItalic.woff) format("woff");font-weight:200;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-Italic.woff2) format("woff2"),url(/static/fonts/Nunito-Italic.woff) format("woff");font-weight:400;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-ExtraLight.woff2) format("woff2"),url(/static/fonts/Nunito-ExtraLight.woff) format("woff");font-weight:200;font-style:normal;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-ExtraLightItalic.woff2) format("woff2"),url(/static/fonts/Nunito-ExtraLightItalic.woff) format("woff");font-weight:200;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-SemiBold.woff2) format("woff2"),url(/static/fonts/Nunito-SemiBold.woff) format("woff");font-weight:600;font-style:normal;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-ExtraBold.woff2) format("woff2"),url(/static/fonts/Nunito-ExtraBold.woff) format("woff");font-weight:700;font-style:normal;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-SemiBoldItalic.woff2) format("woff2"),url(/static/fonts/Nunito-SemiBoldItalic.woff) format("woff");font-weight:600;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-MediumItalic.woff2) format("woff2"),url(/static/fonts/Nunito-MediumItalic.woff) format("woff");font-weight:500;font-style:italic;font-display:swap}@font-face{font-family:Nunito;src:url(/static/fonts/Nunito-Black.woff2) format("woff2"),url(/static/fonts/Nunito-Black.woff) format("woff");font-weight:900;font-style:normal;font-display:swap}html{max-height:100% vh;max-width:100% vw;overflow-x:hidden}body{background-color:#e1ce7a;background-image:url(/static/img/splat-dark.svg);background-attachment:fixed;transition:background-color 2s}body div#content,body div#noscript-content{display:flex;flex-direction:column;align-items:stretch}.page-title{text-align:center;padding:2rem}header{display:block}header .home-button{width:100%;display:block;border-radius:100%;text-align:center;cursor:pointer;transition:transform .4s}header .home-button img{max-width:350px}header .home-button:hover{transform:translateY(10px)}header .home-button:active{transform:translateY(20px)}header .home-button svg{display:block;width:100%;height:auto}main{position:relative;flex-grow:1;margin:0 auto;display:block;max-width:800px;padding:2rem;background:white;border-radius:7px}aside{background-color:#f0dcc6;padding:2rem;margin:2rem 0;border-radius:7px;color:#56493e;text-align:left}aside a{color:#836f5e}p,span{font:16px/20.8px Nunito}h1{font:900 60px/84px Nunito;margin:.75rem}h2{font:700 36px/50.4px Nunito;margin:.6rem}h3{font:700 30px/42px Nunito;margin:.45rem}h4{font:500 24px/33.6px Nunito;margin:.3rem}h5{font:500 18px/25.2px Nunito;margin:.15rem}button,.button,li,ul,a{font:700 16px/20.8px Nunito}a button,.button{text-decoration:none}a{color:#836f5e}button,.button{padding:.7em;border-radius:7px;user-select:none;-webkit-user-select:none;-ms-user-select:none;color:#fff;background-color:#424b54}button:hover,.button:hover{background-color:#545d65}button:hover:active,.button:hover:active{background-color:#2e343a}:focus-visible{outline:9px double black;box-shadow:0 0 0 6px #fff}hr{margin:4em auto 2em;display:block;max-width:100%;background-image:url(/static/img/curlywave.svg);background-size:contain;border:none;height:52px;background-repeat:no-repeat;background-position-x:center}.npm-back{background-color:#b02a2a}img.hero{display:block;max-width:100%;height:auto;border-radius:7px;margin:0 auto}footer{padding-top:2rem;padding-bottom:2rem;text-align:center}@media (max-width: 900px){header{box-sizing:border-box;margin:0 auto;display:block;max-width:600px}main{box-sizing:border-box;margin:0 auto;display:block;max-width:600px}footer{box-sizing:border-box;margin:0 auto;display:block;max-width:600px}}@media (max-width: 700px){header{box-sizing:border-box;margin:0 auto;display:block;max-width:500px}main{margin:0 auto;display:block;max-width:500px;box-sizing:border-box}footer{box-sizing:border-box;margin:0 auto;display:block;max-width:500px}}@media (max-width: calc(500px + 2rem)){header{box-sizing:border-box;margin:0 auto;display:block;max-width:500px}main{display:block;max-width:500px;box-sizing:border-box;margin:0;padding:1rem}footer{box-sizing:border-box;margin:0 auto;display:block;max-width:500px}}.gravelle{display:flex}.gravelle div[class^=headshot-text][class$=item]{flex:1 0 20em;max-width:700px}@media (max-width: 900px){.gravelle div[class^=headshot-text][class$=item]{max-width:500px}}@media (max-width: 700px){.gravelle div[class^=headshot-text][class$=item]{max-width:250px}}.gravelle div[class^=headshot-text][class$=centering-box]{flex:1}.hilltop{display:flex}.hilltop div[class^=headshot-text][class$=item]{flex:1 0 20em;max-width:700px}@media (max-width: 900px){.hilltop div[class^=headshot-text][class$=item]{max-width:500px}}@media (max-width: 700px){.hilltop div[class^=headshot-text][class$=item]{max-width:250px}}.hilltop div[class^=headshot-text][class$=centering-box]{flex:1}div.details{margin:2rem 0;padding:1rem;background-color:#655649;color:#fff;border-radius:7px}div.details summary{list-style:none;background-image:url(/static/img/splat-wave.svg);background-repeat:no-repeat;background-size:60px;cursor:pointer;text-align:right;font:500 18px/25.2px Nunito}div.details summary:after{content:"Expand 🡇";border-radius:7px;background-color:#655649;padding:0 .5rem;color:#fff;border:3px solid #f0dcc6}div.details details{padding:2rem;transition:all .2s;border-radius:7px;color:#ebcfb2}div.details details[open]{background-color:#f0dcc6;color:#655649}div.details details[open] summary{color:#655649}div.details details[open] summary:after{content:"Collapse 🡅";border-radius:7px;background-color:#f0dcc6;border:3px solid #655649;padding:0 .5rem;color:#655649}@media (max-width: 700px){div.details details[open] summary{text-align:right}}div.details>*{font:700 36px/50.4px Nunito}div.details a{color:#836f5e}button.zoomable-image{position:relative;display:flex;justify-content:center;align-content:center;border:none;margin:.7em;cursor:pointer}button.zoomable-image svg{position:absolute;right:calc(.7em + 4px);top:calc(.7em + 4px);opacity:0;height:0;width:0;z-index:0}button.zoomable-image svg:hover rect{fill:#424b54}button.zoomable-image svg:hover path{fill:#fff}button.zoomable-image svg:active{scale:.9}button.zoomable-image p.zoomable-image_clickExpand{font:500 24px/33.6px Nunito;position:absolute;z-index:1;margin:0;opacity:0;bottom:1rem;border-radius:7px;text-align:center;color:#fff;background-color:#000000b3;width:80%;height:0;overflow:hidden;transition:all .2s}button.zoomable-image p.zoomable-image_clickExpand:hover{opacity:1!important;height:initial}button.zoomable-image:hover p.zoomable-image_clickExpand{opacity:1}div.pre{display:flex;box-sizing:border-box;overflow-x:scroll;overflow-y:hidden;width:100%;background-color:#56493e;border-radius:7px}div.pre pre{box-sizing:border-box;max-width:600px;margin:0;padding:0;color:#fff}@media (max-width: 900px){div.pre pre{max-width:0px}}#example-sites{display:flex;flex-direction:column;align-items:center;justify-items:center;width:100%;text-align:center}div.showcase button:first-child{transition:revert}@media (max-width: 700px){div.showcase button{cursor:auto}}div.showcase div.currently-showcased{top:0;z-index:1;padding-top:2rem}div.showcase div.currently-showcased:has(button){position:sticky}@media (max-width: 700px){div.showcase div.currently-showcased:has(button){display:none}}div.attention-getter .clf-figma-color-theme{border-radius:7px} diff --git a/assets/jeopardy-686a3273.js b/assets/jeopardy-686a3273.js new file mode 100644 index 0000000..e8c6c02 --- /dev/null +++ b/assets/jeopardy-686a3273.js @@ -0,0 +1,13 @@ +var Xr=Object.defineProperty;var Gr=(z,T,X)=>T in z?Xr(z,T,{enumerable:!0,configurable:!0,writable:!0,value:X}):z[T]=X;var Ln=(z,T,X)=>(Gr(z,typeof T!="symbol"?T+"":T,X),X);import{b as Qr,g as Yr,d as Jr}from"./utils-bf63a336.js";import{a as On}from"./axios-1779699b.js";var Mn={exports:{}};/*! + * jQuery JavaScript Library v3.7.1 + * https://jquery.com/ + * + * Copyright OpenJS Foundation and other contributors + * Released under the MIT license + * https://jquery.org/license + * + * Date: 2023-08-28T13:37Z + */(function(z){(function(T,X){z.exports=T.document?X(T,!0):function(E){if(!E.document)throw new Error("jQuery requires a window with a document");return X(E)}})(typeof window<"u"?window:Qr,function(T,X){var E=[],Z=Object.getPrototypeOf,F=E.slice,Ft=E.flat?function(e){return E.flat.call(e)}:function(e){return E.concat.apply([],e)},tt=E.push,ye=E.indexOf,nt={},$t=nt.toString,$e=nt.hasOwnProperty,Bt=$e.toString,Rn=Bt.call(Object),H={},L=function(t){return typeof t=="function"&&typeof t.nodeType!="number"&&typeof t.item!="function"},je=function(t){return t!=null&&t===t.window},q=T.document,_n={type:!0,src:!0,nonce:!0,noModule:!0};function zt(e,t,n){n=n||q;var r,o,a=n.createElement("script");if(a.text=e,t)for(r in _n)o=t[r]||t.getAttribute&&t.getAttribute(r),o&&a.setAttribute(r,o);n.head.appendChild(a).parentNode.removeChild(a)}function qe(e){return e==null?e+"":typeof e=="object"||typeof e=="function"?nt[$t.call(e)]||"object":typeof e}var Ut="3.7.1",Wn=/HTML$/i,i=function(e,t){return new i.fn.init(e,t)};i.fn=i.prototype={jquery:Ut,constructor:i,length:0,toArray:function(){return F.call(this)},get:function(e){return e==null?F.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=i.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return i.each(this,e)},map:function(e){return this.pushStack(i.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(F.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(i.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(i.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n0&&t-1 in e}function V(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var Fn=E.pop,$n=E.sort,Bn=E.splice,$="[\\x20\\t\\r\\n\\f]",Be=new RegExp("^"+$+"+|((?:^|[^\\\\])(?:\\\\.)*)"+$+"+$","g");i.contains=function(e,t){var n=t&&t.parentNode;return e===n||!!(n&&n.nodeType===1&&(e.contains?e.contains(n):e.compareDocumentPosition&&e.compareDocumentPosition(n)&16))};var zn=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function Un(e,t){return t?e==="\0"?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}i.escapeSelector=function(e){return(e+"").replace(zn,Un)};var ve=q,vt=tt;(function(){var e,t,n,r,o,a=vt,s,c,f,d,y,b=i.expando,h=0,m=0,N=ct(),R=ct(),O=ct(),Y=ct(),Q=function(u,l){return u===l&&(o=!0),0},le="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",de="(?:\\\\[\\da-fA-F]{1,6}"+$+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",I="\\["+$+"*("+de+")(?:"+$+"*([*^$|!~]?=)"+$+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+de+"))|)"+$+"*\\]",Ae=":("+de+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+I+")*)|.*)\\)|)",_=new RegExp($+"+","g"),G=new RegExp("^"+$+"*,"+$+"*"),Ke=new RegExp("^"+$+"*([>+~]|"+$+")"+$+"*"),Ot=new RegExp($+"|>"),pe=new RegExp(Ae),Ze=new RegExp("^"+de+"$"),he={ID:new RegExp("^#("+de+")"),CLASS:new RegExp("^\\.("+de+")"),TAG:new RegExp("^("+de+"|[*])"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+Ae),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+$+"*(even|odd|(([+-]|)(\\d*)n|)"+$+"*(?:([+-]|)"+$+"*(\\d+)|))"+$+"*\\)|)","i"),bool:new RegExp("^(?:"+le+")$","i"),needsContext:new RegExp("^"+$+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+$+"*((?:-\\d)?\\d*)"+$+"*\\)|)(?=[^-]|$)","i")},Ce=/^(?:input|select|textarea|button)$/i,we=/^h\d$/i,oe=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Pt=/[+~]/,xe=new RegExp("\\\\[\\da-fA-F]{1,6}"+$+"?|\\\\([^\\r\\n\\f])","g"),Te=function(u,l){var p="0x"+u.slice(1)-65536;return l||(p<0?String.fromCharCode(p+65536):String.fromCharCode(p>>10|55296,p&1023|56320))},Wr=function(){Se()},Fr=dt(function(u){return u.disabled===!0&&V(u,"fieldset")},{dir:"parentNode",next:"legend"});function $r(){try{return s.activeElement}catch{}}try{a.apply(E=F.call(ve.childNodes),ve.childNodes),E[ve.childNodes.length].nodeType}catch{a={apply:function(l,p){vt.apply(l,F.call(p))},call:function(l){vt.apply(l,F.call(arguments,1))}}}function W(u,l,p,g){var v,x,C,S,w,P,A,j=l&&l.ownerDocument,M=l?l.nodeType:9;if(p=p||[],typeof u!="string"||!u||M!==1&&M!==9&&M!==11)return p;if(!g&&(Se(l),l=l||s,f)){if(M!==11&&(w=oe.exec(u)))if(v=w[1]){if(M===9)if(C=l.getElementById(v)){if(C.id===v)return a.call(p,C),p}else return p;else if(j&&(C=j.getElementById(v))&&W.contains(l,C)&&C.id===v)return a.call(p,C),p}else{if(w[2])return a.apply(p,l.getElementsByTagName(u)),p;if((v=w[3])&&l.getElementsByClassName)return a.apply(p,l.getElementsByClassName(v)),p}if(!Y[u+" "]&&(!d||!d.test(u))){if(A=u,j=l,M===1&&(Ot.test(u)||Ke.test(u))){for(j=Pt.test(u)&&Mt(l.parentNode)||l,(j!=l||!H.scope)&&((S=l.getAttribute("id"))?S=i.escapeSelector(S):l.setAttribute("id",S=b)),P=et(u),x=P.length;x--;)P[x]=(S?"#"+S:":scope")+" "+lt(P[x]);A=P.join(",")}try{return a.apply(p,j.querySelectorAll(A)),p}catch{Y(u,!0)}finally{S===b&&l.removeAttribute("id")}}}return Hn(u.replace(Be,"$1"),l,p,g)}function ct(){var u=[];function l(p,g){return u.push(p+" ")>t.cacheLength&&delete l[u.shift()],l[p+" "]=g}return l}function ue(u){return u[b]=!0,u}function We(u){var l=s.createElement("fieldset");try{return!!u(l)}catch{return!1}finally{l.parentNode&&l.parentNode.removeChild(l),l=null}}function Br(u){return function(l){return V(l,"input")&&l.type===u}}function zr(u){return function(l){return(V(l,"input")||V(l,"button"))&&l.type===u}}function jn(u){return function(l){return"form"in l?l.parentNode&&l.disabled===!1?"label"in l?"label"in l.parentNode?l.parentNode.disabled===u:l.disabled===u:l.isDisabled===u||l.isDisabled!==!u&&Fr(l)===u:l.disabled===u:"label"in l?l.disabled===u:!1}}function Ne(u){return ue(function(l){return l=+l,ue(function(p,g){for(var v,x=u([],p.length,l),C=x.length;C--;)p[v=x[C]]&&(p[v]=!(g[v]=p[v]))})})}function Mt(u){return u&&typeof u.getElementsByTagName<"u"&&u}function Se(u){var l,p=u?u.ownerDocument||u:ve;return p==s||p.nodeType!==9||!p.documentElement||(s=p,c=s.documentElement,f=!i.isXMLDoc(s),y=c.matches||c.webkitMatchesSelector||c.msMatchesSelector,c.msMatchesSelector&&ve!=s&&(l=s.defaultView)&&l.top!==l&&l.addEventListener("unload",Wr),H.getById=We(function(g){return c.appendChild(g).id=i.expando,!s.getElementsByName||!s.getElementsByName(i.expando).length}),H.disconnectedMatch=We(function(g){return y.call(g,"*")}),H.scope=We(function(){return s.querySelectorAll(":scope")}),H.cssHas=We(function(){try{return s.querySelector(":has(*,:jqfake)"),!1}catch{return!0}}),H.getById?(t.filter.ID=function(g){var v=g.replace(xe,Te);return function(x){return x.getAttribute("id")===v}},t.find.ID=function(g,v){if(typeof v.getElementById<"u"&&f){var x=v.getElementById(g);return x?[x]:[]}}):(t.filter.ID=function(g){var v=g.replace(xe,Te);return function(x){var C=typeof x.getAttributeNode<"u"&&x.getAttributeNode("id");return C&&C.value===v}},t.find.ID=function(g,v){if(typeof v.getElementById<"u"&&f){var x,C,S,w=v.getElementById(g);if(w){if(x=w.getAttributeNode("id"),x&&x.value===g)return[w];for(S=v.getElementsByName(g),C=0;w=S[C++];)if(x=w.getAttributeNode("id"),x&&x.value===g)return[w]}return[]}}),t.find.TAG=function(g,v){return typeof v.getElementsByTagName<"u"?v.getElementsByTagName(g):v.querySelectorAll(g)},t.find.CLASS=function(g,v){if(typeof v.getElementsByClassName<"u"&&f)return v.getElementsByClassName(g)},d=[],We(function(g){var v;c.appendChild(g).innerHTML="",g.querySelectorAll("[selected]").length||d.push("\\["+$+"*(?:value|"+le+")"),g.querySelectorAll("[id~="+b+"-]").length||d.push("~="),g.querySelectorAll("a#"+b+"+*").length||d.push(".#.+[+~]"),g.querySelectorAll(":checked").length||d.push(":checked"),v=s.createElement("input"),v.setAttribute("type","hidden"),g.appendChild(v).setAttribute("name","D"),c.appendChild(g).disabled=!0,g.querySelectorAll(":disabled").length!==2&&d.push(":enabled",":disabled"),v=s.createElement("input"),v.setAttribute("name",""),g.appendChild(v),g.querySelectorAll("[name='']").length||d.push("\\["+$+"*name"+$+"*="+$+`*(?:''|"")`)}),H.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),Q=function(g,v){if(g===v)return o=!0,0;var x=!g.compareDocumentPosition-!v.compareDocumentPosition;return x||(x=(g.ownerDocument||g)==(v.ownerDocument||v)?g.compareDocumentPosition(v):1,x&1||!H.sortDetached&&v.compareDocumentPosition(g)===x?g===s||g.ownerDocument==ve&&W.contains(ve,g)?-1:v===s||v.ownerDocument==ve&&W.contains(ve,v)?1:r?ye.call(r,g)-ye.call(r,v):0:x&4?-1:1)}),s}W.matches=function(u,l){return W(u,null,null,l)},W.matchesSelector=function(u,l){if(Se(u),f&&!Y[l+" "]&&(!d||!d.test(l)))try{var p=y.call(u,l);if(p||H.disconnectedMatch||u.document&&u.document.nodeType!==11)return p}catch{Y(l,!0)}return W(l,s,null,[u]).length>0},W.contains=function(u,l){return(u.ownerDocument||u)!=s&&Se(u),i.contains(u,l)},W.attr=function(u,l){(u.ownerDocument||u)!=s&&Se(u);var p=t.attrHandle[l.toLowerCase()],g=p&&$e.call(t.attrHandle,l.toLowerCase())?p(u,l,!f):void 0;return g!==void 0?g:u.getAttribute(l)},W.error=function(u){throw new Error("Syntax error, unrecognized expression: "+u)},i.uniqueSort=function(u){var l,p=[],g=0,v=0;if(o=!H.sortStable,r=!H.sortStable&&F.call(u,0),$n.call(u,Q),o){for(;l=u[v++];)l===u[v]&&(g=p.push(v));for(;g--;)Bn.call(u,p[g],1)}return r=null,u},i.fn.uniqueSort=function(){return this.pushStack(i.uniqueSort(F.apply(this)))},t=i.expr={cacheLength:50,createPseudo:ue,match:he,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(u){return u[1]=u[1].replace(xe,Te),u[3]=(u[3]||u[4]||u[5]||"").replace(xe,Te),u[2]==="~="&&(u[3]=" "+u[3]+" "),u.slice(0,4)},CHILD:function(u){return u[1]=u[1].toLowerCase(),u[1].slice(0,3)==="nth"?(u[3]||W.error(u[0]),u[4]=+(u[4]?u[5]+(u[6]||1):2*(u[3]==="even"||u[3]==="odd")),u[5]=+(u[7]+u[8]||u[3]==="odd")):u[3]&&W.error(u[0]),u},PSEUDO:function(u){var l,p=!u[6]&&u[2];return he.CHILD.test(u[0])?null:(u[3]?u[2]=u[4]||u[5]||"":p&&pe.test(p)&&(l=et(p,!0))&&(l=p.indexOf(")",p.length-l)-p.length)&&(u[0]=u[0].slice(0,l),u[2]=p.slice(0,l)),u.slice(0,3))}},filter:{TAG:function(u){var l=u.replace(xe,Te).toLowerCase();return u==="*"?function(){return!0}:function(p){return V(p,l)}},CLASS:function(u){var l=N[u+" "];return l||(l=new RegExp("(^|"+$+")"+u+"("+$+"|$)"))&&N(u,function(p){return l.test(typeof p.className=="string"&&p.className||typeof p.getAttribute<"u"&&p.getAttribute("class")||"")})},ATTR:function(u,l,p){return function(g){var v=W.attr(g,u);return v==null?l==="!=":l?(v+="",l==="="?v===p:l==="!="?v!==p:l==="^="?p&&v.indexOf(p)===0:l==="*="?p&&v.indexOf(p)>-1:l==="$="?p&&v.slice(-p.length)===p:l==="~="?(" "+v.replace(_," ")+" ").indexOf(p)>-1:l==="|="?v===p||v.slice(0,p.length+1)===p+"-":!1):!0}},CHILD:function(u,l,p,g,v){var x=u.slice(0,3)!=="nth",C=u.slice(-4)!=="last",S=l==="of-type";return g===1&&v===0?function(w){return!!w.parentNode}:function(w,P,A){var j,M,D,U,re,J=x!==C?"nextSibling":"previousSibling",ae=w.parentNode,ge=S&&w.nodeName.toLowerCase(),Fe=!A&&!S,K=!1;if(ae){if(x){for(;J;){for(D=w;D=D[J];)if(S?V(D,ge):D.nodeType===1)return!1;re=J=u==="only"&&!re&&"nextSibling"}return!0}if(re=[C?ae.firstChild:ae.lastChild],C&&Fe){for(M=ae[b]||(ae[b]={}),j=M[u]||[],U=j[0]===h&&j[1],K=U&&j[2],D=U&&ae.childNodes[U];D=++U&&D&&D[J]||(K=U=0)||re.pop();)if(D.nodeType===1&&++K&&D===w){M[u]=[h,U,K];break}}else if(Fe&&(M=w[b]||(w[b]={}),j=M[u]||[],U=j[0]===h&&j[1],K=U),K===!1)for(;(D=++U&&D&&D[J]||(K=U=0)||re.pop())&&!((S?V(D,ge):D.nodeType===1)&&++K&&(Fe&&(M=D[b]||(D[b]={}),M[u]=[h,K]),D===w)););return K-=v,K===g||K%g===0&&K/g>=0}}},PSEUDO:function(u,l){var p,g=t.pseudos[u]||t.setFilters[u.toLowerCase()]||W.error("unsupported pseudo: "+u);return g[b]?g(l):g.length>1?(p=[u,u,"",l],t.setFilters.hasOwnProperty(u.toLowerCase())?ue(function(v,x){for(var C,S=g(v,l),w=S.length;w--;)C=ye.call(v,S[w]),v[C]=!(x[C]=S[w])}):function(v){return g(v,0,p)}):g}},pseudos:{not:ue(function(u){var l=[],p=[],g=Wt(u.replace(Be,"$1"));return g[b]?ue(function(v,x,C,S){for(var w,P=g(v,null,S,[]),A=v.length;A--;)(w=P[A])&&(v[A]=!(x[A]=w))}):function(v,x,C){return l[0]=v,g(l,null,C,p),l[0]=null,!p.pop()}}),has:ue(function(u){return function(l){return W(u,l).length>0}}),contains:ue(function(u){return u=u.replace(xe,Te),function(l){return(l.textContent||i.text(l)).indexOf(u)>-1}}),lang:ue(function(u){return Ze.test(u||"")||W.error("unsupported lang: "+u),u=u.replace(xe,Te).toLowerCase(),function(l){var p;do if(p=f?l.lang:l.getAttribute("xml:lang")||l.getAttribute("lang"))return p=p.toLowerCase(),p===u||p.indexOf(u+"-")===0;while((l=l.parentNode)&&l.nodeType===1);return!1}}),target:function(u){var l=T.location&&T.location.hash;return l&&l.slice(1)===u.id},root:function(u){return u===c},focus:function(u){return u===$r()&&s.hasFocus()&&!!(u.type||u.href||~u.tabIndex)},enabled:jn(!1),disabled:jn(!0),checked:function(u){return V(u,"input")&&!!u.checked||V(u,"option")&&!!u.selected},selected:function(u){return u.parentNode&&u.parentNode.selectedIndex,u.selected===!0},empty:function(u){for(u=u.firstChild;u;u=u.nextSibling)if(u.nodeType<6)return!1;return!0},parent:function(u){return!t.pseudos.empty(u)},header:function(u){return we.test(u.nodeName)},input:function(u){return Ce.test(u.nodeName)},button:function(u){return V(u,"input")&&u.type==="button"||V(u,"button")},text:function(u){var l;return V(u,"input")&&u.type==="text"&&((l=u.getAttribute("type"))==null||l.toLowerCase()==="text")},first:Ne(function(){return[0]}),last:Ne(function(u,l){return[l-1]}),eq:Ne(function(u,l,p){return[p<0?p+l:p]}),even:Ne(function(u,l){for(var p=0;pl?g=l:g=p;--g>=0;)u.push(g);return u}),gt:Ne(function(u,l,p){for(var g=p<0?p+l:p;++g1?function(l,p,g){for(var v=u.length;v--;)if(!u[v](l,p,g))return!1;return!0}:u[0]}function Ur(u,l,p){for(var g=0,v=l.length;g-1&&(C[A]=!(S[A]=M))}}else D=pt(D===S?D.splice(J,D.length):D),v?v(null,S,D,P):a.apply(S,D)})}function _t(u){for(var l,p,g,v=u.length,x=t.relative[u[0].type],C=x||t.relative[" "],S=x?1:0,w=dt(function(j){return j===l},C,!0),P=dt(function(j){return ye.call(l,j)>-1},C,!0),A=[function(j,M,D){var U=!x&&(D||M!=n)||((l=M).nodeType?w(j,M,D):P(j,M,D));return l=null,U}];S1&&It(A),S>1&<(u.slice(0,S-1).concat({value:u[S-2].type===" "?"*":""})).replace(Be,"$1"),p,S0,g=u.length>0,v=function(x,C,S,w,P){var A,j,M,D=0,U="0",re=x&&[],J=[],ae=n,ge=x||g&&t.find.TAG("*",P),Fe=h+=ae==null?1:Math.random()||.1,K=ge.length;for(P&&(n=C==s||C||P);U!==K&&(A=ge[U])!=null;U++){if(g&&A){for(j=0,!C&&A.ownerDocument!=s&&(Se(A),S=!f);M=u[j++];)if(M(A,C||s,S)){a.call(w,A);break}P&&(h=Fe)}p&&((A=!M&&A)&&D--,x&&re.push(A))}if(D+=U,p&&U!==D){for(j=0;M=l[j++];)M(re,J,C,S);if(x){if(D>0)for(;U--;)re[U]||J[U]||(J[U]=Fn.call(w));J=pt(J)}a.apply(w,J),P&&!x&&J.length>0&&D+l.length>1&&i.uniqueSort(w)}return P&&(h=Fe,n=ae),re};return p?ue(v):v}function Wt(u,l){var p,g=[],v=[],x=O[u+" "];if(!x){for(l||(l=et(u)),p=l.length;p--;)x=_t(l[p]),x[b]?g.push(x):v.push(x);x=O(u,Vr(v,g)),x.selector=u}return x}function Hn(u,l,p,g){var v,x,C,S,w,P=typeof u=="function"&&u,A=!g&&et(u=P.selector||u);if(p=p||[],A.length===1){if(x=A[0]=A[0].slice(0),x.length>2&&(C=x[0]).type==="ID"&&l.nodeType===9&&f&&t.relative[x[1].type]){if(l=(t.find.ID(C.matches[0].replace(xe,Te),l)||[])[0],l)P&&(l=l.parentNode);else return p;u=u.slice(x.shift().value.length)}for(v=he.needsContext.test(u)?0:x.length;v--&&(C=x[v],!t.relative[S=C.type]);)if((w=t.find[S])&&(g=w(C.matches[0].replace(xe,Te),Pt.test(x[0].type)&&Mt(l.parentNode)||l))){if(x.splice(v,1),u=g.length&<(x),!u)return a.apply(p,g),p;break}}return(P||Wt(u,A))(g,l,!f,p,!l||Pt.test(u)&&Mt(l.parentNode)||l),p}H.sortStable=b.split("").sort(Q).join("")===b,Se(),H.sortDetached=We(function(u){return u.compareDocumentPosition(s.createElement("fieldset"))&1}),i.find=W,i.expr[":"]=i.expr.pseudos,i.unique=i.uniqueSort,W.compile=Wt,W.select=Hn,W.setDocument=Se,W.tokenize=et,W.escape=i.escapeSelector,W.getText=i.text,W.isXML=i.isXMLDoc,W.selectors=i.expr,W.support=i.support,W.uniqueSort=i.uniqueSort})();var He=function(e,t,n){for(var r=[],o=n!==void 0;(e=e[t])&&e.nodeType!==9;)if(e.nodeType===1){if(o&&i(e).is(n))break;r.push(e)}return r},Vt=function(e,t){for(var n=[];e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n},Xt=i.expr.match.needsContext,Gt=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function bt(e,t,n){return L(t)?i.grep(e,function(r,o){return!!t.call(r,o,r)!==n}):t.nodeType?i.grep(e,function(r){return r===t!==n}):typeof t!="string"?i.grep(e,function(r){return ye.call(t,r)>-1!==n}):i.filter(t,e,n)}i.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),t.length===1&&r.nodeType===1?i.find.matchesSelector(r,e)?[r]:[]:i.find.matches(e,i.grep(t,function(o){return o.nodeType===1}))},i.fn.extend({find:function(e){var t,n,r=this.length,o=this;if(typeof e!="string")return this.pushStack(i(e).filter(function(){for(t=0;t1?i.uniqueSort(n):n},filter:function(e){return this.pushStack(bt(this,e||[],!1))},not:function(e){return this.pushStack(bt(this,e||[],!0))},is:function(e){return!!bt(this,typeof e=="string"&&Xt.test(e)?i(e):e||[],!1).length}});var Qt,Vn=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,Xn=i.fn.init=function(e,t,n){var r,o;if(!e)return this;if(n=n||Qt,typeof e=="string")if(e[0]==="<"&&e[e.length-1]===">"&&e.length>=3?r=[null,e,null]:r=Vn.exec(e),r&&(r[1]||!t))if(r[1]){if(t=t instanceof i?t[0]:t,i.merge(this,i.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:q,!0)),Gt.test(r[1])&&i.isPlainObject(t))for(r in t)L(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}else return o=q.getElementById(r[2]),o&&(this[0]=o,this.length=1),this;else return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);else{if(e.nodeType)return this[0]=e,this.length=1,this;if(L(e))return n.ready!==void 0?n.ready(e):e(i)}return i.makeArray(e,this)};Xn.prototype=i.fn,Qt=i(q);var Gn=/^(?:parents|prev(?:Until|All))/,Qn={children:!0,contents:!0,next:!0,prev:!0};i.fn.extend({has:function(e){var t=i(e,this),n=t.length;return this.filter(function(){for(var r=0;r-1:n.nodeType===1&&i.find.matchesSelector(n,e))){a.push(n);break}}return this.pushStack(a.length>1?i.uniqueSort(a):a)},index:function(e){return e?typeof e=="string"?ye.call(i(e),this[0]):ye.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(i.uniqueSort(i.merge(this.get(),i(e,t))))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}});function Yt(e,t){for(;(e=e[t])&&e.nodeType!==1;);return e}i.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return He(e,"parentNode")},parentsUntil:function(e,t,n){return He(e,"parentNode",n)},next:function(e){return Yt(e,"nextSibling")},prev:function(e){return Yt(e,"previousSibling")},nextAll:function(e){return He(e,"nextSibling")},prevAll:function(e){return He(e,"previousSibling")},nextUntil:function(e,t,n){return He(e,"nextSibling",n)},prevUntil:function(e,t,n){return He(e,"previousSibling",n)},siblings:function(e){return Vt((e.parentNode||{}).firstChild,e)},children:function(e){return Vt(e.firstChild)},contents:function(e){return e.contentDocument!=null&&Z(e.contentDocument)?e.contentDocument:(V(e,"template")&&(e=e.content||e),i.merge([],e.childNodes))}},function(e,t){i.fn[e]=function(n,r){var o=i.map(this,t,n);return e.slice(-5)!=="Until"&&(r=n),r&&typeof r=="string"&&(o=i.filter(r,o)),this.length>1&&(Qn[e]||i.uniqueSort(o),Gn.test(e)&&o.reverse()),this.pushStack(o)}});var fe=/[^\x20\t\r\n\f]+/g;function Yn(e){var t={};return i.each(e.match(fe)||[],function(n,r){t[r]=!0}),t}i.Callbacks=function(e){e=typeof e=="string"?Yn(e):i.extend({},e);var t,n,r,o,a=[],s=[],c=-1,f=function(){for(o=o||e.once,r=t=!0;s.length;c=-1)for(n=s.shift();++c-1;)a.splice(h,1),h<=c&&c--}),this},has:function(y){return y?i.inArray(y,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return o=s=[],a=n="",this},disabled:function(){return!a},lock:function(){return o=s=[],!n&&!t&&(a=n=""),this},locked:function(){return!!o},fireWith:function(y,b){return o||(b=b||[],b=[y,b.slice?b.slice():b],s.push(b),t||f()),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!r}};return d};function Le(e){return e}function rt(e){throw e}function Jt(e,t,n,r){var o;try{e&&L(o=e.promise)?o.call(e).done(t).fail(n):e&&L(o=e.then)?o.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(a){n.apply(void 0,[a])}}i.extend({Deferred:function(e){var t=[["notify","progress",i.Callbacks("memory"),i.Callbacks("memory"),2],["resolve","done",i.Callbacks("once memory"),i.Callbacks("once memory"),0,"resolved"],["reject","fail",i.Callbacks("once memory"),i.Callbacks("once memory"),1,"rejected"]],n="pending",r={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},catch:function(a){return r.then(null,a)},pipe:function(){var a=arguments;return i.Deferred(function(s){i.each(t,function(c,f){var d=L(a[f[4]])&&a[f[4]];o[f[1]](function(){var y=d&&d.apply(this,arguments);y&&L(y.promise)?y.promise().progress(s.notify).done(s.resolve).fail(s.reject):s[f[0]+"With"](this,d?[y]:arguments)})}),a=null}).promise()},then:function(a,s,c){var f=0;function d(y,b,h,m){return function(){var N=this,R=arguments,O=function(){var Q,le;if(!(y=f&&(h!==rt&&(N=void 0,R=[Q]),b.rejectWith(N,R))}};y?Y():(i.Deferred.getErrorHook?Y.error=i.Deferred.getErrorHook():i.Deferred.getStackHook&&(Y.error=i.Deferred.getStackHook()),T.setTimeout(Y))}}return i.Deferred(function(y){t[0][3].add(d(0,y,L(c)?c:Le,y.notifyWith)),t[1][3].add(d(0,y,L(a)?a:Le)),t[2][3].add(d(0,y,L(s)?s:rt))}).promise()},promise:function(a){return a!=null?i.extend(a,r):r}},o={};return i.each(t,function(a,s){var c=s[2],f=s[5];r[s[1]]=c.add,f&&c.add(function(){n=f},t[3-a][2].disable,t[3-a][3].disable,t[0][2].lock,t[0][3].lock),c.add(s[3].fire),o[s[0]]=function(){return o[s[0]+"With"](this===o?void 0:this,arguments),this},o[s[0]+"With"]=c.fireWith}),r.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),o=F.call(arguments),a=i.Deferred(),s=function(c){return function(f){r[c]=this,o[c]=arguments.length>1?F.call(arguments):f,--t||a.resolveWith(r,o)}};if(t<=1&&(Jt(e,a.done(s(n)).resolve,a.reject,!t),a.state()==="pending"||L(o[n]&&o[n].then)))return a.then();for(;n--;)Jt(o[n],s(n),a.reject);return a.promise()}});var Jn=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;i.Deferred.exceptionHook=function(e,t){T.console&&T.console.warn&&e&&Jn.test(e.name)&&T.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},i.readyException=function(e){T.setTimeout(function(){throw e})};var mt=i.Deferred();i.fn.ready=function(e){return mt.then(e).catch(function(t){i.readyException(t)}),this},i.extend({isReady:!1,readyWait:1,ready:function(e){(e===!0?--i.readyWait:i.isReady)||(i.isReady=!0,!(e!==!0&&--i.readyWait>0)&&mt.resolveWith(q,[i]))}}),i.ready.then=mt.then;function it(){q.removeEventListener("DOMContentLoaded",it),T.removeEventListener("load",it),i.ready()}q.readyState==="complete"||q.readyState!=="loading"&&!q.documentElement.doScroll?T.setTimeout(i.ready):(q.addEventListener("DOMContentLoaded",it),T.addEventListener("load",it));var be=function(e,t,n,r,o,a,s){var c=0,f=e.length,d=n==null;if(qe(n)==="object"){o=!0;for(c in n)be(e,t,c,n[c],!0,a,s)}else if(r!==void 0&&(o=!0,L(r)||(s=!0),d&&(s?(t.call(e,r),t=null):(d=t,t=function(y,b,h){return d.call(i(y),h)})),t))for(;c1,null,!0)},removeData:function(e){return this.each(function(){ee.remove(this,e)})}}),i.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=k.get(e,t),n&&(!r||Array.isArray(n)?r=k.access(e,t,i.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=i.queue(e,t),r=n.length,o=n.shift(),a=i._queueHooks(e,t),s=function(){i.dequeue(e,t)};o==="inprogress"&&(o=n.shift(),r--),o&&(t==="fx"&&n.unshift("inprogress"),delete a.stop,o.call(e,s,a)),!r&&a&&a.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return k.get(e,n)||k.access(e,n,{empty:i.Callbacks("once memory").add(function(){k.remove(e,[t+"queue",n])})})}}),i.fn.extend({queue:function(e,t){var n=2;return typeof e!="string"&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]*)/i,rn=/^$|^module$|\/(?:java|ecma)script/i;(function(){var e=q.createDocumentFragment(),t=e.appendChild(q.createElement("div")),n=q.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),H.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="",H.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue,t.innerHTML="",H.option=!!t.lastChild})();var ie={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ie.tbody=ie.tfoot=ie.colgroup=ie.caption=ie.thead,ie.th=ie.td,H.option||(ie.optgroup=ie.option=[1,""]);function te(e,t){var n;return typeof e.getElementsByTagName<"u"?n=e.getElementsByTagName(t||"*"):typeof e.querySelectorAll<"u"?n=e.querySelectorAll(t||"*"):n=[],t===void 0||t&&V(e,t)?i.merge([e],n):n}function xt(e,t){for(var n=0,r=e.length;n-1){o&&o.push(a);continue}if(d=Oe(a),s=te(b.appendChild(a),"script"),d&&xt(s),n)for(y=0;a=s[y++];)rn.test(a.type||"")&&n.push(a)}return b}var an=/^([^.]*)(?:\.(.+)|)/;function Me(){return!0}function Ie(){return!1}function Tt(e,t,n,r,o,a){var s,c;if(typeof t=="object"){typeof n!="string"&&(r=r||n,n=void 0);for(c in t)Tt(e,c,n,r,t[c],a);return e}if(r==null&&o==null?(o=n,r=n=void 0):o==null&&(typeof n=="string"?(o=r,r=void 0):(o=r,r=n,n=void 0)),o===!1)o=Ie;else if(!o)return e;return a===1&&(s=o,o=function(f){return i().off(f),s.apply(this,arguments)},o.guid=s.guid||(s.guid=i.guid++)),e.each(function(){i.event.add(this,t,o,r,n)})}i.event={global:{},add:function(e,t,n,r,o){var a,s,c,f,d,y,b,h,m,N,R,O=k.get(e);if(ze(e))for(n.handler&&(a=n,n=a.handler,o=a.selector),o&&i.find.matchesSelector(ke,o),n.guid||(n.guid=i.guid++),(f=O.events)||(f=O.events=Object.create(null)),(s=O.handle)||(s=O.handle=function(Y){return typeof i<"u"&&i.event.triggered!==Y.type?i.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(fe)||[""],d=t.length;d--;)c=an.exec(t[d])||[],m=R=c[1],N=(c[2]||"").split(".").sort(),m&&(b=i.event.special[m]||{},m=(o?b.delegateType:b.bindType)||m,b=i.event.special[m]||{},y=i.extend({type:m,origType:R,data:r,handler:n,guid:n.guid,selector:o,needsContext:o&&i.expr.match.needsContext.test(o),namespace:N.join(".")},a),(h=f[m])||(h=f[m]=[],h.delegateCount=0,(!b.setup||b.setup.call(e,r,N,s)===!1)&&e.addEventListener&&e.addEventListener(m,s)),b.add&&(b.add.call(e,y),y.handler.guid||(y.handler.guid=n.guid)),o?h.splice(h.delegateCount++,0,y):h.push(y),i.event.global[m]=!0)},remove:function(e,t,n,r,o){var a,s,c,f,d,y,b,h,m,N,R,O=k.hasData(e)&&k.get(e);if(!(!O||!(f=O.events))){for(t=(t||"").match(fe)||[""],d=t.length;d--;){if(c=an.exec(t[d])||[],m=R=c[1],N=(c[2]||"").split(".").sort(),!m){for(m in f)i.event.remove(e,m+t[d],n,r,!0);continue}for(b=i.event.special[m]||{},m=(r?b.delegateType:b.bindType)||m,h=f[m]||[],c=c[2]&&new RegExp("(^|\\.)"+N.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=a=h.length;a--;)y=h[a],(o||R===y.origType)&&(!n||n.guid===y.guid)&&(!c||c.test(y.namespace))&&(!r||r===y.selector||r==="**"&&y.selector)&&(h.splice(a,1),y.selector&&h.delegateCount--,b.remove&&b.remove.call(e,y));s&&!h.length&&((!b.teardown||b.teardown.call(e,N,O.handle)===!1)&&i.removeEvent(e,m,O.handle),delete f[m])}i.isEmptyObject(f)&&k.remove(e,"handle events")}},dispatch:function(e){var t,n,r,o,a,s,c=new Array(arguments.length),f=i.event.fix(e),d=(k.get(this,"events")||Object.create(null))[f.type]||[],y=i.event.special[f.type]||{};for(c[0]=f,t=1;t=1)){for(;d!==this;d=d.parentNode||this)if(d.nodeType===1&&!(e.type==="click"&&d.disabled===!0)){for(a=[],s={},n=0;n-1:i.find(o,this,null,[d]).length),s[o]&&a.push(r);a.length&&c.push({elem:d,handlers:a})}}return d=this,f\s*$/g;function sn(e,t){return V(e,"table")&&V(t.nodeType!==11?t:t.firstChild,"tr")&&i(e).children("tbody")[0]||e}function cr(e){return e.type=(e.getAttribute("type")!==null)+"/"+e.type,e}function lr(e){return(e.type||"").slice(0,5)==="true/"?e.type=e.type.slice(5):e.removeAttribute("type"),e}function un(e,t){var n,r,o,a,s,c,f;if(t.nodeType===1){if(k.hasData(e)&&(a=k.get(e),f=a.events,f)){k.remove(t,"handle events");for(o in f)for(n=0,r=f[o].length;n1&&typeof m=="string"&&!H.checkClone&&ur.test(m))return e.each(function(R){var O=e.eq(R);N&&(t[0]=m.call(this,R,O.html())),Re(O,t,n,r)});if(b&&(o=on(t,e[0].ownerDocument,!1,e,r),a=o.firstChild,o.childNodes.length===1&&(o=a),a||r)){for(s=i.map(te(o,"script"),cr),c=s.length;y0&&xt(s,!f&&te(e,"script")),c},cleanData:function(e){for(var t,n,r,o=i.event.special,a=0;(n=e[a])!==void 0;a++)if(ze(n)){if(t=n[k.expando]){if(t.events)for(r in t.events)o[r]?i.event.remove(n,r):i.removeEvent(n,r,t.handle);n[k.expando]=void 0}n[ee.expando]&&(n[ee.expando]=void 0)}}}),i.fn.extend({detach:function(e){return fn(this,e,!0)},remove:function(e){return fn(this,e)},text:function(e){return be(this,function(t){return t===void 0?i.text(this):this.empty().each(function(){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&(this.textContent=t)})},null,e,arguments.length)},append:function(){return Re(this,arguments,function(e){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var t=sn(this,e);t.appendChild(e)}})},prepend:function(){return Re(this,arguments,function(e){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var t=sn(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;(e=this[t])!=null;t++)e.nodeType===1&&(i.cleanData(te(e,!1)),e.textContent="");return this},clone:function(e,t){return e=e??!1,t=t??e,this.map(function(){return i.clone(this,e,t)})},html:function(e){return be(this,function(t){var n=this[0]||{},r=0,o=this.length;if(t===void 0&&n.nodeType===1)return n.innerHTML;if(typeof t=="string"&&!sr.test(t)&&!ie[(nn.exec(t)||["",""])[1].toLowerCase()]){t=i.htmlPrefilter(t);try{for(;r=0&&(f+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-a-f-c-.5))||0),f+d}function vn(e,t,n){var r=st(e),o=!H.boxSizingReliable()||n,a=o&&i.css(e,"boxSizing",!1,r)==="border-box",s=a,c=Ge(e,t,r),f="offset"+t[0].toUpperCase()+t.slice(1);if(Ct.test(c)){if(!n)return c;c="auto"}return(!H.boxSizingReliable()&&a||!H.reliableTrDimensions()&&V(e,"tr")||c==="auto"||!parseFloat(c)&&i.css(e,"display",!1,r)==="inline")&&e.getClientRects().length&&(a=i.css(e,"boxSizing",!1,r)==="border-box",s=f in e,s&&(c=e[f])),c=parseFloat(c)||0,c+kt(e,t,n||(a?"border":"content"),s,r,c)+"px"}i.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ge(e,"opacity");return n===""?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,r){if(!(!e||e.nodeType===3||e.nodeType===8||!e.style)){var o,a,s,c=ce(t),f=wt.test(t),d=e.style;if(f||(t=St(c)),s=i.cssHooks[t]||i.cssHooks[c],n!==void 0){if(a=typeof n,a==="string"&&(o=Ve.exec(n))&&o[1]&&(n=en(e,t,o),a="number"),n==null||n!==n)return;a==="number"&&!f&&(n+=o&&o[3]||(i.cssNumber[c]?"":"px")),!H.clearCloneStyle&&n===""&&t.indexOf("background")===0&&(d[t]="inherit"),(!s||!("set"in s)||(n=s.set(e,n,r))!==void 0)&&(f?d.setProperty(t,n):d[t]=n)}else return s&&"get"in s&&(o=s.get(e,!1,r))!==void 0?o:d[t]}},css:function(e,t,n,r){var o,a,s,c=ce(t),f=wt.test(t);return f||(t=St(c)),s=i.cssHooks[t]||i.cssHooks[c],s&&"get"in s&&(o=s.get(e,!0,n)),o===void 0&&(o=Ge(e,t,r)),o==="normal"&&t in gn&&(o=gn[t]),n===""||n?(a=parseFloat(o),n===!0||isFinite(a)?a||0:o):o}}),i.each(["height","width"],function(e,t){i.cssHooks[t]={get:function(n,r,o){if(r)return gr.test(i.css(n,"display"))&&(!n.getClientRects().length||!n.getBoundingClientRect().width)?cn(n,yr,function(){return vn(n,t,o)}):vn(n,t,o)},set:function(n,r,o){var a,s=st(n),c=!H.scrollboxSize()&&s.position==="absolute",f=c||o,d=f&&i.css(n,"boxSizing",!1,s)==="border-box",y=o?kt(n,t,o,d,s):0;return d&&c&&(y-=Math.ceil(n["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(s[t])-kt(n,t,"border",!1,s)-.5)),y&&(a=Ve.exec(r))&&(a[3]||"px")!=="px"&&(n.style[t]=r,r=i.css(n,t)),yn(n,r,y)}}}),i.cssHooks.marginLeft=ln(H.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Ge(e,"marginLeft"))||e.getBoundingClientRect().left-cn(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),i.each({margin:"",padding:"",border:"Width"},function(e,t){i.cssHooks[e+t]={expand:function(n){for(var r=0,o={},a=typeof n=="string"?n.split(" "):[n];r<4;r++)o[e+me[r]+t]=a[r]||a[r-2]||a[0];return o}},e!=="margin"&&(i.cssHooks[e+t].set=yn)}),i.fn.extend({css:function(e,t){return be(this,function(n,r,o){var a,s,c={},f=0;if(Array.isArray(r)){for(a=st(n),s=r.length;f1)}});function ne(e,t,n,r,o){return new ne.prototype.init(e,t,n,r,o)}i.Tween=ne,ne.prototype={constructor:ne,init:function(e,t,n,r,o,a){this.elem=e,this.prop=n,this.easing=o||i.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=a||(i.cssNumber[n]?"":"px")},cur:function(){var e=ne.propHooks[this.prop];return e&&e.get?e.get(this):ne.propHooks._default.get(this)},run:function(e){var t,n=ne.propHooks[this.prop];return this.options.duration?this.pos=t=i.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ne.propHooks._default.set(this),this}},ne.prototype.init.prototype=ne.prototype,ne.propHooks={_default:{get:function(e){var t;return e.elem.nodeType!==1||e.elem[e.prop]!=null&&e.elem.style[e.prop]==null?e.elem[e.prop]:(t=i.css(e.elem,e.prop,""),!t||t==="auto"?0:t)},set:function(e){i.fx.step[e.prop]?i.fx.step[e.prop](e):e.elem.nodeType===1&&(i.cssHooks[e.prop]||e.elem.style[St(e.prop)]!=null)?i.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},ne.propHooks.scrollTop=ne.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},i.easing={linear:function(e){return e},swing:function(e){return .5-Math.cos(e*Math.PI)/2},_default:"swing"},i.fx=ne.prototype.init,i.fx.step={};var _e,ut,vr=/^(?:toggle|show|hide)$/,br=/queueHooks$/;function Et(){ut&&(q.hidden===!1&&T.requestAnimationFrame?T.requestAnimationFrame(Et):T.setTimeout(Et,i.fx.interval),i.fx.tick())}function bn(){return T.setTimeout(function(){_e=void 0}),_e=Date.now()}function ft(e,t){var n,r=0,o={height:e};for(t=t?1:0;r<4;r+=2-t)n=me[r],o["margin"+n]=o["padding"+n]=e;return t&&(o.opacity=o.width=e),o}function mn(e,t,n){for(var r,o=(se.tweeners[t]||[]).concat(se.tweeners["*"]),a=0,s=o.length;a1)},removeAttr:function(e){return this.each(function(){i.removeAttr(this,e)})}}),i.extend({attr:function(e,t,n){var r,o,a=e.nodeType;if(!(a===3||a===8||a===2)){if(typeof e.getAttribute>"u")return i.prop(e,t,n);if((a!==1||!i.isXMLDoc(e))&&(o=i.attrHooks[t.toLowerCase()]||(i.expr.match.bool.test(t)?xn:void 0)),n!==void 0){if(n===null){i.removeAttr(e,t);return}return o&&"set"in o&&(r=o.set(e,n,t))!==void 0?r:(e.setAttribute(t,n+""),n)}return o&&"get"in o&&(r=o.get(e,t))!==null?r:(r=i.find.attr(e,t),r??void 0)}},attrHooks:{type:{set:function(e,t){if(!H.radioValue&&t==="radio"&&V(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,o=t&&t.match(fe);if(o&&e.nodeType===1)for(;n=o[r++];)e.removeAttribute(n)}}),xn={set:function(e,t,n){return t===!1?i.removeAttr(e,n):e.setAttribute(n,n),n}},i.each(i.expr.match.bool.source.match(/\w+/g),function(e,t){var n=Qe[t]||i.find.attr;Qe[t]=function(r,o,a){var s,c,f=o.toLowerCase();return a||(c=Qe[f],Qe[f]=s,s=n(r,o,a)!=null?f:null,Qe[f]=c),s}});var Tr=/^(?:input|select|textarea|button)$/i,Cr=/^(?:a|area)$/i;i.fn.extend({prop:function(e,t){return be(this,i.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[i.propFix[e]||e]})}}),i.extend({prop:function(e,t,n){var r,o,a=e.nodeType;if(!(a===3||a===8||a===2))return(a!==1||!i.isXMLDoc(e))&&(t=i.propFix[t]||t,o=i.propHooks[t]),n!==void 0?o&&"set"in o&&(r=o.set(e,n,t))!==void 0?r:e[t]=n:o&&"get"in o&&(r=o.get(e,t))!==null?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=i.find.attr(e,"tabindex");return t?parseInt(t,10):Tr.test(e.nodeName)||Cr.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),H.optSelected||(i.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),i.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){i.propFix[this.toLowerCase()]=this});function Ee(e){var t=e.match(fe)||[];return t.join(" ")}function De(e){return e.getAttribute&&e.getAttribute("class")||""}function Dt(e){return Array.isArray(e)?e:typeof e=="string"?e.match(fe)||[]:[]}i.fn.extend({addClass:function(e){var t,n,r,o,a,s;return L(e)?this.each(function(c){i(this).addClass(e.call(this,c,De(this)))}):(t=Dt(e),t.length?this.each(function(){if(r=De(this),n=this.nodeType===1&&" "+Ee(r)+" ",n){for(a=0;a-1;)n=n.replace(" "+o+" "," ");s=Ee(n),r!==s&&this.setAttribute("class",s)}}):this):this.attr("class","")},toggleClass:function(e,t){var n,r,o,a,s=typeof e,c=s==="string"||Array.isArray(e);return L(e)?this.each(function(f){i(this).toggleClass(e.call(this,f,De(this),t),t)}):typeof t=="boolean"&&c?t?this.addClass(e):this.removeClass(e):(n=Dt(e),this.each(function(){if(c)for(a=i(this),o=0;o-1)return!0;return!1}});var wr=/\r/g;i.fn.extend({val:function(e){var t,n,r,o=this[0];return arguments.length?(r=L(e),this.each(function(a){var s;this.nodeType===1&&(r?s=e.call(this,a,i(this).val()):s=e,s==null?s="":typeof s=="number"?s+="":Array.isArray(s)&&(s=i.map(s,function(c){return c==null?"":c+""})),t=i.valHooks[this.type]||i.valHooks[this.nodeName.toLowerCase()],(!t||!("set"in t)||t.set(this,s,"value")===void 0)&&(this.value=s))})):o?(t=i.valHooks[o.type]||i.valHooks[o.nodeName.toLowerCase()],t&&"get"in t&&(n=t.get(o,"value"))!==void 0?n:(n=o.value,typeof n=="string"?n.replace(wr,""):n??"")):void 0}}),i.extend({valHooks:{option:{get:function(e){var t=i.find.attr(e,"value");return t??Ee(i.text(e))}},select:{get:function(e){var t,n,r,o=e.options,a=e.selectedIndex,s=e.type==="select-one",c=s?null:[],f=s?a+1:o.length;for(a<0?r=f:r=s?a:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),a}}}}),i.each(["radio","checkbox"],function(){i.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=i.inArray(i(e).val(),t)>-1}},H.checkOn||(i.valHooks[this].get=function(e){return e.getAttribute("value")===null?"on":e.value})});var Ye=T.location,Tn={guid:Date.now()},At=/\?/;i.parseXML=function(e){var t,n;if(!e||typeof e!="string")return null;try{t=new T.DOMParser().parseFromString(e,"text/xml")}catch{}return n=t&&t.getElementsByTagName("parsererror")[0],(!t||n)&&i.error("Invalid XML: "+(n?i.map(n.childNodes,function(r){return r.textContent}).join(` +`):e)),t};var Cn=/^(?:focusinfocus|focusoutblur)$/,wn=function(e){e.stopPropagation()};i.extend(i.event,{trigger:function(e,t,n,r){var o,a,s,c,f,d,y,b,h=[n||q],m=$e.call(e,"type")?e.type:e,N=$e.call(e,"namespace")?e.namespace.split("."):[];if(a=b=s=n=n||q,!(n.nodeType===3||n.nodeType===8)&&!Cn.test(m+i.event.triggered)&&(m.indexOf(".")>-1&&(N=m.split("."),m=N.shift(),N.sort()),f=m.indexOf(":")<0&&"on"+m,e=e[i.expando]?e:new i.Event(m,typeof e=="object"&&e),e.isTrigger=r?2:3,e.namespace=N.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+N.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=t==null?[e]:i.makeArray(t,[e]),y=i.event.special[m]||{},!(!r&&y.trigger&&y.trigger.apply(n,t)===!1))){if(!r&&!y.noBubble&&!je(n)){for(c=y.delegateType||m,Cn.test(c+m)||(a=a.parentNode);a;a=a.parentNode)h.push(a),s=a;s===(n.ownerDocument||q)&&h.push(s.defaultView||s.parentWindow||T)}for(o=0;(a=h[o++])&&!e.isPropagationStopped();)b=a,e.type=o>1?c:y.bindType||m,d=(k.get(a,"events")||Object.create(null))[e.type]&&k.get(a,"handle"),d&&d.apply(a,t),d=f&&a[f],d&&d.apply&&ze(a)&&(e.result=d.apply(a,t),e.result===!1&&e.preventDefault());return e.type=m,!r&&!e.isDefaultPrevented()&&(!y._default||y._default.apply(h.pop(),t)===!1)&&ze(n)&&f&&L(n[m])&&!je(n)&&(s=n[f],s&&(n[f]=null),i.event.triggered=m,e.isPropagationStopped()&&b.addEventListener(m,wn),n[m](),e.isPropagationStopped()&&b.removeEventListener(m,wn),i.event.triggered=void 0,s&&(n[f]=s)),e.result}},simulate:function(e,t,n){var r=i.extend(new i.Event,n,{type:e,isSimulated:!0});i.event.trigger(r,null,t)}}),i.fn.extend({trigger:function(e,t){return this.each(function(){i.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return i.event.trigger(e,t,n,!0)}});var Sr=/\[\]$/,Sn=/\r?\n/g,kr=/^(?:submit|button|image|reset|file)$/i,Er=/^(?:input|select|textarea|keygen)/i;function Nt(e,t,n,r){var o;if(Array.isArray(t))i.each(t,function(a,s){n||Sr.test(e)?r(e,s):Nt(e+"["+(typeof s=="object"&&s!=null?a:"")+"]",s,n,r)});else if(!n&&qe(t)==="object")for(o in t)Nt(e+"["+o+"]",t[o],n,r);else r(e,t)}i.param=function(e,t){var n,r=[],o=function(a,s){var c=L(s)?s():s;r[r.length]=encodeURIComponent(a)+"="+encodeURIComponent(c??"")};if(e==null)return"";if(Array.isArray(e)||e.jquery&&!i.isPlainObject(e))i.each(e,function(){o(this.name,this.value)});else for(n in e)Nt(n,e[n],t,o);return r.join("&")},i.fn.extend({serialize:function(){return i.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=i.prop(this,"elements");return e?i.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!i(this).is(":disabled")&&Er.test(this.nodeName)&&!kr.test(e)&&(this.checked||!Xe.test(e))}).map(function(e,t){var n=i(this).val();return n==null?null:Array.isArray(n)?i.map(n,function(r){return{name:t.name,value:r.replace(Sn,`\r +`)}}):{name:t.name,value:n.replace(Sn,`\r +`)}}).get()}});var Dr=/%20/g,Ar=/#.*$/,Nr=/([?&])_=[^&]*/,jr=/^(.*?):[ \t]*([^\r\n]*)$/mg,qr=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Hr=/^(?:GET|HEAD)$/,Lr=/^\/\//,kn={},jt={},En="*/".concat("*"),qt=q.createElement("a");qt.href=Ye.href;function Dn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,o=0,a=t.toLowerCase().match(fe)||[];if(L(n))for(;r=a[o++];)r[0]==="+"?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function An(e,t,n,r){var o={},a=e===jt;function s(c){var f;return o[c]=!0,i.each(e[c]||[],function(d,y){var b=y(t,n,r);if(typeof b=="string"&&!a&&!o[b])return t.dataTypes.unshift(b),s(b),!1;if(a)return!(f=b)}),f}return s(t.dataTypes[0])||!o["*"]&&s("*")}function Ht(e,t){var n,r,o=i.ajaxSettings.flatOptions||{};for(n in t)t[n]!==void 0&&((o[n]?e:r||(r={}))[n]=t[n]);return r&&i.extend(!0,e,r),e}function Or(e,t,n){for(var r,o,a,s,c=e.contents,f=e.dataTypes;f[0]==="*";)f.shift(),r===void 0&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r){for(o in c)if(c[o]&&c[o].test(r)){f.unshift(o);break}}if(f[0]in n)a=f[0];else{for(o in n){if(!f[0]||e.converters[o+" "+f[0]]){a=o;break}s||(s=o)}a=a||s}if(a)return a!==f[0]&&f.unshift(a),n[a]}function Pr(e,t,n,r){var o,a,s,c,f,d={},y=e.dataTypes.slice();if(y[1])for(s in e.converters)d[s.toLowerCase()]=e.converters[s];for(a=y.shift();a;)if(e.responseFields[a]&&(n[e.responseFields[a]]=t),!f&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),f=a,a=y.shift(),a){if(a==="*")a=f;else if(f!=="*"&&f!==a){if(s=d[f+" "+a]||d["* "+a],!s){for(o in d)if(c=o.split(" "),c[1]===a&&(s=d[f+" "+c[0]]||d["* "+c[0]],s)){s===!0?s=d[o]:d[o]!==!0&&(a=c[0],y.unshift(c[1]));break}}if(s!==!0)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(b){return{state:"parsererror",error:s?b:"No conversion from "+f+" to "+a}}}}return{state:"success",data:t}}i.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ye.href,type:"GET",isLocal:qr.test(Ye.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":En,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":i.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Ht(Ht(e,i.ajaxSettings),t):Ht(i.ajaxSettings,e)},ajaxPrefilter:Dn(kn),ajaxTransport:Dn(jt),ajax:function(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};var n,r,o,a,s,c,f,d,y,b,h=i.ajaxSetup({},t),m=h.context||h,N=h.context&&(m.nodeType||m.jquery)?i(m):i.event,R=i.Deferred(),O=i.Callbacks("once memory"),Y=h.statusCode||{},Q={},le={},de="canceled",I={readyState:0,getResponseHeader:function(_){var G;if(f){if(!a)for(a={};G=jr.exec(o);)a[G[1].toLowerCase()+" "]=(a[G[1].toLowerCase()+" "]||[]).concat(G[2]);G=a[_.toLowerCase()+" "]}return G==null?null:G.join(", ")},getAllResponseHeaders:function(){return f?o:null},setRequestHeader:function(_,G){return f==null&&(_=le[_.toLowerCase()]=le[_.toLowerCase()]||_,Q[_]=G),this},overrideMimeType:function(_){return f==null&&(h.mimeType=_),this},statusCode:function(_){var G;if(_)if(f)I.always(_[I.status]);else for(G in _)Y[G]=[Y[G],_[G]];return this},abort:function(_){var G=_||de;return n&&n.abort(G),Ae(0,G),this}};if(R.promise(I),h.url=((e||h.url||Ye.href)+"").replace(Lr,Ye.protocol+"//"),h.type=t.method||t.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(fe)||[""],h.crossDomain==null){c=q.createElement("a");try{c.href=h.url,c.href=c.href,h.crossDomain=qt.protocol+"//"+qt.host!=c.protocol+"//"+c.host}catch{h.crossDomain=!0}}if(h.data&&h.processData&&typeof h.data!="string"&&(h.data=i.param(h.data,h.traditional)),An(kn,h,t,I),f)return I;d=i.event&&h.global,d&&i.active++===0&&i.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Hr.test(h.type),r=h.url.replace(Ar,""),h.hasContent?h.data&&h.processData&&(h.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&(h.data=h.data.replace(Dr,"+")):(b=h.url.slice(r.length),h.data&&(h.processData||typeof h.data=="string")&&(r+=(At.test(r)?"&":"?")+h.data,delete h.data),h.cache===!1&&(r=r.replace(Nr,"$1"),b=(At.test(r)?"&":"?")+"_="+Tn.guid+++b),h.url=r+b),h.ifModified&&(i.lastModified[r]&&I.setRequestHeader("If-Modified-Since",i.lastModified[r]),i.etag[r]&&I.setRequestHeader("If-None-Match",i.etag[r])),(h.data&&h.hasContent&&h.contentType!==!1||t.contentType)&&I.setRequestHeader("Content-Type",h.contentType),I.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+(h.dataTypes[0]!=="*"?", "+En+"; q=0.01":""):h.accepts["*"]);for(y in h.headers)I.setRequestHeader(y,h.headers[y]);if(h.beforeSend&&(h.beforeSend.call(m,I,h)===!1||f))return I.abort();if(de="abort",O.add(h.complete),I.done(h.success),I.fail(h.error),n=An(jt,h,t,I),!n)Ae(-1,"No Transport");else{if(I.readyState=1,d&&N.trigger("ajaxSend",[I,h]),f)return I;h.async&&h.timeout>0&&(s=T.setTimeout(function(){I.abort("timeout")},h.timeout));try{f=!1,n.send(Q,Ae)}catch(_){if(f)throw _;Ae(-1,_)}}function Ae(_,G,Ke,Ot){var pe,Ze,he,Ce,we,oe=G;f||(f=!0,s&&T.clearTimeout(s),n=void 0,o=Ot||"",I.readyState=_>0?4:0,pe=_>=200&&_<300||_===304,Ke&&(Ce=Or(h,I,Ke)),!pe&&i.inArray("script",h.dataTypes)>-1&&i.inArray("json",h.dataTypes)<0&&(h.converters["text script"]=function(){}),Ce=Pr(h,Ce,I,pe),pe?(h.ifModified&&(we=I.getResponseHeader("Last-Modified"),we&&(i.lastModified[r]=we),we=I.getResponseHeader("etag"),we&&(i.etag[r]=we)),_===204||h.type==="HEAD"?oe="nocontent":_===304?oe="notmodified":(oe=Ce.state,Ze=Ce.data,he=Ce.error,pe=!he)):(he=oe,(_||!oe)&&(oe="error",_<0&&(_=0))),I.status=_,I.statusText=(G||oe)+"",pe?R.resolveWith(m,[Ze,oe,I]):R.rejectWith(m,[I,oe,he]),I.statusCode(Y),Y=void 0,d&&N.trigger(pe?"ajaxSuccess":"ajaxError",[I,h,pe?Ze:he]),O.fireWith(m,[I,oe]),d&&(N.trigger("ajaxComplete",[I,h]),--i.active||i.event.trigger("ajaxStop")))}return I},getJSON:function(e,t,n){return i.get(e,t,n,"json")},getScript:function(e,t){return i.get(e,void 0,t,"script")}}),i.each(["get","post"],function(e,t){i[t]=function(n,r,o,a){return L(r)&&(a=a||o,o=r,r=void 0),i.ajax(i.extend({url:n,type:t,dataType:a,data:r,success:o},i.isPlainObject(n)&&n))}}),i.ajaxPrefilter(function(e){var t;for(t in e.headers)t.toLowerCase()==="content-type"&&(e.contentType=e.headers[t]||"")}),i._evalUrl=function(e,t,n){return i.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(r){i.globalEval(r,t,n)}})},i.fn.extend({wrapAll:function(e){var t;return this[0]&&(L(e)&&(e=e.call(this[0])),t=i(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var n=this;n.firstElementChild;)n=n.firstElementChild;return n}).append(this)),this},wrapInner:function(e){return L(e)?this.each(function(t){i(this).wrapInner(e.call(this,t))}):this.each(function(){var t=i(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=L(e);return this.each(function(n){i(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){i(this).replaceWith(this.childNodes)}),this}}),i.expr.pseudos.hidden=function(e){return!i.expr.pseudos.visible(e)},i.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},i.ajaxSettings.xhr=function(){try{return new T.XMLHttpRequest}catch{}};var Mr={0:200,1223:204},Je=i.ajaxSettings.xhr();H.cors=!!Je&&"withCredentials"in Je,H.ajax=Je=!!Je,i.ajaxTransport(function(e){var t,n;if(H.cors||Je&&!e.crossDomain)return{send:function(r,o){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),!e.crossDomain&&!r["X-Requested-With"]&&(r["X-Requested-With"]="XMLHttpRequest");for(a in r)s.setRequestHeader(a,r[a]);t=function(c){return function(){t&&(t=n=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,c==="abort"?s.abort():c==="error"?typeof s.status!="number"?o(0,"error"):o(s.status,s.statusText):o(Mr[s.status]||s.status,s.statusText,(s.responseType||"text")!=="text"||typeof s.responseText!="string"?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),n=s.onerror=s.ontimeout=t("error"),s.onabort!==void 0?s.onabort=n:s.onreadystatechange=function(){s.readyState===4&&T.setTimeout(function(){t&&n()})},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(c){if(t)throw c}},abort:function(){t&&t()}}}),i.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),i.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return i.globalEval(e),e}}}),i.ajaxPrefilter("script",function(e){e.cache===void 0&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),i.ajaxTransport("script",function(e){if(e.crossDomain||e.scriptAttrs){var t,n;return{send:function(r,o){t=i(" + + + + + + + + +
+ + + Home + +

+
+ +
+ + +
+
+
+ + diff --git a/my-work/cherry-lane-farms/index.html b/my-work/cherry-lane-farms/index.html new file mode 100644 index 0000000..f118592 --- /dev/null +++ b/my-work/cherry-lane-farms/index.html @@ -0,0 +1,133 @@ + + + + + + Tyler Davis | Development of Cherry Lane Farms + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + Home + +

+
+ +
+ + +
+
+
+ + diff --git a/my-work/duck-story-v1/css/animate_rain.css b/my-work/duck-story-v1/css/animate_rain.css new file mode 100644 index 0000000..623fd3d --- /dev/null +++ b/my-work/duck-story-v1/css/animate_rain.css @@ -0,0 +1,35 @@ +@keyframes slideOutDown { + from { + transform: translate3d(0, 0, 0); + } + + to { + transform: translate3d(0, 130vh, 0); + } +} + + +.sky { + display: flex; +} + + +.air { + flex: 4; +} + + +.raindrop { + animation-name: slideOutDown; + animation-iteration-count: infinite; + animation-duration: .5s; + animation-timing-function: linear; + background-color: blue; + border-radius: 50%; + height: 10px; + flex: 0 0 5px; + position: relative; + opacity: 0; + top: -20px; + display: none; +} diff --git a/my-work/duck-story-v1/css/animate_water_flow.css b/my-work/duck-story-v1/css/animate_water_flow.css new file mode 100644 index 0000000..17c7a63 --- /dev/null +++ b/my-work/duck-story-v1/css/animate_water_flow.css @@ -0,0 +1,53 @@ +#water1, .water_flow, #water2{ + animation-delay: 1s; + animation-name: water_flow1; + animation-timing-function: ease-in-out; + animation-iteration-count: infinite; + animation-duration: 5s; + color: white; + font-weight: 950; +} + +@keyframes water_flow1 { + from { + transform: scale3d(1, 1, 1); + } + + 25% { + transform: scale3d(0.95, 1, 1.1) translateX(-5px); + } + + 75% { + transform: scale3d(1.05, 1, 1.15) translateX(5px); + } + + to { + transform: scale3d(1, 1, 1); + } +} + +#water2{ +/* this line was changed for science. */ + animation-name: water_flow2; + animation-duration: 4s; + position: relative; + top: -25px; +} + +@keyframes water_flow2 { + from { + transform: scale3d(1, 1, 1); + } + + 25% { + transform: scale3d(1.05, 1, .9) translateX(5px); + } + + 75% { + transform: scale3d(.96, 1, 1.05) translateX(-5px); + } + + to { + transform: scale3d(1, 1, 1); + } +} diff --git a/my-work/duck-story-v1/css/page1-styles.css b/my-work/duck-story-v1/css/page1-styles.css new file mode 100644 index 0000000..439e43e --- /dev/null +++ b/my-work/duck-story-v1/css/page1-styles.css @@ -0,0 +1,22 @@ +@import "animate_water_flow.css"; +@import "animate_rain.css"; + +#waterBody{ + background-color: darkblue; + border-radius: 100%; + padding-top:30px; + width:320px; + box-shadow: darkblue 0 0 50px; + margin: 20px; + padding-left: 17%; +} + +.sky { + height: 0; +} + +@media (max-width: 499px){ + #waterBody{ + padding-left: 3%; + } +} \ No newline at end of file diff --git a/my-work/duck-story-v1/css/pizza-styles.css b/my-work/duck-story-v1/css/pizza-styles.css new file mode 100644 index 0000000..e30b442 --- /dev/null +++ b/my-work/duck-story-v1/css/pizza-styles.css @@ -0,0 +1,4 @@ +@media (max-width: 810px){ + button#print_this { + display: none; + } \ No newline at end of file diff --git a/my-work/duck-story-v1/css/styles.css b/my-work/duck-story-v1/css/styles.css new file mode 100644 index 0000000..1ce97b9 --- /dev/null +++ b/my-work/duck-story-v1/css/styles.css @@ -0,0 +1,185 @@ +.flex-container{ + display: flex; + flex-direction: column; +} +.main_container{ + display: flex; + flex-direction: unset; +} +.flex-container > aside { transition: flex, linear, 7s; } +.flex-container > aside:nth-of-type(2) { flex: 1; } + + +html, body { + transition: background-color, 7s; + margin: 0; + height: 100%; +} + + +article { + flex: 0 0 500px; +} + +button, button:active { + margin-left: 30px; + padding: 7px; + background-color: #888; + color: white; + border: none; + transition: opacity 1s; + border-radius: 3px; + border: 1px solid #444; +} +button:active { + background-color: #666; +} + +input { + border:none; + outline:none; + background-color: white; + transition: background-color 3s; + font-family: monospace; + +} + + +span.inline > * { + display: inline; +} + +#print, header, .phasedDisplay > *, .phaseTwo > *, .phaseTwo, .phaseThree > *, div.hidden_ascii { + display: none; +} + +#helper{ + font-size: x-small; + margin-left: 10em; + display: none; +} +#mobile_helper{ + display: none; +} +#mobile_helper_screen{ + display: none; +} + +#player_buttons > *{ + stroke: none; + fill: #444; + padding: 20px; +} + +.phasedDisplay > .phaseTwo > #eyes { + font-size: 30pt; + text-shadow: 1px 1px 3px black; +} + +#duck { + position: relative; + margin-left: 20px; + transition-property: margin; + transition-duration: 1s; +} + +#frog { + font-size: 10pt; +} + +#dog { + margin-left: 20px; +} + +#hog { +} + +#eggnog { + font-size: 12pt; + margin-left: 45px; +} + +.ascii_animals_block { + display: flex; + margin: 20px; +} + +.ascii_animal { + text-shadow: 0 0 3px black, 0 0 3px black, 0 0 3px black; + font-size: 18pt; + font-weight: 950; + transition-property: margin; + transition-duration: 1s; +} + +/*MEDIA QUERIES*/ +@media print { + body > *, header > *, main > *{ + display: none; + } + + #print{ + display:block !important; + font-size:19pt; + position:absolute; + } +} + + +@media (max-width: 499px) { + article { + max-width: 355px; + min-width: unset; + overflow-wrap: anywhere; + } +} + +@media (max-width: 810px){ + header { + padding: 15px; + background-color: darkgoldenrod; + display: flex; + border-radius: 4px; + } + + header > p { + margin: 0; + color: white; + } + + header > button { + height: fit-content; + background-color: goldenrod; + border-radius: 7px; + border: 1px solid white; + } + + header > button:active { + height: fit-content; + background-color: #9C7616; + border-radius: 7px; + border: 1px solid white; + } + #mobile_helper_input{ + opacity: 0; + display:block; + position:absolute; + width: 10.5em; + height: 2em; + margin-top: -.60em; + margin-left: -.8em; + } + #mobile_helper_screen{ + display:block; + position:absolute; + + background-color: #666; + color: white; + padding: 6px; + margin-top: 8px; + + border-radius: 3px; + border: 1px solid #444; + + } +} diff --git a/my-work/duck-story-v1/duck_sounds/1/funny-story.mp3 b/my-work/duck-story-v1/duck_sounds/1/funny-story.mp3 new file mode 100644 index 0000000..7bea377 Binary files /dev/null and b/my-work/duck-story-v1/duck_sounds/1/funny-story.mp3 differ diff --git a/my-work/duck-story-v1/duck_sounds/1/journey-to-the-sun.mp3 b/my-work/duck-story-v1/duck_sounds/1/journey-to-the-sun.mp3 new file mode 100644 index 0000000..4af5827 Binary files /dev/null and b/my-work/duck-story-v1/duck_sounds/1/journey-to-the-sun.mp3 differ diff --git a/my-work/duck-story-v1/duck_sounds/1/positive-way.mp3 b/my-work/duck-story-v1/duck_sounds/1/positive-way.mp3 new file mode 100644 index 0000000..cdd07ae Binary files /dev/null and b/my-work/duck-story-v1/duck_sounds/1/positive-way.mp3 differ diff --git a/my-work/duck-story-v1/duck_sounds/1/spring-upbeat.mp3 b/my-work/duck-story-v1/duck_sounds/1/spring-upbeat.mp3 new file mode 100644 index 0000000..ffc0cd2 Binary files /dev/null and b/my-work/duck-story-v1/duck_sounds/1/spring-upbeat.mp3 differ diff --git a/my-work/duck-story-v1/duck_sounds/1/that-good-feeling.mp3 b/my-work/duck-story-v1/duck_sounds/1/that-good-feeling.mp3 new file mode 100644 index 0000000..7ab9f2d Binary files /dev/null and b/my-work/duck-story-v1/duck_sounds/1/that-good-feeling.mp3 differ diff --git a/my-work/duck-story-v1/duck_sounds/1/upbeat-funky-retro.mp3 b/my-work/duck-story-v1/duck_sounds/1/upbeat-funky-retro.mp3 new file mode 100644 index 0000000..2d3ceb4 Binary files /dev/null and b/my-work/duck-story-v1/duck_sounds/1/upbeat-funky-retro.mp3 differ diff --git a/my-work/duck-story-v1/duck_sounds/1/upbeat-summer-pop.mp3 b/my-work/duck-story-v1/duck_sounds/1/upbeat-summer-pop.mp3 new file mode 100644 index 0000000..a5632df Binary files /dev/null and b/my-work/duck-story-v1/duck_sounds/1/upbeat-summer-pop.mp3 differ diff --git a/my-work/duck-story-v1/duck_sounds/2/beyond.mp3 b/my-work/duck-story-v1/duck_sounds/2/beyond.mp3 new file mode 100644 index 0000000..56a4f92 Binary files /dev/null and b/my-work/duck-story-v1/duck_sounds/2/beyond.mp3 differ diff --git a/my-work/duck-story-v1/duck_sounds/2/electro-jazz.mp3 b/my-work/duck-story-v1/duck_sounds/2/electro-jazz.mp3 new file mode 100644 index 0000000..8bd443b Binary files /dev/null and b/my-work/duck-story-v1/duck_sounds/2/electro-jazz.mp3 differ diff --git a/my-work/duck-story-v1/duck_sounds/2/flashes.mp3 b/my-work/duck-story-v1/duck_sounds/2/flashes.mp3 new file mode 100644 index 0000000..1fc07e2 Binary files /dev/null and b/my-work/duck-story-v1/duck_sounds/2/flashes.mp3 differ diff --git a/my-work/duck-story-v1/duck_sounds/2/future-bass-hot-night.mp3 b/my-work/duck-story-v1/duck_sounds/2/future-bass-hot-night.mp3 new file mode 100644 index 0000000..3a9abed Binary files /dev/null and b/my-work/duck-story-v1/duck_sounds/2/future-bass-hot-night.mp3 differ diff --git a/my-work/duck-story-v1/duck_sounds/2/space.mp3 b/my-work/duck-story-v1/duck_sounds/2/space.mp3 new file mode 100644 index 0000000..ab91678 Binary files /dev/null and b/my-work/duck-story-v1/duck_sounds/2/space.mp3 differ diff --git a/my-work/duck-story-v1/duck_sounds/2/synthwave-80s.mp3 b/my-work/duck-story-v1/duck_sounds/2/synthwave-80s.mp3 new file mode 100644 index 0000000..e707785 Binary files /dev/null and b/my-work/duck-story-v1/duck_sounds/2/synthwave-80s.mp3 differ diff --git a/my-work/duck-story-v1/duck_sounds/2/synthwave-outrun.mp3 b/my-work/duck-story-v1/duck_sounds/2/synthwave-outrun.mp3 new file mode 100644 index 0000000..810484c Binary files /dev/null and b/my-work/duck-story-v1/duck_sounds/2/synthwave-outrun.mp3 differ diff --git a/my-work/duck-story-v1/duck_sounds/3/calm-and-light-breakbeat.mp3 b/my-work/duck-story-v1/duck_sounds/3/calm-and-light-breakbeat.mp3 new file mode 100644 index 0000000..63d4924 Binary files /dev/null and b/my-work/duck-story-v1/duck_sounds/3/calm-and-light-breakbeat.mp3 differ diff --git a/my-work/duck-story-v1/duck_sounds/3/disco-groove.mp3 b/my-work/duck-story-v1/duck_sounds/3/disco-groove.mp3 new file mode 100644 index 0000000..150dddd Binary files /dev/null and b/my-work/duck-story-v1/duck_sounds/3/disco-groove.mp3 differ diff --git a/my-work/duck-story-v1/duck_sounds/3/first.mp3 b/my-work/duck-story-v1/duck_sounds/3/first.mp3 new file mode 100644 index 0000000..bfcadf2 Binary files /dev/null and b/my-work/duck-story-v1/duck_sounds/3/first.mp3 differ diff --git a/my-work/duck-story-v1/duck_sounds/3/go_guy.mp3 b/my-work/duck-story-v1/duck_sounds/3/go_guy.mp3 new file mode 100644 index 0000000..4d2f1f3 Binary files /dev/null and b/my-work/duck-story-v1/duck_sounds/3/go_guy.mp3 differ diff --git a/my-work/duck-story-v1/duck_sounds/3/rock-dedication.mp3 b/my-work/duck-story-v1/duck_sounds/3/rock-dedication.mp3 new file mode 100644 index 0000000..487c294 Binary files /dev/null and b/my-work/duck-story-v1/duck_sounds/3/rock-dedication.mp3 differ diff --git a/my-work/duck-story-v1/duck_sounds/3/tango-hip-hop.mp3 b/my-work/duck-story-v1/duck_sounds/3/tango-hip-hop.mp3 new file mode 100644 index 0000000..2f09fd6 Binary files /dev/null and b/my-work/duck-story-v1/duck_sounds/3/tango-hip-hop.mp3 differ diff --git a/my-work/duck-story-v1/duck_sounds/3/tropical-summer.mp3 b/my-work/duck-story-v1/duck_sounds/3/tropical-summer.mp3 new file mode 100644 index 0000000..4f6e9f5 Binary files /dev/null and b/my-work/duck-story-v1/duck_sounds/3/tropical-summer.mp3 differ diff --git a/my-work/duck-story-v1/duck_sounds/ambient/livelyatmosphere.mp3 b/my-work/duck-story-v1/duck_sounds/ambient/livelyatmosphere.mp3 new file mode 100644 index 0000000..14bd28d Binary files /dev/null and b/my-work/duck-story-v1/duck_sounds/ambient/livelyatmosphere.mp3 differ diff --git a/my-work/duck-story-v1/duck_sounds/ambient/stream-running-into-pond.mp3 b/my-work/duck-story-v1/duck_sounds/ambient/stream-running-into-pond.mp3 new file mode 100644 index 0000000..b6a5178 Binary files /dev/null and b/my-work/duck-story-v1/duck_sounds/ambient/stream-running-into-pond.mp3 differ diff --git a/my-work/duck-story-v1/duck_sounds/kim_possible.mp3 b/my-work/duck-story-v1/duck_sounds/kim_possible.mp3 new file mode 100644 index 0000000..b88484d Binary files /dev/null and b/my-work/duck-story-v1/duck_sounds/kim_possible.mp3 differ diff --git a/my-work/duck-story-v1/eata-the-pizza.html b/my-work/duck-story-v1/eata-the-pizza.html new file mode 100644 index 0000000..74e18cf --- /dev/null +++ b/my-work/duck-story-v1/eata-the-pizza.html @@ -0,0 +1,163 @@ + + + + + + Cowabunga, dudes. It's Pizza Time. + + + + + +
+ +
+
+

They-a eat-a the pizza

+

So, Duck and decided to head into town to visit a pizza shop they had seen a few times.

+

Hit "Enter" on your keyboard. + Tap here to show keyboard +

It was called Pizza Fantastic. And it was truly the most fantastic pizza place they had ever seen.

+

As soon as they walked in the door, a lady screamed!

+

AAAAAAAAAHHHHHHHHHHH!!!!!!!

+

OHHH

+

EMMM

+

GEEEEE

+

IT'S A DUCK AND A !!!!!!!!!!

+

SHOOOO SHOOOO!!!!!!!!!!

+

The owner, Mr. Fantastic, came over.

+

"Sorry, guys", He said. "I can only serve paying customers today."

+

Duck and had to leave.

+

"That wasn't very fantastic", said .

+

Duck nodded.

+

"But, I bet we could still get some pizza if we are sneaky." said Duck.

+

"How is that?" asked .

+

"We'll start a band! Then, when we play music people will pay us money and we can use that to buy pizza!", said Duck.

+

"That sounds awesome!", said .

+

So, they went and stole some music stuff and practiced real hard.

+

Finally, they felt like they were ready.

+

They went back to Pizza Fantastic and started playing one of the songs they had practiced.

+
+ Which song should they play? + +
+ +
+ +
+
+

The song is playing.

+
+ + + + + + + + + + +
+

Did you like that song?

+
+ Boring!Awesome! +
+

That was a song! Duck and have made . They still need so that they can buy a pizza at Pizza Fantastic!

+

What should they play next?

+

FINALLY!!! They had enough money to buy a pizza!

+

"Now we just have to find a way to sneak inside without getting caught by that scary screaming lady." said .

+

"Let's go around the back." said Duck.

+

So, they went around the back.

+

They waited

+

When Mr. Fantastic came outside to take out the trash, they slipped in the door behind him, grabbed a pizza, and left the cash on the counter.

+

YAYYY!!

+

Duck and were so happy, they did a little dance in their pizza.

+

The End.

+
+ + +
+
+
+ +
+
+
+
+
+  __
+=(• )___
+ (  _> /  
+					
+
+       _   _
+      (•)_(•)
+   _ (   _   ) _
+  / \/`-----'\/ \
+__\ ( (     ) ) /__
+)   /\ \___/ /\   (
+ )_/ /|\   /|\ \_(
+					
+
+     __
+(___()•`;
+/,    /`
+\\'--\\
+					
+
+^..^_____  
+(00)     \9
+  \______/ 
+   WW  WW
+					
+
+ ____
+|____|      
+/___/_\      
+|   | |      
+|nog| |      
+|   | |      
+|___|_|      
+					
+
+
+      ----^--^------^--^--^--^------^--^
+						
+
+         --^----^--        --^----^--
+						
+
+
+
+
+                                   ___
+                               ,-""   `.
+                             ,'  _   • )`-._
+                            /  ,' `-._:.===-'
+                           /  /             ^
+                          /  ;             /c\
+              _.--.__    /   ;            /o~.\
+ (`._    _.-""       "--'    |           /~.0 ~\
+ (_  `-""                     \         (^^^^^^^)
+  (`-                          :         """""""
+   (__   (__.                  ;
+     `-.   '-.__.      _.'    /
+        \      `-.__,-'    _,'
+         `._    ,    /__,-'
+            ""._\__,'| |____
+                 | |  `----.`.
+                 | |        \ `.
+                 ; |___      \-``
+                 \   --)
+                  `.`.)       🍕
+
+               Goose with Pizza.
+      (neither goose nor pizza are ducks.)
+
+ +
+ + +
+ diff --git a/my-work/duck-story-v1/favicon.ico b/my-work/duck-story-v1/favicon.ico new file mode 100644 index 0000000..d01a715 Binary files /dev/null and b/my-work/duck-story-v1/favicon.ico differ diff --git a/my-work/duck-story-v1/img/go_guy.png b/my-work/duck-story-v1/img/go_guy.png new file mode 100644 index 0000000..04dd5bf Binary files /dev/null and b/my-work/duck-story-v1/img/go_guy.png differ diff --git a/my-work/duck-story-v1/index.html b/my-work/duck-story-v1/index.html new file mode 100644 index 0000000..cad7611 --- /dev/null +++ b/my-work/duck-story-v1/index.html @@ -0,0 +1,229 @@ + + + + + + + + + The Duck Story + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+ Note to Parents: The Duck story is meant to be read on a desktop computer or laptop. It's a great way to help kids learn how to interface with computers. Most children grow up with an ability to navigate mobile devices better than they can a mouse and keyboard. Consider making this an activity that you can do with your child! +

+ +
+
+ +
+

Welcome to story time

+ +
+

Once upon a time there was a duck.

+

Now, what was the color of that duck again?

+ +

I think she was a

+ +

duck.

+
+

Hit "Enter" on your keyboard. + Tap here to show keyboard +

+

Hmmmmmm.....

+

No, that wasn't it.

+

+
+

Now, where is that duck? She was just around here somewhere.

+

Let's see.......

+
+👀
+		  
+

ah!

+

there she is.

+
+  __
+=(• )___
+ (  _> /  
+                
+

One day duck was splashing in the pond with her best friend.

+
+
+
+
+
+ Please Choose one friend for duck. + + +
+ + +
+ + +
+ + +
+
+

You have to pick a friend for duck first!

+

duck's best friend was a named + + . + +

+
+ Does sound right? + + +
+ + +
+
+

I always forget what color is. Do you remember?

+ +

Maybe they were a

+ + . +
+

"You sure are one goofy , ." duck said as they splashed together.

+

laughed.

+

Duck laughed.

+

After a little while it started to rain.

+

How bad was the storm?

+
+ Not too bad. Really Bad. +
+

"We should get out of the water during a rainstorm." said

+

"Yeah. I'm hungry anyways. What should we eat today?" said duck.

+
+ What should they eat? + +
+ +
+ +
+
+

"Let's eat ", said

+

Time to slurp the pud

+

The grape story (for brave souls)

+
+
+----^--^------^--^--^--^------^--^
+
+			  
+
+   --^----^--        --^----^--
+			  
+
+
+
+ +
+
+
+       _   _
+      (•)_(•)
+   _ (   _   ) _
+  / \/`-----'\/ \
+__\ ( (     ) ) /__
+)   /\ \___/ /\   (
+ )_/ /|\   /|\ \_(
+	  
+
+     __
+(___()•`;
+/,    /`
+\\'--\\
+	  
+
+^..^_____  
+(00)     \9
+  \______/ 
+   WW  WW
+	  
+
+ ____
+|____|      
+/___/_\      
+|   | |      
+|nog| |      
+|   | |      
+|___|_|      
+	  
+
+
+
+                                   ___
+                               ,-""   `.
+                             ,'  _   • )`-._
+                            /  ,' `-._:.===-'
+                           /  /
+                          /  ;
+              _.--.__    /   ;
+ (`._    _.-""       "--'    |
+ (_  `-""                     \
+  (`-                          :
+   (__   (__.                  ;
+     `-.   '-.__.      _.'    /
+        \      `-.__,-'    _,'
+         `._    ,    /__,-'
+            ""._\__,'| |____
+                 | |  `----.`.
+                 | |        \ `.
+                 ; |___      \-``
+                 \   --)
+                  `.`.)
+
+            Goose. (not a duck.)
+
+ + + + diff --git a/my-work/duck-story-v1/js/eata-the-pizza.js b/my-work/duck-story-v1/js/eata-the-pizza.js new file mode 100644 index 0000000..33c9b31 --- /dev/null +++ b/my-work/duck-story-v1/js/eata-the-pizza.js @@ -0,0 +1,493 @@ +"use strict"; + +const page = { + body: document.querySelector("body"), + lightGreenBG: "#B3DCBD", + container: document.querySelector(".container"), + duckType: document.querySelectorAll(".duck_type"), + friendType: document.querySelectorAll(".friend_type"), + friendName: document.querySelectorAll(".friend_name"), + helper: new displayFunc("#helper"), + pizzaHeading: new displayFunc("#pizza_story"), + visitPizza: new displayFunc("#visit_pizza"), + pizzaFantastic: new displayFunc("#pizza_fantastic"), + scream: new displayFunc("#scream"), + karenWords1: new displayFunc("#karenWords1"), + karenWords2: new displayFunc("#karenWords2"), + karenWords3: new displayFunc("#karenWords3"), + karenWords4: new displayFunc("#karenWords4"), + karenWords5: new displayFunc("#karenWords5"), + karenWords6: new displayFunc("#karenWords6"), + mrFantastic: new displayFunc("#mrFantastic"), + sorryGuys: new displayFunc("#sorry_guys"), + leave: new displayFunc("#leave"), + notFantastic: new displayFunc("#notFantastic"), + duckNod: new displayFunc("#duck_nod"), + sneaky: new displayFunc("#sneaky"), + sneakyHow: new displayFunc("#sneaky_how"), + startBand: new displayFunc("#start_band"), + soundsAwesome: new displayFunc("#sounds_awesome"), + musicPractice: new displayFunc("#music_practice"), + finallyReady: new displayFunc("#finally_ready"), + back4More: new displayFunc("#back_4_more"), + songChoose: new displayFunc("#song_choose"), + playButton: new displayFunc("#play_button"), + pauseButton: new displayFunc("#pause_button"), + ffwdButton: new displayFunc("#ffwd_button"), + songPlaying: new displayFunc("#song_playing"), + howGood: new displayFunc("#how_good"), + songRatingSlide: new displayFunc("#song_rating_slide"), + songReviewSliderInput: new displayFunc("input#song_review"), + songRatingDisplay: new displayFunc("#song_rating_display"), + rating: new displayFunc("#rating"), + songPlayAgain: new displayFunc("#song_playAgain"), + pizzaFinally: new displayFunc("#pizza_finally"), + sneakInside: new displayFunc("#sneak_inside"), + slipInTheBack: new displayFunc("#slip_in_the_back"), + outback: new displayFunc("#outback"), + pizzaWait: new displayFunc("#pizza_wait"), + ninjaSneak: new displayFunc("#ninja_sneak"), + YAY: new displayFunc("#YAY"), + pizzaDance: new displayFunc("#pizza_dance"), + pizzaEnd: new displayFunc("#pizza_end"), + pizzaEndButtons: new displayFunc("#pizza_end_buttons") +} + +document.addEventListener("DOMContentLoaded", async () => { + page.body.style.background = page.lightGreenBG; + page.container.style.flex = 1; + + //parse local storage for saved data. + const parsedJson = JSON.parse(localStorage.getItem("duck")); + + try { + switch (parsedJson.friend.type){ + case ("frog"): + ascii.duck.friend = ascii.frog; + break; + case ("dog"): + ascii.duck.friend = ascii.dog; + break; + case ("hog"): + ascii.duck.friend = ascii.hog; + break; + case ("eggnog"): + ascii.duck.friend = ascii.eggnog; + break; + } + } + catch (TypeError){ + document.write("

No jumping ahead, cheater! You have to complete the first part of the story FIRST.

") + document.write("") + } + + ascii.duck.color = parsedJson.color; + ascii.duck.friend.name = parsedJson.friend.name; + ascii.duck.friend.color = parsedJson.friend.color; + ascii.duck.friend.type = parsedJson.friend.type; + + bonusLevel.enabled = JSON.parse(localStorage.getItem("bonus")).enabled; + bonusEgg(); + + for (let i of page.duckType) + i.style.color = ascii.duck.color; + for (let i of page.friendName){ + i.innerText = ascii.duck.friend.name; + i.style.color = ascii.duck.friend.color; + } + for (let i of page.friendType){ + i.innerText = ascii.duck.friend.type; + i.style.color = ascii.duck.friend.color; + } + + await page.pizzaHeading.show({sec: 5}); //testing only + await page.visitPizza.show(); + page.helper.show(); + await listen4Enter(); + page.helper.hide(); + //await page.pizzaHeading.hide(); // Testers saying having something at the top helps UI + await page.visitPizza.hide(); + + await page.scream.show() + await page.karenWords1.show({sec: 2.5}); //testing only + await page.karenWords2.show({sec: .5}); //actual + await page.karenWords3.show({sec: .5}); //actual + await page.karenWords4.show(); + const friendCaps = document.createTextNode(ascii.duck.friend.type.toUpperCase()); + const friendTypeCaps = document.querySelector("#friend_typeCaps"); + friendTypeCaps.append(friendCaps); + friendTypeCaps.style.color = ascii.duck.friend.color; + + await page.karenWords5.show({sec: 2}); //testing only + await page.karenWords6.show(); + + page.karenWords6.tag.after(page.helper.tag); + page.helper.show(); + await listen4Enter(); + page.helper.hide(); + await page.scream.hide(); + await page.karenWords1.hide(); + await page.karenWords2.hide(); + await page.karenWords3.hide(); + await page.karenWords4.hide(); + await page.karenWords5.hide(); + await page.karenWords6.hide(); + + await page.mrFantastic.show(); + await page.sorryGuys.show(); + await page.leave.show(); + + page.leave.tag.after(page.helper.tag); + page.helper.show(); + await listen4Enter(); + page.helper.hide(); + + await page.mrFantastic.hide(); + await page.sorryGuys.hide(); + await page.leave.hide(); + + await page.notFantastic.show(); + await page.duckNod.show(); + await page.sneaky.show(); + + page.sneaky.tag.after(page.helper.tag); + page.helper.show(); + await listen4Enter(); + page.helper.hide(); + + await page.notFantastic.hide(); + await page.duckNod.hide(); + await page.sneaky.hide(); + + await page.sneakyHow.show(); + await page.startBand.show(); + await page.soundsAwesome.show(); + + page.soundsAwesome.tag.after(page.helper.tag); + page.helper.show(); + await listen4Enter(); + page.helper.hide(); + + await page.sneakyHow.hide(); + await page.startBand.hide(); + await page.soundsAwesome.hide(); + + await page.musicPractice.show(); + await page.finallyReady.show(); + await page.back4More.show(); + + page.back4More.tag.after(page.helper.tag); + page.helper.show(); + await listen4Enter(); + page.helper.hide(); + + await page.musicPractice.hide(); + await page.finallyReady.hide(); + await page.back4More.hide(); + + await page.songChoose.show(); + page.songChoose.tag.after(page.helper.tag); + + + let money = 0; + // iterate over the song game as long as the duck doesn't have 20 money. + do{ + if (money > 0){ + + let songRatingDisplay = document.getElementById("song_rating_display"), + songMoneyEarned = document.getElementById("song_moneyEarned"), + songMoneyNeeded = document.getElementById("song_moneyNeeded"); + if (page.songReviewSliderInput.tag.value >= 1 & page.songReviewSliderInput.tag.value < 3){ + songRatingDisplay.innerText = "bad"; + } + else if (page.songReviewSliderInput.tag.value >= 3 & page.songReviewSliderInput.tag.value < 5){ + songRatingDisplay.innerText = "lame"; + } + else if (page.songReviewSliderInput.tag.value >= 5 & page.songReviewSliderInput.tag.value < 7){ + songRatingDisplay.innerText = "decent"; + } + else if (page.songReviewSliderInput.tag.value >= 7 & page.songReviewSliderInput.tag.value < 9){ + songRatingDisplay.innerText = "great"; + } + else if (page.songReviewSliderInput.tag.value >9){ + songRatingDisplay.innerText = "FANTASTIC"; + } + + songMoneyEarned.innerText = new Intl.NumberFormat(getLanguage(), {style: "currency", currency: "USD"}).format(money); + songMoneyNeeded.innerText = new Intl.NumberFormat(getLanguage(), {style: "currency", currency: "USD"}).format(20 - money); + + await page.rating.show({sec: 3}); + await page.songPlayAgain.show(); + } + + let songDebut = null; + let song = new Audio(); + await (songDebut = async () => { + + page.songChoose.tag.disabled = false; + page.songPlayAgain.tag.after(page.helper.tag); + + + //Need to add a fisher-yates shuffler to this so that their are no repeats of songs. + + const songOptions1 = [ + "duck_sounds/1/funny-story.mp3", + "duck_sounds/1/journey-to-the-sun.mp3", + "duck_sounds/1/positive-way.mp3", + "duck_sounds/1/spring-upbeat.mp3", + "duck_sounds/1/that-good-feeling.mp3", + "duck_sounds/1/upbeat-funky-retro.mp3", + "duck_sounds/1/upbeat-summer-pop.mp3" + ] + + const songOptions2 = [ + "duck_sounds/2/beyond.mp3", + "duck_sounds/2/electro-jazz.mp3", + "duck_sounds/2/flashes.mp3", + "duck_sounds/2/future-bass-hot-night.mp3", + "duck_sounds/2/space.mp3", + "duck_sounds/2/synthwave-80s.mp3", + "duck_sounds/2/synthwave-outrun.mp3" + ] + + const songOptions3 = [ + "duck_sounds/3/calm-and-light-breakbeat.mp3", + "duck_sounds/3/disco-groove.mp3", + "duck_sounds/3/first.mp3", + "duck_sounds/3/go_guy.mp3", + "duck_sounds/3/rock-dedication.mp3", + "duck_sounds/3/tango-hip-hop.mp3", + "duck_sounds/3/tropical-summer.mp3" + ] + + // Takes an input, one of the song arrays, and randomly selects an index to be the src value for the song. + let songPlayer = async (songOptions) => { + + let node = document.createElement("p"), + content = document.createTextNode("Loading."), + dot = document.createTextNode("."), + unableToPlay = true, + playSelect = songOptions[ranNumG(6)]; + + song.src = playSelect; + + // When the play button is clicked, waits till the song is playable then plays it. Until then a loading status is displayed. + page.playButton.tag.addEventListener("click", async e => { + song.load(); + + // removes focus from radios. + song1Select.blur(); + song2Select.blur(); + song3Select.blur(); + + song.addEventListener("canplaythrough", e => { + song.play(); + + page.songChoose.tag.disabled = true; + unableToPlay = false; + node.remove(); + + page.songPlaying.show(); + + page.pauseButton.show({sec: 0, disp: "inline"}); + page.ffwdButton.show({sec: 0, disp: "inline"}); + page.playButton.hide({sec: 0}); + + }, {once: true}); + + + node.append(content); + page.songChoose.tag.after(node); + node.style.display = "block"; + + while (unableToPlay){ + node.append(dot); + dot = document.createTextNode(`.`); + await sleep(1); + } + }, {once:true}); + + + // Waits for the song to start playing before moving on. + await (() => new Promise(resolve => song.addEventListener("playing", () => resolve(), {once: true})))(); + + + } + + // Waits for the play button to be clicked. And then queries the radio buttons to play a song. + await (async () => { + page.songChoose.tag.addEventListener("change", async () => { + + // Hides the previous iterations results and prompt. + page.rating.hide(); + page.songPlayAgain.hide(); + + // Display Play Button. + player_buttons.style.display = "block"; + page.playButton.show({sec: 0}); + page.ffwdButton.hide({sec: 0}); + page.pauseButton.hide({sec: 0}); + + if (song1Select.checked){ + songPlayer(songOptions1); + return; + } + else if (song2Select.checked){ + songPlayer(songOptions2); + return; + } + else if (song3Select.checked){ + songPlayer(songOptions3); + return; + } + else{ // This will never be used. But is staying here jic. Feel free to delete. + let node = document.createElement("p"); + let content = document.createTextNode("You have to pick something for them to play first!"); + node.append(content); + node.style.display = "block"; + page.songChoose.tag.after(node); + await sleep(3); + node.remove(); + await songDebut(); + } + }, {once: true}) + })() + + })(); + + // Event Handlers for the player buttons. + const pauseButtonListener = () => { + song.pause(); + page.pauseButton.hide({sec: 0}); + page.playButton.show({sec: 0, disp: "inline"}); + } + page.pauseButton.tag.addEventListener("click", pauseButtonListener); + + + const playButtonListener = () => { + song.play(); + song.playbackRate = 1; + page.playButton.hide({sec: 0}); + page.pauseButton.show({sec: 0, disp: "inline"}); + } + page.playButton.tag.addEventListener("click", playButtonListener); + + + const ffwdButtonListener = () => { + if (song.playbackRate === 4){ + song.playbackRate = 1; + } + else{ + song.playbackRate = 4; + song.preservePitch = false; + } + } + page.ffwdButton.tag.addEventListener("click", ffwdButtonListener); + + // uncheck all of the radios + song1Select.checked = false; + song2Select.checked = false; + song3Select.checked = false; + + // Waits for the song to end before moving on. + await new Promise((resolve) => { + song.addEventListener("ended", async () => { + + //remove button listeners + page.pauseButton.tag.removeEventListener("click", pauseButtonListener); + page.playButton.tag.removeEventListener("click", playButtonListener); + page.ffwdButton.tag.removeEventListener("click", ffwdButtonListener); + + page.songPlaying.hide(); + player_buttons.style.display = "none"; + + resolve(); + }, {once: true}); + }); + await page.howGood.show(); + page.songRatingSlide.show(); + + page.songRatingSlide.tag.after(page.helper.tag); + page.helper.show(); + await listen4Enter(); + page.helper.hide(); + + page.howGood.hide(); + page.songRatingSlide.hide(); + page.songRatingSlide.tag.blur(); + + // Sets the money equal to the review + money += parseFloat(page.songReviewSliderInput.tag.value); + + let node = document.createElement("p"), + content = document.createTextNode(`+${page.songReviewSliderInput.tag.value}`); + node.append(content); + node.style.display = "block"; + page.songChoose.tag.after(node); + await sleep(1); + node.remove(); + + // reset the slider + page.songReviewSliderInput.tag.value = 5; + + } while (money < 20); + + await page.songChoose.hide(); + await page.pizzaFinally.show(); + await page.sneakInside.show(); + + page.sneakInside.tag.after(page.helper.tag); + page.helper.show(); + await listen4Enter(); + page.helper.hide(); + + await page.pizzaFinally.hide(); + await page.sneakInside.hide(); + + await page.slipInTheBack.show(); + await page.outback.show(); + await page.pizzaWait.show() + + for (let i=0; i<8; i++){ + let dot = document.createTextNode(`.`); + page.pizzaWait.tag.append(dot); + await sleep(1); + } + + page.ninjaSneak.show(); + + page.ninjaSneak.tag.after(page.helper.tag); + page.helper.show(); + await listen4Enter(); + page.helper.hide(); + + await page.ninjaSneak.hide(); + await page.slipInTheBack.hide(); + await page.outback.hide(); + await page.pizzaWait.hide(); + + await page.YAY.show(); + await page.pizzaDance.show(); + await page.pizzaEnd.show({sec: 3}); + + await page.pizzaEndButtons.show(); + + pizza_playAgain.addEventListener("click", () => { + window.open("page1.html", "_self"); + }, {once: true}); + + print_this.addEventListener("click", () => { + print(); + }); + +}); + +// Next on the road map is adding a fisher-yates shuffler to the songs so +// that there are no repeats when readers play them. +// +// - configure the story so that it doesn't allow clicking the other story branches. +// - Release v1.0.0 +// - branch to testing. +// - Add animations and graphics +// - Add other story branches. +// - Hopefully get hired at some point. diff --git a/my-work/duck-story-v1/js/page1.js b/my-work/duck-story-v1/js/page1.js new file mode 100644 index 0000000..baa6486 --- /dev/null +++ b/my-work/duck-story-v1/js/page1.js @@ -0,0 +1,451 @@ +"use strict"; + +//page tags +const page = { + body: document.querySelector("body"), + lightGreenBG: "#B3DCBD", + container: document.querySelector(".container"), + mobileNotice: new displayFunc("header"), + oneTime: new displayFunc("#oneTime"), + startButton: new displayFunc("button#startButton"), + helper: new displayFunc("#helper"), + hm: new displayFunc("#hm"), + no: new displayFunc("#no"), + yes: new displayFunc("#yes"), + duckType: document.querySelectorAll(".duck_type"), + friendType: document.querySelectorAll(".friend_type"), + friendName: document.querySelectorAll(".friend_name"), + phaseOne:{ + duckInlineInput: new displayFunc("span.inline"), + duckWhatColor: new displayFunc("#whatColor") + }, + phaseTwo:{ + body: new displayFunc("div.phaseTwo"), + where: new displayFunc("#where"), + letsSee: new displayFunc("#letsSee"), + eyes: new displayFunc("#eyes"), + ah: new displayFunc("#ah"), + thereSheIs: new displayFunc("#thereSheIs"), + splashing: new displayFunc("#splashing") + }, + phaseThree:{ + body: new displayFunc("div.phaseThree"), + chooseAFriend: new displayFunc("#chooseAFriend"), + tryAgain: new displayFunc("#tryAgain"), + friendDeclare: new displayFunc("#friend_declare"), + friendNameCheck: new displayFunc(".input_name_check"), + friendColorQuestion: new displayFunc("#friend_colorQuestion"), + friendColorInput: new displayFunc("#friend_colorQuestion_input"), + friendGoofy: new displayFunc("#friend_goofy"), + friendLaugh: new displayFunc("#friend_laugh"), + duckLaugh: new displayFunc("#duck_laugh"), + rainStart: new displayFunc("#rain_start"), + rainHowBad: new displayFunc("#rain_howBad"), + rainInputNode: new displayFunc("#rain_input_node"), + rainNotBad: new displayFunc("#notBad"), + rainRangeInput: new displayFunc("input#rain_range"), + rainReallyBad: new displayFunc("#reallyBad"), + rainGetOut: new displayFunc("#rain_getOut"), + rainHungry: new displayFunc("#rain_hungry"), + eatChoose: new displayFunc("#eat_choose") + } +}; + +//waits for content to load and then adds a listener to the start button. +document.addEventListener("DOMContentLoaded", function(){ + //closes the mobile notice once the "x" button is clicked. + document.querySelector("header > button").addEventListener("click", page.mobileNotice.hide, {once:true}) + //listener for button that starts off the story. + return startButton.addEventListener("click", startButtonListener); +}, {once: true}); + + +async function startButtonListener(){ + + + //page.body.querySelector("h1").style.display = "none"; // Testers saying having something at the top helps UI + page.body.querySelector("h1").innerText = "The Duck Story"; + page.mobileNotice.hide(); + await page.startButton.hide(); + await page.oneTime.show(1.5); + page.oneTime.tag.after(page.helper.tag); + page.helper.show(); + await listen4Enter(); + page.helper.hide(); + await page.oneTime.hide(); + await page.phaseOne.duckWhatColor.show(); + page.phaseOne.duckInlineInput.show(); + duck_color.focus(); + + //acctively resizes the box based on how many characters are in it. + //css declares monospace font so no sizing issues. + duck_color.addEventListener("input", function inputResizeListener(event){ + duck_color.style.width = duck_color.value.length + "ch"; + page.helper.show(); + }); + + ascii.duck.typeSpans = page.duckType; + await checkColorInput(duck_color, ascii.duck, storyStartListener); +}; + +async function storyStartListener(event){ + duck_color.blur(); + page.yes.tag.innerHTML = `

Ah, yes! That's it. She was a very normal looking ${ascii.duck.color} duck.

`; + + await page.phaseOne.duckInlineInput.hide(.5); + await page.phaseOne.duckWhatColor.hide(.5); + + await page.yes.show(1.5); + page.yes.tag.after(page.helper.tag); + page.helper.show(); + await listen4Enter(); + page.helper.hide(); + await page.yes.hide(); + + page.phaseTwo.body.show(); + await page.phaseTwo.where.show(2); + page.phaseTwo.where.tag.after(page.helper.tag); + page.helper.show(); + await listen4Enter(); + page.helper.hide(); + await page.phaseTwo.where.hide(); + await page.phaseTwo.letsSee.show(); + + //styles the background and activates the flex box centering. + page.container.style.flex = 1; + page.body.style.background = page.lightGreenBG; // light green + + //easter egg styles. + bonusEgg(); + + //eyes animation + await page.phaseTwo.eyes.show(3); + page.phaseTwo.eyes.tag.style.transform = "rotate(0.5turn)"; + page.phaseTwo.eyes.tag.style.textShadow = "-1px -1px 3px black"; + await sleep(3); + + page.phaseTwo.eyes.hide(); + await page.phaseTwo.letsSee.hide(); + + await page.phaseTwo.ah.show(.5); + await page.phaseTwo.thereSheIs.show(); + await ascii.duck.show(); + page.helper.show(); + + page.phaseTwo.body.tag.after(page.helper.tag); + page.phaseTwo.thereSheIs.tag.after(duck); + await listen4Enter(); + + page.helper.hide(); + await page.phaseTwo.ah.hide(); + await page.phaseTwo.thereSheIs.hide(); + await ascii.duck.hide(); + ascii.water.hide(); + + page.phaseTwo.splashing.tag.after(ascii.animalsBlock.tag); + ascii.animalsBlock.tag.append(ascii.water.tag, duck); + + page.phaseTwo.splashing.show(); + await ascii.animalsBlock.show({sec: 2, disp: "flex"}); + ascii.water.show({sec: 0}); + ascii.duck.show({sec:0, rel: false}); + + ascii.water.tag.style.flex = 1; + ascii.animalsBlock.tag.style.Top = "55px"; + duck.style.marginLeft = "50%"; + duck.style.marginTop = "-40px"; + + page.phaseThree.body.show({sec: 0}); + page.phaseThree.chooseAFriend.show(); + + page.phaseThree.chooseAFriend.tag.after(page.helper.tag); + page.helper.show(); + await listen4Enter(); + page.helper.hide(); + // Checks to ensure a friend was selected and assigns the value to the duck object. + await (async function obtainAFriend(){ + const frog = document.querySelector("#frogSelect"), + dog = document.querySelector("#dogSelect"), + hog = document.querySelector("#hogSelect"), + eggnog = document.querySelector("#eggnogSelect"); + let friendObtained = false; + + while (!friendObtained === true){ + // A switch statement here is probably not best practice since IF is faster. But I need the practice so + switch(true){ + case (frog.checked):{ + ascii.duck.friend = ascii.frog; + ascii.duck.friend.type = "frog"; + friendObtained = true; + break; + } + case(dog.checked):{ + ascii.duck.friend = ascii.dog; + ascii.duck.friend.type= "dog"; + friendObtained = true; + break; + } + case(hog.checked):{ + ascii.duck.friend = ascii.hog; + ascii.duck.friend.type = "hog"; + friendObtained = true; + break; + } + case(eggnog.checked):{ + ascii.duck.friend = ascii.eggnog; + ascii.duck.friend.type = "eggnog"; + friendObtained = true; + break; + } + default:{ + await page.helper.hide(); + await page.phaseThree.tryAgain.show({sec: 1.5}); + await page.phaseThree.tryAgain.hide(); + await page.helper.show(); + await listen4Enter(); + break; + } + } + + } + })(); + await page.phaseTwo.splashing.hide(); + await page.phaseThree.chooseAFriend.hide(); + + //assigns the friend animal to each span element with ".friend_type" + for (let i of page.friendType) + i.innerHTML = ascii.duck.friend.type; + + + await (async () => { + let isFriendUndeclared = true; + while (isFriendUndeclared){ + + // fixes a styling quirk with the easter Egg + document.querySelector("p#friend_declare > span.friend_type").className = "friend_type bonus_egg"; + + await page.phaseThree.friendDeclare.show(); + friend_name_input.focus(); + page.phaseThree.friendDeclare.tag.after(page.helper.tag); + + //choose a name for duck's friend. + friend_name_input.addEventListener("input", function inputResizeListener(event){ + friend_name_input.style.width = friend_name_input.value.length + "ch"; + page.helper.show(); + }); + + await listen4Enter(); + page.helper.hide(); + await page.phaseThree.friendDeclare.hide(); + friend_name_input.disabled = true; + + // If the inputed name has a space, is blank, or is a number have them try again. + const tryAgain = async (friend_nameError, friend_nameError_content) => { + friend_nameError.append(friend_nameError_content); + page.phaseThree.friendDeclare.tag.after(friend_nameError); + friend_nameError.style.display = "block"; + await sleep(4); + friend_nameError.remove(); + friend_name_input.disabled = false; + } + + if (friend_name_input.value.indexOf(" ") > -1){ + const friend_nameError = document.createElement("p"); + const friend_nameError_content = document.createTextNode("Sorry, names can't contain spaces. Try again."); + tryAgain(friend_nameError, friend_nameError_content); + continue; + } + else if (!(friend_name_input.value) || friend_name_input.value.match(/[0-9]/)){ + const friend_nameError = document.createElement("p"); + const friend_nameError_content = document.createTextNode("That name won't work! Try again."); + tryAgain(friend_nameError, friend_nameError_content); + continue; + } + else if (!friend_name_input.value.match(/^[A-Z]/m)){ + const friend_nameError = document.createElement("p"); + const friend_nameError_content = document.createTextNode("Don't forget to capitalize names!") + tryAgain(friend_nameError, friend_nameError_content); + continue; + } + + + document.querySelector("legend>span.friend_name").innerText = friend_name_input.value; + page.phaseThree.friendNameCheck.show(); + page.phaseThree.friendNameCheck.tag.after(page.helper.tag); + page.helper.show(); + await listen4Enter(); + page.helper.hide(); + + if (name_check_yes.checked){ + ascii.duck.friend.name = friend_name_input.value; + await page.phaseThree.friendNameCheck.hide(); + for(let i of page.friendName){ + i.innerText = ascii.duck.friend.name; + i.style.color = ascii.duck.friend.color; + } + isFriendUndeclared = false; + friend_name_input.blur(); + } + + else if(name_check_no.checked){ + await page.phaseThree.friendNameCheck.hide(); + friend_name_input.style.width = "11ch"; + friend_name_input.value = ""; + friend_name_input.disabled = false; + } + } + })(); + + + await page.phaseThree.friendColorQuestion.show(); + page.phaseThree.friendColorInput.show(); + friend_color.focus(); + friend_color.addEventListener("input", function inputResizeListener(event){ + friend_color.style.width = friend_color.value.length + "ch"; + page.helper.show(); + }); + ascii.duck.friend.typeSpans = page.friendType; + await checkColorInput(friend_color, ascii.duck.friend, async () => { + + // Sets the Easter Egg after the color has been declared to avoid black on dark text. + document.querySelector("p#friend_colorQuestion > span.friend_name").className = "friend_name bonus_egg"; + document.querySelector("span#friend_colorQuestion_input > span.friend_type").className = "friend_type bonus_egg"; + + //Sets the value of the success text so that it can be colored, if necessary by the Easter Egg function. + page.yes.tag.innerHTML = `

Oh, duh! How could I forget! They were definitely a ${ascii.duck.friend.color} ${ascii.duck.friend.type}.

`; + + // checks to see if easterEgg applies + bonusEgg(); + + //colors the friends name according to the users selection. + for (let i of page.friendName) + i.style.color = ascii.duck.friend.color; + + friend_color.blur(); + await page.phaseThree.friendColorInput.hide(); + page.yes.hide(); + page.phaseThree.friendColorInput.tag.after(page.yes.tag); + await page.phaseThree.friendColorQuestion.hide(); + ascii.animalsBlock.tag.append(ascii.duck.friend.tag); + + ascii.duck.friend.show({rel: false, disp: "inline-block"}); + ascii.duck.show({rel: false, disp: "inline-block"}); + + ascii.duck.friend.tag.style.marginTop = "-50px"; + ascii.animalsBlock.tag.style.marginTop = "50px"; + + await page.yes.show({sec: 1.5}); + + page.yes.tag.after(page.helper.tag) + page.helper.show(); + await listen4Enter(); + page.helper.hide(); + + await page.yes.hide(); + + await page.phaseThree.friendGoofy.show(); + await page.phaseThree.friendLaugh.show(); + await page.phaseThree.duckLaugh.show(); + + page.phaseThree.duckLaugh.tag.after(page.helper.tag); + page.helper.show(); + await listen4Enter(); + await page.helper.hide(); + + await page.phaseThree.friendGoofy.hide(); + await page.phaseThree.friendLaugh.hide(); + await page.phaseThree.duckLaugh.hide(); + + await page.phaseThree.rainStart.show(); + await page.phaseThree.rainHowBad.show(); + page.phaseThree.rainInputNode.show(); + + page.phaseThree.rainInputNode.tag.after(page.helper.tag); + page.helper.show(); + await listen4Enter(); + page.helper.hide(); + + makeItRain(page.phaseThree.rainRangeInput.tag.value); + + // simulate a lightning flash + page.body.style.background = `#666`; + await sleep(3); + page.body.style.transition = "unset"; + page.body.style.background = "paleGoldenRod"; + await sleep(.2) + page.body.style.background = `#666`; + await sleep(.2) + page.body.style.background = "paleGoldenRod"; + await sleep(.2) + page.body.style.background = `#666`; + await sleep(.2) + page.body.style.transition = "background 5s" + + await page.phaseThree.rainStart.hide(); + await page.phaseThree.rainHowBad.hide(); + await page.phaseThree.rainInputNode.hide(); + + // DISABLE ALL RADIOS EXCEPT WHAT IS AVAILABLE. + // ENABLE OTHER BRANCHES AS THEY BECOME COMPLEET. + puddingSelect.disabled = true; + grapesSelect.disabled = true; + + await page.phaseThree.rainGetOut.show(); + await page.phaseThree.rainHungry.show(); + await page.phaseThree.eatChoose.show(); + + page.phaseThree.eatChoose.tag.after(page.helper.tag); + + // Text to inform of more to come. + let node = document.createElement("p"); + let content = document.createTextNode("Pudding and Grape Stories To come! Check back later!"); + node.append(content); + page.helper.tag.after(node); + node.style.display = "block"; + + page.helper.show(); + await listen4Enter(); + page.helper.hide(); + + + localStorage.setItem("duck", JSON.stringify(ascii.duck)); + localStorage.setItem("friend", JSON.stringify(ascii.duck.friend)); + localStorage.setItem("bonus", JSON.stringify(bonusLevel)); + + await (async () => { + + while (true){ + if (pizzaSelect.checked){ + window.open("eata-the-pizza.html", "_self"); + page.helper.show(); + await listen4Enter(); + page.helper.hide(); + } + else if (puddingSelect.checked){ + window.open("yummy-puhd.html", "_self"); + page.helper.show(); + await listen4Enter(); + page.helper.hide(); + } + else if (grapesSelect.checked){ + window.open("got-any-grapes.html", "_self"); + page.helper.show(); + await listen4Enter(); + page.helper.hide(); + } + else{ + const p = document.createElement("p"); + p.append(document.createTextNode("You must make a selection to continue.")); + page.phaseThree.eatChoose.tag.after(p); + p.style.display = "block"; + page.helper.show(); + await listen4Enter(); + page.helper.hide(); + p.remove(); + } + + } + + })(); + }); +} diff --git a/my-work/duck-story-v1/js/utils.js b/my-work/duck-story-v1/js/utils.js new file mode 100644 index 0000000..f1c6730 --- /dev/null +++ b/my-work/duck-story-v1/js/utils.js @@ -0,0 +1,182 @@ +"use strict"; + +//constructor used for showing and hiding objects. Uses the computed transition time as the timer for sleeping the integrated promise. +const displayFunc = function(tag) { + this.tag = document.querySelector(tag), + this.show = async function({sec = 1, rel = true, disp = "block"} = {}){ + this.tag.style.display = disp; + if (rel) + this.tag.style.position = "relative"; + if (!rel) + this.tag.style.position = "absolute"; + await sleep(sec * 1); + }, + this.hide = async function(sec = .5){ + this.tag.style.display = "none"; + await sleep(sec * 1); + } +}; + +//declares the object for easter egg features. +const bonusLevel = {} + +//function to invert styles if easter egg is activated. +const bonusEgg = function(){ + if (bonusLevel.enabled){ + const invert = "invert(100%)"; + page.body.style.background = "MidnightBlue"; + const selectorTexts = document.querySelectorAll(".bonus_egg"); + for (let i of selectorTexts) + i.style.filter = invert; + } +} + +//tags to ascii graphics +const ascii = { + water: new displayFunc("#waterBody"), + duck: new displayFunc("#duck"), + frog: new displayFunc("#frog"), + dog: new displayFunc("#dog"), + hog: new displayFunc("#hog"), + eggnog: new displayFunc("#eggnog"), + animalsBlock: new displayFunc(".ascii_animals_block") +}; + + +// custom sleep function. +const sleep = async time => new Promise(resolve => setTimeout(resolve, time * 1000)); + +// Listens for Enter to be pressed before continuing. +const listen4Enter = function(){ + return new Promise(resolve => { + document.addEventListener("keyup", function enterInputListener(event){ + if (event.key === "Enter"){ + document.removeEventListener("keyup", enterInputListener); + resolve(); + } + }); + }) +} + +// guesses the local language from the browser. +const getLanguage = () => { + if (navigator.languages && navigator.languages.length) { + return navigator.languages[0]; + } else { + return navigator.userLanguage || navigator.language || navigator.browserLanguage || 'en'; + } +} + +const ranNumG = function(max){ + return Math.floor(Math.random() * max); +} + + +const makeArray = function arrayFromMaxIndex(maxIndex, useKeysBool){ + if (useKeysBool){ + return [...Array(maxIndex).keys()].map(x => ++x); + } + else { + return [...Array(maxIndex).keys()]; + } +} + + +let shuffle = function fisherYatesArrayShuffler(inputArr){ + let applyShuffler = () => { + let len = inputArr.length; + let placeholder; + while (len){ + let ran = ranNumG(len--); + [inputArr[ran], inputArr[len]] = [inputArr[len], inputArr[ran]]; + } + return inputArr; + } + return applyShuffler(...inputArr); +} + + + +const makeItRain = function(storminess) { // remember that the arg is a range 1-100. + const hiddenRaindrops = 20; + storminess = Math.floor(hiddenRaindrops*(storminess/100)); + const rainArray = shuffle(makeArray(storminess)); + const shuffledDrops = shuffle(makeArray(hiddenRaindrops, "Add 1")); + + let delayedRain = async () => { + try { + for (let rDropIteration = rainArray.length - 1; rDropIteration > -1; rDropIteration--){ + await sleep(1.77); + let rainSelector = document.querySelector(`#rain_${shuffledDrops[rainArray[rDropIteration]]}`); + rainSelector.style.display = "unset"; + rainSelector.style.opacity = 1; + } + } + catch (e){ + console.log(e); + } + } + delayedRain(); +} + + + const checkColorInput = async function checkInputForColor(inputSelector, asciiObj, transFunc){ + //inputSelector = The selector ID for the text input box being used to choose a color. + //asciiObj = the ascii picture that the color is going to be applied to. + //transFunc = the function which fires after the check is complete. + + //moves helper text to after the input box. If the input box is in an inline class. + if (inputSelector.parentNode.classList.toString() === "inline"){ + inputSelector.parentNode.after(page.helper.tag); + inputSelector.parentNode.after(page.hm.tag); + inputSelector.parentNode.after(page.no.tag); + inputSelector.parentNode.after(page.yes.tag); + } + else{ + inputSelector.after(helper); + } + await listen4Enter(); // wait for enter to be hit after inputing the color + page.helper.hide(); + + //blocks the input while it is being checked. + inputSelector.disabled = true; + await page.hm.show(); + await page.hm.hide(); + + // event listener verifies the input. If the transition on the input box occurred after colorizeAscii ran, then transitionend will detect it. + inputSelector.addEventListener("transitionend", transFunc, {once: true}); + + //Colors the Duck based on the input. + //saves details to object and local storage. + const colorizeAscii = (async () => { + inputSelector.style.backgroundColor = inputSelector.value; + asciiObj.color = inputSelector.value; + asciiObj.tag.style.color = asciiObj.color; + for (let i of asciiObj.typeSpans) + i.style.color = asciiObj.color; + + //a little easter egg in case anyone puts in the same color that is used for the background later on. + if (inputSelector.value === "paleTurquoise") + bonusLevel.enabled = true; + })(); + + const inputRegex = /#/gu; + // checks if the background color has a value. + if (!inputSelector.style.backgroundColor){ + await page.no.show(); + await page.no.hide(); + inputSelector.disabled = false; + checkColorInput(inputSelector, asciiObj); + } + //checks to ensure that no hex colors were used and that the duck is not colored white. + switch(true){ + case inputSelector.style.backgroundColor === "white": + case Boolean(inputSelector.value.match(inputRegex)):{ + await page.no.show(); + await page.no.hide(); + inputSelector.disabled = false; + checkColorInput(inputSelector, asciiObj); + break; + } + } + } diff --git a/my-work/duck-story-v1/story.html b/my-work/duck-story-v1/story.html new file mode 100644 index 0000000..79bff42 --- /dev/null +++ b/my-work/duck-story-v1/story.html @@ -0,0 +1,468 @@ + + + + + + + Archive | The Duck Story + + + +

Ah, the nostalgia.

+

It is unlikely that I will ever take time to fix and complete this. This + is a good example of why beginner projects should be simple. This project, + unfortunately, devolved into something that became very difficult to + maintain and scale.

+
+

+ Once upon a time there was a duck. +

+ +

+ Now what was the color of tha duck again? +

+ +

+ I think it was a {DuckColor} duck. +

+ +

+ Ah, yes! That's it! It was a very normal looking {DuckColor} duck. +

+ +

+ Now, where is that duck? She was just around here somewhere. +

+ +

+ Let's see...... +

+ +

+ ah! +

+

+ there she is. +

+ +
+    
+               __
+             =(• )___
+              (  _> /
+----^--^------^--^--^--^------^--^
+   --^----^--        --^----^--
+    
+

+ One day duck was splashing in the pond with her best friend: +

+ +
    +
  • + Frog +
  • +
+ +
+       _   _
+      (•)_(•)
+   _ (   _   ) _
+  / \/`-----'\/ \
+__\ ( (     ) ) /__
+)   /\ \___/ /\   (
+ )_/ /|\   /|\ \_(
+    
+ +
    +
  • + dog +
  • +
+ +
+     __
+(___()•`;
+/,    /`
+\\'--\\
+    
+ +
    +
  • + hog +
  • +
+ +
+^..^_____  
+(00)     \9
+  \______/ 
+   WW  WW
+    
+ +
    +
  • + eggnog +
  • +
+ +
+ ____
+|____|      
+/___/_\      
+|   | |      
+|nog| |      
+|   | |      
+|___|_|      
+    
+ +

+ Ducks best friend was a [frog, dog, hog, carton of eggnog] named {friend}. +

+ +

+ I always forget what color {friend} was. Do you remember? +

+ +

+ Oh, how could I forget. {friend} was a beautiful shade of {friendColor} of course! +

+ + +

+ "You sure are one goofy friend, {friend}." Duck said as they splashed together. +

+

+ {friend} laughed. +

+

+ Duck laughed. +

+ +

+ After a little while it started to rain. +

+ +

+ How bad was the rain storm? +

+ +

+ not too bad ------0------ Really bad +

+ +

+ "we should get out of the water during a rainstorm.", said {friend}. +

+ +

+ "Yeah. I'm getting hungry anyways. What should we eat today?" +

+ +

+ What should she eat? +

+ +
    +
  • + Pizza +
  • +
  • + bag of pudding +
  • +
  • + Grapes +
  • +
+ +

+ "Let's eat {food}", said {friend}. +

+ +

+ Pizza Story +

+

+ So, duck and {friend} decided to head into town to visit a pizza shop they had seen a few times. +

+ +

+ It was called Pizza Fantastic. And it was truly the most fantastic pizza place they had ever seen. +

+ +

+ As soon as they walked in the door, a lady screamed +

+ +

+ "AAAAHHHHH OH EM GEEEE IT'S A DUCK AND A {friend}!!!!!! SHOO SHOO!!!" +

+ +

+ The owner, Mr. Fantastic, came over. +

+

+ "Sorry, guys." He said. "I can only serve paying customers today." +

+ +

+ Duck and {friend} had to leave. +

+ +

+ "That wasn't very fantastic", said {friend}. +

+

+ Duck nodded. +

+ +

+ "But, I bet we could still get some pizza if we are sneaky." +

+ +

+ "How is that?" asked {friend}. +

+ +

+ "We'll start a band! And then when we play music people will pay us money and we can use that to get pizza!", said duck. +

+ +

+ "That sounds awesome!", said {friend}. +

+ +

+ So, they got some music stuff together and practiced real hard. +

+ +

+ Finally, they felt like they were ready. +

+ +

+ They went back to Pizza Fantastic and started playing one of the songs they rehearsed outside the pizza shop. +

+ +

+ Which song should they play: +

+ +
    +
  • + {song1} +
  • +
  • + {song2} +
  • +
  • + {song3} +
  • +
+ + + *They play the song* + + +

+ How good was that song? +

+ +

+ real good -------0-------- Not very good +

+ + +

+ That was a {rating} song! Duck and {friend} made {prorated money amount}! +

+

+ They still need {money left to get a pizza}. +

+ +

+ What should they play next? +

+ +
    +
  • + {song1} +
  • +
  • + {song2} +
  • +
  • + {song3} +
  • +
+ +

+ -- repeat as necessary -- +

+ + +

+ FINALLY!! They had enough money to buy a pizza! +

+ +

+ "Now we just have to find a way to sneak inside without getting caught by that scary screaming lady." {friend} said. +

+ +

+ "Let's go around the back.", said duck. +

+ + +

+ So, they went around the back and when Mr. Fantastic came outside to take out the trash they snuck inside and grabbed a pizza and left the cash on the counter. +

+ + +

+ YAYY! +

+ +

+ Duck and Frog were so happy they did a little dance in it. +

+ +

+ The end. +

+ + +

+ Grape story +

+ +

+ "Good idea {friend}", said duck. "As a matter of fact a friend of mine said theres a guy who gives grapes to ducks (and other animals) not too far from here!" +

+ +

+ So they went to the park where they found a few food carts and snack vendors. +

+ +

+ "He's the one who runs the lemonade stand.", said duck confidently. +

+ +

+ they walk up to the lemonade stand. +

+ +

+ "Hey." says duck. +

+ +

+ "got any grapes?" +

+ +

+ The man puts down the newspaper he is reading and he looks furious. +

+ +

+ He immediately grabs a bottle of glue and starts to chase them screaming "NOT AGAIN! I WILL STOP YOU THIS TIME! LEAVE MY LEMONADE STAND ALONE!!!" +

+ +

+ Man runs at them and says "I'M GONNA GLUE YOU TO A TREE!!'" +

+

+ duck and {friend} get really big eyes. and {friend} says "RUN FOR IT!" +

+ +

+ [chasing game - outrun the crazy lemonade stand guy] +

+ +

+ Game ends with them either getting caught and glued to a tree (retry) or running into another stand but this ones a grape stand. +

+ +

+ And the guy gives them some grapes. +

+ +

+ the end. +

+ + +

+ bag of pudding +

+ +

+ just then, {friend} remembered something. +

+ +

+ "Why don't we eat some of that bag of pudding we have been saving?!" said {friend} excitedly. +

+ +

+ "oh yeah that's a great idea!", said duck. I think I left it under that old bridge. +

+ + + under the old bridge + + +

+ duck lifts the bag of pudding into the air. A bird swoops down and swipes it. +

+ +

+ then flies up into a tree. +

+ +

+ "HEY!!" they both shout. +

+ +

+ "GIVE THAT BACK!!" but the bird ignores them. +

+ +

+ "I guess we have to climb that tree." says duck. +

+ +

+ [tree climbing game] +

+ + ** use mouse to jump from branch to branch avoiding some of the other residents of the tree. like owls and squirrels. ** + + +

+ Ends with them getting the bag of pudding and drinking out of it with straws. +

+ +

+ the end. +

+ + diff --git a/my-work/fruit-search/assets/orange.svg b/my-work/fruit-search/assets/orange.svg new file mode 100644 index 0000000..8868aa4 --- /dev/null +++ b/my-work/fruit-search/assets/orange.svg @@ -0,0 +1,1352 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/my-work/fruit-search/assets/strawberry.svg b/my-work/fruit-search/assets/strawberry.svg new file mode 100644 index 0000000..0178d22 --- /dev/null +++ b/my-work/fruit-search/assets/strawberry.svg @@ -0,0 +1,1048 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/my-work/fruit-search/assets/watermelon.svg b/my-work/fruit-search/assets/watermelon.svg new file mode 100644 index 0000000..5435707 --- /dev/null +++ b/my-work/fruit-search/assets/watermelon.svg @@ -0,0 +1,339 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/my-work/fruit-search/fruit.js b/my-work/fruit-search/fruit.js new file mode 100644 index 0000000..175efe1 --- /dev/null +++ b/my-work/fruit-search/fruit.js @@ -0,0 +1,762 @@ +const fruit = [ + "Acai", + "Acerola Cherries", + "Acerola Cherry", + "Ackee", + "African Breadfruit", + "African Mango", + "African Mango", + "Akebi Fruit", + "Alpine Strawberry", + "Amanatsu Oranges", + "Amaou Strawberries", + "Ambarella", + "Ambrosia Apples", + "Ambrosia Melon", + "Amla", + "Annatto", + "Annona", + "Apple", + "Apples", + "Apricots", + "Arava Melon", + "Asam Kumbang", + "Asian Pear", + "Asian Pears", + "Avocado", + "Avocado", + "Açaí", + "Babaco", + "Bacuri Fruit", + "Bael", + "Balsam Apples", + "Banana Peppers", + "Bananas", + "Banana", + "Barbados Cherries", + "Barbados Cherry", + "Barberries", + "Batuan", + "Batuan", + "Beach Plums", + "Bearberries", + "Beechnut", + "Bell Peppers", + "Betel Nut", + "Bignay", + "Bilberries", + "Bilberry", + "Bilimbi", + "Biriba", + "Bitter Melon", + "Black Apples", + "Black Cherries", + "Black Currant", + "Black Mulberry", + "Black Raspberries", + "Black Sapote", + "Blackberries", + "Blackberry", + "Blood Lime", + "Blood Orange", + "Blue Agave", + "Blue Dragon Fruit", + "Blue Java Banana", + "Blue Marble Fruit", + "Blue Olive", + "Blue Pearmain Apple", + "Blue Sausage Fruit", + "Blue Watermelon", + "Blueberries", + "Blueberry", + "Bottle Gourd", + "Boysenberry", + "Brazil Nut", + "Brazilian Guava", + "Breadfruit", + "Breadfruit", + "Brush Cherry", + "Buddha’s Hand", + "Burmese Grapes", + "Cabernet Sauvignon Grape", + "Cacao Bean", + "Calabash", + "Camu Camu Berry", + "Canary Fruit", + "Canary Melon", + "Canistel", + "Canistel Fruit", + "Cantaloupe", + "Cape Gooseberry", + "Caper Berry", + "Carambola", + "Carob", + "Cavendish Banana", + "Cedar Bay Cherry", + "Cempedak", + "Cempedak", + "Ceylon Gooseberry", + "Chayote", + "Chayote", + "Cherimoya", + "Cherry", + "Cherry Tomato", + "Cherry", + "Chilli Pepper", + "Chinese Quince", + "Chinese White Pear", + "Chinoto Sour Orange", + "Chokeberry", + "Churchland Pear", + "Citron", + "Citron", + "Clementine", + "Cleopatra Mandarin", + "Coco plum", + "Coconut", + "Coconut", + "Concord Grape", + "Conference Pear", + "Cornelian Cherry", + "Cortland Apple", + "Cosmic Crisp Apple", + "Courgette", + "Crab Apple", + "Cranberry", + "Crimson Delight Apple", + "Crimson Gold Apple", + "Crispin Apple", + "Crookneck Squash", + "Cucumber", + "Cupuacu", + "Custard Apple", + "Custard Apple", + "Dabai Fruit", + "Dabai Fruit", + "Damson Plums", + "Dangle Berry", + "Darling Plum", + "Darwin’s Barberries", + "Date Plum", + "Date Plums", + "Dates", + "Davidson’s Plum", + "Davidson’s Plums", + "Dead Man’s Finger", + "Dekopon", + "Densuke Watermelon", + "Desert Fig", + "Desert Lime", + "Desert Quandong", + "Dessert Banana", + "Dewberries", + "Dinosaur Egg Melon", + "Discovery Apple", + "Dodder Laurel", + "Dodder Laurel", + "Double Coconut", + "Dracontomelon", + "Dragon Fruit", + "Dragon Fruit", + "Duku Fruit", + "Duku Fruit", + "Durian", + "Early Girl Tomato", + "Early Gold Mango", + "Eastern Hawthorn Fruit", + "Egg Fruit", + "Eggplant", + "Elands Sour Fig", + "Elderberry", + "Elephant Apple", + "Elephant Apple (Chalta)", + "Emblica", + "Emu Apple Fruit", + "Emu Berry Fruit", + "Ensete", + "Entawak", + "Enterprise Apple", + "Etrog", + "European Pear", + "Evergreen Huckleberry", + "Fairchild Tangerines", + "False Mastic Fruit", + "Farkleberry", + "Fascell Mango", + "Fazli Mango", + "Feijoa", + "Feijoa", + "Fe’I Banana", + "Fibrous Satinash Fruit", + "Fig", + "Figs", + "Filius Blue Pepper", + "Finger Lime", + "Five Flavor Berry", + "Flatwoods Plum", + "Florida Cherry", + "Forest Strawberries", + "Fox Grapes", + "Fuji Apples", + "Fukushu Kumquat", + "Gala Apple", + "Galia Melon", + "Gamboge", + "Genip", + "Giant Lau Lau", + "Giant Lau Lau", + "Goji Berry", + "Golden Apple", + "Golden Delicious Apple", + "Golden Kiwi", + "Gooseberry", + "Gorham Pear", + "Goumi", + "Governor’s Plum", + "Granadilla", + "Grand Nain Banana", + "Granny Smith Apple", + "Grape", + "Grapefruit", + "Grapefruit", + "Greek Fig", + "Green Adjou Pear", + "Green Apple", + "Green Banana", + "Green Bell Pepper", + "Green Egg Squash", + "Green Fig", + "Green Gage Plum", + "Green Grapes", + "Green Lemon", + "Green Raisins", + "Green Strawberry", + "Green Tomato", + "Grosella Negra", + "Ground Plum", + "Grumichama", + "Guarana", + "Guarana.", + "Guava", + "Guava Berries", + "Guavaberry", + "Hackberry", + "Hala Fruit", + "Hardy Kiwi", + "Hawaiian Mountain Apple", + "Hawaiian Mountain Apples", + "Hawthorn Fruit", + "Hazelnuts", + "Heirloom Tomatoes", + "Highbush Blueberries", + "Highbush Cranberries", + "Highbush Cranberry", + "Himalayan Mulberries", + "Hog Plums", + "Honey Crisp Apples", + "Honey Locust", + "Honeyberries", + "Honeyberry", + "Honeydew Melon", + "Honeysuckle", + "Honeysuckles", + "Horned Melon", + "Horned Melon", + "Huckleberry", + "Huito", + "Husk Tomatoes", + "Hyuganatsu", + "Iboga", + "Icacina", + "Icaco", + "Ice Apple", + "Ice Cream Bean Fruit", + "Ichigo", + "Ilama", + "Illawarra Plum", + "Imbe", + "Imbu", + "Incaberry", + "Indian Almond Fruit", + "Indian Almond Fruit", + "Indian Gooseberry", + "Indian Gooseberry", + "Indian Jujube Fruit", + "Indian Persimmon", + "Indian Prune", + "Indian Sherbet Berry", + "Indigo Rose Tomatoes", + "Indonesian Lime", + "Ita Palm Fruit", + "Jabuticaba", + "Jackfruit", + "Jaltomato", + "Jamaican Nutmeg", + "Jamun Plum", + "Japanese Persimmon", + "Japanese Plum", + "Jatoba", + "Jatoba Fruit", + "Jatoba t", + "Java Apple", + "Jazz Apples", + "Jelly Palm Fruit", + "Jenipapo", + "Jocote", + "Johannisbeere", + "Jostaberry", + "Juicy Tomatoes", + "Jujube Fruit", + "Jujube Fruit", + "Jungle Plum", + "Junglesop", + "Junglesop Fruit", + "Juniper Berries", + "Juniper Berry", + "Kabosu", + "Kaffir Lime", + "Kahikatea", + "Kakadu Plum", + "Kaki Persimmon", + "Kanzi Apple", + "Karonda Berry", + "Kastoree Mango", + "Kasturi Mango", + "Kawakawa", + "Kaywa", + "Kei Apple.", + "Keitt Mango", + "Key Lime", + "Kiwano", + "Kiwi", + "Kiwi Fruit", + "Kiwi", + "Knobby Russet Apple", + "Korean Pear", + "Korlan", + "Koshu Grape", + "Kowai", + "Kumquats", + "Kutjera Fruit", + "Kvede", + "Kwai Muk", + "Kyoho Grape", + "Lablab Fruit", + "Lablab Fruit", + "Lady Apple", + "Lady Finger Banana", + "Lambkin Melon", + "Lancetilla Mango", + "Langra Mango", + "Langsat", + "Lapsi", + "Laurestine", + "Le Conte Pear", + "Lemato", + "Lemon", + "Lemon Aspen", + "Lemon Drop Melon", + "Liberty Apple", + "Lilly Pilly", + "Lilly Pilly", + "Lima Orange", + "Limau Bali", + "Lime", + "Limeberry", + "Limes", + "Limquat", + "Lingonberry", + "Lippens Mango", + "Lodi Apple", + "Loganberry", + "Long Neck Avocado", + "Longan", + "Loquat", + "Lord Lambourne Apple", + "Louise Bonne of Jersey Pear", + "Lucuma", + "Lychee", + "Lychees", + "Macadamia Nut", + "Macoun Apple", + "Madison Peach", + "Madrono", + "Madrono", + "Mamey Sapote", + "Mamey Sapote", + "Mammee Apple", + "Mamoncillo", + "Mandarin", + "Mangaba", + "Mango", + "Mangosteen", + "Maqui", + "Maracuya", + "Marang", + "Margil Apples", + "Marionberry", + "Marisol Clementine", + "Marsh Pink Grapefruit", + "Marula", + "May Apple", + "May Pride Peaches", + "Mayan Nut", + "Maypop", + "McIntosh Apple", + "Melon Pear Fruit", + "Merlot Grape", + "Mexican Lime", + "Mexican Limes", + "Meyer Lemon", + "Midyim Berry", + "Minneolo Tangelo", + "Mirabelle Plum", + "Miracle Fruit", + "Miracle Fruit", + "Miracle Fruitg", + "Mock Strawberry", + "Monster Deliciosa", + "Naartjie", + "Nagami Kumquat", + "Nageia", + "Nam Dok Mai", + "Nam Dok Mai Mango", + "Nance", + "Naranjilla", + "Narenj", + "Nashi Pears", + "Natal Plum", + "Naval Oranges", + "Nectacot", + "Nectacotum", + "Nectarine", + "Nectarines", + "Neem", + "Nepali Hog Plums", + "Nere Fruit", + "Newton Pippin Apple", + "Nocera Grape", + "Noni", + "Nonna Agnes Blue Beans", + "Nopal Fruit", + "Northern Spy Apples", + "Nungu Fruit", + "Nutmeg", + "Nuts", + "OSO Grande Strawberry", + "Oeillade Noire Grape", + "Ogallala Strawberry", + "Ogeechee Lime", + "Oil Palm", + "Oil Palm Fruit", + "Okra", + "Okuzgozu Grape", + "Olallieberry", + "Olive", + "Opal Apple", + "Opal Plum", + "Opuntia", + "Orange", + "Orangelo", + "Oregon Grape", + "Orient Melon", + "Orient Pear", + "Oriental Cherry", + "Orin Apple", + "Orlando Tangelo", + "Oroblanco", + "Ortanique", + "Osage Orange", + "Osteen Mango", + "Otaheite Gooseberry", + "Oullins Gage Plum", + "Oval Kumquat", + "Ozark Beauty Strawberry", + "Ozark Gold Apple", + "O’Henry Peach", + "Pacific Rose Apple", + "Palestinian Sweet Limes", + "Papaya", + "Papaya", + "Parsonage Pears", + "Passion Fruit", + "Passionfruit", + "Pattypan Squash", + "Paw Paw", + "Pawpaw", + "Peach", + "Peach Palm Fruit", + "Peaches", + "Pear", + "Pears", + "Pecan", + "Pequi Fruit", + "Pequi Fruit", + "Persian Limes", + "Persimmon", + "Persimmons", + "Petit Rouge Grapes", + "Peumo Fruit", + "Pie Pumpkins", + "Pigeon Plum", + "Pigface Fruit", + "Pili Fruit", + "Pineapple", + "Pineapples from the Lost Gardens of Heligan", + "Pineapple", + "Pineberries", + "Pineberry", + "Pink Banana", + "Pink Currant", + "Pink Grapefruit", + "Pink Kiwi", + "Pink Lady Apple", + "Pink Lady Apples", + "Pink Lemon", + "Pink Lemonade Blueberry", + "Pink Mango", + "Pink Muscatel Grape", + "Pink Pearl Apple", + "Pink Pearl Apples", + "Pink Peppercorn", + "Pink Pineapple", + "Pink Pomelo", + "Pink Reliance Grape", + "Pink Tomato", + "Pinot Noir Grapes", + "Pinova Apples", + "Pitaya", + "Plantain", + "Plantains", + "Plumcots", + "Plums", + "Pluot", + "Pluots", + "Pomato", + "Pomegranate", + "Pomelo", + "Ponderosa Lemons", + "Prickly Pear", + "Prickly Pear Cactus", + "Prickly Pears", + "Prunes", + "Pumpkins", + "Quandong", + "Quararibea", + "Queen Anne Cherry", + "Queen Apple", + "Queen Tahiti Pineapple", + "Queen’s Forelle Pear", + "Querina Apples", + "Quinault Strawberry", + "Quince", + "Raisins", + "Rajka Apples", + "Rambai", + "Rambai", + "Rambutan", + "Rambutan", + "Ramontchi", + "Rangpur Lime", + "Raspberries", + "Raspberry", + "Raspuri Mango", + "Rata", + "Red Banana", + "Red Bananas", + "Red Bayberry", + "Red Bell Pepper", + "Red Currant", + "Red Delicious Apple", + "Red Grape", + "Red Grapefruit", + "Red Grapes", + "Red Huckleberry", + "Red Mango", + "Red Mombin", + "Red Mulberry", + "Red Passion Fruit", + "Red Pear", + "Red Plum", + "Redcurrant", + "Rhobs El Arsa", + "Riberry", + "Ribier Grape", + "Rocha pear", + "Rockmelon", + "Rollinia", + "Rose Apple", + "Rose Hip", + "Roselle", + "Rosigold Mango", + "Rough Lemon", + "Ruby Roman Grapes", + "Rumbus Parviflorus", + "Rumdul", + "Saigon Mango", + "Saigon Mango.", + "Salak", + "Salak", + "Sampinit", + "Sand Cherry", + "Santol", + "Sapodilla", + "Saskatoon Berry", + "Satsuma Mandarin", + "Serviceberry", + "Shonan Gold", + "Sloe", + "Soncoya", + "Sour Cherry", + "Sour Plum", + "Soursop", + "Spaghetti Squash", + "Splendor Apple", + "Star Apple", + "Star Fruit", + "Star Fruit", + "Starfruit", + "Strawberry", + "Strawberry Guava", + "Sudachi", + "Sugar Baby Watermelon", + "Sugar Berry", + "Sugar Plum", + "Sunset Apple", + "Sweet Granadilla", + "Sweet Lime", + "Tachibana Orange", + "Taiyo no Tamago Mangoes", + "Tamarillo", + "Tangelo", + "Tangerine", + "Tart Cherry", + "Tayberry", + "Taylor’s Gold Pear", + "Terap", + "Texas Blue Giant Fig", + "Texas Persimmon", + "Thimberry", + "Tomatillo", + "Tomato", + "Tommy Atkins Mango", + "Tompkins King Apple", + "Topaz Apple", + "Tourist Pineapple", + "Trifoliate Orange", + "Tropical Apricot", + "Ububese", + "Ugli Fruit", + "Ugni Berry", + "Umbra Fruit", + "Umbu Fruit", + "Umeboshi", + "Urava Fruit", + "Usuma Fruit", + "Uvilla Fruit", + "Vaccarese Grapes", + "Valencia Oranges", + "Valencia Pride Mango", + "Van Dyke Mango", + "Vanilla", + "Velvet Apple", + "Velvet Tamarind", + "Vespolina Grape", + "Vicar of Winkfield Pear", + "Victoria Plum", + "Villafranca Lemon", + "Voavanga Fruit", + "Volkamer Lemon", + "Wahoo", + "Walnut", + "Wampee", + "Water Apple", + "Water Chestnut", + "Watermelon", + "Wax Apple", + "Wax Gourd", + "Wealthy Apple", + "West Indian Cherry", + "Western Hackberry", + "White Aspen", + "White Currant", + "White Mulberries", + "White Mulberry", + "White-Flowered Gourd", + "Wild Bacher Grape", + "Wild Banana", + "Wild Lemon", + "Wild Lowbush Blueberry", + "Wild Mangosteen", + "Wild Orange", + "Wild Peach", + "Wild Strawberry", + "Wild Sugar Apple", + "Wild Water Lemon", + "Williams Pear", + "Winter Melon", + "Winter Squash", + "Wolf Berry", + "Xanthium Strumarium", + "Xarel-lo", + "Xerophyte", + "Xigua fruit", + "Ximenia Americana", + "Ximenia Caffra", + "Ximenia Caffra", + "Xinomavro", + "Xoconostle Cactus Fruit", + "Xylocarpus Granatum", + "Xylocarp", + "Ya Pear", + "Yali Pear", + "Yangmei", + "Yayat", + "Yayat Palm", + "Yellow Apple", + "Yellow Bell Peppers", + "Yellow Chili Pepper", + "Yellow Dragon Fruit", + "Yellow Grapes", + "Yellow Guava", + "Yellow Guava", + "Yellow Kiwi", + "Yellow Lime", + "Yellow Papaya", + "Yellow Passion Fruit", + "Yellow Passion Fruit", + "Yellow Pear Tomato", + "Yellow Plum", + "Yellow Sapote", + "Yellow Squash", + "Yellow Strawberry", + "Yellow Watermelon", + "Yemenite Citron", + "York Apple", + "Young Mango", + "Youngberry", + "Yubari King Melon", + "Yucca", + "Yumberry", + "Yunnan Hackberry", + "Yuzu", + "Zabergau Reinette Apple", + "Zalzalak", + "Zante Currant", + "Zarzamora", + "Zawngtah", + "Zebra Melon", + "Zebra Melon", + "Zephyr Squash", + "Zestar Apple", + "Zhe", + "Zierfandler Grape", + "Zig Zag", + "Zig Zag Vine Fruit", + "Zill Mango", + "Zinfandel Grape", + "Ziziphus Mauritiana", + "Zucchini", + "Zweigelt Grape", + "Zwetschge", +]; diff --git a/my-work/fruit-search/index.html b/my-work/fruit-search/index.html new file mode 100644 index 0000000..429c96b --- /dev/null +++ b/my-work/fruit-search/index.html @@ -0,0 +1,57 @@ + + + + + + Fruit Search + + + + + +
+
+
+
+
+
+
+ strawberry +
+
+
+
+
+ watermelon + +
+
+ orange + +
+
+
+
+ +
+
    +
    +
    + +
    +
    +
    +
    +
    + + + + diff --git a/my-work/fruit-search/script.js b/my-work/fruit-search/script.js new file mode 100644 index 0000000..4785deb --- /dev/null +++ b/my-work/fruit-search/script.js @@ -0,0 +1,77 @@ +const input = document.querySelector('#fruit'); +const suggestions = document.querySelector('.suggestions ul'); +const fruitContainer = Array.from(document.querySelectorAll(".fruit-sub-container")); +const watermelon = document.querySelector(".watermelon-sub-container"); +const orange = document.querySelector(".orange-sub-container"); +const dontUnclick = ["fruit-search flex-items", "orange-img flex-items", "watermelon-img flex-items", "suggestion", "watermelon-link-text flex-items", "orange-link-text flex-items"]; + + +//STYLING CLICKS +const clickInput = ()=>{ + fruitContainer.map(e=> e.style.opacity = 1); + input.focus(); + + //If window is less than 600 do nothing. Otherwise move the input up. + (window.visualViewport.width < 600)||(()=>input.style.top = "-360px")(); + + input.style.minWidth = "200px"; + document.addEventListener("click", unclickAnywhere, {once:true}); +} + +const unclickAnywhere = event =>{ + if(dontUnclick.every(elem=> event.target.className !== elem)){ + fruitContainer.map(e=>e.style.opacity = 0); + input.blur(); + input.style.minWidth = "0"; + input.style.top = "40px"; + input.addEventListener("click", clickInput, {once:true}); + Array.from(suggestions.children).map(e=>e.remove()); //remove all previous suggestions. + } + else { + document.addEventListener("click", unclickAnywhere, {once:true}); + } +} + + +//AUTOCOMPLETE FUNCTIONALITY +const search = str => fruit.filter(elem => elem.toLowerCase().includes(str.toLowerCase())); +const autoCompleteHandler = (event) => { + //STYLING + input.removeEventListener("click", clickInput); + clickInput(); + + Array.from(suggestions.children).map(e=>e.remove()); //remove all previous suggestions. + const str = event.target.value; + let autoCompleted = search(str); + + autoCompleted = autoCompleted.filter(elem=> (elem.toLowerCase() !== str.toLowerCase())); // remove exact matches + str||(autoCompleted = []); //clear the list if input is empty. + + //CREATE SUGGESTIONS + autoCompleted.map(elem=>{ + const li = document.createElement("li"); + li.innerText = elem; + li.classList.add("suggestion"); + suggestions.append(li); + }) +} + + +//FILL INPUT WITH SELECTED SUGGESTION +const useSuggestion = event=> { + input.value = event.target.innerText; + input.focus(); +} + + +//DIRECT TO WIKIPEDIA OR OPEN FOOD FACTS +const querySearch = event=> { + event.target.className.match("watermelon")? window.open(`https://en.wikipedia.org/w/index.php?search=${input.value}`, "_blank"):window.open(`https://world.openfoodfacts.org/cgi/search.pl?search_terms=${input.value}`, "_blank"); +} + + +input.addEventListener("click", clickInput, {once:true}); +input.addEventListener('keyup', autoCompleteHandler); +suggestions.addEventListener('click', useSuggestion); +watermelon.addEventListener("click", querySearch); +orange.addEventListener("click", querySearch); diff --git a/my-work/fruit-search/style.css b/my-work/fruit-search/style.css new file mode 100644 index 0000000..96bf797 --- /dev/null +++ b/my-work/fruit-search/style.css @@ -0,0 +1,130 @@ +body { + background: conic-gradient(at 50% 120%, #98e698, 30deg, #d0aaf3, 120deg, #ffb1a3, 330deg, #98e698); + min-height: 100vh; + position: relative; +} + +.vcontainer{ + display: flex; + flex-direction: column; + min-height: 80vh; +} + +.vflex-items { + flex: 1; +} + +div.vflex-items:nth-child(1){ + flex-grow: 0; + flex-basis: 50px; +} + +.container, search-container{ + display: flex; +} +.flex-items{ + flex: 1; +} + +img.strawberry-img { + height:400px; +} +.watermelon-img, .orange-img { + height: 200px; + transition: filter .1s, opacity 1s; +} + +.watermelon-sub-container:hover, .orange-sub-container:hover{ + filter: drop-shadow(2px 2px 5px black); +} +.watermelon-sub-container:active, .orange-sub-container:active{ + filter: none; +} + +.fruit-sub-container{ + opacity:0; +} + +.watermelon-link-text, .orange-link-text { + text-align: center; + font-weight: bold; + color: #0f170f; + filter: drop-shadow(0px 0px 1px #0f170f); + padding: 7px; + max-width:100px; + margin-top: -8.6em; + margin-left: 3.5em; + cursor: default; + user-select: none; +} +.watermelon-link-text{ + filter: drop-shadow(0px 0px 10px #0f170f); + max-width:109px; + color: white; + margin-top: -8em; +} + +input { + text-align:center; + padding: 7px; + border-radius: 7px; + border: 2px solid tomato; + transition: all 1s; + position: relative; + min-width: 0; + top: 40px; +} + +.search-container { + display: flex; + flex-direction: column; +} + +.search-container .suggestions ul{ + list-style-type: none; + margin:0; + padding:0; +} + +.suggestion { + margin: 7px 0; + padding: 7px 0; + border-radius: 7px; + text-align: center; + cursor: default; + user-select: none; + background: tomato; + color: white; +} + +.suggestion:hover{ + background:#993b2a; +} + +@media only screen and (max-width:600px){ + body { + background: conic-gradient(at 50% 150%, #98e698, 20deg, #d0aaf3, 120deg, #ffb1a3, 350deg, #98e698); + } + img.strawberry-img { + height:300px; + } + .watermelon-img, .orange-img { + height: 150px; + } + .watermelon-link-text, .orange-link-text { + margin-top: -7em; + margin-left: 1.7em; + } + .watermelon-link-text{ + margin-top: -6.3em; + } +} + +.noscript { + position: relative; + top: -50%; + padding: 50px; + text-align: center; + background: darkred; + color:white; +} diff --git a/my-work/giphy-search/among-us-dance.gif b/my-work/giphy-search/among-us-dance.gif new file mode 100644 index 0000000..c9d8442 Binary files /dev/null and b/my-work/giphy-search/among-us-dance.gif differ diff --git a/my-work/giphy-search/app.js b/my-work/giphy-search/app.js new file mode 100644 index 0000000..09016e9 --- /dev/null +++ b/my-work/giphy-search/app.js @@ -0,0 +1,24 @@ +"use strict"; +$("form").on("submit", async function (e) { + e.preventDefault(); + const query = $("input").val(); + let request = await axios + .get( + `https://api.giphy.com/v1/gifs/search?api_key=bRjODJuPyvav8xTfZFu5TVc0XHznI9qY&q=${query}&limit=25&offset=0&rating=g&lang=en&bundle=messaging_non_clips`, + ) + .catch(async (e) => { + $( + `

    There was an error.(${e}) Please, try again.

    `, + ).appendTo("h1"); + await new Promise((r) => setTimeout(() => r(), 4000)); // custom sleep function + $("p.error").remove(); + }); + request = request.data.data; + request.map((e) => + $("div.container.gifs").append( + `${e.title}`, + ), + ); +}); + +$(".remove-gif").on("click", () => $(".gif").remove()); diff --git a/my-work/giphy-search/index.html b/my-work/giphy-search/index.html new file mode 100644 index 0000000..cc62e85 --- /dev/null +++ b/my-work/giphy-search/index.html @@ -0,0 +1,34 @@ + + + + + + + + Don't Track Me, Giphy + + +

    Search for a Giphy gif with a bit more privacy.

    +
    +
    +
    + + +
    + +
    +
    +
    + +
    + + + +
    + diff --git a/my-work/giphy-search/style.css b/my-work/giphy-search/style.css new file mode 100644 index 0000000..6446e3e --- /dev/null +++ b/my-work/giphy-search/style.css @@ -0,0 +1,74 @@ +body { + background: #111; +} + +h1 { + color: white; + text-align: center; + margin: 50px; +} + +.error { + color: red; + font-size: 16pt; +} + +.container { + display: flex; +} + +.flex-items { + flex: 1; +} + +button, +input { + margin: 0 1em; + margin-left: 1em; + margin-right: 0; + padding: 1em; +} + +input { + margin: auto 0; +} + +button { + border: none; + border-radius: 7px; + background-color: darkred; + color: white; +} + +button:hover { + filter: drop-shadow(0 0 3px black); +} +button:active { + filter: none; +} + +.request-gif { + background-color: black; +} + +.gifs { + flex-wrap: wrap; + justify-content: center; + margin: 50px; +} + +.gif { + border: 3px solid #666; +} + +@media screen and (max-width: 465px) { + input, + button { + display: block; + margin: 1em auto; + } + + button { + width: 10em; + } +} diff --git a/my-work/hacker-news-clone/css/nav.css b/my-work/hacker-news-clone/css/nav.css new file mode 100644 index 0000000..7f9ec27 --- /dev/null +++ b/my-work/hacker-news-clone/css/nav.css @@ -0,0 +1,24 @@ +/* Navigation bar */ + +nav { + display: flex; + background-color: #ff6600; + align-items: center; + padding: 25px 20px; + border-radius: 3px 3px 0 0; +} + +.navbar-brand { + font-weight: bold; + margin: 0 1em; +} + +.nav-link { + font-size: 0.85rem; + margin: 0 3px; +} + +.nav-right { + margin-left: auto; + text-align: right; +} diff --git a/my-work/hacker-news-clone/css/site.css b/my-work/hacker-news-clone/css/site.css new file mode 100644 index 0000000..ee5b408 --- /dev/null +++ b/my-work/hacker-news-clone/css/site.css @@ -0,0 +1,128 @@ +/* General typography */ + +html{ + margin: 0; +} + +body { + font-family: Arimo, sans-serif; + margin: 8vh 7.5vw; + background: radial-gradient(orchid, #95bae8); +} + +h1 { + font-size: 1.1rem; + margin: 0; +} + +h4 { + font-size: 1rem; + margin: 0; +} + +h5 { + font-size: 0.9rem; + font-weight: lighter; +} + +a { + text-decoration: none; + color: inherit; +} + +a:hover { + text-decoration: underline; +} + + +/* Site layout */ + +/* This is the basic box that the main part of the page goes into */ +.container { + display: flex; + flex-direction: column; + align-self: center; + background-color: #f6f6ef; +} + +.hidden { + display: none; +} + + +/* Forms */ + +form { + display: flex; + flex-direction: column; + margin: 8px 18px 0; +} + +form > * { + margin: 10px 0; +} + +form label { + font-size: 0.9rem; + font-weight: 700; + display: inline-block; + width: 3.5rem; + text-align: right; + margin-right: 5px; +} + +form input { + font-size: 0.8rem; + border: none; + border-radius: 2px; + padding: 8px; + width: 300px; + box-shadow: 0 0 3px 1px lightgray; +} + +form input:focus { + outline: none; + box-shadow: 0 0 4px 1px darkgray; +} + +form > button { + width: 4rem; + margin: 5px 0 15px 65px; + border: none; + border-radius: 4px; + padding: 8px; + font-size: 0.85rem; + background-color: lightslategray; + color: white; + cursor: pointer; + transition: all 0.15s; +} + +form > button:hover { + background-color: dimgray; +} + +form > hr { + margin: 0; + border: 1px solid lightgray; +} + +.login-input label { + width: 70px; +} + + +/* responsive queries for tightening things up for mobile. */ + +@media screen and (max-width: 576px) { + body { + margin: 0; + } +} + +@media screen and (min-width: 992px) { + body { + max-width: 900px; + margin: 8px auto; + } +} diff --git a/my-work/hacker-news-clone/css/stories.css b/my-work/hacker-news-clone/css/stories.css new file mode 100644 index 0000000..d93a1cc --- /dev/null +++ b/my-work/hacker-news-clone/css/stories.css @@ -0,0 +1,48 @@ +/* Lists of stories */ + +.stories-list { + margin: 20px 5px; +} + +.stories-list > li { + color: gray; + font-size: 0.8rem; + margin: 10px 0; + border-bottom: 1px solid lightgray; +} + +#stories-loading-msg { + font-weight: bold; + font-size: 150%; + margin: 20px 30px; +} + + +/* Individual stories */ + +.story-link { + color: black; + text-transform:capitalize; + font-size: 0.85rem; + font-weight: bold; + margin: 18px 0; +} + +.story-link:hover { + text-decoration: none; + color: #444; +} + +.story-author { + display:block; + text-transform:capitalize; + margin:.5em 2.5em; + color: green; +} + +.story-user { + display: block; + text-transform:capitalize; + margin:.5em 2.5em; + color: darkorange; +} diff --git a/my-work/hacker-news-clone/css/user.css b/my-work/hacker-news-clone/css/user.css new file mode 100644 index 0000000..f69c701 --- /dev/null +++ b/my-work/hacker-news-clone/css/user.css @@ -0,0 +1,14 @@ +/* Login and signup forms */ + +.account-form button { + width: 4rem; + margin-left: 80px; +} + +#signup-form button { + width: 8rem; +} + +.account-forms-container { + padding-left: 20px; +} diff --git a/my-work/hacker-news-clone/hackerhoodie.png b/my-work/hacker-news-clone/hackerhoodie.png new file mode 100644 index 0000000..9f1ce1a Binary files /dev/null and b/my-work/hacker-news-clone/hackerhoodie.png differ diff --git a/my-work/hacker-news-clone/index.html b/my-work/hacker-news-clone/index.html new file mode 100644 index 0000000..98f7df5 --- /dev/null +++ b/my-work/hacker-news-clone/index.html @@ -0,0 +1,138 @@ + + + + + + + + + + + + Hack or Snooze + + + + + + + + + + + + + +
    + + +
    Loading…
    + + +
      + +
      + + + + + + + + + + + + + + + + diff --git a/my-work/hacker-news-clone/js/main.js b/my-work/hacker-news-clone/js/main.js new file mode 100644 index 0000000..77f0306 --- /dev/null +++ b/my-work/hacker-news-clone/js/main.js @@ -0,0 +1,56 @@ +"use strict"; + +// So we don't have to keep re-finding things on page, find DOM elements once: + +const $body = $("body"); + +const $storiesLoadingMsg = $("#stories-loading-msg"); +const $allStoriesList = $("#all-stories-list"); + +const $loginForm = $("#login-form"); +const $signupForm = $("#signup-form"); +const $submissionForm = $("#submit-form"); + +const $navLogin = $("#nav-login"); +const $navUserProfile = $("#nav-user-profile"); +const $navLogOut = $("#nav-logout"); +const $navSubmit = $("#nav-submit"); +const $navFavorites = $("#nav-favorites"); +const $navOwned = $("#nav-owned"); + +/** To make it easier for individual components to show just themselves, this + * is a useful function that hides pretty much everything on the page. After + * calling this, individual components can re-show just what they want. + */ + +function hidePageComponents() { + const components = [ + $allStoriesList, + $loginForm, + $signupForm, + $submissionForm, + ]; + components.forEach(c => c.hide()); +} + +/** Overall function to kick off the app. */ + +async function start() { + console.debug("start"); + + // "Remember logged-in user" and log in, if credentials in localStorage + await checkForRememberedUser(); + await getAndShowStoriesOnStart(); + + // if we got a logged-in user + if (currentUser) updateUIOnUserLogin(); +} + +// Once the DOM is entirely loaded, begin the app + +console.warn("HEY STUDENT: This program sends many debug messages to" + + " the console. If you don't see the message 'start' below this, you're not" + + " seeing those helpful debug messages. In your browser console, click on" + + " menu 'Default Levels' and add Verbose"); +$(start); + diff --git a/my-work/hacker-news-clone/js/models.js b/my-work/hacker-news-clone/js/models.js new file mode 100644 index 0000000..a5a8c4d --- /dev/null +++ b/my-work/hacker-news-clone/js/models.js @@ -0,0 +1,261 @@ +"use strict"; + +const BASE_URL = "https://hack-or-snooze-v3.herokuapp.com"; + +/****************************************************************************** + * Story: a single story in the system + */ + +class Story { + + /** Make instance of Story from data object about story: + * - {title, author, url, username, storyId, createdAt} + */ + + constructor({ storyId, title, author, url, username, createdAt }) { + this.storyId = storyId; + this.title = title; + this.author = author; + this.url = url; + this.username = username; + this.createdAt = createdAt; + } + + /** Parses hostname out of URL and returns it. */ + + getHostName() { + //It works. Trust me. + return this.url.match(/(\w+\.\w+)(:\w+)?(?=(\/)|$)/i)[0]; + } +} + + +/****************************************************************************** + * List of Story instances: used by UI to show story lists in DOM. + */ + +class StoryList { + constructor(stories) { + this.stories = stories; + } + + /** Generate a new StoryList. It: + * + * - calls the API + * - builds an array of Story instances + * - makes a single StoryList instance out of that + * - returns the StoryList instance. + */ + + static async getStories() { + + // query the /stories endpoint (no auth required) + const response = await axios({ + url: `${BASE_URL}/stories`, + method: "GET", + }); + + // turn plain old story objects from API into instances of Story class + const stories = response.data.stories.map(story => new Story(story)); + + // build an instance of our own class using the new array of stories + return new StoryList(stories); + } + + /** get one SINGULAR story from API using a story ID */ + + static async getStory(id){ + return axios({ + url: `${BASE_URL}/stories/${id}`, + method: 'get', + }) + } + + /** Adds story data to API, makes a Story instance, adds it to story list. + * - user - the current instance of User who will post the story + * - obj of {title, author, url} + * + * Returns the new Story instance + */ + + static async addStory( user, {author, title, url}) { + const token = user.loginToken; + + const config = { + url: `${BASE_URL}/stories`, + method: 'post', + data: {token, + story: {author, title, url}, + } + } + + const response = await axios(config); + const addedStory = new Story(response.data.story); + + + storyList.stories.unshift(addedStory); + user.ownStories.unshift(addedStory); + + return addedStory; + } + + /** Sends story data to API for deletion, makes a Story instance, removes it from the story list. + * - user - the current instance of User who will delete the story. + * - id - the id of the story for deletion. + * + * Returns the new Story instance + */ + + static async delStory(user, id){ + const token = user.loginToken; + + const config = { + url: `${BASE_URL}/stories/${id}`, + method: 'delete', + data: {token}, + } + + const response = await axios(config); + const removedStory = new Story(response.data.story); + + storyList.stories = storyList.stories.filter(e=> e.storyId !== id); + user.ownStories = user.ownStories.filter(e=> e.storyId !== id); + + return removedStory; + } +} + + +/****************************************************************************** + * User: a user in the system (only used to represent the current user) + */ + +class User { + /** Make user instance from obj of user data and a token: + * - {username, name, createdAt, favorites[], ownStories[]} + * - token + */ + + constructor({ + username, + name, + createdAt, + favorites = [], + ownStories = [] + }, + token) { + this.username = username; + this.name = name; + this.createdAt = createdAt; + + // instantiate Story instances for the user's favorites and ownStories + this.favorites = favorites.map(s => new Story(s)); + this.ownStories = ownStories.map(s => new Story(s)); + + // store the login token on the user so it's easy to find for API calls. + this.loginToken = token; + } + + /** Register new user in API, make User instance & return it. + * + * - username: a new username + * - password: a new password + * - name: the user's full name + */ + + static async signup(username, password, name) { + const response = await axios({ + url: `${BASE_URL}/signup`, + method: "POST", + data: { user: { username, password, name } }, + }); + + let { user } = response.data + + return new User( + { + username: user.username, + name: user.name, + createdAt: user.createdAt, + favorites: user.favorites, + ownStories: user.stories + }, + response.data.token + ); + } + + /** Login in user with API, make User instance & return it. + + * - username: an existing user's username + * - password: an existing user's password + */ + + static async login(username, password) { + const response = await axios({ + url: `${BASE_URL}/login`, + method: "POST", + data: { user: { username, password } }, + }); + + let { user } = response.data; + + return new User( + { + username: user.username, + name: user.name, + createdAt: user.createdAt, + favorites: user.favorites, + ownStories: user.stories + }, + response.data.token + ); + } + + /** When we already have credentials (token & username) for a user, + * we can log them in automatically. This function does that. + */ + + static async loginViaStoredCredentials(token, username) { + try { + const response = await axios({ + url: `${BASE_URL}/users/${username}`, + method: "GET", + params: { token }, + }); + + let { user } = response.data; + + return new User( + { + username: user.username, + name: user.name, + createdAt: user.createdAt, + favorites: user.favorites, + ownStories: user.stories + }, + token + ); + } catch (err) { + console.error("loginViaStoredCredentials failed", err); + return null; + } + } + + /** Get/set/delete favorited stories of a user. + * -method: string specifying the API method. + * -user: User Object. + * -storyid: string of the story id. + */ + + static async doFavorite(method, user, storyid){ + const username = user.username; + const token = user.loginToken; + return axios({ + url: `${BASE_URL}/users/${username}/favorites/${storyid}`, + method: method, + data:{ + token, + }, + }); + } +} diff --git a/my-work/hacker-news-clone/js/nav.js b/my-work/hacker-news-clone/js/nav.js new file mode 100644 index 0000000..ec9c4d5 --- /dev/null +++ b/my-work/hacker-news-clone/js/nav.js @@ -0,0 +1,87 @@ +"use strict"; + +/****************************************************************************** + * Handling navbar clicks and updating navbar + */ + +/** Show main list of all stories when click site name */ + +function navAllStories(evt) { + console.debug("navAllStories", evt); + hidePageComponents(); + putStoriesOnPage(); +} + +$body.on("click", "#nav-all", navAllStories); + +/** Show login/signup on click on "login" */ + +function navLoginClick(evt) { + console.debug("navLoginClick", evt); + hidePageComponents(); + $loginForm.show(); + $signupForm.show(); +} + +$navLogin.on("click", navLoginClick); + +/** Show submission form on click "Submit" */ + +function navSubmitClick(evt) { + console.debug("navSubmitClick", evt); + hidePageComponents(); + $submissionForm.show(); +} + +$navSubmit.on("click", navSubmitClick); + +/** When a User clicks Favorites, clears $allStoriesList and renders favorites only. */ + +async function showFavoriteStories(evt) { + console.debug("showFavorites", evt) + const favorites = await currentUser.favorites.map(e=> new Story(e)); + const favoriteMarkupsArr = favorites.map(e=> generateStoryMarkup(e)); + + //clear $allStoriesList and append favorites to the page. + $allStoriesList.empty() + favoriteMarkupsArr.map(story => { + $allStoriesList.append(story) + }); + + $("input.favorite-box").prop("checked", true); +} + +$navFavorites.on("click", showFavoriteStories); + +/** When "owned" is clicked in the navbar, it shows the user all stories that they have created.*/ + +async function showOwnedStories(evt) { + console.debug("showOwned", evt) + const ownedStories = await currentUser.ownStories.map(e=> new Story(e)); + const ownedStoriesMarkup = ownedStories.map(e=> generateStoryMarkup(e)); + + //clear $allStoriesList and append favorites to the page. + $allStoriesList.empty() + ownedStoriesMarkup.map(story => { + $allStoriesList.append(story) + }); + + $(".story-author").after(""); + $("input.favorite-box").remove(); + $(".delete-button").on("click", removeOwnedStories); +} + +$navOwned.on("click", showOwnedStories); + +/** When a user first logins in, update the navbar to reflect that. */ + +function updateNavOnLogin() { + console.debug("updateNavOnLogin"); + $(".main-nav-links").show(); + $navLogin.hide(); + $navLogOut.show(); + $navSubmit.show(); + $navFavorites.show(); + $navOwned.show(); + $navUserProfile.text(`${currentUser.username}`).show(); +} diff --git a/my-work/hacker-news-clone/js/stories.js b/my-work/hacker-news-clone/js/stories.js new file mode 100644 index 0000000..18cbe0b --- /dev/null +++ b/my-work/hacker-news-clone/js/stories.js @@ -0,0 +1,151 @@ +"use strict"; + +// This is the global list of the stories, an instance of StoryList +let storyList; + +/** Get and show stories when site first loads. */ + +async function getAndShowStoriesOnStart() { + storyList = await StoryList.getStories(); + $storiesLoadingMsg.remove(); + + putStoriesOnPage(); +} + +/* A render method to render HTML for an individual Story instance + * - story: an instance of Story + * + * Returns the markup for the story. + */ + +function generateStoryMarkup(story) { + + const hostName = story.getHostName(); + return $(` +
    1. + + + ${story.title} + + (${hostName}) + + posted by ${story.username} +
    2. + `); +} + +/** Sets or removes favorites depending on the event. */ + +async function modifyFavoriteStories(evt){ + let response; + + if (evt.target.checked){ + try{ + response = + await User.doFavorite( + 'post', + currentUser, + evt.target.parentElement.id + ); + } + catch{ + $('nav').after("

      Couldn't add Favorite. Please, try again.

      ") + setTimeout(()=> $("p.error-msg").remove(), 5000); + } + } + else{ + try{ + response = + await User.doFavorite( + 'delete', + currentUser, + evt.target.parentElement.id + ) + } + catch{ + $('nav').after("

      Couldn't remove Favorite. Please, try again.

      ") + setTimeout(()=> $("p.error-msg").remove(), 5000); + } + } + const favoritesArrResponse = response.data.user.favorites + currentUser.favorites = favoritesArrResponse; + console.debug("favorites modified", currentUser.favorites); + +} + +/** Gets list of stories from server, generates their HTML, and puts on page. + * - default param is $allStoriesList */ + +function putStoriesOnPage() { + console.debug("putStoriesOnPage"); + + $allStoriesList.empty(); + + // loop through all of our stories and generate HTML for them + for (let story of storyList.stories) { + const $story = generateStoryMarkup(story); + $allStoriesList.append($story); + + if (currentUser) { + markFavoriteStories(story); + } + } + + $allStoriesList.show(); + + $("input.favorite-box").on("change", modifyFavoriteStories); +} + +/** Takes user input and sends it to backend. */ + +async function submitStoriesToAPI(evt){ + console.debug("submit story", evt); + evt.preventDefault(); + + //grab title, url, and author + const $title = $("#submit-title"); + const $url = $("#submit-url"); + const $author = $("#submit-author"); + + try{ + await StoryList.addStory( + currentUser, { + author: $author.val(), + title: $title.val(), + url: $url.val(), + }) + } + catch({name, message}){ + $submissionForm.after(`

      Unssuccesful Connection to database. Try Again. | Error: ${message} |`) + setTimeout(()=> $("p#error-msg").remove(), 5000); + return; + } + + $submissionForm.trigger("reset"); + $submissionForm.hide(); + + putStoriesOnPage(); +} + +$submissionForm.on("submit", submitStoriesToAPI); + +/** Checks stories to determine if any of them are favorites. + * Marks them if necessary. */ + +function markFavoriteStories(story){ + const storyId = story.storyId; + const favoritesIds = currentUser.favorites.map(f=> f.storyId); + + if(favoritesIds.includes(storyId)) $(`#${storyId}`).children("input").prop("checked", true); +} + +/** handles event for removing stories */ +async function removeOwnedStories(evt){ + console.debug("remove story", evt); + const storyId = evt.target.parentElement.id; + + const removedStory = await StoryList.delStory(currentUser, storyId); + + $(`#${removedStory.storyId}`).remove(); + +} diff --git a/my-work/hacker-news-clone/js/user.js b/my-work/hacker-news-clone/js/user.js new file mode 100644 index 0000000..4255947 --- /dev/null +++ b/my-work/hacker-news-clone/js/user.js @@ -0,0 +1,130 @@ +"use strict"; + +// global to hold the User instance of the currently-logged-in user +let currentUser; + +/****************************************************************************** + * User login/signup/login + */ + +/** Handle login form submission. If login ok, sets up the user instance */ + +async function login(evt) { + console.debug("login", evt); + evt.preventDefault(); + + // grab the username and password + const username = $("#login-username").val(); + const password = $("#login-password").val(); + + // User.login retrieves user info from API and returns User instance + // which we'll make the globally-available, logged-in user. + currentUser = await User.login(username, password); + + $loginForm.trigger("reset"); + + saveUserCredentialsInLocalStorage(); + updateUIOnUserLogin(); + + $loginForm.hide(); + $signupForm.hide( + ); +} + +$loginForm.on("submit", login); + +/** Handle signup form submission. */ + +async function signup(evt) { + console.debug("signup", evt); + evt.preventDefault(); + + const name = $("#signup-name").val(); + const username = $("#signup-username").val(); + const password = $("#signup-password").val(); + + // User.signup retrieves user info from API and returns User instance + // which we'll make the globally-available, logged-in user. + try{ + currentUser = await User.signup(username, password, name); + } + catch{ + $signupForm.trigger("reset"); + $('nav').after("

      Unable to create user. Check your connection and perhaps try a different username.

      ") + setTimeout(()=> $("p.error-msg").remove(), 5000); + return; + } + + saveUserCredentialsInLocalStorage(); + updateUIOnUserLogin(); + + $signupForm.trigger("reset"); + $loginForm.hide(); + $signupForm.hide(); +} + +$signupForm.on("submit", signup); + +/** Handle click of logout button + * + * Remove their credentials from localStorage and refresh page + */ + +function logout(evt) { + console.debug("logout", evt); + localStorage.clear(); + location.reload(); +} + +$navLogOut.on("click", logout); + +/****************************************************************************** + * Storing/recalling previously-logged-in-user with localStorage + */ + +/** If there are user credentials in local storage, use those to log in + * that user. This is meant to be called on page load, just once. + */ + +async function checkForRememberedUser() { + console.debug("checkForRememberedUser"); + const token = localStorage.getItem("token"); + const username = localStorage.getItem("username"); + if (!token || !username) return false; + + // try to log in with these credentials (will be null if login failed) + currentUser = await User.loginViaStoredCredentials(token, username); +} + +/** Sync current user information to localStorage. + * + * We store the username/token in localStorage so when the page is refreshed + * (or the user revisits the site later), they will still be logged in. + */ + +function saveUserCredentialsInLocalStorage() { + console.debug("saveUserCredentialsInLocalStorage"); + if (currentUser) { + localStorage.setItem("token", currentUser.loginToken); + localStorage.setItem("username", currentUser.username); + } +} + +/****************************************************************************** + * General UI stuff about users + */ + +/** When a user signs up or registers, we want to set up the UI for them: + * + * - show the stories list + * - update nav bar options for logged-in user + * - generate the user profile part of the page + */ + +function updateUIOnUserLogin() { + console.debug("updateUIOnUserLogin"); + + $allStoriesList.show(); + + updateNavOnLogin(); +} diff --git a/my-work/hacker-news-clone/solution/css/nav.css b/my-work/hacker-news-clone/solution/css/nav.css new file mode 100644 index 0000000..96c898f --- /dev/null +++ b/my-work/hacker-news-clone/solution/css/nav.css @@ -0,0 +1,30 @@ +/* Navigation bar */ + +nav { + display: flex; + background-color: #ff6600; + align-items: center; + padding: 25px 20px; + border-radius: 3px 3px 0 0; +} + +.navbar-brand { + font-weight: bold; +} + +.main-nav-links { + margin: 0 10px; + font-size: 20px; + justify-content: center; + align-items: center; +} + +.nav-link { + font-size: 0.85rem; + margin: 0 3px; +} + +.nav-right { + margin-left: auto; + text-align: right; +} diff --git a/my-work/hacker-news-clone/solution/css/site.css b/my-work/hacker-news-clone/solution/css/site.css new file mode 100644 index 0000000..06bb4fc --- /dev/null +++ b/my-work/hacker-news-clone/solution/css/site.css @@ -0,0 +1,131 @@ +/* General typography */ + +body { + font-family: Arimo, sans-serif; + margin: 8px 7.5vw; + height: 100vh; + background-image: radial-gradient(circle, rgb(238, 174, 202) 0%, rgb(148, 187, 233) 100%); +} + +h1 { + font-size: 1.1rem; + margin: 0; +} + +h4 { + font-size: 1rem; + margin: 0; +} + +h5 { + font-size: 0.9rem; + font-weight: lighter; +} + +a { + text-decoration: none; + color: inherit; +} + +a:hover { + text-decoration: underline; +} + + +/* Site layout */ + +/* This is the basic box that the main part of the page goes into */ +.container { + display: flex; + flex-direction: column; + align-self: center; + background-color: #f6f6ef; + +} + +.stories-container{ + height: calc(100vh - 100px); + overflow: scroll; +} + +.hidden { + display: none; +} + + +/* Forms */ + +form { + display: flex; + flex-direction: column; + margin: 8px 18px 0; +} + +form > * { + margin: 10px 0; +} + +form label { + font-size: 0.9rem; + font-weight: 700; + display: inline-block; + width: 3.5rem; + text-align: right; + margin-right: 5px; +} + +form input { + font-size: 0.8rem; + border: none; + border-radius: 2px; + padding: 8px; + width: 300px; + box-shadow: 0 0 3px 1px lightgray; +} + +form input:focus { + outline: none; + box-shadow: 0 0 4px 1px darkgray; +} + +form > button { + width: 4rem; + margin: 5px 0 15px 65px; + border: none; + border-radius: 4px; + padding: 8px; + font-size: 0.85rem; + background-color: lightslategray; + color: white; + cursor: pointer; + transition: all 0.15s; +} + +form > button:hover { + background-color: dimgray; +} + +form > hr { + margin: 0; + border: 1px solid lightgray; +} + +.login-input label { + width: 70px; +} + + +/* responsive queries for tightening things up for mobile. */ + +@media screen and (max-width: 576px) { + body { + margin: 0; + } +} + +@media screen and (min-width: 992px) { + body { + max-width: 900px; + margin: 8px auto; + } +} diff --git a/my-work/hacker-news-clone/solution/css/stories.css b/my-work/hacker-news-clone/solution/css/stories.css new file mode 100644 index 0000000..fee3ffb --- /dev/null +++ b/my-work/hacker-news-clone/solution/css/stories.css @@ -0,0 +1,64 @@ +/* Lists of stories */ + +.stories-list { + margin: 20px 5px; +} + +.stories-list > li { + color: gray; + font-size: 0.8rem; + margin: 10px 0; + border-bottom: 1px solid #e5e5e5; + padding-bottom: 10px; +} + +#favorited-stories, +#my-stories { + list-style: none; + padding-left: 20px; +} + +#stories-loading-msg { + font-weight: bold; + font-size: 150%; + margin: 20px 30px; +} + + +/* Individual stories */ + +.star, +.trash-can { + font-size: 0.75rem; + margin: 0 5px; + cursor: pointer; +} + +.trash-can:hover { + color: crimson; +} + +.story-link { + color: black; + font-size: 0.85rem; + font-weight: normal; + margin: 18px 0; +} + +.story-link:hover { + text-decoration: none; +} + +.story-author { + margin-left: 2em; + font-size: 0.85rem; + color: green; + padding: 6px 0; +} + +.story-user { + display: block; + margin-left: 2em; + font-size: 0.85rem; + color: orange; +} diff --git a/my-work/hacker-news-clone/solution/css/user.css b/my-work/hacker-news-clone/solution/css/user.css new file mode 100644 index 0000000..b382f00 --- /dev/null +++ b/my-work/hacker-news-clone/solution/css/user.css @@ -0,0 +1,26 @@ +/* Login and signup forms */ + +.account-form button { + width: 4rem; + margin-left: 80px; +} + +#signup-form button { + width: 8rem; +} + +.account-forms-container { + padding-left: 20px; +} + + +/* User profile */ + +.user-profile-box { + padding: 10px 20px 20px; + font-size: 0.9rem; +} + +.user-profile-box > * { + margin: 10px 0; +} diff --git a/my-work/hacker-news-clone/solution/index.html b/my-work/hacker-news-clone/solution/index.html new file mode 100644 index 0000000..0d4e495 --- /dev/null +++ b/my-work/hacker-news-clone/solution/index.html @@ -0,0 +1,154 @@ + + + + + + + + + + + Hack or Snooze + + + + + + + + + + + + + +
      + + + + + +
      Loading…
      + + +
        + + + + + + + +
        + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/my-work/hacker-news-clone/solution/js/main.js b/my-work/hacker-news-clone/solution/js/main.js new file mode 100644 index 0000000..72e92e9 --- /dev/null +++ b/my-work/hacker-news-clone/solution/js/main.js @@ -0,0 +1,64 @@ +"use strict"; + +// So we don't have to keep re-finding things on page, find DOM elements once: + +const $body = $("body"); + +const $storiesLoadingMsg = $("#stories-loading-msg"); +const $allStoriesList = $("#all-stories-list"); +const $favoritedStories = $("#favorited-stories"); +const $ownStories = $("#my-stories"); +const $storiesContainer = $("#stories-container") + + +// selector that finds all three story lists +const $storiesLists = $(".stories-list"); + +const $loginForm = $("#login-form"); +const $signupForm = $("#signup-form"); + +const $submitForm = $("#submit-form"); + +const $navSubmitStory = $("#nav-submit-story"); +const $navLogin = $("#nav-login"); +const $navUserProfile = $("#nav-user-profile"); +const $navLogOut = $("#nav-logout"); + +const $userProfile = $("#user-profile"); + +/** To make it easier for individual components to show just themselves, this + * is a useful function that hides pretty much everything on the page. After + * calling this, individual components can re-show just what they want. + */ + +function hidePageComponents() { + const components = [ + $storiesLists, + $submitForm, + $loginForm, + $signupForm, + $userProfile + ]; + components.forEach(c => c.hide()); +} + +/** Overall function to kick off the app. */ + +async function start() { + console.debug("start"); + + // "Remember logged-in user" and log in, if credentials in localStorage + await checkForRememberedUser(); + await getAndShowStoriesOnStart(); + + // if we got a logged-in user + if (currentUser) updateUIOnUserLogin(); +} + +// Once the DOM is entirely loaded, begin the app + +console.warn("HEY STUDENT: This program sends many debug messages to" + + " the console. If you don't see the message 'start' below this, you're not" + + " seeing those helpful debug messages. In your browser console, click on" + + " menu 'Default Levels' and add Verbose"); +$(start); diff --git a/my-work/hacker-news-clone/solution/js/models.js b/my-work/hacker-news-clone/solution/js/models.js new file mode 100644 index 0000000..097e29c --- /dev/null +++ b/my-work/hacker-news-clone/solution/js/models.js @@ -0,0 +1,267 @@ +"use strict"; + +const BASE_URL = "https://hack-or-snooze-v3.herokuapp.com"; + +/****************************************************************************** + * Story: a single story in the system + */ + +class Story { + + /** Make instance of Story from data object about story: + * - {storyId, title, author, url, username, createdAt} + */ + + constructor({ storyId, title, author, url, username, createdAt }) { + this.storyId = storyId; + this.title = title; + this.author = author; + this.url = url; + this.username = username; + this.createdAt = createdAt; + } + + /** Parses hostname out of URL and returns it. */ + + getHostName() { + return new URL(this.url).host; + } +} + + +/****************************************************************************** + * List of Story instances: used by UI to show story lists in DOM. + */ + +class StoryList { + constructor(stories) { + this.stories = stories; + } + + /** Generate a new StoryList. It: + * + * - calls the API + * - builds an array of Story instances + * - makes a single StoryList instance out of that + * - returns the StoryList instance. + */ + + static async getStories() { + // Note presence of `static` keyword: this indicates that getStories is + // **not** an instance method. Rather, it is a method that is called on the + // class directly. Why doesn't it make sense for getStories to be an + // instance method? + + // query the /stories endpoint (no auth required) + const response = await axios({ + url: `${BASE_URL}/stories`, + method: "GET", + }); + + // turn plain old story objects from API into instances of Story class + const stories = response.data.stories.map(story => new Story(story)); + + // build an instance of our own class using the new array of stories + return new StoryList(stories); + } + + /** Adds story data to API, makes a Story instance, adds it to story list. + * - user - the current instance of User who will post the story + * - obj of {title, author, url} + * + * Returns the new Story instance + */ + + async addStory(user, { title, author, url }) { + const token = user.loginToken; + const response = await axios({ + method: "POST", + url: `${BASE_URL}/stories`, + data: { token, story: { title, author, url } }, + }); + + const story = new Story(response.data.story); + this.stories.unshift(story); + user.ownStories.unshift(story); + + return story; + } + + /** Delete story from API and remove from the story lists. + * + * - user: the current User instance + * - storyId: the ID of the story you want to remove + */ + + async removeStory(user, storyId) { + const token = user.loginToken; + await axios({ + url: `${BASE_URL}/stories/${storyId}`, + method: "DELETE", + data: { token: user.loginToken } + }); + + // filter out the story whose ID we are removing + this.stories = this.stories.filter(story => story.storyId !== storyId); + + // do the same thing for the user's list of stories & their favorites + user.ownStories = user.ownStories.filter(s => s.storyId !== storyId); + user.favorites = user.favorites.filter(s => s.storyId !== storyId); + } +} + + +/****************************************************************************** + * User: a user in the system (only used to represent the current user) + */ + +class User { + /** Make user instance from obj of user data and a token: + * - {username, name, createdAt, favorites[], ownStories[]} + * - token + */ + + constructor({ + username, + name, + createdAt, + favorites = [], + ownStories = [] + }, + token) { + this.username = username; + this.name = name; + this.createdAt = createdAt; + + // instantiate Story instances for the user's favorites and ownStories + this.favorites = favorites.map(s => new Story(s)); + this.ownStories = ownStories.map(s => new Story(s)); + + // store the login token on the user so it's easy to find for API calls. + this.loginToken = token; + } + + /** Register new user in API, make User instance & return it. + * + * - username: a new username + * - password: a new password + * - name: the user's full name + */ + + static async signup(username, password, name) { + const response = await axios({ + url: `${BASE_URL}/signup`, + method: "POST", + data: { user: { username, password, name } }, + }); + + let { user } = response.data; + + return new User( + { + username: user.username, + name: user.name, + createdAt: user.createdAt, + favorites: user.favorites, + ownStories: user.stories + }, + response.data.token + ); + } + + /** Login in user with API, make User instance & return it. + + * - username: an existing user's username + * - password: an existing user's password + */ + + static async login(username, password) { + const response = await axios({ + url: `${BASE_URL}/login`, + method: "POST", + data: { user: { username, password } }, + }); + + let { user } = response.data; + + return new User( + { + username: user.username, + name: user.name, + createdAt: user.createdAt, + favorites: user.favorites, + ownStories: user.stories + }, + response.data.token + ); + } + + /** When we already have credentials (token & username) for a user, + * we can log them in automatically. This function does that. + */ + + static async loginViaStoredCredentials(token, username) { + try { + const response = await axios({ + url: `${BASE_URL}/users/${username}`, + method: "GET", + params: { token }, + }); + + let { user } = response.data; + + return new User( + { + username: user.username, + name: user.name, + createdAt: user.createdAt, + favorites: user.favorites, + ownStories: user.stories + }, + token + ); + } catch (err) { + console.error("loginViaStoredCredentials failed", err); + return null; + } + } + + /** Add a story to the list of user favorites and update the API + * - story: a Story instance to add to favorites + */ + + async addFavorite(story) { + this.favorites.push(story); + await this._addOrRemoveFavorite("add", story) + } + + /** Remove a story to the list of user favorites and update the API + * - story: the Story instance to remove from favorites + */ + + async removeFavorite(story) { + this.favorites = this.favorites.filter(s => s.storyId !== story.storyId); + await this._addOrRemoveFavorite("remove", story); + } + + /** Update API with favorite/not-favorite. + * - newState: "add" or "remove" + * - story: Story instance to make favorite / not favorite + * */ + + async _addOrRemoveFavorite(newState, story) { + const method = newState === "add" ? "POST" : "DELETE"; + const token = this.loginToken; + await axios({ + url: `${BASE_URL}/users/${this.username}/favorites/${story.storyId}`, + method: method, + data: { token }, + }); + } + + /** Return true/false if given Story instance is a favorite of this user. */ + + isFavorite(story) { + return this.favorites.some(s => (s.storyId === story.storyId)); + } +} diff --git a/my-work/hacker-news-clone/solution/js/nav.js b/my-work/hacker-news-clone/solution/js/nav.js new file mode 100644 index 0000000..4ce352e --- /dev/null +++ b/my-work/hacker-news-clone/solution/js/nav.js @@ -0,0 +1,79 @@ +"use strict"; + +/****************************************************************************** + * Handling navbar clicks and updating navbar + */ + +/** Show main list of all stories when click site name */ + +function navAllStories(evt) { + console.debug("navAllStories", evt); + hidePageComponents(); + putStoriesOnPage(); +} + +$body.on("click", "#nav-all", navAllStories); + +/** Show story submit form on clicking story "submit" */ + +function navSubmitStoryClick(evt) { + console.debug("navSubmitStoryClick", evt); + hidePageComponents(); + $allStoriesList.show(); + $submitForm.show(); +} + +$navSubmitStory.on("click", navSubmitStoryClick); + +/** Show favorite stories on click on "favorites" */ + +function navFavoritesClick(evt) { + console.debug("navFavoritesClick", evt); + hidePageComponents(); + putFavoritesListOnPage(); +} + +$body.on("click", "#nav-favorites", navFavoritesClick); + +/** Show My Stories on clicking "my stories" */ + +function navMyStories(evt) { + console.debug("navMyStories", evt); + hidePageComponents(); + putUserStoriesOnPage(); + $ownStories.show(); +} + +$body.on("click", "#nav-my-stories", navMyStories); + +/** Show login/signup on click on "login" */ + +function navLoginClick(evt) { + console.debug("navLoginClick", evt); + hidePageComponents(); + $loginForm.show(); + $signupForm.show(); + $storiesContainer.hide() +} + +$navLogin.on("click", navLoginClick); + +/** Hide everything but profile on click on "profile" */ + +function navProfileClick(evt) { + console.debug("navProfileClick", evt); + hidePageComponents(); + $userProfile.show(); +} + +$navUserProfile.on("click", navProfileClick); + +/** When a user first logins in, update the navbar to reflect that. */ + +function updateNavOnLogin() { + console.debug("updateNavOnLogin"); + $(".main-nav-links").css('display', 'flex');; + $navLogin.hide(); + $navLogOut.show(); + $navUserProfile.text(`${currentUser.username}`).show(); +} diff --git a/my-work/hacker-news-clone/solution/js/stories.js b/my-work/hacker-news-clone/solution/js/stories.js new file mode 100644 index 0000000..c9dc252 --- /dev/null +++ b/my-work/hacker-news-clone/solution/js/stories.js @@ -0,0 +1,192 @@ +"use strict"; + +// This is the global list of the stories, an instance of StoryList +let storyList; + +/** Get and show stories when site first loads. */ + +async function getAndShowStoriesOnStart() { + storyList = await StoryList.getStories(); + $storiesLoadingMsg.remove(); + + putStoriesOnPage(); +} + +/** + * A render method to render HTML for an individual Story instance + * - story: an instance of Story + * - showDeleteBtn: show delete button? + * + * Returns the markup for the story. + */ + +function generateStoryMarkup(story, showDeleteBtn = false) { + // console.debug("generateStoryMarkup", story); + + const hostName = story.getHostName(); + + // if a user is logged in, show favorite/not-favorite star + const showStar = Boolean(currentUser); + + return $(` +
      1. +
        + ${showDeleteBtn ? getDeleteBtnHTML() : ""} + ${showStar ? getStarHTML(story, currentUser) : ""} + + ${story.title} + + (${hostName}) + +
        posted by ${story.username}
        +
        +
      2. + `); +} + +/** Make delete button HTML for story */ + +function getDeleteBtnHTML() { + return ` + + + `; +} + +/** Make favorite/not-favorite star for story */ + +function getStarHTML(story, user) { + const isFavorite = user.isFavorite(story); + const starType = isFavorite ? "fas" : "far"; + return ` + + + `; +} + +/** Gets list of stories from server, generates their HTML, and puts on page. */ + +function putStoriesOnPage() { + console.debug("putStoriesOnPage"); + + $allStoriesList.empty(); + + // loop through all of our stories and generate HTML for them + for (let story of storyList.stories) { + const $story = generateStoryMarkup(story); + $allStoriesList.append($story); + } + + $allStoriesList.show(); +} + +/** Handle deleting a story. */ + +async function deleteStory(evt) { + console.debug("deleteStory"); + + const $closestLi = $(evt.target).closest("li"); + const storyId = $closestLi.attr("id"); + + await storyList.removeStory(currentUser, storyId); + + // re-generate story list + await putUserStoriesOnPage(); +} + +$ownStories.on("click", ".trash-can", deleteStory); + +/** Handle submitting new story form. */ + +async function submitNewStory(evt) { + console.debug("submitNewStory"); + evt.preventDefault(); + + // grab all info from form + const title = $("#create-title").val(); + const url = $("#create-url").val(); + const author = $("#create-author").val(); + const username = currentUser.username + const storyData = { title, url, author, username }; + + const story = await storyList.addStory(currentUser, storyData); + + const $story = generateStoryMarkup(story); + $allStoriesList.prepend($story); + + // hide the form and reset it + $submitForm.slideUp("slow"); + $submitForm.trigger("reset"); +} + +$submitForm.on("submit", submitNewStory); + +/****************************************************************************** + * Functionality for list of user's own stories + */ + +function putUserStoriesOnPage() { + console.debug("putUserStoriesOnPage"); + + $ownStories.empty(); + + if (currentUser.ownStories.length === 0) { + $ownStories.append("
        No stories added by user yet!
        "); + } else { + // loop through all of users stories and generate HTML for them + for (let story of currentUser.ownStories) { + let $story = generateStoryMarkup(story, true); + $ownStories.append($story); + } + } + + $ownStories.show(); +} + +/****************************************************************************** + * Functionality for favorites list and starr/un-starr a story + */ + +/** Put favorites list on page. */ + +function putFavoritesListOnPage() { + console.debug("putFavoritesListOnPage"); + + $favoritedStories.empty(); + + if (currentUser.favorites.length === 0) { + $favoritedStories.append("
        No favorites added!
        "); + } else { + // loop through all of users favorites and generate HTML for them + for (let story of currentUser.favorites) { + const $story = generateStoryMarkup(story); + $favoritedStories.append($story); + } + } + + $favoritedStories.show(); +} + +/** Handle favorite/un-favorite a story */ + +async function toggleStoryFavorite(evt) { + console.debug("toggleStoryFavorite"); + + const $tgt = $(evt.target); + const $closestLi = $tgt.closest("li"); + const storyId = $closestLi.attr("id"); + const story = storyList.stories.find(s => s.storyId === storyId); + + // see if the item is already favorited (checking by presence of star) + if ($tgt.hasClass("fas")) { + // currently a favorite: remove from user's fav list and change star + await currentUser.removeFavorite(story); + $tgt.closest("i").toggleClass("fas far"); + } else { + // currently not a favorite: do the opposite + await currentUser.addFavorite(story); + $tgt.closest("i").toggleClass("fas far"); + } +} + +$storiesLists.on("click", ".star", toggleStoryFavorite); diff --git a/my-work/hacker-news-clone/solution/js/user.js b/my-work/hacker-news-clone/solution/js/user.js new file mode 100644 index 0000000..f03896a --- /dev/null +++ b/my-work/hacker-news-clone/solution/js/user.js @@ -0,0 +1,132 @@ +"use strict"; + +// global to hold the User instance of the currently-logged-in user +let currentUser; + +/****************************************************************************** + * User login/signup/login + */ + +/** Handle login form submission. If login ok, sets up the user instance */ + +async function login(evt) { + console.debug("login", evt); + evt.preventDefault(); + + // grab the username and password + const username = $("#login-username").val(); + const password = $("#login-password").val(); + + // User.login retrieves user info from API and returns User instance + // which we'll make the globally-available, logged-in user. + currentUser = await User.login(username, password); + + $loginForm.trigger("reset"); + + saveUserCredentialsInLocalStorage(); + updateUIOnUserLogin(); +} + +$loginForm.on("submit", login); + +/** Handle signup form submission. */ + +async function signup(evt) { + console.debug("signup", evt); + evt.preventDefault(); + + const name = $("#signup-name").val(); + const username = $("#signup-username").val(); + const password = $("#signup-password").val(); + + // User.signup retrieves user info from API and returns User instance + // which we'll make the globally-available, logged-in user. + currentUser = await User.signup(username, password, name); + + saveUserCredentialsInLocalStorage(); + updateUIOnUserLogin(); + + $signupForm.trigger("reset"); +} + +$signupForm.on("submit", signup); + +/** Handle click of logout button + * + * Remove their credentials from localStorage and refresh page + */ + +function logout(evt) { + console.debug("logout", evt); + localStorage.clear(); + location.reload(); +} + +$navLogOut.on("click", logout); + +/****************************************************************************** + * Storing/recalling previously-logged-in-user with localStorage + */ + +/** If there are user credentials in local storage, use those to log in + * that user. This is meant to be called on page load, just once. + */ + +async function checkForRememberedUser() { + console.debug("checkForRememberedUser"); + const token = localStorage.getItem("token"); + const username = localStorage.getItem("username"); + if (!token || !username) return false; + + // try to log in with these credentials (will be null if login failed) + currentUser = await User.loginViaStoredCredentials(token, username); +} + +/** Sync current user information to localStorage. + * + * We store the username/token in localStorage so when the page is refreshed + * (or the user revisits the site later), they will still be logged in. + */ + +function saveUserCredentialsInLocalStorage() { + console.debug("saveUserCredentialsInLocalStorage"); + if (currentUser) { + localStorage.setItem("token", currentUser.loginToken); + localStorage.setItem("username", currentUser.username); + } +} + +/****************************************************************************** + * General UI stuff about users & profiles + */ + +/** When a user signs up or registers, we want to set up the UI for them: + * + * - show the stories list + * - update nav bar options for logged-in user + * - generate the user profile part of the page + */ + +async function updateUIOnUserLogin() { + console.debug("updateUIOnUserLogin"); + + hidePageComponents(); + + // re-display stories (so that "favorite" stars can appear) + putStoriesOnPage(); + $allStoriesList.show(); + + updateNavOnLogin(); + generateUserProfile(); + $storiesContainer.show() +} + +/** Show a "user profile" part of page built from the current user's info. */ + +function generateUserProfile() { + console.debug("generateUserProfile"); + + $("#profile-name").text(currentUser.name); + $("#profile-username").text(currentUser.username); + $("#profile-account-date").text(currentUser.createdAt.slice(0, 10)); +} diff --git a/my-work/jeopardy/index.html b/my-work/jeopardy/index.html new file mode 100644 index 0000000..7bc1bf9 --- /dev/null +++ b/my-work/jeopardy/index.html @@ -0,0 +1,98 @@ + + + + + + + + Jeopardy! + + + + + + + + +
        +
        +
        + Jeopardy! Logo Courtesy of Wikimedia Commons +
        + + +
        + loading... + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        +
        +
        +
        + + + + diff --git a/my-work/meme-generator/app.js b/my-work/meme-generator/app.js new file mode 100644 index 0000000..e277d41 --- /dev/null +++ b/my-work/meme-generator/app.js @@ -0,0 +1,190 @@ +"use strict"; + +document.addEventListener("DOMContentLoaded", ()=>{ + //UTILITIES + const select = (item)=> document.querySelector(item); + const newElem = (tag)=> document.createElement(tag); + + //PAGE TAGS + const page ={ + top: select("input[name='top-text']"), + bottom: select("input[name='bottom-text']"), + url: select("input[name='image-url']"), + button: select("button"), + can: select("canvas"), + } + + //CANVAS DEFAULTS + const ctx = page.can.getContext("2d"); + page.can.width = 302; + page.can.height = 258; + + //EVENT HANDLERS + const memeTextInsert = (textBool)=>{ + return ({isTop = textBool} = {})=>{ + let fontFillSize = page.can.height * .1; + let fontStrokeSize = fontFillSize/20; + const w = page.can.width; + const h = page.can.height; + let text; + + ctx.font = `900 ${fontFillSize}px Arial`; + ctx.fillStyle = "white"; + ctx.strokeStyle = "black"; + ctx.lineWidth = fontStrokeSize; + ctx.lineJoin = "round"; + ctx.textAlign = "center"; + + if (isTop){ + ctx.clearRect(0,0, (w),(fontFillSize+10)); + text = page.top.value.toUpperCase(); + ctx.strokeText(text, (w/2),(fontFillSize-fontStrokeSize)); + ctx.fillText(text, (w/2),(fontFillSize-fontStrokeSize)); + } + else{ + ctx.clearRect(0,(h - fontFillSize-10), w,h); + text = page.bottom.value.toUpperCase(); + ctx.strokeText(text, (w/2),(h - (fontFillSize)/4)); + ctx.fillText(text, (w/2),(h - (fontFillSize)/4)); + } + } + } + + const imgLoad = async ()=>{ + const img = new Image(); + const errMsg = newElem("p"); + + //STYLES + errMsg.style.background = "darkred"; + errMsg.style.color = "white" + errMsg.style.position = "absolute"; + errMsg.style.width = "100vw"; + errMsg.style.top = "100px"; + errMsg.style.left = 0; + errMsg.style.padding = "20px"; + errMsg.style.textAlign = "center"; + errMsg.style.font = "900 20px Arial" + errMsg.style.overflowWrap = "break-word"; + + await new Promise((resolve, reject)=> { + img.addEventListener("load", ()=>{ + resolve(); + if(img.height > 2000 || img.width > 800){ + errMsg.innerText = "That image is too large. Please use a smaller one."; + select("body").append(errMsg); + setTimeout(()=>errMsg.remove(), 5000); + + page.url.value = "" + page.url.focus(); + } + else{ + page.can.width = img.width; + page.can.height = img.height; + ctx.drawImage(img, 0,0); + } + }) + + + img.addEventListener("error", ()=>{ + reject(); + errMsg.innerText = "Unable to load the image." + select("body").append(errMsg); + setTimeout(()=>errMsg.remove(), 5000); + }) + + //LOAD THE IMAGE + img.src = page.url.value; + }) + } + + const createMeme = async (e)=>{ + e.preventDefault(); + let fontFillSize = page.can.height * .1; + let fontStrokeSize = fontFillSize/20; + const w = page.can.width; + const h = page.can.height; + const textTop = page.top.value.toUpperCase(); + const textBottom = page.bottom.value.toUpperCase(); + const galleryDiv = newElem("div"); + const gallery = newElem("canvas"); + const deleteButton = newElem("button"); + + await imgLoad(); + + //FONT STYLES + ctx.font = `900 ${fontFillSize}px Arial`; + ctx.fillStyle = "white"; + ctx.strokeStyle = "black"; + ctx.lineWidth = fontStrokeSize; + ctx.textAlign = "center"; + + //TOP TEXT + ctx.strokeText(textTop, (w/2),(fontFillSize-fontStrokeSize)); + ctx.fillText(textTop, (w/2),(fontFillSize-fontStrokeSize)); + + //BOTTOM TEXT + ctx.strokeText(textBottom, (w/2),(h - (fontFillSize)/4)); + ctx.fillText(textBottom, (w/2),(h - (fontFillSize)/4)); + + //MAKE GALLERY CANVAS + galleryDiv.classList.add("gallery"); + select(".memes").prepend(galleryDiv); + galleryDiv.append(gallery); + const gtx = gallery.getContext("2d"); + const img = new Image(); + + //MAKE THE DELETE BUTTON + deleteButton.innerText = "Delete"; + deleteButton.classList.add("delete") + gallery.after(deleteButton); + deleteButton.addEventListener("click", deleteMeme); + + //COPY TEMPLATE TO GALLERY + await new Promise((r)=>{ + img.addEventListener("load", ()=>{ + r(); + gallery.width = img.width; + gallery.height = img.height; + + gtx.drawImage(img, 0,0); + + //FONT STYLES + gtx.font = `900 ${fontFillSize}px Arial`; + gtx.fillStyle = "white"; + gtx.strokeStyle = "black"; + gtx.lineWidth = fontStrokeSize; + gtx.textAlign = "center"; + + gtx.strokeText(textTop, (w/2),(fontFillSize-fontStrokeSize)); + gtx.fillText(textTop, (w/2),(fontFillSize-fontStrokeSize)); + + gtx.strokeText(textBottom, (w/2),(h - (fontFillSize)/4)); + gtx.fillText(textBottom, (w/2),(h - (fontFillSize)/4)); + }) + + //LOAD THE IMAGE + img.src = page.url.value; + + }) + + //CLEAR FIELDS + page.top.value = ""; + page.bottom.value = ""; + page.url.value = ""; + ctx.clearRect(0,0, w,h); + page.can.width = 302; + page.can.height = 258; + + } + + const deleteMeme = (e)=>{ + e.target.parentElement.remove(); + } + + + //EVENT LISTENERS + page.top.addEventListener("keyup", memeTextInsert(true)); + page.bottom.addEventListener("keyup", memeTextInsert(false)); + page.url.addEventListener("keyup", imgLoad); + page.button.addEventListener("click", createMeme); +}); diff --git a/my-work/meme-generator/assets/troll.png b/my-work/meme-generator/assets/troll.png new file mode 100644 index 0000000..e234893 Binary files /dev/null and b/my-work/meme-generator/assets/troll.png differ diff --git a/my-work/meme-generator/index.html b/my-work/meme-generator/index.html new file mode 100644 index 0000000..bf3940b --- /dev/null +++ b/my-work/meme-generator/index.html @@ -0,0 +1,35 @@ + + + + + + + + Meme-Generator + + +

        Make A Meme

        +
        +
        +
        +
        + + + + + Parts of the image that are cropped off by editing text will be regenerated when the meme is created. +
        + +
        +
        +
        +
        +
        +
        +
        +
        + +
        + +
        + diff --git a/my-work/meme-generator/styles.css b/my-work/meme-generator/styles.css new file mode 100644 index 0000000..74aff5c --- /dev/null +++ b/my-work/meme-generator/styles.css @@ -0,0 +1,93 @@ +* {margin: 0;} html, body{height: 100%; background-color: #444;} + +h1{ + font-family: Arial; + color: white; + text-align:center; +} + +.container { + display: flex; +} +.items { + flex: 1; +} + +.generator{ + max-width: 100vw; + flex-wrap: wrap; + justify-content: center; +} + +form{ + display: flex; + flex-direction: column; + margin: 14px; +} + +form > *{ + flex: 1; + margin: 7px; + flex-basis: 25px; + max-height: 25px; + background-color: lightgrey; + color: #444; + border-radius: 3px; + transition: background-color .2s; +} + +button { + width: 100px; + flex-basis:33px; + max-height: 33px; + border: none; + color: white; + background-color: darkred; + border-radius: 7px; + margin: 0 auto; + transition-property: filter background-color; + transition-duration: .2s; +} + +button:hover { + background-color: maroon; + filter: drop-shadow(2px 3px 3px black) +} + +button:active{ + background-color: #4a0000; +} + +input:hover { + background-color: Snow; +} +input:focus { + background-color: white; +} + +span { + width: 200px; + max-height: min-content; + background-color: unset; + color: white; + font-family: Arial; + +} + + +canvas, .memes{ + border: 1px dashed #888; + margin: 14px; +} + +.memes { + width: 100vw; + height: auto; + display: flex; + flex-wrap: wrap; +} + +.gallery { + display: flex; + flex-direction: column; +} diff --git a/my-work/memory-game/cards/Adventure_Time:_Marceline_and_the_Scream_Queens_Issue_1_item_0_full.jpg b/my-work/memory-game/cards/Adventure_Time:_Marceline_and_the_Scream_Queens_Issue_1_item_0_full.jpg new file mode 100644 index 0000000..5f17cc0 Binary files /dev/null and b/my-work/memory-game/cards/Adventure_Time:_Marceline_and_the_Scream_Queens_Issue_1_item_0_full.jpg differ diff --git a/my-work/memory-game/cards/Adventure_Time:_Summer_Special_2013_Issue_1_item_4_full.jpg b/my-work/memory-game/cards/Adventure_Time:_Summer_Special_2013_Issue_1_item_4_full.jpg new file mode 100644 index 0000000..b8529af Binary files /dev/null and b/my-work/memory-game/cards/Adventure_Time:_Summer_Special_2013_Issue_1_item_4_full.jpg differ diff --git a/my-work/memory-game/cards/Adventure_Time:_The_Flip_Side_Issue_4_item_3_full.jpg b/my-work/memory-game/cards/Adventure_Time:_The_Flip_Side_Issue_4_item_3_full.jpg new file mode 100644 index 0000000..c329ae0 Binary files /dev/null and b/my-work/memory-game/cards/Adventure_Time:_The_Flip_Side_Issue_4_item_3_full.jpg differ diff --git a/my-work/memory-game/cards/Issue_10_item_5_full.jpg b/my-work/memory-game/cards/Issue_10_item_5_full.jpg new file mode 100644 index 0000000..cf55072 Binary files /dev/null and b/my-work/memory-game/cards/Issue_10_item_5_full.jpg differ diff --git a/my-work/memory-game/cards/Issue_2_item_1_full.jpg b/my-work/memory-game/cards/Issue_2_item_1_full.jpg new file mode 100644 index 0000000..4f1d3b1 Binary files /dev/null and b/my-work/memory-game/cards/Issue_2_item_1_full.jpg differ diff --git a/my-work/memory-game/cards/Issue_2_item_2_full.jpg b/my-work/memory-game/cards/Issue_2_item_2_full.jpg new file mode 100644 index 0000000..f20c3d7 Binary files /dev/null and b/my-work/memory-game/cards/Issue_2_item_2_full.jpg differ diff --git a/my-work/memory-game/cards/Issue_2_item_4_full.jpg b/my-work/memory-game/cards/Issue_2_item_4_full.jpg new file mode 100644 index 0000000..6824b13 Binary files /dev/null and b/my-work/memory-game/cards/Issue_2_item_4_full.jpg differ diff --git a/my-work/memory-game/cards/Issue_4_item_1_full.jpg b/my-work/memory-game/cards/Issue_4_item_1_full.jpg new file mode 100644 index 0000000..b9345eb Binary files /dev/null and b/my-work/memory-game/cards/Issue_4_item_1_full.jpg differ diff --git a/my-work/memory-game/cards/rejects/Adventure_Time:_Marceline_and_the_Scream_Queens_Issue_1_item_3_full.jpg b/my-work/memory-game/cards/rejects/Adventure_Time:_Marceline_and_the_Scream_Queens_Issue_1_item_3_full.jpg new file mode 100644 index 0000000..26db693 Binary files /dev/null and b/my-work/memory-game/cards/rejects/Adventure_Time:_Marceline_and_the_Scream_Queens_Issue_1_item_3_full.jpg differ diff --git a/my-work/memory-game/cards/rejects/Adventure_Time:_Marceline_and_the_Scream_Queens_Issue_1_item_4_full.jpg b/my-work/memory-game/cards/rejects/Adventure_Time:_Marceline_and_the_Scream_Queens_Issue_1_item_4_full.jpg new file mode 100644 index 0000000..42dae39 Binary files /dev/null and b/my-work/memory-game/cards/rejects/Adventure_Time:_Marceline_and_the_Scream_Queens_Issue_1_item_4_full.jpg differ diff --git a/my-work/memory-game/cards/rejects/Adventure_Time:_Marceline_and_the_Scream_Queens_Issue_1_item_7_full.jpg b/my-work/memory-game/cards/rejects/Adventure_Time:_Marceline_and_the_Scream_Queens_Issue_1_item_7_full.jpg new file mode 100644 index 0000000..83622e9 Binary files /dev/null and b/my-work/memory-game/cards/rejects/Adventure_Time:_Marceline_and_the_Scream_Queens_Issue_1_item_7_full.jpg differ diff --git a/my-work/memory-game/cards/rejects/Adventure_Time:_Marceline_and_the_Scream_Queens_Issue_3_item_0_full.jpg b/my-work/memory-game/cards/rejects/Adventure_Time:_Marceline_and_the_Scream_Queens_Issue_3_item_0_full.jpg new file mode 100644 index 0000000..2815268 Binary files /dev/null and b/my-work/memory-game/cards/rejects/Adventure_Time:_Marceline_and_the_Scream_Queens_Issue_3_item_0_full.jpg differ diff --git a/my-work/memory-game/cards/rejects/Adventure_Time:_Marceline_and_the_Scream_Queens_Issue_4_item_2_full.jpg b/my-work/memory-game/cards/rejects/Adventure_Time:_Marceline_and_the_Scream_Queens_Issue_4_item_2_full.jpg new file mode 100644 index 0000000..23f9e3b Binary files /dev/null and b/my-work/memory-game/cards/rejects/Adventure_Time:_Marceline_and_the_Scream_Queens_Issue_4_item_2_full.jpg differ diff --git a/my-work/memory-game/cards/rejects/Adventure_Time:_Season_11_Issue_6_item_2_full.jpg b/my-work/memory-game/cards/rejects/Adventure_Time:_Season_11_Issue_6_item_2_full.jpg new file mode 100644 index 0000000..d968660 Binary files /dev/null and b/my-work/memory-game/cards/rejects/Adventure_Time:_Season_11_Issue_6_item_2_full.jpg differ diff --git a/my-work/memory-game/cards/rejects/Adventure_Time:_Summer_Special_2013_Issue_1_item_2_full.jpg b/my-work/memory-game/cards/rejects/Adventure_Time:_Summer_Special_2013_Issue_1_item_2_full.jpg new file mode 100644 index 0000000..2764eb3 Binary files /dev/null and b/my-work/memory-game/cards/rejects/Adventure_Time:_Summer_Special_2013_Issue_1_item_2_full.jpg differ diff --git a/my-work/memory-game/cards/rejects/Adventure_Time:_The_Flip_Side_Issue_1_item_2_full.jpg b/my-work/memory-game/cards/rejects/Adventure_Time:_The_Flip_Side_Issue_1_item_2_full.jpg new file mode 100644 index 0000000..2417e87 Binary files /dev/null and b/my-work/memory-game/cards/rejects/Adventure_Time:_The_Flip_Side_Issue_1_item_2_full.jpg differ diff --git a/my-work/memory-game/cards/rejects/Adventure_Time:_The_Flip_Side_Issue_1_item_3_full.jpg b/my-work/memory-game/cards/rejects/Adventure_Time:_The_Flip_Side_Issue_1_item_3_full.jpg new file mode 100644 index 0000000..5d2e90a Binary files /dev/null and b/my-work/memory-game/cards/rejects/Adventure_Time:_The_Flip_Side_Issue_1_item_3_full.jpg differ diff --git a/my-work/memory-game/cards/rejects/Adventure_Time:_The_Flip_Side_Issue_1_item_4_full.jpg b/my-work/memory-game/cards/rejects/Adventure_Time:_The_Flip_Side_Issue_1_item_4_full.jpg new file mode 100644 index 0000000..af44912 Binary files /dev/null and b/my-work/memory-game/cards/rejects/Adventure_Time:_The_Flip_Side_Issue_1_item_4_full.jpg differ diff --git a/my-work/memory-game/cards/rejects/Adventure_Time:_The_Flip_Side_Issue_6_item_2_full.jpg b/my-work/memory-game/cards/rejects/Adventure_Time:_The_Flip_Side_Issue_6_item_2_full.jpg new file mode 100644 index 0000000..4be113a Binary files /dev/null and b/my-work/memory-game/cards/rejects/Adventure_Time:_The_Flip_Side_Issue_6_item_2_full.jpg differ diff --git a/my-work/memory-game/cards/rejects/Adventure_Time:_The_Flip_Side_Issue_6_item_3_full.jpg b/my-work/memory-game/cards/rejects/Adventure_Time:_The_Flip_Side_Issue_6_item_3_full.jpg new file mode 100644 index 0000000..ce11104 Binary files /dev/null and b/my-work/memory-game/cards/rejects/Adventure_Time:_The_Flip_Side_Issue_6_item_3_full.jpg differ diff --git a/my-work/memory-game/index.html b/my-work/memory-game/index.html new file mode 100644 index 0000000..7f549fb --- /dev/null +++ b/my-work/memory-game/index.html @@ -0,0 +1,16 @@ + + + + + Memory Game! + + + +
        +

        Memory Game!

        +
        +
        + All images were sourced from the Adventure Time fandom Wiki + + + diff --git a/my-work/memory-game/script.js b/my-work/memory-game/script.js new file mode 100644 index 0000000..29eb6af --- /dev/null +++ b/my-work/memory-game/script.js @@ -0,0 +1,148 @@ +document.addEventListener("DOMContentLoaded", ()=>{ + + //UTILS + const newElem = (elem)=>document.createElement(elem); + const select = (elem)=> document.querySelector(elem); + const selectAll = (elem)=> document.querySelectorAll(elem); + const sleep = (s) => new Promise((r)=> setTimeout(()=> r(), s *1000)); + const shuffle = (array)=>{ + let count = array.length; + while(count){ + let ran = Math.floor(Math.random() * count--); + [array[ran], array[count]] = [array[count], array[ran]] + } + return array; + } + + //PAGE TAGS + const page = { + gameContainer: select("#game"), + } + + //Objects/Arrays + const covers = [ + "cards/Adventure_Time:_Marceline_and_the_Scream_Queens_Issue_1_item_0_full.jpg", + "cards/Adventure_Time:_Summer_Special_2013_Issue_1_item_4_full.jpg", + "cards/Adventure_Time:_The_Flip_Side_Issue_4_item_3_full.jpg", + "cards/Issue_10_item_5_full.jpg", + "cards/Issue_2_item_1_full.jpg", + "cards/Issue_2_item_2_full.jpg", + "cards/Issue_2_item_4_full.jpg", + "cards/Issue_4_item_1_full.jpg", + "cards/Adventure_Time:_Marceline_and_the_Scream_Queens_Issue_1_item_0_full.jpg", + "cards/Adventure_Time:_Summer_Special_2013_Issue_1_item_4_full.jpg", + "cards/Adventure_Time:_The_Flip_Side_Issue_4_item_3_full.jpg", + "cards/Issue_10_item_5_full.jpg", + "cards/Issue_2_item_1_full.jpg", + "cards/Issue_2_item_2_full.jpg", + "cards/Issue_2_item_4_full.jpg", + "cards/Issue_4_item_1_full.jpg", + ]; + + const handleFirstCardClick = (firstEvent)=> { + const first = firstEvent.target; + if (first.localName !== "img" || first.style.filter === "none"){ + undefined; + } + else{ + first.style.filter = "unset"; + + for (let image of page.images){ + if (image.style.filter !== "unset"){ + page.gameContainer.removeEventListener("click", handleFirstCardClick); + + + page.gameContainer.addEventListener("click", async function handleSecondCardClick(secondEvent){ + const second = secondEvent.target; + if (second.localName !== "img"){ + undefined; + } + else if (second.style.filter === "none"){ + first.style.filter = ""; + console.log("You did not do it.") + page.gameContainer.removeEventListener("click", handleSecondCardClick); + page.gameContainer.addEventListener("click", handleFirstCardClick); + } + else{ + second.style.filter = "unset"; + await sleep(1); + + //MOMENT OF TRUTH + if (first.src === second.src && (first.x !== second.x || first.y !== second.y)){ + first.style.filter = "none"; + second.style.filter = "none"; + + //COMPLETION CELEBRATION. + let foundImages = 0; + let pinata = {}; + pinata[foundImages] = document.createElementNS("http://www.w3.org/2000/svg", "svg"); + pinata[foundImages + 16] = document.createElementNS("http://www.w3.org/2000/svg", "svg"); + pinata[foundImages + 32] = document.createElementNS("http://www.w3.org/2000/svg", "svg"); + for (let image of page.images){ + if (image.style.filter === "none") + foundImages++; + } + if (foundImages === 16){ + select(".confetti").style.display = "flex"; + for (let confetti in pinata){ + select(".confetti").append(pinata[confetti]); + pinata[confetti].setAttribute("width", 20); + pinata[confetti].setAttribute("height", 20); + let path = document.createElementNS("http://www.w3.org/2000/svg", "path"); + + path.setAttribute("d", `m0,0 l0,${Math.random() * 20 + 2} l${Math.random() * 20 + 2},${Math.random() * (-10) - 2} z`); + pinata[confetti].append(path); + + //Styles + pinata[confetti].style.flex = 1; + setInterval(()=>{ + path.style.fill = shimmer(); + }, 1300); + } + } + console.log("you did it!") + } + else{ + first.style.filter = ""; + second.style.filter = ""; + console.log("You did not do it.") + } + + page.gameContainer.removeEventListener("click", handleSecondCardClick); + page.gameContainer.addEventListener("click", handleFirstCardClick); + } + }, {once: true}) + + } + } + } + } + + const shimmer = () => { + const r = Math.floor(Math.random() * 256); + const g = Math.floor(Math.random() * 256); + const b = Math.floor(Math.random() * 256); + const rgb = `rgb(${r}, ${g}, ${b})` + return rgb; + } + + const createDivsForCovers = function(coverArray) { + for (let cover of coverArray) { + + let img = newElem("img"); + img.src = cover; + + // call a function handleCardClick when a div is clicked on + page.gameContainer.addEventListener("click", handleFirstCardClick); + + // append the div to the element with an id of game + page.gameContainer.append(img); + + page.images = selectAll("img"); + } + } + + let shuffledCovers = shuffle(covers); + + createDivsForCovers(shuffledCovers); +}) diff --git a/my-work/memory-game/style.css b/my-work/memory-game/style.css new file mode 100644 index 0000000..a528f05 --- /dev/null +++ b/my-work/memory-game/style.css @@ -0,0 +1,69 @@ +* {margin: 0;} html, body{height: 100%; position:relative; background-color: #444;} + +#game img { + flex: 1; + border-radius: 10px; + margin: 5px; + display: inline-block; + filter: grayscale() contrast(0%); + transition: filter .5s; +} + +#game img:hover{ + filter: grayscale() contrast(0%) drop-shadow(7px 7px 10px black); +} + +#game { + max-width: 860px; + display: flex; + flex-wrap: wrap; + margin: 0 auto; +} + +h1, sub { + text-align: center; + display: block; + color: white; +} +a { + color: teal; +} + +svg { + animation: rotate 2s linear infinite; +} + +path { + transition: fill 1s; +} + +@keyframes rotate{ + from { + transform: rotate(0deg) + } + to{ + transform: rotate(360deg) + } +} + +div.confetti { + position: absolute; + top: -25px; + left: 0; + right: 0; + margin-left: auto; + margin-right: auto; + width: 860px; + display: none; + flex-wrap: wrap; + animation: fall 10s linear; +} + +@keyframes fall{ + 0%{ + top: 0% + } + 100%{ + top: 200% + } +} diff --git a/my-work/todo-app/app.js b/my-work/todo-app/app.js new file mode 100644 index 0000000..8e4e3ba --- /dev/null +++ b/my-work/todo-app/app.js @@ -0,0 +1,113 @@ +"use strict"; +document.addEventListener("DOMContentLoaded", ()=>{ + //utilities + const select = (item)=> document.querySelector(item); + const selectAll = (item)=> document.querySelectorAll(item); + const newEl = (tag)=> document.createElement(tag); + + //Page Tags + const page = { + form: select("form"), + input: select("input"), + formButton: select("button.form-button"), + list: select("ul"), + deleter: select("button.delete-all"), + } + + //Objects/arrays + let itemEvents = 0; + let storage = {} + + //if localStorage contains itemNumber set the variable to that. + if (localStorage.getItem("itemEvents")){ + itemEvents = localStorage.getItem("itemEvents") + } + + //creates elements and adds to the dom + let createTodoItem = (item, {index=++itemEvents}={})=>{ + + let li = newEl("li"); + let p = newEl("p"); + let deleteBtn = newEl("button"); + let completeBtn = newEl("button"); + + li.dataset.itemNo = index; + p.innerText = item; + + //storage[index-1].complete ? li.style.textDecoration = "line-through": undefined; + + li.append(p); + deleteBtn.innerText = "Delete"; + completeBtn.innerText = "Complete"; + + page.list.append(li); + li.append(completeBtn); + li.append(deleteBtn); + + return li; + } + + let saveItems = ()=>{ + + //Saves the item in memory + localStorage.setItem("items", JSON.stringify(storage)); + localStorage.setItem("itemEvents", itemEvents); + } + + let deleteItems = ()=>{ + localStorage.clear(); + } + + page.deleter.addEventListener("click", deleteItems) + + // checks localstorage + if (localStorage.getItem("items")){ + storage = JSON.parse(localStorage.getItem("items")); + + for(let i in storage){ + let li = createTodoItem(storage[i].value, {index:i}) + storage[i].complete && (()=> li.style.textDecoration = "line-through")(); + } + + } + + page.formButton.addEventListener("click", (e)=>{ + + e.preventDefault(); // prevents page from refreshing. + + createTodoItem(page.input.value) + + for (let i of selectAll("p")){ + storage[i.parentElement.dataset.itemNo] = { + value: i.innerText, + complete: false, + } + } + + saveItems(); + + //resets the form + page.input.value = "" + page.input.focus(); + }) + + + page.list.addEventListener("click", (e)=>{ + let num = e.target.parentElement.dataset.itemNo; + switch(e.target.innerText){ + case("Delete"):{ + e.target.parentElement.remove() + delete storage[num] + localStorage.setItem("items", JSON.stringify(storage)); + break; + } + case("Complete"):{ + e.target.parentElement.style.textDecoration === "line-through" ? e.target.parentElement.style.textDecoration = "none": e.target.parentElement.style.textDecoration = "line-through"; + storage[num].complete = !storage[num].complete + localStorage.setItem("items", JSON.stringify(storage)); + break; + } + } + }) + +}) diff --git a/my-work/todo-app/index.html b/my-work/todo-app/index.html new file mode 100644 index 0000000..944cc0f --- /dev/null +++ b/my-work/todo-app/index.html @@ -0,0 +1,23 @@ + + + + + + + + ToDo App + + +
        + + +
        + + +
        +
          + +
          + +
          + diff --git a/static/favicon.ico b/static/favicon.ico new file mode 100644 index 0000000..4c3163d Binary files /dev/null and b/static/favicon.ico differ diff --git a/static/fonts/Nunito-Black.woff b/static/fonts/Nunito-Black.woff new file mode 100644 index 0000000..e590a5c Binary files /dev/null and b/static/fonts/Nunito-Black.woff differ diff --git a/static/fonts/Nunito-Black.woff2 b/static/fonts/Nunito-Black.woff2 new file mode 100644 index 0000000..2b17215 Binary files /dev/null and b/static/fonts/Nunito-Black.woff2 differ diff --git a/static/fonts/Nunito-BlackItalic.woff b/static/fonts/Nunito-BlackItalic.woff new file mode 100644 index 0000000..21b72bc Binary files /dev/null and b/static/fonts/Nunito-BlackItalic.woff differ diff --git a/static/fonts/Nunito-BlackItalic.woff2 b/static/fonts/Nunito-BlackItalic.woff2 new file mode 100644 index 0000000..c6de737 Binary files /dev/null and b/static/fonts/Nunito-BlackItalic.woff2 differ diff --git a/static/fonts/Nunito-Bold.woff b/static/fonts/Nunito-Bold.woff new file mode 100644 index 0000000..12a8907 Binary files /dev/null and b/static/fonts/Nunito-Bold.woff differ diff --git a/static/fonts/Nunito-Bold.woff2 b/static/fonts/Nunito-Bold.woff2 new file mode 100644 index 0000000..80d2738 Binary files /dev/null and b/static/fonts/Nunito-Bold.woff2 differ diff --git a/static/fonts/Nunito-BoldItalic.woff b/static/fonts/Nunito-BoldItalic.woff new file mode 100644 index 0000000..1b1f0eb Binary files /dev/null and b/static/fonts/Nunito-BoldItalic.woff differ diff --git a/static/fonts/Nunito-BoldItalic.woff2 b/static/fonts/Nunito-BoldItalic.woff2 new file mode 100644 index 0000000..0b120ef Binary files /dev/null and b/static/fonts/Nunito-BoldItalic.woff2 differ diff --git a/static/fonts/Nunito-ExtraBold.woff b/static/fonts/Nunito-ExtraBold.woff new file mode 100644 index 0000000..57a1840 Binary files /dev/null and b/static/fonts/Nunito-ExtraBold.woff differ diff --git a/static/fonts/Nunito-ExtraBold.woff2 b/static/fonts/Nunito-ExtraBold.woff2 new file mode 100644 index 0000000..ddbb9bb Binary files /dev/null and b/static/fonts/Nunito-ExtraBold.woff2 differ diff --git a/static/fonts/Nunito-ExtraBoldItalic.woff b/static/fonts/Nunito-ExtraBoldItalic.woff new file mode 100644 index 0000000..7038c1e Binary files /dev/null and b/static/fonts/Nunito-ExtraBoldItalic.woff differ diff --git a/static/fonts/Nunito-ExtraBoldItalic.woff2 b/static/fonts/Nunito-ExtraBoldItalic.woff2 new file mode 100644 index 0000000..c1131cf Binary files /dev/null and b/static/fonts/Nunito-ExtraBoldItalic.woff2 differ diff --git a/static/fonts/Nunito-ExtraLight.woff b/static/fonts/Nunito-ExtraLight.woff new file mode 100644 index 0000000..6d90295 Binary files /dev/null and b/static/fonts/Nunito-ExtraLight.woff differ diff --git a/static/fonts/Nunito-ExtraLight.woff2 b/static/fonts/Nunito-ExtraLight.woff2 new file mode 100644 index 0000000..57cd66f Binary files /dev/null and b/static/fonts/Nunito-ExtraLight.woff2 differ diff --git a/static/fonts/Nunito-ExtraLightItalic.woff b/static/fonts/Nunito-ExtraLightItalic.woff new file mode 100644 index 0000000..b628aed Binary files /dev/null and b/static/fonts/Nunito-ExtraLightItalic.woff differ diff --git a/static/fonts/Nunito-ExtraLightItalic.woff2 b/static/fonts/Nunito-ExtraLightItalic.woff2 new file mode 100644 index 0000000..709d320 Binary files /dev/null and b/static/fonts/Nunito-ExtraLightItalic.woff2 differ diff --git a/static/fonts/Nunito-Italic.woff b/static/fonts/Nunito-Italic.woff new file mode 100644 index 0000000..ccfd3a0 Binary files /dev/null and b/static/fonts/Nunito-Italic.woff differ diff --git a/static/fonts/Nunito-Italic.woff2 b/static/fonts/Nunito-Italic.woff2 new file mode 100644 index 0000000..f39c8d8 Binary files /dev/null and b/static/fonts/Nunito-Italic.woff2 differ diff --git a/static/fonts/Nunito-Light.woff b/static/fonts/Nunito-Light.woff new file mode 100644 index 0000000..e5717ac Binary files /dev/null and b/static/fonts/Nunito-Light.woff differ diff --git a/static/fonts/Nunito-Light.woff2 b/static/fonts/Nunito-Light.woff2 new file mode 100644 index 0000000..bbe398c Binary files /dev/null and b/static/fonts/Nunito-Light.woff2 differ diff --git a/static/fonts/Nunito-LightItalic.woff b/static/fonts/Nunito-LightItalic.woff new file mode 100644 index 0000000..135e2a9 Binary files /dev/null and b/static/fonts/Nunito-LightItalic.woff differ diff --git a/static/fonts/Nunito-LightItalic.woff2 b/static/fonts/Nunito-LightItalic.woff2 new file mode 100644 index 0000000..17e49cd Binary files /dev/null and b/static/fonts/Nunito-LightItalic.woff2 differ diff --git a/static/fonts/Nunito-Medium.woff b/static/fonts/Nunito-Medium.woff new file mode 100644 index 0000000..ed990aa Binary files /dev/null and b/static/fonts/Nunito-Medium.woff differ diff --git a/static/fonts/Nunito-Medium.woff2 b/static/fonts/Nunito-Medium.woff2 new file mode 100644 index 0000000..4dc5fcf Binary files /dev/null and b/static/fonts/Nunito-Medium.woff2 differ diff --git a/static/fonts/Nunito-MediumItalic.woff b/static/fonts/Nunito-MediumItalic.woff new file mode 100644 index 0000000..ddae9f2 Binary files /dev/null and b/static/fonts/Nunito-MediumItalic.woff differ diff --git a/static/fonts/Nunito-MediumItalic.woff2 b/static/fonts/Nunito-MediumItalic.woff2 new file mode 100644 index 0000000..31bdaae Binary files /dev/null and b/static/fonts/Nunito-MediumItalic.woff2 differ diff --git a/static/fonts/Nunito-Regular.woff b/static/fonts/Nunito-Regular.woff new file mode 100644 index 0000000..7e59c07 Binary files /dev/null and b/static/fonts/Nunito-Regular.woff differ diff --git a/static/fonts/Nunito-Regular.woff2 b/static/fonts/Nunito-Regular.woff2 new file mode 100644 index 0000000..622619a Binary files /dev/null and b/static/fonts/Nunito-Regular.woff2 differ diff --git a/static/fonts/Nunito-SemiBold.woff b/static/fonts/Nunito-SemiBold.woff new file mode 100644 index 0000000..c8499a8 Binary files /dev/null and b/static/fonts/Nunito-SemiBold.woff differ diff --git a/static/fonts/Nunito-SemiBold.woff2 b/static/fonts/Nunito-SemiBold.woff2 new file mode 100644 index 0000000..6fb4c6a Binary files /dev/null and b/static/fonts/Nunito-SemiBold.woff2 differ diff --git a/static/fonts/Nunito-SemiBoldItalic.woff b/static/fonts/Nunito-SemiBoldItalic.woff new file mode 100644 index 0000000..d67d780 Binary files /dev/null and b/static/fonts/Nunito-SemiBoldItalic.woff differ diff --git a/static/fonts/Nunito-SemiBoldItalic.woff2 b/static/fonts/Nunito-SemiBoldItalic.woff2 new file mode 100644 index 0000000..f1f4e2b Binary files /dev/null and b/static/fonts/Nunito-SemiBoldItalic.woff2 differ diff --git a/static/fonts/OFL.txt b/static/fonts/OFL.txt new file mode 100644 index 0000000..9a43a3a --- /dev/null +++ b/static/fonts/OFL.txt @@ -0,0 +1,93 @@ +Copyright 2014 The Nunito Project Authors (https://github.com/googlefonts/nunito) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/static/img/CLF-404.png b/static/img/CLF-404.png new file mode 100644 index 0000000..b30cf06 Binary files /dev/null and b/static/img/CLF-404.png differ diff --git a/static/img/CLF-color-theme.png b/static/img/CLF-color-theme.png new file mode 100644 index 0000000..e2c9630 Binary files /dev/null and b/static/img/CLF-color-theme.png differ diff --git a/static/img/CLF-section-1.png b/static/img/CLF-section-1.png new file mode 100644 index 0000000..2fa0ec9 Binary files /dev/null and b/static/img/CLF-section-1.png differ diff --git a/static/img/CLF-section-2.png b/static/img/CLF-section-2.png new file mode 100644 index 0000000..af1190b Binary files /dev/null and b/static/img/CLF-section-2.png differ diff --git a/static/img/CLF-section-3.png b/static/img/CLF-section-3.png new file mode 100644 index 0000000..747e3c4 Binary files /dev/null and b/static/img/CLF-section-3.png differ diff --git a/static/img/backend-architecture.svg b/static/img/backend-architecture.svg new file mode 100644 index 0000000..d88862d --- /dev/null +++ b/static/img/backend-architecture.svg @@ -0,0 +1 @@ +4 diff --git a/static/img/cherry-lane-farm-logo.png b/static/img/cherry-lane-farm-logo.png new file mode 100644 index 0000000..8e47680 Binary files /dev/null and b/static/img/cherry-lane-farm-logo.png differ diff --git a/static/img/cherrylane-farm-ss.png b/static/img/cherrylane-farm-ss.png new file mode 100644 index 0000000..f419940 Binary files /dev/null and b/static/img/cherrylane-farm-ss.png differ diff --git a/static/img/curlywave.svg b/static/img/curlywave.svg new file mode 100644 index 0000000..e94a29b --- /dev/null +++ b/static/img/curlywave.svg @@ -0,0 +1,6 @@ + +A 2-dimensional cartoonish wave curling to the right. + + + + diff --git a/static/img/directorschoice-logo.png b/static/img/directorschoice-logo.png new file mode 100644 index 0000000..70c26d8 Binary files /dev/null and b/static/img/directorschoice-logo.png differ diff --git a/static/img/duck-story-v1-ss.png b/static/img/duck-story-v1-ss.png new file mode 100644 index 0000000..fec9270 Binary files /dev/null and b/static/img/duck-story-v1-ss.png differ diff --git a/static/img/duck-story-v2-ss.png b/static/img/duck-story-v2-ss.png new file mode 100644 index 0000000..950a423 Binary files /dev/null and b/static/img/duck-story-v2-ss.png differ diff --git a/static/img/freelance-webdev.jpg b/static/img/freelance-webdev.jpg new file mode 100644 index 0000000..87df427 Binary files /dev/null and b/static/img/freelance-webdev.jpg differ diff --git a/static/img/fruit-search-ss.png b/static/img/fruit-search-ss.png new file mode 100644 index 0000000..adc2f2b Binary files /dev/null and b/static/img/fruit-search-ss.png differ diff --git a/static/img/giphy-search-ss.png b/static/img/giphy-search-ss.png new file mode 100644 index 0000000..b75268f Binary files /dev/null and b/static/img/giphy-search-ss.png differ diff --git a/static/img/github-mark.svg b/static/img/github-mark.svg new file mode 100644 index 0000000..37fa923 --- /dev/null +++ b/static/img/github-mark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/static/img/go_guy.png b/static/img/go_guy.png new file mode 100644 index 0000000..04dd5bf Binary files /dev/null and b/static/img/go_guy.png differ diff --git a/static/img/gravelle-family-farm-ss.png b/static/img/gravelle-family-farm-ss.png new file mode 100644 index 0000000..60f739a Binary files /dev/null and b/static/img/gravelle-family-farm-ss.png differ diff --git a/static/img/hacker-news-clone-ss.png b/static/img/hacker-news-clone-ss.png new file mode 100644 index 0000000..be968fc Binary files /dev/null and b/static/img/hacker-news-clone-ss.png differ diff --git a/static/img/hilltop-doodles-ss.png b/static/img/hilltop-doodles-ss.png new file mode 100644 index 0000000..24bc50c Binary files /dev/null and b/static/img/hilltop-doodles-ss.png differ diff --git a/static/img/image-delivery.svg b/static/img/image-delivery.svg new file mode 100644 index 0000000..8a7cbcd --- /dev/null +++ b/static/img/image-delivery.svg @@ -0,0 +1 @@ + diff --git a/static/img/jeopardy-ss.png b/static/img/jeopardy-ss.png new file mode 100644 index 0000000..a31999c Binary files /dev/null and b/static/img/jeopardy-ss.png differ diff --git a/static/img/me.jpg b/static/img/me.jpg new file mode 100644 index 0000000..8bbb072 Binary files /dev/null and b/static/img/me.jpg differ diff --git a/static/img/meme-generator-ss.png b/static/img/meme-generator-ss.png new file mode 100644 index 0000000..64129c4 Binary files /dev/null and b/static/img/meme-generator-ss.png differ diff --git a/static/img/memory-game-ss.png b/static/img/memory-game-ss.png new file mode 100644 index 0000000..f2af5fe Binary files /dev/null and b/static/img/memory-game-ss.png differ diff --git a/static/img/mt_fuji.jpg b/static/img/mt_fuji.jpg new file mode 100644 index 0000000..3adef84 Binary files /dev/null and b/static/img/mt_fuji.jpg differ diff --git a/static/img/raidercomm-logo.jpeg b/static/img/raidercomm-logo.jpeg new file mode 100644 index 0000000..1df414e Binary files /dev/null and b/static/img/raidercomm-logo.jpeg differ diff --git a/static/img/splat-dark.svg b/static/img/splat-dark.svg new file mode 100644 index 0000000..05ff69b --- /dev/null +++ b/static/img/splat-dark.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/static/img/splat-wave.svg b/static/img/splat-wave.svg new file mode 100644 index 0000000..d197c5e --- /dev/null +++ b/static/img/splat-wave.svg @@ -0,0 +1 @@ + diff --git a/static/img/springboard-logo.svg b/static/img/springboard-logo.svg new file mode 100644 index 0000000..9ed29b9 --- /dev/null +++ b/static/img/springboard-logo.svg @@ -0,0 +1 @@ + diff --git a/static/img/todo-app-ss.png b/static/img/todo-app-ss.png new file mode 100644 index 0000000..31e5d5a Binary files /dev/null and b/static/img/todo-app-ss.png differ diff --git a/static/img/typescript-and-next.png b/static/img/typescript-and-next.png new file mode 100644 index 0000000..418ac8b Binary files /dev/null and b/static/img/typescript-and-next.png differ diff --git a/static/img/zoho-logo.png b/static/img/zoho-logo.png new file mode 100644 index 0000000..e7c9656 Binary files /dev/null and b/static/img/zoho-logo.png differ diff --git a/static/js/utils.js b/static/js/utils.js new file mode 100644 index 0000000..69d1dd2 --- /dev/null +++ b/static/js/utils.js @@ -0,0 +1,285 @@ +"use strict"; + + +//constructor used for showing and hiding objects. Uses the computed transition time as the timer for sleeping the integrated promise. +export const displayFunc = function(tag) { + this.tag = document.querySelector(tag), + this.show = async function({sec = 1, rel = true, disp = "block"} = {}){ + this.tag.style.display = disp; + if (rel) + this.tag.style.position = "relative"; + if (!rel) + this.tag.style.position = "absolute"; + await sleep(sec * 1); + }, + this.hide = async function(sec = .5){ + this.tag.style.display = "none"; + await sleep(sec * 1); + } +}; + + +// custom sleep function. +export const sleep = time => new Promise(resolve => setTimeout(resolve, time * 1000)); + + +//PAGE TAGS +export const page = { + //Unilateral Tags + border: document.querySelector("#app"), + lightGreenBG: "#B3DCBD", + container: document.querySelector(".container"), + duckType: document.querySelectorAll(".duck_type"), + friendType: document.querySelectorAll(".friend_type"), + friendName: document.querySelectorAll(".friend_name"), + helper: new displayFunc("#helper"), + // Beginning Tags +} + +export const beginningPage = { + oneTime: new displayFunc("#oneTime"), + startButton: new displayFunc("button#startButton"), + hm: new displayFunc("#hm"), + no: new displayFunc("#no"), + yes: new displayFunc("#yes"), + phaseOne:{ + duckInlineInput: new displayFunc("span.inline"), + duckWhatColor: new displayFunc("#whatColor"), + }, + phaseTwo:{ + body: new displayFunc("div.phaseTwo"), + where: new displayFunc("#where"), + letsSee: new displayFunc("#letsSee"), + eyes: new displayFunc("#eyes"), + ah: new displayFunc("#ah"), + thereSheIs: new displayFunc("#thereSheIs"), + splashing: new displayFunc("#splashing"), + }, + phaseThree:{ + body: new displayFunc("div.phaseThree"), + chooseAFriend: new displayFunc("#chooseAFriend"), + tryAgain: new displayFunc("#tryAgain"), + friendDeclare: new displayFunc("#friend_declare"), + friendNameCheck: new displayFunc(".input_name_check"), + friendColorQuestion: new displayFunc("#friend_colorQuestion"), + friendColorInput: new displayFunc("#friend_colorQuestion_input"), + friendGoofy: new displayFunc("#friend_goofy"), + friendLaugh: new displayFunc("#friend_laugh"), + duckLaugh: new displayFunc("#duck_laugh"), + rainStart: new displayFunc("#rain_start"), + rainHowBad: new displayFunc("#rain_howBad"), + rainInputNode: new displayFunc("#rain_input_node"), + rainNotBad: new displayFunc("#notBad"), + rainRangeInput: new displayFunc("input#rain_range"), + rainReallyBad: new displayFunc("#reallyBad"), + rainGetOut: new displayFunc("#rain_getOut"), + rainHungry: new displayFunc("#rain_hungry"), + eatChoose: new displayFunc("#eat_choose"), + }, +} + +export const pizzaPage = { + // Pizza Tags + pizzaHeading: new displayFunc("#pizza_story"), + visitPizza: new displayFunc("#visit_pizza"), + pizzaFantastic: new displayFunc("#pizza_fantastic"), + scream: new displayFunc("#scream"), + karenWords1: new displayFunc("#karenWords1"), + karenWords2: new displayFunc("#karenWords2"), + karenWords3: new displayFunc("#karenWords3"), + karenWords4: new displayFunc("#karenWords4"), + karenWords5: new displayFunc("#karenWords5"), + karenWords6: new displayFunc("#karenWords6"), + mrFantastic: new displayFunc("#mrFantastic"), + sorryGuys: new displayFunc("#sorry_guys"), + leave: new displayFunc("#leave"), + notFantastic: new displayFunc("#notFantastic"), + duckNod: new displayFunc("#duck_nod"), + sneaky: new displayFunc("#sneaky"), + sneakyHow: new displayFunc("#sneaky_how"), + startBand: new displayFunc("#start_band"), + soundsAwesome: new displayFunc("#sounds_awesome"), + musicPractice: new displayFunc("#music_practice"), + finallyReady: new displayFunc("#finally_ready"), + back4More: new displayFunc("#back_4_more"), + songChoose: new displayFunc("#song_choose"), + playButton: new displayFunc("#play_button"), + pauseButton: new displayFunc("#pause_button"), + ffwdButton: new displayFunc("#ffwd_button"), + songPlaying: new displayFunc("#song_playing"), + howGood: new displayFunc("#how_good"), + songRatingSlide: new displayFunc("#song_rating_slide"), + songReviewSliderInput: new displayFunc("input#song_review"), + songRatingDisplay: new displayFunc("#song_rating_display"), + rating: new displayFunc("#rating"), + songPlayAgain: new displayFunc("#song_playAgain"), + pizzaFinally: new displayFunc("#pizza_finally"), + sneakInside: new displayFunc("#sneak_inside"), + slipInTheBack: new displayFunc("#slip_in_the_back"), + outback: new displayFunc("#outback"), + pizzaWait: new displayFunc("#pizza_wait"), + ninjaSneak: new displayFunc("#ninja_sneak"), + YAY: new displayFunc("#YAY"), + pizzaDance: new displayFunc("#pizza_dance"), + pizzaEnd: new displayFunc("#pizza_end"), + pizzaEndButtons: new displayFunc("#pizza_end_buttons"), +} + +//tags to ascii graphics +export const ascii = { + water: new displayFunc("#waterBody"), + duck: new displayFunc("#duck"), + frog: new displayFunc("#frog"), + dog: new displayFunc("#dog"), + hog: new displayFunc("#hog"), + eggnog: new displayFunc("#eggnog"), + animalsBlock: new displayFunc(".ascii_animals_block") +}; + +//declares the object for easter egg features. +export const bonusLevel = {} + +//function to invert styles if easter egg is activated. +export const bonusEgg = function(){ + if (bonusLevel.enabled){ + const invert = "invert(100%)"; + page.border.style.background = "MidnightBlue"; + const selectorTexts = document.querySelectorAll(".bonus_egg"); + for (let i of selectorTexts) + i.style.filter = invert; + } +} + +// Listens for Enter to be pressed before continuing. +export const listen4Enter = function(){ + return new Promise(resolve => { + document.addEventListener("keyup", function enterInputListener(event){ + if (event.key === "Enter"){ + document.removeEventListener("keyup", enterInputListener); + resolve(); + } + }); + }) +} + +// guesses the local language from the browser. +export const getLanguage = () => { + if (navigator.languages && navigator.languages.length) { + return navigator.languages[0]; + } else { + return navigator.userLanguage || navigator.language || navigator.browserLanguage || 'en'; + } +} + +export const ranNumG = function(max){ + return Math.floor(Math.random() * max); +} + + +export const makeArray = function arrayFromMaxIndex(maxIndex, useKeysBool){ + if (useKeysBool){ + return [...Array(maxIndex).keys()].map(x => ++x); + } + else { + return [...Array(maxIndex).keys()]; + } +} + + +export const shuffle = function fisherYatesArrayShuffler(inputArr){ + let applyShuffler = () => { + let len = inputArr.length; + while (len){ + let ran = ranNumG(len--); + [inputArr[ran], inputArr[len]] = [inputArr[len], inputArr[ran]]; + } + return inputArr; + } + return applyShuffler(...inputArr); +} + + + +export const makeItRain = function(storminess) { // remember that the arg is a range 1-100. + const hiddenRaindrops = 20; + storminess = Math.floor(hiddenRaindrops*(storminess/100)); + const rainArray = shuffle(makeArray(storminess)); + const shuffledDrops = shuffle(makeArray(hiddenRaindrops, "Add 1")); + + let delayedRain = async () => { + try { + for (let rDropIteration = rainArray.length - 1; rDropIteration > -1; rDropIteration--){ + await sleep(1.77); + let rainSelector = document.querySelector(`#rain_${shuffledDrops[rainArray[rDropIteration]]}`); + rainSelector.style.display = "unset"; + rainSelector.style.opacity = 1; + } + } + catch (e){ + console.log(e); + } + } + delayedRain(); +} + + +export const checkColorInput = async function checkInputForColor(inputSelector, asciiObj, transFunc){ + //inputSelector = The selector ID for the text input box being used to choose a color. + //asciiObj = the ascii picture that the color is going to be applied to. + //transFunc = the function which fires after the check is complete. + + //moves helper text to after the input box. If the input box is in an inline class. + if (inputSelector.parentNode.classList.toString() === "inline"){ + inputSelector.parentNode.after(page.helper.tag); + inputSelector.parentNode.after(page.hm.tag); + inputSelector.parentNode.after(page.no.tag); + inputSelector.parentNode.after(page.yes.tag); + } + else{ + inputSelector.after(document.querySelector("#helper")); + } + await listen4Enter(); // wait for enter to be hit after inputing the color + page.helper.hide(); + + //blocks the input while it is being checked. + inputSelector.disabled = true; + await page.hm.show(); + await page.hm.hide(); + + // event listener verifies the input. If the transition on the input box occurred after colorizeAscii ran, then transitionend will detect it. + inputSelector.addEventListener("transitionend", transFunc, {once: true}); + + //Colors the Duck based on the input. + //saves details to object and local storage. + const colorizeAscii = (async () => { + inputSelector.style.backgroundColor = inputSelector.value; + asciiObj.color = inputSelector.value; + asciiObj.tag.style.color = asciiObj.color; + for (let i of asciiObj.typeSpans) + i.style.color = asciiObj.color; + + //a little easter egg in case anyone puts in the same color that is used for the background later on. + if (inputSelector.value === "paleTurquoise") + bonusLevel.enabled = true; + })(); + + const inputRegex = /#/gu; + // checks if the background color has a value. + if (!inputSelector.style.backgroundColor){ + await page.no.show(); + await page.no.hide(); + inputSelector.disabled = false; + checkColorInput(inputSelector, asciiObj); + } + //checks to ensure that no hex colors were used and that the duck is not colored white. + switch(true){ + case inputSelector.style.backgroundColor === "white": + case Boolean(inputSelector.value.match(inputRegex)):{ + await page.no.show(); + await page.no.hide(); + inputSelector.disabled = false; + checkColorInput(inputSelector, asciiObj); + break; + } + } +}