{"version":3,"sources":["webpack:///./node_modules/arcgis-js-api/symbols/cim/Rasterizer.js","webpack:///./node_modules/arcgis-js-api/symbols/cim/TextRasterizer.js","webpack:///./node_modules/arcgis-js-api/symbols/cim/SDFHelper.js","webpack:///./node_modules/arcgis-js-api/symbols/cim/CIMSymbolRasterizer.js","webpack:///./node_modules/arcgis-js-api/symbols/cim/cimAnalyzer.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAO,CAAC,kCAAS,CAAC,OAAS,CAAC,2BAAmB,CAAC,2BAAQ,CAAC,2BAAa,CAAC,2BAAS,CAAC,mCAAE,sBAAsB,aAAa,sCAAsC,SAAS,EAAE,iBAAiB,cAAc,sCAAsC,+BAA+B,mDAAmD,uIAAuI,qFAAqF,OAAO,8FAA8F,+CAA+C,+DAA+D,OAAO,8FAA8F,UAAU,iiBAAiiB,yCAAyC,UAAU,uFAAuF,MAAM,uGAAuG,UAAU,uFAAuF,MAAM,kDAAkD,0KAA0K,iDAAiD,2KAA2K,sEAAsE,qBAAqB,WAAW,KAAK,WAAW,4EAA4E,sFAAsF,uCAAuC,YAAY,WAAW,wFAAwF,QAAQ,WAAW,8DAA8D,6BAA6B,mBAAmB,uBAAuB,iKAAiK,OAAO,wFAAwF,GAAG,GAAG,YAAY;AAAA,oGAAE,C;;;;;;;ACxB7+F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAO,CAAC,kCAAS,CAAC,OAAS,CAAC,2BAAwB,CAAC,mCAAE,gBAAgB,aAAa,sCAAsC,SAAS,0BAA0B,iBAAiB,cAAc,+CAA+C,gGAAgG,yDAAyD,uHAAuH,2EAA2E,2SAA2S,yCAAyC,eA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,gBAAgB,wJAAwJ,UAAU,cAAc,+BAA+B,+BAA+B,oBAAoB,SAAS,cAAc,gCAAgC,wBAAwB,OAAO,6BAA6B,0BAA0B,WAAW,MAAM,WAAW,0FAA0F,0DAA0D,qBAAqB,QAAQ,mBAAmB,uDAAuD,SAAS,oBAAoB,sBAAsB,0BAA0B,6DAA6D,8CAA8C,sBAAsB,QAAQ,mBAAmB,GAAG,SAAS,WAAW,KAAK,QAAQ,uBAAuB,gBAAgB,WAAW,KAAK,WAAW,4BAA4B,yEAAyE,qCAAqC,kDAAkD,sBAAsB,uCAAuC,gBAAgB,iCAAiC,OAAO,2CAA2C,oDAAoD,uBAAuB,4BAA4B,SAAS,iGAAiG,yCAAyC,GAAG,UAAU,gEAAgE,SAAS,WAAW,gBAAgB,mBAAmB,0BAA0B,mBAAmB,0EAA0E,sBAAsB,uFAAuF,aAAa,uBAAuB,aAAa,mCAAmC,2DAA2D,eAAe,KAAK,IAAI,EAAE,WAAW,qBAAqB,SAAS,+DAA+D,gCAAgC,MAAM,kCAAkC,MAAM,gCAAgC,MAAM,mCAAmC,MAAM,gEAAgE,MAAM,kEAAkE,MAAM,mEAAmE,MAAM,+CAA+C,MAAM,6CAA6C,oDAAoD,MAAM,4CAA4C,sDAAsD,MAAM,sDAAsD,cAAc,aAAa,GAAG,GAAG,oCAAoC,6BAA6B,oCAAoC,+CAA+C;AAAA,oGAAE,C","file":"js/chunk-02561987.8a383241.js","sourcesContent":["// COPYRIGHT © 2020 Esri\n//\n// All rights reserved under the copyright laws of the United States\n// and applicable international laws, treaties, and conventions.\n//\n// This material is licensed for use under the Esri Master License\n// Agreement (MLA), and is bound by the terms of that agreement.\n// You may redistribute and use this code without modification,\n// provided you adhere to the terms of the MLA and include this\n// copyright notice.\n//\n// See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english\n//\n// For additional information, contact:\n// Environmental Systems Research Institute, Inc.\n// Attn: Contracts and Legal Services Department\n// 380 New York Street\n// Redlands, California, USA 92373\n// USA\n//\n// email: contracts@esri.com\n//\n// See http://js.arcgis.com/4.17/esri/copyright.txt for details.\n\ndefine([\"require\",\"exports\",\"./CIMSymbolHelper\",\"./Rect\",\"./SDFHelper\",\"./utils\"],(function(e,r,t,a,i,n){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(){function e(){}return e.prototype.dispose=function(){this._rasterizationCanvas=null},e.prototype.rasterizeJSONResource=function(e,r,n){if(this._rasterizationCanvas||(this._rasterizationCanvas=document.createElement(\"canvas\")),\"simple-fill\"===e.type||\"esriSFS\"===e.type){var o=t.SymbolHelper.rasterizeSimpleFill(this._rasterizationCanvas,e.style,r),s=o[0];return{size:[o[1],o[2]],image:new Uint32Array(s.buffer),sdf:!1,simplePattern:!0,anchorX:0,anchorY:0}}if(\"simple-line\"===e.type||\"esriSLS\"===e.type){var l=t.SymbolHelper.rasterizeSimpleLine(e.style,e.cap),m=l[0];return{size:[l[1],l[2]],image:new Uint32Array(m.buffer),sdf:!0,simplePattern:!0,anchorX:0,anchorY:0}}var f,h,p;if(\"simple-marker\"===e.type||\"esriSMS\"===e.type||\"line-marker\"===e.type?(f=t.CIMSymbolHelper.fromSimpleMarker(e),p=i.getSDFInfo(f)):\"CIMHatchFill\"===e.type?(f=t.CIMSymbolHelper.fromCIMHatchFill(e),h=new a.default(f.frame.xmin,-f.frame.ymax,f.frame.xmax-f.frame.xmin,f.frame.ymax-f.frame.ymin)):e.markerPlacement&&\"CIMMarkerPlacementInsidePolygon\"===e.markerPlacement.type?(f=t.CIMSymbolHelper.fromCIMInsidePolygon(e),h=new a.default(f.frame.xmin,-f.frame.ymax,f.frame.xmax-f.frame.xmin,f.frame.ymax-f.frame.ymin)):(f=e,p=i.getSDFInfo(f)),p&&!n){var u=i.buildSDF(p),y=u[0],c=u[1],d=u[2];return y?{size:[c,d],image:new Uint32Array(y.buffer),sdf:!0,simplePattern:!0,anchorX:0,anchorY:0}:null}var g=t.CIMSymbolHelper.rasterize(this._rasterizationCanvas,f,h,!n),v=g[0],C=g[1],w=g[2],S=g[3],z=g[4];return v?{size:[C,w],image:new Uint32Array(v.buffer),sdf:!1,simplePattern:!1,anchorX:S,anchorY:z}:null},e.prototype.rasterizeImageResource=function(e,r){this._rasterizationCanvas||(this._rasterizationCanvas=document.createElement(\"canvas\")),this._rasterizationCanvas.width=e.width,this._rasterizationCanvas.height=e.height;var t=this._rasterizationCanvas.getContext(\"2d\");e instanceof ImageData?t.putImageData(e,0,0):(e.setAttribute(\"width\",e.width.toString()),e.setAttribute(\"height\",e.height.toString()),t.drawImage(e,0,0,e.width,e.height));var a,i=t.getImageData(0,0,e.width,e.height),o=new Uint8Array(i.data);if(r)for(var s=0,l=r;s=512||z>=512){var b=e.width/e.height;b>1?(S=512,z=Math.round(512/b)):(z=512,S=Math.round(512*b)),I=new Uint8Array(4*S*z),n.resampleHermite(o,e.width,e.height,new Uint8ClampedArray(I.buffer),S,z,!1)}return{size:[S,z],image:new Uint32Array(I.buffer),sdf:!1,simplePattern:!1,anchorX:0,anchorY:0}},e}();r.default=o}));","// COPYRIGHT © 2020 Esri\n//\n// All rights reserved under the copyright laws of the United States\n// and applicable international laws, treaties, and conventions.\n//\n// This material is licensed for use under the Esri Master License\n// Agreement (MLA), and is bound by the terms of that agreement.\n// You may redistribute and use this code without modification,\n// provided you adhere to the terms of the MLA and include this\n// copyright notice.\n//\n// See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english\n//\n// For additional information, contact:\n// Environmental Systems Research Institute, Inc.\n// Attn: Contracts and Legal Services Department\n// 380 New York Street\n// Redlands, California, USA 92373\n// USA\n//\n// email: contracts@esri.com\n//\n// See http://js.arcgis.com/4.17/esri/copyright.txt for details.\n\ndefine([\"require\",\"exports\",\"../../core/screenUtils\"],(function(e,t,i){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.TextRasterizer=void 0;var r=function(){function e(){}return e.prototype.rasterizeText=function(e,t){this._textRasterizationCanvas||(this._textRasterizationCanvas=document.createElement(\"canvas\"));var i=this._textRasterizationCanvas,r=i.getContext(\"2d\");this.setFontProperties(r,t),this.parameters=t,this.textLines=e.split(/\\r?\\n/),this.lineHeight=this.computeLineHeight();var a,n=this.computeTextWidth(r,t),o=this.lineHeight*this.textLines.length;i.width=n,i.height=o,this.renderedLineHeight=Math.round(this.lineHeight*t.pixelRatio),this.renderedHaloSize=t.halo.size*t.pixelRatio,this.renderedWidth=n*t.pixelRatio,this.renderedHeight=o*t.pixelRatio,this.fillStyle=\"rgba(\"+(a=t.color).slice(0,3).toString()+\",\"+a[3]+\")\",this.haloStyle=function(e){return\"rgb(\"+e.slice(0,3).toString()+\")\"}(t.halo.color);var s=this.renderedLineHeight,h=this.renderedHaloSize;this.setFontProperties(r,t);var l=function(e,t){return\"center\"===e?.5*t:\"right\"===e?t:0}(r.textAlign,this.renderedWidth)+h,d=h,p=0,g=0;h>0&&this.renderHalo(r,l,d,p,g,t),g+=d,p+=l;for(var u=0,f=this.textLines;u600)&&(i+=.3*e.measureText(\"A\").width),i+=2*this.parameters.halo.size,Math.round(i)},e.prototype.computeLineHeight=function(){var e=1.275*this.parameters.size;return Math.round(e+2*this.parameters.halo.size)},e}();t.TextRasterizer=r;for(var a=[],n=0;n<360;n+=22.5)a.push([Math.cos(Math.PI*n/180),Math.sin(Math.PI*n/180)]);t.default=r}));","// COPYRIGHT © 2020 Esri\n//\n// All rights reserved under the copyright laws of the United States\n// and applicable international laws, treaties, and conventions.\n//\n// This material is licensed for use under the Esri Master License\n// Agreement (MLA), and is bound by the terms of that agreement.\n// You may redistribute and use this code without modification,\n// provided you adhere to the terms of the MLA and include this\n// copyright notice.\n//\n// See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english\n//\n// For additional information, contact:\n// Environmental Systems Research Institute, Inc.\n// Attn: Contracts and Legal Services Department\n// 380 New York Street\n// Redlands, California, USA 92373\n// USA\n//\n// email: contracts@esri.com\n//\n// See http://js.arcgis.com/4.17/esri/copyright.txt for details.\n\ndefine([\"require\",\"exports\",\"../../geometry/support/jsonUtils\",\"./packingUtils\",\"./Rect\"],(function(r,n,t,a,o){\"use strict\";function e(r){for(var n=1/0,t=-1/0,a=1/0,o=-1/0,e=0,i=r;et&&(t=v[0]),v[1]o&&(o=v[1])}return[n,a,t,o]}function i(r,n){for(var t=2*n,o=r.length,e=new Uint8Array(4*o),i=0;i0){var M=(n.xmax-n.xmin)/(n.ymax-n.ymin);x=a.x/(t*M),d=a.y/t}}else x=a.x,d=a.y;return x=.5*(n.xmax+n.xmin)+x*(n.xmax-n.xmin),d=.5*(n.ymax+n.ymin)+d*(n.ymax-n.ymin),x-=e,d-=i,x*=h,d*=h,[s,(x+=m)/y-.5,-((d+=m)/g-.5)]},n.buildSDF=function(r){for(var n,t=(n=r.geom)?n.rings?n.rings:n.paths?n.paths:void 0!==n.xmin&&void 0!==n.ymin&&void 0!==n.xmax&&void 0!==n.ymax?[[[n.xmin,n.ymin],[n.xmin,n.ymax],[n.xmax,n.ymax],[n.xmax,n.ymin],[n.xmin,n.ymin]]]:null:null,a=function(r){for(var n=1/0,t=-1/0,a=1/0,e=-1/0,i=0,l=r;it&&(t=f[0]),f[1]e&&(e=f[1])}return new o.default(n,a,t-n,e-a)}(t),e=Math.floor(31.5),l=(128-2*(e+1))/Math.max(a.width,a.height),u=Math.round(a.width*l)+2*e,v=Math.round(a.height*l)+2*e,f=[],m=0,h=t;m1){for(var g=[],s=0,x=y;sn&&(c=n),p<0&&(p=0),S>t&&(S=t);for(var b=y[0]-h[0],F=y[1]-h[1],I=b*b+F*F,D=M;DI?(k=y[0],P=y[1]):(w/=I,k=h[0]+w*b,P=h[1]+w*F);var A=(D-k)*(D-k)+(C-P)*(C-P),E=(t-C-1)*n+D;An-a&&(d=n-a),Mt-a&&(c=t-a);for(var p=M;pp!=m[1]>p){for(var S=(t-p-1)*n,b=x;b-1&&(f.text=h.createLabelOverrideFunction(r,f.text,f.cim.textCase));return u?[4,i.all(u)]:[3,3];case 2:a.sent(),a.label=3;case 3:return[2,s]}}))}))},e.prototype.fetchPictureMarkerResource=function(e,t){return a.__awaiter(this,void 0,void 0,(function(){var i,n,o;return a.__generator(this,(function(a){switch(a.label){case 0:return i=e.materialHash,this._pictureMarkerCache.get(i)?[3,2]:[4,r(e.cim.url,{responseType:\"image\",signal:t&&t.signal})];case 1:n=a.sent(),o=n.data,this._pictureMarkerCache.set(i,o),a.label=2;case 2:return[2]}}))}))},e.prototype.rasterizeCIMSymbol=function(e,t,a,r,i,n){for(var o=[],s=0,l=e;so?I:o,s=z>s?z:s;var D=a.createImageData(h.size[0],h.size[1]);D.data.set(new Uint8ClampedArray(h.image.buffer));var A={offsetX:f,offsetY:p,rotateClockwise:d,angle:M,rasterizedImage:D,anchorX:g,anchorY:v};l.push(A)}}t.width=o-r,t.height=s-i;var T=-r,X=s;for(c=0;c1){var z=C[0];c.moveTo(n.pt2px(z[0]),n.pt2px(z[1]));for(var P=1;P1?n.pt2px(t):n.pt2px(t)/r:a.width,o=t?r>1?n.pt2px(t)*r:n.pt2px(t):a.height;return{image:this._imageTo32Array(a,i,o),width:i,height:o}},e.prototype._embedCIMLayerInVectorMarker=function(e,t){var a=s.isPolygon(t.geometry)?\"CIMPolygonSymbol\":\"CIMLineSymbol\";return{type:\"CIMVectorMarker\",frame:t.frame,markerGraphics:[{type:\"CIMMarkerGraphic\",geometry:t.geometry,symbol:{type:a,symbolLayers:[e]}}]}},e}();function d(e,t,a,r){var i,n;\"function\"==typeof e.materialHash?(i=(0,e.materialHash)(t,a,r),n=l.analyzeCIMResource(e.cim,e.materialOverrides)):(i=e.materialHash,n=e.cim);return{analyzedCIM:n,hash:i}}t.CIMSymbolRasterizer=v}));","// COPYRIGHT © 2020 Esri\n//\n// All rights reserved under the copyright laws of the United States\n// and applicable international laws, treaties, and conventions.\n//\n// This material is licensed for use under the Esri Master License\n// Agreement (MLA), and is bound by the terms of that agreement.\n// You may redistribute and use this code without modification,\n// provided you adhere to the terms of the MLA and include this\n// copyright notice.\n//\n// See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english\n//\n// For additional information, contact:\n// Environmental Systems Research Institute, Inc.\n// Attn: Contracts and Legal Services Department\n// 380 New York Street\n// Redlands, California, USA 92373\n// USA\n//\n// email: contracts@esri.com\n//\n// See http://js.arcgis.com/4.17/esri/copyright.txt for details.\n\ndefine([\"require\",\"exports\",\"tslib\",\"../../Color\",\"../../core/Logger\",\"../../core/promiseUtils\",\"../../core/screenUtils\",\"../../core/string\",\"../../support/arcadeOnDemand\",\"./CIMSymbolHelper\",\"./SDFHelper\",\"./utils\",\"../../views/2d/arcade/callExpressionWithFeature\"],(function(e,t,r,i,o,a,n,l,s,f,c,m,u){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.analyzeCIMResource=t.analyzeCIMSymbol=void 0;var p=o.getLogger(\"esri.symbols.cim.cimAnalyzer\");function h(e){switch(e){case\"Butt\":return 0;case\"Square\":return 2;case\"Round\":default:return 1}}function y(e){switch(e){case\"Bevel\":return 0;case\"Miter\":return 2;case\"Round\":default:return 1}}function g(e){switch(e){case\"Left\":default:return\"left\";case\"Right\":return\"right\";case\"Center\":return\"center\";case\"Justify\":return\"justify\"}}function v(e){switch(e){case\"Top\":default:return\"top\";case\"Center\":return\"middle\";case\"Baseline\":return\"baseline\";case\"Bottom\":return\"bottom\"}}function d(e,t,r,i){var o;e[t]?o=e[t]:(o={},e[t]=o),o[r]=i}function S(e){var t=e.markerPlacement;return t&&t.angleToLine?1:0}function C(e,t,r,i,o){var a=e.primitiveName,n=m.fromCIMColor(e.color),s=l.numericHash(JSON.stringify(e)).toString();o.push({type:\"fill\",templateHash:s,materialHash:0===r.length?s:function(){return s},cim:e,materialOverrides:null,colorLocked:e.colorLocked,color:Y(a,t,\"Color\",i,n,J),height:0,angle:0,offsetX:0,offsetY:0,scaleX:1,effects:e.effects})}function b(e,t,r,i,o){var a=e.primitiveName,n=e.tintColor?m.fromCIMColor(e.tintColor):{r:255,g:255,b:255,a:1},s=l.numericHash(JSON.stringify(e)).toString(),f=l.numericHash(\"\"+e.url+JSON.stringify(e.colorSubstitutions)).toString();o.push({type:\"fill\",templateHash:s,materialHash:0===r.length?f:function(){return f},cim:e,materialOverrides:null,colorLocked:e.colorLocked,effects:e.effects,color:Y(a,t,\"TintColor\",i,n,J),height:Y(a,t,\"Height\",i,e.height),scaleX:Y(a,t,\"ScaleX\",i,e.scaleX),angle:Y(a,t,\"Rotation\",i,e.rotation),offsetX:Y(a,t,\"OffsetX\",i,e.offsetX),offsetY:Y(a,t,\"OffsetY\",i,e.offsetY)})}function N(e,t,r,i,o){var a=[\"Rotation\",\"OffsetX\",\"OffsetY\"],n=r.filter((function(t){return t.primitiveName!==e.primitiveName&&-1===a.indexOf(t.propertyName)})),s=e.primitiveName,f=l.numericHash(JSON.stringify(e)).toString(),c=l.numericHash(\"\"+e.separation+JSON.stringify(e.lineSymbol)).toString();o.push({type:\"fill\",templateHash:f,materialHash:0===r.length?c:R(c,t,n,i),cim:e,materialOverrides:n,colorLocked:e.colorLocked,effects:e.effects,color:{r:255,g:255,b:255,a:1},height:Y(s,t,\"Separation\",i,e.separation),scaleX:1,angle:Y(s,t,\"Rotation\",i,e.rotation),offsetX:Y(s,t,\"OffsetX\",i,e.offsetX),offsetY:Y(s,t,\"OffsetY\",i,e.offsetY)})}function O(e,t,r,i,o){var a=l.numericHash(JSON.stringify(e)).toString();o.push({type:\"fill\",templateHash:a,materialHash:0===r.length?a:R(a,t,r,i),cim:e,materialOverrides:null,colorLocked:e.colorLocked,effects:e.effects,color:{r:128,g:128,b:128,a:1},height:0,angle:0,offsetX:0,offsetY:0,scaleX:1})}function k(e,t,r,i,o,a,n){var s=l.numericHash(JSON.stringify(e)).toString(),f=e.primitiveName,c=m.fromCIMColor(e.color),u=void 0!==e.width?e.width:4,p=h(e.capStyle),g=y(e.joinStyle),v=e.miterLimit;o.push({type:\"line\",templateHash:s,materialHash:0===r.length?s:function(){return s},cim:e,materialOverrides:null,isOutline:a,colorLocked:e.colorLocked,effects:e.effects,color:Y(f,t,\"Color\",i,c,J),width:Y(f,t,\"Width\",i,u),cap:Y(f,t,\"CapStyle\",i,p),join:Y(f,t,\"JoinStyle\",i,g),miterLimit:Y(f,t,\"MiterLimit\",i,v),referenceWidth:n,zOrder:w(e.name),isDashed:!1})}function M(e,t,r,i,o,a,n){var s=l.numericHash(\"\"+e.url+JSON.stringify(e.colorSubstitutions)).toString(),f=e.primitiveName,c=m.fromCIMColor(e.tintColor),u=void 0!==e.width?e.width:4,p=h(e.capStyle),g=y(e.joinStyle),v=e.miterLimit,d=l.numericHash(JSON.stringify(e)).toString();o.push({type:\"line\",templateHash:d,materialHash:0===r.length?s:function(){return s},cim:e,materialOverrides:null,isOutline:a,colorLocked:e.colorLocked,effects:e.effects,color:Y(f,t,\"TintColor\",i,c,J),width:Y(f,t,\"Width\",i,u),cap:Y(f,t,\"CapStyle\",i,p),join:Y(f,t,\"JoinStyle\",i,g),miterLimit:Y(f,t,\"MiterLimit\",i,v),referenceWidth:n,zOrder:w(e.name),isDashed:!1})}function H(e,t,r,i,o,a,n){var s=e.primitiveName,f=void 0!==e.width?e.width:4,c=h(e.capStyle),m=y(e.joinStyle),u=e.miterLimit,p=l.numericHash(JSON.stringify(e)).toString();o.push({type:\"line\",templateHash:p,materialHash:0===r.length?p:R(p,t,r,i),cim:e,materialOverrides:null,isOutline:a,colorLocked:e.colorLocked,effects:e.effects,color:{r:128,g:128,b:128,a:1},width:Y(s,t,\"Width\",i,f),cap:Y(s,t,\"CapStyle\",i,c),join:Y(s,t,\"JoinStyle\",i,m),miterLimit:Y(s,t,\"MiterLimit\",i,u),referenceWidth:n,zOrder:w(e.name),isDashed:!1})}function I(e,t,r,i,o){var a=e.markerPlacement;if(!a||\"CIMMarkerPlacementInsidePolygon\"!==a.type)return!1;var n=a,s=[\"Rotation\",\"OffsetX\",\"OffsetY\"],f=r.filter((function(t){return t.primitiveName!==e.primitiveName&&-1===s.indexOf(t.propertyName)})),c=l.numericHash(JSON.stringify(e)).toString();return o.push({type:\"fill\",templateHash:c,materialHash:0===r.length?c:R(c,t,f,i),cim:e,materialOverrides:f,colorLocked:e.colorLocked,effects:e.effects,color:{r:255,g:255,b:255,a:1},height:Y(n.primitiveName,t,\"StepY\",i,n.stepY),scaleX:1,angle:Y(n.primitiveName,t,\"GridAngle\",i,n.gridAngle),offsetX:Y(n.primitiveName,t,\"OffsetX\",i,n.offsetX),offsetY:Y(n.primitiveName,t,\"OffsetY\",i,n.offsetY)}),!0}function P(e,t,r,i,o,a,n){for(var s=e.primitiveName,f=e.size,c=e.scaleX,u=e.rotation,p=e.offsetX,h=e.offsetY,y=m.fromCIMColor(e.tintColor),g=l.numericHash(\"\"+e.url+JSON.stringify(e.colorSubstitutions)).toString(),v=!1,d=\"\",S=0,C=r;S