text: (function(t){function e(e){for(var n,c,l=e[0],s=e[1],r=e[2],p=0,d=[];p<l.length;p++)c=l[p],Object.prototype.hasOwnProperty.call(i,c)&&i[c]&&d.push(i[c][0]),i[c]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(t[n]=s[n]);u&&u(e);while(d.length)d.shift()();return a.push.apply(a,r||[]),o()}function o(){for(var t,e=0;e<a.length;e++){for(var o=a[e],n=!0,l=1;l<o.length;l++){var s=o[l];0!==i[s]&&(n=!1)}n&&(a.splice(e--,1),t=c(c.s=o[0]))}return t}var n={},i={app:0},a=[];function c(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,c),o.l=!0,o.exports}c.m=t,c.c=n,c.d=function(t,e,o){c.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},c.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},c.t=function(t,e){if(1&e&&(t=c(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(c.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)c.d(o,n,function(e){return t[e]}.bind(null,n));return o},c.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return c.d(e,"a",e),e},c.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},c.p="";var l=window["webpackJsonp"]=window["webpackJsonp"]||[],s=l.push.bind(l);l.push=e,l=l.slice();for(var r=0;r<l.length;r++)e(l[r]);var u=s;a.push([0,"chunk-vendors"]),o()})({0:function(t,e,o){t.exports=o("56d7")},"56d7":function(t,e,o){"use strict";o.r(e);o("cadf"),o("551c"),o("f751"),o("097d");var n=o("2b0e"),i=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("section",{staticClass:"examples"},[t._m(0),o("checkbox-map"),o("radio-map"),o("link-map"),o("tooltip-heat-map")],1)},a=[function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("h1",{staticClass:"examples__title"},[t._v("\n    Examples of "),o("a",{attrs:{href:"https://www.npmjs.com/package/vue-svg-map"}},[t._v("vue-svg-map")])])}],c=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("article",{staticClass:"examples__block"},[o("h2",{staticClass:"examples__block__title"},[t._v("\n    Taiwan SVG map as checkboxes\n  ")]),o("div",{staticClass:"examples__block__info"},[o("div",{staticClass:"examples__block__info__item"},[t._v("\n      Pointed location: "+t._s(t.pointedLocation)+"\n    ")]),o("div",{staticClass:"examples__block__info__item"},[t._v("\n      Focused location: "+t._s(t.focusedLocation)+"\n    ")]),o("div",{staticClass:"examples__block__info__item"},[t._v("\n      Selected locations:\n      "),o("ul",t._l(t.selectedLocations,(function(e){return o("li",{key:e},[t._v("\n          "+t._s(t.getSelectedLocationName(t.Taiwan,e))+"\n        ")])})),0)])]),o("div",{staticClass:"examples__block__map"},[o("checkbox-svg-map",{attrs:{map:t.Taiwan},on:{mouseover:t.pointLocation,mouseout:t.unpointLocation,focus:t.focusLocation,blur:t.blurLocation},model:{value:t.selectedLocations,callback:function(e){t.selectedLocations=e},expression:"selectedLocations"}})],1)])},l=[],s=o("a675");o("7514"),o("7f7f");function r(t){return t&&t.attributes.name.value}function u(t,e){return e&&t.locations.find((function(t){return t.id===e})).name}var p=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("svg-map",t._g(t._b({attrs:{role:"group","location-role":"checkbox","location-tabindex":"0","is-location-selected":t.isLocationSelected},on:{click:t.toggleLocation,keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"space",32,e.key,[" ","Spacebar"])?null:(e.preventDefault(),t.toggleLocation(e))}}},"svg-map",t.$attrs,!1),t.$listeners))},d=[],_=o("75fc"),f=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("svg",{staticClass:"svg-map",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:t.map.viewBox,"aria-label":t.map.label}},t._l(t.map.locations,(function(e,n){return o("path",t._g({key:e.id,staticClass:"svg-map__location",class:t.isLocationClassFunction?t.locationClass(e,n):t.locationClass,attrs:{id:e.id,name:e.name,d:e.path,tabindex:t.isLocationTabindexFunction?t.locationTabindex(e,n):t.locationTabindex,role:t.locationRole,"aria-label":e.name,"aria-checked":t.isLocationSelected&&t.isLocationSelected(e,n)}},t.$listeners))})),0)},m=[],v={name:"SvgMap",props:{map:{type:Object,required:!0,validator:function(t){return"string"===typeof t.viewBox&&Array.isArray(t.locations)&&t.locations.every((function(t){return"string"===typeof t.path&&"string"===typeof t.id}))}},locationClass:{type:[String,Function],default:null},locationTabindex:{type:[String,Function],default:null},locationRole:{type:String,default:null},isLocationSelected:{type:Function,default:null}},computed:{isLocationClassFunction:function(){return"function"===typeof this.locationClass},isLocationTabindexFunction:function(){return"function"===typeof this.locationTabindex}}},h=v,L=o("2877"),g=Object(L["a"])(h,f,m,!1,null,null,null),k=g.exports,b={name:"CheckboxSvgMap",components:{SvgMap:k},model:{event:"change"},props:{value:{type:Array,default:function(){return[]}}},methods:{isLocationSelected:function(t){return this.value.some((function(e){return e===t.id}))},toggleLocation:function(t){var e,o=t.target;e=o.attributes["aria-checked"]&&"true"===o.attributes["aria-checked"].value?this.value.filter((function(t){return t!==o.id})):[].concat(Object(_["a"])(this.value),[o.id]),this.$emit("change",e)}}},x=b,y=Object(L["a"])(x,p,d,!1,null,null,null),w=y.exports,C={name:"CheckboxMap",components:{CheckboxSvgMap:w},data:function(){return{Taiwan:s["a"],pointedLocation:null,focusedLocation:null,selectedLocations:[]}},methods:{pointLocation:function(t){this.pointedLocation=r(t.target)},unpointLocation:function(t){this.pointedLocation=null},focusLocation:function(t){this.focusedLocation=r(t.target)},blurLocation:function(t){this.focusedLocation=null},getSelectedLocationName:u}},S=C,O=Object(L["a"])(S,c,l,!1,null,null,null),A=O.exports,M=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("article",{staticClass:"examples__block"},[o("h2",{staticClass:"examples__block__title"},[t._v("\n    Australia SVG map as radio buttons\n  ")]),o("div",{staticClass:"examples__block__info"},[o("div",{staticClass:"examples__block__info__item"},[t._v("\n      Pointed location: "+t._s(t.pointedLocation)+"\n    ")]),o("div",{staticClass:"examples__block__info__item"},[t._v("\n      Focused location: "+t._s(t.focusedLocation)+"\n    ")]),o("div",{staticClass:"examples__block__info__item"},[t._v("\n      Selected location: "+t._s(t.getSelectedLocationName(t.Australia,t.selectedLocation))+"\n    ")])]),o("div",{staticClass:"examples__block__map examples__block__map--australia"},[o("radio-svg-map",{attrs:{map:t.Australia},on:{mouseover:t.pointLocation,mouseout:t.unpointLocation,focus:t.focusLocation,blur:t.blurLocation},model:{value:t.selectedLocation,callback:function(e){t.selectedLocation=e},expression:"selectedLocation"}})],1)])},j=[],$=o("55bb"),T=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("svg-map",t._g(t._b({ref:"svg",attrs:{role:"radiogroup","location-role":"radio","location-tabindex":t.getLocationTabindex,"is-location-selected":t.isLocationSelected},on:{click:function(e){return t.selectLocation(e.target)},keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"space",32,e.key,[" ","Spacebar"])?null:(e.preventDefault(),t.toggleLocation(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:(e.preventDefault(),t.selectNextLocation(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"right",39,e.key,["Right","ArrowRight"])?null:"button"in e&&2!==e.button?null:(e.preventDefault(),t.selectNextLocation(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?null:(e.preventDefault(),t.selectPreviousLocation(e))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?null:"button"in e&&0!==e.button?null:(e.preventDefault(),t.selectPreviousLocation(e))}]}},"svg-map",t.$attrs,!1),t.$listeners))},F=[],P={name:"RadioSvgMap",components:{SvgMap:k},model:{event:"change"},props:{value:{type:String,default:null}},mounted:function(){this.locations=this.$refs.svg.$el.querySelectorAll("path")},methods:{getLocationTabindex:function(t,e){var o=null;return o=this.value?this.isLocationSelected(t)?"0":"-1":0===e?"0":"-1",o},isLocationSelected:function(t){return this.value===t.id},selectLocation:function(t){t.id!==this.value&&(t.focus(),this.$emit("change",t.id))},toggleLocation:function(t){var e=t.target;this.value!==e.id&&this.selectLocation(e)},selectNextLocation:function(t){var e=t.target;this.selectLocation(e.nextSibling||this.locations[0])},selectPreviousLocation:function(t){var e=t.target;this.selectLocation(e.previousSibling||this.locations[this.locations.length-1])}}},E=P,N=Object(L["a"])(E,T,F,!1,null,null,null),R=N.exports,D={name:"RadioMap",components:{RadioSvgMap:R},data:function(){return{Australia:$["a"],pointedLocation:null,focusedLocation:null,selectedLocation:null}},methods:{pointLocation:function(t){this.pointedLocation=r(t.target)},unpointLocation:function(t){this.pointedLocation=null},focusLocation:function(t){this.focusedLocation=r(t.target)},blurLocation:function(t){this.focusedLocation=null},getSelectedLocationName:u}},B=D,G=Object(L["a"])(B,M,j,!1,null,null,null),U=G.exports,V=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("article",{staticClass:"examples__block"},[o("h2",{staticClass:"examples__block__title"},[t._v("\n    France SVG map as links\n  ")]),o("div",{staticClass:"examples__block__info"},[o("div",{staticClass:"examples__block__info__item"},[t._v("\n      Pointed location: "+t._s(t.pointedLocation)+"\n    ")]),o("div",{staticClass:"examples__block__info__item"},[t._v("\n      Focused location: "+t._s(t.focusedLocation)+"\n    ")]),o("div",{staticClass:"examples__block__info__item"},[t._v("\n      Clicked location: "+t._s(t.clickedLocation)+"\n    ")])]),o("div",{staticClass:"examples__block__map"},[o("svg-map",{attrs:{map:t.France,"location-role":"link"},on:{mouseover:t.pointLocation,mouseout:t.unpointLocation,focus:t.focusLocation,blur:t.blurLocation,click:t.clickLocation}})],1)])},q=[],H=o("a16d"),J={ara:"https://en.wikipedia.org/wiki/Auvergne-Rh%C3%B4ne-Alpes",bfc:"https://en.wikipedia.org/wiki/Bourgogne-Franche-Comt%C3%A9",bre:"https://en.wikipedia.org/wiki/Brittany_(administrative_region)",cvl:"https://en.wikipedia.org/wiki/Centre-Val_de_Loire",cor:"https://en.wikipedia.org/wiki/Corsica",ges:"https://en.wikipedia.org/wiki/Grand_Est",hdf:"https://en.wikipedia.org/wiki/Hauts-de-France",idf:"https://en.wikipedia.org/wiki/%C3%8Ele-de-France",nor:"https://en.wikipedia.org/wiki/Normandy",naq:"https://en.wikipedia.org/wiki/Nouvelle-Aquitaine",occ:"https://en.wikipedia.org/wiki/Occitanie_(administrative_region)",pdl:"https://en.wikipedia.org/wiki/Pays_de_la_Loire",pac:"https://en.wikipedia.org/wiki/Provence-Alpes-C%C3%B4te_d%27Azur"},z={name:"LinkMap",components:{SvgMap:k},data:function(){return{France:H["a"],pointedLocation:null,focusedLocation:null,clickedLocation:null}},methods:{pointLocation:function(t){this.pointedLocation=r(t.target)},unpointLocation:function(t){this.pointedLocation=null},focusLocation:function(t){this.focusedLocation=r(t.target)},blurLocation:function(t){this.focusedLocation=null},clickLocation:function(t){this.clickedLocation=r(t.target),window.open(J[t.target.id],"_blank")}}},X=z,Y=Object(L["a"])(X,V,q,!1,null,null,null),I=Y.exports,K=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("article",{staticClass:"examples__block"},[o("h2",{staticClass:"examples__block__title"},[t._v("\n    USA SVG heat map with tooltips\n  ")]),o("div",{staticClass:"examples__block__map examples__block__map--usa"},[o("svg-map",{attrs:{map:t.USA,"location-class":t.getLocationClass},on:{mouseover:t.pointLocation,mouseout:t.unpointLocation,mousemove:t.moveOnLocation}}),o("div",{staticClass:"examples__block__map__tooltip",style:t.tooltipStyle},[t._v("\n      "+t._s(t.pointedLocation)+"\n    ")])],1)])},Q=[],W=o("3ab1"),Z={name:"TooltipHeatMap",components:{SvgMap:k},data:function(){return{USA:W["a"],pointedLocation:null,tooltipStyle:null}},methods:{pointLocation:function(t){this.pointedLocation=r(t.target)},unpointLocation:function(t){this.pointedLocation=null,this.tooltipStyle={display:"none"}},moveOnLocation:function(t){this.tooltipStyle={display:"block",top:"".concat(t.clientY+10,"px"),left:"".concat(t.clientX-100,"px")}},getLocationClass:function(t,e){return"svg-map__location svg-map__location--heat".concat(e%4)}}},tt=Z,et=Object(L["a"])(tt,K,Q,!1,null,null,null),ot=et.exports,nt={name:"App",components:{CheckboxMap:A,RadioMap:U,LinkMap:I,TooltipHeatMap:ot}},it=nt,at=Object(L["a"])(it,i,a,!1,null,null,null),ct=at.exports;o("b107");n["a"].config.productionTip=!1,new n["a"]({render:function(t){return t(ct)}}).$mount("#app")},b107:function(t,e,o){}});
  //# sourceMappingURL=app.84541421.js.map