@local-logic/sdks-app 1.0.0-beta.68 → 1.0.0-beta.69

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 (158) hide show
  1. package/dist/assets/Driving.5e24f736.svg +5 -0
  2. package/dist/assets/Walking.a0dcd971.svg +3 -0
  3. package/dist/assets/auto-track-legacy.a46e361b.js +1 -0
  4. package/dist/assets/auto-track.bcea5d95.js +1 -0
  5. package/dist/assets/close.74ac3780.svg +3 -0
  6. package/dist/assets/directions.ccc1cf15.svg +3 -0
  7. package/dist/assets/index-legacy.0be73293.js +1 -0
  8. package/dist/assets/{index-legacy.33579fb2.js → index-legacy.46f64d17.js} +1 -1
  9. package/dist/assets/index-legacy.57bc6187.js +1 -0
  10. package/dist/assets/{index-legacy.45d65bd6.js → index-legacy.5bcad02a.js} +1 -1
  11. package/dist/assets/index-legacy.770cfe03.js +1 -0
  12. package/dist/assets/{index-legacy.33ce598b.js → index-legacy.93d69255.js} +1 -1
  13. package/dist/assets/{index-legacy.c10a590c.js → index-legacy.98ea5567.js} +13 -13
  14. package/dist/assets/index-legacy.9eb391ce.js +1 -0
  15. package/dist/assets/{index-legacy.631596f5.js → index-legacy.b7a4faaa.js} +1 -1
  16. package/dist/assets/index-legacy.c4bf8ae2.js +1 -0
  17. package/dist/assets/index-legacy.d5ed91f3.js +1 -0
  18. package/dist/assets/index-legacy.ded6c0c3.js +1 -0
  19. package/dist/assets/index-legacy.ea25d2c0.js +40 -0
  20. package/dist/assets/index-legacy.fe28c497.js +1 -0
  21. package/dist/assets/{chevron_right.08649806.css → index.08649806.css} +0 -0
  22. package/dist/assets/index.0ad6c4c5.js +1 -0
  23. package/dist/assets/index.130c24fb.js +1 -0
  24. package/dist/assets/{index.9c7a418d.js → index.16564d34.js} +1 -1
  25. package/dist/assets/index.3f198d2d.js +633 -0
  26. package/dist/assets/index.499b0146.js +1 -0
  27. package/dist/assets/index.520a122e.js +224 -0
  28. package/dist/assets/index.6afa5429.js +1 -0
  29. package/dist/assets/index.939781f4.js +116 -0
  30. package/dist/assets/{index.689aa908.js → index.9c4a9ff4.js} +326 -304
  31. package/dist/assets/index.9c512de3.js +1 -0
  32. package/dist/assets/{index.aad70e37.js → index.a930ac3c.js} +1 -1
  33. package/dist/assets/index.d464e7cf.js +1 -0
  34. package/dist/assets/index.e63e2d64.js +1 -0
  35. package/dist/assets/index.f4fcee01.js +1 -0
  36. package/dist/assets/{index.umd-legacy.77e7f5f5.js → index.umd-legacy.97cfaf3e.js} +1 -1
  37. package/dist/assets/{index.umd.3636b63d.js → index.umd.fababc47.js} +1 -1
  38. package/dist/index.html +3 -3
  39. package/dist/types/components/Search/index.d.ts +16 -0
  40. package/dist/types/components/Search/index.d.ts.map +1 -0
  41. package/dist/types/{sdks/DataExplorer/components/Map → components}/Search/index.js +11 -8
  42. package/dist/types/components/Search/index.js.map +1 -0
  43. package/dist/types/{sdks/DataExplorer/components/Map → components}/Search/styles.d.ts +6 -1
  44. package/dist/types/components/Search/styles.d.ts.map +1 -0
  45. package/dist/types/{sdks/DataExplorer/components/Map → components}/Search/styles.js +12 -5
  46. package/dist/types/components/Search/styles.js.map +1 -0
  47. package/dist/types/{sdks/DataExplorer/features → components/Search}/useGeocodes.d.ts +0 -0
  48. package/dist/types/components/Search/useGeocodes.d.ts.map +1 -0
  49. package/dist/types/{sdks/DataExplorer/features → components/Search}/useGeocodes.js +0 -0
  50. package/dist/types/components/Search/useGeocodes.js.map +1 -0
  51. package/dist/types/{sdks/DataExplorer/features → components/Search}/useSuggestions.d.ts +0 -0
  52. package/dist/types/components/Search/useSuggestions.d.ts.map +1 -0
  53. package/dist/types/{sdks/DataExplorer/features → components/Search}/useSuggestions.js +0 -0
  54. package/dist/types/components/Search/useSuggestions.js.map +1 -0
  55. package/dist/types/context/languageProvider/data-explorer/locales/en/index.d.ts.map +1 -1
  56. package/dist/types/context/languageProvider/data-explorer/locales/en/index.js +1 -0
  57. package/dist/types/context/languageProvider/data-explorer/locales/en/index.js.map +1 -1
  58. package/dist/types/context/languageProvider/data-explorer/locales/fr/index.d.ts.map +1 -1
  59. package/dist/types/context/languageProvider/data-explorer/locales/fr/index.js +1 -0
  60. package/dist/types/context/languageProvider/data-explorer/locales/fr/index.js.map +1 -1
  61. package/dist/types/context/languageProvider/data-explorer/types.d.ts +1 -1
  62. package/dist/types/context/languageProvider/data-explorer/types.d.ts.map +1 -1
  63. package/dist/types/context/languageProvider/index.d.ts +2 -2
  64. package/dist/types/context/languageProvider/index.d.ts.map +1 -1
  65. package/dist/types/context/languageProvider/local-content/locales/en/index.d.ts.map +1 -1
  66. package/dist/types/context/languageProvider/local-content/locales/en/index.js +9 -0
  67. package/dist/types/context/languageProvider/local-content/locales/en/index.js.map +1 -1
  68. package/dist/types/context/languageProvider/local-content/locales/fr/index.d.ts.map +1 -1
  69. package/dist/types/context/languageProvider/local-content/locales/fr/index.js +9 -0
  70. package/dist/types/context/languageProvider/local-content/locales/fr/index.js.map +1 -1
  71. package/dist/types/context/languageProvider/local-content/types.d.ts +2 -1
  72. package/dist/types/context/languageProvider/local-content/types.d.ts.map +1 -1
  73. package/dist/types/features/calculateRoute/index.d.ts +3 -0
  74. package/dist/types/features/calculateRoute/index.d.ts.map +1 -0
  75. package/dist/types/features/calculateRoute/index.js +3 -0
  76. package/dist/types/features/calculateRoute/index.js.map +1 -0
  77. package/dist/types/features/calculateRoute/keyFactory.d.ts +15 -0
  78. package/dist/types/features/calculateRoute/keyFactory.d.ts.map +1 -0
  79. package/dist/types/features/calculateRoute/keyFactory.js +5 -0
  80. package/dist/types/features/calculateRoute/keyFactory.js.map +1 -0
  81. package/dist/types/features/calculateRoute/types.d.ts +14 -0
  82. package/dist/types/features/calculateRoute/types.d.ts.map +1 -0
  83. package/dist/types/features/calculateRoute/types.js +2 -0
  84. package/dist/types/features/calculateRoute/types.js.map +1 -0
  85. package/dist/types/features/calculateRoute/useCommute.d.ts +12 -0
  86. package/dist/types/features/calculateRoute/useCommute.d.ts.map +1 -0
  87. package/dist/types/features/calculateRoute/useCommute.js +31 -0
  88. package/dist/types/features/calculateRoute/useCommute.js.map +1 -0
  89. package/dist/types/hooks/useIsMobile.js +1 -1
  90. package/dist/types/hooks/useIsMobile.js.map +1 -1
  91. package/dist/types/sdks/DataExplorer/components/Map/index.d.ts.map +1 -1
  92. package/dist/types/sdks/DataExplorer/components/Map/index.js +4 -2
  93. package/dist/types/sdks/DataExplorer/components/Map/index.js.map +1 -1
  94. package/dist/types/sdks/LocalContent/Map/CommuteContainer/CommuteCalculator/index.d.ts +8 -0
  95. package/dist/types/sdks/LocalContent/Map/CommuteContainer/CommuteCalculator/index.d.ts.map +1 -0
  96. package/dist/types/sdks/LocalContent/Map/CommuteContainer/CommuteCalculator/index.js +92 -0
  97. package/dist/types/sdks/LocalContent/Map/CommuteContainer/CommuteCalculator/index.js.map +1 -0
  98. package/dist/types/sdks/LocalContent/Map/CommuteContainer/CommuteCalculator/styles.d.ts +6 -0
  99. package/dist/types/sdks/LocalContent/Map/CommuteContainer/CommuteCalculator/styles.d.ts.map +1 -0
  100. package/dist/types/sdks/LocalContent/Map/CommuteContainer/CommuteCalculator/styles.js +35 -0
  101. package/dist/types/sdks/LocalContent/Map/CommuteContainer/CommuteCalculator/styles.js.map +1 -0
  102. package/dist/types/sdks/LocalContent/Map/CommuteContainer/index.d.ts +4 -0
  103. package/dist/types/sdks/LocalContent/Map/CommuteContainer/index.d.ts.map +1 -0
  104. package/dist/types/sdks/LocalContent/Map/CommuteContainer/index.js +25 -0
  105. package/dist/types/sdks/LocalContent/Map/CommuteContainer/index.js.map +1 -0
  106. package/dist/types/sdks/LocalContent/Map/CommuteContainer/styles.d.ts +7 -0
  107. package/dist/types/sdks/LocalContent/Map/CommuteContainer/styles.d.ts.map +1 -0
  108. package/dist/types/sdks/LocalContent/Map/CommuteContainer/styles.js +30 -0
  109. package/dist/types/sdks/LocalContent/Map/CommuteContainer/styles.js.map +1 -0
  110. package/dist/types/sdks/LocalContent/Map/index.d.ts.map +1 -1
  111. package/dist/types/sdks/LocalContent/Map/index.js +28 -7
  112. package/dist/types/sdks/LocalContent/Map/index.js.map +1 -1
  113. package/dist/types/sdks/LocalContent/Map/styles.d.ts.map +1 -1
  114. package/dist/types/sdks/LocalContent/Map/styles.js.map +1 -1
  115. package/dist/types/sdks/LocalContent/context.d.ts +9 -0
  116. package/dist/types/sdks/LocalContent/context.d.ts.map +1 -1
  117. package/dist/types/sdks/LocalContent/context.js +11 -1
  118. package/dist/types/sdks/LocalContent/context.js.map +1 -1
  119. package/dist/types/services/decodePolyline/index.d.ts +3 -0
  120. package/dist/types/services/decodePolyline/index.d.ts.map +1 -0
  121. package/dist/types/services/decodePolyline/index.js +128 -0
  122. package/dist/types/services/decodePolyline/index.js.map +1 -0
  123. package/dist/types/services/pluralize/index.d.ts +2 -0
  124. package/dist/types/services/pluralize/index.d.ts.map +1 -0
  125. package/dist/types/services/pluralize/index.js +7 -0
  126. package/dist/types/services/pluralize/index.js.map +1 -0
  127. package/package.json +3 -3
  128. package/dist/assets/auto-track-legacy.f9840683.js +0 -1
  129. package/dist/assets/auto-track.f73c34a7.js +0 -1
  130. package/dist/assets/chevron_right-legacy.4a96f715.js +0 -1
  131. package/dist/assets/chevron_right.427d77f6.js +0 -587
  132. package/dist/assets/index-legacy.0d90becf.js +0 -40
  133. package/dist/assets/index-legacy.211144f2.js +0 -1
  134. package/dist/assets/index-legacy.3b49d3a5.js +0 -1
  135. package/dist/assets/index-legacy.45d7b5c7.js +0 -1
  136. package/dist/assets/index-legacy.4789c6e5.js +0 -1
  137. package/dist/assets/index-legacy.6ed29dcf.js +0 -1
  138. package/dist/assets/index-legacy.ab44ba23.js +0 -1
  139. package/dist/assets/index-legacy.b87ca0ca.js +0 -1
  140. package/dist/assets/index.4b180792.js +0 -1
  141. package/dist/assets/index.4b5f7238.js +0 -1
  142. package/dist/assets/index.603b7e8b.js +0 -1
  143. package/dist/assets/index.9276bc44.js +0 -1
  144. package/dist/assets/index.adca6e84.js +0 -176
  145. package/dist/assets/index.c9949bba.js +0 -1
  146. package/dist/assets/index.e77bdb0c.js +0 -156
  147. package/dist/assets/index.e82abb8d.js +0 -1
  148. package/dist/assets/index.fd288973.js +0 -1
  149. package/dist/assets/index.fe0fe532.js +0 -1
  150. package/dist/types/sdks/DataExplorer/components/Map/Search/index.d.ts +0 -10
  151. package/dist/types/sdks/DataExplorer/components/Map/Search/index.d.ts.map +0 -1
  152. package/dist/types/sdks/DataExplorer/components/Map/Search/index.js.map +0 -1
  153. package/dist/types/sdks/DataExplorer/components/Map/Search/styles.d.ts.map +0 -1
  154. package/dist/types/sdks/DataExplorer/components/Map/Search/styles.js.map +0 -1
  155. package/dist/types/sdks/DataExplorer/features/useGeocodes.d.ts.map +0 -1
  156. package/dist/types/sdks/DataExplorer/features/useGeocodes.js.map +0 -1
  157. package/dist/types/sdks/DataExplorer/features/useSuggestions.d.ts.map +0 -1
  158. package/dist/types/sdks/DataExplorer/features/useSuggestions.js.map +0 -1
