@sjcrh/proteinpaint-client 2.201.0 → 2.202.0
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/2dmaf-Y2MBOXHL.js +1373 -0
- package/dist/AIProjectAdmin-2W4WNV65.js +958 -0
- package/dist/AggregateMatrix-7L7OKUXI.js +671 -0
- package/dist/AppHeader-6WM66GKP.js +835 -0
- package/dist/BoxPlot-AF72DMSS.js +1218 -0
- package/dist/CorrelationVolcano-H6DHMTYZ.js +620 -0
- package/dist/CorrelationVolcano-H6DHMTYZ.js.map +7 -0
- package/dist/DE-AABMOSEE.js +95 -0
- package/dist/DEinput-3HVHJE2I.js +409 -0
- package/dist/DEinput-3HVHJE2I.js.map +7 -0
- package/dist/DifferentialAnalysis-NBC222Q6.js +243 -0
- package/dist/Disco-B6E3ALAV.js +3392 -0
- package/dist/Disco.UI-KGFIQHXC.js +248 -0
- package/dist/DmrPlot-R3S4PCAE.js +642 -0
- package/dist/DziViewer-QYLZ4EMQ.js +16332 -0
- package/dist/GB-PV4RI5DG.js +1396 -0
- package/dist/GSEA-DHUOROST.js +846 -0
- package/dist/GeneExpInput-RESMBEM3.js +367 -0
- package/dist/Geomap-2WACSP77.js +89 -0
- package/dist/HicApp-3FJEZXAI.js +2250 -0
- package/dist/IDCViewer-MIRQEK4N.js +10817 -0
- package/dist/NumBinaryEditor-EP277U4I.js +284 -0
- package/dist/NumBinaryEditor.unit.spec-ZB627VLG.js +317 -0
- package/dist/NumContEditor-F7DOQSIW.js +110 -0
- package/dist/NumContEditor.unit.spec-PROGQHTU.js +169 -0
- package/dist/NumCustomBinEditor-QS3IPKIQ.js +38 -0
- package/dist/NumCustomBinEditor.unit.spec-BRDEFIX6.js +402 -0
- package/dist/NumDiscreteEditor-SE4I3BDA.js +175 -0
- package/dist/NumDiscreteEditor.unit.spec-6GBWQ3NQ.js +238 -0
- package/dist/NumRegularBinEditor-RJKB3G3V.js +38 -0
- package/dist/NumRegularBinEditor.unit.spec-HRU2Y76X.js +283 -0
- package/dist/NumSplineEditor-2DCORF5E.js +215 -0
- package/dist/NumSplineEditor.unit.spec-TTNB5IXX.js +229 -0
- package/dist/NumericDensity-3A7KTA7Y.js +38 -0
- package/dist/NumericDensity.unit.spec-ISPDAUVX.js +423 -0
- package/dist/NumericHandler-RG5XZMBU.js +39 -0
- package/dist/NumericHandler.unit.spec-RTD7AZNE.js +219 -0
- package/dist/ProteomeInput-6A7UB4CI.js +394 -0
- package/dist/RunChart2-YEAOBR2L.js +758 -0
- package/dist/SC-C3MJQBI5.js +1112 -0
- package/dist/Volcano-N6MXAQDZ.js +1417 -0
- package/dist/Volcano-N6MXAQDZ.js.map +7 -0
- package/dist/WSIViewer-OVJ2QS7P.js +26200 -0
- package/dist/WSIViewer-OVJ2QS7P.js.map +7 -0
- package/dist/Wsi-CMLKCEG3.js +239 -0
- package/dist/Wsi-CMLKCEG3.js.map +7 -0
- package/dist/WsiSamplesPlot-ET7LGNJW.js +165 -0
- package/dist/adSandbox-6LGHUXPX.js +38 -0
- package/dist/animatedBubbleChart-VJ6EQDQP.js +553 -0
- package/dist/app-PRLLUIAA.js +49 -0
- package/dist/app-WR6PQ2YK.js +37 -0
- package/dist/app.js +13 -13
- package/dist/bam-EXBXKUSE.js +859 -0
- package/dist/barchart-FSIB3IZZ.js +47 -0
- package/dist/barchart.events-F4HSVH6M.js +47 -0
- package/dist/barchart.integration.spec-AXE7BRKX.js +2243 -0
- package/dist/barchart2-DRNQQJE2.js +314 -0
- package/dist/block-J3A3RIGS.js +6255 -0
- package/dist/block.init-MQKMDKKW.js +38 -0
- package/dist/block.mds.expressionrank-ZQEPPDEL.js +359 -0
- package/dist/block.mds.geneboxplot-VJTIMZ6H.js +828 -0
- package/dist/block.mds.junction-VTAMQ2CW.js +1545 -0
- package/dist/block.mds.svcnv-WG7WY3CS.js +6801 -0
- package/dist/block.svg-YTWYGSGO.js +164 -0
- package/dist/block.tk.aicheck-L4M55U63.js +283 -0
- package/dist/block.tk.ase-3OBVSGWM.js +365 -0
- package/dist/block.tk.bam-QUCP3HST.js +1906 -0
- package/dist/block.tk.bedgraphdot-BGAH5YPF.js +384 -0
- package/dist/block.tk.bigwig.ui-2MG6VMOE.js +211 -0
- package/dist/block.tk.hicstraw-MDQHFWBB.js +823 -0
- package/dist/block.tk.junction-PBCJTAFX.js +2364 -0
- package/dist/block.tk.junction.textmatrixui-FJR76QBO.js +199 -0
- package/dist/block.tk.ld-ISL7K3DH.js +99 -0
- package/dist/block.tk.menu-VQW3FUAF.js +1029 -0
- package/dist/block.tk.pgv-RMXDF3XD.js +944 -0
- package/dist/brainImaging-F4GZRF53.js +423 -0
- package/dist/brainRegions-ONUXPD7P.js +221 -0
- package/dist/bubbleHeatmap-ZOS2ME3T.js +383 -0
- package/dist/cellTypeBubbleHeatmap-BEVDWLHJ.js +283 -0
- package/dist/chunk-2JQWA4EO.js +6364 -0
- package/dist/chunk-2TWVFQD2.js +494 -0
- package/dist/chunk-2TWVFQD2.js.map +7 -0
- package/dist/chunk-2TZITKMT.js +498 -0
- package/dist/chunk-4BDOPNYW.js +129 -0
- package/dist/chunk-4G6ZGXZF.js +1338 -0
- package/dist/chunk-4G6ZGXZF.js.map +7 -0
- package/dist/chunk-4QW2O66J.js +22695 -0
- package/dist/chunk-4QW2O66J.js.map +7 -0
- package/dist/chunk-4RWLKZMS.js +480 -0
- package/dist/chunk-57GCW5SF.js +2899 -0
- package/dist/chunk-5RUVBYLK.js +117 -0
- package/dist/chunk-5YOZ4E5H.js +55 -0
- package/dist/chunk-6N5DNN7P.js +302 -0
- package/dist/chunk-73PFJ2VF.js +21517 -0
- package/dist/chunk-73PFJ2VF.js.map +7 -0
- package/dist/chunk-AOVDTRFY.js +272 -0
- package/dist/chunk-BIDQ4OZH.js +465 -0
- package/dist/chunk-C34UTN5M.js +292 -0
- package/dist/chunk-DFHSLHXZ.js +134 -0
- package/dist/chunk-DMOTISFN.js +835 -0
- package/dist/chunk-DMOTISFN.js.map +7 -0
- package/dist/chunk-E2JRANYL.js +299 -0
- package/dist/chunk-E6EA7IU7.js +1172 -0
- package/dist/chunk-E6EA7IU7.js.map +7 -0
- package/dist/chunk-E732F6XI.js +141 -0
- package/dist/chunk-E732F6XI.js.map +7 -0
- package/dist/chunk-FESRWKYY.js +203 -0
- package/dist/chunk-GMJSMF7P.js +5070 -0
- package/dist/chunk-H6INPPUC.js +784 -0
- package/dist/chunk-H6INPPUC.js.map +7 -0
- package/dist/chunk-HDPL53U4.js +14 -0
- package/dist/chunk-HOCICSX4.js +276 -0
- package/dist/chunk-HR7XPTAV.js +340 -0
- package/dist/chunk-HR7XPTAV.js.map +7 -0
- package/dist/chunk-HV3GD2F3.js +54 -0
- package/dist/chunk-IGVKT4CE.js +56 -0
- package/dist/chunk-IMKIDF2H.js +123 -0
- package/dist/chunk-ITKMNOLR.js +37 -0
- package/dist/chunk-JABW3SRG.js +217 -0
- package/dist/chunk-JTYQX3EE.js +4306 -0
- package/dist/chunk-JTYQX3EE.js.map +7 -0
- package/dist/chunk-KDNYUHAH.js +70 -0
- package/dist/chunk-KSA3ND7Z.js +2327 -0
- package/dist/chunk-LCRPBPKX.js +34 -0
- package/dist/chunk-NIZTWHGT.js +514 -0
- package/dist/chunk-OBRVYT5O.js +187 -0
- package/dist/chunk-OBRVYT5O.js.map +7 -0
- package/dist/chunk-OCC5HEPR.js +411 -0
- package/dist/chunk-OMIUJ7JT.js +448 -0
- package/dist/chunk-ONCG5AKF.js +160 -0
- package/dist/chunk-OW5LD7S2.js +102 -0
- package/dist/chunk-PY4QOYPK.js +102 -0
- package/dist/chunk-Q3QY7QGU.js +50 -0
- package/dist/chunk-RL3IRMOA.js +236 -0
- package/dist/chunk-SCOFWMSE.js +240 -0
- package/dist/chunk-SMOHPEMJ.js +2681 -0
- package/dist/chunk-SNL7MSZD.js +243 -0
- package/dist/chunk-SP7HDNXC.js +368 -0
- package/dist/chunk-UILBQKQ6.js +143 -0
- package/dist/chunk-USH6NWXA.js +1943 -0
- package/dist/chunk-USH6NWXA.js.map +7 -0
- package/dist/chunk-UTNJA7JC.js +381 -0
- package/dist/chunk-VJCJCDFI.js +142 -0
- package/dist/chunk-VSSZJHOR.js +473 -0
- package/dist/chunk-W2WOZNEN.js +158 -0
- package/dist/chunk-WGRJEQT7.js +1250 -0
- package/dist/chunk-WGRJEQT7.js.map +7 -0
- package/dist/chunk-WJTRQ3ZC.js +1710 -0
- package/dist/chunk-X4QQRHFB.js +1812 -0
- package/dist/chunk-Y2UCJ33M.js +263 -0
- package/dist/chunk-Y45RZL4F.js +98 -0
- package/dist/chunk-YAISXQJ5.js +626 -0
- package/dist/chunk-YAISXQJ5.js.map +7 -0
- package/dist/chunk-Z2TA7NML.js +352 -0
- package/dist/chunk-Z7U74YGW.js +222 -0
- package/dist/chunk-ZKMBNB5E.js +176 -0
- package/dist/chunk-ZPBG6CT3.js +100 -0
- package/dist/chunk-ZUDSOVYT.js +2784 -0
- package/dist/chunk-ZZMIDYRE.js +197 -0
- package/dist/chunk-ZZMIDYRE.js.map +7 -0
- package/dist/cohort-R743ZSCR.js +75 -0
- package/dist/condition-MPZIRRGP.js +332 -0
- package/dist/controls-WD5TZITZ.js +39 -0
- package/dist/controls.btns-KCLXBXSL.js +9 -0
- package/dist/controls.config-577UCREO.js +39 -0
- package/dist/correlation-OCFBDDOX.js +102 -0
- package/dist/cuminc-YJGCKHFM.js +1153 -0
- package/dist/cuminc-YJGCKHFM.js.map +7 -0
- package/dist/cuminc.integration.spec-V46K57GV.js +678 -0
- package/dist/customdata.inputui-2MS5ZRKC.js +289 -0
- package/dist/dataDownload-HBFKARTR.js +332 -0
- package/dist/dataDownload-HBFKARTR.js.map +7 -0
- package/dist/dataDownload.integration.spec-TEOJOMYK.js +193 -0
- package/dist/databrowser.ui-PDPFHOH7.js +432 -0
- package/dist/dictionary-MWUQYW6W.js +118 -0
- package/dist/dnaMethylation-SNVVE2MD.js +38 -0
- package/dist/dnaMethylation.integration.spec-OSYZ3YDP.js +203 -0
- package/dist/dofetch-7R7PL4BX.js +51 -0
- package/dist/e2pca-7FYIWR5O.js +350 -0
- package/dist/ep-PTAJZLKI.js +1256 -0
- package/dist/expclust.gdc.spec-2R7T7JPY.js +307 -0
- package/dist/facet-BY6DQRCA.js +521 -0
- package/dist/facet-BY6DQRCA.js.map +7 -0
- package/dist/gb-5UFIDQWY.js +88 -0
- package/dist/geneExpClustering-QLBETGVB.js +249 -0
- package/dist/geneExpression-SAMLSOHQ.js +38 -0
- package/dist/geneExpression-SECTPIDT.js +313 -0
- package/dist/geneExpression.unit.spec-UNRGPJIG.js +102 -0
- package/dist/geneORA-CCQGE7QL.js +278 -0
- package/dist/geneRanking-NVR7ZZIP.js +553 -0
- package/dist/geneVariant-5KL2J3NA.js +39 -0
- package/dist/geneVariant-72E5YEPJ.js +41 -0
- package/dist/geneVariant.integration.spec-7JLVYF7Q.js +198 -0
- package/dist/genefusion.ui-M3IG6NUU.js +308 -0
- package/dist/geneset-V2535XGY.js +208 -0
- package/dist/genomeBrowser.spec-TRREAQCH.js +281 -0
- package/dist/grin2-6X5GCPBQ.js +75 -0
- package/dist/grin2-GOO7H3RC.js +1143 -0
- package/dist/hierCluster-5YZOCCTV.js +63 -0
- package/dist/hierCluster-ZPQCUSVO.js +59 -0
- package/dist/hierCluster.config-T3Y2LS6V.js +40 -0
- package/dist/hierCluster.integration.spec-PTXVQH77.js +488 -0
- package/dist/hierCluster.interactivity-JNBO3MJB.js +54 -0
- package/dist/imagePlot-AH2JIGVN.js +163 -0
- package/dist/imagePlot-AH2JIGVN.js.map +7 -0
- package/dist/importPlot-CWMBFQDD.js +8 -0
- package/dist/isoformExpression-ABPY2N3A.js +40 -0
- package/dist/isoformExpression.unit.spec-KRAZBQVF.js +242 -0
- package/dist/junction-XGCBNVHV.js +41 -0
- package/dist/junction.unit.spec-XZFUJRI3.js +187 -0
- package/dist/launch.adhoc-7FJD3XSI.js +42 -0
- package/dist/leftlabel.sample-VPOZWRVY.js +263 -0
- package/dist/lollipop-WBOAFWWO.js +171 -0
- package/dist/maf-MMN6WYHA.js +460 -0
- package/dist/maf-MMN6WYHA.js.map +7 -0
- package/dist/maftimeline-UK4MQP2D.js +593 -0
- package/dist/matrix-AT2FFTWO.js +58 -0
- package/dist/matrix-AU6NPNID.js +63 -0
- package/dist/matrix.config-VTQ6HL5L.js +41 -0
- package/dist/matrix.data-DBYXSWIN.js +25 -0
- package/dist/matrix.dom-DDPSUNY2.js +11 -0
- package/dist/matrix.integration.spec-NJ2AXQAS.js +3072 -0
- package/dist/matrix.interactivity-HE2Q6SAO.js +42 -0
- package/dist/matrix.layout-FD5BPRCX.js +44 -0
- package/dist/matrix.renderers-DVM4NB2R.js +38 -0
- package/dist/matrix.sort.unit.spec-VQ3TR4S2.js +472 -0
- package/dist/matrix.sorterUi-4KYRGJT5.js +18 -0
- package/dist/matrix.sorterUi.unit.spec-IEHG3OKN.js +342 -0
- package/dist/mavb-RPRKXPTZ.js +732 -0
- package/dist/mds.fimo-PZCVBD44.js +518 -0
- package/dist/mds.samplescatterplot-236GTHM4.js +1550 -0
- package/dist/mds.survivalplot-IJHOWSZL.js +483 -0
- package/dist/oncomatrix-R4OKDXSV.js +295 -0
- package/dist/oncomatrix.spec-4Z4HKS44.js +448 -0
- package/dist/plot.2dvaf-ZK7DAKRQ.js +377 -0
- package/dist/plot.app-J66BA2LD.js +41 -0
- package/dist/plot.barplot-UVRVPOKA.js +102 -0
- package/dist/plot.boxplot-DQGBDNLU.js +152 -0
- package/dist/plot.brainImaging-WRMDYYHC.js +51 -0
- package/dist/plot.disco-SSGPSM7W.js +102 -0
- package/dist/plot.dzi-F77KKPIJ.js +33 -0
- package/dist/plot.ssgq-FVFJOYVO.js +139 -0
- package/dist/plot.vaf2cov-CJSYBSPQ.js +259 -0
- package/dist/plot.wsi-OSZU2PQ5.js +36 -0
- package/dist/polar2-R4ZKXKEV.js +237 -0
- package/dist/profileForms-F7LXHITE.js +940 -0
- package/dist/profileForms-F7LXHITE.js.map +7 -0
- package/dist/profilePlot-JU7SFYYY.js +54 -0
- package/dist/proteinView-VU4SVO5I.js +1568 -0
- package/dist/proteomeCohortCompare-2U537GOK.js +799 -0
- package/dist/pseudbulk.unit.spec-2FDKAEVI.js +91 -0
- package/dist/pseudobulk-5GBUBBOY.js +40 -0
- package/dist/qualitative-3FTEQ7JW.js +43 -0
- package/dist/radar2-EBOTTAMC.js +332 -0
- package/dist/radarFacility2-PAGNJR6D.js +340 -0
- package/dist/regression-XOVSVC7S.js +58 -0
- package/dist/regression.inputs-LGA67ESO.js +48 -0
- package/dist/regression.inputs.term-UCQKXC5D.js +50 -0
- package/dist/regression.inputs.values.table-2RRE7SMS.js +45 -0
- package/dist/regression.integration.spec-BKM5UI7H.js +838 -0
- package/dist/regression.results-T3HB6CBH.js +40 -0
- package/dist/regression.spec-W7IVCYVZ.js +708 -0
- package/dist/render-2C6LWNG2.js +38 -0
- package/dist/report-HRGU3XKL.js +222 -0
- package/dist/sampleView-P5JZHEKY.js +48 -0
- package/dist/samplelst-OYQ6BASU.js +111 -0
- package/dist/samplematrix-JC3SGO5V.js +2198 -0
- package/dist/sc-FTHUNDGY.js +86 -0
- package/dist/scatter-WYP2NPNB.js +890 -0
- package/dist/selectGenomeWithTklst-CIETKILP.js +134 -0
- package/dist/singleCellCellType-3O3TTLM6.js +38 -0
- package/dist/singleCellCellType.unit.spec-GHBS36DB.js +159 -0
- package/dist/singleCellGeneExpression-2F7F4EKK.js +38 -0
- package/dist/singleCellGeneExpression.unit.spec-2VGIH2NZ.js +153 -0
- package/dist/singleCellPlot-MGSS4O3L.js +54 -0
- package/dist/singlecell-CKC2VVJ3.js +86 -0
- package/dist/singlecell-QOXATRF4.js +1572 -0
- package/dist/snp-OSYJO2R7.js +38 -0
- package/dist/snp.unit.spec-L5ANPFO2.js +176 -0
- package/dist/snplocus-64MJJID2.js +208 -0
- package/dist/spliceevent.a53ss.diagram-LHRT5UPB.js +151 -0
- package/dist/spliceevent.exonskip.diagram-BGSEPGR5.js +283 -0
- package/dist/spliceevent.noeventdiagram-QGZZSKW7.js +460 -0
- package/dist/ssGSEA-VVAZDFDT.js +38 -0
- package/dist/ssGSEA.unit.spec-LP76RHTV.js +88 -0
- package/dist/stattable-55YGV5B4.js +122 -0
- package/dist/stattable-55YGV5B4.js.map +7 -0
- package/dist/studyCatalog-AXWH7IOH.js +358 -0
- package/dist/summarizeCnvGeneexp-DRBIXOAP.js +163 -0
- package/dist/summarizeGeneexpSurvival-4PATAUSN.js +110 -0
- package/dist/summarizeMutationCnv-UGSIGZDJ.js +164 -0
- package/dist/summarizeMutationDiagnosis-UATVI5BK.js +40 -0
- package/dist/summarizeMutationSurvival-CZXGM3AA.js +99 -0
- package/dist/summary-IGTXNQ5I.js +49 -0
- package/dist/summary.integration.spec-VFCYU2V6.js +414 -0
- package/dist/summaryInput-AFZSASTM.js +231 -0
- package/dist/sunburst-G7DBI637.js +284 -0
- package/dist/survival-GIRR5ML4.js +1247 -0
- package/dist/survival-GIRR5ML4.js.map +7 -0
- package/dist/survival-YOJBLMR2.js +58 -0
- package/dist/survival.integration.spec-FXPCZJSS.js +958 -0
- package/dist/svgraph-ZSSOWI7R.js +1387 -0
- package/dist/svmr-FPYSMXSC.js +3842 -0
- package/dist/table-NHS2WLWT.js +202 -0
- package/dist/table-NHS2WLWT.js.map +7 -0
- package/dist/termCollection-IY5V64IY.js +38 -0
- package/dist/termCollection-SR4SP6RZ.js +257 -0
- package/dist/termCollection.unit.spec-NL72AQ2P.js +304 -0
- package/dist/termCollectionFractionSelection-2LPBE224.js +47 -0
- package/dist/termCollectionFractionSelection.unit.spec-PUMGBUDN.js +193 -0
- package/dist/termInfo-2DR7DHXM.js +9 -0
- package/dist/tk-COBDWIZJ.js +1127 -0
- package/dist/tk-N2YBXDQK.js +46 -0
- package/dist/tp.ui-BMK2MMIJ.js +1459 -0
- package/dist/tvs.dt-KL4VCW5Y.js +39 -0
- package/dist/tvs.dtcnv.categorical-VGXOASJE.js +40 -0
- package/dist/tvs.dtcnv.continuous-IANT7BPS.js +72 -0
- package/dist/tvs.dtfusion-M5HJWCJI.js +40 -0
- package/dist/tvs.dtitd-KB72EDPN.js +40 -0
- package/dist/tvs.dtsnvindel-VGYTLO6E.js +40 -0
- package/dist/tvs.dtsv-KWUXW2F5.js +40 -0
- package/dist/tvs.samplelst-3UA7XMHJ.js +104 -0
- package/dist/tvs.termCollection-LK6CVGYZ.js +129 -0
- package/dist/violin-D4EX3ZFV.js +46 -0
- package/dist/violin.integration.spec-GBW3VBHW.js +1425 -0
- package/dist/violin.interactivity-N3JVI2AQ.js +38 -0
- package/dist/violin.renderer-2NYRUXUY.js +40 -0
- package/dist/vocabulary-277KD4RO.js +41 -0
- package/dist/wsi.direct-RI3XGLUC.js +81 -0
- package/dist/wsi.direct-RI3XGLUC.js.map +7 -0
- package/package.json +2 -2
- package/dist/2dmaf-6MNHNHWX.js +0 -1373
- package/dist/AIProjectAdmin-W36NGUX2.js +0 -958
- package/dist/AggregateMatrix-YH2SN6VN.js +0 -671
- package/dist/AppHeader-I5CFECIL.js +0 -835
- package/dist/BoxPlot-4SXDAOBP.js +0 -1218
- package/dist/CorrelationVolcano-NAWMGG4Q.js +0 -619
- package/dist/CorrelationVolcano-NAWMGG4Q.js.map +0 -7
- package/dist/DE-VZMT7KEM.js +0 -95
- package/dist/DEinput-TKERM2YD.js +0 -409
- package/dist/DEinput-TKERM2YD.js.map +0 -7
- package/dist/DifferentialAnalysis-Y4SU4BVP.js +0 -243
- package/dist/Disco-DLK3BYPV.js +0 -3392
- package/dist/Disco.UI-IKGMFG36.js +0 -248
- package/dist/DmrPlot-JWBZJFS6.js +0 -642
- package/dist/DziViewer-6737GC22.js +0 -16332
- package/dist/GB-3UZSSIBW.js +0 -1396
- package/dist/GSEA-YLHBZY55.js +0 -846
- package/dist/GeneExpInput-KX5I63YV.js +0 -367
- package/dist/Geomap-QTUHM4VH.js +0 -89
- package/dist/HicApp-M2OCHGRT.js +0 -2250
- package/dist/IDCViewer-SWFBLBZH.js +0 -10817
- package/dist/NumBinaryEditor-ILFP6DR7.js +0 -284
- package/dist/NumBinaryEditor.unit.spec-TNIH7GQB.js +0 -317
- package/dist/NumContEditor-7UR3QMO6.js +0 -110
- package/dist/NumContEditor.unit.spec-P67AFEHM.js +0 -169
- package/dist/NumCustomBinEditor-H22J4K47.js +0 -38
- package/dist/NumCustomBinEditor.unit.spec-CO76BQPZ.js +0 -402
- package/dist/NumDiscreteEditor-TSUHVX77.js +0 -175
- package/dist/NumDiscreteEditor.unit.spec-RGC3GT22.js +0 -238
- package/dist/NumRegularBinEditor-IRD27CE2.js +0 -38
- package/dist/NumRegularBinEditor.unit.spec-MUHVOK5P.js +0 -283
- package/dist/NumSplineEditor-3V7RWHE2.js +0 -215
- package/dist/NumSplineEditor.unit.spec-BUI7NPN4.js +0 -229
- package/dist/NumericDensity-53KMCTDL.js +0 -38
- package/dist/NumericDensity.unit.spec-OKAQPQHR.js +0 -423
- package/dist/NumericHandler-5QFNXVBA.js +0 -39
- package/dist/NumericHandler.unit.spec-OBITSUU3.js +0 -219
- package/dist/ProteomeInput-MM373EL3.js +0 -394
- package/dist/RunChart2-2L6T3ITZ.js +0 -758
- package/dist/SC-JKD3Z2X5.js +0 -1112
- package/dist/Volcano-STGBS7IJ.js +0 -1404
- package/dist/Volcano-STGBS7IJ.js.map +0 -7
- package/dist/WSIViewer-LOBVUTOD.js +0 -48562
- package/dist/WSIViewer-LOBVUTOD.js.map +0 -7
- package/dist/WsiSamplesPlot-D3L3AILR.js +0 -165
- package/dist/adSandbox-XO5HDSFW.js +0 -38
- package/dist/animatedBubbleChart-XKW6TCZP.js +0 -553
- package/dist/app-H7ABTG6X.js +0 -49
- package/dist/app-HJSPIKRQ.js +0 -37
- package/dist/bam-R5QVHWGY.js +0 -859
- package/dist/barchart-OGCLBPQ2.js +0 -47
- package/dist/barchart.events-GZTY4IC3.js +0 -47
- package/dist/barchart.integration.spec-Z6ECNFSM.js +0 -2243
- package/dist/barchart2-DT42I747.js +0 -314
- package/dist/block-UYYJXSCM.js +0 -6255
- package/dist/block.init-43M53IMA.js +0 -38
- package/dist/block.mds.expressionrank-YH3IWMKM.js +0 -359
- package/dist/block.mds.geneboxplot-QS2IK37X.js +0 -828
- package/dist/block.mds.junction-7FF5BFEX.js +0 -1545
- package/dist/block.mds.svcnv-MMJYLL2W.js +0 -6801
- package/dist/block.svg-SA6DSUM2.js +0 -164
- package/dist/block.tk.aicheck-ZX5LZ2QO.js +0 -283
- package/dist/block.tk.ase-YXT4BOXK.js +0 -365
- package/dist/block.tk.bam-IMLRIOOV.js +0 -1906
- package/dist/block.tk.bedgraphdot-UYQLL7HM.js +0 -384
- package/dist/block.tk.bigwig.ui-WUVLVRSM.js +0 -211
- package/dist/block.tk.hicstraw-N4SJGF7H.js +0 -823
- package/dist/block.tk.junction-LZWHFKWJ.js +0 -2364
- package/dist/block.tk.junction.textmatrixui-B626NYPA.js +0 -199
- package/dist/block.tk.ld-6VWUMAP6.js +0 -99
- package/dist/block.tk.menu-RRN2UPQX.js +0 -1029
- package/dist/block.tk.pgv-GYG3EI6P.js +0 -944
- package/dist/brainImaging-VIMLETC5.js +0 -423
- package/dist/brainRegions-DRYZT5K5.js +0 -221
- package/dist/bubbleHeatmap-Y4SGMVJY.js +0 -383
- package/dist/cellTypeBubbleHeatmap-QW37ZT5W.js +0 -283
- package/dist/chunk-2Y5C7GJS.js +0 -299
- package/dist/chunk-2ZTCRUOL.js +0 -2899
- package/dist/chunk-3O6XFPUB.js +0 -243
- package/dist/chunk-3P74DH6P.js +0 -236
- package/dist/chunk-3PPCZPLN.js +0 -98
- package/dist/chunk-4H4WJJ2G.js +0 -54
- package/dist/chunk-4KY4XKJV.js +0 -143
- package/dist/chunk-4L2OSDQ6.js +0 -626
- package/dist/chunk-4L2OSDQ6.js.map +0 -7
- package/dist/chunk-4USLEUNR.js +0 -1812
- package/dist/chunk-5ITKSTJX.js +0 -34
- package/dist/chunk-5VMYXVZG.js +0 -272
- package/dist/chunk-7ZVFLC2V.js +0 -134
- package/dist/chunk-C2JHLAKV.js +0 -222
- package/dist/chunk-C5IAIOCA.js +0 -102
- package/dist/chunk-CIRCVMWE.js +0 -102
- package/dist/chunk-CRH37PEV.js +0 -203
- package/dist/chunk-DCNDZOI3.js +0 -6364
- package/dist/chunk-DHPLHIVP.js +0 -498
- package/dist/chunk-DKAHHMKN.js +0 -5070
- package/dist/chunk-ECIBJXFT.js +0 -352
- package/dist/chunk-EQCVSUAF.js +0 -37
- package/dist/chunk-FVL37XFU.js +0 -834
- package/dist/chunk-FVL37XFU.js.map +0 -7
- package/dist/chunk-FXS4I3Z3.js +0 -176
- package/dist/chunk-FYAY6D3O.js +0 -123
- package/dist/chunk-GL44X7JY.js +0 -302
- package/dist/chunk-HQAJVJCQ.js +0 -195
- package/dist/chunk-HQAJVJCQ.js.map +0 -7
- package/dist/chunk-IIT367QZ.js +0 -473
- package/dist/chunk-IYT5PNYJ.js +0 -148
- package/dist/chunk-IYT5PNYJ.js.map +0 -7
- package/dist/chunk-J6EP7JPJ.js +0 -1245
- package/dist/chunk-J6EP7JPJ.js.map +0 -7
- package/dist/chunk-JKMN7XOP.js +0 -1114
- package/dist/chunk-JKMN7XOP.js.map +0 -7
- package/dist/chunk-JLGCQ2F4.js +0 -480
- package/dist/chunk-JQT67SWE.js +0 -263
- package/dist/chunk-JQYPRW42.js +0 -217
- package/dist/chunk-K4IGOJPT.js +0 -160
- package/dist/chunk-K6OVOHIZ.js +0 -21483
- package/dist/chunk-K6OVOHIZ.js.map +0 -7
- package/dist/chunk-KPTPDZX2.js +0 -56
- package/dist/chunk-KTB7KXC2.js +0 -187
- package/dist/chunk-KTB7KXC2.js.map +0 -7
- package/dist/chunk-KW7MKBGF.js +0 -2681
- package/dist/chunk-KZFVYDVK.js +0 -448
- package/dist/chunk-M3J4MINX.js +0 -783
- package/dist/chunk-M3J4MINX.js.map +0 -7
- package/dist/chunk-M77DCLJX.js +0 -100
- package/dist/chunk-MFEYO6FB.js +0 -4306
- package/dist/chunk-MFEYO6FB.js.map +0 -7
- package/dist/chunk-MUJMZ6W6.js +0 -129
- package/dist/chunk-NRP55BOF.js +0 -50
- package/dist/chunk-O5KFJBU3.js +0 -1942
- package/dist/chunk-O5KFJBU3.js.map +0 -7
- package/dist/chunk-Q4AP5L7R.js +0 -1311
- package/dist/chunk-Q4AP5L7R.js.map +0 -7
- package/dist/chunk-QHPN3JJZ.js +0 -55
- package/dist/chunk-QSGXZEUU.js +0 -465
- package/dist/chunk-RIQT2LSR.js +0 -479
- package/dist/chunk-RIQT2LSR.js.map +0 -7
- package/dist/chunk-RZGEKL77.js +0 -117
- package/dist/chunk-SOCGXVIL.js +0 -2327
- package/dist/chunk-SZHFBRRT.js +0 -514
- package/dist/chunk-TOYMIFHN.js +0 -381
- package/dist/chunk-TPVHGI7Q.js +0 -368
- package/dist/chunk-UJN2RH5R.js +0 -411
- package/dist/chunk-V2DU2OXH.js +0 -1710
- package/dist/chunk-X7KRSZQT.js +0 -2784
- package/dist/chunk-XIBY5I6F.js +0 -240
- package/dist/chunk-XJBSBIZ4.js +0 -70
- package/dist/chunk-XRQWZJJ3.js +0 -347
- package/dist/chunk-XRQWZJJ3.js.map +0 -7
- package/dist/chunk-XZ4M3QAV.js +0 -158
- package/dist/chunk-YMP4YKBN.js +0 -142
- package/dist/chunk-Z7VK2AMA.js +0 -292
- package/dist/chunk-ZH7JPYQE.js +0 -14
- package/dist/chunk-ZVDOSFWU.js +0 -276
- package/dist/cohort-CEYVJJ7E.js +0 -75
- package/dist/condition-QSOFP4MY.js +0 -332
- package/dist/controls-QYHARIEY.js +0 -39
- package/dist/controls.btns-AP67YWKW.js +0 -9
- package/dist/controls.config-3OO3JK6E.js +0 -39
- package/dist/correlation-TOI3TMYL.js +0 -102
- package/dist/cuminc-L7OJTYXC.js +0 -1148
- package/dist/cuminc-L7OJTYXC.js.map +0 -7
- package/dist/cuminc.integration.spec-LSWV3KOF.js +0 -678
- package/dist/customdata.inputui-VMB3HSSC.js +0 -289
- package/dist/dataDownload-NPSWNOAG.js +0 -330
- package/dist/dataDownload-NPSWNOAG.js.map +0 -7
- package/dist/dataDownload.integration.spec-J6FRFLBK.js +0 -193
- package/dist/databrowser.ui-GVYWG6YI.js +0 -432
- package/dist/dictionary-GD67R72W.js +0 -118
- package/dist/dnaMethylation-S7OSGLAF.js +0 -38
- package/dist/dnaMethylation.integration.spec-ETMMJNDE.js +0 -203
- package/dist/dofetch-7GURQS65.js +0 -51
- package/dist/e2pca-ZIIPBJFN.js +0 -350
- package/dist/ep-A2HAL5WA.js +0 -1256
- package/dist/expclust.gdc.spec-ZSILLYNI.js +0 -307
- package/dist/facet-74LKIPTA.js +0 -521
- package/dist/facet-74LKIPTA.js.map +0 -7
- package/dist/gb-C3MPQXKN.js +0 -88
- package/dist/geneExpClustering-HYCFUUTU.js +0 -249
- package/dist/geneExpression-GATKMJJ5.js +0 -313
- package/dist/geneExpression-JXSAP2H7.js +0 -38
- package/dist/geneExpression.unit.spec-CODZYFHZ.js +0 -102
- package/dist/geneORA-LJRIR4VV.js +0 -278
- package/dist/geneRanking-TWLBKQZG.js +0 -553
- package/dist/geneVariant-35RQHTCK.js +0 -41
- package/dist/geneVariant-TMJJIMUF.js +0 -39
- package/dist/geneVariant.integration.spec-FIQ7IBSD.js +0 -198
- package/dist/genefusion.ui-SOBESSNO.js +0 -308
- package/dist/geneset-JXEJFEK2.js +0 -208
- package/dist/genomeBrowser.spec-25ZO5S2X.js +0 -281
- package/dist/grin2-CW4RPVPI.js +0 -75
- package/dist/grin2-EI5BVP4E.js +0 -1143
- package/dist/hierCluster-OBBPQH24.js +0 -59
- package/dist/hierCluster-SDH3TJQY.js +0 -63
- package/dist/hierCluster.config-DO67TCXI.js +0 -40
- package/dist/hierCluster.integration.spec-EB24C4VZ.js +0 -488
- package/dist/hierCluster.interactivity-LGEAFT5T.js +0 -54
- package/dist/imagePlot-LGLFG2QZ.js +0 -163
- package/dist/imagePlot-LGLFG2QZ.js.map +0 -7
- package/dist/importPlot-R2WRZGZU.js +0 -8
- package/dist/isoformExpression-KI3WY5M3.js +0 -40
- package/dist/isoformExpression.unit.spec-OQRG2DDU.js +0 -242
- package/dist/junction-6SWFPNM5.js +0 -41
- package/dist/junction.unit.spec-5TZFITSU.js +0 -187
- package/dist/launch.adhoc-HCX2RQLB.js +0 -42
- package/dist/leftlabel.sample-OI6XCXTQ.js +0 -263
- package/dist/lollipop-SOSOYHYL.js +0 -171
- package/dist/maf-73RLOEVN.js +0 -459
- package/dist/maf-73RLOEVN.js.map +0 -7
- package/dist/maftimeline-UOMLYUNI.js +0 -593
- package/dist/matrix-5QWDN6SI.js +0 -63
- package/dist/matrix-SKPVVDVR.js +0 -58
- package/dist/matrix.config-HE64MAL4.js +0 -41
- package/dist/matrix.data-HTUZXQAM.js +0 -25
- package/dist/matrix.dom-F7AN3QGE.js +0 -11
- package/dist/matrix.integration.spec-YKJ4LZFY.js +0 -3072
- package/dist/matrix.interactivity-YB5G5W5T.js +0 -42
- package/dist/matrix.layout-MFG65V7K.js +0 -44
- package/dist/matrix.renderers-PCZFHDDZ.js +0 -38
- package/dist/matrix.sort.unit.spec-GEAM5DSU.js +0 -472
- package/dist/matrix.sorterUi-YSKIX6B6.js +0 -18
- package/dist/matrix.sorterUi.unit.spec-2MW64QS5.js +0 -342
- package/dist/mavb-YMHJXCGA.js +0 -732
- package/dist/mds.fimo-PTEDRMLQ.js +0 -518
- package/dist/mds.samplescatterplot-7R7PLVQJ.js +0 -1550
- package/dist/mds.survivalplot-F3EENMFQ.js +0 -483
- package/dist/oncomatrix-27VVSMZB.js +0 -295
- package/dist/oncomatrix.spec-F43Y7CWN.js +0 -448
- package/dist/plot.2dvaf-MYFQSWIA.js +0 -377
- package/dist/plot.app-36QWCKXR.js +0 -41
- package/dist/plot.barplot-535EP7XT.js +0 -102
- package/dist/plot.boxplot-6IBP7VEB.js +0 -152
- package/dist/plot.brainImaging-M4HPNXZH.js +0 -51
- package/dist/plot.disco-HIT6GR44.js +0 -102
- package/dist/plot.dzi-W66SBKTH.js +0 -33
- package/dist/plot.ssgq-MI2OMCUY.js +0 -139
- package/dist/plot.vaf2cov-F4CBMLRA.js +0 -259
- package/dist/plot.wsi-7M5KTNFC.js +0 -36
- package/dist/polar2-7VSWGT4U.js +0 -237
- package/dist/profileForms-DFPCNJW2.js +0 -940
- package/dist/profileForms-DFPCNJW2.js.map +0 -7
- package/dist/profilePlot-ECTPPVB2.js +0 -54
- package/dist/proteinView-6ELOLOIU.js +0 -1568
- package/dist/proteomeCohortCompare-V2FMWI62.js +0 -799
- package/dist/pseudbulk.unit.spec-KV6URTXC.js +0 -91
- package/dist/pseudobulk-6ZRFCE65.js +0 -40
- package/dist/qualitative-3B62RUOB.js +0 -43
- package/dist/radar2-4QQER64E.js +0 -332
- package/dist/radarFacility2-MZKORRDY.js +0 -340
- package/dist/regression-GZ2YNX6Y.js +0 -56
- package/dist/regression.inputs-ZEFDNSVT.js +0 -48
- package/dist/regression.inputs.term-O2FQBX7L.js +0 -48
- package/dist/regression.inputs.values.table-63BQKSZP.js +0 -45
- package/dist/regression.integration.spec-KDHC3KDU.js +0 -838
- package/dist/regression.results-5J3QM4RX.js +0 -40
- package/dist/regression.spec-WZAZTDDA.js +0 -708
- package/dist/render-MZTEXVU5.js +0 -38
- package/dist/report-M5TYHH2W.js +0 -222
- package/dist/sampleView-QYTLYJEW.js +0 -48
- package/dist/samplelst-FN3Q7M7A.js +0 -111
- package/dist/samplematrix-Z5FVODO7.js +0 -2198
- package/dist/sc-4CHP5SYP.js +0 -86
- package/dist/scatter-UOPJYXL3.js +0 -890
- package/dist/selectGenomeWithTklst-WMAHGT4F.js +0 -134
- package/dist/singleCellCellType-XPWENB6V.js +0 -38
- package/dist/singleCellCellType.unit.spec-QK56PHKW.js +0 -159
- package/dist/singleCellGeneExpression-4CEVDVYF.js +0 -38
- package/dist/singleCellGeneExpression.unit.spec-ZYRLBVF5.js +0 -153
- package/dist/singleCellPlot-JS74VUGC.js +0 -54
- package/dist/singlecell-5XYOHMWJ.js +0 -1572
- package/dist/singlecell-OO77XBDD.js +0 -86
- package/dist/snp-X5ZILM5J.js +0 -38
- package/dist/snp.unit.spec-V23G3JLJ.js +0 -176
- package/dist/snplocus-U5UIIUWR.js +0 -208
- package/dist/spliceevent.a53ss.diagram-YDFVSDMT.js +0 -151
- package/dist/spliceevent.exonskip.diagram-VDKN5JBE.js +0 -283
- package/dist/spliceevent.noeventdiagram-EFPFRUFI.js +0 -460
- package/dist/ssGSEA-LKJW5OQK.js +0 -38
- package/dist/ssGSEA.unit.spec-7WCZVEP2.js +0 -88
- package/dist/stattable-MDABSW3F.js +0 -90
- package/dist/stattable-MDABSW3F.js.map +0 -7
- package/dist/studyCatalog-EU33KE5H.js +0 -358
- package/dist/summarizeCnvGeneexp-QL25OQNB.js +0 -163
- package/dist/summarizeGeneexpSurvival-B7HTCH7L.js +0 -110
- package/dist/summarizeMutationCnv-DFAPX2JE.js +0 -164
- package/dist/summarizeMutationDiagnosis-HCSDSVII.js +0 -40
- package/dist/summarizeMutationSurvival-6WEASSA2.js +0 -99
- package/dist/summary-BWYXE77G.js +0 -49
- package/dist/summary.integration.spec-AVGSW5MF.js +0 -414
- package/dist/summaryInput-MOQ6HUCX.js +0 -231
- package/dist/sunburst-EZDHVJCL.js +0 -284
- package/dist/survival-5TFMM7NP.js +0 -1239
- package/dist/survival-5TFMM7NP.js.map +0 -7
- package/dist/survival-IEVELTC4.js +0 -58
- package/dist/survival.integration.spec-HHWP3R4H.js +0 -958
- package/dist/svgraph-55XRIYJW.js +0 -1387
- package/dist/svmr-CMEBFSRO.js +0 -3842
- package/dist/table-LTWQ3TLQ.js +0 -200
- package/dist/table-LTWQ3TLQ.js.map +0 -7
- package/dist/termCollection-CPQXYBFA.js +0 -38
- package/dist/termCollection-ZWOH273K.js +0 -257
- package/dist/termCollection.unit.spec-RK7VATLU.js +0 -304
- package/dist/termCollectionFractionSelection-Z4ZRW63R.js +0 -47
- package/dist/termCollectionFractionSelection.unit.spec-3CS7DPNU.js +0 -193
- package/dist/termInfo-6MJDJSDW.js +0 -9
- package/dist/tk-4NNTWWLK.js +0 -46
- package/dist/tk-RHWJJXH2.js +0 -1127
- package/dist/tp.ui-DPN5UN6U.js +0 -1459
- package/dist/tvs.dt-ARPDFRVM.js +0 -39
- package/dist/tvs.dtcnv.categorical-POS6WQK6.js +0 -40
- package/dist/tvs.dtcnv.continuous-5OETJ7JU.js +0 -72
- package/dist/tvs.dtfusion-ERYVI3DW.js +0 -40
- package/dist/tvs.dtitd-KTZZYEWU.js +0 -40
- package/dist/tvs.dtsnvindel-TGUAX3RN.js +0 -40
- package/dist/tvs.dtsv-AM63OIL6.js +0 -40
- package/dist/tvs.samplelst-VW2NOQ2C.js +0 -104
- package/dist/tvs.termCollection-O4ZSWJFA.js +0 -129
- package/dist/violin-ZQ3DEYGR.js +0 -46
- package/dist/violin.integration.spec-PVEF77HB.js +0 -1425
- package/dist/violin.interactivity-FYU4TCFO.js +0 -38
- package/dist/violin.renderer-XAERGBMV.js +0 -40
- package/dist/vocabulary-ECJX27W2.js +0 -41
- /package/dist/{2dmaf-6MNHNHWX.js.map → 2dmaf-Y2MBOXHL.js.map} +0 -0
- /package/dist/{AIProjectAdmin-W36NGUX2.js.map → AIProjectAdmin-2W4WNV65.js.map} +0 -0
- /package/dist/{AggregateMatrix-YH2SN6VN.js.map → AggregateMatrix-7L7OKUXI.js.map} +0 -0
- /package/dist/{AppHeader-I5CFECIL.js.map → AppHeader-6WM66GKP.js.map} +0 -0
- /package/dist/{BoxPlot-4SXDAOBP.js.map → BoxPlot-AF72DMSS.js.map} +0 -0
- /package/dist/{DE-VZMT7KEM.js.map → DE-AABMOSEE.js.map} +0 -0
- /package/dist/{DifferentialAnalysis-Y4SU4BVP.js.map → DifferentialAnalysis-NBC222Q6.js.map} +0 -0
- /package/dist/{Disco-DLK3BYPV.js.map → Disco-B6E3ALAV.js.map} +0 -0
- /package/dist/{Disco.UI-IKGMFG36.js.map → Disco.UI-KGFIQHXC.js.map} +0 -0
- /package/dist/{DmrPlot-JWBZJFS6.js.map → DmrPlot-R3S4PCAE.js.map} +0 -0
- /package/dist/{DziViewer-6737GC22.js.map → DziViewer-QYLZ4EMQ.js.map} +0 -0
- /package/dist/{GB-3UZSSIBW.js.map → GB-PV4RI5DG.js.map} +0 -0
- /package/dist/{GSEA-YLHBZY55.js.map → GSEA-DHUOROST.js.map} +0 -0
- /package/dist/{GeneExpInput-KX5I63YV.js.map → GeneExpInput-RESMBEM3.js.map} +0 -0
- /package/dist/{Geomap-QTUHM4VH.js.map → Geomap-2WACSP77.js.map} +0 -0
- /package/dist/{HicApp-M2OCHGRT.js.map → HicApp-3FJEZXAI.js.map} +0 -0
- /package/dist/{IDCViewer-SWFBLBZH.js.map → IDCViewer-MIRQEK4N.js.map} +0 -0
- /package/dist/{NumBinaryEditor-ILFP6DR7.js.map → NumBinaryEditor-EP277U4I.js.map} +0 -0
- /package/dist/{NumBinaryEditor.unit.spec-TNIH7GQB.js.map → NumBinaryEditor.unit.spec-ZB627VLG.js.map} +0 -0
- /package/dist/{NumContEditor-7UR3QMO6.js.map → NumContEditor-F7DOQSIW.js.map} +0 -0
- /package/dist/{NumContEditor.unit.spec-P67AFEHM.js.map → NumContEditor.unit.spec-PROGQHTU.js.map} +0 -0
- /package/dist/{NumCustomBinEditor-H22J4K47.js.map → NumCustomBinEditor-QS3IPKIQ.js.map} +0 -0
- /package/dist/{NumCustomBinEditor.unit.spec-CO76BQPZ.js.map → NumCustomBinEditor.unit.spec-BRDEFIX6.js.map} +0 -0
- /package/dist/{NumDiscreteEditor-TSUHVX77.js.map → NumDiscreteEditor-SE4I3BDA.js.map} +0 -0
- /package/dist/{NumDiscreteEditor.unit.spec-RGC3GT22.js.map → NumDiscreteEditor.unit.spec-6GBWQ3NQ.js.map} +0 -0
- /package/dist/{NumRegularBinEditor-IRD27CE2.js.map → NumRegularBinEditor-RJKB3G3V.js.map} +0 -0
- /package/dist/{NumRegularBinEditor.unit.spec-MUHVOK5P.js.map → NumRegularBinEditor.unit.spec-HRU2Y76X.js.map} +0 -0
- /package/dist/{NumSplineEditor-3V7RWHE2.js.map → NumSplineEditor-2DCORF5E.js.map} +0 -0
- /package/dist/{NumSplineEditor.unit.spec-BUI7NPN4.js.map → NumSplineEditor.unit.spec-TTNB5IXX.js.map} +0 -0
- /package/dist/{NumericDensity-53KMCTDL.js.map → NumericDensity-3A7KTA7Y.js.map} +0 -0
- /package/dist/{NumericDensity.unit.spec-OKAQPQHR.js.map → NumericDensity.unit.spec-ISPDAUVX.js.map} +0 -0
- /package/dist/{NumericHandler-5QFNXVBA.js.map → NumericHandler-RG5XZMBU.js.map} +0 -0
- /package/dist/{NumericHandler.unit.spec-OBITSUU3.js.map → NumericHandler.unit.spec-RTD7AZNE.js.map} +0 -0
- /package/dist/{ProteomeInput-MM373EL3.js.map → ProteomeInput-6A7UB4CI.js.map} +0 -0
- /package/dist/{RunChart2-2L6T3ITZ.js.map → RunChart2-YEAOBR2L.js.map} +0 -0
- /package/dist/{SC-JKD3Z2X5.js.map → SC-C3MJQBI5.js.map} +0 -0
- /package/dist/{WsiSamplesPlot-D3L3AILR.js.map → WsiSamplesPlot-ET7LGNJW.js.map} +0 -0
- /package/dist/{adSandbox-XO5HDSFW.js.map → adSandbox-6LGHUXPX.js.map} +0 -0
- /package/dist/{animatedBubbleChart-XKW6TCZP.js.map → animatedBubbleChart-VJ6EQDQP.js.map} +0 -0
- /package/dist/{app-H7ABTG6X.js.map → app-PRLLUIAA.js.map} +0 -0
- /package/dist/{app-HJSPIKRQ.js.map → app-WR6PQ2YK.js.map} +0 -0
- /package/dist/{bam-R5QVHWGY.js.map → bam-EXBXKUSE.js.map} +0 -0
- /package/dist/{barchart-OGCLBPQ2.js.map → barchart-FSIB3IZZ.js.map} +0 -0
- /package/dist/{barchart.events-GZTY4IC3.js.map → barchart.events-F4HSVH6M.js.map} +0 -0
- /package/dist/{barchart.integration.spec-Z6ECNFSM.js.map → barchart.integration.spec-AXE7BRKX.js.map} +0 -0
- /package/dist/{barchart2-DT42I747.js.map → barchart2-DRNQQJE2.js.map} +0 -0
- /package/dist/{block-UYYJXSCM.js.map → block-J3A3RIGS.js.map} +0 -0
- /package/dist/{block.init-43M53IMA.js.map → block.init-MQKMDKKW.js.map} +0 -0
- /package/dist/{block.mds.expressionrank-YH3IWMKM.js.map → block.mds.expressionrank-ZQEPPDEL.js.map} +0 -0
- /package/dist/{block.mds.geneboxplot-QS2IK37X.js.map → block.mds.geneboxplot-VJTIMZ6H.js.map} +0 -0
- /package/dist/{block.mds.junction-7FF5BFEX.js.map → block.mds.junction-VTAMQ2CW.js.map} +0 -0
- /package/dist/{block.mds.svcnv-MMJYLL2W.js.map → block.mds.svcnv-WG7WY3CS.js.map} +0 -0
- /package/dist/{block.svg-SA6DSUM2.js.map → block.svg-YTWYGSGO.js.map} +0 -0
- /package/dist/{block.tk.aicheck-ZX5LZ2QO.js.map → block.tk.aicheck-L4M55U63.js.map} +0 -0
- /package/dist/{block.tk.ase-YXT4BOXK.js.map → block.tk.ase-3OBVSGWM.js.map} +0 -0
- /package/dist/{block.tk.bam-IMLRIOOV.js.map → block.tk.bam-QUCP3HST.js.map} +0 -0
- /package/dist/{block.tk.bedgraphdot-UYQLL7HM.js.map → block.tk.bedgraphdot-BGAH5YPF.js.map} +0 -0
- /package/dist/{block.tk.bigwig.ui-WUVLVRSM.js.map → block.tk.bigwig.ui-2MG6VMOE.js.map} +0 -0
- /package/dist/{block.tk.hicstraw-N4SJGF7H.js.map → block.tk.hicstraw-MDQHFWBB.js.map} +0 -0
- /package/dist/{block.tk.junction-LZWHFKWJ.js.map → block.tk.junction-PBCJTAFX.js.map} +0 -0
- /package/dist/{block.tk.junction.textmatrixui-B626NYPA.js.map → block.tk.junction.textmatrixui-FJR76QBO.js.map} +0 -0
- /package/dist/{block.tk.ld-6VWUMAP6.js.map → block.tk.ld-ISL7K3DH.js.map} +0 -0
- /package/dist/{block.tk.menu-RRN2UPQX.js.map → block.tk.menu-VQW3FUAF.js.map} +0 -0
- /package/dist/{block.tk.pgv-GYG3EI6P.js.map → block.tk.pgv-RMXDF3XD.js.map} +0 -0
- /package/dist/{brainImaging-VIMLETC5.js.map → brainImaging-F4GZRF53.js.map} +0 -0
- /package/dist/{brainRegions-DRYZT5K5.js.map → brainRegions-ONUXPD7P.js.map} +0 -0
- /package/dist/{bubbleHeatmap-Y4SGMVJY.js.map → bubbleHeatmap-ZOS2ME3T.js.map} +0 -0
- /package/dist/{cellTypeBubbleHeatmap-QW37ZT5W.js.map → cellTypeBubbleHeatmap-BEVDWLHJ.js.map} +0 -0
- /package/dist/{chunk-DCNDZOI3.js.map → chunk-2JQWA4EO.js.map} +0 -0
- /package/dist/{chunk-DHPLHIVP.js.map → chunk-2TZITKMT.js.map} +0 -0
- /package/dist/{chunk-MUJMZ6W6.js.map → chunk-4BDOPNYW.js.map} +0 -0
- /package/dist/{chunk-JLGCQ2F4.js.map → chunk-4RWLKZMS.js.map} +0 -0
- /package/dist/{chunk-2ZTCRUOL.js.map → chunk-57GCW5SF.js.map} +0 -0
- /package/dist/{chunk-RZGEKL77.js.map → chunk-5RUVBYLK.js.map} +0 -0
- /package/dist/{chunk-QHPN3JJZ.js.map → chunk-5YOZ4E5H.js.map} +0 -0
- /package/dist/{chunk-GL44X7JY.js.map → chunk-6N5DNN7P.js.map} +0 -0
- /package/dist/{chunk-5VMYXVZG.js.map → chunk-AOVDTRFY.js.map} +0 -0
- /package/dist/{chunk-QSGXZEUU.js.map → chunk-BIDQ4OZH.js.map} +0 -0
- /package/dist/{chunk-Z7VK2AMA.js.map → chunk-C34UTN5M.js.map} +0 -0
- /package/dist/{chunk-7ZVFLC2V.js.map → chunk-DFHSLHXZ.js.map} +0 -0
- /package/dist/{chunk-2Y5C7GJS.js.map → chunk-E2JRANYL.js.map} +0 -0
- /package/dist/{chunk-CRH37PEV.js.map → chunk-FESRWKYY.js.map} +0 -0
- /package/dist/{chunk-DKAHHMKN.js.map → chunk-GMJSMF7P.js.map} +0 -0
- /package/dist/{chunk-ZH7JPYQE.js.map → chunk-HDPL53U4.js.map} +0 -0
- /package/dist/{chunk-ZVDOSFWU.js.map → chunk-HOCICSX4.js.map} +0 -0
- /package/dist/{chunk-4H4WJJ2G.js.map → chunk-HV3GD2F3.js.map} +0 -0
- /package/dist/{chunk-KPTPDZX2.js.map → chunk-IGVKT4CE.js.map} +0 -0
- /package/dist/{chunk-FYAY6D3O.js.map → chunk-IMKIDF2H.js.map} +0 -0
- /package/dist/{chunk-EQCVSUAF.js.map → chunk-ITKMNOLR.js.map} +0 -0
- /package/dist/{chunk-JQYPRW42.js.map → chunk-JABW3SRG.js.map} +0 -0
- /package/dist/{chunk-XJBSBIZ4.js.map → chunk-KDNYUHAH.js.map} +0 -0
- /package/dist/{chunk-SOCGXVIL.js.map → chunk-KSA3ND7Z.js.map} +0 -0
- /package/dist/{chunk-5ITKSTJX.js.map → chunk-LCRPBPKX.js.map} +0 -0
- /package/dist/{chunk-SZHFBRRT.js.map → chunk-NIZTWHGT.js.map} +0 -0
- /package/dist/{chunk-UJN2RH5R.js.map → chunk-OCC5HEPR.js.map} +0 -0
- /package/dist/{chunk-KZFVYDVK.js.map → chunk-OMIUJ7JT.js.map} +0 -0
- /package/dist/{chunk-K4IGOJPT.js.map → chunk-ONCG5AKF.js.map} +0 -0
- /package/dist/{chunk-C5IAIOCA.js.map → chunk-OW5LD7S2.js.map} +0 -0
- /package/dist/{chunk-CIRCVMWE.js.map → chunk-PY4QOYPK.js.map} +0 -0
- /package/dist/{chunk-NRP55BOF.js.map → chunk-Q3QY7QGU.js.map} +0 -0
- /package/dist/{chunk-3P74DH6P.js.map → chunk-RL3IRMOA.js.map} +0 -0
- /package/dist/{chunk-XIBY5I6F.js.map → chunk-SCOFWMSE.js.map} +0 -0
- /package/dist/{chunk-KW7MKBGF.js.map → chunk-SMOHPEMJ.js.map} +0 -0
- /package/dist/{chunk-3O6XFPUB.js.map → chunk-SNL7MSZD.js.map} +0 -0
- /package/dist/{chunk-TPVHGI7Q.js.map → chunk-SP7HDNXC.js.map} +0 -0
- /package/dist/{chunk-4KY4XKJV.js.map → chunk-UILBQKQ6.js.map} +0 -0
- /package/dist/{chunk-TOYMIFHN.js.map → chunk-UTNJA7JC.js.map} +0 -0
- /package/dist/{chunk-YMP4YKBN.js.map → chunk-VJCJCDFI.js.map} +0 -0
- /package/dist/{chunk-IIT367QZ.js.map → chunk-VSSZJHOR.js.map} +0 -0
- /package/dist/{chunk-XZ4M3QAV.js.map → chunk-W2WOZNEN.js.map} +0 -0
- /package/dist/{chunk-V2DU2OXH.js.map → chunk-WJTRQ3ZC.js.map} +0 -0
- /package/dist/{chunk-4USLEUNR.js.map → chunk-X4QQRHFB.js.map} +0 -0
- /package/dist/{chunk-JQT67SWE.js.map → chunk-Y2UCJ33M.js.map} +0 -0
- /package/dist/{chunk-3PPCZPLN.js.map → chunk-Y45RZL4F.js.map} +0 -0
- /package/dist/{chunk-ECIBJXFT.js.map → chunk-Z2TA7NML.js.map} +0 -0
- /package/dist/{chunk-C2JHLAKV.js.map → chunk-Z7U74YGW.js.map} +0 -0
- /package/dist/{chunk-FXS4I3Z3.js.map → chunk-ZKMBNB5E.js.map} +0 -0
- /package/dist/{chunk-M77DCLJX.js.map → chunk-ZPBG6CT3.js.map} +0 -0
- /package/dist/{chunk-X7KRSZQT.js.map → chunk-ZUDSOVYT.js.map} +0 -0
- /package/dist/{cohort-CEYVJJ7E.js.map → cohort-R743ZSCR.js.map} +0 -0
- /package/dist/{condition-QSOFP4MY.js.map → condition-MPZIRRGP.js.map} +0 -0
- /package/dist/{controls-QYHARIEY.js.map → controls-WD5TZITZ.js.map} +0 -0
- /package/dist/{controls.btns-AP67YWKW.js.map → controls.btns-KCLXBXSL.js.map} +0 -0
- /package/dist/{controls.config-3OO3JK6E.js.map → controls.config-577UCREO.js.map} +0 -0
- /package/dist/{correlation-TOI3TMYL.js.map → correlation-OCFBDDOX.js.map} +0 -0
- /package/dist/{cuminc.integration.spec-LSWV3KOF.js.map → cuminc.integration.spec-V46K57GV.js.map} +0 -0
- /package/dist/{customdata.inputui-VMB3HSSC.js.map → customdata.inputui-2MS5ZRKC.js.map} +0 -0
- /package/dist/{dataDownload.integration.spec-J6FRFLBK.js.map → dataDownload.integration.spec-TEOJOMYK.js.map} +0 -0
- /package/dist/{databrowser.ui-GVYWG6YI.js.map → databrowser.ui-PDPFHOH7.js.map} +0 -0
- /package/dist/{dictionary-GD67R72W.js.map → dictionary-MWUQYW6W.js.map} +0 -0
- /package/dist/{dnaMethylation-S7OSGLAF.js.map → dnaMethylation-SNVVE2MD.js.map} +0 -0
- /package/dist/{dnaMethylation.integration.spec-ETMMJNDE.js.map → dnaMethylation.integration.spec-OSYZ3YDP.js.map} +0 -0
- /package/dist/{dofetch-7GURQS65.js.map → dofetch-7R7PL4BX.js.map} +0 -0
- /package/dist/{e2pca-ZIIPBJFN.js.map → e2pca-7FYIWR5O.js.map} +0 -0
- /package/dist/{ep-A2HAL5WA.js.map → ep-PTAJZLKI.js.map} +0 -0
- /package/dist/{expclust.gdc.spec-ZSILLYNI.js.map → expclust.gdc.spec-2R7T7JPY.js.map} +0 -0
- /package/dist/{gb-C3MPQXKN.js.map → gb-5UFIDQWY.js.map} +0 -0
- /package/dist/{geneExpClustering-HYCFUUTU.js.map → geneExpClustering-QLBETGVB.js.map} +0 -0
- /package/dist/{geneExpression-JXSAP2H7.js.map → geneExpression-SAMLSOHQ.js.map} +0 -0
- /package/dist/{geneExpression-GATKMJJ5.js.map → geneExpression-SECTPIDT.js.map} +0 -0
- /package/dist/{geneExpression.unit.spec-CODZYFHZ.js.map → geneExpression.unit.spec-UNRGPJIG.js.map} +0 -0
- /package/dist/{geneORA-LJRIR4VV.js.map → geneORA-CCQGE7QL.js.map} +0 -0
- /package/dist/{geneRanking-TWLBKQZG.js.map → geneRanking-NVR7ZZIP.js.map} +0 -0
- /package/dist/{geneVariant-35RQHTCK.js.map → geneVariant-5KL2J3NA.js.map} +0 -0
- /package/dist/{geneVariant-TMJJIMUF.js.map → geneVariant-72E5YEPJ.js.map} +0 -0
- /package/dist/{geneVariant.integration.spec-FIQ7IBSD.js.map → geneVariant.integration.spec-7JLVYF7Q.js.map} +0 -0
- /package/dist/{genefusion.ui-SOBESSNO.js.map → genefusion.ui-M3IG6NUU.js.map} +0 -0
- /package/dist/{geneset-JXEJFEK2.js.map → geneset-V2535XGY.js.map} +0 -0
- /package/dist/{genomeBrowser.spec-25ZO5S2X.js.map → genomeBrowser.spec-TRREAQCH.js.map} +0 -0
- /package/dist/{grin2-CW4RPVPI.js.map → grin2-6X5GCPBQ.js.map} +0 -0
- /package/dist/{grin2-EI5BVP4E.js.map → grin2-GOO7H3RC.js.map} +0 -0
- /package/dist/{hierCluster-OBBPQH24.js.map → hierCluster-5YZOCCTV.js.map} +0 -0
- /package/dist/{hierCluster-SDH3TJQY.js.map → hierCluster-ZPQCUSVO.js.map} +0 -0
- /package/dist/{hierCluster.config-DO67TCXI.js.map → hierCluster.config-T3Y2LS6V.js.map} +0 -0
- /package/dist/{hierCluster.integration.spec-EB24C4VZ.js.map → hierCluster.integration.spec-PTXVQH77.js.map} +0 -0
- /package/dist/{hierCluster.interactivity-LGEAFT5T.js.map → hierCluster.interactivity-JNBO3MJB.js.map} +0 -0
- /package/dist/{importPlot-R2WRZGZU.js.map → importPlot-CWMBFQDD.js.map} +0 -0
- /package/dist/{isoformExpression-KI3WY5M3.js.map → isoformExpression-ABPY2N3A.js.map} +0 -0
- /package/dist/{isoformExpression.unit.spec-OQRG2DDU.js.map → isoformExpression.unit.spec-KRAZBQVF.js.map} +0 -0
- /package/dist/{junction-6SWFPNM5.js.map → junction-XGCBNVHV.js.map} +0 -0
- /package/dist/{junction.unit.spec-5TZFITSU.js.map → junction.unit.spec-XZFUJRI3.js.map} +0 -0
- /package/dist/{launch.adhoc-HCX2RQLB.js.map → launch.adhoc-7FJD3XSI.js.map} +0 -0
- /package/dist/{leftlabel.sample-OI6XCXTQ.js.map → leftlabel.sample-VPOZWRVY.js.map} +0 -0
- /package/dist/{lollipop-SOSOYHYL.js.map → lollipop-WBOAFWWO.js.map} +0 -0
- /package/dist/{maftimeline-UOMLYUNI.js.map → maftimeline-UK4MQP2D.js.map} +0 -0
- /package/dist/{matrix-5QWDN6SI.js.map → matrix-AT2FFTWO.js.map} +0 -0
- /package/dist/{matrix-SKPVVDVR.js.map → matrix-AU6NPNID.js.map} +0 -0
- /package/dist/{matrix.config-HE64MAL4.js.map → matrix.config-VTQ6HL5L.js.map} +0 -0
- /package/dist/{matrix.data-HTUZXQAM.js.map → matrix.data-DBYXSWIN.js.map} +0 -0
- /package/dist/{matrix.dom-F7AN3QGE.js.map → matrix.dom-DDPSUNY2.js.map} +0 -0
- /package/dist/{matrix.integration.spec-YKJ4LZFY.js.map → matrix.integration.spec-NJ2AXQAS.js.map} +0 -0
- /package/dist/{matrix.interactivity-YB5G5W5T.js.map → matrix.interactivity-HE2Q6SAO.js.map} +0 -0
- /package/dist/{matrix.layout-MFG65V7K.js.map → matrix.layout-FD5BPRCX.js.map} +0 -0
- /package/dist/{matrix.renderers-PCZFHDDZ.js.map → matrix.renderers-DVM4NB2R.js.map} +0 -0
- /package/dist/{matrix.sort.unit.spec-GEAM5DSU.js.map → matrix.sort.unit.spec-VQ3TR4S2.js.map} +0 -0
- /package/dist/{matrix.sorterUi-YSKIX6B6.js.map → matrix.sorterUi-4KYRGJT5.js.map} +0 -0
- /package/dist/{matrix.sorterUi.unit.spec-2MW64QS5.js.map → matrix.sorterUi.unit.spec-IEHG3OKN.js.map} +0 -0
- /package/dist/{mavb-YMHJXCGA.js.map → mavb-RPRKXPTZ.js.map} +0 -0
- /package/dist/{mds.fimo-PTEDRMLQ.js.map → mds.fimo-PZCVBD44.js.map} +0 -0
- /package/dist/{mds.samplescatterplot-7R7PLVQJ.js.map → mds.samplescatterplot-236GTHM4.js.map} +0 -0
- /package/dist/{mds.survivalplot-F3EENMFQ.js.map → mds.survivalplot-IJHOWSZL.js.map} +0 -0
- /package/dist/{oncomatrix-27VVSMZB.js.map → oncomatrix-R4OKDXSV.js.map} +0 -0
- /package/dist/{oncomatrix.spec-F43Y7CWN.js.map → oncomatrix.spec-4Z4HKS44.js.map} +0 -0
- /package/dist/{plot.2dvaf-MYFQSWIA.js.map → plot.2dvaf-ZK7DAKRQ.js.map} +0 -0
- /package/dist/{plot.app-36QWCKXR.js.map → plot.app-J66BA2LD.js.map} +0 -0
- /package/dist/{plot.barplot-535EP7XT.js.map → plot.barplot-UVRVPOKA.js.map} +0 -0
- /package/dist/{plot.boxplot-6IBP7VEB.js.map → plot.boxplot-DQGBDNLU.js.map} +0 -0
- /package/dist/{plot.brainImaging-M4HPNXZH.js.map → plot.brainImaging-WRMDYYHC.js.map} +0 -0
- /package/dist/{plot.disco-HIT6GR44.js.map → plot.disco-SSGPSM7W.js.map} +0 -0
- /package/dist/{plot.dzi-W66SBKTH.js.map → plot.dzi-F77KKPIJ.js.map} +0 -0
- /package/dist/{plot.ssgq-MI2OMCUY.js.map → plot.ssgq-FVFJOYVO.js.map} +0 -0
- /package/dist/{plot.vaf2cov-F4CBMLRA.js.map → plot.vaf2cov-CJSYBSPQ.js.map} +0 -0
- /package/dist/{plot.wsi-7M5KTNFC.js.map → plot.wsi-OSZU2PQ5.js.map} +0 -0
- /package/dist/{polar2-7VSWGT4U.js.map → polar2-R4ZKXKEV.js.map} +0 -0
- /package/dist/{profilePlot-ECTPPVB2.js.map → profilePlot-JU7SFYYY.js.map} +0 -0
- /package/dist/{proteinView-6ELOLOIU.js.map → proteinView-VU4SVO5I.js.map} +0 -0
- /package/dist/{proteomeCohortCompare-V2FMWI62.js.map → proteomeCohortCompare-2U537GOK.js.map} +0 -0
- /package/dist/{pseudbulk.unit.spec-KV6URTXC.js.map → pseudbulk.unit.spec-2FDKAEVI.js.map} +0 -0
- /package/dist/{pseudobulk-6ZRFCE65.js.map → pseudobulk-5GBUBBOY.js.map} +0 -0
- /package/dist/{qualitative-3B62RUOB.js.map → qualitative-3FTEQ7JW.js.map} +0 -0
- /package/dist/{radar2-4QQER64E.js.map → radar2-EBOTTAMC.js.map} +0 -0
- /package/dist/{radarFacility2-MZKORRDY.js.map → radarFacility2-PAGNJR6D.js.map} +0 -0
- /package/dist/{regression-GZ2YNX6Y.js.map → regression-XOVSVC7S.js.map} +0 -0
- /package/dist/{regression.inputs-ZEFDNSVT.js.map → regression.inputs-LGA67ESO.js.map} +0 -0
- /package/dist/{regression.inputs.term-O2FQBX7L.js.map → regression.inputs.term-UCQKXC5D.js.map} +0 -0
- /package/dist/{regression.inputs.values.table-63BQKSZP.js.map → regression.inputs.values.table-2RRE7SMS.js.map} +0 -0
- /package/dist/{regression.integration.spec-KDHC3KDU.js.map → regression.integration.spec-BKM5UI7H.js.map} +0 -0
- /package/dist/{regression.results-5J3QM4RX.js.map → regression.results-T3HB6CBH.js.map} +0 -0
- /package/dist/{regression.spec-WZAZTDDA.js.map → regression.spec-W7IVCYVZ.js.map} +0 -0
- /package/dist/{render-MZTEXVU5.js.map → render-2C6LWNG2.js.map} +0 -0
- /package/dist/{report-M5TYHH2W.js.map → report-HRGU3XKL.js.map} +0 -0
- /package/dist/{sampleView-QYTLYJEW.js.map → sampleView-P5JZHEKY.js.map} +0 -0
- /package/dist/{samplelst-FN3Q7M7A.js.map → samplelst-OYQ6BASU.js.map} +0 -0
- /package/dist/{samplematrix-Z5FVODO7.js.map → samplematrix-JC3SGO5V.js.map} +0 -0
- /package/dist/{sc-4CHP5SYP.js.map → sc-FTHUNDGY.js.map} +0 -0
- /package/dist/{scatter-UOPJYXL3.js.map → scatter-WYP2NPNB.js.map} +0 -0
- /package/dist/{selectGenomeWithTklst-WMAHGT4F.js.map → selectGenomeWithTklst-CIETKILP.js.map} +0 -0
- /package/dist/{singleCellCellType-XPWENB6V.js.map → singleCellCellType-3O3TTLM6.js.map} +0 -0
- /package/dist/{singleCellCellType.unit.spec-QK56PHKW.js.map → singleCellCellType.unit.spec-GHBS36DB.js.map} +0 -0
- /package/dist/{singleCellGeneExpression-4CEVDVYF.js.map → singleCellGeneExpression-2F7F4EKK.js.map} +0 -0
- /package/dist/{singleCellGeneExpression.unit.spec-ZYRLBVF5.js.map → singleCellGeneExpression.unit.spec-2VGIH2NZ.js.map} +0 -0
- /package/dist/{singleCellPlot-JS74VUGC.js.map → singleCellPlot-MGSS4O3L.js.map} +0 -0
- /package/dist/{singlecell-OO77XBDD.js.map → singlecell-CKC2VVJ3.js.map} +0 -0
- /package/dist/{singlecell-5XYOHMWJ.js.map → singlecell-QOXATRF4.js.map} +0 -0
- /package/dist/{snp-X5ZILM5J.js.map → snp-OSYJO2R7.js.map} +0 -0
- /package/dist/{snp.unit.spec-V23G3JLJ.js.map → snp.unit.spec-L5ANPFO2.js.map} +0 -0
- /package/dist/{snplocus-U5UIIUWR.js.map → snplocus-64MJJID2.js.map} +0 -0
- /package/dist/{spliceevent.a53ss.diagram-YDFVSDMT.js.map → spliceevent.a53ss.diagram-LHRT5UPB.js.map} +0 -0
- /package/dist/{spliceevent.exonskip.diagram-VDKN5JBE.js.map → spliceevent.exonskip.diagram-BGSEPGR5.js.map} +0 -0
- /package/dist/{spliceevent.noeventdiagram-EFPFRUFI.js.map → spliceevent.noeventdiagram-QGZZSKW7.js.map} +0 -0
- /package/dist/{ssGSEA-LKJW5OQK.js.map → ssGSEA-VVAZDFDT.js.map} +0 -0
- /package/dist/{ssGSEA.unit.spec-7WCZVEP2.js.map → ssGSEA.unit.spec-LP76RHTV.js.map} +0 -0
- /package/dist/{studyCatalog-EU33KE5H.js.map → studyCatalog-AXWH7IOH.js.map} +0 -0
- /package/dist/{summarizeCnvGeneexp-QL25OQNB.js.map → summarizeCnvGeneexp-DRBIXOAP.js.map} +0 -0
- /package/dist/{summarizeGeneexpSurvival-B7HTCH7L.js.map → summarizeGeneexpSurvival-4PATAUSN.js.map} +0 -0
- /package/dist/{summarizeMutationCnv-DFAPX2JE.js.map → summarizeMutationCnv-UGSIGZDJ.js.map} +0 -0
- /package/dist/{summarizeMutationDiagnosis-HCSDSVII.js.map → summarizeMutationDiagnosis-UATVI5BK.js.map} +0 -0
- /package/dist/{summarizeMutationSurvival-6WEASSA2.js.map → summarizeMutationSurvival-CZXGM3AA.js.map} +0 -0
- /package/dist/{summary-BWYXE77G.js.map → summary-IGTXNQ5I.js.map} +0 -0
- /package/dist/{summary.integration.spec-AVGSW5MF.js.map → summary.integration.spec-VFCYU2V6.js.map} +0 -0
- /package/dist/{summaryInput-MOQ6HUCX.js.map → summaryInput-AFZSASTM.js.map} +0 -0
- /package/dist/{sunburst-EZDHVJCL.js.map → sunburst-G7DBI637.js.map} +0 -0
- /package/dist/{survival-IEVELTC4.js.map → survival-YOJBLMR2.js.map} +0 -0
- /package/dist/{survival.integration.spec-HHWP3R4H.js.map → survival.integration.spec-FXPCZJSS.js.map} +0 -0
- /package/dist/{svgraph-55XRIYJW.js.map → svgraph-ZSSOWI7R.js.map} +0 -0
- /package/dist/{svmr-CMEBFSRO.js.map → svmr-FPYSMXSC.js.map} +0 -0
- /package/dist/{termCollection-CPQXYBFA.js.map → termCollection-IY5V64IY.js.map} +0 -0
- /package/dist/{termCollection-ZWOH273K.js.map → termCollection-SR4SP6RZ.js.map} +0 -0
- /package/dist/{termCollection.unit.spec-RK7VATLU.js.map → termCollection.unit.spec-NL72AQ2P.js.map} +0 -0
- /package/dist/{termCollectionFractionSelection-Z4ZRW63R.js.map → termCollectionFractionSelection-2LPBE224.js.map} +0 -0
- /package/dist/{termCollectionFractionSelection.unit.spec-3CS7DPNU.js.map → termCollectionFractionSelection.unit.spec-PUMGBUDN.js.map} +0 -0
- /package/dist/{termInfo-6MJDJSDW.js.map → termInfo-2DR7DHXM.js.map} +0 -0
- /package/dist/{tk-RHWJJXH2.js.map → tk-COBDWIZJ.js.map} +0 -0
- /package/dist/{tk-4NNTWWLK.js.map → tk-N2YBXDQK.js.map} +0 -0
- /package/dist/{tp.ui-DPN5UN6U.js.map → tp.ui-BMK2MMIJ.js.map} +0 -0
- /package/dist/{tvs.dt-ARPDFRVM.js.map → tvs.dt-KL4VCW5Y.js.map} +0 -0
- /package/dist/{tvs.dtcnv.categorical-POS6WQK6.js.map → tvs.dtcnv.categorical-VGXOASJE.js.map} +0 -0
- /package/dist/{tvs.dtcnv.continuous-5OETJ7JU.js.map → tvs.dtcnv.continuous-IANT7BPS.js.map} +0 -0
- /package/dist/{tvs.dtfusion-ERYVI3DW.js.map → tvs.dtfusion-M5HJWCJI.js.map} +0 -0
- /package/dist/{tvs.dtitd-KTZZYEWU.js.map → tvs.dtitd-KB72EDPN.js.map} +0 -0
- /package/dist/{tvs.dtsnvindel-TGUAX3RN.js.map → tvs.dtsnvindel-VGYTLO6E.js.map} +0 -0
- /package/dist/{tvs.dtsv-AM63OIL6.js.map → tvs.dtsv-KWUXW2F5.js.map} +0 -0
- /package/dist/{tvs.samplelst-VW2NOQ2C.js.map → tvs.samplelst-3UA7XMHJ.js.map} +0 -0
- /package/dist/{tvs.termCollection-O4ZSWJFA.js.map → tvs.termCollection-LK6CVGYZ.js.map} +0 -0
- /package/dist/{violin-ZQ3DEYGR.js.map → violin-D4EX3ZFV.js.map} +0 -0
- /package/dist/{violin.integration.spec-PVEF77HB.js.map → violin.integration.spec-GBW3VBHW.js.map} +0 -0
- /package/dist/{violin.interactivity-FYU4TCFO.js.map → violin.interactivity-N3JVI2AQ.js.map} +0 -0
- /package/dist/{violin.renderer-XAERGBMV.js.map → violin.renderer-2NYRUXUY.js.map} +0 -0
- /package/dist/{vocabulary-ECJX27W2.js.map → vocabulary-277KD4RO.js.map} +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../plots/wsiviewer/interactions/WSIViewerInteractions.ts", "../../node_modules/ol/render/VectorContext.js", "../../node_modules/ol/render/canvas/Instruction.js", "../../node_modules/ol/render/canvas/Builder.js", "../../node_modules/ol/render/canvas/ImageBuilder.js", "../../node_modules/ol/render/canvas/LineStringBuilder.js", "../../node_modules/ol/render/canvas/PolygonBuilder.js", "../../node_modules/ol/geom/flat/linechunk.js", "../../node_modules/ol/geom/flat/straightchunk.js", "../../node_modules/ol/render/canvas/TextBuilder.js", "../../node_modules/ol/render/canvas/BuilderGroup.js", "../../node_modules/ol/geom/flat/length.js", "../../node_modules/ol/geom/flat/lineoffset.js", "../../node_modules/ol/geom/flat/textpath.js", "../../node_modules/ol/render/canvas/Executor.js", "../../node_modules/ol/render/canvas/ExecutorGroup.js", "../../node_modules/ol/render/canvas/Immediate.js", "../../node_modules/ol/render/canvas/hitdetect.js", "../../node_modules/ol/renderer/vector.js", "../../node_modules/ol/renderer/canvas/VectorLayer.js", "../../node_modules/ol/layer/Vector.js", "../../node_modules/ol/Feature.js", "../../node_modules/ol/geom/flat/interpolate.js", "../../node_modules/ol/featureloader.js", "../../node_modules/ol/loadingstrategy.js", "../../node_modules/ol/geom/flat/center.js", "../../node_modules/ol/render/Feature.js", "../../node_modules/ol/structs/RBush.js", "../../node_modules/ol/source/VectorEventType.js", "../../node_modules/ol/source/Vector.js", "../../node_modules/ol/Overlay.js", "../plots/wsiviewer/viewModel/SessionWSImage.ts", "../plots/wsiviewer/viewModel/ViewModel.ts", "../plots/wsiviewer/viewModel/ViewModelProvider.ts", "../plots/wsiviewer/view/DownloadCSVButtonRenderer.ts", "../plots/wsiviewer/defaults.ts", "../../node_modules/ol-ext/dist/ol-ext.css", "../plots/wsiviewer/view/WSIAnnotationsRenderer.ts", "../plots/wsiviewer/view/ThumbnailRenderer.ts", "../../node_modules/ol/control/OverviewMap.js", "../../node_modules/ol/control/FullScreen.js", "../../node_modules/ol/renderer/canvas/VectorTileLayer.js", "../../node_modules/ol/layer/VectorTile.js", "../../node_modules/ol/renderer/canvas/ImageLayer.js", "../../node_modules/ol/layer/BaseImage.js", "../../node_modules/ol/layer/Image.js", "../../node_modules/ol/vec/mat4.js", "../../node_modules/ol/webgl.js", "../../node_modules/ol/webgl/Buffer.js", "../../node_modules/ol/webgl/ContextEventType.js", "../../node_modules/ol/webgl/PostProcessingPass.js", "../../node_modules/ol/webgl/Helper.js", "../../node_modules/ol/renderer/webgl/Layer.js", "../../node_modules/ol/renderer/webgl/TileLayerBase.js", "../../node_modules/ol/renderer/webgl/TileLayer.js", "../../node_modules/ol/webgl/PaletteTexture.js", "../../node_modules/ol/expr/gpu.js", "../../node_modules/ol/style/flat.js", "../../node_modules/ol/render/webgl/bufferUtil.js", "../../node_modules/ol/render/webgl/compileUtil.js", "../../node_modules/ol/render/webgl/ShaderBuilder.js", "../../node_modules/ol/render/webgl/MixedGeometryBatch.js", "../../node_modules/ol/worker/webgl.js", "../../node_modules/ol/render/webgl/constants.js", "../../node_modules/ol/render/webgl/encodeUtil.js", "../../node_modules/ol/render/webgl/renderinstructions.js", "../../node_modules/ol/render/webgl/style.js", "../../node_modules/ol/render/webgl/VectorStyleRenderer.js", "../../node_modules/ol/webgl/RenderTarget.js", "../../node_modules/ol/renderer/webgl/worldUtil.js", "../../node_modules/ol/renderer/webgl/VectorLayer.js", "../../node_modules/ol/layer/Heatmap.js", "../../node_modules/ol-ext/util/input/Base.js", "../../node_modules/ol-ext/util/input/Checkbox.js", "../../node_modules/ol-ext/util/input/Switch.js", "../../node_modules/ol-ext/util/input/Radio.js", "../../node_modules/ol-ext/util/element.js", "../../node_modules/ol-ext/control/LayerSwitcher.js", "../../node_modules/ol/control/MousePosition.js", "../plots/wsiviewer/view/MapRenderer.ts", "../plots/wsiviewer/view/MetadataRenderer.ts", "../plots/wsiviewer/view/LegendRenderer.ts", "../plots/wsiviewer/view/ModelTrainerRenderer.ts", "../plots/wsiviewer/view/SkipFlagCheckRenderer.ts", "../plots/wsiviewer/WSIViewer.ts"],
|
|
4
|
+
"sourcesContent": ["import type OLMap from 'ol/Map.js'\nimport { debounce } from 'debounce'\nimport { clearServerDataCache, dofetch3 } from '#common/dofetch'\nimport VectorLayer from 'ol/layer/Vector'\nimport type VectorSource from 'ol/source/Vector'\nimport { Feature } from 'ol'\nimport { Polygon } from 'ol/geom'\nimport type { Geometry } from 'ol/geom'\nimport { Fill, Stroke, Style } from 'ol/style'\nimport type Settings from '#plots/wsiviewer/Settings.ts'\nimport {\n\tFlagStatus,\n\tcreateSelectionID,\n\tSelectionPrefixes,\n\tFeaturePrefixes,\n\tcheckSelectionType,\n\tcreateFeatureID,\n\ttype FlagStatusValues\n} from '#types'\nimport type {\n\tSaveWSIAnnotationRequest,\n\tSaveWSIAnnotationResponse,\n\tDeleteWSITileSelectionRequest,\n\tDeleteWSITileSelectionResponse,\n\tTileSelection,\n\tProvokingActions\n} from '#types'\nimport { SessionWSImage } from '#plots/wsiviewer/viewModel/SessionWSImage.ts'\nimport { createDimSquareFeature, createStarFeature } from '#plots/wsiviewer/viewModel/ViewModelProvider.ts'\nimport { DownloadCSVButtonRenderer } from '../view/DownloadCSVButtonRenderer'\n\nexport class WSIViewerInteractions {\n\tthumbnailClickListener: (index: number) => void\n\tzoomInEffectListener: (\n\t\tactiveImageExtent: unknown,\n\t\tzoomInPoints: [number, number][],\n\t\tmap: OLMap,\n\t\tactivePatchColor: string\n\t) => void\n\tviewerClickListener: (coordinateX: number, coordinateY: number, sessionWSImage: SessionWSImage, map: OLMap) => void\n\tsetKeyDownListener: (\n\t\tholder: any,\n\t\tsessionWSImage: SessionWSImage,\n\t\tmap: OLMap,\n\t\taiProjectID: number,\n\t\tshortcuts?: string[],\n\t\tdownloadCSVRenderer?: DownloadCSVButtonRenderer\n\t) => void\n\n\tonRetrainModelClicked: (genome: string, dslabel: string, projectId: string) => void\n\ttoggleLoadingDiv: (show: boolean) => void\n\ttoggleThumbnails: (start: number, doneRendering?: boolean) => void\n\ttoggleSpinner: (spin: boolean) => void\n\tconstructor(wsiApp: any, opts: any) {\n\t\tthis.thumbnailClickListener = (index: number) => {\n\t\t\twsiApp.app.dispatch({\n\t\t\t\ttype: 'plot_edit',\n\t\t\t\tid: opts.id,\n\t\t\t\tconfig: {\n\t\t\t\t\tsettings: {\n\t\t\t\t\t\tactiveAnnotation: 0,\n\t\t\t\t\t\tsessionsTileSelection: [],\n\t\t\t\t\t\tdisplayedImageIndex: index,\n\t\t\t\t\t\trenderWSIViewer: true,\n\t\t\t\t\t\tisChangingImages: true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tthis.zoomInEffectListener = (\n\t\t\tactiveImageExtent: unknown,\n\t\t\tzoomInPoints: [number, number][],\n\t\t\tmap: OLMap,\n\t\t\tactivePatchColor: string\n\t\t) => {\n\t\t\tconst state = wsiApp.app.getState()\n\t\t\tconst settings: Settings = state.plots.find(p => p.id === wsiApp.id).settings\n\n\t\t\tif (!zoomInPoints || zoomInPoints.length == 0) return\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (!activeImageExtent) return\n\n\t\t\t\tconst imageHeight = activeImageExtent[3]\n\n\t\t\t\t//Calculate the center of the annotation\n\t\t\t\tconst xyAvg = zoomInPoints\n\t\t\t\t\t.reduce(\n\t\t\t\t\t\t(acc, [x, y]) => {\n\t\t\t\t\t\t\tacc[0] += x\n\t\t\t\t\t\t\t/** Zoomify tile coordinates start top-left but OpenLayers start bottom-left.\n\t\t\t\t\t\t\t * This flips the feature coordinates to match OpenLayers coordinates.*/\n\t\t\t\t\t\t\tconst invertedY = imageHeight - y\n\t\t\t\t\t\t\tacc[1] += invertedY\n\t\t\t\t\t\t\treturn acc\n\t\t\t\t\t\t},\n\t\t\t\t\t\t[0, 0]\n\t\t\t\t\t)\n\t\t\t\t\t.map(sum => sum / zoomInPoints.length)\n\n\t\t\t\tconst view = map.getView()\n\t\t\t\tview.animate({\n\t\t\t\t\tcenter: xyAvg,\n\t\t\t\t\tzoom: settings.defaultZoom,\n\t\t\t\t\tduration: settings.animationTime\n\t\t\t\t})\n\n\t\t\t\t//On zooming to a new annotation, add a border around the annotation\n\t\t\t\tconst vectorLayer = map\n\t\t\t\t\t.getLayers()\n\t\t\t\t\t.getArray()\n\t\t\t\t\t.find(l => l instanceof VectorLayer)!\n\n\t\t\t\tconst zoomCoordinates = [zoomInPoints[0][0], imageHeight - zoomInPoints[0][1]] as [number, number]\n\t\t\t\tthis.addActiveBorder(vectorLayer as VectorLayer, zoomCoordinates, activePatchColor, settings.tileSize)\n\t\t\t}, settings.animationDelay)\n\t\t}\n\n\t\tthis.setKeyDownListener = (\n\t\t\tholder: any,\n\t\t\tsessionWSImage: SessionWSImage,\n\t\t\tmap: OLMap,\n\t\t\taiProjectID: number,\n\t\t\tshortcuts: string[] = [],\n\t\t\tdownloadCSVRenderer: DownloadCSVButtonRenderer = new DownloadCSVButtonRenderer()\n\t\t) => {\n\t\t\tconst state = wsiApp.app.getState()\n\t\t\tconst settings: Settings = state.plots.find(p => p.id === wsiApp.id).settings\n\n\t\t\t// Add keydown listener to the holder\n\t\t\tholder.attr('tabindex', 0)\n\t\t\tholder.node()?.focus()\n\n\t\t\tconst tileSelections = SessionWSImage.getTileSelections(sessionWSImage, settings) || []\n\n\t\t\tholder.on('keydown', async (event: KeyboardEvent) => {\n\t\t\t\tlet currentIndex = settings.activeAnnotation\n\n\t\t\t\tevent.preventDefault()\n\t\t\t\tevent.stopPropagation()\n\t\t\t\tconst idx = currentIndex\n\t\t\t\tif (event.key == '.') {\n\t\t\t\t\t//Do not react if at the last annotation\n\t\t\t\t\tif (currentIndex == tileSelections.length) {\n\t\t\t\t\t\tcurrentIndex = 0\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrentIndex += 1\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (event.key == ',') {\n\t\t\t\t\t//Do not react if at the starting annotation\n\t\t\t\t\tif (currentIndex === 0) {\n\t\t\t\t\t\t// If at the starting tileselection, find the the most recent Annotation by checking for timestamp property\n\t\t\t\t\t\tcurrentIndex = tileSelections.findIndex(\n\t\t\t\t\t\t\tts => checkSelectionType(ts, SelectionPrefixes.Annotation) || ts.flag !== FlagStatus.Normal\n\t\t\t\t\t\t)\n\t\t\t\t\t\tif (currentIndex === -1) {\n\t\t\t\t\t\t\tcurrentIndex = 0\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrentIndex -= 1\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (idx !== currentIndex) {\n\t\t\t\t\t//When the index changes, scroll to the new annotation\n\t\t\t\t\t//Timeout for when user presses arrows multiple times.\n\t\t\t\t\tconst d = debounce(async () => {\n\t\t\t\t\t\twsiApp.app.dispatch({\n\t\t\t\t\t\t\ttype: 'plot_edit',\n\t\t\t\t\t\t\tid: wsiApp.id,\n\t\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\t\tsettings: {\n\t\t\t\t\t\t\t\t\trenderWSIViewer: false,\n\t\t\t\t\t\t\t\t\tactiveAnnotation: currentIndex\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t}, 500)\n\t\t\t\t\td()\n\t\t\t\t}\n\n\t\t\t\t// TODO handle this better\n\t\t\t\tconst vectorLayer = map\n\t\t\t\t\t.getLayers()\n\t\t\t\t\t.getArray()\n\t\t\t\t\t.find(l => l instanceof VectorLayer)!\n\n\t\t\t\tif (event.key == 'Backspace') {\n\t\t\t\t\t//Delete\n\t\t\t\t\tconst classID: number | undefined = sessionWSImage?.classes?.find(\n\t\t\t\t\t\tc => c.label === tileSelections[currentIndex].class\n\t\t\t\t\t)?.id\n\t\t\t\t\tawait this.deleteAnnotation(wsiApp, vectorLayer!, sessionWSImage, currentIndex, classID)\n\t\t\t\t}\n\t\t\t\tif (event.key.toLowerCase() === 'r') {\n\t\t\t\t\tthis.toggleLoadingDiv(true)\n\t\t\t\t\tawait this.onRetrainModelClicked(\n\t\t\t\t\t\tstate.genome || state.vocab.genome,\n\t\t\t\t\t\tstate.dslabel || state.vocab.dslabel,\n\t\t\t\t\t\tstate.aiProjectID\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tif (event.key.toLowerCase() === 'x') {\n\t\t\t\t\tif (!sessionWSImage) return\n\t\t\t\t\tdownloadCSVRenderer.downloadAllAsCsv(sessionWSImage)\n\t\t\t\t}\n\t\t\t\tif (['f', 's'].includes(event.key.toLowerCase()) && !settings.isSavingAnnotation) {\n\t\t\t\t\twsiApp.app.dispatch({\n\t\t\t\t\t\ttype: 'plot_edit',\n\t\t\t\t\t\tid: wsiApp.id,\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tsettings: {\n\t\t\t\t\t\t\t\tisSavingAnnotation: true,\n\t\t\t\t\t\t\t\tchangeTrigger: Date.now(),\n\t\t\t\t\t\t\t\trenderWSIViewer: false\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst defaultColor = 'black'\n\t\t\t\t\t\tconst tileSelection = tileSelections[currentIndex]\n\t\t\t\t\t\tconst isAnnotation = checkSelectionType(tileSelection, SelectionPrefixes.Annotation)\n\t\t\t\t\t\tconst justTileSelection = checkSelectionType(tileSelection, SelectionPrefixes.TileSelection)\n\t\t\t\t\t\tconst matchingClass = sessionWSImage?.classes?.find(c => c.label === tileSelection.class)\n\t\t\t\t\t\tconst classColor: string = matchingClass ? matchingClass.color : defaultColor\n\t\t\t\t\t\tlet newFlag: FlagStatusValues | null = null\n\t\t\t\t\t\tlet provokingAction: ProvokingActions | null = null\n\t\t\t\t\t\tif (event.key.toLowerCase() === 'f') {\n\t\t\t\t\t\t\tprovokingAction = 'flagging'\n\t\t\t\t\t\t\tnewFlag = tileSelection.flag === FlagStatus.Flagged ? FlagStatus.Normal : FlagStatus.Flagged\n\t\t\t\t\t\t} else if (!justTileSelection && event.key.toLowerCase() === 's') {\n\t\t\t\t\t\t\tprovokingAction = 'skipping'\n\t\t\t\t\t\t\tnewFlag = tileSelection.flag === FlagStatus.Skipped ? FlagStatus.Normal : FlagStatus.Skipped\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (newFlag === null || provokingAction === null) throw new Error(\"Couldn't identify new flag to save.\")\n\n\t\t\t\t\t\tconst source: VectorSource<Feature<Geometry>> | null = vectorLayer.getSource()\n\t\t\t\t\t\ttileSelection.flag = newFlag\n\t\t\t\t\t\tconst oldStar = source?.getFeatureById(createFeatureID(FeaturePrefixes.Star, tileSelection.zoomCoordinates))\n\t\t\t\t\t\tif (oldStar) {\n\t\t\t\t\t\t\tsource?.removeFeature(oldStar)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst oldSquare = source?.getFeatureById(\n\t\t\t\t\t\t\tcreateFeatureID(FeaturePrefixes.Square, tileSelection.zoomCoordinates)\n\t\t\t\t\t\t)\n\t\t\t\t\t\tif (oldSquare) {\n\t\t\t\t\t\t\tsource?.removeFeature(oldSquare)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst annotationBorderFeat = source?.getFeatureById(\n\t\t\t\t\t\t\tcreateFeatureID(FeaturePrefixes.Border, tileSelection.zoomCoordinates)\n\t\t\t\t\t\t)\n\t\t\t\t\t\tif (annotationBorderFeat) {\n\t\t\t\t\t\t\tsource?.removeFeature(annotationBorderFeat)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (newFlag === FlagStatus.Flagged) {\n\t\t\t\t\t\t\tconst newStar = createStarFeature(\n\t\t\t\t\t\t\t\tsettings.tileSize || 512,\n\t\t\t\t\t\t\t\t[tileSelection.zoomCoordinates[0], -tileSelection.zoomCoordinates[1]],\n\t\t\t\t\t\t\t\ttileSelection.zoomCoordinates,\n\t\t\t\t\t\t\t\t'yellow',\n\t\t\t\t\t\t\t\tclassColor\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\tthis.addAnnotation(vectorLayer!, tileSelections, currentIndex, classColor, settings)\n\t\t\t\t\t\t\tsource?.addFeature(newStar)\n\t\t\t\t\t\t} else if (newFlag === FlagStatus.Skipped) {\n\t\t\t\t\t\t\tconst newDim = createDimSquareFeature(\n\t\t\t\t\t\t\t\ttileSelection.zoomCoordinates,\n\t\t\t\t\t\t\t\t[tileSelection.zoomCoordinates[0], -tileSelection.zoomCoordinates[1]],\n\t\t\t\t\t\t\t\tsettings.tileSize || 512,\n\t\t\t\t\t\t\t\tclassColor\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\tsource?.addFeature(newDim)\n\t\t\t\t\t\t} else if (isAnnotation) {\n\t\t\t\t\t\t\tthis.addAnnotation(vectorLayer!, tileSelections, currentIndex, classColor, settings)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (justTileSelection) {\n\t\t\t\t\t\t\tSessionWSImage.removeTileSelection(tileSelection, sessionWSImage)\n\t\t\t\t\t\t\ttileSelection.timestamp = new Date().toISOString()\n\t\t\t\t\t\t\tlet sessionsTileSelection: TileSelection[] = sessionWSImage.sessionsTileSelections ?? []\n\t\t\t\t\t\t\tsessionsTileSelection = [tileSelection, ...sessionsTileSelection]\n\t\t\t\t\t\t\twsiApp.app.dispatch({\n\t\t\t\t\t\t\t\ttype: 'plot_edit',\n\t\t\t\t\t\t\t\tid: wsiApp.id,\n\t\t\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\t\t\tsettings: {\n\t\t\t\t\t\t\t\t\t\trenderWSIViewer: false,\n\t\t\t\t\t\t\t\t\t\tchangeTrigger: Date.now(),\n\t\t\t\t\t\t\t\t\t\tactiveAnnotation: SessionWSImage.calculateNewActiveIndex(\n\t\t\t\t\t\t\t\t\t\t\tcurrentIndex,\n\t\t\t\t\t\t\t\t\t\t\tsessionWSImage,\n\t\t\t\t\t\t\t\t\t\t\tprovokingAction,\n\t\t\t\t\t\t\t\t\t\t\tsettings\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\trenderAnnotationTable: true,\n\t\t\t\t\t\t\t\t\t\tsessionsTileSelection: sessionsTileSelection,\n\t\t\t\t\t\t\t\t\t\tisSavingAnnotation: false\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t} else if (matchingClass) {\n\t\t\t\t\t\t\tawait this.saveAndFinalizeAnnotation(\n\t\t\t\t\t\t\t\twsiApp,\n\t\t\t\t\t\t\t\tsessionWSImage,\n\t\t\t\t\t\t\t\ttileSelection,\n\t\t\t\t\t\t\t\tmatchingClass.id,\n\t\t\t\t\t\t\t\taiProjectID,\n\t\t\t\t\t\t\t\tcurrentIndex\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (error: any) {\n\t\t\t\t\t\tconsole.trace(\"Couldn't successfully flag tile:\", error)\n\t\t\t\t\t}\n\n\t\t\t\t\twsiApp.app.dispatch({\n\t\t\t\t\t\ttype: 'plot_edit',\n\t\t\t\t\t\tid: wsiApp.id,\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tsettings: {\n\t\t\t\t\t\t\t\tisSavingAnnotation: false,\n\t\t\t\t\t\t\t\tchangeTrigger: Date.now(),\n\t\t\t\t\t\t\t\trenderWSIViewer: false\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\t// New Enter key branch: check for prediction uncertainty and save annotation\n\t\t\t\tif (event.key === 'Enter') {\n\t\t\t\t\t// Only proceed if this selection has a prediction uncertainty\n\t\t\t\t\tif (!checkSelectionType(tileSelections[currentIndex], SelectionPrefixes.Prediction)) {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tconst predictions = sessionWSImage?.predictions\n\t\t\t\t\tif (!predictions || !predictions[currentIndex]) return\n\n\t\t\t\t\t// Find class by prediction label\n\t\t\t\t\tconst matchingClass = sessionWSImage?.classes?.find(c => c.label === predictions[currentIndex].class)\n\n\t\t\t\t\tif (!matchingClass) {\n\t\t\t\t\t\t// Nothing to annotate against\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\n\t\t\t\t\t// Draw annotation visually\n\t\t\t\t\tthis.addAnnotation(vectorLayer!, tileSelections, currentIndex, matchingClass.color, settings)\n\n\t\t\t\t\tconst selectedClassId = matchingClass.id\n\t\t\t\t\tconst tileSelection = tileSelections[currentIndex]\n\t\t\t\t\ttileSelection.id = createSelectionID(SelectionPrefixes.Annotation, tileSelection.zoomCoordinates)\n\t\t\t\t\t// Persist and finalize via helper\n\t\t\t\t\tawait this.saveAndFinalizeAnnotation(\n\t\t\t\t\t\twsiApp,\n\t\t\t\t\t\tsessionWSImage,\n\t\t\t\t\t\ttileSelections[currentIndex],\n\t\t\t\t\t\tselectedClassId,\n\t\t\t\t\t\taiProjectID,\n\t\t\t\t\t\tcurrentIndex\n\t\t\t\t\t)\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tif (shortcuts.includes(event.code) && !settings.isSavingAnnotation) {\n\t\t\t\t\t// Resolve class either by key_shortcut\n\t\t\t\t\tconst matchingClass = sessionWSImage?.classes?.find(c => c.key_shortcut === event.code)\n\n\t\t\t\t\tif (!matchingClass) return\n\t\t\t\t\t// TODO: Issue where if you press shortcuts too fast, annotation table doesnt get updated with correct class\n\t\t\t\t\t//My guess is that if you press this fast enough, saveAnnotation doesnt update fast enough\n\t\t\t\t\twsiApp.app.dispatch({\n\t\t\t\t\t\ttype: 'plot_edit',\n\t\t\t\t\t\tid: wsiApp.id,\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tsettings: {\n\t\t\t\t\t\t\t\tisSavingAnnotation: true,\n\t\t\t\t\t\t\t\tchangeTrigger: Date.now(),\n\t\t\t\t\t\t\t\trenderWSIViewer: false\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\tthis.toggleSpinner(true)\n\t\t\t\t\t// Visual add\n\t\t\t\t\tthis.addAnnotation(vectorLayer!, tileSelections, currentIndex, matchingClass.color, settings)\n\n\t\t\t\t\tconst selectedClassId = matchingClass.id\n\t\t\t\t\tconst tileSelection = tileSelections[currentIndex]\n\t\t\t\t\ttileSelection.id = createSelectionID(SelectionPrefixes.Annotation, tileSelection.zoomCoordinates)\n\t\t\t\t\ttileSelection.flag = FlagStatus.Normal\n\t\t\t\t\tconst source: VectorSource<Feature<Geometry>> | null = vectorLayer.getSource()\n\t\t\t\t\tconst oldStar = source?.getFeatureById(createFeatureID(FeaturePrefixes.Star, tileSelection.zoomCoordinates))\n\t\t\t\t\tif (oldStar) {\n\t\t\t\t\t\tsource?.removeFeature(oldStar)\n\t\t\t\t\t}\n\t\t\t\t\t// Persist and finalize via helper\n\t\t\t\t\tawait this.saveAndFinalizeAnnotation(\n\t\t\t\t\t\twsiApp,\n\t\t\t\t\t\tsessionWSImage,\n\t\t\t\t\t\ttileSelection,\n\t\t\t\t\t\tselectedClassId,\n\t\t\t\t\t\taiProjectID,\n\t\t\t\t\t\tcurrentIndex\n\t\t\t\t\t)\n\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tthis.viewerClickListener = (\n\t\t\tcoordinateX: number,\n\t\t\tcoordinateY: number,\n\t\t\tsessionWSImage: SessionWSImage,\n\t\t\tmap: OLMap\n\t\t) => {\n\t\t\tconst state = wsiApp.app.getState()\n\t\t\tconst settings: Settings = state.plots.find(p => p.id === wsiApp.id).settings\n\t\t\tconst sessionsTileSelection = settings.sessionsTileSelection\n\n\t\t\tsessionWSImage.sessionsTileSelections = sessionsTileSelection\n\n\t\t\tconst tileSelections = SessionWSImage.getUnfilteredTileSelections(sessionWSImage)\n\n\t\t\t// Check if click falls inside an existing annotation\n\t\t\tconst selectedTileSelection = tileSelections.find(tileSelection => {\n\t\t\t\tconst [x0, y0] = tileSelection.zoomCoordinates\n\t\t\t\tconst x1 = x0 + settings.tileSize\n\t\t\t\tconst y1 = y0 + settings.tileSize\n\t\t\t\treturn coordinateX >= x0 && coordinateX < x1 && coordinateY >= y0 && coordinateY < y1\n\t\t\t})\n\t\t\t// Need to have solution for clicking on skipped tiles. Maybe show skipped or just dont move and show warning\n\t\t\tif (selectedTileSelection !== undefined) {\n\t\t\t\tconst isSkipped = selectedTileSelection.flag === FlagStatus.Skipped\n\t\t\t\tconst isFlagged = selectedTileSelection.flag === FlagStatus.Flagged\n\t\t\t\tif (isSkipped && !settings.renderSkipped) {\n\t\t\t\t\tconst newSettings = {\n\t\t\t\t\t\trenderWSIViewer: false,\n\t\t\t\t\t\trenderAnnotationTable: true,\n\t\t\t\t\t\trenderSkipped: true,\n\t\t\t\t\t\trenderOnlyFlagged: false,\n\t\t\t\t\t\tchangeTrigger: Date.now(),\n\t\t\t\t\t\tactiveAnnotation: 0,\n\t\t\t\t\t\tsessionsTileSelection: [...sessionsTileSelection]\n\t\t\t\t\t} as Settings\n\t\t\t\t\tconst tilesWithSkipped = SessionWSImage.getTileSelections(sessionWSImage, newSettings) || []\n\t\t\t\t\tconst newIndex = tilesWithSkipped.findIndex(ts => ts.id === selectedTileSelection.id)\n\t\t\t\t\twsiApp.app.dispatch({\n\t\t\t\t\t\ttype: 'plot_edit',\n\t\t\t\t\t\tid: wsiApp.id,\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tsettings: { ...newSettings, activeAnnotation: newIndex !== -1 ? newIndex : 0 }\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t} else if (!isFlagged && settings.renderOnlyFlagged) {\n\t\t\t\t\tconst newSettings = {\n\t\t\t\t\t\trenderWSIViewer: false,\n\t\t\t\t\t\trenderAnnotationTable: true,\n\t\t\t\t\t\trenderOnlyFlagged: false,\n\t\t\t\t\t\tchangeTrigger: Date.now(),\n\t\t\t\t\t\tactiveAnnotation: 0,\n\t\t\t\t\t\tsessionsTileSelection: [...sessionsTileSelection]\n\t\t\t\t\t} as Settings\n\t\t\t\t\tconst tileSelections = SessionWSImage.getTileSelections(sessionWSImage, newSettings) || []\n\t\t\t\t\tconst newIndex = tileSelections.findIndex(ts => ts.id === selectedTileSelection.id)\n\n\t\t\t\t\twsiApp.app.dispatch({\n\t\t\t\t\t\ttype: 'plot_edit',\n\t\t\t\t\t\tid: wsiApp.id,\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tsettings: { ...newSettings, activeAnnotation: newIndex !== -1 ? newIndex : 0 }\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t} else {\n\t\t\t\t\tconst nextIndex = SessionWSImage.getTileSelections(sessionWSImage, settings).findIndex(\n\t\t\t\t\t\tts => ts.id === selectedTileSelection.id\n\t\t\t\t\t)\n\t\t\t\t\twsiApp.app.dispatch({\n\t\t\t\t\t\ttype: 'plot_edit',\n\t\t\t\t\t\tid: wsiApp.id,\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tsettings: {\n\t\t\t\t\t\t\t\trenderWSIViewer: false,\n\t\t\t\t\t\t\t\trenderAnnotationTable: true,\n\t\t\t\t\t\t\t\tchangeTrigger: Date.now(),\n\t\t\t\t\t\t\t\tactiveAnnotation: nextIndex !== -1 ? nextIndex : 0,\n\t\t\t\t\t\t\t\tsessionsTileSelection: [...sessionsTileSelection]\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// Create new tile section\n\t\t\tconst newTileSelection: TileSelection = {\n\t\t\t\tzoomCoordinates: [coordinateX, coordinateY],\n\t\t\t\tclass: '',\n\t\t\t\tflag: FlagStatus.Normal,\n\t\t\t\tid: createSelectionID(SelectionPrefixes.TileSelection, [coordinateX, coordinateY]),\n\t\t\t\ttimestamp: new Date().toISOString()\n\t\t\t}\n\n\t\t\tconst vectorLayer = map\n\t\t\t\t.getLayers()\n\t\t\t\t.getArray()\n\t\t\t\t.find(l => l instanceof VectorLayer)!\n\n\t\t\tconst source: VectorSource<Feature<Geometry>> | null = vectorLayer.getSource()\n\n\t\t\tconst topLeft: [number, number] = [coordinateX, -coordinateY]\n\t\t\tconst borderFeature = this.createBorderFeature(\n\t\t\t\ttopLeft,\n\t\t\t\tsettings.tileSize,\n\t\t\t\t30,\n\t\t\t\tsettings.selectedPatchBorderColor,\n\t\t\t\tcreateFeatureID(FeaturePrefixes.PredBorder, newTileSelection.zoomCoordinates)\n\t\t\t)\n\t\t\t//Add border feature\n\n\t\t\tsource?.addFeature(borderFeature)\n\n\t\t\twsiApp.app.dispatch({\n\t\t\t\ttype: 'plot_edit',\n\t\t\t\tid: wsiApp.id,\n\t\t\t\tconfig: {\n\t\t\t\t\tsettings: {\n\t\t\t\t\t\trenderWSIViewer: false,\n\t\t\t\t\t\trenderAnnotationTable: true,\n\t\t\t\t\t\tactiveAnnotation: 0,\n\t\t\t\t\t\tchangeTrigger: Date.now(),\n\t\t\t\t\t\tsessionsTileSelection: [newTileSelection, ...sessionsTileSelection]\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\tthis.onRetrainModelClicked = async (genome: string, dslabel: string, projectId: string) => {\n\t\t\ttry {\n\t\t\t\tawait dofetch3('/aiProjectTrainModel', {\n\t\t\t\t\tbody: {\n\t\t\t\t\t\tgenome,\n\t\t\t\t\t\tdslabel,\n\t\t\t\t\t\tprojectId\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\tclearServerDataCache()\n\n\t\t\t\twsiApp.app.dispatch({\n\t\t\t\t\ttype: 'plot_edit',\n\t\t\t\t\tid: opts.id,\n\t\t\t\t\tconfig: {\n\t\t\t\t\t\tsettings: {\n\t\t\t\t\t\t\trenderWSIViewer: true,\n\t\t\t\t\t\t\trenderAnnotationTable: true,\n\t\t\t\t\t\t\tchangeTrigger: Date.now()\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t} catch (e: any) {\n\t\t\t\tthis.toggleLoadingDiv(false)\n\t\t\t\twsiApp.app.printError('Error retraining model: ' + (e.message || e))\n\t\t\t}\n\t\t}\n\n\t\tthis.toggleLoadingDiv = (show: boolean) => {\n\t\t\tif (show) {\n\t\t\t\twsiApp.dom.loadingDiv.selectAll('*').remove()\n\t\t\t\twsiApp.dom.loadingDiv\n\t\t\t\t\t.style('display', 'block')\n\t\t\t\t\t.append('div')\n\t\t\t\t\t.style('position', 'relative')\n\t\t\t\t\t.style('top', '50%')\n\t\t\t\t\t.append('span')\n\t\t\t\t\t.attr('class', 'sjpp-spinner')\n\n\t\t\t\twsiApp.dom.mapHolder.style('display', 'none')\n\t\t\t\twsiApp.dom.annotationsHolder.style('display', 'none')\n\t\t\t\twsiApp.dom.legendHolder.style('display', 'none')\n\t\t\t} else {\n\t\t\t\twsiApp.dom.loadingDiv.style('display', 'none')\n\t\t\t\twsiApp.dom.mapHolder.style('display', 'block')\n\t\t\t\twsiApp.dom.annotationsHolder.style('display', 'inline-block')\n\t\t\t\twsiApp.dom.legendHolder.style('display', 'inline-block')\n\t\t\t}\n\t\t}\n\n\t\tthis.toggleThumbnails = (start: number, doneRendering: boolean = false) => {\n\t\t\tif (doneRendering) {\n\t\t\t\twsiApp.app.save({\n\t\t\t\t\ttype: 'plot_edit',\n\t\t\t\t\tid: opts.id,\n\t\t\t\t\tconfig: {\n\t\t\t\t\t\tsettings: {\n\t\t\t\t\t\t\tisChangingImages: false\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\twsiApp.app.dispatch({\n\t\t\t\ttype: 'plot_edit',\n\t\t\t\tid: opts.id,\n\t\t\t\tconfig: {\n\t\t\t\t\tsettings: {\n\t\t\t\t\t\tthumbnailRangeStart: start,\n\t\t\t\t\t\tdisplayedImageIndex: start,\n\t\t\t\t\t\trenderWSIViewer: true,\n\t\t\t\t\t\tisChangingImages: true\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t\tthis.toggleSpinner = (spin: boolean) => {\n\t\t\tif (spin) {\n\t\t\t\twsiApp.dom.holder.selectAll('*').style('cursor', 'wait')\n\t\t\t} else {\n\t\t\t\twsiApp.dom.holder.selectAll('*').style('cursor', 'default')\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate addAnnotation(\n\t\tvectorLayer: VectorLayer,\n\t\ttileSelections: TileSelection[],\n\t\tcurrentIndex: number,\n\t\tcolor: any,\n\t\tsettings: Settings\n\t) {\n\t\tconst source: VectorSource<Feature<Geometry>> | null = vectorLayer.getSource()\n\t\tconst tileSelection = tileSelections[currentIndex]\n\t\t//Remove any previous feature with the same ID\n\t\tconst feature = source?.getFeatureById(createFeatureID(FeaturePrefixes.Square, tileSelection.zoomCoordinates))\n\t\tif (feature) {\n\t\t\tsource?.removeFeature(feature)\n\t\t}\n\n\t\tconst topLeft: [number, number] = [tileSelection.zoomCoordinates[0], -tileSelection.zoomCoordinates[1]]\n\n\t\tconst squareCoords = [\n\t\t\t[\n\t\t\t\ttopLeft,\n\t\t\t\t[topLeft[0] + settings.tileSize, topLeft[1]],\n\t\t\t\t[topLeft[0] + settings.tileSize, topLeft[1] - settings.tileSize],\n\t\t\t\t[topLeft[0], topLeft[1] - settings.tileSize]\n\t\t\t]\n\t\t]\n\t\tconst square = new Feature({\n\t\t\tgeometry: new Polygon([squareCoords[0]]),\n\t\t\tproperties: {\n\t\t\t\tisLocked: false\n\t\t\t}\n\t\t})\n\n\t\tsquare.setId(createFeatureID(FeaturePrefixes.Square, tileSelection.zoomCoordinates))\n\n\t\tsquare.setStyle(\n\t\t\tnew Style({\n\t\t\t\tfill: new Fill({ color: color }),\n\t\t\t\tstroke: new Stroke({ color: color, width: 2 })\n\t\t\t})\n\t\t)\n\t\tsource?.addFeature(square)\n\n\t\tthis.addAnnotationBorder(\n\t\t\tsource,\n\t\t\ttopLeft,\n\t\t\ttileSelection.zoomCoordinates,\n\t\t\tsettings.annotatedPatchBorderColor,\n\t\t\tsettings.tileSize\n\t\t)\n\t}\n\n\tprivate async deleteAnnotation(\n\t\twsiApp: any,\n\t\tvectorLayer: VectorLayer<any, any>,\n\t\tsessionWSImage: SessionWSImage,\n\t\tcurrentIndex: number,\n\t\tclassID: number | undefined\n\t) {\n\t\tconst state = wsiApp.app.getState()\n\t\tconst settings: Settings = state.plots.find(p => p.id === wsiApp.id).settings\n\t\tconst tileSelections: TileSelection[] = SessionWSImage.getTileSelections(sessionWSImage, settings)\n\t\tconst tileSelection = tileSelections[currentIndex]\n\t\tif (!tileSelection) {\n\t\t\tconsole.warn('deleteAnnotation called with no tileSelection for currentIndex', {\n\t\t\t\tcurrentIndex,\n\t\t\t\ttileSelectionsLength: tileSelections.length\n\t\t\t})\n\t\t\treturn\n\t\t}\n\t\tconst source: VectorSource<Feature<Geometry>> | null = vectorLayer.getSource()\n\n\t\t//Remove annotated square\n\t\tconst annotationFeature = source?.getFeatureById(\n\t\t\tcreateFeatureID(FeaturePrefixes.Square, tileSelection.zoomCoordinates)\n\t\t)\n\t\tif (annotationFeature) {\n\t\t\tsource?.removeFeature(annotationFeature)\n\t\t}\n\t\t// Remove active border\n\t\tconst activeBorderFeature = source?.getFeatureById('active-border')\n\t\tif (activeBorderFeature) {\n\t\t\tsource?.removeFeature(activeBorderFeature)\n\t\t}\n\t\t// Remove prediction border\n\t\tconst predictionBorderFeature = source?.getFeatureById(\n\t\t\tcreateFeatureID(FeaturePrefixes.PredBorder, tileSelection.zoomCoordinates)\n\t\t)\n\t\tif (predictionBorderFeature) {\n\t\t\tsource?.removeFeature(predictionBorderFeature)\n\t\t}\n\n\t\t// Remove annotation border\n\t\tconst annotationBorderFeat = source?.getFeatureById(\n\t\t\tcreateFeatureID(FeaturePrefixes.Border, tileSelection.zoomCoordinates)\n\t\t)\n\t\tif (annotationBorderFeat) {\n\t\t\tsource?.removeFeature(annotationBorderFeat)\n\t\t}\n\n\t\tconst starFeat = source?.getFeatureById(createFeatureID(FeaturePrefixes.Star, tileSelection.zoomCoordinates))\n\t\tif (starFeat) {\n\t\t\tsource?.removeFeature(starFeat)\n\t\t}\n\t\tconst nextIndex = SessionWSImage.calculateNewActiveIndex(currentIndex, sessionWSImage, 'delete', settings)\n\t\tif (SessionWSImage.isSessionTileSelection(tileSelection, sessionWSImage)) {\n\t\t\tconst sessionsTileSelection = SessionWSImage.removeTileSelection(tileSelection, sessionWSImage)\n\t\t\twsiApp.app.dispatch({\n\t\t\t\ttype: 'plot_edit',\n\t\t\t\tid: wsiApp.id,\n\t\t\t\tconfig: {\n\t\t\t\t\tsettings: {\n\t\t\t\t\t\trenderWSIViewer: false,\n\t\t\t\t\t\trenderAnnotationTable: true,\n\t\t\t\t\t\tactiveAnnotation: nextIndex,\n\t\t\t\t\t\tchangeTrigger: Date.now(),\n\t\t\t\t\t\tsessionsTileSelection: sessionsTileSelection\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\treturn\n\t\t}\n\t\tif (classID === undefined) {\n\t\t\tconsole.warn('deleteAnnotation called but classID is undefined for tileSelection', {\n\t\t\t\ttileSelection\n\t\t\t})\n\t\t\treturn\n\t\t}\n\t\tconst prediction = tileSelections[currentIndex]\n\t\tprediction.flag = FlagStatus.Deleted\n\t\tconst body: DeleteWSITileSelectionRequest = {\n\t\t\tgenome: state.vocab.genome,\n\t\t\tdslabel: state.vocab.dslabel,\n\t\t\tprojectId: state.aiProjectID,\n\t\t\tclassID: classID,\n\t\t\ttileSelection: tileSelections[currentIndex],\n\t\t\twsimage: sessionWSImage.filename\n\t\t}\n\n\t\ttry {\n\t\t\tconst response: DeleteWSITileSelectionResponse = await dofetch3('deleteWSITileSelection', {\n\t\t\t\tmethod: 'DELETE',\n\t\t\t\tbody\n\t\t\t})\n\t\t\tif (response.status === 'error' && response.error === 'logout') {\n\t\t\t\twsiApp.app.dispatch({\n\t\t\t\t\ttype: 'plot_edit',\n\t\t\t\t\tid: wsiApp.id,\n\t\t\t\t\tconfig: {\n\t\t\t\t\t\tsettings: {\n\t\t\t\t\t\t\tloggedOut: true\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\treturn\n\t\t\t}\n\t\t} catch (e: any) {\n\t\t\tconsole.error('Error in deleteWSITileSelection request:', e.message || e)\n\t\t}\n\t\t// TODO find another way to clear server cache\n\t\tclearServerDataCache()\n\t\tconst sessionsTileSelection: TileSelection[] = sessionWSImage.sessionsTileSelections ?? []\n\t\twsiApp.app.dispatch({\n\t\t\ttype: 'plot_edit',\n\t\t\tid: wsiApp.id,\n\t\t\tconfig: {\n\t\t\t\tsettings: {\n\t\t\t\t\trenderWSIViewer: false,\n\t\t\t\t\trenderAnnotationTable: true,\n\t\t\t\t\tactiveAnnotation: nextIndex,\n\t\t\t\t\tchangeTrigger: Date.now(),\n\t\t\t\t\tsessionsTileSelection: sessionsTileSelection\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\tprivate addActiveBorder(vectorLayer: VectorLayer, zoomCoordinates: [number, number], color: any, tileSize: number) {\n\t\tconst source: VectorSource<Feature<Geometry>> | null = vectorLayer.getSource()\n\n\t\t// Remove any previous border\n\t\tconst existingFeature = source?.getFeatureById('active-border')\n\t\tif (existingFeature) {\n\t\t\tsource?.removeFeature(existingFeature)\n\t\t}\n\n\t\tconst feature = this.createBorderFeature(zoomCoordinates, tileSize, 50, color, 'active-border')\n\t\tsource?.addFeature(feature)\n\t}\n\n\tprivate addAnnotationBorder(source, topLeft, zoomCoordinates: [number, number], color: string, tileSize: number) {\n\t\tconst existingFeature = source?.getFeatureById(createFeatureID(FeaturePrefixes.PredBorder, zoomCoordinates))\n\t\tif (existingFeature) {\n\t\t\tsource?.removeFeature(existingFeature)\n\t\t}\n\t\tconst annotatedBorderFeat = this.createBorderFeature(\n\t\t\ttopLeft,\n\t\t\ttileSize,\n\t\t\t15,\n\t\t\tcolor,\n\t\t\tcreateFeatureID(FeaturePrefixes.Border, zoomCoordinates)\n\t\t)\n\t\tsource?.addFeature(annotatedBorderFeat)\n\t}\n\n\tprivate createBorderFeature(\n\t\ttopLeft: [number, number],\n\t\ttileSize: number,\n\t\tborderWidth: number,\n\t\tcolor: any,\n\t\tfeatureId?: string\n\t): Feature<Geometry> {\n\t\tconst borderCoords = [\n\t\t\t[\n\t\t\t\ttopLeft,\n\t\t\t\t[topLeft[0] + tileSize, topLeft[1]],\n\t\t\t\t[topLeft[0] + tileSize, topLeft[1] - tileSize],\n\t\t\t\t[topLeft[0], topLeft[1] - tileSize],\n\t\t\t\ttopLeft\n\t\t\t],\n\t\t\t[\n\t\t\t\t[topLeft[0] + borderWidth, topLeft[1] - borderWidth],\n\t\t\t\t[topLeft[0] + tileSize - borderWidth, topLeft[1] - borderWidth],\n\t\t\t\t[topLeft[0] + tileSize - borderWidth, topLeft[1] - tileSize + borderWidth],\n\t\t\t\t[topLeft[0] + borderWidth, topLeft[1] - tileSize + borderWidth],\n\t\t\t\t[topLeft[0] + borderWidth, topLeft[1] - borderWidth]\n\t\t\t]\n\t\t]\n\n\t\tconst feature = new Feature({\n\t\t\tgeometry: new Polygon(borderCoords),\n\t\t\tproperties: {\n\t\t\t\tisLocked: false\n\t\t\t}\n\t\t})\n\n\t\tif (featureId) {\n\t\t\tfeature.setId(featureId)\n\t\t}\n\n\t\tfeature.setStyle(\n\t\t\tnew Style({\n\t\t\t\tfill: new Fill({ color }),\n\t\t\t\tstroke: new Stroke({ color, width: 2 })\n\t\t\t})\n\t\t)\n\n\t\treturn feature\n\t}\n\n\tprivate async saveAndFinalizeAnnotation(\n\t\twsiApp: any,\n\t\tsessionWSImage: SessionWSImage,\n\t\ttileSelection: TileSelection,\n\t\tselectedClassId: number | undefined,\n\t\taiProjectID: number,\n\t\tcurrentIndex: number\n\t) {\n\t\tconst state = wsiApp.app.getState()\n\t\tconst body: SaveWSIAnnotationRequest = {\n\t\t\tgenome: state.vocab.genome,\n\t\t\tdslabel: state.vocab.dslabel,\n\t\t\ttileSelection: tileSelection,\n\t\t\tclassId: selectedClassId!,\n\t\t\tprojectId: aiProjectID,\n\t\t\twsimage: sessionWSImage.filename\n\t\t}\n\t\ttry {\n\t\t\t// TODO add UI rollback\n\t\t\tconst response: SaveWSIAnnotationResponse = await dofetch3('saveWSIAnnotation', { method: 'POST', body })\n\t\t\t// TODO find another way to clear server cache\n\t\t\tif (response.status === 'error' && response.error === 'logout') {\n\t\t\t\twsiApp.app.dispatch({\n\t\t\t\t\ttype: 'plot_edit',\n\t\t\t\t\tid: wsiApp.id,\n\t\t\t\t\tconfig: {\n\t\t\t\t\t\tsettings: {\n\t\t\t\t\t\t\tloggedOut: true\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\treturn\n\t\t\t}\n\t\t\tclearServerDataCache()\n\t\t} catch (e) {\n\t\t\tconsole.error('Error in saveWSIAnnotation request:', e)\n\t\t}\n\n\t\tSessionWSImage.removeTileSelection(tileSelection, sessionWSImage)\n\t\tconst provokingAction =\n\t\t\ttileSelection.flag === FlagStatus.Flagged\n\t\t\t\t? 'flagging'\n\t\t\t\t: tileSelection.flag === FlagStatus.Skipped\n\t\t\t\t? 'skipping'\n\t\t\t\t: 'annotation'\n\t\tconst sessionsTileSelection: TileSelection[] = sessionWSImage.sessionsTileSelections ?? []\n\t\t// Should only move to next annotation if save is successful, I think save and delete routes should be bool promises\n\t\twsiApp.app.dispatch({\n\t\t\ttype: 'plot_edit',\n\t\t\tid: wsiApp.id,\n\t\t\tconfig: {\n\t\t\t\tsettings: {\n\t\t\t\t\trenderWSIViewer: false,\n\t\t\t\t\trenderAnnotationTable: true,\n\t\t\t\t\tchangeTrigger: Date.now(),\n\t\t\t\t\tactiveAnnotation: SessionWSImage.calculateNewActiveIndex(\n\t\t\t\t\t\tcurrentIndex,\n\t\t\t\t\t\tsessionWSImage,\n\t\t\t\t\t\tprovokingAction,\n\t\t\t\t\t\tstate.plots.find(p => p.id === wsiApp.id).settings\n\t\t\t\t\t),\n\t\t\t\t\tisSavingAnnotation: false,\n\t\t\t\t\tsessionsTileSelection: sessionsTileSelection\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n}\n", "/**\n * @module ol/render/VectorContext\n */\n\n/**\n * @classdesc\n * Context for drawing geometries. A vector context is available on render\n * events and does not need to be constructed directly.\n * @api\n */\nclass VectorContext {\n /**\n * Render a geometry with a custom renderer.\n *\n * @param {import(\"../geom/SimpleGeometry.js\").default} geometry Geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {Function} renderer Renderer.\n * @param {Function} hitDetectionRenderer Renderer.\n * @param {number} [index] Render order index.\n */\n drawCustom(geometry, feature, renderer, hitDetectionRenderer, index) {}\n\n /**\n * Render a geometry.\n *\n * @param {import(\"../geom/Geometry.js\").default} geometry The geometry to render.\n */\n drawGeometry(geometry) {}\n\n /**\n * Set the rendering style.\n *\n * @param {import(\"../style/Style.js\").default} style The rendering style.\n */\n setStyle(style) {}\n\n /**\n * @param {import(\"../geom/Circle.js\").default} circleGeometry Circle geometry.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {number} [index] Render order index.\n */\n drawCircle(circleGeometry, feature, index) {}\n\n /**\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {number} [index] Render order index.\n */\n drawFeature(feature, style, index) {}\n\n /**\n * @param {import(\"../geom/GeometryCollection.js\").default} geometryCollectionGeometry Geometry collection.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {number} [index] Render order index.\n */\n drawGeometryCollection(geometryCollectionGeometry, feature, index) {}\n\n /**\n * @param {import(\"../geom/LineString.js\").default|import(\"./Feature.js\").default} lineStringGeometry Line string geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n */\n drawLineString(lineStringGeometry, feature, index) {}\n\n /**\n * @param {import(\"../geom/MultiLineString.js\").default|import(\"./Feature.js\").default} multiLineStringGeometry MultiLineString geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n */\n drawMultiLineString(multiLineStringGeometry, feature, index) {}\n\n /**\n * @param {import(\"../geom/MultiPoint.js\").default|import(\"./Feature.js\").default} multiPointGeometry MultiPoint geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n */\n drawMultiPoint(multiPointGeometry, feature, index) {}\n\n /**\n * @param {import(\"../geom/MultiPolygon.js\").default} multiPolygonGeometry MultiPolygon geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n */\n drawMultiPolygon(multiPolygonGeometry, feature, index) {}\n\n /**\n * @param {import(\"../geom/Point.js\").default|import(\"./Feature.js\").default} pointGeometry Point geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n */\n drawPoint(pointGeometry, feature, index) {}\n\n /**\n * @param {import(\"../geom/Polygon.js\").default|import(\"./Feature.js\").default} polygonGeometry Polygon geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n */\n drawPolygon(polygonGeometry, feature, index) {}\n\n /**\n * @param {import(\"../geom/SimpleGeometry.js\").default|import(\"./Feature.js\").default} geometry Geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n */\n drawText(geometry, feature, index) {}\n\n /**\n * @param {import(\"../style/Fill.js\").default} fillStyle Fill style.\n * @param {import(\"../style/Stroke.js\").default} strokeStyle Stroke style.\n */\n setFillStrokeStyle(fillStyle, strokeStyle) {}\n\n /**\n * @param {import(\"../style/Image.js\").default} imageStyle Image style.\n * @param {import(\"../render/canvas.js\").DeclutterImageWithText} [declutterImageWithText] Shared data for combined decluttering with a text style.\n */\n setImageStyle(imageStyle, declutterImageWithText) {}\n\n /**\n * @param {import(\"../style/Text.js\").default} textStyle Text style.\n * @param {import(\"../render/canvas.js\").DeclutterImageWithText} [declutterImageWithText] Shared data for combined decluttering with an image style.\n */\n setTextStyle(textStyle, declutterImageWithText) {}\n}\n\nexport default VectorContext;\n", "/**\n * @module ol/render/canvas/Instruction\n */\n\n/**\n * @enum {number}\n */\nconst Instruction = {\n BEGIN_GEOMETRY: 0,\n BEGIN_PATH: 1,\n CIRCLE: 2,\n CLOSE_PATH: 3,\n CUSTOM: 4,\n DRAW_CHARS: 5,\n DRAW_IMAGE: 6,\n END_GEOMETRY: 7,\n FILL: 8,\n MOVE_TO_LINE_TO: 9,\n SET_FILL_STYLE: 10,\n SET_STROKE_STYLE: 11,\n STROKE: 12,\n};\n\n/**\n * @type {Array<Instruction>}\n */\nexport const fillInstruction = [Instruction.FILL];\n\n/**\n * @type {Array<Instruction>}\n */\nexport const strokeInstruction = [Instruction.STROKE];\n\n/**\n * @type {Array<Instruction>}\n */\nexport const beginPathInstruction = [Instruction.BEGIN_PATH];\n\n/**\n * @type {Array<Instruction>}\n */\nexport const closePathInstruction = [Instruction.CLOSE_PATH];\n\nexport default Instruction;\n", "/**\n * @module ol/render/canvas/Builder\n */\nimport {equals, reverseSubArray} from '../../array.js';\nimport {asColorLike} from '../../colorlike.js';\nimport Relationship from '../../extent/Relationship.js';\nimport {\n buffer,\n clone,\n containsCoordinate,\n coordinateRelationship,\n} from '../../extent.js';\nimport {\n inflateCoordinates,\n inflateCoordinatesArray,\n inflateMultiCoordinatesArray,\n} from '../../geom/flat/inflate.js';\nimport VectorContext from '../VectorContext.js';\nimport {\n defaultFillStyle,\n defaultLineCap,\n defaultLineDash,\n defaultLineDashOffset,\n defaultLineJoin,\n defaultLineWidth,\n defaultMiterLimit,\n defaultStrokeOffset,\n defaultStrokeStyle,\n} from '../canvas.js';\nimport CanvasInstruction from './Instruction.js';\n\nclass CanvasBuilder extends VectorContext {\n /**\n * @param {number} tolerance Tolerance.\n * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n */\n constructor(tolerance, maxExtent, resolution, pixelRatio) {\n super();\n\n /**\n * @protected\n * @type {number}\n */\n this.tolerance = tolerance;\n\n /**\n * @protected\n * @const\n * @type {import(\"../../extent.js\").Extent}\n */\n this.maxExtent = maxExtent;\n\n /**\n * @protected\n * @type {number}\n */\n this.pixelRatio = pixelRatio;\n\n /**\n * @protected\n * @type {number}\n */\n this.maxLineWidth = 0;\n\n /**\n * @protected\n * @const\n * @type {number}\n */\n this.resolution = resolution;\n\n /**\n * @private\n * @type {Array<*>}\n */\n this.beginGeometryInstruction1_ = null;\n\n /**\n * @private\n * @type {Array<*>}\n */\n this.beginGeometryInstruction2_ = null;\n\n /**\n * @private\n * @type {import(\"../../extent.js\").Extent}\n */\n this.bufferedMaxExtent_ = null;\n\n /**\n * @protected\n * @type {Array<*>}\n */\n this.instructions = [];\n\n /**\n * @protected\n * @type {Array<number>}\n */\n this.coordinates = [];\n\n /**\n * @private\n * @type {import(\"../../coordinate.js\").Coordinate}\n */\n this.tmpCoordinate_ = [];\n\n /**\n * @protected\n * @type {Array<*>}\n */\n this.hitDetectionInstructions = [];\n\n /**\n * @protected\n * @type {import(\"../canvas.js\").FillStrokeState}\n */\n this.state = /** @type {import(\"../canvas.js\").FillStrokeState} */ ({});\n }\n\n /**\n * @protected\n * @param {Array<number>} dashArray Dash array.\n * @return {Array<number>} Dash array with pixel ratio applied\n */\n applyPixelRatio(dashArray) {\n const pixelRatio = this.pixelRatio;\n return pixelRatio == 1\n ? dashArray\n : dashArray.map(function (dash) {\n return dash * pixelRatio;\n });\n }\n\n /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} stride Stride.\n * @protected\n * @return {number} My end\n */\n appendFlatPointCoordinates(flatCoordinates, stride) {\n const extent = this.getBufferedMaxExtent();\n const tmpCoord = this.tmpCoordinate_;\n const coordinates = this.coordinates;\n let myEnd = coordinates.length;\n for (let i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n tmpCoord[0] = flatCoordinates[i];\n tmpCoord[1] = flatCoordinates[i + 1];\n if (containsCoordinate(extent, tmpCoord)) {\n coordinates[myEnd++] = tmpCoord[0];\n coordinates[myEnd++] = tmpCoord[1];\n }\n }\n return myEnd;\n }\n\n /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {boolean} closed Last input coordinate equals first.\n * @param {boolean} skipFirst Skip first coordinate.\n * @protected\n * @return {number} My end.\n */\n appendFlatLineCoordinates(\n flatCoordinates,\n offset,\n end,\n stride,\n closed,\n skipFirst,\n ) {\n const coordinates = this.coordinates;\n let myEnd = coordinates.length;\n const extent = this.getBufferedMaxExtent();\n if (skipFirst) {\n offset += stride;\n }\n let lastXCoord = flatCoordinates[offset];\n let lastYCoord = flatCoordinates[offset + 1];\n const nextCoord = this.tmpCoordinate_;\n let skipped = true;\n\n let i, lastRel, nextRel;\n for (i = offset + stride; i < end; i += stride) {\n nextCoord[0] = flatCoordinates[i];\n nextCoord[1] = flatCoordinates[i + 1];\n nextRel = coordinateRelationship(extent, nextCoord);\n if (nextRel !== lastRel) {\n if (skipped) {\n coordinates[myEnd++] = lastXCoord;\n coordinates[myEnd++] = lastYCoord;\n skipped = false;\n }\n coordinates[myEnd++] = nextCoord[0];\n coordinates[myEnd++] = nextCoord[1];\n } else if (nextRel === Relationship.INTERSECTING) {\n coordinates[myEnd++] = nextCoord[0];\n coordinates[myEnd++] = nextCoord[1];\n skipped = false;\n } else {\n skipped = true;\n }\n lastXCoord = nextCoord[0];\n lastYCoord = nextCoord[1];\n lastRel = nextRel;\n }\n\n // Last coordinate equals first or only one point to append:\n if ((closed && skipped) || i === offset + stride) {\n coordinates[myEnd++] = lastXCoord;\n coordinates[myEnd++] = lastYCoord;\n }\n return myEnd;\n }\n\n /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {Array<number>} builderEnds Builder ends.\n * @return {number} Offset.\n */\n drawCustomCoordinates_(flatCoordinates, offset, ends, stride, builderEnds) {\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n const builderEnd = this.appendFlatLineCoordinates(\n flatCoordinates,\n offset,\n end,\n stride,\n false,\n false,\n );\n builderEnds.push(builderEnd);\n offset = end;\n }\n return offset;\n }\n\n /**\n * @param {import(\"../../geom/SimpleGeometry.js\").default} geometry Geometry.\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @param {Function} renderer Renderer.\n * @param {Function} hitDetectionRenderer Renderer.\n * @param {number} [index] Render order index.\n * @override\n */\n drawCustom(geometry, feature, renderer, hitDetectionRenderer, index) {\n this.beginGeometry(geometry, feature, index);\n\n const type = geometry.getType();\n const stride = geometry.getStride();\n const builderBegin = this.coordinates.length;\n\n let flatCoordinates, builderEnd, builderEnds, builderEndss;\n let offset;\n\n switch (type) {\n case 'MultiPolygon':\n flatCoordinates =\n /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (\n geometry\n ).getOrientedFlatCoordinates();\n builderEndss = [];\n const endss =\n /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (\n geometry\n ).getEndss();\n offset = 0;\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const myEnds = [];\n offset = this.drawCustomCoordinates_(\n flatCoordinates,\n offset,\n endss[i],\n stride,\n myEnds,\n );\n builderEndss.push(myEnds);\n }\n this.instructions.push([\n CanvasInstruction.CUSTOM,\n builderBegin,\n builderEndss,\n geometry,\n renderer,\n inflateMultiCoordinatesArray,\n index,\n ]);\n this.hitDetectionInstructions.push([\n CanvasInstruction.CUSTOM,\n builderBegin,\n builderEndss,\n geometry,\n hitDetectionRenderer || renderer,\n inflateMultiCoordinatesArray,\n index,\n ]);\n break;\n case 'Polygon':\n case 'MultiLineString':\n builderEnds = [];\n flatCoordinates =\n type == 'Polygon'\n ? /** @type {import(\"../../geom/Polygon.js\").default} */ (\n geometry\n ).getOrientedFlatCoordinates()\n : geometry.getFlatCoordinates();\n offset = this.drawCustomCoordinates_(\n flatCoordinates,\n 0,\n /** @type {import(\"../../geom/Polygon.js\").default|import(\"../../geom/MultiLineString.js\").default} */ (\n geometry\n ).getEnds(),\n stride,\n builderEnds,\n );\n this.instructions.push([\n CanvasInstruction.CUSTOM,\n builderBegin,\n builderEnds,\n geometry,\n renderer,\n inflateCoordinatesArray,\n index,\n ]);\n this.hitDetectionInstructions.push([\n CanvasInstruction.CUSTOM,\n builderBegin,\n builderEnds,\n geometry,\n hitDetectionRenderer || renderer,\n inflateCoordinatesArray,\n index,\n ]);\n break;\n case 'LineString':\n case 'Circle':\n flatCoordinates = geometry.getFlatCoordinates();\n builderEnd = this.appendFlatLineCoordinates(\n flatCoordinates,\n 0,\n flatCoordinates.length,\n stride,\n false,\n false,\n );\n this.instructions.push([\n CanvasInstruction.CUSTOM,\n builderBegin,\n builderEnd,\n geometry,\n renderer,\n inflateCoordinates,\n index,\n ]);\n this.hitDetectionInstructions.push([\n CanvasInstruction.CUSTOM,\n builderBegin,\n builderEnd,\n geometry,\n hitDetectionRenderer || renderer,\n inflateCoordinates,\n index,\n ]);\n break;\n case 'MultiPoint':\n flatCoordinates = geometry.getFlatCoordinates();\n builderEnd = this.appendFlatPointCoordinates(flatCoordinates, stride);\n\n if (builderEnd > builderBegin) {\n this.instructions.push([\n CanvasInstruction.CUSTOM,\n builderBegin,\n builderEnd,\n geometry,\n renderer,\n inflateCoordinates,\n index,\n ]);\n this.hitDetectionInstructions.push([\n CanvasInstruction.CUSTOM,\n builderBegin,\n builderEnd,\n geometry,\n hitDetectionRenderer || renderer,\n inflateCoordinates,\n index,\n ]);\n }\n break;\n case 'Point':\n flatCoordinates = geometry.getFlatCoordinates();\n this.coordinates.push(flatCoordinates[0], flatCoordinates[1]);\n builderEnd = this.coordinates.length;\n\n this.instructions.push([\n CanvasInstruction.CUSTOM,\n builderBegin,\n builderEnd,\n geometry,\n renderer,\n undefined,\n index,\n ]);\n this.hitDetectionInstructions.push([\n CanvasInstruction.CUSTOM,\n builderBegin,\n builderEnd,\n geometry,\n hitDetectionRenderer || renderer,\n undefined,\n index,\n ]);\n break;\n default:\n }\n this.endGeometry(feature);\n }\n\n /**\n * @protected\n * @param {import(\"../../geom/Geometry\").default|import(\"../Feature.js\").default} geometry The geometry.\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @param {number} index Render order index\n */\n beginGeometry(geometry, feature, index) {\n this.beginGeometryInstruction1_ = [\n CanvasInstruction.BEGIN_GEOMETRY,\n feature,\n 0,\n geometry,\n index,\n ];\n this.instructions.push(this.beginGeometryInstruction1_);\n this.beginGeometryInstruction2_ = [\n CanvasInstruction.BEGIN_GEOMETRY,\n feature,\n 0,\n geometry,\n index,\n ];\n this.hitDetectionInstructions.push(this.beginGeometryInstruction2_);\n }\n\n /**\n * @return {import(\"../canvas.js\").SerializableInstructions} the serializable instructions.\n */\n finish() {\n return {\n instructions: this.instructions,\n hitDetectionInstructions: this.hitDetectionInstructions,\n coordinates: this.coordinates,\n };\n }\n\n /**\n * Reverse the hit detection instructions.\n */\n reverseHitDetectionInstructions() {\n const hitDetectionInstructions = this.hitDetectionInstructions;\n // step 1 - reverse array\n hitDetectionInstructions.reverse();\n // step 2 - reverse instructions within geometry blocks\n let i;\n const n = hitDetectionInstructions.length;\n let instruction;\n let type;\n let begin = -1;\n for (i = 0; i < n; ++i) {\n instruction = hitDetectionInstructions[i];\n type = /** @type {import(\"./Instruction.js\").default} */ (instruction[0]);\n if (type == CanvasInstruction.END_GEOMETRY) {\n begin = i;\n } else if (type == CanvasInstruction.BEGIN_GEOMETRY) {\n instruction[2] = i;\n reverseSubArray(this.hitDetectionInstructions, begin, i);\n begin = -1;\n }\n }\n }\n\n /**\n * @param {import(\"../../style/Fill.js\").default} fillStyle Fill style.\n * @param {import('../canvas.js').FillStrokeState} [state] State.\n * @return {import('../canvas.js').FillStrokeState} State.\n */\n fillStyleToState(\n fillStyle,\n state = /** @type {import('../canvas.js').FillStrokeState} */ ({}),\n ) {\n if (fillStyle) {\n const fillStyleColor = fillStyle.getColor();\n state.fillPatternScale =\n fillStyleColor &&\n typeof fillStyleColor === 'object' &&\n 'src' in fillStyleColor\n ? this.pixelRatio\n : 1;\n state.fillStyle = asColorLike(\n fillStyleColor ? fillStyleColor : defaultFillStyle,\n );\n } else {\n state.fillStyle = undefined;\n }\n return state;\n }\n\n /**\n * @param {import(\"../../style/Stroke.js\").default} strokeStyle Stroke style.\n * @param {import(\"../canvas.js\").FillStrokeState} state State.\n * @return {import(\"../canvas.js\").FillStrokeState} State.\n */\n strokeStyleToState(\n strokeStyle,\n state = /** @type {import('../canvas.js').FillStrokeState} */ ({}),\n ) {\n if (strokeStyle) {\n const strokeStyleColor = strokeStyle.getColor();\n state.strokeStyle = asColorLike(\n strokeStyleColor ? strokeStyleColor : defaultStrokeStyle,\n );\n const strokeStyleLineCap = strokeStyle.getLineCap();\n state.lineCap =\n strokeStyleLineCap !== undefined ? strokeStyleLineCap : defaultLineCap;\n const strokeStyleLineDash = strokeStyle.getLineDash();\n state.lineDash = strokeStyleLineDash\n ? strokeStyleLineDash.slice()\n : defaultLineDash;\n const strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();\n state.lineDashOffset = strokeStyleLineDashOffset\n ? strokeStyleLineDashOffset\n : defaultLineDashOffset;\n const strokeStyleLineJoin = strokeStyle.getLineJoin();\n state.lineJoin =\n strokeStyleLineJoin !== undefined\n ? strokeStyleLineJoin\n : defaultLineJoin;\n const strokeStyleWidth = strokeStyle.getWidth();\n state.lineWidth =\n strokeStyleWidth !== undefined ? strokeStyleWidth : defaultLineWidth;\n const strokeStyleMiterLimit = strokeStyle.getMiterLimit();\n state.miterLimit =\n strokeStyleMiterLimit !== undefined\n ? strokeStyleMiterLimit\n : defaultMiterLimit;\n const strokeStyleOffset = strokeStyle.getOffset();\n state.strokeOffset = strokeStyleOffset ?? defaultStrokeOffset;\n\n if (state.lineWidth > this.maxLineWidth) {\n this.maxLineWidth = state.lineWidth;\n // invalidate the buffered max extent cache\n this.bufferedMaxExtent_ = null;\n }\n } else {\n state.strokeStyle = undefined;\n state.lineCap = undefined;\n state.lineDash = null;\n state.lineDashOffset = undefined;\n state.lineJoin = undefined;\n state.lineWidth = undefined;\n state.miterLimit = undefined;\n state.strokeOffset = undefined;\n }\n return state;\n }\n\n /**\n * @param {import(\"../../style/Fill.js\").default} fillStyle Fill style.\n * @param {import(\"../../style/Stroke.js\").default} strokeStyle Stroke style.\n * @override\n */\n setFillStrokeStyle(fillStyle, strokeStyle) {\n const state = this.state;\n this.fillStyleToState(fillStyle, state);\n this.strokeStyleToState(strokeStyle, state);\n }\n\n /**\n * @param {import(\"../canvas.js\").FillStrokeState} state State.\n * @return {Array<*>} Fill instruction.\n */\n createFill(state) {\n const fillStyle = state.fillStyle;\n /** @type {Array<*>} */\n const fillInstruction = [CanvasInstruction.SET_FILL_STYLE, fillStyle];\n if (typeof fillStyle !== 'string') {\n // Fill is a pattern or gradient - align and scale it!\n fillInstruction.push(state.fillPatternScale);\n }\n return fillInstruction;\n }\n\n /**\n * @param {import(\"../canvas.js\").FillStrokeState} state State.\n */\n applyStroke(state) {\n this.instructions.push(this.createStroke(state));\n }\n\n /**\n * @param {import(\"../canvas.js\").FillStrokeState} state State.\n * @return {Array<*>} Stroke instruction.\n */\n createStroke(state) {\n return [\n CanvasInstruction.SET_STROKE_STYLE,\n state.strokeStyle,\n state.lineWidth * this.pixelRatio,\n state.lineCap,\n state.lineJoin,\n state.miterLimit,\n state.lineDash ? this.applyPixelRatio(state.lineDash) : null,\n state.lineDashOffset * this.pixelRatio,\n ];\n }\n\n /**\n * @param {import(\"../canvas.js\").FillStrokeState} state State.\n * @param {function(this:CanvasBuilder, import(\"../canvas.js\").FillStrokeState):Array<*>} createFill Create fill.\n */\n updateFillStyle(state, createFill) {\n const fillStyle = state.fillStyle;\n if (typeof fillStyle !== 'string' || state.currentFillStyle != fillStyle) {\n this.instructions.push(createFill.call(this, state));\n state.currentFillStyle = fillStyle;\n }\n }\n\n /**\n * @param {import(\"../canvas.js\").FillStrokeState} state State.\n * @param {function(this:CanvasBuilder, import(\"../canvas.js\").FillStrokeState): void} applyStroke Apply stroke.\n */\n updateStrokeStyle(state, applyStroke) {\n const strokeStyle = state.strokeStyle;\n const lineCap = state.lineCap;\n const lineDash = state.lineDash;\n const lineDashOffset = state.lineDashOffset;\n const lineJoin = state.lineJoin;\n const lineWidth = state.lineWidth;\n const miterLimit = state.miterLimit;\n const strokeOffset = state.strokeOffset;\n if (\n state.currentStrokeStyle != strokeStyle ||\n state.currentLineCap != lineCap ||\n (lineDash != state.currentLineDash &&\n !equals(state.currentLineDash, lineDash)) ||\n state.currentLineDashOffset != lineDashOffset ||\n state.currentLineJoin != lineJoin ||\n state.currentLineWidth != lineWidth ||\n state.currentMiterLimit != miterLimit ||\n state.currentStrokeOffset != strokeOffset\n ) {\n applyStroke.call(this, state);\n state.currentStrokeStyle = strokeStyle;\n state.currentLineCap = lineCap;\n state.currentLineDash = lineDash;\n state.currentLineDashOffset = lineDashOffset;\n state.currentLineJoin = lineJoin;\n state.currentLineWidth = lineWidth;\n state.currentMiterLimit = miterLimit;\n state.currentStrokeOffset = strokeOffset;\n }\n }\n\n /**\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n */\n endGeometry(feature) {\n this.beginGeometryInstruction1_[2] = this.instructions.length;\n this.beginGeometryInstruction1_ = null;\n this.beginGeometryInstruction2_[2] = this.hitDetectionInstructions.length;\n this.beginGeometryInstruction2_ = null;\n const endGeometryInstruction = [CanvasInstruction.END_GEOMETRY, feature];\n this.instructions.push(endGeometryInstruction);\n this.hitDetectionInstructions.push(endGeometryInstruction);\n }\n\n /**\n * Get the buffered rendering extent. Rendering will be clipped to the extent\n * provided to the constructor. To account for symbolizers that may intersect\n * this extent, we calculate a buffered extent (e.g. based on stroke width).\n * @return {import(\"../../extent.js\").Extent} The buffered rendering extent.\n * @protected\n */\n getBufferedMaxExtent() {\n if (!this.bufferedMaxExtent_) {\n this.bufferedMaxExtent_ = clone(this.maxExtent);\n if (this.maxLineWidth > 0) {\n const width = (this.resolution * (this.maxLineWidth + 1)) / 2;\n buffer(this.bufferedMaxExtent_, width, this.bufferedMaxExtent_);\n }\n }\n return this.bufferedMaxExtent_;\n }\n}\n\nexport default CanvasBuilder;\n", "/**\n * @module ol/render/canvas/ImageBuilder\n */\nimport {containsCoordinate} from '../../extent.js';\nimport CanvasBuilder from './Builder.js';\nimport CanvasInstruction from './Instruction.js';\n\nclass CanvasImageBuilder extends CanvasBuilder {\n /**\n * @param {number} tolerance Tolerance.\n * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n */\n constructor(tolerance, maxExtent, resolution, pixelRatio) {\n super(tolerance, maxExtent, resolution, pixelRatio);\n\n /**\n * @private\n * @type {import('../../DataTile.js').ImageLike}\n */\n this.hitDetectionImage_ = null;\n\n /**\n * @private\n * @type {import('../../DataTile.js').ImageLike}\n */\n this.image_ = null;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.imagePixelRatio_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.anchorX_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.anchorY_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.height_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.opacity_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.originX_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.originY_ = undefined;\n\n /**\n * @private\n * @type {boolean|undefined}\n */\n this.rotateWithView_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.rotation_ = undefined;\n\n /**\n * @private\n * @type {import(\"../../size.js\").Size|undefined}\n */\n this.scale_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.width_ = undefined;\n\n /**\n * @private\n * @type {import('../../style/Style.js').DeclutterMode}\n */\n this.declutterMode_ = undefined;\n\n /**\n * Data shared with a text builder for combined decluttering.\n * @private\n * @type {import(\"../canvas.js\").DeclutterImageWithText}\n */\n this.declutterImageWithText_ = undefined;\n }\n\n /**\n * @param {import(\"../../geom/Point.js\").default|import(\"../Feature.js\").default} pointGeometry Point geometry.\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n * @override\n */\n drawPoint(pointGeometry, feature, index) {\n if (\n !this.image_ ||\n (this.maxExtent &&\n !containsCoordinate(this.maxExtent, pointGeometry.getFlatCoordinates()))\n ) {\n return;\n }\n this.beginGeometry(pointGeometry, feature, index);\n const flatCoordinates = pointGeometry.getFlatCoordinates();\n const stride = pointGeometry.getStride();\n const myBegin = this.coordinates.length;\n const myEnd = this.appendFlatPointCoordinates(flatCoordinates, stride);\n this.instructions.push([\n CanvasInstruction.DRAW_IMAGE,\n myBegin,\n myEnd,\n this.image_,\n // Remaining arguments to DRAW_IMAGE are in alphabetical order\n this.anchorX_ * this.imagePixelRatio_,\n this.anchorY_ * this.imagePixelRatio_,\n Math.ceil(this.height_ * this.imagePixelRatio_),\n this.opacity_,\n this.originX_ * this.imagePixelRatio_,\n this.originY_ * this.imagePixelRatio_,\n this.rotateWithView_,\n this.rotation_,\n [\n (this.scale_[0] * this.pixelRatio) / this.imagePixelRatio_,\n (this.scale_[1] * this.pixelRatio) / this.imagePixelRatio_,\n ],\n Math.ceil(this.width_ * this.imagePixelRatio_),\n this.declutterMode_,\n this.declutterImageWithText_,\n ]);\n this.hitDetectionInstructions.push([\n CanvasInstruction.DRAW_IMAGE,\n myBegin,\n myEnd,\n this.hitDetectionImage_,\n // Remaining arguments to DRAW_IMAGE are in alphabetical order\n this.anchorX_,\n this.anchorY_,\n this.height_,\n 1,\n this.originX_,\n this.originY_,\n this.rotateWithView_,\n this.rotation_,\n this.scale_,\n this.width_,\n this.declutterMode_,\n this.declutterImageWithText_,\n ]);\n this.endGeometry(feature);\n }\n\n /**\n * @param {import(\"../../geom/MultiPoint.js\").default|import(\"../Feature.js\").default} multiPointGeometry MultiPoint geometry.\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n * @override\n */\n drawMultiPoint(multiPointGeometry, feature, index) {\n if (!this.image_) {\n return;\n }\n this.beginGeometry(multiPointGeometry, feature, index);\n const flatCoordinates = multiPointGeometry.getFlatCoordinates();\n const filteredFlatCoordinates = [];\n for (\n let i = 0, ii = flatCoordinates.length;\n i < ii;\n i += multiPointGeometry.getStride()\n ) {\n if (\n !this.maxExtent ||\n containsCoordinate(this.maxExtent, flatCoordinates.slice(i, i + 2))\n ) {\n filteredFlatCoordinates.push(\n flatCoordinates[i],\n flatCoordinates[i + 1],\n );\n }\n }\n const myBegin = this.coordinates.length;\n const myEnd = this.appendFlatPointCoordinates(filteredFlatCoordinates, 2);\n this.instructions.push([\n CanvasInstruction.DRAW_IMAGE,\n myBegin,\n myEnd,\n this.image_,\n // Remaining arguments to DRAW_IMAGE are in alphabetical order\n this.anchorX_ * this.imagePixelRatio_,\n this.anchorY_ * this.imagePixelRatio_,\n Math.ceil(this.height_ * this.imagePixelRatio_),\n this.opacity_,\n this.originX_ * this.imagePixelRatio_,\n this.originY_ * this.imagePixelRatio_,\n this.rotateWithView_,\n this.rotation_,\n [\n (this.scale_[0] * this.pixelRatio) / this.imagePixelRatio_,\n (this.scale_[1] * this.pixelRatio) / this.imagePixelRatio_,\n ],\n Math.ceil(this.width_ * this.imagePixelRatio_),\n this.declutterMode_,\n this.declutterImageWithText_,\n ]);\n this.hitDetectionInstructions.push([\n CanvasInstruction.DRAW_IMAGE,\n myBegin,\n myEnd,\n this.hitDetectionImage_,\n // Remaining arguments to DRAW_IMAGE are in alphabetical order\n this.anchorX_,\n this.anchorY_,\n this.height_,\n 1,\n this.originX_,\n this.originY_,\n this.rotateWithView_,\n this.rotation_,\n this.scale_,\n this.width_,\n this.declutterMode_,\n this.declutterImageWithText_,\n ]);\n this.endGeometry(feature);\n }\n\n /**\n * @return {import(\"../canvas.js\").SerializableInstructions} the serializable instructions.\n * @override\n */\n finish() {\n this.reverseHitDetectionInstructions();\n // FIXME this doesn't really protect us against further calls to draw*Geometry\n this.anchorX_ = undefined;\n this.anchorY_ = undefined;\n this.hitDetectionImage_ = null;\n this.image_ = null;\n this.imagePixelRatio_ = undefined;\n this.height_ = undefined;\n this.scale_ = undefined;\n this.opacity_ = undefined;\n this.originX_ = undefined;\n this.originY_ = undefined;\n this.rotateWithView_ = undefined;\n this.rotation_ = undefined;\n this.width_ = undefined;\n return super.finish();\n }\n\n /**\n * @param {import(\"../../style/Image.js\").default} imageStyle Image style.\n * @param {Object} [sharedData] Shared data.\n * @override\n */\n setImageStyle(imageStyle, sharedData) {\n const anchor = imageStyle.getAnchor();\n const size = imageStyle.getSize();\n const origin = imageStyle.getOrigin();\n this.imagePixelRatio_ = imageStyle.getPixelRatio(this.pixelRatio);\n this.anchorX_ = anchor[0];\n this.anchorY_ = anchor[1];\n this.hitDetectionImage_ = imageStyle.getHitDetectionImage();\n this.image_ = imageStyle.getImage(this.pixelRatio);\n this.height_ = size[1];\n this.opacity_ = imageStyle.getOpacity();\n this.originX_ = origin[0];\n this.originY_ = origin[1];\n this.rotateWithView_ = imageStyle.getRotateWithView();\n this.rotation_ = imageStyle.getRotation();\n this.scale_ = imageStyle.getScaleArray();\n this.width_ = size[0];\n this.declutterMode_ = imageStyle.getDeclutterMode();\n this.declutterImageWithText_ = sharedData;\n }\n}\n\nexport default CanvasImageBuilder;\n", "/**\n * @module ol/render/canvas/LineStringBuilder\n */\nimport {defaultLineDash, defaultLineDashOffset} from '../canvas.js';\nimport CanvasBuilder from './Builder.js';\nimport CanvasInstruction, {\n beginPathInstruction,\n strokeInstruction,\n} from './Instruction.js';\n\nclass CanvasLineStringBuilder extends CanvasBuilder {\n /**\n * @param {number} tolerance Tolerance.\n * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n */\n constructor(tolerance, maxExtent, resolution, pixelRatio) {\n super(tolerance, maxExtent, resolution, pixelRatio);\n }\n\n /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} [strokeOffset] Stroke Offset in pixels.\n * @private\n * @return {number} end.\n */\n drawFlatCoordinates_(flatCoordinates, offset, end, stride, strokeOffset) {\n const myBegin = this.coordinates.length;\n const myEnd = this.appendFlatLineCoordinates(\n flatCoordinates,\n offset,\n end,\n stride,\n false,\n false,\n );\n this.instructions.push([\n CanvasInstruction.MOVE_TO_LINE_TO,\n myBegin,\n myEnd,\n strokeOffset * this.pixelRatio,\n ]);\n this.hitDetectionInstructions.push([\n CanvasInstruction.MOVE_TO_LINE_TO,\n myBegin,\n myEnd,\n strokeOffset,\n ]);\n return end;\n }\n\n /**\n * @param {import(\"../../geom/LineString.js\").default|import(\"../Feature.js\").default} lineStringGeometry Line string geometry.\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n * @override\n */\n drawLineString(lineStringGeometry, feature, index) {\n const state = this.state;\n const strokeStyle = state.strokeStyle;\n const lineWidth = state.lineWidth;\n const strokeOffset = state.strokeOffset;\n if (strokeStyle === undefined || lineWidth === undefined) {\n return;\n }\n this.updateStrokeStyle(state, this.applyStroke);\n this.beginGeometry(lineStringGeometry, feature, index);\n this.hitDetectionInstructions.push(\n [\n CanvasInstruction.SET_STROKE_STYLE,\n state.strokeStyle,\n state.lineWidth,\n state.lineCap,\n state.lineJoin,\n state.miterLimit,\n defaultLineDash,\n defaultLineDashOffset,\n ],\n beginPathInstruction,\n );\n const flatCoordinates = lineStringGeometry.getFlatCoordinates();\n const stride = lineStringGeometry.getStride();\n this.drawFlatCoordinates_(\n flatCoordinates,\n 0,\n flatCoordinates.length,\n stride,\n strokeOffset,\n );\n this.hitDetectionInstructions.push(strokeInstruction);\n this.endGeometry(feature);\n }\n\n /**\n * @param {import(\"../../geom/MultiLineString.js\").default|import(\"../Feature.js\").default} multiLineStringGeometry MultiLineString geometry.\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n * @override\n */\n drawMultiLineString(multiLineStringGeometry, feature, index) {\n const state = this.state;\n const strokeStyle = state.strokeStyle;\n const lineWidth = state.lineWidth;\n const strokeOffset = state.strokeOffset;\n if (strokeStyle === undefined || lineWidth === undefined) {\n return;\n }\n this.updateStrokeStyle(state, this.applyStroke);\n this.beginGeometry(multiLineStringGeometry, feature, index);\n this.hitDetectionInstructions.push(\n [\n CanvasInstruction.SET_STROKE_STYLE,\n state.strokeStyle,\n state.lineWidth,\n state.lineCap,\n state.lineJoin,\n state.miterLimit,\n defaultLineDash,\n defaultLineDashOffset,\n ],\n beginPathInstruction,\n );\n const ends = multiLineStringGeometry.getEnds();\n const flatCoordinates = multiLineStringGeometry.getFlatCoordinates();\n const stride = multiLineStringGeometry.getStride();\n let offset = 0;\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n offset = this.drawFlatCoordinates_(\n flatCoordinates,\n offset,\n /** @type {number} */ (ends[i]),\n stride,\n strokeOffset,\n );\n }\n this.hitDetectionInstructions.push(strokeInstruction);\n this.endGeometry(feature);\n }\n\n /**\n * @return {import(\"../canvas.js\").SerializableInstructions} the serializable instructions.\n * @override\n */\n finish() {\n const state = this.state;\n if (\n state.lastStroke != undefined &&\n state.lastStroke != this.coordinates.length\n ) {\n this.instructions.push(strokeInstruction);\n }\n this.reverseHitDetectionInstructions();\n this.state = null;\n return super.finish();\n }\n\n /**\n * @param {import(\"../canvas.js\").FillStrokeState} state State.\n * @override\n */\n applyStroke(state) {\n if (\n state.lastStroke != undefined &&\n state.lastStroke != this.coordinates.length\n ) {\n this.instructions.push(strokeInstruction);\n state.lastStroke = this.coordinates.length;\n }\n state.lastStroke = 0;\n super.applyStroke(state);\n this.instructions.push(beginPathInstruction);\n }\n}\n\nexport default CanvasLineStringBuilder;\n", "/**\n * @module ol/render/canvas/PolygonBuilder\n */\nimport {snap} from '../../geom/flat/simplify.js';\nimport {\n defaultFillStyle,\n defaultLineDash,\n defaultLineDashOffset,\n} from '../canvas.js';\nimport CanvasBuilder from './Builder.js';\nimport CanvasInstruction, {\n beginPathInstruction,\n closePathInstruction,\n fillInstruction,\n strokeInstruction,\n} from './Instruction.js';\n\nclass CanvasPolygonBuilder extends CanvasBuilder {\n /**\n * @param {number} tolerance Tolerance.\n * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n */\n constructor(tolerance, maxExtent, resolution, pixelRatio) {\n super(tolerance, maxExtent, resolution, pixelRatio);\n }\n\n /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} [strokeOffset] Stroke Offset in pixels.\n * @private\n * @return {number} End.\n */\n drawFlatCoordinatess_(flatCoordinates, offset, ends, stride, strokeOffset) {\n const state = this.state;\n const fill = state.fillStyle !== undefined;\n const stroke = state.strokeStyle !== undefined;\n const numEnds = ends.length;\n this.instructions.push(beginPathInstruction);\n this.hitDetectionInstructions.push(beginPathInstruction);\n for (let i = 0; i < numEnds; ++i) {\n const end = ends[i];\n const myBegin = this.coordinates.length;\n const myEnd = this.appendFlatLineCoordinates(\n flatCoordinates,\n offset,\n end,\n stride,\n true,\n !stroke,\n );\n this.instructions.push([\n CanvasInstruction.MOVE_TO_LINE_TO,\n myBegin,\n myEnd,\n strokeOffset * this.pixelRatio,\n true,\n ]);\n this.hitDetectionInstructions.push([\n CanvasInstruction.MOVE_TO_LINE_TO,\n myBegin,\n myEnd,\n strokeOffset,\n true,\n ]);\n if (stroke) {\n // Performance optimization: only call closePath() when we have a stroke.\n // Otherwise the ring is closed already (see appendFlatLineCoordinates above).\n this.instructions.push(closePathInstruction);\n this.hitDetectionInstructions.push(closePathInstruction);\n }\n offset = end;\n }\n if (fill) {\n this.instructions.push(fillInstruction);\n this.hitDetectionInstructions.push(fillInstruction);\n }\n if (stroke) {\n this.instructions.push(strokeInstruction);\n this.hitDetectionInstructions.push(strokeInstruction);\n }\n return offset;\n }\n\n /**\n * @param {import(\"../../geom/Circle.js\").default} circleGeometry Circle geometry.\n * @param {import(\"../../Feature.js\").default} feature Feature.\n * @param {number} [index] Render order index.\n * @override\n */\n drawCircle(circleGeometry, feature, index) {\n const state = this.state;\n const fillStyle = state.fillStyle;\n const strokeStyle = state.strokeStyle;\n const strokeOffset = state.strokeOffset;\n if (fillStyle === undefined && strokeStyle === undefined) {\n return;\n }\n\n if (\n this.handleStrokeOffset_(() =>\n this.drawCircle(circleGeometry, feature, index),\n )\n ) {\n return;\n }\n this.setFillStrokeStyles_();\n this.beginGeometry(circleGeometry, feature, index);\n if (state.fillStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_FILL_STYLE,\n defaultFillStyle,\n ]);\n }\n if (state.strokeStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_STROKE_STYLE,\n state.strokeStyle,\n state.lineWidth,\n state.lineCap,\n state.lineJoin,\n state.miterLimit,\n defaultLineDash,\n defaultLineDashOffset,\n ]);\n }\n const flatCoordinates = circleGeometry.getFlatCoordinates();\n const stride = circleGeometry.getStride();\n const myBegin = this.coordinates.length;\n this.appendFlatLineCoordinates(\n flatCoordinates,\n 0,\n flatCoordinates.length,\n stride,\n false,\n false,\n );\n const circleInstruction = [CanvasInstruction.CIRCLE, myBegin, strokeOffset];\n this.instructions.push(beginPathInstruction, circleInstruction);\n this.hitDetectionInstructions.push(beginPathInstruction, circleInstruction);\n if (state.fillStyle !== undefined) {\n this.instructions.push(fillInstruction);\n this.hitDetectionInstructions.push(fillInstruction);\n }\n if (state.strokeStyle !== undefined) {\n this.instructions.push(strokeInstruction);\n this.hitDetectionInstructions.push(strokeInstruction);\n }\n this.endGeometry(feature);\n }\n\n /**\n * @param {import(\"../../geom/Polygon.js\").default|import(\"../Feature.js\").default} polygonGeometry Polygon geometry.\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n * @override\n */\n drawPolygon(polygonGeometry, feature, index) {\n const state = this.state;\n const fillStyle = state.fillStyle;\n const strokeStyle = state.strokeStyle;\n const strokeOffset = state.strokeOffset;\n if (fillStyle === undefined && strokeStyle === undefined) {\n return;\n }\n if (\n this.handleStrokeOffset_(() =>\n this.drawPolygon(polygonGeometry, feature, index),\n )\n ) {\n return;\n }\n\n this.setFillStrokeStyles_();\n this.beginGeometry(polygonGeometry, feature, index);\n if (state.fillStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_FILL_STYLE,\n defaultFillStyle,\n ]);\n }\n if (state.strokeStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_STROKE_STYLE,\n state.strokeStyle,\n state.lineWidth,\n state.lineCap,\n state.lineJoin,\n state.miterLimit,\n defaultLineDash,\n defaultLineDashOffset,\n ]);\n }\n const ends = polygonGeometry.getEnds();\n const flatCoordinates = polygonGeometry.getOrientedFlatCoordinates();\n const stride = polygonGeometry.getStride();\n this.drawFlatCoordinatess_(\n flatCoordinates,\n 0,\n /** @type {Array<number>} */ (ends),\n stride,\n strokeOffset,\n );\n this.endGeometry(feature);\n }\n\n /**\n * @param {import(\"../../geom/MultiPolygon.js\").default} multiPolygonGeometry MultiPolygon geometry.\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n * @override\n */\n drawMultiPolygon(multiPolygonGeometry, feature, index) {\n const state = this.state;\n const fillStyle = state.fillStyle;\n const strokeStyle = state.strokeStyle;\n const strokeOffset = state.strokeOffset;\n if (fillStyle === undefined && strokeStyle === undefined) {\n return;\n }\n if (\n this.handleStrokeOffset_(() =>\n this.drawMultiPolygon(multiPolygonGeometry, feature, index),\n )\n ) {\n return;\n }\n this.setFillStrokeStyles_();\n this.beginGeometry(multiPolygonGeometry, feature, index);\n if (state.fillStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_FILL_STYLE,\n defaultFillStyle,\n ]);\n }\n if (state.strokeStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_STROKE_STYLE,\n state.strokeStyle,\n state.lineWidth,\n state.lineCap,\n state.lineJoin,\n state.miterLimit,\n defaultLineDash,\n defaultLineDashOffset,\n ]);\n }\n const endss = multiPolygonGeometry.getEndss();\n const flatCoordinates = multiPolygonGeometry.getOrientedFlatCoordinates();\n const stride = multiPolygonGeometry.getStride();\n let offset = 0;\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n offset = this.drawFlatCoordinatess_(\n flatCoordinates,\n offset,\n endss[i],\n stride,\n strokeOffset,\n );\n }\n this.endGeometry(feature);\n }\n\n /**\n * @return {import(\"../canvas.js\").SerializableInstructions} the serializable instructions.\n * @override\n */\n finish() {\n this.reverseHitDetectionInstructions();\n this.state = null;\n // We want to preserve topology when drawing polygons. Polygons are\n // simplified using quantization and point elimination. However, we might\n // have received a mix of quantized and non-quantized geometries, so ensure\n // that all are quantized by quantizing all coordinates in the batch.\n const tolerance = this.tolerance;\n if (tolerance !== 0) {\n const coordinates = this.coordinates;\n for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n coordinates[i] = snap(coordinates[i], tolerance);\n }\n }\n return super.finish();\n }\n\n /**\n * @private\n */\n setFillStrokeStyles_() {\n const state = this.state;\n this.updateFillStyle(state, this.createFill);\n this.updateStrokeStyle(state, this.applyStroke);\n }\n\n handleStrokeOffset_(drawGeometryCallback) {\n const state = this.state;\n const fillStyle = state.fillStyle;\n const strokeStyle = state.strokeStyle;\n const strokeOffset = state.strokeOffset;\n\n // In case both fill style and stroke style are defined and the stroke style has an offset,\n // the stroke and fill should be done in separate steps, because offset stroke shape will\n // be different from the original shape used for the fill.\n if (\n Math.abs(strokeOffset) > 0 &&\n fillStyle !== undefined &&\n strokeStyle !== undefined\n ) {\n // First do only fill\n state.strokeStyle = undefined;\n state.strokeOffset = 0;\n drawGeometryCallback();\n // Now separately do the stroke\n state.fillStyle = undefined;\n state.strokeStyle = strokeStyle;\n state.strokeOffset = strokeOffset;\n drawGeometryCallback();\n // Reset the state to the original\n state.fillStyle = fillStyle;\n return true;\n }\n return false;\n }\n}\n\nexport default CanvasPolygonBuilder;\n", "import {lerp} from '../../math.js';\n\n/**\n * Creates chunks of equal length from a linestring\n * @param {number} chunkLength Length of each chunk.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Start offset of the `flatCoordinates`.\n * @param {number} end End offset of the `flatCoordinates`.\n * @param {number} stride Stride.\n * @return {Array<Array<number>>} Chunks of linestrings with stride 2.\n */\nexport function lineChunk(chunkLength, flatCoordinates, offset, end, stride) {\n const chunks = [];\n let cursor = offset;\n let chunkM = 0;\n let currentChunk = flatCoordinates.slice(offset, 2);\n while (chunkM < chunkLength && cursor + stride < end) {\n const [x1, y1] = currentChunk.slice(-2);\n const x2 = flatCoordinates[cursor + stride];\n const y2 = flatCoordinates[cursor + stride + 1];\n const segmentLength = Math.sqrt(\n (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1),\n );\n chunkM += segmentLength;\n if (chunkM >= chunkLength) {\n const m = (chunkLength - chunkM + segmentLength) / segmentLength;\n const x = lerp(x1, x2, m);\n const y = lerp(y1, y2, m);\n currentChunk.push(x, y);\n chunks.push(currentChunk);\n currentChunk = [x, y];\n if (chunkM == chunkLength) {\n cursor += stride;\n }\n chunkM = 0;\n } else if (chunkM < chunkLength) {\n currentChunk.push(\n flatCoordinates[cursor + stride],\n flatCoordinates[cursor + stride + 1],\n );\n cursor += stride;\n } else {\n const missing = segmentLength - chunkM;\n const x = lerp(x1, x2, missing / segmentLength);\n const y = lerp(y1, y2, missing / segmentLength);\n currentChunk.push(x, y);\n chunks.push(currentChunk);\n currentChunk = [x, y];\n chunkM = 0;\n cursor += stride;\n }\n }\n if (chunkM > 0) {\n chunks.push(currentChunk);\n }\n return chunks;\n}\n", "/**\n * @module ol/geom/flat/straightchunk\n */\n\n/**\n * @param {number} maxAngle Maximum acceptable angle delta between segments.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {Array<number>} Start and end of the first suitable chunk of the\n * given `flatCoordinates`.\n */\nexport function matchingChunk(maxAngle, flatCoordinates, offset, end, stride) {\n let chunkStart = offset;\n let chunkEnd = offset;\n let chunkM = 0;\n let m = 0;\n let start = offset;\n let acos, i, m12, m23, x1, y1, x12, y12, x23, y23;\n for (i = offset; i < end; i += stride) {\n const x2 = flatCoordinates[i];\n const y2 = flatCoordinates[i + 1];\n if (x1 !== undefined) {\n x23 = x2 - x1;\n y23 = y2 - y1;\n m23 = Math.sqrt(x23 * x23 + y23 * y23);\n if (x12 !== undefined) {\n m += m12;\n acos = Math.acos((x12 * x23 + y12 * y23) / (m12 * m23));\n if (acos > maxAngle) {\n if (m > chunkM) {\n chunkM = m;\n chunkStart = start;\n chunkEnd = i;\n }\n m = 0;\n start = i - stride;\n }\n }\n m12 = m23;\n x12 = x23;\n y12 = y23;\n }\n x1 = x2;\n y1 = y2;\n }\n m += m23;\n return m > chunkM ? [start, i] : [chunkStart, chunkEnd];\n}\n", "/**\n * @module ol/render/canvas/TextBuilder\n */\nimport {asColorLike} from '../../colorlike.js';\nimport {intersects} from '../../extent.js';\nimport {lineChunk} from '../../geom/flat/linechunk.js';\nimport {matchingChunk} from '../../geom/flat/straightchunk.js';\nimport {getUid} from '../../util.js';\nimport {\n defaultFillStyle,\n defaultFont,\n defaultLineCap,\n defaultLineDash,\n defaultLineDashOffset,\n defaultLineJoin,\n defaultLineWidth,\n defaultMiterLimit,\n defaultPadding,\n defaultStrokeStyle,\n defaultTextAlign,\n defaultTextBaseline,\n registerFont,\n} from '../canvas.js';\nimport CanvasBuilder from './Builder.js';\nimport CanvasInstruction from './Instruction.js';\n/**\n * @const\n * @type {{left: 0, center: 0.5, right: 1, top: 0, middle: 0.5, hanging: 0.2, alphabetic: 0.8, ideographic: 0.8, bottom: 1}}\n */\nexport const TEXT_ALIGN = {\n 'left': 0,\n 'center': 0.5,\n 'right': 1,\n 'top': 0,\n 'middle': 0.5,\n 'hanging': 0.2,\n 'alphabetic': 0.8,\n 'ideographic': 0.8,\n 'bottom': 1,\n};\n\nclass CanvasTextBuilder extends CanvasBuilder {\n /**\n * @param {number} tolerance Tolerance.\n * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n */\n constructor(tolerance, maxExtent, resolution, pixelRatio) {\n super(tolerance, maxExtent, resolution, pixelRatio);\n\n /**\n * @private\n * @type {Array<HTMLCanvasElement>}\n */\n this.labels_ = null;\n\n /**\n * @private\n * @type {string|Array<string>}\n */\n this.text_ = '';\n\n /**\n * @private\n * @type {number}\n */\n this.textOffsetX_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.textOffsetY_ = 0;\n\n /**\n * @private\n * @type {boolean|undefined}\n */\n this.textRotateWithView_ = undefined;\n\n /**\n * @private\n * @type {boolean|undefined}\n */\n this.textKeepUpright_ = undefined;\n\n /**\n * @private\n * @type {number}\n */\n this.textRotation_ = 0;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").FillState}\n */\n this.textFillState_ = null;\n\n /**\n * @type {!Object<string, import(\"../canvas.js\").FillState>}\n */\n this.fillStates = {};\n this.fillStates[defaultFillStyle] = {fillStyle: defaultFillStyle};\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").StrokeState}\n */\n this.textStrokeState_ = null;\n\n /**\n * @type {!Object<string, import(\"../canvas.js\").StrokeState>}\n */\n this.strokeStates = {};\n\n /**\n * @private\n * @type {import(\"../canvas.js\").TextState}\n */\n this.textState_ = /** @type {import(\"../canvas.js\").TextState} */ ({});\n\n /**\n * @type {!Object<string, import(\"../canvas.js\").TextState>}\n */\n this.textStates = {};\n\n /**\n * @private\n * @type {string}\n */\n this.textKey_ = '';\n\n /**\n * @private\n * @type {string}\n */\n this.fillKey_ = '';\n\n /**\n * @private\n * @type {string}\n */\n this.strokeKey_ = '';\n\n /**\n * @private\n * @type {import('../../style/Style.js').DeclutterMode}\n */\n this.declutterMode_ = undefined;\n\n /**\n * Data shared with an image builder for combined decluttering.\n * @private\n * @type {import(\"../canvas.js\").DeclutterImageWithText}\n */\n this.declutterImageWithText_ = undefined;\n }\n\n /**\n * @return {import(\"../canvas.js\").SerializableInstructions} the serializable instructions.\n * @override\n */\n finish() {\n const instructions = super.finish();\n instructions.textStates = this.textStates;\n instructions.fillStates = this.fillStates;\n instructions.strokeStates = this.strokeStates;\n return instructions;\n }\n\n /**\n * @param {import(\"../../geom/SimpleGeometry.js\").default|import(\"../Feature.js\").default} geometry Geometry.\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n * @override\n */\n drawText(geometry, feature, index) {\n const fillState = this.textFillState_;\n const strokeState = this.textStrokeState_;\n const textState = this.textState_;\n if (this.text_ === '' || !textState || (!fillState && !strokeState)) {\n return;\n }\n\n const coordinates = this.coordinates;\n let begin = coordinates.length;\n\n const geometryType = geometry.getType();\n let flatCoordinates = null;\n let stride = geometry.getStride();\n\n if (\n textState.placement === 'line' &&\n (geometryType == 'LineString' ||\n geometryType == 'MultiLineString' ||\n geometryType == 'Polygon' ||\n geometryType == 'MultiPolygon')\n ) {\n if (!intersects(this.maxExtent, geometry.getExtent())) {\n return;\n }\n let ends;\n flatCoordinates = geometry.getFlatCoordinates();\n if (geometryType == 'LineString') {\n ends = [flatCoordinates.length];\n } else if (geometryType == 'MultiLineString') {\n ends = /** @type {import(\"../../geom/MultiLineString.js\").default} */ (\n geometry\n ).getEnds();\n } else if (geometryType == 'Polygon') {\n ends = /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry)\n .getEnds()\n .slice(0, 1);\n } else if (geometryType == 'MultiPolygon') {\n const endss =\n /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (\n geometry\n ).getEndss();\n ends = [];\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n ends.push(endss[i][0]);\n }\n }\n this.beginGeometry(geometry, feature, index);\n const repeat = textState.repeat;\n const textAlign = repeat ? undefined : textState.textAlign;\n // No `justify` support for line placement.\n let flatOffset = 0;\n for (let o = 0, oo = ends.length; o < oo; ++o) {\n let chunks;\n if (repeat) {\n chunks = lineChunk(\n repeat * this.resolution,\n flatCoordinates,\n flatOffset,\n ends[o],\n stride,\n );\n } else {\n chunks = [flatCoordinates.slice(flatOffset, ends[o])];\n }\n for (let c = 0, cc = chunks.length; c < cc; ++c) {\n const chunk = chunks[c];\n let chunkBegin = 0;\n let chunkEnd = chunk.length;\n if (textAlign == undefined) {\n const range = matchingChunk(\n textState.maxAngle,\n chunk,\n 0,\n chunk.length,\n 2,\n );\n chunkBegin = range[0];\n chunkEnd = range[1];\n }\n for (let i = chunkBegin; i < chunkEnd; i += stride) {\n coordinates.push(chunk[i], chunk[i + 1]);\n }\n const end = coordinates.length;\n flatOffset = ends[o];\n this.drawChars_(begin, end);\n begin = end;\n }\n }\n this.endGeometry(feature);\n } else {\n let geometryWidths = textState.overflow ? null : [];\n switch (geometryType) {\n case 'Point':\n case 'MultiPoint':\n flatCoordinates =\n /** @type {import(\"../../geom/MultiPoint.js\").default} */ (\n geometry\n ).getFlatCoordinates();\n break;\n case 'LineString':\n flatCoordinates =\n /** @type {import(\"../../geom/LineString.js\").default} */ (\n geometry\n ).getFlatMidpoint();\n break;\n case 'Circle':\n flatCoordinates =\n /** @type {import(\"../../geom/Circle.js\").default} */ (\n geometry\n ).getCenter();\n break;\n case 'MultiLineString':\n flatCoordinates =\n /** @type {import(\"../../geom/MultiLineString.js\").default} */ (\n geometry\n ).getFlatMidpoints();\n stride = 2;\n break;\n case 'Polygon':\n flatCoordinates =\n /** @type {import(\"../../geom/Polygon.js\").default} */ (\n geometry\n ).getFlatInteriorPoint();\n if (!textState.overflow) {\n geometryWidths.push(flatCoordinates[2] / this.resolution);\n }\n stride = 3;\n break;\n case 'MultiPolygon':\n const interiorPoints =\n /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (\n geometry\n ).getFlatInteriorPoints();\n flatCoordinates = [];\n for (let i = 0, ii = interiorPoints.length; i < ii; i += 3) {\n if (!textState.overflow) {\n geometryWidths.push(interiorPoints[i + 2] / this.resolution);\n }\n flatCoordinates.push(interiorPoints[i], interiorPoints[i + 1]);\n }\n if (flatCoordinates.length === 0) {\n return;\n }\n stride = 2;\n break;\n default:\n }\n const end = this.appendFlatPointCoordinates(flatCoordinates, stride);\n if (end === begin) {\n return;\n }\n if (\n geometryWidths &&\n (end - begin) / 2 !== flatCoordinates.length / stride\n ) {\n let beg = begin / 2;\n geometryWidths = geometryWidths.filter((w, i) => {\n const keep =\n coordinates[(beg + i) * 2] === flatCoordinates[i * stride] &&\n coordinates[(beg + i) * 2 + 1] === flatCoordinates[i * stride + 1];\n if (!keep) {\n --beg;\n }\n return keep;\n });\n }\n\n this.saveTextStates_();\n\n const backgroundFill = textState.backgroundFill\n ? this.createFill(this.fillStyleToState(textState.backgroundFill))\n : null;\n const backgroundStroke = textState.backgroundStroke\n ? this.createStroke(this.strokeStyleToState(textState.backgroundStroke))\n : null;\n\n this.beginGeometry(geometry, feature, index);\n\n // adjust padding for negative scale\n let padding = textState.padding;\n if (\n padding != defaultPadding &&\n (textState.scale[0] < 0 || textState.scale[1] < 0)\n ) {\n let p0 = textState.padding[0];\n let p1 = textState.padding[1];\n let p2 = textState.padding[2];\n let p3 = textState.padding[3];\n if (textState.scale[0] < 0) {\n p1 = -p1;\n p3 = -p3;\n }\n if (textState.scale[1] < 0) {\n p0 = -p0;\n p2 = -p2;\n }\n padding = [p0, p1, p2, p3];\n }\n\n // The image is unknown at this stage so we pass null; it will be computed at render time.\n // For clarity, we pass NaN for offsetX, offsetY, width and height, which will be computed at\n // render time.\n const pixelRatio = this.pixelRatio;\n this.instructions.push([\n CanvasInstruction.DRAW_IMAGE,\n begin,\n end,\n null,\n NaN,\n NaN,\n NaN,\n 1,\n 0,\n 0,\n this.textRotateWithView_,\n this.textRotation_,\n [1, 1],\n NaN,\n this.declutterMode_,\n this.declutterImageWithText_,\n padding == defaultPadding\n ? defaultPadding\n : padding.map(function (p) {\n return p * pixelRatio;\n }),\n backgroundFill,\n backgroundStroke,\n this.text_,\n this.textKey_,\n this.strokeKey_,\n this.fillKey_,\n this.textOffsetX_,\n this.textOffsetY_,\n geometryWidths,\n ]);\n const scale = 1 / pixelRatio;\n // Set default fill for hit detection background\n const hitDetectionBackgroundFill = backgroundFill\n ? backgroundFill.slice(0)\n : null;\n if (hitDetectionBackgroundFill) {\n hitDetectionBackgroundFill[1] = defaultFillStyle;\n }\n this.hitDetectionInstructions.push([\n CanvasInstruction.DRAW_IMAGE,\n begin,\n end,\n null,\n NaN,\n NaN,\n NaN,\n 1,\n 0,\n 0,\n this.textRotateWithView_,\n this.textRotation_,\n [scale, scale],\n NaN,\n this.declutterMode_,\n this.declutterImageWithText_,\n padding,\n hitDetectionBackgroundFill,\n backgroundStroke,\n this.text_,\n this.textKey_,\n this.strokeKey_,\n this.fillKey_ ? defaultFillStyle : this.fillKey_,\n this.textOffsetX_,\n this.textOffsetY_,\n geometryWidths,\n ]);\n\n this.endGeometry(feature);\n }\n }\n\n /**\n * @private\n */\n saveTextStates_() {\n const strokeState = this.textStrokeState_;\n const textState = this.textState_;\n const fillState = this.textFillState_;\n\n const strokeKey = this.strokeKey_;\n if (strokeState) {\n if (!(strokeKey in this.strokeStates)) {\n this.strokeStates[strokeKey] = {\n strokeStyle: strokeState.strokeStyle,\n lineCap: strokeState.lineCap,\n lineDashOffset: strokeState.lineDashOffset,\n lineWidth: strokeState.lineWidth,\n lineJoin: strokeState.lineJoin,\n miterLimit: strokeState.miterLimit,\n lineDash: strokeState.lineDash,\n };\n }\n }\n const textKey = this.textKey_;\n if (!(textKey in this.textStates)) {\n this.textStates[textKey] = {\n font: textState.font,\n textAlign: textState.textAlign || defaultTextAlign,\n justify: textState.justify,\n textBaseline: textState.textBaseline || defaultTextBaseline,\n scale: textState.scale,\n };\n }\n const fillKey = this.fillKey_;\n if (fillState) {\n if (!(fillKey in this.fillStates)) {\n this.fillStates[fillKey] = {\n fillStyle: fillState.fillStyle,\n };\n }\n }\n }\n\n /**\n * @private\n * @param {number} begin Begin.\n * @param {number} end End.\n */\n drawChars_(begin, end) {\n const strokeState = this.textStrokeState_;\n const textState = this.textState_;\n\n const strokeKey = this.strokeKey_;\n const textKey = this.textKey_;\n const fillKey = this.fillKey_;\n this.saveTextStates_();\n\n const pixelRatio = this.pixelRatio;\n const baseline = TEXT_ALIGN[textState.textBaseline];\n\n const offsetY = this.textOffsetY_ * pixelRatio;\n const text = this.text_;\n const strokeWidth = strokeState\n ? (strokeState.lineWidth * Math.abs(textState.scale[0])) / 2\n : 0;\n\n this.instructions.push([\n CanvasInstruction.DRAW_CHARS,\n begin,\n end,\n baseline,\n textState.overflow,\n fillKey,\n textState.maxAngle,\n pixelRatio,\n offsetY,\n strokeKey,\n strokeWidth * pixelRatio,\n text,\n textKey,\n 1,\n this.declutterMode_,\n this.textKeepUpright_,\n ]);\n this.hitDetectionInstructions.push([\n CanvasInstruction.DRAW_CHARS,\n begin,\n end,\n baseline,\n textState.overflow,\n fillKey ? defaultFillStyle : fillKey,\n textState.maxAngle,\n pixelRatio,\n offsetY,\n strokeKey,\n strokeWidth * pixelRatio,\n text,\n textKey,\n 1 / pixelRatio,\n this.declutterMode_,\n this.textKeepUpright_,\n ]);\n }\n\n /**\n * @param {import(\"../../style/Text.js\").default} textStyle Text style.\n * @param {Object} [sharedData] Shared data.\n * @override\n */\n setTextStyle(textStyle, sharedData) {\n let textState, fillState, strokeState;\n if (!textStyle) {\n this.text_ = '';\n } else {\n const textFillStyle = textStyle.getFill();\n if (!textFillStyle) {\n fillState = null;\n this.textFillState_ = fillState;\n } else {\n fillState = this.textFillState_;\n if (!fillState) {\n fillState = /** @type {import(\"../canvas.js\").FillState} */ ({});\n this.textFillState_ = fillState;\n }\n fillState.fillStyle = asColorLike(\n textFillStyle.getColor() || defaultFillStyle,\n );\n }\n\n const textStrokeStyle = textStyle.getStroke();\n if (!textStrokeStyle) {\n strokeState = null;\n this.textStrokeState_ = strokeState;\n } else {\n strokeState = this.textStrokeState_;\n if (!strokeState) {\n strokeState = /** @type {import(\"../canvas.js\").StrokeState} */ ({});\n this.textStrokeState_ = strokeState;\n }\n const lineDash = textStrokeStyle.getLineDash();\n const lineDashOffset = textStrokeStyle.getLineDashOffset();\n const lineWidth = textStrokeStyle.getWidth();\n const miterLimit = textStrokeStyle.getMiterLimit();\n strokeState.lineCap = textStrokeStyle.getLineCap() || defaultLineCap;\n strokeState.lineDash = lineDash ? lineDash.slice() : defaultLineDash;\n strokeState.lineDashOffset =\n lineDashOffset === undefined ? defaultLineDashOffset : lineDashOffset;\n strokeState.lineJoin = textStrokeStyle.getLineJoin() || defaultLineJoin;\n strokeState.lineWidth =\n lineWidth === undefined ? defaultLineWidth : lineWidth;\n strokeState.miterLimit =\n miterLimit === undefined ? defaultMiterLimit : miterLimit;\n strokeState.strokeStyle = asColorLike(\n textStrokeStyle.getColor() || defaultStrokeStyle,\n );\n }\n\n textState = this.textState_;\n const font = textStyle.getFont() || defaultFont;\n registerFont(font);\n const textScale = textStyle.getScaleArray();\n textState.overflow = textStyle.getOverflow();\n textState.font = font;\n textState.maxAngle = textStyle.getMaxAngle();\n textState.placement = textStyle.getPlacement();\n textState.textAlign = textStyle.getTextAlign();\n textState.repeat = textStyle.getRepeat();\n textState.justify = textStyle.getJustify();\n textState.textBaseline =\n textStyle.getTextBaseline() || defaultTextBaseline;\n textState.backgroundFill = textStyle.getBackgroundFill();\n textState.backgroundStroke = textStyle.getBackgroundStroke();\n textState.padding = textStyle.getPadding() || defaultPadding;\n textState.scale = textScale === undefined ? [1, 1] : textScale;\n\n const textOffsetX = textStyle.getOffsetX();\n const textOffsetY = textStyle.getOffsetY();\n const textRotateWithView = textStyle.getRotateWithView();\n const textKeepUpright = textStyle.getKeepUpright();\n const textRotation = textStyle.getRotation();\n this.text_ = textStyle.getText() || '';\n this.textOffsetX_ = textOffsetX === undefined ? 0 : textOffsetX;\n this.textOffsetY_ = textOffsetY === undefined ? 0 : textOffsetY;\n this.textRotateWithView_ =\n textRotateWithView === undefined ? false : textRotateWithView;\n this.textKeepUpright_ =\n textKeepUpright === undefined ? true : textKeepUpright;\n this.textRotation_ = textRotation === undefined ? 0 : textRotation;\n\n this.strokeKey_ = strokeState\n ? (typeof strokeState.strokeStyle == 'string'\n ? strokeState.strokeStyle\n : getUid(strokeState.strokeStyle)) +\n strokeState.lineCap +\n strokeState.lineDashOffset +\n '|' +\n strokeState.lineWidth +\n strokeState.lineJoin +\n strokeState.miterLimit +\n '[' +\n strokeState.lineDash.join() +\n ']'\n : '';\n this.textKey_ =\n textState.font +\n textState.scale +\n (textState.textAlign || '?') +\n (textState.repeat || '?') +\n (textState.justify || '?') +\n (textState.textBaseline || '?');\n this.fillKey_ =\n fillState && fillState.fillStyle\n ? typeof fillState.fillStyle == 'string'\n ? fillState.fillStyle\n : '|' + getUid(fillState.fillStyle)\n : '';\n }\n this.declutterMode_ = textStyle.getDeclutterMode();\n this.declutterImageWithText_ = sharedData;\n }\n}\n\nexport default CanvasTextBuilder;\n", "/**\n * @module ol/render/canvas/BuilderGroup\n */\n\nimport Builder from './Builder.js';\nimport ImageBuilder from './ImageBuilder.js';\nimport LineStringBuilder from './LineStringBuilder.js';\nimport PolygonBuilder from './PolygonBuilder.js';\nimport TextBuilder from './TextBuilder.js';\n\n/**\n * @type {Object<import(\"../canvas.js\").BuilderType, typeof Builder>}\n */\nconst BATCH_CONSTRUCTORS = {\n 'Circle': PolygonBuilder,\n 'Default': Builder,\n 'Image': ImageBuilder,\n 'LineString': LineStringBuilder,\n 'Polygon': PolygonBuilder,\n 'Text': TextBuilder,\n};\n\nclass BuilderGroup {\n /**\n * @param {number} tolerance Tolerance.\n * @param {import(\"../../extent.js\").Extent} maxExtent Max extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n */\n constructor(tolerance, maxExtent, resolution, pixelRatio) {\n /**\n * @private\n * @type {number}\n */\n this.tolerance_ = tolerance;\n\n /**\n * @private\n * @type {import(\"../../extent.js\").Extent}\n */\n this.maxExtent_ = maxExtent;\n\n /**\n * @private\n * @type {number}\n */\n this.pixelRatio_ = pixelRatio;\n\n /**\n * @private\n * @type {number}\n */\n this.resolution_ = resolution;\n\n /**\n * @private\n * @type {!Object<string, !Object<import(\"../canvas.js\").BuilderType, Builder>>}\n */\n this.buildersByZIndex_ = {};\n }\n\n /**\n * @return {!Object<string, !Object<import(\"../canvas.js\").BuilderType, import(\"./Builder.js\").SerializableInstructions>>} The serializable instructions\n */\n finish() {\n const builderInstructions = {};\n for (const zKey in this.buildersByZIndex_) {\n builderInstructions[zKey] = builderInstructions[zKey] || {};\n const builders = this.buildersByZIndex_[zKey];\n for (const builderKey in builders) {\n const builderInstruction = builders[builderKey].finish();\n builderInstructions[zKey][builderKey] = builderInstruction;\n }\n }\n return builderInstructions;\n }\n\n /**\n * @param {number|undefined} zIndex Z index.\n * @param {import(\"../canvas.js\").BuilderType} builderType Replay type.\n * @return {import(\"../VectorContext.js\").default} Replay.\n */\n getBuilder(zIndex, builderType) {\n const zIndexKey = zIndex !== undefined ? zIndex.toString() : '0';\n let replays = this.buildersByZIndex_[zIndexKey];\n if (replays === undefined) {\n replays = {};\n this.buildersByZIndex_[zIndexKey] = replays;\n }\n let replay = replays[builderType];\n if (replay === undefined) {\n const Constructor = BATCH_CONSTRUCTORS[builderType];\n replay = new Constructor(\n this.tolerance_,\n this.maxExtent_,\n this.resolution_,\n this.pixelRatio_,\n );\n replays[builderType] = replay;\n }\n return replay;\n }\n}\n\nexport default BuilderGroup;\n", "/**\n * @module ol/geom/flat/length\n */\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Length.\n */\nexport function lineStringLength(flatCoordinates, offset, end, stride) {\n let x1 = flatCoordinates[offset];\n let y1 = flatCoordinates[offset + 1];\n let length = 0;\n for (let i = offset + stride; i < end; i += stride) {\n const x2 = flatCoordinates[i];\n const y2 = flatCoordinates[i + 1];\n length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n x1 = x2;\n y1 = y2;\n }\n return length;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Perimeter.\n */\nexport function linearRingLength(flatCoordinates, offset, end, stride) {\n let perimeter = lineStringLength(flatCoordinates, offset, end, stride);\n const dx = flatCoordinates[end - stride] - flatCoordinates[offset];\n const dy = flatCoordinates[end - stride + 1] - flatCoordinates[offset + 1];\n perimeter += Math.sqrt(dx * dx + dy * dy);\n return perimeter;\n}\n", "import {angleBetween} from '../../coordinate.js';\n\n/**\n * Offsets a line string to the left / right along its segments direction.\n * Offset is applied to each segment of the line in the direciton of the segment normal (positive offset goes \"right\" relative to the line direction).\n * For very sharp angles between segments, the function falls back to offsetting along the segment normal direction to avoid excessively long miters.\n *\n * Coordinates and the offset should be in the same units \u2014 either pixels or the same spatial reference system as the input line coordinates.\n *\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} stride Stride.\n * @param {number} offset Offset distance along the segment normal direction.\n * Positive values offset to the right relative to the direction of the line.\n * Negative values offset to the left.\n * @param {boolean} isClosedRing If coordinates build a closed circle (in this the first and the last coordinate offsets will consider previous / next ring coordinate)\n * @param {Array<number>} [dest] Destination coordinate array. If not provided a new one will be created\n * @param {number} [destinationStride] Stride of destination coordinates. If unspecified, assumed to be same as the source coordinates stride.\n * @return {Array<number>} Result flat coordinates of the offset line.\n */\nexport function offsetLineString(\n flatCoordinates,\n stride,\n offset,\n isClosedRing,\n dest,\n destinationStride,\n) {\n dest = dest ?? [];\n destinationStride = destinationStride ?? stride;\n\n const firstPointX = flatCoordinates[0];\n const firstPointY = flatCoordinates[1];\n const secondToLastPointX = flatCoordinates[flatCoordinates.length - 4];\n const secondToLastPointY = flatCoordinates[flatCoordinates.length - 3];\n let x, y, prevX, prevY, nextX, nextY, offsetX, offsetY;\n\n let i = 0;\n for (let j = 0; j < flatCoordinates.length; j += stride) {\n // 1. Detect previous and next coordinates of a current vertex\n prevX = x;\n prevY = y;\n nextX = undefined;\n nextY = undefined;\n if (j + stride < flatCoordinates.length) {\n nextX = flatCoordinates[j + stride];\n nextY = flatCoordinates[j + stride + 1];\n }\n // First coordinate of a closed ring -> previous coordinate is the second to last one\n if (isClosedRing && j === 0) {\n prevX = secondToLastPointX;\n prevY = secondToLastPointY;\n }\n // Last coordinate of a closed ring -> next coordinate is the first vertex of a line string\n if (isClosedRing && j === flatCoordinates.length - 2) {\n // last coordinate\n nextX = firstPointX;\n nextY = firstPointY;\n }\n\n // 2. Current vertex to offset\n x = flatCoordinates[j];\n y = flatCoordinates[j + 1];\n\n // 3. Offset the vertex\n [offsetX, offsetY] = offsetLineVertex(\n x,\n y,\n prevX,\n prevY,\n nextX,\n nextY,\n offset,\n );\n dest[i++] = offsetX;\n dest[i++] = offsetY;\n\n // 4. Copy over other dimension values if any\n for (let k = 2; k < destinationStride; k++) {\n dest[i++] = flatCoordinates[j + k];\n }\n }\n\n if (dest.length != i) {\n dest.length = i;\n }\n return dest;\n}\n\n/**\n * Computes the offset of a single vertex of a line string.\n *\n * The function calculates a new vertex coordinate offset along the normal/miter direction of the line at this vertex.\n * Offset is applied along the segment normal (positive offset goes \"right\" relative to the line direction).\n * It handles first and last vertices (caps) as well as joins between two segments (mitering).\n * For very sharp angles, the function falls back to offsetting along the segment normal direction to avoid excessively long miters.\n *\n * Coordinates and the offset should be in the same units \u2014 either pixels or the same spatial reference system as the input line coordinates.\n *\n * @param {number} x Vertex x-coordinate.\n * @param {number} y Vertex y-coordinate.\n * @param {number|undefined} prevX Previous vertex x-coordinate.\n * Pass undefined if computing the offset for the first vertex (no previous vertex).\n * @param {number|undefined} prevY Previous vertex y-coordinate.\n * Pass undefined if computing the offset for the first vertex (no previous vertex).\n * @param {number|undefined} nextX Next vertex x-coordinate.\n * Pass undefined if computing the offset for the last vertex (no next vertex).\n * @param {number|undefined} nextY Next vertex y-coordinate.\n * Pass undefined if computing the offset for the last vertex (no next vertex).\n * @param {number} offset Offset distance along the segment normal direction.\n * Positive values offset to the right relative to the direction from previous to next vertex.\n * Negative values offset to the left.\n * @return {import(\"../../coordinate.js\").Coordinate} Offset vertex coordinate as `[x, y]`.\n */\nexport function offsetLineVertex(x, y, prevX, prevY, nextX, nextY, offset) {\n // Compute segment direction\n let nx, ny;\n if (prevX !== undefined && prevY !== undefined) {\n nx = x - prevX;\n ny = y - prevY;\n } else if (nextX !== undefined && nextY !== undefined) {\n nx = nextX - x;\n ny = nextY - y;\n } else {\n // no next, no previous point given -> just assume some default (horizontal) direction\n nx = 1;\n ny = 0;\n }\n\n // Normalize -> tangent\n const len = Math.hypot(nx, ny);\n const tx = nx / len;\n const ty = ny / len;\n\n // Rotate tangent 90\u00B0 -> normal\n nx = -ty;\n ny = tx;\n\n // First / last vertex -> offset the point in the direction of the normal vector\n if (prevX === undefined || prevY === undefined) {\n return [x + nx * offset, y + ny * offset];\n }\n if (nextX === undefined || nextY === undefined) {\n return [x + nx * offset, y + ny * offset];\n }\n\n // Compute join angle - angle between 2 segments of the vertex.\n const joinAngle = angleBetween([x, y], [prevX, prevY], [nextX, nextY]);\n\n // Avoid huge or infinite miter joins for very sharp angles, offset in the segment direction in this case.\n if (Math.cos(joinAngle) > 0.998) {\n return [x + tx * offset, y + ty * offset];\n }\n\n // Compute join offset direction.\n // We rotate the normal vector by half of the join angle.\n // This gives the direction of the miter at the vertex.\n const cos = Math.cos(joinAngle / 2);\n const sin = Math.sin(joinAngle / 2);\n\n // Rotate the normal vector (nx, ny) by half of the join angle.\n // bx/by = bisector direction before normalization\n const bx = sin * nx + cos * ny;\n const by = -cos * nx + sin * ny;\n\n // Scale the bisector so that moving along it preserves the correct offset distance.\n // Dividing by sin(half of angle) converts the bisector into the true miter vector.\n // (This expands the miter for sharp angles and shortens it for wide ones.)\n const dx = bx * (1 / sin);\n const dy = by * (1 / sin);\n\n // Offset final vertex along miter direction\n return [x + dx * offset, y + dy * offset];\n}\n", "/**\n * @module ol/geom/flat/textpath\n */\nimport {lerp} from '../../math.js';\nimport {rotate} from './transform.js';\n\n/**\n * @param {Array<number>} flatCoordinates Path to put text on.\n * @param {number} offset Start offset of the `flatCoordinates`.\n * @param {number} end End offset of the `flatCoordinates`.\n * @param {number} stride Stride.\n * @param {string} text Text to place on the path.\n * @param {number} startM m along the path where the text starts.\n * @param {number} maxAngle Max angle between adjacent chars in radians.\n * @param {number} scale The product of the text scale and the device pixel ratio.\n * @param {function(string, string, Object<string, number>):number} measureAndCacheTextWidth Measure and cache text width.\n * @param {string} font The font.\n * @param {Object<string, number>} cache A cache of measured widths.\n * @param {number} rotation Rotation to apply to the flatCoordinates to determine whether text needs to be reversed.\n * @param {boolean} keepUpright Whether the text needs to be kept upright\n * @return {Array<Array<*>>|null} The result array (or null if `maxAngle` was\n * exceeded). Entries of the array are x, y, anchorX, angle, chunk.\n */\nexport function drawTextOnPath(\n flatCoordinates,\n offset,\n end,\n stride,\n text,\n startM,\n maxAngle,\n scale,\n measureAndCacheTextWidth,\n font,\n cache,\n rotation,\n keepUpright = true,\n) {\n let x2 = flatCoordinates[offset];\n let y2 = flatCoordinates[offset + 1];\n let x1 = 0;\n let y1 = 0;\n let segmentLength = 0;\n let segmentM = 0;\n\n function advance() {\n x1 = x2;\n y1 = y2;\n offset += stride;\n x2 = flatCoordinates[offset];\n y2 = flatCoordinates[offset + 1];\n segmentM += segmentLength;\n segmentLength = Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n }\n do {\n advance();\n } while (offset < end - stride && segmentM + segmentLength < startM);\n\n let interpolate =\n segmentLength === 0 ? 0 : (startM - segmentM) / segmentLength;\n const beginX = lerp(x1, x2, interpolate);\n const beginY = lerp(y1, y2, interpolate);\n\n const startOffset = offset - stride;\n const startLength = segmentM;\n const endM = startM + scale * measureAndCacheTextWidth(font, text, cache);\n while (offset < end - stride && segmentM + segmentLength < endM) {\n advance();\n }\n interpolate = segmentLength === 0 ? 0 : (endM - segmentM) / segmentLength;\n const endX = lerp(x1, x2, interpolate);\n const endY = lerp(y1, y2, interpolate);\n\n // Keep text upright if the option is selected\n let reverse = false;\n if (keepUpright) {\n if (rotation) {\n const flat = [beginX, beginY, endX, endY];\n rotate(flat, 0, 4, 2, rotation, flat, flat);\n reverse = flat[0] > flat[2];\n } else {\n reverse = beginX > endX;\n }\n }\n\n const PI = Math.PI;\n const result = [];\n const singleSegment = startOffset + stride === offset;\n\n offset = startOffset;\n segmentLength = 0;\n segmentM = startLength;\n x2 = flatCoordinates[offset];\n y2 = flatCoordinates[offset + 1];\n\n let previousAngle;\n // All on the same segment\n if (singleSegment) {\n advance();\n\n previousAngle = Math.atan2(y2 - y1, x2 - x1);\n if (reverse) {\n previousAngle += previousAngle > 0 ? -PI : PI;\n }\n const x = (endX + beginX) / 2;\n const y = (endY + beginY) / 2;\n result[0] = [x, y, (endM - startM) / 2, previousAngle, text];\n return result;\n }\n\n // rendering across line segments\n text = text.replace(/\\n/g, ' '); // ensure rendering in single-line as all calculations below don't handle multi-lines\n\n for (let i = 0, ii = text.length; i < ii; ) {\n advance();\n let angle = Math.atan2(y2 - y1, x2 - x1);\n if (reverse) {\n angle += angle > 0 ? -PI : PI;\n }\n if (previousAngle !== undefined) {\n let delta = angle - previousAngle;\n delta += delta > PI ? -2 * PI : delta < -PI ? 2 * PI : 0;\n if (Math.abs(delta) > maxAngle) {\n return null;\n }\n }\n previousAngle = angle;\n\n const iStart = i;\n let charLength = 0;\n for (; i < ii; ++i) {\n const index = reverse ? ii - i - 1 : i;\n const len = scale * measureAndCacheTextWidth(font, text[index], cache);\n if (\n offset + stride < end &&\n segmentM + segmentLength < startM + charLength + len / 2\n ) {\n break;\n }\n charLength += len;\n }\n if (i === iStart) {\n continue;\n }\n const chars = reverse\n ? text.substring(ii - iStart, ii - i)\n : text.substring(iStart, i);\n interpolate =\n segmentLength === 0\n ? 0\n : (startM + charLength / 2 - segmentM) / segmentLength;\n const x = lerp(x1, x2, interpolate);\n const y = lerp(y1, y2, interpolate);\n result.push([x, y, charLength / 2, angle, chars]);\n startM += charLength;\n }\n return result;\n}\n", "/**\n * @module ol/render/canvas/Executor\n */\nimport {equals} from '../../array.js';\nimport {createEmpty, createOrUpdate, intersects} from '../../extent.js';\nimport {lineStringLength} from '../../geom/flat/length.js';\nimport {offsetLineVertex} from '../../geom/flat/lineoffset.js';\nimport {drawTextOnPath} from '../../geom/flat/textpath.js';\nimport {transform2D} from '../../geom/flat/transform.js';\nimport {\n apply as applyTransform,\n compose as composeTransform,\n create as createTransform,\n setFromArray as transformSetFromArray,\n} from '../../transform.js';\nimport ZIndexContext from '../canvas/ZIndexContext.js';\nimport {\n defaultPadding,\n defaultTextAlign,\n defaultTextBaseline,\n drawImageOrLabel,\n getTextDimensions,\n measureAndCacheTextWidth,\n} from '../canvas.js';\nimport CanvasInstruction from './Instruction.js';\nimport {TEXT_ALIGN} from './TextBuilder.js';\n\n/**\n * @typedef {import('../../structs/RBush.js').Entry<import('../../Feature.js').FeatureLike>} DeclutterEntry\n */\n\n/**\n * @typedef {Object} ImageOrLabelDimensions\n * @property {number} drawImageX DrawImageX.\n * @property {number} drawImageY DrawImageY.\n * @property {number} drawImageW DrawImageW.\n * @property {number} drawImageH DrawImageH.\n * @property {number} originX OriginX.\n * @property {number} originY OriginY.\n * @property {Array<number>} scale Scale.\n * @property {DeclutterEntry} declutterBox DeclutterBox.\n * @property {import(\"../../transform.js\").Transform} canvasTransform CanvasTransform.\n */\n\n/**\n * @typedef {{0: CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D, 1: import('../../size.js').Size, 2: import(\"../canvas.js\").Label|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement, 3: ImageOrLabelDimensions, 4: number, 5: Array<*>, 6: Array<*>}} ReplayImageOrLabelArgs\n */\n\n/**\n * @template T\n * @typedef {function(import(\"../../Feature.js\").FeatureLike, import(\"../../geom/SimpleGeometry.js\").default, import(\"../../style/Style.js\").DeclutterMode): T} FeatureCallback\n */\n\n/**\n * @type {import(\"../../extent.js\").Extent}\n */\nconst tmpExtent = createEmpty();\n\n/** @type {import(\"../../coordinate.js\").Coordinate} */\nconst p1 = [];\n/** @type {import(\"../../coordinate.js\").Coordinate} */\nconst p2 = [];\n/** @type {import(\"../../coordinate.js\").Coordinate} */\nconst p3 = [];\n/** @type {import(\"../../coordinate.js\").Coordinate} */\nconst p4 = [];\n\n/**\n * @param {ReplayImageOrLabelArgs} replayImageOrLabelArgs Arguments to replayImageOrLabel\n * @return {DeclutterEntry} Declutter rbush entry.\n */\nfunction getDeclutterBox(replayImageOrLabelArgs) {\n return replayImageOrLabelArgs[3].declutterBox;\n}\n\nconst rtlRegEx = new RegExp(\n /* eslint-disable prettier/prettier */\n '[' +\n String.fromCharCode(0x00591) + '-' + String.fromCharCode(0x008ff) +\n String.fromCharCode(0x0fb1d) + '-' + String.fromCharCode(0x0fdff) +\n String.fromCharCode(0x0fe70) + '-' + String.fromCharCode(0x0fefc) +\n String.fromCharCode(0x10800) + '-' + String.fromCharCode(0x10fff) +\n String.fromCharCode(0x1e800) + '-' + String.fromCharCode(0x1efff) +\n ']'\n /* eslint-enable prettier/prettier */\n);\n\n/**\n * @param {string} text Text.\n * @param {CanvasTextAlign} align Alignment.\n * @return {number} Text alignment.\n */\nfunction horizontalTextAlign(text, align) {\n if (align === 'start') {\n align = rtlRegEx.test(text) ? 'right' : 'left';\n } else if (align === 'end') {\n align = rtlRegEx.test(text) ? 'left' : 'right';\n }\n return TEXT_ALIGN[align];\n}\n\n/**\n * @param {Array<string>} acc Accumulator.\n * @param {string} line Line of text.\n * @param {number} i Index\n * @return {Array<string>} Accumulator.\n */\nfunction createTextChunks(acc, line, i) {\n if (i > 0) {\n acc.push('\\n', '');\n }\n acc.push(line, '');\n return acc;\n}\n\n/**\n * Converts rich text to plain text for text along lines.\n * @param {string} result The resulting plain text.\n * @param {string} part Item of the rich text array.\n * @param {number} index Index of the item in the rich text array.\n * @return {string} The resulting plain text.\n */\nfunction richTextToPlainText(result, part, index) {\n if (index % 2 === 0) {\n result += part;\n }\n return result;\n}\n\nclass Executor {\n /**\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {boolean} overlaps The replay can have overlapping geometries.\n * @param {import(\"../canvas.js\").SerializableInstructions} instructions The serializable instructions.\n * @param {boolean} [deferredRendering] Enable deferred rendering.\n */\n constructor(\n resolution,\n pixelRatio,\n overlaps,\n instructions,\n deferredRendering,\n ) {\n /**\n * @protected\n * @type {boolean}\n */\n this.overlaps = overlaps;\n\n /**\n * @protected\n * @type {number}\n */\n this.pixelRatio = pixelRatio;\n\n /**\n * @protected\n * @const\n * @type {number}\n */\n this.resolution = resolution;\n\n /**\n * @private\n * @type {number}\n */\n this.alignAndScaleFill_;\n\n /**\n * @protected\n * @type {Array<*>}\n */\n this.instructions = instructions.instructions;\n\n /**\n * @protected\n * @type {Array<number>}\n */\n this.coordinates = instructions.coordinates;\n\n /**\n * @private\n * @type {!Object<number,import(\"../../coordinate.js\").Coordinate|Array<import(\"../../coordinate.js\").Coordinate>|Array<Array<import(\"../../coordinate.js\").Coordinate>>>}\n */\n this.coordinateCache_ = {};\n\n /**\n * @private\n * @type {!import(\"../../transform.js\").Transform}\n */\n this.renderedTransform_ = createTransform();\n\n /**\n * @protected\n * @type {Array<*>}\n */\n this.hitDetectionInstructions = instructions.hitDetectionInstructions;\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.pixelCoordinates_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.viewRotation_ = 0;\n\n /**\n * @type {!Object<string, import(\"../canvas.js\").FillState>}\n */\n this.fillStates = instructions.fillStates || {};\n\n /**\n * @type {!Object<string, import(\"../canvas.js\").StrokeState>}\n */\n this.strokeStates = instructions.strokeStates || {};\n\n /**\n * @type {!Object<string, import(\"../canvas.js\").TextState>}\n */\n this.textStates = instructions.textStates || {};\n\n /**\n * @private\n * @type {Object<string, Object<string, number>>}\n */\n this.widths_ = {};\n\n /**\n * @private\n * @type {Object<string, import(\"../canvas.js\").Label>}\n */\n this.labels_ = {};\n\n /**\n * @private\n * @type {import(\"../canvas/ZIndexContext.js\").default}\n */\n this.zIndexContext_ = deferredRendering ? new ZIndexContext() : null;\n }\n\n /**\n * @return {ZIndexContext} ZIndex context.\n */\n getZIndexContext() {\n return this.zIndexContext_;\n }\n\n /**\n * @param {string|Array<string>} text Text.\n * @param {string} textKey Text style key.\n * @param {string} fillKey Fill style key.\n * @param {string} strokeKey Stroke style key.\n * @return {import(\"../canvas.js\").Label} Label.\n */\n createLabel(text, textKey, fillKey, strokeKey) {\n const key = text + textKey + fillKey + strokeKey;\n if (this.labels_[key]) {\n return this.labels_[key];\n }\n const strokeState = strokeKey ? this.strokeStates[strokeKey] : null;\n const fillState = fillKey ? this.fillStates[fillKey] : null;\n const textState = this.textStates[textKey];\n const pixelRatio = this.pixelRatio;\n const scale = [\n textState.scale[0] * pixelRatio,\n textState.scale[1] * pixelRatio,\n ];\n const align = textState.justify\n ? TEXT_ALIGN[textState.justify]\n : horizontalTextAlign(\n Array.isArray(text) ? text[0] : text,\n textState.textAlign || defaultTextAlign,\n );\n const strokeWidth =\n strokeKey && strokeState.lineWidth ? strokeState.lineWidth : 0;\n\n const chunks = Array.isArray(text)\n ? text\n : String(text).split('\\n').reduce(createTextChunks, []);\n\n const {width, height, widths, heights, lineWidths} = getTextDimensions(\n textState,\n chunks,\n );\n const renderWidth = width + strokeWidth;\n const contextInstructions = [];\n // make canvas 2 pixels wider to account for italic text width measurement errors\n const w = (renderWidth + 2) * scale[0];\n const h = (height + strokeWidth) * scale[1];\n /** @type {import(\"../canvas.js\").Label} */\n const label = {\n width: w < 0 ? Math.floor(w) : Math.ceil(w),\n height: h < 0 ? Math.floor(h) : Math.ceil(h),\n contextInstructions: contextInstructions,\n };\n if (scale[0] != 1 || scale[1] != 1) {\n contextInstructions.push('scale', scale);\n }\n if (strokeKey) {\n contextInstructions.push('strokeStyle', strokeState.strokeStyle);\n contextInstructions.push('lineWidth', strokeWidth);\n contextInstructions.push('lineCap', strokeState.lineCap);\n contextInstructions.push('lineJoin', strokeState.lineJoin);\n contextInstructions.push('miterLimit', strokeState.miterLimit);\n contextInstructions.push('setLineDash', [strokeState.lineDash]);\n contextInstructions.push('lineDashOffset', strokeState.lineDashOffset);\n }\n if (fillKey) {\n contextInstructions.push('fillStyle', fillState.fillStyle);\n }\n contextInstructions.push('textBaseline', 'middle');\n contextInstructions.push('textAlign', 'center');\n const leftRight = 0.5 - align;\n let x = align * renderWidth + leftRight * strokeWidth;\n const strokeInstructions = [];\n const fillInstructions = [];\n let lineHeight = 0;\n let lineOffset = 0;\n let widthHeightIndex = 0;\n let lineWidthIndex = 0;\n let previousFont;\n for (let i = 0, ii = chunks.length; i < ii; i += 2) {\n const text = chunks[i];\n if (text === '\\n') {\n lineOffset += lineHeight;\n lineHeight = 0;\n x = align * renderWidth + leftRight * strokeWidth;\n ++lineWidthIndex;\n continue;\n }\n const font = chunks[i + 1] || textState.font;\n if (font !== previousFont) {\n if (strokeKey) {\n strokeInstructions.push('font', font);\n }\n if (fillKey) {\n fillInstructions.push('font', font);\n }\n previousFont = font;\n }\n lineHeight = Math.max(lineHeight, heights[widthHeightIndex]);\n const fillStrokeArgs = [\n text,\n x +\n leftRight * widths[widthHeightIndex] +\n align * (widths[widthHeightIndex] - lineWidths[lineWidthIndex]),\n 0.5 * (strokeWidth + lineHeight) + lineOffset,\n ];\n x += widths[widthHeightIndex];\n if (strokeKey) {\n strokeInstructions.push('strokeText', fillStrokeArgs);\n }\n if (fillKey) {\n fillInstructions.push('fillText', fillStrokeArgs);\n }\n ++widthHeightIndex;\n }\n Array.prototype.push.apply(contextInstructions, strokeInstructions);\n Array.prototype.push.apply(contextInstructions, fillInstructions);\n this.labels_[key] = label;\n return label;\n }\n\n /**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../../coordinate.js\").Coordinate} p1 1st point of the background box.\n * @param {import(\"../../coordinate.js\").Coordinate} p2 2nd point of the background box.\n * @param {import(\"../../coordinate.js\").Coordinate} p3 3rd point of the background box.\n * @param {import(\"../../coordinate.js\").Coordinate} p4 4th point of the background box.\n * @param {Array<*>} fillInstruction Fill instruction.\n * @param {Array<*>} strokeInstruction Stroke instruction.\n */\n replayTextBackground_(\n context,\n p1,\n p2,\n p3,\n p4,\n fillInstruction,\n strokeInstruction,\n ) {\n context.beginPath();\n context.moveTo.apply(context, p1);\n context.lineTo.apply(context, p2);\n context.lineTo.apply(context, p3);\n context.lineTo.apply(context, p4);\n context.lineTo.apply(context, p1);\n if (fillInstruction) {\n this.alignAndScaleFill_ = /** @type {number} */ (fillInstruction[2]);\n context.fillStyle = /** @type {string} */ (fillInstruction[1]);\n this.fill_(context);\n }\n if (strokeInstruction) {\n this.setStrokeStyle_(\n context,\n /** @type {Array<*>} */ (strokeInstruction),\n );\n context.stroke();\n }\n }\n\n /**\n * @private\n * @param {number} sheetWidth Width of the sprite sheet.\n * @param {number} sheetHeight Height of the sprite sheet.\n * @param {number} centerX X.\n * @param {number} centerY Y.\n * @param {number} width Width.\n * @param {number} height Height.\n * @param {number} anchorX Anchor X.\n * @param {number} anchorY Anchor Y.\n * @param {number} originX Origin X.\n * @param {number} originY Origin Y.\n * @param {number} rotation Rotation.\n * @param {import(\"../../size.js\").Size} scale Scale.\n * @param {boolean} snapToPixel Snap to pixel.\n * @param {Array<number>} padding Padding.\n * @param {boolean} fillStroke Background fill or stroke.\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @return {ImageOrLabelDimensions} Dimensions for positioning and decluttering the image or label.\n */\n calculateImageOrLabelDimensions_(\n sheetWidth,\n sheetHeight,\n centerX,\n centerY,\n width,\n height,\n anchorX,\n anchorY,\n originX,\n originY,\n rotation,\n scale,\n snapToPixel,\n padding,\n fillStroke,\n feature,\n ) {\n anchorX *= scale[0];\n anchorY *= scale[1];\n let x = centerX - anchorX;\n let y = centerY - anchorY;\n\n const w = width + originX > sheetWidth ? sheetWidth - originX : width;\n const h = height + originY > sheetHeight ? sheetHeight - originY : height;\n const boxW = padding[3] + w * scale[0] + padding[1];\n const boxH = padding[0] + h * scale[1] + padding[2];\n const boxX = x - padding[3];\n const boxY = y - padding[0];\n\n if (fillStroke || rotation !== 0) {\n p1[0] = boxX;\n p4[0] = boxX;\n p1[1] = boxY;\n p2[1] = boxY;\n p2[0] = boxX + boxW;\n p3[0] = p2[0];\n p3[1] = boxY + boxH;\n p4[1] = p3[1];\n }\n\n let transform;\n if (rotation !== 0) {\n transform = composeTransform(\n createTransform(),\n centerX,\n centerY,\n 1,\n 1,\n rotation,\n -centerX,\n -centerY,\n );\n\n applyTransform(transform, p1);\n applyTransform(transform, p2);\n applyTransform(transform, p3);\n applyTransform(transform, p4);\n createOrUpdate(\n Math.min(p1[0], p2[0], p3[0], p4[0]),\n Math.min(p1[1], p2[1], p3[1], p4[1]),\n Math.max(p1[0], p2[0], p3[0], p4[0]),\n Math.max(p1[1], p2[1], p3[1], p4[1]),\n tmpExtent,\n );\n } else {\n createOrUpdate(\n Math.min(boxX, boxX + boxW),\n Math.min(boxY, boxY + boxH),\n Math.max(boxX, boxX + boxW),\n Math.max(boxY, boxY + boxH),\n tmpExtent,\n );\n }\n if (snapToPixel) {\n x = Math.round(x);\n y = Math.round(y);\n }\n return {\n drawImageX: x,\n drawImageY: y,\n drawImageW: w,\n drawImageH: h,\n originX: originX,\n originY: originY,\n declutterBox: {\n minX: tmpExtent[0],\n minY: tmpExtent[1],\n maxX: tmpExtent[2],\n maxY: tmpExtent[3],\n value: feature,\n },\n canvasTransform: transform,\n scale: scale,\n };\n }\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import('../../size.js').Size} scaledCanvasSize Scaled canvas size.\n * @param {import(\"../canvas.js\").Label|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement} imageOrLabel Image.\n * @param {ImageOrLabelDimensions} dimensions Dimensions.\n * @param {number} opacity Opacity.\n * @param {Array<*>} fillInstruction Fill instruction.\n * @param {Array<*>} strokeInstruction Stroke instruction.\n * @return {boolean} The image or label was rendered.\n */\n replayImageOrLabel_(\n context,\n scaledCanvasSize,\n imageOrLabel,\n dimensions,\n opacity,\n fillInstruction,\n strokeInstruction,\n ) {\n const fillStroke = !!(fillInstruction || strokeInstruction);\n\n const box = dimensions.declutterBox;\n const strokePadding = strokeInstruction\n ? (strokeInstruction[2] * dimensions.scale[0]) / 2\n : 0;\n const intersects =\n box.minX - strokePadding <= scaledCanvasSize[0] &&\n box.maxX + strokePadding >= 0 &&\n box.minY - strokePadding <= scaledCanvasSize[1] &&\n box.maxY + strokePadding >= 0;\n\n if (intersects) {\n if (fillStroke) {\n this.replayTextBackground_(\n context,\n p1,\n p2,\n p3,\n p4,\n /** @type {Array<*>} */ (fillInstruction),\n /** @type {Array<*>} */ (strokeInstruction),\n );\n }\n drawImageOrLabel(\n context,\n dimensions.canvasTransform,\n opacity,\n imageOrLabel,\n dimensions.originX,\n dimensions.originY,\n dimensions.drawImageW,\n dimensions.drawImageH,\n dimensions.drawImageX,\n dimensions.drawImageY,\n dimensions.scale,\n );\n }\n return true;\n }\n\n /**\n * @private\n * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n */\n fill_(context) {\n const alignAndScale = this.alignAndScaleFill_;\n if (alignAndScale) {\n const origin = applyTransform(this.renderedTransform_, [0, 0]);\n const repeatSize = 512 * this.pixelRatio;\n context.save();\n context.translate(origin[0] % repeatSize, origin[1] % repeatSize);\n if (alignAndScale !== 1) {\n context.scale(alignAndScale, alignAndScale);\n }\n }\n context.fill();\n if (alignAndScale) {\n context.restore();\n }\n }\n\n /**\n * @private\n * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n * @param {Array<*>} instruction Instruction.\n */\n setStrokeStyle_(context, instruction) {\n context.strokeStyle =\n /** @type {import(\"../../colorlike.js\").ColorLike} */ (instruction[1]);\n if (!instruction[1]) {\n return;\n }\n context.lineWidth = /** @type {number} */ (instruction[2]);\n context.lineCap = /** @type {CanvasLineCap} */ (instruction[3]);\n context.lineJoin = /** @type {CanvasLineJoin} */ (instruction[4]);\n context.miterLimit = /** @type {number} */ (instruction[5]);\n context.lineDashOffset = /** @type {number} */ (instruction[7]);\n context.setLineDash(/** @type {Array<number>} */ (instruction[6]));\n }\n\n /**\n * @private\n * @param {string|Array<string>} text The text to draw.\n * @param {string} textKey The key of the text state.\n * @param {string} strokeKey The key for the stroke state.\n * @param {string} fillKey The key for the fill state.\n * @return {{label: import(\"../canvas.js\").Label, anchorX: number, anchorY: number}} The text image and its anchor.\n */\n drawLabelWithPointPlacement_(text, textKey, strokeKey, fillKey) {\n const textState = this.textStates[textKey];\n\n const label = this.createLabel(text, textKey, fillKey, strokeKey);\n\n const strokeState = this.strokeStates[strokeKey];\n const pixelRatio = this.pixelRatio;\n const align = horizontalTextAlign(\n Array.isArray(text) ? text[0] : text,\n textState.textAlign || defaultTextAlign,\n );\n const baseline = TEXT_ALIGN[textState.textBaseline || defaultTextBaseline];\n const strokeWidth =\n strokeState && strokeState.lineWidth ? strokeState.lineWidth : 0;\n\n // Remove the 2 pixels we added in createLabel() for the anchor\n const width = label.width / pixelRatio - 2 * textState.scale[0];\n const anchorX = align * width + 2 * (0.5 - align) * strokeWidth;\n const anchorY =\n (baseline * label.height) / pixelRatio +\n 2 * (0.5 - baseline) * strokeWidth;\n\n return {\n label: label,\n anchorX: anchorX,\n anchorY: anchorY,\n };\n }\n\n /**\n * @private\n * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n * @param {import('../../size.js').Size} scaledCanvasSize Scaled canvas size\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {Array<*>} instructions Instructions array.\n * @param {boolean} snapToPixel Snap point symbols and text to integer pixels.\n * @param {FeatureCallback<T>} [featureCallback] Feature callback.\n * @param {import(\"../../extent.js\").Extent} [hitExtent] Only check\n * features that intersect this extent.\n * @param {import(\"rbush\").default<DeclutterEntry>} [declutterTree] Declutter tree.\n * @return {T|undefined} Callback result.\n * @template T\n */\n execute_(\n context,\n scaledCanvasSize,\n transform,\n instructions,\n snapToPixel,\n featureCallback,\n hitExtent,\n declutterTree,\n ) {\n const zIndexContext = this.zIndexContext_;\n /** @type {Array<number>} */\n let pixelCoordinates;\n if (this.pixelCoordinates_ && equals(transform, this.renderedTransform_)) {\n pixelCoordinates = this.pixelCoordinates_;\n } else {\n if (!this.pixelCoordinates_) {\n this.pixelCoordinates_ = [];\n }\n pixelCoordinates = transform2D(\n this.coordinates,\n 0,\n this.coordinates.length,\n 2,\n transform,\n this.pixelCoordinates_,\n );\n transformSetFromArray(this.renderedTransform_, transform);\n }\n let i = 0; // instruction index\n const ii = instructions.length; // end of instructions\n let d = 0; // data index\n let dd; // end of per-instruction data\n let anchorX,\n anchorY,\n lineOffsetPx,\n /** @type {boolean} */ isClosedRing,\n /** @type {number} */ dStart,\n /** @type {import('../../style/Style.js').DeclutterMode} */\n declutterMode,\n prevX,\n prevY,\n roundX,\n roundY,\n image,\n text,\n textKey,\n strokeKey,\n fillKey;\n let pendingFill = 0;\n let pendingStroke = 0;\n const coordinateCache = this.coordinateCache_;\n const viewRotation = this.viewRotation_;\n const viewRotationFromTransform =\n Math.round(Math.atan2(-transform[1], transform[0]) * 1e12) / 1e12;\n\n const state = /** @type {import(\"../../render.js\").State} */ ({\n context: context,\n pixelRatio: this.pixelRatio,\n resolution: this.resolution,\n rotation: viewRotation,\n });\n\n // When the batch size gets too big, performance decreases. 200 is a good\n // balance between batch size and number of fill/stroke instructions.\n const batchSize =\n this.instructions != instructions || this.overlaps ? 0 : 200;\n let /** @type {import(\"../../Feature.js\").FeatureLike} */ feature;\n let x, y, currentGeometry;\n while (i < ii) {\n const instruction = instructions[i];\n const type = /** @type {import(\"./Instruction.js\").default} */ (\n instruction[0]\n );\n switch (type) {\n case CanvasInstruction.BEGIN_GEOMETRY:\n feature = /** @type {import(\"../../Feature.js\").FeatureLike} */ (\n instruction[1]\n );\n currentGeometry = instruction[3];\n if (!feature.getGeometry()) {\n i = /** @type {number} */ (instruction[2]);\n } else if (\n hitExtent !== undefined &&\n !intersects(hitExtent, currentGeometry.getExtent())\n ) {\n i = /** @type {number} */ (instruction[2]) + 1;\n } else {\n ++i;\n }\n if (zIndexContext) {\n zIndexContext.zIndex = instruction[4];\n }\n break;\n case CanvasInstruction.BEGIN_PATH:\n if (pendingFill > batchSize) {\n this.fill_(context);\n pendingFill = 0;\n }\n if (pendingStroke > batchSize) {\n context.stroke();\n pendingStroke = 0;\n }\n if (!pendingFill && !pendingStroke) {\n context.beginPath();\n prevX = NaN;\n prevY = NaN;\n }\n ++i;\n break;\n case CanvasInstruction.CIRCLE:\n d = /** @type {number} */ (instruction[1]);\n lineOffsetPx = /** @type {number} */ instruction[2] ?? 0;\n const x1 = pixelCoordinates[d];\n const y1 = pixelCoordinates[d + 1];\n const x2 = pixelCoordinates[d + 2] - lineOffsetPx;\n const y2 = pixelCoordinates[d + 3] - lineOffsetPx;\n const dx = x2 - x1;\n const dy = y2 - y1;\n const r = Math.sqrt(dx * dx + dy * dy);\n context.moveTo(x1 + r, y1);\n context.arc(x1, y1, r, 0, 2 * Math.PI, true);\n ++i;\n break;\n case CanvasInstruction.CLOSE_PATH:\n context.closePath();\n ++i;\n break;\n case CanvasInstruction.CUSTOM:\n d = /** @type {number} */ (instruction[1]);\n dd = instruction[2];\n const geometry =\n /** @type {import(\"../../geom/SimpleGeometry.js\").default} */ (\n instruction[3]\n );\n const renderer = instruction[4];\n const fn = instruction[5];\n state.geometry = geometry;\n state.feature = feature;\n if (!(i in coordinateCache)) {\n coordinateCache[i] = [];\n }\n const coords = coordinateCache[i];\n if (fn) {\n fn(pixelCoordinates, d, dd, 2, coords);\n } else {\n coords[0] = pixelCoordinates[d];\n coords[1] = pixelCoordinates[d + 1];\n coords.length = 2;\n }\n if (zIndexContext) {\n zIndexContext.zIndex = instruction[6];\n }\n renderer(coords, state);\n ++i;\n break;\n case CanvasInstruction.DRAW_IMAGE:\n d = /** @type {number} */ (instruction[1]);\n dd = /** @type {number} */ (instruction[2]);\n image =\n /** @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} */ (\n instruction[3]\n );\n\n // Remaining arguments in DRAW_IMAGE are in alphabetical order\n anchorX = /** @type {number} */ (instruction[4]);\n anchorY = /** @type {number} */ (instruction[5]);\n let height = /** @type {number} */ (instruction[6]);\n const opacity = /** @type {number} */ (instruction[7]);\n const originX = /** @type {number} */ (instruction[8]);\n const originY = /** @type {number} */ (instruction[9]);\n const rotateWithView = /** @type {boolean} */ (instruction[10]);\n let rotation = /** @type {number} */ (instruction[11]);\n const scale = /** @type {import(\"../../size.js\").Size} */ (\n instruction[12]\n );\n let width = /** @type {number} */ (instruction[13]);\n declutterMode = instruction[14] || 'declutter';\n const declutterImageWithText =\n /** @type {{args: import(\"../canvas.js\").DeclutterImageWithText, declutterMode: import('../../style/Style.js').DeclutterMode}} */ (\n instruction[15]\n );\n\n if (!image && instruction.length >= 20) {\n // create label images\n text = /** @type {string} */ (instruction[19]);\n textKey = /** @type {string} */ (instruction[20]);\n strokeKey = /** @type {string} */ (instruction[21]);\n fillKey = /** @type {string} */ (instruction[22]);\n const labelWithAnchor = this.drawLabelWithPointPlacement_(\n text,\n textKey,\n strokeKey,\n fillKey,\n );\n image = labelWithAnchor.label;\n instruction[3] = image;\n const textOffsetX = /** @type {number} */ (instruction[23]);\n anchorX = (labelWithAnchor.anchorX - textOffsetX) * this.pixelRatio;\n instruction[4] = anchorX;\n const textOffsetY = /** @type {number} */ (instruction[24]);\n anchorY = (labelWithAnchor.anchorY - textOffsetY) * this.pixelRatio;\n instruction[5] = anchorY;\n height = image.height;\n instruction[6] = height;\n width = image.width;\n instruction[13] = width;\n }\n\n let geometryWidths;\n if (instruction.length > 25) {\n geometryWidths = /** @type {number} */ (instruction[25]);\n }\n\n let padding, backgroundFillInstruction, backgroundStrokeInstruction;\n if (instruction.length > 17) {\n padding = /** @type {Array<number>} */ (instruction[16]);\n backgroundFillInstruction = /** @type {Array<*>} */ (\n instruction[17]\n );\n backgroundStrokeInstruction = /** @type {Array<*>} */ (\n instruction[18]\n );\n } else {\n padding = defaultPadding;\n backgroundFillInstruction = null;\n backgroundStrokeInstruction = null;\n }\n\n if (rotateWithView && viewRotationFromTransform) {\n // Canvas is expected to be rotated to reverse view rotation.\n rotation += viewRotation;\n } else if (!rotateWithView && !viewRotationFromTransform) {\n // Canvas is not rotated, images need to be rotated back to be north-up.\n rotation -= viewRotation;\n }\n let widthIndex = 0;\n for (; d < dd; d += 2) {\n if (\n geometryWidths &&\n geometryWidths[widthIndex++] < width / this.pixelRatio\n ) {\n continue;\n }\n const dimensions = this.calculateImageOrLabelDimensions_(\n image.width,\n image.height,\n pixelCoordinates[d],\n pixelCoordinates[d + 1],\n width,\n height,\n anchorX,\n anchorY,\n originX,\n originY,\n rotation,\n scale,\n snapToPixel,\n padding,\n !!backgroundFillInstruction || !!backgroundStrokeInstruction,\n feature,\n );\n /** @type {ReplayImageOrLabelArgs} */\n const args = [\n context,\n scaledCanvasSize,\n image,\n dimensions,\n opacity,\n backgroundFillInstruction,\n backgroundStrokeInstruction,\n ];\n if (declutterTree) {\n let imageArgs, imageDeclutterMode, imageDeclutterBox;\n if (declutterImageWithText) {\n const index = dd - d;\n if (!declutterImageWithText[index]) {\n // We now have the image for an image+text combination.\n declutterImageWithText[index] = {args, declutterMode};\n // Don't render anything for now, wait for the text.\n continue;\n }\n const imageDeclutter = declutterImageWithText[index];\n imageArgs = imageDeclutter.args;\n imageDeclutterMode = imageDeclutter.declutterMode;\n delete declutterImageWithText[index];\n imageDeclutterBox = getDeclutterBox(imageArgs);\n }\n // We now have image and text for an image+text combination.\n let renderImage, renderText;\n if (\n imageArgs &&\n (imageDeclutterMode !== 'declutter' ||\n !declutterTree.collides(imageDeclutterBox))\n ) {\n renderImage = true;\n }\n if (\n declutterMode !== 'declutter' ||\n !declutterTree.collides(dimensions.declutterBox)\n ) {\n renderText = true;\n }\n if (\n imageDeclutterMode === 'declutter' &&\n declutterMode === 'declutter'\n ) {\n const render = renderImage && renderText;\n renderImage = render;\n renderText = render;\n }\n if (renderImage) {\n if (imageDeclutterMode !== 'none') {\n declutterTree.insert(imageDeclutterBox);\n }\n this.replayImageOrLabel_.apply(this, imageArgs);\n }\n if (renderText) {\n if (declutterMode !== 'none') {\n declutterTree.insert(dimensions.declutterBox);\n }\n this.replayImageOrLabel_.apply(this, args);\n }\n } else {\n this.replayImageOrLabel_.apply(this, args);\n }\n }\n ++i;\n break;\n case CanvasInstruction.DRAW_CHARS:\n const begin = /** @type {number} */ (instruction[1]);\n const end = /** @type {number} */ (instruction[2]);\n const baseline = /** @type {number} */ (instruction[3]);\n const overflow = /** @type {number} */ (instruction[4]);\n fillKey = /** @type {string} */ (instruction[5]);\n const maxAngle = /** @type {number} */ (instruction[6]);\n const measurePixelRatio = /** @type {number} */ (instruction[7]);\n const offsetY = /** @type {number} */ (instruction[8]);\n strokeKey = /** @type {string} */ (instruction[9]);\n const strokeWidth = /** @type {number} */ (instruction[10]);\n text = /** @type {string|Array<string>} */ (instruction[11]);\n if (Array.isArray(text)) {\n //FIXME Add support for rich text along lines\n text = text.reduce(richTextToPlainText, '');\n }\n textKey = /** @type {string} */ (instruction[12]);\n const pixelRatioScale = [\n /** @type {number} */ (instruction[13]),\n /** @type {number} */ (instruction[13]),\n ];\n declutterMode = instruction[14] || 'declutter';\n\n const textKeepUpright = /** @type {boolean} */ (instruction[15]);\n const textState = this.textStates[textKey];\n const font = textState.font;\n const textScale = [\n textState.scale[0] * measurePixelRatio,\n textState.scale[1] * measurePixelRatio,\n ];\n\n let cachedWidths;\n if (font in this.widths_) {\n cachedWidths = this.widths_[font];\n } else {\n cachedWidths = {};\n this.widths_[font] = cachedWidths;\n }\n\n const pathLength = lineStringLength(pixelCoordinates, begin, end, 2);\n const textLength =\n Math.abs(textScale[0]) *\n measureAndCacheTextWidth(font, text, cachedWidths);\n if (overflow || textLength <= pathLength) {\n const textAlign = this.textStates[textKey].textAlign;\n const startM =\n (pathLength - textLength) * horizontalTextAlign(text, textAlign);\n const parts = drawTextOnPath(\n pixelCoordinates,\n begin,\n end,\n 2,\n text,\n startM,\n maxAngle,\n Math.abs(textScale[0]),\n measureAndCacheTextWidth,\n font,\n cachedWidths,\n viewRotationFromTransform ? 0 : this.viewRotation_,\n textKeepUpright,\n );\n drawChars: if (parts) {\n /** @type {Array<ReplayImageOrLabelArgs>} */\n const replayImageOrLabelArgs = [];\n let c, cc, chars, label, part;\n if (strokeKey) {\n for (c = 0, cc = parts.length; c < cc; ++c) {\n part = parts[c]; // x, y, anchorX, rotation, chunk\n chars = /** @type {string} */ (part[4]);\n label = this.createLabel(chars, textKey, '', strokeKey);\n anchorX =\n /** @type {number} */ (part[2]) +\n (textScale[0] < 0 ? -strokeWidth : strokeWidth);\n anchorY =\n baseline * label.height +\n ((0.5 - baseline) * 2 * strokeWidth * textScale[1]) /\n textScale[0] -\n offsetY;\n const dimensions = this.calculateImageOrLabelDimensions_(\n label.width,\n label.height,\n part[0],\n part[1],\n label.width,\n label.height,\n anchorX,\n anchorY,\n 0,\n 0,\n part[3],\n pixelRatioScale,\n false,\n defaultPadding,\n false,\n feature,\n );\n if (\n declutterTree &&\n declutterMode === 'declutter' &&\n declutterTree.collides(dimensions.declutterBox)\n ) {\n break drawChars;\n }\n replayImageOrLabelArgs.push([\n context,\n scaledCanvasSize,\n label,\n dimensions,\n 1,\n null,\n null,\n ]);\n }\n }\n if (fillKey) {\n for (c = 0, cc = parts.length; c < cc; ++c) {\n part = parts[c]; // x, y, anchorX, rotation, chunk\n chars = /** @type {string} */ (part[4]);\n label = this.createLabel(chars, textKey, fillKey, '');\n anchorX = /** @type {number} */ (part[2]);\n anchorY = baseline * label.height - offsetY;\n const dimensions = this.calculateImageOrLabelDimensions_(\n label.width,\n label.height,\n part[0],\n part[1],\n label.width,\n label.height,\n anchorX,\n anchorY,\n 0,\n 0,\n part[3],\n pixelRatioScale,\n false,\n defaultPadding,\n false,\n feature,\n );\n if (\n declutterTree &&\n declutterMode === 'declutter' &&\n declutterTree.collides(dimensions.declutterBox)\n ) {\n break drawChars;\n }\n replayImageOrLabelArgs.push([\n context,\n scaledCanvasSize,\n label,\n dimensions,\n 1,\n null,\n null,\n ]);\n }\n }\n if (declutterTree && declutterMode !== 'none') {\n declutterTree.load(replayImageOrLabelArgs.map(getDeclutterBox));\n }\n for (let i = 0, ii = replayImageOrLabelArgs.length; i < ii; ++i) {\n this.replayImageOrLabel_.apply(this, replayImageOrLabelArgs[i]);\n }\n }\n }\n ++i;\n break;\n case CanvasInstruction.END_GEOMETRY:\n if (featureCallback !== undefined) {\n feature = /** @type {import(\"../../Feature.js\").FeatureLike} */ (\n instruction[1]\n );\n const result = featureCallback(\n feature,\n currentGeometry,\n declutterMode,\n );\n if (result) {\n return result;\n }\n }\n ++i;\n break;\n case CanvasInstruction.FILL:\n if (batchSize) {\n pendingFill++;\n } else {\n this.fill_(context);\n }\n ++i;\n break;\n case CanvasInstruction.MOVE_TO_LINE_TO:\n d = /** @type {number} */ (instruction[1]);\n dd = /** @type {number} */ (instruction[2]);\n lineOffsetPx = /** @type {number|undefined} */ (instruction[3]);\n isClosedRing =\n /** @type {boolean|undefined} */ (instruction[4]) ?? false;\n x = pixelCoordinates[d];\n y = pixelCoordinates[d + 1];\n\n if (lineOffsetPx) {\n dStart = d;\n [x, y] = offsetLineVertex(\n x,\n y,\n isClosedRing ? pixelCoordinates[dd - 4] : undefined,\n isClosedRing ? pixelCoordinates[dd - 3] : undefined,\n pixelCoordinates[d + 2],\n pixelCoordinates[d + 3],\n lineOffsetPx,\n );\n }\n\n context.moveTo(x, y);\n prevX = (x + 0.5) | 0;\n prevY = (y + 0.5) | 0;\n for (d += 2; d < dd; d += 2) {\n x = pixelCoordinates[d];\n y = pixelCoordinates[d + 1];\n roundX = (x + 0.5) | 0;\n roundY = (y + 0.5) | 0;\n if (d == dd - 2 || roundX !== prevX || roundY !== prevY) {\n if (lineOffsetPx) {\n if (d == dd - 2) {\n // last coordinate\n [x, y] = offsetLineVertex(\n x,\n y,\n pixelCoordinates[d - 2],\n pixelCoordinates[d - 1],\n isClosedRing ? pixelCoordinates[dStart + 2] : undefined,\n isClosedRing ? pixelCoordinates[dStart + 3] : undefined,\n lineOffsetPx,\n );\n } else {\n [x, y] = offsetLineVertex(\n x,\n y,\n pixelCoordinates[d - 2],\n pixelCoordinates[d - 1],\n pixelCoordinates[d + 2],\n pixelCoordinates[d + 3],\n lineOffsetPx,\n );\n }\n }\n\n context.lineTo(x, y);\n prevX = roundX;\n prevY = roundY;\n }\n }\n ++i;\n break;\n case CanvasInstruction.SET_FILL_STYLE:\n this.alignAndScaleFill_ = instruction[2];\n\n if (pendingFill) {\n this.fill_(context);\n pendingFill = 0;\n if (pendingStroke) {\n context.stroke();\n pendingStroke = 0;\n }\n }\n\n /** @type {import(\"../../colorlike.js\").ColorLike} */\n context.fillStyle = instruction[1];\n ++i;\n break;\n case CanvasInstruction.SET_STROKE_STYLE:\n if (pendingStroke) {\n context.stroke();\n pendingStroke = 0;\n }\n this.setStrokeStyle_(context, /** @type {Array<*>} */ (instruction));\n ++i;\n break;\n case CanvasInstruction.STROKE:\n if (batchSize) {\n pendingStroke++;\n } else {\n context.stroke();\n }\n ++i;\n break;\n default: // consume the instruction anyway, to avoid an infinite loop\n ++i;\n break;\n }\n }\n if (pendingFill) {\n this.fill_(context);\n }\n if (pendingStroke) {\n context.stroke();\n }\n return undefined;\n }\n\n /**\n * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n * @param {import('../../size.js').Size} scaledCanvasSize Scaled canvas size.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {number} viewRotation View rotation.\n * @param {boolean} snapToPixel Snap point symbols and text to integer pixels.\n * @param {import(\"rbush\").default<DeclutterEntry>} [declutterTree] Declutter tree.\n */\n execute(\n context,\n scaledCanvasSize,\n transform,\n viewRotation,\n snapToPixel,\n declutterTree,\n ) {\n this.viewRotation_ = viewRotation;\n this.execute_(\n context,\n scaledCanvasSize,\n transform,\n this.instructions,\n snapToPixel,\n undefined,\n undefined,\n declutterTree,\n );\n }\n\n /**\n * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {number} viewRotation View rotation.\n * @param {FeatureCallback<T>} [featureCallback] Feature callback.\n * @param {import(\"../../extent.js\").Extent} [hitExtent] Only check\n * features that intersect this extent.\n * @return {T|undefined} Callback result.\n * @template T\n */\n executeHitDetection(\n context,\n transform,\n viewRotation,\n featureCallback,\n hitExtent,\n ) {\n this.viewRotation_ = viewRotation;\n return this.execute_(\n context,\n [context.canvas.width, context.canvas.height],\n transform,\n this.hitDetectionInstructions,\n true,\n featureCallback,\n hitExtent,\n );\n }\n}\n\nexport default Executor;\n", "/**\n * @module ol/render/canvas/ExecutorGroup\n */\n\nimport {ascending, descending} from '../../array.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {buffer, createEmpty, extendCoordinate} from '../../extent.js';\nimport {transform2D} from '../../geom/flat/transform.js';\nimport {isEmpty} from '../../obj.js';\nimport {\n compose as composeTransform,\n create as createTransform,\n} from '../../transform.js';\nimport Executor from './Executor.js';\n\n/**\n * @const\n * @type {Array<import(\"../canvas.js\").BuilderType>}\n */\nexport const ALL = [\n 'Polygon',\n 'Circle',\n 'LineString',\n 'Image',\n 'Text',\n 'Default',\n];\n\n/**\n * @const\n * @type {Array<import(\"../canvas.js\").BuilderType>}\n */\nexport const DECLUTTER = ['Image', 'Text'];\n\n/**\n * @const\n * @type {Array<import(\"../canvas.js\").BuilderType>}\n */\nexport const NON_DECLUTTER = ALL.filter(\n (builderType) => !DECLUTTER.includes(builderType),\n);\n\n/** @type {boolean|undefined} */\nlet willReadFrequently = false;\n\n/** @type {boolean|undefined} */\nlet canvasReadsBenchmarked = false;\n\n/** Determine if canvas read operations are faster with willReadFrequently set to true or false */\nfunction benchmarkCanvasReads() {\n let bestResult = 0;\n /**\n * @param {boolean} willReadFrequently Will read frequently.\n * @return {number} Operation count.\n */\n const measure = (willReadFrequently) => {\n const context = createCanvasContext2D(1, 1, null, {willReadFrequently});\n let count = 0;\n const start = performance.now();\n for (; performance.now() - start < 50; ++count) {\n context.fillStyle = `rgba(255,0,${count % 256},1)`;\n context.fillRect(0, 0, 1, 1);\n context.getImageData(0, 0, 1, 1);\n }\n bestResult = count > bestResult ? count : bestResult;\n return count;\n };\n\n const measures = {\n [measure(true)]: true,\n [measure(false)]: false,\n [measure(undefined)]: undefined,\n };\n willReadFrequently = measures[bestResult];\n canvasReadsBenchmarked = true;\n}\n\nclass ExecutorGroup {\n /**\n * @param {import(\"../../extent.js\").Extent} maxExtent Max extent for clipping. When a\n * `maxExtent` was set on the Builder for this executor group, the same `maxExtent`\n * should be set here, unless the target context does not exceed that extent (which\n * can be the case when rendering to tiles).\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {boolean} overlaps The executor group can have overlapping geometries.\n * @param {!Object<string, !Object<import(\"../canvas.js\").BuilderType, import(\"../canvas.js\").SerializableInstructions>>} allInstructions\n * The serializable instructions.\n * @param {number} [renderBuffer] Optional rendering buffer.\n * @param {boolean} [deferredRendering] Enable deferred rendering with renderDeferred().\n */\n constructor(\n maxExtent,\n resolution,\n pixelRatio,\n overlaps,\n allInstructions,\n renderBuffer,\n deferredRendering,\n ) {\n /**\n * @private\n * @type {import(\"../../extent.js\").Extent}\n */\n this.maxExtent_ = maxExtent;\n\n /**\n * @private\n * @type {boolean}\n */\n this.overlaps_ = overlaps;\n\n /**\n * @private\n * @type {number}\n */\n this.pixelRatio_ = pixelRatio;\n\n /**\n * @private\n * @type {number}\n */\n this.resolution_ = resolution;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.renderBuffer_ = renderBuffer;\n\n /**\n * @private\n * @type {!Object<string, !Object<string, import(\"./Executor\").default>>}\n */\n this.executorsByZIndex_ = {};\n\n /**\n * @private\n * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D}\n */\n this.hitDetectionContext_ = null;\n\n /**\n * @private\n * @type {import(\"../../transform.js\").Transform}\n */\n this.hitDetectionTransform_ = createTransform();\n\n /**\n * @private\n * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D}\n */\n this.renderedContext_ = null;\n\n /**\n * @private\n * @type {Object<number, Array<import(\"./ZIndexContext.js\").default>>}\n */\n this.deferredZIndexContexts_ = {};\n\n this.createExecutors_(allInstructions, deferredRendering);\n }\n\n /**\n * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n */\n clip(context, transform) {\n const flatClipCoords = this.getClipCoords(transform);\n context.beginPath();\n context.moveTo(flatClipCoords[0], flatClipCoords[1]);\n context.lineTo(flatClipCoords[2], flatClipCoords[3]);\n context.lineTo(flatClipCoords[4], flatClipCoords[5]);\n context.lineTo(flatClipCoords[6], flatClipCoords[7]);\n context.clip();\n }\n\n /**\n * Create executors and populate them using the provided instructions.\n * @private\n * @param {!Object<string, !Object<string, import(\"../canvas.js\").SerializableInstructions>>} allInstructions The serializable instructions\n * @param {boolean} deferredRendering Enable deferred rendering.\n */\n createExecutors_(allInstructions, deferredRendering) {\n for (const zIndex in allInstructions) {\n let executors = this.executorsByZIndex_[zIndex];\n if (executors === undefined) {\n executors = {};\n this.executorsByZIndex_[zIndex] = executors;\n }\n const instructionByZindex = allInstructions[zIndex];\n for (const builderType in instructionByZindex) {\n const instructions = instructionByZindex[builderType];\n executors[builderType] = new Executor(\n this.resolution_,\n this.pixelRatio_,\n this.overlaps_,\n instructions,\n deferredRendering,\n );\n }\n }\n }\n\n /**\n * @param {Array<import(\"../canvas.js\").BuilderType>} executors Executors.\n * @return {boolean} Has executors of the provided types.\n */\n hasExecutors(executors) {\n for (const zIndex in this.executorsByZIndex_) {\n const candidates = this.executorsByZIndex_[zIndex];\n for (let i = 0, ii = executors.length; i < ii; ++i) {\n if (executors[i] in candidates) {\n return true;\n }\n }\n }\n return false;\n }\n\n /**\n * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @param {number} hitTolerance Hit tolerance in pixels.\n * @param {function(import(\"../../Feature.js\").FeatureLike, import(\"../../geom/SimpleGeometry.js\").default, number): T} callback Feature callback.\n * @param {Array<import(\"../../Feature.js\").FeatureLike>} declutteredFeatures Decluttered features.\n * @return {T|undefined} Callback result.\n * @template T\n */\n forEachFeatureAtCoordinate(\n coordinate,\n resolution,\n rotation,\n hitTolerance,\n callback,\n declutteredFeatures,\n ) {\n if (canvasReadsBenchmarked === false) {\n benchmarkCanvasReads();\n }\n\n hitTolerance = Math.round(hitTolerance);\n const contextSize = hitTolerance * 2 + 1;\n const transform = composeTransform(\n this.hitDetectionTransform_,\n hitTolerance + 0.5,\n hitTolerance + 0.5,\n 1 / resolution,\n -1 / resolution,\n -rotation,\n -coordinate[0],\n -coordinate[1],\n );\n\n const newContext = !this.hitDetectionContext_;\n if (newContext) {\n this.hitDetectionContext_ = createCanvasContext2D(\n contextSize,\n contextSize,\n null,\n {willReadFrequently},\n );\n }\n const context = this.hitDetectionContext_;\n\n if (\n context.canvas.width !== contextSize ||\n context.canvas.height !== contextSize\n ) {\n context.canvas.width = contextSize;\n context.canvas.height = contextSize;\n } else if (!newContext) {\n context.clearRect(0, 0, contextSize, contextSize);\n }\n\n /** @type {import(\"../../extent.js\").Extent|undefined} */\n let hitExtent;\n if (this.renderBuffer_ !== undefined) {\n hitExtent = createEmpty();\n extendCoordinate(hitExtent, coordinate);\n buffer(\n hitExtent,\n resolution * (this.renderBuffer_ + hitTolerance),\n hitExtent,\n );\n }\n\n const indexes = getPixelIndexArray(hitTolerance);\n\n /** @type {import(\"../canvas.js\").BuilderType} */\n let builderType;\n\n /**\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../../geom/SimpleGeometry.js\").default} geometry Geometry.\n * @param {import('../../style/Style.js').DeclutterMode} declutterMode Declutter mode.\n * @return {T|undefined} Callback result.\n */\n function featureCallback(feature, geometry, declutterMode) {\n const imageData = context.getImageData(\n 0,\n 0,\n contextSize,\n contextSize,\n ).data;\n for (let i = 0, ii = indexes.length; i < ii; i++) {\n if (imageData[indexes[i]] > 0) {\n if (\n !declutteredFeatures ||\n declutterMode === 'none' ||\n (builderType !== 'Image' && builderType !== 'Text') ||\n declutteredFeatures.includes(feature)\n ) {\n const idx = (indexes[i] - 3) / 4;\n const x = hitTolerance - (idx % contextSize);\n const y = hitTolerance - ((idx / contextSize) | 0);\n const result = callback(feature, geometry, x * x + y * y);\n if (result) {\n return result;\n }\n }\n context.clearRect(0, 0, contextSize, contextSize);\n break;\n }\n }\n return undefined;\n }\n\n /** @type {Array<number>} */\n const zs = Object.keys(this.executorsByZIndex_).map(Number);\n zs.sort(ascending);\n\n let i, j, executors, executor, result;\n for (i = zs.length - 1; i >= 0; --i) {\n const zIndexKey = zs[i].toString();\n executors = this.executorsByZIndex_[zIndexKey];\n for (j = ALL.length - 1; j >= 0; --j) {\n builderType = ALL[j];\n executor = executors[builderType];\n if (executor !== undefined) {\n result = executor.executeHitDetection(\n context,\n transform,\n rotation,\n featureCallback,\n hitExtent,\n );\n if (result) {\n return result;\n }\n }\n }\n }\n return undefined;\n }\n\n /**\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @return {Array<number>|null} Clip coordinates.\n */\n getClipCoords(transform) {\n const maxExtent = this.maxExtent_;\n if (!maxExtent) {\n return null;\n }\n const minX = maxExtent[0];\n const minY = maxExtent[1];\n const maxX = maxExtent[2];\n const maxY = maxExtent[3];\n const flatClipCoords = [minX, minY, minX, maxY, maxX, maxY, maxX, minY];\n transform2D(flatClipCoords, 0, 8, 2, transform, flatClipCoords);\n return flatClipCoords;\n }\n\n /**\n * @return {boolean} Is empty.\n */\n isEmpty() {\n return isEmpty(this.executorsByZIndex_);\n }\n\n /**\n * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} targetContext Context.\n * @param {import('../../size.js').Size} scaledCanvasSize Scale of the context.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {number} viewRotation View rotation.\n * @param {boolean} snapToPixel Snap point symbols and test to integer pixel.\n * @param {Array<import(\"../canvas.js\").BuilderType>} [builderTypes] Ordered replay types to replay.\n * Default is {@link module:ol/render/replay~ALL}\n * @param {import(\"rbush\").default<import('./Executor.js').DeclutterEntry>|null} [declutterTree] Declutter tree.\n * When set to null, no decluttering is done, even when the executor group has a `ZIndexContext`.\n */\n execute(\n targetContext,\n scaledCanvasSize,\n transform,\n viewRotation,\n snapToPixel,\n builderTypes,\n declutterTree,\n ) {\n const zs = Object.keys(this.executorsByZIndex_).map(Number);\n zs.sort(declutterTree ? descending : ascending);\n\n builderTypes = builderTypes ? builderTypes : ALL;\n const maxBuilderTypes = ALL.length;\n for (let i = 0, ii = zs.length; i < ii; ++i) {\n const zIndexKey = zs[i].toString();\n const replays = this.executorsByZIndex_[zIndexKey];\n for (let j = 0, jj = builderTypes.length; j < jj; ++j) {\n const builderType = builderTypes[j];\n const replay = replays[builderType];\n if (replay !== undefined) {\n const zIndexContext =\n declutterTree === null ? undefined : replay.getZIndexContext();\n const context = zIndexContext\n ? zIndexContext.getContext()\n : targetContext;\n const requireClip =\n this.maxExtent_ &&\n builderType !== 'Image' &&\n builderType !== 'Text';\n if (requireClip) {\n context.save();\n // setup clipping so that the parts of over-simplified geometries are not\n // visible outside the current extent when panning\n this.clip(context, transform);\n }\n if (\n !zIndexContext ||\n builderType === 'Text' ||\n builderType === 'Image'\n ) {\n replay.execute(\n context,\n scaledCanvasSize,\n transform,\n viewRotation,\n snapToPixel,\n declutterTree,\n );\n } else {\n zIndexContext.pushFunction((context) =>\n replay.execute(\n context,\n scaledCanvasSize,\n transform,\n viewRotation,\n snapToPixel,\n declutterTree,\n ),\n );\n }\n if (requireClip) {\n context.restore();\n }\n if (zIndexContext) {\n zIndexContext.offset();\n const index = zs[i] * maxBuilderTypes + ALL.indexOf(builderType);\n if (!this.deferredZIndexContexts_[index]) {\n this.deferredZIndexContexts_[index] = [];\n }\n this.deferredZIndexContexts_[index].push(zIndexContext);\n }\n }\n }\n }\n\n this.renderedContext_ = targetContext;\n }\n\n getDeferredZIndexContexts() {\n return this.deferredZIndexContexts_;\n }\n\n getRenderedContext() {\n return this.renderedContext_;\n }\n\n renderDeferred() {\n const deferredZIndexContexts = this.deferredZIndexContexts_;\n const zs = Object.keys(deferredZIndexContexts).map(Number).sort(ascending);\n for (let i = 0, ii = zs.length; i < ii; ++i) {\n deferredZIndexContexts[zs[i]].forEach((zIndexContext) => {\n zIndexContext.draw(this.renderedContext_); // FIXME Pass clip to replay for temporarily enabling clip\n zIndexContext.clear();\n });\n deferredZIndexContexts[zs[i]].length = 0;\n }\n }\n}\n\n/**\n * This cache is used to store arrays of indexes for calculated pixel circles\n * to increase performance.\n * It is a static property to allow each Replaygroup to access it.\n * @type {Object<number, Array<number>>}\n */\nconst circlePixelIndexArrayCache = {};\n\n/**\n * This methods creates an array with indexes of all pixels within a circle,\n * ordered by how close they are to the center.\n * A cache is used to increase performance.\n * @param {number} radius Radius.\n * @return {Array<number>} An array with indexes within a circle.\n */\nexport function getPixelIndexArray(radius) {\n if (circlePixelIndexArrayCache[radius] !== undefined) {\n return circlePixelIndexArrayCache[radius];\n }\n\n const size = radius * 2 + 1;\n const maxDistanceSq = radius * radius;\n const distances = new Array(maxDistanceSq + 1);\n for (let i = 0; i <= radius; ++i) {\n for (let j = 0; j <= radius; ++j) {\n const distanceSq = i * i + j * j;\n if (distanceSq > maxDistanceSq) {\n break;\n }\n let distance = distances[distanceSq];\n if (!distance) {\n distance = [];\n distances[distanceSq] = distance;\n }\n distance.push(((radius + i) * size + (radius + j)) * 4 + 3);\n if (i > 0) {\n distance.push(((radius - i) * size + (radius + j)) * 4 + 3);\n }\n if (j > 0) {\n distance.push(((radius + i) * size + (radius - j)) * 4 + 3);\n if (i > 0) {\n distance.push(((radius - i) * size + (radius - j)) * 4 + 3);\n }\n }\n }\n }\n\n const pixelIndex = [];\n for (let i = 0, ii = distances.length; i < ii; ++i) {\n if (distances[i]) {\n pixelIndex.push(...distances[i]);\n }\n }\n\n circlePixelIndexArrayCache[radius] = pixelIndex;\n return pixelIndex;\n}\n\nexport default ExecutorGroup;\n", "/**\n * @module ol/render/canvas/Immediate\n */\n// FIXME test, especially polygons with holes and multipolygons\n// FIXME need to handle large thick features (where pixel size matters)\n// FIXME add offset and end to ol/geom/flat/transform~transform2D?\n\nimport {equals} from '../../array.js';\nimport {asColorLike} from '../../colorlike.js';\nimport {intersects} from '../../extent.js';\nimport {transformGeom2D} from '../../geom/SimpleGeometry.js';\nimport {offsetLineString} from '../../geom/flat/lineoffset.js';\nimport {transform2D} from '../../geom/flat/transform.js';\nimport {toFixed} from '../../math.js';\nimport {\n compose as composeTransform,\n create as createTransform,\n} from '../../transform.js';\nimport VectorContext from '../VectorContext.js';\nimport {\n defaultFillStyle,\n defaultFont,\n defaultLineCap,\n defaultLineDash,\n defaultLineDashOffset,\n defaultLineJoin,\n defaultLineWidth,\n defaultMiterLimit,\n defaultStrokeStyle,\n defaultTextAlign,\n defaultTextBaseline,\n} from '../canvas.js';\n\n/**\n * @classdesc\n * A concrete subclass of {@link module:ol/render/VectorContext~VectorContext} that implements\n * direct rendering of features and geometries to an HTML5 Canvas context.\n * Instances of this class are created internally by the library and\n * provided to application code as vectorContext member of the\n * {@link module:ol/render/Event~RenderEvent} object associated with postcompose, precompose and\n * render events emitted by layers and maps.\n */\nclass CanvasImmediateRenderer extends VectorContext {\n /**\n * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {number} viewRotation View rotation.\n * @param {number} [squaredTolerance] Optional squared tolerance for simplification.\n * @param {import(\"../../proj.js\").TransformFunction} [userTransform] Transform from user to view projection.\n */\n constructor(\n context,\n pixelRatio,\n extent,\n transform,\n viewRotation,\n squaredTolerance,\n userTransform,\n ) {\n super();\n\n /**\n * @private\n * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D}\n */\n this.context_ = context;\n\n /**\n * @private\n * @type {number}\n */\n this.pixelRatio_ = pixelRatio;\n\n /**\n * @private\n * @type {import(\"../../extent.js\").Extent}\n */\n this.extent_ = extent;\n\n /**\n * @private\n * @type {import(\"../../transform.js\").Transform}\n */\n this.transform_ = transform;\n\n /**\n * @private\n * @type {number}\n */\n this.transformRotation_ = transform\n ? toFixed(Math.atan2(transform[1], transform[0]), 10)\n : 0;\n\n /**\n * @private\n * @type {number}\n */\n this.viewRotation_ = viewRotation;\n\n /**\n * @private\n * @type {number}\n */\n this.squaredTolerance_ = squaredTolerance;\n\n /**\n * @private\n * @type {import(\"../../proj.js\").TransformFunction}\n */\n this.userTransform_ = userTransform;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").FillState}\n */\n this.contextFillState_ = null;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").StrokeState}\n */\n this.contextStrokeState_ = null;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").TextState}\n */\n this.contextTextState_ = null;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").FillState}\n */\n this.fillState_ = null;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").StrokeState}\n */\n this.strokeState_ = null;\n\n /**\n * @private\n * @type {import('../../DataTile.js').ImageLike}\n */\n this.image_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.imageAnchorX_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.imageAnchorY_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.imageHeight_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.imageOpacity_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.imageOriginX_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.imageOriginY_ = 0;\n\n /**\n * @private\n * @type {boolean}\n */\n this.imageRotateWithView_ = false;\n\n /**\n * @private\n * @type {number}\n */\n this.imageRotation_ = 0;\n\n /**\n * @private\n * @type {import(\"../../size.js\").Size}\n */\n this.imageScale_ = [0, 0];\n\n /**\n * @private\n * @type {number}\n */\n this.imageWidth_ = 0;\n\n /**\n * @private\n * @type {string}\n */\n this.text_ = '';\n\n /**\n * @private\n * @type {number}\n */\n this.textOffsetX_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.textOffsetY_ = 0;\n\n /**\n * @private\n * @type {boolean}\n */\n this.textRotateWithView_ = false;\n\n /**\n * @private\n * @type {number}\n */\n this.textRotation_ = 0;\n\n /**\n * @private\n * @type {import(\"../../size.js\").Size}\n */\n this.textScale_ = [0, 0];\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").FillState}\n */\n this.textFillState_ = null;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").StrokeState}\n */\n this.textStrokeState_ = null;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").TextState}\n */\n this.textState_ = null;\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.pixelCoordinates_ = [];\n\n /**\n * @private\n * @type {import(\"../../transform.js\").Transform}\n */\n this.tmpLocalTransform_ = createTransform();\n }\n\n /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @private\n */\n drawImages_(flatCoordinates, offset, end, stride) {\n if (!this.image_) {\n return;\n }\n const pixelCoordinates = transform2D(\n flatCoordinates,\n offset,\n end,\n stride,\n this.transform_,\n this.pixelCoordinates_,\n );\n const context = this.context_;\n const localTransform = this.tmpLocalTransform_;\n const alpha = context.globalAlpha;\n if (this.imageOpacity_ != 1) {\n context.globalAlpha = alpha * this.imageOpacity_;\n }\n let rotation = this.imageRotation_;\n if (this.transformRotation_ === 0) {\n rotation -= this.viewRotation_;\n }\n if (this.imageRotateWithView_) {\n rotation += this.viewRotation_;\n }\n for (let i = 0, ii = pixelCoordinates.length; i < ii; i += 2) {\n const x = pixelCoordinates[i] - this.imageAnchorX_;\n const y = pixelCoordinates[i + 1] - this.imageAnchorY_;\n if (\n rotation !== 0 ||\n this.imageScale_[0] != 1 ||\n this.imageScale_[1] != 1\n ) {\n const centerX = x + this.imageAnchorX_;\n const centerY = y + this.imageAnchorY_;\n composeTransform(\n localTransform,\n centerX,\n centerY,\n 1,\n 1,\n rotation,\n -centerX,\n -centerY,\n );\n context.save();\n context.transform.apply(context, localTransform);\n context.translate(centerX, centerY);\n context.scale(this.imageScale_[0], this.imageScale_[1]);\n context.drawImage(\n this.image_,\n this.imageOriginX_,\n this.imageOriginY_,\n this.imageWidth_,\n this.imageHeight_,\n -this.imageAnchorX_,\n -this.imageAnchorY_,\n this.imageWidth_,\n this.imageHeight_,\n );\n context.restore();\n } else {\n context.drawImage(\n this.image_,\n this.imageOriginX_,\n this.imageOriginY_,\n this.imageWidth_,\n this.imageHeight_,\n x,\n y,\n this.imageWidth_,\n this.imageHeight_,\n );\n }\n }\n if (this.imageOpacity_ != 1) {\n context.globalAlpha = alpha;\n }\n }\n\n /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @private\n */\n drawText_(flatCoordinates, offset, end, stride) {\n if (!this.textState_ || this.text_ === '') {\n return;\n }\n if (this.textFillState_) {\n this.setContextFillState_(this.textFillState_);\n }\n if (this.textStrokeState_) {\n this.setContextStrokeState_(this.textStrokeState_);\n }\n this.setContextTextState_(this.textState_);\n const pixelCoordinates = transform2D(\n flatCoordinates,\n offset,\n end,\n stride,\n this.transform_,\n this.pixelCoordinates_,\n );\n const context = this.context_;\n let rotation = this.textRotation_;\n if (this.transformRotation_ === 0) {\n rotation -= this.viewRotation_;\n }\n if (this.textRotateWithView_) {\n rotation += this.viewRotation_;\n }\n for (; offset < end; offset += stride) {\n const x = pixelCoordinates[offset] + this.textOffsetX_;\n const y = pixelCoordinates[offset + 1] + this.textOffsetY_;\n if (\n rotation !== 0 ||\n this.textScale_[0] != 1 ||\n this.textScale_[1] != 1\n ) {\n context.save();\n context.translate(x - this.textOffsetX_, y - this.textOffsetY_);\n context.rotate(rotation);\n context.translate(this.textOffsetX_, this.textOffsetY_);\n context.scale(this.textScale_[0], this.textScale_[1]);\n if (this.textStrokeState_) {\n context.strokeText(this.text_, 0, 0);\n }\n if (this.textFillState_) {\n context.fillText(this.text_, 0, 0);\n }\n context.restore();\n } else {\n if (this.textStrokeState_) {\n context.strokeText(this.text_, x, y);\n }\n if (this.textFillState_) {\n context.fillText(this.text_, x, y);\n }\n }\n }\n }\n\n /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {boolean} close Close.\n * @param {number} [strokeOffset] Stroke Offset.\n * @private\n * @return {number} end End.\n */\n moveToLineTo_(flatCoordinates, offset, end, stride, close, strokeOffset) {\n const context = this.context_;\n let pixelCoordinates = transform2D(\n flatCoordinates,\n offset,\n end,\n stride,\n this.transform_,\n this.pixelCoordinates_,\n );\n if (Math.abs(strokeOffset) > 0) {\n pixelCoordinates = offsetLineString(\n pixelCoordinates,\n stride,\n strokeOffset,\n close,\n pixelCoordinates,\n );\n }\n context.moveTo(pixelCoordinates[0], pixelCoordinates[1]);\n let length = pixelCoordinates.length;\n if (close) {\n length -= 2;\n }\n for (let i = 2; i < length; i += 2) {\n context.lineTo(pixelCoordinates[i], pixelCoordinates[i + 1]);\n }\n if (close) {\n context.closePath();\n }\n return end;\n }\n\n /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} [strokeOffset] Stroke Offset.\n * @private\n * @return {number} End.\n */\n drawRings_(flatCoordinates, offset, ends, stride, strokeOffset) {\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n offset = this.moveToLineTo_(\n flatCoordinates,\n offset,\n ends[i],\n stride,\n true,\n strokeOffset,\n );\n }\n return offset;\n }\n\n /**\n * Render a circle geometry into the canvas. Rendering is immediate and uses\n * the current fill and stroke styles.\n *\n * @param {import(\"../../geom/Circle.js\").default} geometry Circle geometry.\n * @api\n * @override\n */\n drawCircle(geometry) {\n if (this.squaredTolerance_) {\n geometry = /** @type {import(\"../../geom/Circle.js\").default} */ (\n geometry.simplifyTransformed(\n this.squaredTolerance_,\n this.userTransform_,\n )\n );\n }\n if (!intersects(this.extent_, geometry.getExtent())) {\n return;\n }\n if (this.fillState_ || this.strokeState_) {\n if (this.fillState_) {\n this.setContextFillState_(this.fillState_);\n }\n if (this.strokeState_) {\n this.setContextStrokeState_(this.strokeState_);\n }\n const pixelCoordinates = transformGeom2D(\n geometry,\n this.transform_,\n this.pixelCoordinates_,\n );\n const dx = pixelCoordinates[2] - pixelCoordinates[0];\n const dy = pixelCoordinates[3] - pixelCoordinates[1];\n const radius = Math.sqrt(dx * dx + dy * dy);\n const context = this.context_;\n context.beginPath();\n context.arc(\n pixelCoordinates[0],\n pixelCoordinates[1],\n radius,\n 0,\n 2 * Math.PI,\n );\n if (this.fillState_) {\n context.fill();\n }\n if (this.strokeState_) {\n context.stroke();\n }\n }\n if (this.text_ !== '') {\n this.drawText_(geometry.getCenter(), 0, 2, 2);\n }\n }\n\n /**\n * Set the rendering style. Note that since this is an immediate rendering API,\n * any `zIndex` on the provided style will be ignored.\n *\n * @param {import(\"../../style/Style.js\").default} style The rendering style.\n * @api\n * @override\n */\n setStyle(style) {\n this.setFillStrokeStyle(style.getFill(), style.getStroke());\n this.setImageStyle(style.getImage());\n this.setTextStyle(style.getText());\n }\n\n /**\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n */\n setTransform(transform) {\n this.transform_ = transform;\n }\n\n /**\n * Render a geometry into the canvas. Call\n * {@link module:ol/render/canvas/Immediate~CanvasImmediateRenderer#setStyle renderer.setStyle()} first to set the rendering style.\n *\n * @param {import(\"../../geom/Geometry.js\").default|import(\"../Feature.js\").default} geometry The geometry to render.\n * @api\n * @override\n */\n drawGeometry(geometry) {\n const type = geometry.getType();\n switch (type) {\n case 'Point':\n this.drawPoint(\n /** @type {import(\"../../geom/Point.js\").default} */ (geometry),\n );\n break;\n case 'LineString':\n this.drawLineString(\n /** @type {import(\"../../geom/LineString.js\").default} */ (geometry),\n );\n break;\n case 'Polygon':\n this.drawPolygon(\n /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry),\n );\n break;\n case 'MultiPoint':\n this.drawMultiPoint(\n /** @type {import(\"../../geom/MultiPoint.js\").default} */ (geometry),\n );\n break;\n case 'MultiLineString':\n this.drawMultiLineString(\n /** @type {import(\"../../geom/MultiLineString.js\").default} */ (\n geometry\n ),\n );\n break;\n case 'MultiPolygon':\n this.drawMultiPolygon(\n /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (\n geometry\n ),\n );\n break;\n case 'GeometryCollection':\n this.drawGeometryCollection(\n /** @type {import(\"../../geom/GeometryCollection.js\").default} */ (\n geometry\n ),\n );\n break;\n case 'Circle':\n this.drawCircle(\n /** @type {import(\"../../geom/Circle.js\").default} */ (geometry),\n );\n break;\n default:\n }\n }\n\n /**\n * Render a feature into the canvas. Note that any `zIndex` on the provided\n * style will be ignored - features are rendered immediately in the order that\n * this method is called. If you need `zIndex` support, you should be using an\n * {@link module:ol/layer/Vector~VectorLayer} instead.\n *\n * @param {import(\"../../Feature.js\").default} feature Feature.\n * @param {import(\"../../style/Style.js\").default} style Style.\n * @api\n * @override\n */\n drawFeature(feature, style) {\n const geometry = style.getGeometryFunction()(feature);\n if (!geometry) {\n return;\n }\n this.setStyle(style);\n this.drawGeometry(geometry);\n }\n\n /**\n * Render a GeometryCollection to the canvas. Rendering is immediate and\n * uses the current styles appropriate for each geometry in the collection.\n *\n * @param {import(\"../../geom/GeometryCollection.js\").default} geometry Geometry collection.\n * @override\n */\n drawGeometryCollection(geometry) {\n const geometries = geometry.getGeometriesArray();\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n this.drawGeometry(geometries[i]);\n }\n }\n\n /**\n * Render a Point geometry into the canvas. Rendering is immediate and uses\n * the current style.\n *\n * @param {import(\"../../geom/Point.js\").default|import(\"../Feature.js\").default} geometry Point geometry.\n * @override\n */\n drawPoint(geometry) {\n if (this.squaredTolerance_) {\n geometry = /** @type {import(\"../../geom/Point.js\").default} */ (\n geometry.simplifyTransformed(\n this.squaredTolerance_,\n this.userTransform_,\n )\n );\n }\n const flatCoordinates = geometry.getFlatCoordinates();\n const stride = geometry.getStride();\n if (this.image_) {\n this.drawImages_(flatCoordinates, 0, flatCoordinates.length, stride);\n }\n if (this.text_ !== '') {\n this.drawText_(flatCoordinates, 0, flatCoordinates.length, stride);\n }\n }\n\n /**\n * Render a MultiPoint geometry into the canvas. Rendering is immediate and\n * uses the current style.\n *\n * @param {import(\"../../geom/MultiPoint.js\").default|import(\"../Feature.js\").default} geometry MultiPoint geometry.\n * @override\n */\n drawMultiPoint(geometry) {\n if (this.squaredTolerance_) {\n geometry = /** @type {import(\"../../geom/MultiPoint.js\").default} */ (\n geometry.simplifyTransformed(\n this.squaredTolerance_,\n this.userTransform_,\n )\n );\n }\n const flatCoordinates = geometry.getFlatCoordinates();\n const stride = geometry.getStride();\n if (this.image_) {\n this.drawImages_(flatCoordinates, 0, flatCoordinates.length, stride);\n }\n if (this.text_ !== '') {\n this.drawText_(flatCoordinates, 0, flatCoordinates.length, stride);\n }\n }\n\n /**\n * Render a LineString into the canvas. Rendering is immediate and uses\n * the current style.\n *\n * @param {import(\"../../geom/LineString.js\").default|import(\"../Feature.js\").default} geometry LineString geometry.\n * @override\n */\n drawLineString(geometry) {\n if (this.squaredTolerance_) {\n geometry = /** @type {import(\"../../geom/LineString.js\").default} */ (\n geometry.simplifyTransformed(\n this.squaredTolerance_,\n this.userTransform_,\n )\n );\n }\n if (!intersects(this.extent_, geometry.getExtent())) {\n return;\n }\n if (this.strokeState_) {\n this.setContextStrokeState_(this.strokeState_);\n const context = this.context_;\n const flatCoordinates = geometry.getFlatCoordinates();\n context.beginPath();\n this.moveToLineTo_(\n flatCoordinates,\n 0,\n flatCoordinates.length,\n geometry.getStride(),\n false,\n this.strokeState_.strokeOffset,\n );\n context.stroke();\n }\n if (this.text_ !== '') {\n const flatMidpoint = geometry.getFlatMidpoint();\n this.drawText_(flatMidpoint, 0, 2, 2);\n }\n }\n\n /**\n * Render a MultiLineString geometry into the canvas. Rendering is immediate\n * and uses the current style.\n *\n * @param {import(\"../../geom/MultiLineString.js\").default|import(\"../Feature.js\").default} geometry MultiLineString geometry.\n * @override\n */\n drawMultiLineString(geometry) {\n if (this.squaredTolerance_) {\n geometry =\n /** @type {import(\"../../geom/MultiLineString.js\").default} */ (\n geometry.simplifyTransformed(\n this.squaredTolerance_,\n this.userTransform_,\n )\n );\n }\n const geometryExtent = geometry.getExtent();\n if (!intersects(this.extent_, geometryExtent)) {\n return;\n }\n if (this.strokeState_) {\n this.setContextStrokeState_(this.strokeState_);\n const context = this.context_;\n const flatCoordinates = geometry.getFlatCoordinates();\n let offset = 0;\n const ends = /** @type {Array<number>} */ (geometry.getEnds());\n const stride = geometry.getStride();\n context.beginPath();\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n offset = this.moveToLineTo_(\n flatCoordinates,\n offset,\n ends[i],\n stride,\n false,\n this.strokeState_.strokeOffset,\n );\n }\n context.stroke();\n }\n if (this.text_ !== '') {\n const flatMidpoints = geometry.getFlatMidpoints();\n this.drawText_(flatMidpoints, 0, flatMidpoints.length, 2);\n }\n }\n\n /**\n * Render a Polygon geometry into the canvas. Rendering is immediate and uses\n * the current style.\n *\n * @param {import(\"../../geom/Polygon.js\").default|import(\"../Feature.js\").default} geometry Polygon geometry.\n * @override\n */\n drawPolygon(geometry) {\n if (this.squaredTolerance_) {\n geometry = /** @type {import(\"../../geom/Polygon.js\").default} */ (\n geometry.simplifyTransformed(\n this.squaredTolerance_,\n this.userTransform_,\n )\n );\n }\n if (!intersects(this.extent_, geometry.getExtent())) {\n return;\n }\n if (this.strokeState_ || this.fillState_) {\n if (this.fillState_) {\n this.setContextFillState_(this.fillState_);\n }\n if (this.strokeState_) {\n this.setContextStrokeState_(this.strokeState_);\n }\n const context = this.context_;\n context.beginPath();\n this.drawRings_(\n geometry.getOrientedFlatCoordinates(),\n 0,\n /** @type {Array<number>} */ (geometry.getEnds()),\n geometry.getStride(),\n this.strokeState_?.strokeOffset,\n );\n if (this.fillState_) {\n context.fill();\n }\n if (this.strokeState_) {\n context.stroke();\n }\n }\n if (this.text_ !== '') {\n const flatInteriorPoint = geometry.getFlatInteriorPoint();\n this.drawText_(flatInteriorPoint, 0, 2, 2);\n }\n }\n\n /**\n * Render MultiPolygon geometry into the canvas. Rendering is immediate and\n * uses the current style.\n * @param {import(\"../../geom/MultiPolygon.js\").default} geometry MultiPolygon geometry.\n * @override\n */\n drawMultiPolygon(geometry) {\n if (this.squaredTolerance_) {\n geometry = /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (\n geometry.simplifyTransformed(\n this.squaredTolerance_,\n this.userTransform_,\n )\n );\n }\n if (!intersects(this.extent_, geometry.getExtent())) {\n return;\n }\n if (this.strokeState_ || this.fillState_) {\n if (this.fillState_) {\n this.setContextFillState_(this.fillState_);\n }\n if (this.strokeState_) {\n this.setContextStrokeState_(this.strokeState_);\n }\n const context = this.context_;\n const flatCoordinates = geometry.getOrientedFlatCoordinates();\n let offset = 0;\n const endss = geometry.getEndss();\n const stride = geometry.getStride();\n context.beginPath();\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n offset = this.drawRings_(\n flatCoordinates,\n offset,\n ends,\n stride,\n this.strokeState_?.strokeOffset,\n );\n }\n if (this.fillState_) {\n context.fill();\n }\n if (this.strokeState_) {\n context.stroke();\n }\n }\n if (this.text_ !== '') {\n const flatInteriorPoints = geometry.getFlatInteriorPoints();\n this.drawText_(flatInteriorPoints, 0, flatInteriorPoints.length, 2);\n }\n }\n\n /**\n * @param {import(\"../canvas.js\").FillState} fillState Fill state.\n * @private\n */\n setContextFillState_(fillState) {\n const context = this.context_;\n const contextFillState = this.contextFillState_;\n if (!contextFillState) {\n context.fillStyle = fillState.fillStyle;\n this.contextFillState_ = {\n fillStyle: fillState.fillStyle,\n };\n } else {\n if (contextFillState.fillStyle != fillState.fillStyle) {\n contextFillState.fillStyle = fillState.fillStyle;\n context.fillStyle = fillState.fillStyle;\n }\n }\n }\n\n /**\n * @param {import(\"../canvas.js\").StrokeState} strokeState Stroke state.\n * @private\n */\n setContextStrokeState_(strokeState) {\n const context = this.context_;\n const contextStrokeState = this.contextStrokeState_;\n if (!contextStrokeState) {\n context.lineCap = strokeState.lineCap;\n context.setLineDash(strokeState.lineDash);\n context.lineDashOffset = strokeState.lineDashOffset;\n context.lineJoin = strokeState.lineJoin;\n context.lineWidth = strokeState.lineWidth;\n context.miterLimit = strokeState.miterLimit;\n context.strokeStyle = strokeState.strokeStyle;\n this.contextStrokeState_ = {\n lineCap: strokeState.lineCap,\n lineDash: strokeState.lineDash,\n lineDashOffset: strokeState.lineDashOffset,\n lineJoin: strokeState.lineJoin,\n lineWidth: strokeState.lineWidth,\n miterLimit: strokeState.miterLimit,\n strokeStyle: strokeState.strokeStyle,\n };\n } else {\n if (contextStrokeState.lineCap != strokeState.lineCap) {\n contextStrokeState.lineCap = strokeState.lineCap;\n context.lineCap = strokeState.lineCap;\n }\n if (!equals(contextStrokeState.lineDash, strokeState.lineDash)) {\n context.setLineDash(\n (contextStrokeState.lineDash = strokeState.lineDash),\n );\n }\n if (contextStrokeState.lineDashOffset != strokeState.lineDashOffset) {\n contextStrokeState.lineDashOffset = strokeState.lineDashOffset;\n context.lineDashOffset = strokeState.lineDashOffset;\n }\n if (contextStrokeState.lineJoin != strokeState.lineJoin) {\n contextStrokeState.lineJoin = strokeState.lineJoin;\n context.lineJoin = strokeState.lineJoin;\n }\n if (contextStrokeState.lineWidth != strokeState.lineWidth) {\n contextStrokeState.lineWidth = strokeState.lineWidth;\n context.lineWidth = strokeState.lineWidth;\n }\n if (contextStrokeState.miterLimit != strokeState.miterLimit) {\n contextStrokeState.miterLimit = strokeState.miterLimit;\n context.miterLimit = strokeState.miterLimit;\n }\n if (contextStrokeState.strokeStyle != strokeState.strokeStyle) {\n contextStrokeState.strokeStyle = strokeState.strokeStyle;\n context.strokeStyle = strokeState.strokeStyle;\n }\n }\n }\n\n /**\n * @param {import(\"../canvas.js\").TextState} textState Text state.\n * @private\n */\n setContextTextState_(textState) {\n const context = this.context_;\n const contextTextState = this.contextTextState_;\n const textAlign = textState.textAlign\n ? textState.textAlign\n : defaultTextAlign;\n if (!contextTextState) {\n context.font = textState.font;\n context.textAlign = textAlign;\n context.textBaseline = textState.textBaseline;\n this.contextTextState_ = {\n font: textState.font,\n textAlign: textAlign,\n textBaseline: textState.textBaseline,\n };\n } else {\n if (contextTextState.font != textState.font) {\n contextTextState.font = textState.font;\n context.font = textState.font;\n }\n if (contextTextState.textAlign != textAlign) {\n contextTextState.textAlign = textAlign;\n context.textAlign = textAlign;\n }\n if (contextTextState.textBaseline != textState.textBaseline) {\n contextTextState.textBaseline = textState.textBaseline;\n context.textBaseline = textState.textBaseline;\n }\n }\n }\n\n /**\n * Set the fill and stroke style for subsequent draw operations. To clear\n * either fill or stroke styles, pass null for the appropriate parameter.\n *\n * @param {import(\"../../style/Fill.js\").default} fillStyle Fill style.\n * @param {import(\"../../style/Stroke.js\").default} strokeStyle Stroke style.\n * @override\n */\n setFillStrokeStyle(fillStyle, strokeStyle) {\n if (!fillStyle) {\n this.fillState_ = null;\n } else {\n const fillStyleColor = fillStyle.getColor();\n this.fillState_ = {\n fillStyle: asColorLike(\n fillStyleColor ? fillStyleColor : defaultFillStyle,\n ),\n };\n }\n if (!strokeStyle) {\n this.strokeState_ = null;\n } else {\n const strokeStyleColor = strokeStyle.getColor();\n const strokeStyleLineCap = strokeStyle.getLineCap();\n const strokeStyleLineDash = strokeStyle.getLineDash();\n const strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();\n const strokeStyleLineJoin = strokeStyle.getLineJoin();\n const strokeStyleWidth = strokeStyle.getWidth();\n const strokeStyleMiterLimit = strokeStyle.getMiterLimit();\n const lineDash = strokeStyleLineDash\n ? strokeStyleLineDash\n : defaultLineDash;\n const strokeOffset = strokeStyle.getOffset();\n this.strokeState_ = {\n lineCap:\n strokeStyleLineCap !== undefined\n ? strokeStyleLineCap\n : defaultLineCap,\n lineDash:\n this.pixelRatio_ === 1\n ? lineDash\n : lineDash.map((n) => n * this.pixelRatio_),\n lineDashOffset:\n (strokeStyleLineDashOffset\n ? strokeStyleLineDashOffset\n : defaultLineDashOffset) * this.pixelRatio_,\n lineJoin:\n strokeStyleLineJoin !== undefined\n ? strokeStyleLineJoin\n : defaultLineJoin,\n lineWidth:\n (strokeStyleWidth !== undefined\n ? strokeStyleWidth\n : defaultLineWidth) * this.pixelRatio_,\n miterLimit:\n strokeStyleMiterLimit !== undefined\n ? strokeStyleMiterLimit\n : defaultMiterLimit,\n strokeStyle: asColorLike(\n strokeStyleColor ? strokeStyleColor : defaultStrokeStyle,\n ),\n strokeOffset: (strokeOffset ?? 0) * this.pixelRatio_,\n };\n }\n }\n\n /**\n * Set the image style for subsequent draw operations. Pass null to remove\n * the image style.\n *\n * @param {import(\"../../style/Image.js\").default} imageStyle Image style.\n * @override\n */\n setImageStyle(imageStyle) {\n let imageSize;\n if (!imageStyle || !(imageSize = imageStyle.getSize())) {\n this.image_ = null;\n return;\n }\n const imagePixelRatio = imageStyle.getPixelRatio(this.pixelRatio_);\n const imageAnchor = imageStyle.getAnchor();\n const imageOrigin = imageStyle.getOrigin();\n this.image_ = imageStyle.getImage(this.pixelRatio_);\n this.imageAnchorX_ = imageAnchor[0] * imagePixelRatio;\n this.imageAnchorY_ = imageAnchor[1] * imagePixelRatio;\n this.imageHeight_ = imageSize[1] * imagePixelRatio;\n this.imageOpacity_ = imageStyle.getOpacity();\n this.imageOriginX_ = imageOrigin[0];\n this.imageOriginY_ = imageOrigin[1];\n this.imageRotateWithView_ = imageStyle.getRotateWithView();\n this.imageRotation_ = imageStyle.getRotation();\n const imageScale = imageStyle.getScaleArray();\n this.imageScale_ = [\n (imageScale[0] * this.pixelRatio_) / imagePixelRatio,\n (imageScale[1] * this.pixelRatio_) / imagePixelRatio,\n ];\n this.imageWidth_ = imageSize[0] * imagePixelRatio;\n }\n\n /**\n * Set the text style for subsequent draw operations. Pass null to\n * remove the text style.\n *\n * @param {import(\"../../style/Text.js\").default} textStyle Text style.\n * @override\n */\n setTextStyle(textStyle) {\n if (!textStyle) {\n this.text_ = '';\n } else {\n const textFillStyle = textStyle.getFill();\n if (!textFillStyle) {\n this.textFillState_ = null;\n } else {\n const textFillStyleColor = textFillStyle.getColor();\n this.textFillState_ = {\n fillStyle: asColorLike(\n textFillStyleColor ? textFillStyleColor : defaultFillStyle,\n ),\n };\n }\n const textStrokeStyle = textStyle.getStroke();\n if (!textStrokeStyle) {\n this.textStrokeState_ = null;\n } else {\n const textStrokeStyleColor = textStrokeStyle.getColor();\n const textStrokeStyleLineCap = textStrokeStyle.getLineCap();\n const textStrokeStyleLineDash = textStrokeStyle.getLineDash();\n const textStrokeStyleLineDashOffset =\n textStrokeStyle.getLineDashOffset();\n const textStrokeStyleLineJoin = textStrokeStyle.getLineJoin();\n const textStrokeStyleWidth = textStrokeStyle.getWidth();\n const textStrokeStyleMiterLimit = textStrokeStyle.getMiterLimit();\n this.textStrokeState_ = {\n lineCap:\n textStrokeStyleLineCap !== undefined\n ? textStrokeStyleLineCap\n : defaultLineCap,\n lineDash: textStrokeStyleLineDash\n ? textStrokeStyleLineDash\n : defaultLineDash,\n lineDashOffset: textStrokeStyleLineDashOffset\n ? textStrokeStyleLineDashOffset\n : defaultLineDashOffset,\n lineJoin:\n textStrokeStyleLineJoin !== undefined\n ? textStrokeStyleLineJoin\n : defaultLineJoin,\n lineWidth:\n textStrokeStyleWidth !== undefined\n ? textStrokeStyleWidth\n : defaultLineWidth,\n miterLimit:\n textStrokeStyleMiterLimit !== undefined\n ? textStrokeStyleMiterLimit\n : defaultMiterLimit,\n strokeStyle: asColorLike(\n textStrokeStyleColor ? textStrokeStyleColor : defaultStrokeStyle,\n ),\n };\n }\n const textFont = textStyle.getFont();\n const textOffsetX = textStyle.getOffsetX();\n const textOffsetY = textStyle.getOffsetY();\n const textRotateWithView = textStyle.getRotateWithView();\n const textRotation = textStyle.getRotation();\n const textScale = textStyle.getScaleArray();\n const textText = textStyle.getText();\n const textTextAlign = textStyle.getTextAlign();\n const textTextBaseline = textStyle.getTextBaseline();\n this.textState_ = {\n font: textFont !== undefined ? textFont : defaultFont,\n textAlign:\n textTextAlign !== undefined ? textTextAlign : defaultTextAlign,\n textBaseline:\n textTextBaseline !== undefined\n ? textTextBaseline\n : defaultTextBaseline,\n };\n this.text_ =\n textText !== undefined\n ? Array.isArray(textText)\n ? textText.reduce((acc, t, i) => (acc += i % 2 ? ' ' : t), '')\n : textText\n : '';\n this.textOffsetX_ =\n textOffsetX !== undefined ? this.pixelRatio_ * textOffsetX : 0;\n this.textOffsetY_ =\n textOffsetY !== undefined ? this.pixelRatio_ * textOffsetY : 0;\n this.textRotateWithView_ =\n textRotateWithView !== undefined ? textRotateWithView : false;\n this.textRotation_ = textRotation !== undefined ? textRotation : 0;\n this.textScale_ = [\n this.pixelRatio_ * textScale[0],\n this.pixelRatio_ * textScale[1],\n ];\n }\n }\n}\n\nexport default CanvasImmediateRenderer;\n", "/**\n * @module ol/render/canvas/hitdetect\n */\n\nimport {ascending} from '../../array.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {intersects} from '../../extent.js';\nimport {clamp} from '../../math.js';\nimport {\n getTransformFromProjections,\n getUserProjection,\n toUserExtent,\n} from '../../proj.js';\nimport {Icon} from '../../style.js';\nimport CanvasImmediateRenderer from './Immediate.js';\n\nexport const HIT_DETECT_RESOLUTION = 0.5;\n\n/**\n * @param {import(\"../../size.js\").Size} size Canvas size in css pixels.\n * @param {Array<import(\"../../transform.js\").Transform>} transforms Transforms\n * for rendering features to all worlds of the viewport, from coordinates to css\n * pixels.\n * @param {Array<import(\"../../Feature.js\").FeatureLike>} features\n * Features to consider for hit detection.\n * @param {import(\"../../style/Style.js\").StyleFunction|undefined} styleFunction\n * Layer style function.\n * @param {import(\"../../extent.js\").Extent} extent Extent in render projection.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @param {number} [squaredTolerance] Squared tolerance.\n * @param {import(\"../../proj/Projection.js\").default} [projection] Render projection.\n * @return {ImageData} Hit detection image data.\n */\nexport function createHitDetectionImageData(\n size,\n transforms,\n features,\n styleFunction,\n extent,\n resolution,\n rotation,\n squaredTolerance,\n projection,\n) {\n const userExtent = projection ? toUserExtent(extent, projection) : extent;\n const width = size[0] * HIT_DETECT_RESOLUTION;\n const height = size[1] * HIT_DETECT_RESOLUTION;\n const context = createCanvasContext2D(width, height);\n context.imageSmoothingEnabled = false;\n const canvas = context.canvas;\n const renderer = new CanvasImmediateRenderer(\n context,\n HIT_DETECT_RESOLUTION,\n extent,\n null,\n rotation,\n squaredTolerance,\n projection\n ? getTransformFromProjections(getUserProjection(), projection)\n : null,\n );\n const featureCount = features.length;\n // Stretch hit detection index to use the whole available color range\n const indexFactor = Math.floor((256 * 256 * 256 - 1) / featureCount);\n const featuresByZIndex = {};\n for (let i = 1; i <= featureCount; ++i) {\n const feature = features[i - 1];\n const featureStyleFunction = feature.getStyleFunction() || styleFunction;\n if (!featureStyleFunction) {\n continue;\n }\n let styles = featureStyleFunction(feature, resolution);\n if (!styles) {\n continue;\n }\n if (!Array.isArray(styles)) {\n styles = [styles];\n }\n const index = i * indexFactor;\n const color = index.toString(16).padStart(7, '#00000');\n for (let j = 0, jj = styles.length; j < jj; ++j) {\n const originalStyle = styles[j];\n const geometry = originalStyle.getGeometryFunction()(feature);\n if (!geometry || !intersects(userExtent, geometry.getExtent())) {\n continue;\n }\n const style = originalStyle.clone();\n const fill = style.getFill();\n if (fill) {\n fill.setColor(color);\n }\n const stroke = style.getStroke();\n if (stroke) {\n stroke.setColor(color);\n stroke.setLineDash(null);\n }\n style.setText(undefined);\n const image = originalStyle.getImage();\n if (image) {\n const imgSize = image.getImageSize();\n if (!imgSize) {\n continue;\n }\n\n const imgContext = createCanvasContext2D(\n imgSize[0],\n imgSize[1],\n undefined,\n {alpha: false},\n );\n const img = imgContext.canvas;\n imgContext.fillStyle = color;\n imgContext.fillRect(0, 0, img.width, img.height);\n style.setImage(\n new Icon({\n img: img,\n anchor: image.getAnchor(),\n anchorXUnits: 'pixels',\n anchorYUnits: 'pixels',\n offset: image.getOrigin(),\n opacity: 1,\n size: image.getSize(),\n scale: image.getScale(),\n rotation: image.getRotation(),\n rotateWithView: image.getRotateWithView(),\n }),\n );\n }\n const zIndex = style.getZIndex() || 0;\n let byGeometryType = featuresByZIndex[zIndex];\n if (!byGeometryType) {\n byGeometryType = {};\n featuresByZIndex[zIndex] = byGeometryType;\n byGeometryType['Polygon'] = [];\n byGeometryType['Circle'] = [];\n byGeometryType['LineString'] = [];\n byGeometryType['Point'] = [];\n }\n const type = geometry.getType();\n if (type === 'GeometryCollection') {\n const geometries =\n /** @type {import(\"../../geom/GeometryCollection.js\").default} */ (\n geometry\n ).getGeometriesArrayRecursive();\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n const geometry = geometries[i];\n byGeometryType[geometry.getType().replace('Multi', '')].push(\n geometry,\n style,\n );\n }\n } else {\n byGeometryType[type.replace('Multi', '')].push(geometry, style);\n }\n }\n }\n\n const zIndexKeys = Object.keys(featuresByZIndex).map(Number).sort(ascending);\n for (let i = 0, ii = zIndexKeys.length; i < ii; ++i) {\n const byGeometryType = featuresByZIndex[zIndexKeys[i]];\n for (const type in byGeometryType) {\n const geomAndStyle = byGeometryType[type];\n for (let j = 0, jj = geomAndStyle.length; j < jj; j += 2) {\n renderer.setStyle(geomAndStyle[j + 1]);\n for (let k = 0, kk = transforms.length; k < kk; ++k) {\n renderer.setTransform(transforms[k]);\n renderer.drawGeometry(geomAndStyle[j]);\n }\n }\n }\n }\n return context.getImageData(0, 0, canvas.width, canvas.height);\n}\n\n/**\n * @param {import(\"../../pixel\").Pixel} pixel Pixel coordinate on the hit\n * detection canvas in css pixels.\n * @param {Array<F>} features Features. Has to\n * match the `features` array that was passed to `createHitDetectionImageData()`.\n * @param {ImageData} imageData Hit detection image data generated by\n * `createHitDetectionImageData()`.\n * @return {Array<F>} Features.\n * @template {import(\"../../Feature.js\").FeatureLike} F\n */\nexport function hitDetect(pixel, features, imageData) {\n /** @type {Array<F>} */\n const resultFeatures = [];\n if (imageData) {\n const x = Math.floor(Math.round(pixel[0]) * HIT_DETECT_RESOLUTION);\n const y = Math.floor(Math.round(pixel[1]) * HIT_DETECT_RESOLUTION);\n // The pixel coordinate is clamped down to the hit-detect canvas' size to account\n // for browsers returning coordinates slightly larger than the actual canvas size\n // due to a non-integer pixel ratio.\n const index =\n (clamp(x, 0, imageData.width - 1) +\n clamp(y, 0, imageData.height - 1) * imageData.width) *\n 4;\n const r = imageData.data[index];\n const g = imageData.data[index + 1];\n const b = imageData.data[index + 2];\n const i = b + 256 * (g + 256 * r);\n const indexFactor = Math.floor((256 * 256 * 256 - 1) / features.length);\n if (i && i % indexFactor === 0) {\n resultFeatures.push(features[i / indexFactor - 1]);\n }\n }\n return resultFeatures;\n}\n", "/**\n * @module ol/renderer/vector\n */\nimport ImageState from '../ImageState.js';\nimport {getUid} from '../util.js';\n\n/**\n * Feature callback. The callback will be called with three arguments. The first\n * argument is one {@link module:ol/Feature~Feature feature} or {@link module:ol/render/Feature~RenderFeature render feature}\n * at the pixel, the second is the {@link module:ol/layer/Layer~Layer layer} of the feature and will be null for\n * unmanaged layers. The third is the {@link module:ol/geom/SimpleGeometry~SimpleGeometry} of the feature. For features\n * with a GeometryCollection geometry, it will be the first detected geometry from the collection.\n * @template T\n * @typedef {function(import(\"../Feature.js\").FeatureLike, import(\"../layer/Layer.js\").default<import(\"../source/Source\").default>, import(\"../geom/SimpleGeometry.js\").default): T} FeatureCallback\n */\n\n/**\n * Tolerance for geometry simplification in device pixels.\n * @type {number}\n */\nconst SIMPLIFY_TOLERANCE = 0.5;\n\n/**\n * @const\n * @type {Object<import(\"../geom/Geometry.js\").Type,\n * function(import(\"../render/canvas/BuilderGroup.js\").default, import(\"../geom/Geometry.js\").default,\n * import(\"../style/Style.js\").default, Object): void>}\n */\nconst GEOMETRY_RENDERERS = {\n 'Point': renderPointGeometry,\n 'LineString': renderLineStringGeometry,\n 'Polygon': renderPolygonGeometry,\n 'MultiPoint': renderMultiPointGeometry,\n 'MultiLineString': renderMultiLineStringGeometry,\n 'MultiPolygon': renderMultiPolygonGeometry,\n 'GeometryCollection': renderGeometryCollectionGeometry,\n 'Circle': renderCircleGeometry,\n};\n\n/**\n * @param {import(\"../Feature.js\").FeatureLike} feature1 Feature 1.\n * @param {import(\"../Feature.js\").FeatureLike} feature2 Feature 2.\n * @return {number} Order.\n */\nexport function defaultOrder(feature1, feature2) {\n return parseInt(getUid(feature1), 10) - parseInt(getUid(feature2), 10);\n}\n\n/**\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Squared pixel tolerance.\n */\nexport function getSquaredTolerance(resolution, pixelRatio) {\n const tolerance = getTolerance(resolution, pixelRatio);\n return tolerance * tolerance;\n}\n\n/**\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Pixel tolerance.\n */\nexport function getTolerance(resolution, pixelRatio) {\n return (SIMPLIFY_TOLERANCE * resolution) / pixelRatio;\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Builder group.\n * @param {import(\"../geom/Circle.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {number} [index] Render order index.\n */\nfunction renderCircleGeometry(builderGroup, geometry, style, feature, index) {\n const fillStyle = style.getFill();\n const strokeStyle = style.getStroke();\n if (fillStyle || strokeStyle) {\n const circleReplay = builderGroup.getBuilder(style.getZIndex(), 'Circle');\n circleReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n circleReplay.drawCircle(geometry, feature, index);\n }\n const textStyle = style.getText();\n if (textStyle && textStyle.getText()) {\n const textReplay = builderGroup.getBuilder(style.getZIndex(), 'Text');\n textReplay.setTextStyle(textStyle);\n textReplay.drawText(geometry, feature);\n }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n * @param {import(\"../proj.js\").TransformFunction} [transform] Transform from user to view projection.\n * @param {boolean} [declutter] Enable decluttering.\n * @param {number} [index] Render order index..\n * @return {boolean} `true` if style is loading.\n */\nexport function renderFeature(\n replayGroup,\n feature,\n style,\n squaredTolerance,\n listener,\n transform,\n declutter,\n index,\n) {\n const loadingPromises = [];\n const imageStyle = style.getImage();\n if (imageStyle) {\n let loading = true;\n const imageState = imageStyle.getImageState();\n if (imageState == ImageState.LOADED || imageState == ImageState.ERROR) {\n loading = false;\n } else {\n if (imageState == ImageState.IDLE) {\n imageStyle.load();\n }\n }\n if (loading) {\n loadingPromises.push(imageStyle.ready());\n }\n }\n const fillStyle = style.getFill();\n if (fillStyle && fillStyle.loading()) {\n loadingPromises.push(fillStyle.ready());\n }\n const loading = loadingPromises.length > 0;\n if (loading) {\n Promise.all(loadingPromises).then(() => listener(null));\n }\n renderFeatureInternal(\n replayGroup,\n feature,\n style,\n squaredTolerance,\n transform,\n declutter,\n index,\n );\n\n return loading;\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {import(\"../proj.js\").TransformFunction} [transform] Optional transform function.\n * @param {boolean} [declutter] Enable decluttering.\n * @param {number} [index] Render order index..\n */\nfunction renderFeatureInternal(\n replayGroup,\n feature,\n style,\n squaredTolerance,\n transform,\n declutter,\n index,\n) {\n const geometry = style.getGeometryFunction()(feature);\n if (!geometry) {\n return;\n }\n const simplifiedGeometry = geometry.simplifyTransformed(\n squaredTolerance,\n transform,\n );\n const renderer = style.getRenderer();\n if (renderer) {\n renderGeometry(replayGroup, simplifiedGeometry, style, feature, index);\n } else {\n const geometryRenderer = GEOMETRY_RENDERERS[simplifiedGeometry.getType()];\n geometryRenderer(\n replayGroup,\n simplifiedGeometry,\n style,\n feature,\n index,\n declutter,\n );\n }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/Geometry.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n */\nfunction renderGeometry(replayGroup, geometry, style, feature, index) {\n if (geometry.getType() == 'GeometryCollection') {\n const geometries =\n /** @type {import(\"../geom/GeometryCollection.js\").default} */ (\n geometry\n ).getGeometries();\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n renderGeometry(replayGroup, geometries[i], style, feature, index);\n }\n return;\n }\n const replay = replayGroup.getBuilder(style.getZIndex(), 'Default');\n replay.drawCustom(\n /** @type {import(\"../geom/SimpleGeometry.js\").default} */ (geometry),\n feature,\n style.getRenderer(),\n style.getHitDetectionRenderer(),\n index,\n );\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/GeometryCollection.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} [declutterBuilderGroup] Builder for decluttering.\n * @param {number} [index] Render order index.\n */\nfunction renderGeometryCollectionGeometry(\n replayGroup,\n geometry,\n style,\n feature,\n declutterBuilderGroup,\n index,\n) {\n const geometries = geometry.getGeometriesArray();\n let i, ii;\n for (i = 0, ii = geometries.length; i < ii; ++i) {\n const geometryRenderer = GEOMETRY_RENDERERS[geometries[i].getType()];\n geometryRenderer(\n replayGroup,\n geometries[i],\n style,\n feature,\n declutterBuilderGroup,\n index,\n );\n }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/LineString.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n */\nfunction renderLineStringGeometry(\n builderGroup,\n geometry,\n style,\n feature,\n index,\n) {\n const strokeStyle = style.getStroke();\n if (strokeStyle) {\n const lineStringReplay = builderGroup.getBuilder(\n style.getZIndex(),\n 'LineString',\n );\n lineStringReplay.setFillStrokeStyle(null, strokeStyle);\n lineStringReplay.drawLineString(geometry, feature, index);\n }\n const textStyle = style.getText();\n if (textStyle && textStyle.getText()) {\n const textReplay = builderGroup.getBuilder(style.getZIndex(), 'Text');\n textReplay.setTextStyle(textStyle);\n textReplay.drawText(geometry, feature, index);\n }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/MultiLineString.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n */\nfunction renderMultiLineStringGeometry(\n builderGroup,\n geometry,\n style,\n feature,\n index,\n) {\n const strokeStyle = style.getStroke();\n if (strokeStyle) {\n const lineStringReplay = builderGroup.getBuilder(\n style.getZIndex(),\n 'LineString',\n );\n lineStringReplay.setFillStrokeStyle(null, strokeStyle);\n lineStringReplay.drawMultiLineString(geometry, feature, index);\n }\n const textStyle = style.getText();\n if (textStyle && textStyle.getText()) {\n const textReplay = builderGroup.getBuilder(style.getZIndex(), 'Text');\n textReplay.setTextStyle(textStyle);\n textReplay.drawText(geometry, feature, index);\n }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/MultiPolygon.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {number} [index] Render order index.\n */\nfunction renderMultiPolygonGeometry(\n builderGroup,\n geometry,\n style,\n feature,\n index,\n) {\n const fillStyle = style.getFill();\n const strokeStyle = style.getStroke();\n if (strokeStyle || fillStyle) {\n const polygonReplay = builderGroup.getBuilder(style.getZIndex(), 'Polygon');\n polygonReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n polygonReplay.drawMultiPolygon(geometry, feature, index);\n }\n const textStyle = style.getText();\n if (textStyle && textStyle.getText()) {\n const textReplay = builderGroup.getBuilder(style.getZIndex(), 'Text');\n textReplay.setTextStyle(textStyle);\n textReplay.drawText(geometry, feature, index);\n }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/Point.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n * @param {boolean} [declutter] Enable decluttering.\n */\nfunction renderPointGeometry(\n builderGroup,\n geometry,\n style,\n feature,\n index,\n declutter,\n) {\n const imageStyle = style.getImage();\n const textStyle = style.getText();\n const hasText = textStyle && textStyle.getText();\n /** @type {import(\"../render/canvas.js\").DeclutterImageWithText} */\n const declutterImageWithText =\n declutter && imageStyle && hasText ? {} : undefined;\n if (imageStyle) {\n if (imageStyle.getImageState() != ImageState.LOADED) {\n return;\n }\n const imageReplay = builderGroup.getBuilder(style.getZIndex(), 'Image');\n imageReplay.setImageStyle(imageStyle, declutterImageWithText);\n imageReplay.drawPoint(geometry, feature, index);\n }\n if (hasText) {\n const textReplay = builderGroup.getBuilder(style.getZIndex(), 'Text');\n textReplay.setTextStyle(textStyle, declutterImageWithText);\n textReplay.drawText(geometry, feature, index);\n }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/MultiPoint.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n * @param {boolean} [declutter] Enable decluttering.\n */\nfunction renderMultiPointGeometry(\n builderGroup,\n geometry,\n style,\n feature,\n index,\n declutter,\n) {\n const imageStyle = style.getImage();\n const hasImage = imageStyle && imageStyle.getOpacity() !== 0;\n const textStyle = style.getText();\n const hasText = textStyle && textStyle.getText();\n /** @type {import(\"../render/canvas.js\").DeclutterImageWithText} */\n const declutterImageWithText =\n declutter && hasImage && hasText ? {} : undefined;\n if (hasImage) {\n if (imageStyle.getImageState() != ImageState.LOADED) {\n return;\n }\n const imageReplay = builderGroup.getBuilder(style.getZIndex(), 'Image');\n imageReplay.setImageStyle(imageStyle, declutterImageWithText);\n imageReplay.drawMultiPoint(geometry, feature, index);\n }\n if (hasText) {\n const textReplay = builderGroup.getBuilder(style.getZIndex(), 'Text');\n textReplay.setTextStyle(textStyle, declutterImageWithText);\n textReplay.drawText(geometry, feature, index);\n }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/Polygon.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n */\nfunction renderPolygonGeometry(builderGroup, geometry, style, feature, index) {\n const fillStyle = style.getFill();\n const strokeStyle = style.getStroke();\n if (fillStyle || strokeStyle) {\n const polygonReplay = builderGroup.getBuilder(style.getZIndex(), 'Polygon');\n polygonReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n polygonReplay.drawPolygon(geometry, feature, index);\n }\n const textStyle = style.getText();\n if (textStyle && textStyle.getText()) {\n const textReplay = builderGroup.getBuilder(style.getZIndex(), 'Text');\n textReplay.setTextStyle(textStyle);\n textReplay.drawText(geometry, feature, index);\n }\n}\n", "/**\n * @module ol/renderer/canvas/VectorLayer\n */\nimport ViewHint from '../../ViewHint.js';\nimport {equals} from '../../array.js';\nimport {wrapX as wrapCoordinateX} from '../../coordinate.js';\nimport {createCanvasContext2D, releaseCanvas} from '../../dom.js';\nimport {\n buffer,\n containsExtent,\n createEmpty,\n getHeight,\n getWidth,\n intersects as intersectsExtent,\n isEmpty,\n wrapX as wrapExtentX,\n} from '../../extent.js';\nimport {\n fromUserExtent,\n getTransformFromProjections,\n getUserProjection,\n toUserExtent,\n toUserResolution,\n} from '../../proj.js';\nimport RenderEventType from '../../render/EventType.js';\nimport CanvasBuilderGroup from '../../render/canvas/BuilderGroup.js';\nimport ExecutorGroup, {\n ALL,\n DECLUTTER,\n NON_DECLUTTER,\n} from '../../render/canvas/ExecutorGroup.js';\nimport {\n HIT_DETECT_RESOLUTION,\n createHitDetectionImageData,\n hitDetect,\n} from '../../render/canvas/hitdetect.js';\nimport {getUid} from '../../util.js';\nimport {\n defaultOrder as defaultRenderOrder,\n getSquaredTolerance as getSquaredRenderTolerance,\n getTolerance as getRenderTolerance,\n renderFeature,\n} from '../vector.js';\nimport CanvasLayerRenderer, {canvasPool} from './Layer.js';\n\n/**\n * @classdesc\n * Canvas renderer for vector layers.\n * @api\n */\nclass CanvasVectorLayerRenderer extends CanvasLayerRenderer {\n /**\n * @param {import(\"../../layer/BaseVector.js\").default} vectorLayer Vector layer.\n */\n constructor(vectorLayer) {\n super(vectorLayer);\n\n /** @private */\n this.boundHandleStyleImageChange_ = this.handleStyleImageChange_.bind(this);\n\n /**\n * @private\n * @type {boolean}\n */\n this.animatingOrInteracting_;\n\n /**\n * @private\n * @type {ImageData|null}\n */\n this.hitDetectionImageData_ = null;\n\n /**\n * @private\n * @type {import(\"../../extent.js\").Extent}\n */\n this.clipExtent_ = null;\n\n /**\n * Do we need to extend the rendered area on the x-axis to handle\n * features that cross the antimeridian?\n * @private\n * @type {boolean}\n */\n this.extendX_ = false;\n\n /**\n * @private\n * @type {Array<import(\"../../Feature.js\").default>}\n */\n this.renderedFeatures_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.renderedRevision_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.renderedResolution_ = NaN;\n\n /**\n * @private\n * @type {import(\"../../extent.js\").Extent}\n */\n this.renderedExtent_ = createEmpty();\n\n /**\n * @private\n * @type {import(\"../../extent.js\").Extent}\n */\n this.wrappedRenderedExtent_ = createEmpty();\n\n /**\n * @private\n * @type {number}\n */\n this.renderedRotation_;\n\n /**\n * @private\n * @type {import(\"../../coordinate\").Coordinate}\n */\n this.renderedCenter_ = null;\n\n /**\n * @private\n * @type {import(\"../../proj/Projection\").default}\n */\n this.renderedProjection_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.renderedPixelRatio_ = 1;\n\n /**\n * @private\n * @type {import(\"../../render.js\").OrderFunction|null}\n */\n this.renderedRenderOrder_ = null;\n\n /**\n * @private\n * @type {boolean}\n */\n this.renderedFrameDeclutter_;\n\n /**\n * @private\n * @type {import(\"../../render/canvas/ExecutorGroup\").default}\n */\n this.replayGroup_ = null;\n\n /**\n * A new replay group had to be created by `prepareFrame()`\n * @type {boolean}\n */\n this.replayGroupChanged = true;\n\n /**\n * Clipping to be performed by `renderFrame()`\n * @type {boolean}\n */\n this.clipping = true;\n\n /**\n * @private\n * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D}\n */\n this.targetContext_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.opacity_ = 1;\n }\n\n /**\n * @param {ExecutorGroup} executorGroup Executor group.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {boolean} [declutterable] `true` to only render declutterable items,\n * `false` to only render non-declutterable items, `undefined` to render all.\n */\n renderWorlds(executorGroup, frameState, declutterable) {\n const extent = frameState.extent;\n const viewState = frameState.viewState;\n const center = viewState.center;\n const resolution = viewState.resolution;\n const projection = viewState.projection;\n const rotation = viewState.rotation;\n const projectionExtent = projection.getExtent();\n const vectorSource = this.getLayer().getSource();\n const declutter = this.getLayer().getDeclutter();\n const pixelRatio = frameState.pixelRatio;\n const viewHints = frameState.viewHints;\n const snapToPixel = !(\n viewHints[ViewHint.ANIMATING] || viewHints[ViewHint.INTERACTING]\n );\n const context = this.context;\n const width = Math.round((getWidth(extent) / resolution) * pixelRatio);\n const height = Math.round((getHeight(extent) / resolution) * pixelRatio);\n\n const multiWorld = vectorSource.getWrapX() && projection.canWrapX();\n const worldWidth = multiWorld ? getWidth(projectionExtent) : null;\n const endWorld = multiWorld\n ? Math.ceil((extent[2] - projectionExtent[2]) / worldWidth) +\n (this.extendX_ ? 2 : 1)\n : 1;\n let world = multiWorld\n ? Math.floor((extent[0] - projectionExtent[0]) / worldWidth) -\n (this.extendX_ ? 1 : 0)\n : 0;\n do {\n let transform = this.getRenderTransform(\n center,\n resolution,\n 0,\n pixelRatio,\n width,\n height,\n world * worldWidth,\n );\n if (frameState.declutter) {\n transform = transform.slice(0);\n }\n executorGroup.execute(\n context,\n [context.canvas.width, context.canvas.height],\n transform,\n rotation,\n snapToPixel,\n declutterable === undefined\n ? ALL\n : declutterable\n ? DECLUTTER\n : NON_DECLUTTER,\n declutterable\n ? declutter && frameState.declutter[declutter]\n : undefined,\n );\n } while (++world < endWorld);\n }\n\n /**\n * @private\n */\n setDrawContext_() {\n if (this.opacity_ !== 1) {\n this.targetContext_ = this.context;\n this.context = createCanvasContext2D(\n this.context.canvas.width,\n this.context.canvas.height,\n canvasPool,\n );\n }\n }\n\n /**\n * @private\n */\n resetDrawContext_() {\n if (this.opacity_ !== 1 && this.targetContext_) {\n const alpha = this.targetContext_.globalAlpha;\n this.targetContext_.globalAlpha = this.opacity_;\n this.targetContext_.drawImage(this.context.canvas, 0, 0);\n this.targetContext_.globalAlpha = alpha;\n releaseCanvas(this.context);\n canvasPool.push(this.context.canvas);\n this.context = this.targetContext_;\n this.targetContext_ = null;\n }\n }\n\n /**\n * Render declutter items for this layer\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n */\n renderDeclutter(frameState) {\n if (!this.replayGroup_ || !this.getLayer().getDeclutter()) {\n return;\n }\n this.renderWorlds(this.replayGroup_, frameState, true);\n }\n\n /**\n * Render deferred instructions.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @override\n */\n renderDeferredInternal(frameState) {\n if (!this.replayGroup_) {\n return;\n }\n if (this.clipExtent_) {\n this.clipUnrotated(this.context, frameState, this.clipExtent_);\n }\n this.replayGroup_.renderDeferred();\n if (this.clipExtent_) {\n this.context.restore();\n this.clipExtent_ = null;\n }\n this.resetDrawContext_();\n }\n\n /**\n * Render the layer.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {HTMLElement|null} target Target that may be used to render content to.\n * @return {HTMLElement} The rendered element.\n * @override\n */\n renderFrame(frameState, target) {\n const layerState = frameState.layerStatesArray[frameState.layerIndex];\n this.opacity_ = layerState.opacity;\n const viewState = frameState.viewState;\n\n this.prepareContainer(frameState, target);\n const context = this.context;\n\n const replayGroup = this.replayGroup_;\n let render = replayGroup && !replayGroup.isEmpty();\n if (!render) {\n const hasRenderListeners =\n this.getLayer().hasListener(RenderEventType.PRERENDER) ||\n this.getLayer().hasListener(RenderEventType.POSTRENDER);\n if (!hasRenderListeners) {\n return this.container;\n }\n }\n\n this.setDrawContext_();\n\n this.preRender(context, frameState);\n\n const projection = viewState.projection;\n\n // clipped rendering if layer extent is set\n this.clipExtent_ = null;\n let clipped = false;\n if (render && layerState.extent && this.clipping) {\n const layerExtent = fromUserExtent(layerState.extent, projection);\n render = intersectsExtent(layerExtent, frameState.extent);\n const needsClip =\n render && !containsExtent(layerExtent, frameState.extent);\n if (needsClip) {\n if (frameState.declutter) {\n // Store extent for deferred clipping\n this.clipExtent_ = layerExtent;\n } else {\n // Apply clipping immediately for non-declutter rendering\n this.clipUnrotated(context, frameState, layerExtent);\n clipped = true;\n }\n }\n }\n\n if (render) {\n this.renderWorlds(\n replayGroup,\n frameState,\n this.getLayer().getDeclutter() ? false : undefined,\n );\n }\n\n if (clipped) {\n context.restore();\n }\n\n this.postRender(context, frameState);\n\n if (this.renderedRotation_ !== viewState.rotation) {\n this.renderedRotation_ = viewState.rotation;\n this.hitDetectionImageData_ = null;\n }\n if (!frameState.declutter) {\n this.resetDrawContext_();\n }\n return this.container;\n }\n\n /**\n * Asynchronous layer level hit detection.\n * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n * @return {Promise<Array<import(\"../../Feature\").default>>} Promise\n * that resolves with an array of features.\n * @override\n */\n getFeatures(pixel) {\n return new Promise((resolve) => {\n if (\n this.frameState &&\n !this.hitDetectionImageData_ &&\n !this.animatingOrInteracting_\n ) {\n const size = this.frameState.size.slice();\n const center = this.renderedCenter_;\n const resolution = this.renderedResolution_;\n const rotation = this.renderedRotation_;\n const projection = this.renderedProjection_;\n const extent = this.wrappedRenderedExtent_;\n const layer = this.getLayer();\n const transforms = [];\n const width = size[0] * HIT_DETECT_RESOLUTION;\n const height = size[1] * HIT_DETECT_RESOLUTION;\n transforms.push(\n this.getRenderTransform(\n center,\n resolution,\n rotation,\n HIT_DETECT_RESOLUTION,\n width,\n height,\n 0,\n ).slice(),\n );\n const source = layer.getSource();\n const projectionExtent = projection.getExtent();\n if (\n source.getWrapX() &&\n projection.canWrapX() &&\n !containsExtent(projectionExtent, extent)\n ) {\n let startX = extent[0];\n const worldWidth = getWidth(projectionExtent);\n let world = 0;\n let offsetX;\n while (startX < projectionExtent[0]) {\n --world;\n offsetX = worldWidth * world;\n transforms.push(\n this.getRenderTransform(\n center,\n resolution,\n rotation,\n HIT_DETECT_RESOLUTION,\n width,\n height,\n offsetX,\n ).slice(),\n );\n startX += worldWidth;\n }\n world = 0;\n startX = extent[2];\n while (startX > projectionExtent[2]) {\n ++world;\n offsetX = worldWidth * world;\n transforms.push(\n this.getRenderTransform(\n center,\n resolution,\n rotation,\n HIT_DETECT_RESOLUTION,\n width,\n height,\n offsetX,\n ).slice(),\n );\n startX -= worldWidth;\n }\n }\n const userProjection = getUserProjection();\n this.hitDetectionImageData_ = createHitDetectionImageData(\n size,\n transforms,\n this.renderedFeatures_,\n layer.getStyleFunction(),\n extent,\n resolution,\n rotation,\n getSquaredRenderTolerance(resolution, this.renderedPixelRatio_),\n userProjection ? projection : null,\n );\n }\n resolve(\n hitDetect(pixel, this.renderedFeatures_, this.hitDetectionImageData_),\n );\n });\n }\n\n /**\n * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {number} hitTolerance Hit tolerance in pixels.\n * @param {import(\"../vector.js\").FeatureCallback<T>} callback Feature callback.\n * @param {Array<import(\"../Map.js\").HitMatch<T>>} matches The hit detected matches with tolerance.\n * @return {T|undefined} Callback result.\n * @template T\n * @override\n */\n forEachFeatureAtCoordinate(\n coordinate,\n frameState,\n hitTolerance,\n callback,\n matches,\n ) {\n if (!this.replayGroup_) {\n return undefined;\n }\n const resolution = frameState.viewState.resolution;\n const rotation = frameState.viewState.rotation;\n const layer = this.getLayer();\n\n /** @type {!Object<string, import(\"../Map.js\").HitMatch<T>|true>} */\n const features = {};\n\n /**\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../../geom/SimpleGeometry.js\").default} geometry Geometry.\n * @param {number} distanceSq The squared distance to the click position\n * @return {T|undefined} Callback result.\n */\n const featureCallback = function (feature, geometry, distanceSq) {\n const key = getUid(feature);\n const match = features[key];\n if (!match) {\n if (distanceSq === 0) {\n features[key] = true;\n return callback(feature, layer, geometry);\n }\n matches.push(\n (features[key] = {\n feature: feature,\n layer: layer,\n geometry: geometry,\n distanceSq: distanceSq,\n callback: callback,\n }),\n );\n } else if (match !== true && distanceSq < match.distanceSq) {\n if (distanceSq === 0) {\n features[key] = true;\n matches.splice(matches.lastIndexOf(match), 1);\n return callback(feature, layer, geometry);\n }\n match.geometry = geometry;\n match.distanceSq = distanceSq;\n }\n return undefined;\n };\n\n const declutter = this.getLayer().getDeclutter();\n return this.replayGroup_.forEachFeatureAtCoordinate(\n coordinate,\n resolution,\n rotation,\n hitTolerance,\n featureCallback,\n declutter\n ? frameState.declutter?.[declutter]?.all().map((item) => item.value)\n : null,\n );\n }\n\n /**\n * Perform action necessary to get the layer rendered after new fonts have loaded\n * @override\n */\n handleFontsChanged() {\n const layer = this.getLayer();\n if (layer.getVisible() && this.replayGroup_) {\n layer.changed();\n }\n }\n\n /**\n * Handle changes in image style state.\n * @param {import(\"../../events/Event.js\").default} event Image style change event.\n * @private\n */\n handleStyleImageChange_(event) {\n this.renderIfReadyAndVisible();\n }\n\n /**\n * Determine whether render should be called.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @return {boolean} Layer is ready to be rendered.\n * @override\n */\n prepareFrame(frameState) {\n const vectorLayer = this.getLayer();\n const vectorSource = vectorLayer.getSource();\n if (!vectorSource) {\n return false;\n }\n\n const animating = frameState.viewHints[ViewHint.ANIMATING];\n const interacting = frameState.viewHints[ViewHint.INTERACTING];\n const updateWhileAnimating = vectorLayer.getUpdateWhileAnimating();\n const updateWhileInteracting = vectorLayer.getUpdateWhileInteracting();\n\n if (\n (this.ready && !updateWhileAnimating && animating) ||\n (!updateWhileInteracting && interacting)\n ) {\n this.animatingOrInteracting_ = true;\n return true;\n }\n this.animatingOrInteracting_ = false;\n\n const frameStateExtent = frameState.extent;\n const viewState = frameState.viewState;\n const projection = viewState.projection;\n const resolution = viewState.resolution;\n const pixelRatio = frameState.pixelRatio;\n const vectorLayerRevision = vectorLayer.getRevision();\n const vectorLayerRenderBuffer = vectorLayer.getRenderBuffer();\n let vectorLayerRenderOrder = vectorLayer.getRenderOrder();\n\n if (vectorLayerRenderOrder === undefined) {\n vectorLayerRenderOrder = defaultRenderOrder;\n }\n\n const center = viewState.center.slice();\n const extent = buffer(\n frameStateExtent,\n vectorLayerRenderBuffer * resolution,\n );\n const renderedExtent = extent.slice();\n const loadExtents = [extent.slice()];\n const projectionExtent = projection.getExtent();\n\n const canWrapX = vectorSource.getWrapX() && projection.canWrapX();\n this.extendX_ = false;\n if (canWrapX) {\n const sourceExtent = vectorSource.getExtent();\n if (sourceExtent && !isEmpty(sourceExtent)) {\n this.extendX_ =\n sourceExtent[0] < projectionExtent[0] ||\n sourceExtent[2] > projectionExtent[2];\n }\n }\n\n if (\n canWrapX &&\n (!containsExtent(projectionExtent, frameState.extent) || this.extendX_)\n ) {\n // For the replay group, we need an extent that intersects the real world\n // (-180\u00B0 to +180\u00B0). To support geometries in a coordinate range from -540\u00B0\n // to +540\u00B0, we add at least 1 world width on each side of the projection\n // extent. If the viewport is wider than the world, we need to add half of\n // the viewport width to make sure we cover the whole viewport.\n const worldWidth = getWidth(projectionExtent);\n const gutter = Math.max(getWidth(extent) / 2, worldWidth);\n let projMinX = projectionExtent[0];\n let projMaxX = projectionExtent[2];\n if (this.extendX_) {\n projMinX -= worldWidth;\n projMaxX += worldWidth;\n }\n extent[0] = projMinX - gutter;\n extent[2] = projMaxX + gutter;\n wrapCoordinateX(center, projection);\n const loadExtent = wrapExtentX(loadExtents[0], projection);\n // If the extent crosses the date line, we load data for both edges of the worlds\n if (\n loadExtent[0] < projectionExtent[0] &&\n loadExtent[2] < projectionExtent[2]\n ) {\n loadExtents.push([\n loadExtent[0] + worldWidth,\n loadExtent[1],\n loadExtent[2] + worldWidth,\n loadExtent[3],\n ]);\n } else if (\n loadExtent[0] > projectionExtent[0] &&\n loadExtent[2] > projectionExtent[2]\n ) {\n loadExtents.push([\n loadExtent[0] - worldWidth,\n loadExtent[1],\n loadExtent[2] - worldWidth,\n loadExtent[3],\n ]);\n }\n }\n\n if (\n this.ready &&\n this.renderedResolution_ == resolution &&\n this.renderedPixelRatio_ === pixelRatio &&\n this.renderedRevision_ == vectorLayerRevision &&\n this.renderedRenderOrder_ == vectorLayerRenderOrder &&\n this.renderedFrameDeclutter_ === !!frameState.declutter &&\n containsExtent(this.wrappedRenderedExtent_, extent)\n ) {\n if (!equals(this.renderedExtent_, renderedExtent)) {\n this.hitDetectionImageData_ = null;\n this.renderedExtent_ = renderedExtent;\n }\n this.renderedCenter_ = center;\n this.replayGroupChanged = false;\n return true;\n }\n\n this.replayGroup_ = null;\n\n const replayGroup = new CanvasBuilderGroup(\n getRenderTolerance(resolution, pixelRatio),\n extent,\n resolution,\n pixelRatio,\n );\n\n const userProjection = getUserProjection();\n let userTransform;\n if (userProjection) {\n for (let i = 0, ii = loadExtents.length; i < ii; ++i) {\n const extent = loadExtents[i];\n const userExtent = toUserExtent(extent, projection);\n vectorSource.loadFeatures(\n userExtent,\n toUserResolution(resolution, projection),\n userProjection,\n );\n }\n userTransform = getTransformFromProjections(userProjection, projection);\n } else {\n for (let i = 0, ii = loadExtents.length; i < ii; ++i) {\n vectorSource.loadFeatures(loadExtents[i], resolution, projection);\n }\n }\n\n const squaredTolerance = getSquaredRenderTolerance(resolution, pixelRatio);\n let ready = true;\n const render =\n /**\n * @param {import(\"../../Feature.js\").default} feature Feature.\n * @param {number} index Index.\n */\n (feature, index) => {\n let styles;\n const styleFunction =\n feature.getStyleFunction() || vectorLayer.getStyleFunction();\n if (styleFunction) {\n styles = styleFunction(feature, resolution);\n }\n if (styles) {\n const dirty = this.renderFeature(\n feature,\n squaredTolerance,\n styles,\n replayGroup,\n userTransform,\n this.getLayer().getDeclutter(),\n index,\n );\n ready = ready && !dirty;\n }\n };\n\n const userExtent = toUserExtent(extent, projection);\n /** @type {Array<import(\"../../Feature.js\").default>} */\n const features = vectorSource.getFeaturesInExtent(userExtent);\n if (vectorLayerRenderOrder) {\n features.sort(vectorLayerRenderOrder);\n }\n for (let i = 0, ii = features.length; i < ii; ++i) {\n render(features[i], i);\n }\n this.renderedFeatures_ = features;\n this.ready = ready;\n\n const replayGroupInstructions = replayGroup.finish();\n const executorGroup = new ExecutorGroup(\n extent,\n resolution,\n pixelRatio,\n vectorSource.getOverlaps(),\n replayGroupInstructions,\n vectorLayer.getRenderBuffer(),\n !!frameState.declutter,\n );\n\n this.renderedResolution_ = resolution;\n this.renderedRevision_ = vectorLayerRevision;\n this.renderedRenderOrder_ = vectorLayerRenderOrder;\n this.renderedFrameDeclutter_ = !!frameState.declutter;\n this.renderedExtent_ = renderedExtent;\n this.wrappedRenderedExtent_ = extent;\n this.renderedCenter_ = center;\n this.renderedProjection_ = projection;\n this.renderedPixelRatio_ = pixelRatio;\n this.replayGroup_ = executorGroup;\n this.hitDetectionImageData_ = null;\n\n this.replayGroupChanged = true;\n return true;\n }\n\n /**\n * @param {import(\"../../Feature.js\").default} feature Feature.\n * @param {number} squaredTolerance Squared render tolerance.\n * @param {import(\"../../style/Style.js\").default|Array<import(\"../../style/Style.js\").default>} styles The style or array of styles.\n * @param {import(\"../../render/canvas/BuilderGroup.js\").default} builderGroup Builder group.\n * @param {import(\"../../proj.js\").TransformFunction} [transform] Transform from user to view projection.\n * @param {boolean} [declutter] Enable decluttering.\n * @param {number} [index] Render order index.\n * @return {boolean} `true` if an image is loading.\n */\n renderFeature(\n feature,\n squaredTolerance,\n styles,\n builderGroup,\n transform,\n declutter,\n index,\n ) {\n if (!styles) {\n return false;\n }\n let loading = false;\n if (Array.isArray(styles)) {\n for (let i = 0, ii = styles.length; i < ii; ++i) {\n loading =\n renderFeature(\n builderGroup,\n feature,\n styles[i],\n squaredTolerance,\n this.boundHandleStyleImageChange_,\n transform,\n declutter,\n index,\n ) || loading;\n }\n } else {\n loading = renderFeature(\n builderGroup,\n feature,\n styles,\n squaredTolerance,\n this.boundHandleStyleImageChange_,\n transform,\n declutter,\n index,\n );\n }\n return loading;\n }\n}\n\nexport default CanvasVectorLayerRenderer;\n", "/**\n * @module ol/layer/Vector\n */\nimport CanvasVectorLayerRenderer from '../renderer/canvas/VectorLayer.js';\nimport BaseVectorLayer from './BaseVector.js';\n\n/**\n * @template {import(\"../source/Vector.js\").default<FeatureType>} [VectorSourceType=import(\"../source/Vector.js\").default<*>]\n * @template {import('../Feature.js').FeatureLike} [FeatureType=import(\"./BaseVector.js\").ExtractedFeatureType<VectorSourceType>]\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering. The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {import(\"../render.js\").OrderFunction} [renderOrder] Render order. Function to be used when sorting\n * features before rendering. By default features are drawn in the order that they are created. Use\n * `null` to avoid the sort, but get an undefined draw order.\n * @property {number} [renderBuffer=100] The buffer in pixels around the viewport extent used by the\n * renderer when getting features from the vector source for the rendering or hit-detection.\n * Recommended value: the size of the largest symbol, line width or label.\n * @property {VectorSourceType} [source] Source.\n * @property {import(\"../Map.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use [map.addLayer()]{@link import(\"../Map.js\").default#addLayer}.\n * @property {boolean|string|number} [declutter=false] Declutter images and text. Any truthy value will enable\n * decluttering. Within a layer, a feature rendered before another has higher priority. All layers with the\n * same `declutter` value will be decluttered together. The priority is determined by the drawing order of the\n * layers with the same `declutter` value. Higher in the layer stack means higher priority. To declutter distinct\n * layers or groups of layers separately, use different truthy values for `declutter`.\n * @property {import(\"../style/Style.js\").StyleLike|import(\"../style/flat.js\").FlatStyleLike|null} [style] Layer style. When set to `null`, only\n * features that have their own style will be rendered. See {@link module:ol/style/Style~Style} for the default style\n * which will be used if this is not set.\n * @property {import(\"./Base.js\").BackgroundColor} [background] Background color for the layer. If not specified, no background\n * will be rendered.\n * @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will\n * be recreated during animations. This means that no vectors will be shown clipped, but the\n * setting will have a performance impact for large amounts of vector data. When set to `false`,\n * batches will be recreated when no animation is active.\n * @property {boolean} [updateWhileInteracting=false] When set to `true`, feature batches will\n * be recreated during interactions. See also `updateWhileAnimating`.\n * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n\n/**\n * @classdesc\n * Vector data is rendered client-side, as vectors. This layer type provides most accurate rendering\n * even during animations. Points and labels stay upright on rotated views. For very large\n * amounts of vector data, performance may suffer during pan and zoom animations. In this case,\n * try {@link module:ol/layer/VectorImage~VectorImageLayer}.\n *\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/Vector.js\").default<FeatureType>} [VectorSourceType=import(\"../source/Vector.js\").default<*>]\n * @template {import('../Feature.js').FeatureLike} [FeatureType=import(\"./BaseVector.js\").ExtractedFeatureType<VectorSourceType>]\n * @extends {BaseVectorLayer<FeatureType, VectorSourceType, CanvasVectorLayerRenderer>}\n * @api\n */\nclass VectorLayer extends BaseVectorLayer {\n /**\n * @param {Options<VectorSourceType, FeatureType>} [options] Options.\n */\n constructor(options) {\n super(options);\n }\n\n /**\n * @override\n */\n createRenderer() {\n return new CanvasVectorLayerRenderer(this);\n }\n}\n\nexport default VectorLayer;\n", "/**\n * @module ol/Feature\n */\nimport BaseObject from './Object.js';\nimport {assert} from './asserts.js';\nimport EventType from './events/EventType.js';\nimport {listen, unlistenByKey} from './events.js';\n\n/**\n * @typedef {typeof Feature|typeof import(\"./render/Feature.js\").default} FeatureClass\n */\n\n/**\n * @typedef {Feature|import(\"./render/Feature.js\").default} FeatureLike\n */\n\n/***\n * @template Return\n * @typedef {import(\"./Observable\").OnSignature<import(\"./Observable\").EventTypes, import(\"./events/Event.js\").default, Return> &\n * import(\"./Observable\").OnSignature<import(\"./ObjectEventType\").Types|'change:geometry', import(\"./Object\").ObjectEvent, Return> &\n * import(\"./Observable\").CombinedOnSignature<import(\"./Observable\").EventTypes|import(\"./ObjectEventType\").Types\n * |'change:geometry', Return>} FeatureOnSignature\n */\n\n/***\n * @template {import(\"./geom/Geometry.js\").default} [Geometry=import(\"./geom/Geometry.js\").default]\n * @template {Object<string, *>} [Properties=Object<string, *>]\n * @typedef {Properties & { geometry?: Geometry }} ObjectWithGeometry\n */\n\n/**\n * @classdesc\n * A vector object for geographic features with a geometry and other\n * attribute properties, similar to the features in vector file formats like\n * GeoJSON.\n *\n * Features can be styled individually with `setStyle`; otherwise they use the\n * style of their vector layer.\n *\n * Note that attribute properties are set as {@link module:ol/Object~BaseObject} properties on\n * the feature object, so they are observable, and have get/set accessors.\n *\n * Typically, a feature has a single geometry property. You can set the\n * geometry using the `setGeometry` method and get it with `getGeometry`.\n * It is possible to store more than one geometry on a feature using attribute\n * properties. By default, the geometry used for rendering is identified by\n * the property name `geometry`. If you want to use another geometry property\n * for rendering, use the `setGeometryName` method to change the attribute\n * property associated with the geometry for the feature. For example:\n *\n * ```js\n *\n * import Feature from 'ol/Feature.js';\n * import Polygon from 'ol/geom/Polygon.js';\n * import Point from 'ol/geom/Point.js';\n *\n * const feature = new Feature({\n * geometry: new Polygon(polyCoords),\n * labelPoint: new Point(labelCoords),\n * name: 'My Polygon',\n * });\n *\n * // get the polygon geometry\n * const poly = feature.getGeometry();\n *\n * // Render the feature as a point using the coordinates from labelPoint\n * feature.setGeometryName('labelPoint');\n *\n * // get the point geometry\n * const point = feature.getGeometry();\n * ```\n *\n * @api\n * @template {import(\"./geom/Geometry.js\").default} [Geometry=import(\"./geom/Geometry.js\").default]\n * @template {Object<string, *>} [Properties=Object<string, *>]\n * @extends {BaseObject<NoInfer<Properties>>}\n */\nclass Feature extends BaseObject {\n /**\n * @param {Geometry|ObjectWithGeometry<Geometry, NoInfer<Properties>>} [geometryOrProperties]\n * You may pass a Geometry object directly, or an object literal containing\n * properties. If you pass an object literal, you may include a Geometry\n * associated with a `geometry` key.\n */\n constructor(geometryOrProperties) {\n super();\n\n /***\n * @type {FeatureOnSignature<import(\"./events\").EventsKey>}\n */\n this.on;\n\n /***\n * @type {FeatureOnSignature<import(\"./events\").EventsKey>}\n */\n this.once;\n\n /***\n * @type {FeatureOnSignature<void>}\n */\n this.un;\n\n /**\n * @private\n * @type {number|string|undefined}\n */\n this.id_ = undefined;\n\n /**\n * @type {string}\n * @private\n */\n this.geometryName_ = 'geometry';\n\n /**\n * User provided style.\n * @private\n * @type {import(\"./style/Style.js\").StyleLike}\n */\n this.style_ = null;\n\n /**\n * @private\n * @type {import(\"./style/Style.js\").StyleFunction|undefined}\n */\n this.styleFunction_ = undefined;\n\n /**\n * @private\n * @type {?import(\"./events.js\").EventsKey}\n */\n this.geometryChangeKey_ = null;\n\n this.addChangeListener(this.geometryName_, this.handleGeometryChanged_);\n\n if (geometryOrProperties) {\n if (\n typeof (\n /** @type {?} */ (geometryOrProperties).getSimplifiedGeometry\n ) === 'function'\n ) {\n const geometry = /** @type {Geometry} */ (geometryOrProperties);\n this.setGeometry(geometry);\n } else {\n /** @type {?} */\n const properties = geometryOrProperties;\n this.setProperties(properties);\n }\n }\n }\n\n /**\n * Clone this feature. If the original feature has a geometry it\n * is also cloned. The feature id is not set in the clone.\n * @return {Feature<Geometry>} The clone.\n * @api\n */\n clone() {\n const clone = /** @type {Feature<Geometry>} */ (\n new Feature(this.hasProperties() ? this.getProperties() : null)\n );\n clone.setGeometryName(this.getGeometryName());\n const geometry = this.getGeometry();\n if (geometry) {\n clone.setGeometry(/** @type {Geometry} */ (geometry.clone()));\n }\n const style = this.getStyle();\n if (style) {\n clone.setStyle(style);\n }\n return clone;\n }\n\n /**\n * Get the feature's default geometry. A feature may have any number of named\n * geometries. The \"default\" geometry (the one that is rendered by default) is\n * set when calling {@link module:ol/Feature~Feature#setGeometry}.\n * @return {Geometry|undefined} The default geometry for the feature.\n * @api\n * @observable\n */\n getGeometry() {\n return /** @type {Geometry|undefined} */ (this.get(this.geometryName_));\n }\n\n /**\n * Get the feature identifier. This is a stable identifier for the feature and\n * is either set when reading data from a remote source or set explicitly by\n * calling {@link module:ol/Feature~Feature#setId}.\n * @return {number|string|undefined} Id.\n * @api\n */\n getId() {\n return this.id_;\n }\n\n /**\n * Get the name of the feature's default geometry. By default, the default\n * geometry is named `geometry`.\n * @return {string} Get the property name associated with the default geometry\n * for this feature.\n * @api\n */\n getGeometryName() {\n return this.geometryName_;\n }\n\n /**\n * Get the feature's style. Will return what was provided to the\n * {@link module:ol/Feature~Feature#setStyle} method.\n * @return {import(\"./style/Style.js\").StyleLike|undefined} The feature style.\n * @api\n */\n getStyle() {\n return this.style_;\n }\n\n /**\n * Get the feature's style function.\n * @return {import(\"./style/Style.js\").StyleFunction|undefined} Return a function\n * representing the current style of this feature.\n * @api\n */\n getStyleFunction() {\n return this.styleFunction_;\n }\n\n /**\n * @private\n */\n handleGeometryChange_() {\n this.changed();\n }\n\n /**\n * @private\n */\n handleGeometryChanged_() {\n if (this.geometryChangeKey_) {\n unlistenByKey(this.geometryChangeKey_);\n this.geometryChangeKey_ = null;\n }\n const geometry = this.getGeometry();\n if (geometry) {\n this.geometryChangeKey_ = listen(\n geometry,\n EventType.CHANGE,\n this.handleGeometryChange_,\n this,\n );\n }\n this.changed();\n }\n\n /**\n * Set the default geometry for the feature. This will update the property\n * with the name returned by {@link module:ol/Feature~Feature#getGeometryName}.\n * @param {Geometry|undefined} geometry The new geometry.\n * @api\n * @observable\n */\n setGeometry(geometry) {\n this.set(this.geometryName_, geometry);\n }\n\n /**\n * Set the style for the feature to override the layer style. This can be a\n * single style object, an array of styles, or a function that takes a\n * resolution and returns an array of styles. To unset the feature style, call\n * `setStyle()` without arguments or a falsey value.\n * @param {import(\"./style/Style.js\").StyleLike} [style] Style for this feature.\n * @api\n * @fires module:ol/events/Event~BaseEvent#event:change\n */\n setStyle(style) {\n this.style_ = style;\n this.styleFunction_ = !style ? undefined : createStyleFunction(style);\n this.changed();\n }\n\n /**\n * Set the feature id. The feature id is considered stable and may be used when\n * requesting features or comparing identifiers returned from a remote source.\n * The feature id can be used with the\n * {@link module:ol/source/Vector~VectorSource#getFeatureById} method.\n * @param {number|string|undefined} id The feature id.\n * @api\n * @fires module:ol/events/Event~BaseEvent#event:change\n */\n setId(id) {\n this.id_ = id;\n this.changed();\n }\n\n /**\n * Set the property name to be used when getting the feature's default geometry.\n * When calling {@link module:ol/Feature~Feature#getGeometry}, the value of the property with\n * this name will be returned.\n * @param {string} name The property name of the default geometry.\n * @api\n */\n setGeometryName(name) {\n this.removeChangeListener(this.geometryName_, this.handleGeometryChanged_);\n this.geometryName_ = name;\n this.addChangeListener(this.geometryName_, this.handleGeometryChanged_);\n this.handleGeometryChanged_();\n }\n}\n\n/**\n * Convert the provided object into a feature style function. Functions passed\n * through unchanged. Arrays of Style or single style objects wrapped\n * in a new feature style function.\n * @param {!import(\"./style/Style.js\").StyleFunction|!Array<import(\"./style/Style.js\").default>|!import(\"./style/Style.js\").default} obj\n * A feature style function, a single style, or an array of styles.\n * @return {import(\"./style/Style.js\").StyleFunction} A style function.\n */\nexport function createStyleFunction(obj) {\n if (typeof obj === 'function') {\n return obj;\n }\n /**\n * @type {Array<import(\"./style/Style.js\").default>}\n */\n let styles;\n if (Array.isArray(obj)) {\n styles = obj;\n } else {\n assert(\n typeof (/** @type {?} */ (obj).getZIndex) === 'function',\n 'Expected an `ol/style/Style` or an array of `ol/style/Style.js`',\n );\n const style = /** @type {import(\"./style/Style.js\").default} */ (obj);\n styles = [style];\n }\n return function () {\n return styles;\n };\n}\nexport default Feature;\n", "/**\n * @module ol/geom/flat/interpolate\n */\nimport {binarySearch} from '../../array.js';\nimport {lerp} from '../../math.js';\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} fraction Fraction.\n * @param {Array<number>} [dest] Destination.\n * @param {number} [dimension] Destination dimension (default is `2`)\n * @return {Array<number>} Destination.\n */\nexport function interpolatePoint(\n flatCoordinates,\n offset,\n end,\n stride,\n fraction,\n dest,\n dimension,\n) {\n let o, t;\n const n = (end - offset) / stride;\n if (n === 1) {\n o = offset;\n } else if (n === 2) {\n o = offset;\n t = fraction;\n } else if (n !== 0) {\n let x1 = flatCoordinates[offset];\n let y1 = flatCoordinates[offset + 1];\n let length = 0;\n const cumulativeLengths = [0];\n for (let i = offset + stride; i < end; i += stride) {\n const x2 = flatCoordinates[i];\n const y2 = flatCoordinates[i + 1];\n length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n cumulativeLengths.push(length);\n x1 = x2;\n y1 = y2;\n }\n const target = fraction * length;\n const index = binarySearch(cumulativeLengths, target);\n if (index < 0) {\n t =\n (target - cumulativeLengths[-index - 2]) /\n (cumulativeLengths[-index - 1] - cumulativeLengths[-index - 2]);\n o = offset + (-index - 2) * stride;\n } else {\n o = offset + index * stride;\n }\n }\n dimension = dimension > 1 ? dimension : 2;\n dest = dest ? dest : new Array(dimension);\n for (let i = 0; i < dimension; ++i) {\n dest[i] =\n o === undefined\n ? NaN\n : t === undefined\n ? flatCoordinates[o + i]\n : lerp(flatCoordinates[o + i], flatCoordinates[o + stride + i], t);\n }\n return dest;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} m M.\n * @param {boolean} extrapolate Extrapolate.\n * @return {import(\"../../coordinate.js\").Coordinate|null} Coordinate.\n */\nexport function lineStringCoordinateAtM(\n flatCoordinates,\n offset,\n end,\n stride,\n m,\n extrapolate,\n) {\n if (end == offset) {\n return null;\n }\n let coordinate;\n if (m < flatCoordinates[offset + stride - 1]) {\n if (extrapolate) {\n coordinate = flatCoordinates.slice(offset, offset + stride);\n coordinate[stride - 1] = m;\n return coordinate;\n }\n return null;\n }\n if (flatCoordinates[end - 1] < m) {\n if (extrapolate) {\n coordinate = flatCoordinates.slice(end - stride, end);\n coordinate[stride - 1] = m;\n return coordinate;\n }\n return null;\n }\n // FIXME use O(1) search\n if (m == flatCoordinates[offset + stride - 1]) {\n return flatCoordinates.slice(offset, offset + stride);\n }\n let lo = offset / stride;\n let hi = end / stride;\n while (lo < hi) {\n const mid = (lo + hi) >> 1;\n if (m < flatCoordinates[(mid + 1) * stride - 1]) {\n hi = mid;\n } else {\n lo = mid + 1;\n }\n }\n const m0 = flatCoordinates[lo * stride - 1];\n if (m == m0) {\n return flatCoordinates.slice((lo - 1) * stride, (lo - 1) * stride + stride);\n }\n const m1 = flatCoordinates[(lo + 1) * stride - 1];\n const t = (m - m0) / (m1 - m0);\n coordinate = [];\n for (let i = 0; i < stride - 1; ++i) {\n coordinate.push(\n lerp(\n flatCoordinates[(lo - 1) * stride + i],\n flatCoordinates[lo * stride + i],\n t,\n ),\n );\n }\n coordinate.push(m);\n return coordinate;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} m M.\n * @param {boolean} extrapolate Extrapolate.\n * @param {boolean} interpolate Interpolate.\n * @return {import(\"../../coordinate.js\").Coordinate|null} Coordinate.\n */\nexport function lineStringsCoordinateAtM(\n flatCoordinates,\n offset,\n ends,\n stride,\n m,\n extrapolate,\n interpolate,\n) {\n if (interpolate) {\n return lineStringCoordinateAtM(\n flatCoordinates,\n offset,\n ends[ends.length - 1],\n stride,\n m,\n extrapolate,\n );\n }\n let coordinate;\n if (m < flatCoordinates[stride - 1]) {\n if (extrapolate) {\n coordinate = flatCoordinates.slice(0, stride);\n coordinate[stride - 1] = m;\n return coordinate;\n }\n return null;\n }\n if (flatCoordinates[flatCoordinates.length - 1] < m) {\n if (extrapolate) {\n coordinate = flatCoordinates.slice(flatCoordinates.length - stride);\n coordinate[stride - 1] = m;\n return coordinate;\n }\n return null;\n }\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n if (offset == end) {\n continue;\n }\n if (m < flatCoordinates[offset + stride - 1]) {\n return null;\n }\n if (m <= flatCoordinates[end - 1]) {\n return lineStringCoordinateAtM(\n flatCoordinates,\n offset,\n end,\n stride,\n m,\n false,\n );\n }\n offset = end;\n }\n return null;\n}\n", "/**\n * @module ol/featureloader\n */\n\n/**\n *\n * @type {boolean}\n * @private\n */\nlet withCredentials = false;\n\n/**\n * {@link module:ol/source/Vector~VectorSource} sources use a function of this type to\n * load features.\n *\n * This function takes up to 5 arguments. These are an {@link module:ol/extent~Extent} representing\n * the area to be loaded, a `{number}` representing the resolution (map units per pixel), a\n * {@link module:ol/proj/Projection~Projection} for the projection, an optional success callback that should get\n * the loaded features passed as an argument and an optional failure callback with no arguments. If\n * the callbacks are not used, the corresponding vector source will not fire `'featuresloadend'` and\n * `'featuresloaderror'` events. `this` within the function is bound to the\n * {@link module:ol/source/Vector~VectorSource} it's called from.\n *\n * The function is responsible for loading the features and adding them to the\n * source.\n *\n * @template {import(\"./Feature.js\").FeatureLike} [FeatureType=import(\"./Feature.js\").FeatureLike]\n * @typedef {(\n * extent: import(\"./extent.js\").Extent,\n * resolution: number,\n * projection: import(\"./proj/Projection.js\").default,\n * success?: (features: Array<FeatureType>) => void,\n * failure?: () => void) => void} FeatureLoader\n * @api\n */\n\n/**\n * {@link module:ol/source/Vector~VectorSource} sources use a function of this type to\n * get the url to load features from.\n *\n * This function takes an {@link module:ol/extent~Extent} representing the area\n * to be loaded, a `{number}` representing the resolution (map units per pixel)\n * and an {@link module:ol/proj/Projection~Projection} for the projection as\n * arguments and returns a `{string}` representing the URL.\n * @typedef {function(import(\"./extent.js\").Extent, number, import(\"./proj/Projection.js\").default): string} FeatureUrlFunction\n * @api\n */\n\n/**\n * @template {import(\"./Feature.js\").FeatureLike} [FeatureType=import(\"./Feature.js\").default]\n * @param {string|FeatureUrlFunction} url Feature URL service.\n * @param {import(\"./format/Feature.js\").default<FeatureType>} format Feature format.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @param {function(Array<FeatureType>, import(\"./proj/Projection.js\").default): void} success Success\n * Function called with the loaded features and optionally with the data projection.\n * @param {function(): void} failure Failure\n * Function called when loading failed.\n */\nexport function loadFeaturesXhr(\n url,\n format,\n extent,\n resolution,\n projection,\n success,\n failure,\n) {\n const xhr = new XMLHttpRequest();\n xhr.open(\n 'GET',\n typeof url === 'function' ? url(extent, resolution, projection) : url,\n true,\n );\n if (format.getType() == 'arraybuffer') {\n xhr.responseType = 'arraybuffer';\n }\n xhr.withCredentials = withCredentials;\n /**\n * @param {Event} event Event.\n * @private\n */\n xhr.onload = function (event) {\n // status will be 0 for file:// urls\n if (!xhr.status || (xhr.status >= 200 && xhr.status < 300)) {\n const type = format.getType();\n try {\n /** @type {Document|Node|Object|string|undefined} */\n let source;\n if (type == 'text' || type == 'json') {\n source = xhr.responseText;\n } else if (type == 'xml') {\n source = xhr.responseXML || xhr.responseText;\n } else if (type == 'arraybuffer') {\n source = /** @type {ArrayBuffer} */ (xhr.response);\n }\n if (source) {\n success(\n /** @type {Array<FeatureType>} */\n (\n format.readFeatures(source, {\n extent: extent,\n featureProjection: projection,\n })\n ),\n format.readProjection(source),\n );\n } else {\n failure();\n }\n } catch {\n failure();\n }\n } else {\n failure();\n }\n };\n /**\n * @private\n */\n xhr.onerror = failure;\n xhr.send();\n}\n\n/**\n * Create an XHR feature loader for a `url` and `format`. The feature loader\n * loads features (with XHR), parses the features, and adds them to the\n * vector source.\n *\n * @template {import(\"./Feature.js\").FeatureLike} [FeatureType=import(\"./Feature.js\").default]\n * @param {string|FeatureUrlFunction} url Feature URL service.\n * @param {import(\"./format/Feature.js\").default<FeatureType>} format Feature format.\n * @return {FeatureLoader<FeatureType>} The feature loader.\n * @api\n */\nexport function xhr(url, format) {\n /**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @param {function(Array<FeatureType>): void} [success] Success\n * Function called when loading succeeded.\n * @param {function(): void} [failure] Failure\n * Function called when loading failed.\n * @this {import(\"./source/Vector.js\").default<FeatureType>}\n */\n return function (extent, resolution, projection, success, failure) {\n loadFeaturesXhr(\n url,\n format,\n extent,\n resolution,\n projection,\n /**\n * @param {Array<FeatureType>} features The loaded features.\n * @param {import(\"./proj/Projection.js\").default} dataProjection Data\n * projection.\n */\n (features, dataProjection) => {\n this.addFeatures(features);\n if (success !== undefined) {\n success(features);\n }\n },\n () => {\n this.changed();\n if (failure !== undefined) {\n failure();\n }\n },\n );\n };\n}\n\n/**\n * Setter for the withCredentials configuration for the XHR.\n *\n * @param {boolean} xhrWithCredentials The value of withCredentials to set.\n * Compare https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/\n * @api\n */\nexport function setWithCredentials(xhrWithCredentials) {\n withCredentials = xhrWithCredentials;\n}\n", "/**\n * @module ol/loadingstrategy\n */\n\nimport {fromUserExtent, fromUserResolution, toUserExtent} from './proj.js';\n\n/**\n * Strategy function for loading all features with a single request.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @return {Array<import(\"./extent.js\").Extent>} Extents.\n * @api\n */\nexport function all(extent, resolution) {\n return [[-Infinity, -Infinity, Infinity, Infinity]];\n}\n\n/**\n * Strategy function for loading features based on the view's extent and\n * resolution.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @return {Array<import(\"./extent.js\").Extent>} Extents.\n * @api\n */\nexport function bbox(extent, resolution) {\n return [extent];\n}\n\n/**\n * Creates a strategy function for loading features based on a tile grid.\n * @param {import(\"./tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @return {function(import(\"./extent.js\").Extent, number, import(\"./proj.js\").Projection): Array<import(\"./extent.js\").Extent>} Loading strategy.\n * @api\n */\nexport function tile(tileGrid) {\n return (\n /**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {import(\"./proj.js\").Projection} projection Projection.\n * @return {Array<import(\"./extent.js\").Extent>} Extents.\n */\n function (extent, resolution, projection) {\n const z = tileGrid.getZForResolution(\n fromUserResolution(resolution, projection),\n );\n const tileRange = tileGrid.getTileRangeForExtentAndZ(\n fromUserExtent(extent, projection),\n z,\n );\n /** @type {Array<import(\"./extent.js\").Extent>} */\n const extents = [];\n /** @type {import(\"./tilecoord.js\").TileCoord} */\n const tileCoord = [z, 0, 0];\n for (\n tileCoord[1] = tileRange.minX;\n tileCoord[1] <= tileRange.maxX;\n ++tileCoord[1]\n ) {\n for (\n tileCoord[2] = tileRange.minY;\n tileCoord[2] <= tileRange.maxY;\n ++tileCoord[2]\n ) {\n extents.push(\n toUserExtent(tileGrid.getTileCoordExtent(tileCoord), projection),\n );\n }\n }\n return extents;\n }\n );\n}\n", "/**\n * @module ol/geom/flat/center\n */\nimport {createEmpty, createOrUpdateFromFlatCoordinates} from '../../extent.js';\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @return {Array<number>} Flat centers.\n */\nexport function linearRingss(flatCoordinates, offset, endss, stride) {\n const flatCenters = [];\n let extent = createEmpty();\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n extent = createOrUpdateFromFlatCoordinates(\n flatCoordinates,\n offset,\n ends[0],\n stride,\n );\n flatCenters.push((extent[0] + extent[2]) / 2, (extent[1] + extent[3]) / 2);\n offset = ends[ends.length - 1];\n }\n return flatCenters;\n}\n", "/**\n * @module ol/render/Feature\n */\nimport Feature from '../Feature.js';\nimport {extend} from '../array.js';\nimport {\n createOrUpdateFromCoordinate,\n createOrUpdateFromFlatCoordinates,\n getCenter,\n getHeight,\n} from '../extent.js';\nimport {memoizeOne} from '../functions.js';\nimport {linearRingss as linearRingssCenter} from '../geom/flat/center.js';\nimport {\n getInteriorPointOfArray,\n getInteriorPointsOfMultiArray,\n} from '../geom/flat/interiorpoint.js';\nimport {interpolatePoint} from '../geom/flat/interpolate.js';\nimport {inflateEnds} from '../geom/flat/orient.js';\nimport {\n douglasPeucker,\n douglasPeuckerArray,\n quantizeArray,\n} from '../geom/flat/simplify.js';\nimport {transform2D} from '../geom/flat/transform.js';\nimport {\n LineString,\n MultiLineString,\n MultiPoint,\n MultiPolygon,\n Point,\n Polygon,\n} from '../geom.js';\nimport {get as getProjection} from '../proj.js';\nimport {\n compose as composeTransform,\n create as createTransform,\n} from '../transform.js';\n\n/**\n * @typedef {'Point' | 'LineString' | 'LinearRing' | 'Polygon' | 'MultiPoint' | 'MultiLineString'} Type\n * The geometry type. One of `'Point'`, `'LineString'`, `'LinearRing'`,\n * `'Polygon'`, `'MultiPoint'` or 'MultiLineString'`.\n */\n\n/**\n * @type {import(\"../transform.js\").Transform}\n */\nconst tmpTransform = createTransform();\n\n/**\n * Lightweight, read-only, {@link module:ol/Feature~Feature} and {@link module:ol/geom/Geometry~Geometry} like\n * structure, optimized for vector tile rendering and styling. Geometry access\n * through the API is limited to getting the type and extent of the geometry.\n */\nclass RenderFeature {\n /**\n * @param {Type} type Geometry type.\n * @param {Array<number>} flatCoordinates Flat coordinates. These always need\n * to be right-handed for polygons.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {Object<string, *>} properties Properties.\n * @param {number|string|undefined} id Feature id.\n */\n constructor(type, flatCoordinates, ends, stride, properties, id) {\n /**\n * @type {import(\"../style/Style.js\").StyleFunction|undefined}\n */\n this.styleFunction;\n\n /**\n * @private\n * @type {import(\"../extent.js\").Extent|undefined}\n */\n this.extent_;\n\n /**\n * @private\n * @type {number|string|undefined}\n */\n this.id_ = id;\n\n /**\n * @private\n * @type {Type}\n */\n this.type_ = type;\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.flatCoordinates_ = flatCoordinates;\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.flatInteriorPoints_ = null;\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.flatMidpoints_ = null;\n\n /**\n * @private\n * @type {Array<number>|null}\n */\n this.ends_ = ends || null;\n\n /**\n * @private\n * @type {Object<string, *>}\n */\n this.properties_ = properties;\n\n /**\n * @private\n * @type {number}\n */\n this.squaredTolerance_;\n\n /**\n * @private\n * @type {number}\n */\n this.stride_ = stride;\n\n /**\n * @private\n * @type {RenderFeature}\n */\n this.simplifiedGeometry_;\n }\n\n /**\n * Get a feature property by its key.\n * @param {string} key Key\n * @return {*} Value for the requested key.\n * @api\n */\n get(key) {\n return this.properties_[key];\n }\n\n /**\n * Get the extent of this feature's geometry.\n * @return {import(\"../extent.js\").Extent} Extent.\n * @api\n */\n getExtent() {\n if (!this.extent_) {\n this.extent_ =\n this.type_ === 'Point'\n ? createOrUpdateFromCoordinate(this.flatCoordinates_)\n : createOrUpdateFromFlatCoordinates(\n this.flatCoordinates_,\n 0,\n this.flatCoordinates_.length,\n 2,\n );\n }\n return this.extent_;\n }\n\n /**\n * @return {Array<number>} Flat interior points.\n */\n getFlatInteriorPoint() {\n if (!this.flatInteriorPoints_) {\n const flatCenter = getCenter(this.getExtent());\n this.flatInteriorPoints_ = getInteriorPointOfArray(\n this.flatCoordinates_,\n 0,\n this.ends_,\n 2,\n flatCenter,\n 0,\n );\n }\n return this.flatInteriorPoints_;\n }\n\n /**\n * @return {Array<number>} Flat interior points.\n */\n getFlatInteriorPoints() {\n if (!this.flatInteriorPoints_) {\n const ends = inflateEnds(this.flatCoordinates_, this.ends_);\n const flatCenters = linearRingssCenter(this.flatCoordinates_, 0, ends, 2);\n this.flatInteriorPoints_ = getInteriorPointsOfMultiArray(\n this.flatCoordinates_,\n 0,\n ends,\n 2,\n flatCenters,\n );\n }\n return this.flatInteriorPoints_;\n }\n\n /**\n * @return {Array<number>} Flat midpoint.\n */\n getFlatMidpoint() {\n if (!this.flatMidpoints_) {\n this.flatMidpoints_ = interpolatePoint(\n this.flatCoordinates_,\n 0,\n this.flatCoordinates_.length,\n 2,\n 0.5,\n );\n }\n return this.flatMidpoints_;\n }\n\n /**\n * @return {Array<number>} Flat midpoints.\n */\n getFlatMidpoints() {\n if (!this.flatMidpoints_) {\n this.flatMidpoints_ = [];\n const flatCoordinates = this.flatCoordinates_;\n let offset = 0;\n const ends = /** @type {Array<number>} */ (this.ends_);\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n const midpoint = interpolatePoint(flatCoordinates, offset, end, 2, 0.5);\n extend(this.flatMidpoints_, midpoint);\n offset = end;\n }\n }\n return this.flatMidpoints_;\n }\n\n /**\n * Get the feature identifier. This is a stable identifier for the feature and\n * is set when reading data from a remote source.\n * @return {number|string|undefined} Id.\n * @api\n */\n getId() {\n return this.id_;\n }\n\n /**\n * @return {Array<number>} Flat coordinates.\n */\n getOrientedFlatCoordinates() {\n return this.flatCoordinates_;\n }\n\n /**\n * For API compatibility with {@link module:ol/Feature~Feature}, this method is useful when\n * determining the geometry type in style function (see {@link #getType}).\n * @return {RenderFeature} Feature.\n * @api\n */\n getGeometry() {\n return this;\n }\n\n /**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {RenderFeature} Simplified geometry.\n */\n getSimplifiedGeometry(squaredTolerance) {\n return this;\n }\n\n /**\n * Get a transformed and simplified version of the geometry.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {import(\"../proj.js\").TransformFunction} [transform] Optional transform function.\n * @return {RenderFeature} Simplified geometry.\n */\n simplifyTransformed(squaredTolerance, transform) {\n return this;\n }\n\n /**\n * Get the feature properties.\n * @return {Object<string, *>} Feature properties.\n * @api\n */\n getProperties() {\n return this.properties_;\n }\n\n /**\n * Get an object of all property names and values. This has the same behavior as getProperties,\n * but is here to conform with the {@link module:ol/Feature~Feature} interface.\n * @return {Object<string, *>?} Object.\n */\n getPropertiesInternal() {\n return this.properties_;\n }\n\n /**\n * @return {number} Stride.\n */\n getStride() {\n return this.stride_;\n }\n\n /**\n * @return {import('../style/Style.js').StyleFunction|undefined} Style\n */\n getStyleFunction() {\n return this.styleFunction;\n }\n\n /**\n * Get the type of this feature's geometry.\n * @return {Type} Geometry type.\n * @api\n */\n getType() {\n return this.type_;\n }\n\n /**\n * Transform geometry coordinates from tile pixel space to projected.\n *\n * @param {import(\"../proj.js\").ProjectionLike} projection The data projection\n */\n transform(projection) {\n projection = getProjection(projection);\n const pixelExtent = projection.getExtent();\n const projectedExtent = projection.getWorldExtent();\n if (pixelExtent && projectedExtent) {\n const scale = getHeight(projectedExtent) / getHeight(pixelExtent);\n composeTransform(\n tmpTransform,\n projectedExtent[0],\n projectedExtent[3],\n scale,\n -scale,\n 0,\n 0,\n 0,\n );\n transform2D(\n this.flatCoordinates_,\n 0,\n this.flatCoordinates_.length,\n 2,\n tmpTransform,\n this.flatCoordinates_,\n );\n }\n }\n\n /**\n * Apply a transform function to the coordinates of the geometry.\n * The geometry is modified in place.\n * If you do not want the geometry modified in place, first `clone()` it and\n * then use this function on the clone.\n * @param {import(\"../proj.js\").TransformFunction} transformFn Transform function.\n */\n applyTransform(transformFn) {\n transformFn(this.flatCoordinates_, this.flatCoordinates_, this.stride_);\n }\n\n /**\n * @return {RenderFeature} A cloned render feature.\n */\n clone() {\n return new RenderFeature(\n this.type_,\n this.flatCoordinates_.slice(),\n this.ends_?.slice(),\n this.stride_,\n Object.assign({}, this.properties_),\n this.id_,\n );\n }\n\n /**\n * @return {Array<number>|null} Ends.\n */\n getEnds() {\n return this.ends_;\n }\n\n /**\n * Add transform and resolution based geometry simplification to this instance.\n * @return {RenderFeature} This render feature.\n */\n enableSimplifyTransformed() {\n this.simplifyTransformed = memoizeOne((squaredTolerance, transform) => {\n if (squaredTolerance === this.squaredTolerance_) {\n return this.simplifiedGeometry_;\n }\n this.simplifiedGeometry_ = this.clone();\n if (transform) {\n this.simplifiedGeometry_.applyTransform(transform);\n }\n const simplifiedFlatCoordinates =\n this.simplifiedGeometry_.getFlatCoordinates();\n let simplifiedEnds;\n switch (this.type_) {\n case 'LineString':\n simplifiedFlatCoordinates.length = douglasPeucker(\n simplifiedFlatCoordinates,\n 0,\n this.simplifiedGeometry_.flatCoordinates_.length,\n this.simplifiedGeometry_.stride_,\n squaredTolerance,\n simplifiedFlatCoordinates,\n 0,\n );\n simplifiedEnds = [simplifiedFlatCoordinates.length];\n break;\n case 'MultiLineString':\n simplifiedEnds = [];\n simplifiedFlatCoordinates.length = douglasPeuckerArray(\n simplifiedFlatCoordinates,\n 0,\n this.simplifiedGeometry_.ends_,\n this.simplifiedGeometry_.stride_,\n squaredTolerance,\n simplifiedFlatCoordinates,\n 0,\n simplifiedEnds,\n );\n break;\n case 'Polygon':\n simplifiedEnds = [];\n simplifiedFlatCoordinates.length = quantizeArray(\n simplifiedFlatCoordinates,\n 0,\n this.simplifiedGeometry_.ends_,\n this.simplifiedGeometry_.stride_,\n Math.sqrt(squaredTolerance),\n simplifiedFlatCoordinates,\n 0,\n simplifiedEnds,\n );\n break;\n default:\n }\n if (simplifiedEnds) {\n this.simplifiedGeometry_ = new RenderFeature(\n this.type_,\n simplifiedFlatCoordinates,\n simplifiedEnds,\n 2,\n this.properties_,\n this.id_,\n );\n }\n this.squaredTolerance_ = squaredTolerance;\n return this.simplifiedGeometry_;\n });\n return this;\n }\n}\n\n/**\n * @return {Array<number>} Flat coordinates.\n */\nRenderFeature.prototype.getFlatCoordinates =\n RenderFeature.prototype.getOrientedFlatCoordinates;\n\n/**\n * Create a geometry from an `ol/render/Feature`\n * @param {RenderFeature} renderFeature\n * Render Feature\n * @return {Point|MultiPoint|LineString|MultiLineString|Polygon|MultiPolygon}\n * New geometry instance.\n * @api\n */\nexport function toGeometry(renderFeature) {\n const geometryType = renderFeature.getType();\n switch (geometryType) {\n case 'Point':\n return new Point(renderFeature.getFlatCoordinates());\n case 'MultiPoint':\n return new MultiPoint(renderFeature.getFlatCoordinates(), 'XY');\n case 'LineString':\n return new LineString(renderFeature.getFlatCoordinates(), 'XY');\n case 'MultiLineString':\n return new MultiLineString(\n renderFeature.getFlatCoordinates(),\n 'XY',\n /** @type {Array<number>} */ (renderFeature.getEnds()),\n );\n case 'Polygon':\n const flatCoordinates = renderFeature.getFlatCoordinates();\n const ends = renderFeature.getEnds();\n const endss = inflateEnds(flatCoordinates, ends);\n return endss.length > 1\n ? new MultiPolygon(flatCoordinates, 'XY', endss)\n : new Polygon(flatCoordinates, 'XY', ends);\n default:\n throw new Error('Invalid geometry type:' + geometryType);\n }\n}\n\n/**\n * Create an `ol/Feature` from an `ol/render/Feature`\n * @param {RenderFeature} renderFeature RenderFeature\n * @param {string} [geometryName] Geometry name to use\n * when creating the Feature.\n * @return {Feature} Newly constructed `ol/Feature` with properties,\n * geometry, and id copied over.\n * @api\n */\nexport function toFeature(renderFeature, geometryName) {\n const id = renderFeature.getId();\n const geometry = toGeometry(renderFeature);\n const properties = renderFeature.getProperties();\n const feature = new Feature();\n if (geometryName !== undefined) {\n feature.setGeometryName(geometryName);\n }\n feature.setGeometry(geometry);\n if (id !== undefined) {\n feature.setId(id);\n }\n feature.setProperties(properties, true);\n return feature;\n}\n\nexport default RenderFeature;\n", "/**\n * @module ol/structs/RBush\n */\nimport RBush_ from 'rbush';\nimport {createOrUpdate, equals} from '../extent.js';\nimport {isEmpty} from '../obj.js';\nimport {getUid} from '../util.js';\n\n/**\n * @typedef {import(\"rbush\").BBox & {value: T}} Entry\n * @template T\n */\n\n/**\n * @classdesc\n * Wrapper around the RBush by Vladimir Agafonkin.\n * See https://github.com/mourner/rbush.\n *\n * @template {Object} T\n */\nclass RBush {\n /**\n * @param {number} [maxEntries] Max entries.\n */\n constructor(maxEntries) {\n /**\n * @private\n * @type {RBush_<Entry<T>>}\n */\n this.rbush_ = new RBush_(maxEntries);\n\n /**\n * A mapping between the objects added to this rbush wrapper\n * and the objects that are actually added to the internal rbush.\n * @private\n * @type {Object<string, Entry<T>>}\n */\n this.items_ = {};\n }\n\n /**\n * Insert a value into the RBush.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {T} value Value.\n */\n insert(extent, value) {\n /** @type {Entry<T>} */\n const item = {\n minX: extent[0],\n minY: extent[1],\n maxX: extent[2],\n maxY: extent[3],\n value: value,\n };\n\n this.rbush_.insert(item);\n this.items_[getUid(value)] = item;\n }\n\n /**\n * Bulk-insert values into the RBush.\n * @param {Array<import(\"../extent.js\").Extent>} extents Extents.\n * @param {Array<T>} values Values.\n */\n load(extents, values) {\n const items = new Array(values.length);\n for (let i = 0, l = values.length; i < l; i++) {\n const extent = extents[i];\n const value = values[i];\n\n /** @type {Entry<T>} */\n const item = {\n minX: extent[0],\n minY: extent[1],\n maxX: extent[2],\n maxY: extent[3],\n value: value,\n };\n items[i] = item;\n this.items_[getUid(value)] = item;\n }\n this.rbush_.load(items);\n }\n\n /**\n * Remove a value from the RBush.\n * @param {T} value Value.\n * @return {boolean} Removed.\n */\n remove(value) {\n const uid = getUid(value);\n\n // get the object in which the value was wrapped when adding to the\n // internal rbush. then use that object to do the removal.\n const item = this.items_[uid];\n delete this.items_[uid];\n return this.rbush_.remove(item) !== null;\n }\n\n /**\n * Update the extent of a value in the RBush.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {T} value Value.\n */\n update(extent, value) {\n const item = this.items_[getUid(value)];\n const bbox = [item.minX, item.minY, item.maxX, item.maxY];\n if (!equals(bbox, extent)) {\n this.remove(value);\n this.insert(extent, value);\n }\n }\n\n /**\n * Return all values in the RBush.\n * @return {Array<T>} All.\n */\n getAll() {\n const items = this.rbush_.all();\n return items.map(function (item) {\n return item.value;\n });\n }\n\n /**\n * Return all values in the given extent.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {Array<T>} All in extent.\n */\n getInExtent(extent) {\n /** @type {import(\"rbush\").BBox} */\n const bbox = {\n minX: extent[0],\n minY: extent[1],\n maxX: extent[2],\n maxY: extent[3],\n };\n const items = this.rbush_.search(bbox);\n return items.map(function (item) {\n return item.value;\n });\n }\n\n /**\n * Calls a callback function with each value in the tree.\n * If the callback returns a truthy value, this value is returned without\n * checking the rest of the tree.\n * @param {function(T): R} callback Callback.\n * @return {R|undefined} Callback return value.\n * @template R\n */\n forEach(callback) {\n return this.forEach_(this.getAll(), callback);\n }\n\n /**\n * Calls a callback function with each value in the provided extent.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {function(T): R} callback Callback.\n * @return {R|undefined} Callback return value.\n * @template R\n */\n forEachInExtent(extent, callback) {\n return this.forEach_(this.getInExtent(extent), callback);\n }\n\n /**\n * @param {Array<T>} values Values.\n * @param {function(T): R} callback Callback.\n * @return {R|undefined} Callback return value.\n * @template R\n * @private\n */\n forEach_(values, callback) {\n let result;\n for (let i = 0, l = values.length; i < l; i++) {\n result = callback(values[i]);\n if (result) {\n return result;\n }\n }\n return result;\n }\n\n /**\n * @return {boolean} Is empty.\n */\n isEmpty() {\n return isEmpty(this.items_);\n }\n\n /**\n * Remove all values from the RBush.\n */\n clear() {\n this.rbush_.clear();\n this.items_ = {};\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} [extent] Extent.\n * @return {import(\"../extent.js\").Extent} Extent.\n */\n getExtent(extent) {\n const data = this.rbush_.toJSON();\n return createOrUpdate(data.minX, data.minY, data.maxX, data.maxY, extent);\n }\n\n /**\n * @param {RBush<T>} rbush R-Tree.\n */\n concat(rbush) {\n this.rbush_.load(rbush.rbush_.all());\n for (const i in rbush.items_) {\n this.items_[i] = rbush.items_[i];\n }\n }\n}\n\nexport default RBush;\n", "/**\n * @module ol/source/VectorEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n /**\n * Triggered when a feature is added to the source.\n * @event module:ol/source/Vector.VectorSourceEvent#addfeature\n * @api\n */\n ADDFEATURE: 'addfeature',\n\n /**\n * Triggered when a feature is updated.\n * @event module:ol/source/Vector.VectorSourceEvent#changefeature\n * @api\n */\n CHANGEFEATURE: 'changefeature',\n\n /**\n * Triggered when the clear method is called on the source.\n * @event module:ol/source/Vector.VectorSourceEvent#clear\n * @api\n */\n CLEAR: 'clear',\n\n /**\n * Triggered when a feature is removed from the source.\n * See {@link module:ol/source/Vector~VectorSource#clear source.clear()} for exceptions.\n * @event module:ol/source/Vector.VectorSourceEvent#removefeature\n * @api\n */\n REMOVEFEATURE: 'removefeature',\n\n /**\n * Triggered when features starts loading.\n * @event module:ol/source/Vector.VectorSourceEvent#featuresloadstart\n * @api\n */\n FEATURESLOADSTART: 'featuresloadstart',\n\n /**\n * Triggered when features finishes loading.\n * @event module:ol/source/Vector.VectorSourceEvent#featuresloadend\n * @api\n */\n FEATURESLOADEND: 'featuresloadend',\n\n /**\n * Triggered if feature loading results in an error.\n * @event module:ol/source/Vector.VectorSourceEvent#featuresloaderror\n * @api\n */\n FEATURESLOADERROR: 'featuresloaderror',\n};\n\n/**\n * @typedef {'addfeature'|'changefeature'|'clear'|'removefeature'|'featuresloadstart'|'featuresloadend'|'featuresloaderror'} VectorSourceEventTypes\n */\n", "/**\n * @module ol/source/Vector\n */\n\nimport Collection from '../Collection.js';\nimport CollectionEventType from '../CollectionEventType.js';\nimport ObjectEventType from '../ObjectEventType.js';\nimport {extend} from '../array.js';\nimport {assert} from '../asserts.js';\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport {containsExtent, equals, wrapAndSliceX} from '../extent.js';\nimport {xhr} from '../featureloader.js';\nimport {TRUE, VOID} from '../functions.js';\nimport {all as allStrategy} from '../loadingstrategy.js';\nimport {isEmpty} from '../obj.js';\nimport RenderFeature from '../render/Feature.js';\nimport RBush from '../structs/RBush.js';\nimport {getUid} from '../util.js';\nimport Source from './Source.js';\nimport VectorEventType from './VectorEventType.js';\n\n/**\n * A function that takes an {@link module:ol/extent~Extent} and a resolution as arguments, and\n * returns an array of {@link module:ol/extent~Extent} with the extents to load. Usually this\n * is one of the standard {@link module:ol/loadingstrategy} strategies.\n *\n * @typedef {function(import(\"../extent.js\").Extent, number, import(\"../proj/Projection.js\").default): Array<import(\"../extent.js\").Extent>} LoadingStrategy\n * @api\n */\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/source/Vector~VectorSource} instances are instances of this\n * type.\n * @template {import(\"../Feature.js\").FeatureLike} [FeatureType=import(\"../Feature.js\").default]\n */\nexport class VectorSourceEvent extends Event {\n /**\n * @param {string} type Type.\n * @param {FeatureType} [feature] Feature.\n * @param {Array<FeatureType>} [features] Features.\n */\n constructor(type, feature, features) {\n super(type);\n\n /**\n * The added or removed feature for the `ADDFEATURE` and `REMOVEFEATURE` events, `undefined` otherwise.\n * @type {FeatureType|undefined}\n * @api\n */\n this.feature = feature;\n\n /**\n * The loaded features for the `FEATURESLOADED` event, `undefined` otherwise.\n * @type {Array<FeatureType>|undefined}\n * @api\n */\n this.features = features;\n }\n}\n\n/***\n * @template {import(\"../Feature.js\").FeatureLike} [T=import(\"../Feature.js\").default]\n * @typedef {T extends RenderFeature ? T|Array<T> : T} FeatureClassOrArrayOfRenderFeatures\n */\n\n/***\n * @template Return\n * @template {import(\"../Feature.js\").FeatureLike} [FeatureType=import(\"../Feature.js\").default]\n * @typedef {import(\"../Observable\").OnSignature<import(\"../Observable\").EventTypes, import(\"../events/Event.js\").default, Return> &\n * import(\"../Observable\").OnSignature<import(\"../ObjectEventType\").Types, import(\"../Object\").ObjectEvent, Return> &\n * import(\"../Observable\").OnSignature<import(\"./VectorEventType\").VectorSourceEventTypes, VectorSourceEvent<FeatureType>, Return> &\n * import(\"../Observable\").CombinedOnSignature<import(\"../Observable\").EventTypes|import(\"../ObjectEventType\").Types|\n * import(\"./VectorEventType\").VectorSourceEventTypes, Return>} VectorSourceOnSignature\n */\n\n/**\n * @template {import(\"../Feature.js\").FeatureLike} [FeatureType=import(\"../Feature.js\").default]\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {Array<FeatureType>|Collection<FeatureType>} [features]\n * Features. If provided as {@link module:ol/Collection~Collection}, the features in the source\n * and the collection will stay in sync.\n * @property {import(\"../format/Feature.js\").default<FeatureType>} [format] The feature format used by the XHR\n * feature loader when `url` is set. Required if `url` is set, otherwise ignored.\n * @property {import(\"../featureloader.js\").FeatureLoader<FeatureType>} [loader]\n * The loader function used to load features, from a remote source for example.\n * If this is not set and `url` is set, the source will create and use an XHR\n * feature loader. The `'featuresloadend'` and `'featuresloaderror'` events\n * will only fire if the `success` and `failure` callbacks are used.\n *\n * Example:\n *\n * ```js\n * import Vector from 'ol/source/Vector.js';\n * import GeoJSON from 'ol/format/GeoJSON.js';\n * import {bbox} from 'ol/loadingstrategy.js';\n *\n * const vectorSource = new Vector({\n * format: new GeoJSON(),\n * loader: function(extent, resolution, projection, success, failure) {\n * const proj = projection.getCode();\n * const url = 'https://ahocevar.com/geoserver/wfs?service=WFS&' +\n * 'version=1.1.0&request=GetFeature&typename=osm:water_areas&' +\n * 'outputFormat=application/json&srsname=' + proj + '&' +\n * 'bbox=' + extent.join(',') + ',' + proj;\n * const xhr = new XMLHttpRequest();\n * xhr.open('GET', url);\n * const onError = function() {\n * vectorSource.removeLoadedExtent(extent);\n * failure();\n * }\n * xhr.onerror = onError;\n * xhr.onload = function() {\n * if (xhr.status == 200) {\n * const features = vectorSource.getFormat().readFeatures(xhr.responseText);\n * vectorSource.addFeatures(features);\n * success(features);\n * } else {\n * onError();\n * }\n * }\n * xhr.send();\n * },\n * strategy: bbox,\n * });\n * ```\n * @property {boolean} [overlaps=true] This source may have overlapping geometries.\n * Setting this to `false` (e.g. for sources with polygons that represent administrative\n * boundaries or TopoJSON sources) allows the renderer to optimise fill and\n * stroke operations.\n * @property {LoadingStrategy} [strategy] The loading strategy to use.\n * By default an {@link module:ol/loadingstrategy.all}\n * strategy is used, a one-off strategy which loads all features at once.\n * @property {string|import(\"../featureloader.js\").FeatureUrlFunction} [url]\n * Setting this option instructs the source to load features using an XHR loader\n * (see {@link module:ol/featureloader.xhr}). Use a `string` and an\n * {@link module:ol/loadingstrategy.all} for a one-off download of all features from\n * the given URL. Use a {@link module:ol/featureloader~FeatureUrlFunction} to generate the url with\n * other loading strategies.\n * Requires `format` to be set as well.\n * When default XHR feature loader is provided, the features will\n * be transformed from the data projection to the view projection\n * during parsing. If your remote data source does not advertise its projection\n * properly, this transformation will be incorrect. For some formats, the\n * default projection (usually EPSG:4326) can be overridden by setting the\n * dataProjection constructor option on the format.\n * Note that if a source contains non-feature data, such as a GeoJSON geometry\n * or a KML NetworkLink, these will be ignored. Use a custom loader to load these.\n * @property {boolean} [useSpatialIndex=true]\n * By default, an RTree is used as spatial index. When features are removed and\n * added frequently, and the total number of features is low, setting this to\n * `false` may improve performance.\n *\n * Note that\n * {@link module:ol/source/Vector~VectorSource#getFeaturesInExtent},\n * {@link module:ol/source/Vector~VectorSource#getClosestFeatureToCoordinate} and\n * {@link module:ol/source/Vector~VectorSource#getExtent} cannot be used when `useSpatialIndex` is\n * set to `false`, and {@link module:ol/source/Vector~VectorSource#forEachFeatureInExtent} will loop\n * through all features.\n *\n * When set to `false`, the features will be maintained in an\n * {@link module:ol/Collection~Collection}, which can be retrieved through\n * {@link module:ol/source/Vector~VectorSource#getFeaturesCollection}.\n * @property {boolean} [wrapX=true] Wrap the world horizontally. For vector editing across the\n * -180\u00B0 and 180\u00B0 meridians to work properly, this should be set to `false`. The\n * resulting geometry coordinates will then exceed the world bounds.\n */\n\n/**\n * @classdesc\n * Provides a source of features for vector layers. Vector features provided\n * by this source are suitable for editing. See {@link module:ol/source/VectorTile~VectorTile} for\n * vector data that is optimized for rendering.\n *\n * @fires VectorSourceEvent\n * @api\n * @template {import(\"../Feature.js\").FeatureLike} [FeatureType=import(\"../Feature.js\").default]\n */\nclass VectorSource extends Source {\n /**\n * @param {Options<FeatureType>} [options] Vector source options.\n */\n constructor(options) {\n options = options || {};\n\n super({\n attributions: options.attributions,\n interpolate: true,\n projection: undefined,\n state: 'ready',\n wrapX: options.wrapX !== undefined ? options.wrapX : true,\n });\n\n /***\n * @type {VectorSourceOnSignature<import(\"../events\").EventsKey, FeatureType>}\n */\n this.on;\n\n /***\n * @type {VectorSourceOnSignature<import(\"../events\").EventsKey, FeatureType>}\n */\n this.once;\n\n /***\n * @type {VectorSourceOnSignature<void>}\n */\n this.un;\n\n /**\n * @private\n * @type {import(\"../featureloader.js\").FeatureLoader<import(\"../Feature.js\").FeatureLike>}\n */\n this.loader_ = VOID;\n\n /**\n * @private\n * @type {import(\"../format/Feature.js\").default<FeatureType>|null}\n */\n this.format_ = options.format || null;\n\n /**\n * @private\n * @type {boolean}\n */\n this.overlaps_ = options.overlaps === undefined ? true : options.overlaps;\n\n /**\n * @private\n * @type {string|import(\"../featureloader.js\").FeatureUrlFunction|undefined}\n */\n this.url_ = options.url;\n\n if (options.loader !== undefined) {\n this.loader_ = options.loader;\n } else if (this.url_ !== undefined) {\n assert(this.format_, '`format` must be set when `url` is set');\n // create a XHR feature loader for \"url\" and \"format\"\n this.loader_ = xhr(this.url_, this.format_);\n }\n\n /**\n * @private\n * @type {LoadingStrategy}\n */\n this.strategy_ =\n options.strategy !== undefined ? options.strategy : allStrategy;\n\n const useSpatialIndex =\n options.useSpatialIndex !== undefined ? options.useSpatialIndex : true;\n\n /**\n * @private\n * @type {RBush<FeatureType>}\n */\n this.featuresRtree_ = useSpatialIndex ? new RBush() : null;\n\n /**\n * @private\n * @type {RBush<{extent: import(\"../extent.js\").Extent}>}\n */\n this.loadedExtentsRtree_ = new RBush();\n\n /**\n * @type {number}\n * @private\n */\n this.loadingExtentsCount_ = 0;\n\n /**\n * @private\n * @type {!Object<string, FeatureType>}\n */\n this.nullGeometryFeatures_ = {};\n\n /**\n * A lookup of features by id (the return from feature.getId()).\n * @private\n * @type {!Object<string, import('../Feature.js').FeatureLike|Array<import('../Feature.js').FeatureLike>>}\n */\n this.idIndex_ = {};\n\n /**\n * A lookup of features by uid (using getUid(feature)).\n * @private\n * @type {!Object<string, FeatureType>}\n */\n this.uidIndex_ = {};\n\n /**\n * @private\n * @type {Object<string, Array<import(\"../events.js\").EventsKey>>}\n */\n this.featureChangeKeys_ = {};\n\n /**\n * @private\n * @type {Collection<FeatureType>|null}\n */\n this.featuresCollection_ = null;\n\n /** @type {Collection<FeatureType>} */\n let collection;\n /** @type {Array<FeatureType>} */\n let features;\n if (Array.isArray(options.features)) {\n features = options.features;\n } else if (options.features) {\n collection = options.features;\n features = collection.getArray();\n }\n if (!useSpatialIndex && collection === undefined) {\n collection = new Collection(features);\n }\n if (features !== undefined) {\n this.addFeaturesInternal(features);\n }\n if (collection !== undefined) {\n this.bindFeaturesCollection_(collection);\n }\n }\n\n /**\n * Add a single feature to the source. If you want to add a batch of features\n * at once, call {@link module:ol/source/Vector~VectorSource#addFeatures #addFeatures()}\n * instead. A feature will not be added to the source if feature with\n * the same id is already there. The reason for this behavior is to avoid\n * feature duplication when using bbox or tile loading strategies.\n * Note: this also applies if a {@link module:ol/Collection~Collection} is used for features,\n * meaning that if a feature with a duplicate id is added in the collection, it will\n * be removed from it right away.\n * @param {FeatureType} feature Feature to add.\n * @api\n */\n addFeature(feature) {\n this.addFeatureInternal(feature);\n this.changed();\n }\n\n /**\n * Add a feature without firing a `change` event.\n * @param {FeatureType} feature Feature.\n * @protected\n */\n addFeatureInternal(feature) {\n const featureKey = getUid(feature);\n\n if (!this.addToIndex_(featureKey, feature)) {\n if (this.featuresCollection_) {\n this.featuresCollection_.remove(feature);\n }\n return;\n }\n\n this.setupChangeEvents_(featureKey, feature);\n\n const geometry = feature.getGeometry();\n if (geometry) {\n const extent = geometry.getExtent();\n if (this.featuresRtree_) {\n this.featuresRtree_.insert(extent, feature);\n }\n } else {\n this.nullGeometryFeatures_[featureKey] = feature;\n }\n\n this.dispatchEvent(\n new VectorSourceEvent(VectorEventType.ADDFEATURE, feature),\n );\n }\n\n /**\n * @param {string} featureKey Unique identifier for the feature.\n * @param {FeatureType} feature The feature.\n * @private\n */\n setupChangeEvents_(featureKey, feature) {\n if (feature instanceof RenderFeature) {\n return;\n }\n this.featureChangeKeys_[featureKey] = [\n listen(feature, EventType.CHANGE, this.handleFeatureChange_, this),\n listen(\n feature,\n ObjectEventType.PROPERTYCHANGE,\n this.handleFeatureChange_,\n this,\n ),\n ];\n }\n\n /**\n * @param {string} featureKey Unique identifier for the feature.\n * @param {FeatureType} feature The feature.\n * @return {boolean} The feature is \"valid\", in the sense that it is also a\n * candidate for insertion into the Rtree.\n * @private\n */\n addToIndex_(featureKey, feature) {\n let valid = true;\n if (feature.getId() !== undefined) {\n const id = String(feature.getId());\n if (!(id in this.idIndex_)) {\n this.idIndex_[id] = feature;\n } else if (feature instanceof RenderFeature) {\n const indexedFeature = this.idIndex_[id];\n if (!(indexedFeature instanceof RenderFeature)) {\n valid = false;\n } else if (!Array.isArray(indexedFeature)) {\n this.idIndex_[id] = [indexedFeature, feature];\n } else {\n indexedFeature.push(feature);\n }\n } else {\n valid = false;\n }\n }\n if (valid) {\n assert(\n !(featureKey in this.uidIndex_),\n 'The passed `feature` was already added to the source',\n );\n this.uidIndex_[featureKey] = feature;\n }\n return valid;\n }\n\n /**\n * Add a batch of features to the source.\n * @param {Array<FeatureType>} features Features to add.\n * @api\n */\n addFeatures(features) {\n this.addFeaturesInternal(features);\n this.changed();\n }\n\n /**\n * Add features without firing a `change` event.\n * @param {Array<FeatureType>} features Features.\n * @protected\n */\n addFeaturesInternal(features) {\n const extents = [];\n /** @type {Array<FeatureType>} */\n const newFeatures = [];\n /** @type {Array<FeatureType>} */\n const geometryFeatures = [];\n\n for (let i = 0, length = features.length; i < length; i++) {\n const feature = features[i];\n const featureKey = getUid(feature);\n if (this.addToIndex_(featureKey, feature)) {\n newFeatures.push(feature);\n }\n }\n\n for (let i = 0, length = newFeatures.length; i < length; i++) {\n const feature = newFeatures[i];\n const featureKey = getUid(feature);\n this.setupChangeEvents_(featureKey, feature);\n\n const geometry = feature.getGeometry();\n if (geometry) {\n const extent = geometry.getExtent();\n extents.push(extent);\n geometryFeatures.push(feature);\n } else {\n this.nullGeometryFeatures_[featureKey] = feature;\n }\n }\n if (this.featuresRtree_) {\n this.featuresRtree_.load(extents, geometryFeatures);\n }\n\n if (this.hasListener(VectorEventType.ADDFEATURE)) {\n for (let i = 0, length = newFeatures.length; i < length; i++) {\n this.dispatchEvent(\n new VectorSourceEvent(VectorEventType.ADDFEATURE, newFeatures[i]),\n );\n }\n }\n }\n\n /**\n * @param {!Collection<FeatureType>} collection Collection.\n * @private\n */\n bindFeaturesCollection_(collection) {\n let modifyingCollection = false;\n this.addEventListener(\n VectorEventType.ADDFEATURE,\n /**\n * @param {VectorSourceEvent<FeatureType>} evt The vector source event\n */\n function (evt) {\n if (!modifyingCollection) {\n modifyingCollection = true;\n collection.push(evt.feature);\n modifyingCollection = false;\n }\n },\n );\n this.addEventListener(\n VectorEventType.REMOVEFEATURE,\n /**\n * @param {VectorSourceEvent<FeatureType>} evt The vector source event\n */\n function (evt) {\n if (!modifyingCollection) {\n modifyingCollection = true;\n collection.remove(evt.feature);\n modifyingCollection = false;\n }\n },\n );\n collection.addEventListener(\n CollectionEventType.ADD,\n /**\n * @param {import(\"../Collection.js\").CollectionEvent<FeatureType>} evt The collection event\n */\n (evt) => {\n if (!modifyingCollection) {\n modifyingCollection = true;\n this.addFeature(evt.element);\n modifyingCollection = false;\n }\n },\n );\n collection.addEventListener(\n CollectionEventType.REMOVE,\n /**\n * @param {import(\"../Collection.js\").CollectionEvent<FeatureType>} evt The collection event\n */\n (evt) => {\n if (!modifyingCollection) {\n modifyingCollection = true;\n this.removeFeature(evt.element);\n modifyingCollection = false;\n }\n },\n );\n this.featuresCollection_ = collection;\n }\n\n /**\n * Remove all features from the source.\n * @param {boolean} [fast] Skip dispatching of {@link module:ol/source/Vector.VectorSourceEvent#event:removefeature} events.\n * @api\n */\n clear(fast) {\n if (fast) {\n for (const featureId in this.featureChangeKeys_) {\n const keys = this.featureChangeKeys_[featureId];\n keys.forEach(unlistenByKey);\n }\n if (!this.featuresCollection_) {\n this.featureChangeKeys_ = {};\n this.idIndex_ = {};\n this.uidIndex_ = {};\n }\n } else {\n if (this.featuresRtree_) {\n this.featuresRtree_.forEach((feature) => {\n this.removeFeatureInternal(feature);\n });\n for (const id in this.nullGeometryFeatures_) {\n this.removeFeatureInternal(this.nullGeometryFeatures_[id]);\n }\n }\n }\n if (this.featuresCollection_) {\n this.featuresCollection_.clear();\n }\n\n if (this.featuresRtree_) {\n this.featuresRtree_.clear();\n }\n this.nullGeometryFeatures_ = {};\n\n const clearEvent = new VectorSourceEvent(VectorEventType.CLEAR);\n this.dispatchEvent(clearEvent);\n this.changed();\n }\n\n /**\n * Iterate through all features on the source, calling the provided callback\n * with each one. If the callback returns any \"truthy\" value, iteration will\n * stop and the function will return the same value.\n * Note: this function only iterate through the feature that have a defined geometry.\n *\n * @param {function(FeatureType): T} callback Called with each feature\n * on the source. Return a truthy value to stop iteration.\n * @return {T|undefined} The return value from the last call to the callback.\n * @template T\n * @api\n */\n forEachFeature(callback) {\n if (this.featuresRtree_) {\n return this.featuresRtree_.forEach(callback);\n }\n if (this.featuresCollection_) {\n this.featuresCollection_.forEach(callback);\n }\n }\n\n /**\n * Iterate through all features whose geometries contain the provided\n * coordinate, calling the callback with each feature. If the callback returns\n * a \"truthy\" value, iteration will stop and the function will return the same\n * value.\n *\n * For {@link module:ol/render/Feature~RenderFeature} features, the callback will be\n * called for all features.\n *\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {function(FeatureType): T} callback Called with each feature\n * whose goemetry contains the provided coordinate.\n * @return {T|undefined} The return value from the last call to the callback.\n * @template T\n */\n forEachFeatureAtCoordinateDirect(coordinate, callback) {\n const extent = [coordinate[0], coordinate[1], coordinate[0], coordinate[1]];\n return this.forEachFeatureInExtent(extent, function (feature) {\n const geometry = feature.getGeometry();\n if (\n geometry instanceof RenderFeature ||\n geometry.intersectsCoordinate(coordinate)\n ) {\n return callback(feature);\n }\n return undefined;\n });\n }\n\n /**\n * Iterate through all features whose bounding box intersects the provided\n * extent (note that the feature's geometry may not intersect the extent),\n * calling the callback with each feature. If the callback returns a \"truthy\"\n * value, iteration will stop and the function will return the same value.\n *\n * If you are interested in features whose geometry intersects an extent, call\n * the {@link module:ol/source/Vector~VectorSource#forEachFeatureIntersectingExtent #forEachFeatureIntersectingExtent()} method instead.\n *\n * When `useSpatialIndex` is set to false, this method will loop through all\n * features, equivalent to {@link module:ol/source/Vector~VectorSource#forEachFeature #forEachFeature()}.\n *\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {function(FeatureType): T} callback Called with each feature\n * whose bounding box intersects the provided extent.\n * @return {T|undefined} The return value from the last call to the callback.\n * @template T\n * @api\n */\n forEachFeatureInExtent(extent, callback) {\n if (this.featuresRtree_) {\n return this.featuresRtree_.forEachInExtent(extent, callback);\n }\n if (this.featuresCollection_) {\n this.featuresCollection_.forEach(callback);\n }\n }\n\n /**\n * Iterate through all features whose geometry intersects the provided extent,\n * calling the callback with each feature. If the callback returns a \"truthy\"\n * value, iteration will stop and the function will return the same value.\n *\n * If you only want to test for bounding box intersection, call the\n * {@link module:ol/source/Vector~VectorSource#forEachFeatureInExtent #forEachFeatureInExtent()} method instead.\n *\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {function(FeatureType): T} callback Called with each feature\n * whose geometry intersects the provided extent.\n * @return {T|undefined} The return value from the last call to the callback.\n * @template T\n * @api\n */\n forEachFeatureIntersectingExtent(extent, callback) {\n return this.forEachFeatureInExtent(\n extent,\n /**\n * @param {FeatureType} feature Feature.\n * @return {T|undefined} The return value from the last call to the callback.\n */\n function (feature) {\n const geometry = feature.getGeometry();\n if (\n geometry instanceof RenderFeature ||\n geometry.intersectsExtent(extent)\n ) {\n const result = callback(feature);\n if (result) {\n return result;\n }\n }\n },\n );\n }\n\n /**\n * Get the features collection associated with this source. Will be `null`\n * unless the source was configured with `useSpatialIndex` set to `false`, or\n * with a {@link module:ol/Collection~Collection} as `features`.\n * @return {Collection<FeatureType>|null} The collection of features.\n * @api\n */\n getFeaturesCollection() {\n return this.featuresCollection_;\n }\n\n /**\n * Get a snapshot of the features currently on the source in random order. The returned array\n * is a copy, the features are references to the features in the source.\n * @return {Array<FeatureType>} Features.\n * @api\n */\n getFeatures() {\n let features;\n if (this.featuresCollection_) {\n features = this.featuresCollection_.getArray().slice(0);\n } else if (this.featuresRtree_) {\n features = this.featuresRtree_.getAll();\n if (!isEmpty(this.nullGeometryFeatures_)) {\n extend(features, Object.values(this.nullGeometryFeatures_));\n }\n }\n return features;\n }\n\n /**\n * Get all features whose geometry intersects the provided coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @return {Array<FeatureType>} Features.\n * @api\n */\n getFeaturesAtCoordinate(coordinate) {\n /** @type {Array<FeatureType>} */\n const features = [];\n this.forEachFeatureAtCoordinateDirect(coordinate, function (feature) {\n features.push(feature);\n });\n return features;\n }\n\n /**\n * Get all features whose bounding box intersects the provided extent. Note that this returns an array of\n * all features intersecting the given extent in random order (so it may include\n * features whose geometries do not intersect the extent).\n *\n * When `useSpatialIndex` is set to false, this method will return all\n * features.\n *\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {import(\"../proj/Projection.js\").default} [projection] Include features\n * where `extent` exceeds the x-axis bounds of `projection` and wraps around the world.\n * @return {Array<FeatureType>} Features.\n * @api\n */\n getFeaturesInExtent(extent, projection) {\n if (this.featuresRtree_) {\n const multiWorld = projection && projection.canWrapX() && this.getWrapX();\n\n if (!multiWorld) {\n return this.featuresRtree_.getInExtent(extent);\n }\n\n const extents = wrapAndSliceX(extent, projection);\n\n return [].concat(\n ...extents.map((anExtent) => this.featuresRtree_.getInExtent(anExtent)),\n );\n }\n if (this.featuresCollection_) {\n return this.featuresCollection_.getArray().slice(0);\n }\n return [];\n }\n\n /**\n * Get the closest feature to the provided coordinate.\n *\n * This method is not available when the source is configured with\n * `useSpatialIndex` set to `false` and the features in this source are of type\n * {@link module:ol/Feature~Feature}.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {function(FeatureType):boolean} [filter] Feature filter function.\n * The filter function will receive one argument, the {@link module:ol/Feature~Feature feature}\n * and it should return a boolean value. By default, no filtering is made.\n * @return {FeatureType|null} Closest feature (or `null` if none found).\n * @api\n */\n getClosestFeatureToCoordinate(coordinate, filter) {\n // Find the closest feature using branch and bound. We start searching an\n // infinite extent, and find the distance from the first feature found. This\n // becomes the closest feature. We then compute a smaller extent which any\n // closer feature must intersect. We continue searching with this smaller\n // extent, trying to find a closer feature. Every time we find a closer\n // feature, we update the extent being searched so that any even closer\n // feature must intersect it. We continue until we run out of features.\n const x = coordinate[0];\n const y = coordinate[1];\n let closestFeature = null;\n const closestPoint = [NaN, NaN];\n let minSquaredDistance = Infinity;\n const extent = [-Infinity, -Infinity, Infinity, Infinity];\n filter = filter ? filter : TRUE;\n this.featuresRtree_.forEachInExtent(\n extent,\n /**\n * @param {FeatureType} feature Feature.\n */\n function (feature) {\n if (filter(feature)) {\n const geometry = feature.getGeometry();\n const previousMinSquaredDistance = minSquaredDistance;\n minSquaredDistance =\n geometry instanceof RenderFeature\n ? 0\n : geometry.closestPointXY(x, y, closestPoint, minSquaredDistance);\n if (minSquaredDistance < previousMinSquaredDistance) {\n closestFeature = feature;\n // This is sneaky. Reduce the extent that it is currently being\n // searched while the R-Tree traversal using this same extent object\n // is still in progress. This is safe because the new extent is\n // strictly contained by the old extent.\n const minDistance = Math.sqrt(minSquaredDistance);\n extent[0] = x - minDistance;\n extent[1] = y - minDistance;\n extent[2] = x + minDistance;\n extent[3] = y + minDistance;\n }\n }\n },\n );\n return closestFeature;\n }\n\n /**\n * Get the extent of the features currently in the source.\n *\n * This will return `null` when the source is configured with\n * `useSpatialIndex` set to `false`.\n * @param {import(\"../extent.js\").Extent} [extent] Destination extent. If provided, no new extent\n * will be created. Instead, that extent's coordinates will be overwritten.\n * @return {import(\"../extent.js\").Extent | null} Extent.\n * @api\n */\n getExtent(extent) {\n return this.featuresRtree_?.getExtent(extent) ?? null;\n }\n\n /**\n * Get a feature by its identifier (the value returned by feature.getId()). When `RenderFeature`s\n * are used, `getFeatureById()` can return an array of `RenderFeature`s. This allows for handling\n * of `GeometryCollection` geometries, where format readers create one `RenderFeature` per\n * `GeometryCollection` member.\n * Note that the index treats string and numeric identifiers as the same. So\n * `source.getFeatureById(2)` will return a feature with id `'2'` or `2`.\n *\n * @param {string|number} id Feature identifier.\n * @return {FeatureClassOrArrayOfRenderFeatures<FeatureType>|null} The feature (or `null` if not found).\n * @api\n */\n getFeatureById(id) {\n const feature = this.idIndex_[id.toString()];\n return feature !== undefined\n ? /** @type {FeatureClassOrArrayOfRenderFeatures<FeatureType>} */ (\n feature\n )\n : null;\n }\n\n /**\n * Get a feature by its internal unique identifier (using `getUid`).\n *\n * @param {string} uid Feature identifier.\n * @return {FeatureType|null} The feature (or `null` if not found).\n */\n getFeatureByUid(uid) {\n const feature = this.uidIndex_[uid];\n return feature !== undefined ? feature : null;\n }\n\n /**\n * Get the format associated with this source.\n *\n * @return {import(\"../format/Feature.js\").default<FeatureType>|null}} The feature format.\n * @api\n */\n getFormat() {\n return this.format_;\n }\n\n /**\n * @return {boolean} The source can have overlapping geometries.\n */\n getOverlaps() {\n return this.overlaps_;\n }\n\n /**\n * Get the url associated with this source.\n *\n * @return {string|import(\"../featureloader.js\").FeatureUrlFunction|undefined} The url.\n * @api\n */\n getUrl() {\n return this.url_;\n }\n\n /**\n * @param {Event} event Event.\n * @private\n */\n handleFeatureChange_(event) {\n const feature = /** @type {FeatureType} */ (event.target);\n const featureKey = getUid(feature);\n const geometry = feature.getGeometry();\n if (!geometry) {\n if (!(featureKey in this.nullGeometryFeatures_)) {\n if (this.featuresRtree_) {\n this.featuresRtree_.remove(feature);\n }\n this.nullGeometryFeatures_[featureKey] = feature;\n }\n } else {\n const extent = geometry.getExtent();\n if (featureKey in this.nullGeometryFeatures_) {\n delete this.nullGeometryFeatures_[featureKey];\n if (this.featuresRtree_) {\n this.featuresRtree_.insert(extent, feature);\n }\n } else {\n if (this.featuresRtree_) {\n this.featuresRtree_.update(extent, feature);\n }\n }\n }\n const id = feature.getId();\n if (id !== undefined) {\n const sid = id.toString();\n if (this.idIndex_[sid] !== feature) {\n this.removeFromIdIndex_(feature);\n this.idIndex_[sid] = feature;\n }\n } else {\n this.removeFromIdIndex_(feature);\n this.uidIndex_[featureKey] = feature;\n }\n this.changed();\n this.dispatchEvent(\n new VectorSourceEvent(VectorEventType.CHANGEFEATURE, feature),\n );\n }\n\n /**\n * Returns true if the feature is contained within the source.\n * @param {FeatureType} feature Feature.\n * @return {boolean} Has feature.\n * @api\n */\n hasFeature(feature) {\n const id = feature.getId();\n if (id !== undefined) {\n return id in this.idIndex_;\n }\n return getUid(feature) in this.uidIndex_;\n }\n\n /**\n * @return {boolean} Is empty.\n */\n isEmpty() {\n if (this.featuresRtree_) {\n return (\n this.featuresRtree_.isEmpty() && isEmpty(this.nullGeometryFeatures_)\n );\n }\n if (this.featuresCollection_) {\n return this.featuresCollection_.getLength() === 0;\n }\n return true;\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n */\n loadFeatures(extent, resolution, projection) {\n const loadedExtentsRtree = this.loadedExtentsRtree_;\n const extentsToLoad = this.strategy_(extent, resolution, projection);\n for (let i = 0, ii = extentsToLoad.length; i < ii; ++i) {\n const extentToLoad = extentsToLoad[i];\n const alreadyLoaded = loadedExtentsRtree.forEachInExtent(\n extentToLoad,\n /**\n * @param {{extent: import(\"../extent.js\").Extent}} object Object.\n * @return {boolean} Contains.\n */\n function (object) {\n return containsExtent(object.extent, extentToLoad);\n },\n );\n if (!alreadyLoaded) {\n ++this.loadingExtentsCount_;\n this.dispatchEvent(\n new VectorSourceEvent(VectorEventType.FEATURESLOADSTART),\n );\n this.loader_.call(\n this,\n extentToLoad,\n resolution,\n projection,\n /**\n * @param {Array<FeatureType>} features Loaded features\n */\n (features) => {\n --this.loadingExtentsCount_;\n this.dispatchEvent(\n new VectorSourceEvent(\n VectorEventType.FEATURESLOADEND,\n undefined,\n features,\n ),\n );\n },\n () => {\n --this.loadingExtentsCount_;\n this.dispatchEvent(\n new VectorSourceEvent(VectorEventType.FEATURESLOADERROR),\n );\n },\n );\n loadedExtentsRtree.insert(extentToLoad, {extent: extentToLoad.slice()});\n }\n }\n this.loading =\n this.loader_.length < 4 ? false : this.loadingExtentsCount_ > 0;\n }\n\n /**\n * @override\n */\n refresh() {\n this.clear(true);\n this.loadedExtentsRtree_.clear();\n super.refresh();\n }\n\n /**\n * Remove an extent from the list of loaded extents.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @api\n */\n removeLoadedExtent(extent) {\n const loadedExtentsRtree = this.loadedExtentsRtree_;\n const obj = loadedExtentsRtree.forEachInExtent(extent, function (object) {\n if (equals(object.extent, extent)) {\n return object;\n }\n });\n if (obj) {\n loadedExtentsRtree.remove(obj);\n }\n }\n\n /**\n * Batch remove features from the source. If you want to remove all features\n * at once, use the {@link module:ol/source/Vector~VectorSource#clear #clear()} method\n * instead.\n * @param {Array<FeatureType>} features Features to remove.\n * @api\n */\n removeFeatures(features) {\n let removed = false;\n for (let i = 0, ii = features.length; i < ii; ++i) {\n removed = this.removeFeatureInternal(features[i]) || removed;\n }\n if (removed) {\n this.changed();\n }\n }\n\n /**\n * Remove a single feature from the source. If you want to batch remove\n * features, use the {@link module:ol/source/Vector~VectorSource#removeFeatures #removeFeatures()} method\n * instead.\n * @param {FeatureType} feature Feature to remove.\n * @api\n */\n removeFeature(feature) {\n if (!feature) {\n return;\n }\n const removed = this.removeFeatureInternal(feature);\n if (removed) {\n this.changed();\n }\n }\n\n /**\n * Remove feature without firing a `change` event.\n * @param {FeatureType} feature Feature.\n * @return {boolean} True if the feature was removed, false if it was not found.\n * @protected\n */\n removeFeatureInternal(feature) {\n const featureKey = getUid(feature);\n if (!(featureKey in this.uidIndex_)) {\n return false;\n }\n\n if (featureKey in this.nullGeometryFeatures_) {\n delete this.nullGeometryFeatures_[featureKey];\n } else {\n if (this.featuresRtree_) {\n this.featuresRtree_.remove(feature);\n }\n }\n\n const featureChangeKeys = this.featureChangeKeys_[featureKey];\n featureChangeKeys?.forEach(unlistenByKey);\n delete this.featureChangeKeys_[featureKey];\n\n const id = feature.getId();\n if (id !== undefined) {\n const idString = id.toString();\n const indexedFeature = this.idIndex_[idString];\n if (indexedFeature === feature) {\n delete this.idIndex_[idString];\n } else if (Array.isArray(indexedFeature)) {\n indexedFeature.splice(indexedFeature.indexOf(feature), 1);\n if (indexedFeature.length === 1) {\n this.idIndex_[idString] = indexedFeature[0];\n }\n }\n }\n delete this.uidIndex_[featureKey];\n if (this.hasListener(VectorEventType.REMOVEFEATURE)) {\n this.dispatchEvent(\n new VectorSourceEvent(VectorEventType.REMOVEFEATURE, feature),\n );\n }\n return true;\n }\n\n /**\n * Remove a feature from the id index. Called internally when the feature id\n * may have changed.\n * @param {FeatureType} feature The feature.\n * @private\n */\n removeFromIdIndex_(feature) {\n for (const id in this.idIndex_) {\n if (this.idIndex_[id] === feature) {\n delete this.idIndex_[id];\n break;\n }\n }\n }\n\n /**\n * Set the new loader of the source. The next render cycle will use the\n * new loader.\n * @param {import(\"../featureloader.js\").FeatureLoader} loader The loader to set.\n * @api\n */\n setLoader(loader) {\n this.loader_ = loader;\n }\n\n /**\n * Points the source to a new url. The next render cycle will use the new url.\n * @param {string|import(\"../featureloader.js\").FeatureUrlFunction} url Url.\n * @api\n */\n setUrl(url) {\n assert(this.format_, '`format` must be set when `url` is set');\n this.url_ = url;\n this.setLoader(xhr(url, this.format_));\n }\n\n /**\n * @param {boolean} overlaps The source can have overlapping geometries.\n */\n setOverlaps(overlaps) {\n this.overlaps_ = overlaps;\n this.changed();\n }\n}\n\nexport default VectorSource;\n", "/**\n * @module ol/Overlay\n */\nimport MapEventType from './MapEventType.js';\nimport BaseObject from './Object.js';\nimport {CLASS_SELECTABLE} from './css.js';\nimport {outerHeight, outerWidth, removeChildren} from './dom.js';\nimport {listen, unlistenByKey} from './events.js';\nimport {containsExtent} from './extent.js';\n\n/**\n * @typedef {'bottom-left' | 'bottom-center' | 'bottom-right' | 'center-left' | 'center-center' | 'center-right' | 'top-left' | 'top-center' | 'top-right'} Positioning\n * The overlay position: `'bottom-left'`, `'bottom-center'`, `'bottom-right'`,\n * `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`,\n * `'top-center'`, or `'top-right'`.\n */\n\n/**\n * @typedef {Object} Options\n * @property {number|string} [id] Set the overlay id. The overlay id can be used\n * with the {@link module:ol/Map~Map#getOverlayById} method.\n * @property {HTMLElement} [element] The overlay element.\n * @property {Array<number>} [offset=[0, 0]] Offsets in pixels used when positioning\n * the overlay. The first element in the\n * array is the horizontal offset. A positive value shifts the overlay right.\n * The second element in the array is the vertical offset. A positive value\n * shifts the overlay down.\n * @property {import(\"./coordinate.js\").Coordinate} [position] The overlay position\n * in map projection.\n * @property {Positioning} [positioning='top-left'] Defines how\n * the overlay is actually positioned with respect to its `position` property.\n * Possible values are `'bottom-left'`, `'bottom-center'`, `'bottom-right'`,\n * `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`,\n * `'top-center'`, and `'top-right'`.\n * @property {boolean} [stopEvent=true] Whether event propagation to the map\n * viewport should be stopped. If `true` the overlay is placed in the same\n * container as that of the controls (CSS class name\n * `ol-overlaycontainer-stopevent`); if `false` it is placed in the container\n * with CSS class name specified by the `className` property.\n * @property {boolean} [insertFirst=true] Whether the overlay is inserted first\n * in the overlay container, or appended. If the overlay is placed in the same\n * container as that of the controls (see the `stopEvent` option) you will\n * probably set `insertFirst` to `true` so the overlay is displayed below the\n * controls.\n * @property {PanIntoViewOptions|boolean} [autoPan=false] Pan the map when calling\n * `setPosition`, so that the overlay is entirely visible in the current viewport.\n * @property {string} [className='ol-overlay-container ol-selectable'] CSS class\n * name.\n */\n\n/**\n * @typedef {Object} PanOptions\n * @property {number} [duration=1000] The duration of the animation in\n * milliseconds.\n * @property {function(number):number} [easing] The easing function to use. Can\n * be one from {@link module:ol/easing} or a custom function.\n * Default is {@link module:ol/easing.inAndOut}.\n */\n\n/**\n * @typedef {Object} PanIntoViewOptions\n * @property {PanOptions} [animation={}] The animation parameters for the pan\n * @property {number} [margin=20] The margin (in pixels) between the\n * overlay and the borders of the map when panning into view.\n */\n\n/**\n * @enum {string}\n * @protected\n */\nconst Property = {\n ELEMENT: 'element',\n MAP: 'map',\n OFFSET: 'offset',\n POSITION: 'position',\n POSITIONING: 'positioning',\n};\n\n/**\n * @typedef {import(\"./ObjectEventType\").Types|'change:element'|'change:map'|'change:offset'|'change:position'|\n * 'change:positioning'} OverlayObjectEventTypes\n */\n\n/***\n * @template Return\n * @typedef {import(\"./Observable\").OnSignature<import(\"./Observable\").EventTypes, import(\"./events/Event.js\").default, Return> &\n * import(\"./Observable\").OnSignature<OverlayObjectEventTypes, import(\"./Object\").ObjectEvent, Return> &\n * import(\"./Observable\").CombinedOnSignature<import(\"./Observable\").EventTypes|OverlayObjectEventTypes, Return>} OverlayOnSignature\n */\n\n/**\n * @classdesc\n * An element to be displayed over the map and attached to a single map\n * location. Like {@link module:ol/control/Control~Control}, Overlays are\n * visible widgets. Unlike Controls, they are not in a fixed position on the\n * screen, but are tied to a geographical coordinate, so panning the map will\n * move an Overlay but not a Control.\n *\n * Example:\n *\n * import Overlay from 'ol/Overlay.js';\n *\n * // ...\n * const popup = new Overlay({\n * element: document.getElementById('popup'),\n * });\n * popup.setPosition(coordinate);\n * map.addOverlay(popup);\n *\n * @api\n */\nclass Overlay extends BaseObject {\n /**\n * @param {Options} options Overlay options.\n */\n constructor(options) {\n super();\n\n /***\n * @type {OverlayOnSignature<import(\"./events\").EventsKey>}\n */\n this.on;\n\n /***\n * @type {OverlayOnSignature<import(\"./events\").EventsKey>}\n */\n this.once;\n\n /***\n * @type {OverlayOnSignature<void>}\n */\n this.un;\n\n /**\n * @protected\n * @type {Options}\n */\n this.options = options;\n\n /**\n * @protected\n * @type {number|string|undefined}\n */\n this.id = options.id;\n\n /**\n * @protected\n * @type {boolean}\n */\n this.insertFirst =\n options.insertFirst !== undefined ? options.insertFirst : true;\n\n /**\n * @protected\n * @type {boolean}\n */\n this.stopEvent = options.stopEvent !== undefined ? options.stopEvent : true;\n\n /**\n * @protected\n * @type {HTMLElement}\n */\n this.element = document.createElement('div');\n this.element.className =\n options.className !== undefined\n ? options.className\n : 'ol-overlay-container ' + CLASS_SELECTABLE;\n this.element.style.position = 'absolute';\n this.element.style.pointerEvents = 'auto';\n\n /**\n * @protected\n * @type {PanIntoViewOptions|undefined}\n */\n this.autoPan = options.autoPan === true ? {} : options.autoPan || undefined;\n\n /**\n * @protected\n * @type {{transform_: string,\n * visible: boolean}}\n */\n this.rendered = {\n transform_: '',\n visible: true,\n };\n\n /**\n * @protected\n * @type {?import(\"./events.js\").EventsKey}\n */\n this.mapPostrenderListenerKey = null;\n\n this.addChangeListener(Property.ELEMENT, this.handleElementChanged);\n this.addChangeListener(Property.MAP, this.handleMapChanged);\n this.addChangeListener(Property.OFFSET, this.handleOffsetChanged);\n this.addChangeListener(Property.POSITION, this.handlePositionChanged);\n this.addChangeListener(Property.POSITIONING, this.handlePositioningChanged);\n\n if (options.element !== undefined) {\n this.setElement(options.element);\n }\n\n this.setOffset(options.offset !== undefined ? options.offset : [0, 0]);\n\n this.setPositioning(options.positioning || 'top-left');\n\n if (options.position !== undefined) {\n this.setPosition(options.position);\n }\n }\n\n /**\n * Get the DOM element of this overlay.\n * @return {HTMLElement|undefined} The Element containing the overlay.\n * @observable\n * @api\n */\n getElement() {\n return /** @type {HTMLElement|undefined} */ (this.get(Property.ELEMENT));\n }\n\n /**\n * Get the overlay identifier which is set on constructor.\n * @return {number|string|undefined} Id.\n * @api\n */\n getId() {\n return this.id;\n }\n\n /**\n * Get the map associated with this overlay.\n * @return {import(\"./Map.js\").default|null} The map that the\n * overlay is part of.\n * @observable\n * @api\n */\n getMap() {\n return /** @type {import(\"./Map.js\").default|null} */ (\n this.get(Property.MAP) || null\n );\n }\n\n /**\n * Get the offset of this overlay.\n * @return {Array<number>} The offset.\n * @observable\n * @api\n */\n getOffset() {\n return /** @type {Array<number>} */ (this.get(Property.OFFSET));\n }\n\n /**\n * Get the current position of this overlay.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} The spatial point that the overlay is\n * anchored at.\n * @observable\n * @api\n */\n getPosition() {\n return /** @type {import(\"./coordinate.js\").Coordinate|undefined} */ (\n this.get(Property.POSITION)\n );\n }\n\n /**\n * Get the current positioning of this overlay.\n * @return {Positioning} How the overlay is positioned\n * relative to its point on the map.\n * @observable\n * @api\n */\n getPositioning() {\n return /** @type {Positioning} */ (this.get(Property.POSITIONING));\n }\n\n /**\n * @protected\n */\n handleElementChanged() {\n removeChildren(this.element);\n const element = this.getElement();\n if (element) {\n this.element.appendChild(element);\n }\n }\n\n /**\n * @protected\n */\n handleMapChanged() {\n if (this.mapPostrenderListenerKey) {\n this.element?.remove();\n unlistenByKey(this.mapPostrenderListenerKey);\n this.mapPostrenderListenerKey = null;\n }\n const map = this.getMap();\n if (map) {\n this.mapPostrenderListenerKey = listen(\n map,\n MapEventType.POSTRENDER,\n this.render,\n this,\n );\n this.updatePixelPosition();\n const container = this.stopEvent\n ? map.getOverlayContainerStopEvent()\n : map.getOverlayContainer();\n if (this.insertFirst) {\n container.insertBefore(this.element, container.childNodes[0] || null);\n } else {\n container.appendChild(this.element);\n }\n this.performAutoPan();\n }\n }\n\n /**\n * @protected\n */\n render() {\n this.updatePixelPosition();\n }\n\n /**\n * @protected\n */\n handleOffsetChanged() {\n this.updatePixelPosition();\n }\n\n /**\n * @protected\n */\n handlePositionChanged() {\n this.updatePixelPosition();\n this.performAutoPan();\n }\n\n /**\n * @protected\n */\n handlePositioningChanged() {\n this.updatePixelPosition();\n }\n\n /**\n * Set the DOM element to be associated with this overlay.\n * @param {HTMLElement|undefined} element The Element containing the overlay.\n * @observable\n * @api\n */\n setElement(element) {\n this.set(Property.ELEMENT, element);\n }\n\n /**\n * Set the map to be associated with this overlay.\n * @param {import(\"./Map.js\").default|null} map The map that the\n * overlay is part of. Pass `null` to just remove the overlay from the current map.\n * @observable\n * @api\n */\n setMap(map) {\n this.set(Property.MAP, map);\n }\n\n /**\n * Set the offset for this overlay.\n * @param {Array<number>} offset Offset.\n * @observable\n * @api\n */\n setOffset(offset) {\n this.set(Property.OFFSET, offset);\n }\n\n /**\n * Set the position for this overlay. If the position is `undefined` the\n * overlay is hidden.\n * @param {import(\"./coordinate.js\").Coordinate|undefined} position The spatial point that the overlay\n * is anchored at.\n * @observable\n * @api\n */\n setPosition(position) {\n this.set(Property.POSITION, position);\n }\n\n /**\n * Pan the map so that the overlay is entirely visible in the current viewport\n * (if necessary) using the configured autoPan parameters\n * @protected\n */\n performAutoPan() {\n if (this.autoPan) {\n this.panIntoView(this.autoPan);\n }\n }\n\n /**\n * Pan the map so that the overlay is entirely visible in the current viewport\n * (if necessary).\n * @param {PanIntoViewOptions} [panIntoViewOptions] Options for the pan action\n * @api\n */\n panIntoView(panIntoViewOptions) {\n const map = this.getMap();\n\n if (!map || !map.getTargetElement() || !this.get(Property.POSITION)) {\n return;\n }\n\n const mapRect = this.getRect(map.getTargetElement(), map.getSize());\n const element = this.getElement();\n const overlayRect = this.getRect(element, [\n outerWidth(element),\n outerHeight(element),\n ]);\n\n panIntoViewOptions = panIntoViewOptions || {};\n\n const myMargin =\n panIntoViewOptions.margin === undefined ? 20 : panIntoViewOptions.margin;\n if (!containsExtent(mapRect, overlayRect)) {\n // the overlay is not completely inside the viewport, so pan the map\n const offsetLeft = overlayRect[0] - mapRect[0];\n const offsetRight = mapRect[2] - overlayRect[2];\n const offsetTop = overlayRect[1] - mapRect[1];\n const offsetBottom = mapRect[3] - overlayRect[3];\n\n const delta = [0, 0];\n if (offsetLeft < 0) {\n // move map to the left\n delta[0] = offsetLeft - myMargin;\n } else if (offsetRight < 0) {\n // move map to the right\n delta[0] = Math.abs(offsetRight) + myMargin;\n }\n if (offsetTop < 0) {\n // move map up\n delta[1] = offsetTop - myMargin;\n } else if (offsetBottom < 0) {\n // move map down\n delta[1] = Math.abs(offsetBottom) + myMargin;\n }\n\n if (delta[0] !== 0 || delta[1] !== 0) {\n const center = /** @type {import(\"./coordinate.js\").Coordinate} */ (\n map.getView().getCenterInternal()\n );\n const centerPx = map.getPixelFromCoordinateInternal(center);\n if (!centerPx) {\n return;\n }\n const newCenterPx = [centerPx[0] + delta[0], centerPx[1] + delta[1]];\n\n const panOptions = panIntoViewOptions.animation || {};\n map.getView().animateInternal({\n center: map.getCoordinateFromPixelInternal(newCenterPx),\n duration: panOptions.duration,\n easing: panOptions.easing,\n });\n }\n }\n }\n\n /**\n * Get the extent of an element relative to the document\n * @param {HTMLElement} element The element.\n * @param {import(\"./size.js\").Size} size The size of the element.\n * @return {import(\"./extent.js\").Extent} The extent.\n * @protected\n */\n getRect(element, size) {\n const box = element.getBoundingClientRect();\n const offsetX = box.left + window.pageXOffset;\n const offsetY = box.top + window.pageYOffset;\n return [offsetX, offsetY, offsetX + size[0], offsetY + size[1]];\n }\n\n /**\n * Set the positioning for this overlay.\n * @param {Positioning} positioning how the overlay is\n * positioned relative to its point on the map.\n * @observable\n * @api\n */\n setPositioning(positioning) {\n this.set(Property.POSITIONING, positioning);\n }\n\n /**\n * Modify the visibility of the element.\n * @param {boolean} visible Element visibility.\n * @protected\n */\n setVisible(visible) {\n if (this.rendered.visible !== visible) {\n this.element.style.display = visible ? '' : 'none';\n this.rendered.visible = visible;\n }\n }\n\n /**\n * Update pixel position.\n * @protected\n */\n updatePixelPosition() {\n const map = this.getMap();\n const position = this.getPosition();\n if (!map || !map.isRendered() || !position) {\n this.setVisible(false);\n return;\n }\n\n const pixel = map.getPixelFromCoordinate(position);\n const mapSize = map.getSize();\n this.updateRenderedPosition(pixel, mapSize);\n }\n\n /**\n * @param {import(\"./pixel.js\").Pixel} pixel The pixel location.\n * @param {import(\"./size.js\").Size|undefined} mapSize The map size.\n * @protected\n */\n updateRenderedPosition(pixel, mapSize) {\n const style = this.element.style;\n const offset = this.getOffset();\n\n const positioning = this.getPositioning();\n\n this.setVisible(true);\n\n const x = `${pixel[0] + offset[0]}px`;\n const y = `${pixel[1] + offset[1]}px`;\n let posX = '0%';\n let posY = '0%';\n if (\n positioning == 'bottom-right' ||\n positioning == 'center-right' ||\n positioning == 'top-right'\n ) {\n posX = '-100%';\n } else if (\n positioning == 'bottom-center' ||\n positioning == 'center-center' ||\n positioning == 'top-center'\n ) {\n posX = '-50%';\n }\n if (\n positioning == 'bottom-left' ||\n positioning == 'bottom-center' ||\n positioning == 'bottom-right'\n ) {\n posY = '-100%';\n } else if (\n positioning == 'center-left' ||\n positioning == 'center-center' ||\n positioning == 'center-right'\n ) {\n posY = '-50%';\n }\n const transform = `translate(${posX}, ${posY}) translate(${x}, ${y})`;\n if (this.rendered.transform_ != transform) {\n this.rendered.transform_ = transform;\n style.transform = transform;\n }\n }\n\n /**\n * returns the options this Overlay has been created with\n * @return {Options} overlay options\n */\n getOptions() {\n return this.options;\n }\n}\n\nexport default Overlay;\n", "import type { Annotation, Prediction, TileSelection } from '#types'\nimport {\n\tWSImage,\n\tSelectionPrefixes,\n\tcheckSelectionType,\n\tFlagStatusMessages,\n\tFlagStatus,\n\ttype ProvokingActions\n} from '#types'\nimport type Settings from '#plots/wsiviewer/Settings.ts'\n\nexport class SessionWSImage extends WSImage {\n\tsessionsTileSelections?: TileSelection[]\n\n\tconstructor(ws: WSImage, sessionsTileSelections?: TileSelection[]) {\n\t\tsuper(ws.filename)\n\t\t// copy common properties from provided WSImage\n\t\tthis.id = ws.id\n\t\tthis.metadata = ws.metadata\n\t\tthis.predictionLayers = ws.predictionLayers\n\t\tthis.annotations = ws.annotations || []\n\t\tthis.classes = ws.classes\n\t\tthis.uncertainty = ws.uncertainty\n\t\tthis.activePatchColor = ws.activePatchColor\n\t\tthis.tileSize = ws.tileSize\n\t\tthis.predictions = ws.predictions\n\t\tthis.sessionsTileSelections = sessionsTileSelections\n\t}\n\tpublic static getNextTileID(sessionWSImage: SessionWSImage, settings: Settings, currentIndex: number): string {\n\t\tconst allSelections = SessionWSImage.getTileSelections(sessionWSImage, settings) || []\n\t\tif (allSelections.length < 2) return ''\n\t\tconst nextID: string =\n\t\t\tcurrentIndex === allSelections.length - 1 ? allSelections[0].id : allSelections[currentIndex + 1].id\n\t\treturn nextID\n\t}\n\n\tpublic static findTileIndexByID(tileID: string, sessionWSImage: SessionWSImage, settings: Settings): number {\n\t\tconst allSelections = SessionWSImage.getTileSelections(sessionWSImage, settings) || []\n\t\tconst foundIndex = allSelections.findIndex(ts => ts.id === tileID)\n\t\tif (foundIndex === -1) return 0\n\t\treturn foundIndex\n\t}\n\n\tpublic static calculateNewActiveIndex(\n\t\tcurrentIndex: number,\n\t\tsessionWSImage: SessionWSImage,\n\t\tprovokingAction: ProvokingActions,\n\t\tsettings: Settings\n\t): number {\n\t\t// Note here that these calculations will have to change if tileselection sorting change. This calulation is assuming that\n\t\t// All flagged/skipped/annotated items are collected together, sorted by descending timestamp (newest first), and\n\t\t// put in the back half of the table, with sessiontilesections and predictions up front\n\t\tconst tileSelections = SessionWSImage.getTileSelections(sessionWSImage, settings)\n\t\tlet action = provokingAction as string\n\t\tif ('flagging' === provokingAction) {\n\t\t\taction = provokingAction + (settings.renderOnlyFlagged ? 'WithCheck' : 'WithoutCheck')\n\t\t} else if ('skipping' === provokingAction) {\n\t\t\taction = provokingAction + (settings.renderSkipped ? 'WithCheck' : 'WithoutCheck')\n\t\t}\n\t\tconst isLastIndex = currentIndex >= tileSelections.length - 1\n\t\tlet secondHalfIndex = tileSelections.findIndex(\n\t\t\tts => checkSelectionType(ts, SelectionPrefixes.Annotation) || ts.flag !== FlagStatus.Normal\n\t\t)\n\t\tif (secondHalfIndex === -1) secondHalfIndex = tileSelections.length\n\t\tconst inFirstHalf = currentIndex < secondHalfIndex\n\t\tswitch (action) {\n\t\t\tcase 'annotation':\n\t\t\tcase 'skippingWithCheck':\n\t\t\tcase 'flaggingWithoutCheck':\n\t\t\t\treturn inFirstHalf || isLastIndex ? currentIndex : currentIndex + 1\n\t\t\tcase 'delete':\n\t\t\tcase 'skippingWithoutCheck':\n\t\t\tcase 'flaggingWithCheck':\n\t\t\t\treturn isLastIndex ? Math.max(0, currentIndex - 1) : currentIndex\n\t\t\tdefault:\n\t\t\t\treturn 0\n\t\t}\n\t}\n\n\tpublic static removeTileSelection(tileSelection: TileSelection, sessionWSImage: SessionWSImage): TileSelection[] {\n\t\tif (!sessionWSImage.sessionsTileSelections) return []\n\t\tsessionWSImage.sessionsTileSelections = sessionWSImage.sessionsTileSelections.filter(\n\t\t\t(ts: TileSelection) => tileSelection.id !== ts.id\n\t\t)\n\t\treturn sessionWSImage.sessionsTileSelections\n\t}\n\n\tpublic static getTileSelections(sessionWSImage: SessionWSImage, settings: Settings): TileSelection[] {\n\t\tconst allTileSelections = SessionWSImage.getUnfilteredTileSelections(sessionWSImage)\n\t\tif (allTileSelections.length === 0) return []\n\t\tconst [selections, flagged_selections] = partition(\n\t\t\tallTileSelections.filter(ts => checkSelectionType(ts, SelectionPrefixes.TileSelection)) || [],\n\t\t\tts => ts.flag === FlagStatus.Normal\n\t\t)\n\t\tconst [preds, flagged_preds] = partition(\n\t\t\tallTileSelections.filter(ts => checkSelectionType(ts, SelectionPrefixes.Prediction)) || [],\n\t\t\tts => ts.flag === FlagStatus.Normal\n\t\t) as [Prediction[], Prediction[]]\n\t\tconst [annotations, flagged_annotations] = partition(\n\t\t\tallTileSelections.filter(ts => checkSelectionType(ts, SelectionPrefixes.Annotation)) || [],\n\t\t\tts => ts.flag === FlagStatus.Normal\n\t\t) as [Annotation[], Annotation[]]\n\n\t\tconst flagged_and_annotated = [...flagged_selections, ...flagged_preds, ...flagged_annotations, ...annotations]\n\t\tconst desired_arrays = [selections, preds, flagged_and_annotated]\n\t\tfor (const array of desired_arrays) {\n\t\t\tarray.sort((a, b) => b.timestamp.localeCompare(a.timestamp))\n\t\t}\n\t\tconst filtered_arrays = desired_arrays.flat().filter(ts => {\n\t\t\tif (ts.flag === FlagStatus.Skipped && !settings.renderSkipped) return false\n\t\t\tif (ts.flag !== FlagStatus.Flagged && settings.renderOnlyFlagged) return false\n\t\t\tif (ts.flag === FlagStatus.Deleted) return false\n\t\t\treturn true\n\t\t})\n\t\treturn filtered_arrays\n\t}\n\n\tpublic static getUnfilteredTileSelections(sessionWSImage: SessionWSImage): TileSelection[] {\n\t\tconst selections = sessionWSImage.sessionsTileSelections || []\n\t\tconst preds = sessionWSImage.predictions || []\n\t\tconst annotations = sessionWSImage.annotations || []\n\t\treturn [...selections, ...preds, ...annotations]\n\t}\n\n\tpublic static getTilesTableRows(\n\t\tsessionWSImage: SessionWSImage,\n\t\tselectedTileIndex: number,\n\t\tsettings: Settings\n\t): any[] {\n\t\tlet row_index = 0\n\t\tconst incrementIndex = () => {\n\t\t\trow_index++\n\t\t}\n\t\tconst selectedColor = '#fcfc8b'\n\n\t\tconst selectionRows: any[] = SessionWSImage.getTileSelections(sessionWSImage, settings)\n\t\t\t.map(tileSelection => {\n\t\t\t\tconst color = sessionWSImage.classes?.find(c => c.label === tileSelection.class)?.color\n\t\t\t\tconst firstCell: any = { value: row_index }\n\t\t\t\tfirstCell.origBackground = row_index === selectedTileIndex ? selectedColor : ''\n\t\t\t\tconst isPrediction = checkSelectionType(tileSelection, SelectionPrefixes.Prediction)\n\t\t\t\tconst isAnnotation = checkSelectionType(tileSelection, SelectionPrefixes.Annotation)\n\t\t\t\tconst annotationLabel = isAnnotation ? tileSelection.class : ''\n\t\t\t\tconst squareHTML =\n\t\t\t\t\tcolor === undefined\n\t\t\t\t\t\t? ''\n\t\t\t\t\t\t: `<span style=\"display:inline-block;width:12px;height:18px;background-color:${color};border:grey 1px solid;\"></span>`\n\t\t\t\tincrementIndex()\n\t\t\t\treturn [\n\t\t\t\t\tfirstCell,\n\t\t\t\t\t{ value: tileSelection.zoomCoordinates },\n\t\t\t\t\t{ value: isPrediction ? (tileSelection as Prediction).uncertainty : 0 },\n\t\t\t\t\t{ value: isPrediction && FlagStatus.Normal === tileSelection.flag ? tileSelection.class : '' },\n\t\t\t\t\t{ html: squareHTML },\n\t\t\t\t\t{\n\t\t\t\t\t\tvalue: `${\n\t\t\t\t\t\t\tFlagStatus.Normal === tileSelection.flag ? annotationLabel : FlagStatusMessages[tileSelection.flag]\n\t\t\t\t\t\t}`\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t})\n\t\t\t.filter((annotation, _) => annotation.length > 0)\n\n\t\treturn selectionRows\n\t}\n\n\tpublic static isSessionTileSelection(tileSelection: TileSelection, sessionWSImage: SessionWSImage): boolean {\n\t\treturn sessionWSImage.sessionsTileSelections?.map(ts => ts.id).includes(tileSelection.id) ?? false\n\t}\n}\nfunction partition(\n\tarray: TileSelection[],\n\tcallback: (element: TileSelection) => boolean\n): [TileSelection[], TileSelection[]] {\n\tconst trueList: TileSelection[] = []\n\tconst falseList: TileSelection[] = []\n\n\tarray.forEach(element => {\n\t\tif (callback(element)) {\n\t\t\ttrueList.push(element)\n\t\t} else {\n\t\t\tfalseList.push(element)\n\t\t}\n\t})\n\n\treturn [trueList, falseList]\n}\n", "import type { WSImage } from '@sjcrh/proteinpaint-types'\nimport type { WSImageLayers } from '#plots/wsiviewer/viewModel/WSImageLayers.ts'\nimport type { TableCell } from '#dom'\nimport { SessionWSImage } from '#plots/wsiviewer/viewModel/SessionWSImage.ts'\nimport type { ImageViewData } from '#plots/wsiviewer/viewModel/ImageViewData.ts'\nimport type Settings from '#plots/wsiviewer/Settings.ts'\n\nexport class ViewModel {\n\tpublic sampleWSImages: SessionWSImage[]\n\tpublic wsimageLayers: Array<WSImageLayers | null>\n\tpublic wsimageLayersLoadError: string | undefined\n\tpublic selectedTileIndex: number\n\n\timageViewData: (index: number) => ImageViewData\n\n\tconstructor(\n\t\tsampleWSImages: WSImage[],\n\t\twsimageLayers: Array<WSImageLayers | null>,\n\t\twsimageLayersLoadError: string | undefined,\n\t\tsettings: Settings\n\t) {\n\t\t// Convert incoming WSImage[] into SessionWSImage[]\n\t\tthis.sampleWSImages = (sampleWSImages || []).map(ws => new SessionWSImage(ws))\n\n\t\tif (this.sampleWSImages[settings.displayedImageIndex]) {\n\t\t\tthis.sampleWSImages[settings.displayedImageIndex].sessionsTileSelections = settings.sessionsTileSelection\n\t\t}\n\t\tthis.selectedTileIndex = settings.activeAnnotation\n\t\tthis.wsimageLayers = wsimageLayers\n\t\tthis.wsimageLayersLoadError = wsimageLayersLoadError\n\t\tthis.imageViewData = index => this.getImageViewData(index, settings)\n\t}\n\n\tpublic getImageViewData(index: number, settings: Settings): ImageViewData {\n\t\tconst imageViewData: ImageViewData = {}\n\t\tconst imageData = this.sampleWSImages[index]\n\t\tthis.setAnnonationsTableData(imageViewData, imageData, settings)\n\t\tthis.setClassData(imageViewData, imageData)\n\t\tif (imageData?.uncertainty) {\n\t\t\timageViewData.uncertainty = imageData?.uncertainty\n\t\t}\n\t\tconst layer = this.wsimageLayers[index]\n\t\tif (layer) {\n\t\t\tconst metadata = layer.wsimage.get('metadata')\n\t\t\tif (metadata) imageViewData.metadata = metadata\n\t\t}\n\n\t\tif (imageData.activePatchColor) imageViewData.activePatchColor = imageData.activePatchColor\n\n\t\treturn imageViewData\n\t}\n\n\tpublic getInitialZoomInCoordinate(settings: Settings) {\n\t\tconst image = this.sampleWSImages[settings.displayedImageIndex]\n\t\treturn SessionWSImage.getTileSelections(image, settings)\n\t\t\t.map(a => a.zoomCoordinates)\n\t\t\t.slice(settings.activeAnnotation, settings.activeAnnotation + 1)\n\t}\n\n\tprivate setAnnonationsTableData(imageViewData: ImageViewData, imageData: SessionWSImage, settings: Settings) {\n\t\tconst mergedRows: any[] = SessionWSImage.getTilesTableRows(imageData, this.selectedTileIndex, settings)\n\n\t\tconst columns = [\n\t\t\t{ label: 'Index', sortable: true, align: 'center' },\n\t\t\t{ label: 'Coordinates' },\n\t\t\t{ label: 'Uncertainty', sortable: true },\n\t\t\t{ label: 'Model-Predicted Class', sortable: true },\n\t\t\t{ label: '', align: 'center' }, //Show the color next to the class\n\t\t\t{ label: 'Annotated Class', sortable: true }\n\t\t]\n\n\t\timageViewData.tilesTable = {\n\t\t\trows: mergedRows,\n\t\t\tcolumns: columns\n\t\t}\n\t}\n\n\tprivate setClassData(imageViewData: ImageViewData, imageData: WSImage) {\n\t\tif (!imageData?.classes?.length) return\n\n\t\t// Note: 'Enter' is no longer included in shortcuts since it is now handled separately in the interaction code.\n\t\tconst shortcuts: string[] = []\n\t\tconst classRows: TableCell[][] = []\n\n\t\tfor (const c of imageData.classes) {\n\t\t\tclassRows.push([\n\t\t\t\t{ value: c.label },\n\t\t\t\t{\n\t\t\t\t\thtml: `<span style=\"display:inline-block;width:20px;height:20px;background-color:${c.color};border:grey 1px solid;\"></span>`\n\t\t\t\t},\n\t\t\t\t{ value: c.key_shortcut.replace('Key', '').replace('Digit', '') }\n\t\t\t])\n\t\t\tshortcuts.push(c.key_shortcut)\n\t\t}\n\t\tconst columns = [{ label: 'Class' }, { label: 'Color', align: 'center' }, { label: 'Shortcut', align: 'center' }]\n\n\t\timageViewData.classesTable = {\n\t\t\trows: classRows,\n\t\t\tcolumns: columns\n\t\t}\n\t\timageViewData.shortcuts = shortcuts\n\t}\n}\n", "import { dofetch3, getSavedToken } from '#common/dofetch'\nimport { ViewModel } from '#plots/wsiviewer/viewModel/ViewModel.ts'\nimport type { WSImageLayers } from '#plots/wsiviewer/viewModel/WSImageLayers.ts'\nimport Zoomify from 'ol/source/Zoomify'\nimport TileLayer from 'ol/layer/Tile'\nimport VectorLayer from 'ol/layer/Vector'\nimport VectorSource from 'ol/source/Vector'\nimport type {\n\tAiProjectSelectedWSImagesRequest,\n\tAiProjectSelectedWSImagesResponse,\n\tSampleWSImagesResponse,\n\tWSImage,\n\tWSImagesRequest,\n\tWSImagesResponse\n} from '#types'\nimport { FeaturePrefixes, createFeatureID, FlagStatus } from '#types'\nimport type { ImageTile } from 'ol'\nimport { Feature } from 'ol'\nimport type { Geometry } from 'ol/geom'\nimport { Polygon } from 'ol/geom'\nimport { Fill, Stroke, Style } from 'ol/style'\nimport type Settings from '#plots/wsiviewer/Settings.ts'\nimport type { LoadFunction } from 'ol/Tile'\n\nexport class ViewModelProvider {\n\tconstructor() {}\n\n\tasync provide(\n\t\tgenome: string,\n\t\tdslabel: string,\n\t\tsampleId: string,\n\t\tsettings: Settings,\n\t\taiProjectID: number | undefined = undefined,\n\t\taiWSIMageFiles: Array<string> | undefined\n\t): Promise<ViewModel> {\n\t\tlet wsimageLayers: Array<WSImageLayers | null> = []\n\t\tlet wsimageLayersLoadError: string | undefined = undefined\n\t\tlet wsImages: WSImage[] = []\n\n\t\tif (sampleId) {\n\t\t\ttry {\n\t\t\t\tconst data: SampleWSImagesResponse = await this.getSampleWSImages(genome, dslabel, sampleId)\n\t\t\t\twsImages = data.sampleWSImages\n\t\t\t\twsimageLayers = await this.getWSImageLayers(\n\t\t\t\t\tgenome,\n\t\t\t\t\tdslabel,\n\t\t\t\t\tdata.sampleWSImages,\n\t\t\t\t\tsampleId,\n\t\t\t\t\tundefined,\n\t\t\t\t\tsettings.annotatedPatchBorderColor,\n\t\t\t\t\tsettings.thumbnailRangeStart,\n\t\t\t\t\tsettings.numDisplayedThumbnails,\n\t\t\t\t\tsettings.displayedImageIndex\n\t\t\t\t)\n\t\t\t} catch (e: any) {\n\t\t\t\twsimageLayersLoadError = `Error loading image layers for sample ${sampleId}: ${e.message || e}`\n\t\t\t}\n\t\t} else {\n\t\t\tconst data: AiProjectSelectedWSImagesResponse = await this.aiProjectImages(\n\t\t\t\tgenome,\n\t\t\t\tdslabel,\n\t\t\t\taiProjectID!,\n\t\t\t\taiWSIMageFiles!\n\t\t\t)\n\t\t\twsImages = data.wsimages\n\t\t\twsimageLayers = await this.getWSImageLayers(\n\t\t\t\tgenome,\n\t\t\t\tdslabel,\n\t\t\t\tdata.wsimages,\n\t\t\t\tundefined,\n\t\t\t\taiProjectID!,\n\t\t\t\tsettings.annotatedPatchBorderColor,\n\t\t\t\tsettings.thumbnailRangeStart,\n\t\t\t\tsettings.numDisplayedThumbnails,\n\t\t\t\tsettings.displayedImageIndex\n\t\t\t)\n\t\t}\n\n\t\treturn new ViewModel(wsImages, wsimageLayers, wsimageLayersLoadError, settings)\n\t}\n\n\tpublic async getSampleWSImages(genome: string, dslabel: string, sample_id: string): Promise<SampleWSImagesResponse> {\n\t\treturn await dofetch3('samplewsimages', {\n\t\t\tbody: {\n\t\t\t\tgenome: genome,\n\t\t\t\tdslabel: dslabel,\n\t\t\t\tsample_id: sample_id\n\t\t\t}\n\t\t})\n\t}\n\n\tprivate async createAuthenticatedPreviewUrl(url: string, token: string): Promise<string> {\n\t\tconst response = await fetch(url, {\n\t\t\theaders: { Authorization: `Bearer ${token}` }\n\t\t})\n\n\t\tif (!response.ok) {\n\t\t\tthrow new Error(`Failed to load preview image: ${response.status} ${response.statusText}`)\n\t\t}\n\n\t\tconst blob = await response.blob()\n\t\treturn URL.createObjectURL(blob)\n\t}\n\n\tprivate async getWSImageLayers(\n\t\tgenome: string,\n\t\tdslabel: string,\n\t\twsimages: WSImage[],\n\t\tsampleId: string | undefined,\n\t\taiProjectID: number | undefined,\n\t\tannotatedPatchBorderColor: string,\n\t\tthumbnailRangeStart: number,\n\t\tnumDisplayedThumbnails: number,\n\t\tdisplayedImageIndex: number\n\t): Promise<Array<WSImageLayers | null>> {\n\t\tconst layers: Array<WSImageLayers | null> = Array.from({ length: wsimages.length }, () => null)\n\n\t\t// Calculate the range of thumbnails to load\n\t\tconst startIndex = thumbnailRangeStart\n\t\tconst endIndex = Math.min(thumbnailRangeStart + numDisplayedThumbnails, wsimages.length)\n\n\t\t// Determine which indices need to be loaded\n\t\tconst indicesToLoad = new Set<number>()\n\n\t\t// Load layers for visible thumbnail range\n\t\tfor (let i = startIndex; i < endIndex; i++) {\n\t\t\tindicesToLoad.add(i)\n\t\t}\n\n\t\t// Always load the currently displayed image if not in range\n\t\tindicesToLoad.add(displayedImageIndex)\n\n\t\tconst host = (sessionStorage.getItem('hostURL') || (window as any).testHost || '').replace(/\\/+$/, '')\n\n\t\t// Load layers for the determined indices\n\t\tfor (const i of indicesToLoad) {\n\t\t\tconst wsimage = wsimages[i].filename\n\t\t\tconst authToken = btoa(getSavedToken(dslabel) || '')\n\t\t\tconst body: WSImagesRequest = {\n\t\t\t\tgenome: genome,\n\t\t\t\tdslabel: dslabel,\n\t\t\t\tsampleId: sampleId,\n\t\t\t\twsimage: wsimages[i].filename,\n\t\t\t\taiProjectId: aiProjectID\n\t\t\t}\n\n\t\t\tconst data: WSImagesResponse = await dofetch3('wsimages', { body })\n\n\t\t\tif (data.status === 'error') {\n\t\t\t\tthrow new Error(`${data.error}`)\n\t\t\t}\n\n\t\t\tconst imgWidth = data.slide_dimensions[0]\n\t\t\tconst imgHeight = data.slide_dimensions[1]\n\n\t\t\tconst mpp = data.mpp // microns per pixel\n\n\t\t\tlet queryParams = `wsi_image=${wsimage}&dslabel=${dslabel}&genome=${genome}`\n\t\t\tif (sampleId) {\n\t\t\t\tqueryParams += `&sample_id=${sampleId}`\n\t\t\t} else if (aiProjectID) {\n\t\t\t\tqueryParams += `&ai_project_id=${aiProjectID}`\n\t\t\t}\n\n\t\t\tconst zoomifyUrl = `${host}/tileserver/layer/slide/${data.wsiSessionId}/zoomify/{TileGroup}/{z}-{x}-{y}@1x.jpg?${queryParams}`\n\n\t\t\tconst source = new Zoomify({\n\t\t\t\turl: zoomifyUrl,\n\t\t\t\tsize: [imgWidth, imgHeight],\n\t\t\t\tcrossOrigin: 'anonymous',\n\t\t\t\tzDirection: -1\n\t\t\t})\n\n\t\t\tsource.setTileLoadFunction(this.createAuthenticatedTileLoader(authToken))\n\n\t\t\tconst previewUrl = `${host}/tileserver/layer/slide/${data.wsiSessionId}/zoomify/TileGroup0/0-0-0@1x.jpg?${queryParams}`\n\t\t\tconst authenticatedPreviewUrl = await this.createAuthenticatedPreviewUrl(previewUrl, authToken)\n\n\t\t\tconst options = {\n\t\t\t\tpreview: authenticatedPreviewUrl,\n\t\t\t\tmetadata: wsimages[i].metadata,\n\t\t\t\tsource: source,\n\t\t\t\tbaseLayer: true,\n\t\t\t\ttitle: 'Slide',\n\t\t\t\tname: wsimage.replace(/(\\.\\w{3,4})$/i, '') //remove file extension\n\t\t\t}\n\t\t\tconst layer = new TileLayer(options)\n\n\t\t\tconst wsiImageLayers: WSImageLayers = {\n\t\t\t\twsimage: layer,\n\t\t\t\tmpp: mpp\n\t\t\t}\n\n\t\t\tif (data.overlays) {\n\t\t\t\tfor (const overlay of data.overlays) {\n\t\t\t\t\tlet predictionQueryParams = `wsi_image=${wsimage}&dslabel=${dslabel}&genome=${genome}`\n\t\t\t\t\tif (sampleId) {\n\t\t\t\t\t\tpredictionQueryParams += `&sample_id=${sampleId}`\n\t\t\t\t\t} else if (aiProjectID) {\n\t\t\t\t\t\tpredictionQueryParams += `&ai_project_id=${aiProjectID}`\n\t\t\t\t\t}\n\n\t\t\t\t\tconst zoomifyOverlayLatUrl = `${host}/tileserver/layer/${overlay.layerNumber}/${data.wsiSessionId}/zoomify/{TileGroup}/{z}-{x}-{y}@1x.jpg?${predictionQueryParams}`\n\n\t\t\t\t\tconst sourceOverlay = new Zoomify({\n\t\t\t\t\t\turl: zoomifyOverlayLatUrl,\n\t\t\t\t\t\tsize: [imgWidth, imgHeight],\n\t\t\t\t\t\tcrossOrigin: 'anonymous',\n\t\t\t\t\t\tzDirection: -1 // Ensure we get a tile with the screen resolution or higher\n\t\t\t\t\t})\n\n\t\t\t\t\tsourceOverlay.setTileLoadFunction(this.createAuthenticatedTileLoader(authToken))\n\n\t\t\t\t\tconst previewOverlayUrl = `${host}/tileserver/layer/${overlay.layerNumber}/${data.wsiSessionId}/zoomify/TileGroup0/0-0-0@1x.jpg?${predictionQueryParams}`\n\t\t\t\t\tconst authenticatedOverlayPreviewUrl = await this.createAuthenticatedPreviewUrl(previewOverlayUrl, authToken)\n\n\t\t\t\t\tconst optionsOverlay = {\n\t\t\t\t\t\tpreview: authenticatedOverlayPreviewUrl,\n\t\t\t\t\t\tmetadata: wsimages[i].metadata,\n\t\t\t\t\t\tsource: sourceOverlay,\n\t\t\t\t\t\ttitle: overlay.predictionOverlayType,\n\t\t\t\t\t\tvisible: false\n\t\t\t\t\t}\n\n\t\t\t\t\tif (wsiImageLayers.overlays) {\n\t\t\t\t\t\twsiImageLayers.overlays.push(new TileLayer(optionsOverlay))\n\t\t\t\t\t} else {\n\t\t\t\t\t\twsiImageLayers.overlays = [new TileLayer(optionsOverlay)]\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst annotations = wsimages[i].annotations ?? []\n\t\t\tconst predictions = wsimages[i].predictions ?? []\n\t\t\tconst sourceAnnotations = new VectorSource()\n\t\t\tconst tileSize = wsimages[i].tileSize ?? 512\n\t\t\tfor (const annotation of annotations) {\n\t\t\t\t// flip Y as in your original code\n\t\t\t\tconst topLeft: [number, number] = [annotation.zoomCoordinates[0], -annotation.zoomCoordinates[1]]\n\n\t\t\t\tconst color = this.getClassColor(wsimages[i], annotation.class)\n\t\t\t\tconst featureId = createFeatureID(FeaturePrefixes.Square, annotation.zoomCoordinates)\n\t\t\t\tlet squareFeature: Feature<Geometry>\n\t\t\t\tif (annotation.flag !== FlagStatus.Skipped) {\n\t\t\t\t\tsquareFeature = this.createSquareFeature(topLeft, tileSize, color, featureId)\n\t\t\t\t} else {\n\t\t\t\t\tsquareFeature = createDimSquareFeature(annotation.zoomCoordinates, topLeft, tileSize, color)\n\t\t\t\t}\n\t\t\t\tsourceAnnotations.addFeature(squareFeature)\n\n\t\t\t\tconst borderFeature = this.createBorderFeature(\n\t\t\t\t\ttopLeft,\n\t\t\t\t\ttileSize,\n\t\t\t\t\t15,\n\t\t\t\t\tannotatedPatchBorderColor,\n\t\t\t\t\tcreateFeatureID(FeaturePrefixes.Border, annotation.zoomCoordinates)\n\t\t\t\t)\n\t\t\t\tsourceAnnotations.addFeature(borderFeature)\n\n\t\t\t\tif (annotation.flag === FlagStatus.Flagged) {\n\t\t\t\t\tconst starFeature = createStarFeature(tileSize, topLeft, annotation.zoomCoordinates, 'yellow', color)\n\t\t\t\t\tsourceAnnotations.addFeature(starFeature)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (const pred of predictions) {\n\t\t\t\t// flip Y as in your original code\n\t\t\t\tconst topLeft: [number, number] = [pred.zoomCoordinates[0], -pred.zoomCoordinates[1]]\n\n\t\t\t\tconst color = this.getClassColor(wsimages[i], pred.class) ?? 'black'\n\t\t\t\tconst featureId = createFeatureID(FeaturePrefixes.Square, pred.zoomCoordinates)\n\t\t\t\tlet squareFeature: Feature<Geometry> | null = null\n\t\t\t\tif (pred.flag == FlagStatus.Flagged) {\n\t\t\t\t\tsquareFeature = this.createSquareFeature(topLeft, tileSize, color, featureId)\n\t\t\t\t\tconst starFeature = createStarFeature(tileSize, topLeft, pred.zoomCoordinates, 'yellow', color)\n\t\t\t\t\tsourceAnnotations.addFeature(starFeature)\n\t\t\t\t} else if (pred.flag === FlagStatus.Skipped) {\n\t\t\t\t\tsquareFeature = createDimSquareFeature(pred.zoomCoordinates, topLeft, tileSize, color)\n\t\t\t\t}\n\t\t\t\tif (squareFeature !== null) {\n\t\t\t\t\tsourceAnnotations.addFeature(squareFeature)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst vectorLayer = new VectorLayer({\n\t\t\t\tsource: sourceAnnotations,\n\t\t\t\tproperties: { title: 'Annotations' }\n\t\t\t})\n\n\t\t\tif (wsiImageLayers.overlays) {\n\t\t\t\twsiImageLayers.overlays.push(vectorLayer)\n\t\t\t} else {\n\t\t\t\twsiImageLayers.overlays = [vectorLayer]\n\t\t\t}\n\t\t\tlayers[i] = wsiImageLayers\n\t\t}\n\t\treturn layers\n\t}\n\n\tprivate async aiProjectImages(\n\t\tgenome: string,\n\t\tdslabel: string,\n\t\taiProjectID: number,\n\t\taiProjectFiles: Array<string>\n\t): Promise<AiProjectSelectedWSImagesResponse> {\n\t\tconst body: AiProjectSelectedWSImagesRequest = {\n\t\t\tgenome: genome,\n\t\t\tdslabel: dslabel,\n\t\t\tprojectId: aiProjectID,\n\t\t\twsimagesFilenames: aiProjectFiles\n\t\t}\n\t\treturn await dofetch3('aiProjectSelectedWSImages', {\n\t\t\tbody: body\n\t\t})\n\t}\n\n\t//TODO: This should be centralized with interaction code\n\tprivate createSquareFeature(\n\t\ttopLeft: [number, number],\n\t\ttileSize: number,\n\t\tcolor: any,\n\t\tfeatureId?: string\n\t): Feature<Geometry> {\n\t\tconst squareCoords = [\n\t\t\t[\n\t\t\t\ttopLeft,\n\t\t\t\t[topLeft[0] + tileSize, topLeft[1]],\n\t\t\t\t[topLeft[0] + tileSize, topLeft[1] - tileSize],\n\t\t\t\t[topLeft[0], topLeft[1] - tileSize],\n\t\t\t\ttopLeft\n\t\t\t]\n\t\t]\n\n\t\tconst feature = new Feature({\n\t\t\tgeometry: new Polygon(squareCoords),\n\t\t\tproperties: {\n\t\t\t\tisLocked: false\n\t\t\t}\n\t\t})\n\n\t\tif (featureId) {\n\t\t\tfeature.setId(featureId)\n\t\t}\n\n\t\tfeature.setStyle(\n\t\t\tnew Style({\n\t\t\t\tfill: new Fill({ color }),\n\t\t\t\tstroke: new Stroke({ color, width: 2 })\n\t\t\t})\n\t\t)\n\n\t\treturn feature\n\t}\n\n\t//TODO: This should be centralized with interaction code\n\tprivate createBorderFeature(\n\t\ttopLeft: [number, number],\n\t\ttileSize: number,\n\t\tborderWidth: number,\n\t\tcolor: any,\n\t\tfeatureId?: string\n\t): Feature<Geometry> {\n\t\tconst borderCoords = [\n\t\t\t[\n\t\t\t\ttopLeft,\n\t\t\t\t[topLeft[0] + tileSize, topLeft[1]],\n\t\t\t\t[topLeft[0] + tileSize, topLeft[1] - tileSize],\n\t\t\t\t[topLeft[0], topLeft[1] - tileSize],\n\t\t\t\ttopLeft\n\t\t\t],\n\t\t\t[\n\t\t\t\t[topLeft[0] + borderWidth, topLeft[1] - borderWidth],\n\t\t\t\t[topLeft[0] + tileSize - borderWidth, topLeft[1] - borderWidth],\n\t\t\t\t[topLeft[0] + tileSize - borderWidth, topLeft[1] - tileSize + borderWidth],\n\t\t\t\t[topLeft[0] + borderWidth, topLeft[1] - tileSize + borderWidth],\n\t\t\t\t[topLeft[0] + borderWidth, topLeft[1] - borderWidth]\n\t\t\t]\n\t\t]\n\n\t\tconst feature = new Feature({\n\t\t\tgeometry: new Polygon(borderCoords),\n\t\t\tproperties: {\n\t\t\t\tisLocked: false\n\t\t\t}\n\t\t})\n\n\t\tif (featureId) {\n\t\t\tfeature.setId(featureId)\n\t\t}\n\n\t\tfeature.setStyle(\n\t\t\tnew Style({\n\t\t\t\tfill: new Fill({ color }),\n\t\t\t\tstroke: new Stroke({ color, width: 2 })\n\t\t\t})\n\t\t)\n\n\t\treturn feature\n\t}\n\n\tprivate getClassColor(wsImage: WSImage, annotationClass: string): string {\n\t\treturn wsImage.classes?.find(wsiCLass => String(wsiCLass.label) === annotationClass)?.color ?? '#FFFFFF' // TODO get the default color from settings\n\t}\n\n\tprivate createAuthenticatedTileLoader(token: string): LoadFunction {\n\t\treturn (tile, src) => {\n\t\t\tconst imageTile = tile as ImageTile\n\t\t\tconst img = imageTile.getImage() as HTMLImageElement\n\n\t\t\tfetch(src, {\n\t\t\t\theaders: { Authorization: `Bearer ${token}` }\n\t\t\t})\n\t\t\t\t.then(r => r.blob())\n\t\t\t\t.then(blob => {\n\t\t\t\t\tconst url = URL.createObjectURL(blob)\n\t\t\t\t\timg.onload = () => URL.revokeObjectURL(url)\n\t\t\t\t\timg.src = url\n\t\t\t\t})\n\t\t}\n\t}\n}\n/**\n NOTE: If you provide a VectorSource the starFeature will be added to it instead of just created \n */\nexport function createStarFeature(\n\ttileSize: number,\n\tstarCenter: [number, number],\n\tannotationCoords: [number, number],\n\tfillColor: string = 'yellow',\n\toutlineColor: any = 'yellow',\n\tfeatureSource: VectorSource<Feature<Geometry>> | null = null\n): Feature<Polygon> {\n\t// Source - https://stackoverflow.com/a/70960369\n\t// Posted by enxaneta\n\t// Retrieved 2026-04-21, License - CC BY-SA 4.0\n\tconst starCoords: [number, number][][] = [[]]\n\tlet n = 0 //a counter\n\tconst starRadiusOuter = 110\n\tconst starRadiusInner = 55\n\tconst starOffset = tileSize / 4\n\tconst step = Math.PI / 5 //since the star has 5 points you will need to calculate the position of a point every 36degs i.e Math.PI/5;\n\n\t//a for loop to calculate the position of the points for the star\n\tfor (let a = Math.PI / 2; a > (-3 * Math.PI) / 2; a -= step) {\n\t\t//The point will be either on the outer circle or on the inner one\n\t\tconst r = n % 2 == 0 ? starRadiusOuter : starRadiusInner\n\t\tconst x = starCenter[0] + starOffset + r * Math.cos(a)\n\t\tconst y = starCenter[1] - starOffset + r * Math.sin(a)\n\t\tstarCoords[0].push([x, y])\n\t\tn++\n\t}\n\n\tconst starFeature = new Feature({\n\t\tgeometry: new Polygon(starCoords),\n\t\tproperties: {\n\t\t\tisLocked: false\n\t\t}\n\t})\n\n\tstarFeature.setId(createFeatureID(FeaturePrefixes.Star, annotationCoords))\n\n\tstarFeature.setStyle(\n\t\tnew Style({\n\t\t\tzIndex: 1000,\n\t\t\tfill: new Fill({ color: fillColor }),\n\t\t\tstroke: new Stroke({ color: outlineColor, width: 2 })\n\t\t})\n\t)\n\tif (featureSource) {\n\t\tconst oldFeature = featureSource.getFeatureById(createFeatureID(FeaturePrefixes.Star, annotationCoords))\n\t\tif (oldFeature) {\n\t\t\tfeatureSource.removeFeature(oldFeature)\n\t\t}\n\t\tfeatureSource.addFeature(starFeature)\n\t}\n\n\treturn starFeature\n}\n\n/**\n NOTE: If you provide a VectorSource the starFeature will be added to it instead of just created \n This function also defaults to using hexcode for color\n */\nexport function createDimSquareFeature(\n\tannotationCoords: [number, number],\n\ttopLeft: [number, number],\n\ttileSize: number,\n\tcolor: string,\n\tfeatureSource: VectorSource<Feature<Geometry>> | null = null,\n\tuseHex: boolean = true\n): Feature<Geometry> {\n\tconst squareCoords = [\n\t\t[\n\t\t\ttopLeft,\n\t\t\t[topLeft[0] + tileSize, topLeft[1]],\n\t\t\t[topLeft[0] + tileSize, topLeft[1] - tileSize],\n\t\t\t[topLeft[0], topLeft[1] - tileSize],\n\t\t\ttopLeft\n\t\t]\n\t]\n\n\tconst dimFeature = new Feature({\n\t\tgeometry: new Polygon(squareCoords),\n\t\tproperties: {\n\t\t\tisLocked: false\n\t\t}\n\t})\n\n\tdimFeature.setId(createFeatureID(FeaturePrefixes.Square, annotationCoords))\n\tfunction hexToRgb(hex: string): number[] {\n\t\thex = hex.replace(/^#/, '')\n\n\t\tconst r = parseInt(hex.substring(0, 2), 16)\n\t\tconst g = parseInt(hex.substring(2, 4), 16)\n\t\tconst b = parseInt(hex.substring(4, 6), 16)\n\n\t\treturn [r, g, b]\n\t}\n\tdimFeature.setStyle(\n\t\tnew Style({\n\t\t\tfill: new Fill({ color: useHex ? [...hexToRgb(color), 0.4] : color }),\n\t\t\tstroke: new Stroke({ color, width: 2 })\n\t\t})\n\t)\n\n\tif (featureSource) {\n\t\tconst oldFeature = featureSource.getFeatureById(createFeatureID(FeaturePrefixes.Square, annotationCoords))\n\t\tif (oldFeature) {\n\t\t\tfeatureSource.removeFeature(oldFeature)\n\t\t}\n\t\tfeatureSource.addFeature(dimFeature)\n\t}\n\treturn dimFeature\n}\n", "import type { SessionWSImage } from '#plots/wsiviewer/viewModel/SessionWSImage.ts'\nimport type { Annotation } from '@sjcrh/proteinpaint-types'\nimport { buildAnnotationsCsv } from '#plots/wsiviewer/interactions/annotationsCsv.ts'\n\nexport class DownloadCSVButtonRenderer {\n\tconstructor() {}\n\n\trender(holder: any, sessionWSImage: SessionWSImage | undefined) {\n\t\tif (!holder) return\n\t\t// create button (styling similar to other controls)\n\t\tconst btn = holder\n\t\t\t.append('div')\n\t\t\t.style('margin', '20px 0 0 0')\n\t\t\t.append('button')\n\t\t\t.attr('type', 'submit')\n\t\t\t.style('font-size', '1.25em')\n\t\t\t.style('padding', '10px 25px')\n\t\t\t.style('border-radius', '20px')\n\t\t\t.style('border', '1px solid black')\n\t\t\t.style('background-color', 'transparent')\n\t\t\t.style('margin', '0 10px')\n\t\t\t.text('Export Annotations')\n\t\tbtn.on('click', () => {\n\t\t\tif (!sessionWSImage) {\n\t\t\t\t// nothing to export\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.downloadAllAsCsv(sessionWSImage)\n\t\t})\n\t}\n\n\tpublic downloadAllAsCsv(sessionWSImage: SessionWSImage) {\n\t\tconst annotations: Annotation[] = (sessionWSImage.annotations || []) as Annotation[]\n\n\t\tif (!Array.isArray(annotations) || annotations.length === 0) {\n\t\t\tconst fileBase = ((sessionWSImage as any).filename || 'annotations').toString().replace(/\\.\\w+$/, '')\n\t\t\tconst filename = `${fileBase}_annotations.csv`\n\t\t\tthis.triggerDownload(filename, '')\n\t\t\treturn\n\t\t}\n\n\t\t// use shared CSV builder; prefer session filename for every row\n\t\tconst fileNameForRow = (sessionWSImage as any).filename ?? ''\n\t\tconst csv = buildAnnotationsCsv(annotations as any[], fileNameForRow)\n\n\t\tconst fileBase = ((sessionWSImage as any).filename || 'annotations').toString().replace(/\\.\\w+$/, '')\n\t\tconst filename = `${fileBase}_annotations.csv`\n\t\tthis.triggerDownload(filename, csv)\n\t}\n\n\tprivate triggerDownload(filename: string, content: string) {\n\t\tconst blob = new Blob([content], { type: 'text/csv;charset=utf-8;' })\n\t\tconst url = URL.createObjectURL(blob)\n\t\tconst a = document.createElement('a')\n\t\ta.href = url\n\t\ta.download = filename\n\t\tdocument.body.appendChild(a)\n\t\ta.click()\n\t\ta.remove()\n\t\tURL.revokeObjectURL(url)\n\t}\n}\n", "import type Settings from './Settings'\nimport { copyMerge } from '#rx'\n\nexport default function wsiViewerDefaults(overrides = {}): Settings {\n\tconst defaults: Settings = {\n\t\tdisplayedImageIndex: 0,\n\t\timageWidth: '47vw',\n\t\timageHeight: '25vw',\n\t\tactiveThumbnailBorderStyle: '2px solid red',\n\t\tnonActiveThumbnailBorderStyle: '2px solid black',\n\t\tthumbnailWidth: '60px',\n\t\tthumbnailHeight: '80px',\n\t\tisChangingImages: false,\n\t\tnumDisplayedThumbnails: 10,\n\t\tthumbnailRangeStart: 0,\n\t\ticonDimensions: 20, //20px\n\t\trenderWSIViewer: true,\n\t\trenderAnnotationTable: false,\n\t\tselectedPatchBorderColor: '#FFA500',\n\t\t/** Border color for annotated patches */\n\t\tannotatedPatchBorderColor: '#D3D3D3',\n\t\ttileSize: 512, // 512px\n\t\tactiveAnnotation: 0,\n\t\tsessionsTileSelection: [],\n\t\tchangeTrigger: 0,\n\t\tisSavingAnnotation: false,\n\t\tanimationTime: 700,\n\t\tanimationDelay: 200,\n\t\tdefaultZoom: 5,\n\t\trenderOnlyFlagged: false,\n\t\trenderSkipped: false,\n\t\tloggedOut: false\n\t}\n\treturn copyMerge(defaults, overrides)\n}\n", "\n const styles = new CSSStyleSheet();\n styles.replaceSync(`.ol-control i {\n cursor: default;\n}\n\n/* Bar style */\n.ol-control.ol-bar {\n left: 50%;\n min-height: 1em;\n min-width: 1em;\n position: absolute;\n top: 0.5em;\n transform: translate(-50%,0);\n -webkit-transform: translate(-50%,0);\n white-space: nowrap;\n}\n\n/* Hide subbar when not inserted in a parent bar */\n.ol-control.ol-toggle .ol-option-bar {\n display: none;\n}\n\n/* Default position for controls */\n.ol-control.ol-bar .ol-bar {\n position: static;\n}\n.ol-control.ol-bar .ol-control {\n position: relative;\n top: auto;\n left:auto;\n right:auto;\n bottom: auto;\n display: inline-block;\n vertical-align: middle;\n background-color: transparent;\n padding: 0;\n margin: 0;\n transform: none;\n -webkit-transform: none;\n}\n.ol-control.ol-bar .ol-bar {\n position: static;\n}\n.ol-control.ol-bar .ol-control button {\n margin:2px 1px;\n outline: none;\n}\n\n/* Positionning */\n.ol-control.ol-bar.ol-left {\n left: 0.5em;\n top: 50%;\n -webkit-transform: translate(0px, -50%);\n transform: translate(0px, -50%);\n}\n.ol-control.ol-bar.ol-left .ol-control {\n display: block;\n}\n\n.ol-control.ol-bar.ol-right {\n left: auto;\n right: 0.5em;\n top: 50%;\n -webkit-transform: translate(0px, -50%);\n transform: translate(0px, -50%);\n}\n.ol-control.ol-bar.ol-right .ol-control {\n display: block;\n}\n\n.ol-control.ol-bar.ol-bottom {\n top: auto;\n bottom: 0.5em;\n}\n\n.ol-control.ol-bar.ol-top.ol-left,\n.ol-control.ol-bar.ol-top.ol-right {\n top: 4.5em;\n -webkit-transform:none;\n transform:none;\n}\n.ol-touch .ol-control.ol-bar.ol-top.ol-left,\n.ol-touch .ol-control.ol-bar.ol-top.ol-right {\n top: 5.5em;\n}\n.ol-control.ol-bar.ol-bottom.ol-left,\n.ol-control.ol-bar.ol-bottom.ol-right {\n top: auto;\n bottom: 0.5em;\n -webkit-transform:none;\n transform:none;\n}\n\n/* Group buttons */\n.ol-control.ol-bar.ol-group {\n margin: 1px 1px 1px 0;\n}\n.ol-control.ol-bar.ol-right .ol-group,\n.ol-control.ol-bar.ol-left .ol-group {\n margin: 1px 1px 0 1px;\n}\n\n.ol-control.ol-bar.ol-group button {\n border-radius:0;\n margin: 0 0 0 1px;\n}\n.ol-control.ol-bar.ol-right.ol-group button,\n.ol-control.ol-bar.ol-left.ol-group button,\n.ol-control.ol-bar.ol-right .ol-group button,\n.ol-control.ol-bar.ol-left .ol-group button {\n margin: 0 0 1px 0;\n}\n.ol-control.ol-bar.ol-group .ol-control:first-child > button {\n border-radius: 5px 0 0 5px;\n}\n.ol-control.ol-bar.ol-group .ol-control:last-child > button {\n border-radius: 0 5px 5px 0;\n}\n.ol-control.ol-bar.ol-left.ol-group .ol-control:first-child > button,\n.ol-control.ol-bar.ol-right.ol-group .ol-control:first-child > button,\n.ol-control.ol-bar.ol-left .ol-group .ol-control:first-child > button,\n.ol-control.ol-bar.ol-right .ol-group .ol-control:first-child > button {\n border-radius: 5px 5px 0 0;\n}\n.ol-control.ol-bar.ol-left.ol-group .ol-control:last-child > button,\n.ol-control.ol-bar.ol-right.ol-group .ol-control:last-child > button,\n.ol-control.ol-bar.ol-left .ol-group .ol-control:last-child > button,\n.ol-control.ol-bar.ol-right .ol-group .ol-control:last-child > button {\n border-radius: 0 0 5px 5px;\n}\n\n/* */\n.ol-control.ol-bar .ol-rotate {\n opacity:1;\n visibility: visible;\n}\n.ol-control.ol-bar .ol-rotate button {\n display: block\n}\n\n/* Active buttons */\n.ol-control.ol-bar .ol-toggle.ol-active > button,\n.ol-control.ol-bar .ol-toggle.ol-active button:hover {\n background-color: #00AAFF;\n color: #fff;\n}\n.ol-control.ol-toggle button:disabled {\n background-color: #ccc;\n}\n\n/* Subbar toolbar */\n.ol-control.ol-bar .ol-control.ol-option-bar {\n display: none;\n position:absolute;\n top:100%;\n left:0;\n margin: 5px 0;\n border-radius: 0;\n background-color: rgba(255,255,255, 0.8);\n /* border: 1px solid rgba(0, 60, 136, 0.5); */\n -webkit-box-shadow: 0 0 0 1px rgba(0, 60, 136, 0.5), 1px 1px 2px rgba(0, 0, 0, 0.5);\n box-shadow: 0 0 0 1px rgba(0, 60, 136, 0.5), 1px 1px 2px rgba(0, 0, 0, 0.5);\n}\n\n.ol-control.ol-bar .ol-option-bar:before {\n content: \"\";\n border: 0.5em solid transparent;\n border-color: transparent transparent rgba(0, 60, 136, 0.5);\n position: absolute;\n bottom: 100%;\n left: 0.3em;\n pointer-events: none;\n}\n\n.ol-control.ol-bar .ol-option-bar .ol-control {\n display: table-cell;\n}\n.ol-control.ol-bar .ol-control .ol-bar\n{\tdisplay: none;\n}\n.ol-control.ol-bar .ol-control.ol-active > .ol-option-bar {\n display: block;\n}\n\n.ol-control.ol-bar .ol-control.ol-collapsed ul {\n display: none;\n}\n\n.ol-control.ol-bar .ol-control.ol-text-button > div:hover,\n.ol-control.ol-bar .ol-control.ol-text-button > div {\n background-color: transparent;\n color: rgba(0, 60, 136, 0.5);\n width: auto;\n min-width: 1.375em;\n margin: 0;\n}\n\n.ol-control.ol-bar .ol-control.ol-text-button {\n font-size:0.9em;\n border-left: 1px solid rgba(0, 60, 136, 0.8);\n border-radius: 0;\n}\n.ol-control.ol-bar .ol-control.ol-text-button:first-child {\n border-left:0;\n}\n.ol-control.ol-bar .ol-control.ol-text-button > div {\n padding: .11em 0.3em;\n font-weight: normal;\n font-size: 1.14em;\n font-family: Arial,Helvetica,sans-serif;\n}\n.ol-control.ol-bar .ol-control.ol-text-button div:hover {\n color: rgba(0, 60, 136, 1);\n}\n\n.ol-control.ol-bar.ol-bottom .ol-option-bar {\n top: auto;\n bottom: 100%;\n}\n.ol-control.ol-bar.ol-bottom .ol-option-bar:before {\n border-color: rgba(0, 60, 136, 0.5) transparent transparent ;\n bottom: auto;\n top: 100%;\n}\n\n.ol-control.ol-bar.ol-left .ol-option-bar {\n left:100%;\n top: 0;\n bottom: auto;\n margin: 0 5px;\n}\n.ol-control.ol-bar.ol-left .ol-option-bar:before {\n border-color: transparent rgba(0, 60, 136, 0.5) transparent transparent;\n bottom: auto;\n right: 100%;\n left: auto;\n top: 0.3em;\n}\n.ol-control.ol-bar.ol-right .ol-option-bar {\n right:100%;\n left:auto;\n top: 0;\n bottom: auto;\n margin: 0 5px;\n}\n.ol-control.ol-bar.ol-right .ol-option-bar:before {\n border-color: transparent transparent transparent rgba(0, 60, 136, 0.5);\n bottom: auto;\n left: 100%;\n top: 0.3em;\n}\n\n.ol-control.ol-bar.ol-left .ol-option-bar .ol-option-bar,\n.ol-control.ol-bar.ol-right .ol-option-bar .ol-option-bar {\n top: 100%;\n bottom: auto;\n left: 0.3em;\n right: auto;\n margin: 5px 0;\n}\n.ol-control.ol-bar.ol-right .ol-option-bar .ol-option-bar {\n right: 0.3em;\n left: auto;\n}\n.ol-control.ol-bar.ol-left .ol-option-bar .ol-option-bar:before,\n.ol-control.ol-bar.ol-right .ol-option-bar .ol-option-bar:before {\n border-color: transparent transparent rgba(0, 60, 136, 0.5);\n bottom: 100%;\n top: auto;\n left: 0.3em;\n right: auto;\n}\n.ol-control.ol-bar.ol-right .ol-option-bar .ol-option-bar:before {\n right: 0.3em;\n left: auto;\n}\n\n.ol-control-title {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n}\n\n.ol-center-position {\n position: absolute;\n bottom: 0;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n background-color: rgba(255,255,255,.8);\n padding: .1em 1em;\n}\n\n.ol-compassctrl {\n display: none;\n top: 1em;\n left: auto;\n right: 1em;\n}\n.ol-compassctrl.ol-visible {\n display: block!important;\n}\n.ol-ext-dialog {\n position: fixed;\n top: -100%;\n left: 0;\n width: 150%;\n height: 100%;\n opacity: 0;\n background-color: rgba(0,0,0,.5);\n z-index: 1000;\n pointer-events: none!important;\n -webkit-transition: opacity .2s, top 0s .2s;\n transition: opacity .2s, top 0s .2s;\n}\n.ol-ext-dialog.ol-visible {\n opacity: 1;\n top: 0;\n pointer-events: all!important;\n -webkit-transition: opacity .2s, top 0s;\n transition: opacity .2s, top 0s;\n}\n\n.ol-viewport .ol-ext-dialog {\n position: absolute;\n}\n.ol-ext-dialog > form > h2 {\n margin: 0 .5em .5em 0;\n display: none;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.ol-ext-dialog > form.ol-title > h2 {\n display: block;\n}\n.ol-ext-dialog > form {\n position: absolute;\n top: 0;\n left: 33.33%;\n min-width: 5em;\n max-width: 60%;\n min-height: 3em;\n max-height: 100%;\n background-color: #fff;\n border: 1px solid #333;\n -webkit-box-shadow: 3px 3px 4px rgba(0,0,0, 0.5);\n box-shadow: 3px 3px 4px rgba(0,0,0, 0.5);\n -webkit-transform: translate(-50%, -30%);\n transform: translate(-50%, -30%);\n -webkit-transition: top .2s, -webkit-transform .2s;\n transition: top .2s, -webkit-transform .2s;\n transition: top .2s, transform .2s;\n transition: top .2s, transform .2s, -webkit-transform .2s;\n padding: 1em;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n overflow-x: hidden;\n overflow-y: auto;\n}\ndialog.ol-ext-dialog > form {\n left: 50%;\n width: -webkit-max-content;\n width: -moz-max-content;\n width: max-content;\n max-width: 90%;\n}\n\n.ol-ext-dialog > form.ol-closebox {\n padding-top: 1.5em;\n}\n.ol-ext-dialog > form.ol-title {\n padding-top: 1em;\n}\n.ol-ext-dialog > form.ol-button {\n padding-bottom: .5em;\n}\n\n.ol-ext-dialog.ol-zoom > form {\n top: 30%;\n -webkit-transform: translate(-50%, -30%) scale(0);\n transform: translate(-50%, -30%) scale(0);\n}\n.ol-ext-dialog.ol-visible > form {\n top: 30%;\n}\n.ol-ext-dialog.ol-zoom.ol-visible > form {\n -webkit-transform: translate(-50%, -30%) scale(1);\n transform: translate(-50%, -30%) scale(1);\n}\n\n.ol-ext-dialog > form .ol-content {\n overflow-x: hidden;\n overflow-y: auto;\n}\n\n.ol-ext-dialog > form .ol-closebox {\n position: absolute;\n top: .5em;\n right: .5em;\n width: 1em;\n height: 1em;\n cursor: pointer;\n display: none;\n}\n.ol-ext-dialog > form.ol-closebox .ol-closebox {\n display: block;\n}\n.ol-ext-dialog > form .ol-closebox:before,\n.ol-ext-dialog > form .ol-closebox:after {\n content: \"\";\n position: absolute;\n background-color: currentColor;\n top: 50%;\n left: 50%;\n width: 1em;\n height: .1em;\n border-radius: .1em;\n -webkit-transform: translate(-50%, -50%) rotate(45deg);\n transform: translate(-50%, -50%) rotate(45deg);\n}\n.ol-ext-dialog > form .ol-closebox:before {\n -webkit-transform: translate(-50%, -50%) rotate(-45deg);\n transform: translate(-50%, -50%) rotate(-45deg);\n}\n\n.ol-ext-dialog > form .ol-buttons {\n text-align: right;\n overflow-x: hidden;\n}\n.ol-ext-dialog > form .ol-buttons input {\n margin-top: .5em;\n padding: .5em;\n background: none;\n border: 0;\n font-size: 1em;\n color: rgba(0,60,136,1);\n cursor: pointer;\n border-radius: .25em;\n} \n.ol-ext-dialog > form .ol-buttons input:hover {\n background-color: rgba(0,60,136,.1);\n}\n.ol-ext-dialog > form .ol-buttons input[type=submit] {\n font-weight: bold;\n}\n\n.ol-ext-dialog .ol-progress-message {\n font-size: .9em;\n text-align: center;\n padding-bottom: .5em;\n}\n.ol-ext-dialog .ol-progress-bar {\n border: 1px solid #369;\n width: 20em;\n height: 1em;\n max-width: 100%;\n padding: 2px;\n margin: .5em auto 0;\n overflow: hidden;\n}\n.ol-ext-dialog .ol-progress-bar > div {\n background: #369;\n height: 100%;\n width: 50%;\n -webkit-transition: width .3s;\n transition: width .3s;\n}\n.ol-ext-dialog .ol-progress-bar > div.notransition {\n -webkit-transition: unset;\n transition: unset;\n}\n\n/* full screen */\n.ol-ext-dialog.ol-fullscreen-dialog form {\n top: 1em;\n -webkit-transform: none;\n transform: none;\n left: 1em;\n bottom: 1em;\n right: 1em;\n max-width: calc(66.6% - 2em);\n text-align: center;\n background: transparent;\n -webkit-box-shadow: none;\n box-shadow: none;\n border: none;\n color: #fff;\n}\n.ol-ext-dialog.ol-fullscreen-dialog form .ol-closebox {\n top: 0;\n right: 0;\n font-size: 2em;\n}\n.ol-ext-dialog.ol-fullscreen-dialog .ol-closebox:before,\n.ol-ext-dialog.ol-fullscreen-dialog .ol-closebox:after {\n border: .1em solid currentColor;\n}\n.ol-ext-dialog.ol-fullscreen-dialog img,\n.ol-ext-dialog.ol-fullscreen-dialog video {\n max-width: 100%;\n}\n\n/* Fullscreen dialog */\nbody > .ol-ext-dialog .ol-content {\n max-height: calc(100vh - 10em);\n}\n\nbody > .ol-ext-dialog > form {\n overflow: visible;\n}\n.ol-editbar .ol-button button {\n position: relative;\n display: inline-block;\n font-style: normal;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n vertical-align: middle;\n}\n.ol-editbar .ol-button button:before, \n.ol-editbar .ol-button button:after {\n content: \"\";\n border-width: 0;\n position: absolute;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n background-color: currentColor;\n}\n.ol-editbar .ol-button button:focus {\n outline: none;\n}\n\n.ol-editbar .ol-selection > button:before {\n width: .6em;\n height: 1em;\n background-color: transparent;\n border: .5em solid currentColor;\n border-width: 0 .25em .65em;\n border-color: currentColor transparent;\n -webkit-box-shadow:0 0.6em 0 -0.23em;\n box-shadow:0 0.6em 0 -0.23em;\n top: .35em;\n left: .5em;\n -webkit-transform: translate(-50%, -50%) rotate(-30deg);\n transform: translate(-50%, -50%) rotate(-30deg);\n}\n.ol-editbar .ol-selection0 > button:after {\n width: .28em;\n height: .6em;\n background-color: transparent;\n border: .5em solid currentColor;\n border-width: 0 .05em .7em;\n border-color: currentColor transparent;\n top: .5em;\n left: .7em;\n -webkit-transform: rotate(-45deg);\n transform: rotate(-45deg);\n}\n\n.ol-editbar .ol-delete button:after,\n.ol-editbar .ol-delete button:before {\n width: 1em;\n height: .2em;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%) rotate(45deg);\n transform: translate(-50%, -50%) rotate(45deg);\n}\n.ol-editbar .ol-delete button:after {\n -webkit-transform: translate(-50%, -50%) rotate(-45deg);\n transform: translate(-50%, -50%) rotate(-45deg);\n}\n\n.ol-editbar .ol-info button:before {\n width: .25em;\n height: .6em;\n border-radius: .03em;\n top: .47em;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n}\n.ol-editbar .ol-info button:after {\n width: .25em;\n height: .2em;\n border-radius: .03em;\n -webkit-box-shadow: -0.1em 0.35em, -0.1em 0.82em, 0.1em 0.82em;\n box-shadow: -0.1em 0.35em, -0.1em 0.82em, 0.1em 0.82em;\n top: .12em;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n}\n\n.ol-editbar .ol-drawpoint button:before {\n width: .7em;\n height: .7em;\n border-radius: 50%;\n border: .15em solid currentColor;\n background-color: transparent;\n top: .2em;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n}\n.ol-editbar .ol-drawpoint button:after {\n width: .4em;\n height: .4em;\n border: .15em solid currentColor;\n border-color: currentColor transparent;\n border-width: .4em .2em 0;\n background-color: transparent;\n top: .8em;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n}\n\n.ol-editbar .ol-drawline > button:before,\n.ol-editbar .ol-drawpolygon > button:before,\n.ol-editbar .ol-drawhole > button:before {\n width: .8em;\n height: .8em;\n border: .13em solid currentColor;\n background-color: transparent;\n border-width: .2em .13em .09em;\n top: .2em;\n left: .25em;\n -webkit-transform: rotate(10deg) perspective(1em) rotateX(40deg);\n transform: rotate(10deg) perspective(1em) rotateX(40deg);\n}\n.ol-editbar .ol-drawline > button:before {\n border-bottom: 0;\n}\n.ol-editbar .ol-drawline > button:after,\n.ol-editbar .ol-drawhole > button:after,\n.ol-editbar .ol-drawpolygon > button:after {\n width: .3em;\n height: .3em;\n top: 0.2em;\n left: .25em;\n -webkit-box-shadow: -0.2em 0.55em, 0.6em 0.1em, 0.65em 0.7em;\n box-shadow: -0.2em 0.55em, 0.6em 0.1em, 0.65em 0.7em;\n}\n.ol-editbar .ol-drawhole > button:after {\n -webkit-box-shadow: -0.2em 0.55em, 0.6em 0.1em, 0.65em 0.7em, 0.25em 0.35em;\n box-shadow: -0.2em 0.55em, 0.6em 0.1em, 0.65em 0.7em, 0.25em 0.35em;\n}\n\n\n.ol-editbar .ol-offset > button i,\n.ol-editbar .ol-transform > button i {\n position: absolute;\n width: .9em;\n height: .9em;\n overflow: hidden;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.ol-editbar .ol-offset > button i{\n width: .8em;\n height: .8em;\n}\n\n.ol-editbar .ol-offset > button i:before,\n.ol-editbar .ol-transform > button i:before,\n.ol-editbar .ol-transform > button i:after {\n content: \"\";\n height: 1em;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%) rotate(45deg);\n transform: translate(-50%, -50%) rotate(45deg);\n -webkit-box-shadow: 0.5em 0 0 0.1em, -0.5em 0 0 0.1em;\n box-shadow: 0.5em 0 0 0.1em, -0.5em 0 0 0.1em;\n width: .1em;\n position: absolute;\n background-color: currentColor;\n}\n.ol-editbar .ol-offset > button i:before{\n -webkit-box-shadow: 0.45em 0 0 0.1em, -0.45em 0 0 0.1em;\n box-shadow: 0.45em 0 0 0.1em, -0.45em 0 0 0.1em;\n}\n.ol-editbar .ol-transform > button i:after {\n -webkit-transform: translate(-50%, -50%) rotate(-45deg);\n transform: translate(-50%, -50%) rotate(-45deg);\n}\n\n.ol-editbar .ol-split > button:before {\n width: .3em;\n height: .3em;\n top: .81em;\n left: .75em;\n border-radius: 50%;\n -webkit-box-shadow: 0.1em -0.4em, -0.15em -0.25em;\n box-shadow: 0.1em -0.4em, -0.15em -0.25em;\n}\n.ol-editbar .ol-split > button:after {\n width: .8em;\n height: .8em;\n top: .15em;\n left: -.1em;\n border: .1em solid currentColor;\n border-width: 0 .2em .2em 0;\n background-color: transparent;\n border-radius: .1em;\n -webkit-transform: rotate(20deg) scaleY(.6) rotate(-45deg);\n transform: rotate(20deg) scaleY(.6) rotate(-45deg);\n}\n\n.ol-editbar .ol-drawregular > button:before {\n width: .9em;\n height: .9em;\n top: 50%;\n left: 50%;\n border: .1em solid currentColor;\n background-color: transparent;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.ol-editbar .ol-drawregular .ol-bar .ol-text-button > div > div > div {\n border: .5em solid currentColor;\n border-color: transparent currentColor;\n display: inline-block;\n cursor: pointer;\n vertical-align: text-bottom;\n}\n.ol-editbar .ol-drawregular .ol-bar:before,\n.ol-control.ol-bar.ol-editbar .ol-drawregular .ol-bar {\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n}\n.ol-editbar .ol-drawregular .ol-bar .ol-text-button {\n min-width: 6em;\n text-align: center;\n}\n.ol-editbar .ol-drawregular .ol-bar .ol-text-button > div > div > div:first-child {\n border-width: .5em .5em .5em 0;\n margin: 0 .5em 0 0;\n}\n.ol-editbar .ol-drawregular .ol-bar .ol-text-button > div > div > div:last-child {\n border-width: .5em 0 .5em .5em;\n margin: 0 0 0 .5em;\n}\n\n.ol-feature-list {\n position: relative;\n}\n.ol-control.ol-feature-list {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n}\n.ol-control.ol-feature-list > button:before {\n content: \"\";\n position: absolute;\n width: 60%;\n height: 50%;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n -webkit-box-shadow: inset 0 2.5px;\n box-shadow: inset 0 2.5px; \n background-image: -webkit-gradient(linear, left top, right top, from(currentColor), to(transparent)); \n background-image: linear-gradient(90deg, currentColor, transparent);\n}\n\n.ol-control.ol-feature-list.ol-collapsed {\n bottom: .5em;\n left: .5em;\n width: auto;\n}\n.ol-feature-list .ol-content {\n background-color: #f4f6f8;\n clear: both;\n}\n.ol-feature-list.ol-collapsed .ol-content > * {\n display: none;\n}\n.ol-feature-list .ol-header {\n position: relative;\n overflow: hidden;\n}\n.ol-feature-list.ol-collapsed .ol-header {\n display: block;\n}\n\n.ol-control.ol-feature-list > button,\n.ol-control.ol-feature-list.ol-collapsed .ol-content {\n display: none;\n}\n.ol-control.ol-feature-list.ol-collapsed > button {\n display: block;\n}\n\n.ol-feature-list .ol-sizer {\n width: 100%;\n height: 1px;\n cursor: row-resize;\n background-color: #ccc;\n position: relative;\n border: 1px solid #f4f6f8;\n border-width: 1px 0;\n}\n.ol-feature-list.ol-bottom .ol-sizer {\n position: absolute;\n bottom: 0;\n}\n.ol-feature-list .ol-sizer:before {\n content: \"\";\n width: 1.5em;\n height: 4px;\n background-color: #ddd;\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n z-index: 1;\n border: 3px solid transparent;\n border-width: 3px 1.5em;\n -webkit-box-shadow: inset 0 -1px #aaa, inset 0 1px #aaa;\n box-shadow: inset 0 -1px #aaa, inset 0 1px #aaa;\n border-radius: 2px;\n}\n.ol-feature-list .ol-sizer:hover:before {\n background-color: #ccc;\n}\n\n.ol-feature-list .ol-content .ol-header p {\n display: inline-block;\n margin: 0.1em .25em;\n vertical-align: middle;\n white-space: nowrap;\n width: calc(100% - 2em);\n text-overflow: ellipsis;\n overflow: hidden;\n}\n.ol-feature-list .ol-content .ol-header .ol-buttons {\n position: absolute;\n right: 0;\n top: 50%;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n}\n\n.ol-feature-list .ol-content .ol-header button {\n position: relative;\n border: 0;\n background: transparent;\n vertical-align: middle;\n width: 1em;\n height: 1em;\n margin: 0 .2em;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.ol-feature-list .ol-content .ol-header button.ol-closebox:before,\n.ol-feature-list .ol-content .ol-header button.ol-closebox:after {\n content: \"\";\n position: absolute;\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%) rotate(45deg);\n transform: translate(-50%, -50%) rotate(45deg);\n background: currentColor;\n width: .1em;\n height: 1em;\n display: block;\n font-style: normal;\n}\n.ol-feature-list .ol-content .ol-header button.ol-closebox:after {\n -webkit-transform: translate(-50%, -50%) rotate(-45deg);\n transform: translate(-50%, -50%) rotate(-45deg);\n}\n\n.ol-feature-list.ol-collapsed .ol-content .ol-header button.ol-closebox {\n border: 1px solid currentColor;\n}\n.ol-feature-list.ol-collapsed .ol-content .ol-header button.ol-closebox:before {\n -webkit-transform: translate(-50%, -50%) rotate(90deg);\n transform: translate(-50%, -50%) rotate(90deg);\n}\n.ol-feature-list.ol-collapsed .ol-content .ol-header button.ol-closebox:after {\n display: none;\n}\n\n.ol-feature-list .ol-scroll-container {\n overflow: auto;\n height: 10em;\n min-height: 3em;\n}\n.ol-feature-list .ol-scroll-container:focus {\n outline: unset;\n}\n\n.ol-feature-list table {\n background-color: #fff;\n border-collapse: collapse;\n white-space: nowrap;\n position: relative;\n}\n.ol-feature-list table thead {\n background-color: #f4f6f8;\n position: -webkit-sticky;\n position: sticky;\n top: 0;\n overflow: hidden;\n}\n/* Fixed height */\n.ol-feature-list table tr {\n height: 1.4em;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.ol-feature-list table tbody tr:hover {\n background-color: #eee;\n cursor: pointer;\n}\n\n.ol-feature-list table tbody tr.ol-selected {\n background-color: #eee;\n}\n\n.ol-feature-list table td {\n border: 0 solid #ddd;\n border-width: 0 0 1px 1px;\n overflow: hidden;\n width: 100px;\n}\n.ol-feature-list table td.number {\n text-align: right;\n}\n.ol-feature-list table td.undefined {\n text-align: center;\n background-color: #fafafa;\n}\n.ol-feature-list table tr:hover td,\n.ol-feature-list table .ol-selected td {\n background-color: transparent;\n}\n.ol-feature-list thead td {\n position: relative;\n}\n.ol-feature-list thead td.sort {\n padding-right: 1.5em;\n}\n\n.ol-feature-list thead td p {\n margin: 0;\n display: inline-block;\n}\n.ol-feature-list table td button {\n position: absolute;\n width: 1.2em;\n height: 1.4em;\n top: 0;\n right: 0;\n margin: .1em 0;\n padding: 0;\n background-color: transparent;\n border: 0;\n}\n.ol-feature-list thead td button.sort:before {\n content: '\u21C5';\n font-style: normal;\n font-weight: normal;\n cursor: pointer;\n font-size: 1em;\n line-height: 1em;\n}\n.ol-feature-list thead td button.sortup:before {\n content: '\u21A7';\n}\n.ol-feature-list thead td button.sortdown:before {\n content: '\u21A5';\n}\n\n.ol-gauge {\n top: 0.5em;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n background-color: rgba(255,255,255,.5);\n padding: 0.1em 0.5em;\n}\n\n.ol-gauge > * {\n display: inline-block;\n vertical-align: middle;\n}\n.ol-gauge > span {\n margin: 0 0.5em 0 0;\n}\n.ol-gauge > div {\n display: inline-block;\n width: 200px;\n border: 1px solid rgba(0,60,136,.5);\n border-radius: 3px;\n padding:1px;\n}\n.ol-gauge button {\n height: 0.8em;\n margin:0;\n max-width:100%;\n}\n\n.ol-control.ol-bookmark {\n top: 0.5em;\n left: 3em;\n background-color: rgba(255,255,255,.5);\n}\n.ol-control.ol-bookmark button {\n position: relative;\n}\n.ol-control.ol-bookmark > button::before {\n content: \"\";\n position: absolute;\n border-width: 10px 5px 4px;\n border-style: solid;\n border-color: currentColor;\n border-bottom-color: transparent;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n height: 0;\n}\n\n\n.ol-control.ol-bookmark > div {\n display: block;\n min-width: 5em;\n}\n.ol-control.ol-bookmark.ol-collapsed > div {\n display: none;\n}\n.ol-control.ol-bookmark input {\n font-size: 0.9em;\n margin: 0 0.5em 0.5em;\n padding: 0 0.5em;\n}\n.ol-control.ol-bookmark ul {\n margin: 0 0 0.5em;\n padding: 0;\n list-style: none;\n min-width: 10em;\n}\n.ol-control.ol-bookmark li {\n color: rgba(0,60,136,0.8);\n font-size: 0.9em;\n padding: 0 0.2em 0 0.5em;\n cursor: default;\n clear:both;\n}\n\n.ol-control.ol-bookmark li:hover {\n background-color: rgba(0,60,136,.5);\n color: #fff;\n}\n\n.ol-control.ol-bookmark > div button {\n width: 1em;\n height: 0.8em;\n float: right;\n background-color: transparent;\n cursor: pointer;\n border-radius: 0;\n}\n.ol-control.ol-bookmark > div button:before {\n content: \"\u0002A2F\";\n color: #936;\n font-size: 1.2em;\n line-height: 1em;\n border-radius: 0;\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n\n.ol-bookmark ul li button,\n.ol-bookmark input {\n display: none;\n}\n.ol-bookmark.ol-editable ul li button,\n.ol-bookmark.ol-editable input {\n display: block;\n}\n\n\n.ol-control.ol-geobt {\n top: auto;\n left: auto;\n right: .5em;\n bottom: 3em;\n}\n.ol-touch .ol-control.ol-geobt {\n bottom: 3.5em;\n}\n.ol-control.ol-geobt button:before {\n content: \"\";\n position: absolute;\n background: transparent;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n border: .16em solid currentColor;\n width: .4em;\n height: .4em;\n border-radius: 50%;\n}\n.ol-control.ol-geobt button:after {\n content: \"\";\n position: absolute;\n width: .2em;\n height: .2em;\n background: transparent;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n -webkit-box-shadow: .42em 0, -.42em 0, 0 .42em, 0 -.42em;\n box-shadow: .42em 0, -.42em 0, 0 .42em, 0 -.42em;\n}\n\n.ol-control.ol-bar.ol-geobar .ol-control {\n\tdisplay: inline-block;\n\tvertical-align: middle;\n}\n\n.ol-control.ol-bar.ol-geobar .ol-bar {\n display: none;\n}\n.ol-bar.ol-geobar.ol-active .ol-bar {\n display: inline-block;\n}\n\n.ol-bar.ol-geobar .geolocBt button:before,\n.ol-bar.ol-geobar .geolocBt button:after {\n content: \"\";\n display: block;\n position: absolute;\n border: 1px solid transparent;\n border-width: 0.3em 0.8em 0 0.2em;\n border-color: currentColor transparent transparent;\n -webkit-transform: rotate(-30deg);\n transform: rotate(-30deg);\n top: .45em;\n left: 0.15em;\n font-size: 1.2em;\n}\n.ol-bar.ol-geobar .geolocBt button:after {\n border-width: 0 0.8em .3em 0.2em;\n border-color: transparent transparent currentColor;\n\t-webkit-transform: rotate(-61deg);\n\ttransform: rotate(-61deg);\n}\n\n.ol-bar.ol-geobar .startBt button:before {\n content: \"\";\n display: block;\n position: absolute;\n width: 1em;\n height: 1em;\n background-color: #800;\n border-radius: 50%;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n}\n.ol-bar.ol-geobar .pauseBt button:before,\n.ol-bar.ol-geobar .pauseBt button:after {\n content: \"\";\n display: block;\n position: absolute;\n width: .25em;\n height: 1em;\n background-color: currentColor;\n top: 50%;\n left: 35%;\n -webkit-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n}\n.ol-bar.ol-geobar .pauseBt button:after {\n left: 65%;\n}\n\n.ol-control.ol-bar.ol-geobar .centerBt,\n.ol-control.ol-bar.ol-geobar .pauseBt,\n.ol-bar.ol-geobar.pauseTrack .startBt,\n.ol-bar.ol-geobar.centerTrack .startBt,\n.ol-bar.ol-geobar.centerTrack.pauseTrack .pauseBt,\n.ol-bar.ol-geobar.centerTrack .pauseBt {\n display: none;\n}\n.ol-bar.ol-geobar.pauseTrack .pauseBt,\n.ol-bar.ol-geobar.centerTrack .centerBt{\n display: inline-block;\n}\n\n.ol-control.ol-globe\n{\tposition: absolute;\n\tleft: 0.5em;\n\tbottom: 0.5em;\n\tborder-radius: 50%;\n\topacity: 0.7;\n\ttransform: scale(0.5);\n\ttransform-origin: 0 100%;\n\t-webkit-transform: scale(0.5);\n\t-webkit-transform-origin: 0 100%;\n}\n.ol-control.ol-globe:hover\n{\topacity: 0.9;\n}\n\n.ol-control.ol-globe .panel\n{\tdisplay:block;\n\twidth:170px;\n\theight:170px;\n\tbackground-color:#fff;\n\tcursor: pointer;\n\tborder-radius: 50%;\n\toverflow: hidden;\n\t-webkit-box-shadow: 0 0 10px 5px rgba(255, 255, 255, 0.5);\n\t box-shadow: 0 0 10px 5px rgba(255, 255, 255, 0.5);\n}\n.ol-control.ol-globe .panel .ol-viewport\n{\tborder-radius: 50%;\n}\n\n.ol-control.ol-globe .ol-pointer\n{\tdisplay: block;\n\tbackground-color: #fff;\n\twidth:10px;\n\theight: 10px;\n\tborder:10px solid red;\n\tposition: absolute;\n\ttop: 50%;\n\tleft:50%;\n\ttransform: translate(-15px, -40px);\n\t-webkit-transform: translate(-15px, -40px);\n\tborder-radius: 50%;\n\tz-index:1;\n\ttransition: opacity 0.15s, top 0s, left 0s;\n\t-webkit-transition: opacity 0.15s, top 0s, left 0s;\n}\n.ol-control.ol-globe .ol-pointer.hidden\n{\topacity:0;\n\ttransition: opacity 0.15s, top 3s, left 5s;\n\t-webkit-transition: opacity 0.15s, top 3s, left 5s;\n}\n\n.ol-control.ol-globe .ol-pointer::before\n{\tborder-radius: 50%;\n\t-webkit-box-shadow: 6px 6px 10px 5px #000;\n\t box-shadow: 6px 6px 10px 5px #000;\n\tcontent: \"\";\n\tdisplay: block;\n\theight: 0;\n\tleft: 0;\n\tposition: absolute;\n\ttop: 23px;\n\twidth: 0;\n}\n.ol-control.ol-globe .ol-pointer::after\n{\tcontent:\"\";\n\twidth:0;\n\theight:0;\n\tdisplay: block;\n\tposition: absolute;\n\tborder-width: 20px 10px 0;\n\tborder-color: red transparent;\n\tborder-style: solid;\n\tleft: -50%;\n\ttop: 100%;\n}\n\n.ol-control.ol-globe .panel::before {\n border-radius: 50%;\n -webkit-box-shadow: -20px -20px 80px 2px rgba(0, 0, 0, 0.7) inset;\n box-shadow: -20px -20px 80px 2px rgba(0, 0, 0, 0.7) inset;\n content: \"\";\n display: block;\n height: 100%;\n left: 0;\n position: absolute;\n top: 0;\n width: 100%;\n z-index: 1;\n}\n.ol-control.ol-globe .panel::after {\n border-radius: 50%;\n -webkit-box-shadow: 0 0 20px 7px rgba(255, 255, 255, 1);\n box-shadow: 0 0 20px 7px rgba(255, 255, 255, 1);\n content: \"\";\n display: block;\n height: 0;\n left: 23%;\n position: absolute;\n top: 20%;\n -webkit-transform: rotate(-40deg);\n transform: rotate(-40deg);\n width: 20%;\n z-index: 1;\n}\n\n\n.ol-control.ol-globe.ol-collapsed .panel\n{\tdisplay:none;\n}\n\n.ol-control-top.ol-globe\n{\tbottom: auto;\n\ttop: 5em;\n\ttransform-origin: 0 0;\n\t-webkit-transform-origin: 0 0;\n}\n.ol-control-right.ol-globe\n{\tleft: auto;\n\tright: 0.5em;\n\ttransform-origin: 100% 100%;\n\t-webkit-transform-origin: 100% 100%;\n}\n.ol-control-right.ol-control-top.ol-globe\n{\tleft: auto;\n\tright: 0.5em;\n\ttransform-origin: 100% 0;\n\t-webkit-transform-origin: 100% 0;\n}\n\n.ol-gridreference\n{\tbackground: #fff;\n\tborder: 1px solid #000;\n\toverflow: auto;\n\tmax-height: 100%;\n\ttop:0;\n\tright:0;\n}\n.ol-gridreference input\n{\twidth:100%;\n}\n.ol-gridreference ul\n{\tmargin:0;\n\tpadding:0;\n\tlist-style: none;\n} \n.ol-gridreference li\n{\tpadding: 0 0.5em;\n\tcursor: pointer;\n}\n.ol-gridreference ul li:hover \n{\tbackground-color: #ccc;\n}\n.ol-gridreference li.ol-title,\n.ol-gridreference li.ol-title:hover\n{\tbackground:rgba(0,60,136,.5);\n\tcolor:#fff;\n\tcursor:default;\n}\n.ol-gridreference ul li .ol-ref\n{\tmargin-left: 0.5em;\n}\n.ol-gridreference ul li .ol-ref:before\n{\tcontent:\"(\";\n}\n.ol-gridreference ul li .ol-ref:after\n{\tcontent:\")\";\n}\n\n.ol-control.ol-imageline {\n bottom:0;\n left: 0;\n right: 0;\n padding: 0;\n overflow: visible;\n -webkit-transition: .3s;\n transition: .3s;\n border-radius: 0;\n}\n.ol-control.ol-imageline.ol-collapsed {\n -webkit-transform: translateY(100%);\n transform: translateY(100%);\n}\n.ol-imageline > div {\n height: 4em;\n position: relative;\n white-space: nowrap;\n scroll-behavior: smooth;\n overflow: hidden;\n width: 100%;\n}\n.ol-imageline > div.ol-move {\n scroll-behavior: unset;\n}\n\n.ol-control.ol-imageline button {\n position: absolute;\n top: -1em;\n -webkit-transform: translateY(-100%);\n transform: translateY(-100%);\n margin: .65em;\n -webkit-box-shadow: 0 0 0 0.15em rgba(255,255,255,.4);\n box-shadow: 0 0 0 0.15em rgba(255,255,255,.4);\n}\n.ol-control.ol-imageline button:before {\n content: '';\n position: absolute;\n -webkit-transform: translate(-50%, -50%) rotate(135deg);\n transform: translate(-50%, -50%) rotate(135deg);\n top: 40%;\n left: 50%;\n width: .4em;\n height: .4em;\n border: .1em solid currentColor;\n border-width: .15em .15em 0 0;\n}\n.ol-control.ol-imageline.ol-collapsed button:before {\n top: 60%;\n -webkit-transform: translate(-50%, -50%) rotate(-45deg);\n transform: translate(-50%, -50%) rotate(-45deg);\n}\n\n.ol-imageline,\n.ol-imageline:hover {\n background-color: rgba(0,0,0,.75);\n}\n\n.ol-imageline.ol-arrow:after,\n.ol-imageline.ol-arrow:before {\n content: \"\";\n position: absolute;\n top: 50%;\n left: .2em;\n border-color: #fff #000;\n border-width: 1em .6em 1em 0;\n border-style: solid;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n z-index: 1;\n opacity: .8;\n pointer-events: none;\n -webkit-box-shadow: -0.6em 0 0 1em #fff;\n box-shadow: -0.6em 0 0 1em #fff;\n}\n.ol-imageline.ol-arrow:after {\n border-width: 1em 0 1em .6em;\n left: auto;\n right: .2em;\n -webkit-box-shadow: 0.6em 0 0 1em #fff;\n box-shadow: 0.6em 0 0 1em #fff;\n}\n.ol-imageline.ol-scroll0.ol-arrow:before {\n display: none;\n}\n.ol-imageline.ol-scroll1.ol-arrow:after {\n display: none;\n}\n\n\n.ol-imageline .ol-image {\n position: relative;\n height: 100%;\n display: inline-block;\n cursor: pointer;\n}\n.ol-imageline img {\n max-height: 100%;\n border: .25em solid transparent;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n opacity: 0;\n -webkit-transition: 1s;\n transition: 1s;\n}\n.ol-imageline img.ol-loaded {\n opacity:1;\n}\n\n.ol-imageline .ol-image.select {\n background-color: #fff;\n}\n.ol-imageline .ol-image span {\n position: absolute;\n width: 125%;\n max-height: 2.4em;\n left: 50%;\n bottom: 0;\n display: none;\n color: #fff;\n background-color: rgba(0,0,0,.5);\n font-size: .8em;\n overflow: hidden;\n white-space: normal;\n text-align: center;\n line-height: 1.2em;\n -webkit-transform: translateX(-50%) scaleX(.8);\n transform: translateX(-50%) scaleX(.8);\n}\n/*\n.ol-imageline .ol-image.select span,\n*/\n.ol-imageline .ol-image:hover span {\n display: block;\n}\n\n.ol-control.ol-routing.ol-isochrone .ol-method-time,\n.ol-control.ol-routing.ol-isochrone .ol-method-distance,\n.ol-control.ol-routing.ol-isochrone > button {\n position: relative;\n}\n.ol-control.ol-routing.ol-isochrone .ol-method-time:before,\n.ol-control.ol-routing.ol-isochrone > button:before {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n border: .1em solid currentColor;\n width: .8em;\n height: .8em;\n border-radius: 50%;\n -webkit-box-shadow: 0 -0.5em 0 -0.35em, 0.4em -0.35em 0 -0.35em;\n box-shadow: 0 -0.5em 0 -0.35em, 0.4em -0.35em 0 -0.35em;\n clip: unset;\n}\n.ol-control.ol-routing.ol-isochrone .ol-method-time:after,\n.ol-control.ol-routing.ol-isochrone > button:after {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%) rotate(-60deg);\n transform: translate(-50%, -50%) rotate(-60deg);\n border-radius: 50%;\n border: .3em solid transparent;\n border-right-color: currentColor;\n -webkit-box-shadow: none;\n box-shadow: none;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n clip: unset;\n}\n\n.ol-control.ol-routing.ol-isochrone .ol-method-distance:before {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%) rotate(-30deg);\n transform: translate(-50%, -50%) rotate(-30deg);\n width: 1em;\n height: .5em;\n border: .1em solid currentColor;\n -webkit-box-sizing: border-box;\n box-sizing: border-box\n}\n.ol-control.ol-routing.ol-isochrone .ol-method-distance:after {\n content: '';\n position: absolute;\n width: .1em;\n height: .15em;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%) rotate(-30deg);\n transform: translate(-50%, -50%) rotate(-30deg);\n -webkit-box-shadow: inset 0 -0.15em, 0 0.1em, 0.25em 0.1em, -0.25em 0.1em;\n box-shadow: inset 0 -0.15em, 0 0.1em, 0.25em 0.1em, -0.25em 0.1em;\n}\n\n.ol-control.ol-routing.ol-isochrone .ol-direction-direct:before,\n.ol-control.ol-routing.ol-isochrone .ol-direction-reverse:before {\n content: '';\n position: absolute;\n top: 50%;\n left: 30%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n width: .3em;\n height: .3em;\n border-radius: 50%;\n border: .1em solid currentColor;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n -webkit-box-shadow: 0.25em 0 0 -0.05em;\n box-shadow: 0.25em 0 0 -0.05em;\n}\n.ol-control.ol-routing.ol-isochrone .ol-direction-direct:after,\n.ol-control.ol-routing.ol-isochrone .ol-direction-reverse:after {\n content: '';\n position: absolute;\n top: 50%;\n left: 70%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n border: .4em solid transparent;\n border-width: .4em 0 .4em .4em;\n border-color: transparent currentColor;\n}\n.ol-control.ol-routing.ol-isochrone .ol-direction-reverse:after {\n border-width: .4em .4em .4em 0;\n}\n\n.ol-control.ol-isochrone.ol-collapsed .content {\n display: none;\n}\n.ol-control.ol-isochrone input[type=\"number\"] {\n width: 3em;\n text-align: right;\n margin: 0 .1em;\n}\n.ol-control.ol-isochrone .ol-distance input[type=\"number\"] {\n width: 5em;\n}\n\n.ol-isochrone .ol-time,\n.ol-isochrone .ol-distance {\n display: none;\n}\n.ol-isochrone .ol-time.selected,\n.ol-isochrone .ol-distance.selected {\n display: block;\n}\n\n.ol-control.ol-layerswitcher-popup {\n position: absolute;\n right: 0.5em;\n text-align: left;\n top: 3em;\n}\n.ol-control.ol-layerswitcher-popup .panel {\n clear:both;\n background:#fff;\n}\n\n.ol-layerswitcher-popup .panel {\n list-style: none;\n padding: 0.25em;\n margin:0;\n overflow: hidden;\n}\n\n.ol-layerswitcher-popup .panel ul {\n list-style: none;\n padding: 0 0 0 20px;\n overflow: hidden;\n}\n\n.ol-layerswitcher-popup.ol-collapsed .panel {\n display:none;\n}\n.ol-layerswitcher-popup.ol-forceopen .panel {\n display:block;\n}\n\n.ol-layerswitcher-popup button {\n background-color: white;\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAACE1BMVEX///8A//8AgICA//8AVVVAQID///8rVVVJtttgv98nTmJ2xNgkW1ttyNsmWWZmzNZYxM4gWGgeU2JmzNNr0N1Rwc0eU2VXxdEhV2JqytQeVmMhVmNoydUfVGUgVGQfVGQfVmVqy9hqy9dWw9AfVWRpydVry9YhVmMgVGNUw9BrytchVWRexdGw294gVWQgVmUhVWPd4N6HoaZsy9cfVmQgVGRrytZsy9cgVWQgVWMgVWRsy9YfVWNsy9YgVWVty9YgVWVry9UgVWRsy9Zsy9UfVWRsy9YgVWVty9YgVWRty9Vsy9aM09sgVWRTws/AzM0gVWRtzNYgVWRuy9Zsy9cgVWRGcHxty9bb5ORbxdEgVWRty9bn6OZTws9mydRfxtLX3Nva5eRix9NFcXxOd4JPeINQeIMiVmVUws9Vws9Vw9BXw9BYxNBaxNBbxNBcxdJexdElWWgmWmhjyNRlx9IqXGtoipNpytVqytVryNNrytZsjZUuX210k5t1y9R2zNR3y9V4lp57zth9zdaAnKOGoaeK0NiNpquV09mesrag1tuitbmj1tuj19uktrqr2d2svcCu2d2xwMO63N+7x8nA3uDC3uDFz9DK4eHL4eLN4eIyYnDX5OM5Z3Tb397e4uDf4uHf5uXi5ePi5+Xj5+Xk5+Xm5+Xm6OY6aHXQ19fT4+NfhI1Ww89gx9Nhx9Nsy9ZWw9Dpj2abAAAAWnRSTlMAAQICAwQEBgcIDQ0ODhQZGiAiIyYpKywvNTs+QklPUlNUWWJjaGt0dnd+hIWFh4mNjZCSm6CpsbW2t7nDzNDT1dje5efr7PHy9PT29/j4+Pn5+vr8/f39/f6DPtKwAAABTklEQVR4Xr3QVWPbMBSAUTVFZmZmhhSXMjNvkhwqMzMzMzPDeD+xASvObKePPa+ffHVl8PlsnE0+qPpBuQjVJjno6pZpSKXYl7/bZyFaQxhf98hHDKEppwdWIW1frFnrxSOWHFfWesSEWC6R/P4zOFrix3TzDFLlXRTR8c0fEEJ1/itpo7SVO9Jdr1DVxZ0USyjZsEY5vZfiiAC0UoTGOrm9PZLuRl8X+Dq1HQtoFbJZbv61i+Poblh/97TC7n0neCcK0ETNUrz1/xPHf+DNAW9Ac6t8O8WH3Vp98f5lCaYKAOFZMLyHL4Y0fe319idMNgMMp+zWVSybUed/+/h7I4wRAG1W6XDy4XmjR9HnzvDRZXUAYDFOhC1S/Hh+fIXxen+eO+AKqbs+wAo30zDTDvDxKoJN88sjUzDFAvBzEUGFsnADoIvAJzoh2BZ8sner+Ke/vwECuQAAAABJRU5ErkJggg==\");\n background-position: center;\n background-repeat: no-repeat;\n float: right;\n height: 38px;\n width: 38px;\n}\n\n.ol-layerswitcher-popup li {\n color:#369;\n padding:0.25em 1em;\n font-family:\"Trebuchet MS\",Helvetica,sans-serif;\n cursor:pointer;\n}\n.ol-layerswitcher-popup li.ol-header {\n display: none;\n}\n.ol-layerswitcher-popup li.select,\n.ol-layerswitcher-popup li.ol-visible {\n background:rgba(0, 60, 136, 0.7);\n color:#fff;\n}\n.ol-layerswitcher-popup li:hover {\n background:rgba(0, 60, 136, 0.9);\n color:#fff;\n}\n\n.ol-control.ol-layerswitcher.ol-layer-shop {\n height: calc(100% - 4em);\n max-height: unset;\n max-width: 16em;\n background-color: transparent;\n pointer-events: none!important;\n overflow: visible;\n}\n.ol-control.ol-layerswitcher > * {\n pointer-events: auto;\n}\n\n.ol-control.ol-layer-shop > button,\n.ol-control.ol-layer-shop .panel-container {\n -webkit-box-shadow: 0 0 0 3px rgba(255,255,255,.5);\n box-shadow: 0 0 0 3px rgba(255,255,255,.5);\n}\n.ol-control.ol-layerswitcher.ol-layer-shop .panel-container {\n overflow-y: scroll;\n max-height: calc(100% - 6.5em);\n border: 2px solid #369;\n border-width: 2px 0;\n padding: 0;\n}\n.ol-control.ol-layer-shop .panel {\n padding: 0;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n margin: .25em .5em;\n}\n.ol-control.ol-layerswitcher.ol-layer-shop .panel-container.ol-scrolldiv {\n overflow: hidden;\n}\n.ol-control.ol-layer-shop .ol-scroll {\n background-color: rgba(0,0,0,.3);\n opacity: .5;\n}\n.ol-layerswitcher.ol-layer-shop ul.panel li.ol-header {\n display: none;\n}\n.ol-layerswitcher.ol-layer-shop ul.panel li {\n margin-right: 0;\n padding-right: 0;\n}\n.ol-layerswitcher.ol-layer-shop .layerup {\n height: 1.5em;\n width: 1.4em;\n margin: 0;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n border-radius: 3px;\n background-color: transparent;\n color: rgba(0,60,136,1);\n}\n.ol-layerswitcher.ol-layer-shop .layerup:hover {\n background-color: rgba(0,60,136,.3);\n}\n.ol-layerswitcher.ol-layer-shop .layerup:before {\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n border: 0;\n background-color: currentColor;\n width: 1em;\n height: 2px;\n -webkit-box-shadow: 0 -4px, 0 4px;\n box-shadow: 0 -4px, 0 4px;\n}\n.ol-layerswitcher.ol-layer-shop .layerup:after {\n content: unset;\n}\n\n.ol-control.ol-layer-shop .ol-title-bar {\n background-color: rgba(255,255,255,.5);\n font-size: .9em;\n height: calc(2.8em - 4px);\n max-width: 14.6em;\n padding: .7em .5em;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-align: right;\n -webkit-transform: scaleY(1.1);\n transform: scaleY(1.1);\n -webkit-transition: width 0s, -webkit-transform .1s;\n transition: width 0s, -webkit-transform .1s;\n transition: transform .1s, width 0s;\n transition: transform .1s, width 0s, -webkit-transform .1s;\n -webkit-transform-origin: 100% 0;\n transform-origin: 100% 0;\n}\n.ol-control.ol-layer-shop:hover .ol-title-bar {\n background-color: rgba(255,255,255,.7);\n}\n.ol-control.ol-layer-shop.ol-collapsed .ol-title-bar {\n max-width: 10em;\n -webkit-transform: scale(.9, 1.1);\n transform: scale(.9, 1.1);\n}\n.ol-control.ol-layer-shop.ol-forceopen .ol-title-bar {\n max-width: 14.6em;\n -webkit-transform: scaleY(1.1);\n transform: scaleY(1.1);\n}\n\n.ol-control.ol-layer-shop .ol-bar {\n position: relative;\n height: 1.75em;\n clear: both;\n -webkit-box-shadow: 0 0 0 3px rgba(255,255,255,.5);\n box-shadow: 0 0 0 3px rgba(255,255,255,.5);\n background-color: #fff;\n text-align: right;\n z-index: 10;\n}\n.ol-control.ol-layer-shop.ol-collapsed .ol-scroll,\n.ol-control.ol-layer-shop.ol-collapsed .ol-bar {\n border-width: 2px 0 0;\n display: none;\n}\n.ol-control.ol-layer-shop.ol-forceopen .ol-scroll,\n.ol-control.ol-layer-shop.ol-forceopen .ol-bar {\n display: block;\n}\n.ol-control.ol-layer-shop .ol-bar > * {\n font-size: .9em;\n display: inline-block;\n vertical-align: middle;\n margin-top: .25em;\n background-color: transparent;\n}\n\n.ol-layer-shop .ol-bar .ol-button,\n.ol-touch .ol-layer-shop .ol-bar .ol-button {\n position: relative;\n top: unset;\n left: unset;\n bottom: unset;\n right: unset;\n margin: 0;\n}\n.ol-layer-shop .ol-bar button {\n background-color: #fff;\n color: rgba(0,60,136,1)\n}\n.ol-layer-shop .ol-bar button:hover {\n background-color: rgba(0,60,136,.2);\n}\n\n/* Touch device */\n.ol-touch .ol-layerswitcher.ol-layer-shop > button {\n font-size: 1.7em;\n}\n.ol-touch .ol-layer-shop .ol-bar {\n height: 2em;\n}\n.ol-touch .ol-layer-shop .ol-control button {\n font-size: 1.4em;\n}\n.ol-touch .ol-control.ol-layer-shop .panel {\n max-height: calc(100% - 7em);\n}\n.ol-touch .ol-control.ol-layer-shop .panel label {\n height: 1.8em;\n}\n.ol-touch .ol-control.ol-layer-shop .panel label span {\n margin-left: .5em;\n padding-top: .25em;\n}\n.ol-touch .ol-control.ol-layer-shop .panel label:before,\n.ol-touch .ol-control.ol-layer-shop .panel label:after {\n font-size: 1.3em;\n z-index: 1;\n}\n\n.ol-control.ol-layerswitcher {\n position: absolute;\n right: 0.5em;\n text-align: left;\n top: 3em;\n max-height: calc(100% - 6em);\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n overflow: hidden;\n}\n.ol-control.ol-layerswitcher .ol-switchertopdiv,\n.ol-control.ol-layerswitcher .ol-switcherbottomdiv {\n display: block\n}\n.ol-control.ol-layerswitcher.ol-collapsed .ol-switchertopdiv,\n.ol-control.ol-layerswitcher.ol-collapsed .ol-switcherbottomdiv {\n display: none;\n}\n.ol-layerswitcher.ol-forceopen.ol-collapsed .ol-switchertopdiv,\n.ol-layerswitcher.ol-forceopen.ol-collapsed .ol-switcherbottomdiv {\n display: block;\n}\n\n.ol-control.ol-layerswitcher .ol-switchertopdiv,\n.ol-control.ol-layerswitcher .ol-switcherbottomdiv {\n position: absolute;\n top:0;\n left:0;\n right:0;\n height: 45px;\n background: #fff; \n z-index:2;\n opacity:1;\n cursor: pointer;\n border-top:2px solid transparent;\n border-bottom:2px solid #369;\n margin:0 2px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.ol-control.ol-layerswitcher .ol-switcherbottomdiv {\n top: auto;\n bottom: 0;\n height: 2em;\n border-top:2px solid #369;\n border-bottom:2px solid transparent;\n}\n.ol-control.ol-layerswitcher .ol-switchertopdiv:before,\n.ol-control.ol-layerswitcher .ol-switcherbottomdiv:before {\n content:\"\";\n position: absolute;\n left:50%;\n top:50%;\n border:10px solid transparent;\n width:0;\n height:0;\n transform: translate(-50%, -50%);\n -webkit-transform: translate(-50%, -50%);\n opacity:0.8;\n}\n\n.ol-control.ol-layerswitcher .ol-switchertopdiv:hover:before,\n.ol-control.ol-layerswitcher .ol-switcherbottomdiv:hover:before {\n opacity:1;\n}\n.ol-control.ol-layerswitcher .ol-switchertopdiv:before {\n border-bottom-color: #369;\n border-top: 0;\n}\n.ol-control.ol-layerswitcher .ol-switcherbottomdiv:before {\n border-top-color: #369;\n border-bottom: 0;\n}\n\n.ol-control.ol-layerswitcher .panel-container {\n background-color: #fff;\n border-radius: 0 0 2px 2px;\n clear: both;\n display: block; /* display:block to show panel on over */\n padding: 0.5em 0.5em 0;\n}\n\n.ol-layerswitcher .panel {\n list-style: none;\n padding: 0;\n margin: 0;\n overflow: hidden;\n font-family: Tahoma,Geneva,sans-serif;\n font-size:0.9em;\n -webkit-transition: top 0.3s;\n transition: top 0.3s;\n position: relative;\n top:0;\n}\n\n.ol-layerswitcher .panel ul {\n list-style: none;\n padding: 0 0 0 20px;\n overflow: hidden;\n clear: both;\n}\n\n/** Customize checkbox\n*/\n.ol-layerswitcher input[type=\"radio\"],\n.ol-layerswitcher input[type=\"checkbox\"] {\n width: 0;\n height: 0;\n opacity: 0;\n position: absolute;\n}\n\n.ol-layerswitcher .panel li {\n -weblit-transition: -webkit-transform 0.2s linear;\n -webkit-transition: -webkit-transform 0.2s linear;\n transition: -webkit-transform 0.2s linear;\n transition: transform 0.2s linear;\n transition: transform 0.2s linear, -webkit-transform 0.2s linear;\n clear: both;\n display: block;\n border:1px solid transparent;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.ol-layerswitcher .panel li.ol-layer-select {\n background-color: rgba(0,60,136,.2);\n margin: 0 -.5em;\n padding: 0 .5em\n}\n/* drag and drop */\n.ol-layerswitcher .panel li.drag {\n opacity: 0.5;\n transform:scale(0.8);\n -webkit-transform:scale(0.8);\n}\n.ol-dragover {\n background:rgba(51,102,153,0.5);\n opacity:0.8;\n}\n.ol-layerswitcher .panel li.forbidden,\n.forbidden .ol-layerswitcher-buttons div,\n.forbidden .layerswitcher-opacity div {\n background:rgba(255,0,0,0.5);\n color:#f00!important;\n}\n\n/* cursor management */\n.ol-layerswitcher.drag,\n.ol-layerswitcher.drag * {\n cursor:not-allowed!important;\n cursor:no-drop!important;\n}\n.ol-layerswitcher.drag .panel li.dropover,\n.ol-layerswitcher.drag .panel li.dropover * {\n cursor: pointer!important;\n cursor: n-resize!important;\n cursor: ns-resize!important;\n cursor: -webkit-grab!important;\n cursor: grab!important;\n cursor: -webkit-grabbing!important;\n cursor: grabbing!important;\n}\n\n.ol-layerswitcher .panel li.dropover {\n background: rgba(51, 102, 153, 0.5);\n}\n\n.ol-layerswitcher .panel li label {\n display: inline-block;\n height: 1.4em;\n max-width: 12em;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n padding: 0 0 0 1.7em;\n position: relative;\n}\n\n.ol-layerswitcher .panel li label span {\n display: inline-block;\n width: 100%;\n height: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n padding-right: .2em;\n}\n.ol-layerswitcher [type=\"radio\"] + label:before,\n.ol-layerswitcher [type=\"checkbox\"] + label:before,\n.ol-layerswitcher [type=\"radio\"]:checked + label:after,\n.ol-layerswitcher [type=\"checkbox\"]:checked + label:after {\n content: '';\n position: absolute;\n left: 0.1em; top: 0.1em;\n width: 1.2em; height: 1.2em; \n border: 2px solid #369;\n background: #fff;\n -webkit-box-sizing:border-box;\n box-sizing:border-box;\n}\n\n.ol-layerswitcher li:has(> div.li-content > .ol-visibility:focus) {\n border-color: #369;\n -webkit-box-shadow: inset 0 0 0 1px #369;\n box-shadow: inset 0 0 0 1px #369;\n}\n\n.ol-layerswitcher [type=\"radio\"] + label:before,\n.ol-layerswitcher [type=\"radio\"] + label:after {\n border-radius: 50%;\n}\n\n.ol-layerswitcher [type=\"radio\"]:checked + label:after {\n background: #369 none repeat scroll 0 0;\n margin: 0.3em;\n width: 0.6em;\n height: 0.6em;\n}\n\n.ol-layerswitcher [type=\"checkbox\"]:checked + label:after {\n background: transparent;\n border-width: 0 3px 3px 0;\n border-style: solid;\n border-color: #369;\n width: 0.7em;\n height: 1em;\n -webkit-transform: rotate(45deg);\n transform: rotate(45deg);\n left: 0.55em;\n top: -0.05em;\n -webkit-box-shadow: 1px 0px 1px 1px #fff;\n box-shadow: 1px 0px 1px 1px #fff;\n}\n\n.ol-layerswitcher .panel li.ol-layer-hidden {\n opacity: 0.6;\n}\n\n.ol-layerswitcher.ol-collapsed .panel-container {\n display:none;\n}\n.ol-layerswitcher.ol-forceopen .panel-container {\n display:block;\n}\n\n.ol-control.ol-layerswitcher .ol-counter {\n display: none;\n position: absolute;\n right: 0.3em;\n top: 0;\n z-index: 22;\n line-height: 1.5em;\n text-align: left;\n font-size: 0.65em;\n}\n.ol-control.ol-layerswitcher.ol-counter .ol-counter {\n display: block;\n}\n.ol-control.ol-layer-shop .ol-counter {\n -webkit-transform: translate(50%, -50%);\n transform: translate(50%, -50%);\n background: #fff;\n line-height: 1.5em;\n width: 1.5em;\n text-align: center;\n border-radius: 50%;\n -webkit-box-shadow: 0.5px 0.5px 2px currentColor;\n box-shadow: 0.5px 0.5px 2px currentColor;\n}\n\n.ol-layerswitcher-image > button,\n.ol-layerswitcher > button {\n background-color: white;\n float: right;\n z-index: 10;\n position: relative;\n font-size: 1.7em;\n}\n.ol-touch .ol-layerswitcher-image > button,\n.ol-touch .ol-layerswitcher > button {\n font-size: 2.5em;\n}\n.ol-layerswitcher-image > button:before,\n.ol-layerswitcher-image > button:after,\n.ol-layerswitcher > button:before,\n.ol-layerswitcher > button:after {\n content: \"\";\n position:absolute;\n width: .75em;\n height: .75em;\n border-radius: 0.15em;\n -webkit-transform: scaleY(.8) rotate(45deg);\n transform: scaleY(.8) rotate(45deg);\n}\n.ol-layerswitcher-image > button:before,\n.ol-layerswitcher > button:before {\n background: #e2e4e1;\n top: .32em;\n left: .34em;\n -webkit-box-shadow: 0.1em 0.1em #325158;\n box-shadow: 0.1em 0.1em #325158;\n}\n.ol-layerswitcher-image > button:after,\n.ol-layerswitcher > button:after {\n top: .22em;\n left: .34em;\n background: #83bcc5;\n background-image: radial-gradient( circle at .85em .6em, #70b3be 0, #70b3be .65em, #83bcc5 .65em);\n}\n.ol-layerswitcher-buttons {\n display:block;\n float: right;\n text-align:right;\n}\n.ol-layerswitcher-buttons > div {\n display: inline-block;\n position: relative;\n cursor: pointer;\n height:1em;\n width:1em;\n margin:2px;\n line-height: 1em;\n text-align: center;\n background: #369;\n vertical-align: middle;\n color: #fff;\n}\n\n.ol-layerswitcher .panel li > div {\n display: inline-block;\n position: relative;\n}\n\n/* line break */\n.ol-layerswitcher .ol-separator {\n display:block;\n width:0;\n height:0;\n padding:0;\n margin:0;\n}\n\n.ol-layerswitcher .layerup {\n float: right;\n height:2.5em;\n background-color: #369;\n opacity: 0.5;\n cursor: move;\n cursor: ns-resize;\n}\n\n.ol-layerswitcher .layerup:before,\n.ol-layerswitcher .layerup:after {\n border-color: #fff transparent;\n border-style: solid;\n border-width: 0.4em 0.4em 0;\n content: \"\";\n height: 0;\n position: absolute;\n bottom: 3px;\n left: 0.1em;\n width: 0;\n}\n.ol-layerswitcher .layerup:after {\n border-width: 0 0.4em 0.4em;\n top:3px;\n bottom: auto;\n}\n\n.ol-layerswitcher .layerInfo {\n background: #369;\n border-radius: 100%;\n}\n.ol-layerswitcher .layerInfo:before {\n color: #fff;\n content: \"i\";\n display: block;\n font-size: 0.8em;\n font-weight: bold;\n text-align: center;\n width: 1.25em;\n position:absolute;\n left: 0;\n top: 0;\n}\n\n.ol-layerswitcher .layerTrash {\n background: #369;\n}\n.ol-layerswitcher .layerTrash:before {\n color: #fff;\n content: \"\u0000d7\";\n font-size:1em;\n top: 50%;\n left: 0;\n right: 0;\n text-align: center;\n line-height: 1em;\n margin: -0.5em 0;\n position: absolute;\n}\n\n.ol-layerswitcher .layerExtent {\n background: #369;\n}\n.ol-layerswitcher .layerExtent:before {\n border-right: 1px solid #fff;\n border-bottom: 1px solid #fff;\n content: \"\";\n display: block;\n position: absolute;\n left: 6px;\n right: 2px;\n top: 6px;\n bottom: 3px;\n}\n.ol-layerswitcher .layerExtent:after {\n border-left: 1px solid #fff;\n border-top: 1px solid #fff;\n content: \"\";\n display: block;\n position: absolute;\n bottom: 6px;\n left: 2px;\n right: 6px;\n top: 3px;\n}\n\n.ol-layerswitcher .expend-layers,\n.ol-layerswitcher .collapse-layers {\n margin: 0 2px;\n background-color: transparent;\n}\n.ol-layerswitcher .expend-layers:before,\n.ol-layerswitcher .collapse-layers:before {\n content:\"\";\n position:absolute;\n top:50%;\n left:0;\n margin-top:-2px;\n height:4px;\n width:100%;\n background:#369;\n}\n.ol-layerswitcher .expend-layers:after {\n content:\"\";\n position:absolute;\n left:50%;\n top:0;\n margin-left:-2px;\n width:4px;\n height:100%;\n background:#369;\n}\n/*\n.ol-layerswitcher .collapse-layers:before {\n content:\"\";\n position:absolute;\n border:0.5em solid #369;\n border-color: #369 transparent transparent;\n margin-top:0.25em;\n}\n.ol-layerswitcher .expend-layers:before {\n content:\"\";\n position:absolute;\n border:0.5em solid #369;\n border-color: transparent transparent transparent #369 ;\n margin-left:0.25em;\n}\n*/\n\n.ol-layerswitcher .layerswitcher-opacity {\n position:relative;\n border: 1px solid #369;\n height: 3px;\n width: 120px;\n margin:5px 1em 10px 7px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n border-radius: 3px;\n background: #69c;\n background: -webkit-gradient(linear, left top, right top, from(rgba(0,60,136,0)), to(rgba(0,60,136,0.6)));\n background: linear-gradient(to right, rgba(0,60,136,0), rgba(0,60,136,0.6));\n cursor: pointer;\n -webkit-box-shadow: 1px 1px 1px rgba(0,0,0,0.5);\n box-shadow: 1px 1px 1px rgba(0,0,0,0.5);\n}\n\n.ol-layerswitcher .layerswitcher-opacity .layerswitcher-opacity-cursor,\n.ol-layerswitcher .layerswitcher-opacity .layerswitcher-opacity-cursor:before {\n position: absolute;\n width: 20px;\n height: 20px;\n top: 50%;\n left: 50%;\n background: rgba(0,60,136,0.5);\n border-radius: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n z-index: 1;\n}\n.ol-layerswitcher .layerswitcher-opacity .layerswitcher-opacity-cursor:before {\n content: \"\";\n position: absolute;\n width: 50%;\n height: 50%;\n}\n.ol-touch .ol-layerswitcher .layerswitcher-opacity .layerswitcher-opacity-cursor {\n width: 26px;\n height: 26px;\n}\n\n.ol-layerswitcher .layerswitcher-opacity-label { \n display:none;\n position: absolute;\n right: -2.5em;\n bottom: 5px;\n font-size: 0.8em;\n}\n.ol-layerswitcher .layerswitcher-opacity-label::after {\n content:\"%\";\n}\n\n.ol-layerswitcher .layerswitcher-progress {\n display:block;\n margin:-4px 1em 2px 7px;\n width: 120px;\n}\n.ol-layerswitcher .layerswitcher-progress div {\n background-color: #369;\n height:2px;\n display:block;\n width:0;\n}\n\n.ol-control.ol-layerswitcher-image {\n position: absolute;\n right: 0.5em;\n text-align: left;\n top: 1em;\n transition: all 0.2s ease 0s;\n -webkit-transition: all 0.2s ease 0s;\n}\n.ol-control.ol-layerswitcher-image.ol-collapsed {\n top:3em;\n -webkit-transition: none;\n transition: none;\n}\n\n.ol-layerswitcher-image .panel {\n list-style: none;\n padding: 0.25em;\n margin:0;\n overflow: hidden;\n}\n\n.ol-layerswitcher-image .panel ul {\n list-style: none;\n padding: 0 0 0 20px;\n overflow: hidden;\n}\n\n.ol-layerswitcher-image.ol-collapsed .panel {\n display:none;\n}\n.ol-layerswitcher-image.ol-forceopen .panel {\n display:block;\n clear:both;\n}\n\n.ol-layerswitcher-image button {\n float: right;\n display:none;\n}\n\n.ol-layerswitcher-image.ol-collapsed button {\n display:block;\n position:relative;\n}\n\n.ol-layerswitcher-image li {\n border-radius: 4px;\n border: 3px solid transparent;\n -webkit-box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);\n box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);\n display: inline-block;\n width: 64px;\n height: 64px;\n margin:2px;\n position: relative;\n background-color: #fff;\n overflow: hidden;\n vertical-align: middle;\n cursor:pointer;\n}\n.ol-layerswitcher-image li.ol-layer-hidden {\n opacity: 0.5;\n border-color:#555;\n}\n.ol-layerswitcher-image li.ol-header {\n display: none;\n}\n\n.ol-layerswitcher-image li img {\n position:absolute;\n max-width:100%;\n}\n.ol-layerswitcher-image li.select,\n.ol-layerswitcher-image li.ol-visible {\n border: 3px solid red;\n}\n\n.ol-layerswitcher-image li p {\n display:none;\n}\n.ol-layerswitcher-image li:hover p {\n background-color: rgba(0, 0, 0, 0.5);\n color: #fff;\n bottom: 0;\n display: block;\n left: 0;\n margin: 0;\n overflow: hidden;\n position: absolute;\n right: 0;\n text-align: center;\n height:1.2em;\n font-family:Verdana, Geneva, sans-serif;\n font-size:0.8em;\n}\n.ol-control.ol-legend {\n bottom: .5em;\n left: .5em;\n z-index: 1;\n max-height: 90%;\n max-width: 90%;\n overflow-x: hidden;\n overflow-y: auto;\n background-color: rgba(255,255,255,.6);\n}\n.ol-control.ol-legend:hover {\n background-color: rgba(255,255,255,.8);\n}\n.ol-control.ol-legend.ol-empty,\n.ol-control.ol-legend.ol-collapsed {\n overflow: hidden;\n}\n.ol-control.ol-legend button {\n position: relative;\n display: none;\n}\n.ol-control.ol-legend.ol-empty button,\n.ol-control.ol-legend.ol-collapsed button {\n display: block;\n}\n.ol-control.ol-legend.ol-uncollapsible button {\n display: none;\n}\n\n.ol-control.ol-legend > ul,\n.ol-control.ol-legend > canvas {\n margin: 2px;\n}\n\n.ol-control.ol-legend button.ol-closebox {\n display: block;\n position: absolute;\n top: 0;\n right: 0;\n background: none;\n cursor: pointer;\n z-index: 1;\n}\n.ol-control.ol-legend.ol-empty button.ol-closebox,\n.ol-control.ol-legend.ol-uncollapsible button.ol-closebox,\n.ol-control.ol-legend.ol-collapsed button.ol-closebox {\n display: none;\n}\n.ol-control.ol-legend button.ol-closebox:before {\n content: \"\\D7\";\n background: none;\n color: rgba(0,60,136,.5);\n font-size: 1.3em;\n}\n.ol-control.ol-legend button.ol-closebox:hover:before {\n color: rgba(0,60,136,1);\n}\n.ol-control.ol-legend .ol-legendImg {\n display: block;\n}\n.ol-control.ol-legend.ol-empty .ol-legendImg,\n.ol-control.ol-legend.ol-collapsed .ol-legendImg {\n display: none;\n}\n.ol-control.ol-legend.ol-uncollapsible .ol-legendImg {\n display: block;\n}\n\n.ol-control.ol-legend > button:first-child:before,\n.ol-control.ol-legend > button:first-child:after {\n content: \"\";\n position: absolute;\n top: .25em;\n left: .2em;\n width: .2em;\n height: .2em;\n background-color: currentColor;\n -webkit-box-shadow: 0 0.35em, 0 0.7em;\n box-shadow: 0 0.35em, 0 0.7em;\n}\n.ol-control.ol-legend button:first-child:after {\n top: .27em;\n left: .55em;\n height: .15em;\n width: .6em;\n}\n\nul.ol-legend {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.ol-control.ol-legend.ol-empty ul,\n.ol-control.ol-legend.ol-collapsed ul {\n display: none;\n}\n.ol-control.ol-legend.ol-uncollapsible ul {\n display: block;\n}\nul.ol-legend li.ol-title {\n text-align: center;\n font-weight: bold;\n}\nul.ol-legend li.ol-title > div:first-child {\n width: 0!important;\n}\nul.ol-legend li {\n overflow: hidden;\n padding: 0;\n white-space: nowrap;\n}\nul.ol-legend li div {\n display: inline-block;\n vertical-align: top;\n}\n\n.ol-control.ol-legend .ol-legend {\n display: inline-block;\n}\n.ol-control.ol-legend.ol-empty .ol-legend,\n.ol-control.ol-legend.ol-collapsed .ol-legend {\n display: none;\n}\n.ol-control.ol-legend.ol-empty button {\n opacity: .4;\n}\n.ol-control.ol-mapzone {\n position: absolute;\n right: 0.5em;\n text-align: left;\n top: .5em;\n max-height: calc(100% - 6em);\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n overflow: hidden;\n}\n\n.ol-control.ol-mapzone.ol-collapsed {\n top: 3em;\n}\n\n.ol-control.ol-mapzone button {\n position: relative;\n float: right;\n margin-top: 2.5em;\n}\n.ol-touch .ol-control.ol-mapzone button {\n margin-top: 1.67em;\n}\n.ol-control.ol-mapzone.ol-collapsed button {\n margin-top: 0;\n}\n\n.ol-control.ol-mapzone button i {\n border: .1em solid currentColor;\n border-radius: 50%;\n width: .9em;\n height: .9em; \n overflow: hidden;\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.ol-control.ol-mapzone button i:before {\n content: \"\";\n background-color: currentColor;\n width: 0.4em;\n height: .4em;\n position: absolute;\n left: .5em;\n top: 0.3em;\n border-radius: 50%;\n -webkit-box-shadow: .05em .3em 0 -.051em currentColor,\n \t-.05em -.35em 0 -.1em currentColor,\n \t-.5em -.35em 0 0em currentColor,\n \t-.65em .1em 0 -.03em currentColor,\n \t-.65em -.05em 0 -.05em currentColor;\n box-shadow: .05em .3em 0 -.051em currentColor,\n \t-.05em -.35em 0 -.1em currentColor,\n \t-.5em -.35em 0 0em currentColor,\n \t-.65em .1em 0 -.03em currentColor,\n \t-.65em -.05em 0 -.05em currentColor\n}\n\n.ol-mapzone > div {\n position: relative;\n display: inline-block;\n width: 5em;\n height: 5em;\n margin: 0 .2em 0 0;\n}\n.ol-mapzone > div:focus {\n -webkit-box-shadow: 0 0 0 0.2em #369;\n box-shadow: 0 0 0 0.2em #369;\n}\n.ol-control.ol-mapzone.ol-collapsed > div {\n display: none;\n}\n.ol-mapzone > div p {\n margin: 0;\n position: absolute;\n bottom: 0;\n /* background: rgba(255,255,255,.5); */\n color: #fff;\n font-weight: bold;\n text-align: center;\n width: 160%;\n overflow: hidden;\n font-family: 'Lucida Grande',Verdana,Geneva,Lucida,Arial,Helvetica,sans-serif;\n -webkit-transform: scaleX(.625);\n transform: scaleX(.625);\n -webkit-transform-origin: 0 0;\n transform-origin: 0 0;\n cursor: default;\n}\n\n.ol-notification {\n width: 150%;\n bottom: 0;\n border: 0;\n background: none;\n margin: 0;\n padding: 0;\n}\n.ol-notification > div,\n.ol-notification > div:hover {\n position: absolute;\n background-color: rgba(0,0,0,.8);\n color: #fff;\n bottom: 0;\n left: 33.33%;\n max-width: calc(66% - 4em);\n min-width: 5em;\n max-height: 5em;\n min-height: 1em;\n border-radius: 4px 4px 0 0;\n padding: .2em .5em;\n text-align: center;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n -webkit-transition: .3s;\n transition: .3s;\n opacity: 1;\n}\n.ol-notification.ol-collapsed > div {\n bottom: -5em;\n opacity: 0;\n}\n\n.ol-notification a {\n color: #9cf;\n cursor: pointer;\n}\n\n.ol-notification .ol-close,\n.ol-notification .ol-close:hover {\n padding-right: 1.5em;\n}\n\n.ol-notification .closeBox {\n position: absolute;\n top: 0;\n right: 0.3em;\n}\n.ol-notification .closeBox:before {\n content: '\u0000d7';\n}\n.ol-overlay {\n position: absolute;\n top: 0;\n left: 0;\n width:100%;\n height: 100%;\n background-color: rgba(0,0,0,0.4);\n padding: 1em;\n color: #fff;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n z-index: 1;\n opacity: 0;\n display: none;\n cursor: default;\n overflow: hidden;\n -webkit-transition: all 0.5s;\n transition: all 0.5s;\n pointer-events: none;\n z-index: 9;\n}\n\n.ol-overlay.slide-up {\n transform: translateY(100%);\n -webkit-transform: translateY(100%);\n}\n.ol-overlay.slide-down {\n -webkit-transform: translateY(-100%);\n transform: translateY(-100%);\n}\n.ol-overlay.slide-left\n{\t-webkit-transform: translateX(-100%);\n transform: translateX(-100%);\n}\n.ol-overlay.slide-right {\n -webkit-transform: translateX(100%);\n transform: translateX(100%);\n}\n.ol-overlay.zoom {\n top: 50%;\n left: 50%;\n opacity:0.5;\n -webkit-transform: translate(-50%,-50%) scale(0);\n transform: translate(-50%,-50%) scale(0);\n}\n.ol-overlay.zoomout {\n -webkit-transform: scale(3);\n transform: scale(3);\n}\n.ol-overlay.zoomrotate {\n top: 50%;\n left: 50%;\n opacity:0.5;\n -webkit-transform: translate(-50%,-50%) scale(0) rotate(360deg);\n transform: translate(-50%,-50%) scale(0) rotate(360deg);\n}\n.ol-overlay.stretch {\n top: 50%;\n left: 50%;\n opacity:0.5;\n -webkit-transform: translate(-50%,-50%) scaleX(0);\n transform: translate(-50%,-50%) scaleX(0) ;\n}\n.ol-overlay.stretchy {\n top: 50%;\n left: 50%;\n opacity:0.5;\n -webkit-transform: translate(-50%,-50%) scaleY(0);\n transform: translate(-50%,-50%) scaleY(0) ;\n}\n.ol-overlay.wipe {\n opacity: 1;\n /* clip: must be set programmatically */\n /* clip-path: use % but not crossplatform (IE) */\n}\n.ol-overlay.flip {\n -webkit-transform: perspective(600px) rotateY(180deg);\n transform: perspective(600px) rotateY(180deg);\n}\n.ol-overlay.card {\n opacity: 0.5;\n -webkit-transform: translate(-80%, 100%) rotate(-0.5turn);\n transform: translate(-80%, 100%) rotate(-0.5turn);\n}\n.ol-overlay.book {\n -webkit-transform: perspective(600px) rotateY(-180deg) scaleX(0.6);\n transform: perspective(600px) rotateY(-180deg) scaleX(0.6) ;\n -webkit-transform-origin: 10% 50%;\n transform-origin: 10% 50%;\n}\n.ol-overlay.book.visible {\n -webkit-transform-origin: 10% 50%;\n transform-origin: 10% 50%;\n}\n\n.ol-overlay.ol-visible {\n opacity:1;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n -webkit-transform: none;\n transform: none;\n pointer-events: all; \n}\n\n.ol-overlay .ol-closebox {\n position: absolute;\n top: 1em;\n right: 1em;\n width: 1em;\n height: 1em;\n cursor: pointer;\n z-index:1;\n}\n.ol-overlay .ol-closebox:before {\n content: \"\u00BCc\";\n display: block;\n text-align: center;\n vertical-align: middle;\n}\n\n.ol-overlay .ol-fullscreen-image {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n}\n.ol-overlay .ol-fullscreen-image img {\n position: absolute;\n max-width: 100%;\n max-height: 100%;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n padding: 1em;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.ol-overlay .ol-fullscreen-image.ol-has-title img {\n padding-bottom: 3em;\n}\n.ol-overlay .ol-fullscreen-image p {\n background-color: rgba(0,0,0,.5);\n padding: .5em;\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n margin: 0;\n text-align: center;\n}\n.ol-control.ol-overview\n{\tposition: absolute;\n\tleft: 0.5em;\n\ttext-align: left;\n\tbottom: 0.5em;\n}\n\n.ol-control.ol-overview .panel\n{\tdisplay:block;\n\twidth:150px;\n\theight:150px;\n\tmargin:2px;\n\tbackground-color:#fff;\n\tborder:1px solid #369;\n\tcursor: pointer;\n}\n\n.ol-overview:not(.ol-collapsed) button\n{\tposition:absolute;\n\tbottom:2px;\n\tleft:2px;\n\tz-index:2;\n}\n\n.ol-control.ol-overview.ol-collapsed .panel\n{\tdisplay:none;\n}\n\n.ol-overview.ol-collapsed button:before\n{\tcontent:'\u0000bb';\n}\n.ol-overview button:before\n{\tcontent:'\u0000ab';\n}\n\n\n.ol-control-right.ol-overview\n{\tleft: auto;\n\tright: 0.5em;\n}\n.ol-control-right.ol-overview:not(.ol-collapsed) button\n{\tleft:auto;\n\tright:2px;\n}\n.ol-control-right.ol-overview.ol-collapsed button:before\n{\tcontent:'\u0000ab';\n}\n.ol-control-right.ol-overview button:before\n{\tcontent:'\u0000bb';\n}\n\n.ol-control-top.ol-overview\n{\tbottom: auto;\n\ttop: 5em;\n}\n.ol-control-top.ol-overview:not(.ol-collapsed) button\n{\tbottom:auto;\n\ttop:2px;\n}\n\n.ol-permalink {\n position: absolute;\n top:0.5em;\n right: 2.5em;\n}\n.ol-touch .ol-permalink {\n right: 3em;\n}\n\n.ol-permalink button i {\n position: absolute;\n width: 1em;\n height: 1em;\n display: block;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.ol-permalink button i:before {\n content: '\u001197';\n position: absolute;\n border: 1px solid currentColor;\n left: 0;\n top: 0;\n width: 0.3em;\n height: 1em;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n border-width: 1px 0 0 1px;\n padding: 0 0.2em;\n}\n.ol-permalink button i:after {\n content: '';\n position: absolute;\n border: 1px solid currentColor;\n right: 0;\n bottom: 0;\n width: 1em;\n height: 0.3em;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n border-width: 0 1px 1px 0;\n padding: 0.2em;\n}\n.ol-control.ol-print {\n top:.5em;\n left: 3em;\n}\n.ol-control.ol-print button:before {\n content: \"\";\n width: .9em;\n height: .35em;\n position: absolute;\n left: 50%;\n top: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n -webkit-box-shadow: inset 0 0 0 0.1em, inset 0.55em 0, 0 0.2em 0 -0.1em;\n box-shadow: inset 0 0 0 0.1em, inset 0.55em 0, 0 0.2em 0 -0.1em;\n}\n.ol-control.ol-print button:after {\n content: \"\";\n width: .7em;\n height: .6em;\n position: absolute;\n left: 50%;\n top: 25%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n -webkit-box-shadow: inset 0 0 0 0.15em;\n box-shadow: inset 0 0 0 0.15em;\n}\n.ol-ext-print-dialog {\n width: 100%;\n height: 100%;\n}\n.ol-ext-print-dialog > form .ol-closebox {\n right: auto;\n left: 16.5em;\n z-index: 1;\n color: #999;\n}\n.ol-ext-print-dialog .ol-content[data-status=\"printing\"] {\n opacity: .5;\n}\n.ol-ext-print-dialog .ol-content .ol-error {\n display: none;\n background: #b00;\n color: yellow;\n text-align: center;\n padding: 1em .5em;\n font-weight: bold;\n margin: 0 -1em;\n}\n.ol-ext-print-dialog .ol-content[data-status=\"error\"] .ol-error {\n display: block;\n}\n\n.ol-ext-print-dialog > form,\n.ol-ext-print-dialog.ol-visible > form {\n -webkit-transition: none;\n transition: none;\n top: 1em;\n left: 1em;\n bottom: 1em;\n right: 1em;\n -webkit-transform: none;\n transform: none;\n max-width: 100%;\n max-height: 100%;\n background-color: #eee;\n padding: 0;\n width: unset;\n}\n.ol-ext-print-dialog .ol-print-map {\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: calc(100% - 18em);\n overflow: hidden;\n}\n.ol-ext-print-dialog .ol-print-map .ol-page {\n position: absolute;\n left: 50%;\n top: 50%;\n background: #fff;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.ol-ext-print-dialog .ol-print-map .ol-page.margin {\n -webkit-box-sizing: content-box;\n box-sizing: content-box;\n}\n.ol-ext-print-dialog .ol-map {\n width: 100%;\n height: 100%;\n}\n.ol-ext-print-dialog .ol-print-map .ol-control {\n display: none!important;\n}\n\n.ol-ext-print-dialog .ol-print-param {\n position: absolute;\n overflow-x: hidden;\n top: 0;\n bottom: 0;\n left: 0;\n width: 18em;\n background-color: #fff;\n padding: 1em;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n\n.ol-ext-print-dialog .ol-print-param h2 {\n display: block;\n color: rgba(0,60,136,.7);\n font-size: 1.1em;\n}\n.ol-ext-print-dialog .ol-print-param ul {\n padding: 0;\n list-style: none;\n}\n.ol-ext-print-dialog .ol-print-param li {\n position: relative;\n margin: .5em 0;\n font-size: .9em;\n}\n.ol-ext-print-dialog .ol-print-param li.hidden {\n display: none;\n}\n.ol-ext-print-dialog .ol-print-param label {\n width: 8em;\n display: inline-block;\n vertical-align: middle;\n}\n\n.ol-ext-print-dialog select {\n outline: none;\n vertical-align: middle;\n}\n\n.ol-ext-print-dialog .ol-orientation {\n text-align: center;\n}\n.ol-ext-print-dialog .ol-orientation label {\n position: relative;\n width: 7em;\n cursor: pointer;\n}\n.ol-ext-print-dialog .ol-orientation input {\n position: absolute;\n opacity: 0;\n width: 0;\n height: 0;\n}\n.ol-ext-print-dialog .ol-orientation span {\n position: relative;\n width: 80%;\n display: block;\n padding: 3.5em 0 .2em;\n}\n.ol-ext-print-dialog .ol-orientation span:before {\n content: \"\";\n position: absolute;\n width: 2em;\n height: 2.6em;\n bottom: 1.5em;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n color: #333;\n background-color: currentColor;\n border: 1px solid currentColor;\n border-radius: 0 1em 0 0;\n opacity: .5;\n overflow: hidden;\n -webkit-box-shadow: inset 1.3em -1.91em #ddd;\n box-shadow: inset 1.3em -1.91em #ddd;\n}\n\n.ol-ext-print-dialog .ol-orientation .landscape span:before {\n width: 2.6em;\n height: 2em;\n margin: .2em 0;\n -webkit-box-shadow: inset 1.91em -1.3em #ddd;\n box-shadow: inset 1.91em -1.3em #ddd;\n}\n.ol-ext-print-dialog .ol-orientation input:checked + span {\n opacity: 1;\n -webkit-box-shadow: 0 0 .2em rgba(0,0,0,.5);\n box-shadow: 0 0 .2em rgba(0,0,0,.5);\n}\n\n.ol-ext-print-dialog .ol-ext-toggle-switch span {\n position: absolute;\n right: -2em;\n top: 50%;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n}\n\n.ol-print-title input[type=text] {\n margin-top: .5em;\n width: calc(100% - 6em);\n margin-left: 6em;\n}\n\n.ol-ext-print-dialog .ol-size option:first-child {\n font-style: italic;\n}\n\n.ol-ext-print-dialog .ol-saveas,\n.ol-ext-print-dialog .ol-savelegend {\n text-align: center;\n}\n.ol-ext-print-dialog .ol-saveas select,\n.ol-ext-print-dialog .ol-savelegend select {\n background-color: rgba(0,60,136,.7);\n color: #fff;\n padding: .5em;\n margin: 1em 0 0;\n font-size: 1em;\n border: 0;\n font-weight: bold;\n max-width: 12em;\n}\n.ol-ext-print-dialog .ol-saveas select option,\n.ol-ext-print-dialog .ol-savelegend select option {\n background-color: #fff;\n color: #666;\n}\n.ol-ext-print-dialog .ol-savelegend select {\n margin-top: 0;\n}\n\n.ol-ext-print-dialog .ol-ext-buttons {\n text-align: right;\n border-top: 1px solid #ccc;\n padding: .8em .5em;\n margin: 0 -1em;\n}\n.ol-ext-print-dialog button {\n font-size: 1em;\n margin: 0 .2em;\n border: 1px solid #999;\n background: none;\n padding: .3em 1em;\n color: #333;\n}\n.ol-ext-print-dialog button[type=\"submit\"] {\n background-color: rgba(0,60,136,.7);\n color: #fff;\n font-weight: bold;\n}\n\n.ol-ext-print-dialog .ol-clipboard-copy {\n position: absolute;\n pointer-events: none;\n top: 0;\n background-color: rgba(0,0,0,.5);\n color: #fff;\n padding: .5em 1em;\n border-radius: 1em;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n width: -webkit-fit-content;\n width: -moz-fit-content;\n width: fit-content;\n -webkit-transition: 0s;\n transition: 0s;\n opacity: 0;\n}\n.ol-ext-print-dialog .ol-clipboard-copy.visible {\n -webkit-animation: 1s ol-clipboard-copy;\n animation: 1s ol-clipboard-copy;\n}\n.ol-ext-print-dialog .ol-print-map .ol-control.ol-canvas-control {\n display: block!important;\n}\n.ol-ext-print-dialog .ol-print-map .ol-control.ol-print-compass {\n display: block!important;\n}\n.ol-ext-print-dialog .ol-print-map .ol-control.olext-print-compass {\n top: 0;\n right: 0;\n width: 60px;\n height: 60px;\n margin: 20px;\n}\n\n/* Focus */\n.ol-ext-print-dialog .ol-orientation input:focus-visible + span,\n.ol-ext-print-dialog select:focus-visible {\n outline: 2px solid #000;\n}\n\n@-webkit-keyframes ol-clipboard-copy { \n 0% { opacity: 0; top: 0; }\n 80% { opacity: 1; top: -3em; }\n 100% { opacity: 0; top: -3em; } \n}\n\n@keyframes ol-clipboard-copy { \n 0% { opacity: 0; top: 0; }\n 80% { opacity: 1; top: -3em; }\n 100% { opacity: 0; top: -3em; } \n}\n\n@media print {\n body.ol-print-document {\n margin: 0!important;\n padding: 0!important;\n }\n body.ol-print-document > * {\n display: none!important;\n }\n body.ol-print-document > .ol-ext-print-dialog {\n display: block!important;\n }\n body.ol-print-document > .ol-ext-print-dialog .ol-content {\n max-height: unset!important;\n max-width: unset!important;\n width: unset!important;\n height: unset!important;\n }\n .ol-ext-print-dialog > form,\n .ol-ext-print-dialog {\n position: unset;\n -webkit-box-shadow: none;\n box-shadow: none;\n background: none!important;\n border: 0;\n }\n .ol-ext-print-dialog > form > *,\n .ol-ext-print-dialog .ol-print-param {\n display: none!important;\n background: none;\n } \n .ol-ext-print-dialog .ol-content {\n display: block!important;\n border: 0;\n background: none;\n }\n .ol-ext-print-dialog .ol-print-map {\n position: unset; \n background: none;\n width: auto;\n overflow: visible;\n }\n .ol-ext-print-dialog .ol-print-map .ol-page {\n -webkit-transform: none!important;\n transform: none!important;\n -webkit-box-shadow: none!important;\n box-shadow: none!important;\n position: unset;\n }\n}\n\n@media (max-width: 25em) {\n .ol-ext-print-dialog .ol-print-param {\n width: 13em;\n }\n .ol-ext-print-dialog .ol-print-map {\n width: calc(100% - 13em);\n }\n .ol-ext-print-dialog .ol-print-param .ol-print-title input[type=\"text\"] {\n width: 100%;\n margin: 0;\n }\n}\n.ol-ext-print-dialog2x .ol-map,\n.ol-ext-print-dialog2x .ol-map2 {\n width: 100%;\n height: 50%;\n}\n.ol-ext-print-dialog2x[data-orientation=\"landscape\"] .ol-map,\n.ol-ext-print-dialog2x[data-orientation=\"landscape\"] .ol-map2 {\n display: inline-block;\n width: 50%;\n height: 100%;\n}\n\n.ol-ext-print-dialog2x[data-clip-map] .ol-map,\n.ol-ext-print-dialog2x[data-swipe-orientation] .ol-map {\n width: 100%!important;\n height: 100%!important;\n}\n.ol-ext-print-dialog2x[data-clip-map] .ol-map2,\n.ol-ext-print-dialog2x[data-swipe-orientation] .ol-map2 {\n width: 100%!important;\n height: 100%!important;\n position: relative!important;\n left: 0;\n top: -100%;\n}\n.ol-profile {\n position: relative;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.ol-control.ol-profile {\n position: absolute;\n top: 0.5em;\n right: 3em;\n text-align: right;\n overflow: hidden;\n}\n.ol-profile .ol-zoom-out {\n position: absolute;\n top: 10px;\n right: 10px;\n width: 1em;\n height: 1em;\n padding: 0;\n border: 1px solid #000;\n border-radius: 2px;\n cursor: pointer;\n}\n.ol-profile .ol-zoom-out:before {\n content: '';\n height: 2px;\n width: 60%;\n background: currentColor;\n position: absolute;\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n\n.ol-profile .ol-inner {\n position: relative;\n padding: 0.5em;\n font-size: 0.8em;\n}\n.ol-control.ol-profile .ol-inner {\n display: block;\n background-color: rgba(255,255,255,0.7);\n margin: 2.3em 2px 2px;\n}\n.ol-control.ol-profile.ol-collapsed .ol-inner {\n display: none;\n}\n\n.ol-profile canvas {\n display: block;\n}\n.ol-profile button {\n display: block;\n position: absolute;\n right: 0;\n overflow: hidden;\n}\n.ol-profile button i {\n position: absolute;\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n width: 1em;\n height: 1em;\n overflow: hidden;\n}\n.ol-profile button i:before,\n.ol-profile button i:after {\n content: \"\";\n position: absolute;\n display: block;\n background-color: currentColor;\n width: 1em;\n height: .9em;\n -webkit-transform: scaleX(.8) translate(-.25em, .5em) rotate(45deg);\n transform: scaleX(.8) translate(-.25em, .5em) rotate(45deg);\n}\n.ol-profile button i:after {\n -webkit-transform: scaleX(.8) translate(.35em, .7em) rotate(45deg);\n transform: scaleX(.8) translate(.35em, .7em) rotate(45deg);\n}\n\n.ol-profile.ol-collapsed button {\n position: static;\n}\n\n.ol-profile .ol-profilebar,\n.ol-profile .ol-profilecursor {\n position:absolute;\n pointer-events: none;\n width: 1px;\n display: none;\n}\n.ol-profile .ol-profilecursor {\n width: 0;\n height: 0;\n}\n.ol-profile .ol-profilecursor:before {\n content:\"\";\n pointer-events: none;\n display: block;\n margin: -2px;\n width:5px;\n height:5px;\n}\n.ol-profile .ol-profilebar,\n.ol-profile .ol-profilecursor:before {\n background: red;\n}\n\n.ol-profile table {\n text-align: center;\n border-collapse: collapse; \n width: 100%;\n margin-top: 0.5em;\n}\n.ol-profile table tr {\n border-top: 1px solid rgba(0,0,0,.25);\n margin: 0.1em 0;\n}\n.ol-profile table td {\n padding: 2px;\n}\n\n.ol-profile table span {\n display: block;\n}\n.ol-profile table span.elevationGain,\n.ol-profile table span.elevationLoss {\n display: inline-block;\n}\n.ol-profilepopup {\n background-color: rgba(255, 255, 255, 0.5);\n margin: 0.5em;\n padding: 0 0.5em;\n position: absolute;\n top:-1em;\n white-space: nowrap;\n}\n.ol-profilepopup.ol-left {\n right:0;\n}\n\n.ol-profile table .track-info {\n display: table-row;\n}\n.ol-profile table .point-info {\n display: none;\n}\n.ol-profile .over table .track-info {\n display: none;\n}\n.ol-profile .over table .point-info {\n display: table-row;\n}\n\n.ol-profile p {\n text-align: center;\n margin:0;\n}\n\n.ol-control.ol-progress-bar {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n padding: 0;\n pointer-events: none!important;\n background-color: transparent;\n}\n\n.ol-control.ol-progress-bar > .ol-bar {\n position: absolute;\n background-color: rgba(0,60,136,.5);\n left: 0;\n bottom: 0;\n height: .5em;\n width: 0;\n -webkit-transition: width .2s;\n transition: width .2s;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n\n.ol-progress-bar > .ol-waiting {\n display: none;\n}\n\n.ol-viewport .ol-control.ol-progress-bar > .ol-waiting {\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n color: #fff;\n font-size: 2em;\n display: block;\n -webkit-animation: 1s linear infinite ol-progress-bar-blink;\n animation: 1s linear infinite ol-progress-bar-blink;\n}\n\n@-webkit-keyframes ol-progress-bar-blink {\n 0%, 30% {\n visibility: hidden;\n }\n 100% {\n visibility: visible;\n }\n}\n\n@keyframes ol-progress-bar-blink {\n 0%, 30% {\n visibility: hidden;\n }\n 100% {\n visibility: visible;\n }\n}\n\n.ol-control.ol-routing {\n top: 0.5em;\n left: 3em;\n max-height: 90%;\n overflow-y: auto;\n}\n.ol-touch .ol-control.ol-routing {\n left: 3.5em;\n}\n.ol-control.ol-routing.ol-searching {\n opacity: .5;\n}\n\n.ol-control.ol-routing .ol-car,\n.ol-control.ol-routing > button {\n position: relative;\n}\n.ol-control.ol-routing .ol-car:after,\n.ol-control.ol-routing > button:after {\n content: \"\";\n position: absolute;\n width: .78em;\n height: 0.6em;\n border-radius: 40% 50% 0 0 / 50% 70% 0 0;\n -webkit-box-shadow: inset 0 0 0 0.065em, -0.35em 0.14em 0 -0.09em, inset 0 -0.37em, inset -0.14em 0.005em;\n box-shadow: inset 0 0 0 0.065em, -0.35em 0.14em 0 -0.09em, inset 0 -0.37em, inset -0.14em 0.005em;\n clip: rect(0 1em .5em -1em);\n top: .35em;\n left: .4em;\n}\n.ol-control.ol-routing .ol-car:before,\n.ol-control.ol-routing > button:before {\n content: \"\";\n position: absolute;\n width: .28em;\n height: .28em;\n border-radius: 50%;\n -webkit-box-shadow: inset 0 0 0 1em, 0.65em 0;\n box-shadow: inset 0 0 0 1em, 0.65em 0;\n top: 0.73em;\n left: .20em;\n}\n.ol-control.ol-routing .ol-pedestrian:after {\n content: \"\";\n position: absolute;\n width: .3em;\n height: .4em;\n top: .25em;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n -webkit-box-shadow: inset 0.3em 0, 0.1em 0.5em 0 -0.1em, -0.1em 0.5em 0 -0.1em, 0.25em 0.1em 0 -0.1em, -0.25em 0.1em 0 -0.1em;\n box-shadow: inset 0.3em 0, 0.1em 0.5em 0 -0.1em, -0.1em 0.5em 0 -0.1em, 0.25em 0.1em 0 -0.1em, -0.25em 0.1em 0 -0.1em;\n border-top: .2em solid transparent;\n}\n.ol-control.ol-routing .ol-pedestrian:before {\n content: \"\";\n position: absolute;\n width: .3em;\n height: .3em;\n top: .1em;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n border-radius: 50%;\n background-color: currentColor;\n}\n\n.ol-control.ol-routing .content {\n margin: .5em;\n}\n\n.ol-control.ol-routing.ol-collapsed .content {\n display: none;\n}\n\n.ol-routing .ol-search.ol-collapsed ul {\n\tdisplay: none;\n}\n.ol-routing .ol-search ul .copy {\n display: none;\n}\n.ol-routing .ol-search ul.history {\n /* display: none; */\n}\n.ol-routing .content .search-input > div > * {\n display: inline-block;\n vertical-align: top;\n}\n.ol-routing .ol-result ul {\n list-style: none;\n display: block;\n}\n.ol-routing .ol-result li {\n position: relative;\n min-height: 1.65em;\n}\n.ol-routing .ol-result li i {\n display: block;\n font-size: .8em;\n font-weight: bold;\n}\n\n.ol-routing .ol-result li:before {\n content: \"\";\n border: 5px solid transparent;\n position: absolute;\n left: -1.75em;\n border-bottom-color: #369;\n border-width: .6em .4em .6em;\n -webkit-transform-origin: 50% 125%;\n transform-origin: 50% 125%;\n -webkit-box-shadow: 0 0.65em 0 -0.25em #369;\n box-shadow: 0 0.65em 0 -0.25em #369;\n top: -.8em;\n}\n.ol-routing .ol-result li:after {\n content: \"\";\n position: absolute;\n width: 0.25em;\n height: .6em;\n left: -1.5em;\n background: #369;\n top: .6em;\n border-radius: 0.1em;\n}\n.ol-routing .ol-result li.R:before {\n -webkit-transform: rotate(90deg);\n transform: rotate(90deg);\n}\n.ol-routing .ol-result li.FR:before {\n -webkit-transform: rotate(45deg);\n transform: rotate(45deg);\n}\n.ol-routing .ol-result li.L:before {\n -webkit-transform: rotate(-90deg);\n transform: rotate(-90deg);\n}\n.ol-routing .ol-result li.FL:before {\n -webkit-transform: rotate(-45deg);\n transform: rotate(-45deg);\n}\n\n.ol-routing .content > i {\n vertical-align: middle;\n margin: 0 .3em 0 .1em;\n font-style: normal;\n}\n.ol-routing .ol-button,\n.ol-routing .ol-button:focus,\n.ol-routing .ol-pedestrian,\n.ol-routing .ol-car {\n font-size: 1.1em;\n position: relative;\n display: inline-block;\n width: 1.4em;\n height: 1.4em;\n color: rgba(0,60,136,1);\n background-color: transparent;\n margin: 0 .1em;\n opacity: .5;\n vertical-align: middle;\n outline: none;\n cursor: pointer;\n}\n.ol-routing .ol-constraints {\n display: block;\n}\n\n.ol-routing .ol-button:hover,\n.ol-routing .ol-button.selected,\n.ol-routing i.selected {\n opacity: 1;\n background: transparent;\n}\n.ol-routing .ol-method {\n display: block;\n}\n\n\n.ol-control.ol-routing {\n background-color: rgba(255,255,255,.25);\n}\n.ol-control.ol-routing:hover {\n background-color: rgba(255,255,255,.75);\n}\n\n.search-input > div > button:before {\n content: '\u0000b1';\n}\n.ol-viewport .ol-scale {\n\tleft: .5em;\n\tbottom: 2.5em;\n\ttext-align: center;\n\t-webkit-transform: scaleX(.8);\n\t-webkit-transform-origin: 0 0;\n\ttransform: scaleX(.8);\n\ttransform-origin: 0 0;\n\tbackground-color: rgba(255, 255, 255, 0.75);\n}\n.ol-viewport .ol-scale input {\n\tbackground: none;\n border: 0;\n width: 8em;\n text-align: center;\n}\n\n.ol-search{\n top: 0.5em;\n left: 3em;\n}\n.ol-touch .ol-search {\n left: 3.5em;\n}\n.ol-search button {\n top: 2px;\n left: 2px;\n float: left;\n}\n.ol-control.ol-search > button:before {\n content: \"\";\n position: absolute;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: .7em;\n height: .7em;\n background-color: transparent;\n border: .12em solid currentColor;\n border-radius: 100%;\n top: .35em;\n left: .35em;\n}\n.ol-control.ol-search > button:after {\n content: \"\";\n position: absolute;\n top: 1.1em;\n left: .95em;\n width: .45em;\n height: .15em;\n background-color: currentColor;\n border-radius: .05em;\n -webkit-transform: rotate(45deg);\n transform: rotate(45deg);\n -webkit-box-shadow: -0.18em 0 0 -0.03em;\n box-shadow: -0.18em 0 0 -0.03em;\n}\n\n.ol-search button.ol-revers {\n float: none;\n background-image: none;\n display: inline-block;\n vertical-align: bottom;\n position: relative;\n top: 0;\n left: 0;\n}\n.ol-search.ol-revers button.ol-revers {\n background-color: rgba(0,136,60,.5)\n}\n\n.ol-control.ol-search.ol-collapsed button.ol-revers {\n display: none;\n}\n.ol-search button.ol-revers:before {\n content: \"\";\n border: .1em solid currentColor;\n position: absolute;\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n border-radius: 50%;\n width: .55em;\n height: .55em;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.ol-search button.ol-revers:after {\n content: \"\";\n position: absolute;\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n width: .2em;\n height: .2em;\n background-color: transparent;\n -webkit-box-shadow: .35em 0 currentColor, 0 .35em currentColor, -.35em 0 currentColor, 0 -.35em currentColor;\n box-shadow: .35em 0 currentColor, 0 .35em currentColor, -.35em 0 currentColor, 0 -.35em currentColor;\n}\n\n.ol-search input {\n display: inline-block;\n border: 0;\n margin: 1px 1px 1px 2px;\n font-size: 1.14em;\n padding-left: 0.3em;\n height: 1.375em;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n -webkit-transition: all 0.1s;\n transition: all 0.1s;\n}\n.ol-touch .ol-search input,\n.ol-touch .ol-search ul {\n font-size: 1.5em;\n}\n.ol-search.ol-revers > ul,\n.ol-control.ol-search.ol-collapsed > * {\n display: none;\n}\n.ol-control.ol-search.ol-collapsed > button {\n display: block;\n}\n\n.ol-search ul {\n list-style: none;\n padding: 0;\n margin: 0;\n display: block;\n clear: both;\n cursor: pointer;\n max-width: 17em;\n overflow-x: hidden;\n z-index: 1;\n background: #fff;\n}\n/*\n.ol-control.ol-search ul {\n position: absolute;\n box-shadow: 5px 5px 5px rgba(0,0,0,0.5);\n}\n*/\n.ol-search ul li {\n padding: 0.1em 0.5em;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ol-search ul li.select,\n.ol-search ul li:hover {\n background-color: rgba(0,60,136,.5);\n color: #fff;\n}\n.ol-search ul li img {\n float: left;\n max-height: 2em;\n}\n.ol-search li.copy {\n background: rgba(0,0,0,.5);\n color: #fff;\n}\n.ol-search li.copy a {\n color: #fff;\n text-decoration: none;\n}\n\n.ol-search.searching:before {\n content: '';\n position: absolute;\n height: 3px;\n left: 0;\n top: 1.6em;\n -webkit-animation: ol-pulse .5s infinite alternate linear;\n animation: ol-pulse .5s infinite alternate linear;\n background: red;\n z-index: 2;\n}\n\n@-webkit-keyframes ol-pulse {\n 0% { left:0; right: 95%; }\n 50% {\tleft: 30%; right: 30%; }\n 100% {\tleft: 95%; right: 0; }\n}\n\n@keyframes ol-pulse {\n 0% { left:0; right: 95%; }\n 50% {\tleft: 30%; right: 30%; }\n 100% {\tleft: 95%; right: 0; }\n}\n\n\n.ol-control.ol-search.IGNF-parcelle {\n background-color: rgba(255,255,255,.7);\n padding-bottom: .2em;\n}\n.ol-search.IGNF-parcelle input {\n width: 14.5em;\n}\n.ol-search.IGNF-parcelle input:-moz-read-only {\n background: #ccc;\n opacity: .8;\n}\n.ol-search.IGNF-parcelle input:read-only {\n background: #ccc;\n opacity: .8;\n}\n.ol-search.IGNF-parcelle.ol-collapsed-list > ul.autocomplete {\n display: none;\n}\n\n.ol-search.IGNF-parcelle label {\n display: block;\n clear: both;\n}\n\n.ol-search.IGNF-parcelle > div input {\n text-align: right;\n}\n.ol-search.IGNF-parcelle > div input,\n.ol-search.IGNF-parcelle > div label {\n width: 4em;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n display: inline-block;\n margin: .1em;\n font-size: 1em;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ol-search.IGNF-parcelle > div label {\n letter-spacing: -0.04em;\n}\n.ol-search.IGNF-parcelle ul.autocomplete-page {\n margin-top:.5em;\n width:100%;\n text-align: center;\n display: none;\n}\n.ol-search.IGNF-parcelle.ol-collapsed-list ul.autocomplete-parcelle,\n.ol-search.IGNF-parcelle.ol-collapsed-list ul.autocomplete-page {\n display: block;\n}\n.ol-search.IGNF-parcelle.ol-collapsed ul.autocomplete-page,\n.ol-search.IGNF-parcelle.ol-collapsed ul.autocomplete-parcelle,\n.ol-search.IGNF-parcelle ul.autocomplete-parcelle {\n display: none;\n}\n.ol-search.IGNF-parcelle ul.autocomplete-page li {\n display: inline-block;\n color: #fff;\n background: rgba(0,60,136,.5);\n border-radius: 50%;\n width: 1.3em;\n height: 1.3em;\n padding: .1em;\n margin: 0 .1em;\n}\n.ol-search.IGNF-parcelle ul.autocomplete-page li.selected {\n background: rgba(0,60,136,1);\n}\n\n/* GPS */\n.ol-searchgps input.search,\n.ol-searchcoord input.search {\n display: none;\n}\n.ol-control.ol-searchgps > button:first-child,\n.ol-control.ol-searchcoord > button:first-child {\n background-image: none;\n}\n.ol-control.ol-searchgps > button:first-child:before,\n.ol-control.ol-searchcoord > button:first-child:before {\n content: \"x/y\";\n position: unset;\n display: block;\n -webkit-transform: scaleX(.8);\n transform: scaleX(.8);\n border: unset;\n border-radius: 0;\n width: auto;\n height: auto;\n}\n.ol-control.ol-searchgps > button:first-child:after,\n.ol-control.ol-searchcoord > button:first-child:after {\n content: unset;\n}\n.ol-control.ol-searchgps .ol-latitude,\n.ol-control.ol-searchgps .ol-longitude,\n.ol-control.ol-searchcoord .ol-latitude,\n.ol-control.ol-searchcoord .ol-longitude {\n clear: both;\n}\n.ol-control.ol-searchgps .ol-latitude label,\n.ol-control.ol-searchgps .ol-longitude label,\n.ol-control.ol-searchcoord .ol-latitude label,\n.ol-control.ol-searchcoord .ol-longitude label {\n width: 5.5em;\n display: inline-block;\n text-align: right;\n -webkit-transform: scaleX(.8);\n transform: scaleX(.8);\n margin: 0 -.8em 0 0;\n -webkit-transform-origin: 0 0;\n transform-origin: 0 0;\n}\n.ol-control.ol-searchcoord .ol-latitude label,\n.ol-control.ol-searchcoord .ol-longitude label {\n width: 2em;\n margin: 0;\n}\n.ol-control.ol-searchgps .ol-latitude input,\n.ol-control.ol-searchgps .ol-longitude input {\n max-width: 10em;\n}\n\n.ol-control.ol-searchgps .ol-ext-toggle-switch {\n cursor: pointer;\n float: right;\n margin: .5em;\n font-size: .9em;\n}\n\n.ol-searchgps .ol-decimal{\n display: inline-block;\n margin-right: .7em;\n}\n.ol-searchgps .ol-dms,\n.ol-searchgps.ol-dms .ol-decimal {\n display: none;\n width: 3em;\n text-align: right;\n}\n.ol-searchgps.ol-dms .ol-dms {\n display: inline-block;\n}\n\n.ol-searchgps span.ol-dms {\n width: .5em;\n text-align: left;\n}\n.ol-searchgps.ol-control.ol-collapsed button.ol-geoloc,\n.ol-searchgps.ol-control.ol-collapsed button.ol-centerloc,\n.ol-searchcoord.ol-control.ol-collapsed button.ol-centerloc,\n.ol-searchcoord.ol-control.ol-collapsed button.ol-geoloc {\n display: none;\n}\n.ol-searchgps button.ol-geoloc,\n.ol-searchgps button.ol-centerloc,\n.ol-searchcoord button.ol-centerloc,\n.ol-searchcoord button.ol-geoloc {\n top: 0;\n float: right;\n margin-right: 3px;\n background-image: none;\n position: relative;\n}\n.ol-searchgps button.ol-geoloc:before,\n.ol-searchcoord button.ol-geoloc:before {\n content:\"\";\n position: absolute;\n left: 50%;\n top: 50%;\n width: .6em;\n height: .6em;\n border: .1em solid currentColor;\n border-radius: 50%;\n -webkit-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n}\n.ol-searchgps button.ol-geoloc:after,\n.ol-searchcoord button.ol-geoloc:after {\n content:\"\";\n position: absolute;\n left: 50%;\n top: 50%;\n width: .2em;\n height: .2em;\n background-color: transparent;\n -webkit-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n -webkit-box-shadow:\n .45em 0 currentColor, -.45em 0 currentColor, 0 -.45em currentColor, 0 .45em currentColor,\n .25em 0 currentColor, -.25em 0 currentColor, 0 -.25em currentColor, 0 .25em currentColor;\n box-shadow:\n .45em 0 currentColor, -.45em 0 currentColor, 0 -.45em currentColor, 0 .45em currentColor,\n .25em 0 currentColor, -.25em 0 currentColor, 0 -.25em currentColor, 0 .25em currentColor;\n}\n\n.ol-searchgps button.ol-centerloc:before,\n.ol-searchcoord button.ol-centerloc:before {\n content: \"\uD83D\uDCCD\";\n border: 0;\n width: auto;\n height: auto;\n padding: 0;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.ol-searchgps button.ol-centerloc:after,\n.ol-searchcoord button.ol-centerloc:after {\n display: none;\n}\n.ol-control.ol-select {\n top: .5em;\n left: 3em;\n background-color: rgba(255,255,255,.5);\n}\n.ol-control.ol-select:hover {\n background-color: rgba(255,255,255,.7);\n}\n.ol-touch .ol-control.ol-select {\n left: 3.5em;\n}\n.ol-control.ol-select > button:before {\n content: \"A\";\n font-size: .6em;\n font-weight: normal;\n position: absolute;\n -webkit-box-sizing: content-box;\n box-sizing: content-box;\n width: 1em;\n height: 1em;\n background-color: transparent;\n border: .2em solid currentColor;\n border-radius: 100%;\n top: .5em;\n left: .5em;\n line-height: 1em;\n text-align: center;\n}\n.ol-control.ol-select > button:after {\n content: \"\";\n position: absolute;\n top: 1.15em;\n left: 1em;\n width: .45em;\n height: .15em;\n background-color: currentColor;\n border-radius: .05em;\n -webkit-transform: rotate(45deg);\n transform: rotate(45deg);\n -webkit-box-shadow: -0.18em 0 0 -0.03em;\n box-shadow: -0.18em 0 0 -0.03em;\n}\n.ol-select > div button {\n width: auto;\n padding: 0 .5em;\n float: right;\n font-weight: normal;\n height: 1.2em;\n line-height: 1.2em;\n}\n.ol-select .ol-delete {\n width: 1.5em;\n height: 1em;\n vertical-align: middle;\n display: inline-block;\n position: relative;\n cursor: pointer;\n}\n.ol-select .ol-delete:before {\n content:'\u0000d7';\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n width: 100%;\n text-align: center;\n font-weight: bold;\n}\n.ol-control.ol-select input {\n font-size: 1em;\n}\n.ol-control.ol-select select {\n font-size: 1em;\n max-width: 10em;\n}\n.ol-control.ol-select select option.ol-default {\n color: #999;\n font-style: italic;\n}\n.ol-control.ol-select > div {\n display: block;\n margin: .25em;\n}\n.ol-control.ol-select.ol-collapsed > div {\n display: none;\n}\n\n.ol-control.ol-select.ol-select-check {\n max-width: 20em;\n}\n.ol-control.ol-select label.ol-ext-check {\n margin-right: 1em;\n}\n.ol-control.ol-select label.ol-ext-toggle-switch span {\n font-size: 1.1em;\n}\n\n.ol-select ul {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n.ol-control.ol-select input[type=\"search\"],\n.ol-control.ol-select input[type=\"text\"] {\n width: 8em;\n}\n\n.ol-select .ol-autocomplete {\n display: inline;\n}\n.ol-select .ol-autocomplete ul {\n position: absolute;\n display: block;\n background: #fff;\n border: 1px solid #999;\n min-width: 10em;\n font-size: .85em;\n}\n.ol-select .ol-autocomplete ul li {\n padding: 0 .5em;\n}\n.ol-select .ol-autocomplete ul li:hover {\n color: #fff;\n background: rgba(0,60,136,.5);\n}\n.ol-select ul.ol-hidden {\n display: none;\n}\n\n.ol-select-multi li > div:hover,\n.ol-select-multi li > div.ol-control.ol-select {\n position: relative;\n top: unset;\n left: unset;\n background: transparent;\n}\n.ol-select-multi li > div > button,\n.ol-select-multi li > div .ol-ok {\n display: none;\n}\n.ol-select-multi li .ol-control.ol-select.ol-collapsed > div,\n.ol-select-multi li > div > div {\n display: block;\n}\n\n.ol-control.ol-status {\n top: 0;\n left: 0;\n background: rgba(0,0,0,.2);\n color: #fff;\n font-size: .9em;\n padding: .3em 3em;\n border-radius: 0;\n width: 100%;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n pointer-events: none!important;\n display: none;\n}\n.ol-control.ol-status.ol-visible {\n display: initial;\n}\n.ol-control.ol-status.ol-bottom {\n top: auto;\n bottom: 0;\n}\n.ol-control.ol-status.ol-left {\n top: 0;\n bottom: 0;\n padding: .3em .5em .3em 3em;\n width: auto;\n}\n.ol-control.ol-status.ol-right {\n top: 0;\n bottom: 0;\n left: auto;\n right: 0;\n padding: .3em 3em .3em .5em;\n width: auto;\n}\n.ol-control.ol-status.ol-center {\n top: 50%;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n}\n\n.ol-control.ol-storymap {\n top: .5em;\n left: .5em;\n bottom: .5em;\n max-width: 35%;\n border-radius: .5em;\n position: absolute;\n height: auto;\n background-color: rgba(255,255,255,.5);\n}\n.ol-storymap {\n overflow: hidden;\n padding: 0;\n height: 100%;\n position: relative;\n}\n.ol-storymap > div {\n overflow: hidden;\n padding: 0;\n height: 100%;\n position: relative;\n scroll-behavior: smooth;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.ol-storymap >div.ol-move {\n scroll-behavior: unset;\n}\n\n.ol-control.ol-storymap .chapter {\n position: relative;\n padding: .5em;\n overflow: hidden;\n}\n.ol-control.ol-storymap .chapter:last-child {\n margin-bottom: 100%;\n}\n.ol-storymap .chapter {\n cursor: pointer;\n opacity: .4;\n}\n.ol-storymap .chapter.ol-select {\n cursor: default;\n opacity: 1;\n background-color: rgba(255,255,255,.8);\n}\n\n.ol-storymap .ol-scroll-top,\n.ol-storymap .ol-scroll-next {\n position: relative;\n min-height: 1.7em;\n color: rgba(0,60,136,.5);\n text-align: center;\n cursor: pointer;\n}\n.ol-storymap .ol-scroll-next span {\n padding-bottom: 1.4em;\n display: block;\n}\n.ol-storymap .ol-scroll-top span {\n padding-top: 1.4em;\n display: block;\n}\n\n.ol-storymap .ol-scroll-top:before,\n.ol-storymap .ol-scroll-next:before {\n content: \"\";\n border: .3em solid currentColor;\n border-radius: .3em;\n border-color: transparent currentColor currentColor transparent;\n width: .8em;\n height: .8em;\n display: block;\n position: absolute;\n left: 50%;\n -webkit-transform: translateX(-50%) rotate(45deg);\n transform: translateX(-50%) rotate(45deg);\n -webkit-animation: ol-bounce-bottom 0.35s linear infinite alternate;\n animation: ol-bounce-bottom 0.35s linear infinite alternate;\n pointer-events: none;\n}\n.ol-storymap .ol-scroll-top:before {\n border-color: currentColor transparent transparent currentColor;\n -webkit-animation: ol-bounce-top 0.35s linear infinite alternate;\n animation: ol-bounce-top 0.35s linear infinite alternate;\n}\n\n@-webkit-keyframes ol-bounce-top{\n from {top: -.2em;}\n to {top: .5em;}\n}\n\n@keyframes ol-bounce-top{\n from {top: -.2em;}\n to {top: .5em;}\n}\n@-webkit-keyframes ol-bounce-bottom{\n from {bottom: -.2em;}\n to {bottom: .5em;}\n}\n@keyframes ol-bounce-bottom{\n from {bottom: -.2em;}\n to {bottom: .5em;}\n}\n\n.ol-storymap img[data-title] {\n cursor: pointer;\n}\n\n/* scrollLine / scrollbox */\n.ol-storymap.scrollLine,\n.ol-storymap.scrollBox {\n top: 0;\n bottom: 0;\n background-color: transparent;\n border-radius: 0;\n max-width: 40%;\n}\n.ol-storymap.scrollLine .chapter,\n.ol-storymap.scrollBox .chapter {\n background-color: #fff;\n margin: 100% 0;\n}\n.ol-storymap.scrollLine .chapter:first-child,\n.ol-storymap.scrollBox .chapter:first-child {\n margin-top: 3em;\n}\n.ol-storymap.scrollLine .chapter.ol-select,\n.ol-storymap.scrollLine .chapter,\n.ol-storymap.scrollBox .chapter.ol-select,\n.ol-storymap.scrollBox .chapter {\n opacity: 1;\n}\n\n.ol-storymap.scrollLine .ol-scrolldiv,\n.ol-storymap.scrollBox .ol-scrolldiv {\n padding-right: 30px;\n}\n.ol-storymap.scrollLine:before,\n.ol-storymap.scrollBox:before {\n content: \"\";\n position: absolute;\n width: 2px;\n height: 100%;\n top: 0;\n bottom: 0;\n right: 14px;\n background-color: #fff;\n}\n\n.ol-storymap.scrollLine .ol-scroll,\n.ol-storymap.scrollBox .ol-scroll {\n display: block!important;\n padding: 0;\n width: 1px;\n opacity: 1!important;\n right: 15px;\n overflow: visible;\n -webkit-transition: none;\n transition: none;\n}\n.ol-storymap.scrollLine .ol-scroll > div {\n background-color: transparent;\n overflow: visible;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n -webkit-box-shadow: unset;\n box-shadow: unset;\n}\n.ol-storymap.scrollLine .ol-scroll > div:before {\n content: \"\";\n position: absolute;\n width: 10px;\n height: 10px;\n border-radius: 50%;\n background-color: #0af;\n border: 2px solid #fff;\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n\n.ol-storymap.scrollBox .ol-scroll > div {\n display: none;\n}\n.ol-storymap.scrollBox .chapter:after {\n content: \"\";\n width: 20px;\n height: 20px;\n position: absolute;\n top: Min(30%, 5em);\n right: -24.5px;\n -webkit-box-shadow: 0 0 0 2px #fff, inset 0 0 0 15px #0af;\n box-shadow: 0 0 0 2px #fff, inset 0 0 0 15px #0af; \n border-radius: 50%;\n border: 5px solid transparent;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n z-index: 1;\n}\n\n.ol-swipe {\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n -ms-touch-action: none;\n touch-action: none;\n}\n\n.ol-swipe:before {\n content: \"\";\n position: absolute;\n top: -5000px;\n bottom: -5000px;\n left: 50%;\n width: 4px;\n background: #fff;\n z-index:-1;\n -webkit-transform: translate(-2px, 0);\n transform: translate(-2px, 0);\n}\n.ol-swipe.horizontal:before {\n left: -5000px;\n right: -5000px;\n top: 50%;\n bottom: auto;\n width: auto;\n height: 4px;\n}\n\n.ol-swipe,\n.ol-swipe button {\n cursor: ew-resize;\n}\n.ol-swipe.horizontal,\n.ol-swipe.horizontal button {\n cursor: ns-resize;\n}\n\n.ol-swipe:after,\n.ol-swipe button:before,\n.ol-swipe button:after {\n content: \"\";\n position: absolute;\n top: 25%;\n bottom: 25%;\n left: 50%;\n width: 2px;\n background: currentColor;\n transform: translate(-1px, 0);\n -webkit-transform: translate(-1px, 0);\n}\n.ol-swipe button:after {\n -webkit-transform: translateX(4px);\n transform: translateX(4px);\n}\n.ol-swipe button:before {\n -webkit-transform: translateX(-6px);\n transform: translateX(-6px);\n}\n\n.ol-control.ol-timeline {\n bottom: 0;\n left: 0;\n right: 0;\n -webkit-transition: .3s;\n transition: .3s;\n background-color: rgba(255,255,255,.4);\n}\n.ol-control.ol-timeline.ol-collapsed {\n -webkit-transform: translateY(100%);\n transform: translateY(100%);\n}\n.ol-timeline {\n overflow: hidden;\n padding: 2px 0 0;\n}\n.ol-timeline .ol-scroll {\n overflow: hidden;\n padding: 0;\n scroll-behavior: smooth;\n line-height: 1em;\n height: 6em;\n padding: 0 50%;\n}\n.ol-timeline .ol-scroll.ol-move {\n scroll-behavior: unset;\n}\n\n.ol-timeline.ol-hasbutton .ol-scroll {\n margin-left: 1.5em;\n padding: 0 calc(50% - .75em);\n}\n.ol-timeline .ol-buttons {\n display: none;\n position: absolute;\n top: 0;\n background: rgba(255,255,255,.5);\n width: 1.5em;\n bottom: 0;\n left: 0;\n z-index: 10;\n}\n.ol-timeline.ol-hasbutton .ol-buttons {\n display: block;\n}\n.ol-timeline .ol-buttons button {\n font-size: 1em;\n margin: 1px;\n position: relative;\n}\n.ol-timeline .ol-buttons .ol-zoom-in:before,\n.ol-timeline .ol-buttons .ol-zoom-out:before {\n content: \"+\";\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.ol-timeline .ol-buttons .ol-zoom-out:before{\n content: '\u2212';\n}\n\n.ol-timeline .ol-scroll > div {\n height: 100%;\n position: relative;\n}\n\n.ol-timeline .ol-scroll .ol-times {\n background: rgba(255,255,255,.5);\n height: 1em;\n bottom: 0;\n position: absolute;\n left: -1000px;\n right: -1000px;\n}\n.ol-timeline .ol-scroll .ol-time {\n position: absolute;\n font-size: .7em;\n color: #999;\n bottom: 0;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n}\n.ol-timeline .ol-scroll .ol-time.ol-year {\n color: #666;\n z-index: 1;\n}\n.ol-timeline .ol-scroll .ol-time:before {\n content: \"\";\n position: absolute;\n bottom: 1.2em;\n left: 50%;\n height: 500px;\n border-left: 1px solid currentColor;\n}\n\n.ol-timeline .ol-scroll .ol-features {\n position: absolute;\n top: 0;\n bottom: 1em;\n left: -200px;\n right: -1000px;\n margin: 0 0 0 200px;\n overflow: hidden;\n}\n\n.ol-timeline .ol-scroll .ol-feature {\n position: absolute;\n font-size: .7em;\n color: #999;\n top: 0;\n background: #fff;\n max-width: 3em;\n max-height: 2.4em;\n min-height: 1em;\n line-height: 1.2em;\n border: 1px solid #ccc;\n overflow: hidden;\n padding: 0 .5em 0 0;\n -webkit-transition: all .3s;\n transition: all .3s;\n cursor: pointer;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n\n.ol-timeline.ol-zoomhover .ol-scroll .ol-feature:hover,\n.ol-timeline.ol-zoomhover .ol-scroll .ol-feature.ol-select {\n z-index: 1;\n -webkit-transform: scale(1.2);\n transform: scale(1.2);\n background: #eee;\n /* max-width: 14em!important; */\n}\n\n/* Center */\n.ol-timeline .ol-center-date {\n display: none;\n position: absolute;\n left: 50%;\n height: 100%;\n width: 2px;\n bottom: 0;\n z-index: 2;\n pointer-events: none;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n background-color: #f00;\n opacity: .4;\n}\n.ol-timeline.ol-hasbutton .ol-center-date {\n left: calc(50% + .75em);\n}\n\n/* Show center */ \n.ol-timeline.ol-pointer .ol-center-date {\n display: block;\n}\n.ol-timeline.ol-pointer .ol-center-date:before, \n.ol-timeline.ol-pointer .ol-center-date:after {\n content: '';\n border: 0.3em solid transparent;\n border-width: .3em .25em;\n position: absolute;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n}\n.ol-timeline.ol-pointer .ol-center-date:before {\n border-top-color: #f00;\n top: 0;\n}\n.ol-timeline.ol-pointer .ol-center-date:after {\n border-bottom-color: #f00;\n bottom: 0\n}\n\n/* show interval */\n.ol-timeline.ol-interval .ol-center-date {\n display: block;\n background-color: transparent;\n border: 0 solid #000;\n border-width: 0 10000px;\n -webkit-box-sizing: content-box;\n box-sizing: content-box;\n opacity: .2;\n}\n.ol-control.ol-videorec {\n top: 0;\n left: 50%;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n white-space: nowrap;\n}\n\n.ol-control.ol-videorec button {\n position: relative;\n display: inline-block;\n vertical-align: middle;\n}\n\n.ol-control.ol-videorec button:before {\n content: \"\";\n position: absolute;\n top: 50%;\n left: 50%;\n width: .8em;\n height: .8em;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n background-color: currentColor;\n}\n.ol-control.ol-videorec button.ol-start:before {\n width: .9em;\n height: .9em;\n border-radius: 50%;\n background-color: #c00;\n}\n.ol-control.ol-videorec button.ol-pause:before {\n width: .2em;\n background-color: transparent;\n -webkit-box-shadow: -.2em 0, .2em 0;\n box-shadow: -.2em 0, .2em 0;\n}\n.ol-control.ol-videorec button.ol-resume:before {\n border-style: solid;\n background: transparent;\n width: auto;\n border-width: .4em 0 .4em .6em;\n border-color: transparent transparent transparent currentColor;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n\n.ol-control.ol-videorec button.ol-stop,\n.ol-control.ol-videorec button.ol-pause,\n.ol-control.ol-videorec button.ol-resume,\n.ol-control.ol-videorec[data-state=\"rec\"] .ol-start,\n.ol-control.ol-videorec[data-state=\"pause\"] .ol-start {\n display: none;\n}\n.ol-control.ol-videorec[data-state=\"rec\"] .ol-stop,\n.ol-control.ol-videorec[data-state=\"pause\"] .ol-stop,\n.ol-control.ol-videorec[data-state=\"rec\"] .ol-pause,\n.ol-control.ol-videorec[data-state=\"pause\"] .ol-resume {\n display: inline-block;\n}\n\n.ol-control.ol-wmscapabilities {\n top: .5em;\n right: 2.5em;\n}\n.ol-touch .ol-control.ol-wmscapabilities {\n right: 3em;\n}\n.ol-control.ol-wmscapabilities.ol-hidden {\n display: none;\n}\n.ol-control.ol-wmscapabilities button:before {\n content: \"+\";\n position: absolute;\n top: calc(50% - .35em);\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.ol-control.ol-wmscapabilities button:after {\n content: \"\";\n width: .75em;\n height: .75em;\n position: absolute;\n background: transparent;\n top: calc(50% - .05em);\n left: 50%;\n -webkit-transform: scaleY(.6) translate(-50%, -50%) rotate(45deg);\n transform: scaleY(.6) translate(-50%, -50%) rotate(45deg);\n -webkit-box-shadow: inset -.18em -.18em currentColor, -.4em .1em 0 -.25em currentColor, .1em -.35em 0 -.25em currentColor, .15em .15em currentColor;\n box-shadow: inset -.18em -.18em currentColor, -.4em .1em 0 -.25em currentColor, .1em -.35em 0 -.25em currentColor, .15em .15em currentColor;\n border-radius: .1em 0;\n border: .15em solid transparent;\n border-width: 0 .15em .15em 0;\n}\n\n.ol-wmscapabilities .ol-searching {\n opacity: .5;\n}\n.ol-wmscapabilities .ol-searching .ol-url:after{\n content: \"\";\n width: .7em;\n height: .7em;\n background-color: currentColor;\n position: absolute;\n top: 6em;\n border-radius: 50%;\n display: block;\n left: calc(50% - .35em);\n -webkit-box-shadow: 0 1em currentColor, 0 -1em currentColor, 1em 0 currentColor, -1em 0 currentColor;\n box-shadow: 0 1em currentColor, 0 -1em currentColor, 1em 0 currentColor, -1em 0 currentColor;\n -webkit-animation:ol-wmscapabilities-rotate 2s linear infinite;\n animation:ol-wmscapabilities-rotate 2s linear infinite;\n}\n@-webkit-keyframes ol-wmscapabilities-rotate { \n 100% { -webkit-transform:rotate(360deg); transform:rotate(360deg); } \n}\n@keyframes ol-wmscapabilities-rotate { \n 100% { -webkit-transform:rotate(360deg); transform:rotate(360deg); } \n}\n\n.ol-wmscapabilities .ol-url input {\n width: calc(100% - 10em);\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n min-width: Min(100%, 20em);\n}\n.ol-wmscapabilities .ol-url select {\n width: 2em;\n height: 100%;\n padding: 1px;\n}\n.ol-wmscapabilities .ol-url button {\n width: 7.5em;\n margin-left: .5em;\n}\n.ol-wmscapabilities .ol-result {\n display: none;\n margin-top: .5em;\n}\n.ol-wmscapabilities .ol-result.ol-visible {\n display: block;\n}\n\n.ol-wmscapabilities .ol-select-list {\n position: relative;\n border: 1px solid #369;\n overflow-x: hidden;\n width: calc(100% - 120px);\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n max-height: 14.5em;\n border-radius: 0;\n font-size: 1em;\n}\n.ol-wmscapabilities .ol-select-list option {\n padding: 0.1em .5em 0;\n cursor: pointer;\n width: 100%;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n.ol-wmscapabilities .ol-select-list .level-1 {\n padding-left: 1em;\n}\n.ol-wmscapabilities .ol-select-list .level-2 {\n padding-left: 1.5em;\n}\n.ol-wmscapabilities .ol-select-list .level-3 {\n padding-left: 2em;\n}\n.ol-wmscapabilities .ol-select-list .level-4 {\n padding-left: 2.5em;\n}\n.ol-wmscapabilities .ol-select-list .level-5 {\n padding-left: 3em;\n}\n\n.ol-wmscapabilities .ol-select-list .ol-info {\n font-style: italic;\n}\n.ol-wmscapabilities .ol-select-list .ol-title {\n background-color: rgba(0,60,136,.1);\n}\n.ol-wmscapabilities .ol-select-list option:hover {\n background-color: rgba(0,60,136,.5);\n color: #fff;\n}\n.ol-wmscapabilities .ol-select-list .selected {\n background-color: rgba(0,60,136,.7);\n color: #fff;\n}\n\n.ol-wmscapabilities .ol-preview {\n width: 100px;\n float: right;\n background: rgba(0,60,136,.1);\n color: #666;\n padding: 0 5px 5px;\n text-align: center;\n margin-left: 10px;\n}\n.ol-wmscapabilities .ol-preview.tainted {\n width: 100px;\n float: right;\n background: rgba(136,0,60,.1);\n color: #666;\n padding: 0 5px 5px;\n text-align: center;\n margin-left: 10px;\n}\n.ol-wmscapabilities .ol-preview img {\n width: 100%;\n display: block;\n background: #fff;\n}\n.ol-wmscapabilities .ol-legend {\n max-width: 100%;\n display: none;\n}\n.ol-wmscapabilities .ol-legend.visible {\n display: block;\n}\n.ol-wmscapabilities .ol-buttons {\n clear: both;\n text-align: right;\n}\n.ol-wmscapabilities .ol-data p {\n margin: 0;\n}\n.ol-wmscapabilities .ol-data p.ol-title {\n font-weight: bold;\n margin: 1em 0 .5em;\n}\n.ol-wmscapabilities .ol-error {\n color: #800;\n}\n\n.ol-wmscapabilities ul.ol-wmsform {\n display: none;\n list-style: none;\n padding: 0;\n}\n.ol-wmscapabilities ul.ol-wmsform.visible {\n display: block;\n}\n.ol-wmscapabilities .ol-wmsform label {\n display: inline-block;\n text-align: right;\n width: calc(40% - .5em);\n margin-right: .5em;\n}\n.ol-wmscapabilities .ol-wmsform input {\n display: inline-block;\n width: 60%;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.ol-wmscapabilities .ol-wmsform input[type=\"checkbox\"] {\n width: auto;\n}\n.ol-wmscapabilities .ol-wmsform button {\n float: right;\n margin: 1em 0;\n}\n\n.ol-wmscapabilities ul.ol-wmsform li[data-param=\"extent\"] input {\n width: calc(60% - 2em);\n}\n.ol-wmscapabilities ul.ol-wmsform li[data-param=\"extent\"] button {\n position: relative;\n width: 2em;\n height: 1.6em;\n margin: 0;\n vertical-align: middle;\n color: #444;\n}\n.ol-wmscapabilities ul.ol-wmsform li[data-param=\"extent\"] button:before,\n.ol-wmscapabilities ul.ol-wmsform li[data-param=\"extent\"] button:after {\n content: \"\";\n position: absolute;\n width: .25em;\n height: .9em;\n border: .1em solid currentColor;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%) skewY(-15deg);\n transform: translate(-50%, -50%) skewY(-15deg);\n}\n.ol-wmscapabilities ul.ol-wmsform li[data-param=\"extent\"] button:after {\n -webkit-transform: translateX(.4em) translate(-50%, -50%) skewY(15deg);\n transform: translateX(.4em) translate(-50%, -50%) skewY(15deg);\n -webkit-box-shadow: -0.8em 0.25em;\n box-shadow: -0.8em 0.25em;\n}\n\n.ol-ext-dialog.ol-wmscapabilities form {\n width: 600px;\n min-height: 15em;\n top: 15%;\n -webkit-transform: translate(-50%, -15%);\n transform: translate(-50%, -15%);\n}\n.ol-ext-dialog.ol-wmscapabilities .ol-content {\n max-height: calc(100vh - 6em);\n}\n\n.ol-ext-dialog.ol-wmtscapabilities [data-param=\"map\"] {\n display: none;\n}\n.ol-ext-dialog [data-param=\"style\"] {\n display: none;\n}\n.ol-ext-dialog.ol-wmtscapabilities [data-param=\"style\"] {\n display: list-item;\n}\n.ol-ext-dialog.ol-wmtscapabilities [data-param=\"proj\"],\n.ol-ext-dialog.ol-wmtscapabilities [data-param=\"version\"] {\n opacity: .6;\n pointer-events: none;\n}\n\n.ol-ext-dialog.ol-wmscapabilities button.ol-wmsform {\n width: 1.8em;\n text-align: center;\n}\n.ol-ext-dialog.ol-wmscapabilities button.ol-wmsform:before {\n content: \"+\";\n}\n.ol-ext-dialog.ol-wmscapabilities .ol-form button.ol-wmsform:before {\n content: \"-\";\n}\n\n.ol-ext-dialog.ol-wmscapabilities .ol-form button.ol-load,\n.ol-ext-dialog.ol-wmscapabilities .ol-form .ol-legend {\n display: none;\n}\n.ol-ext-dialog.ol-wmscapabilities .ol-form ul.ol-wmsform {\n display: block;\n clear: both;\n}\n.ol-target-overlay .ol-target \n{\tborder: 1px solid transparent;\n\t-webkit-box-shadow: 0 0 1px 1px #fff;\n\t box-shadow: 0 0 1px 1px #fff;\n\tdisplay: block;\n\theight: 20px;\n\twidth: 0;\n}\n\n.ol-target-overlay .ol-target:after,\n.ol-target-overlay .ol-target:before\n{\tcontent:\"\";\n\tborder: 1px solid #369;\n\t-webkit-box-shadow: 0 0 1px 1px #fff;\n\t box-shadow: 0 0 1px 1px #fff;\n\tdisplay: block;\n\twidth: 20px;\n\theight: 0;\n\tposition:absolute;\n\ttop:10px;\n\tleft:-10px;\n}\n.ol-target-overlay .ol-target:after\n{\t-webkit-box-shadow: none;\tbox-shadow: none;\n\theight: 20px;\n\twidth: 0;\n\ttop:0px;\n\tleft:0px;\n}\n\n.ol-overlaycontainer .ol-touch-cursor {\n /* human fingertips are typically 16x20 mm = 45x57 pixels\n source: http://touchlab.mit.edu/publications/2003_009.pdf\n */\n width: 56px;\n height: 56px;\n margin: 6px;\n border-radius: 50%;\n cursor: pointer;\n background: rgba(255,255,255,.4);\n -webkit-box-shadow: inset 0 0 0 5px #369;\n box-shadow: inset 0 0 0 5px #369;\n}\n\n.ol-overlaycontainer .ol-touch-cursor:after {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n width: 50%;\n height: 50%;\n background: radial-gradient(circle at 100% 100%, transparent, transparent 70%, #369 70%, #369);\n -webkit-transform-origin: 100% 100%;\n transform-origin: 100% 100%;\n}\n.ol-overlaycontainer .ol-touch-cursor-center {\n margin-top: 16px;\n margin-left: -28px;\n}\n.ol-overlaycontainer .ol-touch-cursor-center:after {\n -webkit-transform: rotate(45deg);\n transform: rotate(45deg);\n}\n.ol-overlaycontainer .ol-touch-cursor-right {\n margin-left: -62px;\n}\n.ol-overlaycontainer .ol-touch-cursor-right:after {\n -webkit-transform: rotate(90deg);\n transform: rotate(90deg);\n}\n\n.ol-overlaycontainer .ol-touch-cursor .ol-button {\n position: absolute;\n color: #369;\n height: 55%;\n width: 55%;\n border-radius: 50%;\n cursor: pointer;\n background: rgba(255,255,255,.4);\n -webkit-box-shadow: inset 0 0 0 3px currentColor;\n box-shadow: inset 0 0 0 3px currentColor;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%) scale(0);\n transform: translate(-50%, -50%) scale(0);\n -webkit-transition: all .5s, opacity 0s, background 0s;\n transition: all .5s, opacity 0s, background 0s;\n overflow: hidden;\n}\n.ol-overlaycontainer .ol-touch-cursor.active.disable .ol-button {\n opacity: .8;\n background: rgba(51, 102, 153, .2);\n}\n.ol-overlaycontainer .ol-touch-cursor.active .ol-button {\n -webkit-transform: translate(-50%, -50%) scale(1);\n transform: translate(-50%, -50%) scale(1);\n}\n.ol-overlaycontainer .ol-touch-cursor.active .ol-button-0 {\n top: -18%;\n left: 118%;\n}\n.ol-overlaycontainer .ol-touch-cursor.active .ol-button-1 {\n top: 50%;\n left: 140%;\n}\n.ol-overlaycontainer .ol-touch-cursor.active .ol-button-2 {\n top: 120%;\n left: 120%;\n}\n.ol-overlaycontainer .ol-touch-cursor.active .ol-button-3 {\n top: 140%;\n left: 50%;\n}\n.ol-overlaycontainer .ol-touch-cursor.active .ol-button-4 {\n top: 118%;\n left: -18%;\n}\n/* extra buttons */\n.ol-overlaycontainer .ol-touch-cursor.active .ol-button-5 {\n top: 50%;\n left: -40%;\n}\n.ol-overlaycontainer .ol-touch-cursor.active .ol-button-6 {\n top: -18%;\n left: -18%;\n}\n.ol-overlaycontainer .ol-touch-cursor.active .ol-button-7 {\n top: -40%;\n left: 50%;\n}\n\n.ol-overlaycontainer .ol-touch-cursor .ol-button:before {\n content: \"\";\n width: 1.5em;\n height: 1em;\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n line-height: 1em;\n text-align: center;\n}\n.ol-overlaycontainer .ol-touch-cursor .ol-button.ol-button-add:before,\n.ol-overlaycontainer .ol-touch-cursor .ol-button.ol-button-remove:before {\n content: \"\u2212\";\n line-height: .95em;\n font-size: 1.375em;\n font-weight: bold;\n}\n.ol-overlaycontainer .ol-touch-cursor .ol-button.ol-button-add:before {\n content: \"+\";\n}\n.ol-overlaycontainer .ol-touch-cursor .ol-button.ol-button-x:before {\n content: \"\u0000D7\";\n font-size: 1.2em;\n font-weight: bold;\n}\n.ol-overlaycontainer .ol-touch-cursor .ol-button.ol-button-move:before {\n content: \"\u00BA5\";\n font-size: 1.2em;\n}\n.ol-overlaycontainer .ol-touch-cursor .ol-button.ol-button-check:before {\n content: \"\u00B93\";\n font-weight: bold;\n}\n\n.ol-overlaycontainer .ol-touch-cursor.nodrawing .ol-button.ol-button-x,\n.ol-overlaycontainer .ol-touch-cursor.nodrawing .ol-button.ol-button-remove,\n.ol-overlaycontainer .ol-touch-cursor.nodrawing .ol-button.ol-button-check {\n opacity: .8;\n background: rgba(51, 102, 153, .2);\n}\n\n.ol-overlaycontainer .ol-touch-cursor .ol-button > div {\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n\n.ol-overlaycontainer .ol-touch-cursor .ol-button-type:before {\n content: \"\u0011CE\";\n font-weight: bold;\n}\n\n\n\n/* remove outline on focus */\n.mapboxgl-canvas:focus {\n outline: none;\n}\n.ol-perspective-map {\n position: absolute;\n left: 50%;\n top: 50%;\n width: 200%;\n height: 200%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.ol-perspective-map .ol-layer {\n z-index: -1!important; /* bug using Chrome ? */\n}\n.ol-perspective-map .ol-layers {\n -webkit-transform: translateY(0) perspective(200px) rotateX(0deg) scaleY(1);\n transform: translateY(0) perspective(200px) rotateX(0deg) scaleY(1);\n}\n\n.ol-perspective-map .ol-overlaycontainer,\n.ol-perspective-map .ol-overlaycontainer-stopevent {\n width: 50%!important;\n height: 50%!important;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n\n.ol-overlay-container .ol-magnify \n{\tbackground: rgba(0,0,0, 0.5);\n\tborder:3px solid #369;\n\tborder-radius: 50%;\n\theight: 150px;\n\twidth: 150px;\n\toverflow: hidden;\n\t-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);\n\t box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);\n\tposition:relative;\n\tz-index:0;\n}\n\n.ol-overlay-container .ol-magnify:before \n{\tborder-radius: 50%;\n\t-webkit-box-shadow: 0 0 40px 2px rgba(0, 0, 0, 0.25) inset;\n\t box-shadow: 0 0 40px 2px rgba(0, 0, 0, 0.25) inset;\n\tcontent: \"\";\n\tdisplay: block;\n\theight: 100%;\n\tleft: 0;\n\tposition: absolute;\n\ttop: 0;\n\twidth: 100%;\n\tz-index: 1;\n}\n\n.ol-overlay-container .ol-magnify:after \n{\n\tborder-radius: 50%;\n\t-webkit-box-shadow: 0 0 20px 7px rgba(255, 255, 255, 1);\n\t box-shadow: 0 0 20px 7px rgba(255, 255, 255, 1);\n\tcontent: \"\";\n\tdisplay: block;\n\theight: 0;\n\tleft: 23%;\n\tposition: absolute;\n\ttop: 20%;\n\twidth: 20%;\n\tz-index: 1;\n\ttransform: rotate(-40deg);\n\t-webkit-transform: rotate(-40deg);\n}\n/** popup animation using visible class\n*/\n.ol-popup.anim {\n visibility: hidden;\n}\n\n.ol-popup.anim.visible {\n visibility: visible;\n}\n/** No transform when visible \n*/\n.ol-popup.anim.visible > div {\n visibility: visible;\n -webkit-transform: none;\n transform: none;\n -webkit-animation: ol-popup_bounce 0.4s ease 1;\n animation: ol-popup_bounce 0.4s ease 1;\n}\n\n@-webkit-keyframes ol-popup_bounce {\n from { -webkit-transform: scale(0); transform: scale(0); }\n 50% { -webkit-transform: scale(1.1); transform: scale(1.1) }\n 80% { -webkit-transform: scale(0.95); transform: scale(0.95) }\n to { -webkit-transform: scale(1); transform: scale(1); }\n}\n\n@keyframes ol-popup_bounce {\n from { -webkit-transform: scale(0); transform: scale(0); }\n 50% { -webkit-transform: scale(1.1); transform: scale(1.1) }\n 80% { -webkit-transform: scale(0.95); transform: scale(0.95) }\n to { -webkit-transform: scale(1); transform: scale(1); }\n}\n\n/** Transform Origin */\n.ol-popup.anim.ol-popup-bottom.ol-popup-left > div {\n -webkit-transform-origin:0 100%;\n transform-origin:0 100%;\n}\n.ol-popup.anim.ol-popup-bottom.ol-popup-right > div {\n -webkit-transform-origin:100% 100%;\n transform-origin:100% 100%;\n}\n.ol-popup.anim.ol-popup-bottom.ol-popup-center > div {\n -webkit-transform-origin:50% 100%;\n transform-origin:50% 100%;\n}\n.ol-popup.anim.ol-popup-top.ol-popup-left > div {\n -webkit-transform-origin:0 0;\n transform-origin:0 0;\n}\n.ol-popup.anim.ol-popup-top.ol-popup-right > div {\n -webkit-transform-origin:100% 0;\n transform-origin:100% 0;\n}\n.ol-popup.anim.ol-popup-top.ol-popup-center > div {\n -webkit-transform-origin:50% 0;\n transform-origin:50% 0;\n}\n.ol-popup.anim.ol-popup-middle.ol-popup-left > div {\n -webkit-transform-origin:0 50%;\n transform-origin:0 50%;\n}\n.ol-popup.anim.ol-popup-middle.ol-popup-right > div {\n -webkit-transform-origin:100% 50%;\n transform-origin:100% 50%;\n}\n\n.ol-overlaycontainer-stopevent {\n /* BOUG ol6.1 to enable DragOverlay interaction \n position: initial!important;\n */\n}\n\n/** ol.popup */\n.ol-popup {\n font-size:0.9em;\n -webkit-user-select: none; \n -moz-user-select: none; \n -ms-user-select: none; \n user-select: none;\n}\n.ol-popup .ol-popup-content {\n overflow:hidden;\n cursor: default;\n padding: 0.25em 0.5em;\n}\n.ol-popup.hasclosebox .ol-popup-content {\n margin-right: 1.7em;\n}\n.ol-popup .ol-popup-content:after {\n clear: both;\n content: \"\";\n display: block;\n font-size: 0;\n height: 0;\n}\n\n/** Anchor position */\n.ol-popup .anchor {\n display: block;\n width: 0px;\n height: 0px;\n background:red;\n position: absolute;\n margin: -11px 22px;\n pointer-events: none;\n}\n.ol-popup .anchor:after,\n.ol-popup .anchor:before {\n position:absolute;\n}\n.ol-popup-right .anchor:after,\n.ol-popup-right .anchor:before {\n right:0;\n}\n.ol-popup-top .anchor { top:0; }\n.ol-popup-bottom .anchor { bottom:0; }\n.ol-popup-right .anchor { right:0; }\n.ol-popup-left .anchor { left:0; }\n.ol-popup-center .anchor { \n left:50%; \n margin-left: 0!important;\n}\n.ol-popup-middle .anchor { \n top:50%; \n margin-top: 0!important;\n}\n.ol-popup-center.ol-popup-middle .anchor { \n display:none; \n}\n\n/** Fixed popup */\n.ol-popup.ol-fixed {\n margin: 0!important;\n top: .5em!important;\n right: .5em!important;\n left: auto!important;\n bottom: auto!important;\n -webkit-transform: none!important;\n transform: none!important;\n}\n.ol-popup.ol-fixed .anchor {\n display: none;\n}\n.ol-popup.ol-fixed.anim > div {\n -webkit-animation: none;\n animation: none;\n}\n\n.ol-popup .ol-fix {\n width: 1em;\n height: .9em;\n background: #fff;\n position: relative;\n float: right;\n margin: .2em;\n cursor: pointer;\n}\n.ol-popup .ol-fix:before {\n content: \"\";\n width: .8em;\n height: .7em;\n display: block;\n border: .1em solid #666;\n border-right-width: 0.1em;\n border-right-width: .3em;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n margin: .1em;\n}\n\n/** Add a shadow to the popup */\n.ol-popup.shadow {\n -webkit-box-shadow: 2px 2px 2px 2px rgba(0,0,0,0.5);\n box-shadow: 2px 2px 2px 2px rgba(0,0,0,0.5);\n}\n\n/** Close box */\n.ol-popup .closeBox {\n background-color: rgba(0, 60, 136, 0.5);\n color: #fff;\n border: 0;\n border-radius: 2px;\n cursor: pointer;\n float: right;\n font-size: 0.9em;\n font-weight: 700;\n width: 1.4em;\n height: 1.4em;\n margin: 5px 5px 0 0;\n padding: 0;\n position: relative;\n display:none;\n}\n.ol-popup.hasclosebox .closeBox {\n display:block;\n}\n\n.ol-popup .closeBox:hover {\n background-color: rgba(0, 60, 136, 0.7);\n}\n/* the X */\n.ol-popup .closeBox:after {\n content: \"\u0000d7\";\n font-size:1.5em;\n top: 50%;\n left: 0;\n right: 0;\n width: 100%;\n text-align: center;\n line-height: 1em;\n margin: -0.5em 0;\n position: absolute;\n}\n\n/** Modify touch poup */\n.ol-popup.modifytouch {\n background-color: #eee;\n}\n.ol-popup.modifytouch .ol-popup-content {\t\n padding: 0 0.25em;\n font-size: 0.85em;\n white-space: nowrap;\n}\n.ol-popup.modifytouch .ol-popup-content a {\n text-decoration: none;\n}\n\n/** Tool tips popup*/\n.ol-popup.tooltips {\n background-color: #ffa;\n}\n.ol-popup.tooltips .ol-popup-content{\n padding: 0 0.25em;\n font-size: 0.85em;\n white-space: nowrap;\n}\n\n/** Default popup */\n.ol-popup.default > div {\n background-color: #fff;\n border:1px solid #69f;\n border-radius: 5px;\n}\n.ol-popup.default {\n margin: -11px 0;\n -webkit-transform: translate(0, -22px);\n transform: translate(0, -22px);\n}\n.ol-popup-top.ol-popup.default {\n margin: 11px 0;\n -webkit-transform: none;\n transform: none;\n}\n.ol-popup-left.default {\n margin: -11px -22px;\n -webkit-transform: translate(0, -22px);\n transform: translate(0, -22px);\n}\n.ol-popup-top.ol-popup-left.default {\n margin: 11px -22px;\n -webkit-transform: none;\n transform: none;\n}\n.ol-popup-right.default {\n margin: -11px 22px;\n -webkit-transform: translate(44px, -22px);\n transform: translate(44px, -22px);\n}\n.ol-popup-top.ol-popup-right.default {\n margin: 11px 22px;\n -webkit-transform: translate(44px, 0);\n transform: translate(44px, 0);\n}\n.ol-popup-middle.default {\n margin:0 10px;\n -webkit-transform: none;\n transform: none;\n}\n.ol-popup-middle.ol-popup-right.default {\n margin:0 -10px;\n -webkit-transform: translate(-20px, 0);\n transform: translate(-20px, 0);\n}\n\n.ol-popup.default .anchor {\n color: #69f;\n}\n.ol-popup.default .anchor:after,\n.ol-popup.default .anchor:before {\n content:\"\";\n border-color: currentColor transparent;\n border-style: solid;\n border-width: 11px;\n margin: 0 -11px;\n}\n.ol-popup.default .anchor:after {\n border-color: #fff transparent;\n border-width: 11px;\n margin: 2px -11px;\n}\n\n.ol-popup-top.default .anchor:before,\n.ol-popup-top.default .anchor:after {\n border-top:0;\n top:0;\n}\n\n.ol-popup-bottom.default .anchor:before,\n.ol-popup-bottom.default .anchor:after {\n border-bottom:0;\n bottom:0;\n}\n\n.ol-popup-middle.default .anchor:before {\n margin: -11px -33px;\n border-color: transparent currentColor;\n}\n.ol-popup-middle.default .anchor:after {\n margin: -11px -31px;\n border-color: transparent #fff;\n}\n.ol-popup-middle.ol-popup-left.default .anchor:before,\n.ol-popup-middle.ol-popup-left.default .anchor:after {\n border-left:0;\n}\n.ol-popup-middle.ol-popup-right.default .anchor:before,\n.ol-popup-middle.ol-popup-right.default .anchor:after {\n border-right:0;\n}\n\n/** Placemark popup */\n.ol-popup.placemark {\n color: #c00;\n margin: -.65em 0;\n -webkit-transform: translate(0, -1.3em);\n transform: translate(0, -1.3em);\n}\n.ol-popup.placemark > div {\n position: relative;\n font-size: 15px;\t\n background-color: #fff;\n border: 0;\n -webkit-box-shadow: inset 0 0 0 0.45em;\n box-shadow: inset 0 0 0 0.45em;\n width: 2em;\n height: 2em;\n border-radius: 50%;\n min-width: unset;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.ol-popup.placemark .ol-popup-content {\n overflow: hidden;\n cursor: default;\n text-align: center;\n padding: .25em 0;\n width: 1em;\n height: 1em;\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n line-height: 1em;\n}\n.ol-popup.placemark .anchor {\n margin: 0;\n}\n\n.ol-popup.placemark .anchor:before {\n content: \"\";\n margin: -.5em -.5em;\n background: transparent;\n width: 1em;\n height: .5em;\n border-radius: 50%;\n -webkit-box-shadow: 0 1em 0.5em rgba(0,0,0,.5);\n box-shadow: 0 1em 0.5em rgba(0,0,0,.5);\n}\n.ol-popup.placemark .anchor:after {\n content: \"\";\n border-color: currentColor transparent;\n border-style: solid;\n border-width: 1em .7em 0;\n margin: -.75em -.7em;\n bottom:0;\n}\n\n/** Placemark Shield */\n.ol-popup.placemark.shield > div {\n border-radius: .2em;\n}\n\n.ol-popup.placemark.shield .anchor:after {\n border-width: .8em 1em 0;\n margin: -.7em -1em;\n}\n\n/** Placemark Blazon */\n.ol-popup.placemark.blazon > div {\n border-radius: .2em;\n}\n\n/** Placemark Needle/Pushpin */\n.ol-popup.placemark.pushpin {\t\n margin: -2.2em 0;\n -webkit-transform: translate(0, -4em);\n transform: translate(0, -4em);\n}\n.ol-popup.placemark.pushpin > div {\t\n border-radius: 0;\n background: transparent!important;\n -webkit-box-shadow: inset 2em 0 currentColor;\n box-shadow: inset 2em 0 currentColor;\n width: 1.1em;\n}\n.ol-popup.placemark.pushpin > div:before {\n content: \"\";\n width: 1.3em;\n height: 1.5em;\n border-style: solid;\n position: absolute;\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n border-color: currentColor transparent;\n border-width: .3em .5em .5em;\n pointer-events: none;\n}\n\n.ol-popup.placemark.needle {\t\n margin: -2em 0;\n -webkit-transform: translate(0, -4em);\n transform: translate(0, -4em);\n}\n.ol-popup.placemark.pushpin .anchor,\n.ol-popup.placemark.needle .anchor {\n margin: -1.2em;\n}\n.ol-popup.placemark.pushpin .anchor:after,\n.ol-popup.placemark.needle .anchor:after {\n border-style: solid;\n border-width: 2em .15em 0;\n margin: -.55em -0.2em;\n width: .1em;\n}\n.ol-popup.placemark.pushpin .anchor:before,\n.ol-popup.placemark.needle .anchor:before {\n margin: -.75em -.5em;\n}\n\n/** Placemark Flag */\n.ol-popup.placemark.flagv {\n margin: -2em 1em;\n -webkit-transform: translate(0, -4em);\n transform: translate(0, -4em);\n}\n.ol-popup.placemark.flagv > div {\n border-radius: 0;\n -webkit-box-shadow: none;\n box-shadow: none;\n background-color: transparent;\n}\n.ol-popup.placemark.flagv > div:before {\n content: \"\";\n border: 1em solid transparent;\n position: absolute;\n border-left: 2em solid currentColor;\n pointer-events: none;\n}\n.ol-popup.placemark.flagv .anchor {\n margin: -1.4em;\n}\n\n.ol-popup.placemark.flag {\t\n margin: -2em 1em;\n -webkit-transform: translate(0, -4em);\n transform: translate(0, -4em);\n}\n.ol-popup.placemark.flag > div {\t\n border-radius: 0;\n -webkit-transform-origin: 0% 150%!important;\n transform-origin: 0% 150%!important;\n}\n.ol-popup.placemark.flag .anchor {\n margin: -1.4em;\n}\n.ol-popup.placemark.flagv .anchor:after, \n.ol-popup.placemark.flag .anchor:after {\n border-style: solid;\n border-width: 2em .15em 0;\n margin: -.55em -1em;\n width: .1em;\n}\n.ol-popup.placemark.flagv .anchor:before,\n.ol-popup.placemark.flag .anchor:before {\n margin: -.75em -1.25em;\n}\n\n.ol-popup.placemark.flag.finish {\n margin: -2em 1em;\n}\n.ol-popup.placemark.flag.finish > div {\n background-image: \n linear-gradient(45deg, currentColor 25%, transparent 25%, transparent 75%, currentColor 75%, currentColor), \n linear-gradient(45deg, currentColor 25%, transparent 25%, transparent 75%, currentColor 75%, currentColor);\n background-size: 1em 1em;\n background-position: .5em 0, 0 .5em;\n -webkit-box-shadow: inset 0 0 0 .25em;\n box-shadow: inset 0 0 0 .25em;\n}\n\n/** Black popup */\n.ol-popup.black .closeBox {\n background-color: rgba(0,0,0, 0.5);\n border-radius: 5px;\n color: #f80;\n}\n.ol-popup.black .closeBox:hover {\n background-color: rgba(0,0,0, 0.7);\n color:#da2;\n}\n\n.ol-popup.black {\n margin: -20px 0;\n -webkit-transform: translate(0, -40px);\n transform: translate(0, -40px);\n}\n.ol-popup.black > div{\n background-color: rgba(0,0,0,0.6);\n border-radius: 5px;\n color:#fff;\n}\n.ol-popup-top.ol-popup.black {\n margin: 20px 0;\n -webkit-transform: none;\n transform: none;\n}\n.ol-popup-left.black {\n margin: -20px -22px;\n -webkit-transform: translate(0, -40px);\n transform: translate(0, -40px);\n}\n.ol-popup-top.ol-popup-left.black {\n margin: 20px -22px;\n -webkit-transform: none;\n transform: none;\n}\n.ol-popup-right.black {\n margin: -20px 22px;\n -webkit-transform: translate(44px, -40px);\n transform: translate(44px, -40px);\n}\n.ol-popup-top.ol-popup-right.black {\n margin: 20px 22px;\n -webkit-transform: translate(44px, 0);\n transform: translate(44px, 0);\n}\n.ol-popup-middle.black {\n margin: 0 11px;\n -webkit-transform: none;\n transform: none;\n}\n.ol-popup-left.ol-popup-middle.black {\n -webkit-transform: none;\n transform: none;\n}\n.ol-popup-right.ol-popup-middle.black {\n margin:0 -11px;\n -webkit-transform: translate(-22px, 0);\n transform: translate(-22px, 0);\n}\n\n.ol-popup.black .anchor {\n margin: -20px 11px;\n color: rgba(0,0,0,0.6);\n} \n.ol-popup.black .anchor:before {\n content:\"\";\n border-color: currentColor transparent;\n border-style: solid;\n border-width: 20px 11px;\n}\n\n.ol-popup-top.black .anchor:before {\n border-top:0;\n top:0;\n}\n\n.ol-popup-bottom.black .anchor:before {\n border-bottom:0;\n bottom:0;\n}\n\n.ol-popup-middle.black .anchor:before {\n margin: -20px -22px;\n border-color: transparent currentColor;\n}\n.ol-popup-middle.ol-popup-left.black .anchor:before {\n border-left:0;\n}\n.ol-popup-middle.ol-popup-right.black .anchor:before {\n border-right:0;\n}\n\n.ol-popup-center.black .anchor:before {\n margin: 0 -10px;\n}\n\n\n/** Green tips popup */\n.ol-popup.tips .closeBox {\n background-color: #f00;\n border-radius: 50%;\n color: #fff;\n width:1.2em;\n height:1.2em;\n}\n.ol-popup.tips .closeBox:hover {\n background-color: #f40;\n}\n\n.ol-popup.tips {\n margin: -20px 0;\n -webkit-transform: translate(0,-40px);\n transform: translate(0,-40px);\n}\n.ol-popup.tips > div {\n background-color: #cea;\n border: 5px solid #ad7;\n border-radius: 5px;\n color:#333;\n}\n.ol-popup-top.ol-popup.tips {\n margin: 20px 0;\n -webkit-transform: none;\n transform: none;\n}\n.ol-popup-left.tips {\n margin: -20px -22px;\n -webkit-transform: translate(0,-40px);\n transform: translate(0,-40px);\n}\n.ol-popup-top.ol-popup-left.tips {\n margin: 20px -22px;\n -webkit-transform: none;\n transform: none;\n}\n.ol-popup-right.tips {\n margin: -20px 22px;\n -webkit-transform: translate(44px,-40px);\n transform: translate(44px,-40px);\n}\n.ol-popup-top.ol-popup-right.tips {\n margin: 20px 22px;\n -webkit-transform: translate(44px,0);\n transform: translate(44px,0);\n}\n.ol-popup-middle.tips {\n margin:0;\n -webkit-transform: none;\n transform: none;\n}\n.ol-popup-left.ol-popup-middle.tips {\n margin: 0 22px;\n -webkit-transform: none;\n transform: none;\n}\n.ol-popup-right.ol-popup-middle.tips {\n margin: 0 -22px;\n -webkit-transform: translate(-44px,0);\n transform: translate(-44px,0);\n}\n\n.ol-popup.tips .anchor {\n margin: -18px 22px;\n color: #ad7;\n} \n.ol-popup.tips .anchor:before {\n content:\"\";\n border-color: currentColor transparent;\n border-style: solid;\n border-width: 20px 11px;\n}\n\n.ol-popup-top.tips .anchor:before {\n border-top:0;\n top:0;\n}\n.ol-popup-bottom.tips .anchor:before {\n border-bottom:0;\n bottom:0;\n}\n.ol-popup-center.tips .anchor:before {\n border-width: 20px 6px;\n margin: 0 -6px;\n}\n.ol-popup-left.tips .anchor:before {\n border-left:0;\n margin-left:0;\n}\n.ol-popup-right.tips .anchor:before {\n border-right:0;\n margin-right:0;\n}\n\n.ol-popup-middle.tips .anchor:before {\n margin: -6px -41px;\n border-color: transparent currentColor;\n border-width:6px 20px;\n}\n.ol-popup-middle.ol-popup-left.tips .anchor:before {\n border-left:0;\n}\n.ol-popup-middle.ol-popup-right.tips .anchor:before {\n border-right:0;\n}\n\n/** Warning popup */\n.ol-popup.warning .closeBox {\n background-color: #f00;\n border-radius: 50%;\n color: #fff;\n font-size: 0.83em;\n}\n.ol-popup.warning .closeBox:hover {\n background-color: #f40;\n}\n\n.ol-popup.warning {\n background-color: #fd0;\n border-radius: 3px;\n border:4px dashed #f00;\n margin:20px 0;\n color:#900;\n margin: -28px 10px;\n -webkit-transform: translate(0, -56px);\n transform: translate(0, -56px);\n}\n.ol-popup-top.ol-popup.warning {\n margin: 28px 10px;\n -webkit-transform: none;\n transform: none;\n}\n.ol-popup-left.warning {\n margin: -28px -22px;\n -webkit-transform: translate(0, -56px);\n transform: translate(0, -56px);\n}\n.ol-popup-top.ol-popup-left.warning {\n margin: 28px -22px;\n -webkit-transform: none;\n transform: none;\n}\n.ol-popup-right.warning {\n margin: -28px 22px;\n -webkit-transform: translate(44px, -56px);\n transform: translate(44px, -56px);\n}\n.ol-popup-top.ol-popup-right.warning {\n margin: 28px 22px;\n -webkit-transform: translate(44px, 0);\n transform: translate(44px, 0);\n}\n.ol-popup-middle.warning {\n margin:0;\n -webkit-transform: none;\n transform: none;\n}\n.ol-popup-left.ol-popup-middle.warning {\n margin:0 22px;\n -webkit-transform: none;\n transform: none;\n}\n.ol-popup-right.ol-popup-middle.warning {\n margin:0 -22px;\n -webkit-transform: translate(-44px, 0);\n transform: translate(-44px, 0);\n}\n\n.ol-popup.warning .anchor {\n margin: -33px 7px;\n} \n.ol-popup.warning .anchor:before {\n content:\"\";\n border-color: #f00 transparent;\n border-style: solid;\n border-width: 30px 11px;\n}\n\n.ol-popup-top.warning .anchor:before {\n border-top:0;\n top:0;\n}\n.ol-popup-bottom.warning .anchor:before {\n border-bottom:0;\n bottom:0;\n}\n\n.ol-popup-center.warning .anchor:before {\n margin: 0 -21px;\n}\n.ol-popup-middle.warning .anchor:before {\n margin: -10px -33px;\n border-color: transparent #f00;\n border-width:10px 22px;\n}\n.ol-popup-middle.ol-popup-left.warning .anchor:before {\n border-left:0;\n}\n.ol-popup-middle.ol-popup-right.warning .anchor:before {\n border-right:0;\n}\n\n.ol-popup .ol-popupfeature table {\n width: 100%;\n}\n.ol-popup .ol-popupfeature table td {\n max-width: 25em;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ol-popup .ol-popupfeature table td img {\n max-width: 100px;\n max-height: 100px;\n}\n.ol-popup .ol-popupfeature tr:nth-child(2n+1) {\n background-color: #eee;\n}\n.ol-popup .ol-popupfeature .ol-zoombt {\n border: 0;\n width: 2em;\n height: 2em;\n display: inline-block;\n color: rgba(0,60,136,.5);\n position: relative;\n background: transparent;\n outline: none;\n}\n.ol-popup .ol-popupfeature .ol-zoombt:before {\n content: \"\";\n position: absolute;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 1em;\n height: 1em;\n background-color: transparent;\n border: .17em solid currentColor;\n border-radius: 100%;\n top: .3em;\n left: .3em;\n}\n.ol-popup .ol-popupfeature .ol-zoombt:after {\n content: \"\";\n position: absolute;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n top: 1.35em;\n left: 1.15em;\n border-width: .1em .3em;\n border-style: solid;\n border-radius: .03em;\n -webkit-transform: rotate(45deg);\n transform: rotate(45deg);\n -webkit-box-shadow: -0.2em 0 0 -0.04em;\n box-shadow: -0.2em 0 0 -0.04em;\n}\n\n.ol-popup .ol-popupfeature .ol-count{\n float: right;\n margin: .25em 0;\n}\n.ol-popup .ol-popupfeature .ol-prev,\n.ol-popup .ol-popupfeature .ol-next {\n border-style: solid;\n border-color: transparent rgba(0,60,136,.5);\n border-width: .5em 0 .5em .5em;\n display: inline-block;\n vertical-align: bottom;\n margin: 0 .5em;\n cursor: pointer;\n}\n.ol-popup .ol-popupfeature .ol-prev{\n border-width: .5em .5em .5em 0;\n}\n\n.ol-popup.tooltips.black {\n background-color: transparent;\n}\n.ol-popup.tooltips.black > div {\n -webkit-transform: scaleY(1.3);\n transform: scaleY(1.3);\n padding: .2em .5em;\n background-color: rgba(0,0,0, 0.5);\n}\n.ol-popup-middle.tooltips.black .anchor:before {\n border-width: 5px 10px;\n margin: -5px -21px;\n}\n\n.ol-popup-center.ol-popup-middle { \n margin: 0;\n}\n\n.ol-popup-top.ol-popup-left.ol-fixPopup,\n.ol-popup-top.ol-popup-right.ol-fixPopup,\n.ol-popup.ol-fixPopup {\n margin: 0;\n}\n\n.ol-miniscroll {\n position: relative;\n}\n.ol-miniscroll:hover .ol-scroll {\n opacity: .5;\n -webkit-transition: opacity 1s;\n transition: opacity 1s;\n}\n.ol-miniscroll .ol-scroll {\n -ms-touch-action: none;\n touch-action: none;\n position: absolute;\n right: 0px;\n width: 9px;\n height: auto;\n max-height: 100%;\n opacity: 0;\n border-radius: 9px;\n -webkit-transition: opacity 1s .5s;\n transition: opacity 1s .5s;\n overflow: hidden;\n z-index: 1;\n}\n.ol-miniscroll .ol-scroll > div {\n -ms-touch-action: none;\n touch-action: none;\n position: absolute;\n top: 0;\n right: 0px;\n width: 9px;\n height: 9px;\n -webkit-box-shadow: inset 10px 0 currentColor;\n box-shadow: inset 10px 0 currentColor;\n border-radius: 9px / 12px;\n border: 2px solid transparent;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n cursor: pointer;\n}\n.ol-miniscroll .ol-scroll.ol-100pc {\n opacity: 0;\n}\n\n.ol-viewport canvas.ol-fixedoverlay {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n/* Toggle Switch */\n.ol-ext-toggle-switch {\n cursor: pointer;\n position: relative;\n}\n.ol-ext-toggle-switch input[type=\"radio\"],\n.ol-ext-toggle-switch input[type=\"checkbox\"] {\n /* display: none; */\n opacity: 0;\n width: 0;\n height: 0;\n margin: 0;\n padding: 0;\n display: inline-block;\n}\n.ol-ext-toggle-switch span {\n color: rgba(0,60,136,.5);\n position: relative;\n cursor: pointer;\n background-color: #ccc;\n -webkit-transition: .4s, background-color 0s, border-color 0s, -webkit-box-shadow 0s;\n transition: .4s, background-color 0s, border-color 0s, -webkit-box-shadow 0s;\n transition: .4s, background-color 0s, border-color 0s, box-shadow 0s;\n transition: .4s, background-color 0s, border-color 0s, box-shadow 0s, -webkit-box-shadow 0s;\n width: 1.6em;\n height: 1em;\n display: inline-block;\n border-radius: 1em;\n font-size: 1.3em;\n vertical-align: middle;\n margin: -.15em .2em .15em;\n}\n.ol-ext-toggle-switch span:before {\n position: absolute;\n content: \"\";\n height: 1em;\n width: 1em;\n left: 0;\n top: 50%;\n background-color: #fff;\n -webkit-transition: .4s;\n transition: .4s;\n border-radius: 1em;\n display: block;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n border: 2px solid #ccc;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.ol-ext-toggle-switch:hover span {\n background-color: #999;\n}\n.ol-ext-toggle-switch:hover span:before {\n border-color: #999;\n}\n\n.ol-ext-toggle-switch input:checked + span {\n background-color: currentColor;\n}\n.ol-ext-toggle-switch input:checked + span:before {\n -webkit-transform: translate(.6em,-50%);\n transform: translate(.6em,-50%);\n border-color: currentColor;\n}\n\n/* Check/radio buttons */\n.ol-ext-check {\n position: relative;\n display: inline-block;\n}\n.ol-ext-check input {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n height: 0;\n width: 0;\n margin: 0;\n padding: 0;\n display: inline-block;\n}\n.ol-ext-check span {\n color: rgba(0,60,136,.5);\n position: relative;\n display: inline-block;\n width: 1em;\n height: 1em;\n margin: -.1em .5em .1em;\n background-color: #ccc;\n vertical-align: middle;\n}\n.ol-ext-check:hover span {\n background-color: #999;\n}\n.ol-ext-checkbox input:checked ~ span {\n background-color: currentColor;\n}\n.ol-ext-checkbox input:checked ~ span:before {\n content: \"\";\n position: absolute;\n width: .5em;\n height: .8em;\n top: 50%;\n left: 50%;\n -webkit-transform: translateY(-.1em) translate(-50%, -50%) rotate(45deg);\n transform: translateY(-.1em) translate(-50%, -50%) rotate(45deg);\n -webkit-box-shadow: inset -0.2em -0.2em #fff;\n box-shadow: inset -0.2em -0.2em #fff;\n}\n\n.ol-ext-radio span {\n width: 1.1em;\n height: 1.1em;\n border-radius: 50%;\n}\n.ol-ext-radio:hover input:checked ~ span {\n background-color: #ccc;\n}\n.ol-ext-radio input:checked ~ span:before {\n content: \"\";\n position: absolute;\n width: 50%;\n height: 50%;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n border-radius: 50%;\n background-color: currentColor;\n}\n\n/* focus */\n.ol-ext-toggle-switch input:focus-visible + span {\n -webkit-box-shadow: inset 0 0 0 1px #fff, 0 0 0 1.8px rgba(0,0,0,.8);\n box-shadow: inset 0 0 0 1px #fff, 0 0 0 1.8px rgba(0,0,0,.8);\n}\n.ol-ext-check input:focus-visible + span {\n -webkit-box-shadow: inset 0 0 0 1px #fff, 0 0 0 1.8px rgba(0,0,0,.8);\n box-shadow: inset 0 0 0 1px #fff, 0 0 0 1.8px rgba(0,0,0,.8);\n}\n.ol-collection-list {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.ol-collection-list li {\n position: relative;\n padding: 0 2em 0 1em;\n}\n.ol-collection-list li:hover {\n background-color: rgba(0,60,136,.2);\n}\n.ol-collection-list li.ol-select {\n background-color: rgba(0,60,136,.5);\n color: #fff;\n}\n\n.ol-collection-list li .ol-order {\n position: absolute;\n -ms-touch-action: none;\n touch-action: none;\n right: 0;\n top: 50%;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n width: 2em;\n height: 100%;\n cursor: n-resize;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.ol-collection-list li .ol-order:before {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n width: 18px;\n height: 2px;\n background-color: currentColor;\n -webkit-box-shadow: 0 5px, 0 -5px;\n box-shadow: 0 5px, 0 -5px;\n border-radius: 2px;\n}\n\n/* Accessibility */\n.ol-collection-list li > input.ol-input-focus {\n width: 0;\n height: 0;\n opacity: 0;\n position: absolute;\n z-index: -1;\n}\n.ol-collection-list li:has(> input.ol-input-focus:focus) {\n outline: 2px solid #369;\n}\n\n.ol-ext-colorpicker.ol-popup {\n width: 2em;\n height: 1.5em;\n background-color: transparent;\n background-image: \n linear-gradient(45deg, #aaa 25%, transparent 25%, transparent 75%, #aaa 75%), \n linear-gradient(45deg, #aaa 25%, transparent 25%, transparent 75%, #aaa 75%);\n background-size: 10px 10px;\n background-position: 0 -1px, 5px 4px;\n}\n\n.ol-ext-colorpicker .ol-tabbar {\n background-color: #eee;\n border-bottom: 1px solid #999;\n display: none;\n}\n.ol-ext-colorpicker.ol-tab .ol-tabbar {\n display: block;\n}\n\n.ol-ext-colorpicker .ol-tabbar > div {\n display: inline-block;\n background-color: #fff;\n padding: 0 .5em;\n border: 1px solid #999;\n border-radius: 2px 2px 0 0;\n position: relative;\n top: 1px;\n cursor: pointer;\n}\n.ol-ext-colorpicker .ol-tabbar > div:nth-child(1) {\n border-bottom-color: #fff;\n}\n.ol-ext-colorpicker.ol-picker-tab .ol-tabbar > div:nth-child(1) {\n border-bottom-color: #999;\n}\n.ol-ext-colorpicker.ol-picker-tab .ol-tabbar > div:nth-child(2) {\n border-bottom-color: #fff;\n}\n\n.ol-ext-colorpicker.ol-popup.ol-tab .ol-popup {\n width: 180px;\n}\n.ol-ext-colorpicker.ol-tab .ol-palette {\n margin: 0 10px;\n}\n.ol-ext-colorpicker.ol-tab .ol-container {\n display: none;\n}\n.ol-ext-colorpicker.ol-tab.ol-picker-tab .ol-container {\n display: block;\n}\n.ol-ext-colorpicker.ol-tab.ol-picker-tab .ol-palette {\n display: none;\n}\n\n.ol-ext-colorpicker.ol-popup .ol-popup {\n width: 340px;\n}\n\n.ol-ext-colorpicker.ol-popup .ol-vignet {\n content: \"\";\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n border: 0;\n background-color: currentColor;\n pointer-events: none;\n}\n\n.ol-ext-colorpicker .ol-container {\n position: relative;\n display: inline-block;\n vertical-align: top;\n}\n.ol-ext-colorpicker .ol-cursor {\n pointer-events: none;\n}\n\n.ol-ext-colorpicker .ol-picker {\n position: relative;\n cursor: crosshair;\n width: 150px;\n height: 150px;\n border: 5px solid #fff;\n background-color: currentColor;\n background-image: -webkit-gradient(linear, left top, left bottom, from(0), color-stop(#000), to(transparent)),\n -webkit-gradient(linear, left top, right top, from(#fff), to(transparent));\n background-image: linear-gradient(0, #000, transparent),\n linear-gradient(90deg, #fff, transparent);\n}\n.ol-ext-colorpicker .ol-picker .ol-cursor {\n position: absolute;\n left: 50%;\n top: 50%;\n border: 1px solid rgba(0,0,0,.7);\n -webkit-box-shadow: 0 0 0 1px rgba(255,255,255,.7);\n box-shadow: 0 0 0 1px rgba(255,255,255,.7);\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n width: 10px;\n height: 10px;\n border-radius: 50%;\n}\n\n.ol-ext-colorpicker .ol-slider {\n position: relative;\n cursor: crosshair;\n background-color: #fff;\n height: 10px;\n width: 150px;\n margin: 5px 0 10px;\n border: 5px solid #fff;\n border-width: 0 5px;\n background-image: \n linear-gradient(45deg, #aaa 25%, transparent 25%, transparent 75%, #aaa 75%), \n linear-gradient(45deg, #aaa 25%, transparent 25%, transparent 75%, #aaa 75%);\n background-size: 10px 10px;\n background-position: 0 -1px, 5px 4px;\n}\n.ol-ext-colorpicker .ol-slider > div {\n width: 100%;\n height: 100%;\n background-image: linear-gradient(45deg, transparent, #fff);\n pointer-events: none;\n}\n.ol-ext-colorpicker .ol-slider .ol-cursor {\n position: absolute;\n width: 4px;\n height: 12px;\n border: 1px solid #000;\n top: 50%;\n left: 0;\n background: transparent;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.ol-ext-colorpicker .ol-tint {\n position: absolute;\n cursor: crosshair;\n width: 10px;\n height: 150px;\n border: 5px solid #fff;\n border-width: 5px 0;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n top: 0;\n right: 5px;\n background-image: -webkit-gradient(linear, left top, left bottom, from(0), color-stop(#f00), color-stop(#f0f), color-stop(#00f), color-stop(#0ff), color-stop(#0f0), color-stop(#ff0), to(#f00));\n background-image: linear-gradient(0, #f00, #f0f, #00f, #0ff, #0f0, #ff0, #f00)\n}\n.ol-ext-colorpicker .ol-tint .ol-cursor {\n position: absolute;\n top: 0;\n left: 50%;\n border: 1px solid #000;\n height: 4px;\n width: 12px;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n\n.ol-ext-colorpicker .ol-clear {\n position: absolute;\n border: 2px solid #999;\n right: 4px;\n top: 163px;\n width: 10px;\n height: 10px;\n}\n.ol-ext-colorpicker .ol-clear:before,\n.ol-ext-colorpicker .ol-clear:after {\n content: \"\";\n position: absolute;\n width: 15px;\n height: 2px;\n background-color: #999;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%) rotate(45deg);\n transform: translate(-50%, -50%) rotate(45deg);\n}\n.ol-ext-colorpicker .ol-clear:after {\n -webkit-transform: translate(-50%, -50%) rotate(-45deg);\n transform: translate(-50%, -50%) rotate(-45deg);\n}\n\n.ol-ext-colorpicker.ol-nopacity .ol-slider,\n.ol-ext-colorpicker.ol-nopacity .ol-clear {\n display: none;\n}\n.ol-ext-colorpicker.ol-nopacity .ol-alpha {\n display: none;\n}\n\n.ol-ext-colorpicker .ol-rgb {\n position: relative;\n padding: 5px;\n width: 170px;\n display: none;\n}\n.ol-ext-colorpicker .ol-rgb input {\n width: 25%;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n padding: 0 0 0 2px;\n border: 1px solid #999;\n border-radius: 2px;\n font-size: 13px;\n}\n.ol-ext-colorpicker .ol-rgb input:nth-child(1) {\n\tbackground-color: rgba(255,0,0,.1);\n}\n.ol-ext-colorpicker .ol-rgb input:nth-child(2) {\n\tbackground-color: rgba(0,255,0,.1);\n}\n.ol-ext-colorpicker .ol-rgb input:nth-child(3) {\n\tbackground-color: rgba(0,0,255,.12);\n}\n\n.ol-ext-colorpicker button,\n.ol-ext-colorpicker .ol-txt-color {\n font-size: 13px;\n margin: 0 5px 5px;\n text-align: center;\n width: 170px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n padding: 0;\n border: 1px solid #999;\n border-radius: 2px;\n display: block;\n}\n.ol-ext-colorpicker .ol-txtcolor {\n width: 170px;\n margin: 0 5px;\n}\n.ol-ext-colorpicker .ol-txtcolor input.ol-txt-color {\n width: 100%;\n margin: 0;\n}\n.ol-ext-colorpicker.eyedropper .ol-txtcolor input.ol-txt-color {\n width: calc(100% - 2em);\n display: inline-block;\n margin: 0;\n height: 2em;\n}\n.ol-ext-colorpicker button {\n background-color: #eee;\n}\n.ol-ext-colorpicker button:hover {\n background-color: #e9e9e9;\n}\n.ol-ext-colorpicker button.ol-eyedropper {\n position: relative;\n width: 2em;\n height: 2em;\n display: inline-block;\n margin: 0;\n vertical-align: middle;\n}\n.ol-ext-colorpicker button.ol-eyedropper::before {\n content: \"\";\n position: absolute;\n width: 100%;\n height: 100%;\n -webkit-mask-image: url(\"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20width='24'%20height='24'%3e%3cpath%20d='m18.203%203.676%202.121%202.121a1%201%200%200%201%200%201.414l-2.828%202.829%201.767%201.768-1.414%201.414-1.414-1.414L7.243%2021H3v-4.243l9.192-9.192-1.414-1.414%201.414-1.414%201.768%201.767%202.829-2.828a1%201%200%200%201%201.414%200Zm-4.596%205.303-8.564%208.564%201.414%201.414%208.564-8.564-1.414-1.414Z'/%3e%3c/svg%3e\");\n mask-image: url(\"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20width='24'%20height='24'%3e%3cpath%20d='m18.203%203.676%202.121%202.121a1%201%200%200%201%200%201.414l-2.828%202.829%201.767%201.768-1.414%201.414-1.414-1.414L7.243%2021H3v-4.243l9.192-9.192-1.414-1.414%201.414-1.414%201.768%201.767%202.829-2.828a1%201%200%200%201%201.414%200Zm-4.596%205.303-8.564%208.564%201.414%201.414%208.564-8.564-1.414-1.414Z'/%3e%3c/svg%3e\");\n -webkit-mask-size: 100% 100%;\n mask-size: 100% 100%;\n background-color: #999;\n top: 0;\n left: 0;\n}\n\n.ol-ext-colorpicker .ol-txt-color.ol-error {\n background-color: rgba(255,0,0,.2);\n}\n\n.ol-ext-colorpicker .ol-palette {\n padding: 2px;\n display: inline-block;\n width: 152px;\n}\n.ol-ext-colorpicker .ol-palette > div {\n width: 15px;\n height: 15px;\n display: inline-block;\n background-image: \n linear-gradient(45deg, #aaa 25%, transparent 25%, transparent 75%, #aaa 75%), \n linear-gradient(45deg, #aaa 25%, transparent 25%, transparent 75%, #aaa 75%);\n background-size: 10px 10px;\n background-position: 0 0, 5px 5px;\n margin: 2px;\n -webkit-box-shadow: 0 0 2px 0px #666;\n box-shadow: 0 0 2px 0px #666;\n border-radius: 1px;\n cursor: pointer;\n position: relative;\n}\n.ol-ext-colorpicker .ol-palette > div:before {\n content: \"\";\n position: absolute;\n background-color: currentColor;\n width: 100%;\n height: 100%;\n}\n.ol-ext-colorpicker .ol-palette > div.ol-select:after {\n content: \"\";\n position: absolute;\n width: 6px;\n height: 12px;\n -webkit-box-shadow: 1px 1px #fff, 2px 2px #000;\n box-shadow: 1px 1px #fff, 2px 2px #000;\n top: 30%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%) rotate(45deg);\n transform: translate(-50%, -50%) rotate(45deg);\n}\n.ol-ext-colorpicker .ol-palette > div:hover {\n -webkit-box-shadow: 0 0 2px 1px #d90;\n box-shadow: 0 0 2px 1px #d90;\n}\n.ol-ext-colorpicker .ol-palette hr {\n margin: 0;\n}\n\n.ol-input-hidden {\n position: absolute;\n width: 0;\n height: 0;\n opacity: 0;\n padding: 0;\n margin: 0;\n display: block;\n}\n\n.ol-input-popup {\n display: inline-block;\n position: relative;\n}\n.ol-input-popup .ol-popup {\n position: absolute;\n -webkit-box-shadow: 1px 1px 3px 1px #999;\n box-shadow: 1px 1px 3px 1px #999;\n background-color: #fff;\n z-index: 1;\n display: none;\n left: -5px;\n padding: 0;\n margin: 0;\n list-style: none;\n white-space: nowrap;\n}\n.ol-input-popup.ol-hover:hover .ol-popup,\n.ol-input-popup.ol-focus .ol-popup {\n display: block;\n}\n.ol-input-popup.ol-right .ol-popup {\n left: auto;\n right: -5px;\n}\n.ol-input-popup.ol-middle .ol-popup {\n top: 50%;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n}\n\n.ol-input-popup .ol-popup li {\n position: relative;\n padding: 10px 5px;\n}\n\n.ol-input-popup li:hover {\n background-color: #ccc;\n}\n.ol-input-popup li.ol-selected {\n background-color: #ccc;\n}\n\n.ol-input-popup.ol-fixed:hover .ol-popup,\n.ol-input-popup.ol-fixed .ol-popup {\n position: relative;\n left: 0;\n -webkit-box-shadow: unset;\n box-shadow: unset;\n background-color: transparent;\n display: inline-block;\n vertical-align: middle;\n}\n.ol-input-popup.ol-fixed.ol-left .ol-popup {\n float: left;\n}\n\n.ol-input-popup > div {\n position: relative;\n display: inline-block;\n vertical-align: middle;\n border-radius: 2px;\n border: 1px solid #999;\n padding: 3px 20px 3px 10px\n}\n.ol-input-popup > div:before {\n position: absolute;\n content: \"\";\n right: 5px;\n top: 50%;\n border: 5px solid transparent;\n border-top: 5px solid #999;\n}\n\n.ol-ext-popup-input {\n display: inline-block;\n vertical-align: top;\n}\n.ol-ext-popup-input.ol-popup {\n position: relative;\n width: 2em;\n height: 1.5em;\n display: inline-block;\n border: 3px solid #fff;\n border-right-width: 1em;\n -webkit-box-shadow: 0 0 2px 1px #666;\n box-shadow: 0 0 2px 1px #666;\n border-radius: 2px;\n -webkit-box-sizing: content-box;\n box-sizing: content-box;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n vertical-align: middle;\n}\n.ol-ext-popup-input.ol-popup:after {\n content: \"\";\n position: absolute;\n border: .5em solid #aaa;\n border-width: .5em .3em 0;\n border-color: #999 transparent;\n right: -.8em;\n top: 50%;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n pointer-events: none;\n}\n\n.ol-ext-popup-input * {\n -webkit-box-sizing: content-box;\n box-sizing: content-box;\n}\n\n.ol-ext-popup-input.ol-popup .ol-popup {\n position: absolute;\n top: 100%;\n min-width: 3em;\n min-height: 3em;\n left: 0;\n -webkit-box-shadow: 1px 1px 3px 1px #999;\n box-shadow: 1px 1px 3px 1px #999;\n display: block;\n background-color: #fff;\n display: none;\n z-index: 1;\n}\n.ol-ext-popup-input.ol-popup .ol-popup.ol-visible {\n display: block;\n}\n\n.ol-ext-popup-input.ol-popup-fixed .ol-popup {\n position: fixed;\n top: auto;\n left: auto;\n}\n\n.ol-input-popup.ol-size li {\n display: table-cell;\n height: 100%;\n padding: 5px;\n vertical-align: middle;\n}\n\n.ol-input-popup.ol-size li > * {\n background-color: #369;\n border-radius: 50%;\n vertical-align: middle;\n width: 1em;\n height: 1em;\n}\n\n.ol-input-popup.ol-size li > .ol-option-0 {\n position: relative;\n width: 1em;\n height: 1em;\n border: 2px solid currentColor;\n color: #aaa;\n background-color: transparent;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.ol-input-popup.ol-size li > *:before {\n position: absolute;\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.ol-input-popup.ol-size li > .ol-option-0:before {\n content: \"\";\n width: 1em;\n height: 2px;\n background-color: #aaa;\n -webkit-transform: translate(-50%, -50%) rotate(-45deg);\n transform: translate(-50%, -50%) rotate(-45deg);\n}\n\n.ol-input-slider {\n display: inline-block;\n position: relative;\n}\n.ol-input-slider .ol-popup {\n position: absolute;\n -webkit-box-shadow: 1px 1px 3px 1px #999;\n box-shadow: 1px 1px 3px 1px #999;\n background-color: #fff;\n z-index: 1;\n display: none;\n left: -5px;\n}\n.ol-input-slider.ol-right .ol-popup {\n left: auto;\n right: -5px;\n}\n.ol-input-slider.ol-hover:hover .ol-popup,\n.ol-input-slider.ol-focus .ol-popup {\n display: block;\n white-space: nowrap;\n}\n.ol-input-slider.ol-hover:hover .ol-popup > *,\n.ol-input-slider.ol-focus .ol-popup > * {\n display: inline-block;\n vertical-align: middle;\n}\n.ol-input-slider.ol-hover:hover .ol-popup > .ol-before,\n.ol-input-slider.ol-focus .ol-popup > .ol-before {\n margin-left: 10px;\n}\n.ol-input-slider.ol-hover:hover .ol-popup > .ol-after,\n.ol-input-slider.ol-focus .ol-popup > .ol-after {\n margin-right: 10px;\n}\n.ol-input-slider .ol-slider {\n display: inline-block;\n vertical-align: middle;\n position: relative;\n width: 100px;\n height: 3px;\n border: 0 solid transparent;\n border-width: 10px 15px;\n -webkit-box-shadow: inset 0 0 0 1px #999;\n box-shadow: inset 0 0 0 1px #999;\n -webkit-box-sizing: content-box;\n box-sizing: content-box;\n cursor: pointer;\n}\n\n.ol-input-slider .ol-slider > .ol-cursor {\n position: absolute;\n width: 5px;\n height: 10px;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n background-color: #999;\n pointer-events: none;\n}\n.ol-input-range .ol-slider {\n cursor: default;\n width: 150px;\n}\n.ol-input-range .ol-slider > .ol-cursor {\n pointer-events: all;\n cursor: pointer;\n width: 10px;\n border-radius: 50%;\n background-color: rgb(0,60,136);\n}\n.ol-input-range.ol-moving .ol-slider > .ol-cursor {\n pointer-events: none;\n}\n.ol-input-range .ol-slider > .ol-back {\n position: absolute;\n top: 50%;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n left: 30%;\n right: 20%;\n height: 100%;\n background-color: rgb(0,60,136);\n pointer-events: none;\n}\n\n.ol-input-slider.ol-fixed:hover .ol-popup,\n.ol-input-slider.ol-fixed .ol-popup {\n position: relative;\n left: 0;\n -webkit-box-shadow: unset;\n box-shadow: unset;\n background-color: transparent;\n display: inline-block;\n vertical-align: middle;\n}\n.ol-input-slider.ol-fixed.ol-left .ol-popup {\n float: left;\n}\n\n/* Grow */\n.ol-input-slider.ol-size .ol-slider {\n height: auto;\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.ol-input-slider.ol-size .ol-slider .ol-back {\n width: 0;\n color: #aaa;\n border: 0 solid transparent;\n border-width: 0 0 20px 100px;\n border-color: currentColor transparent;\n pointer-events: none;\n}\n\n.ol-input-slider.ol-size .ol-slider > .ol-cursor {\n width: 2px;\n height: calc(100% + 4px);\n border-width: 5px 3px;\n border-style: solid;\n border-color: #f00 transparent;\n -o-border-image: initial;\n border-image: initial;\n background-color: transparent;\n -webkit-box-shadow: inset 3px 0px #f00;\n box-shadow: inset 3px 0px #f00;\n}\n\n.ol-input-popup.ol-width li {\n padding: 5px;\n}\n\n\n.ol-input-popup.ol-width li > * {\n background-color: #369;\n width: 100px;\n height: 1em;\n}\n\n.ol-input-popup.ol-width li > .ol-option-0 {\n position: relative;\n height: 1px;\n background-image: linear-gradient(90deg,#aaa 2px, transparent 2px);\n background-color: transparent;\n background-size: 4px;\n}\n`);\n document.adoptedStyleSheets.push(styles);\n ", "import { renderTable } from '#dom'\nimport type { WSIViewerInteractions } from '../interactions/WSIViewerInteractions'\nimport type { ImageViewData } from '#plots/wsiviewer/viewModel/ImageViewData.ts'\nimport type Settings from '#plots/wsiviewer/Settings.ts'\n\nexport class WSIAnnotationsRenderer {\n\tsettings: Settings\n\tinteractions: WSIViewerInteractions\n\twsiApp: any\n\n\tconstructor(wsiApp: any, settings: Settings, wsiinteractions: WSIViewerInteractions) {\n\t\tthis.wsiApp = wsiApp\n\t\tthis.settings = settings\n\t\tthis.interactions = wsiinteractions\n\t}\n\n\trender(holder: any, imageViewData: ImageViewData) {\n\t\tholder.select('div[id=\"annotations-table\"]').remove()\n\t\tif (!imageViewData.tilesTable) return\n\t\tconst selectedColor = '#fcfc8b'\n\t\tconst selectedRowId = 'selected-annotation-row'\n\t\trenderTable({\n\t\t\tcolumns: imageViewData.tilesTable.columns,\n\t\t\trows: imageViewData.tilesTable.rows,\n\t\t\tdiv: holder\n\t\t\t\t.append('div')\n\t\t\t\t.attr('id', 'annotations-table')\n\t\t\t\t.style('margins', '20px')\n\t\t\t\t.style('display', 'inline-block'),\n\t\t\theader: { allowSort: true },\n\t\t\tshowLines: false,\n\t\t\thoverEffects: (tr, row) => {\n\t\t\t\tconst selectedIdx = this.settings.activeAnnotation\n\t\t\t\tconst rowIdx = row[0].value as number\n\t\t\t\tconst isSelected = selectedIdx === rowIdx\n\t\t\t\tconst origColor = tr.style('background-color') || 'transparent'\n\t\t\t\t//Show selected row in yellow on render\n\t\t\t\ttr.style('background-color', isSelected ? selectedColor : origColor)\n\t\t\t\tif (isSelected) {\n\t\t\t\t\ttr.attr('id', selectedRowId)\n\t\t\t\t}\n\t\t\t\ttr.style('outline', 'none') //Remove the default outline on click\n\n\t\t\t\ttr.on('click', () => {\n\t\t\t\t\tthis.wsiApp.app.dispatch({\n\t\t\t\t\t\ttype: 'plot_edit',\n\t\t\t\t\t\tid: this.wsiApp.id,\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tsettings: {\n\t\t\t\t\t\t\t\trenderWSIViewer: false,\n\t\t\t\t\t\t\t\trenderAnnotationTable: true,\n\t\t\t\t\t\t\t\tactiveAnnotation: rowIdx\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\n\t\t// Ensure the selected row is visible after the table is rendered.\n\t\t// Use requestAnimationFrame to run after DOM paint.\n\t\tconst selectedIdx = this.settings.activeAnnotation\n\t\tif (Number.isInteger(selectedIdx)) {\n\t\t\tconst tableDiv = holder.select('div#annotations-table')\n\t\t\tif (!tableDiv.empty()) {\n\t\t\t\trequestAnimationFrame(() => {\n\t\t\t\t\tconst container = tableDiv.node() as HTMLElement | null\n\t\t\t\t\tif (!container) return\n\t\t\t\t\tconst rows = Array.from(container.querySelectorAll('tr'))\n\t\t\t\t\tfor (const tr of rows) {\n\t\t\t\t\t\tconst firstTd = tr.querySelector('td:first-child')\n\t\t\t\t\t\tif (!firstTd) continue\n\t\t\t\t\t\tconst idx = Number.parseInt(firstTd.textContent?.trim() ?? '', 10)\n\t\t\t\t\t\tif (Number.isNaN(idx)) continue\n\t\t\t\t\t\tif (idx === selectedIdx) {\n\t\t\t\t\t\t\t// scrollIntoView to ensure the selected row is visible\n\t\t\t\t\t\t\t;(tr as HTMLElement).scrollIntoView({ block: 'nearest', inline: 'nearest' })\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\n\t\treturn holder\n\t}\n}\n", "import type TileLayer from 'ol/layer/Tile'\nimport type Zoomify from 'ol/source/Zoomify'\nimport type Settings from '#plots/wsiviewer/Settings.ts'\nimport type { WSIViewerInteractions } from '#plots/wsiviewer/interactions/WSIViewerInteractions.ts'\nimport { icons, Menu } from '#dom'\n\nexport class ThumbnailRenderer {\n\tconstructor() {}\n\n\tpublic render(\n\t\tholder: any,\n\t\tthumbnailsContainer: any,\n\t\tlayers: Array<TileLayer<Zoomify> | null>,\n\t\tsetting: Settings,\n\t\twsiViewerInteractions: WSIViewerInteractions,\n\t\tnumTotalFiles: number\n\t) {\n\t\tif (!thumbnailsContainer) {\n\t\t\t// First-time initialization\n\t\t\tthumbnailsContainer = holder\n\t\t\t\t.append('div')\n\t\t\t\t.attr('id', 'thumbnails')\n\t\t\t\t.style('display', 'none') // Initially hidden\n\t\t\t\t.attr('data-testid', 'sjpp-thumbnails')\n\t\t\t\t.style('width', '600px')\n\t\t\t\t.style('height', '80px')\n\t\t\t\t.style('display', 'flex')\n\t\t\t\t.style('margin-left', '20px')\n\t\t\t\t.style('margin-bottom', '20px')\n\n\t\t\t// Placeholder for left arrow, if needed\n\t\t\tconst leftIconHolder = thumbnailsContainer.append('div').style('display', 'flex').style('align-items', 'center')\n\t\t\t//To show truncated names in tooltip on hover\n\t\t\tconst tooltip = new Menu()\n\n\t\t\t// Calculate the range of thumbnails to display\n\t\t\tconst startIndex = setting.thumbnailRangeStart\n\t\t\tconst endIndex = Math.min(setting.thumbnailRangeStart + setting.numDisplayedThumbnails, layers.length)\n\n\t\t\tfor (let i = startIndex; i < endIndex; i++) {\n\t\t\t\tconst layer = layers[i]\n\t\t\t\tif (!layer) continue // Skip unloaded layers\n\t\t\t\tconst isActive = i === setting.displayedImageIndex\n\t\t\t\tconst thumbnail = thumbnailsContainer\n\t\t\t\t\t.append('div')\n\t\t\t\t\t.attr('id', `thumbnail${i}`)\n\t\t\t\t\t.style('width', setting.thumbnailWidth)\n\t\t\t\t\t.style('height', setting.thumbnailHeight)\n\t\t\t\t\t.style('margin', '0 5px')\n\t\t\t\t\t.style('display', 'flex')\n\t\t\t\t\t.style('flex-direction', 'column')\n\t\t\t\t\t.style('height', 'auto')\n\t\t\t\t\t.style('align-items', 'center')\n\t\t\t\t\t.style('justify-content', 'center')\n\t\t\t\t\t.style('border', isActive ? setting.activeThumbnailBorderStyle : setting.nonActiveThumbnailBorderStyle)\n\t\t\t\t\t.on('click', () => {\n\t\t\t\t\t\twsiViewerInteractions.thumbnailClickListener(i)\n\t\t\t\t\t})\n\n\t\t\t\tthumbnail\n\t\t\t\t\t.append('img')\n\t\t\t\t\t.attr('src', layer.get('preview'))\n\t\t\t\t\t.attr('alt', `Thumbnail ${i}`)\n\t\t\t\t\t.style('max-width', '100%')\n\t\t\t\t\t.style('height', '60px')\n\t\t\t\t\t.style('object-fit', 'cover')\n\n\t\t\t\t// If necessary, truncate long names\n\t\t\t\t// show full name on hover\n\t\t\t\tconst imageName = layer.get('name') || ''\n\t\t\t\tlet name = imageName\n\t\t\t\tif (imageName.length > 9) {\n\t\t\t\t\tname = imageName.substring(0, 6) + '...'\n\t\t\t\t\tthumbnail.on('mouseover', () => {\n\t\t\t\t\t\ttooltip.clear().showunder(thumbnail.node())\n\t\t\t\t\t\ttooltip.d.append('div').style('padding', '5px').text(imageName)\n\t\t\t\t\t})\n\t\t\t\t\tthumbnail.on('mouseout', () => {\n\t\t\t\t\t\ttooltip.clear().hide()\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\tthumbnail.append('span').style('font-size', '0.85em').style('text-wrap', 'wrap').text(name)\n\t\t\t}\n\n\t\t\t//Placeholder for right arrow, if needed\n\t\t\tconst rightIconHolder = thumbnailsContainer.append('div').style('display', 'flex').style('align-items', 'center')\n\n\t\t\t/** Only show display arrows (i.e. prev/next buttons) when\n\t\t\t * the num of thumbnails exceeds the num that can be displayed*/\n\t\t\tif (numTotalFiles > setting.numDisplayedThumbnails) {\n\t\t\t\ticons['left'](leftIconHolder, {\n\t\t\t\t\twidth: setting.iconDimensions,\n\t\t\t\t\theight: setting.iconDimensions,\n\t\t\t\t\tdisabled: setting.thumbnailRangeStart === 0,\n\t\t\t\t\thandler: () => {\n\t\t\t\t\t\twsiViewerInteractions.toggleThumbnails(this.newStart(setting, numTotalFiles, true))\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\ticons['right'](rightIconHolder, {\n\t\t\t\t\twidth: setting.iconDimensions,\n\t\t\t\t\theight: setting.iconDimensions,\n\t\t\t\t\tdisabled: setting.thumbnailRangeStart + setting.numDisplayedThumbnails >= numTotalFiles,\n\t\t\t\t\thandler: () => {\n\t\t\t\t\t\twsiViewerInteractions.toggleThumbnails(this.newStart(setting, numTotalFiles))\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t} else {\n\t\t\t// Update borders only for visible thumbnails\n\t\t\tconst startIndex = setting.thumbnailRangeStart\n\t\t\tconst endIndex = Math.min(setting.thumbnailRangeStart + setting.numDisplayedThumbnails, layers.length)\n\n\t\t\tfor (let i = startIndex; i < endIndex; i++) {\n\t\t\t\tconst isActive = i === setting.displayedImageIndex\n\t\t\t\tholder\n\t\t\t\t\t.select(`#thumbnail${i}`)\n\t\t\t\t\t.style('border', isActive ? setting.activeThumbnailBorderStyle : setting.nonActiveThumbnailBorderStyle)\n\t\t\t}\n\t\t}\n\t\treturn thumbnailsContainer\n\t}\n\n\tprivate newStart(setting, numTotalFiles, isLeft = false) {\n\t\tif (isLeft) {\n\t\t\treturn Math.max(0, setting.thumbnailRangeStart - setting.numDisplayedThumbnails)\n\t\t} else {\n\t\t\treturn Math.min(\n\t\t\t\tnumTotalFiles - setting.numDisplayedThumbnails,\n\t\t\t\tsetting.thumbnailRangeStart + setting.numDisplayedThumbnails\n\t\t\t)\n\t\t}\n\t}\n}\n", "/**\n * @module ol/control/OverviewMap\n */\nimport Collection from '../Collection.js';\nimport Map from '../Map.js';\nimport MapEventType from '../MapEventType.js';\nimport MapProperty from '../MapProperty.js';\nimport ObjectEventType from '../ObjectEventType.js';\nimport Overlay from '../Overlay.js';\nimport View from '../View.js';\nimport ViewProperty from '../ViewProperty.js';\nimport {CLASS_COLLAPSED, CLASS_CONTROL, CLASS_UNSELECTABLE} from '../css.js';\nimport {replaceNode} from '../dom.js';\nimport EventType from '../events/EventType.js';\nimport {listen, listenOnce} from '../events.js';\nimport {\n containsExtent,\n equals as equalsExtent,\n getBottomRight,\n getTopLeft,\n scaleFromCenter,\n} from '../extent.js';\nimport {fromExtent as polygonFromExtent} from '../geom/Polygon.js';\nimport Control from './Control.js';\n\n/**\n * Maximum width and/or height extent ratio that determines when the overview\n * map should be zoomed out.\n * @type {number}\n */\nconst MAX_RATIO = 0.75;\n\n/**\n * Minimum width and/or height extent ratio that determines when the overview\n * map should be zoomed in.\n * @type {number}\n */\nconst MIN_RATIO = 0.1;\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-overviewmap'] CSS class name.\n * @property {boolean} [collapsed=true] Whether the control should start collapsed or not (expanded).\n * @property {string|HTMLElement} [collapseLabel='\u2039'] Text label to use for the\n * expanded overviewmap button. Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {boolean} [collapsible=true] Whether the control can be collapsed or not.\n * @property {string|HTMLElement} [label='\u203A'] Text label to use for the collapsed\n * overviewmap button. Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {Array<import(\"../layer/Base.js\").default>|import(\"../Collection.js\").default<import(\"../layer/Base.js\").default>} [layers]\n * Layers for the overview map.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the control\n * should be re-rendered. This is called in a `requestAnimationFrame` callback.\n * @property {boolean} [rotateWithView=false] Whether the control view should rotate with the main map view.\n * @property {HTMLElement|string} [target] Specify a target if you want the control\n * to be rendered outside of the map's viewport.\n * @property {string} [tipLabel='Overview map'] Text label to use for the button tip.\n * @property {View} [view] Custom view for the overview map (should use same projection as main map). If not provided,\n * a default view with the same projection as the main map will be used.\n */\n\n/**\n * Create a new control with a map acting as an overview map for another\n * defined map.\n *\n * @api\n */\nclass OverviewMap extends Control {\n /**\n * @param {Options} [options] OverviewMap options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super({\n element: document.createElement('div'),\n render: options.render,\n target: options.target,\n });\n\n /**\n * @private\n */\n this.boundHandleRotationChanged_ = this.handleRotationChanged_.bind(this);\n\n /**\n * @type {boolean}\n * @private\n */\n this.collapsed_ =\n options.collapsed !== undefined ? options.collapsed : true;\n\n /**\n * @private\n * @type {boolean}\n */\n this.collapsible_ =\n options.collapsible !== undefined ? options.collapsible : true;\n\n if (!this.collapsible_) {\n this.collapsed_ = false;\n }\n\n /**\n * @private\n * @type {boolean}\n */\n this.rotateWithView_ =\n options.rotateWithView !== undefined ? options.rotateWithView : false;\n\n /**\n * @private\n * @type {import(\"../extent.js\").Extent|undefined}\n */\n this.viewExtent_ = undefined;\n\n const className =\n options.className !== undefined ? options.className : 'ol-overviewmap';\n\n const tipLabel =\n options.tipLabel !== undefined ? options.tipLabel : 'Overview map';\n\n const collapseLabel =\n options.collapseLabel !== undefined ? options.collapseLabel : '\\u2039';\n\n if (typeof collapseLabel === 'string') {\n /**\n * @private\n * @type {HTMLElement}\n */\n this.collapseLabel_ = document.createElement('span');\n this.collapseLabel_.textContent = collapseLabel;\n } else {\n this.collapseLabel_ = collapseLabel;\n }\n\n const label = options.label !== undefined ? options.label : '\\u203A';\n\n if (typeof label === 'string') {\n /**\n * @private\n * @type {HTMLElement}\n */\n this.label_ = document.createElement('span');\n this.label_.textContent = label;\n } else {\n this.label_ = label;\n }\n\n const activeLabel =\n this.collapsible_ && !this.collapsed_ ? this.collapseLabel_ : this.label_;\n const button = document.createElement('button');\n button.setAttribute('type', 'button');\n button.title = tipLabel;\n button.appendChild(activeLabel);\n\n button.addEventListener(\n EventType.CLICK,\n this.handleClick_.bind(this),\n false,\n );\n\n /**\n * @type {HTMLElement}\n * @private\n */\n this.ovmapDiv_ = document.createElement('div');\n this.ovmapDiv_.className = 'ol-overviewmap-map';\n\n /**\n * Explicitly given view to be used instead of a view derived from the main map.\n * @type {View}\n * @private\n */\n this.view_ = options.view;\n\n const ovmap = new Map({\n view: options.view,\n controls: new Collection(),\n interactions: new Collection(),\n });\n\n /**\n * @type {Map}\n * @private\n */\n this.ovmap_ = ovmap;\n\n if (options.layers) {\n options.layers.forEach(function (layer) {\n ovmap.addLayer(layer);\n });\n }\n\n const box = document.createElement('div');\n box.className = 'ol-overviewmap-box';\n box.style.boxSizing = 'border-box';\n\n /**\n * @type {import(\"../Overlay.js\").default}\n * @private\n */\n this.boxOverlay_ = new Overlay({\n position: [0, 0],\n positioning: 'center-center',\n element: box,\n });\n this.ovmap_.addOverlay(this.boxOverlay_);\n\n const cssClasses =\n className +\n ' ' +\n CLASS_UNSELECTABLE +\n ' ' +\n CLASS_CONTROL +\n (this.collapsed_ && this.collapsible_ ? ' ' + CLASS_COLLAPSED : '') +\n (this.collapsible_ ? '' : ' ol-uncollapsible');\n const element = this.element;\n element.className = cssClasses;\n element.appendChild(this.ovmapDiv_);\n element.appendChild(button);\n\n /* Interactive map */\n\n const overlay = this.boxOverlay_;\n const overlayBox = this.boxOverlay_.getElement();\n\n /* Functions definition */\n\n const computeDesiredMousePosition = (mousePosition) => {\n return {\n clientX: mousePosition.clientX,\n clientY: mousePosition.clientY,\n };\n };\n\n const move = function (event) {\n const position = /** @type {?} */ (computeDesiredMousePosition(event));\n const coordinates = ovmap.getEventCoordinate(\n /** @type {MouseEvent} */ (position),\n );\n\n overlay.setPosition(coordinates);\n };\n\n const endMoving = (event) => {\n const coordinates = ovmap.getEventCoordinateInternal(event);\n\n const map = this.getMap();\n\n map.getView().setCenterInternal(coordinates);\n\n const ownerDocument = map.getOwnerDocument();\n ownerDocument.removeEventListener('pointermove', move);\n ownerDocument.removeEventListener('pointerup', endMoving);\n };\n\n /* Binding */\n\n this.ovmapDiv_.addEventListener('pointerdown', (event) => {\n const ownerDocument = this.getMap().getOwnerDocument();\n if (event.target === overlayBox) {\n ownerDocument.addEventListener('pointermove', move);\n }\n ownerDocument.addEventListener('pointerup', endMoving);\n });\n }\n\n /**\n * Remove the control from its current map and attach it to the new map.\n * Pass `null` to just remove the control from the current map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../Map.js\").default|null} map Map.\n * @api\n * @override\n */\n setMap(map) {\n const oldMap = this.getMap();\n if (map === oldMap) {\n return;\n }\n if (oldMap) {\n const oldView = oldMap.getView();\n if (oldView) {\n this.unbindView_(oldView);\n }\n this.ovmap_.setTarget(null);\n }\n super.setMap(map);\n\n if (map) {\n this.ovmap_.setTarget(this.ovmapDiv_);\n this.listenerKeys.push(\n listen(\n map,\n ObjectEventType.PROPERTYCHANGE,\n this.handleMapPropertyChange_,\n this,\n ),\n );\n\n const view = map.getView();\n if (view) {\n this.bindView_(view);\n }\n\n if (!this.ovmap_.isRendered()) {\n this.updateBoxAfterOvmapIsRendered_();\n }\n }\n }\n\n /**\n * Handle map property changes. This only deals with changes to the map's view.\n * @param {import(\"../Object.js\").ObjectEvent} event The propertychange event.\n * @private\n */\n handleMapPropertyChange_(event) {\n if (event.key === MapProperty.VIEW) {\n const oldView = /** @type {import(\"../View.js\").default} */ (\n event.oldValue\n );\n if (oldView) {\n this.unbindView_(oldView);\n }\n const newView = this.getMap().getView();\n this.bindView_(newView);\n } else if (\n !this.ovmap_.isRendered() &&\n (event.key === MapProperty.TARGET || event.key === MapProperty.SIZE)\n ) {\n this.ovmap_.updateSize();\n }\n }\n\n /**\n * Register listeners for view property changes.\n * @param {import(\"../View.js\").default} view The view.\n * @private\n */\n bindView_(view) {\n if (!this.view_) {\n // Unless an explicit view definition was given, derive default from whatever main map uses.\n const newView = new View({\n projection: view.getProjection(),\n });\n this.ovmap_.setView(newView);\n }\n\n view.addChangeListener(\n ViewProperty.ROTATION,\n this.boundHandleRotationChanged_,\n );\n // Sync once with the new view\n this.handleRotationChanged_();\n\n if (view.isDef()) {\n this.ovmap_.updateSize();\n this.resetExtent_();\n }\n }\n\n /**\n * Unregister listeners for view property changes.\n * @param {import(\"../View.js\").default} view The view.\n * @private\n */\n unbindView_(view) {\n view.removeChangeListener(\n ViewProperty.ROTATION,\n this.boundHandleRotationChanged_,\n );\n }\n\n /**\n * Handle rotation changes to the main map.\n * @private\n */\n handleRotationChanged_() {\n if (this.rotateWithView_) {\n this.ovmap_.getView().setRotation(this.getMap().getView().getRotation());\n }\n }\n\n /**\n * Reset the overview map extent if the box size (width or\n * height) is less than the size of the overview map size times minRatio\n * or is greater than the size of the overview size times maxRatio.\n *\n * If the map extent was not reset, the box size can fits in the defined\n * ratio sizes. This method then checks if is contained inside the overview\n * map current extent. If not, recenter the overview map to the current\n * main map center location.\n * @private\n */\n validateExtent_() {\n const map = this.getMap();\n const ovmap = this.ovmap_;\n\n if (!map.isRendered() || !ovmap.isRendered()) {\n return;\n }\n\n const mapSize = /** @type {import(\"../size.js\").Size} */ (map.getSize());\n\n const view = map.getView();\n const extent = view.calculateExtentInternal(mapSize);\n\n if (this.viewExtent_ && equalsExtent(extent, this.viewExtent_)) {\n // repeats of the same extent may indicate constraint conflicts leading to an endless cycle\n return;\n }\n this.viewExtent_ = extent;\n\n const ovmapSize = /** @type {import(\"../size.js\").Size} */ (\n ovmap.getSize()\n );\n\n const ovview = ovmap.getView();\n const ovextent = ovview.calculateExtentInternal(ovmapSize);\n\n const topLeftPixel = ovmap.getPixelFromCoordinateInternal(\n getTopLeft(extent),\n );\n const bottomRightPixel = ovmap.getPixelFromCoordinateInternal(\n getBottomRight(extent),\n );\n\n const boxWidth = Math.abs(topLeftPixel[0] - bottomRightPixel[0]);\n const boxHeight = Math.abs(topLeftPixel[1] - bottomRightPixel[1]);\n\n const ovmapWidth = ovmapSize[0];\n const ovmapHeight = ovmapSize[1];\n\n if (\n boxWidth < ovmapWidth * MIN_RATIO ||\n boxHeight < ovmapHeight * MIN_RATIO ||\n boxWidth > ovmapWidth * MAX_RATIO ||\n boxHeight > ovmapHeight * MAX_RATIO\n ) {\n this.resetExtent_();\n } else if (!containsExtent(ovextent, extent)) {\n this.recenter_();\n }\n }\n\n /**\n * Reset the overview map extent to half calculated min and max ratio times\n * the extent of the main map.\n * @private\n */\n resetExtent_() {\n if (MAX_RATIO === 0 || MIN_RATIO === 0) {\n return;\n }\n\n const map = this.getMap();\n const ovmap = this.ovmap_;\n\n const mapSize = /** @type {import(\"../size.js\").Size} */ (map.getSize());\n\n const view = map.getView();\n const extent = view.calculateExtentInternal(mapSize);\n\n const ovview = ovmap.getView();\n\n // get how many times the current map overview could hold different\n // box sizes using the min and max ratio, pick the step in the middle used\n // to calculate the extent from the main map to set it to the overview map,\n const steps = Math.log(MAX_RATIO / MIN_RATIO) / Math.LN2;\n const ratio = 1 / (Math.pow(2, steps / 2) * MIN_RATIO);\n scaleFromCenter(extent, ratio);\n ovview.fitInternal(polygonFromExtent(extent));\n }\n\n /**\n * Set the center of the overview map to the map center without changing its\n * resolution.\n * @private\n */\n recenter_() {\n const map = this.getMap();\n const ovmap = this.ovmap_;\n\n const view = map.getView();\n\n const ovview = ovmap.getView();\n\n ovview.setCenterInternal(view.getCenterInternal());\n }\n\n /**\n * Update the box using the main map extent\n * @private\n */\n updateBox_() {\n const map = this.getMap();\n const ovmap = this.ovmap_;\n\n if (!map.isRendered() || !ovmap.isRendered()) {\n return;\n }\n\n const mapSize = /** @type {import(\"../size.js\").Size} */ (map.getSize());\n\n const view = map.getView();\n\n const ovview = ovmap.getView();\n\n const rotation = this.rotateWithView_ ? 0 : -view.getRotation();\n\n const overlay = this.boxOverlay_;\n const box = this.boxOverlay_.getElement();\n const center = view.getCenter();\n const resolution = view.getResolution();\n const ovresolution = ovview.getResolution();\n const width = (mapSize[0] * resolution) / ovresolution;\n const height = (mapSize[1] * resolution) / ovresolution;\n\n // set position using center coordinates\n overlay.setPosition(center);\n\n // set box size calculated from map extent size and overview map resolution\n if (box) {\n box.style.width = width + 'px';\n box.style.height = height + 'px';\n const transform = 'rotate(' + rotation + 'rad)';\n box.style.transform = transform;\n }\n }\n\n /**\n * @private\n */\n updateBoxAfterOvmapIsRendered_() {\n if (this.ovmapPostrenderKey_) {\n return;\n }\n this.ovmapPostrenderKey_ = listenOnce(\n this.ovmap_,\n MapEventType.POSTRENDER,\n (event) => {\n delete this.ovmapPostrenderKey_;\n this.updateBox_();\n },\n );\n }\n\n /**\n * @param {MouseEvent} event The event to handle\n * @private\n */\n handleClick_(event) {\n event.preventDefault();\n this.handleToggle_();\n }\n\n /**\n * @private\n */\n handleToggle_() {\n this.element.classList.toggle(CLASS_COLLAPSED);\n if (this.collapsed_) {\n replaceNode(this.collapseLabel_, this.label_);\n } else {\n replaceNode(this.label_, this.collapseLabel_);\n }\n this.collapsed_ = !this.collapsed_;\n\n // manage overview map if it had not been rendered before and control\n // is expanded\n const ovmap = this.ovmap_;\n if (!this.collapsed_) {\n if (ovmap.isRendered()) {\n this.viewExtent_ = undefined;\n ovmap.render();\n return;\n }\n ovmap.updateSize();\n this.resetExtent_();\n this.updateBoxAfterOvmapIsRendered_();\n }\n }\n\n /**\n * Return `true` if the overview map is collapsible, `false` otherwise.\n * @return {boolean} True if the widget is collapsible.\n * @api\n */\n getCollapsible() {\n return this.collapsible_;\n }\n\n /**\n * Set whether the overview map should be collapsible.\n * @param {boolean} collapsible True if the widget is collapsible.\n * @api\n */\n setCollapsible(collapsible) {\n if (this.collapsible_ === collapsible) {\n return;\n }\n this.collapsible_ = collapsible;\n this.element.classList.toggle('ol-uncollapsible');\n if (!collapsible && this.collapsed_) {\n this.handleToggle_();\n }\n }\n\n /**\n * Collapse or expand the overview map according to the passed parameter. Will\n * not do anything if the overview map isn't collapsible or if the current\n * collapsed state is already the one requested.\n * @param {boolean} collapsed True if the widget is collapsed.\n * @api\n */\n setCollapsed(collapsed) {\n if (!this.collapsible_ || this.collapsed_ === collapsed) {\n return;\n }\n this.handleToggle_();\n }\n\n /**\n * Determine if the overview map is collapsed.\n * @return {boolean} The overview map is collapsed.\n * @api\n */\n getCollapsed() {\n return this.collapsed_;\n }\n\n /**\n * Return `true` if the overview map view can rotate, `false` otherwise.\n * @return {boolean} True if the control view can rotate.\n * @api\n */\n getRotateWithView() {\n return this.rotateWithView_;\n }\n\n /**\n * Set whether the overview map view should rotate with the main map view.\n * @param {boolean} rotateWithView True if the control view should rotate.\n * @api\n */\n setRotateWithView(rotateWithView) {\n if (this.rotateWithView_ === rotateWithView) {\n return;\n }\n this.rotateWithView_ = rotateWithView;\n if (this.getMap().getView().getRotation() !== 0) {\n if (this.rotateWithView_) {\n this.handleRotationChanged_();\n } else {\n this.ovmap_.getView().setRotation(0);\n }\n this.viewExtent_ = undefined;\n this.validateExtent_();\n this.updateBox_();\n }\n }\n\n /**\n * Return the overview map.\n * @return {import(\"../Map.js\").default} Overview map.\n * @api\n */\n getOverviewMap() {\n return this.ovmap_;\n }\n\n /**\n * Update the overview map element.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @override\n */\n render(mapEvent) {\n this.validateExtent_();\n this.updateBox_();\n }\n}\n\nexport default OverviewMap;\n", "/**\n * @module ol/control/FullScreen\n */\nimport MapProperty from '../MapProperty.js';\nimport {CLASS_CONTROL, CLASS_UNSELECTABLE, CLASS_UNSUPPORTED} from '../css.js';\nimport {replaceNode} from '../dom.js';\nimport EventType from '../events/EventType.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport Control from './Control.js';\n\nconst events = ['fullscreenchange', 'webkitfullscreenchange'];\n\n/**\n * @enum {string}\n */\nconst FullScreenEventType = {\n /**\n * Triggered after the map entered fullscreen.\n * @event FullScreenEventType#enterfullscreen\n * @api\n */\n ENTERFULLSCREEN: 'enterfullscreen',\n\n /**\n * Triggered after the map leave fullscreen.\n * @event FullScreenEventType#leavefullscreen\n * @api\n */\n LEAVEFULLSCREEN: 'leavefullscreen',\n};\n\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature<import(\"../Observable\").EventTypes|\n * 'enterfullscreen'|'leavefullscreen', import(\"../events/Event.js\").default, Return> &\n * import(\"../Observable\").OnSignature<import(\"../ObjectEventType\").Types, import(\"../Object\").ObjectEvent, Return> &\n * import(\"../Observable\").CombinedOnSignature<import(\"../Observable\").EventTypes|\n * 'enterfullscreen'|'leavefullscreen'|import(\"../ObjectEventType\").Types, Return>} FullScreenOnSignature\n */\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-full-screen'] CSS class name.\n * @property {string|Text|HTMLElement} [label='\\u2922'] Text label to use for the button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string|Text|HTMLElement} [labelActive='\\u00d7'] Text label to use for the\n * button when full-screen is active.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [activeClassName=className + '-true'] CSS class name for the button\n * when full-screen is active.\n * @property {string} [inactiveClassName=className + '-false'] CSS class name for the button\n * when full-screen is inactive.\n * @property {string} [tipLabel='Toggle full-screen'] Text label to use for the button tip.\n * @property {boolean} [keys=false] Full keyboard access.\n * @property {HTMLElement|string} [target] Specify a target if you want the\n * control to be rendered outside of the map's viewport.\n * @property {HTMLElement|string} [source] The element to be displayed\n * fullscreen. When not provided, the element containing the map viewport will\n * be displayed fullscreen.\n */\n\n/**\n * @classdesc\n * Provides a button that when clicked fills up the full screen with the map.\n * The full screen source element is by default the element containing the map viewport unless\n * overridden by providing the `source` option. In which case, the dom\n * element introduced using this parameter will be displayed in full screen.\n *\n * When in full screen mode, a close button is shown to exit full screen mode.\n * The [Fullscreen API](https://www.w3.org/TR/fullscreen/) is used to\n * toggle the map in full screen mode.\n *\n * @fires FullScreenEventType#enterfullscreen\n * @fires FullScreenEventType#leavefullscreen\n * @api\n */\nclass FullScreen extends Control {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n super({\n element: document.createElement('div'),\n target: options.target,\n });\n\n /***\n * @type {FullScreenOnSignature<import(\"../events\").EventsKey>}\n */\n this.on;\n\n /***\n * @type {FullScreenOnSignature<import(\"../events\").EventsKey>}\n */\n this.once;\n\n /***\n * @type {FullScreenOnSignature<void>}\n */\n this.un;\n\n /**\n * @private\n * @type {boolean}\n */\n this.keys_ = options.keys !== undefined ? options.keys : false;\n\n /**\n * @private\n * @type {HTMLElement|string|undefined}\n */\n this.source_ = options.source;\n\n /**\n * @type {boolean}\n * @private\n */\n this.isInFullscreen_ = false;\n\n /**\n * @private\n */\n this.boundHandleMapTargetChange_ = this.handleMapTargetChange_.bind(this);\n\n /**\n * @private\n * @type {string}\n */\n this.cssClassName_ =\n options.className !== undefined ? options.className : 'ol-full-screen';\n\n /**\n * @private\n * @type {Array<import(\"../events.js\").EventsKey>}\n */\n this.documentListeners_ = [];\n\n /**\n * @private\n * @type {Array<string>}\n */\n this.activeClassName_ =\n options.activeClassName !== undefined\n ? options.activeClassName.split(' ')\n : [this.cssClassName_ + '-true'];\n\n /**\n * @private\n * @type {Array<string>}\n */\n this.inactiveClassName_ =\n options.inactiveClassName !== undefined\n ? options.inactiveClassName.split(' ')\n : [this.cssClassName_ + '-false'];\n\n const label = options.label !== undefined ? options.label : '\\u2922';\n\n /**\n * @private\n * @type {Text|HTMLElement}\n */\n this.labelNode_ =\n typeof label === 'string' ? document.createTextNode(label) : label;\n\n const labelActive =\n options.labelActive !== undefined ? options.labelActive : '\\u00d7';\n\n /**\n * @private\n * @type {Text|HTMLElement}\n */\n this.labelActiveNode_ =\n typeof labelActive === 'string'\n ? document.createTextNode(labelActive)\n : labelActive;\n\n const tipLabel = options.tipLabel ? options.tipLabel : 'Toggle full-screen';\n\n /**\n * @private\n * @type {HTMLElement}\n */\n this.button_ = document.createElement('button');\n this.button_.title = tipLabel;\n this.button_.setAttribute('type', 'button');\n this.button_.appendChild(this.labelNode_);\n this.button_.addEventListener(\n EventType.CLICK,\n this.handleClick_.bind(this),\n false,\n );\n this.setClassName_(this.button_, this.isInFullscreen_);\n\n this.element.className = `${this.cssClassName_} ${CLASS_UNSELECTABLE} ${CLASS_CONTROL}`;\n this.element.appendChild(this.button_);\n }\n\n /**\n * @param {MouseEvent} event The event to handle\n * @private\n */\n handleClick_(event) {\n event.preventDefault();\n this.handleFullScreen_();\n }\n\n /**\n * @private\n */\n handleFullScreen_() {\n const map = this.getMap();\n if (!map) {\n return;\n }\n const doc = map.getOwnerDocument();\n if (!isFullScreenSupported(doc)) {\n return;\n }\n if (isFullScreen(doc)) {\n exitFullScreen(doc);\n } else {\n let element;\n if (this.source_) {\n element =\n typeof this.source_ === 'string'\n ? doc.getElementById(this.source_)\n : this.source_;\n } else {\n element = map.getTargetElement();\n }\n if (this.keys_) {\n requestFullScreenWithKeys(element);\n } else {\n requestFullScreen(element);\n }\n }\n }\n\n /**\n * @private\n */\n handleFullScreenChange_() {\n const map = this.getMap();\n if (!map) {\n return;\n }\n const wasInFullscreen = this.isInFullscreen_;\n this.isInFullscreen_ = isFullScreen(map.getOwnerDocument());\n if (wasInFullscreen !== this.isInFullscreen_) {\n this.setClassName_(this.button_, this.isInFullscreen_);\n if (this.isInFullscreen_) {\n replaceNode(this.labelActiveNode_, this.labelNode_);\n this.dispatchEvent(FullScreenEventType.ENTERFULLSCREEN);\n } else {\n replaceNode(this.labelNode_, this.labelActiveNode_);\n this.dispatchEvent(FullScreenEventType.LEAVEFULLSCREEN);\n }\n map.updateSize();\n }\n }\n\n /**\n * @param {HTMLElement} element Target element\n * @param {boolean} fullscreen True if fullscreen class name should be active\n * @private\n */\n setClassName_(element, fullscreen) {\n if (fullscreen) {\n element.classList.remove(...this.inactiveClassName_);\n element.classList.add(...this.activeClassName_);\n } else {\n element.classList.remove(...this.activeClassName_);\n element.classList.add(...this.inactiveClassName_);\n }\n }\n\n /**\n * Remove the control from its current map and attach it to the new map.\n * Pass `null` to just remove the control from the current map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../Map.js\").default|null} map Map.\n * @api\n * @override\n */\n setMap(map) {\n const oldMap = this.getMap();\n if (oldMap) {\n oldMap.removeChangeListener(\n MapProperty.TARGET,\n this.boundHandleMapTargetChange_,\n );\n }\n\n super.setMap(map);\n\n this.handleMapTargetChange_();\n if (map) {\n map.addChangeListener(\n MapProperty.TARGET,\n this.boundHandleMapTargetChange_,\n );\n }\n }\n\n /**\n * @private\n */\n handleMapTargetChange_() {\n const listeners = this.documentListeners_;\n for (let i = 0, ii = listeners.length; i < ii; ++i) {\n unlistenByKey(listeners[i]);\n }\n listeners.length = 0;\n\n const map = this.getMap();\n if (map) {\n const doc = map.getOwnerDocument();\n if (isFullScreenSupported(doc)) {\n this.element.classList.remove(CLASS_UNSUPPORTED);\n } else {\n this.element.classList.add(CLASS_UNSUPPORTED);\n }\n\n for (let i = 0, ii = events.length; i < ii; ++i) {\n listeners.push(\n listen(doc, events[i], this.handleFullScreenChange_, this),\n );\n }\n this.handleFullScreenChange_();\n }\n }\n}\n\n/**\n * @param {Document} doc The root document to check.\n * @return {boolean} Fullscreen is supported by the current platform.\n */\nfunction isFullScreenSupported(doc) {\n const body = doc.body;\n return !!(\n body['webkitRequestFullscreen'] ||\n (body.requestFullscreen && doc.fullscreenEnabled)\n );\n}\n\n/**\n * @param {Document} doc The root document to check.\n * @return {boolean} Element is currently in fullscreen.\n */\nfunction isFullScreen(doc) {\n return !!(doc['webkitIsFullScreen'] || doc.fullscreenElement);\n}\n\n/**\n * Request to fullscreen an element.\n * @param {HTMLElement} element Element to request fullscreen\n */\nfunction requestFullScreen(element) {\n if (element.requestFullscreen) {\n element.requestFullscreen();\n } else if (element['webkitRequestFullscreen']) {\n element['webkitRequestFullscreen']();\n }\n}\n\n/**\n * Request to fullscreen an element with keyboard input.\n * @param {HTMLElement} element Element to request fullscreen\n */\nfunction requestFullScreenWithKeys(element) {\n if (element['webkitRequestFullscreen']) {\n element['webkitRequestFullscreen']();\n } else {\n requestFullScreen(element);\n }\n}\n\n/**\n * Exit fullscreen.\n * @param {Document} doc The document to exit fullscren from\n */\nfunction exitFullScreen(doc) {\n if (doc.exitFullscreen) {\n doc.exitFullscreen();\n } else if (doc['webkitExitFullscreen']) {\n doc['webkitExitFullscreen']();\n }\n}\n\nexport default FullScreen;\n", "/**\n * @module ol/renderer/canvas/VectorTileLayer\n */\nimport TileState from '../../TileState.js';\nimport ViewHint from '../../ViewHint.js';\nimport {ascending} from '../../array.js';\nimport {wrapX} from '../../coordinate.js';\nimport {\n boundingExtent,\n buffer,\n containsExtent,\n equals,\n getIntersection,\n getTopLeft,\n intersects,\n} from '../../extent.js';\nimport {equivalent, getTransform, transformExtent} from '../../proj.js';\nimport CanvasBuilderGroup from '../../render/canvas/BuilderGroup.js';\nimport CanvasExecutorGroup, {\n DECLUTTER,\n} from '../../render/canvas/ExecutorGroup.js';\nimport ZIndexContext from '../../render/canvas/ZIndexContext.js';\nimport {\n HIT_DETECT_RESOLUTION,\n createHitDetectionImageData,\n hitDetect,\n} from '../../render/canvas/hitdetect.js';\nimport {toSize} from '../../size.js';\nimport {\n apply as applyTransform,\n create as createTransform,\n multiply,\n reset as resetTransform,\n scale,\n scale as scaleTransform,\n translate as translateTransform,\n} from '../../transform.js';\nimport {getUid} from '../../util.js';\nimport {\n getSquaredTolerance as getSquaredRenderTolerance,\n renderFeature,\n} from '../vector.js';\nimport CanvasTileLayerRenderer from './TileLayer.js';\n\n/**\n * @type {!Object<string, Array<import(\"../../render/canvas.js\").BuilderType>>}\n */\nconst IMAGE_REPLAYS = {\n 'image': ['Polygon', 'Circle', 'LineString', 'Image', 'Text'],\n 'hybrid': ['Polygon', 'LineString'],\n 'vector': [],\n};\n\n/**\n * @type {!Object<string, Array<import(\"../../render/canvas.js\").BuilderType>>}\n */\nconst VECTOR_REPLAYS = {\n 'hybrid': ['Image', 'Text', 'Default'],\n 'vector': ['Polygon', 'Circle', 'LineString', 'Image', 'Text', 'Default'],\n};\n\n/**\n * @classdesc\n * Canvas renderer for vector tile layers.\n * @api\n * @extends {CanvasTileLayerRenderer<import(\"../../layer/VectorTile.js\").default<import('../../source/VectorTile.js').default<import('../../Feature.js').FeatureLike>>>}\n */\nclass CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer {\n /**\n * @param {import(\"../../layer/VectorTile.js\").default} layer VectorTile layer.\n * @param {import(\"./TileLayer.js\").Options} options Options.\n */\n constructor(layer, options) {\n super(layer, options);\n\n /** @private */\n this.boundHandleStyleImageChange_ = this.handleStyleImageChange_.bind(this);\n\n /**\n * @private\n * @type {number}\n */\n this.renderedLayerRevision_;\n\n /**\n * @private\n * @type {import(\"../../transform\").Transform}\n */\n this.renderedPixelToCoordinateTransform_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.renderedRotation_;\n\n /**\n * @private\n * @type {number}\n */\n this.renderedOpacity_ = 1;\n\n /**\n * @private\n * @type {import(\"../../transform.js\").Transform}\n */\n this.tmpTransform_ = createTransform();\n\n /**\n * @private\n * @type {Array<ZIndexContext>}\n */\n this.tileClipContexts_ = null;\n }\n\n /**\n * Determine whether tiles for next extent should be enqueued for rendering.\n * @return {boolean} Rendering tiles for next extent is supported.\n * @override\n */\n enqueueTilesForNextExtent() {\n return this.getLayer().getRenderMode() !== 'vector';\n }\n\n /**\n * @param {import(\"../../VectorRenderTile.js\").default} tile Tile.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {number} x Left of the tile.\n * @param {number} y Top of the tile.\n * @param {number} w Width of the tile.\n * @param {number} h Height of the tile.\n * @param {number} gutter Tile gutter.\n * @param {boolean} transition Apply an alpha transition.\n * @override\n */\n drawTile(tile, frameState, x, y, w, h, gutter, transition) {\n this.updateExecutorGroup_(\n tile,\n frameState.pixelRatio,\n frameState.viewState.projection,\n );\n if (this.tileImageNeedsRender_(tile)) {\n this.renderTileImage_(tile, frameState);\n }\n super.drawTile(tile, frameState, x, y, w, h, gutter, transition);\n }\n\n /**\n * @param {number} z Tile coordinate z.\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @return {import(\"../../Tile.js\").default|null} Tile (or null if outside source extent).\n * @override\n */\n getTile(z, x, y, frameState) {\n const tile = /** @type {import(\"../../VectorRenderTile.js\").default} */ (\n this.getOrCreateTile(z, x, y, frameState)\n );\n if (!tile) {\n return null;\n }\n\n const viewState = frameState.viewState;\n const resolution = viewState.resolution;\n const viewHints = frameState.viewHints;\n const source = this.getLayer().getSource();\n const tileGrid = source.getTileGridForProjection(viewState.projection);\n const hifi = !(\n viewHints[ViewHint.ANIMATING] || viewHints[ViewHint.INTERACTING]\n );\n const withinTileResolutionRange =\n tileGrid.getZForResolution(resolution, source.zDirection) === z;\n if (hifi && withinTileResolutionRange) {\n tile.wantedResolution = resolution;\n } else if (!tile.wantedResolution) {\n tile.wantedResolution = tileGrid.getResolution(z);\n }\n\n return tile;\n }\n\n /**\n * Determine whether render should be called.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @return {boolean} Layer is ready to be rendered.\n * @override\n */\n prepareFrame(frameState) {\n const layerRevision = this.getLayer().getRevision();\n if (this.renderedLayerRevision_ !== layerRevision) {\n this.renderedLayerRevision_ = layerRevision;\n this.renderedTiles.length = 0;\n }\n return super.prepareFrame(frameState);\n }\n\n /**\n * @param {import(\"../../VectorRenderTile.js\").default} tile Tile.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n * @private\n */\n updateExecutorGroup_(tile, pixelRatio, projection) {\n const layer = /** @type {import(\"../../layer/VectorTile.js\").default} */ (\n this.getLayer()\n );\n const revision = layer.getRevision();\n const renderOrder = layer.getRenderOrder() || null;\n\n const resolution = tile.wantedResolution;\n const builderState = tile.getReplayState(layer);\n if (\n !builderState.dirty &&\n builderState.renderedResolution === resolution &&\n builderState.renderedRevision == revision &&\n builderState.renderedPixelRatio === pixelRatio &&\n builderState.renderedRenderOrder == renderOrder\n ) {\n return;\n }\n\n const source = layer.getSource();\n const declutter = !!layer.getDeclutter();\n const sourceTileGrid = source.getTileGrid();\n const tileGrid = source.getTileGridForProjection(projection);\n const tileExtent = tileGrid.getTileCoordExtent(tile.wrappedTileCoord);\n\n const sourceTiles = source.getSourceTiles(pixelRatio, projection, tile);\n const layerUid = getUid(layer);\n delete tile.hitDetectionImageData[layerUid];\n tile.executorGroups[layerUid] = [];\n builderState.dirty = false;\n for (let t = 0, tt = sourceTiles.length; t < tt; ++t) {\n const sourceTile = sourceTiles[t];\n if (sourceTile.getState() != TileState.LOADED) {\n continue;\n }\n const sourceProjection = source.getProjection();\n const sourceTileCoord = sourceTile.tileCoord;\n let sourceTileExtent = sourceTileGrid.getTileCoordExtent(sourceTileCoord);\n if (\n projection &&\n sourceProjection &&\n !equivalent(projection, sourceProjection)\n ) {\n sourceTileExtent = transformExtent(\n sourceTileExtent,\n sourceProjection,\n projection,\n 32,\n );\n }\n\n const sharedExtent = getIntersection(tileExtent, sourceTileExtent);\n const builderExtent = buffer(\n sharedExtent,\n layer.getRenderBuffer() * resolution,\n this.tempExtent,\n );\n const bufferedExtent = equals(sourceTileExtent, sharedExtent)\n ? null\n : builderExtent;\n const builderGroup = new CanvasBuilderGroup(\n 0,\n sharedExtent,\n resolution,\n pixelRatio,\n );\n const squaredTolerance = getSquaredRenderTolerance(\n resolution,\n pixelRatio,\n );\n\n /**\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n * @this {CanvasVectorTileLayerRenderer}\n */\n const render = function (feature, index) {\n let styles;\n const styleFunction =\n feature.getStyleFunction() || layer.getStyleFunction();\n if (styleFunction) {\n styles = styleFunction(feature, resolution);\n }\n if (styles) {\n const dirty = this.renderFeature(\n feature,\n squaredTolerance,\n styles,\n builderGroup,\n declutter,\n index,\n );\n builderState.dirty = builderState.dirty || dirty;\n }\n };\n\n const features = sourceTile.getFeatures();\n if (renderOrder && renderOrder !== builderState.renderedRenderOrder) {\n features.sort(renderOrder);\n }\n for (let i = 0, ii = features.length; i < ii; ++i) {\n let feature = features[i];\n if (\n projection &&\n sourceTile.projection &&\n !equivalent(projection, sourceTile.projection)\n ) {\n feature = feature.clone();\n feature\n .getGeometry()\n .applyTransform(getTransform(sourceTile.projection, projection));\n }\n if (\n !bufferedExtent ||\n intersects(bufferedExtent, feature.getGeometry().getExtent())\n ) {\n render.call(this, feature, i);\n }\n }\n const executorGroupInstructions = builderGroup.finish();\n // no need to clip when the render tile is covered by a single source tile\n const replayExtent =\n layer.getRenderMode() !== 'vector' &&\n declutter &&\n sourceTiles.length === 1\n ? null\n : sharedExtent;\n const renderingReplayGroup = new CanvasExecutorGroup(\n replayExtent,\n resolution,\n pixelRatio,\n source.getOverlaps(),\n executorGroupInstructions,\n layer.getRenderBuffer(),\n true,\n );\n tile.executorGroups[layerUid].push(renderingReplayGroup);\n }\n builderState.renderedRevision = revision;\n builderState.renderedPixelRatio = pixelRatio;\n builderState.renderedRenderOrder = renderOrder;\n builderState.renderedResolution = resolution;\n }\n\n /**\n * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {number} hitTolerance Hit tolerance in pixels.\n * @param {import(\"../vector.js\").FeatureCallback<T>} callback Feature callback.\n * @param {Array<import(\"../Map.js\").HitMatch<T>>} matches The hit detected matches with tolerance.\n * @return {T|undefined} Callback result.\n * @template T\n * @override\n */\n forEachFeatureAtCoordinate(\n coordinate,\n frameState,\n hitTolerance,\n callback,\n matches,\n ) {\n const resolution = frameState.viewState.resolution;\n const rotation = frameState.viewState.rotation;\n hitTolerance = hitTolerance == undefined ? 0 : hitTolerance;\n const layer = this.getLayer();\n const source = layer.getSource();\n const tileGrid = source.getTileGridForProjection(\n frameState.viewState.projection,\n );\n\n const hitExtent = boundingExtent([coordinate]);\n buffer(hitExtent, resolution * hitTolerance, hitExtent);\n\n /** @type {!Object<string, import(\"../Map.js\").HitMatch<T>|true>} */\n const features = {};\n\n /**\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../../geom/SimpleGeometry.js\").default} geometry Geometry.\n * @param {number} distanceSq The squared distance to the click position.\n * @return {T|undefined} Callback result.\n */\n const featureCallback = function (feature, geometry, distanceSq) {\n let key = feature.getId();\n if (key === undefined) {\n key = getUid(feature);\n }\n const match = features[key];\n if (!match) {\n if (distanceSq === 0) {\n features[key] = true;\n return callback(feature, layer, geometry);\n }\n matches.push(\n (features[key] = {\n feature: feature,\n layer: layer,\n geometry: geometry,\n distanceSq: distanceSq,\n callback: callback,\n }),\n );\n } else if (match !== true && distanceSq < match.distanceSq) {\n if (distanceSq === 0) {\n features[key] = true;\n matches.splice(matches.lastIndexOf(match), 1);\n return callback(feature, layer, geometry);\n }\n match.geometry = geometry;\n match.distanceSq = distanceSq;\n }\n return undefined;\n };\n\n const renderedTiles =\n /** @type {Array<import(\"../../VectorRenderTile.js\").default>} */ (\n this.renderedTiles\n );\n const layerUid = getUid(layer);\n const declutter = layer.getDeclutter();\n const declutteredFeatures = declutter\n ? frameState.declutter?.[declutter]?.all().map((item) => item.value)\n : null;\n let found;\n foundFeature: for (let i = 0, ii = renderedTiles.length; i < ii; ++i) {\n const tile = renderedTiles[i];\n const tileExtent = tileGrid.getTileCoordExtent(tile.wrappedTileCoord);\n if (!intersects(tileExtent, hitExtent)) {\n continue;\n }\n\n const executorGroups = tile.executorGroups[layerUid];\n for (let t = 0, tt = executorGroups.length; t < tt; ++t) {\n found = executorGroups[t].forEachFeatureAtCoordinate(\n coordinate,\n resolution,\n rotation,\n hitTolerance,\n featureCallback,\n declutteredFeatures,\n );\n if (found) {\n break foundFeature;\n }\n }\n }\n return found;\n }\n\n /**\n * Asynchronous layer level hit detection.\n * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n * @return {Promise<Array<import(\"../../Feature.js\").FeatureLike>>} Promise that resolves with an array of features.\n * @override\n */\n getFeatures(pixel) {\n if (this.renderedTiles.length === 0) {\n return Promise.resolve([]);\n }\n return new Promise((resolve, reject) => {\n const layer = this.getLayer();\n const source = layer.getSource();\n const projection = this.renderedProjection;\n const projectionExtent = projection.getExtent();\n const resolution = this.renderedResolution;\n const tileGrid = source.getTileGridForProjection(projection);\n const coordinate = applyTransform(\n this.renderedPixelToCoordinateTransform_,\n pixel.slice(),\n );\n const tileCoordString = tileGrid\n .getTileCoordForCoordAndResolution(coordinate, resolution)\n .toString();\n const tile =\n /** @type {Array<import(\"../../VectorRenderTile.js\").default>} */ (\n this.renderedTiles\n ).find(\n (tile) =>\n tile.tileCoord.toString() === tileCoordString &&\n tile.getState() === TileState.LOADED,\n );\n if (!tile || tile.loadingSourceTiles > 0) {\n resolve([]);\n return;\n }\n if (\n source.getWrapX() &&\n projection.canWrapX() &&\n !containsExtent(\n projectionExtent,\n tileGrid.getTileCoordExtent(tile.tileCoord),\n )\n ) {\n wrapX(coordinate, projection);\n }\n const layerUid = getUid(layer);\n const extent = tileGrid.getTileCoordExtent(tile.wrappedTileCoord);\n const corner = getTopLeft(extent);\n const tilePixel = [\n (coordinate[0] - corner[0]) / resolution,\n (corner[1] - coordinate[1]) / resolution,\n ];\n const features = tile\n .getSourceTiles()\n .reduce(\n (accumulator, sourceTile) =>\n accumulator.concat(sourceTile.getFeatures()),\n /** @type {Array<import(\"../../Feature.js\").FeatureLike>} */ ([]),\n );\n let hitDetectionImageData = tile.hitDetectionImageData[layerUid];\n if (!hitDetectionImageData) {\n const tileSize = toSize(\n tileGrid.getTileSize(\n tileGrid.getZForResolution(resolution, source.zDirection),\n ),\n );\n const rotation = this.renderedRotation_;\n const transforms = [\n this.getRenderTransform(\n tileGrid.getTileCoordCenter(tile.wrappedTileCoord),\n resolution,\n 0,\n HIT_DETECT_RESOLUTION,\n tileSize[0] * HIT_DETECT_RESOLUTION,\n tileSize[1] * HIT_DETECT_RESOLUTION,\n 0,\n ),\n ];\n hitDetectionImageData = createHitDetectionImageData(\n tileSize,\n transforms,\n features,\n layer.getStyleFunction(),\n tileGrid.getTileCoordExtent(tile.wrappedTileCoord),\n tile.getReplayState(layer).renderedResolution,\n rotation,\n );\n tile.hitDetectionImageData[layerUid] = hitDetectionImageData;\n }\n resolve(hitDetect(tilePixel, features, hitDetectionImageData));\n });\n }\n\n /**\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {Array<import('../../Feature.js').FeatureLike>} Features.\n */\n getFeaturesInExtent(extent) {\n /** @type {Array<import('../../Feature.js').FeatureLike>} */\n const features = [];\n const tileCache = this.getTileCache();\n if (tileCache.getCount() === 0) {\n return features;\n }\n const source = this.getLayer().getSource();\n const tileGrid = source.getTileGridForProjection(\n this.frameState.viewState.projection,\n );\n const z = tileGrid.getZForResolution(this.renderedResolution);\n /** @type {Object<string, true>} */\n const visitedSourceTiles = {};\n tileCache.forEach((tile) => {\n if (tile.tileCoord[0] !== z || tile.getState() !== TileState.LOADED) {\n return;\n }\n const sourceTiles = tile.getSourceTiles();\n for (let i = 0, ii = sourceTiles.length; i < ii; ++i) {\n const sourceTile = sourceTiles[i];\n const key = sourceTile.getKey();\n if (key in visitedSourceTiles) {\n continue;\n }\n visitedSourceTiles[key] = true;\n const tileCoord = sourceTile.tileCoord;\n if (intersects(extent, tileGrid.getTileCoordExtent(tileCoord))) {\n const tileFeatures = sourceTile.getFeatures();\n if (tileFeatures) {\n for (let j = 0, jj = tileFeatures.length; j < jj; ++j) {\n const candidate = tileFeatures[j];\n const geometry = candidate.getGeometry();\n if (intersects(extent, geometry.getExtent())) {\n features.push(candidate);\n }\n }\n }\n }\n }\n });\n return features;\n }\n\n /**\n * Perform action necessary to get the layer rendered after new fonts have loaded\n * @override\n */\n handleFontsChanged() {\n const layer = this.getLayer();\n if (layer.getVisible() && this.renderedLayerRevision_ !== undefined) {\n layer.changed();\n }\n }\n\n /**\n * Handle changes in image style state.\n * @param {import(\"../../events/Event.js\").default} event Image style change event.\n * @private\n */\n handleStyleImageChange_(event) {\n this.renderIfReadyAndVisible();\n }\n\n /**\n * Render declutter items for this layer\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {import(\"../../layer/Layer.js\").State} layerState Layer state.\n */\n renderDeclutter(frameState, layerState) {\n const context = this.context;\n const alpha = context.globalAlpha;\n context.globalAlpha = layerState.opacity;\n const viewHints = frameState.viewHints;\n const hifi = !(\n viewHints[ViewHint.ANIMATING] || viewHints[ViewHint.INTERACTING]\n );\n const scaledCanvasSize = [\n this.context.canvas.width,\n this.context.canvas.height,\n ];\n const declutter = this.getLayer().getDeclutter();\n const declutterTree = declutter\n ? frameState.declutter?.[declutter]\n : undefined;\n const layerUid = getUid(this.getLayer());\n const tiles =\n /** @type {Array<import(\"../../VectorRenderTile.js\").default>} */ (\n this.renderedTiles\n );\n for (let i = 0, ii = tiles.length; i < ii; ++i) {\n const tile = tiles[i];\n const executorGroups = tile.executorGroups[layerUid];\n if (executorGroups) {\n for (let j = executorGroups.length - 1; j >= 0; --j) {\n executorGroups[j].execute(\n this.context,\n scaledCanvasSize,\n this.getTileRenderTransform(tile, frameState),\n frameState.viewState.rotation,\n hifi,\n DECLUTTER,\n declutterTree,\n );\n }\n }\n }\n context.globalAlpha = alpha;\n }\n\n /**\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @override\n */\n renderDeferredInternal(frameState) {\n const tiles =\n /** @type {Array<import(\"../../VectorRenderTile.js\").default>} */ (\n this.renderedTiles\n );\n const layerUid = getUid(this.getLayer());\n const executorGroups = tiles.reduce((acc, tile, index) => {\n tile.executorGroups[layerUid].forEach((executorGroup) =>\n acc.push({\n executorGroup,\n index,\n }),\n );\n return acc;\n }, /** @type {Array<{executorGroup: CanvasExecutorGroup, index: number}>} */ ([]));\n\n const executorGroupZIndexContexts = executorGroups.map(({executorGroup}) =>\n executorGroup.getDeferredZIndexContexts(),\n );\n /** @type {Object<number, true>} */\n const usedZIndices = {};\n for (let i = 0, ii = executorGroups.length; i < ii; ++i) {\n const executorGroupZindexContext =\n executorGroups[i].executorGroup.getDeferredZIndexContexts();\n for (const key in executorGroupZindexContext) {\n usedZIndices[key] = true;\n }\n }\n const zIndexKeys = Object.keys(usedZIndices).map(Number).sort(ascending);\n zIndexKeys.forEach((zIndex) => {\n executorGroupZIndexContexts.forEach((zIndexContexts, i) => {\n if (!zIndexContexts[zIndex]) {\n return;\n }\n zIndexContexts[zIndex].forEach((zIndexContext) => {\n const {executorGroup, index} = executorGroups[i];\n const context = executorGroup.getRenderedContext();\n const alpha = context.globalAlpha;\n context.globalAlpha = this.renderedOpacity_;\n const tileClipContext = this.tileClipContexts_[index];\n if (tileClipContext) {\n tileClipContext.draw(context);\n }\n zIndexContext.draw(context);\n if (tileClipContext) {\n context.restore();\n }\n context.globalAlpha = alpha;\n zIndexContext.clear();\n });\n zIndexContexts[zIndex].length = 0;\n });\n });\n }\n\n /**\n * @param {import(\"../../VectorRenderTile.js\").default} tile The tile\n * @param {import('../../Map.js').FrameState} frameState Current frame state\n * @return {import('../../transform.js').Transform} Transform to use to render this tile\n */\n getTileRenderTransform(tile, frameState) {\n const pixelRatio = frameState.pixelRatio;\n const viewState = frameState.viewState;\n const center = viewState.center;\n const resolution = viewState.resolution;\n const rotation = viewState.rotation;\n const size = frameState.size;\n const width = Math.round(size[0] * pixelRatio);\n const height = Math.round(size[1] * pixelRatio);\n\n const source = this.getLayer().getSource();\n const tileGrid = source.getTileGridForProjection(\n frameState.viewState.projection,\n );\n const tileCoord = tile.tileCoord;\n const tileExtent = tileGrid.getTileCoordExtent(tile.wrappedTileCoord);\n const worldOffset =\n tileGrid.getTileCoordExtent(tileCoord, this.tempExtent)[0] -\n tileExtent[0];\n const transform = multiply(\n scale(this.inversePixelTransform.slice(), 1 / pixelRatio, 1 / pixelRatio),\n this.getRenderTransform(\n center,\n resolution,\n rotation,\n pixelRatio,\n width,\n height,\n worldOffset,\n ),\n );\n return transform;\n }\n\n /**\n * Render the vectors for this layer.\n * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Target context.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @override\n */\n postRender(context, frameState) {\n const viewHints = frameState.viewHints;\n const hifi = !(\n viewHints[ViewHint.ANIMATING] || viewHints[ViewHint.INTERACTING]\n );\n\n this.renderedPixelToCoordinateTransform_ =\n frameState.pixelToCoordinateTransform.slice();\n this.renderedRotation_ = frameState.viewState.rotation;\n this.renderedOpacity_ =\n frameState.layerStatesArray[frameState.layerIndex].opacity;\n\n const layer = /** @type {import(\"../../layer/VectorTile.js\").default} */ (\n this.getLayer()\n );\n const renderMode = layer.getRenderMode();\n const alpha = context.globalAlpha;\n context.globalAlpha = this.renderedOpacity_;\n const declutter = layer.getDeclutter();\n const replayTypes = declutter\n ? VECTOR_REPLAYS[renderMode].filter((type) => !DECLUTTER.includes(type))\n : VECTOR_REPLAYS[renderMode];\n const viewState = frameState.viewState;\n const rotation = viewState.rotation;\n const tileSource = layer.getSource();\n const tileGrid = tileSource.getTileGridForProjection(viewState.projection);\n const z = tileGrid.getZForResolution(\n viewState.resolution,\n tileSource.zDirection,\n );\n\n const tiles =\n /** @type {Array<import(\"../../VectorRenderTile.js\").default>} */ (\n this.renderedTiles\n );\n const clips = [];\n const clipZs = [];\n const tileClipContexts = [];\n const layerUid = getUid(layer);\n let ready = true;\n for (let i = tiles.length - 1; i >= 0; --i) {\n const tile = tiles[i];\n ready = ready && !tile.getReplayState(layer).dirty;\n const executorGroups = tile.executorGroups[layerUid].filter((group) =>\n group.hasExecutors(replayTypes),\n );\n if (executorGroups.length === 0) {\n continue;\n }\n const transform = this.getTileRenderTransform(tile, frameState);\n const currentZ = tile.tileCoord[0];\n let contextSaved = false;\n // Clip mask for regions in this tile that already filled by a higher z tile\n const currentClip = executorGroups[0].getClipCoords(transform);\n let clipContext = context;\n let tileClipContext;\n if (currentClip) {\n tileClipContext = new ZIndexContext();\n clipContext = tileClipContext.getContext();\n for (let j = 0, jj = clips.length; j < jj; ++j) {\n if (z !== currentZ && currentZ < clipZs[j]) {\n const clip = clips[j];\n if (\n intersects(\n [\n currentClip[0],\n currentClip[3],\n currentClip[4],\n currentClip[7],\n ],\n [clip[0], clip[3], clip[4], clip[7]],\n )\n ) {\n if (!contextSaved) {\n clipContext.save();\n contextSaved = true;\n }\n clipContext.beginPath();\n // counter-clockwise (outer ring) for current tile\n clipContext.moveTo(currentClip[0], currentClip[1]);\n clipContext.lineTo(currentClip[2], currentClip[3]);\n clipContext.lineTo(currentClip[4], currentClip[5]);\n clipContext.lineTo(currentClip[6], currentClip[7]);\n // clockwise (inner ring) for higher z tile\n clipContext.moveTo(clip[6], clip[7]);\n clipContext.lineTo(clip[4], clip[5]);\n clipContext.lineTo(clip[2], clip[3]);\n clipContext.lineTo(clip[0], clip[1]);\n clipContext.clip();\n }\n }\n }\n clips.push(currentClip);\n clipZs.push(currentZ);\n }\n for (let t = 0, tt = executorGroups.length; t < tt; ++t) {\n const executorGroup = executorGroups[t];\n executorGroup.execute(\n context,\n [context.canvas.width, context.canvas.height],\n transform,\n rotation,\n hifi,\n replayTypes,\n frameState.declutter?.[declutter],\n );\n }\n if (contextSaved) {\n if (clipContext === context) {\n clipContext.restore();\n } else {\n tileClipContexts[i] = tileClipContext;\n }\n }\n }\n context.globalAlpha = alpha;\n this.ready = ready;\n this.tileClipContexts_ = tileClipContexts;\n if (!frameState.declutter) {\n this.renderDeferredInternal(frameState);\n }\n\n super.postRender(context, frameState);\n }\n\n /**\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {import(\"../../style/Style.js\").default|Array<import(\"../../style/Style.js\").default>} styles The style or array of styles.\n * @param {import(\"../../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {boolean} [declutter] Enable decluttering.\n * @param {number} [index] Render order index.\n * @return {boolean} `true` if an image is loading.\n */\n renderFeature(\n feature,\n squaredTolerance,\n styles,\n builderGroup,\n declutter,\n index,\n ) {\n if (!styles) {\n return false;\n }\n let loading = false;\n if (Array.isArray(styles)) {\n for (let i = 0, ii = styles.length; i < ii; ++i) {\n loading =\n renderFeature(\n builderGroup,\n feature,\n styles[i],\n squaredTolerance,\n this.boundHandleStyleImageChange_,\n undefined,\n declutter,\n index,\n ) || loading;\n }\n } else {\n loading = renderFeature(\n builderGroup,\n feature,\n styles,\n squaredTolerance,\n this.boundHandleStyleImageChange_,\n undefined,\n declutter,\n index,\n );\n }\n return loading;\n }\n\n /**\n * @param {import(\"../../VectorRenderTile.js\").default} tile Tile.\n * @return {boolean} A new tile image was rendered.\n * @private\n */\n tileImageNeedsRender_(tile) {\n const layer = /** @type {import(\"../../layer/VectorTile.js\").default} */ (\n this.getLayer()\n );\n if (layer.getRenderMode() === 'vector') {\n return false;\n }\n const replayState = tile.getReplayState(layer);\n const revision = layer.getRevision();\n const resolution = tile.wantedResolution;\n const tileImageNeedsRender =\n replayState.renderedTileResolution !== resolution ||\n replayState.renderedTileRevision !== revision;\n return tileImageNeedsRender;\n }\n\n /**\n * @param {import(\"../../VectorRenderTile.js\").default} tile Tile.\n * @param {import(\"../../Map\").FrameState} frameState Frame state.\n * @private\n */\n renderTileImage_(tile, frameState) {\n const layer = /** @type {import(\"../../layer/VectorTile.js\").default} */ (\n this.getLayer()\n );\n const replayState = tile.getReplayState(layer);\n const revision = layer.getRevision();\n const executorGroups = tile.executorGroups[getUid(layer)];\n replayState.renderedTileRevision = revision;\n\n const tileCoord = tile.wrappedTileCoord;\n const z = tileCoord[0];\n const source = layer.getSource();\n let pixelRatio = frameState.pixelRatio;\n const viewState = frameState.viewState;\n const projection = viewState.projection;\n const tileGrid = source.getTileGridForProjection(projection);\n const tileResolution = tileGrid.getResolution(tile.tileCoord[0]);\n const renderPixelRatio =\n (frameState.pixelRatio / tile.wantedResolution) * tileResolution;\n const resolution = tileGrid.getResolution(z);\n const context = tile.getContext();\n\n // Increase tile size when overzooming for low pixel ratio, to avoid blurry tiles\n pixelRatio = Math.round(\n Math.max(pixelRatio, renderPixelRatio / pixelRatio),\n );\n const size = source.getTilePixelSize(z, pixelRatio, projection);\n context.canvas.width = size[0];\n context.canvas.height = size[1];\n const renderScale = pixelRatio / renderPixelRatio;\n if (renderScale !== 1) {\n const canvasTransform = resetTransform(this.tmpTransform_);\n scaleTransform(canvasTransform, renderScale, renderScale);\n context.setTransform.apply(context, canvasTransform);\n }\n const tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tempExtent);\n const pixelScale = renderPixelRatio / resolution;\n const transform = resetTransform(this.tmpTransform_);\n scaleTransform(transform, pixelScale, -pixelScale);\n translateTransform(transform, -tileExtent[0], -tileExtent[3]);\n for (let i = 0, ii = executorGroups.length; i < ii; ++i) {\n const executorGroup = executorGroups[i];\n executorGroup.execute(\n context,\n [\n context.canvas.width * renderScale,\n context.canvas.height * renderScale,\n ],\n transform,\n 0,\n true,\n IMAGE_REPLAYS[layer.getRenderMode()],\n null,\n );\n }\n replayState.renderedTileResolution = tile.wantedResolution;\n }\n}\n\nexport default CanvasVectorTileLayerRenderer;\n", "/**\n * @module ol/layer/VectorTile\n */\nimport {assert} from '../asserts.js';\nimport CanvasVectorTileLayerRenderer from '../renderer/canvas/VectorTileLayer.js';\nimport BaseVectorLayer from './BaseVector.js';\nimport TileProperty from './TileProperty.js';\n\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature<import(\"../Observable\").EventTypes, import(\"../events/Event.js\").default, Return> &\n * import(\"../Observable\").OnSignature<import(\"./Base\").BaseLayerObjectEventTypes|\n * import(\"./Layer.js\").LayerEventType|'change:preload'|'change:useInterimTilesOnError', import(\"../Object\").ObjectEvent, Return> &\n * import(\"../Observable\").OnSignature<import(\"../render/EventType\").LayerRenderEventTypes, import(\"../render/Event\").default, Return> &\n * import(\"../Observable\").CombinedOnSignature<import(\"../Observable\").EventTypes|import(\"./Base\").BaseLayerObjectEventTypes|\n * import(\"./Layer.js\").LayerEventType|'change:preload'|'change:useInterimTilesOnError'|import(\"../render/EventType\").LayerRenderEventTypes, Return>} VectorTileLayerOnSignature\n */\n\n/**\n * @typedef {'hybrid' | 'vector'} VectorTileRenderType\n */\n\n/***\n * @template T\n * @typedef {T extends import(\"../source/VectorTile.js\").default<infer U extends import(\"../Feature.js\").FeatureLike> ? U : never} ExtractedFeatureType\n */\n\n/**\n * @template {import(\"../source/VectorTile.js\").default<FeatureType>} [VectorTileSourceType=import(\"../source/VectorTile.js\").default<*>]\n * @template {import(\"../Feature\").FeatureLike} [FeatureType=ExtractedFeatureType<VectorTileSourceType>]\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering. The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {import(\"../render.js\").OrderFunction} [renderOrder] Render order. Function to be used when sorting\n * features before rendering. By default features are drawn in the order that they are created. Use\n * `null` to avoid the sort, but get an undefined draw order.\n * @property {number} [renderBuffer=100] The buffer in pixels around the tile extent used by the\n * renderer when getting features from the vector tile for the rendering or hit-detection.\n * Recommended value: Vector tiles are usually generated with a buffer, so this value should match\n * the largest possible buffer of the used tiles. It should be at least the size of the largest\n * point symbol or line width.\n * @property {VectorTileRenderType} [renderMode='hybrid'] Render mode for vector tiles:\n * `'hybrid'`: Polygon and line elements are rendered as images, so pixels are scaled during zoom\n * animations. Point symbols and texts are accurately rendered as vectors and can stay upright on\n * rotated views, but get lifted above all polygon and line elements.\n * `'vector'`: Everything is rendered as vectors and the original render order is maintained. Use\n * this mode for improved performance and visual epxerience on vector tile layers with not too many\n * rendered features (e.g. for highlighting a subset of features of another layer with the same\n * source).\n * @property {VectorTileSourceType} [source] Source.\n * @property {import(\"../Map.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use [map.addLayer()]{@link import(\"../Map.js\").default#addLayer}.\n * @property {boolean|string|number} [declutter=false] Declutter images and text. Any truthy value will enable\n * decluttering. Within a layer, a feature rendered before another has higher priority. All layers with the\n * same `declutter` value will be decluttered together. The priority is determined by the drawing order of the\n * layers with the same `declutter` value. Higher in the layer stack means higher priority. To declutter distinct\n * layers or groups of layers separately, use different truthy values for `declutter`.\n * @property {import(\"../style/Style.js\").StyleLike|import(\"../style/flat.js\").FlatStyleLike|null} [style] Layer\n * style. When set to `null`, only\n * features that have their own style will be rendered. See {@link module:ol/style/Style~Style} for the default style\n * which will be used if this is not set.\n * @property {import(\"./Base.js\").BackgroundColor} [background] Background color for the layer. If not specified, no\n * background will be rendered.\n * @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will be\n * recreated during animations. This means that no vectors will be shown clipped, but the setting\n * will have a performance impact for large amounts of vector data. When set to `false`, batches\n * will be recreated when no animation is active.\n * @property {boolean} [updateWhileInteracting=false] When set to `true`, feature batches will be\n * recreated during interactions. See also `updateWhileAnimating`.\n * @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0`\n * means no preloading.\n * @property {boolean} [useInterimTilesOnError=true] Deprecated. Use interim tiles on error.\n * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n * @property {number} [cacheSize=0] The internal tile cache size. If too small, this will auto-grow to hold\n * two zoom levels worth of tiles.\n */\n\n/**\n * @classdesc\n * Layer for vector tile data that is rendered client-side.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/VectorTile.js\").default<FeatureType>} [VectorTileSourceType=import(\"../source/VectorTile.js\").default<*>]\n * @template {import(\"../Feature.js\").FeatureLike} [FeatureType=ExtractedFeatureType<VectorTileSourceType>]\n * @extends {BaseVectorLayer<FeatureType, VectorTileSourceType, CanvasVectorTileLayerRenderer>}\n * @api\n */\nclass VectorTileLayer extends BaseVectorLayer {\n /**\n * @param {Options<VectorTileSourceType, FeatureType>} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n const baseOptions = Object.assign({}, options);\n delete baseOptions.preload;\n const cacheSize = options.cacheSize === undefined ? 0 : options.cacheSize;\n delete options.cacheSize;\n delete baseOptions.useInterimTilesOnError;\n\n super(baseOptions);\n\n /***\n * @type {VectorTileLayerOnSignature<import(\"../events\").EventsKey>}\n */\n this.on;\n\n /***\n * @type {VectorTileLayerOnSignature<import(\"../events\").EventsKey>}\n */\n this.once;\n\n /***\n * @type {VectorTileLayerOnSignature<void>}\n */\n this.un;\n\n /**\n * @type {number|undefined}\n * @private\n */\n this.cacheSize_ = cacheSize;\n\n const renderMode = options.renderMode || 'hybrid';\n assert(\n renderMode == 'hybrid' || renderMode == 'vector',\n \"`renderMode` must be `'hybrid'` or `'vector'`\",\n );\n\n /**\n * @private\n * @type {VectorTileRenderType}\n */\n this.renderMode_ = renderMode;\n\n this.setPreload(options.preload ? options.preload : 0);\n this.setUseInterimTilesOnError(\n options.useInterimTilesOnError !== undefined\n ? options.useInterimTilesOnError\n : true,\n );\n\n /**\n * @return {import(\"./Base.js\").BackgroundColor} Background color.\n * @function\n * @api\n */\n this.getBackground;\n\n /**\n * @param {import(\"./Base.js\").BackgroundColor} background Background color.\n * @function\n * @api\n */\n this.setBackground;\n }\n\n /**\n * @override\n */\n createRenderer() {\n return new CanvasVectorTileLayerRenderer(this, {\n cacheSize: this.cacheSize_,\n });\n }\n\n /**\n * Get the topmost feature that intersects the given pixel on the viewport. Returns a promise\n * that resolves with an array of features. The array will either contain the topmost feature\n * when a hit was detected, or it will be empty.\n *\n * The hit detection algorithm used for this method is optimized for performance, but is less\n * accurate than the one used in [map.getFeaturesAtPixel()]{@link import(\"../Map.js\").default#getFeaturesAtPixel}.\n * Text is not considered, and icons are only represented by their bounding box instead of the exact\n * image.\n *\n * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n * @return {Promise<Array<import(\"../Feature\").FeatureLike>>} Promise that resolves with an array of features.\n * @api\n * @override\n */\n getFeatures(pixel) {\n return super.getFeatures(pixel);\n }\n\n /**\n * Get features whose bounding box intersects the provided extent. Only features for cached\n * tiles for the last rendered zoom level are available in the source. So this method is only\n * suitable for requesting tiles for extents that are currently rendered.\n *\n * Features are returned in random tile order and as they are included in the tiles. This means\n * they can be clipped, duplicated across tiles, and simplified to the render resolution.\n *\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {Array<FeatureType>} Features.\n * @api\n */\n getFeaturesInExtent(extent) {\n return /** @type {Array<FeatureType>} */ (\n /** @type {*} */ (this.getRenderer().getFeaturesInExtent(extent))\n );\n }\n\n /**\n * @return {VectorTileRenderType} The render mode.\n */\n getRenderMode() {\n return this.renderMode_;\n }\n\n /**\n * Return the level as number to which we will preload tiles up to.\n * @return {number} The level to preload tiles up to.\n * @observable\n * @api\n */\n getPreload() {\n return /** @type {number} */ (this.get(TileProperty.PRELOAD));\n }\n\n /**\n * Deprecated. Whether we use interim tiles on error.\n * @return {boolean} Use interim tiles on error.\n * @observable\n * @api\n */\n getUseInterimTilesOnError() {\n return /** @type {boolean} */ (\n this.get(TileProperty.USE_INTERIM_TILES_ON_ERROR)\n );\n }\n\n /**\n * Set the level as number to which we will preload tiles up to.\n * @param {number} preload The level to preload tiles up to.\n * @observable\n * @api\n */\n setPreload(preload) {\n this.set(TileProperty.PRELOAD, preload);\n }\n\n /**\n * Deprecated. Set whether we use interim tiles on error.\n * @param {boolean} useInterimTilesOnError Use interim tiles on error.\n * @observable\n * @api\n */\n setUseInterimTilesOnError(useInterimTilesOnError) {\n this.set(TileProperty.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);\n }\n}\n\nexport default VectorTileLayer;\n", "/**\n * @module ol/renderer/canvas/ImageLayer\n */\nimport ImageState from '../../ImageState.js';\nimport ViewHint from '../../ViewHint.js';\nimport {\n containsCoordinate,\n containsExtent,\n getHeight,\n getIntersection,\n getWidth,\n intersects as intersectsExtent,\n isEmpty,\n} from '../../extent.js';\nimport {fromUserExtent} from '../../proj.js';\nimport {\n apply as applyTransform,\n compose as composeTransform,\n} from '../../transform.js';\nimport CanvasLayerRenderer from './Layer.js';\n\n/**\n * @classdesc\n * Canvas renderer for image layers.\n * @api\n */\nclass CanvasImageLayerRenderer extends CanvasLayerRenderer {\n /**\n * @param {import(\"../../layer/Image.js\").default} imageLayer Image layer.\n */\n constructor(imageLayer) {\n super(imageLayer);\n\n /**\n * @protected\n * @type {?import(\"../../Image.js\").default}\n */\n this.image = null;\n\n /**\n * @private\n * @type {number}\n */\n this.renderedSourceRevision_ = 0;\n }\n\n /**\n * @return {import('../../DataTile.js').ImageLike} Image.\n */\n getImage() {\n return !this.image ? null : this.image.getImage();\n }\n\n /**\n * Determine whether render should be called.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @return {boolean} Layer is ready to be rendered.\n * @override\n */\n prepareFrame(frameState) {\n const layerState = frameState.layerStatesArray[frameState.layerIndex];\n const pixelRatio = frameState.pixelRatio;\n const viewState = frameState.viewState;\n const viewResolution = viewState.resolution;\n\n const imageSource = this.getLayer().getSource();\n\n const hints = frameState.viewHints;\n\n let renderedExtent = frameState.extent;\n if (layerState.extent !== undefined) {\n renderedExtent = getIntersection(\n renderedExtent,\n fromUserExtent(layerState.extent, viewState.projection),\n );\n }\n\n if (\n !hints[ViewHint.ANIMATING] &&\n !hints[ViewHint.INTERACTING] &&\n !isEmpty(renderedExtent)\n ) {\n if (imageSource) {\n if (\n !this.getLayer().rendered &&\n this.renderedSourceRevision_ !== imageSource.getRevision()\n ) {\n this.image = null;\n }\n this.renderedSourceRevision_ = imageSource.getRevision();\n\n const projection = viewState.projection;\n const image = imageSource.getImage(\n renderedExtent,\n viewResolution,\n pixelRatio,\n projection,\n );\n if (image) {\n if (this.loadImage(image)) {\n this.image = image;\n } else if (image.getState() === ImageState.EMPTY) {\n this.image = null;\n }\n }\n } else {\n this.image = null;\n }\n }\n\n return !!this.image;\n }\n\n /**\n * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n * @return {Uint8ClampedArray} Data at the pixel location.\n * @override\n */\n getData(pixel) {\n const frameState = this.frameState;\n if (!frameState) {\n return null;\n }\n\n const layer = this.getLayer();\n const coordinate = applyTransform(\n frameState.pixelToCoordinateTransform,\n pixel.slice(),\n );\n\n const layerExtent = layer.getExtent();\n if (layerExtent) {\n if (!containsCoordinate(layerExtent, coordinate)) {\n return null;\n }\n }\n\n const imageExtent = this.image.getExtent();\n const img = this.image.getImage();\n\n const imageMapWidth = getWidth(imageExtent);\n const col = Math.floor(\n img.width * ((coordinate[0] - imageExtent[0]) / imageMapWidth),\n );\n if (col < 0 || col >= img.width) {\n return null;\n }\n\n const imageMapHeight = getHeight(imageExtent);\n const row = Math.floor(\n img.height * ((imageExtent[3] - coordinate[1]) / imageMapHeight),\n );\n if (row < 0 || row >= img.height) {\n return null;\n }\n\n return this.getImageData(img, col, row);\n }\n\n /**\n * Render the layer.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {HTMLElement} target Target that may be used to render content to.\n * @return {HTMLElement} The rendered element.\n * @override\n */\n renderFrame(frameState, target) {\n const image = this.image;\n const imageExtent = image.getExtent();\n const imageResolution = image.getResolution();\n const [imageResolutionX, imageResolutionY] = Array.isArray(imageResolution)\n ? imageResolution\n : [imageResolution, imageResolution];\n const imagePixelRatio = image.getPixelRatio();\n const layerState = frameState.layerStatesArray[frameState.layerIndex];\n const pixelRatio = frameState.pixelRatio;\n const viewState = frameState.viewState;\n const viewCenter = viewState.center;\n const viewResolution = viewState.resolution;\n const scaleX =\n (pixelRatio * imageResolutionX) / (viewResolution * imagePixelRatio);\n const scaleY =\n (pixelRatio * imageResolutionY) / (viewResolution * imagePixelRatio);\n\n this.prepareContainer(frameState, target);\n\n // desired dimensions of the canvas in pixels\n const width = this.context.canvas.width;\n const height = this.context.canvas.height;\n\n const context = this.getRenderContext(frameState);\n\n // clipped rendering if layer extent is set\n let clipped = false;\n let render = true;\n if (layerState.extent) {\n const layerExtent = fromUserExtent(\n layerState.extent,\n viewState.projection,\n );\n render = intersectsExtent(layerExtent, frameState.extent);\n clipped = render && !containsExtent(layerExtent, frameState.extent);\n if (clipped) {\n this.clipUnrotated(context, frameState, layerExtent);\n }\n }\n\n const img = image.getImage();\n\n const transform = composeTransform(\n this.tempTransform,\n width / 2,\n height / 2,\n scaleX,\n scaleY,\n 0,\n (imagePixelRatio * (imageExtent[0] - viewCenter[0])) / imageResolutionX,\n (imagePixelRatio * (viewCenter[1] - imageExtent[3])) / imageResolutionY,\n );\n\n this.renderedResolution = (imageResolutionY * pixelRatio) / imagePixelRatio;\n\n const dw = img.width * transform[0];\n const dh = img.height * transform[3];\n\n if (!this.getLayer().getSource().getInterpolate()) {\n context.imageSmoothingEnabled = false;\n }\n\n this.preRender(context, frameState);\n if (render && dw >= 0.5 && dh >= 0.5) {\n const dx = transform[4];\n const dy = transform[5];\n const opacity = layerState.opacity;\n if (opacity !== 1) {\n context.save();\n context.globalAlpha = opacity;\n }\n context.drawImage(img, 0, 0, +img.width, +img.height, dx, dy, dw, dh);\n if (opacity !== 1) {\n context.restore();\n }\n }\n this.postRender(this.context, frameState);\n\n if (clipped) {\n context.restore();\n }\n context.imageSmoothingEnabled = true;\n return this.container;\n }\n}\n\nexport default CanvasImageLayerRenderer;\n", "/**\n * @module ol/layer/BaseImage\n */\nimport Layer from './Layer.js';\n\n/**\n * @template {import(\"../source/Image.js\").default} ImageSourceType\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering. The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {import(\"../Map.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link import(\"../Map.js\").default#addLayer map.addLayer()}.\n * @property {ImageSourceType} [source] Source for this layer.\n * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n\n/**\n * @classdesc\n * Server-rendered images that are available for arbitrary extents and\n * resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/Image.js\").default} ImageSourceType\n * @template {import(\"../renderer/Layer.js\").default} RendererType\n * @extends {Layer<ImageSourceType, RendererType>}\n * @api\n */\nclass BaseImageLayer extends Layer {\n /**\n * @param {Options<ImageSourceType>} [options] Layer options.\n */\n constructor(options) {\n options = options ? options : {};\n super(options);\n }\n}\n\nexport default BaseImageLayer;\n", "/**\n * @module ol/layer/Image\n */\nimport CanvasImageLayerRenderer from '../renderer/canvas/ImageLayer.js';\nimport BaseImageLayer from './BaseImage.js';\n\n/**\n * @classdesc\n * Server-rendered images that are available for arbitrary extents and\n * resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/Image.js\").default} ImageSourceType\n * @extends {BaseImageLayer<ImageSourceType, CanvasImageLayerRenderer>}\n * @api\n */\nclass ImageLayer extends BaseImageLayer {\n /**\n * @param {import(\"./BaseImage.js\").Options<ImageSourceType>} [options] Layer options.\n */\n constructor(options) {\n super(options);\n }\n\n /**\n * @override\n */\n createRenderer() {\n return new CanvasImageLayerRenderer(this);\n }\n\n /**\n * Get data for a pixel location. A four element RGBA array will be returned. For requests outside the\n * layer extent, `null` will be returned. Data for an image can only be retrieved if the\n * source's `crossOrigin` property is set.\n *\n * ```js\n * // display layer data on every pointer move\n * map.on('pointermove', (event) => {\n * console.log(layer.getData(event.pixel));\n * });\n * ```\n * @param {import(\"../pixel\").Pixel} pixel Pixel.\n * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Pixel data.\n * @api\n * @override\n */\n getData(pixel) {\n return super.getData(pixel);\n }\n}\n\nexport default ImageLayer;\n", "/**\n * @module ol/vec/mat4\n */\n\n/** @typedef {Array<number>} Mat4 */\n\n/**\n * @return {Mat4} \"4x4 matrix representing a 3D identity transform.\"\n */\nexport function create() {\n return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n}\n\n/**\n * @param {Mat4} mat4 Flattened 4x4 matrix receiving the result.\n * @param {import(\"../transform.js\").Transform} transform Transformation matrix.\n * @return {Mat4} \"2D transformation matrix as flattened 4x4 matrix.\"\n */\nexport function fromTransform(mat4, transform) {\n mat4[0] = transform[0];\n mat4[1] = transform[1];\n mat4[4] = transform[2];\n mat4[5] = transform[3];\n mat4[12] = transform[4];\n mat4[13] = transform[5];\n return mat4;\n}\n\n/**\n * Generates a orthogonal projection matrix with the given bounds\n *\n * @param {number} left Left bound of the frustum\n * @param {number} right Right bound of the frustum\n * @param {number} bottom Bottom bound of the frustum\n * @param {number} top Top bound of the frustum\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum\n * @param {Mat4} [out] mat4 frustum matrix will be written into\n * @return {Mat4} out\n */\nexport function orthographic(left, right, bottom, top, near, far, out) {\n out = out ?? create();\n const lr = 1 / (left - right),\n bt = 1 / (bottom - top),\n nf = 1 / (near - far);\n out[0] = -2 * lr;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = -2 * bt;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 2 * nf;\n out[11] = 0;\n out[12] = (left + right) * lr;\n out[13] = (top + bottom) * bt;\n out[14] = (far + near) * nf;\n out[15] = 1;\n return out;\n}\n\n/**\n * Scales the mat4 by the dimensions in the given vec3\n *\n * @param {Mat4} m The matrix to scale.\n * @param {number} x How much to scale in the x direction.\n * @param {number} y How much to scale in the y direction.\n * @param {number} z How much to scale in the z direction.\n * @param {Mat4} [out] The matrix to write to.\n * @return {Mat4} out\n */\nexport function scale(m, x, y, z, out) {\n out = out ?? create();\n out[0] = m[0] * x;\n out[1] = m[1] * x;\n out[2] = m[2] * x;\n out[3] = m[3] * x;\n out[4] = m[4] * y;\n out[5] = m[5] * y;\n out[6] = m[6] * y;\n out[7] = m[7] * y;\n out[8] = m[8] * z;\n out[9] = m[9] * z;\n out[10] = m[10] * z;\n out[11] = m[11] * z;\n out[12] = m[12];\n out[13] = m[13];\n out[14] = m[14];\n out[15] = m[15];\n return out;\n}\n\n/**\n * Translate a matrix.\n *\n * @param {Mat4} m the matrix to translate\n * @param {number} x How much to translate in the x direction.\n * @param {number} y How much to translate in the y direction.\n * @param {number} z How much to translate in the z direction.\n * @param {Mat4} [out] the receiving matrix\n * @return {Mat4} out\n */\nexport function translate(m, x, y, z, out) {\n out = out ?? create();\n let a00, a01, a02, a03, a10, a11, a12, a13, a20, a21, a22, a23;\n\n if (m === out) {\n out[12] = m[0] * x + m[4] * y + m[8] * z + m[12];\n out[13] = m[1] * x + m[5] * y + m[9] * z + m[13];\n out[14] = m[2] * x + m[6] * y + m[10] * z + m[14];\n out[15] = m[3] * x + m[7] * y + m[11] * z + m[15];\n } else {\n a00 = m[0];\n a01 = m[1];\n a02 = m[2];\n a03 = m[3];\n a10 = m[4];\n a11 = m[5];\n a12 = m[6];\n a13 = m[7];\n a20 = m[8];\n a21 = m[9];\n a22 = m[10];\n a23 = m[11];\n\n out[0] = a00;\n out[1] = a01;\n out[2] = a02;\n out[3] = a03;\n out[4] = a10;\n out[5] = a11;\n out[6] = a12;\n out[7] = a13;\n out[8] = a20;\n out[9] = a21;\n out[10] = a22;\n out[11] = a23;\n\n out[12] = a00 * x + a10 * y + a20 * z + m[12];\n out[13] = a01 * x + a11 * y + a21 * z + m[13];\n out[14] = a02 * x + a12 * y + a22 * z + m[14];\n out[15] = a03 * x + a13 * y + a23 * z + m[15];\n }\n\n return out;\n}\n\n/**\n * @param {number} x x translation.\n * @param {number} y y translation.\n * @param {number} z z translation.\n * @param {Mat4} [out] optional matrix to store result\n * @return {Mat4} out\n */\nexport function translation(x, y, z, out) {\n out = out ?? create();\n\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = x;\n out[13] = y;\n out[14] = z;\n out[15] = 1;\n\n return out;\n}\n", "/**\n * @module ol/webgl\n */\n\nimport {SAFARI_BUG_237906} from './has.js';\n\n/**\n * Constants taken from goog.webgl\n */\n\n/**\n * Used by {@link module:ol/webgl/Helper~WebGLHelper} for buffers containing vertices data, such as\n * position, color, texture coordinate, etc. These vertices are then referenced by an index buffer\n * to be drawn on screen (see {@link module:ol/webgl.ELEMENT_ARRAY_BUFFER}).\n * @const\n * @type {number}\n * @api\n */\nexport const ARRAY_BUFFER = 0x8892;\n\n/**\n * Used by {@link module:ol/webgl/Helper~WebGLHelper} for buffers containing indices data.\n * Index buffers are essentially lists of references to vertices defined in a vertex buffer\n * (see {@link module:ol/webgl.ARRAY_BUFFER}), and define the primitives (triangles) to be drawn.\n * @const\n * @type {number}\n * @api\n */\nexport const ELEMENT_ARRAY_BUFFER = 0x8893;\n\n/**\n * Used by {link module:ol/webgl/Buffer~WebGLArrayBuffer}.\n * @const\n * @type {number}\n * @api\n */\nexport const STREAM_DRAW = 0x88e0;\n\n/**\n * Used by {link module:ol/webgl/Buffer~WebGLArrayBuffer}.\n * @const\n * @type {number}\n * @api\n */\nexport const STATIC_DRAW = 0x88e4;\n\n/**\n * Used by {link module:ol/webgl/Buffer~WebGLArrayBuffer}.\n * @const\n * @type {number}\n * @api\n */\nexport const DYNAMIC_DRAW = 0x88e8;\n\n/**\n * @const\n * @type {number}\n */\nexport const UNSIGNED_BYTE = 0x1401;\n\n/**\n * @const\n * @type {number}\n */\nexport const UNSIGNED_SHORT = 0x1403;\n\n/**\n * @const\n * @type {number}\n */\nexport const UNSIGNED_INT = 0x1405;\n\n/**\n * @const\n * @type {number}\n */\nexport const FLOAT = 0x1406;\n\n/**\n end of goog.webgl constants\n */\n\n/**\n * @const\n * @type {Array<string>}\n */\nconst CONTEXT_IDS = ['experimental-webgl', 'webgl', 'webkit-3d', 'moz-webgl'];\n\n/**\n * @param {HTMLCanvasElement} canvas Canvas.\n * @param {Object} [attributes] Attributes.\n * @return {WebGLRenderingContext|null} WebGL rendering context.\n */\nexport function getContext(canvas, attributes) {\n attributes = Object.assign(\n {\n preserveDrawingBuffer: true,\n antialias: SAFARI_BUG_237906 ? false : true, // https://bugs.webkit.org/show_bug.cgi?id=237906\n },\n attributes,\n );\n const ii = CONTEXT_IDS.length;\n for (let i = 0; i < ii; ++i) {\n try {\n const context = canvas.getContext(CONTEXT_IDS[i], attributes);\n if (context) {\n return /** @type {!WebGLRenderingContext} */ (context);\n }\n } catch {\n // pass\n }\n }\n return null;\n}\n\n/**\n * @type {Array<string>|null}\n */\nlet supportedExtensions = null;\n\n/**\n * @return {Array<string>|null} List of supported WebGL extensions.\n */\nexport function getSupportedExtensions() {\n if (!supportedExtensions) {\n const canvas = document.createElement('canvas');\n const gl = getContext(canvas);\n if (gl) {\n supportedExtensions = gl.getSupportedExtensions();\n }\n }\n return supportedExtensions;\n}\n", "/**\n * @module ol/webgl/Buffer\n */\nimport {assert} from '../asserts.js';\nimport {\n ARRAY_BUFFER,\n DYNAMIC_DRAW,\n ELEMENT_ARRAY_BUFFER,\n STATIC_DRAW,\n STREAM_DRAW,\n} from '../webgl.js';\n\n/**\n * Used to describe the intended usage for the data: `STATIC_DRAW`, `STREAM_DRAW`\n * or `DYNAMIC_DRAW`.\n * @enum {number}\n */\nexport const BufferUsage = {\n STATIC_DRAW: STATIC_DRAW,\n STREAM_DRAW: STREAM_DRAW,\n DYNAMIC_DRAW: DYNAMIC_DRAW,\n};\n\n/**\n * @classdesc\n * Object used to store an array of data as well as usage information for that data.\n * Stores typed arrays internally, either Float32Array or Uint16/32Array depending on\n * the buffer type (ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER) and available extensions.\n *\n * To populate the array, you can either use:\n * A size using `#ofSize(buffer)`\n * An `ArrayBuffer` object using `#fromArrayBuffer(buffer)`\n * A plain array using `#fromArray(array)`\n *\n * Note:\n * See the documentation of [WebGLRenderingContext.bufferData](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/bufferData)\n * for more info on buffer usage.\n */\nclass WebGLArrayBuffer {\n /**\n * @param {number} type Buffer type, either ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER.\n * @param {number} [usage] Intended usage, either `STATIC_DRAW`, `STREAM_DRAW` or `DYNAMIC_DRAW`.\n * Default is `STATIC_DRAW`.\n */\n constructor(type, usage) {\n /**\n * @private\n * @type {Float32Array|Uint32Array|null}\n */\n this.array_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.type_ = type;\n\n assert(\n type === ARRAY_BUFFER || type === ELEMENT_ARRAY_BUFFER,\n 'A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`',\n );\n\n /**\n * @private\n * @type {number}\n */\n this.usage_ = usage !== undefined ? usage : BufferUsage.STATIC_DRAW;\n }\n\n /**\n * Populates the buffer with an array of the given size (all values will be zeroes).\n * @param {number} size Array size\n * @return {WebGLArrayBuffer} This\n */\n ofSize(size) {\n this.array_ = new (getArrayClassForType(this.type_))(size);\n return this;\n }\n\n /**\n * Populates the buffer with an array of the given size.\n * @param {Array<number>} array Numerical array\n * @return {WebGLArrayBuffer} This\n */\n fromArray(array) {\n this.array_ = getArrayClassForType(this.type_).from(array);\n return this;\n }\n\n /**\n * Populates the buffer with a raw binary array buffer.\n * @param {ArrayBuffer} buffer Raw binary buffer to populate the array with. Note that this buffer must have been\n * initialized for the same typed array class.\n * @return {WebGLArrayBuffer} This\n */\n fromArrayBuffer(buffer) {\n this.array_ = new (getArrayClassForType(this.type_))(buffer);\n return this;\n }\n\n /**\n * @return {number} Buffer type.\n */\n getType() {\n return this.type_;\n }\n\n /**\n * Will return null if the buffer was not initialized\n * @return {Float32Array|Uint32Array|null} Array.\n */\n getArray() {\n return this.array_;\n }\n\n /**\n * @param {Float32Array|Uint32Array} array Array.\n */\n setArray(array) {\n const ArrayType = getArrayClassForType(this.type_);\n if (!(array instanceof ArrayType)) {\n throw new Error(`Expected ${ArrayType}`);\n }\n this.array_ = array;\n }\n\n /**\n * @return {number} Usage.\n */\n getUsage() {\n return this.usage_;\n }\n\n /**\n * Will return 0 if the buffer is not initialized\n * @return {number} Array size\n */\n getSize() {\n return this.array_ ? this.array_.length : 0;\n }\n}\n\n/**\n * Returns a typed array constructor based on the given buffer type\n * @param {number} type Buffer type, either ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER.\n * @return {Float32ArrayConstructor|Uint32ArrayConstructor} The typed array class to use for this buffer.\n */\nexport function getArrayClassForType(type) {\n switch (type) {\n case ARRAY_BUFFER:\n return Float32Array;\n case ELEMENT_ARRAY_BUFFER:\n return Uint32Array;\n default:\n return Float32Array;\n }\n}\n\nexport default WebGLArrayBuffer;\n", "/**\n * @module ol/webgl/ContextEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n LOST: 'webglcontextlost',\n RESTORED: 'webglcontextrestored',\n};\n", "/**\n * @module ol/webgl/PostProcessingPass\n */\n\nimport {getUid} from '../util.js';\n\nconst DEFAULT_VERTEX_SHADER = `\n precision mediump float;\n\n attribute vec2 a_position;\n varying vec2 v_texCoord;\n varying vec2 v_screenCoord;\n\n uniform vec2 u_screenSize;\n\n void main() {\n v_texCoord = a_position * 0.5 + 0.5;\n v_screenCoord = v_texCoord * u_screenSize;\n gl_Position = vec4(a_position, 0.0, 1.0);\n }\n`;\n\nconst DEFAULT_FRAGMENT_SHADER = `\n precision mediump float;\n\n uniform sampler2D u_image;\n uniform float u_opacity;\n\n varying vec2 v_texCoord;\n\n void main() {\n gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity;\n }\n`;\n\n/**\n * @typedef {Object} Options\n * @property {WebGLRenderingContext} webGlContext WebGL context; mandatory.\n * @property {number} [scaleRatio] Scale ratio; if < 1, the post process will render to a texture smaller than\n * the main canvas that will then be sampled up (useful for saving resource on blur steps).\n * @property {string} [vertexShader] Vertex shader source\n * @property {string} [fragmentShader] Fragment shader source\n * @property {Object<string,import(\"./Helper\").UniformValue>} [uniforms] Uniform definitions for the post process step\n */\n\n/**\n * @typedef {Object} UniformInternalDescription\n * @property {import(\"./Helper\").UniformValue} value Value\n * @property {WebGLUniformLocation} location Location\n * @property {WebGLTexture} [texture] Texture\n * @private\n */\n\n/**\n * @classdesc\n * This class is used to define Post Processing passes with custom shaders and uniforms.\n * This is used internally by {@link module:ol/webgl/Helper~WebGLHelper}.\n *\n * Please note that the final output on the DOM canvas is expected to have premultiplied alpha, which means that\n * a pixel which is 100% red with an opacity of 50% must have a color of (r=0.5, g=0, b=0, a=0.5).\n * Failing to provide pixel colors with premultiplied alpha will result in render anomalies.\n *\n * The default post-processing pass does *not* multiply color values with alpha value, it expects color values to be\n * premultiplied.\n *\n * Default shaders are shown hereafter:\n *\n * Vertex shader:\n *\n * ```\n * precision mediump float;\n *\n * attribute vec2 a_position;\n * varying vec2 v_texCoord;\n * varying vec2 v_screenCoord;\n *\n * uniform vec2 u_screenSize;\n *\n * void main() {\n * v_texCoord = a_position * 0.5 + 0.5;\n * v_screenCoord = v_texCoord * u_screenSize;\n * gl_Position = vec4(a_position, 0.0, 1.0);\n * }\n * ```\n *\n * Fragment shader:\n *\n * ```\n * precision mediump float;\n *\n * uniform sampler2D u_image;\n * uniform float u_opacity;\n *\n * varying vec2 v_texCoord;\n *\n * void main() {\n * gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity;\n * }\n * ```\n */\nclass WebGLPostProcessingPass {\n /**\n * @param {Options} options Options.\n */\n constructor(options) {\n /**\n * @private\n */\n this.gl_ = options.webGlContext;\n const gl = this.gl_;\n\n /**\n * @private\n */\n this.scaleRatio_ = options.scaleRatio || 1;\n\n /**\n * @type {WebGLTexture}\n * @private\n */\n this.renderTargetTexture_ = gl.createTexture();\n\n /**\n * @type {import('../size.js').Size|null}\n * @private\n */\n this.renderTargetTextureSize_ = null;\n\n /**\n * @private\n */\n this.frameBuffer_ = gl.createFramebuffer();\n /**\n * @private\n */\n this.depthBuffer_ = gl.createRenderbuffer();\n\n // compile the program for the frame buffer\n // TODO: make compilation errors show up\n const vertexShader = gl.createShader(gl.VERTEX_SHADER);\n gl.shaderSource(\n vertexShader,\n options.vertexShader || DEFAULT_VERTEX_SHADER,\n );\n gl.compileShader(vertexShader);\n const fragmentShader = gl.createShader(gl.FRAGMENT_SHADER);\n gl.shaderSource(\n fragmentShader,\n options.fragmentShader || DEFAULT_FRAGMENT_SHADER,\n );\n gl.compileShader(fragmentShader);\n /**\n * @private\n */\n this.renderTargetProgram_ = gl.createProgram();\n gl.attachShader(this.renderTargetProgram_, vertexShader);\n gl.attachShader(this.renderTargetProgram_, fragmentShader);\n gl.linkProgram(this.renderTargetProgram_);\n\n // bind the vertices buffer for the frame buffer\n /**\n * @private\n */\n this.renderTargetVerticesBuffer_ = gl.createBuffer();\n const verticesArray = [-1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1];\n gl.bindBuffer(gl.ARRAY_BUFFER, this.renderTargetVerticesBuffer_);\n gl.bufferData(\n gl.ARRAY_BUFFER,\n new Float32Array(verticesArray),\n gl.STATIC_DRAW,\n );\n\n /**\n * @private\n */\n this.renderTargetAttribLocation_ = gl.getAttribLocation(\n this.renderTargetProgram_,\n 'a_position',\n );\n /**\n * @private\n */\n this.renderTargetUniformLocation_ = gl.getUniformLocation(\n this.renderTargetProgram_,\n 'u_screenSize',\n );\n /**\n * @private\n */\n this.renderTargetOpacityLocation_ = gl.getUniformLocation(\n this.renderTargetProgram_,\n 'u_opacity',\n );\n /**\n * @private\n */\n this.renderTargetTextureLocation_ = gl.getUniformLocation(\n this.renderTargetProgram_,\n 'u_image',\n );\n\n /**\n * Holds info about custom uniforms used in the post processing pass\n * @type {Array<UniformInternalDescription>}\n * @private\n */\n this.uniforms_ = [];\n options.uniforms &&\n Object.keys(options.uniforms).forEach((name) => {\n this.uniforms_.push({\n value: options.uniforms[name],\n location: gl.getUniformLocation(this.renderTargetProgram_, name),\n });\n });\n }\n\n getRenderTargetTexture() {\n return this.renderTargetTexture_;\n }\n\n /**\n * Get the WebGL rendering context\n * @return {WebGLRenderingContext} The rendering context.\n */\n getGL() {\n return this.gl_;\n }\n\n /**\n * Initialize the render target texture of the post process, make sure it is at the\n * right size and bind it as a render target for the next draw calls.\n * The last step to be initialized will be the one where the primitives are rendered.\n * @param {import(\"../Map.js\").FrameState} frameState current frame state\n */\n init(frameState) {\n const gl = this.getGL();\n const textureSize = [\n gl.drawingBufferWidth * this.scaleRatio_,\n gl.drawingBufferHeight * this.scaleRatio_,\n ];\n\n // rendering goes to my buffer\n gl.bindFramebuffer(gl.FRAMEBUFFER, this.getFrameBuffer());\n gl.bindRenderbuffer(gl.RENDERBUFFER, this.getDepthBuffer());\n gl.viewport(0, 0, textureSize[0], textureSize[1]);\n\n // if size has changed: adjust canvas & render target texture\n if (\n !this.renderTargetTextureSize_ ||\n this.renderTargetTextureSize_[0] !== textureSize[0] ||\n this.renderTargetTextureSize_[1] !== textureSize[1]\n ) {\n this.renderTargetTextureSize_ = textureSize;\n\n // create a new texture\n const level = 0;\n const internalFormat = gl.RGBA;\n const border = 0;\n const format = gl.RGBA;\n const type = gl.UNSIGNED_BYTE;\n const data = null;\n gl.bindTexture(gl.TEXTURE_2D, this.renderTargetTexture_);\n gl.texImage2D(\n gl.TEXTURE_2D,\n level,\n internalFormat,\n textureSize[0],\n textureSize[1],\n border,\n format,\n type,\n data,\n );\n\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n\n // bind the texture to the framebuffer\n gl.framebufferTexture2D(\n gl.FRAMEBUFFER,\n gl.COLOR_ATTACHMENT0,\n gl.TEXTURE_2D,\n this.renderTargetTexture_,\n 0,\n );\n\n gl.renderbufferStorage(\n gl.RENDERBUFFER,\n gl.DEPTH_COMPONENT16,\n textureSize[0],\n textureSize[1],\n );\n gl.framebufferRenderbuffer(\n gl.FRAMEBUFFER,\n gl.DEPTH_ATTACHMENT,\n gl.RENDERBUFFER,\n this.depthBuffer_,\n );\n }\n }\n\n /**\n * Render to the next postprocessing pass (or to the canvas if final pass).\n * @param {import(\"../Map.js\").FrameState} frameState current frame state\n * @param {WebGLPostProcessingPass} [nextPass] Next pass, optional\n * @param {function(WebGLRenderingContext, import(\"../Map.js\").FrameState):void} [preCompose] Called before composing.\n * @param {function(WebGLRenderingContext, import(\"../Map.js\").FrameState):void} [postCompose] Called before composing.\n */\n apply(frameState, nextPass, preCompose, postCompose) {\n const gl = this.getGL();\n const size = frameState.size;\n\n gl.bindFramebuffer(\n gl.FRAMEBUFFER,\n nextPass ? nextPass.getFrameBuffer() : null,\n );\n gl.activeTexture(gl.TEXTURE0);\n gl.bindTexture(gl.TEXTURE_2D, this.renderTargetTexture_);\n\n if (!nextPass) {\n // clear the canvas if we are the first to render to it\n // and preserveDrawingBuffer is true\n const canvasId = getUid(gl.canvas);\n if (!frameState.renderTargets[canvasId]) {\n const attributes = gl.getContextAttributes();\n if (attributes && attributes.preserveDrawingBuffer) {\n gl.clearColor(0.0, 0.0, 0.0, 0.0);\n gl.clearDepth(1.0);\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n }\n\n frameState.renderTargets[canvasId] = true;\n }\n }\n\n gl.disable(gl.DEPTH_TEST);\n gl.enable(gl.BLEND);\n gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);\n\n gl.bindBuffer(gl.ARRAY_BUFFER, this.renderTargetVerticesBuffer_);\n\n gl.useProgram(this.renderTargetProgram_);\n gl.enableVertexAttribArray(this.renderTargetAttribLocation_);\n gl.vertexAttribPointer(\n this.renderTargetAttribLocation_,\n 2,\n gl.FLOAT,\n false,\n 0,\n 0,\n );\n gl.uniform2f(this.renderTargetUniformLocation_, size[0], size[1]);\n gl.uniform1i(this.renderTargetTextureLocation_, 0);\n\n const opacity = frameState.layerStatesArray[frameState.layerIndex].opacity;\n gl.uniform1f(this.renderTargetOpacityLocation_, opacity);\n\n this.applyUniforms(frameState);\n\n if (preCompose) {\n preCompose(gl, frameState);\n }\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n if (postCompose) {\n postCompose(gl, frameState);\n }\n }\n\n /**\n * @return {WebGLFramebuffer} Frame buffer\n */\n getFrameBuffer() {\n return this.frameBuffer_;\n }\n\n /**\n * @return {WebGLRenderbuffer} Depth buffer\n */\n getDepthBuffer() {\n return this.depthBuffer_;\n }\n\n /**\n * Sets the custom uniforms based on what was given in the constructor.\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n * @private\n */\n applyUniforms(frameState) {\n const gl = this.getGL();\n\n let value;\n let textureSlot = 1;\n this.uniforms_.forEach(function (uniform) {\n value =\n typeof uniform.value === 'function'\n ? uniform.value(frameState)\n : uniform.value;\n\n // apply value based on type\n if (value instanceof HTMLCanvasElement || value instanceof ImageData) {\n // create a texture & put data\n if (!uniform.texture) {\n uniform.texture = gl.createTexture();\n }\n gl.activeTexture(gl[`TEXTURE${textureSlot}`]);\n gl.bindTexture(gl.TEXTURE_2D, uniform.texture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n\n if (value instanceof ImageData) {\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n gl.RGBA,\n value.width,\n value.height,\n 0,\n gl.UNSIGNED_BYTE,\n new Uint8Array(value.data),\n );\n } else {\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n value,\n );\n }\n\n // fill texture slots\n gl.uniform1i(uniform.location, textureSlot++);\n } else if (Array.isArray(value)) {\n switch (value.length) {\n case 2:\n gl.uniform2f(uniform.location, value[0], value[1]);\n return;\n case 3:\n gl.uniform3f(uniform.location, value[0], value[1], value[2]);\n return;\n case 4:\n gl.uniform4f(\n uniform.location,\n value[0],\n value[1],\n value[2],\n value[3],\n );\n return;\n default:\n return;\n }\n } else if (typeof value === 'number') {\n gl.uniform1f(uniform.location, value);\n }\n });\n }\n}\n\nexport default WebGLPostProcessingPass;\n", "/**\n * @module ol/webgl/Helper\n */\nimport Disposable from '../Disposable.js';\nimport {assert} from '../asserts.js';\nimport {clear} from '../obj.js';\nimport {\n compose as composeTransform,\n create as createTransform,\n} from '../transform.js';\nimport {getUid} from '../util.js';\nimport {create, fromTransform} from '../vec/mat4.js';\nimport ContextEventType from '../webgl/ContextEventType.js';\nimport {\n FLOAT,\n UNSIGNED_BYTE,\n UNSIGNED_INT,\n UNSIGNED_SHORT,\n getContext,\n} from '../webgl.js';\nimport WebGLPostProcessingPass from './PostProcessingPass.js';\n\n/**\n * @typedef {Object} BufferCacheEntry\n * @property {import(\"./Buffer.js\").default} buffer Buffer.\n * @property {WebGLBuffer} webGlBuffer WebGlBuffer.\n */\n\n/**\n * Shader types, either `FRAGMENT_SHADER` or `VERTEX_SHADER`.\n * @enum {number}\n */\nexport const ShaderType = {\n FRAGMENT_SHADER: 0x8b30,\n VERTEX_SHADER: 0x8b31,\n};\n\n/**\n * Names of uniforms made available to all shaders.\n * Please note: changing these *will* break custom shaders!\n * @enum {string}\n */\nexport const DefaultUniform = {\n PROJECTION_MATRIX: 'u_projectionMatrix',\n SCREEN_TO_WORLD_MATRIX: 'u_screenToWorldMatrix',\n TIME: 'u_time',\n ZOOM: 'u_zoom',\n RESOLUTION: 'u_resolution',\n ROTATION: 'u_rotation',\n VIEWPORT_SIZE_PX: 'u_viewportSizePx',\n PIXEL_RATIO: 'u_pixelRatio',\n HIT_DETECTION: 'u_hitDetection',\n};\n\n/**\n * Attribute types, either `UNSIGNED_BYTE`, `UNSIGNED_SHORT`, `UNSIGNED_INT` or `FLOAT`\n * Note: an attribute stored in a `Float32Array` should be of type `FLOAT`.\n * @enum {number}\n */\nexport const AttributeType = {\n UNSIGNED_BYTE: UNSIGNED_BYTE,\n UNSIGNED_SHORT: UNSIGNED_SHORT,\n UNSIGNED_INT: UNSIGNED_INT,\n FLOAT: FLOAT,\n};\n\n/**\n * Description of an attribute in a buffer\n * @typedef {Object} AttributeDescription\n * @property {string|null} name Attribute name to use in shaders; if null, this attribute will not be enabled and is simply used as padding in the buffers\n * @property {number} size Number of components per attributes\n * @property {AttributeType} [type] Attribute type, i.e. number of bytes used to store the value. This is\n * determined by the class of typed array which the buffer uses (eg. `Float32Array` for a `FLOAT` attribute).\n * Default is `FLOAT`.\n */\n\n/**\n * @typedef {number|Array<number>|HTMLCanvasElement|HTMLImageElement|ImageData|WebGLTexture|import(\"../transform\").Transform} UniformLiteralValue\n */\n\n/**\n * Uniform value can be a number, array of numbers (2 to 4), canvas element or a callback returning\n * one of the previous types.\n * @typedef {UniformLiteralValue|function(import(\"../Map.js\").FrameState):UniformLiteralValue} UniformValue\n */\n\n/**\n * @typedef {Object} PostProcessesOptions\n * @property {number} [scaleRatio] Scale ratio; if < 1, the post process will render to a texture smaller than\n * the main canvas which will then be sampled up (useful for saving resource on blur steps).\n * @property {string} [vertexShader] Vertex shader source\n * @property {string} [fragmentShader] Fragment shader source\n * @property {Object<string,UniformValue>} [uniforms] Uniform definitions for the post process step\n */\n\n/**\n * @typedef {Object} Options\n * @property {Object<string,UniformValue>} [uniforms] Uniform definitions; property names must match the uniform\n * names in the provided or default shaders.\n * @property {Array<PostProcessesOptions>} [postProcesses] Post-processes definitions\n * @property {string} [canvasCacheKey] The cache key for the canvas.\n */\n\n/**\n * @typedef {Object} UniformInternalDescription\n * @property {string} name Name\n * @property {UniformValue} [value] Value\n * @property {UniformValue} [prevValue] The previous value.\n * @property {WebGLTexture} [texture] Texture\n * @private\n */\n\n/**\n * @typedef {Object} CanvasCacheItem\n * @property {WebGLRenderingContext} context The context of this canvas.\n * @property {number} users The count of users of this canvas.\n */\n\n/**\n * @type {Object<string,CanvasCacheItem>}\n */\nconst canvasCache = {};\n\n/**\n * @param {string} key The cache key for the canvas.\n * @return {string} The shared cache key.\n */\nfunction getSharedCanvasCacheKey(key) {\n return 'shared/' + key;\n}\n\nlet uniqueCanvasCacheKeyCount = 0;\n\n/**\n * @return {string} The unique cache key.\n */\nfunction getUniqueCanvasCacheKey() {\n const key = 'unique/' + uniqueCanvasCacheKeyCount;\n uniqueCanvasCacheKeyCount += 1;\n return key;\n}\n\n/**\n * @param {string} key The cache key for the canvas.\n * @return {WebGLRenderingContext} The canvas.\n */\nfunction getOrCreateContext(key) {\n let cacheItem = canvasCache[key];\n if (!cacheItem) {\n const canvas = document.createElement('canvas');\n canvas.width = 1;\n canvas.height = 1;\n canvas.style.position = 'absolute';\n canvas.style.left = '0';\n const context = getContext(canvas);\n cacheItem = {users: 0, context};\n canvasCache[key] = cacheItem;\n }\n\n cacheItem.users += 1;\n return cacheItem.context;\n}\n\n/**\n * @param {string} key The cache key for the canvas.\n */\nfunction releaseCanvas(key) {\n const cacheItem = canvasCache[key];\n if (!cacheItem) {\n return;\n }\n\n cacheItem.users -= 1;\n if (cacheItem.users > 0) {\n return;\n }\n\n const gl = cacheItem.context;\n const extension = gl.getExtension('WEBGL_lose_context');\n if (extension) {\n extension.loseContext();\n }\n const canvas = gl.canvas;\n canvas.width = 1;\n canvas.height = 1;\n\n delete canvasCache[key];\n}\n\n/**\n * @classdesc\n * This class is intended to provide low-level functions related to WebGL rendering, so that accessing\n * directly the WebGL API should not be required anymore.\n *\n * Several operations are handled by the `WebGLHelper` class:\n *\n * ### Define custom shaders and uniforms\n *\n * Shaders* are low-level programs executed on the GPU and written in GLSL. There are two types of shaders:\n *\n * Vertex shaders are used to manipulate the position and attribute of *vertices* of rendered primitives (ie. corners of a square).\n * Outputs are:\n *\n * `gl_Position`: position of the vertex in screen space\n *\n * Varyings usually prefixed with `v_` are passed on to the fragment shader\n *\n * Fragment shaders are used to control the actual color of the pixels drawn on screen. Their only output is `gl_FragColor`.\n *\n * Both shaders can take *uniforms* or *attributes* as input. Attributes are explained later. Uniforms are common, read-only values that\n * can be changed at every frame and can be of type float, arrays of float or images.\n *\n * Shaders must be compiled and assembled into a program like so:\n * ```js\n * // here we simply create two shaders and assemble them in a program which is then used\n * // for subsequent rendering calls; note how a frameState is required to set up a program,\n * // as several default uniforms are computed from it (projection matrix, zoom level, etc.)\n * const vertexShader = new WebGLVertex(VERTEX_SHADER);\n * const fragmentShader = new WebGLFragment(FRAGMENT_SHADER);\n * const program = this.context.getProgram(fragmentShader, vertexShader);\n * helper.useProgram(this.program, frameState);\n * ```\n *\n * Uniforms are defined using the `uniforms` option and can either be explicit values or callbacks taking the frame state as argument.\n * You can also change their value along the way like so:\n * ```js\n * helper.setUniformFloatValue('u_value', valueAsNumber);\n * ```\n *\n * ### Defining post processing passes\n *\n * Post processing* describes the act of rendering primitives to a texture, and then rendering this texture to the final canvas\n * while applying special effects in screen space.\n * Typical uses are: blurring, color manipulation, depth of field, filtering...\n *\n * The `WebGLHelper` class offers the possibility to define post processes at creation time using the `postProcesses` option.\n * A post process step accepts the following options:\n *\n * `fragmentShader` and `vertexShader`: text literals in GLSL language that will be compiled and used in the post processing step.\n * `uniforms`: uniforms can be defined for the post processing steps just like for the main render.\n * `scaleRatio`: allows using an intermediate texture smaller or higher than the final canvas in the post processing step.\n * This is typically used in blur steps to reduce the performance overhead by using an already downsampled texture as input.\n *\n * The {@link module:ol/webgl/PostProcessingPass~WebGLPostProcessingPass} class is used internally, refer to its documentation for more info.\n *\n * ### Binding WebGL buffers and flushing data into them\n *\n * Data that must be passed to the GPU has to be transferred using {@link module:ol/webgl/Buffer~WebGLArrayBuffer} objects.\n * A buffer has to be created only once, but must be bound every time the buffer content will be used for rendering.\n * This is done using {@link bindBuffer}.\n * When the buffer's array content has changed, the new data has to be flushed to the GPU memory; this is done using\n * {@link flushBufferData}. Note: this operation is expensive and should be done as infrequently as possible.\n *\n * When binding an array buffer, a `target` parameter must be given: it should be either {@link module:ol/webgl.ARRAY_BUFFER}\n * (if the buffer contains vertices data) or {@link module:ol/webgl.ELEMENT_ARRAY_BUFFER} (if the buffer contains indices data).\n *\n * Examples below:\n * ```js\n * // at initialization phase\n * const verticesBuffer = new WebGLArrayBuffer([], DYNAMIC_DRAW);\n * const indicesBuffer = new WebGLArrayBuffer([], DYNAMIC_DRAW);\n *\n * // when array values have changed\n * helper.flushBufferData(ARRAY_BUFFER, this.verticesBuffer);\n * helper.flushBufferData(ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\n *\n * // at rendering phase\n * helper.bindBuffer(ARRAY_BUFFER, this.verticesBuffer);\n * helper.bindBuffer(ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\n * ```\n *\n * ### Specifying attributes\n *\n * The GPU only receives the data as arrays of numbers. These numbers must be handled differently depending on what it describes (position, texture coordinate...).\n * Attributes are used to specify these uses. Specify the attribute names with\n * {@link module:ol/webgl/Helper~WebGLHelper#enableAttributes} (see code snippet below).\n *\n * Please note that you will have to specify the type and offset of the attributes in the data array. You can refer to the documentation of [WebGLRenderingContext.vertexAttribPointer](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/vertexAttribPointer) for more explanation.\n * ```js\n * // here we indicate that the data array has the following structure:\n * // [posX, posY, offsetX, offsetY, texCoordU, texCoordV, posX, posY, ...]\n * helper.enableAttributes([\n * {\n * name: 'a_position',\n * size: 2\n * },\n * {\n * name: 'a_offset',\n * size: 2\n * },\n * {\n * name: 'a_texCoord',\n * size: 2\n * }\n * ])\n * ```\n *\n * ### Rendering primitives\n *\n * Once all the steps above have been achieved, rendering primitives to the screen is done using {@link prepareDraw}, {@link drawElements} and {@link finalizeDraw}.\n * ```js\n * // frame preparation step\n * helper.prepareDraw(frameState);\n *\n * // call this for every data array that has to be rendered on screen\n * helper.drawElements(0, this.indicesBuffer.getArray().length);\n *\n * // finalize the rendering by applying post processes\n * helper.finalizeDraw(frameState);\n * ```\n *\n * For an example usage of this class, refer to {@link module:ol/renderer/webgl/PointsLayer~WebGLPointsLayerRenderer}.\n */\nclass WebGLHelper extends Disposable {\n /**\n * @param {Options} [options] Options.\n */\n constructor(options) {\n super();\n options = options || {};\n\n /** @private */\n this.boundHandleWebGLContextLost_ = this.handleWebGLContextLost.bind(this);\n\n /** @private */\n this.boundHandleWebGLContextRestored_ =\n this.handleWebGLContextRestored.bind(this);\n\n /**\n * @private\n * @type {string}\n */\n this.canvasCacheKey_ = options.canvasCacheKey\n ? getSharedCanvasCacheKey(options.canvasCacheKey)\n : getUniqueCanvasCacheKey();\n\n /**\n * @private\n * @type {WebGLRenderingContext}\n */\n this.gl_ = getOrCreateContext(this.canvasCacheKey_);\n\n /**\n * @private\n * @type {!Object<string, BufferCacheEntry>}\n */\n this.bufferCache_ = {};\n\n /**\n * @private\n * @type {Object<string, Object>}\n */\n this.extensionCache_ = {};\n\n /**\n * @private\n * @type {WebGLProgram}\n */\n this.currentProgram_ = null;\n\n /**\n * @private\n * @type {boolean}\n */\n this.needsToBeRecreated_ = false;\n\n const canvas = this.gl_.canvas;\n\n canvas.addEventListener(\n ContextEventType.LOST,\n this.boundHandleWebGLContextLost_,\n );\n canvas.addEventListener(\n ContextEventType.RESTORED,\n this.boundHandleWebGLContextRestored_,\n );\n\n /**\n * @private\n * @type {import(\"../transform.js\").Transform}\n */\n this.offsetRotateMatrix_ = createTransform();\n\n /**\n * @private\n * @type {import(\"../transform.js\").Transform}\n */\n this.offsetScaleMatrix_ = createTransform();\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.tmpMat4_ = create();\n\n /**\n * @private\n * @type {Object<string, Object<string, WebGLUniformLocation>>}\n */\n this.uniformLocationsByProgram_ = {};\n\n /**\n * @private\n * @type {Object<string, Object<string, number>>}\n */\n this.attribLocationsByProgram_ = {};\n\n /**\n * Holds info about custom uniforms used in the post processing pass.\n * If the uniform is a texture, the WebGL Texture object will be stored here.\n * @type {Array<UniformInternalDescription>}\n * @private\n */\n this.uniforms_ = [];\n if (options.uniforms) {\n this.setUniforms(options.uniforms);\n }\n\n /**\n * An array of PostProcessingPass objects is kept in this variable, built from the steps provided in the\n * options. If no post process was given, a default one is used (so as not to have to make an exception to\n * the frame buffer logic).\n * @type {Array<WebGLPostProcessingPass>}\n * @private\n */\n this.postProcessPasses_ = options.postProcesses\n ? options.postProcesses.map(\n (options) =>\n new WebGLPostProcessingPass({\n webGlContext: this.gl_,\n scaleRatio: options.scaleRatio,\n vertexShader: options.vertexShader,\n fragmentShader: options.fragmentShader,\n uniforms: options.uniforms,\n }),\n )\n : [new WebGLPostProcessingPass({webGlContext: this.gl_})];\n\n /**\n * @type {string|null}\n * @private\n */\n this.shaderCompileErrors_ = null;\n\n /**\n * @type {number}\n * @private\n */\n this.startTime_ = Date.now();\n\n /**\n * @type {number}\n * @private\n */\n this.maxAttributeCount_ = this.gl_.getParameter(\n this.gl_.MAX_VERTEX_ATTRIBS,\n );\n }\n\n /**\n * @param {Object<string, UniformValue>} uniforms Uniform definitions.\n */\n setUniforms(uniforms) {\n this.uniforms_ = [];\n this.addUniforms(uniforms);\n }\n\n /**\n * @param {Object<string, UniformValue>} uniforms Uniform definitions.\n */\n addUniforms(uniforms) {\n for (const name in uniforms) {\n this.uniforms_.push({\n name: name,\n value: uniforms[name],\n });\n }\n }\n\n /**\n * @param {string} canvasCacheKey The canvas cache key.\n * @return {boolean} The provided key matches the one this helper was constructed with.\n */\n canvasCacheKeyMatches(canvasCacheKey) {\n return this.canvasCacheKey_ === getSharedCanvasCacheKey(canvasCacheKey);\n }\n\n /**\n * Get a WebGL extension. If the extension is not supported, null is returned.\n * Extensions are cached after they are enabled for the first time.\n * @param {string} name The extension name.\n * @return {Object|null} The extension or null if not supported.\n */\n getExtension(name) {\n if (name in this.extensionCache_) {\n return this.extensionCache_[name];\n }\n const extension = this.gl_.getExtension(name);\n this.extensionCache_[name] = extension;\n return extension;\n }\n\n /**\n * Will throw if the extension is not available\n * @return {ANGLE_instanced_arrays} Extension\n */\n getInstancedRenderingExtension_() {\n const ext = this.getExtension('ANGLE_instanced_arrays');\n assert(\n !!ext,\n \"WebGL extension 'ANGLE_instanced_arrays' is required for vector rendering\",\n );\n return ext;\n }\n\n /**\n * Just bind the buffer if it's in the cache. Otherwise create\n * the WebGL buffer, bind it, populate it, and add an entry to\n * the cache.\n * @param {import(\"./Buffer\").default} buffer Buffer.\n */\n bindBuffer(buffer) {\n const gl = this.gl_;\n const bufferKey = getUid(buffer);\n let bufferCache = this.bufferCache_[bufferKey];\n if (!bufferCache) {\n const webGlBuffer = gl.createBuffer();\n bufferCache = {\n buffer: buffer,\n webGlBuffer: webGlBuffer,\n };\n this.bufferCache_[bufferKey] = bufferCache;\n }\n gl.bindBuffer(buffer.getType(), bufferCache.webGlBuffer);\n }\n\n /**\n * Update the data contained in the buffer array; this is required for the\n * new data to be rendered\n * @param {import(\"./Buffer\").default} buffer Buffer.\n */\n flushBufferData(buffer) {\n const gl = this.gl_;\n this.bindBuffer(buffer);\n gl.bufferData(buffer.getType(), buffer.getArray(), buffer.getUsage());\n }\n\n /**\n * @param {import(\"./Buffer.js\").default} buf Buffer.\n */\n deleteBuffer(buf) {\n const bufferKey = getUid(buf);\n // Note: gl.deleteBuffer is not called here since we let WebGL garbage collect it automatically\n delete this.bufferCache_[bufferKey];\n }\n\n /**\n * Clean up.\n * @override\n */\n disposeInternal() {\n const canvas = this.gl_.canvas;\n canvas.removeEventListener(\n ContextEventType.LOST,\n this.boundHandleWebGLContextLost_,\n );\n canvas.removeEventListener(\n ContextEventType.RESTORED,\n this.boundHandleWebGLContextRestored_,\n );\n\n releaseCanvas(this.canvasCacheKey_);\n\n delete this.gl_;\n }\n\n /**\n * Clear the buffer & set the viewport to draw.\n * Post process passes will be initialized here, the first one being bound as a render target for\n * subsequent draw calls.\n * @param {import(\"../Map.js\").FrameState} frameState current frame state\n * @param {boolean} [disableAlphaBlend] If true, no alpha blending will happen.\n * @param {boolean} [enableDepth] If true, enables depth testing.\n */\n prepareDraw(frameState, disableAlphaBlend, enableDepth) {\n const gl = this.gl_;\n const canvas = this.getCanvas();\n const size = frameState.size;\n const pixelRatio = frameState.pixelRatio;\n\n if (\n canvas.width !== size[0] * pixelRatio ||\n canvas.height !== size[1] * pixelRatio\n ) {\n canvas.width = size[0] * pixelRatio;\n canvas.height = size[1] * pixelRatio;\n canvas.style.width = size[0] + 'px';\n canvas.style.height = size[1] + 'px';\n }\n\n // loop backwards in post processes list\n for (let i = this.postProcessPasses_.length - 1; i >= 0; i--) {\n this.postProcessPasses_[i].init(frameState);\n }\n\n gl.bindTexture(gl.TEXTURE_2D, null);\n\n gl.clearColor(0.0, 0.0, 0.0, 0.0);\n gl.depthRange(0.0, 1.0);\n gl.clearDepth(1.0);\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n\n gl.enable(gl.BLEND);\n gl.blendFunc(gl.ONE, disableAlphaBlend ? gl.ZERO : gl.ONE_MINUS_SRC_ALPHA);\n if (enableDepth) {\n gl.enable(gl.DEPTH_TEST);\n gl.depthFunc(gl.LEQUAL);\n } else {\n gl.disable(gl.DEPTH_TEST);\n }\n }\n\n /**\n * @param {WebGLFramebuffer|null} frameBuffer The frame buffer.\n * @param {WebGLTexture} [texture] The texture.\n */\n bindFrameBuffer(frameBuffer, texture) {\n const gl = this.getGL();\n gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);\n if (texture) {\n gl.framebufferTexture2D(\n gl.FRAMEBUFFER,\n gl.COLOR_ATTACHMENT0,\n gl.TEXTURE_2D,\n texture,\n 0,\n );\n }\n }\n\n /**\n * Bind the frame buffer from the initial render.\n */\n bindInitialFrameBuffer() {\n const gl = this.getGL();\n const frameBuffer = this.postProcessPasses_[0].getFrameBuffer();\n gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);\n const texture = this.postProcessPasses_[0].getRenderTargetTexture();\n gl.framebufferTexture2D(\n gl.FRAMEBUFFER,\n gl.COLOR_ATTACHMENT0,\n gl.TEXTURE_2D,\n texture,\n 0,\n );\n }\n\n /**\n * Prepare a program to use a texture.\n * @param {WebGLTexture} texture The texture.\n * @param {number} slot The texture slot.\n * @param {string} uniformName The corresponding uniform name.\n */\n bindTexture(texture, slot, uniformName) {\n const gl = this.gl_;\n gl.activeTexture(gl.TEXTURE0 + slot);\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.uniform1i(this.getUniformLocation(uniformName), slot);\n }\n\n /**\n * Set up an attribute array buffer for use in the vertex shader.\n * @param {import(\"./Buffer\").default} buffer The buffer.\n * @param {string} attributeName The attribute name.\n * @param {number} size The number of components per attribute vertex.\n */\n bindAttribute(buffer, attributeName, size) {\n const gl = this.getGL();\n this.bindBuffer(buffer);\n const index = this.getAttributeLocation(attributeName);\n gl.enableVertexAttribArray(index);\n gl.vertexAttribPointer(index, size, gl.FLOAT, false, 0, 0);\n }\n\n /**\n * Clear the render target & bind it for future draw operations.\n * This is similar to `prepareDraw`, only post processes will not be applied.\n * Note: the whole viewport will be drawn to the render target, regardless of its size.\n * @param {import(\"../Map.js\").FrameState} frameState current frame state\n * @param {import(\"./RenderTarget.js\").default} renderTarget Render target to draw to\n * @param {boolean} [disableAlphaBlend] If true, no alpha blending will happen.\n * @param {boolean} [enableDepth] If true, enables depth testing.\n */\n prepareDrawToRenderTarget(\n frameState,\n renderTarget,\n disableAlphaBlend,\n enableDepth,\n ) {\n const gl = this.gl_;\n const size = renderTarget.getSize();\n\n gl.bindFramebuffer(gl.FRAMEBUFFER, renderTarget.getFramebuffer());\n gl.bindRenderbuffer(gl.RENDERBUFFER, renderTarget.getDepthbuffer());\n gl.viewport(0, 0, size[0], size[1]);\n gl.bindTexture(gl.TEXTURE_2D, renderTarget.getTexture());\n gl.clearColor(0.0, 0.0, 0.0, 0.0);\n gl.depthRange(0.0, 1.0);\n gl.clearDepth(1.0);\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n gl.enable(gl.BLEND);\n gl.blendFunc(gl.ONE, disableAlphaBlend ? gl.ZERO : gl.ONE_MINUS_SRC_ALPHA);\n if (enableDepth) {\n gl.enable(gl.DEPTH_TEST);\n gl.depthFunc(gl.LEQUAL);\n } else {\n gl.disable(gl.DEPTH_TEST);\n }\n }\n\n /**\n * Execute a draw call based on the currently bound program, texture, buffers, attributes.\n * @param {number} start Start index.\n * @param {number} end End index.\n */\n drawElements(start, end) {\n const gl = this.gl_;\n this.getExtension('OES_element_index_uint');\n\n const elementType = gl.UNSIGNED_INT;\n const elementSize = 4;\n\n const numItems = end - start;\n const offsetInBytes = start * elementSize;\n gl.drawElements(gl.TRIANGLES, numItems, elementType, offsetInBytes);\n }\n\n /**\n * Execute a draw call similar to `drawElements`, but using instanced rendering.\n * Will have no effect if `enableAttributesInstanced` was not called for this rendering pass.\n * @param {number} start Start index.\n * @param {number} end End index.\n * @param {number} instanceCount The number of instances to render\n */\n drawElementsInstanced(start, end, instanceCount) {\n const gl = this.gl_;\n this.getExtension('OES_element_index_uint');\n const ext = this.getInstancedRenderingExtension_();\n\n const elementType = gl.UNSIGNED_INT;\n const elementSize = 4;\n\n const numItems = end - start;\n const offsetInBytes = start * elementSize;\n ext.drawElementsInstancedANGLE(\n gl.TRIANGLES,\n numItems,\n elementType,\n offsetInBytes,\n instanceCount,\n );\n\n // reset divisor values to avoid side effects\n for (let i = 0; i < this.maxAttributeCount_; i++) {\n ext.vertexAttribDivisorANGLE(i, 0);\n }\n }\n\n /**\n * Apply the successive post process passes which will eventually render to the actual canvas.\n * @param {import(\"../Map.js\").FrameState} frameState current frame state\n * @param {function(WebGLRenderingContext, import(\"../Map.js\").FrameState):void} [preCompose] Called before composing.\n * @param {function(WebGLRenderingContext, import(\"../Map.js\").FrameState):void} [postCompose] Called before composing.\n */\n finalizeDraw(frameState, preCompose, postCompose) {\n // apply post processes using the next one as target\n for (let i = 0, ii = this.postProcessPasses_.length; i < ii; i++) {\n if (i === ii - 1) {\n this.postProcessPasses_[i].apply(\n frameState,\n null,\n preCompose,\n postCompose,\n );\n } else {\n this.postProcessPasses_[i].apply(\n frameState,\n this.postProcessPasses_[i + 1],\n );\n }\n }\n }\n\n /**\n * @return {HTMLCanvasElement} Canvas.\n */\n getCanvas() {\n return /** @type {HTMLCanvasElement} */ (this.gl_.canvas);\n }\n\n /**\n * Get the WebGL rendering context\n * @return {WebGLRenderingContext} The rendering context.\n */\n getGL() {\n return this.gl_;\n }\n\n /**\n * Sets the default matrix uniforms for a given frame state. This is called internally in `prepareDraw`.\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n */\n applyFrameState(frameState) {\n const size = frameState.size;\n const rotation = frameState.viewState.rotation;\n const pixelRatio = frameState.pixelRatio;\n\n this.setUniformFloatValue(\n DefaultUniform.TIME,\n (Date.now() - this.startTime_) * 0.001,\n );\n this.setUniformFloatValue(DefaultUniform.ZOOM, frameState.viewState.zoom);\n this.setUniformFloatValue(\n DefaultUniform.RESOLUTION,\n frameState.viewState.resolution,\n );\n this.setUniformFloatValue(DefaultUniform.PIXEL_RATIO, pixelRatio);\n this.setUniformFloatVec2(DefaultUniform.VIEWPORT_SIZE_PX, [\n size[0],\n size[1],\n ]);\n this.setUniformFloatValue(DefaultUniform.ROTATION, rotation);\n }\n\n /**\n * Sets the `u_hitDetection` uniform.\n * @param {boolean} enabled Whether to enable the hit detection code path\n */\n applyHitDetectionUniform(enabled) {\n const loc = this.getUniformLocation(DefaultUniform.HIT_DETECTION);\n this.getGL().uniform1i(loc, enabled ? 1 : 0);\n\n // hit detection uses a fixed pixel ratio\n if (enabled) {\n this.setUniformFloatValue(DefaultUniform.PIXEL_RATIO, 0.5);\n }\n }\n\n /**\n * Sets the custom uniforms based on what was given in the constructor. This is called internally in `prepareDraw`.\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n */\n applyUniforms(frameState) {\n const gl = this.gl_;\n\n let value;\n let textureSlot = 0;\n this.uniforms_.forEach((uniform) => {\n value =\n typeof uniform.value === 'function'\n ? uniform.value(frameState)\n : uniform.value;\n\n // apply value based on type\n if (\n value instanceof HTMLCanvasElement ||\n value instanceof HTMLImageElement ||\n value instanceof ImageData ||\n value instanceof WebGLTexture\n ) {\n // create a texture & put data\n if (value instanceof WebGLTexture && !uniform.texture) {\n uniform.prevValue = undefined;\n uniform.texture = value;\n } else if (!uniform.texture) {\n uniform.prevValue = undefined;\n uniform.texture = gl.createTexture();\n }\n this.bindTexture(uniform.texture, textureSlot, uniform.name);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n\n const imageReady =\n !(value instanceof HTMLImageElement) ||\n /** @type {HTMLImageElement} */ (value).complete;\n if (\n !(value instanceof WebGLTexture) &&\n imageReady &&\n uniform.prevValue !== value\n ) {\n uniform.prevValue = value;\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n value,\n );\n }\n textureSlot++;\n } else if (Array.isArray(value) && value.length === 6) {\n this.setUniformMatrixValue(\n uniform.name,\n fromTransform(this.tmpMat4_, value),\n );\n } else if (Array.isArray(value) && value.length <= 4) {\n switch (value.length) {\n case 2:\n gl.uniform2f(\n this.getUniformLocation(uniform.name),\n value[0],\n value[1],\n );\n return;\n case 3:\n gl.uniform3f(\n this.getUniformLocation(uniform.name),\n value[0],\n value[1],\n value[2],\n );\n return;\n case 4:\n gl.uniform4f(\n this.getUniformLocation(uniform.name),\n value[0],\n value[1],\n value[2],\n value[3],\n );\n return;\n default:\n return;\n }\n } else if (typeof value === 'number') {\n gl.uniform1f(this.getUniformLocation(uniform.name), value);\n }\n });\n }\n\n /**\n * Set up a program for use. The program will be set as the current one. Then, the uniforms used\n * in the program will be set based on the current frame state and the helper configuration.\n * @param {WebGLProgram} program Program.\n * @param {import(\"../Map.js\").FrameState} [frameState] Frame state.\n */\n useProgram(program, frameState) {\n this.disableAllAttributes_();\n const gl = this.gl_;\n gl.useProgram(program);\n this.currentProgram_ = program;\n if (frameState) {\n this.applyFrameState(frameState);\n this.applyUniforms(frameState);\n }\n }\n\n /**\n * Will attempt to compile a vertex or fragment shader based on source\n * On error, the shader will be returned but\n * `gl.getShaderParameter(shader, gl.COMPILE_STATUS)` will return `true`\n * Use `gl.getShaderInfoLog(shader)` to have details\n * @param {string} source Shader source\n * @param {ShaderType} type VERTEX_SHADER or FRAGMENT_SHADER\n * @return {WebGLShader} Shader object\n */\n compileShader(source, type) {\n const gl = this.gl_;\n const shader = gl.createShader(type);\n gl.shaderSource(shader, source);\n gl.compileShader(shader);\n return shader;\n }\n\n /**\n * Create a program for a vertex and fragment shader. Throws if shader compilation fails.\n * @param {string} fragmentShaderSource Fragment shader source.\n * @param {string} vertexShaderSource Vertex shader source.\n * @return {WebGLProgram} Program\n */\n getProgram(fragmentShaderSource, vertexShaderSource) {\n const gl = this.gl_;\n\n const fragmentShader = this.compileShader(\n fragmentShaderSource,\n gl.FRAGMENT_SHADER,\n );\n\n const vertexShader = this.compileShader(\n vertexShaderSource,\n gl.VERTEX_SHADER,\n );\n\n const program = gl.createProgram();\n gl.attachShader(program, fragmentShader);\n gl.attachShader(program, vertexShader);\n gl.linkProgram(program);\n\n if (!gl.getShaderParameter(fragmentShader, gl.COMPILE_STATUS)) {\n const message = `Fragment shader compilation failed: ${gl.getShaderInfoLog(\n fragmentShader,\n )}`;\n throw new Error(message);\n }\n gl.deleteShader(fragmentShader);\n\n if (!gl.getShaderParameter(vertexShader, gl.COMPILE_STATUS)) {\n const message = `Vertex shader compilation failed: ${gl.getShaderInfoLog(\n vertexShader,\n )}`;\n throw new Error(message);\n }\n gl.deleteShader(vertexShader);\n\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n const message = `GL program linking failed: ${gl.getProgramInfoLog(\n program,\n )}`;\n throw new Error(message);\n }\n\n return program;\n }\n\n /**\n * Will get the location from the shader or the cache\n * @param {string} name Uniform name\n * @return {WebGLUniformLocation} uniformLocation\n */\n getUniformLocation(name) {\n const programUid = getUid(this.currentProgram_);\n if (this.uniformLocationsByProgram_[programUid] === undefined) {\n this.uniformLocationsByProgram_[programUid] = {};\n }\n if (this.uniformLocationsByProgram_[programUid][name] === undefined) {\n this.uniformLocationsByProgram_[programUid][name] =\n this.gl_.getUniformLocation(this.currentProgram_, name);\n }\n return this.uniformLocationsByProgram_[programUid][name];\n }\n\n /**\n * Will get the location from the shader or the cache\n * @param {string} name Attribute name\n * @return {number} attribLocation\n */\n getAttributeLocation(name) {\n const programUid = getUid(this.currentProgram_);\n if (this.attribLocationsByProgram_[programUid] === undefined) {\n this.attribLocationsByProgram_[programUid] = {};\n }\n if (this.attribLocationsByProgram_[programUid][name] === undefined) {\n this.attribLocationsByProgram_[programUid][name] =\n this.gl_.getAttribLocation(this.currentProgram_, name);\n }\n return this.attribLocationsByProgram_[programUid][name];\n }\n\n /**\n * Sets the given transform to apply the rotation/translation/scaling of the given frame state.\n * The resulting transform can be used to convert world space coordinates to view coordinates in the [-1, 1] range.\n * @param {import(\"../Map.js\").FrameState} frameState Frame state.\n * @param {import(\"../transform\").Transform} transform Transform to update.\n * @return {import(\"../transform\").Transform} The updated transform object.\n */\n makeProjectionTransform(frameState, transform) {\n const size = frameState.size;\n const rotation = frameState.viewState.rotation;\n const resolution = frameState.viewState.resolution;\n const center = frameState.viewState.center;\n composeTransform(\n transform,\n 0,\n 0,\n 2 / (resolution * size[0]),\n 2 / (resolution * size[1]),\n -rotation,\n -center[0],\n -center[1],\n );\n return transform;\n }\n\n /**\n * Give a value for a standard float uniform\n * @param {string} uniform Uniform name\n * @param {number} value Value\n */\n setUniformFloatValue(uniform, value) {\n this.gl_.uniform1f(this.getUniformLocation(uniform), value);\n }\n\n /**\n * Give a value for a vec2 uniform\n * @param {string} uniform Uniform name\n * @param {Array<number>} value Array of length 4.\n */\n setUniformFloatVec2(uniform, value) {\n this.gl_.uniform2fv(this.getUniformLocation(uniform), value);\n }\n\n /**\n * Give a value for a vec4 uniform\n * @param {string} uniform Uniform name\n * @param {Array<number>} value Array of length 4.\n */\n setUniformFloatVec4(uniform, value) {\n this.gl_.uniform4fv(this.getUniformLocation(uniform), value);\n }\n\n /**\n * Give a value for a standard matrix4 uniform\n * @param {string} uniform Uniform name\n * @param {Array<number>} value Matrix value\n */\n setUniformMatrixValue(uniform, value) {\n this.gl_.uniformMatrix4fv(this.getUniformLocation(uniform), false, value);\n }\n\n /**\n * Disable all vertex attributes.\n * @private\n */\n disableAllAttributes_() {\n for (let i = 0; i < this.maxAttributeCount_; i++) {\n this.gl_.disableVertexAttribArray(i);\n }\n }\n\n /**\n * Will set the currently bound buffer to an attribute of the shader program. Used by `#enableAttributes`\n * internally.\n * @param {string} attribName Attribute name\n * @param {number} size Number of components per attributes\n * @param {number} type UNSIGNED_INT, UNSIGNED_BYTE, UNSIGNED_SHORT or FLOAT\n * @param {number} stride Stride in bytes (0 means attribs are packed)\n * @param {number} offset Offset in bytes\n * @param {boolean} instanced Whether the attribute is used for instanced rendering\n * @private\n */\n enableAttributeArray_(attribName, size, type, stride, offset, instanced) {\n const location = this.getAttributeLocation(attribName);\n // the attribute has not been found in the shaders or is not used; do not enable it\n if (location < 0) {\n return;\n }\n this.gl_.enableVertexAttribArray(location);\n this.gl_.vertexAttribPointer(location, size, type, false, stride, offset);\n if (instanced) {\n // note: this is reset to 0 after drawElementsInstanced is called\n this.getInstancedRenderingExtension_().vertexAttribDivisorANGLE(\n location,\n 1,\n );\n }\n }\n\n /**\n * @private\n * @param {Array<AttributeDescription>} attributes Ordered list of attributes to read from the buffer\n * @param {boolean} instanced Whether the attributes are instanced.\n */\n enableAttributes_(attributes, instanced) {\n const stride = computeAttributesStride(attributes);\n let offset = 0;\n for (let i = 0; i < attributes.length; i++) {\n const attr = attributes[i];\n // if a name is not given, simply skip this slot in the buffer\n if (attr.name) {\n this.enableAttributeArray_(\n attr.name,\n attr.size,\n attr.type || FLOAT,\n stride,\n offset,\n instanced,\n );\n }\n offset += attr.size * getByteSizeFromType(attr.type);\n }\n }\n\n /**\n * Will enable the following attributes to be read from the currently bound buffer,\n * i.e. tell the GPU where to read the different attributes in the buffer. An error in the\n * size/type/order of attributes will most likely break the rendering and throw a WebGL exception.\n * @param {Array<AttributeDescription>} attributes Ordered list of attributes to read from the buffer\n */\n enableAttributes(attributes) {\n this.enableAttributes_(attributes, false);\n }\n\n /**\n * Will enable these attributes as instanced, meaning that they will only be read\n * once per instance instead of per vertex.\n * @param {Array<AttributeDescription>} attributes Ordered list of attributes to read from the buffer\n */\n enableAttributesInstanced(attributes) {\n this.enableAttributes_(attributes, true);\n }\n\n /**\n * WebGL context was lost\n * @param {WebGLContextEvent} event The context loss event.\n * @private\n */\n handleWebGLContextLost(event) {\n clear(this.bufferCache_);\n this.currentProgram_ = null;\n\n event.preventDefault();\n }\n\n /**\n * WebGL context was restored\n * @private\n */\n handleWebGLContextRestored() {\n this.needsToBeRecreated_ = true;\n }\n\n /**\n * Returns whether this helper needs to be recreated, as the context was lost and then restored.\n * @return {boolean} Whether this helper needs to be recreated.\n */\n needsToBeRecreated() {\n return this.needsToBeRecreated_;\n }\n\n /**\n * Will create or reuse a given webgl texture and apply the given size. If no image data\n * specified, the texture will be empty, otherwise image data will be used and the `size`\n * parameter will be ignored. If a Uint8Array is provided for data, a size must also be provided.\n * Note: wrap parameters are set to clamp to edge, min filter is set to linear.\n * @param {Array<number>} size Expected size of the texture\n * @param {ImageData|HTMLImageElement|HTMLCanvasElement|Uint8Array|null} data Image data/object to bind to the texture\n * @param {WebGLTexture} [texture] Existing texture to reuse\n * @param {boolean} [nearest] Use gl.NEAREST for min/mag filter.\n * @return {WebGLTexture} The generated texture\n */\n createTexture(size, data, texture, nearest) {\n const gl = this.gl_;\n texture = texture || gl.createTexture();\n const filter = nearest ? gl.NEAREST : gl.LINEAR;\n\n gl.bindTexture(gl.TEXTURE_2D, texture);\n\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, filter);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, filter);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n\n const level = 0;\n const internalFormat = gl.RGBA;\n const border = 0;\n const format = gl.RGBA;\n const type = gl.UNSIGNED_BYTE;\n\n if (data instanceof Uint8Array) {\n gl.texImage2D(\n gl.TEXTURE_2D,\n level,\n internalFormat,\n size[0],\n size[1],\n border,\n format,\n type,\n data,\n );\n } else if (data) {\n gl.texImage2D(gl.TEXTURE_2D, level, internalFormat, format, type, data);\n } else {\n gl.texImage2D(\n gl.TEXTURE_2D,\n level,\n internalFormat,\n size[0],\n size[1],\n border,\n format,\n type,\n null,\n );\n }\n return texture;\n }\n}\n\n/**\n * Compute a stride in bytes based on a list of attributes\n * @param {Array<AttributeDescription>} attributes Ordered list of attributes\n * @return {number} Stride, ie amount of values for each vertex in the vertex buffer\n */\nexport function computeAttributesStride(attributes) {\n let stride = 0;\n for (let i = 0; i < attributes.length; i++) {\n const attr = attributes[i];\n stride += attr.size * getByteSizeFromType(attr.type);\n }\n return stride;\n}\n\n/**\n * Computes the size in byte of an attribute type.\n * @param {AttributeType} type Attribute type\n * @return {number} The size in bytes\n */\nfunction getByteSizeFromType(type) {\n switch (type) {\n case AttributeType.UNSIGNED_BYTE:\n return Uint8Array.BYTES_PER_ELEMENT;\n case AttributeType.UNSIGNED_SHORT:\n return Uint16Array.BYTES_PER_ELEMENT;\n case AttributeType.UNSIGNED_INT:\n return Uint32Array.BYTES_PER_ELEMENT;\n case AttributeType.FLOAT:\n default:\n return Float32Array.BYTES_PER_ELEMENT;\n }\n}\n\nexport default WebGLHelper;\n", "/**\n * @module ol/renderer/webgl/Layer\n */\nimport LayerProperty from '../../layer/Property.js';\nimport RenderEvent from '../../render/Event.js';\nimport RenderEventType from '../../render/EventType.js';\nimport {\n compose as composeTransform,\n create as createTransform,\n} from '../../transform.js';\nimport WebGLHelper from '../../webgl/Helper.js';\nimport LayerRenderer from '../Layer.js';\n\n/**\n * @typedef {Object} PostProcessesOptions\n * @property {number} [scaleRatio] Scale ratio; if < 1, the post process will render to a texture smaller than\n * the main canvas that will then be sampled up (useful for saving resource on blur steps).\n * @property {string} [vertexShader] Vertex shader source\n * @property {string} [fragmentShader] Fragment shader source\n * @property {Object<string,import(\"../../webgl/Helper\").UniformValue>} [uniforms] Uniform definitions for the post process step\n */\n\n/**\n * @typedef {Object} Options\n * @property {Object<string,import(\"../../webgl/Helper\").UniformValue>} [uniforms] Uniform definitions for the post process steps\n * @property {Array<PostProcessesOptions>} [postProcesses] Post-processes definitions\n */\n\n/**\n * @classdesc\n * Base WebGL renderer class.\n * Holds all logic related to data manipulation & some common rendering logic\n * @template {import(\"../../layer/Layer.js\").default} LayerType\n * @extends {LayerRenderer<LayerType>}\n */\nclass WebGLLayerRenderer extends LayerRenderer {\n /**\n * @param {LayerType} layer Layer.\n * @param {Options} [options] Options.\n */\n constructor(layer, options) {\n super(layer);\n\n options = options || {};\n\n /**\n * The transform for viewport CSS pixels to rendered pixels. This transform is only\n * set before dispatching rendering events.\n * @private\n * @type {import(\"../../transform.js\").Transform}\n */\n this.inversePixelTransform_ = createTransform();\n\n /**\n * @private\n */\n this.postProcesses_ = options.postProcesses;\n\n /**\n * @private\n */\n this.uniforms_ = options.uniforms;\n\n /**\n * @type {WebGLHelper}\n * @protected\n */\n this.helper;\n\n this.onMapChanged_ = () => {\n this.clearCache();\n this.removeHelper();\n };\n\n layer.addChangeListener(LayerProperty.MAP, this.onMapChanged_);\n\n this.dispatchPreComposeEvent = this.dispatchPreComposeEvent.bind(this);\n this.dispatchPostComposeEvent = this.dispatchPostComposeEvent.bind(this);\n }\n\n /**\n * @param {WebGLRenderingContext} context The WebGL rendering context.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @protected\n */\n dispatchPreComposeEvent(context, frameState) {\n const layer = this.getLayer();\n if (layer.hasListener(RenderEventType.PRECOMPOSE)) {\n const event = new RenderEvent(\n RenderEventType.PRECOMPOSE,\n undefined,\n frameState,\n context,\n );\n layer.dispatchEvent(event);\n }\n }\n\n /**\n * @param {WebGLRenderingContext} context The WebGL rendering context.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @protected\n */\n dispatchPostComposeEvent(context, frameState) {\n const layer = this.getLayer();\n if (layer.hasListener(RenderEventType.POSTCOMPOSE)) {\n const event = new RenderEvent(\n RenderEventType.POSTCOMPOSE,\n undefined,\n frameState,\n context,\n );\n layer.dispatchEvent(event);\n }\n }\n\n /**\n * Reset options (only handles uniforms).\n * @param {Options} options Options.\n */\n reset(options) {\n this.uniforms_ = options.uniforms;\n if (this.helper) {\n this.helper.setUniforms(this.uniforms_);\n }\n }\n\n /**\n * @protected\n */\n removeHelper() {\n if (this.helper) {\n this.helper.dispose();\n delete this.helper;\n }\n }\n\n /**\n * Determine whether renderFrame should be called.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @return {boolean} Layer is ready to be rendered.\n * @override\n */\n prepareFrame(frameState) {\n if (this.getLayer().getRenderSource()) {\n let incrementGroup = true;\n let groupNumber = -1;\n let className;\n for (let i = 0, ii = frameState.layerStatesArray.length; i < ii; i++) {\n const layer = frameState.layerStatesArray[i].layer;\n const renderer = layer.getRenderer();\n if (!(renderer instanceof WebGLLayerRenderer)) {\n incrementGroup = true;\n continue;\n }\n const layerClassName = layer.getClassName();\n if (incrementGroup || layerClassName !== className) {\n groupNumber += 1;\n incrementGroup = false;\n }\n className = layerClassName;\n if (renderer === this) {\n break;\n }\n }\n\n const canvasCacheKey =\n 'map/' + frameState.mapId + '/group/' + groupNumber;\n\n if (\n !this.helper ||\n !this.helper.canvasCacheKeyMatches(canvasCacheKey) ||\n this.helper.needsToBeRecreated()\n ) {\n this.removeHelper();\n\n this.helper = new WebGLHelper({\n postProcesses: this.postProcesses_,\n uniforms: this.uniforms_,\n canvasCacheKey: canvasCacheKey,\n });\n\n if (className) {\n this.helper.getCanvas().className = className;\n }\n\n this.afterHelperCreated();\n }\n }\n\n return this.prepareFrameInternal(frameState);\n }\n\n /**\n * @protected\n */\n afterHelperCreated() {}\n\n /**\n * Determine whether renderFrame should be called.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @return {boolean} Layer is ready to be rendered.\n * @protected\n */\n prepareFrameInternal(frameState) {\n return true;\n }\n\n /**\n * @protected\n */\n clearCache() {}\n\n /**\n * Clean up.\n * @override\n */\n disposeInternal() {\n this.clearCache();\n this.removeHelper();\n this.getLayer()?.removeChangeListener(\n LayerProperty.MAP,\n this.onMapChanged_,\n );\n super.disposeInternal();\n }\n\n /**\n * @param {import(\"../../render/EventType.js\").default} type Event type.\n * @param {WebGLRenderingContext} context The rendering context.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @private\n */\n dispatchRenderEvent_(type, context, frameState) {\n const layer = this.getLayer();\n if (layer.hasListener(type)) {\n composeTransform(\n this.inversePixelTransform_,\n 0,\n 0,\n frameState.pixelRatio,\n -frameState.pixelRatio,\n 0,\n 0,\n -frameState.size[1],\n );\n\n const event = new RenderEvent(\n type,\n this.inversePixelTransform_,\n frameState,\n context,\n );\n layer.dispatchEvent(event);\n }\n }\n\n /**\n * @param {WebGLRenderingContext} context The rendering context.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @protected\n */\n preRender(context, frameState) {\n this.dispatchRenderEvent_(RenderEventType.PRERENDER, context, frameState);\n }\n\n /**\n * @param {WebGLRenderingContext} context The rendering context.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @protected\n */\n postRender(context, frameState) {\n this.dispatchRenderEvent_(RenderEventType.POSTRENDER, context, frameState);\n }\n}\n\nexport default WebGLLayerRenderer;\n", "/**\n * @module ol/renderer/webgl/TileLayerBase\n */\nimport TileRange from '../../TileRange.js';\nimport TileState from '../../TileState.js';\nimport {descending} from '../../array.js';\nimport {getIntersection, getRotatedViewport, isEmpty} from '../../extent.js';\nimport {fromUserExtent} from '../../proj.js';\nimport {toSize} from '../../size.js';\nimport LRUCache from '../../structs/LRUCache.js';\nimport {\n createOrUpdate as createTileCoord,\n getKey as getTileCoordKey,\n} from '../../tilecoord.js';\nimport {\n create as createTransform,\n reset as resetTransform,\n rotate as rotateTransform,\n scale as scaleTransform,\n translate as translateTransform,\n} from '../../transform.js';\nimport {abstract, getUid} from '../../util.js';\nimport {create as createMat4} from '../../vec/mat4.js';\nimport WebGLLayerRenderer from './Layer.js';\n\nexport const Uniforms = {\n TILE_TRANSFORM: 'u_tileTransform',\n TRANSITION_ALPHA: 'u_transitionAlpha',\n DEPTH: 'u_depth',\n RENDER_EXTENT: 'u_renderExtent', // intersection of layer, source, and view extent\n PATTERN_ORIGIN: 'u_patternOrigin',\n RESOLUTION: 'u_resolution',\n ZOOM: 'u_zoom',\n GLOBAL_ALPHA: 'u_globalAlpha',\n PROJECTION_MATRIX: 'u_projectionMatrix',\n SCREEN_TO_WORLD_MATRIX: 'u_screenToWorldMatrix',\n};\n\n/**\n * Transform a zoom level into a depth value; zoom level zero has a depth value of 0.5, and increasing values\n * have a depth trending towards 0\n * @param {number} z A zoom level.\n * @return {number} A depth value.\n */\nfunction depthForZ(z) {\n return 1 / (z + 2);\n}\n\n/**\n * @typedef {import(\"../../webgl/BaseTileRepresentation.js\").default<import(\"../../Tile.js\").default>} AbstractTileRepresentation\n */\n/**\n * @typedef {Object} TileRepresentationLookup\n * @property {Set<string>} tileIds The set of tile ids in the lookup.\n * @property {Object<number, Set<AbstractTileRepresentation>>} representationsByZ Tile representations by zoom level.\n */\n\n/**\n * @return {TileRepresentationLookup} A new tile representation lookup.\n */\nexport function newTileRepresentationLookup() {\n return {tileIds: new Set(), representationsByZ: {}};\n}\n\n/**\n * Check if a tile is already in the tile representation lookup.\n * @param {TileRepresentationLookup} tileRepresentationLookup Lookup of tile representations by zoom level.\n * @param {import(\"../../Tile.js\").default} tile A tile.\n * @return {boolean} The tile is already in the lookup.\n */\nfunction lookupHasTile(tileRepresentationLookup, tile) {\n return tileRepresentationLookup.tileIds.has(getUid(tile));\n}\n\n/**\n * Add a tile representation to the lookup.\n * @param {TileRepresentationLookup} tileRepresentationLookup Lookup of tile representations by zoom level.\n * @param {AbstractTileRepresentation} tileRepresentation A tile representation.\n * @param {number} z The zoom level.\n */\nfunction addTileRepresentationToLookup(\n tileRepresentationLookup,\n tileRepresentation,\n z,\n) {\n const representationsByZ = tileRepresentationLookup.representationsByZ;\n if (!(z in representationsByZ)) {\n representationsByZ[z] = new Set();\n }\n representationsByZ[z].add(tileRepresentation);\n tileRepresentationLookup.tileIds.add(getUid(tileRepresentation.tile));\n}\n\n/**\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {import(\"../../extent.js\").Extent} extent The frame extent.\n * @return {import(\"../../extent.js\").Extent} Frame extent intersected with layer extents.\n */\nfunction getRenderExtent(frameState, extent) {\n const layerState = frameState.layerStatesArray[frameState.layerIndex];\n if (layerState.extent) {\n extent = getIntersection(\n extent,\n fromUserExtent(layerState.extent, frameState.viewState.projection),\n );\n }\n const source = /** @type {import(\"../../source/Tile.js\").default} */ (\n layerState.layer.getRenderSource()\n );\n if (!source.getWrapX()) {\n const gridExtent = source\n .getTileGridForProjection(frameState.viewState.projection)\n .getExtent();\n if (gridExtent) {\n extent = getIntersection(extent, gridExtent);\n }\n }\n return extent;\n}\n\n/**\n * @param {import(\"../../source/Tile.js\").default} source The source.\n * @param {import('../../tilecoord.js').TileCoord} tileCoord The tile coordinate.\n * @return {string} The cache key.\n */\nexport function getCacheKey(source, tileCoord) {\n return `${getUid(source)},${source.getKey()},${getTileCoordKey(tileCoord)}`;\n}\n\n/**\n * @typedef {Object} Options\n * @property {Object<string, import(\"../../webgl/Helper\").UniformValue>} [uniforms] Additional uniforms\n * made available to shaders.\n * @property {number} [cacheSize=512] The tile representation cache size.\n * @property {Array<import('./Layer.js').PostProcessesOptions>} [postProcesses] Post-processes definitions.\n */\n\n/**\n * @typedef {import(\"../../layer/BaseTile.js\").default} BaseLayerType\n */\n\n/**\n * @classdesc\n * Base WebGL renderer for tile layers.\n * @template {BaseLayerType} LayerType\n * @template {import(\"../../Tile.js\").default} TileType\n * @template {import(\"../../webgl/BaseTileRepresentation.js\").default<TileType>} TileRepresentation\n * @extends {WebGLLayerRenderer<LayerType>}\n */\nclass WebGLBaseTileLayerRenderer extends WebGLLayerRenderer {\n /**\n * @param {LayerType} tileLayer Tile layer.\n * @param {Options} options Options.\n */\n constructor(tileLayer, options) {\n super(tileLayer, {\n uniforms: options.uniforms,\n postProcesses: options.postProcesses,\n });\n\n /**\n * The last call to `renderFrame` was completed with all tiles loaded\n * @type {boolean}\n */\n this.renderComplete = false;\n\n /**\n * This transform converts representation coordinates to screen coordinates.\n * @type {import(\"../../transform.js\").Transform}\n * @private\n */\n this.tileTransform_ = createTransform();\n\n /**\n * @type {Array<number>}\n * @protected\n */\n this.tempMat4 = createMat4();\n\n /**\n * @type {import(\"../../TileRange.js\").default}\n * @private\n */\n this.tempTileRange_ = new TileRange(0, 0, 0, 0);\n\n /**\n * @type {import(\"../../tilecoord.js\").TileCoord}\n * @private\n */\n this.tempTileCoord_ = createTileCoord(0, 0, 0);\n\n /**\n * @type {import(\"../../size.js\").Size}\n * @private\n */\n this.tempSize_ = [0, 0];\n\n const cacheSize = options.cacheSize !== undefined ? options.cacheSize : 512;\n /**\n * @type {import(\"../../structs/LRUCache.js\").default<TileRepresentation>}\n * @protected\n */\n this.tileRepresentationCache = new LRUCache(cacheSize);\n\n /**\n * @protected\n * @type {import(\"../../Map.js\").FrameState|null}\n */\n this.frameState = null;\n\n /**\n * @private\n * @type {import(\"../../proj/Projection.js\").default}\n */\n this.renderedProjection_ = undefined;\n }\n\n /**\n * @param {Options} options Options.\n * @override\n */\n reset(options) {\n super.reset({\n uniforms: options.uniforms,\n });\n }\n\n /**\n * Determine whether renderFrame should be called.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @return {boolean} Layer is ready to be rendered.\n * @override\n */\n prepareFrameInternal(frameState) {\n if (!this.renderedProjection_) {\n this.renderedProjection_ = frameState.viewState.projection;\n } else if (frameState.viewState.projection !== this.renderedProjection_) {\n this.clearCache();\n this.renderedProjection_ = frameState.viewState.projection;\n }\n\n const layer = this.getLayer();\n const source = layer.getRenderSource();\n if (!source) {\n return false;\n }\n\n if (isEmpty(getRenderExtent(frameState, frameState.extent))) {\n return false;\n }\n return source.getState() === 'ready';\n }\n\n /**\n * @abstract\n * @param {import(\"../../webgl/BaseTileRepresentation.js\").TileRepresentationOptions<TileType>} options tile representation options\n * @return {TileRepresentation} A new tile representation\n * @protected\n */\n createTileRepresentation(options) {\n return abstract();\n }\n\n /**\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {import(\"../../extent.js\").Extent} extent The extent to be rendered.\n * @param {number} initialZ The zoom level.\n * @param {TileRepresentationLookup} tileRepresentationLookup The zoom level.\n * @param {number} preload Number of additional levels to load.\n */\n enqueueTiles(\n frameState,\n extent,\n initialZ,\n tileRepresentationLookup,\n preload,\n ) {\n const viewState = frameState.viewState;\n const tileLayer = this.getLayer();\n const tileSource = tileLayer.getRenderSource();\n const tileGrid = tileSource.getTileGridForProjection(viewState.projection);\n const gutter = tileSource.getGutterForProjection(viewState.projection);\n\n const tileSourceKey = getUid(tileSource);\n if (!(tileSourceKey in frameState.wantedTiles)) {\n frameState.wantedTiles[tileSourceKey] = {};\n }\n\n const wantedTiles = frameState.wantedTiles[tileSourceKey];\n const tileRepresentationCache = this.tileRepresentationCache;\n\n const map = tileLayer.getMapInternal();\n const minZ = Math.max(\n initialZ - preload,\n tileGrid.getMinZoom(),\n tileGrid.getZForResolution(\n Math.min(\n tileLayer.getMaxResolution(),\n map\n ? map\n .getView()\n .getResolutionForZoom(Math.max(tileLayer.getMinZoom(), 0))\n : tileGrid.getResolution(0),\n ),\n tileSource.zDirection,\n ),\n );\n const rotation = viewState.rotation;\n const viewport = rotation\n ? getRotatedViewport(\n viewState.center,\n viewState.resolution,\n rotation,\n frameState.size,\n )\n : undefined;\n for (let z = initialZ; z >= minZ; --z) {\n const tileRange = tileGrid.getTileRangeForExtentAndZ(\n extent,\n z,\n this.tempTileRange_,\n );\n\n const tileResolution = tileGrid.getResolution(z);\n\n for (let x = tileRange.minX; x <= tileRange.maxX; ++x) {\n for (let y = tileRange.minY; y <= tileRange.maxY; ++y) {\n if (\n rotation &&\n !tileGrid.tileCoordIntersectsViewport([z, x, y], viewport)\n ) {\n continue;\n }\n const tileCoord = createTileCoord(z, x, y, this.tempTileCoord_);\n const cacheKey = getCacheKey(tileSource, tileCoord);\n\n /** @type {TileRepresentation} */\n let tileRepresentation;\n\n /** @type {TileType} */\n let tile;\n\n if (tileRepresentationCache.containsKey(cacheKey)) {\n tileRepresentation = tileRepresentationCache.get(cacheKey);\n tile = tileRepresentation.tile;\n }\n if (\n !tileRepresentation ||\n tileRepresentation.tile.key !== tileSource.getKey()\n ) {\n tile = tileSource.getTile(\n z,\n x,\n y,\n frameState.pixelRatio,\n viewState.projection,\n );\n if (!tile) {\n continue;\n }\n }\n\n if (lookupHasTile(tileRepresentationLookup, tile)) {\n continue;\n }\n\n if (!tileRepresentation) {\n tileRepresentation = this.createTileRepresentation({\n tile: tile,\n grid: tileGrid,\n helper: this.helper,\n gutter: gutter,\n });\n tileRepresentationCache.set(cacheKey, tileRepresentation);\n } else {\n tileRepresentation.setTile(tile);\n }\n\n addTileRepresentationToLookup(\n tileRepresentationLookup,\n tileRepresentation,\n z,\n );\n\n const tileQueueKey = tile.getKey();\n wantedTiles[tileQueueKey] = true;\n\n if (tile.getState() === TileState.IDLE) {\n if (!frameState.tileQueue.isKeyQueued(tileQueueKey)) {\n frameState.tileQueue.enqueue([\n tile,\n tileSourceKey,\n tileGrid.getTileCoordCenter(tileCoord),\n tileResolution,\n ]);\n }\n }\n }\n }\n }\n }\n\n /**\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {boolean} tilesWithAlpha True if at least one of the rendered tiles has alpha\n * @protected\n */\n beforeTilesRender(frameState, tilesWithAlpha) {\n this.helper.prepareDraw(this.frameState, !tilesWithAlpha, true);\n }\n\n /**\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @return {boolean} If returns false, tile mask rendering will be skipped\n * @protected\n */\n beforeTilesMaskRender(frameState) {\n return false;\n }\n\n /**\n * @param {TileRepresentation} tileRepresentation Tile representation\n * @param {import(\"../../transform.js\").Transform} tileTransform Tile transform\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state\n * @param {import(\"../../extent.js\").Extent} renderExtent Render extent\n * @param {number} tileResolution Tile resolution\n * @param {import(\"../../size.js\").Size} tileSize Tile size\n * @param {import(\"../../coordinate.js\").Coordinate} tileOrigin Tile origin\n * @param {import(\"../../extent.js\").Extent} tileExtent tile Extent\n * @param {number} depth Depth\n * @param {number} gutter Gutter\n * @param {number} alpha Alpha\n * @protected\n */\n renderTile(\n tileRepresentation,\n tileTransform,\n frameState,\n renderExtent,\n tileResolution,\n tileSize,\n tileOrigin,\n tileExtent,\n depth,\n gutter,\n alpha,\n ) {}\n\n /**\n * @param {TileRepresentation} tileRepresentation Tile representation\n * @param {number} tileZ Tile Z\n * @param {import(\"../../extent.js\").Extent} extent Render extent\n * @param {number} depth Depth\n * @protected\n */\n renderTileMask(tileRepresentation, tileZ, extent, depth) {}\n\n drawTile_(\n frameState,\n tileRepresentation,\n tileZ,\n gutter,\n extent,\n alphaLookup,\n tileGrid,\n ) {\n if (!tileRepresentation.ready) {\n return;\n }\n const tile = tileRepresentation.tile;\n const tileCoord = tile.tileCoord;\n const tileCoordKey = getTileCoordKey(tileCoord);\n const alpha = tileCoordKey in alphaLookup ? alphaLookup[tileCoordKey] : 1;\n\n const tileResolution = tileGrid.getResolution(tileZ);\n const tileSize = toSize(tileGrid.getTileSize(tileZ), this.tempSize_);\n const tileOrigin = tileGrid.getOrigin(tileZ);\n const tileExtent = tileGrid.getTileCoordExtent(tileCoord);\n // tiles with alpha are rendered last to allow blending\n const depth = alpha < 1 ? -1 : depthForZ(tileZ);\n if (alpha < 1) {\n frameState.animate = true;\n }\n\n const viewState = frameState.viewState;\n const centerX = viewState.center[0];\n const centerY = viewState.center[1];\n\n const tileWidthWithGutter = tileSize[0] + 2 * gutter;\n const tileHeightWithGutter = tileSize[1] + 2 * gutter;\n\n const aspectRatio = tileWidthWithGutter / tileHeightWithGutter;\n\n const centerI = (centerX - tileOrigin[0]) / (tileSize[0] * tileResolution);\n const centerJ = (tileOrigin[1] - centerY) / (tileSize[1] * tileResolution);\n\n const tileScale = viewState.resolution / tileResolution;\n\n const tileCenterI = tileCoord[1];\n const tileCenterJ = tileCoord[2];\n\n resetTransform(this.tileTransform_);\n scaleTransform(\n this.tileTransform_,\n 2 / ((frameState.size[0] * tileScale) / tileWidthWithGutter),\n -2 / ((frameState.size[1] * tileScale) / tileWidthWithGutter),\n );\n rotateTransform(this.tileTransform_, viewState.rotation);\n scaleTransform(this.tileTransform_, 1, 1 / aspectRatio);\n translateTransform(\n this.tileTransform_,\n (tileSize[0] * (tileCenterI - centerI) - gutter) / tileWidthWithGutter,\n (tileSize[1] * (tileCenterJ - centerJ) - gutter) / tileHeightWithGutter,\n );\n\n this.renderTile(\n /** @type {TileRepresentation} */ (tileRepresentation),\n this.tileTransform_,\n frameState,\n extent,\n tileResolution,\n tileSize,\n tileOrigin,\n tileExtent,\n depth,\n gutter,\n alpha,\n );\n }\n\n /**\n * Render the layer.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @return {HTMLElement} The rendered element.\n * @override\n */\n renderFrame(frameState) {\n this.frameState = frameState;\n this.renderComplete = true;\n const gl = this.helper.getGL();\n this.preRender(gl, frameState);\n\n const viewState = frameState.viewState;\n const tileLayer = this.getLayer();\n const tileSource = tileLayer.getRenderSource();\n const tileGrid = tileSource.getTileGridForProjection(viewState.projection);\n const gutter = tileSource.getGutterForProjection(viewState.projection);\n const extent = getRenderExtent(frameState, frameState.extent);\n const z = tileGrid.getZForResolution(\n viewState.resolution,\n tileSource.zDirection,\n );\n\n /**\n * @type {TileRepresentationLookup}\n */\n const tileRepresentationLookup = newTileRepresentationLookup();\n\n const preload = tileLayer.getPreload();\n if (frameState.nextExtent) {\n const targetZ = tileGrid.getZForResolution(\n viewState.nextResolution,\n tileSource.zDirection,\n );\n const nextExtent = getRenderExtent(frameState, frameState.nextExtent);\n this.enqueueTiles(\n frameState,\n nextExtent,\n targetZ,\n tileRepresentationLookup,\n preload,\n );\n }\n\n this.enqueueTiles(frameState, extent, z, tileRepresentationLookup, 0);\n if (preload > 0) {\n setTimeout(() => {\n this.enqueueTiles(\n frameState,\n extent,\n z - 1,\n tileRepresentationLookup,\n preload - 1,\n );\n }, 0);\n }\n\n /**\n * A lookup of alpha values for tiles at the target rendering resolution\n * for tiles that are in transition. If a tile coord key is absent from\n * this lookup, the tile should be rendered at alpha 1.\n * @type {Object<string, number>}\n */\n const alphaLookup = {};\n\n let blend = false;\n const representationsByZ = tileRepresentationLookup.representationsByZ;\n\n // look for cached tiles to use if a target tile is not ready\n if (z in representationsByZ) {\n const uid = getUid(this);\n const time = frameState.time;\n for (const tileRepresentation of representationsByZ[z]) {\n const tile = tileRepresentation.tile;\n if (tile.getState() === TileState.EMPTY) {\n continue;\n }\n const tileCoord = tile.tileCoord;\n\n if (tileRepresentation.ready) {\n const alpha = tile.getAlpha(uid, time);\n if (alpha === 1) {\n // no need to look for alt tiles\n tile.endTransition(uid);\n continue;\n }\n blend = true;\n const tileCoordKey = getTileCoordKey(tileCoord);\n alphaLookup[tileCoordKey] = alpha;\n }\n this.renderComplete = false;\n\n // first look for child tiles (at z + 1)\n const coveredByChildren = this.findAltTiles_(\n tileGrid,\n tileCoord,\n z + 1,\n tileRepresentationLookup,\n );\n\n if (coveredByChildren) {\n continue;\n }\n\n // next look for parent tiles\n const minZoom = tileGrid.getMinZoom();\n for (let parentZ = z - 1; parentZ >= minZoom; --parentZ) {\n const coveredByParent = this.findAltTiles_(\n tileGrid,\n tileCoord,\n parentZ,\n tileRepresentationLookup,\n );\n\n if (coveredByParent) {\n break;\n }\n }\n }\n }\n\n const zs = Object.keys(representationsByZ).map(Number).sort(descending);\n\n const renderTileMask = this.beforeTilesMaskRender(frameState);\n\n if (renderTileMask) {\n for (let j = 0, jj = zs.length; j < jj; ++j) {\n const tileZ = zs[j];\n for (const tileRepresentation of representationsByZ[tileZ]) {\n const tileCoord = tileRepresentation.tile.tileCoord;\n const tileCoordKey = getTileCoordKey(tileCoord);\n // do not render the tile mask if alpha < 1\n if (tileCoordKey in alphaLookup) {\n continue;\n }\n const tileExtent = tileGrid.getTileCoordExtent(tileCoord);\n this.renderTileMask(\n /** @type {TileRepresentation} */ (tileRepresentation),\n tileZ,\n tileExtent,\n depthForZ(tileZ),\n );\n }\n }\n }\n\n this.beforeTilesRender(frameState, blend);\n\n for (let j = 0, jj = zs.length; j < jj; ++j) {\n const tileZ = zs[j];\n for (const tileRepresentation of representationsByZ[tileZ]) {\n const tileCoord = tileRepresentation.tile.tileCoord;\n const tileCoordKey = getTileCoordKey(tileCoord);\n if (tileCoordKey in alphaLookup) {\n continue;\n }\n\n this.drawTile_(\n frameState,\n tileRepresentation,\n tileZ,\n gutter,\n extent,\n alphaLookup,\n tileGrid,\n );\n }\n }\n\n if (z in representationsByZ) {\n for (const tileRepresentation of representationsByZ[z]) {\n const tileCoord = tileRepresentation.tile.tileCoord;\n const tileCoordKey = getTileCoordKey(tileCoord);\n if (tileCoordKey in alphaLookup) {\n this.drawTile_(\n frameState,\n tileRepresentation,\n z,\n gutter,\n extent,\n alphaLookup,\n tileGrid,\n );\n }\n }\n }\n\n this.beforeFinalize(frameState);\n this.helper.finalizeDraw(\n frameState,\n this.dispatchPreComposeEvent,\n this.dispatchPostComposeEvent,\n );\n\n const canvas = this.helper.getCanvas();\n\n const tileRepresentationCache = this.tileRepresentationCache;\n tileRepresentationCache.expireCache();\n\n this.postRender(gl, frameState);\n return canvas;\n }\n\n /**\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @protected\n */\n beforeFinalize(frameState) {\n return;\n }\n\n /**\n * Look for tiles covering the provided tile coordinate at an alternate\n * zoom level. Loaded tiles will be added to the provided tile representation lookup.\n * @param {import(\"../../tilegrid/TileGrid.js\").default} tileGrid The tile grid.\n * @param {import(\"../../tilecoord.js\").TileCoord} tileCoord The target tile coordinate.\n * @param {number} altZ The alternate zoom level.\n * @param {TileRepresentationLookup} tileRepresentationLookup Lookup of\n * tile representations by zoom level.\n * @return {boolean} The tile coordinate is covered by loaded tiles at the alternate zoom level.\n * @private\n */\n findAltTiles_(tileGrid, tileCoord, altZ, tileRepresentationLookup) {\n const tileRange = tileGrid.getTileRangeForTileCoordAndZ(\n tileCoord,\n altZ,\n this.tempTileRange_,\n );\n\n if (!tileRange) {\n return false;\n }\n\n let covered = true;\n const tileRepresentationCache = this.tileRepresentationCache;\n const source = this.getLayer().getRenderSource();\n for (let x = tileRange.minX; x <= tileRange.maxX; ++x) {\n for (let y = tileRange.minY; y <= tileRange.maxY; ++y) {\n const cacheKey = getCacheKey(source, [altZ, x, y]);\n let loaded = false;\n if (tileRepresentationCache.containsKey(cacheKey)) {\n const tileRepresentation = tileRepresentationCache.get(cacheKey);\n if (\n tileRepresentation.ready &&\n !lookupHasTile(tileRepresentationLookup, tileRepresentation.tile)\n ) {\n addTileRepresentationToLookup(\n tileRepresentationLookup,\n tileRepresentation,\n altZ,\n );\n loaded = true;\n }\n }\n if (!loaded) {\n covered = false;\n }\n }\n }\n return covered;\n }\n\n /**\n * @override\n */\n clearCache() {\n super.clearCache();\n\n const tileRepresentationCache = this.tileRepresentationCache;\n tileRepresentationCache.forEach((tileRepresentation) =>\n tileRepresentation.dispose(),\n );\n tileRepresentationCache.clear();\n }\n\n /**\n * @override\n */\n afterHelperCreated() {\n super.afterHelperCreated();\n\n this.tileRepresentationCache.forEach((tileRepresentation) =>\n tileRepresentation.setHelper(this.helper),\n );\n }\n\n /**\n * Clean up.\n * @override\n */\n disposeInternal() {\n super.disposeInternal();\n delete this.frameState;\n }\n}\n\nexport default WebGLBaseTileLayerRenderer;\n", "/**\n * @module ol/renderer/webgl/TileLayer\n */\nimport TileState from '../../TileState.js';\nimport {\n boundingExtent,\n containsCoordinate,\n getIntersection,\n} from '../../extent.js';\nimport {fromUserExtent} from '../../proj.js';\nimport {toSize} from '../../size.js';\nimport {apply as applyTransform} from '../../transform.js';\nimport {fromTransform as mat4FromTransform} from '../../vec/mat4.js';\nimport WebGLArrayBuffer from '../../webgl/Buffer.js';\nimport {AttributeType} from '../../webgl/Helper.js';\nimport TileTexture from '../../webgl/TileTexture.js';\nimport {ELEMENT_ARRAY_BUFFER, STATIC_DRAW} from '../../webgl.js';\nimport WebGLBaseTileLayerRenderer, {\n Uniforms as BaseUniforms,\n getCacheKey,\n} from './TileLayerBase.js';\n\nexport const Uniforms = {\n ...BaseUniforms,\n TILE_TEXTURE_ARRAY: 'u_tileTextures',\n TEXTURE_PIXEL_WIDTH: 'u_texturePixelWidth',\n TEXTURE_PIXEL_HEIGHT: 'u_texturePixelHeight',\n TEXTURE_RESOLUTION: 'u_textureResolution', // map units per texture pixel\n TEXTURE_ORIGIN_X: 'u_textureOriginX', // map x coordinate of left edge of texture\n TEXTURE_ORIGIN_Y: 'u_textureOriginY', // map y coordinate of top edge of texture\n};\n\nexport const Attributes = {\n TEXTURE_COORD: 'a_textureCoord',\n};\n\n/**\n * @type {Array<import('../../webgl/Helper.js').AttributeDescription>}\n */\nconst attributeDescriptions = [\n {\n name: Attributes.TEXTURE_COORD,\n size: 2,\n type: AttributeType.FLOAT,\n },\n];\n\n/**\n * @typedef {Object} Options\n * @property {string} vertexShader Vertex shader source.\n * @property {string} fragmentShader Fragment shader source.\n * @property {Object<string, import(\"../../webgl/Helper\").UniformValue>} [uniforms] Additional uniforms\n * made available to shaders.\n * @property {Array<import(\"../../webgl/PaletteTexture.js\").default>} [paletteTextures] Palette textures.\n * @property {number} [cacheSize=512] The texture cache size.\n * @property {Array<import('./Layer.js').PostProcessesOptions>} [postProcesses] Post-processes definitions.\n */\n\n/**\n * @typedef {import(\"../../webgl/TileTexture.js\").TileType} TileTextureType\n */\n\n/**\n * @typedef {import(\"../../webgl/TileTexture.js\").default} TileTextureRepresentation\n */\n\n/**\n * @classdesc\n * WebGL renderer for tile layers.\n * @template {import(\"../../layer/WebGLTile.js\").default|import(\"../../layer/Flow.js\").default} LayerType\n * @extends {WebGLBaseTileLayerRenderer<LayerType, TileTextureType, TileTextureRepresentation>}\n * @api\n */\nclass WebGLTileLayerRenderer extends WebGLBaseTileLayerRenderer {\n /**\n * @param {LayerType} tileLayer Tile layer.\n * @param {Options} options Options.\n */\n constructor(tileLayer, options) {\n super(tileLayer, options);\n\n /**\n * @type {WebGLProgram}\n * @private\n */\n this.program_;\n\n /**\n * @private\n */\n this.vertexShader_ = options.vertexShader;\n\n /**\n * @private\n */\n this.fragmentShader_ = options.fragmentShader;\n\n /**\n * Tiles are rendered as a quad with the following structure:\n *\n * [P3]---------[P2]\n * |` |\n * | ` B |\n * | ` |\n * | ` |\n * | A ` |\n * | ` |\n * [P0]---------[P1]\n *\n * Triangle A: P0, P1, P3\n * Triangle B: P1, P2, P3\n *\n * @private\n */\n this.indices_ = new WebGLArrayBuffer(ELEMENT_ARRAY_BUFFER, STATIC_DRAW);\n this.indices_.fromArray([0, 1, 3, 1, 2, 3]);\n\n /**\n * @type {Array<import(\"../../webgl/PaletteTexture.js\").default>}\n * @private\n */\n this.paletteTextures_ = options.paletteTextures || [];\n }\n\n /**\n * @param {Options} options Options.\n * @override\n */\n reset(options) {\n super.reset(options);\n if (this.helper) {\n const gl = this.helper.getGL();\n for (const paletteTexture of this.paletteTextures_) {\n paletteTexture.delete(gl);\n }\n }\n\n this.vertexShader_ = options.vertexShader;\n this.fragmentShader_ = options.fragmentShader;\n this.paletteTextures_ = options.paletteTextures || [];\n\n if (this.helper) {\n this.program_ = this.helper.getProgram(\n this.fragmentShader_,\n this.vertexShader_,\n );\n const gl = this.helper.getGL();\n for (const paletteTexture of this.paletteTextures_) {\n // upload the texture data\n paletteTexture.getTexture(gl);\n }\n }\n }\n\n /**\n * @override\n */\n afterHelperCreated() {\n super.afterHelperCreated();\n\n const gl = this.helper.getGL();\n for (const paletteTexture of this.paletteTextures_) {\n // upload the texture data\n paletteTexture.getTexture(gl);\n }\n\n this.program_ = this.helper.getProgram(\n this.fragmentShader_,\n this.vertexShader_,\n );\n this.helper.flushBufferData(this.indices_);\n }\n\n /**\n * @override\n */\n removeHelper() {\n if (this.helper) {\n const gl = this.helper.getGL();\n for (const paletteTexture of this.paletteTextures_) {\n paletteTexture.delete(gl);\n }\n }\n\n super.removeHelper();\n }\n\n /**\n * @override\n */\n createTileRepresentation(options) {\n return new TileTexture(options);\n }\n\n /**\n * @override\n */\n beforeTilesRender(frameState, tilesWithAlpha) {\n super.beforeTilesRender(frameState, tilesWithAlpha);\n this.helper.useProgram(this.program_, frameState);\n }\n\n /**\n * @override\n */\n renderTile(\n tileTexture,\n tileTransform,\n frameState,\n renderExtent,\n tileResolution,\n tileSize,\n tileOrigin,\n tileExtent,\n depth,\n gutter,\n alpha,\n ) {\n const gl = this.helper.getGL();\n this.helper.bindBuffer(tileTexture.coords);\n this.helper.bindBuffer(this.indices_);\n this.helper.enableAttributes(attributeDescriptions);\n\n let textureSlot = 0;\n while (textureSlot < tileTexture.textures.length) {\n const uniformName = `${Uniforms.TILE_TEXTURE_ARRAY}[${textureSlot}]`;\n this.helper.bindTexture(\n tileTexture.textures[textureSlot],\n textureSlot,\n uniformName,\n );\n ++textureSlot;\n }\n\n for (\n let paletteIndex = 0;\n paletteIndex < this.paletteTextures_.length;\n ++paletteIndex\n ) {\n const paletteTexture = this.paletteTextures_[paletteIndex];\n const texture = paletteTexture.getTexture(gl);\n this.helper.bindTexture(texture, textureSlot, paletteTexture.name);\n ++textureSlot;\n }\n\n const viewState = frameState.viewState;\n\n const tileWidthWithGutter = tileSize[0] + 2 * gutter;\n const tileHeightWithGutter = tileSize[1] + 2 * gutter;\n\n const tile = tileTexture.tile;\n const tileCoord = tile.tileCoord;\n\n const tileCenterI = tileCoord[1];\n const tileCenterJ = tileCoord[2];\n\n this.helper.setUniformMatrixValue(\n Uniforms.TILE_TRANSFORM,\n mat4FromTransform(this.tempMat4, tileTransform),\n );\n\n this.helper.setUniformFloatValue(Uniforms.TRANSITION_ALPHA, alpha);\n this.helper.setUniformFloatValue(Uniforms.DEPTH, depth);\n\n let gutterExtent = renderExtent;\n if (gutter > 0) {\n gutterExtent = tileExtent;\n getIntersection(gutterExtent, renderExtent, gutterExtent);\n }\n this.helper.setUniformFloatVec4(Uniforms.RENDER_EXTENT, gutterExtent);\n\n this.helper.setUniformFloatValue(Uniforms.RESOLUTION, viewState.resolution);\n this.helper.setUniformFloatValue(Uniforms.ZOOM, viewState.zoom);\n\n this.helper.setUniformFloatValue(\n Uniforms.TEXTURE_PIXEL_WIDTH,\n tileWidthWithGutter,\n );\n this.helper.setUniformFloatValue(\n Uniforms.TEXTURE_PIXEL_HEIGHT,\n tileHeightWithGutter,\n );\n this.helper.setUniformFloatValue(\n Uniforms.TEXTURE_RESOLUTION,\n tileResolution,\n );\n this.helper.setUniformFloatValue(\n Uniforms.TEXTURE_ORIGIN_X,\n tileOrigin[0] +\n tileCenterI * tileSize[0] * tileResolution -\n gutter * tileResolution,\n );\n this.helper.setUniformFloatValue(\n Uniforms.TEXTURE_ORIGIN_Y,\n tileOrigin[1] -\n tileCenterJ * tileSize[1] * tileResolution +\n gutter * tileResolution,\n );\n\n this.helper.drawElements(0, this.indices_.getSize());\n }\n\n /**\n * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView} Data at the pixel location.\n * @override\n */\n getData(pixel) {\n const gl = this.helper.getGL();\n if (!gl) {\n return null;\n }\n\n const frameState = this.frameState;\n if (!frameState) {\n return null;\n }\n\n const layer = this.getLayer();\n const coordinate = applyTransform(\n frameState.pixelToCoordinateTransform,\n pixel.slice(),\n );\n\n const viewState = frameState.viewState;\n const layerExtent = layer.getExtent();\n if (layerExtent) {\n if (\n !containsCoordinate(\n fromUserExtent(layerExtent, viewState.projection),\n coordinate,\n )\n ) {\n return null;\n }\n }\n\n // determine last source suitable for rendering at coordinate\n const sources = layer.getSources(\n boundingExtent([coordinate]),\n viewState.resolution,\n );\n let i, source, tileGrid;\n for (i = sources.length - 1; i >= 0; --i) {\n source = sources[i];\n if (source.getState() === 'ready') {\n tileGrid = source.getTileGridForProjection(viewState.projection);\n if (source.getWrapX()) {\n break;\n }\n const gridExtent = tileGrid.getExtent();\n if (!gridExtent || containsCoordinate(gridExtent, coordinate)) {\n break;\n }\n }\n }\n if (i < 0) {\n return null;\n }\n\n const tileTextureCache = this.tileRepresentationCache;\n for (\n let z = tileGrid.getZForResolution(viewState.resolution);\n z >= tileGrid.getMinZoom();\n --z\n ) {\n const tileCoord = tileGrid.getTileCoordForCoordAndZ(coordinate, z);\n const cacheKey = getCacheKey(source, tileCoord);\n if (!tileTextureCache.containsKey(cacheKey)) {\n continue;\n }\n const tileTexture = tileTextureCache.get(cacheKey);\n const tile = tileTexture.tile;\n if (tile.getState() === TileState.EMPTY) {\n return null;\n }\n if (!tileTexture.loaded) {\n continue;\n }\n const tileOrigin = tileGrid.getOrigin(z);\n const tileSize = toSize(tileGrid.getTileSize(z));\n const tileResolution = tileGrid.getResolution(z);\n\n const col =\n (coordinate[0] - tileOrigin[0]) / tileResolution -\n tileCoord[1] * tileSize[0];\n\n const row =\n (tileOrigin[1] - coordinate[1]) / tileResolution -\n tileCoord[2] * tileSize[1];\n\n return tileTexture.getPixelData(col, row);\n }\n return null;\n }\n\n /**\n * Clean up.\n * @override\n */\n disposeInternal() {\n const helper = this.helper;\n if (helper) {\n const gl = helper.getGL();\n for (const paletteTexture of this.paletteTextures_) {\n paletteTexture.delete(gl);\n }\n this.paletteTextures_.length = 0;\n\n gl.deleteProgram(this.program_);\n delete this.program_;\n helper.deleteBuffer(this.indices_);\n }\n super.disposeInternal();\n delete this.indices_;\n }\n}\n\nexport default WebGLTileLayerRenderer;\n", "/**\n * @module ol/webgl/PaletteTexture\n */\n\nclass PaletteTexture {\n /**\n * @param {string} name The name of the texture.\n * @param {Uint8Array} data The texture data.\n */\n constructor(name, data) {\n this.name = name;\n this.data = data;\n\n /**\n * @type {WebGLTexture|null}\n * @private\n */\n this.texture_ = null;\n }\n\n /**\n * @param {WebGLRenderingContext} gl Rendering context.\n * @return {WebGLTexture} The texture.\n */\n getTexture(gl) {\n if (!this.texture_) {\n const texture = gl.createTexture();\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n this.data.length / 4,\n 1,\n 0,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n this.data,\n );\n this.texture_ = texture;\n }\n return this.texture_;\n }\n\n /**\n * @param {WebGLRenderingContext} gl Rendering context.\n */\n delete(gl) {\n if (this.texture_) {\n gl.deleteTexture(this.texture_);\n }\n this.texture_ = null;\n }\n}\n\nexport default PaletteTexture;\n", "/**\n * @module ol/expr/gpu\n */\nimport {asArray} from '../color.js';\nimport {Uniforms} from '../renderer/webgl/TileLayer.js';\nimport {toSize} from '../size.js';\nimport PaletteTexture from '../webgl/PaletteTexture.js';\nimport {\n BooleanType,\n CallExpression,\n ColorType,\n NumberArrayType,\n NumberType,\n Ops,\n SizeType,\n StringType,\n isType,\n parse,\n typeName,\n} from './expression.js';\n\n/**\n * @param {string} operator Operator\n * @param {CompilationContext} context Compilation context\n * @return {string} A function name based on the operator, unique in the given context\n */\nfunction computeOperatorFunctionName(operator, context) {\n return `operator_${operator}_${Object.keys(context.functions).length}`;\n}\n\n/**\n * Will return the number as a float with a dot separator, which is required by GLSL.\n * @param {number} v Numerical value.\n * @return {string} The value as string.\n */\nexport function numberToGlsl(v) {\n const s = v.toString();\n return s.includes('.') ? s : s + '.0';\n}\n\n/**\n * Will return the number array as a float with a dot separator, concatenated with ', '.\n * @param {Array<number>} array Numerical values array.\n * @return {string} The array as a vector, e. g.: `vec3(1.0, 2.0, 3.0)`.\n */\nexport function arrayToGlsl(array) {\n if (array.length < 2 || array.length > 4) {\n throw new Error(\n '`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.',\n );\n }\n return `vec${array.length}(${array.map(numberToGlsl).join(', ')})`;\n}\n\n/**\n * Will normalize and converts to string a `vec4` color array compatible with GLSL.\n * @param {string|import(\"../color.js\").Color} color Color either in string format or [r, g, b, a] array format,\n * with RGB components in the 0..255 range and the alpha component in the 0..1 range.\n * Note that the final array will always have 4 components.\n * @return {string} The color expressed in the `vec4(1.0, 1.0, 1.0, 1.0)` form.\n */\nexport function colorToGlsl(color) {\n const array = asArray(color);\n const alpha = array.length > 3 ? array[3] : 1;\n return arrayToGlsl([array[0] / 255, array[1] / 255, array[2] / 255, alpha]);\n}\n\n/**\n * Normalizes and converts a number or array toa `vec2` array compatible with GLSL.\n * @param {number|import('../size.js').Size} size Size.\n * @return {string} The color expressed in the `vec4(1.0, 1.0, 1.0, 1.0)` form.\n */\nexport function sizeToGlsl(size) {\n const array = toSize(size);\n return arrayToGlsl(array);\n}\n\n/** @type {Object<string, number>} */\nconst stringToFloatMap = {};\nlet stringToFloatCounter = 0;\n\n/**\n * Returns a stable equivalent number for the string literal.\n * @param {string} string String literal value\n * @return {number} Number equivalent\n */\nexport function getStringNumberEquivalent(string) {\n if (!(string in stringToFloatMap)) {\n stringToFloatMap[string] = stringToFloatCounter++;\n }\n return stringToFloatMap[string];\n}\n\n/**\n * Returns a stable equivalent number for the string literal, for use in shaders. This number is then\n * converted to be a GLSL-compatible string.\n * Note: with a float precision of `mediump`, the amount of unique strings supported is 16,777,216\n * @param {string} string String literal value\n * @return {string} GLSL-compatible string containing a number\n */\nexport function stringToGlsl(string) {\n return numberToGlsl(getStringNumberEquivalent(string));\n}\n\n/**\n * Get the uniform name given a variable name.\n * @param {string} variableName The variable name.\n * @return {string} The uniform name.\n */\nexport function uniformNameForVariable(variableName) {\n return 'u_var_' + variableName;\n}\n\n/**\n * @typedef {import('./expression.js').ParsingContext} ParsingContext\n */\n/**\n *\n * @typedef {import(\"./expression.js\").Expression} Expression\n */\n/**\n *\n * @typedef {import(\"./expression.js\").LiteralExpression} LiteralExpression\n */\n\n/**\n * @typedef {Object} CompilationContextProperty\n * @property {string} name Name\n * @property {number} type Resolved property type\n */\n\n/**\n * @typedef {Object} CompilationContextVariable\n * @property {string} name Name\n * @property {number} type Resolved variable type\n */\n\n/**\n * @typedef {Object} CompilationContext\n * @property {Object<string, CompilationContextProperty>} properties The values for properties used in 'get' expressions.\n * @property {Object<string, CompilationContextVariable>} variables The values for variables used in 'var' expressions.\n * @property {Object<string, string>} functions Lookup of functions used by the style.\n * @property {number} [bandCount] Number of bands per pixel.\n * @property {Array<PaletteTexture>} [paletteTextures] List of palettes used by the style.\n * @property {boolean} featureId Whether the feature ID is used in the expression\n * @property {boolean} geometryType Whether the geometry type is used in the expression\n */\n\n/**\n * @return {CompilationContext} A new compilation context.\n */\nexport function newCompilationContext() {\n return {\n variables: {},\n properties: {},\n functions: {},\n bandCount: 0,\n featureId: false,\n geometryType: false,\n };\n}\n\nconst GET_BAND_VALUE_FUNC = 'getBandValue';\n\nexport const PALETTE_TEXTURE_ARRAY = 'u_paletteTextures';\n\nexport const FEATURE_ID_PROPERTY_NAME = 'featureId';\nexport const GEOMETRY_TYPE_PROPERTY_NAME = 'geometryType';\n\n/**\n * The value `-9999999` will be used to indicate that a property on a feature is not defined, similar to a \"no data\" value.\n */\nexport const UNDEFINED_PROP_VALUE = -9999999;\n\n/**\n * @typedef {string} CompiledExpression\n */\n\n/**\n * @typedef {function(CompilationContext, CallExpression, number): string} Compiler\n * Third argument is the expected value types\n */\n\n/**\n * @param {import('./expression.js').EncodedExpression} encoded The encoded expression.\n * @param {number} type The expected type.\n * @param {import('./expression.js').ParsingContext} parsingContext The parsing context.\n * @param {CompilationContext} compilationContext An existing compilation context\n * @return {CompiledExpression} The compiled expression.\n */\nexport function buildExpression(\n encoded,\n type,\n parsingContext,\n compilationContext,\n) {\n const expression = parse(encoded, type, parsingContext);\n return compile(expression, type, compilationContext);\n}\n\n/**\n * @param {function(Array<CompiledExpression>, CompilationContext): string} output Function that takes in parsed arguments and returns a string\n * @return {function(CompilationContext, import(\"./expression.js\").CallExpression, number): string} Compiler for the call expression\n */\nfunction createCompiler(output) {\n return (context, expression, type) => {\n const length = expression.args.length;\n const args = new Array(length);\n for (let i = 0; i < length; ++i) {\n args[i] = compile(expression.args[i], type, context);\n }\n return output(args, context);\n };\n}\n\n/**\n * @type {Object<string, Compiler>}\n */\nconst compilers = {\n [Ops.Get]: (context, expression) => {\n const firstArg = /** @type {LiteralExpression} */ (expression.args[0]);\n const propName = /** @type {string} */ (firstArg.value);\n const isExisting = propName in context.properties;\n if (!isExisting) {\n context.properties[propName] = {\n name: propName,\n type: expression.type,\n };\n }\n let result = 'a_prop_' + propName;\n if (isType(expression.type, BooleanType)) {\n result = `(${result} > 0.0)`;\n }\n return result;\n },\n [Ops.Id]: (context) => {\n context.featureId = true;\n return 'a_' + FEATURE_ID_PROPERTY_NAME;\n },\n [Ops.GeometryType]: (context) => {\n context.geometryType = true;\n return 'a_' + GEOMETRY_TYPE_PROPERTY_NAME;\n },\n [Ops.LineMetric]: () => 'currentLineMetric', // this variable is assumed to always be present in shaders, default is 0.\n [Ops.Var]: (context, expression) => {\n const firstArg = /** @type {LiteralExpression} */ (expression.args[0]);\n const varName = /** @type {string} */ (firstArg.value);\n const isExisting = varName in context.variables;\n if (!isExisting) {\n context.variables[varName] = {\n name: varName,\n type: expression.type,\n };\n }\n let result = uniformNameForVariable(varName);\n if (isType(expression.type, BooleanType)) {\n result = `(${result} > 0.0)`;\n }\n return result;\n },\n [Ops.Has]: (context, expression) => {\n const firstArg = /** @type {LiteralExpression} */ (expression.args[0]);\n const propName = /** @type {string} */ (firstArg.value);\n const isExisting = propName in context.properties;\n if (!isExisting) {\n context.properties[propName] = {\n name: propName,\n type: expression.type,\n };\n }\n return `(a_prop_${propName} != ${numberToGlsl(UNDEFINED_PROP_VALUE)})`;\n },\n [Ops.Resolution]: () => 'u_resolution',\n [Ops.Zoom]: () => 'u_zoom',\n [Ops.Time]: () => 'u_time',\n [Ops.Any]: createCompiler((compiledArgs) => `(${compiledArgs.join(` || `)})`),\n [Ops.All]: createCompiler((compiledArgs) => `(${compiledArgs.join(` && `)})`),\n [Ops.Not]: createCompiler(([value]) => `(!${value})`),\n [Ops.Equal]: createCompiler(\n ([firstValue, secondValue]) => `(${firstValue} == ${secondValue})`,\n ),\n [Ops.NotEqual]: createCompiler(\n ([firstValue, secondValue]) => `(${firstValue} != ${secondValue})`,\n ),\n [Ops.GreaterThan]: createCompiler(\n ([firstValue, secondValue]) => `(${firstValue} > ${secondValue})`,\n ),\n [Ops.GreaterThanOrEqualTo]: createCompiler(\n ([firstValue, secondValue]) => `(${firstValue} >= ${secondValue})`,\n ),\n [Ops.LessThan]: createCompiler(\n ([firstValue, secondValue]) => `(${firstValue} < ${secondValue})`,\n ),\n [Ops.LessThanOrEqualTo]: createCompiler(\n ([firstValue, secondValue]) => `(${firstValue} <= ${secondValue})`,\n ),\n [Ops.Multiply]: createCompiler(\n (compiledArgs) => `(${compiledArgs.join(' * ')})`,\n ),\n [Ops.Divide]: createCompiler(\n ([firstValue, secondValue]) => `(${firstValue} / ${secondValue})`,\n ),\n [Ops.Add]: createCompiler((compiledArgs) => `(${compiledArgs.join(' + ')})`),\n [Ops.Subtract]: createCompiler(\n ([firstValue, secondValue]) => `(${firstValue} - ${secondValue})`,\n ),\n [Ops.Clamp]: createCompiler(\n ([value, min, max]) => `clamp(${value}, ${min}, ${max})`,\n ),\n [Ops.Mod]: createCompiler(([value, modulo]) => `mod(${value}, ${modulo})`),\n [Ops.Pow]: createCompiler(([value, power]) => `pow(${value}, ${power})`),\n [Ops.Abs]: createCompiler(([value]) => `abs(${value})`),\n [Ops.Floor]: createCompiler(([value]) => `floor(${value})`),\n [Ops.Ceil]: createCompiler(([value]) => `ceil(${value})`),\n [Ops.Round]: createCompiler(([value]) => `floor(${value} + 0.5)`),\n [Ops.Sin]: createCompiler(([value]) => `sin(${value})`),\n [Ops.Cos]: createCompiler(([value]) => `cos(${value})`),\n [Ops.Atan]: createCompiler(([firstValue, secondValue]) => {\n return secondValue !== undefined\n ? `atan(${firstValue}, ${secondValue})`\n : `atan(${firstValue})`;\n }),\n [Ops.Sqrt]: createCompiler(([value]) => `sqrt(${value})`),\n [Ops.Match]: createCompiler((compiledArgs) => {\n const input = compiledArgs[0];\n const fallback = compiledArgs[compiledArgs.length - 1];\n let result = null;\n for (let i = compiledArgs.length - 3; i >= 1; i -= 2) {\n const match = compiledArgs[i];\n const output = compiledArgs[i + 1];\n result = `(${input} == ${match} ? ${output} : ${result || fallback})`;\n }\n return result;\n }),\n [Ops.Between]: createCompiler(\n ([value, min, max]) => `(${value} >= ${min} && ${value} <= ${max})`,\n ),\n [Ops.Interpolate]: createCompiler(([exponent, input, ...compiledArgs]) => {\n let result = '';\n for (let i = 0; i < compiledArgs.length - 2; i += 2) {\n const stop1 = compiledArgs[i];\n const output1 = result || compiledArgs[i + 1];\n const stop2 = compiledArgs[i + 2];\n const output2 = compiledArgs[i + 3];\n let ratio;\n if (exponent === numberToGlsl(1)) {\n ratio = `(${input} - ${stop1}) / (${stop2} - ${stop1})`;\n } else {\n ratio = `(pow(${exponent}, (${input} - ${stop1})) - 1.0) / (pow(${exponent}, (${stop2} - ${stop1})) - 1.0)`;\n }\n result = `mix(${output1}, ${output2}, clamp(${ratio}, 0.0, 1.0))`;\n }\n return result;\n }),\n [Ops.Case]: createCompiler((compiledArgs) => {\n const fallback = compiledArgs[compiledArgs.length - 1];\n let result = null;\n for (let i = compiledArgs.length - 3; i >= 0; i -= 2) {\n const condition = compiledArgs[i];\n const output = compiledArgs[i + 1];\n result = `(${condition} ? ${output} : ${result || fallback})`;\n }\n return result;\n }),\n [Ops.In]: createCompiler(([needle, ...haystack], context) => {\n const funcName = computeOperatorFunctionName('in', context);\n const tests = [];\n for (let i = 0; i < haystack.length; i += 1) {\n tests.push(` if (inputValue == ${haystack[i]}) { return true; }`);\n }\n context.functions[funcName] = `bool ${funcName}(float inputValue) {\n${tests.join('\\n')}\n return false;\n}`;\n return `${funcName}(${needle})`;\n }),\n [Ops.Array]: createCompiler(\n (args) => `vec${args.length}(${args.join(', ')})`,\n ),\n [Ops.Color]: createCompiler((compiledArgs) => {\n if (compiledArgs.length === 1) {\n //grayscale\n return `vec4(vec3(${compiledArgs[0]} / 255.0), 1.0)`;\n }\n if (compiledArgs.length === 2) {\n //grayscale with alpha\n return `vec4(vec3(${compiledArgs[0]} / 255.0), ${compiledArgs[1]})`;\n }\n const rgb = compiledArgs.slice(0, 3).map((color) => `${color} / 255.0`);\n if (compiledArgs.length === 3) {\n return `vec4(${rgb.join(', ')}, 1.0)`;\n }\n const alpha = compiledArgs[3];\n return `vec4(${rgb.join(', ')}, ${alpha})`;\n }),\n [Ops.Band]: createCompiler(([band, xOffset, yOffset], context) => {\n if (!(GET_BAND_VALUE_FUNC in context.functions)) {\n let ifBlocks = '';\n const bandCount = context.bandCount || 1;\n for (let i = 0; i < bandCount; i++) {\n const colorIndex = Math.floor(i / 4);\n let bandIndex = i % 4;\n if (i === bandCount - 1 && bandIndex === 1) {\n // LUMINANCE_ALPHA - band 1 assigned to rgb and band 2 assigned to alpha\n bandIndex = 3;\n }\n const textureName = `${Uniforms.TILE_TEXTURE_ARRAY}[${colorIndex}]`;\n ifBlocks += ` if (band == ${i + 1}.0) {\n return texture2D(${textureName}, v_textureCoord + vec2(dx, dy))[${bandIndex}];\n }\n`;\n }\n\n context.functions[GET_BAND_VALUE_FUNC] =\n `float getBandValue(float band, float xOffset, float yOffset) {\n float dx = xOffset / ${Uniforms.TEXTURE_PIXEL_WIDTH};\n float dy = yOffset / ${Uniforms.TEXTURE_PIXEL_HEIGHT};\n${ifBlocks}\n}`;\n }\n\n return `${GET_BAND_VALUE_FUNC}(${band}, ${xOffset ?? '0.0'}, ${\n yOffset ?? '0.0'\n })`;\n }),\n [Ops.Palette]: (context, expression) => {\n const [index, ...colors] = expression.args;\n const numColors = colors.length;\n const palette = new Uint8Array(numColors * 4);\n for (let i = 0; i < colors.length; i++) {\n const parsedValue = /** @type {string | Array<number>} */ (\n /** @type {LiteralExpression} */ (colors[i]).value\n );\n const color = asArray(parsedValue);\n const offset = i * 4;\n palette[offset] = color[0];\n palette[offset + 1] = color[1];\n palette[offset + 2] = color[2];\n palette[offset + 3] = color[3] * 255;\n }\n if (!context.paletteTextures) {\n context.paletteTextures = [];\n }\n const paletteName = `${PALETTE_TEXTURE_ARRAY}[${context.paletteTextures.length}]`;\n const paletteTexture = new PaletteTexture(paletteName, palette);\n context.paletteTextures.push(paletteTexture);\n const compiledIndex = compile(index, NumberType, context);\n return `texture2D(${paletteName}, vec2((${compiledIndex} + 0.5) / ${numColors}.0, 0.5))`;\n },\n // TODO: unimplemented\n // Ops.Number\n // Ops.String\n // Ops.Coalesce\n // Ops.Concat\n // Ops.ToString\n};\n\n/**\n * @param {Expression} expression The expression.\n * @param {number} returnType The expected return type.\n * @param {CompilationContext} context The compilation context.\n * @return {CompiledExpression} The compiled expression\n */\nfunction compile(expression, returnType, context) {\n // operator\n if (expression instanceof CallExpression) {\n const compiler = compilers[expression.operator];\n if (compiler === undefined) {\n throw new Error(\n `No compiler defined for this operator: ${JSON.stringify(\n expression.operator,\n )}`,\n );\n }\n return compiler(context, expression, returnType);\n }\n\n if ((expression.type & NumberType) > 0) {\n return numberToGlsl(/** @type {number} */ (expression.value));\n }\n\n if ((expression.type & BooleanType) > 0) {\n return expression.value.toString();\n }\n\n if ((expression.type & StringType) > 0) {\n return stringToGlsl(expression.value.toString());\n }\n\n if ((expression.type & ColorType) > 0) {\n return colorToGlsl(\n /** @type {Array<number> | string} */ (expression.value),\n );\n }\n\n if ((expression.type & NumberArrayType) > 0) {\n return arrayToGlsl(/** @type {Array<number>} */ (expression.value));\n }\n\n if ((expression.type & SizeType) > 0) {\n return sizeToGlsl(\n /** @type {number|import('../size.js').Size} */ (expression.value),\n );\n }\n\n throw new Error(\n `Unexpected expression ${expression.value} (expected type ${typeName(\n returnType,\n )})`,\n );\n}\n", "/**\n * @module ol/style/flat\n */\n\n/**\n * @api\n * @fileoverview Vector layers can be styled with an object literal containing properties for\n * stroke, fill, image, and text styles. The types below can be composed into a single object.\n * For example, a style with both stroke and fill properties could look like this:\n *\n * const style = {\n * 'stroke-color': 'yellow',\n * 'stroke-width': 1.5,\n * 'fill-color': 'orange',\n * };\n *\n * See details about the available properties depending on what type of symbolizer should be applied:\n * {@link module:ol/style/flat~FlatStroke Stroke} - properties for applying a stroke to lines and polygons\n * {@link module:ol/style/flat~FlatFill Fill} - properties for filling polygons\n * {@link module:ol/style/flat~FlatText Text} - properties for labeling points, lines, and polygons\n * {@link module:ol/style/flat~FlatIcon Icon} - properties for rendering points with an icon\n * {@link module:ol/style/flat~FlatCircle Circle} - properties for rendering points with a circle\n * {@link module:ol/style/flat~FlatShape Shape} - properties for rendering points with a regular shape\n *\n * To conditionally apply styles based on a filter, a list of {@link module:ol/style/flat~Rule rules} can be used.\n * For example, to style points with a big orange circle if the population is greater than 1 million and\n * a smaller blue circle otherwise:\n *\n * const rules = [\n * {\n * filter: ['>', ['get', 'population'], 1_000_000],\n * style: {\n * 'circle-radius': 10,\n * 'circle-fill-color': 'red',\n * }\n * },\n * {\n * else: true,\n * style: {\n * 'circle-radius': 5,\n * 'circle-fill-color': 'blue',\n * },\n * },\n * ];\n */\n\n/**\n * A literal boolean (e.g. `true`) or an expression that evaluates to a boolean (e.g. `['>', ['get', 'population'], 1_000_000]`).\n *\n * @typedef {boolean|Array} BooleanExpression\n */\n\n/**\n * A literal string (e.g. `'hello'`) or an expression that evaluates to a string (e.g. `['get', 'greeting']`).\n *\n * @typedef {string|Array} StringExpression\n */\n\n/**\n * A literal number (e.g. `42`) or an expression that evaluates to a number (e.g. `['+', 40, 2]`).\n *\n * @typedef {number|Array} NumberExpression\n */\n\n/**\n * A CSS named color (e.g. `'blue'`), an array of 3 RGB values (e.g. `[0, 255, 0]`), an array of 4 RGBA values\n * (e.g. `[0, 255, 0, 0.5]`), or an expression that evaluates to one of these color types (e.g. `['get', 'color']`).\n *\n * @typedef {import(\"../color.js\").Color|string|Array} ColorExpression\n */\n\n/**\n * An array of numbers (e.g. `[1, 2, 3]`) or an expression that evaluates to the same (e.g. `['get', 'values']`).\n *\n * @typedef {Array<number>|Array} NumberArrayExpression\n */\n\n/**\n * An array of two numbers (e.g. `[10, 20]`) or an expression that evaluates to the same (e.g. `['get', 'size']`).\n *\n * @typedef {number|Array<number>|Array} SizeExpression\n */\n\n/**\n * For static styling, the [layer.setStyle()]{@link module:ol/layer/Vector~VectorLayer#setStyle} method\n * can be called with an object literal that has fill, stroke, text, icon, regular shape, and/or circle properties.\n * @api\n *\n * @typedef {FlatFill & FlatStroke & FlatText & FlatIcon & FlatShape & FlatCircle} FlatStyle\n */\n\n/**\n * A flat style literal or an array of the same.\n *\n * @typedef {FlatStyle|Array<FlatStyle>|Array<Rule>} FlatStyleLike\n */\n\n/**\n * Fill style properties applied to polygon features.\n *\n * @typedef {Object} FlatFill\n * @property {ColorExpression} [fill-color] The fill color. `'none'` means no fill and no hit detection (applies to Canvas only).\n * @property {StringExpression} [fill-pattern-src] Fill pattern image source URI. If `fill-color` is defined as well,\n * it will be used to tint this image. (Expressions only in Canvas)\n * @property {SizeExpression} [fill-pattern-size] Fill pattern image size in pixels.\n * Can be used together with `fill-pattern-offset` to define the sub-rectangle to use\n * from a fill pattern image sprite sheet.\n * @property {SizeExpression} [fill-pattern-offset=[0, 0]] Offset, which, together with the size and the offset origin, define the\n * sub-rectangle to use from the original fill pattern image.\n * @property {import(\"./Icon.js\").IconOrigin} [fill-pattern-offset-origin='top-left'] Origin of the offset: `bottom-left`, `bottom-right`,\n * `top-left` or `top-right`. (WebGL only)\n */\n\n/**\n * Stroke style properties applied to line strings and polygon boundaries. To apply a stroke, at least one of\n * `stroke-color` or `stroke-width` must be provided.\n *\n * @typedef {Object} FlatStroke\n * @property {ColorExpression} [stroke-color] The stroke color.\n * @property {NumberExpression} [stroke-width] Stroke pixel width.\n * @property {StringExpression} [stroke-line-cap='round'] Line cap style: `butt`, `round`, or `square`.\n * @property {StringExpression} [stroke-line-join='round'] Line join style: `bevel`, `round`, or `miter`.\n * @property {NumberArrayExpression} [stroke-line-dash] Line dash pattern.\n * @property {NumberExpression} [stroke-line-dash-offset=0] Line dash offset.\n * @property {NumberExpression} [stroke-miter-limit=10] Miter limit.\n * @property {NumberExpression} [stroke-offset] Stroke offset in pixel along the normal. A positive value offsets the line to the right,\n * relative to the direction of the line.\n * @property {string} [stroke-pattern-src] Stroke pattern image source URI. If `stroke-color` is defined as well,\n * it will be used to tint this image. (WebGL only)\n * @property {SizeExpression} [stroke-pattern-offset=[0, 0]] Offset, which, together with the size and the offset origin,\n * define the sub-rectangle to use from the original stroke pattern image. (WebGL only)\n * @property {import(\"./Icon.js\").IconOrigin} [stroke-pattern-offset-origin='top-left'] Origin of the offset: `bottom-left`, `bottom-right`,\n * `top-left` or `top-right`. (WebGL only)\n * @property {SizeExpression} [stroke-pattern-size] Stroke pattern image size in pixel. Can be used together with `stroke-pattern-offset` to define the\n * sub-rectangle to use from the origin (sprite) fill pattern image. (WebGL only)\n * @property {NumberExpression} [stroke-pattern-spacing] Spacing between each pattern occurrence in pixels; 0 if undefined. (WebGL only)\n * @property {NumberExpression} [stroke-pattern-start-offset] Stroke pattern offset in pixels at the start of the line. (WebGL only)\n * @property {NumberExpression} [z-index] The zIndex of the style.\n */\n\n/**\n * Label style properties applied to all features. At a minimum, a `text-value` must be provided.\n * Note: text style is currently not supported in WebGL layers\n *\n * @typedef {Object} FlatText\n * @property {StringExpression} [text-value] Text content (with `\\n` for line breaks).\n * @property {StringExpression} [text-font='10px sans-serif'] Font style as [CSS `font`](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/font) value.\n * @property {NumberExpression} [text-max-angle=Math.PI/4] When `text-placement` is set to `'line'`, allow a maximum angle between adjacent characters.\n * The expected value is in radians, and the default is 45\u00B0 (`Math.PI / 4`).\n * @property {NumberExpression} [text-offset-x=0] Horizontal text offset in pixels. A positive will shift the text right.\n * @property {NumberExpression} [text-offset-y=0] Vertical text offset in pixels. A positive will shift the text down.\n * @property {BooleanExpression} [text-overflow=false] For polygon labels or when `placement` is set to `'line'`, allow text to exceed\n * the width of the polygon at the label position or the length of the path that it follows.\n * @property {StringExpression} [text-placement='point'] Text placement.\n * @property {NumberExpression} [text-repeat] Repeat interval in pixels. When set, the text will be repeated at this interval. Only available when\n * `text-placement` is set to `'line'`. Overrides `text-align`.\n * @property {SizeExpression} [text-scale] Scale.\n * @property {BooleanExpression} [text-rotate-with-view=false] Whether to rotate the text with the view.\n * @property {NumberExpression} [text-rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {StringExpression} [text-align] Text alignment. Possible values: `'left'`, `'right'`, `'center'`, `'end'` or `'start'`.\n * Default is `'center'` for `'text-placement': 'point'`. For `'text-placement': 'line'`, the default is to let the renderer choose a\n * placement where `text-max-angle` is not exceeded.\n * @property {StringExpression} [text-justify] Text justification within the text box.\n * If not set, text is justified towards the `textAlign` anchor.\n * Otherwise, use options `'left'`, `'center'`, or `'right'` to justify the text within the text box.\n * **Note:** `text-justify` is ignored for immediate rendering and also for `'text-placement': 'line'`.\n * @property {StringExpression} [text-baseline='middle'] Text base line. Possible values: `'bottom'`, `'top'`, `'middle'`, `'alphabetic'`,\n * `'hanging'`, `'ideographic'`.\n * @property {NumberArrayExpression} [text-padding=[0, 0, 0, 0]] Padding in pixels around the text for decluttering and background. The order of\n * values in the array is `[top, right, bottom, left]`.\n * @property {ColorExpression} [text-fill-color] The fill color. `'none'` means no fill and no hit detection.\n * @property {ColorExpression} [text-background-fill-color] The fill color. `'none'` means no fill and no hit detection.\n * @property {ColorExpression} [text-stroke-color] The stroke color.\n * @property {StringExpression} [text-stroke-line-cap='round'] Line cap style: `butt`, `round`, or `square`.\n * @property {StringExpression} [text-stroke-line-join='round'] Line join style: `bevel`, `round`, or `miter`.\n * @property {NumberArrayExpression} [text-stroke-line-dash] Line dash pattern.\n * @property {NumberExpression} [text-stroke-line-dash-offset=0] Line dash offset.\n * @property {NumberExpression} [text-stroke-miter-limit=10] Miter limit.\n * @property {NumberExpression} [text-stroke-width] Stroke pixel width.\n * @property {ColorExpression} [text-background-stroke-color] The stroke color.\n * @property {StringExpression} [text-background-stroke-line-cap='round'] Line cap style: `butt`, `round`, or `square`.\n * @property {StringExpression} [text-background-stroke-line-join='round'] Line join style: `bevel`, `round`, or `miter`.\n * @property {NumberArrayExpression} [text-background-stroke-line-dash] Line dash pattern.\n * @property {NumberExpression} [text-background-stroke-line-dash-offset=0] Line dash offset.\n * @property {NumberExpression} [text-background-stroke-miter-limit=10] Miter limit.\n * @property {NumberExpression} [text-background-stroke-width] Stroke pixel width.\n * @property {import(\"./Style.js\").DeclutterMode} [text-declutter-mode] Declutter mode\n * @property {NumberExpression} [z-index] The zIndex of the style.\n */\n\n/**\n * Icon style properties applied to point features. `icon-src` must be provided to render\n * points with an icon.\n *\n * @typedef {Object} FlatIcon\n * @property {string} [icon-src] Image source URI.\n * @property {NumberArrayExpression} [icon-anchor=[0.5, 0.5]] Anchor. Default value is the icon center.\n * @property {import(\"./Icon.js\").IconOrigin} [icon-anchor-origin='top-left'] Origin of the anchor: `bottom-left`, `bottom-right`,\n * `top-left` or `top-right`.\n * @property {import(\"./Icon.js\").IconAnchorUnits} [icon-anchor-x-units='fraction'] Units in which the anchor x value is\n * specified. A value of `'fraction'` indicates the x value is a fraction of the icon. A value of `'pixels'` indicates\n * the x value in pixels.\n * @property {import(\"./Icon.js\").IconAnchorUnits} [icon-anchor-y-units='fraction'] Units in which the anchor y value is\n * specified. A value of `'fraction'` indicates the y value is a fraction of the icon. A value of `'pixels'` indicates\n * the y value in pixels.\n * @property {ColorExpression} [icon-color] Color to tint the icon. If not specified,\n * the icon will be left as is.\n * @property {null|string} [icon-cross-origin] The `crossOrigin` attribute for loaded images. Note that you must provide a\n * `icon-cross-origin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {SizeExpression} [icon-offset=[0, 0]] Offset, which, together with the size and the offset origin, define the\n * sub-rectangle to use from the original icon image.\n * @property {NumberArrayExpression} [icon-displacement=[0,0]] Displacement of the icon.\n * @property {import(\"./Icon.js\").IconOrigin} [icon-offset-origin='top-left'] Origin of the offset: `bottom-left`, `bottom-right`,\n * `top-left` or `top-right`.\n * @property {NumberExpression} [icon-opacity=1] Opacity of the icon.\n * @property {SizeExpression} [icon-scale=1] Scale.\n * @property {NumberExpression} [icon-width] Width of the icon. If not specified, the actual image width will be used. Cannot be combined\n * with `scale`. (Expressions only in WebGL)\n * @property {NumberExpression} [icon-height] Height of the icon. If not specified, the actual image height will be used. Cannot be combined\n * with `scale`. (Expressions only in WebGL)\n * @property {NumberExpression} [icon-rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {BooleanExpression} [icon-rotate-with-view=false] Whether to rotate the icon with the view. (Expressions only supported in Canvas)\n * @property {SizeExpression} [icon-size] Icon size in pixel. Can be used together with `icon-offset` to define the\n * sub-rectangle to use from the origin (sprite) icon image. (Expressions only in WebGL)\n * @property {import(\"./Style.js\").DeclutterMode} [icon-declutter-mode] Declutter mode (Canvas only)\n * @property {NumberExpression} [z-index] The zIndex of the style. (Canvas only)\n */\n\n/**\n * Regular shape style properties for rendering point features. At least `shape-points` must be provided.\n *\n * @typedef {Object} FlatShape\n * @property {NumberExpression} [shape-points] Number of points for stars and regular polygons. In case of a polygon, the number of points\n * is the number of sides. (Expressions only in WebGL)\n * @property {ColorExpression} [shape-fill-color] The fill color. `'none'` means no fill and no hit detection.\n * @property {ColorExpression} [shape-stroke-color] The stroke color.\n * @property {NumberExpression} [shape-stroke-width] Stroke pixel width.\n * @property {StringExpression} [shape-stroke-line-cap='round'] Line cap style: `butt`, `round`, or `square`. (Canvas only)\n * @property {StringExpression} [shape-stroke-line-join='round'] Line join style: `bevel`, `round`, or `miter`. (Canvas only)\n * @property {NumberArrayExpression} [shape-stroke-line-dash] Line dash pattern. (Canvas only)\n * @property {NumberExpression} [shape-stroke-line-dash-offset=0] Line dash offset. (Canvas only)\n * @property {NumberExpression} [shape-stroke-miter-limit=10] Miter limit. (Canvas only)\n * @property {NumberExpression} [shape-radius] Radius of a regular polygon. (Expressions only in WebGL)\n * @property {NumberExpression} [shape-radius2] Second radius to make a star instead of a regular polygon. (Expressions only in WebGL)\n * @property {NumberExpression} [shape-angle=0] Shape's angle in radians. A value of 0 will have one of the shape's point facing up. (Expressions only in WebGL)\n * @property {NumberArrayExpression} [shape-displacement=[0,0]] Displacement of the shape\n * @property {NumberExpression} [shape-opacity] Shape opacity. (WebGL only)\n * @property {NumberExpression} [shape-rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {BooleanExpression} [shape-rotate-with-view=false] Whether to rotate the shape with the view. (Expression only supported in Canvas)\n * @property {SizeExpression} [shape-scale=1] Scale. Unless two-dimensional scaling is required a better\n * result may be obtained with appropriate settings for `shape-radius` and `shape-radius2`.\n * @property {import(\"./Style.js\").DeclutterMode} [shape-declutter-mode] Declutter mode. (Canvas only)\n * @property {NumberExpression} [z-index] The zIndex of the style. (Canvas only)\n */\n\n/**\n * Circle style properties for rendering point features. At least `circle-radius` must be provided.\n *\n * @typedef {Object} FlatCircle\n * @property {NumberExpression} [circle-radius] Circle radius.\n * @property {ColorExpression} [circle-fill-color] The fill color. `'none'` means no fill and no hit detection.\n * @property {ColorExpression} [circle-stroke-color] The stroke color.\n * @property {NumberExpression} [circle-stroke-width] Stroke pixel width.\n * @property {StringExpression} [circle-stroke-line-cap='round'] Line cap style: `butt`, `round`, or `square`. (Canvas only)\n * @property {StringExpression} [circle-stroke-line-join='round'] Line join style: `bevel`, `round`, or `miter`. (Canvas only)\n * @property {NumberArrayExpression} [circle-stroke-line-dash] Line dash pattern. (Canvas only)\n * @property {NumberExpression} [circle-stroke-line-dash-offset=0] Line dash offset. (Canvas only)\n * @property {NumberExpression} [circle-stroke-miter-limit=10] Miter limit. (Canvas only)\n * @property {NumberArrayExpression} [circle-displacement=[0,0]] displacement\n * @property {SizeExpression} [circle-scale=1] Scale. A two-dimensional scale will produce an ellipse.\n * Unless two-dimensional scaling is required a better result may be obtained with an appropriate setting for `circle-radius`.\n * @property {NumberExpression} [circle-opacity] Circle opacity. (WebGL only)\n * @property {NumberExpression} [circle-rotation=0] Rotation in radians\n * (positive rotation clockwise, meaningful only when used in conjunction with a two-dimensional scale).\n * @property {BooleanExpression} [circle-rotate-with-view=false] Whether to rotate the shape with the view (Expression only supported in Canvas)\n * (meaningful only when used in conjunction with a two-dimensional scale).\n * @property {import(\"./Style.js\").DeclutterMode} [circle-declutter-mode] Declutter mode (Canvas only)\n * @property {NumberExpression} [z-index] The zIndex of the style. (Canvas only)\n */\n\n/**\n * These default style properties are applied when no other style is given.\n *\n * @typedef {Object} DefaultStyle\n * @property {string} fill-color `'rgba(255,255,255,0.4)'`\n * @property {string} stroke-color `'#3399CC'`\n * @property {number} stroke-width `1.25`\n * @property {number} circle-radius `5`\n * @property {string} circle-fill-color `'rgba(255,255,255,0.4)'`\n * @property {number} circle-stroke-width `1.25`\n * @property {string} circle-stroke-color `'#3399CC'`\n */\n\n/**\n * @return {DefaultStyle} The default flat style.\n */\nexport function createDefaultStyle() {\n return {\n 'fill-color': 'rgba(255,255,255,0.4)',\n 'stroke-color': '#3399CC',\n 'stroke-width': 1.25,\n 'circle-radius': 5,\n 'circle-fill-color': 'rgba(255,255,255,0.4)',\n 'circle-stroke-width': 1.25,\n 'circle-stroke-color': '#3399CC',\n };\n}\n\n/**\n * A rule is used to conditionally apply a style. If the rule's filter evaluates to true,\n * the style will be applied.\n *\n * @typedef {Object} Rule\n * @property {FlatStyle|Array<FlatStyle>} style The style to be applied if the filter matches.\n * @property {import(\"../expr/expression.js\").EncodedExpression} [filter] The filter used\n * to determine if a style applies. If no filter is included, the rule always applies\n * (unless it is an else rule).\n * @property {boolean} [else] If true, the rule applies only if no other previous rule applies.\n * If the else rule also has a filter, the rule will not apply if the filter does not match.\n */\n\n/**\n * Style variables are provided as an object. The variables can be read in a {@link import(\"../expr/expression.js\").ExpressionValue style expression}\n * using the `['var', 'varName']` operator.\n * Each variable must hold a literal value (not an expression).\n * @typedef {Object<string, number|Array<number>|string|boolean>} StyleVariables\n */\n", "/**\n * Utilities for filling WebGL buffers\n * @module ol/render/webgl/bufferUtil\n */\nimport earcut from 'earcut';\nimport {angleBetween} from '../../coordinate.js';\nimport {apply as applyTransform} from '../../transform.js';\n\nexport const LINESTRING_ANGLE_COSINE_CUTOFF = 0.985;\n\n/** @type {Array<number>} */\nconst tmpArray_ = [];\n\n/**\n * An object holding positions both in an index and a vertex buffer.\n * @typedef {Object} BufferPositions\n * @property {number} vertexAttributesPosition Position in the vertex buffer\n * @property {number} instanceAttributesPosition Position in the vertex buffer\n * @property {number} indicesPosition Position in the index buffer\n */\nconst bufferPositions_ = {\n vertexAttributesPosition: 0,\n instanceAttributesPosition: 0,\n indicesPosition: 0,\n};\n\n/**\n * Pushes a quad (two triangles) based on a point geometry\n * @param {Float32Array} instructions Array of render instructions for points.\n * @param {number} elementIndex Index from which render instructions will be read.\n * @param {Float32Array} instanceAttributesBuffer Buffer in the form of a typed array.\n * @param {number} customAttributesSize Amount of custom attributes for each element.\n * @param {BufferPositions} [bufferPositions] Buffer write positions; if not specified, positions will be set at 0.\n * @return {BufferPositions} New buffer positions where to write next\n * @property {number} vertexAttributesPosition New position in the vertex buffer where future writes should start.\n * @property {number} indicesPosition New position in the index buffer where future writes should start.\n * @private\n */\nexport function writePointFeatureToBuffers(\n instructions,\n elementIndex,\n instanceAttributesBuffer,\n customAttributesSize,\n bufferPositions,\n) {\n const x = instructions[elementIndex++];\n const y = instructions[elementIndex++];\n\n // read custom numerical attributes on the feature\n const customAttrs = tmpArray_;\n customAttrs.length = customAttributesSize;\n for (let i = 0; i < customAttrs.length; i++) {\n customAttrs[i] = instructions[elementIndex + i];\n }\n\n let instPos = bufferPositions\n ? bufferPositions.instanceAttributesPosition\n : 0;\n\n instanceAttributesBuffer[instPos++] = x;\n instanceAttributesBuffer[instPos++] = y;\n if (customAttrs.length) {\n instanceAttributesBuffer.set(customAttrs, instPos);\n instPos += customAttrs.length;\n }\n\n bufferPositions_.instanceAttributesPosition = instPos;\n return bufferPositions_;\n}\n\n/**\n * Pushes a single quad to form a line segment; also includes a computation for the join angles with previous and next\n * segment, in order to be able to offset the vertices correctly in the shader.\n * Join angles are between 0 and 2PI.\n * This also computes the length of the current segment and the sum of the join angle tangents in order\n * to store this information on each subsequent segment along the line. This is necessary to correctly render dashes\n * and symbols along the line.\n *\n * pB (before) pA (after)\n * X negative X\n * \\ offset /\n * \\ /\n * \\ join join /\n * \\ angle 0 angle 1 /\n * \\\u2190--- \u2190---/ positive\n * \\ \u2190-- \u2190-- / offset\n * \\ \u2191 \u2193 /\n * X\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500X\n * p0 p1\n *\n * @param {Float32Array} instructions Array of render instructions for lines.s\n * @param {number} segmentStartIndex Index of the segment start point from which render instructions will be read.\n * @param {number} segmentEndIndex Index of the segment end point from which render instructions will be read.\n * @param {number|null} beforeSegmentIndex Index of the point right before the segment (null if none, e.g this is a line start)\n * @param {number|null} afterSegmentIndex Index of the point right after the segment (null if none, e.g this is a line end)\n * @param {Array<number>} instanceAttributesArray Array containing instance attributes.\n * @param {Array<number>} customAttributes Array of custom attributes value\n * @param {import('../../transform.js').Transform} toWorldTransform Transform matrix used to obtain world coordinates from instructions\n * @param {number} currentLength Cumulated length of segments processed so far\n * @param {number} currentAngleTangentSum Cumulated tangents of the join angles processed so far\n * @return {{length: number, angle: number}} Cumulated length with the newly processed segment (in world units), new sum of the join angle tangents\n * @private\n */\nexport function writeLineSegmentToBuffers(\n instructions,\n segmentStartIndex,\n segmentEndIndex,\n beforeSegmentIndex,\n afterSegmentIndex,\n instanceAttributesArray,\n customAttributes,\n toWorldTransform,\n currentLength,\n currentAngleTangentSum,\n) {\n // The segment is composed of two positions called P0[x0, y0] and P1[x1, y1]\n // Depending on whether there are points before and after the segment, its final shape\n // will be different\n const p0 = [\n instructions[segmentStartIndex],\n instructions[segmentStartIndex + 1],\n ];\n const p1 = [instructions[segmentEndIndex], instructions[segmentEndIndex + 1]];\n\n const m0 = instructions[segmentStartIndex + 2];\n const m1 = instructions[segmentEndIndex + 2];\n\n // to compute join angles we need to reproject coordinates back in world units\n const p0world = applyTransform(toWorldTransform, [...p0]);\n const p1world = applyTransform(toWorldTransform, [...p1]);\n\n // a negative angle indicates a line cap\n let angle0 = -1;\n let angle1 = -1;\n let newAngleTangentSum = currentAngleTangentSum;\n\n const joinBefore = beforeSegmentIndex !== null;\n const joinAfter = afterSegmentIndex !== null;\n\n // add vertices and adapt offsets for P0 in case of join\n if (joinBefore) {\n // B for before\n const pB = [\n instructions[beforeSegmentIndex],\n instructions[beforeSegmentIndex + 1],\n ];\n const pBworld = applyTransform(toWorldTransform, [...pB]);\n angle0 = angleBetween(p0world, p1world, pBworld);\n\n // only add to the sum if the angle isn't too close to 0 or 2PI\n if (Math.cos(angle0) <= LINESTRING_ANGLE_COSINE_CUTOFF) {\n newAngleTangentSum += Math.tan((angle0 - Math.PI) / 2);\n }\n }\n // adapt offsets for P1 in case of join; add to angle sum\n if (joinAfter) {\n // A for after\n const pA = [\n instructions[afterSegmentIndex],\n instructions[afterSegmentIndex + 1],\n ];\n const pAworld = applyTransform(toWorldTransform, [...pA]);\n angle1 = angleBetween(p1world, p0world, pAworld);\n\n // only add to the sum if the angle isn't too close to 0 or 2PI\n if (Math.cos(angle1) <= LINESTRING_ANGLE_COSINE_CUTOFF) {\n newAngleTangentSum += Math.tan((Math.PI - angle1) / 2);\n }\n }\n\n const maxPrecision = Math.pow(2, 24);\n const distanceLow = currentLength % maxPrecision;\n const distanceHigh = Math.floor(currentLength / maxPrecision) * maxPrecision;\n\n instanceAttributesArray.push(\n p0[0],\n p0[1],\n m0,\n p1[0],\n p1[1],\n m1,\n angle0,\n angle1,\n distanceLow,\n distanceHigh,\n currentAngleTangentSum,\n );\n instanceAttributesArray.push(...customAttributes);\n\n return {\n length:\n currentLength +\n Math.sqrt(\n (p1world[0] - p0world[0]) * (p1world[0] - p0world[0]) +\n (p1world[1] - p0world[1]) * (p1world[1] - p0world[1]),\n ),\n angle: newAngleTangentSum,\n };\n}\n\n/**\n * Pushes several triangles to form a polygon, including holes\n * @param {Float32Array} instructions Array of render instructions for lines.\n * @param {number} polygonStartIndex Index of the polygon start point from which render instructions will be read.\n * @param {Array<number>} vertexArray Array containing vertices.\n * @param {Array<number>} indexArray Array containing indices.\n * @param {number} customAttributesSize Amount of custom attributes for each element.\n * @return {number} Next polygon instructions index\n * @private\n */\nexport function writePolygonTrianglesToBuffers(\n instructions,\n polygonStartIndex,\n vertexArray,\n indexArray,\n customAttributesSize,\n) {\n const instructionsPerVertex = 2; // x, y\n const attributesPerVertex = 2 + customAttributesSize;\n let instructionsIndex = polygonStartIndex;\n const customAttributes = instructions.slice(\n instructionsIndex,\n instructionsIndex + customAttributesSize,\n );\n instructionsIndex += customAttributesSize;\n const ringsCount = instructions[instructionsIndex++];\n let verticesCount = 0;\n const holes = new Array(ringsCount - 1);\n for (let i = 0; i < ringsCount; i++) {\n verticesCount += instructions[instructionsIndex++];\n if (i < ringsCount - 1) {\n holes[i] = verticesCount;\n }\n }\n const flatCoords = instructions.slice(\n instructionsIndex,\n instructionsIndex + verticesCount * instructionsPerVertex,\n );\n\n // pushing to vertices and indices!! this is where the magic happens\n const result = earcut(flatCoords, holes, instructionsPerVertex);\n for (let i = 0; i < result.length; i++) {\n indexArray.push(result[i] + vertexArray.length / attributesPerVertex);\n }\n for (let i = 0; i < flatCoords.length; i += 2) {\n vertexArray.push(flatCoords[i], flatCoords[i + 1], ...customAttributes);\n }\n\n return instructionsIndex + verticesCount * instructionsPerVertex;\n}\n", "/**\n * Utilities for compiling expressions and turning them into WebGL concepts\n * @module ol/render/webgl/compileUtil\n */\n\nimport {asArray} from '../../color.js';\nimport {\n ColorType,\n NumberArrayType,\n SizeType,\n newParsingContext,\n} from '../../expr/expression.js';\nimport {\n buildExpression,\n getStringNumberEquivalent,\n uniformNameForVariable,\n} from '../../expr/gpu.js';\n\n/**\n * Recursively parses a style expression and outputs a GLSL-compatible string. Takes in a compilation context that\n * will be read and modified during the parsing operation.\n * @param {import(\"../../expr/gpu.js\").CompilationContext} compilationContext Compilation context\n * @param {import(\"../../expr/expression.js\").EncodedExpression} value Value\n * @param {number} [expectedType] Expected final type (can be several types combined)\n * @return {string} GLSL-compatible output\n */\nexport function expressionToGlsl(compilationContext, value, expectedType) {\n const parsingContext = newParsingContext();\n return buildExpression(\n value,\n expectedType,\n parsingContext,\n compilationContext,\n );\n}\n\n/**\n * Packs all components of a color into a two-floats array\n * @param {import(\"../../color.js\").Color|string} color Color as array of numbers or string\n * @return {Array<number>} Vec2 array containing the color in compressed form\n */\nexport function packColor(color) {\n const array = asArray(color);\n const r = array[0] * 256;\n const g = array[1];\n const b = array[2] * 256;\n const a = Math.round(array[3] * 255);\n return [r + g, b + a];\n}\n\n/**\n * Unpacks a color from a packed color in two-floats array form\n * NOTE: this is only used for testing purposes\n * @param {Array<number>} packedColor Packed color generated by the `packColor` function\n * @return {Array<number>} Resulting unpacked color in array form with components in the range [0, 1]\n */\nexport function unpackColor(packedColor) {\n return [\n Math.min(Math.floor(packedColor[0] / 256.0) / 255.0, 1),\n Math.min((packedColor[0] % 256.0) / 255.0, 1),\n Math.min(Math.floor(packedColor[1] / 256.0) / 255.0, 1),\n Math.min((packedColor[1] % 256.0) / 255.0, 1),\n ];\n}\n\n/**\n * Equivalent of `unpackColor()` in GLSL\n * @type {string}\n */\nexport const UNPACK_COLOR_FN = `vec4 unpackColor(vec2 packedColor) {\n return vec4(\n min(floor(packedColor[0] / 256.0) / 255.0, 1.0),\n min(mod(packedColor[0], 256.0) / 255.0, 1.0),\n min(floor(packedColor[1] / 256.0) / 255.0, 1.0),\n min(mod(packedColor[1], 256.0) / 255.0, 1.0)\n );\n}`;\n\n/**\n * @param {number} type Value type\n * @return {1|2|3|4} The amount of components for this value\n */\nexport function getGlslSizeFromType(type) {\n if (type === ColorType || type === SizeType) {\n return 2;\n }\n if (type === NumberArrayType) {\n return 4;\n }\n return 1;\n}\n\n/**\n * @param {number} type Value type\n * @return {'float'|'vec2'|'vec3'|'vec4'} The corresponding GLSL type for this value\n */\nexport function getGlslTypeFromType(type) {\n const size = getGlslSizeFromType(type);\n if (size > 1) {\n return /** @type {'vec2'|'vec3'|'vec4'} */ (`vec${size}`);\n }\n return 'float';\n}\n\n/**\n * Applies the properties and variables collected in a compilation context to a ShaderBuilder instance:\n * properties will show up as attributes in shaders, and variables will show up as uniforms.\n * @param {import(\"./ShaderBuilder.js\").ShaderBuilder} builder Shader builder\n * @param {import(\"../../expr/gpu.js\").CompilationContext} context Compilation context\n */\nexport function applyContextToBuilder(builder, context) {\n // define one uniform per variable\n for (const varName in context.variables) {\n const variable = context.variables[varName];\n const uniformName = uniformNameForVariable(variable.name);\n let glslType = getGlslTypeFromType(variable.type);\n if (variable.type === ColorType) {\n // we're not packing colors when they're passed as uniforms\n glslType = 'vec4';\n }\n builder.addUniform(uniformName, glslType);\n }\n\n // for each feature attribute used in the fragment shader, define a varying that will be used to pass data\n // from the vertex to the fragment shader, as well as an attribute in the vertex shader (if not already present)\n for (const propName in context.properties) {\n const property = context.properties[propName];\n const glslType = getGlslTypeFromType(property.type);\n const attributeName = `a_prop_${property.name}`;\n if (property.type === ColorType) {\n builder.addAttribute(\n attributeName,\n glslType,\n `unpackColor(${attributeName})`,\n 'vec4',\n );\n } else {\n builder.addAttribute(attributeName, glslType);\n }\n }\n\n // add functions that were collected in the compilation contexts\n for (const functionName in context.functions) {\n builder.addVertexShaderFunction(context.functions[functionName]);\n builder.addFragmentShaderFunction(context.functions[functionName]);\n }\n}\n\n/**\n * Generates a set of uniforms from variables collected in a compilation context,\n * to be fed to a WebGLHelper instance\n * @param {import(\"../../expr/gpu.js\").CompilationContext} context Compilation context\n * @param {import('../../style/flat.js').StyleVariables} [variables] Style variables.\n * @return {Object<string,import(\"../../webgl/Helper\").UniformValue>} Uniforms\n */\nexport function generateUniformsFromContext(context, variables) {\n /** @type {Object<string,import(\"../../webgl/Helper\").UniformValue>} */\n const uniforms = {};\n\n // define one uniform per variable\n for (const varName in context.variables) {\n const variable = context.variables[varName];\n const uniformName = uniformNameForVariable(variable.name);\n\n uniforms[uniformName] = () => {\n const value = variables[variable.name];\n if (typeof value === 'number') {\n return value;\n }\n if (typeof value === 'boolean') {\n return value ? 1 : 0;\n }\n if (variable.type === ColorType) {\n const color = [...asArray(value || '#eee')];\n color[0] /= 255;\n color[1] /= 255;\n color[2] /= 255;\n color[3] ??= 1;\n return color;\n }\n if (typeof value === 'string') {\n return getStringNumberEquivalent(value);\n }\n return value;\n };\n }\n\n return uniforms;\n}\n\n/**\n * Generates a set of attributes from properties collected in a compilation context,\n * to be fed to a WebGLHelper instance\n * @param {import(\"../../expr/gpu.js\").CompilationContext} context Compilation context\n * @return {import('./VectorStyleRenderer.js').AttributeDefinitions} Attributes\n */\nexport function generateAttributesFromContext(context) {\n /**\n * @type {import('./VectorStyleRenderer.js').AttributeDefinitions}\n */\n const attributes = {};\n\n // Define attributes with their callback for each property used in the vertex shader\n for (const propName in context.properties) {\n const property = context.properties[propName];\n const callback = (feature) => {\n const value = feature.get(property.name);\n if (property.type === ColorType) {\n return packColor([...asArray(value || '#eee')]);\n }\n if (typeof value === 'string') {\n return getStringNumberEquivalent(value);\n }\n if (typeof value === 'boolean') {\n return value ? 1 : 0;\n }\n return value;\n };\n\n attributes[`prop_${property.name}`] = {\n size: getGlslSizeFromType(property.type),\n callback,\n };\n }\n return attributes;\n}\n", "/**\n * Class for generating shaders from literal style objects\n * @module ol/render/webgl/ShaderBuilder\n */\nimport {colorToGlsl, numberToGlsl, stringToGlsl} from '../../expr/gpu.js';\nimport {createDefaultStyle} from '../../style/flat.js';\nimport {LINESTRING_ANGLE_COSINE_CUTOFF} from './bufferUtil.js';\nimport {UNPACK_COLOR_FN} from './compileUtil.js';\n\nexport const COMMON_HEADER = `#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_screenToWorldMatrix;\nuniform vec2 u_viewportSizePx;\nuniform float u_pixelRatio;\nuniform float u_globalAlpha;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\nuniform float u_rotation;\nuniform vec4 u_renderExtent;\nuniform vec2 u_patternOrigin;\nuniform float u_depth;\nuniform mediump int u_hitDetection;\n\nconst float PI = 3.141592653589793238;\nconst float TWO_PI = 2.0 * PI;\nfloat currentLineMetric = 0.; // an actual value will be used in the stroke shaders\n\n${UNPACK_COLOR_FN}\n`;\n\nconst DEFAULT_STYLE = createDefaultStyle();\n\n/**\n * @typedef {Object} AttributeDescription\n * @property {string} name Attribute name, as will be declared in the header of the vertex shader (including a_)\n * @property {string} type Attribute GLSL type, either `float`, `vec2`, `vec4`...\n * @property {string} varyingName Varying name, as will be declared in the header of both shaders (including v_)\n * @property {string} varyingType Varying type, either `float`, `vec2`, `vec4`...\n * @property {string} varyingExpression GLSL expression to assign to the varying in the vertex shader (e.g. `unpackColor(a_myAttr)`)\n */\n\n/**\n * @typedef {Object} UniformDescription\n * @property {string} name Uniform name, as will be declared in the header of the vertex shader (including u_)\n * @property {string} type Uniform GLSL type, either `float`, `vec2`, `vec4`...\n */\n\n/**\n * @classdesc\n * This class implements a classic builder pattern for generating many different types of shaders.\n * Methods can be chained, e. g.:\n *\n * ```js\n * const shader = new ShaderBuilder()\n * .addAttribute('a_width', 'float')\n * .addUniform('u_time', 'float)\n * .setColorExpression('...')\n * .setSymbolSizeExpression('...')\n * .getSymbolFragmentShader();\n * ```\n *\n * A note on [alpha premultiplication](https://en.wikipedia.org/wiki/Alpha_compositing#Straight_versus_premultiplied):\n * The ShaderBuilder class expects all colors to **not having been alpha-premultiplied!** This is because alpha\n * premultiplication is done at the end of each fragment shader.\n */\nexport class ShaderBuilder {\n constructor() {\n /**\n * Uniforms; these will be declared in the header (should include the type).\n * @type {Array<UniformDescription>}\n * @private\n */\n this.uniforms_ = [];\n\n /**\n * Attributes; these will be declared in the header (should include the type).\n * @type {Array<AttributeDescription>}\n * @private\n */\n this.attributes_ = [];\n\n /**\n * @type {boolean}\n * @private\n */\n this.hasSymbol_ = false;\n\n /**\n * @type {string}\n * @private\n */\n this.symbolSizeExpression_ = `vec2(${numberToGlsl(\n DEFAULT_STYLE['circle-radius'],\n )} + ${numberToGlsl(DEFAULT_STYLE['circle-stroke-width'] * 0.5)})`;\n\n /**\n * @type {string}\n * @private\n */\n this.symbolRotationExpression_ = '0.0';\n\n /**\n * @type {string}\n * @private\n */\n this.symbolOffsetExpression_ = 'vec2(0.0)';\n\n /**\n * @type {string}\n * @private\n */\n this.symbolColorExpression_ = colorToGlsl(\n /** @type {string} */ (DEFAULT_STYLE['circle-fill-color']),\n );\n\n /**\n * @type {string}\n * @private\n */\n this.texCoordExpression_ = 'vec4(0.0, 0.0, 1.0, 1.0)';\n\n /**\n * @type {string}\n * @private\n */\n this.discardExpression_ = 'false';\n\n /**\n * @type {boolean}\n * @private\n */\n this.symbolRotateWithView_ = false;\n\n /**\n * @type {boolean}\n * @private\n */\n this.hasStroke_ = false;\n\n /**\n * @type {string}\n * @private\n */\n this.strokeWidthExpression_ = numberToGlsl(DEFAULT_STYLE['stroke-width']);\n\n /**\n * @type {string}\n * @private\n */\n this.strokeColorExpression_ = colorToGlsl(\n /** @type {string} */ (DEFAULT_STYLE['stroke-color']),\n );\n\n /**\n * @private\n */\n this.strokeOffsetExpression_ = '0.';\n\n /**\n * @private\n */\n this.strokeCapExpression_ = stringToGlsl('round');\n\n /**\n * @private\n */\n this.strokeJoinExpression_ = stringToGlsl('round');\n\n /**\n * @private\n */\n this.strokeMiterLimitExpression_ = '10.';\n\n /**\n * @private\n */\n this.strokeDistanceFieldExpression_ = '-1000.';\n\n /**\n * @private\n * @type {string}\n */\n this.strokePatternLengthExpression_ = null;\n\n /**\n * @type {boolean}\n * @private\n */\n this.hasFill_ = false;\n\n /**\n * @type {string}\n * @private\n */\n this.fillColorExpression_ = colorToGlsl(\n /** @type {string} */ (DEFAULT_STYLE['fill-color']),\n );\n\n /**\n * @type {Array<string>}\n * @private\n */\n this.vertexShaderFunctions_ = [];\n\n /**\n * @type {Array<string>}\n * @private\n */\n this.fragmentShaderFunctions_ = [];\n }\n\n /**\n * Adds a uniform accessible in both fragment and vertex shaders.\n * The given name should include a type, such as `sampler2D u_texture`.\n * @param {string} name Uniform name, including the `u_` prefix\n * @param {'float'|'vec2'|'vec3'|'vec4'|'sampler2D'} type GLSL type\n * @return {ShaderBuilder} the builder object\n */\n addUniform(name, type) {\n this.uniforms_.push({\n name,\n type,\n });\n return this;\n }\n\n /**\n * Adds an attribute accessible in the vertex shader, read from the geometry buffer.\n * The given name should include a type, such as `vec2 a_position`.\n * Attributes will also be made available under the same name in fragment shaders.\n * @param {string} name Attribute name, including the `a_` prefix\n * @param {'float'|'vec2'|'vec3'|'vec4'} type GLSL type\n * @param {string} [varyingExpression] Expression which will be assigned to the varying in the vertex shader, and\n * passed on to the fragment shader.\n * @param {'float'|'vec2'|'vec3'|'vec4'} [varyingType] Type of the attribute after transformation;\n * e.g. `vec4` after unpacking color components\n * @return {ShaderBuilder} the builder object\n */\n addAttribute(name, type, varyingExpression, varyingType) {\n this.attributes_.push({\n name,\n type,\n varyingName: name.replace(/^a_/, 'v_'),\n varyingType: varyingType ?? type,\n varyingExpression: varyingExpression ?? name,\n });\n return this;\n }\n\n /**\n * Sets an expression to compute the size of the shape.\n * This expression can use all the uniforms and attributes available\n * in the vertex shader, and should evaluate to a `vec2` value.\n * @param {string} expression Size expression\n * @return {ShaderBuilder} the builder object\n */\n setSymbolSizeExpression(expression) {\n this.hasSymbol_ = true;\n this.symbolSizeExpression_ = expression;\n return this;\n }\n\n /**\n * @return {string} The current symbol size expression\n */\n getSymbolSizeExpression() {\n return this.symbolSizeExpression_;\n }\n\n /**\n * Sets an expression to compute the rotation of the shape.\n * This expression can use all the uniforms and attributes available\n * in the vertex shader, and should evaluate to a `float` value in radians.\n * @param {string} expression Size expression\n * @return {ShaderBuilder} the builder object\n */\n setSymbolRotationExpression(expression) {\n this.symbolRotationExpression_ = expression;\n return this;\n }\n\n /**\n * Sets an expression to compute the offset of the symbol from the point center.\n * This expression can use all the uniforms and attributes available\n * in the vertex shader, and should evaluate to a `vec2` value.\n * @param {string} expression Offset expression\n * @return {ShaderBuilder} the builder object\n */\n setSymbolOffsetExpression(expression) {\n this.symbolOffsetExpression_ = expression;\n return this;\n }\n\n /**\n * @return {string} The current symbol offset expression\n */\n getSymbolOffsetExpression() {\n return this.symbolOffsetExpression_;\n }\n\n /**\n * Sets an expression to compute the color of the shape.\n * This expression can use all the uniforms, varyings and attributes available\n * in the fragment shader, and should evaluate to a `vec4` value.\n * @param {string} expression Color expression\n * @return {ShaderBuilder} the builder object\n */\n setSymbolColorExpression(expression) {\n this.hasSymbol_ = true;\n this.symbolColorExpression_ = expression;\n return this;\n }\n\n /**\n * @return {string} The current symbol color expression\n */\n getSymbolColorExpression() {\n return this.symbolColorExpression_;\n }\n\n /**\n * Sets an expression to compute the texture coordinates of the vertices.\n * This expression can use all the uniforms and attributes available\n * in the vertex shader, and should evaluate to a `vec4` value.\n * @param {string} expression Texture coordinate expression\n * @return {ShaderBuilder} the builder object\n */\n setTextureCoordinateExpression(expression) {\n this.texCoordExpression_ = expression;\n return this;\n }\n\n /**\n * Sets an expression to determine whether a fragment (pixel) should be discarded,\n * i.e. not drawn at all.\n * This expression can use all the uniforms, varyings and attributes available\n * in the fragment shader, and should evaluate to a `bool` value (it will be\n * used in an `if` statement)\n * @param {string} expression Fragment discard expression\n * @return {ShaderBuilder} the builder object\n */\n setFragmentDiscardExpression(expression) {\n this.discardExpression_ = expression;\n return this;\n }\n\n /**\n * @return {string} The current fragment discard expression\n */\n getFragmentDiscardExpression() {\n return this.discardExpression_;\n }\n\n /**\n * Sets whether the symbols should rotate with the view or stay aligned with the map.\n * Note: will only be used for point geometry shaders.\n * @param {boolean} rotateWithView Rotate with view\n * @return {ShaderBuilder} the builder object\n */\n setSymbolRotateWithView(rotateWithView) {\n this.symbolRotateWithView_ = rotateWithView;\n return this;\n }\n\n /**\n * @param {string} expression Stroke width expression, returning value in pixels\n * @return {ShaderBuilder} the builder object\n */\n setStrokeWidthExpression(expression) {\n this.hasStroke_ = true;\n this.strokeWidthExpression_ = expression;\n return this;\n }\n\n /**\n * @param {string} expression Stroke color expression, evaluate to `vec4`: can rely on currentLengthPx and currentRadiusPx\n * @return {ShaderBuilder} the builder object\n */\n setStrokeColorExpression(expression) {\n this.hasStroke_ = true;\n this.strokeColorExpression_ = expression;\n return this;\n }\n\n /**\n * @return {string} The current stroke color expression\n */\n getStrokeColorExpression() {\n return this.strokeColorExpression_;\n }\n\n /**\n * @param {string} expression Stroke color expression, evaluate to `float`\n * @return {ShaderBuilder} the builder object\n */\n setStrokeOffsetExpression(expression) {\n this.strokeOffsetExpression_ = expression;\n return this;\n }\n\n /**\n * @param {string} expression Stroke line cap expression, evaluate to `float`\n * @return {ShaderBuilder} the builder object\n */\n setStrokeCapExpression(expression) {\n this.strokeCapExpression_ = expression;\n return this;\n }\n\n /**\n * @param {string} expression Stroke line join expression, evaluate to `float`\n * @return {ShaderBuilder} the builder object\n */\n setStrokeJoinExpression(expression) {\n this.strokeJoinExpression_ = expression;\n return this;\n }\n\n /**\n * @param {string} expression Stroke miter limit expression, evaluate to `float`\n * @return {ShaderBuilder} the builder object\n */\n setStrokeMiterLimitExpression(expression) {\n this.strokeMiterLimitExpression_ = expression;\n return this;\n }\n\n /**\n * @param {string} expression Stroke distance field expression, evaluate to `float`\n * This can override the default distance field; can rely on currentLengthPx and currentRadiusPx\n * @return {ShaderBuilder} the builder object\n */\n setStrokeDistanceFieldExpression(expression) {\n this.strokeDistanceFieldExpression_ = expression;\n return this;\n }\n\n /**\n * Defining a pattern length for a stroke lets us avoid having visual artifacts when\n * a linestring is very long and thus has very high \"distance\" attributes on its vertices.\n * If we apply a pattern or dash array to a stroke we know for certain that the full distance value\n * is not necessary and can be trimmed down using `mod(currentDistance, patternLength)`.\n * @param {string} expression Stroke expression that evaluates to a`float; value is expected to be\n * in pixels.\n * @return {ShaderBuilder} the builder object\n */\n setStrokePatternLengthExpression(expression) {\n this.strokePatternLengthExpression_ = expression;\n return this;\n }\n\n /**\n * @return {string} The current stroke pattern length expression.\n */\n getStrokePatternLengthExpression() {\n return this.strokePatternLengthExpression_;\n }\n\n /**\n * @param {string} expression Fill color expression, evaluate to `vec4`\n * @return {ShaderBuilder} the builder object\n */\n setFillColorExpression(expression) {\n this.hasFill_ = true;\n this.fillColorExpression_ = expression;\n return this;\n }\n\n /**\n * @return {string} The current fill color expression\n */\n getFillColorExpression() {\n return this.fillColorExpression_;\n }\n\n addVertexShaderFunction(code) {\n if (this.vertexShaderFunctions_.includes(code)) {\n return this;\n }\n this.vertexShaderFunctions_.push(code);\n return this;\n }\n addFragmentShaderFunction(code) {\n if (this.fragmentShaderFunctions_.includes(code)) {\n return this;\n }\n this.fragmentShaderFunctions_.push(code);\n return this;\n }\n\n /**\n * Generates a symbol vertex shader from the builder parameters\n * @return {string|null} The full shader as a string; null if no size or color specified\n */\n getSymbolVertexShader() {\n if (!this.hasSymbol_) {\n return null;\n }\n\n return `${COMMON_HEADER}\n${this.uniforms_.map((uniform) => `uniform ${uniform.type} ${uniform.name};`).join('\\n')}\nattribute vec2 a_position;\nattribute vec2 a_localPosition;\nattribute vec2 a_hitColor;\n\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\nvarying vec4 v_hitColor;\nvarying vec2 v_centerPx;\nvarying float v_angle;\nvarying vec2 v_quadSizePx;\n\n${this.attributes_\n .map(\n (attribute) => `attribute ${attribute.type} ${attribute.name};\nvarying ${attribute.varyingType} ${attribute.varyingName};`,\n )\n .join('\\n')}\n${this.vertexShaderFunctions_.join('\\n')}\nvec2 pxToScreen(vec2 coordPx) {\n vec2 scaled = coordPx / u_viewportSizePx / 0.5;\n return scaled;\n}\n\nvec2 screenToPx(vec2 coordScreen) {\n return (coordScreen * 0.5 + 0.5) * u_viewportSizePx;\n}\n\nvoid main(void) {\n v_quadSizePx = ${this.symbolSizeExpression_};\n vec2 halfSizePx = v_quadSizePx * 0.5;\n vec2 centerOffsetPx = ${this.symbolOffsetExpression_};\n vec2 offsetPx = centerOffsetPx + a_localPosition * halfSizePx * vec2(1., -1.);\n float angle = ${this.symbolRotationExpression_}${this.symbolRotateWithView_ ? ' + u_rotation' : ''};\n float c = cos(-angle);\n float s = sin(-angle);\n offsetPx = vec2(c * offsetPx.x - s * offsetPx.y, s * offsetPx.x + c * offsetPx.y);\n vec4 center = u_projectionMatrix * vec4(a_position, 0.0, 1.0);\n gl_Position = center + vec4(pxToScreen(offsetPx), u_depth, 0.);\n vec4 texCoord = ${this.texCoordExpression_};\n float u = mix(texCoord.s, texCoord.p, a_localPosition.x * 0.5 + 0.5);\n float v = mix(texCoord.t, texCoord.q, a_localPosition.y * 0.5 + 0.5);\n v_texCoord = vec2(u, v);\n v_hitColor = unpackColor(a_hitColor);\n v_angle = angle;\n c = cos(-v_angle);\n s = sin(-v_angle);\n centerOffsetPx = vec2(c * centerOffsetPx.x - s * centerOffsetPx.y, s * centerOffsetPx.x + c * centerOffsetPx.y);\n v_centerPx = screenToPx(center.xy) + centerOffsetPx;\n${this.attributes_\n .map(\n (attribute) =>\n ` ${attribute.varyingName} = ${attribute.varyingExpression};`,\n )\n .join('\\n')}\n}`;\n }\n\n /**\n * Generates a symbol fragment shader from the builder parameters\n * @return {string|null} The full shader as a string; null if no size or color specified\n */\n getSymbolFragmentShader() {\n if (!this.hasSymbol_) {\n return null;\n }\n\n return `${COMMON_HEADER}\n${this.uniforms_.map((uniform) => `uniform ${uniform.type} ${uniform.name};`).join('\\n')}\nvarying vec2 v_texCoord;\nvarying vec4 v_hitColor;\nvarying vec2 v_centerPx;\nvarying float v_angle;\nvarying vec2 v_quadSizePx;\n${this.attributes_\n .map(\n (attribute) => `varying ${attribute.varyingType} ${attribute.varyingName};`,\n )\n .join('\\n')}\n${this.fragmentShaderFunctions_.join('\\n')}\n\nvoid main(void) {\n${this.attributes_\n .map(\n (attribute) =>\n ` ${attribute.varyingType} ${attribute.name} = ${attribute.varyingName}; // assign to original attribute name`,\n )\n .join('\\n')}\n if (${this.discardExpression_}) { discard; }\n vec2 coordsPx = gl_FragCoord.xy / u_pixelRatio - v_centerPx; // relative to center\n float c = cos(v_angle);\n float s = sin(v_angle);\n coordsPx = vec2(c * coordsPx.x - s * coordsPx.y, s * coordsPx.x + c * coordsPx.y);\n gl_FragColor = ${this.symbolColorExpression_};\n gl_FragColor.rgb *= gl_FragColor.a;\n if (u_hitDetection > 0) {\n if (gl_FragColor.a < 0.05) { discard; };\n gl_FragColor = v_hitColor;\n }\n}`;\n }\n\n /**\n * Generates a stroke vertex shader from the builder parameters\n * @return {string|null} The full shader as a string; null if no size or color specified\n */\n getStrokeVertexShader() {\n if (!this.hasStroke_) {\n return null;\n }\n\n return `${COMMON_HEADER}\n${this.uniforms_.map((uniform) => `uniform ${uniform.type} ${uniform.name};`).join('\\n')}\nattribute vec2 a_segmentStart;\nattribute vec2 a_segmentEnd;\nattribute vec2 a_localPosition;\nattribute float a_measureStart;\nattribute float a_measureEnd;\nattribute float a_angleTangentSum;\nattribute float a_distanceLow;\nattribute float a_distanceHigh;\nattribute vec2 a_joinAngles;\nattribute vec2 a_hitColor;\n\nvarying vec2 v_segmentStartPx;\nvarying vec2 v_segmentEndPx;\nvarying float v_angleStart;\nvarying float v_angleEnd;\nvarying float v_width;\nvarying vec4 v_hitColor;\nvarying float v_distancePx;\nvarying float v_measureStart;\nvarying float v_measureEnd;\n\n${this.attributes_\n .map(\n (attribute) => `attribute ${attribute.type} ${attribute.name};\nvarying ${attribute.varyingType} ${attribute.varyingName};`,\n )\n .join('\\n')}\n${this.vertexShaderFunctions_.join('\\n')}\nvec2 worldToPx(vec2 worldPos) {\n vec4 screenPos = u_projectionMatrix * vec4(worldPos, 0.0, 1.0);\n return (0.5 * screenPos.xy + 0.5) * u_viewportSizePx;\n}\n\nvec4 pxToScreen(vec2 pxPos) {\n vec2 screenPos = 2.0 * pxPos / u_viewportSizePx - 1.0;\n return vec4(screenPos, u_depth, 1.0);\n}\n\nbool isCap(float joinAngle) {\n return joinAngle < -0.1;\n}\n\nvec2 getJoinOffsetDirection(vec2 normalPx, float joinAngle) {\n float halfAngle = joinAngle / 2.0;\n float c = cos(halfAngle);\n float s = sin(halfAngle);\n vec2 angleBisectorNormal = vec2(s * normalPx.x + c * normalPx.y, -c * normalPx.x + s * normalPx.y);\n float length = 1.0 / s;\n return angleBisectorNormal * length;\n}\n\nvec2 getOffsetPoint(vec2 point, vec2 normal, float joinAngle, float offsetPx) {\n // if on a cap or the join angle is too high, offset the line along the segment normal\n if (cos(joinAngle) > 0.998 || isCap(joinAngle)) {\n return point - normal * offsetPx;\n }\n // offset is applied along the inverted normal (positive offset goes \"right\" relative to line direction)\n return point - getJoinOffsetDirection(normal, joinAngle) * offsetPx;\n}\n\nvoid main(void) {\n v_angleStart = a_joinAngles.x;\n v_angleEnd = a_joinAngles.y;\n float startEndRatio = a_localPosition.x * 0.5 + 0.5;\n currentLineMetric = mix(a_measureStart, a_measureEnd, startEndRatio);\n // we're reading the fractional part while keeping the sign (so -4.12 gives -0.12, 3.45 gives 0.45)\n\n float lineWidth = ${this.strokeWidthExpression_};\n float lineOffsetPx = ${this.strokeOffsetExpression_};\n\n // compute segment start/end in px with offset\n vec2 segmentStartPx = worldToPx(a_segmentStart);\n vec2 segmentEndPx = worldToPx(a_segmentEnd);\n vec2 tangentPx = normalize(segmentEndPx - segmentStartPx);\n vec2 normalPx = vec2(-tangentPx.y, tangentPx.x);\n segmentStartPx = getOffsetPoint(segmentStartPx, normalPx, v_angleStart, lineOffsetPx),\n segmentEndPx = getOffsetPoint(segmentEndPx, normalPx, v_angleEnd, lineOffsetPx);\n\n // compute current vertex position\n float normalDir = -1. * a_localPosition.y;\n float tangentDir = -1. * a_localPosition.x;\n float angle = mix(v_angleStart, v_angleEnd, startEndRatio);\n vec2 joinDirection;\n vec2 positionPx = mix(segmentStartPx, segmentEndPx, startEndRatio);\n // if angle is too high, do not make a proper join\n if (cos(angle) > ${LINESTRING_ANGLE_COSINE_CUTOFF} || isCap(angle)) {\n joinDirection = normalPx * normalDir - tangentPx * tangentDir;\n } else {\n joinDirection = getJoinOffsetDirection(normalPx * normalDir, angle);\n }\n positionPx = positionPx + joinDirection * (lineWidth * 0.5 + 1.); // adding 1 pixel for antialiasing\n gl_Position = pxToScreen(positionPx);\n\n v_segmentStartPx = segmentStartPx;\n v_segmentEndPx = segmentEndPx;\n v_width = lineWidth;\n v_hitColor = unpackColor(a_hitColor);\n\n v_distancePx = a_distanceLow / u_resolution - (lineOffsetPx * a_angleTangentSum);\n float distanceHighPx = a_distanceHigh / u_resolution;\n ${\n this.strokePatternLengthExpression_ !== null\n ? `v_distancePx = mod(v_distancePx, ${this.strokePatternLengthExpression_});\n distanceHighPx = mod(distanceHighPx, ${this.strokePatternLengthExpression_});\n `\n : ''\n }v_distancePx += distanceHighPx;\n\n v_measureStart = a_measureStart;\n v_measureEnd = a_measureEnd;\n${this.attributes_\n .map(\n (attribute) =>\n ` ${attribute.varyingName} = ${attribute.varyingExpression};`,\n )\n .join('\\n')}\n}`;\n }\n\n /**\n * Generates a stroke fragment shader from the builder parameters\n *\n * @return {string|null} The full shader as a string; null if no size or color specified\n */\n getStrokeFragmentShader() {\n if (!this.hasStroke_) {\n return null;\n }\n\n return `${COMMON_HEADER}\n${this.uniforms_.map((uniform) => `uniform ${uniform.type} ${uniform.name};`).join('\\n')}\nvarying vec2 v_segmentStartPx;\nvarying vec2 v_segmentEndPx;\nvarying float v_angleStart;\nvarying float v_angleEnd;\nvarying float v_width;\nvarying vec4 v_hitColor;\nvarying float v_distancePx;\nvarying float v_measureStart;\nvarying float v_measureEnd;\n${this.attributes_\n .map(\n (attribute) => `varying ${attribute.varyingType} ${attribute.varyingName};`,\n )\n .join('\\n')}\n${this.fragmentShaderFunctions_.join('\\n')}\n\nvec2 pxToWorld(vec2 pxPos) {\n vec2 screenPos = 2.0 * pxPos / u_viewportSizePx - 1.0;\n return (u_screenToWorldMatrix * vec4(screenPos, 0.0, 1.0)).xy;\n}\n\nbool isCap(float joinAngle) {\n return joinAngle < -0.1;\n}\n\nfloat segmentDistanceField(vec2 point, vec2 start, vec2 end, float width) {\n vec2 tangent = normalize(end - start);\n vec2 normal = vec2(-tangent.y, tangent.x);\n vec2 startToPoint = point - start;\n return abs(dot(startToPoint, normal)) - width * 0.5;\n}\n\nfloat buttCapDistanceField(vec2 point, vec2 start, vec2 end) {\n vec2 startToPoint = point - start;\n vec2 tangent = normalize(end - start);\n return dot(startToPoint, -tangent);\n}\n\nfloat squareCapDistanceField(vec2 point, vec2 start, vec2 end, float width) {\n return buttCapDistanceField(point, start, end) - width * 0.5;\n}\n\nfloat roundCapDistanceField(vec2 point, vec2 start, vec2 end, float width) {\n float onSegment = max(0., 1000. * dot(point - start, end - start)); // this is very high when inside the segment\n return length(point - start) - width * 0.5 - onSegment;\n}\n\nfloat roundJoinDistanceField(vec2 point, vec2 start, vec2 end, float width) {\n return roundCapDistanceField(point, start, end, width);\n}\n\nfloat bevelJoinField(vec2 point, vec2 start, vec2 end, float width, float joinAngle) {\n vec2 startToPoint = point - start;\n vec2 tangent = normalize(end - start);\n float c = cos(joinAngle * 0.5);\n float s = sin(joinAngle * 0.5);\n float direction = -sign(sin(joinAngle));\n vec2 bisector = vec2(c * tangent.x - s * tangent.y, s * tangent.x + c * tangent.y);\n float radius = width * 0.5 * s;\n return dot(startToPoint, bisector * direction) - radius;\n}\n\nfloat miterJoinDistanceField(vec2 point, vec2 start, vec2 end, float width, float joinAngle) {\n if (cos(joinAngle) > ${LINESTRING_ANGLE_COSINE_CUTOFF}) { // avoid risking a division by zero\n return bevelJoinField(point, start, end, width, joinAngle);\n }\n float miterLength = 1. / sin(joinAngle * 0.5);\n float miterLimit = ${this.strokeMiterLimitExpression_};\n if (miterLength > miterLimit) {\n return bevelJoinField(point, start, end, width, joinAngle);\n }\n return -1000.;\n}\n\nfloat capDistanceField(vec2 point, vec2 start, vec2 end, float width, float capType) {\n if (capType == ${stringToGlsl('butt')}) {\n return buttCapDistanceField(point, start, end);\n } else if (capType == ${stringToGlsl('square')}) {\n return squareCapDistanceField(point, start, end, width);\n }\n return roundCapDistanceField(point, start, end, width);\n}\n\nfloat joinDistanceField(vec2 point, vec2 start, vec2 end, float width, float joinAngle, float joinType) {\n if (joinType == ${stringToGlsl('bevel')}) {\n return bevelJoinField(point, start, end, width, joinAngle);\n } else if (joinType == ${stringToGlsl('miter')}) {\n return miterJoinDistanceField(point, start, end, width, joinAngle);\n }\n return roundJoinDistanceField(point, start, end, width);\n}\n\nfloat computeSegmentPointDistance(vec2 point, vec2 start, vec2 end, float width, float joinAngle, float capType, float joinType) {\n if (isCap(joinAngle)) {\n return capDistanceField(point, start, end, width, capType);\n }\n return joinDistanceField(point, start, end, width, joinAngle, joinType);\n}\n\nfloat distanceFromSegment(vec2 point, vec2 start, vec2 end) {\n vec2 tangent = end - start;\n vec2 startToPoint = point - start;\n // inspire by capsule fn in https://iquilezles.org/articles/distfunctions/\n float h = clamp(dot(startToPoint, tangent) / dot(tangent, tangent), 0.0, 1.0);\n return length(startToPoint - tangent * h);\n}\n\nvoid main(void) {\n${this.attributes_\n .map(\n (attribute) =>\n ` ${attribute.varyingType} ${attribute.name} = ${attribute.varyingName}; // assign to original attribute name`,\n )\n .join('\\n')}\n\n vec2 currentPointPx = gl_FragCoord.xy / u_pixelRatio;\n #ifdef GL_FRAGMENT_PRECISION_HIGH\n vec2 worldPos = pxToWorld(currentPointPx);\n if (\n abs(u_renderExtent[0] - u_renderExtent[2]) > 0.0 && (\n worldPos[0] < u_renderExtent[0] ||\n worldPos[1] < u_renderExtent[1] ||\n worldPos[0] > u_renderExtent[2] ||\n worldPos[1] > u_renderExtent[3]\n )\n ) {\n discard;\n }\n #endif\n\n float segmentLengthPx = length(v_segmentEndPx - v_segmentStartPx);\n segmentLengthPx = max(segmentLengthPx, 1.17549429e-38); // avoid divide by zero\n vec2 segmentTangent = (v_segmentEndPx - v_segmentStartPx) / segmentLengthPx;\n vec2 segmentNormal = vec2(-segmentTangent.y, segmentTangent.x);\n vec2 startToPointPx = currentPointPx - v_segmentStartPx;\n float lengthToPointPx = max(0., min(dot(segmentTangent, startToPointPx), segmentLengthPx));\n float currentLengthPx = lengthToPointPx + v_distancePx;\n float currentRadiusPx = distanceFromSegment(currentPointPx, v_segmentStartPx, v_segmentEndPx);\n float currentRadiusRatio = dot(segmentNormal, startToPointPx) * 2. / v_width;\n currentLineMetric = mix(v_measureStart, v_measureEnd, lengthToPointPx / segmentLengthPx);\n\n if (${this.discardExpression_}) { discard; }\n\n float capType = ${this.strokeCapExpression_};\n float joinType = ${this.strokeJoinExpression_};\n float segmentStartDistance = computeSegmentPointDistance(currentPointPx, v_segmentStartPx, v_segmentEndPx, v_width, v_angleStart, capType, joinType);\n float segmentEndDistance = computeSegmentPointDistance(currentPointPx, v_segmentEndPx, v_segmentStartPx, v_width, v_angleEnd, capType, joinType);\n float distanceField = max(\n segmentDistanceField(currentPointPx, v_segmentStartPx, v_segmentEndPx, v_width),\n max(segmentStartDistance, segmentEndDistance)\n );\n distanceField = max(distanceField, ${this.strokeDistanceFieldExpression_});\n\n vec4 color = ${this.strokeColorExpression_};\n color.a *= smoothstep(0.5, -0.5, distanceField);\n gl_FragColor = color;\n gl_FragColor.a *= u_globalAlpha;\n gl_FragColor.rgb *= gl_FragColor.a;\n if (u_hitDetection > 0) {\n if (gl_FragColor.a < 0.1) { discard; };\n gl_FragColor = v_hitColor;\n }\n}`;\n }\n\n /**\n * Generates a fill vertex shader from the builder parameters\n *\n * @return {string|null} The full shader as a string; null if no color specified\n */\n getFillVertexShader() {\n if (!this.hasFill_) {\n return null;\n }\n\n return `${COMMON_HEADER}\n${this.uniforms_.map((uniform) => `uniform ${uniform.type} ${uniform.name};`).join('\\n')}\nattribute vec2 a_position;\nattribute vec2 a_hitColor;\n\nvarying vec4 v_hitColor;\n\n${this.attributes_\n .map(\n (attribute) => `attribute ${attribute.type} ${attribute.name};\nvarying ${attribute.varyingType} ${attribute.varyingName};`,\n )\n .join('\\n')}\n${this.vertexShaderFunctions_.join('\\n')}\nvoid main(void) {\n gl_Position = u_projectionMatrix * vec4(a_position, u_depth, 1.0);\n v_hitColor = unpackColor(a_hitColor);\n${this.attributes_\n .map(\n (attribute) =>\n ` ${attribute.varyingName} = ${attribute.varyingExpression};`,\n )\n .join('\\n')}\n}`;\n }\n\n /**\n * Generates a fill fragment shader from the builder parameters\n * @return {string|null} The full shader as a string; null if no color specified\n */\n getFillFragmentShader() {\n if (!this.hasFill_) {\n return null;\n }\n\n return `${COMMON_HEADER}\n${this.uniforms_.map((uniform) => `uniform ${uniform.type} ${uniform.name};`).join('\\n')}\nvarying vec4 v_hitColor;\n${this.attributes_\n .map(\n (attribute) => `varying ${attribute.varyingType} ${attribute.varyingName};`,\n )\n .join('\\n')}\n${this.fragmentShaderFunctions_.join('\\n')}\nvec2 pxToWorld(vec2 pxPos) {\n vec2 screenPos = 2.0 * pxPos / u_viewportSizePx - 1.0;\n return (u_screenToWorldMatrix * vec4(screenPos, 0.0, 1.0)).xy;\n}\n\nvec2 worldToPx(vec2 worldPos) {\n vec4 screenPos = u_projectionMatrix * vec4(worldPos, 0.0, 1.0);\n return (0.5 * screenPos.xy + 0.5) * u_viewportSizePx;\n}\n\nvoid main(void) {\n${this.attributes_\n .map(\n (attribute) =>\n ` ${attribute.varyingType} ${attribute.name} = ${attribute.varyingName}; // assign to original attribute name`,\n )\n .join('\\n')}\n vec2 pxPos = gl_FragCoord.xy / u_pixelRatio;\n vec2 pxOrigin = worldToPx(u_patternOrigin);\n #ifdef GL_FRAGMENT_PRECISION_HIGH\n vec2 worldPos = pxToWorld(pxPos);\n if (\n abs(u_renderExtent[0] - u_renderExtent[2]) > 0.0 && (\n worldPos[0] < u_renderExtent[0] ||\n worldPos[1] < u_renderExtent[1] ||\n worldPos[0] > u_renderExtent[2] ||\n worldPos[1] > u_renderExtent[3]\n )\n ) {\n discard;\n }\n #endif\n if (${this.discardExpression_}) { discard; }\n gl_FragColor = ${this.fillColorExpression_};\n gl_FragColor.a *= u_globalAlpha;\n gl_FragColor.rgb *= gl_FragColor.a;\n if (u_hitDetection > 0) {\n if (gl_FragColor.a < 0.1) { discard; };\n gl_FragColor = v_hitColor;\n }\n}`;\n }\n}\n", "/**\n * @module ol/render/webgl/MixedGeometryBatch\n */\nimport {inflateEnds} from '../../geom/flat/orient.js';\nimport RenderFeature from '../../render/Feature.js';\nimport {getUid} from '../../util.js';\n\n/**\n * @typedef {import(\"../../Feature.js\").default} Feature\n */\n/**\n * @typedef {import(\"../../geom/Geometry.js\").Type} GeometryType\n */\n\n/**\n * @typedef {Object} GeometryBatchItem Object that holds a reference to a feature as well as the raw coordinates of its various geometries\n * @property {Feature|RenderFeature} feature Feature\n * @property {Array<Array<number>>} flatCoordss Array of flat coordinates arrays, one for each geometry related to the feature\n * @property {number} [verticesCount] Only defined for linestring and polygon batches\n * @property {number} [ringsCount] Only defined for polygon batches\n * @property {Array<Array<number>>} [ringsVerticesCounts] Array of vertices counts in each ring for each geometry; only defined for polygons batches\n * @property {number} [ref] The reference in the global batch (used for hit detection)\n */\n\n/**\n * @typedef {PointGeometryBatch|LineStringGeometryBatch|PolygonGeometryBatch} GeometryBatch\n */\n\n/**\n * @typedef {Object} PolygonGeometryBatch A geometry batch specific to polygons\n * @property {Object<string, GeometryBatchItem>} entries Dictionary of all entries in the batch with associated computed values.\n * One entry corresponds to one feature. Key is feature uid.\n * @property {number} geometriesCount Amount of geometries in the batch.\n * @property {number} verticesCount Amount of vertices from geometries in the batch.\n * @property {number} ringsCount How many outer and inner rings in this batch.\n */\n\n/**\n * @typedef {Object} LineStringGeometryBatch A geometry batch specific to lines\n * @property {Object<string, GeometryBatchItem>} entries Dictionary of all entries in the batch with associated computed values.\n * One entry corresponds to one feature. Key is feature uid.\n * @property {number} geometriesCount Amount of geometries in the batch.\n * @property {number} verticesCount Amount of vertices from geometries in the batch.\n */\n\n/**\n * @typedef {Object} PointGeometryBatch A geometry batch specific to points\n * @property {Object<string, GeometryBatchItem>} entries Dictionary of all entries in the batch with associated computed values.\n * One entry corresponds to one feature. Key is feature uid.\n * @property {number} geometriesCount Amount of geometries in the batch.\n */\n\n/**\n * @classdesc This class is used to group several geometries of various types together for faster rendering.\n * Three inner batches are maintained for polygons, lines and points. Each time a feature is added, changed or removed\n * from the batch, these inner batches are modified accordingly in order to keep them up-to-date.\n *\n * A feature can be present in several inner batches, for example a polygon geometry will be present in the polygon batch\n * and its linear rings will be present in the line batch. Multi geometries are also broken down into individual geometries\n * and added to the corresponding batches in a recursive manner.\n *\n * Corresponding {@link module:ol/render/webgl/BatchRenderer} instances are then used to generate the render instructions\n * and WebGL buffers (vertices and indices) for each inner batches; render instructions are stored on the inner batches,\n * alongside the transform used to convert world coords to screen coords at the time these instructions were generated.\n * The resulting WebGL buffers are stored on the batches as well.\n *\n * An important aspect of geometry batches is that there is no guarantee that render instructions and WebGL buffers\n * are synchronized, i.e. render instructions can describe a new state while WebGL buffers might not have been written yet.\n * This is why two world-to-screen transforms are stored on each batch: one for the render instructions and one for\n * the WebGL buffers.\n */\nclass MixedGeometryBatch {\n constructor() {\n /**\n * @private\n */\n this.globalCounter_ = 0;\n\n /**\n * Refs are used as keys for hit detection.\n * @type {Map<number, Feature|RenderFeature>}\n * @private\n */\n this.refToFeature_ = new Map();\n\n /**\n * Features are split in \"entries\", which are individual geometries. We use the following map to share a single ref for all those entries.\n * @type {Map<string, number>}\n * @private\n */\n this.uidToRef_ = new Map();\n\n /**\n * The precision in WebGL shaders is limited.\n * To keep the refs as small as possible we maintain an array of freed up references.\n * @type {Array<number>}\n * @private\n */\n this.freeGlobalRef_ = [];\n\n /**\n * @type {PolygonGeometryBatch}\n */\n this.polygonBatch = {\n entries: {},\n geometriesCount: 0,\n verticesCount: 0,\n ringsCount: 0,\n };\n\n /**\n * @type {PointGeometryBatch}\n */\n this.pointBatch = {\n entries: {},\n geometriesCount: 0,\n };\n\n /**\n * @type {LineStringGeometryBatch}\n */\n this.lineStringBatch = {\n entries: {},\n geometriesCount: 0,\n verticesCount: 0,\n };\n }\n\n /**\n * @param {Array<Feature|RenderFeature>} features Array of features to add to the batch\n * @param {import(\"../../proj.js\").TransformFunction} [projectionTransform] Projection transform.\n */\n addFeatures(features, projectionTransform) {\n for (let i = 0; i < features.length; i++) {\n this.addFeature(features[i], projectionTransform);\n }\n }\n\n /**\n * @param {Feature|RenderFeature} feature Feature to add to the batch\n * @param {import(\"../../proj.js\").TransformFunction} [projectionTransform] Projection transform.\n */\n addFeature(feature, projectionTransform) {\n let geometry = feature.getGeometry();\n if (!geometry) {\n return;\n }\n if (projectionTransform) {\n geometry = geometry.clone();\n geometry.applyTransform(projectionTransform);\n }\n this.addGeometry_(geometry, feature);\n }\n\n /**\n * @param {Feature|RenderFeature} feature Feature\n * @return {GeometryBatchItem|void} the cleared entry\n * @private\n */\n clearFeatureEntryInPointBatch_(feature) {\n const featureUid = getUid(feature);\n const entry = this.pointBatch.entries[featureUid];\n if (!entry) {\n return;\n }\n this.pointBatch.geometriesCount -= entry.flatCoordss.length;\n delete this.pointBatch.entries[featureUid];\n return entry;\n }\n\n /**\n * @param {Feature|RenderFeature} feature Feature\n * @return {GeometryBatchItem|void} the cleared entry\n * @private\n */\n clearFeatureEntryInLineStringBatch_(feature) {\n const featureUid = getUid(feature);\n const entry = this.lineStringBatch.entries[featureUid];\n if (!entry) {\n return;\n }\n this.lineStringBatch.verticesCount -= entry.verticesCount;\n this.lineStringBatch.geometriesCount -= entry.flatCoordss.length;\n delete this.lineStringBatch.entries[featureUid];\n return entry;\n }\n\n /**\n * @param {Feature|RenderFeature} feature Feature\n * @return {GeometryBatchItem|void} the cleared entry\n * @private\n */\n clearFeatureEntryInPolygonBatch_(feature) {\n const featureUid = getUid(feature);\n const entry = this.polygonBatch.entries[featureUid];\n if (!entry) {\n return;\n }\n this.polygonBatch.verticesCount -= entry.verticesCount;\n this.polygonBatch.ringsCount -= entry.ringsCount;\n this.polygonBatch.geometriesCount -= entry.flatCoordss.length;\n delete this.polygonBatch.entries[featureUid];\n return entry;\n }\n\n /**\n * @param {import(\"../../geom.js\").Geometry|RenderFeature} geometry Geometry\n * @param {Feature|RenderFeature} feature Feature\n * @private\n */\n addGeometry_(geometry, feature) {\n const type = geometry.getType();\n switch (type) {\n case 'GeometryCollection': {\n const geometries =\n /** @type {import(\"../../geom.js\").GeometryCollection} */ (\n geometry\n ).getGeometriesArray();\n for (const geometry of geometries) {\n this.addGeometry_(geometry, feature);\n }\n break;\n }\n case 'MultiPolygon': {\n const multiPolygonGeom =\n /** @type {import(\"../../geom.js\").MultiPolygon} */ (geometry);\n this.addCoordinates_(\n type,\n multiPolygonGeom.getFlatCoordinates(),\n multiPolygonGeom.getEndss(),\n feature,\n getUid(feature),\n multiPolygonGeom.getStride(),\n );\n break;\n }\n case 'MultiLineString': {\n const multiLineGeom =\n /** @type {import(\"../../geom.js\").MultiLineString|RenderFeature} */ (\n geometry\n );\n this.addCoordinates_(\n type,\n multiLineGeom.getFlatCoordinates(),\n multiLineGeom.getEnds(),\n feature,\n getUid(feature),\n multiLineGeom.getStride(),\n );\n break;\n }\n case 'MultiPoint': {\n const multiPointGeom =\n /** @type {import(\"../../geom.js\").MultiPoint|RenderFeature} */ (\n geometry\n );\n this.addCoordinates_(\n type,\n multiPointGeom.getFlatCoordinates(),\n null,\n feature,\n getUid(feature),\n multiPointGeom.getStride(),\n );\n break;\n }\n case 'Polygon': {\n const polygonGeom =\n /** @type {import(\"../../geom.js\").Polygon|RenderFeature} */ (\n geometry\n );\n this.addCoordinates_(\n type,\n polygonGeom.getFlatCoordinates(),\n polygonGeom.getEnds(),\n feature,\n getUid(feature),\n polygonGeom.getStride(),\n );\n break;\n }\n case 'Point': {\n const pointGeom = /** @type {import(\"../../geom.js\").Point} */ (\n geometry\n );\n this.addCoordinates_(\n type,\n pointGeom.getFlatCoordinates(),\n null,\n feature,\n getUid(feature),\n pointGeom.getStride(),\n );\n break;\n }\n case 'LineString':\n case 'LinearRing': {\n const lineGeom = /** @type {import(\"../../geom.js\").LineString} */ (\n geometry\n );\n\n const stride = lineGeom.getStride();\n\n this.addCoordinates_(\n type,\n lineGeom.getFlatCoordinates(),\n null,\n feature,\n getUid(feature),\n stride,\n lineGeom.getLayout?.(),\n );\n break;\n }\n default:\n // pass\n }\n }\n\n /**\n * @param {GeometryType} type Geometry type\n * @param {Array<number>} flatCoords Flat coordinates\n * @param {Array<number> | Array<Array<number>> | null} ends Coordinate ends\n * @param {Feature|RenderFeature} feature Feature\n * @param {string} featureUid Feature uid\n * @param {number} stride Stride\n * @param {import('../../geom/Geometry.js').GeometryLayout} [layout] Layout\n * @private\n */\n addCoordinates_(type, flatCoords, ends, feature, featureUid, stride, layout) {\n /** @type {number} */\n let verticesCount;\n switch (type) {\n case 'MultiPolygon': {\n const multiPolygonEndss = /** @type {Array<Array<number>>} */ (ends);\n for (let i = 0, ii = multiPolygonEndss.length; i < ii; i++) {\n let polygonEnds = multiPolygonEndss[i];\n const prevPolygonEnds = i > 0 ? multiPolygonEndss[i - 1] : null;\n const startIndex = prevPolygonEnds\n ? prevPolygonEnds[prevPolygonEnds.length - 1]\n : 0;\n const endIndex = polygonEnds[polygonEnds.length - 1];\n polygonEnds =\n startIndex > 0\n ? polygonEnds.map((end) => end - startIndex)\n : polygonEnds;\n this.addCoordinates_(\n 'Polygon',\n flatCoords.slice(startIndex, endIndex),\n polygonEnds,\n feature,\n featureUid,\n stride,\n layout,\n );\n }\n break;\n }\n case 'MultiLineString': {\n const multiLineEnds = /** @type {Array<number>} */ (ends);\n for (let i = 0, ii = multiLineEnds.length; i < ii; i++) {\n const startIndex = i > 0 ? multiLineEnds[i - 1] : 0;\n this.addCoordinates_(\n 'LineString',\n flatCoords.slice(startIndex, multiLineEnds[i]),\n null,\n feature,\n featureUid,\n stride,\n layout,\n );\n }\n break;\n }\n case 'MultiPoint':\n for (let i = 0, ii = flatCoords.length; i < ii; i += stride) {\n this.addCoordinates_(\n 'Point',\n flatCoords.slice(i, i + 2),\n null,\n feature,\n featureUid,\n null,\n null,\n );\n }\n break;\n case 'Polygon': {\n const polygonEnds = /** @type {Array<number>} */ (ends);\n if (feature instanceof RenderFeature) {\n const multiPolygonEnds = inflateEnds(flatCoords, polygonEnds);\n if (multiPolygonEnds.length > 1) {\n this.addCoordinates_(\n 'MultiPolygon',\n flatCoords,\n multiPolygonEnds,\n feature,\n featureUid,\n stride,\n layout,\n );\n return;\n }\n }\n if (!this.polygonBatch.entries[featureUid]) {\n this.polygonBatch.entries[featureUid] = this.addRefToEntry_(\n featureUid,\n {\n feature: feature,\n flatCoordss: [],\n verticesCount: 0,\n ringsCount: 0,\n ringsVerticesCounts: [],\n },\n );\n }\n verticesCount = flatCoords.length / stride;\n const ringsCount = ends.length;\n const ringsVerticesCount = ends.map((end, ind, arr) =>\n ind > 0 ? (end - arr[ind - 1]) / stride : end / stride,\n );\n this.polygonBatch.verticesCount += verticesCount;\n this.polygonBatch.ringsCount += ringsCount;\n this.polygonBatch.geometriesCount++;\n this.polygonBatch.entries[featureUid].flatCoordss.push(\n getFlatCoordinatesXY(flatCoords, stride),\n );\n this.polygonBatch.entries[featureUid].ringsVerticesCounts.push(\n ringsVerticesCount,\n );\n this.polygonBatch.entries[featureUid].verticesCount += verticesCount;\n this.polygonBatch.entries[featureUid].ringsCount += ringsCount;\n for (let i = 0, ii = polygonEnds.length; i < ii; i++) {\n const startIndex = i > 0 ? polygonEnds[i - 1] : 0;\n this.addCoordinates_(\n 'LinearRing',\n flatCoords.slice(startIndex, polygonEnds[i]),\n null,\n feature,\n featureUid,\n stride,\n layout,\n );\n }\n break;\n }\n case 'Point':\n if (!this.pointBatch.entries[featureUid]) {\n this.pointBatch.entries[featureUid] = this.addRefToEntry_(\n featureUid,\n {\n feature: feature,\n flatCoordss: [],\n },\n );\n }\n this.pointBatch.geometriesCount++;\n this.pointBatch.entries[featureUid].flatCoordss.push(flatCoords);\n break;\n case 'LineString':\n case 'LinearRing':\n if (!this.lineStringBatch.entries[featureUid]) {\n this.lineStringBatch.entries[featureUid] = this.addRefToEntry_(\n featureUid,\n {\n feature: feature,\n flatCoordss: [],\n verticesCount: 0,\n },\n );\n }\n verticesCount = flatCoords.length / stride;\n this.lineStringBatch.verticesCount += verticesCount;\n this.lineStringBatch.geometriesCount++;\n this.lineStringBatch.entries[featureUid].flatCoordss.push(\n getFlatCoordinatesXYM(flatCoords, stride, layout),\n );\n this.lineStringBatch.entries[featureUid].verticesCount += verticesCount;\n break;\n default:\n // pass\n }\n }\n\n /**\n * @param {string} featureUid Feature uid\n * @param {GeometryBatchItem} entry The entry to add\n * @return {GeometryBatchItem} the added entry\n * @private\n */\n addRefToEntry_(featureUid, entry) {\n const currentRef = this.uidToRef_.get(featureUid);\n\n // the ref starts at 1 to distinguish from white color (no feature)\n const ref =\n currentRef || this.freeGlobalRef_.pop() || ++this.globalCounter_;\n entry.ref = ref;\n if (!currentRef) {\n this.refToFeature_.set(ref, entry.feature);\n this.uidToRef_.set(featureUid, ref);\n }\n return entry;\n }\n\n /**\n * Return a ref to the pool of available refs.\n * @param {number} ref the ref to return\n * @param {string} featureUid the feature uid\n * @private\n */\n removeRef_(ref, featureUid) {\n if (!ref) {\n throw new Error('This feature has no ref: ' + featureUid);\n }\n this.refToFeature_.delete(ref);\n this.uidToRef_.delete(featureUid);\n this.freeGlobalRef_.push(ref);\n }\n\n /**\n * @param {Feature|RenderFeature} feature Feature\n * @param {import(\"../../proj.js\").TransformFunction} [projectionTransform] Projection transform.\n */\n changeFeature(feature, projectionTransform) {\n // the feature is not present in the batch; do not add it to avoid unexpected behaviors\n if (!this.uidToRef_.get(getUid(feature))) {\n return;\n }\n this.removeFeature(feature);\n let geometry = feature.getGeometry();\n if (!geometry) {\n return;\n }\n if (projectionTransform) {\n geometry = geometry.clone();\n geometry.applyTransform(projectionTransform);\n }\n this.addGeometry_(geometry, feature);\n }\n\n /**\n * @param {Feature|RenderFeature} feature Feature\n */\n removeFeature(feature) {\n let entry = this.clearFeatureEntryInPointBatch_(feature);\n entry = this.clearFeatureEntryInPolygonBatch_(feature) || entry;\n entry = this.clearFeatureEntryInLineStringBatch_(feature) || entry;\n if (entry) {\n this.removeRef_(entry.ref, getUid(entry.feature));\n }\n }\n\n clear() {\n this.polygonBatch.entries = {};\n this.polygonBatch.geometriesCount = 0;\n this.polygonBatch.verticesCount = 0;\n this.polygonBatch.ringsCount = 0;\n this.lineStringBatch.entries = {};\n this.lineStringBatch.geometriesCount = 0;\n this.lineStringBatch.verticesCount = 0;\n this.pointBatch.entries = {};\n this.pointBatch.geometriesCount = 0;\n this.globalCounter_ = 0;\n this.freeGlobalRef_ = [];\n this.refToFeature_.clear();\n this.uidToRef_.clear();\n }\n\n /**\n * Resolve the feature associated to a ref.\n * @param {number} ref Hit detected ref\n * @return {Feature|RenderFeature} feature\n */\n getFeatureFromRef(ref) {\n return this.refToFeature_.get(ref);\n }\n\n isEmpty() {\n return this.globalCounter_ === 0;\n }\n\n /**\n * Will return a new instance of this class that only contains the features\n * for which the provided callback returned true\n * @param {function((Feature|RenderFeature)): boolean} featureFilter Feature filter callback\n * @return {MixedGeometryBatch} Filtered geometry batch\n */\n filter(featureFilter) {\n const filtered = new MixedGeometryBatch();\n filtered.globalCounter_ = this.globalCounter_;\n filtered.uidToRef_ = this.uidToRef_;\n filtered.refToFeature_ = this.refToFeature_;\n let empty = true;\n for (const feature of this.refToFeature_.values()) {\n if (featureFilter(feature)) {\n filtered.addFeature(feature);\n empty = false;\n }\n }\n // no feature was added at all; simply return an empty batch for consistency downstream\n if (empty) {\n return new MixedGeometryBatch();\n }\n return filtered;\n }\n}\n\n/**\n * @param {Array<number>} flatCoords Flat coords\n * @param {number} stride Stride\n * @return {Array<number>} Flat coords with only XY components\n */\nfunction getFlatCoordinatesXY(flatCoords, stride) {\n if (stride === 2) {\n return flatCoords;\n }\n return flatCoords.filter((v, i) => i % stride < 2);\n}\n\n/**\n * @param {Array<number>} flatCoords Flat coords\n * @param {number} stride Stride\n * @param {string} layout Layout\n * @return {Array<number>} Flat coords with only XY components\n */\nfunction getFlatCoordinatesXYM(flatCoords, stride, layout) {\n if (stride === 3 && layout === 'XYM') {\n return flatCoords;\n }\n // this is XYZM layout\n if (stride === 4) {\n return flatCoords.filter((v, i) => i % stride !== 2);\n }\n // this is XYZ layout\n if (stride === 3) {\n return flatCoords.map((v, i) => (i % stride !== 2 ? v : 0));\n }\n // this is XY layout\n return new Array(flatCoords.length * 1.5)\n .fill(0)\n .map((v, i) => (i % 3 === 2 ? 0 : flatCoords[Math.round(i / 1.5)]));\n}\n\nexport default MixedGeometryBatch;\n", "\n export function create() {\n const source = \"function t(t,n,x=2){const o=n&&n.length,i=o?n[0]*x:t.length;let f=e(t,0,i,x,!0);const l=[];if(!f||f.next===f.prev)return l;let c,y,h;if(o&&(f=function(t,n,r,x){const o=[];for(let r=0,i=n.length;r<i;r++){const f=e(t,n[r]*x,r<i-1?n[r+1]*x:t.length,x,!1);f===f.next&&(f.steiner=!0),o.push(a(f))}o.sort(u);for(let t=0;t<o.length;t++)r=s(o[t],r);return r}(t,n,f,x)),t.length>80*x){c=t[0],y=t[1];let e=c,n=y;for(let r=x;r<i;r+=x){const x=t[r],o=t[r+1];x<c&&(c=x),o<y&&(y=o),x>e&&(e=x),o>n&&(n=o)}h=Math.max(e-c,n-y),h=0!==h?32767/h:0}return r(f,l,x,c,y,h,0),l}function e(t,e,n,r,x){let o;if(x===function(t,e,n,r){let x=0;for(let o=e,i=n-r;o<n;o+=r)x+=(t[i]-t[o])*(t[o+1]+t[i+1]),i=o;return x}(t,e,n,r)>0)for(let x=e;x<n;x+=r)o=d(x/r|0,t[x],t[x+1],o);else for(let x=n-r;x>=e;x-=r)o=d(x/r|0,t[x],t[x+1],o);return o&&b(o,o.next)&&(w(o),o=o.next),o}function n(t,e){if(!t)return t;e||(e=t);let n,r=t;do{if(n=!1,r.steiner||!b(r,r.next)&&0!==v(r.prev,r,r.next))r=r.next;else{if(w(r),r=e=r.prev,r===r.next)break;n=!0}}while(n||r!==e);return e}function r(t,e,u,s,l,a,y){if(!t)return;!y&&a&&function(t,e,n,r){let x=t;do{0===x.z&&(x.z=c(x.x,x.y,e,n,r)),x.prevZ=x.prev,x.nextZ=x.next,x=x.next}while(x!==t);x.prevZ.nextZ=null,x.prevZ=null,function(t){let e,n=1;do{let r,x=t;t=null;let o=null;for(e=0;x;){e++;let i=x,f=0;for(let t=0;t<n&&(f++,i=i.nextZ,i);t++);let u=n;for(;f>0||u>0&&i;)0!==f&&(0===u||!i||x.z<=i.z)?(r=x,x=x.nextZ,f--):(r=i,i=i.nextZ,u--),o?o.nextZ=r:t=r,r.prevZ=o,o=r;x=i}o.nextZ=null,n*=2}while(e>1)}(x)}(t,s,l,a);let h=t;for(;t.prev!==t.next;){const c=t.prev,p=t.next;if(a?o(t,s,l,a):x(t))e.push(c.i,t.i,p.i),w(t),t=p.next,h=p.next;else if((t=p)===h){y?1===y?r(t=i(n(t),e),e,u,s,l,a,2):2===y&&f(t,e,u,s,l,a):r(n(t),e,u,s,l,a,1);break}}}function x(t){const e=t.prev,n=t,r=t.next;if(v(e,n,r)>=0)return!1;const x=e.x,o=n.x,i=r.x,f=e.y,u=n.y,s=r.y,l=Math.min(x,o,i),c=Math.min(f,u,s),a=Math.max(x,o,i),y=Math.max(f,u,s);let p=r.next;for(;p!==e;){if(p.x>=l&&p.x<=a&&p.y>=c&&p.y<=y&&h(x,f,o,u,i,s,p.x,p.y)&&v(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function o(t,e,n,r){const x=t.prev,o=t,i=t.next;if(v(x,o,i)>=0)return!1;const f=x.x,u=o.x,s=i.x,l=x.y,a=o.y,y=i.y,p=Math.min(f,u,s),b=Math.min(l,a,y),M=Math.max(f,u,s),m=Math.max(l,a,y),A=c(p,b,e,n,r),g=c(M,m,e,n,r);let Z=t.prevZ,d=t.nextZ;for(;Z&&Z.z>=A&&d&&d.z<=g;){if(Z.x>=p&&Z.x<=M&&Z.y>=b&&Z.y<=m&&Z!==x&&Z!==i&&h(f,l,u,a,s,y,Z.x,Z.y)&&v(Z.prev,Z,Z.next)>=0)return!1;if(Z=Z.prevZ,d.x>=p&&d.x<=M&&d.y>=b&&d.y<=m&&d!==x&&d!==i&&h(f,l,u,a,s,y,d.x,d.y)&&v(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;Z&&Z.z>=A;){if(Z.x>=p&&Z.x<=M&&Z.y>=b&&Z.y<=m&&Z!==x&&Z!==i&&h(f,l,u,a,s,y,Z.x,Z.y)&&v(Z.prev,Z,Z.next)>=0)return!1;Z=Z.prevZ}for(;d&&d.z<=g;){if(d.x>=p&&d.x<=M&&d.y>=b&&d.y<=m&&d!==x&&d!==i&&h(f,l,u,a,s,y,d.x,d.y)&&v(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function i(t,e){let r=t;do{const n=r.prev,x=r.next.next;!b(n,x)&&M(n,r,r.next,x)&&g(n,x)&&g(x,n)&&(e.push(n.i,r.i,x.i),w(r),w(r.next),r=t=x),r=r.next}while(r!==t);return n(r)}function f(t,e,x,o,i,f){let u=t;do{let t=u.next.next;for(;t!==u.prev;){if(u.i!==t.i&&p(u,t)){let s=Z(u,t);return u=n(u,u.next),s=n(s,s.next),r(u,e,x,o,i,f,0),void r(s,e,x,o,i,f,0)}t=t.next}u=u.next}while(u!==t)}function u(t,e){let n=t.x-e.x;if(0===n&&(n=t.y-e.y,0===n)){n=(t.next.y-t.y)/(t.next.x-t.x)-(e.next.y-e.y)/(e.next.x-e.x)}return n}function s(t,e){const r=function(t,e){let n=e;const r=t.x,x=t.y;let o,i=-1/0;if(b(t,n))return n;do{if(b(t,n.next))return n.next;if(x<=n.y&&x>=n.next.y&&n.next.y!==n.y){const t=n.x+(x-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(t<=r&&t>i&&(i=t,o=n.x<n.next.x?n:n.next,t===r))return o}n=n.next}while(n!==e);if(!o)return null;const f=o,u=o.x,s=o.y;let c=1/0;n=o;do{if(r>=n.x&&n.x>=u&&r!==n.x&&y(x<s?r:i,x,u,s,x<s?i:r,x,n.x,n.y)){const e=Math.abs(x-n.y)/(r-n.x);g(n,t)&&(e<c||e===c&&(n.x>o.x||n.x===o.x&&l(o,n)))&&(o=n,c=e)}n=n.next}while(n!==f);return o}(t,e);if(!r)return e;const x=Z(r,t);return n(x,x.next),n(r,r.next)}function l(t,e){return v(t.prev,t,e.prev)<0&&v(e.next,t,t.next)<0}function c(t,e,n,r,x){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*x|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-r)*x|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function a(t){let e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function y(t,e,n,r,x,o,i,f){return(x-i)*(e-f)>=(t-i)*(o-f)&&(t-i)*(r-f)>=(n-i)*(e-f)&&(n-i)*(o-f)>=(x-i)*(r-f)}function h(t,e,n,r,x,o,i,f){return!(t===i&&e===f)&&y(t,e,n,r,x,o,i,f)}function p(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){let n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&M(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(g(t,e)&&g(e,t)&&function(t,e){let n=t,r=!1;const x=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&x<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)&&(v(t.prev,t,e.prev)||v(t,e.prev,e))||b(t,e)&&v(t.prev,t,t.next)>0&&v(e.prev,e,e.next)>0)}function v(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function b(t,e){return t.x===e.x&&t.y===e.y}function M(t,e,n,r){const x=A(v(t,e,n)),o=A(v(t,e,r)),i=A(v(n,r,t)),f=A(v(n,r,e));return x!==o&&i!==f||(!(0!==x||!m(t,n,e))||(!(0!==o||!m(t,r,e))||(!(0!==i||!m(n,t,r))||!(0!==f||!m(n,e,r)))))}function m(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function A(t){return t>0?1:t<0?-1:0}function g(t,e){return v(t.prev,t,t.next)<0?v(t,e,t.next)>=0&&v(t,t.prev,e)>=0:v(t,e,t.prev)<0||v(t,t.next,e)<0}function Z(t,e){const n=F(t.i,t.x,t.y),r=F(e.i,e.x,e.y),x=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=x,x.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function d(t,e,n,r){const x=F(t,e,n);return r?(x.next=r.next,x.prev=r,r.next.prev=x,r.next=x):(x.prev=x,x.next=x),x}function w(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function F(t,e,n){return{i:t,x:e,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function E(t,e,n){const r=Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])),x=[(e[0]-t[0])/r,(e[1]-t[1])/r],o=[-x[1],x[0]],i=Math.sqrt((n[0]-t[0])*(n[0]-t[0])+(n[1]-t[1])*(n[1]-t[1])),f=[(n[0]-t[0])/i,(n[1]-t[1])/i];let u=0===r||0===i?0:Math.acos((s=f[0]*x[0]+f[1]*x[1],l=-1,c=1,Math.min(Math.max(s,l),c)));var s,l,c;u=Math.max(u,1e-5);return f[0]*o[0]+f[1]*o[1]>0?u:2*Math.PI-u}function I(t,e){const n=e[0],r=e[1];return e[0]=t[0]*n+t[2]*r+t[4],e[1]=t[1]*n+t[3]*r+t[5],e}function z(t,e){const n=(r=e)[0]*r[3]-r[1]*r[2];var r;!function(t,e){if(!t)throw new Error(e)}(0!==n,\\\"Transformation matrix cannot be inverted\\\");const x=e[0],o=e[1],i=e[2],f=e[3],u=e[4],s=e[5];return t[0]=f/n,t[1]=-o/n,t[2]=-i/n,t[3]=x/n,t[4]=(i*s-f*u)/n,t[5]=-(x*s-o*u)/n,t}new Array(6);const B=[],P={vertexAttributesPosition:0,instanceAttributesPosition:0,indicesPosition:0};function N(t,e,n,r,x){const o=t[e++],i=t[e++],f=B;f.length=r;for(let n=0;n<f.length;n++)f[n]=t[e+n];let u=x?x.instanceAttributesPosition:0;return n[u++]=o,n[u++]=i,f.length&&(n.set(f,u),u+=f.length),P.instanceAttributesPosition=u,P}function R(t,e,n,r,x,o,i,f,u,s){const l=[t[e],t[e+1]],c=[t[n],t[n+1]],a=t[e+2],y=t[n+2],h=I(f,[...l]),p=I(f,[...c]);let v=-1,b=-1,M=s;const m=null!==x;if(null!==r){v=E(h,p,I(f,[...[t[r],t[r+1]]])),Math.cos(v)<=.985&&(M+=Math.tan((v-Math.PI)/2))}if(m){b=E(p,h,I(f,[...[t[x],t[x+1]]])),Math.cos(b)<=.985&&(M+=Math.tan((Math.PI-b)/2))}const A=Math.pow(2,24),g=u%A,Z=Math.floor(u/A)*A;return o.push(l[0],l[1],a,c[0],c[1],y,v,b,g,Z,s),o.push(...i),{length:u+Math.sqrt((p[0]-h[0])*(p[0]-h[0])+(p[1]-h[1])*(p[1]-h[1])),angle:M}}function S(e,n,r,x,o){const i=2+o;let f=n;const u=e.slice(f,f+o);f+=o;const s=e[f++];let l=0;const c=new Array(s-1);for(let t=0;t<s;t++)l+=e[f++],t<s-1&&(c[t]=l);const a=e.slice(f,f+2*l),y=t(a,c,2);for(let t=0;t<y.length;t++)x.push(y[t]+r.length/i);for(let t=0;t<a.length;t+=2)r.push(a[t],a[t+1],...u);return f+2*l}const T=\\\"GENERATE_POLYGON_BUFFERS\\\",_=\\\"GENERATE_POINT_BUFFERS\\\",O=\\\"GENERATE_LINE_STRING_BUFFERS\\\",U=self;U.onmessage=t=>{const e=t.data;switch(e.type){case _:{const t=2,n=2,r=e.customAttributesSize,x=n+r,o=new Float32Array(e.renderInstructions),i=o.length/x*(t+r),f=Uint32Array.from([0,1,3,1,2,3]),u=Float32Array.from([-1,-1,1,-1,1,1,-1,1]),s=new Float32Array(i);let l;for(let t=0;t<o.length;t+=x)l=N(o,t,s,r,l);const c=Object.assign({indicesBuffer:f.buffer,vertexAttributesBuffer:u.buffer,instanceAttributesBuffer:s.buffer,renderInstructions:o.buffer},e);U.postMessage(c,[u.buffer,s.buffer,f.buffer,o.buffer]);break}case O:{const t=[],n=e.customAttributesSize,r=3,x=new Float32Array(e.renderInstructions);let o=0;const i=[1,0,0,1,0,0];let f,u;for(z(i,e.renderInstructionsTransform);o<x.length;){u=Array.from(x.slice(o,o+n)),o+=n,f=x[o++];const e=o,s=o+(f-1)*r,l=x[e]===x[s]&&x[e+1]===x[s+1];let c=0,a=0;for(let n=0;n<f-1;n++){let y=null;n>0?y=o+(n-1)*r:l&&(y=s-r);let h=null;n<f-2?h=o+(n+2)*r:l&&(h=e+r);const p=R(x,o+n*r,o+(n+1)*r,y,h,t,u,i,c,a);c=p.length,a=p.angle}o+=f*r}const s=Uint32Array.from([0,1,3,1,2,3]),l=Float32Array.from([-1,-1,1,-1,1,1,-1,1]),c=Float32Array.from(t),a=Object.assign({indicesBuffer:s.buffer,vertexAttributesBuffer:l.buffer,instanceAttributesBuffer:c.buffer,renderInstructions:x.buffer},e);U.postMessage(a,[l.buffer,c.buffer,s.buffer,x.buffer]);break}case T:{const t=[],n=[],r=e.customAttributesSize,x=new Float32Array(e.renderInstructions);let o=0;for(;o<x.length;)o=S(x,o,t,n,r);const i=Uint32Array.from(n),f=Float32Array.from(t),u=Float32Array.from([]),s=Object.assign({indicesBuffer:i.buffer,vertexAttributesBuffer:f.buffer,instanceAttributesBuffer:u.buffer,renderInstructions:x.buffer},e);U.postMessage(s,[f.buffer,u.buffer,i.buffer,x.buffer]);break}}};\";\n return new Worker(typeof Blob === 'undefined'\n ? 'data:application/javascript;base64,' + Buffer.from(source, 'binary').toString('base64')\n : URL.createObjectURL(new Blob([source], {type: 'application/javascript'})));\n }\n \n", "/**\n * @module ol/render/webgl/constants\n */\n\n/**\n * @enum {string}\n */\nexport const WebGLWorkerMessageType = {\n GENERATE_POLYGON_BUFFERS: 'GENERATE_POLYGON_BUFFERS',\n GENERATE_POINT_BUFFERS: 'GENERATE_POINT_BUFFERS',\n GENERATE_LINE_STRING_BUFFERS: 'GENERATE_LINE_STRING_BUFFERS',\n};\n\n/**\n * @typedef {Object} WebGLWorkerGenerateBuffersMessage\n * This message will trigger the generation of a vertex and an index buffer based on the given render instructions.\n * When the buffers are generated, the worked will send a message of the same type to the main thread, with\n * the generated buffers in it.\n * Note that any addition properties present in the message *will* be sent back to the main thread.\n * @property {number} id Message id; will be used both in request and response as a means of identification\n * @property {WebGLWorkerMessageType} type Message type\n * @property {ArrayBufferLike} renderInstructions render instructions raw binary buffer.\n * @property {number} [customAttributesSize] Amount of hit detection + custom attributes count in the render instructions.\n * @property {ArrayBuffer} [indicesBuffer] Indices array raw binary buffer (sent by the worker).\n * @property {ArrayBuffer} [vertexAttributesBuffer] Vertex attributes array raw binary buffer (sent by the worker).\n * @property {ArrayBuffer} [instanceAttributesBuffer] Instance attributes array raw binary buffer (sent by the worker).\n * @property {import(\"../../transform\").Transform} [renderInstructionsTransform] Transformation matrix used to project the instructions coordinates\n */\n", "/**\n * Utilities for encoding/decoding values to be used in shaders\n * @module ol/render/webgl/encodeUtil\n */\n\n/**\n * Generates a color array based on a numerical id, and pack it just like the `packColor` function of 'ol/render/webgl/compileUtil.js'.\n * Note: the range for each component is 0 to 1 with 256 steps\n * @param {number} id Id\n * @param {Array<number>} [array] Reusable array\n * @return {Array<number>} Packed color array with two components\n */\nexport function colorEncodeIdAndPack(id, array) {\n array = array || [];\n const radix = 256;\n const divide = radix - 1;\n const r = Math.floor(id / radix / radix / radix) / divide;\n const g = (Math.floor(id / radix / radix) % radix) / divide;\n const b = (Math.floor(id / radix) % radix) / divide;\n const a = (id % radix) / divide;\n array[0] = r * 256 * 255 + g * 255;\n array[1] = b * 256 * 255 + a * 255;\n return array;\n}\n\n/**\n * Reads an id from a color-encoded array\n * Note: the expected range for each component is 0 to 1 with 256 steps.\n * @param {Array<number>} color Color array containing the encoded id; color components are in the range 0 to 1\n * @return {number} Decoded id\n */\nexport function colorDecodeId(color) {\n let id = 0;\n const radix = 256;\n const mult = radix - 1;\n id += Math.round(color[0] * radix * radix * radix * mult);\n id += Math.round(color[1] * radix * radix * mult);\n id += Math.round(color[2] * radix * mult);\n id += Math.round(color[3] * mult);\n return id;\n}\n", "/**\n * @module ol/render/webgl/renderinstructions\n */\nimport {UNDEFINED_PROP_VALUE} from '../../expr/gpu.js';\nimport {transform2D} from '../../geom/flat/transform.js';\nimport {apply as applyTransform} from '../../transform.js';\n\n/**\n * @param {Float32Array} renderInstructions Render instructions\n * @param {import('./VectorStyleRenderer.js').AttributeDefinitions} customAttributes Custom attributes\n * @param {import(\"./MixedGeometryBatch.js\").GeometryBatchItem} batchEntry Batch item\n * @param {number} currentIndex Current index\n * @return {number} The amount of values pushed\n */\nfunction pushCustomAttributesInRenderInstructions(\n renderInstructions,\n customAttributes,\n batchEntry,\n currentIndex,\n) {\n let shift = 0;\n for (const key in customAttributes) {\n const attr = customAttributes[key];\n const value = attr.callback.call(batchEntry, batchEntry.feature);\n let first = value?.[0] ?? value;\n if (first === UNDEFINED_PROP_VALUE) {\n console.warn('The \"has\" operator might return false positives.'); // eslint-disable-line no-console\n }\n if (first === undefined) {\n first = UNDEFINED_PROP_VALUE;\n } else if (first === null) {\n first = 0;\n }\n renderInstructions[currentIndex + shift++] = first;\n if (!attr.size || attr.size === 1) {\n continue;\n }\n renderInstructions[currentIndex + shift++] = value[1];\n if (attr.size < 3) {\n continue;\n }\n renderInstructions[currentIndex + shift++] = value[2];\n if (attr.size < 4) {\n continue;\n }\n renderInstructions[currentIndex + shift++] = value[3];\n }\n return shift;\n}\n\n/**\n * @param {import('./VectorStyleRenderer.js').AttributeDefinitions} customAttributes Custom attributes\n * @return {number} Cumulated size of all attributes\n */\nexport function getCustomAttributesSize(customAttributes) {\n return Object.keys(customAttributes).reduce(\n (prev, curr) => prev + (customAttributes[curr].size || 1),\n 0,\n );\n}\n\n/**\n * Render instructions for lines are structured like so:\n * [ x0, y0, customAttr0, ... , xN, yN, customAttrN ]\n * @param {import(\"./MixedGeometryBatch.js\").PointGeometryBatch} batch Point geometry batch\n * @param {Float32Array} renderInstructions Render instructions\n * @param {import('./VectorStyleRenderer.js').AttributeDefinitions} customAttributes Custom attributes\n * @param {import(\"../../transform.js\").Transform} transform Transform to apply to coordinates\n * @return {Float32Array} Generated render instructions\n */\nexport function generatePointRenderInstructions(\n batch,\n renderInstructions,\n customAttributes,\n transform,\n) {\n // here we anticipate the amount of render instructions for points:\n // 2 instructions per vertex for position (x and y)\n // + 1 instruction per vertex per custom attributes\n const totalInstructionsCount =\n (2 + getCustomAttributesSize(customAttributes)) * batch.geometriesCount;\n if (\n !renderInstructions ||\n renderInstructions.length !== totalInstructionsCount\n ) {\n renderInstructions = new Float32Array(totalInstructionsCount);\n }\n\n // loop on features to fill the render instructions\n const tmpCoords = [];\n let renderIndex = 0;\n for (const featureUid in batch.entries) {\n const batchEntry = batch.entries[featureUid];\n for (let i = 0, ii = batchEntry.flatCoordss.length; i < ii; i++) {\n tmpCoords[0] = batchEntry.flatCoordss[i][0];\n tmpCoords[1] = batchEntry.flatCoordss[i][1];\n applyTransform(transform, tmpCoords);\n\n renderInstructions[renderIndex++] = tmpCoords[0];\n renderInstructions[renderIndex++] = tmpCoords[1];\n renderIndex += pushCustomAttributesInRenderInstructions(\n renderInstructions,\n customAttributes,\n batchEntry,\n renderIndex,\n );\n }\n }\n return renderInstructions;\n}\n\n/**\n * Render instructions for lines are structured like so:\n * [ customAttr0, ... , customAttrN, numberOfVertices0, x0, y0, ... , xN, yN, numberOfVertices1, ... ]\n * @param {import(\"./MixedGeometryBatch.js\").LineStringGeometryBatch} batch Line String geometry batch\n * @param {Float32Array} renderInstructions Render instructions\n * @param {import('./VectorStyleRenderer.js').AttributeDefinitions} customAttributes Custom attributes\n * @param {import(\"../../transform.js\").Transform} transform Transform to apply to coordinates\n * @return {Float32Array} Generated render instructions\n */\nexport function generateLineStringRenderInstructions(\n batch,\n renderInstructions,\n customAttributes,\n transform,\n) {\n // here we anticipate the amount of render instructions for lines:\n // 3 instructions per vertex for position (x, y and m)\n // + 1 instruction per line per custom attributes\n // + 1 instruction per line (for vertices count)\n const totalInstructionsCount =\n 3 * batch.verticesCount +\n (1 + getCustomAttributesSize(customAttributes)) * batch.geometriesCount;\n if (\n !renderInstructions ||\n renderInstructions.length !== totalInstructionsCount\n ) {\n renderInstructions = new Float32Array(totalInstructionsCount);\n }\n\n // loop on features to fill the render instructions\n const flatCoords = [];\n let renderIndex = 0;\n for (const featureUid in batch.entries) {\n const batchEntry = batch.entries[featureUid];\n for (let i = 0, ii = batchEntry.flatCoordss.length; i < ii; i++) {\n flatCoords.length = batchEntry.flatCoordss[i].length;\n transform2D(\n batchEntry.flatCoordss[i],\n 0,\n flatCoords.length,\n 3,\n transform,\n flatCoords,\n 3,\n );\n renderIndex += pushCustomAttributesInRenderInstructions(\n renderInstructions,\n customAttributes,\n batchEntry,\n renderIndex,\n );\n\n // vertices count\n renderInstructions[renderIndex++] = flatCoords.length / 3;\n\n // looping on points for positions\n for (let j = 0, jj = flatCoords.length; j < jj; j += 3) {\n renderInstructions[renderIndex++] = flatCoords[j];\n renderInstructions[renderIndex++] = flatCoords[j + 1];\n renderInstructions[renderIndex++] = flatCoords[j + 2];\n }\n }\n }\n return renderInstructions;\n}\n\n/**\n * Render instructions for polygons are structured like so:\n * [ customAttr0, ..., customAttrN, numberOfRings, numberOfVerticesInRing0, ..., numberOfVerticesInRingN, x0, y0, ..., xN, yN, numberOfRings,... ]\n * @param {import(\"./MixedGeometryBatch.js\").PolygonGeometryBatch} batch Polygon geometry batch\n * @param {Float32Array} renderInstructions Render instructions\n * @param {import('./VectorStyleRenderer.js').AttributeDefinitions} customAttributes Custom attributes\n * @param {import(\"../../transform.js\").Transform} transform Transform to apply to coordinates\n * @return {Float32Array} Generated render instructions\n */\nexport function generatePolygonRenderInstructions(\n batch,\n renderInstructions,\n customAttributes,\n transform,\n) {\n // here we anticipate the amount of render instructions for polygons:\n // 2 instructions per vertex for position (x and y)\n // + 1 instruction per polygon per custom attributes\n // + 1 instruction per polygon (for vertices count in polygon)\n // + 1 instruction per ring (for vertices count in ring)\n const totalInstructionsCount =\n 2 * batch.verticesCount +\n (1 + getCustomAttributesSize(customAttributes)) * batch.geometriesCount +\n batch.ringsCount;\n if (\n !renderInstructions ||\n renderInstructions.length !== totalInstructionsCount\n ) {\n renderInstructions = new Float32Array(totalInstructionsCount);\n }\n\n // loop on features to fill the render instructions\n const flatCoords = [];\n let renderIndex = 0;\n for (const featureUid in batch.entries) {\n const batchEntry = batch.entries[featureUid];\n for (let i = 0, ii = batchEntry.flatCoordss.length; i < ii; i++) {\n flatCoords.length = batchEntry.flatCoordss[i].length;\n transform2D(\n batchEntry.flatCoordss[i],\n 0,\n flatCoords.length,\n 2,\n transform,\n flatCoords,\n );\n renderIndex += pushCustomAttributesInRenderInstructions(\n renderInstructions,\n customAttributes,\n batchEntry,\n renderIndex,\n );\n\n // ring count\n renderInstructions[renderIndex++] =\n batchEntry.ringsVerticesCounts[i].length;\n\n // vertices count in each ring\n for (\n let j = 0, jj = batchEntry.ringsVerticesCounts[i].length;\n j < jj;\n j++\n ) {\n renderInstructions[renderIndex++] =\n batchEntry.ringsVerticesCounts[i][j];\n }\n\n // looping on points for positions\n for (let j = 0, jj = flatCoords.length; j < jj; j += 2) {\n renderInstructions[renderIndex++] = flatCoords[j];\n renderInstructions[renderIndex++] = flatCoords[j + 1];\n }\n }\n }\n return renderInstructions;\n}\n", "/**\n * Utilities for parsing flat styles for WebGL renderers\n * @module ol/render/webgl/style\n */\nimport {assert} from '../../asserts.js';\nimport {\n BooleanType,\n ColorType,\n NumberArrayType,\n NumberType,\n SizeType,\n StringType,\n computeGeometryType,\n} from '../../expr/expression.js';\nimport {\n FEATURE_ID_PROPERTY_NAME,\n GEOMETRY_TYPE_PROPERTY_NAME,\n getStringNumberEquivalent,\n newCompilationContext,\n stringToGlsl,\n} from '../../expr/gpu.js';\nimport {ShaderBuilder} from './ShaderBuilder.js';\nimport {\n applyContextToBuilder,\n expressionToGlsl,\n generateAttributesFromContext,\n generateUniformsFromContext,\n getGlslSizeFromType,\n getGlslTypeFromType,\n} from './compileUtil.js';\n\n/**\n * see https://stackoverflow.com/questions/7616461/generate-a-hash-from-string-in-javascript\n * @param {Object|string} input The hash input, either an object or string\n * @return {string} Hash (if the object cannot be serialized, it is based on `getUid`)\n */\nexport function computeHash(input) {\n const hash = JSON.stringify(input)\n .split('')\n .reduce((prev, curr) => (prev << 5) - prev + curr.charCodeAt(0), 0);\n return (hash >>> 0).toString();\n}\n\n/**\n * @param {import(\"../../style/flat.js\").FlatStyle} style Style\n * @param {ShaderBuilder} builder Shader builder\n * @param {import(\"../../expr/gpu.js\").CompilationContext} vertContext Vertex shader compilation context\n * @param {'shape-'|'circle-'|'icon-'} prefix Properties prefix\n */\nfunction parseCommonSymbolProperties(style, builder, vertContext, prefix) {\n if (`${prefix}radius` in style && prefix !== 'icon-') {\n let radius = expressionToGlsl(\n vertContext,\n style[`${prefix}radius`],\n NumberType,\n );\n if (`${prefix}radius2` in style) {\n const radius2 = expressionToGlsl(\n vertContext,\n style[`${prefix}radius2`],\n NumberType,\n );\n radius = `max(${radius}, ${radius2})`;\n }\n if (`${prefix}stroke-width` in style) {\n radius = `(${radius} + ${expressionToGlsl(\n vertContext,\n style[`${prefix}stroke-width`],\n NumberType,\n )} * 0.5)`;\n }\n builder.setSymbolSizeExpression(`vec2(${radius} * 2. + 0.5)`); // adding some padding for antialiasing\n }\n if (`${prefix}scale` in style) {\n const scale = expressionToGlsl(\n vertContext,\n style[`${prefix}scale`],\n SizeType,\n );\n builder.setSymbolSizeExpression(\n `${builder.getSymbolSizeExpression()} * ${scale}`,\n );\n }\n if (`${prefix}displacement` in style) {\n builder.setSymbolOffsetExpression(\n expressionToGlsl(\n vertContext,\n style[`${prefix}displacement`],\n NumberArrayType,\n ),\n );\n }\n if (`${prefix}rotation` in style) {\n builder.setSymbolRotationExpression(\n expressionToGlsl(vertContext, style[`${prefix}rotation`], NumberType),\n );\n }\n if (`${prefix}rotate-with-view` in style) {\n builder.setSymbolRotateWithView(!!style[`${prefix}rotate-with-view`]);\n }\n}\n\n/**\n * @param {string} distanceField The distance field expression\n * @param {string|null} fillColor The fill color expression; null if no fill\n * @param {string|null} strokeColor The stroke color expression; null if no stroke\n * @param {string|null} strokeWidth The stroke width expression; null if no stroke\n * @param {string|null} opacity The opacity expression; null if no stroke\n * @return {string} The final color expression, based on the distance field and given params\n */\nfunction getColorFromDistanceField(\n distanceField,\n fillColor,\n strokeColor,\n strokeWidth,\n opacity,\n) {\n let color = 'vec4(0.)';\n if (fillColor !== null) {\n color = fillColor;\n }\n if (strokeColor !== null && strokeWidth !== null) {\n const strokeFillRatio = `smoothstep(-${strokeWidth} + 0.63, -${strokeWidth} - 0.58, ${distanceField})`;\n color = `mix(${strokeColor}, ${color}, ${strokeFillRatio})`;\n }\n const shapeOpacity = `(1.0 - smoothstep(-0.63, 0.58, ${distanceField}))`;\n let result = `${color} * vec4(1.0, 1.0, 1.0, ${shapeOpacity})`;\n if (opacity !== null) {\n result = `${result} * vec4(1.0, 1.0, 1.0, ${opacity})`;\n }\n return result;\n}\n\n/**\n * This will parse an image property provided by `<prefix>-src`\n * The image size expression in GLSL will be returned\n * @param {import(\"../../style/flat.js\").FlatStyle} style Style\n * @param {ShaderBuilder} builder Shader builder\n * @param {Object<string,import(\"../../webgl/Helper\").UniformValue>} uniforms Uniforms\n * @param {'icon-'|'fill-pattern-'|'stroke-pattern-'} prefix Property prefix\n * @param {string} textureId A identifier that will be used in the generated uniforms: `sample2d u_texture<id>` and `vec2 u_texture<id>_size`\n * @return {string} The image size expression\n */\nfunction parseImageProperties(style, builder, uniforms, prefix, textureId) {\n const image = new Image();\n image.crossOrigin =\n style[`${prefix}cross-origin`] === undefined\n ? 'anonymous'\n : style[`${prefix}cross-origin`];\n assert(\n typeof style[`${prefix}src`] === 'string',\n `WebGL layers do not support expressions for the ${prefix}src style property`,\n );\n image.src = /** @type {string} */ (style[`${prefix}src`]);\n\n // the size is provided asynchronously using a uniform\n uniforms[`u_texture${textureId}_size`] = () => {\n return image.complete ? [image.width, image.height] : [0, 0];\n };\n builder.addUniform(`u_texture${textureId}_size`, 'vec2');\n const size = `u_texture${textureId}_size`;\n\n uniforms[`u_texture${textureId}`] = image;\n builder.addUniform(`u_texture${textureId}`, 'sampler2D');\n return size;\n}\n\n/**\n * This will parse an image's offset properties provided by `<prefix>-offset`, `<prefix>-offset-origin` and `<prefix>-size`\n * @param {import(\"../../style/flat.js\").FlatStyle} style Style\n * @param {'icon-'|'fill-pattern-'|'stroke-pattern-'} prefix Property prefix\n * @param {import(\"../../expr/gpu.js\").CompilationContext} context Shader compilation context (vertex or fragment)\n * @param {string} imageSize Pixel size of the full image as a GLSL expression\n * @param {string} sampleSize Pixel size of the sample in the image as a GLSL expression\n * @return {string} The offset expression\n */\nfunction parseImageOffsetProperties(\n style,\n prefix,\n context,\n imageSize,\n sampleSize,\n) {\n let offsetExpression = expressionToGlsl(\n context,\n style[`${prefix}offset`],\n SizeType,\n );\n if (`${prefix}offset-origin` in style) {\n switch (style[`${prefix}offset-origin`]) {\n case 'top-right':\n offsetExpression = `vec2(${imageSize}.x, 0.) + ${sampleSize} * vec2(-1., 0.) + ${offsetExpression} * vec2(-1., 1.)`;\n break;\n case 'bottom-left':\n offsetExpression = `vec2(0., ${imageSize}.y) + ${sampleSize} * vec2(0., -1.) + ${offsetExpression} * vec2(1., -1.)`;\n break;\n case 'bottom-right':\n offsetExpression = `${imageSize} - ${sampleSize} - ${offsetExpression}`;\n break;\n default: // pass\n }\n }\n return offsetExpression;\n}\n\n/**\n * @param {import(\"../../style/flat.js\").FlatStyle} style Style\n * @param {ShaderBuilder} builder Shader builder\n * @param {Object<string,import(\"../../webgl/Helper\").UniformValue>} uniforms Uniforms\n * @param {import(\"../../expr/gpu.js\").CompilationContext} context Shader compilation context\n */\nfunction parseCircleProperties(style, builder, uniforms, context) {\n // this function takes in screen coordinates in pixels and returns the signed distance field\n // (0 on the boundary, negative inside the circle, positive outside, values in pixels)\n context.functions['circleDistanceField'] =\n `float circleDistanceField(vec2 point, float radius) {\n return length(point) - radius;\n}`;\n\n parseCommonSymbolProperties(style, builder, context, 'circle-');\n\n // OPACITY\n let opacity = null;\n if ('circle-opacity' in style) {\n opacity = expressionToGlsl(context, style['circle-opacity'], NumberType);\n }\n\n // SCALE\n let currentPoint = 'coordsPx';\n if ('circle-scale' in style) {\n const scale = expressionToGlsl(context, style['circle-scale'], SizeType);\n currentPoint = `coordsPx / ${scale}`;\n }\n\n // FILL COLOR\n let fillColor = null;\n if ('circle-fill-color' in style) {\n fillColor = expressionToGlsl(\n context,\n style['circle-fill-color'],\n ColorType,\n );\n }\n\n // STROKE COLOR\n let strokeColor = null;\n if ('circle-stroke-color' in style) {\n strokeColor = expressionToGlsl(\n context,\n style['circle-stroke-color'],\n ColorType,\n );\n }\n\n // RADIUS\n let radius = expressionToGlsl(context, style['circle-radius'], NumberType);\n\n // STROKE WIDTH\n let strokeWidth = null;\n if ('circle-stroke-width' in style) {\n strokeWidth = expressionToGlsl(\n context,\n style['circle-stroke-width'],\n NumberType,\n );\n radius = `(${radius} + ${strokeWidth} * 0.5)`;\n }\n\n // FINAL COLOR\n const distanceField = `circleDistanceField(${currentPoint}, ${radius})`;\n const colorExpression = getColorFromDistanceField(\n distanceField,\n fillColor,\n strokeColor,\n strokeWidth,\n opacity,\n );\n builder.setSymbolColorExpression(colorExpression);\n}\n\n/**\n * @param {import(\"../../style/flat.js\").FlatStyle} style Style\n * @param {ShaderBuilder} builder Shader builder\n * @param {Object<string,import(\"../../webgl/Helper\").UniformValue>} uniforms Uniforms\n * @param {import(\"../../expr/gpu.js\").CompilationContext} context Shader compilation context\n */\nfunction parseShapeProperties(style, builder, uniforms, context) {\n context.functions['round'] = `float round(float v) {\n return sign(v) * floor(abs(v) + 0.5);\n}`;\n\n // these functions take in screen coordinates in pixels and returns the signed distance field\n // (0 on the boundary, negative inside the polygon, positive outside, values in pixels)\n // inspired by https://github.com/zranger1/PixelblazePatterns/blob/master/Toolkit/sdf2d.md#n-sided-regular-polygon\n context.functions['starDistanceField'] =\n `float starDistanceField(vec2 point, float numPoints, float radius, float radius2, float angle) {\n float startAngle = -PI * 0.5 + angle; // tip starts upwards and rotates clockwise with angle\n float c = cos(startAngle);\n float s = sin(startAngle);\n vec2 pointRotated = vec2(c * point.x - s * point.y, s * point.x + c * point.y);\n float alpha = TWO_PI / numPoints; // the angle of one sector\n float beta = atan(pointRotated.y, pointRotated.x);\n float gamma = round(beta / alpha) * alpha; // angle in sector\n c = cos(-gamma);\n s = sin(-gamma);\n vec2 inSector = vec2(c * pointRotated.x - s * pointRotated.y, abs(s * pointRotated.x + c * pointRotated.y));\n vec2 tipToPoint = inSector + vec2(-radius, 0.);\n vec2 edgeNormal = vec2(radius2 * sin(alpha * 0.5), -radius2 * cos(alpha * 0.5) + radius);\n return dot(normalize(edgeNormal), tipToPoint);\n}`;\n context.functions['regularDistanceField'] =\n `float regularDistanceField(vec2 point, float numPoints, float radius, float angle) {\n float startAngle = -PI * 0.5 + angle; // tip starts upwards and rotates clockwise with angle\n float c = cos(startAngle);\n float s = sin(startAngle);\n vec2 pointRotated = vec2(c * point.x - s * point.y, s * point.x + c * point.y);\n float alpha = TWO_PI / numPoints; // the angle of one sector\n float radiusIn = radius * cos(PI / numPoints);\n float beta = atan(pointRotated.y, pointRotated.x);\n float gamma = round((beta - alpha * 0.5) / alpha) * alpha + alpha * 0.5; // angle in sector from mid\n c = cos(-gamma);\n s = sin(-gamma);\n vec2 inSector = vec2(c * pointRotated.x - s * pointRotated.y, abs(s * pointRotated.x + c * pointRotated.y));\n return inSector.x - radiusIn;\n}`;\n\n parseCommonSymbolProperties(style, builder, context, 'shape-');\n\n // OPACITY\n let opacity = null;\n if ('shape-opacity' in style) {\n opacity = expressionToGlsl(context, style['shape-opacity'], NumberType);\n }\n\n // SCALE\n let currentPoint = 'coordsPx';\n if ('shape-scale' in style) {\n const scale = expressionToGlsl(context, style['shape-scale'], SizeType);\n currentPoint = `coordsPx / ${scale}`;\n }\n\n // FILL COLOR\n let fillColor = null;\n if ('shape-fill-color' in style) {\n fillColor = expressionToGlsl(context, style['shape-fill-color'], ColorType);\n }\n\n // STROKE COLOR\n let strokeColor = null;\n if ('shape-stroke-color' in style) {\n strokeColor = expressionToGlsl(\n context,\n style['shape-stroke-color'],\n ColorType,\n );\n }\n\n // STROKE WIDTH\n let strokeWidth = null;\n if ('shape-stroke-width' in style) {\n strokeWidth = expressionToGlsl(\n context,\n style['shape-stroke-width'],\n NumberType,\n );\n }\n\n // SHAPE TYPE\n const numPoints = expressionToGlsl(\n context,\n style['shape-points'],\n NumberType,\n );\n let angle = '0.';\n if ('shape-angle' in style) {\n angle = expressionToGlsl(context, style['shape-angle'], NumberType);\n }\n let shapeField;\n let radius = expressionToGlsl(context, style['shape-radius'], NumberType);\n if (strokeWidth !== null) {\n radius = `${radius} + ${strokeWidth} * 0.5`;\n }\n if ('shape-radius2' in style) {\n let radius2 = expressionToGlsl(context, style['shape-radius2'], NumberType);\n if (strokeWidth !== null) {\n radius2 = `${radius2} + ${strokeWidth} * 0.5`;\n }\n shapeField = `starDistanceField(${currentPoint}, ${numPoints}, ${radius}, ${radius2}, ${angle})`;\n } else {\n shapeField = `regularDistanceField(${currentPoint}, ${numPoints}, ${radius}, ${angle})`;\n }\n\n // FINAL COLOR\n const colorExpression = getColorFromDistanceField(\n shapeField,\n fillColor,\n strokeColor,\n strokeWidth,\n opacity,\n );\n builder.setSymbolColorExpression(colorExpression);\n}\n\n/**\n * @param {import(\"../../style/flat.js\").FlatStyle} style Style\n * @param {ShaderBuilder} builder Shader builder\n * @param {Object<string,import(\"../../webgl/Helper\").UniformValue>} uniforms Uniforms\n * @param {import(\"../../expr/gpu.js\").CompilationContext} context Shader compilation context\n */\nfunction parseIconProperties(style, builder, uniforms, context) {\n // COLOR\n let color = 'vec4(1.0)';\n if ('icon-color' in style) {\n color = expressionToGlsl(context, style['icon-color'], ColorType);\n }\n\n // OPACITY\n if ('icon-opacity' in style) {\n color = `${color} * vec4(1.0, 1.0, 1.0, ${expressionToGlsl(\n context,\n style['icon-opacity'],\n NumberType,\n )})`;\n }\n\n // IMAGE & SIZE\n const textureId = computeHash(style['icon-src']);\n const sizeExpression = parseImageProperties(\n style,\n builder,\n uniforms,\n 'icon-',\n textureId,\n );\n builder\n .setSymbolColorExpression(\n `${color} * texture2D(u_texture${textureId}, v_texCoord)`,\n )\n .setSymbolSizeExpression(sizeExpression);\n\n // override size if width/height were specified\n if ('icon-width' in style && 'icon-height' in style) {\n builder.setSymbolSizeExpression(\n `vec2(${expressionToGlsl(\n context,\n style['icon-width'],\n NumberType,\n )}, ${expressionToGlsl(context, style['icon-height'], NumberType)})`,\n );\n }\n\n // tex coord\n if ('icon-offset' in style && 'icon-size' in style) {\n const sampleSize = expressionToGlsl(\n context,\n style['icon-size'],\n NumberArrayType,\n );\n const fullsize = builder.getSymbolSizeExpression();\n builder.setSymbolSizeExpression(sampleSize);\n const offset = parseImageOffsetProperties(\n style,\n 'icon-',\n context,\n 'v_quadSizePx',\n sampleSize,\n );\n builder.setTextureCoordinateExpression(\n `(vec4((${offset}).xyxy) + vec4(0., 0., ${sampleSize})) / (${fullsize}).xyxy`,\n );\n }\n\n parseCommonSymbolProperties(style, builder, context, 'icon-');\n\n if ('icon-anchor' in style) {\n const anchor = expressionToGlsl(\n context,\n style['icon-anchor'],\n NumberArrayType,\n );\n let scale = `1.0`;\n if (`icon-scale` in style) {\n scale = expressionToGlsl(context, style[`icon-scale`], SizeType);\n }\n let shiftPx;\n if (\n style['icon-anchor-x-units'] === 'pixels' &&\n style['icon-anchor-y-units'] === 'pixels'\n ) {\n shiftPx = `${anchor} * ${scale}`;\n } else if (style['icon-anchor-x-units'] === 'pixels') {\n shiftPx = `${anchor} * vec2(vec2(${scale}).x, v_quadSizePx.y)`;\n } else if (style['icon-anchor-y-units'] === 'pixels') {\n shiftPx = `${anchor} * vec2(v_quadSizePx.x, vec2(${scale}).x)`;\n } else {\n shiftPx = `${anchor} * v_quadSizePx`;\n }\n // default origin is top-left\n let offsetPx = `v_quadSizePx * vec2(0.5, -0.5) + ${shiftPx} * vec2(-1., 1.)`;\n if ('icon-anchor-origin' in style) {\n switch (style['icon-anchor-origin']) {\n case 'top-right':\n offsetPx = `v_quadSizePx * -0.5 + ${shiftPx}`;\n break;\n case 'bottom-left':\n offsetPx = `v_quadSizePx * 0.5 - ${shiftPx}`;\n break;\n case 'bottom-right':\n offsetPx = `v_quadSizePx * vec2(-0.5, 0.5) + ${shiftPx} * vec2(1., -1.)`;\n break;\n default: // pass\n }\n }\n builder.setSymbolOffsetExpression(\n `${builder.getSymbolOffsetExpression()} + ${offsetPx}`,\n );\n }\n}\n\n/**\n * @param {import(\"../../style/flat.js\").FlatStyle} style Style\n * @param {ShaderBuilder} builder Shader Builder\n * @param {Object<string,import(\"../../webgl/Helper\").UniformValue>} uniforms Uniforms\n * @param {import(\"../../expr/gpu.js\").CompilationContext} context Shader compilation context\n */\nfunction parseStrokeProperties(style, builder, uniforms, context) {\n if ('stroke-color' in style) {\n builder.setStrokeColorExpression(\n expressionToGlsl(context, style['stroke-color'], ColorType),\n );\n }\n if ('stroke-pattern-src' in style) {\n const textureId = computeHash(style['stroke-pattern-src']);\n const sizeExpression = parseImageProperties(\n style,\n builder,\n uniforms,\n 'stroke-pattern-',\n textureId,\n );\n let sampleSizeExpression = sizeExpression;\n let offsetExpression = 'vec2(0.)';\n if ('stroke-pattern-offset' in style && 'stroke-pattern-size' in style) {\n sampleSizeExpression = expressionToGlsl(\n context,\n style[`stroke-pattern-size`],\n NumberArrayType,\n );\n offsetExpression = parseImageOffsetProperties(\n style,\n 'stroke-pattern-',\n context,\n sizeExpression,\n sampleSizeExpression,\n );\n }\n let spacingExpression = '0.';\n if ('stroke-pattern-spacing' in style) {\n spacingExpression = expressionToGlsl(\n context,\n style['stroke-pattern-spacing'],\n NumberType,\n );\n }\n let startOffsetExpression = '0.';\n if ('stroke-pattern-start-offset' in style) {\n startOffsetExpression = expressionToGlsl(\n context,\n style['stroke-pattern-start-offset'],\n NumberType,\n );\n }\n context.functions['sampleStrokePattern'] =\n `vec4 sampleStrokePattern(sampler2D texture, vec2 textureSize, vec2 textureOffset, vec2 sampleSize, float spacingPx, float startOffsetPx, float currentLengthPx, float currentRadiusRatio, float lineWidth) {\n float currentLengthScaled = (currentLengthPx - startOffsetPx) * sampleSize.y / lineWidth;\n float spacingScaled = spacingPx * sampleSize.y / lineWidth;\n float uCoordPx = mod(currentLengthScaled, (sampleSize.x + spacingScaled));\n float isInsideOfPattern = step(uCoordPx, sampleSize.x);\n float vCoordPx = (-currentRadiusRatio * 0.5 + 0.5) * sampleSize.y;\n // make sure that we're not sampling too close to the borders to avoid interpolation with outside pixels\n uCoordPx = clamp(uCoordPx, 0.5, sampleSize.x - 0.5);\n vCoordPx = clamp(vCoordPx, 0.5, sampleSize.y - 0.5);\n vec2 texCoord = (vec2(uCoordPx, vCoordPx) + textureOffset) / textureSize;\n return texture2D(texture, texCoord) * vec4(1.0, 1.0, 1.0, isInsideOfPattern);\n}`;\n const textureName = `u_texture${textureId}`;\n let tintExpression = '1.';\n if ('stroke-color' in style) {\n tintExpression = builder.getStrokeColorExpression();\n }\n builder.setStrokeColorExpression(\n `${tintExpression} * sampleStrokePattern(${textureName}, ${sizeExpression}, ${offsetExpression}, ${sampleSizeExpression}, ${spacingExpression}, ${startOffsetExpression}, currentLengthPx, currentRadiusRatio, v_width)`,\n );\n\n context.functions['computeStrokePatternLength'] =\n `float computeStrokePatternLength(vec2 sampleSize, float spacingPx, float lineWidth) {\n float patternLengthPx = sampleSize.x / sampleSize.y * lineWidth;\n return patternLengthPx + spacingPx;\n}`;\n\n // apply a stroke pattern length to avoid visual artifacts\n builder.setStrokePatternLengthExpression(\n `computeStrokePatternLength(${sampleSizeExpression}, ${spacingExpression}, v_width)`,\n );\n }\n\n if ('stroke-width' in style) {\n builder.setStrokeWidthExpression(\n expressionToGlsl(context, style['stroke-width'], NumberType),\n );\n }\n\n if ('stroke-offset' in style) {\n builder.setStrokeOffsetExpression(\n expressionToGlsl(context, style['stroke-offset'], NumberType),\n );\n }\n\n if ('stroke-line-cap' in style) {\n builder.setStrokeCapExpression(\n expressionToGlsl(context, style['stroke-line-cap'], StringType),\n );\n }\n\n if ('stroke-line-join' in style) {\n builder.setStrokeJoinExpression(\n expressionToGlsl(context, style['stroke-line-join'], StringType),\n );\n }\n\n if ('stroke-miter-limit' in style) {\n builder.setStrokeMiterLimitExpression(\n expressionToGlsl(context, style['stroke-miter-limit'], NumberType),\n );\n }\n\n if ('stroke-line-dash' in style) {\n context.functions['getSingleDashDistance'] =\n `float getSingleDashDistance(float distance, float radius, float dashOffset, float dashLength, float dashLengthTotal, float capType, float lineWidth) {\n float localDistance = mod(distance, dashLengthTotal);\n float distanceSegment = abs(localDistance - dashOffset - dashLength * 0.5) - dashLength * 0.5;\n distanceSegment = min(distanceSegment, dashLengthTotal - localDistance);\n if (capType == ${stringToGlsl('square')}) {\n distanceSegment -= lineWidth * 0.5;\n } else if (capType == ${stringToGlsl('round')}) {\n distanceSegment = min(distanceSegment, sqrt(distanceSegment * distanceSegment + radius * radius) - lineWidth * 0.5);\n }\n return distanceSegment;\n}`;\n\n let dashPattern = style['stroke-line-dash'].map((v) =>\n expressionToGlsl(context, v, NumberType),\n );\n // if pattern has odd length, concatenate it with itself to be even\n if (dashPattern.length % 2 === 1) {\n dashPattern = [...dashPattern, ...dashPattern];\n }\n\n let offsetExpression = '0.';\n if ('stroke-line-dash-offset' in style) {\n offsetExpression = expressionToGlsl(\n context,\n style['stroke-line-dash-offset'],\n NumberType,\n );\n }\n\n // define a function for this dash specifically\n const uniqueDashKey = computeHash(style['stroke-line-dash']);\n const dashFunctionName = `dashDistanceField_${uniqueDashKey}`;\n\n const dashLengthsParamsDef = dashPattern\n .map((v, i) => `float dashLength${i}`)\n .join(', ');\n const totalLengthDef = dashPattern\n .map((v, i) => `dashLength${i}`)\n .join(' + ');\n let currentDashOffset = '0.';\n let distanceExpression = `getSingleDashDistance(distance, radius, ${currentDashOffset}, dashLength0, totalDashLength, capType, lineWidth)`;\n for (let i = 2; i < dashPattern.length; i += 2) {\n currentDashOffset = `${currentDashOffset} + dashLength${\n i - 2\n } + dashLength${i - 1}`;\n distanceExpression = `min(${distanceExpression}, getSingleDashDistance(distance, radius, ${currentDashOffset}, dashLength${i}, totalDashLength, capType, lineWidth))`;\n }\n\n context.functions[dashFunctionName] =\n `float ${dashFunctionName}(float distance, float radius, float capType, float lineWidth, ${dashLengthsParamsDef}) {\n float totalDashLength = ${totalLengthDef};\n return ${distanceExpression};\n}`;\n const dashLengthsCalls = dashPattern.map((v, i) => `${v}`).join(', ');\n builder.setStrokeDistanceFieldExpression(\n `${dashFunctionName}(currentLengthPx + ${offsetExpression}, currentRadiusPx, capType, v_width, ${dashLengthsCalls})`,\n );\n\n // apply a stroke pattern length to avoid visual artifacts\n let patternLength = dashPattern.join(' + ');\n if (builder.getStrokePatternLengthExpression()) {\n context.functions['combinePatternLengths'] =\n `float combinePatternLengths(float patternLength1, float patternLength2) {\n return patternLength1 * patternLength2;\n}`;\n patternLength = `combinePatternLengths(${builder.getStrokePatternLengthExpression()}, ${patternLength})`;\n }\n builder.setStrokePatternLengthExpression(patternLength);\n }\n}\n\n/**\n * @param {import(\"../../style/flat.js\").FlatStyle} style Style\n * @param {ShaderBuilder} builder Shader Builder\n * @param {Object<string,import(\"../../webgl/Helper\").UniformValue>} uniforms Uniforms\n * @param {import(\"../../expr/gpu.js\").CompilationContext} context Shader compilation context\n */\nfunction parseFillProperties(style, builder, uniforms, context) {\n if ('fill-color' in style) {\n builder.setFillColorExpression(\n expressionToGlsl(context, style['fill-color'], ColorType),\n );\n }\n if ('fill-pattern-src' in style) {\n const textureId = computeHash(style['fill-pattern-src']);\n const sizeExpression = parseImageProperties(\n style,\n builder,\n uniforms,\n 'fill-pattern-',\n textureId,\n );\n let sampleSizeExpression = sizeExpression;\n let offsetExpression = 'vec2(0.)';\n if ('fill-pattern-offset' in style && 'fill-pattern-size' in style) {\n sampleSizeExpression = expressionToGlsl(\n context,\n style[`fill-pattern-size`],\n NumberArrayType,\n );\n offsetExpression = parseImageOffsetProperties(\n style,\n 'fill-pattern-',\n context,\n sizeExpression,\n sampleSizeExpression,\n );\n }\n context.functions['sampleFillPattern'] =\n `vec4 sampleFillPattern(sampler2D texture, vec2 textureSize, vec2 textureOffset, vec2 sampleSize, vec2 pxOrigin, vec2 pxPosition) {\n float scaleRatio = pow(2., mod(u_zoom + 0.5, 1.) - 0.5);\n vec2 pxRelativePos = pxPosition - pxOrigin;\n // rotate the relative position from origin by the current view rotation\n pxRelativePos = vec2(pxRelativePos.x * cos(u_rotation) - pxRelativePos.y * sin(u_rotation), pxRelativePos.x * sin(u_rotation) + pxRelativePos.y * cos(u_rotation));\n // sample position is computed according to the sample offset & size\n vec2 samplePos = mod(pxRelativePos / scaleRatio, sampleSize);\n // also make sure that we're not sampling too close to the borders to avoid interpolation with outside pixels\n samplePos = clamp(samplePos, vec2(0.5), sampleSize - vec2(0.5));\n samplePos.y = sampleSize.y - samplePos.y; // invert y axis so that images appear upright\n return texture2D(texture, (samplePos + textureOffset) / textureSize);\n}`;\n const textureName = `u_texture${textureId}`;\n let tintExpression = '1.';\n if ('fill-color' in style) {\n tintExpression = builder.getFillColorExpression();\n }\n builder.setFillColorExpression(\n `${tintExpression} * sampleFillPattern(${textureName}, ${sizeExpression}, ${offsetExpression}, ${sampleSizeExpression}, pxOrigin, pxPos)`,\n );\n }\n}\n\n/**\n * @typedef {Object} StyleParseResult\n * @property {ShaderBuilder} builder Shader builder pre-configured according to a given style\n * @property {import(\"./VectorStyleRenderer.js\").UniformDefinitions} uniforms Uniform definitions\n * @property {import(\"./VectorStyleRenderer.js\").AttributeDefinitions} attributes Attribute definitions\n */\n\n/**\n * Parses a {@link import(\"../../style/flat.js\").FlatStyle} object and returns a {@link ShaderBuilder}\n * object that has been configured according to the given style, as well as `attributes` and `uniforms`\n * arrays to be fed to the `WebGLPointsRenderer` class.\n *\n * Also returns `uniforms` and `attributes` properties as expected by the\n * {@link module:ol/renderer/webgl/PointsLayer~WebGLPointsLayerRenderer}.\n *\n * @param {import(\"../../style/flat.js\").FlatStyle} style Flat style.\n * @param {import('../../style/flat.js').StyleVariables} [variables] Style variables.\n * @param {import(\"../../expr/expression.js\").EncodedExpression} [filter] Filter (if any)\n * @return {StyleParseResult} Result containing shader params, attributes and uniforms.\n */\nexport function parseLiteralStyle(style, variables, filter) {\n const context = newCompilationContext();\n\n const builder = new ShaderBuilder();\n\n /** @type {Object<string,import(\"../../webgl/Helper\").UniformValue>} */\n const uniforms = {};\n\n if ('icon-src' in style) {\n parseIconProperties(style, builder, uniforms, context);\n } else if ('shape-points' in style) {\n parseShapeProperties(style, builder, uniforms, context);\n } else if ('circle-radius' in style) {\n parseCircleProperties(style, builder, uniforms, context);\n }\n parseStrokeProperties(style, builder, uniforms, context);\n parseFillProperties(style, builder, uniforms, context);\n\n // note that the style filter may have already been applied earlier when building the rendering instructions\n // this is still needed in case a filter cannot be evaluated statically beforehand (e.g. depending on time)\n if (filter) {\n const parsedFilter = expressionToGlsl(context, filter, BooleanType);\n builder.setFragmentDiscardExpression(`!${parsedFilter}`);\n }\n\n /**\n * @type {import('./VectorStyleRenderer.js').AttributeDefinitions}\n */\n const attributes = {};\n\n // Define attributes for special inputs\n function defineSpecialInput(contextPropName, glslPropName, type, callback) {\n if (!context[contextPropName]) {\n return;\n }\n const glslType = getGlslTypeFromType(type);\n const attrSize = getGlslSizeFromType(type);\n builder.addAttribute(`a_${glslPropName}`, glslType);\n\n attributes[glslPropName] = {\n size: attrSize,\n callback,\n };\n }\n defineSpecialInput(\n 'geometryType',\n GEOMETRY_TYPE_PROPERTY_NAME,\n StringType,\n (feature) =>\n getStringNumberEquivalent(computeGeometryType(feature.getGeometry())),\n );\n defineSpecialInput(\n 'featureId',\n FEATURE_ID_PROPERTY_NAME,\n StringType | NumberType,\n (feature) => {\n const id = feature.getId() ?? null;\n return typeof id === 'string' ? getStringNumberEquivalent(id) : id;\n },\n );\n\n applyContextToBuilder(builder, context);\n\n return {\n builder,\n attributes: {...attributes, ...generateAttributesFromContext(context)},\n uniforms: {\n ...uniforms,\n ...generateUniformsFromContext(context, variables),\n },\n };\n}\n", "/**\n * @module ol/render/webgl/VectorStyleRenderer\n */\nimport {\n create as createTransform,\n makeInverse as makeInverseTransform,\n} from '../../transform.js';\nimport WebGLArrayBuffer from '../../webgl/Buffer.js';\nimport {AttributeType} from '../../webgl/Helper.js';\nimport {ARRAY_BUFFER, DYNAMIC_DRAW, ELEMENT_ARRAY_BUFFER} from '../../webgl.js';\nimport {create as createWebGLWorker} from '../../worker/webgl.js';\nimport {WebGLWorkerMessageType} from './constants.js';\nimport {colorEncodeIdAndPack} from './encodeUtil.js';\nimport {\n generateLineStringRenderInstructions,\n generatePointRenderInstructions,\n generatePolygonRenderInstructions,\n getCustomAttributesSize,\n} from './renderinstructions.js';\nimport {parseLiteralStyle} from './style.js';\n\nconst tmpColor = [];\n/** @type {Worker|undefined} */\nlet WEBGL_WORKER;\nfunction getWebGLWorker() {\n if (!WEBGL_WORKER) {\n WEBGL_WORKER = createWebGLWorker();\n }\n return WEBGL_WORKER;\n}\nlet workerMessageCounter = 0;\n\n/**\n * Names of attributes made available to the vertex shader.\n * Please note: changing these *will* break custom shaders!\n * @enum {string}\n */\nexport const Attributes = {\n POSITION: 'a_position',\n LOCAL_POSITION: 'a_localPosition',\n SEGMENT_START: 'a_segmentStart',\n SEGMENT_END: 'a_segmentEnd',\n MEASURE_START: 'a_measureStart',\n MEASURE_END: 'a_measureEnd',\n ANGLE_TANGENT_SUM: 'a_angleTangentSum',\n JOIN_ANGLES: 'a_joinAngles',\n DISTANCE_LOW: 'a_distanceLow',\n DISTANCE_HIGH: 'a_distanceHigh',\n};\n\n/**\n * @typedef {Object} AttributeDefinition A description of a custom attribute to be passed on to the GPU, with a value different\n * for each feature.\n * @property {number} [size] Amount of numerical values composing the attribute, either 1, 2, 3 or 4; in case size is > 1, the return value\n * of the callback should be an array; if unspecified, assumed to be a single float value\n * @property {function(this:import(\"./MixedGeometryBatch.js\").GeometryBatchItem, import(\"../../Feature\").FeatureLike):number|Array<number>} callback This callback computes the numerical value of the\n * attribute for a given feature.\n */\n\n/**\n * @typedef {Object<string, AttributeDefinition>} AttributeDefinitions\n * @typedef {Object<string, import(\"../../webgl/Helper\").UniformValue>} UniformDefinitions\n */\n\n/**\n * @typedef {Array<WebGLArrayBuffer>} WebGLArrayBufferSet Buffers organized like so: [indicesBuffer, vertexAttributesBuffer, instanceAttributesBuffer]\n */\n\n/**\n * @typedef {Object} WebGLBuffers\n * @property {WebGLArrayBufferSet} polygonBuffers Array containing indices and vertices buffers for polygons\n * @property {WebGLArrayBufferSet} lineStringBuffers Array containing indices and vertices buffers for line strings\n * @property {WebGLArrayBufferSet} pointBuffers Array containing indices and vertices buffers for points\n * @property {import(\"../../transform.js\").Transform} invertVerticesTransform Inverse of the transform applied when generating buffers\n */\n\n/**\n * @typedef {Object} RenderInstructions\n * @property {Float32Array|null} polygonInstructions Polygon instructions; null if nothing to render\n * @property {Float32Array|null} lineStringInstructions LineString instructions; null if nothing to render\n * @property {Float32Array|null} pointInstructions Point instructions; null if nothing to render\n */\n\n/**\n * @typedef {Object} ShaderProgram An object containing both shaders (vertex and fragment)\n * @property {string} vertex Vertex shader source\n * @property {string} fragment Fragment shader source\n */\n\n/**\n * @typedef {import('./style.js').StyleParseResult} StyleShaders\n */\n\n/**\n * @typedef {import('../../style/flat.js').FlatStyleLike} FlatStyleLike\n */\n/**\n * @typedef {import('../../style/flat.js').FlatStyle} FlatStyle\n */\n/**\n * @typedef {import('../../style/flat.js').Rule} FlatStyleRule\n */\n\n/**\n * @typedef {Object} SubRenderPass\n * @property {string} vertexShader Vertex shader\n * @property {string} fragmentShader Fragment shader\n * @property {Array<import('../../webgl/Helper.js').AttributeDescription>} attributesDesc Attributes description, defined for each primitive vertex\n * @property {Array<import('../../webgl/Helper.js').AttributeDescription>} instancedAttributesDesc Attributes description, defined once per primitive\n * @property {number} instancePrimitiveVertexCount Number of vertices per instance primitive in this render pass\n * @property {WebGLProgram} [program] Program; this has to be recreated if the helper is lost/changed\n */\n\n/**\n * @typedef {Object} RenderPass\n * @property {SubRenderPass} [fillRenderPass] Fill render pass; undefined if no fill in pass\n * @property {SubRenderPass} [strokeRenderPass] Stroke render pass; undefined if no stroke in pass\n * @property {SubRenderPass} [symbolRenderPass] Symbol render pass; undefined if no symbol in pass\n */\n\n/**\n * @classdesc This class is responsible for:\n * 1. generating WebGL buffers according to a provided style, using a MixedGeometryBatch as input\n * 2. rendering geometries contained in said buffers\n *\n * A VectorStyleRenderer instance can be created either from a literal style or from shaders.\n * The shaders should not be provided explicitly but instead as a preconfigured ShaderBuilder instance.\n *\n * The `generateBuffers` method returns a promise resolving to WebGL buffers that are intended to be rendered by the\n * same renderer.\n */\nclass VectorStyleRenderer {\n /**\n * @param {FlatStyleLike|StyleShaders|Array<StyleShaders>} styles Vector styles expressed as flat styles, flat style rules or style shaders\n * @param {import('../../style/flat.js').StyleVariables} variables Style variables\n * @param {import('../../webgl/Helper.js').default} helper Helper\n * @param {boolean} [enableHitDetection] Whether to enable the hit detection (needs compatible shader)\n */\n constructor(styles, variables, helper, enableHitDetection) {\n /**\n * @private\n * @type {import('../../webgl/Helper.js').default}\n */\n this.helper_;\n\n /**\n * @private\n */\n this.hitDetectionEnabled_ = !!enableHitDetection;\n\n /**\n * @type {Array<StyleShaders>}\n * @private\n */\n this.styleShaders = convertStyleToShaders(styles, variables);\n\n /**\n * @type {AttributeDefinitions}\n * @private\n */\n this.customAttributes_ = {};\n\n /**\n @type {UniformDefinitions}\n * @private\n */\n this.uniforms_ = {};\n\n // add hit detection attribute if enabled\n if (this.hitDetectionEnabled_) {\n this.customAttributes_['hitColor'] = {\n callback() {\n return colorEncodeIdAndPack(this.ref, tmpColor);\n },\n size: 2,\n };\n }\n\n // add attributes & uniforms coming from all shaders\n for (const styleShader of this.styleShaders) {\n for (const attributeName in styleShader.attributes) {\n if (attributeName in this.customAttributes_) {\n // already defined: skip\n continue;\n }\n this.customAttributes_[attributeName] =\n styleShader.attributes[attributeName];\n }\n for (const uniformName in styleShader.uniforms) {\n if (uniformName in this.uniforms_) {\n // already defined: skip\n continue;\n }\n this.uniforms_[uniformName] = styleShader.uniforms[uniformName];\n }\n }\n\n // create a render pass for each shader\n /**\n * @type {Array<RenderPass>}\n * @private\n */\n this.renderPasses_ = this.styleShaders.map((styleShader) => {\n /** @type {RenderPass} */\n const renderPass = {};\n\n const customAttributesDesc = Object.entries(this.customAttributes_).map(\n ([name, value]) => {\n const isUsed = name in styleShader.attributes || name === 'hitColor';\n return {\n name: isUsed ? `a_${name}` : null, // giving a null name means this is only used for \"spacing\" in between attributes\n size: value.size || 1,\n type: AttributeType.FLOAT,\n };\n },\n );\n\n // set up each subpass\n if (styleShader.builder.getFillVertexShader()) {\n renderPass.fillRenderPass = {\n vertexShader: styleShader.builder.getFillVertexShader(),\n fragmentShader: styleShader.builder.getFillFragmentShader(),\n attributesDesc: [\n {\n name: Attributes.POSITION,\n size: 2,\n type: AttributeType.FLOAT,\n },\n ...customAttributesDesc,\n ],\n instancedAttributesDesc: [], // no instanced rendering for polygons\n instancePrimitiveVertexCount: 3,\n };\n }\n if (styleShader.builder.getStrokeVertexShader()) {\n renderPass.strokeRenderPass = {\n vertexShader: styleShader.builder.getStrokeVertexShader(),\n fragmentShader: styleShader.builder.getStrokeFragmentShader(),\n attributesDesc: [\n {\n name: Attributes.LOCAL_POSITION,\n size: 2,\n type: AttributeType.FLOAT,\n },\n ],\n instancedAttributesDesc: [\n {\n name: Attributes.SEGMENT_START,\n size: 2,\n type: AttributeType.FLOAT,\n },\n {\n name: Attributes.MEASURE_START,\n size: 1,\n type: AttributeType.FLOAT,\n },\n {\n name: Attributes.SEGMENT_END,\n size: 2,\n type: AttributeType.FLOAT,\n },\n {\n name: Attributes.MEASURE_END,\n size: 1,\n type: AttributeType.FLOAT,\n },\n {\n name: Attributes.JOIN_ANGLES,\n size: 2,\n type: AttributeType.FLOAT,\n },\n {\n name: Attributes.DISTANCE_LOW,\n size: 1,\n type: AttributeType.FLOAT,\n },\n {\n name: Attributes.DISTANCE_HIGH,\n size: 1,\n type: AttributeType.FLOAT,\n },\n {\n name: Attributes.ANGLE_TANGENT_SUM,\n size: 1,\n type: AttributeType.FLOAT,\n },\n ...customAttributesDesc,\n ],\n instancePrimitiveVertexCount: 6,\n };\n }\n if (styleShader.builder.getSymbolVertexShader()) {\n renderPass.symbolRenderPass = {\n vertexShader: styleShader.builder.getSymbolVertexShader(),\n fragmentShader: styleShader.builder.getSymbolFragmentShader(),\n attributesDesc: [\n {\n name: Attributes.LOCAL_POSITION,\n size: 2,\n type: AttributeType.FLOAT,\n },\n ],\n instancedAttributesDesc: [\n {\n name: Attributes.POSITION,\n size: 2,\n type: AttributeType.FLOAT,\n },\n ...customAttributesDesc,\n ],\n instancePrimitiveVertexCount: 6,\n };\n }\n return renderPass;\n });\n\n this.hasFill_ = this.renderPasses_.some((pass) => pass.fillRenderPass);\n this.hasStroke_ = this.renderPasses_.some((pass) => pass.strokeRenderPass);\n this.hasSymbol_ = this.renderPasses_.some((pass) => pass.symbolRenderPass);\n\n // this will initialize render passes with the given helper\n this.setHelper(helper);\n }\n\n /**\n * @param {import('./MixedGeometryBatch.js').default} geometryBatch Geometry batch\n * @param {import(\"../../transform.js\").Transform} transform Transform to apply to coordinates\n * @return {Promise<WebGLBuffers|null>} A promise resolving to WebGL buffers; returns null if buffers are empty\n */\n async generateBuffers(geometryBatch, transform) {\n if (geometryBatch.isEmpty()) {\n return null;\n }\n const renderInstructions = this.generateRenderInstructions_(\n geometryBatch,\n transform,\n );\n const [polygonBuffers, lineStringBuffers, pointBuffers] = await Promise.all(\n [\n this.generateBuffersForType_(\n renderInstructions.polygonInstructions,\n 'Polygon',\n transform,\n ),\n this.generateBuffersForType_(\n renderInstructions.lineStringInstructions,\n 'LineString',\n transform,\n ),\n this.generateBuffersForType_(\n renderInstructions.pointInstructions,\n 'Point',\n transform,\n ),\n ],\n );\n // also return the inverse of the transform that was applied when generating buffers\n const invertVerticesTransform = makeInverseTransform(\n createTransform(),\n transform,\n );\n return {\n polygonBuffers: polygonBuffers,\n lineStringBuffers: lineStringBuffers,\n pointBuffers: pointBuffers,\n invertVerticesTransform: invertVerticesTransform,\n };\n }\n\n /**\n * @param {import('./MixedGeometryBatch.js').default} geometryBatch Geometry batch\n * @param {import(\"../../transform.js\").Transform} transform Transform to apply to coordinates\n * @return {RenderInstructions} Render instructions\n * @private\n */\n generateRenderInstructions_(geometryBatch, transform) {\n const polygonInstructions = this.hasFill_\n ? generatePolygonRenderInstructions(\n geometryBatch.polygonBatch,\n new Float32Array(0),\n this.customAttributes_,\n transform,\n )\n : null;\n const lineStringInstructions = this.hasStroke_\n ? generateLineStringRenderInstructions(\n geometryBatch.lineStringBatch,\n new Float32Array(0),\n this.customAttributes_,\n transform,\n )\n : null;\n const pointInstructions = this.hasSymbol_\n ? generatePointRenderInstructions(\n geometryBatch.pointBatch,\n new Float32Array(0),\n this.customAttributes_,\n transform,\n )\n : null;\n\n return {\n polygonInstructions,\n lineStringInstructions,\n pointInstructions,\n };\n }\n\n /**\n * @param {Float32Array|null} renderInstructions Render instructions\n * @param {import(\"../../geom/Geometry.js\").Type} geometryType Geometry type\n * @param {import(\"../../transform.js\").Transform} transform Transform to apply to coordinates\n * @return {Promise<WebGLArrayBufferSet>|null} Indices buffer and vertices buffer; null if nothing to render\n * @private\n */\n generateBuffersForType_(renderInstructions, geometryType, transform) {\n if (renderInstructions === null) {\n return null;\n }\n\n const messageId = workerMessageCounter++;\n let messageType;\n switch (geometryType) {\n case 'Polygon':\n messageType = WebGLWorkerMessageType.GENERATE_POLYGON_BUFFERS;\n break;\n case 'LineString':\n messageType = WebGLWorkerMessageType.GENERATE_LINE_STRING_BUFFERS;\n break;\n case 'Point':\n messageType = WebGLWorkerMessageType.GENERATE_POINT_BUFFERS;\n break;\n default:\n // pass\n }\n\n /** @type {import('./constants.js').WebGLWorkerGenerateBuffersMessage} */\n const message = {\n id: messageId,\n type: messageType,\n renderInstructions: renderInstructions.buffer,\n renderInstructionsTransform: transform,\n customAttributesSize: getCustomAttributesSize(this.customAttributes_),\n };\n const WEBGL_WORKER = getWebGLWorker();\n WEBGL_WORKER.postMessage(message, [renderInstructions.buffer]);\n\n // leave ownership of render instructions\n renderInstructions = null;\n\n return new Promise((resolve) => {\n /**\n * @param {{data: import('./constants.js').WebGLWorkerGenerateBuffersMessage}} event Event.\n */\n const handleMessage = (event) => {\n const received = event.data;\n\n // this is not the response to our request: skip\n if (received.id !== messageId) {\n return;\n }\n\n // we've received our response: stop listening\n WEBGL_WORKER.removeEventListener('message', handleMessage);\n\n // the helper has disposed in the meantime; the promise will not be resolved\n if (!this.helper_.getGL()) {\n return;\n }\n\n // copy & flush received buffers to GPU\n const indicesBuffer = new WebGLArrayBuffer(\n ELEMENT_ARRAY_BUFFER,\n DYNAMIC_DRAW,\n ).fromArrayBuffer(received.indicesBuffer);\n const vertexAttributesBuffer = new WebGLArrayBuffer(\n ARRAY_BUFFER,\n DYNAMIC_DRAW,\n ).fromArrayBuffer(received.vertexAttributesBuffer);\n const instanceAttributesBuffer = new WebGLArrayBuffer(\n ARRAY_BUFFER,\n DYNAMIC_DRAW,\n ).fromArrayBuffer(received.instanceAttributesBuffer);\n this.helper_.flushBufferData(indicesBuffer);\n this.helper_.flushBufferData(vertexAttributesBuffer);\n this.helper_.flushBufferData(instanceAttributesBuffer);\n\n resolve([\n indicesBuffer,\n vertexAttributesBuffer,\n instanceAttributesBuffer,\n ]);\n };\n\n WEBGL_WORKER.addEventListener('message', handleMessage);\n });\n }\n\n /**\n * Render the geometries in the given buffers.\n * @param {WebGLBuffers} buffers WebGL Buffers to draw\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state\n * @param {function(): void} preRenderCallback This callback will be called right before drawing, and can be used to set uniforms\n */\n render(buffers, frameState, preRenderCallback) {\n for (const renderPass of this.renderPasses_) {\n renderPass.fillRenderPass &&\n this.renderInternal_(\n buffers.polygonBuffers[0],\n buffers.polygonBuffers[1],\n buffers.polygonBuffers[2],\n renderPass.fillRenderPass,\n frameState,\n preRenderCallback,\n );\n renderPass.strokeRenderPass &&\n this.renderInternal_(\n buffers.lineStringBuffers[0],\n buffers.lineStringBuffers[1],\n buffers.lineStringBuffers[2],\n renderPass.strokeRenderPass,\n frameState,\n preRenderCallback,\n );\n renderPass.symbolRenderPass &&\n this.renderInternal_(\n buffers.pointBuffers[0],\n buffers.pointBuffers[1],\n buffers.pointBuffers[2],\n renderPass.symbolRenderPass,\n frameState,\n preRenderCallback,\n );\n }\n }\n\n /**\n * @param {WebGLArrayBuffer} indicesBuffer Indices buffer\n * @param {WebGLArrayBuffer} vertexAttributesBuffer Vertex attributes buffer\n * @param {WebGLArrayBuffer} instanceAttributesBuffer Instance attributes buffer\n * @param {SubRenderPass} subRenderPass Render pass (program, attributes, etc.) specific to one geometry type\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {function(): void} preRenderCallback This callback will be called right before drawing, and can be used to set uniforms\n * @private\n */\n renderInternal_(\n indicesBuffer,\n vertexAttributesBuffer,\n instanceAttributesBuffer,\n subRenderPass,\n frameState,\n preRenderCallback,\n ) {\n const renderCount = indicesBuffer.getSize();\n if (renderCount === 0) {\n return;\n }\n\n const usesInstancedRendering = subRenderPass.instancedAttributesDesc.length;\n\n this.helper_.useProgram(subRenderPass.program, frameState);\n this.helper_.bindBuffer(vertexAttributesBuffer);\n this.helper_.bindBuffer(indicesBuffer);\n this.helper_.enableAttributes(subRenderPass.attributesDesc);\n this.helper_.bindBuffer(instanceAttributesBuffer);\n this.helper_.enableAttributesInstanced(\n subRenderPass.instancedAttributesDesc,\n );\n\n preRenderCallback();\n\n if (usesInstancedRendering) {\n const instanceAttributesStride =\n subRenderPass.instancedAttributesDesc.reduce(\n (prev, curr) => prev + (curr.size || 1),\n 0,\n );\n const instanceCount =\n instanceAttributesBuffer.getSize() / instanceAttributesStride;\n\n this.helper_.drawElementsInstanced(0, renderCount, instanceCount);\n } else {\n this.helper_.drawElements(0, renderCount);\n }\n }\n\n /**\n * @param {import('../../webgl/Helper.js').default} helper Helper\n * @param {WebGLBuffers} buffers WebGL Buffers to reload if any\n */\n setHelper(helper, buffers = null) {\n this.helper_ = helper;\n\n for (const renderPass of this.renderPasses_) {\n if (renderPass.fillRenderPass) {\n renderPass.fillRenderPass.program = this.helper_.getProgram(\n renderPass.fillRenderPass.fragmentShader,\n renderPass.fillRenderPass.vertexShader,\n );\n }\n if (renderPass.strokeRenderPass) {\n renderPass.strokeRenderPass.program = this.helper_.getProgram(\n renderPass.strokeRenderPass.fragmentShader,\n renderPass.strokeRenderPass.vertexShader,\n );\n }\n if (renderPass.symbolRenderPass) {\n renderPass.symbolRenderPass.program = this.helper_.getProgram(\n renderPass.symbolRenderPass.fragmentShader,\n renderPass.symbolRenderPass.vertexShader,\n );\n }\n }\n this.helper_.addUniforms(this.uniforms_);\n\n if (buffers) {\n if (buffers.polygonBuffers) {\n this.helper_.flushBufferData(buffers.polygonBuffers[0]);\n this.helper_.flushBufferData(buffers.polygonBuffers[1]);\n this.helper_.flushBufferData(buffers.polygonBuffers[2]);\n }\n if (buffers.lineStringBuffers) {\n this.helper_.flushBufferData(buffers.lineStringBuffers[0]);\n this.helper_.flushBufferData(buffers.lineStringBuffers[1]);\n this.helper_.flushBufferData(buffers.lineStringBuffers[2]);\n }\n if (buffers.pointBuffers) {\n this.helper_.flushBufferData(buffers.pointBuffers[0]);\n this.helper_.flushBufferData(buffers.pointBuffers[1]);\n this.helper_.flushBufferData(buffers.pointBuffers[2]);\n }\n }\n }\n}\n\nexport default VectorStyleRenderer;\n\n/**\n * Breaks down a vector style into an array of prebuilt shader builders with attributes and uniforms\n * @param {FlatStyleLike|StyleShaders|Array<StyleShaders>} style Vector style\n * @param {import('../../style/flat.js').StyleVariables} variables Style variables\n * @return {Array<StyleShaders>} Array of style shaders\n */\nexport function convertStyleToShaders(style, variables) {\n // possible cases:\n // - single shader\n // - multiple shaders\n // - single style\n // - multiple styles\n // - multiple rules\n const asArray = Array.isArray(style) ? style : [style];\n\n // if array of rules: break rules into separate styles, compute \"else\" filters\n if ('style' in asArray[0]) {\n /** @type {Array<StyleShaders>} */\n const shaders = [];\n const rules = /** @type {Array<FlatStyleRule>} */ (asArray);\n const previousFilters = [];\n for (const rule of rules) {\n /** @type {Array<FlatStyle>} */\n const ruleStyles = Array.isArray(rule.style) ? rule.style : [rule.style];\n /** @type {import(\"../../expr/expression.js\").EncodedExpression} */\n let currentFilter = rule.filter;\n if (rule.else && previousFilters.length) {\n currentFilter = [\n 'all',\n ...previousFilters.map((filter) => ['!', filter]),\n ];\n if (rule.filter) {\n currentFilter.push(rule.filter);\n }\n if (currentFilter.length < 3) {\n currentFilter = currentFilter[1];\n }\n }\n if (rule.filter) {\n previousFilters.push(rule.filter);\n }\n // parse each style and convert to shader\n const styleShaders = ruleStyles.map((style) =>\n parseLiteralStyle(style, variables, currentFilter),\n );\n shaders.push(...styleShaders);\n }\n return shaders;\n }\n\n // if array of shaders: return as is\n if ('builder' in asArray[0]) {\n return /** @type {Array<StyleShaders>} */ (asArray);\n }\n\n // array of flat styles: simply convert to shaders\n return /** @type {Array<FlatStyle>} */ (asArray).map((style) =>\n parseLiteralStyle(style, variables, null),\n );\n}\n", "/**\n * A wrapper class to simplify rendering to a texture instead of the final canvas\n * @module ol/webgl/RenderTarget\n */\nimport {equals} from '../array.js';\n\n// for pixel color reading\nconst tmpArray4 = new Uint8Array(4);\n\n/**\n * @classdesc\n * This class is a wrapper around the association of both a `WebGLTexture` and a `WebGLFramebuffer` instances,\n * simplifying initialization and binding for rendering.\n */\nclass WebGLRenderTarget {\n /**\n * @param {import(\"./Helper.js\").default} helper WebGL helper; mandatory.\n * @param {Array<number>} [size] Expected size of the render target texture; note: this can be changed later on.\n */\n constructor(helper, size) {\n /**\n * @private\n * @type {import(\"./Helper.js\").default}\n */\n this.helper_ = helper;\n const gl = helper.getGL();\n\n /**\n * @private\n * @type {WebGLTexture}\n */\n this.texture_ = gl.createTexture();\n\n /**\n * @private\n * @type {WebGLFramebuffer}\n */\n this.framebuffer_ = gl.createFramebuffer();\n\n /**\n * @private\n * @type {WebGLRenderbuffer}\n */\n this.depthbuffer_ = gl.createRenderbuffer();\n\n /**\n * @type {Array<number>}\n * @private\n */\n this.size_ = size || [1, 1];\n\n /**\n * @type {Uint8Array}\n * @private\n */\n this.data_ = new Uint8Array(0);\n\n /**\n * @type {boolean}\n * @private\n */\n this.dataCacheDirty_ = true;\n\n this.updateSize_();\n }\n\n /**\n * Changes the size of the render target texture. Note: will do nothing if the size\n * is already the same.\n * @param {Array<number>} size Expected size of the render target texture\n */\n setSize(size) {\n if (equals(size, this.size_)) {\n return;\n }\n this.size_[0] = size[0];\n this.size_[1] = size[1];\n this.updateSize_();\n }\n\n /**\n * Returns the size of the render target texture\n * @return {Array<number>} Size of the render target texture\n */\n getSize() {\n return this.size_;\n }\n\n /**\n * This will cause following calls to `#readAll` or `#readPixel` to download the content of the\n * render target into memory, which is an expensive operation.\n * This content will be kept in cache but should be cleared after each new render.\n */\n clearCachedData() {\n this.dataCacheDirty_ = true;\n }\n\n /**\n * Returns the full content of the frame buffer as a series of r, g, b, a components\n * in the 0-255 range (unsigned byte).\n * @return {Uint8Array} Integer array of color values\n */\n readAll() {\n if (this.dataCacheDirty_) {\n const size = this.size_;\n const gl = this.helper_.getGL();\n\n gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer_);\n gl.readPixels(\n 0,\n 0,\n size[0],\n size[1],\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n this.data_,\n );\n this.dataCacheDirty_ = false;\n }\n return this.data_;\n }\n\n /**\n * Reads one pixel of the frame buffer as an array of r, g, b, a components\n * in the 0-255 range (unsigned byte).\n * If x and/or y are outside of existing data, an array filled with 0 is returned.\n * @param {number} x Pixel coordinate\n * @param {number} y Pixel coordinate\n * @return {Uint8Array} Integer array with one color value (4 components)\n */\n readPixel(x, y) {\n if (x < 0 || y < 0 || x > this.size_[0] || y >= this.size_[1]) {\n tmpArray4[0] = 0;\n tmpArray4[1] = 0;\n tmpArray4[2] = 0;\n tmpArray4[3] = 0;\n return tmpArray4;\n }\n\n this.readAll();\n const index =\n Math.floor(x) + (this.size_[1] - Math.floor(y) - 1) * this.size_[0];\n tmpArray4[0] = this.data_[index * 4];\n tmpArray4[1] = this.data_[index * 4 + 1];\n tmpArray4[2] = this.data_[index * 4 + 2];\n tmpArray4[3] = this.data_[index * 4 + 3];\n return tmpArray4;\n }\n\n /**\n * @return {WebGLTexture} Texture to render to\n */\n getTexture() {\n return this.texture_;\n }\n\n /**\n * @return {WebGLFramebuffer} Frame buffer of the render target\n */\n getFramebuffer() {\n return this.framebuffer_;\n }\n\n /**\n * @return {WebGLRenderbuffer} Depth buffer of the render target\n */\n getDepthbuffer() {\n return this.depthbuffer_;\n }\n\n /**\n * @private\n */\n updateSize_() {\n const size = this.size_;\n const gl = this.helper_.getGL();\n\n this.texture_ = this.helper_.createTexture(size, null, this.texture_);\n\n gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer_);\n gl.viewport(0, 0, size[0], size[1]);\n gl.framebufferTexture2D(\n gl.FRAMEBUFFER,\n gl.COLOR_ATTACHMENT0,\n gl.TEXTURE_2D,\n this.texture_,\n 0,\n );\n\n gl.bindRenderbuffer(gl.RENDERBUFFER, this.depthbuffer_);\n gl.renderbufferStorage(\n gl.RENDERBUFFER,\n gl.DEPTH_COMPONENT16,\n size[0],\n size[1],\n );\n gl.framebufferRenderbuffer(\n gl.FRAMEBUFFER,\n gl.DEPTH_ATTACHMENT,\n gl.RENDERBUFFER,\n this.depthbuffer_,\n );\n\n this.data_ = new Uint8Array(size[0] * size[1] * 4);\n }\n}\n\nexport default WebGLRenderTarget;\n", "import {getWidth} from '../../extent.js';\n\n/**\n * Compute world params\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {any} layer The layer\n * @return {Array<number>} The world start, end and width.\n */\nexport function getWorldParameters(frameState, layer) {\n const projection = frameState.viewState.projection;\n\n const vectorSource = layer.getSource();\n const multiWorld = vectorSource.getWrapX() && projection.canWrapX();\n const projectionExtent = projection.getExtent();\n\n const extent = frameState.extent;\n const worldWidth = multiWorld ? getWidth(projectionExtent) : null;\n const endWorld = multiWorld\n ? Math.ceil((extent[2] - projectionExtent[2]) / worldWidth) + 1\n : 1;\n\n const startWorld = multiWorld\n ? Math.floor((extent[0] - projectionExtent[0]) / worldWidth)\n : 0;\n\n return [startWorld, endWorld, worldWidth];\n}\n", "/**\n * @module ol/renderer/webgl/VectorLayer\n */\nimport ViewHint from '../../ViewHint.js';\nimport {assert} from '../../asserts.js';\nimport {listen, unlistenByKey} from '../../events.js';\nimport {buffer, createEmpty, equals} from '../../extent.js';\nimport BaseVector from '../../layer/BaseVector.js';\nimport {\n getTransformFromProjections,\n getUserProjection,\n toUserExtent,\n toUserResolution,\n} from '../../proj.js';\nimport MixedGeometryBatch from '../../render/webgl/MixedGeometryBatch.js';\nimport VectorStyleRenderer from '../../render/webgl/VectorStyleRenderer.js';\nimport {colorDecodeId} from '../../render/webgl/encodeUtil.js';\nimport VectorEventType from '../../source/VectorEventType.js';\nimport {\n apply as applyTransform,\n create as createTransform,\n makeInverse as makeInverseTransform,\n multiply as multiplyTransform,\n setFromArray as setFromTransform,\n translate as translateTransform,\n} from '../../transform.js';\nimport {\n create as createMat4,\n fromTransform as mat4FromTransform,\n} from '../../vec/mat4.js';\nimport {DefaultUniform} from '../../webgl/Helper.js';\nimport WebGLRenderTarget from '../../webgl/RenderTarget.js';\nimport WebGLLayerRenderer from './Layer.js';\nimport {getWorldParameters} from './worldUtil.js';\n\nexport const Uniforms = {\n ...DefaultUniform,\n RENDER_EXTENT: 'u_renderExtent', // intersection of layer, source, and view extent\n PATTERN_ORIGIN: 'u_patternOrigin',\n GLOBAL_ALPHA: 'u_globalAlpha',\n};\n\n/**\n * @typedef {import('../../render/webgl/VectorStyleRenderer.js').StyleShaders} StyleShaders\n */\n/**\n * @typedef {import('../../style/flat.js').FlatStyleLike | Array<StyleShaders> | StyleShaders} LayerStyle\n */\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the canvas element.\n * @property {LayerStyle} style Flat vector style; also accepts shaders\n * @property {Object<string, number|Array<number>|string|boolean>} variables Style variables\n * @property {boolean} [disableHitDetection=false] Setting this to true will provide a slight performance boost, but will\n * prevent all hit detection on the layer.\n * @property {Array<import(\"./Layer\").PostProcessesOptions>} [postProcesses] Post-processes definitions\n */\n\n/**\n * @classdesc\n * Experimental WebGL vector renderer. Supports polygons, lines and points:\n * Polygons are broken down into triangles\n * Lines are rendered as strips of quads\n * Points are rendered as quads\n *\n * You need to provide vertex and fragment shaders as well as custom attributes for each type of geometry. All shaders\n * can access the uniforms in the {@link module:ol/webgl/Helper~DefaultUniform} enum.\n * The vertex shaders can access the following attributes depending on the geometry type:\n * For polygons: {@link module:ol/render/webgl/PolygonBatchRenderer~Attributes}\n * For line strings: {@link module:ol/render/webgl/LineStringBatchRenderer~Attributes}\n * For points: {@link module:ol/render/webgl/PointBatchRenderer~Attributes}\n *\n * Please note that the fragment shaders output should have premultiplied alpha, otherwise visual anomalies may occur.\n *\n * Note: this uses {@link module:ol/webgl/Helper~WebGLHelper} internally.\n */\nclass WebGLVectorLayerRenderer extends WebGLLayerRenderer {\n /**\n * @param {import(\"../../layer/Layer.js\").default} layer Layer.\n * @param {Options} options Options.\n */\n constructor(layer, options) {\n const uniforms = {\n [Uniforms.RENDER_EXTENT]: [0, 0, 0, 0],\n [Uniforms.PATTERN_ORIGIN]: [0, 0],\n [Uniforms.GLOBAL_ALPHA]: 1,\n };\n\n super(layer, {\n uniforms: uniforms,\n postProcesses: options.postProcesses,\n });\n\n /**\n * @type {boolean}\n * @private\n */\n this.hitDetectionEnabled_ = !options.disableHitDetection;\n\n /**\n * @type {WebGLRenderTarget}\n * @private\n */\n this.hitRenderTarget_;\n\n /**\n * @private\n */\n this.sourceRevision_ = -1;\n\n /**\n * @private\n */\n this.previousExtent_ = createEmpty();\n\n /**\n * This transform is updated on every frame and is the composition of:\n * - invert of the world->screen transform that was used when rebuilding buffers (see `this.renderTransform_`)\n * - current world->screen transform\n * @type {import(\"../../transform.js\").Transform}\n * @private\n */\n this.currentTransform_ = createTransform();\n\n /**\n * @private\n */\n this.tmpCoords_ = [0, 0];\n /**\n * @private\n */\n this.tmpTransform_ = createTransform();\n /**\n * @private\n */\n this.tmpMat4_ = createMat4();\n\n /**\n * @type {import(\"../../transform.js\").Transform}\n * @private\n */\n this.currentFrameStateTransform_ = createTransform();\n\n /**\n * @type {import('../../style/flat.js').StyleVariables}\n * @private\n */\n this.styleVariables_ = {};\n\n /**\n * @type {LayerStyle}\n * @private\n */\n this.style_ = [];\n\n /**\n * @type {VectorStyleRenderer}\n * @public\n */\n this.styleRenderer_ = null;\n\n /**\n * @type {import('../../render/webgl/VectorStyleRenderer.js').WebGLBuffers}\n * @private\n */\n this.buffers_ = null;\n\n this.applyOptions_(options);\n\n /**\n * @private\n */\n this.batch_ = new MixedGeometryBatch();\n\n /**\n * @private\n * @type {boolean}\n */\n this.initialFeaturesAdded_ = false;\n\n /**\n * @private\n * @type {Array<import(\"../../events.js\").EventsKey|null>}\n */\n this.sourceListenKeys_ = null;\n }\n\n /**\n * @private\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n */\n addInitialFeatures_(frameState) {\n const source = this.getLayer().getSource();\n const userProjection = getUserProjection();\n let projectionTransform;\n if (userProjection) {\n projectionTransform = getTransformFromProjections(\n userProjection,\n frameState.viewState.projection,\n );\n }\n this.batch_.addFeatures(source.getFeatures(), projectionTransform);\n this.sourceListenKeys_ = [\n listen(\n source,\n VectorEventType.ADDFEATURE,\n this.handleSourceFeatureAdded_.bind(this, projectionTransform),\n ),\n listen(\n source,\n VectorEventType.CHANGEFEATURE,\n this.handleSourceFeatureChanged_.bind(this, projectionTransform),\n this,\n ),\n listen(\n source,\n VectorEventType.REMOVEFEATURE,\n this.handleSourceFeatureDelete_,\n this,\n ),\n listen(\n source,\n VectorEventType.CLEAR,\n this.handleSourceFeatureClear_,\n this,\n ),\n ];\n }\n\n /**\n * @param {Options} options Options.\n * @private\n */\n applyOptions_(options) {\n this.styleVariables_ = options.variables;\n this.style_ = options.style;\n }\n\n /**\n * @private\n */\n createRenderers_() {\n this.buffers_ = null;\n this.styleRenderer_ = new VectorStyleRenderer(\n this.style_,\n this.styleVariables_,\n this.helper,\n this.hitDetectionEnabled_,\n );\n }\n\n /**\n * @override\n */\n reset(options) {\n this.applyOptions_(options);\n if (this.helper) {\n this.createRenderers_();\n }\n super.reset(options);\n }\n\n /**\n * @override\n */\n afterHelperCreated() {\n if (this.styleRenderer_) {\n // To reuse buffers\n this.styleRenderer_.setHelper(this.helper, this.buffers_);\n } else {\n this.createRenderers_();\n }\n\n if (this.hitDetectionEnabled_) {\n this.hitRenderTarget_ = new WebGLRenderTarget(this.helper);\n }\n }\n\n /**\n * @param {import(\"../../proj.js\").TransformFunction} projectionTransform Transform function.\n * @param {import(\"../../source/Vector.js\").VectorSourceEvent} event Event.\n * @private\n */\n handleSourceFeatureAdded_(projectionTransform, event) {\n const feature = event.feature;\n this.batch_.addFeature(feature, projectionTransform);\n }\n\n /**\n * @param {import(\"../../proj.js\").TransformFunction} projectionTransform Transform function.\n * @param {import(\"../../source/Vector.js\").VectorSourceEvent} event Event.\n * @private\n */\n handleSourceFeatureChanged_(projectionTransform, event) {\n const feature = event.feature;\n this.batch_.changeFeature(feature, projectionTransform);\n }\n\n /**\n * @param {import(\"../../source/Vector.js\").VectorSourceEvent} event Event.\n * @private\n */\n handleSourceFeatureDelete_(event) {\n const feature = event.feature;\n this.batch_.removeFeature(feature);\n }\n\n /**\n * @private\n */\n handleSourceFeatureClear_() {\n this.batch_.clear();\n }\n\n /**\n * @param {import(\"../../transform.js\").Transform} batchInvertTransform Inverse of the transformation in which geometries are expressed\n * @private\n */\n applyUniforms_(batchInvertTransform) {\n // world to screen matrix\n setFromTransform(this.tmpTransform_, this.currentFrameStateTransform_);\n multiplyTransform(this.tmpTransform_, batchInvertTransform);\n this.helper.setUniformMatrixValue(\n Uniforms.PROJECTION_MATRIX,\n mat4FromTransform(this.tmpMat4_, this.tmpTransform_),\n );\n\n // screen to world matrix\n makeInverseTransform(this.tmpTransform_, this.tmpTransform_);\n this.helper.setUniformMatrixValue(\n Uniforms.SCREEN_TO_WORLD_MATRIX,\n mat4FromTransform(this.tmpMat4_, this.tmpTransform_),\n );\n\n // pattern origin should always be [0, 0] in world coordinates\n this.tmpCoords_[0] = 0;\n this.tmpCoords_[1] = 0;\n makeInverseTransform(this.tmpTransform_, batchInvertTransform);\n applyTransform(this.tmpTransform_, this.tmpCoords_);\n this.helper.setUniformFloatVec2(Uniforms.PATTERN_ORIGIN, this.tmpCoords_);\n }\n\n /**\n * Render the layer.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @return {HTMLElement} The rendered element.\n * @override\n */\n renderFrame(frameState) {\n const gl = this.helper.getGL();\n this.preRender(gl, frameState);\n\n const [startWorld, endWorld, worldWidth] = getWorldParameters(\n frameState,\n this.getLayer(),\n );\n\n // draw the normal canvas\n this.helper.prepareDraw(frameState);\n this.renderWorlds(frameState, false, startWorld, endWorld, worldWidth);\n this.helper.finalizeDraw(\n frameState,\n this.dispatchPreComposeEvent,\n this.dispatchPostComposeEvent,\n );\n\n const canvas = this.helper.getCanvas();\n\n if (this.hitDetectionEnabled_) {\n this.renderWorlds(frameState, true, startWorld, endWorld, worldWidth);\n this.hitRenderTarget_.clearCachedData();\n }\n\n this.postRender(gl, frameState);\n\n return canvas;\n }\n\n /**\n * Determine whether renderFrame should be called.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @return {boolean} Layer is ready to be rendered.\n * @override\n */\n prepareFrameInternal(frameState) {\n if (!this.initialFeaturesAdded_) {\n this.addInitialFeatures_(frameState);\n this.initialFeaturesAdded_ = true;\n }\n\n const layer = this.getLayer();\n const vectorSource = layer.getSource();\n const viewState = frameState.viewState;\n const viewNotMoving =\n !frameState.viewHints[ViewHint.ANIMATING] &&\n !frameState.viewHints[ViewHint.INTERACTING];\n const extentChanged = !equals(this.previousExtent_, frameState.extent);\n const sourceChanged = this.sourceRevision_ < vectorSource.getRevision();\n\n if (sourceChanged) {\n this.sourceRevision_ = vectorSource.getRevision();\n }\n\n if (viewNotMoving && (extentChanged || sourceChanged)) {\n const projection = viewState.projection;\n const resolution = viewState.resolution;\n\n const renderBuffer =\n layer instanceof BaseVector ? layer.getRenderBuffer() : 0;\n const extent = buffer(frameState.extent, renderBuffer * resolution);\n\n const userProjection = getUserProjection();\n if (userProjection) {\n vectorSource.loadFeatures(\n toUserExtent(extent, userProjection),\n toUserResolution(resolution, projection),\n userProjection,\n );\n } else {\n vectorSource.loadFeatures(extent, resolution, projection);\n }\n\n this.ready = false;\n\n const transform = this.helper.makeProjectionTransform(\n frameState,\n createTransform(),\n );\n\n this.styleRenderer_\n .generateBuffers(this.batch_, transform)\n .then((buffers) => {\n if (this.buffers_) {\n this.disposeBuffers(this.buffers_);\n }\n this.buffers_ = buffers;\n this.ready = true;\n this.getLayer().changed();\n });\n\n this.previousExtent_ = frameState.extent.slice();\n }\n\n return true;\n }\n\n /**\n * Render the world, either to the main framebuffer or to the hit framebuffer\n * @param {import(\"../../Map.js\").FrameState} frameState current frame state\n * @param {boolean} forHitDetection whether the rendering is for hit detection\n * @param {number} startWorld the world to render in the first iteration\n * @param {number} endWorld the last world to render\n * @param {number} worldWidth the width of the worlds being rendered\n */\n renderWorlds(frameState, forHitDetection, startWorld, endWorld, worldWidth) {\n let world = startWorld;\n\n if (forHitDetection) {\n this.hitRenderTarget_.setSize([\n Math.floor(frameState.size[0] / 2),\n Math.floor(frameState.size[1] / 2),\n ]);\n this.helper.prepareDrawToRenderTarget(\n frameState,\n this.hitRenderTarget_,\n true,\n );\n }\n\n do {\n this.helper.makeProjectionTransform(\n frameState,\n this.currentFrameStateTransform_,\n );\n translateTransform(\n this.currentFrameStateTransform_,\n world * worldWidth,\n 0,\n );\n if (!this.buffers_) {\n continue;\n }\n this.styleRenderer_.render(this.buffers_, frameState, () => {\n this.applyUniforms_(this.buffers_.invertVerticesTransform);\n this.helper.applyHitDetectionUniform(forHitDetection);\n });\n } while (++world < endWorld);\n }\n\n /**\n * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {number} hitTolerance Hit tolerance in pixels.\n * @param {import(\"../vector.js\").FeatureCallback<T>} callback Feature callback.\n * @param {Array<import(\"../Map.js\").HitMatch<T>>} matches The hit detected matches with tolerance.\n * @return {T|undefined} Callback result.\n * @template T\n * @override\n */\n forEachFeatureAtCoordinate(\n coordinate,\n frameState,\n hitTolerance,\n callback,\n matches,\n ) {\n assert(\n this.hitDetectionEnabled_,\n '`forEachFeatureAtCoordinate` cannot be used on a WebGL layer if the hit detection logic has been disabled using the `disableHitDetection: true` option.',\n );\n if (!this.styleRenderer_ || !this.hitDetectionEnabled_) {\n return undefined;\n }\n\n const pixel = applyTransform(\n frameState.coordinateToPixelTransform,\n coordinate.slice(),\n );\n\n const data = this.hitRenderTarget_.readPixel(pixel[0] / 2, pixel[1] / 2);\n const color = [data[0] / 255, data[1] / 255, data[2] / 255, data[3] / 255];\n const ref = colorDecodeId(color);\n const feature = this.batch_.getFeatureFromRef(ref);\n if (feature) {\n return callback(feature, this.getLayer(), null);\n }\n return undefined;\n }\n\n /**\n * Will release a set of Webgl buffers\n * @param {import('../../render/webgl/VectorStyleRenderer.js').WebGLBuffers} buffers Buffers\n */\n disposeBuffers(buffers) {\n /**\n * @param {Array<import('../../webgl/Buffer.js').default>} typeBuffers Buffers\n */\n const disposeBuffersOfType = (typeBuffers) => {\n for (const buffer of typeBuffers) {\n if (buffer) {\n this.helper.deleteBuffer(buffer);\n }\n }\n };\n if (buffers.pointBuffers) {\n disposeBuffersOfType(buffers.pointBuffers);\n }\n if (buffers.lineStringBuffers) {\n disposeBuffersOfType(buffers.lineStringBuffers);\n }\n if (buffers.polygonBuffers) {\n disposeBuffersOfType(buffers.polygonBuffers);\n }\n }\n\n /**\n * Clean up.\n * @override\n */\n disposeInternal() {\n if (this.buffers_) {\n this.disposeBuffers(this.buffers_);\n }\n if (this.sourceListenKeys_) {\n this.sourceListenKeys_.forEach(function (key) {\n unlistenByKey(key);\n });\n this.sourceListenKeys_ = null;\n }\n super.disposeInternal();\n }\n\n renderDeclutter() {}\n}\n\nexport default WebGLVectorLayerRenderer;\n", "/**\n * @module ol/layer/Heatmap\n */\nimport {createCanvasContext2D} from '../dom.js';\nimport {BooleanType, NumberType} from '../expr/expression.js';\nimport {newCompilationContext} from '../expr/gpu.js';\nimport {clamp} from '../math.js';\nimport {ShaderBuilder} from '../render/webgl/ShaderBuilder.js';\nimport {\n applyContextToBuilder,\n expressionToGlsl,\n generateAttributesFromContext,\n generateUniformsFromContext,\n} from '../render/webgl/compileUtil.js';\nimport WebGLVectorLayerRenderer from '../renderer/webgl/VectorLayer.js';\nimport BaseVector from './BaseVector.js';\n\n/**\n * @typedef {'change:blur'|'change:radius'|'change:gradient'} HeatmapEventTypes\n */\n\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature<import(\"../Observable\").EventTypes, import(\"../events/Event.js\").default, Return> &\n * import(\"../Observable\").OnSignature<import(\"./Base\").BaseLayerObjectEventTypes|\n * import(\"./Layer.js\").LayerEventType|HeatmapEventTypes, import(\"../Object\").ObjectEvent, Return> &\n * import(\"../Observable\").OnSignature<import(\"../render/EventType\").LayerRenderEventTypes, import(\"../render/Event\").default, Return> &\n * import(\"../Observable\").CombinedOnSignature<import(\"../Observable\").EventTypes|import(\"./Base\").BaseLayerObjectEventTypes|\n * import(\"./Layer.js\").LayerEventType|HeatmapEventTypes|import(\"../render/EventType\").LayerRenderEventTypes, Return>} HeatmapOnSignature\n */\n\n/**\n * @typedef {import(\"../style/flat.js\").NumberExpression|string|function(import(\"../Feature.js\").default):number} WeightExpression\n */\n\n/**\n * @template {import(\"../Feature.js\").FeatureLike} [FeatureType=import(\"../Feature.js\").default]\n * @template {import(\"../source/Vector.js\").default<FeatureType>} [VectorSourceType=import(\"../source/Vector.js\").default<FeatureType>]\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering. The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {Array<string>} [gradient=['#00f', '#0ff', '#0f0', '#ff0', '#f00']] The color gradient\n * of the heatmap, specified as an array of CSS color strings.\n * @property {import(\"../style/flat.js\").NumberExpression} [radius=8] Radius size in pixels. Note that for LineStrings,\n * the width of the line will be double the radius.\n * @property {import(\"../style/flat.js\").NumberExpression} [blur=15] Blur size in pixels. This is added to the `radius`\n * parameter above to create the final size of the blur effect.\n * @property {WeightExpression} [weight='weight'] The feature\n * attribute to use for the weight. This also supports expressions returning a number or a function that returns a weight from a feature. Weight values\n * should range from 0 to 1 (and values outside will be clamped to that range).\n * @property {import(\"../style/flat.js\").BooleanExpression} [filter] Optional filter expression.\n * @property {Object<string, number|Array<number>|string|boolean>} [variables] Variables used in expressions (optional)\n * @property {VectorSourceType} [source] Point source.\n * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n\n/**\n * @enum {string}\n * @private\n */\nconst Property = {\n BLUR: 'blur',\n GRADIENT: 'gradient',\n RADIUS: 'radius',\n};\n\n/**\n * @const\n * @type {Array<string>}\n */\nconst DEFAULT_GRADIENT = ['#00f', '#0ff', '#0f0', '#ff0', '#f00'];\n\n/**\n * @classdesc\n * Layer for rendering vector data as a heatmap.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @fires import(\"../render/Event.js\").RenderEvent#prerender\n * @fires import(\"../render/Event.js\").RenderEvent#postrender\n * @template {import(\"../Feature.js\").FeatureLike} [FeatureType=import(\"../Feature.js\").default]\n * @template {import(\"../source/Vector.js\").default<FeatureType>} [VectorSourceType=import(\"../source/Vector.js\").default<FeatureType>]\n * @extends {BaseVector<FeatureType, VectorSourceType, WebGLVectorLayerRenderer>}\n * @api\n */\nclass Heatmap extends BaseVector {\n /**\n * @param {Options<FeatureType, VectorSourceType>} [options] Options.\n */\n constructor(options) {\n options = options ? options : {};\n\n const baseOptions = Object.assign({}, options);\n\n delete baseOptions.gradient;\n delete baseOptions.radius;\n delete baseOptions.blur;\n delete baseOptions.weight;\n super(baseOptions);\n\n /***\n * @type {HeatmapOnSignature<import(\"../events\").EventsKey>}\n */\n this.on;\n\n /***\n * @type {HeatmapOnSignature<import(\"../events\").EventsKey>}\n */\n this.once;\n\n /***\n * @type {HeatmapOnSignature<void>}\n */\n this.un;\n\n this.filter_ = options.filter ?? true;\n\n /**\n * @type {import('../style/flat.js').StyleVariables}\n * @private\n */\n this.styleVariables_ = options.variables || {};\n\n /**\n * @private\n * @type {HTMLCanvasElement|OffscreenCanvas}\n */\n this.gradient_ = null;\n\n this.addChangeListener(Property.GRADIENT, this.handleGradientChanged_);\n\n this.setGradient(options.gradient ? options.gradient : DEFAULT_GRADIENT);\n\n this.setBlur(options.blur !== undefined ? options.blur : 15);\n\n this.setRadius(options.radius !== undefined ? options.radius : 8);\n\n const weight = options.weight ? options.weight : 'weight';\n\n /**\n * @private\n */\n this.weight_ = weight;\n\n // For performance reasons, don't sort the features before rendering.\n // The render order is not relevant for a heatmap representation.\n this.setRenderOrder(null);\n }\n\n /**\n * Return the blur size in pixels.\n * @return {import(\"../style/flat.js\").NumberExpression} Blur size in pixels.\n * @api\n * @observable\n */\n getBlur() {\n return /** @type {import(\"../style/flat.js\").NumberExpression} */ (\n this.get(Property.BLUR)\n );\n }\n\n /**\n * Return the gradient colors as array of strings.\n * @return {Array<string>} Colors.\n * @api\n * @observable\n */\n getGradient() {\n return /** @type {Array<string>} */ (this.get(Property.GRADIENT));\n }\n\n /**\n * Return the size of the radius in pixels.\n * @return {import(\"../style/flat.js\").NumberExpression} Radius size in pixel.\n * @api\n * @observable\n */\n getRadius() {\n return /** @type {import(\"../style/flat.js\").NumberExpression} */ (\n this.get(Property.RADIUS)\n );\n }\n\n /**\n * @private\n */\n handleGradientChanged_() {\n this.gradient_ = createGradient(this.getGradient());\n }\n\n /**\n * Set the blur size in pixels.\n * @param {import(\"../style/flat.js\").NumberExpression} blur Blur size in pixels (supports expressions).\n * @api\n * @observable\n */\n setBlur(blur) {\n const previousValue = this.get(Property.BLUR);\n this.set(Property.BLUR, blur);\n // if the value stays numerical, simply refresh the layer\n if (typeof blur === 'number' && typeof previousValue === 'number') {\n this.changed();\n return;\n }\n this.clearRenderer();\n }\n\n /**\n * Set the gradient colors as array of strings.\n * @param {Array<string>} colors Gradient.\n * @api\n * @observable\n */\n setGradient(colors) {\n this.set(Property.GRADIENT, colors);\n }\n\n /**\n * Set the size of the radius in pixels.\n * @param {import(\"../style/flat.js\").NumberExpression} radius Radius size in pixel (supports expressions).\n * @api\n * @observable\n */\n setRadius(radius) {\n const previousValue = this.get(Property.RADIUS);\n this.set(Property.RADIUS, radius);\n // if the value stays numerical, simply refresh the layer\n if (typeof radius === 'number' && typeof previousValue === 'number') {\n this.changed();\n return;\n }\n this.clearRenderer();\n }\n\n /**\n * Set the filter expression\n * @param {import(\"../style/flat.js\").BooleanExpression} filter Filter expression\n * @api\n */\n setFilter(filter) {\n this.filter_ = filter;\n this.changed();\n this.clearRenderer();\n }\n\n /**\n * Set the weight expression\n * @param {WeightExpression} weight Weight expression\n * @api\n */\n setWeight(weight) {\n this.weight_ = weight;\n this.changed();\n this.clearRenderer();\n }\n\n /**\n * @override\n */\n createRenderer() {\n const builder = new ShaderBuilder();\n\n const context = newCompilationContext();\n const filterCompiled = expressionToGlsl(context, this.filter_, BooleanType);\n let radiusCompiled = expressionToGlsl(\n context,\n this.getRadius(),\n NumberType,\n );\n let blurCompiled = expressionToGlsl(context, this.getBlur(), NumberType);\n\n /** @type {import('../render/webgl/VectorStyleRenderer.js').UniformDefinitions} */\n const blurRadiusUniforms = {};\n if (typeof this.getBlur() === 'number') {\n blurCompiled = 'a_blur';\n blurRadiusUniforms['a_blur'] = () => this.getBlur();\n builder.addUniform('a_blur', 'float');\n }\n if (typeof this.getRadius() === 'number') {\n radiusCompiled = 'a_radius';\n blurRadiusUniforms['a_radius'] = () => this.getRadius();\n builder.addUniform('a_radius', 'float');\n }\n\n /** @type {import('../render/webgl/VectorStyleRenderer.js').AttributeDefinitions} */\n const weightAttribute = {};\n let weightExpression = null;\n if (\n typeof this.weight_ === 'string' ||\n typeof this.weight_ === 'function'\n ) {\n const weightFunction =\n typeof this.weight_ === 'string'\n ? (feature) => feature.get(this.weight_)\n : this.weight_;\n weightAttribute['prop_weight'] = {\n size: 1,\n callback: (feature) => {\n const weightValue = weightFunction(feature);\n return weightValue !== undefined ? clamp(weightValue, 0, 1) : 1;\n },\n };\n weightExpression = 'a_prop_weight';\n builder.addAttribute('a_prop_weight', 'float');\n } else {\n const clampedWeight = ['clamp', this.weight_, 0, 1];\n weightExpression = expressionToGlsl(context, clampedWeight, NumberType);\n }\n\n builder\n .addFragmentShaderFunction(\n `float getBlurSlope() {\n float blur = max(1., ${blurCompiled});\n float radius = ${radiusCompiled};\n return radius / blur;\n}`,\n )\n .setSymbolSizeExpression(`vec2(${radiusCompiled} + ${blurCompiled}) * 2.`)\n .setSymbolColorExpression(\n `vec4(smoothstep(0., 1., (1. - length(coordsPx * 2. / v_quadSizePx)) * getBlurSlope()) * ${weightExpression})`,\n )\n .setStrokeColorExpression(\n `vec4(smoothstep(0., 1., (1. - length(currentRadiusPx * 2. / v_width)) * getBlurSlope()) * ${weightExpression})`,\n )\n .setStrokeWidthExpression(`(${radiusCompiled} + ${blurCompiled}) * 2.`)\n .setFillColorExpression(`vec4(${weightExpression})`)\n .setFragmentDiscardExpression(`!${filterCompiled}`);\n\n applyContextToBuilder(builder, context);\n const attributes = generateAttributesFromContext(context);\n const uniforms = generateUniformsFromContext(context, this.styleVariables_);\n\n return new WebGLVectorLayerRenderer(this, {\n className: this.getClassName(),\n variables: this.styleVariables_,\n style: {\n builder,\n attributes: {\n ...attributes,\n ...weightAttribute,\n },\n uniforms: {\n ...uniforms,\n ...blurRadiusUniforms,\n },\n },\n disableHitDetection: false,\n postProcesses: [\n {\n fragmentShader: `\n precision mediump float;\n\n uniform sampler2D u_image;\n uniform sampler2D u_gradientTexture;\n uniform float u_opacity;\n\n varying vec2 v_texCoord;\n\n void main() {\n vec4 color = texture2D(u_image, v_texCoord);\n gl_FragColor.a = color.a * u_opacity;\n gl_FragColor.rgb = texture2D(u_gradientTexture, vec2(0.5, color.a)).rgb;\n gl_FragColor.rgb *= gl_FragColor.a;\n }`,\n uniforms: {\n u_gradientTexture: () => this.gradient_,\n u_opacity: () => this.getOpacity(),\n },\n },\n ],\n });\n }\n\n /**\n * Update any variables used by the layer style and trigger a re-render.\n * @param {import('../style/flat.js').StyleVariables} variables Variables to update.\n */\n updateStyleVariables(variables) {\n Object.assign(this.styleVariables_, variables);\n this.changed();\n }\n\n /**\n * @override\n */\n renderDeclutter() {}\n}\n\n/**\n * @param {Array<string>} colors A list of colored.\n * @return {HTMLCanvasElement|OffscreenCanvas} canvas with gradient texture.\n */\nfunction createGradient(colors) {\n const width = 1;\n const height = 256;\n const context = createCanvasContext2D(width, height);\n\n const gradient = context.createLinearGradient(0, 0, width, height);\n const step = 1 / (colors.length - 1);\n for (let i = 0, ii = colors.length; i < ii; ++i) {\n gradient.addColorStop(i * step, colors[i]);\n }\n\n context.fillStyle = gradient;\n context.fillRect(0, 0, width, height);\n\n return context.canvas;\n}\n\nexport default Heatmap;\n", "/** Vanilla JS geographic inputs\n * color, size, width, font, symboles, dash, arrow, pattern\n */\nimport ol_Object from 'ol/Object.js'\n\n/** Abstract base class; normally only used for creating subclasses and not instantiated in apps. \n * @constructor\n * @extends {ol_Object}\n * @param {*} options\n * @param {Element} [options.input] input element, if none create one\n * @param {string} [options.type] input type, if no input\n * @param {number} [options.min] input min, if no input\n * @param {number} [options.max] input max, if no input\n * @param {number} [options.step] input step, if no input\n * @param {string|number} [options.val] input value\n * @param {boolean} [options.checked] check input\n * @param {boolean} [options.hidden] the input is display:none\n * @param {boolean} [options.disabled] disable input\n * @param {Element} [options.parent] parent element, if no input\n */\nvar ol_ext_input_Base = class olextinputBase extends ol_Object {\n constructor(options) {\n options = options || {};\n super();\n\n var input = this.input = options.input;\n if (!input) {\n input = this.input = document.createElement('input');\n if (options.type) {\n input.setAttribute('type', options.type);\n }\n if (options.min !== undefined) {\n input.setAttribute('min', options.min);\n }\n if (options.max !== undefined) {\n input.setAttribute('max', options.max);\n }\n if (options.step !== undefined) {\n input.setAttribute('step', options.step);\n }\n if (options.parent) {\n options.parent.appendChild(input);\n }\n }\n if (options.disabled) {\n input.disabled = true;\n }\n if (options.checked !== undefined) {\n input.checked = !!options.checked;\n }\n if (options.val !== undefined) {\n input.value = options.val;\n }\n if (options.hidden) { \n input.classList.add('ol-input-hidden');\n }\n input.addEventListener('focus', function () {\n if (this.element)\n this.element.classList.add('ol-focus');\n }.bind(this));\n var tout;\n input.addEventListener('focusout', function () {\n if (this.element) {\n if (tout)\n clearTimeout(tout);\n tout = setTimeout(function () {\n this.element.classList.remove('ol-focus');\n }.bind(this), 0);\n }\n }.bind(this));\n }\n /** Listen to drag event\n * @param {Element} elt\n * @param {function} cback when draggin on the element\n * @private\n */\n _listenDrag(elt, cback) {\n var handle = function (e) {\n this.moving = true;\n this.element.classList.add('ol-moving');\n var listen = function (e) {\n if (e.type === 'pointerup') {\n document.removeEventListener('pointermove', listen);\n document.removeEventListener('pointerup', listen);\n document.removeEventListener('pointercancel', listen);\n setTimeout(function () {\n this.moving = false;\n this.element.classList.remove('ol-moving');\n }.bind(this));\n }\n if (e.target === elt)\n cback(e);\n e.stopPropagation();\n e.preventDefault();\n }.bind(this);\n document.addEventListener('pointermove', listen, false);\n document.addEventListener('pointerup', listen, false);\n document.addEventListener('pointercancel', listen, false);\n e.stopPropagation();\n e.preventDefault();\n }.bind(this);\n elt.addEventListener('mousedown', handle, false);\n elt.addEventListener('touchstart', handle, false);\n }\n /** Set the current value\n */\n setValue(v) {\n if (v !== undefined)\n this.input.value = v;\n this.input.dispatchEvent(new Event('change'));\n }\n /** Get the current getValue\n * @returns {string}\n */\n getValue() {\n return this.input.value;\n }\n /** Get the input element\n * @returns {Element}\n */\n getInputElement() {\n return this.input;\n }\n}\n\nexport default ol_ext_input_Base\n", "import ol_ext_input_Base from './Base.js'\n\n/** Checkbox input\n * @constructor\n * @extends {ol_ext_input_Base}\n * @fires check\n * @param {*} options\n * @param {string} [options.className]\n * @param {Element|string} [options.html] label content\n * @param {string} [options.after] label garnish (placed after)\n * @param {Element} [options.input] input element, if non create one\n * @param {Element} [options.parent] parent element, if create an input\n * @param {boolean} [options.autoClose=true]\n * @param {boolean} [options.visible=false] display the input\n */\nvar ol_ext_input_Checkbox = class olextinputCheckbox extends ol_ext_input_Base {\n constructor(options) {\n options = options || {};\n\n super(options);\n\n var label = this.element = document.createElement('label');\n if (options.html instanceof Element)\n label.appendChild(options.html);\n else if (options.html !== undefined)\n label.innerHTML = options.html;\n label.className = ('ol-ext-check ol-ext-checkbox ' + (options.className || '')).trim();\n\n if (this.input.parentNode)\n this.input.parentNode.insertBefore(label, this.input);\n label.appendChild(this.input);\n label.appendChild(document.createElement('span'));\n if (options.after) {\n label.appendChild(document.createTextNode(options.after));\n }\n\n // Handle change\n this.input.addEventListener('change', function () {\n this.dispatchEvent({ type: 'check', checked: this.input.checked, value: this.input.value });\n }.bind(this));\n\n }\n isChecked() {\n return this.input.checked;\n }\n}\n\nexport default ol_ext_input_Checkbox\n", "import ol_ext_input_Checkbox from './Checkbox.js'\n\n/** Switch input\n * @constructor\n * @extends {ol_ext_input_Checkbox}\n * @fires check\n * @param {*} options\n * @param {string} [options.className]\n * @param {Element} [options.input] input element, if non create one\n * @param {Element} [options.parent] parent element, if create an input\n */\nvar ol_ext_input_Switch = class olextinputSwitch extends ol_ext_input_Checkbox {\n constructor(options) {\n options = options || {};\n\n super(options);\n\n this.element.className = ('ol-ext-toggle-switch ' + (options.className || '')).trim();\n }\n};\n \nexport default ol_ext_input_Switch\n", "import ol_ext_input_Checkbox from './Checkbox.js'\n\n/** Switch input\n * @constructor\n * @extends {ol_ext_input_Checkbox}\n * @fires check\n * @param {*} options\n * @param {string} [options.className]\n * @param {Element} [options.input] input element, if non create one\n * @param {Element} [options.parent] parent element, if create an input\n */\nvar ol_ext_input_Radio = class olextinputRadio extends ol_ext_input_Checkbox {\n constructor(options) {\n options = options || {};\n\n super(options);\n\n this.element.className = ('ol-ext-check ol-ext-radio ' + (options.className || '')).trim();\n }\n}\n \nexport default ol_ext_input_Radio\n", "/** Vanilla JS helper to manipulate DOM without jQuery\n * @see https://github.com/nefe/You-Dont-Need-jQuery\n * @see https://plainjs.com/javascript/\n * @see http://youmightnotneedjquery.com/\n */\nimport ol_Map from 'ol/Map.js'\nimport ol_ext_input_Checkbox from './input/Checkbox.js'\nimport ol_ext_input_Switch from './input/Switch.js'\nimport ol_ext_input_Radio from './input/Radio.js'\n\n/** @namespace ol.ext.element */\nvar ol_ext_element = {};\n\n/**\n * Create an element\n * @param {string} tagName The element tag, use 'TEXT' to create a text node\n * @param {*} options\n * @param {string} options.className className The element class name \n * @param {Element} options.parent Parent to append the element as child\n * @param {Element|string} [options.html] Content of the element (if text is not set)\n * @param {string} [options.text] Text content (if html is not set)\n * @param {Element|string} [options.options] when tagName = SELECT a list of options as key:value to add to the select\n * @param {string} options.* Any other attribut to add to the element\n */\nol_ext_element.create = function (tagName, options) {\n options = options || {};\n var elt;\n // Create text node\n if (tagName === 'TEXT') {\n elt = document.createTextNode(options.html||'');\n if (options.parent) options.parent.appendChild(elt);\n } else {\n // Other element\n elt = document.createElement(tagName.toLowerCase());\n if (/button/i.test(tagName)) elt.setAttribute('type', 'button');\n for (var attr in options) {\n switch (attr) {\n case 'className': {\n if (options.className && options.className.trim) elt.setAttribute('class', options.className.trim());\n break;\n }\n case 'text': {\n elt.innerText = options.text;\n break;\n }\n case 'html': {\n if (options.html instanceof Element) elt.appendChild(options.html)\n else if (options.html!==undefined) elt.innerHTML = options.html;\n break;\n }\n case 'parent': {\n if (options.parent) options.parent.appendChild(elt);\n break;\n }\n case 'options': {\n if (/select/i.test(tagName)) {\n for (var i in options.options) {\n ol_ext_element.create('OPTION', {\n html: i,\n value: options.options[i],\n parent: elt \n })\n }\n }\n break;\n }\n case 'style': {\n ol_ext_element.setStyle(elt, options.style);\n break;\n }\n case 'change':\n case 'click': {\n ol_ext_element.addListener(elt, attr, options[attr]);\n break;\n }\n case 'on': {\n for (var e in options.on) {\n ol_ext_element.addListener(elt, e, options.on[e]);\n }\n break;\n }\n case 'checked': {\n elt.checked = !!options.checked;\n break;\n }\n default: {\n elt.setAttribute(attr, options[attr]);\n break;\n }\n }\n }\n }\n return elt;\n};\n\n/** Create a toggle switch input\n * @param {*} options\n * @param {string|Element} options.html\n * @param {string|Element} options.after\n * @param {boolean} options.checked\n * @param {*} [options.on] a list of actions\n * @param {function} [options.click]\n * @param {function} [options.change]\n * @param {Element} options.parent\n */\nol_ext_element.createSwitch = function (options) {\n var input = ol_ext_element.create('INPUT', {\n type: 'checkbox',\n on: options.on,\n click: options.click,\n change: options.change,\n parent: options.parent\n });\n var opt = Object.assign ({ input: input }, options || {});\n new ol_ext_input_Switch(opt);\n return input;\n};\n\n/** Create a toggle switch input\n * @param {*} options\n * @param {string|Element} options.html\n * @param {string|Element} options.after\n * @param {string} [options.name] input name\n * @param {string} [options.type=checkbox] input type: radio or checkbox\n * @param {string} options.value input value\n * @param {*} [options.on] a list of actions\n * @param {function} [options.click]\n * @param {function} [options.change]\n * @param {Element} options.parent\n */\nol_ext_element.createCheck = function (options) {\n var input = ol_ext_element.create('INPUT', {\n name: options.name,\n type: (options.type==='radio' ? 'radio' : 'checkbox'),\n on: options.on,\n parent: options.parent\n });\n var opt = Object.assign ({ input: input }, options || {});\n if (options.type === 'radio') {\n new ol_ext_input_Radio(opt);\n } else {\n new ol_ext_input_Checkbox(opt);\n }\n return input;\n};\n\n/** Set inner html or append a child element to an element\n * @param {Element} element\n * @param {Element|string} html Content of the element\n */\nol_ext_element.setHTML = function(element, html) {\n if (html instanceof Element) element.appendChild(html)\n else if (html!==undefined) element.innerHTML = html;\n};\n\n/** Append text into an elemnt\n * @param {Element} element\n * @param {string} text text content\n */\nol_ext_element.appendText = function(element, text) {\n element.appendChild(document.createTextNode(text||''));\n};\n\n/**\n * Add a set of event listener to an element\n * @param {Element} element\n * @param {string|Array<string>} eventType\n * @param {function} fn\n */\nol_ext_element.addListener = function (element, eventType, fn, useCapture ) {\n if (typeof eventType === 'string') eventType = eventType.split(' ');\n eventType.forEach(function(e) {\n element.addEventListener(e, fn, useCapture);\n });\n};\n\n/**\n * Add a set of event listener to an element\n * @param {Element} element\n * @param {string|Array<string>} eventType\n * @param {function} fn\n */\nol_ext_element.removeListener = function (element, eventType, fn) {\n if (typeof eventType === 'string') eventType = eventType.split(' ');\n eventType.forEach(function(e) {\n element.removeEventListener(e, fn);\n });\n};\n\n/**\n * Show an element\n * @param {Element} element\n */\nol_ext_element.show = function (element) {\n element.style.display = '';\n};\n\n/**\n * Hide an element\n * @param {Element} element\n */\nol_ext_element.hide = function (element) {\n element.style.display = 'none';\n};\n\n/**\n * Test if an element is hihdden\n * @param {Element} element\n * @return {boolean}\n */\nol_ext_element.hidden = function (element) {\n return ol_ext_element.getStyle(element, 'display') === 'none';\n};\n\n/**\n * Toggle an element\n * @param {Element} element\n */\nol_ext_element.toggle = function (element) {\n element.style.display = (element.style.display==='none' ? '' : 'none');\n};\n\n/** Set style of an element\n * @param {DOMElement} el the element\n * @param {*} st list of style\n */\nol_ext_element.setStyle = function(el, st) {\n for (var s in st) {\n switch (s) {\n case 'top':\n case 'left':\n case 'bottom':\n case 'right':\n case 'minWidth':\n case 'maxWidth':\n case 'width':\n case 'height': {\n if (typeof(st[s]) === 'number') {\n el.style[s] = st[s]+'px';\n } else {\n el.style[s] = st[s];\n }\n break;\n }\n default: {\n el.style[s] = st[s];\n }\n }\n }\n};\n\n/**\n * Get style propertie of an element\n * @param {DOMElement} el the element\n * @param {string} styleProp Propertie name\n * @return {*} style value\n */\nol_ext_element.getStyle = function(el, styleProp) {\n var value, defaultView = (el.ownerDocument || document).defaultView;\n // W3C standard way:\n if (defaultView && defaultView.getComputedStyle) {\n // sanitize property name to css notation\n // (hypen separated words eg. font-Size)\n styleProp = styleProp.replace(/([A-Z])/g, \"-$1\").toLowerCase();\n value = defaultView.getComputedStyle(el, null).getPropertyValue(styleProp);\n } else if (el.currentStyle) { // IE\n // sanitize property name to camelCase\n styleProp = styleProp.replace(/-(\\w)/g, function(str, letter) {\n return letter.toUpperCase();\n });\n value = el.currentStyle[styleProp];\n // convert other units to pixels on IE\n if (/^\\d+(em|pt|%|ex)?$/i.test(value)) { \n return (function(value) {\n var oldLeft = el.style.left, oldRsLeft = el.runtimeStyle.left;\n el.runtimeStyle.left = el.currentStyle.left;\n el.style.left = value || 0;\n value = el.style.pixelLeft + \"px\";\n el.style.left = oldLeft;\n el.runtimeStyle.left = oldRsLeft;\n return value;\n })(value);\n }\n }\n if (/px$/.test(value)) return parseInt(value);\n return value;\n};\n\n/** Get outerHeight of an elemen\n * @param {DOMElement} elt\n * @return {number}\n */\nol_ext_element.outerHeight = function(elt) {\n return elt.offsetHeight + ol_ext_element.getStyle(elt, 'marginBottom')\n};\n\n/** Get outerWidth of an elemen\n * @param {DOMElement} elt\n * @return {number}\n */\nol_ext_element.outerWidth = function(elt) {\n return elt.offsetWidth + ol_ext_element.getStyle(elt, 'marginLeft')\n};\n\n/** Get element offset rect\n * @param {DOMElement} elt\n * @return {*} \n */\nol_ext_element.offsetRect = function(elt) {\n var rect = elt.getBoundingClientRect();\n return {\n top: rect.top + (window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0),\n left: rect.left + (window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0),\n height: rect.height || (rect.bottom - rect.top),\n width: rect.width || (rect.right - rect.left)\n }\n};\n\n/** Get element offset \n * @param {ELement} elt\n * @returns {Object} top/left offset\n */\nol_ext_element.getFixedOffset = function(elt) {\n var offset = {\n left:0,\n top:0\n };\n var getOffset = function(parent) {\n if (!parent) return offset;\n // Check position when transform\n if (ol_ext_element.getStyle(parent, 'position') === 'absolute'\n && ol_ext_element.getStyle(parent, 'transform') !== \"none\") {\n var r = parent.getBoundingClientRect();\n offset.left += r.left; \n offset.top += r.top; \n return offset;\n }\n return getOffset(parent.offsetParent)\n }\n return getOffset(elt.offsetParent)\n};\n\n/** Get element offset rect\n * @param {DOMElement} elt\n * @param {boolean} fixed get fixed position\n * @return {Object} \n */\nol_ext_element.positionRect = function(elt, fixed) {\n var gleft = 0;\n var gtop = 0;\n\n var getRect = function( parent ) {\n if (parent) {\n gleft += parent.offsetLeft;\n gtop += parent.offsetTop;\n return getRect(parent.offsetParent);\n } else {\n var r = {\n top: elt.offsetTop + gtop,\n left: elt.offsetLeft + gleft\n };\n if (fixed) {\n r.top -= (window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0);\n r.left -= (window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0);\n }\n r.bottom = r.top + elt.offsetHeight;\n r.right = r.top + elt.offsetWidth;\n return r;\n }\n }; \n return getRect(elt.offsetParent);\n}\n\n/** Make a div scrollable without scrollbar.\n * On touch devices the default behavior is preserved\n * @param {DOMElement} elt\n * @param {*} options\n * @param {function} [options.onmove] a function that takes a boolean indicating that the div is scrolling\n * @param {boolean} [options.vertical=false] \n * @param {boolean} [options.animate=true] add kinetic to scroll\n * @param {boolean} [options.mousewheel=false] enable mousewheel to scroll\n * @param {boolean} [options.minibar=false] add a mini scrollbar to the parent element (only vertical scrolling)\n * @returns {Object} an object with a refresh function\n */\nol_ext_element.scrollDiv = function(elt, options) {\n options = options || {};\n var pos = false;\n var speed = 0;\n var d, dt = 0;\n\n var onmove = (typeof(options.onmove) === 'function' ? options.onmove : function(){});\n //var page = options.vertical ? 'pageY' : 'pageX';\n var page = options.vertical ? 'screenY' : 'screenX';\n var scroll = options.vertical ? 'scrollTop' : 'scrollLeft';\n var moving = false;\n // Factor scale content / container\n var scale, isbar;\n\n // Update the minibar\n var updateCounter = 0;\n var updateMinibar = function() {\n if (scrollbar) {\n updateCounter++;\n setTimeout(updateMinibarDelay);\n }\n }\n var updateMinibarDelay = function() {\n if (scrollbar) {\n updateCounter--;\n // Prevent multi call\n if (updateCounter) return;\n // Container height\n var pheight = elt.clientHeight;\n // Content height\n var height = elt.scrollHeight;\n // Set scrollbar value\n scale = pheight / height;\n scrollbar.style.height = scale * 100 + '%';\n scrollbar.style.top = (elt.scrollTop / height * 100) + '%';\n scrollContainer.style.height = pheight + 'px';\n // No scroll\n if (pheight > height - .5) scrollContainer.classList.add('ol-100pc');\n else scrollContainer.classList.remove('ol-100pc');\n }\n }\n \n // Handle pointer down\n var onPointerDown = function(e) {\n // Prevent scroll\n if (e.target.classList.contains('ol-noscroll')) return;\n // Start scrolling\n moving = false;\n pos = e[page];\n dt = new Date();\n elt.classList.add('ol-move');\n // Prevent elt dragging\n e.preventDefault();\n // Listen scroll\n window.addEventListener('pointermove', onPointerMove);\n ol_ext_element.addListener(window, ['pointerup','pointercancel'], onPointerUp);\n }\n\n // Register scroll\n var onPointerMove = function(e) {\n if (pos !== false) {\n var delta = (isbar ? -1/scale : 1) * (pos - e[page]);\n moving = moving || Math.round(delta)\n elt[scroll] += delta;\n d = new Date();\n if (d-dt) {\n speed = (speed + delta / (d - dt))/2;\n }\n pos = e[page];\n dt = d;\n // Tell we are moving\n if (delta) onmove(true);\n } else {\n moving = true;\n }\n };\n \n // Animate scroll\n var animate = function(to) {\n var step = (to>0) ? Math.min(100, to/2) : Math.max(-100, to/2);\n to -= step;\n elt[scroll] += step;\n if (-1 < to && to < 1) {\n if (moving) setTimeout(function() { elt.classList.remove('ol-move'); });\n else elt.classList.remove('ol-move');\n moving = false;\n onmove(false);\n } else {\n setTimeout(function() {\n animate(to);\n }, 40);\n }\n }\n \n // Initialize scroll container for minibar\n var scrollContainer, scrollbar;\n if (options.vertical && options.minibar) {\n var init = function(b) {\n // only once\n elt.removeEventListener('pointermove', init);\n elt.parentNode.classList.add('ol-miniscroll');\n scrollbar = ol_ext_element.create('DIV');\n scrollContainer = ol_ext_element.create('DIV', {\n className: 'ol-scroll',\n html: scrollbar\n });\n elt.parentNode.insertBefore(scrollContainer, elt);\n // Move scrollbar\n scrollbar.addEventListener('pointerdown', function(e) {\n isbar = true;\n onPointerDown(e)\n });\n // Handle mousewheel\n if (options.mousewheel) {\n ol_ext_element.addListener(scrollContainer, \n ['mousewheel', 'DOMMouseScroll', 'onmousewheel'], \n function(e) { onMouseWheel(e) }\n );\n ol_ext_element.addListener(scrollbar, \n ['mousewheel', 'DOMMouseScroll', 'onmousewheel'], \n function(e) { onMouseWheel(e) }\n );\n }\n // Update on enter\n elt.parentNode.addEventListener('pointerenter', updateMinibar);\n // Update on resize\n window.addEventListener('resize', updateMinibar);\n // Update\n if (b!==false) updateMinibar();\n };\n // Allready inserted in the DOM\n if (elt.parentNode) init(false);\n // or wait when ready\n else elt.addEventListener('pointermove', init);\n // Update on scroll\n elt.addEventListener('scroll', function() {\n updateMinibar();\n });\n }\n\n // Enable scroll\n elt.style['touch-action'] = 'none';\n elt.style['overflow'] = 'hidden';\n elt.classList.add('ol-scrolldiv');\n \n // Start scrolling\n ol_ext_element.addListener(elt, ['pointerdown'], function(e) {\n isbar = false;\n onPointerDown(e)\n });\n\n // Prevet click when moving...\n elt.addEventListener('click', function(e) {\n if (elt.classList.contains('ol-move')) {\n e.preventDefault();\n e.stopPropagation();\n }\n }, true);\n\n // Stop scrolling\n var onPointerUp = function(e) {\n dt = new Date() - dt;\n if (dt>100 || isbar) {\n // User stop: no speed\n speed = 0;\n } else if (dt>0) {\n // Calculate new speed\n speed = ((speed||0) + (pos - e[page]) / dt) / 2;\n }\n animate(options.animate===false ? 0 : speed*200);\n pos = false;\n speed = 0;\n dt = 0;\n // Add class to handle click (on iframe / double-click)\n if (!elt.classList.contains('ol-move')) {\n elt.classList.add('ol-hasClick')\n setTimeout(function() { elt.classList.remove('ol-hasClick'); }, 500);\n } else {\n elt.classList.remove('ol-hasClick');\n }\n isbar = false;\n window.removeEventListener('pointermove', onPointerMove)\n ol_ext_element.removeListener(window, ['pointerup','pointercancel'], onPointerUp);\n };\n\n // Handle mousewheel\n var onMouseWheel = function(e) {\n var delta = Math.max(-1, Math.min(1, (e.wheelDelta || -e.detail)));\n elt.classList.add('ol-move');\n elt[scroll] -= delta*30;\n elt.classList.remove('ol-move');\n return false;\n }\n if (options.mousewheel) { // && !elt.classList.contains('ol-touch')) {\n ol_ext_element.addListener(elt, \n ['mousewheel', 'DOMMouseScroll', 'onmousewheel'], \n onMouseWheel\n );\n }\n\n return { \n refresh: updateMinibar\n }\n};\n\n/** Dispatch an event to an Element \n * @param {string} eventName\n * @param {Element} element\n */\nol_ext_element.dispatchEvent = function (eventName, element) {\n var event;\n try {\n event = new CustomEvent(eventName);\n } catch(e) {\n // Try customevent on IE\n event = document.createEvent(\"CustomEvent\");\n event.initCustomEvent(eventName, true, true, {});\n }\n element.dispatchEvent(event);\n};\n\n/** Set cursor\n * @param {Element|ol/Map} elt\n * @param {string} cursor\n */\nol_ext_element.setCursor = function(elt, cursor) {\n if (elt instanceof ol_Map) elt = elt.getTargetElement()\n // prevent flashing on mobile device\n if (!('ontouchstart' in window) && elt instanceof Element) {\n elt.style.cursor = cursor;\n }\n}\n\nexport default ol_ext_element\n", "/*\tCopyright (c) 2015 Jean-Marc VIGLINO, \n released under the CeCILL-B license (French BSD license)\n (http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt).\n*/\nimport {unByKey as ol_Observable_unByKey} from 'ol/Observable.js'\nimport ol_control_Control from 'ol/control/Control.js'\nimport ol_layer_Tile from 'ol/layer/Tile.js'\nimport ol_layer_Vector from 'ol/layer/Vector.js'\nimport ol_layer_VectorTile from 'ol/layer/VectorTile.js'\n// ol < 6 compatibility VectorImage is not defined\n// import ol_layer_VectorImage from 'ol/layer/VectorImage.js'\nimport ol_layer_Image from 'ol/layer/Image.js'\nimport ol_layer_Heatmap from 'ol/layer/Heatmap.js'\nimport {intersects as ol_extent_intersects} from 'ol/extent.js'\n\nimport ol_ext_element from '../util/element.js'\n\n/** Layer Switcher Control.\n * @fires select\n * @fires drawlist\n * @fires toggle\n * @fires reorder-start\n * @fires reorder-end\n * @fires layer:visible\n * @fires layer:opacity\n * @fires layer:keydown\n * \n * @constructor\n * @extends {ol_control_Control}\n * @param {Object=} options\n * @param {boolean} options.selection enable layer selection when click on the title\n * @param {function} options.displayInLayerSwitcher function that takes a layer and return a boolean if the layer is displayed in the switcher, default test the displayInLayerSwitcher layer attribute\n * @param {boolean} options.show_progress show a progress bar on tile layers, default false\n * @param {boolean} options.mouseover show the panel on mouseover, default false\n * @param {boolean} options.reordering allow layer reordering, default true\n * @param {boolean} options.trash add a trash button to delete the layer, default false\n * @param {function} options.oninfo callback on click on info button, if none no info button is shown DEPRECATED: use on(info) instead\n * @param {boolean} options.extent add an extent button to zoom to the extent of the layer\n * @param {function} options.onextent callback when click on extent, default fits view to extent\n * @param {number} options.drawDelay delay in ms to redraw the layer (usefull to prevent flickering when manipulating the layers)\n * @param {boolean} options.collapsed collapse the layerswitcher at beginning, default true\n * @param {ol.layer.Group} options.layerGroup a layer group to display in the switcher, default display all layers of the map\n * @param {boolean} options.noScroll prevent handle scrolling, default false\n * @param {boolean} options.counter layer counter, default false\n * @param {function} options.onchangeCheck optional callback on click on checkbox, you can call this method for doing operations after check/uncheck a layer\n *\n * Layers attributes that control the switcher\n *\t- allwaysOnTop {boolean} true to force layer stay on top of the others while reordering, default false\n *\t- displayInLayerSwitcher {boolean} display the layer in switcher, default true\n *\t- noSwitcherDelete {boolean} to prevent layer deletion (w. trash option = true), default false\n */\nvar ol_control_LayerSwitcher = class olcontrolLayerSwitcher extends ol_control_Control {\n constructor(options) {\n options = options || {}\n var element = ol_ext_element.create('DIV', {\n className: options.switcherClass || 'ol-layerswitcher'\n })\n super({\n element: element,\n target: options.target\n })\n \n var self = this\n this.dcount = 0\n this.show_progress = options.show_progress\n this.oninfo = (typeof (options.oninfo) == 'function' ? options.oninfo : null)\n this.onextent = (typeof (options.onextent) == 'function' ? options.onextent : null)\n this.hasextent = options.extent || options.onextent\n this.hastrash = options.trash\n this.reordering = (options.reordering !== false)\n this._layers = []\n this._layerGroup = (options.layerGroup && options.layerGroup.getLayers) ? options.layerGroup : null\n this.onchangeCheck = (typeof (options.onchangeCheck) == \"function\" ? options.onchangeCheck : null)\n\n // displayInLayerSwitcher\n if (typeof (options.displayInLayerSwitcher) === 'function') {\n this.displayInLayerSwitcher = options.displayInLayerSwitcher\n }\n\n // Insert in the map\n if (!options.target) {\n element.classList.add('ol-unselectable')\n element.classList.add('ol-control')\n element.classList.add(options.collapsed !== false ? 'ol-collapsed' : 'ol-forceopen')\n if (options.counter) element.classList.add('ol-counter')\n\n this.counter = ol_ext_element.create('SPAN', {\n class: 'ol-counter',\n text: 0,\n parent: element\n });\n this.button = ol_ext_element.create('BUTTON', {\n type: 'button',\n parent: element\n })\n this.button.addEventListener('touchstart', function (e) {\n element.classList.toggle('ol-forceopen')\n element.classList.add('ol-collapsed')\n self.dispatchEvent({ type: 'toggle', collapsed: element.classList.contains('ol-collapsed') })\n e.preventDefault()\n self.overflow()\n })\n this.button.addEventListener('click', function () {\n element.classList.toggle('ol-forceopen')\n element.classList.add('ol-collapsed')\n self.dispatchEvent({ type: 'toggle', collapsed: !element.classList.contains('ol-forceopen') })\n self.overflow()\n })\n\n if (options.mouseover) {\n element.addEventListener('mouseleave', function () {\n element.classList.add(\"ol-collapsed\")\n self.dispatchEvent({ type: 'toggle', collapsed: true })\n })\n element.addEventListener('mouseover', function () {\n element.classList.remove(\"ol-collapsed\")\n self.dispatchEvent({ type: 'toggle', collapsed: false })\n })\n }\n\n if (options.minibar)\n options.noScroll = true\n if (!options.noScroll) {\n this.topv = ol_ext_element.create('DIV', {\n className: 'ol-switchertopdiv',\n parent: element,\n click: function () {\n self.overflow(\"+50%\")\n }\n })\n\n this.botv = ol_ext_element.create('DIV', {\n className: 'ol-switcherbottomdiv',\n parent: element,\n click: function () {\n self.overflow(\"-50%\")\n }\n })\n }\n this._noScroll = options.noScroll\n }\n\n this.panel_ = ol_ext_element.create('UL', {\n className: 'panel',\n })\n this.panelContainer_ = ol_ext_element.create('DIV', {\n className: 'panel-container',\n html: this.panel_,\n parent: element\n })\n // Handle mousewheel\n if (!options.target && !options.noScroll) {\n ol_ext_element.addListener(this.panel_, 'mousewheel DOMMouseScroll onmousewheel', function (e) {\n if (self.overflow(Math.max(-1, Math.min(1, (e.wheelDelta || -e.detail))))) {\n e.stopPropagation()\n e.preventDefault()\n }\n })\n }\n\n this.header_ = ol_ext_element.create('LI', {\n className: 'ol-header',\n parent: this.panel_\n })\n\n this.set('drawDelay', options.drawDelay || 0)\n this.set('selection', options.selection)\n\n if (options.minibar) {\n // Wait init complete (for child classes)\n setTimeout(function () {\n var mbar = ol_ext_element.scrollDiv(this.panelContainer_, {\n mousewheel: true,\n vertical: true,\n minibar: true\n })\n this.on(['drawlist', 'toggle'], function () {\n mbar.refresh()\n })\n }.bind(this))\n }\n }\n /** Test if a layer should be displayed in the switcher\n * @param {ol.layer} layer\n * @return {boolean} true if the layer is displayed\n */\n displayInLayerSwitcher(layer) {\n return (layer.get('displayInLayerSwitcher') !== false)\n }\n /**\n * Set the map instance the control is associated with.\n * @param {_ol_Map_} map The map instance.\n */\n setMap(map) {\n super.setMap(map)\n this.drawPanel()\n\n if (this._listener) {\n for (var i in this._listener){\n ol_Observable_unByKey(this._listener[i])\n }\n }\n this._listener = null\n\n // Get change (new layer added or removed)\n if (map) {\n this._listener = {\n moveend: map.on('moveend', this.viewChange.bind(this)),\n size: map.on('change:size', this.overflow.bind(this))\n }\n // Listen to a layer group\n if (this._layerGroup) {\n this._listener.change = this._layerGroup.getLayers().on('change:length', this.drawPanel.bind(this))\n } else {\n //Listen to all layers\n this._listener.change = map.getLayerGroup().getLayers().on('change:length', this.drawPanel.bind(this))\n }\n }\n }\n /** Show control\n */\n show() {\n this.element.classList.add('ol-forceopen')\n this.overflow()\n this.dispatchEvent({ type: 'toggle', collapsed: false })\n }\n /** Hide control\n */\n hide() {\n this.element.classList.remove('ol-forceopen')\n this.overflow()\n this.dispatchEvent({ type: 'toggle', collapsed: true })\n }\n /** Toggle control\n */\n toggle() {\n this.element.classList.toggle(\"ol-forceopen\")\n this.overflow()\n this.dispatchEvent({ type: 'toggle', collapsed: !this.isOpen() })\n }\n /** Is control open\n * @return {boolean}\n */\n isOpen() {\n return this.element.classList.contains(\"ol-forceopen\")\n }\n /** Add a custom header\n * @param {Element|string} html content html\n */\n setHeader(html) {\n ol_ext_element.setHTML(this.header_, html)\n }\n /** Calculate overflow and add scrolls\n * @param {Number} dir scroll direction -1|0|1|'+50%'|'-50%'\n * @private\n */\n overflow(dir) {\n if (this.button && !this._noScroll) {\n // Nothing to show\n if (ol_ext_element.hidden(this.panel_)) {\n ol_ext_element.setStyle(this.element, { height: 'auto' })\n return\n }\n // Calculate offset\n var h = ol_ext_element.outerHeight(this.element)\n var hp = ol_ext_element.outerHeight(this.panel_)\n var dh = this.button.offsetTop + ol_ext_element.outerHeight(this.button)\n //var dh = this.button.position().top + this.button.outerHeight(true);\n var top = this.panel_.offsetTop - dh\n if (hp > h - dh) {\n // Bug IE: need to have an height defined\n ol_ext_element.setStyle(this.element, { height: '100%' })\n var li = this.panel_.querySelectorAll('li.ol-visible .li-content')[0]\n var lh = li ? 2 * ol_ext_element.getStyle(li, 'height') : 0\n switch (dir) {\n case 1: top += lh; break\n case -1: top -= lh; break\n case \"+50%\": top += Math.round(h / 2); break\n case \"-50%\": top -= Math.round(h / 2); break\n default: break\n }\n // Scroll div\n if (top + hp <= h - 3 * dh / 2) {\n top = h - 3 * dh / 2 - hp\n ol_ext_element.hide(this.botv)\n } else {\n ol_ext_element.show(this.botv)\n }\n if (top >= 0) {\n top = 0\n ol_ext_element.hide(this.topv)\n } else {\n ol_ext_element.show(this.topv)\n }\n // Scroll ?\n ol_ext_element.setStyle(this.panel_, { top: top + \"px\" })\n return true\n } else {\n ol_ext_element.setStyle(this.element, { height: \"auto\" })\n ol_ext_element.setStyle(this.panel_, { top: 0 })\n ol_ext_element.hide(this.botv)\n ol_ext_element.hide(this.topv)\n return false\n }\n }\n else\n return false\n }\n /** Set the layer associated with a li\n * @param {Element} li\n * @param {ol.layer} layer\n * @private\n */\n _setLayerForLI(li, layer) {\n var listeners = []\n if (layer.getLayers) {\n listeners.push(layer.getLayers().on('change:length', this.drawPanel.bind(this)))\n }\n if (li) {\n // Handle opacity change\n listeners.push(layer.on('change:opacity', (function () {\n this.setLayerOpacity(layer, li)\n }).bind(this)))\n // Handle visibility chage\n listeners.push(layer.on('change:visible', (function () {\n this.setLayerVisibility(layer, li)\n }).bind(this)))\n }\n // Other properties\n listeners.push(layer.on('propertychange', (function (e) {\n if (e.key === 'displayInLayerSwitcher'\n || e.key === 'openInLayerSwitcher'\n || e.key === 'title'\n || e.key === 'name') {\n this.drawPanel(e)\n }\n }).bind(this)))\n this._layers.push({ li: li, layer: layer, listeners: listeners })\n }\n /** Set opacity for a layer\n * @param {ol.layer.Layer} layer\n * @param {Element} li the list element\n * @private\n */\n setLayerOpacity(layer, li) {\n var i = li.querySelector('.layerswitcher-opacity-cursor')\n if (i){\n i.style.left = (layer.getOpacity() * 100) + \"%\"\n }\n this.dispatchEvent({ type: 'layer:opacity', layer: layer })\n }\n /** Set visibility for a layer\n * @param {ol.layer.Layer} layer\n * @param {Element} li the list element\n * @api\n */\n setLayerVisibility(layer, li) {\n var i = li.querySelector('.ol-visibility')\n if (i) {\n i.checked = layer.getVisible()\n }\n if (layer.getVisible()){\n li.classList.add('ol-visible')\n } else{\n li.classList.remove('ol-visible')\n }\n this.dispatchEvent({ type: 'layer:visible', layer: layer })\n }\n /** Clear layers associated with li\n * @private\n */\n _clearLayerForLI() {\n this._layers.forEach(function (li) {\n li.listeners.forEach(function (l) {\n ol_Observable_unByKey(l)\n })\n })\n this._layers = []\n }\n /** Get the layer associated with a li\n * @param {Element} li\n * @return {ol.layer}\n * @private\n */\n _getLayerForLI(li) {\n for (var i = 0, l; l = this._layers[i]; i++) {\n if (l.li === li) {\n return l.layer\n }\n }\n return null\n }\n /**\n * On view change hide layer depending on resolution / extent\n * @private\n */\n viewChange() {\n this.panel_.querySelectorAll('li').forEach(function (li) {\n var l = this._getLayerForLI(li)\n if (l) {\n if (this.testLayerVisibility(l)) {\n li.classList.remove('ol-layer-hidden')\n } else {\n li.classList.add('ol-layer-hidden')\n }\n }\n }.bind(this))\n }\n /** Get control panel\n * @api\n */\n getPanel() {\n return this.panelContainer_\n }\n /** Draw the panel control (prevent multiple draw due to layers manipulation on the map with a delay function)\n * @api\n */\n drawPanel() {\n if (!this.getMap())\n return\n var self = this\n // Multiple event simultaneously / draw once => put drawing in the event queue\n this.dcount++\n setTimeout(function () { self.drawPanel_() }, this.get('drawDelay') || 0)\n }\n /** Delayed draw panel control\n * @private\n */\n drawPanel_() {\n if (--this.dcount || this.dragging_) {\n return\n }\n var scrollTop = this.panelContainer_.scrollTop\n\n // Remove existing layers\n this._clearLayerForLI()\n this.panel_.querySelectorAll('li').forEach(function (li) {\n if (!li.classList.contains('ol-header')) li.remove()\n }.bind(this))\n // Draw list\n if (this._layerGroup) {\n this.drawList(this.panel_, this._layerGroup.getLayers())\n } else if (this.getMap()) {\n this.drawList(this.panel_, this.getMap().getLayers())\n }\n // Reset scrolltop\n this.panelContainer_.scrollTop = scrollTop\n // Counter\n if (this.counter) {\n this.counter.innerHTML = this.panel_.parentNode.querySelectorAll('ul.panel > li:not(.ol-header)').length;\n }\n }\n /** Change layer visibility according to the baselayer option\n * @param {ol.layer}\n * @param {Array<ol.layer>} related layers\n * @private\n */\n switchLayerVisibility(l, layers) {\n if (!l.get('baseLayer')) {\n l.setVisible(!l.getVisible())\n } else {\n if (!l.getVisible()) {\n l.setVisible(true)\n }\n layers.forEach(function (li) {\n if (l !== li && li.get('baseLayer') && li.getVisible()) {\n li.setVisible(false)\n }\n })\n }\n }\n /** Check if layer is on the map (depending on resolution / zoom and extent)\n * @param {ol.layer}\n * @return {boolean}\n * @private\n */\n testLayerVisibility(layer) {\n if (!this.getMap())\n return true\n var res = this.getMap().getView().getResolution()\n var zoom = this.getMap().getView().getZoom()\n // Calculate visibility on resolution or zoom\n if (layer.getMaxResolution() <= res || layer.getMinResolution() >= res) {\n return false\n } else if (layer.getMinZoom && (layer.getMinZoom() >= zoom || layer.getMaxZoom() < zoom)) {\n return false\n } else {\n // Check extent\n var ex0 = layer.getExtent()\n if (ex0) {\n var ex = this.getMap().getView().calculateExtent(this.getMap().getSize())\n return ol_extent_intersects(ex, ex0)\n }\n return true\n }\n }\n /** Start ordering the list\n *\t@param {event} e drag event\n *\t@private\n */\n dragOrdering_(e) {\n e.stopPropagation()\n e.preventDefault()\n // Get params\n var self = this\n var elt = e.currentTarget.parentNode.parentNode\n var start = true\n var panel = this.panel_\n var pageY\n var pageY0 = e.pageY\n || (e.touches && e.touches.length && e.touches[0].pageY)\n || (e.changedTouches && e.changedTouches.length && e.changedTouches[0].pageY)\n var target, dragElt\n var layer, group\n elt.parentNode.classList.add('drag')\n\n // Stop ordering\n function stop() {\n if (target) {\n // Get drag on parent\n var drop = layer\n var isSelected = self.getSelection() === drop\n if (drop && target) {\n var collection\n if (group) {\n collection = group.getLayers()\n } else {\n collection = self._layerGroup ? self._layerGroup.getLayers() : self.getMap().getLayers()\n }\n var layers = collection.getArray()\n // Switch layers\n for (var i = 0; i < layers.length; i++) {\n if (layers[i] == drop) {\n collection.removeAt(i)\n break\n }\n }\n for (var j = 0; j < layers.length; j++) {\n if (layers[j] === target) {\n if (i > j) {\n collection.insertAt(j, drop)\n } else {\n collection.insertAt(j + 1, drop)\n }\n break\n }\n }\n }\n if (isSelected) self.selectLayer(drop)\n\n self.dispatchEvent({ type: \"reorder-end\", layer: drop, group: group })\n }\n\n elt.parentNode.querySelectorAll('li').forEach(function (li) {\n li.classList.remove('dropover')\n li.classList.remove('dropover-after')\n li.classList.remove('dropover-before')\n })\n elt.classList.remove(\"drag\")\n elt.parentNode.classList.remove(\"drag\")\n self.element.classList.remove('drag')\n if (dragElt)\n dragElt.remove()\n\n ol_ext_element.removeListener(document, 'mousemove touchmove', move)\n ol_ext_element.removeListener(document, 'mouseup touchend touchcancel', stop)\n }\n\n // Ordering\n function move(e) {\n // First drag (more than 2 px) => show drag element (ghost)\n pageY = e.pageY\n || (e.touches && e.touches.length && e.touches[0].pageY)\n || (e.changedTouches && e.changedTouches.length && e.changedTouches[0].pageY)\n if (start && Math.abs(pageY0 - pageY) > 2) {\n start = false\n elt.classList.add(\"drag\")\n layer = self._getLayerForLI(elt)\n target = false\n group = self._getLayerForLI(elt.parentNode.parentNode)\n // Ghost div\n dragElt = ol_ext_element.create('LI', {\n className: 'ol-dragover',\n html: elt.innerHTML,\n style: {\n position: \"absolute\",\n \"z-index\": 10000,\n left: elt.offsetLeft,\n opacity: 0.5,\n width: ol_ext_element.outerWidth(elt),\n height: ol_ext_element.getStyle(elt, 'height'),\n },\n parent: panel\n })\n self.element.classList.add('drag')\n self.dispatchEvent({ type: \"reorder-start\", layer: layer, group: group })\n }\n // Start a new drag sequence\n if (!start) {\n e.preventDefault()\n e.stopPropagation()\n\n // Ghost div\n ol_ext_element.setStyle(dragElt, { top: pageY - ol_ext_element.offsetRect(panel).top + panel.scrollTop + 5 })\n\n var li\n if (!e.touches) {\n li = e.target\n \n // Get the HTML node within web component on click drag\n if(e.target.shadowRoot){\n li = e.composedPath()[0]\n }\n } else {\n li = document.elementFromPoint(e.touches[0].clientX, e.touches[0].clientY);\n \n //Get actual HTML node within web component on touch drag\n while(li.shadowRoot){\n li = li.shadowRoot.elementFromPoint(e.touches[0].clientX, e.touches[0].clientY)\n }\n }\n if (li.classList.contains(\"ol-switcherbottomdiv\")) {\n self.overflow(-1)\n } else if (li.classList.contains(\"ol-switchertopdiv\")) {\n self.overflow(1)\n }\n // Get associated li\n while (li && li.tagName !== 'LI') {\n li = li.parentNode\n }\n if (!li || !li.classList.contains('dropover')) {\n elt.parentNode.querySelectorAll('li').forEach(function (li) {\n li.classList.remove('dropover')\n li.classList.remove('dropover-after')\n li.classList.remove('dropover-before')\n })\n }\n if (li && li.parentNode.classList.contains('drag') && li !== elt) {\n target = self._getLayerForLI(li)\n // Don't mix layer level\n if (target && !target.get('allwaysOnTop') == !layer.get('allwaysOnTop')) {\n li.classList.add(\"dropover\")\n li.classList.add((elt.offsetTop < li.offsetTop) ? 'dropover-after' : 'dropover-before')\n } else {\n target = false\n }\n ol_ext_element.show(dragElt)\n } else {\n target = false\n if (li === elt)\n ol_ext_element.hide(dragElt)\n else\n ol_ext_element.show(dragElt)\n }\n\n if (!target)\n dragElt.classList.add(\"forbidden\")\n else\n dragElt.classList.remove(\"forbidden\")\n }\n }\n\n // Start ordering\n ol_ext_element.addListener(document, 'mousemove touchmove', move)\n ol_ext_element.addListener(document, 'mouseup touchend touchcancel', stop)\n }\n /** Change opacity on drag\n *\t@param {event} e drag event\n *\t@private\n */\n dragOpacity_(e) {\n e.stopPropagation()\n e.preventDefault()\n var self = this\n // Register start params\n var elt = e.target\n var layer = this._getLayerForLI(elt.parentNode.parentNode.parentNode)\n if (!layer)\n return\n var x = e.pageX\n || (e.touches && e.touches.length && e.touches[0].pageX)\n || (e.changedTouches && e.changedTouches.length && e.changedTouches[0].pageX)\n var start = ol_ext_element.getStyle(elt, 'left') - x\n self.dragging_ = true\n\n // stop dragging\n function stop() {\n ol_ext_element.removeListener(document, \"mouseup touchend touchcancel\", stop)\n ol_ext_element.removeListener(document, \"mousemove touchmove\", move)\n self.dragging_ = false\n }\n // On draggin\n function move(e) {\n var x = e.pageX\n || (e.touches && e.touches.length && e.touches[0].pageX)\n || (e.changedTouches && e.changedTouches.length && e.changedTouches[0].pageX)\n var delta = (start + x) / ol_ext_element.getStyle(elt.parentNode, 'width')\n var opacity = Math.max(0, Math.min(1, delta))\n ol_ext_element.setStyle(elt, { left: (opacity * 100) + \"%\" })\n elt.parentNode.nextElementSibling.innerHTML = Math.round(opacity * 100)\n layer.setOpacity(opacity)\n }\n // Register move\n ol_ext_element.addListener(document, \"mouseup touchend touchcancel\", stop)\n ol_ext_element.addListener(document, \"mousemove touchmove\", move)\n }\n /** Render a list of layer\n * @param {Elemen} element to render\n * @layers {Array{ol.layer}} list of layer to show\n * @api stable\n * @private\n */\n drawList(ul, collection) {\n var self = this\n var layers = collection.getArray()\n\n // Change layer visibility\n var setVisibility = function (e) {\n e.stopPropagation()\n e.preventDefault()\n var l = self._getLayerForLI(this.parentNode.parentNode)\n self.switchLayerVisibility(l, collection)\n if (self.get('selection') && l.getVisible()) {\n self.selectLayer(l)\n }\n if (self.onchangeCheck) {\n self.onchangeCheck(l)\n }\n }\n // Info button click\n function onInfo(e) {\n e.stopPropagation()\n e.preventDefault()\n var l = self._getLayerForLI(this.parentNode.parentNode)\n self.oninfo(l)\n self.dispatchEvent({ type: \"info\", layer: l })\n }\n // Zoom to extent button\n function zoomExtent(e) {\n e.stopPropagation()\n e.preventDefault()\n var l = self._getLayerForLI(this.parentNode.parentNode)\n if (self.onextent) {\n self.onextent(l)\n } else {\n self.getMap().getView().fit(l.getExtent(), self.getMap().getSize())\n }\n self.dispatchEvent({ type: \"extent\", layer: l })\n }\n // Remove a layer on trash click\n function removeLayer(e) {\n e.stopPropagation()\n e.preventDefault()\n var li = this.parentNode.parentNode.parentNode.parentNode\n var layer, group = self._getLayerForLI(li)\n // Remove the layer from a group or from a map\n if (group) {\n layer = self._getLayerForLI(this.parentNode.parentNode)\n group.getLayers().remove(layer)\n if (group.getLayers().getLength() == 0 && !group.get('noSwitcherDelete')) {\n removeLayer.call(li.querySelectorAll('.layerTrash')[0], e)\n }\n } else {\n li = this.parentNode.parentNode\n self.getMap().removeLayer(self._getLayerForLI(li))\n }\n }\n\n // Create a list for a layer\n function createLi(layer) {\n if (!this.displayInLayerSwitcher(layer)) {\n this._setLayerForLI(null, layer)\n return\n }\n\n var li = ol_ext_element.create('LI', {\n className: (layer.getVisible() ? \"ol-visible \" : \" \") + (layer.get('baseLayer') ? \"baselayer\" : \"\"),\n parent: ul\n })\n this._setLayerForLI(li, layer)\n if (this._selectedLayer === layer) {\n li.classList.add('ol-layer-select')\n }\n\n var layer_buttons = ol_ext_element.create('DIV', {\n className: 'ol-layerswitcher-buttons',\n parent: li\n })\n\n // Content div\n var d = ol_ext_element.create('DIV', {\n className: 'li-content',\n parent: li\n })\n\n // Visibility\n var input = ol_ext_element.create('INPUT', {\n type: layer.get('baseLayer') ? 'radio' : 'checkbox',\n className: 'ol-visibility',\n checked: layer.getVisible(),\n click: function(e) {\n setVisibility.bind(this)(e)\n setTimeout(function() { e.target.checked = layer.getVisible(); });\n },\n on: {\n // Set opacity on keydown\n keydown: function(e) {\n switch (e.key) {\n // Change opacity on arrow\n case 'ArrowLeft':\n case 'ArrowRight': {\n e.preventDefault();\n e.stopPropagation();\n var delta = (e.key==='ArrowLeft' ? -0.1 : 0.1);\n var opacity = Math.min(1, Math.max(0, layer.getOpacity() + delta))\n layer.setOpacity(opacity)\n break;\n }\n // Select on enter\n case 'Enter': {\n if (self.get('selection')) {\n e.preventDefault();\n e.stopPropagation();\n self.selectLayer(layer)\n }\n break;\n }\n // Expend \n case '-': \n case '+': {\n if (layer.getLayers) {\n this._focus = layer;\n layer.set(\"openInLayerSwitcher\", !layer.get(\"openInLayerSwitcher\"))\n }\n }\n // Move up dans down\n // fallthrough\n case 'ArrowUp':\n case 'ArrowDown': {\n if (e.ctrlKey && this.reordering) {\n e.preventDefault();\n e.stopPropagation();\n var pos = collection.getArray().indexOf(layer);\n if (pos > -1) {\n if (e.key === 'ArrowDown') {\n if (pos > 0) {\n collection.remove(layer);\n collection.insertAt(pos-1, layer)\n self._focus = layer\n self.dispatchEvent({ type: \"reorder-end\", layer: layer })\n }\n } else {\n if (pos < collection.getLength()-1) {\n collection.remove(layer);\n collection.insertAt(pos+1, layer)\n self._focus = layer\n self.dispatchEvent({ type: \"reorder-end\", layer: layer })\n }\n }\n }\n }\n break;\n }\n default: {\n var group = this._getLayerForLI(ul.parentNode)\n this.dispatchEvent({ type: 'layer:keydown', key: e.key, group: group, li: li, layer: layer, originalEvent: e })\n }\n }\n }.bind(this)\n },\n parent: d\n })\n // Focus on element\n if (layer === self._focus) {\n input.focus();\n self.overflow()\n }\n // Label\n var label = ol_ext_element.create('LABEL', {\n title: layer.get('title') || layer.get('name'),\n click: setVisibility,\n style: {\n userSelect: 'none'\n },\n parent: d\n })\n label.addEventListener('selectstart', function () { return false })\n ol_ext_element.create('SPAN', {\n html: layer.get('title') || layer.get('name'),\n click: function (e) {\n if (this.get('selection')) {\n e.stopPropagation()\n this.selectLayer(layer)\n }\n }.bind(this),\n parent: label\n })\n \n // up/down\n if (this.reordering) {\n if ((i < layers.length - 1 && (layer.get(\"allwaysOnTop\") || !layers[i + 1].get(\"allwaysOnTop\")))\n || (i > 0 && (!layer.get(\"allwaysOnTop\") || layers[i - 1].get(\"allwaysOnTop\")))) {\n ol_ext_element.create('DIV', {\n className: 'layerup ol-noscroll',\n title: this.tip.up,\n on: { 'mousedown touchstart': function (e) { self.dragOrdering_(e) } },\n parent: layer_buttons\n })\n }\n }\n\n // Show/hide sub layers\n if (layer.getLayers) {\n var nb = 0\n layer.getLayers().forEach(function (l) {\n if (self.displayInLayerSwitcher(l))\n nb++\n })\n if (nb) {\n ol_ext_element.create('DIV', {\n className: layer.get(\"openInLayerSwitcher\") ? \"collapse-layers\" : \"expend-layers\",\n title: this.tip.plus,\n click: function () {\n var l = self._getLayerForLI(this.parentNode.parentNode)\n l.set(\"openInLayerSwitcher\", !l.get(\"openInLayerSwitcher\"))\n },\n parent: layer_buttons\n })\n }\n }\n\n // Info button\n if (this.oninfo) {\n ol_ext_element.create('DIV', {\n className: 'layerInfo',\n title: this.tip.info,\n click: onInfo,\n parent: layer_buttons\n })\n }\n // Layer remove\n if (this.hastrash && !layer.get(\"noSwitcherDelete\")) {\n ol_ext_element.create('DIV', {\n className: 'layerTrash',\n title: this.tip.trash,\n click: removeLayer,\n parent: layer_buttons\n })\n }\n // Layer extent\n if (this.hasextent && layers[i].getExtent()) {\n var ex = layers[i].getExtent()\n if (ex.length == 4 && ex[0] < ex[2] && ex[1] < ex[3]) {\n ol_ext_element.create('DIV', {\n className: 'layerExtent',\n title: this.tip.extent,\n click: zoomExtent,\n parent: layer_buttons\n })\n }\n }\n\n // Progress\n if (this.show_progress && layer instanceof ol_layer_Tile) {\n var p = ol_ext_element.create('DIV', {\n className: 'layerswitcher-progress',\n parent: d\n })\n this.setprogress_(layer)\n layer.layerswitcher_progress = ol_ext_element.create('DIV', { parent: p })\n }\n\n // Opacity\n var opacity = ol_ext_element.create('DIV', {\n className: 'layerswitcher-opacity',\n // Click on the opacity line\n click: function (e) {\n if (e.target !== this)\n return\n e.stopPropagation()\n e.preventDefault()\n var op = Math.max(0, Math.min(1, e.offsetX / ol_ext_element.getStyle(this, 'width')))\n self._getLayerForLI(this.parentNode.parentNode).setOpacity(op)\n this.parentNode.querySelectorAll('.layerswitcher-opacity-label')[0].innerHTML = Math.round(op * 100)\n },\n parent: d\n })\n // Start dragging\n ol_ext_element.create('DIV', {\n className: 'layerswitcher-opacity-cursor ol-noscroll',\n style: { left: (layer.getOpacity() * 100) + \"%\" },\n on: {\n 'mousedown touchstart': function (e) { self.dragOpacity_(e) }\n },\n parent: opacity\n })\n // Percent\n ol_ext_element.create('DIV', {\n className: 'layerswitcher-opacity-label',\n html: Math.round(layer.getOpacity() * 100),\n parent: d\n })\n\n // Layer group\n if (layer.getLayers) {\n li.classList.add('ol-layer-group')\n if (layer.get(\"openInLayerSwitcher\") === true) {\n var ul2 = ol_ext_element.create('UL', {\n parent: li\n })\n this.drawList(ul2, layer.getLayers())\n }\n }\n li.classList.add(this.getLayerClass(layer))\n\n // Dispatch a dralist event to allow customisation\n this.dispatchEvent({ type: 'drawlist', layer: layer, li: li })\n }\n\n // Add the layer list\n for (var i = layers.length - 1; i >= 0; i--) {\n createLi.call(this, layers[i])\n }\n\n this.viewChange()\n\n if (ul === this.panel_) {\n this.overflow('')\n // Remove focus\n this._focus = null;\n }\n\n }\n /** Select a layer\n * @param {ol.layer.Layer} layer\n * @returns {string} the layer classname\n * @api\n */\n getLayerClass(layer) {\n if (!layer)\n return 'none'\n if (layer.getLayers)\n return 'ol-layer-group'\n if (layer instanceof ol_layer_Vector)\n return 'ol-layer-vector'\n if (layer instanceof ol_layer_VectorTile)\n return 'ol-layer-vectortile'\n if (layer instanceof ol_layer_Tile)\n return 'ol-layer-tile'\n if (layer instanceof ol_layer_Image)\n return 'ol-layer-image'\n if (layer instanceof ol_layer_Heatmap)\n return 'ol-layer-heatmap'\n /* ol < 6 compatibility VectorImage is not defined */\n // if (layer instanceof ol_layer_VectorImage) return 'ol-layer-vectorimage';\n if (layer.getFeatures)\n return 'ol-layer-vectorimage'\n /* */\n return 'unknown'\n }\n /** Select a layer\n * @param {ol.layer.Layer} layer\n * @api\n */\n selectLayer(layer, silent) {\n if (!layer) {\n if (!this.getMap())\n return\n layer = this.getMap().getLayers().item(this.getMap().getLayers().getLength() - 1)\n }\n this._selectedLayer = layer\n // Has focus ?\n if (this.element.querySelector('input.ol-visibility:focus')) {\n this._focus = layer;\n }\n // Draw\n this.drawPanel()\n if (!silent) {\n this.dispatchEvent({ type: 'select', layer: layer })\n }\n }\n /** Get selected layer\n * @returns {ol.layer.Layer}\n */\n getSelection() {\n return this._selectedLayer\n }\n /** Handle progress bar for a layer\n *\t@private\n */\n setprogress_(layer) {\n if (!layer.layerswitcher_progress) {\n var loaded = 0\n var loading = 0\n var draw = function () {\n if (loading === loaded) {\n loading = loaded = 0\n ol_ext_element.setStyle(layer.layerswitcher_progress, { width: 0 }) // layer.layerswitcher_progress.width(0);\n } else {\n ol_ext_element.setStyle(layer.layerswitcher_progress, { width: (loaded / loading * 100).toFixed(1) + '%' }) // layer.layerswitcher_progress.css('width', (loaded / loading * 100).toFixed(1) + '%');\n }\n }\n layer.getSource().on('tileloadstart', function () {\n loading++\n draw()\n })\n layer.getSource().on('tileloadend', function () {\n loaded++\n draw()\n })\n layer.getSource().on('tileloaderror', function () {\n loaded++\n draw()\n })\n }\n }\n}\n\n/** List of tips for internationalization purposes\n*/\nol_control_LayerSwitcher.prototype.tip = {\n up: \"up/down\",\n down: \"down\",\n info: \"informations...\",\n extent: \"zoom to extent\",\n trash: \"remove layer\",\n plus: \"expand/shrink\"\n};\n\nexport default ol_control_LayerSwitcher\n", "/**\n * @module ol/control/MousePosition\n */\n\nimport {wrapX} from '../coordinate.js';\nimport {listen} from '../events.js';\nimport EventType from '../pointer/EventType.js';\nimport {\n get as getProjection,\n getTransformFromProjections,\n getUserProjection,\n identityTransform,\n} from '../proj.js';\nimport Control from './Control.js';\n\n/**\n * @type {string}\n */\nconst PROJECTION = 'projection';\n\n/**\n * @type {string}\n */\nconst COORDINATE_FORMAT = 'coordinateFormat';\n\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature<import(\"../Observable\").EventTypes, import(\"../events/Event.js\").default, Return> &\n * import(\"../Observable\").OnSignature<import(\"../ObjectEventType\").Types|\n * 'change:coordinateFormat'|'change:projection', import(\"../Object\").ObjectEvent, Return> &\n * import(\"../Observable\").CombinedOnSignature<import(\"../Observable\").EventTypes|import(\"../ObjectEventType\").Types|\n * 'change:coordinateFormat'|'change:projection', Return>} MousePositionOnSignature\n */\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-mouse-position'] CSS class name.\n * @property {import(\"../coordinate.js\").CoordinateFormat} [coordinateFormat] Coordinate format.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the\n * control should be re-rendered. This is called in a `requestAnimationFrame`\n * callback.\n * @property {HTMLElement|string} [target] Specify a target if you want the\n * control to be rendered outside of the map's viewport.\n * @property {string} [placeholder] Markup to show when the mouse position is not\n * available (e.g. when the pointer leaves the map viewport). By default, a non-breaking space is rendered\n * initially and the last position is retained when the mouse leaves the viewport.\n * When a string is provided (e.g. `'no position'` or `''` for an empty string) it is used as a\n * placeholder.\n * @property {boolean} [wrapX=true] Wrap the world horizontally on the projection's antimeridian, if it\n * is a global projection.\n */\n\n/**\n * @classdesc\n * A control to show the 2D coordinates of the mouse cursor. By default, these\n * are in the view projection, but can be in any supported projection.\n * By default the control is shown in the top right corner of the map, but this\n * can be changed by using the css selector `.ol-mouse-position`.\n *\n * On touch devices, which usually do not have a mouse cursor, the coordinates\n * of the currently touched position are shown.\n *\n * @api\n */\nclass MousePosition extends Control {\n /**\n * @param {Options} [options] Mouse position options.\n */\n constructor(options) {\n options = options ? options : {};\n\n const element = document.createElement('div');\n element.className =\n options.className !== undefined ? options.className : 'ol-mouse-position';\n\n super({\n element: element,\n render: options.render,\n target: options.target,\n });\n\n /***\n * @type {MousePositionOnSignature<import(\"../events\").EventsKey>}\n */\n this.on;\n\n /***\n * @type {MousePositionOnSignature<import(\"../events\").EventsKey>}\n */\n this.once;\n\n /***\n * @type {MousePositionOnSignature<void>}\n */\n this.un;\n\n this.addChangeListener(PROJECTION, this.handleProjectionChanged_);\n\n if (options.coordinateFormat) {\n this.setCoordinateFormat(options.coordinateFormat);\n }\n if (options.projection) {\n this.setProjection(options.projection);\n }\n\n /**\n * @private\n * @type {boolean}\n */\n this.renderOnMouseOut_ = options.placeholder !== undefined;\n\n /**\n * @private\n * @type {string}\n */\n this.placeholder_ = this.renderOnMouseOut_ ? options.placeholder : ' ';\n\n /**\n * @private\n * @type {string}\n */\n this.renderedHTML_ = element.innerHTML;\n\n /**\n * @private\n * @type {?import(\"../proj/Projection.js\").default}\n */\n this.mapProjection_ = null;\n\n /**\n * @private\n * @type {?import(\"../proj.js\").TransformFunction}\n */\n this.transform_ = null;\n\n /**\n * @private\n * @type {boolean}\n */\n this.wrapX_ = options.wrapX === false ? false : true;\n }\n\n /**\n * @private\n */\n handleProjectionChanged_() {\n this.transform_ = null;\n }\n\n /**\n * Return the coordinate format type used to render the current position or\n * undefined.\n * @return {import(\"../coordinate.js\").CoordinateFormat|undefined} The format to render the current\n * position in.\n * @observable\n * @api\n */\n getCoordinateFormat() {\n return /** @type {import(\"../coordinate.js\").CoordinateFormat|undefined} */ (\n this.get(COORDINATE_FORMAT)\n );\n }\n\n /**\n * Return the projection that is used to report the mouse position.\n * @return {import(\"../proj/Projection.js\").default|undefined} The projection to report mouse\n * position in.\n * @observable\n * @api\n */\n getProjection() {\n return /** @type {import(\"../proj/Projection.js\").default|undefined} */ (\n this.get(PROJECTION)\n );\n }\n\n /**\n * @param {MouseEvent} event Browser event.\n * @protected\n */\n handleMouseMove(event) {\n const map = this.getMap();\n this.updateHTML_(map.getEventPixel(event));\n }\n\n /**\n * @param {Event} event Browser event.\n * @protected\n */\n handleMouseOut(event) {\n this.updateHTML_(null);\n }\n\n /**\n * Remove the control from its current map and attach it to the new map.\n * Pass `null` to just remove the control from the current map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../Map.js\").default|null} map Map.\n * @api\n * @override\n */\n setMap(map) {\n super.setMap(map);\n if (map) {\n const viewport = map.getViewport();\n this.listenerKeys.push(\n listen(viewport, EventType.POINTERMOVE, this.handleMouseMove, this),\n );\n if (this.renderOnMouseOut_) {\n this.listenerKeys.push(\n listen(viewport, EventType.POINTEROUT, this.handleMouseOut, this),\n );\n }\n this.updateHTML_(null);\n }\n }\n\n /**\n * Set the coordinate format type used to render the current position.\n * @param {import(\"../coordinate.js\").CoordinateFormat} format The format to render the current\n * position in.\n * @observable\n * @api\n */\n setCoordinateFormat(format) {\n this.set(COORDINATE_FORMAT, format);\n }\n\n /**\n * Set the projection that is used to report the mouse position.\n * @param {import(\"../proj.js\").ProjectionLike} projection The projection to report mouse\n * position in.\n * @observable\n * @api\n */\n setProjection(projection) {\n this.set(PROJECTION, getProjection(projection));\n }\n\n /**\n * @param {?import(\"../pixel.js\").Pixel} pixel Pixel.\n * @private\n */\n updateHTML_(pixel) {\n let html = this.placeholder_;\n if (pixel && this.mapProjection_) {\n if (!this.transform_) {\n const projection = this.getProjection();\n if (projection) {\n this.transform_ = getTransformFromProjections(\n this.mapProjection_,\n projection,\n );\n } else {\n this.transform_ = identityTransform;\n }\n }\n const map = this.getMap();\n const coordinate = map.getCoordinateFromPixelInternal(pixel);\n if (coordinate) {\n const userProjection = getUserProjection();\n if (userProjection) {\n this.transform_ = getTransformFromProjections(\n this.mapProjection_,\n userProjection,\n );\n }\n this.transform_(coordinate, coordinate);\n if (this.wrapX_) {\n const projection =\n userProjection || this.getProjection() || this.mapProjection_;\n wrapX(coordinate, projection);\n }\n const coordinateFormat = this.getCoordinateFormat();\n if (coordinateFormat) {\n html = coordinateFormat(coordinate);\n } else {\n html = coordinate.toString();\n }\n }\n }\n if (!this.renderedHTML_ || html !== this.renderedHTML_) {\n this.element.innerHTML = html;\n this.renderedHTML_ = html;\n }\n }\n\n /**\n * Update the projection. Rendering of the coordinates is done in\n * `handleMouseMove` and `handleMouseUp`.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @override\n */\n render(mapEvent) {\n const frameState = mapEvent.frameState;\n if (!frameState) {\n this.mapProjection_ = null;\n } else {\n if (this.mapProjection_ != frameState.viewState.projection) {\n this.mapProjection_ = frameState.viewState.projection;\n this.transform_ = null;\n }\n }\n }\n}\n\nexport default MousePosition;\n", "import View from 'ol/View.js'\nimport { Projection } from 'ol/proj'\nimport type TileLayer from 'ol/layer/Tile.js'\nimport OLMap from 'ol/Map.js'\nimport Tile from 'ol/layer/Tile.js'\nimport OverviewMap from 'ol/control/OverviewMap.js'\nimport FullScreen from 'ol/control/FullScreen.js'\nimport type TileSource from 'ol/source/Tile'\nimport LayerSwitcher from 'ol-ext/control/LayerSwitcher'\nimport MousePosition from 'ol/control/MousePosition.js'\nimport { format as formatCoordinate } from 'ol/coordinate.js'\nimport type { WSImageLayers } from '#plots/wsiviewer/viewModel/WSImageLayers.ts'\nimport type Layer from 'ol/layer/Layer'\nimport type Settings from '../Settings'\nimport type { SessionWSImage } from '#plots/wsiviewer/viewModel/SessionWSImage.ts'\nimport { addProjection } from 'ol/proj'\n\nexport class MapRenderer {\n\tprivate wSImageLayers: WSImageLayers | undefined\n\n\tprivate viewerClickListener:\n\t\t| ((coordinateX: number, coordinateY: number, sessionWSImage: SessionWSImage, map: OLMap) => void)\n\t\t| undefined\n\n\tprivate sessionWSImage: SessionWSImage | undefined\n\n\t// Allow construction without state so the same instance can be reused.\n\tconstructor() {}\n\n\tpublic setState(\n\t\twSImageLayers: WSImageLayers,\n\t\tviewerClickListener: {\n\t\t\t(coordinateX: number, coordinateY: number, sessionWSImage: SessionWSImage, map: OLMap): void\n\t\t},\n\t\tsessionWSImage: SessionWSImage\n\t) {\n\t\tthis.wSImageLayers = wSImageLayers\n\t\tthis.viewerClickListener = viewerClickListener\n\t\tthis.sessionWSImage = sessionWSImage\n\t}\n\n\tpublic render(holder: any, settings: Settings): OLMap {\n\t\tif (!this.wSImageLayers || !this.viewerClickListener || !this.sessionWSImage) {\n\t\t\tthrow new Error('MapRenderer: missing state (wSImageLayers, viewerClickListener, sessionWSImage, or settings)')\n\t\t}\n\n\t\tholder.select('div[id=\"wsi-viewer\"]').remove()\n\n\t\tholder\n\t\t\t.append('div')\n\t\t\t.attr('id', 'wsi-viewer')\n\t\t\t.style('width', settings.imageWidth)\n\t\t\t.style('height', settings.imageHeight)\n\n\t\tconst activeImage: TileLayer = this.wSImageLayers.wsimage\n\n\t\tconst extent = activeImage?.getSource()?.getTileGrid()?.getExtent()\n\n\t\tconst mpp = this.wSImageLayers.mpp\n\n\t\t// compute numeric microns-per-pixel (handle number or number[])\n\t\tconst mmpNumeric = Array.isArray(mpp) ? mpp[0] : mpp\n\t\t// convert microns -> meters for metersPerUnit (fallback to 1 micron if missing)\n\t\tconst metersPerUnit = (mmpNumeric || 1) * 1e-6\n\n\t\t// Add metersPerUnit so controls that rely on real-world units work correctly\n\t\tconst projection = new Projection({\n\t\t\tcode: 'ZoomifyProjection',\n\t\t\tunits: 'pixels',\n\t\t\textent: extent,\n\t\t\tmetersPerUnit: metersPerUnit,\n\t\t\tgetPointResolution: function (resolution) {\n\t\t\t\treturn resolution\n\t\t\t}\n\t\t})\n\n\t\taddProjection(projection)\n\n\t\tconst layers: Array<Layer> = [activeImage]\n\t\tif (this.wSImageLayers.overlays) {\n\t\t\tfor (const overlay of this.wSImageLayers.overlays) {\n\t\t\t\tlayers.push(overlay)\n\t\t\t}\n\t\t}\n\n\t\tconst map = new OLMap({\n\t\t\tlayers: layers,\n\t\t\ttarget: 'wsi-viewer',\n\t\t\tview: new View({\n\t\t\t\tprojection: projection,\n\t\t\t\tresolutions: activeImage.getSource()?.getTileGrid()?.getResolutions(),\n\t\t\t\tconstrainOnlyCenter: true,\n\t\t\t\tcenter: extent || [0, 0]\n\t\t\t})\n\t\t})\n\n\t\tconst hasOverlay = this.wSImageLayers.overlays != null\n\n\t\tthis.addControls(map, activeImage, hasOverlay, settings)\n\n\t\treturn map\n\t}\n\n\tprivate addControls(map: OLMap, activeImage: TileLayer, hasOverlay: boolean, settings: Settings) {\n\t\tif (hasOverlay) {\n\t\t\tmap.addControl(\n\t\t\t\tnew LayerSwitcher({\n\t\t\t\t\tcollapsed: true,\n\t\t\t\t\tmouseover: true\n\t\t\t\t})\n\t\t\t)\n\n\t\t\t// Display the mouse position in the upper right corner\n\t\t\t// Uncomment import statements above to use\n\t\t\tconst coordinateFormat = function (coordinate) {\n\t\t\t\tcoordinate = [coordinate[0], -coordinate[1]]\n\t\t\t\treturn formatCoordinate(coordinate, '{x}, {y}', 0)\n\t\t\t}\n\t\t\tconst mousePositionControl = new MousePosition({\n\t\t\t\tcoordinateFormat: coordinateFormat,\n\t\t\t\t// Use the map view projection so coordinates are reported using the same metersPerUnit\n\t\t\t\tprojection: map.getView().getProjection(),\n\t\t\t\tclassName: 'ol-mouse-position',\n\t\t\t\tplaceholder: ' '\n\t\t\t})\n\n\t\t\tmap.addControl(mousePositionControl)\n\n\t\t\tmap.on('singleclick', event => {\n\t\t\t\tconst coordinate = event.coordinate\n\t\t\t\tconst tileSize = settings.tileSize\n\t\t\t\t// Compute upper-left corner of the tile containing the clicked point\n\t\t\t\tconst tileX = Math.floor(coordinate[0] / tileSize) * tileSize\n\t\t\t\tconst tileY = Math.floor(-coordinate[1] / tileSize) * tileSize\n\n\t\t\t\t// Call the listener with upper-left corner\n\t\t\t\t// this.viewerClickListener is defined by setState / constructor\n\t\t\t\tthis.viewerClickListener!(tileX, tileY, this.sessionWSImage!, map)\n\t\t\t})\n\t\t}\n\n\t\tconst fullscreen = new FullScreen()\n\t\tmap.addControl(fullscreen)\n\n\t\tconst overviewMapControl = new OverviewMap({\n\t\t\tclassName: 'ol-overviewmap ol-custom-overviewmap',\n\t\t\tlayers: [\n\t\t\t\tnew Tile({\n\t\t\t\t\tsource: activeImage.getSource() as TileSource\n\t\t\t\t})\n\t\t\t]\n\t\t})\n\n\t\tmap.addControl(overviewMapControl)\n\t}\n}\n", "import { table2col } from '#dom'\n\nexport class MetadataRenderer {\n\t//TODO: Need an example for testing\n\trenderMetadata(holder: any, imageViewData: any) {\n\t\tif (!imageViewData.metadata) return\n\t\tholder.select('div[id=\"metadata\"]').remove()\n\t\tconst holderDiv = holder.append('div').attr('id', 'metadata')\n\n\t\tconst table = table2col({ holder: holderDiv })\n\n\t\t// Create table rows for each key-value pair\n\t\tObject.entries(JSON.parse(imageViewData.metadata)).forEach(([key, value]) => {\n\t\t\tconst [c1, c2] = table.addRow()\n\t\t\tc1.html(key)\n\t\t\tc2.html(value)\n\t\t})\n\t}\n}\n", "import { ColorScale, getMaxLabelWidth, renderTable } from '#dom'\nimport type { ImageViewData } from '#plots/wsiviewer/viewModel/ImageViewData.ts'\n\nexport class LegendRenderer {\n\trender(holder: any, imageViewData: ImageViewData) {\n\t\tif (!imageViewData.classesTable) return\n\n\t\tconst legendHolder = holder\n\t\t\t.append('div')\n\t\t\t.attr('id', 'legend-wrapper')\n\t\t\t.style('display', 'inline-block')\n\t\t\t.style('padding', '20px')\n\t\t\t.style('vertical-align', 'top')\n\n\t\trenderTable({\n\t\t\tcolumns: imageViewData.classesTable.columns,\n\t\t\trows: imageViewData.classesTable.rows,\n\t\t\tdiv: legendHolder\n\t\t\t\t.append('div')\n\t\t\t\t.attr('id', 'annotations-legend')\n\t\t\t\t.style('display', 'inline-block')\n\t\t\t\t.style('vertical-align', 'top'),\n\t\t\tshowLines: false\n\t\t})\n\n\t\trenderTable({\n\t\t\tcolumns: [\n\t\t\t\t{ label: 'Action', align: 'left' },\n\t\t\t\t{ label: 'Keyboard Map', align: 'center' }\n\t\t\t],\n\t\t\trows: [\n\t\t\t\t[{ value: 'Export Annotations' }, { value: 'X' }],\n\t\t\t\t[{ value: 'Retrain Model' }, { value: 'R' }],\n\t\t\t\t[{ value: 'Flag Annotation' }, { value: 'F' }],\n\t\t\t\t[{ value: 'Skip Annotation' }, { value: 'S' }],\n\t\t\t\t[{ value: 'Back 1 Selection' }, { value: ',' }],\n\t\t\t\t[{ value: 'Forward 1 Selection' }, { value: '.' }],\n\t\t\t\t[{ value: 'Delete Selection' }, { value: 'Backspace' }],\n\t\t\t\t[{ value: 'Confirm Prediction' }, { value: 'Enter' }]\n\t\t\t],\n\t\t\tdiv: legendHolder\n\t\t\t\t.append('div')\n\t\t\t\t.attr('id', 'annotations-shortcuts')\n\t\t\t\t.style('display', 'inline-block')\n\t\t\t\t.style('vertical-align', 'top'),\n\t\t\tshowLines: false\n\t\t})\n\t\tif (!imageViewData.uncertainty) return\n\n\t\tconst svgHolder = legendHolder.append('div').attr('id', 'uncertainty-legend').style('margin-top', '20px')\n\t\tconst width = 200\n\t\tconst height = 50\n\t\tconst svg = svgHolder\n\t\t\t.append('svg')\n\t\t\t.style('width', width * 1.5)\n\t\t\t.style('height', height)\n\t\tconst title = 'Uncertainty'\n\t\tconst titleLth = getMaxLabelWidth(svg as any, [title], 1)\n\t\tsvg\n\t\t\t.append('text')\n\t\t\t.attr('x', (width - titleLth) / 2) //Center the title\n\t\t\t.attr('y', 15)\n\t\t\t.style('opacity', 0.8)\n\t\t\t.text(title)\n\n\t\t//Assumes the ranges are equal intervals.\n\t\tconst upperBound = Math.log(imageViewData.uncertainty.length)\n\t\tconst domain = imageViewData.uncertainty.map((_, i) => {\n\t\t\treturn upperBound * (i / (imageViewData.uncertainty!.length - 1))\n\t\t})\n\n\t\tnew ColorScale({\n\t\t\tholder: svg,\n\t\t\tdomain,\n\t\t\tcolors: imageViewData.uncertainty.map(u => u.color),\n\t\t\tposition: '25, 25',\n\t\t\tticks: 10,\n\t\t\tbarwidth: width,\n\t\t\tlabels: {\n\t\t\t\tleft: imageViewData.uncertainty[0].label,\n\t\t\t\tright: imageViewData.uncertainty[imageViewData.uncertainty.length - 1].label\n\t\t\t}\n\t\t})\n\t}\n}\n", "import type { WSIViewerInteractions } from '#plots/wsiviewer/interactions/WSIViewerInteractions.ts'\n\nexport class ModelTrainerRenderer {\n\tprivate wsiinteractions: WSIViewerInteractions\n\n\tconstructor(wsiinteractions: WSIViewerInteractions) {\n\t\tthis.wsiinteractions = wsiinteractions\n\t}\n\n\trender(holder, projectId: string, genome: string, dslabel: string) {\n\t\t//TODO: Add logic to check if there is an annotation to retrain the model\n\t\t//Or look for a treshhold of annotations\n\t\t//Maybe use a buffer??\n\t\tholder\n\t\t\t.append('div')\n\t\t\t.style('margin', '20px 0 0 0')\n\t\t\t.append('button')\n\t\t\t.attr('type', 'submit')\n\t\t\t.style('font-size', '1.25em')\n\t\t\t.style('padding', '10px 25px')\n\t\t\t.style('border-radius', '20px')\n\t\t\t.style('border', '1px solid black')\n\t\t\t.style('background-color', 'transparent')\n\t\t\t.style('margin', '0 10px')\n\t\t\t.text('Retrain Model')\n\t\t\t.on('click', async () => {\n\t\t\t\tthis.wsiinteractions.toggleLoadingDiv(true)\n\t\t\t\tawait this.wsiinteractions.onRetrainModelClicked(genome, dslabel, projectId)\n\n\t\t\t\t//temp implementation to call route\n\t\t\t\t//Spinner will be removed when main() is called\n\t\t\t})\n\t}\n}\n", "import type { TileSelection } from '@sjcrh/proteinpaint-types'\nimport type Settings from '../Settings'\nimport { SessionWSImage } from '../viewModel/SessionWSImage'\n\nexport class SkipFlagCheckRenderer {\n\trender(\n\t\tholder: any,\n\t\twsiApp: any,\n\t\tflagChecked: boolean,\n\t\tskipChecked: boolean,\n\t\tsessionWSImage: SessionWSImage,\n\t\tsettings: Settings\n\t) {\n\t\tfunction calculateNewIndex(currentIndex: number, newSettings: Settings) {\n\t\t\tconst oldTileSelections: TileSelection[] = SessionWSImage.getTileSelections(sessionWSImage, settings) || []\n\t\t\tconst currentID = oldTileSelections[currentIndex]?.id\n\t\t\tconst newTileSelections: TileSelection[] = SessionWSImage.getTileSelections(sessionWSImage, newSettings) || []\n\t\t\tconst newIndex = newTileSelections.findIndex(tileSelection => tileSelection.id === currentID)\n\t\t\treturn newIndex != -1 ? newIndex : 0\n\t\t}\n\n\t\tconst skipFlagFieldSet = holder.append('div').append('fieldset').attr('id', 'SFField')\n\t\tconst flagCheck = skipFlagFieldSet\n\t\t\t.append('input')\n\t\t\t.attr('type', 'checkbox')\n\t\t\t.attr('id', 'flaganno')\n\t\t\t.attr('name', 'skipflag')\n\t\t\t.attr('value', 'flagging')\n\t\t\t.property('checked', flagChecked)\n\t\tskipFlagFieldSet.append('label').text('Show Only Flagged').attr('for', 'flaganno')\n\t\tconst skipCheck = skipFlagFieldSet\n\t\t\t.append('input')\n\t\t\t.attr('type', 'checkbox')\n\t\t\t.attr('id', 'skipanno')\n\t\t\t.attr('name', 'skipflag')\n\t\t\t.attr('value', 'notskipping')\n\t\t\t.property('checked', skipChecked)\n\t\tskipFlagFieldSet.append('label').text('Show Skipped').attr('for', 'skipanno')\n\t\tif (settings.renderOnlyFlagged) {\n\t\t\tflagCheck.property('checked', true)\n\t\t} else if (settings.renderSkipped) {\n\t\t\tskipCheck.property('checked', true)\n\t\t}\n\t\t// Adding listener that will uncheck each other, even though I'm using a checkbox\n\t\t// These options aren't compatible but radio buttons cant be completely unselected\n\t\tflagCheck.on('change', (event: Event) => {\n\t\t\tconst target = event.target as HTMLInputElement\n\t\t\tlet newSettings: Settings = {\n\t\t\t\t...settings,\n\t\t\t\trenderWSIViewer: false,\n\t\t\t\trenderAnnotationTable: true,\n\t\t\t\tchangeTrigger: Date.now()\n\t\t\t}\n\t\t\tconst skipCheckBool = target.checked ? false : settings.renderSkipped\n\t\t\tskipCheck.property('checked', skipCheckBool)\n\t\t\tnewSettings = {\n\t\t\t\t...newSettings,\n\t\t\t\trenderOnlyFlagged: target.checked,\n\t\t\t\trenderSkipped: skipCheckBool\n\t\t\t}\n\t\t\tnewSettings = { ...newSettings, activeAnnotation: calculateNewIndex(settings.activeAnnotation, newSettings) }\n\t\t\twsiApp.app.dispatch({\n\t\t\t\ttype: 'plot_edit',\n\t\t\t\tid: wsiApp.id,\n\t\t\t\tconfig: {\n\t\t\t\t\tsettings: newSettings\n\t\t\t\t}\n\t\t\t})\n\t\t})\n\n\t\tskipCheck.on('change', (event: Event) => {\n\t\t\tconst target = event.target as HTMLInputElement\n\t\t\tlet newSettings: Settings = {\n\t\t\t\t...settings,\n\t\t\t\trenderWSIViewer: false,\n\t\t\t\trenderAnnotationTable: true,\n\t\t\t\tchangeTrigger: Date.now()\n\t\t\t}\n\t\t\tconst flagCheckBool = target.checked ? false : settings.renderOnlyFlagged\n\t\t\tflagCheck.property('checked', flagCheckBool)\n\t\t\tnewSettings = {\n\t\t\t\t...newSettings,\n\t\t\t\trenderOnlyFlagged: flagCheckBool,\n\t\t\t\trenderSkipped: target.checked\n\t\t\t}\n\t\t\tnewSettings = { ...newSettings, activeAnnotation: calculateNewIndex(settings.activeAnnotation, newSettings) }\n\t\t\twsiApp.app.dispatch({\n\t\t\t\ttype: 'plot_edit',\n\t\t\t\tid: wsiApp.id,\n\t\t\t\tconfig: {\n\t\t\t\t\tsettings: newSettings\n\t\t\t\t}\n\t\t\t})\n\t\t})\n\t}\n}\n", "import { getCompInit, type RxComponent } from '#rx'\nimport { PlotBase } from '../PlotBase'\nimport 'ol/ol.css'\nimport type TileLayer from 'ol/layer/Tile.js'\nimport { WSIViewerInteractions } from '#plots/wsiviewer/interactions/WSIViewerInteractions.ts'\nimport type Settings from '#plots/wsiviewer/Settings.ts'\nimport wsiViewerDefaults from '#plots/wsiviewer/defaults.ts'\nimport 'ol-ext/dist/ol-ext.css'\nimport { WSIAnnotationsRenderer } from '#plots/wsiviewer/view/WSIAnnotationsRenderer.ts'\nimport { ViewModelProvider } from '#plots/wsiviewer/viewModel/ViewModelProvider.ts'\nimport { ThumbnailRenderer } from '#plots/wsiviewer/view/ThumbnailRenderer.ts'\nimport { MapRenderer } from '#plots/wsiviewer/view/MapRenderer.ts'\nimport { MetadataRenderer } from '#plots/wsiviewer/view/MetadataRenderer.ts'\nimport { LegendRenderer } from '#plots/wsiviewer/view/LegendRenderer.ts'\nimport { ModelTrainerRenderer } from './view/ModelTrainerRenderer'\nimport { SkipFlagCheckRenderer } from './view/SkipFlagCheckRenderer'\nimport type OLMap from 'ol/Map'\nimport type { ImageViewData } from '#plots/wsiviewer/viewModel/ImageViewData.ts'\nimport type { ViewModel } from '#plots/wsiviewer/viewModel/ViewModel.ts'\nimport { sayerror } from '#dom'\nimport { DownloadCSVButtonRenderer } from '#plots/wsiviewer/view/DownloadCSVButtonRenderer.ts'\n\nclass WSIViewer extends PlotBase implements RxComponent {\n\tstatic type = 'WSIViewer'\n\t// following attributes are required by rx\n\ttype: string\n\n\tprivate wsiViewerInteractions: WSIViewerInteractions\n\n\tprivate thumbnailsContainer: any\n\tprivate viewModelProvider = new ViewModelProvider()\n\n\tprivate thumbnailRenderer = new ThumbnailRenderer()\n\tprivate metadataRenderer = new MetadataRenderer()\n\tprivate legendRenderer = new LegendRenderer()\n\tprivate map: OLMap | undefined = undefined\n\tprivate annotationTable: any\n\n\t// New: persistent MapRenderer instance reused across main() calls\n\tprivate mapRenderer: MapRenderer | undefined\n\tprivate skipFlagRenderer = new SkipFlagCheckRenderer()\n\n\tconstructor(opts: any, api) {\n\t\tsuper(opts, api)\n\n\t\tthis.type = WSIViewer.type\n\t\tthis.opts = opts\n\t\tthis.wsiViewerInteractions = new WSIViewerInteractions(this, opts)\n\t\tthis.dom = {\n\t\t\tholder: opts.holder,\n\t\t\tloadingDiv: opts.holder\n\t\t\t\t.append('div')\n\t\t\t\t.attr('class', 'wsiViewer-progress')\n\t\t\t\t.style('position', 'absolute')\n\t\t\t\t.style('top', '0')\n\t\t\t\t.style('left', '0')\n\t\t\t\t.style('width', '100%')\n\t\t\t\t.style('height', '100%')\n\t\t\t\t.style('background-color', 'rgba(255, 255, 255, 0.95)')\n\t\t\t\t.style('text-align', 'center')\n\t\t\t\t.style('display', 'none'),\n\t\t\terrorDiv: opts.holder.append('div').attr('class', 'wsiViewer-error').style('margin-left', '10px'),\n\t\t\tmapHolder: opts.holder.append('div').attr('id', 'wsiviewer-mapHolder'),\n\t\t\tannotationsHolder: opts.holder\n\t\t\t\t.append('div')\n\t\t\t\t.attr('id', 'annotations-table-wrapper')\n\t\t\t\t.style('padding', '20px')\n\t\t\t\t.style('display', 'inline-block'),\n\t\t\tlegendHolder: opts.holder\n\t\t\t\t.append('div')\n\t\t\t\t.attr('id', 'sjpp-legendHolder')\n\t\t\t\t.style('display', 'inline-block')\n\t\t\t\t.style('vertical-align', 'top')\n\t\t}\n\t}\n\n\tasync init(): Promise<void> {\n\t\tconst state = this.app.getState()\n\t\tif (this.opts.header) {\n\t\t\t//If sandbox is present, add sample id and data type to the header\n\t\t\tthis.opts.header.html(\n\t\t\t\t`${state.sample_id} <span style=\"font-size:.8em\">${state.termdbConfig.queries.WSImages.type} images</span>`\n\t\t\t)\n\t\t}\n\t}\n\n\tasync main(): Promise<void> {\n\t\tconst state = structuredClone(this.state)\n\t\tconst settings = state.plots.find(p => p.id === this.id).settings as Settings\n\t\tconst holder = this.opts.holder\n\t\tif (settings.loggedOut) {\n\t\t\tholder.selectAll('*').remove()\n\t\t\tsayerror(holder, 'You have been logged out by an admin or inactivity.')\n\t\t\treturn\n\t\t}\n\t\t// TODO verify if state.vocab.genome is needed?\n\t\tconst genome = state.genome || state.vocab.genome\n\t\tconst dslabel = state.dslabel || state.vocab.dslabel\n\t\tconst sample_id = state.sample_id\n\t\tconst aiProjectID = state.aiProjectID\n\t\tconst aiWSIMageFiles = state.aiWSIMageFiles as Array<string>\n\t\tconst viewModel: ViewModel = await this.viewModelProvider.provide(\n\t\t\tgenome,\n\t\t\tdslabel,\n\t\t\tsample_id,\n\t\t\tsettings,\n\t\t\taiProjectID,\n\t\t\taiWSIMageFiles\n\t\t)\n\t\tconst wsimages = viewModel.sampleWSImages\n\n\t\tconst wsimageLayers = viewModel.wsimageLayers\n\t\tconst wsimageLayersLoadError = viewModel.wsimageLayersLoadError\n\t\tthis.wsiViewerInteractions.toggleSpinner(settings.isSavingAnnotation)\n\n\t\tif (wsimages.length === 0) {\n\t\t\tsayerror(this.dom.errorDiv, 'No WSI images found.')\n\t\t\tthis.wsiViewerInteractions.toggleLoadingDiv(false)\n\t\t\treturn\n\t\t}\n\n\t\tif (wsimageLayersLoadError) {\n\t\t\tsayerror(this.dom.errorDiv, wsimageLayersLoadError)\n\t\t\tthis.wsiViewerInteractions.toggleLoadingDiv(false)\n\t\t\treturn\n\t\t}\n\n\t\tconst activeLayerData = wsimageLayers[settings.displayedImageIndex]\n\t\tif (!activeLayerData) {\n\t\t\tsayerror(this.dom.errorDiv, `Layer for image index ${settings.displayedImageIndex} is not loaded.`)\n\t\t\tthis.wsiViewerInteractions.toggleLoadingDiv(false)\n\t\t\treturn\n\t\t}\n\n\t\tconst activeImage: TileLayer = activeLayerData.wsimage\n\t\tconst activeImageExtent = activeImage?.getSource()?.getTileGrid()?.getExtent()\n\n\t\tconst imageViewData: ImageViewData = viewModel.getImageViewData(settings.displayedImageIndex, settings)\n\n\t\t// set MapRenderer state here: ensure the persistent renderer receives current state\n\t\tif (!this.mapRenderer) {\n\t\t\tthis.mapRenderer = new MapRenderer()\n\t\t}\n\t\tif (!settings.isSavingAnnotation) this.wsiViewerInteractions.toggleSpinner(false)\n\n\t\tthis.mapRenderer.setState(\n\t\t\tactiveLayerData,\n\t\t\tthis.wsiViewerInteractions.viewerClickListener,\n\t\t\tviewModel.sampleWSImages[settings.displayedImageIndex]\n\t\t)\n\t\tif (settings.renderWSIViewer) {\n\t\t\tthis.wsiViewerInteractions.toggleLoadingDiv(settings.renderAnnotationTable)\n\t\t\tif (settings.isChangingImages) this.wsiViewerInteractions.toggleSpinner(true)\n\t\t\tif (this.thumbnailsContainer != undefined) {\n\t\t\t\tthis.thumbnailsContainer.remove()\n\t\t\t\tthis.thumbnailsContainer = undefined\n\t\t\t}\n\n\t\t\tconst numTotalFiles = aiWSIMageFiles?.length || wsimages.length\n\n\t\t\tthis.thumbnailsContainer = this.thumbnailRenderer.render(\n\t\t\t\tthis.dom.mapHolder,\n\t\t\t\tthis.thumbnailsContainer,\n\t\t\t\twsimageLayers.map(layer => (layer ? layer.wsimage : null)),\n\t\t\t\tsettings,\n\t\t\t\tthis.wsiViewerInteractions,\n\t\t\t\tnumTotalFiles\n\t\t\t)\n\n\t\t\t// Not actually resetting image, just saving in settings that thumbnail is done rendering\n\t\t\t// so spinner isn't rendering next call\n\t\t\tthis.wsiViewerInteractions.toggleThumbnails(0, true)\n\t\t\tif (!settings.isSavingAnnotation) this.wsiViewerInteractions.toggleSpinner(false)\n\n\t\t\t// Use the reused mapRenderer instance to render/update the map\n\t\t\tthis.map = this.mapRenderer.render(this.dom.mapHolder, settings)\n\n\t\t\tif (activeImageExtent && this.map) {\n\t\t\t\tthis.map.getView().fit(activeImageExtent)\n\t\t\t}\n\t\t}\n\t\tthis.metadataRenderer.renderMetadata(this.dom.holder, imageViewData)\n\n\t\tif (settings.renderAnnotationTable && this.map) {\n\t\t\tconst modelTrainerRenderer = new ModelTrainerRenderer(this.wsiViewerInteractions)\n\t\t\tconst downloadCSVButtonRenderer = new DownloadCSVButtonRenderer()\n\t\t\tconst wsiAnnotationsRenderer = new WSIAnnotationsRenderer(this, settings, this.wsiViewerInteractions)\n\t\t\tthis.annotationTable = wsiAnnotationsRenderer.render(this.dom.annotationsHolder, imageViewData)\n\t\t\tthis.dom.legendHolder.selectAll('*').remove()\n\t\t\tmodelTrainerRenderer.render(this.dom.legendHolder, aiProjectID, genome, dslabel)\n\t\t\tdownloadCSVButtonRenderer.render(this.dom.legendHolder, viewModel.sampleWSImages[settings.displayedImageIndex])\n\t\t\tthis.legendRenderer.render(this.dom.legendHolder, imageViewData)\n\t\t\tthis.dom.mapHolder.select('#SFField').remove()\n\t\t\tthis.skipFlagRenderer.render(\n\t\t\t\tthis.dom.mapHolder,\n\t\t\t\tthis,\n\t\t\t\tsettings.renderOnlyFlagged,\n\t\t\t\tsettings.renderSkipped,\n\t\t\t\tviewModel.sampleWSImages[settings.displayedImageIndex],\n\t\t\t\tsettings\n\t\t\t)\n\t\t\tconst initialZoomInCoordinate = viewModel.getInitialZoomInCoordinate(settings)\n\t\t\tif (initialZoomInCoordinate != undefined) {\n\t\t\t\tthis.wsiViewerInteractions.zoomInEffectListener(\n\t\t\t\t\tactiveImageExtent,\n\t\t\t\t\tinitialZoomInCoordinate,\n\t\t\t\t\tthis.map,\n\t\t\t\t\timageViewData.activePatchColor!\n\t\t\t\t)\n\t\t\t\tthis.wsiViewerInteractions.setKeyDownListener(\n\t\t\t\t\tholder,\n\t\t\t\t\tviewModel.sampleWSImages[settings.displayedImageIndex],\n\t\t\t\t\tthis.map,\n\t\t\t\t\taiProjectID,\n\t\t\t\t\timageViewData.shortcuts,\n\t\t\t\t\tdownloadCSVButtonRenderer\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\t\tthis.wsiViewerInteractions.toggleLoadingDiv(false)\n\t\t// Selection objects you want to add cursor style go here because the spinner changes all to default\n\t\tif (!settings.isSavingAnnotation) {\n\t\t\tconst pointersToAdd = [\n\t\t\t\tthis.thumbnailsContainer?.selectAll('div').selectAll('*'),\n\t\t\t\tthis.dom.annotationsHolder.selectAll('*'),\n\t\t\t\tthis.dom.legendHolder.selectAll('*')\n\t\t\t]\n\t\t\tpointersToAdd.forEach(container => {\n\t\t\t\tif (container) {\n\t\t\t\t\tcontainer?.style('cursor', 'pointer')\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}\n}\n\nexport default WSIViewer\n\nexport const wsiViewer = getCompInit(WSIViewer)\n\nexport const componentInit = wsiViewer\n\nexport async function getPlotConfig(opts: any) {\n\treturn {\n\t\tchartType: 'WSIViewer',\n\t\tsubfolder: 'wsiviewer',\n\t\textension: 'ts',\n\t\thidePlotFilter: true, //Disable the filter in the sandbox header\n\t\tsettings: wsiViewerDefaults(opts.overrides)\n\t}\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;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C7C,WAAK,iBAAiB;AAAA,QACrB,KAAK,IAAI;AAAA,QACT;AAAA,QACA,SAAS;AAAA,QACT,SAAS;AAAA,QACT,UAAU,eAAe,SAAS,mBAAmB;AAAA,QACrD;AAAA,MACD;AACA,YAAM,0BAA0B,UAAU,2BAA2B,QAAQ;AAC7E,UAAI,2BAA2B,QAAW;AACzC,aAAK,sBAAsB;AAAA,UAC1B;AAAA,UACA;AAAA,UACA,KAAK;AAAA,UACL,cAAc;AAAA,QACf;AACA,aAAK,sBAAsB;AAAA,UAC1B;AAAA,UACA,UAAU,eAAe,SAAS,mBAAmB;AAAA,UACrD,KAAK;AAAA,UACL;AAAA,UACA,cAAc;AAAA,UACd;AAAA,QACD;AAAA,MACD;AAAA,IACD;AACA,SAAK,sBAAsB,iBAAiB,KAAK;AAEjD,QAAI,CAAC,SAAS,oBAAoB;AACjC,YAAM,gBAAgB;AAAA,QACrB,KAAK,qBAAqB,UAAU,KAAK,EAAE,UAAU,GAAG;AAAA,QACxD,KAAK,IAAI,kBAAkB,UAAU,GAAG;AAAA,QACxC,KAAK,IAAI,aAAa,UAAU,GAAG;AAAA,MACpC;AACA,oBAAc,QAAQ,eAAa;AAClC,YAAI,WAAW;AACd,qBAAW,MAAM,UAAU,SAAS;AAAA,QACrC;AAAA,MACD,CAAC;AAAA,IACF;AAAA,EACD;AACD;AAEA,IAAO,oBAAQ;AAER,IAAM,YAAY,YAAY,SAAS;AAEvC,IAAM,gBAAgB;AAE7B,eAAsB,cAAc,MAAW;AAC9C,SAAO;AAAA,IACN,WAAW;AAAA,IACX,WAAW;AAAA,IACX,WAAW;AAAA,IACX,gBAAgB;AAAA;AAAA,IAChB,UAAU,kBAAkB,KAAK,SAAS;AAAA,EAC3C;AACD;",
|
|
6
|
+
"names": ["fillInstruction", "p1", "p2", "p3", "scale", "scale", "measureAndCacheTextWidth", "scale", "text", "p1", "p2", "p3", "p4", "fillInstruction", "strokeInstruction", "intersects", "i", "ii", "willReadFrequently", "i", "result", "context", "styles", "i", "geometry", "loading", "Layer_default", "EventType_default", "isEmpty", "wrapX", "extent", "userExtent", "styles", "clone", "styles", "format", "xhr", "scale", "Feature_default", "RBush", "equals", "Feature_default", "equals", "Vector_default", "Vector_default", "fileBase", "filename", "tileSelections", "sessionsTileSelection", "selectedIdx", "equals", "equals", "styles", "tile", "wrapX", "Layer_default", "isEmpty", "create", "buffer", "format", "releaseCanvas", "create", "options", "buffer", "format", "Layer_default", "EventType_default", "Event_default", "Uniforms", "Uniforms", "geometry", "Feature_default", "create", "scale", "create", "Attributes", "styles", "WEBGL_WORKER", "asArray", "style", "Uniforms", "Layer_default", "create", "equals", "buffer", "VectorLayer_default", "Property", "VectorLayer_default", "listen", "e", "value", "scale", "e", "li", "x", "opacity", "EventType_default", "format", "wrapX"]
|
|
7
|
+
}
|