1import{}from"../../frontend-js-clay-web/__liferay__/exports/@clayui$loading-indicator.js";import Ql from"../../frontend-js-clay-web/__liferay__/exports/@clayui$loading-indicator.js";var Ut=Ql;import{useIsMounted as j1}from"../../frontend-js-react-web/__liferay__/index.js";import{}from"../../frontend-js-react-web/__liferay__/exports/classnames.js";import Kl from"../../frontend-js-react-web/__liferay__/exports/classnames.js";var Ht=Kl;import{useCommerceAccount as tx,useCommerceCart as ex}from"../../commerce-frontend-js/__liferay__/index.js";import{openToast as Bo}from"../../frontend-js-components-web/__liferay__/index.js";import{debounce as rx}from"../../frontend-js-web/__liferay__/index.js";import{array as Fx,bool as Hx,func as Yx,number as Gx,object as Wx,string as Vx,symbol as Xx,any as $x,arrayOf as Zx,element as Qx,elementType as Kx,instanceOf as Jx,node as jx,objectOf as ty,oneOf as ey,oneOfType as ry,shape as ny,exact as oy,checkPropTypes as iy,resetWarningCache as ay,PropTypes as fy}from"../../frontend-js-react-web/__liferay__/exports/prop-types.js";import Jl from"../../frontend-js-react-web/__liferay__/exports/prop-types.js";var D=Jl;import{Children as ly,Component as py,Fragment as dy,Profiler as my,PureComponent as hy,StrictMode as gy,Suspense as xy,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED as yy,cloneElement as vy,createContext as by,createElement as wy,createFactory as _y,createRef as My,forwardRef as Sy,isValidElement as Cy,lazy as Ey,memo as Ty,startTransition as Ly,unstable_act as Py,useCallback as Lr,useContext as Ny,useDebugValue as Iy,useDeferredValue as Ay,useEffect as it,useId as ky,useImperativeHandle as Dy,useInsertionEffect as Ry,useLayoutEffect as Ce,useMemo as $e,useReducer as Oy,useRef as wt,useState as G,useSyncExternalStore as zy,useTransition as qy,version as Uy}from"../../frontend-js-react-web/__liferay__/exports/react.js";import jl from"../../frontend-js-react-web/__liferay__/exports/react.js";var h=jl;import{ClayButtonWithIcon as Ee}from"../../frontend-js-clay-web/__liferay__/exports/@clayui$button.js";import tp from"../../frontend-js-clay-web/__liferay__/exports/@clayui$button.js";var Yt=tp;import{ClayCheckbox as En,ClayInput as Gt,ClayDualListBox as Vy,ClayRadio as Xy,ClayRadioGroup as $y,ClaySelect as Ze,ClaySelectBox as Zy,ClaySelectWithOption as Qy,ClayToggle as Ky}from"../../frontend-js-clay-web/__liferay__/exports/@clayui$form.js";import ep from"../../frontend-js-clay-web/__liferay__/exports/@clayui$form.js";var ee=ep;import{FDS_EVENT as $a}from"../../frontend-data-set-web/__liferay__/index.js";import{useIsMounted as rp}from"../../frontend-js-react-web/__liferay__/index.js";import{AutocompleteComponent as Ha}from"../../commerce-frontend-js/__liferay__/index.js";await import(`@liferay/language/${Liferay.ThemeDisplay.getLanguageId()}/commerce-shop-by-diagram-web/all.js`);function Ya({updateValue:t,value:e}){let r=e?{...e}:null;return r&&r.skuId&&(r.productId=r.skuId),h.createElement(ee.Group,null,h.createElement("label",{htmlFor:"linkedProductInput"},Liferay.Language.get("sku")),h.createElement(Ha,{apiUrl:"/o/headless-commerce-admin-catalog/v1.0/skus",infiniteScrollMode:!0,initialLabel:r?.sku||"",initialValue:r?.productId||"",inputName:"skuInput",itemsKey:"productId",itemsLabel:"sku",onValueUpdated:(n,o)=>{(!n&&r||!r&&n||r&&n!==r.productId)&&t(o)},pageSize:10}))}function Ga({updateValue:t,value:e}){let r=e?{...e}:null;return r&&!r.name&&(r.name=r.productName),h.createElement(ee.Group,null,h.createElement("label",{htmlFor:"linkedProductInput"},Liferay.Language.get("diagram")),h.createElement(Ha,{apiUrl:"/o/headless-commerce-admin-catalog/v1.0/products?filter=(productType eq 'diagram')",infiniteScrollMode:!0,initialLabel:r?r.name[Liferay.ThemeDisplay.getLanguageId()]:"",initialValue:r?.productId||"",inputName:"productNameInput",itemsKey:"productId",itemsLabel:["name","LANG"],onValueUpdated:(n,o)=>{(!n&&r||!r&&n||r&&n!==r.productId)&&t(o)},pageSize:10}))}function Wa({updateValue:t,value:e}){return h.createElement(ee.Group,null,h.createElement("label",{htmlFor:"linkedProductInput"},Liferay.Language.get("label")),h.createElement(Gt,{id:"linkedProductInput",onChange:r=>t({sku:r.target.value}),value:e?.sku||""}))}await import(`@liferay/language/${Liferay.ThemeDisplay.getLanguageId()}/commerce-shop-by-diagram-web/all.js`);var Qe={DIAGRAM_UPDATED:"diagram-updated"},at={HIGHLIGHT_PIN:"diagram-highlight-pin",REMOVE_PIN_HIGHLIGHT:"diagram-remove-pin-highlight",SELECT_PIN:"diagram-select-pin",TABLE_UPDATED:"diagram-table-updated"},nv=[{label:Liferay.Language.get("small"),size:10,value:"small"},{label:Liferay.Language.get("medium"),size:20,value:"medium"},{label:Liferay.Language.get("large"),size:30,value:"large"},{label:Liferay.Language.get("custom"),value:"custom"}],Yo=20,Go=.25,Rt=[.5,.75,1,1.25,1.5,1.75,2,3,5],re=new Headers({Accept:"application/json","Accept-Language":Liferay.ThemeDisplay.getBCP47LanguageId(),"Content-Type":"application/json"}),xt={DEFAULT:1,MAX:3,MIN:.5,OPTIONS:{large:{label:Liferay.Language.get("large"),value:2},medium:{label:Liferay.Language.get("medium"),value:1},small:{label:Liferay.Language.get("small"),value:.5}},STEP:.25},Wo=15,Vo="sku",Xo={diagram:{component:Ga,label:Liferay.Language.get("linked-to-a-diagram"),value:"diagram"},external:{component:Wa,label:Liferay.Language.get("not-linked-to-a-catalog"),value:"external"},sku:{component:Ya,label:Liferay.Language.get("linked-to-a-sku"),value:"sku"}},Va=6,Xa=!1;await import(`@liferay/language/${Liferay.ThemeDisplay.getLanguageId()}/commerce-shop-by-diagram-web/all.js`);function Za({closeTooltip:t,datasetDisplayId:e,onDelete:r,onSave:n,productId:o,readOnlySequence:i,selectedPin:a,sequence:f}){let[u,s]=G(a?.mappedProduct?.type||Vo),[c,p]=G(a?.mappedProduct?.quantity||1),[l,d]=G(a?.mappedProduct||null),[y,g]=G(f||a?.sequence||""),[x,b]=G(!1),[w,C]=G(!1),v=rp();it(()=>{p(a?.mappedProduct?.quantity||1),g(a?.mappedProduct?.sequence||f||""),s(a?.mappedProduct?.type||Vo),d(a?.mappedProduct||null)},[a,f]);function S(X){X.preventDefault(),b(!0),n(u,c,y,l).then(()=>
1{v()&&(b(!1),t(),e&&Liferay.fire($a.FDS_UPDATE_DISPLAY,{id:e}),Liferay.fire(Qe.DIAGRAM_UPDATED,{diagramProductId:o}))}).catch(()=>{v()&&b(!1)})}function k(){C(!0),r().then(()=>{v()&&(C(!1),t(),e&&Liferay.fire($a.UPDATE_DISPLAY,{id:e}),Liferay.fire(Qe.DIAGRAM_UPDATED,{diagramProductId:o}))}).catch(()=>{v()&&C(!1)})}let q=$e(()=>h.memo(Xo[u].component),[u]),A=a?Liferay.Language.get("update"):Liferay.Language.get("save"),F=x||w,U=!l||!y||F;return h.createElement(ee,{className:"diagram-admin-tooltip",onSubmit:S},h.createElement(ee.Group,null,h.createElement("label",{htmlFor:"sequenceInput"},Liferay.Language.get("position")),h.createElement(Gt,{id:"sequenceInput",onChange:X=>g(X.target.value),readOnly:i,type:"text",value:y})),h.createElement(ee.Group,null,h.createElement("label",{htmlFor:"typeInput"},Liferay.Language.get("type")),h.createElement(Ze,{id:"typeInput",onChange:X=>{d(null),s(X.target.value)},value:u},["sku","diagram","external"].map(X=>h.createElement(Ze.Option,{key:X,label:Xo[X].label,value:X})))),h.createElement("div",{className:"row"},h.createElement("div",{className:"col"},h.createElement(q,{updateValue:d,value:l})),u!=="diagram"&&h.createElement("div",{className:"col-3"},h.createElement(ee.Group,null,h.createElement("label",{htmlFor:"quantityInput"},Liferay.Language.get("quantity")),h.createElement(Gt,{id:"quantityInput",min:1,onChange:X=>p(X.target.value),type:"number",value:c})))),h.createElement("div",{className:"d-flex justify-content-end mt-3"},a&&h.createElement(Yt,{className:"mr-auto",disabled:F,displayType:"link",onClick:k,type:"button"},w?h.createElement(Ut,{small:!0}):Liferay.Language.get("delete")),h.createElement(Yt,{className:"mr-3",displayType:"secondary",onClick:()=>t(),type:"button"},Liferay.Language.get("cancel")),h.createElement(Yt,{disabled:U,monospaced:x,type:"submit"},x?h.createElement(Ut,{small:!0}):A)))}Za.propTypes={closeTooltip:D.func.isRequired,datasetDisplayId:D.string,onDelete:D.func.isRequired,productId:D.oneOfType([D.number,D.string]).isRequired,readOnlySequence:D.bool,selectedPin:D.shape({id:D.oneOfType([D.number,D.string]),mappedProduct:D.shape({quantity:D.number.isRequired,sequence:D.string.isRequired,type:D.string.isRequired}),sequence:D.string}),sequence:D.string,target:D.any,x:D.number,y:D.number};var Tn=Za;import{ClayIconSpriteContext as xv}from"../../frontend-js-clay-web/__liferay__/exports/@clayui$icon.js";import np from"../../frontend-js-clay-web/__liferay__/exports/@clayui$icon.js";var Qa=np;import{ManagementToolbar as Ke}from"../../frontend-js-components-web/__liferay__/index.js";await import(`@liferay/language/${Liferay.ThemeDisplay.getLanguageId()}/commerce-shop-by-diagram-web/all.js`);function op({chartInstance:t,currentZoom:e,expanded:r,updateCurrentZoom:n,updateExpanded:o}){function i(f){t.current?.updateZoom(f),n(f)}let a=$e(()=>Rt.includes(e)?Rt:Rt.concat(e).sort(),[e]);return h.createElement(Ke.Container,{className:"py-2"},h.createElement("div",{className:"d-flex flex-grow-1 justify-content-end"},h.createElement(Ke.ItemList,null,h.createElement(Ke.Item,null,h.createElement(Yt,{className:"ml-1",displayType:"secondary",onClick:()=>o(!r)},h.createElement("span",{className:"inline-item inline-item-before"},h.createElement(Qa,{symbol:r?"compress":"expand"})),r?Liferay.Language.get("compress"):Liferay.Language.get("expand"))),h.createElement(Ke.Item,null,h.createElement(Ee,{className:"ml-1",disabled:e<=Rt[0],displayType:"secondary",monospaced:!0,onClick:()=>{let f=e-Go;Rt.includes(e)||(f=a[a.indexOf(e)-1]),i(f)},symbol:"hr"})),h.createElement(Ke.Item,null,h.createElement(Ze,{className:"ml-1",onChange:f=>{i(Number(f.target.value))},value:e},a.map(f=>h.createElement(Ze.Option,{key:f,label:`${(f*100).toFixed(0)}%`,value:f})))),h.createElement(Ke.Item,null,h.createElement(Ee,{className:"ml-1",disabled:e>=Rt[Rt.length-1],displayType:"secondary",monospaced:!0,onClick:()=>{let f=e+Go;Rt.includes(e)||(f=a[a.indexOf(e)+1]),i(f)},symbol:"plus"})))))}var Ln=op;import{Align as Lv,DropDown as Pv,ClayDropDownWithItems as Nv,ClayDropDownWithDrilldown as Iv}from"../../frontend-js-clay-web/__liferay__/exports/@clayui$drop-down.js";import ip from"../../frontend-js-clay-web/__liferay__/exports/@clayui$drop-down.js";var pe=ip;import{}from"../../frontend-js-clay-web/__liferay__/exports/@clayui$slider.js";import ap from"../../frontend-js-clay-web/__liferay__/exports/@clayui$slider.js";var Ka=ap;import{ManagementToolbar as $o}from"../../frontend-js-components-web/__liferay__/index.js";import{debounce as fp}from"../../frontend-js-web/__liferay__/index.js";await import(`@liferay/language/${Liferay.ThemeDisplay.getLanguageId()}/commerce-shop-by-diagram-web/all.js`);function Ja(t){return Object.values(xt.OPTIONS).reduce((e,r)=>r.value===t?r.label:e,Liferay.Language.get("custom"))}function up(t,e){let r=Ja(t);e(r)}var sp=fp(up,500);function cp({dropdownActive:t,pinsRadius:e,setDropdownActive:r,updatePinsRadius:n}){let[o,i]=G(Ja(e)),a=e===xt.OPTIONS.small.value,f=e===xt.OPTIONS.medium.value,u=e===xt.OPTIONS.large.value;return it(()=>{sp(e,i)},[e]),h.createElement($o.Container,{className:"py-2"}
1,h.createElement($o.ItemList,null,h.createElement($o.Item,null,h.createElement("label",{className:"mr-3"},Liferay.Language.get("pin-size")),h.createElement(pe,{active:t,className:"my-auto",onActiveChange:r,trigger:h.createElement(Yt,{displayType:"secondary"},o)},h.createElement(pe.ItemList,null,h.createElement(pe.Group,{header:Liferay.Language.get("standard")},h.createElement(pe.Item,{active:a,onClick:()=>n(xt.OPTIONS.small.value)},xt.OPTIONS.small.label),h.createElement(pe.Item,{active:f,onClick:()=>n(xt.OPTIONS.medium.value)},xt.OPTIONS.medium.label),h.createElement(pe.Item,{active:u,onClick:()=>n(xt.OPTIONS.large.value)},xt.OPTIONS.large.label),h.createElement(pe.Item,null,h.createElement("div",{className:"form-group"},h.createElement("label",{htmlFor:"custom-radius-slider"},Liferay.Language.get("custom")),h.createElement("div",{className:Ht("slider-wrapper",{disabled:a||f||u})},h.createElement(Ka,{id:"custom-radius-slider",max:xt.MAX,min:xt.MIN,onChange:n,showTooltip:!1,step:xt.STEP,value:e}))))))))))}var ja=cp;import{}from"../../frontend-js-clay-web/__liferay__/exports/@clayui$alert.js";import lp from"../../frontend-js-clay-web/__liferay__/exports/@clayui$alert.js";var tf=lp;import{}from"../../frontend-js-clay-web/__liferay__/exports/@clayui$label.js";import pp from"../../frontend-js-clay-web/__liferay__/exports/@clayui$label.js";var ef=pp;import{}from"../../frontend-js-clay-web/__liferay__/exports/@clayui$sticker.js";import dp from"../../frontend-js-clay-web/__liferay__/exports/@clayui$sticker.js";var Pr=dp;import{useIsMounted as yp}from"../../frontend-js-react-web/__liferay__/index.js";import{AddToCartComponent as vp,isProductPurchasable as bp}from"../../commerce-frontend-js/__liferay__/index.js";import{sub as wp}from"../../frontend-js-web/__liferay__/index.js";import{fetch as de}from"../../frontend-js-web/__liferay__/index.js";await import(`@liferay/language/${Liferay.ThemeDisplay.getLanguageId()}/commerce-shop-by-diagram-web/all.js`);var mp="/o/headless-commerce-delivery-cart/v1.0/carts",ne="/o/headless-commerce-admin-catalog/v1.0",rf="/o/headless-commerce-delivery-catalog/v1.0";function Zo(t,e=null,r){let n=new URL(e?`${themeDisplay.getPathContext()}${rf}/channels/${e}/products/${t}/pins`:`${themeDisplay.getPathContext()}${ne}/products/${t}/pins`,themeDisplay.getPortalURL());return r&&n.searchParams.set("accountId",r),n.searchParams.set("pageSize",200),de(n,{headers:re}).then(o=>o.json()).then(o=>o.items.filter(i=>i.mappedProduct))}function nf(t){return de(`${ne}/pins/${t}`,{headers:re,method:"DELETE"})}function Pn(t){return de(`${ne}/mapped-products/${t}`,{headers:re,method:"DELETE"})}function Nn(t,e,r,n,o,i){let a=t?`${ne}/pins/${t}`:`${ne}/products/${i}/pins`,f={};return e&&(f.mappedProduct=e),(n||o)&&(f.positionX=n,f.positionY=o),r&&(f.sequence=r),de(a,{body:JSON.stringify(f),headers:re,method:t?"PATCH":"POST"}).then(u=>u.json())}function of(t,e,r,n){let o=t?`${ne}/mapped-products/${t}`:`${ne}/products/${n}/mapped-products`,i={...e};return r&&(i.sequence=r),de(o,{body:JSON.stringify(i),headers:re,method:t?"PATCH":"POST"}).then(a=>a.json())}function af(t,e,r){return de(`${ne}/diagrams/${t}`,{body:JSON.stringify({radius:e}),headers:re,method:"PATCH"}).then(n=>{if(n.ok){let o=document.getElementById(`${r}radius`);o&&(o.value=e)}})}function Nr(t,e,r,n,o,i){let a=new URL(e?`${themeDisplay.getPathContext()}${rf}/channels/${e}/products/${t}/mapped-products`:`${themeDisplay.getPathContext()}${ne}/products/${t}/mapped-products`,themeDisplay.getPortalURL());return i&&a.searchParams.set("accountId",i),r&&a.searchParams.set("search",r),n&&a.searchParams.set("page",n),a.searchParams.set("pageSize",o),de(a,{headers:re}).then(f=>{if(!f.ok)throw new Error(Liferay.Language.get("unexpected-error"));return f.json()})}function ff(t,e){let r=new URL(`${themeDisplay.getPathContext()}${mp}/${t}/items`,themeDisplay.getPortalURL());return r.searchParams.set("skuId",e),de(r,{headers:re}).then(n=>n.json())}import{getProductMinQuantity as hp,isProductPurchasable as gp}from"../../commerce-frontend-js/__liferay__/index.js";var uf=10;function sf(t){let{height:e,left:r,top:n,width:o}=t.getBoundingClientRect(),i=window.pageYOffset+n,a=window.innerWidth-r-o,f={};return f.top=i+e/2,r+o/2<window.innerWidth/2?f.left=r+o+uf:f.right=a+o+uf,f}function In(t,e,r,n){let o={sequence:r,type:t};switch(t){case"sku":return{...o,productId:n.productId,quantity:e,sku:n.sku,skuId:n.id};case"external":return{...o,quantity:e,sku:n.sku};case"diagram":return{...o,productId:n.productId};default:throw new Error(`Type ${t} not supported`)}}function An(t,e,r,n){let{height:o,width:i}=r.getBoundingClientRect();return[t/100*(i/n),e/100*(o/n)]}function Qo(t,e,r){let{height:n,width:o,x:i,y:a}=r.getBoundingClientRect();return[(t-i)/o*100,(e-a)/n*100]}function cf(t,e,r,n){return Math.abs(t-r)>Yo||Math.abs(e-n)>Yo}function lf(t){return t.length>Va?t.slice(0,6)+"\u2026":t}function pf(t,e){return t.map(r=>{let n=r.firstAvailableReplacementMappedProduct||r;
1return{...n,initialQuantity:e||n.type!=="sku"?0:hp(n.productConfiguration),selectable:e||n.type!=="sku"?!1:gp(n.availability,n.productConfiguration,n.purchasable)}})}function kn(t,e){return t.map(({key:r,value:n})=>{let o=e.find(a=>String(a.id)===String(r)),i=o&&o.productOptionValues.find(a=>String(a.id)===String(n));return{key:o.key,value:[i.key]}})}function Ko(t,e){let r=e[Liferay.ThemeDisplay.getLanguageId()]||e[Liferay.ThemeDisplay.getDefaultLanguageId()];return t+r}function Jo(t){return t.productName[Liferay.ThemeDisplay.getLanguageId()]||t.productName[Liferay.ThemeDisplay.getDefaultLanguageId()]}function jo(t){return t.replaceAll(" ","\xA0")}function xp({className:t,...e}){let r=e.finalPrice||e.promoPriceFormatted||e.priceFormatted,n=e.priceFormatted;return r!==n?h.createElement("div",{className:Ht("text-right",t)},h.createElement("small",{className:"d-block font-weight-bold mb-n1"},h.createElement("del",null,jo(n))),h.createElement("strong",{className:"text-danger"},jo(r))):h.createElement("strong",null,jo(r))}var Dn=xp;await import(`@liferay/language/${Liferay.ThemeDisplay.getLanguageId()}/commerce-shop-by-diagram-web/all.js`);function _p({accountId:t,cartId:e,channelGroupId:r,channelId:n,currencyCode:o,orderUUID:i,product:a,productBaseURL:f}){let u=a.firstAvailableReplacementMappedProduct||a,s=yp(),c=Ko(f,u.urls),p=Jo(u),[l,d]=G(!1),[y,g]=G(!0);it(()=>{if(!e){d(!1),g(!1);return}g(!0),ff(e,u.skuId).then(b=>{s()&&(d(!!b.items?.length),g(!1))}).catch(()=>{s()&&g(!1)})},[e,s,u.skuId]);let x=bp(u.availability,u.productConfiguration,u.purchasable);return h.createElement("div",{className:"row"},a.firstAvailableReplacementMappedProduct&&h.createElement("div",{className:"col-12"},h.createElement(tf,{className:"p-2",displayType:"warning",title:Liferay.Language.get("alert")},wp(Liferay.Language.get("x-has-been-replaced-by-x"),a.sku,u.sku))),u.thumbnail&&h.createElement("div",{className:"col-auto"},h.createElement(Pr,{className:"fill-cover",size:"xl"},h.createElement(Pr.Image,{alt:p,src:u.thumbnail}))),h.createElement("div",{className:"col"},h.createElement("div",{className:"mb-1"},h.createElement(ef,{displayType:x?"success":"danger"},x?Liferay.Language.get("available"):Liferay.Language.get("unavailable"))),h.createElement("div",{className:"component-title mb-1"},h.createElement("a",{href:c},u.sku)),h.createElement("p",{className:"component-subtitle mb-1"},h.createElement("a",{href:c},p)),h.createElement("p",null,Liferay.Language.get("quantity"),": ",u.quantity)),h.createElement("div",{className:"col-3 text-right"},y?h.createElement(Ut,{className:"my-3",small:!0}):h.createElement(h.Fragment,null,h.createElement(Dn,{className:"mb-1",...u.price}),h.createElement(vp,{accountId:t,cartId:e,cartUUID:i,channel:{currencyCode:o,groupId:r,id:n},cpInstance:{inCart:l,quantity:u.quantity,skuId:u.skuId,skuOptions:kn(u.skuOptions,u.productOptions)},disabled:!x,settings:{alignment:"full-width",iconOnly:!0,inline:!1,productConfiguration:u.productConfiguration,size:"sm"}}))))}function Mp({product:t,productBaseURL:e}){let r=Ko(e,t.urls),n=Jo(t);return h.createElement("div",{className:"row"},t.thumbnail&&h.createElement("div",{className:"col-auto"},h.createElement(Pr,{className:"fill-cover",size:"xl"},h.createElement(Pr.Image,{alt:n,src:t.thumbnail}))),h.createElement("div",{className:"col"},h.createElement("div",{className:"component-title"},h.createElement("a",{href:r},n))),h.createElement("div",{className:"col-auto"},h.createElement("a",{className:"btn btn-secondary",href:r},Liferay.Language.get("view"))))}function Sp({product:t}){return h.createElement(h.Fragment,null,h.createElement("div",{className:"h4 mb-1"},t.sku||t.name),!!t.quantity&&h.createElement("p",{className:"mb-0"},Liferay.Language.get("quantity"),": ",t.quantity))}var Cp={diagram:Mp,external:Sp,sku:_p};function Ep({accountId:t,cartId:e,channelGroupId:r,channelId:n,currencyCode:o,orderUUID:i,productBaseURL:a,selectedPin:f}){let u=Cp[f.mappedProduct.type];return h.createElement("div",{className:"diagram-storefront-tooltip"},h.createElement(u,{accountId:t,cartId:e,channelGroupId:r,channelId:n,currencyCode:o,orderUUID:i,product:f.mappedProduct,productBaseURL:a}))}var Rn=Ep;import{ReactPortal as Tp}from"../../frontend-js-react-web/__liferay__/index.js";function df({children:t,closeTooltip:e,target:r}){let[n,o]=G({}),i=wt(),a=wt(document.querySelector("body"));return Ce(()=>{let f=sf(r);o(f)},[r]),Ce(()=>{function f(u){!i.current.contains(u.target)&&u.target.tagName!=="text"&&!u.target.closest(".autocomplete-dropdown-menu")&&e()}return document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f)}},[e]),h.createElement(Tp,{container:a.current},h.createElement("div",{className:"diagram-tooltip-wrapper",style:n},h.createElement("div",{className:"diagram-tooltip",ref:i},t)))}df.propTypes={closeTooltip:D.func.isRequired,target:D.any};var On=df;function Wt(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function zn(t){return t.length===1&&(t=Lp(t)),{left:function(e,r,n,o){for(n==null&&(n=0),o==null&&(o=e.length);n<o;){var i=n+o>>>1;t(e[i],r)<0?n=i+1:o=i}return n},right:function(e,r,n,o){for(n==null&&(n=0),o==null&&(o=e.length);n<o;){var i=n+o>>>1;t(e[i],r)>0?o=i:n=i+1}return n}}}function Lp(t){return function(e,r){return Wt(t(e),r)}}var mf=zn(Wt),Pp=mf.right,Np=mf.left;var hf=Array.prototype,Ap=hf.slice,kp=hf.map;var Xb=Math.sqrt(50),$b=Math.sqrt(10),Zb=Math.sqrt(2);function Un(t){for(var e=t.length,r,n=-1,o=0,i,a;++n<e;)o+=t[n].length;for(i=new Array(o);
vendor: 7,414 bytes, line 1
1--e>=0;)for(a=t[e],r=a.length;--r>=0;)i[--o]=a[r];return i}var Up=Array.prototype.slice;var Bp={value:function(){}};function bf(){for(var t=0,e=arguments.length,r={},n;t<e;++t){if(!(n=arguments[t]+"")||n in r)throw new Error("illegal type: "+n);r[n]=[]}return new Bn(r)}function Bn(t){this._=t}function Fp(t,e){return t.trim().split(/^|\s+/).map(function(r){var n="",o=r.indexOf(".");if(o>=0&&(n=r.slice(o+1),r=r.slice(0,o)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}Bn.prototype=bf.prototype={constructor:Bn,on:function(t,e){var r=this._,n=Fp(t+"",r),o,i=-1,a=n.length;if(arguments.length<2){for(;++i<a;)if((o=(t=n[i]).type)&&(o=Hp(r[o],t.name)))return o;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++i<a;)if(o=(t=n[i]).type)r[o]=vf(r[o],t.name,e);else if(e==null)for(o in r)r[o]=vf(r[o],t.name,null);return this},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new Bn(t)},call:function(t,e){if((o=arguments.length-2)>0)for(var r=new Array(o),n=0,o,i;n<o;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(i=this._[t],n=0,o=i.length;n<o;++n)i[n].value.apply(e,r)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var n=this._[t],o=0,i=n.length;o<i;++o)n[o].value.apply(e,r)}};function Hp(t,e){for(var r=0,n=t.length,o;r<n;++r)if((o=t[r]).name===e)return o.value}function vf(t,e,r){for(var n=0,o=t.length;n<o;++n)if(t[n].name===e){t[n]=Bp,t=t.slice(0,n).concat(t.slice(n+1));break}return r!=null&&t.push({name:e,value:r}),t}var oe=bf;var Fn="http://www.w3.org/1999/xhtml",Hn={svg:"http://www.w3.org/2000/svg",xhtml:Fn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ie(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),Hn.hasOwnProperty(e)?{space:Hn[e],local:t}:t}function Yp(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===Fn&&e.documentElement.namespaceURI===Fn?e.createElement(t):e.createElementNS(r,t)}}function Gp(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function tr(t){var e=ie(t);return(e.local?Gp:Yp)(e)}function Wp(){}function Te(t){return t==null?Wp:function(){return this.querySelector(t)}}function wf(t){typeof t!="function"&&(t=Te(t));for(var e=this._groups,r=e.length,n=new Array(r),o=0;o<r;++o)for(var i=e[o],a=i.length,f=n[o]=new Array(a),u,s,c=0;c<a;++c)(u=i[c])&&(s=t.call(u,u.__data__,c,i))&&("__data__"in u&&(s.__data__=u.__data__),f[c]=s);return new ft(n,this._parents)}function Vp(){return[]}function Ar(t){return t==null?Vp:function(){return this.querySelectorAll(t)}}function _f(t){typeof t!="function"&&(t=Ar(t));for(var e=this._groups,r=e.length,n=[],o=[],i=0;i<r;++i)for(var a=e[i],f=a.length,u,s=0;s<f;++s)(u=a[s])&&(n.push(t.call(u,u.__data__,s,a)),o.push(u));return new ft(n,o)}function kr(t){return function(){return this.matches(t)}}function Mf(t){typeof t!="function"&&(t=kr(t));for(var e=this._groups,r=e.length,n=new Array(r),o=0;o<r;++o)for(var i=e[o],a=i.length,f=n[o]=[],u,s=0;s<a;++s)(u=i[s])&&t.call(u,u.__data__,s,i)&&f.push(u);return new ft(n,this._parents)}function Yn(t){return new Array(t.length)}function Sf(){return new ft(this._enter||this._groups.map(Yn),this._parents)}function Dr(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Dr.prototype={constructor:Dr,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function Cf(t){return function(){return t}}var Ef="$";function Xp(t,e,r,n,o,i){for(var a=0,f,u=e.length,s=i.length;a<s;++a)(f=e[a])?(f.__data__=i[a],n[a]=f):r[a]=new Dr(t,i[a]);for(;a<u;++a)(f=e[a])&&(o[a]=f)}function $p(t,e,r,n,o,i,a){var f,u,s={},c=e.length,p=i.length,l=new Array(c),d;for(f=0;f<c;++f)(u=e[f])&&(l[f]=d=Ef+a.call(u,u.__data__,f,e),d in s?o[f]=u:s[d]=u);for(f=0;f<p;++f)d=Ef+a.call(t,i[f],f,i),(u=s[d])?(n[f]=u,u.__data__=i[f],s[d]=null):r[f]=new Dr(t,i[f]);for(f=0;f<c;++f)(u=e[f])&&s[l[f]]===u&&(o[f]=u)}function Tf(t,e){if(!t)return d=new Array(this.size()),s=-1,this.each(function(k){d[++s]=k}),d;var r=e?$p:Xp,n=this._parents,o=this._groups;typeof t!="function"&&(t=Cf(t));for(var i=o.length,a=new Array(i),f=new Array(i),u=new Array(i),s=0;s<i;++s){var c=n[s],p=o[s],l=p.length,d=t.call(c,c&&c.__data__,s,n),y=d.length,g=f[s]=new Array(y),x=a[s]=new Array(y),b=u[s]=new Array(l);r(c,p,g,x,b,d,e);for(var w=0,C=0,v,S;w<y;++w)if(v=g[w]){for(w>=C&&(C=w+1);!(S=x[C])&&++C<y;);v._next=S||null}}return a=new ft(a,n),a._enter=f,a._exit=u,a}function Lf(){return new ft(this._exit||this._groups.map(Yn),this._parents)}function Pf(t,e,r){var n=this.enter(),o=this,i=this.exit();return n=typeof t=="function"?t(n):n.append(t+""),e!=null&&(o=e(o)),r==null?i.remove():r(i),n&&o?n.merge(o).order():o}function Nf(t){for(var e=this._groups,r=t._groups,n=e.length,o=r.length,i=Math.min(n,o),a=new Array(n),f=0;f<i;++f)for(var u=e[f],s=r[f],c=u.length,p=a[f]=new Array(c),l,d=0;d<c;++d)(l=u[d]||s[d])&&(p[d]=l);for(;f<n;++f)a[f]=e[f];return new ft(a,this._parents)}function If(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var n=t[e],o=n.length-1,i=n[o],a;--o>=0;)(a=n[o])&&(i&&a.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(a,i),i=a);return this}function Af(t){t||(t=Zp);function e(p,l){return p&&l?t(p.__data__,l.__data__):!p-!l}for(var r=this._groups,n=r.length,o=new Array(n),i=0;i<n;++i){for(var a=r[i],f=a.length,u=o[i]=new Array(f),s,c=0;c<f;++c)(s=a[c])&&(u[c]=s);u.sort(e)}return new ft(o,this._parents).order()}function Zp(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function kf(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Df(){var t=new Array(this.size()),e=-1;return this.each(function(){t[++e]=this}),t}function Rf(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var n=t[e],o=0,i=n.length;o<i;++o){var a=n[o];if(a)return a}return null}function Of(){var t=0;return this.each(function(){++t}),t}function zf(){return!this.node()}function qf(t){for(var e=this._groups,r=0,n=e.length;r<n;++r)for(var o=e[r],i=0,a=o.length,f;i<a;++i)(f=o[i])&&t.call(f,f.__data__,i,o);return this}function Qp(t){return function(){this.removeAttribute(t)}}function Kp(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Jp(t,e){return function(){this.setAttribute(t,e)}}function jp(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function td(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function ed(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function Uf(t,e){var r=ie(t);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((e==null?r.local?Kp:Qp:typeof e=="function"?r.local?ed:td:r.local?jp:Jp)(r,e))}function Rr(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function rd(t){return function(){this.style.removeProperty(t)}}
vendor: 3,443 bytes, line 1
1function nd(t,e,r){return function(){this.style.setProperty(t,e,r)}}function od(t,e,r){return function(){var n=e.apply(this,arguments);n==null?this.style.removeProperty(t):this.style.setProperty(t,n,r)}}function Bf(t,e,r){return arguments.length>1?this.each((e==null?rd:typeof e=="function"?od:nd)(t,e,r??"")):me(this.node(),t)}function me(t,e){return t.style.getPropertyValue(e)||Rr(t).getComputedStyle(t,null).getPropertyValue(e)}function id(t){return function(){delete this[t]}}function ad(t,e){return function(){this[t]=e}}function fd(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function Ff(t,e){return arguments.length>1?this.each((e==null?id:typeof e=="function"?fd:ad)(t,e)):this.node()[t]}function Hf(t){return t.trim().split(/^|\s+/)}function ei(t){return t.classList||new Yf(t)}function Yf(t){this._node=t,this._names=Hf(t.getAttribute("class")||"")}Yf.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Gf(t,e){for(var r=ei(t),n=-1,o=e.length;++n<o;)r.add(e[n])}function Wf(t,e){for(var r=ei(t),n=-1,o=e.length;++n<o;)r.remove(e[n])}function ud(t){return function(){Gf(this,t)}}function sd(t){return function(){Wf(this,t)}}function cd(t,e){return function(){(e.apply(this,arguments)?Gf:Wf)(this,t)}}function Vf(t,e){var r=Hf(t+"");if(arguments.length<2){for(var n=ei(this.node()),o=-1,i=r.length;++o<i;)if(!n.contains(r[o]))return!1;return!0}return this.each((typeof e=="function"?cd:e?ud:sd)(r,e))}function ld(){this.textContent=""}function pd(t){return function(){this.textContent=t}}function dd(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Xf(t){return arguments.length?this.each(t==null?ld:(typeof t=="function"?dd:pd)(t)):this.node().textContent}function md(){this.innerHTML=""}function hd(t){return function(){this.innerHTML=t}}function gd(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function $f(t){return arguments.length?this.each(t==null?md:(typeof t=="function"?gd:hd)(t)):this.node().innerHTML}function xd(){this.nextSibling&&this.parentNode.appendChild(this)}function Zf(){return this.each(xd)}function yd(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Qf(){return this.each(yd)}function Kf(t){var e=typeof t=="function"?t:tr(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function vd(){return null}function Jf(t,e){var r=typeof t=="function"?t:tr(t),n=e==null?vd:typeof e=="function"?e:Te(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function bd(){var t=this.parentNode;t&&t.removeChild(this)}function jf(){return this.each(bd)}function wd(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function _d(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}function tu(t){return this.select(t?_d:wd)}function eu(t){return arguments.length?this.property("__data__",t):this.node().__data__}var nu={},N=null;typeof document<"u"&&(ru=document.documentElement,"onmouseenter"in ru||(nu={mouseenter:"mouseover",mouseleave:"mou
1seout"}));var ru;function Md(t,e,r){return t=ou(t,e,r),function(n){var o=n.relatedTarget;(!o||o!==this&&!(o.compareDocumentPosition(this)&8))&&t.call(this,n)}}function ou(t,e,r){return function(n){var o=N;N=n;try{t.call(this,this.__data__,e,r)}finally{N=o}}}function Sd(t){return t.trim().split(/^|\s+/).map(function(e){var r="",n=e.indexOf(".");return n>=0&&(r=e.slice(n+1),e=e.slice(0,n)),{type:e,name:r}})}function Cd(t){return function(){var e=this.__on;if(e){for(var r=0,n=-1,o=e.length,i;r<o;++r)i=e[r],(!t.type||i.type===t.type)&&i.name===t.name?this.removeEventListener(i.type,i.listener,i.capture):e[++n]=i;++n?e.length=n:delete this.__on}}}function Ed(t,e,r){var n=nu.hasOwnProperty(t.type)?Md:ou;return function(o,i,a){var f=this.__on,u,s=n(e,i,a);if(f){for(var c=0,p=f.length;c<p;++c)if((u=f[c]).type===t.type&&u.name===t.name){this.removeEventListener(u.type,u.listener,u.capture),this.addEventListener(u.type,u.listener=s,u.capture=r),u.value=e;return}}this.addEventListener(t.type,s,r),u={type:t.type,name:t.name,value:e,listener:s,capture:r},f?f.push(u):this.__on=[u]}}function iu(t,e,r){var n=Sd(t+""),o,i=n.length,a;if(arguments.length<2){var f=this.node().__on;if(f){for(var u=0,s=f.length,c;u<s;++u)for(o=0,c=f[u];o<i;++o)if((a=n[o]).type===c.type&&a.name===c.name)return c.value}return}for(f=e?Ed:Cd,r==null&&(r=!1),o=0;o<i;++o)this.each(f(n[o],e,r));return this}function Le(t,e,r,n){var o=N;t.sourceEvent=N,N=t;try{return e.apply(r,n)}finally{N=o}}function au(t,e,r){var n=Rr(t),o=n.CustomEvent;typeof o=="function"?o=new o(e,r):(o=n.document.createEvent("Event"),r?(o.initEvent(e,r.bubbles,r.cancelable),o.detail=r.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}function Td(t,e){return function(){return au(this,t,e)}}function Ld(t,e){return function(){return au(this,t,e.apply(this,arguments))}}function fu(t,e){return this.each((typeof e=="function"?Ld:Td)(t,e))}var Gn=[null];function ft(t,e){this._groups=t,this._parents=e}function uu(){return new ft([[document.documentElement]],Gn)}ft.prototype=uu.prototype={constructor:ft,select:wf,selectAll:_f,filter:Mf,data:Tf,enter:Sf,exit:Lf,join:Pf,merge:Nf,order:If,sort:Af,call:kf,nodes:Df,node:Rf,size:Of,empty:zf,each:qf,attr:Uf,style:Bf,property:Ff,classed:Vf,text:Xf,html:$f,raise:Zf,lower:Qf,append:Kf,insert:Jf,remove:jf,clone:tu,datum:eu,on:iu,dis
1patch:fu};var ae=uu;function st(t){return typeof t=="string"?new ft([[document.querySelector(t)]],[document.documentElement]):new ft([[t]],Gn)}var Pd=0;function ni(){return new ri}function ri(){this._="@"+(++Pd).toString(36)}ri.prototype=ni.prototype={constructor:ri,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};function Or(){for(var t=N,e;e=t.sourceEvent;)t=e;return t}function er(t,e){var r=t.ownerSVGElement||t;if(r.createSVGPoint){var n=r.createSVGPoint();return n.x=e.clientX,n.y=e.clientY,n=n.matrixTransform(t.getScreenCTM().inverse()),[n.x,n.y]}var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}function fe(t){var e=Or();return e.changedTouches&&(e=e.changedTouches[0]),er(t,e)}function rr(t,e,r){arguments.length<3&&(r=e,e=Or().changedTouches);for(var n=0,o=e?e.length:0,i;n<o;++n)if((i=e[n]).identifier===r)return er(t,i);return null}function Wn(){N.stopImmediatePropagation()}function he(){N.preventDefault(),N.stopImmediatePropagation()}function nr(t){var e=t.document.documentElement,r=st(t).on("dragstart.drag",he,!0);"onselectstart"in e?r.on("selectstart.drag",he,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function or(t,e){var r=t.document.documentElement,n=st(t).on("dragstart.drag",null);e&&(n.on("click.drag",he,!0),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in r?n.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}function zr(t){return function(){return t}}function qr(t,e,r,n,o,i,a,f,u,s){this.target=t,this.type=e,this.subject=r,this.identifier=n,this.active=o,this.x=i,this.y=a,this.dx=f,this.dy=u,this._=s}qr.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function Nd(){return!N.button}function Id(){return this.parentNode}function Ad(t){return t??{x:N.x,y:N.y}}function kd(){return"ontouchstart"in this}function oi(){var t=Nd,e=Id,r=Ad,n=kd,o={},i=oe("start","drag","end"),a=0,f,u,s,c,p=0;function l(v){v.on("mousedown.drag",d).filter(n).on("touchstart.drag",x).on("touchmove.drag",b).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(){if(!(c||!t.apply(this,arguments))){var v=C("mouse",e.apply(this,arguments),fe,this,arguments);v&&(st(N.view).on("mousemove.drag",y,!0).on("mouseup.drag",g,!0),nr(N.view),Wn(),s=!1,f=N.clientX,u=N.clientY,v("start"))}}function y(){if(he(),!s){var v=N.clientX-f,S=N.clientY-u;s=v*v+S*S>p}o.mouse("drag")}function g(){st(N.view).on("mousemove.drag mouseup.drag",null),or(N.view,s),he(),o.mouse("end")}function x(){if(t.apply(this,arguments)){var v=N.changedTouches,S=e.apply(this,arguments),k=v.length,q,A;
1for(q=0;q<k;++q)(A=C(v[q].identifier,S,rr,this,arguments))&&(Wn(),A("start"))}}function b(){var v=N.changedTouches,S=v.length,k,q;for(k=0;k<S;++k)(q=o[v[k].identifier])&&(he(),q("drag"))}function w(){var v=N.changedTouches,S=v.length,k,q;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),k=0;k<S;++k)(q=o[v[k].identifier])&&(Wn(),q("end"))}function C(v,S,k,q,A){var F=k(S,v),U,X,rt,m=i.copy();if(Le(new qr(l,"beforestart",U,v,a,F[0],F[1],0,0,m),function(){return(N.subject=U=r.apply(q,A))==null?!1:(X=U.x-F[0]||0,rt=U.y-F[1]||0,!0)}))return function M(P){var I=F,E;switch(P){case"start":o[v]=M,E=a++;break;case"end":delete o[v],--a;case"drag":F=k(S,v),E=a;break}Le(new qr(l,P,U,v,E,F[0]+X,F[1]+rt,F[0]-I[0],F[1]-I[1],m),m.apply,m,[P,q,A])}}return l.filter=function(v){return arguments.length?(t=typeof v=="function"?v:zr(!!v),l):t},l.container=function(v){return arguments.length?(e=typeof v=="function"?v:zr(v),l):e},l.subject=function(v){return arguments.length?(r=typeof v=="function"?v:zr(v),l):r},l.touchable=function(v){return arguments.length?(n=typeof v=="function"?v:zr(!!v),l):n},l.on=function(){var v=i.on.apply(i,arguments);return v===i?l:v},l.clickDistance=function(v){return arguments.length?(p=(v=+v)*v,l):Math.sqrt(p)},l}function ue(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function ge(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function $t(){}var xe=.7,Pe=1/xe,ir="\\s*([+-]?\\d+)\\s*",Ur="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Xt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Dd=/^#([0-9a-f]{3})$/,Rd=/^#([0-9a-f]{6})$/,Od=new RegExp("^rgb\\("+[ir,ir,ir]+"\\)$"),zd=new RegExp("^rgb\\("+[Xt,Xt,Xt]+"\\)$"),qd=new RegExp("^rgba\\("+[ir,ir,ir,Ur]+"\\)$"),Ud=new RegExp("^rgba\\("+[Xt,Xt,Xt,Ur]+"\\)$"),Bd=new RegExp("^hsl\\("+[Ur,Xt,Xt]+"\\)$"),Fd=new RegExp("^hsla\\("+[Ur,Xt,Xt,Ur]+"\\)$"),su={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};ue($t,ye,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}});function ye(t){var e;return t=(t+"").trim().toLowerCase(),(e=Dd.exec(t))?(e=parseInt(e[1],16),new mt(e>>8&15|e>>4&240,e>>
14&15|e&240,(e&15)<<4|e&15,1)):(e=Rd.exec(t))?cu(parseInt(e[1],16)):(e=Od.exec(t))?new mt(e[1],e[2],e[3],1):(e=zd.exec(t))?new mt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=qd.exec(t))?lu(e[1],e[2],e[3],e[4]):(e=Ud.exec(t))?lu(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Bd.exec(t))?pu(e[1],e[2]/100,e[3]/100,1):(e=Fd.exec(t))?pu(e[1],e[2]/100,e[3]/100,e[4]):su.hasOwnProperty(t)?cu(su[t]):t==="transparent"?new mt(NaN,NaN,NaN,0):null}function cu(t){return new mt(t>>16&255,t>>8&255,t&255,1)}function lu(t,e,r,n){return n<=0&&(t=e=r=NaN),new mt(t,e,r,n)}function Br(t){return t instanceof $t||(t=ye(t)),t?(t=t.rgb(),new mt(t.r,t.g,t.b,t.opacity)):new mt}function ve(t,e,r,n){return arguments.length===1?Br(t):new mt(t,e,r,n??1)}function mt(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}ue(mt,ve,ge($t,{brighter:function(t){return t=t==null?Pe:Math.pow(Pe,t),new mt(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=t==null?xe:Math.pow(xe,t),new mt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+ii(this.r)+ii(this.g)+ii(this.b)},toString:function(){var t=this.opacity;return t=isNaN(t)?1:Math.max(0,Math.min(1,t)),(t===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(t===1?")":", "+t+")")}}));function ii(t){return t=Math.max(0,Math.min(255,Math.round(t)||0)),(t<16?"0":"")+t.toString(16)}function pu(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Vt(t,e,r,n)}function Hd(t){if(t instanceof Vt)return new Vt(t.h,t.s,t.l,t.opacity);if(t instanceof $t||(t=ye(t)),!t)return new Vt;if(t instanceof Vt)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,o=Math.min(e,r,n),i=Math.max(e,r,n),a=NaN,f=i-o,u=(i+o)/2;return f?(e===i?a=(r-n)/f+(r<n)*6:r===i?a=(n-e)/f+2:a=(e-r)/f+4,f/=u<.5?i+o:2-i-o,a*=60):f=u>0&&u<1?0:a,new Vt(a,f,u,t.opacity)}function du(t,e,r,n){return arguments.length===1?Hd(t):new Vt(t,e,r,n??1)}function Vt(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}ue(Vt,du,ge($t,{brighter:function(t){return t=t==null?Pe:Math.pow(Pe,t),new Vt(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=t==null?xe:Math.pow(xe,t),new Vt(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,o=2*r-n;return new mt(ai(t>=240?t-240:t+120,o,n),ai(t,o,n),ai(t<120?t+240:t-120,o,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));function ai(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}var Vn=Math.PI/180,Xn=180/Math.PI;var $n=18,mu=.96422,hu=1,gu=.82521,xu=4/29,ar=6/29,yu=3*ar*ar,Yd=ar*ar*ar;function li(t){if(t instanceof Zt)return new Zt(t.l,t.a,t.b,t.opacity);if(t instanceof se){if(isNaN(t.h))return new Zt(t.l,0,0,t.opacity);var e=t.h*Vn;return new Zt(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t instanceof mt||(t=Br(t));var r=ci(t.r),n=ci(t.g),o=ci(t.b),i=fi((.2225045*r+.7168786*n+.0606169*o)/hu),a,f;return r===n&&n===o?a=f=i:(a=fi((.4360747*r+.3850649*n+.1430804*o)/mu),f=fi((.0139322*r+.0971045*n+.7141733*o)/gu)),new Zt(116*i-16,500*(a-i),200*(i-f),t.opacity)}function pi(t,e,r,n){return arguments.length===1?li(t):new Zt(t,e,r,n??1)}function Zt(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}ue(Zt,pi,ge($t,{brighter:function(t){return new Zt(this.l+$n*(t??1),this.a,this.b,this.opacity)},darker:function(t){return new Zt(this.l-$n*(t??1),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return e=mu*ui(e),t=hu*ui(t),r=gu*ui(r),new mt(si(3.1338561*e-1.6168667*t-.4906146*r),si(-.9787684*e+1.9161415*t+.033454*r),si(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}}));function fi(t){return t>Yd?Math.pow(t,1/3):t/yu+xu}function ui(t){return t>ar?t*t*t:yu*(t-xu)}
1function si(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ci(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Gd(t){if(t instanceof se)return new se(t.h,t.c,t.l,t.opacity);if(t instanceof Zt||(t=li(t)),t.a===0&&t.b===0)return new se(NaN,0,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Xn;return new se(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function vu(t,e,r,n){return arguments.length===1?Gd(t):new se(t,e,r,n??1)}function se(t,e,r,n){this.h=+t,this.c=+e,this.l=+r,this.opacity=+n}ue(se,vu,ge($t,{brighter:function(t){return new se(this.h,this.c,this.l+$n*(t??1),this.opacity)},darker:function(t){return new se(this.h,this.c,this.l-$n*(t??1),this.opacity)},rgb:function(){return li(this).rgb()}}));var Mu=-.14861,di=1.78277,mi=-.29227,Zn=-.90649,Fr=1.97294,bu=Fr*Zn,wu=Fr*di,_u=di*mi-Zn*Mu;function Wd(t){if(t instanceof Ne)return new Ne(t.h,t.s,t.l,t.opacity);t instanceof mt||(t=Br(t));var e=t.r/255,r=t.g/255,n=t.b/255,o=(_u*n+bu*e-wu*r)/(_u+bu-wu),i=n-o,a=(Fr*(r-o)-mi*i)/Zn,f=Math.sqrt(a*a+i*i)/(Fr*o*(1-o)),u=f?Math.atan2(a,i)*Xn-120:NaN;return new Ne(u<0?u+360:u,f,o,t.opacity)}function St(t,e,r,n){return arguments.length===1?Wd(t):new Ne(t,e,r,n??1)}function Ne(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}ue(Ne,St,ge($t,{brighter:function(t){return t=t==null?Pe:Math.pow(Pe,t),new Ne(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=t==null?xe:Math.pow(xe,t),new Ne(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*Vn,e=+this.l,r=isNaN(this.s)?0:this.s*e*(1-e),n=Math.cos(t),o=Math.sin(t);return new mt(255*(e+r*(Mu*n+di*o)),255*(e+r*(mi*n+Zn*o)),255*(e+r*(Fr*n)),this.opacity)}}));function hi(t,e,r,n,o){var i=t*t,a=i*t;return((1-3*t+3*i-a)*e+(4-6*i+3*a)*r+(1+3*t+3*i-3*a)*n+a*o)/6}function Su(t){var e=t.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),o=t[n],i=t[n+1],a=n>0?t[n-1]:2*o-i,f=n<e-1?t[n+2]:2*i-o;return hi((r-n/e)*e,a,o,i,f)}}function Cu(t){var e=t.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*e),o=t[(n+e-1)%e],i=t[n%e],a=t[(n+1)%e],f=t[(n+2)%e];return hi((r-n/e)*e,o,i,a,f)}}function Qn(t){return function(){return t}}function Eu(t,e){return function(r){return t+r*e}}function Vd(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function Tu(t,e){var r=e-t;return r?Eu(t,r>180||r<-180?r-360*Math.round(r/360):r):Qn(isNaN(t)?e:t)}function Lu(t){return(t=+t)==1?ce:function(e,r){return r-e?Vd(e,r,t):Qn(isNaN(e)?r:e)}}function ce(t,e){var r=e-t;return r?Eu(t,r):Qn(isNaN(t)?e:t)}var Kn=function t(e){var r=Lu(e);function n(o,i){var a=r((o=ve(o)).r,(i=ve(i)).r),f=r(o.g,i.g),u=r(o.b,i.b),s=ce(o.opacity,i.opacity);return function(c){return o.r=a(c),o.g=f(c),o.b=u(c),o.opacity=s(c),o+""}}return n.gamma=t,n}(1);function Pu(t){return function(e){var r=e.length,n=new Array(r),o=new Array(r),i=new Array(r),a,f;for(a=0;a<r;++a)f=ve(e[a]),n[a]=f.r||0,o[a]=f.g||0,i[a]=f.b||0;return n=t(n),o=t(o),i=t(i),f.opacity=1,function(u){return f.r=n(u),f.g=o(u),f.b=i(u),f+""}}}var gi=Pu(Su),Xd=Pu(Cu);function zt(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var yi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,xi=new RegExp(yi.source,"g");function $d(t){return function(){return t}}function Zd(t){return function(e){return t(e)+""}}function vi(t,e){var r=yi.lastIndex=xi.lastIndex=0,n,o,i,a=-1,f=[],u=[];for(t=t+"",e=e+"";(n=yi.exec(t))&&(o=xi.exec(e));)(i=o.index)>r&&(i=e.slice(r,i),f[a]?f[a]+=i:f[++a]=i),(n=n[0])===(o=o[0])?f[a]?f[a]+=o:f[++a]=o:(f[++a]=null,u.push({i:a,x:zt(n,o)})),r=xi.lastIndex;return r<e.length&&(i=e.slice(r),f[a]?f[a]+=i:f[++a]=i),f.length<2?u[0]?Zd(u[0].x):$d(e):(e=u.length,function(s){for(var c=0,p;c<e;++c)f[(p=u[c]).i]=p.x(s);return f.join("")})}var Nu=180/Math.PI,Jn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function bi(t,e,r,n,o,i){var a,f,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*r+e*n)&&(r-=t*u,n-=e*u),(f=Math.sqrt(r*r+n*n))&&(r/=f,n/=f,u/=f),t*n<e*r&&(t=-t,e=-e,u=-u,a=-a),{translateX:o,translateY:i,rotate:Math.atan2(e,t)*Nu,skewX:Math.atan(u)*Nu,scaleX:a,scaleY:f}}var Hr,wi,Iu,jn;function Au(t){return t==="none"?Jn:(Hr||(Hr=document.createElement("DIV"),wi=document.documentElement,Iu=document.defaultView),Hr.style.transform=t,t=Iu.getComputedStyle(wi.appendChild(Hr),null).getPropertyValue("transform"),wi.removeChild(Hr),t=t.slice(7,-1).split(","),bi(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}function ku(t){return t==null?Jn:(jn||(jn=document.createElementNS("http://www.w3.org/2000/svg","g")),jn.setAttribute("transform",t),(t=jn.transform.baseVal.consolidate())?(t=t.matrix,bi(t.a,t.b,t.c,t.d,t.e,t.f)):Jn)}function Du(t,e,r,n){function o(s){return s.length?s.pop()+" ":""}function i(s,c,p,l,d,y){if(s!==p||c!==l){var g=d.push("translate(",null,e,null,r);y.push({i:g-4,x:zt(s,p)},{i:g-2,x:zt(c,l)})}else(p||l)&&d.push("translate("+p+e+l+r)}function a(s,c,p,l){s!==c?(s-c>180?c+=360:c-s>180&&(s+=360),l.push({i:p.push(o(p)+"rotate(",null,n)-2,x:zt(s,c)})):c&&p.push(o(p)+"rotate("+c+n)}
vendor: 9,591 bytes, line 1
1function f(s,c,p,l){s!==c?l.push({i:p.push(o(p)+"skewX(",null,n)-2,x:zt(s,c)}):c&&p.push(o(p)+"skewX("+c+n)}function u(s,c,p,l,d,y){if(s!==p||c!==l){var g=d.push(o(d)+"scale(",null,",",null,")");y.push({i:g-4,x:zt(s,p)},{i:g-2,x:zt(c,l)})}else(p!==1||l!==1)&&d.push(o(d)+"scale("+p+","+l+")")}return function(s,c){var p=[],l=[];return s=t(s),c=t(c),i(s.translateX,s.translateY,c.translateX,c.translateY,p,l),a(s.rotate,c.rotate,p,l),f(s.skewX,c.skewX,p,l),u(s.scaleX,s.scaleY,c.scaleX,c.scaleY,p,l),s=c=null,function(d){for(var y=-1,g=l.length,x;++y<g;)p[(x=l[y]).i]=x.x(d);return p.join("")}}}var _i=Du(Au,"px, ","px)","deg)"),Mi=Du(ku,", ",")",")");var Yr=Math.SQRT2,Si=2,Ru=4,Qd=1e-12;function Ou(t){return((t=Math.exp(t))+1/t)/2}function Kd(t){return((t=Math.exp(t))-1/t)/2}function Jd(t){return((t=Math.exp(2*t))-1)/(t+1)}function Ci(t,e){var r=t[0],n=t[1],o=t[2],i=e[0],a=e[1],f=e[2],u=i-r,s=a-n,c=u*u+s*s,p,l;if(c<Qd)l=Math.log(f/o)/Yr,p=function(w){return[r+w*u,n+w*s,o*Math.exp(Yr*w*l)]};else{var d=Math.sqrt(c),y=(f*f-o*o+Ru*c)/(2*o*Si*d),g=(f*f-o*o-Ru*c)/(2*f*Si*d),x=Math.log(Math.sqrt(y*y+1)-y),b=Math.log(Math.sqrt(g*g+1)-g);l=(b-x)/Yr,p=function(w){var C=w*l,v=Ou(x),S=o/(Si*d)*(v*Jd(Yr*C+x)-Kd(x));return[r+S*u,n+S*s,o*v/Ou(Yr*C+x)]}}return p.duration=l*1e3,p}function zu(t){return function e(r){r=+r;function n(o,i){var a=t((o=St(o)).h,(i=St(i)).h),f=ce(o.s,i.s),u=ce(o.l,i.l),s=ce(o.opacity,i.opacity);return function(c){return o.h=a(c),o.s=f(c),o.l=u(Math.pow(c,r)),o.opacity=s(c),o+""}}return n.gamma=e,n}(1)}var jd=zu(Tu),fr=zu(ce);var ur=0,Wr=0,Gr=0,Uu=1e3,to,Vr,eo=0,Ie=0,ro=0,Xr=typeof performance=="object"&&performance.now?performance:Date,Bu=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ae(){return Ie||(Bu(tm),Ie=Xr.now()+ro)}function tm(){Ie=0}function sr(){this._call=this._time=this._next=null}sr.prototype=$r.prototype={constructor:sr,restart:function(t,e,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?Ae():+r)+(e==null?0:+e),!this._next&&Vr!==this&&(Vr?Vr._next=this:to=this,Vr=this),this._call=t,this._time=r,Ei()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ei())}};function $r(t,e,r){var n=new sr;return n.restart(t,e,r),n}function Fu(){Ae(),++ur;for(var t=to,e;t;)(e=Ie-t._time)>=0&&t._call.call(null,e),t=t._next;--ur}function qu(){Ie=(eo=Xr.now())+ro,ur=Wr=0;try{Fu()}finally{ur=0,rm(),Ie=0}}function em(){var t=Xr.now(),e=t-eo;e>Uu&&(ro-=e,eo=t)}function rm(){for(var t,e=to,r,n=1/0;e;)e._call?(n>e._time&&(n=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:to=r);Vr=t,Ei(n)}function Ei(t){if(!ur){Wr&&(Wr=clearTimeout(Wr));var e=t-Ie;e>24?(t<1/0&&(Wr=setTimeout(qu,t-Xr.now()-ro)),Gr&&(Gr=clearInterval(Gr))):(Gr||(eo=Xr.now(),Gr=setInterval(em,Uu)),ur=1,Bu(qu))}}function no(t,e,r){var n=new sr;return e=e==null?0:+e,n.restart(function(o){n.stop(),t(o+e)},e,r),n}var nm=oe("start","end","cancel","interrupt"),om=[],Yu=0,Ti=1,io=2,oo=3,Hu=4,ao=5,Zr=6;function be(t,e,r,n,o,i){var a=t.__transition;if(!a)t.__transition={};else if(r in a)return;im(t,r,{name:e,index:n,group:o,on:nm,tween:om,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:Yu})}function Qr(t,e){var r=ht(t,e);if(r.state>Yu)throw new Error("too late; already scheduled");return r}function Ct(t,e){var r=ht(t,e);if(r.state>oo)throw new Error("too late; already running");return r}function ht(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function im(t,e,r){var n=t.__transition,o;n[e]=r,r.timer=$r(i,0,r.time);function i(s){r.state=Ti,r.timer.restart(a,r.delay,r.time),r.delay<=s&&a(s-r.delay)}function a(s){var c,p,l,d;if(r.state!==Ti)return u();for(c in n)if(d=n[c],d.name===r.name){if(d.state===oo)return no(a);d.state===Hu?(d.state=Zr,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete n[c]):+c<e&&(d.state=Zr,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete n[c])}if(no(function(){r.state===oo&&(r.state=Hu,r.timer.restart(f,r.delay,r.time),f(s))}),r.state=io,r.on.call("start",t,t.__data__,r.index,r.group),r.state===io){for(r.state=oo,o=new Array(l=r.tween.length),c=0,p=-1;c<l;++c)(d=r.tween[c].value.call(t,t.__data__,r.index,r.group))&&(o[++p]=d);o.length=p+1}}function f(s){for(var c=s<r.duration?r.ease.call(null,s/r.duration):(r.timer.restart(u),r.state=ao,1),p=-1,l=o.length;++p<l;)o[p].call(t,c);r.state===ao&&(r.on.call("end",t,t.__data__,r.index,r.group),u())}function u(){r.state=Zr,r.timer.stop(),delete n[e];for(var s in n)return;delete t.__transition}}function we(t,e){var r=t.__transition,n,o,i=!0,a;if(r){e=e==null?null:e+"";for(a in r){if((n=r[a]).name!==e){i=!1;continue}o=n.state>io&&n.state<ao,n.state=Zr,n.timer.stop(),n.on.call(o?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete r[a]}i&&delete t.__transition}}function Gu(t){return this.each(function(){we(this,t)})}function am(t,e){var r,n;return function(){var o=Ct(this,t),i=o.tween;if(i!==r){n=r=i;for(var a=0,f=n.length;a<f;++a)if(n[a].name===e){n=n.slice(),n.splice(a,1);break}}o.tween=n}}function fm(t,e,r){var n,o;if(typeof r!="function")throw new Error;return function(){var i=Ct(this,t),a=i.tween;if(a!==n){o=(n=a).slice();for(var f={name:e,value:r},u=0,s=o.length;u<s;++u)if(o[u].name===e){o[u]=f;break}u===s&&o.push(f)}i.tween=o}}function Wu(t,e){var r=this._id;if(t+="",arguments.length<2){for(var n=ht(this.node(),r).tween,o=0,i=n.length,a;o<i;++o)if((a=n[o]).name===t)return a.value;return null}return this.each((e==null?am:fm)(r,t,e))}function cr(t,e,r){var n=t._id;return t.each(function(){var o=Ct(this,n);(o.value||(o.value={}))[e]=r.apply(this,arguments)}),function(o){return ht(o,n).value[e]}}function fo(t,e){var r;return(typeof e=="number"?zt:e instanceof ye?Kn:(r=ye(e))?(e=r,Kn):vi)(t,e)}function um(t){return function(){this.removeAttribute(t)}}function sm(t){return function(){this.removeAttributeNS(t.space,t.local)}}function cm(t,e,r){var n,o=r+"",i;return function(){var a=this.getAttribute(t);return a===o?null:a===n?i:i=e(n=a,r)}}function lm(t,e,r){var n,o=r+"",i;return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===n?i:i=e(n=a,r)}}function pm(t,e,r){var n,o,i;return function(){var a,f=r(this),u;return f==null?void this.removeAttribute(t):(a=this.getAttribute(t),u=f+"",a===u?null:a===n&&u===o?i:(o=u,i=e(n=a,f)))}}function dm(t,e,r){var n,o,i;return function(){var a,f=r(this),u;return f==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),u=f+"",a===u?null:a===n&&u===o?i:(o=u,i=e(n=a,f)))}}function Vu(t,e){var r=ie(t),n=r==="transform"?Mi:fo;return this.attrTween(t,typeof e=="function"?(r.local?dm:pm)(r,n,cr(this,"attr."+t,e)):e==null?(r.local?sm:um)(r):(r.local?lm:cm)(r,n,e))}function mm(t,e){return function(r){this.setAttribute(t,e(r))}}function hm(t,e){return function(r){this.setAttributeNS(t.space,t.local,e(r))}}function gm(t,e){var r,n;function o(){var i=e.apply(this,arguments);return i!==n&&(r=(n=i)&&hm(t,i)),r}return o._value=e,o}function xm(t,e){var r,n;function o(){var i=e.apply(this,arguments);return i!==n&&(r=(n=i)&&mm(t,i)),r}return o._value=e,o}function Xu(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;var n=ie(t);return this.tween(r,(n.local?gm:xm)(n,e))}function ym(t,e){return function(){Qr(this,t).delay=+e.apply(this,arguments)}}function vm(t,e){return e=+e,function(){Qr(this,t).delay=e}}function $u(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?ym:vm)(e,t)):ht(this.node(),e).delay}function bm(t,e){return function(){Ct(this,t).duration=+e.apply(this,arguments)}}function wm(t,e){return e=+e,function(){Ct(this,t).duration=e}}function Zu(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?bm:wm)(e,t)):ht(this.node(),e).duration}function _m(t,e){if(typeof e!="function")throw new Error;return function(){Ct(this,t).ease=e}}function Qu(t){var e=this._id;return arguments.length?this.each(_m(e,t)):ht(this.node(),e).ease}function Ku(t){typeof t!="function"&&(t=kr(t));for(var e=this._groups,r=e.length,n=new Array(r),o=0;o<r;++o)for(var i=e[o],a=i.length,f=n[o]=[],u,s=0;s<a;++s)(u=i[s])&&t.call(u,u.__data__,s,i)&&f.push(u);return new Mt(n,this._parents,this._name,this._id)}function Ju(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,n=e.length,o=r.length,i=Math.min(n,o),a=new Array(n),f=0;f<i;++f)for(var u=e[f],s=r[f],c=u.length,p=a[f]=new Array(c),l,d=0;d<c;++d)(l=u[d]||s[d])&&(p[d]=l);for(;f<n;++f)a[f]=e[f];return new Mt(a,this._parents,this._name,this._id)}function Mm(t){return(t+"").trim().split(/^|\s+/).every(function(e){var r=e.indexOf(".");return r>=0&&(e=e.slice(0,r)),!e||e==="start"})}function Sm(t,e,r){var n,o,i=Mm(e)?Qr:Ct;return function(){var a=i(this,t),f=a.on;f!==n&&(o=(n=f).copy()).on(e,r),a.on=o}}function ju(t,e){var r=this._id;return arguments.length<2?ht(this.node(),r).on.on(t):this.each(Sm(r,t,e))}function Cm(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function ts(){return this.on("end.remove",Cm(this._id))}function es(t){var e=this._name,r=this._id;typeof t!="function"&&(t=Te(t));for(var n=this._groups,o=n.length,i=new Array(o),a=0;a<o;++a)for(var f=n[a],u=f.length,s=i[a]=new Array(u),c,p,l=0;l<u;++l)(c=f[l])&&(p=t.call(c,c.__data__,l,f))&&("__data__"in c&&(p.__data__=c.__data__),s[l]=
1p,be(s[l],e,r,l,s,ht(c,r)));return new Mt(i,this._parents,e,r)}function rs(t){var e=this._name,r=this._id;typeof t!="function"&&(t=Ar(t));for(var n=this._groups,o=n.length,i=[],a=[],f=0;f<o;++f)for(var u=n[f],s=u.length,c,p=0;p<s;++p)if(c=u[p]){for(var l=t.call(c,c.__data__,p,u),d,y=ht(c,r),g=0,x=l.length;g<x;++g)(d=l[g])&&be(d,e,r,g,l,y);i.push(l),a.push(c)}return new Mt(i,a,e,r)}var Em=ae.prototype.constructor;function ns(){return new Em(this._groups,this._parents)}function Tm(t,e){var r,n,o;return function(){var i=me(this,t),a=(this.style.removeProperty(t),me(this,t));return i===a?null:i===r&&a===n?o:o=e(r=i,n=a)}}function os(t){return function(){this.style.removeProperty(t)}}function Lm(t,e,r){var n,o=r+"",i;return function(){var a=me(this,t);return a===o?null:a===n?i:i=e(n=a,r)}}function Pm(t,e,r){var n,o,i;return function(){var a=me(this,t),f=r(this),u=f+"";return f==null&&(u=f=(this.style.removeProperty(t),me(this,t))),a===u?null:a===n&&u===o?i:(o=u,i=e(n=a,f))}}function Nm(t,e){var r,n,o,i="style."+e,a="end."+i,f;return function(){var u=Ct(this,t),s=u.on,c=u.value[i]==null?f||(f=os(e)):void 0;(s!==r||o!==c)&&(n=(r=s).copy()).on(a,o=c),u.on=n}}function is(t,e,r){var n=(t+="")=="transform"?_i:fo;return e==null?this.styleTween(t,Tm(t,n)).on("end.style."+t,os(t)):typeof e=="function"?this.styleTween(t,Pm(t,n,cr(this,"style."+t,e))).each(Nm(this._id,t)):this.styleTween(t,Lm(t,n,e),r).on("end.style."+t,null)}function Im(t,e,r){return function(n){this.style.setProperty(t,e(n),r)}}function Am(t,e,r){var n,o;function i(){var a=e.apply(this,arguments);return a!==o&&(n=(o=a)&&Im(t,a,r)),n}return i._value=e,i}function as(t,e,r){var n="style."+(t+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;return this.tween(n,Am(t,e,r??""))}function km(t){return function(){this.textContent=t}}function Dm(t){return function(){var e=t(this);this.textContent=e??""}}function fs(t){return this.tween("text",typeof t=="function"?Dm(cr(this,"text",t)):km(t==null?"":t+""))}function us(){for(var t=this._name,e=this._id,r=uo(),n=this._groups,o=n.length,i=0;i<o;++i)for(var a=n[i],f=a.length,u,s=0;s<f;++s)if(u=a[s]){var c=ht(u,e);be(u,t,r,s,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Mt(n,this._parents,t,r)}function ss(){var t,e,r=this,n=r._id,o=r.size();return new Promise(function(i,a){var f={value:a},u={value:function(){--o===0&&i()}};r.each(function(){var s=Ct(this,n),c=s.on;c!==t&&(e=(t=c).copy(),e._.cancel.push(f),e._.interrupt.push(f),e._.end.push(u)),s.on=e})})}var Rm=0;function Mt(t,e,r,n){this._groups=t,this._parents=e,this._name=r,this._id=n}function Li(t){return ae().transition(t)}function uo(){return++Rm}var lr=ae.prototype;Mt.prototype=Li.prototype={constructor:Mt,select:es,selectAll:rs,filter:Ku,merge:Ju,selection:ns,transition:us,call:lr.call,nodes:lr.nodes,node:lr.node,size:lr.size,empty:lr.empty,each:lr.each,on:ju,attr:Vu,attrTween:Xu,style:is,styleTween:as,text:fs,remove:ts,tween:Wu,delay:$u,duration:Zu,ease:Qu,end:ss};function so(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Pi=3,Om=function t(e){e=+e;function r(n){return Math.pow(n,e)}return r.exponent=t,r}(Pi),zm=function t(e){e=+e;function r(n){return 1-Math.pow(1-n,e)}return r.exponent=t,r}(Pi),cs=function t(e){e=+e;function r(n){return((n*=2)<=1?Math.pow(n,e):2-Math.pow(2-n,e))/2}return r.exponent=t,r}(Pi);var qm=Math.PI,s4=qm/2;var ls=.36363636363636365,d4=6/11,m4=8/11,h4=3/4,g4=9/11,x4=10/11,y4=15/16,v4=21/22,b4=63/64,w4=1/ls/ls;var Ni=1.70158,Um=function t(e){e=+e;function r(n){return n*n*((e+1)*n-e)}return r.overshoot=t,r}(Ni),Bm=function t(e){e=+e;function r(n){return--n*n*((e+1)*n+e)+1}return r.overshoot=t,r}(Ni),ps=function t(e){e=+e;function r(n){return((n*=2)<1?n*n*((e+1)*n-e):(n-=2)*n*((e+1)*n+e)+2)/2}return r.overshoot=t,r}(Ni);var pr=2*Math.PI,Ii=1,Ai=.3,Fm=function t(e,r){var n=Math.asin(1/(e=Math.max(1,e)))*(r/=pr);function o(i){return e*Math.pow(2,10*--i)*Math.sin((n-i)/r)}return o.amplitude=function(i){return t(i,r*pr)},o.period=function(i){return t(e,i)},o}(Ii,Ai),ds=function t(e,r){var n=Math.asin(1/(e=Math.max(1,e)))*(r/=pr);function o(i){return 1-e*Math.pow(2,-10*(i=+i))*Math.sin((i+n)/r)}return o.amplitude=function(i){return t(i,r*pr)}
1,o.period=function(i){return t(e,i)},o}(Ii,Ai),Hm=function t(e,r){var n=Math.asin(1/(e=Math.max(1,e)))*(r/=pr);function o(i){return((i=i*2-1)<0?e*Math.pow(2,10*i)*Math.sin((n-i)/r):2-e*Math.pow(2,-10*i)*Math.sin((n+i)/r))/2}return o.amplitude=function(i){return t(i,r*pr)},o.period=function(i){return t(e,i)},o}(Ii,Ai);var ki={time:null,delay:0,duration:250,ease:so};function $m(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))return ki.time=Ae(),ki;return r}function ms(t){var e,r;t instanceof Mt?(e=t._id,t=t._name):(e=uo(),(r=ki).time=Ae(),t=t==null?null:t+"");for(var n=this._groups,o=n.length,i=0;i<o;++i)for(var a=n[i],f=a.length,u,s=0;s<f;++s)(u=a[s])&&be(u,t,e,s,a,r||$m(u,e));return new Mt(n,this._parents,t,e)}ae.prototype.interrupt=Gu;ae.prototype.transition=ms;var T9={name:"x",handles:["e","w"].map(Di),input:function(t,e){return t&&[[t[0],e[0][1]],[t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},L9={name:"y",handles:["n","s"].map(Di),input:function(t,e){return t&&[[e[0][0],t[0]],[e[1][0],t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},P9={name:"xy",handles:["n","e","s","w","nw","ne","se","sw"].map(Di),input:function(t){return t},output:function(t){return t}};function Di(t){return{type:t}}var hs=Math.PI,Zm=hs/2,Qm=hs*2;var Km=Array.prototype.slice;var Ri=Math.PI,Oi=2*Ri,ke=1e-6,Jm=Oi-ke;function zi(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function jm(){return new zi}zi.prototype=jm.prototype={constructor:zi,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,r,n){this._+="Q"+ +t+","+ +e+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(t,e,r,n,o,i){this._+="C"+ +t+","+ +e+","+ +r+","+ +n+","+(this._x1=+o)+","+(this._y1=+i)},arcTo:function(t,e,r,n,o){t=+t,e=+e,r=+r,n=+n,o=+o;var i=this._x1,a=this._y1,f=r-t,u=n-e,s=i-t,c=a-e,p=s*s+c*c;if(o<0)throw new Error("negative radius: "+o);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(p>ke)if(!(Math.abs(c*f-u*s)>ke)||!o)this._+="L"+(this._x1=t)+","+(this._y1=e);else{var l=r-i,d=n-a,y=f*f+u*u,g=l*l+d*d,x=Math.sqrt(y),b=Math.sqrt(p),w=o*Math.tan((Ri-Math.acos((y+p-g)/(2*x*b)))/2),C=w/b,v=w/x;Math.abs(C-1)>ke&&(this._+="L"+(t+C*s)+","+(e+C*c)),this._+="A"+o+","+o+",0,0,"+ +(c*l>s*d)+","+(this._x1=t+v*f)+","+(this._y1=e+v*u)}},arc:function(t,e,r,n,o,i){t=+t,e=+e,r=+r;var a=r*Math.cos(n),f=r*Math.sin(n),u=t+a,s=e+f,c=1^i,p=i?n-o:o-n;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+u+","+s:(Math.abs(this._x1-u)>ke||Math.abs(this._y1-s)>ke)&&(this._+="L"+u+","+s),r&&(p<0&&(p=p%Oi+Oi),p>Jm?this._+="A"+r+","+r+",0,1,"+c+","+(t-a)+","+(e-f)+"A"+r+","+r+",0,1,"+c+","+(this._x1=u)+","+(this._y1=s):p>ke&&(this._+="A"+r+","+r+",0,"+ +(p>=Ri)+","+c+","+(this._x1=t+r*Math.cos(o))+","+(this._y1=e+r*Math.sin(o))))},rect:function(t,e,r,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};var Ot="$";function co(){}co.prototype=gs.prototype={constructor:co,has:function(t){return Ot+t in this},get:function(t){return this[Ot+t]},set:function(t,e){return this[Ot+t]=e,this},remove:function(t){var e=Ot+t;return e in this&&delete this[e]},clear:function(){for(var t in this)t[0]===Ot&&delete this[t]},keys:function(){var t=[];for(var e in this)e[0]===Ot&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)e[0]===Ot&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)e[0]===Ot&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)e[0]===Ot&&++t;return t},empty:function(){for(var t in this)if(t[0]===Ot)return!1;return!0},each:function(t){for(var e in this)e[0]===Ot&&t(this[e],e.slice(1),this)}};function gs(t,e){var r=new co;if(t instanceof co)t.each(function(f,u){r.set(u,f)});else if(Array.isArray(t)){var n=-1,o=t.length,i;if(e==null)for(;++n<o;)r.set(n,t[n]);else for(;++n<o;)r.set(e(i=t[n],n,t),i)}else if(t)for(var a in t)r.set(a,t[a]);return r}var De=gs;function lo(){}var Re=De.prototype;lo.prototype=eh.prototype={constructor:lo,has:Re.has,add:function(t){return t+="",this[Ot+t]=t,this},remove:Re.remove,clear:Re.clear,values:Re.keys,size:Re.size,empty:Re.empty,each:Re.each};function eh(t,e){var r=new lo;if(t instanceof lo)t.each(function(i){r.add(i)});else if(t){var n=-1,o=t.length;if(e==null)for(;++n<o;)r.add(t[n]);else for(;++n<o;)r.add(e(t[n],n,t))}return r}var rh=Array.prototype,xs=rh.slice;var ys={},qi={},Ui=34,Kr=10,Bi=13;function vs(t){return new Function("d","return {"+t.map(function(e,r){return JSON.stringify(e)+": d["+r+"]"}).join(",")+"}")}function ih(t,e){var r=vs(t);return function(n,o){return e(r(n),o,t)}}function ah(t){var e=Object.create(null),r=[];return t.forEach(function(n){for(var o in n)o in e||r.push(e[o]=o)}),r}function dr(t){var e=new RegExp('["'+t+` 2\r]`),r=t.charCodeAt(0);function n(s,c){var p,l,d=o(s,function(y,g){if(p)return p(y,g-1);l=y,p=c?ih(y,c):vs(y)});return d.columns=l||[],d}function o(s,c){var p=[],l=s.length,d=0,y=0,g,x=l<=0,b=!1;
2s.charCodeAt(l-1)===Kr&&--l,s.charCodeAt(l-1)===Bi&&--l;function w(){if(x)return qi;if(b)return b=!1,ys;var v,S=d,k;if(s.charCodeAt(S)===Ui){for(;d++<l&&s.charCodeAt(d)!==Ui||s.charCodeAt(++d)===Ui;);return(v=d)>=l?x=!0:(k=s.charCodeAt(d++))===Kr?b=!0:k===Bi&&(b=!0,s.charCodeAt(d)===Kr&&++d),s.slice(S+1,v-1).replace(/""/g,'"')}for(;d<l;){if((k=s.charCodeAt(v=d++))===Kr)b=!0;else if(k===Bi)b=!0,s.charCodeAt(d)===Kr&&++d;else if(k!==r)continue;return s.slice(S,v)}return x=!0,s.slice(S,l)}for(;(g=w())!==qi;){for(var C=[];g!==ys&&g!==qi;)C.push(g),g=w();c&&(C=c(C,y++))==null||p.push(C)}return p}function i(s,c){return c==null&&(c=ah(s)),[c.map(u).join(t)].concat(s.map(function(p){return c.map(function(l){return u(p[l])}).join(t)})).join(` 3`)}function a(s){return s.map(f).join(` 4`)}function f(s){return s.map(u).join(t)}function u(s){return s==null?"":e.test(s+="")?'"'+s.replace(/"/g,'""')+'"':s}return{parse:n,parseRows:o,format:i,formatRows:a}}var po=dr(","),Fi=po.parse,fh=po.parseRows,uh=po.format,sh=po.formatRows;var mo=dr(" "),Hi=mo.parse,ch=mo.parseRows,lh=mo.format,ph=mo.formatRows;function dh(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function Jr(t,e){return fetch(t,e).then(dh)}function bs(t){return function(e,r,n){return arguments.length===2&&typeof r=="function"&&(n=r,r=void 0),Jr(e,r).then(function(o){return t(o,n)})}}var mh=bs(Fi),hh=bs(Hi);function Yi(t){return function(e,r){return Jr(e,r).then(function(n){return new DOMParser().parseFromString(n,t)})}}var gh=Yi("application/xml"),xh=Yi("text/html"),yh=Yi("image/svg+xml");function ws(t){var e=+this._x.call(null,t),r=+this._y.call(null,t);return _s(this.cover(e,r),e,r,t)}function _s(t,e,r,n){if(isNaN(e)||isNaN(r))return t;var o,i=t._root,a={data:n},f=t._x0,u=t._y0,s=t._x1,c=t._y1,p,l,d,y,g,x,b,w;if(!i)return t._root=a,t;for(;i.length;)if((g=e>=(p=(f+s)/2))?f=p:s=p,(x=r>=(l=(u+c)/2))?u=l:c=l,o=i,!(i=i[b=x<<1|g]))return o[b]=a,t;if(d=+t._x.call(null,i.data),y=+t._y.call(null,i.data),e===d&&r===y)return a.next=i,o?o[b]=a:t._root=a,t;do o=o?o[b]=new Array(4):t._root=new Array(4),(g=e>=(p=(f+s)/2))?f=p:s=p,(x=r>=(l=(u+c)/2))?u=l:c=l;while((b=x<<1|g)===(w=(y>=l)<<1|d>=p));return o[w]=i,o[b]=a,t}function Ms(t){var e,r,n=t.length,o,i,a=new Array(n),f=new Array(n),u=1/0,s=1/0,c=-1/0,p=-1/0;for(r=0;r<n;++r)isNaN(o=+this._x.call(null,e=t[r]))||isNaN(i=+this._y.call(null,e))||(a[r]=o,f[r]=i,o<u&&(u=o),o>c&&(c=o),i<s&&(s=i),i>p&&(p=i));for(c<u&&(u=this._x0,c=this._x1),p<s&&(s=this._y0,p=this._y1),this.cover(u,s).cover(c,p),r=0;r<n;++r)_s(this,a[r],f[r],t[r]);return this}function Ss(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var r=this._x0,n=this._y0,o=this._x1,i=this._y1;if(isNaN(r))o=(r=Math.floor(t))+1,i=(n=Math.floor(e))+1;else if(r>t||t>o||n>e||e>i){var a=o-r,f=this._root,u,s;switch(s=(e<(n+i)/2)<<1|t<(r+o)/2){case 0:{do u=new Array(4),u[s]=f,f=u;while(a*=2,o=r+a,i=n+a,t>o||e>i);break}case 1:{do u=new Array(4),u[s]=f,f=u;while(a*=2,r=o-a,i=n+a,r>t||e>i);break}case 2:{do u=new Array(4),u[s]=f,f=u;while(a*=2,o=r+a,n=i-a,t>o||n>e);break}case 3:{do u=new Array(4),u[s]=f,f=u;while(a*=2,r=o-a,n=i-a,r>t||n>e);break}}this._root&&this._root.length&&(this._root=f)}else return this;return this._x0=r,this._y0=n,this._x1=o,this._y1=i,this}function Cs(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function Es(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function yt(t,e,r,n,o){this.node=t,this.x0=e,this.y0=r,this.x1=n,this.y1=o}function Ts(t,e,r){var n,o=this._x0,i=this._y0,a,f,u,s,c=this._x1,p=this._y1,l=[],d=this._root,y,g;for(d&&l.push(new yt(d,o,i,c,p)),r==null?r=1/0:(o=t-r,i=e-r,c=t+r,p=e+r,r*=r);y=l.pop();)if(!(!(d=y.node)||(a=y.x0)>c||(f=y.y0)>p||(u=y.x1)<o||(s=y.y1)<i))if(d.length){var x=(a+u)/2,b=(f+s)/2;l.push(new yt(d[3],x,b,u,s),new yt(d[2],a,b,x,s),new yt(d[1],x,f,u,b),new yt(d[0],a,f,x,b)),(g=(e>=b)<<1|t>=x)&&(y=l[l.length-1],l[l.length-1]=l[l.length-1-g],l[l.length-1-g]=y)}else{var w=t-+this._x.call(null,d.data),C=e-+this._y.call(null,d.data),v=w*w+C*C;if(v<r){var S=Math.sqrt(r=v);o=t-S,i=e-S,c=t+S,p=e+S,n=d.data}}return n}function Ls(t){if(isNaN(c=+this._x.call(null,t))||isNaN(p=+this._y.call(null,t)))return this;var e,r=this._root,n,o,i,a=this._x0,f=this._y0,u=this._x1,s=this._y1,c,p,l,d,y,g,x,b;if(!r)return this;if(r.length)for(;;){if((y=c>
4=(l=(a+u)/2))?a=l:u=l,(g=p>=(d=(f+s)/2))?f=d:s=d,e=r,!(r=r[x=g<<1|y]))return this;if(!r.length)break;(e[x+1&3]||e[x+2&3]||e[x+3&3])&&(n=e,b=x)}for(;r.data!==t;)if(o=r,!(r=r.next))return this;return(i=r.next)&&delete r.next,o?(i?o.next=i:delete o.next,this):e?(i?e[x]=i:delete e[x],(r=e[0]||e[1]||e[2]||e[3])&&r===(e[3]||e[2]||e[1]||e[0])&&!r.length&&(n?n[b]=r:this._root=r),this):(this._root=i,this)}function Ps(t){for(var e=0,r=t.length;e<r;++e)this.remove(t[e]);return this}function Ns(){return this._root}function Is(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function As(t){var e=[],r,n=this._root,o,i,a,f,u;for(n&&e.push(new yt(n,this._x0,this._y0,this._x1,this._y1));r=e.pop();)if(!t(n=r.node,i=r.x0,a=r.y0,f=r.x1,u=r.y1)&&n.length){var s=(i+f)/2,c=(a+u)/2;(o=n[3])&&e.push(new yt(o,s,c,f,u)),(o=n[2])&&e.push(new yt(o,i,c,s,u)),(o=n[1])&&e.push(new yt(o,s,a,f,c)),(o=n[0])&&e.push(new yt(o,i,a,s,c))}return this}function ks(t){var e=[],r=[],n;for(this._root&&e.push(new yt(this._root,this._x0,this._y0,this._x1,this._y1));n=e.pop();){var o=n.node;if(o.length){var i,a=n.x0,f=n.y0,u=n.x1,s=n.y1,c=(a+u)/2,p=(f+s)/2;(i=o[0])&&e.push(new yt(i,a,f,c,p)),(i=o[1])&&e.push(new yt(i,c,f,u,p)),(i=o[2])&&e.push(new yt(i,a,p,c,s)),(i=o[3])&&e.push(new yt(i,c,p,u,s))}r.push(n)}for(;n=r.pop();)t(n.node,n.x0,n.y0,n.x1,n.y1);return this}function Ds(t){return t[0]}function Rs(t){return arguments.length?(this._x=t,this):this._x}function Os(t){return t[1]}function zs(t){return arguments.length?(this._y=t,this):this._y}function jr(t,e,r){var n=new Gi(e??Ds,r??Os,NaN,NaN,NaN,NaN);return t==null?n:n.addAll(t)}function Gi(t,e,r,n,o,i){this._x=t,this._y=e,this._x0=r,this._y0=n,this._x1=o,this._y1=i,this._root=void 0}function qs(t){for(var e={data:t.data},r=e;t=t.next;)r=r.next={data:t.data};return e}var Et=jr.prototype=Gi.prototype;Et.copy=function(){var t=new Gi(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,r,n;if(!e)return t;if(!e.length)return t._root=qs(e),t;for(r=[{source:e,target:t._root=new Array(4)}];e=r.pop();)for(var o=0;o<4;++o)(n=e.source[o])&&(n.length?r.push({source:n,target:e.target[o]=new Array(4)}):e.target[o]=qs(n));return t};Et.add=ws;Et.addAll=Ms;Et.cover=Ss;Et.data=Cs;Et.extent=Es;Et.find=Ts;Et.remove=Ls;Et.removeAll=Ps;Et.root=Ns;Et.size=Is;Et.visit=As;Et.visitAfter=ks;Et.x=Rs;Et.y=zs;var ES=Math.PI*(3-Math.sqrt(5));function Oe(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}function en(t){return t=Oe(Math.abs(t)),t?t[1]:NaN}function Bs(t,e){return function(r,n){for(var o=r.length,i=[],a=0,f=t[0],u=0;o>0&&f>0&&(u+f+1>n&&(f=Math.max(1,n-u)),i.push(r.substring(o-=f,o+f)),!((u+=f+1)>n));)f=t[a=(a+1)%t.length];return i.reverse().join(e)}}function Fs(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}var vh=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ze(t){return new Wi(t)}ze.prototype=Wi.prototype;function Wi(t){if(!(e=vh.exec(t)))throw new Error("invalid format: "+t);var e;this.fill=e[1]||" ",this.align=e[2]||">",this.sign=e[3]||"-",this.symbol=e[4]||"",this.zero=!!e[5],this.width=e[6]&&+e[6],this.comma=!!e[7],this.precision=e[8]&&+e[8].slice(1),this.trim=!!e[9],this.type=e[10]||""}Wi.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width==null?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision==null?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Hs(t){t:for(var e=t.length,r=1,n=-1,o;r<e;++r)switch(t[r]){case".":n=o=r;break;case"0":n===0&&(n=r),o=r;break;default:if(n>0){if(!+t[r])break t;n=0}break}return n>0?t.slice(0,n)+t.slice(o+1):t}var Vi;function Ys(t,e){var r=Oe(t,e);if(!r)return t+"";var n=r[0],o=r[1],i=o-(Vi=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,a=n.length;return i===a?n:i>a?n+new Array(i-a+1).join("0"):i>0?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+Oe(t,Math.max(0,e+i-1))[0]}function Xi(t,e){var r=Oe(t,e);if(!r)return t+"";var n=r[0],o=r[1];return o<0?"0."+new Array(-o).join("0")+n:n.length>o+1?n.slice(0,o+1)+"."+n.slice(o+1):n+new Array(o-n.length+2).join("0")}var $i={"%":function(t,e){return(t*100).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return Xi(t*100,e)},r:Xi,s:Ys,X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function Zi(t){return t}var Gs=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function Qi(t){var e=t.grouping&&t.thousands?Bs(t.grouping,t.thousands):Zi,r=t.currency,n=t.decimal,o=t.numerals?Fs(t.numerals):Zi,i=t.percent||"%";function a(u){u=ze(u);var s=u.fill,c=u.align,p=u.sign,l=u.symbol,d=u.zero,y=u.width,g=u.comma,x=u.precision,b=u.trim,w=u.type;w==="n"?(g=!0,w="g"):$i[w]||(x==null&&(x=12),b=!0,w="g"),(d||s==="0"&&c==="=")&&(d=!0,s="0",c="=");var C=l==="$"?r[0]:l==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",v=l==="$"?r[1]:/[%p]/.test(w)?i:"",S=$i[w],k=/[defgprs%]/.test(w);x=x==null?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function q(A){var F=C,U=v,X,rt,m;if(w==="c")U=S(A)+U,A="";else{A=+A;var M=A<0;if(A=S(Math.abs(A),x),b&&(A=Hs(A)),M&&+A==0&&(M=!1),F=(M?p==="("?p:"-":p==="-"||p==="("?"":p)+F,U=(w==="s"?Gs[8+Vi/3]:"")+U+(M&&p==="("?")":""),k){for(X=-1,rt=A.length;++X<rt;)if(m=A.charCodeAt(X),48>m||m>57){U=(m===46?n+A.slice(X+1):A.slice(X))+U,A=A.slice(0,X);break}}}
vendor: 8,438 bytes, line 4
4g&&!d&&(A=e(A,1/0));var P=F.length+A.length+U.length,I=P<y?new Array(y-P+1).join(s):"";switch(g&&d&&(A=e(I+A,I.length?y-U.length:1/0),I=""),c){case"<":A=F+A+U+I;break;case"=":A=F+I+A+U;break;case"^":A=I.slice(0,P=I.length>>1)+F+A+U+I.slice(P);break;default:A=I+F+A+U;break}return o(A)}return q.toString=function(){return u+""},q}function f(u,s){var c=a((u=ze(u),u.type="f",u)),p=Math.max(-8,Math.min(8,Math.floor(en(s)/3)))*3,l=Math.pow(10,-p),d=Gs[8+p/3];return function(y){return c(l*y)+d}}return{format:a,formatPrefix:f}}var ho,go,Ki;Ji({decimal:".",thousands:",",grouping:[3],currency:["$",""]});function Ji(t){return ho=Qi(t),go=ho.format,Ki=ho.formatPrefix,ho}function Nt(){return new yo}function yo(){this.reset()}yo.prototype={constructor:yo,reset:function(){this.s=this.t=0},add:function(t){Ws(xo,t,this.t),Ws(this,xo.s,this.s),this.s?this.t+=xo.t:this.s=xo.t},valueOf:function(){return this.s}};var xo=new yo;function Ws(t,e,r){var n=t.s=e+r,o=n-e,i=n-o;t.t=e-i+(r-o)}var $=1e-6,ji=1e-12,K=Math.PI,ct=K/2,vo=K/4,Qt=K*2,qe=180/K,Tt=K/180,et=Math.abs,Bt=Math.atan,It=Math.atan2,Y=Math.cos;var bo=Math.exp;var rn=Math.log;var H=Math.sin;var gt=Math.sqrt,nn=Math.tan;function ta(t){return t>1?0:t<-1?K:Math.acos(t)}function vt(t){return t>1?ct:t<-1?-ct:Math.asin(t)}function Ft(){}var Mh=Nt(),KC=Nt();function Ue(t){var e=t[0],r=t[1],n=Y(r);return[n*Y(e),n*H(e),H(r)]}function on(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function an(t){var e=gt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var fE=Nt();function Xs(t,e){return[et(t)>K?t+Math.round(-t/Qt)*Qt:t,e]}Xs.invert=Xs;function ea(){var t=[],e;return{point:function(r,n){e.push([r,n])},lineStart:function(){t.push(e=[])},lineEnd:Ft,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var r=t;return t=[],e=null,r}}}function ra(t,e){return et(t[0]-e[0])<$&&et(t[1]-e[1])<$}function wo(t,e,r,n){this.x=t,this.z=e,this.o=r,this.e=n,this.v=!1,this.n=this.p=null}function na(t,e,r,n,o){var i=[],a=[],f,u;if(t.forEach(function(y){if(!((g=y.length-1)<=0)){var g,x=y[0],b=y[g],w;if(ra(x,b)){for(o.lineStart(),f=0;f<g;++f)o.point((x=y[f])[0],x[1]);o.lineEnd();return}i.push(w=new wo(x,y,null,!0)),a.push(w.o=new wo(x,null,w,!1)),i.push(w=new wo(b,y,null,!1)),a.push(w.o=new wo(b,null,w,!0))}}),!!i.length){for(a.sort(e),$s(i),$s(a),f=0,u=a.length;f<u;++f)a[f].e=r=!r;for(var s=i[0],c,p;;){for(var l=s,d=!0;l.v;)if((l=l.n)===s)return;c=l.z,o.lineStart();do{if(l.v=l.o.v=!0,l.e){if(d)for(f=0,u=c.length;f<u;++f)o.point((p=c[f])[0],p[1]);else n(l.x,l.n.x,1,o);l=l.n}else{if(d)for(c=l.p.z,f=c.length-1;f>=0;--f)o.point((p=c[f])[0],p[1]);else n(l.x,l.p.x,-1,o);l=l.p}l=l.o,c=l.z,d=!d}while(!l.v);o.lineEnd()}}}function $s(t){if(e=t.length){for(var e,r=0,n=t[0],o;++r<e;)n.n=o=t[r],o.p=n,n=o;n.n=o=t[0],o.p=n}}var oa=Nt();function ia(t,e){var r=e[0],n=e[1],o=H(n),i=[H(r),-Y(r),0],a=0,f=0;oa.reset(),o===1?n=ct+$:o===-1&&(n=-ct-$);for(var u=0,s=t.length;u<s;++u)if(p=(c=t[u]).length)for(var c,p,l=c[p-1],d=l[0],y=l[1]/2+vo,g=H(y),x=Y(y),b=0;b<p;++b,d=C,g=S,x=k,l=w){var w=c[b],C=w[0],v=w[1]/2+vo,S=H(v),k=Y(v),q=C-d,A=q>=0?1:-1,F=A*q,U=F>K,X=g*S;if(oa.add(It(X*A*H(F),x*k+X*Y(F))),a+=U?q+A*Qt:q,U^d>=r^C>=r){var rt=on(Ue(l),Ue(w));an(rt);var m=on(i,rt);an(m);var M=(U^q>=0?-1:1)*vt(m[2]);(n>M||n===M&&(rt[0]||rt[1]))&&(f+=U^q>=0?1:-1)}}return(a<-$||a<$&&oa<-$)^f&1}function aa(t,e,r,n){return function(o){var i=e(o),a=ea(),f=e(a),u=!1,s,c,p,l={point:d,lineStart:g,lineEnd:x,polygonStart:function(){l.point=b,l.lineStart=w,l.lineEnd=C,c=[],s=[]},polygonEnd:function(){l.point=d,l.lineStart=g,l.lineEnd=x,c=Un(c);var v=ia(s,n);c.length?(u||(o.polygonStart(),u=!0),na(c,Th,v,r,o)):v&&(u||(o.polygonStart(),u=!0),o.lineStart(),r(null,null,1,o),o.lineEnd()),u&&(o.polygonEnd(),u=!1),c=s=null},sphere:function(){o.polygonStart(),o.lineStart(),r(null,null,1,o),o.lineEnd(),o.polygonEnd()}};function d(v,S){t(v,S)&&o.point(v,S)}function y(v,S){i.point(v,S)}function g(){l.point=y,i.lineStart()}function x(){l.point=d,i.lineEnd()}function b(v,S){p.push([v,S]),f.point(v,S)}function w(){f.lineStart(),p=[]}function C(){b(p[0][0],p[0][1]),f.lineEnd();var v=f.clean(),S=a.result(),k,q=S.length,A,F,U;if(p.pop(),s.push(p),p=null,!!q){if(v&1){if(F=S[0],(A=F.length-1)>0){for(u||(o.polygonStart(),u=!0),o.lineStart(),k=0;k<A;++k)o.point((U=F[k])[0],U[1]);o.lineEnd()}return}q>1&&v&2&&S.push(S.pop().concat(S.shift())),c.push(S.filter(Eh))}}return l}}function Eh(t){return t.length>1}function Th(t,e){return((t=t.x)[0]<0?t[1]-ct-$:ct-t[1])-((e=e.x)[0]<0?e[1]-ct-$:ct-e[1])}var Zs=aa(function(){return!0},Lh,Nh,[-K,-ct]);function Lh(t){var e=NaN,r=NaN,n=NaN,o;return{lineStart:function(){t.lineStart(),o=1},point:function(i,a){var f=i>0?K:-K,u=et(i-e);et(u-K)<$?(t.point(e,r=(r+a)/2>0?ct:-ct),t.point(n,r),t.lineEnd(),t.lineStart(),t.point(f,r),t.point(i,r),o=0):n!==f&&u>=K&&(et(e-n)<$&&(e-=n*$),et(i-f)<$&&(i-=f*$),r=Ph(e,r,i,a),t.point(n,r),t.lineEnd(),t.lineStart(),t.point(f,r),o=0),t.point(e=i,r=a),n=f},lineEnd:function(){t.lineEnd(),e=r=NaN},clean:function(){return 2-o}}}function Ph(t,e,r,n){var o,i,a=H(t-r);return et(a)>$?Bt((H(e)*(i=Y(n))*H(r)-H(n)*(o=Y(e))*H(t))/(o*i*a)):(e+n)/2}function Nh(t,e,r,n){var o;if(t==null)o=r*ct,n.point(-K,o),n.point(0,o),n.point(K,o),n.point(K,0),n.point(K,-o),n.point(0,-o),n.point(-K,-o),n.point(-K,0),n.point(-K,o);else if(et(t[0]-e[0])>$){var i=t[0]<e[0]?K:-K;o=r*i/2,n.point(-i,o),n.point(0,o),n.point(i,o)}else n.point(e[0],e[1])}var Ih=1e9,aT=-Ih;var mT=Nt();var kT=Nt(),DT=Nt();var Dh=1/0;var zT=-Dh;function ua(t){this._context=t}ua.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:{this._context.moveTo(t,e),this._point=1;break}case 1:{this._context.lineTo(t,e);break}default:{this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Qt);break}}},result:Ft};var XT=Nt();function sa(){this._string=[]}sa.prototype={_radius:4.5,_circle:Qs(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:{this._string.push("M",t,",",e),this._point=1;break}case 1:{this._string.push("L",t,",",e);break}default:{this._circle==null&&(this._circle=Qs(this._radius)),this._string.push("M",t,",",e,this._circle);break}}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}else return null}};function Qs(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function _o(t){return function(e){var r=new ca;for(var n in t)r[n]=t[n];return r.stream=e,r}}function ca(){}ca.prototype={constructor:ca,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var hL=Y(30*Tt);var LL=_o({point:function(t,e){this.stream.point(t*Tt,e*Tt)}});function Mo(t){return function(e,r){var n=Y(e),o=Y(r),i=t(n*o);return[i*o*H(e),i*H(r)]}}function Kt(t){return function(e,r){var n=gt(e*e+r*r),o=t(n),i=H(o),a=Y(o);return[It(e*i,n*a),vt(n&&r*i/n)]}}var ic=Mo(function(t){return gt(2/(1+t))});ic.invert=Kt(function(t){return 2*vt(t/2)});var ac=Mo(function(t){return(t=ta(t))&&t/H(t)});ac.invert=Kt(function(t){return t});function la(t,e){return[t,rn(nn((ct+e)/2))]}la.invert=function(t,e){return[t,2*Bt(bo(e))-ct]};function So(t,e){return[t,e]}So.invert=So;var fn=1.340264,un=-.081106,sn=893e-6,cn=.003796,Co=gt(3)/2,Bh=12;function fc(t,e){var r=vt(Co*H(e)),n=r*r,o=n*n*n;return[t*Y(r)/(Co*(fn+3*un*n+o*(7*sn+9*cn*n))),r*(fn+un*n+o*(sn+cn*n))]}fc.invert=function(t,e){for(var r=e,n=r*r,o=n*n*n,i=0,a,f,u;i<Bh&&(f=r*(fn+un*n+o*(sn+cn*n))-e,u=fn+3*un*n+o*(7*sn+9*cn*n),r-=a=f/u,n=r*r,o=n*n*n,!(et(a)<ji));++i);return[Co*t*(fn+3*un*n+o*(7*sn+9*cn*n))/Y(r),vt(H(r)/Co)]};function uc(t,e){var r=Y(e),n=Y(t)*r;return[r*H(t)/n,H(e)/n]}uc.invert=Kt(Bt);function sc(t,e){var r=e*e,n=r*r;
4return[t*(.8707-.131979*r+n*(-.013791+n*(.003971*r-.001529*n))),e*(1.007226+r*(.015085+n*(-.044475+.028874*r-.005916*n)))]}sc.invert=function(t,e){var r=e,n=25,o;do{var i=r*r,a=i*i;r-=o=(r*(1.007226+i*(.015085+a*(-.044475+.028874*i-.005916*a)))-e)/(1.007226+i*(.015085*3+a*(-.044475*7+.028874*9*i-.005916*11*a)))}while(et(o)>$&&--n>0);return[t/(.8707+(i=r*r)*(-.131979+i*(-.013791+i*i*i*(.003971-.001529*i)))),r]};function cc(t,e){return[Y(e)*H(t),H(e)]}cc.invert=Kt(vt);function lc(t,e){var r=Y(e),n=1+Y(t)*r;return[r*H(t)/n,H(e)/n]}lc.invert=Kt(function(t){return 2*Bt(t)});function pc(t,e){return[rn(nn((ct+e)/2)),-t]}pc.invert=function(t,e){return[-e,2*Bt(bo(t))-ct]};function Fh(t){var e=0,r=t.children,n=r&&r.length;if(!n)e=1;else for(;--n>=0;)e+=r[n].value;t.value=e}function dc(){return this.eachAfter(Fh)}function mc(t){var e=this,r,n=[e],o,i,a;do for(r=n.reverse(),n=[];e=r.pop();)if(t(e),o=e.children,o)for(i=0,a=o.length;i<a;++i)n.push(o[i]);while(n.length);return this}function hc(t){for(var e=this,r=[e],n,o;e=r.pop();)if(t(e),n=e.children,n)for(o=n.length-1;o>=0;--o)r.push(n[o]);return this}function gc(t){for(var e=this,r=[e],n=[],o,i,a;e=r.pop();)if(n.push(e),o=e.children,o)for(i=0,a=o.length;i<a;++i)r.push(o[i]);for(;e=n.pop();)t(e);return this}function xc(t){return this.eachAfter(function(e){for(var r=+t(e.data)||0,n=e.children,o=n&&n.length;--o>=0;)r+=n[o].value;e.value=r})}function yc(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function vc(t){for(var e=this,r=Hh(e,t),n=[e];e!==r;)e=e.parent,n.push(e);for(var o=n.length;t!==r;)n.splice(o,0,t),t=t.parent;return n}function Hh(t,e){if(t===e)return t;var r=t.ancestors(),n=e.ancestors(),o=null;for(t=r.pop(),e=n.pop();t===e;)o=t,t=r.pop(),e=n.pop();return o}function bc(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function wc(){var t=[];return this.each(function(e){t.push(e)}),t}function _c(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function Mc(){var t=this,e=[];return t.each(function(r){r!==t&&e.push({source:r.parent,target:r})}),e}function Eo(t,e){var r=new Be(t),n=+t.value&&(r.value=t.value),o,i=[r],a,f,u,s;for(e==null&&(e=Gh);o=i.pop();)if(n&&(o.value=+o.data.value),(f=e(o.data))&&(s=f.length))for(o.children=new Array(s),u=s-1;u>=0;--u)i.push(a=o.children[u]=new Be(f[u])),a.parent=o,a.depth=o.depth+1;return r.eachBefore(Sc)}function Yh(){return Eo(this).eachBefore(Wh)}function Gh(t){return t.children}function Wh(t){t.data=t.data.data}function Sc(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function Be(t){this.data=t,this.depth=this.height=0,this.parent=null}Be.prototype=Eo.prototype={constructor:Be,count:dc,each:mc,eachAfter:gc,eachBefore:hc,sum:xc,sort:yc,path:vc,ancestors:bc,descendants:wc,leaves:_c,links:Mc,copy:Yh};var Vh=Array.prototype.slice;function Fe(t,e,r,n,o){for(var i=t.children,a,f=-1,u=i.length,s=t.value&&(n-e)/t.value;++f<u;)a=i[f],a.y0=r,a.y1=o,a.x0=e,a.x1=e+=a.value*s}function Jh(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}Jh.prototype=Object.create(Be.prototype);function hr(t,e,r,n,o){for(var i=t.children,a,f=-1,u=i.length,s=t.value&&(o-r)/t.value;++f<u;)a=i[f],a.x0=e,a.x1=n,a.y0=r,a.y1=r+=a.value*s}var pa=(1+Math.sqrt(5))/2;function da(t,e,r,n,o,i){for(var a=[],f=e.children,u,s,c=0,p=0,l=f.length,d,y,g=e.value,x,b,w,C,v,S,k;c<l;){d=o-r,y=i-n;do x=f[p++].value;while(!x&&p<l);for(b=w=x,S=Math.max(y/d,d/y)/(g*t),k=x*x*S,v=Math.max(w/k,k/b);p<l;++p){if(x+=s=f[p].value,s<b&&(b=s),s>w&&(w=s),k=x*x*S,C=Math.max(w/k,k/b),C>v){x-=s;break}v=C}a.push(u={value:x,dice:d<y,children:f.slice(c,p)}),u.dice?Fe(u,r,n,o,g?n+=y*x/g:i):hr(u,r,n,g?r+=d*x/g:o,i),g-=x,c=p}return a}var Cc=function t(e){function r(n,o,i,a,f){da(e,n,o,i,a,f)}return r.ratio=function(n){return t((n=+n)>1?n:1)},r}(pa);var jh=function t(e){function r(n,o,i,a,f){if((u=n._squarify)&&u.ratio===e)for(var u,s,c,p,l=-1,d,y=u.length,g=n.value;++l<y;){for(s=u[l],c=s.children,p=s.value=0,d=c.length;p<d;++p)s.value+=c[p].value;s.dice?Fe(s,o,i,a,i+=(f-i)*s.value/g):hr(s,o,i,o+=(a-o)*s.value/g,f),g-=s.value}else n._squarify=u=da(e,n,o,i,a,f),u.ratio=e}return r.ratio=function(n){return t((n=+n)>1?n:1)},r}(pa);function qt(){return Math.random()}var t0=function t(e){function r(n,o){return n=n==null?0:+n,o=o==null?1:+o,arguments.length===1?(o=n,n=0):o-=n,function(){return e()*o+n}}return r.source=t,r}(qt);var ma=function t(e){function r(n,o){var i,a;return n=n==null?0:+n,o=o==null?1:+o,function(){var f;if(i!=null)f=i,i=null;else do i=e()*2-1,f=e()*2-1,a=i*i+f*f;while(!a||a>1);return n+o*f*Math.sqrt(-2*Math.log(a)/a)}}return r.source=t,r}(qt);var e0=function t(e){function r(){var n=ma.source(e).apply(this,arguments);return function(){return Math.exp(n())}}return r.source=t,r}(qt);var ha=function t(e){function r(n){return function(){for(var o=0,i=0;i<n;++i)o+=e();return o}}return r.source=t,r}(qt);var r0=function t(e){function r(n){var o=ha.source(e)(n);return function(){return o()/n}}return r.source=t,r}(qt);var n0=function t(e){function r(n){return function(){return-Math.log(1-e()
4)/n}}return r.source=t,r}(qt);var Ec=Array.prototype,ga=Ec.map,ln=Ec.slice;var xa=new Date,ya=new Date;function Z(t,e,r,n){function o(i){return t(i=new Date(+i)),i}return o.floor=o,o.ceil=function(i){return t(i=new Date(i-1)),e(i,1),t(i),i},o.round=function(i){var a=o(i),f=o.ceil(i);return i-a<f-i?a:f},o.offset=function(i,a){return e(i=new Date(+i),a==null?1:Math.floor(a)),i},o.range=function(i,a,f){var u=[],s;if(i=o.ceil(i),f=f==null?1:Math.floor(f),!(i<a)||!(f>0))return u;do u.push(s=new Date(+i)),e(i,f),t(i);while(s<i&&i<a);return u},o.filter=function(i){return Z(function(a){if(a>=a)for(;t(a),!i(a);)a.setTime(a-1)},function(a,f){if(a>=a)if(f<0)for(;++f<=0;)for(;e(a,-1),!i(a););else for(;--f>=0;)for(;e(a,1),!i(a););})},r&&(o.count=function(i,a){return xa.setTime(+i),ya.setTime(+a),t(xa),t(ya),Math.floor(r(xa,ya))},o.every=function(i){return i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?o.filter(n?function(a){return n(a)%i===0}:function(a){return o.count(0,a)%i===0}):o}),o}var va=Z(function(){},function(t,e){t.setTime(+t+e)},function(t,e){return e-t});va.every=function(t){return t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Z(function(e){e.setTime(Math.floor(e/t)*t)},function(e,r){e.setTime(+e+r*t)},function(e,r){return(r-e)/t}):va};var Lc=va.range;var mn=1e3,At=6e4,jt=36e5,Lo=864e5,Po=6048e5;var s0=Z(function(t){t.setTime(Math.floor(t/mn)*mn)},function(t,e){t.setTime(+t+e*mn)},function(t,e){return(e-t)/mn},function(t){return t.getUTCSeconds()});var Pc=s0.range;var c0=Z(function(t){t.setTime(Math.floor(t/At)*At)},function(t,e){t.setTime(+t+e*At)},function(t,e){return(e-t)/At},function(t){return t.getMinutes()});var l0=c0.range;var p0=Z(function(t){var e=t.getTimezoneOffset()*At%jt;e<0&&(e+=jt),t.setTime(Math.floor((+t-e)/jt)*jt+e)},function(t,e){t.setTime(+t+e*jt)},function(t,e){return(e-t)/jt},function(t){return t.getHours()});var d0=p0.range;var Nc=Z(function(t){t.setHours(0,0,0,0)},function(t,e){t.setDate(t.getDate()+e)},function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*At)/Lo},function(t){return t.getDate()-1}),hn=Nc,m0=Nc.range;function He(t){return Z(function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},function(e,r){e.setDate(e.getDate()+r*7)},function(e,r){return(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*At)/Po})}var gr=He(0),xr=He(1),Ic=He(2),Ac=He(3),yr=He(4),kc=He(5),Dc=He(6),Rc=gr.range,h0=xr.range,g0=Ic.range,x0=Ac.range,y0=yr.range,v0=kc.range,b0=Dc.range;var w0=Z(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,e){t.setMonth(t.getMonth()+e)},function(t,e){return e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12},function(t){return t.getMonth()});var _0=w0.range;var ba=Z(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t,e){return e.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});ba.every=function(t){return!isFinite(t=Math.floor(t))||!(t>0)?null:Z(function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,r){e.setFullYear(e.getFullYear()+r*t)})};var _e=ba,M0=ba.range;var S0=Z(function(t){t.setUTCSeconds(0,0)},function(t,e){t.setTime(+t+e*At)},function(t,e){return(e-t)/At},function(t){return t.getUTCMinutes()});var C0=S0.range;var E0=Z(function(t){t.setUTCMinutes(0,0,0)},function(t,e){t.setTime(+t+e*jt)},function(t,e){return(e-t)/jt},function(t){return t.getUTCHours()});var T0=E0.range;var Oc=Z(function(t){t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+e)},function(t,e){return(e-t)/Lo},function(t){return t.getUTCDate()-1}),gn=Oc,L0=Oc.range;function Ye(t){return Z(function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},function(e,r){e.setUTCDate(e.getUTCDate()+r*7)},function(e,r){return(r-e)/Po})}var vr=Ye(0),br=Ye(1),zc=Ye(2),qc=Ye(3),wr=Ye(4),Uc=Ye(5),Bc=Ye(6),Fc=vr.range,P0=br.range,N0=zc.range,I0=qc.range,A0=wr.range,k0=Uc.range,D0=Bc.range;var R0=Z(function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCMonth(t.getUTCMonth()+e)},function(t,e){return e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12},function(t){return t.getUTCMonth()});var O0=R0.range;var wa=Z(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)},function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});wa.every=function(t){return!isFinite(t=Math.floor(t))||!(t>0)?null:Z(function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,r){e.setUTCFullYear(e.getUTCFullYear()+r*t)})};var Me=wa,z0=wa.range;function G0(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function No(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function xn(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}function Io(t){var e=t.dateTime,r=t.date,n=t.time,o=t.periods,i=t.days,a=t.shortDays,f=t.months,u=t.shortMonths,s=yn(o),c=vn(o),p=yn(i),l=vn(i),d=yn(a),y=vn(a),g=yn(f),x=vn(f),b=yn(u),w=vn(u),C={a:E,A:W,b:V,B:nt,c:null,d:Wc,e:Wc,f:mg,H:lg,I:pg,j:dg,L:Qc,m:hg,M:gg,p:dt,Q:$c,s:Zc,S:xg,u:yg,U:vg,V:bg,w:wg,W
vendor: 7,232 bytes, line 4
4:_g,x:null,X:null,y:Mg,Y:Sg,Z:Cg,"%":Xc},v={a:Pt,A:B,b:ot,B:tt,c:null,d:Vc,e:Vc,f:Pg,H:Eg,I:Tg,j:Lg,L:Kc,m:Ng,M:Ig,p:ut,Q:$c,s:Zc,S:Ag,u:kg,U:Dg,V:Rg,w:Og,W:zg,x:null,X:null,y:qg,Y:Ug,Z:Bg,"%":Xc},S={a:U,A:X,b:rt,B:m,c:M,d:Yc,e:Yc,f:fg,H:Gc,I:Gc,j:ng,L:ag,m:rg,M:og,p:F,Q:sg,s:cg,S:ig,u:Z0,U:Q0,V:K0,w:$0,W:J0,x:P,X:I,y:tg,Y:j0,Z:eg,"%":ug};C.x=k(r,C),C.X=k(n,C),C.c=k(e,C),v.x=k(r,v),v.X=k(n,v),v.c=k(e,v);function k(L,z){return function(R){var _=[],lt=-1,Q=0,kt=L.length,Dt,Se,Fa;for(R instanceof Date||(R=new Date(+R));++lt<kt;)L.charCodeAt(lt)===37&&(_.push(L.slice(Q,lt)),(Se=Hc[Dt=L.charAt(++lt)])!=null?Dt=L.charAt(++lt):Se=Dt==="e"?" ":"0",(Fa=z[Dt])&&(Dt=Fa(R,Se)),_.push(Dt),Q=lt+1);return _.push(L.slice(Q,lt)),_.join("")}}function q(L,z){return function(R){var _=xn(1900),lt=A(_,L,R+="",0),Q,kt;if(lt!=R.length)return null;if("Q"in _)return new Date(_.Q);if("p"in _&&(_.H=_.H%12+_.p*12),"V"in _){if(_.V<1||_.V>53)return null;"w"in _||(_.w=1),"Z"in _?(Q=No(xn(_.y)),kt=Q.getUTCDay(),Q=kt>4||kt===0?br.ceil(Q):br(Q),Q=gn.offset(Q,(_.V-1)*7),_.y=Q.getUTCFullYear(),_.m=Q.getUTCMonth(),_.d=Q.getUTCDate()+(_.w+6)%7):(Q=z(xn(_.y)),kt=Q.getDay(),Q=kt>4||kt===0?xr.ceil(Q):xr(Q),Q=hn.offset(Q,(_.V-1)*7),_.y=Q.getFullYear(),_.m=Q.getMonth(),_.d=Q.getDate()+(_.w+6)%7)}else("W"in _||"U"in _)&&("w"in _||(_.w="u"in _?_.u%7:"W"in _?1:0),kt="Z"in _?No(xn(_.y)).getUTCDay():z(xn(_.y)).getDay(),_.m=0,_.d="W"in _?(_.w+6)%7+_.W*7-(kt+5)%7:_.w+_.U*7-(kt+6)%7);return"Z"in _?(_.H+=_.Z/100|0,_.M+=_.Z%100,No(_)):z(_)}}function A(L,z,R,_){for(var lt=0,Q=z.length,kt=R.length,Dt,Se;lt<Q;){if(_>=kt)return-1;if(Dt=z.charCodeAt(lt++),Dt===37){if(Dt=z.charAt(lt++),Se=S[Dt in Hc?z.charAt(lt++):Dt],!Se||(_=Se(L,R,_))<0)return-1}else if(Dt!=R.charCodeAt(_++))return-1}return _}function F(L,z,R){var _=s.exec(z.slice(R));return _?(L.p=c[_[0].toLowerCase()],R+_[0].length):-1}function U(L,z,R){var _=d.exec(z.slice(R));return _?(L.w=y[_[0].toLowerCase()],R+_[0].length):-1}function X(L,z,R){var _=p.exec(z.slice(R));return _?(L.w=l[_[0].toLowerCase()],R+_[0].length):-1}function rt(L,z,R){var _=b.exec(z.slice(R));return _?(L.m=w[_[0].toLowerCase()],R+_[0].length):-1}function m(L,z,R){var _=g.exec(z.slice(R));return _?(L.m=x[_[0].toLowerCase()],R+_[0].length):-1}function M(L,z,R){return A(L,e,z,R)}function P(L,z,R){return A(L,r,z,R)}function I(L,z,R){return A(L,n,z,R)}function E(L){return a[L.getDay()]}function W(L){return i[L.getDay()]}function V(L){return u[L.getMonth()]}function nt(L){return f[L.getMonth()]}function dt(L){return o[+(L.getHours()>=12)]}function Pt(L){return a[L.getUTCDay()]}function B(L){return i[L.getUTCDay()]}function ot(L){return u[L.getUTCMonth()]}function tt(L){return f[L.getUTCMonth()]}function ut(L){return o[+(L.getUTCHours()>=12)]}return{format:function(L){var z=k(L+="",C);return z.toString=function(){return L},z},parse:function(L){var z=q(L+="",G0);return z.toString=function(){return L},z},utcFormat:function(L){var z=k(L+="",v);return z.toString=function(){return L},z},utcParse:function(L){var z=q(L,No);return z.toString=function(){return L},z}}}var Hc={"-":"",_:" ",0:"0"},_t=/^\s*\d+/,W0=/^%/,V0=/[\\^$*+?|[\]().{}]/g;function J(t,e,r){var n=t<0?"-":"",o=(n?-t:t)+"",i=o.length;return n+(i<r?new Array(r-i+1).join(e)+o:o)}function X0(t){return t.replace(V0,"\\$&")}function yn(t){return new RegExp("^(?:"+t.map(X0).join("|")+")","i")}function vn(t){for(var e={},r=-1,n=t.length;++r<n;)e[t[r].toLowerCase()]=r;return e}function $0(t,e,r){var n=_t.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function Z0(t,e,r){var n=_t.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function Q0(t,e,r){var n=_t.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function K0(t,e,r){var n=_t.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function J0(t,e,r){var n=_t.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function j0(t,e,r){var n=_t.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function tg(t,e,r){var n=_t.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function eg(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function rg(t,e,r){var n=_t.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function Yc(t,e,r){var n=_t.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function ng(t,e,r){var n=_t.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function Gc(t,e,r){var n=_t.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function og(t,e,r){var n=_t.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function ig(t,e,r){var n=_t.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function ag(t,e,r){var n=_t.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function fg(t,e,r){var n=_t.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function ug(t,e,r){var n=W0.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function sg(t,e,r){var n=_t.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function cg(t,e,r){var n=_t.exec(e.slice(r));return n?(t.Q=+n[0]*1e3,r+n[0].length):-1}function Wc(t,e){return J(t.getDate(),e,2)}function lg(t,e){return J(t.getHours(),e,2)}function pg(t,e){return J(t.getHours()%12||12,e,2)}function dg(t,e){return J(1+hn.count(_e(t),t),e,3)}function Qc(t,e){return J(t.getMilliseconds(),e,3)}function mg(t,e){return Qc(t,e)+"000"}function hg(t,e){return J(t.getMonth()+1,e,2)}function gg(t,e){return J(t.getMinutes(),e,2)}function xg(t,e){return J(t.getSeconds(),e,2)}function yg(t){var e=t.getDay();return e===0?7:e}function vg(t,e){return J(gr.count(_e(t),t),e,2)}function bg(t,e){var r=t.getDay();return t=r>=4||r===0?yr(t):yr.ceil(t),J(yr.count(_e(t),t)+(_e(t).getDay()===4),e,2)}function wg(t){return t.getDay()}function _g(t,e){return J(xr.count(_e(t),t),e,2)}function Mg(t,e){return J(t.getFullYear()%100,e,2)}function Sg(t,e){return J(t.getFullYear()%1e4,e,4)}function Cg(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+J(e/60|0,"0",2)+J(e%60,"0",2)}function Vc(t,e){return J(t.getUTCDate(),e,2)}function Eg(t,e){return J(t.getUTCHours(),e,2)}function Tg(t,e){return J(t.getUTCHours()%12||12,e,2)}function Lg(t,e){return J(1+gn.count(Me(t),t),e,3)}function Kc(t,e){return J(t.getUTCMilliseconds(),e,3)}function Pg(t,e){return Kc(t,e)+"000"}function Ng(t,e){return J(t.getUTCMonth()+1,e,2)}function Ig(t,e){return J(t.getUTCMinutes(),e,2)}function Ag(t,e){return J(t.getUTCSeconds(),e,2)}function kg(t){var e=t.getUTCDay();return e===0?7:e}function Dg(t,e){return J(vr.count(Me(t),t),e,2)}function Rg(t,e){var r=t.getUTCDay();return t=r>=4||r===0?wr(t):wr.ceil(t),J(wr.count(Me(t),t)+(Me(t).getUTCDay()===4),e,2)}function Og(t){return t.getUTCDay()}function zg(t,e){return J(br.count(Me(t),t),e,2)}function qg(t,e){return J(t.getUTCFullYear()%100,e,2)}function Ug(t,e){return J(t.getUTCFullYear()%1e4,e,4)}function Bg(){return"+0000"}function Xc(){return"%"}function $c(t){return+t}function Zc(t){return Math.floor(+t/1e3)}var _r,Sa,Jc,bn,Ao;Ca({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
4ay","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Ca(t){return _r=Io(t),Sa=_r.format,Jc=_r.parse,bn=_r.utcFormat,Ao=_r.utcParse,_r}var Ea="%Y-%m-%dT%H:%M:%S.%LZ";function Fg(t){return t.toISOString()}var kR=Date.prototype.toISOString?Fg:bn(Ea);function Hg(t){var e=new Date(t);return isNaN(e)?null:e}var zR=+new Date("2000-01-01T00:00:00.000Z")?Hg:Ao(Ea);var Yg=1e3,Gg=Yg*60,Wg=Gg*60,Ta=Wg*24,jR=Ta*7,tO=Ta*30,eO=Ta*365;function T(t){for(var e=t.length/6|0,r=new Array(e),n=0;n<e;)r[n]="#"+t.slice(n*6,++n*6);return r}var Zg=T("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf");var Qg=T("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666");var Kg=T("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666");var Jg=T("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");var jg=T("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2");var t1=T("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc");var e1=T("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999");var r1=T("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3");var n1=T("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f");function O(t){return gi(t[t.length-1])}var tl=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(T),o1=O(tl);var el=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(T),i1=O(el);var rl=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(T),a1=O(rl);var nl=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(T),f1=O(nl);var ol=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(T),u1=O(ol);var il=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(T),s1=O(il);var al=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(T),c1=O(al);var fl=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d
47191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(T),l1=O(fl);var ul=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(T),p1=O(ul);var sl=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(T),d1=O(sl);var cl=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(T),m1=O(cl);var ll=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(T),h1=O(ll);var pl=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(T),g1=O(pl);var dl=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(T),x1=O(dl);var ml=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(T),y1=O(ml);var hl=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(T),v1=O(hl);var gl=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(T),b1=O(gl);var xl=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(T),w1=O(xl);var yl=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(T),_1=O(yl);var vl=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(T),M1=O(vl);var bl=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(T),S1=O(bl);var wl=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ec
4ae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(T),C1=O(wl);var _l=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(T),E1=O(_l);var Ml=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(T),T1=O(Ml);var Sl=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(T),L1=O(Sl);var Cl=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(T),P1=O(Cl);var El=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(T),N1=O(El);var I1=fr(St(300,.5,0),St(-240,.5,1));var A1=fr(St(-100,.75,.35),St(80,1.5,.8)),k1=fr(St(260,.75,.35),St(80,1.5,.8)),gU=St();var vU=ve(),bU=Math.PI/3,wU=Math.PI*2/3;function ko(t){var e=t.length;return function(r){return t[Math.max(0,Math.min(e-1,Math.floor(r*e)))]}}var D1=ko(T("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),R1=ko(T("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb8
41febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),O1=ko(T("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),z1=ko(T("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function La(){this._=null}function Mr(t){t.U=t.C=t.L=t.R=t.P=t.N=null}La.prototype={constructor:La,insert:function(t,e){var r,n,o;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;r=t}else this._?(t=Tl(this._),e.P=null,e.N=t,t.P=t.L=e,r=t):(e.P=e.N=null,this._=e,r=null);for(e.L=e.R=null,e.U=r,e.C=!0,t=e;r&&r.C;)n=r.U,r===n.L?(o=n.R,o&&o.C?(r.C=o.C=!1,n.C=!0,t=n):(t===r.R&&(wn(this,r),t=r,r=t.U),r.C=!1,n.C=!0,_n(this,n))):(o=n.L,o&&o.C?(r.C=o.C=!1,n.C=!0,t=n):(t===r.L&&(_n(this,r),t=r,r=t.U),r.C=!1,n.C=!0,wn(this,n))),r=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e=t.U,r,n=t.L,o=t.R,i,a;if(n?o?i=Tl(o):i=n:i=o,e?e.L===t?e.L=i:e.R=i:this._=i,n&&o?(a=i.C,i.C=t.C,i.L=n,n.U=i,i!==o?(e=i.U,i.U=t.U,t=i.R,e.L=t,i.R=o,o.U=i):(i.U=e,e=i,t=i.R)):(a=t.C,t=i),t&&(t.U=e),!a){if(t&&t.C){t.C=!1;return}do{if(t===this._)break;
4if(t===e.L){if(r=e.R,r.C&&(r.C=!1,e.C=!0,wn(this,e),r=e.R),r.L&&r.L.C||r.R&&r.R.C){(!r.R||!r.R.C)&&(r.L.C=!1,r.C=!0,_n(this,r),r=e.R),r.C=e.C,e.C=r.R.C=!1,wn(this,e),t=this._;break}}else if(r=e.L,r.C&&(r.C=!1,e.C=!0,_n(this,e),r=e.L),r.L&&r.L.C||r.R&&r.R.C){(!r.L||!r.L.C)&&(r.R.C=!1,r.C=!0,wn(this,r),r=e.L),r.C=e.C,e.C=r.L.C=!1,_n(this,e),t=this._;break}r.C=!0,t=e,e=e.U}while(!t.C);t&&(t.C=!1)}}};function wn(t,e){var r=e,n=e.R,o=r.U;o?o.L===r?o.L=n:o.R=n:t._=n,n.U=o,r.U=n,r.R=n.L,r.R&&(r.R.U=r),n.L=r}function _n(t,e){var r=e,n=e.L,o=r.U;o?o.L===r?o.L=n:o.R=n:t._=n,n.U=o,r.U=n,r.L=n.R,r.L&&(r.L.U=r),n.R=r}function Tl(t){for(;t.L;)t=t.L;return t}var Pa=La;function Sr(t,e,r,n){var o=[null,null],i=bt.push(o)-1;return o.left=t,o.right=e,r&&Mn(o,t,e,r),n&&Mn(o,e,t,n),Lt[t.index].halfedges.push(i),Lt[e.index].halfedges.push(i),o}function Cr(t,e,r){var n=[e,r];return n.left=t,n}function Mn(t,e,r,n){!t[0]&&!t[1]?(t[0]=n,t.left=e,t.right=r):t.left===r?t[1]=n:t[0]=n}function q1(t,e,r,n,o){var i=t[0],a=t[1],f=i[0],u=i[1],s=a[0],c=a[1],p=0,l=1,d=s-f,y=c-u,g;if(g=e-f,!(!d&&g>
40)){if(g/=d,d<0){if(g<p)return;g<l&&(l=g)}else if(d>0){if(g>l)return;g>p&&(p=g)}if(g=n-f,!(!d&&g<0)){if(g/=d,d<0){if(g>l)return;g>p&&(p=g)}else if(d>0){if(g<p)return;g<l&&(l=g)}if(g=r-u,!(!y&&g>0)){if(g/=y,y<0){if(g<p)return;g<l&&(l=g)}else if(y>0){if(g>l)return;g>p&&(p=g)}if(g=o-u,!(!y&&g<0)){if(g/=y,y<0){if(g>l)return;g>p&&(p=g)}else if(y>0){if(g<p)return;g<l&&(l=g)}return!(p>0)&&!(l<1)||(p>0&&(t[0]=[f+p*d,u+p*y]),l<1&&(t[1]=[f+l*d,u+l*y])),!0}}}}}function U1(t,e,r,n,o){var i=t[1];if(i)return!0;var a=t[0],f=t.left,u=t.right,s=f[0],c=f[1],p=u[0],l=u[1],d=(s+p)/2,y=(c+l)/2,g,x;if(l===c){if(d<e||d>=n)return;if(s>p){if(!a)a=[d,r];else if(a[1]>=o)return;i=[d,o]}else{if(!a)a=[d,o];else if(a[1]<r)return;i=[d,r]}}else if(g=(s-p)/(l-c),x=y-g*d,g<-1||g>1)if(s>p){if(!a)a=[(r-x)/g,r];else if(a[1]>=o)return;i=[(o-x)/g,o]}else{if(!a)a=[(o-x)/g,o];else if(a[1]<r)return;i=[(r-x)/g,r]}else if(c<l){if(!a)a=[e,g*e+x];else if(a[0]>=n)return;i=[n,g*n+x]}else{if(!a)a=[n,g*n+x];else if(a[0]<e)return;i=[e,g*e+x]}return t[0]=a,t[1]=i,!0}function Ll(t,e,r,n){for(var o=bt.length,i;o--;)(!U1(i=bt[o],t,e,r,n)||!q1(i,t,e,r,n)||!(Math.abs(i[0][0]-i[1][0])>j||Math.abs(i[0][1]-i[1][1])>j))&&delete bt[o]}function Pl(t){return Lt[t.index]={site:t,halfedges:[]}}function B1(t,e){var r=t.site,n=e.left,o=e.right;return r===o&&(o=n,n=r),o?Math.atan2(o[1]-n[1],o[0]-n[0]):(r===n?(n=e[1],o=e[0]):(n=e[0],o=e[1]),Math.atan2(n[0]-o[0],o[1]-n[1]))}function Na(t,e){return e[+(e.left!==t.site)]}function F1(t,e){return e[+(e.left===t.site)]}function Nl(){for(var t=0,e=Lt.length,r,n,o,i;t<e;++t)if((r=Lt[t])&&(i=(n=r.halfedges).length)){var a=new Array(i),f=new Array(i);for(o=0;o<i;++o)a[o]=o,f[o]=B1(r,bt[n[o]]);for(a.sort(function(u,s){return f[s]-f[u]}),o=0;o<i;++o)f[o]=n[a[o]];for(o=0;o<i;++o)n[o]=f[o]}}function Il(t,e,r,n){var o=Lt.length,i,a,f,u,s,c,p,l,d,y,g,x,b=!0;for(i=0;i<o;++i)if(a=Lt[i]){for(f=a.site,s=a.halfedges,u=s.length;u--;)bt[s[u]]||s.splice(u,1);for(u=0,c=s.length;u<c;)y=F1(a,bt[s[u]]),g=y[0],x=y[1],p=Na(a,bt[s[++u%c]]),l=p[0],d=p[1],(Math.abs(g-l)>j||Math.abs(x-d)>j)&&(s.splice(u,0,bt.push(Cr(f,y,Math.abs(g-t)<j&&n-x>j?[t,Math.abs(l-t)<j?d:n]:Math.abs(x-n)<j&&r-g>j?[Math.abs(d-n)<j?l:r,n]:Math.abs(g-r)<j&&x-e>j?[r,Math.abs(l-r)<j?d:e]:Math.abs(x-e)<j&&g-t>j?[Math.abs(d-e)<j?l:t,e]:null))-1),++c);c&&(b=!1)}if(b){var w,C,v,S=1/0;for(i=0,b=null;i<o;++i)(a=Lt[i])&&(f=a.site,w=f[0]-t,C=f[1]-e,v=w*w+C*C,v<S&&(S=v,b=a));if(b){var k=[t,e],q=[t,n],A=[r,n],F=[r,e];b.halfedges.push(bt.push(Cr(f=b.site,k,q))-1,bt.push(Cr(f,q,A))-1,bt.push(Cr(f,A,F))-1,bt.push(Cr(f,F,k))-1)}}for(i=0;i<o;++i)(a=Lt[i])&&(a.halfedges.length||delete Lt[i])}var Al=[],Do;function H1(){Mr(this),this.x=this.y=this.arc=this.site=this.cy=null}function Ge(t){var e=t.P,r=t.N;if(!(!e||!r)){var n=e.site,o=t.site,i=r.site;if(n!==i){var a=o[0],f=o[1],u=n[0]-a,s=n[1]-f,c=i[0]-a,p=i[1]-f,l=2*(u*p-s*c);if(!(l>=-kl)){var d=u*u+s*s,y=c*c+p*p,g=(p*d-s*y)/l,x=(u*y-c*d)/l,b=Al.pop()||new H1;b.arc=t,b.site=o,b.x=g+a,b.y=(b.cy=x+f)+Math.sqrt(g*g+x*x),t.circle=b;for(var w=null,C=Er._;C;)if(b.y<C.y||b.y===C.y&&b.x<=C.x)if(C.L)C=C.L;else{w=C.P;break}else if(C.R)C=C.R;else{w=C;break}Er.insert(w,b),w||(Do=b)}}}}function We(t){var e=t.circle;e&&(e.P||(Do=e.N),Er.remove(e),Al.push(e),Mr(e),t.circle=null)}var Rl=[];function Y1(){Mr(this),this.edge=this.site=this.circle=null}function Dl(t){var e=Rl.pop()||new Y1;return e.site=t,e}function Ia(t){We(t),Ve.remove(t),Rl.push(t),Mr(t)}function Ol(t){var e=t.circle,r=e.x,n=e.cy,o=[r,n],i=t.P,a=t.N,f=[t];Ia(t);for(var u=i;u.circle&&Math.abs(r-u.circle.x)<j&&Math.abs(n-u.circle.cy)<j;)i=u.P,f.unshift(u),Ia(u),u=i;f.unshift(u),We(u);for(var s=a;s.circle&&Math.abs(r-s.circle.x)<j&&Math.abs(n-s.circle.cy)<j;)a=s.N,f.push(s),Ia(s),s=a;f.push(s),We(s);var c=f.length,p;for(p=1;p<c;++p)s=f[p],u=f[p-1],Mn(s.edge,u.site,s.site,o);u=f[0],s=f[c-1],s.edge=Sr(u.site,s.site,null,o),Ge(u),Ge(s)}function zl(t){for(var e=t[0],r=t[1],n,o,i,a,f=Ve._;f;)if(i=ql(f,r)-e,i>j)f=f.L;else if(a=e-G1(f,r),a>j){if(!f.R){n=f;break}f=f.R}else{i>-j?(n=f.P,o=f):a>-j?(n=f,o=f.N):n=o=f;break}Pl(t);var u=Dl(t);if(Ve.insert(n,u),!(!n&&!o)){if(n===o){We(n),o=Dl(n.site),Ve.insert(u,o),u.edge=o.edge=Sr(n.site,u.site),Ge(n),Ge(o);return}if(!o){u.edge=Sr(n.site,u.site);return}We(n),We(o);var s=n.site,c=s[0],p=s[1],l=t[0]-c,d=t[1]-p,y=o.site,g=y[0]-c,x=y[1]-p,b=2*(l*x-d*g),w=l*l+d*d,C=g*g+x*x,v=[(x*w-d*C)/b+c,(l*C-g*w)/b+p];Mn(o.edge,s,y,v),u.edge=Sr(s,t,null,v),o.edge=Sr(t,y,null,v),Ge(n),Ge(o)}}function ql(t,e){var r=t.site,n=r[0],o=r[1],i=o-e;if(!i)return n;var a=t.P;if(!a)return-1/0;r=a.site;var f=r[0],u=r[1],s=u-e;if(!s)return f;var c=f-n,p=1/i-1/s,l=c/s;return p?(-l+Math.sqrt(l*l-2*p*(c*c/(-2*s)-u+s/2+o-i/2)))/p+n:(n+f)/2}function G1(t,e){var r=t.N;if(r)return ql(r,e);var n=t.site;return n[1]===e?n[0]:1/0}var j=1e-6,kl=1e-12,Ve,Lt,Er,bt;function W1(t,e,r){return(t[0]-r[0])*(e[1]-t[1])-(t[0]-e[0])*(r[1]-t[1])}function V1(t,e){return e[1]-t[1]||e[0]-t[0]}function Ro(t,e){var r=t.sort(V1).pop(),n,o,i;for(bt=[],Lt=new Array(t.length),Ve=new Pa,Er=new Pa;;)if(i=Do,r&&(!i||r[1]<i.y||r[1]===i.y&&r[0]<i.x))(r[0]!==n||r[1]!==o)&&(zl(r),n=r[0],o=r[1]),r=t.pop();else if(i)Ol(i.arc);else break;if(Nl(),e){var a=+e[0][0],f=+e[0][1],u=+e[1][0],s=+e[1][1];Ll(a,f,u,s),Il(a,f,u,s)}this.edges=bt,this.cells=Lt,Ve=Er=bt=Lt=null}Ro.prototype={constructor:Ro,polygons:function(){var t=this.edges;return this.cells.map(function(e){var r=e.halfedges.map(function(n){return Na(e,t[n])});return r.data=e.site.data,r})},triangles:function(){var t=[],e=this.edges;
4return this.cells.forEach(function(r,n){if(f=(i=r.halfedges).length)for(var o=r.site,i,a=-1,f,u,s=e[i[f-1]],c=s.left===o?s.right:s.left;++a<f;)u=c,s=e[i[a]],c=s.left===o?s.right:s.left,u&&c&&n<u.index&&n<c.index&&W1(o,u,c)<0&&t.push([o.data,u.data,c.data])}),t},links:function(){return this.edges.filter(function(t){return t.right}).map(function(t){return{source:t.left.data,target:t.right.data}})},find:function(t,e,r){for(var n=this,o,i=n._found||0,a=n.cells.length,f;!(f=n.cells[i]);)if(++i>=a)return null;var u=t-f.site[0],s=e-f.site[1],c=u*u+s*s;do f=n.cells[o=i],i=null,f.halfedges.forEach(function(p){var l=n.edges[p],d=l.left;if(!((d===f.site||!d)&&!(d=l.right))){var y=t-d[0],g=e-d[1],x=y*y+g*g;x<c&&(c=x,i=d.index)}});while(i!==null);return n._found=o,r==null||c<=r*r?f.site:null}};function Sn(t){return function(){return t}}function Aa(t,e,r){this.target=t,this.type=e,this.transform=r}function te(t,e,r){this.k=t,this.x=e,this.y=r}te.prototype={constructor:te,scale:function(t){return t===1?this:new te(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new te(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Xe=new te(1,0,0);ka.prototype=te.prototype;function ka(t){return t.__zoom||Xe}function Oo(){N.stopImmediatePropagation()}function Tr(){N.preventDefault(),N.stopImmediatePropagation()}function X1(){return!N.button}function $1(){var t=this,e,r;return t instanceof SVGElement?(t=t.ownerSVGElement||t,e=t.width.baseVal.value,r=t.height.baseVal.value):(e=t.clientWidth,r=t.clientHeight),[[0,0],[e,r]]}function Ul(){return this.__zoom||Xe}function Z1(){return-N.deltaY*(N.deltaMode?120:1)/500}function Q1(){return"ontouchstart"in this}function K1(t,e,r){var n=t.invertX(e[0][0])-r[0][0],o=t.invertX(e[1][0])-r[1][0],i=t.invertY(e[0][1])-r[0][1],a=t.invertY(e[1][1])-r[1][1];return t.translate(o>n?(n+o)/2:Math.min(0,n)||Math.max(0,o),a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a))}function Da(){var t=X1,e=$1,r=K1,n=Z1,o=Q1,i=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],f=250,u=Ci,s=[],c=oe("start","zoom","end"),p,l,d=500,y=150,g=0;function x(m){m.property("__zoom",Ul).on("wheel.zoom",q).on("mousedown.zoom",A).on("dblclick.zoom",F).filter(o).on("touchstart.zoom",U).on("touchmove.zoom",X).on("touchend.zoom touchcancel.zoom",rt).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}x.transform=function(m,M){var P=m.selection?m.selection():m;P.property("__zoom",Ul),m!==P?v(m,M):P.interrupt().each(function(){S(this,arguments).start().zoom(null,typeof M=="function"?M.apply(this,arguments):M).end()})},x.scaleBy=function(m,M){x.scaleTo(m,function(){var P=this.__zoom.k,I=typeof M=="function"?M.apply(this,arguments):M;return P*I})},x.scaleTo=function(m,M){x.transform(m,function(){var P=e.apply(this,arguments),I=this.__zoom,E=C(P),W=I.invert(E),V=typeof M=="function"?M.apply(this,arguments):M;return r(w(b(I,V),E,W),P,a)})},x.translateBy=function(m,M,P){x.transform(m,function(){return r(this.__zoom.translate(typeof M=="function"?M.apply(this,arguments):M,typeof P=="function"?P.apply(this,arguments):P),e.apply(this,arguments),a)})},x.translateTo=function(m,M,P){x.transform(m,function(){var I=e.apply(this,arguments),E=this.__zoom,W=C(I);return r(Xe.translate(W[0],W[1]).scale(E.k).translate(typeof M=="function"?-M.apply(this,arguments):-M,typeof P=="function"?-P.apply(this,arguments):-P),I,a)})};function b(m,M){return M=Math.max(i[0],Math.min(i[1],M)),M===m.k?m:new te(M,m.x,m.y)}function w(m,M,P){var I=M[0]-P[0]*m.k,E=M[1]-P[1]*m.k;return I===m.x&&E===m.y?m:new te(m.k,I,E)}function C(m){return[(+m[0][0]+ +m[1][0])/2,(+m[0][1]+ +m[1][1])/2]}function v(m,M,P){m.on("start.zoom",function(){S(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){S(this,arguments).end()}).tween("zoom",function(){var I=this,E=arguments,W=S(I,E),V=e.apply(I,E),nt=P||C(V),dt=Math.max(V[1][0]-V[0][0],V[1][1]-V[0][1]),Pt=I.__zoom,B=typeof M=="function"?M.apply(I,E):M,ot=u(Pt.invert(nt).concat(dt/Pt.k),B.invert(nt).concat(dt/B.k));return function(tt){if(tt===1)tt=B;else{var ut=ot(tt),L=dt/ut[2];tt=new te(L,nt[0]-ut[0]*L,nt[1]-ut[1]*L)}W.zoom(null,tt)}})}function S(m,M){for(var P=0,I=s.length,E;P<I;++P)if((E=s[P]).that===m)return E;return new k(m,M)}function k(m,M){this.that=m,this.args=M,this.index=-1,this.active=0,this.extent=e.apply(m,M)}k.prototype={start:function(){return++this.active===1&&(this.index=s.push(this)-1,this.emit
4("start")),this},zoom:function(m,M){return this.mouse&&m!=="mouse"&&(this.mouse[1]=M.invert(this.mouse[0])),this.touch0&&m!=="touch"&&(this.touch0[1]=M.invert(this.touch0[0])),this.touch1&&m!=="touch"&&(this.touch1[1]=M.invert(this.touch1[0])),this.that.__zoom=M,this.emit("zoom"),this},end:function(){return--this.active===0&&(s.splice(this.index,1),this.index=-1,this.emit("end")),this},emit:function(m){Le(new Aa(x,m,this.that.__zoom),c.apply,c,[m,this.that,this.args])}};function q(){if(!t.apply(this,arguments))return;var m=S(this,arguments),M=this.__zoom,P=Math.max(i[0],Math.min(i[1],M.k*Math.pow(2,n.apply(this,arguments)))),I=fe(this);if(m.wheel)(m.mouse[0][0]!==I[0]||m.mouse[0][1]!==I[1])&&(m.mouse[1]=M.invert(m.mouse[0]=I)),clearTimeout(m.wheel);else{if(M.k===P)return;m.mouse=[I,M.invert(I)],we(this),m.start()}Tr(),m.wheel=setTimeout(E,y),m.zoom("mouse",r(w(b(M,P),m.mouse[0],m.mouse[1]),m.extent,a));function E(){m.wheel=null,m.end()}}function A(){if(l||!t.apply(this,arguments))return;var m=S(this,arguments),M=st(N.view).on("mousemove.zoom",W,!0).on("mouseup.zoom",V,!0),P=fe(this),I=N.clientX,E=N.clientY;nr(N.view),Oo(),m.mouse=[P,this.__zoom.invert(P)],we(this),m.start();function W(){if(Tr(),!m.moved){var nt=N.clientX-I,dt=N.clientY-E;m.moved=nt*nt+dt*dt>g}
4m.zoom("mouse",r(w(m.that.__zoom,m.mouse[0]=fe(m.that),m.mouse[1]),m.extent,a))}function V(){M.on("mousemove.zoom mouseup.zoom",null),or(N.view,m.moved),Tr(),m.end()}}function F(){if(t.apply(this,arguments)){var m=this.__zoom,M=fe(this),P=m.invert(M),I=m.k*(N.shiftKey?.5:2),E=r(w(b(m,I),M,P),e.apply(this,arguments),a);Tr(),f>0?st(this).transition().duration(f).call(v,E,M):st(this).call(x.transform,E)}}function U(){if(t.apply(this,arguments)){var m=S(this,arguments),M=N.changedTouches,P,I=M.length,E,W,V;for(Oo(),E=0;E<I;++E)W=M[E],V=rr(this,M,W.identifier),V=[V,this.__zoom.invert(V),W.identifier],m.touch0?m.touch1||(m.touch1=V):(m.touch0=V,P=!0);if(p&&(p=clearTimeout(p),!m.touch1)){m.end(),V=st(this).on("dblclick.zoom"),V&&V.apply(this,arguments);return}P&&(p=setTimeout(function(){p=null},d),we(this),m.start())}}function X(){var m=S(this,arguments),M=N.changedTouches,P=M.length,I,E,W,V;for(Tr(),p&&(p=clearTimeout(p)),I=0;I<P;++I)E=M[I],W=rr(this,M,E.identifier),m.touch0&&m.touch0[2]===E.identifier?m.touch0[0]=W:m.touch1&&m.touch1[2]===E.identifier&&(m.touch1[0]=W);if(E=m.that.__zoom,m.touch1){var nt=m.touch0[0],dt=m.touch0[1],Pt=m.touch1[0],B=m.touch1[1],ot=(ot=Pt[0]-nt[0])*ot+(ot=Pt[1]-nt[1])*ot,tt=(tt=B[0]-dt[0])*tt+(tt=B[1]-dt[1])*tt;E=b(E,Math.sqrt(ot/tt)),W=[(nt[0]+Pt[0])/2,(nt[1]+Pt[1])/2],V=[(dt[0]+B[0])/2,(dt[1]+B[1])/2]}else if(m.touch0)W=m.touch0[0],V=m.touch0[1];else return;m.zoom("touch",r(w(E,W,V),m.extent,a))}function rt(){var m=S(this,arguments),M=N.changedTouches,P=M.length,I,E;for(Oo(),l&&clearTimeout(l),l=setTimeout(function(){l=null},d),I=0;I<P;++I)E=M[I],m.touch0&&m.touch0[2]===E.identifier?delete m.touch0:m.touch1&&m.touch1[2]===E.identifier&&delete m.touch1;m.touch1&&!m.touch0&&(m.touch0=m.touch1,delete m.touch1),m.touch0?m.touch0[1]=this.__zoom.invert(m.touch0[0]):m.end()}return x.wheelDelta=function(m){return arguments.length?(n=typeof m=="function"?m:Sn(+m),x):n},x.filter=function(m){return arguments.length?(t=typeof m=="function"?m:Sn(!!m),x):t},x.touchable=function(m){return arguments.length?(o=typeof m=="function"?m:Sn(!!m),x):o},x.extent=function(m){return arguments.length?(e=typeof m=="function"?m:Sn([[+m[0][0],+m[0][1]],[+m[1][0],+m[1][1]]]),x):e},x.scaleExtent=function(m){return arguments.length?(i[0]=+m[0],i[1]=+m[1],x):[i[0],i[1]]},x.translateExtent=function(m){return arguments.length?(a[0][0]=+m[0][0],a[1][0]=+m[1][0],a[0][1]=+m[0][1],a[1][1]=+m[1][1],x):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},x.constrain=function(m){return arguments.length?(r=m,x):r},x.duration=function(m){return arguments.length?(f=+m,x):f},x.interpolate=function(m){return arguments.length?(u=m,x):u},x.on=function(){var m=c.on.apply(c,arguments);return m===c?x:m},x.clickDistance=function(m){return arguments.length?(g=(m=+m)*m,x):Math.sqrt(g)},x}import{openToast as Bl}from"../../frontend-js-components-web/__liferay__/index.js";var Ra=class{constructor(){this._handleClickOutside=this._handleClickOutside.bind(this)}_handleClickOutside(e){!this._diagramWrapper.parentNode.contains(e.target)&&!e.target.closest(".diagram-tooltip-wrapper")&&!e.target.closest(".dropdown-menu")&&this.resetActivePinsState()}_addZoom(){this._zoom=Da().scaleExtent([Rt[0],Rt[Rt.length-1]]).on("zoom",this._handleZoom),this._svg=this._d3diagramWrapper.call(this._zoom)}_handleZoom(){this._currentScale=N.transform.k,N.sourceEvent&&this._updateZoomState(this._currentScale),this._d3zoomWrapper.attr("transform",N.transform)}cleanUp(){window.removeEventListener("click",this._handleClickOutside)}updateZoom(e,r=800){this._currentScale=e;let n=this._d3diagramWrapper.transition().duration(r).tween("resize",window.ResizeObserver?null:()=>this._d3diagramWrapper.dispatch("toggle"));return new Promise(o=>{this._d3diagramWrapper.transition(n).call(this._zoom.scaleTo,this._currentScale).on("end",o)})}_recenterViewport(e,r,n,o){return o&&(this._currentScale=o),this._updateZoomState(this._currentScale),new Promise(i=>{this._d3diagramWrapper.transition(this._d3diagramWrapper.transition().duration(n)).call(this._zoom.transform,Xe.translate(e,r).scale(this._currentScale)).on("end",i)})}},zo=Ra;await import(`@liferay/language/${Liferay.ThemeDisplay.getLanguageId()}/commerce-shop-by-diagram-web/all.js`);var Oa=class extends zo{constructor(e,r,n,o,i,a,f){super(),this._allowPinsUp
4date=e,this._closeDropdowns=r,this._currentScale=1,this._d3diagramWrapper=st(n),this._d3zoomWrapper=st(f),this._diagramWrapper=n,this._imageURL=o,this._pinBackground=null,this._setTooltipData=i,this._updateZoomState=a,this._zoomWrapper=f,this._handleDragEnded=this._handleDragEnded.bind(this),this._handleDragStarted=this._handleDragStarted.bind(this),this._handleDragging=this._handleDragging.bind(this),this._handleEnter=this._handleEnter.bind(this),this._handleExit=this._handleExit.bind(this),this._handleImageClick=this._handleImageClick.bind(this),this._handleUpdate=this._handleUpdate.bind(this),this._handleZoom=this._handleZoom.bind(this),this._pinsRadius=xt.DEFAULT,this._addListeners(),this._printImage(),this._addZoom()}_addListeners(){window.addEventListener("click",this._handleClickOutside),this._diagramWrapper.addEventListener("click",()=>{this._closeDropdowns()})}_printImage(){let e=this._diagramWrapper.getBoundingClientRect();this._image=this._d3zoomWrapper.append("image").attr("href",this._imageURL).attr("height",e.height).attr("x",0).attr("y",0).on("load",(r,n,o)=>{let i=o[n].getBoundingClientRect().width,a=(e.width-i)/2;Xa||this._d3diagramWrapper.call(this._zoom.translateBy,a,0),this.imageRendered=!0,this._pins&&this._updatePrintedPins(),this._diagramWrapper.classList.add("rendered")}).on("click",this._handleImageClick)}_handleZoom(){this.resetActivePinsState(),this._setTooltipData(null),super._handleZoom()}_recenterViewport(e,r){let{height:n,width:o}=this._diagramWrapper.getBoundingClientRect(),i=this._currentScale,a=e.__data__,[f,u]=An(a.positionX,a.positionY,this._image.node(),this._currentScale),s=-f*i+o/2,c=-u*i+n/2;return super._recenterViewport(s,c,r,i)}
4resetActivePinsState(){this._activePin&&this._activePin.classList.remove("active"),this._newPinPlaceholder&&(this._newPinPlaceholder.remove(),this._newPinPlaceholder=null)}_handleImageClick(){if(this.resetActivePinsState(),!this._allowPinsUpdate){this._setTooltipData(null);return}let[e,r]=Qo(N.x,N.y,N.target);this._newPinPlaceholder=this._d3zoomWrapper.append("g").attr("class","empty-pin-node").attr("transform",`translate(${An(e,r,N.target,this._currentScale)})`).append("g").attr("class","pin-radius-handler").attr("transform",`scale(${this._pinsRadius})`).append("circle").attr("class","pin-node-background").attr("r",Wo);let n=this._newPinPlaceholder.node();this._setTooltipData({target:n,x:e,y:r})}highlight(e){this._d3zoomWrapper.selectAll(".pin-node").filter(r=>r.sequence===e).classed("highlighted",!0)}removeHighlight(e){this._d3zoomWrapper.selectAll(".pin-node").filter(r=>r.sequence===e).classed("highlighted",!1)}updatePins(e){this._pins=e,this.resetActivePinsState(),this.imageRendered&&this._updatePrintedPins()}updatePinsRadius(e){this._pinsRadius=e,this.imageRendered&&this._d3zoomWrapper.selectAll(".pin-node").select(".pin-radius-handler").attr("transform",`scale(${this._pinsRadius})`)}selectPinByProduct(e){let n=this._d3zoomWrapper.selectAll(".pin-node").filter(o=>o.mappedProduct.id===e.id).nodes();n.length&&this._recenterViewport(n[0],500).then(()=>{this._selectPinNode(n[0])})}_selectPinNode(e){this.resetActivePinsState(),e.classList.add("active"),this._activePin=e,this._setTooltipData({selectedPin:e.__data__,target:e})}_updatePrintedPins(){this._d3zoomWrapper.selectAll(".pin-node").data(this._pins,e=>e.id).join(this._handleEnter,this._handleUpdate,this._handleExit)}_handleEnter(e){let r=e.append("g").attr("class","pin-node").attr("transform",o=>`translate(${An(o.positionX,o.positionY,this._image.node(),this._currentScale)})`).attr("role","pin").on("click",(o,i,a)=>{this._selectPinNode(a[i])});this._allowPinsUpdate&&r.call(oi().on("start",this._handleDragStarted).on("drag",this._handleDragging).on("end",this._handleDragEnded));let n=r.append("g").attr("class","pin-radius-handler").call(o=>o.transition(30).attr("y",0)).attr("transform",`scale(${this._pinsRadius})`);return n.append("circle").attr("class","pin-node-background").attr("r",Wo),n.append("text").attr("y",5).attr("text-anchor","middle").attr("class","pin-node-text").text(o=>o.sequence),r}_handleUpdate(e){return e.select(".pin-node-text").text(r=>r.sequence),e}_handleExit(e){return e.remove(),e}_handleDragStarted(e,r,n){let o=n[r];this._dragDetails={startTransform:o.getAttribute("transform"),startX:N.x,startY:N.y},o.classList.add("drag-started"),this.resetActivePinsState(),this._setTooltipData(null)}_handleDragging(e,r,n){let o=n[r];cf(N.x,N.y,this._dragDetails.startX,this._dragDetails.startY)?(o.classList.add("dragging"),this._dragDetails.moved=!0,st(o).attr("transform",`translate(${N.x},${N.y})`)):(o.classList.remove("dragging"),this._dragDetails.moved=!1,st(o).attr("transform",this._dragDetails.startTransform))}_handleDragEnded(e,r,n){if(n[r].classList.remove("dragging","drag-started"),this._dragDetails.moved){let[i,a]=Qo(N.sourceEvent.x,N.sourceEvent.y,this._image.node());Nn(e.id,null,null,i,a).then(()=>{Bl({message:Liferay.Language.get("pin-position-updated"),type:"success"})}).catch(()=>{Bl({message:Liferay.Language.get("pin-position-failed-to-be-updated"),type:"danger"})})}}},Fl=Oa;function J1(t,e,r){return it(()=>{let n=({diagramProductId:f,sequence:u})=>{f===e&&t.current.highlight(u)},o=({diagramProductId:f,sequence:u})=>{f===e&&t.current.removeHighlight(u)},i=({diagramProductId:f,product:u})=>{f===e&&t.current.selectPinByProduct(u)},a=({diagramProductId:f})=>{f===e&&r()};return Liferay.on(at.SELECT_PIN,i),Liferay.on(at.HIGHLIGHT_PIN,n),Liferay.on(at.REMOVE_PIN_HIGHLIGHT,o),Liferay.on(at.TABLE_UPDATED,a),()=>{Liferay.detach(at.SELECT_PIN,i),Liferay.detach(at.HIGHLIGHT_PIN,n),Liferay.detach(at.REMOVE_PIN_HIGHLIGHT,o),Liferay.detach(at.TABLE_UPDATED,a)}},[t,e,r]),null}var Hl=J1;var qo="../../commerce-shop-by-diagram-web/css/diagram.(3L8a9J4Jf8w).css";window.getComputedStyle(document.documentElement).direction==="rtl"&&(qo="../../commerce-shop-by-diagram-web/css/diagram_rtl.(3L8a9J4Jf8w).css");qo=import.meta.resolve(qo);
4var Cn=document.createElement("link");Cn.setAttribute("rel","stylesheet");Cn.setAttribute("type","text/css");Cn.setAttribute("href",qo);Liferay.CSP&&Cn.setAttribute("nonce",Liferay.CSP.nonce);document.querySelector("head").appendChild(Cn);function Uo(t,e,r,n){it(()=>{function o(i){if(i.key==="Escape"){if(e)return n();if(t)return r()}}return t||e?document.addEventListener("keyup",o,{once:!0}):document.removeEventListener("keyup",o),()=>{document.removeEventListener("keyup",o)}},[n,r,t,e])}await import(`@liferay/language/${Liferay.ThemeDisplay.getLanguageId()}/commerce-shop-by-diagram-web/all.js`);var nx=rx(af,800);function za({cartId:t,channelGroupId:e,channelId:r,commerceAccountId:n,commerceCurrencyCode:o,datasetDisplayId:i,diagramId:a,guestOrderEnabled:f,imageURL:u,isAdmin:s,namespace:c,orderUUID:p,pinsRadius:l,productBaseURL:d,productId:y}){let g=ex({guestOrderEnabled:f,initialCart:{id:t}}),x=tx({id:n}),b=wt(null),w=wt(!1),C=wt(null),v=wt(null),[S,k]=G(1),[q,A]=G(!1),[F,U]=G(null),[X,rt]=G(!1),[m,M]=G(l),[P,I]=G(!1),E=j1();Uo(q,P,()=>A(!1),()=>{I(null),b.current?.resetActivePinsState()}),Hl(b,y,()=>Zo(y,!s&&r,x.id).then(U)),it(()=>{w.current?nx(a,m,c):w.current=!0},[m,a,c]),it(()=>{Zo(y,!s&&r,x.id).then(U)},[r,s,y,x]),it(()=>{F&&b.current?.updatePins(F)},[F]),it(()=>{b.current?.updatePinsRadius(m)},[m]),Ce(()=>(b.current=new Fl(s,()=>rt(!1),C.current,u,I,k,v.current),()=>{b.current.cleanUp()}),[u,s]);let W=()=>nf(P.selectedPin.id).then(()=>{E()&&(U(nt=>nt.filter(dt=>dt.id!==P.selectedPin.id)),Bo({message:Liferay.Language.get("pin-deleted"),type:"success"}))}).catch(nt=>{throw Bo({message:nt.message||nt,type:"danger"}),nt}),V=(nt,dt,Pt,B)=>{let ot=!!P.selectedPin?.id,tt=In(nt,dt,Pt,B);return Nn(ot?P.selectedPin.id:null,tt,Pt,P.x,P.y,y).then(ut=>{E()&&(U(L=>{let z=L.map(R=>R.sequence===ut.sequence?{...R,mappedProduct:ut.mappedProduct,quantity:ut.quantity}:R);return ot?z.map(R=>R.id===ut.id?ut:R):[...z,ut]}),Bo({message:ot?Liferay.Language.get("pin-updated"):Liferay.Language.get("pin-created"),type:"success"}))}).catch(ut=>{throw Bo({message:ut.message||ut,type:"danger"}),ut})};return h.createElement("div",{className:Ht("shop-by-diagram",{expanded:q})},s&&h.createElement(ja,{dropdownActive:X,pinsRadius:m,setDropdownActive:rt,updatePinsRadius:M}),h.createElement("div",{className:"bg-white border-bottom border-top view-wrapper"},h.createElement(Ut,{className:"svg-loader"}),h.createElement("svg",{className:"svg-wrapper",ref:C},h.createElement("title",null,Liferay.Language.get("diagram")),h.createElement("g",{className:"zoom-handler",ref:v}))),P&&h.createElement(On,{closeTooltip:()=>I(null),target:P.target},s?h.createElement(Tn,{closeTooltip:()=>I(null),datasetDisplayId:i,onDelete:W,onSave:V,productId:y,readOnlySequence:!1,...P}):h.createElement(Rn,{accountId:x.id,cartId:g.id,channelGroupId:e,channelId:r,currencyCode:o,orderUUID:p,productBaseURL:d,...P})),h.createElement(Ln,{chartInstance:b,currentZoom:S,expanded:q,updateCurrentZoom:k,updateExpanded:A}))}za.defaultProps={pinsRadius:xt.DEFAULT};za.propTypes={cartId:D.string,channelGroupId:D.string,channelId:D.string,commerceAccountId:D.string,commerceCurrencyCode:D.string,datasetDisplayId:D.string,diagramId:D.string.isRequired,imageURL:D.string.isRequired,isAdmin:D.bool.isRequired,orderUUID:D.string,pinsRadius:D.number,productBaseURL:D.string,productId:D.string.isRequired};var ox=za;import{}from"../../frontend-js-clay-web/__liferay__/exports/@clayui$empty-state.js";import ix from"../../frontend-js-clay-web/__liferay__/exports/@clayui$empty-state.js";var Yl=ix;import{}from"../../frontend-js-clay-web/__liferay__/exports/@clayui$table.js";import ax from"../../frontend-js-clay-web/__liferay__/exports/@clayui$table.js";var pt=ax;import{AddToCartButtonComponent as lx,InfiniteScrollerComponent as px,useCommerceAccount as dx,useCommerceCart as mx}from"../../commerce-frontend-js/__liferay__/index.js";import{openToast as hx}from"../../frontend-js-components-web/__liferay__/index.js";import{sub as gx}from"../../frontend-js-web/__liferay__/index.js";import{ManagementToolbar as Gl}from"../../frontend-js-components-web/__liferay__/index.js";import{debounce as fx}from"../../frontend-js-web/__liferay__/index.js";await import(`@liferay/language/${Liferay.ThemeDisplay.getLanguageId()}/commerce-shop-by-diagram-web/all.js`);function ux({updateQuery:t}){let[e,r]=G(""),n=wt(fx(t,500));function o({target:i}){r(i.value),n.current(i.value)}return h.createElement(Gl.Container,{className:"border-bottom"},h.createElement(Gl.Search,{onSubmit:i=>i.preventDefault()},h.createElement(Gt.Group,null,h.createElement(Gt.GroupItem,null,h.createElement(Gt,{"aria-label":Liferay.Language.get("search"),className:"form-control input-group-inset input-group-inset-after",onChange:o,type:"text",value:e}),h.createElement(Gt.GroupInsetItem,{after:!0,tag:"span"},h.createElement(Ee,{displayType:"unstyled",symbol:"search",type:"submit"}))))))}var Wl=ux;import{QuantitySelectorComponent as sx}from"../../commerce-frontend-js/__liferay__/index.js";import{sub as cx}from"../../frontend-js-web/__liferay__/index.js";await import(`@liferay/language/${Liferay.ThemeDisplay.getLanguageId()}/commerce-shop-by-diagram-web/all.js`);function qa({handleMouseEnter:t,handleMouseLeave:e,handleTitleClicked:r,isAdmin:n,onDelete:o,product:i,quantity:a,setMappedProducts:f,setNewQuantity:u}){function s(c){f(p=>
4p.map(l=>l.skuId===i.skuId?{...l,selected:c}:l))}return h.createElement(pt.Row,{key:i.id,onMouseEnter:()=>t(i),onMouseLeave:()=>e(i)},!n&&h.createElement(pt.Cell,null,h.createElement(En,{"aria-label":cx(Liferay.Language.get("select-sku-x-x"),i.sku,i.productName?.[Liferay.ThemeDisplay.getLanguageId()]),checked:!!i.selected,disabled:!i.selectable,onChange:c=>{s(c.target.checked)}})),h.createElement(pt.Cell,null,lf(i.sequence)),h.createElement(pt.Cell,null,h.createElement("div",{className:"table-list-title"},h.createElement(Yt,{displayType:"unstyled",onClick:()=>r(i)},i.type==="diagram"?i.productName[Liferay.ThemeDisplay.getLanguageId()]:i.sku,i.type==="sku"&&h.createElement("p",{className:"m-0 text-weight-light"},i.productName[Liferay.ThemeDisplay.getLanguageId()])))),h.createElement(pt.Cell,null,n&&i.type!=="diagram"&&i.quantity,!n&&i.productConfiguration&&i.type==="sku"&&h.createElement(sx,{allowedQuantities:i.productConfiguration.allowedOrderQuantities,disabled:!i.selectable,max:i.productConfiguration.maxOrderQuantity,min:i.productConfiguration.minOrderQuantity,onUpdate:({errors:c,value:p})=>{u(p),c.length&&s(!1)},quantity:a,size:"sm",step:i.productConfiguration.multipleOrderQuantity}),!n&&i.type==="external"&&i.quantity),n?h.createElement(pt.Cell,null,h.createElement(Ee,{displayType:"secondary",onClick:()=>o(i.id),small:!0,symbol:"trash"})):h.createElement(pt.Cell,{className:"text-right"},i.price&&h.createElement(Dn,{...i.price})))}await import(`@liferay/language/${Liferay.ThemeDisplay.getLanguageId()}/commerce-shop-by-diagram-web/all.js`);function Ua({isAdmin:t,mappedProducts:e,setMappedProducts:r}){let n=0,o=0;return e.forEach(i=>{i.selectable&&o++,i.selected&&n++}),h.createElement(pt.Head,null,h.createElement(pt.Row,null,!t&&h.createElement(pt.Cell,{headingCell:!0},h.createElement(En,{checked:!!n&&n===o,disabled:!o,indeterminate:n>0&&n<o,onChange:()=>{r(i=>i.map(a=>n!==o?{...a,selected:a.selectable}:{...a,selected:!1}))}})),h.createElement(pt.Cell,{headingCell:!0},"#"),h.createElement(pt.Cell,{className:"table-cell-expand-small",headingCell:!0},Liferay.Language.get("sku-or-diagram")),h.createElement(pt.Cell,{headingCell:!0},Liferay.Language.get("quantity")),t?h.createElement(pt.Cell,null):h.createElement(pt.Cell,{className:"text-right",headingCell:!0},Liferay.Language.get("price"))))}await import(`@liferay/language/${Liferay.ThemeDisplay.getLanguageId()}/commerce-shop-by-diagram-web/all.js`);var xx=15;function yx(t,e){return t.reduce((r,n)=>{if(!n.selected)return r;let o=kn(n.skuOptions,n.productOptions);return[...r,{inCart:!1,quantity:e[n.skuId]||n.initialQuantity,skuId:n.skuId,skuOptions:o,validQuantity:!0}]},[])}function Vl({cartId:t,channelGroupId:e,channelId:r,commerceAccountId:n,commerceCurrencyCode:o,guestOrderEnabled:i,isAdmin:a,orderUUID:f,productId:u}){let[s,c]=G(1),[p,l]=G(null),[d,y]=G(!0),[g,x]=G(null),[b,w]=G({}),[C,v]=G(""),[S,k]=G(!1),q=dx({id:n}),A=mx({guestOrderEnabled:i,initialCart:{id:t}}),F=wt(),U=Lr(({diagramProductId:E})=>{E===u&&(k(W=>!W),c(1))},[u]);it(()=>(Liferay.on(Qe.DIAGRAM_UPDATED,U),()=>{Liferay.detach(Qe.DIAGRAM_UPDATED,U)}),[U]),it(()=>{Nr(u,!a&&r,C,s,xx,q.id).then(E=>{y(!1);let W=pf(E.items,a);x(V=>V&&s>1?[...V,...W]:W),l(E.lastPage)})},[r,s,a,u,C,S,q]);function X(E){Liferay.fire(at.SELECT_PIN,{diagramProductId:u,product:E})}function rt(E){Liferay.fire(at.HIGHLIGHT_PIN,{diagramProductId:u,sequence:E.sequence})}function m(E){Liferay.fire(at.REMOVE_PIN_HIGHLIGHT,{diagramProductId:u,sequence:E.sequence})}let M=E=>{Pn(E).then(()=>{x(W=>W.filter(V=>V.id!==E)),Liferay.fire(at.TABLE_UPDATED,{diagramProductId:u})})},P=h.createElement("div",{className:"full-height-content"});d&&(P=h.createElement("div",{className:"full-height-content"},h.createElement(Ut,null))),!d&&g&&g.length&&(P=h.createElement(px,{onBottomTouched:()=>c(s+1),scrollCompleted:s>=p},h.createElement(pt,{borderless:!0},h.createElement(Ua,{isAdmin:a,mappedProducts:g,setMappedProducts:x}),h.createElement(pt.Body,null,!!g?.length&&g.map(E=>h.createElement(qa,{handleMouseEnter:rt,handleMouseLeave:m,handleTitleClicked:X,isAdmin:a,key:E.id,onDelete:M,product:E,quantity:b[E.skuId]??E.initialQuantity,setMappedProducts:x,setNewQuantity:W=>{w({...b,[E.skuId]:W})}}))))));let I=!a&&g?g.reduce((E,W)=>W.selected?E+1:E,0):0;return h.createElement("div",{className:"shop-by-diagram-table",ref:F},h.createElement(Wl,{updateQuery:E=>{c(1),y(!0),v(E),x(null)}}),g&&!g.length&&!d&&h.createElement(Yl,{className:"full-height-content",description:Liferay.Language.get("sorry,-no-results-were-found"),title:Liferay.Language.get("there-are-no-results")}
4),P,!a&&h.createElement(lx,{accountId:q.id,cartId:A.id,cartUUID:f,channel:{currencyCode:o,groupId:e,id:r},cpInstances:yx(g||[],b),disabled:!q?.id||!I,hideIcon:!0,onAdd:()=>{let E=I===1?Liferay.Language.get("the-product-was-successfully-added-to-the-cart"):gx(Liferay.Language.get("x-products-were-successfully-added-to-the-cart"),I);hx({message:E,type:"success"})},settings:{alignment:"full-width",buttonText:Liferay.Language.get("add-selected-products-to-the-order")}}))}Vl.propTypes={cartId:D.string,channelGroupId:D.string,channelId:D.string,commerceAccountId:D.string,commerceCurrencyCode:D.string,isAdmin:D.bool,orderUUID:D.string,productId:D.string.isRequired};var vx=Vl;import{useIsMounted as wx}from"../../frontend-js-react-web/__liferay__/index.js";import{useCommerceAccount as _x,useCommerceCart as Mx}from"../../commerce-frontend-js/__liferay__/index.js";import{openToast as Ho}from"../../frontend-js-components-web/__liferay__/index.js";function Fo({containerRef:t,highlighted:e,target:r}){let n=$e(()=>{let{height:o,width:i,x:a,y:f}=r.getBoundingClientRect(),{x:u,y:s}=t.current.getBoundingClientRect(),c=a-u,p=f-s,l=Math.max(o,i)+4;return{"--border-width":`${l/10}px`,"--size":`${l*1.25}px`,fontSize:`${o}px`,left:`${c+i/2}px`,top:`${p+o/2}px`}},[t,r]);return h.createElement("p",{className:Ht("pin-foreground",{highlighted:e,mapped:r._mapped}),style:n},h.createElement("span",{className:"pin-foreground-label"},r.textContent))}import{fetch as bx}from"../../frontend-js-web/__liferay__/index.js";var Ba=class extends zo{constructor(e,r,n,o,i,a,f){super(),this._currentScale=1,this._diagramWrapper=e,this._d3diagramWrapper=st(e),this._d3zoomWrapper=st(f),this._imageURL=r,this._isAdmin=n,this._updateLabels=i,this._pinBackground=null,this._pinsCSSSelectors=o,this._updateZoomState=a,this._zoomWrapper=f,this._handleZoom=this._handleZoom.bind(this),this.rendered=!1,this._printSVGImage().then(()=>{this.rendered=!0,this._addZoom(),this._updatePinsState()})}_printSVGImage(){return bx(this._imageURL).then(e=>e.text()).then(e=>e.replace(/<script[\s\S]*?<\/script>/gi,"").replace(/ on\w+="[^"]*"/gi,"").replace(/ xlink:href="[^"]*"/gi,"")).then(e=>{this._d3zoomWrapper.html(e),this._image=this._d3zoomWrapper.select("svg"),this._diagramWrapper.classList.add("rendered")})}_updatePinsState(){let e=new Set(this._pins?this._pins.map(o=>o.sequence):[]),r=this._image.node().getBoundingClientRect(),n=Array.from(this._diagramWrapper.querySelectorAll(this._pinsCSSSelectors.join(","))).filter(o=>{let i=e.has(o.textContent),a=this._isAdmin||i;if(this._isAdmin||i){o.classList.add("pin");let f=o.getBoundingClientRect();o.__data__={distanceFromCenterX:(f.x+f.width/2-(r.x+r.width/2))*-1,distanceFromCenterY:(f.y+f.height/2-(r.y+r.height/2))*-1}}return i?(o.classList.add("mapped"),o._mapped=!0):(o.classList.remove("mapped"),o._mapped=!1),a});this._updateLabels(n)}updatePins(e){this._pins=e,this.rendered&&this._updatePinsState()}async recenterOnPin(e){return super._recenterViewport(e.__data__.distanceFromCenterX,e.__data__.distanceFromCenterY,800,1)}},Xl=Ba;await import(`@liferay/language/${Liferay.ThemeDisplay.getLanguageId()}/commerce-shop-by-diagram-web/all.js`);function $l({cartId:t,channelGroupId:e,channelId:r,commerceAccountId:n,commerceCurrencyCode:o,datasetDisplayId:i,guestOrderEnabled:a,imageURL:f,isAdmin:u,orderUUID:s,pinsCSSSelectors:c,productBaseURL:p,productId:l}){let[d,y]=G(null),[g,x]=G(!1),[b,w]=G(1),[C,v]=G(!1),[S,k]=G([]),[q,A]=G(null),[F,U]=G([]),X=wt(null),rt=_x({id:n}),m=Mx({guestOrderEnabled:a,initialCart:{id:t}}),M=wx(),P=wt(null),I=wt(null),E=wt(null);Uo(C,!!g,()=>v(!1),()=>x(null)),it(()=>{Nr(l,!u&&r,"",1,200,rt.id).then(({items:B})=>y(B))},[r,u,l,rt]),it(()=>{X.current?.updatePins(d)},[d]),it(()=>{g||A(null)},[g]);let W=Lr(({target:B})=>{let ot=B.textContent,tt=d.find(L=>L.sequence===ot);x({selectedPin:tt?{mappedProduct:tt}:null,sequence:ot,target:B}),A(B)},[d]),V=Lr(({target:B})=>{let ot=S.filter(tt=>tt.textContent===B.textContent);U(ot)},[S]),nt=()=>{U([])};it(()=>(S.forEach(B=>{B.addEventListener("click",W),B.addEventListener("mouseenter",V),B.addEventListener("mouseleave",nt)}),()=>
4{S.forEach(B=>{B.removeEventListener("click",W),B.removeEventListener("mouseenter",V),B.removeEventListener("mouseleave",nt)})}),[W,V,S]),it(()=>{function B({diagramProductId:L,product:z}){if(L===l){let R=S.find(lt=>lt.textContent===z.sequence),_=d.find(lt=>lt.sequence===z.sequence);_&&(U([]),X.current.recenterOnPin(R).then(()=>{x({selectedPin:{mappedProduct:_},sequence:R.textContent,target:R}),A(R)}))}}function ot({diagramProductId:L,sequence:z}){L===l&&V({target:{textContent:z}})}function tt({diagramProductId:L}){L===l&&U([])}function ut(){Nr(l,!u&&r,"",1,200,rt.id).then(({items:L})=>y(L))}return Liferay.on(at.SELECT_PIN,B),Liferay.on(at.HIGHLIGHT_PIN,ot),Liferay.on(at.REMOVE_PIN_HIGHLIGHT,tt),Liferay.on(at.TABLE_UPDATED,ut),()=>{Liferay.detach(at.SELECT_PIN,B),Liferay.detach(at.HIGHLIGHT_PIN,ot),Liferay.detach(at.REMOVE_PIN_HIGHLIGHT,tt),Liferay.detach(at.TABLE_UPDATED,ut)}},[r,rt,u,V,S,d,l]),Ce(()=>{X.current=new Xl(P.current,f,u,c,k,B=>{x(null),w(B)},E.current)},[f,u,c]);let dt=(B,ot,tt,ut)=>{let L=In(B,ot,tt,ut),z=!!g.selectedPin?.mappedProduct.id;return of(z?g.selectedPin.mappedProduct.id:null,L,tt,l).then(R=>{M()&&(y(_=>{let lt=_.map(Q=>Q.sequence===R.sequence?{...Q,mappedProduct:R.mappedProduct,quantity:R.quantity}:Q);return z?lt.map(Q=>Q.id===R.id?R:Q):[...lt,R]}),Ho({message:z?Liferay.Language.get("pin-updated"):Liferay.Language.get("pin-created"),type:"success"}))}).catch(R=>{throw Ho({message:R.message||R,type:"danger"}),R})},Pt=()=>Pn(g.selectedPin.mappedProduct.id).then(()=>{M()&&(y(B=>B.filter(ot=>ot.id!==g.selectedPin.mappedProduct.id)),Ho({message:Liferay.Language.get("pin-deleted"),type:"success"}))}).catch(B=>{throw Ho({message:B.message||B,type:"danger"}),B});return h.createElement("div",{className:Ht("shop-by-diagram",{expanded:C})},h.createElement("div",{className:"bg-white border-bottom view-wrapper",ref:I},h.createElement(Ut,{className:"svg-loader"}),h.createElement("svg",{className:"svg-wrapper",ref:P},h.createElement("g",{className:"zoom-handler",ref:E})),h.createElement("div",{className:"sequences-wrapper"},F.map(B=>h.createElement(Fo,{containerRef:I,highlighted:!0,key:Array.from(B.parentNode.children).indexOf(B),target:B})),q&&h.createElement(Fo,{containerRef:I,target:q}))),g&&h.createElement(On,{closeTooltip:()=>x(null),target:g.target},u?h.createElement(Tn,{closeTooltip:()=>x(null),datasetDisplayId:i,onDelete:Pt,onSave:dt,productId:l,readOnlySequence:!0,...g}):h.createElement(Rn,{accountId:rt.id,cartId:m.id,channelGroupId:e,channelId:r,currencyCode:o,orderUUID:s,productBaseURL:p,...g})),h.createElement(Ln,{chartInstance:X,currentZoom:b,expanded:C,updateCurrentZoom:w,updateExpanded:v}))}$l.propTypes={cartId:D.string,channelGroupId:D.string,channelId:D.string,commerceAccountId:D.string,commerceCurrencyCode:D.string,datasetDisplayId:D.string,diagramId:D.string.isRequired,imageURL:D.string.isRequired,isAdmin:D.bool.isRequired,orderUUID:D.string,pinsCSSSelectors:D.array.isRequired,productBaseURL:D.string,productId:D.string.isRequired};var Sx=$l;import{State as Cx}from"../../frontend-js-state-web/__liferay__/index.js";import{openToast as Ex}from"../../frontend-js-components-web/__liferay__/index.js";import{fetch as Zl,navigate as Tx}from"../../frontend-js-web/__liferay__/index.js";import{imageSelectorImageAtom as Lx}from"../../item-selector-taglib/__liferay__/index.js";var Px=new Headers({Accept:"application/json","Content-Type":"application/json"}),Nx="/o/headless-commerce-admin-catalog/v1.0/diagrams/";function Ix({diagramId:t,namespace:e}){let r=document.getElementById(`${e}type`),n=()=>{Zl(Nx+t,{body:JSON.stringify({type:r.value}),headers:Px,method:"PATCH"})};r.addEventListener("change",n);let o=document.getElementById(`${e}fileEntryId`),i=o.value;function a({fileEntryId:u}){if(u==="0"||u===i)return;let s=document.getElementById(`${e}publish`);s.value=!1,o.value=u;let c=document.getElementById(`${e}fm`);Zl(c.action,{body:new FormData(c),method:"POST"}).then(p=>{p.status===200?Tx(location.href):p.json().then(l=>{Ex({title:l.message,type:"danger"})})})}let{dispose:f}=Cx.subscribe(Lx,a);return{dispose(){r.removeEventListener("change",n),f()}}}export{ox as Diagram,vx as DiagramTable,Sx as DiagramWithAutomapping,Ix as editCsDiagramSetting}; 5//# sourceMappingURL=index.(54IEFYDR).js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.