@@ -0,0 +1 @@
1
+ import{b as c,c as f,f as L,a as m}from"./index.9c4a9ff4.js";import{l as P,g as z,u as M,i as k,a as R,C as S,b as C,c as y,e as A,m as B,p as F,P as O,f as Q,h as W,j as G,k as T}from"./index.520a122e.js";import{i as U}from"./is-plan-event-enabled.681b46ca.js";import"./index.3f198d2d.js";function N(e){return e.toLowerCase().replace(".","").replace(/\s+/g,"-")}function j(e,t){return t===void 0&&(t=!1),t?btoa(e).replace(/=/g,""):void 0}function V(e,t,n){var i,r;try{var a=((r=(i=window==null?void 0:window.performance)===null||i===void 0?void 0:i.getEntriesByName(e,"resource"))!==null&&r!==void 0?r:[])[0];a&&t.stats.gauge("legacy_destination_time",Math.round(a.duration),L([n],a.duration<100?["cached"]:[],!0))}catch(o){}}function H(e,t,n,i,r,a){return c(this,void 0,void 0,function(){var o,s,u,h,l,v,d,w,g;return f(this,function(p){switch(p.label){case 0:o=N(n),s=j(o,a),u=z(),h="".concat(u,"/integrations/").concat(s!=null?s:o,"/").concat(i,"/").concat(s!=null?s:o,".dynamic.js.gz"),p.label=1;case 1:return p.trys.push([1,3,,4]),[4,P(h)];case 2:return p.sent(),V(h,e,n),[3,4];case 3:throw l=p.sent(),e.stats.gauge("legacy_destination_time",-1,["plugin:".concat(n),"failed"]),l;case 4:return v=window["".concat(o,"Deps")],[4,Promise.all(v.map(function(_){return P(u+_+".gz")}))];case 5:return p.sent(),window["".concat(o,"Loader")](),d=window["".concat(o,"Integration")],d.Integration&&(w={user:function(){return t.user()},addIntegration:function(){}},d(w),d=d.Integration),g=new d(r),g.analytics=t,[2,g]}})})}function J(e,t,n){return c(this,void 0,void 0,function(){var i,r,a,o;return f(this,function(s){return i=z(),r=N(e),a=j(e,n),o="".concat(i,"/integrations/").concat(a!=null?a:r,"/").concat(t,"/").concat(a!=null?a:r,".dynamic.js.gz"),[2,M(o)]})})}function K(e){var t,n,i,r;return(r=(n=(t=e.versionSettings)===null||t===void 0?void 0:t.override)!==null&&n!==void 0?n:(i=e.versionSettings)===null||i===void 0?void 0:i.version)!==null&&r!==void 0?r:"latest"}function X(e,t){return c(this,void 0,void 0,function(){var n,i=this;return f(this,function(r){switch(r.label){case 0:return n=[],k()?[2,t]:[4,F(function(){return t.length>0&&G()},function(){return c(i,void 0,void 0,function(){var a,o,s;return f(this,function(u){switch(u.label){case 0:return a=t.pop(),a?[4,W(a,e)]:[2];case 1:return o=u.sent(),s=o instanceof T,s||n.push(a),[2]}})})})];case 1:return r.sent(),n.map(function(a){return t.pushWithBackoff(a)}),[2,t]}})})}var Y=function(){function e(t,n,i,r){i===void 0&&(i={}),this.options={},this.type="destination",this.middleware=[],this._ready=!1,this._initialized=!1,this.flushing=!1,this.name=t,this.version=n,this.settings=m({},i),this.settings.type&&this.settings.type==="browser"&&delete this.settings.type,this.options=r,this.buffer=r.disableClientPersistence?new O(4,[]):new Q(4,"dest-".concat(t)),this.scheduleFlush()}return e.prototype.isLoaded=function(){return this._ready},e.prototype.ready=function(){var t;return(t=this.onReady)!==null&&t!==void 0?t:Promise.resolve()},e.prototype.load=function(t,n){return c(this,void 0,void 0,function(){var i,r=this;return f(this,function(a){switch(a.label){case 0:return this._ready||this.onReady!==void 0?[2]:(i=this,[4,H(t,n,this.name,this.version,this.settings,this.options.obfuscate)]);case 1:i.integration=a.sent(),this.onReady=new Promise(function(o){var s=function(){r._ready=!0,o(!0)};r.integration.once("ready",s)}),this.onInitialize=new Promise(function(o){var s=function(){r._initialized=!0,o(!0)};r.integration.on("initialize",s)});try{t.stats.increment("analytics_js.integration.invoke",1,["method:initialize","integration_name:".concat(this.name)]),this.integration.initialize()}catch(o){throw t.stats.increment("analytics_js.integration.invoke.error",1,["method:initialize","integration_name:".concat(this.name)]),o}return[2]}})})},e.prototype.unload=function(t,n){return J(this.name,this.version,this.options.obfuscate)},e.prototype.addMiddleware=function(){for(var t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];this.middleware=(t=this.middleware).concat.apply(t,n)},e.prototype.shouldBuffer=function(t){return t.event.type!=="page"&&(k()||this._ready===!1||this._initialized===!1)},e.prototype.send=function(t,n,i){var r,a;return c(this,void 0,void 0,function(){var o,s,u,h,l,v;return f(this,function(d){switch(d.label){case 0:if(this.shouldBuffer(t))return this.buffer.push(t),this.scheduleFlush(),[2,t];if(o=(a=(r=this.options)===null||r===void 0?void 0:r.plan)===null||a===void 0?void 0:a.track,s=t.event.event,o&&s&&this.name!=="Segment.io"){if(u=o[s],U(o,u))t.updateEvent("integrations",m(m({},t.event.integrations),u==null?void 0:u.integrations));else return t.updateEvent("integrations",m(m({},t.event.integrations),{All:!1,"Segment.io":!0})),t.cancel(new S({retry:!1,reason:"Event ".concat(s," disabled for integration ").concat(this.name," in tracking plan"),type:"Dropped by plan"})),[2,t];if((u==null?void 0:u.enabled)&&(u==null?void 0:u.integrations[this.name])===!1)return t.cancel(new S({retry:!1,reason:"Event ".concat(s," disabled for integration ").concat(this.name," in tracking plan"),type:"Dropped by plan"})),[2,t]}return[4,C(this.name,t.event,this.middleware)];case 1:if(h=d.sent(),h===null)return[2,t];l=new n(h,{}),t.stats.increment("analytics_js.integration.invoke",1,["method:".concat(i),"integration_name:".concat(this.name)]),d.label=2;case 2:return d.trys.push([2,5,,6]),this.integration?[4,R(this.integration.invoke.call(this.integration,i,l))]:[3,4];case 3:d.sent(),d.label=4;case 4:return[3,6];case 5:throw v=d.sent(),t.stats.increment("analytics_js.integration.invoke.error",1,["method:".concat(i),"integration_name:".concat(this.name)]),v;case 6:return[2,t]}})})},e.prototype.track=function(t){return c(this,void 0,void 0,function(){return f(this,function(n){return[2,this.send(t,y.Track,"track")]})})},e.prototype.page=function(t){var n;return c(this,void 0,void 0,function(){var i=this;return f(this,function(r){return((n=this.integration)===null||n===void 0?void 0:n._assumesPageview)&&!this._initialized&&this.integration.initialize(),[2,this.onInitialize.then(function(){return i.send(t,y.Page,"page")})]})})},e.prototype.identify=function(t){return c(this,void 0,void 0,function(){return f(this,function(n){return[2,this.send(t,y.Identify,"identify")]})})},e.prototype.alias=function(t){return c(this,void 0,void 0,function(){return f(this,function(n){return[2,this.send(t,y.Alias,"alias")]})})},e.prototype.group=function(t){return c(this,void 0,void 0,function(){return f(this,function(n){return[2,this.send(t,y.Group,"group")]})})},e.prototype.scheduleFlush=function(){var t=this;this.flushing||setTimeout(function(){return c(t,void 0,void 0,function(){var n;return f(this,function(i){switch(i.label){case 0:return this.flushing=!0,n=this,[4,X(this,this.buffer)];case 1:return n.buffer=i.sent(),this.flushing=!1,this.buffer.todo>0&&this.scheduleFlush(),[2]}})})},Math.random()*5e3)},e}();function tt(e,t,n,i){var r,a;if(t===void 0&&(t={}),n===void 0&&(n={}),A())return[];e.plan&&(n=n!=null?n:{},n.plan=e.plan);var o=(a=(r=e.middlewareSettings)===null||r===void 0?void 0:r.routingRules)!==null&&a!==void 0?a:[],s=B(e,n!=null?n:{});return Object.entries(e.integrations).map(function(u){var h,l=u[0],v=u[1];if(!l.startsWith("Segment")){var d=t.All===!1&&t[l]===void 0;if(!(t[l]===!1||d)){var w=v.type,g=v.bundlingStatus,p=v.versionSettings,_=g!=="unbundled"&&(w==="browser"||((h=p==null?void 0:p.componentTypes)===null||h===void 0?void 0:h.includes("browser")));if(!(!_&&l!=="Segment.io"||l==="Iterable")){var D=K(v),b=new Y(l,D,s[l],n),E=o.filter(function(I){return I.destinationName===l});return E.length>0&&i&&b.addMiddleware(i),b}}}}).filter(function(u){return u!==void 0})}export{Y as LegacyDestination,tt as ajsDestinations};
@@ -1,4 +1,4 @@
1
- import{a8 as or,d as $}from"./index.689aa908.js";import{d as Sr}from"./index.adca6e84.js";import"./chevron_right.427d77f6.js";var m={},R={};for(var lr=[],p=0;p<64;)lr[p]=0|4294967296*Math.sin(++p%Math.PI);function Or(r){var a,e,t,n=[a=1732584193,e=4023233417,~a,~e],i=[],l=unescape(encodeURI(r))+"\x80",o=l.length;for(r=--o/4+2|15,i[--r]=8*o;~o;)i[o>>2]|=l.charCodeAt(o)<<8*o--;for(p=l=0;p<r;p+=16){for(o=n;l<64;o=[t=o[3],a+((t=o[0]+[a&e|~a&t,t&a|~t&e,a^e^t,e^(a|~t)][o=l>>4]+lr[l]+~~i[p|15&[l,5*l+1,3*l+5,7*l][o]])<<(o=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*o+l++%4])|t>>>-o),a,e])a=0|o[1],e=o[2];for(l=4;l;)n[--l]+=o[l]}for(r="";l<32;)r+=(n[l>>3]>>4*(1^l++)&15).toString(16);return r}const Ir=Object.freeze(Object.defineProperty({__proto__:null,default:Or},Symbol.toStringTag,{value:"Module"})),Ur=or(Ir);var _={exports:{}};(function(r,a){(function(e,t){r.exports=function(n,i,l,o,f){for(i=i.split?i.split("."):i,o=0;o<i.length;o++)n=n?n[i[o]]:f;return n===f?l:n}})()})(_);/**
1
+ import{ab as or,d as $}from"./index.9c4a9ff4.js";import{d as Sr}from"./index.520a122e.js";import"./index.3f198d2d.js";var m={},R={};for(var lr=[],p=0;p<64;)lr[p]=0|4294967296*Math.sin(++p%Math.PI);function Or(r){var a,e,t,n=[a=1732584193,e=4023233417,~a,~e],i=[],l=unescape(encodeURI(r))+"\x80",o=l.length;for(r=--o/4+2|15,i[--r]=8*o;~o;)i[o>>2]|=l.charCodeAt(o)<<8*o--;for(p=l=0;p<r;p+=16){for(o=n;l<64;o=[t=o[3],a+((t=o[0]+[a&e|~a&t,t&a|~t&e,a^e^t,e^(a|~t)][o=l>>4]+lr[l]+~~i[p|15&[l,5*l+1,3*l+5,7*l][o]])<<(o=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*o+l++%4])|t>>>-o),a,e])a=0|o[1],e=o[2];for(l=4;l;)n[--l]+=o[l]}for(r="";l<32;)r+=(n[l>>3]>>4*(1^l++)&15).toString(16);return r}const Ir=Object.freeze(Object.defineProperty({__proto__:null,default:Or},Symbol.toStringTag,{value:"Module"})),Ur=or(Ir);var _={exports:{}};(function(r,a){(function(e,t){r.exports=function(n,i,l,o,f){for(i=i.split?i.split("."):i,o=0;o<i.length;o++)n=n?n[i[o]]:f;return n===f?l:n}})()})(_);/**
2
2
  * @license Apache-2.0
3
3
  *
4
4
  * Copyright (c) 2018 The Stdlib Authors.
@@ -0,0 +1 @@
1
+ const o={RADIUS:"Radius",LIMIT:"Limit",EXPORT:"Export",SEARCH_MAP:"Search map..."},i={LOCATION:"Location",SCORES:"Scores",POIS:"Points of interest",SCHOOLS:"Schools",DEMOGRAPHICS:"Demographics",PROFILES:"Profiles"},t={LOCATION_TEXT:"Set the location for your data query. Long-press on the map to move the pin.",SCORES_TEXT:"Configure Local Logic Scores for your specified location.",POIS_TEXT:"Configure Local Logic Points of Interest (POIs) for your specified location.",SCHOOLS_TEXT:"Configure Local Logic Schools for your specified location.",DEMOGRAPHICS_TEXT:"Configure Local Logic Demographics for your specified location.",PROFILES_TEXT:"Local Profiles returns qualitative and localized information for your specified location."},e={...o,...i,...t};export{e as translations};
@@ -0,0 +1 @@
1
+ const e={RADIUS:"Rayon",LIMIT:"Limite",EXPORT:"Exporter",SEARCH_MAP:"Recherchez..."},o={LOCATION:"Emplacement",SCORES:"Scores",POIS:"Points d'inter\xEAt",SCHOOLS:"\xC9coles",DEMOGRAPHICS:"D\xE9mographie",PROFILES:"Profils"},r={LOCATION_TEXT:"Sp\xE9cifiez l'emplacement pour votre requ\xEAte. Appuyez longtemps sur la carte pour bouger le curseur.",SCORES_TEXT:"Configurez les Scores Local Logic pour l'emplacement d\xE9sir\xE9.",POIS_TEXT:"Configurez les Points d'Inter\xEAt Local Logic pour l'emplacement d\xE9sir\xE9.",SCHOOLS_TEXT:"Configurez les \xC9coles Local Logic pour l'emplacement d\xE9sir\xE9.",DEMOGRAPHICS_TEXT:"Configurez les D\xE9mographiques Local Logic pour l'emplacement d\xE9sir\xE9.",PROFILES_TEXT:"Les Profils Locaux retournent des donn\xE9es qualitatives et localis\xE9es pour l'emplacement desir\xE9."},s={...e,...o,...r};export{s as translations};
@@ -0,0 +1 @@
1
+ const a={EMPTY_TEXT:"No data available for this location.",CALCULATE_COMMUTE:"Calculate commute",MINUTE:"Minute",HOUR:"Hour",SEARCH_MAP:"Search map...",NO_ROUTE:"No route available",TRY_SUGGESTION:"Try another query.",FAST_ROUTE:"Fastest Route",WALKING:"Walking",DRIVING:"Driving"};export{a as translations};
@@ -1 +1 @@
1
- !function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}System.register(["./index-legacy.0d90becf.js"],(function(e,a){"use strict";var n;return{setters:[function(t){n=t.a9}],execute:function(){function a(t,e){for(var a=function(){var a=e[n];if("string"!=typeof a&&!Array.isArray(a)){var i=function(e){if("default"!==e&&!(e in t)){var n=Object.getOwnPropertyDescriptor(a,e);n&&Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:function(){return a[e]}})}};for(var r in a)i(r)}},n=0;n<e.length;n++)a();return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var i={exports:{}};!function(e,a){window,e.exports=function(e){var a={};function n(t){if(a[t])return a[t].exports;var i=a[t]={i:t,l:!1,exports:{}};return e[t].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=a,n.d=function(t,e,a){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(e,a){if(1&a&&(e=n(e)),8&a)return e;if(4&a&&"object"==t(e)&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&a&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=2)}([function(t,e,a){a.r(e);var n="function"==typeof fetch?fetch.bind():function(t,e){return e=e||{},new Promise((function(a,n){var i=new XMLHttpRequest;for(var r in i.open(e.method||"get",t,!0),e.headers)i.setRequestHeader(r,e.headers[r]);function o(){var t,e=[],a=[],n={};return i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(i,r,o){e.push(r=r.toLowerCase()),a.push([r,o]),t=n[r],n[r]=t?t+","+o:o})),{ok:2==(i.status/100|0),status:i.status,statusText:i.statusText,url:i.responseURL,clone:o,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},headers:{keys:function(){return e},entries:function(){return a},get:function(t){return n[t.toLowerCase()]},has:function(t){return t.toLowerCase()in n}}}}i.withCredentials="include"==e.credentials,i.onload=function(){a(o())},i.onerror=n,i.send(e.body)}))};e.default=n},function(t,e,a){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var a=0;a<e.length;a++){var n=e[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,a,n){return a&&t(e.prototype,a),n&&t(e,n),e}}(),i=function(){function t(e,a){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.pluginName=e}return n(t,[{key:"track",value:function(t,e){window.analytics.track(t,e,{integration:{name:this.pluginName}})}}]),t}();e.default=i},function(t,e,a){Object.defineProperty(e,"__esModule",{value:!0}),e.YouTubeAnalytics=e.VimeoAnalytics=void 0;var n=r(a(3)),i=r(a(4));function r(t){return t&&t.__esModule?t:{default:t}}e.VimeoAnalytics=n.default,e.YouTubeAnalytics=i.default},function(e,a,n){Object.defineProperty(a,"__esModule",{value:!0});var i=function(){function t(t,e){for(var a=0;a<e.length;a++){var n=e[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,a,n){return a&&t(e.prototype,a),n&&t(e,n),e}}(),r=o(n(0));function o(t){return t&&t.__esModule?t:{default:t}}var s=function(e){function a(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a);var i=function(e,a){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!a||"object"!=t(a)&&"function"!=typeof a?e:a}(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,"VimeoAnalytics"));return i.authToken=n,i.player=e,i.metadata={content:{},playback:{videoPlayer:"Vimeo"}},i.mostRecentHeartbeat=0,i.isPaused=!1,i}return function(e,a){if("function"!=typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function, not "+t(a));e.prototype=Object.create(a&&a.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(e,a):e.__proto__=a)}(a,e),i(a,[{key:"initialize",value:function(){var t=this,e={loaded:this.retrieveMetadata,play:this.trackPlay,pause:this.trackPause,ended:this.trackEnded,timeupdate:this.trackHeartbeat};for(var a in e)this.registerHandler(a,e[a]);this.player.getVideoId().then((function(e){t.retrieveMetadata({id:e})})).catch(console.error)}},{key:"registerHandler",value:function(t,e){var a=this;this.player.on(t,(function(t){a.updateMetadata(t),e.call(a,t)}))}},{key:"trackPlay",value:function(){this.isPaused?(this.track("Video Playback Resumed",this.metadata.playback),this.isPaused=!1):(this.track("Video Playback Started",this.metadata.playback),this.track("Video Content Started",this.metadata.content))}},{key:"trackEnded",value:function(){this.track("Video Playback Completed",this.metadata.playback),this.track("Video Content Completed",this.metadata.content)}},{key:"trackHeartbeat",value:function(){var t=this.mostRecentHeartbeat,e=this.metadata.playback.position;e!==t&&e-t>=10&&(this.track("Video Content Playing",this.metadata.content),this.mostRecentHeartbeat=Math.floor(e))}},{key:"trackPause",value:function(){this.isPaused=!0,this.track("Video Playback Paused",this.metadata.playback)}},{key:"retrieveMetadata",value:function(t){var e=this;return new Promise((function(a,n){var i=t.id;(0,r.default)("https://api.vimeo.com/videos/"+i,{headers:{Authorization:"Bearer "+e.authToken}}).then((function(t){return t.ok?t.json():n(t)})).then((function(t){e.metadata.content.title=t.name,e.metadata.content.description=t.description,e.metadata.content.publisher=t.user.name,e.metadata.playback.position=0,e.metadata.playback.totalLength=t.duration})).catch((function(t){return console.error("Request to Vimeo API Failed with: ",t),n(t)}))}))}},{key:"updateMetadata",value:function(t){var e=this;return new Promise((function(a,n){e.player.getVolume().then((function(n){n&&(e.metadata.playback.sound=100*n),e.metadata.playback.position=t.seconds,a()})).catch(n)}))}}]),a}(o(n(1)).default);a.default=s},function(e,a,n){Object.defineProperty(a,"__esModule",{value:!0});var i=function(){function t(t,e){for(var a=0;a<e.length;a++){var n=e[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,a,n){return a&&t(e.prototype,a),n&&t(e,n),e}}(),r=o(n(0));function o(t){return t&&t.__esModule?t:{default:t}}var s=function(e){function a(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a);var i=function(e,a){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!a||"object"!=t(a)&&"function"!=typeof a?e:a}(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,"YoutubeAnalytics"));return i.player=e,i.apiKey=n,i.playerLoaded=!1,i.playbackStarted=!1,i.contentStarted=!1,i.isPaused=!1,i.isBuffering=!1,i.isSeeking=!1,i.lastRecordedTime={timeReported:Date.now(),timeElapsed:0},i.metadata=[{playback:{video_player:"youtube"},content:{}}],i.playlistIndex=0,i}return function(e,a){if("function"!=typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function, not "+t(a));e.prototype=Object.create(a&&a.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(e,a):e.__proto__=a)}(a,e),i(a,[{key:"initialize",value:function(){window.segmentYoutubeOnStateChange=this.onPlayerStateChange.bind(this),window.segmentYoutubeOnReady=this.onPlayerReady.bind(this),this.player.addEventListener("onReady","segmentYoutubeOnReady"),this.player.addEventListener("onStateChange","segmentYoutubeOnStateChange")}},{key:"onPlayerReady",value:function(t){this.retrieveMetadata()}},{key:"onPlayerStateChange",value:function(t){var e=this.player.getCurrentTime();switch(this.metadata[this.playlistIndex]&&(this.metadata[this.playlistIndex].playback.position=this.metadata[this.playlistIndex].content.position=e,this.metadata[this.playlistIndex].playback.quality=this.player.getPlaybackQuality(),this.metadata[this.playlistIndex].playback.sound=this.player.isMuted()?0:this.player.getVolume()),t.data){case-1:if(this.playerLoaded)break;this.retrieveMetadata(),this.playerLoaded=!0;break;case YT.PlayerState.BUFFERING:this.handleBuffer();break;case YT.PlayerState.PLAYING:this.handlePlay();break;case YT.PlayerState.PAUSED:this.handlePause();break;case YT.PlayerState.ENDED:this.handleEnd()}this.lastRecordedTime={timeReported:Date.now(),timeElapsed:1e3*this.player.getCurrentTime()}}},{key:"retrieveMetadata",value:function(){var t=this;return new Promise((function(e,a){var n=t.player.getVideoData(),i=t.player.getPlaylist()||[n.video_id],o=i.join();(0,r.default)("https://www.googleapis.com/youtube/v3/videos?id="+o+"&part=snippet,contentDetails&key="+t.apiKey).then((function(t){if(!t.ok){var e=new Error("Segment request to Youtube API failed (likely due to a bad API Key. Events will still be sent but will not contain video metadata)");throw e.response=t,e}return t.json()})).then((function(a){t.metadata=[];for(var n=0,r=0;r<i.length;r++){var o=a.items[r];t.metadata.push({content:{title:o.snippet.title,description:o.snippet.description,keywords:o.snippet.tags,channel:o.snippet.channelTitle,airdate:o.snippet.publishedAt}}),n+=l(o.contentDetails.duration)}for(r=0;r<i.length;r++)t.metadata[r].playback={total_length:n,video_player:"youtube"};e()})).catch((function(e){t.metadata=i.map((function(t){return{playback:{video_player:"youtube"},content:{}}})),a(e)}))}))}},{key:"handleBuffer",value:function(){var t=this.determineSeek();this.playbackStarted||(this.playbackStarted=!0,this.track("Video Playback Started",this.metadata[this.playlistIndex].playback)),t&&!this.isSeeking&&(this.isSeeking=!0,this.track("Video Playback Seek Started",this.metadata[this.playlistIndex].playback)),this.isSeeking&&(this.track("Video Playback Seek Completed",this.metadata[this.playlistIndex].playback),this.isSeeking=!1);var e=this.player.getPlaylist();e&&0===this.player.getCurrentTime()&&this.player.getPlaylistIndex()!==this.playlistIndex&&(this.contentStarted=!1,this.playlistIndex===e.length-1&&0===this.player.getPlaylistIndex()&&(this.track("Video Playback Completed",this.metadata[this.player.getPlaylistIndex()].playback),this.track("Video Playback Started",this.metadata[this.player.getPlaylistIndex()].playback))),this.track("Video Playback Buffer Started",this.metadata[this.playlistIndex].playback),this.isBuffering=!0}},{key:"handlePlay",value:function(){this.contentStarted||(this.playlistIndex=this.player.getPlaylistIndex(),-1===this.playlistIndex&&(this.playlistIndex=0),this.track("Video Content Started",this.metadata[this.playlistIndex].content),this.contentStarted=!0),this.isBuffering&&(this.track("Video Playback Buffer Completed",this.metadata[this.playlistIndex].playback),this.isBuffering=!1),this.isPaused&&(this.track("Video Playback Resumed",this.metadata[this.playlistIndex].playback),this.isPaused=!1)}},{key:"handlePause",value:function(){var t=this.determineSeek();this.isBuffering&&(this.track("Video Playback Buffer Completed",this.metadata[this.playlistIndex].playback),this.isBuffering=!1),this.isPaused||(t?(this.track("Video Playback Seek Started",this.metadata[this.playlistIndex].playback),this.isSeeking=!0):(this.track("Video Playback Paused",this.metadata[this.playlistIndex].playback),this.isPaused=!0))}},{key:"handleEnd",value:function(){this.track("Video Content Completed",this.metadata[this.playlistIndex].content),this.contentStarted=!1;var t=this.player.getPlaylistIndex(),e=this.player.getPlaylist();(e&&t===e.length-1||-1===t)&&(this.track("Video Playback Completed",this.metadata[this.playlistIndex].playback),this.playbackStarted=!1)}},{key:"determineSeek",value:function(){var t=this.isPaused||this.isBuffering?0:Date.now()-this.lastRecordedTime.timeReported,e=1e3*this.player.getCurrentTime()-this.lastRecordedTime.timeElapsed;return Math.abs(t-e)>2e3}}]),a}(o(n(1)).default);function l(t){var e=t.match(/PT(\d+H)?(\d+M)?(\d+S)?/);return e=e.slice(1).map((function(t){if(null!=t)return t.replace(/\D/,"")})),3600*(parseInt(e[0])||0)+60*(parseInt(e[1])||0)+(parseInt(e[2])||0)}a.default=s}])}(i),e("i",a({__proto__:null,default:n(i.exports)},[i.exports]))}}}))}();
1
+ !function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}System.register(["./index-legacy.ea25d2c0.js"],(function(e,a){"use strict";var n;return{setters:[function(t){n=t.ac}],execute:function(){function a(t,e){for(var a=function(){var a=e[n];if("string"!=typeof a&&!Array.isArray(a)){var i=function(e){if("default"!==e&&!(e in t)){var n=Object.getOwnPropertyDescriptor(a,e);n&&Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:function(){return a[e]}})}};for(var r in a)i(r)}},n=0;n<e.length;n++)a();return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var i={exports:{}};!function(e,a){window,e.exports=function(e){var a={};function n(t){if(a[t])return a[t].exports;var i=a[t]={i:t,l:!1,exports:{}};return e[t].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=a,n.d=function(t,e,a){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(e,a){if(1&a&&(e=n(e)),8&a)return e;if(4&a&&"object"==t(e)&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&a&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=2)}([function(t,e,a){a.r(e);var n="function"==typeof fetch?fetch.bind():function(t,e){return e=e||{},new Promise((function(a,n){var i=new XMLHttpRequest;for(var r in i.open(e.method||"get",t,!0),e.headers)i.setRequestHeader(r,e.headers[r]);function o(){var t,e=[],a=[],n={};return i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(i,r,o){e.push(r=r.toLowerCase()),a.push([r,o]),t=n[r],n[r]=t?t+","+o:o})),{ok:2==(i.status/100|0),status:i.status,statusText:i.statusText,url:i.responseURL,clone:o,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},headers:{keys:function(){return e},entries:function(){return a},get:function(t){return n[t.toLowerCase()]},has:function(t){return t.toLowerCase()in n}}}}i.withCredentials="include"==e.credentials,i.onload=function(){a(o())},i.onerror=n,i.send(e.body)}))};e.default=n},function(t,e,a){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var a=0;a<e.length;a++){var n=e[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,a,n){return a&&t(e.prototype,a),n&&t(e,n),e}}(),i=function(){function t(e,a){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.pluginName=e}return n(t,[{key:"track",value:function(t,e){window.analytics.track(t,e,{integration:{name:this.pluginName}})}}]),t}();e.default=i},function(t,e,a){Object.defineProperty(e,"__esModule",{value:!0}),e.YouTubeAnalytics=e.VimeoAnalytics=void 0;var n=r(a(3)),i=r(a(4));function r(t){return t&&t.__esModule?t:{default:t}}e.VimeoAnalytics=n.default,e.YouTubeAnalytics=i.default},function(e,a,n){Object.defineProperty(a,"__esModule",{value:!0});var i=function(){function t(t,e){for(var a=0;a<e.length;a++){var n=e[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,a,n){return a&&t(e.prototype,a),n&&t(e,n),e}}(),r=o(n(0));function o(t){return t&&t.__esModule?t:{default:t}}var s=function(e){function a(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a);var i=function(e,a){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!a||"object"!=t(a)&&"function"!=typeof a?e:a}(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,"VimeoAnalytics"));return i.authToken=n,i.player=e,i.metadata={content:{},playback:{videoPlayer:"Vimeo"}},i.mostRecentHeartbeat=0,i.isPaused=!1,i}return function(e,a){if("function"!=typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function, not "+t(a));e.prototype=Object.create(a&&a.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(e,a):e.__proto__=a)}(a,e),i(a,[{key:"initialize",value:function(){var t=this,e={loaded:this.retrieveMetadata,play:this.trackPlay,pause:this.trackPause,ended:this.trackEnded,timeupdate:this.trackHeartbeat};for(var a in e)this.registerHandler(a,e[a]);this.player.getVideoId().then((function(e){t.retrieveMetadata({id:e})})).catch(console.error)}},{key:"registerHandler",value:function(t,e){var a=this;this.player.on(t,(function(t){a.updateMetadata(t),e.call(a,t)}))}},{key:"trackPlay",value:function(){this.isPaused?(this.track("Video Playback Resumed",this.metadata.playback),this.isPaused=!1):(this.track("Video Playback Started",this.metadata.playback),this.track("Video Content Started",this.metadata.content))}},{key:"trackEnded",value:function(){this.track("Video Playback Completed",this.metadata.playback),this.track("Video Content Completed",this.metadata.content)}},{key:"trackHeartbeat",value:function(){var t=this.mostRecentHeartbeat,e=this.metadata.playback.position;e!==t&&e-t>=10&&(this.track("Video Content Playing",this.metadata.content),this.mostRecentHeartbeat=Math.floor(e))}},{key:"trackPause",value:function(){this.isPaused=!0,this.track("Video Playback Paused",this.metadata.playback)}},{key:"retrieveMetadata",value:function(t){var e=this;return new Promise((function(a,n){var i=t.id;(0,r.default)("https://api.vimeo.com/videos/"+i,{headers:{Authorization:"Bearer "+e.authToken}}).then((function(t){return t.ok?t.json():n(t)})).then((function(t){e.metadata.content.title=t.name,e.metadata.content.description=t.description,e.metadata.content.publisher=t.user.name,e.metadata.playback.position=0,e.metadata.playback.totalLength=t.duration})).catch((function(t){return console.error("Request to Vimeo API Failed with: ",t),n(t)}))}))}},{key:"updateMetadata",value:function(t){var e=this;return new Promise((function(a,n){e.player.getVolume().then((function(n){n&&(e.metadata.playback.sound=100*n),e.metadata.playback.position=t.seconds,a()})).catch(n)}))}}]),a}(o(n(1)).default);a.default=s},function(e,a,n){Object.defineProperty(a,"__esModule",{value:!0});var i=function(){function t(t,e){for(var a=0;a<e.length;a++){var n=e[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,a,n){return a&&t(e.prototype,a),n&&t(e,n),e}}(),r=o(n(0));function o(t){return t&&t.__esModule?t:{default:t}}var s=function(e){function a(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a);var i=function(e,a){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!a||"object"!=t(a)&&"function"!=typeof a?e:a}(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,"YoutubeAnalytics"));return i.player=e,i.apiKey=n,i.playerLoaded=!1,i.playbackStarted=!1,i.contentStarted=!1,i.isPaused=!1,i.isBuffering=!1,i.isSeeking=!1,i.lastRecordedTime={timeReported:Date.now(),timeElapsed:0},i.metadata=[{playback:{video_player:"youtube"},content:{}}],i.playlistIndex=0,i}return function(e,a){if("function"!=typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function, not "+t(a));e.prototype=Object.create(a&&a.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(e,a):e.__proto__=a)}(a,e),i(a,[{key:"initialize",value:function(){window.segmentYoutubeOnStateChange=this.onPlayerStateChange.bind(this),window.segmentYoutubeOnReady=this.onPlayerReady.bind(this),this.player.addEventListener("onReady","segmentYoutubeOnReady"),this.player.addEventListener("onStateChange","segmentYoutubeOnStateChange")}},{key:"onPlayerReady",value:function(t){this.retrieveMetadata()}},{key:"onPlayerStateChange",value:function(t){var e=this.player.getCurrentTime();switch(this.metadata[this.playlistIndex]&&(this.metadata[this.playlistIndex].playback.position=this.metadata[this.playlistIndex].content.position=e,this.metadata[this.playlistIndex].playback.quality=this.player.getPlaybackQuality(),this.metadata[this.playlistIndex].playback.sound=this.player.isMuted()?0:this.player.getVolume()),t.data){case-1:if(this.playerLoaded)break;this.retrieveMetadata(),this.playerLoaded=!0;break;case YT.PlayerState.BUFFERING:this.handleBuffer();break;case YT.PlayerState.PLAYING:this.handlePlay();break;case YT.PlayerState.PAUSED:this.handlePause();break;case YT.PlayerState.ENDED:this.handleEnd()}this.lastRecordedTime={timeReported:Date.now(),timeElapsed:1e3*this.player.getCurrentTime()}}},{key:"retrieveMetadata",value:function(){var t=this;return new Promise((function(e,a){var n=t.player.getVideoData(),i=t.player.getPlaylist()||[n.video_id],o=i.join();(0,r.default)("https://www.googleapis.com/youtube/v3/videos?id="+o+"&part=snippet,contentDetails&key="+t.apiKey).then((function(t){if(!t.ok){var e=new Error("Segment request to Youtube API failed (likely due to a bad API Key. Events will still be sent but will not contain video metadata)");throw e.response=t,e}return t.json()})).then((function(a){t.metadata=[];for(var n=0,r=0;r<i.length;r++){var o=a.items[r];t.metadata.push({content:{title:o.snippet.title,description:o.snippet.description,keywords:o.snippet.tags,channel:o.snippet.channelTitle,airdate:o.snippet.publishedAt}}),n+=l(o.contentDetails.duration)}for(r=0;r<i.length;r++)t.metadata[r].playback={total_length:n,video_player:"youtube"};e()})).catch((function(e){t.metadata=i.map((function(t){return{playback:{video_player:"youtube"},content:{}}})),a(e)}))}))}},{key:"handleBuffer",value:function(){var t=this.determineSeek();this.playbackStarted||(this.playbackStarted=!0,this.track("Video Playback Started",this.metadata[this.playlistIndex].playback)),t&&!this.isSeeking&&(this.isSeeking=!0,this.track("Video Playback Seek Started",this.metadata[this.playlistIndex].playback)),this.isSeeking&&(this.track("Video Playback Seek Completed",this.metadata[this.playlistIndex].playback),this.isSeeking=!1);var e=this.player.getPlaylist();e&&0===this.player.getCurrentTime()&&this.player.getPlaylistIndex()!==this.playlistIndex&&(this.contentStarted=!1,this.playlistIndex===e.length-1&&0===this.player.getPlaylistIndex()&&(this.track("Video Playback Completed",this.metadata[this.player.getPlaylistIndex()].playback),this.track("Video Playback Started",this.metadata[this.player.getPlaylistIndex()].playback))),this.track("Video Playback Buffer Started",this.metadata[this.playlistIndex].playback),this.isBuffering=!0}},{key:"handlePlay",value:function(){this.contentStarted||(this.playlistIndex=this.player.getPlaylistIndex(),-1===this.playlistIndex&&(this.playlistIndex=0),this.track("Video Content Started",this.metadata[this.playlistIndex].content),this.contentStarted=!0),this.isBuffering&&(this.track("Video Playback Buffer Completed",this.metadata[this.playlistIndex].playback),this.isBuffering=!1),this.isPaused&&(this.track("Video Playback Resumed",this.metadata[this.playlistIndex].playback),this.isPaused=!1)}},{key:"handlePause",value:function(){var t=this.determineSeek();this.isBuffering&&(this.track("Video Playback Buffer Completed",this.metadata[this.playlistIndex].playback),this.isBuffering=!1),this.isPaused||(t?(this.track("Video Playback Seek Started",this.metadata[this.playlistIndex].playback),this.isSeeking=!0):(this.track("Video Playback Paused",this.metadata[this.playlistIndex].playback),this.isPaused=!0))}},{key:"handleEnd",value:function(){this.track("Video Content Completed",this.metadata[this.playlistIndex].content),this.contentStarted=!1;var t=this.player.getPlaylistIndex(),e=this.player.getPlaylist();(e&&t===e.length-1||-1===t)&&(this.track("Video Playback Completed",this.metadata[this.playlistIndex].playback),this.playbackStarted=!1)}},{key:"determineSeek",value:function(){var t=this.isPaused||this.isBuffering?0:Date.now()-this.lastRecordedTime.timeReported,e=1e3*this.player.getCurrentTime()-this.lastRecordedTime.timeElapsed;return Math.abs(t-e)>2e3}}]),a}(o(n(1)).default);function l(t){var e=t.match(/PT(\d+H)?(\d+M)?(\d+S)?/);return e=e.slice(1).map((function(t){if(null!=t)return t.replace(/\D/,"")})),3600*(parseInt(e[0])||0)+60*(parseInt(e[1])||0)+(parseInt(e[2])||0)}a.default=s}])}(i),e("i",a({__proto__:null,default:n(i.exports)},[i.exports]))}}}))}();
@@ -1 +1 @@
1
- import{a9 as x}from"./index.689aa908.js";function _(g,S){for(var f=0;f<S.length;f++){const l=S[f];if(typeof l!="string"&&!Array.isArray(l)){for(const s in l)if(s!=="default"&&!(s in g)){const i=Object.getOwnPropertyDescriptor(l,s);i&&Object.defineProperty(g,s,i.get?i:{enumerable:!0,get:()=>l[s]})}}}return Object.freeze(Object.defineProperty(g,Symbol.toStringTag,{value:"Module"}))}var w={exports:{}};(function(g,S){(function(f,l){g.exports=l()})(window,function(){return function(f){var l={};function s(i){if(l[i])return l[i].exports;var u=l[i]={i,l:!1,exports:{}};return f[i].call(u.exports,u,u.exports,s),u.l=!0,u.exports}return s.m=f,s.c=l,s.d=function(i,u,c){s.o(i,u)||Object.defineProperty(i,u,{enumerable:!0,get:c})},s.r=function(i){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},s.t=function(i,u){if(1&u&&(i=s(i)),8&u||4&u&&typeof i=="object"&&i&&i.__esModule)return i;var c=Object.create(null);if(s.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:i}),2&u&&typeof i!="string")for(var d in i)s.d(c,d,function(p){return i[p]}.bind(null,d));return c},s.n=function(i){var u=i&&i.__esModule?function(){return i.default}:function(){return i};return s.d(u,"a",u),u},s.o=function(i,u){return Object.prototype.hasOwnProperty.call(i,u)},s.p="",s(s.s=2)}([function(f,l,s){s.r(l);var i=typeof fetch=="function"?fetch.bind():function(u,c){return c=c||{},new Promise(function(d,p){var r=new XMLHttpRequest;for(var a in r.open(c.method||"get",u,!0),c.headers)r.setRequestHeader(a,c.headers[a]);function t(){var e,n=[],o=[],h={};return r.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(y,m,b){n.push(m=m.toLowerCase()),o.push([m,b]),e=h[m],h[m]=e?e+","+b:b}),{ok:(r.status/100|0)==2,status:r.status,statusText:r.statusText,url:r.responseURL,clone:t,text:function(){return Promise.resolve(r.responseText)},json:function(){return Promise.resolve(r.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([r.response]))},headers:{keys:function(){return n},entries:function(){return o},get:function(y){return h[y.toLowerCase()]},has:function(y){return y.toLowerCase()in h}}}}r.withCredentials=c.credentials=="include",r.onload=function(){d(t())},r.onerror=p,r.send(c.body)})};l.default=i},function(f,l,s){Object.defineProperty(l,"__esModule",{value:!0});var i=function(){function c(d,p){for(var r=0;r<p.length;r++){var a=p[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(d,a.key,a)}}return function(d,p,r){return p&&c(d.prototype,p),r&&c(d,r),d}}(),u=function(){function c(d,p){(function(r,a){if(!(r instanceof a))throw new TypeError("Cannot call a class as a function")})(this,c),this.pluginName=d}return i(c,[{key:"track",value:function(d,p){window.analytics.track(d,p,{integration:{name:this.pluginName}})}}]),c}();l.default=u},function(f,l,s){Object.defineProperty(l,"__esModule",{value:!0}),l.YouTubeAnalytics=l.VimeoAnalytics=void 0;var i=c(s(3)),u=c(s(4));function c(d){return d&&d.__esModule?d:{default:d}}l.VimeoAnalytics=i.default,l.YouTubeAnalytics=u.default},function(f,l,s){Object.defineProperty(l,"__esModule",{value:!0});var i=function(){function p(r,a){for(var t=0;t<a.length;t++){var e=a[t];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(r,e.key,e)}}return function(r,a,t){return a&&p(r.prototype,a),t&&p(r,t),r}}(),u=c(s(0));function c(p){return p&&p.__esModule?p:{default:p}}var d=function(p){function r(a,t){(function(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")})(this,r);var e=function(n,o){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!o||typeof o!="object"&&typeof o!="function"?n:o}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,"VimeoAnalytics"));return e.authToken=t,e.player=a,e.metadata={content:{},playback:{videoPlayer:"Vimeo"}},e.mostRecentHeartbeat=0,e.isPaused=!1,e}return function(a,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);a.prototype=Object.create(t&&t.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(a,t):a.__proto__=t)}(r,p),i(r,[{key:"initialize",value:function(){var a=this,t={loaded:this.retrieveMetadata,play:this.trackPlay,pause:this.trackPause,ended:this.trackEnded,timeupdate:this.trackHeartbeat};for(var e in t)this.registerHandler(e,t[e]);this.player.getVideoId().then(function(n){a.retrieveMetadata({id:n})}).catch(console.error)}},{key:"registerHandler",value:function(a,t){var e=this;this.player.on(a,function(n){e.updateMetadata(n),t.call(e,n)})}},{key:"trackPlay",value:function(){this.isPaused?(this.track("Video Playback Resumed",this.metadata.playback),this.isPaused=!1):(this.track("Video Playback Started",this.metadata.playback),this.track("Video Content Started",this.metadata.content))}},{key:"trackEnded",value:function(){this.track("Video Playback Completed",this.metadata.playback),this.track("Video Content Completed",this.metadata.content)}},{key:"trackHeartbeat",value:function(){var a=this.mostRecentHeartbeat,t=this.metadata.playback.position;t!==a&&t-a>=10&&(this.track("Video Content Playing",this.metadata.content),this.mostRecentHeartbeat=Math.floor(t))}},{key:"trackPause",value:function(){this.isPaused=!0,this.track("Video Playback Paused",this.metadata.playback)}},{key:"retrieveMetadata",value:function(a){var t=this;return new Promise(function(e,n){var o=a.id;(0,u.default)("https://api.vimeo.com/videos/"+o,{headers:{Authorization:"Bearer "+t.authToken}}).then(function(h){return h.ok?h.json():n(h)}).then(function(h){t.metadata.content.title=h.name,t.metadata.content.description=h.description,t.metadata.content.publisher=h.user.name,t.metadata.playback.position=0,t.metadata.playback.totalLength=h.duration}).catch(function(h){return console.error("Request to Vimeo API Failed with: ",h),n(h)})})}},{key:"updateMetadata",value:function(a){var t=this;return new Promise(function(e,n){t.player.getVolume().then(function(o){o&&(t.metadata.playback.sound=100*o),t.metadata.playback.position=a.seconds,e()}).catch(n)})}}]),r}(c(s(1)).default);l.default=d},function(f,l,s){Object.defineProperty(l,"__esModule",{value:!0});var i=function(){function a(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,e,n){return e&&a(t.prototype,e),n&&a(t,n),t}}(),u=d(s(0)),c=d(s(1));function d(a){return a&&a.__esModule?a:{default:a}}var p=function(a){function t(e,n){(function(h,y){if(!(h instanceof y))throw new TypeError("Cannot call a class as a function")})(this,t);var o=function(h,y){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!y||typeof y!="object"&&typeof y!="function"?h:y}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"YoutubeAnalytics"));return o.player=e,o.apiKey=n,o.playerLoaded=!1,o.playbackStarted=!1,o.contentStarted=!1,o.isPaused=!1,o.isBuffering=!1,o.isSeeking=!1,o.lastRecordedTime={timeReported:Date.now(),timeElapsed:0},o.metadata=[{playback:{video_player:"youtube"},content:{}}],o.playlistIndex=0,o}return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(t,a),i(t,[{key:"initialize",value:function(){window.segmentYoutubeOnStateChange=this.onPlayerStateChange.bind(this),window.segmentYoutubeOnReady=this.onPlayerReady.bind(this),this.player.addEventListener("onReady","segmentYoutubeOnReady"),this.player.addEventListener("onStateChange","segmentYoutubeOnStateChange")}},{key:"onPlayerReady",value:function(e){this.retrieveMetadata()}},{key:"onPlayerStateChange",value:function(e){var n=this.player.getCurrentTime();switch(this.metadata[this.playlistIndex]&&(this.metadata[this.playlistIndex].playback.position=this.metadata[this.playlistIndex].content.position=n,this.metadata[this.playlistIndex].playback.quality=this.player.getPlaybackQuality(),this.metadata[this.playlistIndex].playback.sound=this.player.isMuted()?0:this.player.getVolume()),e.data){case-1:if(this.playerLoaded)break;this.retrieveMetadata(),this.playerLoaded=!0;break;case YT.PlayerState.BUFFERING:this.handleBuffer();break;case YT.PlayerState.PLAYING:this.handlePlay();break;case YT.PlayerState.PAUSED:this.handlePause();break;case YT.PlayerState.ENDED:this.handleEnd()}this.lastRecordedTime={timeReported:Date.now(),timeElapsed:1e3*this.player.getCurrentTime()}}},{key:"retrieveMetadata",value:function(){var e=this;return new Promise(function(n,o){var h=e.player.getVideoData(),y=e.player.getPlaylist()||[h.video_id],m=y.join();(0,u.default)("https://www.googleapis.com/youtube/v3/videos?id="+m+"&part=snippet,contentDetails&key="+e.apiKey).then(function(b){if(!b.ok){var v=new Error("Segment request to Youtube API failed (likely due to a bad API Key. Events will still be sent but will not contain video metadata)");throw v.response=b,v}return b.json()}).then(function(b){e.metadata=[];for(var v=0,k=0;k<y.length;k++){var P=b.items[k];e.metadata.push({content:{title:P.snippet.title,description:P.snippet.description,keywords:P.snippet.tags,channel:P.snippet.channelTitle,airdate:P.snippet.publishedAt}}),v+=r(P.contentDetails.duration)}for(k=0;k<y.length;k++)e.metadata[k].playback={total_length:v,video_player:"youtube"};n()}).catch(function(b){e.metadata=y.map(function(v){return{playback:{video_player:"youtube"},content:{}}}),o(b)})})}},{key:"handleBuffer",value:function(){var e=this.determineSeek();this.playbackStarted||(this.playbackStarted=!0,this.track("Video Playback Started",this.metadata[this.playlistIndex].playback)),e&&!this.isSeeking&&(this.isSeeking=!0,this.track("Video Playback Seek Started",this.metadata[this.playlistIndex].playback)),this.isSeeking&&(this.track("Video Playback Seek Completed",this.metadata[this.playlistIndex].playback),this.isSeeking=!1);var n=this.player.getPlaylist();n&&this.player.getCurrentTime()===0&&this.player.getPlaylistIndex()!==this.playlistIndex&&(this.contentStarted=!1,this.playlistIndex===n.length-1&&this.player.getPlaylistIndex()===0&&(this.track("Video Playback Completed",this.metadata[this.player.getPlaylistIndex()].playback),this.track("Video Playback Started",this.metadata[this.player.getPlaylistIndex()].playback))),this.track("Video Playback Buffer Started",this.metadata[this.playlistIndex].playback),this.isBuffering=!0}},{key:"handlePlay",value:function(){this.contentStarted||(this.playlistIndex=this.player.getPlaylistIndex(),this.playlistIndex===-1&&(this.playlistIndex=0),this.track("Video Content Started",this.metadata[this.playlistIndex].content),this.contentStarted=!0),this.isBuffering&&(this.track("Video Playback Buffer Completed",this.metadata[this.playlistIndex].playback),this.isBuffering=!1),this.isPaused&&(this.track("Video Playback Resumed",this.metadata[this.playlistIndex].playback),this.isPaused=!1)}},{key:"handlePause",value:function(){var e=this.determineSeek();this.isBuffering&&(this.track("Video Playback Buffer Completed",this.metadata[this.playlistIndex].playback),this.isBuffering=!1),this.isPaused||(e?(this.track("Video Playback Seek Started",this.metadata[this.playlistIndex].playback),this.isSeeking=!0):(this.track("Video Playback Paused",this.metadata[this.playlistIndex].playback),this.isPaused=!0))}},{key:"handleEnd",value:function(){this.track("Video Content Completed",this.metadata[this.playlistIndex].content),this.contentStarted=!1;var e=this.player.getPlaylistIndex(),n=this.player.getPlaylist();(n&&e===n.length-1||e===-1)&&(this.track("Video Playback Completed",this.metadata[this.playlistIndex].playback),this.playbackStarted=!1)}},{key:"determineSeek",value:function(){var e=this.isPaused||this.isBuffering?0:Date.now()-this.lastRecordedTime.timeReported,n=1e3*this.player.getCurrentTime()-this.lastRecordedTime.timeElapsed;return Math.abs(e-n)>2e3}}]),t}(c.default);function r(a){var t=a.match(/PT(\d+H)?(\d+M)?(\d+S)?/);return t=t.slice(1).map(function(e){if(e!=null)return e.replace(/\D/,"")}),3600*(parseInt(t[0])||0)+60*(parseInt(t[1])||0)+(parseInt(t[2])||0)}l.default=p}])})})(w);const I=x(w.exports),j=_({__proto__:null,default:I},[w.exports]);export{j as i};
1
+ import{ac as x}from"./index.9c4a9ff4.js";function _(g,S){for(var f=0;f<S.length;f++){const l=S[f];if(typeof l!="string"&&!Array.isArray(l)){for(const s in l)if(s!=="default"&&!(s in g)){const i=Object.getOwnPropertyDescriptor(l,s);i&&Object.defineProperty(g,s,i.get?i:{enumerable:!0,get:()=>l[s]})}}}return Object.freeze(Object.defineProperty(g,Symbol.toStringTag,{value:"Module"}))}var w={exports:{}};(function(g,S){(function(f,l){g.exports=l()})(window,function(){return function(f){var l={};function s(i){if(l[i])return l[i].exports;var u=l[i]={i,l:!1,exports:{}};return f[i].call(u.exports,u,u.exports,s),u.l=!0,u.exports}return s.m=f,s.c=l,s.d=function(i,u,c){s.o(i,u)||Object.defineProperty(i,u,{enumerable:!0,get:c})},s.r=function(i){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},s.t=function(i,u){if(1&u&&(i=s(i)),8&u||4&u&&typeof i=="object"&&i&&i.__esModule)return i;var c=Object.create(null);if(s.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:i}),2&u&&typeof i!="string")for(var d in i)s.d(c,d,function(p){return i[p]}.bind(null,d));return c},s.n=function(i){var u=i&&i.__esModule?function(){return i.default}:function(){return i};return s.d(u,"a",u),u},s.o=function(i,u){return Object.prototype.hasOwnProperty.call(i,u)},s.p="",s(s.s=2)}([function(f,l,s){s.r(l);var i=typeof fetch=="function"?fetch.bind():function(u,c){return c=c||{},new Promise(function(d,p){var r=new XMLHttpRequest;for(var a in r.open(c.method||"get",u,!0),c.headers)r.setRequestHeader(a,c.headers[a]);function t(){var e,n=[],o=[],h={};return r.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(y,m,b){n.push(m=m.toLowerCase()),o.push([m,b]),e=h[m],h[m]=e?e+","+b:b}),{ok:(r.status/100|0)==2,status:r.status,statusText:r.statusText,url:r.responseURL,clone:t,text:function(){return Promise.resolve(r.responseText)},json:function(){return Promise.resolve(r.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([r.response]))},headers:{keys:function(){return n},entries:function(){return o},get:function(y){return h[y.toLowerCase()]},has:function(y){return y.toLowerCase()in h}}}}r.withCredentials=c.credentials=="include",r.onload=function(){d(t())},r.onerror=p,r.send(c.body)})};l.default=i},function(f,l,s){Object.defineProperty(l,"__esModule",{value:!0});var i=function(){function c(d,p){for(var r=0;r<p.length;r++){var a=p[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(d,a.key,a)}}return function(d,p,r){return p&&c(d.prototype,p),r&&c(d,r),d}}(),u=function(){function c(d,p){(function(r,a){if(!(r instanceof a))throw new TypeError("Cannot call a class as a function")})(this,c),this.pluginName=d}return i(c,[{key:"track",value:function(d,p){window.analytics.track(d,p,{integration:{name:this.pluginName}})}}]),c}();l.default=u},function(f,l,s){Object.defineProperty(l,"__esModule",{value:!0}),l.YouTubeAnalytics=l.VimeoAnalytics=void 0;var i=c(s(3)),u=c(s(4));function c(d){return d&&d.__esModule?d:{default:d}}l.VimeoAnalytics=i.default,l.YouTubeAnalytics=u.default},function(f,l,s){Object.defineProperty(l,"__esModule",{value:!0});var i=function(){function p(r,a){for(var t=0;t<a.length;t++){var e=a[t];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(r,e.key,e)}}return function(r,a,t){return a&&p(r.prototype,a),t&&p(r,t),r}}(),u=c(s(0));function c(p){return p&&p.__esModule?p:{default:p}}var d=function(p){function r(a,t){(function(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")})(this,r);var e=function(n,o){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!o||typeof o!="object"&&typeof o!="function"?n:o}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,"VimeoAnalytics"));return e.authToken=t,e.player=a,e.metadata={content:{},playback:{videoPlayer:"Vimeo"}},e.mostRecentHeartbeat=0,e.isPaused=!1,e}return function(a,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);a.prototype=Object.create(t&&t.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(a,t):a.__proto__=t)}(r,p),i(r,[{key:"initialize",value:function(){var a=this,t={loaded:this.retrieveMetadata,play:this.trackPlay,pause:this.trackPause,ended:this.trackEnded,timeupdate:this.trackHeartbeat};for(var e in t)this.registerHandler(e,t[e]);this.player.getVideoId().then(function(n){a.retrieveMetadata({id:n})}).catch(console.error)}},{key:"registerHandler",value:function(a,t){var e=this;this.player.on(a,function(n){e.updateMetadata(n),t.call(e,n)})}},{key:"trackPlay",value:function(){this.isPaused?(this.track("Video Playback Resumed",this.metadata.playback),this.isPaused=!1):(this.track("Video Playback Started",this.metadata.playback),this.track("Video Content Started",this.metadata.content))}},{key:"trackEnded",value:function(){this.track("Video Playback Completed",this.metadata.playback),this.track("Video Content Completed",this.metadata.content)}},{key:"trackHeartbeat",value:function(){var a=this.mostRecentHeartbeat,t=this.metadata.playback.position;t!==a&&t-a>=10&&(this.track("Video Content Playing",this.metadata.content),this.mostRecentHeartbeat=Math.floor(t))}},{key:"trackPause",value:function(){this.isPaused=!0,this.track("Video Playback Paused",this.metadata.playback)}},{key:"retrieveMetadata",value:function(a){var t=this;return new Promise(function(e,n){var o=a.id;(0,u.default)("https://api.vimeo.com/videos/"+o,{headers:{Authorization:"Bearer "+t.authToken}}).then(function(h){return h.ok?h.json():n(h)}).then(function(h){t.metadata.content.title=h.name,t.metadata.content.description=h.description,t.metadata.content.publisher=h.user.name,t.metadata.playback.position=0,t.metadata.playback.totalLength=h.duration}).catch(function(h){return console.error("Request to Vimeo API Failed with: ",h),n(h)})})}},{key:"updateMetadata",value:function(a){var t=this;return new Promise(function(e,n){t.player.getVolume().then(function(o){o&&(t.metadata.playback.sound=100*o),t.metadata.playback.position=a.seconds,e()}).catch(n)})}}]),r}(c(s(1)).default);l.default=d},function(f,l,s){Object.defineProperty(l,"__esModule",{value:!0});var i=function(){function a(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,e,n){return e&&a(t.prototype,e),n&&a(t,n),t}}(),u=d(s(0)),c=d(s(1));function d(a){return a&&a.__esModule?a:{default:a}}var p=function(a){function t(e,n){(function(h,y){if(!(h instanceof y))throw new TypeError("Cannot call a class as a function")})(this,t);var o=function(h,y){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!y||typeof y!="object"&&typeof y!="function"?h:y}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"YoutubeAnalytics"));return o.player=e,o.apiKey=n,o.playerLoaded=!1,o.playbackStarted=!1,o.contentStarted=!1,o.isPaused=!1,o.isBuffering=!1,o.isSeeking=!1,o.lastRecordedTime={timeReported:Date.now(),timeElapsed:0},o.metadata=[{playback:{video_player:"youtube"},content:{}}],o.playlistIndex=0,o}return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(t,a),i(t,[{key:"initialize",value:function(){window.segmentYoutubeOnStateChange=this.onPlayerStateChange.bind(this),window.segmentYoutubeOnReady=this.onPlayerReady.bind(this),this.player.addEventListener("onReady","segmentYoutubeOnReady"),this.player.addEventListener("onStateChange","segmentYoutubeOnStateChange")}},{key:"onPlayerReady",value:function(e){this.retrieveMetadata()}},{key:"onPlayerStateChange",value:function(e){var n=this.player.getCurrentTime();switch(this.metadata[this.playlistIndex]&&(this.metadata[this.playlistIndex].playback.position=this.metadata[this.playlistIndex].content.position=n,this.metadata[this.playlistIndex].playback.quality=this.player.getPlaybackQuality(),this.metadata[this.playlistIndex].playback.sound=this.player.isMuted()?0:this.player.getVolume()),e.data){case-1:if(this.playerLoaded)break;this.retrieveMetadata(),this.playerLoaded=!0;break;case YT.PlayerState.BUFFERING:this.handleBuffer();break;case YT.PlayerState.PLAYING:this.handlePlay();break;case YT.PlayerState.PAUSED:this.handlePause();break;case YT.PlayerState.ENDED:this.handleEnd()}this.lastRecordedTime={timeReported:Date.now(),timeElapsed:1e3*this.player.getCurrentTime()}}},{key:"retrieveMetadata",value:function(){var e=this;return new Promise(function(n,o){var h=e.player.getVideoData(),y=e.player.getPlaylist()||[h.video_id],m=y.join();(0,u.default)("https://www.googleapis.com/youtube/v3/videos?id="+m+"&part=snippet,contentDetails&key="+e.apiKey).then(function(b){if(!b.ok){var v=new Error("Segment request to Youtube API failed (likely due to a bad API Key. Events will still be sent but will not contain video metadata)");throw v.response=b,v}return b.json()}).then(function(b){e.metadata=[];for(var v=0,k=0;k<y.length;k++){var P=b.items[k];e.metadata.push({content:{title:P.snippet.title,description:P.snippet.description,keywords:P.snippet.tags,channel:P.snippet.channelTitle,airdate:P.snippet.publishedAt}}),v+=r(P.contentDetails.duration)}for(k=0;k<y.length;k++)e.metadata[k].playback={total_length:v,video_player:"youtube"};n()}).catch(function(b){e.metadata=y.map(function(v){return{playback:{video_player:"youtube"},content:{}}}),o(b)})})}},{key:"handleBuffer",value:function(){var e=this.determineSeek();this.playbackStarted||(this.playbackStarted=!0,this.track("Video Playback Started",this.metadata[this.playlistIndex].playback)),e&&!this.isSeeking&&(this.isSeeking=!0,this.track("Video Playback Seek Started",this.metadata[this.playlistIndex].playback)),this.isSeeking&&(this.track("Video Playback Seek Completed",this.metadata[this.playlistIndex].playback),this.isSeeking=!1);var n=this.player.getPlaylist();n&&this.player.getCurrentTime()===0&&this.player.getPlaylistIndex()!==this.playlistIndex&&(this.contentStarted=!1,this.playlistIndex===n.length-1&&this.player.getPlaylistIndex()===0&&(this.track("Video Playback Completed",this.metadata[this.player.getPlaylistIndex()].playback),this.track("Video Playback Started",this.metadata[this.player.getPlaylistIndex()].playback))),this.track("Video Playback Buffer Started",this.metadata[this.playlistIndex].playback),this.isBuffering=!0}},{key:"handlePlay",value:function(){this.contentStarted||(this.playlistIndex=this.player.getPlaylistIndex(),this.playlistIndex===-1&&(this.playlistIndex=0),this.track("Video Content Started",this.metadata[this.playlistIndex].content),this.contentStarted=!0),this.isBuffering&&(this.track("Video Playback Buffer Completed",this.metadata[this.playlistIndex].playback),this.isBuffering=!1),this.isPaused&&(this.track("Video Playback Resumed",this.metadata[this.playlistIndex].playback),this.isPaused=!1)}},{key:"handlePause",value:function(){var e=this.determineSeek();this.isBuffering&&(this.track("Video Playback Buffer Completed",this.metadata[this.playlistIndex].playback),this.isBuffering=!1),this.isPaused||(e?(this.track("Video Playback Seek Started",this.metadata[this.playlistIndex].playback),this.isSeeking=!0):(this.track("Video Playback Paused",this.metadata[this.playlistIndex].playback),this.isPaused=!0))}},{key:"handleEnd",value:function(){this.track("Video Content Completed",this.metadata[this.playlistIndex].content),this.contentStarted=!1;var e=this.player.getPlaylistIndex(),n=this.player.getPlaylist();(n&&e===n.length-1||e===-1)&&(this.track("Video Playback Completed",this.metadata[this.playlistIndex].playback),this.playbackStarted=!1)}},{key:"determineSeek",value:function(){var e=this.isPaused||this.isBuffering?0:Date.now()-this.lastRecordedTime.timeReported,n=1e3*this.player.getCurrentTime()-this.lastRecordedTime.timeElapsed;return Math.abs(e-n)>2e3}}]),t}(c.default);function r(a){var t=a.match(/PT(\d+H)?(\d+M)?(\d+S)?/);return t=t.slice(1).map(function(e){if(e!=null)return e.replace(/\D/,"")}),3600*(parseInt(t[0])||0)+60*(parseInt(t[1])||0)+(parseInt(t[2])||0)}l.default=p}])})})(w);const I=x(w.exports),j=_({__proto__:null,default:I},[w.exports]);export{j as i};
package/dist/index.html CHANGED
@@ -21,9 +21,9 @@
21
21
  href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAATRJREFUOE/tUz1LQ0EQnNvbu7PxB2ilWKRSEPID0iQS0ljaWAiirYhgpQTUwsqAVoKKRLCxsRDthKQVsdLCUoiFjR8ovvfuQ97DgJUBQzqXZYctdlhmZwW6DJHOj69v5xPnZm0IEEkSHk8Oz/NLa/fGANBZQuu0pggYGJBBa7dYfMkIxjZ2ppzzx85bILF4a1wgNzMPFgTDBCkZzAQtCawIkiUg3PRBuXzUCwIXorvruaHK5LAmhmYBJgIpSVrSslIkOmzgAqn3vttqNf6pb6F6yYOjH5+sSP4T9FwD64OwvhasdbAegAdij9eb5kNhcWGLNdPvV7AO2WAbQ9oHPDXOUFpdgTKqgxP/QpDb3OsX7nkAbetEERB92yjDGK3T+kilVptgTYIlQyhR3y+VrrJf6Ca+AITiMSC0qp/7AAAAAElFTkSuQmCC"
22
22
  />
23
23
  <link rel="manifest" href="data:application/manifest+json;base64,eyJuYW1lIjoiIiwic2hvcnRfbmFtZSI6IiIsImljb25zIjpbeyJzcmMiOiIvYW5kcm9pZC1jaHJvbWUtMTkyeDE5Mi5wbmciLCJzaXplcyI6IjE5MngxOTIiLCJ0eXBlIjoiaW1hZ2UvcG5nIn0seyJzcmMiOiIvYW5kcm9pZC1jaHJvbWUtNTEyeDUxMi5wbmciLCJzaXplcyI6IjUxMng1MTIiLCJ0eXBlIjoiaW1hZ2UvcG5nIn1dLCJ0aGVtZV9jb2xvciI6IiNmZmZmZmYiLCJiYWNrZ3JvdW5kX2NvbG9yIjoiI2ZmZmZmZiIsImRpc3BsYXkiOiJzdGFuZGFsb25lIn0=" />
24
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
24
+ <meta name="viewport" content="width=device-width, initial-scale=1.0 maximum-scale=1.0" />
25
25
  <title>Local Logic</title>
26
- <script type="module" crossorigin src="/sdks-app/v1/assets/index.689aa908.js"></script>
26
+ <script type="module" crossorigin src="/sdks-app/v1/assets/index.9c4a9ff4.js"></script>
27
27
  <script type="module">try{import.meta.url;import("_").catch(()=>1);}catch(e){}window.__vite_is_modern_browser=true;</script>
28
28
  <script type="module">!function(){if(window.__vite_is_modern_browser)return;console.warn("vite: loading legacy build because dynamic import or import.meta.url is unsupported, syntax error above should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}();</script>
29
29
  </head>
@@ -33,6 +33,6 @@
33
33
 
34
34
  <script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
35
35
  <script nomodule crossorigin id="vite-legacy-polyfill" src="/sdks-app/v1/assets/polyfills-legacy.d3683099.js"></script>
36
- <script nomodule crossorigin id="vite-legacy-entry" data-src="/sdks-app/v1/assets/index-legacy.0d90becf.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
36
+ <script nomodule crossorigin id="vite-legacy-entry" data-src="/sdks-app/v1/assets/index-legacy.ea25d2c0.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
37
37
  </body>
38
38
  </html>
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ interface SearchProps {
3
+ label?: string;
4
+ placeholder: string;
5
+ onSearch: (location: {
6
+ latitude: number;
7
+ longitude: number;
8
+ }) => void;
9
+ renderListBelow?: boolean;
10
+ renderListBelowPosition?: number;
11
+ onSelect?: () => void;
12
+ onBlur?: () => void;
13
+ }
14
+ declare const Search: ({ label, onSearch, onSelect, placeholder, renderListBelow, renderListBelowPosition, }: SearchProps) => JSX.Element;
15
+ export default Search;
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Search/index.tsx"],"names":[],"mappings":";AAWA,UAAU,WAAW;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,CAAC,QAAQ,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACtE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,QAAA,MAAM,MAAM,0FAOT,WAAW,gBAmFb,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -4,10 +4,10 @@ import { Input } from "@local-logic/ui";
4
4
  import useDebounce from "~/hooks/useDebounce";
5
5
  import AnimateHeight from "~/components/AnimateHeight";
6
6
  import useOnEventOutside from "~/hooks/useOnEventOutside";
7
- import { useGeocodes } from "../../../features/useGeocodes";
8
- import { useSuggestions } from "../../../features/useSuggestions";
7
+ import { useGeocodes } from "./useGeocodes";
8
+ import { useSuggestions } from "./useSuggestions";
9
9
  import * as S from "./styles";
10
- const Search = ({ onSearch }) => {
10
+ const Search = ({ label, onSearch, onSelect, placeholder, renderListBelow = true, renderListBelowPosition = 0, }) => {
11
11
  const searchContainerRef = useRef(null);
12
12
  const [query, setQuery] = useState("");
13
13
  const [locationId, setLocationId] = useState("");
@@ -26,17 +26,20 @@ const Search = ({ onSearch }) => {
26
26
  });
27
27
  setShowResults(false);
28
28
  }, [geocodes]);
29
- const handleItemClick = ({ locationId: lid, label }) => {
29
+ const handleItemClick = ({ locationId: lid, label: l }) => {
30
30
  setLocationId(lid);
31
- setQuery(label);
31
+ setQuery(l);
32
32
  };
33
33
  const textWithHighlighting = (text, highlight) => {
34
34
  const parts = text.split(new RegExp(`(${highlight})`, "gi"));
35
35
  return parts.map((part, i) => part.toLowerCase() === highlight.toLowerCase() ? (React.createElement("strong", { key: i }, part)) : (React.createElement("span", { key: i }, part)));
36
36
  };
37
- return (React.createElement(S.Search, { ref: searchContainerRef },
38
- React.createElement(Input, { value: query, placeholder: "Search map...", onChange: (e) => setQuery(e.currentTarget.value), onFocus: () => setShowResults(true) }),
39
- React.createElement(S.SearchList, null,
37
+ return (React.createElement(S.Search, { ref: searchContainerRef, onSelect: onSelect },
38
+ React.createElement(Input, { autofocus: true, value: query, label: label, placeholder: placeholder, onChange: (e) => {
39
+ setQuery(e.currentTarget.value);
40
+ setShowResults(true);
41
+ } }),
42
+ React.createElement(S.SearchList, { renderListBelow: renderListBelow, renderListBelowPosition: renderListBelowPosition },
40
43
  React.createElement(AnimateHeight, { open: showResults && !!(data === null || data === void 0 ? void 0 : data.suggestions.length) },
41
44
  React.createElement(S.SearchListUl, null, data === null || data === void 0 ? void 0 : data.suggestions.map((suggestion, i) => (React.createElement(S.SearchListItem, { key: suggestion.locationId },
42
45
  React.createElement(S.ItemButton, { onClick: () => handleItemClick(suggestion) },
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Search/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,WAAW,MAAM,qBAAqB,CAAC;AAC9C,OAAO,aAAa,MAAM,4BAA4B,CAAC;AAEvD,OAAO,iBAAiB,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAY9B,MAAM,MAAM,GAAG,CAAC,EACd,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,eAAe,GAAG,IAAI,EACtB,uBAAuB,GAAG,CAAC,GACf,EAAE,EAAE;IAChB,MAAM,kBAAkB,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACvC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACjD,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,GAClD,WAAW,CAAC,UAAU,CAAC,CAAC;IAC1B,MAAM,cAAc,GAAG,WAAW,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC/C,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IACrD,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;IAC3D,iBAAiB,CAAC,kBAAkB,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;IAE5E,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,QAAQ,IAAI,eAAe,EAAE;YAChC,OAAO;SACR;QAED,QAAQ,CAAC;YACP,SAAS,EAAE,QAAQ,CAAC,QAAQ,CAAC,eAAe,CAAC,SAAS;YACtD,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,eAAe,CAAC,QAAQ;SACrD,CAAC,CAAC;QAEH,cAAc,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,MAAM,eAAe,GAAG,CAAC,EAAE,UAAU,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,EAAc,EAAE,EAAE;QACpE,aAAa,CAAC,GAAG,CAAC,CAAC;QACnB,QAAQ,CAAC,CAAC,CAAC,CAAC;IACd,CAAC,CAAC;IAEF,MAAM,oBAAoB,GAAG,CAAC,IAAY,EAAE,SAAiB,EAAE,EAAE;QAC/D,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,IAAI,SAAS,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;QAE7D,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAC3B,IAAI,CAAC,WAAW,EAAE,KAAK,SAAS,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAC/C,gCAAQ,GAAG,EAAE,CAAC,IAAG,IAAI,CAAU,CAChC,CAAC,CAAC,CAAC,CACF,8BAAM,GAAG,EAAE,CAAC,IAAG,IAAI,CAAQ,CAC5B,CACF,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO,CACL,oBAAC,CAAC,CAAC,MAAM,IAAC,GAAG,EAAE,kBAAkB,EAAE,QAAQ,EAAE,QAAQ;QACnD,oBAAC,KAAK,IACJ,SAAS,EAAE,IAAI,EACf,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;gBACd,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;gBAChC,cAAc,CAAC,IAAI,CAAC,CAAC;YACvB,CAAC,GACD;QACF,oBAAC,CAAC,CAAC,UAAU,IACX,eAAe,EAAE,eAAe,EAChC,uBAAuB,EAAE,uBAAuB;YAEhD,oBAAC,aAAa,IAAC,IAAI,EAAE,WAAW,IAAI,CAAC,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,CAAC,MAAM,CAAA;gBAC5D,oBAAC,CAAC,CAAC,YAAY,QACZ,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,CAAC,EAAE,EAAE,CAAC,CACxC,oBAAC,CAAC,CAAC,cAAc,IAAC,GAAG,EAAE,UAAU,CAAC,UAAU;oBAC1C,oBAAC,CAAC,CAAC,UAAU,IACX,OAAO,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,UAAU,CAAC;wBAG1C,oBAAC,MAAM,CAAC,GAAG,IACT,OAAO,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EACxC,UAAU,EAAE;gCACV,KAAK,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI;gCACrB,IAAI,EAAE,QAAQ;gCACd,QAAQ,EAAE,GAAG;6BACd,IAEA,oBAAoB,CAAC,UAAU,CAAC,KAAK,EAAE,KAAK,CAAC,CACnC,CACA,CACE,CACpB,CAAC,CACa,CACH,CACH,CACN,CACZ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -1,6 +1,11 @@
1
+ interface SearchProps {
2
+ renderListBelow?: boolean;
3
+ renderListBelowPosition?: number;
4
+ }
1
5
  export declare const Search: import("styled-components").StyledComponent<"div", any, {}, never>;
2
- export declare const SearchList: import("styled-components").StyledComponent<"div", any, {}, never>;
6
+ export declare const SearchList: import("styled-components").StyledComponent<"div", any, SearchProps, never>;
3
7
  export declare const ItemButton: import("styled-components").StyledComponent<"button", any, {}, never>;
4
8
  export declare const SearchListUl: import("styled-components").StyledComponent<"ul", any, {}, never>;
5
9
  export declare const SearchListItem: import("styled-components").StyledComponent<"li", any, {}, never>;
10
+ export {};
6
11
  //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Search/styles.ts"],"names":[],"mappings":"AAGA,UAAU,WAAW;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,eAAO,MAAM,MAAM,oEAElB,CAAC;AAEF,eAAO,MAAM,UAAU,6EAgBtB,CAAC;AAEF,eAAO,MAAM,UAAU,uEAYtB,CAAC;AAEF,eAAO,MAAM,YAAY,mEAIxB,CAAC;AAEF,eAAO,MAAM,cAAc,mEAY1B,CAAC"}
@@ -1,7 +1,6 @@
1
- import styled from "styled-components";
1
+ import styled, { css } from "styled-components";
2
2
  import { theme } from "@local-logic/ui";
3
3
  export const Search = styled.div `
4
- max-width: 300px;
5
4
  position: relative;
6
5
  `;
7
6
  export const SearchList = styled.div `
@@ -11,8 +10,14 @@ export const SearchList = styled.div `
11
10
  box-shadow: 0px 5px 8px -4px rgba(0, 0, 0, 0.5);
12
11
  transform: translateY(-3px);
13
12
  background-color: ${theme["--ll-color-background"]};
14
- border-radius:${theme["--ll-border-radius-small"]};
13
+ border-radius: ${theme["--ll-border-radius-small"]};
15
14
  z-index: 2;
15
+
16
+ ${({ renderListBelow, renderListBelowPosition }) => renderListBelow &&
17
+ css `
18
+ top: inherit;
19
+ bottom: ${renderListBelowPosition}px;
20
+ `}
16
21
  `;
17
22
  export const ItemButton = styled.button `
18
23
  width: 100%;
@@ -36,11 +41,13 @@ export const SearchListItem = styled.li `
36
41
  &:last-child {
37
42
  ${ItemButton} {
38
43
  overflow: hidden;
39
- border-radius: 0 0 ${theme["--ll-border-radius-small"]} ${theme["--ll-border-radius-small"]};
44
+ border-radius: 0 0 ${theme["--ll-border-radius-small"]}
45
+ ${theme["--ll-border-radius-small"]};
40
46
  }
41
47
  }
42
48
 
43
- &:not(:last-child) {
49
+ &:hover {
50
+ background-color: ${theme["--ll-color-surface"]};
44
51
  }
45
52
  `;
46
53
  //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/components/Search/styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAc,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAOpD,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAA;;CAE/B,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAa;;;;;;sBAM3B,KAAK,CAAC,uBAAuB,CAAC;mBACjC,KAAK,CAAC,0BAA0B,CAAC;;;IAGhD,CAAC,EAAE,eAAe,EAAE,uBAAuB,EAAE,EAAE,EAAE,CACjD,eAAe;IACf,GAAG,CAAA;;gBAES,uBAAuB;KAClC;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAA;;;;;aAK1B,KAAK,CAAC,qBAAqB,CAAC,IAAI,KAAK,CAAC,oBAAoB,CAAC;;;;;;;CAOvE,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,EAAE,CAAA;;;;CAIpC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,EAAE,CAAA;;MAEjC,UAAU;;2BAEW,KAAK,CAAC,0BAA0B,CAAC;UAClD,KAAK,CAAC,0BAA0B,CAAC;;;;;wBAKnB,KAAK,CAAC,oBAAoB,CAAC;;CAElD,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGeocodes.d.ts","sourceRoot":"","sources":["../../../../src/components/Search/useGeocodes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAe,MAAM,qBAAqB,CAAC;AAInE,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,4EAe7C"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGeocodes.js","sourceRoot":"","sources":["../../../../src/components/Search/useGeocodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAmB,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEnE,MAAM,aAAa,GAAG,mDAAmD,CAAC;AAE1E,MAAM,UAAU,WAAW,CAAC,UAAkB;IAC5C,MAAM,OAAO,GAAG;QACd,UAAU;QACV,OAAO,EAAE,SAAS;QAClB,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,iBAA2B;KACpD,CAAC;IAEF,MAAM,aAAa,GAAG,GAA6B,EAAE,CACnD,KAAK,CAAC,aAAa,GAAG,IAAI,eAAe,CAAC,OAAO,CAAC,CAAC;SAChD,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;SACnC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAE7D,OAAO,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,aAAa,EAAE;QACxD,OAAO,EAAE,CAAC,CAAC,UAAU;KACtB,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSuggestions.d.ts","sourceRoot":"","sources":["../../../../src/components/Search/useSuggestions.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAK7E,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,gFAe3C"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSuggestions.js","sourceRoot":"","sources":["../../../../src/components/Search/useSuggestions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAuB,MAAM,wBAAwB,CAAC;AAE7E,MAAM,aAAa,GACjB,gEAAgE,CAAC;AAEnE,MAAM,UAAU,cAAc,CAAC,KAAa;IAC1C,MAAM,OAAO,GAAG;QACd,KAAK;QACL,OAAO,EAAE,SAAS;QAClB,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,iBAA2B;KACpD,CAAC;IAEF,MAAM,gBAAgB,GAAG,GAAiC,EAAE,CAC1D,KAAK,CAAC,aAAa,GAAG,IAAI,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CACpE,QAAQ,CAAC,IAAI,EAAE,CAChB,CAAC;IAEJ,OAAO,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,gBAAgB,EAAE;QAC9D,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM;KACxB,CAAC,CAAC;AACL,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/context/languageProvider/data-explorer/locales/en/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAIlB,MAAM,aAAa,CAAC;AAgCrB,eAAO,MAAM,YAAY,EAAE;KAAG,GAAG,IAAI,iBAAiB,GAAG,MAAM;CAI9D,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/context/languageProvider/data-explorer/locales/en/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAIlB,MAAM,aAAa,CAAC;AAiCrB,eAAO,MAAM,YAAY,EAAE;KAAG,GAAG,IAAI,iBAAiB,GAAG,MAAM;CAI9D,CAAC"}
@@ -2,6 +2,7 @@ const translationUI = {
2
2
  RADIUS: "Radius",
3
3
  LIMIT: "Limit",
4
4
  EXPORT: "Export",
5
+ SEARCH_MAP: "Search map...",
5
6
  };
6
7
  const translationTitles = {
7
8
  LOCATION: "Location",
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/context/languageProvider/data-explorer/locales/en/index.ts"],"names":[],"mappings":"AAOA,MAAM,aAAa,GAA2C;IAC5D,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;CACjB,CAAC;AAEF,MAAM,iBAAiB,GAA+C;IACpE,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,oBAAoB;IAC1B,OAAO,EAAE,SAAS;IAClB,YAAY,EAAE,cAAc;IAC5B,QAAQ,EAAE,UAAU;CACrB,CAAC;AAEF,MAAM,uBAAuB,GAEzB;IACF,aAAa,EACX,8EAA8E;IAChF,WAAW,EAAE,2DAA2D;IACxE,SAAS,EACP,8EAA8E;IAChF,YAAY,EAAE,4DAA4D;IAC1E,iBAAiB,EACf,iEAAiE;IACnE,aAAa,EACX,2FAA2F;CAC9F,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,iDACpB,aAAa,GACb,iBAAiB,GACjB,uBAAuB,CAC3B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/context/languageProvider/data-explorer/locales/en/index.ts"],"names":[],"mappings":"AAOA,MAAM,aAAa,GAA2C;IAC5D,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE,eAAe;CAC5B,CAAC;AAEF,MAAM,iBAAiB,GAA+C;IACpE,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,oBAAoB;IAC1B,OAAO,EAAE,SAAS;IAClB,YAAY,EAAE,cAAc;IAC5B,QAAQ,EAAE,UAAU;CACrB,CAAC;AAEF,MAAM,uBAAuB,GAEzB;IACF,aAAa,EACX,8EAA8E;IAChF,WAAW,EAAE,2DAA2D;IACxE,SAAS,EACP,8EAA8E;IAChF,YAAY,EAAE,4DAA4D;IAC1E,iBAAiB,EACf,iEAAiE;IACnE,aAAa,EACX,2FAA2F;CAC9F,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,iDACpB,aAAa,GACb,iBAAiB,GACjB,uBAAuB,CAC3B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/context/languageProvider/data-explorer/locales/fr/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAGlB,MAAM,aAAa,CAAC;AAgCrB,eAAO,MAAM,YAAY,EAAE;KAAG,GAAG,IAAI,iBAAiB,GAAG,MAAM;CAI9D,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/context/languageProvider/data-explorer/locales/fr/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAGlB,MAAM,aAAa,CAAC;AAiCrB,eAAO,MAAM,YAAY,EAAE;KAAG,GAAG,IAAI,iBAAiB,GAAG,MAAM;CAI9D,CAAC"}
@@ -2,6 +2,7 @@ const translationUI = {
2
2
  RADIUS: "Rayon",
3
3
  LIMIT: "Limite",
4
4
  EXPORT: "Exporter",
5
+ SEARCH_MAP: "Recherchez...",
5
6
  };
6
7
  const translationTitles = {
7
8
  LOCATION: "Emplacement",
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/context/languageProvider/data-explorer/locales/fr/index.ts"],"names":[],"mappings":"AAOA,MAAM,aAAa,GAA2C;IAC5D,MAAM,EAAE,OAAO;IACf,KAAK,EAAE,QAAQ;IACf,MAAM,EAAE,UAAU;CACnB,CAAC;AAEF,MAAM,iBAAiB,GAA+C;IACpE,QAAQ,EAAE,aAAa;IACvB,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,kBAAkB;IACxB,OAAO,EAAE,QAAQ;IACjB,YAAY,EAAE,aAAa;IAC3B,QAAQ,EAAE,SAAS;CACpB,CAAC;AAEF,MAAM,uBAAuB,GAEzB;IACF,aAAa,EACX,oGAAoG;IACtG,WAAW,EAAE,8DAA8D;IAC3E,SAAS,EACP,wEAAwE;IAC1E,YAAY,EAAE,8DAA8D;IAC5E,iBAAiB,EACf,sEAAsE;IACxE,aAAa,EACX,iGAAiG;CACpG,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,iDACpB,aAAa,GACb,iBAAiB,GACjB,uBAAuB,CAC3B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/context/languageProvider/data-explorer/locales/fr/index.ts"],"names":[],"mappings":"AAOA,MAAM,aAAa,GAA2C;IAC5D,MAAM,EAAE,OAAO;IACf,KAAK,EAAE,QAAQ;IACf,MAAM,EAAE,UAAU;IAClB,UAAU,EAAE,eAAe;CAC5B,CAAC;AAEF,MAAM,iBAAiB,GAA+C;IACpE,QAAQ,EAAE,aAAa;IACvB,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,kBAAkB;IACxB,OAAO,EAAE,QAAQ;IACjB,YAAY,EAAE,aAAa;IAC3B,QAAQ,EAAE,SAAS;CACpB,CAAC;AAEF,MAAM,uBAAuB,GAEzB;IACF,aAAa,EACX,oGAAoG;IACtG,WAAW,EAAE,8DAA8D;IAC3E,SAAS,EACP,wEAAwE;IAC1E,YAAY,EAAE,8DAA8D;IAC5E,iBAAiB,EACf,sEAAsE;IACxE,aAAa,EACX,iGAAiG;CACpG,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,iDACpB,aAAa,GACb,iBAAiB,GACjB,uBAAuB,CAC3B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  export declare type TranslationKeysTitles = "LOCATION" | "SCORES" | "POIS" | "SCHOOLS" | "DEMOGRAPHICS" | "PROFILES";
2
2
  export declare type TranslationKeysDescriptions = "LOCATION_TEXT" | "SCORES_TEXT" | "POIS_TEXT" | "SCHOOLS_TEXT" | "DEMOGRAPHICS_TEXT" | "PROFILES_TEXT";
3
- export declare type TranslationKeysUI = "RADIUS" | "LIMIT" | "EXPORT";
3
+ export declare type TranslationKeysUI = "RADIUS" | "LIMIT" | "EXPORT" | "SEARCH_MAP";
4
4
  export declare type DETranslationKeys = TranslationKeysTitles | TranslationKeysDescriptions | TranslationKeysUI;
5
5
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/context/languageProvider/data-explorer/types.ts"],"names":[],"mappings":"AAAA,oBAAY,qBAAqB,GAC7B,UAAU,GACV,QAAQ,GACR,MAAM,GACN,SAAS,GACT,cAAc,GACd,UAAU,CAAC;AAEf,oBAAY,2BAA2B,GACnC,eAAe,GACf,aAAa,GACb,WAAW,GACX,cAAc,GACd,mBAAmB,GACnB,eAAe,CAAC;AAEpB,oBAAY,iBAAiB,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE9D,oBAAY,iBAAiB,GACzB,qBAAqB,GACrB,2BAA2B,GAC3B,iBAAiB,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/context/languageProvider/data-explorer/types.ts"],"names":[],"mappings":"AAAA,oBAAY,qBAAqB,GAC7B,UAAU,GACV,QAAQ,GACR,MAAM,GACN,SAAS,GACT,cAAc,GACd,UAAU,CAAC;AAEf,oBAAY,2BAA2B,GACnC,eAAe,GACf,aAAa,GACb,WAAW,GACX,cAAc,GACd,mBAAmB,GACnB,eAAe,CAAC;AAEpB,oBAAY,iBAAiB,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,YAAY,CAAC;AAE7E,oBAAY,iBAAiB,GACzB,qBAAqB,GACrB,2BAA2B,GAC3B,iBAAiB,CAAC"}
@@ -8,8 +8,8 @@ interface DefaultContext<T extends DETranslationKeys | LCTranslationKeys> {
8
8
  [key in T]: string;
9
9
  };
10
10
  }
11
- declare const useLangauges: <T extends DETranslationKeys | "EMPTY_TEXT">() => DefaultContext<T>;
12
- declare const LanguagesProvider: <T extends DETranslationKeys | "EMPTY_TEXT">({ children, }: LanguagesProviderProps) => JSX.Element | null;
11
+ declare const useLangauges: <T extends "LOCATION" | "SCORES" | "POIS" | "SCHOOLS" | "DEMOGRAPHICS" | "PROFILES" | "LOCATION_TEXT" | "SCORES_TEXT" | "POIS_TEXT" | "SCHOOLS_TEXT" | "DEMOGRAPHICS_TEXT" | "PROFILES_TEXT" | "RADIUS" | "LIMIT" | "EXPORT" | "SEARCH_MAP" | "CALCULATE_COMMUTE" | "MINUTE" | "HOUR" | "NO_ROUTE" | "FAST_ROUTE" | "TRY_SUGGESTION" | "WALKING" | "DRIVING" | "EMPTY_TEXT">() => DefaultContext<T>;
12
+ declare const LanguagesProvider: <T extends "LOCATION" | "SCORES" | "POIS" | "SCHOOLS" | "DEMOGRAPHICS" | "PROFILES" | "LOCATION_TEXT" | "SCORES_TEXT" | "POIS_TEXT" | "SCHOOLS_TEXT" | "DEMOGRAPHICS_TEXT" | "PROFILES_TEXT" | "RADIUS" | "LIMIT" | "EXPORT" | "SEARCH_MAP" | "CALCULATE_COMMUTE" | "MINUTE" | "HOUR" | "NO_ROUTE" | "FAST_ROUTE" | "TRY_SUGGESTION" | "WALKING" | "DRIVING" | "EMPTY_TEXT">({ children, }: LanguagesProviderProps) => JSX.Element | null;
13
13
  export { LanguagesProvider, useLangauges };
14
14
  export * from "./sdkLocales";
15
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/context/languageProvider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAK/D,OAAO,EAAc,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEhF,UAAU,sBAAsB;IAC9B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,UAAU,cAAc,CAAC,CAAC,SAAS,iBAAiB,GAAG,iBAAiB;IACtE,YAAY,EAAE;SAAG,GAAG,IAAI,CAAC,GAAG,MAAM;KAAE,CAAC;CACtC;AAOD,QAAA,MAAM,YAAY,qEAQjB,CAAC;AAEF,QAAA,MAAM,iBAAiB,8DAEpB,sBAAsB,uBAyCxB,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,CAAC;AAC3C,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/context/languageProvider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAK/D,OAAO,EAAc,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEhF,UAAU,sBAAsB;IAC9B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,UAAU,cAAc,CAAC,CAAC,SAAS,iBAAiB,GAAG,iBAAiB;IACtE,YAAY,EAAE;SAAG,GAAG,IAAI,CAAC,GAAG,MAAM;KAAE,CAAC;CACtC;AAOD,QAAA,MAAM,YAAY,qYAQjB,CAAC;AAEF,QAAA,MAAM,iBAAiB,8XAEpB,sBAAsB,uBAyCxB,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,CAAC;AAC3C,cAAc,cAAc,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/context/languageProvider/local-content/locales/en/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,eAAO,MAAM,YAAY,EAAE;KAAG,GAAG,IAAI,iBAAiB,GAAG,MAAM;CAE9D,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/context/languageProvider/local-content/locales/en/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,eAAO,MAAM,YAAY,EAAE;KAAG,GAAG,IAAI,iBAAiB,GAAG,MAAM;CAW9D,CAAC"}
@@ -1,4 +1,13 @@
1
1
  export const translations = {
2
2
  EMPTY_TEXT: "No data available for this location.",
3
+ CALCULATE_COMMUTE: "Calculate commute",
4
+ MINUTE: "Minute",
5
+ HOUR: "Hour",
6
+ SEARCH_MAP: "Search map...",
7
+ NO_ROUTE: "No route available",
8
+ TRY_SUGGESTION: "Try another query.",
9
+ FAST_ROUTE: "Fastest Route",
10
+ WALKING: "Walking",
11
+ DRIVING: "Driving",
3
12
  };
4
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/context/languageProvider/local-content/locales/en/index.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAA2C;IAClE,UAAU,EAAE,sCAAsC;CACnD,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/context/languageProvider/local-content/locales/en/index.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAA2C;IAClE,UAAU,EAAE,sCAAsC;IAClD,iBAAiB,EAAE,mBAAmB;IACtC,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,MAAM;IACZ,UAAU,EAAE,eAAe;IAC3B,QAAQ,EAAE,oBAAoB;IAC9B,cAAc,EAAE,oBAAoB;IACpC,UAAU,EAAE,eAAe;IAC3B,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;CACnB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/context/languageProvider/local-content/locales/fr/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,eAAO,MAAM,YAAY,EAAE;KAAG,GAAG,IAAI,iBAAiB,GAAG,MAAM;CAE9D,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/context/languageProvider/local-content/locales/fr/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,eAAO,MAAM,YAAY,EAAE;KAAG,GAAG,IAAI,iBAAiB,GAAG,MAAM;CAW9D,CAAC"}
@@ -1,4 +1,13 @@
1
1
  export const translations = {
2
2
  EMPTY_TEXT: "Aucune donnée disponible pour cet emplacement.",
3
+ CALCULATE_COMMUTE: "Calculer le trajet",
4
+ MINUTE: "Minute",
5
+ HOUR: "Heure",
6
+ SEARCH_MAP: "Recherchez...",
7
+ NO_ROUTE: "Aucun itinéraire disponible",
8
+ TRY_SUGGESTION: "Essayez une autre requête",
9
+ FAST_ROUTE: "Itinéraire le plus rapide",
10
+ WALKING: "En marchant",
11
+ DRIVING: "Conduite",
3
12
  };
4
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/context/languageProvider/local-content/locales/fr/index.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAA2C;IAClE,UAAU,EAAE,gDAAgD;CAC7D,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/context/languageProvider/local-content/locales/fr/index.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAA2C;IAClE,UAAU,EAAE,gDAAgD;IAC5D,iBAAiB,EAAE,oBAAoB;IACvC,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,OAAO;IACb,UAAU,EAAE,eAAe;IAC3B,QAAQ,EAAE,6BAA6B;IACvC,cAAc,EAAE,2BAA2B;IAC3C,UAAU,EAAE,2BAA2B;IACvC,OAAO,EAAE,aAAa;IACtB,OAAO,EAAE,UAAU;CACpB,CAAC"}
@@ -1,2 +1,3 @@
1
- export declare type LCTranslationKeys = "EMPTY_TEXT";
1
+ export declare type TranslationKeysCommute = "CALCULATE_COMMUTE" | "MINUTE" | "HOUR" | "SEARCH_MAP" | "NO_ROUTE" | "FAST_ROUTE" | "TRY_SUGGESTION" | "WALKING" | "DRIVING";
2
+ export declare type LCTranslationKeys = "EMPTY_TEXT" | TranslationKeysCommute;
2
3
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/context/languageProvider/local-content/types.ts"],"names":[],"mappings":"AAAA,oBAAY,iBAAiB,GAAG,YAAY,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/context/languageProvider/local-content/types.ts"],"names":[],"mappings":"AAAA,oBAAY,sBAAsB,GAC9B,mBAAmB,GACnB,QAAQ,GACR,MAAM,GACN,YAAY,GACZ,UAAU,GACV,YAAY,GACZ,gBAAgB,GAChB,SAAS,GACT,SAAS,CAAC;AAEd,oBAAY,iBAAiB,GAAG,YAAY,GAAG,sBAAsB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./types";
2
+ export * from "./keyFactory";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/calculateRoute/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./types";
2
+ export * from "./keyFactory";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/features/calculateRoute/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
@@ -0,0 +1,15 @@
1
+ export declare const commuteCalcKeys: {
2
+ all: () => readonly ["commute-calc"];
3
+ list: (filters: Partial<{
4
+ transportMode: string;
5
+ origin: string;
6
+ destination: string;
7
+ apiKey: string;
8
+ }>) => readonly ["commute-calc", Partial<{
9
+ transportMode: string;
10
+ origin: string;
11
+ destination: string;
12
+ apiKey: string;
13
+ }>];
14
+ };
15
+ //# sourceMappingURL=keyFactory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyFactory.d.ts","sourceRoot":"","sources":["../../../../src/features/calculateRoute/keyFactory.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;oBAGf,QAAQ;QACf,aAAa,EAAE,MAAM,CAAC;QACtB,QAAQ,MAAM,CAAC;QACf,WAAW,EAAE,MAAM,CAAC;QACpB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;uBAJe,MAAM;gBACb,MAAM;qBACD,MAAM;gBACX,MAAM;;CAGnB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export const commuteCalcKeys = {
2
+ all: () => ["commute-calc"],
3
+ list: (filters) => [...commuteCalcKeys.all(), filters],
4
+ };
5
+ //# sourceMappingURL=keyFactory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyFactory.js","sourceRoot":"","sources":["../../../../src/features/calculateRoute/keyFactory.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,cAAc,CAAU;IACpC,IAAI,EAAE,CACJ,OAKE,EACF,EAAE,CAAC,CAAC,GAAG,eAAe,CAAC,GAAG,EAAE,EAAE,OAAO,CAAU;CAClD,CAAC"}
@@ -0,0 +1,14 @@
1
+ export interface Route {
2
+ id: string;
3
+ sections: [id: string, type: string];
4
+ }
5
+ export interface RoutesResponse {
6
+ routes: Route[];
7
+ summary: {
8
+ baseDuration: number;
9
+ typicalDuration: number;
10
+ length: number;
11
+ };
12
+ polyline: string;
13
+ }
14
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/features/calculateRoute/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,OAAO,EAAE;QACP,YAAY,EAAE,MAAM,CAAC;QACrB,eAAe,EAAE,MAAM,CAAC;QACxB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,QAAQ,EAAE,MAAM,CAAC;CAClB"}