@vaadin/bundles 25.0.0-alpha3 → 25.0.0-alpha5

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.
Files changed (192) hide show
  1. package/node_modules_ol_ImageCanvas_js.js +76 -83
  2. package/node_modules_ol_ImageCanvas_js.js.map +1 -1
  3. package/node_modules_ol_TileRange_js.js +128 -110
  4. package/node_modules_ol_TileRange_js.js.map +1 -1
  5. package/node_modules_ol_Tile_js.js +279 -0
  6. package/node_modules_ol_Tile_js.js.map +1 -0
  7. package/node_modules_ol_VectorRenderTile_js.js +428 -143
  8. package/node_modules_ol_VectorRenderTile_js.js.map +1 -1
  9. package/node_modules_ol_VectorTile_js.js +405 -119
  10. package/node_modules_ol_VectorTile_js.js.map +1 -1
  11. package/node_modules_ol_control_MousePosition_js.js +327 -0
  12. package/node_modules_ol_control_MousePosition_js.js.map +1 -0
  13. package/node_modules_ol_control_ZoomToExtent_js.js +118 -0
  14. package/node_modules_ol_control_ZoomToExtent_js.js.map +1 -0
  15. package/node_modules_ol_events_SnapEvent_js.js +79 -0
  16. package/node_modules_ol_events_SnapEvent_js.js.map +1 -0
  17. package/node_modules_ol_featureloader_js.js +205 -0
  18. package/node_modules_ol_featureloader_js.js.map +1 -0
  19. package/node_modules_ol_geom_Circle_js.js +300 -0
  20. package/node_modules_ol_geom_Circle_js.js.map +1 -0
  21. package/node_modules_ol_geom_GeometryCollection_js.js +369 -0
  22. package/node_modules_ol_geom_GeometryCollection_js.js.map +1 -0
  23. package/node_modules_ol_geom_MultiPoint_js.js +228 -0
  24. package/node_modules_ol_geom_MultiPoint_js.js.map +1 -0
  25. package/node_modules_ol_geom_flat_center_js.js +47 -0
  26. package/node_modules_ol_geom_flat_center_js.js.map +1 -0
  27. package/node_modules_ol_geom_flat_geodesic_js.js +123 -88
  28. package/node_modules_ol_geom_flat_geodesic_js.js.map +1 -1
  29. package/node_modules_ol_geom_flat_interpolate_js.js +230 -0
  30. package/node_modules_ol_geom_flat_interpolate_js.js.map +1 -0
  31. package/node_modules_ol_geom_flat_length_js-_375a0.js +58 -0
  32. package/node_modules_ol_geom_flat_length_js-_375a0.js.map +1 -0
  33. package/node_modules_ol_geom_flat_length_js-_375a1.js +58 -0
  34. package/node_modules_ol_geom_flat_length_js-_375a1.js.map +1 -0
  35. package/node_modules_ol_geom_flat_length_js-_375a2.js +58 -0
  36. package/node_modules_ol_geom_flat_length_js-_375a2.js.map +1 -0
  37. package/node_modules_ol_geom_flat_length_js-_375a3.js +58 -0
  38. package/node_modules_ol_geom_flat_length_js-_375a3.js.map +1 -0
  39. package/node_modules_ol_geom_flat_length_js-_375a4.js +58 -0
  40. package/node_modules_ol_geom_flat_length_js-_375a4.js.map +1 -0
  41. package/node_modules_ol_geom_flat_linechunk_js.js +76 -0
  42. package/node_modules_ol_geom_flat_linechunk_js.js.map +1 -0
  43. package/node_modules_ol_geom_flat_straightchunk_js.js +68 -0
  44. package/node_modules_ol_geom_flat_straightchunk_js.js.map +1 -0
  45. package/node_modules_ol_geom_flat_textpath_js.js +178 -0
  46. package/node_modules_ol_geom_flat_textpath_js.js.map +1 -0
  47. package/node_modules_ol_interaction_DblClickDragZoom_js.js +285 -0
  48. package/node_modules_ol_interaction_DblClickDragZoom_js.js.map +1 -0
  49. package/node_modules_ol_interaction_DragAndDrop_js.js +351 -0
  50. package/node_modules_ol_interaction_DragAndDrop_js.js.map +1 -0
  51. package/node_modules_ol_interaction_DragRotateAndZoom_js.js +159 -0
  52. package/node_modules_ol_interaction_DragRotateAndZoom_js.js.map +1 -0
  53. package/node_modules_ol_layer_Vector_js-_49290.js +110 -0
  54. package/node_modules_ol_layer_Vector_js-_49290.js.map +1 -0
  55. package/node_modules_ol_layer_Vector_js-_49291.js +110 -0
  56. package/node_modules_ol_layer_Vector_js-_49291.js.map +1 -0
  57. package/node_modules_ol_layer_Vector_js-_49292.js +110 -0
  58. package/node_modules_ol_layer_Vector_js-_49292.js.map +1 -0
  59. package/node_modules_ol_layer_Vector_js-_49293.js +110 -0
  60. package/node_modules_ol_layer_Vector_js-_49293.js.map +1 -0
  61. package/node_modules_ol_loadingstrategy_js.js +95 -0
  62. package/node_modules_ol_loadingstrategy_js.js.map +1 -0
  63. package/node_modules_ol_render_VectorContext_js-_3ad60.js +144 -0
  64. package/node_modules_ol_render_VectorContext_js-_3ad60.js.map +1 -0
  65. package/node_modules_ol_render_VectorContext_js-_3ad61.js +144 -0
  66. package/node_modules_ol_render_VectorContext_js-_3ad61.js.map +1 -0
  67. package/node_modules_ol_render_VectorContext_js-node_modules_ol_render_canvas_hitdetect_js.js +372 -0
  68. package/node_modules_ol_render_VectorContext_js-node_modules_ol_render_canvas_hitdetect_js.js.map +1 -0
  69. package/node_modules_ol_render_canvas_ImageBuilder_js.js +318 -0
  70. package/node_modules_ol_render_canvas_ImageBuilder_js.js.map +1 -0
  71. package/node_modules_ol_render_canvas_Instruction_js.js +66 -0
  72. package/node_modules_ol_render_canvas_Instruction_js.js.map +1 -0
  73. package/node_modules_ol_render_canvas_LineStringBuilder_js.js +187 -0
  74. package/node_modules_ol_render_canvas_LineStringBuilder_js.js.map +1 -0
  75. package/node_modules_ol_render_canvas_PolygonBuilder_js.js +276 -0
  76. package/node_modules_ol_render_canvas_PolygonBuilder_js.js.map +1 -0
  77. package/node_modules_ol_render_canvas_ZIndexContext_js-_fab20.js +156 -0
  78. package/node_modules_ol_render_canvas_ZIndexContext_js-_fab20.js.map +1 -0
  79. package/node_modules_ol_render_canvas_ZIndexContext_js-_fab21.js +156 -0
  80. package/node_modules_ol_render_canvas_ZIndexContext_js-_fab21.js.map +1 -0
  81. package/node_modules_ol_render_js-node_modules_ol_render_VectorContext_js.js +301 -0
  82. package/node_modules_ol_render_js-node_modules_ol_render_VectorContext_js.js.map +1 -0
  83. package/node_modules_ol_renderer_Layer_js.js +219 -0
  84. package/node_modules_ol_renderer_Layer_js.js.map +1 -0
  85. package/node_modules_ol_source_Source_js.js +256 -0
  86. package/node_modules_ol_source_Source_js.js.map +1 -0
  87. package/node_modules_ol_source_VectorEventType_js-node_modules_ol_structs_RBush_js.js +318 -0
  88. package/node_modules_ol_source_VectorEventType_js-node_modules_ol_structs_RBush_js.js.map +1 -0
  89. package/node_modules_ol_source_VectorEventType_js.js +80 -0
  90. package/node_modules_ol_source_VectorEventType_js.js.map +1 -0
  91. package/node_modules_ol_structs_RBush_js.js +242 -0
  92. package/node_modules_ol_structs_RBush_js.js.map +1 -0
  93. package/node_modules_ol_style_js.js +2 -1
  94. package/node_modules_ol_style_js.js.map +1 -1
  95. package/node_modules_rbush_rbush_min_js.js +16 -0
  96. package/node_modules_rbush_rbush_min_js.js.map +1 -0
  97. package/package.json +142 -146
  98. package/vaadin-bundle.json +2447 -2352
  99. package/vaadin.js +52246 -63791
  100. package/vaadin.js.map +1 -1
  101. package/vendors-node_modules_dompurify_dist_purify_es_mjs.js +1364 -0
  102. package/vendors-node_modules_dompurify_dist_purify_es_mjs.js.map +1 -0
  103. package/vendors-node_modules_dompurify_dist_purify_js.js +26 -21
  104. package/vendors-node_modules_dompurify_dist_purify_js.js.map +1 -1
  105. package/vendors-node_modules_marked_lib_marked_esm_js.js +2205 -0
  106. package/vendors-node_modules_marked_lib_marked_esm_js.js.map +1 -0
  107. package/vendors-node_modules_marked_lib_marked_umd_js.js +2164 -2556
  108. package/vendors-node_modules_marked_lib_marked_umd_js.js.map +1 -1
  109. package/vendors-node_modules_ol_Feature_js.js +360 -0
  110. package/vendors-node_modules_ol_Feature_js.js.map +1 -0
  111. package/vendors-node_modules_ol_Geolocation_js.js +352 -293
  112. package/vendors-node_modules_ol_Geolocation_js.js.map +1 -1
  113. package/vendors-node_modules_ol_ImageTile_js.js +494 -0
  114. package/vendors-node_modules_ol_ImageTile_js.js.map +1 -0
  115. package/vendors-node_modules_ol_Overlay_js.js +606 -0
  116. package/vendors-node_modules_ol_Overlay_js.js.map +1 -0
  117. package/vendors-node_modules_ol_control_FullScreen_js.js +417 -0
  118. package/vendors-node_modules_ol_control_FullScreen_js.js.map +1 -0
  119. package/vendors-node_modules_ol_control_OverviewMap_js.js +711 -0
  120. package/vendors-node_modules_ol_control_OverviewMap_js.js.map +1 -0
  121. package/vendors-node_modules_ol_control_ScaleLine_js.js +509 -0
  122. package/vendors-node_modules_ol_control_ScaleLine_js.js.map +1 -0
  123. package/vendors-node_modules_ol_control_ZoomSlider_js.js +418 -0
  124. package/vendors-node_modules_ol_control_ZoomSlider_js.js.map +1 -0
  125. package/vendors-node_modules_ol_control_js.js +490 -0
  126. package/vendors-node_modules_ol_control_js.js.map +1 -0
  127. package/vendors-node_modules_ol_geom_LineString_js.js +574 -0
  128. package/vendors-node_modules_ol_geom_LineString_js.js.map +1 -0
  129. package/vendors-node_modules_ol_geom_MultiLineString_js.js +405 -0
  130. package/vendors-node_modules_ol_geom_MultiLineString_js.js.map +1 -0
  131. package/vendors-node_modules_ol_geom_MultiPolygon_js.js +773 -0
  132. package/vendors-node_modules_ol_geom_MultiPolygon_js.js.map +1 -0
  133. package/vendors-node_modules_ol_geom_js-node_modules_ol_geom_flat_length_js.js +769 -0
  134. package/vendors-node_modules_ol_geom_js-node_modules_ol_geom_flat_length_js.js.map +1 -0
  135. package/vendors-node_modules_ol_index_js.js +526 -675
  136. package/vendors-node_modules_ol_index_js.js.map +1 -1
  137. package/vendors-node_modules_ol_interaction_Draw_js.js +2777 -0
  138. package/vendors-node_modules_ol_interaction_Draw_js.js.map +1 -0
  139. package/vendors-node_modules_ol_interaction_Extent_js.js +586 -0
  140. package/vendors-node_modules_ol_interaction_Extent_js.js.map +1 -0
  141. package/vendors-node_modules_ol_interaction_Link_js.js +489 -0
  142. package/vendors-node_modules_ol_interaction_Link_js.js.map +1 -0
  143. package/vendors-node_modules_ol_interaction_Modify_js.js +1841 -0
  144. package/vendors-node_modules_ol_interaction_Modify_js.js.map +1 -0
  145. package/vendors-node_modules_ol_interaction_Select_js.js +623 -0
  146. package/vendors-node_modules_ol_interaction_Select_js.js.map +1 -0
  147. package/vendors-node_modules_ol_interaction_Snap_js.js +982 -0
  148. package/vendors-node_modules_ol_interaction_Snap_js.js.map +1 -0
  149. package/vendors-node_modules_ol_interaction_Translate_js.js +466 -0
  150. package/vendors-node_modules_ol_interaction_Translate_js.js.map +1 -0
  151. package/vendors-node_modules_ol_interaction_js.js +872 -0
  152. package/vendors-node_modules_ol_interaction_js.js.map +1 -0
  153. package/vendors-node_modules_ol_layer_Graticule_js.js +1374 -989
  154. package/vendors-node_modules_ol_layer_Graticule_js.js.map +1 -1
  155. package/vendors-node_modules_ol_render_Feature_js.js +546 -0
  156. package/vendors-node_modules_ol_render_Feature_js.js.map +1 -0
  157. package/vendors-node_modules_ol_render_canvas_BuilderGroup_js.js +897 -0
  158. package/vendors-node_modules_ol_render_canvas_BuilderGroup_js.js.map +1 -0
  159. package/vendors-node_modules_ol_render_canvas_Builder_js.js +907 -0
  160. package/vendors-node_modules_ol_render_canvas_Builder_js.js.map +1 -0
  161. package/vendors-node_modules_ol_render_canvas_ExecutorGroup_js.js +539 -0
  162. package/vendors-node_modules_ol_render_canvas_ExecutorGroup_js.js.map +1 -0
  163. package/vendors-node_modules_ol_render_canvas_Executor_js.js +1715 -0
  164. package/vendors-node_modules_ol_render_canvas_Executor_js.js.map +1 -0
  165. package/vendors-node_modules_ol_render_canvas_Immediate_js.js +1208 -0
  166. package/vendors-node_modules_ol_render_canvas_Immediate_js.js.map +1 -0
  167. package/vendors-node_modules_ol_render_canvas_TextBuilder_js.js +825 -0
  168. package/vendors-node_modules_ol_render_canvas_TextBuilder_js.js.map +1 -0
  169. package/vendors-node_modules_ol_renderer_canvas_Layer_js.js +654 -0
  170. package/vendors-node_modules_ol_renderer_canvas_Layer_js.js.map +1 -0
  171. package/vendors-node_modules_ol_renderer_canvas_VectorLayer_js.js +1044 -0
  172. package/vendors-node_modules_ol_renderer_canvas_VectorLayer_js.js.map +1 -0
  173. package/vendors-node_modules_ol_renderer_vector_js.js +460 -0
  174. package/vendors-node_modules_ol_renderer_vector_js.js.map +1 -0
  175. package/vendors-node_modules_ol_source_Vector_js.js +2091 -0
  176. package/vendors-node_modules_ol_source_Vector_js.js.map +1 -0
  177. package/node_modules_ol_ImageTile_js.js +0 -177
  178. package/node_modules_ol_ImageTile_js.js.map +0 -1
  179. package/node_modules_ol_render_js.js +0 -131
  180. package/node_modules_ol_render_js.js.map +0 -1
  181. package/node_modules_ol_structs_LRUCache_js.js +0 -275
  182. package/node_modules_ol_structs_LRUCache_js.js.map +0 -1
  183. package/node_modules_ol_tilecoord_js.js +0 -115
  184. package/node_modules_ol_tilecoord_js.js.map +0 -1
  185. package/vendors-node_modules_ol_TileCache_js.js +0 -461
  186. package/vendors-node_modules_ol_TileCache_js.js.map +0 -1
  187. package/vendors-node_modules_ol_Tile_js.js +0 -330
  188. package/vendors-node_modules_ol_Tile_js.js.map +0 -1
  189. package/vendors-node_modules_ol_style_Text_js.js +0 -509
  190. package/vendors-node_modules_ol_style_Text_js.js.map +0 -1
  191. package/vendors-node_modules_rbush_index_js.js +0 -531
  192. package/vendors-node_modules_rbush_index_js.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"vendors-node_modules_ol_Geolocation_js.js","mappings":";;;;;;;;;;;;;;;;;;AAAA,iBAAiB,SAAI,IAAI,SAAI;AAC7B;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA;AAC0C;AACL;AACS;AACkB;AACkC;AAC5D;AACtC;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0BAA0B;AACzC;AACA;AACA,sCAAsC,kEAAe;AACrD;AACA,kBAAkB;AAClB;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,wDAAS;AACX;AACA,aAAa,QAAQ;AACrB,cAAc,SAAS;AACvB;AACA,cAAc,iBAAiB;AAC/B;AACA,cAAc,oCAAoC;AAClD;AACA;AACA;AACA,aAAa;AACb;AACA,gCAAgC;AAChC;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,wCAAwC;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA,2BAA2B,uDAAiB;AAC5C;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,qEAA2B,CAAC,6CAAa;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,mDAAS;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,0DAAe;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0BAA0B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA,0BAA0B,kBAAkB;AAC5C;AACA;AACA;AACA,gBAAgB,sCAAsC;AACtD;AACA;AACA;AACA;AACA,0BAA0B,sCAAsC;AAChE;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA,0BAA0B,kBAAkB;AAC5C;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA,0BAA0B,kBAAkB;AAC5C;AACA;AACA;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA,0BAA0B,kBAAkB;AAC5C;AACA;AACA;AACA,gBAAgB,gDAAgD;AAChE;AACA;AACA;AACA;AACA;AACA,0BAA0B,gDAAgD;AAC1E;AACA;AACA;AACA,gBAAgB,kDAAkD;AAClE;AACA;AACA;AACA;AACA;AACA,0BAA0B,kDAAkD;AAC5E;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA,0BAA0B,kBAAkB;AAC5C;AACA;AACA;AACA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA,0BAA0B,SAAS;AACnC;AACA;AACA;AACA;AACA,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,2BAA2B;AACrD;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA;AACA;AACA;AACA,sCAAsC,6CAAa;AACnD;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAC,kDAAU;AACZ,iEAAe,WAAW,EAAC;AAC3B","sources":["webpack://@vaadin/bundles/./node_modules/ol/Geolocation.js"],"sourcesContent":["var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/Geolocation\n */\nimport BaseEvent from './events/Event.js';\nimport BaseObject from './Object.js';\nimport EventType from './events/EventType.js';\nimport { circular as circularPolygon } from './geom/Polygon.js';\nimport { get as getProjection, getTransformFromProjections, identityTransform, } from './proj.js';\nimport { toRadians } from './math.js';\n/**\n * @enum {string}\n */\nvar Property = {\n ACCURACY: 'accuracy',\n ACCURACY_GEOMETRY: 'accuracyGeometry',\n ALTITUDE: 'altitude',\n ALTITUDE_ACCURACY: 'altitudeAccuracy',\n HEADING: 'heading',\n POSITION: 'position',\n PROJECTION: 'projection',\n SPEED: 'speed',\n TRACKING: 'tracking',\n TRACKING_OPTIONS: 'trackingOptions',\n};\n/**\n * @classdesc\n * Events emitted on Geolocation error.\n */\nvar GeolocationError = /** @class */ (function (_super) {\n __extends(GeolocationError, _super);\n /**\n * @param {GeolocationPositionError} error error object.\n */\n function GeolocationError(error) {\n var _this = _super.call(this, EventType.ERROR) || this;\n /**\n * @type {number}\n */\n _this.code = error.code;\n /**\n * @type {string}\n */\n _this.message = error.message;\n return _this;\n }\n return GeolocationError;\n}(BaseEvent));\n/**\n * @typedef {Object} Options\n * @property {boolean} [tracking=false] Start Tracking right after\n * instantiation.\n * @property {PositionOptions} [trackingOptions] Tracking options.\n * See https://www.w3.org/TR/geolocation-API/#position_options_interface.\n * @property {import(\"./proj.js\").ProjectionLike} [projection] The projection the position\n * is reported in.\n */\n/**\n * @typedef {import(\"./ObjectEventType\").Types|'change:accuracy'|'change:accuracyGeometry'|'change:altitude'|\n * 'change:altitudeAccuracy'|'change:heading'|'change:position'|'change:projection'|'change:speed'|'change:tracking'|\n * 'change:trackingOptions'} GeolocationObjectEventTypes\n */\n/***\n * @template Return\n * @typedef {import(\"./Observable\").OnSignature<import(\"./Observable\").EventTypes, import(\"./events/Event.js\").default, Return> &\n * import(\"./Observable\").OnSignature<GeolocationObjectEventTypes, import(\"./Object\").ObjectEvent, Return> &\n * import(\"./Observable\").OnSignature<'error', GeolocationError, Return> &\n * import(\"./Observable\").CombinedOnSignature<import(\"./Observable\").EventTypes|GeolocationObjectEventTypes|\n * 'error', Return>} GeolocationOnSignature\n */\n/**\n * @classdesc\n * Helper class for providing HTML5 Geolocation capabilities.\n * The [Geolocation API](https://www.w3.org/TR/geolocation-API/)\n * is used to locate a user's position.\n *\n * To get notified of position changes, register a listener for the generic\n * `change` event on your instance of {@link module:ol/Geolocation~Geolocation}.\n *\n * Example:\n *\n * var geolocation = new Geolocation({\n * // take the projection to use from the map's view\n * projection: view.getProjection()\n * });\n * // listen to changes in position\n * geolocation.on('change', function(evt) {\n * window.console.log(geolocation.getPosition());\n * });\n *\n * @fires module:ol/events/Event~BaseEvent#event:error\n * @api\n */\nvar Geolocation = /** @class */ (function (_super) {\n __extends(Geolocation, _super);\n /**\n * @param {Options} [opt_options] Options.\n */\n function Geolocation(opt_options) {\n var _this = _super.call(this) || this;\n /***\n * @type {GeolocationOnSignature<import(\"./events\").EventsKey>}\n */\n _this.on;\n /***\n * @type {GeolocationOnSignature<import(\"./events\").EventsKey>}\n */\n _this.once;\n /***\n * @type {GeolocationOnSignature<void>}\n */\n _this.un;\n var options = opt_options || {};\n /**\n * The unprojected (EPSG:4326) device position.\n * @private\n * @type {?import(\"./coordinate.js\").Coordinate}\n */\n _this.position_ = null;\n /**\n * @private\n * @type {import(\"./proj.js\").TransformFunction}\n */\n _this.transform_ = identityTransform;\n /**\n * @private\n * @type {number|undefined}\n */\n _this.watchId_ = undefined;\n _this.addChangeListener(Property.PROJECTION, _this.handleProjectionChanged_);\n _this.addChangeListener(Property.TRACKING, _this.handleTrackingChanged_);\n if (options.projection !== undefined) {\n _this.setProjection(options.projection);\n }\n if (options.trackingOptions !== undefined) {\n _this.setTrackingOptions(options.trackingOptions);\n }\n _this.setTracking(options.tracking !== undefined ? options.tracking : false);\n return _this;\n }\n /**\n * Clean up.\n */\n Geolocation.prototype.disposeInternal = function () {\n this.setTracking(false);\n _super.prototype.disposeInternal.call(this);\n };\n /**\n * @private\n */\n Geolocation.prototype.handleProjectionChanged_ = function () {\n var projection = this.getProjection();\n if (projection) {\n this.transform_ = getTransformFromProjections(getProjection('EPSG:4326'), projection);\n if (this.position_) {\n this.set(Property.POSITION, this.transform_(this.position_));\n }\n }\n };\n /**\n * @private\n */\n Geolocation.prototype.handleTrackingChanged_ = function () {\n if ('geolocation' in navigator) {\n var tracking = this.getTracking();\n if (tracking && this.watchId_ === undefined) {\n this.watchId_ = navigator.geolocation.watchPosition(this.positionChange_.bind(this), this.positionError_.bind(this), this.getTrackingOptions());\n }\n else if (!tracking && this.watchId_ !== undefined) {\n navigator.geolocation.clearWatch(this.watchId_);\n this.watchId_ = undefined;\n }\n }\n };\n /**\n * @private\n * @param {GeolocationPosition} position position event.\n */\n Geolocation.prototype.positionChange_ = function (position) {\n var coords = position.coords;\n this.set(Property.ACCURACY, coords.accuracy);\n this.set(Property.ALTITUDE, coords.altitude === null ? undefined : coords.altitude);\n this.set(Property.ALTITUDE_ACCURACY, coords.altitudeAccuracy === null ? undefined : coords.altitudeAccuracy);\n this.set(Property.HEADING, coords.heading === null ? undefined : toRadians(coords.heading));\n if (!this.position_) {\n this.position_ = [coords.longitude, coords.latitude];\n }\n else {\n this.position_[0] = coords.longitude;\n this.position_[1] = coords.latitude;\n }\n var projectedPosition = this.transform_(this.position_);\n this.set(Property.POSITION, projectedPosition);\n this.set(Property.SPEED, coords.speed === null ? undefined : coords.speed);\n var geometry = circularPolygon(this.position_, coords.accuracy);\n geometry.applyTransform(this.transform_);\n this.set(Property.ACCURACY_GEOMETRY, geometry);\n this.changed();\n };\n /**\n * @private\n * @param {GeolocationPositionError} error error object.\n */\n Geolocation.prototype.positionError_ = function (error) {\n this.dispatchEvent(new GeolocationError(error));\n };\n /**\n * Get the accuracy of the position in meters.\n * @return {number|undefined} The accuracy of the position measurement in\n * meters.\n * @observable\n * @api\n */\n Geolocation.prototype.getAccuracy = function () {\n return /** @type {number|undefined} */ (this.get(Property.ACCURACY));\n };\n /**\n * Get a geometry of the position accuracy.\n * @return {?import(\"./geom/Polygon.js\").default} A geometry of the position accuracy.\n * @observable\n * @api\n */\n Geolocation.prototype.getAccuracyGeometry = function () {\n return /** @type {?import(\"./geom/Polygon.js\").default} */ (this.get(Property.ACCURACY_GEOMETRY) || null);\n };\n /**\n * Get the altitude associated with the position.\n * @return {number|undefined} The altitude of the position in meters above mean\n * sea level.\n * @observable\n * @api\n */\n Geolocation.prototype.getAltitude = function () {\n return /** @type {number|undefined} */ (this.get(Property.ALTITUDE));\n };\n /**\n * Get the altitude accuracy of the position.\n * @return {number|undefined} The accuracy of the altitude measurement in\n * meters.\n * @observable\n * @api\n */\n Geolocation.prototype.getAltitudeAccuracy = function () {\n return /** @type {number|undefined} */ (this.get(Property.ALTITUDE_ACCURACY));\n };\n /**\n * Get the heading as radians clockwise from North.\n * Note: depending on the browser, the heading is only defined if the `enableHighAccuracy`\n * is set to `true` in the tracking options.\n * @return {number|undefined} The heading of the device in radians from north.\n * @observable\n * @api\n */\n Geolocation.prototype.getHeading = function () {\n return /** @type {number|undefined} */ (this.get(Property.HEADING));\n };\n /**\n * Get the position of the device.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} The current position of the device reported\n * in the current projection.\n * @observable\n * @api\n */\n Geolocation.prototype.getPosition = function () {\n return /** @type {import(\"./coordinate.js\").Coordinate|undefined} */ (this.get(Property.POSITION));\n };\n /**\n * Get the projection associated with the position.\n * @return {import(\"./proj/Projection.js\").default|undefined} The projection the position is\n * reported in.\n * @observable\n * @api\n */\n Geolocation.prototype.getProjection = function () {\n return /** @type {import(\"./proj/Projection.js\").default|undefined} */ (this.get(Property.PROJECTION));\n };\n /**\n * Get the speed in meters per second.\n * @return {number|undefined} The instantaneous speed of the device in meters\n * per second.\n * @observable\n * @api\n */\n Geolocation.prototype.getSpeed = function () {\n return /** @type {number|undefined} */ (this.get(Property.SPEED));\n };\n /**\n * Determine if the device location is being tracked.\n * @return {boolean} The device location is being tracked.\n * @observable\n * @api\n */\n Geolocation.prototype.getTracking = function () {\n return /** @type {boolean} */ (this.get(Property.TRACKING));\n };\n /**\n * Get the tracking options.\n * See https://www.w3.org/TR/geolocation-API/#position-options.\n * @return {PositionOptions|undefined} PositionOptions as defined by\n * the [HTML5 Geolocation spec\n * ](https://www.w3.org/TR/geolocation-API/#position_options_interface).\n * @observable\n * @api\n */\n Geolocation.prototype.getTrackingOptions = function () {\n return /** @type {PositionOptions|undefined} */ (this.get(Property.TRACKING_OPTIONS));\n };\n /**\n * Set the projection to use for transforming the coordinates.\n * @param {import(\"./proj.js\").ProjectionLike} projection The projection the position is\n * reported in.\n * @observable\n * @api\n */\n Geolocation.prototype.setProjection = function (projection) {\n this.set(Property.PROJECTION, getProjection(projection));\n };\n /**\n * Enable or disable tracking.\n * @param {boolean} tracking Enable tracking.\n * @observable\n * @api\n */\n Geolocation.prototype.setTracking = function (tracking) {\n this.set(Property.TRACKING, tracking);\n };\n /**\n * Set the tracking options.\n * See http://www.w3.org/TR/geolocation-API/#position-options.\n * @param {PositionOptions} options PositionOptions as defined by the\n * [HTML5 Geolocation spec\n * ](http://www.w3.org/TR/geolocation-API/#position_options_interface).\n * @observable\n * @api\n */\n Geolocation.prototype.setTrackingOptions = function (options) {\n this.set(Property.TRACKING_OPTIONS, options);\n };\n return Geolocation;\n}(BaseObject));\nexport default Geolocation;\n//# sourceMappingURL=Geolocation.js.map"],"names":[],"sourceRoot":""}
