UNPKG

gmaps.core

Version:

gmaps.js core that contains the base for create simple maps using Google Maps API

1 lines 14.5 kB
var expect=function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){function r(t){return"function"==typeof t}function o(t){return function(){var e=Array.prototype.slice.call(arguments,0);return t.apply(l,[this.actual].concat(e)),this}}function i(t,e,n){return n=n||l.deepEqual,t.some(function(t){try{return n(t,e)!==!1}catch(r){return!1}})}function u(t,e){return-1!==t.indexOf(e)}function a(t){return this instanceof a?void(this.actual=t):new a(t)}function s(t){g(t).toBeA(Function);var e,n,r,o=function(){if(o.calls.push({context:this,arguments:Array.prototype.slice.call(arguments,0)}),e)return e.apply(this,arguments);if(n)throw n;return r};return o.calls=[],o.andCall=function(t){return e=t,o},o.andCallThrough=function(){return o.andCall(t)},o.andThrow=function(t){return n=t,o},o.andReturn=function(t){return r=t,o},o.getLastCall=function(){return o.calls[o.calls.length-1]},o.__isSpy=!0,o}function c(t,e){return g(t[e]).toBeA(Function,h('%s does not have a method named "%s"',p(t),e)),t[e].__isSpy||(t[e]=s(t[e])),t[e]}var l=n(2),p=n(1).inspect,f=n(1).isRegExp,h=n(1).format,d=Array.isArray,g=a;a.prototype.toBe=o(l.strictEqual),a.prototype.toNotBe=o(l.notStrictEqual),a.prototype.toEqual=o(l.deepEqual),a.prototype.toNotEqual=o(l.notDeepEqual),a.prototype.toThrow=o(l["throws"]),a.prototype.toNotThrow=o(l.doesNotThrow),a.prototype.toExist=function(t){return t=t||p(this.actual)+" should exist",l(this.actual,t),this},a.prototype.toNotExist=function(t){return t=t||p(this.actual)+" should not exist",l(!this.actual,t),this},a.prototype.toBeA=function(t,e){return l(r(t)||"string"==typeof t,"The expected value used in toBeA(n) must be a function or string"),r(t)?(e=e||p(this.actual)+" is not a "+(t.name||t.toString()),l(this.actual instanceof t,e)):(e=e||p(this.actual)+" is not a(n) "+t,l(typeof this.actual===t,e)),this},a.prototype.toMatch=function(t,e){return l(f(t),"The expected value used in toMatch must be a RegExp"),e=e||p(this.actual)+" does not match "+p(t),l(t.test(this.actual),e),this},a.prototype.toBeLessThan=function(t,e){return e=e||p(this.actual)+" is not less than "+p(t),l(this.actual<t,e),this},a.prototype.toBeGreaterThan=function(t,e){return e=e||p(this.actual)+" is not greater than "+p(t),l(this.actual>t,e),this},a.prototype.toInclude=function(t,e,n){return l(d(this.actual)||"string"==typeof this.actual,"The actual value used in toInclude/toContain must be an array or string"),"string"==typeof e&&(n=e,e=null),n=n||p(this.actual)+" does not include "+p(t),d(this.actual)?l(i(this.actual,t,e),n):l(u(this.actual,t),n),this},a.prototype.toExclude=function(t,e,n){return l(d(this.actual)||"string"==typeof this.actual,"The actual value used in toExclude/toNotContain must be an array or string"),"string"==typeof e&&(n=e,e=null),n=n||p(this.actual)+" includes "+p(t),d(this.actual)?l(!i(this.actual,t,e),n):l(!u(this.actual,t),n),this},a.prototype.toHaveBeenCalled=function(t){var e=this.actual;return l(e.__isSpy,"The actual value used in toHaveBeenCalled must be a spy"),g(e.calls.length).toBeGreaterThan(0,t||"spy was not called"),this},a.prototype.toHaveBeenCalledWith=function(){var t=this.actual;l(t.__isSpy,"The actual value used in toHaveBeenCalledWith must be a spy");var e=Array.prototype.slice.call(arguments,0);return l(t.calls.some(function(t){try{return g(t.arguments).toEqual(e),!0}catch(n){return!1}}),h("spy was never called with %s",p(e))),this},a.createSpy=s,a.spyOn=c;var y={toBeAn:"toBeA",toBeFewerThan:"toBeLessThan",toBeMoreThan:"toBeGreaterThan",toContain:"toInclude",toNotContain:"toExclude"};for(var m in y)a.prototype[m]=a.prototype[y[m]];t.exports=a},function(t,e,n){(function(t,r){function o(t,n){var r={seen:[],stylize:u};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),g(n)?r.showHidden=n:n&&e._extend(r,n),E(r.showHidden)&&(r.showHidden=!1),E(r.depth)&&(r.depth=2),E(r.colors)&&(r.colors=!1),E(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=i),s(r,t,r.depth)}function i(t,e){var n=o.styles[e];return n?"["+o.colors[n][0]+"m"+t+"["+o.colors[n][1]+"m":t}function u(t){return t}function a(t){var e={};return t.forEach(function(t){e[t]=!0}),e}function s(t,n,r){if(t.customInspect&&n&&A(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,t);return b(o)||(o=s(t,o,r)),o}var i=c(t,n);if(i)return i;var u=Object.keys(n),g=a(u);if(t.showHidden&&(u=Object.getOwnPropertyNames(n)),j(n)&&(u.indexOf("message")>=0||u.indexOf("description")>=0))return l(n);if(0===u.length){if(A(n)){var y=n.name?": "+n.name:"";return t.stylize("[Function"+y+"]","special")}if(x(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(O(n))return t.stylize(Date.prototype.toString.call(n),"date");if(j(n))return l(n)}var m="",v=!1,w=["{","}"];if(d(n)&&(v=!0,w=["[","]"]),A(n)){var E=n.name?": "+n.name:"";m=" [Function"+E+"]"}if(x(n)&&(m=" "+RegExp.prototype.toString.call(n)),O(n)&&(m=" "+Date.prototype.toUTCString.call(n)),j(n)&&(m=" "+l(n)),0===u.length&&(!v||0==n.length))return w[0]+m+w[1];if(0>r)return x(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special");t.seen.push(n);var S;return S=v?p(t,n,r,g,u):u.map(function(e){return f(t,n,r,g,e,v)}),t.seen.pop(),h(S,m,w)}function c(t,e){if(E(e))return t.stylize("undefined","undefined");if(b(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}return v(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):y(e)?t.stylize("null","null"):void 0}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function p(t,e,n,r,o){for(var i=[],u=0,a=e.length;a>u;++u)i.push(z(e,String(u))?f(t,e,n,r,String(u),!0):"");return o.forEach(function(o){o.match(/^\d+$/)||i.push(f(t,e,n,r,o,!0))}),i}function f(t,e,n,r,o,i){var u,a,c;if(c=Object.getOwnPropertyDescriptor(e,o)||{value:e[o]},c.get?a=c.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):c.set&&(a=t.stylize("[Setter]","special")),z(r,o)||(u="["+o+"]"),a||(t.seen.indexOf(c.value)<0?(a=y(n)?s(t,c.value,null):s(t,c.value,n-1),a.indexOf("\n")>-1&&(a=i?a.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+a.split("\n").map(function(t){return" "+t}).join("\n"))):a=t.stylize("[Circular]","special")),E(u)){if(i&&o.match(/^\d+$/))return a;u=JSON.stringify(""+o),u.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(u=u.substr(1,u.length-2),u=t.stylize(u,"name")):(u=u.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),u=t.stylize(u,"string"))}return u+": "+a}function h(t,e,n){var r=0,o=t.reduce(function(t,e){return r++,e.indexOf("\n")>=0&&r++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return o>60?n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}function d(t){return Array.isArray(t)}function g(t){return"boolean"==typeof t}function y(t){return null===t}function m(t){return null==t}function v(t){return"number"==typeof t}function b(t){return"string"==typeof t}function w(t){return"symbol"==typeof t}function E(t){return void 0===t}function x(t){return S(t)&&"[object RegExp]"===B(t)}function S(t){return"object"==typeof t&&null!==t}function O(t){return S(t)&&"[object Date]"===B(t)}function j(t){return S(t)&&("[object Error]"===B(t)||t instanceof Error)}function A(t){return"function"==typeof t}function T(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function B(t){return Object.prototype.toString.call(t)}function N(t){return 10>t?"0"+t.toString(10):t.toString(10)}function q(){var t=new Date,e=[N(t.getHours()),N(t.getMinutes()),N(t.getSeconds())].join(":");return[t.getDate(),_[t.getMonth()],e].join(" ")}function z(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var D=/%[sdj%]/g;e.format=function(t){if(!b(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(o(arguments[n]));return e.join(" ")}for(var n=1,r=arguments,i=r.length,u=String(t).replace(D,function(t){if("%%"===t)return"%";if(n>=i)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return t}}),a=r[n];i>n;a=r[++n])u+=y(a)||!S(a)?" "+a:" "+o(a);return u},e.deprecate=function(n,o){function i(){if(!u){if(r.throwDeprecation)throw new Error(o);r.traceDeprecation?console.trace(o):console.error(o),u=!0}return n.apply(this,arguments)}if(E(t.process))return function(){return e.deprecate(n,o).apply(this,arguments)};if(r.noDeprecation===!0)return n;var u=!1;return i};var C,k={};e.debuglog=function(t){if(E(C)&&(C=r.env.NODE_DEBUG||""),t=t.toUpperCase(),!k[t])if(new RegExp("\\b"+t+"\\b","i").test(C)){var n=r.pid;k[t]=function(){var r=e.format.apply(e,arguments);console.error("%s %d: %s",t,n,r)}}else k[t]=function(){};return k[t]},e.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=g,e.isNull=y,e.isNullOrUndefined=m,e.isNumber=v,e.isString=b,e.isSymbol=w,e.isUndefined=E,e.isRegExp=x,e.isObject=S,e.isDate=O,e.isError=j,e.isFunction=A,e.isPrimitive=T,e.isBuffer=n(5);var _=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.log=function(){console.log("%s - %s",q(),e.format.apply(e,arguments))},e.inherits=n(4),e._extend=function(t,e){if(!e||!S(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t}}).call(e,function(){return this}(),n(3))},function(t,e,n){function r(t,e){return h.isUndefined(e)?""+e:h.isNumber(e)&&!isFinite(e)?e.toString():h.isFunction(e)||h.isRegExp(e)?e.toString():e}function o(t,e){return h.isString(t)?t.length<e?t:t.slice(0,e):t}function i(t){return o(JSON.stringify(t.actual,r),128)+" "+t.operator+" "+o(JSON.stringify(t.expected,r),128)}function u(t,e,n,r,o){throw new y.AssertionError({message:n,actual:t,expected:e,operator:r,stackStartFunction:o})}function a(t,e){t||u(t,!0,e,"==",y.ok)}function s(t,e){if(t===e)return!0;if(h.isBuffer(t)&&h.isBuffer(e)){if(t.length!=e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}return h.isDate(t)&&h.isDate(e)?t.getTime()===e.getTime():h.isRegExp(t)&&h.isRegExp(e)?t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase:h.isObject(t)||h.isObject(e)?l(t,e):t==e}function c(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function l(t,e){if(h.isNullOrUndefined(t)||h.isNullOrUndefined(e))return!1;if(t.prototype!==e.prototype)return!1;if(h.isPrimitive(t)||h.isPrimitive(e))return t===e;var n=c(t),r=c(e);if(n&&!r||!n&&r)return!1;if(n)return t=d.call(t),e=d.call(e),s(t,e);var o,i,u=m(t),a=m(e);if(u.length!=a.length)return!1;for(u.sort(),a.sort(),i=u.length-1;i>=0;i--)if(u[i]!=a[i])return!1;for(i=u.length-1;i>=0;i--)if(o=u[i],!s(t[o],e[o]))return!1;return!0}function p(t,e){return t&&e?"[object RegExp]"==Object.prototype.toString.call(e)?e.test(t):t instanceof e?!0:e.call({},t)===!0?!0:!1:!1}function f(t,e,n,r){var o;h.isString(n)&&(r=n,n=null);try{e()}catch(i){o=i}if(r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),t&&!o&&u(o,n,"Missing expected exception"+r),!t&&p(o,n)&&u(o,n,"Got unwanted exception"+r),t&&o&&n&&!p(o,n)||!t&&o)throw o}var h=n(1),d=Array.prototype.slice,g=Object.prototype.hasOwnProperty,y=t.exports=a;y.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=i(this),this.generatedMessage=!0);var e=t.stackStartFunction||u;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var n=new Error;if(n.stack){var r=n.stack,o=e.name,a=r.indexOf("\n"+o);if(a>=0){var s=r.indexOf("\n",a+1);r=r.substring(s+1)}this.stack=r}}},h.inherits(y.AssertionError,Error),y.fail=u,y.ok=a,y.equal=function(t,e,n){t!=e&&u(t,e,n,"==",y.equal)},y.notEqual=function(t,e,n){t==e&&u(t,e,n,"!=",y.notEqual)},y.deepEqual=function(t,e,n){s(t,e)||u(t,e,n,"deepEqual",y.deepEqual)},y.notDeepEqual=function(t,e,n){s(t,e)&&u(t,e,n,"notDeepEqual",y.notDeepEqual)},y.strictEqual=function(t,e,n){t!==e&&u(t,e,n,"===",y.strictEqual)},y.notStrictEqual=function(t,e,n){t===e&&u(t,e,n,"!==",y.notStrictEqual)},y["throws"]=function(){f.apply(this,[!0].concat(d.call(arguments)))},y.doesNotThrow=function(){f.apply(this,[!1].concat(d.call(arguments)))},y.ifError=function(t){if(t)throw t};var m=Object.keys||function(t){var e=[];for(var n in t)g.call(t,n)&&e.push(n);return e}},function(t){function e(){}var n=t.exports={};n.nextTick=function(){var t="undefined"!=typeof window&&window.setImmediate,e="undefined"!=typeof window&&window.MutationObserver,n="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(t)return function(t){return window.setImmediate(t)};var r=[];if(e){var o=document.createElement("div"),i=new MutationObserver(function(){var t=r.slice();r.length=0,t.forEach(function(t){t()})});return i.observe(o,{attributes:!0}),function(t){r.length||o.setAttribute("yes","no"),r.push(t)}}return n?(window.addEventListener("message",function(t){var e=t.source;if((e===window||null===e)&&"process-tick"===t.data&&(t.stopPropagation(),r.length>0)){var n=r.shift();n()}},!0),function(t){r.push(t),window.postMessage("process-tick","*")}):function(t){setTimeout(t,0)}}(),n.title="browser",n.browser=!0,n.env={},n.argv=[],n.on=e,n.addListener=e,n.once=e,n.off=e,n.removeListener=e,n.removeAllListeners=e,n.emit=e,n.binding=function(){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(){throw new Error("process.chdir is not supported")}},function(t){t.exports="function"==typeof Object.create?function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}}]);