1import{a as Me}from"./chunk-WUVSLIVN.js";import{a as k,b as Ae}from"./chunk-O3GYDPUK.js";import{a as ve,b as ye,d as we}from"./chunk-B5DVITDZ.js";import"./chunk-CCSJ63GA.js";import"./chunk-6W2UBDBA.js";import{G as xe}from"./chunk-7PXPNTRJ.js";import"./chunk-EACUHEII.js";import{a as be}from"./chunk-UUALBZCT.js";import"./chunk-MH3IMSTD.js";import{b as Ce}from"./chunk-4CFUKYP7.js";import"./chunk-JWBUGG5B.js";import{k as _e}from"./chunk-7J3NESVQ.js";import{Ab as te,Bb as O,Eb as w,Fb as p,Jb as me,Kb as de,Lb as ge,Mb as ne,Na as R,Nb as s,Ob as M,Pa as pe,Pb as T,Qa as r,Qb as ie,Vb as fe,Wb as oe,Y as U,_a as Z,ac as he,da as v,db as m,e as Re,ea as y,fa as V,jb as A,kb as b,lb as z,lc as I,mb as D,mc as J,na as se,nb as ue,pa as ce,qa as ee,qb as f,sa as C,sb as Q,tb as h,ub as _,vb as o,wb as l,xb as u}from"./chunk-RGEVBHRW.js";var Qt=Re(Ae());var L=[{name:"\u82B1\u6771\u7E31\u8C37",towns:["\u6C60\u4E0A\u9109","\u95DC\u5C71\u93AE","\u9E7F\u91CE\u9109"],color:"#F2B134",side:"R",labelDy:40},{name:"\u5357\u6A6B\u5C71\u7DDA",towns:["\u6D77\u7AEF\u9109","\u5EF6\u5E73\u9109"],color:"#7BB661",side:"L",labelDy:-30},{name:"\u6771\u6D77\u5CB8\u7DDA",towns:["\u9577\u6FF1\u9109","\u6210\u529F\u93AE","\u6771\u6CB3\u9109"],color:"#3F8FD2",side:"R",labelDy:-60},{name:"\u81FA\u6771/\u5351\u5357",towns:["\u81FA\u6771\u5E02","\u5351\u5357\u9109"],color:"#E5744F",side:"L",labelDy:30},{name:"\u5357\u8FF4\u5C71\u6D77",towns:["\u592A\u9EBB\u91CC\u9109","\u91D1\u5CF0\u9109","\u5927\u6B66\u9109","\u9054\u4EC1\u9109"],color:"#9B6BC3",side:"L",labelDy:0},{name:"\u96E2\u5CF6",towns:["\u7DA0\u5CF6\u9109","\u862D\u5DBC\u9109"],color:"#2BB3A3",side:"R",labelDy:-40}],ke=Object.fromEntries(L.flatMap(n=>n.towns.map(t=>[t,n.name]))),Ee={\u5927\u6B66\u9109:[22,14],\u9054\u4EC1\u9109:[-12,-4],\u6210\u529F\u93AE:[0,6],\u95DC\u5C71\u93AE:[-4,0]};function Fe(n,t){return`https://www.google.com/maps/dir/?api=1&destination=${n},${t}`}var q=(n,t)=>t.region.name,Pe=(n,t)=>t.name;function Be(n,t){if(n&1&&(V(),o(0,"path",6)(1,"title"),s(2),l()()),n&2){let e=t.$implicit;A("d",e.d),r(2),M(e.name)}}function Ve(n,t){if(n&1){let e=O();V(),o(0,"g",5),w("click",function(){let a=v(e).$implicit,c=p(2);return y(c.pick(a.region.name))}),h(1,Be,3,2,":svg:path",6,Pe),l()}if(n&2){let e=t.$implicit,i=p(2);z("--c",e.region.color),D("active",i.selected()===null||e.region.name===i.selected()),r(),_(e.towns)}}function Le(n,t){if(n&1){let e=O();V(),o(0,"g",7),w("click",function(){let a=v(e).$implicit,c=p(2);return y(c.pick(a.region.name))}),u(1,"line",8)(2,"circle",9),l()}if(n&2){let e=t.$implicit;r(),A("x1",e.ex)("y1",e.ly)("x2",e.ax)("y2",e.ay)("stroke",e.region.color),r(),A("cx",e.ax)("cy",e.ay)("fill",e.region.color)}}function $e(n,t){if(n&1&&(V(),o(0,"text",10),s(1),l()),n&2){let e=t.$implicit;A("x",e.cx)("y",e.cy),r(),M(e.name)}}function Ne(n,t){if(n&1&&h(0,$e,2,3,":svg:text",10,Pe),n&2){let e=t.$implicit;_(e.towns)}}function Ue(n,t){if(n&1){let e=O();V(),o(0,"g",11),w("click",function(){let a=v(e).$implicit,c=p(2);return y(c.pick(a.region.name))}),u(1,"rect"),o(2,"text",12),s(3),o(4,"tspan",13),s(5),l()()()}if(n&2){let e=t.$implicit,i=p(2);D("active",e.region.name===i.selected()),A("transform","translate("+e.lx+","+e.ly+")"),r(),A("x",-i.labelW/2)("y",-i.labelH/2)("width",i.labelW)("height",i.labelH)("rx",i.labelH/2)("fill",e.region.color),r(2),M(e.region.name),r(2),T(" ",i.counts()[e.region.name]||0,"")}}function We(n,t){if(n&1&&(V(),o(0,"svg",0),h(1,Ve,3,4,":svg:g",2,q),h(3,Le,3,8,":svg:g",3,q),h(5,Ne,2,0,null,null,q),h(7,Ue,6,11,":svg:g",4,q),l()),n&2){let e=p();A("viewBox",e.viewBox()),r(),_(e.shapes()),r(2),_(e.shapes()),r(2),_(e.shapes()),r(2),_(e.shapes())}}function ze(n,t){n&1&&(o(0,"div",1),u(1,"i",14),l())}var re=640,K=16,X=115,ae=150,He=46,Y=class n{towns=U(Me);counts=ee({});selected=ee(null);regionChange=ce();labelW=ae;labelH=He;height=C(0);viewBox=I(()=>`${-X} 0 ${re+2*X} ${this.height()}`);shapes=C([]);constructor(){this.towns.load(),J(()=>{this.towns.loaded()&&!this.shapes().length&&this.build(this.towns.shapes)})}pick(t){this.regionChange.emit(t)}build(t){if(!t.length)return;let e=1/0,i=-1/0,a=1/0,c=-1/0;for(let d of t)for(let x of d.polygons)for(let S of x)for(let[F,P]of S)F<e&&(e=F),F>i&&(i=F),P<a&&(a=P),P>c&&(c=P);let g=Math.cos((a+c)/2*Math.PI/180),$=(re-2*K)/((i-e)*g),H=(c-a)*$+2*K,N=(d,x)=>[(d-e)*g*$+K,(c-x)*$+K],W=new Map;for(let d of t){let x="",S={area:0,cx:0,cy:0};for(let G of d.polygons){for(let E of G)x+="M"+E.map(([B,Se])=>N(B,Se).map(Oe=>Oe.toFixed(1)).join(" ")).join(" ")+"Z";let j=Ge(G[0].map(([E,B])=>N(E,B)));j.area>S.area&&(S=j)}let[F,P]=Ee[d.name]??[0,0];W.set(d.name,{name:d.name,d:x,cx:Math.round(S.cx+F),cy:Math.round(S.cy+P)})}let le=[];for(let d of L){let x=d.towns.map(E=>W.get(E)).filter(E=>!!E);if(!x.length)continue;let S=x.reduce((E,B)=>E+B.cx,0)/x.length,F=x.reduce((E,B)=>E+B.cy,0)/x.length;d.name==="\u96E2\u5CF6"&&W.get("\u7DA0\u5CF6\u9109")&&(S=W.get("\u7DA0\u5CF6\u9109").cx,F=W.get("\u7DA0\u5CF6\u9109").cy);let P=d.side==="R"?re+X-80:-X+80,G=F+d.labelDy,j=d.side==="R"?P-ae/2:P+ae/2;le.push({region:d,towns:x,ax:Math.round(S),ay:Math.round(F),lx:Math.round(P),ly:Math.round(G),ex:Math.round(j)})}this.height.set(Math.round(H)),this.shapes.set(le)}
1static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Z({type:n,selectors:[["app-region-map"]],inputs:{counts:[1,"counts"],selected:[1,"selected"]},outputs:{regionChange:"regionChange"},decls:2,vars:1,consts:[["xmlns","http://www.w3.org/2000/svg","role","img","aria-label","\u81FA\u6771\u516D\u5206\u5340\u5730\u5716",1,"block","h-auto","w-full","select-none"],[1,"flex","aspect-[3/4]","w-full","items-center","justify-center","text-gray-300"],[1,"region",3,"active","--c"],[1,"region-leader"],[1,"region-label",3,"active"],[1,"region",3,"click"],[1,"town"],[1,"region-leader",3,"click"],["stroke-width","2.5"],["r","4","stroke","#fff","stroke-width","1.5"],[1,"town-label"],[1,"region-label",3,"click"],["y","8"],[1,"cnt"],[1,"fa-solid","fa-spinner","fa-spin","text-2xl"]],template:function(e,i){e&1&&m(0,We,9,1,":svg:svg",0)(1,ze,2,0,"div",1),e&2&&f(i.shapes().length?0:1)},styles:[".town[_ngcontent-%COMP%]{fill:var(--c);fill-opacity:.55;stroke:#fff;stroke-width:1.2;transition:fill-opacity .15s;cursor:pointer}.region[_ngcontent-%COMP%]:hover .town[_ngcontent-%COMP%], .region.active[_ngcontent-%COMP%] .town[_ngcontent-%COMP%]{fill-opacity:1}.town-label[_ngcontent-%COMP%]{font-size:19px;font-weight:600;fill:#1f2937;text-anchor:middle;pointer-events:none;paint-order:stroke;stroke:#fff;stroke-width:3.5px}.region-leader[_ngcontent-%COMP%], .region-label[_ngcontent-%COMP%]{cursor:pointer}.region-label[_ngcontent-%COMP%] text[_ngcontent-%COMP%]{font-size:21px;font-weight:700;fill:#fff;text-anchor:middle}.region-label[_ngcontent-%COMP%] .cnt[_ngcontent-%COMP%]{font-weight:400;font-size:16px;opacity:.9}.region-label[_ngcontent-%COMP%] rect[_ngcontent-%COMP%]{filter:drop-shadow(0 1px 2px rgba(0,0,0,.25))}.region-label[_ngcontent-%COMP%]:hover rect[_ngcontent-%COMP%], .region-label.active[_ngcontent-%COMP%] rect[_ngcontent-%COMP%]{stroke:#111;stroke-width:2}"]})};function Ge(n){let t=0,e=0,i=0;for(let a=0;a<n.length;a++){let[c,g]=n[a],[$,H]=n[(a+1)%n.length],N=c*H-$*g;t+=N,e+=(c+$)*N,i+=(g+H)*N}return t/=2,t?{area:Math.abs(t),cx:e/(6*t),cy:i/(6*t)}:{area:0,cx:0,cy:0}}var je=["mapEl"],Ze=()=>({width:"94vw",maxWidth:"720px"}),Qe=n=>({$implicit:n}),Je=n=>({$implicit:n,compact:!0}),qe=(n,t)=>t.name,Ke=(n,t)=>t.id,Xe=(n,t)=>t.label;function Ye(n,t){if(n&1){let e=O();o(0,"button",11),w("click",function(){let a=v(e).$implicit,c=p();return y(c.selectRegion(a.name))}),u(1,"i",36),s(2),l()}if(n&2){let e=t.$implicit,i=p();D("bg-gray-900",e.name===i.selectedRegion())("text-white",e.name===i.selectedRegion())("border-gray-900",e.name===i.selectedRegion())("border-gray-200",e.name!==i.selectedRegion())("bg-white",e.name!==i.selectedRegion()),r(),z("background",e.color),r(),T("",e.name," ")}}function et(n,t){if(n&1){let e=O();o(0,"button",37),w("click",function(){let a=v(e).$implicit,c=p();return y(c.toggleTown(a))}),s(1),o(2,"span",38),s(3),l()()}if(n&2){let e=t.$implicit,i=p();D("bg-master-color-1",i.selectedTown()===e)("text-white",i.selectedTown()===e)("bg-white",i.selectedTown()!==e)("text-master-color-1",i.selectedTown()!==e),r(),T(" ",e,""),r(2),M(i.townCounts()[e]||0)}}function tt(n,t){n&1&&(o(0,"div",21),u(1,"i",39),l())}function nt(n,t){n&1&&(o(0,"div",22),u(1,"i",40),o(2,"p"),s(3,"\u5F97\u734E\u4F5C\u54C1\u5C07\u65BC\u540D\u55AE\u516C\u544A\u5F8C\u65BC\u672C\u9801\u5448\u73FE\uFF0C\u656C\u8ACB\u671F\u5F85\u3002"),l()())}function it(n,t){n&1&&(o(0,"div",21),s(1,"\u6B64\u5340\u5C1A\u7121\u5F97\u734E\u4F5C\u54C1"),l())}function ot(n,t){if(n&1&&u(0,"img",48),n&2){let e=p().$implicit;b("src",e.awardIconUrl,R)("alt",e.awardName)}}function rt(n,t){if(n&1&&(o(0,"span",53),s(1),l()),n&2){let e=t.$implicit;r(),T("#",e,"")}}function at(n,t){if(n&1&&(o(0,"div",52),h(1,rt,2,1,"span",53,Q),l()),n&2){let e=p().$implicit;r(),_(e.hashtags)}}function lt(n,t){if(n&1){let e=O();o(0,"button",42),w("click",function(){let a=v(e).$implicit,c=p(2);return y(c.openPopup(a))}),o(1,"div",43),u(2,"img",44),o(3,"span",45),u(4,"i",46),l()(),o(5,"div",47),m(6,ot,1,2,"img",48),o(7,"div",49)(8,"div",50),s(9),l(),o(10,"div",51),s(11),l(),m(12,at,3,0,"div",52),l()()()}if(n&2){let e=t.$implicit,i=p(2);b("title",e.name),r(2),b("src",i.cardSrc(e),R)("alt",e.name),r(4),f(e.awardIconUrl?6:-1),r(3),ie("",e.awardName,"\uFF5C\u651D\u5F71\uFF1A",e.photographer,""),r(2),M(e.name),r(),f(e.hashtags.length?12:-1)}}function st(n,t){if(n&1&&(o(0,"div",23),h(1,lt,13,8,"button",41,Ke),l()),n&2){let e=p();r(),_(e.regionWorks())}}function ct(n,t){n&1&&(o(0,"div",30),u(1,"i",54),l())}function pt(n,t){n&1&&(o(0,"div",31)(1,"p",55),s(2,"\u651D\u5F71\u5730\u5716\u5C07\u65BC\u5F97\u734E\u540D\u55AE\u516C\u544A\u5F8C\u958B\u653E\u3002"),l()())}function ut(n,t){n&1&&te(0)}function mt(n,t){if(n&1&&(o(0,"div",56),m(1,ut,1,0,"ng-container",57),l(),o(2,"div",58)(3,"a",59),u(4,"i",60),s(5," Google Maps \u5C0E\u822A "),l()()),n&2){let e=t,i=p(),a=ne(50);r(),b("ngTemplateOutlet",a)("ngTemplateOutletContext",oe(3,Qe,e)),r(2),b("href",i.navUrl(e),R)}}function dt(n,t){n&1&&(o(0,"div",33),u(1,"i",61),o(2,"p",62),s(3,"\u9EDE\u9078\u5730\u5716\u4E0A\u7684\u9328\u9EDE\u67E5\u770B\u4F5C\u54C1"),l()())}function gt(n,t){n&1&&te(0)}function ft(n,t){if(n&1&&m(0,gt,1,0,"ng-container",57),n&2){p();let e=ne(50);b("ngTemplateOutlet",e)("ngTemplateOutletContext",oe(2,Je,t))}}function ht(n,t){if(n&1&&(o(0,"a",59),u(1,"i",60),s(2," Google Maps \u5C0E\u822A "),l()),n&2){let e=p(2);b("href",e.navUrl(t),R)}}function _t(n,t){if(n&1&&m(0,ht,3,1,"a",59),n&2){let e,i=p();f((e=i.popup())?0:-1,e)}}function xt(n,t){if(n&1&&u(0,"img",67),n&2){let e=p().$implicit;b("src",e.awardIconUrl,R)}}function Ct(n,t){if(n&1&&(o(0,"div",69),s(1),l()),n&2){let e=p().$implicit;r(),T("\u4F5C\u54C1\u540D\u7A31\uFF1A",e.name,"")}}function bt(n,t){if(n&1&&(o(0,"span",53),s(1),l()),n&2){let e=t.$implicit;r(),T("#",e,"")}}function vt(n,t){if(n&1&&(o(0,"div",70),s(1," \u95DC\u9375\u5B57\uFF1A"),h(2,bt,2,1,"span",53,Q),l()),n&2){let e=p().$implicit;r(2),_(e.hashtags)}}function yt(n,t){if(n&1&&(o(0,"p",71),s(1),l()),n&2){let e=p().$implicit;r(),M(e.story)}}function wt(n,t){if(n&1&&(o(0,"tr")(1,"td",73),s(2),l(),o(3,"td",74),s(4),l()()),n&2){let e=t.$implicit;r(2),M(e.label),r(2),M(e.value)}}function Mt(n,t){if(n&1&&(o(0,"div",63)(1,"a",64),u(2,"img",65),l(),o(3,"div")(4,"div",66),m(5,xt,1,1,"img",67),s(6),l(),o(7,"div",68),s(8),l(),m(9,Ct,2,1,"div",69)(10,vt,4,0,"div",70),l(),m(11,yt,2,1,"p",71),o(12,"table",72)(13,"tbody"),h(14,wt,5,2,"tr",null,Xe),l()()()),n&2){let e=t.$implicit,i=t.compact,a=p();r(),b("href",e.photoUrl||a.imgSrc(e),R),r(),D("max-h-[60vh]",i),b("src",a.imgSrc(e),R)("alt",e.name),r(3),f(e.awardIconUrl?5:-1),r(),T(" ",e.awardName," "),r(2),T("\u651D\u5F71\uFF1A",e.photographer,""),r(),f(i?-1:9),r(),f(e.hashtags.length?10:-1),r(),f(e.story?11:-1),r(3),_(a.rowsOf(e))}}var kt=k.icon({iconRetinaUrl:"leaflet/marker-icon-2x.png",iconUrl:"leaflet/marker-icon.png",shadowUrl:"leaflet/marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]}),Et=k.divIcon({className:"selected-marker",html:`<span class="pulse"></span> 2 <svg viewBox="0 0 24 36" width="34" height="51" aria-hidden="true"> 3 <path d="M12 0C5.4 0 0 5.4 0 12c0 9 12 24 12 24s12-15 12-24C24 5.4 18.6 0 12 0z" fill="#F0532D" stroke="#fff" stroke-width="1.5"/> 4 <circle cx="12" cy="12" r="5" fill="#fff"/> 5 </svg>`,iconSize:[34,51],iconAnchor:[17,51]}),Ft=[22.75,121.1],Te=class n{rest=U(Ce);zone=U(se);geo=U(we);mapEl;regions=L;loading=C(!0);notOpen=C(!1);works=C([]);selectedRegion=C(null);selectedTown=C(null);allRegion={name:"\u5168\u90E8",towns:L.flatMap(t=>t.towns),color:"#2AA1FF",side:"R",labelDy:0};region=I(()=>this.selectedRegion()===null?this.allRegion:L.find(t=>t.name===this.selectedRegion())??this.allRegion);regionTotal=I(()=>{let t=this.region().towns;return this.works().filter(e=>t.includes(e.district)).length});regionCounts=I(()=>{let t={};for(let e of this.works()){let i=ke[e.district];
5i&&(t[i]=(t[i]??0)+1)}return t});townCounts=I(()=>{let t={};for(let e of this.works())t[e.district]=(t[e.district]??0)+1;return t});regionWorks=I(()=>{let t=this.region(),e=this.selectedTown();return this.works().filter(i=>t.towns.includes(i.district)&&(!e||i.district===e)).sort((i,a)=>i.awardSortOrder-a.awardSortOrder||i.id-a.id)});selected=C(null);popup=C(null);detailVisible=C(!1);isDesktop=C(typeof window<"u"&&window.innerWidth>=1024);rowsOf(t){let{date:e,time:i}=this.formatShoot(t);return[{label:"\u62CD\u651D\u65E5\u671F",value:e},{label:"\u62CD\u651D\u6642\u9593",value:i},{label:"\u76F8\u6A5F",value:t.camera},{label:"\u5FEB\u9580",value:t.shutter},{label:"\u5149\u5708",value:t.aperture},{label:"ISO",value:t.iso},{label:"\u7DEF\u5EA6",value:t.latitude?t.latitude.toFixed(6):""},{label:"\u7D93\u5EA6",value:t.longitude?t.longitude.toFixed(6):""}].filter(a=>!!a.value)}map;cluster;countyLayer;markers=new Map;constructor(){J(()=>{let t=this.geo.feature();t&&this.map&&this.drawCounty(t)})}ngAfterViewInit(){this.initMap(),this.geo.load(),this.loadWorks()}ngOnDestroy(){this.map?.remove()}onResize(){this.isDesktop.set(window.innerWidth>=1024)}selectRegion(t){this.selectedRegion()!==t&&(this.selectedRegion.set(t),this.selectedTown.set(null),this.isDesktop()||queueMicrotask(()=>document.getElementById("region-panel")?.scrollIntoView({behavior:"smooth",block:"start"})))}toggleTown(t){this.selectedTown.update(e=>e===t?null:t)}navUrl(t){return Fe(t.latitude,t.longitude)}imgSrc(t){return t.thumbUrl??t.photoUrl}cardSrc(t){return t.thumbSmallUrl??t.thumbUrl??t.photoUrl}openPopup(t){this.popup.set(t),this.detailVisible.set(!0),this.selected.set(t),this.highlightMarker(t.id)}openDetail(t){this.selected.set(t),this.highlightMarker(t.id),this.isDesktop()||(this.popup.set(t),this.detailVisible.set(!0))}onDetailHide(){this.detailVisible.set(!1),this.popup.set(null)}formatShoot(t){let e=a=>String(a).padStart(2,"0");if(!t.shootTime)return{date:"",time:""};let i=new Date(t.shootTime);return isNaN(i.getTime())?{date:"",time:""}:{date:`${i.getFullYear()}/${e(i.getMonth()+1)}/${e(i.getDate())}`,time:`${e(i.getHours())}:${e(i.getMinutes())}`}}initMap(){if(this.map||!this.mapEl)return;let t=k.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"\xA9 OpenStreetMap",maxZoom:19}),e=k.tileLayer("https://wmts.nlsc.gov.tw/wmts/PHOTO2/default/GoogleMapsCompatible/{z}/{y}/{x}",{attribution:"\u6B63\u5C04\u5F71\u50CF \xA9 \u5167\u653F\u90E8\u570B\u571F\u6E2C\u7E6A\u4E2D\u5FC3 | \u67E5\u8A62 \xA9 OpenStreetMap",maxZoom:19});this.map=k.map(this.mapEl.nativeElement,{scrollWheelZoom:!0,layers:[t]}).setView(Ft,9),this.map.attributionControl.setPrefix('<a href="https://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'),k.control.layers({\u8857\u9053:t,\u7A7A\u62CD:e}).addTo(this.map);let i=this.geo.feature();i&&this.drawCounty(i)}drawCounty(t){this.map&&(this.countyLayer?.remove(),this.countyLayer=k.geoJSON(t,{style:{color:"#2AA1FF",weight:2,fill:!0,fillColor:"#2AA1FF",fillOpacity:.06},interactive:!1}).addTo(this.map))}loadWorks(){this.rest.Get("/photo-map/works",null,{skipLoading:!0}).subscribe({next:t=>{this.loading.set(!1),this.notOpen.set(!t?.success);let e=t?.success&&Array.isArray(t.data)?t.data:[];this.works.set(e),this.addMarkers(e)},error:()=>{this.loading.set(!1),this.notOpen.set(!0)}})}addMarkers(t){if(!this.map)return;this.cluster=k.markerClusterGroup({maxClusterRadius:40,showCoverageOnHover:!1,spiderfyOnMaxZoom:!0,disableClusteringAtZoom:12});let e=[];for(let i of t){if(!i.latitude&&!i.longitude)continue;let a=k.marker([i.latitude,i.longitude],{icon:this.iconFor(i,!1),title:i.name});a.on("click",()=>this.zone.run(()=>this.openDetail(i))),this.cluster.addLayer(a),this.markers.set(i.id,a),e.push([i.latitude,i.longitude])}this.map.addLayer(this.cluster),e.length&&this.map.fitBounds(k.latLngBounds(e).pad(.15),{maxZoom:11})}iconFor(t,e){return t.awardIconUrl?k.divIcon({className:"award-marker"+(e?" selected":""),html:`<img src="${t.awardIconUrl}" alt="${t.awardName}">`,iconSize:[36,36],iconAnchor:[18,18]}):e?Et:kt}selectedMarkerId=null;highlightMarker(t){let e=this.selectedMarkerId;this.selectedMarkerId=t;for(let i of[e,t]){if(i==null)continue;let a=this.markers.get(i),c=this.works().find(g=>g.id===i);!a||!c||(a.setIcon(this.iconFor(c,i===t)),a.setZIndexOffset(i===t?1e3:0))}}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Z({type:n,selectors:[["app-photo-map"]],viewQuery:function(e,i){if(e&1&&me(je,5),e&2){let a;de(a=ge())&&(i.mapEl=a.first)}},hostBindings:function(e,i){e&1&&w("resize",function(){return i.onResize()},!1,pe)},decls:51,vars:31,consts:[["mapEl",""],["detailTpl",""],[1,"mx-auto","max-w-content","px-4","py-10","sm:px-8"],[1,"mb-6","border-b-2","border-master-color-1","pb-3","text-3xl","font-bold","text-gray-800"],[1,"mb-10"],["pageKey","photo-map"],[1,"mb-2","text-xl","font-bold","text-gray-800","sm:text-2xl"],[1,"leading-relaxed","text-gray-600"],[1,"mb-14","grid","grid-cols-1","gap-8","lg:grid-cols-[minmax(320px,560px)_1fr]","lg:items-start"],[1,"lg:sticky","lg:top-20"],[1,"mb-3","flex","flex-wrap","gap-2"],["type","button",1,"inline-flex","items-center","gap-2","rounded-full","border","px-3.5","py-1.5","text-sm","transition",3,"click"],[1,"fa-solid","fa-layer-group","text-xs"],[1,"text-xs","opacity-70"],["type","button",1,"inline-flex","items-center","gap-2","rounded-full","border","px-3.5","py-1.5","text-sm","transition",3,"bg-gray-900","text-white","border-gray-900","border-gray-200","bg-white"],[3,"regionChange","counts","selected"],["id","region-panel",1,"scroll-mt-20"],[1,"mb-1","border-b-2","pb-2","text-2xl","font-bold","text-gray-800"],[1,"mb-3","text-sm","text-gray-500"],[1,"mb-5","flex","flex-wrap","gap-2"],["type","button",1,"rounded-lg","border-[1.5px]","border-master-color-1","px-3.5","py-1.5","text-sm","font-semibold","transition",3,"bg-master-color-1","text-white","bg-white","text-master-color-1"],[1,"py-16","text-center","text-gray-400"],[1,"flex","flex-col","items-center","gap-2","py-16","text-gray-400"],[1,"grid","grid-cols-1","gap-5","sm:grid-cols-2","xl:grid-cols-3"],["id","photo-leaflet",1,"scroll-mt-20"],[1,"mb-4","border-b-2","border-master-color-1","pb-2","text-2xl","font-bold","text-gray-800"],[1,"mb-4","text-sm","text-gray-500"],[1,"grid","grid-cols-1","gap-5","lg:grid-cols-[1fr_360px]"],[1,"relative","overflow-hidden","rounded-xl","border","border-gray-200","shadow-sm"],[1,"h-[60vh]","w-full","lg:h-[72vh]"],[1,"absolute","
5inset-0","z-[500]","flex","items-center","justify-center","bg-white/60"],[1,"absolute","inset-0","z-[500]","flex","items-center","justify-center","bg-white/70"],[1,"hidden","overflow-hidden","rounded-xl","border","border-gray-200","bg-white","shadow-sm","lg:flex","lg:h-[72vh]","lg:flex-col"],[1,"flex","h-full","flex-col","items-center","justify-center","gap-2","p-4","text-gray-400"],["styleClass","photo-popup",3,"visibleChange","onHide","visible","modal","draggable","resizable","dismissableMask","header"],["pTemplate","footer"],[1,"inline-block","h-2.5","w-2.5","rounded-full"],["type","button",1,"rounded-lg","border-[1.5px]","border-master-color-1","px-3.5","py-1.5","text-sm","font-semibold","transition",3,"click"],[1,"ml-1","text-xs","opacity-70"],[1,"fa-solid","fa-spinner","fa-spin","text-2xl"],[1,"fa-regular","fa-clock","text-3xl"],["type","button",1,"group","relative","block","w-full","border-b","border-gray-300","pb-3","text-left",3,"title"],["type","button",1,"group","relative","block","w-full","border-b","border-gray-300","pb-3","text-left",3,"click","title"],[1,"relative","overflow-hidden","rounded-lg","bg-gray-100"],["loading","lazy",1,"aspect-[4/3]","w-full","object-cover","transition","group-hover:brightness-95",3,"src","alt"],[1,"absolute","right-2","top-2","flex","h-9","w-9","items-center","justify-center","rounded-full","bg-white/90","text-gray-700","shadow"],[1,"fa-solid","fa-magnifying-glass-plus"],[1,"mt-2","flex","items-start","gap-2.5"],[1,"h-10","w-10","shrink-0","object-contain",3,"src","alt"],[1,"min-w-0"],[1,"text-sm","font-bold","text-gray-800"],[1,"truncate","text-sm","text-gray-600"],[1,"mt-0.5","text-xs","text-master-color-1"],[1,"mr-1.5"],[1,"fa-solid","fa-spinner","fa-spin","text-3xl","text-master-color-1"],[1,"text-lg","text-gray-500"],[1,"min-h-0","flex-1","overflow-y-auto","p-4"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"border-t","border-gray-200","p-4"],["target","_blank","rel","noopener",1,"flex","w-full","items-center","justify-center","gap-2","rounded-full","bg-master-color-1","px-4","py-2.5","text-sm","font-semibold","text-white","no-underline","transition","hover:brightness-95",3,"href"],[1,"fa-solid","fa-diamond-turn-right"],[1,"fa-solid","fa-hand-pointer","text-3xl"],[1,"text-sm"],[1,"flex","flex-col","gap-3"],["target","_blank","rel","noopener","title","\u67E5\u770B\u539F\u5716",3,"href"],[1,"w-full","rounded-lg","object-contain",3,"src","alt"],[1,"flex","items-center","gap-2","text-base","font-bold","text-gray-800"],["alt","",1,"h-6","w-6","object-contain",3,"src"],[1,"mt-1","text-sm","text-gray-700"],[1,"text-sm","text-gray-700"],[1,"mt-1","text-sm","text-master-color-1"],[1,"whitespace-pre-line","text-sm","leading-relaxed","text-gray-600"],[1,"w-full","border-collapse","text-sm"],[1,"w-20","whitespace-nowrap","py-1","pr-3","align-top","text-gray-400"],[1,"py-1","text-gray-700"]],template:function(e,i){if(e&1){let a=O();o(0,"div",2)(1,"h1",3),s(2,"\u651D\u5F71\u5730\u5716"),l(),o(3,"section",4)(4,"app-page-blocks",5)(5,"h2",6),s(6,"\u6355\u6349\u5149\u5F71\u7684\u77AC\u9593\uFF0C\u6536\u85CF\u5C71\u6D77\u7684\u5EA7\u6A19"),l(),o(7,"p",7),s(8," \u300C\u81FA\u6771\u767E\u62CD\uFF0E\u93E1\u5165\u5EA7\u6A19\u300D\u900F\u904E\u5168\u6C11\u7684\u93E1\u982D\uFF0C\u6355\u6349\u81FA\u6771 16 \u9109\u93AE\u5E02\u5149\u5F71\u4EA4\u7E54\u7684\u7D55\u7F8E\u77AC\u9593\u3002\u6211\u5011\u5C07\u9019 100 \u5E40\u6709\u6545\u4E8B\u3001\u6709\u5EA7\u6A19\u7684\u5F97\u734E\u4F5C\u54C1\uFF0C \u7DE8\u7E54\u6210\u4E00\u5E45\u7ACB\u9AD4\u7684\u300C\u81FA\u6771\u651D\u5F71\u5730\u5716\u300D\uFF0C\u9080\u8ACB\u60A8\u6536\u4E0B\u9019\u5E45\u5F71\u50CF\u5730\u5716\uFF0C\u8DDF\u8457\u651D\u5F71\u8005\u7684\u8173\u6B65\u89AA\u81E8\u73FE\u5834\uFF0C\u958B\u555F\u60A8\u7684\u5C71\u6D77\u4E4B\u65C5\uFF01 "),l()()(),o(9,"section",8)(10,"div",9)(11,"div",10)(12,"button",11),w("click",function(){return v(a),y(i.selectRegion(null))}),u(13,"i",12),s(14,"\u5168\u90E8 "),o(15,"span",13),s(16),l()(),h(17,Ye,3,13,"button",14,qe),l(),o(19,"app-region-map",15),w("regionChange",function(g){return v(a),y(i.selectRegion(g))}),l()(),o(20,"div",16)(21,"h2",17),s(22),l(),o(23,"p",18),s(24),l(),o(25,"div",19),h(26,et,4,10,"button",20,Q),l(),m(28,tt,2,0,"div",21)(29,nt,4,0,"div",22)(30,it,2,0,"div",21)(31,st,3,0,"div",23),l()(),o(32,"section",24)(33,"h2",25),s(34,"\u81FA\u6771\u651D\u5F71\u5730\u5716"),l(),o(35,"p",26),s(36,"\u5730\u5716\u4E0A\u6BCF\u500B\u9328\u9EDE\u70BA\u4E00\u4EF6\u5F97\u734E\u4F5C\u54C1\uFF0C\u9EDE\u64CA\u53EF\u67E5\u770B\u4F5C\u54C1\u7167\u7247\u8207\u62CD\u651D\u8CC7\u8A0A\u3002"),l(),o(37,"div",27)(38,"div",28),u(39,"div",29,0),m(41,ct,2,0,"div",30)(42,pt,3,0,"div",31),l(),o(43,"aside",32),m(44,mt,6,5)(45,dt,4,0,"div",33),l()()()(),o(46,"p-dialog",34),w("visibleChange",function(g){return v(a),y(i.detailVisible.set(g))})("onHide",function(){return v(a),y(i.onDetailHide())}),m(47,ft,1,4,"ng-container")(48,_t,1,1,"ng-template",35),l(),m(49,Mt,16,11,"ng-template",null,1,he)}if(e&2){let a,c,g;r(12),D("bg-gray-900",i.selectedRegion()===null)("text-white",i.selectedRegion()===null)("border-gray-900",i.selectedRegion()===null)("border-gray-200",i.selectedRegion()!==null)("bg-white",i.selectedRegion()!==null),r(4),M(i.works().length),r(),_(i.regions),r(2),b("counts",i.regionCounts())("selected",i.selectedRegion()),r(2),z("border-color",i.region().color),r(),M(i.region().name),r(2),ie(" ",i.region().towns.join("\u3001"),"\uFF5C\u5171 ",i.regionTotal()," \u4EF6\u5F97\u734E\u4F5C\u54C1 "),r(2),_(i.region().towns),r(2),f(i.loading()?28:i.notOpen()?29:i.regionWorks().length?31:30),r(13),f(i.loading()?41:i.notOpen()?42:-1),r(3),f((a=i.selected())?44:45,a),r(2),ue(fe(30,Ze)),b("visible",i.detailVisible())("modal",!0)("draggable",!1)("resizable",!1)("dismissableMask",!0)("header",((c=i.popup())==null?null:c.name)||"\u4F5C\u54C1\u8CC7\u8A0A"),r(),f((g=i.popup())?47:-1,g)}},dependencies:[ye,ve,xe,_e,be,Y],styles:["[_nghost-%COMP%] .marker-cluster{background-clip:padding-box;border-radius:20px}[_nghost-%COMP%] .marker-cluster div{width:30px;height:30px;margin-left:5px;margin-top:5px;text-align:center;border-radius:15px;color:#fff;font-weight:600}[_nghost-%COMP%] .marker-cluster span{line-height:30px}[_nghost-%COMP%] .marker-cluster-small{background-color:#2aa1ff59}[_nghost-%COMP%] .marker-cluster-small div{background-color:#2aa1fff2}[_nghost-%COMP%] .marker-cluster-medium{background-color:#f0a20c73}[_nghost-%COMP%] .marker-cluster-medium div{background-color:#f0a20cf2}[_nghost-%COMP%] .marker-cluster-large{background-color:#e5492d73}[_nghost-%COMP%] .marker-cluster-large div{background-color:#e5492df2}[_nghost-%COMP%] .award-marker{background:transparent;border:0}[_nghost-%COMP%] .award-marker img{width:36px;height:36px;border-radius:50%;background:#fff;padding:3px;box-shadow:0 1px 4px #00000059;object-fit:contain;display:block}[_nghost-%COMP%] .award-marker.selected img{outline:3px solid #F0532D}[_nghost-%COMP%] .selected-marker{background:transparent;border:0}[_nghost-%COMP%] .selected-marker svg{position:relative;display:block;filter:drop-shadow(0 2px 3px rgba(0,0,0,.4))}[_nghost-%COMP%] .selected-marker .pulse{position:absolute;
5left:17px;bottom:0;width:14px;height:14px;margin-left:-7px;margin-bottom:-7px;border-radius:50%;background:#f0532d73;animation:_ngcontent-%COMP%_photo-map-pulse 1.6s ease-out infinite}@keyframes _ngcontent-%COMP%_photo-map-pulse{0%{transform:scale(1);opacity:.8}to{transform:scale(4);opacity:0}}[_nghost-%COMP%] .photo-popup .p-dialog-content{padding-bottom:1.25rem}[_nghost-%COMP%] .photo-popup .p-dialog-footer{padding-top:1rem;border-top:1px solid #e5e7eb}"]})};export{Te as PhotoMapComponent};
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.