HEX
Server: Apache
System: Linux ecngx285.inmotionhosting.com 4.18.0-553.79.1.lve.el8.x86_64 #1 SMP Wed Oct 15 17:59:35 UTC 2025 x86_64
User: zeusxp5 (3862)
PHP: 8.3.28
Disabled: NONE
Upload Files
File: /home/zeusxp5/chuair.org/wp-content/plugins/wd-framework/build/maps.js
!function(){var e,t={7879:function(e,t,a){"use strict";var n={};a.r(n),a.d(n,{ReactComponent:function(){return g},default:function(){return C}});var r,l=window.wp.element,o=window.wp.blocks,s=a(4184),i=a.n(s),c=window.wp.i18n,d=window.wp.primitives,p=(0,l.createElement)(d.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(d.Path,{d:"M20 5h-5.7c0-1.3-1-2.3-2.3-2.3S9.7 3.7 9.7 5H4v2h1.5v.3l1.7 11.1c.1 1 1 1.7 2 1.7h5.7c1 0 1.8-.7 2-1.7l1.7-11.1V7H20V5zm-3.2 2l-1.7 11.1c0 .1-.1.2-.3.2H9.1c-.1 0-.3-.1-.3-.2L7.2 7h9.6z"})),u=window.React;function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},m.apply(this,arguments)}var g=function(e){return u.createElement("svg",m({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"#ED2939"},e),r||(r=u.createElement("path",{d:"M12 0C7.802 0 4 3.403 4 7.602 4 11.8 7.469 16.812 12 24c4.531-7.188 8-12.2 8-16.398C20 3.403 16.199 0 12 0zm0 14a6 6 0 1 1 0-12 6 6 0 0 1 0 12z"})))},C="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSIjRUQyOTM5Ij48cGF0aCBkPSJNMTIgMGMtNC4xOTggMC04IDMuNDAzLTggNy42MDIgMCA0LjE5OCAzLjQ2OSA5LjIxIDggMTYuMzk4IDQuNTMxLTcuMTg4IDgtMTIuMiA4LTE2LjM5OCAwLTQuMTk5LTMuODAxLTcuNjAyLTgtNy42MDJ6bTAgMTRjLTMuMzE0IDAtNi0yLjY4Ni02LTZzMi42ODYtNiA2LTYgNiAyLjY4NiA2IDYtMi42ODYgNi02IDZ6Ii8+PC9zdmc+";const{useBlockProps:y,InspectorControls:f}=wp.blockEditor,{useState:_,useEffect:w,useRef:h}=wp.element,{PanelBody:v,Button:b,RangeControl:L,ToggleControl:M,SelectControl:k,TextControl:E,TextareaControl:O}=wp.components;var S=JSON.parse('{"apiVersion":2,"name":"webdevia/maps","version":"0.1.0","title":"Maps","category":"webdevia","description":"The maps block is a powerful tool for displaying multiple locations on a Google Map. Simply provide a list of addresses, and the block will place markers on the map for each location.","attributes":{"height":{"type":"number","default":200},"addressList":{"type":"array","default":[{"title":"My first location","address":{"label":"New York, NY, USA","lat":40.711457895218714,"lng":-73.99410580966563}}]},"zoom":{"type":"number","default":8},"styles":{"type":"string","default":0},"mapAPI":{"type":"string","default":""},"customStyle":{"type":"string"},"hasCustomStyle":{"type":"boolean","default":false},"hasAreas":{"type":"boolean","default":false},"areaWidth":{"type":"number","default":1000}},"supports":{"html":false,"align":["wide","full"],"spacing":{"margin":true,"padding":true}},"keywords":["wd","webdevia","maps"],"example":{"attributes":{"preview":true,"blockOnly":true,"template":"purple-bliss","enable_contextual_menu":true,"enable_copy_text":true,"enable_copy_tweet":true,"enable_copy_link":true,"enable_tweet_this":true,"maximum_width":800,"maximum_width_unit":"px"}},"textdomain":"webdevia-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","viewScript":"file:./view.js","style":"file:./style-index.css"}');const{name:A,...x}=S;(0,o.registerBlockType)(A,{...x,icon:()=>(0,l.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"21",class:"wd-blocks-icon",viewBox:"0 0 16 21"},(0,l.createElement)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.0319 0.663355C14.1088 0.689722 14.1837 0.721949 14.2562 0.759546C14.6448 0.961939 14.9371 1.31033 15.0688 1.72805C15.2006 2.14602 15.1609 2.59915 14.9587 2.98757C14.7563 3.37625 14.408 3.66873 13.9901 3.80032C13.5723 3.93215 13.1192 3.89236 12.7305 3.69021C12.5381 3.59011 12.3673 3.45291 12.2278 3.28665C12.0884 3.12063 11.9831 2.92849 11.9178 2.7217C11.8526 2.51467 11.8287 2.2969 11.8477 2.08084C11.8666 1.86477 11.9279 1.65457 12.028 1.46218C12.1282 1.26956 12.2653 1.0989 12.4315 0.959498C12.5977 0.819849 12.7897 0.714624 12.9966 0.649439C13.2035 0.584009 13.4212 0.560328 13.6373 0.579126C13.7721 0.591089 13.9045 0.61941 14.0319 0.663355ZM12.4039 0.310572C12.0355 0.520289 11.7354 0.831812 11.5396 1.20779C11.2915 1.68362 11.226 2.23342 11.3548 2.75442C11.4837 3.27542 11.7983 3.73147 12.2397 4.03689L11.3545 5.73733C10.3127 5.25613 9.16956 5.00002 8 5.00002C5.8783 5.00002 3.84344 5.8428 2.34314 7.34329C0.842834 8.84353 0 10.8782 0 13C0 15.1219 0.842834 17.1565 2.34314 18.6568C3.84344 20.1573 5.8783 21 8 21C10.1217 21 12.1566 20.1573 13.6569 18.6568C15.1572 17.1565 16 15.1219 16 13C16 10.8782 15.1572 8.84353 13.6569 7.34329C13.1158 6.80227 12.5053 6.3467 11.8463 5.98538L12.7284 4.29055C13.1259 4.43777 13.5574 4.46707 13.9712 4.37527C14.385 4.28323 14.7634 4.07376 15.0612 3.772C15.3589 3.47024 15.5632 3.08914 15.6496 2.6741C15.736 2.25906 15.7009 1.82815 15.5483 1.43264C15.3959 1.03713 15.1324 0.693873 14.7898 0.444361C14.5831 0.29397 14.3529 0.181421 14.1099 0.110376C13.95 0.0637456 13.7845 0.0351811 13.6165 0.0259038C13.1934 0.00222211 12.7723 0.101099 12.4039 0.310572ZM11.8463 5.98538C11.6851 5.897 11.5211 5.81423 11.3545 5.73733L10.8336 6.73782C10.7999 6.80276 10.7933 6.8782 10.8152 6.94778C10.8372 7.01736 10.8859 7.07546 10.9507 7.10916C10.9778 7.12332 11.0069 7.13259 11.0366 7.13699C11.0778 7.14334 11.1202 7.14041 11.1606 7.12771C11.2087 7.11257 11.2512 7.0845 11.2841 7.04739C11.2988 7.03079 11.3116 7.01223 11.3221 6.99221L11.8463 5.98538ZM10.4402 6.18948C10.5053 6.15652 10.5546 6.0989 10.5772 6.02957C10.5902 5.98953 10.5938 5.94753 10.5881 5.90652C10.584 5.87649 10.5748 5.84719 10.5609 5.8196C10.5278 5.75442 10.4702 5.70535 10.4009 5.68264C9.99249 5.54885 9.60828 5.47366 9.29395 5.47512C9.00702 5.47659 8.66083 5.54544 8.50848 5.83792C8.40021 6.04592 8.44427 6.27127 8.52582 6.45339C8.6095 6.63845 8.75293 6.82815 8.92902 7.00979C9.20734 7.29739 9.59595 7.59622 10.0531 7.86917C10.0447 7.87283 10.0364 7.87625 10.028 7.87991C9.26501 8.20901 8.43402 8.56594 8 9.00002C7.80402 9.19607 7.76202 9.54495 7.72302 9.86697C7.66199 10.3679 7.60901 10.804 7 10.5C6.89301 10.3928 6.80963 10.2869 6.73334 10.19L6.72699 10.1819C6.45203 9.82913 6.28003 9.61013 5.5 10C4.5 10.5 6.55499 12.3521 7 12.5C7.18799 12.563 7.33801 12.4341 7.51001 12.284L7.51221 12.2818C7.7467 12.0796 8.0235 11.8406 8.5 12C10 12.5 12.138 13.2571 12 14.5C11.798 16.314 9.5 19 8 19.5C7.37402 19.5 7.565 18.802 7.78003 18.02L7.78314 18.0091C7.92719 17.4802 8.08142 16.9141 8 16.5C7.88214 15.8977 7.29236 15.7056 6.716 15.5178L6.71399 15.5171C6.11798 15.324 5.53497 15.1341 5.5 14.5C5.47101 13.9829 5.84198 13.6299 6.258 13.2339L6.37836 13.1189C6.41907 13.0799 6.45978 13.0403 6.5 13C6.54962 12.9502 6.24146 12.7815 5.76727 12.522L5.75702 12.5161C4.57202 11.866 2.36499 10.6551 2.03998 9.32595C1.31207 10.5073 0.951721 11.8797 1.00476 13.2664C1.05774 14.6529 1.52167 15.9927 2.33765 17.115C3.15363 18.2373 4.28479 19.0921 5.58752 19.5701C6.8902 20.0484 8.30566 20.1287 9.65399 19.8006C11.0024 19.4727 12.2228 18.7512 13.1604 17.7283C14.098 16.7051 14.7103 15.4265 14.9196 14.0547C15.1288 12.6829 14.9257 11.2798 14.3359 10.0237C14.0714 9.46047 13.7345 8.93801 13.3361 8.46877C13.3571 8.44192 13.3762 8.41262 13.3929 8.38064C13.5455 8.08743 13.403 7.76492 13.2396 7.52908C13.0605 7.27078 12.7785 6.99905 12.4347 6.74124C12.4059 6.71829 12.3729 6.7012 12.3373 6.69143C12.3019 6.68142 12.2648 6.67849 12.2282 6.68313C12.2095 6.68557 12.1911 6.68972 12.1733 6.69583C12.1564 6.70169 12.1401 6.70925 12.1245 6.71829C12.0926 6.7366 12.0648 6.7615 12.0426 6.7908C12.0205 6.82034 12.0045 6.85378 11.9955 6.88967C11.9866 6.92532 11.985 6.96267 11.9907 6.99905C11.9964 7.03543 12.0093 7.07034 12.0288 7.10159C12.0483 7.13284 12.0738 7.15994 12.1039 7.18118C12.4217 7.41995 12.6536 7.65066 12.7869 7.8428C12.8145 7.87966 12.8386 7.91897 12.8587 7.96023C12.4809 7.59597 12.0614 7.27322 11.607 7.00002C11.4619 7.19876 11.1147 7.39211 10.6841 7.59133C10.1016 7.28665 9.62579 6.93752 9.32465 6.62649C9.17181 6.46951 9.07556 6.3323 9.02802 6.22683C9.01093 6.19241 8.99988 6.15505 8.9953 6.11672C8.99469 6.11013 8.99487 6.1033 8.99591 6.0967L8.99695 6.09207C9.01276 6.07791 9.02991 6.0679 9.04846 6.0613C9.09967 6.04446 9.15253 6.03372 9.20599 6.02883C9.23602 6.0259 9.2663 6.02493 9.29657 6.0259C9.53003 6.02444 9.85248 6.08254 10.2303 6.20584C10.2997 6.22854 10.3752 6.22268 10.4402 6.18948ZM10.6841 7.59133C10.4874 7.6824 10.2733 7.77444 10.0531 7.86917C10.178 7.94363 10.308 8.01638 10.4422 8.08621C11.0679 8.41189 11.6884 8.6282 12.1918 8.70828C12.4416 8.74832 12.6791 8.7571 12.8788 8.71951C13.0446 8.68752 13.2203 8.61599 13.3361 8.46877C13.1855 8.29153 13.0262 8.12185 12.8587 7.96023C12.8754 7.99441 12.8893 8.02957 12.9005 8.06594C12.9056 8.08499 12.9073 8.10476 12.9055 8.12429L12.9045 8.12625L12.9014 8.12966C12.8967 8.1343 12.8914 8.13845 12.8857 8.14211C12.8692 8.1509 12.852 8.15823 12.8342 8.16409C12.8154 8.17044 12.796 8.17532 12.7762 8.17825C12.6626 8.19973 12.4954 8.199 12.2787 8.16433C11.8481 8.09597 11.2845 7.90383 10.6964 7.59768C10.6923 7.59548 10.6882 7.59353 10.6841 7.59133Z"})),edit:function(e){let{attributes:t,setAttributes:a}=e;const{className:r,height:o,addressList:s,zoom:d,hasCustomStyle:u,styles:m,customStyle:g,hasAreas:C,areaWidth:S,mapAPI:A}=t,x="wp-block-webdevia-maps",I=y({className:i()(x,r)});let T=[];const N=(e,t,n)=>{const r=[...s];switch(e){case"title":r[n].title=t;break;case"address":r[n].address.label=t;const e={strictBounds:!1,fields:["address_components","geometry"],types:["(cities)"]},l=document.querySelectorAll(`.${x}__ic__item__address input`);l.length&&l.forEach((t=>{const l=new window.google.maps.places.Autocomplete(t,e);l&&l.addListener("place_changed",(()=>{let e=l.getPlace();e.geometry&&e.geometry.location||console.error(`No details available for input: ${e.name}!`),r[n].address.label=t.value,r[n].address.lat=e.geometry.location.lat(),r[n].address.lng=e.geometry.location.lng(),a({addressList:r})}))}))}a({addressList:r})};Array.isArray(s)&&s.length&&(T=s.map(((e,t)=>(0,l.createElement)("li",{key:t,className:`${x}__ic__items__item`},(0,l.createElement)("div",{className:`${x}__ic__items__item__title`,onClick:e=>((e,t)=>{e.target.closest("#removeEvent")?a({addressList:s.filter(((e,a)=>t!==a))}):e.target.closest("li").querySelector(`.${x}__ic__items__item__content`).classList.toggle("open")})(e,t),draggable:!0,onDragStart:e=>((e,t)=>{e.target.classList.add("dragging")})(e),onDragEnter:e=>((e,t)=>{setDropIndex(t)})(0,t),onDragOver:e=>((e,t)=>{e.praddressDefault();const a=e.target.closest(`.${x}__ic__items ul`),n=function(e,t){return[...e.querySelectorAll(`.${x}__ic__items__item:not(.dragging)`)].reduce(((e,a)=>{const n=a.getBoundingClientRect(),r=t-n.top-n.height/2;return r<0&&r>e.offset?{offset:r,element:a}:e}),{offset:Number.NEGATIVE_INFINITY}).element}(a,e.clientY),r=a.querySelector(".dragging");null==n?a.appendChild(r):a.insertBefore(r,n)})(e),onDragEnd:e=>((e,t)=>{e.target.classList.remove("dragging");const n=[...s],r=n[t];n.splice(t,1);const l=[...n.slice(0,dropIndex),r,...n.slice(dropIndex,n.length)];a({addressList:l})})(e,t)},e?.title,(0,l.createElement)("span",{id:"removeEvent",className:`${x}__ic__items__item__remove`},p)),(0,l.createElement)("div",{className:`${x}__ic__items__item__content`,draggable:!1},(0,l.createElement)(E,{label:(0,c.__)("Title","wd-framework"),value:e?.title,onChange:e=>N("title",e,t)}),(0,l.createElement)(E,{label:(0,c.__)("Address","wd-framework"),className:`${x}__ic__item__address`,value:e?.address.label||"",onChange:e=>N("address",e,t)}))))));const j=h(null),[D,P]=_(null);return w((()=>{if("ol"==A&&"undefined"!=typeof OpenLayers){const e=new OpenLayers.Map("map");P(e)}}),[A]),w((()=>{if("ol"===A){if(D&&"undefined"!=typeof OpenLayers){let e=new OpenLayers.Layer.OSM("OpenStreetMap");D.addLayer(e);let t=new OpenLayers.Layer.Markers("Markers");D.addLayer(t),Array.isArray(s)&&s.forEach((e=>{let{address:a,title:r}=e,l=new OpenLayers.LonLat(a.lng,a.lat).transform(new OpenLayers.Projection("EPSG:4326"),D.getProjectionObject()),o=new OpenLayers.Size(32,32),s=new OpenLayers.Pixel(-o.w/2,-o.h),i=new OpenLayers.Icon(n,o,s),c=new OpenLayers.Marker(l,i);t.addMarker(c)})),D.zoomToExtent(t.getDataExtent())}}else{const e=new google.maps.LatLngBounds,t={center:{lat:36.181559495458,lng:-81.38645118798156},zoom:d,mapTypeControl:!1},a=new window.google.maps.Map(j.current,t);if(u){let e;try{e=JSON.parse(g)}catch(e){console.error(e)}const t=new google.maps.StyledMapType(e,{name:"Styled Map"});a.mapTypes.set("map_style",t),a.setMapTypeId("map_style")}else 0!=m&&fetch(`${devia.plugin_uri}includes/map-styles/map-style${m}.json`).then((e=>e.json())).then((e=>{const t=new google.maps.StyledMapType(e,{name:"Styled Map"});a.mapTypes.set("map_style",t),a.setMapTypeId("map_style")}));Array.isArray(s)&&s.forEach((t=>{let{address:n,title:r}=t;const l=new google.maps.InfoWindow({content:`<p>${r}</p>`}),o={lat:n.lat||0,lng:n.lng||0};if(e.extend(o),C)new google.maps.Circle({strokeColor:"#FF0000",strokeOpacity:.35,strokeWeight:1,fillColor:"#FF0000",fillOpacity:.35,map:a,center:o,radius:S});else{const e=new window.google.maps.Marker({position:o,map:a,title:r});google.maps.event.addListener(e,"mouseover",(function(){l.open(a,e)})),google.maps.event.addListener(e,"mouseout",(function(){l.close(a,e)}))}})),a.setCenter(e.getCenter()),s.length>1&&a.fitBounds(e)}}),[s,d,m,g,u,C,S,A,D]),[(0,l.createElement)(f,null,(0,l.createElement)(v,{title:(0,c.__)("Select count up icon","wd-framework"),initialOpen:!0},(0,l.createElement)(k,{className:`${x}__ic__mapAPI`,label:(0,c.__)("Map API","wd-framework"),value:A,options:[{label:"Global",value:""},{label:"Google",value:"google"},{label:"Open Layers (FREE)",value:"ol"}],onChange:e=>a({mapAPI:e})}),(0,l.createElement)(L,{label:(0,c.__)("Height","wd-framework"),value:o,onChange:e=>a({height:e}),min:0,max:1e3}),s.length<=1&&(0,l.createElement)(L,{label:(0,c.__)("Zoom","wd-framework"),value:d,onChange:e=>a({zoom:e}),min:0,max:20}),!!s&&(0,l.createElement)("fieldset",{className:`${x}__ic__items`},(0,l.createElement)("legend",null,(0,c.__)("Addresses List","wd-framework")),(0,l.createElement)("ul",null,T.length?T:(0,l.createElement)("div",null,(0,c.__)("There are no address yet, please add some!"))),(0,l.createElement)(b,{variant:"primary",onClick:()=>{const e=[...s];e.push({title:"New location",address:{label:"new-location"}}),a({addressList:e})}},(0,c.__)("Add address"))),"google"==A&&(0,l.createElement)(M,{label:(0,c.__)("Has custom style","wd-framework"),help:u?"Has custom style":"No custom style",checked:u,onChange:e=>{a({hasCustomStyle:e})}}),"google"==A&&!u&&(0,l.createElement)(k,{label:(0,c.__)("Styles","wd-framework"),value:m,options:[{label:"Default style",value:0},{label:"Light",value:1},{label:"Gray",value:2},{label:"Dark",value:3},{label:"Pale",value:4}],onChange:e=>a({styles:e})}),"google"==A&&u&&(0,l.createElement)(O,{label:(0,c.__)("Custom style json","wd-framework"),help:(0,c.__)("Here you can paste the javascript array for your custom map style (the array needs to be valid or an error will be thrown!). Make sure that you have selected the custom style option first. Choose or customize a map from the following website: https://snazzymaps.com","wd-framework"),value:g,onChange:e=>a({customStyle:e})}),"google"==A&&(0,l.createElement)(M,{label:(0,c.__)("Has Areas","wd-framework"),help:C?"Has Areas":"No Areas",checked:C,onChange:e=>{a({hasAreas:e})}}),"google"==A&&C&&(0,l.createElement)(L,{label:(0,c.__)("Area width","wd-framework"),value:S,onChange:e=>a({areaWidth:e}),min:500,max:1e4,step:500}))),(0,l.createElement)("div",I,(0,l.createElement)("div",{id:"map",ref:j,style:{height:o}}))]}})},4184:function(e,t){var a;!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var a=arguments[t];if(a){var l=typeof a;if("string"===l||"number"===l)e.push(a);else if(Array.isArray(a)){if(a.length){var o=r.apply(null,a);o&&e.push(o)}}else if("object"===l){if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]")){e.push(a.toString());continue}for(var s in a)n.call(a,s)&&a[s]&&e.push(s)}}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(a=function(){return r}.apply(t,[]))||(e.exports=a)}()}},a={};function n(e){var r=a[e];if(void 0!==r)return r.exports;var l=a[e]={exports:{}};return t[e](l,l.exports,n),l.exports}n.m=t,e=[],n.O=function(t,a,r,l){if(!a){var o=1/0;for(d=0;d<e.length;d++){a=e[d][0],r=e[d][1],l=e[d][2];for(var s=!0,i=0;i<a.length;i++)(!1&l||o>=l)&&Object.keys(n.O).every((function(e){return n.O[e](a[i])}))?a.splice(i--,1):(s=!1,l<o&&(o=l));if(s){e.splice(d--,1);var c=r();void 0!==c&&(t=c)}}return t}l=l||0;for(var d=e.length;d>0&&e[d-1][2]>l;d--)e[d]=e[d-1];e[d]=[a,r,l]},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e={8399:0,6599:0,7304:0};n.O.j=function(t){return 0===e[t]};var t=function(t,a){var r,l,o=a[0],s=a[1],i=a[2],c=0;if(o.some((function(t){return 0!==e[t]}))){for(r in s)n.o(s,r)&&(n.m[r]=s[r]);if(i)var d=i(n)}for(t&&t(a);c<o.length;c++)l=o[c],n.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return n.O(d)},a=self.webpackChunkwebdevia_blocks=self.webpackChunkwebdevia_blocks||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))}();var r=n.O(void 0,[7304],(function(){return n(7879)}));r=n.O(r)}();