1"use strict";(globalThis.webpackChunkwips_components_scripts||=[]).push([[1603],{daf42f4aa08061cc(e,t,a){a.r(t),a.d(t,{default:()=>he}),a("27e0a48d3d4d9aab");var r=a("b641633d6c906d19"),o=a("99c472be6da17922"),n=a("82d8eefb58430341");const h={class:"infoKey"},l={key:0},s=["href"],i={name:"ContactInfoEntry",props:["infoType","info"],computed:{isLinkable(){return"website"==this.infoType||"phone"==this.infoType||"email"==this.infoType},infoLink(){return"phone"==this.infoType?`tel:${this.info}`:"email"==this.infoType?`mailto:${this.info}`:this.info}}};var p=a("461bee8a7784aa7f");const u=(0,p.A)(i,[["render",function(e,t,a,n,i,p){return(0,r.uX)(),(0,r.CE)("p",null,[(0,r.Lk)("span",h,(0,o.v_)(e.$t(a.infoType))+":",1),p.isLinkable?(0,r.Q3)("",!0):((0,r.uX)(),(0,r.CE)("span",l,(0,o.v_)(a.info),1)),p.isLinkable?((0,r.uX)(),(0,r.CE)("a",{key:1,href:p.infoLink},(0,o.v_)(a.info),9,s)):(0,r.Q3)("",!0)])}],["__scopeId","data-v-18195452"]]);var c=a("ab5c7e913102dd40"),d=a("3cbbda9752acda3a"),m=a("eb0d7dd6674ec63a"),g=a("a54fa6d0a722ba3f"),v=a("6155503b942128ba");const f=(0,m.nY)("use-photographers-list-datastore",()=>{const{data:e}=(0,v.u)((0,g.IJ)("/Api/v2/media-item-photographers")),t=(0,r.EW)(()=>e.value?.map(e=>e.name)??[]);return{photographersList:e,photographersNameList:t}});var C=a("d9492f72911b6294"),k=a("c40486de06e3466e"),b=(a("6bcf20aa1369abd3"),a("1519ef9f27f54b60"),a("0c402b9e75a52e9e")),I=a("3eed504f346d2633");const y=(0,m.nY)("use-current-photographer-datastore",()=>{const{currentSearchParams:e}=(0,m.bP)((0,b.B)()),{photographersList:t}=(0,m.bP)(f()),a=(0,r.EW)({get(){const t=e.value.get("photographer"),a=null!==t?parseInt(t,10):NaN;return Number.isInteger(a)&&a>0?a:null},set(e){(0,b.B)().replaceQueryParams({photographer:e??null},{historyMode:"append"})}}),o=(0,r.EW)(()=>null===a.value?null:"/api/photographer/"+(new I.o).urlEncode(""+a.value)),{data:n}=(0,v.u)(o),h=(0,r.EW)(()=>(n.value?.mediaItems??[]).map(e=>parseInt(""+e))),l=(0,r.EW)(()=>h.value?.length?"/Api/v2/media-items/"+h.value.join(","):null),{data:s}=(0,v.u)(l),i=(0,r.EW)(()=>s.value?.filter(e=>h.value.includes(e.id))??[]),p=(0,r.EW)(()=>null!==n.value),u=(0,r.EW)(()=>n.value?.photographer?.name??null),c=(0,r.EW)(()=>null!==t.value&&(null===a.value||null!==n.value));return{hasCurrentPhotographer:p,currentPhotographerId:a,currentPhotographerName:u,currentPhotographerData:n,mediaItemsIdList:h,mediaItems:i,isReady:c}}),L={class:"photographer-list-wrapper"},E=["onClick"],P=["textContent"],_=["href","onClick"],X=["textContent"],w=["textContent"],x=(0,r.pM)({}),T=(0,r.pM)({...x,__name:"PhotographersList",setup(e){const{t}=(0,c.s)(),{photographersList:a}=(0,m.bP)(f()),h=y(),{currentPageLanguage:l}=(0,m.bP)((0,k.D)()),s=(0,g.IJ)("name"),i=(0,g.IJ)(!1),p=(0,r.EW)(()=>i.value?"arrow_downward":"arrow_upward"),u=[{name:"name",title:t("Name"),defaultValue:"",link:!0},{name:"itemCount",title:t("Items"),defaultValue:"0",link:!1}],v=(0,r.EW)(()=>{const e=(0,d.K)(a.value??[]);return e.sort((e,t)=>((e,t)=>{const a=i.value?-1:1;if("itemCount"===s.value)return Math.min(1,Math.max(-1,e.itemCount-t.itemCount))*a;const r=e.name.toLowerCase().trim(),o=t.name.toLowerCase().trim();return r.localeCompare(o,l.value??"en")*a})(e,t)),e});return(e,t)=>((0,r.uX)(),(0,r.CE)("div",L,[(0,r.Lk)("table",null,[(0,r.Lk)("thead",null,[(0,r.Lk)("tr",null,[((0,r.uX)(),(0,r.CE)(r.FK,null,(0,r.pI)(u,({name:e,title:t})=>(0,r.Lk)("th",null,[(0,r.Lk)("a",{href:"",onClick:(0,n.D$)(t=>{var a;(a=e)!=s.value?s.value=a:i.value=!i.value},["prevent"]),role:"button"},[(0,r.Lk)("span",{textContent:(0,o.v_)(t)},null,8,P),s.value==e?((0,r.uX)(),(0,r.Wv)(C.default,{key:0,"icon-name":p.value},null,8,["icon-name"])):(0,r.Q3)("",!0)],8,E)])),64))])]),(0,r.Lk)("tbody",null,[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(v.value,e=>((0,r.uX)(),(0,r.CE)("tr",null,[((0,r.uX)(),(0,r.CE)(r.FK,null,(0,r.pI)(u,({name:t,defaultValue:a,link:l})=>(0,r.Lk)("td",{class:(0,o.C4)(t)},[l&&e.name?.length?((0,r.uX)(),(0,r.CE)("a",{key:0,href:"?photographer="+e.id,onClick:(0,n.D$)(t=>{return a=e.id,void(h.currentPhotographerId=a);var a},["prevent"])},[(0,r.Lk)("span",{textContent:(0,o.v_)(e[t]??a??"")},null,8,X)],8,_)):((0,r.uX)(),(0,r.CE)("span",{key:1,textContent:(0,o.v_)(e[t]??a??"")},null,8,w))],2)),64))]))),256))])])]))}}),S=(0,p.A)(T,[["__scopeId","data-v-2a129931"]]);var W=a("e90e17db7b7ac076");const D={class:"photographerArea"},$={key:0,class:"photographerDescription"},A=["textContent"],U=["innerHTML"],H=["textContent"],M=["textContent"],N={class:"photographerInfo"},F={class:"photographerSelect"},K=["textContent"],Q=["textContent"],V={class:"contact-information"},B={key:1,class:"back-to-search"},R=["href"],j={name:"PhotographerInfo",props:{searchUrl:String,showTable:{type:Boolean,default:()=>!1}},computed:{...(0,m.aH)(f,["photographersList"]),...(0,m.aH)(y,["hasCurrentPhotographer","currentPhotographerData","isReady"]),...(0,m.Us)(y,["currentPhotographerId"]),photographers(){return Object.fromEntries(this.photographersList?.map(e=>[e.id,e.name])??[])},selectedPhotographerId:{get(){return String(this.currentPhotographerId??"")},set(e){this.currentPhotographerId=parseInt(e,10)}},linkToSearchPage(){return this.searchUrl},photographerName(){const e=this.currentPhotographerData?.photographer?.name??"";return e.length?e:""},photographerDescriptionHtml(){const e=this.currentPhotographerData?.photographer?.de
1scription??"";return e.length?e:""},photographerContactInfo(){return this.currentPhotographerData?.contactInfo??[]}}},J=(0,r.pM)({...j,setup:e=>(t,a)=>(0,r.bo)(((0,r.uX)(),(0,r.CE)("div",D,[t.photographerName.length?((0,r.uX)(),(0,r.CE)("div",$,[(0,r.Lk)("h2",{textContent:(0,o.v_)(t.photographerName)},null,8,A),t.photographerDescriptionHtml?((0,r.uX)(),(0,r.CE)("div",{key:0,class:"descriptionArea",innerHTML:t.photographerDescriptionHtml},null,8,U)):((0,r.uX)(),(0,r.CE)("div",{key:1,textContent:(0,o.v_)(t.$t("No description added for this photographer yet"))},null,8,H))])):((0,r.uX)(),(0,r.CE)("div",{key:1,class:"emptyDescription",textContent:(0,o.v_)(t.$t("Select a photographer to show their information and uploaded images"))},null,8,M)),(0,r.Lk)("div",N,[(0,r.Lk)("div",F,[(0,r.Lk)("h3",{textContent:(0,o.v_)(t.$t("Select photographer"))},null,8,K),(0,r.bF)(W.default,{type:"select",class:"select-field",options:t.photographers,modelValue:t.selectedPhotographerId,"onUpdate:modelValue":a[0]||(a[0]=e=>t.selectedPhotographerId=e),searchable:""},null,8,["options","modelValue"])]),t.photographerContactInfo?.length?((0,r.uX)(),(0,r.CE)(r.FK,{key:0},[(0,r.Lk)("h3",{textContent:(0,o.v_)(t.$t("Info"))},null,8,Q),(0,r.Lk)("div",V,[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(t.photographerContactInfo,(e,t)=>((0,r.uX)(),(0,r.Wv)(u,{key:t,info:e,"info-type":t},null,8,["info","info-type"]))),128))])],64)):(0,r.Q3)("",!0),""!=e.searchUrl?((0,r.uX)(),(0,r.CE)("div",B,[(0,r.Lk)("a",{href:t.linkToSearchPage},(0,o.v_)(t.$t("Back to search")),9,R)])):(0,r.Q3)("",!0)]),e.showTable&&!t.hasCurrentPhotographer?((0,r.uX)(),(0,r.Wv)(S,{key:2,class:"photographer-list"})):(0,r.Q3)("",!0)],512)),[[n.aG,t.isReady]])}),O=(0,p.A)(J,[["__scopeId","data-v-04f6a4d2"]]);var Y=a("c861cbd375870e0f"),G=a("7749e09743d3c598"),q=a("92c490e8e5efe9cd");const z={key:0},Z=["textContent"],ee={class:"media-items"},te={key:0,class:"back-to-search"},ae=["href"],re=["textContent"],oe={props:{searchUrl:{type:String,default:""},showTableValue:{type:String,default:()=>"no"}},computed:{showTable(){switch(this.showTableValue){case"as-admin":return!!this.isAdministrator;case"yes":return!0}return!1},...(0,m.aH)(f,["photographersList"]),...(0,m.aH)(b.B,["currentUrl"]),...(0,m.aH)(y,["hasCurrentPhotographer","currentPhotographerName","mediaItems"]),...(0,m.Us)(y,["currentPhotographerId"]),...(0,m.aH)(q.x,["isAdministrator"]),favouriteService:()=>G.A.getService("MediaItem"),photographers(){return Object.fromEntries(this.photographersList?.map(e=>[e.name,e.name])??[])},linkToSearchPage(){const e=new URLSearchParams({photographer:this.currentPhotographerId??"",sort_item:"most_popular",limit:"50"});return this.searchUrl+"&"+e.toString()}}},ne=(0,r.pM)({...oe,__name:"Block",setup:e=>(t,a)=>((0,r.uX)(),(0,r.CE)("section",null,[(0,r.bF)(O,{"search-url":e.searchUrl,"show-table":t.showTable},null,8,["search-url","show-table"]),t.hasCurrentPhotographer?((0,r.uX)(),(0,r.CE)(r.FK,{key:0},[0!=t.mediaItems.length?((0,r.uX)(),(0,r.CE)("div",z,[(0,r.Lk)("div",{class:"archive",textContent:(0,o.v_)(t.$t("Photographer archive"))},null,8,Z),(0,r.Lk)("div",ee,[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(t.mediaItems,e=>((0,r.uX)(),(0,r.Wv)(Y.A,{key:e.id,"favorite-service":t.favouriteService,"media-item":e,"is-selecting":!1},null,8,["favorite-service","media-item"]))),128))]),""!=e.searchUrl?((0,r.uX)(),(0,r.CE)("div",te,[(0,r.Lk)("a",{href:t.linkToSearchPage},(0,o.v_)(t.$t("See all from this photographer")),9,ae)])):(0,r.Q3)("",!0)])):((0,r.uX)(),(0,r.CE)("div",{key:1,class:"noMediaItems",textContent:(0,o.v_)(t.$t("Found no mediaitems for this photographer"))},null,8,re))],64)):(0,r.Q3)("",!0)]))}),he=(0,p.A)(ne,[["__scopeId","data-v-89e01940"]])}}]);
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.