vendor: 4,231 bytes, lines 1-2
1/*! For license information please see 915.bundle.js.LICENSE.txt */ 2"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[915],{37915(t,e,n){n.d(e,{default:()=>m});var r=n(92341);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function s(n,r,o,i){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return a(u,"_invoke",function(n,r,o){var i,a,s,l=0,u=o||[],d=!1,f={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,n){return i=e,a=0,s=t,f.n=n,c}};function p(n,r){for(a=n,s=r,e=0;!d&&l&&!o&&e<u.length;e++){var o,i=u[e],p=f.p,m=i[2];n>3?(o=m===r)&&(s=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=p&&((o=n<2&&p<i[1])?(a=0,f.v=r,f.n=i[1]):p<m&&(o=n<3||i[0]>r||r>m)&&(i[4]=n,i[5]=r,f.n=m,a=0))}if(o||n>1)return c;throw d=!0,r}return function(o,u,m){if(l>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,m),a=u,s=m;(e=a<2?t:s)||!d;){i||(a?a<3?(a>1&&(f.n=-1),p(a,s)):f.n=s:f.v=s);try{if(l=2,i){if(a||(o="next"),e=i[o]){if(!(e=e.call(i,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,a<2&&(a=0)}else 1===a&&(e=i.return)&&e.call(i),a<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==c)break}catch(e){i=t,a=1,s=e}finally{l=1}}return{value:e,done:d}}}(n,o,i),!0),u}var c={};function l(){}function u(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(a(e={},r,function(){return this}),e),p=d.prototype=l.prototype=Object.create(f);function m(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,a(t,o,"GeneratorFunction")),t.prototype=Object.create(p),t}return u.prototype=d,a(p,"constructor",d),a(d,"constructor",u),u.displayName="GeneratorFunction",a(d,o,"GeneratorFunction"),a(p),a(p,o,"Generator"),a(p,r,function(){return this}),a(p,"toString",function(){return"[object Generator]"}),(i=function(){return{w:s,m}})()}function a(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}a=function(t,e,n,r){function i(e,n){a(t,e,function(t){return this._invoke(e,n,t)})}e?o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(i("next",0),i("throw",1),i("return",2))},a(t,e,n,r)}function s(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return c(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function l(t,e,n,r,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,o)}function u(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){l(i,r,o,a,s,"next",t)}function s(t){l(i,r,o,a,s,"throw",t)}a(void 0)})}}function d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,f(r.key),r)}}function f(t){var e=function(t,e){if("object"!=o(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}
2(t,"string");return"symbol"==o(e)?e:e+""}var p=function(){return t=function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$el=e,this.hourElements=this.$el.querySelectorAll(".location-dets__hours span.location-dets__days"),this.weekdays=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],this.todayBasic=new Date,this.desiredTimezone="America/New_York",this.options={timeZone:this.desiredTimezone},this.formattedDate=this.todayBasic.toLocaleString("en-US",this.options),this.today=new Date(this.formattedDate),this.currentDayFull=this.weekdays[this.today.getDay()].toLowerCase(),this.currentDay=this.weekdays[this.today.getDay()].toLowerCase().slice(0,3),this.hourElements.forEach(function(t){if(t.innerHTML.toLowerCase()===n.currentDay)return t.parentElement.innerHTML='<strong><span class="location-dets__days">'.concat(t.innerHTML,"</span><span>").concat(t.nextElementSibling.innerHTML,"</span></strong>")});var o=function(t){return 0==t?"12:00AM":t.toUpperCase()};this.scheduleHours=this.$el.querySelectorAll(".paragraph--type--schedule-hours"),this.dd=String(this.today.getDate()).padStart(2,"0"),this.mm=String(this.today.getMonth()+1).padStart(2,"0"),this.yyyy=this.today.getFullYear(),this.todayDate=this.yyyy+"-"+this.mm+"-"+this.dd,this.scheduleHours.forEach(function(t){var e=t.children[1].children[0].children[0].dateTime.slice(0,10);if(n.todayDate===e&&t.children[2].children[0].innerHTML&&t.children[3].children[0].innerHTML){var r=t.children[2].children[0].innerHTML,i=t.children[3].children[0].innerHTML;"0:00"===r&&"0:00"===i||"0"===r&&"0"===i?n.$el.querySelectorAll("strong")[1].children[1].innerHTML="CLOSED":n.$el.querySelectorAll("strong")[0].children[1].innerHTML="".concat(o(r)," - ").concat(o(i))}});var a=function(){return c.apply(this,arguments)}();function c(){return(c=u(i().m(function t(){var e,n,r,o;return i().w(function(t){for(;;)switch(t.n){case 0:return t.p=0,e=location.href.includes("localhost")||location.href.includes("amplifyapp")?"https://citymddev.prod.acquia-sites.com":location.origin,t.n=1,fetch("".concat(e,"/locations/resource/wait-time?_format=json"));case 1:return n=t.v,t.n=2,n.json();case 2:return r=t.v,t.a(2,r);case 3:t.p=3,o=t.v,console.error(o);case 4:return t.a(2)}},t,null,[[0,3]])}))).apply(this,arguments)}a.then(function(t){var e,o,i=document.getElementById("wait-time"),a=document.getElementById("open-status-header"),c=document.getElementById("open-status-details"),l=i.dataset.locationId,u=t[l],d=!1,f={timeZone:"America/New_York"},p=(new Date).toLocaleString("en-US",f),m=new Date(p);u<=5?u="< 5":u>=45&&(u="> 45"),n.fetchData().then(function(f){setTimeout(function(){var p,y=f.locations.filter(function(t){return t.location_id===l});if(void 0!==y){if(e=y[0],o=n.openStatus(e),d=o.isStillOpen)i.innerHTML='<span class="hide-mobile--no-override icon icon-people">Walk-in </span> <span class="text-capitalize-mobile">estimated</span> wait time: ',i.innerHTML+=void 0===u?"unknown":"<strong>".concat(u,' min</strong> <span href="#" class="live">LIVE</span>'),p='<strong class="success">Open</strong> until '.concat(o.closeTime);else{document.getElementsByClassName("location-overview__wait-time")[0].classList.add("hidden"),i.classList.add("hidden");var h=n.getNextOpen(e,m);p='<span class="alert">Closed</span>',h&&(p+=" Opens ".concat(h))}a.innerHTML=p,a.classList.add("has-content"),c.innerHTML=p,n.hasRatings();var v=document.getElementsByClassName("village-open-appointments");if(v.length>0&&!e.no_vmd){var g,b="",w=s(v);try{for(w.s();!(g=w.n()).done;){var S=g.value,L=JSON.stringify({rootElementId:"open-appointments-"+l,departmentId:l,departmentName:S.dataset.departmentName,imageUrl:S.dataset.imageUrl,waitTime:t[l],isOpen:d,departmentAddress:(0,r.o)(e.address),type:"citymd",departmentPhone:S.dataset.departmentPhone,directionsLink:S.dataset.directionsLink,locationDetailLink:window.location.origin+S.dataset.locationDetailLink,page:S.dataset.page,preRegisterLink:S.dataset.preRegisterLink});b+="\n VMDPublicScheduler.render(".concat(L,");\n")}}catch(t){w.e(t)}finally{w.f()}var T=document.createElement("script");T.textContent=b,document.body.appendChild(T)}}})})}),this.collapse(),this.fixedPositionElement()},e=[{key:"fetchData",value:(o=u(i().m(function t(){var e,n,r,o;return i().w(function(t){for(;;)switch(t.n){case 0:return t.p=0,e=location.href.includes("localhost")?"https://citymddev.prod.acquia-sites.com":location.origin,t.n=1,fetch("".concat(e,"/locations/resource?_format=json&details=1"),{method:"get",headers:{Accept:"application/json","Content-Type":"application/json","Access-Control-Allow-Origin":"http://localhost:3000"}});case 1:return n=t.v,t.n=2,n.json();case 2:return r=t.v,t.a(2,r);case 3:t.p=3,o=t.v,console.error(o);case 4:return t.a(2)}},t,null,[[0,3]])}
2)),function(){return o.apply(this,arguments)})},{key:"openStatus",value:function(t){var e=t[this.currentDayFull].split(" - ")[0],n=t[this.currentDayFull].split(" - ")[1],r=this.convertHours(e);if(void 0!==n){var o=this.getPreTime(n),i=this.convertHours(o);return{isStillOpen:this.checkTimeAgainstCurrentTime(r,i),openTime:e,closeTime:n}}return!1}},{key:"getNextOpen",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];if(n>7)return!1;var o=new Date(e),i=r[o.getDay()].toLowerCase(),a="",s={timeZone:"America/New_York"},c=(new Date).toLocaleString("en-US",s);if(r[new Date(c).getDay()].toLowerCase()==i){var l=t[i].split(" - ")[0],u=this.convertHours(l),d=this.convertHours("00:00AM");if(!this.checkTimeAgainstCurrentTime(d,u))return o.setDate(e.getDate()+1),this.getNextOpen(t,o,++n)}return t[i]&&"CLOSED"!==t[i]&&(a=t[i].split(" - ")[0]),a?i.charAt(0).toUpperCase()+i.slice(1,3)+" "+a:(o.setDate(e.getDate()+1),this.getNextOpen(t,o,++n))}},{key:"hasRatings",value:function(){setTimeout(function(){var t=document.getElementById("location-overview__reviews");t.querySelector(".ds-summary").querySelectorAll("div").length<1&&t.remove()},1e3)}},{key:"convertHours",value:function(t){if(0===t)return"00:00";if(t.toLowerCase().includes("midnight"))return"24:00";if(t.toLowerCase().includes("noon"))return"12:00";try{var e=t.split(":")[0],n=t.split(":")[1].slice(0,-2),r=t.slice(-2);return"12"===e&&(e="00"),"pm"===r.toLowerCase()&&(e=parseInt(e,10)+12),e<10&&(e="0"+e),"".concat(e,":").concat(n)}catch(e){return t}}},{key:"getPreTime",value:function(t){"Midnight"==t?t="12:00AM":"noon"==t&&(t="12:00PM");var e=t.match(/(\d+):(\d+)([APM]+)$/),n="";if(e){var r=parseInt(e[1],10),o=parseInt(e[2],10),i=e[3],a=60*r+o;12===r&&(i="AM"==i?"PM":"AM"),(a-=15)<0&&(a+=1440),r=Math.floor(a/60),o=a%60,n="".concat(r,":").concat(o.toString().padStart(2,"0")).concat(i)}return n}},{key:"checkTimeAgainstCurrentTime",value:function(t,e){try{var n=this.today.getHours(),r=this.today.getMinutes(),o=+t.split(":")[0],i=+t.split(":")[1],a=+e.split(":")[0],s=+e.split(":")[1];return(n>o||n===o&&r>=i)&&(n<a||n===a&&r<=s)}catch(t){return console.log(t),!1}}},{key:"parseAddress",value:function(t){var e=t.split("\n").filter(function(t){return""!==t.trim()}),n=e[0].replace(/\r/g,""),r=e[1].split(","),o=r[0].trim(),i=r[1].trim().split(" ");return{address1:n,address2:"",city:o,state:i[0],zip:i[1]}}},{key:"collapse",value:function(){var t=document.querySelectorAll(".collapse");Array.from(t).forEach(function(t){var e=t.querySelector(".collapse__trigger");t.classList.add("collapse--collapsed"),e.addEventListener("click",function(e){e.preventDefault(),t.classList.toggle("collapse--collapsed")})})}},{key:"fixedPositionElement",value:function(){var t=document.getElementById("book-visit"),e=document.getElementById("book-visit-inner"),n=document.getElementById("maincontent");window.addEventListener("scroll",function(){if(t&&e&&n){var r=e.offsetHeight,o=t.getBoundingClientRect().top,i=n.getBoundingClientRect().bottom;o<20?e.classList.add("is-fixed"):(e.classList.remove("is-fixed"),e.style.bottom="auto"),i<r?(t.classList.add("align-bottom"),e.classList.add("align-bottom")):(t.classList.remove("align-bottom"),e.classList.remove("align-bottom"))}else t=document.getElementById("book-visit"),e=document.getElementById("book-visit-inner"),n=document.getElementById("maincontent")})}}],e&&d(t.prototype,e),n&&d(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,o}();const m=p},92341(t,e,n){function r(t){var e=t.split("\n").filter(function(t){return""!==t.trim()}),n=e[0]?e[0].replace(/\r/g,""):"",r=t.match(/(.+?)\s*,?\s*([A-Za-z]+)\s+(\d{5})/),o="",i="",a="";return r?(o=r[1].trim(),i=r[2].trim(),a=r[3]):console.log("Address format not recognized"),{address1:n,address2:"",city:o,state:i,zip:a}}n.d(e,{o:()=>r})}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.