chunk-591dfdf2.d7d0a59d.js 26 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-591dfdf2","chunk-2d0c516a"],{"3e35":function(t,e,n){"use strict";n.r(e),n.d(e,"fetchSymbolFromStyle",(function(){return d})),n.d(e,"resolveWebStyleSymbol",(function(){return p}));var r=n("1fd7"),i=n("49b8"),a=n("ce50"),o=n("e041"),l=n("0224"),s=n("fcf2"),c=n("6174"),h=n("b724"),u=n("343a"),f=n("505a");function p(t,e,n,r){return t.name?t.styleName&&"Esri2DPointSymbolsStyle"===t.styleName?b(t,e,r):Object(u["b"])(t,e,r).then(i=>d(i,t.name,e,n,r)):Promise.reject(new a["a"]("symbolstyleutils:style-symbol-reference-name-missing","Missing name in style symbol reference"))}function d(t,e,n,p,d){const b=t.data,y={portal:n&&n.portal||l["a"].getDefault(),url:Object(o["M"])(t.baseUrl),origin:"portal-item"},m=b.items.find(t=>t.name===e);if(!m){const t=`The symbol name '${e}' could not be found`;return Promise.reject(new a["a"]("symbolstyleutils:symbol-name-not-found",t,{symbolName:e}))}let g=Object(s["b"])(Object(u["e"])(m,p),y),j=m.thumbnail&&m.thumbnail.href;const O=m.thumbnail&&m.thumbnail.imageData;Object(i["b"])()&&(g=Object(i["a"])(g),j=Object(i["a"])(j));const w={portal:n.portal,url:Object(o["M"])(Object(o["I"])(g)),origin:"portal-item"};return Object(u["d"])(g,d).then(i=>{const a="cimRef"===p?Object(u["c"])(i.data):i.data,o=Object(c["a"])(a,w);if(o&&Object(r["c"])(o)){if(j){const t=Object(s["b"])(j,y);o.thumbnail=new f["a"]({url:t})}else O&&(o.thumbnail=new f["a"]({url:"data:image/png;base64,"+O}));t.styleUrl?o.styleOrigin=new h["a"]({portal:n.portal,styleUrl:t.styleUrl,name:e}):t.styleName&&(o.styleOrigin=new h["a"]({portal:n.portal,styleName:t.styleName,name:e}))}return o})}function b(t,e,n){const r=u["a"].replace(/\{SymbolName\}/gi,t.name);return Object(u["d"])(r,n).then(t=>{const n=Object(u["c"])(t.data);return Object(c["a"])(n,{portal:e.portal,url:Object(o["M"])(Object(o["I"])(r)),origin:"portal-item"})})}},"4bad":function(t,e,n){"use strict";n.d(e,"a",(function(){return Z})),n.d(e,"b",(function(){return Q}));var r=n("f7be"),i=n("2eab"),a=n("d329"),o=n("ce50"),l=n("c120"),s=(n("e6c2"),n("69e9")),c=n("9ef0"),h=n("2c63"),u=n("a29a"),f=(n("702a"),n("e92d"),n("d822"));const p="http://www.w3.org/2000/svg";let d=0,b=0;const y=Object(l["a"])("android"),m=Object(l["a"])("chrome")||y&&y>=4?"auto":"optimizeLegibility",g={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7,z:0},j=/([A-DF-Za-df-z])|([-+]?\d*[.]?\d+(?:[eE][-+]?\d+)?)/g;let O={},w={};const x={solid:"none",shortdash:[4,1],shortdot:[1,1],shortdashdot:[4,1,1,1],shortdashdotdot:[4,1,1,1,1,1],dot:[1,3],dash:[4,3],longdash:[8,3],dashdot:[4,3,1,3],longdashdot:[8,3,1,3],longdashdotdot:[8,3,1,3,1,3]},k=Math.PI;let v=1;function M(t,e){const n=t*(k/180);return Math.abs(e*Math.sin(n))+Math.abs(e*Math.cos(n))}function S(t){return t.map(t=>`${t.command} ${t.values.join(" ")}`).join(" ").trim()}function z(t,e,n,r){if(t){if("circle"===t.type)return Object(f["a"])("circle",{fill:e,"fill-rule":"evenodd",stroke:n.color,"stroke-width":n.width,"stroke-linecap":n.cap,"stroke-linejoin":n.join,"stroke-dasharray":n.dashArray,"stroke-miterlimit":"4",cx:t.cx,cy:t.cy,r:t.r});if("ellipse"===t.type)return Object(f["a"])("ellipse",{fill:e,"fill-rule":"evenodd",stroke:n.color,"stroke-width":n.width,"stroke-linecap":n.cap,"stroke-linejoin":n.join,"stroke-dasharray":n.dashArray,"stroke-miterlimit":"4",cx:t.cx,cy:t.cy,rx:t.rx,ry:t.ry});if("rect"===t.type)return Object(f["a"])("rect",{fill:e,"fill-rule":"evenodd",stroke:n.color,"stroke-width":n.width,"stroke-linecap":n.cap,"stroke-linejoin":n.join,"stroke-dasharray":n.dashArray,"stroke-miterlimit":"4",x:t.x,y:t.y,width:t.width,height:t.height});if("image"===t.type)return Object(f["a"])("image",{href:t.src,x:t.x,y:t.y,width:t.width,height:t.height,preserveAspectRatio:"none"});if("path"===t.type){const r="string"!=typeof t.path?S(t.path):t.path;return Object(f["a"])("path",{fill:e,"fill-rule":"evenodd",stroke:n.color,"stroke-width":n.width,"stroke-linecap":n.cap,"stroke-linejoin":n.join,"stroke-dasharray":n.dashArray,"stroke-miterlimit":"4",d:r})}if("text"===t.type)return Object(f["a"])("text",{fill:e,"fill-rule":"evenodd",stroke:n.color,"stroke-width":n.width,"stroke-linecap":n.cap,"stroke-linejoin":n.join,"stroke-dasharray":n.dashArray,"stroke-miterlimit":"4","text-anchor":r.align,"text-decoration":r.decoration,kerning:r.kerning,rotate:r.rotate,"text-rendering":m,"font-style":r.font.style,"font-variant":r.font.variant,"font-weight":r.font.weight,"font-size":r.font.size,"font-family":r.font.family,x:t.x,y:t.y},t.text)}return null}function L(t){const e={fill:"none",pattern:null,linearGradient:null};if(t)if("type"in t&&"pattern"===t.type){const n="patternId-"+ ++d;e.fill=`url(#${n})`,e.pattern={id:n,x:t.x,y:t.y,width:t.width,height:t.height,image:{x:0,y:0,width:t.width,height:t.height,href:t.src}}}else if("type"in t&&"linear"===t.type){const n="linearGradientId-"+ ++b;e.fill=`url(#${n})`,e.linearGradient={id:n,x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,stops:t.colors.map(t=>({offset:t.offset,color:t.color&&new c["a"](t.color).toString()}))}}else if(t){const n=new c["a"](t);e.fill=n.toString()}return e}function N(t){const e={color:"none",width:1,cap:"butt",join:"4",dashArray:"none"};if(t&&(null!=t.width&&(e.width=t.width),t.cap&&(e.cap=t.cap),t.join&&(e.join=t.join.toString()),t.color&&(e.color=new c["a"](t.color).toString()),t.style)){let n=null;if(t.style in x&&(n=x[t.style]),Array.isArray(n)){n=n.slice(0);for(let e=0;e<n.length;++e)n[e]*=t.width;if("butt"!==t.cap){for(let e=0;e<n.length;e+=2)n[e]-=t.width,n[e]<1&&(n[e]=1);for(let e=1;e<n.length;e+=2)n[e]+=t.width}n=n.join(",")}e.dashArray=n}return e}function I(t,e){const n={align:null,decoration:null,kerning:null,rotate:null,font:{style:null,variant:null,weight:null,size:null,family:null}};return t&&(n.align=t.align,n.decoration=t.decoration,n.kerning=t.kerning?"auto":"0",n.rotate=t.rotated?"90":"0",n.font.style=e.style||"normal",n.font.variant=e.variant||"normal",n.font.weight=e.weight||"normal",n.font.size=e.size&&e.size.toString()||"10pt",n.font.family=e.family||"serif"),n}function P(t){const{pattern:e,linearGradient:n}=t;if(e)return Object(f["a"])("pattern",{id:e.id,patternUnits:"userSpaceOnUse",x:e.x,y:e.y,width:e.width,height:e.height},Object(f["a"])("image",{x:e.image.x,y:e.image.y,width:e.image.width,height:e.image.height,href:e.image.href}));if(n){const t=n.stops.map((t,e)=>Object(f["a"])("stop",{key:e+"-stop",offset:t.offset,"stop-color":t.color}));return Object(f["a"])("linearGradient",{id:n.id,gradientUnits:"userSpaceOnUse",x1:n.x1,y1:n.y1,x2:n.x2,y2:n.y2},t)}return null}function D(t,e,n){return Object(u["i"])(t,Object(u["c"])(t),[e,n])}function $(t,e,n,r,i){return Object(u["h"])(t,Object(u["c"])(t),[e,n]),t[4]=t[4]*e-r*e+r,t[5]=t[5]*n-i*n+i,t}function A(t,e,n,r){const i=e%360*Math.PI/180;Object(u["g"])(t,Object(u["c"])(t),i);const a=Math.cos(i),o=Math.sin(i),l=t[4],s=t[5];return t[4]=l*a-s*o+r*o-n*a+n,t[5]=s*a+l*o-n*o-r*a+r,t}function U(t,e){O&&"left"in O?(O.left>t&&(O.left=t),O.right<t&&(O.right=t),O.top>e&&(O.top=e),O.bottom<e&&(O.bottom=e)):O={left:t,bottom:e,right:t,top:e}}function G(t){const e=t.args,n=e.length;let r;switch(t.action){case"M":case"L":case"C":case"S":case"Q":case"T":for(r=0;r<n;r+=2)U(e[r],e[r+1]);w.x=e[n-2],w.y=e[n-1];break;case"H":for(r=0;r<n;++r)U(e[r],w.y);w.x=e[n-1];break;case"V":for(r=0;r<n;++r)U(w.x,e[r]);w.y=e[n-1];break;case"m":{let t=0;"x"in w||(U(w.x=e[0],w.y=e[1]),t=2);for(r=t;r<n;r+=2)U(w.x+=e[r],w.y+=e[r+1]);break}case"l":case"t":for(r=0;r<n;r+=2)U(w.x+=e[r],w.y+=e[r+1]);break;case"h":for(r=0;r<n;++r)U(w.x+=e[r],w.y);break;case"v":for(r=0;r<n;++r)U(w.x,w.y+=e[r]);break;case"c":for(r=0;r<n;r+=6)U(w.x+e[r],w.y+e[r+1]),U(w.x+e[r+2],w.y+e[r+3]),U(w.x+=e[r+4],w.y+=e[r+5]);break;case"s":case"q":for(r=0;r<n;r+=4)U(w.x+e[r],w.y+e[r+1]),U(w.x+=e[r+2],w.y+=e[r+3]);break;case"A":for(r=0;r<n;r+=7)U(e[r+5],e[r+6]);w.x=e[n-2],w.y=e[n-1];break;case"a":for(r=0;r<n;r+=7)U(w.x+=e[r+5],w.y+=e[r+6])}}function E(t,e,n){const r=g[t.toLowerCase()];let i;"number"==typeof r&&(r?e.length>=r&&(i={action:t,args:e.slice(0,e.length-e.length%r)},n.push(i),G(i)):(i={action:t,args:[]},n.push(i),G(i)))}function C(t){const e=("string"!=typeof t.path?S(t.path):t.path).match(j),n=[];if(O={},w={},!e)return null;let r="",i=[];const a=e.length;for(let l=0;l<a;++l){const t=e[l],a=parseFloat(t);isNaN(a)?(r&&E(r,i,n),i=[],r=t):i.push(a)}E(r,i,n);const o={x:0,y:0,width:0,height:0};return O&&"left"in O&&(o.x=O.left,o.y=O.top,o.width=O.right-O.left,o.height=O.bottom-O.top),o}function F(t){const e={x:0,y:0,width:0,height:0};if("circle"===t.type)e.x=t.cx-t.r,e.y=t.cy-t.r,e.width=2*t.r,e.height=2*t.r;else if("ellipse"===t.type)e.x=t.cx-t.rx,e.y=t.cy-t.ry,e.width=2*t.rx,e.height=2*t.ry;else if("image"===t.type||"rect"===t.type)e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height;else if("path"===t.type){const n=C(t);e.x=n.x,e.y=n.y,e.width=n.width,e.height=n.height}return e}function R(t){const e={x:0,y:0,width:0,height:0};let n=null,r=Number.NEGATIVE_INFINITY,i=Number.NEGATIVE_INFINITY;for(const a of t)n?(n.x=Math.min(n.x,a.x),n.y=Math.min(n.y,a.y),r=Math.max(r,a.x+a.width),i=Math.max(i,a.y+a.height)):(n=e,n.x=a.x,n.y=a.y,r=a.x+a.width,i=a.y+a.height);return n&&(n.width=r-n.x,n.height=i-n.y),n}function T(t,e,n,r,i,a,o,l,s){let c=(o&&a?M(a,e):e)/2,f=(o&&a?M(a,n):n)/2;if(s){const t=s[0],e=s[1];c=(o&&a?M(a,t):t)/2,f=(o&&a?M(a,e):e)/2}const p=t.width+r,d=t.height+r,b=Object(h["a"])(),y=Object(h["a"])();let m=!1;if(i&&0!==p&&0!==d){const t=e!==n?e/n:p/d,r=e>n?e:n;let i=1,a=1;isNaN(r)||(t>1?(i=r/p,a=r/t/d):(a=r/d,i=r*t/p)),Object(u["f"])(y,y,$(b,i,a,c,f)),m=!0}const g=t.x+(p-r)/2,j=t.y+(d-r)/2;if(Object(u["f"])(y,y,D(b,c-g,f-j)),!m&&(p>e||d>n)){const t=p/e>d/n,r=(t?e:n)/(t?p:d);Object(u["f"])(y,y,$(b,r,r,g,j))}return a&&Object(u["f"])(y,y,A(b,a,g,j)),l&&Object(u["f"])(y,y,D(b,l[0],l[1])),`matrix(${y[0]},${y[1]},${y[2]},${y[3]},${y[4]},${y[5]})`}function B(t,e,n){const r=null==t?void 0:t.effects.find(t=>"bloom"===t.type);if(!r)return null;const{strength:i,radius:a}=r,o=i>0?a:0,l=(i+o)*e,s=4*i+1;return Object(f["a"])("filter",{id:"bloom"+n,x:"-100%",y:"-100%",width:"300%",height:"300%",filterUnits:"userSpaceOnUse"},Object(f["a"])("feMorphology",{operator:"dilate",radius:(i+.5*o)*(5**(e/100)*(.4+e/100)),in:"SourceGraphic",result:"dilate"}),Object(f["a"])("feGaussianBlur",{in:"dilate",stdDeviation:l/25,result:"blur"}),Object(f["a"])("feGaussianBlur",{in:"blur",stdDeviation:l/50,result:"intensityBlur"}),Object(f["a"])("feComponentTransfer",{in:"SourceGraphic",result:"intensityBrightness"},Object(f["a"])("feFuncR",{type:"linear",slope:s}),Object(f["a"])("feFuncG",{type:"linear",slope:s}),Object(f["a"])("feFuncB",{type:"linear",slope:s})),Object(f["a"])("feMerge",null,Object(f["a"])("feMergeNode",{in:"intensityBlur"}),Object(f["a"])("feMergeNode",{in:"intensityBrightness"}),Object(f["a"])("feGaussianBlur",{stdDeviation:i/10})))}function V(t,e,n,r){const i=[],a=[],o=++v,l=B(null==r?void 0:r.effectView,e,o);let s=null;if(l){var c;const t=null==r||null==(c=r.effectView)?void 0:c.effects.find(t=>"bloom"===t.type),i=(t.strength?t.strength+t.radius/2:0)/3,a=e+e*i,o=n+n*i;s=[Math.max(a,10),Math.max(o,10)]}for(const h of t){const t=[],o=[];let l=0,c=0,u=0;for(const e of h){const{shape:n,fill:r,stroke:a,font:s,offset:h}=e;l+=a&&a.width||0;const f=L(r),p=N(a),d="text"===n.type?I(n,s):null;i.push(P(f)),t.push(z(n,f.fill,p,d)),o.push(F(n)),h&&(c+=h[0],u+=h[1])}const p=T(R(o),e,n,l,null==r?void 0:r.scale,null==r?void 0:r.rotation,null==r?void 0:r.useRotationSize,[c,u],s);a.push(Object(f["a"])("g",{transform:p},t))}return null!=r&&r.useRotationSize&&null!=r&&r.rotation&&(e=M(null==r?void 0:r.rotation,e),n=M(null==r?void 0:r.rotation,n)),l&&(e=s[0],n=s[1]),Object(f["a"])("svg",{xmlns:p,width:e,height:n,style:"display: block;"},l,Object(f["a"])("defs",null,i),l?Object(f["a"])("g",{filter:`url(#bloom${o})`},a):a)}var q=n("ac8e");const W=Object(s["a"])();function Z(t,e,n){const r=Math.ceil(e[0]),i=Math.ceil(e[1]);if(!t.some(t=>!!t.length))return null;const a=n&&n.node||document.createElement("div");return null!=n.opacity&&(a.style.opacity=n.opacity.toString()),null!=n.effectView&&(a.style.filter=Object(q["e"])(n.effectView)),W.append(a,V.bind(null,t,r,i,n)),a}function H(t,e){t=Math.ceil(t),e=Math.ceil(e);const n=document.createElement("canvas");n.width=t,n.height=e,n.style.width=t+"px",n.style.height=e+"px";const r=n.getContext("2d");return r.clearRect(0,0,t,e),r}function J(t,e,n){return t?Object(i["default"])(t,{responseType:"image"}).then(t=>{const r=t.data,i=r.width,a=r.height,o=i/a;let l=e;if(n){const t=Math.max(i,a);l=Math.min(l,t)}return{image:r,width:o<=1?Math.ceil(l*o):l,height:o<=1?l:Math.ceil(l/o)}}):Promise.reject(new o["a"]("renderUtils: imageDataSize","href not provided."))}function Y(t,e){return!(!t||"ignore"===e)&&("multiply"!==e||255!==t.r||255!==t.g||255!==t.b||1!==t.a)}function _(t,e,n,r,i){switch(i){case"multiply":t[e+0]*=n[0],t[e+1]*=n[1],t[e+2]*=n[2],t[e+3]*=n[3];break;default:{const i=Object(a["a"])({r:t[e+0],g:t[e+1],b:t[e+2]});i.h=r.h,i.s=r.s,i.v=i.v/100*r.v;const o=Object(a["d"])(i);t[e+0]=o.r,t[e+1]=o.g,t[e+2]=o.b,t[e+3]*=n[3];break}}}function Q(t,e,n,i,o){return J(t,e,o).then(o=>{const s=o.width?o.width:e,c=o.height?o.height:e;if(o.image&&Y(n,i)){let e=o.image.width,r=o.image.height;Object(l["a"])("edge")&&/\.svg$/i.test(t)&&(e-=1,r-=1);const h=H(s,c);h.drawImage(o.image,0,0,e,r,0,0,s,c);const u=h.getImageData(0,0,s,c),f=[n.r/255,n.g/255,n.b/255,n.a],p=Object(a["a"])(n);for(let t=0;t<u.data.length;t+=4)_(u.data,t,f,p,i);h.putImageData(u,0,0),t=h.canvas.toDataURL("image/png")}else{const e=r["b"]&&r["b"].findCredential(t);if(e&&e.token){const n=-1===t.indexOf("?")?"?":"&";t=`${t}${n}token=${e.token}`}}return{url:t,width:s,height:c}}).catch((function(){return{url:t,width:e,height:e}}))}},"720f":function(t,e,n){"use strict";n.r(e),n.d(e,"getPatternDescriptor",(function(){return L})),n.d(e,"getSizeFromOptions",(function(){return U})),n.d(e,"getSymbolLayerFill",(function(){return z})),n.d(e,"previewSymbol3D",(function(){return R}));var r=n("b2cd"),i=n("d329"),a=(n("c120"),n("ce50")),o=n("e92d"),l=n("b2b2"),s=n("f4cc"),c=n("a915"),h=n("cdd0"),u=n("3dc2"),f=n("8c11"),p=n("2003"),d=n("4bad"),b=n("ac8e"),y=n("3e35");const m=p["a"].size,g=p["a"].maxSize,j=p["a"].maxOutlineSize,O=p["a"].lineWidth,w=p["a"].tallSymbolWidth,x=o["a"].getLogger("esri.symbols.support.previewSymbol3D");function k(t){const e=t.outline,n=Object(l["k"])(t.material)?t.material.color:null,r=Object(l["k"])(n)?n.toHex():null;if(Object(l["j"])(e)||"pattern"in e&&Object(l["k"])(e.pattern)&&"style"===e.pattern.type&&"none"===e.pattern.style)return"fill"===t.type&&"#ffffff"===r?{color:"#bdc3c7",width:.75}:null;const i=Object(c["g"])(e.size)||0;return{color:"rgba("+(Object(l["k"])(e.color)?e.color.toRgba():"255,255,255,1")+")",width:Math.min(i,j),style:"pattern"in e&&Object(l["k"])(e.pattern)&&"style"===e.pattern.type?Object(h["b"])(e.pattern.style):null,join:"butt",cap:"patternCap"in e?e.patternCap:"butt"}}function v(t,e){const n=e&&e.resource,i=n&&n.href;if(t.thumbnail&&t.thumbnail.url)return Promise.resolve(t.thumbnail.url);if(i&&"object"!==e.type)return Promise.resolve(Object(b["g"])(t,e));const a=Object(r["b"])("esri/images/Legend/legend3dsymboldefault.png");return t.styleOrigin&&(t.styleOrigin.styleName||t.styleOrigin.styleUrl)?Object(y["resolveWebStyleSymbol"])(t.styleOrigin,{portal:t.styleOrigin.portal},"webRef").catch(t=>t).then(t=>{var e;return(null==t||null==(e=t.thumbnail)?void 0:e.url)||a}):Promise.resolve(a)}function M(t,e=1){const n=t.a,r=Object(i["a"])(t),a=r.h,o=r.s/e,l=100-(100-r.v)/e,{r:s,g:c,b:h}=Object(i["d"])({h:a,s:o,v:l});return[s,c,h,n]}function S(t){return"water"===t.type?Object(l["j"])(t.color)?null:t.color:Object(l["j"])(t.material)||Object(l["j"])(t.material.color)?null:t.material.color}function z(t,e=0){const n=S(t);if(!n){if("fill"===t.type)return null;const n=h["a"].r,r=Object(p["c"])(n,e);return[r,r,r,100]}const r=n.toRgba();for(let i=0;i<3;i++)r[i]=Object(p["c"])(r[i],e);return r}async function L(t,e){const n=t.style;return"none"===n?null:{type:"pattern",x:0,y:0,src:await Object(h["d"])(Object(r["b"])(`esri/symbols/patterns/${n}.png`),e.toCss(!0)),width:5,height:5}}function N(t){return t.outline?k(t):{color:"rgba(0, 0, 0, 1)",width:1.5}}function I(t,e){const n=S(t);if(!n)return null;let r="rgba(";return r+=Object(p["c"])(n.r,e)+",",r+=Object(p["c"])(n.g,e)+",",r+=Object(p["c"])(n.b,e)+",",r+n.a+");"}function P(t,e){const n=I(t,e);return n?"pattern"in t&&Object(l["k"])(t.pattern)&&"style"===t.pattern.type&&"none"===t.pattern.style?null:{color:n,width:Math.min(t.size?Object(c["g"])(t.size):.75,j),style:"pattern"in t&&Object(l["k"])(t.pattern)&&"style"===t.pattern.type?Object(h["b"])(t.pattern.style):null,cap:"cap"in t?t.cap:null,join:"join"in t?"miter"===t.join?Object(c["g"])(2):t.join:null}:{}}function D(t,e,n){const r=.75*n;return{type:"linear",x1:r?.25*r:0,y1:r?.5*r:0,x2:r||4,y2:r?.5*r:4,colors:[{color:t,offset:0},{color:e,offset:1}]}}function $(t){const e=t.depth,n=t.height,r=t.width;return r&&e&&n&&r===e&&r<n}function A(t,e,n){const r=[];if(!t)return r;switch(t.type){case"icon":{const n=0,i=0,a=e,o=e;switch(t.resource&&t.resource.primitive||u["b"]){case"circle":r.push({shape:{type:"circle",cx:0,cy:0,r:.5*e},fill:z(t,0),stroke:k(t)});break;case"square":r.push({shape:{type:"path",path:[{command:"M",values:[n,o]},{command:"L",values:[n,i]},{command:"L",values:[a,i]},{command:"L",values:[a,o]},{command:"Z",values:[]}]},fill:z(t,0),stroke:k(t)});break;case"triangle":r.push({shape:{type:"path",path:[{command:"M",values:[n,o]},{command:"L",values:[.5*a,i]},{command:"L",values:[a,o]},{command:"Z",values:[]}]},fill:z(t,0),stroke:k(t)});break;case"cross":r.push({shape:{type:"path",path:[{command:"M",values:[.5*a,i]},{command:"L",values:[.5*a,o]},{command:"M",values:[n,.5*o]},{command:"L",values:[a,.5*o]}]},stroke:N(t)});break;case"x":r.push({shape:{type:"path",path:[{command:"M",values:[n,i]},{command:"L",values:[a,o]},{command:"M",values:[a,i]},{command:"L",values:[n,o]}]},stroke:N(t)});break;case"kite":r.push({shape:{type:"path",path:[{command:"M",values:[n,.5*o]},{command:"L",values:[.5*a,i]},{command:"L",values:[a,.5*o]},{command:"L",values:[.5*a,o]},{command:"Z",values:[]}]},fill:z(t,0),stroke:k(t)})}break}case"object":switch(t.resource&&t.resource.primitive||f["b"]){case"cone":{const i=D(z(t,0),z(t,-.6),n?w:e),a=Object(p["d"])(e,n);r.push({shape:a[0],fill:i}),r.push({shape:a[1],fill:i});break}case"inverted-cone":{const n=z(t,0),i=D(n,z(t,-.6),e),a=Object(p["i"])(e);r.push({shape:a[0],fill:i}),r.push({shape:a[1],fill:n});break}case"cube":{const i=Object(p["e"])(e,n);r.push({shape:i[0],fill:z(t,0)}),r.push({shape:i[1],fill:z(t,-.3)}),r.push({shape:i[2],fill:z(t,-.5)});break}case"cylinder":{const i=D(z(t,0),z(t,-.6),n?w:e),a=Object(p["f"])(e,n);r.push({shape:a[0],fill:i}),r.push({shape:a[1],fill:i}),r.push({shape:a[2],fill:z(t,0)});break}case"diamond":{const n=Object(p["g"])(e);r.push({shape:n[0],fill:z(t,-.3)}),r.push({shape:n[1],fill:z(t,0)}),r.push({shape:n[2],fill:z(t,-.3)}),r.push({shape:n[3],fill:z(t,-.7)});break}case"sphere":{const n=D(z(t,0),z(t,-.6));n.x1=0,n.y1=0,n.x2=.25*e,n.y2=.25*e,r.push({shape:{type:"circle",cx:0,cy:0,r:.5*e},fill:n});break}case"tetrahedron":{const n=Object(p["k"])(e);r.push({shape:n[0],fill:z(t,-.3)}),r.push({shape:n[1],fill:z(t,0)}),r.push({shape:n[2],fill:z(t,-.6)});break}}break}return r}function U(t){const e="number"==typeof(null==t?void 0:t.size)?null==t?void 0:t.size:null;return e?Object(c["g"])(e):null}function G(t){return"icon"===t.type?"multiply":"tint"}function E(t,e){const n=U(e),r=e&&e.maxSize?Object(c["g"])(e.maxSize):null,i=e&&e.disableUpsampling,a=t.symbolLayers,o=[];let l=0,h=0;const u=a.getItemAt(a.length-1);let f;return u&&"icon"===u.type&&(f=u.size&&Object(c["g"])(u.size)),a.forEach(a=>{if("icon"!==a.type&&"object"!==a.type)return;const s="icon"===a.type?a.size&&Object(c["g"])(a.size):0,u=n||s?Math.ceil(Math.min(n||s,r||g)):m;if(a&&a.resource&&a.resource.href){const e=v(t,a).then((function(t){const e=a.get("material.color"),n=G(a);return Object(d["b"])(t,u,e,n,i)})).then((function(t){const e=t.width,n=t.height;return l=Math.max(l,e),h=Math.max(h,n),[{shape:{type:"image",x:0,y:0,width:e,height:n,src:t.url},fill:null,stroke:null}]}));o.push(e)}else{var p;let t=u;"icon"===a.type&&f&&n&&(t=u*(s/f));const r="tall"===(null==e?void 0:e.symbolConfig)||(null==e||null==(p=e.symbolConfig)?void 0:p.isTall)||"object"===a.type&&$(a);l=Math.max(l,r?w:t),h=Math.max(h,t),o.push(Promise.resolve(A(a,t,r)))}}),Object(s["j"])(o).then((function(t){const n=[];return t.forEach((function(t){t.value?n.push(t.value):t.error&&x.warn("error while building swatchInfo!",t.error)})),Object(d["a"])(n,[l,h],{node:e&&e.node,scale:!1,opacity:e&&e.opacity})}))}function C(t,e){const n=t.symbolLayers,r=[],i=Object(b["h"])(t),a=U(e),o=(e&&e.maxSize?Object(c["g"])(e.maxSize):null)||j;let s,h=0,u=0;return n.forEach((t,e)=>{if(!t)return;if("line"!==t.type&&"path"!==t.type)return;const n=[];switch(t.type){case"line":{const r=P(t,0);if(Object(l["j"])(r))break;const i=r&&r.width||0;0===e&&(s=i);const c=Math.min(a||i,o),f=0===e?c:a?c*(i/s):c,p=f>O/2?2*f:O;u=Math.max(u,f),h=Math.max(h,p),r.width=f,n.push({shape:{type:"path",path:[{command:"M",values:[0,.5*u]},{command:"L",values:[h,.5*u]}]},stroke:r});break}case"path":{const e=Math.min(a||m,o),r=z(t,0),i=z(t,-.2),l=I(t,-.4),s=l?{color:l,width:1}:{};if("quad"===t.profile){const e=t.width,a=t.height,o=Object(p["j"])(e&&a?e/a:1,0===a,0===e),l={...s,join:"bevel"};n.push({shape:o[0],fill:i,stroke:l}),n.push({shape:o[1],fill:i,stroke:l}),n.push({shape:o[2],fill:r,stroke:l})}else n.push({shape:p["m"].pathSymbol3DLayer[0],fill:i,stroke:s}),n.push({shape:p["m"].pathSymbol3DLayer[1],fill:r,stroke:s});u=Math.max(u,e),h=u}}r.push(n)}),Promise.resolve(Object(d["a"])(r,[h,u],{node:e&&e.node,scale:i,opacity:e&&e.opacity}))}async function F(t,e){const n="mesh-3d"===t.type,r=t.symbolLayers,i=U(e),a=e&&e.maxSize?Object(c["g"])(e.maxSize):null,o=i||m,s=[];let h=0,u=0,f=!1;for(let c=0;c<r.length;c++){const t=r.getItemAt(c),e=[];if(n&&"fill"!==t.type)continue;const i=p["m"].fill[0];switch(t.type){case"fill":{const r=k(t),s=Math.min(o,a||g);h=Math.max(h,s),u=Math.max(u,s),f=!0;let c=z(t,0);const p="pattern"in t&&t.pattern,d=S(t);!n&&Object(l["k"])(p)&&"style"===p.type&&"solid"!==p.style&&d&&(c=await L(p,d)),e.push({shape:i,fill:c,stroke:r});break}case"line":{const n=P(t,0);if(Object(l["j"])(n))break;const r={stroke:n,shape:i};h=Math.max(h,m),u=Math.max(u,m),e.push(r);break}case"extrude":{const n={join:"round",width:1,...P(t,-.4)},r=z(t,0),i=z(t,-.2),l=Math.min(o,a||g),s=Object(p["h"])(l);n.width=1,e.push({shape:s[0],fill:i,stroke:n}),e.push({shape:s[1],fill:i,stroke:n}),e.push({shape:s[2],fill:r,stroke:n});const c=m,f=.7*m+.5*l;h=Math.max(h,c),u=Math.max(u,f);break}case"water":{const n=S(t),r=M(n),i=M(n,2),l=M(n,3),s=Object(p["l"])();f=!0,e.push({shape:s[0],fill:r}),e.push({shape:s[1],fill:i}),e.push({shape:s[2],fill:l});const c=Math.min(o,a||g);h=Math.max(h,c),u=Math.max(u,c);break}}s.push(e)}return Promise.resolve(Object(d["a"])(s,[h,u],{node:e&&e.node,scale:f,opacity:e&&e.opacity}))}function R(t,e){if(0===t.symbolLayers.length)return Promise.reject(new a["a"]("symbolPreview: renderPreviewHTML3D","No symbolLayers in the symbol."));switch(t.type){case"point-3d":return E(t,e);case"line-3d":return C(t,e);case"polygon-3d":case"mesh-3d":return F(t,e)}return Promise.reject(new a["a"]("symbolPreview: swatchInfo3D","symbol not supported."))}},d329:function(t,e,n){"use strict";function r(t){return"r"in t&&"g"in t&&"b"in t}function i(t){return"h"in t&&"s"in t&&"v"in t}function a(t){return"l"in t&&"a"in t&&"b"in t}function o(t){return"l"in t&&"c"in t&&"h"in t}function l(t){return"x"in t&&"y"in t&&"z"in t}n.d(e,"a",(function(){return v})),n.d(e,"b",(function(){return M})),n.d(e,"c",(function(){return S})),n.d(e,"d",(function(){return k}));const s=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],c=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]];function h(t,e){const n=[];let r,i;if(t[0].length!==e.length)throw"dimensions do not match";const a=t.length,o=t[0].length;let l=0;for(r=0;r<a;r++){for(l=0,i=0;i<o;i++)l+=t[r][i]*e[i];n.push(l)}return n}function u(t){const e=[t.r/255,t.g/255,t.b/255].map(t=>t<=.04045?t/12.92:((t+.055)/1.055)**2.4),n=h(s,e);return{x:100*n[0],y:100*n[1],z:100*n[2]}}function f(t){const e=h(c,[t.x/100,t.y/100,t.z/100]).map(t=>{const e=t<=.0031308?12.92*t:1.055*t**(1/2.4)-.055;return Math.min(1,Math.max(e,0))});return{r:Math.round(255*e[0]),g:Math.round(255*e[1]),b:Math.round(255*e[2])}}function p(t){const e=[t.x/95.047,t.y/100,t.z/108.883].map(t=>t>(6/29)**3?t**(1/3):1/3*(29/6)**2*t+4/29);return{l:116*e[1]-16,a:500*(e[0]-e[1]),b:200*(e[1]-e[2])}}function d(t){const e=t.l,n=[(e+16)/116+t.a/500,(e+16)/116,(e+16)/116-t.b/200].map(t=>t>6/29?t**3:3*(6/29)**2*(t-4/29));return{x:95.047*n[0],y:100*n[1],z:108.883*n[2]}}function b(t){const e=t.l,n=t.a,r=t.b,i=Math.sqrt(n*n+r*r);let a=Math.atan2(r,n);return a=a>0?a:a+2*Math.PI,{l:e,c:i,h:a}}function y(t){const e=t.l,n=t.c,r=t.h;return{l:e,a:n*Math.cos(r),b:n*Math.sin(r)}}function m(t){return p(u(t))}function g(t){return f(d(t))}function j(t){return b(p(u(t)))}function O(t){return f(d(y(t)))}function w(t){const e=t.r,n=t.g,r=t.b,i=Math.max(e,n,r),a=i-Math.min(e,n,r);let o=i,l=0===a?0:i===e?(n-r)/a%6:i===n?(r-e)/a+2:(e-n)/a+4,s=0===a?0:a/o;return l<0&&(l+=6),l*=60,s*=100,o*=100/255,{h:l,s:s,v:o}}function x(t){const e=(t.h+360)%360/60,n=t.s/100,r=t.v/100*255,i=r*n,a=i*(1-Math.abs(e%2-1));let o;switch(Math.floor(e)){case 0:o={r:i,g:a,b:0};break;case 1:o={r:a,g:i,b:0};break;case 2:o={r:0,g:i,b:a};break;case 3:o={r:0,g:a,b:i};break;case 4:o={r:a,g:0,b:i};break;case 5:case 6:o={r:i,g:0,b:a};break;default:o={r:0,g:0,b:0}}return o.r=Math.round(o.r+r-i),o.g=Math.round(o.g+r-i),o.b=Math.round(o.b+r-i),o}function k(t){return r(t)?t:o(t)?O(t):a(t)?g(t):l(t)?f(t):i(t)?x(t):t}function v(t){return i(t)?t:w(k(t))}function M(t){return a(t)?t:m(k(t))}function S(t){return o(t)?t:j(k(t))}}}]);
  2. //# sourceMappingURL=chunk-591dfdf2.d7d0a59d.js.map