@esri/solutions-components 0.11.19 → 0.11.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{asyncToGenerator-f169429a.js → asyncToGenerator-c7fc3ee4.js} +1 -1
- package/dist/cjs/basemap-gallery_7.cjs.entry.js +2 -2
- package/dist/cjs/buffer-tools_2.cjs.entry.js +4 -3
- package/dist/cjs/card-manager_3.cjs.entry.js +4 -4
- package/dist/cjs/consent-manager.cjs.entry.js +4 -4
- package/dist/cjs/create-feature_4.cjs.entry.js +45 -44
- package/dist/cjs/create-related-feature_3.cjs.entry.js +2 -2
- package/dist/cjs/crowdsource-manager.cjs.entry.js +4 -5
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +5 -4
- package/dist/cjs/delete-dialog.cjs.entry.js +2 -2
- package/dist/cjs/{downloadUtils-b269c7a1.js → downloadUtils-fcae8eb1.js} +3 -3
- package/dist/cjs/{effects-2f75069e.js → effects-3607d1ba.js} +1 -1
- package/dist/cjs/feature-list.cjs.entry.js +5 -5
- package/dist/cjs/{helpers-69e520bd.js → helpers-8d452256.js} +2 -2
- package/dist/cjs/{index.es-644259ff.js → index.es-3c2404c3.js} +2 -2
- package/dist/cjs/instant-apps-app-guide.cjs.entry.js +4 -4
- package/dist/cjs/instant-apps-ckeditor-wrapper_3.cjs.entry.js +5 -5
- package/dist/cjs/instant-apps-control-panel.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-create.cjs.entry.js +4 -4
- package/dist/cjs/instant-apps-export-views.cjs.entry.js +4 -4
- package/dist/cjs/instant-apps-export.cjs.entry.js +4 -4
- package/dist/cjs/instant-apps-filter-list_2.cjs.entry.js +4 -4
- package/dist/cjs/instant-apps-header.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-interactive-legend-classic.cjs.entry.js +4 -4
- package/dist/cjs/instant-apps-interactive-legend-count_2.cjs.entry.js +4 -4
- package/dist/cjs/instant-apps-interactive-legend-group-legend-element-caption.cjs.entry.js +4 -4
- package/dist/cjs/instant-apps-interactive-legend-group-legend-element_5.cjs.entry.js +4 -4
- package/dist/cjs/instant-apps-interactive-legend.cjs.entry.js +6 -6
- package/dist/cjs/instant-apps-keyboard-shortcuts.cjs.entry.js +4 -4
- package/dist/cjs/instant-apps-language-switcher.cjs.entry.js +6 -6
- package/dist/cjs/instant-apps-language-translator.cjs.entry.js +6 -6
- package/dist/cjs/instant-apps-measurement-tool.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-measurement.cjs.entry.js +4 -4
- package/dist/cjs/instant-apps-popover.cjs.entry.js +4 -4
- package/dist/cjs/instant-apps-scoreboard.cjs.entry.js +4 -4
- package/dist/cjs/instant-apps-sign-in.cjs.entry.js +4 -4
- package/dist/cjs/instant-apps-splash.cjs.entry.js +4 -4
- package/dist/cjs/instant-apps-time-filter.cjs.entry.js +5 -5
- package/dist/cjs/json-editor_7.cjs.entry.js +2 -2
- package/dist/cjs/{languageSwitcher-c8e62594.js → languageSwitcher-19a22439.js} +1 -1
- package/dist/cjs/{languageUtil-bd49af69.js → languageUtil-a3e1eafd.js} +1 -1
- package/dist/cjs/{loadModules-3b29fa24.js → loadModules-e9d8977c.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{locale-905e6063.js → locale-1c60be9c.js} +1 -1
- package/dist/cjs/{locale-c923d7b6.js → locale-da41a06f.js} +2 -2
- package/dist/cjs/map-layer-picker.cjs.entry.js +2 -2
- package/dist/cjs/map-select-tools_3.cjs.entry.js +4 -4
- package/dist/cjs/{popupUtils-5378e04a.js → popupUtils-87b006a6.js} +2 -2
- package/dist/cjs/public-notification.cjs.entry.js +4 -4
- package/dist/cjs/solution-configuration.cjs.entry.js +2 -2
- package/dist/cjs/solution-contents_3.cjs.entry.js +2 -2
- package/dist/cjs/solution-item-accordion.cjs.entry.js +2 -2
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/cjs/spatial-ref.cjs.entry.js +2 -2
- package/dist/cjs/{utils-3739960f.js → utils-3e512114.js} +1 -1
- package/dist/collection/assets/t9n/create-feature/resources.json +1 -1
- package/dist/collection/assets/t9n/create-feature/resources_en.json +1 -1
- package/dist/collection/components/create-feature/create-feature.js +130 -110
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +2 -3
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +22 -2
- package/dist/collection/components/map-draw-tools/map-draw-tools.js +2 -1
- package/dist/components/create-feature2.js +48 -46
- package/dist/components/crowdsource-manager.js +2 -3
- package/dist/components/crowdsource-reporter.js +4 -2
- package/dist/components/map-draw-tools2.js +2 -1
- package/dist/esm/{asyncToGenerator-e51717ed.js → asyncToGenerator-96b2368d.js} +1 -1
- package/dist/esm/basemap-gallery_7.entry.js +2 -2
- package/dist/esm/buffer-tools_2.entry.js +4 -3
- package/dist/esm/card-manager_3.entry.js +4 -4
- package/dist/esm/consent-manager.entry.js +4 -4
- package/dist/esm/create-feature_4.entry.js +45 -44
- package/dist/esm/create-related-feature_3.entry.js +2 -2
- package/dist/esm/crowdsource-manager.entry.js +4 -5
- package/dist/esm/crowdsource-reporter.entry.js +5 -4
- package/dist/esm/delete-dialog.entry.js +2 -2
- package/dist/esm/{downloadUtils-d04d4095.js → downloadUtils-078cd709.js} +3 -3
- package/dist/esm/{effects-602e7b51.js → effects-38bc1195.js} +1 -1
- package/dist/esm/feature-list.entry.js +5 -5
- package/dist/esm/{helpers-520f100c.js → helpers-15d5cd56.js} +2 -2
- package/dist/esm/{index.es-ca80d0c5.js → index.es-87662946.js} +2 -2
- package/dist/esm/instant-apps-app-guide.entry.js +4 -4
- package/dist/esm/instant-apps-ckeditor-wrapper_3.entry.js +5 -5
- package/dist/esm/instant-apps-control-panel.entry.js +2 -2
- package/dist/esm/instant-apps-create.entry.js +4 -4
- package/dist/esm/instant-apps-export-views.entry.js +4 -4
- package/dist/esm/instant-apps-export.entry.js +4 -4
- package/dist/esm/instant-apps-filter-list_2.entry.js +4 -4
- package/dist/esm/instant-apps-header.entry.js +2 -2
- package/dist/esm/instant-apps-interactive-legend-classic.entry.js +4 -4
- package/dist/esm/instant-apps-interactive-legend-count_2.entry.js +4 -4
- package/dist/esm/instant-apps-interactive-legend-group-legend-element-caption.entry.js +4 -4
- package/dist/esm/instant-apps-interactive-legend-group-legend-element_5.entry.js +4 -4
- package/dist/esm/instant-apps-interactive-legend.entry.js +6 -6
- package/dist/esm/instant-apps-keyboard-shortcuts.entry.js +4 -4
- package/dist/esm/instant-apps-language-switcher.entry.js +6 -6
- package/dist/esm/instant-apps-language-translator.entry.js +6 -6
- package/dist/esm/instant-apps-measurement-tool.entry.js +2 -2
- package/dist/esm/instant-apps-measurement.entry.js +4 -4
- package/dist/esm/instant-apps-popover.entry.js +4 -4
- package/dist/esm/instant-apps-scoreboard.entry.js +4 -4
- package/dist/esm/instant-apps-sign-in.entry.js +4 -4
- package/dist/esm/instant-apps-splash.entry.js +4 -4
- package/dist/esm/instant-apps-time-filter.entry.js +5 -5
- package/dist/esm/json-editor_7.entry.js +2 -2
- package/dist/esm/{languageSwitcher-ccdf79d4.js → languageSwitcher-49bad3f4.js} +1 -1
- package/dist/esm/{languageUtil-2bac3910.js → languageUtil-2b6e191a.js} +1 -1
- package/dist/esm/{loadModules-1b0b108c.js → loadModules-947ccfd4.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{locale-15e42305.js → locale-7874c756.js} +1 -1
- package/dist/esm/{locale-29d08ded.js → locale-e02b0e14.js} +2 -2
- package/dist/esm/map-layer-picker.entry.js +2 -2
- package/dist/esm/map-select-tools_3.entry.js +4 -4
- package/dist/esm/{popupUtils-b71abb01.js → popupUtils-6a965512.js} +2 -2
- package/dist/esm/public-notification.entry.js +4 -4
- package/dist/esm/solution-configuration.entry.js +2 -2
- package/dist/esm/solution-contents_3.entry.js +2 -2
- package/dist/esm/solution-item-accordion.entry.js +2 -2
- package/dist/esm/solutions-components.js +1 -1
- package/dist/esm/spatial-ref.entry.js +2 -2
- package/dist/esm/{utils-89be1743.js → utils-6fe5b5fa.js} +1 -1
- package/dist/solutions-components/assets/t9n/create-feature/resources.json +1 -1
- package/dist/solutions-components/assets/t9n/create-feature/resources_en.json +1 -1
- package/dist/solutions-components/{p-d885880a.entry.js → p-00ec642f.entry.js} +1 -1
- package/dist/solutions-components/p-02c4e6fc.entry.js +6 -0
- package/dist/solutions-components/{p-0132213f.entry.js → p-0326f1f4.entry.js} +1 -1
- package/dist/solutions-components/{p-438fdc33.js → p-08ad0b7a.js} +1 -1
- package/dist/solutions-components/{p-0607044f.js → p-174fa218.js} +1 -1
- package/dist/solutions-components/{p-7bf7d67b.js → p-1e1dfef6.js} +1 -1
- package/dist/solutions-components/{p-2d8300ba.entry.js → p-244316dd.entry.js} +1 -1
- package/dist/solutions-components/p-2460cf10.entry.js +6 -0
- package/dist/solutions-components/{p-8f973b3d.js → p-2884ca49.js} +1 -1
- package/dist/solutions-components/{p-3f8b1062.entry.js → p-3ce5c7fd.entry.js} +1 -1
- package/dist/solutions-components/{p-a397e773.js → p-404cbf48.js} +1 -1
- package/dist/solutions-components/{p-f292f56e.entry.js → p-41a3b49a.entry.js} +1 -1
- package/dist/solutions-components/{p-f457e8be.entry.js → p-443168f0.entry.js} +1 -1
- package/dist/solutions-components/{p-86b6f918.entry.js → p-4ced7b11.entry.js} +1 -1
- package/dist/solutions-components/{p-2a1ed83a.entry.js → p-4d5dd39e.entry.js} +1 -1
- package/dist/solutions-components/{p-e79b69e6.entry.js → p-4e7514a3.entry.js} +1 -1
- package/dist/solutions-components/{p-34338938.entry.js → p-4f7fb338.entry.js} +1 -1
- package/dist/solutions-components/{p-edfcce2c.entry.js → p-5786b9da.entry.js} +1 -1
- package/dist/solutions-components/{p-b8f29a99.entry.js → p-5a202f3f.entry.js} +1 -1
- package/dist/solutions-components/{p-fdf0d66f.entry.js → p-65105504.entry.js} +1 -1
- package/dist/solutions-components/{p-532ed572.entry.js → p-698656b8.entry.js} +1 -1
- package/dist/solutions-components/{p-dbf2c455.entry.js → p-7251848d.entry.js} +1 -1
- package/dist/solutions-components/{p-b6a6fdcf.entry.js → p-72d04c7a.entry.js} +1 -1
- package/dist/solutions-components/{p-099379e6.entry.js → p-832707fd.entry.js} +1 -1
- package/dist/solutions-components/{p-8db12ee9.entry.js → p-837e0939.entry.js} +1 -1
- package/dist/solutions-components/{p-cd38fc53.js → p-84bb6925.js} +1 -1
- package/dist/solutions-components/{p-436b869c.entry.js → p-8859b622.entry.js} +1 -1
- package/dist/solutions-components/p-89fbc318.js +6 -0
- package/dist/solutions-components/{p-0b1c830a.entry.js → p-8a010f9e.entry.js} +1 -1
- package/dist/solutions-components/{p-6ac03d17.entry.js → p-8dd677dd.entry.js} +1 -1
- package/dist/solutions-components/{p-37cc79c6.entry.js → p-9927342d.entry.js} +1 -1
- package/dist/solutions-components/{p-c3aac15b.entry.js → p-a277d08c.entry.js} +1 -1
- package/dist/solutions-components/{p-2d3b8412.entry.js → p-a5eaf7fe.entry.js} +1 -1
- package/dist/solutions-components/{p-da1e4ff1.entry.js → p-aad84d69.entry.js} +1 -1
- package/dist/solutions-components/{p-3423b5ef.js → p-ac122d9e.js} +1 -1
- package/dist/solutions-components/{p-59a1c5a9.entry.js → p-b394f504.entry.js} +1 -1
- package/dist/solutions-components/{p-97abbf8f.entry.js → p-ba4e219a.entry.js} +1 -1
- package/dist/solutions-components/{p-258aa58e.js → p-bf04c6f4.js} +2 -2
- package/dist/solutions-components/{p-4454af38.entry.js → p-c6c697e5.entry.js} +1 -1
- package/dist/solutions-components/{p-dda0aa41.entry.js → p-d324196d.entry.js} +1 -1
- package/dist/solutions-components/{p-f93a9d92.js → p-d65f8b73.js} +1 -1
- package/dist/solutions-components/{p-36e3b39c.js → p-db3391b9.js} +2 -2
- package/dist/solutions-components/{p-039ab075.js → p-dc188d13.js} +1 -1
- package/dist/solutions-components/{p-04277d48.entry.js → p-de42e8b2.entry.js} +1 -1
- package/dist/solutions-components/p-ea566af0.entry.js +6 -0
- package/dist/solutions-components/{p-29baf8a2.entry.js → p-eb3c867f.entry.js} +1 -1
- package/dist/solutions-components/{p-d45b0400.entry.js → p-ed1ecb5b.entry.js} +1 -1
- package/dist/solutions-components/{p-1054e10a.entry.js → p-ee3bb943.entry.js} +1 -1
- package/dist/solutions-components/{p-0ea99464.entry.js → p-f165921f.entry.js} +1 -1
- package/dist/solutions-components/{p-f36b4778.entry.js → p-f75786a8.entry.js} +1 -1
- package/dist/solutions-components/{p-2a7f23fc.entry.js → p-f956c598.entry.js} +1 -1
- package/dist/solutions-components/{p-2cb8c175.entry.js → p-fa663804.entry.js} +1 -1
- package/dist/solutions-components/{p-6e879de9.entry.js → p-ff317687.entry.js} +1 -1
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components_commit.txt +7 -7
- package/dist/types/components/create-feature/create-feature.d.ts +54 -50
- package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +4 -0
- package/dist/types/components.d.ts +16 -0
- package/package.json +1 -1
- package/dist/solutions-components/p-04546ef6.js +0 -6
- package/dist/solutions-components/p-1adc6874.entry.js +0 -6
- package/dist/solutions-components/p-ba472e45.entry.js +0 -6
- package/dist/solutions-components/p-f99a78f1.entry.js +0 -6
- /package/dist/cjs/{esri-loader-1e8cc247.js → esri-loader-08dc41bd.js} +0 -0
- /package/dist/cjs/{typeof-eba0a941.js → typeof-2a7e2dec.js} +0 -0
- /package/dist/esm/{esri-loader-d10d860d.js → esri-loader-c6842c6b.js} +0 -0
- /package/dist/esm/{typeof-a3e780e1.js → typeof-ef2a007d.js} +0 -0
- /package/dist/solutions-components/{p-3b3f77bc.js → p-0a24ad5f.js} +0 -0
- /package/dist/solutions-components/{p-19bce2cc.js → p-4fe489cf.js} +0 -0
@@ -3,7 +3,7 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import{c as t}from"./p-d4056c1c.js";import{_ as r,a as e}from"./p-f93a9d92.js";import"./p-19bce2cc.js";var i=function(t){return t&&t.Math===Math&&t},n=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof t&&t)||i("object"==typeof t&&t)||function(){return this}()||Function("return this")(),s={},a=function(t){try{return!!t()}catch(t){return!0}},o=!a((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),h=!a((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),u=Function.prototype.call,c=h?u.bind(u):function(){return u.apply(u,arguments)},f={},l={}.propertyIsEnumerable,v=Object.getOwnPropertyDescriptor,d=v&&!l.call({1:2},1);f.f=d?function(t){var r=v(this,t);return!!r&&r.enumerable}:l;var p,y,g=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}},m=h,b=Function.prototype,w=b.call,x=m&&b.bind.bind(w,w),M=m?x:function(t){return function(){return w.apply(t,arguments)}},k=M,N=k({}.toString),S=k("".slice),O=function(t){return S(N(t),8,-1)},P=a,j=O,E=Object,C=M("".split),T=P((function(){return!E("z").propertyIsEnumerable(0)}))?function(t){return"String"===j(t)?C(t,""):E(t)}:E,A=function(t){return null==t},R=A,B=TypeError,$=function(t){if(R(t))throw new B("Can't call method on "+t);return t},D=T,L=$,F=function(t){return D(L(t))},I="object"==typeof document&&document.all,z=void 0===I&&void 0!==I?function(t){return"function"==typeof t||t===I}:function(t){return"function"==typeof t},_=z,Y=function(t){return"object"==typeof t?null!==t:_(t)},X=n,U=z,q=function(t,r){return arguments.length<2?U(e=X[t])?e:void 0:X[t]&&X[t][r];var e},G=M({}.isPrototypeOf),V=n.navigator,H=V&&V.userAgent,W=H?String(H):"",Q=W,Z=n.process,K=n.Deno,J=Z&&Z.versions||K&&K.version,tt=J&&J.v8;tt&&(y=(p=tt.split("."))[0]>0&&p[0]<4?1:+(p[0]+p[1])),!y&&Q&&(!(p=Q.match(/Edge\/(\d+)/))||p[1]>=74)&&(p=Q.match(/Chrome\/(\d+)/))&&(y=+p[1]);var rt=y,et=rt,it=n.String,nt=!!Object.getOwnPropertySymbols&&!a((function(){var t=Symbol("symbol detection");return!it(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&et&&et<41})),st=nt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,at=q,ot=z,ht=G,ut=Object,ct=st?function(t){return"symbol"==typeof t}:function(t){var r=at("Symbol");return ot(r)&&ht(r.prototype,ut(t))},ft=String,lt=function(t){try{return ft(t)}catch(t){return"Object"}},vt=z,dt=lt,pt=TypeError,yt=function(t){if(vt(t))return t;throw new pt(dt(t)+" is not a function")},gt=yt,mt=A,bt=function(t,r){var e=t[r];return mt(e)?void 0:gt(e)},wt=c,xt=z,Mt=Y,kt=TypeError,Nt={exports:{}},St=n,Ot=Object.defineProperty,Pt=function(t,r){try{Ot(St,t,{value:r,configurable:!0,writable:!0})}catch(e){St[t]=r}return r},jt="__core-js_shared__",Et=Nt.exports=n[jt]||Pt(jt,{});(Et.versions||(Et.versions=[])).push({version:"3.40.0",mode:"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.40.0/LICENSE",source:"https://github.com/zloirock/core-js"});var Ct=Nt.exports,Tt=function(t,r){return Ct[t]||(Ct[t]=r||{})},At=$,Rt=Object,Bt=function(t){return Rt(At(t))},$t=Bt,Dt=M({}.hasOwnProperty),Lt=Object.hasOwn||function(t,r){return Dt($t(t),r)},Ft=M,It=0,zt=Math.random(),_t=Ft(1..toString),Yt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+_t(++It+zt,36)},Xt=Lt,Ut=Yt,qt=nt,Gt=st,Vt=n.Symbol,Ht=Tt("wks"),Wt=Gt?Vt.for||Vt:Vt&&Vt.withoutSetter||Ut,Qt=function(t){return Xt(Ht,t)||(Ht[t]=qt&&Xt(Vt,t)?Vt[t]:Wt("Symbol."+t)),Ht[t]},Zt=c,Kt=Y,Jt=ct,tr=bt,rr=TypeError,er=Qt("toPrimitive"),ir=function(t,r){if(!Kt(t)||Jt(t))return t;var e,i=tr(t,er);if(i){if(void 0===r&&(r="default"),e=Zt(i,t,r),!Kt(e)||Jt(e))return e;throw new rr("Can't convert object to primitive value")}return void 0===r&&(r="number"),function(t,r){var e,i;if("string"===r&&xt(e=t.toString)&&!Mt(i=wt(e,t)))return i;if(xt(e=t.valueOf)&&!Mt(i=wt(e,t)))return i;if("string"!==r&&xt(e=t.toString)&&!Mt(i=wt(e,t)))return i;throw new kt("Can't convert object to primitive value")}(t,r)},nr=ct,sr=function(t){var r=ir(t,"string");return nr(r)?r:r+""},ar=Y,or=n.document,hr=ar(or)&&ar(or.createElement),ur=function(t){return hr?or.createElement(t):{}},cr=ur,fr=!o&&!a((function(){return 7!==Object.defineProperty(cr("div"),"a",{get:function(){return 7}}).a})),lr=c,vr=f,dr=g,pr=F,yr=sr,gr=Lt,mr=fr,br=Object.getOwnPropertyDescriptor;s.f=o?br:function(t,r){if(t=pr(t),r=yr(r),mr)try{return br(t,r)}catch(t){}if(gr(t,r))return dr(!lr(vr.f,t,r),t[r])};var wr={},xr=o&&a((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Mr=Y,kr=String,Nr=TypeError,Sr=function(t){if(Mr(t))return t;throw new Nr(kr(t)+" is not an object")},Or=fr,Pr=Sr,jr=sr,Er=TypeError,Cr=Object.defineProperty,Tr=Object.getOwnPropertyDescriptor,Ar="enumerable",Rr="configurable",Br="writable";wr.f=o?xr?function(t,r,e){if(Pr(t),r=jr(r),Pr(e),"function"==typeof t&&"prototype"===r&&"value"in e&&Br in e&&!e[Br]){var i=Tr(t,r);i&&i[Br]&&(t[r]=e.value,e={configurable:Rr in e?e[Rr]:i[Rr],enumerable:Ar in e?e[Ar]:i[Ar],writable:!1})}return Cr(t,r,e)}:Cr:function(t,r,e){if(Pr(t),r=jr(r),Pr(e),Or)try{return Cr(t,r,e)}catch(t){}if("get"in e||"set"in e)throw new Er("Accessors not supported");return"value"in e&&(t[r]=e.value),t};var $r=wr,Dr=g,Lr=o?function(t,r,e){return $r.f(t,r,Dr(1,e))}:function(t,r,e){return t[r]=e,t},Fr={exports:{}},Ir=o,zr=Function.prototype,_r=Ir&&Object.getOwnPropertyDescriptor,Yr=Lt(zr,"name"),Xr={EXISTS:Yr,PROPER:Yr&&"something"===function(){}.name,CONFIGURABLE:Yr&&(!Ir||Ir&&_r(zr,"name").configurable)},Ur=z,qr=Nt.exports,Gr=M(Function.toString);Ur(qr.inspectSource)||(qr.inspectSource=function(t){return Gr(t)});var Vr,Hr,Wr,Qr=qr.inspectSource,Zr=n.WeakMap,Kr=z(Zr)&&/native code/.test(String(Zr)),Jr=Yt,te=Tt("keys"),re=function(t){return te[t]||(te[t]=Jr(t))},ee={},ie=Y,ne=Lr,se=Lt,ae=Nt.exports,oe=re,he=ee,ue="Object already initialized",ce=n.TypeError;if(Kr||ae.state){var fe=ae.state||(ae.state=new(0,n.WeakMap));fe.get=fe.get,fe.has=fe.has,fe.set=fe.set,Vr=function(t,r){if(fe.has(t))throw new ce(ue);return r.facade=t,fe.set(t,r),r},Hr=function(t){return fe.get(t)||{}},Wr=function(t){return fe.has(t)}}else{var le=oe("state");he[le]=!0,Vr=function(t,r){if(se(t,le))throw new ce(ue);return r.facade=t,ne(t,le,r),r},Hr=function(t){return se(t,le)?t[le]:{}},Wr=function(t){return se(t,le)}}var ve={set:Vr,get:Hr,has:Wr,enforce:function(t){return Wr(t)?Hr(t):Vr(t,{})},getterFor:function(t){return function(r){var e;if(!ie(r)||(e=Hr(r)).type!==t)throw new ce("Incompatible receiver, "+t+" required");return e}}},de=M,pe=a,ye=z,ge=Lt,me=o,be=Xr.CONFIGURABLE,we=Qr,xe=ve.enforce,Me=ve.get,ke=String,Ne=Object.defineProperty,Se=de("".slice),Oe=de("".replace),Pe=de([].join),je=me&&!pe((function(){return 8!==Ne((function(){}),"length",{value:8}).length})),Ee=String(String).split("String"),Ce=Fr.exports=function(t,r,e){"Symbol("===Se(ke(r),0,7)&&(r="["+Oe(ke(r),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),e&&e.getter&&(r="get "+r),e&&e.setter&&(r="set "+r),(!ge(t,"name")||be&&t.name!==r)&&(me?Ne(t,"name",{value:r,configurable:!0}):t.name=r),je&&e&&ge(e,"arity")&&t.length!==e.arity&&Ne(t,"length",{value:e.arity});try{e&&ge(e,"constructor")&&e.constructor?me&&Ne(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var i=xe(t);return ge(i,"source")||(i.source=Pe(Ee,"string"==typeof r?r:"")),t};Function.prototype.toString=Ce((function(){return ye(this)&&Me(this).source||we(this)}),"toString");var Te=z,Ae=wr,Re=Fr.exports,Be=Pt,$e=function(t,r,e,i){i||(i={});var n=i.enumerable,s=void 0!==i.name?i.name:r;if(Te(e)&&Re(e,s,i),i.global)n?t[r]=e:Be(r,e);else{try{i.unsafe?t[r]&&(n=!0):delete t[r]}catch(t){}n?t[r]=e:Ae.f(t,r,{value:e,enumerable:!1,configurable:!i.nonConfigurable,writable:!i.nonWritable})}return t},De={},Le=Math.ceil,Fe=Math.floor,Ie=Math.trunc||function(t){var r=+t;return(r>0?Fe:Le)(r)},ze=Ie,_e=function(t){var r=+t;return r!=r||0===r?0:ze(r)},Ye=_e,Xe=Math.max,Ue=Math.min,qe=_e,Ge=Math.min,Ve=function(t){var r=qe(t);return r>0?Ge(r,9007199254740991):0},He=Ve,We=function(t){return He(t.length)},Qe=F,Ze=We,Ke=function(t){return function(r,e,i){var n=Qe(r),s=Ze(n);if(0===s)return!t&&-1;var a,o=function(t,r){var e=Ye(t);return e<0?Xe(e+r,0):Ue(e,r)}(i,s);if(t&&e!=e){for(;s>o;)if((a=n[o++])!=a)return!0}else for(;s>o;o++)if((t||o in n)&&n[o]===e)return t||o||0;return!t&&-1}},Je={includes:Ke(!0),indexOf:Ke(!1)},ti=Lt,ri=F,ei=Je.indexOf,ii=ee,ni=M([].push),si=function(t,r){var e,i=ri(t),n=0,s=[];for(e in i)!ti(ii,e)&&ti(i,e)&&ni(s,e);for(;r.length>n;)ti(i,e=r[n++])&&(~ei(s,e)||ni(s,e));return s},ai=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],oi=si,hi=ai.concat("length","prototype");De.f=Object.getOwnPropertyNames||function(t){return oi(t,hi)};var ui={};ui.f=Object.getOwnPropertySymbols;var ci=q,fi=De,li=ui,vi=Sr,di=M([].concat),pi=ci("Reflect","ownKeys")||function(t){var r=fi.f(vi(t)),e=li.f;return e?di(r,e(t)):r},yi=Lt,gi=pi,mi=s,bi=wr,wi=a,xi=z,Mi=/#|\.prototype\./,ki=function(t,r){var e=Si[Ni(t)];return e===Pi||e!==Oi&&(xi(r)?wi(r):!!r)},Ni=ki.normalize=function(t){return String(t).replace(Mi,".").toLowerCase()},Si=ki.data={},Oi=ki.NATIVE="N",Pi=ki.POLYFILL="P",ji=ki,Ei=n,Ci=s.f,Ti=Lr,Ai=$e,Ri=Pt,Bi=function(t,r,e){for(var i=gi(r),n=bi.f,s=mi.f,a=0;a<i.length;a++){var o=i[a];yi(t,o)||e&&yi(e,o)||n(t,o,s(r,o))}},$i=ji,Di=function(t,r){var e,i,n,s,a,o=t.target,h=t.global,u=t.stat;if(e=h?Ei:u?Ei[o]||Ri(o,{}):Ei[o]&&Ei[o].prototype)for(i in r){if(s=r[i],n=t.dontCallGetSet?(a=Ci(e,i))&&a.value:e[i],!$i(h?i:o+(u?".":"#")+i,t.forced)&&void 0!==n){if(typeof s==typeof n)continue;Bi(s,n)}(t.sham||n&&n.sham)&&Ti(s,"sham",!0),Ai(e,i,s,t)}},Li=n,Fi=W,Ii=O,zi=function(t){return Fi.slice(0,t.length)===t},_i=zi("Bun/")?"BUN":zi("Cloudflare-Workers")?"CLOUDFLARE":zi("Deno/")?"DENO":zi("Node.js/")?"NODE":Li.Bun&&"string"==typeof Bun.version?"BUN":Li.Deno&&"object"==typeof Deno.version?"DENO":"process"===Ii(Li.process)?"NODE":Li.window&&Li.document?"BROWSER":"REST",Yi="NODE"===_i,Xi=M,Ui=yt,qi=Y,Gi=String,Vi=TypeError,Hi=Y,Wi=$,Qi=function(t){if(function(t){return qi(t)||null===t}(t))return t;throw new Vi("Can't set "+Gi(t)+" as a prototype")},Zi=Object.setPrototypeOf||("__proto__"in{}?function(){var t,r=!1,e={};try{(t=function(t,r,e){try{return Xi(Ui(Object.getOwnPropertyDescriptor(t,r)[e]))}catch(t){}}(Object.prototype,"__proto__","set"))(e,[]),r=e instanceof Array}catch(t){}return function(e,i){return Wi(e),Qi(i),Hi(e)?(r?t(e,i):e.__proto__=i,e):e}}():void 0),Ki=wr.f,Ji=Lt,tn=Qt("toStringTag"),rn=function(t,r,e){t&&!e&&(t=t.prototype),t&&!Ji(t,tn)&&Ki(t,tn,{configurable:!0,value:r})},en=Fr.exports,nn=wr,sn=q,an=o,on=Qt("species"),hn=G,un=TypeError,cn={};cn[Qt("toStringTag")]="z";var fn="[object z]"===String(cn),ln=z,vn=O,dn=Qt("toStringTag"),pn=Object,yn="Arguments"===vn(function(){return arguments}()),gn=fn?vn:function(t){var r,e,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=function(t,r){try{return t[r]}catch(t){}}(r=pn(t),dn))?e:yn?vn(r):"Object"===(i=vn(r))&&ln(r.callee)?"Arguments":i},mn=M,bn=a,wn=z,xn=gn,Mn=Qr,kn=function(){},Nn=q("Reflect","construct"),Sn=/^\s*(?:class|function)\b/,On=mn(Sn.exec),Pn=!Sn.test(kn),jn=function(t){if(!wn(t))return!1;try{return Nn(kn,[],t),!0}catch(t){return!1}},En=function(t){if(!wn(t))return!1;switch(xn(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Pn||!!On(Sn,Mn(t))}catch(t){return!0}};En.sham=!0;var Cn,Tn,An,Rn,Bn=!Nn||bn((function(){var t;return jn(jn.call)||!jn(Object)||!jn((function(){t=!0}))||t}))?En:jn,$n=Bn,Dn=lt,Ln=TypeError,Fn=Sr,In=A,zn=Qt("species"),_n=function(t,r){var e,i=Fn(t).constructor;return void 0===i||In(e=Fn(i)[zn])?r:function(t){if($n(t))return t;throw new Ln(Dn(t)+" is not a constructor")}(e)},Yn=Function.prototype,Xn=Yn.apply,Un=Yn.call,qn="object"==typeof Reflect&&Reflect.apply||(h?Un.bind(Xn):function(){return Un.apply(Xn,arguments)}),Gn=O,Vn=M,Hn=function(t){if("Function"===Gn(t))return Vn(t)},Wn=yt,Qn=h,Zn=Hn(Hn.bind),Kn=function(t,r){return Wn(t),void 0===r?t:Qn?Zn(t,r):function(){return t.apply(r,arguments)}},Jn=q("document","documentElement"),ts=M([].slice),rs=TypeError,es=/(?:ipad|iphone|ipod).*applewebkit/i.test(W),is=n,ns=qn,ss=Kn,as=z,os=Lt,hs=a,us=Jn,cs=ts,fs=ur,ls=es,vs=Yi,ds=is.setImmediate,ps=is.clearImmediate,ys=is.process,gs=is.Dispatch,ms=is.Function,bs=is.MessageChannel,ws=is.String,xs=0,Ms={},ks="onreadystatechange";hs((function(){Cn=is.location}));var Ns=function(t){if(os(Ms,t)){var r=Ms[t];delete Ms[t],r()}},Ss=function(t){return function(){Ns(t)}},Os=function(t){Ns(t.data)},Ps=function(t){is.postMessage(ws(t),Cn.protocol+"//"+Cn.host)};ds&&ps||(ds=function(t){!function(t,r){if(t<r)throw new rs("Not enough arguments")}(arguments.length,1);var r=as(t)?t:ms(t),e=cs(arguments,1);return Ms[++xs]=function(){ns(r,void 0,e)},Tn(xs),xs},ps=function(t){delete Ms[t]},vs?Tn=function(t){ys.nextTick(Ss(t))}:gs&&gs.now?Tn=function(t){gs.now(Ss(t))}:bs&&!ls?(Rn=(An=new bs).port2,An.port1.onmessage=Os,Tn=ss(Rn.postMessage,Rn)):is.addEventListener&&as(is.postMessage)&&!is.importScripts&&Cn&&"file:"!==Cn.protocol&&!hs(Ps)?(Tn=Ps,is.addEventListener("message",Os,!1)):Tn=ks in fs("script")?function(t){us.appendChild(fs("script"))[ks]=function(){us.removeChild(this),Ns(t)}}:function(t){setTimeout(Ss(t),0)});var js={set:ds,clear:ps},Es=n,Cs=o,Ts=Object.getOwnPropertyDescriptor,As=function(){this.head=null,this.tail=null};As.prototype={add:function(t){var r={item:t,next:null},e=this.tail;e?e.next=r:this.head=r,this.tail=r},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var Rs,Bs,$s,Ds,Ls,Fs=As,Is=/ipad|iphone|ipod/i.test(W)&&"undefined"!=typeof Pebble,zs=/web0s(?!.*chrome)/i.test(W),_s=n,Ys=Kn,Xs=js.set,Us=Fs,qs=es,Gs=Is,Vs=zs,Hs=Yi,Ws=_s.MutationObserver||_s.WebKitMutationObserver,Qs=_s.document,Zs=_s.process,Ks=_s.Promise,Js=function(t){if(!Cs)return Es[t];var r=Ts(Es,t);return r&&r.value}("queueMicrotask");if(!Js){var ta=new Us,ra=function(){var t,r;for(Hs&&(t=Zs.domain)&&t.exit();r=ta.get();)try{r()}catch(t){throw ta.head&&Rs(),t}t&&t.enter()};qs||Hs||Vs||!Ws||!Qs?!Gs&&Ks&&Ks.resolve?((Ds=Ks.resolve(void 0)).constructor=Ks,Ls=Ys(Ds.then,Ds),Rs=function(){Ls(ra)}):Hs?Rs=function(){Zs.nextTick(ra)}:(Xs=Ys(Xs,_s),Rs=function(){Xs(ra)}):(Bs=!0,$s=Qs.createTextNode(""),new Ws(ra).observe($s,{characterData:!0}),Rs=function(){$s.data=Bs=!Bs}),Js=function(t){ta.head||Rs(),ta.add(t)}}var ea=Js,ia=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},na=n.Promise,sa=n,aa=na,oa=z,ha=ji,ua=Qr,ca=_i,fa=rt,la=Qt("species"),va=!1,da=oa(sa.PromiseRejectionEvent),pa=ha("Promise",(function(){var t=ua(aa),r=t!==String(aa);if(!r&&66===fa)return!0;if(!fa||fa<51||!/native code/.test(t)){var e=new aa((function(t){t(1)})),i=function(t){t((function(){}),(function(){}))};if((e.constructor={})[la]=i,!(va=e.then((function(){}))instanceof i))return!0}return!(r||"BROWSER"!==ca&&"DENO"!==ca||da)})),ya={CONSTRUCTOR:pa,REJECTION_EVENT:da,SUBCLASSING:va},ga={},ma=yt,ba=TypeError,wa=function(t){var r,e;this.promise=new t((function(t,i){if(void 0!==r||void 0!==e)throw new ba("Bad Promise constructor");r=t,e=i})),this.resolve=ma(r),this.reject=ma(e)};ga.f=function(t){return new wa(t)};var xa,Ma,ka,Na,Sa=Di,Oa=Yi,Pa=n,ja=c,Ea=$e,Ca=Zi,Ta=rn,Aa=yt,Ra=z,Ba=Y,$a=_n,Da=js.set,La=ea,Fa=ia,Ia=Fs,za=ve,_a=na,Ya=ga,Xa="Promise",Ua=ya.CONSTRUCTOR,qa=ya.REJECTION_EVENT,Ga=ya.SUBCLASSING,Va=za.getterFor(Xa),Ha=za.set,Wa=_a&&_a.prototype,Qa=_a,Za=Wa,Ka=Pa.TypeError,Ja=Pa.document,to=Pa.process,ro=Ya.f,eo=ro,io=!!(Ja&&Ja.createEvent&&Pa.dispatchEvent),no="unhandledrejection",so=function(t){var r;return!(!Ba(t)||!Ra(r=t.then))&&r},ao=function(t,r){var e,i,n,s=r.value,a=1===r.state,o=a?t.ok:t.fail,h=t.resolve,u=t.reject,c=t.domain;try{o?(a||(2===r.rejection&&fo(r),r.rejection=1),!0===o?e=s:(c&&c.enter(),e=o(s),c&&(c.exit(),n=!0)),e===t.promise?u(new Ka("Promise-chain cycle")):(i=so(e))?ja(i,e,h,u):h(e)):u(s)}catch(t){c&&!n&&c.exit(),u(t)}},oo=function(t,r){t.notified||(t.notified=!0,La((function(){for(var e,i=t.reactions;e=i.get();)ao(e,t);t.notified=!1,r&&!t.rejection&&uo(t)})))},ho=function(t,r,e){var i,n;io?((i=Ja.createEvent("Event")).promise=r,i.reason=e,i.initEvent(t,!1,!0),Pa.dispatchEvent(i)):i={promise:r,reason:e},!qa&&(n=Pa["on"+t])?n(i):t===no&&function(t,r){try{1===arguments.length?console.error(t):console.error(t,r)}catch(t){}}("Unhandled promise rejection",e)},uo=function(t){ja(Da,Pa,(function(){var r,e=t.facade,i=t.value;if(co(t)&&(r=Fa((function(){Oa?to.emit("unhandledRejection",i,e):ho(no,e,i)})),t.rejection=Oa||co(t)?2:1,r.error))throw r.value}))},co=function(t){return 1!==t.rejection&&!t.parent},fo=function(t){ja(Da,Pa,(function(){var r=t.facade;Oa?to.emit("rejectionHandled",r):ho("rejectionhandled",r,t.value)}))},lo=function(t,r,e){return function(i){t(r,i,e)}},vo=function(t,r,e){t.done||(t.done=!0,e&&(t=e),t.value=r,t.state=2,oo(t,!0))},po=function(t,r,e){if(!t.done){t.done=!0,e&&(t=e);try{if(t.facade===r)throw new Ka("Promise can't be resolved itself");var i=so(r);i?La((function(){var e={done:!1};try{ja(i,r,lo(po,e,t),lo(vo,e,t))}catch(r){vo(e,r,t)}})):(t.value=r,t.state=1,oo(t,!1))}catch(r){vo({done:!1},r,t)}}};if(Ua&&(Qa=function(t){(function(t,r){if(hn(r,t))return t;throw new un("Incorrect invocation")})(this,Za),Aa(t),ja(xa,this);var r=Va(this);try{t(lo(po,r),lo(vo,r))}catch(t){vo(r,t)}},(xa=function(){Ha(this,{type:Xa,done:!1,notified:!1,parent:!1,reactions:new Ia,rejection:!1,state:0,value:null})}).prototype=Ea(Za=Qa.prototype,"then",(function(t,r){var e=Va(this),i=ro($a(this,Qa));return e.parent=!0,i.ok=!Ra(t)||t,i.fail=Ra(r)&&r,i.domain=Oa?to.domain:void 0,0===e.state?e.reactions.add(i):La((function(){ao(i,e)})),i.promise})),Ma=function(){var t=new xa,r=Va(t);this.promise=t,this.resolve=lo(po,r),this.reject=lo(vo,r)},Ya.f=ro=function(t){return t===Qa||void 0===t?new Ma(t):eo(t)},Ra(_a)&&Wa!==Object.prototype)){ka=Wa.then,Ga||Ea(Wa,"then",(function(t,r){var e=this;return new Qa((function(t,r){ja(ka,e,t,r)})).then(t,r)}),{unsafe:!0});try{delete Wa.constructor}catch(t){}Ca&&Ca(Wa,Za)}Sa({global:!0,constructor:!0,wrap:!0,forced:Ua},{Promise:Qa}),Ta(Qa,Xa,!1),Na=sn(Xa),an&&Na&&!Na[on]&&function(t,r,e){e.get&&en(e.get,r,{getter:!0}),e.set&&en(e.set,r,{setter:!0}),nn.f(t,r,e)}(Na,on,{configurable:!0,get:function(){return this}});var yo={},go=yo,mo=Qt("iterator"),bo=Array.prototype,wo=gn,xo=bt,Mo=A,ko=yo,No=Qt("iterator"),So=function(t){if(!Mo(t))return xo(t,No)||xo(t,"@@iterator")||ko[wo(t)]},Oo=c,Po=yt,jo=Sr,Eo=lt,Co=So,To=TypeError,Ao=c,Ro=Sr,Bo=bt,$o=Kn,Do=c,Lo=Sr,Fo=lt,Io=We,zo=G,_o=So,Yo=function(t,r,e){var i,n;Ro(t);try{if(!(i=Bo(t,"return"))){if("throw"===r)throw e;return e}i=Ao(i,t)}catch(t){n=!0,i=t}if("throw"===r)throw e;if(n)throw i;return Ro(i),e},Xo=TypeError,Uo=function(t,r){this.stopped=t,this.result=r},qo=Uo.prototype,Go=function(t,r,e){var i,n,s,a,o,h,u,c,f=!(!e||!e.AS_ENTRIES),l=!(!e||!e.IS_RECORD),v=!(!e||!e.IS_ITERATOR),d=!(!e||!e.INTERRUPTED),p=$o(r,e&&e.that),y=function(t){return i&&Yo(i,"normal",t),new Uo(!0,t)},g=function(t){return f?(Lo(t),d?p(t[0],t[1],y):p(t[0],t[1])):d?p(t,y):p(t)};if(l)i=t.iterator;else if(v)i=t;else{if(!(n=_o(t)))throw new Xo(Fo(t)+" is not iterable");if(void 0!==(c=n)&&(go.Array===c||bo[mo]===c)){for(s=0,a=Io(t);a>s;s++)if((o=g(t[s]))&&zo(qo,o))return o;return new Uo(!1)}i=function(t,r){var e=arguments.length<2?Co(t):r;if(Po(e))return jo(Oo(e,t));throw new To(Eo(t)+" is not iterable")}(t,n)}for(h=l?t.next:i.next;!(u=Do(h,i)).done;){try{o=g(u.value)}catch(t){Yo(i,"throw",t)}if("object"==typeof o&&o&&zo(qo,o))return o}return new Uo(!1)},Vo=Qt("iterator"),Ho=!1;try{var Wo=0,Qo={next:function(){return{done:!!Wo++}},return:function(){Ho=!0}};Qo[Vo]=function(){return this},Array.from(Qo,(function(){throw 2}))}catch(t){}var Zo=na,Ko=ya.CONSTRUCTOR||!function(t,r){try{if(!r&&!Ho)return!1}catch(t){return!1}var e=!1;try{var i={};i[Vo]=function(){return{next:function(){return{done:e=!0}}}},t(i)}catch(t){}return e}((function(t){Zo.all(t).then(void 0,(function(){}))})),Jo=c,th=yt,rh=ga,eh=ia,ih=Go;Di({target:"Promise",stat:!0,forced:Ko},{all:function(t){var r=this,e=rh.f(r),i=e.resolve,n=e.reject,s=eh((function(){var e=th(r.resolve),s=[],a=0,o=1;ih(t,(function(t){var h=a++,u=!1;o++,Jo(e,r,t).then((function(t){u||(u=!0,s[h]=t,--o||i(s))}),n)})),--o||i(s)}));return s.error&&n(s.value),e.promise}});var nh=na,sh=q,ah=z,oh=$e,hh=nh&&nh.prototype;if(Di({target:"Promise",proto:!0,forced:ya.CONSTRUCTOR,real:!0},{catch:function(t){return this.then(void 0,t)}}),ah(nh)){var uh=sh("Promise").prototype.catch;hh.catch!==uh&&oh(hh,"catch",uh,{unsafe:!0})}var ch=c,fh=yt,lh=ga,vh=ia,dh=Go;Di({target:"Promise",stat:!0,forced:Ko},{race:function(t){var r=this,e=lh.f(r),i=e.reject,n=vh((function(){var n=fh(r.resolve);dh(t,(function(t){ch(n,r,t).then(e.resolve,i)}))}));return n.error&&i(n.value),e.promise}});var ph=ga;Di({target:"Promise",stat:!0,forced:ya.CONSTRUCTOR},{reject:function(t){var r=ph.f(this);return(0,r.reject)(t),r.promise}});var yh=Sr,gh=Y,mh=ga;Di({target:"Promise",stat:!0,forced:ya.CONSTRUCTOR},{resolve:function(t){return function(t,r){if(yh(t),gh(r)&&r.constructor===t)return r;var e=mh.f(t);return(0,e.resolve)(r),e.promise}(this,t)}});var bh=gn,wh=String,xh=function(t){if("Symbol"===bh(t))throw new TypeError("Cannot convert a Symbol value to a string");return wh(t)},Mh=Sr,kh=function(){var t=Mh(this),r="";return t.hasIndices&&(r+="d"),t.global&&(r+="g"),t.ignoreCase&&(r+="i"),t.multiline&&(r+="m"),t.dotAll&&(r+="s"),t.unicode&&(r+="u"),t.unicodeSets&&(r+="v"),t.sticky&&(r+="y"),r},Nh=a,Sh=n.RegExp,Oh=Nh((function(){var t=Sh("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),Ph=Oh||Nh((function(){return!Sh("a","y").sticky})),jh={BROKEN_CARET:Oh||Nh((function(){var t=Sh("^r","gy");return t.lastIndex=2,null!==t.exec("str")})),MISSED_STICKY:Ph,UNSUPPORTED_Y:Oh},Eh={},Ch=si,Th=ai,Ah=Object.keys||function(t){return Ch(t,Th)},Rh=wr,Bh=Sr,$h=F,Dh=Ah;Eh.f=o&&!xr?Object.defineProperties:function(t,r){Bh(t);for(var e,i=$h(r),n=Dh(r),s=n.length,a=0;s>a;)Rh.f(t,e=n[a++],i[e]);return t};var Lh,Fh=Sr,Ih=Eh,zh=ai,_h=ee,Yh=Jn,Xh=ur,Uh="prototype",qh="script",Gh=re("IE_PROTO"),Vh=function(){},Hh=function(t){return"<"+qh+">"+t+"</"+qh+">"},Wh=function(t){t.write(Hh("")),t.close();var r=t.parentWindow.Object;return t=null,r},Qh=function(){try{Lh=new ActiveXObject("htmlfile")}catch(t){}var t,r,e;Qh="undefined"!=typeof document?document.domain&&Lh?Wh(Lh):(r=Xh("iframe"),e="java"+qh+":",r.style.display="none",Yh.appendChild(r),r.src=String(e),(t=r.contentWindow.document).open(),t.write(Hh("document.F=Object")),t.close(),t.F):Wh(Lh);for(var i=zh.length;i--;)delete Qh[Uh][zh[i]];return Qh()};_h[Gh]=!0;var Zh,Kh,Jh=Object.create||function(t,r){var e;return null!==t?(Vh[Uh]=Fh(t),e=new Vh,Vh[Uh]=null,e[Gh]=t):e=Qh(),void 0===r?e:Ih.f(e,r)},tu=n.RegExp,ru=a((function(){var t=tu(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)})),eu=n.RegExp,iu=a((function(){var t=eu("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),nu=c,su=M,au=xh,ou=kh,hu=jh,uu=Jh,cu=ve.get,fu=ru,lu=iu,vu=Tt("native-string-replace",String.prototype.replace),du=RegExp.prototype.exec,pu=du,yu=su("".charAt),gu=su("".indexOf),mu=su("".replace),bu=su("".slice),wu=(Kh=/b*/g,nu(du,Zh=/a/,"a"),nu(du,Kh,"a"),0!==Zh.lastIndex||0!==Kh.lastIndex),xu=hu.BROKEN_CARET,Mu=void 0!==/()??/.exec("")[1];(wu||Mu||xu||fu||lu)&&(pu=function(t){var r,e,i,n,s,a,o,h=this,u=cu(h),c=au(t),f=u.raw;if(f)return f.lastIndex=h.lastIndex,r=nu(pu,f,c),h.lastIndex=f.lastIndex,r;var l=u.groups,v=xu&&h.sticky,d=nu(ou,h),p=h.source,y=0,g=c;if(v&&(d=mu(d,"y",""),-1===gu(d,"g")&&(d+="g"),g=bu(c,h.lastIndex),h.lastIndex>0&&(!h.multiline||h.multiline&&"\n"!==yu(c,h.lastIndex-1))&&(p="(?: "+p+")",g=" "+g,y++),e=new RegExp("^(?:"+p+")",d)),Mu&&(e=new RegExp("^"+p+"$(?!\\s)",d)),wu&&(i=h.lastIndex),n=nu(du,v?e:h,g),v?n?(n.input=bu(n.input,y),n[0]=bu(n[0],y),n.index=h.lastIndex,h.lastIndex+=n[0].length):h.lastIndex=0:wu&&n&&(h.lastIndex=h.global?n.index+n[0].length:i),Mu&&n&&n.length>1&&nu(vu,n[0],e,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(n[s]=void 0)})),n&&l)for(n.groups=a=uu(null),s=0;s<l.length;s++)a[(o=l[s])[0]]=n[o[1]];return n});var ku=pu;Di({target:"RegExp",proto:!0,forced:/./.exec!==ku},{exec:ku});var Nu=c,Su=$e,Ou=ku,Pu=a,ju=Qt,Eu=Lr,Cu=ju("species"),Tu=RegExp.prototype,Au=function(t,r,e,i){var n=ju(t),s=!Pu((function(){var r={};return r[n]=function(){return 7},7!==""[t](r)})),a=s&&!Pu((function(){var r=!1,e=/a/;return"split"===t&&((e={}).constructor={},e.constructor[Cu]=function(){return e},e.flags="",e[n]=/./[n]),e.exec=function(){return r=!0,null},e[n](""),!r}));if(!s||!a||e){var o=/./[n],h=r(n,""[t],(function(t,r,e,i,n){var a=r.exec;return a===Ou||a===Tu.exec?s&&!n?{done:!0,value:Nu(o,r,e,i)}:{done:!0,value:Nu(t,e,r,i)}:{done:!1}}));Su(String.prototype,t,h[0]),Su(Tu,n,h[1])}i&&Eu(Tu[n],"sham",!0)},Ru=M,Bu=_e,$u=xh,Du=$,Lu=Ru("".charAt),Fu=Ru("".charCodeAt),Iu=Ru("".slice),zu=function(t){return function(r,e){var i,n,s=$u(Du(r)),a=Bu(e),o=s.length;return a<0||a>=o?t?"":void 0:(i=Fu(s,a))<55296||i>56319||a+1===o||(n=Fu(s,a+1))<56320||n>57343?t?Lu(s,a):i:t?Iu(s,a,a+2):n-56320+(i-55296<<10)+65536}},_u=(zu(!1),zu(!0)),Yu=function(t,r,e){return r+(e?_u(t,r).length:1)},Xu=c,Uu=Sr,qu=z,Gu=O,Vu=ku,Hu=TypeError,Wu=function(t,r){var e=t.exec;if(qu(e)){var i=Xu(e,t,r);return null!==i&&Uu(i),i}if("RegExp"===Gu(t))return Xu(Vu,t,r);throw new Hu("RegExp#exec called on incompatible receiver")},Qu=c,Zu=Sr,Ku=A,Ju=Ve,tc=xh,rc=$,ec=bt,ic=Yu,nc=Wu;Au("match",(function(t,r,e){return[function(r){var e=rc(this),i=Ku(r)?void 0:ec(r,t);return i?Qu(i,r,e):new RegExp(r)[t](tc(e))},function(t){var i=Zu(this),n=tc(t),s=e(r,i,n);if(s.done)return s.value;if(!i.global)return nc(i,n);var a=i.unicode;i.lastIndex=0;for(var o,h=[],u=0;null!==(o=nc(i,n));){var c=tc(o[0]);h[u]=c,""===c&&(i.lastIndex=ic(n,Ju(i.lastIndex),a)),u++}return 0===u?null:h}]}));var sc=M,ac=Bt,oc=Math.floor,hc=sc("".charAt),uc=sc("".replace),cc=sc("".slice),fc=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,lc=/\$([$&'`]|\d{1,2})/g,vc=qn,dc=c,pc=M,yc=Au,gc=a,mc=Sr,bc=z,wc=A,xc=_e,Mc=Ve,kc=xh,Nc=$,Sc=Yu,Oc=bt,Pc=function(t,r,e,i,n,s){var a=e+t.length,o=i.length,h=lc;return void 0!==n&&(n=ac(n),h=fc),uc(s,h,(function(s,h){var u;switch(hc(h,0)){case"$":return"$";case"&":return t;case"`":return cc(r,0,e);case"'":return cc(r,a);case"<":u=n[cc(h,1,-1)];break;default:var c=+h;if(0===c)return s;if(c>o){var f=oc(c/10);return 0===f?s:f<=o?void 0===i[f-1]?hc(h,1):i[f-1]+hc(h,1):s}u=i[c-1]}return void 0===u?"":u}))},jc=Wu,Ec=Qt("replace"),Cc=Math.max,Tc=Math.min,Ac=pc([].concat),Rc=pc([].push),Bc=pc("".indexOf),$c=pc("".slice),Dc="$0"==="a".replace(/./,"$0"),Lc=!!/./[Ec]&&""===/./[Ec]("a","$0");yc("replace",(function(t,r,e){var i=Lc?"$":"$0";return[function(t,e){var i=Nc(this),n=wc(t)?void 0:Oc(t,Ec);return n?dc(n,t,i,e):dc(r,kc(i),t,e)},function(t,n){var s=mc(this),a=kc(t);if("string"==typeof n&&-1===Bc(n,i)&&-1===Bc(n,"$<")){var o=e(r,s,a,n);if(o.done)return o.value}var h=bc(n);h||(n=kc(n));var u,c=s.global;c&&(u=s.unicode,s.lastIndex=0);for(var f,l=[];null!==(f=jc(s,a))&&(Rc(l,f),c);)""===kc(f[0])&&(s.lastIndex=Sc(a,Mc(s.lastIndex),u));for(var v,d="",p=0,y=0;y<l.length;y++){for(var g,m=kc((f=l[y])[0]),b=Cc(Tc(xc(f.index),a.length),0),w=[],x=1;x<f.length;x++)Rc(w,void 0===(v=f[x])?v:String(v));var M=f.groups;if(h){var k=Ac([m],w,b,a);void 0!==M&&Rc(k,M),g=kc(vc(n,void 0,k))}else g=Pc(m,a,b,w,M,n);b>=p&&(d+=$c(a,p,b)+g,p=b+m.length)}return d+$c(a,p)}]}),!!gc((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!Dc||Lc);var Fc,Ic=Y,zc=O,_c=Qt("match"),Yc=TypeError,Xc=function(t){if(function(t){var r;return Ic(t)&&(void 0!==(r=t[_c])?!!r:"RegExp"===zc(t))}(t))throw new Yc("The method doesn't accept regular expressions");return t},Uc=Qt("match"),qc=function(t){var r=/./;try{"/./"[t](r)}catch(e){try{return r[Uc]=!1,"/./"[t](r)}catch(t){}}return!1},Gc=Di,Vc=s.f,Hc=Ve,Wc=xh,Qc=Xc,Zc=$,Kc=qc,Jc=Hn("".slice),tf=Math.min,rf=Kc("startsWith");Gc({target:"String",proto:!0,forced:!(!rf&&(Fc=Vc(String.prototype,"startsWith"),Fc&&!Fc.writable)||rf)},{startsWith:function(t){var r=Wc(Zc(this));Qc(t);var e=Hc(tf(arguments.length>1?arguments[1]:void 0,r.length)),i=Wc(t);return Jc(r,e,e+i.length)===i}});var ef=Jh,nf=wr.f,sf=Qt("unscopables"),af=Array.prototype;void 0===af[sf]&&nf(af,sf,{configurable:!0,value:ef(null)});var of,hf,uf,cf=!a((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),ff=Lt,lf=z,vf=Bt,df=cf,pf=re("IE_PROTO"),yf=Object,gf=yf.prototype,mf=df?yf.getPrototypeOf:function(t){var r=vf(t);if(ff(r,pf))return r[pf];var e=r.constructor;return lf(e)&&r instanceof e?e.prototype:r instanceof yf?gf:null},bf=a,wf=z,xf=Y,Mf=mf,kf=$e,Nf=Qt("iterator"),Sf=!1;[].keys&&("next"in(uf=[].keys())?(hf=Mf(Mf(uf)))!==Object.prototype&&(of=hf):Sf=!0);var Of=!xf(of)||bf((function(){var t={};return of[Nf].call(t)!==t}));Of&&(of={}),wf(of[Nf])||kf(of,Nf,(function(){return this}));var Pf={IteratorPrototype:of,BUGGY_SAFARI_ITERATORS:Sf},jf=Pf.IteratorPrototype,Ef=Jh,Cf=g,Tf=rn,Af=yo,Rf=function(){return this},Bf=Di,$f=c,Df=z,Lf=mf,Ff=Zi,If=rn,zf=Lr,_f=$e,Yf=yo,Xf=Xr.PROPER,Uf=Xr.CONFIGURABLE,qf=Pf.IteratorPrototype,Gf=Pf.BUGGY_SAFARI_ITERATORS,Vf=Qt("iterator"),Hf="keys",Wf="values",Qf="entries",Zf=function(){return this},Kf=F,Jf=function(t){af[sf][t]=!0},tl=yo,rl=wr.f,el=function(t,r){return{value:t,done:r}},il=o,nl="Array Iterator",sl=ve.set,al=ve.getterFor(nl),ol=function(t,r,e,i,n,s,a){!function(t,r,e,i){var n=r+" Iterator";t.prototype=Ef(jf,{next:Cf(+!i,e)}),Tf(t,n,!1),Af[n]=Rf}(e,r,i);var o,h,u,c=function(t){if(t===n&&p)return p;if(!Gf&&t&&t in v)return v[t];switch(t){case Hf:case Wf:case Qf:return function(){return new e(this,t)}}return function(){return new e(this)}},f=r+" Iterator",l=!1,v=t.prototype,d=v[Vf]||v["@@iterator"]||n&&v[n],p=!Gf&&d||c(n),y="Array"===r&&v.entries||d;if(y&&(o=Lf(y.call(new t)))!==Object.prototype&&o.next&&(Lf(o)!==qf&&(Ff?Ff(o,qf):Df(o[Vf])||_f(o,Vf,Zf)),If(o,f,!0)),Xf&&n===Wf&&d&&d.name!==Wf&&(Uf?zf(v,"name",Wf):(l=!0,p=function(){return $f(d,this)})),n)if(h={values:c(Wf),keys:s?p:c(Hf),entries:c(Qf)},a)for(u in h)(Gf||l||!(u in v))&&_f(v,u,h[u]);else Bf({target:r,proto:!0,forced:Gf||l},h);return v[Vf]!==p&&_f(v,Vf,p,{name:n}),Yf[r]=p,h}(Array,"Array",(function(t,r){sl(this,{type:nl,target:Kf(t),index:0,kind:r})}),(function(){var t=al(this),r=t.target,e=t.index++;if(!r||e>=r.length)return t.target=null,el(void 0,!0);switch(t.kind){case"keys":return el(e,!1);case"values":return el(r[e],!1)}return el([e,r[e]],!1)}),"values"),hl=tl.Arguments=tl.Array;if(Jf("keys"),Jf("values"),Jf("entries"),il&&"values"!==hl.name)try{rl(hl,"name",{value:"values"})}catch(t){}var ul=ur("span").classList,cl=ul&&ul.constructor&&ul.constructor.prototype,fl=n,ll={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},vl=cl===Object.prototype?void 0:cl,dl=ol,pl=Lr,yl=rn,gl=Qt("iterator"),ml=dl.values,bl=function(t,r){if(t){if(t[gl]!==ml)try{pl(t,gl,ml)}catch(r){t[gl]=ml}if(yl(t,r,!0),ll[r])for(var e in dl)if(t[e]!==dl[e])try{pl(t,e,dl[e])}catch(r){t[e]=dl[e]}}};for(var wl in ll)bl(fl[wl]&&fl[wl].prototype,wl);bl(vl,"DOMTokenList");var xl=yt,Ml=Bt,kl=T,Nl=We,Sl=TypeError,Ol="Reduce of empty array with no initial value",Pl=function(t){return function(r,e,i,n){var s=Ml(r),a=kl(s),o=Nl(s);if(xl(e),0===o&&i<2)throw new Sl(Ol);var h=t?o-1:0,u=t?-1:1;if(i<2)for(;;){if(h in a){n=a[h],h+=u;break}if(h+=u,t?h<0:o<=h)throw new Sl(Ol)}for(;t?h>=0:o>h;h+=u)h in a&&(n=e(n,a[h],h,s));return n}},jl={left:Pl(!1),right:Pl(!0)},El=a,Cl=function(t,r){var e=[][t];return!!e&&El((function(){e.call(null,r||function(){return 1},1)}))},Tl=jl.left;Di({target:"Array",proto:!0,forced:!Yi&&rt>79&&rt<83||!Cl("reduce")},{reduce:function(t){var r=arguments.length;return Tl(this,t,r,r>1?arguments[1]:void 0)}});var Al=Di,Rl=s.f,Bl=Ve,$l=xh,Dl=Xc,Ll=$,Fl=qc,Il=Hn("".slice),zl=Math.min,_l=Fl("endsWith"),Yl=!_l&&!!function(){var t=Rl(String.prototype,"endsWith");return t&&!t.writable}();Al({target:"String",proto:!0,forced:!Yl&&!_l},{endsWith:function(t){var r=$l(Ll(this));Dl(t);var e=arguments.length>1?arguments[1]:void 0,i=r.length,n=void 0===e?i:zl(Bl(e),i),s=$l(t);return Il(r,n-s.length,n)===s}});var Xl=c,Ul=M,ql=Au,Gl=Sr,Vl=A,Hl=$,Wl=_n,Ql=Yu,Zl=Ve,Kl=xh,Jl=bt,tv=Wu,rv=a,ev=jh.UNSUPPORTED_Y,iv=Math.min,nv=Ul([].push),sv=Ul("".slice),av=!rv((function(){var t=/(?:)/,r=t.exec;t.exec=function(){return r.apply(this,arguments)};var e="ab".split(t);return 2!==e.length||"a"!==e[0]||"b"!==e[1]})),ov="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length;ql("split",(function(t,r,e){var i="0".split(void 0,0).length?function(t,e){return void 0===t&&0===e?[]:Xl(r,this,t,e)}:r;return[function(r,e){var n=Hl(this),s=Vl(r)?void 0:Jl(r,t);return s?Xl(s,r,n,e):Xl(i,Kl(n),r,e)},function(t,n){var s=Gl(this),a=Kl(t);if(!ov){var o=e(i,s,a,n,i!==r);if(o.done)return o.value}var h=Wl(s,RegExp),u=s.unicode,c=new h(ev?"^(?:"+s.source+")":s,(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(ev?"g":"y")),f=void 0===n?4294967295:n>>>0;if(0===f)return[];if(0===a.length)return null===tv(c,a)?[a]:[];for(var l=0,v=0,d=[];v<a.length;){c.lastIndex=ev?0:v;var p,y=tv(c,ev?sv(a,v):a);if(null===y||(p=iv(Zl(c.lastIndex+(ev?v:0)),a.length))===l)v=Ql(a,v,u);else{if(nv(d,sv(a,l,v)),d.length===f)return d;for(var g=1;g<=y.length-1;g++)if(nv(d,y[g]),d.length===f)return d;v=l=p}}return nv(d,sv(a,l)),d}]}),ov||!av,ev);var hv={exports:{}},uv={exports:{}};(function(){var t,r,e,i,n,s;"undefined"!=typeof performance&&null!==performance&&performance.now?uv.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(uv.exports=function(){return(t()-n)/1e6},r=process.hrtime,i=(t=function(){var t;return 1e9*(t=r())[0]+t[1]})(),s=1e9*process.uptime(),n=i-s):Date.now?(uv.exports=function(){return Date.now()-e},e=Date.now()):(uv.exports=function(){return(new Date).getTime()-e},e=(new Date).getTime())}).call(t);for(var cv=uv.exports,fv="undefined"==typeof window?t:window,lv=["moz","webkit"],vv="AnimationFrame",dv=fv["request"+vv],pv=fv["cancel"+vv]||fv["cancelRequest"+vv],yv=0;!dv&&yv<lv.length;yv++)dv=fv[lv[yv]+"Request"+vv],pv=fv[lv[yv]+"Cancel"+vv]||fv[lv[yv]+"CancelRequest"+vv];if(!dv||!pv){var gv=0,mv=0,bv=[],wv=1e3/60;dv=function(t){if(0===bv.length){var r=cv(),e=Math.max(0,wv-(r-gv));gv=e+r,setTimeout((function(){var t=bv.slice(0);bv.length=0;for(var r=0;r<t.length;r++)if(!t[r].cancelled)try{t[r].callback(gv)}catch(t){setTimeout((function(){throw t}),0)}}),Math.round(e))}return bv.push({handle:++mv,callback:t,cancelled:!1}),mv},pv=function(t){for(var r=0;r<bv.length;r++)bv[r].handle===t&&(bv[r].cancelled=!0)}}hv.exports=function(t){return dv.call(fv,t)},hv.exports.cancel=function(){pv.apply(fv,arguments)},hv.exports.polyfill=function(t){t||(t=fv),t.requestAnimationFrame=dv,t.cancelAnimationFrame=pv};const xv=hv.exports;var Mv,kv="\t\n\v\f\r \u2028\u2029\ufeff",Nv=$,Sv=xh,Ov=kv,Pv=M("".replace),jv=RegExp("^["+Ov+"]+"),Ev=RegExp("(^|[^"+Ov+"])["+Ov+"]+$"),Cv=function(t){return function(r){var e=Sv(Nv(r));return 1&t&&(e=Pv(e,jv,"")),2&t&&(e=Pv(e,Ev,"$1")),e}},Tv={start:Cv(1),end:Cv(2),trim:Cv(3)},Av=Xr.PROPER,Rv=kv,Bv=Tv.trim;Di({target:"String",proto:!0,forced:(Mv="trim",a((function(){return!!Rv[Mv]()||"
"!=="
"[Mv]()||Av&&Rv[Mv].name!==Mv})))},{trim:function(){return Bv(this)}});var $v=function(t){this.ok=!1,this.alpha=1,"#"==t.charAt(0)&&(t=t.substr(1,6)),t=(t=t.replace(/ /g,"")).toLowerCase();var r={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};t=r[t]||t;for(var e=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3]),parseFloat(t[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],i=0;i<e.length;i++){var n=e[i].process,s=e[i].re.exec(t);if(s){var a=n(s);this.r=a[0],this.g=a[1],this.b=a[2],a.length>3&&(this.alpha=a[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var t=this.r.toString(16),r=this.g.toString(16),e=this.b.toString(16);return 1==t.length&&(t="0"+t),1==r.length&&(r="0"+r),1==e.length&&(e="0"+e),"#"+t+r+e},this.getHelpXML=function(){for(var t=new Array,i=0;i<e.length;i++)for(var n=e[i].example,s=0;s<n.length;s++)t[t.length]=n[s];for(var a in r)t[t.length]=a;var o=document.createElement("ul");for(o.setAttribute("id","rgbcolor-examples"),i=0;i<t.length;i++)try{var h=document.createElement("li"),u=new RGBColor(t[i]),c=document.createElement("div");c.style.cssText="margin: 3px; border: 1px solid black; background:"+u.toHex()+"; color:"+u.toHex(),c.appendChild(document.createTextNode("test"));var f=document.createTextNode(" "+t[i]+" -> "+u.toRGB()+" -> "+u.toHex());h.appendChild(c),h.appendChild(f),o.appendChild(h)}catch(t){}return o}},Dv=Di,Lv=Je.indexOf,Fv=Cl,Iv=Hn([].indexOf),zv=!!Iv&&1/Iv([1],1,-0)<0;Dv({target:"Array",proto:!0,forced:zv||!Fv("indexOf")},{indexOf:function(t){var r=arguments.length>1?arguments[1]:void 0;return zv?Iv(this,t,r)||0:Lv(this,t,r)}});var _v=Di,Yv=Xc,Xv=$,Uv=xh,qv=qc,Gv=M("".indexOf);_v({target:"String",proto:!0,forced:!qv("includes")},{includes:function(t){return!!~Gv(Uv(Xv(this)),Uv(Yv(t)),arguments.length>1?arguments[1]:void 0)}});var Vv=O,Hv=Di,Wv=Array.isArray||function(t){return"Array"===Vv(t)},Qv=M([].reverse),Zv=[1,2];Hv({target:"Array",proto:!0,forced:String(Zv)===String(Zv.reverse())},{reverse:function(){return Wv(this)&&(this.length=this.length),Qv(this)}});
|
6
|
+
import{c as t}from"./p-d4056c1c.js";import{_ as r,a as e}from"./p-d65f8b73.js";import"./p-4fe489cf.js";var i=function(t){return t&&t.Math===Math&&t},n=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof t&&t)||i("object"==typeof t&&t)||function(){return this}()||Function("return this")(),s={},a=function(t){try{return!!t()}catch(t){return!0}},o=!a((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),h=!a((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),u=Function.prototype.call,c=h?u.bind(u):function(){return u.apply(u,arguments)},f={},l={}.propertyIsEnumerable,v=Object.getOwnPropertyDescriptor,d=v&&!l.call({1:2},1);f.f=d?function(t){var r=v(this,t);return!!r&&r.enumerable}:l;var p,y,g=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}},m=h,b=Function.prototype,w=b.call,x=m&&b.bind.bind(w,w),M=m?x:function(t){return function(){return w.apply(t,arguments)}},k=M,N=k({}.toString),S=k("".slice),O=function(t){return S(N(t),8,-1)},P=a,j=O,E=Object,C=M("".split),T=P((function(){return!E("z").propertyIsEnumerable(0)}))?function(t){return"String"===j(t)?C(t,""):E(t)}:E,A=function(t){return null==t},R=A,B=TypeError,$=function(t){if(R(t))throw new B("Can't call method on "+t);return t},D=T,L=$,F=function(t){return D(L(t))},I="object"==typeof document&&document.all,z=void 0===I&&void 0!==I?function(t){return"function"==typeof t||t===I}:function(t){return"function"==typeof t},_=z,Y=function(t){return"object"==typeof t?null!==t:_(t)},X=n,U=z,q=function(t,r){return arguments.length<2?U(e=X[t])?e:void 0:X[t]&&X[t][r];var e},G=M({}.isPrototypeOf),V=n.navigator,H=V&&V.userAgent,W=H?String(H):"",Q=W,Z=n.process,K=n.Deno,J=Z&&Z.versions||K&&K.version,tt=J&&J.v8;tt&&(y=(p=tt.split("."))[0]>0&&p[0]<4?1:+(p[0]+p[1])),!y&&Q&&(!(p=Q.match(/Edge\/(\d+)/))||p[1]>=74)&&(p=Q.match(/Chrome\/(\d+)/))&&(y=+p[1]);var rt=y,et=rt,it=n.String,nt=!!Object.getOwnPropertySymbols&&!a((function(){var t=Symbol("symbol detection");return!it(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&et&&et<41})),st=nt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,at=q,ot=z,ht=G,ut=Object,ct=st?function(t){return"symbol"==typeof t}:function(t){var r=at("Symbol");return ot(r)&&ht(r.prototype,ut(t))},ft=String,lt=function(t){try{return ft(t)}catch(t){return"Object"}},vt=z,dt=lt,pt=TypeError,yt=function(t){if(vt(t))return t;throw new pt(dt(t)+" is not a function")},gt=yt,mt=A,bt=function(t,r){var e=t[r];return mt(e)?void 0:gt(e)},wt=c,xt=z,Mt=Y,kt=TypeError,Nt={exports:{}},St=n,Ot=Object.defineProperty,Pt=function(t,r){try{Ot(St,t,{value:r,configurable:!0,writable:!0})}catch(e){St[t]=r}return r},jt="__core-js_shared__",Et=Nt.exports=n[jt]||Pt(jt,{});(Et.versions||(Et.versions=[])).push({version:"3.40.0",mode:"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.40.0/LICENSE",source:"https://github.com/zloirock/core-js"});var Ct=Nt.exports,Tt=function(t,r){return Ct[t]||(Ct[t]=r||{})},At=$,Rt=Object,Bt=function(t){return Rt(At(t))},$t=Bt,Dt=M({}.hasOwnProperty),Lt=Object.hasOwn||function(t,r){return Dt($t(t),r)},Ft=M,It=0,zt=Math.random(),_t=Ft(1..toString),Yt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+_t(++It+zt,36)},Xt=Lt,Ut=Yt,qt=nt,Gt=st,Vt=n.Symbol,Ht=Tt("wks"),Wt=Gt?Vt.for||Vt:Vt&&Vt.withoutSetter||Ut,Qt=function(t){return Xt(Ht,t)||(Ht[t]=qt&&Xt(Vt,t)?Vt[t]:Wt("Symbol."+t)),Ht[t]},Zt=c,Kt=Y,Jt=ct,tr=bt,rr=TypeError,er=Qt("toPrimitive"),ir=function(t,r){if(!Kt(t)||Jt(t))return t;var e,i=tr(t,er);if(i){if(void 0===r&&(r="default"),e=Zt(i,t,r),!Kt(e)||Jt(e))return e;throw new rr("Can't convert object to primitive value")}return void 0===r&&(r="number"),function(t,r){var e,i;if("string"===r&&xt(e=t.toString)&&!Mt(i=wt(e,t)))return i;if(xt(e=t.valueOf)&&!Mt(i=wt(e,t)))return i;if("string"!==r&&xt(e=t.toString)&&!Mt(i=wt(e,t)))return i;throw new kt("Can't convert object to primitive value")}(t,r)},nr=ct,sr=function(t){var r=ir(t,"string");return nr(r)?r:r+""},ar=Y,or=n.document,hr=ar(or)&&ar(or.createElement),ur=function(t){return hr?or.createElement(t):{}},cr=ur,fr=!o&&!a((function(){return 7!==Object.defineProperty(cr("div"),"a",{get:function(){return 7}}).a})),lr=c,vr=f,dr=g,pr=F,yr=sr,gr=Lt,mr=fr,br=Object.getOwnPropertyDescriptor;s.f=o?br:function(t,r){if(t=pr(t),r=yr(r),mr)try{return br(t,r)}catch(t){}if(gr(t,r))return dr(!lr(vr.f,t,r),t[r])};var wr={},xr=o&&a((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Mr=Y,kr=String,Nr=TypeError,Sr=function(t){if(Mr(t))return t;throw new Nr(kr(t)+" is not an object")},Or=fr,Pr=Sr,jr=sr,Er=TypeError,Cr=Object.defineProperty,Tr=Object.getOwnPropertyDescriptor,Ar="enumerable",Rr="configurable",Br="writable";wr.f=o?xr?function(t,r,e){if(Pr(t),r=jr(r),Pr(e),"function"==typeof t&&"prototype"===r&&"value"in e&&Br in e&&!e[Br]){var i=Tr(t,r);i&&i[Br]&&(t[r]=e.value,e={configurable:Rr in e?e[Rr]:i[Rr],enumerable:Ar in e?e[Ar]:i[Ar],writable:!1})}return Cr(t,r,e)}:Cr:function(t,r,e){if(Pr(t),r=jr(r),Pr(e),Or)try{return Cr(t,r,e)}catch(t){}if("get"in e||"set"in e)throw new Er("Accessors not supported");return"value"in e&&(t[r]=e.value),t};var $r=wr,Dr=g,Lr=o?function(t,r,e){return $r.f(t,r,Dr(1,e))}:function(t,r,e){return t[r]=e,t},Fr={exports:{}},Ir=o,zr=Function.prototype,_r=Ir&&Object.getOwnPropertyDescriptor,Yr=Lt(zr,"name"),Xr={EXISTS:Yr,PROPER:Yr&&"something"===function(){}.name,CONFIGURABLE:Yr&&(!Ir||Ir&&_r(zr,"name").configurable)},Ur=z,qr=Nt.exports,Gr=M(Function.toString);Ur(qr.inspectSource)||(qr.inspectSource=function(t){return Gr(t)});var Vr,Hr,Wr,Qr=qr.inspectSource,Zr=n.WeakMap,Kr=z(Zr)&&/native code/.test(String(Zr)),Jr=Yt,te=Tt("keys"),re=function(t){return te[t]||(te[t]=Jr(t))},ee={},ie=Y,ne=Lr,se=Lt,ae=Nt.exports,oe=re,he=ee,ue="Object already initialized",ce=n.TypeError;if(Kr||ae.state){var fe=ae.state||(ae.state=new(0,n.WeakMap));fe.get=fe.get,fe.has=fe.has,fe.set=fe.set,Vr=function(t,r){if(fe.has(t))throw new ce(ue);return r.facade=t,fe.set(t,r),r},Hr=function(t){return fe.get(t)||{}},Wr=function(t){return fe.has(t)}}else{var le=oe("state");he[le]=!0,Vr=function(t,r){if(se(t,le))throw new ce(ue);return r.facade=t,ne(t,le,r),r},Hr=function(t){return se(t,le)?t[le]:{}},Wr=function(t){return se(t,le)}}var ve={set:Vr,get:Hr,has:Wr,enforce:function(t){return Wr(t)?Hr(t):Vr(t,{})},getterFor:function(t){return function(r){var e;if(!ie(r)||(e=Hr(r)).type!==t)throw new ce("Incompatible receiver, "+t+" required");return e}}},de=M,pe=a,ye=z,ge=Lt,me=o,be=Xr.CONFIGURABLE,we=Qr,xe=ve.enforce,Me=ve.get,ke=String,Ne=Object.defineProperty,Se=de("".slice),Oe=de("".replace),Pe=de([].join),je=me&&!pe((function(){return 8!==Ne((function(){}),"length",{value:8}).length})),Ee=String(String).split("String"),Ce=Fr.exports=function(t,r,e){"Symbol("===Se(ke(r),0,7)&&(r="["+Oe(ke(r),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),e&&e.getter&&(r="get "+r),e&&e.setter&&(r="set "+r),(!ge(t,"name")||be&&t.name!==r)&&(me?Ne(t,"name",{value:r,configurable:!0}):t.name=r),je&&e&&ge(e,"arity")&&t.length!==e.arity&&Ne(t,"length",{value:e.arity});try{e&&ge(e,"constructor")&&e.constructor?me&&Ne(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var i=xe(t);return ge(i,"source")||(i.source=Pe(Ee,"string"==typeof r?r:"")),t};Function.prototype.toString=Ce((function(){return ye(this)&&Me(this).source||we(this)}),"toString");var Te=z,Ae=wr,Re=Fr.exports,Be=Pt,$e=function(t,r,e,i){i||(i={});var n=i.enumerable,s=void 0!==i.name?i.name:r;if(Te(e)&&Re(e,s,i),i.global)n?t[r]=e:Be(r,e);else{try{i.unsafe?t[r]&&(n=!0):delete t[r]}catch(t){}n?t[r]=e:Ae.f(t,r,{value:e,enumerable:!1,configurable:!i.nonConfigurable,writable:!i.nonWritable})}return t},De={},Le=Math.ceil,Fe=Math.floor,Ie=Math.trunc||function(t){var r=+t;return(r>0?Fe:Le)(r)},ze=Ie,_e=function(t){var r=+t;return r!=r||0===r?0:ze(r)},Ye=_e,Xe=Math.max,Ue=Math.min,qe=_e,Ge=Math.min,Ve=function(t){var r=qe(t);return r>0?Ge(r,9007199254740991):0},He=Ve,We=function(t){return He(t.length)},Qe=F,Ze=We,Ke=function(t){return function(r,e,i){var n=Qe(r),s=Ze(n);if(0===s)return!t&&-1;var a,o=function(t,r){var e=Ye(t);return e<0?Xe(e+r,0):Ue(e,r)}(i,s);if(t&&e!=e){for(;s>o;)if((a=n[o++])!=a)return!0}else for(;s>o;o++)if((t||o in n)&&n[o]===e)return t||o||0;return!t&&-1}},Je={includes:Ke(!0),indexOf:Ke(!1)},ti=Lt,ri=F,ei=Je.indexOf,ii=ee,ni=M([].push),si=function(t,r){var e,i=ri(t),n=0,s=[];for(e in i)!ti(ii,e)&&ti(i,e)&&ni(s,e);for(;r.length>n;)ti(i,e=r[n++])&&(~ei(s,e)||ni(s,e));return s},ai=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],oi=si,hi=ai.concat("length","prototype");De.f=Object.getOwnPropertyNames||function(t){return oi(t,hi)};var ui={};ui.f=Object.getOwnPropertySymbols;var ci=q,fi=De,li=ui,vi=Sr,di=M([].concat),pi=ci("Reflect","ownKeys")||function(t){var r=fi.f(vi(t)),e=li.f;return e?di(r,e(t)):r},yi=Lt,gi=pi,mi=s,bi=wr,wi=a,xi=z,Mi=/#|\.prototype\./,ki=function(t,r){var e=Si[Ni(t)];return e===Pi||e!==Oi&&(xi(r)?wi(r):!!r)},Ni=ki.normalize=function(t){return String(t).replace(Mi,".").toLowerCase()},Si=ki.data={},Oi=ki.NATIVE="N",Pi=ki.POLYFILL="P",ji=ki,Ei=n,Ci=s.f,Ti=Lr,Ai=$e,Ri=Pt,Bi=function(t,r,e){for(var i=gi(r),n=bi.f,s=mi.f,a=0;a<i.length;a++){var o=i[a];yi(t,o)||e&&yi(e,o)||n(t,o,s(r,o))}},$i=ji,Di=function(t,r){var e,i,n,s,a,o=t.target,h=t.global,u=t.stat;if(e=h?Ei:u?Ei[o]||Ri(o,{}):Ei[o]&&Ei[o].prototype)for(i in r){if(s=r[i],n=t.dontCallGetSet?(a=Ci(e,i))&&a.value:e[i],!$i(h?i:o+(u?".":"#")+i,t.forced)&&void 0!==n){if(typeof s==typeof n)continue;Bi(s,n)}(t.sham||n&&n.sham)&&Ti(s,"sham",!0),Ai(e,i,s,t)}},Li=n,Fi=W,Ii=O,zi=function(t){return Fi.slice(0,t.length)===t},_i=zi("Bun/")?"BUN":zi("Cloudflare-Workers")?"CLOUDFLARE":zi("Deno/")?"DENO":zi("Node.js/")?"NODE":Li.Bun&&"string"==typeof Bun.version?"BUN":Li.Deno&&"object"==typeof Deno.version?"DENO":"process"===Ii(Li.process)?"NODE":Li.window&&Li.document?"BROWSER":"REST",Yi="NODE"===_i,Xi=M,Ui=yt,qi=Y,Gi=String,Vi=TypeError,Hi=Y,Wi=$,Qi=function(t){if(function(t){return qi(t)||null===t}(t))return t;throw new Vi("Can't set "+Gi(t)+" as a prototype")},Zi=Object.setPrototypeOf||("__proto__"in{}?function(){var t,r=!1,e={};try{(t=function(t,r,e){try{return Xi(Ui(Object.getOwnPropertyDescriptor(t,r)[e]))}catch(t){}}(Object.prototype,"__proto__","set"))(e,[]),r=e instanceof Array}catch(t){}return function(e,i){return Wi(e),Qi(i),Hi(e)?(r?t(e,i):e.__proto__=i,e):e}}():void 0),Ki=wr.f,Ji=Lt,tn=Qt("toStringTag"),rn=function(t,r,e){t&&!e&&(t=t.prototype),t&&!Ji(t,tn)&&Ki(t,tn,{configurable:!0,value:r})},en=Fr.exports,nn=wr,sn=q,an=o,on=Qt("species"),hn=G,un=TypeError,cn={};cn[Qt("toStringTag")]="z";var fn="[object z]"===String(cn),ln=z,vn=O,dn=Qt("toStringTag"),pn=Object,yn="Arguments"===vn(function(){return arguments}()),gn=fn?vn:function(t){var r,e,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=function(t,r){try{return t[r]}catch(t){}}(r=pn(t),dn))?e:yn?vn(r):"Object"===(i=vn(r))&&ln(r.callee)?"Arguments":i},mn=M,bn=a,wn=z,xn=gn,Mn=Qr,kn=function(){},Nn=q("Reflect","construct"),Sn=/^\s*(?:class|function)\b/,On=mn(Sn.exec),Pn=!Sn.test(kn),jn=function(t){if(!wn(t))return!1;try{return Nn(kn,[],t),!0}catch(t){return!1}},En=function(t){if(!wn(t))return!1;switch(xn(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Pn||!!On(Sn,Mn(t))}catch(t){return!0}};En.sham=!0;var Cn,Tn,An,Rn,Bn=!Nn||bn((function(){var t;return jn(jn.call)||!jn(Object)||!jn((function(){t=!0}))||t}))?En:jn,$n=Bn,Dn=lt,Ln=TypeError,Fn=Sr,In=A,zn=Qt("species"),_n=function(t,r){var e,i=Fn(t).constructor;return void 0===i||In(e=Fn(i)[zn])?r:function(t){if($n(t))return t;throw new Ln(Dn(t)+" is not a constructor")}(e)},Yn=Function.prototype,Xn=Yn.apply,Un=Yn.call,qn="object"==typeof Reflect&&Reflect.apply||(h?Un.bind(Xn):function(){return Un.apply(Xn,arguments)}),Gn=O,Vn=M,Hn=function(t){if("Function"===Gn(t))return Vn(t)},Wn=yt,Qn=h,Zn=Hn(Hn.bind),Kn=function(t,r){return Wn(t),void 0===r?t:Qn?Zn(t,r):function(){return t.apply(r,arguments)}},Jn=q("document","documentElement"),ts=M([].slice),rs=TypeError,es=/(?:ipad|iphone|ipod).*applewebkit/i.test(W),is=n,ns=qn,ss=Kn,as=z,os=Lt,hs=a,us=Jn,cs=ts,fs=ur,ls=es,vs=Yi,ds=is.setImmediate,ps=is.clearImmediate,ys=is.process,gs=is.Dispatch,ms=is.Function,bs=is.MessageChannel,ws=is.String,xs=0,Ms={},ks="onreadystatechange";hs((function(){Cn=is.location}));var Ns=function(t){if(os(Ms,t)){var r=Ms[t];delete Ms[t],r()}},Ss=function(t){return function(){Ns(t)}},Os=function(t){Ns(t.data)},Ps=function(t){is.postMessage(ws(t),Cn.protocol+"//"+Cn.host)};ds&&ps||(ds=function(t){!function(t,r){if(t<r)throw new rs("Not enough arguments")}(arguments.length,1);var r=as(t)?t:ms(t),e=cs(arguments,1);return Ms[++xs]=function(){ns(r,void 0,e)},Tn(xs),xs},ps=function(t){delete Ms[t]},vs?Tn=function(t){ys.nextTick(Ss(t))}:gs&&gs.now?Tn=function(t){gs.now(Ss(t))}:bs&&!ls?(Rn=(An=new bs).port2,An.port1.onmessage=Os,Tn=ss(Rn.postMessage,Rn)):is.addEventListener&&as(is.postMessage)&&!is.importScripts&&Cn&&"file:"!==Cn.protocol&&!hs(Ps)?(Tn=Ps,is.addEventListener("message",Os,!1)):Tn=ks in fs("script")?function(t){us.appendChild(fs("script"))[ks]=function(){us.removeChild(this),Ns(t)}}:function(t){setTimeout(Ss(t),0)});var js={set:ds,clear:ps},Es=n,Cs=o,Ts=Object.getOwnPropertyDescriptor,As=function(){this.head=null,this.tail=null};As.prototype={add:function(t){var r={item:t,next:null},e=this.tail;e?e.next=r:this.head=r,this.tail=r},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var Rs,Bs,$s,Ds,Ls,Fs=As,Is=/ipad|iphone|ipod/i.test(W)&&"undefined"!=typeof Pebble,zs=/web0s(?!.*chrome)/i.test(W),_s=n,Ys=Kn,Xs=js.set,Us=Fs,qs=es,Gs=Is,Vs=zs,Hs=Yi,Ws=_s.MutationObserver||_s.WebKitMutationObserver,Qs=_s.document,Zs=_s.process,Ks=_s.Promise,Js=function(t){if(!Cs)return Es[t];var r=Ts(Es,t);return r&&r.value}("queueMicrotask");if(!Js){var ta=new Us,ra=function(){var t,r;for(Hs&&(t=Zs.domain)&&t.exit();r=ta.get();)try{r()}catch(t){throw ta.head&&Rs(),t}t&&t.enter()};qs||Hs||Vs||!Ws||!Qs?!Gs&&Ks&&Ks.resolve?((Ds=Ks.resolve(void 0)).constructor=Ks,Ls=Ys(Ds.then,Ds),Rs=function(){Ls(ra)}):Hs?Rs=function(){Zs.nextTick(ra)}:(Xs=Ys(Xs,_s),Rs=function(){Xs(ra)}):(Bs=!0,$s=Qs.createTextNode(""),new Ws(ra).observe($s,{characterData:!0}),Rs=function(){$s.data=Bs=!Bs}),Js=function(t){ta.head||Rs(),ta.add(t)}}var ea=Js,ia=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},na=n.Promise,sa=n,aa=na,oa=z,ha=ji,ua=Qr,ca=_i,fa=rt,la=Qt("species"),va=!1,da=oa(sa.PromiseRejectionEvent),pa=ha("Promise",(function(){var t=ua(aa),r=t!==String(aa);if(!r&&66===fa)return!0;if(!fa||fa<51||!/native code/.test(t)){var e=new aa((function(t){t(1)})),i=function(t){t((function(){}),(function(){}))};if((e.constructor={})[la]=i,!(va=e.then((function(){}))instanceof i))return!0}return!(r||"BROWSER"!==ca&&"DENO"!==ca||da)})),ya={CONSTRUCTOR:pa,REJECTION_EVENT:da,SUBCLASSING:va},ga={},ma=yt,ba=TypeError,wa=function(t){var r,e;this.promise=new t((function(t,i){if(void 0!==r||void 0!==e)throw new ba("Bad Promise constructor");r=t,e=i})),this.resolve=ma(r),this.reject=ma(e)};ga.f=function(t){return new wa(t)};var xa,Ma,ka,Na,Sa=Di,Oa=Yi,Pa=n,ja=c,Ea=$e,Ca=Zi,Ta=rn,Aa=yt,Ra=z,Ba=Y,$a=_n,Da=js.set,La=ea,Fa=ia,Ia=Fs,za=ve,_a=na,Ya=ga,Xa="Promise",Ua=ya.CONSTRUCTOR,qa=ya.REJECTION_EVENT,Ga=ya.SUBCLASSING,Va=za.getterFor(Xa),Ha=za.set,Wa=_a&&_a.prototype,Qa=_a,Za=Wa,Ka=Pa.TypeError,Ja=Pa.document,to=Pa.process,ro=Ya.f,eo=ro,io=!!(Ja&&Ja.createEvent&&Pa.dispatchEvent),no="unhandledrejection",so=function(t){var r;return!(!Ba(t)||!Ra(r=t.then))&&r},ao=function(t,r){var e,i,n,s=r.value,a=1===r.state,o=a?t.ok:t.fail,h=t.resolve,u=t.reject,c=t.domain;try{o?(a||(2===r.rejection&&fo(r),r.rejection=1),!0===o?e=s:(c&&c.enter(),e=o(s),c&&(c.exit(),n=!0)),e===t.promise?u(new Ka("Promise-chain cycle")):(i=so(e))?ja(i,e,h,u):h(e)):u(s)}catch(t){c&&!n&&c.exit(),u(t)}},oo=function(t,r){t.notified||(t.notified=!0,La((function(){for(var e,i=t.reactions;e=i.get();)ao(e,t);t.notified=!1,r&&!t.rejection&&uo(t)})))},ho=function(t,r,e){var i,n;io?((i=Ja.createEvent("Event")).promise=r,i.reason=e,i.initEvent(t,!1,!0),Pa.dispatchEvent(i)):i={promise:r,reason:e},!qa&&(n=Pa["on"+t])?n(i):t===no&&function(t,r){try{1===arguments.length?console.error(t):console.error(t,r)}catch(t){}}("Unhandled promise rejection",e)},uo=function(t){ja(Da,Pa,(function(){var r,e=t.facade,i=t.value;if(co(t)&&(r=Fa((function(){Oa?to.emit("unhandledRejection",i,e):ho(no,e,i)})),t.rejection=Oa||co(t)?2:1,r.error))throw r.value}))},co=function(t){return 1!==t.rejection&&!t.parent},fo=function(t){ja(Da,Pa,(function(){var r=t.facade;Oa?to.emit("rejectionHandled",r):ho("rejectionhandled",r,t.value)}))},lo=function(t,r,e){return function(i){t(r,i,e)}},vo=function(t,r,e){t.done||(t.done=!0,e&&(t=e),t.value=r,t.state=2,oo(t,!0))},po=function(t,r,e){if(!t.done){t.done=!0,e&&(t=e);try{if(t.facade===r)throw new Ka("Promise can't be resolved itself");var i=so(r);i?La((function(){var e={done:!1};try{ja(i,r,lo(po,e,t),lo(vo,e,t))}catch(r){vo(e,r,t)}})):(t.value=r,t.state=1,oo(t,!1))}catch(r){vo({done:!1},r,t)}}};if(Ua&&(Qa=function(t){(function(t,r){if(hn(r,t))return t;throw new un("Incorrect invocation")})(this,Za),Aa(t),ja(xa,this);var r=Va(this);try{t(lo(po,r),lo(vo,r))}catch(t){vo(r,t)}},(xa=function(){Ha(this,{type:Xa,done:!1,notified:!1,parent:!1,reactions:new Ia,rejection:!1,state:0,value:null})}).prototype=Ea(Za=Qa.prototype,"then",(function(t,r){var e=Va(this),i=ro($a(this,Qa));return e.parent=!0,i.ok=!Ra(t)||t,i.fail=Ra(r)&&r,i.domain=Oa?to.domain:void 0,0===e.state?e.reactions.add(i):La((function(){ao(i,e)})),i.promise})),Ma=function(){var t=new xa,r=Va(t);this.promise=t,this.resolve=lo(po,r),this.reject=lo(vo,r)},Ya.f=ro=function(t){return t===Qa||void 0===t?new Ma(t):eo(t)},Ra(_a)&&Wa!==Object.prototype)){ka=Wa.then,Ga||Ea(Wa,"then",(function(t,r){var e=this;return new Qa((function(t,r){ja(ka,e,t,r)})).then(t,r)}),{unsafe:!0});try{delete Wa.constructor}catch(t){}Ca&&Ca(Wa,Za)}Sa({global:!0,constructor:!0,wrap:!0,forced:Ua},{Promise:Qa}),Ta(Qa,Xa,!1),Na=sn(Xa),an&&Na&&!Na[on]&&function(t,r,e){e.get&&en(e.get,r,{getter:!0}),e.set&&en(e.set,r,{setter:!0}),nn.f(t,r,e)}(Na,on,{configurable:!0,get:function(){return this}});var yo={},go=yo,mo=Qt("iterator"),bo=Array.prototype,wo=gn,xo=bt,Mo=A,ko=yo,No=Qt("iterator"),So=function(t){if(!Mo(t))return xo(t,No)||xo(t,"@@iterator")||ko[wo(t)]},Oo=c,Po=yt,jo=Sr,Eo=lt,Co=So,To=TypeError,Ao=c,Ro=Sr,Bo=bt,$o=Kn,Do=c,Lo=Sr,Fo=lt,Io=We,zo=G,_o=So,Yo=function(t,r,e){var i,n;Ro(t);try{if(!(i=Bo(t,"return"))){if("throw"===r)throw e;return e}i=Ao(i,t)}catch(t){n=!0,i=t}if("throw"===r)throw e;if(n)throw i;return Ro(i),e},Xo=TypeError,Uo=function(t,r){this.stopped=t,this.result=r},qo=Uo.prototype,Go=function(t,r,e){var i,n,s,a,o,h,u,c,f=!(!e||!e.AS_ENTRIES),l=!(!e||!e.IS_RECORD),v=!(!e||!e.IS_ITERATOR),d=!(!e||!e.INTERRUPTED),p=$o(r,e&&e.that),y=function(t){return i&&Yo(i,"normal",t),new Uo(!0,t)},g=function(t){return f?(Lo(t),d?p(t[0],t[1],y):p(t[0],t[1])):d?p(t,y):p(t)};if(l)i=t.iterator;else if(v)i=t;else{if(!(n=_o(t)))throw new Xo(Fo(t)+" is not iterable");if(void 0!==(c=n)&&(go.Array===c||bo[mo]===c)){for(s=0,a=Io(t);a>s;s++)if((o=g(t[s]))&&zo(qo,o))return o;return new Uo(!1)}i=function(t,r){var e=arguments.length<2?Co(t):r;if(Po(e))return jo(Oo(e,t));throw new To(Eo(t)+" is not iterable")}(t,n)}for(h=l?t.next:i.next;!(u=Do(h,i)).done;){try{o=g(u.value)}catch(t){Yo(i,"throw",t)}if("object"==typeof o&&o&&zo(qo,o))return o}return new Uo(!1)},Vo=Qt("iterator"),Ho=!1;try{var Wo=0,Qo={next:function(){return{done:!!Wo++}},return:function(){Ho=!0}};Qo[Vo]=function(){return this},Array.from(Qo,(function(){throw 2}))}catch(t){}var Zo=na,Ko=ya.CONSTRUCTOR||!function(t,r){try{if(!r&&!Ho)return!1}catch(t){return!1}var e=!1;try{var i={};i[Vo]=function(){return{next:function(){return{done:e=!0}}}},t(i)}catch(t){}return e}((function(t){Zo.all(t).then(void 0,(function(){}))})),Jo=c,th=yt,rh=ga,eh=ia,ih=Go;Di({target:"Promise",stat:!0,forced:Ko},{all:function(t){var r=this,e=rh.f(r),i=e.resolve,n=e.reject,s=eh((function(){var e=th(r.resolve),s=[],a=0,o=1;ih(t,(function(t){var h=a++,u=!1;o++,Jo(e,r,t).then((function(t){u||(u=!0,s[h]=t,--o||i(s))}),n)})),--o||i(s)}));return s.error&&n(s.value),e.promise}});var nh=na,sh=q,ah=z,oh=$e,hh=nh&&nh.prototype;if(Di({target:"Promise",proto:!0,forced:ya.CONSTRUCTOR,real:!0},{catch:function(t){return this.then(void 0,t)}}),ah(nh)){var uh=sh("Promise").prototype.catch;hh.catch!==uh&&oh(hh,"catch",uh,{unsafe:!0})}var ch=c,fh=yt,lh=ga,vh=ia,dh=Go;Di({target:"Promise",stat:!0,forced:Ko},{race:function(t){var r=this,e=lh.f(r),i=e.reject,n=vh((function(){var n=fh(r.resolve);dh(t,(function(t){ch(n,r,t).then(e.resolve,i)}))}));return n.error&&i(n.value),e.promise}});var ph=ga;Di({target:"Promise",stat:!0,forced:ya.CONSTRUCTOR},{reject:function(t){var r=ph.f(this);return(0,r.reject)(t),r.promise}});var yh=Sr,gh=Y,mh=ga;Di({target:"Promise",stat:!0,forced:ya.CONSTRUCTOR},{resolve:function(t){return function(t,r){if(yh(t),gh(r)&&r.constructor===t)return r;var e=mh.f(t);return(0,e.resolve)(r),e.promise}(this,t)}});var bh=gn,wh=String,xh=function(t){if("Symbol"===bh(t))throw new TypeError("Cannot convert a Symbol value to a string");return wh(t)},Mh=Sr,kh=function(){var t=Mh(this),r="";return t.hasIndices&&(r+="d"),t.global&&(r+="g"),t.ignoreCase&&(r+="i"),t.multiline&&(r+="m"),t.dotAll&&(r+="s"),t.unicode&&(r+="u"),t.unicodeSets&&(r+="v"),t.sticky&&(r+="y"),r},Nh=a,Sh=n.RegExp,Oh=Nh((function(){var t=Sh("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),Ph=Oh||Nh((function(){return!Sh("a","y").sticky})),jh={BROKEN_CARET:Oh||Nh((function(){var t=Sh("^r","gy");return t.lastIndex=2,null!==t.exec("str")})),MISSED_STICKY:Ph,UNSUPPORTED_Y:Oh},Eh={},Ch=si,Th=ai,Ah=Object.keys||function(t){return Ch(t,Th)},Rh=wr,Bh=Sr,$h=F,Dh=Ah;Eh.f=o&&!xr?Object.defineProperties:function(t,r){Bh(t);for(var e,i=$h(r),n=Dh(r),s=n.length,a=0;s>a;)Rh.f(t,e=n[a++],i[e]);return t};var Lh,Fh=Sr,Ih=Eh,zh=ai,_h=ee,Yh=Jn,Xh=ur,Uh="prototype",qh="script",Gh=re("IE_PROTO"),Vh=function(){},Hh=function(t){return"<"+qh+">"+t+"</"+qh+">"},Wh=function(t){t.write(Hh("")),t.close();var r=t.parentWindow.Object;return t=null,r},Qh=function(){try{Lh=new ActiveXObject("htmlfile")}catch(t){}var t,r,e;Qh="undefined"!=typeof document?document.domain&&Lh?Wh(Lh):(r=Xh("iframe"),e="java"+qh+":",r.style.display="none",Yh.appendChild(r),r.src=String(e),(t=r.contentWindow.document).open(),t.write(Hh("document.F=Object")),t.close(),t.F):Wh(Lh);for(var i=zh.length;i--;)delete Qh[Uh][zh[i]];return Qh()};_h[Gh]=!0;var Zh,Kh,Jh=Object.create||function(t,r){var e;return null!==t?(Vh[Uh]=Fh(t),e=new Vh,Vh[Uh]=null,e[Gh]=t):e=Qh(),void 0===r?e:Ih.f(e,r)},tu=n.RegExp,ru=a((function(){var t=tu(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)})),eu=n.RegExp,iu=a((function(){var t=eu("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),nu=c,su=M,au=xh,ou=kh,hu=jh,uu=Jh,cu=ve.get,fu=ru,lu=iu,vu=Tt("native-string-replace",String.prototype.replace),du=RegExp.prototype.exec,pu=du,yu=su("".charAt),gu=su("".indexOf),mu=su("".replace),bu=su("".slice),wu=(Kh=/b*/g,nu(du,Zh=/a/,"a"),nu(du,Kh,"a"),0!==Zh.lastIndex||0!==Kh.lastIndex),xu=hu.BROKEN_CARET,Mu=void 0!==/()??/.exec("")[1];(wu||Mu||xu||fu||lu)&&(pu=function(t){var r,e,i,n,s,a,o,h=this,u=cu(h),c=au(t),f=u.raw;if(f)return f.lastIndex=h.lastIndex,r=nu(pu,f,c),h.lastIndex=f.lastIndex,r;var l=u.groups,v=xu&&h.sticky,d=nu(ou,h),p=h.source,y=0,g=c;if(v&&(d=mu(d,"y",""),-1===gu(d,"g")&&(d+="g"),g=bu(c,h.lastIndex),h.lastIndex>0&&(!h.multiline||h.multiline&&"\n"!==yu(c,h.lastIndex-1))&&(p="(?: "+p+")",g=" "+g,y++),e=new RegExp("^(?:"+p+")",d)),Mu&&(e=new RegExp("^"+p+"$(?!\\s)",d)),wu&&(i=h.lastIndex),n=nu(du,v?e:h,g),v?n?(n.input=bu(n.input,y),n[0]=bu(n[0],y),n.index=h.lastIndex,h.lastIndex+=n[0].length):h.lastIndex=0:wu&&n&&(h.lastIndex=h.global?n.index+n[0].length:i),Mu&&n&&n.length>1&&nu(vu,n[0],e,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(n[s]=void 0)})),n&&l)for(n.groups=a=uu(null),s=0;s<l.length;s++)a[(o=l[s])[0]]=n[o[1]];return n});var ku=pu;Di({target:"RegExp",proto:!0,forced:/./.exec!==ku},{exec:ku});var Nu=c,Su=$e,Ou=ku,Pu=a,ju=Qt,Eu=Lr,Cu=ju("species"),Tu=RegExp.prototype,Au=function(t,r,e,i){var n=ju(t),s=!Pu((function(){var r={};return r[n]=function(){return 7},7!==""[t](r)})),a=s&&!Pu((function(){var r=!1,e=/a/;return"split"===t&&((e={}).constructor={},e.constructor[Cu]=function(){return e},e.flags="",e[n]=/./[n]),e.exec=function(){return r=!0,null},e[n](""),!r}));if(!s||!a||e){var o=/./[n],h=r(n,""[t],(function(t,r,e,i,n){var a=r.exec;return a===Ou||a===Tu.exec?s&&!n?{done:!0,value:Nu(o,r,e,i)}:{done:!0,value:Nu(t,e,r,i)}:{done:!1}}));Su(String.prototype,t,h[0]),Su(Tu,n,h[1])}i&&Eu(Tu[n],"sham",!0)},Ru=M,Bu=_e,$u=xh,Du=$,Lu=Ru("".charAt),Fu=Ru("".charCodeAt),Iu=Ru("".slice),zu=function(t){return function(r,e){var i,n,s=$u(Du(r)),a=Bu(e),o=s.length;return a<0||a>=o?t?"":void 0:(i=Fu(s,a))<55296||i>56319||a+1===o||(n=Fu(s,a+1))<56320||n>57343?t?Lu(s,a):i:t?Iu(s,a,a+2):n-56320+(i-55296<<10)+65536}},_u=(zu(!1),zu(!0)),Yu=function(t,r,e){return r+(e?_u(t,r).length:1)},Xu=c,Uu=Sr,qu=z,Gu=O,Vu=ku,Hu=TypeError,Wu=function(t,r){var e=t.exec;if(qu(e)){var i=Xu(e,t,r);return null!==i&&Uu(i),i}if("RegExp"===Gu(t))return Xu(Vu,t,r);throw new Hu("RegExp#exec called on incompatible receiver")},Qu=c,Zu=Sr,Ku=A,Ju=Ve,tc=xh,rc=$,ec=bt,ic=Yu,nc=Wu;Au("match",(function(t,r,e){return[function(r){var e=rc(this),i=Ku(r)?void 0:ec(r,t);return i?Qu(i,r,e):new RegExp(r)[t](tc(e))},function(t){var i=Zu(this),n=tc(t),s=e(r,i,n);if(s.done)return s.value;if(!i.global)return nc(i,n);var a=i.unicode;i.lastIndex=0;for(var o,h=[],u=0;null!==(o=nc(i,n));){var c=tc(o[0]);h[u]=c,""===c&&(i.lastIndex=ic(n,Ju(i.lastIndex),a)),u++}return 0===u?null:h}]}));var sc=M,ac=Bt,oc=Math.floor,hc=sc("".charAt),uc=sc("".replace),cc=sc("".slice),fc=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,lc=/\$([$&'`]|\d{1,2})/g,vc=qn,dc=c,pc=M,yc=Au,gc=a,mc=Sr,bc=z,wc=A,xc=_e,Mc=Ve,kc=xh,Nc=$,Sc=Yu,Oc=bt,Pc=function(t,r,e,i,n,s){var a=e+t.length,o=i.length,h=lc;return void 0!==n&&(n=ac(n),h=fc),uc(s,h,(function(s,h){var u;switch(hc(h,0)){case"$":return"$";case"&":return t;case"`":return cc(r,0,e);case"'":return cc(r,a);case"<":u=n[cc(h,1,-1)];break;default:var c=+h;if(0===c)return s;if(c>o){var f=oc(c/10);return 0===f?s:f<=o?void 0===i[f-1]?hc(h,1):i[f-1]+hc(h,1):s}u=i[c-1]}return void 0===u?"":u}))},jc=Wu,Ec=Qt("replace"),Cc=Math.max,Tc=Math.min,Ac=pc([].concat),Rc=pc([].push),Bc=pc("".indexOf),$c=pc("".slice),Dc="$0"==="a".replace(/./,"$0"),Lc=!!/./[Ec]&&""===/./[Ec]("a","$0");yc("replace",(function(t,r,e){var i=Lc?"$":"$0";return[function(t,e){var i=Nc(this),n=wc(t)?void 0:Oc(t,Ec);return n?dc(n,t,i,e):dc(r,kc(i),t,e)},function(t,n){var s=mc(this),a=kc(t);if("string"==typeof n&&-1===Bc(n,i)&&-1===Bc(n,"$<")){var o=e(r,s,a,n);if(o.done)return o.value}var h=bc(n);h||(n=kc(n));var u,c=s.global;c&&(u=s.unicode,s.lastIndex=0);for(var f,l=[];null!==(f=jc(s,a))&&(Rc(l,f),c);)""===kc(f[0])&&(s.lastIndex=Sc(a,Mc(s.lastIndex),u));for(var v,d="",p=0,y=0;y<l.length;y++){for(var g,m=kc((f=l[y])[0]),b=Cc(Tc(xc(f.index),a.length),0),w=[],x=1;x<f.length;x++)Rc(w,void 0===(v=f[x])?v:String(v));var M=f.groups;if(h){var k=Ac([m],w,b,a);void 0!==M&&Rc(k,M),g=kc(vc(n,void 0,k))}else g=Pc(m,a,b,w,M,n);b>=p&&(d+=$c(a,p,b)+g,p=b+m.length)}return d+$c(a,p)}]}),!!gc((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!Dc||Lc);var Fc,Ic=Y,zc=O,_c=Qt("match"),Yc=TypeError,Xc=function(t){if(function(t){var r;return Ic(t)&&(void 0!==(r=t[_c])?!!r:"RegExp"===zc(t))}(t))throw new Yc("The method doesn't accept regular expressions");return t},Uc=Qt("match"),qc=function(t){var r=/./;try{"/./"[t](r)}catch(e){try{return r[Uc]=!1,"/./"[t](r)}catch(t){}}return!1},Gc=Di,Vc=s.f,Hc=Ve,Wc=xh,Qc=Xc,Zc=$,Kc=qc,Jc=Hn("".slice),tf=Math.min,rf=Kc("startsWith");Gc({target:"String",proto:!0,forced:!(!rf&&(Fc=Vc(String.prototype,"startsWith"),Fc&&!Fc.writable)||rf)},{startsWith:function(t){var r=Wc(Zc(this));Qc(t);var e=Hc(tf(arguments.length>1?arguments[1]:void 0,r.length)),i=Wc(t);return Jc(r,e,e+i.length)===i}});var ef=Jh,nf=wr.f,sf=Qt("unscopables"),af=Array.prototype;void 0===af[sf]&&nf(af,sf,{configurable:!0,value:ef(null)});var of,hf,uf,cf=!a((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),ff=Lt,lf=z,vf=Bt,df=cf,pf=re("IE_PROTO"),yf=Object,gf=yf.prototype,mf=df?yf.getPrototypeOf:function(t){var r=vf(t);if(ff(r,pf))return r[pf];var e=r.constructor;return lf(e)&&r instanceof e?e.prototype:r instanceof yf?gf:null},bf=a,wf=z,xf=Y,Mf=mf,kf=$e,Nf=Qt("iterator"),Sf=!1;[].keys&&("next"in(uf=[].keys())?(hf=Mf(Mf(uf)))!==Object.prototype&&(of=hf):Sf=!0);var Of=!xf(of)||bf((function(){var t={};return of[Nf].call(t)!==t}));Of&&(of={}),wf(of[Nf])||kf(of,Nf,(function(){return this}));var Pf={IteratorPrototype:of,BUGGY_SAFARI_ITERATORS:Sf},jf=Pf.IteratorPrototype,Ef=Jh,Cf=g,Tf=rn,Af=yo,Rf=function(){return this},Bf=Di,$f=c,Df=z,Lf=mf,Ff=Zi,If=rn,zf=Lr,_f=$e,Yf=yo,Xf=Xr.PROPER,Uf=Xr.CONFIGURABLE,qf=Pf.IteratorPrototype,Gf=Pf.BUGGY_SAFARI_ITERATORS,Vf=Qt("iterator"),Hf="keys",Wf="values",Qf="entries",Zf=function(){return this},Kf=F,Jf=function(t){af[sf][t]=!0},tl=yo,rl=wr.f,el=function(t,r){return{value:t,done:r}},il=o,nl="Array Iterator",sl=ve.set,al=ve.getterFor(nl),ol=function(t,r,e,i,n,s,a){!function(t,r,e,i){var n=r+" Iterator";t.prototype=Ef(jf,{next:Cf(+!i,e)}),Tf(t,n,!1),Af[n]=Rf}(e,r,i);var o,h,u,c=function(t){if(t===n&&p)return p;if(!Gf&&t&&t in v)return v[t];switch(t){case Hf:case Wf:case Qf:return function(){return new e(this,t)}}return function(){return new e(this)}},f=r+" Iterator",l=!1,v=t.prototype,d=v[Vf]||v["@@iterator"]||n&&v[n],p=!Gf&&d||c(n),y="Array"===r&&v.entries||d;if(y&&(o=Lf(y.call(new t)))!==Object.prototype&&o.next&&(Lf(o)!==qf&&(Ff?Ff(o,qf):Df(o[Vf])||_f(o,Vf,Zf)),If(o,f,!0)),Xf&&n===Wf&&d&&d.name!==Wf&&(Uf?zf(v,"name",Wf):(l=!0,p=function(){return $f(d,this)})),n)if(h={values:c(Wf),keys:s?p:c(Hf),entries:c(Qf)},a)for(u in h)(Gf||l||!(u in v))&&_f(v,u,h[u]);else Bf({target:r,proto:!0,forced:Gf||l},h);return v[Vf]!==p&&_f(v,Vf,p,{name:n}),Yf[r]=p,h}(Array,"Array",(function(t,r){sl(this,{type:nl,target:Kf(t),index:0,kind:r})}),(function(){var t=al(this),r=t.target,e=t.index++;if(!r||e>=r.length)return t.target=null,el(void 0,!0);switch(t.kind){case"keys":return el(e,!1);case"values":return el(r[e],!1)}return el([e,r[e]],!1)}),"values"),hl=tl.Arguments=tl.Array;if(Jf("keys"),Jf("values"),Jf("entries"),il&&"values"!==hl.name)try{rl(hl,"name",{value:"values"})}catch(t){}var ul=ur("span").classList,cl=ul&&ul.constructor&&ul.constructor.prototype,fl=n,ll={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},vl=cl===Object.prototype?void 0:cl,dl=ol,pl=Lr,yl=rn,gl=Qt("iterator"),ml=dl.values,bl=function(t,r){if(t){if(t[gl]!==ml)try{pl(t,gl,ml)}catch(r){t[gl]=ml}if(yl(t,r,!0),ll[r])for(var e in dl)if(t[e]!==dl[e])try{pl(t,e,dl[e])}catch(r){t[e]=dl[e]}}};for(var wl in ll)bl(fl[wl]&&fl[wl].prototype,wl);bl(vl,"DOMTokenList");var xl=yt,Ml=Bt,kl=T,Nl=We,Sl=TypeError,Ol="Reduce of empty array with no initial value",Pl=function(t){return function(r,e,i,n){var s=Ml(r),a=kl(s),o=Nl(s);if(xl(e),0===o&&i<2)throw new Sl(Ol);var h=t?o-1:0,u=t?-1:1;if(i<2)for(;;){if(h in a){n=a[h],h+=u;break}if(h+=u,t?h<0:o<=h)throw new Sl(Ol)}for(;t?h>=0:o>h;h+=u)h in a&&(n=e(n,a[h],h,s));return n}},jl={left:Pl(!1),right:Pl(!0)},El=a,Cl=function(t,r){var e=[][t];return!!e&&El((function(){e.call(null,r||function(){return 1},1)}))},Tl=jl.left;Di({target:"Array",proto:!0,forced:!Yi&&rt>79&&rt<83||!Cl("reduce")},{reduce:function(t){var r=arguments.length;return Tl(this,t,r,r>1?arguments[1]:void 0)}});var Al=Di,Rl=s.f,Bl=Ve,$l=xh,Dl=Xc,Ll=$,Fl=qc,Il=Hn("".slice),zl=Math.min,_l=Fl("endsWith"),Yl=!_l&&!!function(){var t=Rl(String.prototype,"endsWith");return t&&!t.writable}();Al({target:"String",proto:!0,forced:!Yl&&!_l},{endsWith:function(t){var r=$l(Ll(this));Dl(t);var e=arguments.length>1?arguments[1]:void 0,i=r.length,n=void 0===e?i:zl(Bl(e),i),s=$l(t);return Il(r,n-s.length,n)===s}});var Xl=c,Ul=M,ql=Au,Gl=Sr,Vl=A,Hl=$,Wl=_n,Ql=Yu,Zl=Ve,Kl=xh,Jl=bt,tv=Wu,rv=a,ev=jh.UNSUPPORTED_Y,iv=Math.min,nv=Ul([].push),sv=Ul("".slice),av=!rv((function(){var t=/(?:)/,r=t.exec;t.exec=function(){return r.apply(this,arguments)};var e="ab".split(t);return 2!==e.length||"a"!==e[0]||"b"!==e[1]})),ov="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length;ql("split",(function(t,r,e){var i="0".split(void 0,0).length?function(t,e){return void 0===t&&0===e?[]:Xl(r,this,t,e)}:r;return[function(r,e){var n=Hl(this),s=Vl(r)?void 0:Jl(r,t);return s?Xl(s,r,n,e):Xl(i,Kl(n),r,e)},function(t,n){var s=Gl(this),a=Kl(t);if(!ov){var o=e(i,s,a,n,i!==r);if(o.done)return o.value}var h=Wl(s,RegExp),u=s.unicode,c=new h(ev?"^(?:"+s.source+")":s,(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(ev?"g":"y")),f=void 0===n?4294967295:n>>>0;if(0===f)return[];if(0===a.length)return null===tv(c,a)?[a]:[];for(var l=0,v=0,d=[];v<a.length;){c.lastIndex=ev?0:v;var p,y=tv(c,ev?sv(a,v):a);if(null===y||(p=iv(Zl(c.lastIndex+(ev?v:0)),a.length))===l)v=Ql(a,v,u);else{if(nv(d,sv(a,l,v)),d.length===f)return d;for(var g=1;g<=y.length-1;g++)if(nv(d,y[g]),d.length===f)return d;v=l=p}}return nv(d,sv(a,l)),d}]}),ov||!av,ev);var hv={exports:{}},uv={exports:{}};(function(){var t,r,e,i,n,s;"undefined"!=typeof performance&&null!==performance&&performance.now?uv.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(uv.exports=function(){return(t()-n)/1e6},r=process.hrtime,i=(t=function(){var t;return 1e9*(t=r())[0]+t[1]})(),s=1e9*process.uptime(),n=i-s):Date.now?(uv.exports=function(){return Date.now()-e},e=Date.now()):(uv.exports=function(){return(new Date).getTime()-e},e=(new Date).getTime())}).call(t);for(var cv=uv.exports,fv="undefined"==typeof window?t:window,lv=["moz","webkit"],vv="AnimationFrame",dv=fv["request"+vv],pv=fv["cancel"+vv]||fv["cancelRequest"+vv],yv=0;!dv&&yv<lv.length;yv++)dv=fv[lv[yv]+"Request"+vv],pv=fv[lv[yv]+"Cancel"+vv]||fv[lv[yv]+"CancelRequest"+vv];if(!dv||!pv){var gv=0,mv=0,bv=[],wv=1e3/60;dv=function(t){if(0===bv.length){var r=cv(),e=Math.max(0,wv-(r-gv));gv=e+r,setTimeout((function(){var t=bv.slice(0);bv.length=0;for(var r=0;r<t.length;r++)if(!t[r].cancelled)try{t[r].callback(gv)}catch(t){setTimeout((function(){throw t}),0)}}),Math.round(e))}return bv.push({handle:++mv,callback:t,cancelled:!1}),mv},pv=function(t){for(var r=0;r<bv.length;r++)bv[r].handle===t&&(bv[r].cancelled=!0)}}hv.exports=function(t){return dv.call(fv,t)},hv.exports.cancel=function(){pv.apply(fv,arguments)},hv.exports.polyfill=function(t){t||(t=fv),t.requestAnimationFrame=dv,t.cancelAnimationFrame=pv};const xv=hv.exports;var Mv,kv="\t\n\v\f\r \u2028\u2029\ufeff",Nv=$,Sv=xh,Ov=kv,Pv=M("".replace),jv=RegExp("^["+Ov+"]+"),Ev=RegExp("(^|[^"+Ov+"])["+Ov+"]+$"),Cv=function(t){return function(r){var e=Sv(Nv(r));return 1&t&&(e=Pv(e,jv,"")),2&t&&(e=Pv(e,Ev,"$1")),e}},Tv={start:Cv(1),end:Cv(2),trim:Cv(3)},Av=Xr.PROPER,Rv=kv,Bv=Tv.trim;Di({target:"String",proto:!0,forced:(Mv="trim",a((function(){return!!Rv[Mv]()||"
"!=="
"[Mv]()||Av&&Rv[Mv].name!==Mv})))},{trim:function(){return Bv(this)}});var $v=function(t){this.ok=!1,this.alpha=1,"#"==t.charAt(0)&&(t=t.substr(1,6)),t=(t=t.replace(/ /g,"")).toLowerCase();var r={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};t=r[t]||t;for(var e=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3]),parseFloat(t[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],i=0;i<e.length;i++){var n=e[i].process,s=e[i].re.exec(t);if(s){var a=n(s);this.r=a[0],this.g=a[1],this.b=a[2],a.length>3&&(this.alpha=a[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var t=this.r.toString(16),r=this.g.toString(16),e=this.b.toString(16);return 1==t.length&&(t="0"+t),1==r.length&&(r="0"+r),1==e.length&&(e="0"+e),"#"+t+r+e},this.getHelpXML=function(){for(var t=new Array,i=0;i<e.length;i++)for(var n=e[i].example,s=0;s<n.length;s++)t[t.length]=n[s];for(var a in r)t[t.length]=a;var o=document.createElement("ul");for(o.setAttribute("id","rgbcolor-examples"),i=0;i<t.length;i++)try{var h=document.createElement("li"),u=new RGBColor(t[i]),c=document.createElement("div");c.style.cssText="margin: 3px; border: 1px solid black; background:"+u.toHex()+"; color:"+u.toHex(),c.appendChild(document.createTextNode("test"));var f=document.createTextNode(" "+t[i]+" -> "+u.toRGB()+" -> "+u.toHex());h.appendChild(c),h.appendChild(f),o.appendChild(h)}catch(t){}return o}},Dv=Di,Lv=Je.indexOf,Fv=Cl,Iv=Hn([].indexOf),zv=!!Iv&&1/Iv([1],1,-0)<0;Dv({target:"Array",proto:!0,forced:zv||!Fv("indexOf")},{indexOf:function(t){var r=arguments.length>1?arguments[1]:void 0;return zv?Iv(this,t,r)||0:Lv(this,t,r)}});var _v=Di,Yv=Xc,Xv=$,Uv=xh,qv=qc,Gv=M("".indexOf);_v({target:"String",proto:!0,forced:!qv("includes")},{includes:function(t){return!!~Gv(Uv(Xv(this)),Uv(Yv(t)),arguments.length>1?arguments[1]:void 0)}});var Vv=O,Hv=Di,Wv=Array.isArray||function(t){return"Array"===Vv(t)},Qv=M([].reverse),Zv=[1,2];Hv({target:"Array",proto:!0,forced:String(Zv)===String(Zv.reverse())},{reverse:function(){return Wv(this)&&(this.length=this.length),Qv(this)}});
|
7
7
|
/*! *****************************************************************************
|
8
8
|
Copyright (c) Microsoft Corporation.
|
9
9
|
|
@@ -3,4 +3,4 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import{r as i,c as t,g as e,h as s,H as a}from"./p-e996c38f.js";import{a as h,l,g as n}from"./p-a397e773.js";import{e as o,h as r,i as c,j as d,c as p,k as b,l as g,m as f}from"./p-dcd2f00b.js";import{a as y,e as m,f as u}from"./p-80cb7c73.js";import{s as w}from"./p-e6859850.js";import{d as v,a as _}from"./p-36e3b39c.js";import"./p-3b3f77bc.js";import"./p-d4056c1c.js";import"./p-8717729a.js";import"./p-19bce2cc.js";import"./p-2bc98cb0.js";import"./p-4f236b5d.js";import"./p-570b13d9.js";import"./p-0668e30d.js";const S=class{constructor(e){i(this,e),this.selectionSetChange=t(this,"selectionSetChange",7),this.bufferColor=[227,139,79,.8],this.bufferOutlineColor=[255,255,255],this.customLabelEnabled=void 0,this.enabledLayerIds=[],this.enableLayerFeatures=!0,this.enableLayerFeaturesOnLoad=!1,this.enableSearchDistance=!0,this.enableSearchDistanceOnLoad=!1,this.enableSketchTools=!0,this.defaultBufferDistance=void 0,this.defaultBufferUnit=void 0,this.geometries=[],this.isUpdate=!1,this.layerViews=[],this.locale=void 0,this.mapView=void 0,this.noResultText=void 0,this.searchConfiguration=void 0,this.selectionSet=void 0,this.selectionLayerIds=[],this.selectLayerView=void 0,this.sketchLineSymbol=void 0,this.sketchPointSymbol=void 0,this.sketchPolygonSymbol=void 0,this.searchDistanceEnabled=!1,this.useLayerFeaturesEnabled=!1,this._numSelected=0,this._searchTerm=void 0,this._selectionLoading=!1,this._translations=void 0}get el(){return e(this)}_esriRequest;FeatureLayer;Graphic;GraphicsLayer;Search;_geometryEngine;_bufferGeometry;_bufferGraphicsLayer;_bufferTools;_distance;_drawTools;_labelName;_selectLayers;_searchElement;_searchResult;_searchWidget;_selectedIds=[];_selectionLabel="";_skipGeomOIDs;_sketchGraphic;_graphics=[];_unit;_workflowType;_featuresCollection={};async watchGeometriesHandler(i,t){if(i!==t){const t=0===i.length;if(await this._clearResults(t,t),i.length>0)return this._highlightWithOIDsOrGeoms()}}async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}async mapViewWatchHandler(i,t){i&&i!==t&&await this._init()}async watchSearchConfigurationHandler(i,t){JSON.stringify(i)!==JSON.stringify(t)&&await this._initSearchWidget()}async clearSelection(){return this._clearResults(!0,!0)}async getSelection(){return/\S+/gm.test(this._selectionLabel)||await this._updateLabel(),{id:this.isUpdate?this.selectionSet.id:Date.now(),searchResult:this._searchResult,buffer:this._bufferGeometry,distance:this._bufferTools?.distance,download:!0,unit:this._bufferTools?.unit,label:this._selectionLabel,selectedIds:this._selectedIds,layerView:this.selectLayerView,geometries:this.geometries,graphics:this._graphics,selectLayers:this.layerViews,skipGeomOIDs:this._skipGeomOIDs,searchDistanceEnabled:this.searchDistanceEnabled,workflowType:this._workflowType,useLayerFeaturesEnabled:this.useLayerFeaturesEnabled,sketchGraphic:this._sketchGraphic}}selectionSetChange;searchConfigurationChangeChanged(i){this.searchConfiguration=i.detail}async distanceChanged(i){await this._distanceChanged(i.detail)}async unitChanged(i){i.detail.newValue!==i.detail.oldValue&&(this._unit=i.detail.newValue,await this._updateLabel())}async componentWillLoad(){await this._getTranslations(),await this._initModules()}async componentDidLoad(){await this._init()}render(){const i=this.enableSketchTools?"":"display-none",t=this.enableSketchTools?"padding-top-1":"";return s(a,{key:"a5001c196db1464bffa746310638b2853ff5fdf9"},this._getMapLayerPicker(),s("div",{key:"3e023a81f76bdd371c84d9ecb42e97a9160c6f89",class:"border-bottom"}),s("div",{key:"c6be571bee2d2c1fe82407aee9a1cf9f1f27280d",class:"padding-top-sides-1"},s("div",{key:"aaf5992f616728f6be5be034700ac09b9b5b733f",class:"search-widget",ref:i=>{this._searchElement=i}}),s("div",{key:"a86b4e147b7baf4b93272bed7f189a47faf65ab8",class:t},s("map-draw-tools",{key:"9b3c2faaa8f612d055189206e2baeb868d55dceb",active:!0,class:i,editGraphicsEnabled:!this.useLayerFeaturesEnabled,graphics:this._graphics,locale:this.locale,mapView:this.mapView,onSketchGraphicsChange:i=>{this._sketchGraphicsChanged(i)},pointSymbol:this.sketchPointSymbol,polygonSymbol:this.sketchPolygonSymbol,polylineSymbol:this.sketchLineSymbol,ref:i=>{this._drawTools=i}})),this.enableSearchDistance?this._getBufferOptions():void 0,this.enableLayerFeatures?this._getUseLayerFeaturesOptions():void 0,this._getNumSelected()),s("div",{key:"73b3039f0861046a3f955872180b64c15bd5c5d9",class:"border-bottom"}),this._getNameInput())}_getBufferOptions(){this.enableSearchDistanceOnLoad&&(this.searchDistanceEnabled=!0,this.enableSearchDistanceOnLoad=!1);const i=this.searchDistanceEnabled?"search-distance":"div-not-visible",t="number"==typeof this.selectionSet?.distance?this.selectionSet.distance:this.defaultBufferDistance;return s("div",null,s("div",{class:"padding-top-1 display-flex"},s("calcite-label",{class:"label-margin-0 w-100",layout:"inline-space-between"},s("div",{class:"tooltip-container"},this._translations.searchDistance,s("calcite-icon",{class:"padding-start-1-2 icon",flipRtl:!("he"===this.locale?.toLowerCase()),icon:"question",id:"search-distance-icon",scale:"s"}))),s("calcite-popover",{closable:!0,label:"",referenceElement:"search-distance-icon"},s("span",{class:"tooltip-message"},this._translations.useSearchDistanceTootip)),s("calcite-switch",{checked:this.searchDistanceEnabled,onCalciteSwitchChange:()=>this.searchDistanceEnabled=!this.searchDistanceEnabled})),s("div",{class:i},s("buffer-tools",{disabled:!this.searchDistanceEnabled,distance:t,geometries:this.geometries,locale:this.locale,onBufferComplete:i=>{this._bufferComplete(i)},ref:i=>this._bufferTools=i,unit:this.selectionSet?.unit||this.defaultBufferUnit})))}_getUseLayerFeaturesOptions(){this.enableLayerFeaturesOnLoad&&(this.useLayerFeaturesEnabled=!0,this.enableLayerFeaturesOnLoad=!1);const i=this.useLayerFeaturesEnabled?"div-visible":"div-not-visible";return s("div",null,s("div",{class:"padding-top-1 display-flex"},s("calcite-label",{class:"label-margin-0 w-100",layout:"inline-space-between"},s("div",{class:"tooltip-container"},this._translations.useLayerFeatures,s("calcite-icon",{class:"padding-start-1-2 icon",flipRtl:!("he"===this.locale?.toLowerCase()),icon:"question",id:"use-layer-features-icon",scale:"s"}))),s("calcite-popover",{closable:!0,label:"",referenceElement:"use-layer-features-icon"},s("span",{class:"tooltip-message"},this._translations.useLayerFeaturesTooltip)),s("calcite-switch",{checked:this.useLayerFeaturesEnabled,onCalciteSwitchChange:()=>{this._useLayerFeaturesEnabledChanged()}})),s("div",{class:i+" padding-top-1"},s("map-layer-picker",{enabledLayerIds:this.selectionLayerIds,locale:this.locale,mapView:this.mapView,onLayerSelectionChange:i=>{this._layerSelectionChange(i)},selectedIds:this.layerViews.map((i=>i.layer.id)),showTables:!1})))}_getNumSelected(){const i=h(this.el),t=i&&"en"===i?`${this._translations.selectionLoading}...`:this._translations.selectionLoading;return s("div",{class:"padding-top-1 padding-bottom-1",style:{"align-items":"end",display:"flex"}},this._selectionLoading?s("div",null,s("calcite-loader",{class:"info-blue",inline:!0,label:t,scale:"m",type:"indeterminate"})):s("calcite-icon",{class:"info-blue padding-end-1-2",icon:"feature-layer",scale:"s"}),s("calcite-input-message",{class:"info-blue",scale:"m"},this._selectionLoading?t:this.noResultText&&0===this._numSelected?this.noResultText:this._translations.selectedFeatures.replace("{{n}}",this._numSelected.toString())))}_getNameInput(){return s("div",{class:"padding-sides-1 padding-top-1 "+(this.customLabelEnabled?"":"display-none")},s("calcite-label",{class:"font-bold"},this._translations.listName,s("calcite-input",{onInput:()=>{this._selectionLabel=this._labelName.value},placeholder:this._translations.listNamePlaceholder,ref:i=>{this._labelName=i},value:this._selectionLabel||""})))}_getMapLayerPicker(){return s("div",{class:"display-flex padding-sides-1 padding-bottom-1"},s("calcite-label",{class:"font-bold width-full label-margin-0"},this._translations.inputLayer,s("map-layer-picker",{enabledLayerIds:this.enabledLayerIds,locale:this.locale,mapView:this.mapView,onLayerSelectionChange:i=>{this._inputLayerSelectionChange(i)},selectedIds:this.selectLayerView?[this.selectLayerView.layer.id]:this.selectionSet?[this.selectionSet.layerView.layer.id]:[],showTables:!1})))}async _initModules(){const[i,t,e,s,a,h]=await l(["esri/request","esri/layers/GraphicsLayer","esri/Graphic","esri/widgets/Search","esri/geometry/geometryEngine","esri/layers/FeatureLayer"]);this._esriRequest=i,this.GraphicsLayer=t,this.Graphic=e,this.Search=s,this._geometryEngine=a,this.FeatureLayer=h}async _init(){this._initGraphicsLayer(),await this._initSelectionSet(),await this._initSearchWidget()}async _initSelectionSet(){this.selectionSet&&(this._searchTerm=this.selectionSet.searchResult?.name,this._searchResult=this.selectionSet.searchResult,this._selectLayers=this.selectionSet.selectLayers,this._selectedIds=this.selectionSet.selectedIds,this._skipGeomOIDs=this.selectionSet.skipGeomOIDs,this.searchDistanceEnabled=this.selectionSet.searchDistanceEnabled,this.useLayerFeaturesEnabled=this.selectionSet.useLayerFeaturesEnabled,this._distance=this.selectionSet.searchDistanceEnabled?this.selectionSet.distance:0,this._unit=this.selectionSet.unit,this._workflowType=this.selectionSet.workflowType,this.selectLayerView=this.selectionSet.layerView,this._sketchGraphic=this.selectionSet.sketchGraphic,this.geometries=[...this.selectionSet?.geometries||[]],this._graphics=this.geometries.map((i=>new this.Graphic({geometry:i,symbol:"point"===i.type?this.sketchPointSymbol:"polyline"===i.type?this.sketchLineSymbol:this.sketchPolygonSymbol}))),this._selectionLabel=this.selectionSet?.label,this.useLayerFeaturesEnabled||await(this._drawTools?.updateGraphics()),await o(this.selectionSet.selectedIds,this.selectionSet.layerView,this.mapView,!1))}async _initSearchWidget(){if(this.mapView&&this._searchElement){const i=this._getSearchConfig(this.searchConfiguration,this.mapView),t={view:this.mapView,container:this._searchElement,searchTerm:this._searchTerm,...i};this._searchWidget=new this.Search(t),this._searchWidget.popupEnabled=!1,this._searchWidget.resultGraphicEnabled=!1,this._searchWidget.on("search-clear",(()=>{const i=this._searchClearLabel();this._clearResults(!1,i)})),this._searchWidget.on("select-result",(i=>{this._selectResult(i.result)})),await this._searchWidget.when((()=>{this._searchWidget.allPlaceholder=this.searchConfiguration?.allPlaceholder&&"find address or place"!==this.searchConfiguration.allPlaceholder.toLowerCase()?this.searchConfiguration.allPlaceholder:this._translations.placeholder}))}}async _selectResult(i){if(i){this._searchResult=i;const t=i.feature,e=t?.layer,s=this.selectLayerView.layer,a=t?.getObjectId();let h,l;e?.sourceJSON?.isView&&(h=await this._getViewSourceUrl(e.url)),s?.sourceJSON?.isView&&(l=await this._getViewSourceUrl(s.url));const n=e?.url?.toLowerCase(),o=h?.toLowerCase(),r=s?.url?.toLowerCase(),c=l?.toLowerCase(),d=n&&r&&(n===r||n===c||o===r||o===c)&&!isNaN(a),p=d?[a]:void 0;this._workflowType=y.SEARCH,this._updateLabel();const b=[i.feature];this._updateSelection(b,d,p),this._drawTools.graphics=b,this._searchWidget.resultGraphic.visible=!1}else{const i=this._searchClearLabel();this._clearResults(!1,i)}}async _getViewSourceUrl(i){let t="";const e=`${i}/sources?f=json`;try{const i=await this._esriRequest(e,{query:{f:"json"}});1===i?.data?.services?.length&&(t=i.data.services[0].url)}catch(i){console.log(i)}return t}_searchClearLabel(){return this._searchResult?.name&&this._labelName.value.indexOf(this._searchResult.name)>-1}_getSearchConfig(i,t){const e=i?.sources;return e?.length>0?(i={...i,includeDefaultSources:!1},e.forEach((i=>{if(i.hasOwnProperty("layer")){const e=i,s=e.layer?.id,a=s?t.map.findLayerById(s):null,h=e?.layer?.url;a?e.layer=a:h&&(e.layer=new this.FeatureLayer(h))}})),e?.forEach((i=>{if(i.hasOwnProperty("locator")){const t=i;"ArcGIS World Geocoding Service"===t?.name&&(t.outFields=t.outFields||["Addr_type","Match_addr","StAddr","City"],t.singleLineFieldName="SingleLine"),t.url=t.url,delete t.url}}))):i={...i,includeDefaultSources:!0},i}_initGraphicsLayer(){const i=this._translations.bufferLayer;if(this.mapView){const t=this.mapView.map.layers.findIndex((t=>t.title===i));if(t>-1)this._bufferGraphicsLayer=this.mapView.map.layers.getItemAt(t);else{this._bufferGraphicsLayer=new this.GraphicsLayer({title:i,listMode:"hide"}),w.managedLayers[i]="buffer";const t=this.mapView.map.layers.findIndex((i=>i.title===this._translations.sketchLayer));t>-1?this.mapView.map.layers.add(this._bufferGraphicsLayer,t):this.mapView.map.layers.add(this._bufferGraphicsLayer)}}}async _sketchGraphicsChanged(i,t=!1){const e=i.detail.graphics;if(e.length>0&&e[0])if(t||(this._sketchGraphic=e[0]),this._workflowType=this.useLayerFeaturesEnabled?y.SELECT:y.SKETCH,this._workflowType===y.SKETCH&&await this._drawTools.updateGraphics(),await this._updateLabel(),this._clearSearchWidget(),this.useLayerFeaturesEnabled&&!t){const i=Array.isArray(e)?e.map((i=>i.geometry)):this.geometries;await this._selectLayerFeatures(i[0])}else{const t=e.reduce(((i,t)=>(t?.layer?.objectIdField?i.push(t.attributes[t.layer.objectIdField]):t.getObjectId&&i.push(t.getObjectId()),i)),[]),s=i.detail.useOIDs&&t.length>0;this._updateSelection(e,s,t),s&&await this._highlightFeatures(t)}else await this._clearResults(!0,!0)}async _highlightWithOIDsOrGeoms(){return this._skipGeomOIDs?.length>0?(this._selectedIds=this._skipGeomOIDs,this._highlightFeatures(this._selectedIds)):this._geomQuery(this.geometries)}async _highlightFeatures(i){w.removeHandles(),i.length>0&&w.highlightHandles.push(await r(i,this.selectLayerView,this.mapView)),this._numSelected=i.length,this.selectionSetChange.emit(i.length)}async _selectFeatures(i){this._selectionLoading=!0,this._selectedIds=await c(i,this.selectLayerView.layer),this._selectionLoading=!1,this._drawTools.graphics=this._graphics,await this._highlightFeatures(this._selectedIds)}async _bufferComplete(i){this._bufferGeometry=Array.isArray(i.detail)?i.detail[0]:i.detail;let t=this._bufferTools.distance,e=0;if(this._bufferGeometry){const i=new this.Graphic({geometry:this._bufferGeometry,symbol:{type:"simple-fill",color:this.bufferColor,outline:{color:this.bufferOutlineColor,width:1}}});this._bufferGraphicsLayer.removeAll(),this._bufferGraphicsLayer.add(i),await this._selectFeatures([this._bufferGeometry]),await this.mapView.goTo(i.geometry.extent),e=t,t=0}else this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll(),await this._highlightWithOIDsOrGeoms();await this._distanceChanged({oldValue:t,newValue:e})}_geomQuery(i){const t=d(i,this._geometryEngine);return this._selectFeatures(t)}async _clearResults(i=!0,t=!1){this._selectedIds=[],this._distance=void 0,this._unit=void 0,t&&(this._selectionLabel="",this._labelName&&(this._labelName.value="")),this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll(),i&&this._searchWidget&&this._clearSearchWidget(),w.removeHandles(),this._drawTools?.clear&&(this._graphics=[],await this._drawTools.clear()),this._numSelected=this._selectedIds.length,this.selectionSetChange.emit(this._numSelected)}_clearSearchWidget(){this._searchWidget.clear(),this._searchResult=void 0}_updateSelection(i,t,e){this._selectedIds=t&&e?e:this._selectedIds,this._skipGeomOIDs=t?e:void 0,this.geometries=Array.isArray(i)?i.map((i=>i.geometry)):this.geometries,this._graphics=i}async _updateLabel(){if(this.enableSearchDistance){const i=this._selectionLabel.indexOf(this._translations.sketch)>-1,t=this._selectionLabel.indexOf(this._translations.select)>-1,e=this._selectionLabel.indexOf(this._searchResult?.name)>-1,s=this._workflowType===y.SEARCH?this._searchResult?.name:this._workflowType===y.SELECT?this._translations.select:this._translations.sketch,a=this._unit?this._unit:this._bufferTools.unit,h=await this._bufferTools.getTranslatedUnit(a),l=isNaN(this._distance)?this._bufferTools.distance:this._distance;this._selectionLabel=i||t||e||!this._selectionLabel?`${s} ${l} ${h}`:this._selectionLabel,this._labelName.value=this._selectionLabel}}async _layerSelectionChange(i){if(Array.isArray(i.detail)&&i.detail.length>0){const t=i.detail.map((i=>p(this.mapView,i)));return Promise.all(t).then((i=>{this.layerViews=i,this._featuresCollection={},this._sketchGraphic&&this._sketchGraphicsChanged({detail:{graphics:[this._sketchGraphic],useOIDs:!1}})}))}}async _inputLayerSelectionChange(i){const t=i?.detail?.length>0?i.detail[0]:"";this.selectLayerView&&t===this.selectLayerView.layer.id||(this.selectLayerView=await p(this.mapView,t),await this._updateLabel(),this._bufferGeometry?await this._selectFeatures([this._bufferGeometry]):await this._highlightWithOIDsOrGeoms())}async _distanceChanged(i){i.newValue!==i.oldValue&&(this._distance=i.newValue,await this._updateLabel())}async _selectLayerFeatures(i){this._selectionLoading=!0;const t=this.layerViews.map((t=>(this._featuresCollection[t.layer.id]=[],b(0,t.layer,i,this._featuresCollection))));return Promise.all(t).then((async i=>{this._selectionLoading=!1;let t=[];i.forEach((i=>{Object.keys(i).forEach((e=>{t=t.concat(i[e])}))}));let e=!1;t.forEach((i=>{const t=i.geometry;i.symbol="point"===t.type?this.sketchPointSymbol:"polyline"===t.type?this.sketchLineSymbol:"polygon"===t.type?this.sketchPolygonSymbol:void 0,e=i?.layer?.hasOwnProperty("objectIdField")||i.hasOwnProperty("getObjectId")}));const s=this.layerViews[0].layer,a=this.selectLayerView.layer,h=e&&s.url===a.url&&a.layerId===s.layerId;await this._sketchGraphicsChanged({detail:{graphics:t,useOIDs:h}},!0)}))}_useLayerFeaturesEnabledChanged(){this.useLayerFeaturesEnabled=!this.useLayerFeaturesEnabled,this._sketchGraphic&&this._sketchGraphicsChanged({detail:{graphics:[this._sketchGraphic],useOIDs:!1}})}async _getTranslations(){const i=await n(this.el);this._translations=i[0]}static get watchers(){return{geometries:["watchGeometriesHandler"],locale:["localeWatchHandler"],mapView:["mapViewWatchHandler"],searchConfiguration:["watchSearchConfigurationHandler"]}}};S.style=':host{display:block}.div-visible{display:inherit}.div-visible-search{display:flex;height:44px;align-items:center;padding-bottom:0}.div-not-visible{display:none}.padding-bottom-1{padding-bottom:1rem}.padding-top-1{padding-top:1rem}.search-widget{width:100% !important;border:1px solid var(--calcite-color-border-input)}.w-100{width:100%}.w-50{width:50%}.search-distance-container{padding-top:"1rem" !important}.end-border{border-inline-end:1px solid var(--calcite-color-border-2)}.search-distance{display:flex;padding-top:1rem}.font-bold{font:bold}.border-bottom{border-bottom:1px solid var(--calcite-color-border-2)}.tooltip-container{display:flex}.padding-start-1-2{padding-inline-start:0.5rem}.icon{--calcite-color-icon-color:var(--calcite-color-brand)}.tooltip-message{padding:5px 8px;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-2)}';const L=Object.freeze({__proto__:null,default:[{descriptionPDF:{labelWidthDisplay:"2-5/8",labelHeightDisplay:"1",labelsPerPageDisplay:"30",averyPartNumber:"*60"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.1875,rightMargin:.1875,topMargin:.5,bottomMargin:.5},numLabelsAcross:3,numLabelsDown:10,labelWidth:2.625,labelHeight:1,horizGapIn:.125,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1",labelsPerPageDisplay:"20",averyPartNumber:"*61"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.47637821,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:10,labelWidth:4,labelHeight:1.0025,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1-1/3",labelsPerPageDisplay:"14",averyPartNumber:"*62"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.81889808,bottomMargin:.83464612},numLabelsAcross:2,numLabelsDown:7,labelWidth:4,labelHeight:1.3352,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:6}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"2",labelsPerPageDisplay:"10",averyPartNumber:"*63"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.5,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:5,labelWidth:4,labelHeight:2,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:12,maxNumLabelLines:10}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"3-1/3",labelsPerPageDisplay:"6",averyPartNumber:"*64"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.4724412,bottomMargin:.50000027},numLabelsAcross:2,numLabelsDown:3,labelWidth:4,labelHeight:3.342,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:14,maxNumLabelLines:12}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"1/2",labelsPerPageDisplay:"80",averyPartNumber:"*67"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.307086375,rightMargin:.307086375,topMargin:.4724412,bottomMargin:.49606326},numLabelsAcross:4,numLabelsDown:20,labelWidth:1.75,labelHeight:.50155,horizGapIn:.29527575,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:3}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"2/3",labelsPerPageDisplay:"60",averyPartNumber:"*95"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.28936983,rightMargin:.28936983,topMargin:.53937037,bottomMargin:.5511814},numLabelsAcross:4,numLabelsDown:15,labelWidth:1.75,labelHeight:.6605,horizGapIn:.30708678,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:4}}]}),k=class{constructor(t){i(this,t),this.defaultNumLabelsPerPage=void 0,this.disabled=!1,this.locale=void 0,this._translations=void 0}get el(){return e(this)}_labelInfoElement;_intl;async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}async downloadCSV(i,t,e,s=!0){return v(i,t,!0,e,s)}async downloadPDF(i,t,e=!1,s="",a=""){return _(i,t,this._labelInfoElement.selectedOption?.value,e,s,a)}async componentWillLoad(){await this._getTranslations(),await this._initModules()}render(){return s(a,{key:"2fd2ec44e8962468e3698b81e98746ddf6b7a3ca"},s("calcite-select",{key:"d24fca5c39aa358116ee8557249f7a4b09727b3f",disabled:this.disabled,label:"",ref:i=>{this._labelInfoElement=i}}))}componentDidLoad(){this._renderOptions()}async _initModules(){const[i]=await l(["esri/intl"]);this._intl=i}_getLabelSizeText(i){const t="‎"+i.descriptionPDF.labelWidthDisplay+" x "+i.descriptionPDF.labelHeightDisplay+"‏";return this._translations.pdfLabel.replace("{{n}}",i.descriptionPDF.labelsPerPageDisplay).replace("{{labelSize}}",t)}async _getTranslations(){const i=await n(this.el);this._translations=i[0]}_renderOptions(){(L.default||L).sort(((i,t)=>{const e=parseInt(i.descriptionPDF.labelsPerPageDisplay,10),s=parseInt(t.descriptionPDF.labelsPerPageDisplay,10);return e<s?-1:e>s?1:0})).forEach(((i,t)=>{const e=document.createElement("calcite-option");e.value=i,e.innerHTML=this._getLabelSizeText(i),this._labelInfoElement.appendChild(e),(this.defaultNumLabelsPerPage?parseInt(i.descriptionPDF.labelsPerPageDisplay,10)===this.defaultNumLabelsPerPage:0===t)&&(e.selected=!0)}))}static get watchers(){return{locale:["localeWatchHandler"]}}};k.style=":host{display:block}";const P=class{constructor(e){i(this,e),this.selectionLoadingChange=t(this,"selectionLoadingChange",7),this.selectionSetsChanged=t(this,"selectionSetsChanged",7),this.addresseeLayer=void 0,this.enabledLayerIds=[],this.locale=void 0,this.mapView=void 0,this.selectionSets=[],this.sketchLineSymbol=void 0,this.sketchPointSymbol=void 0,this.sketchPolygonSymbol=void 0,this._translations=void 0,this._selectionMode=m.ADD,this._refineLayer=void 0}get el(){return e(this)}_addEnabled=!0;_drawTools;_refineSets=[];_enabledLayerIds=[];_layerPicker;_featuresCollection={};_refineSelectionSet;async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}selectionLoadingChange;selectionSetsChanged;async componentWillLoad(){await this._getTranslations(),this._enabledLayerIds=this._getEnabledLayerIds(),await this._setRefineSet(this._enabledLayerIds[0])}render(){return s(a,{key:"8220100e14abd8339947a74df2d8072d06fb2a25"},s("div",{key:"1d7426778d638f347b563bfd29478fae7598e2dd",class:(this._enabledLayerIds.length>1?"display-block":"display-none")+" padding-top-sides-1"},s("div",{key:"cfb649989c24c403bde7d358794933f8f7959bb8",class:"display-flex"},s("calcite-label",{key:"dce85bbfa526941a0fb46c1aeba57f4b028948ef",class:"font-bold width-full label-margin-0"},s("div",{key:"86c19198643381fd99681c53bf0b2b5e66ecf7dc",class:"display-flex"},this._translations.inputLayer,s("calcite-icon",{key:"392022947cd9f53b4b83895992c5b0b32e56fb06",class:"padding-start-1-2 icon",flipRtl:!("he"===this.locale?.toLowerCase()),icon:"question",id:"refine-input-layer",scale:"s"})),s("map-layer-picker",{key:"d0946a46e7a79fc613b9eb9aa3e6f896c12bef92",enabledLayerIds:this._enabledLayerIds,locale:this.locale,mapView:this.mapView,onLayerSelectionChange:i=>{this._layerSelectionChange(i)},ref:i=>{this._layerPicker=i},selectedIds:[this._refineLayer.layer.id],showTables:!1})),s("calcite-popover",{key:"3b733fd5e7ceb011446112e65aa1ee1b0c5899c7",closable:!0,label:"",referenceElement:"refine-input-layer"},s("span",{key:"2076104710f4fbdd1de1f31b552b17749ebf9239",class:"tooltip-message"},this._translations.inputLayerTip)))),s("div",{key:"040efdfd6a269244790101cc0712a1cb0bac40d8",class:"padding-1"},s("div",{key:"be963f2cb157fda55980166359e53139a5713405",class:"padding-bottom-1"},s("calcite-segmented-control",{key:"459fa98e8852ea96afd0c9ab5864787f80ff6559",class:"w-100",width:"full"},s("calcite-segmented-control-item",{key:"965fa774838ecd3292c19a430cdbdfc7b44c82b2",checked:this._addEnabled,class:"w-50 word-wrap-anywhere",onClick:()=>this._setSelectionMode(m.ADD),value:m.ADD},s("span",{key:"e0b6fddbded9c78fa98674709ff03f050fd47300",class:"font-weight-500"},this._translations.add)),s("calcite-segmented-control-item",{key:"56e453183fc559ddbce5b041095fad5a8d6262ab",checked:!this._addEnabled,class:"w-50 word-wrap-anywhere",onClick:()=>this._setSelectionMode(m.REMOVE),value:m.REMOVE},s("span",{key:"13593da569557fa57822c98e12a5654cade219a1",class:"font-weight-500"},this._translations.remove)))),s("div",{key:"029fec164d9475274294a1d740a434cab2535cdc"},s("map-draw-tools",{key:"a212c5d21b2b1cdf7ba284a95dacaf83cf0180c9",active:!0,drawMode:u.REFINE,locale:this.locale,mapView:this.mapView,onDrawRedo:()=>this._redo(),onDrawUndo:()=>this._undo(),onSketchGraphicsChange:i=>this._sketchGraphicsChanged(i),pointSymbol:this.sketchPointSymbol,polygonSymbol:this.sketchPolygonSymbol,polylineSymbol:this.sketchLineSymbol,redoEnabled:this._refineSelectionSet?.redoStack.length>0,ref:i=>{this._drawTools=i},undoEnabled:this._refineSelectionSet?.undoStack.length>0})),s("br",{key:"352a0523461cfeeae3bae09ae1cc6f8fa759616b"}),s("calcite-list",{key:"948c7f0aa24d827d29cbc1c2c702deb52134e771",class:"list-border",label:""},this._getRefineSelectionSetList())))}_layerSelectionChange(i){this._setRefineSet(i.detail[0])}_setSelectionMode(i){this._selectionMode=i}_sketchGraphicsChanged(i){const t=i.detail?.graphics[0].geometry;this._selectFeatures(t)}_getEnabledLayerIds(){return this.selectionSets.reduce(((i,t)=>{const e=t?.layerView?.layer.id;return e&&i.indexOf(e)<0?i.push(e):t.workflowType===y.REFINE&&Object.keys(t.refineInfos).forEach((t=>{i.indexOf(t)<0&&i.push(t)})),i}),[])}async _setRefineSet(i){this.selectionSets.some((t=>{if(t.workflowType===y.REFINE)return this._refineSelectionSet=t,Object.keys(t.refineInfos).indexOf(i)>-1}))||await this._initRefineSet(i,this._refineSelectionSet),this._refineLayer=this._refineSelectionSet.refineInfos[i].layerView}async _initRefineSet(i,t){const e={};e[i]={addIds:[],removeIds:[],layerView:await p(this.mapView,i)},t?t.refineInfos={...t.refineInfos,...e}:(this._refineSelectionSet={id:Date.now(),searchResult:void 0,buffer:void 0,distance:0,download:!0,unit:"feet",label:"Refine",selectedIds:[],layerView:void 0,geometries:[],graphics:[],selectLayers:[],workflowType:y.REFINE,searchDistanceEnabled:!1,useLayerFeaturesEnabled:!1,refineInfos:e,redoStack:[],undoStack:[],sketchGraphic:void 0},this.selectionSets.push(this._refineSelectionSet))}_undo(){const i=this._refineSelectionSet.undoStack.pop();this._updateIds(i.ids,i.mode===m.ADD?m.REMOVE:m.ADD,this._refineSelectionSet.redoStack,i.layerView)}_redo(){const i=this._refineSelectionSet.redoStack.pop();this._updateIds(i.ids,i.mode===m.ADD?m.REMOVE:m.ADD,this._refineSelectionSet.undoStack,i.layerView)}_getRefineSelectionSetList(){const i=this._getTotal(this.selectionSets);let t;this.selectionSets.some((i=>{if(i.workflowType===y.REFINE)return t=i,!0}));let e=0,a=0;return Object.keys(t.refineInfos).forEach((i=>{e+=t.refineInfos[i].addIds.length,a+=t.refineInfos[i].removeIds.length})),[s("calcite-list-item",{label:this._translations.featuresAdded.replace("{{n}}",e.toString()),"non-interactive":!0}),s("calcite-list-item",{label:this._translations.featuresRemoved.replace("{{n}}",a.toString()),"non-interactive":!0}),s("calcite-list-item",{label:this._translations.totalSelected.replace("{{n}}",i.toString()),"non-interactive":!0})]}_getTotal(i){const t=g(i);return Object.keys(t).reduce(((i,e)=>i+t[e].ids.length),0)}async _getTranslations(){const i=await n(this.el);this._translations=i[0]}async _selectFeatures(i){this.selectionLoadingChange.emit(!0),this._featuresCollection[this._refineLayer?.layer.id]=[];const t=await b(0,this._refineLayer?.layer,i,this._featuresCollection);this.selectionLoadingChange.emit(!1);let e=[];Object.keys(t).forEach((i=>{i===this._refineLayer?.layer.id&&(e=e.concat(t[i]))}));const s=Array.isArray(e)?e.map((i=>i.attributes[i?.layer?.objectIdField])):[];await this._updateIds(s,this._selectionMode,this._refineSelectionSet.undoStack,this._refineLayer),this._drawTools.clear()}async _highlightFeatures(){this._clearHighlight(),w.highlightHandles=await f(this.selectionSets)}_clearHighlight(){w.removeHandles()}async _updateIds(i,t,e,s){let a=!1;const h=this._refineSelectionSet.refineInfos,l=s.layer.id,n={};n[l]={addIds:[],removeIds:[],layerView:s};const o=Object.keys(h).indexOf(l)>-1?h[l]:n[l];if(t===m.ADD)o.addIds=[...new Set([...i,...o.addIds])],o.addIds.length>0&&e.push({ids:i,mode:t,layerView:s}),o.removeIds.length>0&&(o.removeIds=o.removeIds.filter((t=>i.indexOf(t)<0)));else{const h=this.selectionSets.reduce(((t,e)=>(i.forEach((i=>{e.workflowType!==y.REFINE?e.selectedIds.indexOf(i)>-1&&t.push(i):Object.keys(e.refineInfos).some((a=>{const h=e.refineInfos[a];if(h.layerView.layer.id===s.layer.id&&h.addIds.indexOf(i)>-1)return t.push(i),!0}))})),t)),[]);o.removeIds=[...new Set([...h,...o.removeIds])],o.addIds=o.addIds.filter((i=>h.indexOf(i)<0)),o.removeIds.length>0&&e.push({ids:h,mode:t,layerView:s}),this.selectionSets=this.selectionSets.reduce(((i,t)=>(t.workflowType!==y.REFINE&&t.layerView.layer.id===s.layer.id?(t.selectedIds=t.selectedIds.filter((i=>o.removeIds.indexOf(i)<0)),t.selectedIds.length>0?i.push(t):a=!0):i.push(t),i)),[])}this._refineSelectionSet.refineInfos[l]=o,this.selectionSets=[...this.selectionSets],a&&this.selectionSetsChanged.emit(this.selectionSets),await this._highlightFeatures()}static get watchers(){return{locale:["localeWatchHandler"]}}};P.style=':host{display:block}.div-visible{display:inherit}.div-not-visible{display:none !important}.padding-top-1-2{padding-top:.5rem}.main-label{display:flex;float:left}html[dir="rtl"] .main-label{display:flex;float:right}.border{outline:1px solid var(--calcite-color-border-input)}.margin-top-1{margin-top:1rem}.esri-sketch{display:flex;flex-flow:column wrap}.esri-widget{box-sizing:border-box;color:#323232;font-size:14px;font-family:"Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif;line-height:1.3em;background-color:var(--calcite-color-foreground-1)}.esri-sketch__panel{align-items:center;display:flex;flex-flow:row nowrap;padding:0}*/ .esri-sketch__tool-section{border-right:1px solid rgba(110, 110, 110, .3)}.esri-sketch__section{align-items:center;display:flex;flex-flow:row nowrap;padding:0 7px;margin:6px 0;border-right:1px solid rgba(110, 110, 110, .3)}.display-flex{display:flex}.font-bold{font-weight:bold}.width-full{width:100%}.label-margin-0{--calcite-label-margin-bottom:0}.padding-start-1-2{padding-inline-start:0.5rem}.font-weight-500{font-weight:500}.word-wrap-anywhere{word-wrap:anywhere}';export{S as map_select_tools,k as pdf_download,P as refine_selection}
|
6
|
+
import{r as i,c as t,g as e,h as s,H as a}from"./p-e996c38f.js";import{a as h,l,g as n}from"./p-404cbf48.js";import{e as o,h as r,i as c,j as d,c as p,k as b,l as f,m as g}from"./p-dcd2f00b.js";import{a as y,e as m,f as u}from"./p-80cb7c73.js";import{s as w}from"./p-e6859850.js";import{d as v,a as _}from"./p-db3391b9.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";import"./p-8717729a.js";import"./p-4fe489cf.js";import"./p-2bc98cb0.js";import"./p-4f236b5d.js";import"./p-570b13d9.js";import"./p-0668e30d.js";const S=class{constructor(e){i(this,e),this.selectionSetChange=t(this,"selectionSetChange",7),this.bufferColor=[227,139,79,.8],this.bufferOutlineColor=[255,255,255],this.customLabelEnabled=void 0,this.enabledLayerIds=[],this.enableLayerFeatures=!0,this.enableLayerFeaturesOnLoad=!1,this.enableSearchDistance=!0,this.enableSearchDistanceOnLoad=!1,this.enableSketchTools=!0,this.defaultBufferDistance=void 0,this.defaultBufferUnit=void 0,this.geometries=[],this.isUpdate=!1,this.layerViews=[],this.locale=void 0,this.mapView=void 0,this.noResultText=void 0,this.searchConfiguration=void 0,this.selectionSet=void 0,this.selectionLayerIds=[],this.selectLayerView=void 0,this.sketchLineSymbol=void 0,this.sketchPointSymbol=void 0,this.sketchPolygonSymbol=void 0,this.searchDistanceEnabled=!1,this.useLayerFeaturesEnabled=!1,this._numSelected=0,this._searchTerm=void 0,this._selectionLoading=!1,this._translations=void 0}get el(){return e(this)}_esriRequest;FeatureLayer;Graphic;GraphicsLayer;Search;_geometryEngine;_bufferGeometry;_bufferGraphicsLayer;_bufferTools;_distance;_drawTools;_labelName;_selectLayers;_searchElement;_searchResult;_searchWidget;_selectedIds=[];_selectionLabel="";_skipGeomOIDs;_sketchGraphic;_graphics=[];_unit;_workflowType;_featuresCollection={};async watchGeometriesHandler(i,t){if(i!==t){const t=0===i.length;if(await this._clearResults(t,t),i.length>0)return this._highlightWithOIDsOrGeoms()}}async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}async mapViewWatchHandler(i,t){i&&i!==t&&await this._init()}async watchSearchConfigurationHandler(i,t){JSON.stringify(i)!==JSON.stringify(t)&&await this._initSearchWidget()}async clearSelection(){return this._clearResults(!0,!0)}async getSelection(){return/\S+/gm.test(this._selectionLabel)||await this._updateLabel(),{id:this.isUpdate?this.selectionSet.id:Date.now(),searchResult:this._searchResult,buffer:this._bufferGeometry,distance:this._bufferTools?.distance,download:!0,unit:this._bufferTools?.unit,label:this._selectionLabel,selectedIds:this._selectedIds,layerView:this.selectLayerView,geometries:this.geometries,graphics:this._graphics,selectLayers:this.layerViews,skipGeomOIDs:this._skipGeomOIDs,searchDistanceEnabled:this.searchDistanceEnabled,workflowType:this._workflowType,useLayerFeaturesEnabled:this.useLayerFeaturesEnabled,sketchGraphic:this._sketchGraphic}}selectionSetChange;searchConfigurationChangeChanged(i){this.searchConfiguration=i.detail}async distanceChanged(i){await this._distanceChanged(i.detail)}async unitChanged(i){i.detail.newValue!==i.detail.oldValue&&(this._unit=i.detail.newValue,await this._updateLabel())}async componentWillLoad(){await this._getTranslations(),await this._initModules()}async componentDidLoad(){await this._init()}render(){const i=this.enableSketchTools?"":"display-none",t=this.enableSketchTools?"padding-top-1":"";return s(a,{key:"a5001c196db1464bffa746310638b2853ff5fdf9"},this._getMapLayerPicker(),s("div",{key:"3e023a81f76bdd371c84d9ecb42e97a9160c6f89",class:"border-bottom"}),s("div",{key:"c6be571bee2d2c1fe82407aee9a1cf9f1f27280d",class:"padding-top-sides-1"},s("div",{key:"aaf5992f616728f6be5be034700ac09b9b5b733f",class:"search-widget",ref:i=>{this._searchElement=i}}),s("div",{key:"a86b4e147b7baf4b93272bed7f189a47faf65ab8",class:t},s("map-draw-tools",{key:"9b3c2faaa8f612d055189206e2baeb868d55dceb",active:!0,class:i,editGraphicsEnabled:!this.useLayerFeaturesEnabled,graphics:this._graphics,locale:this.locale,mapView:this.mapView,onSketchGraphicsChange:i=>{this._sketchGraphicsChanged(i)},pointSymbol:this.sketchPointSymbol,polygonSymbol:this.sketchPolygonSymbol,polylineSymbol:this.sketchLineSymbol,ref:i=>{this._drawTools=i}})),this.enableSearchDistance?this._getBufferOptions():void 0,this.enableLayerFeatures?this._getUseLayerFeaturesOptions():void 0,this._getNumSelected()),s("div",{key:"73b3039f0861046a3f955872180b64c15bd5c5d9",class:"border-bottom"}),this._getNameInput())}_getBufferOptions(){this.enableSearchDistanceOnLoad&&(this.searchDistanceEnabled=!0,this.enableSearchDistanceOnLoad=!1);const i=this.searchDistanceEnabled?"search-distance":"div-not-visible",t="number"==typeof this.selectionSet?.distance?this.selectionSet.distance:this.defaultBufferDistance;return s("div",null,s("div",{class:"padding-top-1 display-flex"},s("calcite-label",{class:"label-margin-0 w-100",layout:"inline-space-between"},s("div",{class:"tooltip-container"},this._translations.searchDistance,s("calcite-icon",{class:"padding-start-1-2 icon",flipRtl:!("he"===this.locale?.toLowerCase()),icon:"question",id:"search-distance-icon",scale:"s"}))),s("calcite-popover",{closable:!0,label:"",referenceElement:"search-distance-icon"},s("span",{class:"tooltip-message"},this._translations.useSearchDistanceTootip)),s("calcite-switch",{checked:this.searchDistanceEnabled,onCalciteSwitchChange:()=>this.searchDistanceEnabled=!this.searchDistanceEnabled})),s("div",{class:i},s("buffer-tools",{disabled:!this.searchDistanceEnabled,distance:t,geometries:this.geometries,locale:this.locale,onBufferComplete:i=>{this._bufferComplete(i)},ref:i=>this._bufferTools=i,unit:this.selectionSet?.unit||this.defaultBufferUnit})))}_getUseLayerFeaturesOptions(){this.enableLayerFeaturesOnLoad&&(this.useLayerFeaturesEnabled=!0,this.enableLayerFeaturesOnLoad=!1);const i=this.useLayerFeaturesEnabled?"div-visible":"div-not-visible";return s("div",null,s("div",{class:"padding-top-1 display-flex"},s("calcite-label",{class:"label-margin-0 w-100",layout:"inline-space-between"},s("div",{class:"tooltip-container"},this._translations.useLayerFeatures,s("calcite-icon",{class:"padding-start-1-2 icon",flipRtl:!("he"===this.locale?.toLowerCase()),icon:"question",id:"use-layer-features-icon",scale:"s"}))),s("calcite-popover",{closable:!0,label:"",referenceElement:"use-layer-features-icon"},s("span",{class:"tooltip-message"},this._translations.useLayerFeaturesTooltip)),s("calcite-switch",{checked:this.useLayerFeaturesEnabled,onCalciteSwitchChange:()=>{this._useLayerFeaturesEnabledChanged()}})),s("div",{class:i+" padding-top-1"},s("map-layer-picker",{enabledLayerIds:this.selectionLayerIds,locale:this.locale,mapView:this.mapView,onLayerSelectionChange:i=>{this._layerSelectionChange(i)},selectedIds:this.layerViews.map((i=>i.layer.id)),showTables:!1})))}_getNumSelected(){const i=h(this.el),t=i&&"en"===i?`${this._translations.selectionLoading}...`:this._translations.selectionLoading;return s("div",{class:"padding-top-1 padding-bottom-1",style:{"align-items":"end",display:"flex"}},this._selectionLoading?s("div",null,s("calcite-loader",{class:"info-blue",inline:!0,label:t,scale:"m",type:"indeterminate"})):s("calcite-icon",{class:"info-blue padding-end-1-2",icon:"feature-layer",scale:"s"}),s("calcite-input-message",{class:"info-blue",scale:"m"},this._selectionLoading?t:this.noResultText&&0===this._numSelected?this.noResultText:this._translations.selectedFeatures.replace("{{n}}",this._numSelected.toString())))}_getNameInput(){return s("div",{class:"padding-sides-1 padding-top-1 "+(this.customLabelEnabled?"":"display-none")},s("calcite-label",{class:"font-bold"},this._translations.listName,s("calcite-input",{onInput:()=>{this._selectionLabel=this._labelName.value},placeholder:this._translations.listNamePlaceholder,ref:i=>{this._labelName=i},value:this._selectionLabel||""})))}_getMapLayerPicker(){return s("div",{class:"display-flex padding-sides-1 padding-bottom-1"},s("calcite-label",{class:"font-bold width-full label-margin-0"},this._translations.inputLayer,s("map-layer-picker",{enabledLayerIds:this.enabledLayerIds,locale:this.locale,mapView:this.mapView,onLayerSelectionChange:i=>{this._inputLayerSelectionChange(i)},selectedIds:this.selectLayerView?[this.selectLayerView.layer.id]:this.selectionSet?[this.selectionSet.layerView.layer.id]:[],showTables:!1})))}async _initModules(){const[i,t,e,s,a,h]=await l(["esri/request","esri/layers/GraphicsLayer","esri/Graphic","esri/widgets/Search","esri/geometry/geometryEngine","esri/layers/FeatureLayer"]);this._esriRequest=i,this.GraphicsLayer=t,this.Graphic=e,this.Search=s,this._geometryEngine=a,this.FeatureLayer=h}async _init(){this._initGraphicsLayer(),await this._initSelectionSet(),await this._initSearchWidget()}async _initSelectionSet(){this.selectionSet&&(this._searchTerm=this.selectionSet.searchResult?.name,this._searchResult=this.selectionSet.searchResult,this._selectLayers=this.selectionSet.selectLayers,this._selectedIds=this.selectionSet.selectedIds,this._skipGeomOIDs=this.selectionSet.skipGeomOIDs,this.searchDistanceEnabled=this.selectionSet.searchDistanceEnabled,this.useLayerFeaturesEnabled=this.selectionSet.useLayerFeaturesEnabled,this._distance=this.selectionSet.searchDistanceEnabled?this.selectionSet.distance:0,this._unit=this.selectionSet.unit,this._workflowType=this.selectionSet.workflowType,this.selectLayerView=this.selectionSet.layerView,this._sketchGraphic=this.selectionSet.sketchGraphic,this.geometries=[...this.selectionSet?.geometries||[]],this._graphics=this.geometries.map((i=>new this.Graphic({geometry:i,symbol:"point"===i.type?this.sketchPointSymbol:"polyline"===i.type?this.sketchLineSymbol:this.sketchPolygonSymbol}))),this._selectionLabel=this.selectionSet?.label,this.useLayerFeaturesEnabled||await(this._drawTools?.updateGraphics()),await o(this.selectionSet.selectedIds,this.selectionSet.layerView,this.mapView,!1))}async _initSearchWidget(){if(this.mapView&&this._searchElement){const i=this._getSearchConfig(this.searchConfiguration,this.mapView),t={view:this.mapView,container:this._searchElement,searchTerm:this._searchTerm,...i};this._searchWidget=new this.Search(t),this._searchWidget.popupEnabled=!1,this._searchWidget.resultGraphicEnabled=!1,this._searchWidget.on("search-clear",(()=>{const i=this._searchClearLabel();this._clearResults(!1,i)})),this._searchWidget.on("select-result",(i=>{this._selectResult(i.result)})),await this._searchWidget.when((()=>{this._searchWidget.allPlaceholder=this.searchConfiguration?.allPlaceholder&&"find address or place"!==this.searchConfiguration.allPlaceholder.toLowerCase()?this.searchConfiguration.allPlaceholder:this._translations.placeholder}))}}async _selectResult(i){if(i){this._searchResult=i;const t=i.feature,e=t?.layer,s=this.selectLayerView.layer,a=t?.getObjectId();let h,l;e?.sourceJSON?.isView&&(h=await this._getViewSourceUrl(e.url)),s?.sourceJSON?.isView&&(l=await this._getViewSourceUrl(s.url));const n=e?.url?.toLowerCase(),o=h?.toLowerCase(),r=s?.url?.toLowerCase(),c=l?.toLowerCase(),d=n&&r&&(n===r||n===c||o===r||o===c)&&!isNaN(a),p=d?[a]:void 0;this._workflowType=y.SEARCH,this._updateLabel();const b=[i.feature];this._updateSelection(b,d,p),this._drawTools.graphics=b,this._searchWidget.resultGraphic.visible=!1}else{const i=this._searchClearLabel();this._clearResults(!1,i)}}async _getViewSourceUrl(i){let t="";const e=`${i}/sources?f=json`;try{const i=await this._esriRequest(e,{query:{f:"json"}});1===i?.data?.services?.length&&(t=i.data.services[0].url)}catch(i){console.log(i)}return t}_searchClearLabel(){return this._searchResult?.name&&this._labelName.value.indexOf(this._searchResult.name)>-1}_getSearchConfig(i,t){const e=i?.sources;return e?.length>0?(i={...i,includeDefaultSources:!1},e.forEach((i=>{if(i.hasOwnProperty("layer")){const e=i,s=e.layer?.id,a=s?t.map.findLayerById(s):null,h=e?.layer?.url;a?e.layer=a:h&&(e.layer=new this.FeatureLayer(h))}})),e?.forEach((i=>{if(i.hasOwnProperty("locator")){const t=i;"ArcGIS World Geocoding Service"===t?.name&&(t.outFields=t.outFields||["Addr_type","Match_addr","StAddr","City"],t.singleLineFieldName="SingleLine"),t.url=t.url,delete t.url}}))):i={...i,includeDefaultSources:!0},i}_initGraphicsLayer(){const i=this._translations.bufferLayer;if(this.mapView){const t=this.mapView.map.layers.findIndex((t=>t.title===i));if(t>-1)this._bufferGraphicsLayer=this.mapView.map.layers.getItemAt(t);else{this._bufferGraphicsLayer=new this.GraphicsLayer({title:i,listMode:"hide"}),w.managedLayers[i]="buffer";const t=this.mapView.map.layers.findIndex((i=>i.title===this._translations.sketchLayer));t>-1?this.mapView.map.layers.add(this._bufferGraphicsLayer,t):this.mapView.map.layers.add(this._bufferGraphicsLayer)}}}async _sketchGraphicsChanged(i,t=!1){const e=i.detail.graphics;if(e.length>0&&e[0])if(t||(this._sketchGraphic=e[0]),this._workflowType=this.useLayerFeaturesEnabled?y.SELECT:y.SKETCH,this._workflowType===y.SKETCH&&await this._drawTools.updateGraphics(),await this._updateLabel(),this._clearSearchWidget(),this.useLayerFeaturesEnabled&&!t){const i=Array.isArray(e)?e.map((i=>i.geometry)):this.geometries;await this._selectLayerFeatures(i[0])}else{const t=e.reduce(((i,t)=>(t?.layer?.objectIdField?i.push(t.attributes[t.layer.objectIdField]):t.getObjectId&&i.push(t.getObjectId()),i)),[]),s=i.detail.useOIDs&&t.length>0;this._updateSelection(e,s,t),s&&await this._highlightFeatures(t)}else await this._clearResults(!0,!0)}async _highlightWithOIDsOrGeoms(){return this._skipGeomOIDs?.length>0?(this._selectedIds=this._skipGeomOIDs,this._highlightFeatures(this._selectedIds)):this._geomQuery(this.geometries)}async _highlightFeatures(i){w.removeHandles(),i.length>0&&w.highlightHandles.push(await r(i,this.selectLayerView,this.mapView)),this._numSelected=i.length,this.selectionSetChange.emit(i.length)}async _selectFeatures(i){this._selectionLoading=!0,this._selectedIds=await c(i,this.selectLayerView.layer),this._selectionLoading=!1,this._drawTools.graphics=this._graphics,await this._highlightFeatures(this._selectedIds)}async _bufferComplete(i){this._bufferGeometry=Array.isArray(i.detail)?i.detail[0]:i.detail;let t=this._bufferTools.distance,e=0;if(this._bufferGeometry){const i=new this.Graphic({geometry:this._bufferGeometry,symbol:{type:"simple-fill",color:this.bufferColor,outline:{color:this.bufferOutlineColor,width:1}}});this._bufferGraphicsLayer.removeAll(),this._bufferGraphicsLayer.add(i),await this._selectFeatures([this._bufferGeometry]),await this.mapView.goTo(i.geometry.extent),e=t,t=0}else this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll(),await this._highlightWithOIDsOrGeoms();await this._distanceChanged({oldValue:t,newValue:e})}_geomQuery(i){const t=d(i,this._geometryEngine);return this._selectFeatures(t)}async _clearResults(i=!0,t=!1){this._selectedIds=[],this._distance=void 0,this._unit=void 0,t&&(this._selectionLabel="",this._labelName&&(this._labelName.value="")),this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll(),i&&this._searchWidget&&this._clearSearchWidget(),w.removeHandles(),this._drawTools?.clear&&(this._graphics=[],await this._drawTools.clear()),this._numSelected=this._selectedIds.length,this.selectionSetChange.emit(this._numSelected)}_clearSearchWidget(){this._searchWidget.clear(),this._searchResult=void 0}_updateSelection(i,t,e){this._selectedIds=t&&e?e:this._selectedIds,this._skipGeomOIDs=t?e:void 0,this.geometries=Array.isArray(i)?i.map((i=>i.geometry)):this.geometries,this._graphics=i}async _updateLabel(){if(this.enableSearchDistance){const i=this._selectionLabel.indexOf(this._translations.sketch)>-1,t=this._selectionLabel.indexOf(this._translations.select)>-1,e=this._selectionLabel.indexOf(this._searchResult?.name)>-1,s=this._workflowType===y.SEARCH?this._searchResult?.name:this._workflowType===y.SELECT?this._translations.select:this._translations.sketch,a=this._unit?this._unit:this._bufferTools.unit,h=await this._bufferTools.getTranslatedUnit(a),l=isNaN(this._distance)?this._bufferTools.distance:this._distance;this._selectionLabel=i||t||e||!this._selectionLabel?`${s} ${l} ${h}`:this._selectionLabel,this._labelName.value=this._selectionLabel}}async _layerSelectionChange(i){if(Array.isArray(i.detail)&&i.detail.length>0){const t=i.detail.map((i=>p(this.mapView,i)));return Promise.all(t).then((i=>{this.layerViews=i,this._featuresCollection={},this._sketchGraphic&&this._sketchGraphicsChanged({detail:{graphics:[this._sketchGraphic],useOIDs:!1}})}))}}async _inputLayerSelectionChange(i){const t=i?.detail?.length>0?i.detail[0]:"";this.selectLayerView&&t===this.selectLayerView.layer.id||(this.selectLayerView=await p(this.mapView,t),await this._updateLabel(),this._bufferGeometry?await this._selectFeatures([this._bufferGeometry]):await this._highlightWithOIDsOrGeoms())}async _distanceChanged(i){i.newValue!==i.oldValue&&(this._distance=i.newValue,await this._updateLabel())}async _selectLayerFeatures(i){this._selectionLoading=!0;const t=this.layerViews.map((t=>(this._featuresCollection[t.layer.id]=[],b(0,t.layer,i,this._featuresCollection))));return Promise.all(t).then((async i=>{this._selectionLoading=!1;let t=[];i.forEach((i=>{Object.keys(i).forEach((e=>{t=t.concat(i[e])}))}));let e=!1;t.forEach((i=>{const t=i.geometry;i.symbol="point"===t.type?this.sketchPointSymbol:"polyline"===t.type?this.sketchLineSymbol:"polygon"===t.type?this.sketchPolygonSymbol:void 0,e=i?.layer?.hasOwnProperty("objectIdField")||i.hasOwnProperty("getObjectId")}));const s=this.layerViews[0].layer,a=this.selectLayerView.layer,h=e&&s.url===a.url&&a.layerId===s.layerId;await this._sketchGraphicsChanged({detail:{graphics:t,useOIDs:h}},!0)}))}_useLayerFeaturesEnabledChanged(){this.useLayerFeaturesEnabled=!this.useLayerFeaturesEnabled,this._sketchGraphic&&this._sketchGraphicsChanged({detail:{graphics:[this._sketchGraphic],useOIDs:!1}})}async _getTranslations(){const i=await n(this.el);this._translations=i[0]}static get watchers(){return{geometries:["watchGeometriesHandler"],locale:["localeWatchHandler"],mapView:["mapViewWatchHandler"],searchConfiguration:["watchSearchConfigurationHandler"]}}};S.style=':host{display:block}.div-visible{display:inherit}.div-visible-search{display:flex;height:44px;align-items:center;padding-bottom:0}.div-not-visible{display:none}.padding-bottom-1{padding-bottom:1rem}.padding-top-1{padding-top:1rem}.search-widget{width:100% !important;border:1px solid var(--calcite-color-border-input)}.w-100{width:100%}.w-50{width:50%}.search-distance-container{padding-top:"1rem" !important}.end-border{border-inline-end:1px solid var(--calcite-color-border-2)}.search-distance{display:flex;padding-top:1rem}.font-bold{font:bold}.border-bottom{border-bottom:1px solid var(--calcite-color-border-2)}.tooltip-container{display:flex}.padding-start-1-2{padding-inline-start:0.5rem}.icon{--calcite-color-icon-color:var(--calcite-color-brand)}.tooltip-message{padding:5px 8px;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-2)}';const L=Object.freeze({__proto__:null,default:[{descriptionPDF:{labelWidthDisplay:"2-5/8",labelHeightDisplay:"1",labelsPerPageDisplay:"30",averyPartNumber:"*60"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.1875,rightMargin:.1875,topMargin:.5,bottomMargin:.5},numLabelsAcross:3,numLabelsDown:10,labelWidth:2.625,labelHeight:1,horizGapIn:.125,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1",labelsPerPageDisplay:"20",averyPartNumber:"*61"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.47637821,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:10,labelWidth:4,labelHeight:1.0025,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1-1/3",labelsPerPageDisplay:"14",averyPartNumber:"*62"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.81889808,bottomMargin:.83464612},numLabelsAcross:2,numLabelsDown:7,labelWidth:4,labelHeight:1.3352,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:6}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"2",labelsPerPageDisplay:"10",averyPartNumber:"*63"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.5,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:5,labelWidth:4,labelHeight:2,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:12,maxNumLabelLines:10}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"3-1/3",labelsPerPageDisplay:"6",averyPartNumber:"*64"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.4724412,bottomMargin:.50000027},numLabelsAcross:2,numLabelsDown:3,labelWidth:4,labelHeight:3.342,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:14,maxNumLabelLines:12}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"1/2",labelsPerPageDisplay:"80",averyPartNumber:"*67"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.307086375,rightMargin:.307086375,topMargin:.4724412,bottomMargin:.49606326},numLabelsAcross:4,numLabelsDown:20,labelWidth:1.75,labelHeight:.50155,horizGapIn:.29527575,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:3}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"2/3",labelsPerPageDisplay:"60",averyPartNumber:"*95"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.28936983,rightMargin:.28936983,topMargin:.53937037,bottomMargin:.5511814},numLabelsAcross:4,numLabelsDown:15,labelWidth:1.75,labelHeight:.6605,horizGapIn:.30708678,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:4}}]}),k=class{constructor(t){i(this,t),this.defaultNumLabelsPerPage=void 0,this.disabled=!1,this.locale=void 0,this._translations=void 0}get el(){return e(this)}_labelInfoElement;_intl;async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}async downloadCSV(i,t,e,s=!0){return v(i,t,!0,e,s)}async downloadPDF(i,t,e=!1,s="",a=""){return _(i,t,this._labelInfoElement.selectedOption?.value,e,s,a)}async componentWillLoad(){await this._getTranslations(),await this._initModules()}render(){return s(a,{key:"2fd2ec44e8962468e3698b81e98746ddf6b7a3ca"},s("calcite-select",{key:"d24fca5c39aa358116ee8557249f7a4b09727b3f",disabled:this.disabled,label:"",ref:i=>{this._labelInfoElement=i}}))}componentDidLoad(){this._renderOptions()}async _initModules(){const[i]=await l(["esri/intl"]);this._intl=i}_getLabelSizeText(i){const t="‎"+i.descriptionPDF.labelWidthDisplay+" x "+i.descriptionPDF.labelHeightDisplay+"‏";return this._translations.pdfLabel.replace("{{n}}",i.descriptionPDF.labelsPerPageDisplay).replace("{{labelSize}}",t)}async _getTranslations(){const i=await n(this.el);this._translations=i[0]}_renderOptions(){(L.default||L).sort(((i,t)=>{const e=parseInt(i.descriptionPDF.labelsPerPageDisplay,10),s=parseInt(t.descriptionPDF.labelsPerPageDisplay,10);return e<s?-1:e>s?1:0})).forEach(((i,t)=>{const e=document.createElement("calcite-option");e.value=i,e.innerHTML=this._getLabelSizeText(i),this._labelInfoElement.appendChild(e),(this.defaultNumLabelsPerPage?parseInt(i.descriptionPDF.labelsPerPageDisplay,10)===this.defaultNumLabelsPerPage:0===t)&&(e.selected=!0)}))}static get watchers(){return{locale:["localeWatchHandler"]}}};k.style=":host{display:block}";const P=class{constructor(e){i(this,e),this.selectionLoadingChange=t(this,"selectionLoadingChange",7),this.selectionSetsChanged=t(this,"selectionSetsChanged",7),this.addresseeLayer=void 0,this.enabledLayerIds=[],this.locale=void 0,this.mapView=void 0,this.selectionSets=[],this.sketchLineSymbol=void 0,this.sketchPointSymbol=void 0,this.sketchPolygonSymbol=void 0,this._translations=void 0,this._selectionMode=m.ADD,this._refineLayer=void 0}get el(){return e(this)}_addEnabled=!0;_drawTools;_refineSets=[];_enabledLayerIds=[];_layerPicker;_featuresCollection={};_refineSelectionSet;async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}selectionLoadingChange;selectionSetsChanged;async componentWillLoad(){await this._getTranslations(),this._enabledLayerIds=this._getEnabledLayerIds(),await this._setRefineSet(this._enabledLayerIds[0])}render(){return s(a,{key:"8220100e14abd8339947a74df2d8072d06fb2a25"},s("div",{key:"1d7426778d638f347b563bfd29478fae7598e2dd",class:(this._enabledLayerIds.length>1?"display-block":"display-none")+" padding-top-sides-1"},s("div",{key:"cfb649989c24c403bde7d358794933f8f7959bb8",class:"display-flex"},s("calcite-label",{key:"dce85bbfa526941a0fb46c1aeba57f4b028948ef",class:"font-bold width-full label-margin-0"},s("div",{key:"86c19198643381fd99681c53bf0b2b5e66ecf7dc",class:"display-flex"},this._translations.inputLayer,s("calcite-icon",{key:"392022947cd9f53b4b83895992c5b0b32e56fb06",class:"padding-start-1-2 icon",flipRtl:!("he"===this.locale?.toLowerCase()),icon:"question",id:"refine-input-layer",scale:"s"})),s("map-layer-picker",{key:"d0946a46e7a79fc613b9eb9aa3e6f896c12bef92",enabledLayerIds:this._enabledLayerIds,locale:this.locale,mapView:this.mapView,onLayerSelectionChange:i=>{this._layerSelectionChange(i)},ref:i=>{this._layerPicker=i},selectedIds:[this._refineLayer.layer.id],showTables:!1})),s("calcite-popover",{key:"3b733fd5e7ceb011446112e65aa1ee1b0c5899c7",closable:!0,label:"",referenceElement:"refine-input-layer"},s("span",{key:"2076104710f4fbdd1de1f31b552b17749ebf9239",class:"tooltip-message"},this._translations.inputLayerTip)))),s("div",{key:"040efdfd6a269244790101cc0712a1cb0bac40d8",class:"padding-1"},s("div",{key:"be963f2cb157fda55980166359e53139a5713405",class:"padding-bottom-1"},s("calcite-segmented-control",{key:"459fa98e8852ea96afd0c9ab5864787f80ff6559",class:"w-100",width:"full"},s("calcite-segmented-control-item",{key:"965fa774838ecd3292c19a430cdbdfc7b44c82b2",checked:this._addEnabled,class:"w-50 word-wrap-anywhere",onClick:()=>this._setSelectionMode(m.ADD),value:m.ADD},s("span",{key:"e0b6fddbded9c78fa98674709ff03f050fd47300",class:"font-weight-500"},this._translations.add)),s("calcite-segmented-control-item",{key:"56e453183fc559ddbce5b041095fad5a8d6262ab",checked:!this._addEnabled,class:"w-50 word-wrap-anywhere",onClick:()=>this._setSelectionMode(m.REMOVE),value:m.REMOVE},s("span",{key:"13593da569557fa57822c98e12a5654cade219a1",class:"font-weight-500"},this._translations.remove)))),s("div",{key:"029fec164d9475274294a1d740a434cab2535cdc"},s("map-draw-tools",{key:"a212c5d21b2b1cdf7ba284a95dacaf83cf0180c9",active:!0,drawMode:u.REFINE,locale:this.locale,mapView:this.mapView,onDrawRedo:()=>this._redo(),onDrawUndo:()=>this._undo(),onSketchGraphicsChange:i=>this._sketchGraphicsChanged(i),pointSymbol:this.sketchPointSymbol,polygonSymbol:this.sketchPolygonSymbol,polylineSymbol:this.sketchLineSymbol,redoEnabled:this._refineSelectionSet?.redoStack.length>0,ref:i=>{this._drawTools=i},undoEnabled:this._refineSelectionSet?.undoStack.length>0})),s("br",{key:"352a0523461cfeeae3bae09ae1cc6f8fa759616b"}),s("calcite-list",{key:"948c7f0aa24d827d29cbc1c2c702deb52134e771",class:"list-border",label:""},this._getRefineSelectionSetList())))}_layerSelectionChange(i){this._setRefineSet(i.detail[0])}_setSelectionMode(i){this._selectionMode=i}_sketchGraphicsChanged(i){const t=i.detail?.graphics[0].geometry;this._selectFeatures(t)}_getEnabledLayerIds(){return this.selectionSets.reduce(((i,t)=>{const e=t?.layerView?.layer.id;return e&&i.indexOf(e)<0?i.push(e):t.workflowType===y.REFINE&&Object.keys(t.refineInfos).forEach((t=>{i.indexOf(t)<0&&i.push(t)})),i}),[])}async _setRefineSet(i){this.selectionSets.some((t=>{if(t.workflowType===y.REFINE)return this._refineSelectionSet=t,Object.keys(t.refineInfos).indexOf(i)>-1}))||await this._initRefineSet(i,this._refineSelectionSet),this._refineLayer=this._refineSelectionSet.refineInfos[i].layerView}async _initRefineSet(i,t){const e={};e[i]={addIds:[],removeIds:[],layerView:await p(this.mapView,i)},t?t.refineInfos={...t.refineInfos,...e}:(this._refineSelectionSet={id:Date.now(),searchResult:void 0,buffer:void 0,distance:0,download:!0,unit:"feet",label:"Refine",selectedIds:[],layerView:void 0,geometries:[],graphics:[],selectLayers:[],workflowType:y.REFINE,searchDistanceEnabled:!1,useLayerFeaturesEnabled:!1,refineInfos:e,redoStack:[],undoStack:[],sketchGraphic:void 0},this.selectionSets.push(this._refineSelectionSet))}_undo(){const i=this._refineSelectionSet.undoStack.pop();this._updateIds(i.ids,i.mode===m.ADD?m.REMOVE:m.ADD,this._refineSelectionSet.redoStack,i.layerView)}_redo(){const i=this._refineSelectionSet.redoStack.pop();this._updateIds(i.ids,i.mode===m.ADD?m.REMOVE:m.ADD,this._refineSelectionSet.undoStack,i.layerView)}_getRefineSelectionSetList(){const i=this._getTotal(this.selectionSets);let t;this.selectionSets.some((i=>{if(i.workflowType===y.REFINE)return t=i,!0}));let e=0,a=0;return Object.keys(t.refineInfos).forEach((i=>{e+=t.refineInfos[i].addIds.length,a+=t.refineInfos[i].removeIds.length})),[s("calcite-list-item",{label:this._translations.featuresAdded.replace("{{n}}",e.toString()),"non-interactive":!0}),s("calcite-list-item",{label:this._translations.featuresRemoved.replace("{{n}}",a.toString()),"non-interactive":!0}),s("calcite-list-item",{label:this._translations.totalSelected.replace("{{n}}",i.toString()),"non-interactive":!0})]}_getTotal(i){const t=f(i);return Object.keys(t).reduce(((i,e)=>i+t[e].ids.length),0)}async _getTranslations(){const i=await n(this.el);this._translations=i[0]}async _selectFeatures(i){this.selectionLoadingChange.emit(!0),this._featuresCollection[this._refineLayer?.layer.id]=[];const t=await b(0,this._refineLayer?.layer,i,this._featuresCollection);this.selectionLoadingChange.emit(!1);let e=[];Object.keys(t).forEach((i=>{i===this._refineLayer?.layer.id&&(e=e.concat(t[i]))}));const s=Array.isArray(e)?e.map((i=>i.attributes[i?.layer?.objectIdField])):[];await this._updateIds(s,this._selectionMode,this._refineSelectionSet.undoStack,this._refineLayer),this._drawTools.clear()}async _highlightFeatures(){this._clearHighlight(),w.highlightHandles=await g(this.selectionSets)}_clearHighlight(){w.removeHandles()}async _updateIds(i,t,e,s){let a=!1;const h=this._refineSelectionSet.refineInfos,l=s.layer.id,n={};n[l]={addIds:[],removeIds:[],layerView:s};const o=Object.keys(h).indexOf(l)>-1?h[l]:n[l];if(t===m.ADD)o.addIds=[...new Set([...i,...o.addIds])],o.addIds.length>0&&e.push({ids:i,mode:t,layerView:s}),o.removeIds.length>0&&(o.removeIds=o.removeIds.filter((t=>i.indexOf(t)<0)));else{const h=this.selectionSets.reduce(((t,e)=>(i.forEach((i=>{e.workflowType!==y.REFINE?e.selectedIds.indexOf(i)>-1&&t.push(i):Object.keys(e.refineInfos).some((a=>{const h=e.refineInfos[a];if(h.layerView.layer.id===s.layer.id&&h.addIds.indexOf(i)>-1)return t.push(i),!0}))})),t)),[]);o.removeIds=[...new Set([...h,...o.removeIds])],o.addIds=o.addIds.filter((i=>h.indexOf(i)<0)),o.removeIds.length>0&&e.push({ids:h,mode:t,layerView:s}),this.selectionSets=this.selectionSets.reduce(((i,t)=>(t.workflowType!==y.REFINE&&t.layerView.layer.id===s.layer.id?(t.selectedIds=t.selectedIds.filter((i=>o.removeIds.indexOf(i)<0)),t.selectedIds.length>0?i.push(t):a=!0):i.push(t),i)),[])}this._refineSelectionSet.refineInfos[l]=o,this.selectionSets=[...this.selectionSets],a&&this.selectionSetsChanged.emit(this.selectionSets),await this._highlightFeatures()}static get watchers(){return{locale:["localeWatchHandler"]}}};P.style=':host{display:block}.div-visible{display:inherit}.div-not-visible{display:none !important}.padding-top-1-2{padding-top:.5rem}.main-label{display:flex;float:left}html[dir="rtl"] .main-label{display:flex;float:right}.border{outline:1px solid var(--calcite-color-border-input)}.margin-top-1{margin-top:1rem}.esri-sketch{display:flex;flex-flow:column wrap}.esri-widget{box-sizing:border-box;color:#323232;font-size:14px;font-family:"Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif;line-height:1.3em;background-color:var(--calcite-color-foreground-1)}.esri-sketch__panel{align-items:center;display:flex;flex-flow:row nowrap;padding:0}*/ .esri-sketch__tool-section{border-right:1px solid rgba(110, 110, 110, .3)}.esri-sketch__section{align-items:center;display:flex;flex-flow:row nowrap;padding:0 7px;margin:6px 0;border-right:1px solid rgba(110, 110, 110, .3)}.display-flex{display:flex}.font-bold{font-weight:bold}.width-full{width:100%}.label-margin-0{--calcite-label-margin-bottom:0}.padding-start-1-2{padding-inline-start:0.5rem}.font-weight-500{font-weight:500}.word-wrap-anywhere{word-wrap:anywhere}';export{S as map_select_tools,k as pdf_download,P as refine_selection}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
/*!
|
2
|
+
* Copyright 2022 Esri
|
3
|
+
* Licensed under the Apache License, Version 2.0
|
4
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
+
*/
|
6
|
+
import{r as t,c as i,g as e,h as s,H as o,F as h}from"./p-e996c38f.js";import{g as a}from"./p-404cbf48.js";import{E as l}from"./p-80cb7c73.js";import{g as n}from"./p-dcd2f00b.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";const d=class{constructor(e){t(this,e),this.showIntroductionWindow=i(this,"showIntroductionWindow",7),this.showCoverPage=i(this,"showCoverPage",7),this.appLayout=void 0,this.appProxies=void 0,this.basemapConfig=void 0,this.coverPageEnabled=void 0,this.customInfoText=void 0,this.defaultAppLayout=void 0,this.defaultCenter="",this.defaultGlobalId="",this.defaultLayer="",this.defaultLevel="",this.defaultOid="",this.defaultWebmap="",this.honorMapFieldSettings=!1,this.introductionWindowEnabled=!1,this.enableAutoRefresh=!1,this.enableBasemap=!0,this.enableColumnReorder=!0,this.enableCSV=!0,this.enableFloorFilter=!0,this.enableFullscreen=!0,this.enableHome=!0,this.enableLegend=!0,this.enableSearch=!0,this.enableShare=!1,this.enableZoom=!0,this.locale=void 0,this.mapInfos=[],this.onlyShowUpdatableLayers=!0,this.popupHeaderColor=void 0,this.popupHeaderHoverColor=void 0,this.popupHeaderHoverTextColor=void 0,this.popupHeaderTextColor=void 0,this.searchConfiguration=void 0,this.shareIncludeEmbed=void 0,this.shareIncludeSocial=void 0,this.showNewestFirst=!0,this.theme="light",this.zoomAndScrollToSelected=!1,this.zoomToScale=void 0,this._deleteDialogOpen=!1,this._enableCreateFeatures=!0,this._hideFooter=!1,this._hideTable=!1,this._isMobile=!1,this._isPortraitMobile=!1,this._translations=void 0,this._layer=void 0,this._layoutMode=l.GRID,this._mapInfo=void 0,this._mapView=void 0,this._panelOpen=!0,this._numSelected=0,this._filterOpen=!1,this._showInformationHeader=!0,this._layerIds=void 0,this._isLoading=!0,this._mapExtentFilterChecked=void 0}get el(){return e(this)}_defaultAppLayoutHonored=!1;_defaultCenterHonored=!1;_defaultLevelHonored=!1;_deleteIds;_layerTable;_mapChange;_resizeObserver;_shouldSetMapView=!1;_layerExpressions;_filterList;_mapCard;_isMapViewOnLoad=!1;appLayoutWatchHandler(t,i){t!==i&&(this._layerTable?.validateTableUpdate("splitView"===t),this._setActiveLayout(t),"mapView"===this.appLayout&&this._layer?.isTable&&this._mapCard.updateLayer(),this._isMapViewOnLoad&&(this._layerTable.refresh(),this._isMapViewOnLoad=!1))}enableZoomWatchHandler(){this._initMapZoom()}async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}showIntroductionWindow;showCoverPage;async featureSelectionChange(t){this._numSelected=t.detail?.length}async popupClosed(){this._isPortraitMobile&&this.showHideMapPopupAndTable(!1)}async layoutChanged(t){this._layoutMode=t.detail}async mapChanged(t){this._mapChange=t.detail,await this._mapChange.mapView.when((async()=>{await this._setMapView()}))}async layerSelectionChange(t){const i=t.detail[0],e=await n(this._mapView,i);e&&await e.when((()=>{0===this._layerIds.length&&"mapView"===this.appLayout&&e.isTable&&(this.appLayout="splitView"),this._layer=e,this._initLayerExpressions(),this._handleFilterListReset(),this._isLoading=!1}))}async showDelete(t){this._deleteIds=t.detail.ids,this._deleteDialogOpen=!0}async idsFound(t){this._layerIds=t.detail.layerIds}async componentWillLoad(){await this._getTranslations(),this._resizeObserver=new ResizeObserver((()=>this._onResize()))}render(){return s(o,{key:"4ec349cf53a543077a3b938d5dad2e767f533181"},s("calcite-shell",{key:"08c56e11ff814419aeb7295bba240b0e96856cae",class:"position-relative"},s("calcite-panel",{key:"aac7ff804b7e98f3b5d1b11dbc5ee8e18c9467ca",class:"width-full height-full "+(this.popupHeaderColor&&"#FFFFFF"!==this.popupHeaderColor?"border-width-0":""),loading:this._isLoading},this._getBody(this._layoutMode,this._panelOpen,this._hideTable)),this._getFooter()),this._filterModal(),this._deleteModal())}async componentDidRender(){this._shouldSetMapView&&(this._shouldSetMapView=!1,this._mapChange&&await this._setMapView())}async componentDidLoad(){this._resizeObserver.observe(this.el),!this._defaultAppLayoutHonored&&this.defaultAppLayout?(this._defaultAppLayoutHonored=!0,this.appLayout=this.defaultAppLayout):this.appLayout||(this.appLayout="splitView"),this._isMapViewOnLoad="mapView"===this.appLayout,this._setActiveLayout(this.appLayout)}_getFooter(){const t=this._numSelected>0,i=this._layer?.editingEnabled&&this._layer?.capabilities?.operations?.supportsDelete;return this._isPortraitMobile&&t&&!this._hideFooter?s("div",{class:"width-100",slot:"footer"},s("div",{class:"display-flex padding-1-2"},s("calcite-button",{appearance:"solid",id:"solutions-show",onClick:()=>this.showHideMapPopupAndTable(!0),width:"full"},this._translations.view.replace("{{n}}",this._numSelected.toString())),i?s("delete-button",{class:"padding-inline-start-1 width-full",id:"solutions-delete",ids:this._layerTable.selectedIds,layer:this._layer,locale:this.locale}):void 0)):void 0}_setActiveLayout(t){"splitView"!==t||this._panelOpen||this._toggleLayout(),"mapView"===t?this._showMapInFullView():this._showMapInCardView()}_getDividerIcon(t,i){let e="";switch(t){case l.HORIZONTAL:e=i?"chevrons-up":"chevrons-down";break;case l.VERTICAL:case l.GRID:e=i?"chevrons-left":"chevrons-right"}return e}_getMapSizeClass(t,i,e){let s="";switch(t){case l.HORIZONTAL:s=(i&&!e?"height-1-2 display-grid":i&&e?"height-full":"height-0")+" width-full position-relative";break;case l.GRID:s="height-full position-relative "+(i?"width-1-3":"width-0");break;case l.VERTICAL:s="height-full position-relative "+(i?"width-1-2":"width-0")}return s}_getTableSizeClass(t,i){let e="";switch(t){case l.HORIZONTAL:e=(i?"height-1-2":"height-full")+" width-full display-flex flex-column";break;case l.GRID:e=(i?"width-2-3":"width-full")+" height-full display-flex";break;case l.VERTICAL:e=(i?"width-1-2":"width-full")+" height-full display-flex"}return e}_getBody(t,i,e){const o="dark"===this.theme?"calcite-mode-dark":"calcite-mode-light";return s("calcite-panel",{class:"width-full height-full position-absolute"},s("div",{class:"width-full height-full overflow-hidden "+(t===l.HORIZONTAL?"":"display-flex")},this._getMapAndCard(t,i,e),this._getTable(t,i,e)),this.coverPageEnabled&&s("div",{class:"floating-container",onClick:this.coverPageButtonClick.bind(this)},s("calcite-button",{appearance:"solid",class:`floating-button ${o}`,"icon-start":"content-minimal",kind:"neutral",label:"",round:!0,scale:"l","split-child":"primary",width:"auto"})),this.introductionWindowEnabled&&s("div",{class:"floating-container",onClick:this.infoButtonClick.bind(this)},s("calcite-button",{appearance:"solid",class:`floating-button ${o}`,"icon-start":"information-letter",kind:"neutral",label:"",round:!0,scale:"l","split-child":"primary",width:"auto"})))}infoButtonClick(){this.showIntroductionWindow.emit()}coverPageButtonClick(){this.showCoverPage.emit()}_getMapAndCard(t,i,e){const o=this._getMapSizeClass(t,i,e);return s("div",{class:`${o} overflow-hidden z-index-1 ${!this._isPortraitMobile&&this._isMobile?"border-right":""}`},this._getMapNode(i),this._getPopupExpandNode())}_getMapNode(t){const i="mapView"===this.appLayout,e="tableView"===this.appLayout;return s("div",{class:(i||e?"position-absolute-0":this._layoutMode!==l.HORIZONTAL||this._isPortraitMobile&&!t?"adjusted-height-50":"")+" overflow-hidden",id:"card-mapView"},s("map-card",{appLayout:this.appLayout,appProxies:this.appProxies,basemapConfig:this.basemapConfig,class:"width-full",defaultLayerId:this.defaultWebmap&&this.defaultLayer?this.defaultLayer:"",defaultWebmapId:this.defaultWebmap,enableBasemap:this.enableBasemap,enableFloorFilter:this.enableFloorFilter,enableFullscreen:this.enableFullscreen,enableHome:this.enableHome,enableLegend:this.enableLegend,enableSearch:this.enableSearch,enableShare:this.enableShare,enableSingleExpand:!0,hidden:!this._isPortraitMobile&&e,homeZoomIndex:3,homeZoomPosition:"top-left",homeZoomToolsSize:"s",isMapLayout:i,isMobile:this._isMobile,locale:this.locale,mapInfo:this._mapInfo,mapInfos:this.mapInfos?.filter((t=>!1!==t.visible)),mapWidgetsIndex:0,mapWidgetsPosition:"top-right",mapWidgetsSize:"m",onToggleFilter:this._toggleFilter.bind(this),onlyShowUpdatableLayers:this.onlyShowUpdatableLayers,ref:t=>this._mapCard=t,selectedFeaturesIds:this._layerTable?.selectedIds,selectedLayer:this._layer,shareIncludeEmbed:this.shareIncludeEmbed,shareIncludeSocial:this.shareIncludeSocial,stackTools:!0,theme:this.theme,toolOrder:["legend","search","fullscreen","basemap","floorfilter"],zoomToScale:this.zoomToScale}))}_getPopupExpandNode(){const t=this._isPortraitMobile&&this._showInformationHeader?"display-none height-0":"";return s("div",{class:`${this.popupHeaderColor?"":this._isPortraitMobile?"calcite-mode-light":"calcite-mode-dark"} ${this._isMobile?"height-full":"height-full position-relative"} ${this._isPortraitMobile&&this._hideTable?"position-absolute-0 width-full height-full":this._isPortraitMobile?"display-none height-0":""} ${this.mapInfos?.length>1&&"tableView"===this.appLayout?"position-relative top-51":""} position-sticky`,style:{"--calcite-color-foreground-1":this.popupHeaderColor,"--calcite-color-foreground-2":this.popupHeaderHoverColor,"--calcite-color-text-3":this.popupHeaderTextColor,"--calcite-color-text-2":this.popupHeaderTextColor}},s("calcite-panel",null,!this._isPortraitMobile&&this._showInformationHeader||this._numSelected>0&&!this._isPortraitMobile?s("div",{class:`display-flex align-items-center ${t}`,slot:"header-content"},s("calcite-icon",{icon:"information",scale:"s"}),s("div",{class:"padding-inline-start-75"},this._translations.information)):s("div",null),this._getCardNode()))}_getCardNode(){const t="mapView"===this.appLayout,i="tableView"===this.appLayout;return s("div",{class:"width-50 height-full "+("dark"===this.theme?"calcite-mode-dark":"calcite-mode-light")},s("card-manager",{class:(i&&this.mapInfos?.length>1?"adjusted-height-100-51":t||i?"height-full":this._numSelected>0&&!this._isMobile?"height-50":this._showInformationHeader?this._isPortraitMobile?"height-full":"height-50":"adjusted-height-50_25")+" width-full",customInfoText:this.customInfoText,enableCreateFeatures:this._enableCreateFeatures&&!this._isMobile,enableEditGeometry:this?._mapInfo?.enableEditGeometry,isMobile:this._isPortraitMobile,layer:this._layer,locale:this.locale,mapView:this?._mapView,onBackFromCreateWorkFlow:()=>{this._showInformationHeader=!0},onCreateWorkFlowStarted:()=>{this.appLayout=this._layer.isTable?"tableView":"mapView",this._showInformationHeader=!1},onFeatureOrRecordSubmitted:()=>{this._layerTable.refresh()},selectedFeaturesIds:this._layerTable?.selectedIds,selectingFeatureFromMap:"mapView"===this.appLayout,zoomAndScrollToSelected:this.zoomAndScrollToSelected}))}_getTable(t,i,e){const o="mapView"===this.appLayout,h="tableView"===this.appLayout,a=e&&this._isPortraitMobile?"visibility-hidden":o?"display-none":"",n=o?"height-full width-full z-index-0":"display-none",d=this._getTableSizeClass(t,i),r=t===l.HORIZONTAL?"horizontal":"vertical",c=t===l.HORIZONTAL?"header":"panel-start",p=this.defaultWebmap&&this.defaultLayer,g=this.defaultGlobalId?this.defaultGlobalId?.indexOf(",")>-1?this.defaultGlobalId.split(","):[this.defaultGlobalId]:void 0,u=this.defaultOid?this.defaultOid?.indexOf(",")>-1?this.defaultOid.split(",").map((t=>parseInt(t,10))):[parseInt(this.defaultOid,10)]:void 0;return s("calcite-shell",{class:`${d} border-bottom`},this._isMobile?void 0:s("calcite-action-bar",{class:"border-sides",expandDisabled:!0,layout:r,slot:c},this.getActions(t,i)),s("div",{class:`width-full height-full position-relative z-index-0 ${a}`},s("layer-table",{appLayout:this.appLayout,createFilterModal:!1,defaultGlobalId:p?g:void 0,defaultLayerId:p?this.defaultLayer:"",defaultOid:p&&!g?u:void 0,enableAutoRefresh:this.enableAutoRefresh,enableCSV:this.enableCSV,enableColumnReorder:this.enableColumnReorder,enableInlineEdit:this?._mapInfo?.enableInlineEdit,enableShare:this.enableShare,honorMapFieldSettings:this.honorMapFieldSettings,isMobile:this._isPortraitMobile,locale:this.locale,mapHidden:h,mapInfo:this._mapInfo,mapView:this?._mapView,onToggleFilter:this._toggleFilter.bind(this),onlyShowUpdatableLayers:this.onlyShowUpdatableLayers,ref:t=>this._layerTable=t,shareIncludeEmbed:this.shareIncludeEmbed,shareIncludeSocial:this.shareIncludeSocial,showNewestFirst:this.showNewestFirst,zoomAndScrollToSelected:this.zoomAndScrollToSelected,zoomToScale:this.zoomToScale})),s("div",{class:n,id:"full-map-view"}))}getActions(t,i){const e=this._getDividerIcon(t,i),o=i?this._translations.close:this._translations.open,a="toggle-layout";return s(h,null,s("calcite-action",{active:"splitView"===this.appLayout,class:"toggle-node",icon:"browser",id:"browser-action",onClick:()=>{this.appLayout="splitView"},text:""}),s("calcite-tooltip",{placement:"right","reference-element":"browser-action"},s("span",null,this._translations.splitView)),s("calcite-action",{active:"tableView"===this.appLayout,class:"toggle-node",icon:"dock-left",id:"dock-left-action",onClick:()=>{this.appLayout="tableView"},text:""}),s("calcite-tooltip",{placement:"right","reference-element":"dock-left-action"},s("span",null,this._translations.tableView)),s("calcite-action",{active:"mapView"===this.appLayout,class:"toggle-node",disabled:0===this._layerIds?.length,icon:"browser-map",id:"browser-map-action",onClick:()=>{this.appLayout="mapView"},text:""}),s("calcite-tooltip",{placement:"right","reference-element":"browser-map-action"},s("span",null,this._translations.mapView)),s("calcite-action",{class:"toggle-node",icon:e,id:a,onClick:()=>this._toggleLayout(),slot:"actions-end",text:""}),s("calcite-tooltip",{placement:"bottom","reference-element":a},s("span",null,o)))}_deleteModal(){return s("delete-dialog",{id:"deleteDialogId",ids:this._deleteIds,layer:this._layer,locale:this.locale,onDeleteDialogClose:()=>this._deleteDialogOpen=!1,open:this._deleteDialogOpen})}_mapExtentFilter(){const t=0===this._layerExpressions?.length;return s("calcite-panel",null,s("div",null,s("calcite-block",{class:"dark"===this.theme?"background-dark":"",heading:"","menu-placement":"bottom-end",open:!0},s("div",{class:"filter-extent-container"},s("div",{class:"filter-extent-message"},s("span",null,this._translations.filterByExtentMsg," "),s("calcite-icon",{icon:"information",id:"filter-message-info",scale:"s"}),s("calcite-tooltip",{overlayPositioning:"fixed",placement:"top","reference-element":"filter-message-info"},this._translations.filterByExtentTooltipMsg)),s("calcite-switch",{checked:this._mapExtentFilterChecked,onCalciteSwitchChange:t=>{this._layerTable.filterUpdate(t.target.checked||this._filterList?.filterCount>0,t.target.checked),this._mapExtentFilterChecked=t.target.checked},scale:"m"}))),t&&s("div",{class:"filter-modal-buttons",slot:"footer"},s("calcite-button",{appearance:"outline",onClick:this._handleFilterListReset.bind(this),width:"full"},this._translations.Resetfilter),s("calcite-button",{onClick:this._closeFilter.bind(this),width:"full"},this._translations.close))))}_filterModal(){const t=this._layerExpressions?.length>0;return s("calcite-dialog",{class:"filter-content-space",heading:this._translations?.filter?.replace("{{title}}",this._layer?.title),id:"solutions-filter-dialog",kind:"brand",modal:!0,onCalciteDialogClose:()=>{this._closeFilter()},open:this._filterOpen,widthScale:"s"},this._mapExtentFilter(),t&&s("instant-apps-filter-list",{autoUpdateUrl:!1,closeBtn:!0,closeBtnOnClick:async()=>this._closeFilter(),comboboxOverlayPositioning:"fixed",layerExpressions:this._layerExpressions,onFilterListReset:this._handleFilterListReset.bind(this),onFilterUpdate:async()=>{const t=this._filterList.filterCount>0||this._mapExtentFilterChecked;await(this._layerTable?.filterUpdate(t)),await this._mapCard.updateFilterState(t)},ref:t=>this._filterList=t,view:this._mapView,zoomBtn:!1}))}_initLayerExpressions(){const t=this._mapInfo?.filterConfig?.layerExpressions;this._layerExpressions=t?t.filter((t=>t.id===this._layer?.id)):[],this._layerExpressions.filter((t=>t.expressions.filter((t=>t.active)).length>0))}_toggleFilter(){this._filterOpen=!this._filterOpen}_handleFilterListReset(){this._mapExtentFilterChecked=!1,this._mapCard.resetFilter(),this._layerTable.filterReset()}async _closeFilter(){this._filterOpen&&(this._filterOpen=!1,this._layerTable.closeFilter())}_onResize(){const t=this.el.offsetWidth<1024,i=!this._isMobile&&t;this._isMobile=t,i&&(this._panelOpen=!0),this._isMobile?(this.showHideMapPopupAndTable(!this._isMobile),this._isPortraitMobile=!!window.matchMedia("(orientation: portrait)").matches,this.appLayout="splitView"):this._isPortraitMobile=!1,this._layoutMode=this._isPortraitMobile?l.HORIZONTAL:l.GRID}_toggleLayout(){this._panelOpen=!this._panelOpen}_showMapInCardView(){if("mapView"!==this.appLayout){const t=document.getElementById("full-map-view")?.childNodes[0],i=document.getElementById("card-mapView");t&&i.appendChild(t)}}_showMapInFullView(){const t=document.getElementById("card-mapView")?.childNodes[0],i=document.getElementById("full-map-view");t&&i.appendChild(t)}showHideMapPopupAndTable(t){this._hideTable=t,this._hideFooter=t}_getMapInfo(t){let i;return this.mapInfos.some((e=>{if(e.id===t)return i=e,!0})),{...i}}async _setMapView(){this._mapInfo=this._getMapInfo(this._mapChange.id),this._enableCreateFeatures=this._mapInfo.enableCreateFeatures,this._mapView=this._mapChange.mapView,this._initMapZoom(),this._mapView.popupEnabled=!1;const t=!this.defaultCenter||this._defaultCenterHonored?void 0:this.defaultCenter?.split(";").map((t=>parseFloat(t))),i=!this.defaultLevel||this._defaultLevelHonored?void 0:parseInt(this.defaultLevel,10);t&&i&&(await this._mapView.goTo({center:t,zoom:i}),this._defaultCenterHonored=!0,this._defaultLevelHonored=!0)}_initMapZoom(){this.enableZoom?this.enableZoom&&this._mapView.ui.add({component:"zoom",position:"top-left",index:0}):this._mapView.ui.remove("zoom")}async _getTranslations(){const t=await a(this.el);this._translations=t[0]}static get watchers(){return{appLayout:["appLayoutWatchHandler"],enableZoom:["enableZoomWatchHandler"],locale:["localeWatchHandler"]}}};d.style=":host{display:block;--calcite-label-margin-bottom:0px;--solutions-theme-foreground-color:var(--calcite-color-foreground-1)}.padding-1-2{padding:0.5rem}.display-flex{display:flex}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:51px;height:51px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border:1px solid var(--calcite-color-border-3)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-3)}.border-right{border-right:2px solid var(--calcite-color-border-3)}.border-sides{border-left:1px solid var(--calcite-color-border-3);border-right:1px solid var(--calcite-color-border-3)}.position-relative{position:relative}.position-absolute{position:absolute}.position-sticky{position:sticky}.height-50{height:50%}.top-51{top:51px}.adjusted-height-50{height:calc(50% - 25px)}.adjusted-height-100{height:calc(100% - 50px)}.adjusted-height-100-51{height:calc(100% - 51px)}.display-none{display:none !important}.adjusted-height-50_25{height:calc(50% + 25px)}.position-absolute-53{position:absolute;top:53px}.display-grid{display:grid}.height-50-px{height:50px}.padding-inline-start-75{padding-inline-start:0.75rem}.align-items-center{align-items:center}.esri-floor-filter__close-levels-button{width:40px !important;height:40px !important}.esri-floor-filter__level-button{width:40px !important;height:40px !important}.esri-floor-filter__browse-button{width:40px !important;height:40px !important}.position-absolute-50{position:absolute;top:50px;bottom:0px;left:0px;right:0px}.position-absolute-0{position:absolute;top:0px;bottom:0px;left:0px;right:0px}.visibility-hidden{visibility:hidden;height:0px}.position-fixed{position:fixed}.border-width-0{border-width:0px}.border-bottom-width-0{border-bottom-width:0px}.floating-container{position:fixed;width:100px;height:10px;bottom:0;right:0;margin:100px 0px}.floating-container .floating-button{box-shadow:0 10px 25px rgb(92 93 94 / 60%);transform:translatey(5px);transition:all 0.3s}.z-index-0{z-index:0 !important}.z-index-1{z-index:1 !important}.filter-content-space{--calcite-dialog-content-space:0px}.background-dark{background:var(--calcite-color-background)}.filter-extent-container{display:flex;justify-content:space-between;align-items:center;padding:10px 0}.filter-modal-buttons{display:flex;padding:12px;gap:10px}.filter-extent-message{align-items:center;display:flex;gap:5px}";export{d as crowdsource_manager}
|
@@ -3,4 +3,4 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import{r as t,c as i,g as s,h as e}from"./p-e996c38f.js";import{l as a,g as h}from"./p-a397e773.js";import{P as l}from"./p-258aa58e.js";import{g as n,c as o,h as c}from"./p-dcd2f00b.js";import"./p-3b3f77bc.js";import"./p-d4056c1c.js";import"./p-36e3b39c.js";import"./p-19bce2cc.js";import"./p-2bc98cb0.js";import"./p-4f236b5d.js";import"./p-570b13d9.js";import"./p-0668e30d.js";import"./p-80cb7c73.js";const r=class{constructor(s){t(this,s),this.featureSelect=i(this,"featureSelect",7),this.selectedLayerId=void 0,this.mapView=void 0,this.noFeaturesFoundMsg=void 0,this.pageSize=100,this.highlightOnMap=!1,this.highlightOnHover=!1,this.locale=void 0,this.sortingInfo=void 0,this.whereClause=void 0,this.textSize="large",this.showInitialLoading=!0,this.showErrorWhenNoFeatures=!0,this.showUserImageInList=!1,this.showFeatureSymbol=!1,this.applyLayerViewFilter=!1,this.reportingOptions=void 0,this.showFullTitle=!0,this._featureItems=[],this._featuresCount=0,this._isLoading=!1,this._searchPlaceHolder="",this._fullTextSearchInfo=void 0,this._translations=void 0}get el(){return s(this)}Color;esriConfig;symbolUtils;_popupUtils;_selectedLayer;_highlightHandle;_highlights;_pagination;_calciteList;_validFieldTypes=["small-integer","integer","big-integer","single","long"];_abbreviatedLikeCount;_likeFieldAvailable=!1;_searchExpression;async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}async selectedLayerWatchHandler(){this._selectedLayer=await n(this.mapView,this.selectedLayerId),await this.initializeFeatureItems()}async sortingInfoWatchHandler(){await this.initializeFeatureItems()}async whereClauseHandler(){await this.initializeFeatureItems()}async refresh(t){if(t&&this._pagination){const t={target:{startItem:this._pagination.startItem}};await this.pageChanged(t)}else this._searchExpression?await this._searchFullText():await this.initializeFeatureItems()}featureSelect;async componentWillLoad(){await this.initModules(),await this._getTranslations(),this._isLoading=this.showInitialLoading,this._popupUtils=new l,this.mapView&&this.selectedLayerId&&(this._selectedLayer=await n(this.mapView,this.selectedLayerId),this._getFullTextSearchInfo())}async componentDidLoad(){await this.initializeFeatureItems()}render(){const t=this._canShowFullTextSearch();return e("calcite-panel",{key:"56599be334eec65be00681d415db28917133b0c1","full-height":!0,"full-width":!0},t&&e("calcite-input",{key:"6de9873f6b7ab961dffe1334d2fc20b4322d8ea8",class:"search",clearable:!0,icon:"search",onCalciteInputChange:this._searchTextChanged.bind(this),placeholder:this._searchPlaceHolder,title:"",type:"search"}),this._isLoading&&e("calcite-loader",{key:"4189b0d6c2a85116d529f5b7844c1f2d41657350",label:"",scale:"m"}),this.showErrorWhenNoFeatures&&0===this._featureItems.length&&!this._isLoading&&e("calcite-notice",{key:"7f2e8276ad5345e21667b2dedc7e23f5c34672f5",class:"error-msg",icon:"feature-details",kind:"info",open:!0},e("div",{key:"63d44ac906c8d5584aac2cfbeec4cf0962d61abe",slot:"message"},this.noFeaturesFoundMsg?this.noFeaturesFoundMsg:this._translations.featureErrorMsg)),e("calcite-list",{key:"5843f8d7ca994cb799a9be0ab2f43a8f1e407e9a",class:"small"!==this.textSize||this.showFullTitle?"":"overflow-hidden",label:"",ref:t=>this._calciteList=t,"selection-appearance":"border","selection-mode":"none"},!this._isLoading&&this._featureItems.length>0&&this._featureItems),this._featuresCount>this.pageSize&&e("div",{key:"288364bc505fe6bce8b1260dce5173163a795330",class:"width-full",slot:"footer"},e("calcite-pagination",{key:"e30e2d46a0005dd3e0d289deb4721b9155d4df29",class:"pagination","full-width":!0,onCalcitePaginationChange:this.pageChanged.bind(this),"page-size":this.pageSize,ref:t=>this._pagination=t,"start-item":"1","total-items":this._featuresCount})))}async initModules(){const[t,i,s]=await a(["esri/Color","esri/config","esri/symbols/support/symbolUtils"]);this.Color=t,this.esriConfig=i,this.symbolUtils=s}async getWhereCondition(){let t="1=1";if(this.whereClause&&(t=this.whereClause),this._selectedLayer?.definitionExpression&&(t=t+" AND "+this._selectedLayer.definitionExpression),this.applyLayerViewFilter){const i=await o(this.mapView,this.selectedLayerId);i?.filter?.where&&(t=t+" AND "+i.filter.where)}return t}async initializeFeatureItems(){if(this._selectedLayer){this._pagination?.goTo("start"),this._isLoading=this.showInitialLoading,this._featureItems=await this.queryPage(0);const t={where:await this.getWhereCondition()};this._featuresCount=await this._selectedLayer.queryFeatureCount(t),this._isLoading=!1}}async pageChanged(t){this._isLoading=!0,this._highlightHandle&&(this._highlightHandle.remove(),this._highlightHandle=null);const i=t.target.startItem-1;this._featureItems=await this.queryPage(i),this._isLoading=!1}_canShowFullTextSearch(){return((this._selectedLayer?.capabilities)?.query)?.supportsFullTextSearch&&this._selectedLayer.indexes.items.filter((t=>"FullText"==t.indexType)).length>0}_getFullTextSearchInfo(){if(this._fullTextSearchInfo=[],((this._selectedLayer?.capabilities)?.query)?.supportsFullTextSearch){const t=this._selectedLayer.indexes?.filter((t=>"FullText"==t.indexType));if(t?.length){const i=[];t.forEach((t=>{i.push(...t.fields.split(","))}));const s=[];i.forEach((t=>{const i=this._selectedLayer.getField(t.trim());s.push(i.alias)})),this._searchPlaceHolder=this._translations.searchPlaceholder.replace("{{fields}}",s.join(", ")),this._fullTextSearchInfo.push({onFields:["*"],searchTerm:"",searchType:"prefix"})}}}async _searchTextChanged(t){this._fullTextSearchInfo.forEach((i=>{i.searchTerm=t.target.value})),await this._searchFullText()}async _searchFullText(){this._searchExpression&&this._clearSearchDefinitionExpression();let t=[];if(this._fullTextSearchInfo&&this._fullTextSearchInfo[0].searchTerm){const i=this._selectedLayer.createQuery();i.fullText=this._fullTextSearchInfo,t=await this._selectedLayer.queryObjectIds(i),await this._updateSearchDefinitionExpression(t?.length?t:[-1])}await this.initializeFeatureItems()}async _updateSearchDefinitionExpression(t){const i=this._selectedLayer.definitionExpression;if(t?.length){const s=`objectId in(${t})`;this._selectedLayer.definitionExpression=i?.indexOf(this._searchExpression)>-1?i.replace(this._searchExpression,s):i?`${i} AND (${s})`:s,this._searchExpression=s}else this._clearSearchDefinitionExpression()}_clearSearchDefinitionExpression(){const t=this._selectedLayer.definitionExpression;this._searchExpression&&t?.indexOf(this._searchExpression)>-1&&(this._selectedLayer.definitionExpression=t?.indexOf(" AND ("+this._searchExpression)>-1?t.replace(` AND (${this._searchExpression})`,""):t.replace(this._searchExpression,"")),this._searchExpression=void 0}async featureClicked(t,i){if(this.clearHighlights(),this.highlightOnMap){const i=Number(t.target.value),s=await o(this.mapView,this.selectedLayerId);this._highlightHandle=await c([i],s,this.mapView,!0)}await this.emitSelectedFeature(i)}async emitSelectedFeature(t){const i=t.layer,s=i.createQuery();s.returnGeometry=!0,s.objectIds=[t.getObjectId()];const e=await i.queryFeatures(s);this.featureSelect.emit(e.features[0])}async onFeatureHover(t){if(this.clearHighlights(),this.highlightOnHover){const i=t.getObjectId(),s=await o(this.mapView,this.selectedLayerId);this._highlights&&(s.highlights=JSON.parse(this._highlights)),s.highlightOptions={color:new this.Color("#FFFF00")},this._highlights=JSON.stringify(s.highlights),this._highlightHandle=s.highlight([i])}}clearHighlights(){this._highlightHandle&&this._highlightHandle.remove()}async queryPage(t){const i=this._selectedLayer,s=this.sortingInfo?.field?this.sortingInfo.field:i.objectIdField,e=this.sortingInfo?.order?this.sortingInfo.order:"desc",a=await this.getWhereCondition(),h={start:t,num:this.pageSize,outFields:["*"],returnGeometry:!0,where:a,outSpatialReference:this.mapView.spatialReference.toJSON()};s&&e&&(h.orderByFields=[s.toString()+" "+e]);const l=await i.queryFeatures(h);return await this.createFeatureItem(l)}async createFeatureItem(t){const i=t?.features,s=this.reportingOptions&&this.reportingOptions[this.selectedLayerId].like,e=i.map((async t=>{const i=await this._popupUtils.getPopupTitle(t,this.mapView.map);let e,a;if(this.showUserImageInList){const i=this._selectedLayer.editFieldsInfo?.creatorField;i&&(e=await this.getUserInformation(t))}return this.showFeatureSymbol&&(a=await this.getFeatureSymbol(t)),s&&this.getAbbreviatedLikeCount(t),this.getFeatureItem(t,i,a,e)}));return Promise.all(e)}getAbbreviatedLikeCount(t){const i=this._selectedLayer,s=this.reportingOptions[i.id].likeField;i.fields.forEach((e=>{if(this._validFieldTypes.indexOf(e.type)>-1&&e.name===s&&this.reportingOptions[i.id].like){this._likeFieldAvailable=!0;let i=t.attributes[s]||0;i>999&&(i=i>999999?this._translations.millionsAbbreviation.replace("{{abbreviated_value}}",Math.floor(i/1e6).toString()):this._translations.thousandsAbbreviation.replace("{{abbreviated_value}}",Math.floor(i/1e3).toString())),this._abbreviatedLikeCount=i}}))}getFeatureItem(t,i,s,a){const h=t.attributes[this._selectedLayer.objectIdField].toString();i=i??h;const l=Number(t.attributes[this.reportingOptions?.[this._selectedLayer.id].likeField]).toLocaleString(),n="small"!==this.textSize||this.showFullTitle?"small"===this.textSize?"feature-list-popup-title-small":"feature-list-popup-title":"feature-list-popup-title-small-ellipsis",o=this._calciteList.offsetWidth-(this.showUserImageInList?115:65);return e("calcite-list-item",{onCalciteListItemSelect:i=>{this.featureClicked(i,t)},onMouseLeave:()=>{this.clearHighlights()},onMouseOver:()=>{this.onFeatureHover(t)},value:h},this.showUserImageInList&&e("calcite-avatar",{class:"profile-img","full-name":a?.fullName,scale:"m",slot:"content-start",thumbnail:a?.userProfileUrl,userId:a?.id,username:a?.fullName?a.username:void 0}),this.showFeatureSymbol&&e("div",{class:"feature-symbol",ref:t=>t&&t.replaceChildren(s),slot:"content-start"}),e("div",{class:`popup-title ${n}`,slot:"content-start",style:{maxWidth:"large"===this.textSize?"none":`${o}px`}},i),this._likeFieldAvailable&&e("div",{class:"like-container",id:h.concat("like"),slot:"content-end"},e("span",null,this._abbreviatedLikeCount),e("calcite-icon",{icon:"thumbs-up",scale:"s"}),e("calcite-tooltip",{overlayPositioning:"fixed",placement:"top","reference-element":h.concat("like")},l)),e("calcite-icon",{flipRtl:!0,icon:"chevron-right",scale:"s",slot:"content-end"}))}async getUserInformation(t){let i=this._selectedLayer.editFieldsInfo?.creatorField;t.attributes.hasOwnProperty(i.toLowerCase())?i=i.toLowerCase():t.attributes.hasOwnProperty(i.toUpperCase())&&(i=i.toUpperCase());let s=`${this.esriConfig.portalUrl}/sharing/rest/community/users/${t.attributes[i]}?f=json&returnUserLicensedItems=true`;const e=this.mapView.map.portalItem.portal?.credential?.token;e&&(s+=`&token=${e}`);const a=await fetch(s),h=await a.json();let l=`${this.esriConfig.portalUrl}/sharing/rest/community/users/${h?.username??t.attributes[i]}/info/blob.png`;return h?.access&&e&&(l+=`?token=${e}`),h.userProfileUrl=l,h}async getFeatureSymbol(t){const i=document.createElement("div");return await this.symbolUtils.getDisplayedSymbol(t).then((async t=>{if(t&&await(this.symbolUtils?.renderPreviewHTML(t,{node:i})),i.children?.length){const t=i.children[0];if(t){const i=Number(t.getAttribute("height")),s=Number(t.getAttribute("width"));s>30?t.setAttribute("width","30"):s<19&&t.setAttribute("width","20"),t.setAttribute("viewBox",`0 0 ${s} ${i}`)}}})),i}async _getTranslations(){const t=await h(this.el);this._translations=t[0]}static get watchers(){return{locale:["localeWatchHandler"],selectedLayerId:["selectedLayerWatchHandler"],sortingInfo:["sortingInfoWatchHandler"],whereClause:["whereClauseHandler"]}}};r.style=":host{display:block}.width-full{width:100%}.pagination{display:flex;justify-content:center}.error-msg{padding:10px;width:calc(100% - 20px)}.feature-list-popup-title{font-weight:500;white-space:pre-line}.feature-list-popup-title-small{font-size:small;white-space:pre-line}.feature-list-popup-title-small-ellipsis{font-size:small;white-space:nowrap !important;text-overflow:ellipsis;overflow:hidden}.popup-title{padding:0 5px;word-break:break-word}.profile-img{padding:0 5px;min-width:32px}.like-container{display:flex;align-items:center;gap:5px;color:gray !important;font-style:italic}.feature-symbol{padding:0 3px;min-width:30px;display:flex;justify-content:center}.search{padding:10px;background-color:var(--calcite-color-foreground-1) !important;border-block-end:1px solid var(--calcite-color-border-3)}";export{r as feature_list}
|
6
|
+
import{r as t,c as i,g as s,h as e}from"./p-e996c38f.js";import{l as a,g as h}from"./p-404cbf48.js";import{P as l}from"./p-bf04c6f4.js";import{g as n,c as o,h as c}from"./p-dcd2f00b.js";import"./p-0a24ad5f.js";import"./p-d4056c1c.js";import"./p-db3391b9.js";import"./p-4fe489cf.js";import"./p-2bc98cb0.js";import"./p-4f236b5d.js";import"./p-570b13d9.js";import"./p-0668e30d.js";import"./p-80cb7c73.js";const r=class{constructor(s){t(this,s),this.featureSelect=i(this,"featureSelect",7),this.selectedLayerId=void 0,this.mapView=void 0,this.noFeaturesFoundMsg=void 0,this.pageSize=100,this.highlightOnMap=!1,this.highlightOnHover=!1,this.locale=void 0,this.sortingInfo=void 0,this.whereClause=void 0,this.textSize="large",this.showInitialLoading=!0,this.showErrorWhenNoFeatures=!0,this.showUserImageInList=!1,this.showFeatureSymbol=!1,this.applyLayerViewFilter=!1,this.reportingOptions=void 0,this.showFullTitle=!0,this._featureItems=[],this._featuresCount=0,this._isLoading=!1,this._searchPlaceHolder="",this._fullTextSearchInfo=void 0,this._translations=void 0}get el(){return s(this)}Color;esriConfig;symbolUtils;_popupUtils;_selectedLayer;_highlightHandle;_highlights;_pagination;_calciteList;_validFieldTypes=["small-integer","integer","big-integer","single","long"];_abbreviatedLikeCount;_likeFieldAvailable=!1;_searchExpression;async localeWatchHandler(){this.el.lang=this.locale,await this._getTranslations()}async selectedLayerWatchHandler(){this._selectedLayer=await n(this.mapView,this.selectedLayerId),await this.initializeFeatureItems()}async sortingInfoWatchHandler(){await this.initializeFeatureItems()}async whereClauseHandler(){await this.initializeFeatureItems()}async refresh(t){if(t&&this._pagination){const t={target:{startItem:this._pagination.startItem}};await this.pageChanged(t)}else this._searchExpression?await this._searchFullText():await this.initializeFeatureItems()}featureSelect;async componentWillLoad(){await this.initModules(),await this._getTranslations(),this._isLoading=this.showInitialLoading,this._popupUtils=new l,this.mapView&&this.selectedLayerId&&(this._selectedLayer=await n(this.mapView,this.selectedLayerId),this._getFullTextSearchInfo())}async componentDidLoad(){await this.initializeFeatureItems()}render(){const t=this._canShowFullTextSearch();return e("calcite-panel",{key:"56599be334eec65be00681d415db28917133b0c1","full-height":!0,"full-width":!0},t&&e("calcite-input",{key:"6de9873f6b7ab961dffe1334d2fc20b4322d8ea8",class:"search",clearable:!0,icon:"search",onCalciteInputChange:this._searchTextChanged.bind(this),placeholder:this._searchPlaceHolder,title:"",type:"search"}),this._isLoading&&e("calcite-loader",{key:"4189b0d6c2a85116d529f5b7844c1f2d41657350",label:"",scale:"m"}),this.showErrorWhenNoFeatures&&0===this._featureItems.length&&!this._isLoading&&e("calcite-notice",{key:"7f2e8276ad5345e21667b2dedc7e23f5c34672f5",class:"error-msg",icon:"feature-details",kind:"info",open:!0},e("div",{key:"63d44ac906c8d5584aac2cfbeec4cf0962d61abe",slot:"message"},this.noFeaturesFoundMsg?this.noFeaturesFoundMsg:this._translations.featureErrorMsg)),e("calcite-list",{key:"5843f8d7ca994cb799a9be0ab2f43a8f1e407e9a",class:"small"!==this.textSize||this.showFullTitle?"":"overflow-hidden",label:"",ref:t=>this._calciteList=t,"selection-appearance":"border","selection-mode":"none"},!this._isLoading&&this._featureItems.length>0&&this._featureItems),this._featuresCount>this.pageSize&&e("div",{key:"288364bc505fe6bce8b1260dce5173163a795330",class:"width-full",slot:"footer"},e("calcite-pagination",{key:"e30e2d46a0005dd3e0d289deb4721b9155d4df29",class:"pagination","full-width":!0,onCalcitePaginationChange:this.pageChanged.bind(this),"page-size":this.pageSize,ref:t=>this._pagination=t,"start-item":"1","total-items":this._featuresCount})))}async initModules(){const[t,i,s]=await a(["esri/Color","esri/config","esri/symbols/support/symbolUtils"]);this.Color=t,this.esriConfig=i,this.symbolUtils=s}async getWhereCondition(){let t="1=1";if(this.whereClause&&(t=this.whereClause),this._selectedLayer?.definitionExpression&&(t=t+" AND "+this._selectedLayer.definitionExpression),this.applyLayerViewFilter){const i=await o(this.mapView,this.selectedLayerId);i?.filter?.where&&(t=t+" AND "+i.filter.where)}return t}async initializeFeatureItems(){if(this._selectedLayer){this._pagination?.goTo("start"),this._isLoading=this.showInitialLoading,this._featureItems=await this.queryPage(0);const t={where:await this.getWhereCondition()};this._featuresCount=await this._selectedLayer.queryFeatureCount(t),this._isLoading=!1}}async pageChanged(t){this._isLoading=!0,this._highlightHandle&&(this._highlightHandle.remove(),this._highlightHandle=null);const i=t.target.startItem-1;this._featureItems=await this.queryPage(i),this._isLoading=!1}_canShowFullTextSearch(){return((this._selectedLayer?.capabilities)?.query)?.supportsFullTextSearch&&this._selectedLayer.indexes.items.filter((t=>"FullText"==t.indexType)).length>0}_getFullTextSearchInfo(){if(this._fullTextSearchInfo=[],((this._selectedLayer?.capabilities)?.query)?.supportsFullTextSearch){const t=this._selectedLayer.indexes?.filter((t=>"FullText"==t.indexType));if(t?.length){const i=[];t.forEach((t=>{i.push(...t.fields.split(","))}));const s=[];i.forEach((t=>{const i=this._selectedLayer.getField(t.trim());s.push(i.alias)})),this._searchPlaceHolder=this._translations.searchPlaceholder.replace("{{fields}}",s.join(", ")),this._fullTextSearchInfo.push({onFields:["*"],searchTerm:"",searchType:"prefix"})}}}async _searchTextChanged(t){this._fullTextSearchInfo.forEach((i=>{i.searchTerm=t.target.value})),await this._searchFullText()}async _searchFullText(){this._searchExpression&&this._clearSearchDefinitionExpression();let t=[];if(this._fullTextSearchInfo&&this._fullTextSearchInfo[0].searchTerm){const i=this._selectedLayer.createQuery();i.fullText=this._fullTextSearchInfo,t=await this._selectedLayer.queryObjectIds(i),await this._updateSearchDefinitionExpression(t?.length?t:[-1])}await this.initializeFeatureItems()}async _updateSearchDefinitionExpression(t){const i=this._selectedLayer.definitionExpression;if(t?.length){const s=`objectId in(${t})`;this._selectedLayer.definitionExpression=i?.indexOf(this._searchExpression)>-1?i.replace(this._searchExpression,s):i?`${i} AND (${s})`:s,this._searchExpression=s}else this._clearSearchDefinitionExpression()}_clearSearchDefinitionExpression(){const t=this._selectedLayer.definitionExpression;this._searchExpression&&t?.indexOf(this._searchExpression)>-1&&(this._selectedLayer.definitionExpression=t?.indexOf(" AND ("+this._searchExpression)>-1?t.replace(` AND (${this._searchExpression})`,""):t.replace(this._searchExpression,"")),this._searchExpression=void 0}async featureClicked(t,i){if(this.clearHighlights(),this.highlightOnMap){const i=Number(t.target.value),s=await o(this.mapView,this.selectedLayerId);this._highlightHandle=await c([i],s,this.mapView,!0)}await this.emitSelectedFeature(i)}async emitSelectedFeature(t){const i=t.layer,s=i.createQuery();s.returnGeometry=!0,s.objectIds=[t.getObjectId()];const e=await i.queryFeatures(s);this.featureSelect.emit(e.features[0])}async onFeatureHover(t){if(this.clearHighlights(),this.highlightOnHover){const i=t.getObjectId(),s=await o(this.mapView,this.selectedLayerId);this._highlights&&(s.highlights=JSON.parse(this._highlights)),s.highlightOptions={color:new this.Color("#FFFF00")},this._highlights=JSON.stringify(s.highlights),this._highlightHandle=s.highlight([i])}}clearHighlights(){this._highlightHandle&&this._highlightHandle.remove()}async queryPage(t){const i=this._selectedLayer,s=this.sortingInfo?.field?this.sortingInfo.field:i.objectIdField,e=this.sortingInfo?.order?this.sortingInfo.order:"desc",a=await this.getWhereCondition(),h={start:t,num:this.pageSize,outFields:["*"],returnGeometry:!0,where:a,outSpatialReference:this.mapView.spatialReference.toJSON()};s&&e&&(h.orderByFields=[s.toString()+" "+e]);const l=await i.queryFeatures(h);return await this.createFeatureItem(l)}async createFeatureItem(t){const i=t?.features,s=this.reportingOptions&&this.reportingOptions[this.selectedLayerId].like,e=i.map((async t=>{const i=await this._popupUtils.getPopupTitle(t,this.mapView.map);let e,a;if(this.showUserImageInList){const i=this._selectedLayer.editFieldsInfo?.creatorField;i&&(e=await this.getUserInformation(t))}return this.showFeatureSymbol&&(a=await this.getFeatureSymbol(t)),s&&this.getAbbreviatedLikeCount(t),this.getFeatureItem(t,i,a,e)}));return Promise.all(e)}getAbbreviatedLikeCount(t){const i=this._selectedLayer,s=this.reportingOptions[i.id].likeField;i.fields.forEach((e=>{if(this._validFieldTypes.indexOf(e.type)>-1&&e.name===s&&this.reportingOptions[i.id].like){this._likeFieldAvailable=!0;let i=t.attributes[s]||0;i>999&&(i=i>999999?this._translations.millionsAbbreviation.replace("{{abbreviated_value}}",Math.floor(i/1e6).toString()):this._translations.thousandsAbbreviation.replace("{{abbreviated_value}}",Math.floor(i/1e3).toString())),this._abbreviatedLikeCount=i}}))}getFeatureItem(t,i,s,a){const h=t.attributes[this._selectedLayer.objectIdField].toString();i=i??h;const l=Number(t.attributes[this.reportingOptions?.[this._selectedLayer.id].likeField]).toLocaleString(),n="small"!==this.textSize||this.showFullTitle?"small"===this.textSize?"feature-list-popup-title-small":"feature-list-popup-title":"feature-list-popup-title-small-ellipsis",o=this._calciteList.offsetWidth-(this.showUserImageInList?115:65);return e("calcite-list-item",{onCalciteListItemSelect:i=>{this.featureClicked(i,t)},onMouseLeave:()=>{this.clearHighlights()},onMouseOver:()=>{this.onFeatureHover(t)},value:h},this.showUserImageInList&&e("calcite-avatar",{class:"profile-img","full-name":a?.fullName,scale:"m",slot:"content-start",thumbnail:a?.userProfileUrl,userId:a?.id,username:a?.fullName?a.username:void 0}),this.showFeatureSymbol&&e("div",{class:"feature-symbol",ref:t=>t&&t.replaceChildren(s),slot:"content-start"}),e("div",{class:`popup-title ${n}`,slot:"content-start",style:{maxWidth:"large"===this.textSize?"none":`${o}px`}},i),this._likeFieldAvailable&&e("div",{class:"like-container",id:h.concat("like"),slot:"content-end"},e("span",null,this._abbreviatedLikeCount),e("calcite-icon",{icon:"thumbs-up",scale:"s"}),e("calcite-tooltip",{overlayPositioning:"fixed",placement:"top","reference-element":h.concat("like")},l)),e("calcite-icon",{flipRtl:!0,icon:"chevron-right",scale:"s",slot:"content-end"}))}async getUserInformation(t){let i=this._selectedLayer.editFieldsInfo?.creatorField;t.attributes.hasOwnProperty(i.toLowerCase())?i=i.toLowerCase():t.attributes.hasOwnProperty(i.toUpperCase())&&(i=i.toUpperCase());let s=`${this.esriConfig.portalUrl}/sharing/rest/community/users/${t.attributes[i]}?f=json&returnUserLicensedItems=true`;const e=this.mapView.map.portalItem.portal?.credential?.token;e&&(s+=`&token=${e}`);const a=await fetch(s),h=await a.json();let l=`${this.esriConfig.portalUrl}/sharing/rest/community/users/${h?.username??t.attributes[i]}/info/blob.png`;return h?.access&&e&&(l+=`?token=${e}`),h.userProfileUrl=l,h}async getFeatureSymbol(t){const i=document.createElement("div");return await this.symbolUtils.getDisplayedSymbol(t).then((async t=>{if(t&&await(this.symbolUtils?.renderPreviewHTML(t,{node:i})),i.children?.length){const t=i.children[0];if(t){const i=Number(t.getAttribute("height")),s=Number(t.getAttribute("width"));s>30?t.setAttribute("width","30"):s<19&&t.setAttribute("width","20"),t.setAttribute("viewBox",`0 0 ${s} ${i}`)}}})),i}async _getTranslations(){const t=await h(this.el);this._translations=t[0]}static get watchers(){return{locale:["localeWatchHandler"],selectedLayerId:["selectedLayerWatchHandler"],sortingInfo:["sortingInfoWatchHandler"],whereClause:["whereClauseHandler"]}}};r.style=":host{display:block}.width-full{width:100%}.pagination{display:flex;justify-content:center}.error-msg{padding:10px;width:calc(100% - 20px)}.feature-list-popup-title{font-weight:500;white-space:pre-line}.feature-list-popup-title-small{font-size:small;white-space:pre-line}.feature-list-popup-title-small-ellipsis{font-size:small;white-space:nowrap !important;text-overflow:ellipsis;overflow:hidden}.popup-title{padding:0 5px;word-break:break-word}.profile-img{padding:0 5px;min-width:32px}.like-container{display:flex;align-items:center;gap:5px;color:gray !important;font-style:italic}.feature-symbol{padding:0 3px;min-width:30px;display:flex;justify-content:center}.search{padding:10px;background-color:var(--calcite-color-foreground-1) !important;border-block-end:1px solid var(--calcite-color-border-3)}";export{r as feature_list}
|