PageSourceSearch

https://culturenow.org/_next/static/chunks/pages/content/new-tour-b7d91c98ec79d37c.js

js culturenow.org collected 2026-10-02 07:44:42 UTC 54,746 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2808,2519,6042,1691],{93162:function(e,t,n){var o,i,r;i=[],o=function(){"use strict";function t(e,t){return"undefined"==typeof t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}function o(e,t,n){var o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){s(o.response,t,n)},o.onerror=function(){console.error("could not download file")},o.send()}function i(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function r(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(o){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var l="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n.g&&n.g.global===n.g?n.g:void 0,a=l.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),s=l.saveAs||("object"!=typeof window||window!==l?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(e,t,n){var a=l.URL||l.webkitURL,s=document.createElement("a");t=t||e.name||"download",s.download=t,s.rel="noopener","string"==typeof e?(s.href=e,s.origin===location.origin?r(s):i(s.href)?o(e,t,n):r(s,s.target="_blank")):(s.href=a.createObjectURL(e),setTimeout((function(){a.revokeObjectURL(s.href)}),4e4),setTimeout((function(){r(s)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,l){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,l),n);else if(i(e))o(e,n,l);else{var a=document.createElement("a");a.href=e,a.target="_blank",setTimeout((function(){r(a)}))}}:function(e,t,n,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof e)return o(e,t,n);var r="application/octet-stream"===e.type,s=/constructor/i.test(l.HTMLElement)||l.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||r&&s||a)&&"undefined"!=typeof FileReader){var c=new FileReader;c.onloadend=function(){var e=c.result;e=u?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=e:location=e,i=null},c.readAsDataURL(e)}else{var d=l.URL||l.webkitURL,v=d.createObjectURL(e);i?i.location=v:location.href=v,i=null,setTimeout((function(){d.revokeObjectURL(v)}),4e4)}});l.saveAs=s.saveAs=s,e.exports=s},void 0===(r="function"===typeof o?o.apply(t,i):o)||(e.exports=r)},12708:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/content/new-tour",function(){return n(87365)}])},80742:function(e,t,n){"use strict";var o=n(85893),i=n(9008),r=n(64199);t.Z=function(e){var t,n,l,a,s,u,c,d,v=e.metaData,p=e.canonical,f=e.customTitle,m="".concat(f||(null===v||void 0===v?void 0:v.name)||"Default Name"," - CultureNow - Museum Without Walls"),h=(null===v||void 0===v||null===(t=v.categories)||void 0===t?void 0:t.length)?v.categories.map((function(e){return"".concat((null===e||void 0===e?void 0:e.category_name)||"").concat((null===e||void 0===e?void 0:e.subcategory_name)?", ".concat(e.subcategory_name):"")})).join(", "):"",g=(null===v||void 0===v?void 0:v.tags)||(null===v||void 0===v?void 0:v.tag)||[],x=g.length?g.map((function(e){return String(e.tag_name||"")})).join(", "):"",y=(null===v||void 0===v||null===(n=v.meta)||void 0===n?void 0:n.description)||((null===v||void 0===v?void 0:v.description)?(0,r.removeHtmlAndSpecialChars)(v.description):null);return(0,o.jsxs)(i.default,{children:[(0,o.jsx)("title",{children:m}),y&&(0,o.jsx)("meta",{name:"description",content:y}),(null===v||void 0===v?void 0:v.name)&&(0,o.jsx)("meta",{name:"author",content:v.name}),(null===v||void 0===v||null===(l=v.meta)||void 0===l?void 0:l.keywords)&&(0,o.jsx)("meta",{name:"keywords",content:v.meta.keywords}),(0,o.jsx)("link",{rel:"canonical",href:p}),(null===v||void 0===v||null===(a=v.meta)||void 0===a?void 0:a.og_title)&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("meta",{property:"og:title",content:v.meta.og_title}),(0,o.jsx)("meta",{property:"twitter:title",content:v.meta.og_title})]}),y&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("meta",{property:"og:description",content:y}),(0,o.jsx)("meta",{property:"twitter:description",content:y})]}),(null===v||void 0===v||null===(s=v.image)||void 0===s?void 0:s.url)&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("meta",{property:"og:image",content:null===(u=v.image.url)||void 0===u?void 0:u.replace("original.","web.")}),(0,o.jsx)("meta",{property:"twitter:image",content:null===(c=v.image.url)||void 0===c?void 0:c.replace("original.","web.")})]}),(null===v||void 0===v||null===(d=v.meta)||void 0===d?void 0:d.og_type)&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("meta",{property:"og:type",content:v.meta.og_type}),(0,o.jsx)("meta",{property:"twitter:type",content:v.meta.og_type})]}),(0,o.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(null===v||void 0===v?void 0:v.modified_date)&&(0,o.jsx)("meta",{name:"lastModified",content:function(e){if(!e)return null;var t="number"===typeof e?1e3*e:Date.parse(e);return t?new Date(t).toISOString().split("T")[0]:null}(v.modified_date)}),(0,o.jsx)("meta",{property:"og:url",content:p}),(0,o.jsx)("meta",{name:"robots",content:"index,follow"}),h&&(0,o.jsx)("meta",{name:"category",content:h}),x&&(0,o.jsx)("meta",{name:"tags",content:x})]})}},99547:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var o=n(85893),i=n(67294),r=n(16687),l=n(97532),a=n(75085),s=n(21407),u=n(64199),c=n(76104),d=n.n(c);function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);
1"function"===typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){p(e,t,n[t])}))}return e}function m(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e){var t=e.people,n=void 0===t?[]:t,c=e.setPeople,v=e.requiredFields,p=void 0===v?[]:v,h=e.entityType,g=void 0===h?"site":h,x=e.label,y=void 0===x?"People / Organizations / Publications":x,b=e.tooltipText,w=e.showRoleDropdown,j=void 0===w||w,_=e.roleType,S=e.roleTooltipText,N=(0,i.useState)("person"),k=N[0],O=N[1],A=_||"".concat(g,"_person_role"),C=(0,u.useDragulaSortable)(n||[],(function(e){c(e)})),E=function(e,t){if(t){var o=m(n||[]),i="string"===typeof t?{person_position:t}:{role_id:t.id,role_name:t.name};o[e]&&(o[e]=f({},o[e],i),c(o))}};return(0,o.jsxs)("div",{children:[(0,o.jsxs)("div",{className:"d-flex justify-content-between gap-1 align-items-center",children:[(0,o.jsx)(a.__,{tooltipText:b,className:"align-items-center",required:p.includes("people"),children:y}),(0,o.jsx)(s.uR,{onClick:function(){var e=((null===n||void 0===n?void 0:n.length)||0)+1,t={date_id:null,id:"temp.".concat(d()()),person_first_name:"",person_last_name:"",person_id:null,person_image:"",person_name:"",role_id:null,role_name:"",is_participant:!1,sort:e,person_type:k};c(m(n||[]).concat([t]))}})]}),(0,o.jsxs)("div",{className:"d-flex flex-md-row flex-wrap gap-md-2 flex-column gap-0",children:[(0,o.jsx)(a.UP,{type:"radio",name:"people",value:"person",checked:"person"===k,onChange:function(){return O("person")},label:"Person"}),(0,o.jsx)(a.UP,{type:"radio",name:"people",value:"publication",checked:"publication"===k,onChange:function(){return O("publication")},label:"Publication"}),(0,o.jsx)(a.UP,{type:"radio",name:"people",value:"organization",checked:"organization"===k,onChange:function(){return O("organization")},label:"Organization"})]}),(0,o.jsx)("div",{ref:C,className:"dragula-container",children:n&&n.map((function(e,t){return(0,o.jsxs)("div",{id:e.id,className:"dragula-item mt-2 gap-1 d-flex",children:[(0,o.jsxs)("div",{className:"d-flex flex-column w-100 gap-1",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)(a.__,{required:p.includes("person_name"),children:"Name"}),(0,o.jsx)(r.default,{value:e,person_type:e.person_type||k,onChange:function(e){return function(e,t){if(t){var o=m(n||[]);o[e]&&(o[e]=f({},o[e],{person_id:t.id,person_name:t.name,person_first_name:t.first_name||"",person_last_name:t.last_name||"",person_image:t.image_url||"",is_participant:t.is_participant||!1,person_type:t.type||k,affiliations:t.affiliations||null}),c(o))}}(t,e)}})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)(a.__,{required:p.includes("person_role"),tooltip:S,tooltipText:S,children:"".concat((0,u.capitalize)(e.person_type||k)," Role")}),j?(0,o.jsx)(l.default,{type:A,value:{id:e.role_id,name:e.role_name},onChange:function(e){return E(t,e)}}):(0,o.jsx)(a.UP,{type:"text",value:e.person_position,onChange:function(e){return E(t,e.target.value)}})]})]}),(0,o.jsx)(s.PZ,{style:{marginTop:"25px"},onClick:function(){return function(e){var t=(n||[]).filter((function(t,n){return n!==e})).map((function(e,t){return f({},e,{sort:t+1})}));c(t)}(t)}})]},"".concat(k,"-").concat(e.id,"-").concat(t))}))})]})}},46463:function(e,t,n){"use strict";var o=n(85893),i=n(67294),r=n(6212),l=n(99058),a=n(10961),s=n(64199),u=n(41248);n(83817);function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);
1"function"===typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){d(e,t,n[t])}))}return e}function p(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}t.Z=function(e){var t=e.documents,n=e.setDocuments,c=e.containerRef,d=(0,u.I0)(),f=(0,i.useState)(!1),m=f[0],h=f[1],g=(0,i.useState)(!1),x=g[0],y=g[1],b=(0,i.useState)(0),w=b[0],j=b[1],_=(0,i.useState)("default"),S=_[0],N=_[1],k=(0,u.v9)((function(e){return e.image})),O=function(e){(null===t||void 0===t?void 0:t[e])&&(j(e),d({type:"image",payload:t[e]}))};return(0,i.useEffect)((function(){var e=null===t||void 0===t?void 0:t.findIndex((function(e){return e.id===(null===k||void 0===k?void 0:k.id)}));e>-1&&j(e)}),[k]),(0,i.useEffect)((function(){O(w)}),[w]),(0,o.jsxs)("div",{children:[(0,o.jsxs)("div",{ref:c,id:"document-container",className:"row g-3 dragula-container",children:[t&&t.length>0&&t.map((function(e,i){var r;return(0,o.jsx)("div",{className:"col-12 col-sm-6 col-md-4 col-lg-3 dragula-item",id:"".concat((null===e||void 0===e?void 0:e.id)||i),"data-id":(null===e||void 0===e?void 0:e.id)||i,children:(0,o.jsxs)("div",{className:"card h-100 d-flex flex-column",onClick:function(){return O(i)},children:[(0,o.jsx)("button",{className:"btn-close position-absolute top-0 end-0 m-2",onClick:function(){return function(e){var o=p(t);o.splice(e,1),n(o)}(i)}}),(0,o.jsx)("img",{src:"pdf"===e.ext?(0,s.getImageUrl)(e.url,"thumb"):null===(r=e.url)||void 0===r?void 0:r.replace("original","thumb"),alt:"Image ".concat(i),className:"card-img-top",style:{width:"100%",objectFit:"cover",cursor:"pointer"},onClick:function(){return y(!0)}}),(0,o.jsxs)("div",{className:"card-body d-flex flex-column",style:{backgroundColor:"#ededed",padding:"10px",height:"80px"},children:[(0,o.jsx)("p",{className:"text-black fw-bold mb-0",style:{fontSize:"14px",maxHeight:"20px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:e.year?e.year+" - "+e.caption:e.caption||"No Caption"}),(0,o.jsx)("p",{className:"mb-0 ",style:{fontSize:"12px",maxHeight:"40px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:e.description||"No Description"})]})]})},"key-".concat((null===e||void 0===e?void 0:e.id)||i))})),(0,o.jsxs)("div",{className:"col-12 col-sm-6 col-md-4 col-lg-3",children:[(0,o.jsxs)("div",{className:"card d-flex align-items-center justify-content-center thumb",style:{cursor:"pointer",background:"#D6D6D6"},onClick:function(){return h(!0)},children:[(0,o.jsx)("div",{className:"fs-1 text-secondary",children:"+"}),(0,o.jsx)("p",{className:"fw-bold",style:{color:"#a82829"},children:"Add a Drawing"})]}),(0,o.jsxs)("div",{className:"card-body bg-light cnow-line d-flex flex-column p-2 position-relative",style:{height:"80px"},children:[(0,o.jsx)("p",{className:"text-black fw-bold text-truncate mb-2",style:{fontSize:"14px",maxHeight:"20px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:"Drawing Date - Drawing Caption"}),(0,o.jsx)("p",{className:"text-truncate",style:{fontSize:"12px",maxHeight:"30px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:"Drawing Description"})]})]})]}),(0,o.jsx)(r.Z,{show:m,onHide:function(){return h(!1)},size:"xl",children:(0,o.jsx)(r.Z.Body,{children:(0,o.jsx)(l.Z,{onSave:function(e){var o=e.map((function(e){return v({},e,{image_type:"document"})})),i=p(null!==t&&void 0!==t?t:[]).concat(p(o));n(i),h(!1);var r=i.length-1;d({type:"image",payload:v({},i[r],{index:r})})},onHide:function(){return h(!1)},setShowImageViewerModal:y})})}),(0,o.jsx)(r.Z,{show:x,onHide:function(){return h(!1)},size:"xl",children:(0,o.jsx)(r.Z.Body,{children:(0,o.jsx)(a.Z,{images:t,onUpdate:function(e){n(e)},selectedIndex:w,onChangeSelectedIndex:function(e){return j(e)},viewMode:S,onChangeViewMode:function(e){return N(e)},onSave:function(){return y(!1)},onHide:function(){return y(!1)}})})})]})}},54301:function(e,t,n){"use strict";var o=n(34051),i=n.n(o),r=n(85893),l=n(67294),a=n(6212),s=n(35005),u=(n(78475),n(63966)),c=n(44519),d=n(23947),v=n(75085);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function f(e,t,n,o,i,r,l){try{var a=e[r](l),s=a.value}catch(u){return void n(u)}a.done?t(s):Promise.resolve(s).then(o,i)}function m(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}t.Z=function(e){var t=e.name,n=e.currentValue,o=e.updateValue,p=e.query,h=e.tooltipText,g=e.availableOptions,x=void 0===g?null:g,y=e.onHandleChange,b=e.required,w=void 0!==b&&b,j=e.tooltip,_=void 0!==j&&j,S=(0,l.useState)([]),N=S[0],k=S[1],O=(0,l.useState)(!1),A=O[0],C=O[1],E=(0,l.useState)(n||""),I=E[0],P=E[1],M=(0,l.useState)(!1),T=M[0],Z=M[1],D=(0,d.Z)(I,300),F=(0,l.useRef)(null);(0,l.useEffect)((function(){P(n||"")}),[n]),(0,l.useEffect)((function(){x&&k(m(x))}),[x]),(0,l.useEffect)((function(){if(x)k(m(x));else{var e=function(){var e,t=(e=i().mark((function e(){var t,n,o,r,l,a,s,d,v;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(D.trim()){e.next=3;break}return k([]),e.abrupt("return");case 3:if(e.prev=3,!p.includes("search-params-podcast")){e.next=16;break}return t=!0,n={bool:{must:[{match:{deleted:"false"}},{match:{created_via:"ADMIN"}}]}},D&&(t=!1,n.bool.must.push({multi_match:{query:D,fields:["name^3","type","credits.person_name^2","tags.tag_name","related_item.name"],fuzziness:2,prefix_length:2}})),o={query:n},t&&(o.sort=[{modified_date:{order:"desc"}}]),e.next=12,(0,c.ApiCall)("post","/search/podcast/0/50",o);case 12:r=e.sent,k(r.hits.hits.map((function(e){return e._source}))),e.next=32;break;
1case 16:if(!p.includes("search-params-person")){e.next=28;break}return l=!0,a={bool:{must:[{match:{deleted:"false"}},{match:{created_via:"ADMIN"}}]}},D&&(l=!1,a.bool.must.push({multi_match:{query:D,fields:["name^3","type","credits.person_name^2","tags.tag_name","related_item.name"],fuzziness:2,prefix_length:2}})),s={query:a},l&&(s.sort=[{modified_date:{order:"desc"}}]),e.next=24,(0,c.ApiCall)("post","/search/person/0/50",s);case 24:d=e.sent,k(d.hits.hits.map((function(e){return e._source}))),e.next=32;break;case 28:return e.next=30,(0,u.g)(p,D);case 30:v=e.sent,k(v);case 32:e.next=38;break;case 34:e.prev=34,e.t0=e.catch(3),console.error("Error fetching options:",e.t0),k([]);case 38:case"end":return e.stop()}}),e,null,[[3,34]])})),function(){var t=this,n=arguments;return new Promise((function(o,i){var r=e.apply(t,n);function l(e){f(r,o,i,l,a,"next",e)}function a(e){f(r,o,i,l,a,"throw",e)}l(void 0)}))});return function(){return t.apply(this,arguments)}}();D?e():k([])}}),[D]),(0,l.useEffect)((function(){N.length||o(null),!D.length&&x&&o(null)}),[N,D]);var R=function(e){F.current&&!F.current.contains(e.target)&&C(!1)};return(0,l.useEffect)((function(){return document.addEventListener("click",R),function(){document.removeEventListener("click",R)}}),[]),(0,r.jsxs)("div",{className:"w-100",children:[(0,r.jsx)(v.__,{tooltip:_,tooltipText:h,required:w,children:t}),(0,r.jsxs)("div",{className:"dropdown",style:{position:"relative",width:"100%"},children:[(0,r.jsxs)("div",{className:"position-relative",ref:F,children:[(0,r.jsx)("input",{type:"text",value:I||"",onChange:function(e){P(e.target.value),y&&y(e.target.value),C(!0)},onFocus:function(){return C(!0)},placeholder:"Search options",className:"cnow-input pe-5"}),(0,r.jsx)("span",{className:"position-absolute end-0 top-0 bottom-0 d-flex text-muted align-items-center me-3",children:(0,r.jsx)("i",{className:"fa fa-chevron-down",onClick:function(){return C((function(e){return!e}))},style:{cursor:"pointer",transition:"transform 0.1s",transform:A?"rotate(180deg)":"rotate(0deg)"},"aria-hidden":"true"})})]}),A&&(0,r.jsx)("ul",{className:"force-left","aria-labelledby":"dropdownMenuButton",style:{width:"100%",marginTop:"0px",borderRadius:"0px",maxHeight:"200px",border:"1px solid #8d8d8d",overflowBlock:"auto",borderTop:"none",position:"absolute",top:"100%",left:0,zIndex:999,display:A?"block":"none",fontSize:"14px"},children:0===N.length?(0,r.jsx)("li",{children:(0,r.jsx)("button",{className:"dropdown-item cursor-pointer text-wrap",onClick:function(){Z(!0)},children:D.length>0?"Don't see what you're looking for?":""})}):N.map((function(e,t){return(0,r.jsx)("li",{children:(0,r.jsx)("button",{className:"dropdown-item text-wrap",onClick:function(){return function(e){o(e),P(e.name),C(!1)}(e)},children:e.name})},"option-".concat(e.name,"-").concat(t))}))})]}),(0,r.jsxs)(a.Z,{show:T,onHide:function(){return Z(!1)},children:[(0,r.jsx)(a.Z.Header,{closeButton:!0,children:(0,r.jsxs)(a.Z.Title,{children:["Add a new ",t]})}),(0,r.jsx)(a.Z.Body,{children:(0,r.jsx)("label",{children:D})}),(0,r.jsxs)(a.Z.Footer,{children:[(0,r.jsx)(s.Z,{variant:"secondary",onClick:function(){return Z(!1)},children:"Back"}),(0,r.jsx)(s.Z,{variant:"primary",onClick:function(){o({name:D}),Z(!1)},children:"Add"})]})]})]})}},56730:function(e,t,n){"use strict";var o=n(85893),i=n(67294),r=n(6212),l=n(99058),a=n(10961),s=n(64199),u=n(41248);n(83817);function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){d(e,t,n[t])}))}return e}function p(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}t.Z=function(e){var t=e.images,n=e.setImages,c=e.containerRef,d=e.isImageGrid,f=void 0===d||d,m=(0,i.useState)(!1),h=m[0],g=m[1],x=(0,u.I0)(),y=(0,i.useState)(!1),b=y[0],w=y[1],j=(0,i.useState)(0),_=j[0],S=j[1],N=(0,i.useState)("default"),k=N[0],O=N[1],A=function(e){(null===t||void 0===t?void 0:t[e])&&(S(e),x({type:"image",payload:v({},t[e],{index:e})}))},C=(0,u.v9)((function(e){return e.image}));return(0,i.useEffect)((function(){var e=null===t||void 0===t?void 0:t.findIndex((function(e){return(null===e||void 0===e?void 0:e.id)===(null===C||void 0===C?void 0:C.id)}));e>-1&&S(e)}),[C]),(0,i.useEffect)((function(){A(_)}),[_]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{ref:c,id:"image-container",className:"row g-3 dragula-container",children:[t&&t.length>0&&t.map((function(e,i){var r;return(0,o.jsx)("div",{className:"col-12 col-sm-6 col-md-4 col-lg-3 dragula-item",id:"".concat((null===e||void 0===e?void 0:e.id)||i),"data-id":(null===e||void 0===e?void 0:e.id)||i,children:(0,o.jsxs)("div",{className:"card h-100 d-flex flex-column",onClick:function(){return A(i)},children:[(0,o.jsx)("button",{className:"btn-close position-absolute top-0 end-0 m-2",onClick:function(){return function(e){var o=p(t);o.splice(e,1),n(o)}(i)}}),(0,o.jsx)("img",{src:"pdf"===(null===e||void 0===e?void 0:e.ext)?(0,s.getImageUrl)(null===e||void 0===e?void 0:e.url,"thumb"):null===e||void 0===e||null===(r=e.url)||void 0===r?void 0:r.replace("original","thumb"),alt:"Image ".concat(i),style:{objectFit:"contain",width:"100%",aspectRatio:"1.25/1",cursor:"pointer"},onClick:function(){return w(!0)}}),(0,o.jsxs)("div",{className:"card-body d-flex flex-column",style:{backgroundColor:"#ededed",padding:"10px",height:"80px"},children:[(0,o.jsx)("p",{className:"text-black fw-bold mb-0",style:{fontSize:"14px",maxHeight:"20px",overflow:"hidden",
1whiteSpace:"nowrap",textOverflow:"ellipsis"},children:e.year?e.year+(e.caption?" - "+e.caption:""):e.caption||"No Caption"}),(0,o.jsx)("p",{className:"mb-0 ",style:{fontSize:"12px",maxHeight:"40px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:(null===e||void 0===e?void 0:e.year)||(null===e||void 0===e?void 0:e.caption)||(null===e||void 0===e?void 0:e.description)?(null===e||void 0===e?void 0:e.description)||"":"No Description"})]})]})},"img-".concat((null===e||void 0===e?void 0:e.id)||i))})),(0,o.jsxs)("div",{className:"col-12 col-sm-6 col-md-4 col-lg-3",children:[(0,o.jsxs)("div",{className:"card d-flex align-items-center justify-content-center thumb",style:{cursor:"pointer",background:"#D6D6D6"},onClick:function(){return g(!0)},children:[(0,o.jsx)("div",{className:"fs-1 text-secondary",children:"+"}),(0,o.jsx)("p",{className:"fw-bold",style:{color:"#a82829"},children:"Add an Image"})]}),(0,o.jsxs)("div",{className:"card-body bg-light cnow-line d-flex flex-column p-2 position-relative",style:{height:"80px"},children:[(0,o.jsx)("p",{className:"text-black fw-bold text-truncate mb-2",style:{fontSize:"14px",maxHeight:"20px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:"Image Date - Image Caption"}),(0,o.jsx)("p",{className:"text-truncate",style:{fontSize:"12px",maxHeight:"30px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:"Image Description"})]})]})]}),(0,o.jsx)(r.Z,{show:h,onHide:function(){return g(!1)},size:"xl",centered:!0,children:(0,o.jsx)(r.Z.Body,{children:(0,o.jsx)(l.Z,{onSave:function(e){var o=e.map((function(e){return v({},e,{image_type:"image"})})),i=p(null!==t&&void 0!==t?t:[]).concat(p(o));n(i),g(!1);var r=i.length-1;x({type:"image",payload:v({},i[r],{index:r})})},isImageGrid:f,onHide:function(){return g(!1)},setShowImageViewerModal:w})})}),(0,o.jsx)(r.Z,{show:b,onHide:function(){return g(!1)},centered:!0,size:"xl",children:(0,o.jsx)(r.Z.Body,{children:(0,o.jsx)(a.Z,{images:t,onUpdate:function(e){return n(e)},selectedIndex:_,onChangeSelectedIndex:function(e){return S(e)},viewMode:k,onChangeViewMode:function(e){return O(e)},onSave:function(){return w(!1)},onHide:function(){return w(!1)}})})})]})}},21691:function(e,t,n){"use strict";n.d(t,{Aq:function(){return r.Z},Ec:function(){return o.Z},Gd:function(){return i.Z},S3:function(){return l.Z},nC:function(){return a.Z}});var o=n(56730),i=n(46463),r=(n(99058),n(10961),n(22919)),l=n(54371),a=(n(99),n(88791));n(99547),n(58777),n(6506),n(54301),n(27761)},82519:function(e,t,n){"use strict";n.r(t);var o=n(85893),i=n(64494),r=n(67294),l=n(6413),a=n(47009),s=n(41248),u=n(64199);function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){c(e,t,n[t])}))}return e}var v=function(e){var t;return(null===(t=window.google)||void 0===t?void 0:t.maps)?Promise.resolve(window.google.maps):Promise.resolve().then(n.bind(n,39626)).then((function(t){var n=t.Loader,o=((null===e||void 0===e?void 0:e.libraries)||"geometry").split(",").map((function(e){return e.trim()})).filter(Boolean);return new n({apiKey:null===e||void 0===e?void 0:e.key,libraries:o}).load().then((function(){return window.google.maps}))}))};t.default=function(e){var t,n,c,p,f,m,h,g,x,y,b,w,j,_,S,N,k,O,A,C,E,I,P,M,T,Z,D,F=e.tour,R=e.color,L=e.className,z=e.hideSites,H=void 0!==z&&z,U=e.historicMap,B=e.style,q=e.showEdit,V=void 0!==q&&q,W=e.setTourStops,G=void 0===W?function(){}:W,K=e.showLocation,X=void 0!==K&&K,J=e.layoutKey,Y=void 0===J?"default":J,$=function(){window.location.href="/historic-map/tour/".concat(F.id)},Q=(0,r.useRef)(),ee=(0,r.useRef)(null),te=(0,r.useRef)([]),ne=(0,r.useRef)(null),oe=(0,s.I0)(),ie=(0,r.useState)(1),re=ie[0],le=ie[1],ae=(0,r.useMemo)((function(){return"tour-map-".concat((null===F||void 0===F?void 0:F.id)||"new","-").concat(Y)}),[null===F||void 0===F?void 0:F.id,Y]),se=(0,r.useMemo)((function(){return{lat:40.73061,lng:-73.935242}}),[]),ue=(0,r.useMemo)((function(){var e=[],t=new Set,n=function(n){var o=(null===n||void 0===n?void 0:n.location)||n,i=null!=(null===o||void 0===o?void 0:o.lat)?Number(o.lat):NaN,r=null!=(null===o||void 0===o?void 0:o.lng)?Number(o.lng):NaN;if(Number.isFinite(i)&&Number.isFinite(r)){var l="".concat(i.toFixed(6),",").concat(r.toFixed(6));t.has(l)||(t.add(l),e.push({lat:i,lng:r}))}};
1return((null===F||void 0===F?void 0:F.stops)||[]).forEach((function(e){var t;n((null===e||void 0===e||null===(t=e.location)||void 0===t?void 0:t.location)||(null===e||void 0===e?void 0:e.location)),H||((null===e||void 0===e?void 0:e.sites)||[]).forEach((function(e){var t;n((null===e||void 0===e||null===(t=e.location)||void 0===t?void 0:t.location)||(null===e||void 0===e?void 0:e.location)||(null===e||void 0===e?void 0:e._geoloc))}))})),e}),[null===F||void 0===F?void 0:F.stops,H]),ce=(0,r.useMemo)((function(){return JSON.stringify(ue)}),[ue]),de={path:"#A82829"===R?"M 0,-0.1 0,0.1":"M -0.5,0 0.5,0",strokeOpacity:1,strokeWeight:"#A82829"===R?5:3,scale:4.5},ve=(0,r.useRef)(ue);ve.current=ue;var pe=(0,r.useRef)(null),fe=function(e){var t,n,o,i,r=(null===(t=Q.current)||void 0===t?void 0:t.map)||(null===e||void 0===e?void 0:e.map),l=(null===(n=Q.current)||void 0===n?void 0:n.maps)||(null===e||void 0===e?void 0:e.maps)||(null===(o=window.google)||void 0===o?void 0:o.maps);if(r&&l){var a=function(){var e,t=ve.current||[];if(t.length){if(l.event&&l.event.trigger(r,"resize"),1===t.length)return r.setCenter(t[0]),void r.setZoom(16);var n=new l.LatLngBounds;t.forEach((function(e){return n.extend(e)})),r.fitBounds(n,64);var o=null===(e=r.getZoom)||void 0===e?void 0:e.call(r);"number"===typeof o&&o>16&&r.setZoom(16)}};a(),ne.current&&clearTimeout(ne.current),ne.current=setTimeout((function(){a(),ne.current=setTimeout(a,350)}),150),(null===(i=l.event)||void 0===i?void 0:i.addListenerOnce)&&l.event.addListenerOnce(r,"idle",a)}},me=function(e){var t;if(e&&(null===(t=Q.current)||void 0===t?void 0:t.map))if(ee.current&&(ee.current.setMap(null),ee.current=null),te.current.length>0&&(te.current.forEach((function(e){e.setMap(null)})),te.current=[]),F.route&&F.route.length>1&&!V){JSON.parse(F.route).forEach((function(t){var n=e.maps.geometry.encoding.decodePath(t),o=new e.maps.Polyline({path:n,strokeColor:R,icons:[{icon:de,offset:"0",repeat:"#A82829"===R?"10px":"5px"}],strokeWeight:5,strokeOpacity:0});o.setMap(Q.current.map),te.current.push(o)})),fe(e)}else{var n=new e.maps.DirectionsRenderer({map:Q.current.map,preserveViewport:!0,polylineOptions:{strokeColor:R,icons:[{icon:de,offset:"0",repeat:"5px"}],strokeWeight:5,strokeOpacity:0},suppressInfoWindows:!1,suppressMarkers:!0,suppressBicyclingLayer:!0});ee.current=n,function(e,t,n){var o=function(e){var t,n=(null===e||void 0===e||null===(t=e.location)||void 0===t?void 0:t.location)||(null===e||void 0===e?void 0:e.location),o=null!=(null===n||void 0===n?void 0:n.lat)?Number(n.lat):NaN,i=null!=(null===n||void 0===n?void 0:n.lng)?Number(n.lng):NaN;return Number.isFinite(o)&&Number.isFinite(i)?{lat:o,lng:i}:null},i=(F.stops||[]).map((function(e){return{stop:e,latLng:o(e)}})).filter((function(e){return e.latLng}));if(i.length<2)fe(n);else{var r=[];i.forEach((function(e,t){t>0&&t<i.length-1&&r.push({location:e.latLng,stopover:!0})}));var l={origin:i[0].latLng,destination:i[i.length-1].latLng,waypoints:r,optimizeWaypoints:!0,travelMode:(null===F||void 0===F?void 0:F.type)||"WALKING"};e.route(l,(function(e,o){if("OK"===o){var i=0,r=[];t.setDirections(e),fe(n),e.routes[0].legs.forEach((function(e){var t;i+=e.duration.value,(null===(t=e.steps)||void 0===t?void 0:t.length)>0&&e.steps.forEach((function(e){r.push(e.polyline.points)}))})),F.duration_override||(G(d({},F,{duration:(0,u.time_convert)(i),route:JSON.stringify(r),route_overview:e.routes[0].overview_polyline})),oe({type:"entity",payload:d({},F,{duration:(0,u.time_convert)(i),route:JSON.stringify(r),route_overview:e.routes[0].overview_polyline})}))}else fe(n)}))}}(new e.maps.DirectionsService,n,e)}},he=function(e){e.stop,e.site;var t,n,i,r=e.type,l=e.number,s=e.id,u="stop"===r?3:1,c="site"===r?"normal":"bold";return 1===F.format?(t="#a82829",n=!0,i="#ffff"):(t="site"===r?"#86E8FF":"#a82829",n="site"!==r,i="site"===r?"#000":"#ffff"),(0,o.jsx)("a",{href:"#"+s,children:(0,o.jsx)("div",{className:"cnow-marker",style:{opacity:re,zIndex:u},children:(0,o.jsx)(a.Z,{colour:t,number:l,fill:n,textColor:i,type:r,textWeight:c})})})};(0,r.useEffect)((function(){var e,t;if((null===(e=Q.current)||void 0===e?void 0:e.map)&&(null===F||void 0===F||null===(t=F.stops)||void 0===t?void 0:t.length))return fe(Q.current),me(Q.current),function(){ee.current&&(ee.current.setMap(null),ee.current=null),te.current.length>0&&(te.current.forEach((function(e){return e.setMap(null)})),te.current=[]),ne.current&&(clearTimeout(ne.current),ne.current=null)}}),[ce,null===F||void 0===F||null===(t=F.stops)||void 0===t?void 0:t.length,null===F||void 0===F?void 0:F.route,V,Y]),(0,r.useEffect)((function(){var e=pe.current;if(e&&"undefined"!==typeof ResizeObserver){var t=null,n=new ResizeObserver((function(){var e;(null===(e=Q.current)||void 0===e?void 0:e.map)&&(t&&cancelAnimationFrame(t),t=requestAnimationFrame((function(){return fe(Q.current)})))}));return n.observe(e),function(){n.disconnect(),t&&cancelAnimationFrame(t)}}}),[ae]);var ge=null===F||void 0===F||null===(n=F.stops)||void 0===n||null===(c=n[0])||void 0===c?void 0:c.location;return(0,o.jsxs)(o.Fragment,{children:[U&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("hr",{}),(0,o.jsxs)("div",{className:"d-flex",children:[(0,o.jsx)(l.Z,{name:"map-view",size:30,mapClick:$}),(0,o.jsx)("div",{className:"fw-bold fst-italic ms-1 mt-1",style:{cursor:"pointer"},onClick:$,children:"Map View"})]})]}),(0,o.jsx)("div",{className:"".concat(L," "),style:B,ref:pe,children:(0,o.jsxs)(i.ZP,{bootstrapURLKeys:{key:"AIzaSyCg6tA214RQVRmvMe1u6uNXNMyXVBxLwbM",libraries:"geometry"},googleMapLoader:v,style:{color:"red"}
1,defaultZoom:14,defaultCenter:se,options:{mapId:"1f81af8398de79dd"},yesIWantToUseGoogleMapApiInternals:!0,onGoogleApiLoaded:function(e){Q.current=e,Q.current.map.setOptions({zoomControlOptions:{position:e.maps.ControlPosition.RIGHT_BOTTOM},controlSize:24,clickableIcons:!1,minZoom:1}),fe(e),me(e)},onDrag:function(){return le(0)},onDragEnd:function(){return le(1)},children:[2===(null===F||void 0===F?void 0:F.format)&&(null===F||void 0===F||null===(p=F.stops)||void 0===p?void 0:p.length)>0&&F.stops.map((function(e,t){var n,i=(null===e||void 0===e||null===(n=e.location)||void 0===n?void 0:n.location)||(null===e||void 0===e?void 0:e.location);return(null===i||void 0===i?void 0:i.lat)&&(null===i||void 0===i?void 0:i.lng)?(0,o.jsx)(he,{id:e.id||e.site_id,lat:Number(i.lat),lng:Number(i.lng),type:"stop",number:t+1||e.tourIndex+"."+e.stopIndex},e.id||e.site_id||t):null})),!H&&(null===F||void 0===F||null===(f=F.stops)||void 0===f?void 0:f.length)>0&&F.stops.map((function(e,t){var n;return(null===e||void 0===e||null===(n=e.sites)||void 0===n?void 0:n.length)>0&&e.sites.map((function(e,n){var i,r=(null===(i=e.location)||void 0===i?void 0:i.location)||e.location||e._geoloc;return(null===r||void 0===r?void 0:r.lat)&&(null===r||void 0===r?void 0:r.lng)?(0,o.jsx)(he,{id:e.id||e.site_id,lat:Number(r.lat),lng:Number(r.lng),type:"site",number:2===F.format?"".concat(t+1,".").concat(n+1):t+1},e.id||e.site_id||"".concat(t,"-").concat(n)):null}))})),H&&1===(null===F||void 0===F?void 0:F.format)&&(0,o.jsx)(he,{id:null===F||void 0===F||null===(m=F.stops)||void 0===m||null===(h=m[0])||void 0===h||null===(g=h.sites)||void 0===g||null===(x=g[0])||void 0===x?void 0:x.id,lat:null===F||void 0===F||null===(y=F.stops)||void 0===y||null===(b=y[0])||void 0===b||null===(w=b.sites)||void 0===w||null===(j=w[0])||void 0===j||null===(_=j.location)||void 0===_||null===(S=_.location)||void 0===S?void 0:S.lat,lng:null===F||void 0===F||null===(N=F.stops)||void 0===N||null===(k=N[0])||void 0===k||null===(O=k.sites)||void 0===O||null===(A=O[0])||void 0===A||null===(C=A.location)||void 0===C||null===(E=C.location)||void 0===E?void 0:E.lng,type:"site",number:null===F||void 0===F||null===(I=F.stops)||void 0===I||null===(P=I[0])||void 0===P?void 0:P.sort},null===F||void 0===F||null===(M=F.stops)||void 0===M||null===(T=M[0])||void 0===T||null===(Z=T.sites)||void 0===Z||null===(D=Z[0])||void 0===D?void 0:D.id)]},ae)}),ge&&X&&(0,o.jsxs)("div",{className:"mt-2",onClick:$,style:{cursor:"pointer"},children:[(0,o.jsx)("div",{className:"fw-bold",children:(null===ge||void 0===ge?void 0:ge.name)||"Location"}),(0,o.jsx)("div",{className:"text-muted",children:(0,u.combineAddressParts)((0,u.cleanAddressForAutocomplete)(null===ge||void 0===ge?void 0:ge.address),(0,u.cleanAddressForAutocomplete)(null===ge||void 0===ge?void 0:ge.city),(0,u.cleanAddressForAutocomplete)(null===ge||void 0===ge?void 0:ge.state),(0,u.cleanAddressForAutocomplete)(null===ge||void 0===ge?void 0:ge.country))}),(null===ge||void 0===ge?void 0:ge.description)&&(0,o.jsx)("div",{className:"text-muted",children:(null===ge||void 0===ge?void 0:ge.description)||(null===ge||void 0===ge?void 0:ge.additional_info)})]})]})}},23947:function(e,t,n){"use strict";var o=n(67294);t.Z=function(e,t){var n=(0,o.useState)(e),i=n[0],r=n[1];return(0,o.useEffect)((function(){var n=setTimeout((function(){r(e)}),t);return function(){clearTimeout(n)}}),[e,t]),i}},65075:function(e,t,n){"use strict";n.d(t,{R:function(){return i}});var o=n(67294);function i(e,t){(0,o.useEffect)((function(){if(e&&"function"===typeof t){var n="saved_".concat(e.toLowerCase(),"_data"),o=localStorage.getItem(n);if(o)try{var i=JSON.parse(o);t(i),localStorage.removeItem(n),localStorage.removeItem("last_content_url")}catch(r){console.error("Failed to restore saved ".concat(e," data"),r),localStorage.removeItem(n)}}}),[e])}},50315:function(e,t,n){"use strict";n.r(t);var o=n(85893),i=n(67294),r=n(81078),l=n(44312),a=n(99136),s=n(61224),u=n(82519),c=n(15672),d=n(42862),v=n(64199),p=n(1463),f=n(17614),m=n(5783);function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=n(31799);
1t.default=function(e){var t,n,x,y,b=e.tourData,w=e.viewMode,j=e.tourStops,_=void 0===j?[]:j,S=e.timeline,N=e.bannerImage,k="mobile"===w,O=(0,i.useState)({id:"",sectionId:"",opacValue:""}),A=(O[0],O[1]),C=(0,i.useState)(g[0]),E=C[0],I=(C[1],(0,i.useMemo)((function(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){h(e,t,n[t])}))}return e}({},v.TOOLBAR_OPTIONS)}),[])),P=(null===S||void 0===S?void 0:S.length)>1||1===(null===S||void 0===S?void 0:S.length)&&(null===S||void 0===S||null===(t=S[0])||void 0===t||null===(n=t.section)||void 0===n?void 0:n.length)>1;return(0,o.jsx)("div",{style:{position:"relative"},className:"".concat("mobile"!=w?"w-100":""),children:(0,o.jsxs)(o.Fragment,{children:[k&&(0,o.jsx)("img",{src:"/img/mobileframe.png",width:400}),(0,o.jsxs)("div",{className:"".concat(k?"mobile-view d-flex justify-content-start flex-column":""),style:{width:k?"356px":"100%",position:k?"absolute":"",top:k?"19px":"",left:k?"20px":"",height:k?"760px":"auto",overflowY:k?"scroll":"hiden",scrollbarWidth:k?"none":"",borderRadius:k?"35px":""},children:[(0,o.jsx)(m.Z,{headShotImage:(null===N||void 0===N?void 0:N[0])||null,type:"tour",cssClass:"headshot",parent:(0,o.jsx)(u.default,{tour:_,color:"#86E8FF",className:"tour-banner",layoutKey:k?"mobile-banner":"desktop-banner",style:{width:"100%",height:k?"100%":"60vh",aspectRatio:k?"1.82 / 1":"3.2 / 1",position:"relative",minHeight:k?180:240}})}),(0,o.jsx)("div",{className:"cnow-left-background ".concat(k?"mobile-bg":""),children:(0,o.jsx)("div",{className:k?"px-2":"container print-container-fluid px-0",children:(0,o.jsx)("div",{className:k?"":"container print-container-fluid",children:(0,o.jsxs)("div",{className:"row ".concat(k?"flex-column g-0":"gx-4"),children:[(0,o.jsxs)("div",{className:"".concat(k?"col-12":"col-sm-4 col-print-4"," py-3 bg-light ").concat(k?"":"mx-0 px-2 ps-2_5 bg-print-light"),children:[(0,o.jsx)("div",{className:"pt-1",style:{position:"sticky",top:"5px",zIndex:"99",background:"#ededed"},children:(0,o.jsx)(a.Z,{data:(null===b||void 0===b?void 0:b.title)||"Demo"})}),(0,o.jsx)(l.Z,{data:(null===b||void 0===b?void 0:b.description)||"",title:"About"}),(0,o.jsx)(s.Z,{podcastsList:(null===b||void 0===b?void 0:b.podcasts)||[],playlistName:(null===b||void 0===b?void 0:b.title)+" compilation",hr:!0}),(0,o.jsx)(u.default,{tour:_,color:"#86E8FF",className:"cnow-map-preview",historicMap:!0,hideSites:!0,layoutKey:k?"mobile-sidebar":"desktop-sidebar",style:{height:"300px",width:"100%",position:"relative"}})]}),(0,o.jsxs)("div",{className:"".concat(k?"col-12":"col-sm-8 col-print-8"," bg-white py-2"),children:[(0,o.jsxs)("div",{className:" pt-1",children:[(0,o.jsx)(d.Z,{name:"demo",options:I,sortOptions:g,sort:E,entity:"tours"}),P&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"fw-bold my-3 text-uppercase",children:"Timeline"}),(0,o.jsx)(r.Z,{data:S,setOpacityStyle:A})]})]}),(0,o.jsx)(p.Z,{collapsable:!0,title:"Tour Stops",bgColor:"bg-gray",textColor:"text-dark",opacityStyle:{opacValue:2},count:(0,v.getCount)(null===_||void 0===_||null===(x=_.stops)||void 0===x?void 0:x.length,"Result"),children:(null===_||void 0===_?void 0:_.stops)&&(null===_||void 0===_||null===(y=_.stops)||void 0===y?void 0:y.length)>0&&(null===_||void 0===_?void 0:_.stops.map((function(e,t){var n;return(0,o.jsx)(c.Z,{index:t,collapsable:!0,title:null===e||void 0===e?void 0:e.stop_name,format:2,data:e,id:e.site_id,bgColor:"bg-light",textColor:"text-black",mobilePreview:k,opacityStyle:{id:null===e||void 0===e?void 0:e.site_id,opacValue:2},count:(0,v.getCount)(null===e||void 0===e||null===(n=e.sites)||void 0===n?void 0:n.length,"Result"),children:(0,o.jsx)("div",{className:"mt-2 mb-3",style:{paddingTop:"12px"},children:(0,o.jsx)(f.Z,{items:(null===e||void 0===e?void 0:e.sites)||[],type:"tourstop",showAll:!0,format:2,stopNumber:(null===e||void 0===e?void 0:e.sort)||t+1,noOfCards:k?2:4,mobilePreview:k,tourPodcasts:(null===b||void 0===b?void 0:b.podcasts)||[],opacityStyle:{opacValue:2}})})},t)})))})]})]})})})})]})]})})}},87365:function(e,t,n){"use strict";n.r(t);var o=n(34051),i=n.n(o),r=n(85893),l=n(11163),a=n(67294),s=n(41248),u=n(5152),c=n(22920),d=n(46737),v=n.n(d),p=n(21660),f=n(50315),m=n(44519),h=n(64199),g=(n(80148),n(80742)),x=n(65075),y=n(21691),b=n(83454);function w(e,t,n,o,i,r,l){try{var a=e[r](l),s=a.value}catch(u){return void n(u)}a.done?t(s):Promise.resolve(s).then(o,i)}function j(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var r=e.apply(t,n);function l(e){w(r,o,i,l,a,"next",e)}function a(e){w(r,o,i,l,a,"throw",e)}l(void 0)}))}}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var S=(0,u.default)((function(){return n.e(7372).then(n.bind(n,27372))}),{loadableGenerated:{webpack:function(){return[27372]}},ssr:!1}),N=(0,u.default)((function(){return n.e(4512).then(n.bind(n,94512))}),{loadableGenerated:{webpack:function(){return[94512]}},ssr:!1}),k=["name"];t.default=function(){var e=(0,l.useRouter)(),t=(0,s.v9)((function(e){return e.user})),n=(0,s.I0)();t||e.push("/");var o=(0,a.useState)(!1),u=o[0],d=o[1],w=(0,a.useState)("default"),O=w[0],A=w[1],C=(0,a.useState)([]),E=C[0],I=C[1],P=(0,a.useState)([]),M=P[0],T=P[1],Z=(0,a.useState)(""),D=Z[0],F=Z[1],R=(0,a.useState)(""),L=R[0],z=R[1],H=(0,a.useState)({}),U=H[0],B=H[1],q=(0,a.useState)([]),V=q[0],W=q[1],G=(0,a.useState)(!1),K=G[0],X=G[1],J=(0,a.useState)(""),Y=J[0],$=J[1],Q=(0,a.useState)(-1),ee=Q[0],te=Q[1],ne=(0,a.useState)([]),oe=ne[0],ie=ne[1],re=(0,a.useState)([]),le=re[0],ae=re[1],se=(0,a.useState)([]),ue=se[0],ce=se[1];(0,x.R)("tour",(function(e){Array.isArray(e)?W(e):(null!=(null===e||void 0===e?void 0:e.title)&&F(e.title),null!=(null===e||void 0===e?void 0:e.description)&&z(e.description),Array.isArray(null===e||void 0===e?void 0:e.podcasts)&&W(e.podcasts),Array.isArray(null===e||void 0===e?void 0:e.tours)&&I(e.tours),(null===e||void 0===e?void 0:e.tourStops)&&B(e.tourStops),Array.isArray(null===e||void 0===e?void 0:e.bannerImage)&&T(e.bannerImage),Array.isArray(null===e||void 0===e?void 0:e.locations)&&ae(e.locations),Array.isArray(null===e||void 0===e?void 0:e.timeline)&&ce(e.timeline))}));var de=(0,h.useDragulaSortable)(V||[],(function(e){return W(e)}),"",null,"","",O),ve=function(){X(!0)},pe=function(){var o=j(i().mark((function o(){var r,l,a,s,u,v,p,f,h;return i().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return d(!0),o.prev=1,a=_({id:null,name:D.trim(),description:L.trim(),type:"",duration:"",meta:{}
1,image_id:null===(r=M[0])||void 0===r?void 0:r.image_id,deleted:!1,format:2,live:!1,user_id:null===t||void 0===t?void 0:t.id,created_via:null===t||void 0===t||null===(l=t.type)||void 0===l?void 0:l.toUpperCase(),modified_by:null,route:null===U||void 0===U?void 0:U.route,route_overview:null===U||void 0===U?void 0:U.route_overview,duration_override:!1},"duration",null===U||void 0===U?void 0:U.duration),o.next=6,(0,m.ApiCall)("post","/tour",a);case 6:if(null===(s=o.sent)||void 0===s?void 0:s.id){o.next=9;break}throw new Error("Failed to create tour");case 9:if(u=s.id,v=function(){var e=j(i().mark((function e(t,n){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(null===n||void 0===n?void 0:n.length)&&(0,m.ApiCall)("post",t,n));case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),!E.length){o.next=15;break}return p=E.map((function(e,t){var n,o,i,r,l,a,s,c;return{tour_id:u,stop_name:null===e||void 0===e?void 0:e.name,description:null===e||void 0===e?void 0:e.description,location:null===e||void 0===e||null===(n=e.stops)||void 0===n||null===(o=n[0])||void 0===o?void 0:o.location,site_id:null===e||void 0===e||null===(i=e.stops)||void 0===i||null===(r=i[0])||void 0===r?void 0:r.site_id,site_name:null===e||void 0===e||null===(l=e.stops)||void 0===l||null===(a=l[0])||void 0===a?void 0:a.site_name,sites:null===e||void 0===e?void 0:e.stops,sort:t+1,image_id:null===e||void 0===e||null===(s=e.stops)||void 0===s||null===(c=s[0])||void 0===c?void 0:c.image_id}})),o.next=15,(0,m.ApiCall)("post","/tour/".concat(u,"/stop"),p);case 15:if(!(null===V||void 0===V?void 0:V.length)){o.next=24;break}return f=V?V.reduce((function(e,t){var n,o,i;(null===t||void 0===t?void 0:t.existing)||e.push({id:null===t||void 0===t?void 0:t.id,description:null===t||void 0===t?void 0:t.description,name:null===t||void 0===t?void 0:t.name,caption:null===t||void 0===t?void 0:t.caption,duration:null===t||void 0===t?void 0:t.duration,type:null===t||void 0===t?void 0:t.type,url:null===t||void 0===t?void 0:t.url,deleted:Boolean(null===t||void 0===t?void 0:t.deleted),live:Boolean(null===t||void 0===t?void 0:t.live),date_uploaded:null!==(i=null===t||void 0===t?void 0:t.date_uploaded)&&void 0!==i?i:(null===t||void 0===t?void 0:t.year)&&(null===t||void 0===t?void 0:t.month)&&(null===t||void 0===t?void 0:t.day)?{year:t.year,month:t.month,day:t.day}:void 0,image_id:(null===M||void 0===M||null===(n=M[0])||void 0===n?void 0:n.image_id)||(null===M||void 0===M||null===(o=M[0])||void 0===o?void 0:o.id)});return e}),[]):[],o.next=19,Promise.all(f.map(function(){var e=j(i().mark((function e(t){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,m.ApiCall)("put","/podcast/".concat(t.id,"/"),t);case 3:e.next=9;break;case 5:throw e.prev=5,e.t0=e.catch(0),console.error("Error updating podcast ".concat(t.id,":"),e.t0),e.t0;case 9:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(t){return e.apply(this,arguments)}}()));case 19:return h=V.map((function(e,t){return{podcast_id:e.id,podcast_name:e.name,date_id:null,podcast_image_url:e.image_url,podcast_type:e.type,podcast_credits:e.credits,podcast_duration:e.duration,sort:t+1}})),o.next=22,Promise.all(f.map((function(e){var t;return(null===(t=e.credits)||void 0===t?void 0:t.length)?v("/podcast/".concat(e.id,"/credit"),e.credits):null})));case 22:return o.next=24,v("/tour/".concat(u,"/podcast"),h);case 24:c.Am.success("Tour added successfully"),e.push("/tour/".concat(u)),n({type:"personTimelineCollection",payload:[]}),o.next=34;break;case 29:throw o.prev=29,o.t0=o.catch(1),console.error("Error saving tour:",o.t0),c.Am.error(o.t0.message||"Failed to save tour"),o.t0;case 34:return o.prev=34,d(!1),o.finish(34);case 37:case"end":return o.stop()}}),o,null,[[1,29,34,37]])})));return function(){return o.apply(this,arguments)}}(),fe=function(){var e=j(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{v()({title:"Add a Tour?",text:"Are you sure that you want to add a tour?",buttons:["Cancel","Yes"],icon:"warning",dangerMode:!0}).then(function(){var e=j(i().mark((function e(t){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=3;break}return e.next=3,pe();case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}catch(t){console.error("Error saving tour:",t),c.Am.error(t.message||"An error occurred")}case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),me=function(){var t=j(i().mark((function t(){return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:try{v()({text:"Do you want to save before closing?",buttons:["No","Yes"],icon:"warning",dangerMode:!0}).then(function(){var t=j(i().mark((function t(n){return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!n){t.next=5;break}return t.next=3,fe();case 3:t.next=6;break;case 5:e.push("/content/add");case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}catch(n){console.error("Error saving tour:",n),c.Am.error(n.message||"An error occurred"),d(!1)}case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();(0,a.useEffect)((function(){ie(V)}),[V]),(0,a.useEffect)((function(){if((null===E||void 0===E?void 0:E.length)>0){var e=E.map((function(e,t){var n,o,i,r,l,a,s,u;return{stop_name:null===e||void 0===e?void 0:e.name,description:null===e||void 0===e?void 0:e.description,location:null===e||void 0===e||null===(n=e.stops)||void 0===n||null===(o=n[0])||void 0===o?void 0:o.location,site_id:null===e||void 0===e||null===(i=e.stops)||void 0===i||null===(r=i[0])||void 0===r?void 0:r.site_id,site_name:null===e||void 0===e||null===(l=e.stops)||void 0===l||null===(a=l[0])||void 0===a?void 0:a.site_name,sites:null===e||void 0===e?void 0:e.stops,sort:t+1,image_id:null===e||void 0===e||null===(s=e.stops)||void 0===s||null===(u=s[0])||void 0===u?void 0:u.image_id}}));B({format:2,duration_override:!1,stops:e})}}),[E]),(0,a.useEffect)((function(){var e,t;(null===(e=U.stops)||void 0===e||null===(t=e[0])||void 0===t?void 0:t.sites)&&T([U.stops[0].sites[0]])}),[U]);
1var he={name:D,description:L,podcasts:V,locations:le,tourStops:U,bannerImage:M,timeline:ue,user:t},ge=k.filter((function(e){return Array.isArray(he[e])?0===he[e].length:!he[e]}));return(0,r.jsxs)("div",{children:[(0,r.jsx)(g.Z,{metaData:{name:"New tour",meta:{description:"A celebration of the 1000 events that occurred downtown for New York's 400th & America's 250th"}},canonical:"".concat(b.env.NEXT_PUBLIC_SITE_URL||""),customTitle:"New tour"}),(0,r.jsx)(y.S3,{entity:{name:"tour",data:{name:D,notes:L,title:D,description:L,podcasts:V,tours:E,tourStops:U,bannerImage:M,locations:le,timeline:ue}},requiredFields:k,missingFields:ge,onSave:fe,onExit:me,apiSpinner:u,setViewMode:A,viewMode:O,onSubmit:pe}),"default"===O&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(y.Aq,{title:"Add a headshot",updateImage:function(e){T([e])},bannerImage:M,tour:!0,wantBannerSection:!0,tourData:U,setTourStops:B}),(0,r.jsx)("div",{className:"cnow-left-background",children:(0,r.jsx)("div",{className:"bg-white container print-container-fluid px-0",children:(0,r.jsx)("div",{className:"container print-container-fluid",children:(0,r.jsxs)("div",{className:"row gx-4",children:[(0,r.jsx)(N,{title:D,setTitle:F,description:L,requiredFields:k,setDescription:z,handleShow:ve,podcasts:V,setPodcasts:W,locations:le,setLocations:ae,setOperation:$,setPodcastsEditIndex:te,tourStops:U,setTourStops:B,setUploadedPodcastsForViewer:ie,viewMode:O,podcastRef:de}),(0,r.jsx)(S,{tours:E,setTours:I,setTimeline:ce,timeline:ue,viewMode:O})]})})})})]}),("desktop"===O||"mobile"===O)&&(0,r.jsx)("div",{className:"d-flex justify-content-center",children:(0,r.jsx)(f.default,{tourStops:U,viewMode:O,tourData:{title:D,description:L,podcasts:V},timeline:ue,bannerImage:M})}),(0,r.jsx)(y.nC,{show:K,onSave:function(e){var t;t=e,W((function(e){var n=new Map((e||[]).map((function(e){return[null===e||void 0===e?void 0:e.id,e]})));return t.forEach((function(e){n.has(e.id)?n.set(e.id,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){_(e,t,n[t])}))}return e}({},n.get(e.id),{name:e.name,date_uploaded:e.date_uploaded,caption:e.caption,duration:e.duration,description:e.description,credits:e.credits})):n.set(e.id,e)})),t}))},setShowModal:function(){return X(!1)},operation:Y,setOperation:$,podcastEditIndex:ee,setPodcastsEditIndex:te,handleShow:ve,bannerImage:M,uploadedPodcastsForViewer:oe,setUploadedPodcastsForViewer:ie,viewMode:O}),(0,r.jsx)("div",{className:"mobile"===O?"d-flex justify-content-center":"",children:(0,r.jsx)("div",{className:"ms-4 me-4",style:{height:"2px",backgroundColor:"#dedede",width:"mobile"===O?"400px":""}})}),(0,r.jsx)(p.Z,{viewMode:O})]})}},63966:function(e,t,n){"use strict";n.d(t,{g:function(){return i}});var o=n(44519),i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return(0,o.ApiCall)("get","/global_list/".concat(e,"?parent=").concat(n,"&keyword=").concat(t,"&take=10000"))}},83817:function(){},9008:function(e,t,n){e.exports=n(83121)}},function(e){e.O(0,[3365,1255,6737,8279,344,2433,7934,4225,2004,5368,7009,8304,6662,495,6127,3138,9984,7614,6576,1138,6687,77,2862,2486,1224,3364,1075,1743,3484,9774,2888,179],(function(){return t=12708,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

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.