dolphin-leaflet
Version:
leaflet for dmap
7 lines • 13.8 kB
JavaScript
/*! version:1.1.0 */
webpackJsonp([4],{168:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_RESULT__,_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};/*! catiline 2.4.2 2013-08-08*/
/*!©2013 Calvin Metcalf @license MIT https://github.com/calvinmetcalf/catiline */
"undefined"==typeof document?(self._noTransferable=!0,self.onmessage=function(e){eval(e.data)}):function(global){"use strict";function regexImports(e){for(var t=e,n=!0,r={},a=function(e,t){t&&t.split(",").forEach(function(e){r[catiline.makeUrl(e.match(/\s*[\'\"](\S*)[\'\"]\s*/)[1])]=!0})};n;)n=t.match(/(importScripts\(.*?\);?)/),t=t.replace(/(importScripts\(\s*(?:[\'\"].*?[\'\"])?\s*\);?)/,"\n"),n&&n[0].replace(/importScripts\(\s*([\'\"].*?[\'\"])?\s*\);?/g,a);return r=Object.keys(r),[r,t]}function moveImports(e){var t=regexImports(e),n=t[0],r=t[1];return n.length>0?"importScripts('"+n.join("','")+"');\n"+r:r}function moveIimports(e){var t=regexImports(e),n=t[0],r=t[1];return n.length>0?"importScripts('"+n.join("','")+"');eval(__scripts__);\n"+r:r}function getPath(){if("undefined"!=typeof SHIM_WORKER_PATH)return SHIM_WORKER_PATH;if("SHIM_WORKER_PATH"in catiline)return catiline.SHIM_WORKER_PATH;for(var e=document.getElementsByTagName("script"),t=e.length,n=0;n<t;){if(/catiline(\.min)?\.js/.test(e[n].src))return e[n].src;n++}}function appendScript(e,t){var n=e.createElement("script");void 0!==n.text?n.text=t:n.innerHTML=t,"complete"===e.readyState?e.documentElement.appendChild(n):e.onreadystatechange=function(){"complete"===e.readyState&&e.documentElement.appendChild(n)}}function actualMakeI(e,t){var n=document.createElement("iframe");return n.style.display="none",document.body.appendChild(n),appendScript(n.contentWindow.document,["try{ ","var __scripts__='';function importScripts(scripts){","\tif(Array.isArray(scripts)&&scripts.length>0){","\t\tscripts.forEach(function(url){","\t\t\tvar ajax = new XMLHttpRequest();","\t\t\tajax.open('GET',url,false);","\t\t\tajax.send();__scripts__+=ajax.responseText;","\t\t\t__scripts__+='\\n;';","\t\t});","\t}","};",e,"}catch(e){","\twindow.parent.postMessage(['"+t+"','error'],'*')","}"].join("\n")),n}function makeIframe(e,t){var n=catiline.deferred();return"complete"===document.readyState?n.resolve(actualMakeI(e,t)):window.addEventListener("load",function(){n.resolve(actualMakeI(e,t))},!1),n.promise}function makeFallbackWorker(e){catiline._noTransferable=!0;var t=new Worker(getPath());return t.postMessage(e),t}function catiline(e,t,n){return 1===arguments.length||!t||t<=1?new catiline.Worker(e):new catiline.Queue(e,t,n)}function initBrowser(e){var t=global.cw;e.noConflict=function(n){global.cw=t,n&&(global[n]=e)},global.catiline=e,global.cw=e,"communist"in global||(global.communist=e)}/*!From setImmediate Copyright (c) 2012 Barnesandnoble.com,llc, Donavon West, and Domenic Denicola @license MIT https://github.com/NobleJS/setImmediate */
!function(attachTo,global){function isStringAndStartsWith(e,t){return"string"==typeof e&&e.substring(0,t.length)===t}function onGlobalMessage(e){if(e.source===global&&isStringAndStartsWith(e.data,MESSAGE_PREFIX)){var t=e.data.substring(MESSAGE_PREFIX.length);tasks.runIfPresent(t)}}var tasks=function(){function Task(e,t){this.handler=e,this.args=t}Task.prototype.run=function(){if("function"==typeof this.handler)this.handler.apply(void 0,this.args);else{var scriptSource=""+this.handler;eval(scriptSource)}};var nextHandle=1,tasksByHandle={},currentlyRunningATask=!1;return{addFromSetImmediateArguments:function(e){var t=e[0],n=Array.prototype.slice.call(e,1),r=new Task(t,n),a=nextHandle++;return tasksByHandle[a]=r,a},runIfPresent:function(e){if(currentlyRunningATask)global.setTimeout(function(){tasks.runIfPresent(e)},0);else{var t=tasksByHandle[e];if(t){currentlyRunningATask=!0;try{t.run()}finally{delete tasksByHandle[e],currentlyRunningATask=!1}}}},remove:function(e){delete tasksByHandle[e]}}}(),MESSAGE_PREFIX="com.catilinejs.setImmediate"+Math.random();global.addEventListener?global.addEventListener("message",onGlobalMessage,!1):global.attachEvent("onmessage",onGlobalMessage),attachTo.setImmediate=function(){var e=tasks.addFromSetImmediateArguments(arguments);return global.postMessage(MESSAGE_PREFIX+e,"*"),e}}(catiline,global),/*! Promiscuous ©2013 Ruben Verborgh @license MIT https://github.com/RubenVerborgh/promiscuous*/
function(e,t){function n(){function e(){this.then=function(e,n){return t(e,n)}}var t=function(e,c,s){var u;if(e!==t)return u=r(),t.queue.push({deferred:u,resolve:e,reject:c}),u.promise;for(var f,l,_,d=c?"resolve":"reject",m=0,p=t.queue.length;m<p;m++)f=t.queue[m],l=f.deferred,_=f[d],(void 0===_?"undefined":_typeof(_))!==o?l[d](s):i(_,s,l);t=a(n,s,c)},n=new e;this.promise=n,t.queue=[],this.resolve=function(e){t.queue&&t(t,!0,e)},this.reject=function(e){t.queue&&t(t,!1,e)}}function r(){return new n}function a(e,t,n){return function(a,c){var s,u=n?a:c;return(void 0===u?"undefined":_typeof(u))!==o?e:(i(u,t,s=r()),s.promise)}}function i(e,n,r){t(function(){var t;try{t=e(n),t&&_typeof(t.then)===o?t.then(r.resolve,r.reject):r.resolve(t)}catch(e){r.reject(e)}})}var o="function";e.resolve=function(e){var t={};return t.then=a(t,e,!0),t},e.reject=function(e){var t={};return t.then=a(t,e,!1),t},e.deferred=r,e.all=function(t){var n=e.deferred(),r=t.length,a=0,i=[],o=function(e){return function(t){i[e]=t,++a===r&&n.resolve(i)}};return t.forEach(function(e,t){e.then(o(t),function(e){n.reject(e)})}),n.promise}}(catiline,catiline.setImmediate),catiline._hasWorker="undefined"!=typeof Worker&&"undefined"==typeof fakeLegacy,catiline.URL=window.URL||window.webkitURL,catiline._noTransferable=!catiline.URL,catiline.makeIWorker=function(e,t){var n=moveIimports(e.join("")),r={onmessage:function(){}},a=makeIframe(n,t);return window.addEventListener("message",function(e){"string"==typeof e.data&&e.data.length>t.length&&e.data.slice(0,t.length)===t&&r.onmessage({data:JSON.parse(e.data.slice(t.length))})}),r.postMessage=function(e){a.then(function(t){t.contentWindow.postMessage(JSON.stringify(e),"*")})},r.terminate=function(){a.then(function(e){document.body.removeChild(e)})},r},catiline.makeWorker=function(e,t){if(!catiline._hasWorker)return catiline.makeIWorker(e,t);var n,r=moveImports(e.join(""));if(catiline._noTransferable)return makeFallbackWorker(r);try{n=new Worker(catiline.URL.createObjectURL(new Blob([r],{type:"text/javascript"})))}catch(a){try{n=makeFallbackWorker(r)}catch(r){n=catiline.makeIWorker(e,t)}}finally{return n}},catiline.makeUrl=function(e){var t=document.createElement("link");return t.href=e,t.href},catiline.Worker=function(e){function t(e,n){return e.indexOf(" ")>0?(e.split(" ").forEach(function(e){t(e,n)}),a):e in r?(r[e].forEach(function(e){e(n)}),a):a}"function"==typeof e&&(e={data:e});var n="com.catilinejs."+(catiline._hasWorker?"iframe":"worker")+Math.random(),r={},a=this;a.on=function(e,t,n){return n=n||a,e.indexOf(" ")>0?(e.split(" ").map(function(e){return a.on(e,t,n)},this),a):(e in r||(r[e]=[]),r[e].push(function(e){t.call(n,e)}),a)},a.fire=function(e,t,n){return catiline._noTransferable?f.postMessage([[e],t]):f.postMessage([[e],t],n),a},a.off=function(e,t){return e.indexOf(" ")>0?(e.split(" ").map(function(e){return a.off(e,t)}),a):e in r?(t?r[e].indexOf(t)>-1&&(r[e].length>1?delete r[e]:r[e].splice(r[e].indexOf(t),1)):delete r[e],a):a};var i=0,o=[],c=function(e){"string"!=typeof e&&"preventDefault"in e&&(e.preventDefault(),e=e.message),o.forEach(function(t){t&&t.reject(e)})};e.__codeWord__='"'+n+'"',"initialize"in e||(e.initialize="init"in e?e.init:function(){});var s="{\n\t";for(var u in e)0!==i?s+=",\n\t":i++,s=s+u+":"+e[u].toString(),a[u]=function(e){return function(t,r){var a=o.length;return o[a]=catiline.deferred(),catiline._noTransferable?f.postMessage([[n,a],e,t]):f.postMessage([[n,a],e,t],r),o[a].promise}}(u);s+="}";var f=catiline.makeWorker(["'use strict';\n\nvar _db = ",s,';\nvar listeners = {};\nvar __iFrame__ = typeof document!=="undefined";\nvar __self__={onmessage:function(e){\n\t_fire("messege",e.data[1]);\n\tif(e.data[0][0]===_db.__codeWord__){\n\t\treturn regMsg(e);\n\t}else{\n\t\t_fire(e.data[0][0],e.data[1]);\n\t}\n}};\nif(__iFrame__){\n\twindow.onmessage=function(e){\n\t\tif(typeof e.data === "string"){\n\t\t\te ={data: JSON.parse(e.data)};\n\t\t}\n\t\t__self__.onmessage(e);\n\t};\n}else{\n\tself.onmessage=__self__.onmessage;\n}\n__self__.postMessage=function(rawData, transfer){\n\tvar data;\n\tif(!self._noTransferable&&!__iFrame__){\n\t\tself.postMessage(rawData, transfer);\n\t}else if(__iFrame__){\n\t\tdata = _db.__codeWord__+JSON.stringify(rawData);\n\t\twindow.parent.postMessage(data,"*");\n\t}else if(self._noTransferable){\n\t\tself.postMessage(rawData);\n\t}\n};\n_db.on = function (eventName, func, scope) {\n\tif(eventName.indexOf(" ")>0){\n\t\treturn eventName.split(" ").map(function(v){\n\t\t\treturn _db.on(v,func,scope);\n\t\t},_db);\n\t}\n\tscope = scope || _db;\n\tif (!(eventName in listeners)) {\n\t\tlisteners[eventName] = [];\n\t}\n\tlisteners[eventName].push(function (a) {\n\t\tfunc.call(scope, a, _db);\n\t});\n};\nfunction _fire(eventName,data){\n\tif(eventName.indexOf(" ")>0){\n\t\teventName.split(" ").forEach(function(v){\n\t\t\t_fire(v,data);\n\t\t});\n\t\treturn;\n\t}\n\tif (!(eventName in listeners)) {\n\t\treturn;\n\t}\n\tlisteners[eventName].forEach(function (v) {\n\t\tv(data);\n\t});\n}\n\n_db.fire = function (eventName, data, transfer) {\n\t__self__.postMessage([[eventName], data], transfer);\n};\n_db.off=function(eventName,func){\n\tif(eventName.indexOf(" ")>0){\n\t\treturn eventName.split(" ").map(function(v){\n\t\t\treturn _db.off(v,func);\n\t\t});\n\t}\n\tif(!(eventName in listeners)){\n\t\treturn;\n\t}else if(!func){\n\t\tdelete listeners[eventName];\n\t}else{\n\t\tif(listeners[eventName].indexOf(func)>-1){\n\t\t\tif(listeners[eventName].length>1){\n\t\t\t\tdelete listeners[eventName];\n\t\t\t}else{\n\t\t\t\tlisteners[eventName].splice(listeners[eventName].indexOf(func),1);\n\t\t\t}\n\t\t}\n\t}\n};\nvar console={};\nfunction makeConsole(method){\n\treturn function(){\n\t\tvar len = arguments.length;\n\t\tvar out =[];\n\t\tvar i = 0;\n\t\twhile (i<len){\n\t\t\tout.push(arguments[i]);\n\t\t\ti++;\n\t\t}\n\t\t_db.fire("console",[method,out]);\n\t};\n}\n["log", "debug", "error", "info", "warn", "time", "timeEnd"].forEach(function(v){\n\tconsole[v]=makeConsole(v);\n});\nvar regMsg = function(e){\n\tvar cb=function(data,transfer){\n\t\t__self__.postMessage([e.data[0],data],transfer);\n\t};\n\tvar result;\n\tif(__iFrame__){\n\t\ttry{\n\t\t\tresult = _db[e.data[1]](e.data[2],cb,_db);\n\t\t}catch(e){\n\t\t\t_db.fire("error",JSON.stringify(e));\n\t\t}\n\t}else{\n\t\tresult = _db[e.data[1]](e.data[2],cb,_db);\n\t}\n\tif(typeof result !== "undefined"){\n\t\tcb(result);\n\t}\n};\n_db.initialize(_db);\n'],n);f.onmessage=function(e){t("message",e.data[1]),e.data[0][0]===n?(o[e.data[0][1]].resolve(e.data[1]),o[e.data[0][1]]=0):t(e.data[0][0],e.data[1])},a.on("error",c),f.onerror=function(e){t("error",e)},a.on("console",function(e){console[e[0]].apply(console,e[1])}),a._close=function(){return f.terminate(),c("closed"),catiline.resolve()},"close"in a||(a.close=a._close)},catiline.worker=function(e){return new catiline.Worker(e)},catiline.Queue=function(e,t,n){function r(e){e=e||"canceled",l=0;var t=f;return f=[],t.forEach(function(t){t[3].reject(e)}),o}function a(e){var t;l?(t=f.shift(),l--,c[e][t[0]](t[1],t[2]).then(function(n){a(e),t[3].resolve(n)},function(n){a(e),t[3].reject(n)})):(s++,u.push(e))}function i(e,r,i){if(n)return c[~~(Math.random()*t)][e](r,i);var o,_=catiline.deferred();return!l&&s?(o=u.pop(),s--,c[o][e](r,i).then(function(e){a(o),_.resolve(e)},function(e){a(o),_.reject(e)})):!l&&s||(l=f.push([e,r,i,_])),_.promise}var o=this;o.__batchcb__={},o.__batchtcb__={},o.batch=function(e){return"function"==typeof e?(o.__batchcb__.__cb__=e,o.__batchcb__):r(e)},o.batchTransfer=function(e){return"function"==typeof e?(o.__batchtcb__.__cb__=e,o.__batchtcb__):r(e)};for(var c=new Array(t),s=0,u=[],f=[],l=0;s<t;)c[s]=new catiline.Worker(e),u.push(s),s++;o.on=function(e,t,n){return c.forEach(function(r){r.on(e,t,n)}),o},o.off=function(e,t,n){return c.forEach(function(r){r.off(e,t,n)}),o};var _=function(e,t){return c.forEach(function(n){n.fire(e,t)}),o};o.fire=function(e,n){return c[~~(Math.random()*t)].fire(e,n),o},o.batch.fire=_,o.batchTransfer.fire=_;for(var d in e)o[d]=function(e){return function(t,n){return i(e,t,n)}}(d),o.batch[d]=function(e){return function(t){return catiline.all(t.map(function(t){return i(e,t)}))}}(d),o.__batchcb__[d]=function(e){return function(t){var n=this;return catiline.all(t.map(function(t){return i(e,t).then(n.__cb__)}))}}(d),o.batchTransfer[d]=function(e){return function(t){return catiline.all(t.map(function(t){return i(e,t[0],t[1])}))}}(d),o.__batchtcb__[d]=function(e){return function(t){var n=this;return catiline.all(t.map(function(t){return i(e,t[0],t[1]).then(n.__cb__)}))}}(d);o._close=function(){return catiline.all(c.map(function(e){return e._close()}))},"close"in o||(o.close=o._close)},catiline.queue=function(e,t,n){return new catiline.Queue(e,t,n)},void 0!==(__WEBPACK_AMD_DEFINE_RESULT__=function(e){return catiline.SHIM_WORKER_PATH=!function(){var e=new Error('Cannot find module "."');throw e.code="MODULE_NOT_FOUND",e}().toUrl("./catiline.js"),catiline}.call(exports,__webpack_require__,exports,module))&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),catiline.version="2.4.2"}(this)},169:function(e,t){function n(e){throw new Error("Cannot find module '"+e+"'.")}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id=169}});
//# sourceMappingURL=catiline.js.map