PageSourceSearch

https://seagrassspotter.org/chunk-VRTK5ZQE.js

js seagrassspotter.org collected 2026-10-02 17:07:53 UTC 27,210 bytes, 1 lines download raw bytes

1import{a as qt}from"./chunk-7KK5DN7L.js";import{a as Pt,b as Vt,c as Rt,d as Dt,e as Qt}from"./chunk-S5TRKJ5I.js";import{a as At}from"./chunk-D3KY6IDP.js";import{a as kt}from"./chunk-WGRLQ6DS.js";import"./chunk-IGWCSUDW.js";import{c as Bt}from"./chunk-7YTIJTR7.js";import{a as wt}from"./chunk-MXDTLOHG.js";import{a as Tt}from"./chunk-MWDSAU2F.js";import{d as yt}from"./chunk-N2STF42N.js";import{b as Mt}from"./chunk-MU2QLDSZ.js";import{a as ot}from"./chunk-C7IADD4R.js";import"./chunk-GC4ED4DY.js";import{a as It}from"./chunk-A3HR2LEN.js";import{a as at}from"./chunk-7P27RJDN.js";import{e as vt,f as Ct}from"./chunk-VE7JRJOC.js";import{a as bt}from"./chunk-OITSX4YX.js";import{E as ut,I as St,m as ct,n as pt,o as mt,p as _t,q as ht,r as xt}from"./chunk-3J2WZKQE.js";import{a as ft}from"./chunk-FVPSG52T.js";import{c as rt,e as lt,h as st,o as dt}from"./chunk-USFOSCCE.js";import{d as nt}from"./chunk-JB2HWQRT.js";import{a as it}from"./chunk-26GFPNAE.js";import{a as Et}from"./chunk-JSQY5VOS.js";import{a as gt}from"./chunk-A3WGCC4I.js";import"./chunk-BLTQ4L52.js";import{c as X,f as Y,g as Z,k as tt}from"./chunk-GMAVKO4H.js";import"./chunk-2Y5LUAY3.js";import{c as K}from"./chunk-FDSZTAV7.js";import{d as et}from"./chunk-RQPCUL6Z.js";import{$b as y,Ab as p,Ac as E,Bb as m,Bc as G,Cc as B,Db as k,Eb as M,Fb as R,Gb as u,Hb as a,Ib as n,Jb as C,Mc as F,Ra as q,Rb as b,Sa as V,Ub as S,Va as e,Wb as c,Xa as L,_a as f,_b as w,ac as I,bc as P,eb as U,fc as o,fd as z,gc as l,hc as O,id as J,ja as h,ka as x,kb as j,lc as A,mc as D,nc as Q,oc as T,pc as N,qc as H,wc as W,xc as s,yc as d,zc as $}from"./chunk-6XLY2MTM.js";import"./chunk-SZAW6ZBW.js";var Ut=["sightingLightbox"],jt=["activity"],Ot=["row_env"],Nt=["row_human"],Ht=["row_seagrass"],Wt=(i,r,t)=>[i,"username",r,"date",t];function $t(i,r){if(i&1&&(a(0,"button",23),o(1),s(2,"translate"),n()),i&2){let t=c(3);u("routerLink",N("/sighting/",t.sighting.id,"/edit")),e(),l(d(2,3,"sighting.actions.edit"))}}function Gt(i,r){if(i&1){let t=b();a(0,"button",25),S("click",function(){h(t);let g=c(3),v=P(16);return x(g.openModal(v))}),o(1),s(2,"translate"),n()}i&2&&(e(),l(d(2,1,"sighting.actions.delete")))}function Ft(i,r){if(i&1){let t=b();a(0,"button",25),S("click",function(){h(t);let g=c(3),v=P(18);return x(g.openModal(v))}),o(1),s(2,"translate"),n()}i&2&&(e(),l(d(2,1,"sighting.actions.convert")))}function zt(i,r){if(i&1){let t=b();a(0,"button",25),S("click",function(){h(t);let g=c(3),v=P(14);return x(g.openModal(v))}),o(1),s(2,"translate"),n()}i&2&&(e(),l(d(2,1,"sighting.actions.confirm")))}function Jt(i,r){if(i&1){let t=b();a(0,"div",19)(1,"button",20),s(2,"translate"),C(3,"fa-icon",21),n(),a(4,"div",22),p(5,$t,3,5,"button",23),p(6,Gt,3,3,"button",24),p(7,Ft,3,3,"button",24),p(8,zt,3,3,"button",24),a(9,"button",25),S("click",function(){h(t);let g=c(2);return x(g.scrollToBox())}),o(10),s(11,"translate"),n()()()}if(i&2){let t=c(2);e(),u("ngbTooltip",T(d(2,7,"sighting.actions.tooltip"))),e(4),m(t.canEdit?5:-1),e(),m(t.canDelete?6:-1),e(),m(t.canConvert?7:-1),e(),m(t.canConfirm?8:-1),e(2),l(d(11,9,"sighting.actions.comments"))}}function Kt(i,r){if(i&1){let t=b();a(0,"div",12)(1,"div",15)(2,"button",16),s(3,"translate"),S("click",function(){h(t);let g=c();return x(g.previousSighting())}),C(4,"fa-icon",17),n(),a(5,"button",16),s(6,"translate"),S("click",function(){h(t);let g=c();return x(g.nextSighting())}),C(7,"fa-icon",18),n()(),p(8,Jt,12,11,"div",19),n()}if(i&2){let t=c();e(2),u("ngbTooltip",T(d(3,7,"sighting.previous")))("disabled",t.sighting.id==t.explore.sightings[0].id),e(3),u("ngbTooltip",T(d(6,9,"sighting.next")))("disabled",t.sighting.id==t.explore.sightings[t.explore.sightings.length-1].id),e(3),m(t.isOwner||t.isAdmin?8:-1)}}function Xt(i,r){i&1&&(a(0,"div"),C(1,"spotter-spinner"),n())}function Yt(i,r){if(i&1&&(a(0,"span",33),o(1),n()),i&2){let t=r.$implicit;e(),l(t.display_name)}}function Zt(i,r){i&1&&(a(0,"div",35),s(1,"translate"),C(2,"fa-icon",50),n()),i&2&&u("ngbTooltip",d(1,1,"sighting.flag_warning"))}function te(i,r){i&1&&(a(0,"td"),o(1),s(2,"translate"),n()),i&2&&(e(),l(d(2,1,"data_shorthand.upload_app")))}function ee(i,r){i&1&&(a(0,"td"),o(1),s(2,"translate"),n()),i&2&&(e(),l(d(2,1,"data_shorthand.upload_site")))}function ie(i,r){if(i&1&&(a(0,"tr")(1,"td"),o(2),s(3,"translate"),n(),a(4,"td"),o(5),n()()),i&2){let t=c(2);e(2),l(d(3,2,"data_shorthand.confidence")),e(3),l(t.questions.sightingQuestions.confidence.a[t.sighting.confidence])}}function ne(i,r){i&1&&(a(0,"tr")(1,"td",51),o(2),s(3,"translate"),n()()),i&2&&(e(2),l(d(3,1,"data.shared.no_additional_data")))}function ae(i,r){if(i&1&&(a(0,"tr",null,5)(2,"td"),o(3),s(4,"translate"),n(),a(5,"td"),o(6),n()()),i&2){let t=c(2);e(3),l(d(4,2,"data_shorthand.length")),e(3),l(t.questions.sightingQuestions.length.a[t.sighting.length])}}function oe(i,r){if(i&1&&(a(0,"tr",null,5)(2,"td"),o(3),s(4,"translate"),n(),a(5,"td"),o(6),n()()),i&2){let t=c(2);e(3),l(d(4,2,"data_shorthand.percentage_cover")),e(3),l(t.questions.sightingQuestions.percentage_cover.a[t.sighting.percentage_cover])}}function re(i,r){if(i&1&&(a(0,"tr",null,5)(2,"td"),o(3),s(4,"translate"),n(),a(5,"td"),o(6),n()()),i&2){let t=c(2);e(3),l(d(4,2,"data_shorthand.algae")),e(3),l(t.questions.sightingQuestions.algae.a[t.sighting.algae])}}function le(i,r){if(i&1&&(a(0,"tr",null,5)(2,"td"),o(3),s(4,"translate"),n(),a(5,"td"),o(6),n()()),i&2){let t=c(2);e(3),l(d(4,2,"data_shorthand.additional_species")),e(3),l(t.sighting.additional_species)}}function se(i,r){if(i&1&&(a(0,"tr",null,5)(2,"td"),o(3),s(4,"translate"),n(),a(5,"td"),o(6),n()()),i&2){let t=c(2);e(3),l(d(4,2,"data_shorthand.flowers")),e(3),l(t.questions.sightingQuestions.flowers.a[t.sighting.flowers])}}function de(i,r){if(i&1&&(a(0,"tr",null,5)(2,"td"),o(3),s(4,"translate"),n(),a(5,"td"),o(6),s(7,"translate"),s(8,"datainterpreter"),n()()),i&2){let t=c(2);e(3),l(d(4,2,"data_shorthand.flowering_density")),e(3),l(E(8,6,d(7,4,"data.shared.values.per_m2"),"value",t.sighting.flowering_density))}}function ge(i,r){if(i&1&&(a(0,"tr",null,5)(2,"td"),o(3),s(4,"translate"),n(),a(5,"td"),o(6),s(7,"translate"),s(8,"datainterpreter"),n()()),i&2){let t=c(2);e(3),l(d(4,2,"data_shorthand.fruiting_density")),e(3),l(E(8,6,d(7,4,"data.shared.values.per_m2"),"value",t.sighting.fruiting_density))}}function ce(i,r){if(i&1&&(a(0,"tr",null,5)(2,"td"),o(3),s(4,"translate"),n(),a(5,"td"),o(6),s(7,"translate"),s(8,"datainterpreter"),n()()),i&2){let t=c(2);e(3),l(d(4,2,"data_shorthand.number_of_seeds")),e(3),l(E(8,6,d(7,4,"data.shared.values.per_m2"),"value",t.sighting.number_of_seeds))}}function pe(i,r){if(i&1&&(a(0,"tr",null,5)(2,"td"),o(3),s(4,"translate"),n(),a(5,"td"),o(6),s(7,"translate"),s(8,"datainterpreter"),n()()),i&2){let t=c(2);e(3),l(d(4,2,"data_shorthand.seed_length")),e(3),l(E(8,6,d(7,4,"data.shared.values.per_mm"),"value",t.sighting.seed_length))}}function me(i,r){i&1&&(a(0,"tr")(1,"td",51),o(2),s(3,"translate"),n()()),i&2&&(e(2),l(d(3,1,"data.shared.no_additional_data")))}function _e(i,r){if(i&1&&(a(0,"tr",null,6)(2,"td"),o(3),s(4,"translate"),n(),a(5,"td"),o(6),n()()),i&2){let t=c(2);e(3),l(d(4,2,"data_shorthand.observed")),e(3),l(t.questions.sightingQuestions.observe.a[t.sighting.observe])}}function he(i,r){if(i&1&&(a(0,"tr",null,6)(2,"td"),o(3),s(4,"translate"),n(),a(5,"td"),o(6),n()()),i&2){let t=c(2);e(3),l(d(4,2,"data_shorthand.depth")),e(3),l(t.questions.sightingQuestions.depth.a[t.sighting.depth])}}function xe(i,r){if(i&1&&(a(0,"tr",null,6)(2,"td"),o(3),s(4,"translate"),n(),a(5,"td"),o(6),n()()),i&2){let t=c(2);e(3),l(d(4,2,"data_shorthand.extent")),e(3),l(t.questions.sightingQuestions.extensive.a[t.sighting.extensive])}}function ue(i,r){if(i&1&&(a(0,"tr",null,6)(2,"td"),o(3),s(4,"translate"),n(),a(5,"td"),o(6),n()()),i&2){let t=c(2);e(3),l(d(4,2,"data_shorthand.sediment")),e(3),l(t.questions.sightingQuestions.sediment.a[t.sighting.sediment])}}function Se(i,r){if(i&1&&(a(0,"tr",null,6)(2,"td"),o(3),s(4,"translate"),n(),a(5,"td"),o(6),n()()),i&2){let t=c(2);e(3),l(d(4,2,"data_shorthand.intertidal")),e(3),l(t.questions.sightingQuestions.intertidal.a[t.sighting.intertidal])}}function ve(i,r){if(i&1&&(a(0,"tr",null,6)(2,"td"),o(3),s(4,"translate"),n(),a(5,"td"),o(6),s(7,"translate"),s(8,"datainterpreter"),n()()),i&2){let t=c(2);e(3),l(d(4,2,"data_shorthand.water_temperature")),e(3),l(E(8,6,d(7,4,"data.shared.values.deg_c"),"value",t.sighting.water_temperature))}}function Ce(i,r){if(i&1&&(a(0,"tr",null,6)(2,"td"),o(3),s(4,"translate"),n(),a(5,"td"),o(6),n()()),i&2){let t=c(2);e(3),l(d(4,2,"data_shorthand.water_temperature_measurement")),e(3),l(t.sighting.water_temperature_measurement)}}function fe(i,r){i&1&&(a(0,"tr")(1,"td",51),o(2),s(3,"translate"),n()()),i&2&&(e(2),l(d(3,1,"data.shared.no_additional_data")))}function be(i,r){if(i&1&&(a(0,"tr",null,7)(2,"td"),o(3),s(4,"translate"),n(),a(5,"td"),o(6),n()()),i&2){let t=c(2);e(3),l(d(4,2,"data_shorthand.boats")),e(3),l(t.questions.sightingQuestions.boats.a[t.sighting.boats])}}function Ee(i,r){if(i&1&&(a(0,"tr",null,7)(2,"td"),o(3),s(4,"translate"),n(),a(5,"td"),o(6),n()()),i&2){let t=c(2);e(3),l(d(4,2,"data_shorthand.moorings")),e(3),l(t.questions.sightingQuestions.moorings.a[t.sighting.moorings])}}function we(i,r){if(i&1&&(a(0,"tr",null,7)(2,"td"),o(3),s(4,"translate"),n(),a(5,"td"),o(6),n()()),i&2){let t=c(2);e(3),l(d(4,2,"data_shorthand.fishing")),e(3),l(t.questions.sightingQuestions.fishing.a[t.sighting.fishing])}}function ye(i,r){if(i&1&&(a(0,"tr",null,7)(2,"td"),o(3),s(4,"translate"),n(),a(5,"td"),o(6),n()()),i&2){let t=c(2);e(3),l(d(4,2,"data_shorthand.gear")),e(3),l(t.sighting.fishing_gear)}}function Ie(i,r){if(i&1&&(a(0,"tr",null,7)(2,"td"),o(3),s(4,"translate"),n(),a(5,"td"),o(6),n()()),i&2){let t=c(2);e(3),l(d(4,2,"data_shorthand.caught")),e(3),l(t.sighting.fishing_caught)}}function Te(i,r){if(i&1&&(a(0,"tr",null,7)(2,"td"),o(3),s(4,"translate"),n(),a(5,"td"),o(6),n()()),i&2){let t=c(2);e(3),l(d(4,2,"data_shorthand.damages")),e(3),l(t.sighting.damages)}}function Be(i,r){if(i&1&&(a(0,"tr",null,6)(2,"td"),o(3),s(4,"translate"),n(),a(5,"td"),o(6),n()()),i&2){let t=c(2);e(3),l(d(4,2,"data_shorthand.recreational_activity")),e(3),l(t.sighting.recreational_activity)}}function Pe(i,r){if(i&1&&(a(0,"div",47)(1,"a",52),o(2,"View on Google Maps"),n()()),i&2){let t=c(2);e(),u("href",H("https://www.google.com/maps/search/?api=1&query=",t.sighting.latitude,",",t.sighting.longitude),V)}}function Ve(i,r){if(i&1&&C(0,"sighting",53),i&2){let t=r.$implicit;u("sighting",t)}}function ke(i,r){if(i&1&&(a(0,"div",49)(1,"h3"),o(2),s(3,"translate"),n(),M(4,Ve,1,1,"sighting",53,k),n()),i&2){let t=c(2);e(2),l(d(3,1,"sighting.nearby")),e(2),R(t.sighting.nearby)}}function Me(i,r){if(i&1){let t=b();a(0,"div",14)(1,"div",26)(2,"div",27)(3,"div",28)(4,"h2",29),o(5),n(),a(6,"h3",30),o(7),n(),C(8,"p",31),s(9,"translate"),s(10,"date"),s(11,"datainterpreter"),s(12,"safeHtml"),a(13,"p",32),M(14,Yt,2,1,"span",33,k),n(),a(16,"div",34),p(17,Zt,3,3,"div",35),n()(),C(18,"hr"),a(19,"div",36)(20,"table",37)(21,"thead",38)(22,"tr")(23,"th",39),o(24),s(25,"translate"),n()()(),a(26,"tbody")(27,"tr")(28,"td"),o(29),s(30,"translate"),n(),a(31,"td"),C(32,"research-grade",40),n()(),a(33,"tr")(34,"td"),o(35),s(36,"translate"),n(),a(37,"td"),o(38),n()(),a(39,"tr")(40,"td"),o(41),s(42,"translate"),n(),a(43,"td"),o(44),n()(),a(45,"tr")(46,"td"),o(47),s(48,"translate"),n(),a(49,"td"),o(50),s(51,"translate"),s(52,"datainterpreter"),n()(),a(53,"tr")(54,"td"),o(55),s(56,"translate"),n(),a(57,"td"),o(58),s(59,"date"),n()(),a(60,"tr")(61,"td"),o(62),s(63,"translate"),n(),p(64,te,3,3,"td"),p(65,ee,3,3,"td"),n(),p(66,ie,6,4,"tr"),n()(),a(67,"table",37)(68,"thead",38)(69,"tr")(70,"th",39),o(71),s(72,"translate"),n()()(),a(73,"tbody"),p(74,ne,4,3,"tr"),p(75,ae,7,4,"tr"),p(76,oe,7,4,"tr"),p(77,re,7,4,"tr"),p(78,le,7,4,"tr"),p(79,se,7,4,"tr"),p(80,de,9,10,"tr"),p(81,ge,9,10,"tr"),p(82,ce,9,10,"tr"),p(83,pe,9,10,"tr"),n()(),a(84,"table",37)(85,"thead",38)(86,"tr")(87,"th",39),o(88),s(89,"translate"),n()()(),a(90,"tbody"),p(91,me,4,3,"tr"),p(92,_e,7,4,"tr"),p(93,he,7,4,"tr"),p(94,xe,7,4,"tr"),p(95,ue,7,4,"tr"),p(96,Se,7,4,"tr"),p(97,ve,9,10,"tr"),p(98,Ce,7,4,"tr"),n()(),a(99,"table",37)(100,"thead",38)(101,"tr")(102,"th",39),o(103),s(104,"translate"),n()()(),a(105,"tbody"),p(106,fe,4,3,"tr"),p(107,be,7,4,"tr"),p(108,Ee,7,4,"tr"),p(109,we,7,4,"tr"),p(110,ye,7,4,"tr"),p(111,Ie,7,4,"tr"),p(112,Te,7,4,"tr"),p(113,Be,7,4,"tr"),n()()(),a(114,"sighting-reactions",41),S("react",function(g){h(t);let v=c();return x(v.react(g))})("comment",function(){h(t);let g=c();return x(g.scrollToBox())}),n(),a(115,"user-interaction-actions",42),S("flagged",function(){h(t);let g=c(),v=P(12);return x(g.openModal(v))}),n(),C(116,"share-icons"),n(),a(117,"div",43)(118,"img",44),S("click",function(){h(t);let g=c();return x(g.openLightbox())}),n(),a(119,"div",45),C(120,"geojson-map",46),n(),p(121,Pe,3,3,"div",47),n()(),C(122,"hr",48),p(123,ke,6,3,"div",49),n()}if(i&2){let t=c();e(5),l(t.sighting.country),e(2),l(t.sighting.country_area),e(),u("innerHtml",d(12,67,G(11,61,W(97,Wt,d(9,56,"sighting.added_by"),t.sighting.user.username,$(10,58,t.sighting.created_at,"dd MMM yyyy")))),q),e(6),R(t.sighting.species),e(3),m(t.sighting.flagged?17:-1),e(7),l(d(25,69,"data.sighting.question_categories.sighting")),e(5),l(d(30,71,"data.shared.research_grade.title")),e(3),u("grade",t.sighting.research_grade),e(3),l(d(36,73,"data_shorthand.lat")),e(3),l(t.sighting.latitude),e(3),l(d(42,75,"data_shorthand.lon")),e(3),l(t.sighting.longitude),e(3),l(d(48,77,"data_shorthand.accuracy")),e(3),l(E(52,81,d(51,79,"data.shared.values.per_m"),"value",t.sighting.accuracy)),e(5),l(d(56,85,"data_shorthand.date")),e(3),l(d(59,87,t.sighting.date_spotted)),e(4),l(d(63,89,"data_shorthand.uploaded")),e(2),m(t.sighting.mobile_upload?64:-1),e(),m(t.sighting.mobile_upload?-1:65),e(),m(t.sighting.confidence?66:-1),e(5),l(d(72,91,"data.sighting.question_categories.seagrass")),e(3),m(t.hasSeagrassData()?-1:74),e(),m(t.sighting.length?75:-1),e(),m(t.sighting.percentage_cover?76:-1),e(),m(t.sighting.algae?77:-1),e(),m(t.sighting.additional_species?78:-1),e(),m(t.sighting.flowers?79:-1),e(),m(t.sighting.flowering_density?80:-1),e(),m(t.sighting.fruiting_density?81:-1),e(),m(t.sighting.number_of_seeds?82:-1),e(),m(t.sighting.seed_length?83:-1),e(5),l(d(89,93,"data.sighting.question_categories.environment")),e(3),m(t.hasEnvironmentData()?-1:91),e(),m(t.sighting.observe?92:-1),e(),m(t.sighting.depth?93:-1),e(),m(t.sighting.extensive?94:-1),e(),m(t.sighting.sediment?95:-1),e(),m(t.sighting.intertidal?96:-1),e(),m(t.sighting.water_temperature?97:-1),e(),m(t.sighting.water_temperature_measurement?98:-1),e(5),l(d(104,95,"data.sighting.question_categories.human")),e(3),m(t.hasHumanData()?-1:106),e(),m(t.sighting.boats?107:-1),e(),m(t.sighting.moorings?108:-1),e(),m(t.sighting.fishing?109:-1),e(),m(t.sighting.fishing_gear?110:-1),e(),m(t.sighting.fishing_caught?111:-1),e(),m(t.sighting.damages?112:-1),e(),m(t.sighting.recreational_activity?113:-1),e(),u("sighting",t.sighting)("disabled",t.reacting),e(),u("sighting",t.sighting),e(3),u("src",T(t.sighting.images==null?null:t.sighting.images.thumbnail),V),e(2),u("layers",t.layers
1),e(),m(t.auth.isAdminSync()?121:-1),e(2),m(t.sighting.nearby&&t.sighting.nearby.length>0?123:-1)}}function Re(i,r){if(i&1){let t=b();a(0,"div",10,8)(2,"div",11),o(3),s(4,"translate"),n(),a(5,"div",13)(6,"activity",54,9),S("commented",function(g){h(t);let v=c();return x(v.comment(g))})("replied",function(){h(t);let g=c();return x(g.replied())})("reported",function(){h(t);let g=c();return x(g.reported())})("deleted",function(){h(t);let g=c();return x(g.deleted())}),n()()()}if(i&2){let t=c();e(3),l(d(4,2,"comments.title")),e(3),u("activity",t.sighting.activity)}}function Ae(i,r){if(i&1&&(a(0,"div",55),C(1,"img",56),n()),i&2){let t=c();e(),u("src",T(t.sighting.images==null?null:t.sighting.images.image),V)}}function De(i,r){i&1&&C(0,"spotter-spinner")}function Qe(i,r){if(i&1){let t=b();a(0,"div",57)(1,"h4",58),o(2),s(3,"translate"),n(),a(4,"button",59),S("click",function(){let g=h(t).$implicit;return x(g.dismiss("Cross click"))}),n()(),a(5,"div",60)(6,"p"),o(7),s(8,"translate"),n(),a(9,"div",61)(10,"textarea",62),Q("ngModelChange",function(g){h(t);let v=c();return D(v.flagReason,g)||(v.flagReason=g),x(g)}),n()(),a(11,"p"),o(12),s(13,"translate"),n()(),a(14,"div",63)(15,"button",64),S("click",function(){h(t);let g=c();return x(g.flagSighting())}),o(16),s(17,"translate"),n(),p(18,De,1,0,"spotter-spinner"),n()}if(i&2){let t=c();e(2),l(d(3,7,"sighting.actions.flag_text.title")),e(5),l(d(8,9,"sighting.actions.flag_text.intro")),e(3),A("ngModel",t.flagReason),e(2),l(d(13,11,"sighting.actions.flag_text.extra")),e(3),u("disabled",!t.flagReason||t.operating),e(),l(d(17,13,"sighting.actions.flag_text.button")),e(2),m(t.operating?18:-1)}}function qe(i,r){i&1&&C(0,"spotter-spinner")}function Le(i,r){if(i&1){let t=b();a(0,"div",57)(1,"h4",58),o(2),s(3,"translate"),n(),a(4,"button",59),S("click",function(){let g=h(t).$implicit;return x(g.dismiss("Cross click"))}),n()(),a(5,"div",60)(6,"p"),o(7),s(8,"translate"),n(),a(9,"p"),o(10),s(11,"translate"),n()(),a(12,"div",63)(13,"button",65),S("click",function(){h(t);let g=c();return x(g.confirmSighting())}),o(14),s(15,"translate"),n(),p(16,qe,1,0,"spotter-spinner"),n()}if(i&2){let t=c();e(2),l(d(3,6,"sighting.actions.confirm_text.title")),e(5),l(d(8,8,"sighting.actions.confirm_text.text_a")),e(3),l(d(11,10,"sighting.actions.confirm_text.text_b")),e(3),u("disabled",t.operating),e(),l(d(15,12,"sighting.actions.confirm_text.button")),e(2),m(t.operating?16:-1)}}function Ue(i,r){i&1&&C(0,"spotter-spinner")}function je(i,r){if(i&1){let t=b();a(0,"div",57)(1,"h4",58),o(2),s(3,"translate"),n(),a(4,"button",59),S("click",function(){let g=h(t).$implicit;return x(g.dismiss("Cross click"))}),n()(),a(5,"div",60)(6,"p"),o(7),s(8,"translate"),n()(),a(9,"div",63)(10,"button",64),S("click",function(){h(t);let g=c();return x(g.deleteSighting())}),o(11),s(12,"translate"),n(),p(13,Ue,1,0,"spotter-spinner"),n()}if(i&2){let t=c();e(2),l(d(3,5,"sighting.actions.delete_text.title")),e(5),l(d(8,7,"sighting.actions.delete_text.warning")),e(3),u("disabled",t.operating),e(),l(d(12,9,"sighting.actions.delete_text.button")),e(2),m(t.operating?13:-1)}}function Oe(i,r){i&1&&C(0,"spotter-spinner")}function Ne(i,r){if(i&1){let t=b();a(0,"div",57)(1,"h4",58),o(2),s(3,"translate"),n(),a(4,"button",59),S("click",function(){let g=h(t).$implicit;return x(g.dismiss("Cross click"))}),n()(),a(5,"div",60)(6,"p"),o(7),s(8,"translate"),n(),a(9,"p"),o(10),s(11,"translate"),n(),a(12,"div",61)(13,"textarea",62),Q("ngModelChange",function(g){h(t);let v=c();return D(v.convertReason,g)||(v.convertReason=g),x(g)}),n()()(),a(14,"div",63)(15,"button",66),S("click",function(){h(t);let g=c();return x(g.convertSighting())}),o(16),s(17,"translate"),n(),p(18,Oe,1,0,"spotter-spinner"),n()}if(i&2){let t=c();e(2),l(d(3,7,"sighting.actions.convert_text.title")),e(5),l(d(8,9,"sighting.actions.convert_text.warning")),e(3),l(d(11,11,"sighting.actions.convert_text.notify")),e(3),A("ngModel",t.convertReason),e(2),u("disabled",t.operating||!t.convertReason),e(),l(d(17,13,"sighting.actions.convert_text.button")),e(2),m(t.operating?18:-1)}}var Lt=class i{constructor(r,t,_,g,v,He,We,$e,Ge,Fe,ze,Je,Ke,Xe){this.route=r;this.router=t;this.explore=_;this.modalService=g;this.http=v;this.lang=He;this.auth=We;this.toast=$e;this.upload=Ge;this.questions=Fe;this.comments=ze;this.cdr=Je;this.events=Ke;this.seo=Xe}sighting;ReactionType=wt;thumbnail;activityComponent;flagReason="";convertReason="";operating=!1;reacting=!1;canEdit=!1;canDelete=!1;canConfirm=!1;canConvert=!1;isOwner=!1;
1isAdmin=!1;layers;rowsEnv;rowsHuman;rowsSeagrass;ngAfterViewInit(){this.rowsEnv.changes.subscribe(()=>{this.cdr.detectChanges()}),this.rowsHuman.changes.subscribe(()=>{this.cdr.detectChanges()}),this.rowsSeagrass.changes.subscribe(()=>{this.cdr.detectChanges()})}ngOnInit(){this.operating=!1,this.flagReason="",this.route.params.subscribe(r=>{this.explore.getSighting(r.id).subscribe({next:t=>{this.sighting=t;let _={position:[this.sighting.longitude,this.sighting.latitude]};this.layers=[Qt(_,10)],this.seo.setTitle(`Seagrass Spotted in ${t.country}`),this.seo.setDescription(`A sighting of ${t.species[0].display_name} has been spotted in ${t.country}`),this.seo.setImage(`${t.images?.image}`),this.setupEditPermissions()},error:t=>{console.error("Unable to get the sighting: "+r.id),console.error(r),console.error(t)}})})}setupEditPermissions(){this.canEdit=!1,this.canDelete=!1,this.canConfirm=!1,this.canConvert=!1,this.isOwner=!1,this.isAdmin=!1,this.auth.isLoggedIn().then(r=>{r&&this.auth.tokenUser&&this.sighting&&(this.isOwner=this.auth.tokenUser.username==this.sighting.user.username,this.isAdmin=this.auth.tokenUser.access_level>=this.auth.getAdminAccessLevel(),this.canEdit=this.isOwner&&!this.sighting.admin_confirmed||this.isAdmin,this.canDelete=this.isAdmin,this.canConfirm=this.isAdmin&&!this.sighting.admin_confirmed,this.canConvert=this.isAdmin&&!this.sighting.admin_confirmed)})}hasSeagrassData(){return this.rowsSeagrass.length>0}hasHumanData(){return this.rowsHuman.length>0}hasEnvironmentData(){return this.rowsEnv.length>0}previousSighting(){let r=this.explore.getPreviousSighting(this.sighting?.id);r&&this.router.navigateByUrl(`/sighting/${r.id}`)}nextSighting(){let r=this.explore.getNextSighting(this.sighting?.id);r&&this.router.navigateByUrl(`/sighting/${r.id}`)}openLightbox(){this.modalService.open(this.thumbnail,{size:"xl",centered:!0})}openModal(r){this.modalService.open(r,{size:"md",centered:!0})}flagSighting(){this.operating=!0,this.upload.flagSighting(this.sighting.id,this.flagReason).then(()=>{this.ngOnInit(),this.modalService.dismissAll(),this.toast.showSuccess("The sighting has been flagged and an email sent to the user")}).catch(r=>{console.error(r),this.modalService.dismissAll(),this.toast.showError("There was an error flagging the sighting: "+r),this.operating=!1})}confirmSighting(){this.operating=!0,this.upload.confirmSighting(this.sighting.id).then(()=>{this.ngOnInit(),this.modalService.dismissAll(),this.toast.showSuccess("The sighting has been confirmed")}).catch(r=>{console.error(r),this.modalService.dismissAll(),this.toast.showError("There was an error flagging the sighting: "+r),this.operating=!1})}deleteSighting(){this.operating=!0,this.upload.deleteSighting(this.sighting.id).then(()=>{this.modalService.dismissAll(),this.toast.showSuccessTranslated("sighting.actions.delete_text.deleted"),this.router.navigateByUrl("/")}).catch(r=>{console.error(r),this.modalService.dismissAll(),this.toast.showErrorTranslated("sighting.actions.delete_text.deleted_error"),this.operating=!1})}convertSighting(){this.operating=!0,this.upload.convertSighting(this.sighting.id,this.convertReason).then(r=>{this.modalService.dismissAll(),this.toast.showSuccess("The sighting has been converted"),this.router.navigateByUrl(`/absence/${r.id}`)}).catch(r=>{console.error(r),this.modalService.dismissAll(),this.toast.showError("There was an error deleting the sighting: "+r),this.operating=!1})}comment(r){this.sighting&&this.comments.commentSighting(r,this.sighting).then(t=>{t.nearby=this.sighting?.nearby,this.sighting=t,this.activityComponent.reset(),this.toast.showSuccessTranslated("comments.toasts.commented")})}replied(){this.ngOnInit(),this.toast.showSuccessTranslated("comments.toasts.replied")}reported(){this.ngOnInit(),this.toast.showSuccessTranslated("comments.toasts.reported")}deleted(){this.ngOnInit(),this.toast.showSuccessTranslated("comments.toasts.deleted")}scrollToBox(){let r=document.getElementById("comment_entry_box");r?.scrollIntoView({behavior:"smooth"}),r?.focus(),this.auth.tokenUser||this.router.navigateByUrl("/login")}react(r){this.sighting&&this.auth.tokenUser?(this.reacting=!0,this.upload.reactSighting(this.sighting,r).then(t=>{t.nearby=this.sighting?.nearby,this.sighting=t,this.reacting=!1})):this.events.fail401.emit()}static \u0275fac=function(t){return new(t||i)(f(X),f(Y),f(It),f(xt),f(K),f(at),f(nt),f(ft),f(Tt),f(ot),f(At),f(F),f(it),f(gt))};static \u0275cmp=U({type:i,selectors:[["app-single-sighting-page"]],viewQuery:function(t,_){if(t&1&&(w(Ut,5,L),w(jt,5),w(Ot,5),w(Nt,5),w(Ht,5)),t&2){let g;y(g=I())&&(_.thumbnail=g.first),y(g=I())&&(_.activityComponent=g.first),y(g=I())&&(_.rowsEnv=g),y(g=I())&&(_.rowsHuman=g),y(g=I())&&(_.rowsSeagrass=g)}},decls:19,vars:7,consts:[["sightingLightbox",""],["flagSightingModal",""],["confirmSightingModal",""],["deleteSightingModal",""],["confirmConvertModal",""],["row_seagrass",""],["row_env",""],["row_human",""],["comment_section",""],["activity",""],[1,"panel"],[1,"panel-header"],[1,"actions"],[1,"panel-body"],[1,"sighting-view"],[1,"sighting-navigate-buttons"],["type","button",1,"btn","action-button",3,"click","disabled","ngbTooltip"],["icon","chevron-left"],["icon","chevron-right"],["ngbDropdown","",1,"actions-button"],["type","button","id","actionsDropdown","ngbDropdownToggle","",1,"btn",3,"ngbTooltip"],["icon","cog"],["ngbDropdownMenu","","aria-labelledby","actionsDropdown"],["ngbDropdownItem","",3,"routerLink"],["ngbDropdownItem",""],["ngbDropdownItem","",3,"click"],[1,"row"],[1,"col-sm-8"],[1,"data-header"],[1,"country"],[1,"area"],[1,"meta",3,"innerHtml"],[1,"species"],[1,"badge","bg-primary"],[1,"meta-icons"],["container","body",1,"flagged-icon",3,"ngbTooltip"],[1,"sighting-data-tables"],[1,"table","table-sm"],[1,"table-light"],["colspan","2"],[3,"grade"],[3,"react","comment","sighting","disabled"],["flagText","comments.buttons.flag_sighting",3,"flagged","sighting"],[1,"col-sm-4"],[1,"img-fluid","tiny-img","sighting-image",3,"click","
1src"],[1,"map-holder"],[3,"layers"],[1,"text-center","mt-2"],[1,"nearby-divider"],[1,"row","nearby-row"],["icon","flag",1,"text-danger"],["colspan","2",1,"no-items"],["target","_blank",1,"btn","btn-outline-primary",3,"href"],[3,"sighting"],[3,"commented","replied","reported","deleted","activity"],[1,"modal-body","lightbox-body"],[1,"img-fluid",3,"src"],[1,"modal-header"],["id","modal-basic-title",1,"modal-title"],["type","button","aria-label","Close",1,"btn-close",3,"click"],[1,"modal-body"],[1,"form-group"],[1,"form-control",2,"min-height","100px",3,"ngModelChange","ngModel"],[1,"modal-footer"],["type","button",1,"btn","btn-danger",3,"click","disabled"],["type","button",1,"btn","btn-primary",3,"click","disabled"],["type","button",1,"btn","btn-warning",3,"click","disabled"]],template:function(t,_){t&1&&(a(0,"div",10)(1,"div",11),o(2),s(3,"translate"),p(4,Kt,9,11,"div",12),n(),a(5,"div",13),p(6,Xt,2,0,"div"),p(7,Me,124,101,"div",14),n()(),p(8,Re,8,4,"div",10),j(9,Ae,2,2,"ng-template",null,0,B)(11,Qe,19,15,"ng-template",null,1,B)(13,Le,17,14,"ng-template",null,2,B)(15,je,14,11,"ng-template",null,3,B)(17,Ne,19,15,"ng-template",null,4,B)),t&2&&(e(2),O(" ",d(3,5,"global.menu_items.sighting")," "),e(2),m(_.sighting&&_.explore.sightings.length?4:-1),e(2),m(_.sighting?-1:6),e(),m(_.sighting?7:-1),e(),m(_.sighting?8:-1))},dependencies:[J,tt,Z,St,ht,_t,mt,ct,pt,ut,Ct,vt,Et,Mt,Pt,dt,rt,lt,st,Dt,qt,Vt,Rt,yt,Bt,z,et,bt,kt],encapsulation:2})};export{Lt as SingleSightingPageComponent};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.