mahal_map 1.6.15 → 1.6.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/mahal_map.sdk.js +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Me=Object.defineProperty;var k=(r,e)=>{for(var t in e)Me(r,t,{get:e[t],enumerable:!0})};var y=class{constructor(e){this.map=e}setZoom(e,t=!0){t?this.map.easeTo({zoom:e}):this.map.setZoom(e)}setBearing(e,t=!0){t?this.map.easeTo({bearing:e}):this.map.setBearing(e)}setPitch(e,t=!0){t?this.map.easeTo({pitch:e}):this.map.setPitch(e)}toggle3D(e){this.map.easeTo({pitch:e?60:0,bearing:e?this.map.getBearing():0,duration:800})}resetNorth(){this.map.easeTo({bearing:0,pitch:0,duration:600})}flyTo(e){this.map.flyTo({speed:1.2,curve:1.42,essential:!0,...e})}getPitch(){return this.map.getPitch()}};var X="https://platform.mahal.tj/api/",D=/^([-+]?(?:[1-8]?\d(?:\.\d+)?|90(?:\.0+)?)),\s*([-+]?(?:180(?:\.0+)?|(?:(?:1[0-7]\d)|(?:[1-9]?\d))(?:\.\d+)?))$/,B=/^([-+]?(?:180(?:\.0+)?|(?:(?:1[0-7]\d)|(?:[1-9]?\d))(?:\.\d+)?)),\s*([-+]?(?:[1-8]?\d(?:\.\d+)?|90(?:\.0+)?))$/;var Y="https://mtile.gram.tj/custom-styles/dark-style.json",Q="https://mtile.gram.tj/custom-styles/mapstyle.json",ee="https://mtile.gram.tj/custom-styles/style_maptiler_basic_hn.json";var T="https://navi.gram.tj",L={light:"
|
|
1
|
+
var Me=Object.defineProperty;var k=(r,e)=>{for(var t in e)Me(r,t,{get:e[t],enumerable:!0})};var y=class{constructor(e){this.map=e}setZoom(e,t=!0){t?this.map.easeTo({zoom:e}):this.map.setZoom(e)}setBearing(e,t=!0){t?this.map.easeTo({bearing:e}):this.map.setBearing(e)}setPitch(e,t=!0){t?this.map.easeTo({pitch:e}):this.map.setPitch(e)}toggle3D(e){this.map.easeTo({pitch:e?60:0,bearing:e?this.map.getBearing():0,duration:800})}resetNorth(){this.map.easeTo({bearing:0,pitch:0,duration:600})}flyTo(e){this.map.flyTo({speed:1.2,curve:1.42,essential:!0,...e})}getPitch(){return this.map.getPitch()}};var X="https://platform.mahal.tj/api/",D=/^([-+]?(?:[1-8]?\d(?:\.\d+)?|90(?:\.0+)?)),\s*([-+]?(?:180(?:\.0+)?|(?:(?:1[0-7]\d)|(?:[1-9]?\d))(?:\.\d+)?))$/,B=/^([-+]?(?:180(?:\.0+)?|(?:(?:1[0-7]\d)|(?:[1-9]?\d))(?:\.\d+)?)),\s*([-+]?(?:[1-8]?\d(?:\.\d+)?|90(?:\.0+)?))$/;var Y="https://mtile.gram.tj/custom-styles/dark-style.json",Q="https://mtile.gram.tj/custom-styles/mapstyle.json",ee="https://mtile.gram.tj/custom-styles/style_maptiler_basic_hn.json";var T="https://navi.gram.tj",L={light:"road-urban-lab-v2",dark:"standard-night"};function A(r,e){return`${r}/maps/${e}.json`}function Z(r,e,t){let i=r.includes("?")?"&":"?";return`${r}${i}${e}=${encodeURIComponent(t)}`}function F(r,e,t){let i=r;return t&&(i=Z(i,"token",t)),e==="ru"&&(i=Z(i,"lang","ru")),i}var R="";function be(r){r!==""&&(R=r)}function Le(){R=""}var v=()=>R;var Ce=/<svg[\s>]/i,Se=/<(svg|path|g|circle|rect|polygon|line|polyline|ellipse|use)\b/i,C=(r,e,t)=>{let i=new RegExp(`\\s${e}="[^"]*"`,"i");return i.test(r)?r.replace(i,` ${e}="${t}"`):r.replace(/<svg\b/i,`<svg ${e}="${t}"`)},xe=r=>r.replace(/&/g,"&").replace(/"/g,"""),te=r=>`<image href="${xe(r)}" x="14" y="12" width="22" height="22" style="filter: brightness(0) invert(1);" />`,we=r=>{let e=r.trim();if(Ce.test(e)){let t=C(e,"x","14");return t=C(t,"y","12"),t=C(t,"width","22"),t=C(t,"height","22"),/\spreserveAspectRatio="/i.test(t)||(t=t.replace(/<svg\b/i,'<svg preserveAspectRatio="xMidYMid meet"')),t}return`<g transform="translate(14 12)">${e}</g>`},Ie=({innerSvg:r,innerUrl:e})=>{let t=r?.trim(),i=e?.trim();return t?Se.test(t)?we(t):te(t):i?te(i):""},re=(r,e={})=>`<svg
|
|
2
2
|
width="50"
|
|
3
3
|
height="62"
|
|
4
4
|
viewBox="0 0 50 62"
|