text: (this["webpackJsonpunfpa-front"]=this["webpackJsonpunfpa-front"]||[]).push([[82],{1136:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return u})),r.d(t,"c",(function(){return o}));var n=r(14),a=r(50),i=r(79),o=function(){if(!("document"in a.a))return function(){return null};var e=document.createElement("canvas"),t=e.getContext("2d");return e.height=512,e.width=1,function(r){t.clearRect(0,0,1,e.height);var a,i=t.createLinearGradient(0,0,0,e.height),o=Object(n.a)(r.colorStops);try{for(o.s();!(a=o.n()).done;){var c=a.value,u=c.ratio,s=c.color;i.addColorStop(Math.max(u,.001),"rgba(".concat(s[0],", ").concat(s[1],", ").concat(s[2],", ").concat(s[3],")"))}}catch(l){o.e(l)}finally{o.f()}return t.fillStyle=i,t.fillRect(0,0,1,e.height),t.getImageData(0,0,1,e.height).data}}();function c(e,t,r,a){var i,o,c=t.blurRadius,u=t.fieldOffset,l=t.field,f=new Float64Array(r*a),d=s(c),h=Math.round(3*c),p=Number.NEGATIVE_INFINITY,b=function(e,t){return null!=e?"string"==typeof t?function(t){return-1*+t.readAttribute(e)}:function(r){return+r.readAttribute(e)+t}:function(e){return 1}}(l,u),y=new Set,v=Object(n.a)(e);try{for(v.s();!(o=v.n()).done;)for(var O=o.value.getCursor();O.next();){var j=O.getObjectId();if(!y.has(j)){y.add(j);var w=O.readLegacyPointGeometry(),m=128;if(!(w.x<-128||w.x>=r+m||w.y<-128||w.y>a+m))for(var g=+b(O),k=Math.round(w.x)-h,M=Math.round(w.y)-h,T=Math.max(0,k),x=Math.max(0,M),S=Math.min(a,Math.round(w.y)+h),U=Math.min(r,Math.round(w.x)+h),I=x;I<S;I++)for(var F=d[I-M],A=T;A<U;A++){var _=d[A-k];(i=f[I*r+A]+=F*_*g)>p&&(p=i)}}}}catch(K){v.e(K)}finally{v.f()}return{matrix:f.buffer,max:p}}function u(e,t,r,n,a,o){e.canvas.width=e.canvas.height=t,e.clearRect(0,0,t,t);var c=e.getImageData(0,0,t,t);r&&n&&c.data.set(new Uint8ClampedArray(function(e,t,r,n,a){for(var o=new Uint32Array(e*e),c=("buffer"in t?t:new Float64Array(t)),u=("buffer"in r?new Uint32Array(r.buffer):new Uint32Array(new Uint8Array(r).buffer)),s=u.length/(a-n),l=0;l<c.length;l++){var f=c[l],d=Math.floor((f-n)*s);o[l]=u[Object(i.d)(d,0,u.length-1)]}return o.buffer}(t,r,n,a,o))),e.putImageData(c,0,0)}function s(e){for(var t=Math.round(3*e),r=2*e*e,n=new Float64Array(2*t+1),a=0;a<=n.length;a++)n[a]=Math.exp(-Math.pow(a-t,2)/r)/Math.sqrt(2*Math.PI)*(e/2);return n}},1198:function(e,t,r){"use strict";r.d(t,"a",(function(){return d}));var n=r(2),a=r(3),i=r(4),o=r(5),c=r(0),u=r(143),s=r(1),l=(r(13),r(17),r(12),r(7)),f=function(e){Object(i.a)(r,e);var t=Object(o.a)(r);function r(){return Object(n.a)(this,r),t.apply(this,arguments)}return Object(a.a)(r,[{key:"initialize",value:function(){}},{key:"destroy",value:function(){}},{key:"supportsTileUpdates",get:function(){return!1}},{key:"spatialReference",get:function(){var e=this.get("tileStore.tileScheme.spatialReference");return e&&e.toJSON()||null}}]),r}(u.a);Object(c.a)([Object(s.b)({readOnly:!0})],f.prototype,"supportsTileUpdates",null),Object(c.a)([Object(s.b)({constructOnly:!0})],f.prototype,"remoteClient",void 0),Object(c.a)([Object(s.b)({constructOnly:!0})],f.prototype,"service",void 0),Object(c.a)([Object(s.b)()],f.prototype,"spatialReference",null),Object(c.a)([Object(s.b)({constructOnly:!0})],f.prototype,"tileInfo",void 0),Object(c.a)([Object(s.b)({constructOnly:!0})],f.prototype,"tileStore",void 0);var d=f=Object(c.a)([Object(l.a)("esri.views.2d.layers.features.processors.BaseProcessor")],f)},1359:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return M}));var n=r(11),a=r(24),i=r(14),o=r(6),c=r.n(o),u=r(15),s=r(3),l=r(4),f=r(5),d=r(2),h=r(0),p=(r(13),r(8)),b=(r(1),r(17),r(12),r(7)),y=r(533),v=r(1136),O=r(919),j=r(1198),w=r(989),m=function e(t,r){Object(d.a)(this,e),this.offset=t,this.extent=r};function g(e){var t=e.key,r=new Map,n=256,a=O.D,i=e.tileInfoView.tileInfo.isWrappable;return r.set(Object(w.a)(t,-1,-1,i).id,new m([-a,-a],[a-n,a-n,a,a])),r.set(Object(w.a)(t,0,-1,i).id,new m([0,-a],[0,a-n,a,a])),r.set(Object(w.a)(t,1,-1,i).id,new m([a,-a],[0,a-n,n,a])),r.set(Object(w.a)(t,-1,0,i).id,new m([-a,0],[a-n,0,a,a])),r.set(Object(w.a)(t,1,0,i).id,new m([a,0],[0,0,n,a])),r.set(Object(w.a)(t,-1,1,i).id,new m([-a,a],[a-n,0,a,n])),r.set(Object(w.a)(t,0,1,i).id,new m([0,a],[0,0,a,n])),r.set(Object(w.a)(t,1,1,i).id,new m([a,a],[0,0,n,n])),r}var k=function(e){Object(l.a)(r,e);var t=Object(f.a)(r);function r(){var e;return Object(d.a)(this,r),(e=t.apply(this,arguments)).type="heatmap",e._tileKeyToFeatureSets=new Map,e}return Object(s.a)(r,[{key:"initialize",value:function(){this.handles.add([this.tileStore.on("update",this.onTileUpdate.bind(this))])}},{key:"update",value:function(){var e=Object(u.a)(c.a.mark((function e(t,r){var n;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("heatmap"===(n=r.schema.processors[0]).type){e.next=3;break}return e.abrupt("return");case 3:Object(y.a)(this._schema,n)&&(t.mesh=!0,this._schema=n);case 4:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"onTileUpdate",value:function(e){var t,r=Object(i.a)(e.removed);try{for(r.s();!(t=r.n()).done;){var n=t.value;this._tileKeyToFeatureSets.delete(n.key.id)}}catch(a){r.e(a)}finally{r.f()}}},{key:"onTileClear",value:function(e){return this._tileKeyToFeatureSets.delete(e.key.id),this.remoteClient.invoke("tileRenderer.onTileData",{tileKey:e.id,data:{clear:!0}})}},{key:"onTileMessage",value:function(){var e=Object(u.a)(c.a.mark((function e(t,r,i){var o,u,s,l,f,d;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._tileKeyToFeatureSets.has(t.key.id)||this._tileKeyToFeatureSets.set(t.key.id,new Map),o=this._tileKeyToFeatureSets.get(t.key.id),Object(p.j)(r.addOrUpdate)&&r.addOrUpdate.hasFeatures&&o.set(r.addOrUpdate.instance,r),!r.end){e.next=7;break}return u=[],s=g(t),this._tileKeyToFeatureSets.forEach((function(e,r){if(r===t.key.id)e.forEach((function(e){return Object(p.a)(e.addOrUpdate,(function(e){return u.push(e)}))}));else if(s.has(r)){var n=s.get(r),i=Object(a.a)(n.offset,2),o=i[0],c=i[1];e.forEach((function(e){return Object(p.a)(e.addOrUpdate,(function(e){var t=e.transform(o,c,1,1);u.push(t)}))}))}})),l=Object(v.a)(u,this._schema.mesh,512,512),f={tileKey:t.key.id,intensityInfo:l},d=[l.matrix],e.abrupt("return",this.remoteClient.invoke("tileRenderer.onTileData",f,Object(n.a)(Object(n.a)({},i),{},{transferList:d})));case 7:case"end":return e.stop()}}),e,this)})));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"onTileError",value:function(e,t,r){return this.remoteClient.invoke("tileRenderer.onTileError",{tileKey:e.id,error:t},r)}}]),r}(j.a),M=k=Object(h.a)([Object(b.a)("esri.views.2d.layers.features.processors.HeatmapProcessor")],k)},989:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));r(432);function n(e,t,r,n){var a=e.clone(),i=1<<a.level,o=a.col+t,c=a.row+r;return n&&o<0?(a.col=o+i,a.world-=1):o>=i?(a.col=o-i,a.world+=1):a.col=o,a.row=c,a}}}]);
  //# sourceMappingURL=82.ee2015cb.chunk.js.map