import{A as M}from"./Anchor-DbUVFTxQ.js";import{_ as B,I as ne,u as ie}from"./ImageViewer-B7OLRv7S.js";import{cd as w,aX as y,aK as i,u as c,s as d,F as O,H as j,b9 as h,t as u,bH as s,I as r,ci as l,v as I,ch as g,aW as V,co as R,aV as T,av as J,cl as Q,at as se,au as re,a4 as oe,ar as _e,cg as U,aS as D,af as Y,aC as z,bC as G,bi as Z,cm as ce,cn as le,cp as de,cj as ue,cs as me,aQ as he,q as fe}from"./index-UvaAT40e.js";import{P as pe,F as K}from"./PlaceHolderImage-OI0HV4no.js";import{L as be}from"./LoadingSpinner-CRcacgcO.js";import{a as E,c as v}from"./triplestore-YmGWX4yk.js";import{V as ye}from"./ChildTreeSearchButton-C65ZPLlZ.js";const ge={name:"FormatedLink",components:{Anchor:M},props:{data:{type:Object,default:()=>{}},textAsLink:{type:Boolean,default:!1},anchorText:{type:String,default:""}},data:function(){return{sources:["descr_link","state_link"]}},computed:{intended:function(){return"px-"+(2+this.intend)},anchor_label:function(){return this.anchorText?this.anchorText:this.data.alt?this.data.alt:this.data.name?this.data.name:this.host(this.data.uri)},has_plain_text:function(){return this.anchorText||this.data.descr},plain_text:function(){return this.anchorText?this.anchorText:this.data.descr?this.data.descr:""},has_something_to_show:function(){return this.data&&this.data.uri||this.anchorText||this.data.descr}},methods:{host:function(e){return new URL(e).hostname}}},Pe={key:0,class:"not_formated_link"};function Ie(e,t,a,o,n,_){const m=y("Anchor");return _.has_something_to_show?(i(),c("span",Pe,[a.data&&a.data.uri?(i(),d(m,{key:0,text:_.anchor_label,url:a.data.uri,"text-as-link":a.textAsLink},null,8,["text","url","text-as-link"])):_.has_plain_text?(i(),c(O,{key:1},[j(h(_.plain_text),1)],64)):u("",!0)])):u("",!0)}const W=w(ge,[["render",Ie]]),je={components:{FormatedLink:W,Dating:B},props:{data:{type:Object,default:()=>{}},headline:{type:String,default:"legal_status.record"},cols:{type:Array,default:()=>[]},isEditor:{type:Boolean,default:!1},useDefaultLicense:{type:Boolean,default:!1},noLicense:{type:Boolean,default:!1},isCreation:{type:Boolean,default:!1}},data(){return{default_license:{name:"CC BY-NC-SA 4.0",uri:"http://creativecommons.org/licenses/by-nc-sa/4.0"}}},computed:{label_person(){return this.isEditor?"legal_status.editor":"legal_status.rightholder"},label_dating(){return this.isCreation?"legal_status.created":"legal_status.dating"},license_link(){if(this.data&&this.data.license){if(this.data.license.uri)return this.data.license;if(typeof this.data.license=="string")return{name:this.data.license,uri:""}}return{name:"",uri:""}}}},ke={key:0,class:"legal-status"};function Ee(e,t,a,o,n,_){const m=y("FormatedLink"),p=y("Dating");return a.data?(i(),c("div",ke,[a.headline?(i(),d(g,{key:0,dense:"",align:"center"},{default:s(()=>[r(l,null,{default:s(()=>[I("h5",null,h(e.$t(a.headline)),1)]),_:1})]),_:1})):u("",!0),a.data.rightholder?(i(),d(g,{key:1,dense:"",align:"center"},{default:s(()=>[r(l,{cols:a.cols[0]},{default:s(()=>[I("h5",null,h(e.$t(_.label_person))+":",1)]),_:1},8,["cols"]),r(l,{cols:a.cols[1]},{default:s(()=>[j(h(a.data.rightholder),1)]),_:1},8,["cols"])]),_:1})):u("",!0),a.data.credit_line?(i(),d(g,{key:2,dense:"",align:"center"},{default:s(()=>[r(l,{cols:a.cols[0]},{default:s(()=>[I("h5",null,h(e.$t("legal_status.credits"))+":",1)]),_:1},8,["cols"]),r(l,{cols:a.cols[1]},{default:s(()=>[j(h(a.data.credit_line),1)]),_:1},8,["cols"])]),_:1})):u("",!0),a.data.link?(i(),d(g,{key:3,dense:"",align:"center"},{default:s(()=>[r(l,{cols:a.cols[0]},{default:s(()=>[I("h5",null,h(e.$t("legal_status.link"))+":",1)]),_:1},8,["cols"]),r(l,{cols:a.cols[1]},{default:s(()=>[r(m,{data:a.data.link,"text-as-link":""},null,8,["data"])]),_:1},8,["cols"])]),_:1})):u("",!0),a.data.dating?(i(),d(g,{key:4,dense:"",align:"center"},{default:s(()=>[r(l,{cols:a.cols[0]},{default:s(()=>[I("h5",null,h(e.$t(_.label_dating))+":",1)]),_:1},8,["cols"]),r(l,{cols:a.cols[1]},{default:s(()=>[r(p,{data:a.data.dating},null,8,["data"])]),_:1},8,["cols"])]),_:1})):u("",!0),a.data.note?(i(),d(g,{key:5,dense:"",align:"center"},{default:s(()=>[r(l,{cols:a.cols[0]},{default:s(()=>[I("h5",null,h(e.$t("legal_status.changes"))+":",1)]),_:1},8,["cols"]),r(l,{cols:a.cols[1]},{default:s(()=>[j(h(a.data.note),1)]),_:1},8,["cols"])]),_:1})):u("",!0),a.data.license&&!a.noLicense?(i(),d(g,{key:6,dense:"",align:"center"},{default:s(()=>[r(l,{cols:a.cols[0]},{default:s(()=>[I("h5",null,h(e.$t("legal_status.license"))+":",1)]),_:1},8,["cols"]),a.useDefaultLicense?a.useDefaultLicense?(i(),d(l,{key:1,cols:a.cols[1]},{default:s(()=>[r(m,{data:n.default_license,"anchor-text":n.default_license.name},null,8,["data","anchor-text"])]),_:1},8,["cols"])):u("",!0):(i(),d(l,{key:0,cols:a.cols[1]},{default:s(()=>[r(m,{data:_.license_link,"anchor-text":_.license_link.name},null,8,["data","anchor-text"])]),_:1},8,["cols"]))]),_:1})):u("",!0)])):u("",!0)}const ee=w(je,[["render",Ee],["__scopeId","data-v-229957c7"]]),$=` BASE <https://db.antiquitatum-thesaurus.eu> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX crm: <http://www.cidoc-crm.org/cidoc-crm/> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX at: <https://db.antiquitatum-thesaurus.eu/ontology/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> `,A={async object_exists(e){let t=` ${$} ASK { <object/${e}> a crm:E24_Physical_Human-Made_Thing } `;return{exists:(await E(t)).boolean||!1}},async has_bibliography(e){let t=` ${$} ASK { <object/${e}> crm:P01i_is_domain_of / crm:P67.1_has_type <type/bibliographic_reference> . } `;return{exists:(await E(t)).boolean||!1}},async has_external_references(e){let t=` ${$} ASK { <object/${e}> crm:P01i_is_domain_of / crm:P67.1_has_type <type/external_reference> . } `;return{exists:(await E(t)).boolean||!1}},async has_base_facts(e){let t=` ${$} ASK { VALUES ?o { <object/${e}> } { ?o crm:P2_has_type ?x } UNION { ?o crm:P128_carries ?x } UNION { ?o crm:P67i_is_referred_to_by ?x . ?o crm:P2_has_type <type/description> . } UNION { ?o crm:P45_consists_of ?x . } UNION { ?o crm:P44_has_condition ?x .} UNION { ?o crm:P39i_was_measured_by ?x .} } `;return{exists:(await E(t)).boolean||!1}},async is_deleted(e){let t=` ${$} ASK { <object/${e}> crm:P67i_is_referred_to_by / crm:P93i_was_taken_out_of_existence_by / crm:P2_has_type <type/deleting> } `;return{is_deleted:(await E(t)).boolean||!1}},async load_forward_id_if_exists(e,t){let a=` ${$} PREFIX dcterms: <http://purl.org/dc/terms/> SELECT ?fwd_id WHERE { <object/${e}> crm:P67i_is_referred_to_by / crm:P93i_was_taken_out_of_existence_by / dcterms:isReplacedBy ?fwd_id . } `;try{let o=await E(a,t);return v(o,{forward_iri:"fwd_id"})}catch(o){if(o.name=="AbortError")return null;throw o}},async get_title(e,t,a){let o=` ${$} SELECT DISTINCT * WHERE { BIND (${e} as ?id) # title <object/${e}> crm:P1_is_identified_by ?title . ?title a crm:E41_Appellation . ?title crm:P190_has_symbolic_content ?title_text . ?title crm:P2_has_type ?title_type . ?title_type rdfs:label ?title_type_label . FILTER (lang(?title_type_label) = "${t}") OPTIONAL { ?title crm:P141i_was_assigned_by / crm:P16_used_specific_object / crm:P1_is_identified_by / crm:P190_has_symbolic_content ?source . } }`;try{let n=await E(o,{signal:a});return v(n,{id:"id",title:[{value:"title_text",type:"title_type",type_label:"title_type_label",sources:[{name:"source"}]}]})}catch(n){if(n.name=="AbortError")return null;throw n}},async get_preferred_title(e,t,a){var n;let o=` ${$} SELECT DISTINCT ?title_text WHERE { <object/${e}> crm:P1_is_identified_by ?title . ?title crm:P2_has_type <type/preferred_title> . ?title crm:P190_has_symbolic_content ?title_text . FILTER (lang(?title_text) = "${t}") }`;try{return(n=(await E(o,{signal:a})).results.bindings[0])==null?void 0:n.title_text.value}catch(_){if(_.name=="AbortError")return null;throw _}},async get_custody(e,t,a){let o=` ${$} SELECT DISTINCT ?id ?acqui_type ?location_name ?acqui_custody_gnd ?acqui_custody ?acqui_dating_begin ?acqui_dating_end ?acqui_date_note ?acqui_context ?inv_no_id ?inv_no WHERE { BIND (${e} as ?id) # acquisition <object/${e}> crm:P30i_custody_transferred_through ?custody_transfer . ?custody_transfer crm:P2_has_type <type/acquisition> . ?custody_transfer crm:P29_custody_received_by ?acqui_custody . ?acqui_custody crm:P1_is_identified_by / crm:P190_has_symbolic_content ?location_name . OPTIONAL { ?acqui_custody owl:sameAs ?acqui_custody_gnd . } OPTIONAL { ?custody_transfer crm:P2_has_type ?t . ?t rdfs:label ?acqui_type . FILTER NOT EXISTS {?t owl:sameAs ?x} FILTER (lang(?acqui_type) = "${t}") } OPTIONAL { ?custody_transfer crm:P4_has_time-span ?time_span . ?time_span crm:P82a_begin_of_the_beginning ?acqui_dating_begin . ?time_span crm:P82b_end_of_the_end ?acqui_dating_end . } OPTIONAL { ?custody_transfer crm:P4_has_time-span / crm:P3_has_note ?acqui_date_note . } OPTIONAL{ ?custody_transfer crm:P3_has_note ?acqui_context . } }`;try{let n=await E(o,{signal:a});return v(n,{id:"id",custody:{type:"acqui_type",location:{name:"location_name",iri:"acqui_custody",gnd:"acqui_custody_gnd"},dating:{from_date:"acqui_dating_begin",to_date:"acqui_dating_end",text:"acqui_date_note"},note:"acqui_context"}})}catch(n){if(n.name=="AbortError")return null;throw n}},async get_provenances(e,t){let a=` ${$} SELECT ?id ?prov ?prov_note ?place ?place_name ?place_gnd ?custodian_name ?custodian ?custodian_type ?custodian_gnd ?dating WHERE { BIND (${e} as ?id) <object/${e}> crm:P30i_custody_transferred_through ?prov . ?prov crm:P2_has_type <type/provenance> . OPTIONAL { ?prov crm:P3_has_note ?prov_note . } OPTIONAL { ?prov crm:P9_consists_of ?move . ?move crm:P26_moved_to|crm:P27_moved_from ?place . ?place crm:P1_is_identified_by / crm:P190_has_symbolic_content ?place_name . OPTIONAL { ?place owl:sameAs ?place_gnd . } } OPTIONAL { ?prov crm:P29_custody_received_by|crm:P28_custody_surrendered_by ?custodian . ?custodian a ?crm_type . BIND( if( ?crm_type = crm:E21_Person, "person", "actor") as ?custodian_type ) . ?custodian crm:P1_is_identified_by / crm:P190_has_symbolic_content ?custodian_name . OPTIONAL { ?custodian owl:sameAs ?custodian_gnd . } } OPTIONAL { ?prov crm:P175_starts_before_or_with_the_start_of|crm:P175i_starts_after_or_with_the_start_of ?prov_date . ?prov_date crm:P4_has_time-span / crm:P82a_begin_of_the_beginning ?dating } } ORDER BY ?dating `;try{let o=await E(a,{signal:t});return v(o,{id:"id",provenances:[{iri:"prov",note:"prov_note",place:{iri:"place",name:"place_name",gnd:"place_gnd"},custodian:{name:"custodian_name",type:"custodian_type",iri:"custodian",gnd:"custodian_gnd"},dating:{from_date:"dating",to_date:"dating"}}]})}catch(o){if(o.name=="AbortError")return null;throw o}},async get_inventory_no(e,t){let a=` ${$} SELECT ?pref_inv_no ?inv_no_id ?inv_no WHERE { <object/${e}> crm:P48_has_preferred_identifier ?pref_inv_no_id . ?pref_inv_no_id a crm:E42_Identifier . ?pref_inv_no_id crm:P190_has_symbolic_content ?pref_inv_no . OPTIONAL { <object/${e}> crm:P1_is_identified_by ?inv_no_id . ?inv_no_id a crm:E42_Identifier . ?inv_no_id crm:P190_has_symbolic_content ?inv_no . } }`;try{let o=await E(a,{signal:t});return v(o,{cur_inv_no:"pref_inv_no",old_inv_nos:[{inv_id:"inv_no_id",inv_no:"inv_no"}]})}catch(o){if(o.name=="AbortError")return null;throw o}},async get_location(e,t){let a=` ${$} SELECT DISTINCT ?id ?location ?location_name ?location_gnd WHERE { BIND (${e} as ?id) # location <object/${e}> crm:P55_has_current_location ?location . ?location crm:P1_is_identified_by / crm:P190_has_symbolic_content ?location_name . OPTIONAL { ?location owl:sameAs ?location_gnd . } }`;try{let o=await E(a,{signal:t});return v(o,{id:"id",location:{iri:"location",name:"location_name",gnd:"location_gnd"}})}catch(o){if(o.name=="AbortError")return null;throw o}},async get_production(e,t,a){let o=` ${$} SELECT DISTINCT ?id ?prod_note ?date_from ?date_to ?date_note ?artist ?artist_name ?artist_attribution_label ?artist_role ?artist_gnd ?place ?place_name ?place_gnd ?prod_technique_name ?prod_technique_gnd ?commission_date_from ?commission_date_to ?commission_date_note ?commissioner ?commissioner_name ?commissioner_gnd ?commission_note ?technic WHERE { BIND (${e} as ?id) # production <object/${e}> crm:P108i_was_produced_by ?production . OPTIONAL { ?production crm:P3_has_note ?prod_note . } OPTIONAL { ?production crm:P4_has_time-span / crm:P82a_begin_of_the_beginning ?date_from . ?production crm:P4_has_time-span / crm:P82b_end_of_the_end ?date_to . } OPTIONAL { ?production crm:P4_has_time-span / crm:P3_has_note ?date_note . } OPTIONAL { ?production crm:P01i_is_domain_of ?artist_in_role . ?artist_in_role crm:P02_has_range ?artist . ?artist crm:P1_is_identified_by / crm:P190_has_symbolic_content ?artist_name . ?artist_in_role crm:P14.1_in_the_role_of / rdfs:label ?artist_role . FILTER (lang(?artist_role) = "${t}") OPTIONAL { ?artist owl:sameAs ?artist_gnd . } OPTIONAL { ?artist crm:P141i_was_assigned_by ?assessment . ?assessment crm:P140_assigned_attribute_to ?production ; crm:P2_has_type / rdfs:label ?artist_attribution_label . FILTER (lang(?artist_attribution_label) = "${t}") } } OPTIONAL { ?production crm:P7_took_place_at ?place . ?place crm:P1_is_identified_by / crm:P190_has_symbolic_content ?place_name . OPTIONAL { ?place owl:sameAs ?place_gnd . } } OPTIONAL { ?production crm:P32_used_general_technique ?technic . ?technic rdfs:label ?prod_technique_name . OPTIONAL { ?technic owl:sameAs ?prod_technique_gnd . } FILTER (lang(?prod_technique_name) = "${t}") } OPTIONAL { ?production crm:P17_was_motivated_by ?motivation . OPTIONAL { ?motivation crm:P3_has_note ?commission_note . } OPTIONAL { ?motivation crm:P01i_is_domain_of / crm:P02_has_range ?commissioner . ?commissioner crm:P1_is_identified_by / crm:P190_has_symbolic_content ?commissioner_name . ?commissioner owl:sameAs ?commissioner_gnd . } OPTIONAL { ?motivation crm:P4_has_time-span / crm:P82a_begin_of_the_beginning ?commission_date_from . ?motivation crm:P4_has_time-span / crm:P82b_end_of_the_end ?commission_date_to . } OPTIONAL { ?motivation crm:P4_has_time-span / crm:P3_has_note ?commission_date_note . } } }`;try{let n=await E(o,{signal:a});return v(n,{id:"id",production:{prod_note:"prod_note",dating:{from_date:"date_from",to_date:"date_to",text:"date_note"},artists:[{iri:"artist",name:"artist_name",role:"artist_role",attribution:"artist_attribution_label",gnd:"artist_gnd"}],locations:[{iri:"place",name:"place_name",gnd:"place_gnd"}],technics:[{iri:"technic",name:"prod_technique_name",gnd:"prod_technique_gnd"}],commission:{dating:{from_date:"commission_date_from",to_date:"commission_date_to",text:"commission_date_note"},commissioner:[{iri:"commissioner",name:"commissioner_name",gnd:"commissioner_gnd"}],note:"commission_note"}}})}catch(n){if(n.name=="AbortError")return null;throw n}},async get_depiction_method(e,t,a){let o=` ${$} SELECT DISTINCT ?mode ?mode_label WHERE { <object/${e}> crm:P01i_is_domain_of ?depicts . ?depicts a crm:PC62_depicts . ?depicts crm:P62.1_mode_of_depiction ?mode . ?mode rdfs:label ?mode_label . FILTER (lang(?mode_label) = "${t}") } ORDER BY ?mode_label`;try{let n=await E(o,{signal:a});const _=v(n,{modes:[{iri:"mode",name:"mode_label"}]});return _.id=e,_}catch(n){if(n.name=="AbortError")return null;throw n}},async get_depiction_content(e,t,a){let o=` ${$} SELECT DISTINCT * WHERE { <object/${e}> crm:P62_depicts ?depiction . ?depiction a ?type_of_depicted_object . ?depiction crm:P1_is_identified_by / crm:P190_has_symbolic_content ?depicted_object_name . OPTIONAL { ?depiction owl:sameAs ?gnd } }`;try{let n=await E(o,{signal:a});const _=v(n,{depictions:[{iri:"depiction",gnd:"gnd",type:"type_of_depicted_object",name:"depicted_object_name"}]});return _.id=e,_}catch(n){if(n.name=="AbortError")return null;throw n}},async get_materials(e,t,a){let o=` ${$} SELECT DISTINCT ?id ?mat_label ?mat_gnd ?material WHERE { BIND (${e} as ?id) # material <object/${e}> crm:P45_consists_of ?material . ?material rdfs:label ?mat_label . FILTER (lang(?mat_label) = "${t}") OPTIONAL { ?material owl:sameAs ?mat_gnd } }`;try{let n=await E(o,{signal:a});return v(n,{id:"id",materials:[{iri:"material",name:"mat_label",gnd:"mat_gnd"}]})}catch(n){if(n.name=="AbortError")return null;throw n}},async get_descriptions(e,t,a="description",o){let n=` ${$} SELECT ?id ?type_label ?comment ?comment_lang ?name_label ?url WHERE { BIND (${e} as ?id) <object/${e}/${a}> crm:P2_has_type / rdfs:label ?type_label . FILTER (lang(?type_label) = "${t}") <object/${e}/${a}> crm:P190_has_symbolic_content ?comment . BIND(lang(?comment) AS ?comment_lang) OPTIONAL { <object/${e}/${a}> crm:P141i_was_assigned_by / crm:P16_used_specific_object ?source_base . BIND(IRI(CONCAT(STR(?source_base), '/name')) AS ?name_iri) BIND(IRI(CONCAT(STR(?source_base), '/url')) AS ?url_iri) OPTIONAL { ?name_iri crm:P190_has_symbolic_content ?name_label . } OPTIONAL { ?url_iri crm:P190_has_symbolic_content ?url . } } }`;try{let _=await E(n,{signal:o});return v(_,{id:"id",descriptions:[{type:"type_label",note:"comment",language:"comment_lang",assignments:[{name:"name_label",link:{uri:"url"}}]}]})}catch(_){if(_.name=="AbortError")return null;throw _}},async get_condition(e,t,a){let o=` ${$} SELECT DISTINCT ?id ?condition ?condition_source ?web_link_text ?web_link_url WHERE { BIND (${e} as ?id) # condition <object/${e}/condition> crm:P3_has_note ?condition . FILTER (lang(?condition) = "${t}") OPTIONAL { <object/${e}/condition/assessment> crm:P3_has_note ?condition_source . } OPTIONAL { <object/${e}/condition/assessment/reference/name> crm:P190_has_symbolic_content ?web_link_text . <object/${e}/condition/assessment/reference/url> crm:P190_has_symbolic_content ?web_link_url . } }`;try{let n=await E(o,{signal:a});return v(n,{id:"id",condition:{note:"condition",source_note:"condition_source",source:{name:"web_link_text",uri:"web_link_url"}}})}catch(n){if(n.name=="AbortError")return null;throw n}},async get_measurements(e,t,a){let o=` ${$} SELECT ?id ?meas_id ?val ?unit_name ?symbol ?type_label ?dim_descr (GROUP_CONCAT(?note;SEPARATOR=",") AS ?notes) WHERE { BIND (${e} as ?id) <object/${e}> crm:P39i_was_measured_by ?meas . BIND (STRAFTER(STR(?meas), 'measurements/') as ?meas_id) ?meas crm:P40_observed_dimension ?dim . OPTIONAL { ?meas crm:P3_has_note ?note . } OPTIONAL { ?dim rdfs:label ?dim_descr . } OPTIONAL { ?dim crm:P90_has_value ?val . ?dim crm:P2_has_type / rdfs:label ?type_label . ?dim crm:P91_has_unit ?dim_unit . ?dim_unit rdfs:label ?unit_name . OPTIONAL { ?dim_unit crm:P48_has_preferred_identifier / crm:P190_has_symbolic_content ?symbol . } FILTER (lang(?unit_name) = "${t}") FILTER (lang(?type_label) = "${t}") } } GROUP BY ?meas_id ?type_label ?val ?unit_name ?symbol ?dim_descr ?id ORDER BY ?type_label`;try{let n=await E(o,{signal:a}),_=v(n,{id:"id",measurements:[{id:"meas_id",type:"type_label",value:"val",unit:"unit_name",unit_symbol:"symbol",descr:"dim_descr",notes:"notes"}]});if(!_.measurements)return _;let m=[];for(let p of _.measurements){let b=m.find(f=>f.id==p.id);b||(b={id:p.id,measures:[],notes:p.notes},m.push(b)),delete p.id,delete p.notes,b.measures.push({...p})}return _.measurements=m,_}catch(n){if(n.name=="AbortError")return null;throw n}},async get_inscriptions(e,t){let a=` ${$} SELECT ?id ?insc_text ?descr_note_text ?pos_note_text WHERE { BIND (${e} as ?id) # inscriptions <object/${e}> crm:P128_carries ?insc . ?insc crm:P190_has_symbolic_content ?insc_text . BIND(IRI(CONCAT(STR(?insc), '/description')) AS ?descr_note) BIND(IRI(CONCAT(STR(?insc), '/position')) AS ?pos_note) OPTIONAL{ ?descr_note crm:P190_has_symbolic_content ?descr_note_text . } OPTIONAL { ?pos_note crm:P190_has_symbolic_content ?pos_note_text . } }`;try{let o=await E(a,{signal:t});return v(o,{id:"id",inscriptions:[{text:"insc_text",descr_text:"descr_note_text",pos_text:"pos_note_text"}]})}catch(o){if(o.name=="AbortError")return null;throw o}},async get_types(e,t,a){let o=` ${$} SELECT DISTINCT ?id ?type ?type_label ?type_gnd ?type_type ?type_type_label WHERE { BIND (${e} as ?id) # types <object/${e}> crm:P2_has_type ?type . ?type rdfs:label ?type_label . ?type crm:P2_has_type ?type_type . OPTIONAL { ?type owl:sameAs ?type_gnd . } ?type_type rdfs:label ?type_type_label . FILTER (lang(?type_label) = "${t}") FILTER (lang(?type_type_label) = "${t}") FILTER(?type_type in (<type/classification>, <type/object_type>)) } ORDER BY ?type_type ?type_label`;try{let n=await E(o,{signal:a});return v(n,{id:"id",types:[{iri:"type",name:"type_label",gnd:"type_gnd",type_of_type_iri:"type_type",type_of_type:"type_type_label"}]})}catch(n){if(n.name=="AbortError")return null;throw n}},async get_modifications(e,t,a){let o=` ${$} SELECT DISTINCT ?id ?mod ?note ?date_from ?date_to ?date_note ?artist ?artist_name ?artist_role ?artist_gnd ?artist_attribution_label ?technique ?technique_name ?technique_gnd ?mat_label ?mat_gnd WHERE { BIND (${e} as ?id) # inscriptions <object/${e}> crm:P31i_was_modified_by ?mod . ?mod a crm:E11_Modification . OPTIONAL { ?mod crm:P4_has_time-span ?dating OPTIONAL { ?dating crm:P82a_begin_of_the_beginning ?date_from . ?dating crm:P82b_end_of_the_end ?date_to . } OPTIONAL { ?dating crm:P3_has_note ?date_note . } } OPTIONAL { ?mod crm:P3_has_note ?note FILTER (lang(?note) = "${t}") } OPTIONAL { ?mod crm:P01i_is_domain_of ?artist_in_role . ?artist_in_role crm:P02_has_range ?artist . ?artist crm:P1_is_identified_by / crm:P190_has_symbolic_content ?artist_name . ?artist_in_role crm:P14.1_in_the_role_of / rdfs:label ?artist_role . FILTER (lang(?artist_role) = "${t}") OPTIONAL { ?artist owl:sameAs ?artist_gnd } OPTIONAL { ?artist crm:P141i_was_assigned_by ?assessment . ?assessment crm:P140_assigned_attribute_to ?mod ; crm:P2_has_type / rdfs:label ?artist_attribution_label . FILTER (lang(?artist_attribution_label) = "${t}") } } OPTIONAL { ?mod crm:P32_used_general_technique ?technique . ?technique rdfs:label ?technique_name . FILTER (lang(?technique_name) = "${t}") OPTIONAL { ?technique owl:sameAs ?technique_gnd . } } OPTIONAL { ?mod crm:P126_employed ?material . ?material rdfs:label ?mat_label . FILTER (lang(?mat_label) = "${t}") OPTIONAL { ?material owl:sameAs ?mat_gnd } } }`;try{let n=await E(o,{signal:a});return v(n,{id:"id",modifications:[{id:"mod",note:"note",dating:{from_date:"date_from",to_date:"date_to",text:"date_note"},artists:[{iri:"artist",name:"artist_name",role:"artist_role",attribution:"artist_attribution_label",gnd:"artist_gnd"}],technics:[{iri:"technique",name:"technique_name",gnd:"technique_gnd"}],materials:[{iri:"material",name:"mat_label",gnd:"mat_gnd"}]}]})}catch(n){if(n.name=="AbortError")return null;throw n}},async get_find(e,t,a){let o=` ${$} SELECT DISTINCT ?id ?note ?date_from ?date_to ?date_note ?artist ?artist_name ?artist_role ?artist_gnd ?place ?place_name ?place_gnd WHERE { BIND (${e} as ?id) <object/${e}/find> a crm:S19_Encounter_Event . OPTIONAL { <object/${e}/find> crm:P3_has_note ?note . } OPTIONAL { <object/${e}/find> crm:P7_took_place_at ?place . ?place crm:P1_is_identified_by / crm:P190_has_symbolic_content ?place_name . OPTIONAL { ?place owl:sameAs ?place_gnd . } } OPTIONAL { <object/${e}/find/dating> crm:P82a_begin_of_the_beginning ?date_from . <object/${e}/find/dating> crm:P82b_end_of_the_end ?date_to . } OPTIONAL { <object/${e}/find/dating> crm:P3_has_note ?date_note . } OPTIONAL { <object/${e}/find> crm:P01i_is_domain_of ?artist_in_role . ?artist_in_role crm:P02_has_range ?artist . ?artist crm:P1_is_identified_by / crm:P190_has_symbolic_content ?artist_name . ?artist_in_role crm:P14.1_in_the_role_of / rdfs:label ?artist_role . FILTER (lang(?artist_role) = "${t}") OPTIONAL { ?artist owl:sameAs ?artist_gnd . } } }`;try{let n=await E(o,{signal:a});return v(n,{id:"id",find:{note:"note",dating:{from_date:"date_from",to_date:"date_to",text:"date_note"},artists:[{iri:"artist",name:"artist_name",role:"artist_role",gnd:"artist_gnd"}],location:{iri:"place",name:"place_name",gnd:"place_gnd"}}})}catch(n){if(n.name=="AbortError")return null;throw n}},async get_external_reference(e,t,a){let o=` ${$} SELECT DISTINCT ?id ?type_label ?link ?note WHERE { BIND (${e} as ?id) <object/${e}> crm:P01i_is_domain_of ?domain . ?domain crm:P67.1_has_type <type/external_reference> . ?domain crm:P02_has_range ?external_ref . ?external_ref crm:P190_has_symbolic_content ?link . ?external_ref crm:P3_has_note ?note . ?external_ref crm:P2_has_type / rdfs:label ?type_label . FILTER (lang(?type_label) = "${t}") }`;try{let n=await E(o,{signal:a});return v(n,{id:"id",references:[{ref_type:"type_label",ref_source:"note",ref_link:"link"}]})}catch(n){if(n.name=="AbortError")return null;throw n}},async get_bibliographic_reference(e,t){let a=` ${$} SELECT DISTINCT ?id ?link ?bib_citation ?bib_note ?access_date WHERE { BIND (${e} as ?id) <object/${e}> crm:P01i_is_domain_of ?domain . ?domain crm:P67.1_has_type <type/bibliographic_reference> . ?domain crm:P02_has_range ?bib_ref . OPTIONAL { ?bib_ref crm:P48_has_preferred_identifier ?pref_id . ?pref_id crm:P190_has_symbolic_content ?link . OPTIONAL { ?pref_id crm:P3_has_note ?bib_citation . } } OPTIONAL { ?bib_ref crm:P3_has_note ?bib_note . } OPTIONAL { ?bib_ref crm:P94i_was_created_by / crm:P4_has_time_span / crm:P82_at_some_time_within ?access_date .} } ORDER BY ?bib_ref ?bib_citation ?bib_note`;try{let o=await E(a,{signal:t});return v(o,{id:"id",bib_refs:[{bib_ref_note:"bib_note",access_date:{from:"access_date"},citation:"bib_citation",link:{uri:"link"}}]})}catch(o){if(o.name=="AbortError")return null;throw o}},async get_dating_for_object(e,t){const a=` ${$} SELECT ?obj ?date_from ?date_to (count(?mid) as ?distance) { VALUES ?obj {<${e}>} { ?obj crm:P108i_was_produced_by / crm:P4_has_time-span ?time . ?time crm:P82a_begin_of_the_beginning ?date_from ; crm:P82b_end_of_the_end ?date_to . } UNION { ?obj crm:P46i_forms_part_of* ?mid . ?mid crm:P46i_forms_part_of+ ?final . ?final crm:P108i_was_produced_by / crm:P4_has_time-span ?time . ?time crm:P82a_begin_of_the_beginning ?date_from; crm:P82b_end_of_the_end ?date_to . } } GROUP BY ?time ?date_from ?date_to ?obj ORDER BY ?distance LIMIT 1 `;try{let o=await E(a,{signal:t});const n=v(o,{dating:{from:"date_from",to:"date_to"}});return n.obj=e,n}catch(o){if(o.name=="AbortError")return null;throw o}},async _get_internal_relations_base(e,t,a,o="?title"){let n=` ${$} SELECT ?id ?obj WHERE { BIND (${e} as ?id) ${a} ?obj crm:P1_is_identified_by ?title_iri . ?title_iri crm:P2_has_type <type/preferred_title> ; crm:P190_has_symbolic_content ?title . } ORDER BY ${o} `;try{let _=await E(n,{signal:t});return v(_,{id:"id",relations:[{obj:"obj"}]})}catch(_){if(_.name=="AbortError")return null;throw _}},async get_depicted_relations(e,t){return this._get_internal_relations_base(e,t,`{ ?depicts crm:P02_has_range <object/${e}>. ?depicts a crm:PC62_depicts . ?obj crm:P01i_is_domain_of ?depicts . OPTIONAL { ?obj at:is_part_of_source_work / crm:P1_is_identified_by ?source_title_iri . ?source_title_iri crm:P2_has_type <type/preferred_title> ; crm:P190_has_symbolic_content ?source_title . } }`,"?source_title ?title")},async get_depicts_relations(e,t){return this._get_internal_relations_base(e,t,` <object/${e}> crm:P01i_is_domain_of ?depicts . ?depicts a crm:PC62_depicts . ?depicts crm:P02_has_range ?obj . ?obj a crm:E24_Physical_Human-Made_Thing . `)},async get_duplicate_relations(e,t){return this._get_internal_relations_base(e,t,`<object/${e}> crm:P01i_is_domain_of ?rel. ?rel crm:P130.1_kind_of_similarity <type/1641767> . ?rel crm:P02_has_range ?obj . `)},async get_has_version_relations(e,t){return this._get_internal_relations_base(e,t,` ?rel crm:P130.1_kind_of_similarity <type/object_version> . ?rel crm:P01_has_domain <object/${e}> . ?rel crm:P02_has_range ?obj . `)},async get_is_version_of_relations(e,t){return this._get_internal_relations_base(e,t,` ?rel crm:P130.1_kind_of_similarity <type/object_version> . ?rel crm:P01_has_domain ?obj . ?rel crm:P02_has_range <object/${e}> . `)},async get_has_copy_relations(e,t){return this._get_internal_relations_base(e,t,` ?copies crm:P16.1_mode_of_use <type/original> ; crm:P02_has_range <object/${e}> ; crm:P01_has_domain ?production . ?production ^crm:P108i_was_produced_by ?obj . `)},async get_was_precursor_relations(e,t){return this._get_internal_relations_base(e,t,` ?copies crm:P16.1_mode_of_use <type/precursor> ; crm:P02_has_range <object/${e}> ; crm:P01_has_domain ?production . ?production ^crm:P108i_was_produced_by ?obj . `)},async get_is_copy_after_relations(e,t){return this._get_internal_relations_base(e,t,` ?source crm:P16.1_mode_of_use <type/original> ; crm:P02_has_range ?obj ; crm:P01_has_domain <object/${e}/production> . `)},async get_has_precursor_relations(e,t){return this._get_internal_relations_base(e,t,` ?source crm:P16.1_mode_of_use <type/precursor> ; crm:P02_has_range ?obj ; crm:P01_has_domain <object/${e}/production> . `)},async get_related_to_relations(e,t){return this._get_internal_relations_base(e,t,` <object/${e}> crm:P01i_is_domain_of ?rel. ?rel crm:P130.1_kind_of_similarity <type/1022295> . ?rel crm:P02_has_range ?obj . `)},async has_children(e,t){let a=` ${$} ASK { <object/${e}> crm:P46_is_composed_of ?part . } `;try{let o=await E(a,{signal:t});return{id:e,children:o.boolean||!1}}catch(o){if(o.name=="AbortError")return null;throw o}},async get_thumbnails(e,t){let a=` ${$} SELECT ?thumbnail_urls WHERE { <object/${e}> crm:P138i_has_representation / crm:P165i_is_incorporated_in ?image . ?image crm:P2_has_type <type/thumbnail> . ?image crm:P1_is_identified_by / crm:P190_has_symbolic_content ?thumbnail_urls . } `;try{let o=await E(a,{signal:t});return v(o,{thumbnails:[{url:"thumbnail_urls"}]})}catch(o){if(o.name=="AbortError")return null;throw o}},async get_children(e,t){let a=` ${$} SELECT ?id ?part ?title ?sort_title_num (SAMPLE(?thumbnail_urls) as ?thumbnail) (isIRI(SAMPLE(?sub_part)) AS ?has_child) WHERE { BIND (${e} as ?id) <object/${e}> crm:P46_is_composed_of ?part . ?part crm:P1_is_identified_by ?title_iri . ?title_iri crm:P2_has_type <type/preferred_title> . ?title_iri crm:P190_has_symbolic_content ?title . BIND(REPLACE(?title, "[^\\\\d+*]", "") AS ?sort_title_num) OPTIONAL { ?part crm:P46_is_composed_of+ ?sub_part . ?sub_part crm:P1_is_identified_by ?sub_title_iri . ?sub_title_iri crm:P2_has_type <type/preferred_title> . ?sub_title_iri crm:P190_has_symbolic_content ?sub_title . } OPTIONAL { ?part crm:P138i_has_representation ?vi . ?vi at:has_sorting_index "1"^^xsd:int ; crm:P165i_is_incorporated_in ?image . ?image crm:P2_has_type <type/thumbnail> . ?image crm:P1_is_identified_by / crm:P190_has_symbolic_content ?thumbnail_urls . } } GROUP BY ?part ?title ?sort_title_num ?id ORDER BY ?sort_title_num ?title ?sub_title `;try{let o=await E(a,{signal:t});return v(o,{id:"id",children:[{iri:"part",title:"title",has_child:"has_child",images:[{url:"thumbnail"}]}]})}catch(o){if(o.name=="AbortError")return null;throw o}},async get_related_artefacts(e,t){let a=` ${$} SELECT DISTINCT ?id ?artefact WHERE { BIND (${e} as ?id) <object/${e}> crm:P46_is_composed_of+ ?part . ?part crm:P01i_is_domain_of ?depicts . ?depicts a crm:PC62_depicts . ?depicts crm:P02_has_range ?artefact . ?artefact a crm:E24_Physical_Human-Made_Thing . } `;try{let o=await E(a,{signal:t});return v(o,{id:"id",artefacts:["artefact"]})}catch(o){if(o.name=="AbortError")return null;throw o}},async get_cataloging_data(e,t){let a=` ${$} PREFIX dcterms: <http://purl.org/dc/terms/> SELECT ?id ?editor_name ?note ?dating ?license_name ?license_iri ?type WHERE { BIND (${e} as ?id) { <object/${e}/cataloging> crm:P94i_was_created_by ?cat . ?cat crm:P2_has_type <type/cataloging> . BIND('creation' as ?type) } UNION { <object/${e}/cataloging> crm:P140i_was_attributed_by ?cat . ?cat crm:P2_has_type <type/cataloging> . BIND('editing' as ?type) } UNION { <object/${e}/cataloging> crm:P93i_was_taken_out_of_existence_by ?cat . ?cat crm:P2_has_type <type/deleting> . BIND('deleted' as ?type) } ?cat crm:P01i_is_domain_of / crm:P02_has_range ?editors . ?editors crm:P1_is_identified_by / crm:P190_has_symbolic_content ?editor_name . OPTIONAL { ?cat crm:P3_has_note ?note . } OPTIONAL { ?cat crm:P4_has_time-span / crm:P82a_begin_of_the_beginning ?dating . } OPTIONAL { <object/${e}/cataloging/right> crm:P2_has_type / rdfs:label ?license_name . <object/${e}/cataloging/right> dcterms:license ?license_iri. } } ORDER BY ?dating `;try{let o=await E(a,{signal:t});return v(o,{id:"id",cataloging:[{rightholder:"editor_name",note:"note",dating:{from_date:"dating",to_date:"dating"},license:{name:"license_name",uri:"license_iri"}}]})}catch(o){if(o.name=="AbortError")return null;throw o}},async get_fallback_image(e,t){let a=` ${$} SELECT ?id ?fallback_image_url WHERE { VALUES (?id ?object ?digital_image_type) {(${e} <object/${e}> <type/digital_image>)} ?object crm:P138i_has_representation / crm:P165i_is_incorporated_in ?fallback . ?fallback crm:P2_has_type ?digital_image_type . ?fallback crm:P1_is_identified_by / crm:P190_has_symbolic_content ?fallback_image_url . } `;try{let o=await E(a,{signal:t});return v(o,{id:"id",fallback_url:"fallback_image_url"})}catch(o){if(o.name=="AbortError")return null;throw o}},async get_image_data(e,t){let a=` ${$} SELECT ?id ?image_url ?iiif_url ?rotation_value ?representation_id ?representation ?area_iri ?area_width_value ?area_height_value ?area_horizontal_offset_value ?area_vertical_offset_value ?area_rotation_value WHERE { VALUES (?id ?object ?digital_image_type) {(${e} <object/${e}> <type/digital_image>)} ?object crm:P138i_has_representation | crm:P138i_has_representation / crm:P106i_forms_part_of ?representation . OPTIONAL { ?object crm:P138i_has_representation / crm:P106i_forms_part_of ?base_representation . } FILTER (BOUND(?base_representation) = False || (?representation IN (?base_representation))) ?representation ^crm:P138i_has_representation ?representation_id . ?representation crm:P165i_is_incorporated_in ?digital_image . ?digital_image crm:P2_has_type ?digital_image_type . ?digital_image crm:P1_is_identified_by / crm:P190_has_symbolic_content ?image_url . OPTIONAL { ?representation crm:P165i_is_incorporated_in ?iiif_image . ?iiif_image crm:P2_has_type <type/iiif_image> . ?iiif_image crm:P1_is_identified_by / crm:P190_has_symbolic_content ?iiif_url . ?iiif_image crm:P43_has_dimension ?rotation . ?rotation crm:P2_has_type <type/rotation> . ?rotation crm:P90_has_value ?rotation_value . OPTIONAL { ?iiif_image crm:L50i_has_propagated_area ?area . ?area ^crm:P165i_is_incorporated_in / ^crm:P138i_has_representation ?area_iri . # area height ?area crm:P43_has_dimension ?area_height . ?area_height crm:P2_has_type <type/height> . ?area_height crm:P90_has_value ?area_height_value . # area width ?area crm:P43_has_dimension ?area_width . ?area_width crm:P2_has_type <type/width> . ?area_width crm:P90_has_value ?area_width_value . # area horizontal offset ?area crm:P43_has_dimension ?area_horizontal_offset . ?area_horizontal_offset crm:P2_has_type <type/horizontal_offset> . ?area_horizontal_offset crm:P90_has_value ?area_horizontal_offset_value . # area vertical offset ?area crm:P43_has_dimension ?area_vertical_offset . ?area_vertical_offset crm:P2_has_type <type/vertical_offset> . ?area_vertical_offset crm:P90_has_value ?area_vertical_offset_value . # area rotation ?area crm:P43_has_dimension ?area_rotation . ?area_rotation crm:P2_has_type <type/rotation> . ?area_rotation crm:P90_has_value ?area_rotation_value . } } } `;try{let o=await E(a,{signal:t}),n=v(o,{id:"id",images:[{image_url:"image_url",iiif_url:"iiif_url",rotation:"rotation_value",object_iri:"representation_id",image_iri:"representation",areas:[{area_iri:"area_iri",width:"area_width_value",height:"area_height_value",h_offset:"area_horizontal_offset_value",v_offset:"area_vertical_offset_value",rotation:"area_rotation_value"}]}]});if("images"in n){let _={};for(let m of n.images)m.image_url in _?_[m.image_url].areas.push(m.areas[0]):_[m.image_url]=m;return{id:n.id,images:Object.values(_)}}else return null}catch(o){if(o.name=="AbortError")return null;throw o}},async get_image_meta(e,t,a,o=null){let n=` ${$} SELECT ?id ?credit_line ?right_name ?artist_name ?artist_role ?artist_gnd_url ?perspective ?dating ?rightholder ?ref_name ?ref_url WHERE { BIND (${e} as ?id) OPTIONAL { <${t}> crm:P104_is_subject_to ?right . OPTIONAL { ?right crm:P3_has_note ?credit_line. } ?right crm:P2_has_type / rdfs:label ?right_name . OPTIONAL { ?right crm:P75i_is_possessed_by / crm:P1_is_identified_by / crm:P190_has_symbolic_content ?rightholder . } } OPTIONAL { <${t}> crm:P94i_was_created_by ?creation . ?creation crm:P01i_is_domain_of ?artist_in_role . ?artist_in_role crm:P02_has_range ?artist . OPTIONAL { ?artist owl:sameAs ?artist_gnd_url . } ?artist crm:P1_is_identified_by / crm:P190_has_symbolic_content ?artist_name . ?artist_in_role crm:P14.1_in_the_role_of / rdfs:label ?artist_role . FILTER (lang(?artist_role) = "${a}") OPTIONAL { ?creation crm:P4_has_time-span / crm:P82_at_some_time_within ?dating . } OPTIONAL { ?creation crm:P67i_is_referred_to_by ?reference . BIND( IRI(CONCAT(str(?reference), '/name' )) AS ?ref_name_iri ) BIND( IRI(CONCAT(str(?reference), '/url' )) AS ?ref_url_iri ) ?ref_name_iri crm:P190_has_symbolic_content ?ref_name . ?ref_url_iri crm:P190_has_symbolic_content ?ref_url . } } OPTIONAL { <${t}/perspective> crm:P190_has_symbolic_content ?perspective . } }`;try{let _=await E(n,{signal:o}),m=v(_,{id:"id",meta:{legal_status:{credit_line:"credit_line",license:"right_name",rightholder:"rightholder",dating:{from_date:"dating",to_date:"dating"},link:{name:"ref_name",uri:"ref_url"}},perspective:"perspective",artists:[{name:"artist_name",role:"artist_role",gnd:"artist_gnd_url"}]}});return JSON.stringify(m.meta)==JSON.stringify({artists:[]})?null:m}catch(_){if(_.name=="AbortError")return null;throw _}},async get_parents_path(e,t=null){let a=` ${$} SELECT ?id ?path_title ?parent_id (COUNT(?mid) as ?distance) WHERE { BIND (${e} as ?id) <object/${e}> crm:P46i_forms_part_of* ?mid . ?mid a crm:E24_Physical_Human-Made_Thing . ?mid crm:P46i_forms_part_of+ ?final . ?final a crm:E24_Physical_Human-Made_Thing . ?final crm:P1_is_identified_by ?title_path_iri . ?title_path_iri crm:P2_has_type <type/preferred_title> . ?title_path_iri crm:P190_has_symbolic_content ?path_title . BIND(STRAFTER( STR(?final), "object/" ) as ?parent_id) . } GROUP BY ?path_title ?parent_id ?id ORDER BY DESC(?distance)`;try{let o=await E(a,{signal:t});return v(o,{id:"id",path:[{title:"path_title",objectId:"parent_id"}]})}catch(o){if(o.name=="AbortError")return null;throw o}}},$e={components:{Anchor:M,Dating:B},props:{data:{type:Object,default:()=>{}},link:{type:Boolean,default:!0}},computed:{has_living_dates:function(){return"details"in this.data&&this.data.details&&("dateOfBirth"in this.data.details||"dateOfDeath"in this.data.details)}}},Oe={key:0},ve={key:0},Te={key:0},we={key:1},Le={key:2};function Ae(e,t,a,o,n,_){const m=y("Dating"),p=y("Anchor");return a.data?(i(),c("span",Oe,[V(e.$slots,"default"),_.has_living_dates?(i(),c("span",ve,[t[0]||(t[0]=j(" ( ")),"dateOfBirth"in a.data.details?(i(),c("span",Te,[r(m,{data:{from_date:a.data.details.dateOfBirth},year_only:!0},null,8,["data"])])):u("",!0),"dateOfBirth"in a.data.details&&"dateOfDeath"in a.data.details?(i(),c("span",we,"–")):u("",!0),"dateOfDeath"in a.data.details?(i(),c("span",Le,[r(m,{data:{from_date:a.data.details.dateOfDeath},year_only:!0},null,8,["data"])])):u("",!0),t[1]||(t[1]=j(" ) "))])):u("",!0),a.link&&a.data.uri?(i(),d(p,{key:1,url:a.data.uri,sup:""},{default:s(()=>t[2]||(t[2]=[j("GND")])),_:1},8,["url"])):u("",!0)])):u("",!0)}const Ne=w($e,[["render",Ae]]),Re={components:{LegalStatus:ee,ExternalResource:Ne},props:{iri:{type:String,default:""},objectId:{type:Number,default:0}},data(){return{meta_data:null}},watch:{iri(){this.reset_data(),this.load_from_ts()}},created(){this.load_from_ts()},methods:{load_from_ts(){this.iri&&A.get_image_meta(this.objectId,this.iri,this.$i18n.locale).then(e=>{e&&e.meta&&e.id==this.objectId&&(this.meta_data=e.meta)})},reset_data(){this.meta_data=null},artist_row_padding(e){return e+1<this.meta_data.artists.length||this.meta_data.legal_status?"":"pb-4"}}},xe={key:0,class:"pa-3 pt-0 image-meta"};function Se(e,t,a,o,n,_){const m=y("ExternalResource"),p=y("legal-status");return n.meta_data?(i(),c("div",xe,[n.meta_data.perspective||n.meta_data.authors&&n.meta_data.authors.length||n.meta_data.legal_status?(i(),d(R,{key:0,class:"py-2"})):u("",!0),n.meta_data.perspective?(i(),d(g,{key:1,dense:""},{default:s(()=>[r(l,{cols:"12"},{default:s(()=>[j(h(n.meta_data.perspective),1)]),_:1})]),_:1})):u("",!0),n.meta_data.artists&&n.meta_data.artists.length?(i(!0),c(O,{key:2},T(n.meta_data.artists,(b,f)=>(i(),d(g,{key:"artist"+f,dense:"",align:"center"},{default:s(()=>[r(l,{cols:"3"},{default:s(()=>[I("h5",null,h(b.role)+":",1)]),_:2},1024),r(l,{cols:"9",class:""},{default:s(()=>[r(m,{data:b},{default:s(()=>[j(h(b.name),1)]),_:2},1032,["data"])]),_:2},1024)]),_:2},1024))),128)):u("",!0),n.meta_data.legal_status?(i(),d(p,{key:3,data:n.meta_data.legal_status,headline:"","is-creation":"",cols:[3,9]},null,8,["data"])):u("",!0)])):u("",!0)}const Ce=w(Re,[["render",Se],["__scopeId","data-v-5488552d"]]),De={name:"ImageSection",components:{ImageMeta:Ce,ImageViewer:ne,PlaceHolderImage:pe,LoadingSpinner:be},inject:["parent_ac"],props:{objectId:{type:Number,required:!0,default:0},maxWidth:{type:Number,default:null},imageHeight:{type:String,default:"430"},hideMetadata:{type:Boolean,default:!1},comparisonPage:{type:Boolean,default:!1,required:!1}},data(){return{image_data:[],fb_img:null,loading:!0,image_index:0,viewerKey:0}},computed:{all_object_ids(){let e=[];if(this.image_data)for(let t of this.image_data){e.push(t.objectId);for(let a of t.areas)e.push(a.objectId)}return e},image_meta_iri(){return this.image_data&&this.image_data.length&&this.image_data[this.image_index]?this.image_data[this.image_index].image_iri:null}},watch:{async objectId(e){this.fb_img=await A.get_fallback_image(this.objectId,this.parent_ac.signal),this.all_object_ids.includes(e)||(this.loading=!0,await this.load_image_data(),this.image_index=0,this.loading=!1)}},async created(){this.fb_img=await A.get_fallback_image(this.objectId,this.parent_ac.signal),await this.load_image_data(),this.loading=!1},methods:{forceRerender(){this.viewerKey+=1},async load_image_data(){this.image_data=[];let e=await A.get_image_data(this.objectId,this.parent_ac.signal);e&&e.id==this.objectId&&(this.image_data=e.images),this.image_data&&(this.image_data.forEach(t=>t.rotation=parseInt(t.rotation)||0),this.image_data.forEach(t=>t.objectId=this.iri_to_id(t.object_iri)),this.image_data.forEach(t=>t.areas.forEach(a=>a.objectId=this.iri_to_id(a.area_iri))),this.image_data.forEach(t=>t.areas=this.calculate_z_index(t.areas)))},iri_to_id(e){return+e.split("/").slice(-1)[0]},calculate_z_index(e){return e.forEach(t=>t.area=t.width*t.height),e.sort((t,a)=>a.area-t.area),e.forEach((t,a)=>t.z_index=a),e}}},qe={key:1};function Be(e,t,a,o,n,_){const m=y("LoadingSpinner"),p=y("ImageViewer"),b=y("ImageMeta"),f=y("PlaceHolderImage");return i(),d(Q,{variant:"outlined",rounded:"","min-height":a.imageHeight},{default:s(()=>[n.loading?(i(),d(m,{key:0,style:J(`height:${a.imageHeight}px !important`)},null,8,["style"])):n.image_data.length?(i(),c("div",qe,[(i(),d(p,{key:n.viewerKey,objectid:a.objectId,"image-data":n.image_data,"fallback-image":n.fb_img,height:a.imageHeight,"comparison-page":a.comparisonPage,onImageIndexChange:t[0]||(t[0]=P=>n.image_index=P),onFallbackForceRerender:_.forceRerender},null,8,["objectid","image-data","fallback-image","height","comparison-page","onFallbackForceRerender"])),a.hideMetadata?u("",!0):(i(),d(b,{key:0,"object-id":a.objectId,iri:_.image_meta_iri},null,8,["object-id","iri"]))])):(i(),d(f,{key:2,style:J(`height:${a.imageHeight}px !important`)},null,8,["style"]))]),_:1},8,["min-height"])}const Tn=w(De,[["render",Be]]),Fe={props:{data:{type:Object,default:()=>{}},withLabel:{type:Boolean,default:!1}},computed:{is_inline_flex(){return this.withLabel?"d-inline-flex":""}}},He={class:"d-flex align-baseline"},Me={key:0},We={key:0};function Ve(e,t,a,o,n,_){return a.data?(i(),c("span",{key:0,class:se(_.is_inline_flex)},[I("div",He,[a.withLabel?(i(),c("h5",Me,h(e.$t("label.source"))+": ",1)):u("",!0),V(e.$slots,"default",{},()=>[a.data&&a.data.name?(i(),c("div",We,h(a.data.name),1)):u("",!0)])])],2)):u("",!0)}const Ue=w(Fe,[["render",Ve]]),Ye={name:"Citation",components:{FormatedLink:W,FormatText:K,CitationStaticSource:Ue},props:{data:{type:Object,validator(e){let t=Object.keys(e).includes("value")&&e.value;return Array.isArray(e.sources)&&e.sources.length||e.source&&console.warn("possible typo or male format in citation"),t},default(){return{value:""}}},sourceStyle:{type:String,default:""}},computed:{quote(){return this.data.quote?this.data.quote:this.data.value?this.data.value:this.data.text?this.data.text:""},sources(){return this.data.sources?this.data.sources:[]}},methods:{semicolon(e){return e+1<this.sources.length?";":""}}},ze={key:0},Ge={class:"quote"},Ke={key:0},Xe={key:0},Je={key:1};function Qe(e,t,a,o,n,_){const m=y("FormatText"),p=y("FormatedLink"),b=y("CitationStaticSource");return Object.keys(a.data).length?(i(),c("span",ze,[I("div",Ge,[r(m,{data:a.data.value},null,8,["data"]),t[0]||(t[0]=j(" "))]),(i(!0),c(O,null,T(_.sources,(f,P)=>(i(),c("span",{key:"srcs"+P},[f.name||f.link?(i(),c("span",Ke,[r(b,{data:f,"with-label":P==0},{default:s(()=>[f.link&&f.name?(i(),c("span",Xe,[t[1]||(t[1]=j(" ")),r(p,{"anchor-text":f.name,data:f.link,"text-as-link":""},null,8,["anchor-text","data"])])):f.link?(i(),c("span",Je,[t[2]||(t[2]=j(" ")),r(p,{data:f.link,"text-as-link":""},null,8,["data"])])):u("",!0)]),_:2},1032,["data","with-label"])])):u("",!0),j(h(_.semicolon(P)),1)]))),128))])):u("",!0)}const X=w(Ye,[["render",Qe]]),Ze="/type/preferred_title",et={name:"ObjectTitle",components:{Citation:X},inject:["parent_ac"],props:{objectId:{type:Number,default:0}},data(){return{titles:[],sorted_titles:{main_title:{},alt_titles:{}}}},watch:{objectId(){this.objectId&&this.load_data_from_ts()},titles(){if(this.titles&&this.titles.length){for(let e of this.titles)e.type.endsWith(Ze)?this.sorted_titles.main_title=e:(e.type in this.sorted_titles.alt_titles||(this.sorted_titles.alt_titles[e.type]=[]),this.sorted_titles.alt_titles[e.type].push(e));this.sorted_titles.alt_titles=Object.keys(this.sorted_titles.alt_titles).sort().reduce((e,t)=>(e[t]=this.sorted_titles.alt_titles[t],e),{})}}},created(){this.load_data_from_ts()},methods:{load_data_from_ts(){this.titles=[],this.has_children=!1,this.sorted_titles={main_title:{},alt_titles:{}},A.get_title(this.objectId,this.$i18n.locale,this.parent_ac.signal).then(e=>{e&&e.title&&e.id==this.objectId&&(this.titles=e.title)})}}},tt={key:0},at={class:"d-inline"};function nt(e,t,a,o,n,_){const m=y("Citation");return a.objectId?(i(),c("span",tt,[Object.keys(n.sorted_titles.alt_titles).length?(i(),d(R,{key:0,class:"mt-4 mb-2"})):u("",!0),n.sorted_titles.alt_titles?(i(!0),c(O,{key:1},T(n.sorted_titles.alt_titles,(p,b)=>(i(),c("span",{key:b,class:"text-body-2"},[(i(!0),c(O,null,T(p,(f,P)=>(i(),d(g,{key:P,dense:""},{default:s(()=>[P==0?(i(),d(l,{key:0,cols:"4"},{default:s(()=>[I("h5",at,h(p[0].type_label)+":",1)]),_:2},1024)):(i(),d(l,{key:1,cols:"4"},{default:s(()=>t[0]||(t[0]=[j(" ")])),_:1})),r(l,{cols:"8"},{default:s(()=>[r(m,{data:f},null,8,["data"])]),_:2},1024)]),_:2},1024))),128))]))),128)):u("",!0)])):u("",!0)}const it=w(et,[["render",nt]]),st={components:{Anchor:M},props:{data:{type:Object,default:()=>{}},path:{type:String,default:""}}};function rt(e,t,a,o,n,_){const m=y("router-link"),p=y("Anchor");return i(),c("span",null,["iri"in a.data&&a.data.iri?(i(),d(m,{key:0,class:"internal-resource-link",to:{name:a.path,params:{id:a.data.iri.split("/").slice(-1)[0]}}},{default:s(()=>[j(h(a.data.name),1)]),_:1},8,["to"])):u("",!0),a.data.gnd?(i(),d(p,{key:1,url:a.data.gnd,sup:""},{default:s(()=>t[0]||(t[0]=[j("GND")])),_:1},8,["url"])):u("",!0)])}const q=w(st,[["render",rt],["__scopeId","data-v-a46c7b92"]]),ot={components:{Anchor:M},props:{data:{type:Object,default:()=>{}},category:{type:String,default:""}},methods:{filter_string:function(){return this.category+"-IS_OR-"+this.data.iri.split("/").slice(-1)[0]}}};function _t(e,t,a,o,n,_){const m=y("router-link"),p=y("Anchor");return i(),c("span",null,[r(ye,{location:"bottom","open-delay":"600"},{activator:s(({props:b})=>[I("span",re(oe(b)),[r(m,_e(b,{class:"filter_link",to:{name:"Search",query:{qfilter:_.filter_string()}}}),{default:s(()=>[j(h(a.data.name),1)]),_:2},1040,["to"])],16)]),default:s(()=>[I("span",null,h(e.$t("descr.filtered_search")),1)]),_:1}),a.data.gnd?(i(),d(p,{key:0,url:a.data.gnd,sup:""},{default:s(()=>t[0]||(t[0]=[j("GND")])),_:1},8,["url"])):u("",!0)])}const x=w(ot,[["render",_t],["__scopeId","data-v-009345da"]]),ct={name:"Production",components:{Dating:B,FilterResourceLink:x,ResourceLink:q},inject:["parent_ac"],props:{objectId:{type:Number,default:0}},data(){return{production:null,artists_sorted:{}}},computed:{production_note(){return this.production.prod_note||""},production_locations(){return this.production&&this.production.locations?[...new Map(this.production.locations.map(e=>[e.iri,e])).values()]:!1},production_technics(){return this.production.technics&&this.production.technics.length?this.production.technics.filter((e,t,a)=>t===a.findIndex(o=>o.gnd===e.gnd&&o.name===e.name)):!1}},watch:{objectId(){this.objectId&&(this.reset_data(),this.load_from_ts())},production(){this.production&&this.sort_artist_by_id()}},created(){this.reset_data(),this.load_from_ts()},methods:{load_from_ts(){A.get_production(this.objectId,this.$i18n.locale,this.parent_ac.signal).then(e=>{e&&e.production&&e.id==this.objectId&&(this.production=e.production)})},reset_data(){this.production=null,this.artists_sorted={}},sort_artist_by_id(){if(this.production.artists&&this.production.artists.length)for(let e of this.production.artists)e.role in this.artists_sorted||(this.artists_sorted[e.role]={}),this.artists_sorted[e.role][e.iri]=e}}},lt={key:0,class:"text-body-2"},dt={key:0},ut={key:1},mt={key:0},ht={key:1},ft={key:2},pt={key:0},bt={key:1};function yt(e,t,a,o,n,_){const m=y("ResourceLink"),p=y("Dating"),b=y("FilterResourceLink");return a.objectId&&n.production?(i(),c("span",lt,[r(R,{class:"mt-4"}),r(g,{class:"py-5"},{default:s(()=>[r(l,{cols:"12"},{default:s(()=>[I("h4",null,h(e.$t("label.production")),1)]),_:1})]),_:1}),n.artists_sorted?(i(!0),c(O,{key:0},T(n.artists_sorted,(f,P)=>(i(),c("span",{key:"artists"+P},[(i(!0),c(O,null,T(f,(L,N,k)=>(i(),d(g,{key:"art"+k,dense:""},{default:s(()=>[r(l,{cols:"4"},{default:s(()=>[k==0?(i(),c("h5",dt,h(L.role)+":",1)):(i(),c("span",ut," "))]),_:2},1024),r(l,{cols:"8"},{default:s(()=>[r(m,{data:L,path:"Person"},null,8,["data"]),L.attribution?(i(),c("span",mt," ("+h(L.attribution)+")",1)):u("",!0)]),_:2},1024)]),_:2},1024))),128))]))),128)):u("",!0),n.production.dating?(i(),c("span",ht,[r(g,{dense:""},{default:s(()=>[r(l,{cols:"4"},{default:s(()=>[I("h5",null,h(e.$t("label.dating"))+":",1)]),_:1}),r(l,{cols:"8"},{default:s(()=>[r(p,{data:n.production.dating},null,8,["data"])]),_:1})]),_:1})])):u("",!0),_.production_locations?(i(),c("span",ft,[(i(!0),c(O,null,T(_.production_locations,(f,P)=>(i(),d(g,{key:"place"+P,dense:""},{default:s(()=>[r(l,{cols:"4"},{default:s(()=>[P==0?(i(),c("h5",pt,h(e.$t("label.place"))+":",1)):(i(),c("span",bt," "))]),_:2},1024),r(l,{cols:"8"},{default:s(()=>[r(m,{data:f,path:"Place"},null,8,["data"])]),_:2},1024)]),_:2},1024))),128))])):u("",!0),_.production_note?(i(),d(g,{key:3,dense:""},{default:s(()=>[r(l,{cols:"4"},{default:s(()=>[I("h5",null,h(e.$t("label.note"))+":",1)]),_:1}),r(l,{cols:"8"},{default:s(()=>[I("div",null,h(_.production_note),1)]),_:1})]),_:1})):u("",!0),_.production_technics?(i(!0),c(O,{key:4},T(_.production_technics,(f,P)=>(i(),d(g,{key:"tec"+P,dense:""},{default:s(()=>[P==0?(i(),d(l,{key:0,cols:"4"},{default:s(()=>[I("h5",null,h(e.$t("label.technic"))+":",1)]),_:1})):(i(),d(l,{key:1,cols:"4"},{default:s(()=>t[0]||(t[0]=[j(" ")])),_:1})),r(l,{cols:"8"},{default:s(()=>[r(b,{data:f,category:"technic"},null,8,["data"])]),_:2},1024)]),_:2},1024))),128)):u("",!0),n.production.commission?(i(),c(O,{key:5},[(i(!0),c(O,null,T(n.production.commission.commissioner,(f,P)=>(i(),d(g,{key:"comi"+P,dense:""},{default:s(()=>[P==0?(i(),d(l,{key:0,cols:"4"},{default:s(()=>[I("h5",null,h(e.$t("label.commissioners"))+":",1)]),_:1})):(i(),d(l,{key:1,cols:"4"},{default:s(()=>t[1]||(t[1]=[j(" ")])),_:1})),r(l,{cols:"8"},{default:s(()=>[r(m,{data:f,path:"Person"},null,8,["data"])]),_:2},1024)]),_:2},1024))),128)),n.production.commission.note?(i(),d(g,{key:0,dense:""},{default:s(()=>[r(l,{cols:"4"},{default:s(()=>[I("h5",null,h(e.$t("label.note"))+":",1)]),_:1}),r(l,{cols:"8"},{default:s(()=>[I("div",null,h(n.production.commission.note),1)]),_:1})]),_:1})):u("",!0)],64)):u("",!0)])):u("",!0)}const gt=w(ct,[["render",yt]]),Pt={name:"Modification",components:{Dating:B,FilterResourceLink:x,ResourceLink:q},inject:["parent_ac"],props:{objectId:{type:Number,default:0}},data(){return{modifications:[]}},watch:{objectId(){this.objectId&&(this.modifications=[],this.load_from_ts())},production(){this.production&&this.sort_artist_by_id()}},created(){this.modifications=[],this.load_from_ts()},methods:{load_from_ts(){A.get_modifications(this.objectId,this.$i18n.locale,this.parent_ac.signal).then(e=>{e&&e.modifications&&e.id==this.objectId&&(this.modifications=e.modifications)})},sort_artist_by_id(e){let t={};if(e&&e.length)for(let a of e)t[a.id]=a;return t}}},It={key:0,class:"text-body-2"},jt={class:"d-inline"},kt={key:0},Et={class:"d-inline"};function $t(e,t,a,o,n,_){const m=y("Dating"),p=y("ResourceLink"),b=y("FilterResourceLink");return a.objectId&&n.modifications&&n.modifications.length?(i(),c("span",It,[r(R,{class:"mt-4"}),r(g,{class:"py-5"},{default:s(()=>[r(l,{cols:"12"},{default:s(()=>[I("h4",null,h(e.$t("label.modifications")),1)]),_:1})]),_:1}),(i(!0),c(O,null,T(n.modifications,(f,P)=>(i(),d(g,{key:"mod"+P,dense:""},{default:s(()=>[r(l,{cols:"12"},{default:s(()=>[f.dating?(i(),d(g,{key:0,dense:""},{default:s(()=>[r(l,{cols:"4"},{default:s(()=>[I("h5",null,h(e.$t("label.modification_dating"))+":",1)]),_:1}),r(l,{cols:"8"},{default:s(()=>[r(m,{data:f.dating},null,8,["data"])]),_:2},1024)]),_:2},1024)):u("",!0),f.note?(i(),d(g,{key:1,dense:""},{default:s(()=>[r(l,{cols:"4"},{default:s(()=>[I("h5",null,h(e.$t("label.note"))+":",1)]),_:1}),r(l,{cols:"8"},{default:s(()=>[j(h(f.note),1)]),_:2},1024)]),_:2},1024)):u("",!0),f.artists?(i(!0),c(O,{key:2},T(_.sort_artist_by_id(f.artists),(L,N)=>(i(),d(g,{key:"art"+N,dense:""},{default:s(()=>[r(l,{cols:"4"},{default:s(()=>[I("h5",jt,h(L.role)+":",1)]),_:2},1024),r(l,{cols:"8"},{default:s(()=>[r(p,{data:L,path:"Person"},null,8,["data"]),L.attribution?(i(),c("span",kt," ("+h(L.attribution)+")",1)):u("",!0)]),_:2},1024)]),_:2},1024))),128)):u("",!0),f.technics&&f.technics.length?(i(!0),c(O,{key:3},T(f.technics,(L,N)=>(i(),d(g,{key:"tec"+N},{default:s(()=>[N==0?(i(),d(l,{key:0,cols:"4"},{default:s(()=>[I("h5",Et,h(e.$t("label.technic")),1)]),_:1})):(i(),d(l,{key:1,cols:"4"},{default:s(()=>t[0]||(t[0]=[j(" ")])),_:1})),r(l,{cols:"8"},{default:s(()=>[r(b,{data:L,category:"technic"},null,8,["data"])]),_:2},1024)]),_:2},1024))),128)):u("",!0),P+1<n.modifications.length?(i(),d(R,{key:4,class:"mt-4 mb-2",inset:""})):u("",!0)]),_:2},1024)]),_:2},1024))),128))])):u("",!0)}const Ot=w(Pt,[["render",$t]]),vt={name:"Find",components:{Dating:B,ResourceLink:q},inject:["parent_ac"],props:{objectId:{type:Number,default:0}},data(){return{find:null}},watch:{objectId(){this.objectId&&(this.reset_data(),this.load_from_ts())}},created(){this.load_from_ts()},methods:{load_from_ts(){A.get_find(this.objectId,this.$i18n.locale,this.parent_ac.signal).then(e=>{e&&e.find&&e.id==this.objectId&&(this.find=e.find)})},reset_data(){this.find=null}}},Tt={key:0,class:"text-body-2"},wt={key:0},Lt={key:1};function At(e,t,a,o,n,_){const m=y("ResourceLink"),p=y("Dating");return n.find?(i(),c("span",Tt,[r(R,{class:"mt-4"}),r(g,{class:"py-5"},{default:s(()=>[r(l,{cols:"12"},{default:s(()=>[I("h4",null,h(e.$t("label.find")),1)]),_:1})]),_:1}),n.find?(i(),c(O,{key:0},[n.find.location?(i(),d(g,{key:0,dense:""},{default:s(()=>[r(l,{cols:"4"},{default:s(()=>[I("h5",null,h(e.$t("label.find_place"))+":",1)]),_:1}),r(l,{cols:"8"},{default:s(()=>[r(m,{data:n.find.location,path:"Place"},null,8,["data"])]),_:1})]),_:1})):u("",!0),n.find.dating?(i(),d(g,{key:1,dense:""},{default:s(()=>[r(l,{cols:"4"},{default:s(()=>[I("h5",null,h(e.$t("label.dating"))+":",1)]),_:1}),r(l,{cols:"8"},{default:s(()=>[r(p,{data:n.find.dating},null,8,["data"])]),_:1})]),_:1})):u("",!0),(i(!0),c(O,null,T(n.find.artists,(b,f)=>(i(),d(g,{key:"art"+f,dense:""},{default:s(()=>[r(l,{cols:"4"},{default:s(()=>[f==0?(i(),c("h5",wt,h(b.role)+":",1)):(i(),c("span",Lt," "))]),_:2},1024),r(l,{cols:"8"},{default:s(()=>[r(m,{data:b,path:"Person"},null,8,["data"])]),_:2},1024)]),_:2},1024))),128)),n.find.note?(i(),d(g,{key:2,dense:""},{default:s(()=>[r(l,{cols:"4"},{default:s(()=>[I("h5",null,h(e.$t("label.note"))+":",1)]),_:1}),r(l,{cols:"8"},{default:s(()=>[j(h(n.find.note),1)]),_:1})]),_:1})):u("",!0)],64)):u("",!0)])):u("",!0)}const Nt=w(vt,[["render",At]]),Rt="object_type",xt="classification",St="https://db.antiquitatum-thesaurus.eu".replace(/\/$/,""),Ct=`${St}/type/object_type`,Dt={name:"Types",components:{FilterResourceLink:x},inject:["parent_ac"],props:{objectId:{type:Number,default:0}},data(){return{types:[],category:{"/type/classification":xt,"/type/object_type":Rt},object_type:null,classifications:[]}},watch:{objectId(){this.objectId&&(this.reset_data(),this.load_from_ts())},types(){this.types&&this.types.length&&this.sort_types()}},created(){this.load_from_ts()},methods:{load_from_ts(){A.get_types(this.objectId,this.$i18n.locale,this.parent_ac.signal).then(e=>{e&&e.types&&e.id==this.objectId&&(this.types=e.types)})},reset_data(){this.types=[],this.classifications=[],this.object_type=null},get_path(e){return new URL(e).pathname},sort_types(){if(this.types&&this.types.length)for(let e of this.types)e.type_of_type_iri==Ct?this.object_type=e:this.classifications.push(e)}}},qt={key:0,class:"text-body-2 mb-1"},Bt={key:0},Ft={key:1};function Ht(e,t,a,o,n,_){const m=y("FilterResourceLink");return a.objectId&&n.types?(i(),c("div",qt,[n.object_type?(i(),d(g,{key:0,dense:""},{default:s(()=>[r(l,{cols:"4"},{default:s(()=>[I("h5",null,h(n.object_type.type_of_type)+":",1)]),_:1}),r(l,{cols:"8"},{default:s(()=>[r(m,{data:n.object_type,category:n.category[_.get_path(n.object_type.type_of_type_iri)]},null,8,["data","category"])]),_:1})]),_:1})):u("",!0),n.classifications.length?(i(!0),c(O,{key:1},T(n.classifications,(p,b)=>(i(),d(g,{key:"t"+b,dense:""},{default:s(()=>[r(l,{cols:"4"},{default:s(()=>[b==0?(i(),c("h5",Bt,h(p.type_of_type)+":",1)):(i(),c("span",Ft," "))]),_:2},1024),r(l,{cols:"8"},{default:s(()=>[r(m,{data:p,category:n.category[_.get_path(p.type_of_type_iri)]},null,8,["data","category"])]),_:2},1024)]),_:2},1024))),128)):u("",!0)])):u("",!0)}const Mt=w(Dt,[["render",Ht]]),Wt={name:"Inscriptions",components:{FormatText:K},inject:["parent_ac"],props:{objectId:{type:Number,default:0}},data(){return{inscriptions:[]}},watch:{objectId(){this.objectId&&(this.reset_data(),this.load_from_ts())}},created(){this.load_from_ts()},methods:{load_from_ts(){A.get_inscriptions(this.objectId,this.parent_ac.signal).then(e=>{e&&e.inscriptions&&e.id==this.objectId&&(this.inscriptions=e.inscriptions)})},reset_data(){this.inscriptions=[]}}},Vt={key:0,class:"text-body-2 mb-1"},Ut={key:0},Yt={class:"d-inline"},zt={key:1},Gt={class:"d-inline"};function Kt(e,t,a,o,n,_){const m=y("FormatText");return a.objectId&&n.inscriptions&&n.inscriptions.length?(i(),c("div",Vt,[(i(!0),c(O,null,T(n.inscriptions,(p,b)=>(i(),d(g,{key:"insc"+b,dense:""},{default:s(()=>[b>0?(i(),d(l,{key:0,cols:"12"},{default:s(()=>[r(R,{inset:""})]),_:1})):u("",!0),b==0?(i(),d(l,{key:1,cols:"4"},{default:s(()=>[I("h5",null,h(e.$t("label.inscriptions"))+":",1)]),_:1})):(i(),d(l,{key:2,cols:"4"},{default:s(()=>t[0]||(t[0]=[j(" ")])),_:1})),r(l,{cols:"8"},{default:s(()=>[r(m,{data:p.text},null,8,["data"]),p.descr_text||p.pos_text?(i(),d(g,{key:0,dense:""},{default:s(()=>[r(l,{cols:"12"},{default:s(()=>[p.pos_text?(i(),c("div",Ut,[I("h5",Yt,h(e.$t("label.inscription_placement"))+":",1),j(" "+h(p.pos_text),1)])):u("",!0),p.descr_text?(i(),c("div",zt,[I("h5",Gt,h(e.$t("label.note"))+":",1),j(" "+h(p.descr_text),1)])):u("",!0)]),_:2},1024)]),_:2},1024)):u("",!0)]),_:2},1024)]),_:2},1024))),128))])):u("",!0)}const Xt=w(Wt,[["render",Kt]]),Jt={name:"Description",components:{Citation:X},inject:["parent_ac"],props:{objectId:{type:Number,default:0},type:{type:String,default:"description"},withHeader:{type:Boolean,default:!1}},data(){return{descriptions:[]}},watch:{objectId(){this.objectId&&(this.reset_data(),this.load_from_ts())}},created(){this.load_from_ts()},methods:{load_from_ts(){A.get_descriptions(this.objectId,this.$i18n.locale,this.type,this.parent_ac.signal).then(e=>{e&&e.descriptions&&e.id==this.objectId&&(this.descriptions=this.filterLanguages(e.descriptions))})},filterLanguages(e){let t=[];for(let a of e)["de","it"].includes(a.language)&&t.push(a);return t},reset_data(){this.descriptions=[]},formatData(e){let t={value:e.note};return e.assignments.length&&(t.sources=e.assignments),t}}},Qt={key:0,class:"text-body-2 mb-1"},Zt={key:0},ea={key:0,class:"d-inline"},ta={key:1,class:"d-inline"};function aa(e,t,a,o,n,_){const m=y("Citation");return a.objectId&&n.descriptions&&n.descriptions.length>0?(i(),c("div",Qt,[a.withHeader?(i(),c("div",Zt,[r(R,{class:"mt-4"}),r(g,{class:"py-5"},{default:s(()=>[r(l,{cols:"12"},{default:s(()=>[I("h4",null,h(e.$t("label."+a.type)),1)]),_:1})]),_:1})])):u("",!0),(i(!0),c(O,null,T(n.descriptions,(p,b)=>(i(),c("div",{key:b},[r(g,{dense:""},{default:s(()=>[r(l,{cols:"4"},{default:s(()=>[n.descriptions.length>1|(n.descriptions.length==1&&n.descriptions[0].language!="de")?(i(),c("h5",ea,h(p.type)+" ("+h(p.language)+"): ",1)):(i(),c("h5",ta,h(p.type)+":",1))]),_:2},1024),r(l,{cols:"8"},{default:s(()=>[r(m,{data:_.formatData(p)},null,8,["data"])]),_:2},1024)]),_:2},1024)]))),128))])):u("",!0)}const te=w(Jt,[["render",aa]]),na={class:"text-body-2 mb-1"},ia={class:"d-inline"},sa={key:0,class:"depicts"},ra={class:"depicts"},oa={key:0,class:"comma"},_a={key:1},ca={__name:"DepictionMethod",props:{objectId:{type:Number,default:0}},setup(e){const{t,locale:a}=U(),o=D([]),n=e,_=Y("parent_ac");function m(f){return f.some(P=>P.iri.endsWith("oblique_view"))}function p(f){const P=[],L=[];return f.forEach(N=>{N.iri.endsWith("oblique_view")?(N.views=P,L.push(N)):N.iri.endsWith("view")?P.push(N):L.push(N)}),L}function b(){A.get_depiction_method(n.objectId,a.value,_.signal).then(f=>{f&&f.modes&&f.id==n.objectId?m(f.modes)?o.value=p(f.modes):o.value=f.modes:o.value=[]})}return z(()=>{b()}),G(()=>n.objectId,()=>{b()}),(f,P)=>(i(),c("div",na,[(i(!0),c(O,null,T(o.value,(L,N)=>(i(),d(g,{key:"mode"+N,dense:""},{default:s(()=>[N==0?(i(),d(l,{key:0,cols:"4"},{default:s(()=>[I("h5",ia,h(Z(t)("label.mode_of_depiction"))+":",1)]),_:1})):(i(),d(l,{key:1,cols:"4"},{default:s(()=>P[0]||(P[0]=[j(" ")])),_:1})),r(l,{cols:"8"},{default:s(()=>["views"in L?(i(),c("span",sa,[r(x,{data:L,category:"mode_of_depiction"},null,8,["data"]),P[1]||(P[1]=j(" ")),P[2]||(P[2]=I("span",{class:"no-padding-text"},"(",-1)),(i(!0),c(O,null,T(L.views,(k,S)=>(i(),c("span",{key:"submode"+S},[I("span",ra,[r(x,{data:k,category:"mode_of_depiction"},null,8,["data"])]),S>=0&&S<L.views.length-1?(i(),c("span",oa,",")):u("",!0)]))),128)),P[3]||(P[3]=I("span",{class:"no-padding-text"},")",-1))])):(i(),c("span",_a,[r(x,{data:L,category:"mode_of_depiction"},null,8,["data"])]))]),_:2},1024)]),_:2},1024))),128))]))}},la=w(ca,[["__scopeId","data-v-1fc0c464"]]),da={class:"text-body-2 mb-1"},ua={class:"d-inline"},ma={key:0},ha={key:1},fa={__name:"DepictionContent",props:{objectId:{type:Number,default:0}},setup(e){const{t,locale:a}=U(),o=D([]),n=e,_=Y("parent_ac");function m(){A.get_depiction_content(n.objectId,a.value,_.signal).then(p=>{p&&p.id==n.objectId?o.value=p.depictions:o.value=[]})}return z(()=>{m()}),G(()=>n.objectId,()=>{m()}),(p,b)=>(i(),c("div",da,[(i(!0),c(O,null,T(o.value,(f,P)=>(i(),d(g,{key:"depictionContent"+P,dense:""},{default:s(()=>[P==0?(i(),d(l,{key:0,cols:"4"},{default:s(()=>[I("h5",ua,h(Z(t)("label.depiction_content"))+":",1)]),_:1})):(i(),d(l,{key:1,cols:"4"},{default:s(()=>b[0]||(b[0]=[j(" ")])),_:1})),r(l,{cols:"8"},{default:s(()=>[f.type.endsWith("E21_Person")?(i(),c("span",ma,[r(x,{data:f,category:"depicted_person"},null,8,["data"])])):(i(),c("span",ha,[r(x,{data:f,category:"depicted_place"},null,8,["data"])]))]),_:2},1024)]),_:2},1024))),128))]))}},pa={name:"Materials",components:{FilterResourceLink:x},inject:["parent_ac"],props:{objectId:{type:Number,default:0}},data(){return{materials:[]}},watch:{objectId(){this.objectId&&(this.reset_data(),this.load_from_ts())}},created(){this.load_from_ts()},methods:{load_from_ts(){A.get_materials(this.objectId,this.$i18n.locale,this.parent_ac.signal).then(e=>{e&&e.materials&&e.id==this.objectId&&(this.materials=e.materials)})},reset_data(){this.materials=[]}}},ba={class:"text-body-2 mb-1"},ya={key:0,class:"d-inline"};function ga(e,t,a,o,n,_){const m=y("FilterResourceLink");return i(),c("div",ba,[(i(!0),c(O,null,T(n.materials,(p,b)=>(i(),d(g,{key:"mat"+b,dense:""},{default:s(()=>[b==0?(i(),d(l,{key:0,cols:"4"},{default:s(()=>[b==0?(i(),c("h5",ya,h(e.$t("label.material"))+":",1)):u("",!0)]),_:2},1024)):(i(),d(l,{key:1,cols:"4"},{default:s(()=>t[0]||(t[0]=[j(" ")])),_:1})),r(l,{cols:"8"},{default:s(()=>[r(m,{data:p,category:"material"},null,8,["data"])]),_:2},1024)]),_:2},1024))),128))])}const Pa=w(pa,[["render",ga]]),Ia={name:"Condition",components:{Citation:X},inject:["parent_ac"],props:{objectId:{type:Number,default:0}},data(){return{condition:{}}},computed:{has_condition(){return!this.is_obj_empty(this.condition)},computed_condition(){let e={value:this.condition.note,sources:[]},t={name:""};return this.condition.source_note&&(t.name=this.condition.source_note),this.condition.source&&(t.link={uri:this.condition.source.uri},this.condition.source.name&&(t.name=this.condition.source.name)),e.sources.push(t),e}},watch:{objectId(){this.objectId&&(this.reset_data(),this.load_from_ts())}},created(){this.reset_data(),this.load_from_ts()},methods:{is_obj_empty(e){return typeof e<"u"&&Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype},load_from_ts(){A.get_condition(this.objectId,this.$i18n.locale,this.parent_ac.signal).then(e=>{e&&e.condition&&e.id==this.objectId&&(this.condition=e.condition)})},reset_data(){this.condition={}}}},ja={key:0,class:"text-body-2 mb-1"},ka={class:"d-inline"};function Ea(e,t,a,o,n,_){const m=y("Citation");return n.condition&&_.has_condition?(i(),c("div",ja,[r(g,{dense:""},{default:s(()=>[r(l,{cols:"4"},{default:s(()=>[I("h5",ka,h(e.$t("label.condition"))+":",1)]),_:1}),r(l,{cols:"8"},{default:s(()=>[r(m,{data:_.computed_condition},null,8,["data"])]),_:1})]),_:1})])):u("",!0)}const $a=w(Ia,[["render",Ea]]),Oa={name:"Measurement",components:{},inject:["parent_ac"],props:{objectId:{type:Number,default:0}},data(){return{measurements:[]}},computed:{has_measurements(){return this.measurements.length}},watch:{objectId(){this.objectId&&(this.reset_data(),this.load_from_ts())}},created(){this.reset_data(),this.load_from_ts()},methods:{is_obj_empty(e){return typeof e<"u"&&Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype},load_from_ts(){A.get_measurements(this.objectId,this.$i18n.locale,this.parent_ac.signal).then(e=>{e&&e.measurements&&e.id==this.objectId&&(this.measurements=e.measurements)})},reset_data(){this.measurements={}}}},va={key:0,class:"text-body-2 mb-1"},Ta={key:0},wa={key:0},La={key:1},Aa={key:0};function Na(e,t,a,o,n,_){return _.has_measurements?(i(),c("div",va,[(i(!0),c(O,null,T(n.measurements,(m,p)=>(i(),d(g,{key:"mid"+p,dense:""},{default:s(()=>[p==0?(i(),d(l,{key:0,cols:"4"},{default:s(()=>[I("h5",null,h(e.$t("label.measurements"))+":",1)]),_:1})):(i(),d(l,{key:1,cols:"4"},{default:s(()=>t[0]||(t[0]=[j(" ")])),_:1})),r(l,{cols:"8"},{default:s(()=>[(i(!0),c(O,null,T(m.measures,(b,f)=>(i(),c("span",{key:"meas"+f},[b.type&&b.value&&b.unit_symbol?(i(),c("span",Ta,[j(h(b.type.charAt(0))+": "+h(parseFloat(b.value).toFixed(2).replace(".",","))+"  "+h(b.unit_symbol),1),f+1<m.measures.length?(i(),c("span",wa,", ")):u("",!0)])):b.descr?(i(),c("span",La,h(b.descr),1)):u("",!0)]))),128)),m.notes?(i(),c("span",Aa,"; "+h(m.notes),1)):u("",!0)]),_:2},1024)]),_:2},1024))),128))])):u("",!0)}const Ra=w(Oa,[["render",Na]]),xa={name:"BaseFacts",components:{Types:Mt,Inscriptions:Xt,Description:te,Materials:Pa,Condition:$a,Measurement:Ra,DepictionMethod:la,DepictionContent:fa},inject:["parent_ac"],props:{objectId:{type:Number,default:0}},data(){return{is_deleted:!1,forward_iri:null}},watch:{objectId(){this.load_from_ts()}},created(){this.load_from_ts()},methods:{load_from_ts(){A.is_deleted(this.objectId).then(e=>{this.is_deleted=e.is_deleted,this.is_deleted&&A.load_forward_id_if_exists(this.objectId,this.parent_ac.signal).then(t=>{this.forward_iri=t.forward_iri})})}}},Sa={key:0,class:"text-body-2"},Ca={key:1};function Da(e,t,a,o,n,_){const m=y("Types"),p=y("Inscriptions"),b=y("Description"),f=y("DepictionContent"),P=y("DepictionMethod"),L=y("Materials"),N=y("Condition"),k=y("Measurement");return a.objectId&&!n.is_deleted?(i(),c("div",Sa,[r(R,{class:"mt-4"}),r(g,{class:"py-5"},{default:s(()=>[r(l,{cols:"12"},{default:s(()=>[I("h4",null,h(e.$t("label.descriptive_data")),1)]),_:1})]),_:1}),r(m,{"object-id":a.objectId},null,8,["object-id"]),r(p,{"object-id":a.objectId},null,8,["object-id"]),r(b,{"object-id":a.objectId},null,8,["object-id"]),r(f,{"object-id":a.objectId},null,8,["object-id"]),r(P,{"object-id":a.objectId},null,8,["object-id"]),r(L,{"object-id":a.objectId},null,8,["object-id"]),r(N,{"object-id":a.objectId},null,8,["object-id"]),r(k,{"object-id":a.objectId},null,8,["object-id"])])):n.is_deleted?(i(),c("div",Ca,[r(Q,{variant:"outlined",rounded:"0","max-width":"500",class:"mx-auto my-10"},{default:s(()=>[r(ce,null,{default:s(()=>[j(h(e.$t("error.object_deleted")),1)]),_:1}),r(le,null,{default:s(()=>[j(h(e.$t("error.object_replaced_by")),1)]),_:1}),n.forward_iri?(i(),d(de,{key:0},{default:s(()=>[r(ue,{variant:"text",color:"#C60C30",to:{name:"Object",params:{objectid:n.forward_iri.split("/").slice(-1)[0]}},class:"forward_iri"},{default:s(()=>[j(h(n.forward_iri),1)]),_:1},8,["to"])]),_:1})):u("",!0)]),_:1})])):u("",!0)}const qa=w(xa,[["render",Da],["__scopeId","data-v-76945a7b"]]),Ba={name:"Comment",components:{Description:te},props:{objectId:{type:Number,default:0}}},Fa={class:"text-body-2"};function Ha(e,t,a,o,n,_){const m=y("Description");return i(),c("div",Fa,[r(m,{"object-id":a.objectId,type:"comment","with-header":""},null,8,["object-id"])])}const Ma=w(Ba,[["render",Ha]]),Wa={name:"Provenance",components:{FormatText:K,Dating:B,ResourceLink:q},inject:["parent_ac"],props:{objectId:{type:Number,default:0}},data(){return{provs:[]}},watch:{objectId(){this.provs=[],this.load_from_ts()}},created(){this.load_from_ts()},methods:{not_last_row:function(e){return this.provs.length>e+1},sort_provenances(e){let t=new Map;return e.forEach(a=>{let o=a.iri.replace("/receiving_custody","").replace("/surrendering_custody","").split("/").slice(-1)[0];if(!t.has(o))t.set(o,a);else{let n=t.get(o);a.dating&&a.dating.to_date&&(typeof n.dating>"u"&&(n.dating={to_date:null}),n.dating.to_date=a.dating.to_date),t.set(o,n)}}),t=new Map([...t].sort()),Array.from(t.values())},load_from_ts(){A.get_provenances(this.objectId,this.parent_ac.signal).then(e=>{e&&e.provenances&&e.id==this.objectId&&(this.provs=this.sort_provenances(e.provenances))})}}},Va={key:0,class:"text-body-2"},Ua={key:0},Ya={key:1},za={class:"d-inline"},Ga={class:"d-inline"};function Ka(e,t,a,o,n,_){const m=y("ResourceLink"),p=y("Dating"),b=y("FormatText");return n.provs.length?(i(),c("span",Va,[r(R,{class:"mt-4"}),r(g,{class:"py-5"},{default:s(()=>[r(l,{cols:"12"},{default:s(()=>[I("h4",null,h(e.$t("label.provenance")),1)]),_:1})]),_:1}),(i(!0),c(O,null,T(n.provs,(f,P)=>(i(),c("span",{key:P},[P>0?(i(),d(g,{key:0,class:"my-1",dense:""},{default:s(()=>[r(l,{cols:"12"},{default:s(()=>[r(R,{inset:""})]),_:1})]),_:1})):u("",!0),f.custodian?(i(),d(g,{key:1,dense:""},{default:s(()=>[r(l,{cols:"4"},{default:s(()=>[f.custodian.type=="person"?(i(),c("h5",Ua,h(e.$t("label.custodian"))+":",1)):(i(),c("h5",Ya,h(e.$t("label.institution"))+":",1))]),_:2},1024),r(l,{cols:"8"},{default:s(()=>[f.custodian.type=="person"?(i(),d(m,{key:0,data:f.custodian,path:"Person"},null,8,["data"])):(i(),d(m,{key:1,data:f.custodian,path:"Institution"},null,8,["data"]))]),_:2},1024)]),_:2},1024)):u("",!0),f.place?(i(),d(g,{key:2,dense:""},{default:s(()=>[r(l,{cols:"4"},{default:s(()=>[I("h5",null,h(e.$t("label.place"))+":",1)]),_:1}),r(l,{cols:"8"},{default:s(()=>[r(m,{data:f.place,path:"Place"},null,8,["data"])]),_:2},1024)]),_:2},1024)):u("",!0),"dating"in f&&f.dating?(i(),d(g,{key:3,dense:""},{default:s(()=>[r(l,{cols:"4"},{default:s(()=>[I("h5",za,h(e.$t("label.dating"))+": ",1)]),_:1}),r(l,{cols:"8"},{default:s(()=>[r(p,{data:f.dating},null,8,["data"])]),_:2},1024)]),_:2},1024)):u("",!0),"note"in f&&f.note?(i(),d(g,{key:4,dense:""},{default:s(()=>[r(l,{cols:"4"},{default:s(()=>[I("h5",Ga,h(e.$t("label.note"))+": ",1)]),_:1}),r(l,{cols:"8"},{default:s(()=>[r(b,{data:f.note},null,8,["data"])]),_:2},1024)]),_:2},1024)):u("",!0)]))),128))])):u("",!0)}const Xa=w(Wa,[["render",Ka]]),Ja={name:"Cataloging",components:{LegalStatus:ee},inject:["parent_ac"],props:{objectId:{type:Number,required:!0}},data(){return{catalogings:[],default_license:{name:"CC BY-NC-SA 4.0",uri:"http://creativecommons.org/licenses/by-nc-sa/4.0"}}},watch:{objectId(){this.catalogings=[],this.load_from_ts()}},created(){this.load_from_ts()},methods:{load_from_ts(){A.get_cataloging_data(this.objectId,this.parent_ac.signal).then(e=>{if(e&&e.cataloging&&e.id==this.objectId){let t=e.cataloging;t=t.reduce((o,n,_)=>{let m=n.dating.from_date;return _==0?(o[m]=n,o):(m in o?o[m].rightholder=o[m].rightholder.concat(", ",n.rightholder):o[m]=n,o)},{});let a=[];for(let o in t)a.push(t[o]);this.catalogings=a}})}}},Qa={if:"catalogings"};function Za(e,t,a,o,n,_){const m=y("LegalStatus");return i(),c("div",Qa,[r(R,{class:"mt-4"}),r(me,{class:"mt-10 text-body-2"},{default:s(()=>[(i(!0),c(O,null,T(n.catalogings,(p,b)=>(i(),c("div",{key:b},[b>0?(i(),d(g,{key:0,class:"my-1"},{default:s(()=>[r(l,null,{default:s(()=>[r(R,{inset:""})]),_:1})]),_:1})):u("",!0),r(m,{data:p,cols:[4,8],headline:b==0?"legal_status.record":"","is-editor":"",no_license:b!=n.catalogings.length-1,"is-creation":b==0},null,8,["data","headline","no_license","is-creation"])]))),128))]),_:1})])}const en=w(Ja,[["render",Za]]),tn={name:"Literture",components:{FormatedLink:W},inject:["parent_ac"],props:{objectId:{type:Number,default:0}},data(){return{bib_refs:[]}},watch:{objectId(){this.objectId&&(this.reset_data(),this.load_from_ts())}},created(){this.load_from_ts()},methods:{load_from_ts(){A.get_bibliographic_reference(this.objectId,this.parent_ac.signal).then(e=>{e&&e.bib_refs&&e.id==this.objectId&&(this.bib_refs=e.bib_refs)})},reset_data(){this.bib_refs=[]}}},an={class:"text-body-2"};function nn(e,t,a,o,n,_){const m=y("FormatedLink");return i(),c("span",an,[(i(!0),c(O,null,T(n.bib_refs,(p,b)=>(i(),d(g,{key:b,dense:""},{default:s(()=>[b==0?(i(),d(l,{key:0,cols:"4"},{default:s(()=>[I("h5",null,h(e.$t("label.literatures_citations"))+":",1)]),_:1})):(i(),d(l,{key:1,cols:"4"},{default:s(()=>t[0]||(t[0]=[j(" ")])),_:1})),p.citation?(i(),d(l,{key:2,cols:"8"},{default:s(()=>[r(m,{"anchor-text":p.citation,data:p.link},null,8,["anchor-text","data"])]),_:2},1024)):p.bib_ref_note?(i(),d(l,{key:3,cols:"8"},{default:s(()=>[j(h(p.bib_ref_note),1)]),_:2},1024)):u("",!0)]),_:2},1024))),128))])}const sn=w(tn,[["render",nn]]),rn={name:"ExternalReferences",components:{FormatedLink:W},inject:["parent_ac"],props:{objectId:{type:Number,default:0}},data(){return{external_refs:null,censusId:null}},watch:{objectId(){this.objectId&&(this.reset_data(),this.load_from_ts())}},created(){this.load_from_ts()},methods:{load_from_ts(){A.get_external_reference(this.objectId,this.$i18n.locale,this.parent_ac.signal).then(e=>{e&&e.references&&e.id==this.objectId&&(this.external_refs={},e.references.forEach(t=>{this.external_refs[t.ref_type]||(this.external_refs[t.ref_type]=[]),this.external_refs[t.ref_type].push({text:t.ref_source,uri:t.ref_link})}))})},reset_data(){this.external_refs=null},hasExternalDocuments(e){return e.text=="Census"?(this.censusId=e.uri.substring(e.uri.indexOf("censusID=")+9),!0):!1}}},on={key:0,class:"text-body-2 mb-1"};function _n(e,t,a,o,n,_){const m=y("FormatedLink");return a.objectId&&n.external_refs?(i(),c("div",on,[(i(!0),c(O,null,T(n.external_refs,(p,b)=>(i(),c("span",{key:"ref"+b},[(i(!0),c(O,null,T(p,(f,P)=>(i(),d(g,{key:"refs"+P,dense:""},{default:s(()=>[P==0?(i(),d(l,{key:0,cols:"4"},{default:s(()=>[I("h5",null,h(b)+":",1)]),_:2},1024)):(i(),d(l,{key:1,cols:"4"},{default:s(()=>t[0]||(t[0]=[j(" ")])),_:1})),r(l,{cols:"8"},{default:s(()=>[r(m,{data:f,"anchor-text":f.text,"text-as-link":""},null,8,["data","anchor-text"])]),_:2},1024)]),_:2},1024))),128))]))),128))])):u("",!0)}const cn=w(rn,[["render",_n]]),ln={name:"References",components:{Literature:sn,ExternalReferences:cn},props:{objectId:{type:Number,required:!0}},data(){return{has_bibliography:!1,has_external_references:!1}},watch:{objectId(){this.load_from_ts()}},created(){this.load_from_ts()},methods:{load_from_ts(){A.has_bibliography(this.objectId).then(e=>{this.has_bibliography=e.exists}),A.has_external_references(this.objectId).then(e=>{this.has_external_references=e.exists})}}},dn={key:0};function un(e,t,a,o,n,_){const m=y("Literature"),p=y("ExternalReferences");return n.has_bibliography||n.has_external_references?(i(),c("div",dn,[r(R,{class:"mt-4"}),r(g,{class:"py-5 text-body-2"},{default:s(()=>[r(l,{cols:"12"},{default:s(()=>[I("h4",null,h(e.$t("label.references")),1)]),_:1})]),_:1}),n.has_bibliography?(i(),d(m,{key:0,"object-id":a.objectId},null,8,["object-id"])):u("",!0),n.has_bibliography&&n.has_external_references?(i(),d(g,{key:1,class:"my-1"},{default:s(()=>[r(l,{cols:"12"},{default:s(()=>[r(R,{inset:""})]),_:1})]),_:1})):u("",!0),n.has_external_references?(i(),d(p,{key:2,"object-id":a.objectId},null,8,["object-id"])):u("",!0)])):u("",!0)}const mn=w(ln,[["render",un]]),hn={key:0},fn={key:1},C={__name:"MetaDataRow",props:{headlineLabel:{type:String,default:""}},setup(e){return(t,a)=>(i(),d(g,{dense:""},{default:s(()=>[r(l,{cols:"4"},{default:s(()=>[e.headlineLabel?(i(),c("h5",hn,h(e.headlineLabel)+":",1)):(i(),c("span",fn," "))]),_:1}),r(l,{cols:"8"},{default:s(()=>[V(t.$slots,"default")]),_:3})]),_:3}))}},pn={key:0,class:"text-body-2"},bn={__name:"Repository",props:{objectId:{type:Number,required:!0}},setup(e){const{t,locale:a}=U(),o=e,n=Y("parent_ac"),_=he({type:"",location:{name:"",iri:"",gnd:""},dating:{from:"",to:""},note:""}),m=D({}),p=D({}),b=D(""),f=D(!1);function P(){A.get_custody(o.objectId,a.value,n.signal).then(k=>{k&&k.custody&&k.id==o.objectId?(f.value=!0,_.type=k.custody.type||"",_.location=k.custody.location||{name:"",iri:"",gnd:""},_.dating=k.custody.dating||{from:"",to:""},_.note=k.custody.note||""):(_.type="",_.location={name:"",iri:"",gnd:""},_.dating={from:"",to:""},_.note="")}),A.get_location(o.objectId,n.signal).then(k=>{k&&k.location&&k.id==o.objectId?(f.value=!0,m.value=k.location):m.value={}}),A.get_inventory_no(o.objectId,n.signal).then(k=>{Object.keys(k).length&&(f.value=!0,k.old_inv_nos.length==0&&k.cur_inv_no.length>25?(b.value=k.cur_inv_no,p.value={}):(b.value="",p.value=k))})}function L(){if(_){const k=_.type,S=ie(_.dating,!1,t,a),F=_.note,H=[k,S,F].filter(ae=>ae);return console.log(H),H.join("; ")}return""}const N=fe(L);return z(()=>{f.value=!1,P()}),G(()=>o.objectId,()=>{f.value=!1,P()}),(k,S)=>f.value?(i(),c("span",pn,[r(R,{class:"mt-4"}),r(g,{class:"py-5"},{default:s(()=>[r(l,{cols:"12"},{default:s(()=>[I("h4",null,h(k.$t("label.repository")),1)]),_:1})]),_:1}),I("span",null,[_.location.name?(i(),d(C,{key:0,"headline-label":k.$t("label.collection")},{default:s(()=>[r(q,{data:_.location,path:"Institution"},null,8,["data"])]),_:1},8,["headline-label"])):u("",!0),Object.keys(m.value).length?(i(),d(C,{key:1,"headline-label":k.$t("label.location_places")},{default:s(()=>[r(q,{data:m.value,path:"Place"},null,8,["data"])]),_:1},8,["headline-label"])):u("",!0),p.value.cur_inv_no?(i(),d(C,{key:2,"headline-label":k.$t("label.location_inventory_no")},{default:s(()=>[j(h(p.value.cur_inv_no),1)]),_:1},8,["headline-label"])):u("",!0),(i(!0),c(O,null,T(p.value.old_inv_nos,(F,H)=>(i(),d(C,{key:"inv"+H,"headline-label":H==0?k.$t("label.historic_inventory_no"):""},{default:s(()=>[j(h(F.inv_no),1)]),_:2},1032,["headline-label"]))),128)),N.value?(i(),d(C,{key:3,"headline-label":k.$t("label.acquisition")},{default:s(()=>[j(h(N.value),1)]),_:1},8,["headline-label"])):u("",!0),b.value?(i(),d(C,{key:4,"headline-label":k.$t("label.note")},{default:s(()=>[j(h(b.value),1)]),_:1},8,["headline-label"])):u("",!0)])])):u("",!0)}},yn={name:"MainPartTS",components:{AlternativeTitles:it,Production:gt,Modification:Ot,Find:Nt,BaseFacts:qa,Comment:Ma,Provenance:Xa,Cataloging:en,References:mn,Repository:bn},props:{objectId:{type:Number,default:0}}},gn={key:0};function Pn(e,t,a,o,n,_){const m=y("AlternativeTitles"),p=y("Repository"),b=y("Production"),f=y("BaseFacts"),P=y("Find"),L=y("Provenance"),N=y("Modification"),k=y("Comment"),S=y("References"),F=y("Cataloging");return a.objectId?(i(),c("div",gn,[r(m,{"object-id":a.objectId},null,8,["object-id"]),r(p,{"object-id":a.objectId},null,8,["object-id"]),r(b,{"object-id":a.objectId},null,8,["object-id"]),r(f,{"object-id":a.objectId},null,8,["object-id"]),r(P,{"object-id":a.objectId},null,8,["object-id"]),r(L,{"object-id":a.objectId},null,8,["object-id"]),r(N,{"object-id":a.objectId},null,8,["object-id"]),r(k,{"object-id":a.objectId},null,8,["object-id"]),r(S,{"object-id":a.objectId},null,8,["object-id"]),r(F,{"object-id":a.objectId},null,8,["object-id"])])):u("",!0)}const wn=w(yn,[["render",Pn]]);export{Tn as I,wn as O,A as d};