1
+ {"version":3,"file":"vendors-node_modules_ol_Geolocation_js.js","mappings":";;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACqC;AACK;AACoB;AAC1B;AAKjB;;AAEnB;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACO,+BAA+B,wDAAS;AAC/C;AACA,aAAa,0BAA0B;AACvC;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB,cAAc,SAAS;AACvB;AACA,cAAc,iBAAiB;AAC/B;AACA,cAAc,oCAAoC;AAClD;AACA;;AAEA;AACA,aAAa;AACb;AACA,gCAAgC;AAChC;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA,yHAAyH;AACzH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,wCAAwC;AACrG;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,0BAA0B,kDAAU;AACpC;AACA,aAAa,SAAS;AACtB;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,sBAAsB,uDAAiB;;AAEvC;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,qEAA2B;AACnD,QAAQ,6CAAa;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,mDAAS;AACrD;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,0DAAe;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,0BAA0B;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA;AACA,sBAAsB,kBAAkB;AACxC;;AAEA;AACA;AACA,cAAc,sCAAsC;AACpD;AACA;AACA;AACA;AACA,sBAAsB,sCAAsC;AAC5D;AACA;AACA;;AAEA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA;AACA,sBAAsB,kBAAkB;AACxC;;AAEA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA;AACA,sBAAsB,kBAAkB;AACxC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA,sBAAsB,kBAAkB;AACxC;;AAEA;AACA;AACA,cAAc,gDAAgD;AAC9D;AACA;AACA;AACA;AACA;AACA,sBAAsB,gDAAgD;AACtE;AACA;AACA;;AAEA;AACA;AACA,cAAc,kDAAkD;AAChE;AACA;AACA;AACA;AACA;AACA,sBAAsB,kDAAkD;AACxE;AACA;AACA;;AAEA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA;AACA,sBAAsB,kBAAkB;AACxC;;AAEA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;;AAEA;AACA;AACA;AACA,cAAc,2BAA2B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,2BAA2B;AACjD;AACA;AACA;;AAEA;AACA;AACA,aAAa,oCAAoC;AACjD;AACA;AACA;AACA;AACA;AACA,kCAAkC,6CAAa;AAC/C;;AAEA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,WAAW,EAAC","sources":["webpack://@vaadin/bundles/./node_modules/ol/Geolocation.js"],"sourcesContent":["/**\n * @module ol/Geolocation\n */\nimport BaseObject from './Object.js';\nimport BaseEvent from './events/Event.js';\nimport {circular as circularPolygon} from './geom/Polygon.js';\nimport {toRadians} from './math.js';\nimport {\n get as getProjection,\n getTransformFromProjections,\n identityTransform,\n} from './proj.js';\n\n/**\n * @enum {string}\n */\nconst Property = {\n ACCURACY: 'accuracy',\n ACCURACY_GEOMETRY: 'accuracyGeometry',\n ALTITUDE: 'altitude',\n ALTITUDE_ACCURACY: 'altitudeAccuracy',\n HEADING: 'heading',\n POSITION: 'position',\n PROJECTION: 'projection',\n SPEED: 'speed',\n TRACKING: 'tracking',\n TRACKING_OPTIONS: 'trackingOptions',\n};\n\n/**\n * @enum string\n */\nconst GeolocationErrorType = {\n /**\n * Triggered when a `GeolocationPositionError` occurs.\n * @event module:ol/Geolocation.GeolocationError#error\n * @api\n */\n ERROR: 'error',\n};\n\n/**\n * @classdesc\n * Events emitted on [GeolocationPositionError](https://developer.mozilla.org/en-US/docs/Web/API/GeolocationPositionError).\n */\nexport class GeolocationError extends BaseEvent {\n /**\n * @param {GeolocationPositionError} error error object.\n */\n constructor(error) {\n super(GeolocationErrorType.ERROR);\n\n /**\n * Code of the underlying `GeolocationPositionError`.\n * @type {number}\n * @api\n */\n this.code = error.code;\n\n /**\n * Message of the underlying `GeolocationPositionError`.\n * @type {string}\n * @api\n */\n this.message = error.message;\n }\n}\n\n/**\n * @typedef {Object} Options\n * @property {boolean} [tracking=false] Start Tracking right after\n * instantiation.\n * @property {PositionOptions} [trackingOptions] Tracking options.\n * See https://www.w3.org/TR/geolocation-API/#position_options_interface.\n * @property {import(\"./proj.js\").ProjectionLike} [projection] The projection the position\n * is reported in.\n */\n\n/**\n * @typedef {import(\"./ObjectEventType\").Types|'change:accuracy'|'change:accuracyGeometry'|'change:altitude'|\n * 'change:altitudeAccuracy'|'change:heading'|'change:position'|'change:projection'|'change:speed'|'change:tracking'|\n * 'change:trackingOptions'} GeolocationObjectEventTypes\n */\n\n/***\n * @template Return\n * @typedef {import(\"./Observable\").OnSignature<GeolocationObjectEventTypes, import(\"./Object\").ObjectEvent, Return> &\n * import(\"./Observable\").OnSignature<'error', GeolocationError, Return> &\n * import(\"./Observable\").CombinedOnSignature<import(\"./Observable\").EventTypes|GeolocationObjectEventTypes, Return> &\n * import(\"./Observable\").OnSignature<import(\"./Observable\").EventTypes, import(\"./events/Event.js\").default, Return>} GeolocationOnSignature\n */\n\n/**\n * @classdesc\n * Helper class for providing HTML5 Geolocation capabilities.\n * The [Geolocation API](https://www.w3.org/TR/geolocation-API/)\n * is used to locate a user's position.\n *\n * To get notified of position changes and errors, register listeners for the generic\n * `change` event and the `error` event on your instance of {@link module:ol/Geolocation~Geolocation}.\n *\n * Example:\n *\n * const geolocation = new Geolocation({\n * // take the projection to use from the map's view\n * projection: view.getProjection()\n * });\n * // listen to changes in position\n * geolocation.on('change', function(evt) {\n * console.log(geolocation.getPosition());\n * });\n * // listen to error\n * geolocation.on('error', function(evt) {\n * window.console.log(evt.message);\n * });\n *\n * @fires GeolocationError\n * @api\n */\nclass Geolocation extends BaseObject {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n super();\n\n /***\n * @type {GeolocationOnSignature<import(\"./events\").EventsKey>}\n */\n this.on;\n\n /***\n * @type {GeolocationOnSignature<import(\"./events\").EventsKey>}\n */\n this.once;\n\n /***\n * @type {GeolocationOnSignature<void>}\n */\n this.un;\n\n options = options || {};\n\n /**\n * The unprojected (EPSG:4326) device position.\n * @private\n * @type {?import(\"./coordinate.js\").Coordinate}\n */\n this.position_ = null;\n\n /**\n * @private\n * @type {import(\"./proj.js\").TransformFunction}\n */\n this.transform_ = identityTransform;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.watchId_ = undefined;\n\n this.addChangeListener(Property.PROJECTION, this.handleProjectionChanged_);\n this.addChangeListener(Property.TRACKING, this.handleTrackingChanged_);\n\n if (options.projection !== undefined) {\n this.setProjection(options.projection);\n }\n if (options.trackingOptions !== undefined) {\n this.setTrackingOptions(options.trackingOptions);\n }\n\n this.setTracking(options.tracking !== undefined ? options.tracking : false);\n }\n\n /**\n * Clean up.\n * @override\n */\n disposeInternal() {\n this.setTracking(false);\n super.disposeInternal();\n }\n\n /**\n * @private\n */\n handleProjectionChanged_() {\n const projection = this.getProjection();\n if (projection) {\n this.transform_ = getTransformFromProjections(\n getProjection('EPSG:4326'),\n projection,\n );\n if (this.position_) {\n this.set(Property.POSITION, this.transform_(this.position_));\n }\n }\n }\n\n /**\n * @private\n */\n handleTrackingChanged_() {\n if ('geolocation' in navigator) {\n const tracking = this.getTracking();\n if (tracking && this.watchId_ === undefined) {\n this.watchId_ = navigator.geolocation.watchPosition(\n this.positionChange_.bind(this),\n this.positionError_.bind(this),\n this.getTrackingOptions(),\n );\n } else if (!tracking && this.watchId_ !== undefined) {\n navigator.geolocation.clearWatch(this.watchId_);\n this.watchId_ = undefined;\n }\n }\n }\n\n /**\n * @private\n * @param {GeolocationPosition} position position event.\n */\n positionChange_(position) {\n const coords = position.coords;\n this.set(Property.ACCURACY, coords.accuracy);\n this.set(\n Property.ALTITUDE,\n coords.altitude === null ? undefined : coords.altitude,\n );\n this.set(\n Property.ALTITUDE_ACCURACY,\n coords.altitudeAccuracy === null ? undefined : coords.altitudeAccuracy,\n );\n this.set(\n Property.HEADING,\n coords.heading === null ? undefined : toRadians(coords.heading),\n );\n if (!this.position_) {\n this.position_ = [coords.longitude, coords.latitude];\n } else {\n this.position_[0] = coords.longitude;\n this.position_[1] = coords.latitude;\n }\n const projectedPosition = this.transform_(this.position_);\n this.set(Property.POSITION, projectedPosition.slice());\n this.set(Property.SPEED, coords.speed === null ? undefined : coords.speed);\n const geometry = circularPolygon(this.position_, coords.accuracy);\n geometry.applyTransform(this.transform_);\n this.set(Property.ACCURACY_GEOMETRY, geometry);\n this.changed();\n }\n\n /**\n * @private\n * @param {GeolocationPositionError} error error object.\n */\n positionError_(error) {\n this.dispatchEvent(new GeolocationError(error));\n }\n\n /**\n * Get the accuracy of the position in meters.\n * @return {number|undefined} The accuracy of the position measurement in\n * meters.\n * @observable\n * @api\n */\n getAccuracy() {\n return /** @type {number|undefined} */ (this.get(Property.ACCURACY));\n }\n\n /**\n * Get a geometry of the position accuracy.\n * @return {?import(\"./geom/Polygon.js\").default} A geometry of the position accuracy.\n * @observable\n * @api\n */\n getAccuracyGeometry() {\n return /** @type {?import(\"./geom/Polygon.js\").default} */ (\n this.get(Property.ACCURACY_GEOMETRY) || null\n );\n }\n\n /**\n * Get the altitude associated with the position.\n * @return {number|undefined} The altitude of the position in meters above mean\n * sea level.\n * @observable\n * @api\n */\n getAltitude() {\n return /** @type {number|undefined} */ (this.get(Property.ALTITUDE));\n }\n\n /**\n * Get the altitude accuracy of the position.\n * @return {number|undefined} The accuracy of the altitude measurement in\n * meters.\n * @observable\n * @api\n */\n getAltitudeAccuracy() {\n return /** @type {number|undefined} */ (\n this.get(Property.ALTITUDE_ACCURACY)\n );\n }\n\n /**\n * Get the heading as radians clockwise from North.\n * Note: depending on the browser, the heading is only defined if the `enableHighAccuracy`\n * is set to `true` in the tracking options.\n * @return {number|undefined} The heading of the device in radians from north.\n * @observable\n * @api\n */\n getHeading() {\n return /** @type {number|undefined} */ (this.get(Property.HEADING));\n }\n\n /**\n * Get the position of the device.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} The current position of the device reported\n * in the current projection.\n * @observable\n * @api\n */\n getPosition() {\n return /** @type {import(\"./coordinate.js\").Coordinate|undefined} */ (\n this.get(Property.POSITION)\n );\n }\n\n /**\n * Get the projection associated with the position.\n * @return {import(\"./proj/Projection.js\").default|undefined} The projection the position is\n * reported in.\n * @observable\n * @api\n */\n getProjection() {\n return /** @type {import(\"./proj/Projection.js\").default|undefined} */ (\n this.get(Property.PROJECTION)\n );\n }\n\n /**\n * Get the speed in meters per second.\n * @return {number|undefined} The instantaneous speed of the device in meters\n * per second.\n * @observable\n * @api\n */\n getSpeed() {\n return /** @type {number|undefined} */ (this.get(Property.SPEED));\n }\n\n /**\n * Determine if the device location is being tracked.\n * @return {boolean} The device location is being tracked.\n * @observable\n * @api\n */\n getTracking() {\n return /** @type {boolean} */ (this.get(Property.TRACKING));\n }\n\n /**\n * Get the tracking options.\n * See https://www.w3.org/TR/geolocation-API/#position-options.\n * @return {PositionOptions|undefined} PositionOptions as defined by\n * the [HTML5 Geolocation spec\n * ](https://www.w3.org/TR/geolocation-API/#position_options_interface).\n * @observable\n * @api\n */\n getTrackingOptions() {\n return /** @type {PositionOptions|undefined} */ (\n this.get(Property.TRACKING_OPTIONS)\n );\n }\n\n /**\n * Set the projection to use for transforming the coordinates.\n * @param {import(\"./proj.js\").ProjectionLike} projection The projection the position is\n * reported in.\n * @observable\n * @api\n */\n setProjection(projection) {\n this.set(Property.PROJECTION, getProjection(projection));\n }\n\n /**\n * Enable or disable tracking.\n * @param {boolean} tracking Enable tracking.\n * @observable\n * @api\n */\n setTracking(tracking) {\n this.set(Property.TRACKING, tracking);\n }\n\n /**\n * Set the tracking options.\n * See http://www.w3.org/TR/geolocation-API/#position-options.\n * @param {PositionOptions} options PositionOptions as defined by the\n * [HTML5 Geolocation spec\n * ](http://www.w3.org/TR/geolocation-API/#position_options_interface).\n * @observable\n * @api\n */\n setTrackingOptions(options) {\n this.set(Property.TRACKING_OPTIONS, options);\n }\n}\n\nexport default Geolocation;\n"],"names":[],"sourceRoot":""}
@@ -0,0 +1,494 @@
1
+ (self["webpackChunk_vaadin_bundles"] = self["webpackChunk_vaadin_bundles"] || []).push([["vendors-node_modules_ol_ImageTile_js"],{
2
+
3
+ /***/ "./node_modules/ol/ImageTile.js":
4
+ /*!**************************************!*\
5
+ !*** ./node_modules/ol/ImageTile.js ***!
6
+ \**************************************/
7
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
8
+
9
+ __webpack_require__.r(__webpack_exports__);
10
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
12
+ /* harmony export */ });
13
+ /* harmony import */ var _Image_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Image.js */ "./node_modules/ol/Image.js");
14
+ /* harmony import */ var _Tile_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Tile.js */ "./node_modules/ol/Tile.js");
15
+ /* harmony import */ var _TileState_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./TileState.js */ "./node_modules/ol/TileState.js");
16
+ /* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./dom.js */ "./node_modules/ol/dom.js");
17
+ /**
18
+ * @module ol/ImageTile
19
+ */
20
+
21
+
22
+
23
+
24
+
25
+ class ImageTile extends _Tile_js__WEBPACK_IMPORTED_MODULE_0__["default"] {
26
+ /**
27
+ * @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate.
28
+ * @param {import("./TileState.js").default} state State.
29
+ * @param {string} src Image source URI.
30
+ * @param {?string} crossOrigin Cross origin.
31
+ * @param {import("./Tile.js").LoadFunction} tileLoadFunction Tile load function.
32
+ * @param {import("./Tile.js").Options} [options] Tile options.
33
+ */
34
+ constructor(tileCoord, state, src, crossOrigin, tileLoadFunction, options) {
35
+ super(tileCoord, state, options);
36
+
37
+ /**
38
+ * @private
39
+ * @type {?string}
40
+ */
41
+ this.crossOrigin_ = crossOrigin;
42
+
43
+ /**
44
+ * Image URI
45
+ *
46
+ * @private
47
+ * @type {string}
48
+ */
49
+ this.src_ = src;
50
+
51
+ this.key = src;
52
+
53
+ /**
54
+ * @private
55
+ * @type {HTMLImageElement|HTMLCanvasElement}
56
+ */
57
+ this.image_ = new Image();
58
+ if (crossOrigin !== null) {
59
+ this.image_.crossOrigin = crossOrigin;
60
+ }
61
+
62
+ /**
63
+ * @private
64
+ * @type {?function():void}
65
+ */
66
+ this.unlisten_ = null;
67
+
68
+ /**
69
+ * @private
70
+ * @type {import("./Tile.js").LoadFunction}
71
+ */
72
+ this.tileLoadFunction_ = tileLoadFunction;
73
+ }
74
+
75
+ /**
76
+ * Get the HTML image element for this tile (may be a Canvas, Image, or Video).
77
+ * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.
78
+ * @api
79
+ */
80
+ getImage() {
81
+ return this.image_;
82
+ }
83
+
84
+ /**
85
+ * Sets an HTML image element for this tile (may be a Canvas or preloaded Image).
86
+ * @param {HTMLCanvasElement|HTMLImageElement} element Element.
87
+ */
88
+ setImage(element) {
89
+ this.image_ = element;
90
+ this.state = _TileState_js__WEBPACK_IMPORTED_MODULE_1__["default"].LOADED;
91
+ this.unlistenImage_();
92
+ this.changed();
93
+ }
94
+
95
+ /**
96
+ * Tracks loading or read errors.
97
+ *
98
+ * @private
99
+ */
100
+ handleImageError_() {
101
+ this.state = _TileState_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERROR;
102
+ this.unlistenImage_();
103
+ this.image_ = getBlankImage();
104
+ this.changed();
105
+ }
106
+
107
+ /**
108
+ * Tracks successful image load.
109
+ *
110
+ * @private
111
+ */
112
+ handleImageLoad_() {
113
+ const image = /** @type {HTMLImageElement} */ (this.image_);
114
+ if (image.naturalWidth && image.naturalHeight) {
115
+ this.state = _TileState_js__WEBPACK_IMPORTED_MODULE_1__["default"].LOADED;
116
+ } else {
117
+ this.state = _TileState_js__WEBPACK_IMPORTED_MODULE_1__["default"].EMPTY;
118
+ }
119
+ this.unlistenImage_();
120
+ this.changed();
121
+ }
122
+
123
+ /**
124
+ * Load the image or retry if loading previously failed.
125
+ * Loading is taken care of by the tile queue, and calling this method is
126
+ * only needed for preloading or for reloading in case of an error.
127
+ *
128
+ * To retry loading tiles on failed requests, use a custom `tileLoadFunction`
129
+ * that checks for error status codes and reloads only when the status code is
130
+ * 408, 429, 500, 502, 503 and 504, and only when not too many retries have been
131
+ * made already:
132
+ *
133
+ * ```js
134
+ * const retryCodes = [408, 429, 500, 502, 503, 504];
135
+ * const retries = {};
136
+ * source.setTileLoadFunction((tile, src) => {
137
+ * const image = tile.getImage();
138
+ * fetch(src)
139
+ * .then((response) => {
140
+ * if (retryCodes.includes(response.status)) {
141
+ * retries[src] = (retries[src] || 0) + 1;
142
+ * if (retries[src] <= 3) {
143
+ * setTimeout(() => tile.load(), retries[src] * 1000);
144
+ * }
145
+ * return Promise.reject();
146
+ * }
147
+ * return response.blob();
148
+ * })
149
+ * .then((blob) => {
150
+ * const imageUrl = URL.createObjectURL(blob);
151
+ * image.src = imageUrl;
152
+ * setTimeout(() => URL.revokeObjectURL(imageUrl), 5000);
153
+ * })
154
+ * .catch(() => tile.setState(3)); // error
155
+ * });
156
+ * ```
157
+ * @api
158
+ * @override
159
+ */
160
+ load() {
161
+ if (this.state == _TileState_js__WEBPACK_IMPORTED_MODULE_1__["default"].ERROR) {
162
+ this.state = _TileState_js__WEBPACK_IMPORTED_MODULE_1__["default"].IDLE;
163
+ this.image_ = new Image();
164
+ if (this.crossOrigin_ !== null) {
165
+ this.image_.crossOrigin = this.crossOrigin_;
166
+ }
167
+ }
168
+ if (this.state == _TileState_js__WEBPACK_IMPORTED_MODULE_1__["default"].IDLE) {
169
+ this.state = _TileState_js__WEBPACK_IMPORTED_MODULE_1__["default"].LOADING;
170
+ this.changed();
171
+ this.tileLoadFunction_(this, this.src_);
172
+ this.unlisten_ = (0,_Image_js__WEBPACK_IMPORTED_MODULE_2__.listenImage)(
173
+ this.image_,
174
+ this.handleImageLoad_.bind(this),
175
+ this.handleImageError_.bind(this),
176
+ );
177
+ }
178
+ }
179
+
180
+ /**
181
+ * Discards event handlers which listen for load completion or errors.
182
+ *
183
+ * @private
184
+ */
185
+ unlistenImage_() {
186
+ if (this.unlisten_) {
187
+ this.unlisten_();
188
+ this.unlisten_ = null;
189
+ }
190
+ }
191
+
192
+ /**
193
+ * @override
194
+ */
195
+ disposeInternal() {
196
+ this.unlistenImage_();
197
+ this.image_ = null;
198
+ super.disposeInternal();
199
+ }
200
+ }
201
+
202
+ /**
203
+ * Get a 1-pixel blank image.
204
+ * @return {HTMLCanvasElement} Blank image.
205
+ */
206
+ function getBlankImage() {
207
+ const ctx = (0,_dom_js__WEBPACK_IMPORTED_MODULE_3__.createCanvasContext2D)(1, 1);
208
+ ctx.fillStyle = 'rgba(0,0,0,0)';
209
+ ctx.fillRect(0, 0, 1, 1);
210
+ return ctx.canvas;
211
+ }
212
+
213
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ImageTile);
214
+
215
+
216
+ /***/ }),
217
+
218
+ /***/ "./node_modules/ol/Tile.js":
219
+ /*!*********************************!*\
220
+ !*** ./node_modules/ol/Tile.js ***!
221
+ \*********************************/
222
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
223
+
224
+ __webpack_require__.r(__webpack_exports__);
225
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
226
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
227
+ /* harmony export */ });
228
+ /* harmony import */ var _TileState_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TileState.js */ "./node_modules/ol/TileState.js");
229
+ /* harmony import */ var _easing_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./easing.js */ "./node_modules/ol/easing.js");
230
+ /* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./events/EventType.js */ "./node_modules/ol/events/EventType.js");
231
+ /* harmony import */ var _events_Target_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./events/Target.js */ "./node_modules/ol/events/Target.js");
232
+ /* harmony import */ var _util_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util.js */ "./node_modules/ol/util.js");
233
+ /**
234
+ * @module ol/Tile
235
+ */
236
+
237
+
238
+
239
+
240
+
241
+
242
+ /**
243
+ * A function that takes a {@link module:ol/Tile~Tile} for the tile and a
244
+ * `{string}` for the url as arguments. The default is
245
+ * ```js
246
+ * source.setTileLoadFunction(function(tile, src) {
247
+ * tile.getImage().src = src;
248
+ * });
249
+ * ```
250
+ * For more fine grained control, the load function can use fetch or XMLHttpRequest and involve
251
+ * error handling:
252
+ *
253
+ * ```js
254
+ * import TileState from 'ol/TileState.js';
255
+ *
256
+ * source.setTileLoadFunction(function(tile, src) {
257
+ * const xhr = new XMLHttpRequest();
258
+ * xhr.responseType = 'blob';
259
+ * xhr.addEventListener('loadend', function (evt) {
260
+ * const data = this.response;
261
+ * if (data !== undefined) {
262
+ * tile.getImage().src = URL.createObjectURL(data);
263
+ * } else {
264
+ * tile.setState(TileState.ERROR);
265
+ * }
266
+ * });
267
+ * xhr.addEventListener('error', function () {
268
+ * tile.setState(TileState.ERROR);
269
+ * });
270
+ * xhr.open('GET', src);
271
+ * xhr.send();
272
+ * });
273
+ * ```
274
+ *
275
+ * @typedef {function(Tile, string): void} LoadFunction
276
+ * @api
277
+ */
278
+
279
+ /**
280
+ * {@link module:ol/source/Tile~TileSource} sources use a function of this type to get
281
+ * the url that provides a tile for a given tile coordinate.
282
+ *
283
+ * This function takes a {@link module:ol/tilecoord~TileCoord} for the tile
284
+ * coordinate, a `{number}` representing the pixel ratio and a
285
+ * {@link module:ol/proj/Projection~Projection} for the projection as arguments
286
+ * and returns a `{string}` representing the tile URL, or undefined if no tile
287
+ * should be requested for the passed tile coordinate.
288
+ *
289
+ * @typedef {function(import("./tilecoord.js").TileCoord, number,
290
+ * import("./proj/Projection.js").default): (string|undefined)} UrlFunction
291
+ * @api
292
+ */
293
+
294
+ /**
295
+ * @typedef {Object} Options
296
+ * @property {number} [transition=250] A duration for tile opacity
297
+ * transitions in milliseconds. A duration of 0 disables the opacity transition.
298
+ * @property {boolean} [interpolate=false] Use interpolated values when resampling. By default,
299
+ * the nearest neighbor is used when resampling.
300
+ * @api
301
+ */
302
+
303
+ /**
304
+ * @classdesc
305
+ * Base class for tiles.
306
+ *
307
+ * @abstract
308
+ */
309
+ class Tile extends _events_Target_js__WEBPACK_IMPORTED_MODULE_0__["default"] {
310
+ /**
311
+ * @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate.
312
+ * @param {import("./TileState.js").default} state State.
313
+ * @param {Options} [options] Tile options.
314
+ */
315
+ constructor(tileCoord, state, options) {
316
+ super();
317
+
318
+ options = options ? options : {};
319
+
320
+ /**
321
+ * @type {import("./tilecoord.js").TileCoord}
322
+ */
323
+ this.tileCoord = tileCoord;
324
+
325
+ /**
326
+ * @protected
327
+ * @type {import("./TileState.js").default}
328
+ */
329
+ this.state = state;
330
+
331
+ /**
332
+ * A key assigned to the tile. This is used in conjunction with a source key
333
+ * to determine if a cached version of this tile may be used by the renderer.
334
+ * @type {string}
335
+ */
336
+ this.key = '';
337
+
338
+ /**
339
+ * The duration for the opacity transition.
340
+ * @private
341
+ * @type {number}
342
+ */
343
+ this.transition_ =
344
+ options.transition === undefined ? 250 : options.transition;
345
+
346
+ /**
347
+ * Lookup of start times for rendering transitions. If the start time is
348
+ * equal to -1, the transition is complete.
349
+ * @private
350
+ * @type {Object<string, number>}
351
+ */
352
+ this.transitionStarts_ = {};
353
+
354
+ /**
355
+ * @type {boolean}
356
+ */
357
+ this.interpolate = !!options.interpolate;
358
+ }
359
+
360
+ /**
361
+ * @protected
362
+ */
363
+ changed() {
364
+ this.dispatchEvent(_events_EventType_js__WEBPACK_IMPORTED_MODULE_1__["default"].CHANGE);
365
+ }
366
+
367
+ /**
368
+ * Called by the tile cache when the tile is removed from the cache due to expiry
369
+ */
370
+ release() {
371
+ // to remove the `change` listener on this tile in `ol/TileQueue#handleTileChange`
372
+ this.setState(_TileState_js__WEBPACK_IMPORTED_MODULE_2__["default"].EMPTY);
373
+ }
374
+
375
+ /**
376
+ * @return {string} Key.
377
+ */
378
+ getKey() {
379
+ return this.key + '/' + this.tileCoord;
380
+ }
381
+
382
+ /**
383
+ * Get the tile coordinate for this tile.
384
+ * @return {import("./tilecoord.js").TileCoord} The tile coordinate.
385
+ * @api
386
+ */
387
+ getTileCoord() {
388
+ return this.tileCoord;
389
+ }
390
+
391
+ /**
392
+ * @return {import("./TileState.js").default} State.
393
+ */
394
+ getState() {
395
+ return this.state;
396
+ }
397
+
398
+ /**
399
+ * Sets the state of this tile. If you write your own {@link module:ol/Tile~LoadFunction tileLoadFunction} ,
400
+ * it is important to set the state correctly to {@link module:ol/TileState~ERROR}
401
+ * when the tile cannot be loaded. Otherwise the tile cannot be removed from
402
+ * the tile queue and will block other requests.
403
+ * @param {import("./TileState.js").default} state State.
404
+ * @api
405
+ */
406
+ setState(state) {
407
+ if (this.state === _TileState_js__WEBPACK_IMPORTED_MODULE_2__["default"].EMPTY) {
408
+ // no more state changes
409
+ return;
410
+ }
411
+ if (this.state !== _TileState_js__WEBPACK_IMPORTED_MODULE_2__["default"].ERROR && this.state > state) {
412
+ throw new Error('Tile load sequence violation');
413
+ }
414
+ this.state = state;
415
+ this.changed();
416
+ }
417
+
418
+ /**
419
+ * Load the image or retry if loading previously failed.
420
+ * Loading is taken care of by the tile queue, and calling this method is
421
+ * only needed for preloading or for reloading in case of an error.
422
+ * @abstract
423
+ * @api
424
+ */
425
+ load() {
426
+ (0,_util_js__WEBPACK_IMPORTED_MODULE_3__.abstract)();
427
+ }
428
+
429
+ /**
430
+ * Get the alpha value for rendering.
431
+ * @param {string} id An id for the renderer.
432
+ * @param {number} time The render frame time.
433
+ * @return {number} A number between 0 and 1.
434
+ */
435
+ getAlpha(id, time) {
436
+ if (!this.transition_) {
437
+ return 1;
438
+ }
439
+
440
+ let start = this.transitionStarts_[id];
441
+ if (!start) {
442
+ start = time;
443
+ this.transitionStarts_[id] = start;
444
+ } else if (start === -1) {
445
+ return 1;
446
+ }
447
+
448
+ const delta = time - start + 1000 / 60; // avoid rendering at 0
449
+ if (delta >= this.transition_) {
450
+ return 1;
451
+ }
452
+ return (0,_easing_js__WEBPACK_IMPORTED_MODULE_4__.easeIn)(delta / this.transition_);
453
+ }
454
+
455
+ /**
456
+ * Determine if a tile is in an alpha transition. A tile is considered in
457
+ * transition if tile.getAlpha() has not yet been called or has been called
458
+ * and returned 1.
459
+ * @param {string} id An id for the renderer.
460
+ * @return {boolean} The tile is in transition.
461
+ */
462
+ inTransition(id) {
463
+ if (!this.transition_) {
464
+ return false;
465
+ }
466
+ return this.transitionStarts_[id] !== -1;
467
+ }
468
+
469
+ /**
470
+ * Mark a transition as complete.
471
+ * @param {string} id An id for the renderer.
472
+ */
473
+ endTransition(id) {
474
+ if (this.transition_) {
475
+ this.transitionStarts_[id] = -1;
476
+ }
477
+ }
478
+
479
+ /**
480
+ * @override
481
+ */
482
+ disposeInternal() {
483
+ this.release();
484
+ super.disposeInternal();
485
+ }
486
+ }
487
+
488
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Tile);
489
+
490
+
491
+ /***/ })
492
+
493
+ }])
494
+ //# sourceMappingURL=vendors-node_modules_ol_ImageTile_js.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vendors-node_modules_ol_ImageTile_js.js","mappings":";;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACuC;AACV;AACU;AACQ;;AAE/C,wBAAwB,gDAAI;AAC5B;AACA,aAAa,oCAAoC;AACjD,aAAa,kCAAkC;AAC/C,aAAa,QAAQ;AACrB,aAAa,SAAS;AACtB,aAAa,kCAAkC;AAC/C,aAAa,6BAA6B;AAC1C;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc,qDAAqD;AACnE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,oCAAoC;AACjD;AACA;AACA;AACA,iBAAiB,4DAAgB;AACjC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,2DAAe;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,kBAAkB;AAC/C;AACA,mBAAmB,4DAAgB;AACnC,MAAM;AACN,mBAAmB,2DAAe;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,UAAU;AACV,yCAAyC;AACzC,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,sBAAsB,2DAAe;AACrC,mBAAmB,0DAAc;AACjC;AACA;AACA;AACA;AACA;AACA,sBAAsB,0DAAc;AACpC,mBAAmB,6DAAiB;AACpC;AACA;AACA,uBAAuB,sDAAW;AAClC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,mBAAmB;AAC/B;AACA;AACA,cAAc,8DAAqB;AACnC;AACA;AACA;AACA;;AAEA,iEAAe,SAAS,EAAC;;;;;;;;;;;;;;;;;;;;ACpMzB;AACA;AACA;AACuC;AACJ;AACW;AACD;AACV;;AAEnC;AACA,4BAA4B,2BAA2B;AACvD,KAAK,OAAO;AACZ;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;;AAEA;AACA,IAAI,wCAAwC;AAC5C;AACA;AACA,0BAA0B,qCAAqC;AAC/D,mBAAmB,OAAO;AAC1B,IAAI,4CAA4C;AAChD,mBAAmB,OAAO;AAC1B;AACA;AACA,aAAa;AACb,0EAA0E;AAC1E;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB;AACA,cAAc,SAAS;AACvB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yDAAW;AAC9B;AACA,aAAa,oCAAoC;AACjD,aAAa,kCAAkC;AAC/C,aAAa,SAAS;AACtB;AACA;AACA;;AAEA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uBAAuB,mEAAgB;AACvC;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,2DAAe;AACjC;;AAEA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,oCAAoC;AAClD;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,kCAAkC;AAChD;AACA;AACA;AACA;;AAEA;AACA,yDAAyD,oDAAoD;AAC7G,oDAAoD;AACpD;AACA;AACA,aAAa,kCAAkC;AAC/C;AACA;AACA;AACA,uBAAuB,2DAAe;AACtC;AACA;AACA;AACA,uBAAuB,2DAAe;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,kDAAQ;AACZ;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA,4CAA4C;AAC5C;AACA;AACA;AACA,WAAW,kDAAM;AACjB;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,IAAI,EAAC","sources":["webpack://@vaadin/bundles/./node_modules/ol/ImageTile.js","webpack://@vaadin/bundles/./node_modules/ol/Tile.js"],"sourcesContent":["/**\n * @module ol/ImageTile\n */\nimport {listenImage} from './Image.js';\nimport Tile from './Tile.js';\nimport TileState from './TileState.js';\nimport {createCanvasContext2D} from './dom.js';\n\nclass ImageTile extends Tile {\n /**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"./TileState.js\").default} state State.\n * @param {string} src Image source URI.\n * @param {?string} crossOrigin Cross origin.\n * @param {import(\"./Tile.js\").LoadFunction} tileLoadFunction Tile load function.\n * @param {import(\"./Tile.js\").Options} [options] Tile options.\n */\n constructor(tileCoord, state, src, crossOrigin, tileLoadFunction, options) {\n super(tileCoord, state, options);\n\n /**\n * @private\n * @type {?string}\n */\n this.crossOrigin_ = crossOrigin;\n\n /**\n * Image URI\n *\n * @private\n * @type {string}\n */\n this.src_ = src;\n\n this.key = src;\n\n /**\n * @private\n * @type {HTMLImageElement|HTMLCanvasElement}\n */\n this.image_ = new Image();\n if (crossOrigin !== null) {\n this.image_.crossOrigin = crossOrigin;\n }\n\n /**\n * @private\n * @type {?function():void}\n */\n this.unlisten_ = null;\n\n /**\n * @private\n * @type {import(\"./Tile.js\").LoadFunction}\n */\n this.tileLoadFunction_ = tileLoadFunction;\n }\n\n /**\n * Get the HTML image element for this tile (may be a Canvas, Image, or Video).\n * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n * @api\n */\n getImage() {\n return this.image_;\n }\n\n /**\n * Sets an HTML image element for this tile (may be a Canvas or preloaded Image).\n * @param {HTMLCanvasElement|HTMLImageElement} element Element.\n */\n setImage(element) {\n this.image_ = element;\n this.state = TileState.LOADED;\n this.unlistenImage_();\n this.changed();\n }\n\n /**\n * Tracks loading or read errors.\n *\n * @private\n */\n handleImageError_() {\n this.state = TileState.ERROR;\n this.unlistenImage_();\n this.image_ = getBlankImage();\n this.changed();\n }\n\n /**\n * Tracks successful image load.\n *\n * @private\n */\n handleImageLoad_() {\n const image = /** @type {HTMLImageElement} */ (this.image_);\n if (image.naturalWidth && image.naturalHeight) {\n this.state = TileState.LOADED;\n } else {\n this.state = TileState.EMPTY;\n }\n this.unlistenImage_();\n this.changed();\n }\n\n /**\n * Load the image or retry if loading previously failed.\n * Loading is taken care of by the tile queue, and calling this method is\n * only needed for preloading or for reloading in case of an error.\n *\n * To retry loading tiles on failed requests, use a custom `tileLoadFunction`\n * that checks for error status codes and reloads only when the status code is\n * 408, 429, 500, 502, 503 and 504, and only when not too many retries have been\n * made already:\n *\n * ```js\n * const retryCodes = [408, 429, 500, 502, 503, 504];\n * const retries = {};\n * source.setTileLoadFunction((tile, src) => {\n * const image = tile.getImage();\n * fetch(src)\n * .then((response) => {\n * if (retryCodes.includes(response.status)) {\n * retries[src] = (retries[src] || 0) + 1;\n * if (retries[src] <= 3) {\n * setTimeout(() => tile.load(), retries[src] * 1000);\n * }\n * return Promise.reject();\n * }\n * return response.blob();\n * })\n * .then((blob) => {\n * const imageUrl = URL.createObjectURL(blob);\n * image.src = imageUrl;\n * setTimeout(() => URL.revokeObjectURL(imageUrl), 5000);\n * })\n * .catch(() => tile.setState(3)); // error\n * });\n * ```\n * @api\n * @override\n */\n load() {\n if (this.state == TileState.ERROR) {\n this.state = TileState.IDLE;\n this.image_ = new Image();\n if (this.crossOrigin_ !== null) {\n this.image_.crossOrigin = this.crossOrigin_;\n }\n }\n if (this.state == TileState.IDLE) {\n this.state = TileState.LOADING;\n this.changed();\n this.tileLoadFunction_(this, this.src_);\n this.unlisten_ = listenImage(\n this.image_,\n this.handleImageLoad_.bind(this),\n this.handleImageError_.bind(this),\n );\n }\n }\n\n /**\n * Discards event handlers which listen for load completion or errors.\n *\n * @private\n */\n unlistenImage_() {\n if (this.unlisten_) {\n this.unlisten_();\n this.unlisten_ = null;\n }\n }\n\n /**\n * @override\n */\n disposeInternal() {\n this.unlistenImage_();\n this.image_ = null;\n super.disposeInternal();\n }\n}\n\n/**\n * Get a 1-pixel blank image.\n * @return {HTMLCanvasElement} Blank image.\n */\nfunction getBlankImage() {\n const ctx = createCanvasContext2D(1, 1);\n ctx.fillStyle = 'rgba(0,0,0,0)';\n ctx.fillRect(0, 0, 1, 1);\n return ctx.canvas;\n}\n\nexport default ImageTile;\n","/**\n * @module ol/Tile\n */\nimport TileState from './TileState.js';\nimport {easeIn} from './easing.js';\nimport EventType from './events/EventType.js';\nimport EventTarget from './events/Target.js';\nimport {abstract} from './util.js';\n\n/**\n * A function that takes a {@link module:ol/Tile~Tile} for the tile and a\n * `{string}` for the url as arguments. The default is\n * ```js\n * source.setTileLoadFunction(function(tile, src) {\n * tile.getImage().src = src;\n * });\n * ```\n * For more fine grained control, the load function can use fetch or XMLHttpRequest and involve\n * error handling:\n *\n * ```js\n * import TileState from 'ol/TileState.js';\n *\n * source.setTileLoadFunction(function(tile, src) {\n * const xhr = new XMLHttpRequest();\n * xhr.responseType = 'blob';\n * xhr.addEventListener('loadend', function (evt) {\n * const data = this.response;\n * if (data !== undefined) {\n * tile.getImage().src = URL.createObjectURL(data);\n * } else {\n * tile.setState(TileState.ERROR);\n * }\n * });\n * xhr.addEventListener('error', function () {\n * tile.setState(TileState.ERROR);\n * });\n * xhr.open('GET', src);\n * xhr.send();\n * });\n * ```\n *\n * @typedef {function(Tile, string): void} LoadFunction\n * @api\n */\n\n/**\n * {@link module:ol/source/Tile~TileSource} sources use a function of this type to get\n * the url that provides a tile for a given tile coordinate.\n *\n * This function takes a {@link module:ol/tilecoord~TileCoord} for the tile\n * coordinate, a `{number}` representing the pixel ratio and a\n * {@link module:ol/proj/Projection~Projection} for the projection as arguments\n * and returns a `{string}` representing the tile URL, or undefined if no tile\n * should be requested for the passed tile coordinate.\n *\n * @typedef {function(import(\"./tilecoord.js\").TileCoord, number,\n * import(\"./proj/Projection.js\").default): (string|undefined)} UrlFunction\n * @api\n */\n\n/**\n * @typedef {Object} Options\n * @property {number} [transition=250] A duration for tile opacity\n * transitions in milliseconds. A duration of 0 disables the opacity transition.\n * @property {boolean} [interpolate=false] Use interpolated values when resampling. By default,\n * the nearest neighbor is used when resampling.\n * @api\n */\n\n/**\n * @classdesc\n * Base class for tiles.\n *\n * @abstract\n */\nclass Tile extends EventTarget {\n /**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"./TileState.js\").default} state State.\n * @param {Options} [options] Tile options.\n */\n constructor(tileCoord, state, options) {\n super();\n\n options = options ? options : {};\n\n /**\n * @type {import(\"./tilecoord.js\").TileCoord}\n */\n this.tileCoord = tileCoord;\n\n /**\n * @protected\n * @type {import(\"./TileState.js\").default}\n */\n this.state = state;\n\n /**\n * A key assigned to the tile. This is used in conjunction with a source key\n * to determine if a cached version of this tile may be used by the renderer.\n * @type {string}\n */\n this.key = '';\n\n /**\n * The duration for the opacity transition.\n * @private\n * @type {number}\n */\n this.transition_ =\n options.transition === undefined ? 250 : options.transition;\n\n /**\n * Lookup of start times for rendering transitions. If the start time is\n * equal to -1, the transition is complete.\n * @private\n * @type {Object<string, number>}\n */\n this.transitionStarts_ = {};\n\n /**\n * @type {boolean}\n */\n this.interpolate = !!options.interpolate;\n }\n\n /**\n * @protected\n */\n changed() {\n this.dispatchEvent(EventType.CHANGE);\n }\n\n /**\n * Called by the tile cache when the tile is removed from the cache due to expiry\n */\n release() {\n // to remove the `change` listener on this tile in `ol/TileQueue#handleTileChange`\n this.setState(TileState.EMPTY);\n }\n\n /**\n * @return {string} Key.\n */\n getKey() {\n return this.key + '/' + this.tileCoord;\n }\n\n /**\n * Get the tile coordinate for this tile.\n * @return {import(\"./tilecoord.js\").TileCoord} The tile coordinate.\n * @api\n */\n getTileCoord() {\n return this.tileCoord;\n }\n\n /**\n * @return {import(\"./TileState.js\").default} State.\n */\n getState() {\n return this.state;\n }\n\n /**\n * Sets the state of this tile. If you write your own {@link module:ol/Tile~LoadFunction tileLoadFunction} ,\n * it is important to set the state correctly to {@link module:ol/TileState~ERROR}\n * when the tile cannot be loaded. Otherwise the tile cannot be removed from\n * the tile queue and will block other requests.\n * @param {import(\"./TileState.js\").default} state State.\n * @api\n */\n setState(state) {\n if (this.state === TileState.EMPTY) {\n // no more state changes\n return;\n }\n if (this.state !== TileState.ERROR && this.state > state) {\n throw new Error('Tile load sequence violation');\n }\n this.state = state;\n this.changed();\n }\n\n /**\n * Load the image or retry if loading previously failed.\n * Loading is taken care of by the tile queue, and calling this method is\n * only needed for preloading or for reloading in case of an error.\n * @abstract\n * @api\n */\n load() {\n abstract();\n }\n\n /**\n * Get the alpha value for rendering.\n * @param {string} id An id for the renderer.\n * @param {number} time The render frame time.\n * @return {number} A number between 0 and 1.\n */\n getAlpha(id, time) {\n if (!this.transition_) {\n return 1;\n }\n\n let start = this.transitionStarts_[id];\n if (!start) {\n start = time;\n this.transitionStarts_[id] = start;\n } else if (start === -1) {\n return 1;\n }\n\n const delta = time - start + 1000 / 60; // avoid rendering at 0\n if (delta >= this.transition_) {\n return 1;\n }\n return easeIn(delta / this.transition_);\n }\n\n /**\n * Determine if a tile is in an alpha transition. A tile is considered in\n * transition if tile.getAlpha() has not yet been called or has been called\n * and returned 1.\n * @param {string} id An id for the renderer.\n * @return {boolean} The tile is in transition.\n */\n inTransition(id) {\n if (!this.transition_) {\n return false;\n }\n return this.transitionStarts_[id] !== -1;\n }\n\n /**\n * Mark a transition as complete.\n * @param {string} id An id for the renderer.\n */\n endTransition(id) {\n if (this.transition_) {\n this.transitionStarts_[id] = -1;\n }\n }\n\n /**\n * @override\n */\n disposeInternal() {\n this.release();\n super.disposeInternal();\n }\n}\n\nexport default Tile;\n"],"names":[],"sourceRoot":""}