PageSourceSearch

https://bibframe.org/classic/js/app.3bdb16ad.js

js bibframe.org collected 2026-10-02 03:09:20 UTC 786,026 bytes, 2 lines download raw bytes

1(function(t){function e(e){for(var a,s,l=e[0],n=e[1],c=e[2],d=0,p=[];d<l.length;d++)s=l[d],Object.prototype.hasOwnProperty.call(o,s)&&o[s]&&p.push(o[s][0]),o[s]=0;for(a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a]);u&&u(e);while(p.length)p.shift()();return r.push.apply(r,c||[]),i()}function i(){for(var t,e=0;e<r.length;e++){for(var i=r[e],a=!0,s=1;s<i.length;s++){var n=i[s];0!==o[n]&&(a=!1)}a&&(r.splice(e--,1),t=l(l.s=i[0]))}return t}var a={},o={app:0},r=[];function s(t){return l.p+"js/"+({}[t]||t)+"."+{"chunk-2d0ba165":"30edb041"}[t]+".js"}function l(e){if(a[e])return a[e].exports;var i=a[e]={i:e,l:!1,exports:{}};return t[e].call(i.exports,i,i.exports,l),i.l=!0,i.exports}l.e=function(t){var e=[],i=o[t];if(0!==i)if(i)e.push(i[2]);else{var a=new Promise((function(e,a){i=o[t]=[e,a]}));e.push(i[2]=a);var r,n=document.createElement("script");n.charset="utf-8",n.timeout=120,l.nc&&n.setAttribute("nonce",l.nc),n.src=s(t);var c=new Error;r=function(e){n.onerror=n.onload=null,clearTimeout(d);var i=o[t];if(0!==i){if(i){var a=e&&("load"===e.type?"missing":e.type),r=e&&e.target&&e.target.src;c.message="Loading chunk "+t+" failed.\n("+a+": "+r+")",c.name="ChunkLoadError",c.type=a,c.request=r,i[1](c)}o[t]=void 0}};var d=setTimeout((function(){r({type:"timeout",target:n})}),12e4);n.onerror=n.onload=r,document.head.appendChild(n)}return Promise.all(e)},l.m=t,l.c=a,l.d=function(t,e,i){l.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},l.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},l.t=function(t,e){if(1&e&&(t=l(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(l.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)l.d(i,a,function(e){return t[e]}.bind(null,a));return i},l.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return l.d(e,"a",e),e},l.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},l.p="/classic/",l.oe=function(t){throw console.error(t),t};var n=window["webpackJsonp"]=window["webpackJsonp"]||[],c=n.push.bind(n);n.push=e,n=n.slice();for(var d=0;d<n.length;d++)e(n[d]);var u=c;r.push([0,"chunk-vendors"]),i()})({0:function(t,e,i){t.exports=i("56d7")},"034f":function(t,e,i){"use strict";var a=i("85ec"),o=i.n(a);o.a},"03de":function(t,e,i){},"05d2":function(t,e,i){},1804:function(t,e,i){},"19b4":function(t,e,i){"use strict";var a=i("37b6"),o=i.n(a);o.a},"1a1e":function(t,e,i){"use strict";i("5319");const a={versionMajor:0,versionMinor:13,versionPatch:18,regionUrls:{dev:{ldpjs:Object({NODE_ENV:"production",BASE_URL:"/classic/"}).VUE_APP_ldpjs||"http://localhost:9401/api-staging/",util:Object({NODE_ENV:"production",BASE_URL:"/classic/"}).VUE_APP_util||"http://localhost:9401/util/",utilLang:Object({NODE_ENV:"production",BASE_URL:"/classic/"}).VUE_APP_utilLang||"http://localhost:9401/util-lang/",scriptshifter:Object({NODE_ENV:"production",BASE_URL:"/classic/"}).VUE_APP_scriptshifter||"http://localhost:9401/scriptshifter/",publish:Object({NODE_ENV:"production",BASE_URL:"/classic/"}).VUE_APP_publish||"http://localhost:9401/util/publish/staging",bfdb:Object({NODE_ENV:"production",BASE_URL:"/classic/"}).VUE_APP_bfdb||"https://preprod-8230.id.loc.gov/",profiles:Object({NODE_ENV:"production",BASE_URL:"/classic/"}).VUE_APP_profiles||"https://raw.githubusercontent.com/lcnetdev/bfe-profiles/main/profile-prod/data.json",starting:Object({NODE_ENV:"production",BASE_URL:"/classic/"}).VUE_APP_starting||"https://raw.githubusercontent.com/lcnetdev/bfe-profiles/main/starting-prod/data.json",id:Object({NODE_ENV:"production",BASE_URL:"/classic/"}).VUE_APP_id||"https://id.loc.gov/",env:Object({NODE_ENV:"production",BASE_URL:"/classic/"}).VUE_APP_env||"staging",dev:!0,displayLCOnlyFeatures:Object({NODE_ENV:"production",BASE_URL:"/classic/"}).VUE_APP_ldpjs||!0},staging:{ldpjs:"https://preprod-3001.id.loc.gov/bfe2/api-staging/",util:"https://preprod-3001.id.loc.gov/bfe2/util/",utilLang:"https://editor.id.loc.gov/bfe2/util-lang/",scriptshifter:"https://editor.id.loc.gov/bfe2/scriptshifter/",publish:"https://preprod-3001.id.loc.gov/bfe2/util/publish/staging",bfdb:"https://preprod-8230.id.loc.gov/",profiles:"/bfe2/util/profiles/profile/stage",starting:"/bfe2/util/profiles/starting/stage",id:"https://preprod-8080.id.loc.gov/",env:"staging",displayLCOnlyFeatures:!0},production:{ldpjs:"https://editor.id.loc.gov/bfe2/api-production/",util:"https://editor.id.loc.gov/bfe2/util/",utilLang:"https://editor.id.loc.gov/bfe2/util-lang/",scriptshifter:"https://editor.id.loc.gov/bfe2/scriptshifter/",publish:"https://editor.id.loc.gov/bfe2/util/publish/production",bfdb:"https://preprod-8230.id.loc.gov/",bfdbGPO:"https://preprod-8210.id.loc.gov/",profiles:"/bfe2/util/profiles/profile/prod",starting:"/bfe2/util/profiles/starting/prod",id:"https://preprod-8080.id.loc.gov/",env:"production",displayLCOnlyFeatures:!0},bibframeDotOrg:{ldpjs:"https://bibframe.org/marva/api-production/",util:"https://bibframe.org/marva/util/",utilLang:"https://bibframe.org/marva/util-lang/",scriptshifter:"https://bibframe.org/scriptshifter/",publish:"https://bibframe.org/marva/util/publish/production",bfdb:"https://id.loc.gov/",profiles:"https://bibframe.org/marva/util/profiles/profile/prod",starting:"https://bibframe.org/marva/util/profiles/starting/prod",id:"https://preprod-8080.id.loc.gov/",env:"production",publicEndpoints:!0,displayLCOnlyFeatures:!1}},returnUrls:function(){return"undefined"===typeof window||window&&window.location.href.startsWith("http://localhost")?this.regionUrls.dev:window&&window.location.href.startsWith("https://preprod-3001")?this.regionUrls.staging:window&&window.location.href.startsWith("https://editor.id")?this.regionUrls.production:window&&window.location.href.includes("bibframe.org/marva")||window&&window.location.href.includes("bibframe.org/classic")?this.regionUrls.bibframeDotOrg:void 0},convertToRegionUrl:function(t){let e=this.returnUrls();return(t.includes("/works/")||t.includes("/instances/")||t.includes("/items/")||t.includes("/hubs/"))&&t.includes("http://id.loc.gov")&&(t=t.replace("http://id.loc.gov/",e.bfdb)),t},postUsingAlmaXmlFormat:!1,profileHacks:{agentsHideManualRDFLabelIfURIProvided:{enabled:!0,desc:"If the <agent> has a URI don't populate the manual label field, only if there is no URI in the node populate"},profileParseFixLowerCaseContribution:{enabled:!0,desc:" someplaces lc:RT:bf2:Agents:Contribution is set to lc:RT:bf2:Agents:contribution (lowercase C) change it when lowercase to 'lc:RT:bf2:Agents:Contribution'"},profileParseFixPropertyURIWhenUpperCase:{enabled:!0,desc:"Sometimes a class is used in the propertyURI field? /Role instead of /role for example, change them to camel case when not lowercase"},removeExtraFieldsInContributor:{enabled:!0,desc:"Remove things like bflc:name00MatchKey bflc:primaryContributorName
100MatchKey bflc:name00MarcKey fron contributor tags"}},literalLangOptions:{ignorePtURIs:["http://id.loc.gov/ontologies/bibframe/provisionActivity","http://id.loc.gov/ontologies/bibframe/supplementaryContent","http://id.loc.gov/ontologies/bibframe/subject","http://id.loc.gov/ontologies/bflc/aap-normalized","http://id.loc.gov/ontologies/bflc/aap","http://id.loc.gov/ontologies/bibframe/shelfMark","http://id.loc.gov/ontologies/bibframe/classification","http://id.loc.gov/ontologies/bibframe/dimensions","http://id.loc.gov/ontologies/bibframe/extent","http://id.loc.gov/ontologies/bibframe/notation"]},checkForRepeatedLiterals:["http://id.loc.gov/ontologies/bibframe/mainTitle","http://id.loc.gov/ontologies/bibframe/subtitle","http://www.w3.org/2000/01/rdf-schema#label","http://id.loc.gov/ontologies/bibframe/date"],allowLiteralRepeatForNonRomain:["http://id.loc.gov/ontologies/bibframe/title","http://id.loc.gov/ontologies/bibframe/provisionActivity","http://id.loc.gov/ontologies/bibframe/agent"],templatesDataFlowCantBeBoth:["id.loc.gov/ontologies/bibframe/adminMetadata"],templatesDataFlowHide:["id.loc.gov/ontologies/bibframe/instanceOf","http://id.loc.gov/ontologies/bibframe/hasInstance"],isLiteral:["http://www.w3.org/2000/01/rdf-schema#Literal"],lookupConfig:{"http://id.loc.gov/authorities/childrensSubjects":{name:"childrensSubjects",type:"complex",modes:[]},"http://id.loc.gov/authorities/demographicTerms":{name:"demographicTerms",type:"complex",modes:[]},"http://id.loc.gov/authorities/genreForms":{name:"genreForms",type:"complex",processor:"lcAuthorities",modes:[{"LCGFT All":{url:"https://id.loc.gov/authorities/genreForms/suggest2/?q=<QUERY>&count=25",all:!0}}]},"http://id.loc.gov/authorities/names":{name:"names",type:"complex",processor:"lcAuthorities",modes:[{"NAF All":{url:"https://id.loc.gov/authorities/names/suggest2/?q=<QUERY>&count=25",all:!0},"NAF Personal Names":{url:"https://id.loc.gov/authorities/names/suggest2/?q=<QUERY>&rdftype=PersonalName&count=25"},"NAF Corporate Name":{url:"https://id.loc.gov/authorities/names/suggest2/?q=<QUERY>&rdftype=CorporateName&count=25"},"NAF Name/Title":{url:"https://id.loc.gov/authorities/names/suggest2/?q=<QUERY>&rdftype=NameTitle&count=25"},"NAF Title":{url:"https://id.loc.gov/authorities/names/suggest2/?q=<QUERY>&rdftype=Title&count=25"},"NAF Geographic":{url:"https://id.loc.gov/authorities/names/suggest2/?q=<QUERY>&rdftype=Geographic&count=25"},"NAF Conference Name":{url:"https://id.loc.gov/authorities/names/suggest2/?q=<QUERY>&rdftype=ConferenceName&count=25"}}]},"http://preprod.id.loc.gov/authorities/names":{name:"names",type:"complex",processor:"lcAuthorities",modes:[{"NAF All":{url:"http://preprod.id.loc.gov/authorities/names/suggest2/?q=<QUERY>&count=25",all:!0},"NAF Personal Names":{url:"http://preprod.id.loc.gov/authorities/names/suggest2/?q=<QUERY>&rdftype=PersonalName&count=25"},"NAF Corporate Name":{url:"http://preprod.id.loc.gov/authorities/names/suggest2/?q=<QUERY>&rdftype=CorporateName&count=25"},"NAF Name/Title":{url:"http://preprod.id.loc.gov/authorities/names/suggest2/?q=<QUERY>&rdftype=NameTitle&count=25"},"NAF Title":{url:"http://preprod.id.loc.gov/authorities/names/suggest2/?q=<QUERY>&rdftype=Title&count=25"},"NAF Geographic":{url:"http://preprod.id.loc.gov/authorities/names/suggest2/?q=<QUERY>&rdftype=Geographic&count=25"},"NAF Conference Name":{url:"http://preprod.id.loc.gov/authorities/names/suggest2/?q=<QUERY>&rdftype=ConferenceName&count=25"}}]},"http://id.loc.gov/authorities/performanceMediums":{name:"Works",processor:"lcAuthorities",type:"complex",modes:[{All:{url:"http://id.loc.gov/authorities/performanceMediums/suggest2/?q=<QUERY>&count=25",all:!0}}]},"http://id.loc.gov/authorities/subjects":{name:"subjects",type:"complex",processor:"lcAuthorities",modes:[{"LCSH All":{url:"https://id.loc.gov/authorities/subjects/suggest2/?q=<QUERY>&count=25",all:!0},"LCSH Topics":{url:"https://id.loc.gov/authorities/subjects/suggest2/?q=<QUERY>&rdftype=Topic&count=25"},"LCSH Geographic":{url:"https://id.loc.gov/authorities/subjects/suggest2/?q=<QUERY>&rdftype=Geographic&count=25"},"LCSH Name":{url:"https://id.loc.gov/authorities/subjects/suggest2/?q=<QUERY>&rdftype=Name&count=25"},"LCSH FamilyName":{url:"https://id.loc.gov/authorities/subjects/suggest2/?q=<QUERY>&rdftype=FamilyName&count=25"},"LCSH CorporateName":{url:"https://id.loc.gov/authorities/subjects/suggest2/?q=<QUERY>&rdftype=CorporateName&count=25"},"LCSH GenreForm":{url:"https://id.loc.gov/authorities/subjects/suggest2/?q=<QUERY>&rdftype=GenreForm&count=25"},"LCSH Simple Type":{url:"https://id.loc.gov/authorities/subjects/suggest2/?q=<QUERY>&rdftype=SimpleType&count=25"},"LCSH Complex Subject":{url:"https://id.loc.gov/authorities/subjects/suggest2/?q=<QUERY>&rdftype=ComplexSubject&count=25"},"LCSH Temporal":{url:"https://id.loc.gov/authorities/subjects/suggest2/?q=<QUERY>&rdftype=Temporal&count=25"}}]},"http://id.loc.gov/authorities/geographics":{name:"geographics",type:"complex",processor:"lcAuthorities",modes:[{"LCNAF Geographic":{url:"https://id.loc.gov/authorities/names/suggest2/?q=<QUERY>&rdftype=Geographic&memberOf=http://id.loc.gov/authorities/names/collection_NamesAuthorizedHeadings&count=25"},"LCSH Geographic":{url:"https://id.loc.gov/authorities/subjects/suggest2/?q=<QUERY>&rdftype=Geographic&memberOf=http://id.loc.gov/authorities/subjects/collection_LCSHAuthorizedHeadings&count=25"},GACS:{url:"https://id.loc.gov/vocabulary/geographicAreas/suggest2/?q=<QUERY>&rdftype=Geographic&count=25"}}]},HierarchicalGeographic:{name:"names",type:"complex",processor:"lcAuthorities",modes:[{All:{url:"https://id.loc.gov/authorities/suggest2/?q=<QUERY>&rdftype=HierarchicalGeographic&count=25",all:!0}}]}
1,"http://id.loc.gov/entities/providers":{name:"providers",type:"complex",modes:[]},"http://id.loc.gov/entities/relationships":{name:"relationships",processor:"lcAuthorities",type:"complex",modes:[{All:{url:"https://id.loc.gov/entities/relationships/suggest2/?q=<QUERY>&count=25",all:!0}}]},"http://id.loc.gov/vocabulary/geographicAreas":{name:"geographicAreas",processor:"lcAuthorities",type:"complex",minCharBeforeSearch:2,modes:[{All:{url:"https://id.loc.gov/vocabulary/geographicAreas/suggest2/?q=<QUERY>&count=25",all:!0}}]},"https://preprod-8230.id.loc.gov/resources/works":{name:"Works",processor:"lcAuthorities",type:"complex",modes:[{"Works - Keyword":{url:"https://preprod-8080.id.loc.gov/resources/works/suggest2/?q=?<QUERY>&count=25",all:!0},"Works - Left Anchored":{url:"https://preprod-8080.id.loc.gov/resources/works/suggest2/?q=<QUERY>&count=25"},"Hubs - Keyword":{url:"https://preprod-8080.id.loc.gov/resources/hubs/suggest2/?q=?<QUERY>&count=25"},"Hubs - Left Anchored":{url:"https://preprod-8080.id.loc.gov/resources/hubs/suggest2/?q=<QUERY>&count=25"}}]},"https://preprod-8295.id.loc.gov/resources/works":{name:"Works",processor:"lcAuthorities",type:"complex",modes:[{"Works - Keyword":{url:"https://preprod-8295.id.loc.gov/resources/works/suggest2/?q=?<QUERY>&count=25",all:!0},"Works - Left Anchored":{url:"https://preprod-8295.id.loc.gov/resources/works/suggest2/?q=<QUERY>&count=25"},"Hubs - Keyword":{url:"https://preprod-8295.id.loc.gov/resources/hubs/suggest2/?q=?<QUERY>&count=25"},"Hubs - Left Anchored":{url:"https://preprod-8295.id.loc.gov/resources/hubs/suggest2/?q=<QUERY>&count=25"}}]},"https://preprod-8210.id.loc.gov/resources/works/":{name:"Works",processor:"lcAuthorities",type:"complex",modes:[{"Works - Keyword":{url:"https://preprod-8295.id.loc.gov/resources/works/suggest2/?q=?<QUERY>&count=25",all:!0},"Works - Left Anchored":{url:"https://preprod-8295.id.loc.gov/resources/works/suggest2/?q=<QUERY>&count=25"},"Hubs - Keyword":{url:"https://preprod-8295.id.loc.gov/resources/hubs/suggest2/?q=?<QUERY>&count=25"},"Hubs - Left Anchored":{url:"https://preprod-8295.id.loc.gov/resources/hubs/suggest2/?q=<QUERY>&count=25"}}]},"https://preprod-8295.id.loc.gov/resources/works/":{name:"Works",processor:"lcAuthorities",type:"complex",modes:[{"Works - Keyword":{url:"https://preprod-8295.id.loc.gov/resources/works/suggest2/?q=?<QUERY>&count=25",all:!0},"Works - Left Anchored":{url:"https://preprod-8295.id.loc.gov/resources/works/suggest2/?q=<QUERY>&count=25"},"Hubs - Keyword":{url:"https://preprod-8295.id.loc.gov/resources/hubs/suggest2/?q=?<QUERY>&count=25"},"Hubs - Left Anchored":{url:"https://preprod-8295.id.loc.gov/resources/hubs/suggest2/?q=<QUERY>&count=25"}}]},"https://preprod-8080.id.loc.gov/resources/works":{name:"Works",processor:"lcAuthorities",type:"complex",modes:[{"Works - Keyword":{url:"https://preprod-8080.id.loc.gov/resources/works/suggest2/?q=?<QUERY>&count=25",all:!0},"Works - Left Anchored":{url:"https://preprod-8080.id.loc.gov/resources/works/suggest2/?q=<QUERY>&count=25"},"Hubs - Keyword":{url:"https://preprod-8080.id.loc.gov/resources/hubs/suggest2/?q=?<QUERY>&count=25"},"Hubs - Left Anchored":{url:"https://preprod-8080.id.loc.gov/resources/hubs/suggest2/?q=<QUERY>&count=25"}}]},"https://preprod-8080.id.loc.gov/resources/works/":{name:"Works",processor:"lcAuthorities",type:"complex",modes:[{"Works - Keyword":{url:"https://preprod-8080.id.loc.gov/resources/works/suggest2/?q=?<QUERY>&count=25",all:!0},"Works - Left Anchored":{url:"https://preprod-8080.id.loc.gov/resources/works/suggest2/?q=<QUERY>&count=25"},"Hubs - Keyword":{url:"https://preprod-8080.id.loc.gov/resources/hubs/suggest2/?q=?<QUERY>&count=25"},"Hubs - Left Anchored":{url:"https://preprod-8080.id.loc.gov/resources/hubs/suggest2/?q=<QUERY>&count=25"}}]},"https://id.loc.gov/resources/hubs":{name:"Works",processor:"lcAuthorities",type:"complex",modes:[{"Hubs - Keyword":{url:"https://preprod-8080.id.loc.gov/resources/hubs/suggest2/?q=?<QUERY>&count=25",all:!0},"Hubs - Left Anchored":{url:"https://preprod-8080.id.loc.gov/resources/hubs/suggest2/?q=<QUERY>&count=25"}}]},"https://preprod-8080.id.loc.gov/resources/hubs":{name:"Hubs",processor:"lcAuthorities",type:"complex",modes:[{"Hubs - Keyword":{url:"https://preprod-8080.id.loc.gov/resources/hubs/suggest2/?q=?<QUERY>&count=25",all:!0},"Hubs - Left Anchored":{url:"https://preprod-8080.id.loc.gov/resources/hubs/suggest2/?q=<QUERY>&count=25"}}]},"https://preprod-8080.id.loc.gov/resources/instances":{name:"Instances",processor:"lcAuthorities",type:"complex",modes:[{All:{url:"https://preprod-8080.id.loc.gov/resources/instances/suggest2/?q=<QUERY>&count=25",all:!0}}]},"https://preprod-8230.id.loc.gov/resources/instances":{name:"Instances",processor:"lcAuthorities",type:"complex",modes:[{All:{url:"https://preprod-8080.id.loc.gov/resources/instances/suggest2/?q=<QUERY>&count=25",all:!0}}]},"http://id.loc.gov/entities/roles":{name:"roles",type:"complex",modes:[]},"http://id.loc.gov/resources/works":{name:"works",type:"complex",modes:[]},"http://id.loc.gov/rwo/agents":{name:"agents",type:"complex",modes:[]},"http://id.loc.gov/vocabulary/carriers":{name:"carriers",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/classSchemes":{name:"classSchemes",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/contentTypes":{name:"contentTypes",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/countries":{name:"countries",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/descriptionConventions":{name:"descriptionConventions",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/frequencies":{name:"frequencies",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/genreFormSchemes":{name:"genreFormSchemes",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/graphicMaterials":{name:"graphicMaterials",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/issuance":{name:"issuance",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/languages":{name:"languages",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/marcauthen":{name:"marcauthen",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/marcgt":{name:"marcgt",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/maspect":{name:"maspect",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/maudience":{name:"maudience",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/mbroadstd":{name:"mbroadstd",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/mcapturestorage":{name:"mcapturestorage",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/mcolor":{name:"mcolor",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/mediaTypes":{name:"mediaTypes",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/menclvl":{name:"menclvl",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/mfiletype":{name:"mfiletype",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/mgeneration":{name:"mgeneration",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/mgroove":{name:"mgroove",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/millus":{name:"millus",type:"simple",modes:[]}
1,"http://id.loc.gov/vocabulary/mlayout":{name:"mlayout",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/mmaterial":{name:"mmaterial",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/mmusicformat":{name:"mmusicformat",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/mmusnotation":{name:"mmusnotation",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/mplayback":{name:"mplayback",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/mpolarity":{name:"mpolarity",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/mpresformat":{name:"mpresformat",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/mproduction":{name:"mproduction",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/mrecmedium":{name:"mrecmedium",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/mrectype":{name:"mrectype",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/mregencoding":{name:"mregencoding",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/mrelief":{name:"mrelief",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/mscale":{name:"mscale",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/mscript":{name:"mscript",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/msoundcontent":{name:"msoundcontent",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/mspecplayback":{name:"mspecplayback",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/mstatus":{name:"mstatus",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/msupplcont":{name:"msupplcont",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/mtechnique":{name:"mtechnique",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/organizations":{name:"organizations",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/relators":{name:"relators",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/resourceComponents":{name:"resourceComponents",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/resourceTypes":{name:"resourceTypes",type:"simple",modes:[]},"http://id.loc.gov/vocabulary/subjectSchemes":{name:"subjectSchemes",type:"simple",modes:[]},"http://mlvlp04.loc.gov:3000/verso/api/configs?filter[where][configType]=noteTypes&filter[fields][json]=true":{name:"true",type:"simple",modes:[]},"http://mlvlp04.loc.gov:8080/authorities/classification/G":{name:"G",type:"simple",modes:[]},"http://mlvlp04.loc.gov:8230/resources/instances":{name:"instances",type:"simple",modes:[]},"http://mlvlp04.loc.gov:8230/resources/works":{name:"works",type:"simple",modes:[]},"http://mlvlp06.loc.gov:8288/resources/hubs":{name:"hubs",type:"simple",modes:[]},"http://mlvlp06.loc.gov:8288/resources/works":{name:"works",type:"simple",modes:[]},"http://rdaregistry.info/termList/RDAContentType/":{name:"RDAContentType/",type:"simple",modes:[]},"http://www.rdaregistry.info/termList/RDAColourContent/":{name:"RDAColourContent/",type:"simple",modes:[]},"https://lookup.ld4l.org/authorities/search/linked_data/dbpedia_ld4l_cache":{name:"dbpedia_ld4l_cache",type:"simple",modes:[]},"https://lookup.ld4l.org/authorities/search/linked_data/getty_aat_ld4l_cache":{name:"getty_aat_ld4l_cache",type:"simple",modes:[]},"https://www.wikidata.org/w/api.php":{name:"wikidata",type:"complex",processor:"wikidataAPI",modes:[{Wikidata:{url:"https://www.wikidata.org/w/api.php?action=wbsearchentities&search=<QUERY>&format=json&errorformat=plaintext&language=en&uselang=en&type=item&origin=*",all:!0}}]}}};e["a"]=a},"1bca":function(t,e,i){"use strict";const a={refComponentSwitchButton:"Use [Left Arrow] and [Right Arrow] keys or click to switch",propertyDuplicateSymbol:"+",propertyRemoveSymbol:"-",propertyDuplicateTip:"Click to duplicate this property or press [Crtl and SHIFT +]"};e["a"]=a},"1d4c":function(t,e,i){},2191:function(t,e,i){},"21a7":function(t,e,i){},"25d9":function(t,e,i){},"2ad0":function(t,e,i){},"30f2":function(t,e,i){"use strict";var a=i("3fdb"),o=i.n(a);o.a},"321f":function(t,e,i){"use strict";var a=i("3ffa"),o=i.n(a);o.a},"334c":function(t,e,i){"use strict";var a=i("21a7"),o=i.n(a);o.a},"35b4":function(t,e,i){"use strict";var a=i("6ae6"),o=i.n(a);o.a},"37b6":function(t,e,i){}
1,"3d1c":function(t,e,i){"use strict";var a=i("674a"),o=i.n(a);o.a},"3fdb":function(t,e,i){},"3ffa":function(t,e,i){},"400e":function(t,e,i){},4360:function(t,e,i){"use strict";i("ddb0");var a=i("2b0e"),o=i("2f62"),r=i("dd89"),s=i("adac"),l=i("9068");a["a"].use(o["a"]);const n=t=>[...new Set(t)],c=(t,e)=>{let i=null;return(...a)=>{window.clearTimeout(i),i=window.setTimeout(()=>{t.apply(null,a)},e)}};e["a"]=new o["a"].Store({state:{profilesLoaded:!1,profiles:[],profilesUnmodified:[],rtLookup:{},rtLookupUnmodified:{},startingPoints:{},activeProfile:{},activeProfileIdCounter:{},workingOnMiniProfile:!1,activeProfileMini:{},activeRecordSaved:!1,sartingPoint:"lc:profile:bf2:Monograph",userName:"demo",activeInput:null,catInitials:null,settingsDPackVoyager:!0,settingsDPackVoyagerNative:!1,settingsLookupsUseTextSubjectEditor:!0,settingsDisplayMode:"default",settingsHideEmptyFields:!1,settingsLeftMenuEnriched:!0,settingsTreatLikeNoteFields:"ALL_FIELDS",lookupLibrary:{},ontologyLookup:{},disableMacroKeyNav:!1,activeComplexSearch:[],activeComplexSearchInProgress:!1,activeComponent:null,activeProfileName:null,activeEditCounter:0,contextData:{},supportedRomanizations:[],supportedScriptShifter:[],idWorkSearchResults:[],idXML:"",bfdbXML:"",allRecords:[],myRecords:[],subjectList:[],diagramMiniMap:!1,undo:[],undoIndex:-1,undoCounter:0,activeUndoLog:[],loadResourceFavorites:[],subjectEditorMode:"build",saveRecord:c((t,e)=>{console.log("--------------------SAVING NOW ----------------------"),console.log("--------------------SAVING NOW ----------------------"),console.log("--------------------SAVING NOW ----------------------"),console.log("--------------------SAVING NOW ----------------------"),l["a"].toBFXML(t.activeProfile).then(i=>{console.log("NEW STATE:",JSON.parse(JSON.stringify(t.activeProfile))),s["a"].saveRecord(i.xlmStringBasic,t.activeProfile.eId),e("ACTIVERECORDSAVED",!0),console.log("state.undoIndex:",t.undoIndex,"state.undo.length - 1:",t.undo.length-1),t.undo.length-1>t.undoIndex&&(console.log("Splicing this shit"),t.undo.splice(t.undoIndex+1)),t.undoIndex=t.undoIndex+1,console.log("NEW STATE:",JSON.parse(JSON.stringify(t.activeProfile))),0==t.activeUndoLog.length&&t.activeUndoLog.push("Unknown change..."),t.activeUndoLog=n(t.activeUndoLog),t.undo.push({state:JSON.parse(JSON.stringify(t.activeProfile)),log:JSON.parse(JSON.stringify(t.activeUndoLog))}),t.activeUndoLog=[],console.log(t.undo),t.undoCounter++})},2e3)},mutations:{PROFILES(t,e){t.profiles=e,t.profilesLoaded=!0},PROFILESUNMODIFIED(t,e){t.profiles=e},RTLOOKUP(t,e){t.rtLookup=e},RTLOOKUPUNMODIFIED(t,e){t.rtLookupUnmodified=e},STARTINGPOINTS(t,e){t.startingPoints=e},LOOKUP(t,e){t.lookupLibrary[e.metadata.uri]=e},LOOKUPCOMPLEX(t,e){t.activeComplexSearch=e},LOOKUPCOMPLEXSTATUS(t,e){t.activeComplexSearchInProgress=e},CONTEXT(t,e){t.contextData=e},CATINITALS(t,e){t.catInitials=e},MACNAV(t,e){t.disableMacroKeyNav=e},ACTIVEINPUT(t,e){t.activeInput=e},ACTIVECOMPONET(t,e){t.activeComponent=e},ACTIVEPROFILE(t,e){t.activeProfile=e},ACTIVEPROFILEMINI(t,e){t.activeProfileMini=e},ACTIVEPROFILECOUNTER(t,e){t.activeProfileIdCounter=e},ACTIVEPROFILENAME(t,e){t.activeProfileName=e},ACTIVEPROFILEMININAME(t,e){t.activeProfileMiniName=e},ACTIVEEDITCOUNTER(t){t.activeEditCounter++},ONYOLOGYLOOKUP(t,e){t.ontologyLookup[e.uri]=e},IDWORKSEARCH(t,e){t.idWorkSearchResults=e},IDXML(t,e){t.idXML=e},BFDBXML(t,e){t.bfdbXML=e},MYRECORDS(t,e){t.myRecords=e},ALLRECORDS(t,e){t.allRecords=e},WORKINGONMINIPROFILE(t,e){t.workingOnMiniProfile=e},SETTINGSDPACKVOYAGER(t,e){t.settingsDPackVoyager=e},SUBJECTLIST(t,e){t.subjectList=e},SETTINGSDPACKVOYAGERNATIVE(t,e){t.settingsDPackVoyagerNative=e},SETTINGSLOOKUPSUSETEXTSUBJECTEDITOR(t,e){t.settingsLookupsUseTextSubjectEditor=e},SETTINGSDISPLAYMODE(t,e){t.settingsDisplayMode=e},SETTINGSHIDEEMPTYFIELDS(t,e){t.settingsHideEmptyFields=e},SETTINGSLEFTMENUENRICHED(t,e){t.settingsLeftMenuEnriched=e},SETUNDO(t,e){t.undo=e},TREATLIKENOTEFIELDS(t,e){t.settingsTreatLikeNoteFields=e},INCREMENTUNDOCOUNTER(t){t.undoCounter=t.undoCounter+1},UNDOLOG(t,e){t.activeUndoLog=e},SETUNDOINDEX(t,e){t.undoIndex=e},ACTIVERECORDSAVED(t,e){t.activeRecordSaved=e},DIAGRAMMINIMAP(t,e){t.diagramMiniMap=e},SUPORTEDROMANIZATIONS(t,e){t.supportedRomanizations=e},SUPORTEDSCRIPTSHIFTER(t,e){t.supportedScriptShifter=e},LOADRESOURCEFAVORITES(t,e){t.loadResourceFavorites=e},SUBJECTEDITORMODE(t,e){t.subjectEditorMode=e}},actions:{async fetchProfiles({commit:t}){let e=await r["a"].buildProfiles();t("PROFILES",e.profiles),t("RTLOOKUP",e.lookup),t("PROFILESUNMODIFIED",JSON.parse(JSON.stringify(e.profiles))),t("RTLOOKUPUNMODIFIED",JSON.parse(JSON.stringify(e.lookup))),t("STARTINGPOINTS",e.
1startingPoints)},async fetchLookupValues({commit:t},e){let i;i=e.keyword?await s["a"].loadSimpleLookupKeyword(e.url,e.keyword):await s["a"].loadSimpleLookup(e.url),t("LOOKUP",i)},async fetchLookupValuesComplex({commit:t},e){t("LOOKUPCOMPLEX",[]),t("LOOKUPCOMPLEXSTATUS",!0);let i=await s["a"].searchComplex(e.searchPayload);t("LOOKUPCOMPLEXSTATUS",!1),t("LOOKUPCOMPLEX",i)},clearLookupValuesComplex({commit:t}){t("LOOKUPCOMPLEX",[])},async fetchContext({commit:t},e){t("CONTEXT",{});let i=await s["a"].returnContext(e.searchPayload);t("CONTEXT",i)},async fetchIdWorkSearch({commit:t},e){t("IDWORKSEARCH",{});let i=await s["a"].fetchIdWorkSearch(e.searchValue);t("IDWORKSEARCH",i)},async fetchIdXML({commit:t},e){t("IDXML","");let i=await s["a"].fetchIdXML(e.url);t("IDXML",i)},async fetchBfdbXML({commit:t},e){t("BFDBXML","");let i=await s["a"].fetchBfdbXML(e.url);t("BFDBXML",i)},async fetchOntology({commit:t},e){let i=await s["a"].fetchOntology(e.uri);t("ONYOLOGYLOOKUP",i)},async fetchAllRecords({commit:t},e){let i=await s["a"].fetchRecords(e.user,e.search);t("ALLRECORDS",i)},async fetchMyRecords({commit:t},e){let i=await s["a"].fetchRecords(e.user);t("MYRECORDS",i)},setWorkingOnMiniProfile({commit:t},e){t("WORKINGONMINIPROFILE",e.value)},clearContext({commit:t}){t("CONTEXT",{})},setContextManually({commit:t},e){t("CONTEXT",e.context)},async setActiveProfile({commit:t,state:e},i){if(i.useDefaultValues&&(i.profile=await r["a"].populateDefaultValuesIntoUserValues(i.profile)),i.profile=r["a"].reorderRTOrder(i.profile),console.log("Working on setActiveProfile",e.workingOnMiniProfile),e.workingOnMiniProfile)t("ACTIVEPROFILEMINI",i.profile);else{t("ACTIVEPROFILE",i.profile);let e=r["a"].returnDiagramMiniMap(i.profile);t("DIAGRAMMINIMAP",e)}},setCatInitials({commit:t},e){t("CATINITALS",e.catInitials)},async setValueComplex({commit:t,state:e},i){let a;e.workingOnMiniProfile?(a=await r["a"].setValueComplex(e.activeProfileMini,i.profileComponet,i.structure.propertyURI,e.activeProfileName,i.template,e.contextData,i.structure,i.parentStructure,i.propertyPath),a=r["a"].rebuildHubURI(a),t("ACTIVEPROFILEMINI",a)):(a=await r["a"].setValueComplex(e.activeProfile,i.profileComponet,i.structure.propertyURI,e.activeProfileName,i.template,e.contextData,i.structure,i.parentStructure,i.propertyPath),a=r["a"].rebuildHubURI(a),t("ACTIVEPROFILE",a),t("ACTIVEEDITCOUNTER"),t("ACTIVERECORDSAVED",!1),e.saveRecord(e,t))},setSubjectOrder({commit:t,state:e},i){let a=r["a"].reorderSubjects(e.activeProfile,i);t("ACTIVEPROFILE",a)},forceSave({commit:t,state:e}){e.saveRecord(e,t)},incrementUndoCounter({commit:t}){t("INCREMENTUNDOCOUNTER")},setActiveUndo({commit:t,state:e},i){let a=[i.msg];e.activeUndoLog.length>0&&(a=JSON.parse(JSON.stringify(e.activeUndoLog)),a.push(i.msg)),t("UNDOLOG",a)},clearUndo({commit:t}){t("SETUNDO",[]),t("UNDOLOG",[]),t("SETUNDOINDEX",-1)},undoRedoAction({commit:t,state:e},i){if(i.undo){let a=e.undoIndex-i.undo;if(a>=0){let i=JSON.parse(JSON.stringify(e.undo[a].state));t("SETUNDOINDEX",a),t("ACTIVEPROFILE",i),console.log("going vack to this state:",a,e.undo[a])}}else if(i.redo){let a=e.undoIndex+i.redo;if(a<=e.undo.length){let i=JSON.parse(JSON.stringify(e.undo[a].state));t("SETUNDOINDEX",a),t("ACTIVEPROFILE",i),console.log("going forward to this state:",a,e.undo[a])}}else if("goto"in i){let a=JSON.parse(JSON.stringify(e.undo[i.goto].state));t("SETUNDOINDEX",i.goto),t("ACTIVEPROFILE",a)}},setLangLiterals({commit:t,state:e},i){let a=r["a"].setLangLiterals(e.activeProfile,i.literalObj,i.lang);t("ACTIVEPROFILE",a),t("ACTIVEEDITCOUNTER"),t("ACTIVERECORDSAVED",!1),e.saveRecord(e,t)},setTemplateDataFlow({commit:t,state:e},i){e.activeProfile.templateDataFlow||(e.activeProfile.templateDataFlow={}),"both"==i.value?delete e.activeProfile.templateDataFlow[i.id]:e.activeProfile.templateDataFlow[i.id]=i.value,0==Object.keys(e.activeProfile.templateDataFlow)&&delete e.activeProfile.templateDataFlow,t("ACTIVEPROFILE",e.activeProfile)},setTemplateName({commit:t,state:e},i){e.activeProfile.templateLabel=i.value,t("ACTIVEPROFILE",e.activeProfile)},async setValueSubject({commit:t,state:e},i){let a=await r["a"].setValueSubject(e.activeProfile,i.profileComponet,e.activeProfileName,i.subjectComponents,i.propertyPath);t("ACTIVEPROFILE",a),t("ACTIVEEDITCOUNTER"),t("ACTIVERECORDSAVED",!1),e.saveRecord(e,t)},subjectEditorMode({commit:t},e){t("SUBJECTEDITORMODE",e.mode),localStorage.setItem("bfeSettingsSubjectBuildMode",e.mode)},setSettingsDPackVoyager({commit:t},e){t("SETTINGSDPACKVOYAGER",e.settingsDPackVoyager),localStorage.setItem("bfeSettingsDPackVoyager",e.settingsDPackVoyager)},setSettingsDPackVoyagerNative({commit:t},e){t("SETTINGSDPACKVOYAGERNATIVE",e.settingsDPackVoyagerNative),localStorage.setItem("bfeSettingsDPackVoyagerNative",e.settingsDPackVoyagerNative)},settingsLookupsUseTextSubjectEditor({commit:t},e){t("SETTINGSLOOKUPSUSETEXTSUBJECTEDITOR",e.settingsLookupsUseTextSubjectEditor),localStorage.setItem("bfeSettingsLookupsUseTextSubjectEditor",e.settingsLookupsUseTextSubjectEditor)},settingsDisplayMode({commit:t},e){t("SETTINGSDISPLAYMODE",e.settingsDisplayMode),localStorage.setItem("bfeSettingsDisplayMode",e.settingsDisplayMode)},settingsHideEmptyFields({commit:t},e){t("SETTINGSHIDEEMPTYFIELDS",e.settingsHideEmptyFields),localStorage.setItem("bfeSettingsHideEmptyFields",e.settingsHideEmptyFields)},settingsLeftMenuEnriched({commit:t},e){t("SETTINGSLEFTMENUENRICHED",e.settingsLeftMenuEnriched),localStorage.setItem("bfeSettingsLeftMenuEnriched",e.settingsLeftMenuEnriched)},setTreatLikeNoteFields({commit:t},e){t("TREATLIKENOTEFIELDS",e.fields),localStorage.setItem("bfeTreatLikeNoteFields",e.fields)},async removeValuebyURI({commit:t,state:e},i){let a=r["a"].removeValuebyURI(e.activeProfile,i.ptGuid,i.uriToRemove,i.propertyPath);return t("ACTIVEPROFILE",a),t("ACTIVEEDITCOUNTER"),t("ACTIVERECORDSAVED",!1),e.saveRecord(e,t),a},async removeValueSimple({commit:t,state:e},i){let a=r["a"].removeValueSimple(e.activeProfile,i.ptGuid,i.idGuid,i.labelGuid,i.propertyPath);return t("ACTIVEPROFILE",a),t("ACTIVEEDITCOUNTER"),t("ACTIVERECORDSAVED",!1),e.saveRecord(e,t),a},async setValueSimple({commit:t,state:e},i){let a;return e.workingOnMiniProfile?(a=await r["a"].setValueSimple(e.activeProfileMini,i.ptGuid,i.valueURI,i.valueLabel,i.propertyPath),t("ACTIVEPROFILEMINI",a.currentState)):(a=await r["a"].setValueSimple(e.activeProfile,i.ptGuid,i.valueURI,i.valueLabel,i.propertyPath),t("ACTIVEPROFILE",a.currentState),t("ACTIVEEDITCOUNTER"),t("ACTIVERECORDSAVED",!1),e.saveRecord(e,t)),a.newData},async setValueLiteral({commit:t,state:e},i){let a;return e.workingOnMiniProfile?(a=await r["a"].setValueLiteral(e.activeProfileMini,i.ptGuid,i.guid,i.value,i.propertyPath),a.currentState=r["a"].rebuildHubURI(a.currentState),t("ACTIVEPROFILEMINI",a.currentState)):(a=await r["a"].setValueLiteral(e.activeProfile,i.ptGuid,i.guid,i.value,i.propertyPath),a.currentState=r["a"].rebuildHubURI(a.currentState),t("ACTIVEPROFILE",a.currentState),t("ACTIVEEDITCOUNTER"),t("ACTIVERECORDSAVED",!1),e.saveRecord(e,t)),a.newGuid},async refTemplateChange({commit:t,state:e},i){let a=r["a"].refTemplateChange(e.activeProfile,i.profileComponet,i.structure.propertyURI,e.activeProfileName,i.template,i.parentId,i.thisRef,i.nextRef);t("ACTIVEPROFILE",a)},returnDiagramMiniMap({commit:t,state:e}){let i=r["a"].returnDiagramMiniMap(e.activeProfile);t("DIAGRAMMINIMAP",i)},setSubjectList({commit:t,state:e}){let i=r["a"].returnSubjectList(e.activeProfile);console.log(i),t("SUBJECTLIST",i)},async setSupportedRomanizations({commit:t}){let e=await s["a"].supportedRomanizations();console.log("supportedRomanizations",e),t("SUPORTEDROMANIZATIONS",e)},async setSupportedScriptShifter({commit:t}){let e=await s["a"].supportedScriptShifter();console.log("supportedScriptShifter",e),t("SUPORTEDSCRIPTSHIFTER",e)},cloneInstance({commit:t,state:e},i){let a=r["a"].cloneInstance(e.activeProfile,i.uri);t("ACTIVEPROFILE",a);let o=r["a"].returnDiagramMiniMap(a);t("DIAGRAMMINIMAP",o)},async addInstance({commit:t,state:e}){let i=await r["a"].addInstance(e.activeProfile);i=r["a"].reorderRTOrder(i),t("ACTIVEPROFILE",i);let a=r["a"].returnDiagramMiniMap(i);t("DIAGRAMMINIMAP",a)},deleteInstance({commit:t,state:e},i){let a=r["a"].deleteInstance(e.activeProfile,i.uri);a=r["a"].reorderRTOrder(a),t("ACTIVEPROFILE",a);let o=r["a"].returnDiagramMiniMap(a);t("DIAGRAMMINIMAP",o)},deleteItem({commit:t,state:e},i){let a=r["a"].deleteItem(e.activeProfile,i.uri);a=r["a"].reorderRTOrder(a),t("ACTIVEPROFILE",a);let o=r["a"].returnDiagramMiniMap(a);t("DIAGRAMMINIMAP",o)},duplicateItem({commit:t,state:e},i){let a=r["a"].duplicateItem(e.activeProfile,i.uri);a=r["a"].reorderRTOrder(a),t("ACTIVEPROFILE",a);let o=r["a"].returnDiagramMiniMap(a);t("DIAGRAMMINIMAP",o)},async addItem({commit:t,state:e},i){let a=await r["a"].addItem(e.activeProfile,i.uri);a=r["a"].reorderRTOrder(a),t("ACTIVEPROFILE",a);let o=r["a"].returnDiagramMiniMap(a);t("DIAGRAMMINIMAP",o),console.log("mini",o)},disableMacroNav({commit:t}){t("MACNAV",!0)},enableMacroNav({commit:t}){t("MACNAV",!1)}
1,setActiveInput:({commit:t},e)=>{t("ACTIVEINPUT",e.id),t("ACTIVECOMPONET",e.profileCompoent),t("ACTIVEPROFILENAME",e.profileName)},setActiveProfileCounter:({commit:t},e)=>{t("ACTIVEPROFILECOUNTER",e)},setActiveRecordSaved:({commit:t},e)=>{t("ACTIVERECORDSAVED",e)},async removeProperty({commit:t,state:e},i){let a=r["a"].removeProperty(i.id,i.profile,e.activeProfile);t("ACTIVEPROFILE",a),e.saveRecord(e,t)},sendToInstance:({commit:t,state:e},i)=>{let a=r["a"].sendToInstance(i.from,i.to,e.activeProfile);t("ACTIVEPROFILE",a),e.saveRecord(e,t)},restoreProperty:({commit:t,state:e},i)=>{let a=r["a"].restoreProperty(i.id,i.profile,e.activeProfile);t("ACTIVEPROFILE",a)},async duplicateProperty({commit:t,state:e},i){if(e.workingOnMiniProfile){let a=r["a"].duplicateProperty(i.id,i.profile,e.activeProfileMini);t("ACTIVEPROFILEMINI",a)}else{console.log(i.dupeData);let a=r["a"].duplicateProperty(i.id,i.profile,e.activeProfile,i.dupeData);t("ACTIVEPROFILE",a),e.saveRecord(e,t)}},addLoadResourceFavorite:({commit:t,state:e},i)=>{let a=JSON.parse(JSON.stringify(e.loadResourceFavorites));0==a.filter(t=>t.type===i.type&&t.name===i.name).length&&a.push({type:i.type,name:i.name,label:i.label}),t("LOADRESOURCEFAVORITES",a),localStorage.setItem("bfeLoadResourceFavorites",JSON.stringify(a))},removeLoadResourceFavorite:({commit:t,state:e},i)=>{let a=JSON.parse(JSON.stringify(e.loadResourceFavorites)).filter(t=>`${t.name}${t.type}`!=`${i.name}${i.type}`);t("LOADRESOURCEFAVORITES",a),localStorage.setItem("bfeLoadResourceFavorites",JSON.stringify(a))}},modules:{}})},4449:function(t,e,i){},"44e1":function(t,e,i){"use strict";i("5319"),i("ddb0");var a=i("4360"),o=i("adac"),r=i("1a1e");const s=i("82fd"),l=t=>t.split("").reduce((t,e)=>(t<<5)-t+e.charCodeAt(0)|0,0),n=function(t){return t=t.replace(/&amp;/gi,"&"),t},c={data:{work:[],instance:[],item:[]},namespace:{bflc:"http://id.loc.gov/ontologies/bflc/",bf:"http://id.loc.gov/ontologies/bibframe/",bfsimple:"http://id.loc.gov/ontologies/bfsimple/",madsrdf:"http://www.loc.gov/mads/rdf/v1#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",lclocal:"http://id.loc.gov/ontologies/lclocal/",pmo:"http://performedmusicontology.org/ontology/",datatypes:"http://id.loc.gov/datatypes/",xsd:"http://www.w3.org/2001/XMLSchema#",mstatus:"https://id.loc.gov/vocabulary/mstatus/",mnotetype:"http://id.loc.gov/vocabulary/mnotetype/",dcterms:"http://purl.org/dc/terms/"},isClass:function(t){return!!t.match(/bf:[A-Z]/)||(!!t.match(/bflc:[A-Z]/)||(!!t.match(/madsrdf:[A-Z]/)||(!!t.match(/rdfs:[A-Z]/)||(!!t.match(/rdf:[A-Z]/)||(!!t.match(/lclocal:[A-Z]/)||!!t.match(/pmo:[A-Z]/))))))},namespaceUri:function(t){for(let e in this.namespace){let i=this.namespace[e];if(t.includes(i))return t.replace(i,e+":")}},UriNamespace:function(t){for(let e in this.namespace){let i=this.namespace[e];if(t.startsWith(e+":"))return t.replace(e+":",i)}},extractURI:function(t){return t=t.replace("https://id.loc.gov","http://id.loc.gov"),t},returnOneWhereParentIs:function(t,e){if(1==t.length)return t[0].parentNode.tagName===e&&t[0];for(let i of t)if(i.parentNode.tagName===e)return i;return!1},activeDom:null,hasItem:!1,specialTransforms:{},returnLookupListFromURI:function(t){return!(!t.includes("http://id.loc.gov/vocabulary/")&&!t.includes("https://id.loc.gov/vocabulary/"))&&(t=t.split("/"),t.splice(-1,1),t=t.join("/"),t)},testSeperateRdfTypeProperty:function(t){if(t.valueConstraint&&t.valueConstraint.valueTemplateRefs)for(let e of t.valueConstraint.valueTemplateRefs)if(a["a"].state.rtLookup[e])for(let t of a["a"].state.rtLookup[e].propertyTemplates)if("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"===t.propertyURI)return!0;return!1},buildCleanPtfromExisting:function(t){return{mandatory:t.mandatory,propertyLabel:t.propertyLabel,propertyURI:t.propertyURI,repeatable:t.repeatable,resourceTemplates:JSON.parse(JSON.stringify(t.resourceTemplates)),dynamic:!0,"@guid":s.generate(),type:t.type,userValue:{"@root":t.propertyURI},valueConstraint:JSON.parse(JSON.stringify(t.valueConstraint))}},buildDynamicResourceTemplate:function(t,e){let i=l(t.propertyURI+t.xmlSource);if("http://id.loc.gov/ontologies/bibframe/source"==e){let e="http://id.loc.gov/vocabulary/subjectSchemes";if(t.userValue&&t.userValue["http://id.loc.gov/ontologies/bibframe/source"]&&t.userValue["http://id.loc.gov/ontologies/bibframe/source"][0]&&t.userValue["http://id.loc.gov/ontologies/bibframe/source"][0]["@id"]){let i=this.returnLookupListFromURI(t.userValue["http://id.loc.gov/ontologies/bibframe/source"][0]["@id"]);i&&(e=i)}let o="dynamic:RT:bf2:Source:"+i;a["a"].state.rtLookup[o]={id:o,propertyTemplates:[{mandatory:!1,propertyLabel:"Thesaurus",propertyURI:"http://id.loc.gov/ontologies/bibframe/source",repeatable:!0,resourceTemplates:[],dynamic:!0,"@guid":s.generate(),type:"resource",userValue:{"@root":"http://id.loc.gov/ontologies/bibframe/source"},valueConstraint:{defaults:[],useValuesFrom:[e],valueDataType:{dataTypeURI:"http://id.loc.gov/ontologies/bibframe/Source"},valueTemplateRefs:[]}}],resourceLabel:"Source",resourceURI:"http://id.loc.gov/ontologies/bibframe/Source"},a["a"].state.rtLookup[o].propertyTemplates.unshift(this.buildCleanPtfromExisting(t)),this.tempTemplates[i]=o}},buildRootLvlProperty:function(t){if(void 0!==t.property&&t.isLiteral&&!t.hasResource)return{mandatory:!1,propertyLabel:t.property.replace("http://id.loc.gov/ontologies/bibframe/","bf:"),propertyURI:t.property,repeatable:!0,resourceTemplates:[],missingProfile:[],dynamic:!0,"@guid":s.generate(),type:"literal",userValue:{"@root":t.property},valueConstraint:{defaults:[],useValuesFrom:[],valueDataType:{},valueTemplateRefs:[]}};if(t.isLiteral&&t.hasResource){let e=this.returnLookupListFromURI(t.hasResource);if(e||(t.hasResource.includes("id.loc.gov/resources/works/")&&(e="https://preprod-8230.id.loc.gov/resources/works"),t.hasResource.includes("id.loc.gov/resources/instances/")&&(e="https://preprod-8230.id.loc.gov/resources/instances")),0!=e)return{mandatory:!1,propertyLabel:t.property.replace("http://id.loc.gov/ontologies/bibframe/","bf:"),propertyURI:t.property,repeatable:!0,resourceTemplates:[],missingProfile:[],dynamic:!0,"@guid":s.generate(),type:"lookup",userValue:{"@root":t.property},valueConstraint:{defaults:[],useValuesFrom:[e],valueDataType:{},valueTemplateRefs:[]}}}return!1},buildDynamicProperty:function(t){return"http://id.loc.gov/ontologies/bibframe/note"==t?{mandatory:!1,propertyLabel:"Notes about the Instance",propertyURI:"http://id.loc.gov/ontologies/bibframe/note",remark:"http://access.rdatoolkit.org/2.17.html",repeatable:!0,resourceTemplates:[],dynamic:!0,"@guid":s.generate(),type:"resource",userValue:{"@root":"http://id.loc.gov/ontologies/bibframe/note"},valueConstraint:{defaults:[],useValuesFrom:[],valueDataType:{},valueTemplateRefs:["lc:RT:bf2:Note"]}}:"http://id.loc.gov/ontologies/bibframe/source"==t?{mandatory:!1,propertyLabel:"Thesaurus",propertyURI:"http://id.loc.gov/ontologies/bibframe/source",repeatable:!0,resourceTemplates:[],dynamic:!0,"@guid":s.generate(),type:"resource",userValue:{"@root":"http://id.loc.gov/ontologies/bibframe/source"},valueConstraint:{defaults:[],useValuesFrom:["http://id.loc.gov/vocabulary/subjectSchemes"],valueDataType:{dataTypeURI:"http://id.loc.gov/ontologies/bibframe/Source"},valueTemplateRefs:[]}}:"http://id.loc.gov/ontologies/bibframe/part"==t?{mandatory:!1,propertyLabel:"Part",propertyURI:"http://id.loc.gov/ontologies/bibframe/part",repeatable:!0,resourceTemplates:[],dynamic:!0,"@guid":s.generate(),type:"literal",userValue:{"@root":"http://id.loc.gov/ontologies/bibframe/part"},valueConstraint:{defaults:[],useValuesFrom:[],valueDataType:{},valueTemplateRefs:[]}}:"http://id.loc.gov/ontologies/bibframe/adminMetadata"==t&&{mandatory:!1,propertyLabel:"Admin Metadata",propertyURI:"http://id.loc.gov/ontologies/bibframe/adminMetadata",repeatable:!1,resourceTemplates:[],"@guid":s.generate(),type:"resource",userValue:{"@root":"http://id.loc.gov/ontologies/bibframe/adminMetadata"},valueConstraint:{defaults:[],useValuesFrom:[],valueDataType:{},valueTemplateRefs:["lc:RT:bf2:AdminMetadata:BFDB"]}}},returnUnusedProperties:function(t){let e=new DOMParser,i=e.parseFromString(t,"text/xml"),a=[],o=[];if(i.children.length>0)for(const r of i.children[0].children){let t;t=r.tagName.includes("http://")||r.tagName.includes("https://")?r.tagName:this.UriNamespace(r.tagName),-1==a.indexOf(t)&&(a.push(t),o.push({property:t,isLiteral:0==r.children.length,hasResource:!!r.attributes["rdf:resource"]&&r.attributes["rdf:resource"].value}))}else console.warn("no children found in unused XML, good?");return o},transform:async function(t){a["a"].state.rtLookup=JSON.parse(JSON.stringify(a["a"].state.rtLookupUnmodified));let e=[],i=[];for(let a of t.rtOrder)a.includes(":Work")||a.includes(":Item")||a.includes(":Instance")||a.endsWith(":Hub")?i.push(a):e.push(a);for(let a of e)delete t.rt[a];t.rtOrder=i,this.tempTemplates={};for(let a in t.rt)if(t.isTemplate);else{let e=this.buildDynamicProperty("http://id.loc.gov/ontologies/bibframe/adminMetadata"),i="http://id.loc.gov/ontologies/bibframe/adminMetadata|Admin Metadata";t.rt[a].pt[i]=e,t.rt[a].ptOrder.push(i)}let r=0;for(let a of this.activeDom.children[0].children)"bf:Instance"==a.tagName&&r++;if(r>1){let e=null,i=null;for(let a in t.rt)a.includes(":Instance")&&(i=a,e=JSON.parse(JSON.stringify(t.rt[a])));if(e)for(let a=1;a<r;a++){let o=i+"-"+(a+1);t.rt[o]=e,t.rtOrder.push(o)}}let l=JSON.parse(JSON.stringify(t)),n=await this.transformRts(l,!0);for(const o in n.rt){let e=this.returnUnusedProperties(n.rt[o].unusedXml);for(let i of e){let e=this.buildRootLvlProperty(i);if(e)for(let i in t.rt)if(i==o){let i=e.propertyURI+"_"+s.generate();t.rt[o].pt[i]=e,t.rt[o].ptOrder.push(i)}}for(const t in n.rt[o].pt)if(n.rt[o].pt[t].missingProfile&&n.rt[o].pt[t].missingProfile.length>0)for(let e of n.rt[o].pt[t].missingProfile){let i=this.buildDynamicProperty(e);if(i){for(let r of n.rt[o].pt[t].valueConstraint.valueTemplateRefs){let t=a["a"].state.rtLookup[r].propertyTemplates.map(t=>t.propertyURI);-1==t.indexOf(e)&&a["a"].state.rtLookup[r].propertyTemplates.push(i)}0==n.rt[o].pt[t].valueConstraint.valueTemplateRefs.length&&this.buildDynamicResourceTemplate(n.rt[o].pt[t],e)}}}console.log(t),console.log("-------------------DONE WITH TEST PARSE---------------------xxx");let c=await this.transformRts(t);o["a"].sendSourceRecord(this.xmlSource,t.eId,t.user);for(let a in c.rt)for(let t in c.rt[a].pt)"http://id.loc.gov/ontologies/bibframe/title"===c.rt[a].pt[t].propertyURI&&c.rt[a].pt[t].userValue&&c.rt[a].pt[t].userValue["http://www.w3.org/2000/01/rdf-schema#label"]&&delete c.rt[a].pt[t].userValue["http://www.w3.org/2000/01/rdf-schema#label"];return c},transformRts:async function(t,e){let i=[];console.log("test run?: "+e," USING profile",JSON.parse(JSON.stringify(t)));for(const o in t.rt){let c="";if(o.includes(":Work"))c="bf:Work";else if(o.includes(":Instance"))c="bf:Instance";else if(o.includes(":Item"))c="bf:Item";else{if(!o.endsWith(":Hub"))continue;c="bf:Hub"}let d,u=t.rt[o].pt;if(d=e?this.testDom.getElementsByTagName(c):this.activeDom.getElementsByTagName(c),t.xmlSource=this.xmlSource,d=this.returnOneWhereParentIs(d,"rdf:RDF"),console.log("selecting to process:",d),!1===d&&"bf:Hub"==c&&(c="bf:Work",console.warn("No bf:Hub found, looking for bf:Work"),d=e?this.testDom.getElementsByTagName(c):this.activeDom.getElementsByTagName(c),d=this.returnOneWhereParentIs(d,"rdf:RDF"),console.log("selecting to process:",d)),!1===d){console.warn(c,"was not processed because it failed the top level test, must be a nested resource?"),i.push(o);continue}if(!d){console.warn("Could not find the requested XML fragment, looking for ",c),i.push(o);continue}d.attributes["rdf:resource"]?t.rt[o].URI=d.attributes["rdf:resource"].value:d.attributes["rdf:about"]&&(t.rt[o].URI=d.attributes["rdf:about"].value);for(let e of d.children)"rdf:type"==e.tagName&&e.attributes["rdf:resource"]&&(t.rt[o]["@type"]=e.attributes["rdf:resource"].value,e.parentNode.removeChild(e));if("bf:Instance"==c&&d.getElementsByTagName("bf:instanceOf").length>0){let e=d.getElementsByTagName("bf:instanceOf")[0];e.attributes["rdf:resource"]?t.rt[o].instanceOf=e.attributes["rdf:resource"].value:e.attributes["rdf:about"]&&(t.rt[o].instanceOf=e.attributes["rdf:about"].value)}if("bf:Item"==c&&d.getElementsByTagName("bf:itemOf").length>0){let e=d.getElementsByTagName("bf:itemOf")[0];e.attributes["rdf:resource"]?t.rt[o].itemOf=e.attributes["rdf:resource"].value:e.attributes["rdf:about"]&&(t.rt[o].itemOf=e.attributes["rdf:about"].value),e.remove()}let p=[],h=[],f={},m=[];
1if(t.isTemplate){console.log("PROFILE IS TEMPLATE",t);for(let e in u){if(r["a"].templatesDataFlowHide.indexOf(u[e].propertyURI)>-1)continue;let i=o.split("-")[0]+"|"+u[e].propertyURI;u[e].valueConstraint&&u[e].valueConstraint.valueDataType&&u[e].valueConstraint.valueDataType.dataTypeURI&&""!=u[e].valueConstraint.valueDataType.dataTypeURI.trim()&&(i=i+"|"+u[e].valueConstraint.valueDataType.dataTypeURI);let a=!1;if(t.templateDataFlow&&t.templateDataFlow[i]&&"both"===t.templateDataFlow[i]&&(a=!0),"http://id.loc.gov/ontologies/bibframe/adminMetadata"==u[e].propertyURI?a=!(!t.templateDataFlow||!t.templateDataFlow[i]||"both"==t.templateDataFlow[i]):t.templateDataFlow&&t.templateDataFlow[i]&&("template"===t.templateDataFlow[i]||"resource"===t.templateDataFlow[i])?a=!1:Object.keys(u[e].userValue).length>1&&(a=!0,t.templateDataFlow||(t.templateDataFlow={}),t.templateDataFlow[i]||(t.templateDataFlow[i]="both")),a&&!f[i]){let t=JSON.parse(JSON.stringify(u[e]));t["@guid"]=s.generate(),t.userValue["@root"]?t.userValue={"@root":t.userValue["@root"]}:t.userValue={},t.isEmptyForTemplate=!0;let a=null;for(let r in u){let t=o.split("-")[0]+"|"+u[r].propertyURI;u[e].valueConstraint&&u[r].valueConstraint.valueDataType&&u[r].valueConstraint.valueDataType.dataTypeURI&&""!=u[r].valueConstraint.valueDataType.dataTypeURI.trim()&&(t=t+"|"+u[r].valueConstraint.valueDataType.dataTypeURI),t==i&&(a=r)}m.push({pt:JSON.parse(JSON.stringify(t)),ptLabel:e+"|"+s.generate(),insertAfter:a}),f[i]=!0}}}console.log("!!!!!!!!! ------ needToAddneedToAddneedToAddneedToAdd"),console.log(m);for(let e of m){u[e.ptLabel]=e.pt;let i=t.rt[o].ptOrder.indexOf(e.insertAfter)+1;t.rt[o].ptOrder.splice(i,0,e.ptLabel)}for(let e in u){let i,a=JSON.parse(JSON.stringify(u[e]));a["@guid"]=s.generate();let n=!1;t.isTemplate&&-1===r["a"].templatesDataFlowHide.indexOf(u[e].propertyURI)&&(i=o.split("-")[0]+"|"+u[e].propertyURI,u[e].valueConstraint&&u[e].valueConstraint.valueDataType&&u[e].valueConstraint.valueDataType.dataTypeURI&&""!=u[e].valueConstraint.valueDataType.dataTypeURI.trim()&&(i=i+"|"+u[e].valueConstraint.valueDataType.dataTypeURI),console.log("TEMPLATE",i),console.log(t),t.templateDataFlow[i]&&("template"===t.templateDataFlow[i]?n=!0:"resource"===t.templateDataFlow[i]?a.userValue["@root"]?a.userValue={"@root":a.userValue["@root"]}:a.userValue={}:"both"===t.templateDataFlow[i]&&(a.isEmptyForTemplate||(n=!0)),console.log("YES TEMPLATE HERE"))),a.valueConstraint.defaults=[];let c=a.propertyURI,f=this.namespaceUri(c),m=[];for(let t of d.children)this.UriNamespace(t.tagName)==c&&m.push(t);if("http://id.loc.gov/ontologies/bibframe/Work"!==c){if(t.rt[o]["@type"]&&"http://www.w3.org/1999/02/22-rdf-syntax-ns#type"==c)a.userValue={"@root":"http://www.w3.org/1999/02/22-rdf-syntax-ns#type","@guid":s.generate(),"@id":t.rt[o]["@type"]},u[e]=a;else if(!n){if(m.length>0){console.log("Putting ",m),console.log("Into ",a),p.push(f);let i=0;for(let n of m){if("http://id.loc.gov/ontologies/bibframe/contribution"==a.propertyURI){console.log("Found contributor");let t=!1;if(r["a"].profileHacks.removeExtraFieldsInContributor.enabled){for(let t of n.getElementsByTagName("bflc:name00MatchKey"))t.remove();for(let t of n.getElementsByTagName("bflc:primaryContributorName00MatchKey"))t.remove();for(let t of n.getElementsByTagName("bflc:name00MarcKey"))t.remove()}for(let e of n.getElementsByTagName("rdf:type"))!e.attributes["rdf:resource"]||"http://id.loc.gov/ontologies/bflc/PrimaryContribution"!=e.attributes["rdf:resource"].value&&"http://id.loc.gov/ontologies/bibframe/PrimaryContribution"!=e.attributes["rdf:resource"].value||(t=!0);if((n.getElementsByTagName("bflc:PrimaryContribution").length>0||n.getElementsByTagName("bf:PrimaryContribution").length>0)&&(t=!0),!a.valueConstraint.valueDataType.dataTypeURI||"http://id.loc.gov/ontologies/bflc/PrimaryContribution"!=a.valueConstraint.valueDataType.dataTypeURI&&"http://id.loc.gov/ontologies/bibframe/PrimaryContribution"!=a.valueConstraint.valueDataType.dataTypeURI){if(t){console.log("Skipping the ptk says no, if the xml says yesh jump to next",a.valueConstraint.valueDataType.dataTypeURI);continue}}else if(console.log("HERE"),!t){console.log("Skipping the ptk says yes, if the xml doesn't jump to next");continue}}let c=null;c=JSON.parse(JSON.stringify(a)),c.xmlSource=n.outerHTML,c["@guid"]=s.generate(),this.tempTemplates[l(c.propertyURI+c.xmlSource)]&&c.valueConstraint.valueTemplateRefs.push(this.tempTemplates[l(c.propertyURI+c.xmlSource)]),c.userValue[c.propertyURI]=[{}];let d=c.userValue[c.propertyURI][0];if(this.specialTransforms[f])c=this.specialTransforms[f].call(this,n,c);else if(0==n.children.length){d["@guid"]=s.generate();let t=this.UriNamespace(n.tagName);if(this.isClass(n.tagName))d["@type"]=this.UriNamespace(n.tagName),n.attributes&&n.attributes["rdf:about"]?d["@id"]=this.extractURI(n.attributes["rdf:about"].value):n.attributes&&n.attributes["rdf:resource"]&&(d["@id"]=this.extractURI(n.attributes["rdf:resource"].value));else if("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"==this.UriNamespace(n.tagName))this.testSeperateRdfTypeProperty(c)&&console.warn("Need to account for rdf:type at this level."),n.attributes&&n.attributes["rdf:about"]?d["@type"]=n.attributes["rdf:about"].value:n.attributes&&n.attributes["rdf:resource"]?d["@type"]=n.attributes["rdf:resource"].value:(console.warn("---------------------------------------------"),console.warn("There was a e RDF Type node but could not extract the type"),console.warn(n),console.warn("---------------------------------------------"));else if(n.attributes["rdf:resource"]&&""==n.innerHTML.trim())d["@guid"]=s.generate(),d["@id"]=this.extractURI(n.attributes["rdf:resource"].value);else{d[t]||(d[t]=[]);let e={"@guid":s.generate()};n.attributes&&n.attributes["rdf:about"]?e["@id"]=this.extractURI(n.attributes["rdf:about"].value):n.attributes&&n.attributes["rdf:resource"]&&(e["@id"]=this.extractURI(n.attributes["rdf:resource"].value)),null!=n.innerHTML&&""!=n.innerHTML.trim()&&(e[t]=n.innerHTML,n.attributes&&n.attributes["rdf:datatype"]&&(e["@datatype"]=n.attributes["rdf:datatype"].value),n.attributes&&n.attributes["http://www.w3.org/1999/02/22-rdf-syntax-ns#datatype"]&&(e["@datatype"]=n.attributes["http://www.w3.org/1999/02/22-rdf-syntax-ns#datatype"].value),n.attributes&&n.attributes["xml:lang"]&&(e["@language"]=n.attributes["xml:lang"].value),n.attributes&&n.attributes["rdf:parseType"]&&(e["@parseType"]=n.attributes["rdf:parseType"].value)),d[t].push(e)}}else{n.children.length>1&&(console.error("---------------------------------------------"),console.error("There are more than one 1st lvl bnodes!!!!!!!"),console.error(n),console.error("---------------------------------------------"));for(let t of n.children){d["@guid"]=s.generate(),d["@type"]=this.UriNamespace(t.tagName),t.attributes&&t.attributes["rdf:about"]?d["@id"]=this.extractURI(t.attributes["rdf:about"].value):t.attributes&&t.attributes["rdf:resource"]&&(d["@id"]=this.extractURI(t.attributes["rdf:resource"].value));for(let e of t.children)if("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"==this.UriNamespace(e.tagName))if(this.testSeperateRdfTypeProperty(c)){let t=null;e.attributes&&e.attributes["rdf:resource"]?t=e.attributes["rdf:resource"].value:e.attributes&&e.attributes["rdf:about"]&&(t=e.attributes["rdf:about"].value),t?d["http://www.w3.org/1999/02/22-rdf-syntax-ns#type"]=[{"@guid":s.generate(),"@id":t}]:e.innerHTML&&""!=e.innerHTML.trim()&&(d["http://www.w3.org/1999/02/22-rdf-syntax-ns#type"]=[{"@guid":s.generate(),"http://www.w3.org/2000/01/rdf-schema#label":[{"@guid":s.generate(),"http://www.w3.org/2000/01/rdf-schema#label":e.innerHTML}]}])}else e.attributes&&e.attributes["rdf:about"]?d["@type"]=e.attributes["rdf:about"].value:e.attributes&&e.attributes["rdf:resource"]?d["@type"]=e.attributes["rdf:resource"].value:(console.warn("---------------------------------------------"),console.warn("There was a gChild RDF Type node but could not extract the type"),console.warn(e),console.warn("---------------------------------------------"));else if(0==e.children.length){let t=this.UriNamespace(e.tagName);if(this.isClass(e.tagName)){let e={"@guid":s.generate()};d[t].push(e)}else{d[t]||(d[t]=[]);let i={"@guid":s.generate()};e.attributes&&e.attributes["rdf:about"]?i["@id"]=this.extractURI(e.attributes["rdf:about"].value):e.attributes&&e.attributes["rdf:resource"]&&(i["@id"]=this.extractURI(e.attributes["rdf:resource"].value)),null!=e.innerHTML&&""!=e.innerHTML.trim()&&(i[t]=e.innerHTML,e.attributes&&e.attributes["rdf:datatype"]&&(i["@datatype"]=e.attributes["rdf:datatype"].value),e.attributes&&e.attributes["http://www.w3.org/1999/02/22-rdf-syntax-ns#datatype"]&&(i["@datatype"]=e.attributes["http://www.w3.org/1999/02/22-rdf-syntax-ns#datatype"].value),e.attributes&&e.attributes["xml:lang"]&&(i["@language"]=e.attributes["xml:lang"].value),e.attributes&&e.attributes["rdf:parseType"]&&(i["@parseType"]=e.attributes["rdf:parseType"].value)),d[t].push(i)}}else{let t=this.UriNamespace(e.tagName);d[t]||(d[t]=[]);let i={"@guid":s.generate()};for(let a of e.children)if(this.isClass(a.tagName)){i={"@guid":s.generate()},i["@type"]=this.UriNamespace(a.tagName),a.attributes&&a.attributes["rdf:about"]?i["@id"]=this.extractURI(a.attributes["rdf:about"].value):a.attributes&&a.attributes["rdf:resource"]&&(i["@id"]=this.extractURI(a.attributes["rdf:resource"].value));for(let t of a.children)if("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"==this.UriNamespace(t.tagName))t.attributes&&t.attributes["rdf:about"]?i["@type"]=t.attributes["rdf:about"].value:t.attributes&&t.attributes["rdf:resource"]?i["@type"]=t.attributes["rdf:resource"].value:(console.warn("---------------------------------------------"),console.warn("There was a gggChild RDF Type node but could not extract the type"),console.warn(t),
1console.warn("---------------------------------------------"));else if(0==t.children.length){let e=this.UriNamespace(t.tagName);i[e]||(i[e]=[]);let a={"@guid":s.generate()};t.attributes&&t.attributes["rdf:about"]?a["@id"]=this.extractURI(t.attributes["rdf:about"].value):t.attributes&&t.attributes["rdf:resource"]&&(a["@id"]=this.extractURI(t.attributes["rdf:resource"].value)),null!=t.innerHTML&&""!=t.innerHTML.trim()&&(a[e]=t.innerHTML,t.attributes&&t.attributes["rdf:datatype"]&&(a["@datatype"]=t.attributes["rdf:datatype"].value),t.attributes&&t.attributes["http://www.w3.org/1999/02/22-rdf-syntax-ns#datatype"]&&(a["@datatype"]=t.attributes["http://www.w3.org/1999/02/22-rdf-syntax-ns#datatype"].value),t.attributes&&t.attributes["xml:lang"]&&(a["@language"]=t.attributes["xml:lang"].value),t.attributes&&t.attributes["rdf:parseType"]&&(a["@parseType"]=t.attributes["rdf:parseType"].value)),i[e].push(a)}else{let e=this.UriNamespace(t.tagName);i[e]||(i[e]=[]);let a={"@guid":s.generate()};for(let i of t.children)if(this.isClass(i.tagName)){a["@type"]=this.UriNamespace(i.tagName),i.attributes&&i.attributes["rdf:about"]?a["@id"]=this.extractURI(i.attributes["rdf:about"].value):i.attributes&&i.attributes["rdf:resource"]&&(a["@id"]=this.extractURI(i.attributes["rdf:resource"].value));for(let t of i.children){let e=this.UriNamespace(t.tagName);if("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"==this.UriNamespace(t.tagName))t.attributes&&t.attributes["rdf:about"]?a["@type"]=t.attributes["rdf:about"].value:t.attributes&&t.attributes["rdf:resource"]?a["@type"]=t.attributes["rdf:resource"].value:(console.warn("---------------------------------------------"),console.warn("There was a gggChild RDF Type node but could not extract the type"),console.warn(t),console.warn("---------------------------------------------"));else if(0==t.children.length){a[e]||(a[e]=[]);let i={"@guid":s.generate()};t.attributes&&t.attributes["rdf:about"]?a["@id"]=this.extractURI(t.attributes["rdf:about"].value):t.attributes&&t.attributes["rdf:resource"]&&(a["@id"]=this.extractURI(t.attributes["rdf:resource"].value)),null!=t.innerHTML&&""!=t.innerHTML.trim()&&(i[e]=t.innerHTML,t.attributes&&t.attributes["rdf:datatype"]&&(i["@datatype"]=t.attributes["rdf:datatype"].value),t.attributes&&t.attributes["http://www.w3.org/1999/02/22-rdf-syntax-ns#datatype"]&&(i["@datatype"]=t.attributes["http://www.w3.org/1999/02/22-rdf-syntax-ns#datatype"].value),t.attributes&&t.attributes["xml:lang"]&&(i["@language"]=t.attributes["xml:lang"].value),t.attributes&&t.attributes["rdf:parseType"]&&(i["@parseType"]=t.attributes["rdf:parseType"].value)),a[e].push(i)}else console.warn("---------------------------------------------"),console.warn("Reached the max depth for hiearchy, cannot read the properties nested below"),console.warn(t),console.warn(i),console.warn("---------------------------------------------")}}else{let t=this.UriNamespace(i.tagName);a[t]||(a[t]=[]),i.attributes&&i.attributes["rdf:about"]?a["@id"]=this.extractURI(i.attributes["rdf:about"].value):i.attributes&&i.attributes["rdf:resource"]&&(a["@id"]=this.extractURI(i.attributes["rdf:resource"].value));let e={"@guid":s.generate()};null!=i.innerHTML&&""!=i.innerHTML.trim()&&(e[t]=i.innerHTML,i.attributes&&i.attributes["rdf:datatype"]&&(e["@datatype"]=i.attributes["rdf:datatype"].value),i.attributes&&i.attributes["http://www.w3.org/1999/02/22-rdf-syntax-ns#datatype"]&&(e["@datatype"]=i.attributes["http://www.w3.org/1999/02/22-rdf-syntax-ns#datatype"].value),i.attributes&&i.attributes["xml:lang"]&&(e["@language"]=i.attributes["xml:lang"].value),i.attributes&&i.attributes["rdf:parseType"]&&(e["@parseType"]=i.attributes["rdf:parseType"].value)),a[t].push(e)}i[e].push(a)}d[t].push(i),i=!1}else if("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"==this.UriNamespace(a.tagName))a.attributes&&a.attributes["rdf:about"]?i["@type"]=a.attributes["rdf:about"].value:a.attributes&&a.attributes["rdf:resource"]?i["@type"]=a.attributes["rdf:resource"].value:(console.warn("---------------------------------------------"),console.warn("There was a ggChild RDF Type node but could not extract the type"),console.warn(a),c
1onsole.warn("---------------------------------------------"));else if(0==a.children.length){let t=this.UriNamespace(a.tagName);i[t]||(i[t]=[]);let e={"@guid":s.generate()};a.attributes&&a.attributes["rdf:about"]?e["@id"]=this.extractURI(a.attributes["rdf:about"].value):a.attributes&&a.attributes["rdf:resource"]&&(e["@id"]=this.extractURI(a.attributes["rdf:resource"].value)),null!=a.innerHTML&&""!=a.innerHTML.trim()&&(e[t]=a.innerHTML,a.attributes&&a.attributes["rdf:datatype"]&&(e["@datatype"]=a.attributes["rdf:datatype"].value),a.attributes&&a.attributes["http://www.w3.org/1999/02/22-rdf-syntax-ns#datatype"]&&(e["@datatype"]=a.attributes["http://www.w3.org/1999/02/22-rdf-syntax-ns#datatype"].value),a.attributes&&a.attributes["xml:lang"]&&(e["@language"]=a.attributes["xml:lang"].value),a.attributes&&a.attributes["rdf:parseType"]&&(e["@parseType"]=a.attributes["rdf:parseType"].value)),i[t].push(e)}else console.warn("---------------------------------------------"),console.warn("There was a ggChild that was not a class, but has children"),console.warn(a),console.warn(e),console.warn(this.isClass(a.tagName)),console.warn(a.tagName),console.warn("---------------------------------------------");!1!==i&&d[t].push(i)}}}if(h.push(n.outerHTML),0===i)u[e]=c;else{let a=`${e}_${i}`,r=t.rt[o].ptOrder.indexOf(e);t.rt[o].ptOrder.splice(r+1,0,a),u[a]=c}i++}}for(let t of p){let e=d.getElementsByTagName(t);for(let t=e.length-1;t>=0;t-=1)h.indexOf(e[t].outerHTML)>-1&&e[t].remove()}}}else t.rt[o].URI&&(a.userValue={"@root":"http://id.loc.gov/ontologies/bibframe/Work","@guid":s.generate(),"@id":t.rt[o].URI}),u[e]=a}t.rt[o].unusedXml=d.outerHTML,0==d.children.length&&(t.rt[o].unusedXml=!1);for(let e in t.rt[o].pt)if("http://id.loc.gov/ontologies/bibframe/adminMetadata"==t.rt[o].pt[e].propertyURI){t.rt[o].pt[e].userValue["http://id.loc.gov/ontologies/bibframe/adminMetadata"]||(t.rt[o].pt[e].userValue["http://id.loc.gov/ontologies/bibframe/adminMetadata"]=[{}]);let i=t.rt[o].pt[e].userValue["http://id.loc.gov/ontologies/bibframe/adminMetadata"][0];i["http://id.loc.gov/ontologies/bflc/catalogerId"]||(i["http://id.loc.gov/ontologies/bflc/catalogerId"]=[{"@guid":s.generate(),"http://id.loc.gov/ontologies/bflc/catalogerId":a["a"].state.catInitials}]),i["http://id.loc.gov/ontologies/bflc/procInfo"]=[{"@guid":s.generate(),"http://id.loc.gov/ontologies/bflc/procInfo":t.procInfo}]}let g={};for(let e in t.rt[o].pt)if(-1===Object.keys(g).indexOf(t.rt[o].pt[e].propertyURI)&&(g[t.rt[o].pt[e].propertyURI]={status:!1,data:[],resourceTemplates:{},unAssingedProperties:[]}),Object.keys(t.rt[o].pt[e].userValue).length>1)t.rt[o].pt[e].dataLoaded=!0;else{t.rt[o].pt[e].dataLoaded=!1;for(let a in t.rt[o].pt[e].userValue){if("http://www.w3.org/2000/01/rdf-schema#label"==a&&Array.isArray(t.rt[o].pt[e].userValue[a
1]))for(let i of t.rt[o].pt[e].userValue[a])for(let t in i)"http://www.w3.org/2000/01/rdf-schema#label"==t&&(i[t]=n(i[t]));if(Array.isArray(t.rt[o].pt[e].userValue[a]))for(let i of t.rt[o].pt[e].userValue[a])for(let t in i)if("http://www.w3.org/2000/01/rdf-schema#label"==t&&Array.isArray(i[t]))for(let e of i[t])for(let t in e)"http://www.w3.org/2000/01/rdf-schema#label"==t&&(e[t]=n(e[t]))}g[t.rt[o].pt[e].propertyURI].status=!0,g[t.rt[o].pt[e].propertyURI].data.push({json:t.rt[o].pt[e].userValue,propertyLabel:t.rt[o].pt[e].propertyLabel,xml:t.rt[o].pt[e].xmlSource}),g[t.rt[o].pt[e].propertyURI].resourceTemplates[e]=t.rt[o].pt[e];let i=[t.rt[o].pt[e].propertyURI];t.rt[o].pt[e].valueConstraint.valueTemplateRefs.forEach(t=>{a["a"].state.rtLookup[t].propertyTemplates.forEach(t=>{-1==i.indexOf(t.propertyURI)&&i.push(t.propertyURI)})}),t.rt[o].pt[e].missingProfile=[],Object.keys(t.rt[o].pt[e].userValue).forEach(a=>{a.includes("@")||-1===i.indexOf(a)&&(t.rt[o].pt[e].missingProfile.push(a),g[t.rt[o].pt[e].propertyURI].unAssingedProperties.push(a))}),g[t.rt[o].pt[e].propertyURI].unAssingedProperties.length>0&&(g[t.rt[o].pt[e].propertyURI].status="mixed")}t.rt[o].propertyLoadReport=g,t.rt[o].propertyLoadRatio=parseInt(Object.keys(g).filter(t=>g[t].status).length/Object.keys(g).length*100),"bf:Item"!=c&&"bf:Instance"!=c||(console.log("Done processing XML fragment, removing",d),d.remove())}for(let a of i)t.rt[a].noData=!0;return t},testProfiles:function(t){let e=this.activeDom.getElementsByTagName("bf:Work"),i=this.activeDom.getElementsByTagName("bf:Instance");if(1==e.length)for(let l of e[0].children)if("rdf:type"===l.tagName&&l.attributes["rdf:resource"]&&"http://id.loc.gov/ontologies/bibframe/Hub"===l.attributes["rdf:resource"].value){let e={hardCoded:!1,scoreResults:[]},i=[];for(let a in t){let o=Object.keys(t[a].rt);console.log(o),o[0]&&o[0].endsWith(":Hub")&&-1==i.indexOf(o[0])&&(e.scoreResults.push({score:100,id:o[0],profile:`Hub (${o[0]})`}),i.push(o[0]))}return e}let a=[];e.length>0&&a.push(e[0]),i.length>0&&a.push(i[0]);let o=[];for(let l of a){let e=l.getElementsByTagName("bflc:profile");if(e.length>0)for(let i in t)for(let a in t[i].rt)e[0].innerHTML==a&&-1==o.indexOf(a)&&o.push(a)}let r=[];for(let l of a)for(let t of l.children)-1==r.indexOf(t.tagName)&&r.push(t.tagName);let s=[];for(let l in t){let e=[],i=null;for(let o in t[l].rt)if(o.includes(":Work")||o.includes(":Instance")){if(o.includes(":Instance")&&(i=o),!t[l].rt[o]){console.warn("The starting point of ",l,"does not have the RT",o);continue}for(let i in t[l].rt[o].pt)e.push(this.namespaceUri(t[l].rt[o].pt[i].propertyURI))}let a=0;for(let t of r)e.indexOf(t)>-1?a+=1:a-=1;for(let t of e)r.indexOf(t)>-1?a+=1:a-=1;s.push({score:a,id:i,profile:l})}return s.sort((t,e)=>e.score-t.score),0==o.length&&(o=!1),{hardCoded:o,scoreResults:s}},parse:function(t){if(t||(t=this.testXml),this.xmlSource=t,window.DOMParser){let e=new DOMParser;this.activeDom=e.parseFromString(t,"text/xml"),this.testDom=e.parseFromString(t,"text/xml"),this.hasItem=this.activeDom.getElementsByTagName("bf:Item").length,this.hasInstance=this.activeDom.getElementsByTagName("bf:Instance").length}},testXmlInstance:'<?xml version="1.0" encoding="UTF-8"?>\n\t\t\t\t\t\t<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:bf="http://id.loc.gov/ontologies/bibframe/" xmlns:bflc="http://id.loc.gov/ontologies/bflc/" xmlns:lclocal="http://id.loc.gov/ontologies/lclocal/" xmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:pmo="http://performedmusicontology.org/ontology/"><bf:Instance rdf:about="http://id.loc.gov/resources/instances/c0056343030001"><bf:issuance>\n\t\t\t\t\t\t      <bf:Issuance rdf:about="http://id.loc.gov/vocabulary/issuance/mono"/>\n\t\t\t\t\t\t    </bf:issuance><bf:soundCharacteristic>\n\t\t\t\t\t\t      <bf:PlayingSpeed rdf:about="http://id.loc.gov/vocabulary/mplayspeed/f">\n\t\t\t\t\t\t        <rdfs:label>1.4 m. per sec.</rdfs:label>\n\t\t\t\t\t\t      </bf:PlayingSpeed>\n\t\t\t\t\t\t    </bf:soundCharacteristic><bf:soundCharacteristic>\n\t\t\t\t\t\t      <bf:PlaybackChannels rdf:about="http://id.loc.gov/vocabulary/mplayback/ste">\n\t\t\t\t\t\t        <rdfs:label>stereo</rdfs:label>\n\t\t\t\t\t\t      </bf:PlaybackChannels>\n\t\t\t\t\t\t    </bf:soundCharacteristic><bf:baseMaterial>\n\t\t\t\t\t\t      <bf:BaseMaterial rdf:about="http://id.loc.gov/vocabulary/mmaterial/pla">\n\t\t\t\t\t\t        <rdfs:label>plastic</rdfs:label>\n\t\t\t\t\t\t      </bf:BaseMaterial>\n\t\t\t\t\t\t    </bf:baseMaterial><bf:baseMaterial>\n\t\t\t\t\t\t      <bf:BaseMaterial rdf:about="http://id.loc.gov/vocabulary/mmaterial/mtl">\n\t\t\t\t\t\t        <rdfs:label>metal</rdfs:label>\n\t\t\t\t\t\t      </bf:BaseMaterial>\n\t\t\t\t\t\t    </bf:baseMaterial><bf:soundCharacteristic>\n\t\t\t\t\t\t      <bf:RecordingMethod rdf:about="http://id.loc.gov/vocabulary/mrectype/digital">\n\t\t\t\t\t\t        <rdfs:label>digital</rdfs:label>\n\t\t\t\t\t\t      </bf:RecordingMethod>\n\t\t\t\t\t\t    </bf:soundCharacteristic><bf:soundCharacteristic>\n\t\t\t\t\t\t      <bflc:CaptureStorage rdf:about="http://id.loc.gov/vocabulary/mcapturestorage/dist">\n\t\t\t\t\t\t        <rdfs:label>Electrical capture, digital storage</rdfs:label>\n\t\t\t\t\t\t      </bflc:CaptureStorage>\n\t\t\t\t\t\t    </bf:soundCharacteristic><bf:provisionActivity>\n\t\t\t\t\t\t      <bf:ProvisionActivity>\n\t\t\t\t\t\t        <rdf:type rdf:resource="http://id.loc.gov/ontologies/bibframe/Distribution"/>\n\t\t\t\t\t\t        <bf:date rdf:datatype="http://id.loc.gov/datatypes/edtf">1990</bf:date>\n\t\t\t\t\t\t        <bf:place>\n\t\t\t\t\t\t          <bf:Place rdf:about="http://id.loc.gov/vocabulary/countries/gw"/>\n\t\t\t\t\t\t        </bf:place>\n\t\t\t\t\t\t      </bf:ProvisionActivity>\n\t\t\t\t\t\t    </bf:provisionActivity><bf:provisionActivity>\n\t\t\t\t\t\t      <bf:ProvisionActivity>\n\t\t\t\t\t\t        <rdf:type rdf:resource="http://id.loc.gov/ontologies/bibframe/Production"/>\n\t\t\t\t\t\t        <bf:date rdf:datatype="http://id.loc.gov/datatypes/edtf">1989</bf:date>\n\t\t\t\t\t\t      </bf:ProvisionActivity>\n\t\t\t\t\t\t    </bf:provisionActivity><bf:identifiedBy>\n\t\t\t\t\t\t      <bf:Lccn>\n\t\t\t\t\t\t        <rdf:value>   91754962 </rdf:value>\n\t\t\t\t\t\t      </bf:Lccn>\n\t\t\t\t\t\t    </bf:identifiedBy><bf:identifiedBy>\n\t\t\t\t\t\t      <bf:Identifier>\n\t\t\t\t\t\t        <rdf:value>011790209128</rdf:value>\n\t\t\t\t\t\t      </bf:Identifier>\n\t\t\t\t\t\t    </bf:identifiedBy><bf:identifiedBy>\n\t\t\t\t\t\t      <bf:Upc>\n\t\t\t\t\t\t        <rdf:value>1179020912</rdf:value>\n\t\t\t\t\t\t      </bf:Upc>\n\t\t\t\t\t\t    </bf:identifiedBy><bf:identifiedBy>\n\t\t\t\t\t\t      <bf:Upc>\n\t\t\t\t\t\t        <rdf:value>4011790209128</rdf:value>\n\t\t\t\t\t\t      </bf:Upc>\n\t\t\t\t\t\t    </bf:identifiedBy><bf:identifiedBy>\n\t\t\t\t\t\t      <bf:AudioIssueNumber>\n\t\t\t\t\t\t        <rdf:value>C 209 901A</rdf:value>\n\t\t\t\t\t\t        <bf:assigner>\n\t\t\t\t\t\t          <bf:Agent>\n\t\t\t\t\t\t            <rdfs:label>Orfeo</rdfs:label>\n\t\t\t\t\t\t          </bf:Agent>\n\t\t\t\t\t\t        </bf:assigner>\n\t\t\t\t\t\t      </bf:AudioIssueNumber>\n\t\t\t\t\t\t    </bf:identifiedBy><bf:identifiedBy>\n\t\t\t\t\t\t      <bf:Local>\n\t\t\t\t\t\t        <rdf:value>ocm23722496</rdf:value>\n\t\t\t\t\t\t        <bf:assigner>\n\t\t\t\t\t\t          <bf:Agent rdf:about="http://id.loc.gov/vocabulary/organizations/ocolc"/>\n\t\t\t\t\t\t        </bf:assigner>\n\t\t\t\t\t\t      </bf:Local>\n\t\t\t\t\t\t    </bf:identifiedBy><rdfs:label>Orchesterlieder</rdfs:label><bf:responsibilityStatement>Max Reger</bf:responsibilityStatement><bf:title>\n\t\t\t\t\t\t      <bf:Title>\n\t\t\t\t\t\t        <rdfs:label>Orchesterlieder</rdfs:label>\n\t\t\t\t\t\t        <bflc:titleSortKey>Orchesterlieder</bflc:titleSortKey>\n\t\t\t\t\t\t        <bf:mainTitle>Orchesterlieder</bf:mainTitle>\n\t\t\t\t\t\t      </bf:Title>\n\t\t\t\t\t\t    </bf:title><bf:provisionActivity>\n\t\t\t\t\t\t      <bf:ProvisionActivity>\n\t\t\t\t\t\t        <rdf:type rdf:resource="http://id.loc.gov/ontologies/bibframe/Publication"/>\n\t\t\t\t\t\t        <bf:place>\n\t\t\t\t\t\t          <bf:Place>\n\t\t\t\t\t\t            <rdfs:label>München</rdfs:label>\n\t\t\t\t\t\t          </bf:Place>\n\t\t\t\t\t\t        </bf:place>\n\t\t\t\t\t\t        <bf:agent>\n\t\t\t\t\t\t          <bf:Agent rdf:about="https://id.loc.gov/entities/prov
1iders/adf466d570b7884201b25c7a8d331aa4">\n\t\t\t\t\t\t            <rdfs:label>Orfeo</rdfs:label>\n\t\t\t\t\t\t          </bf:Agent>\n\t\t\t\t\t\t        </bf:agent>\n\t\t\t\t\t\t        <bf:date>1990</bf:date>\n\t\t\t\t\t\t      </bf:ProvisionActivity>\n\t\t\t\t\t\t    </bf:provisionActivity><bf:provisionActivityStatement>München : Orfeo, [1990]</bf:provisionActivityStatement><bf:copyrightDate>℗1990</bf:copyrightDate><bf:extent>\n\t\t\t\t\t\t      <bf:Extent>\n\t\t\t\t\t\t        <rdfs:label>1 audio disc</rdfs:label>\n\t\t\t\t\t\t      </bf:Extent>\n\t\t\t\t\t\t    </bf:extent><bf:note>\n\t\t\t\t\t\t      <bf:Note>\n\t\t\t\t\t\t        <bf:noteType>Physical details</bf:noteType>\n\t\t\t\t\t\t        <rdfs:label>digital, stereo</rdfs:label>\n\t\t\t\t\t\t      </bf:Note>\n\t\t\t\t\t\t    </bf:note><bf:dimensions>4 3/4 in.</bf:dimensions><bf:duration rdf:datatype="http://www.w3.org/2001/XMLSchema#duration">001330</bf:duration><bf:duration rdf:datatype="http://www.w3.org/2001/XMLSchema#duration">001338</bf:duration><bf:duration rdf:datatype="http://www.w3.org/2001/XMLSchema#duration">001604</bf:duration><bf:duration rdf:datatype="http://www.w3.org/2001/XMLSchema#duration">001229</bf:duration><bf:media>\n\t\t\t\t\t\t      <bf:Media rdf:about="http://id.loc.gov/vocabulary/mediaTypes/s">\n\t\t\t\t\t\t        <rdfs:label>audio</rdfs:label>\n\t\t\t\t\t\t        <bf:source>\n\t\t\t\t\t\t          <bf:Source rdf:about="http://id.loc.gov/vocabulary/genreFormSchemes/rdamedia"/>\n\t\t\t\t\t\t        </bf:source>\n\t\t\t\t\t\t      </bf:Media>\n\t\t\t\t\t\t    </bf:media><bf:carrier>\n\t\t\t\t\t\t      <bf:Carrier rdf:about="http://id.loc.gov/vocabulary/carriers/sd">\n\t\t\t\t\t\t        <rdfs:label>audio disc</rdfs:label>\n\t\t\t\t\t\t        <bf:source>\n\t\t\t\t\t\t          <bf:Source rdf:about="http://id.loc.gov/vocabulary/genreFormSchemes/rdacarrier"/>\n\t\t\t\t\t\t        </bf:source>\n\t\t\t\t\t\t      </bf:Carrier>\n\t\t\t\t\t\t    </bf:carrier><bf:soundCharacteristic>\n\t\t\t\t\t\t      <bf:RecordingMethod rdf:about="http://id.loc.gov/vocabulary/mrectype/digital">\n\t\t\t\t\t\t        <rdfs:label>digital</rdfs:label>\n\t\t\t\t\t\t        <bf:source>\n\t\t\t\t\t\t          <bf:Source>\n\t\t\t\t\t\t            <bf:code>rdatr</bf:code>\n\t\t\t\t\t\t          </bf:Source>\n\t\t\t\t\t\t        </bf:source>\n\t\t\t\t\t\t      </bf:RecordingMethod>\n\t\t\t\t\t\t    </bf:soundCharacteristic><bf:soundCharacteristic>\n\t\t\t\t\t\t      <bf:RecordingMedium rdf:about="http://id.loc.gov/vocabulary/mrecmedium/opt">\n\t\t\t\t\t\t        <rdfs:label>optical</rdfs:label>\n\t\t\t\t\t\t        <bf:source>\n\t\t\t\t\t\t          <bf:Source>\n\t\t\t\t\t\t            <bf:code>rdarm</bf:code>\n\t\t\t\t\t\t          </bf:Source>\n\t\t\t\t\t\t        </bf:source>\n\t\t\t\t\t\t      </bf:RecordingMedium>\n\t\t\t\t\t\t    </bf:soundCharacteristic><bf:soundCharacteristic>\n\t\t\t\t\t\t      <bf:PlaybackChannels rdf:about="http://id.loc.gov/vocabulary/mplayback/ste">\n\t\t\t\t\t\t        <rdfs:label>stereo</rdfs:label>\n\t\t\t\t\t\t        <bf:source>\n\t\t\t\t\t\t          <bf:Source>\n\t\t\t\t\t\t            <bf:code>rdacpc</bf:code>\n\t\t\t\t\t\t          </bf:Source>\n\t\t\t\t\t\t        </bf:source>\n\t\t\t\t\t\t      </bf:PlaybackChannels>\n\t\t\t\t\t\t    </bf:soundCharacteristic><bf:digitalCharacteristic>\n\t\t\t\t\t\t      <bf:FileType rdf:about="http://id.loc.gov/vocabulary/mfiletype/audio">\n\t\t\t\t\t\t        <rdfs:label>audio file</rdfs:label>\n\t\t\t\t\t\t        <bf:source>\n\t\t\t\t\t\t          <bf:Source>\n\t\t\t\t\t\t            <bf:code>rdaft</bf:code>\n\t\t\t\t\t\t          </bf:Source>\n\t\t\t\t\t\t        </bf:source>\n\t\t\t\t\t\t      </bf:FileType>\n\t\t\t\t\t\t    </bf:digitalCharacteristic><bf:digitalCharacteristic>\n\t\t\t\t\t\t      <bf:EncodingFormat>\n\t\t\t\t\t\t        <rdfs:label>CD audio</rdfs:label>\n\t\t\t\t\t\t      </bf:EncodingFormat>\n\t\t\t\t\t\t    </bf:digitalCharacteristic><bf:note>\n\t\t\t\t\t\t      <bf:Note>\n\t\t\t\t\t\t        <rdfs:label>Title from disc label.</rdfs:label>\n\t\t\t\t\t\t      </bf:Note>\n\t\t\t\t\t\t    </bf:note><bf:credits>Dietrich Fischer-Dieskau, baritone ; St. Michaels-Chor ; Monteverdi-Chor, Hamburg ; Philharmonisches Staatsorchester Hamburg ; Gerd Albrecht, conductor.</bf:credits><bf:note>\n\t\t\t\t\t\t      <bf:Note>\n\t\t\t\t\t\t        <rdfs:label>Texts set: Joseph von Eichendorff (op. 144a), Ludwig Jacobowski (op. 136), Friedrich Hennel (op. 144b), after Friedrich Hölderlin (op. 124).</rdfs:label>\n\t\t\t\t\t\t      </bf:Note>\n\t\t\t\t\t\t    </bf:note><bf:credits>G. Götze, recording supervision; K. O. Bremer, recording engineer; S. Woellner, S. Kaufmann, T. v. Geest, editing.</bf:credits><bf:note>\n\t\t\t\t\t\t      <bf:Note>\n\t\t\t\t\t\t        <rdfs:label>"Eine Coproduktion mit der Philharmonie Hamburg und dem NDR"--Insert.</rdfs:label>\n\t\t\t\t\t\t      </bf:Note>\n\t\t\t\t\t\t    </bf:note><bf:note>\n\t\t\t\t\t\t      <bf:Note>\n\t\t\t\t\t\t        <rdfs:label>Booklet includes program notes in German, English and French and German texts with English and French translations (14 unnumbered pages) inserted in container.</rdfs:label>\n\t\t\t\t\t\t      </bf:Note>\n\t\t\t\t\t\t    </bf:note><bf:instanceOf rdf:resource="http://id.loc.gov/resources/works/c0056343
103"/><bf:hasItem rdf:resource="http://id.loc.gov/resources/items/c0056343030001-1"/><bf:adminMetadata>\n\t\t\t\t\t\t      <bf:AdminMetadata>\n\t\t\t\t\t\t        <bf:generationProcess>\n\t\t\t\t\t\t          <bf:GenerationProcess>\n\t\t\t\t\t\t            <rdfs:label>DLC marc2bibframe2 v1.7.0-SNAPSHOT</rdfs:label>\n\t\t\t\t\t\t            <bf:generationDate rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2021-04-21T01:32:00-04:00</bf:generationDate>\n\t\t\t\t\t\t          </bf:GenerationProcess>\n\t\t\t\t\t\t        </bf:generationProcess>\n\t\t\t\t\t\t        <bf:status>\n\t\t\t\t\t\t          <bf:Status>\n\t\t\t\t\t\t            <rdfs:label>corrected or revised</rdfs:label>\n\t\t\t\t\t\t            <bf:code>c</bf:code>\n\t\t\t\t\t\t          </bf:Status>\n\t\t\t\t\t\t        </bf:status>\n\t\t\t\t\t\t        <bflc:encodingLevel>\n\t\t\t\t\t\t          <bflc:EncodingLevel rdf:about="http://id.loc.gov/vocabulary/menclvl/f">\n\t\t\t\t\t\t            <rdfs:label>full</rdfs:label>\n\t\t\t\t\t\t          </bflc:EncodingLevel>\n\t\t\t\t\t\t        </bflc:encodingLevel>\n\t\t\t\t\t\t        <bf:descriptionConventions>\n\t\t\t\t\t\t          <bf:DescriptionConventions rdf:about="http://id.loc.gov/vocabulary/descriptionConventions/isbd">\n\t\t\t\t\t\t            <rdfs:label>isbd</rdfs:label>\n\t\t\t\t\t\t          </bf:DescriptionConventions>\n\t\t\t\t\t\t        </bf:descriptionConventions>\n\t\t\t\t\t\t        <bf:identifiedBy>\n\t\t\t\t\t\t          <bf:Local>\n\t\t\t\t\t\t            <rdf:value>5634303</rdf:value>\n\t\t\t\t\t\t            <bf:assigner>\n\t\t\t\t\t\t              <bf:Agent rdf:about="http://id.loc.gov/vocabulary/organizations/dlc">\n\t\t\t\t\t\t                <bf:code>DLC</bf:code>\n\t\t\t\t\t\t              </bf:Agent>\n\t\t\t\t\t\t            </bf:assigner>\n\t\t\t\t\t\t          </bf:Local>\n\t\t\t\t\t\t        </bf:identifiedBy>\n\t\t\t\t\t\t        <bf:changeDate rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2021-04-20T17:20:50</bf:changeDate>\n\t\t\t\t\t\t        <bf:creationDate rdf:datatype="http://www.w3.org/2001/XMLSchema#date">1991-07-12</bf:creationDate>\n\t\t\t\t\t\t        <bf:assigner>\n\t\t\t\t\t\t          <bf:Agent>\n\t\t\t\t\t\t            <bf:code>DMM</bf:code>\n\t\t\t\t\t\t          </bf:Agent>\n\t\t\t\t\t\t        </bf:assigner>\n\t\t\t\t\t\t        <bf:descriptionLanguage>\n\t\t\t\t\t\t          <bf:Language rdf:about="http://id.loc.gov/vocabulary/languages/eng"/>\n\t\t\t\t\t\t        </bf:descriptionLanguage>\n\t\t\t\t\t\t        <bf:descriptionModifier>\n\t\t\t\t\t\t          <bf:Agent rdf:about="http://id.loc.gov/vocabulary/organizations/dlc">\n\t\t\t\t\t\t            <bf:code>DLC</bf:code>\n\t\t\t\t\t\t          </bf:Agent>\n\t\t\t\t\t\t        </bf:descriptionModifier>\n\t\t\t\t\t\t        <bf:descriptionConventions>\n\t\t\t\t\t\t          <bf:DescriptionConventions rdf:about="http://id.loc.gov/vocabulary/descriptionConventions/rda">\n\t\t\t\t\t\t            <rdf:value>rda</rdf:value>\n\t\t\t\t\t\t          </bf:DescriptionConventions>\n\t\t\t\t\t\t        </bf:descriptionConventions>\n\t\t\t\t\t\t        <bf:descriptionAuthentication>\n\t\t\t\t\t\t          <bf:DescriptionAuthentication rdf:about="http://id.loc.gov/vocabulary/marcauthen/lccopycat">\n\t\t\t\t\t\t            <bf:code>lccopycat</bf:code>\n\t\t\t\t\t\t          </bf:DescriptionAuthentication>\n\t\t\t\t\t\t        </bf:descriptionAuthentication>\n\t\t\t\t\t\t      </bf:AdminMetadata>\n\t\t\t\t\t\t    </bf:adminMetadata></bf:Instance><bf:Work rdf:about="http://id.loc.gov/resources/works/c005634303"><bf:adminMetadata>\n\t\t\t\t\t\t      <bf:AdminMetadata>\n\t\t\t\t\t\t        <bf:generationProcess>\n\t\t\t\t\t\t          <bf:GenerationProcess>\n\t\t\t\t\t\t            <rdfs:label>DLC marc2bibframe2 v1.7.0-SNAPSHOT</rdfs:label>\n\t\t\t\t\t\t            <bf:generationDate rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2021-04-21T01:32:00-04:00</bf:generationDate>\n\t\t\t\t\t\t          </bf:GenerationProcess>\n\t\t\t\t\t\t        </bf:generationProcess>\n\t\t\t\t\t\t        <bf:status>\n\t\t\t\t\t\t          <bf:Status>\n\t\t\t\t\t\t            <rdfs:label>corrected or revised</rdfs:label>\n\t\t\t\t\t\t            <bf:code>c</bf:code>\n\t\t\t\t\t\t          </bf:Status>\n\t\t\t\t\t\t        </bf:status>\n\t\t\t\t\t\t        <bflc:encodingLevel>\n\t\t\t\t\t\t          <bflc:EncodingLevel rdf:about="http://id.loc.gov/vocabulary/menclvl/f">\n\t\t\t\t\t\t            <rdfs:label>full</rdfs:label>\n\t\t\t\t\t\t          </bflc:EncodingLevel>\n\t\t\t\t\t\t        </bflc:encodingLevel>\n\t\t\t\t\t\t        <bf:descriptionConventions>\n\t\t\t\t\t\t          <bf:DescriptionConventions rdf:about="http://id.loc.gov/vocabulary/descriptionConventions/isbd">\n\t\t\t\t\t\t            <rdfs:label>isbd</rdfs:label>\n\t\t\t\t\t\t          </bf:DescriptionConventions>\n\t\t\t\t\t\t        </bf:descriptionConventions>\n\t\t\t\t\t\t        <bf:identifiedBy>\n\t\t\t\t\t\t          <bf:Local>\n\t\t\t\t\t\t            <rdf:value>5634303</rdf:value>\n\t\t\t\t\t\t            <bf:assigner>\n\t\t\t\t\t\t              <bf:Agent rdf:about="http://id.loc.gov/vocabulary/organizations/dlc">\n\t\t\t\t\t\t                <bf:code>DLC</bf:code>\n\t\t\t\t\t\t              </bf:Agent>\n\t\t\t\t\t\t            </bf:assigner>\n\t\t\t\t\t\t          </bf:Local>\n\t\t\t\t\t\t        </bf:identifiedBy>\n\t\t\t\t\t\t        <bf:changeDate rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2021-04-20T17:20:50</bf:changeDate>\n\t\t\t\t\t\t        <bf:creationDate rdf:datatype="http://www.w3.org/2001/XMLSchema#date">1991-07-12</bf:creationDate>\n\t\t\t\t\t\t        <bf:assigner>\n\t\t\t\t\t\t          <bf:Agent>\n\t\t\t\t\t\t            <bf:code>DMM</bf:code>\n\t\t\t\t\t\t          </bf:Agent>\n\t\t\t\t\t\t        </bf:assigner>\n\t\t\t\t\t\t        <bf:descriptionLanguage>\n\t\t\t\t\t\t          <bf:Language rdf:about="http://id.loc.gov/vocabulary/languages/eng"/>\n\t\t\t\t\t\t        </bf:descriptionLanguage>\n\t\t\t\t\t\t        <bf:descriptionModifier>\n\t\t\t\t\t\t          <bf:Agent rdf:about="http://id.loc.gov/vocabulary/organizations/dlc">\n\t\t\t\t\t\t            <bf:code>DLC</bf:code>\n\t\t\t\t\t\t          </bf:Agent>\n\t\t\t\t\t\t        </bf:descriptionModifier>\n\t\t\t\t\t\t        <bf:descriptionConventions>\n\t\t\t\t\t\t          <bf:DescriptionConventions rdf:about="http://id.loc.gov/vocabulary/descriptionConventions/rda">\n\t\t\t\t\t\t            <rdf:value>rda</rdf:value>\n\t\t\t\t\t\t          </bf:DescriptionConventions>\n\t\t\t\t\t\t        </bf:descriptionConventions>\n\t\t\t\t\t\t        <bf:descriptionAuthentication>\n\t\t\t\t\t\t          <bf:DescriptionAuthentication rdf:about="http://id.loc.gov/vocabulary/marcauthen/lccopycat">\n\t\t\t\t\t\t            <bf:code>lccopycat</bf:code>\n\t\t\t\t\t\t          </bf:DescriptionAuthentication>\n\t\t\t\t\t\t        </bf:descriptionAuthentication>\n\t\t\t\t\t\t      </bf:AdminMetadata>\n\t\t\t\t\t\t    </bf:adminMetadata><rdf:type rdf:resource="http://id.loc.gov/ontologies/bibframe/Audio"/><bf:language>\n\t\t\t\t\t\t      <bf:Language rdf:about="http://id.loc.gov/vocabulary/languages/ger"/>\n\t\t\t\t\t\t    </bf:language><bf:supplementaryContent>\n\t\t\t\t\t\t      <bf:SupplementaryContent rdf:about="http://id.loc.gov/vocabulary/msupplcont/libretto">\n\t\t\t\t\t\t        <rdfs:label>libretto or text</rdfs:label>\n\t\t\t\t\t\t      </bf:SupplementaryContent>\n\t\t\t\t\t\t    </bf:supplementaryContent><bf:supplementaryContent>\n\t\t\t\t\t\t      <bf:SupplementaryContent rdf:about="http://id.loc.gov/vocabulary/msupplcont/creatorbio">\n\t\t\t\t\t\t        <rdfs:label>biography of composer or author</rdfs:label>\n\t\t\t\t\t\t      </bf:SupplementaryContent>\n\t\t\t\t\t\t    </bf:supplementaryContent><bf:supplementaryContent>\n\t\t\t\t\t\t      <bf:SupplementaryContent rdf:about="http://id.loc.gov/vocabulary/msupplcont/techmusic">\n\t\t\t\t\t\t        <rdfs:label>technical information on music</rdfs:label>\n\t\t\t\t\t\t      </bf:SupplementaryContent>\n\t\t\t\t\t\t    </bf:supplementaryContent><bf:capture>\n\t\t\t\t\t\t      <bf:Capture>\n\t\t\t\t\t\t        <bf:date rdf:datatype="http://id.loc.gov/datatypes/edtf">1989-07-10/1989-07-14</bf:date>\n\t\t\t\t\t\t      </bf:Capture>\n\t\t\t\t\t\t    </bf:capture><bf:capture>\n\t\t\t\t\t\t      <bf:Capture>\n\t\t\t\t\t\t        <bf:date rdf:datatype="http://id.loc.gov/datatypes/edtf">1989-07-10/1989-07-14</bf:date>\n\t\t\t\t\t\t      </bf:Capture>\n\t\t\t\t\t\t    </bf:capture><bf:language>\n\t\t\t\t\t\t      <bf:Language>\n\t\t\t\t\t\t        <bf:part>sung or spoken text</bf:part>\n\t\t\t\t\t\t        <rdf:value rdf:resource="http://id.loc.gov/vocabulary/languages/ger"/>\n\t\t\t\t\t\t      </bf:Language>\n\t\t\t\t\t\t    </bf:language><bf:language>\n\t\t\t\t\t\t      <bf:Language>\n\t\t\t\t\t\t        <bf:part>libretto</bf:part>\n\t\t\t\t\t\t        <rdf:value rdf:resource="http://id.loc.gov/vocabulary/languages/ger"/>\n\t\t\t\t\t\t      </bf:Language>\n\t\t\t\t\t\t    </bf:language><bf:language>\n\t\t\t\t\t\t      <bf:Language>\n\t\t\t\t\t\t        <bf:part>libretto</bf:part>\n\t\t\t\t\t\t        <rdf:value rdf:resource="http://id.loc.gov/vocabulary/languages/eng"/>\n\t\t\t\t\t\t      </bf:Language>\n\t\t\t\t\t\t    </bf:language><bf:language>\n\t\t\t\t\t\t      <bf:Language>\n\t\t\t\t\t\t        <bf:part>accompanying material</bf:part>\n\t\t\t\t\t\t        <rdf:value rdf:resource="http://id.loc.gov/vocabulary/languages/ger"/>\n\t\t\t\t\t\t      </bf:Language>\n\t\t\t\t\t\t    </bf:language><bf:language>\n\t\t\t\t\t\t      <bf:Language>\n\t\t\t\t\t\t        <bf:part>accompanying material</bf:part>\n\t\t\t\t\t\t        <rdf:value rdf:resource="http://id.loc.gov/vocabulary/languages/eng"/>\n\t\t\t\t\t\t      </bf:Language>\n\t\t\t\t\t\t    </bf:language><bf:voice>\n\t\t\t\t\t\t      <bf:MusicVoice>\n\t\t\t\t\t\t        <bf:voiceType>voice</bf:voiceType>\n\t\t\t\t\t\t        <rdfs:label>bass</rdfs:label>\n\t\t\t\t\t\t        <bf:count>1</bf:count>\n\t\t\t\t\t\t        <bf:source>\n\t\t\t\t\t\t          <bf:Source rdf:about="http://id.loc.gov/vocabulary/musiccodeschemes/marcmusperf"/>\n\t\t\t\t\t\t        </bf:source>\n\t\t\t\t\t\t      </bf:MusicVoice>\n\t\t\t\t\t\t    </bf:voice><bf:voice>\n\t\t\t\t\t\t      <bf:MusicVoice>\n\t\t\t\t\t\t        <bf:voiceType>chorus</bf:voiceType>\n\t\t\t\t\t\t        <rdfs:label>mixed chorus</rdfs:label>\n\t\t\t\t\t\t        <bf:source>\n\t\t\t\t\t\t          <bf:Source rdf:about="http://id.loc.gov/vocabulary/musiccodeschemes/marcmusperf"/>\n\t\t\t\t\t\t        </bf:source>\n\t\t\t\t\t\t      </bf:MusicVoice>\n\t\t\t\t\t\t    </bf:voice><bf:ensemble>\n\t\t\t\t\t\t      <bf:MusicEnsemble>\n\t\t\t\t\t\t        <bf:ensembleType>instrumental</bf:ensembleType>\n\t\t\t\t\t\t        <rdfs:label>orchestra</rdfs:label>\n\t\t\t\t\t\t        <bf:source>\n\t\t\t\t\t\t          <bf:Source rdf:about="http://id.loc.gov/vocabulary/musiccodeschemes/marcmusperf"/>\n\t\t\t\t\t\t        </bf:source>\n\t\t\t\t\t\t      </bf:MusicEnsemble>\n\t\t\t\t\t\t    </bf:ensemble><bf:contribution>\n\t\t\t\t\t\t      <bf:Contribution>\n\t\t\t\t\t\t        <rdf:type rdf:resource="http://id.loc.gov/ontologies/bflc/PrimaryContribution"/>\n\t\t\t\t\t\t        <bf:agent>\n\t\t\t\t\t\t          <bf:Agent rdf:about="https://id.loc.gov/authorities/names/n79108398">\n\t\t\t\t\t\t            <rdf:type rdf:resource="http://id.loc.gov/ontologies/bibframe/Person"/>\n\t\t\t\t\t\t            <bflc:name00MatchKey>Reger, Max, 1873-1916,</bflc:name00MatchKey>
1\n\t\t\t\t\t\t            <bflc:primaryContributorName00MatchKey>Reger, Max, 1873-1916,</bflc:primaryContributorName00MatchKey>\n\t\t\t\t\t\t            <bflc:name00MarcKey>1001 $aReger, Max,$d1873-1916,$ecomposer.</bflc:name00MarcKey>\n\t\t\t\t\t\t            <rdfs:label>Reger, Max, 1873-1916,</rdfs:label>\n\t\t\t\t\t\t          </bf:Agent>\n\t\t\t\t\t\t        </bf:agent>\n\t\t\t\t\t\t        <bf:role>\n\t\t\t\t\t\t          <bf:Role>\n\t\t\t\t\t\t            <rdfs:label>composer.</rdfs:label>\n\t\t\t\t\t\t          </bf:Role>\n\t\t\t\t\t\t        </bf:role>\n\t\t\t\t\t\t      </bf:Contribution>\n\t\t\t\t\t\t    </bf:contribution><rdfs:label>Vocal music. Selections</rdfs:label><bf:title>\n\t\t\t\t\t\t      <bf:Title>\n\t\t\t\t\t\t        <bflc:title40MatchKey>Vocal music. Selections</bflc:title40MatchKey>\n\t\t\t\t\t\t        <bflc:title40MarcKey>24010$aVocal music.$kSelections</bflc:title40MarcKey>\n\t\t\t\t\t\t        <rdfs:label>Vocal music. Selections</rdfs:label>\n\t\t\t\t\t\t        <bflc:titleSortKey>Vocal music. Selections</bflc:titleSortKey>\n\t\t\t\t\t\t        <bf:mainTitle>Vocal music. Selections</bf:mainTitle>\n\t\t\t\t\t\t      </bf:Title>\n\t\t\t\t\t\t    </bf:title><bf:content>\n\t\t\t\t\t\t      <bf:Content rdf:about="http://id.loc.gov/vocabulary/contentTypes/prm">\n\t\t\t\t\t\t        <rdfs:label>performed music</rdfs:label>\n\t\t\t\t\t\t        <bf:source>\n\t\t\t\t\t\t          <bf:Source rdf:about="http://id.loc.gov/vocabulary/genreFormSchemes/rdacontent"/>\n\t\t\t\t\t\t        </bf:source>\n\t\t\t\t\t\t      </bf:Content>\n\t\t\t\t\t\t    </bf:content><bf:musicMedium>\n\t\t\t\t\t\t      <bf:MusicMedium>\n\t\t\t\t\t\t        <rdfs:label>baritone voice soloist</rdfs:label>\n\t\t\t\t\t\t        <bf:count>1</bf:count>\n\t\t\t\t\t\t        <bf:source>\n\t\t\t\t\t\t          <bf:Source rdf:about="http://id.loc.gov/vocabulary/musiccodeschemes/lcmpt">\n\t\t\t\t\t\t            <bf:code>lcmpt</bf:code>\n\t\t\t\t\t\t          </bf:Source>\n\t\t\t\t\t\t        </bf:source>\n\t\t\t\t\t\t        <bflc:appliesTo>\n\t\t\t\t\t\t          <bflc:AppliesTo>\n\t\t\t\t\t\t            <rdfs:label>Hymnus der Liebe, An die Hoffnung</rdfs:label>\n\t\t\t\t\t\t          </bflc:AppliesTo>\n\t\t\t\t\t\t        </bflc:appliesTo>\n\t\t\t\t\t\t      </bf:MusicMedium>\n\t\t\t\t\t\t    </bf:musicMedium><bf:musicMedium>\n\t\t\t\t\t\t      <bf:MusicMedium rdf:about="https://id.loc.gov/authorities/performanceMediums/mp2013015516">\n\t\t\t\t\t\t        <rdfs:label>orchestra</rdfs:label>\n\t\t\t\t\t\t        <bf:count>1</bf:count>\n\t\t\t\t\t\t        <bf:source>\n\t\t\t\t\t\t          <bf:Source rdf:about="http://id.loc.gov/vocabulary/musiccodeschemes/lcmpt">\n\t\t\t\t\t\t            <bf:code>lcmpt</bf:code>\n\t\t\t\t\t\t          </bf:Source>\n\t\t\t\t\t\t        </bf:source>\n\t\t\t\t\t\t        <bflc:appliesTo>\n\t\t\t\t\t\t          <bflc:AppliesTo>\n\t\t\t\t\t\t            <rdfs:label>Hymnus der Liebe, An die Hoffnung</rdfs:label>\n\t\t\t\t\t\t          </bflc:AppliesTo>\n\t\t\t\t\t\t        </bflc:appliesTo>\n\t\t\t\t\t\t      </bf:MusicMedium>\n\t\t\t\t\t\t    </bf:musicMedium><bf:musicMedium>\n\t\t\t\t\t\t      <bf:MusicMedium>\n\t\t\t\t\t\t        <bf:note>\n\t\t\t\t\t\t          <bf:Note>\n\t\t\t\t\t\t            <rdfs:label>Total performers alongside ensembles: 1</rdfs:label>\n\t\t\t\t\t\t          </bf:Note>\n\t\t\t\t\t\t        </bf:note>\n\t\t\t\t\t\t        <bflc:appliesTo>\n\t\t\t\t\t\t          <bflc:AppliesTo>\n\t\t\t\t\t\t            <rdfs:label>Hymnus der Liebe, An die Hoffnung</rdfs:label>\n\t\t\t\t\t\t          </bflc:AppliesTo>\n\t\t\t\t\t\t        </bflc:appliesTo>\n\t\t\t\t\t\t      </bf:MusicMedium>\n\t\t\t\t\t\t    </bf:musicMedium><bf:musicMedium>\n\t\t\t\t\t\t      <bf:MusicMedium>\n\t\t\t\t\t\t        <bf:note>\n\t\t\t\t\t\t          <bf:Note>\n\t\t\t\t\t\t            <rdfs:label>Total ensembles: 1</rdfs:label>\n\t\t\t\t\t\t          </bf:Note>\n\t\t\t\t\t\t        </bf:note>\n\t\t\t\t\t\t        <bflc:appliesTo>\n\t\t\t\t\t\t          <bflc:AppliesTo>\n\t\t\t\t\t\t            <rdfs:label>Hymnus der Liebe, An die Hoffnung</rdfs:label>\n\t\t\t\t\t\t          </bflc:AppliesTo>\n\t\t\t\t\t\t        </bflc:appliesTo>\n\t\t\t\t\t\t      </bf:MusicMedium>\n\t\t\t\t\t\t    </bf:musicMedium><bf:musicMedium>\n\t\t\t\t\t\t      <bf:MusicMedium>\n\t\t\t\t\t\t        <rdfs:label>baritone voice soloist</rdfs:label>\n\t\t\t\t\t\t        <bf:count>1</bf:count>\n\t\t\t\t\t\t        <bf:source>\n\t\t\t\t\t\t          <bf:Source rdf:about="http://id.loc.gov/vocabulary/musiccodeschemes/lcmpt">\n\t\t\t\t\t\t            <bf:code>lcmpt</bf:code>\n\t\t\t\t\t\t          </bf:Source>\n\t\t\t\t\t\t        </bf:source>\n\t\t\t\t\t\t        <bflc:appliesTo>\n\t\t\t\t\t\t          <bflc:AppliesTo>\n\t\t\t\t\t\t            <rdfs:label>Einsiedler, Requiem</rdfs:label>\n\t\t\t\t\t\t          </bflc:AppliesTo>\n\t\t\t\t\t\t        </bflc:appliesTo>\n\t\t\t\t\t\t      </bf:MusicMedium>\n\t\t\t\t\t\t    </bf:musicMedium><bf:musicMedium>\n\t\t\t\t\t\t      <bf:MusicMedium rdf:about="https://id.loc.gov/authorities/performanceMediums/mp2013015146">\n\t\t\t\t\t\t        <rdfs:label>mixed chorus</rdfs:label>\n\t\t\t\t\t\t        <bf:count>1</bf:count>\n\t\t\t\t\t\t        <bf:source>\n\t\t\t\t\t\t          <bf:Source rdf:about="http://id.loc.gov/vocabulary/musiccodeschemes/lcmpt">\n\t\t\t\t\t\t            <bf:code>lcmpt</bf:code>\n\t\t\t\t\t\t          </bf:Source>\n\t\t\t\t\t\t        </bf:source>\n\t\t\t\t\t\t        <bflc:appliesTo>\n\t\t\t\t\t\t          <bflc:AppliesTo>\n\t\t\t\t\t\t            <rdfs:label>Einsiedler, Requiem</rdfs:label>\n\t\t\t\t\t\t          </bflc:AppliesTo>\n\t\t\t\t\t\t        </bflc:appliesTo>\n\t\t\t\t\t\t      </bf:MusicMedium>\n\t\t\t\t\t\t    </bf:musicMedium><bf:musicMedium>\n\t\t\t\t\t\t      <bf:MusicMedium rdf:about="https://id.loc.gov/authorities/performanceMediums/mp2013015516">\n\t\t\t\t\t\t        <rdfs:label>orchestra</rdfs:label>\n\t\t\t\t\t\t        <bf:count>1</bf:count>\n\t\t\t\t\t\t        <bf:source>\n\t\t\t\t\t\t          <bf:Source rdf:about="http://id.loc.gov/vocabulary/musiccodeschemes/lcmpt">\n\t\t\t\t\t\t            <bf:code>lcmpt</bf:code>\n\t\t\t\t\t\t          </bf:Source>\n\t\t\t\t\t\t        </bf:source>\n\t\t\t\t\t\t        <bflc:appliesTo>\n\t\t\t\t\t\t          <bflc:AppliesTo>\n\t\t\t\t\t\t            <rdfs:label>Einsiedler, Requiem</rdfs:label>\n\t\t\t\t\t\t          </bflc:AppliesTo>\n\t\t\t\t\t\t        </bflc:appliesTo>\n\t\t\t\t\t\t      </bf:MusicMedium>\n\t\t\t\t\t\t    </bf:musicMedium><bf:musicMedium>\n\t\t\t\t\t\t      <bf:MusicMedium>\n\t\t\t\t\t\t        <bf:note>\n\t\t\t\t\t\t          <bf:Note>\n\t\t\t\t\t\t            <rdfs:label>Total performers alongside ensembles: 1</rdfs:label>\n\t\t\t\t\t\t          </bf:Note>\n\t\t\t\t\t\t        </bf:note>\n\t\t\t\t\t\t        <bflc:appliesTo>\n\t\t\t\t\t\t          <bflc:AppliesTo>\n\t\t\t\t\t\t            <rdfs:label>Einsiedler, Requiem</rdfs:label>\n\t\t\t\t\t\t          </bflc:AppliesTo>\n\t\t\t\t\t\t        </bflc:appliesTo>\n\t\t\t\t\t\t      </bf:MusicMedium>\n\t\t\t\t\t\t    </bf:musicMedium><bf:musicMedium>\n\t\t\t\t\t\t      <bf:MusicMedium>\n\t\t\t\t\t\t        <bf:note>\n\t\t\t\t\t\t          <bf:Note>\n\t\t\t\t\t\t            <rdfs:label>Total ensembles: 2</rdfs:label>\n\t\t\t\t\t\t          </bf:Note>\n\t\t\t\t\t\t        </bf:note>\n\t\t\t\t\t\t        <bflc:appliesTo>\n\t\t\t\t\t\t          <bflc:AppliesTo>\n\t\t\t\t\t\t            <rdfs:label>Einsiedler, Requiem</rdfs:label>\n\t\t\t\t\t\t          </bflc:AppliesTo>\n\t\t\t\t\t\t        </bflc:appliesTo>\n\t\t\t\t\t\t      </bf:MusicMedium>\n\t\t\t\t\t\t    </bf:musicMedium><bf:language>\n\t\t\t\t\t\t      <bf:Language>\n\t\t\t\t\t\t        <bf:note>\n\t\t\t\t\t\t          <bf:Note>\n\t\t\t\t\t\t            <rdfs:label>Sung in German</rdfs:label>\n\t\t\t\t\t\t          </bf:Note>\n\t\t\t\t\t\t        </bf:note>\n\t\t\t\t\t\t      </bf:Language>\n\t\t\t\t\t\t    </bf:language><bf:capture>\n\t\t\t\t\t\t      <bf:Capture>\n\t\t\t\t\t\t        <bf:date>1989 July 10-14</bf:date>\n\t\t\t\t\t\t        <bf:note>\n\t\t\t\t\t\t          <bf:Note>\n\t\t\t\t\t\t            <rdfs:label>Recorded</rdfs:label>\n\t\t\t\t\t\t          </bf:Note>\n\t\t\t\t\t\t        </bf:note>\n\t\t\t\t\t\t        <bf:place>\n\t\t\t\t\t\t          <bf:Place>\n\t\t\t\t\t\t            <rdfs:label>
1at the Norddeutscher Rundfunk Studio 10.</rdfs:label>\n\t\t\t\t\t\t          </bf:Place>\n\t\t\t\t\t\t        </bf:place>\n\t\t\t\t\t\t      </bf:Capture>\n\t\t\t\t\t\t    </bf:capture><bf:tableOfContents>\n\t\t\t\t\t\t      <bf:TableOfContents>\n\t\t\t\t\t\t        <rdfs:label>Der Einsiedler : op. 144a : für gemischten Chor, Bariton und Orchester (13:30) -- Hymnus der Liebe : op. 136 : für Bariton und Orchester (13:38) -- Requiem : op. 144b : für gemischten Chor, Bariton und Orchester (16:04) -- An die Hoffnung : op. 124 : für Bariton und Orchester (12:29).</rdfs:label>\n\t\t\t\t\t\t      </bf:TableOfContents>\n\t\t\t\t\t\t    </bf:tableOfContents><bf:subject>\n\t\t\t\t\t\t      <bf:Topic rdf:about="https://id.loc.gov/authorities/subjects/sh85024915">\n\t\t\t\t\t\t        <rdf:type rdf:resource="http://www.loc.gov/mads/rdf/v1#Topic"/>\n\t\t\t\t\t\t        <rdfs:label>Choruses, Secular (Mixed voices) with orchestra.</rdfs:label>\n\t\t\t\t\t\t        <madsrdf:authoritativeLabel>Choruses, Secular (Mixed voices) with orchestra.</madsrdf:authoritativeLabel>\n\t\t\t\t\t\t        <madsrdf:isMemberOfMADSScheme rdf:resource="http://id.loc.gov/authorities/subjects"/>\n\t\t\t\t\t\t        <bf:source>\n\t\t\t\t\t\t          <bf:Source rdf:about="http://id.loc.gov/authorities/subjects">\n\t\t\t\t\t\t            <bf:code>lcsh</bf:code>\n\t\t\t\t\t\t          </bf:Source>\n\t\t\t\t\t\t        </bf:source>\n\t\t\t\t\t\t      </bf:Topic>\n\t\t\t\t\t\t    </bf:subject><bf:subject>\n\t\t\t\t\t\t      <bf:Topic rdf:about="https://id.loc.gov/authorities/subjects/sh85125186">\n\t\t\t\t\t\t        <rdf:type rdf:resource="http://www.loc.gov/mads/rdf/v1#Topic"/>\n\t\t\t\t\t\t        <rdfs:label>Songs (Medium voice) with orchestra.</rdfs:label>\n\t\t\t\t\t\t        <madsrdf:authoritativeLabel>Songs (Medium voice) with orchestra.</madsrdf:authoritativeLabel>\n\t\t\t\t\t\t        <madsrdf:isMemberOfMADSScheme rdf:resource="http://id.loc.gov/authorities/subjects"/>\n\t\t\t\t\t\t        <bf:source>\n\t\t\t\t\t\t          <bf:Source rdf:about="http://id.loc.gov/authorities/subjects">\n\t\t\t\t\t\t            <bf:code>lcsh</bf:code>\n\t\t\t\t\t\t          </bf:Source>\n\t\t\t\t\t\t        </bf:source>\n\t\t\t\t\t\t      </bf:Topic>\n\t\t\t\t\t\t    </bf:subject><bf:subject>\n\t\t\t\t\t\t      <bf:Topic rdf:about="http://bibframe.example.org/5634303#Topic600-50">\n\t\t\t\t\t\t        <rdf:type rdf:resource="http://www.loc.gov/mads/rdf/v1#ComplexSubject"/>\n\t\t\t\t\t\t        <madsrdf:authoritativeLabel>Eichendorff, Joseph, Freiherr von, 1788-1857--Musical settings.</madsrdf:authoritativeLabel>\n\t\t\t\t\t\t        <madsrdf:isMemberOfMADSScheme rdf:resource="http://id.loc.gov/authorities/subjects"/>\n\t\t\t\t\t\t        <bf:source>\n\t\t\t\t\t\t          <bf:Source rdf:about="http://id.loc.gov/authorities/subjects">\n\t\t\t\t\t\t            <bf:code>lcsh</bf:code>\n\t\t\t\t\t\t          </bf:Source>\n\t\t\t\t\t\t        </bf:source>\n\t\t\t\t\t\t        <madsrdf:componentList rdf:parseType="Collection">\n\t\t\t\t\t\t          <bf:Agent rdf:about="https://id.loc.gov/authorities/names/n81047567">\n\t\t\t\t\t\t            <rdf:type rdf:resource="http://id.loc.gov/ontologies/bibframe/Person"/>\n\t\t\t\t\t\t            <rdf:type rdf:resource="http://www.loc.gov/mads/rdf/v1#PersonalName"/>\n\t\t\t\t\t\t            <madsrdf:authoritativeLabel>Eichendorff, Joseph, Freiherr von, 1788-1857</madsrdf:authoritativeLabel>\n\t\t\t\t\t\t            <madsrdf:isMemberOfMADSScheme rdf:resource="http://id.loc.gov/authorities/subjects"/>\n\t\t\t\t\t\t            <bflc:name00MatchKey>Eichendorff, Joseph, Freiherr von, 1788-1857</bflc:name00MatchKey>\n\t\t\t\t\t\t            <bflc:name00MarcKey>60010$aEichendorff, Joseph,$cFreiherr von,$d1788-1857$vMusical settings.</bflc:name00MarcKey>\n\t\t\t\t\t\t            <rdfs:label>Eichendorff, Joseph, Freiherr von, 1788-1857</rdfs:label>\n\t\t\t\t\t\t            <bf:source>\n\t\t\t\t\t\t              <bf:Source rdf:about="http://id.loc.gov/authorities/subjects">\n\t\t\t\t\t\t                <bf:code>lcsh</bf:code>\n\t\t\t\t\t\t              </bf:Source>\n\t\t\t\t\t\t            </bf:source>\n\t\t\t\t\t\t          </bf:Agent>\n\t\t\t\t\t\t          <madsrdf:GenreForm rdf:about="https://id.loc.gov/authorities/subjects/sh2002006133">\n\t\t\t\t\t\t            <madsrdf:authoritativeLabel>Musical settings</madsrdf:authoritativeLabel>\n\t\t\t\t\t\t          </madsrdf:GenreForm>\n\t\t\t\t\t\t        </madsrdf:componentList>\n\t\t\t\t\t\t      </bf:Topic>\n\t\t\t\t\t\t    </bf:subject><bf:subject>\n\t\t\t\t\t\t      <bf:Topic rdf:about="http://bibframe.example.org/5634303#Topic600-51">\n\t\t\t\t\t\t        <rdf:type rdf:resource="http://www.loc.gov/mads/rdf/v1#ComplexSubject"/>\n\t\t\t\t\t\t        <madsrdf:authoritativeLabel>Jacobowski, Ludwig, 1868-1900--Musical settings.</madsrdf:authoritativeLabel>\n\t\t\t\t\t\t        <madsrdf:isMemberOfMADSScheme rdf:resource="http://id.loc.gov/authorities/subjects"/>\n\t\t\t\t\t\t        <bf:source>\n\t\t\t\t\t\t          <bf:Source rdf:about="http://id.loc.gov/authorities/subjects">\n\t\t\t\t\t\t            <bf:code>lcsh</bf:code>\n\t\t\t\t\t\t          </bf:Source>\n\t\t\t\t\t\t        </bf:source>\n\t\t\t\t\t\t        <madsrdf:componentList rdf:parseType="Collection">\n\t\t\t\t\t\t          <bf:Agent rdf:about="https://id.loc.gov/authorities/names/n93098601">\n\t\t\t\t\t\t            <rdf:type rdf:resource="http://id.loc.gov/ontologies/bibframe/Person"/>\n\t\t\t\t\t\t            <rdf:type rdf:resource="http://www.loc.gov/mads/rdf/v1#PersonalName"/>\n\t\t\t\t\t\t            <madsrdf:authoritativeLabel>Jacobowski, Ludwig, 1868-1900</madsrdf:authoritativeLabel>\n\t\t\t\t\t\t            <madsrdf:isMemberOfMADSScheme rdf:resource="http://id.loc.gov/authorities/subjects"/>\n\t\t\t\t\t\t            <bflc:name00MatchKey>Jacobowski, Ludwig, 1868-1900</bflc:name00MatchKey>\n\t\t\t\t\t\t            <bflc:name00MarcKey>60010$aJacobowski, Ludwig,$d1868-1900$vMusical settings.</bflc:name00MarcKey>\n\t\t\t\t\t\t            <rdfs:label>Jacobowski, Ludwig, 1868-1900</rdfs:label>\n\t\t\t\t\t\t            <bf:source>\n\t\t\t\t\t\t              <bf:Source rdf:about="http://id.loc.gov/authorities/subjects">\n\t\t\t\t\t\t                <bf:code>lcsh</bf:code>\n\t\t\t\t\t\t              </bf:Source>\n\t\t\t\t\t\t            </bf:source>\n\t\t\t\t\t\t          </bf:Agent>\n\t\t\t\t\t\t          <madsrdf:GenreForm rdf:about="https://id.loc.gov/authorities/subjects/sh2002006133">\n\t\t\t\t\t\t            <madsrdf:authoritativeLabel>Musical settings</madsrdf:authoritativeLabel>\n\t\t\t\t\t\t          </madsrdf:GenreForm>\n\t\t\t\t\t\t        </madsrdf:componentList>\n\t\t\t\t\t\t      </bf:Topic>\n\t\t\t\t\t\t    </bf:subject><bf:subject>\n\t\t\t\t\t\t      <bf:Topic rdf:about="http://bibframe.example.org/5634303#Topic600-52">\n\t\t\t\t\t\t        <rdf:type rdf:resource="http://www.loc.gov/mads/rdf/v1#ComplexSubject"/>\n\t\t\t\t\t\t        <madsrdf:authoritativeLabel>Hebbel, Friedrich, 1813-1863--Musical settings.</madsrdf:authoritativeLabel>\n\t\t\t\t\t\t        <madsrdf:isMemberOfMADSScheme rdf:resource="http://id.loc.gov/authorities/subjects"/>\n\t\t\t\t\t\t        <bf:source>\n\t\t\t\t\t\t          <bf:Source rdf:about="http://id.loc.gov/authorities/subjects">\n\t\t\t\t\t\t            <bf:code>lcsh</bf:code>\n\t\t\t\t\t\t          </bf:Source>\n\t\t\t\t\t\t        </bf:source>\n\t\t\t\t\t\t        <madsrdf:componentList rdf:parseType="Collection">\n\t\t\t\t\t\t          <bf:Agent rdf:about="https://id.loc.gov/authorities/names/n50025657">\n\t\t\t\t\t\t            <rdf:type rdf:resource="http://id.loc.gov/ontologies/bibframe/Person"/>\n\t\t\t\t\t\t            <rdf:type rdf:resource="http://www.loc.gov/mads/rdf/v1#PersonalName"/>\n\t\t\t\t\t\t            <madsrdf:authoritativeLabel>Hebbel, Friedrich, 1813-1863</madsrdf:authoritativeLabel>\n\t\t\t\t\t\t            <madsrdf:isMemberOfMADSScheme rdf:resource="http://id.loc.gov/authorities/subjects"/>\n\t\t\t\t\t\t            <bflc:name00MatchKey>
1Hebbel, Friedrich, 1813-1863</bflc:name00MatchKey>\n\t\t\t\t\t\t            <bflc:name00MarcKey>60010$aHebbel, Friedrich,$d1813-1863$vMusical settings.</bflc:name00MarcKey>\n\t\t\t\t\t\t            <rdfs:label>Hebbel, Friedrich, 1813-1863</rdfs:label>\n\t\t\t\t\t\t            <bf:source>\n\t\t\t\t\t\t              <bf:Source rdf:about="http://id.loc.gov/authorities/subjects">\n\t\t\t\t\t\t                <bf:code>lcsh</bf:code>\n\t\t\t\t\t\t              </bf:Source>\n\t\t\t\t\t\t            </bf:source>\n\t\t\t\t\t\t          </bf:Agent>\n\t\t\t\t\t\t          <madsrdf:GenreForm rdf:about="https://id.loc.gov/authorities/subjects/sh2002006133">\n\t\t\t\t\t\t            <madsrdf:authoritativeLabel>Musical settings</madsrdf:authoritativeLabel>\n\t\t\t\t\t\t          </madsrdf:GenreForm>\n\t\t\t\t\t\t        </madsrdf:componentList>\n\t\t\t\t\t\t      </bf:Topic>\n\t\t\t\t\t\t    </bf:subject><bf:subject>\n\t\t\t\t\t\t      <bf:Topic rdf:about="http://bibframe.example.org/5634303#Topic600-53">\n\t\t\t\t\t\t        <rdf:type rdf:resource="http://www.loc.gov/mads/rdf/v1#ComplexSubject"/>\n\t\t\t\t\t\t        <madsrdf:authoritativeLabel>Hölderlin, Friedrich, 1770-1843--Musical settings.</madsrdf:authoritativeLabel>\n\t\t\t\t\t\t        <madsrdf:isMemberOfMADSScheme rdf:resource="http://id.loc.gov/authorities/subjects"/>\n\t\t\t\t\t\t        <bf:source>\n\t\t\t\t\t\t          <bf:Source rdf:about="http://id.loc.gov/authorities/subjects">\n\t\t\t\t\t\t            <bf:code>lcsh</bf:code>\n\t\t\t\t\t\t          </bf:Source>\n\t\t\t\t\t\t        </bf:source>\n\t\t\t\t\t\t        <madsrdf:componentList rdf:parseType="Collection">\n\t\t\t\t\t\t          <bf:Agent rdf:about="https://id.loc.gov/authorities/names/n79115224">\n\t\t\t\t\t\t            <rdf:type rdf:resource="http://id.loc.gov/ontologies/bibframe/Person"/>\n\t\t\t\t\t\t            <rdf:type rdf:resource="http://www.loc.gov/mads/rdf/v1#PersonalName"/>\n\t\t\t\t\t\t            <madsrdf:authoritativeLabel>Hölderlin, Friedrich, 1770-1843</madsrdf:authoritativeLabel>\n\t\t\t\t\t\t            <madsrdf:isMemberOfMADSScheme rdf:resource="http://id.loc.gov/authorities/subjects"/>\n\t\t\t\t\t\t            <bflc:name00MatchKey>Hölderlin, Friedrich, 1770-1843</bflc:name00MatchKey>\n\t\t\t\t\t\t            <bflc:name00MarcKey>60010$aHölderlin, Friedrich,$d1770-1843$vMusical settings.</bflc:name00MarcKey>\n\t\t\t\t\t\t            <rdfs:label>Hölderlin, Friedrich, 1770-1843</rdfs:label>\n\t\t\t\t\t\t            <bf:source>\n\t\t\t\t\t\t              <bf:Source rdf:about="http://id.loc.gov/authorities/subjects">\n\t\t\t\t\t\t                <bf:code>lcsh</bf:code>\n\t\t\t\t\t\t              </bf:Source>\n\t\t\t\t\t\t            </bf:source>\n\t\t\t\t\t\t          </bf:Agent>\n\t\t\t\t\t\t          <madsrdf:GenreForm rdf:about="https://id.loc.gov/authorities/subjects/sh2002006133">\n\t\t\t\t\t\t            <madsrdf:authoritativeLabel>Musical settings</madsrdf:authoritativeLabel>\n\t\t\t\t\t\t          </madsrdf:GenreForm>\n\t\t\t\t\t\t        </madsrdf:componentList>\n\t\t\t\t\t\t      </bf:Topic>\n\t\t\t\t\t\t    </bf:subject><bf:subject>\n\t\t\t\t\t\t      <bf:Topic rdf:about="http://bibframe.example.org/5634303#Topic650-54">\n\t\t\t\t\t\t        <rdf:type rdf:resource="http://www.loc.gov/mads/rdf/v1#Topic"/>\n\t\t\t\t\t\t        <rdfs:label>Choruses, Secular (Mixed voices) with orchestra.</rdfs:label>\n\t\t\t\t\t\t        <madsrdf:authoritativeLabel>Choruses, Secular (Mixed voices) with orchestra.</madsrdf:authoritativeLabel>\n\t\t\t\t\t\t        <bf:source>\n\t\t\t\t\t\t          <bf:Source rdf:about="http://id.loc.gov/vocabulary/subjectSchemes/fast">\n\t\t\t\t\t\t            <bf:code>fast</bf:code>\n\t\t\t\t\t\t          </bf:Source>\n\t\t\t\t\t\t        </bf:source>\n\t\t\t\t\t\t        <bf:identifiedBy>\n\t\t\t\t\t\t          <bf:Identifier>\n\t\t\t\t\t\t            <rdf:value>fst00858811</rdf:value>\n\t\t\t\t\t\t            <bf:source>\n\t\t\t\t\t\t              <bf:Source>\n\t\t\t\t\t\t                <bf:code>OCoLC</bf:code>\n\t\t\t\t\t\t              </bf:Source>\n\t\t\t\t\t\t            </bf:source>\n\t\t\t\t\t\t          </bf:Identifier>\n\t\t\t\t\t\t        </bf:identifiedBy>\n\t\t\t\t\t\t      </bf:Topic>\n\t\t\t\t\t\t    </bf:subject><bf:subject>\n\t\t\t\t\t\t      <bf:Topic rdf:about="http://bibframe.example.org/5634303#Topic650-55">\n\t\t\t\t\t\t        <rdf:type rdf:resource="http://www.loc.gov/mads/rdf/v1#Topic"/>\n\t\t\t\t\t\t        <rdfs:label>Songs (Medium voice) with orchestra.</rdfs:label>\n\t\t\t\t\t\t        <madsrdf:authoritativeLabel>Songs (Medium voice) with orchestra.</madsrdf:authoritativeLabel>\n\t\t\t\t\t\t        <bf:source>\n\t\t\t\t\t\t          <bf:Source rdf:about="http://id.loc.gov/vocabulary/subjectSchemes/fast">\n\t\t\t\t\t\t            <bf:code>fast</bf:code>\n\t\t\t\t\t\t          </bf:Source>\n\t\t\t\t\t\t        </bf:source>\n\t\t\t\t\t\t        <bf:identifiedBy>\n\t\t\t\t\t\t          <bf:Identifier>\n\t\t\t\t\t\t            <rdf:value>fst01126191</rdf:value>\n\t\t\t\t\t\t            <bf:source>\n\t\t\t\t\t\t              <bf:Source>\n\t\t\t\t\t\t                <bf:code>OCoLC</bf:code>\n\t\t\t\t\t\t              </bf:Source>\n\t\t\t\t\t\t            </bf:source>\n\t\t\t\t\t\t          </bf:Identifier>\n\t\t\t\t\t\t        </bf:identifiedBy>\n\t\t\t\t\t\t      </bf:Topic>\n\t\t\t\t\t\t    </bf:subject><bf:genreForm>\n\t\t\t\t\t\t      <bf:GenreForm rdf:about="https://id.loc.gov/authorities/genreForms/gf2014026639">\n\t\t\t\t\t\t        <rdf:type rdf:resource="http://www.loc.gov/mads/rdf/v1#Topic"/>\n\t\t\t\t\t\t        <rdfs:label>Art music.</rdfs:label>\n\t\t\t\t\t\t        <madsrdf:authoritativeLabel>Art music.</madsrdf:authoritativeLabel>\n\t\t\t\t\t\t        <bf:source>\n\t\t\t\t\t\t          <bf:Source rdf:about="http://id.loc.gov/vocabulary/genreFormSchemes/fast">\n\t\t\t\t\t\t            <bf:code>fast</bf:code>\n\t\t\t\t\t\t          </bf:Source>\n\t\t\t\t\t\t        </bf:source>\n\t\t\t\t\t\t        <bf:identifiedBy>\n\t\t\t\t\t\t          <bf:Identifier>\n\t\t\t\t\t\t            <rdf:value>fst01920007</rdf:value>\n\t\t\t\t\t\t            <bf:source>\n\t\t\t\t\t\t              <bf:Source>\n\t\t\t\t\t\t                <bf:code>OCoLC</bf:code>\n\t\t\t\t\t\t              </bf:Source>\n\t\t\t\t\t\t            </bf:source>\n\t\t\t\t\t\t          </bf:Identifier>\n\t\t\t\t\t\t        </bf:identifiedBy>\n\t\t\t\t\t\t      </bf:GenreForm>\n\t\t\t\t\t\t    </bf:genreForm><bf:genreForm>\n\t\t\t\t\t\t      <bf:GenreForm rdf:about="https://id.loc.gov/authorities/genreForms/gf2014027103">\n\t\t\t\t\t\t        <rdf:type rdf:resource="http://www.loc.gov/mads/rdf/v1#Topic"/>\n\t\t\t\t\t\t        <rdfs:label>Songs.</rdfs:label>\n\t\t\t\t\t\t        <madsrdf:authoritativeLabel>Songs.</madsrdf:authoritativeLabel>\n\t\t\t\t\t\t        <bf:source>\n\t\t\t\t\t\t          <bf:Source rdf:about="http://id.loc.gov/vocabulary/genreFormSchemes/fast">\n\t\t\t\t\t\t            <bf:code>fast</bf:code>\n\t\t\t\t\t\t          </bf:Source>\n\t\t\t\t\t\t        </bf:source>\n\t\t\t\t\t\t        <bf:identifiedBy>\n\t\t\t\t\t\t          <bf:Identifier>\n\t\t\t\t\t\t            <rdf:value>fst01726744</rdf:value>\n\t\t\t\t\t\t            <bf:source>\n\t\t\t\t\t\t              <bf:Source>\n\t\t\t\t\t\t                <bf:code>OCoLC</bf:code>\n\t\t\t\t\t\t              </bf:Source>\n\t\t\t\t\t\t            </bf:source>\n\t\t\t\t\t\t          </bf:Identifier>\n\t\t\t\t\t\t        </bf:identifiedBy>\n\t\t\t\t\t\t      </bf:GenreForm>\n\t\t\t\t\t\t    </bf:genreForm><bf:genreForm>\n\t\t\t\t\t\t      <bf:GenreForm rdf:about="https://id.loc.gov/authorities/genreForms/gf2014027103">\n\t\t\t\t\t\t        <rdf:type rdf:resource="http://www.loc.gov/mads/rdf/v1#Topic"/>\n\t\t\t\t\t\t        <rdfs:label>Songs.</rdfs:label>\n\t\t\t\t\t\t        <madsrdf:authoritativeLabel>Songs.</madsrdf:authoritativeLabel>\n\t\t\t\t\t\t        <bf:source>\n\t\t\t\t\t\t          <bf:Source rdf:about="http://id.loc.gov/vocabulary/genreFormSchemes/lcgft">\n\t\t\t\t\t\t            <bf:code>lcgft</bf:code>\n\t\t\t\t\t\t          </bf:Source>\n\t\t\t\t\t\t        </bf:source>\n\t\t\t\t\t\t      </bf:GenreForm>\n\t\t\t\t\t\t    </bf:genreForm><bf:genreForm>\n\t\t\t\t\t\t      <bf:GenreForm rdf:about="https://id.loc.gov/authorities/genreForms/gf2014026639">\n\t\t\t\t\t\t        <rdf:type rdf:resource="http://www.loc.gov/mads/rdf/v1#Topic"/>\n\t\t\t\t\t\t        <rdfs:label>Art music.</rdfs:label>\n\t\t\t\t\t\t        <madsrdf:authoritativeLabel>Art music.</madsrdf:authoritativeLabel>\n\t\t\t\t\t\t        <bf:source>\n\t\t\t\t\t\t          <bf:Source rdf:about="http://id.loc.gov/vocabulary/genreFormSchemes/lcgft">\n\t\t\t\t\t\t            <bf:code>lcgft</bf:code>\n\t\t\t\t\t\t          </bf:Source>\n\t\t\t\t\t\t        </bf:source>\n\t\t\t\t\t\t      </bf:GenreForm>\n\t\t\t\t\t\t    </bf:genreForm><bf:genreForm>\n\t\t\t\t\t\t      <bf:GenreForm rdf:about="https://id.loc.gov/authorities/genreForms/gf2017026061">\n\t\t\t\t\t\t        <rdf:type rdf:resource="http://www.loc.gov/mads/rdf/v1#Topic"/>\n\t\t\t\t\t\t        <rdfs:label>Musical settings.</rdfs:label>\n\t\t\t\t\t\t        <madsrdf:authoritativeLabel>Musical settings.</madsrdf:authoritativeLabel>\n\t\t\t\t\t\t        <bf:source>\n\t\t\t\t\t\t          <bf:Source rdf:about="http://id.loc.gov/vocabulary/genreFormSchemes/lcgft">\n\t\t\t\t\t\t            <bf:code>lcgft</bf:code>\n\t\t\t\t\t\t          </bf:Source>\n\t\t\t\t\t\t        </bf:source>\n\t\t\t\t\t\t      </bf:GenreForm>\n\t\t\t\t\t\t    </bf:genreForm><bf:contribution>\n\t\t\t\t\t\t      <bf:Contribution>\n\t\t\t\t\t\t        <bf:agent>\n\t\t\t\t\t\t          <bf:Agent rdf:about="https://id.loc.gov/authorities/names/n50003091">\n\t\t\t\t\t\t            <rdf:type rdf:resource="http://id.loc.gov/ontologies/bibframe/Person"/>\n\t\t\t\t\t\t            <bflc:name00MatchKey>
1Fischer-Dieskau, Dietrich, 1925-2012,</bflc:name00MatchKey>\n\t\t\t\t\t\t            <bflc:name00MarcKey>7001 $aFischer-Dieskau, Dietrich,$d1925-2012,$esinger.</bflc:name00MarcKey>\n\t\t\t\t\t\t            <rdfs:label>Fischer-Dieskau, Dietrich, 1925-2012,</rdfs:label>\n\t\t\t\t\t\t          </bf:Agent>\n\t\t\t\t\t\t        </bf:agent>\n\t\t\t\t\t\t        <bf:role>\n\t\t\t\t\t\t          <bf:Role>\n\t\t\t\t\t\t            <rdfs:label>singer.</rdfs:label>\n\t\t\t\t\t\t          </bf:Role>\n\t\t\t\t\t\t        </bf:role>\n\t\t\t\t\t\t      </bf:Contribution>\n\t\t\t\t\t\t    </bf:contribution><bf:contribution>\n\t\t\t\t\t\t      <bf:Contribution>\n\t\t\t\t\t\t        <bf:agent>\n\t\t\t\t\t\t          <bf:Agent rdf:about="https://id.loc.gov/authorities/names/n79146137">\n\t\t\t\t\t\t            <rdf:type rdf:resource="http://id.loc.gov/ontologies/bibframe/Person"/>\n\t\t\t\t\t\t            <bflc:name00MatchKey>Albrecht, Gerd, 1935-2014,</bflc:name00MatchKey>\n\t\t\t\t\t\t            <bflc:name00MarcKey>7001 $aAlbrecht, Gerd,$d1935-2014,$econductor.</bflc:name00MarcKey>\n\t\t\t\t\t\t            <rdfs:label>Albrecht, Gerd, 1935-2014,</rdfs:label>\n\t\t\t\t\t\t          </bf:Agent>\n\t\t\t\t\t\t        </bf:agent>\n\t\t\t\t\t\t        <bf:role>\n\t\t\t\t\t\t          <bf:Role>\n\t\t\t\t\t\t            <rdfs:label>conductor.</rdfs:label>\n\t\t\t\t\t\t          </bf:Role>\n\t\t\t\t\t\t        </bf:role>\n\t\t\t\t\t\t      </bf:Contribution>\n\t\t\t\t\t\t    </bf:contribution><bflc:relationship>\n\t\t\t\t\t\t      <bflc:Relationship>\n\t\t\t\t\t\t        <bflc:relation>\n\t\t\t\t\t\t          <bflc:Relation rdf:about="https://id.loc.gov/entities/relationships/containerof">\n\t\t\t\t\t\t            <rdfs:label>Container of (work)</rdfs:label>\n\t\t\t\t\t\t          </bflc:Relation>\n\t\t\t\t\t\t        </bflc:relation>\n\t\t\t\t\t\t        <bf:relatedTo rdf:resource="http://bibframe.example.org/5634303#Work700-63"/>\n\t\t\t\t\t\t      </bflc:Relationship>\n\t\t\t\t\t\t    </bflc:relationship><bflc:relationship>\n\t\t\t\t\t\t      <bflc:Relationship>\n\t\t\t\t\t\t        <bflc:relation>\n\t\t\t\t\t\t          <bflc:Relation rdf:about="https://id.loc.gov/entities/relationships/containerof">\n\t\t\t\t\t\t            <rdfs:label>Container of (work)</rdfs:label>\n\t\t\t\t\t\t          </bflc:Relation>\n\t\t\t\t\t\t        </bflc:relation>\n\t\t\t\t\t\t        <bf:relatedTo rdf:resource="http://bibframe.example.org/5634303#Work700-64"/>\n\t\t\t\t\t\t      </bflc:Relationship>\n\t\t\t\t\t\t    </bflc:relationship><bflc:relationship>\n\t\t\t\t\t\t      <bflc:Relationship>\n\t\t\t\t\t\t        <bflc:relation>\n\t\t\t\t\t\t          <bflc:Relation rdf:about="https://id.loc.gov/entities/relationships/containerof">\n\t\t\t\t\t\t            <rdfs:label>Container of (work)</rdfs:label>\n\t\t\t\t\t\t          </bflc:Relation>\n\t\t\t\t\t\t        </bflc:relation>\n\t\t\t\t\t\t        <bf:relatedTo rdf:resource="http://bibframe.example.org/5634303#Work700-65"/>\n\t\t\t\t\t\t      </bflc:Relationship>\n\t\t\t\t\t\t    </bflc:relationship><bflc:relationship>\n\t\t\t\t\t\t      <bflc:Relationship>\n\t\t\t\t\t\t        <bflc:relation>\n\t\t\t\t\t\t          <bflc:Relation rdf:about="https://id.loc.gov/entities/relationships/containerof">\n\t\t\t\t\t\t            <rdfs:label>Container of (work)</rdfs:label>\n\t\t\t\t\t\t          </bflc:Relation>\n\t\t\t\t\t\t        </bflc:relation>\n\t\t\t\t\t\t        <bf:relatedTo rdf:resource="http://bibframe.example.org/5634303#Work700-66"/>\n\t\t\t\t\t\t      </bflc:Relationship>\n\t\t\t\t\t\t    </bflc:relationship><bf:contribution>\n\t\t\t\t\t\t      <bf:Contribution>\n\t\t\t\t\t\t        <bf:agent>\n\t\t\t\t\t\t          <bf:Agent rdf:about="https://id.loc.gov/authorities/names/n86133933">\n\t\t\t\t\t\t            <rdf:type rdf:resource="http://id.loc.gov/ontologies/bibframe/Organization"/>\n\t\t\t\t\t\t            <bflc:name10MatchKey>Philharmonisches Staatsorchester Hamburg,</bflc:name10MatchKey>\n\t\t\t\t\t\t            <bflc:name10MarcKey>7102 $aPhilharmonisches Staatsorchester Hamburg,$einstrumentalist.</bflc:name10MarcKey>\n\t\t\t\t\t\t            <rdfs:label>Philharmonisches Staatsorchester Hamburg,</rdfs:label>\n\t\t\t\t\t\t          </bf:Agent>\n\t\t\t\t\t\t        </bf:agent>\n\t\t\t\t\t\t        <bf:role>\n\t\t\t\t\t\t          <bf:Role>\n\t\t\t\t\t\t            <rdfs:label>instrumentalist.</rdfs:label>\n\t\t\t\t\t\t          </bf:Role>\n\t\t\t\t\t\t        </bf:role>\n\t\t\t\t\t\t      </bf:Contribution>\n\t\t\t\t\t\t    </bf:contribution><bf:contribution>\n\t\t\t\t\t\t      <bf:Contribution>\n\t\t\t\t\t\t        <bf:agent>\n\t\t\t\t\t\t          <bf:Agent rdf:about="https://id.loc.gov/authorities/names/n2021021421">\n\t\t\t\t\t\t            <rdf:type rdf:resource="http://id.loc.gov/ontologies/bibframe/Organization"/>\n\t\t\t\t\t\t            <bflc:name10MatchKey>Hauptkirche St. Michaelis (Hamburg, Germany). Chor.</bflc:name10MatchKey>\n\t\t\t\t\t\t            <bflc:name10MarcKey>7102 $aHauptkirche St. Michaelis (Hamburg, Germany).$bChor.$4prf</bflc:name10MarcKey>\n\t\t\t\t\t\t            <rdfs:label>Hauptkirche St. Michaelis (Hamburg, Germany). Chor.</rdfs:label>\n\t\t\t\t\t\t          </bf:Agent>\n\t\t\t\t\t\t        </bf:agent>\n\t\t\t\t\t\t        <bf:role>\n\t\t\t\t\t\t          <bf:Role rdf:about="http://id.loc.gov/vocabulary/relators/prf"/>\n\t\t\t\t\t\t        </bf:role>\n\t\t\t\t\t\t      </bf:Contribution>\n\t\t\t\t\t\t    </bf:contribution><bf:contribution>\n\t\t\t\t\t\t      <bf:Contribution>\n\t\t\t\t\t\t        <bf:agent>\n\t\t\t\t\t\t          <bf:Agent rdf:about="https://id.loc.gov/authorities/names/n85031418">\n\t\t\t\t\t\t            <rdf:type rdf:resource="http://id.loc.gov/ontologies/bibframe/Organization"/>\n\t\t\t\t\t\t            <bflc:name10MatchKey>Monteverdi-Chor Hamburg,</bflc:name10MatchKey>\n\t\t\t\t\t\t            <bflc:name10MarcKey>
17102 $aMonteverdi-Chor Hamburg,$esinger.</bflc:name10MarcKey>\n\t\t\t\t\t\t            <rdfs:label>Monteverdi-Chor Hamburg,</rdfs:label>\n\t\t\t\t\t\t          </bf:Agent>\n\t\t\t\t\t\t        </bf:agent>\n\t\t\t\t\t\t        <bf:role>\n\t\t\t\t\t\t          <bf:Role>\n\t\t\t\t\t\t            <rdfs:label>singer.</rdfs:label>\n\t\t\t\t\t\t          </bf:Role>\n\t\t\t\t\t\t        </bf:role>\n\t\t\t\t\t\t      </bf:Contribution>\n\t\t\t\t\t\t    </bf:contribution><bf:relatedTo rdf:resource="http://id.loc.gov/resources/works/n2021021408"/><bf:relatedTo rdf:resource="http://id.loc.gov/resources/works/c012289535"/><bf:relatedTo rdf:resource="http://id.loc.gov/resources/works/no98013521"/><bf:relatedTo rdf:resource="http://id.loc.gov/resources/works/c012289535"/><bf:relatedTo rdf:resource="http://id.loc.gov/resources/works/n82001901"/><bf:relatedTo rdf:resource="http://id.loc.gov/resources/works/c012289535"/><bf:relatedTo rdf:resource="http://id.loc.gov/resources/works/no97073651"/><bf:relatedTo rdf:resource="http://id.loc.gov/resources/works/c012289535"/><bf:relatedTo rdf:resource="http://id.loc.gov/resources/works/c012289535"/></bf:Work>
1<bf:Item rdf:about="http://id.loc.gov/resources/items/c0056343030001-1"><bf:heldBy>\n\t\t\t\t\t\t          <bf:Agent rdf:about="http://id.loc.gov/vocabulary/organizations/dlc">\n\t\t\t\t\t\t            <bf:code>DLC</bf:code>\n\t\t\t\t\t\t          </bf:Agent>\n\t\t\t\t\t\t        </bf:heldBy><bf:shelfMark>\n\t\t\t\t\t\t          <bf:ShelfMark>\n\t\t\t\t\t\t            <rdfs:label>SDD 43569</rdfs:label>\n\t\t\t\t\t\t            <bf:assigner>\n\t\t\t\t\t\t              <bf:Agent rdf:about="http://id.loc.gov/vocabulary/organizations/dlc"/>\n\t\t\t\t\t\t            </bf:assigner>\n\t\t\t\t\t\t          </bf:ShelfMark>\n\t\t\t\t\t\t        </bf:shelfMark><bflc:derivedFrom rdf:resource="http://id.loc.gov/resources/bibs/5634303"/><bf:itemOf rdf:resource="http://id.loc.gov/resources/instances/c0056343030001"/></bf:Item></rdf:RDF>\n',testXmlWork:""};e["a"]=c},"4b9d":function(t,e,i){"use strict";var a=i("4449"),o=i.n(a);o.a},"4d73":function(t,e,i){"use strict";var a=i("2191"),o=i.n(a);o.a},"54c1":function(t,e,i){"use strict";var a=i("715b"),o=i.n(a);o.a},"56d7":function(t,e,i){"use strict";i.r(e);var a=i("2b0e"),o=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{attrs:{id:"app"}},[0==t.isLoggedIn?i("div",{staticStyle:{position:"fixed",width:"100vw",height:"100vh",top:"0",left:"0","background-color":"rgba(0,0,0,0.6)","z-index":"1000"}},[i("div",{staticStyle:{border:"solid 1px #a6acb7","border-radius":"0.5em",margin:"auto",width:"25%","background-color":"white","margin-top":"10%","min-height":"25%",padding:"1em"}},[i("span",{staticStyle:{"font-weight":"bold"}},[t._v("Hello! Before you start...")]),t._v(" "),i("div",{staticStyle:{"margin-top":"1em"}},[t._v("Please enter your cataloger ID and press [Enter] key. This is usually your Windows ID.")]),i("input",{directives:[{name:"model",rawName:"v-model",value:t.catInitialsForm,expression:"catInitialsForm"}],staticStyle:{border:"solid 1px #a6acb7","font-size":"2em","margin-top":"1em","border-top-right-radius":"0.25em","border-bottom-right-radius":"0.25em",width:"98%"},attrs:{type:"text",name:"id",autofocus:"",placeholder:"Cataloger ID"},domProps:{value:t.catInitialsForm},on:{keyup:t.login,input:function(e){e.target.composing||(t.catInitialsForm=e.target.value)}}})])]):t._e(),1==t.outOfDate?i("div",{staticStyle:{position:"fixed",width:"100vw",height:"100vh",top:"0",left:"0","background-color":"rgba(0,0,0,0.6)","z-index":"1000"}},[i("div",{staticStyle:{border:"solid 1px #a6acb7","border-radius":"0.5em",margin:"auto",width:"25%","background-color":"white","margin-top":"10%","min-height":"25%",padding:"1em"}},["mac"==t.systemType?i("div",[i("h1",[t._v("Out of Date")]),i("div",[t._v("The editor version open in your browser is out of date. Please do a hard refresh to use the latest version.")]),i("br"),t._m(0)]):t._e(),"win"==t.systemType?i("div",[i("h1",[t._v("Out of Date")]),i("div",[t._v("The editor version open in your browser is out of date. Please do a hard refresh to use the latest version.")]),i("br"),t._m(1)]):t._e(),"other"==t.systemType?i("div",[i("h1",[t._v("Out of Date")]),i("div",[t._v("The editor version open in your browser is out of date. Please do a hard refresh to use the latest version.")]),i("br")]):t._e()])]):t._e(),i("router-view")],1)},r=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[t._v("On your keyboard press "),i("strong",[t._v("Cmd")]),t._v(" and "),i("strong",[t._v("Shift")]),t._v(" and the letter "),i("strong",[t._v("R")])])},function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[t._v("On your keyboard press "),i("strong",[t._v("Ctrl")]),t._v(" and "),i("strong",[t._v("F5")])])}],s=(i("ddb0"),i("2f62")),l={name:"App",computed:Object(s["b"])({catInitials:"catInitials",settingsDPackVoyager:"settingsDPackVoyager",region:"region",isLoggedIn:function(){return!!this.catInitials&&""!==this.catInitials.trim()},systemType:function(){return navigator.platform.indexOf("Mac")>-1?"mac":navigator.platform.indexOf("Win")>-1?"win":"other"}}),data:function(){return{outOfDate:!1,catInitialsForm:""}},methods:{login:function(t){13===t.keyCode&&(localStorage.setItem("bfeCatInitials",this.catInitialsForm),this.$store.dispatch("setCatInitials",{self:this,catInitials:this.catInitialsForm}).then(()=>{}))}},created:async function(){if(this.catInitials||null!==localStorage.getItem("bfeCatInitials")&&this.$store.dispatch("setCatInitials",{self:this,catInitials:localStorage.getItem("bfeCatInitials")}).then(()=>{}),"undefined"===localStorage.getItem("bfeSettingsDPackVoyagerNative")&&localStorage.removeItem("bfeSettingsDPackVoyagerNative"),"undefined"===localStorage.getItem("bfeSettingsDPackVoyager")&&localStorage.removeItem("bfeSettingsDPackVoyager"),"undefined"===localStorage.getItem("bfeSettingsLookupsUseTextSubjectEditor")&&localStorage.removeItem("bfeSettingsLookupsUseTextSubjectEditor"),null!==localStorage.getItem("bfeSettingsDPackVoyager")&&this.$store.dispatch("setSettingsDPackVoyager",{self:this,settingsDPackVoyager:JSON.parse(localStorage.getItem("bfeSettingsDPackVoyager"))}).then(()=>{}),null!==localStorage.getItem("bfeSettingsDPackVoyagerNative")&&this.$store.dispatch("setSettingsDPackVoyagerNative",{self:this,settingsDPackVoyagerNative:JSON.parse(localStorage.getItem("bfeSettingsDPackVoyagerNative"))}).then(()=>{}),null!==localStorage.getItem("bfeSettingsLookupsUseTextSubjectEditor")&&(console.log("APP Loading, set bfeSettingsLookupsUseTextSubjectEditor to:",localStorage.getItem("bfeSettingsLookupsUseTextSubjectEditor"),JSON.parse(localStorage.getItem("bfeSettingsLookupsUseTextSubjectEditor"))),this.$store.dispatch("settingsLookupsUseTextSubjectEditor",{self:this,settingsLookupsUseTextSubjectEditor:JSON.parse(localStorage.getItem("bfeSettingsLookupsUseTextSubjectEditor"))}).then(()=>{})),null!==localStorage.getItem("bfeSettingsDisplayMode")&&(console.log("APP Loading, set bfeSettingsDisplayMode to:",localStorage.getItem("bfeSettingsDisplayMode"),localStorage.getItem("bfeSettingsDisplayMode")),this.$store.dispatch("settingsDisplayMode",{self:this,settingsDisplayMode:localStorage.getItem("bfeSettingsDisplayMode")}).then(()=>{})),null!==localStorage.getItem("bfeSettingsHideEmptyFields")&&(console.log("APP Loading, set bfeSettingsHideEmptyFields to:",localStorage.getItem("bfeSettingsHideEmptyFields"),JSON.parse(localStorage.getItem("bfeSettingsHideEmptyFields"))),this.$store.dispatch("settingsHideEmptyFields",{self:this,settingsHideEmptyFields:JSON.parse(localStorage.getItem("bfeSettingsHideEmptyFields"))}).then(()=>{})),null!==localStorage.getItem("bfeSettingsLeftMenuEnriched")&&(console.log("APP Loading, set bfeSettingsLeftMenuEnriched to:",localStorage.getItem("bfeSettingsLeftMenuEnriched"),JSON.parse(localStorage.getItem("bfeSettingsLeftMenuEnriched"))),this.$store.dispatch("settingsLeftMenuEnriched",{self:this,settingsLeftMenuEnriched:JSON.parse(localStorage.getItem("bfeSettingsLeftMenuEnriched"))}).then(()=>{})),null!==localStorage.getItem("bfeTreatLikeNoteFields")&&this.$store.dispatch("setTreatLikeNoteFields",{self:this,fields:localStorage.getItem("bfeTreatLikeNoteFields")}).then(()=>{}),this.$store.dispatch("setSupportedRomanizations",{self:this}).then(()=>{}),this.$store.dispatch("setSupportedScriptShifter",{self:this}).then(()=>{}),null!==localStorage.getItem("bfeLoadResourceFavorites"))for(let t of JSON.parse(localStorage.getItem("bfeLoadResourceFavorites")))this.$store.dispatch("addLoadResourceFavorite",{self:this,type:t.type,name:t.name,label:t.label}).then(()=>{});null!==localStorage.getItem("bfeSettingsSubjectBuildMode")&&this.$store.dispatch("subjectEditorMode",{self:this,mode:localStorage.getItem("bfeSettingsSubjectBuildMode")}).then(()=>{})}},n=l,c=(i("034f"),i("2877")),d=Object(c["a"])(n,o,r,!1,null,null,null),u=d.exports,p=i("8c4f"),h=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{attrs:{id:"home"}},[i("Keypress",{attrs:{"key-event":"keydown","key-code":40},on:{success:t.moveDown}}),i("Keypress",{attrs:{"key-event":"keydown","multiple-keys":[{keyCode:77,modifiers:["ctrlKey","altKey"],preventDefault:!0}]},on:{success:t.navRoute}}),i("Keypress",{attrs:{"key-event":"keydown","multiple-keys":[{keyCode:69,modifiers:["ctrlKey","altKey"],preventDefault:!0}]},on:{success:t.navRoute}}),i("Keypress",{attrs:{"key-event":"keydown","multiple-keys":[{keyCode:78,modifiers:["ctrlKey","altKey"],preventDefault:!0}]},on:{success:t.navRoute}}),i("Keypress",{attrs:{"key-event":"keydown","multiple-keys":[{keyCode:79,modifiers:["ctrlKey","altKey"],preventDefault:!0}]},on:{success:t.navRoute}}),i("Keypress",{attrs:{"key-event":"keydown","multiple-keys":[{keyCode:73,modifiers:["ctrlKey","altKey"],preventDefault:!0}]},on:{success:t.navRoute}}),i("div",{staticClass:"grid"},[i("aside",{staticClass:"sidebar-left",staticStyle:{"background-color":"#2a2a2a",color:"#ffffff",position:"relative"}}
1,[i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 76.48 18.48"}},[i("g",{attrs:{id:"Layer_2","data-name":"Layer 2"}},[i("g",{attrs:{id:"Layer_1-2","data-name":"Layer 1"}},[i("path",{attrs:{d:"M65.16,11.65l2.42-7.34,3.07,7.34Zm-2.64,4.58c-.33.95-.58,1.65-1.62,2v.23h3.19V18.3l-1-.59,1.74-5.24h6.19l2.29,5.11-1,.65,0,.25h4.14v-.3a2.94,2.94,0,0,1-1.62-1.8L68.15.67H68a4.7,4.7,0,0,1-1.32,1.92l.25.65Z",fill:"white"}}),i("path",{attrs:{d:"M14.24.27,8.48,11.47l-.18-.32L2.47,0,0,.25V.4L.85,1.75V17L0,17.73V18H2.64v-.2L1.9,17V3l5.86,11.2H8.1L14,3V17l-.85.85V18h3.69v-.17l-.9-.93V1.2l.62-.7V.27Z",fill:"white"}}),i("path",{attrs:{d:"M22.28,11.15,24.7,3.82l3.07,7.33Zm-2.64,4.59c-.32.94-.57,1.64-1.62,2V18h3.19v-.17l-1-.6L22,12h6.19l2.29,5.11-1,.65,0,.25H33.6v-.3A2.92,2.92,0,0,1,32,15.89L25.28.17h-.2a4.84,4.84,0,0,1-1.33,1.92l.25.65Z",fill:"white"}}),i("path",{attrs:{d:"M34.89,18h4.16v-.3l-1.19-.8V9.28H39a3.51,3.51,0,0,1,3.17,2.12c.55.95,2.35,4.39,2.5,4.72a3.46,3.46,0,0,0,3.24,2.16c1.52,0,1.94-.44,1.94-.44l0-.18c-1.57.13-1.87-.27-2.87-1.79-.34-.53-1.62-3.07-2.14-4.14a7.35,7.35,0,0,0-2-2.52V9.06c1.87-.48,4.56-1.57,4.56-4.37S44.42.3,40.83.3h-6V.55l1.09,1V16.86l-1,.85Zm3-9.55V1.08H39.7c1.87,0,5.31,0,5.31,3.64s-4,3.74-6,3.74Z",fill:"white"}}),i("path",{attrs:{d:"M62,3c.33-.95.37-1.74,1.42-2.11V.67H60.2V.85l.6.44L59.13,6,56.2,14.72,50.94,1.57l1-.65,0-.25H47.8V1a2.92,2.92,0,0,1,1.62,1.8l6.71,15.71h.33c.22-.52.12-.27.68-1.52L60,8.69Z",fill:"white"}})])])]),t.isProd()?t._e():i("div",{staticStyle:{color:"red","font-size":"1.25em"}},[t._v("THIS IS THE STAGING (TEST) REGION DATA IS NOT SAVED TO PRODUCTION")]),i("ul",{staticClass:"sidebar-menu"},[i("li",{class:{active:t.isMyRecords}},[i("router-link",{class:{active:t.isMyRecords},attrs:{to:"/myrecords"}},[t._v("My records")]),i("span",{class:{active:t.isMyRecords}},[t._v("CTRL+ALT+M")])],1),i("li",{class:{active:t.isAllRecords}},[i("router-link",{class:{active:t.isAllRecords},attrs:{to:"/allrecords"}},[t._v("Everyone's records")]),i("span",{class:{active:t.isAllRecords}},[t._v("CTRL+ALT+E")])],1),i("li",{class:{active:t.isNew}},[i("router-link",{class:{active:t.isNew},attrs:{to:"/new"}},[t._v("Create new record")]),i("span",{class:{active:t.isNew}},[t._v("CTRL+ALT+N")])],1),i("li",{class:{active:t.isLoad}},[i("router-link",{class:{active:t.isLoad},attrs:{to:"/load"}},[t._v("Load existing record")]),i("span",{class:{active:t.isLoad}},[t._v("CTRL+ALT+O")])],1),i("li",{class:{active:t.isSettings}},[i("router-link",{class:{active:t.isSettings},attrs:{to:"/settings"}},[t._v("Settings")]),i("span",{class:{active:t.isSettings}},[t._v("CTRL+ALT+I")])],1),i("li",{class:{active:t.isHelp}},[i("router-link",{class:{active:t.isHelp},attrs:{to:"/help"}},[t._v("Help")]),i("span",{class:{active:t.isHelp}})],1)]),i("div",{staticStyle:{padding:"0.5em","font-size":"1.2em",position:"absolute",bottom:"1.2em"}},[t._v("v"+t._s(t.version))]),i("div",{staticStyle:{padding:"0.5em","font-size":"1.2em",position:"absolute",bottom:"0"}},[t._v("Logged in as: "+t._s(t.catInitials)+" "),i("a",{staticStyle:{color:"white !important"},attrs:{href:"#"},on:{click:t.changeCatId}},[t._v("Change")])])]),i("article",{attrs:{id:"home-content"}},[t.isNew?i("HomeNewComponent"):t._e(),t.isLoad?i("HomeLoadComponent"):t._e(),t.isSettings?i("HomeSettingsComponent"):t._e(),t.isMyRecords?i("HomeMyRecordsComponent"):t._e(),t.isAllRecords?i("HomeAllRecordsComponent"):t._e(),t.isHelp?i("HomeHelpComponent"):t._e()],1)])],1)},f=[],m=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{attrs:{id:"home-new"}},[i("Keypress",{attrs:{"key-event":"keydown","key-code":40},on:{success:t.moveDown}}),i("Keypress",{attrs:{"key-event":"keydown","key-code":38},on:{success:t.moveUp}}),i("Keypress",{attrs:{"key-event":"keydown","key-code":13},on:{success:t.selectTemplate}}),i("h1",[t._v("Create new record")]),i("hr"),i("h3",[t._v("My Templates")]),i("HomeUserTemplateList",{attrs:{parentComponent:"HomeNewComponent"}}),i("hr",{staticStyle:{"margin-top":"2em"}}),i("h3",[t._v("Profiles")]),i("table",[i("thead",[i("tr",[i("th",{attrs:{scope:"col"}},[t._v("Name")]),i("th",{attrs:{scope:"col"}},[t._v("Type")]),i("th",{attrs:{scope:"col"}},[t._v("Modified")]),i("th",{attrs:{scope:"col"}},[i("svg",{attrs:{fill:"#FFFFFF",width:"1.2em",height:"1.2em",version:"1.1",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{d:"m94.895 75.828l5.2305-12.797-5.9062-5.2852c-2.2539-2.0156-3.5508-4.8945-3.5664-7.918v-0.003906c-0.015625-3.0352 1.2578-5.9258 3.4961-7.9688l5.8594-5.3359-5.3477-12.75-7.9102 0.44141c-3.0234 0.16797-5.9883-0.95313-8.1367-3.0898 0 0-0.003906 0-0.003906-0.003906-2.1445-2.1289-3.2891-5.0703-3.1523-8.0938l0.37109-7.918-12.801-5.2305-5.2852 5.9102c-2.0156 2.2539-4.8984 3.5508-7.9219 3.5664h-0.007812c-3.0234 0.015626-5.9219-1.2578-7.9609-3.4961l-5.3398-5.8594-12.75 5.3477 0.44141 7.9102c0.16406 3.0273-0.95703 5.9844-3.0938 8.1367 0 0 0 0.003906-0.003906 0.003906-2.1289 2.1484-5.0703 3.293-8.0938 3.1523l-7.9219-0.37109-5.2305 12.797 5.9102 5.2852c2.2539 2.0156 3.5508 4.8945 3.5664 7.918v0.003907c0.015624 3.0312-1.2578 5.9258-3.4961 7.9688l-5.8594 5.3359 5.3516 12.75 7.9062-0.44141c3.0273-0.16406 5.9883 0.95703 8.1406 3.0938h0.003906c2.1484 2.1289 3.2891 5.0703 3.1523 8.0938l-0.37109 7.918 12.797 5.2305 5.2578-5.8672c2.0312-2.2773 4.9375-3.5859 7.9883-3.6055h0.003907c3.0039-0.019531 5.8711 1.2383 7.8945 3.4609l5.3711 5.8945 12.75-
15.3516-0.44141-7.9141c-0.16406-3.0234 0.95703-5.9805 3.0859-8.125 0-0.003906 0.003906-0.003906 0.003906-0.003906 2.1289-2.1484 5.0742-3.2969 8.0977-3.1562zm-52.02-8.4023c-9.625-3.9375-14.238-14.93-10.301-24.551 3.9336-9.625 14.926-14.234 24.551-10.297 9.6211 3.9297 14.23 14.926 10.297 24.547-3.9375 9.6211-14.926 14.23-24.547 10.301z"}})])])])]),i("tbody",t._l(Object.keys(t.startingPoints),(function(e){return i("tr",{key:e},[i("td",{class:["selectable-template",{active:t.activeTemplateId==t.returnTemplateIdCount(e)}],staticStyle:{width:"50%"},attrs:{id:t.returnTemplateIdCount(e)},on:{click:t.selectTemplateClick}},[t._v(t._s(e))]),i("td",[t.startingPoints[e].work?i("span",[i("svg",{staticStyle:{width:"1.5em"},attrs:{version:"1.1",viewBox:"0 0 100 100"}},[i("path",{staticStyle:{fill:"#7BADAD",stroke:"#231F20","stroke-width":"0.5","stroke-miterlimit":"10"},attrs:{d:"M88.8,33.6c-2.1-5-5.2-9.5-9-13.4c-3.9-3.9-8.4-6.9-13.4-9C61.2,9,55.7,7.8,50,7.8S38.8,9,33.6,11.2\n  c-5,2.1-9.5,5.2-13.4,9c-3.9,3.9-6.9,8.4-9,13.4C9,38.8,7.8,44.3,7.8,50S9,61.2,11.2,66.4c2.1,5,5.2,9.5,9,13.4\n  c3.9,3.9,8.4,6.9,13.4,9c5.2,2.2,10.7,3.3,16.4,3.3c5.7,0,11.2-1.1,16.4-3.3c5-2.1,9.5-5.2,13.4-9c3.9-3.9,6.9-8.4,9-13.4\n  c2.2-5.2,3.3-10.7,3.3-16.4C92.1,44.3,91,38.8,88.8,33.6L88.8,33.6z"}})]),i("span",{staticClass:"general-template-type-label"},[t._v("Work")])]):t._e(),t.startingPoints[e].instance?i("span",[i("svg",{staticStyle:{width:"1.5em"},attrs:{version:"1.1",viewBox:"0 0 100 100"}},[i("path",{staticStyle:{fill:"#8B588B",stroke:"#0A131A","stroke-width":"0.5","stroke-miterlimit":"10"},attrs:{d:"M50,1.4l48.8,48.8L50,99.1L1.2,50.3L50,1.4z"}})]),i("span",{staticClass:"general-template-type-label"},[t._v("Instance")])]):t._e(),t.startingPoints[e].hub?i("span",[i("svg",{attrs:{width:"30px",height:"30px",version:"1.1",viewBox:"0 -10 100 100",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{fill:"royalblue",d:"m62.113 24.66 1.9023-15.238 18.875 32.691-7.5469 20.004 15.238 1.9023-32.691 18.875-20.004-7.5469-1.9023 15.238-18.875-32.691 7.5469-20.004-15.238-1.9023 32.691-18.875zm-17.684 15.695-4.0781 15.215 15.215 4.0781 4.0781-15.215z","fill-rule":"evenodd"}})]),i("span",{staticClass:"general-template-type-label"},[t._v("Hub")])]):t._e()]),i("td",{attrs:{colspan:"2"}})])})),0)]),i("div",[i("details",{staticStyle:{"margin-top":"2em"}},[i("summary",[t._v("Show All Profiles")]),i("ul",{staticStyle:{"margin-left":"0","padding-left":"0"}},t._l(Object.keys(t.profiles),(function(e){return i("li",{key:e,staticStyle:{"margin-bottom":"0.75em"}},[i("span",{staticStyle:{"font-weight":"bold"}},[t._v(t._s(e))]),i("a",{staticStyle:{color:"#2c3e50","padding-left":"0.5em"},attrs:{href:"#"},on:{click:function(i){return i.preventDefault(),t.loadTemplate(e,!1)}}},[t._v("Load")]),i("details",{staticStyle:{"margin-left":"2em","font-size":"0.75em",cursor:"pointer"}},[i("summary",[t._v("View RTs")]),i("ol",t._l(t.profiles[e].rtOrder,(function(e){return i("li",{key:e,staticStyle:{"font-size":"0.9em"}},[t._v(t._s(e))])})),0)])])})),0)])])],1)},g=[],b=i("dd89"),v=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{attrs:{id:""}},[i("table",[i("thead",[i("tr",[i("th",{attrs:{scope:"col"}},[t._v("Name")]),i("th",{attrs:{scope:"col"}},[t._v("Based on profile")]),i("th",{attrs:{scope:"col"}},[t._v("Modified")]),i("th",{attrs:{scope:"col"}},[i("svg",{attrs:{fill:"#FFFFFF",width:"1.2em",height:"1.2em",version:"1.1",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{d:"m94.895 75.828l5.2305-12.797-5.9062-5.2852c-2.2539-2.0156-3.5508-4.8945-3.5664-7.918v-0.003906c-0.015625-3.0352 1.2578-5.9258 3.4961-7.9688l5.8594-5.3359-5.3477-12.75-7.9102 0.44141c-3.0234 0.16797-5.9883-0.95313-8.1367-3.0898 0 0-0.003906 0-0.003906-0.003906-2.1445-2.1289-3.2891-5.0703-3.1523-8.0938l0.37109-7.918-12.801-5.2305-5.2852 5.9102c-2.0156 2.2539-4.8984 3.5508-7.9219 3.5664h-0.007812c-3.0234 0.015626-5.9219-1.2578-7.9609-3.4961l-5.3398-5.8594-12.75 5.3477 0.44141 7.9102c0.16406 3.0273-0.95703 5.9844-3.0938 8.1367 0 0 0 0.003906-0.003906 0.003906-2.1289 2.1484-5.0703 3.293-8.0938 3.1523l-7.9219-0.37109-5.2305 12.797 5.9102 5.2852c2.2539 2.0156 3.5508 4.8945 3.5664 7.918v0.003907c0.015624 3.0312-1.2578 5.9258-3.4961 7.9688l-5.8594 5.3359 5.3516 12.75 7.9062-0.44141c3.0273-0.16406 5.9883 0.95703 8.1406 3.0938h0.003906c2.1484 2.1289 3.2891 5.0703 3.1523 8.0938l-0.37109 7.918 12.797 5.2305 5.2578-5.8672c2.0312-2.2773 4.9375-3.5859 7.9883-3.6055h0.003907c3.0039-0.019531 5.8711 1.2383 7.8945 3.4609l5.3711 5.8945 12.75-
15.3516-0.44141-7.9141c-0.16406-3.0234 0.95703-5.9805 3.0859-8.125 0-0.003906 0.003906-0.003906 0.003906-0.003906 2.1289-2.1484 5.0742-3.2969 8.0977-3.1562zm-52.02-8.4023c-9.625-3.9375-14.238-14.93-10.301-24.551 3.9336-9.625 14.926-14.234 24.551-10.297 9.6211 3.9297 14.23 14.926 10.297 24.547-3.9375 9.6211-14.926 14.23-24.547 10.301z"}})])])])]),null===t.userTemplates?i("tbody",[t._m(0)]):0==t.userTemplates.length?i("tbody",[t._m(1)]):i("tbody",t._l(t.userTemplates,(function(e){return i("tr",{key:e.id},[i("td",{class:["selectable-template"],on:{click:function(i){return t.loadUserTemplate(e)}}},[e.invalid?i("span",[i("svg",{attrs:{width:"20px",height:"20px",version:"1.1",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{staticStyle:{fill:"red"},attrs:{d:"m94.699 81.602l-39.801-68.898c-2.1992-3.8008-7.6992-3.8008-9.8984 0l-39.801 68.898c-2.1992 3.8008 0.5 8.6016 4.8984 8.6016h79.602c4.5-0.003906 7.1992-4.8047 5-8.6016zm-46-47.801c2.3984-0.60156 4.8008 0.60156 5.8984 2.8008 0.39844 0.80078 0.5 1.6992 0.39844 2.5-0.19922 2.5-0.30078 5-0.39844 7.6016-0.19922 3.8984-0.5 7.8984-0.69922 11.801-0.10156 1.1992-0.10156 2.3984-0.19922 3.6992-0.10156 2.1016-1.6992 3.6992-3.8008 3.6992-2 0-3.6992-1.6016-3.8008-3.6016-0.30078-6.1016-0.69922-12.199-1-18.301-0.10156-1.6016-0.19922-3.3008-0.30078-4.8984 0.003906-2.4023 1.6016-4.7031 3.9023-5.3008zm1.3008 45.801c-2.8008 0-5-2.3008-5-5.1016s2.3008-5.1016 5.1016-5.1016c2.8008 0 5 2.3008 5 5.1992-0.10156 2.7031-2.4023 5.0039-5.1016 5.0039z"}})])]):t._e(),i("a",{staticStyle:{"text-decoration":"none",color:"inherit"},attrs:{href:"#",id:"template-"+e.id},on:{click:function(i){return t.loadUserTemplate(e)}}},[t._v(t._s(e.label))])]),i("td",[t._l(e.basedOnProfile,(function(e){return i("span",{key:e},[e.includes(":Work")?i("svg",{staticStyle:{width:"1.5em"},attrs:{version:"1.1",viewBox:"0 0 100 100"}},[i("path",{staticStyle:{fill:"#7BADAD",stroke:"#231F20","stroke-width":"0.5","stroke-miterlimit":"10"},attrs:{d:"M88.8,33.6c-2.1-5-5.2-9.5-9-13.4c-3.9-3.9-8.4-6.9-13.4-9C61.2,9,55.7,7.8,50,7.8S38.8,9,33.6,11.2\n                        c-5,2.1-9.5,5.2-13.4,9c-3.9,3.9-6.9,8.4-9,13.4C9,38.8,7.8,44.3,7.8,50S9,61.2,11.2,66.4c2.1,5,5.2,9.5,9,13.4\n                        c3.9,3.9,8.4,6.9,13.4,9c5.2,2.2,10.7,3.3,16.4,3.3c5.7,0,11.2-1.1,16.4-3.3c5-2.1,9.5-5.2,13.4-9c3.9-3.9,6.9-8.4,9-13.4\n                        c2.2-5.2,3.3-10.7,3.3-16.4C92.1,44.3,91,38.8,88.8,33.6L88.8,33.6z"}})]):t._e(),e.includes(":Instance")?i("svg",{staticStyle:{width:"1.5em"},attrs:{version:"1.1",viewBox:"0 0 100 100"}},[i("path",{staticStyle:{fill:"#8B588B",stroke:"#0A131A","stroke-width":"0.5","stroke-miterlimit":"10"},attrs:{d:"M50,1.4l48.8,48.8L50,99.1L1.2,50.3L50,1.4z"}})]):t._e(),e.includes(":Item")?i("svg",{staticStyle:{width:"2.2em"},attrs:{viewBox:"-10 0 100 60",version:"1.1",xmlns:"http://www.w3.org/2000/svg"}},[i("rect",{staticStyle:{fill:"#eaeaea","stroke-width":"0.5",stroke:"rgb(0,0,0)"},attrs:{width:"50px",height:"50px"}})]):t._e(),e.includes(":Hub")?i("svg",{attrs:{width:"30px",height:"30px",version:"1.1",viewBox:"0 -10 100 100",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{fill:"royalblue",d:"m62.113 24.66 1.9023-15.238 18.875 32.691-7.5469 20.004 15.238 1.9023-32.691 18.875-20.004-7.5469-1.9023 15.238-18.875-32.691 7.5469-20.004-15.238-1.9023 32.691-18.875zm-17.684 15.695-4.0781 15.215 15.215 4.0781 4.0781-15.215z","fill-rule":"evenodd"}})]):t._e(),i("span",{staticClass:"general-template-type-label"},[t._v(t._s(e.replace("lc:RT:bf2:","")))])])})),e.invalid?i("div",{staticStyle:{color:"red","font-weight":"bold"}},[t._v(" The profiles this template was based on have change. Please delete this template and create a new one based off the updated profile below. ")]):t._e()],2),i("td",[t._v(t._s(new Date(1e3*e.timestamp).toISOString().slice(0,10)))]),i("td",[i("button",{on:{click:function(i){return t.deleteUserTemplate(e)}}},[t._v("delete")]),i("button",{staticStyle:{"margin-left":"0.25em"},on:{click:function(i){return t.copyTemplateId(i,e)}}},[t._v("copy ID")]),"HomeLoadComponent"===t.parentComponent?i("input",{attrs:{type:"checkbox",name:"template-"+e.id,id:"template-"+e.id},domProps:{checked:t.isAlreadyFavorite("template",e.id)},on:{input:function(i){return t.toggleIsFavorite("template",e.id,e.label)}}}):t._e(),"HomeLoadComponent"===t.parentComponent?i("label",{attrs:{for:"template-"+e.id}},[t._v("Add to favorites")]):t._e()])])})),0)]),i("details",{staticStyle:{"margin-top":"0.5em"}},[i("summary",{staticStyle:{cursor:"pointer"}},[t._v("Copy Template Using ID")]),i("div",[t._v(" Enter the template ID: "),i("input",{ref:"copyTemplateId",attrs:{type:"text",placeholder:"paste id here"}}),i("button",{staticStyle:{"font-size":"0.75em"},on:{click:t.copyTemplate}},[t._v("Copy")])])])])},y=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("tr",[i("td",{attrs:{colspan:"4"}},[t._v("You have no templates in the system.")])])},function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("tr",[i("td",{attrs:{colspan:"4"}},[t._v("Loading templates...")])])}],w=i("adac"),k=i("1a1e"),S={name:"HomeUserTemplateList",components:{},props:{parentComponent:String},methods:{loadTemplate:b["a"].loadNewTemplate,toggleIsFavorite:function(t,e,
1i){this.isAlreadyFavorite(t,e)?this.$store.dispatch("removeLoadResourceFavorite",{self:this,type:t,name:e,label:i}):this.$store.dispatch("addLoadResourceFavorite",{self:this,type:t,name:e,label:i})},isAlreadyFavorite:function(t,e){return this.loadResourceFavorites.filter(i=>i.type===t&&i.name===e).length>0},copyTemplate(){let t=k["a"].returnUrls().util;fetch(`${t}/copytemplate/${this.catInitials}/${this.$refs.copyTemplateId.value}`,{method:"GET"}).then(async t=>{this.userTemplates=await w["a"].userTemplates(this.catInitials),this.validateUserTemplates()})},copyTemplateId(t,e){t.target.innerHTML="copied",t.target.style.color="yellow",t.target.style.fontWeight="bold",window.setTimeout(()=>{t.target.innerHTML="copy ID",t.target.style.removeProperty("color"),t.target.style.fontWeight="normal"},500),navigator.clipboard.writeText(e.id)},deleteUserTemplate(t){let e=k["a"].returnUrls().util;fetch(`${e}/templates/${t.id}`,{method:"DELETE"}).then(async t=>{200==t.status?(this.userTemplates=[],this.userTemplates=await w["a"].userTemplates(this.catInitials),0==this.userTemplates.length&&(this.userTemplates=null)):alert("Was an error deleteing")}).then(t=>console.log(t))},validateUserTemplates(){this.userTemplates=b["a"].userTemplatesValidate(this.userTemplates)},loadUserTemplate(t){if("HomeNewComponent"===this.parentComponent){this.$store.dispatch("clearUndo",{self:this}).then(()=>{this.$store.dispatch("setActiveUndo",{self:this,msg:"Created blank record"})});let e=JSON.parse(t.profile);e=this.loadTemplate(null,this.catInitials,e),this.$store.dispatch("setActiveProfile",{self:this,profile:e,useDefaultValues:!1}).then(()=>{"spreadsheet"==this.settingsDisplayMode?this.$router.push({name:"CompactEdit",params:{recordId:e.eId}}):this.$router.push({name:"Edit",params:{recordId:e.eId}}),this.$store.dispatch("forceSave",{self:this},!0).then(()=>{this.$store.dispatch("setActiveRecordSaved",{self:this},!0).then(()=>{window.scrollTo(0,0)})})})}else this.$emit("loadUsingUserTemplate",t)}},computed:Object(s["b"])({activeProfile:"activeProfile",startingPoints:"startingPoints",profiles:"profiles",profilesLoaded:"profilesLoaded",catInitials:"catInitials",loadResourceFavorites:"loadResourceFavorites"}),data:function(){return{userTemplates:[],validateUserTemplatesInterval:null}},watch:{profiles:function(){this.validateUserTemplates()}},mounted:async function(){this.userTemplates=await w["a"].userTemplates(this.catInitials),0==this.userTemplates.length?this.userTemplates=null:this.validateUserTemplates()},created:async function(){this.userTemplates=await w["a"].userTemplates(this.catInitials),0==this.userTemplates.length?this.userTemplates=null:this.validateUserTemplates()}},C=S,L=Object(c["a"])(C,v,y,!1,null,"32f7460d",null),I=L.exports,_={name:"HomeNewComponent",components:{HomeUserTemplateList:I,Keypress:()=>i.e("chunk-2d0ba165").then(i.bind(null,"365a"))},props:{},methods:{returnSpByTemplateId(t){let e=null,i=1;return Object.keys(this.startingPoints).forEach(a=>{"template-id-"+i++===t&&(e=a)}),e},returnTemplateIdCount(t,e){let i={},a=1;return Object.keys(this.startingPoints).forEach(t=>{i[t]="template-id-"+a++}),e?Object.keys(i).length:i[t]},loadTemplate:b["a"].loadNewTemplate,selectTemplateClick(t){let e=this.returnSpByTemplateId(t.target.id);console.log("useStartingPoint",e);let i=this.loadTemplate(e,this.catInitials);this.$store.dispatch("clearUndo",{self:this}).then(()=>{this.$store.dispatch("setActiveUndo",{self:this,msg:"Created blank record"})}),this.$store.dispatch("setActiveProfile",{self:this,profile:i,useDefaultValues:!0}).then(()=>{this.settingsDisplayMode,this.$router.push({name:"Edit",params:{recordId:i.eId}}),this.$store.dispatch("forceSave",{self:this},!0).then(()=>{this.$store.dispatch("setActiveRecordSaved",{self:this},!0).then(()=>{window.scrollTo(0,0)})})})},selectTemplate(t){if(this.actibveTemplateIdCount<=0)return!1;let e=this.returnSpByTemplateId(this.activeTemplateId);return this.loadTemplate(e),t.event.preventDefault(),!1},moveDown(t){return this.actibveTemplateIdCount>=this.returnTemplateIdCount(!0,!0)||(this.actibveTemplateIdCount++,this.activeTemplateId="template-id-"+this.actibveTemplateIdCount,document.getElementById(this.activeTemplateId).scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"}),t.event.preventDefault()),!1},moveUp(t){return this.actibveTemplateIdCount<=1||(this.actibveTemplateIdCount=this.actibveTemplateIdCount-1,this.activeTemplateId="template-id-"+this.actibveTemplateIdCount,document.getElementById(this.activeTemplateId).scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"}),t.event.preventDefault()),!1}},computed:Object(s["b"])({activeInput:"activeInput",activeProfile:"activeProfile",startingPoints:"startingPoints",profiles:"profiles",profilesClean:"profilesClean",catInitials:"catInitials",settingsDisplayMode:"settingsDisplayMode"}),data:function(){return{activeTemplateId:null,actibveTemplateIdCount:0}},created:async function(){setTimeout(()=>{console.log(this.profiles),console.log(this.startingPoints)},1e3)},mounted:async function(){}},T=_,x=(i("ef45"),Object(c["a"])(T,m,g,!1,null,"1a6d12be",null)),R=x.exports,E=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{attrs:{id:"home-load"}},[i("h1",[t._v("Load existing records")]),i("hr"),t.config.returnUrls().displayLCOnlyFeatures?i("div",{staticStyle:{"background-color":"whitesmoke",padding:"5px"}}
1,[i("h3",[t._v("Search Instance by LCCN")]),i("p",{},[t._v("Enter LCCN to search for instance to load.")]),i("input",{directives:[{name:"model",rawName:"v-model",value:t.lccnToSearch,expression:"lccnToSearch"}],ref:"lccnToSearch",staticClass:"editor-link-input",staticStyle:{width:"75%"},attrs:{type:"text",id:"lccn-search-val",placeholder:"Enter LCCN"},domProps:{value:t.lccnToSearch},on:{input:[function(e){e.target.composing||(t.lccnToSearch=e.target.value)},t.searchByLccn]}}),i("ol",[t.searchByLccnResults&&0===t.searchByLccnResults.length?i("li",[t._v("No results...")]):t._e(),t.searchByLccnResults&&"string"===typeof t.searchByLccnResults?[i("li",[t._v("Searching...")])]:t._l(t.searchByLccnResults,(function(e,a){return i("li",{key:e.idURL},[i("div",{staticStyle:{display:"flex"}},[i("div",{staticStyle:{flex:"1"}},[t._v(t._s(++a)+". "),i("span",{staticStyle:{"font-weight":"bold"}},[t._v(t._s(e.label))])]),i("div",{staticStyle:{flex:"1"}},[i("a",{attrs:{href:e.bfdbURL,target:"_blank"}},[t._v("View on BFDB")])]),i("div",{staticStyle:{flex:"1"}},[i("a",{attrs:{href:"#",target:"_blank"},on:{click:function(i){i.preventDefault(),t.instanceEditorLink=e.bfdbPackageURL,t.testInstance()}}},[t._v("Retrieve")])])])])}))],2)]):t._e(),t.config.returnUrls().displayLCOnlyFeatures?[i("h3",{staticStyle:{"margin-top":"1em"}},[t._v("Load data from BFDB")]),t._m(0)]:[i("h3",[t._v("Load data from resource package")])],t.makingRequest?i("div",[t._m(1)]):t._e(),i("div",[i("input",{directives:[{name:"model",rawName:"v-model",value:t.instanceEditorLink,expression:"instanceEditorLink"}],ref:"urlToLoad",staticClass:"editor-link-input",staticStyle:{width:"75%"},attrs:{type:"text",id:"instance-editor-link",placeholder:"Paste Editor Link URL"},domProps:{value:t.instanceEditorLink},on:{input:function(e){e.target.composing||(t.instanceEditorLink=e.target.value)}}})]),i("div",[i("div",{staticStyle:{display:"flex"}},[i("div",{staticStyle:{flex:"1","border-right":"solid 1px lightgray",margin:"5px","padding-right":"5px"}},[i("button",{staticStyle:{"font-size":"1.25em","margin-top":"0.5em"},on:{click:function(e){return t.testInstance()}}},[t._v("Suggest Profile")]),t.suggestHardCoded.length>0?i("div",{staticStyle:{"margin-top":"2em","background-color":"aliceblue",padding:"1em"}},[i("div",[t._v("This record was saved using this profile:")]),t._l(t.suggestHardCoded,(function(e){return i("button",{key:e,staticStyle:{"font-size":"1.25em"},on:{click:function(i){return t.loadSuggestd(e)}}},[t._v("Load using: "+t._s(e))])}))],2):t.suggestScore.length>0?i("div",[i("div",{staticStyle:{"margin-top":"2em","background-color":"aliceblue",padding:"1em"}},[i("div",{staticStyle:{"margin-bottom":"1em","font-weight":"bold"}},[t._v("These profiles best fit this data (best to worst):")]),t._l(t.suggestScore,(function(e,a){return i("div",{key:a,staticStyle:{"margin-bottom":"1em"}},[i("button",{staticStyle:{"font-size":"1.25em"},on:{click:function(i){return t.loadSuggestd(e.id)}}},[t._v(t._s(++a)+". "+t._s(e.profile))]),i("input",{attrs:{type:"checkbox",name:"profile-"+e.id,id:"profile-"+e.id},domProps:{checked:t.isAlreadyFavorite("profile",e.id)},on:{input:function(i){return t.toggleIsFavorite("profile",e.id,e.profile)}}}),i("label",{attrs:{for:"profile-"+e.id}},[t._v("Add to favorites")])])}))],2)]):t._e()]),i("div",{staticStyle:{flex:"2",position:"relative","min-height":"100px"}},[i("div",{staticStyle:{"font-weight":"bold"}},[t._v("Favorites:")]),t._l(t.loadResourceFavorites,(function(e,a){return i("div",{key:e.name,staticStyle:{"margin-left":"0.5em",display:"inline-block","margin-top":"0.5em"}},[i("button",{staticStyle:{"font-size":"1.25em"},on:{click:function(i){return t.loadFromFavorite(e.type,e.name)}}},[i("span",[t._v(t._s(++a+t.suggestScore.length)+".")]),e.label?i("span",[t._v(t._s(e.label))]):i("span",[t._v(t._s(e.name))])]),t.showManageFavoriteCheckBoxes?i("div",[i("input",{attrs:{type:"checkbox",name:"profile-"+e.name,id:"profile-"+e.name},domProps:{checked:t.isAlreadyFavorite(e.type,e.name)},on:{input:function(i){return t.toggleIsFavorite(e.type,e.name,e.label)}}}),i("label",{attrs:{for:"profile-"+e.name}},[t._v("Favorite")])]):t._e()])})),t.loadResourceFavorites.length>0?i("div",{staticStyle:{position:"absolute",bottom:"0"}},[i("a",{staticStyle:{color:"inherit","margin-left":"1em"},attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.showManageFavoriteCheckBoxes=!t.showManageFavoriteCheckBoxes}}},[t._v("Manage Favorites")])]):i("div",[t._v(" No favorites added yet... ")])],2)]),i("select",{directives:[{name:"model",rawName:"v-model",value:t.instanceSelected,expression:"instanceSelected"}],staticClass:"editor-link-input",staticStyle:{width:"76%"},on:{change:function(e){var i=Array.prototype.filter.call(e.target.options,
1(function(t){return t.selected})).map((function(t){var e="_value"in t?t._value:t.value;return e}));t.instanceSelected=e.target.multiple?i:i[0]}}},t._l(t.rtLookupInstances,(function(e){return i("option",{key:e,domProps:{selected:"lc:RT:bf2:Monograph:Instance"===e}},[t._v(t._s(e))])})),0),i("div",[i("button",{staticStyle:{"font-size":"1.25em","margin-top":"0.5em"},on:{click:function(e){return t.loadInstance()}}},[t._v("Manually Select Profile")]),i("a",{staticStyle:{color:"inherit","margin-left":"1em"},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.toggleIsFavorite("profile",t.instanceSelected)}}},[t._v("Add selected to favorites")])])]),i("div",{},[i("hr",{staticStyle:{"margin-top":"2em"}}),i("h3",[t._v("Load into Template")]),i("HomeUserTemplateList",{attrs:{parentComponent:"HomeLoadComponent"},on:{loadUsingUserTemplate:t.loadUsingUserTemplate}})],1)],2)},M=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("p",{},[t._v("Go to the "),i("a",{attrs:{href:"https://preprod-8230.id.loc.gov",target:"_blank"}},[t._v("BFDB")]),t._v(" and find an instance to load. Use the editor link button to load into Marva.")])},function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("h1",[i("span",{attrs:{id:"loading-icon"}},[t._v("⟳")]),t._v(" Working...")])}],P=(i("5319"),i("4360"));const D={data:{work:[],instance:[],item:[]},namespace:{bf:"http://id.loc.gov/ontologies/bibframe/",bflc:"http://id.loc.gov/ontologies/bflc/",madsrdf:"http://www.loc.gov/mads/rdf/v1#",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#"},isClass:function(t){return!!t.match(/bf:[A-Z]/)},namespaceUri:function(t){for(let e in this.namespace){let i=this.namespace[e];if(t.includes(i))return t.replace(i,e+":")}},UriNamespace:function(t){for(let e in this.namespace){let i=this.namespace[e];if(t.includes(e))return t.replace(e+":",i)}},returnOneWhereParentIs:function(t,e){if(1==t.length)return t[0];console.log("here");for(let i of t)if(i.parentNode.tagName===e)return i;return!1},activeDom:null,specialTransforms:{"bf:subject":function(t,e){let i=t.children[0];if(!i)return console.error("xml.children[0] for this subject does not exist"),e;e.userValue["@type"]=this.UriNamespace(i.tagName),e.userValue["URI"]=null;let a=null;i.attributes&&i.attributes["rdf:about"]&&(e.userValue["URI"]=i.attributes["rdf:about"].value),i.getElementsByTagName("madsrdf:authoritativeLabel").length>0&&(a=i.getElementsByTagName("madsrdf:authoritativeLabel")[0].innerHTML);let o=[];if(e.userValue["literal"]=a,i.getElementsByTagName("madsrdf:componentList").length>0)for(let r of i.getElementsByTagName("madsrdf:componentList")[0].children){let t=this.UriNamespace(r.tagName),e=null;r.getElementsByTagName("madsrdf:authoritativeLabel").length>0&&(e=r.getElementsByTagName("madsrdf:authoritativeLabel")[0].innerHTML),o.push({literal:e,"@type":t})}return e.userValue["http://www.loc.gov/mads/rdf/v1#componentList"]=o,e},"bf:Work":function(t,e){console.log("~~~~~~~~~~~~~~~~~~~"),console.log(t),console.log(t.attributes["rdf:about"]),console.log(e);let i=t.attributes["rdf:about"].value,a=t.getElementsByTagName("bflc:aap")[0];return a&&(i=a.innerHTML),e.userValue["http://www.w3.org/2002/07/owl#sameAs"]={literal:i,URI:t.attributes["rdf:about"].value},e.userValue.URI=t.attributes["rdf:about"].value,e.userValue.literal=i,e},"bf:contribution":function(t,e){let i=t.getElementsByTagName("bf:agent")[0].children[0];if(!i)return console.error("xml.children[0] for this subject does not exist"),e;e.userValue["@type"]=this.UriNamespace(i.tagName),e.userValue["URI"]=null;let a=null;if(i.getElementsByTagName("rdf:type").length>0&&(e.userValue["@type"]=i.getElementsByTagName("rdf:type")[0].attributes["rdf:resource"].value),i.attributes&&i.attributes["rdf:about"]&&(e.userValue["URI"]=i.attributes["rdf:about"].value),i.getElementsByTagName("madsrdf:authoritativeLabel").length>0?a=i.getElementsByTagName("madsrdf:authoritativeLabel")[0].innerHTML:i.getElementsByTagName("rdfs:label").length>0&&(a=i.getElementsByTagName("rdfs:label")[0].innerHTML),e.userValue["literal"]=a,t.getElementsByTagName("bf:Role").length>0){let i=t.getElementsByTagName("bf:Role")[0],a=null,o=null;i.attributes&&i.attributes["rdf:about"]&&(a=i.attributes["rdf:about"].value),i.getElementsByTagName("rdfs:label").length>0&&(o=i.getElementsByTagName("rdfs:label")[0].innerHTML),e.userValue["http://id.loc.gov/ontologies/bibframe/role"]={URI:a,literal:o}}return e}},transform:function(t){console.log(t);for(const e in t.rt){let i="";e.includes(":Work")?i="bf:Work":e.includes(":Instance")?i="bf:Instance":e.includes(":Item")&&(i="bf:Item");let a=t.rt[e].pt,o=this.activeDom.getElementsByTagName(i);if(o=this.returnOneWhereParentIs(o,"rdf:RDF"),!o){console.warn("Could not find the requested XML fragment, looking for ",i);continue}let r=o.getElementsByTagName("bf:adminMetadata"),s=Array.prototype.slice.call(r);for(let t of r)t.parentNode.removeChild(t);let l=o.getElementsByTagName("bf:hasSeries"),n=Array.prototype.slice.call(l);for(let t of l)t.parentNode.removeChild(t);let c=[];for(let p in a){let i=a[p].propertyURI,r=this.namespaceUri(i),s=o.getElementsByTagName(r);if(s.length>0){c.push(r);let o=0;for(let l of s){let s=null;if(s=JSON.parse(JSON.stringify(a[p])),s.xmlSource=l.outerHTML,console.log(r),this.specialTransforms[r])s=this.specialTransforms[r].call(this,l,s);else for(let t of l.children)if(this.isClass(t.tagName)){s.userValue["@type"]=this.UriNamespace(t.tagName);let e=null;t.attributes&&t.attributes["rdf:about"]&&(e=t.attributes["rdf:about"].value);let a=null;for(let i of t.children)if(this.isClass(i.tagName))console.error("cant handle nested classes yet");else if("rdfs:label"==i.tagName)a=i.innerHTML;else if(this.UriNamespace(i.tagName)||console.error(i.tagName,"what is this"),0==i.children.length)s.userValue[this.UriNamespace(i.tagName)]=i.innerHTML;else{let t=null,e=null,a=null;for(let o of i.children)if(this.isClass(o.tagName)){a=this.UriNamespace(o.tagName),o.attributes&&o.attributes["rdf:about"]&&(t=o.attributes["rdf:about"].value);for(let t of o.children)("rdfs:label"==t.tagName||"madsrdf:authoritativeLabel"==t.tagName||"bf:code"==t.tagName)&&(e=t.nnerHTML);t&&!e&&(e=t.split("/")[t.split("/").length-1])}else console.log("not nested class? what is this",o.innerHTML);t&&e&&a&&(s.userValue[this.UriNamespace(i.tagName)]={"@type":a,literal:e,URI:t})}e&&a?s.userValue[i]={literal:a,URI:e}:!e&&a&&1==Object.keys(s.userValue).length&&(s.userValue[i]={literal:a,URI:null})}if(0===o)a[p]=s;else{let i=`${p}_${o}`,r=t.rt[e].ptOrder.indexOf(p);t.rt[e].ptOrder.splice(r+1,0,i),a[i]=s}o++}}}for(let t of c){let e=o.getElementsByTagName(t);for(let t=e.length-1;t>=0;t-=1)e[t].remove()}t.rt[e].unusedXml=o.outerHTML;let d=0,u={};for(let p in t.rt[e].pt)if(-1===Object.keys(u).indexOf(t.rt[e].pt[p].propertyURI)&&(u[t.rt[e].pt[p].propertyURI]={status:!1,data:[],resourceTemplates:{},unAssingedProperties:[]}),0==Object.keys(t.rt[e].pt[p].userValue).length)t.rt[e].pt[p].dataLoaded=!1;else{t.rt[e].pt[p].dataLoaded=!0,d++,u[t.rt[e].pt[p].propertyURI].status=!0,u[t.rt[e].pt[p].propertyURI].data.push({json:t.rt[e].pt[p].userValue,propertyLabel:t.rt[e].pt[p].propertyLabel,xml:t.rt[e].pt[p].xmlSource}),u[t.rt[e].pt[p].propertyURI].resourceTemplates[p]=t.rt[e].pt[p];let i=[];
1t.rt[e].pt[p].valueConstraint.valueTemplateRefs.forEach(t=>{P["a"].state.rtLookup[t].propertyTemplates.forEach(t=>{-1==i.indexOf(t.propertyURI)&&i.push(t.propertyURI)})}),t.rt[e].pt[p].missingProfile=[],Object.keys(t.rt[e].pt[p].userValue).forEach(a=>{"@value"!==a&&"@type"!==a&&"uri"!==a&&-1===i.indexOf(a)&&(console.log(a,"not found"),t.rt[e].pt[p].missingProfile.push(a),u[t.rt[e].pt[p].propertyURI].unAssingedProperties.push(a))}),u[t.rt[e].pt[p].propertyURI].unAssingedProperties.length>0&&(u[t.rt[e].pt[p].propertyURI].status="mixed")}return t.rt[e].propertyLoadReport=u,t.rt[e].propertyLoadRatio=parseInt(Object.keys(u).filter(t=>u[t].status).length/Object.keys(u).length*100),console.log(d),console.log(s,n),t}},parse:function(t){if(t||(t=this.testXml),window.DOMParser){let e=new DOMParser;this.activeDom=e.parseFromString(t,"text/xml")}console.log(this.activeDom.getElementsByTagName("rdf:type")[0].attributes)},testXml:'<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">\n\t\t\t\t  <bf:Work rdf:about="http://id.loc.gov/resources/works/2998171" xmlns:bf="http://id.loc.gov/ontologies/bibframe/">\n\t\t\t\t    <bflc:aap xmlns:bflc="http://id.loc.gov/ontologies/bflc/">Woolf, Virginia, 1882-1941. To the lighthouse</bflc:aap>\n\t\t\t\t    <bflc:aap-normalized xmlns:bflc="http://id.loc.gov/ontologies/bflc/">woolfvirginia18821941tothelighthouse</bflc:aap-normalized>\n\t\t\t\t    <rdf:type rdf:resource="http://id.loc.gov/ontologies/bibframe/Text"/>\n\t\t\t\t    <bf:language>\n\t\t\t\t      <bf:Language rdf:about="http://id.loc.gov/vocabulary/languages/eng">\n\t\t\t\t        <rdfs:label xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">English</rdfs:label>\n\t\t\t\t      </bf:Language>\n\t\t\t\t    </bf:language>\n\t\t\t\t    <bf:supplementaryContent>\n\t\t\t\t      <bf:SupplementaryContent rdf:about="http://id.loc.gov/authorities/genreForms/gf2014026048">\n\t\t\t\t        <rdfs:label xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">bibliographies</rdfs:label>\n\t\t\t\t      </bf:SupplementaryContent>\n\t\t\t\t    </bf:supplementaryContent>\n\t\t\t\t    <bf:supplementaryContent>\n\t\t\t\t      <bf:SupplementaryContent rdf:about="http://id.loc.gov/vocabulary/msupplcont/index">\n\t\t\t\t        <rdfs:label xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">Index present</rdfs:label>\n\t\t\t\t      </bf:SupplementaryContent>\n\t\t\t\t    </bf:supplementaryContent>\n\t\t\t\t    <bf:genreForm>\n\t\t\t\t      <bf:GenreForm rdf:about="http://id.loc.gov/authorities/genreForms/gf2014026339">\n\t\t\t\t        <rdfs:label xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">fiction</rdfs:label>\n\t\t\t\t      </bf:GenreForm>\n\t\t\t\t    </bf:genreForm>\n\t\t\t\t    <bf:identifiedBy>\n\t\t\t\t      <bf:Lccn>\n\t\t\t\t        <rdf:value>93038757 </rdf:value>\n\t\t\t\t      </bf:Lccn>\n\t\t\t\t    </bf:identifiedBy>\n\t\t\t\t    <bf:geographicCoverage>\n\t\t\t\t      <bf:GeographicCoverage rdf:about="http://id.loc.gov/vocabulary/geographicAreas/e-uk-en">\n\t\t\t\t        <rdfs:label xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">England</rdfs:label>\n\t\t\t\t      </bf:GeographicCoverage>\n\t\t\t\t    </bf:geographicCoverage>\n\t\t\t\t    <bf:classification>\n\t\t\t\t      <bf:ClassificationLcc>\n\t\t\t\t        <bf:source>\n\t\t\t\t          <bf:Source rdf:about="http://id.loc.gov/vocabulary/organizations/dlc"/>\n\t\t\t\t        </bf:source>\n\t\t\t\t        <bf:classificationPortion>PR6045.O72</bf:classificationPortion>\n\t\t\t\t        <bf:itemPortion>T6 1994</bf:itemPortion>\n\t\t\t\t      </bf:ClassificationLcc>\n\t\t\t\t    </bf:classification>\n\t\t\t\t    <bf:classification>\n\t\t\t\t      <bf:ClassificationDdc>\n\t\t\t\t        <bf:classificationPortion>823/.912</bf:classificationPortion>\n\t\t\t\t        <bf:edition rdf:datatype="http://www.w3.org/2001/XMLSchema#anyURI">http://id.loc.gov/vocabulary/classSchemes/ddc20</bf:edition>\n\t\t\t\t        <bf:edition>full</bf:edition>\n\t\t\t\t        <bf:assigner>\n\t\t\t\t          <bf:Agent rdf:about="http://id.loc.gov/vocabulary/organizations/dlc"/>\n\t\t\t\t        </bf:assigner>\n\t\t\t\t      </bf:ClassificationDdc>\n\t\t\t\t    </bf:classification>\n\t\t\t\t    <bf:contribution>\n\t\t\t\t      <bf:Contribution>\n\t\t\t\t        <rdf:type rdf:resource="http://id.loc.gov/ontologies/bflc/PrimaryContribution"/>\n\t\t\t\t        <bf:agent>\n\t\t\t\t          <bf:Agent rdf:about="http://id.loc.gov/rwo/agents/n79041870">\n\t\t\t\t            <rdf:type rdf:resource="http://id.loc.gov/ontologies/bibframe/Person"/>\n\t\t\t\t            <rdfs:label xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">Woolf, Virginia, 1882-1941.</rdfs:label>\n\t\t\t\t            <madsrdf:isIdentifiedByAuthority rdf:resource="http://id.loc.gov/authorities/names/n79041870" xmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#"/>\n\t\t\t\t          </bf:Agent>\n\t\t\t\t        </bf:agent>\n\t\t\t\t        <bf:role>\n\t\t\t\t          <bf:Role rdf:about="http://id.loc.gov/vocabulary/relators/ctb">\n\t\t\t\t            <rdfs:label xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">Contributor</rdfs:label>\n\t\t\t\t          </bf:Role>\n\t\t\t\t        </bf:role>\n\t\t\t\t      </bf:Contribution>\n\t\t\t\t    </bf:contribution>\n\t\t\t\t    <rdfs:label xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">To the lighthouse</rdfs:label>\n\t\t\t\t    <bf:title>\n\t\t\t\t      <bf:Title>\n\t\t\t\t        <rdfs:label xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">To the lighthouse</rdfs:label>\n\t\t\t\t        <bf:mainTitle>To the lighthouse</bf:mainTitle>\n\t\t\t\t      </bf:Title>\n\t\t\t\t    </bf:title>\n\t\t\t\t    <bf:hasSeries>\n\t\t\t\t      <bf:Work rdf:about="http://id.loc.gov/resources/hubs/8a8cae2fea46062d
15e392a9bdf369df0">\n\t\t\t\t        <bflc:aap xmlns:bflc="http://id.loc.gov/ontologies/bflc/">Routledge English texts</bflc:aap>\n\t\t\t\t        <bflc:aap-normalized xmlns:bflc="http://id.loc.gov/ontologies/bflc/">routledgeenglishtexts</bflc:aap-normalized>\n\t\t\t\t        <rdfs:label xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">Routledge English texts</rdfs:label>\n\t\t\t\t        <bf:title>\n\t\t\t\t          <bf:Title>\n\t\t\t\t            <bf:mainTitle>Routledge English texts</bf:mainTitle>\n\t\t\t\t          </bf:Title>\n\t\t\t\t        </bf:title>\n\t\t\t\t      </bf:Work>\n\t\t\t\t    </bf:hasSeries>\n\t\t\t\t    <bf:supplementaryContent>\n\t\t\t\t      <bf:SupplementaryContent>\n\t\t\t\t        <rdfs:label xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">Includes bibliographical references (p. 219-222) and index.</rdfs:label>\n\t\t\t\t      </bf:SupplementaryContent>\n\t\t\t\t    </bf:supplementaryContent>\n\t\t\t\t    <bf:subject>\n\t\t\t\t      <bf:Place>\n\t\t\t\t        <rdf:type rdf:resource="http://www.loc.gov/mads/rdf/v1#ComplexSubject"/>\n\t\t\t\t        <rdfs:label xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">Skye, Island of (Scotland)--Fiction.</rdfs:label>\n\t\t\t\t        <madsrdf:authoritativeLabel xmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#">Skye, Island of (Scotland)--Fiction.</madsrdf:authoritativeLabel>\n\t\t\t\t        <madsrdf:isMemberOfMADSScheme rdf:resource="http://id.loc.gov/authorities/subjects" xmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#"/>\n\t\t\t\t        <madsrdf:componentList rdf:parseType="Collection" xmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#">\n\t\t\t\t          <madsrdf:Geographic>\n\t\t\t\t            <madsrdf:authoritativeLabel>Skye, Island of (Scotland)</madsrdf:authoritativeLabel>\n\t\t\t\t          </madsrdf:Geographic>\n\t\t\t\t          <madsrdf:GenreForm>\n\t\t\t\t            <madsrdf:authoritativeLabel>Fiction</madsrdf:authoritativeLabel>\n\t\t\t\t          </madsrdf:GenreForm>\n\t\t\t\t        </madsrdf:componentList>\n\t\t\t\t        <bflc:aap-normalized xmlns:bflc="http://id.loc.gov/ontologies/bflc/">skyeislandof(scotland)fiction</bflc:aap-normalized>\n\t\t\t\t      </bf:Place>\n\t\t\t\t    </bf:subject>\n\t\t\t\t    <bf:subject>\n\t\t\t\t      <bf:Topic rdf:about="http://id.loc.gov/authorities/subjects/sh2009125026">\n\t\t\t\t        <rdf:type rdf:resource="http://www.loc.gov/mads/rdf/v1#ComplexSubject"/>\n\t\t\t\t        <rdfs:label xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">English--Scotland--Fiction.</rdfs:label>\n\t\t\t\t        <madsrdf:authoritativeLabel xmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#">English--Scotland--Fiction.</madsrdf:authoritativeLabel>\n\t\t\t\t        <madsrdf:isMemberOfMADSScheme rdf:resource="http://id.loc.gov/authorities/subjects" xmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#"/>\n\t\t\t\t        <madsrdf:componentList rdf:parseType="Collection" xmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#">\n\t\t\t\t          <madsrdf:Topic>\n\t\t\t\t            <madsrdf:authoritativeLabel>English</madsrdf:authoritativeLabel>\n\t\t\t\t          </madsrdf:Topic>\n\t\t\t\t          <madsrdf:Geographic>\n\t\t\t\t            <madsrdf:authoritativeLabel>Scotland</madsrdf:authoritativeLabel>\n\t\t\t\t          </madsrdf:Geographic>\n\t\t\t\t          <madsrdf:GenreForm>\n\t\t\t\t            <madsrdf:authoritativeLabel>Fiction</madsrdf:authoritativeLabel>\n\t\t\t\t          </madsrdf:GenreForm>\n\t\t\t\t        </madsrdf:componentList>\n\t\t\t\t        <bflc:aap-normalized xmlns:bflc="http://id.loc.gov/ontologies/bflc/">englishscotlandfiction</bflc:aap-normalized>\n\t\t\t\t      </bf:Topic>\n\t\t\t\t    </bf:subject>\n\t\t\t\t    <bf:subject>\n\t\t\t\t      <bf:Topic rdf:about="http://id.loc.gov/authorities/subjects/sh2008106913">\n\t\t\t\t        <rdf:type rdf:resource="http://www.loc.gov/mads/rdf/v1#ComplexSubject"/>\n\t\t\t\t        <rdfs:label xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">Loss (Psychology)--Fiction.</rdfs:label>\n\t\t\t\t        <madsrdf:authoritativeLabel xmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#">Loss (Psychology)--Fiction.</madsrdf:authoritativeLabel>\n\t\t\t\t        <madsrdf:isMemberOfMADSScheme rdf:resource="http://id.loc.gov/authorities/subjects" xmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#"/>\n\t\t\t\t        <madsrdf:componentList rdf:parseType="Collection" xmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#">\n\t\t\t\t          <madsrdf:Topic>\n\t\t\t\t            <madsrdf:authoritativeLabel>Loss (Psychology)</madsrdf:authoritativeLabel>\n\t\t\t\t          </madsrdf:Topic>\n\t\t\t\t          <madsrdf:GenreForm>\n\t\t\t\t            <madsrdf:authoritativeLabel>Fiction</madsrdf:authoritativeLabel>\n\t\t\t\t          </madsrdf:GenreForm>\n\t\t\t\t        </madsrdf:componentList>\n\t\t\t\t        <bflc:aap-normalized xmlns:bflc="http://id.loc.gov/ontologies/bflc/">loss(psychology)fiction</bflc:aap-normalized>\n\t\t\t\t      </bf:Topic>\n\t\t\t\t    </bf:subject>\n\t\t\t\t    <bf:subject>\n\t\t\t\t      <bf:Topic rdf:about="http://id.loc.gov/authorities/subjects/sh2008107230">\n\t\t\t\t        <rdf:type rdf:resource="http://www.loc.gov/mads/rdf/v1#ComplexSubject"/>\n\t\t\t\t        <rdfs:label xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">Mothers--Death--Fiction.</rdfs:label>\n\t\t\t\t        <madsrdf:authoritativeLabel xmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#">Mothers--Death--Fiction.</madsrdf:authoritativeLabel>\n\t\t\t\t        <madsrdf:isMemberOfMADSScheme rdf:resource="http://id.loc.gov/authorities/subjects" xmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#"/>\n\t\t\t\t        <madsrdf:componentList rdf:parseType="Collection" xmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#">\n\t\t\t\t          <madsrdf:Topic>\n\t\t\t\t            <madsrdf:authoritativeLabel>Mothers</madsrdf:authoritativeLabel>\n\t\t\t\t          </madsrdf:Topic>\n\t\t\t\t          <madsrdf:Topic>\n\t\t\t\t            <madsrdf:authoritativeLabel>Death</madsrdf:authoritativeLabel>\n\t\t\t\t          </madsrdf:Topic>\n\t\t\t\t          <madsrdf:GenreForm>\n\t\t\t\t            <madsrdf:authoritativeLabel>Fiction</madsrdf:authoritativeLabel>\n\t\t\t\t          </madsrdf:GenreForm>\n\t\t\t\t        </madsrdf:componentList>\n\t\t\t\t        <bflc:aap-normalized xmlns:bflc="http://id.loc.gov/ontologies/bflc/">mothersdeathfiction</bflc:aap-normalized>\n\t\t\t\t      </bf:Topic>\n\t\t\t\t    </bf:subject>\n\t\t\t\t    <bf:subject>\n\t\t\t\t      <bf:Topic rdf:about="http://id.loc.gov/authorities/subjects/sh2008111402">\n\t\t\t\t        <rdf:type rdf:resource="http://www.loc.gov/mads/rdf/v1#ComplexSubject"/>\n\t\t\t\t        <rdfs:label xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">Summer resorts--Fiction.</rdfs:label>\n\t\t\t\t        <madsrdf:authoritativeLabel xmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#">Summer resorts--Fiction.</madsrdf:authoritativeLabel>\n\t\t\t\t        <madsrdf:isMemberOfMADSScheme rdf:resource="http://id.loc.gov/authorities/subjects" xmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#"/>\n\t\t\t\t        <madsrdf:componentList rdf:parseType="Collection" xmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#">\n\t\t\t\t          <madsrdf:Topic>\n\t\t\t\t            <madsrdf:authoritativeLabel>Summer resorts</madsrdf:authoritativeLabel>\n\t\t\t\t          </madsrdf:Topic>\n\t\t\t\t          <madsrdf:GenreForm>\n\t\t\t\t            <madsrdf:authoritativeLabel>Fiction</madsrdf:authoritativeLabel>\n\t\t\t\t          </madsrdf:GenreForm>\n\t\t\t\t        </madsrdf:componentList>\n\t\t\t\t        <bflc:aap-normalized xmlns:bflc="http://id.loc.gov/ontologies/bflc/">summerresortsfiction</bflc:aap-normalized>\n\t\t\t\t      </bf:Topic>\n\t\t\t\t    </bf:subject>\n\t\t\t\t    <bf:subject>\n\t\t\t\t      <bf:Topic rdf:about="http://id.loc.gov/authorities/subjects/sh2008107177">\n\t\t\t\t        <rdf:type rdf:resource="http://www.loc.gov/mads/rdf/v1#ComplexSubject"/>\n\t\t\t\t        <rdfs:label xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">Married people--Fiction.</rdfs:label>\n\t\t\t\t        <madsrdf:authoritativeLabel xmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#">Married people--Fiction.</madsrdf:authoritativeLabel>\n\t\t\t\t        <madsrdf:isMemberOfMADSScheme rdf:resource="http://id.loc.gov/authorities/subjects" xmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#"/>\n\t\t\t\t        <madsrdf:componentList rdf:parseType="Collection" xmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#">\n\t\t\t\t          <madsrdf:Topic>\n\t\t\t\t            <madsrdf:authoritativeLabel>Married people</madsrdf:authoritativeLabel>\n\t\t\t\t          </madsrdf:Topic>\n\t\t\t\t          <madsrdf:GenreForm>\n\t\t\t\t            <madsrdf:authoritativeLabel>Fiction</madsrdf:authoritativeLabel>\n\t\t\t\t          </madsrdf:GenreForm>\n\t\t\t\t        </madsrdf:componentList>\n\t\t\t\t        <bflc:aap-normalized xmlns:bflc="http://id.loc.gov/ontologies/bflc/">marriedpeoplefiction</bflc:aap-normalized>\n\t\t\t\t      </bf:Topic>\n\t\t\t\t    </bf:subject>\n\t\t\t\t    <bf:subject>\n\t\t\t\t      <bf:Topic rdf:about="http://id.loc.gov/authorities/subjects/sh2008107119">\n\t\t\t\t        <rdf:type rdf:resource="http://www.loc.gov/mads/rdf/v1#ComplexSubject"/>\n\t\t\t\t        <rdfs:label xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">Lighthouses--Fiction.</rdfs:label>\n\t\t\t\t        <madsrdf:authoritativeLabel xmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#">Lighthouses--Fiction.</madsrdf:authoritativeLabel>\n\t\t\t\t        <madsrdf:isMemberOfMADSScheme rdf:resource="http://id.loc.gov/authorities/subjects" xmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#"/>\n\t\t\t\t        <madsrdf:componentList rdf:parseType="Collection" xmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#">\n\t\t\t\t          <madsrdf:Topic>\n\t\t\t\t            <madsrdf:authoritativeLabel>Lighthouses</madsrdf:authoritativeLabel>\n\t\t\t\t          </madsrdf:Topic>\n\t\t\t\t          <madsrdf:GenreForm>\n\t\t\t\t            <madsrdf:authoritativeLabel>Fiction</madsrdf:authoritativeLabel>\n\t\t\t\t          </madsrdf:GenreForm>\n\t\t\t\t        </madsrdf:componentList>\n\t\t\t\t        <bflc:aap-normalized xmlns:bflc="http://id.loc.gov/ontologies/bflc/">lighthousesfiction</bflc:aap-normalized>\n\t\t\t\t      </bf:Topic>\n\t\t\t\t    </bf:subject>\n\t\t\t\t    <bf:subject>\n\t\t\t\t      <bf:Topic rdf:about="http://id.loc.gov/authorities/subjects/sh2008113433">\n\t\t\t\t        <rdf:type rdf:resource="http://www.loc.gov/mads/rdf/v1#ComplexSubject"/>\n\t\t\t\t        <rdfs:label xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">Widowers--Fiction.</rdfs:label>\n\t\t\t\t        <madsrdf:authoritativeLabel xmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#">Widowers--Fiction.</madsrdf:authoritativeLabel>\n\t\t\t\t        <madsrdf:isMemberOfMADSScheme rdf:resource="http://id.loc.gov/authorities/subjects" xmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#"/>\n\t\t\t\t        <madsrdf:componentList rdf:parseType="Collection" xmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#">\n\t\t\t\t          <madsrdf:Topic>\n\t\t\t\t            <madsrdf:authoritativeLabel>Widowers</madsrdf:authoritativeLabel>\n\t\t\t\t          </madsrdf:Topic>\n\t\t\t\t          <madsrdf:GenreForm>\n\t\t\t\t            <madsrdf:authoritativeLabel>Fiction</madsrdf:authoritativeLabel>\n\t\t\t\t          </madsrdf:GenreForm>\n\t\t\t\t        </madsrdf:componentList>\n\t\t\t\t        <bflc:aap-normalized xmlns:bflc="http://id.loc.gov/ontologies/bflc/">widowersfiction</bflc:aap-normalized>\n\t\t\t\t      </bf:Topic>\n\t\t\t\t    </bf:subject>\n\t\t\t\t    <bf:genreForm>\n\t\t\t\t      <bf:GenreForm rdf:about="http://id.loc.gov/authorities/subjects/sh85108438">\n\t\t\t\t        <rdf:type rdf:resource="http://www.loc.gov/mads/rdf/v1#Topic"/>\n\t\t\t\t        <madsrdf:authoritativeLabel xmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#">Psychological fiction.</madsrdf:authoritativeLabel>\n\t\t\t\t        <bf:source>\n\t\t\t\t          <bf:Source>\n\t\t\t\t            <bf:code>lcsh</bf:code>\n\t\t\t\t          </bf:Source>\n\t\t\t\t        </bf:source>\n\t\t\t\t        <rdfs:label xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">Psychological fiction.</rdfs:label>\n\t\t\t\t      </bf:GenreForm>\n\t\t\t\t    </bf:genreForm>\n\t\t\t\t    <bf:genreForm>\n\t\t\t\t      <bf:GenreForm rdf:about="http://id.loc.gov/authorities/subjects/sh86004353">\n\t\t\t\t        <rdf:type rdf:resource="http://www.loc.gov/mads/rdf/v1#Topic"/>\n\t\t\t\t        <madsrdf:authoritativeLabel xmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#">Domestic fiction.</madsrdf:authoritativeLabel>\n\t\t\t\t        <bf:source>\n\t\t\t\t          <bf:Source>\n\t\t\t\t            <bf:code>lcsh</bf:code>\n\t\t\t\t          </bf:Source>\n\t\t\t\t        </bf:source>\n\t\t\t\t        <rdfs:label xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">Domestic fiction.</rdfs:label>\n\t\t\t\t      </bf:GenreForm>\n\t\t\t\t    </bf:genreForm>\n\t\t\t\t    <bf:contribution>\n\t\t\t\t      <bf:Contribution>\n\t\t\t\t        <bf:agent>\n\t\t\t\t          <bf:Agent rdf:about="http://id.loc.gov/rwo/agents/n87899079">\n\t\t\t\t            <rdf:type rdf:resource="http://id.loc.gov/ontologies/bibframe/Person"/>\n\t\t\t\t            <rdfs:label xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">Kemp, Sandra.</rdfs:label>\n\t\t\t\t            <madsrdf:isIdentifiedByAuthority rdf:resource="http://id.loc.gov/authorities/names/n87899079" xmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#"/>\n\t\t\t\t          </bf:Agent>\n\t\t\t\t        </bf:agent>\n\t\t\t\t        <bf:role>\n\t\t\t\t          <bf:Role rdf:about="http://id.loc.gov/vocabulary/relators/ctb">\n\t\t\t\t            <rdfs:label xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">Contributor</rdfs:label>\n\t\t\t\t          </bf:Role>\n\t\t\t\t        </bf:role>\n\t\t\t\t      </bf:Contribution>\n\t\t\t\t    </bf:contribution>\n\t\t\t\t    <dcterms:isPartOf rdf:resource="http://id.loc.gov/resources/works" xmlns:dcterms="http://purl.org/dc/terms/"/>\n\t\t\t\t    <bf:hasInstance>\n\t\t\t\t      <bf:Instance rdf:about="http://id.loc.gov/resources/instances/2998171">\n\t\t\t\t        <bflc:aap xmlns:bflc="http://id.loc.gov/ontologies/bflc/">To the lighthouse</bflc:aap>\n\t\t\t\t      </bf:Instance>\n\t\t\t\t    </bf:hasInstance>\n\t\t\t\t    <bf:adminMetadata>\n\t\t\t\t      <bf:AdminMetadata>\n\t\t\t\t        <bf:generationProcess>\n\t\t\t\t          <bf:GenerationProcess>\n\t\t\t\t            <rdfs:label xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">DLC marc2bibframe2 v1.5.0-SNAPSHOT: 2019-06-13T11:45:19-04:00</rdfs:label>\n\t\t\t\t          </bf:GenerationProcess>\n\t\t\t\t        </bf:generationProcess>\n\t\t\t\t        <bf:status>\n\t\t\t\t          <bf:Status>\n\t\t\t\t            <rdfs:label xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">increase in encoding level from prepublication</rdfs:label>\n\t\t\t\t            <bf:code>p</bf:code>\n\t\t\t\t          </bf:Status>\n\t\t\t\t        </bf:status>\n\t\t\t\t        <bflc:encodingLevel xmlns:bflc="http://id.loc.gov/ontologies/bflc/">\n\t\t\t\t          <bflc:EncodingLevel rdf:about="http://id.loc.gov/vocabulary/menclvl/f">\n\t\t\t\t            <rdfs:label xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">full</rdfs:label>\n\t\t\t\t          </bflc:EncodingLevel>\n\t\t\t\t        </bflc:encodingLevel>\n\t\t\t\t        <bf:descriptionConventions>\n\t\t\t\t          <bf:DescriptionConventions rdf:about="http://id.loc.gov/vocabulary/descriptionConventions/aacr">\n\t\t\t\t            <rdfs:label xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">aacr</rdfs:label>\n\t\t\t\t          </bf:DescriptionConventions>\n\t\t\t\t        </bf:descriptionConventions>\n\t\t\t\t        <bf:identifiedBy>\n\t\t\t\t          <bf:Local>\n\t\t\t\t            <rdf:value>2998171</rdf:value>\n\t\t\t\t            <bf:assigner>\n\t\t\t\t              <bf:Agent rdf:about="http://id.loc.gov/vocabulary/organizations/dlc"/>\n\t\t\t\t            </bf:assigner>\n\t\t\t\t          </bf:Local>\n\t\t\t\t        </bf:identifiedBy>\n\t\t\t\t        <bf:changeDate rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2005-02-15T16:40:14</bf:changeDate>\n\t\t\t\t        <bf:creationDate rdf:datatype="http://www.w3.org/2001/XMLSchema#date">1993-10-12</bf:creationDate>\n\t\t\t\t        <bf:source>\n\t\t\t\t          <bf:Source rdf:about="http://id.loc.gov/vocabulary/or
1ganizations/dlc">\n\t\t\t\t            <rdf:type rdf:resource="http://id.loc.gov/ontologies/bibframe/Agent"/>\n\t\t\t\t            <rdfs:label xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">DLC</rdfs:label>\n\t\t\t\t          </bf:Source>\n\t\t\t\t        </bf:source>\n\t\t\t\t        <bf:source>\n\t\t\t\t          <bf:Source rdf:about="http://id.loc.gov/vocabulary/organizations/dlc">\n\t\t\t\t            <rdf:type rdf:resource="http://id.loc.gov/ontologies/bibframe/Agent"/>\n\t\t\t\t            <rdfs:label xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">DLC</rdfs:label>\n\t\t\t\t          </bf:Source>\n\t\t\t\t        </bf:source>\n\t\t\t\t        <bf:descriptionModifier>\n\t\t\t\t          <bf:Agent rdf:about="http://id.loc.gov/vocabulary/organizations/dlc">\n\t\t\t\t            <rdfs:label xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">DLC</rdfs:label>\n\t\t\t\t          </bf:Agent>\n\t\t\t\t        </bf:descriptionModifier>\n\t\t\t\t      </bf:AdminMetadata>\n\t\t\t\t    </bf:adminMetadata>\n\t\t\t\t    <bf:expressionOf>\n\t\t\t\t      <bf:Work rdf:about="http://id.loc.gov/resources/hubs/03a711d5e5b9763d7a03d9f4d7d5c642">\n\t\t\t\t        <bflc:aap xmlns:bflc="http://id.loc.gov/ontologies/bflc/">Woolf, Virginia, 1882-1941. To the lighthouse</bflc:aap>\n\t\t\t\t      </bf:Work>\n\t\t\t\t    </bf:expressionOf>\n\t\t\t\t  </bf:Work>\n\t\t\t\t</rdf:RDF>'};var O=D,U=i("44e1");const A=i("82fd"),N=A("0123456789");var V={name:"HomeLoadComponent",components:{HomeUserTemplateList:I},props:{},methods:{loadFromFavorite:function(t,e){"profile"===t?this.loadSuggestd(e):"template"===t&&document.getElementById("template-"+e).click()},searchByLccn:async function(){if(this.lccnToSearch.length<8)return!1;window.clearTimeout(this.lccnToSearchTimeout),this.searchByLccnResults="Searching...",this.lccnToSearchTimeout=window.setTimeout(async()=>{this.searchByLccnResults=await w["a"].searchInstanceByLCCN(this.lccnToSearch),console.log(this.searchByLccnResults)},500)},toggleIsFavorite:function(t,e,i){this.isAlreadyFavorite(t,e)?this.$store.dispatch("removeLoadResourceFavorite",{self:this,type:t,name:e,label:i}):this.$store.dispatch("addLoadResourceFavorite",{self:this,type:t,name:e,label:i})},isAlreadyFavorite:function(t,e){return this.loadResourceFavorites.filter(i=>i.type===t&&i.name===e).length>0},testInstance:async function(){this.suggestHardCoded=[],""!=this.instanceEditorLink&&null!=this.instanceEditorLink||(this.instanceEditorLink=this.instanceTests[Math.floor(Math.random()*this.instanceTests.length)]),this.makingRequest=!0,this.$store.dispatch("fetchBfdbXML",{self:this,url:this.instanceEditorLink}).then(async()=>
1{if(this.makingRequest=!1,!this.bfdbXML||"ERROR"===this.bfdbXML.substring(0,5))return alert("There was an error requesting that record"),!1;{U["a"].parse(this.bfdbXML);let t=U["a"].testProfiles(this.profiles);t.hardCoded&&(t.hardCoded.filter(t=>t.includes(":Work")).length>0&&t.hardCoded.filter(t=>t.includes(":Instance")).length>0&&(t.hardCoded=t.hardCoded.filter(t=>t.includes(":Instance"))),this.suggestHardCoded=t.hardCoded),t.scoreResults=t.scoreResults.filter(t=>t.id),t.scoreResults=t.scoreResults.filter(t=>!t.id.includes("test")),t.scoreResults=t.scoreResults.filter(t=>!t.profile.includes("test")),t.scoreResults=t.scoreResults.filter(t=>!t.profile.includes("lc:profile")),this.suggestScore=t.scoreResults.slice(0,5)}})},loadSuggestd:async function(t){this.instanceSelected=t,this.loadInstance()},loadUsingUserTemplate:async function(t){if(""===this.$refs.urlToLoad.value.trim())return alert("You must enter a resource address first above."),!1;let e=JSON.parse(t.profile);e.isTemplate=!0,this.instanceSelected=e,await this.loadInstance()},loadInstance:async function(){""!=this.instanceEditorLink&&null!=this.instanceEditorLink||(this.instanceEditorLink=this.instanceTests[Math.floor(Math.random()*this.instanceTests.length)]),this.makingRequest=!0,this.$store.dispatch("fetchBfdbXML",{self:this,url:this.instanceEditorLink}).then(async()=>
1{if(!this.bfdbXML||"ERROR"===this.bfdbXML.substring(0,5))return this.makingRequest=!1,alert("There was an error requesting that record"),!1;{U["a"].parse(this.bfdbXML);let t=null;if(this.instanceSelected&&this.instanceSelected.isTemplate)t=JSON.parse(JSON.stringify(this.instanceSelected));else for(let e in this.profiles)this.profiles[e].rtOrder.indexOf(this.instanceSelected)>-1&&(t=JSON.parse(JSON.stringify(this.profiles[e])));if(U["a"].hasItem>0&&Array.from(Array(U["a"].hasItem)).map((e,i)=>{let a;if(this.instanceSelected&&this.instanceSelected.isTemplate){let t=this.instanceSelected.rtOrder.filter(t=>t.includes(":Instance"))[0];a=t.replace(":Instance",":Item")}else a=this.instanceSelected.replace(":Instance",":Item");let o=!1;for(let r in this.profiles)for(let e in this.profiles[r].rt)if(e==a){let s=a+"-"+(i+1),l=JSON.parse(JSON.stringify(this.profiles[r].rt[e]));for(let t in l.pt)l.pt[t]["@guid"]=A.generate();o=!0,t.rtOrder.push(s),t.rt[s]=l}o||(console.warn("error: foundCorrectItemProfile not set ---------"),console.warn(this.rtLookup[a]))}),t.log||(t.log=[]),t.log.push({action:"loadInstance",from:this.instanceEditorLink}),t.procInfo="update instance",!t.eId){let e="e"+N.new();e=e.substring(0,8),t.eId=e}t.user||(t.user=this.catInitials),t.status||(t.status="unposted"),this.transformResults=await U["a"].transform(t),await this.$store.dispatch("setActiveRecordSaved",{self:this},!1),this.$store.dispatch("clearUndo",{self:this}),this.$store.dispatch("setActiveProfile",{self:this,profile:this.transformResults}).then(async()=>{this.settingsDisplayMode,this.$router.push({name:"Edit",params:{recordId:t.eId}}),this.$store.dispatch("setActiveUndo",{self:this,msg:"Loaded record"}),this.makingRequest=!1,this.$store.dispatch("forceSave",{self:this},!0).then(()=>{this.$store.dispatch("setActiveRecordSaved",{self:this},!0).then(()=>{})})})}})},search:function(t){window.clearTimeout(this.searchTimeout),this.searchActive=!0,this.searchTimeout=window.setTimeout(()=>{this.$store.dispatch("fetchIdWorkSearch",{self:this,searchValue:t.target.value}).then(()=>{this.searchActive=!1})},500)},rtChange:function(t){this.useRtSelected=t.target.value},load:function(t,e){this.$store.dispatch("fetchIdXML",{self:this,url:t}).then(()=>{O.parse(this.idXML);let t=null;for(let e in this.profiles)this.profiles[e].rtOrder.indexOf(this.useRtSelected)>-1&&(t=JSON.parse(JSON.stringify(this.profiles[e])));this.transformResults=O.transform(t);let i=this.transformResults.rtOrder.filter(t=>t.includes(":Work"))[0];this.transformResultsDisplay=this.transformResults.rt[i],e&&this.$store.dispatch("setActiveProfile",{self:this,profile:this.transformResults}).then(()=>{this.$router.push({path:"edit"})})})}},computed:Object(s["b"])({activeInput:"activeInput",activeProfile:"activeProfile",startingPoints:"startingPoints",profiles:"profiles",profilesLoaded:"profilesLoaded",idWorkSearchResults:"idWorkSearchResults",settingsDisplayMode:"settingsDisplayMode",rtLookup:"rtLookup",idXML:"idXML",loadResourceFavorites:"loadResourceFavorites",bfdbXML:"bfdbXML",catInitials:"catInitials",rtLookupWorks(t){let e=[];for(let i of Object.keys(t.rtLookup))i.includes(":Work")&&e.push(i);return e},rtLookupInstances(t){let e=[];for(let i of Object.keys(t.rtLookup))i.includes(":Instance")&&e.push(i);return e}}),data:function(){return{useRtSelected:"lc:RT:bf2:Monograph:Work",searchTimeout:null,transformResults:null,transformResultsDisplay:null,activeTemplateId:null,actibveTemplateIdCount:0,searchActive:!0,instanceSelected:"lc:RT:bf2:Monograph:Instance",instanceEditorLink:null,makingRequest:!1,lccnToSearch:null,lccnToSearchTimeout:!1,searchByLccnResults:null,showManageFavoriteCheckBoxes:!1,config:k["a"],suggestHardCoded:[],suggestScore:[],instanceTests:["/bfe2/editor/tests/instances/string.xml"]}},created:function(){let t=window.setInterval(()=>{if(this.profilesLoaded&&this.$router.currentRoute&&this.$router.currentRoute.query&&this.$router.currentRoute.query.url){let e=this.$router.currentRoute.query.url;this.$router.currentRoute&&this.$router.currentRoute.query&&this.$router.currentRoute.query.action&&"loadwork"==this.$router.currentRoute.query.action&&(e=e.replace(".jsonld",".rdf")),this.$router.currentRoute&&this.$router.currentRoute.query&&this.$router.currentRoute.query.action&&"loadibc"==this.$router.currentRoute.query.action&&(e=e.replace(".jsonld",".xml")),this.instanceEditorLink=e,this.testInstance(),window.clearInterval(t)}},500)}},j=V,$=(i("321f"),Object(c["a"])(j,E,M,!1,null,"11d2cb2d",null)),K=$.exports,F=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{attrs:{id:"home-settings"}},[i("div",{staticClass:"grid"},[i("aside",{staticClass:"sidebar-left",staticStyle:{"background-color":"#4b4b4b",color:"#ffffff"}},[i("ul",{staticClass:"sidebar-menu"},[i("li",{class:{active:t.isDiacritics}},[i("router-link",{class:{active:t.isDiacritics},attrs:{to:"/settings/diacritics"}},[t._v("Diacritics")])],1),i("li",{class:{active:t.isLookups}},[i("router-link",{class:{active:t.isLookups},attrs:{to:"/settings/lookups"}},[t._v("Authority & Lookups")])],1)])]),i("article",{attrs:{id:"settings-content"}},[t.isDiacritics?i("HomeSettingsDiacriticsComponent"):t._e(),t.isLookups?i("HomeSettingsAuthorityLookupComponent"):t._e()],1)])])},B=[],H=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{attrs:{id:"home-settings-diacritics"}},[i("h1",[t._v("Diacritic Packs")]),i("div",[t._v("You can only have one enabled at a time:")]),i("div",{staticStyle:{display:"flex","background-color":"whitesmoke",padding:"5px"}},[i("div",{staticStyle:{flex:"3"}},[i("div",[t._v("Voyager Macro Express Shortcuts")]),i("details",[i("summary",[t._v("Show shortcut keys:")]),i("table",{staticStyle:{"border-top":"1px solid #c6c9cc"}},t._l(t.dPackVoyagerShortCuts,(function(e,a){return i("tr",{key:a},[i("td",[t._v(t._s(e.combo))]),i("td",[t._v(t._s(e.nick)+" "+t._s(e.name?e.name:""))])])})),0)])]),i("div",{staticStyle:{flex:"1"}},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.dPackVoyager,expression:"dPackVoyager"}],attrs:{type:"checkbox",id:"switch"},domProps:{checked:Array.isArray(t.dPackVoyager)?t._i(t.dPackVoyager,null)>-1:t.dPackVoyager},on:{change:[function(e){var i=t.dPackVoyager,a=e.target,o=!!a.checked;if(Array.isArray(i)){var r=null,s=t._i(i,r);a.checked?s<0&&(t.dPackVoyager=i.concat([r])):s>-1&&(t.dPackVoyager=i.slice(0,s).concat(i.slice(s+1)))}else t.dPackVoyager=o},t.settingsChange]}}),i("label",{attrs:{for:"switch"}},[t._v("Toggle")])])]),i("div",{staticStyle:{display:"flex","background-color":"whitesmoke",padding:"5px"}},[i("div",{staticStyle:{flex:"3"}},[i("div",[t._v("Voyager Diacritic Entry Mode Shortcuts")]),i("details",[i("summary",[t._v("Show shortcut keys:")]),t._m(0),i("table",{staticStyle:{"border-top":"1px solid #c6c9cc"}},t._l(t.dPackVoyagerShortCutsNative,(function(e,a){return i("tr",{key:a},[i("td",[t._v(t._s(e.combo))]),i("td",[t._v(t._s(e.nick)+" "+t._s(e.name?e.name:""))])])})),0)])]),i("div",{staticStyle:{flex:"1"}},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.dPackVoyagerNative,expression:"dPackVoyagerNative"}],attrs:{type:"checkbox",id:"switchNative"},domProps:{checked:Array.isArray(t.dPackVoyagerNative)?t._i(t.dPackVoyagerNative,null)>-1:t.dPackVoyagerNative},on:{change:[function(e){var i=t.dPackVoyagerNative,a=e.target,o=!!a.checked;if(Array.isArray(i)){var r=null,s=t._i(i,r);a.checked?s<0&&(t.dPackVoyagerNative=i.concat([r])):s>-1&&(t.dPackVoyagerNative=i.slice(0,s).concat(i.slice(s+1)))}else t.dPackVoyagerNative=o},t.settingsChange]}}),i("label",{attrs:{for:"switchNative"}},[t._v("Toggle")])])]),i("hr"),i("h1",[t._v("Custom Diacritics")]),i("h3",[t._v("Your custom defined diacritics")]),t._l(t.locatStorageDiacritics,(function(e,a){return i("div",{key:a,staticClass:"current-diacritics"},[i("div",{staticClass:"component-container-input-container current-diacritics-display"},[i("div",{class:["component-container-fake-input","no-lower-right-border-radius"],staticStyle:{"background-color":"#eaeaea"}},[i("form",{attrs:{autocomplete:"off"}},[i("div",{staticClass:"component-nested-container-title"},[t._v("diacritic")]),i("input",{staticClass:"input-nested selectable-input",attrs:{disabled:"",autocomplete:"off",type:"text"},domProps:{value:t.locatStorageDiacritics[a].letter}})])]),i("div",{class:["component-container-fake-input","no-upper-border","no-lower-border","no-upper-right-border-radius","no-lower-right-border-radius"],staticStyle:{"background-color":"#eaeaea"}},[i("form",{attrs:{autocomplete:"off"}},[i("div",{staticClass:"component-nested-container-title"},[t._v("trigger key")]),i("input",{staticClass:"input-nested selectable-input",attrs:{disabled:"",bfeType:"EditLiteralComponent-nested",autocomplete:"off",type:"text"},domProps:{value:'"'+t.locatStorageDiacritics[a].trigger+'"'}})])]),i("div",{class:["component-container-fake-input","no-upper-border","no-upper-right-border-radius"],staticStyle:{"background-color":"#eaeaea"}},[i("form",{attrs:{autocomplete:"off"}},[i("div",{staticClass:"component-nested-container-title"},[t._v("description")]),i("input",{staticClass:"input-nested selectable-input",attrs:{disabled:"",autocomplete:"off",type:"text"},domProps:{value:t.locatStorageDiacritics[a].desc}})])])]),i("div",{staticClass:"current-diacritics-button"},[i("button",{on:{click:function(e){return t.removeExisting(t.locatStorageDiacritics[a].keycode)}}},[t._v("Remove")])])])})),i("hr"),i("h3",[t._v("Add new definition")]),t._m(1),i("div",{staticClass:"component-container-input-container"},[i("div",{class:["component-container-fake-input","no-lower-right-border-radius"]},[i("form",{attrs:{autocomplete:"off"}},[i("div",{staticClass:"component-nested-container-title"},[t._v("diacritic")]),i("input",{directives:[{name:"model",rawName:"v-model",value:t.newCutomDiacriticLetter,expression:"newCutomDiacriticLetter"}],staticClass:"input-nested selectable-input",attrs:{id:"newDiacriticDiacritic",bfeType:"EditLiteralComponent-nested",autocomplete:"off",type:"text"},domProps:{value:t.newCutomDiacriticLetter},on:{keydown:function(e){if(!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter"))return null;e.preventDefault()},keyup:t.nav,input:function(e){e.target.composing||(t.newCutomDiacriticLetter=e.target.value)}}})])]),i("div",{class:["component-container-fake-input","no-upper-border","no-lower-border","no-upper-right-border-radius","no-lower-right-border-radius"]},[i("form",{attrs:{autocomplete:"off"}},[i("div",{staticClass:"component-nested-container-title"},[t._v("trigger key")]),i("input",{directives:[{name:"model",rawName:"v-model",value:t.newCutomDiacriticKey,expression:"newCutomDiacriticKey"}],staticClass:"input-nested selectable-input",attrs:{id:"newDiacriticKey",bfeType:"EditLiteralComponent-nested",autocomplete:"off",type:"text",placeholder:"(press the key you want to use to select this diacritic from the menu)"},domProps:{value:t.newCutomDiacriticKey},on:{keydown:function(e){if(!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter"))return null;e.preventDefault()},keyup:t.nav,keypress:t.selectKeyField,focus:t.clearKeyField,input:function(e){e.target.composing||(t.newCutomDiacriticKey=e.target.value)}}})])]),i("div",{class:["component-container-fake-input","no-upper-border","no-upper-right-border-radius"]},[i("form",{attrs:{autocomplete:"off"}},[i("div",{staticClass:"component-nested-container-title"},[t._v("description")]),i("input",{directives:[{name:"model",rawName:"v-model",value:t.newCutomDiacriticDesc,expression:"newCutomDiacriticDesc"}],staticClass:"input-nested selectable-input",attrs:{id:"newDiacriticDesc",bfeType:"EditLiteralComponent-nested",autocomplete:"off",type:"text"},domProps:{value:t.newCutomDiacriticDesc},on:{keydown:function(e){if(!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter"))return null;e.preventDefault()},keyup:t.nav,input:function(e){e.target.composing||(t.newCutomDiacriticDesc=e.target.value)}}})])]),i("button",{on:{click:t.addDiacritic}},[t._v("Add")])])],2)},G=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[t._v(" With this mode you press Control+e to put the input into diacritic mode, then press one of the short cuts listed below."),i("br"),i("br"),t._v(" For example, to add an acute to a letter you would "),i("ol",[i("li",[t._v('Enter the letter, for example "a"')]),i("li",[t._v("Press Control+e")]),i("li",[t._v('Press they key "b"')])])])},function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("details",[i("summary",[t._v("Help")]),t._v(' The system provided a quick menu for inserting diacritic characters into a text field. You can add another diacritic to your quick menu below. The "diacritic" field is the character you would like to insert into text, for example é, ü, ø, etc.. The "trigger key" is the key, once the diacritic quick menue is o
1pen, that will insert the diacritic charater. Once you are in that field press the key you want to trigger it. The "description" field is a short description of this diacritic mark, like "acute e" or "umlaut u", etc.. ')])}],z=i("960b"),W=i("ca8e"),J={name:"HomeSettingsDiacriticsComponent",components:{},props:{},methods:{removeExisting(t){let e=this.locatStorageDiacritics;e=e.filter(e=>e.keycode!=t),localStorage.setItem("bfeDiacritics",JSON.stringify(e)),this.locatStorageDiacritics=e},addDiacritic(){if(null===this.newCutomDiacriticLetter||""===this.newCutomDiacriticLetter.trim())return alert("Please fill out the 'diacritic' field"),!1;if(null===this.newCutomDiacriticKeyCode||""===this.newCutomDiacriticKeyCode)return alert("Please fill out the 'trigger key' field"),!1;if(null===this.newCutomDiacriticDesc||""===this.newCutomDiacriticDesc.trim())return alert("Please fill out the 'description' field"),!1;let t=localStorage.getItem("bfeDiacritics");t=null===t?[]:JSON.parse(t);let e={letter:this.newCutomDiacriticLetter,trigger:this.newCutomDiacriticKey.replace('"',"").replace('"',""),keycode:this.newCutomDiacriticKeyCode,desc:this.newCutomDiacriticDesc};if(t.filter(t=>t.keycode==e.keycode).length>0)return alert("You are already using this trigger key, please pick a different one"),!1;t.push(e),localStorage.setItem("bfeDiacritics",JSON.stringify(t)),this.locatStorageDiacritics=t,this.newCutomDiacriticLetter=null,this.newCutomDiacriticKey="",this.newCutomDiacriticKeyCode=null,this.newCutomDiacriticDesc=null,document.getElementById("newDiacriticDiacritic").focus()},nav(t){"ArrowDown"==t.key&&("newDiacriticDiacritic"===t.target.id&&document.getElementById("newDiacriticKey").focus(),"newDiacriticKey"===t.target.id&&document.getElementById("newDiacriticDesc").focus()),"ArrowUp"==t.key&&("newDiacriticDesc"===t.target.id&&document.getElementById("newDiacriticKey").focus(),"newDiacriticKey"===t.target.id&&document.getElementById("newDiacriticDiacritic").focus()),"Enter"==t.key&&"newDiacriticDesc"===t.target.id&&this.addDiacritic()},clearKeyField(){this.newCutomDiacriticKey="",this.newCutomDiacriticKeyCode=null},selectKeyField(t){return this.newCutomDiacriticKeyCode=t.keyCode,this.newCutomDiacriticKey=`"${t.key}"`,t.preventDefault(),document.getElementById("newDiacriticDesc").focus(),!1},settingsChange(){this.$store.dispatch("setSettingsDPackVoyager",{self:this,settingsDPackVoyager:this.dPackVoyager}).then(()=>{this.dPackVoyager&&this.dPackVoyagerNative&&(this.dPackVoyagerNative=!1,this.settingsChange())}),this.$store.dispatch("setSettingsDPackVoyagerNative",{self:this,settingsDPackVoyagerNative:this.dPackVoyagerNative}).then(()=>{this.dPackVoyager&&this.dPackVoyagerNative&&(this.dPackVoyagerNative=!1,this.settingsChange())})}},computed:Object(s["b"])({profiles:"profiles",profilesLoaded:"profilesLoaded",settingsDPackVoyager:"settingsDPackVoyager",settingsDPackVoyagerNative:"settingsDPackVoyagerNative"}),data:function(){return{newCutomDiacriticLetter:null,newCutomDiacriticKey:null,newCutomDiacriticDesc:null,newCutomDiacriticKeyCode:null,dPackVoyager:!0,dPackVoyagerNative:!1,dPackVoyagerShortCuts:[],dPackVoyagerShortCutsNative:[],locatStorageDiacritics:[]}},created:function(){let t=localStorage.getItem("bfeDiacritics");t=null===t?[]:JSON.parse(t);for(let e in z)for(let t of z[e])this.dPackVoyagerShortCuts.push(t);for(let e in W)for(let t of W[e])this.dPackVoyagerShortCutsNative.push(t);this.dPackVoyager=this.settingsDPackVoyager,this.dPackVoyagerNative=this.settingsDPackVoyagerNative,this.locatStorageDiacritics=t}},q=J,X=(i("b304"),Object(c["a"])(q,H,G,!1,null,"1f6f3272",null)),Y=X.exports,Q=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{attrs:{id:"home-settings-lookups"}},[i("div",{staticStyle:{display:"flex","background-color":"whitesmoke",padding:"5px"}},[t._m(0),i("div",{staticStyle:{flex:"1"}},[i("div",{staticStyle:{"margin-left":"auto","margin-right":"auto"}},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.useStringEditor,expression:"useStringEditor"}],attrs:{type:"checkbox",id:"switchStringSubjectEditor"},domProps:{checked:Array.isArray(t.useStringEditor)?t._i(t.useStringEditor,null)>-1:t.useStringEditor},on:{change:[function(e){var i=t.useStringEditor,a=e.target,o=!!a.checked;if(Array.isArray(i)){var r=null,s=t._i(i,r);a.checked?s<0&&(t.useStringEditor=i.concat([r])):s>-1&&(t.useStringEditor=i.slice(0,s).concat(i.slice(s+1)))}else t.useStringEditor=o},t.useStringEditorChange]}}),i("label",{attrs:{for:"switchStringSubjectEditor"}},[t._v("Toggle")])])])])])},Z=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticStyle:{flex:"3"}},[i("div",{staticStyle:{"font-weight":"bold"}},[t._v("Use the string based subject editor")]),i("p",[t._v("This option turns on the string based subject edtior which is designed to be a more user freindly interface for building subject strings. If you turn it off you will use the same lookup interface for names for subject headings.")])])}],tt={name:"HomeSettingsAuthorityLookupComponent",components:{},props:{},methods:{useStringEditorChange:function(){console.log("seeting to ",this.useStringEditor),this.$store.dispatch("settingsLookupsUseTextSubjectEditor",{self:this,settingsLookupsUseTextSubjectEditor:this.useStringEditor}).then(()=>{})}},computed:Object(s["b"])({profiles:"profiles",profilesLoaded:"profilesLoaded",settingsLookupsUseTextSubjectEditor:"settingsLookupsUseTextSubjectEditor"}),data:function(){return{useStringEditor:!0}},created:function(){console.log("settingsLookupsUseTextSubjectEditor",this.settingsLookupsUseTextSubjectEditor),this.useStringEditor=this.settingsLookupsUseTextSubjectEditor}},et=tt,it=(i("334c"),Object(c["a"])(et,Q,Z,!1,null,"0f64ddc8",null)),at=it.exports,ot={name:"HomeSettingsComponent",components:{HomeSettingsDiacriticsComponent:Y,HomeSettingsAuthorityLookupComponent:at},props:{},methods:{},computed:Object(s["b"])({profiles:"profiles",profilesLoaded:"profilesLoaded",isDiacritics(){return"/settings/diacritics"===this.$route.fullPath||"/settings"===this.$route.fullPath},isLookups(){return"/settings/lookups"===this.$route.fullPath}}),data:function(){return{}},created:function(){}},rt=ot,st=(i("4b9d"),Object(c["a"])(rt,F,B,!1,null,"1f8eb898",null)),lt=st.exports,nt=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{attrs:{id:"home-load"}},[i("h1",{staticStyle:{padding:"0.5em"}},[t._v("My Records")]),i("HomeRecordsComponent",{attrs:{allrecords:!1}})],1)},ct=[],dt=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{attrs:{id:"home-load"}},[i("Keypress",{attrs:{"key-event":"keydown","key-code":40},on:{success:t.moveDown}}),i("Keypress",{attrs:{"key-event":"keydown","key-code":38},on:{success:t.moveUp}}),i("Keypress",{attrs:{"key-event":"keydown","key-code":13},on:{success:t.selectTemplate}}),i("div",{staticStyle:{display:"flex"}},[i("div",{staticStyle:{flex:"2"}},["searching"!=this.browseType?i("fieldset",{staticClass:"multiswitch",attrs:{"data-theme":"stoplight"}},[i("legend",[t._v("Select what type of records to browse:")]),i("div",{staticClass:"slide-container"},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.browseType,expression:"browseType"}],attrs:{type:"radio",name:"stoplight",value:"unposted",id:"stoplight1"},domProps:{checked:t._q(t.browseType,"unposted")},on:{change:[function(e){t.browseType="unposted"},t.browseTypeChange]}}),i("label",{attrs:{for:"stoplight1"}},[t._v("Unposted Records ("+t._s(this.records.length)+")")]),i("input",{directives:[{name:"model",rawName:"v-model",value:t.browseType,expression:"browseType"}],attrs:{type:"radio",name:"stoplight",value:"posted",id:"stoplight2"},domProps:{checked:t._q(t.browseType,"posted")},on:{change:[function(e){t.browseType="posted"},t.browseTypeChange]}}),i("label",{attrs:{for:"stoplight2"}},[t._v("Posted Records ("+t._s(this.recordsPublished.length)+")")]),i("input",{directives:[{name:"model",rawName:"v-model",value:t.browseType,expression:"browseType"}],attrs:{type:"radio",name:"stoplight",value:"deleted",id:"stoplight3"},domProps:{checked:t._q(t.browseType,"deleted")},on:{change:[function(e){t.browseType="deleted"},t.browseTypeChange]}}),i("label",{attrs:{for:"stoplight3"}},[t._v("Deleted (from Marva) ("+t._s(this.recordsDeleted.length)+")")]),i("a",{staticClass:"slide",attrs:{"aria-hidden":"true"}})])]):t._e()]),i("div",{staticStyle:{flex:"1","border-left":"solid 1px darkgray","padding-left":"2em"}},[i("div",{staticStyle:{display:"block","margin-bottom":"10px","font-weight":"600"}},[t._v("Search for records older than 2 week:")]),i("div",[i("input",{directives:[{name:"model",rawName:"v-model",value:t.searchValue,expression:"searchValue"}],attrs:{id:"search",type:"text",placeholder:"Search For..."},domProps:{value:t.searchValue},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.search(e)}
1,input:function(e){e.target.composing||(t.searchValue=e.target.value)}}}),i("button",{staticStyle:{"margin-right":"0.5em"},on:{click:t.search}},[t._v("Search")]),i("button",{on:{click:t.clear}},[t._v("Clear")])])])]),"searching"==t.browseType?[t._m(0)]:t._e(),"unposted"==t.browseType?[i("h3",[t._v("Unposted Records - Workspace")]),i("table",[i("thead",[i("th",[t._v("Title")]),i("th",[t._v("Resource")]),i("th",[t._v("Type")]),i("th",[t._v("ID")]),i("th",[t._v("Primary contribution")]),i("th",[t._v("LCCN")]),i("th",[t._v("User")]),i("th",[t._v("Modified")]),t.allrecords?t._e():i("th"),i("th")]),i("tbody",t._l(t.records,(function(e){return i("tr",{key:e.eid},[i("td",{class:["selectable-template",{active:t.activeTemplateId==t.returnTemplateIdCount(e.eid)}],attrs:{id:t.returnTemplateIdCount(e.eid)}},[t._v(t._s(e.title))]),i("td",[t._v(t._s(e.typeid))]),i("td",t._l(e.profiletypes,(function(e){return i("div",{key:e},[t._v(t._s(e))])})),0),i("td",[t._v(t._s(e.eid))]),i("td",[t._v(t._s(e.contributor))]),"unposted"==e.status?i("td",{attrs:{title:e.status}},[t._v(t._s(e.lccn))]):"published"==e.status?i("td",{staticStyle:{"background-color":"lawngreen"},attrs:{title:e.status}},[t._v(" "+t._s(e.lccn)+" "),t._l(t.resourceLinks(e),(function(e){return i("div",{key:e.url},[i("a",{attrs:{href:e.url+"?blastdacache="+Date.now(),target:"_blank"}},[t._v("View "+t._s(e.type)+" on "+t._s(e.env))])])}))],2):i("td",{attrs:{title:e.status}},[t._v(t._s(e.lccn))]),i("td",[t._v(t._s(e.user))]),i("td",[t._v(t._s(e.time))]),t.allrecords?t._e():i("td",[i("a",{staticClass:"delete-link",attrs:{href:"#"},on:{click:function(i){return t.deleteRecord(i,e.eid)}}},[t._v("Delete")])]),i("td",[i("a",{staticClass:"load-link",attrs:{href:"#"},on:{click:function(i){return t.selectTemplateClickLoad(i,e.eid)}}},[t._v("Load")])])])})),0)])]:t._e(),"posted"==t.browseType?[i("h3",[t._v("Posted Records")]),i("table",[t._m(1),i("tbody",t._l(t.recordsPublished,(function(e){return i("tr",{key:e.eid},[i("td",[t._v(t._s(e.title))]),i("td",[t._v(t._s(e.typeid))]),i("td",t._l(e.profiletypes,(function(e){return i("div",{key:e},[t._v(t._s(e))])})),0),i("td",[t._v(t._s(e.eid))]),i("td",[t._v(t._s(e.contributor))]),"unposted"==e.status?i("td",{attrs:{title:e.status}},[t._v(t._s(e.lccn))]):"published"==e.status?i("td",{staticStyle:{"background-color":"lawngreen"},attrs:{title:e.status}},[t._v(" "+t._s(e.lccn)+" "),t._l(t.resourceLinks(e),(function(e){return i("div",{key:e.url},[i("a",{attrs:{href:e.url+"?blastdacache="+Date.now(),target:"_blank"}},[t._v("View "+t._s(e.type)+" on "+t._s(e.env))])])}))],2):i("td",{attrs:{title:e.status}},[t._v(t._s(e.lccn))]),i("td",[t._v(t._s(e.user))]),i("td",[t._v(t._s(e.time))]),i("td",[i("a",{staticClass:"load-link",attrs:{href:"#"},on:{click:function(i){return t.loadRecord(!1,e.eid,i)}}},[t._v("Load")])])])})),0)])]:t._e(),"deleted"==t.browseType?[i("h3",[t._v("Deleted Records")]),i("table",[t._m(2),i("tbody",t._l(t.recordsDeleted,(function(e){return i("tr",{key:e.eid},[i("td",[t._v(t._s(e.title))]),i("td",[t._v(t._s(e.typeid))]),i("td",t._l(e.profiletypes,(function(e){return i("div",{key:e},[t._v(t._s(e))])})),0),i("td",[t._v(t._s(e.eid))]),i("td",[t._v(t._s(e.contributor))]),"unposted"==e.status?i("td",{attrs:{title:e.status}},[t._v(t._s(e.lccn))]):"published"==e.status?i("td",{staticStyle:{"background-color":"lawngreen"},attrs:{title:e.status}},[t._v(" "+t._s(e.lccn)+" "),t._l(t.resourceLinks(e),(function(e){return i("div",{key:e.url},[i("a",{attrs:{href:e.url+"?blastdacache="+Date.now(),target:"_blank"}},[t._v("View "+t._s(e.type)+" on "+t._s(e.env))])])}))],2):i("td",{attrs:{title:e.status}},[t._v(t._s(e.lccn))]),i("td",[t._v(t._s(e.user))]),i("td",[t._v(t._s(e.time))]),i("td",{staticClass:"load-link",staticStyle:{cursor:"pointer"},on:{click:function(i){return t.loadRecord(!1,e.eid,i)}}},[t._v("Load")])])})),0)])]:t._e()],2)},ut=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("h1",[i("span",{attrs:{id:"loading-icon"}},[t._v("⟳")]),t._v(" Loading data...")])},function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("thead",[i("th",[t._v("Title")]),i("th",[t._v("Resource")]),i("th",[t._v("Type")]),i("th",[t._v("ID")]),i("th",[t._v("Primary contribution")]),i("th",[t._v("LCCN")]),i("th",[t._v("User")]),i("th",[t._v("Modified")]),i("th"),i("th")])},function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("thead",[i("th",[t._v("Title")]),i("th",[t._v("Resource")]),i("th",[t._v("Type")]),i("th",[t._v("ID")]),i("th",[t._v("Primary contribution")]),i("th",[t._v("LCCN")]),i("th",[t._v("User")]),i("th",[t._v("Modified")]),i("th")])}],pt={name:"HomeRecordsComponent",components:{Keypress:()=>i.e("chunk-2d0ba165").then(i.bind(null,"365a"))},props:{allrecords:Boolean},methods:{clear:function(){this.searchValue="",this.refreshRecords()},search:function(){console.log(this.searchValue),""!=this.searchValue.trim()&&(this.browseType="searching",this.$store.dispatch("fetchAllRecords",{self:this,search:this.searchValue,user:this.allrecords?"all":this.catInitials}).then(()=>{this.records=this.allRecords.filter(t=>"unposted"==t.status),this.recordsDeleted=this.allRecords.filter(t=>"deleted"==t.status),this.recordsPublished=this.allRecords.filter(t=>"published"==t.status),this.browseType="unposted"}))},browseTypeChange:function(){console.log(this.browseType)},returnSpByTemplateId(t){let e=null,i=1;
1return Object.keys(this.records).forEach(a=>{"template-id-"+i++===t&&(e=a)}),e},resourceLinks(t){let e=[];if(t&&t.externalid)for(let i of t.externalid){let a;i.includes("/items/")&&(a="Item"),i.includes("/works/")&&(a="Work"),i.includes("/instances/")&&(a="Instance");let o=k["a"].convertToRegionUrl(i),r=k["a"].returnUrls().env;t.typeid.includes("GPO")&&(o=o.replace("preprod-8230","preprod-8210")),e.push({type:a,url:o,env:r})}return e},returnTemplateIdCount(t,e){let i={},a=1;return this.records.forEach(t=>{i[t.eid]="template-id-"+a++}),e?Object.keys(i).length:i[t]},loadRecord:async function(t,e,i){let a;!1!==t?a=this.records[t].eid:!t&&e&&(a=e),this.transformResults=await b["a"].loadRecordFromBackend(a),console.log("this.transformResults",this.transformResults),console.log(a),this.$store.dispatch("setActiveRecordSaved",{self:this},!1).then(()=>{}),this.$store.dispatch("setActiveProfile",{self:this,profile:this.transformResults}).then(()=>{"spreadsheet"==this.settingsDisplayMode?this.$router.push({name:"CompactEdit",params:{recordId:a}}):this.$router.push({name:"Edit",params:{recordId:a}})}),i&&i.preventDefault()},selectTemplateClick:async function(t){let e=this.returnSpByTemplateId(t.target.id);this.loadRecord(e)},selectTemplateClickLoad:async function(t,e){let i=0;for(let a of this.records){if(a.eid==e)break;i++}this.loadRecord(i),t.preventDefault()},selectTemplate(t){if(this.actibveTemplateIdCount<=0)return!1;let e=this.returnSpByTemplateId(this.activeTemplateId);return this.loadRecord(e),t.event.preventDefault(),!1},moveDown(t){return this.actibveTemplateIdCount>=this.returnTemplateIdCount(!0,!0)||(this.actibveTemplateIdCount++,this.activeTemplateId="template-id-"+this.actibveTemplateIdCount,document.getElementById(this.activeTemplateId).scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"}),t.event.preventDefault()),!1},moveUp(t){return this.actibveTemplateIdCount<=1||(this.actibveTemplateIdCount=this.actibveTemplateIdCount-1,this.activeTemplateId="template-id-"+this.actibveTemplateIdCount,document.getElementById(this.activeTemplateId).scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"}),t.event.preventDefault()),!1},async deleteRecord(t,e){let i=k["a"].returnUrls().util,a=k["a"].returnUrls().env;i=`${i}delete/${a}/${this.catInitials}/${e}`;const o=await fetch(i,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:"{}"}),r=await o.json();r.result||alert("Could not delete record, connection problems?"),this.refreshRecords()},refreshRecords(){this.browseType="searching",this.allrecords?this.$store.dispatch("fetchAllRecords",{self:this,user:null}).then(()=>{this.records=this.allRecords.filter(t=>"unposted"==t.status),this.recordsDeleted=this.allRecords.filter(t=>"deleted"==t.status),this.recordsPublished=this.allRecords.filter(t=>"published"==t.status),this.browseType="unposted"}):this.$store.dispatch("fetchMyRecords",{self:this,user:this.catInitials}).then(()=>{this.records=this.myRecords.filter(t=>"unposted"==t.status),this.recordsDeleted=this.myRecords.filter(t=>"deleted"==t.status),this.recordsPublished=this.myRecords.filter(t=>"published"==t.status),this.browseType="unposted"})}},computed:Object(s["b"])({activeProfile:"activeProfile",startingPoints:"startingPoints",profiles:"profiles",profilesLoaded:"profilesLoaded",myRecords:"myRecords",allRecords:"allRecords",catInitials:"catInitials",settingsDisplayMode:"settingsDisplayMode"}),data:function(){return{records:[],recordsDeleted:[],recordsPublished:[],recordsSearched:[],activeTemplateId:null,actibveTemplateIdCount:0,browseType:"unposted",searchValue:""}},created:function(){this.refreshRecords()}},ht=pt,ft=(i("30f2"),Object(c["a"])(ht,dt,ut,!1,null,"4e0ddb25",null)),mt=ft.exports,gt={name:"HomeMyRecordsComponent",components:{HomeRecordsComponent:mt},props:{},methods:{},computed:Object(s["b"])({activeProfile:"activeProfile",startingPoints:"startingPoints",profiles:"profiles",profilesLoaded:"profilesLoaded",myRecords:"myRecords",catInitials:"catInitials"}),data:function(){return{}},created:function(){this.$store.dispatch("fetchMyRecords",{self:this,user:this.catInitials}).then(()=>{})}},bt=gt,vt=Object(c["a"])(bt,nt,ct,!1,null,"b49f6ad6",null),yt=vt.exports,wt=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{attrs:{id:"home-load"}},[i("h1",{staticStyle:{padding:"0.5em"}},[t._v("All Records")]),i("HomeRecordsComponent",{attrs:{allrecords:!0}})],1)},kt=[],St={name:"HomeAllRecordsComponent",components:{HomeRecordsComponent:mt},props:{},methods:{},computed:Object(s["b"])({activeProfile:"activeProfile",startingPoints:"startingPoints",profiles:"profiles",profilesLoaded:"profilesLoaded",allRecords:"allRecords"}),data:function(){return{}},created:function(){this.$store.dispatch("fetchAllRecords",{self:this}).then(()=>{})}},Ct=St,Lt=Object(c["a"])(Ct,wt,kt,!1,null,"74233032",null),It=Lt.exports,_t=function(){var t=this,e=t.$createElement;t._self._c;return t._m(0)},Tt=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{attrs:{id:"home-settings"}},[i("div",{staticStyle:{padding:"1em"}},[i("h1",[t._v("Quick Start Video")]),i("p",[t._v("These quick videos (no audio) show how to get started using the editor, click to expand the section:")]),i("details",[i("summary",[t._v(" The home screens. ")]),i("video",{attrs:{controls:"",width:"75%"}},[i("source",{attrs:{src:"https://github.com/lcnetdev/bfe2/blob/master/manual/vi
1deos/bfe2_help_home_screens.webm?raw=true",type:"video/webm"}})])]),i("details",[i("summary",[t._v(" Edit screen navigation. ")]),i("video",{attrs:{controls:"",width:"75%"}},[i("source",{attrs:{src:"https://github.com/lcnetdev/bfe2/blob/master/manual/videos/bfe2_edit_general.webm?raw=true",type:"video/webm"}})])]),i("details",[i("summary",[t._v(" Duplicate / Remove / Switch Properties. ")]),i("video",{attrs:{controls:"",width:"75%"}},[i("source",{attrs:{src:"https://github.com/lcnetdev/bfe2/blob/master/manual/videos/bfe2_edit_dupe_remove_switch.webm?raw=true",type:"video/webm"}})])]),i("details",[i("summary",[t._v(" Literal fields and custom diacritics. ")]),i("video",{attrs:{controls:"",width:"75%"}},[i("source",{attrs:{src:"https://github.com/lcnetdev/bfe2/blob/master/manual/videos/bfe2_edit_literal.webm?raw=true",type:"video/webm"}})])]),i("details",[i("summary",[t._v(" Simple lookup fields. ")]),i("video",{attrs:{controls:"",width:"75%"}},[i("source",{attrs:{src:"https://github.com/lcnetdev/bfe2/blob/master/manual/videos/bfe2_edit_simple_lookup.webm?raw=true",type:"video/webm"}})])]),i("details",[i("summary",[t._v(" Complex lookup fields (NAF, LCSH, etc.). ")]),i("video",{attrs:{controls:"",width:"75%"}},[i("source",{attrs:{src:"https://github.com/lcnetdev/bfe2/blob/master/manual/videos/bfe2_edit_complex_lookup.webm?raw=true",type:"video/webm"}})])])])])}],xt={name:"HomeHelpComponent",components:{},props:{},methods:{},computed:Object(s["b"])({profiles:"profiles",profilesLoaded:"profilesLoaded"}),data:function(){return{}},created:function(){}},Rt=xt,Et=(i("35b4"),Object(c["a"])(Rt,_t,Tt,!1,null,"4f1f0795",null)),Mt=Et.exports,Pt={name:"Home",components:{HomeNewComponent:R,HomeLoadComponent:K,HomeSettingsComponent:lt,HomeMyRecordsComponent:yt,HomeAllRecordsComponent:It,HomeHelpComponent:Mt,Keypress:()=>i.e("chunk-2d0ba165").then(i.bind(null,"365a"))},data:function(){return{activeTemplate:null}},methods:{moveDown(){console.log("home press")},changeCatId(t){localStorage.removeItem("bfeCatInitials"),this.$store.dispatch("setCatInitials",{self:this,catInitials:null}).then(()=>{}),t.preventDefault()},isProd:function(){return"dev"!=k["a"].returnUrls().env&&("staging"!=k["a"].returnUrls().env&&("production"==k["a"].returnUrls().env||void 0))},navRoute(t){77==t.event.keyCode&&"/myrecords"!=this.$route.fullPath&&this.$router.push({path:"/myrecords"}),69==t.event.keyCode&&"/allrecords"!=this.$route.fullPath&&this.$router.push({path:"/allrecords"}),78==t.event.keyCode&&"/new"!=this.$route.fullPath&&this.$router.push({path:"/new"}),79==t.event.keyCode&&"/load"!=this.$route.fullPath&&this.$router.push({path:"/load"}),73==t.event.keyCode&&"/settings"!=this.$route.fullPath&&this.$router.push({path:"/settings"})}},computed:Object(s["b"])({profilesLoaded:"profilesLoaded",startingPoints:"startingPoints",catInitials:"catInitials",version:()=>`${k["a"].versionMajor}.${k["a"].versionMinor}.${k["a"].versionPatch}`,isMyRecords(){return"/myrecords"===this.$route.fullPath},isAllRecords(){return"/allrecords"===this.$route.fullPath},isNew(){return"/new"===this.$route.fullPath||"/"===this.$route.fullPath},isLoad(){return this.$route.fullPath.includes("/load")},isSettings(){return this.$route.fullPath.startsWith("/settings")},isHelp(){return this.$route.fullPath.startsWith("/help")}}),created:function(){this.$store.dispatch("fetchProfiles",{self:this})},beforeCreate:function(){document.body.classList.add("height-100"),console.log(document.getElementById("app")),document.getElementById("app").classList.add("height-100")}},Dt=Pt,Ot=(i("cf7a"),Object(c["a"])(Dt,h,f,!1,null,"8e000c7a",null)),Ut=Ot.exports,At=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"grid"},[i("EditNavToolBar",{ref:"navToolBar",attrs:{forceComponentRedraw:t.forceComponentRedraw}}),i("Keypress",{attrs:{"key-event":"keydown","key-code":40},on:{success:t.moveDown}}),i("Keypress",{attrs:{"key-event":"keydown","key-code":38},on:{success:t.moveUp}}),i("Keypress",{attrs:{"key-event":"keydown","key-code":34},on:{success:t.movePageDown}}),i("Keypress",{attrs:{"key-event":"keydown","key-code":33},on:{success:t.movePageUp}}),i("Keypress",{attrs:{"key-event":"keydown","multiple-keys":[{keyCode:187,modifiers:["ctrlKey","shiftKey"],preventDefault:!0}]},on:{success:t.dupeProperty}}),i("Keypress",{attrs:{"key-event":"keydown","multiple-keys":[{keyCode:189,modifiers:["ctrlKey","shiftKey"],preventDefault:!0}]},on:{success:t.removeProperty}}),i("aside",{staticClass:"sidebar-left",staticStyle:{"background-color":"#2a2a2a",color:"#ffffff"},attrs:{id:"edit-left-menu"}},[t.profilesLoaded?i("div",{ref:"editLeftMenuFixed",staticStyle:{height:"98vh","overflow-y":"scroll",position:"fixed",width:"20%"},attrs:{id:"edit-left-menu-fixed"}},t._l(t.activeProfile.rtOrder,(function(e){return i("div",{key:e},[1!=t.activeProfile.rt[e].noData?i("div",[i("div",{staticClass:"container-type-icon",staticStyle:{color:"#ffffff",width:"inherit","text-align":"left"}},[i("div",["Work"==e.split(":").slice(-1)[0]?i("svg",{attrs:{width:"1.5em",height:"1.1em",version:"1.1",xmlns:"http://www.w3.org/2000/svg"}},[i("circle",{attrs:{fill:"#7badad",cx:"0.55em",cy:"0.6em",r:"0.45em"}})]):t._e(),e.includes("Instance")?i("div",{staticClass:"temp-icon-instance",staticStyle:{height:"1em",width:"1em",display:"inline-block"}}):t._e(),e.includes(":Item")?i("div",{staticStyle:{height:"1em",width:"1em",display:"inline-block"}},[i("svg",{attrs:{viewBox:"0 -32 50 72",version:"1.1",xmlns:"http://www.w3.org/2000/svg"}},[i("rect",{staticStyle:{fill:"#eaeaea","stroke-width":"0.5",stroke:"rgb(0,0,0)"},attrs:{width:"40px",height:"40px"}})])]):t._e(),e.endsWith(":Hub")?i("div",{staticStyle:{height:"1.25em",width:"1.25em",display:"inline-block"}},[i("svg",{attrs:{version:"1.1",viewBox:"0 -20 100 100",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{fill:"royalblue",d:"m62.113 24.66 1.9023-15.238 18.875 32.691-7.5469 20.004 15.238 1.9023-32.691 18.875-20.004-7.5469-1.9023 15.238-18.875-32.691 7.5469-20.004-15.238-1.9023 32.691-18.875zm-17.684 15.695-4.0781 15.215 15.215 4.0781 4.0781-15.215z","fill-rule":"evenodd"}})])]):t._e(),i("span",[t._v(t._s(e.split(":").slice(-1)[0]))])])]),i("ul",{key:"leftmenu"+t.activeEditCounter,staticStyle:{"padding-left":"0"}},t._l(t.activeProfile.rt[e].ptOrder,(function(a,o){return i("li",{key:a,class:["left-menu-list-item","enriched-menu",{"left-menu-list-item-has-data":t.liHasData(t.activeProfile.rt[e].pt[a])&&0!=t.returnOpacFormat(t.activeProfile.rt[e].pt[a].userValue).length,"left-menu-list-item-active":t.activeComponent==a&&t.activeProfileName==e,"left-menu-list-item-hide":!t.displayComponentCheck(t.activeProfile.rt[e].pt[a]),"is-hidden-li":!0===t.settingsHideEmptyFields&&t.activeProfile.rt[e].pt[a].canBeHidden}],attrs:{id:"menu"+e+a},on:{click:function(i){t.scrollFieldContainerIntoView(i,e.replace(/\(|\)|\s|\/|:|\.|\|/g,"_")+o+a.replace(/\(|\)|\s|\/|:|\.|\|/g,"_"))}}},[t.settingsHideEmptyFields?[t.activeProfile.rt[e].pt[a].canBeHidden&&!t.activeProfile.rt[e].pt[a].deleted?i("a",{key:"left_li_"+o+"_"+t.keyCounter,attrs:{href:"#"},on:{click:function(i){t.makeVisible(i,a,e.replace(/\(|\)|\s|\/|:|\.|\|/g,"_")+o+a.replace(/\(|\)|\s|\/|:|\.|\|/g,"_"))}}}
1,[i("svg",{attrs:{width:"25px",height:"25px",version:"1.1",viewBox:"0 -25 100 100",xmlns:"http://www.w3.org/2000/svg"}},[i("g",[i("path",{staticStyle:{fill:"rgba(255,255,255,0.75)"},attrs:{d:"m94.199 48.398c-6.7969-4.9766-13.879-9.543-21.211-13.684-0.78125-0.42969-1.7539-0.29297-2.3828 0.33594l-32.574 32.574c-0.48047 0.48047-0.68359 1.1641-0.54297 1.8281 0.13672 0.66016 0.60156 1.207 1.2305 1.4531 3.5742 1.5391 7.3945 2.4297 11.281 2.6211 14.695 0 43-21.031 44.199-21.926 0.50391-0.37891 0.80078-0.97266 0.80078-1.6016s-0.29688-1.2227-0.80078-1.6016z"}}),i("path",{staticStyle:{fill:"rgba(255,255,255,0.75)"},attrs:{d:"m27.98 65.535c0.53125 0 1.0391-0.21094 1.4141-0.58594l32.574-32.574c0.48047-0.48047 0.68359-1.1641 0.54297-1.8281-0.13672-0.66016-0.60156-1.207-1.2305-1.4531-4.5312-1.7617-8.2227-2.6211-11.281-2.6211-14.695 0-43 21.031-44.199 21.926-0.50391 0.37891-0.80078 0.97266-0.80078 1.6016s0.29688 1.2227 0.80078 1.6016c6.7969 4.9766 13.879 9.543 21.211 13.684 0.29688 0.16406 0.62891 0.25 0.96875 0.25z"}}),i("path",{staticStyle:{fill:"rgba(255,255,255,0.75)"},attrs:{d:"m86.414 13.586c-0.78125-0.78125-2.0469-0.78125-2.8281 0l-70 70c-0.38281 0.375-0.60156 0.88281-0.60547 1.418 0 0.53516 0.21094 1.0508 0.58594 1.4297 0.37891 0.375 0.89453 0.58594 1.4297 0.58594 0.53516-0.003906 1.043-0.22266 1.418-0.60547l70-70c0.78125-0.78125 0.78125-2.0469 0-2.8281z"}})])]),i("span",{staticStyle:{color:"rgba(255,255,255,0.75) !important"}},[t._v(t._s(t.activeProfile.rt[e].pt[a].propertyLabel))])]):!1===t.activeProfile.rt[e].pt[a].canBeHidden?i("a",{key:"left_li_"+o+"_"+t.keyCounter,staticStyle:{"font-weight":"bold"},attrs:{href:"#"},on:{click:function(i){t.scrollFieldContainerIntoView(i,e.replace(/\(|\)|\s|\/|:|\.|\|/g,"_")+o+a.replace(/\(|\)|\s|\/|:|\.|\|/g,"_"))}}},[t._v(t._s(t.activeProfile.rt[e].pt[a].propertyLabel))]):!0===t.activeProfile.rt[e].pt[a].deleted?i("a",{key:"left_li_"+o+"_"+t.keyCounter,staticClass:"simptip-position-right",staticStyle:{color:"rgba(255,255,255,0.75) !important"},attrs:{href:"#","data-tooltip":"Click to restore"},on:{click:function(i){return t.restoreDelete(i,e,a)}}},[t._v(t._s(t.activeProfile.rt[e].pt[a].propertyLabel)+" [Deleted]")]):t._e()]:[1!=t.activeProfile.rt[e].pt[a].deleted?i("a",{key:"left_li_"+o+"_"+t.keyCounter,attrs:{href:"#"},on:{click:function(i){t.scrollFieldContainerIntoView(i,e.replace(/\(|\)|\s|\/|:|\.|\|/g,"_")+o+a.replace(/\(|\)|\s|\/|:|\.|\|/g,"_"))}}},[t._v(t._s(t.activeProfile.rt[e].pt[a].propertyLabel))]):!0===t.activeProfile.rt[e].pt[a].deleted?i("a",{key:"left_li_"+o+"_"+t.keyCounter,staticClass:"simptip-position-right",staticStyle:{color:"rgba(255,255,255,0.75) !important"},attrs:{href:"#","data-tooltip":"Click to restore"},on:{click:function(i){return t.restoreDelete(i,e,a)}}},[t._v(t._s(t.activeProfile.rt[e].pt[a].propertyLabel)+" [Deleted]")]):t._e()],t.settingsLeftMenuEnriched?i("div",[t.activeProfile.rt[e].pt[a].valueConstraint.valueTemplateRefs.length>1?[i("ul",t._l(t.returnTemplateTypes(t.activeProfile.rt[e].pt[a].valueConstraint.valueTemplateRefs),(function(r){return i("li",{key:r},[i("a",{attrs:{href:"#"},on:{click:function(i){i.preventDefault(),i.stopPropagation(),t.scrollFieldContainerIntoView(i,e.replace(/\(|\)|\s|\/|:|\.|\|/g,"_")+o+a.replace(/\(|\)|\s|\/|:|\.|\|/g,"_"))}}},[t._v(t._s(r))])])})),0)]:t._e(),i("div",{staticClass:"enriched-menu-controls"},[!t.settingsHideEmptyFields||t.settingsHideEmptyFields&&!t.activeProfile.rt[e].pt[a].canBeHidden?[i("button",{staticClass:"left-menu-button-dupe-blank",attrs:{title:"Add Blank Component [CRTL+SHIFT+PLUS_SIGN(+)]"},on:{click:function(i){return t.addProperty(i,e,a)}}},[i("svg",{attrs:{width:"25px",height:"25px",version:"1.1",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{staticClass:"enriched-menu-icon",attrs:{d:"m50 2.6797c-26.082 0-47.395 21.23-47.395 47.32 0 26.082 21.238 47.32 47.395 47.32 26.082 0 47.32-21.234 47.32-47.32 0-26.082-21.234-47.32-47.32-47.32zm0 10.996c20.039 0 36.324 16.289 36.324 36.324 0 20.039-16.289 36.324-36.324 36.324-20.039 0-36.324-16.289-36.324-36.324 0-20.039 16.289-36.324 36.324-36.324zm0 9.625c-3.0117 0-5.5352 2.5234-5.5352 5.5352v15.164h-1
15.16c-3.0117 0-5.5391 2.5234-5.5391 5.5352 0 3.0156 2.5234 5.5352 5.5391 5.5352h15.16v15.16c0 3.0117 2.5234 5.5352 5.5352 5.5352s5.5352-2.5234 5.5352-5.5352v-15.16h15.16c3.0117 0 5.5391-2.5234 5.5391-5.5352 0-3.0156-2.5938-5.457-5.5391-5.457h-15.16v-15.242c0-3.0117-2.5234-5.5352-5.5352-5.5352z"}})])]),i("button",{staticClass:"left-menu-button-remove",attrs:{title:"Remove Component [CRTL+SHIFT+MINUS_SIGN(-)]"},on:{click:function(i){return t.removeProperty(e,a)}}},[i("svg",{attrs:{width:"25px",height:"25px",version:"1.1",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"}},[i("g",[i("path",{staticClass:"enriched-menu-icon",attrs:{d:"m50 0c-27.613 0-50 22.387-50 50s22.387 50 50 50 50-22.387 50-50-22.387-50-50-50zm0 90c-22.059 0-40-17.941-40-40s17.941-40 40-40 40 17.941 40 40-17.941 40-40 40z"}}),i("path",{staticClass:"enriched-menu-icon",attrs:{d:"m71.613 36.719c0-2.2109-0.875-4.3281-2.4414-5.8945-1.5625-1.5664-3.6797-2.4414-5.8945-2.4414s-4.3281 0.87891-5.8945 2.4414l-8.25 8.25-8.25-8.25c-1.5625-1.5625-3.6797-2.4414-5.8945-2.4414-2.207 0.003907-4.3164 0.87891-5.8828 2.4453-1.5625 1.5625-2.4375 3.6836-2.4375 5.8906 0 2.2109 0.87891 4.3281 2.4414 5.8945l8.25 8.25-8.25 8.25c-1.5625 1.5586-2.4414 3.6758-2.4414 5.8867s0.875 4.3281 2.4414 5.8945c1.5625 1.5625 3.6797 2.4375 5.8906 2.4375s4.3281-0.87891 5.8945-2.4414l8.25-8.25 8.25 8.25c1.5586 1.5625 3.6758 2.4414 5.8867 2.4414s4.3281-0.875 5.8945-2.4414c1.5664-1.5625 2.4414-3.6797 2.4414-5.8945s-0.87891-4.3281-2.4414-5.8945l-8.25-8.25 8.25-8.25c1.5625-1.5547 2.4375-3.6719 2.4375-5.8828z"}})])])]),i("button",{staticClass:"left-menu-button-dupe",attrs:{title:"Duplicate Component"},on:{click:function(i){return t.addProperty(i,e,a,!0)}}},[i("svg",{attrs:{width:"25px",height:"25px",version:"1.1",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"}},[i("g",[i("path",{staticClass:"enriched-menu-icon",attrs:{d:"m79.5 31.801h-43.398c-1.8008 0-3.3008 1.5-3.3008 3.3008v43.5c0 1.8008 1.5 3.3008 3.3008 3.3008h43.5c1.8008 0 3.3008-1.5 3.3008-3.3008l-0.003906-43.5c-0.097657-1.8008-1.5-3.3008-3.3984-3.3008z"}}),i("path",{staticClass:"enriched-menu-icon",attrs:{d:"m67.199 29.801v-7.5c0-2.3008-1.8008-4.1016-4.1016-4.1016h-41.797c-2.3008 0-4.1016 1.8984-4.1016 4.1016v41.801c0 2.3008 1.8008 4.1016 4.1016 4.1016h9.5v-33.102c0-2.8984 2.3984-5.3008 5.3008-5.3008z"}})])])]),t.canSendToInstance(t.activeProfile.rt[e].pt[a].propertyURI,e)?i("button",{staticClass:"left-menu-button-send",attrs:{title:"Send To Instance"},on:{click:function(i){return t.sendToInstance(i,e,a,t.activeProfile.rt[e].pt[a])}}},[i("svg",{attrs:{width:"25px",height:"25px",version:"1.1",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{staticClass:"enriched-menu-icon",attrs:{d:"m100 50-100-44.414 9.4961 37.988 34.918 6.4258-34.918 6.4258-9.4961 37.988z","fill-rule":"evenodd"}})])]):t._e()]:t._e()],2)],2):t._e()],2)})),0)]):t._e()])})),0):t._e()]),i("article",[t.profilesLoaded?i("div",t._l(t.activeProfile.rtOrder,(function(e){return i("div",{key:e},[1!=t.activeProfile.rt[e].noData?i("div",{class:["container-"+e.split(":").slice(-1)[0].split("-")[0]]},[i("div",{staticStyle:{display:"flex"}},[i("div",{staticStyle:{flex:"0"}},[e.includes("Instance")?i("div",{staticClass:"temp-icon-instance",staticStyle:{height:"1.75em",width:"2em","margin-left":"1.5em"}}):t._e(),"Work"==e.split(":").slice(-1)[0]?i("svg",{attrs:{width:"3em",height:"2.5em",version:"1.1",xmlns:"http://www.w3.org/2000/svg"}},[i("circle",{attrs:{fill:"#7badad",cx:"1.5em",cy:"1em",r:"0.75em"}})]):t._e(),e.includes(":Item")?i("div",{staticStyle:{display:"inline-block",width:"26px","margin-left":"25px","margin-right":"5px"}},[i("svg",{attrs:{viewBox:"0 0 50 72",version:"1.1",xmlns:"http://www.w3.org/2000/svg"}},[i("rect",{staticStyle:{fill:"#eaeaea","stroke-width":"0.5",stroke:"rgb(0,0,0)"},attrs:{width:"50px",height:"50px"}})])]):t._e(),e.endsWith(":Hub")?i("div",{staticStyle:{height:"15px",display:"inline-block",width:"26px","margin-left":"25px","margin-right":"5px"}},[i("svg",{attrs:{width:"50px",height:"40px",version:"1.1",viewBox:"25 0 100 100",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{fill:"royalblue",d:"m62.113 24.66 1.9023-15.238 18.875 32.691-7.5469 20.004 15.238 1.9023-32.691 18.875-20.004-7.5469-1.9023 15.238-18.875-32.691 7.5469-20.004-15.238-1.9023 32.691-18.875zm-17.684 15.695-4.0781 15.215 15.215 4.0781 4.0781-15.215z","fill-rule":"evenodd"}})])]):t._e()]),i("div",{staticStyle:{"flex-basis":"auto","font-size":"1.25em","font-weight":"bold","text-align":"left"}},[t._v(t._s(e.split(":").slice(-1)[0]))]),i("div",{staticStyle:{flex:"1","text-align":"right","line-height":"1.25em"}},[t._v(t._s(t.activeProfile.rt[e].URI.replace("http://id.loc.gov/","/").replace("https://id.loc.gov/","/")))])]),t._l(t.activeProfile.rt[e].ptOrder,(function(a,o){return i("div",{key:a,attrs:{id:"c
1ontainer-for-"+e.replace(/\(|\)|\s|\/|:|\.|\|/g,"_")+o+a.replace(/\(|\)|\s|\/|:|\.|\|/g,"_")}},[t.settingsHideEmptyFields?[1!=t.activeProfile.rt[e].pt[a].deleted&&!0===t.displayComponentCheck(t.activeProfile.rt[e].pt[a])&&!1===t.activeProfile.rt[e].pt[a].canBeHidden?i("EditMainComponent",{class:"component component-"+t.settingsDisplayMode,attrs:{level:0,isMini:!1,parentURI:t.activeProfile.rt[e].URI,activeTemplate:t.activeProfile.rt[e].pt[a],profileName:e,profileCompoent:a,topLevelComponent:!0,ptGuid:t.activeProfile.rt[e].pt[a]["@guid"],parentStructure:t.activeProfile.rtOrder,structure:t.activeProfile.rt[e].pt[a]},on:{showMiniEditorEdit:t.showMiniEditorClick}}):t._e()]:[1!=t.activeProfile.rt[e].pt[a].deleted&&!0===t.displayComponentCheck(t.activeProfile.rt[e].pt[a])?i("EditMainComponent",{class:"component component-"+t.settingsDisplayMode,attrs:{level:0,isMini:!1,parentURI:t.activeProfile.rt[e].URI,activeTemplate:t.activeProfile.rt[e].pt[a],profileName:e,profileCompoent:a,topLevelComponent:!0,ptGuid:t.activeProfile.rt[e].pt[a]["@guid"],parentStructure:t.activeProfile.rtOrder,structure:t.activeProfile.rt[e].pt[a]},on:{showMiniEditorEdit:t.showMiniEditorClick}}):t._e()]],2)})),t.activeProfile.rt[e].unusedXml?i("div",{staticStyle:{"background-color":"#fde4b7","overflow-x":"hidden"}},[i("h3",[t._v("There was some XML that could not be loaded into this profile ("+t._s(e)+"):")]),i("details",[i("summary",[t._v("View")]),i("code",[i("pre",[t._v(t._s(t.prettifyXml(t.activeProfile.rt[e].unusedXml)))])])])]):t._e()],2):t._e()])})),0):t._e()]),i("aside",{key:t.activeEditCounter,staticClass:"sidebar-right",staticStyle:{"background-color":"white"},attrs:{id:"sidebar-right"}},[t.profilesLoaded?i("div",{ref:"editRightMenuFixed",staticStyle:{height:"100vh","overflow-y":"scroll",position:"fixed",width:"26%"}},t._l(t.activeProfile.rtOrder,(function(e){return i("div",{key:e},[1!=t.activeProfile.rt[e].noData?i("div",{staticClass:"container-type-icon",staticStyle:{color:"#2c3e50"}},[i("div",[e.includes("Work")?i("div",[e.includes("Work")?i("svg",{attrs:{width:"1.5em",height:"1.1em",version:"1.1",xmlns:"http://www.w3.org/2000/svg"}},[i("circle",{attrs:{fill:"#7badad",cx:"0.55em",cy:"0.6em",r:"0.45em"}})]):t._e(),i("span",[t._v("Work")])]):t._e(),e.includes("Instance")?i("div",{staticClass:"temp-icon-instance",staticStyle:{height:"1em",width:"1em",display:"inline-block"}}):t._e(),e.includes("Instance")?i("span",[t._v(t._s(e.split(":").slice(-1)[0]))]):t._e(),e.includes(":Item")?i("div",[e.includes(":Item")?i("div",{staticStyle:{display:"inline-block",height:"28px",width:"26px","margin-right":"5px"}},[i("svg",{attrs:{viewBox:"0 -25 70 72",version:"1.1",xmlns:"http://www.w3.org/2000/svg"}},[i("rect",{staticStyle:{fill:"#eaeaea","stroke-width":"0.5",stroke:"rgb(0,0,0)"},attrs:{width:"40px",height:"40px"}})])]):t._e(),i("span",[t._v("Item")])]):t._e(),e.endsWith(":Hub")?i("div",[i("div",{staticStyle:{display:"flex"}},[i("div",{staticStyle:{flex:"0"}},[i("svg",{staticStyle:{height:"1.25em"},attrs:{version:"1.1",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{fill:"royalblue",d:"m62.113 24.66 1.9023-15.238 18.875 32.691-7.5469 20.004 15.238 1.9023-32.691 18.875-20.004-7.5469-1.9023 15.238-18.875-32.691 7.5469-20.004-15.238-1.9023 32.691-18.875zm-17.684 15.695-4.0781 15.215 15.215 4.0781 4.0781-15.215z","fill-rule":"evenodd"}})])]),t._m(0,!0)])]):t._e()])]):t._e(),1!=t.activeProfile.rt[e].noData?i("div",{staticStyle:{"margin-left":"1%","border-left":"1px solid rgba(44, 62, 80, 0.25)","padding-left":"0.2em"}},t._l(t.activeProfile.rt[e].ptOrder,(function(a){return i("div",{key:a},[t.ignoreRightMenuProperty(t.activeProfile.rt[e].pt[a])?t._e():[Object.keys(t.activeProfile.rt[e].pt[a].userValue).length>0&&0!=t.returnOpacFormat(t.activeProfile.rt[e].pt[a].userValue).length&&1!=t.activeProfile.rt[e].pt[a].deleted?i("div",{class:[{"opac-field-active":t.activeComponent==a&&t.activeProfileName==e}],staticStyle:{"margin-bottom":"1em"}},[i("span",{staticClass:"opac-field-title"},[t._v(t._s(t.activeProfile.rt[e].pt[a].propertyLabel))]),i("div",{staticClass:"opac-field-value"},t._l(t.returnOpacFormat(t.activeProfile.rt[e].pt[a].userValue),(function(e,a){return i("div",{key:a},[e.startsWith("http")?i("EditLabelDereference",{attrs:{URI:e}}):i("span",[t._v(t._s(e))])],1)})),0)]):t._e()]],2)}
1)),0):t._e()])})),0):t._e()]),i("footer",{staticStyle:{display:"none"}},[t._v(" Footer ")]),!0===t.displayMiniEditor?i("div",{staticClass:"modaloverlay modal-display mini-editor",staticStyle:{"z-index":"1000000"}},[i("div",{staticClass:"modal",staticStyle:{"overflow-y":"scroll","overflow-x":"hidden"}},[t.displayMiniEditor?i("div",{staticClass:"modal-content"},[i("EditMini",{key:t.displayMiniEditorKey,ref:"miniEditorHub",attrs:{miniEdiorKey:t.displayMiniEditorKey,miniProfile:"Hub"}}),i("div",{staticStyle:{"text-align":"center",padding:"1em"}},[i("button",{on:{click:t.postAndUseMini}},[t._v("Post & Use this Hub")]),t._v(" "),i("button",{on:{click:t.closeMiniEditor}},[t._v("Cancel")])])],1):t._e()])]):t._e(),t.sendToTempDispaly?i("div",{attrs:{id:"send-to-modal"}},[i("ul",t._l(t.activeProfile.rtOrder,(function(e){return i("li",{key:e,on:{click:function(i){return t.sendToSendIt(e)}}},[t._v(t._s(e))])})),0),i("button",{staticStyle:{position:"absolute",bottom:"5px",right:"5px"},on:{click:function(e){t.sendToTempDispaly=!1}}},[t._v("Close")])]):t._e()],1)},Nt=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticStyle:{flex:"1","text-align":"left"}},[i("span",[t._v("Hub")])])}],Vt=i("8ad1"),jt=i("1bca"),$t=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{},[i("article",[t.profilesLoaded?i("div",t._l(t.activeProfileMini.rtOrder,(function(e){return i("div",{key:e},[1!=t.activeProfileMini.rt[e].noData?i("div",{class:["container-"+e.split(":").slice(-1)[0].split("-")[0]]},[i("div",{staticStyle:{display:"flex"}},[i("div",{staticStyle:{flex:"0"}},[e.includes("Instance")?i("div",{staticClass:"temp-icon-instance",staticStyle:{height:"1.75em",width:"2em","margin-left":"1.5em"}}):t._e(),"Work"==e.split(":").slice(-1)[0]?i("svg",{attrs:{width:"3em",height:"2.5em",version:"1.1",xmlns:"http://www.w3.org/2000/svg"}},[i("circle",{attrs:{fill:"#7badad",cx:"1.5em",cy:"1em",r:"0.75em"}})]):t._e(),e.includes(":Item")?i("div",{staticStyle:{display:"inline-block",width:"26px","margin-left":"25px","margin-right":"5px"}},[i("svg",{attrs:{viewBox:"0 0 50 72",version:"1.1",xmlns:"http://www.w3.org/2000/svg"}},[i("rect",{staticStyle:{fill:"#eaeaea","stroke-width":"0.5",stroke:"rgb(0,0,0)"},attrs:{width:"50px",height:"50px"}})])]):t._e(),e.endsWith(":Hub")?i("div",{staticStyle:{height:"15px",display:"inline-block",width:"26px","margin-left":"25px","margin-right":"5px"}},[i("svg",{attrs:{width:"50px",height:"40px",version:"1.1",viewBox:"25 0 100 100",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{fill:"royalblue",d:"m62.113 24.66 1.9023-15.238 18.875 32.691-7.5469 20.004 15.238 1.9023-32.691 18.875-20.004-7.5469-1.9023 15.238-18.875-32.691 7.5469-20.004-15.238-1.9023 32.691-18.875zm-17.684 15.695-4.0781 15.215 15.215 4.0781 4.0781-15.215z","fill-rule":"evenodd"}})])]):t._e()]),i("div",{staticStyle:{"flex-basis":"auto","font-size":"1.25em","font-weight":"bold","text-align":"left"}},[t._v(t._s(e.split(":").slice(-1)[0]))]),i("div",{staticStyle:{flex:"1","text-align":"right","line-height":"1.25em"}},[t._v(t._s(t.activeProfileMini.rt[e].URI))])]),t._l(t.activeProfileMini.rt[e].ptOrder,(function(a,o){return i("div",{key:a,attrs:{id:"container-for-mini"+e.replace(/\(|\)|\s|\/|:|\.|\|/g,"_")+o+a.replace(/\(|\)|\s|\/|:|\.|\|/g,"_")}},[1!=t.activeProfileMini.rt[e].pt[a].deleted?i("EditMainComponent",{key:t.miniEdiorKey+"c"+o,staticClass:"component",attrs:{isMini:!0,parentURI:t.activeProfileMini.rt[e].URI,activeTemplate:t.activeProfileMini.rt[e].pt[a],profileName:e,profileCompoent:a,topLevelComponent:!0,ptGuid:t.activeProfileMini.rt[e].pt[a]["@guid"],parentStructure:t.activeProfileMini.rtOrder,structure:t.activeProfileMini.rt[e].pt[a]}}):t._e()],1)})),t.activeProfileMini.rt[e].unusedXml?i("div",{staticStyle:{"background-color":"#fde4b7","overflow-x":"hidden"}},[i("h3",[t._v("There was some XML that could not be loaded into this profile ("+t._s(e)+"):")]),i("details",[i("summary",[t._v("View")]),i("code",[i("pre",[t._v(t._s(t.prettifyXml(t.activeProfileMini.rt[e].unusedXml)))])])])]):t._e()],2):t._e()])})),0):t._e()]),i("footer",{staticStyle:{display:"none"}}
1,[t._v(" Footer ")])])},Kt=[],Ft=i("9068"),Bt={name:"EditMini",props:{miniEdiorKey:String},components:{},computed:Object(s["b"])({profilesLoaded:"profilesLoaded",profiles:"profiles",sartingPoint:"sartingPoint",activeInput:"activeInput",activeProfileMini:"activeProfileMini",activeComponent:"activeComponent",activeProfileName:"activeProfileName",activeEditCounter:"activeEditCounter",activeRecordSaved:"activeRecordSaved",catInitials:"catInitials",workingOnMiniProfile:"workingOnMiniProfile"}),destroyed:function(){console.log("MINI destroyed",this.workingOnMiniProfile,document.getElementsByClassName("mini-editor").length)},created:async function(){console.log("MINI created",this.workingOnMiniProfile,document.getElementsByClassName("mini-editor").length),this.$nextTick((function(){Vt["a"].renderBorders()}))},beforeRouteLeave(t,e,i){const a=window.confirm("Do you really want to leave the edit screen?");a?i():i(!1)},updated:function(){this.$nextTick((function(){Vt["a"].renderBorders()}))},data:function(){return{labels:jt["a"],ontologyLookupTodo:[],displayPreview:!1,xmlPreview:"Loading...",showPostModal:!1,showPostModalErrorMsg:!1,resourceLinks:[],headerState:"inital",activeMiniMap:{URI:null},miniMapActionValue:"Actions",lastMouseY:10}},methods:{prettifyXml:Vt["a"].prettifyXml,moveDown:Vt["a"].globalMoveDown,moveUp:Vt["a"].globalMoveUp,movePageDown:Vt["a"].globalMovePageDown,movePageUp:Vt["a"].globalMovePageUp,dupeProperty:Vt["a"].dupeProperty,cleanUpErrorResponse:function(t){return t=JSON.stringify(t,null,2),t=t.replace(/\\n|\\t/g,"").replace(/\\"/g,'"').replace(/&lt;/g,"<").replace(/&gt;/g,">"),t},togglePreview:async function(){if(this.displayPreview)this.displayPreview=!1,this.xmlPreview="Lo
1ading...";else{let t=await Ft["a"].toBFXML(this.activeProfileMini);this.xmlPreview=t.xmlStringFormatted,this.displayPreview=!0}},escapeKey:function(){this.displayPreview&&(this.displayPreview=!1),this.showPostModal&&(this.showPostModal=!1)},publish:async function(){this.showPostModal=!0;let t=await Ft["a"].toBFXML(this.activeProfileMini),e=await w["a"].publish(t.xlmString,this.activeProfileMini.eId,this.activeProfileMini);this.showPostModalErrorMsg=!1;let i=null,a=t.voidTitle,o=t.voidContributor;for(let r in this.activeProfileMini.rt)i=this.activeProfileMini.rt[r].URI;return e.status?(this.activeProfileMini.status="published",this.$store.dispatch("setActiveProfile",{self:this,profile:this.activeProfileMini}).then(async()=>{this.resourceLinks=[],t=await Ft["a"].toBFXML(this.activeProfileMini),w["a"].saveRecord(t.xlmStringBasic,this.activeProfileMini.eId);for(let t in this.activeProfileMini.rt){let e=t.split(":").slice(-1)[0],a=k["a"].convertToRegionUrl(this.activeProfileMini.rt[t].URI);i=this.activeProfileMini.rt[t].URI;let o=k["a"].returnUrls().env;this.resourceLinks.push({type:e,url:a,env:o})}})):this.showPostModalErrorMsg=JSON.parse(e.msg),{useURI:i,useTitle:a,useCreator:o}},isProd:function(){return"dev"!=k["a"].returnUrls().env&&("staging"!=k["a"].returnUrls().env&&("production"==k["a"].returnUrls().env||void 0))},reportError:async function(t){let e=prompt("Please enter descripion of the problem");if(!e)return!1;let i=prompt("Your Email Address (Optional) ");const a=await fetch(k["a"].returnUrls().util+"error/report",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({eId:this.activeProfileMini.eId,desc:e,contact:i,activeProfileMini:this.activeProfileMini})}),o=await a.json();return o.result&&alert("Thanks!"),console.log(o),t.preventDefault(),!1},triggerSave:async function(){let t=await Ft["a"].toBFXML(this.activeProfileMini);w["a"].saveRecord(t.xlmStringBasic,this.activeProfileMini.eId)},restoreDelete:function(t,e,i){this.$store.dispatch("restoreProperty",{self:this,id:i,profile:e}).then(()=>{})},scrollFieldContainerIntoView:function(t,e){if(console.log("-----"),console.log(e),console.log(document.getElementById("container-for-"+e)),document.getElementById("container-for-"+e).scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"}),window.setTimeout(()=>{document.querySelector("#container-for-"+e+" input")&&document.querySelector("#container-for-"+e+" input").focus()},400),t)return t.preventDefault(),!1},sideBarGrabDragInit:function(){const t=this.$refs.editLeftMenuFixed;t.style.cursor="grab";let e={top:0,left:0,x:0,y:0};const i=function(i){t.style.cursor="grabbing",t.style.userSelect="none",e={left:t.scrollLeft,top:t.scrollTop,x:i.clientX,y:i.clientY},document.addEventListener("mousemove",a),document.addEventListener("mouseup",o)},a=function(i){const a=i.clientX-e.x,o=i.clientY-e.y;t.scrollTop=e.top-o,t.scrollLeft=e.left-a},o=function(){t.style.cursor="grab",t.style.removeProperty("user-select"),document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",o)};t.addEventListener("mousedown",i);const r=this.$refs.editRightMenuFixed;r.style.cursor="grab";let s={top:0,left:0,x:0,y:0};const l=function(e){r.style.cursor="grabbing",r.style.userSelect="none",s={left:t.scrollLeft,top:t.scrollTop,x:e.clientX,y:e.clientY},document.addEventListener("mousemove",n),document.addEventListener("mouseup",c)},n=function(t){const e=t.clientX-s.x,i=t.clientY-s.y;r.scrollTop=s.top-i,r.scrollLeft=s.left-e},c=function(){r.style.cursor="grab",r.style.removeProperty("user-select"),document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",c)};r.addEventListener("mousedown",l)},loadProfileOntologyLookupsBuild:function(){Object.keys(this.activeProfile.rt).forEach(t=>{Object.keys(this.activeProfile.rt[t].pt).forEach(e=>{"http://id.loc.gov/ontologies/bibframe/title"==this.activeProfile.rt[t].pt[e].propertyURI&&-1==this.ontologyLookupTodo.indexOf(this.activeProfile.rt[t].pt[e].propertyURI)&&this.ontologyLookupTodo.push(this.activeProfile.rt[t].pt[e].propertyURI)})}),this.loadProfileOntologyLookupsRequest()},loadProfileOntologyLookupsRequest:function(){if(this.ontologyLookupTodo.length>0){let t=this.ontologyLookupTodo.pop();this.$store.dispatch("fetchOntology",{self:this,uri:t}).then(()=>{this.loadProfileOntologyLookupsRequest()})}},returnOpacFormat:function(t){let e=[];try{Object.keys(t).forEach(i=>
1{if(!i.startsWith("@"))for(let a of t[i])Object.keys(a).forEach(t=>{if(!t.startsWith("@"))if("string"==typeof a[t])e.push(a[t]);else if(Array.isArray(a[t]))for(let i of a[t])Object.keys(i).forEach(t=>{t.includes("@")||"string"==typeof i[t]&&e.push(i[t])})})}),0==e.length&&t["@id"]&&e.push(t["@id"]),e=[...new Set(e)]}catch{return"error"}return e},liHasData:function(t){return Object.keys(t.userValue).length>0||!!(t.valueConstraint&&t.valueConstraint.defaults&&t.valueConstraint.defaults.length>0)}}},Ht=Bt,Gt=(i("bfc9"),Object(c["a"])(Ht,$t,Kt,!1,null,null,null)),zt=Gt.exports,Wt=i("d837"),Jt=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("header",{ref:"header",staticClass:"inital"},[i("div",{staticStyle:{display:"flex",height:"50px"}},[i("Keypress",{attrs:{"key-event":"keydown","multiple-keys":[{keyCode:88,modifiers:["ctrlKey","shiftKey"],preventDefault:!0}]},on:{success:t.togglePreview}}),i("Keypress",{attrs:{"key-event":"keydown","multiple-keys":[{keyCode:80,modifiers:["ctrlKey","shiftKey"],preventDefault:!0}]},on:{success:t.publish}}),i("Keypress",{attrs:{"key-event":"keydown","key-code":27},on:{success:t.escapeKey}}),i("div",{attrs:{id:"nav-left"}},[!1!==t.diagramMiniMap?i("div",{staticStyle:{height:"50px"}},[i("router-link",{attrs:{to:"/"}},[i("div",{staticStyle:{display:"inline-block",cursor:"pointer",width:"50px",height:"50px"}},[i("svg",{attrs:{viewBox:"0 0 20 20"}},[i("symbol",{attrs:{id:"s-text"}},[i("text",{staticStyle:{"font-family":"sans-serif"},attrs:{"text-anchor":"middle",x:"50%",y:"50%",dy:".35em"}},[t._v("M")])]),i("use",{staticClass:"logo-home-text",attrs:{"xlink:href":"#s-text"}}),i("use",{staticClass:"logo-home-text",attrs:{"xlink:href":"#s-text"}}),i("use",{staticClass:"logo-home-text",attrs:{"xlink:href":"#s-text"}}),i("use",{staticClass:"logo-home-text",attrs:{"xlink:href":"#s-text"}}),i("use",{staticClass:"logo-home-text",attrs:{"xlink:href":"#s-text"}})])])]),i("div",{staticStyle:{display:"inline-block",cursor:"pointer"}},["Hub"!=t.diagramMiniMap.type?[t.activeMiniMap.URI!=t.diagramMiniMap.URI?i("svg",{attrs:{width:"2.1em",height:"3.1em",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},on:{click:function(e){return t.miniMapClick(t.diagramMiniMap)}}},[i("circle",{attrs:{fill:"#7badad",cx:"1em",cy:"1.5em",r:"0.9em"}})]):i("svg",{attrs:{width:"2.1em",height:"3.1em",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},on:{click:function(e){return t.miniMapClick(t.diagramMiniMap)}}},[i("circle",{attrs:{stroke:"rgb(255 49 49)","stroke-width":"2",fill:"#7badad",cx:"1em",cy:"1.5em",r:"0.9em"}})])]:[i("svg",{attrs:{width:"50px",height:"50px",version:"1.1",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"},on:{click:function(e){return t.miniMapClick(t.diagramMiniMap)}}},[i("path",{attrs:{fill:"royalblue",d:"m62.113 24.66 1.9023-15.238 18.875 32.691-7.5469 20.004 15.238 1.9023-32.691 18.875-20.004-7.5469-1.9023 15.238-18.875-32.691 7.5469-20.004-15.238-1.9023 32.691-18.875zm-17.684 15.695-4.0781 15.215 15.215 4.0781 4.0781-15.215z","fill-rule":"evenodd"}})]),t.diagramMiniMap.work?[i("div",{staticStyle:{display:"inline-block",width:"25px"}},[i("svg",{attrs:{viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"}},[i("line",{attrs:{x1:"0",y1:"0",x2:"100",y2:"0",stroke:"black","stroke-width":"10"}})])]),t.activeMiniMap.URI!=t.diagramMiniMap.work.URI?i("svg",{attrs:{width:"2.1em",height:"3.1em",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},on:{click:function(e){return t.miniMapClick(t.diagramMiniMap.work)}}},[i("circle",{attrs:{fill:"#7badad",cx:"1em",cy:"1.5em",r:"0.9em"}})]):i("svg",{attrs:{width:"2.1em",height:"3.1em",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},on:{click:function(e){return t.miniMapClick(t.diagramMiniMap.work)}}},[i("circle",{attrs:{stroke:"rgb(255 49 49)","stroke-width":"2",fill:"#7badad",cx:"1em",cy:"1.5em",r:"0.9em"}})])]:t._e()]],2),t._l(t.diagramMiniMap.instances,(function(e){return i("div",{key:e.ur
1i,staticStyle:{display:"inline-block",height:"50px",top:"0","line-height":"50px"}},[i("div",{staticStyle:{display:"inline-block",width:"25px"}},[i("svg",{attrs:{viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"}},[i("line",{attrs:{x1:"0",y1:"0",x2:"100",y2:"0",stroke:"black","stroke-width":"10"}})])]),i("div",{staticStyle:{display:"inline-block",cursor:"pointer"},on:{click:function(i){return t.miniMapClick(e)}}},[t.activeMiniMap.URI!=e.URI?i("svg",{staticStyle:{width:"2em",height:"3em"},attrs:{"data-v-6fe723ec":"",version:"1.1",viewBox:"0 0 100 100"}},[i("path",{staticStyle:{fill:"rgb(139, 88, 139)",stroke:"rgb(10, 19, 26)","stroke-width":"0.5","stroke-miterlimit":"10"},attrs:{"data-v-6fe723ec":"",d:"M50,1.4l48.8,48.8L50,99.1L1.2,50.3L50,1.4z"}})]):i("svg",{staticStyle:{width:"2em",height:"3em"},attrs:{"data-v-6fe723ec":"",version:"1.1",viewBox:"0 0 100 100"}},[i("path",{staticStyle:{fill:"rgb(139, 88, 139)",stroke:"rgb(255 49 49)","stroke-width":"5","stroke-miterlimit":"10"},attrs:{"data-v-6fe723ec":"",d:"M50,1.4l48.8,48.8L50,99.1L1.2,50.3L50,1.4z"}}
1)])]),t._l(e.items,(function(e){return i("div",{key:e.uri,staticStyle:{display:"inline-block",height:"50px","line-height":"50px"}},[i("div",{staticStyle:{display:"inline-block",width:"15px"}},[i("svg",{attrs:{viewBox:"0 0 100 160",xmlns:"http://www.w3.org/2000/svg"}},[i("line",{attrs:{x1:"0",y1:"0",x2:"100",y2:"0",stroke:"black","stroke-width":"10"}})])]),i("div",{staticStyle:{display:"inline-block",height:"50px",width:"25px",cursor:"pointer"},on:{click:function(i){return t.miniMapClick(e)}}},[t.activeMiniMap.URI!=e.URI?i("svg",{attrs:{viewBox:"0 0 50 72",version:"1.1",xmlns:"http://www.w3.org/2000/svg"}},[i("rect",{staticStyle:{fill:"#eaeaea","stroke-width":"0.5",stroke:"rgb(0,0,0)"},attrs:{width:"50px",height:"50px"}})]):i("svg",{attrs:{viewBox:"0 0 50 72",version:"1.1",xmlns:"http://www.w3.org/2000/svg"}},[i("rect",{staticStyle:{fill:"#eaeaea","stroke-width":"5",stroke:"rgb(255 49 49)"},attrs:{width:"50px",height:"50px"}})])])])}))],2)})),i("div",{staticStyle:{display:"inline-block",height:"50px",position:"relative","padding-left":"10px"}},["Instance"==t.activeMiniMap.type?i("select",{directives:[{name:"model",rawName:"v-model",value:t.miniMapActionValue,expression:"miniMapActionValue"}],staticStyle:{position:"absolute",top:"15px","font-size":"larger","border-radius":"0.25em",width:"100px"},on:{change:[function(e){var i=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){var e="_value"in t?t._value:t.value;return e}));t.miniMapActionValue=e.target.multiple?i:i[0]},t.miniMapAction]}},[i("option",{attrs:{selected:"",disabled:"",value:"Actions"}},[t._v("Actions")]),i("option",{attrs:{value:"cloneInstance"}},[t._v("Clone and Replace Instance")]),i("option",{attrs:{value:"addItem"}},[t._v("Add Item")]),i("option",{attrs:{value:"deleteInstance"}},[t._v("Delete Instance")])]):"Item"==t.activeMiniMap.type?i("select",{directives:[{name:"model",rawName:"v-model",value:t.miniMapActionValue,expression:"miniMapActionValue"}],staticStyle:{position:"absolute",top:"15px","font-size":"larger","border-radius":"0.25em",width:"100px"},on:{change:[function(e){var i=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){var e="_value"in t?t._value:t.value;return e}));t.miniMapActionValue=e.target.multiple?i:i[0]},t.miniMapAction]}},[i("option",{attrs:{selected:"",disabled:"",value:"Actions"}},[t._v("Actions")]),i("option",{attrs:{value:"deleteItem"}},[t._v("Remove Item")]),i("option",{attrs:{value:"cloneItem"}},[t._v("Duplicate Item")])]):"Hub"==t.diagramMiniMap.type?i("select",{directives:[{name:"model",rawName:"v-model",value:t.miniMapActionValue,expression:"miniMapActionValue"}],staticStyle:{position:"absolute",top:"15px","font-size":"larger","border-radius":"0.25em",width:"100px"},on:{change:[function(e){var i=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){var e="_value"in t?t._value:t.value;return e}));t.miniMapActionValue=e.target.multiple?i:i[0]},t.miniMapAction]}},[i("option",{attrs:{selected:"",disabled:"",value:"Actions"}},[t._v("Actions")])]):i("select",{directives:[{name:"model",rawName:"v-model",value:t.miniMapActionValue,expression:"miniMapActionValue"}],staticStyle:{position:"absolute",top:"15px","font-size":"larger","border-radius":"0.25em",width:"100px"},on:{change:[function(e){var i=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){var e="_value"in t?t._value:t.value;return e}));t.miniMapActionValue=e.target.multiple?i:i[0]},t.miniMapAction]}},[i("option",{attrs:{selected:"",disabled:"",value:"Actions"}},[t._v("Actions")]),i("option",{attrs:{value:"addInstance"}},[t._v("Add Instance")]),i("option",{attrs:{value:"addItem"}},[t._v("Add Item to First Instance")])])])],2):t._e()]),i("div",{attrs:{id:"nav-center"}},[i("button",{staticClass:"subject-list-button",attrs:{name:"subject-list",title:"subject-list"},on:{click:function(e){return t.toggleSubjectListDisplay()}}},[i("svg",{attrs:{width:"25px",height:"25px",version:"1.1",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{d:"m5 83c0-3.6406 2.1914-6.9219 5.5547-8.3164 3.3633-1.3906 7.2344-0.62109 9.8086 1.9531s3.3438 6.4453 1.9531 9.8086c-1.3945 3.3633-4.6758 5.5547-8.3164 5.5547-4.9688 0-9-4.0312-9-9zm9-57c3.6406 0 6.9219-2.1914 8.3164-5.5547 1.3906-3.3633 0.62109-7.2344-1.9531-9.8086s-6.4453-3.3438-9.8086-1.9531c-3.3633 1.3945-5.5547 4.6758-5.5547 8.3164 0 4.9688 4.0312 9 9 9zm0 33c3.6406 0 6.9219-2.1914 8.3164-5.5547 1.3906-3.3633 0.62109-7.2344-1.9531-9.8086s-6.4453-3.3438-9.8086-1.9531c-3.3633 1.3945-5.5547 4.6758-5.5547 8.3164 0 4.9688 4.0312 9 9 9zm30-36h45c3.3125 0 6-2.6875 6-6s-2.6875-6-6-6h-45c-3.3125 0-6 2.6875-6 6s2.6875 6 6 6zm0 33h45c3.3125 0 6-2.6875 6-6s-2.6875-6-6-6h-45c-3.3125 0-6 2.6875-6 6s2.6875 6 6 6zm0 33h45c3.3125 0 6-2.6875 6-6s-2.6875-6-6-6h-45c-3.3125 0-6 2.6875-6 6s2.6875 6 6 6z"}})])]),i("button",{staticClass:"option-button",attrs:{name:"optopns",title:"options"},on:{click:t.toggleOptionDisplay}},[t._v(" Options ")]),t.optionDisplay?i("div",{staticStyle:{border:"1px solid #2c3e50",padding:"1em","border-radius":"0.25em","z-index":"10000",position:"absolute",height:"80vh",top:"100%",width:"450px","background-color":"white"}},[i("div",{staticStyle:{display:"flex",border:"solid 2px whitesmoke"}},[i("div",{staticStyle:{flex:"1","align-self":"center","text-align":"center","margin-right":"5px"}},[t._v(" Display Layout ")]),i("div",{staticStyle:{flex:"1","background-color":"whitesmoke"}},[i("div",[i("input",{attrs:{type:"radio",name:"radio",id:"display-select-default"},domProps:{checked:"default"==t.settingsDisplayMode},on:{change:function(e){return t.updateLayout("default")}}}),i("label",{attrs:{for:"display-select-default"}},[t._v("Extra Space")])]),i("div",[i("input",{attrs:{type:"radio",name:"radio",id:"display-select-compact"},domProps:{checked:"compact"==t.settingsDisplayMode},on:{change:function(e){return t.updateLayout("compact")}}}),i("label",{attrs:{for:"display-select-compact"}},[t._v("Compact")])]),i("div",[i("input",{attrs:{disabled:"",type:"radio",name:"radio",id:"display-select-spreadsheet"},domProps:{checked:"spreadsheet"==t.settingsDisplayMode},on:{change:function(e){return t.updateLayout("spreadsheet")}}}),i("label",{attrs:{for:"display-select-spreadsheet"}},[t._v("Spreadsheet (BETA)")])])])]),i("div",{staticClass:"slider",staticStyle:{display:"flex",border:"solid 2px whitesmoke"}},[i("div",{staticStyle:{flex:"1","align-self":"center","text-align":"center","margin-right":"5px"}},[t._v(" Hide Empty Fields ")]),i("div",{staticStyle:{flex:"1","background-color":"whitesmoke","align-self":"center","text-align":"center"}},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.hideFields,expression:"hideFields"}],attrs:{type:"checkbox",id:"switch"},domProps:{checked:Array.isArray(t.hideFields)?t._i(t.hideFields,null)>-1:t.hideFields},on:{change:[function(e){var i=t.hideFields,a=e.target,o=!!a.checked;if(Array.isArray(i)){var r=null,s=t._i(i,r);a.checked?s<0&&(t.hideFields=i.concat([r])):s>-1&&(t.hideFields=i.slice(0,s).concat(i.slice(s+1)))}else t.hideFields=o},function(e){return t.updateHideEmptyFields()}]}}),i("label",{attrs:{for:"switch"}},[t._v("Toggle")])])]),i("div",{staticClass:"slider",staticStyle:{display:"flex",border:"solid 2px whitesmoke"}},[i("div",{staticStyle:{flex:"1","align-self":"center","text-align":"center","margin-right":"5px"}},[t._v(" Enriched Left Menu ")]),i("div",{staticStyle:{flex:"1","background-color":"whitesmoke","align-self":"center","text-align":"center"}},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.leftMenuEnriched,expression:"leftMenuEnriched"}],attrs:{type:"checkbox",id:"switch2"},domProps:{checked:Array.isArray(t.leftMenuEnriched)?t._i(t.leftMenuEnriched,null)>-1:t.leftMenuEnriched},on:{change:[function(e){var i=t.leftMenuEnriched,a=e.target,o=!!a.checked;if(Array.isArray(i)){var r=null,s=t._i(i,r);a.checked?s<0&&(t.leftMenuEnriched=i.concat([r])):s>-1&&(t.leftMenuEnriched=i.slice(0,s).concat(i.slice(s+1)))}else t.leftMenuEnriched=o},function(e){return t.updateLeftMenuEnriched()}]}}),i("label",{attrs:{for:"switch2"}},[t._v("Toggle")])])])]):t._e(),i("button",{staticClass:"undo-button",attrs:{disabled:0==t.undoIndex,title:"undo"},on:{click:function(e){return t.undoRedo("undo",1)}}}
1,[i("svg",{attrs:{width:"25px",height:"25px",version:"1.1",viewBox:"0 0 105 105",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{d:"m36.605 58.57v-17.141h17.145c9.4531 0 17.145 7.6914 17.145 17.141 0 9.4531-7.6914 17.145-17.145 17.145h-17.145v19.285h17.145c20.086 0 36.43-16.344 36.43-36.43 0-20.086-16.344-36.43-36.43-36.43h-17.145v-17.141l-26.785 26.785z"}})])]),i("button",{staticClass:"log-button",attrs:{title:"log"},on:{click:t.toggleUndoDisplay}},[t._v(" Log ")]),i("button",{staticClass:"redo-button",attrs:{disabled:t.undoIndex==t.undoLog.length-1,title:"redo"},on:{click:function(e){return t.undoRedo("redo",1)}}},[i("svg",{attrs:{width:"25px",height:"25px",version:"1.1",viewBox:"0 0 105 105",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{d:"m90.18 31.785-26.785-26.785v17.141h-17.145c-20.086 0-36.43 16.344-36.43 36.43 0 20.09 16.344 36.43 36.43 36.43h17.145v-19.285h-17.145c-9.4531 0-17.145-7.6914-17.145-17.145 0-9.4531 7.6914-17.141 17.145-17.141h17.145v17.141z"}})])]),t.undoDisplay?i("div",{attrs:{id:"undo-log-container"}},t._l(Array.from(t.undoLog).reverse(),(function(e,a){return i("div",{key:"undo_"+a,staticClass:"undo-log"},[i("div",{class:{"undo-current-index":t.undoLog.length-a-1==t.undoIndex},staticStyle:{display:"flex","align-items":"center","justify-content":"center"}},[i("div",{staticStyle:{flex:"2"}},t._l(e.log,(function(e,o){return i("div",{key:"undolog_"+a+"_"+o},[t._v(t._s(e))])})),0),i("div",{staticClass:"undo-restore-link",staticStyle:{flex:"1","text-align":"center",cursor:"pointer"},on:{click:function(e){return t.undoRedo("goto",t.undoLog.length-a-1)}}},[t._v("Restore")])])])})),0):t._e()]),i("div",{attrs:{id:"nav-right"}},[i("div",{staticStyle:{display:"inline-block","margin-right":"1em"}},[i("div",{staticClass:"simptip-position-left",staticStyle:{display:"flex",height:"20px","max-height":"20px"},attrs:{"data-tooltip":"View the editor manual"}},[i("div",{staticStyle:{flex:"1"}},[i("a",{attrs:{href:"https://guides.loc.gov/c.php?g=1170551&p=8550706&preview=003264c97f504caf990125066b248e24",target:"_blank"}},[i("svg",{attrs:{width:"20px",height:"20px",version:"1.1",viewBox:"5 -10 110 110",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{d:"m45.102 84.898l52.801-30.699-5.6992-3.3008-47.102 27.402-7.8984-4.6016-29.102-16.699v-7.6992l26 15 11 6.3008 52.801-30.699-5.6992-3.3008-47.102 27.398-7.8984-4.6016-29-16.699-0.003906-7.6992 36.801 21.301 52.801-30.699-42.801-24.801-52.898 30.699v42.902l32 18.398 11 6.3008 52.801-30.699-5.6992-3.3008-47.102 27.5-7.9023-4.6016-29-16.699v-7.6992l26 15zm-5.7031-55.598c1.6016-0.80078 3.1016-1.1992 4.3984-1.3984 1.8008-0.19922 4.3008-0.10156 7.6016 0.19922 1.6016 0.19922 3.1992 0.19922 4.6992 0 1.5-0.19922 2.8008-0.69922 4-1.3008 1.1992-0.69922 1.8984-1.5 2-2.3008 0.10156-0.80078-0.5-1.6016-1.6992-2.3008-1-0.60156-2.1016-0.89844-3.3984-0.89844-0.80078 0-1.6016 0.10156-2.3984 0.30078-0.89844 0.30078-2.1016 0.19922-2.8984-0.30078l-4.7031-2.8008c-0.60156-0.39844-0.60156-0.89844 0.10156-1.1992 2.6992-1.3984 5.6016-1.8984 8.8008-1.6992 3.6016 0.30078 7 1.3984 10.301 3.3008 3.5 2 5.3984 4.1992 5.6992 6.3984 0.30078 2.1992-1.1016 4.1992-4.1016 5.8984-1.8008 1.1016-4.1016 1.6992-6.8008 2s-5.3008 0.19922-7.8984-0.30078c-1.6016-0.19922-2.8984-0.19922-3.8984 0.10156-0.69922 0.19922-1.5 0.39844-2.3008 0.80078-0.60156 0.30078-1.6016 0.30078-2.1992-0.10156l-5.1992-3c-0.80469-0.39844-0.80469-1.0977-0.10547-1.3984zm-8.7969 5.0977l2.6992-1.6016c0.89844-0.5 2.3984-0.5 3.3008 0l4.1992 2.3984c0.89844 0.5 0.89844 1.3984 0 1.8984l-2.6992 1.6016c-0.89844 0.5-2.3984 0.5-3.3008 0l-4.1992-2.3984c-0.90234-0.49609-0.90234-1.3984 0-1.8984z"}})])])]),t._m(0)]),t.activeRecordSaved?i("div",{staticClass:"simptip-position-left",attrs:{"data-tooltip":"This record is saved in your My Records page"}},[i("div",{staticStyle:{display:"inline-block",height:"10px","margin-right":"5px",width:"10px","border-radius":"1em","background-color":"green"}}),i("div",{staticStyle:{display:"inline-block"}},[t._v("Saved")])]):i("div",{staticClass:"simptip-position-left",attrs:{"data-tooltip":"The record has not yet saved to your My Records page"}},[i("div",{staticStyle:{display:"inline-block",height:"10px","margin-right":"5px",width:"10px","border-radius":"1em","background-color":"orange"}}),i("div",{staticStyle:{display:"inline-block"}},[t._v("Saving")])])]),i("button",{staticClass:"simptip-position-left toolbar-main-button",attrs:{"data-tooltip":"Create Template ([CTRL+SHIFT+T])"},on:{click:t.toggleTemplate}},[i("svg",{attrs:{width:"50px",height:"34px",version:"1.1",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{d:"m11.719 11.723v15.613h15.629v-15.613zm20.312 0v15.613h15.629v-15.613zm20.309 0v15.613h15.633v-15.613zm20.312 0v15.613h15.633v-15.613zm-60.934 20.312v15.625l15.629 0.003906v-15.629zm20.312 0v15.625l15.629 0.003906v-15.629zm20.309 0v15.625l15.633 0.003906v-15.629zm20.312 0v15.625l15.633 0.003906v-15.629zm-60.934 20.309v15.629l15.629 0.003906v-15.633zm20.312 0v15.629l15.629 0.003906v-15.633zm20.309 0v15.629l15.633 0.003906v-15.633zm20.312 0v15.629l15.633 0.003906v-15.633zm-60.934 20.312v15.625l15.629 0.003906v-15.629zm20.312 0v15.625l15.629 0.003906v-15.629zm20.309 0v15.625l15.633 0.003906v-15.629zm20.312 0v15.625l15.633 0.003906v-15.629z","fill-rule":"evenodd"}})])]),i("button",{staticClass:"simptip-position-left toolbar-main-button",attrs:{"data-tooltip":"Preview XML ([CTRL+SHIFT+X])"},on:{click:t.togglePreview}},[i("svg",{attrs:{width:"50px",height:"34px",version:"1.1",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{d:"m60.199 12.367c2.1836 0.58984 3.4766 2.8281 2.8906 5.0156l-18.273 67.949c-0.48828 1.8281-2.1406 3.0312-3.9492 3.0312-0.35156 0-0.71484-0.042969-1.0664-0.14453-2.1836-0.58984-3.4766-2.8281-2.8906-5.0156l18.273-67.949c0.58984-2.1875 2.8555-3.4844 5.0156-2.8867zm-30.332 17.617c1.5977 1.5977 1.5977 4.1914 0 5.7891l-14.445 14.445 14.461 14.617c1.5938 1.6094 1.5742 4.2031-0.03125 5.793-0.80078 0.78125-1.8359 1.1758-2.8789 1.1758-1.0547 0-2.1055-0.40234-2.9141-1.2109l-17.32-17.508c-0.84375-0.84766-1.2344-1.9766-1.1758-3.0859 0.046875-0.98047 0.44531-1.9453 1.1914-2.6953l17.324-17.32c1.5977-1.5898 4.1914-1.5898 5.7891 0zm45.855-0.027344 17.504 17.324c0.67188 0.66016 1.0625 1.5 1.1797 2.3633 0.16797 1.2266-0.21875 2.5156-1.1602 3.4609l-17.508 17.508c-0.80078 0.78906-1.8516 1.1914-2.8945 1.1914s-2.0977-0.40234-2.8945-1.1914c-1.6016-1.6016-1.6016-4.1953 0-5.793l14.602-14.605-14.586-14.434c-1.6094-1.5898-1.6172-4.1797-0.035156-5.7891 1.582-1.6055 4.1758-1.625 5.793-0.035157z"}})])]),i("button",{staticClass:"simptip-position-left toolbar-main-button",attrs:{id:"toolbar-lang-button","data-tooltip":"Select Language"},on:{click:t.toggleLiteralLanguage}},[i("svg",{attrs:{width:"50px",height:"34px",version:"1.1",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{d:"m93.75 6.25v68.75h-37.5l-25 18.75v-18.75h-25v-68.75zm-21.875 15.625v-6.25h-6.25v6.25h-9.375v6.25h15.488c-0.16016 1.9023-0.46094 3.7891-0.91016 5.
16484-0.66406 2.7422-1.6484 5.3984-2.9062 7.918-0.39453-0.46875-0.77344-0.94922-1.1484-1.4297-1.6836-2.1914-3.1641-4.5312-4.4453-6.9766-0.054687-0.11328-0.11719-0.22656-0.17578-0.33984l-5.5547 2.8594 0.18359 0.35937 0.19531 0.375c2.0625 3.8555 4.5625 7.5117 7.5273 10.734-0.62109 0.84375-1.2734 1.6641-1.957 2.4531-1.3164 1.5234-2.7461 2.9414-4.2773 4.2461-0.66797 0.56641-1.3555 1.1016-2.0586 1.6289-0.41406 0.29688-0.41406 0.29688-0.83203 0.59375-0.42578 0.28906-0.42578 0.28906-0.85547 0.57422l3.4531 5.2109c2.2031-1.4609 4.2812-3.0977 6.1992-4.918 1.7852-1.6953 3.4258-3.5312 4.9141-5.4883 1.5664 1.2422 3.2383 2.3438 5.0234 3.2461 0.96484 0.48438 1.957 0.89453 2.9766 1.2539l2.0703-5.8984c-0.65625-0.23047-1.2969-0.48438-1.9219-0.78516-1.6914-0.8125-3.2578-1.8711-4.7031-3.0703 1.8281-3.2539 3.2461-6.7383 4.1914-10.359 0.66797-2.5742 1.0859-5.1914 1.2773-7.8359h3.2461v-6.25zm-40.625 3.125h-4.1211l-13.395 31.25h6.8008l2.6797-6.25h16.07l2.6797 6.25h6.8008l-13.395-31.25zm-5.3555 18.75h10.711l-5.3555-12.5z","fill-rule":"evenodd"}})])]),i("button",{staticClass:"simptip-position-left toolbar-main-button",attrs:{"data-tooltip":"Post record ([CTRL+SHIFT+P])"},on:{click:t.publish}},[i("svg",{attrs:{width:"50px",height:"34px",version:"1.1",viewBox:"25 20 55 55",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{d:"m19.805 59.453s-1.2109 1.6445 5.0625 4.3242c1.8203 0.77734 4.6055-1.5 7.6328-0.875 2.6367 0.54297 6.7695 2.5664 10.359 2.5664s7.8203-2.5664 11.785-2.5664c6.2227 0 8.7891 3.6406 12.918 3.0938 2.7695-0.36328 5.6055-2.8203 7.3516-3.2188 1.7422-0.40234 3.7227 0.66016 5.1328 0 5.668-2.6602 5.8906-9.9258 5.8906-9.9258zm33.434-20.445c-0.24609-6.0273-4.6172-20.863-4.6172-20.863s10.688 9.1953 16.551 16.535c5.8672 7.3359 10.711 16.473 10.711 16.473l-22.645 1.7656s0.24609-7.793 0-13.91zm-3.8984-8.6523s-2.0781 10.699-5.5547 16.309c-3.4727 5.6133-8.8867 8.7227-8.8867 8.7227l15.836-1.9531zm28.012 35.406c-4.3516 0-7.5117 3.1172-11.363 2.7188-3.1055-0.32031-8.1875-2.6523-11.32-2.7188-3.6523-0.078125-8.5977 2.2812-11.719 2.043-4.9883-0.37891-9.5859-2.043-11.32-2.043-7.3086 0-11.629 5.7656-11.629 5.7656s8.1016-3.0469 11.629-3.0469c4.3828 0 5.5664 2.5508 11.32 3.0469 3.7656 0.32031 7.7109-2.6758 11.719-2.5742 4.793 0.11719 6.8906 2.5078 11.32 3.1758 3.9062 0.58594 7.6289-3.2109 11.363-3.1758 5.7734 0.050781 8.3633 3.5508 8.3633 3.5508s-4.0078-6.7422-8.3633-6.7422z","fill-rule":"evenodd"}})])])])],1),!0===t.displayTemplate?i("div",{staticStyle:{height:"100vh","background-color":"rgb(248 241 255)",position:"fixed",left:"0",width:"100%","z-index":"1000"}},[i("div",{staticStyle:{display:"flex",padding:"1em",height:"100%"}},[i("div",{staticStyle:{flex:"1",position:"relative",height:"100%"}},[i("div",{staticStyle:{"font-weight":"bold"}},[t._v("Create Template")]),i("input",{directives:[{name:"model",rawName:"v-model",value:t.templateLabel,expression:"templateLabel"}],ref:"templateNameInput",staticClass:"input",staticStyle:{"font-size":"1.25em",width:"95%"},attrs:{type:"",name:"",placeholder:"Name of Template"},domProps:{value:t.templateLabel},on:{change:t.templateNameChange,input:function(e){e.target.composing||(t.templateLabel=e.target.value)}}}),i("div",{staticStyle:{"margin-top":"25%"}},[i("button",{staticStyle:{"font-size":"1.5em",margin:"0.25em"},on:{click:function(e){return t.toggleTemplate()}}},[t._v("Cancel")]),i("button",{staticStyle:{"font-size":"1.5em",margin:"0.25em"},on:{click:function(e){return t.saveTemplate(!1)}}},[t._v("Create")])])]),i("div",{staticStyle:{flex:"1"}},[i("div",{staticStyle:{height:"100%","background-color":"transparent",overflow:"scroll"}},[t._m(1),i("table",[t._m(2),i("tbody",[t._l(Object.keys(t.activeProfile.rt),(function(e){return[e.match(/-[0-9]+$/)?t._e():[i("tr",{key:e},[i("td",{attrs:{colspan:"4"}},[e.includes(":Work")?i("span",{staticStyle:{"font-weight":"bold"}},[t._v("Work")]):t._e(),e.includes(":Instance")?i("span",{staticStyle:{"font-weight":"bold"}},[t._v("Instance")]):t._e(),e.includes(":Item")?i("span",{staticStyle:{"font-weight":"bold"}},[t._v("Item")]):t._e(),e.includes(":Hub")?i("span",{staticStyle:{"font-weight":"bold"}},[t._v("Hub")]):t._e()])]),t._l(t.templatesDedupePts(e),(function(a){return i("tr",{key:e+a},[Object.keys(t.activeProfile.rt[e].pt[a].userValue).length>1&&0==t.templatesDataFlowHide.filter((function(t){return a.includes(t)})).length?[i("td",[i("span",{staticStyle:{"padding-left":"10px","font-weight":"bold"}},[t._v(t._s(a.split("|")[1]))]),i("span",{staticStyle:{"font-style":"italic"}},[t._v(" "+t._s(t.namespaceUri(t.activeProfile.rt[e].pt[a].propertyURI))+" ")])]),i("td",{staticClass:"template-td",staticStyle:{"text-align":"center"},on:{click:t.templatesTDClick}},[i("input",{attrs:{type:"radio",name:t.buildPropFlowId(e,a),value:"template"},domProps:{checked:t.templatesPropertyIsChecked(t.buildPropFlowId(e,a),"template")},on:{change:t.templatesPropFlowChange}})]),i("td",{staticClass:"template-td",staticStyle:{"text-align":"center"},on:{click:t.templatesTDClick}},[i("input",{attrs:{type:"radio",name:t.buildPropFlowId(e,a),value:"resource"},domProps:{checked:t.templatesPropertyIsChecked(t.buildPropFlowId(e,a),"resource")},on:{change:t.templatesPropFlowChange}})]),0==t.templatesDataFlowCantBeBoth.filter((function(t){return a.includes(t)})).length?i("td",{staticClass:"template-td",staticStyle:{"text-align":"center"},on:{click:t.templatesTDClick}},[i("input",{attrs:{type:"radio",name:t.buildPropFlowId(e,a),value:"both"},domProps:{checked:t.templatesPropertyIsChecked(t.buildPropFlowId(e,a),"both")},on:{change:t.templatesPropFlowChange}})]):t._e()]:t._e()],2)}))]]}))],2)])])])])]):t._e(),!0===t.displayPreview?i("div",{staticStyle:{height:"100vh","background-color":"#fffff1",position:"fixed",left:"0",width:"100%","z-index":"1000"}},[i("div",{staticStyle:{display:"flex"}},[t._m(3),i("div",{staticStyle:{flex:"1"}},[i("button",{staticStyle:{"font-size":"1.5em",float:"right",margin:"0.25em"},on:{click:t.togglePreview}},[t._v("CLOSE (ESC Key)")])])]),i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.xmlPreview,expression:"xmlPreview"}],staticStyle:{width:"99%","font-size":"1.25em",height:"90vh"},attrs:{spellcheck:"false"},domProps:{value:t.xmlPreview},on:{input:function(e){e.target.composing||(t.xmlPreview=e.target.value)}}})]):t._e(),!0===t.displayLiteralLanguage?i("div",{staticClass:"modaloverlay modal-display select-lanague",staticStyle:{"z-index":"1000000"}},[i("div",{staticClass:"modal",staticStyle:{"overflow-y":"scroll","overflow-x":"hidden"}}
1,[i("EditLiteralLanguage",{ref:"literalLanguageModal"})],1)]):t._e(),!0===t.displayLiteralOptions?i("div",{staticClass:"modaloverlay modal-display select-lanague",staticStyle:{"z-index":"1000000"}},[i("div",{staticClass:"modal",staticStyle:{"overflow-y":"scroll","overflow-x":"hidden"}},[i("EditNavLiteralDisplayOptions",{ref:"literalDisplayOptionsModal"})],1)]):t._e(),t.showPostModal?i("div",{staticStyle:{position:"fixed",width:"100vw",height:"100vh",top:"0",left:"0","background-color":"rgba(0,0,0,0.6)","z-index":"1000"}},[i("div",{staticStyle:{border:"solid 1px #a6acb7","border-radius":"0.5em",margin:"auto",width:"50%","background-color":"white","margin-top":"10%","min-height":"35%",padding:"1em"}},[i("div",{staticStyle:{"font-weight":"bold"}},[t._v("Posting Record...")]),t.showPostModalErrorMsg?i("div",{staticStyle:{"max-height":"500px","overflow-x":"auto","overflow-y":"auto"}},[i("div",{staticStyle:{"font-weight":"bold",color:"red"}},[t._v("We were unable to post the record. Please report this error.")]),i("div",[t._v("Full Response")]),i("pre",[t._v("                  "),i("code",[t._v("\n                    "+t._s(JSON.stringify(t.showPostModalErrorMsg,null,2))+"\n                  ")]),t._v("\n                ")]),t.showPostModalErrorMsg&&t.showPostModalErrorMsg.message&&t.showPostModalErrorMsg.message.message?[i("hr"),i("div",[t._v("Message")]),i("pre",{staticStyle:{"white-space":"normal"}},[t._v("                      "),i("code",{staticStyle:{"white-space":"normal"}},[t._v("\n                        "+t._s(t.cleanUpErrorResponse(t.showPostModalErrorMsg.message.message))+"\n\n                      ")]),t._v("\n                    ")])]:t._e(),t.showPostModalErrorMsg&&t.showPostModalErrorMsg.message&&t.showPostModalErrorMsg.message.error?[i("hr"),i("div",[t._v("Error")]),i("pre",{staticStyle:{"white-space":"normal"}},[t._v("                      "),i("code",{staticStyle:{"white-space":"normal"}},[t._v("\n\n                        "+t._s(t.cleanUpErrorResponse(t.showPostModalErrorMsg.message.error))+"\n                      ")]),t._v("\n                    ")])]:t._e()],2):t._e(),t.resourceLinks.length>0?i("div",{staticStyle:{margin:"0.5em 0 0.5em 0","background-color":"#90ee9052",padding:"0.5em","border-radius":"0.25em"}},[t._v(" The record was accepted by the system. To view the record follow these links: "),t._l(t.resourceLinks,(function(e){return i("div",{key:e.url},[i("a",{attrs:{href:e.url+"?blastdacache="+Date.now(),target:"_blank"}},[t._v("View "+t._s(e.type)+" on "+t._s(e.env))])])}))],2):t._e(),i("button",{staticStyle:{"font-size":"1em"},on:{click:t.escapeKey}},[t._v("Close (ESC Key)")])])]):t._e(),t.subjectListDisplay?i("div",{attrs:{id:"subject-reorder-display"}},[i("div",{staticStyle:{"font-size":"1.25em","font-weight":"bold",padding:"5px","margin-bottom":"1em"}},[t._v("Subject Headings (drag to reorder):")]),i("draggable",t._b({staticClass:"list-group",attrs:{tag:"ul"},on:{start:function(e){t.drag=!0},end:function(e){t.drag=!1,t.subjectDragEnd()}},model:{value:t.list,callback:function(e){t.list=e},expression:"list"}},"draggable",t.dragOptions,!1),[i("transition-group",{attrs:{type:"transition",name:t.drag?null:"flip-list"}},t._l(t.list,(function(e){return i("li",{key:e.guid,staticClass:"list-group-item"},[i("span",{staticStyle:{display:"inline-block"}},[t._v(t._s(e.label)+" "+t._s(e.source?"("+e.source+")":""))]),i("a",{staticClass:"subject-edit-link",staticStyle:{display:"inline-block",float:"right"},on:{click:function(i){return t.editSubjectClick(e.guid)}}},[t._v("Edit")])])})),0)],1),i("div",{staticStyle:{"font-style":"italic","margin-left":"4%","margin-top":"1em"}},[t._v("Subject reordering is for display purposes only, order on posting is not guaranteed.")])],1):t._e()])},qt=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticStyle:{flex:"1"}},[i("a",{staticStyle:{color:"#2c3e50"},attrs:{href:"https://guides.loc.gov/c.php?g=1170551&p=8550706&preview=003264c97f504caf990125066b248e24",target:"_blank"}},[t._v("Manual")])])},function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[t._v(" How should data flow into the template when merging with a resource record?"),i("br"),t._v(" Template = Data from template should overwrite resource"),i("br"),t._v(" Resource = Data from resource should overwrite template data"),i("br"),t._v(" Both = Keep both on import"),i("br")])},function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("thead",[i("tr",[i("td",[t._v("Property")]),i("td",[t._v("Template")]),i("td",[t._v("Resource")]),i("td",[t._v("Both")])])])},function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticStyle:{flex:"1"}},[i("h1",{staticStyle:{"margin-top":"0"}},[t._v("RDF XML Preview")])])}],Xt=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:["literal-lang-select-container",{"literal-lang-select-container-temp":!1}]},[i("details",{staticStyle:{margin:"1em","background-color":"whitesmoke"}},[i("summary",{staticStyle:{cursor:"pointer"}},[t._v("Click to add more language/script options")]),i("div",{staticStyle:{display:"flex",margin:"0.5em"}},[i("div",{staticStyle:{flex:"1"}},[i("div",[t._v("Langauge")]),i("select",{directives:[{name:"model",rawName:"v-model",value:t.languageValue,expression:"languageValue"}],staticStyle:{width:"99%"},attrs:{size:"10"},on:{change:function(e){var i=Array.prototype.filter.call(e.target.options,
1(function(t){return t.selected})).map((function(t){var e="_value"in t?t._value:t.value;return e}));t.languageValue=e.target.multiple?i:i[0]}}},t._l(t.languages,(function(e){return i("option",{key:e.code},[t._v(t._s(e.name))])})),0)]),i("div",{staticStyle:{flex:"1"}},[i("div",[t._v("Script")]),i("select",{directives:[{name:"model",rawName:"v-model",value:t.scriptValue,expression:"scriptValue"}],staticStyle:{width:"99%"},attrs:{size:"10"},on:{change:function(e){var i=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){var e="_value"in t?t._value:t.value;return e}));t.scriptValue=e.target.multiple?i:i[0]}}},t._l(t.scripts,(function(e){return i("option",{key:e.code},[t._v(t._s(e.name))])})),0)])]),i("button",{staticStyle:{float:"right","margin-right":"1em"},on:{click:t.addOption}},[t._v("Add")]),i("div",{staticStyle:{clear:"both"}},[i("span",{staticStyle:{"font-weight":"bold"}},[t._v("Current Options")]),i("ul",t._l(t.availableOptions,(function(e,a){return i("li",{key:a},[t._v("Lang: "+t._s(e.l.name)+", Script: "+t._s(e.s.name)+", Code: @"+t._s(e.l.code.toLowerCase())+"-"),e.s.code?i("span",[t._v(t._s(e.s.code.toLowerCase()))]):i("span",[t._v(t._s(e.s.code2.toLowerCase()))]),t._v(" "),i("button",{staticStyle:{"font-size":"0.75em"},on:{click:function(e){return t.removeLangOption(a)}}},[t._v("Remove")])])})),0)])]),i("div",{staticStyle:{"text-align":"right","padding-right":"10px"}},[i("button",{on:{click:t.closeLitLang}},[t._v("Close")])]),0==Object.keys(t.literals).length?i("div",{staticStyle:{"text-align":"center"}},[i("h3",[t._v("No literals found on this record.")])]):t._e(),t._l(Object.keys(t.literals),(function(e){return i("div",{key:e},[t.literals[e].length>0?i("div",{staticStyle:{"padding-left":"1em"}},[i("span",[t._v(t._s(e.split(":")[e.split(":").length-1]))]),t._l(t.literals[e],(function(e){return i("div",{key:e.guid,staticStyle:{"padding-left":"2em",margin:"0.5em","background-color":"whitesmoke",padding:"1em"}},[i("div",[t._v(t._s(e.ptLabel)+":")]),i("div",{staticStyle:{"padding-left":"1em"},attrs:{id:"literal-lang-"+e.guid}},[i("div",{staticStyle:{"font-size":"1.25em","font-weight":"bold"}},[t._v(t._s(e.value))]),i("div",t._l(Object.keys(t.availableOptionsCodes),(function(a){return i("span",{key:a,class:["lang-option",{selected:e.language===a}],on:{click:function(i){return t.selectLang(e,a)}}},[t._v(" "+t._s(t.availableOptionsCodes[a].l.name)+" / "+t._s(t.availableOptionsCodes[a].s.name)+" ")])})),0)])])}))],2):t._e()])})),i("div",{staticStyle:{"text-align":"center","margin-top":"2em","margin-bottom":"2em"}},[i("button",{on:{click:t.closeLitLang}},[t._v("Close")])])],2)},Yt=[],Qt={name:"EditLiteralLanguage",components:{},data:function(){return{iso639_1:[{code:"ab",name:"Abkhaz"},{code:"aa",name:"Afar"},{code:"af",name:"Afrikaans"},{code:"ak",name:"Akan"},{code:"sq",name:"Albanian"},{code:"am",name:"Amharic"},{code:"ar",name:"Arabic"},{code:"an",name:"Aragonese"},{code:"hy",name:"Armenian"},{code:"as",name:"Assamese"},{code:"av",name:"Avaric"},{code:"ae",name:"Avestan"},{code:"ay",name:"Aymara"},{code:"az",name:"Azerbaijani"},{code:"bm",name:"Bambara"},{code:"ba",name:"Bashkir"},{code:"eu",name:"Basque"},{code:"be",name:"Belarusian"},{code:"bn",name:"Bengali; Bangla"},{code:"bh",name:"Bihari"},{code:"bi",name:"Bislama"},{code:"bs",name:"Bosnian"},{code:"br",name:"Breton"},{code:"bg",name:"Bulgarian"},{code:"my",name:"Burmese"},{code:"ca",name:"Catalan; Valencian"},{code:"ch",name:"Chamorro"},{code:"ce",name:"Chechen"},{code:"ny",name:"Chichewa; Chewa; Nyanja"},{code:"zh",name:"Chinese"},{code:"cv",name:"Chuvash"},{code:"kw",name:"Cornish"},{code:"co",name:"Corsican"},{code:"cr",name:"Cree"},{code:"hr",name:"Croatian"},{code:"cs",name:"Czech"},{code:"da",name:"Danish"},{code:"dv",name:"Divehi; Dhivehi; Maldivian;"},{code:"nl",name:"Dutch"},{code:"dz",name:"Dzongkha"},{code:"en",name:"English"},{code:"eo",name:"Esperanto"},{code:"et",name:"Estonian"},{code:"ee",name:"Ewe"},{code:"fo",name:"Faroese"},{code:"fj",name:"Fijian"},{code:"fi",name:"Finnish"},{code:"fr",name:"French"},{code:"ff",name:"Fula; Fulah; Pulaar; Pular"},{code:"gl",name:"Galician"},{code:"ka",name:"Georgian"},{code:"de",name:"German"},{code:"el",name:"Greek, Modern"},{code:"gn",name:"Guaraní"},{code:"gu",name:"Gujarati"},{code:"ht",name:"Haitian; Haitian Creole"},{code:"ha",name:"Hausa"},{code:"he",name:"Hebrew (modern)"},{code:"hz",name:"Herero"},{code:"hi",name:"Hindi"},{code:"ho",name:"Hiri Motu"},{code:"hu",name:"Hungarian"},{code:"ia",name:"Interlingua"},{code:"id",name:"Indonesian"},{code:"ie",name:"Interlingue"},{code:"ga",name:"Irish"},{code:"ig",name:"Igbo"},{code:"ik",name:"Inupiaq"},{code:"io",name:"Ido"},{code:"is",name:"Icelandic"},{code:"it",name:"Italian"},{code:"iu",name:"Inuktitut"},{code:"ja",name:"Japanese"},{code:"jv",name:"Javanese"},{code:"kl",name:"Kalaallisut, Greenlandic"},{code:"kn",name:"Kannada"},{code:"kr",name:"Kanuri"},{code:"ks",name:"Kashmiri"},{code:"kk",name:"Kazakh"},{code:"km",name:"Khmer"},{code:"ki",name:"Kikuyu, Gikuyu"},{code:"rw",name:"Kinyarwanda"},{code:"ky",name:"Kyrgyz"},{code:"kv",name:"Komi"},{code:"kg",name:"Kongo"},{code:"ko",name:"Korean"},{code:"ku",name:"Kurdish"},{code:"kj",name:"Kwanyama, Kuanyama"},{code:"la",name:"Latin"},{code:"lb",name:"Luxembourgish, Letzeburgesch"},{code:"lg",name:"Ganda"},{code:"li",name:"Limburgish, Limburgan, Limburger"},{code:"ln",name:"Lingala"},{code:"lo",name:"Lao"},{code:"lt",name:"Lithuanian"},{code:"lu",name:"Luba-Katanga"},{code:"lv",name:"Latvian"},{code:"gv",name:"Manx"},{code:"mk",name:"Macedonian"},{code:"mg",name:"Malagasy"},{code:"ms",name:"Malay"},{code:"ml",name:"Malayalam"},{code:"mt",name:"Maltese"},{code:"mi",name:"MÄori"},{code:"mr",name:"Marathi (MarÄá¹­hÄ«)"},{code:"mh",name:"Marshallese"},{code:"mn",name:"Mongolian"},{code:"na",name:"Nauru"},{code:"nv",name:"Navajo, Navaho"},{code:"nb",name:"Norwegian BokmÃ¥l"},{code:"nd",name:"North Ndebele"},{code:"ne",name:"Nepali"},{code:"ng",name:"Ndonga"},{code:"nn",name:"Norwegian Nynorsk"},{code:"no",name:"Norwegian"},{code:"ii",name:"Nuosu"},{code:"nr",name:"South Ndebele"},{code:"oc",name:"Occitan"},{code:"oj",name:"Ojibwe, Ojibwa"},{code:"cu",name:"Old Church Slavonic, Church Slavic, Church Slavonic, Old Bulgarian, Old Slavonic"},{code:"om",name:"Oromo"},{code:"or",name:"Oriya"},{code:"os",name:"Ossetian, Ossetic"},{code:"pa",name:"Panjabi, Punjabi"},{code:"pi",name:"PÄli"},{code:"fa",name:"Persian (Farsi)"},{code:"pl",name:"Polish"},{code:"ps",name:"Pashto, Pushto"},{code:"pt",name:"Portuguese"},{code:"qu",name:"Quechua"},{code:"rm",name:"Romansh"},{code:"rn",name:"Kirundi"},{code:"ro",name:"Romanian, [])"},{code:"ru",name:"Russian"},{code:"sa",name:"Sanskrit (Saá¹ská¹›ta)"},{code:"sc",name:"Sardinian"},{code:"sd",name:"Sindhi"},{code:"se",name:"Northern Sami"},{code:"sm",name:"Samoan"},{code:"sg",name:"Sango"},{code:"sr",name:"Serbian"},{code:"gd",name:"Scottish Gaelic; Gaelic"},{code:"sn",name:"Shona"}
1,{code:"si",name:"Sinhala, Sinhalese"},{code:"sk",name:"Slovak"},{code:"sl",name:"Slovene"},{code:"so",name:"Somali"},{code:"st",name:"Southern Sotho"},{code:"es",name:"Spanish; Castilian"},{code:"su",name:"Sundanese"},{code:"sw",name:"Swahili"},{code:"ss",name:"Swati"},{code:"sv",name:"Swedish"},{code:"ta",name:"Tamil"},{code:"te",name:"Telugu"},{code:"tg",name:"Tajik"},{code:"th",name:"Thai"},{code:"ti",name:"Tigrinya"},{code:"bo",name:"Tibetan Standard, Tibetan, Central"},{code:"tk",name:"Turkmen"},{code:"tl",name:"Tagalog"},{code:"tn",name:"Tswana"},{code:"to",name:"Tonga (Tonga Islands)"},{code:"tr",name:"Turkish"},{code:"ts",name:"Tsonga"},{code:"tt",name:"Tatar"},{code:"tw",name:"Twi"},{code:"ty",name:"Tahitian"},{code:"ug",name:"Uyghur, Uighur"},{code:"uk",name:"Ukrainian"},{code:"ur",name:"Urdu"},{code:"uz",name:"Uzbek"},{code:"ve",name:"Venda"},{code:"vi",name:"Vietnamese"},{code:"vo",name:"Volapük"},{code:"wa",name:"Walloon"},{code:"cy",name:"Welsh"},{code:"wo",name:"Wolof"},{code:"fy",name:"Western Frisian"},{code:"xh",name:"Xhosa"},{code:"yi",name:"Yiddish"},{code:"yo",name:"Yoruba"},{code:"za",name:"Zhuang, Chuang"},{code:"zu",name:"Zulu"}],iso639_2:[{alpha_2:"aa",alpha_3:"aar",name:"Afar"},{alpha_2:"ab",alpha_3:"abk",name:"Abkhazian"},{alpha_3:"ace",name:"Achinese"},{alpha_3:"ach",name:"Acoli"},{alpha_3:"ada",name:"Adangme"},{alpha_3:"ady",name:"Adyghe; Adygei"},{alpha_3:"afa",name:"Afro-Asiatic languages"},{alpha_3:"afh",name:"Afrihili"},{alpha_2:"af",alpha_3:"afr",name:"Afrikaans"},{alpha_3:"ain",name:"Ainu"},{alpha_2:"ak",alpha_3:"aka",name:"Akan"},{alpha_3:"akk",name:"Akkadian"},{alpha_3:"ale",name:"Aleut"},{alpha_3:"alg",name:"Algonquian languages"},{alpha_3:"alt",name:"Southern Altai"},{alpha_2:"am",alpha_3:"amh",name:"Amharic"},{alpha_3:"ang",name:"English, Old (ca. 450-1100)"},{alpha_3:"anp",name:"Angika"},{alpha_3:"apa",name:"Apache languages"},{alpha_2:"ar",alpha_3:"ara",name:"Arabic"},{alpha_3:"arc",name:"Official Aramaic (700-300 BCE); Imperial Aramaic (700-300 BCE)"},{alpha_2:"an",alpha_3:"arg",name:"Aragonese"},{alpha_3:"arn",name:"Mapudungun; Mapuche"},{alpha_3:"arp",name:"Arapaho"},{alpha_3:"art",name:"Artificial languages"},{alpha_3:"arw",name:"Arawak"},{alpha_2:"as",alpha_3:"asm",name:"Assamese"},{alpha_3:"ast",name:"Asturian; Bable; Leonese; Asturleonese"},{alpha_3:"ath",name:"Athapascan languages"},{alpha_3:"aus",name:"Australian languages"},{alpha_2:"av",alpha_3:"ava",name:"Avaric"},{alpha_2:"ae",alpha_3:"ave",name:"Avestan"},{alpha_3:"awa",name:"Awadhi"},{alpha_2:"ay",alpha_3:"aym",name:"Aymara"},{alpha_2:"az",alpha_3:"aze",name:"Azerbaijani"},{alpha_3:"bad",name:"Banda languages"},{alpha_3:"bai",name:"Bamileke languages"},{alpha_2:"ba",alpha_3:"bak",name:"Bashkir"},{alpha_3:"bal",name:"Baluchi"},{alpha_2:"bm",alpha_3:"bam",name:"Bambara"},{alpha_3:"ban",name:"Balinese"},{alpha_3:"bas",name:"Basa"},{alpha_3:"bat",name:"Baltic languages"},{alpha_3:"bej",name:"Beja; Bedawiyet"},{alpha_2:"be",alpha_3:"bel",name:"Belarusian"},{alpha_3:"bem",name:"Bemba"},{alpha_2:"bn",alpha_3:"ben",common_name:"Bangla",name:"Bengali"},{alpha_3:"ber",name:"Berber languages"},{alpha_3:"bho",name:"Bhojpuri"},{alpha_2:"bh",alpha_3:"bih",name:"Bihari languages"},{alpha_3:"bik",name:"Bikol"},{alpha_3:"bin",name:"Bini; Edo"},{alpha_2:"bi",alpha_3:"bis",name:"Bislama"},{alpha_3:"bla",name:"Siksika"},{alpha_3:"bnt",name:"Bantu (Other)"},{alpha_2:"bo",alpha_3:"bod",bibliographic:"tib",name:"Tibetan"},{alpha_2:"bs",alpha_3:"bos",name:"Bosnian"},{alpha_3:"bra",name:"Braj"},{alpha_2:"br",alpha_3:"bre",name:"Breton"},{alpha_3:"btk",name:"Batak languages"},{alpha_3:"bua",name:"Buriat"},{alpha_3:"bug",name:"Buginese"},{alpha_2:"bg",alpha_3:"bul",name:"Bulgarian"},{alpha_3:"byn",name:"Blin; Bilin"},{alpha_3:"cad",name:"Caddo"},{alpha_3:"cai",name:"Central American Indian languages"},{alpha_3:"car",name:"Galibi Carib"},{alpha_2:"ca",alpha_3:"cat",name:"Catalan; Valencian"},{alpha_3:"cau",name:"Caucasian languages"},{alpha_3:"ceb",name:"Cebuano"},{alpha_3:"cel",name:"Celtic languages"},{alpha_2:"cs",alpha_3:"ces",bibliographic:"cze",name:"Czech"},{alpha_2:"ch",alpha_3:"cha",name:"Chamorro"},{alpha_3:"chb",name:"Chibcha"},{alpha_2:"ce",alpha_3:"che",name:"Chechen"},{alpha_3:"chg",name:"Chagatai"},{alpha_3:"chk",name:"Chuukese"},{alpha_3:"chm",name:"Mari"},{alpha_3:"chn",name:"Chinook jargon"},{alpha_3:"cho",name:"Choctaw"},{alpha_3:"chp",name:"Chipewyan; Dene Suline"},{alpha_3:"chr",name:"Cherokee"},{alpha_2:"cu",alpha_3:"chu",name:"Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic"},{alpha_2:"cv",alpha_3:"chv",name:"Chuvash"},{alpha_3:"chy",name:"Cheyenne"},{alpha_3:"cmc",name:"Chamic languages"},{alpha_3:"cop",name:"Coptic"},{alpha_2:"kw",alpha_3:"cor",name:"Cornish"},{alpha_2:"co",alpha_3:"cos",name:"Corsican"},{alpha_3:"cpe",name:"Creoles and pidgins, English based"},{alpha_3:"cpf",name:"Creoles and pidgins, French-based"},{alpha_3:"cpp",name:"Creoles and pidgins, Portuguese-based"},{alpha_2:"cr",alpha_3:"cre",name:"Cree"},{alpha_3:"crh",name:"Crimean Tatar; Crimean Turkish"},{alpha_3:"crp",name:"Creoles and pidgins"},{alpha_3:"csb",name:"Kashubian"},{alpha_3:"cus",name:"Cushitic languages"},{alpha_2:"cy",alpha_3:"cym",bibliographic:"wel",name:"Welsh"},{alpha_3:"dak",name:"Dakota"},{alpha_2:"da",alpha_3:"dan",name:"Danish"},{alpha_3:"dar",name:"Dargwa"},{alpha_3:"day",name:"Land Dayak languages"},{alpha_3:"del",name:"Delaware"},{alpha_3:"den",name:"Slave (Athapascan)"},{alpha_2:"de",alpha_3:"deu",bibliographic:"ger",name:"German"},{alpha_3:"dgr",name:"Dogrib"},{alpha_3:"din",name:"Dinka"},{alpha_2:"dv",alpha_3:"div",name:"Divehi; Dhivehi; Maldivian"},{alpha_3:"doi",name:"Dogri"},{alpha_3:"dra",name:"Dravidian languages"},{alpha_3:"dsb",name:"Lower Sorbian"},{alpha_3:"dua",name:"Duala"},{alpha_3:"dum",name:"Dutch, Middle (ca. 1050-1350)"},{alpha_3:"dyu",name:"Dyula"},{alpha_2:"dz",alpha_3:"dzo",name:"Dzongkha"},{alpha_3:"efi",name:"Efik"},{alpha_3:"egy",name:"Egyptian (Ancient)"},{alpha_3:"eka",name:"Ekajuk"},{alpha_2:"el",alpha_3:"ell",bibliographic:"gre",name:"Greek, Modern (1453-)"},{alpha_3:"elx",name:"Elamite"},{alpha_2:"en",alpha_3:"eng",name:"English"},{alpha_3:"enm",name:"English, Middle (1100-1500)"},{alpha_2:"eo",alpha_3:"epo",name:"Esperanto"},{alpha_2:"et",alpha_3:"est",name:"Estonian"},{alpha_2:"eu",alpha_3:"eus",bibliographic:"baq",name:"Basque"},{alpha_2:"ee",alpha_3:"ewe",name:"Ewe"},{alpha_3:"ewo",name:"Ewondo"},{alpha_3:"fan",name:"Fang"},{alpha_2:"fo",alpha_3:"fao",name:"Faroese"},{alpha_2:"fa",alpha_3:"fas",bibliographic:"per",name:"Persian"},{alpha_3:"fat",name:"Fanti"},{alpha_2:"fj",alpha_3:"fij",name:"Fijian"},{alpha_3:"fil",name:"Filipino; Pilipino"},{alpha_2:"fi",alpha_3:"fin",name:"Finnish"},{alpha_3:"fiu",name:"Finno-Ugrian languages"},{alpha_3:"fon",name:"Fon"},{alpha_2:"fr",alpha_3:"fra",bibliographic:"fre",name:"French"},{alpha_3:"frm",name:"French, Middle (ca. 1400-1600)"},{alpha_3:"fro",name:"French, Old (842-ca. 1400)"},{alpha_3:"frr",name:"Northern Frisian"},{alpha_3:"frs",name:"Eastern Frisian"},{alpha_2:"fy",alpha_3:"fry",name:"Western Frisian"},{alpha_2:"ff",alpha_3:"ful",name:"Fulah"},{alpha_3:"fur",name:"Friulian"},{alpha_3:"gaa",name:"Ga"},{alpha_3:"gay",name:"Gayo"},{alpha_3:"gba",name:"Gbaya"},{alpha_3:"gem",name:"Germanic languages"},{alpha_3:"gez",name:"Geez"},{alpha_3:"gil",name:"Gilbertese"},{alpha_2:"gd",alpha_3:"gla",name:"Gaelic; Scottish Gaelic"},{alpha_2:"ga",alpha_3:"gle",name:"Irish"},{alpha_2:"gl",alpha_3:"glg",name:"Galician"},{alpha_2:"gv",alpha_3:"glv",name:"Manx"},{alpha_3:"gmh",name:"German, Middle High (ca. 1050-1500)"},{alpha_3:"goh",name:"German, Old High (ca. 750-1050)"},{alpha_3:"gon",name:"Gondi"},{alpha_3:"gor",name:"Gorontalo"},{alpha_3:"got",name:"Gothic"},{alpha_3:"grb",name:"Grebo"},{alpha_3:"grc",name:"Greek, Ancient (to 1453)"},{alpha_2:"gn",alpha_3:"grn",name:"Guarani"},{alpha_3:"gsw",name:"Swiss German; Alemannic; Alsatian"},{alpha_2:"gu",alpha_3:"guj",name:"Gujarati"},{alpha_3:"gwi",name:"Gwich'in"},{alpha_3:"hai",name:"Haida"},{alpha_2:"ht",alpha_3:"hat",name:"Haitian; Haitian Creole"},{alpha_2:"ha",alpha_3:"hau",name:"Hausa"},{alpha_3:"haw",name:"Hawaiian"},{alpha_2:"he",alpha_3:"heb",name:"Hebrew"},{alpha_2:"hz",alpha_3:"her",name:"Herero"}
1,{alpha_3:"hil",name:"Hiligaynon"},{alpha_3:"him",name:"Himachali languages; Western Pahari languages"},{alpha_2:"hi",alpha_3:"hin",name:"Hindi"},{alpha_3:"hit",name:"Hittite"},{alpha_3:"hmn",name:"Hmong; Mong"},{alpha_2:"ho",alpha_3:"hmo",name:"Hiri Motu"},{alpha_2:"hr",alpha_3:"hrv",name:"Croatian"},{alpha_3:"hsb",name:"Upper Sorbian"},{alpha_2:"hu",alpha_3:"hun",name:"Hungarian"},{alpha_3:"hup",name:"Hupa"},{alpha_2:"hy",alpha_3:"hye",bibliographic:"arm",name:"Armenian"},{alpha_3:"iba",name:"Iban"},{alpha_2:"ig",alpha_3:"ibo",name:"Igbo"},{alpha_2:"io",alpha_3:"ido",name:"Ido"},{alpha_2:"ii",alpha_3:"iii",name:"Sichuan Yi; Nuosu"},{alpha_3:"ijo",name:"Ijo languages"},{alpha_2:"iu",alpha_3:"iku",name:"Inuktitut"},{alpha_2:"ie",alpha_3:"ile",name:"Interlingue; Occidental"},{alpha_3:"ilo",name:"Iloko"},{alpha_2:"ia",alpha_3:"ina",name:"Interlingua (International Auxiliary Language Association)"},{alpha_3:"inc",name:"Indic languages"},{alpha_2:"id",alpha_3:"ind",name:"Indonesian"},{alpha_3:"ine",name:"Indo-European languages"},{alpha_3:"inh",name:"Ingush"},{alpha_2:"ik",alpha_3:"ipk",name:"Inupiaq"},{alpha_3:"ira",name:"Iranian languages"},{alpha_3:"iro",name:"Iroquoian languages"},{alpha_2:"is",alpha_3:"isl",bibliographic:"ice",name:"Icelandic"},{alpha_2:"it",alpha_3:"ita",name:"Italian"},{alpha_2:"jv",alpha_3:"jav",name:"Javanese"},{alpha_3:"jbo",name:"Lojban"},{alpha_2:"ja",alpha_3:"jpn",name:"Japanese"},{alpha_3:"jpr",name:"Judeo-Persian"},{alpha_3:"jrb",name:"Judeo-Arabic"},{alpha_3:"kaa",name:"Kara-Kalpak"},{alpha_3:"kab",name:"Kabyle"},{alpha_3:"kac",name:"Kachin; Jingpho"},{alpha_2:"kl",alpha_3:"kal",name:"Kalaallisut; Greenlandic"},{alpha_3:"kam",name:"Kamba"},{alpha_2:"kn",alpha_3:"kan",name:"Kannada"},{alpha_3:"kar",name:"Karen languages"},{alpha_2:"ks",alpha_3:"kas",name:"Kashmiri"},{alpha_2:"ka",alpha_3:"kat",bibliographic:"geo",name:"Georgian"},{alpha_2:"kr",alpha_3:"kau",name:"Kanuri"},{alpha_3:"kaw",name:"Kawi"},{alpha_2:"kk",alpha_3:"kaz",name:"Kazakh"},{alpha_3:"kbd",name:"Kabardian"},{alpha_3:"kha",name:"Khasi"},{alpha_3:"khi",name:"Khoisan languages"},{alpha_2:"km",alpha_3:"khm",name:"Central Khmer"},{alpha_3:"kho",name:"Khotanese; Sakan"},{alpha_2:"ki",alpha_3:"kik",name:"Kikuyu; Gikuyu"},{alpha_2:"rw",alpha_3:"kin",name:"Kinyarwanda"},{alpha_2:"ky",alpha_3:"kir",name:"Kirghiz; Kyrgyz"},{alpha_3:"kmb",name:"Kimbundu"},{alpha_3:"kok",name:"Konkani"},{alpha_2:"kv",alpha_3:"kom",name:"Komi"},{alpha_2:"kg",alpha_3:"kon",name:"Kongo"},{alpha_2:"ko",alpha_3:"kor",name:"Korean"},{alpha_3:"kos",name:"Kosraean"},{alpha_3:"kpe",name:"Kpelle"},{alpha_3:"krc",name:"Karachay-Balkar"},{alpha_3:"krl",name:"Karelian"},{alpha_3:"kro",name:"Kru languages"},{alpha_3:"kru",name:"Kurukh"},{alpha_2:"kj",alpha_3:"kua",name:"Kuanyama; Kwanyama"},{alpha_3:"kum",name:"Kumyk"},{alpha_2:"ku",alpha_3:"kur",name:"Kurdish"},{alpha_3:"kut",name:"Kutenai"},{alpha_3:"lad",name:"Ladino"},{alpha_3:"lah",name:"Lahnda"},{alpha_3:"lam",name:"Lamba"},{alpha_2:"lo",alpha_3:"lao",name:"Lao"},{alpha_2:"la",alpha_3:"lat",name:"Latin"},{alpha_2:"lv",alpha_3:"lav",name:"Latvian"},{alpha_3:"lez",name:"Lezghian"},{alpha_2:"li",alpha_3:"lim",name:"Limburgan; Limburger; Limburgish"},{alpha_2:"ln",alpha_3:"lin",name:"Lingala"},{alpha_2:"lt",alpha_3:"lit",name:"Lithuanian"},{alpha_3:"lol",name:"Mongo"},{alpha_3:"loz",name:"Lozi"},{alpha_2:"lb",alpha_3:"ltz",name:"Luxembourgish; Letzeburgesch"},{alpha_3:"lua",name:"Luba-Lulua"},{alpha_2:"lu",alpha_3:"lub",name:"Luba-Katanga"},{alpha_2:"lg",alpha_3:"lug",name:"Ganda"},{alpha_3:"lui",name:"Luiseno"},{alpha_3:"lun",name:"Lunda"},{alpha_3:"luo",name:"Luo (Kenya and Tanzania)"},{alpha_3:"lus",name:"Lushai"},{alpha_3:"mad",name:"Madurese"},{alpha_3:"mag",name:"Magahi"},{alpha_2:"mh",alpha_3:"mah",name:"Marshallese"},{alpha_3:"mai",name:"Maithili"},{alpha_3:"mak",name:"Makasar"},{alpha_2:"ml",alpha_3:"mal",name:"Malayalam"},{alpha_3:"man",name:"Mandingo"},{alpha_3:"map",name:"Austronesian languages"},{alpha_2:"mr",alpha_3:"mar",name:"Marathi"},{alpha_3:"mas",name:"Masai"},{alpha_3:"mdf",name:"Moksha"},{alpha_3:"mdr",name:"Mandar"},{alpha_3:"men",name:"Mende"},{alpha_3:"mga",name:"Irish, Middle (900-1200)"},{alpha_3:"mic",name:"Mi'kmaq; Micmac"},{alpha_3:"min",name:"Minangkabau"}
1,{alpha_3:"mis",name:"Uncoded languages"},{alpha_2:"mk",alpha_3:"mkd",bibliographic:"mac",name:"Macedonian"},{alpha_3:"mkh",name:"Mon-Khmer languages"},{alpha_2:"mg",alpha_3:"mlg",name:"Malagasy"},{alpha_2:"mt",alpha_3:"mlt",name:"Maltese"},{alpha_3:"mnc",name:"Manchu"},{alpha_3:"mni",name:"Manipuri"},{alpha_3:"mno",name:"Manobo languages"},{alpha_3:"moh",name:"Mohawk"},{alpha_2:"mn",alpha_3:"mon",name:"Mongolian"},{alpha_3:"mos",name:"Mossi"},{alpha_2:"mi",alpha_3:"mri",bibliographic:"mao",name:"Maori"},{alpha_2:"ms",alpha_3:"msa",bibliographic:"may",name:"Malay"},{alpha_3:"mul",name:"Multiple languages"},{alpha_3:"mun",name:"Munda languages"},{alpha_3:"mus",name:"Creek"},{alpha_3:"mwl",name:"Mirandese"},{alpha_3:"mwr",name:"Marwari"},{alpha_2:"my",alpha_3:"mya",bibliographic:"bur",name:"Burmese"},{alpha_3:"myn",name:"Mayan languages"},{alpha_3:"myv",name:"Erzya"},{alpha_3:"nah",name:"Nahuatl languages"},{alpha_3:"nai",name:"North American Indian languages"},{alpha_3:"nap",name:"Neapolitan"},{alpha_2:"na",alpha_3:"nau",name:"Nauru"},{alpha_2:"nv",alpha_3:"nav",name:"Navajo; Navaho"},{alpha_2:"nr",alpha_3:"nbl",name:"Ndebele, South; South Ndebele"},{alpha_2:"nd",alpha_3:"nde",name:"Ndebele, North; North Ndebele"},{alpha_2:"ng",alpha_3:"ndo",name:"Ndonga"},{alpha_3:"nds",name:"Low German; Low Saxon; German, Low; Saxon, Low"},{alpha_2:"ne",alpha_3:"nep",name:"Nepali"},{alpha_3:"new",name:"Nepal Bhasa; Newari"},{alpha_3:"nia",name:"Nias"},{alpha_3:"nic",name:"Niger-Kordofanian languages"},{alpha_3:"niu",name:"Niuean"},{alpha_2:"nl",alpha_3:"nld",bibliographic:"dut",name:"Dutch; Flemish"},{alpha_2:"nn",alpha_3:"nno",name:"Norwegian Nynorsk; Nynorsk, Norwegian"},{alpha_2:"nb",alpha_3:"nob",name:"Bokmål, Norwegian; Norwegian Bokmål"},{alpha_3:"nog",name:"Nogai"},{alpha_3:"non",name:"Norse, Old"},{alpha_2:"no",alpha_3:"nor",name:"Norwegian"},{alpha_3:"nqo",name:"N'Ko"},{alpha_3:"nso",name:"Pedi; Sepedi; Northern Sotho"},{alpha_3:"nub",name:"Nubian languages"},{alpha_3:"nwc",name:"Classical Newari; Old Newari; Classical Nepal Bhasa"},{alpha_2:"ny",alpha_3:"nya",name:"Chichewa; Chewa; Nyanja"},{alpha_3:"nym",name:"Nyamwezi"},{alpha_3:"nyn",name:"Nyankole"},{alpha_3:"nyo",name:"Nyoro"},{alpha_3:"nzi",name:"Nzima"},{alpha_2:"oc",alpha_3:"oci",name:"Occitan (post 1500); Provençal"},{alpha_2:"oj",alpha_3:"oji",name:"Ojibwa"},{alpha_2:"or",alpha_3:"ori",name:"Oriya"},{alpha_2:"om",alpha_3:"orm",name:"Oromo"},{alpha_3:"osa",name:"Osage"},{alpha_2:"os",alpha_3:"oss",name:"Ossetian; Ossetic"},{alpha_3:"ota",name:"Turkish, Ottoman (1500-1928)"},{alpha_3:"oto",name:"Otomian languages"},{alpha_3:"paa",name:"Papuan languages"},{alpha_3:"pag",name:"Pangasinan"},{alpha_3:"pal",name:"Pahlavi"},{alpha_3:"pam",name:"Pampanga; Kapampangan"},{alpha_2:"pa",alpha_3:"pan",name:"Panjabi; Punjabi"},{alpha_3:"pap",name:"Papiamento"},{alpha_3:"pau",name:"Palauan"},{alpha_3:"peo",name:"Persian, Old (ca. 600-400 B.C.)"},{alpha_3:"phi",name:"Philippine languages"},{alpha_3:"phn",name:"Phoenician"},{alpha_2:"pi",alpha_3:"pli",name:"Pali"},{alpha_2:"pl",alpha_3:"pol",name:"Polish"},{alpha_3:"pon",name:"Pohnpeian"},{alpha_2:"pt",alpha_3:"por",name:"Portuguese"},{alpha_3:"pra",name:"Prakrit languages"},{alpha_3:"pro",name:"Provençal, Old (to 1500)"},{alpha_2:"ps",alpha_3:"pus",name:"Pushto; Pashto"},{alpha_3:"qaa-qtz",name:"Reserved for local use"},{alpha_2:"qu",alpha_3:"que",name:"Quechua"},{alpha_3:"raj",name:"Rajasthani"},{alpha_3:"rap",name:"Rapanui"},{alpha_3:"rar",name:"Rarotongan; Cook Islands Maori"},{alpha_3:"roa",name:"Romance languages"},{alpha_2:"rm",alpha_3:"roh",name:"Romansh"},{alpha_3:"rom",name:"Romany"},{alpha_2:"ro",alpha_3:"ron",bibliographic:"rum",name:"Romanian; Moldavian; Moldovan"},{alpha_2:"rn",alpha_3:"run",name:"Rundi"},{alpha_3:"rup",name:"Aromanian; Arumanian; Macedo-Romanian"},{alpha_2:"ru",alpha_3:"rus",name:"Russian"},{alpha_3:"sad",name:"Sandawe"},{alpha_2:"sg",alpha_3:"sag",name:"Sango"},{alpha_3:"sah",name:"Yakut"},{alpha_3:"sai",name:"South American Indian (Other)"},{alpha_3:"sal",name:"Salishan languages"},{alpha_3:"sam",name:"Samaritan Aramaic"},{alpha_2:"sa",alpha_3:"san",name:"Sanskrit"},{alpha_3:"sas",name:"Sasak"},{alpha_3:"sat",name:"Santali"},{alpha_3:"scn",name:"Sicilian"},{alpha_3:"sco",name:"Scots"},{alpha_3:"sel",name:"Selkup"},{alpha_3:"sem",name:"Semitic languages"},{alpha_3:"sga",name:"Irish, Old (to 900)"},{alpha_3:"sgn",name:"Sign Languages"},{alpha_3:"shn",name:"Shan"},{alpha_3:"sid",name:"Sidamo"},{alpha_2:"si",alpha_3:"sin",name:"Sinhala; Sinhalese"},{alpha_3:"sio",name:"Siouan languages"},{alpha_3:"sit",name:"Sino-Tibetan languages"},{alpha_3:"sla",name:"Slavic languages"},{alpha_2:"sk",alpha_3:"slk",bibliographic:"slo",name:"Slovak"},{alpha_2:"sl",alpha_3:"slv",name:"Slovenian"},{alpha_3:"sma",name:"Southern Sami"},{alpha_2:"se",alpha_3:"sme",name:"Northern Sami"},{alpha_3:"smi",name:"Sami languages"},{alpha_3:"smj",name:"Lule Sami"},{alpha_3:"smn",name:"Inari Sami"},{alpha_2:"sm",alpha_3:"smo",name:"Samoan"},{alpha_3:"sms",name:"Skolt Sami"},{alpha_2:"sn",alpha_3:"sna",name:"Shona"},{alpha_2:"sd",alpha_3:"snd",name:"Sindhi"},{alpha_3:"snk",name:"Soninke"},{alpha_3:"sog",name:"Sogdian"},{alpha_2:"so",alpha_3:"som",name:"Somali"},{alpha_3:"son",name:"Songhai languages"},{alpha_2:"st",alpha_3:"sot",name:"Sotho, Southern"},{alpha_2:"es",alpha_3:"spa",name:"Spanish; Castilian"},{alpha_2:"sq",alpha_3:"sqi",bibliographic:"alb",name:"Albanian"},{alpha_2:"sc",alpha_3:"srd",name:"Sardinian"},{alpha_3:"srn",name:"Sranan Tongo"},{alpha_2:"sr",alpha_3:"srp",name:"Serbian"},{alpha_3:"srr",name:"Serer"},{alpha_3:"ssa",name:"Nilo-Saharan languages"},{alpha_2:"ss",alpha_3:"ssw",name:"Swati"},{alpha_3:"suk",name:"Sukuma"},{alpha_2:"su",alpha_3:"sun",name:"Sundanese"},{alpha_3:"sus",name:"Susu"},{alpha_3:"sux",name:"Sumerian"},{alpha_2:"sw",alpha_3:"swa",name:"Swahili"},{alpha_2:"sv",alpha_3:"swe",name:"Swedish"},{alpha_3:"syc",name:"Classical Syriac"},{alpha_3:"syr",name:"Syriac"},{alpha_2:"ty",alpha_3:"tah",name:"Tahitian"},{alpha_3:"tai",name:"Tai languages"},{alpha_2:"ta",alpha_3:"tam",name:"Tamil"},{alpha_2:"tt",alpha_3:"tat",name:"Tatar"},{alpha_2:"te",alpha_3:"tel",name:"Telugu"},{alpha_3:"tem",name:"Timne"},{alpha_3:"ter",name:"Tereno"},{alpha_3:"tet",name:"Tetum"},{alpha_2:"tg",alpha_3:"tgk",name:"Tajik"},{alpha_2:"tl",alpha_3:"tgl",name:"Tagalog"},{alpha_2:"th",alpha_3:"tha",name:"Thai"},{alpha_3:"tig",name:"Tigre"},{alpha_2:"ti",alpha_3:"tir",name:"Tigrinya"},{alpha_3:"tiv",name:"Tiv"},{alpha_3:"tkl",name:"Tokelau"},{alpha_3:"tlh",name:"Klingon; tlhIngan-Hol"},{alpha_3:"tli",name:"Tlingit"},{alpha_3:"tmh",name:"Tamashek"},{alpha_3:"tog",name:"Tonga (Nyasa)"},{alpha_2:"to",alpha_3:"ton",name:"Tonga (Tonga Islands)"},{alpha_3:"tpi",name:"Tok Pisin"},{alpha_3:"tsi",name:"Tsimshian"},{alpha_2:"tn",alpha_3:"tsn",name:"Tswana"},{alpha_2:"ts",alpha_3:"tso",name:"Tsonga"},{alpha_2:"tk",alpha_3:"tuk",name:"Turkmen"},{alpha_3:"tum",name:"Tumbuka"},{alpha_3:"tup",name:"Tupi languages"},{alpha_2:"tr",alpha_3:"tur",name:"Turkish"},{alpha_3:"tut",name:"Altaic languages"},{alpha_3:"tvl",name:"Tuvalu"},{alpha_2:"tw",alpha_3:"twi",name:"Twi"},{alpha_3:"tyv",name:"Tuvinian"},{alpha_3:"udm",name:"Udmurt"},{alpha_3:"uga",name:"Ugaritic"},{alpha_2:"ug",alpha_3:"uig",name:"Uighur; Uyghur"},{alpha_2:"uk",alpha_3:"ukr",name:"Ukrainian"},{alpha_3:"umb",name:"Umbundu"},{alpha_3:"und",name:"Undetermined"},{alpha_2:"ur",alpha_3:"urd",name:"Urdu"},{alpha_2:"uz",alpha_3:"uzb",name:"Uzbek"},{alpha_3:"vai",name:"Vai"},{alpha_2:"ve",alpha_3:"ven",name:"Venda"},{alpha_2:"vi",alpha_3:"vie",name:"Vietnamese"},{alpha_2:"vo",alpha_3:"vol",name:"Volapük"},{alpha_3:"vot",name:"Votic"},{alpha_3:"wak",name:"Wakashan languages"},{alpha_3:"wal",name:"Walamo"},{alpha_3:"war",name:"Waray"},{alpha_3:"was",name:"Washo"},{alpha_3:"wen",name:"Sorbian languages"},{alpha_2:"wa",alpha_3:"wln",name:"Walloon"},{alpha_2:"wo",alpha_3:"wol",name:"Wolof"},{alpha_3:"xal",name:"Kalmyk; Oirat"},{alpha_2:"xh",alpha_3:"xho",name:"Xhosa"},{alpha_3:"yao",name:"Yao"},{alpha_3:"yap",name:"Yapese"},{alpha_2:"yi",alpha_3:"yid",name:"Yiddish"},{alpha_2:"yo",alpha_3:"yor",name:"Yoruba"},{alpha_3:"ypk",name:"Yupik languages"},{alpha_3:"zap",name:"Zapotec"}
1,{alpha_3:"zbl",name:"Blissymbols; Blissymbolics; Bliss"},{alpha_3:"zen",name:"Zenaga"},{alpha_3:"zgh",name:"Standard Moroccan Tamazight"},{alpha_2:"za",alpha_3:"zha",name:"Zhuang; Chuang"},{alpha_2:"zh",alpha_3:"zho",bibliographic:"chi",name:"Chinese"},{alpha_3:"znd",name:"Zande languages"},{alpha_2:"zu",alpha_3:"zul",name:"Zulu"},{alpha_3:"zun",name:"Zuni"},{alpha_3:"zxx",name:"No linguistic content; Not applicable"},{alpha_3:"zza",name:"Zaza; Dimili; Dimli; Kirdki; Kirmanjki; Zazaki"}],iso15924:[{alpha_4:"Adlm",name:"Adlam",numeric:"166"},{alpha_4:"Afak",name:"Afaka",numeric:"439"},{alpha_4:"Aghb",name:"Caucasian Albanian",numeric:"239"},{alpha_4:"Ahom",name:"Ahom, Tai Ahom",numeric:"338"},{alpha_4:"Arab",name:"Arabic",numeric:"160"},{alpha_4:"Aran",name:"Arabic (Nastaliq variant)",numeric:"161"},{alpha_4:"Armi",name:"Imperial Aramaic",numeric:"124"},{alpha_4:"Armn",name:"Armenian",numeric:"230"},{alpha_4:"Avst",name:"Avestan",numeric:"134"},{alpha_4:"Bali",name:"Balinese",numeric:"360"},{alpha_4:"Bamu",name:"Bamum",numeric:"435"},{alpha_4:"Bass",name:"Bassa Vah",numeric:"259"},{alpha_4:"Batk",name:"Batak",numeric:"365"},{alpha_4:"Beng",name:"Bengali",numeric:"325"},{alpha_4:"Bhks",name:"Bhaiksuki",numeric:"334"},{alpha_4:"Blis",name:"Blissymbols",numeric:"550"},{alpha_4:"Bopo",name:"Bopomofo",numeric:"285"},{alpha_4:"Brah",name:"Brahmi",numeric:"300"},{alpha_4:"Brai",name:"Braille",numeric:"570"},{alpha_4:"Bugi",name:"Buginese",numeric:"367"},{alpha_4:"Buhd",name:"Buhid",numeric:"372"},{alpha_4:"Cakm",name:"Chakma",numeric:"349"},{alpha_4:"Cans",name:"Unified Canadian Aboriginal Syllabics",numeric:"440"},{alpha_4:"Cari",name:"Carian",numeric:"201"},{alpha_4:"Cham",name:"Cham",numeric:"358"},{alpha_4:"Cher",name:"Cherokee",numeric:"445"},{alpha_4:"Cirt",name:"Cirth",numeric:"291"},{alpha_4:"Copt",name:"Coptic",numeric:"204"},{alpha_4:"Cprt",name:"Cypriot",numeric:"403"},{alpha_4:"Cyrl",name:"Cyrillic",numeric:"220"},{alpha_4:"Cyrs",name:"Cyrillic (Old Church Slavonic variant)",numeric:"221"},{alpha_4:"Deva",name:"Devanagari (Nagari)",numeric:"315"},{alpha_4:"Dsrt",name:"Deseret (Mormon)",numeric:"250"},{alpha_4:"Dupl",name:"Duployan shorthand, Duployan stenography",numeric:"755"},{alpha_4:"Egyd",name:"Egyptian demotic",numeric:"070"},{alpha_4:"Egyh",name:"Egyptian hieratic",numeric:"060"},{alpha_4:"Egyp",name:"Egyptian hieroglyphs",numeric:"050"},{alpha_4:"Elba",name:"Elbasan",numeric:"226"},{alpha_4:"Ethi",name:"Ethiopic (Geʻez)",numeric:"430"},{alpha_4:"Geok",name:"Khutsuri (Asomtavruli and Nuskhuri)",numeric:"241"},{alpha_4:"Geor",name:"Georgian (Mkhedruli)",numeric:"240"},{alpha_4:"Glag",name:"Glagolitic",numeric:"225"},{alpha_4:"Goth",name:"Gothic",numeric:"206"},{alpha_4:"Gran",name:"Grantha",numeric:"343"},{alpha_4:"Grek",name:"Greek",numeric:"200"},{alpha_4:"Gujr",name:"Gujarati",numeric:"320"},{alpha_4:"Guru",name:"Gurmukhi",numeric:"310"},{alpha_4:"Hanb",name:"Han with Bopomofo (alias for Han + Bopomofo)",numeric:"503"},{alpha_4:"Hang",name:"Hangul (Hangŭl, Hangeul)",numeric:"286"},{alpha_4:"Hani",name:"Han (Hanzi, Kanji, Hanja)",numeric:"500"},{alpha_4:"Hano",name:"Hanunoo (Hanunóo)",numeric:"371"},{alpha_4:"Hans",name:"Han (Simplified variant)",numeric:"501"},{alpha_4:"Hant",name:"Han (Traditional variant)",numeric:"502"},{alpha_4:"Hatr",name:"Hatran",numeric:"127"},{alpha_4:"Hebr",name:"Hebrew",numeric:"125"},{alpha_4:"Hira",name:"Hiragana",numeric:"410"},{alpha_4:"Hluw",name:"Anatolian Hieroglyphs (Luwian Hieroglyphs, Hittite Hieroglyphs)",numeric:"080"},{alpha_4:"Hmng",name:"Pahawh Hmong",numeric:"450"},{alpha_4:"Hrkt",name:"Japanese syllabaries (alias for Hiragana + Katakana)",numeric:"412"},{alpha_4:"Hung",name:"Old Hungarian (Hungarian Runic)",numeric:"176"},{alpha_4:"Inds",name:"Indus (Harappan)",numeric:"610"},{alpha_4:"Ital",name:"Old Italic (Etruscan, Oscan, etc.)",numeric:"210"},{alpha_4:"Jamo",name:"Jamo (alias for Jamo subset of Hangul)",numeric:"284"},{alpha_4:"Java",name:"Javanese",numeric:"361"},{alpha_4:"Jpan",name:"Japanese (alias for Han + Hiragana + Katakana)",numeric:"413"},{alpha_4:"Jurc",name:"Jurchen",numeric:"510"},{alpha_4:"Kali",name:"Kayah Li",numeric:"357"},{alpha_4:"Kana",name:"Katakana",numeric:"411"},{alpha_4:"Khar",name:"Kharoshthi",numeric:"305"},{alpha_4:"Khmr",name:"Khmer",numeric:"355"},{alpha_4:"Khoj",name:"Khojki",numeric:"322"},{alpha_4:"Kitl",name:"Khitan large script",numeric:"505"},{alpha_4:"Kits",name:"Khitan small script",numeric:"288"},{alpha_4:"Knda",name:"Kannada",numeric:"345"},{alpha_4:"Kore",name:"Korean (alias for Hangul + Han)",numeric:"287"},{alpha_4:"Kpel",name:"Kpelle",numeric:"436"},{alpha_4:"Kthi",name:"Kaithi",numeric:"317"},{alpha_4:"Lana",name:"Tai Tham (Lanna)",numeric:"351"},{alpha_4:"Laoo",name:"Lao",numeric:"356"},{alpha_4:"Latf",name:"Latin (Fraktur variant)",numeric:"217"},{alpha_4:"Latg",name:"Latin (Gaelic variant)",numeric:"216"},{alpha_4:"Latn",name:"Latin",numeric:"215"},{alpha_4:"Leke",name:"Leke",numeric:"364"},{alpha_4:"Lepc",name:"Lepcha (Róng)",numeric:"335"},{alpha_4:"Limb",name:"Limbu",numeric:"336"},{alpha_4:"Lina",name:"Linear A",numeric:"400"},{alpha_4:"Linb",name:"Linear B",numeric:"401"},{alpha_4:"Lisu",name:"Lisu (Fraser)",numeric:"399"},{alpha_4:"Loma",name:"Loma",numeric:"437"},{alpha_4:"Lyci",name:"Lycian",numeric:"202"},{alpha_4:"Lydi",name:"Lydian",numeric:"116"}
1,{alpha_4:"Mahj",name:"Mahajani",numeric:"314"},{alpha_4:"Mand",name:"Mandaic, Mandaean",numeric:"140"},{alpha_4:"Mani",name:"Manichaean",numeric:"139"},{alpha_4:"Marc",name:"Marchen",numeric:"332"},{alpha_4:"Maya",name:"Mayan hieroglyphs",numeric:"090"},{alpha_4:"Mend",name:"Mende Kikakui",numeric:"438"},{alpha_4:"Merc",name:"Meroitic Cursive",numeric:"101"},{alpha_4:"Mero",name:"Meroitic Hieroglyphs",numeric:"100"},{alpha_4:"Mlym",name:"Malayalam",numeric:"347"},{alpha_4:"Modi",name:"Modi, Moḍī",numeric:"324"},{alpha_4:"Mong",name:"Mongolian",numeric:"145"},{alpha_4:"Moon",name:"Moon (Moon code, Moon script, Moon type)",numeric:"218"},{alpha_4:"Mroo",name:"Mro, Mru",numeric:"199"},{alpha_4:"Mtei",name:"Meitei Mayek (Meithei, Meetei)",numeric:"337"},{alpha_4:"Mult",name:"Multani",numeric:"323"},{alpha_4:"Mymr",name:"Myanmar (Burmese)",numeric:"350"},{alpha_4:"Narb",name:"Old North Arabian (Ancient North Arabian)",numeric:"106"},{alpha_4:"Nbat",name:"Nabataean",numeric:"159"},{alpha_4:"Newa",name:"Newa, Newar, Newari, Nepāla lipi",numeric:"333"},{alpha_4:"Nkgb",name:"Nakhi Geba ('Na-'Khi ²Ggŏ-¹baw, Naxi Geba)",numeric:"420"},{alpha_4:"Nkoo",name:"N’Ko",numeric:"165"},{alpha_4:"Nshu",name:"Nüshu",numeric:"499"},{alpha_4:"Ogam",name:"Ogham",numeric:"212"},{alpha_4:"Olck",name:"Ol Chiki (Ol Cemet’, Ol, Santali)",numeric:"261"},{alpha_4:"Orkh",name:"Old Turkic, Orkhon Runic",numeric:"175"},{alpha_4:"Orya",name:"Oriya",numeric:"327"},{alpha_4:"Osge",name:"Osage",numeric:"219"},{alpha_4:"Osma",name:"Osmanya",numeric:"260"},{alpha_4:"Palm",name:"Palmyrene",numeric:"126"},{alpha_4:"Pauc",name:"Pau Cin Hau",numeric:"263"},{alpha_4:"Perm",name:"Old Permic",numeric:"227"},{alpha_4:"Phag",name:"Phags-pa",numeric:"331"},{alpha_4:"Phli",name:"Inscriptional Pahlavi",numeric:"131"},{alpha_4:"Phlp",name:"Psalter Pahlavi",numeric:"132"},{alpha_4:"Phlv",name:"Book Pahlavi",numeric:"133"},{alpha_4:"Phnx",name:"Phoenician",numeric:"115"},{alpha_4:"Piqd",name:"Klingon (KLI pIqaD)",numeric:"293"},{alpha_4:"Plrd",name:"Miao (Pollard)",numeric:"282"},{alpha_4:"Prti",name:"Inscriptional Parthian",numeric:"130"},{alpha_4:"Qaaa",name:"Reserved for private use (start)",numeric:"900"},{alpha_4:"Qabx",name:"Reserved for private use (end)",numeric:"949"},{alpha_4:"Rjng",name:"Rejang (Redjang, Kaganga)",numeric:"363"},{alpha_4:"Roro",name:"Rongorongo",numeric:"620"},{alpha_4:"Runr",name:"Runic",numeric:"211"},{alpha_4:"Samr",name:"Samaritan",numeric:"123"},{alpha_4:"Sara",name:"Sarati",numeric:"292"},{alpha_4:"Sarb",name:"Old South Arabian",numeric:"105"},{alpha_4:"Saur",name:"Saurashtra",numeric:"344"},{alpha_4:"Sgnw",name:"SignWriting",numeric:"095"},{alpha_4:"Shaw",name:"Shavian (Shaw)",numeric:"281"},{alpha_4:"Shrd",name:"Sharada, Śāradā",numeric:"319"},{alpha_4:"Sidd",name:"Siddham, Siddhaṃ, Siddhamātṛkā",numeric:"302"},{alpha_4:"Sind",name:"Khudawadi, Sindhi",numeric:"318"},{alpha_4:"Sinh",name:"Sinhala",numeric:"348"},{alpha_4:"Sora",name:"Sora Sompeng",numeric:"398"},{alpha_4:"Sund",name:"Sundanese",numeric:"362"},{alpha_4:"Sylo",name:"Syloti Nagri",numeric:"316"},{alpha_4:"Syrc",name:"Syriac",numeric:"135"},{alpha_4:"Syre",name:"Syriac (Estrangelo variant)",numeric:"138"},{alpha_4:"Syrj",name:"Syriac (Western variant)",numeric:"137"},{alpha_4:"Syrn",name:"Syriac (Eastern variant)",numeric:"136"},{alpha_4:"Tagb",name:"Tagbanwa",numeric:"373"},{alpha_4:"Takr",name:"Takri, Ṭākrī, Ṭāṅkrī",numeric:"321"},{alpha_4:"Tale",name:"Tai Le",numeric:"353"},{alpha_4:"Talu",name:"New Tai Lue",numeric:"354"},{alpha_4:"Taml",name:"Tamil",numeric:"346"},{alpha_4:"Tang",name:"Tangut",numeric:"520"},{alpha_4:"Tavt",name:"Tai Viet",numeric:"359"},{alpha_4:"Telu",name:"Telugu",numeric:"340"},{alpha_4:"Teng",name:"Tengwar",numeric:"290"},{alpha_4:"Tfng",name:"Tifinagh (Berber)",numeric:"120"},{alpha_4:"Tglg",name:"Tagalog (Baybayin, Alibata)",numeric:"370"},{alpha_4:"Thaa",name:"Thaana",numeric:"170"},{alpha_4:"Thai",name:"Thai",numeric:"352"},{alpha_4:"Tibt",name:"Tibetan",numeric:"330"},{alpha_4:"Tirh",name:"Tirhuta",numeric:"326"},{alpha_4:"Ugar",name:"Ugaritic",numeric:"040"},{alpha_4:"Vaii",name:"Vai",numeric:"470"},{alpha_4:"Visp",name:"Visible Speech",numeric:"280"},{alpha_4:"Wara",name:"Warang Citi (Varang Kshiti)",numeric:"262"},{alpha_4:"Wole",name:"Woleai",numeric:"480"},{alpha_4:"Xpeo",name:"Old Persian",numeric:"030"},{alpha_4:"Xsux",name:"Cuneiform, Sumero-Akkadian",numeric:"020"},{alpha_4:"Yiii",name:"Yi",numeric:"460"},{alpha_4:"Zinh",name:"Code for inherited script",numeric:"994"},{alpha_4:"Zmth",name:"Mathematical notation",numeric:"995"},{alpha_4:"Zsye",name:"Symbols (Emoji variant)",numeric:"993"},{alpha_4:"Zsym",name:"Symbols",numeric:"996"},{alpha_4:"Zxxx",name:"Code for unwritten documents",numeric:"997"},{alpha_4:"Zyyy",name:"Code for undetermined script",numeric:"998"},{alpha_4:"Zzzz",name:"Code for uncoded script",numeric:"999"}],languageValue:null,scriptValue:null,availableOptions:[],literals:{}}},computed:Object(s["b"])({profilesLoaded:"profilesLoaded",activeProfile:"activeProfile",idWorkSearchResults:"idWorkSearchResults",rtLookup:"rtLookup",profiles:"profiles",idXML:"idXML",contextData:"contextData",scripts:function(){let t=this.iso15924.map(t=>({code:t.alpha_4,numeric:t.numeric,name:t.name}));return t=t.sort((t,e)=>t.name>e.name?1:e.name>t.name?-1:0),t},languages:function(){let t=this.iso639_1.map(t=>({code:t.code,name:t.name})),e=this.iso639_1.map(t=>t.name),i=this.iso639_2.map(t=>({code:t.alpha_3?t.alpha_3:t.alpha_2,name:t.name}));
1return i.forEach(i=>{-1===e.indexOf(i.name)&&t.push(i)}),t=t.sort((t,e)=>t.name>e.name?1:e.name>t.name?-1:0),t},availableOptionsCodes:function(){let t={};for(let e of this.availableOptions){let i=e.l.code.toLowerCase()+"-"+e.s.code.toLowerCase();t[i]=e}return t}}),methods:{selectLang:function(t,e){this.$store.dispatch("setLangLiterals",{self:this,literalObj:t,lang:e}).then(()=>{this.refreshDisplay()})},refreshDisplay:function(){null!==localStorage.getItem("bfeLiteralLanguageOptions")&&(this.availableOptions=JSON.parse(localStorage.getItem("bfeLiteralLanguageOptions"))),this.literals=b["a"].returnLiterals(this.activeProfile);for(let t in this.literals)for(let e of this.literals[t])if(e.language&&e.language.indexOf("-")>-1){let t=e.language.split("-"),i=this.languages.filter(e=>e.code.toLowerCase()===t[0].toLowerCase()),a=this.scripts.filter(e=>e.code.toLowerCase()===t[1].toLowerCase());i.length>0&&a.length>0&&this.availableOptions.push({l:i[0],s:a[0]});let o=[],r=[];for(let e of this.availableOptions){let t=e.s.code+"-"+e.l.code;-1===o.indexOf(t)&&(o.push(t),r.push(e))}this.availableOptions=r,localStorage.setItem("bfeLiteralLanguageOptions",JSON.stringify(r))}},removeLangOption:function(t){this.availableOptions.splice(t,1),localStorage.setItem("bfeLiteralLanguageOptions",JSON.stringify(this.availableOptions))},addOption:function(){if(this.languageValue&&this.scriptValue){let t=this.languages.filter(t=>t.name===this.languageValue);t=t[0];let e=this.scripts.filter(t=>t.name===this.scriptValue);e=e[0],this.availableOptions.push({l:t,s:e}),localStorage.setItem("bfeLiteralLanguageOptions",JSON.stringify(this.availableOptions))}},closeLitLang:function(){this.$parent.toggleLiteralLanguage()}},created:function(){},mounted:function(){}},Zt=Qt,te=(i("7ffa"),Object(c["a"])(Zt,Xt,Yt,!1,null,null,null)),ee=te.exports,ie=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:[""]})},ae=[],oe={name:"EditNavLiteralDisplayOptions",components:{},data:function(){return{}},computed:Object(s["b"])({profilesLoaded:"profilesLoaded",activeProfile:"activeProfile",rtLookup:"rtLookup",profiles:"profiles"}),methods:{},created:function(){for(let t in this.activeProfile.rt){console.log(t);for(let e in this.activeProfile.rt[t].pt)console.log(e),console.log(this.activeProfile.rt[t].pt[e])}},mounted:function(){}},re=oe,se=Object(c["a"])(re,ie,ae,!1,null,null,null),le=se.exports,ne=i("b76a"),ce=i.n(ne),de={name:"EditLabelDereference",components:{EditLiteralLanguage:ee,EditNavLiteralDisplayOptions:le,draggable:ce.a,Keypress:()=>i.e("chunk-2d0ba165").then(i.bind(null,"365a"))},computed:Object(s["b"])({diagramMiniMap:"diagramMiniMap",activeRecordSaved:"activeRecordSaved",settingsHideEmptyFields:"settingsHideEmptyFields",settingsDisplayMode:"settingsDisplayMode",settingsLeftMenuEnriched:"settingsLeftMenuEnriched",activeProfile:"activeProfile",undoLog:"undo",undoIndex:"undoIndex",settingsTreatLikeNoteFields:"settingsTreatLikeNoteFields",subjectList:"subjectList",dragOptions(){return{animation:200,group:"description",disabled:!1,ghostClass:"ghost"}}}),props:{URI:String,forceComponentRedraw:{type:Function}},data:function(){return{activeMiniMap:{URI:null},miniMapActionValue:"Actions",headerState:"inital",optionDisplay:!1,undoDisplay:!1,subjectListDisplay:!1,hideFields:!1,leftMenuEnriched:!1,displayLiteralLanguage:!1,displayTemplate:!1,displayLiteralOptions:!1,lastMouseY:10,resourceLinks:[],displayPreview:!1,xmlPreview:"Loading...",showPostModal:!1,showPostModalErrorMsg:!1,templateLabel:"",templatesDataFlowCantBeBoth:k["a"].templatesDataFlowCantBeBoth,templatesDataFlowHide:k["a"].templatesDataFlowHide,list:[],drag:!1}},watch:{subjectList:function(){this.list=this.subjectList.map((t,e)=>({label:t.label,source:t.source,guid:t.guid,index:e,pt:t.pt}))}},created:function(){this.hideFields=this.settingsHideEmptyFields,this.leftMenuEnriched=this.settingsLeftMenuEnriched,this.$nextTick((function(){window.addEventListener("scroll",()=>{if(this.lastMouseY<=75&&(this.headerState="deployed"),"deployed"==this.headerState)return this.$refs.header&&(this.$refs.header.classList.remove("retracted"),this.$refs.header.classList.remove("inital"),this.$refs.header.classList.add("deployed")),!1;if(window.pageYOffset>5){if(this.displayLiteralLanguage)return!1;if(this.displayLiteralOptions)return!1;if(this.showPostModal)return!1;if(this.displayTemplate)return!1;if(this.optionDisplay)return!1;if(this.subjectListDisplay)return!1;if(this.undoDisplay)return!1;if(this.displayPreview)return!1;this.headerState="retracted",this.$refs.header&&(this.$refs.header.classList.remove("inital"),this.$refs.header.classList.remove("deployed"),this.$refs.header.classList.add("retracted"))}else window.pageYOffset<=5&&(this.$refs.header&&(this.$refs.header.classList.remove("retracted"),this.$refs.header.classList.remove("deployed"),this.$refs.header.classList.add("inital")),this.headerState="inital")}),window.addEventListener("mousemove",t=>{if(this.lastMouseY=t.y,t.y<75)"retracted"==this.headerState&&(this.$refs.header&&(this.$refs.header.classList.remove("retracted"),this.$refs.header.classList.remove("inital"),this.$refs.header.classList.add("deployed")),this.headerState="deployed");else if(t.y>75&&"deployed"==this.headerState){if(this.optionDisplay)return!1;if(this.subjectListDisplay)return!1;if(this.undoDisplay)return!1;if(this.displayLiteralLanguage)return!1;if(this.displayLiteralOptions)return!1;if(this.showPostModal)return!1;if(this.displayTemplate)return!1;if(this.displayPreview)return!1;this.headerState="retracted",this.$refs.header&&(this.$refs.header.classList.remove("inital"),this.$refs.header.classList.remove("deployed"),this.$refs.header.classList.add("retracted"))}})}))},methods:{namespaceUri:function(t){return Ft["a"].namespaceUri(t)},templatesDedupePts:function(t){let e=[],i=[];for(let a of this.activeProfile.rt[t].ptOrder){let o=this.buildPropFlowId(t,a);-1===e.indexOf(o)&&(e.push(o),i.push(a))}return i},buildPropFlowId:function(t,e){let i=t+"|"+this.activeProfile.rt[t].pt[e].propertyURI;return this.activeProfile.rt[t].pt[e].valueConstraint&&this.activeProfile.rt[t].pt[e].valueConstraint.valueDataType&&this.activeProfile.rt[t].pt[e].valueConstraint.valueDataType.dataTypeURI&&""!=this.activeProfile.rt[t].pt[e].valueConstraint.valueDataType.dataTypeURI.trim()&&(i=i+"|"+this.activeProfile.rt[t].pt[e].valueConstraint.valueDataType.dataTypeURI),i},templatesPropFlowChange:function(t){this.$store.dispatch("setTemplateDataFlow",{id:t.target.name,value:t.target.value}).then(()=>{})},templateNameChange:function(){this.$store.dispatch("setTemplateName",{value:this.templateLabel}).then(()=>{})},templatesTDClick:function(t){"TD"==t.target.tagName&&(t.target.children[0].checked="checked",this.templatesPropFlowChange({target:t.target.children[0]}))},templatesPropertyIsChecked:function(t,e){return this.templatesDataFlowCantBeBoth.filter(e=>t.includes(e)).length>0?this.activeProfile.templateDataFlow?!!this.activeProfile.templateDataFlow[t]&&(e==this.activeProfile.templateDataFlow[t]&&"checked"):"resource"==e&&"checked":this.activeProfile.templateDataFlow&&this.activeProfile.templateDataFlow[t]?e==this.activeProfile.templateDataFlow[t]&&"checked":"both"==e&&"checked"},async saveTemplate(t){if(""==this.templateLabel.trim())return alert("Please name the template"),!1;await b["a"].prepareTemplate(this.activeProfile,t),this.toggleTemplate()},subjectDragEnd:function(){this.$store.dispatch("setSubjectOrder",this.list).then(()=>{})},undoRedo:function(t,e){let i={undo:e};"redo"===t&&(i={redo:e}),"goto"===t&&(i={goto:e}),this.$store.dispatch("undoRedoAction",i).then(()=>{this.$store.dispatch("incrementUndoCounter")})},sort(){this.list=this.list.sort((t,e)=>t.order-e.order)},editSubjectClick:function(t){document.getElementById(t+"_subjectButton").click(),this.subjectListDisplay=!1},miniMapAction:function(){if("addItem"==this.miniMapActionValue)if(!this.activeMiniMap.URI||this.activeMiniMap.type&&"Work"==this.activeMiniMap.type){for(let t in this.activeProfile.rt)if(t.endsWith(":Instance")){this.$store.dispatch("addItem",{uri:this.activeProfile.rt[t].URI}).then(()=>{console.log(this.activeProfile)});break}}else this.$store.dispatch("addItem",{uri:this.activeMiniMap.URI}).then(()=>{console.log(this.activeProfile)});"deleteItem"==this.miniMapActionValue&&this.$store.dispatch("deleteItem",{uri:this.activeMiniMap.URI}).then(()=>{}),"cloneInstance"==this.miniMapActionValue&&this.$store.dispatch("cloneInstance",{uri:this.activeMiniMap.URI}).then(()=>{}),"cloneItem"==this.miniMapActionValue&&this.$store.dispatch("duplicateItem",{uri:this.activeMiniMap.URI}).then(()=>{}),"deleteItem"==this.miniMapActionValue&&this.$store.dispatch("deleteItem",{uri:this.activeMiniMap.URI}).then(()=>{}),"deleteInstance"==this.miniMapActionValue&&this.$store.dispatch("deleteInstance",{uri:this.activeMiniMap.URI}).then(()=>{}),"addInstance"==this.miniMapActionValue&&this.$store.dispatch("addInstance",{uri:this.activeMiniMap.URI}).then(()=>{}),this.miniMapActionValue="Actions"},miniMapClick:function(t){let e=t.rt;(0==t.counter||t.counter>0)&&(e+="1");let i=e.replace(/\(|\)|\s|\/|:|\.|\|/g,"_")+t.jumpTo.replace(/\(|\)|\s|\/|:|\.|\|/g,"_");"spreadsheet"!=this.settingsDisplayMode&&this.scrollFieldContainerIntoView(null,i),this.activeMiniMap=t},toggleOptionDisplay:function(){this.optionDisplay=!this.optionDisplay,this.optionDisplay&&(this.undoDisplay=!1,this.subjectListDisplay=!1)},toggleSubjectListDisplay:function(){this.$store.dispatch("setSubjectList"),this.subjectListDisplay=!this.subjectListDisplay,this.subjectListDisplay&&(this.undoDisplay=!1,this.optionDisplay=!1)},toggleUndoDisplay:function(){this.undoDisplay=!this.undoDisplay,this.undoDisplay&&(this.optionDisplay=!1,this.subjectListDisplay=!1)},updateLeftMenuEnriched:async function(){this.$store.dispatch("settingsLeftMenuEnriched",{self:this,settingsLeftMenuEnriched:this.leftMenuEnriched}).then(async()=>{})},updateHideEmptyFields:async function(){this.$store.dispatch("settingsHideEmptyFields",{self:this,settingsHideEmptyFields:this.hideFields}).then(async()=>{console.log("after",this.settingsHideEmptyFields)}),this.updateHideEmptyFieldsReDraw()},updateHideEmptyFieldsReDraw:function(){if(this.hideFields)for(let t in this.activeProfile.rt)for(let e in this.activeProfile.rt[t].pt){let i=this.activeProfile.rt[t].pt[e];i.canBeHidden=!0,Object.keys(i.userValue).length>1&&(i.canBeHidden=!1)}this.forceComponentRedraw()},updateLiteralOption:async function(t){this.$store.dispatch("setTreatLikeNoteFields",{self:this,fields:t}).then(async()=>{})},updateLayout:async function(t){this.$store.dispatch("settingsDisplayMode",{self:this,settingsDisplayMode:t}).then(async()=>{window.location.pathname.includes("/compactedit/")&&("default"==t&&(await this.triggerSave(),this.$router.push("/edit/"+this.activeProfile.eId).then(()=>{})),"compact"==t&&(await this.triggerSave(),this.$router.push("/edit/"+this.activeProfile.eId).then(()=>{}))),window.location.pathname.includes("/edit/")&&"spreadsheet"==t&&(await this.triggerSave(),this.$router.push("/compactedit/"+this.activeProfile.eId).then(()=>{}))})},triggerSave:async function(){let t=await Ft["a"].toBFXML(this.activeProfile);
1w["a"].saveRecord(t.xlmStringBasic,this.activeProfile.eId),this.$store.dispatch("setActiveRecordSaved",{self:this},!0).then(()=>{})},togglePreview:async function(){if(this.displayPreview)this.displayPreview=!1,this.xmlPreview="Loading...";else{let t=await Ft["a"].toBFXML(this.activeProfile);this.xmlPreview=t.xmlStringFormatted,this.displayPreview=!0}},toggleTemplate:async function(){this.displayTemplate?this.displayTemplate=!1:(this.displayTemplate=!0,this.$nextTick(()=>{this.$refs.templateNameInput.focus()}))},escapeKey:function(){this.displayPreview&&(this.displayPreview=!1),this.showPostModal&&(this.showPostModal=!1),this.displayTemplate&&(this.displayTemplate=!1),this.displayLiteralOptions&&(this.displayLiteralOptions=!1)},publish:async function(){this.showPostModal=!0;let t=await Ft["a"].toBFXML(this.activeProfile),e=await w["a"].publish(t.xlmString,this.activeProfile.eId,this.activeProfile);this.showPostModalErrorMsg=!1,e.status?(this.activeProfile.status="published",this.$store.dispatch("setActiveProfile",{self:this,profile:this.activeProfile}).then(async()=>{this.resourceLinks=[],t=await Ft["a"].toBFXML(this.activeProfile),w["a"].saveRecord(t.xlmStringBasic,this.activeProfile.eId);for(let t in this.activeProfile.rt){let e=t.split(":").slice(-1)[0],i=k["a"].convertToRegionUrl(this.activeProfile.rt[t].URI),a=k["a"].returnUrls().env;this.resourceLinks.push({type:e,url:i,env:a})}})):this.showPostModalErrorMsg=JSON.parse(e.msg)},toggleLiteralLanguage:function(){this.displayLiteralLanguage?this.displayLiteralLanguage=!1:(this.displayLiteralLanguage=!0,this.$nextTick(()=>{this.$refs.literalLanguageModal.refreshDisplay()}))},toggleDisplayLiteralOptions:function(){this.displayLiteralOptions?this.displayLiteralOptions=!1:this.displayLiteralOptions=!0},scrollFieldContainerIntoView:function(t,e){if(document.getElementById("container-for-"+e).scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"}),window.setTimeout(()=>{document.querySelector("#container-for-"+e+" input")&&document.querySelector("#container-for-"+e+" input").focus()},400),t)return t.preventDefault(),!1},cleanUpErrorResponse:function(t){return t=JSON.stringify(t,null,2),t=t.replace(/\\n|\\t/g,"").replace(/\\"/g,'"').replace(/&lt;/g,"<").replace(/&gt;/g,">"),t}}},ue=de,pe=(i("8583"),Object(c["a"])(ue,Jt,qt,!1,null,null,null)),he=pe.exports,fe={name:"Edit",components:{EditMini:zt,EditLabelDereference:Wt["a"],EditNavToolBar:he,Keypress:()=>i.e("chunk-2d0ba165").then(i.bind(null,"365a"))},computed:Object(s["b"])({profilesLoaded:"profilesLoaded",profiles:"profiles",sartingPoint:"sartingPoint",activeInput:"activeInput",activeProfile:"activeProfile",activeComponent:"activeComponent",activeProfileName:"activeProfileName",activeProfileMini:"activeProfileMini",activeEditCounter:"activeEditCounter",rtLookup:"rtLookup",settingsHideEmptyFields:"settingsHideEmptyFields",settingsDisplayMode:"settingsDisplayMode",settingsLeftMenuEnriched:"settingsLeftMenuEnriched",catInitials:"catInitials",workingOnMiniProfile:"workingOnMiniProfile"}),created:async function(){let t=new Date;if("2022-10-19"!=t.toISOString().split("T")[0]&&"2022-10-20"!=t.toISOString().split("T")[0]||Object.keys(localStorage).filter(t=>t.startsWith("ontology_")).forEach(t=>localStorage.removeItem(t)),t.toISOString().split("T")[0].indexOf("2022-10")>-1&&Object.keys(localStorage).filter(t=>t.startsWith("ontology_")).forEach(t=>localStorage.removeItem(t)),this.profilesLoaded)if(!this.activeProfile.eId&&this.$route.params.recordId){let t=await b["a"].loadRecordFromBackend(this.$route.params.recordId);this.$store.dispatch("setActiveRecordSaved",{self:this},!1),this.$store.dispatch("setActiveProfile",{self:this,profile:t}).then(()=>{this.$nextTick(()=>{this.loadProfileOntologyLookupsBuild()}),console.log("-----diagramMiniMap:",this.diagramMiniMap),this.$store.dispatch("setSubjectList"),this.leftMenuEnriched=this.settingsLeftMenuEnriched,this.$refs.navToolBar.updateHideEmptyFieldsReDraw(),this.forceComponentRedraw()})}else this.$nextTick(()=>{this.loadProfileOntologyLookupsBuild(),this.$store.dispatch("setSubjectList"),this.$refs.navToolBar.updateHideEmptyFieldsReDraw(),this.forceComponentRedraw()});else this.$store.dispatch("fetchProfiles",{self:this}).then(async()=>
1{if(console.log(this.$route.params.recordId),console.log(this.activeProfile),!this.activeProfile.eId&&this.$route.params.recordId){this.$store.dispatch("clearUndo",{self:this});let t=await b["a"].loadRecordFromBackend(this.$route.params.recordId);this.$store.dispatch("setActiveUndo",{self:this,msg:"Loaded record"}).then(()=>{this.$store.dispatch("forceSave",{self:this},!0).then(()=>{this.$store.dispatch("setActiveRecordSaved",{self:this},!0).then(()=>{})})}),this.$store.dispatch("setActiveProfile",{self:this,profile:t}).then(()=>{this.loadProfileOntologyLookupsBuild(),console.log("-----diagramMiniMap:",this.diagramMiniMap),this.$store.dispatch("setSubjectList"),this.leftMenuEnriched=this.settingsLeftMenuEnriched,this.$refs.navToolBar.updateHideEmptyFieldsReDraw(),this.forceComponentRedraw()})}else this.loadProfileOntologyLookupsBuild(),this.$store.dispatch("setSubjectList")});this.$nextTick((function(){Vt["a"].renderBorders(),window.setTimeout(()=>{document.getElementsByTagName("input")[0].focus()},500)}))},mounted:function(){},updated:function(){this.$nextTick((function(){Vt["a"].renderBorders()}))},data:function(){return{labels:jt["a"],ontologyLookupTodo:[],displayMiniEditor:!1,displayMiniEditorKey:12345,sourceLaunchId:null,sourceOfMiniComponent:null,keyCounter:0,sendToTemp:{},sendToTempDispaly:!1}},methods:{prettifyXml:Vt["a"].prettifyXml,moveDown:Vt["a"].globalMoveDown,moveUp:Vt["a"].globalMoveUp,movePageDown:Vt["a"].globalMovePageDown,movePageUp:Vt["a"].globalMovePageUp,dupeProperty:Vt["a"].dupeProperty,ignoreRightMenuProperty:function(t){return"http://id.loc.gov/ontologies/bibframe/instanceOf"==t.propertyURI},forceComponentRedraw:function(){console.log(this.keyCounter),this.keyCounter++},addProperty:function(t,e,i,a){a||(a=!1),this.$store.dispatch("duplicateProperty",{self:this,id:i,profile:e,dupeData:a}).then(()=>{}),t.stopPropagation()},removeProperty:function(t,e){if(!t||!e){for(let e in this.activeProfile.rt)for(let i in this.activeProfile.rt[e].pt)i==this.activeComponent&&(t=e);e=this.activeComponent}const i=window.confirm("Are you sure you want to remove the property?");if(!i)return!1;this.$store.dispatch("removeProperty",{self:this,id:e,profile:t}).then(()=>{})},sendToSendIt(t){t!=this.sendToTemp.profileName&&this.$store.dispatch("sendToInstance",{self:this,from:this.sendToTemp,to:t}).then(async()=>{}),this.sendToTempDispaly=!1,this.keyCounter++},sendToInstance(t,e,i,a){console.log(e,i,a),this.sendToTemp={profile:e,componet:i,data:a},this.sendToTempDispaly=!0,this.keyCounter++,t.stopPropagation()},canSendToInstance:function(t,e){if(e.includes(":Work")){if("http://id.loc.gov/ontologies/bibframe/contribution"==t)return!0;if("http://id.loc.gov/ontologies/bibframe/language"==t)return!0;if("http://id.loc.gov/ontologies/bibframe/note"==t)return!0;if("http://id.loc.gov/ontologies/bibframe/genreForm"==t)return!0}return!1},returnTemplateTypes:function(t){let e=[];for(let i of t)this.rtLookup[i]&&this.rtLookup[i].resourceLabel&&e.push(this.rtLookup[i].resourceLabel);return e},displayComponentCheck:function(t){return"http://id.loc.gov/ontologies/bibframe/hasItem"!=t.propertyURI&&"http://id.loc.gov/ontologies/bibframe/hasInstance"!=t.propertyURI},postAndUseMini:async function(){this.$refs.miniEditorHub.triggerSave();let t=await this.$refs.miniEditorHub.publish(),e={contextValue:!0,source:[],type:"Hub",variant:[],uri:t.useURI,typeFull:"http://id.loc.gov/ontologies/bibframe/Hub",title:t.useCreator+" "+t.useTitle,contributor:[],date:null,genreForm:null,nodeMap:{}
1,precoordinated:!1,literal:!1};return this.$store.dispatch("setWorkingOnMiniProfile",{self:this,value:!1}).then(()=>{this.$store.dispatch("setContextManually",{self:this.sourceOfMiniComponent,context:e}).then(()=>{this.$store.dispatch("setValueComplex",{self:this.sourceOfMiniComponent,profileComponet:this.sourceOfMiniComponent.profileCompoent,template:this.sourceOfMiniComponent.activeTemplate,structure:this.sourceOfMiniComponent.structure,parentStructure:this.sourceOfMiniComponent.parentStructureObj}).then(()=>{this.sourceOfMiniComponent.checkForUserData()})})}),this.closeMiniEditor(),t},closeMiniEditor:function(){this.displayMiniEditor=!1,this.$store.dispatch("setWorkingOnMiniProfile",{self:this,value:!1}).then(()=>{this.sourceLaunchId&&document.getElementById(this.sourceLaunchId).focus()})},showMiniEditorClick:function(t){console.log("showMiniEditorClick"),this.showMiniEditor(t,()=>{this.closeMiniEditor(t),console.log("showMiniEditorClick 2"),this.showMiniEditor(t)})},showMiniEditor:function(t,e){this.displayMiniEditorKey="miniEditor-"+Date.now(),this.displayMiniEditor=!0,this.sourceLaunchId=t.sourceId,this.sourceOfMiniComponent=t.component,this.$store.dispatch("setWorkingOnMiniProfile",{self:this,value:!0}).then(()=>{if(this.profiles[t.useProfile]){let i=b["a"].loadNewTemplate(t.useProfile,this.catInitials);i.user=this.catInitials,console.log("-------"),console.log(i),console.log("-------"),this.$store.dispatch("setActiveProfile",{self:this,profile:i}).then(()=>{this.$nextTick(()=>{document.getElementsByClassName("selectable-input-mini")[0].focus(),e&&e()})})}else alert("Cannot find profile:",t.useProfile)})},reportError:async function(t){let e=prompt("Please enter descripion of the problem");if(!e)return!1;let i=prompt("Your Email Address (Optional) ");const a=await fetch(k["a"].returnUrls().util+"error/report",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({eId:this.activeProfile.eId,desc:e,contact:i,activeProfile:this.activeProfile})}),o=await a.json();return o.result&&alert("Thanks!"),console.log(o),t.preventDefault(),!1},restoreDelete:function(t,e,i){this.$store.dispatch("restoreProperty",{self:this,id:i,profile:e}).then(()=>{})},makeVisible:function(t,e,i){for(let a in this.activeProfile.rt)for(let t in this.activeProfile.rt[a].pt)t==e&&(this.activeProfile.rt[a].pt[t].canBeHidden=!1,this.keyCounter++);this.$nextTick(()=>{this.scrollFieldContainerIntoView(null,i)})},scrollFieldContainerIntoView:function(t,e){if(console.log(document.getElementById("container-for-"+e)),document.getElementById("container-for-"+e).scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"}),window.setTimeout(()=>{document.querySelector("#container-for-"+e+" input")?document.querySelector("#container-for-"+e+" input").focus():document.querySelector("#container-for-"+e+" textarea")&&document.querySelector("#container-for-"+e+" textarea").focus()},400),t)return t.preventDefault(),!1},sideBarGrabDragInit:function(){const t=this.$refs.editLeftMenuFixed;t.style.cursor="grab";let e={top:0,left:0,x:0,y:0};const i=function(i){t.style.cursor="grabbing",t.style.userSelect="none",e={left:t.scrollLeft,top:t.scrollTop,x:i.clientX,y:i.clientY},document.addEventListener("mousemove",a),document.addEventListener("mouseup",o)},a=function(i){const a=i.clientX-e.x,o=i.clientY-e.y;t.scrollTop=e.top-o,t.scrollLeft=e.left-a},o=function(){t.style.cursor="grab",t.style.removeProperty("user-select"),document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",o)};t.addEventListener("mousedown",i);const r=this.$refs.editRightMenuFixed;r.style.cursor="grab";let s={top:0,left:0,x:0,y:0};const l=function(e){r.style.cursor="grabbing",r.style.userSelect="none",s={left:t.scrollLeft,top:t.scrollTop,x:e.clientX,y:e.clientY},document.addEventListener("mousemove",n),document.addEventListener("mouseup",c)},n=function(t){const e=t.clientX-s.x,i=t.clientY-s.y;r.scrollTop=s.top-i,r.scrollLeft=s.left-e},c=function(){r.style.cursor="grab",r.style.removeProperty("user-select"),document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",c)};r.addEventListener("mousedown",l)},loadProfileOntologyLookupsBuild:function(){Object.keys(this.activeProfile.rt).forEach(t=>
1{Object.keys(this.activeProfile.rt[t].pt).forEach(e=>{-1==this.ontologyLookupTodo.indexOf(this.activeProfile.rt[t].pt[e].propertyURI)&&this.ontologyLookupTodo.push(this.activeProfile.rt[t].pt[e].propertyURI)})}),this.loadProfileOntologyLookupsRequest()},loadProfileOntologyLookupsRequest:function(){if(this.ontologyLookupTodo.length>0){let t=this.ontologyLookupTodo.pop();this.$store.dispatch("fetchOntology",{self:this,uri:t}).then(()=>{this.loadProfileOntologyLookupsRequest()})}},returnOpacFormat:function(t){let e=[];try{let i=Object.keys(t).filter(t=>-1==t.indexOf("@"));if(i.length>0&&t[i[0]]){t=t[i[0]][0],Object.keys(t).forEach(i=>{if(!i.startsWith("@")){let a=!1;if("string"===typeof t[i])return e.push(t[i]),void(a=!0);for(let o of t[i])Object.keys(o).forEach(t=>{if(t.startsWith("@"))"@context"==t&&o[t].title&&-1==e.indexOf(o[t].title)&&(e.push(o[t].title),a=!0);else if("string"==typeof o[t])e.push(o[t]),a=!0;else if(Array.isArray(o[t]))for(let i of o[t])Object.keys(i).forEach(t=>{t.includes("@")||"string"==typeof i[t]&&(e.push(i[t]),a=!0)})}),a||o["@id"]&&e.push(o["@id"])}}),0==e.length&&t["@id"]&&e.push(t["@id"]),e=[...new Set(e)];for(let t of e)t=t.replace(/&amp;/g,"&")}}catch{return"error"}return e},liHasData:function(t){return Object.keys(t.userValue).length>0||!!(t.valueConstraint&&t.valueConstraint.defaults&&t.valueConstraint.defaults.length>0)}}},me=fe,ge=(i("d572"),Object(c["a"])(me,At,Nt,!1,null,null,null)),be=ge.exports,ve=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("EditNavToolBar",{ref:"navToolBar",attrs:{forceComponentRedraw:t.forceComponentRedraw}}),i("Keypress",{attrs:{"key-event":"keydown","key-code":40},on:{success:function(e){return t.moveDown(e)}}}),i("Keypress",{attrs:{"key-event":"keydown","key-code":39},on:{success:function(e){return t.moveRight(e)}}}),i("Keypress",{attrs:{"key-event":"keydown","key-code":37},on:{success:function(e){return t.moveLeft(e)}}}),i("Keypress",{attrs:{"key-event":"keydown","key-code":38},on:{success:function(e){return t.moveUp(e)}}}),i("Keypress",{attrs:{"key-event":"keydown","key-code":34},on:{success:t.movePageDown}}),i("Keypress",{attrs:{"key-event":"keydown","key-code":33},on:{success:t.movePageUp}}),i("Keypress",{attrs:{"key-event":"keydown","multiple-keys":[{keyCode:187,modifiers:["ctrlKey","shiftKey"],preventDefault:!0}]},on:{success:t.dupeProperty}}),i("Keypress",{attrs:{"key-event":"keydown","multiple-keys":[{keyCode:88,modifiers:["ctrlKey","shiftKey"],preventDefault:!0}]},on:{success:t.togglePreview}}),i("Keypress",{attrs:{"key-event":"keydown","multiple-keys":[{keyCode:80,modifiers:["ctrlKey","shiftKey"],preventDefault:!0}]},on:{success:t.publish}}),i("Keypress",{attrs:{"key-event":"keydown","key-code":27},on:{success:t.escapeKey}}),i("div",{staticClass:"resources-grid"},[t.profilesLoaded&&t.activeProfile&&t.activeProfile.rtOrder?t._l(t.activeProfile.rtOrder.filter((function(t){return!t.includes(":Item")})),(function(e,a){return i("div",{key:e+t.keyCounter},[1!=t.activeProfile.rt[e].noData?i("div",{class:["container-"+e.split(":").slice(-1)[0].split("-")[0]],style:{"background-color":t.returnContainerBGColor(e)}},[i("div",{staticStyle:{display:"flex","max-height":"2em",height:"2em"}},[i("div",{staticStyle:{flex:"0"}},[e.includes("Instance")?i("div",{staticClass:"temp-icon-instance",staticStyle:{height:"1.75em",width:"2em","margin-left":"1.5em"}}):t._e(),"Work"==e.split(":").slice(-1)[0]?i("svg",{attrs:{width:"3em",height:"2.5em",version:"1.1",xmlns:"http://www.w3.org/2000/svg"}},[i("circle",{attrs:{fill:"#7badad",cx:"1.5em",cy:"1em",r:"0.75em"}})]):t._e(),e.includes(":Item")?i("div",{staticStyle:{display:"inline-block",width:"26px","margin-left":"25px","margin-right":"5px"}},[i("svg",{attrs:{viewBox:"0 0 50 72",version:"1.1",xmlns:"http://www.w3.org/2000/svg"}},[i("rect",{staticStyle:{fill:"#eaeaea","stroke-width":"0.5",stroke:"rgb(0,0,0)"},attrs:{width:"50px",height:"50px"}})])]):t._e(),e.endsWith(":Hub")?i("div",{staticStyle:{height:"15px",display:"inline-block",width:"26px","margin-left":"25px","margin-right":"5px"}},[i("svg",{attrs:{width:"50px",height:"40px",version:"1.1",viewBox:"25 0 100 100",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{fill:"royalblue",d:"m62.113 24.66 1.9023-15.238 18.875 32.691-7.5469 20.004 15.238 1.9023-32.691 18.875-20.004-7.5469-1.9023 15.238-18.875-32.691 7.5469-20.004-15.238-1.9023 32.691-18.875zm-17.684 15.695-4.0781 15.215 15.215 4.0781 4.0781-15.215z","fill-rule":"evenodd"}})])]):t._e()]),i("div",{staticStyle:{"flex-basis":"auto","font-size":"1.25em","font-weight":"bold","text-align":"left"}},[t._v(t._s(e.split(":").slice(-1)[0]))]),i("div",{staticStyle:{flex:"1","text-align":"right","line-height":"1.25em"}},[t._v(t._s(t.activeProfile.rt[e].URI.replace("http://id.loc.gov","").replace("https://id.loc.gov","")))])]),i("div",{staticClass:"resources-grid-field-list "},[t._l(t.activeProfile.rt[e].ptOrder,(function(o,r){return[!0===t.displayComponentCheck(t.activeProfile.rt[e].pt[o])?[i("div",{key:o+"_"+r+"_"+t.keyCounter,class:["resources-grid-field-list-property","enriched-menu-spreadsheet","navable-level-"+r,"navable-col-1","navable-"+a+"-0-"+r],attrs:{id:"navable-"+a+"-0-"+r+"-0","data-mainrow":r}},[t._v(" "+t._s(t.returnPropertyShortName(t.activeProfile.rt[e].pt[o].propertyURI))+" "),i("div",{staticClass:"enriched-menu-control
1s-spreadsheet"},[i("button",{attrs:{title:"Add Blank Component"},on:{click:function(i){return t.addProperty(i,e,o)}}},[i("svg",{attrs:{width:"25px",height:"25px",version:"1.1",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{staticClass:"enriched-menu-icon-spreadsheet",attrs:{d:"m50 2.6797c-26.082 0-47.395 21.23-47.395 47.32 0 26.082 21.238 47.32 47.395 47.32 26.082 0 47.32-21.234 47.32-47.32 0-26.082-21.234-47.32-47.32-47.32zm0 10.996c20.039 0 36.324 16.289 36.324 36.324 0 20.039-16.289 36.324-36.324 36.324-20.039 0-36.324-16.289-36.324-36.324 0-20.039 16.289-36.324 36.324-36.324zm0 9.625c-3.0117 0-5.5352 2.5234-5.5352 5.5352v15.164h-15.16c-3.0117 0-5.5391 2.5234-5.5391 5.5352 0 3.0156 2.5234 5.5352 5.5391 5.5352h15.16v15.16c0 3.0117 2.5234 5.5352 5.5352 5.5352s5.5352-2.5234 5.5352-5.5352v-15.16h15.16c3.0117 0 5.5391-2.5234 5.5391-5.5352 0-3.0156-2.5938-5.457-5.5391-5.457h-15.16v-15.242c0-3.0117-2.5234-5.5352-5.5352-5.5352z"}})])]),i("button",{attrs:{title:"Remove Component"},on:{click:function(i){return t.removeProperty(e,o)}}},[i("svg",{attrs:{width:"25px",height:"25px",version:"1.1",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"}},[i("g",[i("path",{staticClass:"enriched-menu-icon-spreadsheet",attrs:{d:"m50 0c-27.613 0-50 22.387-50 50s22.387 50 50 50 50-22.387 50-50-22.387-50-50-50zm0 90c-22.059 0-40-17.941-40-40s17.941-40 40-40 40 17.941 40 40-17.941 40-40 40z"}}),i("path",{staticClass:"enriched-menu-icon-spreadsheet",attrs:{d:"m71.613 36.719c0-2.2109-0.875-4.3281-2.4414-5.8945-1.5625-1.5664-3.6797-2.4414-5.8945-2.4414s-4.3281 0.87891-5.8945 2.4414l-8.25 8.25-8.25-8.25c-1.5625-1.5625-3.6797-2.4414-5.8945-2.4414-2.207 0.003907-4.3164 0.87891-5.8828 2.4453-1.5625 1.5625-2.4375 3.6836-2.4375 5.8906 0 2.2109 0.87891 4.3281 2.4414 5.8945l8.25 8.25-8.25 8.25c-1.5625 1.5586-2.4414 3.6758-2.4414 5.8867s0.875 4.3281 2.4414 5.8945c1.5625 1.5625 3.6797 2.4375 5.8906 2.4375s4.3281-0.87891 5.8945-2.4414l8.25-8.25 8.25 8.25c1.5586 1.5625 3.6758 2.4414 5.8867 2.4414s4.3281-0.875 5.8945-2.4414c1.5664-1.5625 2.4414-3.6797 2.4414-5.8945s-0.87891-4.3281-2.4414-5.8945l-8.25-8.25 8.25-8.25c1.5625-1.5547 2.4375-3.6719 2.4375-5.8828z"}})])])]),i("button",{attrs:{title:"Duplicate Component"},on:{click:function(i){return t.addProperty(i,e,o,!0)}}},[i("svg",{attrs:{width:"25px",height:"25px",version:"1.1",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"}},[i("g",[i("path",{staticClass:"enriched-menu-icon-spreadsheet",attrs:{d:"m79.5 31.801h-43.398c-1.8008 0-3.3008 1.5-3.3008 3.3008v43.5c0 1.8008 1.5 3.3008 3.3008 3.3008h43.5c1.8008 0 3.3008-1.5 3.3008-3.3008l-0.003906-43.5c-0.097657-1.8008-1.5-3.3008-3.3984-3.3008z"}}),i("path",{staticClass:"enriched-menu-icon-spreadsheet",attrs:{d:"m67.199 29.801v-7.5c0-2.3008-1.8008-4.1016-4.1016-4.1016h-41.797c-2.3008 0-4.1016 1.8984-4.1016 4.1016v41.801c0 2.3008 1.8008 4.1016 4.1016 4.1016h9.5v-33.102c0-2.8984 2.3984-5.3008 5.3008-5.3008z"}})])])]),t.canSendToInstance(t.activeProfile.rt[e].pt[o].propertyURI,e)?i("button",{attrs:{title:"Send To Instance"},on:{click:function(i){return t.sendToInstance(i,e,o,t.activeProfile.rt[e].pt[o])}}},[i("svg",{attrs:{width:"25px",height:"25px",version:"1.1",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{staticClass:"enriched-menu-icon-spreadsheet",attrs:{d:"m100 50-100-44.414 9.4961 37.988 34.918 6.4258-34.918 6.4258-9.4961 37.988z","fill-rule":"evenodd"}})])]):t._e()])]),1!=t.activeProfile.rt[e].pt[o].deleted?i("CompactEditMainComponent",{key:"component"+r+"_"+t.keyCounter,class:["resources-grid-field-list-value","navable-level-"+r,"navable-col-2"],attrs:{componentIdx:1,rowIdx:r,setNavAfterClick:t.setNavAfterClick,resourceIdx:a,isMini:!1,parentURI:t.activeProfile.rt[e].URI,activeTemplate:t.activeProfile.rt[e].pt[o],profileName:e,profileCompoent:o,topLevelComponent:!0,ptGuid:t.activeProfile.rt[e].pt[o]["@guid"],parentStructure:t.activeProfile.rtOrder,structure:t.activeProfile.rt[e].pt[o]},on:{showMiniEditorEdit:t.showMiniEditorClick}}):t._e()]:t._e()]}))],2),e.includes(":Instance")?t._l(t.activeProfile.rtOrder.filter((function(t){return t.includes(":Item")})),(function(o){return i("div",{key:o+"_"+t.keyCounter,style:{"background-color":"#ececec"}},[t.activeProfile.rt[o].itemOf==t.activeProfile.rt[e].URI?i("div",{staticStyle:{"margin-top":"1em"}},[i("div",{staticStyle:{display:"flex","max-height":"2em",height:"2em"}},[i("div",{staticStyle:{flex:"0"}},[o.includes(":Item")?i("div",{staticStyle:{display:"inline-block",width:"26px","margin-left":"25px","margin-right":"5px"}},[i("svg",{attrs:{viewBox:"0 0 50 72",version:"1.1",xmlns:"http://www.w3.org/2000/svg"}},[i("rect",{staticStyle:{fill:"#eaeaea","stroke-width":"0.5",stroke:"rgb(0,0,0)"},attrs:{width:"50px",height:"50px"}})])]):t._e()]),i("div",{staticStyle:{"flex-basis":"auto","font-size":"1.25em","font-weight":"bold","text-align":"left"}},[t._v(t._s(o.split(":").slice(-1)[0]))]),i("div",{staticStyle:{flex:"1","text-align":"right","line-height":"1.25em"}},[t._v(t._s(t.activeProfile.rt[o].URI.replace("http://id.loc.gov","").replace("https://id.loc.gov","")))])])]):t._e(),i("div",{key:"resources-grid-field-list_"+o+"_"+t.keyCounter,staticClass:"resources-grid-field-list"},[t._l(t.activeProfile.rt[o].ptOrder,(function(r,s){return[!0===t.displayComponentCheck(t.activeProfile.rt[o].pt[r])?[i("div",{key:t.activeProfile.rt[e].ptOrder.length+s+"_"+t.keyCounter,class:["resources-grid-field-list-property","navable-level-"+t.activeProfile.rt[e].ptOrder.length+s,"navable-col-1","navable-"+a+"-0-"+(t.activeProfile.rt[e].ptOrder.length+s)],attrs:{id:"navable-"+a+"-0-"+(t.activeProfile.rt[e].ptOrder.length+s)+"-0","data-mainrow":t.activeProfile.rt[e].ptOrder.length+s}},[t._v(" "+t._s(t.returnPropertyShortName(t.activeProfile.rt[o].pt[r].propertyURI))+" ")]),1!=t.activeProfile.rt[o].pt[r].deleted?i("CompactEditMainComponent",{key:"c
1omponent"+s+"_"+t.keyCounter,class:["resources-grid-field-list-value","navable-level-"+s,"navable-col-2"],attrs:{componentIdx:1,rowIdx:t.activeProfile.rt[e].ptOrder.length+s,setNavAfterClick:t.setNavAfterClick,resourceIdx:a,isMini:!1,parentURI:t.activeProfile.rt[o].URI,activeTemplate:t.activeProfile.rt[o].pt[r],profileName:o,profileCompoent:r,topLevelComponent:!0,ptGuid:t.activeProfile.rt[o].pt[r]["@guid"],parentStructure:t.activeProfile.rtOrder,structure:t.activeProfile.rt[o].pt[r]},on:{showMiniEditorEdit:t.showMiniEditorClick}}):t._e()]:t._e()]}))],2)])})):t._e()],2):t._e()])})):t._e()],2),t.sendToTempDispaly?i("div",{attrs:{id:"send-to-modal"}},[i("ul",t._l(t.activeProfile.rtOrder,(function(e){return i("li",{key:e,on:{click:function(i){return t.sendToSendIt(e)}}},[t._v(t._s(e))])})),0),i("button",{staticStyle:{position:"absolute",bottom:"5px",right:"5px"},on:{click:function(e){t.sendToTempDispaly=!1}}},[t._v("Close")])]):t._e()],1)},ye=[],we=i("c4eb"),ke={name:"EditCompact",components:{CompactEditMainComponent:we["default"],EditNavToolBar:he,Keypress:()=>i.e("chunk-2d0ba165").then(i.bind(null,"365a"))},computed:Object(s["b"])({profilesLoaded:"profilesLoaded",profiles:"profiles",sartingPoint:"sartingPoint",activeInput:"activeInput",activeProfile:"activeProfile",activeComponent:"activeComponent",activeProfileName:"activeProfileName",activeProfileMini:"activeProfileMini",activeEditCounter:"activeEditCounter",activeRecordSaved:"activeRecordSaved",diagramMiniMap:"diagramMiniMap",disableMacroKeyNav:"disableMacroKeyNav",catInitials:"catInitials",workingOnMiniProfile:"workingOnMiniProfile"}),created:async function(){if(this.profilesLoaded)if(console.log("this.activeProfile.eId",this.activeProfile.eId),!this.activeProfile.eId&&this.$route.params.recordId){let t=await b["a"].loadRecordFromBackend(this.$route.params.recordId);this.$store.dispatch("setActiveRecordSaved",{self:this},!1),this.$store.dispatch("setActiveProfile",{self:this,profile:t}).then(()=>{this.$nextTick(()=>{this.loadProfileOntologyLookupsBuild()}),console.log("-----diagramMiniMap:",this.diagramMiniMap)})}else console.log("ACtive proifiel:",this.activeProfile),this.$nextTick(()=>{this.loadProfileOntologyLookupsBuild()});else this.$store.dispatch("fetchProfiles",{self:this}).then(async()=>{if(console.log(this.$route.params.recordId),console.log("activeProfile",this.activeProfile),!this.activeProfile.eId&&this.$route.params.recordId){let t=await b["a"].loadRecordFromBackend(this.$route.params.recordId);this.$store.dispatch("setActiveUndo",{self:this,msg:"Loaded record"}).then(()=>{this.$store.dispatch("forceSave",{self:this},!0).then(()=>{this.$store.dispatch("setActiveRecordSaved",{self:this},!0).then(()=>{})})}),this.$store.dispatch("setActiveProfile",{self:this,profile:t}).then(()=>{this.loadProfileOntologyLookupsBuild(),console.log("activeProfile",this.activeProfile)})}else this.loadProfileOntologyLookupsBuild()});this.$nextTick(()=>{setTimeout(()=>{let t=document.getElementById(`navable-${this.navableResource}-${this.navableCol}-${this.navableRow}-${this.navableComponent}`);console.log(t),t&&t.classList.add("navable-active")},750),window.addEventListener("scroll",()=>{if(this.lastMouseY<=75&&(this.headerState="deployed"),"deployed"==this.headerState)return this.$refs.header&&(this.$refs.header.classList.remove("retracted"),this.$refs.header.classList.remove("inital"),this.$refs.header.classList.add("deployed")),!1;window.pageYOffset>5?(this.headerState="retracted",this.$refs.header&&(this.$refs.header.classList.remove("inital"),this.$refs.header.classList.remove("deployed"),this.$refs.header.classList.add("retracted"))):window.pageYOffset<=5&&(this.$refs.header&&(this.$refs.header.classList.remove("retracted"),this.$refs.header.classList.remove("deployed"),this.$refs.header.classList.add("inital")),this.headerState="inital")}),window.addEventListener("mousemove",t=>{this.lastMouseY=t.y,t.y<75?"retracted"==this.headerState&&(this.$refs.header&&(this.$refs.header.classList.remove("retracted"),this.$refs.header.classList.remove("inital"),this.$refs.header.classList.add("deployed")),this.headerState="deployed"):t.y>75&&"deployed"==this.headerState&&(this.headerState="retracted",this.$refs.header&&(this.$refs.header.classList.remove("inital"),this.$refs.header.classList.remove("deployed"),this.$refs.header.classList.add("retracted")))})})},mounted:function(){},updated:function(){},data:function(){return{labels:jt["a"],ontologyLookupTodo:[],displayPreview:!1,xmlPreview:"Lo
1ading...",showPostModal:!1,showPostModalErrorMsg:!1,resourceLinks:[],headerState:"inital",activeMiniMap:{URI:null},miniMapActionValue:"Actions",displayMiniEditor:!1,displayMiniEditorKey:12345,lastMouseY:10,sourceLaunchId:null,sourceOfMiniComponent:null,displayLiteralLanguage:!1,keyCounter:0,color:"black",navableResource:0,navableCol:0,navableRow:0,navableComponent:0,sendToTemp:{},sendToTempDispaly:!1}},methods:{prettifyXml:Vt["a"].prettifyXml,movePageDown:Vt["a"].globalMovePageDown,movePageUp:Vt["a"].globalMovePageUp,dupeProperty:Vt["a"].dupeProperty,addProperty:function(t,e,i,a){a||(a=!1),console.log(t,e,i,a),this.$store.dispatch("duplicateProperty",{self:this,id:i,profile:e,dupeData:a}).then(()=>{}),this.keyCounter++,t.stopPropagation()},removeProperty:function(t,e){const i=window.confirm("Are you sure you want to remove the property?");if(!i)return!1;this.$store.dispatch("removeProperty",{self:this,id:e,profile:t}).then(()=>{}),this.keyCounter++},sendToSendIt(t){t!=this.sendToTemp.profileName&&this.$store.dispatch("sendToInstance",{self:this,from:this.sendToTemp,to:t}).then(async()=>{}),this.sendToTempDispaly=!1,this.keyCounter++},sendToInstance(t,e,i,a){console.log(e,i,a),this.sendToTemp={profile:e,componet:i,data:a},this.sendToTempDispaly=!0,t.stopPropagation()},canSendToInstance:function(t,e){return!(!e.includes(":Work")||"http://id.loc.gov/ontologies/bibframe/contribution"!=t)},setNavAfterClick:function(t){let e=t.replace("navable-","").split("-");if(console.log(e),e.length<3)return!1;this.navableResource=parseInt(e[0]),this.navableCol=parseInt(e[1]),this.navableRow=parseInt(e[2]),e[3].includes(".")?this.navableComponent=parseFloat(e[3]):this.navableComponent=parseInt(e[3]),console.log(`navable-${this.navableResource}-${this.navableCol}-${this.navableRow}-${this.navableComponent}`);let i=document.getElementById(`navable-${this.navableResource}-${this.navableCol}-${this.navableRow}-${this.navableComponent}`);i&&(Array.from(document.querySelectorAll(".navable-active")).forEac
1h(t=>t.classList.remove("navable-active")),this.$nextTick(()=>{i.classList.add("navable-active")}))},forceComponentRedraw:function(){console.log("do something to refresh here")},returnContainerBGColor:function(t){return console.log(t),t.includes(":Work")?"#deeaea73":t.includes(":Instance")?"whitesmoke":t.includes(":Item")?"rgb(234, 234, 234)":"white"},returnPropertyShortName:function(t){return t=t.replace("http://id.loc.gov/ontologies/bibframe/",""),t=t.replace("http://id.loc.gov/ontologies/bflc/","bflc:"),t=t.replace("http://www.w3.org/2000/01/rdf-schema#","rdfs:"),t},moveDown:function(t){if(this.disableMacroKeyNav)return!1;let e=this.navableResource,i=this.navableCol,a=this.navableRow,o=this.navableComponent;if(0==i)a+=1,o=0;else if(1==i){o+=.1;let t=[];if([...Array(40)].forEach((r,s)=>{let l=.1*s;l=Math.round(10*l)/10;let n=Math.round(10*(o+l))/10,c=`navable-${e}-${i}-${a}-${n}`;document.getElementById(c)&&(console.log("Looking for",c,document.getElementById(c)),t.push(n))}),t.length>0)o=t[0];else{let t=!1;[...Array(10)].forEach(()=>{if(t)return!1;a+=1,console.log("navableRow",a),o=0;let r=[];[...Array(40)].forEach((t,s)=>{let l=.1*s;l=Math.round(10*l)/10;let n=Math.round(10*(o+l))/10;document.getElementById(`navable-${e}-${i}-${a}-${n}`)&&(console.log("Looking for",`navable-${e}-${i}-${a}-${n}`,document.getElementById(`navable-${e}-${i}-${a}-${n}`)),r.push(n))}),r.length>0?(o=r[0],t=!0):console.warn("No next component found in the next row MoveDown")})}}let r=document.getElementById(`navable-${e}-${i}-${a}-${o}`);return r&&(Array.from(document.querySelectorAll(".navable-active")).forEac
1h(t=>t.classList.remove("navable-active")),this.$nextTick(()=>{r.classList.add("navable-active")}),r.focus(),this.navableRow=a,this.navableComponent=o),t.event.preventDefault(),!1},moveUp:function(t){if(this.disableMacroKeyNav)return!1;let e=this.navableResource,i=this.navableCol,a=this.navableRow,o=this.navableComponent;if(0==i)a-=1,o=0;else if(1==i){o-=.1;let t=[];if([...Array(40)].forEach((r,s)=>{let l=.1*s;l=Math.round(10*l)/10;let n=Math.round(10*(o-l))/10;document.getElementById(`navable-${e}-${i}-${a}-${n}`)&&(console.log("Looking for",n,`navable-${e}-${i}-${a}-${n}`,document.getElementById(`navable-${e}-${i}-${a}-${n}`)),t.push(n))}),t.length>0)o=t[0];else{let t=!1;[...Array(10)].forEach(()=>{if(t)return!1;a-=1,o=20;let r=[];[...Array(1e3)].forEach((t,s)=>{let l=.1*s;l=Math.round(10*l)/10;let n=Math.round(10*(o-l))/10;document.getElementById(`navable-${e}-${i}-${a}-${n}`)&&(console.log("Looking for",n,`navable-${e}-${i}-${a}-${n}`,document.getElementById(`navable-${e}-${i}-${a}-${n}`)),r.push(n))}),r.length>0?(o=r[0],t=!0):console.warn("No previous component found in the next row MoveUp")})}console.log(`navable-${e}-${i}-${a}-${o}`)}let r=document.getElementById(`navable-${e}-${i}-${a}-${o}`);return r&&(Array.from(document.querySelectorAll(".navable-active")).forEac
1h(t=>t.classList.remove("navable-active")),this.$nextTick(()=>{r.classList.add("navable-active")}),r.focus(),this.navableRow=a,this.navableComponent=o),t.event.preventDefault(),!1},moveRight:function(t){if(this.disableMacroKeyNav)return!1;let e=this.navableResource,i=this.navableCol,a=this.navableRow,o=this.navableComponent;if(0==i){i+=1,o=0;let t=[];[...Array(40)].forEach((r,s)=>{let l=.1*s;l=Math.round(10*l)/10;let n=Math.round(10*(o+l))/10,c=`navable-${e}-${i}-${a}-${n}`;document.getElementById(c)&&(console.log("Looking for",c,document.getElementById(c)),t.push(n))}),t.length>0&&(o=t[0])}else i=0,o=0,e+=1;let r=document.getElementById(`navable-${e}-${i}-${a}-${o}`);return console.log(`navable-${e}-${i}-${a}-${o}`,r),r&&(Array.from(document.querySelectorAll(".navable-active")).forEach(t=>t.classList.remove("navable-active")),this.$nextTick(()=>{r.focus(),r.classList.add("navable-active")}),this.navableRow=a,this.navableComponent=o,this.navableCol=i,this.navableResource=e),t.event.preventDefault(),!1},moveLeft:function(t){if(this.disableMacroKeyNav)return!1;let e=this.navableResource,i=this.navableCol,a=this.navableRow,o=this.navableComponent;1==i?i-=1:(i=1,e-=1),o=0;let r=[];[...Array(40)].forEach((t,s)=>{let l=.1*s;l=Math.round(10*l)/10;let n=Math.round(10*(o+l))/10,c=`navable-${e}-${i}-${a}-${n}`;document.getElementById(c)&&(console.log("Looking for",c,document.getElementById(c)),r.push(n))}),r.length>0&&(o=r[0]);let s=document.getElementById(`navable-${e}-${i}-${a}-${o}`);return s&&(Array.from(document.querySelectorAll(".navable-active")).forEac
1h(t=>t.classList.remove("navable-active")),this.$nextTick(()=>{s.focus(),s.classList.add("navable-active")}),this.navableRow=a,this.navableComponent=o,this.navableCol=i,this.navableResource=e),t.event.preventDefault(),!1},setActiveNavable:function(){},displayComponentCheck:function(t){return"http://id.loc.gov/ontologies/bibframe/hasItem"!=t.propertyURI&&("http://id.loc.gov/ontologies/bibframe/hasInstance"!=t.propertyURI&&"http://id.loc.gov/ontologies/bibframe/instanceOf"!=t.propertyURI)},toggleLiteralLanguage:function(){this.displayLiteralLanguage?this.displayLiteralLanguage=!1:(this.displayLiteralLanguage=!0,this.$nextTick(()=>{this.$refs.literalLanguageModal.refreshDisplay()}))},postAndUseMini:async function(){this.$refs.miniEditorHub.triggerSave();let t=await this.$refs.miniEditorHub.publish(),e={contextValue:!0,source:[],type:"Hub",variant:[],uri:t.useURI,typeFull:"http://id.loc.gov/ontologies/bibframe/Hub",title:t.useCreator+" "+t.useTitle,contributor:[],date:null,genreForm:null,nodeMap:{},precoordinated:!1,literal:!1};return this.$store.dispatch("setWorkingOnMiniProfile",{self:this,value:!1}).then(()=>{this.$store.dispatch("setContextManually",{self:this.sourceOfMiniComponent,context:e}).then(()=>{this.$store.dispatch("setValueComplex",{self:this.sourceOfMiniComponent,profileComponet:this.sourceOfMiniComponent.profileCompoent,template:this.sourceOfMiniComponent.activeTemplate,structure:this.sourceOfMiniComponent.structure,parentStructure:this.sourceOfMiniComponent.parentStructureObj}).then(()=>{this.sourceOfMiniComponent.checkForUserData()})})}),this.closeMiniEditor(),t},closeMiniEditor:function(){this.displayMiniEditor=!1,this.$store.dispatch("setWorkingOnMiniProfile",{self:this,value:!1}).then(()=>{this.sourceLaunchId&&document.getElementById(this.sourceLaunchId).focus()})},showMiniEditorClick:function(t){console.log("showMiniEditorClick"),this.showMiniEditor(t,()=>{this.closeMiniEditor(t),console.log("showMiniEditorClick 2"),this.showMiniEditor(t)})},showMiniEditor:function(t,e){this.displayMiniEditorKey="miniEditor-"+Date.now(),this.displayMiniEditor=!0,this.sourceLaunchId=t.sourceId,this.sourceOfMiniComponent=t.component,this.$store.dispatch("setWorkingOnMiniProfile",{self:this,value:!0}).then(()=>{if(this.profiles[t.useProfile]){let i=b["a"].loadNewTemplate(t.useProfile,this.catInitials);i.user=this.catInitials,console.log("-------"),console.log(i),console.log("-------"),this.$store.dispatch("setActiveProfile",{self:this,profile:i}).then(()=>{this.$nextTick(()=>{document.getElementsByClassName("selectable-input-mini")[0].focus(),e&&e()})})}else alert("Cannot find profile:",t.useProfile)})},cleanUpErrorResponse:function(t){return t=JSON.stringify(t,null,2),t=t.replace(/\\n|\\t/g,"").replace(/\\"/g,'"').replace(/&lt;/g,"<").replace(/&gt;/g,">"),t},miniMapAction:function(){"addItem"==this.miniMapActionValue&&(console.log(this.activeMiniMap.parent),this.$store.dispatch("addItem",{uri:this.activeMiniMap.URI}).then(()=>{console.log(this.activeProfile)})),"deleteItem"==this.miniMapActionValue&&this.$store.dispatch("deleteItem",{uri:this.activeMiniMap.URI}).then(()=>{}),"cloneInstance"==this.miniMapActionValue&&this.$store.dispatch("cloneInstance",{uri:this.activeMiniMap.URI}).then(()=>{}),"cloneItem"==this.miniMapActionValue&&this.$store.dispatch("duplicateItem",{uri:this.activeMiniMap.URI}).then(()=>{}),"deleteItem"==this.miniMapActionValue&&this.$store.dispatch("deleteItem",{uri:this.activeMiniMap.URI}).then(()=>{}),"deleteInstance"==this.miniMapActionValue&&this.$store.dispatch("deleteInstance",{uri:this.activeMiniMap.URI}).then(()=>{}),"addInstance"==this.miniMapActionValue&&this.$store.dispatch("addInstance",{uri:this.activeMiniMap.URI}).then(()=>{}),this.miniMapActionValue="Actions"},miniMapClick:function(t){let e=t.rt;(0==t.counter||t.counter>0)&&(e+="1");let i=e.replace(/\(|\)|\s|\/|:|\.|\|/g,"_")+t.jumpTo.replace(/\(|\)|\s|\/|:|\.|\|/g,"_");console.log(t),console.log(i),this.scrollFieldContainerIntoView(null,i),this.activeMiniMap=t},togglePreview:async function(){if(this.displayPreview)this.displayPreview=!1,this.xmlPreview="Lo
1ading...";else{let t=await Ft["a"].toBFXML(this.activeProfile);this.xmlPreview=t.xmlStringFormatted,this.displayPreview=!0}},escapeKey:function(){this.displayPreview&&(this.displayPreview=!1),this.showPostModal&&(this.showPostModal=!1)},publish:async function(){this.showPostModal=!0;let t=await Ft["a"].toBFXML(this.activeProfile),e=await w["a"].publish(t.xlmString,this.activeProfile.eId,this.activeProfile);this.showPostModalErrorMsg=!1,e.status?(this.activeProfile.status="published",this.$store.dispatch("setActiveProfile",{self:this,profile:this.activeProfile}).then(async()=>{this.resourceLinks=[],t=await Ft["a"].toBFXML(this.activeProfile),w["a"].saveRecord(t.xlmStringBasic,this.activeProfile.eId);for(let t in this.activeProfile.rt){let e=t.split(":").slice(-1)[0],i=k["a"].convertToRegionUrl(this.activeProfile.rt[t].URI),a=k["a"].returnUrls().env;this.resourceLinks.push({type:e,url:i,env:a})}})):this.showPostModalErrorMsg=JSON.parse(e.msg)},isProd:function(){return"dev"!=k["a"].returnUrls().env&&("staging"!=k["a"].returnUrls().env&&("production"==k["a"].returnUrls().env||void 0))},reportError:async function(t){let e=prompt("Please enter descripion of the problem");if(!e)return!1;let i=prompt("Your Email Address (Optional) ");const a=await fetch(k["a"].returnUrls().util+"error/report",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({eId:this.activeProfile.eId,desc:e,contact:i,activeProfile:this.activeProfile})}),o=await a.json();return o.result&&alert("Thanks!"),console.log(o),t.preventDefault(),!1},triggerSave:async function(){let t=await Ft["a"].toBFXML(this.activeProfile);w["a"].saveRecord(t.xlmStringBasic,this.activeProfile.eId),this.$store.dispatch("setActiveRecordSaved",{self:this},!0).then(()=>{})},restoreDelete:function(t,e,i){this.$store.dispatch("restoreProperty",{self:this,id:i,profile:e}).then(()=>{})},scrollFieldContainerIntoView:function(t,e){if(console.log("-----"),console.log(e),console.log(document.getElementById("container-for-"+e)),document.getElementById("container-for-"+e).scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"}),window.setTimeout(()=>{document.querySelector("#container-for-"+e+" input")&&document.querySelector("#container-for-"+e+" input").focus()},400),t)return t.preventDefault(),!1},loadProfileOntologyLookupsBuild:function(){Object.keys(this.activeProfile.rt).forEach(t=>{Object.keys(this.activeProfile.rt[t].pt).forEach(e=>{"http://id.loc.gov/ontologies/bibframe/title"==this.activeProfile.rt[t].pt[e].propertyURI&&-1==this.ontologyLookupTodo.indexOf(this.activeProfile.rt[t].pt[e].propertyURI)&&this.ontologyLookupTodo.push(this.activeProfile.rt[t].pt[e].propertyURI)})}),this.loadProfileOntologyLookupsRequest()},loadProfileOntologyLookupsRequest:function(){if(this.ontologyLookupTodo.length>0){console.log("this.ontologyLookupTodo",this.ontologyLookupTodo);let t=this.ontologyLookupTodo.pop();console.log("uri",t),this.$store.dispatch("fetchOntology",{self:this,uri:t}).then(()=>{this.loadProfileOntologyLookupsRequest()})}},liHasData:function(t){return Object.keys(t.userValue).length>0||!!(t.valueConstraint&&t.valueConstraint.defaults&&t.valueConstraint.defaults.length>0)}}},Se=ke,Ce=(i("7c23"),Object(c["a"])(Se,ve,ye,!1,null,null,null)),Le=Ce.exports,Ie=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{attrs:{id:"test-id"}},[i("ul",[i("li",{attrs:{id:"search-li"}},[t._v("Search Works On ID: "),i("input",{attrs:{value:"Woolf, Virginia, 1882-1941. To the lighthouse",autofocus:""},on:{keyup:t.search}})]),i("li",{attrs:{id:"profile-li"}},[t._v(" Use Resource Template: "),i("select",{on:{change:t.rtChange}},t._l(t.rtLookupWorks,(function(e){return i("option",{key:e,domProps:{selected:"lc:RT:bf2:Monograph:Work"===e}},[t._v(t._s(e))])})),0)]),t._l(t.idWorkSearchResults,(function(e,a){return i("li",{key:a},[i("button",{on:{click:function(i){return t.load(e.id,!1)}}},[t._v("Load")]),t._v(" "),i("button",{on:{click:function(i){return t.load(e.id,!0)}}},[t._v("Load & Edit")]),t._v(" - "),i("a",{attrs:{target:"_blank",href:e.id}},[t._v(t._s(e.label))])])}))],2),null!=t.transformResultsDisplay?i("div",{staticStyle:{padding:"2%"}},[i("h1",[t._v("Load Results:")]),i("div",{staticStyle:{"font-weight":"bold"}},[t._v(t._s(t.transformResultsDisplay.propertyLoadRatio)+"% properties assigned from data")]),i("div",{staticStyle:{"font-weight":"bold"}},[t._v("Unused XML:")]),i("code",{staticStyle:{"background-color":"whitesmoke"}},[i("pre",{staticStyle:{"background-color":"whitesmoke"}},[t._v(t._s(t.prettifyXml(t.transformResultsDisplay.unusedXml)))])]),i("hr"),t._l(t.transformResultsDisplay.propertyLoadReport,(function(e,a){return i("div",{key:a},[!1===e.status?i("h3",{staticStyle:{color:"red"}},[t._v(t._s(a))]):t._e(),!0===e.status?i("h3",{staticStyle:{color:"green"}},[t._v(t._s(a))]):t._e(),"mixed"===e.status?i("h3",{staticStyle:{color:"orange"}},[t._v(t._s(a))]):t._e(),!1!==e.status?i("div",[e.unAssingedProperties.length>0?i("div",[i("div",[t._v("Unassinged Properties:")]),t._l(e.unAssingedProperties,(function(e,a){return i("div",{key:a},[t._v(t._s(e))])}))],2):t._e(),t._l(e.data,(function(e,a){return i("div",{key:a},[i("div",[t._v(t._s(e.propertyLabel))]),i("code",{staticStyle:{"background-color":"whitesmoke"}},[i("pre",{staticStyle:{"background-color":"whitesmoke"}},[t._v(t._s(t.prettifyXml(e.xml)))])]),i("vue-json-pretty",{attrs:{path:"res",highlightMouseoverNode:!0,collapsedOnClickBrackets:!0,data:e.json}})],1)}))],2):t._e(),i("hr")])}))],2):t._e()])},_e=[],Te={name:"TestParseId",components:{},data:function(){return{}},computed:Object(s["b"])({profilesLoaded:"profilesLoaded",activeProfile:"activeProfile",idWorkSearchResults:"idWorkSearchResults",rtLookup:"rtLookup",profiles:"profiles",idXML:"idXML"}),methods:{},created:function(){}},xe=Te,Re=(i("724c"),Object(c["a"])(xe,Ie,_e,!1,null,null,null)),Ee=Re.exports,Me=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("div",{staticStyle:{display:"flex"}},[i("div",{staticStyle:{flex:"1"},attrs:{id:"test-id"}},[i("ul",[i("li",{attrs:{id:"search-li"}},[t._v("Search Works On ID: "),i("input",{attrs:{value:"Woolf, Virginia, 1882-1941. To the lighthouse",autofocus:""},on:{keyup:t.search}})]),i("li",{attrs:{id:"profile-li"}},[t._v(" Use Work Resource Template: "),i("select",{on:{change:t.rtChange}},t._l(t.rtLookupWorks,(function(e){return i("option",{key:e,domProps:{selected:"lc:RT:bf2:Monogra
1ph:Work"===e}},[t._v(t._s(e))])})),0)]),t._l(t.idWorkSearchResults,(function(e,a){return i("li",{key:a},[i("button",{on:{click:function(i){return t.load(e.id,!1)}}},[t._v("Load")]),t._v(" "),i("button",{on:{click:function(i){return t.load(e.id,!0)}}},[t._v("Load & Edit")]),t._v(" - "),i("a",{attrs:{target:"_blank",href:e.id}},[t._v(t._s(e.label))])])}))],2)]),i("div",{staticStyle:{flex:"1"},attrs:{id:"test-instance"}},[i("ul",[i("li",{attrs:{id:"search-li"}},[t._v("Search Instances On BFDB: "),i("input",{attrs:{value:"Woolf, Virginia, 1882-1941. To the lighthouse",autofocus:""},on:{keyup:t.search}})]),i("li",{attrs:{id:"search-li"}},[t._v("... Or: URI of BFDB Instance: "),i("input",{directives:[{name:"model",rawName:"v-model",value:t.instanceUri,expression:"instanceUri"}],attrs:{placeholder:"BFDB URL"},domProps:{value:t.instanceUri},on:{keyup:t.instanceUriChange,input:function(e){e.target.composing||(t.instanceUri=e.target.value)}}}),i("button",{on:{click:t.loadInstance}},[t._v("Load")])]),i("li",{attrs:{id:"profile-li"}},[t._v(" Use Instance Resource Template: "),i("select",{on:{change:t.rtChange}},t._l(t.rtLookupInstances,(function(e){return i("option",{key:e,domProps:{selected:"lc:RT:bf2:SoundRecording:Instance"===e}},[t._v(t._s(e))])})),0)]),t._l(t.idWorkSearchResults,(function(e,a){return i("li",{key:a},[i("button",{on:{click:function(i){return t.load(e.id,!1)}}},[t._v("Load")]),t._v(" "),i("button",{on:{click:function(i){return t.load(e.id,!0)}}},[t._v("Load & Edit")]),t._v(" - "),i("a",{attrs:{target:"_blank",href:e.id}},[t._v(t._s(e.label))])])}))],2)])]),null!=t.transformResultsDisplay?i("div",{staticStyle:{padding:"2%"}},[i("h1",[t._v("Load Results:")]),t._l(Object.keys(this.transformResults.rt),(function(e){return i("div",{key:e},[t._v(" "+t._s(e)+" "),i("div",{staticStyle:{"font-weight":"bold"}},[t._v(t._s(t.transformResultsDisplay.rt[e].propertyLoadRatio)+"% properties assigned from data")]),i("div",{staticStyle:{"font-weight":"bold"}},[t._v("Unused XML:")]),i("code",{staticStyle:{"background-color":"whitesmoke"}},[i("pre",{staticStyle:{"background-color":"whitesmoke"}},[t._v(t._s(t.prettifyXml(t.transformResultsDisplay.rt[e].unusedXml)))])]),i("hr"),t._l(t.transformResultsDisplay.rt[e].propertyLoadReport,(function(e,a){return i("div",{key:a},[!1===e.status?i("h3",{staticStyle:{color:"red"}},[t._v(t._s(a))]):t._e(),!0===e.status?i("h3",{staticStyle:{color:"green"}},[t._v(t._s(a))]):t._e(),"mixed"===e.status?i("h3",{staticStyle:{color:"orange"}},[t._v(t._s(a))]):t._e(),!1!==e.status?i("div",[e.unAssingedProperties.length>0?i("div",[i("div",[t._v("Unassinged Properties:")]),t._l(e.unAssingedProperties,(function(e,a){return i("div",{key:a},[t._v(t._s(e))])}))],2):t._e(),t._l(e.data,(function(e,a){return i("div",{key:a},[i("div",[t._v(t._s(e.propertyLabel))]),i("code",{staticStyle:{"background-color":"whitesmoke"}},[i("pre",{staticStyle:{"background-color":"whitesmoke"}},[t._v(t._s(t.prettifyXml(e.xml)))])]),i("vue-json-pretty",{attrs:{path:"res",highlightMouseoverNode:!0,collapsedOnClickBrackets:!0,data:e.json}})],1)}))],2):t._e(),i("hr")])}))],2)}))],2):t._e()])},Pe=[],De=i("d538"),Oe=i.n(De),Ue={name:"TestParseId",components:{VueJsonPretty:Oe.a},data:function(){return{useRtSelected:"lc:RT:bf2:Monograph:Work",useRtInstanceSelected:"lc:RT:bf2:SoundRecording:Instance",searchTimeout:null,transformResults:null,transformResultsDisplay:null,instanceUri:null}},computed:Object(s["b"])({profilesLoaded:"profilesLoaded",activeProfile:"activeProfile",idWorkSearchResults:"idWorkSearchResults",rtLookup:"rtLookup",profiles:"profiles",idXML:"idXML",prettyIDXML(t){return null===t.idXML||""===t.idXML?"":Vt["a"].prettifyXml(t.idXML)},rtLookupWorks(t){let e=[];for(let i of Object.keys(t.rtLookup))i.includes(":Work")&&e.push(i);return e},rtLookupInstances(t){let e=[];for(let i of Object.keys(t.rtLookup))i.includes(":Instance")&&e.push(i);return e}}),methods:{prettifyXml:Vt["a"].prettifyXml,search:function(t){window.clearTimeout(this.searchTimeout),this.searchTimeout=window.setTimeout(()=>{this.$store.dispatch("fetchIdWorkSearch",{self:this,searchValue:t.target.value}).then(()=>{})},500)},rtChange:function(t){this.useRtSelected=t.target.value},rtInstanceChange:function(t){this.useRtInstanceSelected=t.target.value},instanceUriChange:function(t){return t},loadInstance:function(){U["a"].parse(U["a"].testXmlInstance),console.log(U["a"]),console.log(this.useRtInstanceSelected);let t=null;for(let e in this.profiles)this.profiles[e].rtOrder.indexOf(this.useRtInstanceSelected)>-1&&(t=this.profiles[e]);console.log(t),this.transformResults=U["a"].transform(t),this.transformResultsDisplay=this.transformResults},load:function(t,e){this.$store.dispatch("fetchIdXML",{self:this,url:t}).then(()=>{O.parse(this.idXML);let t=null;for(let e in this.profiles)this.profiles[e].rtOrder.indexOf(this.useRtSelected)>-1&&(t=this.profiles[e]);this.transformResults=O.transform(t);let i=this.transformResults.rtOrder.filter(t=>t.includes(":Work"))[0];this.transformResultsDisplay=this.transformResults.rt[i],e&&this.$store.dispatch("setActiveProfile",{self:this,profile:this.transformResults}).then(()=>{this.$router.push({path:"edit"})})})}},created:function(){this.$store.dispatch("fetchProfiles",{self:this}).then(()=>{O.parse(),this.$store.dispatch("fetchIdWorkSearch",{self:this,searchValue:"Woolf, Virginia, 1882-1941. To the lighthouse"}).then(()=>{})})}},Ae=Ue,Ne=(i("9440"),Object(c["a"])(Ae,Me,Pe,!1,null,null,null)),Ve=Ne.exports,je=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("EditSubjectEditor")},$e=[],Ke=i("f7e4"),Fe={name:"TestSubject",components:{EditSubjectEditor:Ke["a"]}}
1,Be=Fe,He=Object(c["a"])(Be,je,$e,!1,null,null,null),Ge=He.exports,ze=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("EditMini",{attrs:{miniProfile:"Hub"}})},We=[],Je={name:"EditMiniTest",components:{EditMini:zt}},qe=Je,Xe=Object(c["a"])(qe,ze,We,!1,null,null,null),Ye=Xe.exports,Qe=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("EditLiteralEditor")},Ze=[],ti=i("dd73"),ei={name:"EditLiteralEditorTester",components:{EditLiteralEditor:ti["a"]}},ii=ei,ai=Object(c["a"])(ii,Qe,Ze,!1,null,null,null),oi=ai.exports,ri=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.inputValue,expression:"inputValue"}],ref:"textarea",attrs:{placeholder:"Enter Text Here",dir:"auto",id:"literal-editor-textarea"},domProps:{value:t.inputValue},on:{input:function(e){e.target.composing||(t.inputValue=e.target.value)}}}),i("select",{ref:"scriptShifterSelected",staticStyle:{"margin-left":"1em","margin-top":"1em","margin-right":"1em","font-size":"1.5em"},on:{change:function(e){return t.scriptShiftChange(e)}}},t._l(Object.keys(t.supportedScriptShifter),(function(e){return i("option",{key:e,domProps:{selected:e==t.scriptShifterDefault,value:e}},[t._v(t._s(t.supportedScriptShifter[e].name))])})),0),i("button",{on:{click:function(e){return t.scriptShift()}}},[t._v("Romanize")]),i("textarea",{ref:"output",staticStyle:{"margin-top":"1em"},attrs:{placeholder:"Romaization will appear here",dir:"auto",id:"literal-output-textarea"}})])},si=[],li={name:"ScriptShifter",components:{},data:function(){return{inputValue:"",scriptShifterDefault:!1,nonLatinRegex:/[^\u0000-\u024F\u1E00-\u1EFF\u2C60-\u2C7F\uA720-\uA7FF]/g,isNonLatin:!1}},computed:Object(s["b"])({profilesLoaded:"profilesLoaded",activeProfile:"activeProfile",idWorkSearchResults:"idWorkSearchResults",rtLookup:"rtLookup",profiles:"profiles",contextData:"contextData",supportedRomanizations:"supportedRomanizations",supportedScriptShifter:"supportedScriptShifter"}),created:async function(){console.log("HEY"),null!==localStorage.getItem("bfeScriptShifterDefault")&&(this.scriptShifterDefault=localStorage.getItem("bfeScriptShifterDefault"))},methods:{scriptShiftChange:function(t){localStorage.setItem("bfeScriptShifterDefault",t.target.value),this.scriptShifterDefault=t.target.value},scriptShift:async function(){let t=this.$refs.scriptShifterSelected.value,e="text="+this.$refs.textarea.value,i=await fetch(`${k["a"].returnUrls().scriptshifter}trans/${t}`,{method:"POST",headers:{Accept:"application/json, text/plain, */*","Content-Type":"application/x-www-form-urlencoded"},body:e}),a=await i.text();200!==i.status?alert(a):this.$refs.output.value=a}}},ni=li,ci=(i("b932"),Object(c["a"])(ni,ri,si,!1,null,"2ba6b322",null)),di=ci.exports,ui=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("table",[t._m(0),i("tbody",t._l(t.errors,(function(e){return i("tr",{key:e.id},[i("td",[t._v(t._s(e.eId))]),i("td",[t._v(t._s(e.desc))]),i("td",[t._v(t._s(e.contact))]),i("td",[i("a",{attrs:{target:"_blank",href:t.errorUrlBase+e.id+"?download=true"}},[t._v("Download")])]),i("td",{staticClass:"load",on:{click:function(i){return t.loadProfile(e.id)}}},[t._v("Load")])])})),0)])])},pi=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("thead",[i("th",[t._v("eId")]),i("th",[t._v("Desc")]),i("th",[t._v("Contact")]),i("th"),i("th")])}];const hi=i("82fd"),fi=hi("0123456789");var mi={name:"TestParseId",components:{},data:function(){return{errors:[]}},computed:Object(s["b"])({profilesLoaded:"profilesLoaded",activeProfile:"activeProfile",idWorkSearchResults:"idWorkSearchResults",rtLookup:"rtLookup",profiles:"profiles",idXML:"idXML",catInitials:"catInitials",errorUrlBase(){return k["a"].returnUrls().util+"error/"}}),methods:{async loadProfile(t){let e=await w["a"].returnError(t),i="e"+fi.new();i=i.substring(0,8),e.eId=i,e.user=this.catInitials,console.log(e),this.$store.dispatch("setActiveRecordSaved",{self:this},!1).then(()=>{}),this.$store.dispatch("setActiveProfile",{self:this,profile:e}).then(()=>{this.$router.push({path:"edit"})})}},created:async function(){this.errors=await w["a"].returnErrors(),this.profilesLoaded||this.$store.dispatch("fetchProfiles",{self:this}).then(()=>{})}},gi=mi,bi=(i("d5fc"),Object(c["a"])(gi,ui,pi,!1,null,null,null)),vi=bi.exports;a["a"].use(p["a"]);const yi=[{path:"/",name:"Home",component:Ut},{path:"/TestParseId",name:"TestParseId",component:Ee},{path:"/TestParseBfdb",name:"TestParseBfdb",component:Ve},{path:"/TestSubject",name:"TestSubject",component:Ge},{path:"/TestEditMini",name:"TestEditMini",component:Ye},{path:"/TestLiteralEditor",name:"TestLiteralEditor",component:oi},{path:"/ScriptShifter",name:"ScriptShifter",component:di}
1,{path:"/errors",name:"Errors",component:vi},{path:"/edit/:recordId",name:"Edit",component:be},{path:"/compactedit/:recordId",name:"CompactEdit",component:Le},{path:"/settings/:action",name:"Home",component:Ut},{path:"/:action",name:"Home",component:Ut}],wi=new p["a"]({mode:"history",base:"/classic/",routes:yi});var ki=wi,Si=i("718b");i("845f");a["a"].config.productionTip=!1;new a["a"]({router:ki,store:P["a"],render:t=>t(u)}).$mount("#app");a["a"].component("EditMainComponent",Si["default"]),b["a"].buildProfiles().then(t=>w["a"].fetchAllOntology(t)),null===localStorage.getItem("bfeDiacritics")&&localStorage.setItem("bfeDiacritics",JSON.stringify([{letter:"ç",trigger:"c",keycode:99,desc:"cedilla"},{letter:"é",trigger:"e",keycode:101,desc:"acute e"},{letter:"â",trigger:"1",keycode:49,desc:"circumflex a"},{letter:"ê",trigger:"2",keycode:50,desc:"circumflex e"},{letter:"î",trigger:"3",keycode:51,desc:"circumflex i"},{letter:"ô",trigger:"4",keycode:52,desc:"circumflex o"},{letter:"û",trigger:"5",keycode:53,desc:"circumflex u"},{letter:"à",trigger:"6",keycode:54,desc:"grave accent a"},{letter:"è",trigger:"7",keycode:55,desc:"grave accent e"},{letter:"ì",trigger:"8",keycode:56,desc:"grave accent i"},{letter:"ò",trigger:"9",keycode:57,desc:"grave accent o"},{letter:"ù",trigger:"0",keycode:48,desc:"grave accent u"},{letter:"ë",trigger:"z",keycode:122,desc:"trema e"},{letter:"ï",trigger:"x",keycode:120,desc:"trema i"},{letter:"ü",trigger:"v",keycode:118,desc:"trema u"}]))},"674a":function(t,e,i){},"6ae6":function(t,e,i){},"715b":function(t,e,i){},"718b":function(t,e,i){"use strict";i.r(e);var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"main-component-container"},[0==t.nested?i("div",{staticStyle:{display:"flex",position:"relative"},attrs:{id:t.profileName+"|"+t.profileCompoent}},[i("div",{staticStyle:{flex:"15"}},[t.hasDynamicTemplate()?[i("EditTemplateRefComponent",t._g({key:t.useKey,attrs:{ptGuid:t.ptGuid,parentURI:t.parentURI,isMini:t.isMini,structure:t.structure,parentStructureObj:t.parentStructureObj,parentStructure:t.parentStructure,nested:t.nested,level:t.levelPlusOne,propertyPath:t.buildPropertyPath(t.propertyPath),profileName:t.profileName,profileCompoent:t.profileCompoent,activeTemplate:t.activeTemplate}},t.$listeners))]:["meta"==t.returnLookupType(t.structure)?i("EditMetaComponent",{attrs:{isMini:t.isMini,ptGuid:t.ptGuid,parentURI:t.parentURI,nested:t.nested,structure:t.structure,profileName:t.profileName,level:t.levelPlusOne,propertyPath:t.buildPropertyPath(t.propertyPath),profileCompoent:t.profileCompoent,parentStructureObj:t.parentStructureObj,parentStructure:t.parentStructure,activeTemplate:t.activeTemplate}}):"literal"==t.structure.type||"literal-lang"==t.structure.type?i("EditLiteralComponent",{key:t.useKey,attrs:{isMini:t.isMini,ptGuid:t.ptGuid,parentURI:t.parentURI,nested:t.nested,structure:t.structure,level:t.levelPlusOne,propertyPath:t.buildPropertyPath(t.propertyPath),profileName:t.profileName,profileCompoent:t.profileCompoent,parentStructureObj:t.parentStructureObj,parentStructure:t.parentStructure,activeTemplate:t.activeTemplate}}):"simple"==t.returnLookupType(t.structure)?i("EditSimpleLookupComponent",{key:t.useKey,attrs:{ptGuid:t.ptGuid,isMini:t.isMini,parentURI:t.parentURI,structure:t.structure,parentStructureObj:t.parentStructureObj,parentStructure:t.parentStructure,nested:t.nested,level:t.levelPlusOne,propertyPath:t.buildPropertyPath(t.propertyPath),profileName:t.profileName,profileCompoent:t.profileCompoent,activeTemplate:t.activeTemplate}}):"complex"==t.returnLookupType(t.structure)?i("EditComplexLookupComponent",t._g({key:t.useKey,attrs:{isMini:t.isMini,ptGuid:t.ptGuid,parentURI:t.parentURI,structure:t.structure,parentStructureObj:t.parentStructureObj,parentStructure:t.parentStructure,nested:t.nested,level:t.levelPlusOne,propertyPath:t.buildPropertyPath(t.propertyPath),profileName:t.profileName,profileCompoent:t.profileCompoent,activeTemplate:t.activeTemplate},on:{updated:t.forceUpdate}},t.$listeners)):t.structure.valueConstraint.valueTemplateRefs.length>0?i("EditTemplateRefComponent",t._g({key:t.useKey,attrs:{isMini:t.isMini,ptGuid:t.ptGuid,parentURI:t.parentURI,structure:t.structure,parentStructureObj:t.parentStructureObj,parentStructure:t.parentStructure,nested:t.nested,level:t.levelPlusOne,propertyPath:t.buildPropertyPath(t.propertyPath),profileName:t.profileName,profileCompoent:t.profileCompoent,activeTemplate:t.activeTemplate}},t.$listeners)):t._e()]],2),0==t.settingsLeftMenuEnriched?[t.showDupeRemove()?i("div",{staticClass:"property-button-container"},[i("button",{staticClass:"property-button property-duplicate simptip-position-left",attrs:{tabindex:"-1","data-tooltip":t.labels.propertyDuplicateTip},on:{click:t.duplicateProperty}},[t._v(t._s(t.labels.propertyDuplicateSymbol))]),i("button",{staticClass:"property-button property-remove",attrs:{tabindex:"-1"},on:{click:t.removeProperty}},[t._v(t._s(t.labels.propertyRemoveSymbol))])]):t._e()]:t._e(),"compact"!=t.settingsDisplayMode?i("div",{staticClass:"debug-toggle",staticStyle:{position:"relative",visibility:"hidden",color:"red",left:"-26%","font-size":"0.85em","font-family":"monospace",top:"8px",cursor:"pointer",height:"0.85em"},on:{click:t.toggleDebug}}
1,[t._v("debug")]):t._e()],2):i("div",["literal"==t.structure.type||"literal-lang"==t.structure.type?i("EditLiteralComponent",{key:t.useKey,attrs:{isMini:t.isMini,ptGuid:t.ptGuid,parentURI:t.parentURI,activeTemplate:t.activeTemplate,nested:t.nested,level:t.levelPlusOne,propertyPath:t.buildPropertyPath(t.propertyPath),structure:t.structure,profileName:t.profileName,profileCompoent:t.profileCompoent,parentStructureObj:t.parentStructureObj,parentStructure:t.parentStructure}}):"simple"==t.returnLookupType(t.structure)?i("EditSimpleLookupComponent",{key:t.useKey,attrs:{ptGuid:t.ptGuid,isMini:t.isMini,parentURI:t.parentURI,activeTemplate:t.activeTemplate,structure:t.structure,parentStructureObj:t.parentStructureObj,parentStructure:t.parentStructure,nested:t.nested,level:t.levelPlusOne,propertyPath:t.buildPropertyPath(t.propertyPath),profileName:t.profileName,profileCompoent:t.profileCompoent}}):"complex"==t.returnLookupType(t.structure)?i("EditComplexLookupComponent",t._g({key:t.useKey,attrs:{isMini:t.isMini,ptGuid:t.ptGuid,parentURI:t.parentURI,activeTemplate:t.activeTemplate,structure:t.structure,parentStructureObj:t.parentStructureObj,parentStructure:t.parentStructure,nested:t.nested,level:t.levelPlusOne,propertyPath:t.buildPropertyPath(t.propertyPath),profileName:t.profileName,profileCompoent:t.profileCompoent},on:{updated:t.forceUpdate}},t.$listeners)):t.structure.valueConstraint.valueTemplateRefs.length>0?i("EditTemplateRefComponent",t._g({key:t.useKey,attrs:{isMini:t.isMini,ptGuid:t.ptGuid,parentURI:t.parentURI,activeTemplate:t.activeTemplate,structure:t.structure,level:t.levelPlusOne,propertyPath:t.buildPropertyPath(t.propertyPath),parentStructureObj:t.parentStructureObj,parentStructure:t.parentStructure,profileName:t.profileName,profileCompoent:t.profileCompoent,nested:t.nested}},t.$listeners)):t._e()],1),0==t.nested&&t.displayDebug?i("div",{staticStyle:{"font-family":"monospace",width:"69%","background-color":"whitesmoke","margin-left":"5%"}},[t.structure.xmlSource?i("code",[i("pre",[t._v(t._s(t.prettifyXml(t.structure.xmlSource)))])]):t._e(),i("vue-json-pretty",{attrs:{path:"res",highlightMouseoverNode:!0,collapsedOnClickBrackets:!0,data:t.structure}})],1):t._e()])},o=[],r=function(){var t=this,e=t.$createElement,i=t._self._c||e;return 0==t.nested&&0==t.hideField?i("div",{class:"component-container component-container-"+t.settingsDisplayMode},[i("Keypress",{attrs:{"key-event":"keydown","multiple-keys":[{keyCode:68,modifiers:["shiftKey","ctrlKey","altKey"],preventDefault:!1}]},on:{success:t.openDiacriticSelect}}),i("Keypress",{attrs:{"key-event":"keydown","multiple-keys":[{keyCode:86,modifiers:["shiftKey","ctrlKey","altKey"],preventDefault:!0}]},on:{success:t.openDiacriticSelect}}),i("div",{class:"component-container-title component-container-title-"+t.settingsDisplayMode},[t._v(t._s(t.structure.propertyLabel)+" "),i("EditLabelRemark",{attrs:{remark:t.structure.remark}})],1),i("div",{class:"component-container-input-container component-container-input-container-"+t.settingsDisplayMode},t._l(t.inputValue,(function(e,a){return i("div",{key:"input_"+a,class:"component-container-fake-input no-upper-right-border-radius no-lower-right-border-radius no-upper-border"},[i("div",{staticStyle:{display:"flex",position:"relative"}},[i("div",{staticStyle:{flex:"1"}},[i("form",{attrs:{autocomplete:"off"}},["compact"==t.settingsDisplayMode?i("div",{staticClass:"component-nested-container-title",staticStyle:{position:"absolute"}},[i("span",[t._v(t._s(t.structure.propertyLabel))])]):t._e(),t.isNoteField(t.structure.propertyLabel,e.value)?t._e():i("input",{directives:[{name:"model",rawName:"v-model",value:e.value,expression:"inputV.value"}],ref:"input_"+e.guid,refInFor:!0,class:["input-single",{"selectable-input":0==t.isMini,"selectable-input-mini":1==t.isMini,"input-accommodate-diacritics":t.containsNonLatinCodepoints(e.value)}],attrs:{bfeType:"EditLiteralComponent-unnested",id:t.assignedId+"_"+a,"data-guid":e.guid,name:t.assignedId,autocomplete:"off",type:"text"},domProps:{value:e.value},on:{keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.preventDefault(),t.submitField(e))},t.nav],focus:t.focused,blur:t.blured,keyup:function(i){return t.change(i,e)}
1,input:function(i){i.target.composing||t.$set(e,"value",i.target.value)}}}),t.isNoteField(t.structure.propertyLabel,e.value)?i("textarea",{directives:[{name:"model",rawName:"v-model",value:e.value,expression:"inputV.value"}],ref:"input_"+e.guid,refInFor:!0,class:["input-single","input-textarea-nested",{"selectable-input":0==t.isMini,"selectable-input-mini":1==t.isMini,"input-accommodate-diacritics-textarea":t.containsNonLatinCodepoints(e.value)}],staticStyle:{height:"36px"},attrs:{div:"auto",bfeType:"EditLiteralComponent-unnested",id:t.assignedId+"_"+a,"data-guid":e.guid,name:t.assignedId,autocomplete:"off",type:"text"},domProps:{value:e.value},on:{keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.preventDefault(),t.submitField(e))},t.nav],focus:t.focused,blur:t.blured,keyup:function(i){return t.change(i,e)},input:function(i){i.target.composing||t.$set(e,"value",i.target.value)}}}):t._e()])]),i("button",{staticClass:"temp-icon-keyboard fake-real-button simptip-position-top",attrs:{tabindex:"-1","data-guid":e.guid,"data-tooltip":"Diacritics [CTRL-ALT-D]"},on:{click:t.openDiacriticSelect}}),i("button",{staticClass:"temp-icon-expand fake-real-button simptip-position-top",attrs:{tabindex:"-1","data-guid":e.guid,"data-tooltip":"Editor [CTRL-ALT-SHIFT-V]"},on:{click:t.openEditor}})])])})),0),1==t.showDiacritics?i("div",{staticClass:"diacritic-modal"},[i("div",{staticStyle:{float:"right"}},[t._v("[x]")]),t._m(0),i("hr",{staticStyle:{margin:"2px"}}),i("div",{staticClass:"diacritic-list-holder"},[i("table",t._l(t.diacriticData,(function(e,a){return i("tr",{key:a,ref:"diacriticTable",refInFor:!0,attrs:{"data-id":a},on:{click:t.diacriticSelect}},[i("td",[i("span",{staticClass:"diacritic-modal-list-diacritic"},[t._v(t._s(e.letter))]),i("span",{staticStyle:{"padding-left":"2em"}},[t._v(t._s(e.desc))])]),i("td",[t._v(t._s(e.trigger))])])})),0)])]):t._e(),i("div",{class:["modaloverlay",{"modal-display":t.showEditor}],attrs:{id:t.assignedId}},[i("div",{class:["modal"]},[i("div",[i("div",{staticClass:"modal-content"},[i("EditLiteralEditor",{ref:"literalEditor",attrs:{initalValue:t.showEditorValue},on:{closeEditor:t.closeEditor,updateFromEditor:t.updateFromEditor}})],1)])])])],1):0==t.hideField?i("div",[i("Keypress",{attrs:{"key-event":"keydown","multiple-keys":[{keyCode:68,modifiers:["shiftKey","ctrlKey","altKey"],preventDefault:!0}]},on:{success:t.openDiacriticSelect}}),i("Keypress",{attrs:{"key-event":"keydown","multiple-keys":[{keyCode:86,modifiers:["shiftKey","ctrlKey","altKey"],preventDefault:!0}]},on:{success:t.openEditor}}),i("Keypress",{attrs:{"key-event":"keydown","multiple-keys":[{keyCode:90,modifiers:["shiftKey","ctrlKey","altKey"],preventDefault:!0}]},on:{success:t.addAnotherLiteral}}),t._l(t.inputValue,(function(e,a){return i("div",{key:"input_"+a,class:["component-container-fake-input no-upper-right-border-radius no-lower-right-border-radius no-upper-border",{"component-container-fake-input-note":t.isNoteField(t.structure.propertyLabel,e.value)}]},[i("div",{staticStyle:{display:"flex",position:"relative"}},[i("div",{staticStyle:{flex:"1"}},[i("form",{attrs:{autocomplete:"off"}},[i("div",{staticClass:"component-nested-container-title"},["compact"==t.settingsDisplayMode?i("span",[t._v(t._s(t.parentStructureObj.propertyLabel)+" -- ")]):t._e(),i("span",[t._v(t._s(t.structure.propertyLabel)+" "),i("EditLabelRemark",{attrs:{remark:t.structure.remark}}),t._v(" "),e.language?i("span",{staticClass:"lang-tag",on:{click:function(i){return t.jumpToLangWindow(e.guid)}}},[t._v(t._s(e.language))]):t._e()],1)]),t.isNoteField(t.structure.propertyLabel,e.value)?t._e():i("input",{directives:[{name:"model",rawName:"v-model",value:e.value,expression:"inputV.value"}],ref:"input_"+e.guid,refInFor:!0,class:["input-nested",{"selectable-input":0==t.isMini,"selectable-input-mini":1==t.isMini,"input-accommodate-diacritics":t.containsNonLatinCodepoints(e.value)}],attrs:{"data-guid":e.guid,bfeType:"EditLiteralComponent-nested",id:t.assignedId+"_"+a,name:t.assignedId,autocomplete:"off",type:"text"},domProps:{value:e.value},on:{keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.preventDefault(),t.submitField(e))},t.nav],focus:t.focused,blur:t.blured,keyup:function(i){return t.change(i,e)}
1,input:function(i){i.target.composing||t.$set(e,"value",i.target.value)}}}),t.isNoteField(t.structure.propertyLabel,e.value)?i("textarea",{directives:[{name:"model",rawName:"v-model",value:e.value,expression:"inputV.value"}],ref:"input_"+e.guid,refInFor:!0,class:["input-nested","input-textarea-nested",{"selectable-input":0==t.isMini,"selectable-input-mini":1==t.isMini,"input-accommodate-diacritics-textarea":t.containsNonLatinCodepoints(e.value)}],attrs:{dir:"auto","data-guid":e.guid,bfeType:"EditLiteralComponent-nested",id:t.assignedId+"_"+a,name:t.assignedId,autocomplete:"off",type:"text"},domProps:{value:e.value},on:{keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.preventDefault(),t.submitField(e))},t.nav],focus:t.focused,blur:t.blured,keyup:function(i){return t.change(i,e)},input:function(i){i.target.composing||t.$set(e,"value",i.target.value)}}}):t._e()])]),i("button",{staticClass:"temp-icon-keyboard fake-real-button simptip-position-top",attrs:{tabindex:"-1","data-guid":e.guid,"data-tooltip":"Diacritics [CTRL-ALT-SHIFT-D]"},on:{click:t.openDiacriticSelect}}),i("button",{staticClass:"temp-icon-expand fake-real-button simptip-position-top",attrs:{tabindex:"-1","data-guid":e.guid,"data-tooltip":"Editor [CTRL-ALT-SHIFT-V]"},on:{click:t.openEditor}}),t.showAddAddditonalLiteralButton?i("button",{staticClass:"temp-icon-add fake-real-button simptip-position-top",attrs:{tabindex:"-1","data-guid":e.guid,"data-tooltip":"Add Literal [CTRL-ALT-SHIFT-Z]"},on:{click:t.addAnotherLiteral}}):t._e()])])})),1==t.showDiacritics?i("div",{staticClass:"diacritic-modal"},[i("div",{staticStyle:{float:"right",cursor:"pointer"},on:{click:function(e){t.showDiacritics=!1}}},[t._v("[x]")]),t._m(1),i("hr",{staticStyle:{margin:"2px"}}),i("div",{staticClass:"diacritic-list-holder"},[i("table",t._l(t.diacriticData,(function(e,a){return i("tr",{key:a,ref:"diacriticTable",refInFor:!0,attrs:{"data-id":a},on:{click:t.diacriticSelect}},[i("td",[i("span",{staticClass:"diacritic-modal-list-diacritic"},[t._v(t._s(e.letter))]),i("span",{staticStyle:{"padding-left":"2em"}},[t._v(t._s(e.desc))])]),i("td",[t._v(t._s(e.trigger))])])})),0)])]):t._e(),i("div",{class:["modaloverlay",{"modal-display":t.showEditor}],attrs:{id:t.assignedId}},[i("div",{class:["modal"]},[i("div",[i("div",{staticClass:"modal-content"},[i("EditLiteralEditor",{ref:"literalEditor",attrs:{initalValue:t.showEditorValue},on:{closeEditor:t.closeEditor,updateFromEditor:t.updateFromEditor}})],1)])])])],2):t._e()},s=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("ul",{staticClass:"diacritic-modal-script-list"},[i("li",{staticStyle:{"font-weight":"bold"}},[t._v("Custom")])])},function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("ul",{staticClass:"diacritic-modal-script-list"},[i("li",{staticStyle:{"font-weight":"bold"}},[t._v("Custom")])])}],l=(i("5319"),i("ddb0"),i("2f62")),n=i("8ad1"),c=i("1a1e"),d=i("960b"),u=i("ca8e"),p=i("dd73"),h=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("span",[t.remark&&t.remark.startsWith("http")?i("a",{attrs:{title:"Open Link in New Window",target:"_blank",href:t.remark}},[i("svg",{attrs:{width:"12px",height:"12px",version:"1.1",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{d:"m74.977 0.042969h-0.050781c-1.9727 0-3.5703 1.6016-3.5703 3.5703s1.5977 3.5703 3.5703 3.5703h0.054688 12.793l-58.137 58.137c-0.64844 0.64844-1.0469 1.5391-1.0469 2.5234 0 1.9727 1.6016 3.5703 3.5703 3.5703 0.98438 0 1.8789-0.39844 2.5234-1.043l58.137-58.137v12.793 0.050781c0 1.9727 1.5977 3.5703 3.5703 3.5703s3.5703-1.5977 3.5703-3.5703v-0.054687 0.003906-20.832c0.03125-0.17187 0.046874-0.375 0.046874-0.57812 0-1.9727-1.5977-3.5703-3.5703-3.5703h-0.050781-21.41zm-71.367 21.41c-1.9688 0-3.5703 1.5977-3.5703 3.5703v71.367c0 1.9727 1.6016 3.5703 3.5703 3.5703h71.367c1.9727 0 3.5703-1.5977 3.5703-3.5703v-53.844-0.050781c0-1.9727-1.5977-3.5703-3.5703-3.5703-1.9727 0-3.5703 1.5977-3.5703 3.5703v0.054687-0.003906 50.273h-64.23v-64.23h50.492 0.050781c1.9727 0 3.5703-1.5977 3.5703-3.5703 0-1.9727-1.5977-3.5703-3.5703-3.5703h-0.054688z"}})])]):t._e()])},f=[],m={name:"EditLabelRemark",components:{},props:{remark:String},data:function(){return{}},created:function(){}},g=m,b=(i("cf93"),i("2877")),v=Object(b["a"])(g,h,f,!1,null,"78893b84",null),y=v.exports;const w=i("82fd");var k={name:"EditLiteralComponent",components:{EditLiteralEditor:p["a"],EditLabelRemark:y,Keypress:()=>i.e("chunk-2d0ba165").then(i.bind(null,"365a"))},props:{structure:Object,parentStructure:Array,parentStructureObj:Object,profileCompoent:String,profileName:String,activeTemplate:Object,parentURI:String,nested:Boolean,isMini:Boolean,ptGuid:String,level:Number,propertyPath:Array},methods:{jumpToLangWindow:function(t){document.getElementsByTagName("header")[0].classList.remove("retracted"),document.getElementsByTagName("header")[0].classList.remove("inital"),document.getElementsByTagName("header")[0].classList.add("deployed"),this.$nextTick(()=>{document.getElementById("toolbar-lang-button").click(),console.log("literal-lang-"+t),console.log(document.getElementById("toolbar-lang-button")),this.$nextTick(()=>{window.setTimeout(()=>{document.getElementById("literal-lang-"+t).scrollIntoView({block:"center"})},500)})})},addAnotherLiteral:function(){this.inputValue.push({value:"",guid:"new_"+w.generate()})},closeEditor:function(){this.showEditor=!1,this.$store.dispatch("enableMacroNav")},updateFromEditor:function(t){if(!this.$refs["input_"+this.showDiacriticsGuid])return!1;if(this.$refs["input_"+this.showDiacriticsGuid][0].getAttribute("id")!=this.activeInput)return!1;this.showEditor=!1,this.$store.dispatch("enableMacroNav");for(let e of this.inputValue)e.guid==this.showDiacriticsGuid&&(e.value=t,this.change({},e))},containsNonLatinCodepoints:function(t){return/[^\u0000-\u00ff]/.test(t)},blured:function(){this.$store.dispatch("enableMacroNav")},focused:function(t){t&&t.target&&"TEXTAREA"===t.target.tagName&&this.$store.dispatch("disableMacroNav"),this.$store.dispatch("setActiveInput",{self:this,id:t.target.id,profileCompoent:this.profileCompoent,profileName:this.profileName}).then(()=>{this.$nextTick(()=>{n["a"].focusSidebars()})})},submitField:n["a"].globalMoveDown,insertUnicodeHex:function(t){this.inputValue=String.fromCodePoint(t)},isNoteField:function(t,e){if(this.settingsTreatLikeNoteFields&&"NOTE_FIELDS"==this.settingsTreatLikeNoteFields){if("Note Text"==t)return!0;
1if("Note"==t)return!0;if("Contents note"==t)return!0;if("Summary"==t)return!0}else if(this.settingsTreatLikeNoteFields&&"LARGE_FIELDS"==this.settingsTreatLikeNoteFields){if(e.length>=50)return!0}else if(this.settingsTreatLikeNoteFields&&"ALL_FIELDS"==this.settingsTreatLikeNoteFields)return!0;return!1},openEditor:function(t){return!t.target&&t.event&&(t=t.event),this.showDiacriticsGuid=t.target.dataset.guid,!!this.$refs["input_"+this.showDiacriticsGuid]&&(this.$refs["input_"+this.showDiacriticsGuid][0].getAttribute("id")==this.activeInput&&(this.$store.dispatch("disableMacroNav"),this.showEditorValue=this.$refs["input_"+this.showDiacriticsGuid][0].value,this.showEditor=!0,void this.$nextTick(()=>{document.getElementById("literal-editor-textarea").focus(),this.$refs.literalEditor.loadDataFromInput(this.$refs["input_"+this.showDiacriticsGuid][0].value)})))},openDiacriticSelect:function(t){return!t.target&&t.event&&(t=t.event),this.showDiacriticsGuid=t.target.dataset.guid,!!this.$refs["input_"+this.showDiacriticsGuid]&&(this.$refs["input_"+this.showDiacriticsGuid][0].getAttribute("id")==this.activeInput&&(this.$store.dispatch("disableMacroNav"),this.showDiacritics=!0,this.$nextTick(()=>{this.$refs.diacriticTable[this.diacriticDataNav].style.backgroundColor="#dfe5f1"}),void(t&&t.target&&t.target.localName&&"button"==t.target.localName&&(t.target.parentNode.querySelector("input")?t.target.parentNode.querySelector("input").focus():t.target.parentNode.querySelector("textarea")&&t.target.parentNode.querySelector("textarea").focus()))))},diacriticSelect:function(t){let e=t.target.parentNode.dataset.id?t.target.parentNode.dataset.id:t.target.parentNode.parentNode.dataset.id,i=!1;for(let a of this.inputValue)a.guid==this.showDiacriticsGuid&&(i=a.value.length,this.$refs["input_"+this.showDiacriticsGuid]&&this.$refs["input_"+this.showDiacriticsGuid][0]&&this.$refs["input_"+this.showDiacriticsGuid][0].selectionStart&&(i=this.$refs["input_"+this.showDiacriticsGuid][0].selectionStart),a.value=a.value.substring(0,i)+this.diacriticData[e].letter+a.value.substring(i));this.$nextTick(()=>{i&&document.getElementById(this.$refs["input_"+this.showDiacriticsGuid][0].getAttribute("id")).setSelectionRange(i+1,i+1),document.getElementById(this.$refs["input_"+this.showDiacriticsGuid][0].getAttribute("id")).focus(),this.showDiacriticsGuid=null,this.showDiacritics=!1,this.$store.dispatch("enableMacroNav");for(let e of this.inputValue)e.guid==this.showDiacriticsGuid&&this.change(t,e)})},nav:function(t){let e=t.target.dataset.guid;if(this.settingsDPackVoyagerNative&&0==this.diacrticsVoyagerNativeMode&&"KeyE"==t.code&&1==t.ctrlKey)return this.$refs["input_"+e].style.color="blue",this.diacrticsVoyagerNativeMode=!0,t.preventDefault(),!1;if(this.settingsDPackVoyagerNative&&1==this.diacrticsVoyagerNativeMode&&"KeyE"==t.code&&1==t.ctrlKey)return this.diacrticsVoyagerNativeMode=!1,window.setTimeout(()=>{this.$refs["input_"+e].style.color="black"},500),t.preventDefault(),!1;if(t&&t.key&&1==this.showDiacritics){if("Escape"==t.key)this.showDiacritics=!1,this.$store.dispatch("enableMacroNav");else if("ArrowDown"==t.key||"ArrowUp"==t.key)"ArrowDown"==t.key&&this.diacriticDataNav<this.$refs.diacriticTable.length-1?this.diacriticDataNav++:"ArrowUp"==t.key&&this.diacriticDataNav>0&&(this.diacriticDataNav=this.diacriticDataNav-1),this.$refs.diacriticTable.forEach(t=>{t.style.backgroundColor="transparent"}),this.$refs.diacriticTable[this.diacriticDataNav].style.backgroundColor="#dfe5f1",this.$refs.diacriticTable[this.diacriticDataNav].scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"});else if("Enter"==t.key){let t=this.diacriticData[this.diacriticDataNav].letter,i=e;i||(i=this.showDiacriticsGuid);let a=!1;for(let e of this.inputValue)e.guid==i&&(a=e.value.length,this.$refs["input_"+i]&&this.$refs["input_"+i][0]&&this.$refs["input_"+i][0].selectionStart&&(a=this.$refs["input_"+i][0].selectionStart),e.value=e.value.substring(0,a)+t+e.value.substring(a),a?this.$nextTick(()=>{this.$refs["input_"+i][0].setSelectionRange(a+1,a+1),this.$nextTick(()=>{this.$refs["input_"+i][0].focus()})}):this.$nextTick(()=>{this.$refs["input_"+i][0].focus()}));this.showDiacritics=!1,this.$store.dispatch("enableMacroNav")}else for(let i of this.diacriticData)if(t.key==i.trigger){let t=e;t||(t=this.showDiacriticsGuid);let a=!1;for(let e of this.inputValue)e.guid==t&&(a=e.value.length,this.$refs["input_"+t]&&this.$refs["input_"+t][0]&&this.$refs["input_"+t][0].selectionStart&&(a=this.$refs["input_"+t][0].selectionStart),e.value=e.value.substring(0,a)+i.letter+e.value.substring(a),a?this.$nextTick(()=>{this.$refs["input_"+t][0].setSelectionRange(a+1,a+1),this.$nextTick(()=>{this.$refs["input_"+t][0].focus()})}):this.$nextTick(()=>{this.$refs["input_"+t][0].focus()}));this.showDiacritics=!1,this.$store.dispatch("enableMacroNav")}return t.preventDefault(),!1}!t||"ArrowDown"!=t.key&&"ArrowUp"!=t.key||0!=this.showDiacritics||"TEXTAREA"===t.target.tagName&&this.disableMacroKeyNav&&(0===t.target.value.length?this.$store.dispatch("enableMacroNav").then(()=>{"ArrowDown"==t.key?n["a"].globalMoveDown():n["a"].globalMoveUp()}):0===t.target.selectionStart&&"ArrowUp"==t.key?this.$store.dispatch("enableMacroNav").then(()=>{n["a"].globalMoveUp()}):t.target.selectionStart===t.target.value.length&&"ArrowDown"==t.key&&this.$store.dispatch("enableMacroNav").then(()=>{n["a"].globalMoveDown()}))},change:function(t,e){let i=e.value.length;if(this.$refs["input_"+e.guid]&&this.$refs["input_"+e.guid][0]&&this.$refs["input_"+e.guid][0].selectionStart&&(i=this.$refs["input_"+e.guid][0].selectionStart),d[t.code]&&this.settingsDPackVoyager)for(let s of d[t.code])t.ctrlKey==s.ctrlKey&&t.altKey==s.altKey&&t.shiftKey==s.shiftKey&&(t.preventDefault(),this.$refs["input_"+e.guid][0].style.color="blue",window.setTimeout(()=>{this.$refs["input_"+e.guid][0].style.color="black"},500),s.combining?("Backquote"==t.code&&"`"==e.value.charAt(e.value.length-1)&&(e.value=e.value.slice(0,-1)),e.value=e.value.replace("ª",""),e.value=e.value.substring(0,i)+s.co
1deEscape+e.value.substring(i),document.getElementById(this.$refs["input_"+e.guid][0].getAttribute("id")).setSelectionRange(i+1,i+1),document.getElementById(this.$refs["input_"+e.guid][0].getAttribute("id")).focus(),i?this.$nextTick(()=>{this.$refs["input_"+e.guid][0].setSelectionRange(i+1,i+1),this.$nextTick(()=>{this.$refs["input_"+e.guid][0].focus()})}):this.$nextTick(()=>{this.$refs["input_"+e.guid][0].focus()})):(t.code.includes("Digit")&&e.value.charAt(i)==t.code.replace("Digit","")&&(e.value=e.value.slice(0,i)+e.value.slice(i)),"Equal"==t.code&&"="==e.value.charAt(e.value.length-1)&&(e.value=e.value.slice(0,i)+e.value.slice(i)),"Backquote"==t.code&&"`"==e.value.charAt(e.value.length-1)&&(e.value=e.value.slice(0,i)+e.value.slice(i)),e.value?(e.value=e.value.substring(0,i)+s.codeEscape+e.value.substring(i),i?this.$nextTick(()=>{this.$refs["input_"+e.guid][0].setSelectionRange(i+1,i+1),this.$nextTick(()=>{this.$refs["input_"+e.guid][0].focus()})}):this.$nextTick(()=>{this.$refs["input_"+e.guid][0].focus()})):e.value=s.codeEscape));if(this.settingsDPackVoyagerNative&&0==this.diacrticsVoyagerNativeMode&&"KeyE"==t.code&&1==t.ctrlKey)return t.preventDefault(),!1;if(this.settingsDPackVoyagerNative&&1==this.diacrticsVoyagerNativeMode&&"KeyE"==t.code&&1==t.ctrlKey)return t.preventDefault(),!1;if(this.settingsDPackVoyagerNative&&u[t.code]&&1==this.diacrticsVoyagerNativeMode){let a;window.setTimeout(()=>{this.$refs["input"].style.color="black"},500),e.value=e.value.slice(0,-1),this.diacrticsVoyagerNativeMode=!1;for(let e of u[t.code])if(e.shiftKey==t.shiftKey){a=e;break}a.combining||e.value?e.value=e.value.substring(0,i)+a.codeEscape+e.value.substring(i):e.value=a.codeEscape}let a=e.guid;e.guid.startsWith("new_")&&(a=null);let o=null;if(this.inputValueLast&&this.inputValueLast.length>0)for(let s of this.inputValueLast)s.guid==e.guid&&(o=s.value);if(null===e.value)return!1;if(""===e.value.trim()&&(""===o||null===o))return!1;if(null==e.value)return!1;if(JSON.stringify(this.inputValue)==this.inputValueLast)return!1;""===e.value.trim()&&""!==o&&(e.value=e.value.trim()),t.target&&t.target.localName&&"textarea"==t.target.localName&&(t.target.style.height="",t.target.style.height=t.target.scrollHeight+"px");let r=null;if(this.parentStructureObj&&(r=this.parentStructureObj.propertyURI),t&&t.key&&["Shift","Control","Meta","Alt","CapsLock"].indexOf(t.key)>-1)return!1;this.$store.dispatch("setValueLiteral",{self:this,ptGuid:this.ptGuid,guid:a,parentURI:r,URI:this.structure.propertyURI,value:e.value,propertyPath:this.propertyPath}).then(t=>{t&&(e.guid=t),!1===t&&(e.guid="new_"+w.generate()),this.inputValueLast=JSON.parse(JSON.stringify(this.inputValue))})},refreshInputDisplay:function(){let t;t=this.isMini?this.activeProfileMini.rt[this.profileName].pt[this.profileCompoent]:this.activeProfile.rt[this.profileName].pt[this.profileCompoent];let e=[];
1if(1===this.propertyPath.length){let i=this.propertyPath[0].propertyURI;if(t.userValue[i])for(let a of t.userValue[i])if(e.push(a["@guid"]),this.inputValue.map(t=>t.guid).includes(a["@guid"]))for(let t of this.inputValue)t.guid==a["@guid"]&&("object"==typeof a[i]&&null!==a[i]&&a[i][0][i]?(t.value=a[i][0][i],a[i][0]["@language"]?t.language=a[i][0]["@language"]:t.language=!1):(t.value=a[i],a["@language"]?t.language=a["@language"]:t.language=!1));else"object"==typeof a[i]&&null!==a[i]&&a[i][0][i]?this.inputValue.push({value:a[i][0][i],guid:a["@guid"],language:a[i][0]["@language"]}):this.inputValue.push({value:a[i],guid:a["@guid"],language:a["@language"]})}else if(2===this.propertyPath.length){let i=this.propertyPath[0].propertyURI,a=this.propertyPath[1].propertyURI;if(t.userValue[i]&&t.userValue[i][0]&&t.userValue[i][0][a])for(let o of t.userValue[i][0][a])if(e.push(o["@guid"]),this.inputValue.map(t=>t.guid).includes(o["@guid"]))for(let t of this.inputValue)t.guid==o["@guid"]&&(t.value=o[a],o["@language"]?t.language=o["@language"]:t.language=!1);else this.inputValue.push({value:o[a],guid:o["@guid"],language:o["@language"]})}else if(3===this.propertyPath.length){let i=this.propertyPath[0].propertyURI,a=this.propertyPath[1].propertyURI,o=this.propertyPath[2].propertyURI;if(t.userValue[i]&&t.userValue[i][0]&&t.userValue[i][0][a]&&t.userValue[i][0][a][0]&&t.userValue[i][0][a][0][o])for(let r of t.userValue[i][0][a][0][o])if(e.push(r["@guid"]),this.inputValue.map(t=>t.guid).includes(r["@guid"]))for(let t of this.inputValue)t.guid==r["@guid"]&&(t.value=r[o],r["@language"]?t.language=r["@language"]:t.language=!1);else this.inputValue.push({value:r[o],guid:r["@guid"],language:r["@language"]})}else if(4===this.propertyPath.length){let i=this.propertyPath[0].propertyURI,a=this.propertyPath[1].propertyURI,o=this.propertyPath[2].propertyURI,r=this.propertyPath[3].propertyURI;if(t.userValue[i]&&t.userValue[i][0]&&t.userValue[i][0][a]&&t.userValue[i][0][a][0]&&t.userValue[i][0][a][0][o]&&t.userValue[i][0][a][0][o][0]&&t.userValue[i][0][a][0][o][0][r])for(let s of t.userValue[i][0][a][0][o][0][r])if(e.push(s["@guid"]),this.inputValue.map(t=>t.guid).includes(s["@guid"]))for(let t of this.inputValue)t.guid==s["@guid"]&&(t.value=s[r],s["@language"]?t.language=s["@language"]:t.language=!1);else this.inputValue.push({value:s[r],guid:s["@guid"],language:s["@language"]})}else console.error("Error trying to update literal value but cannot find guid");c["a"].profileHacks.agentsHideManualRDFLabelIfURIProvided.enabled&&this.parentStructureObj&&"http://id.loc.gov/ontologies/bibframe/agent"==this.parentStructureObj.propertyURI&&"http://www.w3.org/2000/01/rdf-schema#label"==this.structure.propertyURI&&(this.parentStructureObj.parentId.includes("Information")||this.structure.parentId.includes("PubPlace")||this.structure.parentId.includes("PubName")||this.structure.parentId.includes(":Provision:")||(this.hideField=!0)),this.inputValue.length>1&&(this.inputValue=this.inputValue.filter(t=>""!=t.value)),this.inputValue=this.inputValue.filter(t=>!!t.guid.startsWith("new_")||-1!=e.indexOf(t.guid)),0==this.inputValue.length&&this.inputValue.push({value:"",guid:"new_"+w.generate()});for(let i of this.inputValue)i.value&&(i.value=i.value.replace(/&amp;/g,"&")),this.rtlRegEx.test(i.value)&&this.$nextTick(()=>{this.$refs["input_"+i.guid][0].classList.add("input-textarea-nested-rtl")})}},computed:Object(l["b"])({activeInput:"activeInput",activeProfile:"activeProfile",activeProfileMini:"activeProfileMini",workingOnMiniProfile:"workingOnMiniProfile",settingsDisplayMode:"settingsDisplayMode",undoCounter:"undoCounter",disableMacroKeyNav:"disableMacroKeyNav",settingsTreatLikeNoteFields:"settingsTreatLikeNoteFields",settingsDPackVoyager:"settingsDPackVoyager",settingsDPackVoyagerNative:"settingsDPackVoyagerNative",assignedId(){return this.internalAssignID||(this.internalAssignID=n["a"].assignID(this.structure,this.parentStructure)),this.internalAssignID},showAddAddditonalLiteralButton(){return!!c["a"].allowLiteralRepeatForNonRomain.includes(this.structure.propertyURI)||!(!this.parentStructureObj||!c["a"].allowLiteralRepeatForNonRomain.includes(this.parentStructureObj.propertyURI))}}),watch:{undoCounter:function(){window.setTimeout(()=>{this.refreshInputDisplay()},500)}},data:function(){return{inputValue:[{value:"",guid:"new_"+w.generate()}],inputValueLast:null,inputValueCombiningDiacritic:null,showDiacritics:!1,showEditor:!1,showEditorValue:"",showDiacriticsGuid:null,diacriticData:[],diacriticDataNav:0,hideField:!1,rtlRegEx:/[\u0591-\u07FF]/,guid:null,initalGuid:null,diacrticsVoyagerNativeMode:!1,internalAssignID:!1,language:!1}},created:function(){this.refreshInputDisplay();let t=localStorage.getItem("bfeDiacritics");t&&(this.diacriticData=JSON.parse(t)),this.$nextTick(()=>{for(let t of this.inputValue){let e="input_"+t.guid;this.$refs[e]&&this.$refs[e][0]&&"TEXTAREA"==this.$refs[e][0].tagName&&this.$refs[e][0].value.length>0&&(this.$refs[e][0].style.height="1px",this.$refs[e][0].style.height=0+this.$refs[e][0].scrollHeight+"px")}this.inputValueLast=JSON.parse(JSON.stringify(this.inputValue))})}},S=k,C=(i("d5b0"),Object(b["a"])(S,r,s,!1,null,"c4d82334",null)),L=C.exports,I=function(){var t=this,e=t.$createElement,i=t._self._c||e;return 0==t.nested?i("div",{class:"component-container component-container-"+t.settingsDisplayMode},[i("div",{class:"component-container-title component-container-title-"+t.settingsDisplayMode},[t._v(t._s(t.structure.propertyLabel))]),i("div",{class:"component-container-input-container component-container-input-container-"+t.settingsDisplayMode},[i("div",{staticClass:"component-container-fake-input no-upper-right-border-radius no-lower-right-border-radius no-upper-border temp-icon-search"},[i("form",{attrs:{autocomplete:"off"},on:{submit:function(t){t.preventDefault()}}},["compact"==t.settingsDisplayMode?i("div",{staticClass:"component-nested-container-title",staticStyle:{position:"absolute",left:"13px"}},[i("span",[t._v(t._s(t.structure.propertyLabel)),i("EditLabelRemark",{attrs:{remark:t.structure.remark}})],1)]):t._e(),i("div",{staticStyle:{display:"flex",height:"100%"}},[t._l(t.activeLookupValue,(function(e,a){return i("div",{key:a,ref:"added-value",refInFor:!0,staticClass:"selected-value-container"},[e["http://www.w3.org/2000/01/rdf-schema#label"].startsWith("http")?i("span",{staticStyle:{"padding-right":"0.3em","font-weight":"bold"}},[i("EditLabelDereference",{attrs:{URI:e["http://www.w3.org/2000/01/rdf-schema#label"]}}),e.uri?i("span",{staticClass:"selected-value-icon",staticStyle:{"margin-left":"5px","border-left":"1px solid black",padding:"0px 5px","font-size":"1em"},attrs:{title:"Controlled Term"}},[t._v("î  ")]):t._e()],1):i("span",{staticStyle:{"padding-right":"0.3em","font-weight":"bold"}},[t._v(t._s(e["http://www.w3.org/2000/01/rdf-schema#label"])),e.uri?t._e():i("span",{staticClass:"uncontrolled"},[t._v("(uncontrolled)")]),e.uri?i("span",{staticClass:"selected-value-icon",staticStyle:{"margin-left":"5px","border-left":"1px solid black",padding:"0px 5px","font-size":"1em"},attrs:{title:"Controlled Term"}},[t._v("î  ")]):t._e()]),i("span",{staticStyle:{"border-left":"solid 1px black",padding:"0 0.5em","font-size":"1em",curs
1or:"pointer"},on:{click:function(e){return t.removeValue(a)}}},[t._v("x")])])})),i("input",{ref:"lookupInput",class:["input-single",{"selectable-input":0==t.isMini,"selectable-input-mini":1==t.isMini}],attrs:{bfeType:"EditSimpleLookupComponent-unnested",id:t.assignedId,autocomplete:"off",type:"text"},domProps:{value:t.activeValue},on:{blur:t.blur,focus:function(e){return t.autoFocus(e)},keydown:function(e){return t.keyDownEvent(e)},keyup:function(e){return t.keyUpEvent(e)}}})],2)])]),1==t.displayAutocomplete?i("div",{staticClass:"autocomplete-container"},[i("ul",t._l(t.displayList,(function(e,a){return i("li",{key:a,attrs:{"data-idx":a},on:{click:t.clickAdd}},[e==t.activeSelect?i("span",{staticClass:"selected",attrs:{"data-idx":a}},[t._v(t._s(e))]):i("span",{attrs:{"data-idx":a}},[t._v(t._s(e))])])})),0)]):t._e()])]):i("div",{staticStyle:{position:"relative"}},[i("div",{class:["component-container-fake-input no-upper-right-border-radius no-lower-right-border-radius no-upper-border temp-icon-search"],style:{"background-color":(t.structure.dynamic,"auto")}},[i("form",{attrs:{autocomplete:"off"},on:{submit:function(t){t.preventDefault()}}},[i("div",{},[i("div",{staticClass:"component-nested-container-title component-nested-container-title-simple-lookup"},["compact"==t.settingsDisplayMode?i("span",[t._v(t._s(t.parentStructureObj.propertyLabel)+" -- ")]):t._e(),i("span",[t._v(t._s(t.structure.propertyLabel))])]),i("div",{staticStyle:{display:"flex"}},[t._l(t.activeLookupValue,(function(e,a){return i("div",{key:a,ref:"added-value",refInFor:!0,staticClass:"selected-value-container-nested"},[e["http://www.w3.org/2000/01/rdf-schema#label"].startsWith("http")?i("span",{staticStyle:{"padding-right":"0.3em","font-weight":"bold"}},[i("EditLabelDereference",{attrs:{URI:e["http://www.w3.org/2000/01/rdf-schema#label"]}}),e.uri?i("span",{staticClass:"selected-value-icon",staticStyle:{"margin-left":"5px","border-left":"1px solid black",padding:"0px 5px","font-size":"1em"},attrs:{title:"Controlled Term"}},[t._v("î  ")]):t._e()],1):i("span",{staticStyle:{"padding-right":"0.3em","font-weight":"bold"}},[t._v(t._s(e["http://www.w3.org/2000/01/rdf-schema#label"])),e.uri?t._e():i("span",{staticClass:"uncontrolled"},[t._v("(uncontrolled)")]),e.uri?i("span",{staticClass:"selected-value-icon",staticStyle:{"margin-left":"5px","border-left":"1px solid black",padding:"0px 5px","font-size":"1em"},attrs:{title:"Controlled Term"}},[t._v("î  ")]):t._e()]),i("span",{staticStyle:{"border-left":"solid 1px black",padding:"0 0.5em","font-size":"1em",cursor:"pointer"},on:{click:function(e){return t.removeValue(a)}}},[t._v("x")])])})),i("input",{ref:"lookupInput",class:["input-nested",{"selectable-input":0==t.isMini,"selectable-input-mini":1==t.isMini}],attrs:{bfeType:"EditSimpleLookupComponent-nested",id:t.assignedId,autocomplete:"off",type:"text"},domProps:{value:t.activeValue},on:{blur:t.blur,focus:function(e){return t.autoFocus(e)},keydown:function(e){return t.keyDownEvent(e)},keyup:function(e){return t.keyUpEvent(e)}}})],2)])])]),1==t.displayAutocomplete?i("div",{staticClass:"autocomplete-container"},[i("ul",t._l(t.displayList,(function(e,a){return i("li",{key:a,attrs:{"data-idx":a},on:{click:t.clickAdd}},[e==t.activeSelect?i("span",{staticClass:"selected",attrs:{"data-idx":a}},[t._v(t._s(e))]):i("span",{attrs:{"data-idx":a}},[t._v(t._s(e))])])})),0)]):t._e()])},_=[],T=i("d837"),x={name:"EditSimpleLookupComponent",props:{structure:Object,parentStructure:Array,nested:Boolean,isMini:Boolean,profileName:String,activeTemplate:Object,ptGuid:String,parentStructureObj:Object,profileCompoent:String,level:Number,bnodeProperty:String,propertyPath:Array},components:{EditLabelDereference:T["a"],EditLabelRemark:y},data:function(){return{displayAutocomplete:!1,uri:this.structure.valueConstraint.useValuesFrom[0],displayList:[],activeFilter:"",activeSelect:"",activeValue:"",doubleDelete:!1,activeLookupValue:[],debounceTimeout:null,internalAssignID:!1}},watch:{undoCounter:function(){this.refreshInputDisplay()}},created:function(){this.refreshInputDisplay()},computed:Object(l["b"])({lookupLibrary:"lookupLibrary",activeInput:"activeInput",activeProfile:"activeProfile",activeProfileMini:"activeProfileMini",workingOnMiniProfile:"workingOnMiniProfile",settingsDisplayMode:"settingsDisplayMode",undoCounter:"undoCounter",assignedId(){return this.internalAssignID||
1(this.internalAssignID=n["a"].assignID(this.structure,this.parentStructure)),this.internalAssignID},lookupVocab(t){return t.lookupLibrary[this.structure.valueConstraint.useValuesFrom[0]]}}),methods:{refreshInputDisplay:function(){let t;this.activeLookupValue=[],t=this.isMini?this.activeProfileMini.rt[this.profileName].pt[this.profileCompoent].userValue:this.activeProfile.rt[this.profileName].pt[this.profileCompoent].userValue;let e=this.propertyPath.filter(t=>"http://www.w3.org/2002/07/owl#sameAs"!=t.propertyURI).length,i=["http://www.w3.org/1999/02/22-rdf-syntax-ns#value","http://www.w3.org/2000/01/rdf-schema#label","http://id.loc.gov/ontologies/bibframe/code","http://www.loc.gov/mads/rdf/v1#authoritativeLabel"];if(4==e){let e=this.propertyPath[0].propertyURI,a=this.propertyPath[1].propertyURI,o=this.propertyPath[2].propertyURI,r=this.propertyPath[3].propertyURI;if(t[e]&&t[e][0]&&t[e][0][a]&&t[e][0][a][0]&&t[e][0][a][0][o]&&t[e][0][a][0][o][0]&&t[e][0][a][0][o][0][r])for(let s of t[e][0][a][0][o][0][r]){let t=null,e=null,a=null,o=null;for(let r in s)s["@id"]&&(a=s["@id"],o=s["@guid"]),i.indexOf(r)>-1&&(s[r]&&s[r][0][r]&&(t=s[r][0][r],e=s["@guid"]),s[r]&&s[r][0]["@id"]&&(a=s[r][0]["@id"],o=s["@guid"]));t||a&&(t=a),this.activeLookupValue.push({"http://www.w3.org/2000/01/rdf-schema#label":t,uri:a,uriGuid:o,labelGuid:e})}}if(3==e){let e=this.propertyPath[0].propertyURI,a=this.propertyPath[1].propertyURI,o=this.propertyPath[2].propertyURI;if(t[e]&&t[e][0]&&t[e][0][a]&&t[e][0][a][0]&&t[e][0][a][0][o])for(let r of t[e][0][a][0][o]){let t=null,e=null,a=null,o=null;for(let s in r)r["@id"]&&(a=r["@id"],o=r["@guid"]),i.indexOf(s)>-1&&(r[s]&&r[s][0][s]&&(t=r[s][0][s],e=r["@guid"]),r[s]&&r[s][0]["@id"]&&(a=r[s][0]["@id"],o=r["@guid"]));t||a&&(t=a),this.activeLookupValue.push({"http://www.w3.org/2000/01/rdf-schema#label":t,uri:a,uriGuid:o,labelGuid:e})}}if(2==e){let e=this.propertyPath[0].propertyURI,a=this.propertyPath[1].propertyURI;if(t[e]&&t[e][0]&&t[e][0][a])for(let o of t[e][0][a]){let t=null,e=null,a=null,r=null;for(let s in o)o["@id"]&&(a=o["@id"],r=o["@guid"]),i.indexOf(s)>-1&&(o[s]&&o[s][0][s]&&(t=o[s][0][s],e=o["@guid"]),o[s]&&o[s][0]["@id"]&&(a=o[s][0]["@id"],r=o["@guid"]));t||a&&(t=a),this.activeLookupValue.push({"http://www.w3.org/2000/01/rdf-schema#label":t,uri:a,uriGuid:r,labelGuid:e})}}if(1==e){let e=this.propertyPath[0].propertyURI;if(console.log("!!!!!! HERE",e,t,t[e]),t[e])for(let a of t[e]){let t=null,e=null,o=null,r=null;for(let s in a)a["@id"]&&(o=a["@id"],r=a["@guid"]),i.indexOf(s)>-1&&(a[s]&&a[s][0][s]&&(t=a[s][0][s],e=a["@guid"]),a[s]&&a[s][0]["@id"]&&(o=a[s][0]["@id"],r=a["@guid"]));t||o&&(t=o),null===t&&null===o||this.activeLookupValue.push({"http://www.w3.org/2000/01/rdf-schema#label":t,uri:o,uriGuid:r,labelGuid:e})}}console.log("this.activeLookupValue",this.activeLookupValue)},fakeContainerFocus:function(t){return t},removeValue:function(t){let e=this.activeLookupValue.splice(t,1);if(e=e[0],this.structure.valueConstraint&&this.structure.valueConstraint.defaults&&this.structure.valueConstraint.defaults[0]&&this.structure.valueConstraint.defaults[0].defaultURI&&"http://id.loc.gov/ontologies/bibframe/hasSeries"===this.structure.valueConstraint.defaults[0].defaultURI)return this.refreshInputDisplay(),!1;this.$store.dispatch("removeValueSimple",{self:this,ptGuid:this.ptGuid,idGuid:e.uriGuid,labelGuid:e.labelGuid,propertyPath:this.propertyPath}).then(()=>{this.$refs.lookupInput.focus()})},filter:async function(t){this.displayList=[],this.activeSelect="",this.activeKeyword=!1;let e="";t&&(e="KEYWORD",this.activeKeyword=!0),Object.keys(this.lookupLibrary[this.uri+e]).forEach(t=>{if("metadata"===t)return!1;""===this.activeFilter.trim()?this.lookupLibrary[this.uri+e][t].forEach(t=>{-1==this.displayList.indexOf(t)&&this.displayList.push(t)}):this.lookupLibrary[this.uri+e][t].forEach(t=>{t.toLowerCase().startsWith(this.activeFilter.toLowerCase())&&-1==this.displayList.indexOf(t)&&this.displayList.push(t),t.toLowerCase().includes(" ("+this.activeFilter.toLowerCase())&&-1==this.displayList.indexOf(t)&&this.displayList.push(t)})}),this.displayList=this.displayList.filter(t=>"Englisch (eng)"!==t),this.displayList.sort(),this.displayList.length>0&&this.activeFilter.length>0&&(this.activeSelect=this.displayList[0],this.displayAutocomplete=!0),0==this.displayList.length&&(t?this.displayList.push("No Match - Press [Enter] to add uncontrolled value"):this.uri.includes("id.loc.gov/vocabulary/")&&(this.activeFilter.length>3?(this.displayList.push("Searching..."),window.clearTimeout(this.debounceTimeout),this.debounceTimeout=window.setTimeout(()=>{this.$store.dispatch("fetchLookupValues",{self:this,url:this.structure.valueConstraint.useValuesFrom,keyword:this.activeFilter}).then(()=>{this.filter(!0)})},500)):this.displayList.push("No local match, enter more of the search term")),this.displayAutocomplete=!0),0==this.activeFilter.length&&(this.displayAutocomplete=!0),this.displayAutocomplete?this.$store.dispatch("disableMacroNav"):this.$store.dispatch("enableMacroNav")},autoFocus:function(t){this.$store.dispatch("setActiveInput",{self:this,id:t.target.id,profileCompoent:this.profileCompoent,profileName:this.profileName}).then(()=>{this.$nextTick(()=>{n["a"].focusSidebars()})}),this.activeFilter=t.target.value,this.$store.dispatch("fetchLookupValues",{self:this,url:this.structure.valueConstraint.useValuesFrom[0]}).then(()=>{this.uri=this.structure.valueConstraint.useValuesFrom[0]})},keyUpEvent:function(t){if(t&&t.key&&"ArrowUp"!==t.key&&"ArrowDown"!==t.key&&"Escape"!==t.key&&"Backspace"!==t.key&&"Enter"!==t.key&&"PageUp"!==t.key&&"PageDown"!==t.key&&0==t.ctrlKey){if(this.activeLookupValue.length>0)return this.$refs["added-value"][0].classList.add("ani-shake"),window.setTimeout(()=>{this.$refs["added-value"][0].classList.remove("ani-shake")},500),t.target.value="",!1;this.activeValue=t.target.value.trimStart(),this.doubleDelete=!1,this.activeValue=t.target.value.trimStart(),this.activeFilter=t.target.value.trimStart(),this.displayAutocomplete=!0,this.$store.dispatch("disableMacroNav"),this.filter()}else if(t&&t.key&&"Backspace"===t.key){if(!this.doubleDelete&&""===this.activeValue)return this.doubleDelete=!0,!1;
1""==this.activeValue&&this.doubleDelete?(this.doubleDelete=!1,this.activeLookupValue.length>0&&this.removeValue(-1),this.doubleDelete=!1,this.displayAutocomplete=!1):""==this.activeValue&&this.activeValue,this.doubleDelete=!1,this.activeValue=t.target.value.trimStart(),this.activeFilter=t.target.value.trimStart(),this.displayAutocomplete=!0,this.$store.dispatch("disableMacroNav"),this.filter()}},keyDownEvent:function(t){if(this.activeValue=t.target.value,t&&t.key&&1==this.displayAutocomplete&&("ArrowUp"===t.key||"ArrowDown"===t.key)){if(this.doubleDelete=!1,this.displayList.length<=1)return!1;if(this.displayAutocomplete||(this.displayAutocomplete=!0),this.activeFilter="",this.activeValue="",""==this.activeSelect.trim()&&this.displayList.length>0)this.activeSelect=this.displayList[0],this.activeValue=this.displayList[0];else for(let e=0;e<this.displayList.length;e++)if(this.displayList[e]===this.activeSelect){if("ArrowDown"===t.key&&e+1<this.displayList.length){this.activeSelect=this.displayList[e+1],this.activeValue=this.displayList[e+1];break}if("ArrowUp"===t.key&&e-1>=0){this.activeSelect=this.displayList[e-1],this.activeValue=this.displayList[e-1];break}}return!1}if(t&&t.key&&"Escape"===t.key)this.doubleDelete=!1,this.activeFilter="",this.activeValue="",this.displayAutocomplete=!1;else if(t&&t.key&&"Enter"===t.key){this.doubleDelete=!1;let e=this.lookupLibrary[this.uri].metadata.values;this.activeKeyword&&(e=this.lookupLibrary[this.uri+"KEYWORD"].metadata.values),Object.keys(e).forEach(i=>{let a=e[i].displayLabel.indexOf(this.activeSelect);if(-1==a&&(a=e[i].displayLabel.indexOf(this.activeSelect.replace(/\s+/g," "))),a>-1){this.activeFilter="",this.activeValue="",this.activeSelect="",this.displayAutocomplete=!1,t.target.value="";let o=e[i].authLabel?e[i].authLabel:e[i].label[a];this.$store.dispatch("setValueSimple",{self:this,ptGuid:this.ptGuid,propertyPath:this.propertyPath,valueURI:e[i].uri,valueLabel:o}).then(t=>{this.activeLookupValue.push({"http://www.w3.org/2000/01/rdf-schema#label":t.valueLabel,uri:t.valueURI,uriGuid:t.guid,labelGuid:t.guid})})}}),""==t.target.value&&this.submitField(),""!==t.target.value&&(this.activeFilter="",this.activeValue="",this.activeSelect="",this.displayAutocomplete=!1,this.$store.dispatch("setValueSimple",{self:this,ptGuid:this.ptGuid,propertyPath:this.propertyPath,valueURI:null,valueLabel:t.target.value}).then(t=>{this.activeLookupValue.push({"http://www.w3.org/2000/01/rdf-schema#label":t.valueLabel,uriGuid:t.guid,labelGuid:t.guid})}),this.submitField()),t.preventDefault()}else""==t.target.value&&(this.activeFilter="",this.activeValue="",this.activeSelect="",this.displayAutocomplete=!1);this.displayAutocomplete?this.$store.dispatch("disableMacroNav"):this.$store.dispatch("enableMacroNav")},blur:function(){this.$store.dispatch("enableMacroNav"),setTimeout(()=>{this.displayAutocomplete=!1},500)},clickAdd:function(t){this.displayAutocomplete=!1,t&&t.target&&t.target.innerText&&(this.activeSelect=t.target.innerText);let e=this.lookupLibrary[this.uri].metadata.values;this.activeKeyword&&(e=this.lookupLibrary[this.uri+"KEYWORD"].metadata.values),Object.keys(e).forEach(i=>{let a=e[i].displayLabel.indexOf(this.activeSelect);if(a>-1){this.activeFilter="",this.activeValue="",this.activeSelect="",this.displayAutocomplete=!1,t.target.value="";let o=e[i].authLabel?e[i].authLabel:e[i].label[a];this.$store.dispatch("setValueSimple",{self:this,ptGuid:this.ptGuid,propertyPath:this.propertyPath,valueURI:e[i].uri,valueLabel:o}).then(t=>{this.activeLookupValue.push({"http://www.w3.org/2000/01/rdf-schema#label":t.valueLabel,uri:t.valueURI,uriGuid:t.guid,labelGuid:t.guid})})}}),this.$refs.lookupInput.focus()},submitField:n["a"].globalMoveDown}},R=x,E=(i("54c1"),Object(b["a"])(R,I,_,!1,null,"164f1c33",null)),M=E.exports,P=function(){var t=this,e=t.$createElement,i=t._self._c||e;return"singleTemplate"==t.dynamic?i("div",t._l(t.activeTemplate.propertyTemplates,(function(e,a){return i("EditMainComponent",{key:a,attrs:{level:t.level,bnodeProperty:t.bnodeProperty,propertyPath:t.propertyPath,ptGuid:t.ptGuid,isMini:t.isMini,position:a,activeTemplate:Object.assign({nested:!0},t.activeTemplate),structure:t.activeTemplate.propertyTemplates[a],profileCompoent:t.profileCompoent,profileName:t.profileName,grandParentStructureObj:t.parentStructureObj,parentStructureObj:t.structure,parentStructure:["nothing"],nested:!0}})})),1):0==t.nested?i("div",{class:"component-container component-container-"+t.settingsDisplayMode},[i("div",{class:"component-container-title component-container-title-"+t.settingsDisplayMode},[t._v(t._s(t.structure.propertyLabel)),i("EditLabelRemark",{attrs:{remark:t.structure.remark}})],1),i("div",{class:"component-container-input-container component-container-input-container-"+t.settingsDisplayMode},[t.structure.valueConstraint.valueTemplateRefs.length>
11?[i("div",{staticClass:"component-container-fake-input no-upper-right-border-radius no-lower-right-border-radius no-upper-border",staticStyle:{flex:"4","max-height":"3em"}},[i("div",{staticStyle:{display:"flex"}},[i("div",{staticStyle:{flex:"1"}},[i("form",{attrs:{autocomplete:"off"}},[i("input",{staticClass:"selectable-input",staticStyle:{width:"95%",border:"none",height:"90%","font-size":"1.5em",padding:"0.1em",background:"none"},attrs:{bfeType:"EditTemplateRefComponent-nested",id:t.assignedId,autocomplete:"off",type:"text"},domProps:{value:t.multiTemplateSelect},on:{focus:t.focused,keydown:function(e){return t.multiTemplateSelectKeydown(e)}}})])]),i("button",{staticClass:"temp-icon-switch fake-real-button simptip-position-top",attrs:{tabindex:"-1","data-tooltip":t.labels.refComponentSwitchButton},on:{click:function(e){return t.multiTemplateSelectKeydown(e,!0)}}})])])]:t._e(),null!=t.activeTemplate&&t.activeTemplate.propertyTemplates.length>0?i("div",t._l(t.activeTemplate.propertyTemplates,(function(e,a){return i("EditMainComponent",{key:a,attrs:{level:t.level,bnodeProperty:t.bnodeProperty,propertyPath:t.propertyPath,ptGuid:t.ptGuid,isMini:t.isMini,activeTemplate:t.activeTemplate,structure:t.activeTemplate.propertyTemplates[a],parentStructureObj:t.structure,parentStructure:["nothing"],profileCompoent:t.profileCompoent,profileName:t.profileName,nested:!0}})})),1):i("div",[i("span",[t._v("Missing resource template "+t._s(t.structure.valueConstraint.valueTemplateRefs))]),t._v(" "+t._s(t.activeTemplate)+" ")])],2)]):1==t.nested?i("div",[t.structure.valueConstraint.valueTemplateRefs.length>1?[i("div",{staticClass:"component-container-fake-input no-upper-right-border-radius no-lower-right-border-radius no-upper-border",staticStyle:{flex:"4","max-height":"3em"}},[i("div",{staticStyle:{display:"flex"}},[i("div",{staticStyle:{flex:"1"}},[i("form",{attrs:{autocomplete:"off"}},[i("input",{staticClass:"selectable-input",staticStyle:{width:"95%",border:"none",height:"90%","font-size":"1.5em",padding:"0.1em",background:"none"},attrs:{bfeType:"EditTemplateRefComponent-unnested",id:t.assignedId,autocomplete:"off",type:"text"},domProps:{value:t.multiTemplateSelect},on:{focus:t.focused,keydown:function(e){return t.multiTemplateSelectKeydown(e)}}})])]),i("button",{staticClass:"temp-icon-switch fake-real-button simptip-position-top",attrs:{tabindex:"-1","data-tooltip":t.labels.refComponentSwitchButton},on:{click:function(e){return t.multiTemplateSelectKeydown(e,!0)}}})])])]:t._e(),null!=t.activeTemplate&&t.activeTemplate.propertyTemplates.length>0?t._l(t.activeTemplate.propertyTemplates,(function(e,a){return i("EditMainComponent",{key:a,attrs:{ptGuid:t.ptGuid,level:t.level,bnodeProperty:t.bnodeProperty,propertyPath:t.propertyPath,isMini:t.isMini,position:a,activeTemplate:Object.assign({nested:!0},t.activeTemplate),structure:t.activeTemplate.propertyTemplates[a],profileCompoent:t.profileCompoent,profileName:t.profileName,grandParentStructureObj:t.parentStructureObj,parentStructureObj:t.structure,parentStructure:["nothing"],nested:!0}})})):t._e()],2):t._e()},D=[],O=i("1bca"),U={name:"EditTemplateRefComponent",components:{EditLabelRemark:y,EditMainComponent:()=>Promise.resolve().then(i.bind(null,"718b"))},props:{structure:Object,parentStructure:Array,parentStructureObj:Object,profileCompoent:String,parentURI:String,profileName:String,nested:Boolean,isMini:Boolean,dynamic:String,ptGuid:String,level:Number,bnodeProperty:String,propertyPath:Array},data:function(){return{multiTemplateSelect:"",multiTemplateSelectURI:"",multiTemplateSelectOptions:[],activeTemplate:null,propertyTemplatesOrderLookup:{},propertyTemplatesOrderTypeLookup:{},labels:O["a"],internalAssignID:!1}},computed:Object(l["b"])({rtLookup:"rtLookup",activeInput:"activeInput",activeProfile:"activeProfile",settingsDisplayMode:"settingsDisplayMode",assignedId(){return this.internalAssignID||(this.internalAssignID=n["a"].assignID(this.structure,this.parentStructure)),this.internalAssignID}}),created:function(){let t=this.structure.valueConstraint.valueTemplateRefs[0],e=!1,i=this.structure.userValue;if(i[this.structure.propertyURI]&&i[this.structure.propertyURI][0]&&(i=this.structure.userValue[this.structure.propertyURI][0]),(i["@type"]||this.parentStructureObj&&this.parentStructureObj.userValue["@type"])&&this.structure.valueConstraint.valueTemplateRefs.forEac
1h(a=>{if(e)return!1;this.rtLookup[a].resourceURI===i["@type"]&&(t=a,e=!0);for(let o in i)if(Array.isArray(i[o]))for(let r of i[o])r["@type"]&&this.rtLookup[a].resourceURI===r["@type"]&&(t=a,e=!0)}),this.parentStructure&&-1==this.parentStructure.indexOf(t)){if(this.rtLookup[t]){let e=JSON.parse(JSON.stringify(this.rtLookup[t]));this.multiTemplateSelect=e.resourceLabel,this.multiTemplateSelectURI=t,this.activeTemplate=e,this.buildPropertyTemplatesOrderLookup()}}else"lc:RT:bf2:Monograph:Dissertation"==t&&(this.multiTemplateSelect=this.rtLookup[t].resourceLabel,this.multiTemplateSelectURI=t,this.activeTemplate=this.rtLookup[t],this.buildPropertyTemplatesOrderLookup()),"lc:RT:bf2:Hub:Contribution"==t&&(this.multiTemplateSelect=this.rtLookup[t].resourceLabel,this.multiTemplateSelectURI=t,this.activeTemplate=this.rtLookup[t],this.buildPropertyTemplatesOrderLookup())},methods:{buildPropertyTemplatesOrderLookup:function(){if(this.propertyTemplatesOrderLookup={},this.activeTemplate.propertyTemplates.forEach((t,e)=>{this.propertyTemplatesOrderLookup[t.propertyURI+t.propertyLabel]=e}),1==this.activeTemplate.propertyTemplates.length){let t=this.activeTemplate.propertyTemplates[0].propertyURI+this.activeTemplate.propertyTemplates[0].propertyLabel;this.propertyTemplatesOrderTypeLookup[t]="solo"}else if(2==this.activeTemplate.propertyTemplates.length){let t=this.activeTemplate.propertyTemplates[0].propertyURI+this.activeTemplate.propertyTemplates[0].propertyLabel;this.propertyTemplatesOrderTypeLookup[t]="start",t=this.activeTemplate.propertyTemplates[1].propertyURI+this.activeTemplate.propertyTemplates[1].propertyLabel,this.propertyTemplatesOrderTypeLookup[t]="end"}else this.activeTemplate.propertyTemplates.length>
12&&this.activeTemplate.propertyTemplates.forEach((t,e)=>{0==e?this.propertyTemplatesOrderTypeLookup[t.propertyURI+t.propertyLabel]="start":e==this.activeTemplate.propertyTemplates.length-1?this.propertyTemplatesOrderTypeLookup[t.propertyURI+t.propertyLabel]="end":this.propertyTemplatesOrderTypeLookup[t.propertyURI+t.propertyLabel]="middle"})},multiTemplateSelectKeydown:function(t,e){if(!0===e&&(t={key:"ArrowRight",target:t.target.parentNode.querySelector("input")},t.target.parentNode.querySelector("input").focus()),"ArrowRight"!==t.key&&"ArrowLeft"!==t.key)return"Tab"===t.key||(t.preventDefault(),!1);{let e,i;if("ArrowRight"===t.key){let t=this.structure.valueConstraint.valueTemplateRefs.indexOf(this.multiTemplateSelectURI);i=this.structure.valueConstraint.valueTemplateRefs[t],t+1>this.structure.valueConstraint.valueTemplateRefs.length-1&&(t=-1),e=this.structure.valueConstraint.valueTemplateRefs[t+1]}else{let t=this.structure.valueConstraint.valueTemplateRefs.indexOf(this.multiTemplateSelectURI);i=this.structure.valueConstraint.valueTemplateRefs[t],0==t&&(t=this.structure.valueConstraint.valueTemplateRefs.length),e=this.structure.valueConstraint.valueTemplateRefs[t-1]}this.$store.dispatch("refTemplateChange",{self:this,profileName:this.profileName,profileComponet:this.profileCompoent,structure:this.structure,template:this.activeTemplate,parentId:this.structure.parentId,nextRef:this.rtLookup[e],thisRef:this.rtLookup[i]}).then(()=>{let i=JSON.parse(JSON.stringify(this.rtLookup[e]));this.multiTemplateSelect=i.resourceLabel,this.multiTemplateSelectURI=e,this.activeTemplate=i,this.buildPropertyTemplatesOrderLookup(),this.focused(t),n["a"].renderBorders(!0)})}},focused:function(t){this.$nextTick(()=>{this.$store.dispatch("enableMacroNav")}),this.$store.dispatch("setActiveInput",{self:this,id:t.target.id,profileCompoent:this.profileCompoent,profileName:this.profileName}).then(()=>{this.$nextTick(()=>{n["a"].focusSidebars()})})}}},A=U,N=(i("e6fa"),Object(b["a"])(A,P,D,!1,null,"3ebef348",null)),V=N.exports,j=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("Keypress",{attrs:{"key-event":"keydown","key-code":27},on:{success:t.closeModal}}),i("Keypress",{attrs:{"key-event":"keydown","multiple-keys":[{keyCode:66,modifiers:["ctrlKey","shiftKey"],preventDefault:!0}]},on:{success:t.togglePreCoordinated}}),0==t.nested?i("div",{staticClass:"component-container"},[i("div",{staticClass:"component-container-title"},[t._v(t._s(t.structure.propertyLabel))]),i("div",{staticClass:"component-container-input-container"},[i("div",{ref:"fakeInputContainer",class:["component-container-fake-input temp-icon-search"],staticStyle:{position:"relative"}},[i("div",{staticClass:"component-nested-container-title",staticStyle:{top:"0",width:"100%"}},[t._v(t._s(t.structure.propertyLabel))]),t.displayLabel?i("div",{staticStyle:{position:"absolute",width:"100%"}},[i("div",{staticStyle:{display:"flex"}},[i("div",{ref:"displayLabel",staticClass:"selected-value-container-nested",staticStyle:{display:"inline-block",position:"relative",bottom:"2px"}},[i("span",{ref:"displayLabelSpan",staticStyle:{"padding-right":"0.3em","font-weight":"bold"},on:{click:t.toggleSelectedDetails}},[i("span",{staticClass:"selected-value-icon",domProps:{innerHTML:t._s(t.returnAuthIcon(this.displayType))}}),t.formatDisplayLabel().startsWith("http")?i("span",{ref:"labelSpan"},[i("EditLabelDereference",{key:t.editLabelDereferenceKey,attrs:{URI:t.formatDisplayLabel()}})],1):i("span",{key:t.editLabelDereferenceKey,ref:"labelSpan"},[t._v(t._s(t.formatDisplayLabel()))])]),i("span",{staticClass:"selected-value-icon",staticStyle:{"border-left":"solid 1px black",padding:"0 0.5em","font-size":"1em"},domProps:{innerHTML:t._s(t.validateHeading())}}),t.showEditLink()?i("span",{staticStyle:{"border-left":"solid 1px black",padding:"0 0.5em","font-size":"1em"},on:{click:t.openEditor}},[t._v("change")]):t._e(),t.showRemoveLink()?i("span",{staticStyle:{"border-left":"solid 1px black",padding:"0 0.5em","font-size":"1em"},on:{click:t.removeValue}},[t._v("x")]):t._e()]),i("form",{staticStyle:{display:"inline-block",width:"90%"},attrs:{autocomplete:"off"},on:{submit:function(t){t.preventDefault()}}}
1,[i("input",{class:["input-nested",{"selectable-input":0==t.isMini,"selectable-input-mini":1==t.isMini}],staticStyle:{display:"inline-block"},attrs:{bfeType:"EditComplexLookupComponent",type:"text",id:t.assignedId},on:{keydown:t.doubleDeleteCheck,focus:t.focused}})])]),1==t.displaySelectedDetails?i("div",{staticClass:"selected-value-details"},[i("button",{staticClass:"selected-value-details-close",on:{click:t.toggleSelectedDetails}},[t._v("Close")]),i("button",{staticClass:"selected-value-details-edit",on:{click:t.openEditor}},[t._v("Change")]),t.rewriteURI(t.displayContext.uri)?i("a",{staticStyle:{color:"white","text-decoration":"none"},attrs:{target:"_blank",href:t.rewriteURI(t.displayContext.uri)}},[t._v("View Entity")]):t._e(),i("div",{staticClass:"modal-context-data-title"},[t._v(t._s(t.userData["@type"]))]),t.displayContext?i("div",[t.displayContext.variant&&t.displayContext.variant.length>0?i("div",[i("div",{staticClass:"modal-context-data-title"},[t._v("Variants:")]),i("ul",t._l(t.displayContext.variant,(function(e,a){return i("li",{key:"var"+a,staticClass:"modal-context-data-li"},[t._v(t._s(e))])})),0)]):t._e(),t._l(Object.keys(t.displayContext.nodeMap),(function(e){return i("div",{key:e},[i("div",{staticClass:"modal-context-data-title"},[t._v(t._s(e)+":")]),i("ul",t._l(t.displayContext.nodeMap[e],(function(a,o){return i("li",{key:e+o,staticClass:"modal-context-data-li"},[t._v(t._s(a))])})),0)])})),t.displayContext.source&&t.displayContext.source.length>0?i("div",[i("div",{staticClass:"modal-context-data-title"},[t._v("Sources:")]),i("ul",t._l(t.displayContext.source,(function(e,a){return i("li",{key:"sources"+a,staticClass:"modal-context-data-li"},[t._v(t._s(e))])})),0)]):t._e()],2):t._e()]):t._e()]):i("form",{attrs:{autocomplete:"off"},on:{submit:function(t){t.preventDefault()}}},[i("input",{class:["input-nested",{"selectable-input":0==t.isMini,"selectable-input-mini":1==t.isMini}],attrs:{bfeType:"EditComplexLookupComponent",type:"text",id:t.assignedId},on:{focus:t.focused,input:function(e){return t.activate(e)}}})])])])]):i("div",[t.useSubjectEditor()?i("Keypress",{attrs:{"key-event":"keydown","multiple-keys":[{keyCode:69,modifiers:["shiftKey","ctrlKey","altKey"],preventDefault:!0}]},on:{success:t.openEditor}}):t._e(),i("div",{ref:"fakeInputContainer",class:["component-container-fake-input no-upper-right-border-radius no-lower-right-border-radius no-upper-border temp-icon-search"],staticStyle:{position:"relative"}},[i("div",{staticClass:"component-nested-container-title",staticStyle:{top:"0",width:"100%"}},[!t.parentStructureObj||"Lookup"!=t.structure.propertyLabel&&"compact"!=t.settingsDisplayMode?t._e():i("span",[t._v(t._s(t.parentStructureObj.propertyLabel)+" -- ")]),i("span",[t._v(t._s(t.structure.propertyLabel))])]),t.displayLabel?i("div",{staticStyle:{position:"absolute",width:"100%"}},[i("div",{staticStyle:{display:"flex"}},[i("div",{ref:"displayLabel",staticClass:"selected-value-container-nested",staticStyle:{display:"inline-block",position:"relative",bottom:"2px"}},[i("span",{ref:"displayLabelSpan",staticStyle:{"padding-right":"0.3em","font-weight":"bold"},on:{click:t.toggleSelectedDetails}},[i("span",{staticClass:"selected-value-icon",domProps:{innerHTML:t._s(t.returnAuthIcon(this.displayType))}}),t.formatDisplayLabel().startsWith("http")?i("span",{ref:"labelSpan"},[i("EditLabelDereference",{key:t.editLabelDereferenceKey,attrs:{URI:t.formatDisplayLabel()}})],1):i("span",{key:t.editLabelDereferenceKey,ref:"labelSpan"},[t._v(t._s(t.formatDisplayLabel()))])]),i("span",{staticClass:"selected-value-icon",staticStyle:{"border-left":"solid 1px black",padding:"0 0.5em","font-size":"1em"},attrs:{title:t.validationMessage},domProps:{innerHTML:t._s(t.validateHeading())}}),t.showEditLink()?i("span",{staticStyle:{"border-left":"solid 1px black",padding:"0 0.5em","font-size":"1em"},on:{click:t.openEditor}},[t._v("change")]):t._e(),t.showRemoveLink()?i("span",{staticStyle:{"border-left":"solid 1px black",padding:"0 0.5em","font-size":"1em"},on:{click:t.removeValue}},[t._v("x")]):t._e()]),i("form",{staticStyle:{display:"inline-block",width:"90%"},attrs:{autocomplete:"off"},on:{submit:function(t){t.preventDefault()}}}
1,[i("input",{class:["input-nested",{"selectable-input":0==t.isMini,"selectable-input-mini":1==t.isMini}],staticStyle:{display:"inline-block"},attrs:{bfeType:"EditComplexLookupComponent",type:"text",id:t.assignedId},on:{keydown:t.doubleDeleteCheck,focus:t.focused}})])]),t.useSubjectEditor()?i("button",{staticClass:"temp-icon-search fake-real-button simptip-position-top",staticStyle:{position:"absolute",right:"-2px",top:"-26px"},attrs:{tabindex:"-1",id:t.returnGuid()+"_subjectButton","data-tooltip":"Edit this Subject Heading [CTRL-ALT-SHIFT-E]"},on:{click:t.openEditor}}):t._e(),1==t.displaySelectedDetails?i("div",{staticClass:"selected-value-details"},[i("div",{staticStyle:{"min-height":"50px"}},[i("button",{staticClass:"selected-value-details-close",on:{click:t.toggleSelectedDetails}},[t._v("Close")]),i("button",{staticClass:"selected-value-details-edit",on:{click:t.openEditor}},[t._v("Change")]),t.rewriteURI(t.displayContext.uri)?i("a",{staticStyle:{color:"white","text-decoration":"none"},attrs:{target:"_blank",href:t.rewriteURI(t.displayContext.uri)}},[t._v("View Entity")]):t._e()]),i("EditLabelDereference",{attrs:{URI:t.formatDisplayLabel()}}),i("div",{staticClass:"modal-context-data-title"},[t._v(t._s(t.userData["@type"]))]),t.displayContext?i("div",[t.displayContext.variant&&t.displayContext.variant.length>0?i("div",[i("div",{staticClass:"modal-context-data-title"},[t._v("Variants:")]),i("ul",t._l(t.displayContext.variant,(function(e,a){return i("li",{key:"var"+a,staticClass:"modal-context-data-li"},[t._v(t._s(e))])})),0)]):t._e(),t._l(Object.keys(t.displayContext.nodeMap),(function(e){return i("div",{key:e},[i("div",{staticClass:"modal-context-data-title"},[t._v(t._s(e)+":")]),i("ul",t._l(t.displayContext.nodeMap[e],(function(e){return i("li",{key:e,staticClass:"modal-context-data-li"},[t._v(t._s(e))])})),0)])})),t.displayContext.source&&t.displayContext.source.length>0?i("div",[i("div",{staticClass:"modal-context-data-title"},[t._v("Sources:")]),i("ul",t._l(t.displayContext.source,(function(e){return i("li",{key:e,staticClass:"modal-context-data-li"},[t._v(t._s(e))])})),0)]):t._e()],2):t._e()],1):t._e()]):i("form",{attrs:{autocomplete:"off"},on:{submit:function(t){t.preventDefault()}}},[i("input",{class:["input-nested",{test:t.isMini,"selectable-input":!1===t.isMini,"selectable-input-mini":!0===t.isMini}],attrs:{bfeType:"EditComplexLookupComponent",type:"text",id:t.assignedId},on:{focus:t.focused,input:function(e){return t.activate(e)}}})])])],1),i("div",{class:["modaloverlay",{"modal-display":t.displayModal}],attrs:{id:t.assignedId}},[i("div",{class:["modal"]},[i("div",[t.lowResMode?t._e():i("div",{staticClass:"close temp-icon-close",on:{click:t.closeModal}}),t.lowResMode?t._e():i("div",{staticClass:"modal-title"},[t.parentStructureObj&&"Lookup"==t.structure.propertyLabel?i("span",[t._v(t._s(t.parentStructureObj.propertyLabel)+" -- ")]):t._e(),i("span",[t._v(t._s(t.structure.propertyLabel))])]),i("div",{staticClass:"modal-content"},[t.useSubjectEditor()?i("div",[i("EditSubjectEditor",{ref:"EditSubjectEditor",on:{closeEditor:t.closeModal,lowResModeActivate:t.lowResModeActivate,subjectAdded:t.subjectAdded}})],1):i("div",{class:["modal-content-flex-container",{"modal-content-flex-container-complex":1==t.canBuildComplex()&&1==t.displayPreCoordinated,"modal-content-flex-container-complex-prompt":0==t.displayPreCoordinated,"modal-content-flex-container-complex-hide":0==t.canBuildComplex()}]},[i("div",{staticClass:"modal-content-left"},[i("div",{staticStyle:{height:"13%"}},[i("div",{staticClass:"modal-switch-values-container component-container-fake-input no-lower-right-border-radius",staticStyle:{flex:"4","border-top-left-radius":"0.5em"}},[i("div",{staticStyle:{display:"flex"}},[i("div",{staticStyle:{flex:"1"}},[i("form",{attrs:{autocomplete:"off"}},[i("input",{staticClass:"no-lower-right-border-radius",staticStyle:{width:"95%",border:"none",height:"90%","font-size":"1.5em",padding:"0.1em",background:"none"},attrs:{id:t.assignedId+"switch",bfeType:"",autocomplete:"off",type:"text"},domProps:{value:t.modeSelect},on:{focus:t.focused,keydown:function(e){return t.switchTypes(e)}}})])]),i("button",{staticClass:"temp-icon-switch fake-real-button simptip-position-top",attrs:{"data-tooltip":"Select subset of the vocabulary to use [Left] or [Right Arrow]"},on:{click:function(e){return t.switchTypes(e,!0)}}})])]),i("div",{class:["component-container-fake-input no-upper-right-border-radius no-upper-border modal-switch-values-container"],staticStyle:{"border-bottom-left-radius":"0.5em"}},[i("form",{attrs:{autocomplete:"off"}},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.searchValue,expression:"searchValue"}],ref:"searchInput",staticStyle:{width:"95%",border:"none",height:"90%","font-size":"2em",padding:"0.2em 0.1em 0.2em 0.1em",background:"none"},attrs:{bfeType:"",id:t.assignedId+"search",name:t.assignedId,autocomplete:"off",type:"text"},domProps:{value:t.searchValue},on:{keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.preventDefault(),t.submitField(e))},function(e){return t.searchNav(e)}],focus:t.focused,keyup:function(e){return t.search(e)}
1,input:function(e){e.target.composing||(t.searchValue=e.target.value)}}})])])]),i("div",{class:["complex-lookup-results",{"complex-lookup-results-complex":t.canBuildComplex()}]},[0==t.activeComplexSearch.length&&0==t.activeComplexSearchInProgress&&1!=t.initalSearchState?i("div",[i("h5",[t._v("No results found.")])]):t._e(),1==t.activeComplexSearchInProgress?i("div",[i("h5",[t._v("Searching...")])]):t._e(),i("select",{staticClass:"modal-entity-select",staticStyle:{height:"100%"},attrs:{size:"10",id:t.assignedId+"select"},on:{change:function(e){return t.selectChange(e)},keydown:function(e){return t.selectNav(e)}}},t._l(t.activeComplexSearch,(function(e,a){return i("option",{key:a,staticClass:"complex-lookup-result",style:e.depreciated?"color:red":"",attrs:{"data-label":e.label},domProps:{value:e.uri,innerHTML:t._s(t.returnAuthIcon(e)+" "+e.label+(e.literal?" [Literal]":""))}})})),0)])]),i("div",{staticClass:"modal-content-right",staticStyle:{position:"relative"}},[t.contextRequestInProgress?i("div",{staticStyle:{"font-weight":"bold"}},[t._v("Retrieving data...")]):t._e(),Object.keys(t.contextData).length>0?i("div",{staticClass:"modal-context",style:{height:t.displayPreCoordinated?"50%":"75%"}},[i("h3",[i("span",{staticClass:"modal-context-icon simptip-position-top",attrs:{"data-tooltip":"Type: "+t.contextData.type},domProps:{innerHTML:t._s(t.returnAuthIcon(t.contextData.type))}}),t._v(t._s(t.contextData.title))]),i("div",{staticClass:"modal-context-data-title"},[t._v(t._s(t.contextData.type))]),t.contextData.depreciated?i("div",{staticStyle:{background:"pink"}},[t._v(" DEPRECIATED AUTHORITY ")]):t._e(),i("a",{staticStyle:{color:"#2c3e50",float:"none",border:"none","border-radius":"0","background-color":"transparent","font-size":"1em",padding:"0"},attrs:{href:t.rewriteURI(t.contextData.uri),target:"_blank"}},[t._v("view on id.loc.gov")]),t.contextData.variant&&t.contextData.variant.length>0?i("div",[i("div",{staticClass:"modal-context-data-title"},[t._v("Variants:")]),i("ul",t._l(t.contextData.variant,(function(e,a){return i("li",{key:"var"+a,staticClass:"modal-context-data-li"},[t._v(t._s(e))])})),0)]):t._e(),t._l(Object.keys(t.contextData.nodeMap),(function(e){return i("div",{key:e},[i("div",{staticClass:"modal-context-data-title"},[t._v(t._s(e)+":")]),i("ul",t._l(t.contextData.nodeMap[e],(function(a,o){return i("li",{key:e+o,staticClass:"modal-context-data-li"},[t._v(t._s(a))])})),0)])})),t.contextData.source&&t.contextData.source.length>0?i("div",[i("div",{staticClass:"modal-context-data-title"},[t._v("Sources:")]),i("ul",t._l(t.contextData.source,(function(e,a){return i("li",{key:"sources-"+a,staticClass:"modal-context-data-li"},[t._v(t._s(e))])})),0)]):t._e()],2):t._e(),0!=Object.keys(t.contextData).length?i("div",{staticClass:"modal-context-add-menu"},[0==t.displayPreCoordinated&&t.structure.valueConstraint.useValuesFrom&&t.structure.valueConstraint.useValuesFrom.indexOf("http://id.loc.gov/authorities/subjects")>-1?i("button",{staticStyle:{width:"75%","margin-bottom":"5px"},on:{click:t.togglePreCoordinated}},[t._v("Build subject string [CTRL+SHIFT+B]")]):t._e(),1==t.displayPreCoordinated?i("div",{staticClass:"modal-context-build-manual"},[i("div",{staticClass:"modal-context-build-manual-buttons"},[i("div",[t._v("Build manual pre-coordinated: Add selected as a subdivision: ")]),i("button",{staticStyle:{width:"12em"},on:{click:function(e){return t.precoordinatedAddSubdivision("Topic")}}},[t._v("Heading or Topical [CRTL+SHIFT+1] ")]),i("button",{staticStyle:{width:"10em"},on:{click:function(e){return t.precoordinatedAddSubdivision("Geographic")}}},[t._v("Geographic [CRTL+SHIFT+2] ")]),i("button",{staticStyle:{width:"10em"},on:{click:function(e){return t.precoordinatedAddSubdivision("Temporal")}}},[t._v("Chronological [CRTL+SHIFT+3] ")]),i("button",{staticStyle:{width:"10em"},on:{click:function(e){return t.precoordinatedAddSubdivision("GenreForm")}}},[t._v("Form [CRTL+SHIFT+4] ")]),i("button",{staticStyle:{width:"10em"},on:{click:function(e){return t.precoordinatedRemoveLast()}}},[t._v("Remove Last [CRTL+SHIFT+5] ")])]),i("div",{staticClass:"modal-context-build-manual-precoordinted-display"},[0==t.precoordinated.length?i("span",[t._v("Your pre-coordinated heading will display here when you add subdivisions")]):t._e(),i("span",[t._v(" "+t._s(t.precoordinated.map((function(t){return t.label})).join("--"))+" ")])])]):t._e(),0==t.precoordinated.length?i("button",{staticStyle:{width:"75%"},on:{click:t.add}},[t._v("Add Selected [SHIFT+Enter]")]):t.precoordinated.length>0?i("button",{staticClass:"simptip-position-left",staticStyle:{width:"75%"},attrs:{"data-tooltip":""},on:{click:t.add}},[t._v("Add Pre-Coordinated [SHIFT+Enter]")]):t._e()]):t._e(),t.allowHubCreation?i("button",{staticStyle:{width:"75%",position:"absolute",top:"85%",left:"12%","background-color":"white","border-color":"rgb(42, 42, 42)",border:"3px solid rgb(42, 42, 42)",color:"rgb(42, 42, 42)"},on:{click:t.showMiniHubEdit}},[i("div",{staticStyle:{display:"flex",width:"150px",height:"25px","margin-left":"auto","margin-right":"auto"}},[i("div",{staticStyle:{flex:"0",width:"50px"}}
1,[i("svg",{attrs:{width:"25px",height:"25px",version:"1.1",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{fill:"royalblue",d:"m62.113 24.66 1.9023-15.238 18.875 32.691-7.5469 20.004 15.238 1.9023-32.691 18.875-20.004-7.5469-1.9023 15.238-18.875-32.691 7.5469-20.004-15.238-1.9023 32.691-18.875zm-17.684 15.695-4.0781 15.215 15.215 4.0781 4.0781-15.215z","fill-rule":"evenodd"}})])]),i("div",{staticStyle:{flex:"1","text-align":"left"}},[t._v("Build New Hub")])])]):t._e()])])])])])])],1)},$=[],K=i("ad6d"),F=i("dd89"),B=i("f7e4"),H={name:"EditComplexLookupComponent",components:{Keypress:()=>i.e("chunk-2d0ba165").then(i.bind(null,"365a")),EditSubjectEditor:B["a"],EditLabelDereference:T["a"]},props:{structure:Object,parentStructure:Array,profileCompoent:String,parentStructureObj:Object,profileName:String,activeTemplate:Object,parentURI:String,isMini:Boolean,nested:Boolean,level:Number,bnodeProperty:String,propertyPath:Array},data:function(){return{displayModal:!1,lookups:this.structure.valueConstraint.useValuesFrom,lookupConfig:c["a"].lookupConfig,modeSelect:null,searchValue:"",searchTimeout:null,selectLastIndex:null,initalSearchState:!0,selectNavTimeout:null,componentKey:0,displaySelectedDetails:!1,doubleDelete:!1,precoordinated:[],displayPreCoordinated:!1,displayLabel:null,displayLabelDreferenced:null,displayType:null,displayGuid:null,displayContext:{},editLabelDereferenceKey:Date.now(),contextRequestInProgress:!1,validated:!1,validationMessage:"",lowResMode:!1,displayMini:!1,allowHubCreation:!1,userData:{},internalAssignID:!1}},watch:{undoCounter:function(){this.checkForUserData()}},created:function(){this.checkForUserData(),"http://id.loc.gov/ontologies/bibframe/Work"!==this.structure.propertyURI&&"http://id.loc.gov/ontologies/bibframe/expressionOf"!==this.structure.propertyURI||(this.allowHubCreation=!0)},computed:Object(l["b"])({lookupLibrary:"lookupLibrary",activeInput:"activeInput",activeProfile:"activeProfile",activeProfileMini:"activeProfileMini",workingOnMiniProfile:"workingOnMiniProfile",settingsDisplayMode:"settingsDisplayMode",activeProfileName:"activeProfileName",activeComplexSearch:"activeComplexSearch",activeComplexSearchInProgress:"activeComplexSearchInProgress",settingsLookupsUseTextSubjectEditor:"settingsLookupsUseTextSubjectEditor",contextData:"contextData",undoCounter:"undoCounter",assignedId(){return this.internalAssignID||(this.internalAssignID=n["a"].assignID(this.structure,this.parentStructure,c["a"])),this.internalAssignID},modalSelectOptions(){let t=[];return this.structure.valueConstraint.useValuesFrom.forEach(e=>{this.lookupConfig[e]&&this.lookupConfig[e].modes.forEach(i=>
1{Object.keys(i).forEach(a=>{t.push({label:a,urls:i[a].url,processor:this.lookupConfig[e].processor,minCharBeforeSearch:!!this.lookupConfig[e].minCharBeforeSearch&&this.lookupConfig[e].minCharBeforeSearch,all:i[a].all}),!this.modeSelect&&i[a].all&&(this.modeSelect=a)}),this.modeSelect||(this.modeSelect=Object.keys(i)[0])})}),t},modalSelectOptionsLabels(){return this.modalSelectOptions.map(t=>t.label)},lookupVocab(t){return t.lookupLibrary[this.structure.valueConstraint.useValuesFrom[0]]}}),methods:{focusCurrentInput:n["a"].focusCurrentInput,returnAuthIcon:n["a"].returnAuthIcon,returnCorrectActiveProfile:function(){return this.isMini||this.workingOnMiniProfile?this.activeProfileMini:this.activeProfile},showMiniHubEdit:function(){this.closeModal();let t={useProfile:"Hub",sourceId:this.assignedId,component:this};this.$emit("showMiniEditorEdit",t),this.$parent.$emit("showMiniEditorEdit",t),this.$parent.$parent.$emit("showMiniEditorEdit",t),this.$parent.$parent.$parent.$emit("showMiniEditorEdit",t),this.$parent.$parent.$parent.$parent.$emit("showMiniEditorEdit",t)},returnGuid:function(){return F["a"].returnGuid(this.activeProfile,this.profileCompoent,this.structure.propertyURI)},formatDisplayLabel:function(){let t=!1;if(this.displayLabel.startsWith("http:")){let e=F["a"].returnUserValues(this.returnCorrectActiveProfile(),this.profileName,this.profileCompoent,this.structure.propertyURI,this.propertyPath);for(let i in e)if(i==this.parentStructureObj.propertyURI)for(let a of e[i])for(let e in a)"@context"==e&&a[e].title&&(t=a[e].title)}return[100,500,1e3,2e3].forEach(t=>{window.setTimeout(()=>{let t,e=0;try{t=this.$refs.labelSpan.innerHTML}catch{return null}this.displayLabelDreferenced||(this.displayLabelDreferenced=this.$refs.labelSpan.innerText);while(this.$refs.labelSpan.parentNode.parentNode.clientWidth>this.$refs.fakeInputContainer.clientWidth-60&&e<1e3)t=t.slice(0,-1),this.$refs.labelSpan.innerHTML=t+"...",e++},t)}),t||this.displayLabel},showEditLink:function(){let t=!0;return this.displayLabel.includes("id.loc.gov/resources/works/")&&(t=!1),this.displayLabel.includes("id.loc.gov/resources/hubs/")&&(t=!1),"http://www.loc.gov/mads/rdf/v1#Topic"==this.structure.propertyURI&&!1===this.settingsLookupsUseTextSubjectEditor&&(t=!1),t},showRemoveLink:function(){let t=!0;return this.displayLabel.includes("id.loc.gov/resources/works/")&&(t=!1),t},useSubjectEditor:function(){let t=!1;return"http://www.loc.gov/mads/rdf/v1#Topic"==this.structure.propertyURI&&(t=!0),this.parentStructureObj&&"http://www.loc.gov/mads/rdf/v1#componentList"==this.parentStructureObj.propertyURI&&(t=!0),!1===this.settingsLookupsUseTextSubjectEditor&&(t=!1),t},validateHeading:function(){if("http://id.loc.gov/ontologies/bibframe/Work"!=this.structure.propertyURI&&"http://id.loc.gov/ontologies/bibframe/Instance"!=this.structure.propertyURI&&"http://id.loc.gov/ontologies/bibframe/Item"!=this.structure.propertyURI&&"http://id.loc.gov/ontologies/bflc/relation"!=this.structure.propertyURI||(this.validated=K["a"].headingNotChecked,this.validationMessage=K["a"].getValidationMessage(this.validated)),!1===this.validated){let t=F["a"].returnUserValues(this.returnCorrectActiveProfile(),this.profileName,this.profileCompoent,this.structure.propertyURI,this.propertyPath);t=JSON.parse(JSON.stringify(t)),t&&this.parentStructureObj&&this.parentStructureObj.propertyURI&&(t.hintUri=this.parentStructureObj.propertyURI),!1!==t&&K["a"].validateHeading(t).then(e=>{let i=F["a"].returnUserValues(this.returnCorrectActiveProfile(),this.profileName,this.profileCompoent,this.structure.propertyURI,this.propertyPath);this.validated=e,this.validationMessage=K["a"].getValidationMessage(e),void 0!==t["http://id.loc.gov/ontologies/bibframe/agent"]&&(t=t["http://id.loc.gov/ontologies/bibframe/agent"][0]),void 0!==i["http://id.loc.gov/ontologies/bibframe/agent"]&&(i=i["http://id.loc.gov/ontologies/bibframe/agent"][0]),t["@id"]!==this.displayContext.uri&&(this.displayContext.uri=t["@id"]);var a=K["a"].getLabel(t);this.displayLabel!=a&&(this.displayLabel=a),this.displayContext.title!=a&&(this.displayContext.title=a),i["@id"]||(console.log("userData",t),console.log("userData",t),t["@id"].includes("id.loc.gov/authorities/names/")&&this.$store.dispatch("fetchContext",{self:this,searchPayload:t["@id"]}
1).then(()=>{this.$store.dispatch("setValueComplex",{self:this,profileComponet:this.profileCompoent,template:this.profileName,structure:this.structure,parentStructure:this.parentStructureObj,propertyPath:this.propertyPath}).then(()=>{this.componentKey++})}))})}return this.validated},camelize:function(t){return t.replace(/(?:^\w|[A-Z]|\b\w|\s+)/g,(function(t,e){return 0===+t?"":0===e?t.toLowerCase():t.toUpperCase()}))},submitField:function(){return this.add()},rewriteURI:function(t){return!!t&&(!t.includes("bibframe.example.org")&&((t.includes("/resources/hubs/")||t.includes("/resources/works/")||t.includes("/resources/instances/")||t.includes("/resources/items/"))&&(t=t.replace("https://id.loc.gov/",c["a"].returnUrls().bfdb),t=t.replace("http://id.loc.gov/",c["a"].returnUrls().bfdb)),t))},precoordinatedAddSubdivision:function(t){if(0==Object.keys(this.contextData).length)return!1;let e=this.contextData.title,i=this.contextData.uri,a=this.contextData.type;this.contextData.typeFull||("Topic"==t?(this.contextData.typeFull="http://www.loc.gov/mads/rdf/v1#Topic",a="Topic"):"Geographic"==t?(this.contextData.typeFull="http://www.loc.gov/mads/rdf/v1#Geographic",a="Geographic"):"Temporal"==t?(this.contextData.typeFull="http://www.loc.gov/mads/rdf/v1#Temporal",a="Temporal"):"GenreForm"==t&&(this.contextData.typeFull="http://www.loc.gov/mads/rdf/v1#GenreForm",a="GenreForm")),this.precoordinated.push({uri:i,label:e,type:a,typeFull:this.contextData.typeFull}),this.$refs.searchInput.focus()},precoordinatedRemoveLast:function(){this.precoordinated.length>0&&this.precoordinated.splice(-1,1)},canBuildComplex:function(){return this.structure.valueConstraint.useValuesFrom.indexOf("http://id.loc.gov/authorities/subjects")>-1},togglePreCoordinated:function(t){if(0==this.displayPreCoordinated&&1==this.displayModal){if(this.displayPreCoordinated=!0,t&&t.event)return t.event.preventDefault(),!1}else if(this.displayPreCoordinated=!1,t&&t.event)return t.event.preventDefault(),!1},removeValue:function(){if(this.displayContext.uri){let t=this.displayContext.uri;this.$store.dispatch("removeValuebyURI",{self:this,ptGuid:this.$attrs.ptGuid,uriToRemove:t}).then(()=>{this.checkForUserData(),setTimeout(()=>{document.getElementById(this.assignedId).focus()},0)})}else this.userData={},this.$store.dispatch("clearContext",{self:this}).then(()=>{this.$store.dispatch("setValueComplex",{self:this,profileComponet:this.profileCompoent,template:this.activeTemplate,structure:this.structure,parentStructure:this.parentStructureObj,propertyPath:this.propertyPath}).then(()=>{this.checkForUserData(),setTimeout(()=>{document.getElementById(this.assignedId).focus()},0)})})},doubleDeleteCheck:function(t){if(t&&t.key&&"Backspace"===t.key)this.doubleDelete?this.removeValue():this.doubleDelete=!0;else if("ArrowUp"!=t.key&&"ArrowDown"!=t.key&&"Tab"!=t.key)return t.preventDefault(),!1},toggleSelectedDetails:function(){this.displaySelectedDetails?(this.displaySelectedDetails=!1,setTimeout(()=>{document.getElementById(this.assignedId).focus()},0)):this.displaySelectedDetails=!0},checkForUserData:function(){let t;if(this.displayLabel=null,this.displayType=null,this.displayGuid=null,t=F["a"].returnUserValues(this.returnCorrectActiveProfile(),this.profileName,this.profileCompoent,this.structure.propertyURI,this.propertyPath),console.log("Normal userValue userValue userValue userValue"),console.log(t),t["http://www.w3.org/2000/01/rdf-schema#label"]||t["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"]||t["http://id.loc.gov/ontologies/bibframe/code"])t["http://www.w3.org/2000/01/rdf-schema#label"]?this.displayLabel=t["http://www.w3.org/2000/01/rdf-schema#label"][0]["http://www.w3.org/2000/01/rdf-schema#label"]||t["http://www.w3.org/2000/01/rdf-schema#label"]:t["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"]?this.displayLabel=t["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"][0]["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"]||t["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"]:t["http://www.w3.org/1999/02/22-rdf-syntax-ns#value"]?this.displayLabel=t["http://www.w3.org/1999/02/22-rdf-syntax-ns#value"][0]["http://www.w3.org/1999/02/22-rdf-syntax-ns#value"]||t["http://www.w3.org/1999/02/22-rdf-syntax-ns#value"]:t["http://id.loc.gov/ontologies/bibframe/code"]&&(this.displayLabel=t["http://id.loc.gov/ontologies/bibframe/code"][0]["http://id.loc.gov/ontologies/bibframe/code"]||t["http://id.loc.gov/ontologies/bibframe/code"]),this.displayLabel=this.displayLabel.replace(/&amp;/g,"&"),this.displayLabel||(console.log("ERROR GETTING this.displayLabel"),console.log(t),console.log(this.parentStructure)),t["@type"]&&(this.displayType=t["@type"]),t["@context"]?this.displayContext=t["@context"]:this.displayContext={contextValue:!0,uri:t["@id"]?t["@id"]:null,title:this.displayLabel,nodeMap:{}};else{let e=Object.keys(t).filter(t=>"@root"!=t);e.length>0&&(console.warn("---------------------------------------------"),console.warn("Dont know how to extract the userValue for this complexLookup"),console.warn(t),
1console.warn(this.structure),console.warn("---------------------------------------------"))}},activate:function(t){return"ArrowDown"===t.key||"ArrowUp"===t.key||"ArrowRight"===t.key||"ArrowLeft"===t.key||"PageUp"===t.key||"PageDown"===t.key||"Tab"===t.key||"Control"===t.key||"Meta"===t.key||"Alt"===t.key||"Shift"===t.key||"CapsLock"===t.key||"="===t.key||"Backspace"===t.key||"Home"===t.key||""==t.target.value.trim()||(this.displayModal=!0,this.initalSearchState=!0,this.searchValue=t.target.value,this.$store.dispatch("clearContext",{self:this}),this.$store.dispatch("clearLookupValuesComplex",{self:this}).then(()=>{""!=this.searchValue&&this.search()}),t.preventDefault(),setTimeout(()=>{document.getElementById(this.assignedId+"search")&&document.getElementById(this.assignedId+"search").focus()},0),this.$store.dispatch("disableMacroNav",{self:this}),this.$nextTick(()=>{this.$refs.EditSubjectEditor&&(this.$refs.EditSubjectEditor.$refs.subjectInput.focus(),this.$refs.EditSubjectEditor.loadUserValue(this.searchValue),this.$refs.EditSubjectEditor.checkToolBarHeight())}),t.target.value=""),!1},focused:function(t){this.$store.dispatch("setActiveInput",{self:this,id:t.target.id,profileCompoent:this.profileCompoent,profileName:this.profileName}).then(()=>{console.log("event.target.id",t.target.id),this.$nextTick(()=>{n["a"].focusSidebars()})})},closeModal:function(t){t&&t.target&&t.target.classList.contains("close")&&(this.displayModal=!1),this.$store.dispatch("enableMacroNav",{self:this}),this.lowResMode=!1,this.displayModal=!1,this.displayPreCoordinated=!1,this.precoordinated=[],this.prec,t&&t.event&&t.event.preventDefault(),this.focusCurrentInput()},openEditor:function(){this.displaySelectedDetails=!1,this.$store.dispatch("setActiveInput",{self:this,id:this.assignedId,profileCompoent:this.profileCompoent,profileName:this.profileName}).then(()=>{}),this.$store.dispatch("disableMacroNav",{self:this}),this.displayModal=!0,this.useSubjectEditor()?this.$nextTick(()=>{this.$refs.EditSubjectEditor&&(this.$refs.EditSubjectEditor.$refs.subjectInput.focus(),this.$refs.EditSubjectEditor.loadUserValue(this.activeProfile.rt[this.activeProfileName].pt[this.profileCompoent].userValue),this.$refs.EditSubjectEditor.checkToolBarHeight())}):(this.displayLabelDreferenced&&this.displayLabel.startsWith("http")?this.searchValue=this.displayLabelDreferenced:this.searchValue=this.displayLabel,this.initalSearchState=!0,this.search(),this.$nextTick(()=>{document.getElementById(this.assignedId+"search").focus()})),this.displayLabelDreferenced=null},lowResModeActivate:function(){this.lowResMode=!0},subjectAdded:function(t){this.$store.dispatch("setValueSubject",{self:this,profileComponet:this.profileCompoent,subjectComponents:t,propertyPath:this.propertyPath}).then(()=>{this.componentKey++,this.displayModal=!1,this.checkForUserData(),this.$emit("updated",null),this.validated=!1,this.validateHeading(),setTimeout(()=>{document.getElementById(this.assignedId).focus(),this.$store.dispatch("enableMacroNav",{self:this})},0),this.$store.dispatch("setSubjectList")})},selectChange:function(t){t||(t={target:document.getElementById(this.assignedId+"select")}),window.clearTimeout(this.selectNavTimeout),this.selectNavTimeout=window.setTimeout(()=>{t.target.options.forEach(t=>{if(t.selected){if(this.$store.dispatch("clearContext",{self:this}),!t.value){let e={contextValue:!0,source:[],type:"Literal Value",variant:[],uri:null,title:t.dataset.label,contributor:[],date:null,genreForm:null,nodeMap:{}
1,precoordinated:!1,literal:!0};return this.$store.dispatch("setContextManually",{self:this,context:e}),!1}this.contextRequestInProgress=!0,this.$store.dispatch("fetchContext",{self:this,searchPayload:t.value}).then(()=>{this.contextRequestInProgress=!1})}})},300)},selectNav:function(t){return 0==t.target.selectedIndex&&"ArrowUp"===t.key?(document.getElementById(this.assignedId+"search").focus(),t.preventDefault(),!1):t.target.selectedIndex==t.target.options.length-1&&"ArrowDown"===t.key?(t.preventDefault(),!1):"1"!==t.key&&"!"!==t.key||1!=this.displayPreCoordinated||!0!==t.ctrlKey||1!=t.shiftKey?"2"!==t.key&&"@"!==t.key||1!=this.displayPreCoordinated||!0!==t.ctrlKey||1!=t.shiftKey?"3"!==t.key&&"#"!==t.key||1!=this.displayPreCoordinated||!0!==t.ctrlKey||1!=t.shiftKey?"4"!==t.key&&"$"!==t.key||1!=this.displayPreCoordinated||!0!==t.ctrlKey||1!=t.shiftKey?"5"!==t.key&&"%"!==t.key||1!=this.displayPreCoordinated||!0!==t.ctrlKey||1!=t.shiftKey?("Enter"===t.key&&t.shiftKey&&this.add(),void(this.selectLastIndex=t.target.selectedIndex)):(this.precoordinatedRemoveLast(),t.preventDefault(),!1):(this.precoordinatedAddSubdivision("GenreForm"),t.preventDefault(),!1):(this.precoordinatedAddSubdivision("Temporal"),t.preventDefault(),!1):(this.precoordinatedAddSubdivision("Geographic"),t.preventDefault(),!1):(this.precoordinatedAddSubdivision("Topic"),t.preventDefault(),!1)},switchTypes:function(t,e){if(!0===e&&(t={key:"ArrowRight",target:t.target.parentNode.querySelector("input")},t.target.parentNode.querySelector("input").focus()),"ArrowRight"===t.key){let t=this.modalSelectOptionsLabels.indexOf(this.modeSelect);t+1>this.modalSelectOptionsLabels.length-1&&(t=-1),this.modeSelect=this.modalSelectOptionsLabels[t+1],this.search()}else{if("ArrowLeft"!==t.key)return"ArrowDown"===t.key?(document.getElementById(this.assignedId+"search").focus(),t.preventDefault(),!1):(t.preventDefault(),!1);{let t=this.modalSelectOptionsLabels.indexOf(this.modeSelect);0==t&&(t=this.modalSelectOptionsLabels.length),this.modeSelect=this.modalSelectOptionsLabels[t-1],this.search()}}},searchNav:function(t){return"ArrowUp"===t.key?(document.getElementById(this.assignedId+"switch").focus(),t.preventDefault(),!1):"ArrowDown"===t.key?(document.getElementById(this.assignedId+"select").firstChild&&(document.getElementById(this.assignedId+"select").focus(),document.getElementById(this.assignedId+"select").firstChild.selected=!0,this.selectChange()),t.preventDefault(),!1):void 0},search:function(t){if(t){if(this.searchValue=t.target.value,"ArrowUp"===t.key)return!1;if("ArrowDown"===t.key)return!1}if(""==this.searchValue.trim())return!1;if(this.searchValue.length<3)if(this.searchValue.match(/[\u3040-\u30ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff\uff66-\uff9f]/));else{let t=3;if(this.modalSelectOptions.forEach(e=>{e.minCharBeforeSearch&&e.minCharBeforeSearch<t&&(t=e.minCharBeforeSearch)}),this.searchValue.length<t)return!1}window.clearTimeout(this.searchTimeout);let e={processor:null,url:[],searchValue:this.searchValue};this.modalSelectOptions.forEach(t=>{t.label==this.modeSelect&&(e.processor=t.processor,e.url.push(t.urls.replace("<QUERY>",this.searchValue)))}),this.searchTimeout=window.setTimeout(()=>{this.$store.dispatch("fetchLookupValuesComplex",{self:this,searchPayload:e}).then(()=>{this.initalSearchState=!1})},400)},add:function(){if(this.precoordinated.length>0){let t=this.precoordinated.map(t=>t.label).join("--"),e={contextValue:!0,source:[],type:"ComplexSubject",variant:[],uri:null,title:t,contributor:[],date:null,genreForm:null,nodeMap:{}
1,precoordinated:this.precoordinated};this.$store.dispatch("setContextManually",{self:this,context:e}).then(()=>{this.$store.dispatch("setValueComplex",{self:this,profileComponet:this.profileCompoent,template:this.activeTemplate,structure:this.structure,parentStructure:this.parentStructureObj,propertyPath:this.propertyPath}).then(()=>{this.componentKey++,this.displayModal=!1,this.$store.dispatch("enableMacroNav",{self:this}),this.checkForUserData(),this.validated=!1,this.validateHeading(),setTimeout(()=>{document.getElementById(this.assignedId).focus()},0)})})}else{if(0==Object.keys(this.contextData).length)return!1;this.$store.dispatch("setValueComplex",{self:this,profileComponet:this.profileCompoent,template:this.activeTemplate,structure:this.structure,parentStructure:this.parentStructureObj,propertyPath:this.propertyPath}).then(()=>{this.componentKey++,this.displayModal=!1,this.checkForUserData(),this.validated=!1,this.validateHeading(),this.$store.dispatch("enableMacroNav",{self:this}),this.editLabelDereferenceKey=Date.now(),setTimeout(()=>{document.getElementById(this.assignedId).focus()},0)})}}}}
1,G=H,z=(i("3d1c"),Object(b["a"])(G,j,$,!1,null,"23d3042c",null)),W=z.exports,J=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"component-container"},["http://id.loc.gov/ontologies/bibframe/hasInstance"==t.structure.propertyURI?[i("div",{staticClass:"component-container-title"},[t._v("Manage Instances")]),i("div",[i("table",{staticStyle:{width:"100%","border-top":"1px solid #c6c9cc"}},[t._l(t.hasInstance,(function(e){return i("tr",{key:e},[i("td",{staticStyle:{"background-color":"whitesmoke"}},[t._v(t._s(e))]),i("td",{staticStyle:{"text-align":"right","background-color":"whitesmoke"}},[i("a",{staticStyle:{color:"#2c3e50"},attrs:{href:"#"},on:{click:function(i){return t.duplicateInstance(i,e)}}},[t._v("replace with clone")])]),i("td",{staticStyle:{"text-align":"right","background-color":"whitesmoke"}},[i("a",{staticStyle:{color:"#2c3e50"},attrs:{href:"#"},on:{click:function(i){return t.deleteInstance(i,e)}}},[t._v("delete")])])])})),i("tr",[i("td",{staticStyle:{"background-color":"whitesmoke"}},[i("a",{staticStyle:{color:"#2c3e50"},attrs:{href:"#"},on:{click:function(e){return t.addInstance(e)}}},[t._v("Add")]),t._v(" another Instance")])])],2)])]:t._e(),"http://id.loc.gov/ontologies/bibframe/instanceOf"==t.structure.propertyURI?[i("div",{staticClass:"component-container-title"},[t._v("Instance Of")]),i("table",{staticStyle:{width:"100%","border-top":"1px solid #c6c9cc"}},[i("tr",[i("td",{staticStyle:{"background-color":"whitesmoke"}},[t._v(t._s(t.instanceOf))])])])]:t._e(),"http://id.loc.gov/ontologies/bibframe/hasItem"==t.structure.propertyURI?[i("div",{staticClass:"component-container-title"},[t._v("Has Item")]),i("table",{staticStyle:{width:"100%","border-top":"1px solid #c6c9cc"}},[t._l(t.hasItem,(function(e){return i("tr",{key:e},[i("td",{staticStyle:{"background-color":"whitesmoke"}},[t._v(t._s(e))]),i("td",{staticStyle:{"text-align":"right","background-color":"whitesmoke"}},[i("a",{staticStyle:{color:"#2c3e50"},attrs:{href:"#"},on:{click:function(i){return t.duplicateItem(i,e)}}},[t._v("duplicate")])]),i("td",{staticStyle:{"text-align":"right","background-color":"whitesmoke"}},[i("a",{staticStyle:{color:"#2c3e50"},attrs:{href:"#"},on:{click:function(i){return t.deleteItem(i,e)}}},[t._v("delete")])])])})),i("tr",[i("td",{staticStyle:{"background-color":"whitesmoke"}},[i("a",{staticStyle:{color:"#2c3e50"},attrs:{href:"#"},on:{click:function(e){return t.addItem(e)}}},[t._v("Add")]),t._v(" another Item")])])],2)]:t._e()],2)},q=[],X={name:"EditMetaComponent",components:{},props:{structure:Object,parentStructure:Array,profileCompoent:String,profileName:String,activeTemplate:Object,nested:Boolean,parentURI:String},methods:{duplicateInstance:function(t,e){return this.$store.dispatch("cloneInstance",{uri:e}).then(()=>{this.buildData()}),t.preventDefault(),!1},duplicateItem:function(t,e){return this.$store.dispatch("duplicateItem",{uri:e}).then(()=>{this.buildData()}),t.preventDefault(),!1},deleteItem:function(t,e){return this.$store.dispatch("deleteItem",{uri:e}).then(()=>{this.buildData()}),t.preventDefault(),!1},deleteInstance:function(t,e){return this.$store.dispatch("deleteInstance",{uri:e}).then(()=>{this.buildData()}),t.preventDefault(),!1},addInstance:function(t){return this.$store.dispatch("addInstance").then(()=>{this.buildData()}),t.preventDefault(),!1},addItem(t){return this.$store.dispatch("addItem",{uri:this.profileName}).then(()=>{this.buildData()}),t.preventDefault(),!1},buildData:function(){this.hasInstance=[],this.hasItem=[],this.instanceOf=null;for(let t of Object.keys(this.activeProfile.rt))if(this.activeProfile.rt[t].instanceOf&&this.hasInstance.push(this.activeProfile.rt[t].URI),t.includes(":Work")&&(this.instanceOf=this.activeProfile.rt[t].URI),t.includes(":Instance")&&t==this.profileName){let e=this.activeProfile.rt[t].URI;for(let t of Object.keys(this.activeProfile.rt))this.activeProfile.rt[t].itemOf&&this.activeProfile.rt[t].itemOf==e&&this.hasItem.push(this.activeProfile.rt[t].URI)}}},computed:Object(l["b"])({activeInput:"activeInput",activeProfile:"activeProfile"}),data:function(){return{hasInstance:[],hasItem:[],instanceOf:null}},created:function(){this.buildData()}}
1,Y=X,Q=(i("bcbc"),Object(b["a"])(Y,J,q,!1,null,"6f201636",null)),Z=Q.exports,tt=i("d538"),et=i.n(tt);const it=i("82fd");var at={name:"EditMainComponent",components:{EditLiteralComponent:L,EditSimpleLookupComponent:M,EditTemplateRefComponent:V,EditComplexLookupComponent:W,EditMetaComponent:Z,VueJsonPretty:et.a},props:{structure:Object,parentStructure:Array,parentStructureObj:Object,nested:Boolean,isMini:Boolean,profileCompoent:String,profileName:String,activeTemplate:Object,parentURI:String,ptGuid:String,dynamic:String,level:Number,propertyPath:Array},data:function(){return{labels:O["a"],displayDebug:!1,useKey:it.generate(),levelPlusOne:this.plusOne(this.level),lookupType:c["a"].lookupConfig}},computed:Object(l["b"])({settingsDisplayMode:"settingsDisplayMode",settingsLeftMenuEnriched:"settingsLeftMenuEnriched"}),methods:{buildPropertyPath:function(t){t||(t=[]),1==this.level&&(t=t.filter(t=>0==t.level)),t=t.filter(t=>t.level<this.level);let e=t.map(t=>t.propertyURI);return-1==e.indexOf(this.structure.propertyURI)&&t.push({level:this.level,propertyURI:this.structure.propertyURI}),t},plusOne:function(t){return t+1},prettifyXml:n["a"].prettifyXml,forceUpdate:function(){},showDupeRemove:function(){let t=["http://id.loc.gov/ontologies/bibframe/hasInstance","http://id.loc.gov/ontologies/bibframe/instanceOf","http://id.loc.gov/ontologies/bibframe/hasItem"];return!(t.indexOf(this.structure.propertyURI)>-1)},hasDynamicTemplate:function(){return this.structure.valueConstraint.valueTemplateRefs.filter(t=>t.startsWith("dynamic:")).length>0},toggleDebug:function(){this.displayDebug?this.displayDebug=!1:this.displayDebug=!0},duplicateProperty:function(){this.$store.dispatch("duplicateProperty",{self:this,id:this.profileCompoent,profile:this.profileName}).then(()=>{})},removeProperty:function(){const t=window.confirm("Are you sure you want to remove the property?");if(!t)return!1;this.$store.dispatch("removeProperty",{self:this,id:this.profileCompoent,profile:this.profileName}).then(()=>{})},returnLookupType(t){if("http://id.loc.gov/ontologies/bibframe/hasInstance"==t.propertyURI)return"meta";if("http://id.loc.gov/ontologies/bibframe/instanceOf"==t.propertyURI)return"meta";if("http://id.loc.gov/ontologies/bibframe/hasItem"==t.propertyURI)return"hide";let e="simple";return 0==t.valueConstraint.useValuesFrom.length?null:(t.valueConstraint.useValuesFrom.forEach(t=>{this.lookupType[t]&&"complex"==this.lookupType[t].type&&(e="complex")}),e)}}},ot=at,rt=(i("b48e"),Object(b["a"])(ot,a,o,!1,null,"093f4fd6",null));e["default"]=rt.exports},"724c":function(t,e,i){"use strict";var a=i("b608"),o=i.n(a);o.a},"761b":function(t,e,i){},"7b94":function(t,e,i){},"7c23":function(t,e,i){"use strict";var a=i("dbd1"),o=i.n(a);o.a},"7ffa":function(t,e,i){"use strict";var a=i("400e"),o=i.n(a);o.a},"826f":function(t,e,i){},"842f":function(t,e,i){},"845f":function(t,e,i){},8583:function(t,e,i){"use strict";var a=i("cc66"),o=i.n(a);o.a},"85ec":function(t,e,i){},"87dc":function(t,e,i){"use strict";var a=i("2ad0"),o=i.n(a);o.a},"8ad1":function(t,e,i){"use strict";i("5319");var a=i("4360");const o={globalMoveDown(){if(a["a"].state.disableMacroKeyNav)return!1;var t=document.getElementsByClassName("selectable-input");a["a"].state.workingOnMiniProfile&&(t=document.getElementsByClassName("selectable-input-mini"));let e=-1;for(let i=0;i<t.length;i++)t[i].id==this.activeInput&&(e=i);-1!=e&&t[e+1]&&t[e+1].focus()},globalMoveUp(){if(a["a"].state.disableMacroKeyNav)return!1;var t=document.getElementsByClassName("selectable-input");a["a"].state.workingOnMiniProfile&&(t=document.getElementsByClassName("selectable-input-mini"));let e=-1;for(let i=0;i<t.length;i++)t[i].id==this.activeInput&&(e=i);-1!=e&&t[e-1]&&t[e-1].focus()},globalMovePageDown(t){return this.moveDown(),this.moveDown(),this.moveDown(),this.moveDown(),this.moveDown(),t.event.preventDefault(),!1},globalMovePageUp(t){return this.moveUp(),this.moveUp(),this.moveUp(),this.moveUp(),this.moveUp(),t.event.preventDefault(),!1},focusCurrentInput(){var t=document.getElementsByClassName("selectable-input");for(let e=0;e<t.length;e++)t[e].id!=this.activeInput&&t[e].id!=this.activeInput.replace("switch","")&&t[e].id!=this.activeInput.replace("search","")||t[e].focus()},focusSidebars(){window.setTimeout(()=>{if(0==document.getElementsByClassName("left-menu-list-item-active").length)return!1;document.getElementsByClassName("left-menu-list-item-active")[0].scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"}),window.setTimeout((function(){document.getElementsByClassName("left-menu-list-item-active")[0].scrollIntoView({block:"center"})}
1),500),document.getElementsByClassName("opac-field-active").length>0&&(document.getElementsByClassName("opac-field-active")[0].scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"}),window.setTimeout((function(){document.getElementsByClassName("opac-field-active")[0].scrollIntoView({block:"center"})}),500))},100)},returnAuthIcon(t){const e="&#xe800;",i="&#xe801;",a="&#xe802;",o="&#xe800; + &#xe802;",r="&#xe803;",s="&#xe805;",l="&#xe806;",n="&#xe807;",c="&#xe808;";if(t&&"string"===typeof t){if(t=t.replace("http://www.loc.gov/mads/rdf/v1#",""),"PersonalName"==t)return e;if("CorporateName"==t)return i;if("NameTitle"==t)return o;if("Title"==t)return a;if("ConferenceName"==t)return r;if("Geographic"==t)return s;if("GenreForm"==t)return l;if("ComplexSubject"==t)return n;if("Topic"==t)return c;if("http://id.loc.gov/ontologies/bibframe/Person"==t)return e;if("http://id.loc.gov/ontologies/bibframe/Place"==t)return s;if("http://id.loc.gov/ontologies/bibframe/Topic"==t)return c;if("http://id.loc.gov/ontologies/bibframe/Organization"==t)return i}return"&nbsp;"},dupeProperty(){document.getElementsByClassName("left-menu-list-item-active").length>0&&document.getElementsByClassName("left-menu-list-item-active")[0].getElementsByClassName("left-menu-button-dupe-blank")[0].click()},assignID(t){let e=`${t.propertyURI}|${t.propertyLabel}`;return a["a"].state.activeProfileIdCounter[e]||(a["a"].state.activeProfileIdCounter[e]=0),a["a"].state.activeProfileIdCounter[e]++,`${t.propertyURI}|${t.propertyLabel}-${a["a"].state.activeProfileIdCounter[e]}`},renderBorders(t){setTimeout(()=>{var e=document.querySelectorAll(".component-container-input-container");for(let i=0;i<e.length;i++){let a=e[i].getElementsByClassName("component-container-fake-input");if(t)for(let t=0;t<a.length;t++)a[t].classList.add("no-upper-right-border-radius"),a[t].classList.add("no-upper-border"),a[t].classList.add("no-lower-right-border-radius");a.length>0&&(a[0].classList.remove("no-upper-right-border-radius"),a[0].classList.remove("no-upper-border"),a[a.length-1].classList.remove("no-lower-right-border-radius"))}},0)},prettifyXmlJS(t,e="\t",i="\n"){let a="",o="";const r=t.slice(1,-1).split(/>\s*</);"?"==r[0][0]&&(a+="<"+r.shift()+">"+i);for(let s=0;s<r.length;s++){const t=r[s];"/"==t[0]&&(o=o.slice(e.length)),a+=o+"<"+t+">"+i,"/"!=t[0]&&"/"!=t[t.length-1]&&-1==t.indexOf("</")&&(o+=e)}return a},prettifyXml(t){try{var e=(new DOMParser).parseFromString(t,"application/xml"),i=(new DOMParser).parseFromString(['<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">','  <xsl:strip-space elements="*"/>','  <xsl:template match="para[content-style][not(text())]">','    <xsl:value-of select="normalize-space(.)"/>',"  </xsl:template>",'  <xsl:template match="node()|@*">','    <xsl:copy><xsl:apply-templates select="node()|@*"/></xsl:copy>',"  </xsl:template>",'  <xsl:output indent="yes"/>',"</xsl:stylesheet>"].join("\n"),"application/xml"),a=new XSLTProcessor;a.importStylesheet(i);var o=a.transformToDocument(e),r=(new XMLSerializer).serializeToString(o);return r}catch{return"Because you are using Firefox or IE Edge I can't make this XML look nice, but here you go anyway:\n\n\n"+t}}};e["a"]=o},9068:function(t,e,i){"use strict";i("5319"),i("ddb0");var a=i("adac"),o=i("8ad1"),r=i("dd89"),s=i("1a1e");const l=t=>t.replace(/[&<>'"]/g,t=>({"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"}[t])),n=function(){let t;try{t=new DOMParser}catch(e){t=new window.DOMParser}return t},c=function(t,e="\t",i="\n"){if(!t)return"No XML";let a="",o="";const r=t.slice(1,-1).split(/>\s*</);"?"==r[0][0]&&(a+="<"+r.shift()+">"+i);for(let s=0;s<r.length;s++){const t=r[s];"/"==t[0]&&(o=o.slice(e.length)),a+=o+"<"+t+">"+i,"/"!=t[0]&&"/"!=t[t.length-1]&&-1==t.indexOf("</")&&(o+=e)}return a},d=n(),u={namespace:{bflc:"http://id.loc.gov/ontologies/bflc/",bf:"http://id.loc.gov/ontologies/bibframe/",bfsimple:"http://id.loc.gov/ontologies/bfsimple/",madsrdf:"http://www.loc.gov/mads/rdf/v1#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",lclocal:"http://id.loc.gov/ontologies/lclocal/",pmo:"http://performedmusicontology.org/ontology/",datatypes:"http://id.loc.gov/datatypes/",xsd:"http://www.w3.org/2001/XMLSchema#",void:"http://rdfs.org/ns/void#",mstatus:"https://id.loc.gov/vocabulary/mstatus/",mnotetype:"http://id.loc.gov/vocabulary/mnotetype/",owl:"http://www.w3.org/2002/07/owl#",dcterms:"http://purl.org/dc/terms/"},ignoreProperties:["http://id.loc.gov/ontologies/bibframe/instanceOf","http://id.loc.gov/ontologies/bibframe/hasItem","http://id.loc.gov/ontologies/bibframe/itemOf","http://id.loc.gov/ontologies/bibframe/hasInstance","http://id.loc.gov/ontologies/bibframe/Work"],debugHistory:[],xmlLog:[],namespaceUri:function(t){for(let e in this.namespace){let i=this.namespace[e];
1if(t.includes(i))return t.replace(i,e+":")}},UriNamespace:function(t){for(let e in this.namespace){let i=this.namespace[e];if(t.startsWith(e+":"))return t.replace(e+":",i)}},createElByBestNS:function(t){console.log("elStr",t),"http://www.loc.gov/mads/rdf/v1#"==t&&(t="http://www.loc.gov/mads/rdf/v1#Authority"),t=t.replace("https://","http://"),t.startsWith("http")||(t=this.UriNamespace(t));for(let e of Object.keys(this.namespace))if(t.startsWith(this.namespace[e]))return document.createElementNS(this.namespace[e],this.namespaceUri(t));return console.log(this.namespace),console.error("could not find namespace for ",t),null},specialTransforms:{},suggestType:async function(t,e){e||(e=!1);let i=!1;if("http://www.w3.org/2000/01/rdf-schema#label"===t)return"http://www.w3.org/2000/01/rdf-schema#Literal";if("http://www.loc.gov/mads/rdf/v1#authoritativeLabel"===t)return"http://www.w3.org/2000/01/rdf-schema#Literal";if("http://www.w3.org/1999/02/22-rdf-syntax-ns#value"===t)return"http://www.w3.org/2000/01/rdf-schema#Literal";if("http://www.loc.gov/mads/rdf/v1#componentList"===t)return"http://www.w3.org/1999/02/22-rdf-syntax-ns#List";let o=await a["a"].fetchOntology(t),s=d.parseFromString(o,"text/xml"),l=s.getElementsByTagName("rdfs:range");l.length>0&&(l=l[0],l.attributes["rdf:resource"]&&(i=l.attributes["rdf:resource"].value));let n=r["a"].suggestType(t,e);return 0!=n&&(i=n),"http://id.loc.gov/ontologies/bfsimple/prefTitle"===t&&(i="http://www.w3.org/2000/01/rdf-schema#Literal"),"http://id.loc.gov/ontologies/bfsimple/variantTitle"===t&&(i="http://www.w3.org/2000/01/rdf-schema#Literal"),"http://id.loc.gov/ontologies/bfsimple/transTitle"===t&&(i="http://www.w3.org/2000/01/rdf-schema#Literal"),"http://id.loc.gov/ontologies/bflc/date"===t&&(i="http://www.w3.org/2000/01/rdf-schema#Literal"),"http://id.loc.gov/ontologies/bflc/aap-normalized"===t&&(i="http://www.w3.org/2000/01/rdf-schema#Literal"),"http://id.loc.gov/ontologies/bflc/aap"===t&&(i="http://www.w3.org/2000/01/rdf-schema#Literal"),"http://id.loc.gov/ontologies/bflc/date"===i&&(i="http://www.w3.org/2000/01/rdf-schema#Literal"),"http://www.loc.gov/standards/datetime/pre-submission.html"==i&&(i="http://www.w3.org/2000/01/rdf-schema#Literal"),"http://id.loc.gov/ontologies/bflc/simplePlace"===t&&(i="http://www.w3.org/2000/01/rdf-schema#Literal"),"http://id.loc.gov/ontologies/bflc/simpleAgent"===t&&(i="http://www.w3.org/2000/01/rdf-schema#Literal"),"http://id.loc.gov/ontologies/bflc/simpleDate"===t&&(i="http://www.w3.org/2000/01/rdf-schema#Literal"),"http://performedmusicontology.org/ontology/hasMediumComponent"===t&&(i="http://www.w3.org/2000/01/rdf-schema#Resource"),"http://performedmusicontology.org/ontology/hasNumberOfHands"===t&&(i="http://www.w3.org/2000/01/rdf-schema#Literal"),"http://performedmusicontology.org/ontology/hasMediumCount"===t&&(i="http://www.w3.org/2000/01/rdf-schema#Literal"),"http://id.loc.gov/ontologies/bflc/readMarc382"===t&&(i="http://www.w3.org/2000/01/rdf-schema#Literal"),"http://id.loc.gov/ontologies/bibframe/subject"===t&&(i="http://www.w3.org/2000/01/rdf-schema#Resource"),"http://id.loc.gov/ontologies/bibframe/Note"===t&&(i="http://www.w3.org/2000/01/rdf-schema#Resource"),"http://id.loc.gov/ontologies/bibframe/note"===t&&(i="http://www.w3.org/2000/01/rdf-schema#Resource"),console.log("result of typing:",i,n),console.log(),!1===i&&console.warn("Could not @type this ",t),i},toBFXML:async function(t){console.log("profile going in",t);let e="";try{e=JSON.stringify(t)}catch(i){e="Error converting profile to json"}if(s["a"].returnUrls().dev)return await this.toBFXMLProcess(t);try{return await this.toBFXMLProcess(t)}catch(i){let o=`\n\n\t\t\t\tError: ${i}\n\n\t\t\t\t----------------\n\t\t\t\tXML Creation Log\n\t\t\t\t----------------\n\t\t\t\t${JSON.stringify(this.xmlLog,null,2)}\n\t\t\t\t----End Creation Log----\n\n\n\t\t\t\t****************\n\t\t\t\tXML Source\n\t\t\t\t****************\n\t\t\t\t${t.xmlSource?t.xmlSource:"No Source Found"}\n\t\t\t\t***End Source***\n\t\t\t\t`;const r=`${Math.floor(Date.now()/1e3)}_${t.user}_`+`${(new Date).toDateString()}
1_${(new Date).toTimeString()}`.replaceAll(" ","_").replaceAll(":","-")+".txt";return a["a"].sendErrorReportLog(o,r,e),alert(`------------------------------------- \nThere was an error building the XML \nAn error report was saved on the server:\n${r}\n-------------------------------------`),!1}},hasUserValue:function(t){for(let e in t)if("@id"==e||e.includes("http://")||e.includes("https://"))return!0;return!1},needsNewPredicate:function(t){return"http://www.loc.gov/mads/rdf/v1#componentList"!=t},isBnode:function(t){return!!t["@type"]},debug:function(t,e,i,a,o,r){let s=!0;s&&console.log(t,e,i,a,o,r);let l=[];t&&l.push(t),e&&l.push(e),i&&l.push(i),a&&l.push(a),o&&l.push(o),r&&l.push(r),this.debugHistory.push(l)},createBnode:function(t,e){if("http://id.loc.gov/ontologies/bibframe/agent"==e){let e=this.createElByBestNS("bf:Agent");t["@id"]&&e.setAttributeNS(this.namespace.rdf,"rdf:about",t["@id"]);let i=this.createElByBestNS("rdf:type");return i.setAttributeNS(this.namespace.rdf,"rdf:resource",t["@type"]),e.appendChild(i),t["@parseType"]&&e.setAttribute("rdf:parseType",t["@parseType"]),e}if(t["@type"]&&t["@type"].includes("id.loc.gov/vocabulary/mnotetype")){let e=this.createElByBestNS("bf:Note"),i=this.createElByBestNS("rdf:type");return i.setAttributeNS(this.namespace.rdf,"rdf:resource",t["@type"]),e.appendChild(i),e}{let e=this.createElByBestNS(t["@type"]);return t["@id"]&&e.setAttributeNS(this.namespace.rdf,"rdf:about",t["@id"]),t["@parseType"]&&e.setAttribute("rdf:parseType",t["@parseType"]),e}},createLiteral:function(t,e){let i=this.createElByBestNS(t);if(e[t]){if(""==e[t].trim())return!1;i.innerHTML=l(e[t])}return e["@id"]&&i.setAttributeNS(this.namespace.rdf,"rdf:resource",e["@id"]),e["@datatype"]&&i.setAttributeNS(this.namespace.rdf,"rdf:datatype",e["@datatype"]),e["@language"]&&i.setAttribute("xml:lang",e["@language"]),e["@parseType"]&&i.setAttribute("rdf:parseType",e["@parseType"]),i},toBFXMLProcess:async function(t){this.debugHistory=[],this.xmlLog=[];let e={},i=t;t=JSON.parse(JSON.stringify(t));let a=[],r=[],d=[],u=document.createElementNS(this.namespace.rdf,"RDF"),p=document.createElementNS(this.namespace.rdf,"RDF");for(let o of Object.keys(this.namespace))u.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:"+o,this.namespace[o]),p.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:"+o,this.namespace[o]);let h=[],f=[],m=[],g="",b="",v="",y={Work:{},Instance:{},Item:{},Hub:{}};for(let o of t.rtOrder){if(this.xmlLog.push("Processing rt: "+o),t.rt[o].noData){this.xmlLog.push(` - ${o} has no data, skipping it.`);continue}let s,u,p;if(o.includes(":Work"))s=a,u=document.createElementNS(this.namespace.bf,"bf:Work"),p="Work";else if(o.includes(":Instance"))s=r,u=document.createElementNS(this.namespace.bf,"bf:Instance"),p="Instance";else if(o.includes(":Item"))s=d,u=document.createElementNS(this.namespace.bf,"bf:Item"),p="Item";else{if(!o.endsWith(":Hub")){this.xmlLog.push("Dunno what this part is, skipping "+o);continue}s=d,u=document.createElementNS(this.namespace.bf,"bf:Hub"),p="Hub"}if(this.xmlLog.push("Building "+p),t.rt[o].URI&&(u.setAttributeNS(this.namespace.rdf,"rdf:about",t.rt[o].URI),this.xmlLog.push("Setting URI for this resource rdf:about to: "+t.rt[o].URI),m.push(t.rt[o].URI)),t.rt[o]["@type"]){let e=this.createElByBestNS("http://www.w3.org/1999/02/22-rdf-syntax-ns#type");e.setAttributeNS(this.namespace.rdf,"rdf:resource",t.rt[o]["@type"]),this.xmlLog.push("Setting URI for this resource rdf:resource to: "+t.rt[o]["@type"]),u.appendChild(e)}this.xmlLog.push("Looping through the PTs");for(let i of t.rt[o].ptOrder){let a,r=t.rt[o].pt[i];this.xmlLog.push("Working on: "+i),console.log("ptObj.userValue",r.userValue),a=r.userValue[r.propertyURI]&&r.userValue[r.propertyURI][0]?r.userValue[r.propertyURI][0]:r.userValue[r.propertyURI]?r.userValue[r.propertyURI]:r.userValue;for(let t of Object.keys(a))"undefined"===t&&delete a[t];if(console.log("HEYYY THI SI USER VALEU"),console.log(a),console.log("ptObj.propertyURI",r.propertyURI),console.log("ptObj.userValue[ptObj.propertyURI]",r.userValue[r.propertyURI]),this.xmlLog.push(["Set userValue to:",JSON.parse(JSON.stringify(a))]),this.ignoreProperties.indexOf(r.propertyURI)>-1)this.xmlLog.push("Skpping it because it is in the ignoreProperties list");else{if(i.includes("http://id.loc.gov/ontologies/bibframe/adminMetadata")){let t=r.userValue["http://id.loc.gov/ontologies/bibframe/adminMetadata"][0];t["http://id.loc.gov/ontologies/bflc/profile"]=[{"http://id.loc.gov/ontologies/bflc/profile":o}];
1try{delete t["http://id.loc.gov/ontologies/bibframe/changeDate"]}catch(x){}t["http://id.loc.gov/ontologies/bibframe/changeDate"]=[{"http://id.loc.gov/ontologies/bibframe/changeDate":(new Date).toISOString().split(".")[0]+"Z","@datatype":"http://www.w3.org/2001/XMLSchema#dateTime"}],t["http://id.loc.gov/ontologies/bibframe/creationDate"]||(t["http://id.loc.gov/ontologies/bibframe/creationDate"]=[{"http://id.loc.gov/ontologies/bibframe/creationDate":(new Date).toISOString().split(".")[0]+"Z","@datatype":"http://www.w3.org/2001/XMLSchema#dateTime"}]),this.xmlLog.push(["Set adminData to:",JSON.parse(JSON.stringify(t))])}if(this.hasUserValue(a))if(-1==h.indexOf(o)&&h.push(o),-1==f.indexOf(p)&&f.push(p),this.isBnode(a)){this.debug(r.propertyURI,"root level element, is bnode",a),this.xmlLog.push("Root level bnode: "+r.propertyURI);let t=this.createElByBestNS(r.propertyURI),s=this.createBnode(a,r.propertyURI);this.xmlLog.push(`Created lvl 1 predicate: ${t.tagName} and bnode: ${s.tagName}`);for(let e of Object.keys(a).filter(t=>!t.includes("@"))){this.xmlLog.push(`Looking at property : ${e} in the userValue`),console.log("userValue",a);let t=this.createElByBestNS(e);if("http://www.loc.gov/mads/rdf/v1#componentList"==e&&t.setAttribute("rdf:parseType","Collection"),this.xmlLog.push("Created lvl 2 predicate: "+t.tagName),"http://www.w3.org/1999/02/22-rdf-syntax-ns#type"==e){if(a[e]&&a[e][0]&&a[e][0]["@id"]){let t=this.createElByBestNS(e);t.setAttributeNS(this.namespace.rdf,"rdf:resource",a[e][0]["@id"]),s.appendChild(t),this.xmlLog.push(`This bnode just has a rdf:type : ${t} setting it an continuing`);continue}if(a[e]&&a[e][0]&&a[e][0]["http://www.w3.org/2000/01/rdf-schema#label"]){let t=this.createElByBestNS(e);t.innerHTML=l(a[e][0]["http://www.w3.org/2000/01/rdf-schema#label"][0]["http://www.w3.org/2000/01/rdf-schema#label"]),this.xmlLog.push(`This bnode just has a rdf:type and label : ${t} setting it an continuing`),s.appendChild(t);continue}}let i=!0;for(let o of a[e]){if(!i&&this.needsNewPredicate(e)&&(t=this.createElByBestNS(e),this.xmlLog.push(`Creating lvl 2 property : ${t.tagName} for ${JSON.stringify(o)}`)),this.isBnode(o)){let i=this.createBnode(o,e);t.appendChild(i),s.appendChild(t),this.xmlLog.push("Creating bnode lvl 2 for it "+i.tagName);for(let t of Object.keys(o).filter(t=>!t.includes("@"))){let e=this.createElByBestNS(t);this.xmlLog.push(`Creating lvl 3 property: ${e.tagName} for ${t}`);for(let r of o[t])if(this.isBnode(r)){let o=this.createBnode(r,t);e.appendChild(o),i.appendChild(e),this.xmlLog.push(`Creating lvl 3 bnode: ${o.tagName} for ${t}`);for(let t of Object.keys(r).filter(t=>!t.includes("@")))for(let e of r[t])if(this.isBnode(e))console.error("Max hierarchy depth reached, but there are more levels left:",t,"in",a),this.xmlLog.push("Max hierarchy depth reached, but there are more levels left for "+t);else for(let t of Object.keys(e).filter(t=>!t.includes("@")))if("string"==typeof e[t]||"number"==typeof e[t]){let i=this.createLiteral(t,e);!1!==i&&o.appendChild(i),this.xmlLog.push(`Added literal ${i} for ${t}`)}else console.error("key4",t,e[t],"not a literal, should not happen"),this.xmlLog.push("Error not a literal but I thought it was at "+t)}else for(let t of Object.keys(r).filter(t=>!t.includes("@")))if("string"==typeof r[t]||"number"==typeof r[t]){let e=this.createLiteral(t,r);!1!==e&&i.appendChild(e),this.xmlLog.push(`Created Literal ${e.innerHTML} for ${t}`)}else console.error("key3",t,r[t],"not a literal, should not happen"),this.xmlLog.push("Error not a literal but I thought it was at "+t)}}else{this.xmlLog.push("It's value at lvl is not a bnode, looping through and adding a literal value");let t=Object.keys(o).filter(t=>!t.includes("@"));if(a["@type"]&&e===a["@type"]&&o["@id"]&&(this.xmlLog.push("Setting its rdf:about to "+o["@id"]),s.setAttributeNS(this.namespace.rdf,"rdf:about",o["@id"])),t.length>0)for(let e of t)if("string"==typeof o[e]||"number"==typeof o[e]){let t=this.createLiteral(e,o);this.xmlLog.push("Creating literal "+JSON.stringify(o)),!1!==t&&s.appendChild(t)}else if(Array.isArray(o[e]))for(let t of o[e]){let e=Object.keys(t).filter(t=>!t.includes("@"));if(e.length>0)for(let i of e)if("string"==typeof t[i]||"number"==typeof t[i]){let e=this.createLiteral(i,t);this.xmlLog.push("Creating literal "+JSON.stringify(t[i])),!1!==e&&s.appendChild(e)}else console.error("key22",i,t[i],"not a literal, should not happen"),this.xmlLog.push("Error not a literal "+t[i])}else console.error("key2",e,o[e],"not a literal, should not happen"),this.xmlLog.push(`Key 2 (${e}) error, not a literal ${o[e]}`);else if(0==t.length&&o["@id"]){let t=this.createLiteral(e,o);!1!==t&&s.appendChild(t)}else console.error("Unhadled literal situtation")}i=!1}}t.appendChild(s),u.appendChild(t),e[`${o}-${i}`]=c(t.outerHTML)}else{this.debug(r.propertyURI,"root level element does not look like a bno
1de",a),this.xmlLog.push("Root level does not look like a bnode: "+r.propertyURI);let t=a;Array.isArray(a)||(t=[a]);for(let a of t)if(a["@flags"]&&a["@flags"].indexOf("simpleLookupTopLevelMulti")>-1){if(this.xmlLog.push("Found special flag rule for "+r.propertyURI),a["http://www.w3.org/2000/01/rdf-schema#label"]){let t="";for(let e of a["http://www.w3.org/2000/01/rdf-schema#label"]){let i=this.createElByBestNS(r.propertyURI),o=this.createElByBestNS(await this.suggestType(r.propertyURI));if(this.xmlLog.push(`Created ${i.tagName} property and ${o.tagName} bnode`),i.appendChild(o),u.appendChild(i),e["http://www.w3.org/2000/01/rdf-schema#label"]){let t=this.createElByBestNS("http://www.w3.org/2000/01/rdf-schema#label");t.innerHTML=l(e["http://www.w3.org/2000/01/rdf-schema#label"]),o.appendChild(t)}e["@id"]?(this.xmlLog.push("Set rdf:about from label bnode "+e["@id"]),o.setAttributeNS(this.namespace.rdf,"rdf:about",e["@id"])):a["@id"]&&(this.xmlLog.push("Set rdf:about from root userValue @id "+a["@id"]),o.setAttributeNS(this.namespace.rdf,"rdf:about",a["@id"])),t=t+"\n"+c(i.outerHTML)}e[`${o}-${i}`]=t}}else if(a["@type"]&&a["@id"]){this.debug(r.propertyURI,"But has @type, making bnode");let t=this.createElByBestNS(r.propertyURI),s=this.createElByBestNS(a["@type"]);s.setAttributeNS(this.namespace.rdf,"rdf:about",a["@id"]),this.xmlLog.push(`Created ${t.tagName} property and ${s.tagName} bnode`),t.appendChild(s),u.appendChild(t),e[`${o}-${i}`]=c(t.outerHTML)}else if(a["@type"]&&!a["@id"])this.debug(r.propertyURI,"Does not have URI, error",a),this.xmlLog.push(`Should have a URI in ${r.propertyURI} but can't find one`),console.error("Does not have URI, ERROR");else if("http://www.w3.org/2000/01/rdf-schema#Literal"==await this.suggestType(r.propertyURI)){let t="";for(let e of Object.keys(a).filter(t=>!t.includes("@")))if("string"===typeof a[e]||"number"===typeof a[e]){let i=this.createLiteral(e,a);!1!==i&&(u.appendChild(i),this.xmlLog.push(`Creating literal at root level for ${e} with value ${i.innerHTML}`),t=t+"\n"+c(i.outerHTML))}else for(let i of a[e])for(let e of Object.keys(i).filter(t=>!t.includes("@")))if("string"==typeof i[e]||"number"==typeof i[e]){let a=this.createLiteral(e,i);!1!==a&&(u.appendChild(a),t=t+"\n"+c(a.outerHTML),this.xmlLog.push(`Creating literal at root level for ${e} with value ${i}`))}else console.error("key2",e,i[e],"not a literal, should not happen"),this.xmlLog.push(`Not a literal at root level ${e} with value ${i[e]}`);e[`${o}-${i}`]=t}else if("http://www.w3.org/2000/01/rdf-schema#Resource"==await this.suggestType(r.propertyURI)){let t="";for(let e of Object.keys(a).filter(t=>!t.includes("@")))for(let i of a[e])for(let e of Object.keys(i).filter(t=>!t.includes("@")))if("string"==typeof i[e]||"number"==typeof i[e]){let a=this.createLiteral(e,i);!1!==a&&(u.appendChild(a),t=t+"\n"+c(a.outerHTML),this.xmlLog.push(`Listed as rdf:Resource but treating it a a literal, Creating literal for ${e} with value ${a.innerHTML}`))}else console.error("key2",e,i[e],"not a literal, should not happen"),this.xmlLog.push(`Not a literal at root level ${e} with value ${i[e]}`);e[`${o}-${i}`]=t}else if(a["@id"]){let t=this.createElByBestNS(r.propertyURI);t.setAttributeNS(this.namespace.rdf,"rdf:resource",a["@id"]),u.appendChild(t),e[`${o}-${i}`]=c(t.outerHTML)}else if("http://www.w3.org/2000/01/rdf-schema#label"==r.propertyURI){let t=this.createElByBestNS(r.propertyURI);t.innerHTML=l(a["http://www.w3.org/2000/01/rdf-schema#label"][0]["http://www.w3.org/2000/01/rdf-schema#label"]),u.appendChild(t),e[`${o}-${i}`]=c(t.outerHTML)}else this.debug(r.propertyURI,"Does not have @type, something is wrong here",a),console.warn("Should not be here")}else this.xmlLog.push("Skpping it because hasUserValue == false")}}if(i.rt[o].unusedXml){let t=n(),e=t.parseFromString(i.rt[o].unusedXml,"text/xml");e=e.children[0];for(let i of e.children)if("rdfs:label"!=i.tagName){let e=(new XMLSerializer).serializeToString(i);e=t.parseFromString(e,"text/xml"),e=e.children[0],u.appendChild(e)}}y[p][i.rt[o].URI]=u}let w=n();for(let o in y["Work"]){let t=(new XMLSerializer).serializeToString(y["Work"][o]);t=w.parseFromString(t,"text/xml").children[0],p.appendChild(t)}for(let o in y["Hub"]){let t=(new XMLSerializer).serializeToString(y["Hub"][o]);t=w.parseFromString(t,"text/xml").children[0],p.appendChild(t)}for(let o in y["Instance"]){let t=(new XMLSerializer).serializeToString(y["Instance"][o]);t=w.parseFromString(t,"text/xml").children[0];let e=this.returnHasItem(o,i,y);for(let i of e){let e=null;if(i.attributes["rdf:resource"]?e=i.attributes["rdf:resource"].value:i.attributes["rdf:about"]&&(e=i.attributes["rdf:about"].value),e){let i=this.createElByBestNS("bf:hasItem");i.setAttributeNS(this.namespace.rdf,"rdf:resource",e),t.appendChild(i)}}for(let i in y["Work"]){let e=this.createElByBestNS("bf:instanceOf");e.setAttributeNS(this.namespace.rdf,"rdf:resource",i),t.appendChild(e)}p.appendChild(t)}for(let o in y["Item"]){let t=(new XMLSerializer).serializeToString(y["Item"][o]
1);t=w.parseFromString(t,"text/xml").children[0],p.appendChild(t)}if(i.procInfo.includes("update"))if(Object.keys(y["Instance"]).length>0)for(let o in y["Instance"]){let t=(new XMLSerializer).serializeToString(y["Instance"][o]);t=w.parseFromString(t,"text/xml").children[0];let e=this.returnHasItem(o,i,y);if(e.length>0)for(let i of e){let e=this.createElByBestNS("bf:hasItem");e.appendChild(i),t.appendChild(e)}let a=this.returnWorkFromInstance(o,i,y);if(a){let e=this.createElByBestNS("bf:instanceOf");e.appendChild(a),t.appendChild(e)}u.appendChild(t)}else{let t=Object.keys(y["Work"])[0],e=y["Work"][t];e&&u.appendChild(e)}else for(let o in y["Instance"]){let t=(new XMLSerializer).serializeToString(y["Instance"][o]);t=w.parseFromString(t,"text/xml").children[0];let e=this.returnHasItem(o,i,y);if(e.length>0)for(let i of e){let e=this.createElByBestNS("bf:hasItem");e.appendChild(i),t.appendChild(e)}let a=this.returnWorkFromInstance(o,i,y);if(a){let e=this.createElByBestNS("bf:instanceOf");e.appendChild(a),t.appendChild(e)}u.appendChild(t)}if(0==Object.keys(y["Work"]).length&&1==Object.keys(y["Hub"]).length){let t=(new XMLSerializer).serializeToString(p);t=w.parseFromString(t,"text/xml").children[0],u=t}if(p.getElementsByTagName("bf:mainTitle").length>0?g=p.getElementsByTagName("bf:mainTitle")[0].innerHTML:p.getElementsByTagName("bfsimple:prefTitle").length>0?g=p.getElementsByTagName("bfsimple:prefTitle")[0].innerHTML:console.warn("no title found for db"),p.getElementsByTagName("bflc:PrimaryContribution").length>0?p.getElementsByTagName("bflc:PrimaryContribution")[0].getElementsByTagName("rdfs:label").length>0&&(b=p.getElementsByTagName("bflc:PrimaryContribution")[0].getElementsByTagName("rdfs:label")[0].innerHTML):p.getElementsByTagName("bf:Contribution").length>0&&p.getElementsByTagName("bf:Contribution")[0].getElementsByTagName("rdfs:label").length>0?b=p.getElementsByTagName("bf:Contribution")[0].getElementsByTagName("rdfs:label")[0].innerHTML:console.warn("no PrimaryContribution or Contribution found for db"),p.getElementsByTagName("bf:Instance").length>0){let t=p.getElementsByTagName("bf:Instance")[0];for(let e of t.children)if("bf:identifiedBy"===e.tagName&&e.getElementsByTagName("bf:Lccn").length>0){let t=e.getElementsByTagName("bf:Lccn")[0];if(0==t.getElementsByTagName("bf:Status").length)v=t.innerText||t.textContent;else if(t.getElementsByTagName("bf:Status").length>0){if(t.getElementsByTagName("bf:Status")[0].hasAttribute("rdf:about")&&"http://id.loc.gov/vocabulary/mstatus/cancinv"==t.getElementsByTagName("bf:Status")[0].attributes["rdf:about"].value)continue;for(let e of t.children)"rdf:value"==e.tagName&&(v=e.innerText||e.textContent)}}}let k,S=document.createElementNS(this.namespace.void,"void:DatasetDescription");S.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:void",this.namespace.void),S.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:lclocal",this.namespace.lclocal);for(let o of h)k=document.createElementNS(this.namespace.lclocal,"lclocal:rtsused"),k.innerHTML=l(o),S.appendChild(k);for(let o of f)k=document.createElementNS(this.namespace.lclocal,"lclocal:profiletypes"),k.innerHTML=l(o),S.appendChild(k);k=document.createElementNS(this.namespace.lclocal,"lclocal:title"),k.innerHTML=l(g),S.appendChild(k),k=document.createElementNS(this.namespace.lclocal,"lclocal:contributor"),k.innerHTML=l(b),S.appendChild(k),k=document.createElementNS(this.namespace.lclocal,"lclocal:lccn"),k.innerHTML=l(v),S.appendChild(k),k=document.createElementNS(this.namespace.lclocal,"lclocal:user"),k.innerHTML=l(t.user),S.appendChild(k),k=document.createElementNS(this.namespace.lclocal,"lclocal:status"),k.innerHTML=l(t.status),S.appendChild(k),k=document.createElementNS(this.namespace.lclocal,"lclocal:eid"),k.innerHTML=l(t.eId),S.appendChild(k),k=document.createElementNS(this.namespace.lclocal,"lclocal:typeid"),k.innerHTML=l(t.id),S.appendChild(k),k=document.createElementNS(this.namespace.lclocal,"lclocal:procinfo"),k.innerHTML=l(i.procInfo),S.appendChild(k);for(let o of m)k=document.createElementNS(this.namespace.lclocal,"lclocal:externalid"),k.innerHTML=l(o),S.appendChild(k);let C=(new XMLSerializer).serializeToString(u);C=o["a"].prettifyXmlJS(C," "),p.appendChild(S);let L=(new XMLSerializer).serializeToString(p),I=(new XMLSerializer).serializeToString(u);if(s["a"].postUsingAlmaXmlFormat){let t=p.getElementsByTagName("bf:Work"),e=p.getElementsByTagName("bf:Instance"),i=p.getElementsByTagName("bf:Item");const a=document.implementation.createDocument("","",null);let o=a.createElement("bib"),r=a.createElement("record_format");r.innerHTML="BIBFRAME",o.appendChild(r);let s=a.createElement("record"),l=a.createElement("rdf:RDF");l.setAttribute("xmlns:rdf","http://www.w3.org/1999/02/22-rdf-syntax-ns#"),s.appendChild(l),o.appendChild(s);for(let c of t)l.appendChild(c);for(let c of e)l.appendChild(c);for(let c of i)l.appendChild(c);let n=(new XMLSerializer).serializeToString(o);I=n}let _=this.createElByBestNS("http://www.w3.org/1999/02/22-rdf-syntax-ns#RDF");for(let o of p.getElementsByTagName("bf:Work"))_.appendChild(o);for(let o of p.getElementsByTagName("bf:Instance"))_.appendChild(o);for(let o of p.getElementsByTagName("bf:Item"))_.appendChild(o);let T=(new XMLSerializer).serializeToString(_);return{xmlDom:u,xmlStringFormatted:C,xlmString:I,bf2Marc:T,xlmStringBasic:L,voidTitle:g,voidContributor:b,componentXmlLookup:e}}
1,returnHasItem:function(t,e,i){let a=[],o=n();for(let r in e.rt)if(e.rt[r].itemOf&&e.rt[r].itemOf==t){if(0==i["Item"][e.rt[r].URI].getElementsByTagName("bf:itemOf").length){let t=this.createElByBestNS("bf:itemOf");t.setAttributeNS(this.namespace.rdf,"rdf:resource",e.rt[r].itemOf),i["Item"][e.rt[r].URI].appendChild(t)}let t=(new XMLSerializer).serializeToString(i["Item"][e.rt[r].URI]);t=o.parseFromString(t,"text/xml").children[0],a.push(t)}return a},returnWorkFromInstance:function(t,e,i){let a=n(),o=null;for(let r in e.rt)e.rt[r].instanceOf&&e.rt[r].URI==t&&(o=(new XMLSerializer).serializeToString(i["Work"][e.rt[r].instanceOf]),o=a.parseFromString(o,"text/xml").children[0]);if(!o)for(let r in i["Work"]){o=i["Work"][r];break}return o}};e["a"]=u},"90ed":function(t,e,i){},9440:function(t,e,i){"use strict";var a=i("b581"),o=i.n(a);o.a},"960b":function(t){t.exports=JSON.parse('{"KeyO":[{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+o","code":"KeyO","codeEscape":"́","combining":true,"nick":"Acute","unicode":"0301","name":"Acute / Combining Acute Accent (Oxia)"},{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+o","code":"KeyO","codeEscape":"̋","combining":true,"nick":"Double acute","unicode":"030B","name":"Double Acute / Combining Double Acute Accent"}],"KeyQ":[{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+q","code":"KeyQ","codeEscape":"æ","combining":false,"nick":"ae Digraph","unicode":"00E6","name":"ae Digraph (Lowercase)  / Latin Small Ligature ae"},{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+q","code":"KeyQ","codeEscape":"Æ","combining":false,"nick":"AE Digraph","unicode":"00C6","name":"AE Digraph (Uppercase) / Latin Capital Ligature AE"}],"KeyD":[{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+d","code":"KeyD","codeEscape":"ʼ","combining":false,"nick":"Alif","unicode":"02BC","name":"Alif / Modifier Letter Right Half Ring"}],"KeyS":[{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+s","code":"KeyS","codeEscape":"ʻ","combining":false,"nick":"Ayn","unicode":"02BB","name":"Ayn / Modifier Letter Turned Comma"},{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+s","code":"KeyS","codeEscape":"ð","combining":false,"nick":"Eth","unicode":"00F0","name":"Eth (Lowercase) / Latin Small Letter Eth (Icelandic)"}],"Period":[{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+.","code":"Period","codeEscape":"̆","combining":true,"nick":"Breve","unicode":"0306","name":"Breve / Combining Breve (Vrachy)"},{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+.","code":"Period","codeEscape":"̮","combining":true,"nick":"Upadhmaniya","unicode":"032E","name":"Upadhmaniya / Combining Breve Below"}],"KeyC":[{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+c","code":"KeyC","codeEscape":"£","combining":false,"nick":"British pound","unicode":"00A3","name":"British Pound / Pound Sign"}],"Space":[{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+","code":"Space","codeEscape":"̐","combining":true,"nick":"Candrabindu","unicode":"0310","name":"Candrabindu / Combining Candrabindu"},{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+","code":"Space","codeEscape":"̓","combining":true,"nick":"High comma centered","unicode":"0313","name":"High Comma Centered / Combining Comma Above (Psili)"}],"KeyJ":[{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+j","code":"KeyJ","codeEscape":"̧","combining":true,"nick":"Cedilla","unicode":"0327","name":"Cedilla / Combining Cedilla"},{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+j","code":"KeyJ","codeEscape":"̜","combining":true,"nick":"Right cedilla","unicode":"031C","
1name":"Right Cedilla / Combining Left Half Ring Below"}],"Slash":[{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+/","code":"Slash","codeEscape":"̊","combining":true,"nick":"Angstrom","unicode":"030A","name":"Circle Abov Angstrom / Combining Ring Above"},{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+/","code":"Slash","codeEscape":"̥","combining":true,"nick":"Circle below","unicode":"0325","name":"Circle Below / Combining Ring Below"}],"Backslash":[{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+\\\\","code":"Backslash","codeEscape":"̂","combining":true,"nick":"Circumflex","unicode":"0302","name":"Circumflex / Combining Circumflex Accent"},{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+\\\\","code":"Backslash","codeEscape":"±","combining":false,"nick":"Plus or minus","unicode":"00B1","name":"Plus Or Minus / Plus-Minus Sign"}],"KeyU":[{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+u","code":"KeyU","codeEscape":"đ","combining":false,"nick":"d with crossbar","unicode":"0111","name":"d With Crossbar (Lowercase) / Latin Small Letter D With Stroke"},{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+u","code":"KeyU","codeEscape":"Đ","combining":false,"nick":"D with crossbar","unicode":"0110","name":"D With Crossbar (Uppercase) / Latin Capital Letter D With Stroke"}],"KeyN":[{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+n","code":"KeyN","codeEscape":"̣","combining":true,"nick":"Dot below","unicode":"0323","name":"Dot Below / Combining Dot Below"},{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+n","code":"KeyN","codeEscape":"̇","combining":true,"nick":"Dot above","unicode":"0307","name":"Superior Dot / Combining Dot Above"}],"KeyM":[{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+m","code":"KeyM","codeEscape":"̤","combining":true,"nick":"Double dot below","unicode":"0324","name":"Double Dot Below / Combining Diaeresis Below"},{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+m","code":"KeyM","codeEscape":"̈","combining":false,"nick":"Umlaut","unicode":"0308","name":false}],"KeyK":[{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+k","code":"KeyK","codeEscape":"︠","combining":false,"nick":"Double tilde first half","unicode":"FE20","name":"Double Tilde First Half (Use Diacritic Mode"}],"KeyL":[{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+l","code":"KeyL","codeEscape":"︡","combining":false,"nick":"Double tilde second half","unicode":"FE21","name":"Double Tilde Second Half (Use Diacritic Mode"},{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+l","code":"KeyL","codeEscape":"︡","combining":true,"nick":"Ligature right","unicode":"FE21","name":"Ligature Second Half (Use Diacritic Mode"}],"KeyF":[{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+f","code":"KeyF","codeEscape":"̳","combining":true,"nick":"Double underscore","unicode":"0333","name":"Double Underscore / Combining Double Low Line"},{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+f","code":"KeyF","codeEscape":"̄","combining":true,"nick":"Macron","unicode":"0304","name":"Macron / Combining Macron"}],"Backquote":[{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+`","code":"Backquote","codeEscape":"̀","combining":true,"nick":"Grave","unicode":"0300","name":"Grave / Combining Grave Accent (Varia)"},{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+`","code":"Backquote","codeEscape":"̃","combining":true,"nick":"Tilde","unicode":"0303","name":"Tilde / Combining Tilde"}],"KeyP":[{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+p","code":"KeyP","codeEscape":"̌","combining":true,"nick":"Hachek","unicode":"030C","name":"Hacek / Combining Caron"}],"Quote":[{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+\'","code":"Quote","codeEscape":"̕","combining":true,"nick":"High comma off center","unicode":"0315","name":"High Comma Off Center / Combining Comma Above Right"},{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+\'","code":"Quote","codeEscape":"ı","combining":false,"nick":"Turkish i (Lowercase)","unicode":"0131","name":"Turkish i (Lowercase)  / Latin Small Letter Dotless i"}],"KeyH":[{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+h","code":"KeyH","codeEscape":"̦","combining":true,"nick":"Hook left","unicode":"0326","name":"Left Hook (Comma Below) / Combining Comma Below"},{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+h","code":"KeyH","codeEscape":"̨","combining":true,"nick":"Hook right","unicode":"0328","name":"Right Hook Ogonek / Combining Ogonek"}],"Digit9":[{"shiftKey":false,"ctrlKey":false,"altKey":true,"combo":"Alt+9","code":"Digit9","codeEscape":"︠","combining":true,"nick":"Ligature left","unicode":"FE20","name":"Ligature First Half (Use Diacritic Mode"},{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+9","code":"Digit9","codeEscape":"₉","combining":false,"nick":"Subscript 9","unicode":"2089","name":false},{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+9","code":"Digit9","codeEscape":"⁹","combining":false,"nick":"Superscript 9","unicode":"2079","name":false}],"KeyB":[{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+b","code":"KeyB","codeEscape":"·","combining":false,"nick":"Dot at midline","unicode":"00B7","name":"Middle Dot"}],"KeyV":[{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+v","code":"KeyV","codeEscape":"♭","combining":false,"nick":"Musical flat","unicode":"266D","name":"Music Flat Sign"}],"KeyR":[{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+r","code":"KeyR","codeEscape":"œ","combining":false,"nick":"oe digraph","unicode":"0153","name":"oe Digraph (Lowercase) / Latin Small Ligature oe"},{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+r","code":"KeyR","codeEscape":"Œ","combining":false,"nick":"OE digraph","unicode":"0152","name":"OE Digraph (Uppercase) / Latin Capital Ligature OE"}],"KeyT":[{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+t","code":"KeyT","codeEscape":"ơ","combining":false,"nick":"o hook","unicode":"01A1","name":"o-Hook (Lowercase)  / Latin Small Letter O With Horn"},{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+t","code":"KeyT","codeEscape":"Ơ","combining":false,"nick":"O hook","unicode":"01A0","name":"O-Hook (Uppercase) / Latin Capital Letter O With Horn"}],"KeyE":[{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+e","code":"KeyE","codeEscape":"ł","combining":false,"nick":"Polish l","unicode":"0142","name":"Polish L (Lowercase) / Latin Small Letter L With Stroke"},{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+e","code":"KeyE","codeEscape":"Ł","combining":false,"nick":"Polish L","unicode":"0141","name":"Polish L (Uppercase) / Latin Capital Letter L With Stroke"}],"KeyA":[{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+a","code":"KeyA","codeEscape":"̉","combining":true,"nick":"Pseudo question mark","unicode":"0309","name":"Pseudo Question Mark / Combining Hook Above"}],"KeyY":[{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+y","code":"KeyY","codeEscape":"ø","combining":false,"nick":"Scandinavian o","unicode":"00F8","name":"Scandinavian o (Lowercase) / Latin Small Letter O With Stroke"},{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+y","code":"KeyY","codeEscape":"Ø","combining":false,"nick":"Scandinavian O","unicode":"00D8","name":"Scandinavian O (Uppercase) / Latin Capital Letter O With Stroke"}],"KeyG":[{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+g","code":"KeyG","codeEscape":"ʹ","combining":false,"nick":"Myagkii znak","unicode":"02B9","name":"Soft Sign/Prime/ Miagkii znak / Modifier Letter Prime"},{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+g","code":"KeyG","codeEscape":"ʺ","combining":false,"nick":"Tverdii znak","unicode":"02BA","name":"Hard Sign / Tverdyi znak / Modifier Letter Double Prime"}],"Minus":[{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+-","code":"Minus","codeEscape":"₋","combining":false,"nick":"Subscript -","unicode":"208b","name":"Subscript - (minus)"},{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+-","code":"Minus","codeEscape":"⁻","combining":false,"nick":"Supercript -","unicode":"207b","name":"Superscript - (minus)"}],"BracketLeft":[{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+[","code":"BracketLeft","codeEscape":"₍","combining":false,"nick":"Subscript (","unicode":"208d","name":"Subscript (  (left paren)"},{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+[","code":"BracketLeft","codeEscape":"⁽","combining":false,"nick":"Superscript (","unicode":"207d","name":"Superscript (  (left paren)"}],"BracketRight":[{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+]","code":"BracketRight","codeEscape":"₎","combining":false,"nick":"Subscript )","unicode":"208e","name":"Subscript )  (right paren)"},{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+]","code":"BracketRight","codeEscape":"⁾","combining":false,"nick":"Superscript )","unicode":"207e","name":"Superscript )  (right paren)"}],"Equal":[{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+=","code":"Equal","codeEscape":"₊","combining":false,"nick":"Subscript +","unicode":"208a","name":"Subscript + (plus)"},{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+=","code":"Equal","codeEscape":"⁺","combining":false,"nick":"Superscript +","unicode":"207a","name":"Superscript + (plus)"}],"Digit0":[{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+0","code":"Digit0","codeEscape":"₀","combining":false,"nick":"Subscript 0","unicode":"2080","name":false},{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+0","code":"Digit0","codeEscape":"⁰","combining":false,"nick":"Superscript 0","unicode":"2070","name":false}],"Digit1":[{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+1","code":"Digit1","codeEscape":"₁","combining":false,"nick":"Subscript 1","unicode":"2081","name":false},{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+1","code":"Digit1","codeEscape":"¹","combining":false,"nick":"Superscript 1","unicode":"00B9","name":false}],"Digit2":[{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+2","code":"Digit2","codeEscape":"₂","combining":false,"nick":"Subscript 2","unicode":"2082","name":false},{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+2","code":"Digit2","codeEscape":"²","combining":false,"nick":"Superscript 2","unicode":"00B2","name":false}],"Digit3":[{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+3","code":"Digit3","codeEscape":"₃","combining":false,"nick":"Subscript 3","unicode":"2083","name":false},{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+3","code":"Digit3","codeEscape":"³","combining":false,"nick":"Superscript 3","unicode":"00B3","name":false}],"Digit4":[{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+4","code":"Digit4","codeEscape":"₄","combining":false,"nick":"Subscript 4","unicode":"2084","name":false},{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+4","code":"Digit4","codeEscape":"⁴","combining":false,"nick":"Superscript 4","unicode":"2074","name":false}],"Digit5":[{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+5","code":"Digit5","codeEscape":"₅","combining":false,"nick":"Subscript 5","unicode":"2085","name":false},{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+5","code":"Digit5","codeEscape":"⁵","combining":false,"nick":"Superscript 5","unicode":"2075","name":false}],"Digit6":[{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+6","code":"Digit6","codeEscape":"₆","combining":false,"nick":"Subscript 6","unicode":"2086","name":false},{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+6","code":"Digit6","codeEscape":"⁶","combining":false,"nick":"Superscript 6","unicode":"2076","name":false}],"Digit7":[{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+7","code":"Digit7","codeEscape":"₇","combining":false,"nick":"Subscript 7","unicode":"2087","name":false},{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+7","code":"Digit7","codeEscape":"⁷","combining":false,"nick":"Superscript 7","unicode":"2077","name":false}],"Digit8":[{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+8","code":"Digit8","codeEscape":"₈","combining":false,"nick":"Subscript 8","unicode":"2088","name":false},{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+8","code":"Digit8","codeEscape":"⁸","combining":false,"nick":"Superscript 8","unicode":"2078","name":false}],"KeyW":[{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+w","code":"KeyW","codeEscape":"Þ","combining":false,"nick":"Icelandic Thorn","unicode":"00DE","name":"Thorn"},{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+w","code":"KeyW","codeEscape":"þ","combining":false,"nick":"Icelandic thorn","unicode":"00FE","name":"thorn"}],"KeyI":[{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+i","code":"KeyI","codeEscape":"ư","combining":false,"nick":"u hook","unicode":"01B0","name":"u-Hook (Lowercase) / Latin Small Letter U With Horn"},{"shiftKey":true,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+Shift+i","code":"KeyI","codeEscape":"Ư","combining":false,"nick":"U hook","unicode":"01AF","name":"U-Hook (Uppercase) / Latin Capital Letter U With Horn"}],"Comma":[{"shiftKey":false,"ctrlKey":true,"altKey":true,"combo":"Ctrl+Alt+,","code":"Comma","codeEscape":"̲","combining":true,"nick":"Underscore","unicode":"0332","name":"Underscore / Comb
1ining Low Line"}]}')},a2b7:function(t,e,i){"use strict";var a=i("03de"),o=i.n(a);o.a},ad6d:function(t,e,i){"use strict";i("5319"),i("ddb0");const a={headingValid:"&#xe820;",headingPartiallyValid:"&#xe821;",headingInvalid:"&#xe822;",headingNotChecked:"&#xe823;",validateHeading:async function(t,e=""){void 0!==t["http://id.loc.gov/ontologies/bibframe/agent"]&&(t=t["http://id.loc.gov/ontologies/bibframe/agent"][0]);let i=t["@id"];if(!i&&t.hintUri&&t[t.hintUri]&&(t=t[t.hintUri][0],i=t["@id"]),void 0===i||null===i||i&&i.indexOf("example.org/")>0||i&&i.indexOf("/REPLACE/")>0){var a=this.getLabel(t);if(!a)return console.warn("Unable to locate label for validation lookup!"),this.headingNotChecked;var o=e;if(""==o&&(o=this._getScheme(t)),!o)return console.warn("Unable to locate scheme for validation lookup!"),this.headingNotChecked;if(o.indexOf("id.loc.gov")>0){var r=await this._doLabelLookup(a,o),s=r.status;if(console.log("response",r),console.log("lookupStatus",s),200==s){var l=r.x_uri;return t["@id"]=l,r.foundLabel!=a&&this._setLabel(t,r.foundLabel),this.headingValid}if(404==s){if(void 0!==t["http://www.loc.gov/mads/rdf/v1#componentList"]&&t["http://www.loc.gov/mads/rdf/v1#componentList"].length>1){t=t["http://www.loc.gov/mads/rdf/v1#componentList"][0];var n=await this.validateHeading(t,o);if(n==this.headingValid)return this.headingPartiallyValid}return this.headingInvalid}return console.warn("Validation lookup returned unexpected response: "+s),this.headingInvalid}return console.warn("Scheme for validation not ID.LOC.GOV: "+o),this.headingNotChecked}return i.indexOf("/resources/works/")>0||i.indexOf("/resources/instances/")>0||i.indexOf("/resources/items/")>0?this.headingNotChecked:i.indexOf("id.loc.gov/")>0?this.headingValid:this.headingNotChecked},_doLabelLookup:async function(t,e){const i={method:"GET",redirect:"follow",referrerPolicy:"no-referrer",headers:{Accept:"application/ld+json"}};var a=e+"/label/"+encodeURIComponent(t);a=a.replace(/^(http:)/,"https:"),a=a.replace("//id.loc.gov/","//preprod.id.loc.gov/"),window.location.href.includes("//localhost")&&(a=a.replace("//preprod.id.loc.gov/","//id.loc.gov/")),console.log("url",a);const o=await fetch(a,i);if(200==o.status){var r=o.headers.get("x-uri");r=r.replace("preprod-8080.",""),r=r.replace("preprod-8288.",""),r=r.replace("preprod.",""),o.x_uri=r;var s=o.headers.get("x-preflabel"),l=await o.json();return l.forEach(t=>{if(void 0!==t["@id"]&&t["@id"]==r&&(s=this._getLabelFromJSONLD(t),!1!==s))return o.foundLabel=s,o}),o}return o},getLabel:function(t){const e=["http://www.loc.gov/mads/rdf/v1#authoritativeLabel","http://www.w3.org/2000/01/rdf-schema#label"];for(var i of e)if(void 0!==t[i])return t[i][0][i];if(t.hintUri&&t[t.hintUri]&&t[t.hintUri][0])for(var a of(t=t[t.hintUri][0],e))if(void 0!==t[a])return t[a][0][a];return!1},_getLabelFromJSONLD:function(t){const e=["http://www.loc.gov/mads/rdf/v1#authoritativeLabel","http://www.w3.org/2000/01/rdf-schema#label"];for(var i of e)if(void 0!==t[i])return t[i][0]["@value"];return!1},_getScheme:function(t){if(void 0!==t["http://www.loc.gov/mads/rdf/v1#isMemberOfMADSScheme"]){var e=[];if(t["http://www.loc.gov/mads/rdf/v1#isMemberOfMADSScheme"].forEach(t=>{e.push(t["@id"])}),e.includes("http://id.loc.gov/authorities/childrensSubjects"))return"http://id.loc.gov/authorities/childrensSubjects";if(e.length>0)return e[0]}if(void 0!==t["http://id.loc.gov/ontologies/bibframe/source"]){var i=t["http://id.loc.gov/ontologies/bibframe/source"][0];if(void 0!==i["@id"]&&i["@id"].indexOf("id.loc.gov/")>0&&-1===i["@id"].indexOf("id.loc.gov/vocabulary"))return i["@id"];var a=!1;if(void 0!==i["http://id.loc.gov/ontologies/bibframe/code"]&&(a=i["http://id.loc.gov/ontologies/bibframe/code"][0]["http://id.loc.gov/ontologies/bibframe/code"]),a){const t={lcac:"http://id.loc.gov/authorities/childrensSubjects",lcshac:"http://id.loc.gov/authorities/childrensSubjects",lcsh:"http://id.loc.gov/authorities/subjects",lcnaf:"http://id.loc.gov/authorities/names",lctgm:"http://id.loc.gov/vocabulary/graphicMaterials",gmgpc:"http://id.loc.gov/vocabulary/graphicMaterials"};if(void 0!==t[a])return t[a]}}var o=["http://id.loc.gov/ontologies/bibframe/Person","http://id.loc.gov/ontologies/bibframe/Organization","http://id.loc.gov/ontologies/bibframe/Family","http://id.loc.gov/ontologies/bibframe/Jurisdiction","http://id.loc.gov/ontologies/bibframe/Meeting"];return!(void 0===t["@type"]||!o.includes(t["@type"]))&&"http://id.loc.gov/authorities/names"},getValidationMessage:function(t){return this.headingValid==t?"Heading is valid":this.headingParti
1allyValid==t?"Partial heading validation":this.headingInvalid==t?"Invalid heading!":this.headingNotChecked==t?"Heading not checked":""},_setLabel:function(t,e){const i=["http://www.loc.gov/mads/rdf/v1#authoritativeLabel","http://www.w3.org/2000/01/rdf-schema#label"];for(var a of i)void 0!==t[a]&&(t[a][0][a]=e);return t}};e["a"]=a},adac:function(t,e,i){"use strict";i("5319"),i("ddb0");var a=i("1a1e");const o=i("82fd"),r=o(),s={possibleLabelURIs:["http://www.loc.gov/mads/rdf/v1#authoritativeLabel","http://www.w3.org/2004/02/skos/core#prefLabel","http://www.w3.org/2000/01/rdf-schema#label"],lookupLibrary:{},fetchSimpleLookup:async function(t,e){t=t||a["a"].profileUrl,t.includes("id.loc.gov")&&(t=t.replace("http://","https://")),t=t.replace("preprod-8080.id.loc.gov/vocabulary/pmocomponent.json","id.loc.gov/vocabulary/pmocomponent.json"),t=t.replace("memberOf=https://id.loc.gov/","memberOf=http://id.loc.gov/");let i={};e&&(i={headers:{"Content-Type":"application/json",Accept:"application/json"},mode:"cors"});try{let e=await fetch(t,i),a=null;return a=t.includes(".rdf")||t.includes(".xml")?await e.text():await e.json(),a}catch(o){console.error(o)}},returnValue:function(t){let e=[];return Array.isArray(t)&&t.forEach(t=>{"object"===typeof t?t["@value"]?e.push(t["@value"]):console.warn("lookupUtility: lookup parse error, Was expecting a @value in this object:",t):"string"===typeof t||"number"===typeof t?e.push(t):console.warn("lookupUtility: lookup parse error, Was expecting some sort of value here:",t)}),e},simpleLookupProcess:function(t,e){let i={metadata:{uri:e,values:{}}};return Array.isArray(t)?t.forEach(t=>{let a=null,o=null;return!t["@id"]||t["@id"]==e||t["@id"].includes("_:")?(t["http://id.loc.gov/ontologies/RecordInfo#recordStatus"],!1):(this.possibleLabelURIs.forEach(e=>{if(t[e]&&!i[t["@id"]]){a=this.returnValue(t[e]);let i=[],r={uri:t["@id"],label:[],code:[],displayLabel:[]};a.forEach(e=>{i.push(`${e} (${t["@id"].split("/").pop()})`),r.displayLabel.push(`${e.trim()} (${t["@id"].split("/").pop()})`),r.label.push(e.trim()),r.code.push(t["@id"].split("/").pop())}),o=r,a=i}}),null===a?(console.error("lookupUtility: Was expecting this to have a label",t),!1):(i[t["@id"]]=a,void(i.metadata.values[t["@id"]]=o)))}):i=t,i},loadSimpleLookup:async function(t){Array.isArray(t)||(t=[t]);for(let e of t){let t=e;if(e.includes(".json")||(t+=".json"),this.lookupLibrary[t])return this.lookupLibrary[t];{let i=await this.fetchSimpleLookup(t);return i=this.simpleLookupProcess(i,e),this.lookupLibrary[t]=i,i}}},loadSimpleLookupKeyword:async function(t,e){Array.isArray(t)||(t=[t]);let i={metadata:{uri:t[0]+"KEYWORD",values:{}}};for(let a of t){"/"==a.at(-1)&&(a[-1]="");let t=`${a}/suggest2/?q=${e}&count=25`,o=await this.fetchSimpleLookup(t);if(o.hits&&0==o.hits.length&&(t=`${a}/suggest2/?q=${e}&count=25&searchtype=keyword`,o=await this.fetchSimpleLookup(t)),o.hits&&o.hits.length>0)for(let e of o.hits)i.metadata.values[e.uri]={uri:e.uri,label:[e.suggestLabel],authLabel:e.aLabel,code:[],displayLabel:[e.suggestLabel]},i[e.uri]=[e.suggestLabel]}return console.log(i),i},supportedRomanizations:async function(){return fetch(a["a"].returnUrls().utilLang+"romanize").then(t=>t.json())},supportedScriptShifter:async function(){return fetch(a["a"].returnUrls().scriptshifter+"languages").then(t=>t.json())},userTemplates:async function(t){return fetch(a["a"].returnUrls().util+"templates/"+t).then(t=>t.json())},searchInstanceByLCCN:async function(t){t=t.replaceAll(" ","");try{let e=await fetch(a["a"].returnUrls().id+`resources/instances/suggest2?q=${t}&searchtype=keyword`),i=await e.json(),o=[];for(let r of i.hits)o.push({lccn:t,label:r.aLabel,bfdbURL:a["a"].returnUrls().bfdb+r.uri.split("id.loc.gov/")[1],idURL:a["a"].returnUrls().id+r.uri.split("id.loc.gov/")[1],bfdbPackageURL:a["a"].returnUrls().bfdb+r.uri.split("id.loc.gov/")[1]+".convertedit-pkg.xml"});return o}catch{return["Error searching LCCN"]}},searchComplex:async function(t){let e=t.url;if(Array.isArray(e)||(e=[e]),"lcAuthorities"==t.processor)for(let a in e)e[a].includes("q=?")&&(e[a]=e[a].replace("q=?","q=")+"&searchtype=keyword");let i=[];for(let o of e){(a["a"].returnUrls().dev||a["a"].returnUrls().publicEndpoints)&&(o=o.replace("http://preprod.id.","https://id."),o=o.replace("https://preprod-8230.id.loc.gov","https://id.loc.gov"),o=o.replace("https://test-8080.id.lctl.gov","https://id.loc.gov"),o=o.replace("https://preprod-8080.id.loc.gov","https://id.loc.gov"),o=o.replace("https://preprod-8288.id.loc.gov","https://id.loc.gov")),o=o+"&blastdacache="+Date.now(),o.includes("searchtype=keyword")&&o.includes("q=?")&&(o=o.replace("q=?","q="));let e=await this.fetchSimpleLookup(o);if("lcAuthorities"==t.processor)for(let t of e.hits){let e={label:t.aLabel,vlabel:t.vLabel,suggestLabel:t.suggestLabel,uri:t.uri,literal:!1,depreciated:!1,extra:""};""==e.label&&e.suggestLabel.includes("DEPRECATED")&&(e.label=e.suggestLabel.split("(DEPRECATED")[0]+" DEPRECATED",e.depreciated=!0),i.push(e)}else if("wikidataAPI"==t.processor)for(let t of e.search)i.push({label:t.label,uri:t.concepturi,literal:!1,extra:""})}return t.url[0].includes("/works/")||t.url[0].includes("/hubs/")||i.push({label:t.searchValue,uri:null,literal:!0,extra:""}),i}
1,subjectSearch:async function(t,e,i){let o=a["a"].lookupConfig["http://preprod.id.loc.gov/authorities/names"].modes[0]["NAF All"].url.replace("<QUERY>",t).replace("&count=25","&count=4"),r=a["a"].lookupConfig["http://id.loc.gov/authorities/subjects"].modes[0]["LCSH All"].url.replace("<QUERY>",e).replace("&count=25","&count=5")+"&rdftype=ComplexType",s=a["a"].lookupConfig["http://id.loc.gov/authorities/subjects"].modes[0]["LCSH All"].url.replace("<QUERY>",t).replace("&count=25","&count=4")+"&rdftype=SimpleType",l=a["a"].lookupConfig["https://preprod-8080.id.loc.gov/resources/works"].modes[0]["Works - Keyword"].url.replace("<QUERY>",t).replace("&count=25","&count=5"),n=a["a"].lookupConfig["https://preprod-8080.id.loc.gov/resources/works"].modes[0]["Works - Left Anchored"].url.replace("<QUERY>",t).replace("&count=25","&count=5"),c=a["a"].lookupConfig["https://preprod-8080.id.loc.gov/resources/works"].modes[0]["Hubs - Keyword"].url.replace("<QUERY>",t).replace("&count=25","&count=5"),d=a["a"].lookupConfig["https://preprod-8080.id.loc.gov/resources/works"].modes[0]["Hubs - Left Anchored"].url.replace("<QUERY>",t).replace("&count=25","&count=5"),u=t.replaceAll("‑","-"),p=a["a"].lookupConfig["HierarchicalGeographic"].modes[0]["All"].url.replace("<QUERY>",u).replace("&count=25","&count=4");"GEO"==i&&(p=p.replace("&count=4","&count=12"));let h={processor:"lcAuthorities",url:[o],searchValue:t},f={processor:"lcAuthorities",url:[s],searchValue:t},m={processor:"lcAuthorities",url:[r],searchValue:t},g={processor:"lcAuthorities",url:[p],searchValue:u},b={processor:"lcAuthorities",url:[n],searchValue:t},v={processor:"lcAuthorities",url:[l],searchValue:t},y={processor:"lcAuthorities",url:[d],searchValue:t},w={processor:"lcAuthorities",url:[c],searchValue:t},k=[],S=[],C=[],L=[],I=[],_=[],T=[],x=[];"LCSHNAF"==i?[k,S,C,L]=await Promise.all([this.searchComplex(h),this.searchComplex(f),this.searchComplex(m),this.searchComplex(g)]):"GEO"==i?[L]=await Promise.all([this.searchComplex(g)]):"WORKS"==i?[I,_]=await Promise.all([this.searchComplex(b),this.searchComplex(v)]):"HUBS"==i&&([T,x]=await Promise.all([this.searchComplex(y),this.searchComplex(w)])),k.length>0&&k.pop(),C.length>0&&C.pop(),S.length>0&&(S.push(S.pop()),S.reverse()),C.reverse();let R=[];for(let a of L)a.literal||R.push(a);L=R,"WORKS"==i&&(S=I,C=_),"HUBS"==i&&(S=T,C=x);let E={subjectsSimple:S,subjectsComplex:C,names:k,hierarchicalGeographic:L};return E},returnContext:async function(t){let e,i=await this.fetchContextData(t);return i.uri=t,e=t.includes("resources/works/")||t.includes("resources/hubs/")?await this.extractContextDataWorksHubs(i):this.extractContextData(i),e},fetchContextData:async function(t){if((t.startsWith("http://id.loc.gov")||t.startsWith("https://id.loc.gov"))&&t.match(/(authorities|vocabularies)/))var e=t+".madsrdf_raw.jsonld";else t.includes("resources/works/")||t.includes("resources/hubs/")?e=t+".bibframe.json":t.includes("http://www.wikidata.org/entity/")?(e=t.replace("http://www.wikidata.org/entity/","https://www.wikidata.org/wiki/Special:EntityData/"),e+=".json"):e=t+".jsonld";"production"!=a["a"].returnUrls().env&&"staging"!=a["a"].returnUrls().env||(e=e.replace("http://id.","https://preprod-8080.id."),e=e.replace("https://id.","https://preprod-8080.id.")),(a["a"].returnUrls().dev||a["a"].returnUrls().publicEndpoints)&&(e=e.replace("http://preprod.id.","https://id."),e=e.replace("https://preprod-8230.id.loc.gov","https://id.loc.gov"),e=e.replace("https://test-8080.id.lctl.gov","https://id.loc.gov"),e=e.replace("https://preprod-8080.id.loc.gov","https://id.loc.gov"),e=e.replace("https://preprod-8288.id.loc.gov","https://id.loc.gov")),e.includes("gpo_")&&e.includes("preprod")&&(e=e.replace("8080","8295"),e=e.replace("8230","8295"),e=e.replace("https://id.","https://preprod-8295.id.")),e=e.replace("http://id.loc.gov","https://id.loc.gov");try{let t=await fetch(e),i=await t.json();return i}catch(i){console.error(i)}},extractContextDataWorksHubs:async function(t){var e={contextValue:!0,source:[],type:null,typeFull:null,aap:null,variant:[],uri:t.uri,title:null,contributor:[],date:null,genreForm:null,nodeMap:{}};t.uri.includes("/works/")?(e.type="Work",e.typeFull="http://id.loc.gov/ontologies/bibframe/Work"):(e.type="Hub",e.typeFull="http://id.loc.gov/ontologies/bibframe/Hub");let i=[];
1for(let o of t)if(o["@id"]){if(o["@id"]==t.uri)for(let t in o)if("http://www.w3.org/2000/01/rdf-schema#label"==t&&(e.title=o[t][0]["@value"]),"http://id.loc.gov/ontologies/bflc/aap"==t&&(e.aap=o[t][0]["@value"]),"http://id.loc.gov/ontologies/bibframe/hasInstance"==t){let t=1;for(let e of o["http://id.loc.gov/ontologies/bibframe/hasInstance"]){if(t>4)break;t++;let o=e["@id"];o.includes("gpo_")&&(o=o.replace("https://id.","https://preprod-8295.id."),o=o.replace("http://id.","http://preprod-8295.id.")),(o.includes("/instances/")||o.includes("/works/")||o.includes("/hubs/"))&&"production"===a["a"].returnUrls().env&&(o=o.replace("https://id.","https://preprod-8080.id."),o=o.replace("http://id.","http://preprod-8080.id.")),(a["a"].returnUrls().dev||a["a"].returnUrls().publicEndpoints)&&(o=o.replace("http://preprod.id.","https://id."),o=o.replace("https://preprod-8230.id.loc.gov","https://id.loc.gov"),o=o.replace("https://test-8080.id.lctl.gov","https://id.loc.gov"),o=o.replace("https://preprod-8080.id.loc.gov","https://id.loc.gov"),o=o.replace("http://preprod-8080.id.loc.gov","https://id.loc.gov"),o=o.replace("https://preprod-8288.id.loc.gov","https://id.loc.gov")),console.log("URL is",o);let r=await fetch(o.replace("http://","https://")+".nt"),s=await r.text(),l="";for(let t of s.split("\n")){if(t.includes(`<${e["@id"]}> <http://www.w3.org/2000/01/rdf-schema#label>`)){let e=t.split(">")[2];e=e.split("@")[0],e=e.replaceAll('"',""),e=e.replace(" .",""),l+=e}if(t.includes(`<${e["@id"]}> <http://id.loc.gov/ontologies/bibframe/provisionActivityStatement>`)){let e=t.split(">")[2];e=e.split("@")[0],e=e.replaceAll('"',""),e=e.replace(" .",""),l+=e}}i.push(l)}}o["http://www.loc.gov/mads/rdf/v1#isMemberOfMADSScheme"]&&(e.nodeMap["Subjects"]||(e.nodeMap["Subjects"]=[]),o["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"]&&e.nodeMap["Subjects"].push(o["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"][0]["@value"]))}return e.title||(e.title=e.aap),i.length>0&&(e.nodeMap["Instances"]=i),e},extractContextData:function(t){var e={contextValue:!0,source:[],type:null,typeFull:null,variant:[],uri:t.uri,title:null,contributor:[],date:null,genreForm:null,nodeMap:{}};if(t.uri.includes("wikidata.org")){if(t.entities){let i=Object.keys(t.entities)[0];t.entities[i].labels.en&&(e.title=t.entities[i].labels.en.value),t.entities[i].descriptions.en&&(e.nodeMap["Description"]=[t.entities[i].descriptions.en.value]),t.entities[i].aliases.en&&t.entities[i].aliases.en.forEach(t=>{e.variant.push(t.value)}),e.type="http://www.loc.gov/mads/rdf/v1#PersonalName",e.typeFull="http://www.loc.gov/mads/rdf/v1#PersonalName",t.entities[i].claims.P31&&t.entities[i].claims.P31[0].mainsnak&&t.entities[i].claims.P31[0].mainsnak.datavalue&&t.entities[i].claims.P31[0].mainsnak.datavalue.value&&(e.type=this.rdfType(t.entities[i].claims.P31[0].mainsnak.datavalue.value.id))}}else if(t.uri.includes("id.loc.gov/resources/works/")||t.uri.includes("id.loc.gov/resources/instances/")||t.uri.includes("id.loc.gov/resources/hubs/")){let i=t.uri.split("/").slice(-1)[0];for(let a of t)a&&a["@id"]&&(a["@id"].endsWith("/works/"+i)||a["@id"].endsWith("/instances/"+i)||a["@id"].endsWith("/hubs/"+i))&&(a["@id"].endsWith("/works/"+i)&&t.uri.includes("id.loc.gov/resources/works/")||a["@id"].endsWith("/instances/"+i)&&t.uri.includes("id.loc.gov/resources/instances/")||a["@id"].endsWith("/hubs/"+i)&&t.uri.includes("id.loc.gov/resources/hubs/"))&&(a["http://www.w3.org/2000/01/rdf-schema#label"]&&a["http://www.w3.org/2000/01/rdf-schema#label"][0]?e.title=a["http://www.w3.org/2000/01/rdf-schema#label"][0]["@value"]:a["http://id.loc.gov/ontologies/bflc/aap"]&&a["http://id.loc.gov/ontologies/bflc/aap"][0]&&(e.title=a["http://id.loc.gov/ontologies/bflc/aap"][0]["@value"]),a["@type"]&&a["@type"][0]&&(e.type=this.rdfType(a["@type"][0]),e.typeFull=a["@type"][0]))}else{t["@graph"]&&(t=t["@graph"]);var i={};t.forEach((function(t){t["http://www.loc.gov/mads/rdf/v1#birthDate"]&&(i["Birth Date"]=t["http://www.loc.gov/mads/rdf/v1#birthDate"].map((function(t){return t["@value"]}))),t["http://www.loc.gov/mads/rdf/v1#birthPlace"]&&(i["Birth Place"]=t["http://www.loc.gov/mads/rdf/v1#birthPlace"].map((function(t){return t["@i
1d"]}))),t["http://www.loc.gov/mads/rdf/v1#associatedLocale"]&&(i["Associated Locale"]=t["http://www.loc.gov/mads/rdf/v1#associatedLocale"].map((function(t){return t["@id"]}))),t["http://www.loc.gov/mads/rdf/v1#fieldOfActivity"]&&(i["Field of Activity"]=t["http://www.loc.gov/mads/rdf/v1#fieldOfActivity"].map((function(t){return t["@id"]}))),t["http://www.loc.gov/mads/rdf/v1#gender"]&&(i["Gender"]=t["http://www.loc.gov/mads/rdf/v1#gender"].map((function(t){return t["@id"]}))),t["http://www.loc.gov/mads/rdf/v1#occupation"]&&(i["Occupation"]=t["http://www.loc.gov/mads/rdf/v1#occupation"].map((function(t){return t["@id"]}))),t["http://www.loc.gov/mads/rdf/v1#associatedLanguage"]&&(i["Associated Language"]=t["http://www.loc.gov/mads/rdf/v1#associatedLanguage"].map((function(t){return t["@id"]}))),t["http://www.loc.gov/mads/rdf/v1#deathDate"]&&(i["Death Date"]=t["http://www.loc.gov/mads/rdf/v1#deathDate"].map((function(t){return t["@value"]}))),t["http://www.loc.gov/mads/rdf/v1#hasBroaderAuthority"]&&(i["Has Broader Authority"]=t["http://www.loc.gov/mads/rdf/v1#hasBroaderAuthority"].map((function(t){return t["@id"]}))),t["http://www.loc.gov/mads/rdf/v1#hasNarrowerAuthority"]&&(i["Has Narrower Authority"]=t["http://www.loc.gov/mads/rdf/v1#hasNarrowerAuthority"].map((function(t){return t["@id"]}))),t["http://www.loc.gov/mads/rdf/v1#isMemberOfMADSCollection"]&&(i["MADS Collection"]=t["http://www.loc.gov/mads/rdf/v1#isMemberOfMADSCollection"].map((function(t){return t["@id"]}))),t["http://www.loc.gov/mads/rdf/v1#code"]&&"http://id.loc.gov/datatypes/codes/gac"==t["http://www.loc.gov/mads/rdf/v1#code"][0]["@type"]&&(i["GAC(s)"]=t["http://www.loc.gov/mads/rdf/v1#code"].map((function(t){if("http://id.loc.gov/datatypes/codes/gac"==t["@type"])return t["@value"]}))),!1!==t["@type"].includes("http://id.loc.gov/ontologies/lcc#ClassNumber")&&(i["LC Classification"]||(i["LC Classification"]=[]),t["http://www.loc.gov/mads/rdf/v1#code"]&&t["http://id.loc.gov/ontologies/bibframe/assigner"]?i["LC Classification"].push(`${t["http://www.loc.gov/mads/rdf/v1#code"][0]["@value"]} (${t["http://id.loc.gov/ontologies/bibframe/assigner"][0]["@id"].split("/").pop()})`):t["http://www.loc.gov/mads/rdf/v1#code"]&&i["LC Classification"].push(t["http://www.loc.gov/mads/rdf/v1#code"][0]["@value"])),t["http://www.loc.gov/mads/rdf/v1#classification"]&&(i["Classification"]=t["http://www.loc.gov/mads/rdf/v1#classification"].map((function(t){return t["@value"]})),i["Classification"]=i["Classification"].filter(t=>{}))}
1)),t.forEach((function(t){Object.keys(i).forEach((function(a){e.nodeMap[a]||(e.nodeMap[a]=[]),i[a].forEach((function(o){if("MADS Collection"==a)-1==e.nodeMap[a].indexOf(o.split("/").slice(-1)[0].replace("collection_",""))&&e.nodeMap[a].push(o.split("/").slice(-1)[0].replace("collection_",""));else if("Classification"==a)i[a].length>0&&(e.nodeMap[a]=i[a]);else if("LC Classification"==a)i[a].length>0&&(e.nodeMap[a]=i[a]);else if("GAC(s)"==a)i[a].length>0&&(e.nodeMap[a]=i[a]);else if(t["@id"]&&t["@id"]==o)t["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"]?t["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"].forEach((function(t){t["@value"]&&e.nodeMap[a].push(t["@value"])})):t["http://www.w3.org/2000/01/rdf-schema#label"]?t["http://www.w3.org/2000/01/rdf-schema#label"].forEach((function(t){t["@value"]&&e.nodeMap[a].push(t["@value"])})):console.log("NO label found for ",t);else if(o.includes("id.loc.gov")){let t=o.split("/").slice(-1)[0];-1==e.nodeMap[a].indexOf(t)&&e.nodeMap[a].push(t)}}))}))})),t.forEach(i=>{var a="",o="",r="";i["http://www.loc.gov/mads/rdf/v1#citation-source"]&&(a=a+" Source: "+i["http://www.loc.gov/mads/rdf/v1#citation-source"].map((function(t){return t["@value"]+" "}))),i["http://www.loc.gov/mads/rdf/v1#citation-note"]&&(a=a+" Note: "+i["http://www.loc.gov/mads/rdf/v1#citation-note"].map((function(t){return t["@value"]+" "}))),i["http://www.loc.gov/mads/rdf/v1#citation-status"]&&(a=a+" Status: "+i["http://www.loc.gov/mads/rdf/v1#citation-status"].map((function(t){return t["@value"]+" "}))),i["http://www.loc.gov/mads/rdf/v1#citationSource"]&&(a=a+" Source: "+i["http://www.loc.gov/mads/rdf/v1#citationSource"].map((function(t){return t["@value"]+" "}))),i["http://www.loc.gov/mads/rdf/v1#citationNote"]&&(a=a+" Note: "+i["http://www.loc.gov/mads/rdf/v1#citationNote"].map((function(t){return t["@value"]+" "}))),i["http://www.loc.gov/mads/rdf/v1#citationStatus"]&&(a=a+" Status: "+i["http://www.loc.gov/mads/rdf/v1#citationStatus"].map((function(t){return t["@value"]+" "}))),i["http://www.loc.gov/mads/rdf/v1#variantLabel"]&&(o+=i["http://www.loc.gov/mads/rdf/v1#variantLabel"].map((function(t){return t["@value"]+" "}))),i["@id"]&&i["@id"]==t.uri&&i["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"]&&(r+=i["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"].map((function(t){return t["@value"]+" "}))),i["@id"]&&i["@id"]==t.uri&&i["@type"]&&(i["@type"].forEach(t=>{null===e.type&&(e.type=this.rdfType(t),e.typeFull=t)}),i["@type"].includes("http://www.loc.gov/mads/rdf/v1#DeprecatedAuthority")&&(e.depreciated=!0)),a=a.trim(),o=o.trim(),r=r.trim(),""!=o&&e.variant.push(o),""!=a&&e.source.pu
1sh(a),""!=r&&(e.title=r),i["@type"]&&"http://id.loc.gov/ontologies/bibframe/Title"==i["@type"]&&i["bibframe:mainTitle"]&&(e.title=i["bibframe:mainTitle"]),i["@type"]&&("http://id.loc.gov/ontologies/bibframe/Agent"==i["@type"]||i["@type"].indexOf("http://id.loc.gov/ontologies/bibframe/Agent")>-1)&&i["bflc:name00MatchKey"]&&e.contributor.push(i["bflc:name00MatchKey"]),i["bibframe:creationDate"]&&i["bibframe:creationDate"]["@value"]&&(e.date=i["bibframe:creationDate"]["@value"]),i["@type"]&&"http://id.loc.gov/ontologies/bibframe/GenreForm"==i["@type"]&&i["bibframe:mainTitle"]&&(e.genreForm=i["rdf-schema:label"])})}return Object.keys(e.nodeMap).forEach(t=>{0==e.nodeMap[t].length&&delete e.nodeMap[t]}),e},rdfType:function(t){var e=null;return"http://www.loc.gov/mads/rdf/v1#PersonalName"==t||"http://id.loc.gov/ontologies/bibframe/Person"==t?e="PersonalName":"http://id.loc.gov/ontologies/bibframe/Topic"==t||"http://www.loc.gov/mads/rdf/v1#Topic"==t?e="Topic":"http://www.loc.gov/mads/rdf/v1#Place"==t||"http://id.loc.gov/ontologies/bibframe/Place"==t||"http://www.loc.gov/mads/rdf/v1#Geographic"==t?e="Geographic":"http://www.loc.gov/mads/rdf/v1#Temporal"==t?e="Temporal":"http://www.loc.gov/mads/rdf/v1#Organization"==t||"http://www.loc.gov/mads/rdf/v1#CorporateName"==t||"http://id.loc.gov/ontologies/bibframe/Organization"==t?e="CorporateName":"http://www.loc.gov/mads/rdf/v1#Family"==t||"http://id.loc.gov/ontologies/bibframe/Family"==t?e="FamilyName":"http://www.loc.gov/mads/rdf/v1#Meeting"==t||"http://id.loc.gov/ontologies/bibframe/Meeting"==t?e="ConferenceName":"http://www.loc.gov/mads/rdf/v1#Jurisdiction"==t||"http://id.loc.gov/ontologies/bibframe/Jurisdiction"==t?e="Geographic":"http://id.loc.gov/ontologies/bibframe/GenreForm"==t||"http://www.loc.gov/mads/rdf/v1#GenreForm"==t?e="GenreForm":"http://id.loc.gov/ontologies/bibframe/Role"==t?e="Role":"http://id.loc.gov/ontologies/madsrdf/v1.html#ComplexSubject"==t?e="ComplexSubject":"http://www.loc.gov/mads/rdf/v1#NameTitle"==t?e="NameTitle":"http://www.loc.gov/mads/rdf/v1#Title"==t?e="Title":"http://www.loc.gov/mads/rdf/v1#ComplexSubject"==t?e="ComplexSubject":"Q5"==t?e="PersonalName":"http://id.loc.gov/ontologies/bibframe/Work"==t?e="Work":"http://id.loc.gov/ontologies/bibframe/Instance"==t&&(e="Instance"),e},fetchIdWorkSearch:async function(t){let e=await this.fetchSimpleLookup(`https://id.loc.gov/search/?q=${t}&q=cs%3Ahttp%3A%2F%2Fid.loc.gov%2Fresources%2Fworks&format=json`,!0),i=[];for(let a of e)if(Array.isArray(a)&&"atom:entry"===a[0]){let t=null,e=null;for(let i of a)Array.isArray(i)&&"atom:title"===i[0]&&(e=i[2]),Array.isArray(i)&&"atom:id"===i[0]&&(t=i[2].replace("info:lc","https://id.loc.gov"));i.push({id:t,label:e})}return i},fetchRecords:async function(t,e){let i,o=a["a"].returnUrls().util,r=a["a"].returnUrls().env;i=t&&!e?`${o}myrecords/${r}/${t}`:t&&e?`${o}allrecords/${r}/${e}/${t}`:`${o}allrecords/${r}/`;let s=await this.fetchSimpleLookup(i),l=[];for(let a in s)l.push(s[a]);return l.sort((function(t,e){return e.timestamp-t.timestamp})),l},fetchIdXML:async function(t){!1===t.endsWith(".rdf")&&(t+=".rdf");let e=await this.fetchSimpleLookup(t);return e},fetchBfdbXML:async function(t){let e;t.includes("/works/")&&(t=t.replace(/\.jsonld/,".rdf")),t=t.replace(/\.jsonld/,".xml"),t.includes("?")||(t=t+"?nocache="+Date.now());try{e=await this.fetchSimpleLookup(t)}catch(i){e="ERROR: Error fetching record."}return e},ontologyPropertyExists:async function(t){return!(!window.localStorage||!window.localStorage.getItem("ontology_"+t+".rdf"))},fetchOntology:async function(t){let e,i=Math.floor(Date.now()/1e3);if(window.localStorage&&window.localStorage.getItem("ontology_"+t+".rdf")){let e=JSON.parse(window.localStorage.getItem("ontology_"+t+".rdf"));if(e&&e.response&&e.ts&&i-e.ts<604800)return e.response}!1===t.endsWith(".rdf")&&(t+=".rdf");try{e=await this.fetchSimpleLookup(t)}catch{return!1}
1if(window.localStorage){let a={response:e,ts:i};window.localStorage.setItem("ontology_"+t,JSON.stringify(a))}return e},fetchAllOntology:async function(t){let e={};for(let i of Object.keys(t.lookup)){if(t.lookup[i].resourceURI.includes("id.loc.gov/ontologies/")){let a=await this.fetchOntology(t.lookup[i].resourceURI);e[t.lookup[i].resourceURI]=a}for(let a of t.lookup[i].propertyTemplates)if(a.propertyURI.includes("id.loc.gov/ontologies/")){let t=await this.fetchOntology(a.propertyURI);e[a.propertyURI]=t}}return e},saveRecord:async function(t,e){const i={method:"PUT",headers:{"Content-type":"application/xml"},body:t};let o=a["a"].returnUrls().ldpjs+"ldp/"+e;await fetch(o,i).then(t=>console.log(t.text)).then(t=>{console.log(t)}).catch(t=>{console.log(t),alert("Error: Could not save the record!",t)})},loadSavedRecord:async function(t){let e=a["a"].returnUrls().ldpjs+"ldp/"+t;try{let t=await fetch(e),i=await t.text();return i}catch(i){console.error(i)}},sendErrorReportLog:function(t,e,i){let o=a["a"].returnUrls().util+"errorlog/";fetch(o,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({log:t,filename:e,profile:i})})},sendSourceRecord:function(t,e,i){let o=a["a"].returnUrls().util+"sourcelog/";fetch(o,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({xml:t,eid:e,user:i,date:`${(new Date).toDateString()}_${(new Date).toTimeString()}`.replaceAll(" ","_").replaceAll(":","-")})})},publish:async function(t,e,i){let o=!1;i&&i.id&&"Hub"===i.id&&(o=!0);let s=a["a"].returnUrls().publish,l=r.toUUID(r.new());const n=await fetch(s,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({name:l,rdfxml:t,eid:e,hub:o})}),c=await n.json();return c&&c.publish&&c.publish.status&&"published"==c.publish.status?{status:!0}:{status:!1,msg:JSON.stringify(c.publish,null,2)}},marcPreview:async function(t){let e=a["a"].returnUrls().util+"/marcpreview";const i=await fetch(e,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({rdfxml:t})}),o=await i.json();return console.log(o),o},checkVersionOutOfDate:async function(){let t,e="production"===a["a"].returnUrls().env?"version/editor":"version/editor/stage",i=a["a"].returnUrls().util+e+"?blastdacache="+Date.now();try{const e=await fetch(i,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json"}});t=await e.json()}catch{return!1}let o=a["a"].versionMajor+.1*a["a"].versionMinor+.01*a["a"].versionPatch,r=t.major+.1*t.minor+.01*t.patch;return console.log("ourVer:",o,"curVer:",r),o<r},returnErrors:async function(){let t,e=a["a"].returnUrls().util+"error/report?blastdacache="+Date.now();try{const i=await fetch(e,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json"}});t=await i.json()}catch{return!1}return t},returnError:async function(t){let e,i=a["a"].returnUrls().util+"error/"+t+"?blastdacache="+Date.now();try{const t=await fetch(i,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json"}});e=await t.json()}catch{return!1}return e},returnRDFType:async function(t){t=t.trim();let e=t;t.indexOf("id.loc.gov")>-1&&(e=e.replace("https://","http://"),"/"===t[t.length-1]&&(t=t.slice(0,-2)),t=t.replace(".html",".json"),-1===t.indexOf(".json")&&(t+=".json"));let i=await this.fetchSimpleLookup(t,!0);if(t.indexOf("id.loc.gov")>-1)for(let a of i)if(a&&a["@id"]&&a["@id"]==e&&a["@type"])for(let t of a["@type"]){if("http://www.loc.gov/mads/rdf/v1#Temporal"==t)return"http://www.loc.gov/mads/rdf/v1#Temporal";if("http://www.loc.gov/mads/rdf/v1#ComplexSubject"==t)return"http://www.loc.gov/mads/rdf/v1#ComplexSubject";if("http://www.loc.gov/mads/rdf/v1#ConferenceName"==t)return"http://www.loc.gov/mads/rdf/v1#ConferenceName";if("http://www.loc.gov/mads/rdf/v1#CorporateName"==t)return"http://www.loc.gov/mads/rdf/v1#CorporateName";if("http://www.loc.gov/mads/rdf/v1#FamilyName"==t)return"http://www.loc.gov/mads/rdf/v1#FamilyName";if("http://www.loc.gov/mads/rdf/v1#Geographic"==t)return"http://www.loc.gov/mads/rdf/v1#Geographic";if("http://www.loc.gov/mads/rdf/v1#GenreForm"==t)return"http://www.loc.gov/mads/rdf/v1#GenreForm";if("http://www.loc.gov/mads/rdf/v1#Language"==t)return"http://www.loc.gov/mads/rdf/v1#Language";if("http://www.loc.gov/mads/rdf/v1#MainTitleElement"==t)return"http://www.loc.gov/mads/rdf/v1#MainTitleElement";if("http://www.loc.gov/mads/rdf/v1#Meeting"==t)return"http://www.loc.gov/mads/rdf/v1#Meeting";if("http://www.loc.gov/mads/rdf/v1#NameTitle"==t)return"http://www.loc.gov/mads/rdf/v1#NameTitle";if("http://www.loc.gov/mads/rdf/v1#PersonalName"==t)return"http://www.loc.gov/mads/rdf/v1#PersonalName";if("http://www.loc.gov/mads/rdf/v1#Temporal"==t)return"http://www.loc.gov/mads/rdf/v1#Temporal";if("http://www.loc.gov/mads/rdf/v1#Title"==t)return"http://www.loc.gov/mads/rdf/v1#Title";if("http://www.loc.gov/mads/rdf/v1#Topic"==t)return"http://www.loc.gov/mads/rdf/v1#Topic";if("http://www.loc.gov/mads/rdf/v1#SimpleType"==t)return"http://www.loc.gov/mads/rdf/v1#SimpleType"}return!1},subjectLinkModeResolveLCSH:async function(t){let e,i={resultType:"",msg:""};if(t=t.normalize(),t?t&&"string"!=typeof t&&(i.resultType="ERROR",i.msg="REGEX Error: That value doesn't look like a valid MARC encoded LCSH string (not string)"):(i.resultType="ERROR",i.msg="REGEX Error: That value doesn't look like a valid MARC encoded LCSH string (undefined)"),t=t.replace(/\$c/g,"").replace(/\$d/g,"").replace(/‡c/g,"").replace(/‡d/g,"").replace(/\s{2,}/g," "),"$a"!=t.substring(0,2)&&"‡a"!=t.substring(0,2)&&(t="$a"+t),t.match(/[$‡]z.*([$‡]z.*)/)&&2===t.match(/[$‡]z.*([$‡]z.*)/).length){let e,i=t.match(/[$‡]z.*([$‡]z.*)/)[1];e=t.match(/[$]z.*([$]z.*)/)?i.replace("$z","--"):i.replace("‡z","--"),t=t.replace(i,e)}let o=t.split(/[$‡]/).length-1;if(o>0){1==o?e=t.match(/([$‡][avxyz].*)/):2==o?e=t.match(/([$‡][avxyz].*)([$‡][avxyz].*)/):3==o?e=t.match(/([$‡][avxyz].*)([$‡][avxyz].*)([$‡][avxyz].*)/):4==o?e=t.match(/([$‡][avxyz].*)([$‡][avxyz].*)([$‡][avxyz].*)([$‡][avxyz].*)/):5==o?e=t.match(/([$‡][avxyz].*)([$‡][avxyz].*)([$‡][avxyz].*)([$‡][avxyz].*)([$‡][avxyz].*)/):6==o?e=t.match(/([$‡][avxyz].*)([$‡][avxyz].*)([$‡][avxyz].*)([$‡][avxyz].*)([$‡][avxyz].*)([$‡][avxyz].*)/):7==o?e=t.match(/([$‡][avxyz].*)([$‡][avxyz].*)([$‡][avxyz].*)([$‡][avxyz].*)([$‡][avxyz].*)([$‡][avxyz].*)([$‡][avxyz].*)/):8
1==o?e=t.match(/([$‡][avxyz].*)([$‡][avxyz].*)([$‡][avxyz].*)([$‡][avxyz].*)([$‡][avxyz].*)([$‡][avxyz].*)([$‡][avxyz].*)([$‡][avxyz].*)/):(i.resultType="ERROR",i.msg="REGEX Error: That value doesn't look like a valid MARC encoded LCSH string (too long? invalid format?)");try{e=e.slice(1,e.length);for(let t of e)"$v"!=t.slice(0,2).toLowerCase()&&"$a"!=t.slice(0,2).toLowerCase()&&"$x"!=t.slice(0,2).toLowerCase()&&"$y"!=t.slice(0,2).toLowerCase()&&"$z"!=t.slice(0,2).toLowerCase()&&"‡v"!=t.slice(0,2).toLowerCase()&&"‡a"!=t.slice(0,2).toLowerCase()&&"‡x"!=t.slice(0,2).toLowerCase()&&"‡y"!=t.slice(0,2).toLowerCase()&&"‡z"!=t.slice(0,2).toLowerCase()&&(i.resultType="ERROR",i.msg="REGEX Error: That value doesn't look like a valid MARC encoded LCSH string (error spliting into seperate values)")}catch{i.resultType="ERROR",i.msg="REGEX Error: That value doesn't look like a valid MARC encoded LCSH string (error spliting into seperate values)"}}else i.resultType="ERROR",i.msg="REGEX Error: That value doesn't look like a valid MARC encoded LCSH string";if("ERROR"==i.resultType)return i;let r=e.slice(0,e.length).map(t=>({type:t.slice(1,2),label:t.slice(2,t.length).trim().replace(/\.[$‡]/gu,"").replace(/\.$/,"")}));for(const[a,c]of r.entries())a>0?(c.subdivision=!0,c.primary=!1):(c.subdivision=!1,c.primary=!0),"a"==c.type?c.rdfType="http://www.loc.gov/mads/rdf/v1#Topic":"v"==c.type?c.rdfType="http://www.loc.gov/mads/rdf/v1#GenreForm":"x"==c.type?c.rdfType="http://www.loc.gov/mads/rdf/v1#Topic":"z"==c.type?c.rdfType="http://www.loc.gov/mads/rdf/v1#Geographic":"y"==c.type?c.rdfType="http://www.loc.gov/mads/rdf/v1#Temporal":c.rdfType="http://www.loc.gov/mads/rdf/v1#Topic";let s=r.map(t=>t.label).join("--"),l=a["a"].lookupConfig["http://id.loc.gov/authorities/subjects"].modes[0]["LCSH All"].url.replace("<QUERY>",s).replace("&count=25","&count=5")+"&rdftype=ComplexType",n={processor:"lcAuthorities",url:[l],searchValue:s};for(let c of r){let t=!1;if(i&&i.resultType&&"COMPLEX"==i.resultType)break;let e=c.label,o=a["a"].lookupConfig["http://preprod.id.loc.gov/authorities/names"].modes[0]["NAF All"].url.replace("<QUERY>",e).replace("&count=25","&count=5"),r=a["a"].lookupConfig["http://preprod.id.loc.gov/authorities/names"].modes[0]["NAF All"].url.replace("<QUERY>",e).replace("&count=25","&count=5")+"&memberOf=http://id.loc.gov/authorities/subjects/collection_Subdivisions",l=a["a"].lookupConfig["http://id.loc.gov/authorities/subjects"].modes[0]["LCSH All"].url.replace("<QUERY>",e).replace("&count=25","&count=5")+"&rdftype=SimpleType",d=a["a"].lookupConfig["http://id.loc.gov/authorities/subjects"].modes[0]["LCSH All"].url.replace("<QUERY>",e).replace("&count=25","&count=5")+"&rdftype=SimpleType&memberOf=http://id.loc.gov/authorities/subjects/collection_Subdivisions",u=a["a"].lookupConfig["http://id.loc.gov/authorities/subjects"].modes[0]["LCSH All"].url.replace("<QUERY>",e).replace("&count=25","&count=5")+"&memberOf=http://id.loc.gov/authorities/subjects/collection_TemporalSubdivisions",p=a["a"].lookupConfig["http://id.loc.gov/authorities/subjects"].modes[0]["LCSH All"].url.replace("<QUERY>",e).replace("&count=25","&count=5")+"&rdftype=GenreForm",h=a["a"].lookupConfig["https://preprod-8080.id.loc.gov/resources/works"].modes[0]["Works - Left Anchored"].url.replace("<QUERY>",e).replace("&count=25","&count=5"),f=a["a"].lookupConfig["https://preprod-8080.id.loc.gov/resources/works"].modes[0]["Hubs - Left Anchored"].url.replace("<QUERY>",e).replace("&count=25","&count=5"),m=a["a"].lookupConfig["HierarchicalGeographic"].modes[0]["All"].url.replace("<QUERY>",e).replace("&count=25","&count=5"),g=a["a"].lookupConfig["http://id.loc.gov/authorities/subjects"].modes[0]["LCSH All"].url.replace("<QUERY>",e).replace("&count=25","&count=5")+"&rdftype=HierarchicalGeographic",b=a["a"].lookupConfig["http://id.loc.gov/authorities/subjects"].modes[0]["LCSH All"].url.replace("<QUERY>",e).replace("&count=25","&count=5")+"&rdftype=Geographic&memberOf=http://id.loc.gov/authorities/subjects/collection_Subdivisions",v=a["a"].lookupConfig["http://preprod.id.loc.gov/authorities/names"].modes[0]["NAF All"].url.replace("<QUERY>",e).replace("&count=25","&count=5")+"&rdftype=Geographic&memberOf=http://id.loc.gov/authorities/subjects/collection_Subdivisions",y={processor:"lcAuthorities",url:[o],searchValue:e},w={processor:"lcAuthorities",url:[r],searchValue:e},k={processor:"lcAuthorities",url:[l],searchValue:e},S={processor:"lcAuthorities",url:[d],searchValue:e},C={processor:"lcAuthorities",url:[u],searchValue:e},L={processor:"lcAuthorities",url:[p],searchValue:e},I={processor:"lcAuthorities",url:[m],searchValue:e},_={processor:"lcAuthorities",url:[g],searchValue:e},T={processor:"lcAuthorities",url:[b],searchValue:e},x={processor:"lcAuthorities",url:[v],searchValue:e},R={processor:"lcAuthorities",url:[h],searchValue:e},E={processor:"lcAuthorities",url:[f],searchValue:e},M=[],P=[],D=[],O=[],U=[],A=[],N=[],V=[],j=[],$=[],K=[],F=[],B=[];if(c.primary){if([M,P,D,j,O,U,A,N,V]=await Promise.all([this.searchComplex(y),this.searchComplex(w),this.searchComplex(k),this.searchComplex(S),this.searchComplex(n),this.searchComplex(I),this.searchComplex(_),this.searchComplex(R),this.searchComplex(E)]),M=M.filter(t=>!t.literal),P=P.filter(t=>!t.literal),D=D.filter(t=>!t.literal),O=O.filter(t=>!t.literal),U=U.filter(t=>!t.literal),A=A.filter(t=>!t.literal),N=N.filter(t=>!t.literal),V=V.filter(t=>!t.literal),j=j.filter(t=>!t.literal),O.length>0){for(let e of O)if(s.toLowerCase().trim().toLowerCase().trim().replace(/\s+/g," ").replace(/[\p{P}$+<=>^`|~]/gu,"")==e.label.toLowerCase().trim().toLowerCase().trim().replace(/\s+/g," ").replace(/[\p{P}$+<=>^`|~]/gu,"")){i.resultType="COMPLEX",e.heading=c,i.hit=e,t=!0;break}if(t)break}let e=j.map(t=>t.uri);if(D=D.filter(t=>e.indexOf(t.uri)),e=P.map(t=>t.uri),M=M.filter(t=>e.indexOf(t.uri)),D.length>0){for(let e of D)if(c.label.toLowerCase().trim().replace(/\s+/g," ").replace(/[\p{P}$+<=>^`|~]/gu,"")==e.label.toLowerCase().trim().replace(/[\p{P}$+<=>^`|~]/gu,"")||c.label.toLowerCase().trim().replace(/\s+/g," ").replace(/[\p{P}$+<=>^`|~]/gu,"")==e.vlabel.toLowerCase().trim().replace(/[\p{P}$+<=>^`|~]/gu,"")){i.resultType="PRECOORD-LCSH",i.hit||(i.hit=[]),e.heading=c,i.hit.push(e),t=!0;break}if(t)continue}if(M.length>0){for(let e of M)if(c.label.toLowerCase().trim().replace(/\s+/g," ").replace(/[\p{P}$+<=>^`|~]/gu,"")==e.label.toLowerCase().trim().replace(/[\p{P}$+<=>^`|~]/gu,"")){i.resultType="PRECOORD-NAF",i.hit||(i.hit=[]),e.heading=c,i.hit.push(e),t=!0;break}if(t)continue}if(N.length>0){for(let e of N)if(c.label.toLowerCase().trim().replace(/\s+/g," ").replace(/[\p{P}$+<=>^`|~]/gu,"")==e.label.toLowerCase().trim().replace(/[\p{P}$+<=>^`|~]/gu,"")){i.resultType="PRECOORD-WORK",i.hit||(i.hit=[]),e.heading=c,i.hit.push(e),t=!0;break}if(t)continue}if(V.length>0){for(let e of V)if(c.label.toLowerCase().trim().replace(/\s+/g," ").replace(/[\p{P}$+<=>^`|~]/gu,"")==e.label.toLowerCase().trim().replace(/[\p{P}$+<=>^`|~]/gu,"")){i.resultType="PRECOORD-HUB",i.hit||(i.hit=[]),e.heading=c,i.hit.push(e),t=!0;break}if(t)continue}t||(i.hit||(i.hit=[]),i.hit.push({label:c.label,suggestLabel:c.label,uri:null,literal:!0,depreciated:!1,extra:"",heading:c}))}else if("z"===c.type){if([U,A,K,F]=await Promise.all([this.searchComplex(I),this.searchComplex(_),this.searchComplex(x),this.searchComplex(T)]),U=U.filter(t=>!t.literal),A=A.filter(t=>!t.literal),K=K.filter(t=>!t.literal),F=F.filter(t=>!t.literal),U.length>0){for(let e of U)c.label.toLowerCase().trim().replace(/\s+/g," ").replace(/[\p{P}$+<=>^`|~]/gu,"")==e.label.toLowerCase().trim().replace(/[\p{P}$+<=>^`|~]/gu,"")&&(e.heading=c,i.hit.push(e),t=!0);if(t)continue}if(A.length>0){for(let e of A)c.label.toLowerCase().trim().replace(/\s+/g," ").replace(/[\p{P}$+<=>^`|~]/gu,"")==e.label.toLowerCase().trim().replace(/[\p{P}$+<=>^`|~]/gu,"")&&(e.heading=c,i.hit.push(e),t=!0);if(t)continue}if(K.length>0){for(let e of K)c.label.toLowerCase().trim().replace(/\s+/g," ").replace(/[\p{P}$+<=>^`|~]/gu,"")==e.label.toLowerCase().trim().replace(/[\p{P}$+<=>^`|~]/gu,"")&&(e.heading=c,i.hit.push(e),t=!0);if(t)continue}if(F.length>0){for(let e of F)c.label.toLowerCase().trim().replace(/\s+/g," ").replace(/[\p{P}$+<=>^`|~]/gu,"")==e.label.toLowerCase().trim().replace(/[\p{P}$+<=>^`|~]/gu,"")&&(e.heading=c,i.hit.push(e),t=!0);if(t)continue}t||i.hit.push({label:c.label,suggestLabel:c.label,uri:null,literal:!0,depreciated:!1,extra:"",heading:c})}else if("x"===c.type||"a"===c.type){if([j]=await Promise.all([this.searchComplex(S)]),j=j.filter(t=>!t.literal),j.length>0){for(let e of j)c.label.toLowerCase().trim().replace(/\s+/g," ").replace(/[\p{P}$+<=>^`|~]/gu,"")==e.label.toLowerCase().trim().replace(/[\p{P}$+<=>^`|~]/gu,"")&&(e.heading=c,i.hit.push(e),t=!0);if(t)continue}t||i.hit.push({label:c.label,suggestLabel:c.label,uri:null,literal:!0,depreciated:!1,extra:"",heading:c})}else if("y"===c.type){if([$]=await Promise.all([this.searchComplex(C)]),$=$.filter(t=>!t.literal),$.length>0){for(let e of $)c.label.toLowerCase().trim().replace(/\s+/g," ").replace(/[\p{P}$+<=>^`|~]/gu,"")==e.label.toLowerCase().trim().replace(/[\p{P}$+<=>^`|~]/gu,"")&&(e.heading=c,i.hit.push(e),t=!0);if(t)continue}t||i.hit.push({label:c.label,suggestLabel:c.label,uri:null,literal:!0,depreciated:!1,extra:"",heading:c})}else if("v"===c.type){if([B]=await Promise.all([this.searchComplex(L)]),B=B.filter(t=>!t.literal),B.length>0){for(let e of B)c.label.toLowerCase().trim().replace(/\s+/g," ").replace(/[\p{P}$+<=>^`|~]/gu,"")==e.label.toLowerCase().trim().replace(/[\p{P}$+<=>^`|~]/gu,"")&&(e.heading=c,i.hit.push(e),t=!0);if(t)continue}t||i.hit.push({label:c.label,suggestLabel:c.label,uri:null,literal:!0,depreciated:!1,extra:"",heading:c})}}if(Array.isArray(i.hit))for(let a of i.hit)if(!a.literal&&a.uri.indexOf("id.loc.gov/authorities/names/")){let t=await this.returnRDFType(a.uri);t&&(a.heading.rdfType=t)}return i}};e["a"]=s}
1,b304:function(t,e,i){"use strict";var a=i("fa61"),o=i.n(a);o.a},b48e:function(t,e,i){"use strict";var a=i("de77"),o=i.n(a);o.a},b581:function(t,e,i){},b608:function(t,e,i){},b642:function(t,e,i){},b932:function(t,e,i){"use strict";var a=i("25d9"),o=i.n(a);o.a},bcbc:function(t,e,i){"use strict";var a=i("826f"),o=i.n(a);o.a},bf52:function(t,e,i){"use strict";var a=i("dc11"),o=i.n(a);o.a},bfc9:function(t,e,i){"use strict";var a=i("842f"),o=i.n(a);o.a},c4eb:function(t,e,i){"use strict";i.r(e);var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{},[i("div",{staticStyle:{position:"relative"},attrs:{id:t.profileName+"|"+t.profileCompoent}},[t.hasDynamicTemplate()?[i("div",{class:["resource-grid-field-list-navable","resource-"+t.resourceIdx],attrs:{id:"navable-"+t.resourceIdx+"-1-"+t.rowIdx+"-0"}},[t._v(t._s(t.rowIdx)+" has dynamic")])]:["literal"==t.structure.type||"literal-lang"==t.structure.type?i("CompactEditLiteralComponent",{key:t.useKey,attrs:{isMini:t.isMini,ptGuid:t.ptGuid,parentURI:t.parentURI,resourceIdx:t.resourceIdx,rowIdx:t.rowIdx,componentIdx:t.componentIdx,nested:t.nested,structure:t.structure,profileName:t.profileName,profileCompoent:t.profileCompoent,parentStructureObj:t.parentStructureObj,parentStructure:t.parentStructure,activeTemplate:t.activeTemplate,setNavAfterClick:t.setNavAfterClick}}):"simple"==t.returnLookupType(t.structure)?i("CompactEditSimpleLookupComponent",{key:t.useKey,attrs:{ptGuid:t.ptGuid,isMini:t.isMini,parentURI:t.parentURI,structure:t.structure,parentStructureObj:t.parentStructureObj,componentIdx:t.componentIdx,resourceIdx:t.resourceIdx,rowIdx:t.rowIdx,parentStructure:t.parentStructure,nested:t.nested,profileName:t.profileName,profileCompoent:t.profileCompoent,activeTemplate:t.activeTemplate,setNavAfterClick:t.setNavAfterClick}}):"complex"==t.returnLookupType(t.structure)?i("CompactEditComplexLookupComponent",t._g({key:t.useKey,attrs:{isMini:t.isMini,ptGuid:t.ptGuid,parentURI:t.parentURI,structure:t.structure,componentIdx:t.componentIdx,resourceIdx:t.resourceIdx,rowIdx:t.rowIdx,parentStructureObj:t.parentStructureObj,parentStructure:t.parentStructure,nested:t.nested,profileName:t.profileName,profileCompoent:t.profileCompoent,activeTemplate:t.activeTemplate,setNavAfterClick:t.setNavAfterClick},on:{updated:t.forceUpdate}},t.$listeners)):t.structure.valueConstraint.valueTemplateRefs.length>0?i("CompactEditTemplateRefComponent",t._g({key:t.useKey,attrs:{isMini:t.isMini,ptGuid:t.ptGuid,parentURI:t.parentURI,structure:t.structure,componentIdx:t.componentIdx,resourceIdx:t.resourceIdx,rowIdx:t.rowIdx,parentStructureObj:t.parentStructureObj,parentStructure:t.parentStructure,nested:t.nested,profileName:t.profileName,profileCompoent:t.profileCompoent,activeTemplate:t.activeTemplate,navLevel:0,setNavAfterClick:t.setNavAfterClick}},t.$listeners)):i("div",{class:["resource-grid-field-list-navable","resource-"+t.resourceIdx],attrs:{id:"navable-"+t.resourceIdx+"-1-"+t.rowIdx+"-0"}},[t._v(t._s(t.rowIdx)+" "+t._s(t.structure.valueConstraint.valueTemplateRefs.length))])]],2)])},o=[],r=function(){var t=this,e=t.$createElement,i=t._self._c||e;return 0==t.hideField?i("div",{class:["resource-grid-field-list-navable","resource-"+t.resourceIdx],attrs:{tabindex:"-1",id:"navable-"+t.resourceIdx+"-1-"+t.rowIdx+"-"+t.componentIdx},on:{click:function(e){return t.displayModeClick(e)},keydown:function(e){return t.displayModeElementKeydown(e)}}},[i("Keypress",{attrs:{"key-event":"keydown","multiple-keys":[{keyCode:68,modifiers:["shiftKey","ctrlKey","altKey"],preventDefault:!1}]},on:{success:t.openDiacriticSelect}}),i("Keypress",{attrs:{"key-event":"keydown","multiple-keys":[{keyCode:90,modifiers:["shiftKey","ctrlKey","altKey"],preventDefault:!0}]},on:{success:t.addAnotherLiteral}}),t._l(t.inputValue,(function(e,a){return i("div",{key:"input_"+a},[t.editMode?i("div",[i("div",{staticStyle:{position:"relative"}},[i("div",{},[i("form",{attrs:{autocomplete:"off"}},[i("input",{directives:[{name:"model",rawName:"v-model",value:e.value,expression:"inputV.value"}],ref:"input_"+e.guid,refInFor:!0,class:["input-single",{"selectable-input"
1:0==t.isMini,"selectable-input-mini":1==t.isMini,"input-accommodate-diacritics":t.containsNonLatinCodepoints(e.value)}],attrs:{placeholder:t.structure.propertyLabel,bfeType:"EditLiteralComponent-unnested",id:t.assignedId,name:t.assignedId,autocomplete:"off",type:"text"},domProps:{value:e.value},on:{blur:function(e){return t.literalBlur(e)},keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.preventDefault(),t.submitField(e))},t.nav],focus:t.focused,keyup:function(i){return t.change(i,e)},input:function(i){i.target.composing||t.$set(e,"value",i.target.value)}}})])]),i("button",{staticClass:"temp-icon-keyboard fake-real-button simptip-position-top",attrs:{tabindex:"-1","data-tooltip":"Diacritics [CTRL-ALT-D]"},on:{click:t.openDiacriticSelect}})])]):i("div",[null!==e.value&&e.value.trim().length>0?i("div",{ref:"displayModeElement",refInFor:!0,staticStyle:{"min-height":"1em"}},[t._v(t._s(e.value))]):i("div",{ref:"displayModeElement",refInFor:!0,staticStyle:{"font-size":"0.85em","font-style":"oblique"}},[t._v(t._s(t.structure.propertyLabel))])])])})),1==t.showDiacritics?i("div",{staticClass:"diacritic-modal"},[t._m(0),i("hr",{staticStyle:{margin:"2px"}}),i("div",{staticClass:"diacritic-list-holder"},[i("table",t._l(t.diacriticData,(function(e,a){return i("tr",{key:a,ref:"diacriticTable",refInFor:!0,attrs:{"data-id":a},on:{click:t.diacriticSelect}},[i("td",[i("span",{staticClass:"diacritic-modal-list-diacritic"},[t._v(t._s(e.letter))]),i("span",{staticStyle:{"padding-left":"2em"}},[t._v(t._s(e.desc))])]),i("td",[t._v(t._s(e.trigger))])])})),0)])]):t._e()],2):t._e()},s=[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("ul",{staticClass:"diacritic-modal-script-list"},[i("li",{staticStyle:{"font-weight":"bold"}},[t._v("Custom")])])}],l=(i("5319"),i("ddb0"),i("2f62")),n=i("8ad1"),c=i("1a1e"),d=i("960b"),u=i("ca8e");const p=i("82fd");var h={name:"EditLiteralComponent",components:{Keypress:()=>i.e("chunk-2d0ba165").then(i.bind(null,"365a"))},props:{structure:Object,parentStructure:Array,parentStructureObj:Object,profileCompoent:String,profileName:String,activeTemplate:Object,parentURI:String,nested:Boolean,isMini:Boolean,ptGuid:String,rowIdx:Number,resourceIdx:Number,componentIdx:Number,setNavAfterClick:{type:Function}},methods:{addAnotherLiteral:function(){this.inputValue.push({value:"",guid:"new_"+p.generate()})},refreshInputDisplay:function(){let t;t=this.isMini?this.activeProfileMini.rt[this.profileName].pt[this.profileCompoent]:this.activeProfile.rt[this.profileName].pt[this.profileCompoent];let e=[];
1if(this.parentStructureObj&&t.userValue[this.parentStructureObj.propertyURI]){for(let i of t.userValue[this.parentStructureObj.propertyURI])if(i[this.structure.propertyURI])for(let t of i[this.structure.propertyURI])if(t[this.structure.propertyURI])if(e.push(t["@guid"]),this.inputValue.map(t=>t.guid).includes(t["@guid"]))for(let e of this.inputValue)e.guid==t["@guid"]&&(e.value=t[this.structure.propertyURI]);else this.inputValue.push({value:t[this.structure.propertyURI],guid:t["@guid"]})}else if(!this.parentStructureObj&&t.userValue[this.structure.propertyURI]){for(let i of t.userValue[this.structure.propertyURI])if(i[this.structure.propertyURI])if(e.push(i["@guid"]),this.inputValue.map(t=>t.guid).includes(i["@guid"]))for(let t of this.inputValue)t.guid==i["@guid"]&&(t.value=i[this.structure.propertyURI]);else this.inputValue.push({value:i[this.structure.propertyURI],guid:i["@guid"]})}else if(this.parentStructureObj&&this.parentStructureObj.propertyURI==t.userValue["@root"]&&t.userValue[this.structure.propertyURI])for(let i of t.userValue[this.structure.propertyURI])if(i[this.structure.propertyURI])if(e.push(i["@guid"]),this.inputValue.map(t=>t.guid).includes(i["@guid"]))for(let t of this.inputValue)t.guid==i["@guid"]&&(t.value=i[this.structure.propertyURI]);else this.inputValue.push({value:i[this.structure.propertyURI],guid:i["@guid"]});c["a"].profileHacks.agentsHideManualRDFLabelIfURIProvided.enabled&&this.parentStructureObj&&"http://id.loc.gov/ontologies/bibframe/agent"==this.parentStructureObj.propertyURI&&"http://www.w3.org/2000/01/rdf-schema#label"==this.structure.propertyURI&&(this.parentStructureObj.parentId.includes("Information")||this.structure.parentId.includes("PubPlace")||this.structure.parentId.includes("PubName")||this.structure.parentId.includes(":Provision:")||(this.hideField=!0)),this.inputValue.length>1&&(this.inputValue=this.inputValue.filter(t=>""!=t.value)),this.inputValue=this.inputValue.filter(t=>!!t.guid.startsWith("new_")||-1!=e.indexOf(t.guid)),0==this.inputValue.length&&this.inputValue.push({value:"",guid:"new_"+p.generate()});for(let i of this.inputValue)i.value=i.value.replace(/&amp;/g,"&")},literalBlur:function(){if(this.inputValue.length>1)return!1;this.editMode=!1,this.$store.dispatch("enableMacroNav")},displayModeClick:function(t){if(!this.editMode){if(this.editMode=!0,this.$store.dispatch("disableMacroNav"),this.inputValue[0]){let t="input_"+this.inputValue[0].guid;this.$nextTick(()=>{this.$refs[t][0].focus()})}this.setNavAfterClick(t.target.parentNode.id)}},displayModeElementKeydown:function(t){if(console.log(t.key),"Enter"==t.key?this.editMode?(this.editMode=!1,this.$store.dispatch("enableMacroNav")):(this.editMode=!0,this.$store.dispatch("disableMacroNav"),this.$nextTick(()=>{this.$refs.input.focus()})):this.editMode||t.target.blur(),"Enter"==t.key)return t.preventDefault(),!1},containsNonLatinCodepoints:function(t){return/[^\u0000-\u00ff]/.test(t)},focused:function(t){this.$store.dispatch("setActiveInput",{self:this,id:t.target.id,profileCompoent:this.profileCompoent,profileName:this.profileName}).then(()=>{n["a"].focusSidebars()})},submitField:n["a"].globalMoveDown,insertUnicodeHex:function(t){this.inputValue=String.fromCodePoint(t)},isNoteField:function(t){return"Note Text"==t||("Note"==t||"Contents note"==t)},openDiacriticSelect:function(t){if(this.showDiacriticsGuid=t.target.dataset.guid,this.assignedId!=this.activeInput)return!1;this.$store.dispatch("disableMacroNav"),this.showDiacritics=!0,this.$nextTick(()=>{this.$refs.diacriticTable[this.diacriticDataNav].style.backgroundColor="#dfe5f1"}),t&&t.target&&t.target.localName&&"button"==t.target.localName&&t.target.parentNode.querySelector("input").focus()},diacriticSelect:function(t){let e=t.target.parentNode.dataset.id?t.target.parentNode.dataset.id:t.target.parentNode.parentNode.dataset.id,i=!1;console.log(t,this.$refs["input_"+this.showDiacriticsGuid][0].selectionStart);for(let a of this.inputValue)a.guid==this.showDiacriticsGuid&&(i=a.value.length,this.$refs["input_"+this.showDiacriticsGuid]&&this.$refs["input_"+this.showDiacriticsGuid][0]&&this.$refs["input_"+this.showDiacriticsGuid][0].selectionStart&&(i=this.$refs["input_"+this.showDiacriticsGuid][0].selectionStart),a.value=a.value.substring(0,i)+this.diacriticData[e].letter+a.value.substring(i));this.showDiacriticsGuid=null,this.showDiacritics=!1,this.$store.dispatch("enableMacroNav"),this.$nextTick(()=>{i&&document.getElementById(this.assignedId).setSelectionRange(i+1,i+1),document.getElementById(this.assignedId).focus()})},nav:function(t){console.log(t.target);let e=t.target.dataset.guid;if(this.settingsDPackVoyagerNative&&0==this.diacrticsVoyagerNativeMode&&"KeyE"==t.code&&1==t.ctrlKey)return this.$refs["input_"+e].style.color="blue",this.diacrticsVoyagerNativeMode=!0,t.preventDefault(),!1;if(this.settingsDPackVoyagerNative&&1==this.diacrticsVoyagerNativeMode&&"KeyE"==t.code&&1==t.ctrlKey)return this.diacrticsVoyagerNativeMode=!1,window.setTimeout(()=>{this.$refs["input_"+e].style.color="black"},500),t.preventDefault(),!1;if(t&&t.key&&1==this.showDiacritics){if("Escape"==t.key)this.showDiacritics=!1,this.$store.dispatch("enableMacroNav");else if("ArrowDown"==t.key||"ArrowUp"==t.key)"ArrowDown"==t.key&&this.diacriticDataNav<this.$refs.diacriticTable.length-1?this.diacriticDataNav++:"ArrowUp"==t.key&&this.diacriticDataNav>0&&(this.diacriticDataNav=this.diacriticDataNav-1),this.$refs.diacriticTable.forEach(t=>{t.style.backgroundColor="transparent"}),this.$refs.diacriticTable[this.diacriticDataNav].style.backgroundColor="#dfe5f1",this.$refs.diacriticTable[this.diacriticDataNav].scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"});else if("Enter"==t.key){let t=this.diacriticData[this.diacriticDataNav].letter,i=e;i||(i=this.showDiacriticsGuid);let a=!1;for(let e of this.inputValue)e.guid==i&&(a=e.value.length,this.$refs["input_"+i]&&this.$refs["input_"+i][0]&&this.$refs["input_"+i][0].selectionStart&&(a=this.$refs["input_"+i][0].selectionStart),e.value=e.value.substring(0,a)+t+e.value.substring(a));this.showDiacritics=!1,this.$store.dispatch("enableMacroNav")}else for(let i of this.diacriticData)if(t.key==i.trigger){let t=e;t||(t=this.showDiacriticsGuid);let a=!1;for(let e of this.inputValue)e.guid==t&&(a=e.value.length,this.$refs["input_"+t]&&this.$refs["input_"+t][0]&&this.$refs["input_"+t][0].selectionStart&&(a=this.$refs["input_"+t][0].selectionStart),e.value=e.value.substring(0,a)+i.letter+e.value.substring(a));this.showDiacritics=!1,this.$store.dispatch("enableMacroNav")}return t.preventDefault(),!1}},change:function(t,e){console.log(e);let i=e.value.length;if(this.$refs["input_"+e.guid]&&this.$refs["input_"+e.guid][0]&&this.$refs["input_"+e.guid][0].selectionStart&&(i=this.$refs["input_"+e.guid][0].selectionStart),d[t.code]&&this.settingsDPackVoyager)for(let r of d[t.code])t.ctrlKey==r.ctrlKey&&t.altKey==r.altKey&&t.shiftKey==r.shiftKey&&(t.preventDefault(),console.log("HEREREERERERERREREREER OKAY <<<<<<<",i),console.log(this.$refs["input_"+e.guid]),console.log("input_"+e.guid),this.$refs["input_"+e.guid][0].style.color="blue",window.setTimeout(()=>{this.$refs["input_"+e.guid][0].style.color="black"},500),r.combining?(console.log("event.code",t.code),"Backquote"==t.code&&(console.log("inputV.value",e.value),"`"==e.value.charAt(e.value.length-1)&&(e.value=e.value.slice(0,-1))),e.value=e.value.replace("ª",""),e.value=e.value.substring(0,i)+r.codeEscape+e.value.substring(i),console.log(document.getElementById(this.assignedId).setSelectionRange(i+1,i+1)),document.getElementById(this.assignedId).setSelectionRange(i+1,i+1),document.getElementById(this.assignedId).focus()):(t.code.includes("Digit")&&e.value.charAt(i)==t.code.replace("Digit","")&&(e.value=e.value.slice(0,i)+e.value.slice(i)),"Equal"==t.code&&"="==e.value.charAt(e.value.length-1)&&(e.value=e.value.slice(0,i)+e.value.slice(i)),console.log("event.code",t.code),"Backquote"==t.code&&(console.log("inputV.value",e.value),"`"==e.value.charAt(e.value.length-1)&&(e.value=e.value.slice(0,i)+e.value.slice(i))),e.value?e.value=e.value.substring(0,i)+r.codeEscape+e.value.substring(i):e.value=r.codeEscape));if(this.settingsDPackVoyagerNative&&0==this.diacrticsVoyagerNativeMode&&"KeyE"==t.code&&1==t.ctrlKey)return t.preventDefault(),!1;if(this.settingsDPackVoyagerNative&&1==this.diacrticsVoyagerNativeMode&&"KeyE"==t.code&&1==t.ctrlKey)return t.preventDefault(),!1;if(this.settingsDPackVoyagerNative&&u[t.code]&&1==this.diacrticsVoyagerNativeMode){let a;window.setTimeout(()=>{this.$refs["input"].style.color="black"},500),e.value=e.value.slice(0,-1),this.diacrticsVoyagerNativeMode=!1;for(let e of u[t.code])if(e.shiftKey==t.shiftKey){a=e;break}a.combining||e.value?e.value=e.value.substring(0,i)+a.codeEscape+e.value.substring(i):e.value=a.codeEscape}if(null==e.value)return!1;if(e.value==this.inputValueLast)return!1;if(t.target&&t.target.localName&&"textarea"==t.target.localName&&(t.target.style.height="",t.target.style.height=t.target.scrollHeight+"px"),null===e.value)return!1;if(""===e.value.trim()&&(""===this.inputValueLast||null===this.inputValueLast))return!1;let a=null;this.parentStructureObj&&(a=this.parentStructureObj.propertyURI);let o=e.guid;e.guid.startsWith("new_")&&(o=null),this.$store.dispatch("setValueLiteral",{self:this,ptGuid:this.ptGuid,guid:o,parentURI:a,URI:this.structure.propertyURI,value:e.value}).then(t=>{this.inputValueLast=this.inputValue,t&&(e.guid=t),!1===t&&(e.guid="new_"+p.generate())})}},computed:Object(l["b"])({activeInput:"activeInput",activeProfile:"activeProfile",activeProfileMini:"activeProfileMini",workingOnMiniProfile:"workingOnMiniProfile",undoCounter:"undoCounter",settingsDPackVoyager:"settingsDPackVoyager",settingsDPackVoyagerNative:"settingsDPackVoyagerNative",assignedId(){return n["a"].assignID(this.structure,this.parentStructure)}}),watch:{undoCounter:function(){this.refreshInputDisplay()}},data:function(){return{inputValue:[{value:"",guid:"new_"+p.generate()}],inputValueLast:null,inputValueCombiningDiacritic:null,showDiacritics:!1,showDiacriticsGuid:null,diacriticData:[],diacriticDataNav:0,hideField:!1,guid:null,initalGuid:null,diacrticsVoyagerNativeMode:!1,editMode:!1}},created:function(){this.refreshInputDisplay();let t=localStorage.getItem("bfeDiacritics");t&&(this.diacriticData=JSON.parse(t)),this.inputValueLast=this.inputValue}},f=h,m=(i("f03c"),i("2877")),g=Object(m["a"])(f,r,s,!1,null,"922c85b6",null),b=g.exports,v=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:["resource-grid-field-list-navable","trigger-open","resource-"+t.resourceIdx],attrs:{tabindex:"-1",id:"navable-"+t.resourceIdx+"-1-"+t.rowIdx+"-"+t.componentIdx},on:{click:function(e){return t.displayModeClick(e)},keydown:function(e){return t.displayModeElementKeydown(e)}}},[t.editMode?i("div",{},[i("form",{attrs:{autocomplete:"off"},on:{submit:function(t){t.preventDefault()}}},[i("div",{staticStyle:{display:"flex",height:"1.5em"}},[t._l(t.activeLookupValue,(function(e,a){return i("div",{key:a,ref:"added-value",refInFor:!0,staticClass:"selected-value-container"},[i("span",{staticStyle:{"padding-right":"0.3em","line-height":"1.75em"}},[i("EditLabelDereference",{attrs:{URI:e["http://www.w3.org/2000/01/rdf-schema#label"]}}),e.uri?t._e():i("span",{staticClass:"uncontrolled"},[t._v("(uncontrolled)")]),e.uri?i("span",{staticClass:"selected-value-icon",staticStyle:{"margin-left":"5px","border-left":"1px solid black",padding:"0px 5px","font-size":"1em"},attrs:{title:"Controlled Term"}},[t._v("")]):t._e()],1),i("span",{staticStyle:{"font-size":"1em",curs
1or:"pointer"},on:{click:function(e){return t.removeValue(a)}}})])})),i("input",{ref:"lookupInput",class:["input-single",{"selectable-input":0==t.isMini,"selectable-input-mini":1==t.isMini}],attrs:{bfeType:"EditSimpleLookupComponent-unnested",id:t.assignedId,autocomplete:"off",type:"text"},domProps:{value:t.activeValue},on:{blur:t.blur,focus:function(e){return t.autoFocus(e)},keydown:function(e){return t.keyDownEvent(e)},keyup:function(e){return t.keyUpEvent(e)}}})],2)]),1==t.displayAutocomplete?i("div",{staticClass:"autocomplete-container"},[i("ul",t._l(t.displayList,(function(e,a){return i("li",{key:a,attrs:{"data-idx":a},on:{click:t.clickAdd}},[e==t.activeSelect?i("span",{staticClass:"selected",attrs:{"data-idx":a}},[t._v(t._s(e))]):i("span",{attrs:{"data-idx":a}},[t._v(t._s(e))])])})),0)]):t._e()]):i("div",{staticClass:"trigger-open"},[t.activeLookupValue.length>0?t._l(t.activeLookupValue,(function(e,a){return i("div",{key:a,ref:"added-value",refInFor:!0,staticClass:"trigger-open"},[i("span",{staticClass:"trigger-open",staticStyle:{"background-color":"transparent",padding:"0 5px 0 5px","font-size":"0.9em"}},[i("EditLabelDereference",{attrs:{URI:e["http://www.w3.org/2000/01/rdf-schema#label"]}}),e.uri?t._e():i("span",{staticClass:"uncontrolled trigger-open"},[t._v("(uncontrolled)")])],1)])})):[i("div",{staticClass:"trigger-open",staticStyle:{"font-size":"0.85em","font-style":"oblique"}},[t._v(" "+t._s(t.structure.propertyLabel)+" ")])]],2)])},y=[],w=i("d837"),k={name:"CompactEditSimpleLookupComponent",props:{structure:Object,parentStructure:Array,nested:Boolean,isMini:Boolean,profileName:String,activeTemplate:Object,ptGuid:String,parentStructureObj:Object,profileCompoent:String,rowIdx:Number,resourceIdx:Number,componentIdx:Number,setNavAfterClick:{type:Function}},components:{EditLabelDereference:w["a"]},data:function(){return{displayAutocomplete:!1,uri:this.structure.valueConstraint.useValuesFrom[0],displayList:[],activeFilter:"",activeSelect:"",activeValue:"",doubleDelete:!1,activeLookupValue:[],editMode:!1,debounceTimeout:null}},created:function(){this.refreshInputDisplay()},computed:Object(l["b"])({lookupLibrary:"lookupLibrary",activeInput:"activeInput",activeProfile:"activeProfile",activeProfileMini:"activeProfileMini",workingOnMiniProfile:"workingOnMiniProfile",undoCounter:"undoCounter",assignedId(){return n["a"].assignID(this.structure,this.parentStructure)},lookupVocab(t){return t.lookupLibrary[this.structure.valueConstraint.useValuesFrom[0]]}}),watch:{undoCounter:function(){this.refreshInputDisplay()}},methods:{refreshInputDisplay:function(){let t;this.activeLookupValue=[],t=this.isMini?this.activeProfileMini.rt[this.profileName].pt[this.profileCompoent].userValue:this.activeProfile.rt[this.profileName].pt[this.profileCompoent].userValue;let e=["http://www.w3.org/1999/02/22-rdf-syntax-ns#value","http://www.w3.org/2000/01/rdf-schema#label","http://id.loc.gov/ontologies/bibframe/code","http://www.loc.gov/mads/rdf/v1#authoritativeLabel"];if(t&&t["@root"]&&t["@root"]==this.structure.propertyURI){let i=e.filter(e=>Object.keys(t).indexOf(e)>-1);if(t["@id"]||i.length>0){let e=null,a=null,o=null,r=null;for(let s of i)if(t[s])for(let i of t[s])i[s]&&(e=i[s],a=i["@guid"]),i["@id"]&&(o=i["@id"],r=i["@guid"]);t["@id"]&&o&&t["@id"]!=o&&(console.warn("---------------------------------------------"),console.warn("There is a URI at the root level and also in the label? Which to use?"),console.warn(t),console.warn(this.structure),console.warn("---------------------------------------------")),t["@id"]&&(o=t["@id"],r=t["@guid"]),e||o&&(e=o),this.activeLookupValue.push({"http://www.w3.org/2000/01/rdf-schema#label":e,uri:o,uriGuid:r,labelGuid:a})}}else if(t&&t["@type"]&&t["@type"]==this.structure.propertyURI){let i=e.filter(e=>Object.keys(t).indexOf(e)>-1);if(t["@id"]||i.length>0){let e=null,a=null,o=null,r=null;for(let s of i)if(t[s])for(let i of t[s])i[s]&&(e=i[s],a=i["@guid"]),i["@id"]&&(o=i["@id"],r=i["@guid"]);t["@id"]&&o&&t["@id"]!=o&&(console.warn("---------------------------------------------"),console.warn("There is a URI at the root level and also in the label? Which to use?"),console.warn(t),
1console.warn(this.structure),console.warn("---------------------------------------------")),t["@id"]&&(o=t["@id"],r=t["@guid"]),e||o&&(e=o),this.activeLookupValue.push({"http://www.w3.org/2000/01/rdf-schema#label":e,uri:o,uriGuid:r,labelGuid:a})}}else if(this.parentStructureObj&&t[this.parentStructureObj.propertyURI])for(let i of t[this.parentStructureObj.propertyURI]){let t=null,a=null,o=null,r=null,s=e.filter(t=>Object.keys(i).indexOf(t)>-1);i["@id"]&&(o=i["@id"],r=i["@guid"]);for(let e of s)if(i[e])for(let s of i[e])s[e]&&(t=s[e],a=s["@guid"]),s["@id"]&&(o=s["@id"],r=s["@guid"]);t||o&&(t=o.split("/").slice(-1)[0]),this.activeLookupValue.push({"http://www.w3.org/2000/01/rdf-schema#label":t,uri:o,uriGuid:r,labelGuid:a})}else if(this.parentStructureObj&&t["@root"]&&t["@root"]==this.parentStructureObj.propertyURI&&t[this.structure.propertyURI])for(let i of t[this.structure.propertyURI]){let t=null,a=null,o=null,r=null,s=e.filter(t=>Object.keys(i).indexOf(t)>-1);i["@id"]&&(o=i["@id"],r=i["@guid"]);for(let e of s)if(i[e])for(let s of i[e])s[e]&&(t=s[e],a=s["@guid"]),s["@id"]&&(o=s["@id"],r=s["@guid"]);t||o&&(t=o.split("/").slice(-1)[0]),this.activeLookupValue.push({"http://www.w3.org/2000/01/rdf-schema#label":t,uri:o,uriGuid:r,labelGuid:a})}},fakeContainerFocus:function(t){return t},displayModeClick:function(t){if(console.log("HERER"),console.log(t.target),t&&t.target&&t.target.classList.contains("trigger-open")&&0==this.editMode){this.editMode=!0,this.$store.dispatch("disableMacroNav"),this.$nextTick(()=>{this.$refs.lookupInput.focus()});let e=t.target.parentNode;[...Array(5)].forEach(()=>{e.classList.contains("resource-grid-field-list-navable")||(e=e.parentNode)}),this.setNavAfterClick(e.id)}},displayModeElementKeydown:function(t){if("Enter"==t.key?this.editMode?(this.editMode=!1,this.$store.dispatch("enableMacroNav")):(this.editMode=!0,this.$store.dispatch("disableMacroNav"),this.$nextTick(()=>{this.$refs.lookupInput.focus()})):this.editMode||t.target.blur(),t&&"Escape"==t.key&&(this.editMode=!1,this.displayAutocomplete=!1,this.$store.dispatch("enableMacroNav")),"Enter"==t.key)return t.preventDefault(),!1},removeValue:function(t){let e=this.activeLookupValue.splice(t,1);e=e[0],console.log(e),this.$store.dispatch("removeValueSimple",{self:this,idGuid:e.uriGuid,labelGuid:e.labelGuid}).then(()=>{})},filter:async function(t){this.displayList=[],this.activeSelect="",this.activeKeyword=!1;let e="";t&&(e="KEYWORD",this.activeKeyword=!0),Object.keys(this.lookupLibrary[this.uri+e]).forEach(t=>{if("metadata"===t)return!1;""===this.activeFilter.trim()?this.lookupLibrary[this.uri+e][t].forEach(t=>{-1==this.displayList.indexOf(t)&&this.displayList.push(t)}):this.lookupLibrary[this.uri+e][t].forEach(t=>{t.toLowerCase().startsWith(this.activeFilter.toLowerCase())&&-1==this.displayList.indexOf(t)&&this.displayList.push(t),t.toLowerCase().includes(" ("+this.activeFilter.toLowerCase())&&-1==this.displayList.indexOf(t)&&this.displayList.push(t)})}),this.displayList.sort(),this.displayList.length>0&&this.activeFilter.length>0&&(this.activeSelect=this.displayList[0],this.displayAutocomplete=!0),0==this.displayList.length&&(t?this.displayList.push("No Match - Press [Enter] to add uncontrolled value"):this.uri.includes("id.loc.gov/vocabulary/")&&(this.activeFilter.length>3?(this.displayList.push("Searching..."),window.clearTimeout(this.debounceTimeout),this.debounceTimeout=window.setTimeout(()=>{this.$store.dispatch("fetchLookupValues",{self:this,url:this.structure.valueConstraint.useValuesFrom[0],keyword:this.activeFilter}).then(()=>{this.filter(!0)})},500)):this.displayList.push("No local match, enter more of the search term")),this.displayAutocomplete=!0),0==this.activeFilter.length&&(this.displayAutocomplete=!0),this.displayAutocomplete?this.$store.dispatch("disableMacroNav"):this.$store.dispatch("enableMacroNav")},autoFocus:function(t){console.log(this.structure.valueConstraint.useValuesFrom),this.$store.dispatch("setActiveInput",{self:this,id:t.target.id,profileCompoent:this.profileCompoent,profileName:this.profileName}).then(()=>{n["a"].focusSidebars()}),this.activeFilter=t.target.value,this.$store.dispatch("fetchLookupValues",{self:this,url:this.structure.valueConstraint.useValuesFrom[0]}).then(()=>{this.uri=this.structure.valueConstraint.useValuesFrom[0]})},keyUpEvent:function(t){if(t&&t.key&&"ArrowUp"!==t.key&&"ArrowDown"!==t.key&&"Escape"!==t.key&&"Backspace"!==t.key&&"Enter"!==t.key&&"PageUp"!==t.key&&"PageDown"!==t.key&&0==t.ctrlKey){if(!this.nested&&this.activeLookupValue.length>0)return this.$refs["added-value"][0].classList.add("ani-shake"),window.setTimeout(()=>{this.$refs["added-value"][0].classList.remove("ani-shake")},500),t.target.value="",!1;this.activeValue=t.target.value.trimStart(),this.doubleDelete=!1,this.activeValue=t.target.value.trimStart(),this.activeFilter=t.target.value.trimStart(),this.displayAutocomplete=!0,this.$store.dispatch("disableMacroNav"),this.filter()}else if(t&&t.key&&"Backspace"===t.key){if(!this.doubleDelete&&""===this.activeValue)return this.doubleDelete=!0,!1;
1""==this.activeValue&&this.doubleDelete?(this.doubleDelete=!1,this.activeLookupValue.length>0&&this.removeValue(-1),this.doubleDelete=!1,this.displayAutocomplete=!1):""==this.activeValue&&this.activeValue,this.doubleDelete=!1,this.activeValue=t.target.value.trimStart(),this.activeFilter=t.target.value.trimStart(),this.displayAutocomplete=!0,this.$store.dispatch("disableMacroNav"),this.filter()}},keyDownEvent:function(t){if(this.activeValue=t.target.value,t&&t.key&&1==this.displayAutocomplete&&("ArrowUp"===t.key||"ArrowDown"===t.key)){if(this.doubleDelete=!1,this.displayList.length<=1)return!1;if(this.displayAutocomplete||(this.displayAutocomplete=!0),this.activeFilter="",this.activeValue="",""==this.activeSelect.trim()&&this.displayList.length>0)this.activeSelect=this.displayList[0],this.activeValue=this.displayList[0];else for(let e=0;e<this.displayList.length;e++)if(this.displayList[e]===this.activeSelect){if("ArrowDown"===t.key&&e+1<this.displayList.length){this.activeSelect=this.displayList[e+1],this.activeValue=this.displayList[e+1];break}if("ArrowUp"===t.key&&e-1>=0){this.activeSelect=this.displayList[e-1],this.activeValue=this.displayList[e-1];break}}return!1}if(t&&t.key&&"Escape"===t.key)this.doubleDelete=!1,this.activeFilter="",this.activeValue="",this.displayAutocomplete=!1;else if(t&&t.key&&"Enter"===t.key){this.doubleDelete=!1;let e=this.lookupLibrary[this.uri].metadata.values;if(this.activeKeyword&&(e=this.lookupLibrary[this.uri+"KEYWORD"].metadata.values),Object.keys(e).forEach(i=>{let a=e[i].displayLabel.indexOf(this.activeSelect);if(a>-1){this.activeFilter="",this.activeValue="",this.activeSelect="",this.displayAutocomplete=!1,t.target.value="";let o=this.parentStructureObj?this.parentStructureObj.propertyURI:null,r=e[i].authLabel?e[i].authLabel:e[i].label[a];this.$store.dispatch("setValueSimple",{self:this,ptGuid:this.ptGuid,parentURI:o,URI:this.structure.propertyURI,valueURI:e[i].uri,valueLabel:r}).then(t=>{this.activeLookupValue.push({"http://www.w3.org/2000/01/rdf-schema#label":t.valueLabel,uri:t.valueURI,uriGuid:t.guid,labelGuid:t.guid})})}}),""==t.target.value&&this.submitField(),""!==t.target.value){this.activeFilter="",this.activeValue="",this.activeSelect="",this.displayAutocomplete=!1;let e=this.parentStructureObj?this.parentStructureObj.propertyURI:null;this.$store.dispatch("setValueSimple",{self:this,ptGuid:this.ptGuid,parentURI:e,URI:this.structure.propertyURI,valueURI:null,valueLabel:t.target.value}).then(t=>{this.activeLookupValue.push({"http://www.w3.org/2000/01/rdf-schema#label":t.valueLabel,uriGuid:t.guid,labelGuid:t.guid})}),this.submitField()}t.preventDefault()}else""==t.target.value&&(this.activeFilter="",this.activeValue="",this.activeSelect="",this.displayAutocomplete=!1)},blur:function(t){console.log("Blured",t),console.log(t.target)},clickAdd:function(t){this.displayAutocomplete=!1,t&&t.target&&t.target.innerText&&(this.activeSelect=t.target.innerText);let e=this.lookupLibrary[this.uri].metadata.values;this.activeKeyword&&(e=this.lookupLibrary[this.uri+"KEYWORD"].metadata.values),Object.keys(e).forEach(i=>{let a=e[i].displayLabel.indexOf(this.activeSelect);if(a>-1){this.activeFilter="",this.activeValue="",this.activeSelect="",this.displayAutocomplete=!1,t.target.value="";let o=this.parentStructureObj?this.parentStructureObj.propertyURI:null,r=e[i].authLabel?e[i].authLabel:e[i].label[a];this.$store.dispatch("setValueSimple",{self:this,ptGuid:this.ptGuid,parentURI:o,URI:this.structure.propertyURI,valueURI:e[i].uri,valueLabel:r}).then(t=>{this.activeLookupValue.push({"http://www.w3.org/2000/01/rdf-schema#label":t.valueLabel,uri:t.valueURI,uriGuid:t.guid,labelGuid:t.guid})})}}),this.$refs.lookupInput.focus()},submitField:n["a"].globalMoveDown}},S=k,C=(i("4d73"),Object(m["a"])(S,v,y,!1,null,"10767149",null)),L=C.exports,I=function(){var t=this,e=t.$createElement,i=t._self._c||e;return"singleTemplate"==t.dynamic?i("div",t._l(t.activeTemplate.propertyTemplates,(function(e,a){return i("CompactEditMainComponent",{key:a,attrs:{ptGuid:t.ptGuid,isMini:t.isMini,position:a,activeTemplate:Object.assign({nested:!0},t.activeTemplate),structure:t.activeTemplate.propertyTemplates[a],profileCompoent:t.profileCompoent,profileName:t.profileName,grandParentStructureObj:t.parentStructureObj,parentStructureObj:t.structure,parentStructure:["nothing"],nested:!0}})})),1):i("div",{staticStyle:{overflow:"hidden"}},[i("div",{},[t.structure.valueConstraint.valueTemplateRefs.length>
11?[i("div",{class:["resource-grid-field-list-navable","resource-"+t.resourceIdx],staticStyle:{display:"flex"},attrs:{id:"navable-"+t.resourceIdx+"-1-"+t.rowIdx+"-"+parseInt(t.componentIdx)}},[i("div",{staticStyle:{flex:"1"}},[i("form",{attrs:{autocomplete:"off"}},[i("input",{staticClass:"selectable-input",staticStyle:{width:"95%","background-color":"transparent",border:"none","font-size":"1em"},attrs:{bfeType:"CompactEditTemplateRefComponent-nested",id:t.assignedId,autocomplete:"off",type:"text"},domProps:{value:t.multiTemplateSelect},on:{focus:t.focused,keydown:function(e){return t.multiTemplateSelectKeydown(e)}}})])]),i("button",{staticClass:"temp-icon-switch simptip-position-top",staticStyle:{height:"1em",width:"1em"},attrs:{tabindex:"-1","data-tooltip":t.labels.refComponentSwitchButton},on:{click:function(e){return t.multiTemplateSelectKeydown(e,!0)}}})])]:t._e(),null!=t.activeTemplate&&t.activeTemplate.propertyTemplates.length>0?i("div",t._l(t.activeTemplate.propertyTemplates,(function(e,a){return i("CompactEditMainComponent",{key:a,attrs:{resourceIdx:t.resourceIdx,rowIdx:t.rowIdx,componentIdx:t.returnComponentIdx(e,t.componentIdx,a),ptGuid:t.ptGuid,isMini:t.isMini,activeTemplate:t.activeTemplate,structure:t.activeTemplate.propertyTemplates[a],parentStructureObj:t.structure,parentStructure:["nothing"],profileCompoent:t.profileCompoent,profileName:t.profileName,nested:!0,navLevel:t.navLevel+1,setNavAfterClick:t.setNavAfterClick}})})),1):i("div",[i("span",[t._v("Missing resource template "+t._s(t.structure.valueConstraint.valueTemplateRefs))]),t._v(" "+t._s(t.activeTemplate)+" ")])],2)])},_=[],T=i("1bca"),x={name:"CompactEditTemplateRefComponent",components:{CompactEditMainComponent:()=>Promise.resolve().then(i.bind(null,"c4eb"))},props:{structure:Object,parentStructure:Array,parentStructureObj:Object,profileCompoent:String,parentURI:String,profileName:String,nested:Boolean,isMini:Boolean,dynamic:String,ptGuid:String,rowIdx:Number,resourceIdx:Number,componentIdx:Number,navLevel:Number,setNavAfterClick:{type:Function}},data:function(){return{multiTemplateSelect:"",multiTemplateSelectURI:"",multiTemplateSelectOptions:[],activeTemplate:null,propertyTemplatesOrderLookup:{},propertyTemplatesOrderTypeLookup:{},labels:T["a"]}},computed:Object(l["b"])({rtLookup:"rtLookup",activeInput:"activeInput",activeProfile:"activeProfile",assignedId(){return n["a"].assignID(this.structure,this.parentStructure)}}),created:function(){let t=this.structure.valueConstraint.valueTemplateRefs[0],e=!1;if((this.structure.userValue["@type"]||this.parentStructureObj&&this.parentStructureObj.userValue["@type"])&&this.structure.valueConstraint.valueTemplateRefs.forEach(i=>{if(e)return!1;this.rtLookup[i].resourceURI===this.structure.userValue["@type"]&&(t=i,e=!0);for(let a in this.structure.userValue)if(Array.isArray(this.structure.userValue[a]))for(let o of this.structure.userValue[a])o["@type"]&&this.rtLookup[i].resourceURI===o["@type"]&&(t=i,e=!0);if(this.parentStructureObj)for(let a in this.parentStructureObj.userValue)if(Array.isArray(this.parentStructureObj.userValue[a
1]))for(let o of this.parentStructureObj.userValue[a])o["@type"]&&this.rtLookup[i].resourceURI===o["@type"]&&(t=i,e=!0)}),this.parentStructure&&-1==this.parentStructure.indexOf(t)){if(this.rtLookup[t]){let e=JSON.parse(JSON.stringify(this.rtLookup[t]));this.multiTemplateSelect=e.resourceLabel,this.multiTemplateSelectURI=t,this.activeTemplate=e,this.buildPropertyTemplatesOrderLookup()}}else"lc:RT:bf2:Monograph:Dissertation"==t&&(this.multiTemplateSelect=this.rtLookup[t].resourceLabel,this.multiTemplateSelectURI=t,this.activeTemplate=this.rtLookup[t],this.buildPropertyTemplatesOrderLookup()),"lc:RT:bf2:Hub:Contribution"==t&&(this.multiTemplateSelect=this.rtLookup[t].resourceLabel,this.multiTemplateSelectURI=t,this.activeTemplate=this.rtLookup[t],this.buildPropertyTemplatesOrderLookup())},methods:{returnComponentIdx:function(t,e,i){return parseInt(e)+parseInt(i)+.1},buildPropertyTemplatesOrderLookup:function(){if(this.propertyTemplatesOrderLookup={},this.activeTemplate.propertyTemplates.forEach((t,e)=>{this.propertyTemplatesOrderLookup[t.propertyURI+t.propertyLabel]=e}),1==this.activeTemplate.propertyTemplates.length){let t=this.activeTemplate.propertyTemplates[0].propertyURI+this.activeTemplate.propertyTemplates[0].propertyLabel;this.propertyTemplatesOrderTypeLookup[t]="solo"}else if(2==this.activeTemplate.propertyTemplates.length){let t=this.activeTemplate.propertyTemplates[0].propertyURI+this.activeTemplate.propertyTemplates[0].propertyLabel;this.propertyTemplatesOrderTypeLookup[t]="start",t=this.activeTemplate.propertyTemplates[1].propertyURI+this.activeTemplate.propertyTemplates[1].propertyLabel,this.propertyTemplatesOrderTypeLookup[t]="end"}else this.activeTemplate.propertyTemplates.length>
12&&this.activeTemplate.propertyTemplates.forEach((t,e)=>{0==e?this.propertyTemplatesOrderTypeLookup[t.propertyURI+t.propertyLabel]="start":e==this.activeTemplate.propertyTemplates.length-1?this.propertyTemplatesOrderTypeLookup[t.propertyURI+t.propertyLabel]="end":this.propertyTemplatesOrderTypeLookup[t.propertyURI+t.propertyLabel]="middle"})},multiTemplateSelectKeydown:function(t,e){if(!0===e&&(t={key:"ArrowRight",target:t.target.parentNode.querySelector("input")},t.target.parentNode.querySelector("input").focus()),"ArrowRight"!==t.key&&"ArrowLeft"!==t.key)return"Tab"===t.key||(t.preventDefault(),!1);{let e,i;if("ArrowRight"===t.key){let t=this.structure.valueConstraint.valueTemplateRefs.indexOf(this.multiTemplateSelectURI);i=this.structure.valueConstraint.valueTemplateRefs[t],t+1>this.structure.valueConstraint.valueTemplateRefs.length-1&&(t=-1),e=this.structure.valueConstraint.valueTemplateRefs[t+1]}else{let t=this.structure.valueConstraint.valueTemplateRefs.indexOf(this.multiTemplateSelectURI);i=this.structure.valueConstraint.valueTemplateRefs[t],0==t&&(t=this.structure.valueConstraint.valueTemplateRefs.length),e=this.structure.valueConstraint.valueTemplateRefs[t-1]}this.$store.dispatch("refTemplateChange",{self:this,profileName:this.profileName,profileComponet:this.profileCompoent,structure:this.structure,template:this.activeTemplate,parentId:this.structure.parentId,nextRef:this.rtLookup[e],thisRef:this.rtLookup[i]}).then(()=>{let i=JSON.parse(JSON.stringify(this.rtLookup[e]));console.log(i),this.multiTemplateSelect=i.resourceLabel,this.multiTemplateSelectURI=e,this.activeTemplate=i,this.buildPropertyTemplatesOrderLookup(),this.focused(t),n["a"].renderBorders(!0)})}},focused:function(t){this.$store.dispatch("setActiveInput",{self:this,id:t.target.id,profileCompoent:this.profileCompoent,profileName:this.profileName}).then(()=>{n["a"].focusSidebars()})}}},R=x,E=(i("a2b7"),Object(m["a"])(R,I,_,!1,null,"565e8973",null)),M=E.exports,P=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:["resource-grid-field-list-navable","resource-"+t.resourceIdx],attrs:{tabindex:"-1",id:"navable-"+t.resourceIdx+"-1-"+t.rowIdx+"-"+t.componentIdx},on:{click:function(e){return t.displayModeClick(e)},keydown:function(e){return t.displayModeElementKeydown(e)}}},[i("Keypress",{attrs:{"key-event":"keydown","key-code":27},on:{success:t.closeModal}}),i("Keypress",{attrs:{"key-event":"keydown","multiple-keys":[{keyCode:66,modifiers:["ctrlKey","shiftKey"],preventDefault:!0}]},on:{success:t.togglePreCoordinated}}),i("div",{staticClass:"trigger-open"},[i("div",{ref:"displayLabel",staticClass:"trigger-open",staticStyle:{display:"inline-block",position:"relative",bottom:"2px"}},[0!=t.formatDisplayLabel()&&null!=t.formatDisplayLabel()?[i("span",{ref:"displayLabelSpan",staticClass:"trigger-open",staticStyle:{"padding-right":"0.3em"},on:{click:t.toggleSelectedDetails}},[i("span",{staticClass:"selected-value-icon trigger-open",domProps:{innerHTML:t._s(t.returnAuthIcon(this.displayType))}}),t.formatDisplayLabel().startsWith("http")?i("span",{ref:"labelSpan",staticClass:"trigger-open"},[i("EditLabelDereference",{key:t.editLabelDereferenceKey,staticClass:"trigger-open",attrs:{URI:t.formatDisplayLabel()}})],1):i("span",{key:t.editLabelDereferenceKey,ref:"labelSpan",staticClass:"trigger-open"},[t._v(t._s(t.formatDisplayLabel()))])]),i("span",{staticClass:"selected-value-icon trigger-open",staticStyle:{"border-left":"solid 1px black",padding:"0 0.5em","font-size":"1em"},attrs:{title:t.validationMessage},domProps:{innerHTML:t._s(t.validateHeading())}})]:[i("span",{staticClass:"trigger-open",staticStyle:{"font-size":"0.85em","font-style":"oblique"}},[t._v(t._s(t.structure.propertyLabel))])]],2)]),i("div",{class:["modaloverlay",{"modal-display":t.displayModal}],attrs:{id:t.assignedId}},[i("div",{class:["modal"]},[i("div",[t.lowResMode?t._e():i("div",{staticClass:"close temp-icon-close",on:{click:t.closeModal}}),t.lowResMode?t._e():i("div",{staticClass:"modal-title"},[t.parentStructureObj&&"Lookup"==t.structure.propertyLabel?i("span",[t._v(t._s(t.parentStructureObj.propertyLabel)+" -- ")]):t._e(),i("span",[t._v(t._s(t.structure.propertyLabel))])]),i("div",{staticClass:"modal-content"},[t.useSubjectEditor()?i("div",[i("EditSubjectEditor",{ref:"EditSubjectEditor",on:{closeEditor:t.closeModal,lowResModeActivate:t.lowResModeActivate,subjectAdded:t.subjectAdded}})],1):i("div",{class:["modal-content-flex-container",{"modal-content-flex-container-complex":1==t.canBuildComplex()&&1==t.displayPreCoordinated,"modal-content-flex-container-complex-prompt":0==t.displayPreCoordinated,"modal-content-flex-container-complex-hide":0==t.canBuildComplex()}]},[i("div",{staticClass:"modal-content-left"},[i("div",{staticStyle:{height:"13%"}},[i("div",{staticClass:"modal-switch-values-container component-container-fake-input no-lower-right-border-radius",staticStyle:{flex:"4","border-top-left-radius":"0.5em"}},[i("div",{staticStyle:{display:"flex"}},[i("div",{staticStyle:{flex:"1"}},[i("form",{attrs:{autocomplete:"off"}},[i("input",{staticClass:"no-lower-right-border-radius",staticStyle:{width:"95%",border:"none",height:"90%","font-size":"1.5em",padding:"0.1em",background:"none"},attrs:{id:t.assignedId+"switch",bfeType:"",autocomplete:"off",type:"text"},domProps:{value:t.modeSelect},on:{focus:t.focused,keydown:function(e){return t.switchTypes(e)}}})])]),i("button",{staticClass:"temp-icon-switch fake-real-button simptip-position-top",attrs:{"data-tooltip":"Select subset of the vocabulary to use [Left] or [Right Arrow]"},on:{click:function(e){return t.switchTypes(e,!0)}}})])]),i("div",{class:["component-container-fake-input no-upper-right-border-radius no-upper-border modal-switch-values-container"],staticStyle:{"border-bottom-left-radius":"0.5em"}},[i("form",{attrs:{autocomplete:"off"}},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.searchValue,expression:"searchValue"}],ref:"searchInput",staticStyle:{width:"95%",border:"none",height:"90%","font-size":"2em",padding:"0.2em 0.1em 0.2em 0.1em",background:"none"},attrs:{bfeType:"",id:t.assignedId+"search",name:t.assignedId,autocomplete:"off",type:"text"},domProps:{value:t.searchValue},on:{keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.preventDefault(),t.submitField(e))},function(e){return t.searchNav(e)}],focus:t.focused,keyup:function(e){return t.search(e)}
1,input:function(e){e.target.composing||(t.searchValue=e.target.value)}}})])])]),i("div",{class:["complex-lookup-results",{"complex-lookup-results-complex":t.canBuildComplex()}]},[0==t.activeComplexSearch.length&&0==t.activeComplexSearchInProgress&&1!=t.initalSearchState?i("div",[i("h5",[t._v("No results found.")])]):t._e(),1==t.activeComplexSearchInProgress?i("div",[i("h5",[t._v("Searching...")])]):t._e(),i("select",{staticClass:"modal-entity-select",staticStyle:{height:"100%"},attrs:{size:"10",id:t.assignedId+"select"},on:{change:function(e){return t.selectChange(e)},keydown:function(e){return t.selectNav(e)}}},t._l(t.activeComplexSearch,(function(e,a){return i("option",{key:a,staticClass:"complex-lookup-result",attrs:{"data-label":e.label},domProps:{value:e.uri,innerHTML:t._s(t.returnAuthIcon(e)+" "+e.label+(e.literal?" [Literal]":""))}})})),0)])]),i("div",{staticClass:"modal-content-right",staticStyle:{position:"relative"}},[t.contextRequestInProgress?i("div",{staticStyle:{"font-weight":"bold"}},[t._v("Retrieving data...")]):t._e(),Object.keys(t.contextData).length>0?i("div",{staticClass:"modal-context",style:{height:t.displayPreCoordinated?"50%":"75%"}},[i("h3",[i("span",{staticClass:"modal-context-icon simptip-position-top",attrs:{"data-tooltip":"Type: "+t.contextData.type},domProps:{innerHTML:t._s(t.returnAuthIcon(t.contextData.type))}}),t._v(t._s(t.contextData.title))]),i("div",{staticClass:"modal-context-data-title"},[t._v(t._s(t.contextData.type))]),i("a",{staticStyle:{color:"#2c3e50",float:"none",border:"none","border-radius":"0","background-color":"transparent","font-size":"1em",padding:"0"},attrs:{href:t.rewriteURI(t.contextData.uri),target:"_blank"}},[t._v("view on id.loc.gov")]),t.contextData.variant&&t.contextData.variant.length>0?i("div",[i("div",{staticClass:"modal-context-data-title"},[t._v("Variants:")]),i("ul",t._l(t.contextData.variant,(function(e,a){return i("li",{key:"var"+a,staticClass:"modal-context-data-li"},[t._v(t._s(e))])})),0)]):t._e(),t._l(Object.keys(t.contextData.nodeMap),(function(e){return i("div",{key:e},[i("div",{staticClass:"modal-context-data-title"},[t._v(t._s(e)+":")]),i("ul",t._l(t.contextData.nodeMap[e],(function(a,o){return i("li",{key:e+o,staticClass:"modal-context-data-li"},[t._v(t._s(a))])})),0)])})),t.contextData.source&&t.contextData.source.length>0?i("div",[i("div",{staticClass:"modal-context-data-title"},[t._v("Sources:")]),i("ul",t._l(t.contextData.source,(function(e,a){return i("li",{key:"sources-"+a,staticClass:"modal-context-data-li"},[t._v(t._s(e))])})),0)]):t._e()],2):t._e(),0!=Object.keys(t.contextData).length?i("div",{staticClass:"modal-context-add-menu"},[0==t.displayPreCoordinated&&t.structure.valueConstraint.useValuesFrom&&t.structure.valueConstraint.useValuesFrom.indexOf("http://id.loc.gov/authorities/subjects")>-1?i("button",{staticStyle:{width:"75%","margin-bottom":"5px"},on:{click:t.togglePreCoordinated}},[t._v("Build subject string [CTRL+SHIFT+B]")]):t._e(),1==t.displayPreCoordinated?i("div",{staticClass:"modal-context-build-manual"},[i("div",{staticClass:"modal-context-build-manual-buttons"},[i("div",[t._v("Build manual pre-coordinated: Add selected as a subdivision: ")]),i("button",{staticStyle:{width:"12em"},on:{click:function(e){return t.precoordinatedAddSubdivision("Topic")}}},[t._v("Heading or Topical [CRTL+SHIFT+1] ")]),i("button",{staticStyle:{width:"10em"},on:{click:function(e){return t.precoordinatedAddSubdivision("Geographic")}}},[t._v("Geographic [CRTL+SHIFT+2] ")]),i("button",{staticStyle:{width:"10em"},on:{click:function(e){return t.precoordinatedAddSubdivision("Temporal")}}},[t._v("Chronological [CRTL+SHIFT+3] ")]),i("button",{staticStyle:{width:"10em"},on:{click:function(e){return t.precoordinatedAddSubdivision("GenreForm")}}},[t._v("Form [CRTL+SHIFT+4] ")]),i("button",{staticStyle:{width:"10em"},on:{click:function(e){return t.precoordinatedRemoveLast()}}},[t._v("Remove Last [CRTL+SHIFT+5] ")])]),i("div",{staticClass:"modal-context-build-manual-precoordinted-display"},[0==t.precoordinated.length?i("span",[t._v("Your pre-coordinated heading will display here when you add subdivisions")]):t._e(),i("span",[t._v(" "+t._s(t.precoordinated.map((function(t){return t.label})).join("--"))+" ")])])]):t._e(),0==t.precoordinated.length?i("button",{staticStyle:{width:"75%"},on:{click:t.add}},[t._v("Add Selected [SHIFT+Enter]")]):t.precoordinated.length>0?i("button",{staticClass:"simptip-position-left",staticStyle:{width:"75%"},attrs:{"data-tooltip":""},on:{click:t.add}},[t._v("Add Pre-Coordinated [SHIFT+Enter]")]):t._e()]):t._e(),t.allowHubCreation?i("button",{staticStyle:{width:"75%",position:"absolute",top:"85%",left:"12%","background-color":"white","border-color":"rgb(42, 42, 42)",border:"3px solid rgb(42, 42, 42)",color:"rgb(42, 42, 42)"},on:{click:t.showMiniHubEdit}},[i("div",{staticStyle:{display:"flex",width:"150px",height:"25px","margin-left":"auto","margin-right":"auto"}},[i("div",{staticStyle:{flex:"0",width:"50px"}}
1,[i("svg",{attrs:{width:"25px",height:"25px",version:"1.1",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{fill:"royalblue",d:"m62.113 24.66 1.9023-15.238 18.875 32.691-7.5469 20.004 15.238 1.9023-32.691 18.875-20.004-7.5469-1.9023 15.238-18.875-32.691 7.5469-20.004-15.238-1.9023 32.691-18.875zm-17.684 15.695-4.0781 15.215 15.215 4.0781 4.0781-15.215z","fill-rule":"evenodd"}})])]),i("div",{staticStyle:{flex:"1","text-align":"left"}},[t._v("Build New Hub")])])]):t._e()])])])])])])],1)},D=[],O=i("ad6d"),U=i("dd89"),A=i("f7e4"),N={name:"CompactEditComplexLookupComponent",components:{Keypress:()=>i.e("chunk-2d0ba165").then(i.bind(null,"365a")),EditSubjectEditor:A["a"],EditLabelDereference:w["a"]},props:{structure:Object,parentStructure:Array,profileCompoent:String,parentStructureObj:Object,profileName:String,activeTemplate:Object,parentURI:String,isMini:Boolean,nested:Boolean,rowIdx:Number,resourceIdx:Number,componentIdx:Number,setNavAfterClick:{type:Function}},data:function(){return{displayModal:!1,lookups:this.structure.valueConstraint.useValuesFrom,lookupConfig:c["a"].lookupConfig,modeSelect:null,searchValue:"",searchTimeout:null,selectLastIndex:null,initalSearchState:!0,selectNavTimeout:null,componentKey:0,displaySelectedDetails:!1,doubleDelete:!1,precoordinated:[],displayPreCoordinated:!1,displayLabelDreferenced:null,displayLabel:null,displayType:null,displayGuid:null,displayContext:{},editLabelDereferenceKey:Date.now(),contextRequestInProgress:!1,validated:!1,validationMessage:"",lowResMode:!1,displayMini:!1,allowHubCreation:!1,userData:{},editMode:!1}},created:function(){this.checkForUserData(),"http://id.loc.gov/ontologies/bibframe/Work"!==this.structure.propertyURI&&"http://id.loc.gov/ontologies/bibframe/expressionOf"!==this.structure.propertyURI||(this.allowHubCreation=!0)},computed:Object(l["b"])({lookupLibrary:"lookupLibrary",activeInput:"activeInput",activeProfile:"activeProfile",activeProfileMini:"activeProfileMini",workingOnMiniProfile:"workingOnMiniProfile",activeProfileName:"activeProfileName",activeComplexSearch:"activeComplexSearch",activeComplexSearchInProgress:"activeComplexSearchInProgress",settingsLookupsUseTextSubjectEditor:"settingsLookupsUseTextSubjectEditor",contextData:"contextData",undoCounter:"undoCounter",assignedId(){return n["a"].assignID(this.structure,this.parentStructure,c["a"])},modalSelectOptions(){let t=[];return this.structure.valueConstraint.useValuesFrom.forEach(e=>{this.lookupConfig[e]&&this.lookupConfig[e].modes.forEach(i=>
1{Object.keys(i).forEach(a=>{t.push({label:a,urls:i[a].url,processor:this.lookupConfig[e].processor,minCharBeforeSearch:!!this.lookupConfig[e].minCharBeforeSearch&&this.lookupConfig[e].minCharBeforeSearch,all:i[a].all}),!this.modeSelect&&i[a].all&&(this.modeSelect=a)})})}),console.log("optionsoptionsoptionsoptionsoptions",t),t},modalSelectOptionsLabels(){return this.modalSelectOptions.map(t=>t.label)},lookupVocab(t){return t.lookupLibrary[this.structure.valueConstraint.useValuesFrom[0]]}}),watch:{undoCounter:function(){this.checkForUserData()}},methods:{focusCurrentInput:n["a"].focusCurrentInput,returnAuthIcon:n["a"].returnAuthIcon,displayModeClick:function(t){if(console.log(t),t&&t.target&&t.target.classList.contains("trigger-open")&&!1===this.displayModal){this.openEditor();let e=t.target.parentNode;[...Array(5)].forEach(()=>{e.classList.contains("resource-grid-field-list-navable")||(e=e.parentNode)}),this.setNavAfterClick(e.id)}},displayModeElementKeydown:function(t){if(console.log(t.key,t.target.classList),"Enter"==t.key&&t&&t.target&&t.target.classList.contains("resource-grid-field-list-navable")&&!this.displayModal&&this.openEditor(),"Enter"==t.key)return t.preventDefault(),!1},showMiniHubEdit:function(){this.closeModal();let t={useProfile:"Hub",sourceId:this.assignedId,component:this};console.log("Emit",t,this.$parent),this.$emit("showMiniEditorEdit",t),this.$parent.$emit("showMiniEditorEdit",t),this.$parent.$parent.$emit("showMiniEditorEdit",t),this.$parent.$parent.$parent.$emit("showMiniEditorEdit",t),this.$parent.$parent.$parent.$parent.$emit("showMiniEditorEdit",t)},formatDisplayLabel:function(){let t=!1;if(this.displayLabel&&this.displayLabel.startsWith("http:")){let e=U["a"].returnUserValues(this.activeProfile,this.profileName,this.profileCompoent,this.structure.propertyURI);for(let i in e)if(i==this.parentStructureObj.propertyURI)for(let a of e[i])for(let e in a)"@context"==e&&a[e].title&&(t=a[e].title);this.$nextTick(()=>{[100,500,1e3,2e3].forEach(t=>{window.setTimeout(()=>{this.displayLabelDreferenced||(this.displayLabelDreferenced=this.$refs.labelSpan.innerText)},t)})})}return t||this.displayLabel},showEditLink:function(){let t=!0;return this.displayLabel.includes("id.loc.gov/resources/works/")&&(t=!1),this.displayLabel.includes("id.loc.gov/resources/hubs/")&&(t=!1),"http://www.loc.gov/mads/rdf/v1#Topic"==this.structure.propertyURI&&!1===this.settingsLookupsUseTextSubjectEditor&&(t=!1),t},showRemoveLink:function(){let t=!0;return this.displayLabel.includes("id.loc.gov/resources/works/")&&(t=!1),t},useSubjectEditor:function(){let t=!1;return"http://www.loc.gov/mads/rdf/v1#Topic"==this.structure.propertyURI&&(t=!0),!1===this.settingsLookupsUseTextSubjectEditor&&(t=!1),t},validateHeading:function(){if("http://id.loc.gov/ontologies/bibframe/Work"!=this.structure.propertyURI&&"http://id.loc.gov/ontologies/bibframe/Instance"!=this.structure.propertyURI&&"http://id.loc.gov/ontologies/bibframe/Item"!=this.structure.propertyURI&&"http://id.loc.gov/ontologies/bflc/relation"!=this.structure.propertyURI||(this.validated=O["a"].headingNotChecked,this.validationMessage=O["a"].getValidationMessage(this.validated)),!1===this.validated){let t=U["a"].returnUserValues(this.activeProfile,this.profileName,this.profileCompoent,this.structure.propertyURI);t=JSON.parse(JSON.stringify(t)),t&&this.parentStructureObj&&this.parentStructureObj.propertyURI&&(t.hintUri=this.parentStructureObj.propertyURI),!1!==t&&O["a"].validateHeading(t).then(e=>{let i=U["a"].returnUserValues(this.activeProfile,this.profileName,this.profileCompoent,this.structure.propertyURI);this.validated=e,this.validationMessage=O["a"].getValidationMessage(e),void 0!==t["http://id.loc.gov/ontologies/bibframe/agent"]&&(t=t["http://id.loc.gov/ontologies/bibframe/agent"][0]),void 0!==i["http://id.loc.gov/ontologies/bibframe/agent"]&&(i=i["http://id.loc.gov/ontologies/bibframe/agent"][0]),t["@id"]!==this.displayContext.uri&&(this.displayContext.uri=t["@id"]);var a=O["a"].getLabel(t);this.displayLabel!=a&&(this.displayLabel=a),this.displayContext.title!=a&&(this.displayContext.title=a),i["@id"]||t["@id"].includes("id.loc.gov/authorities/names/")&&this.$store.dispatch("fetchContext",{self:this,searchPayload:t["@id"]}
1).then(()=>{this.$store.dispatch("setValueComplex",{self:this,profileComponet:this.profileCompoent,template:this.profileName,structure:this.structure,parentStructure:this.parentStructureObj}).then(()=>{this.componentKey++})})})}return this.validated},camelize:function(t){return t.replace(/(?:^\w|[A-Z]|\b\w|\s+)/g,(function(t,e){return 0===+t?"":0===e?t.toLowerCase():t.toUpperCase()}))},submitField:function(){return this.add()},rewriteURI:function(t){return!!t&&(!t.includes("bibframe.example.org")&&((t.includes("/resources/hubs/")||t.includes("/resources/works/")||t.includes("/resources/instances/")||t.includes("/resources/items/"))&&(t=t.replace("https://id.loc.gov/",c["a"].returnUrls().bfdb),t=t.replace("http://id.loc.gov/",c["a"].returnUrls().bfdb)),t))},precoordinatedAddSubdivision:function(t){if(0==Object.keys(this.contextData).length)return!1;let e=this.contextData.title,i=this.contextData.uri,a=this.contextData.type;this.contextData.typeFull||("Topic"==t?(this.contextData.typeFull="http://www.loc.gov/mads/rdf/v1#Topic",a="Topic"):"Geographic"==t?(this.contextData.typeFull="http://www.loc.gov/mads/rdf/v1#Geographic",a="Geographic"):"Temporal"==t?(this.contextData.typeFull="http://www.loc.gov/mads/rdf/v1#Temporal",a="Temporal"):"GenreForm"==t&&(this.contextData.typeFull="http://www.loc.gov/mads/rdf/v1#GenreForm",a="GenreForm")),console.log(t),console.log({uri:i,label:e,type:a,typeFull:this.contextData.typeFull}),this.precoordinated.push({uri:i,label:e,type:a,typeFull:this.contextData.typeFull}),this.$refs.searchInput.focus()},precoordinatedRemoveLast:function(){this.precoordinated.length>0&&this.precoordinated.splice(-1,1)},canBuildComplex:function(){return this.structure.valueConstraint.useValuesFrom.indexOf("http://id.loc.gov/authorities/subjects")>-1},togglePreCoordinated:function(t){if(0==this.displayPreCoordinated&&1==this.displayModal){if(this.displayPreCoordinated=!0,t&&t.event)return t.event.preventDefault(),!1}else if(this.displayPreCoordinated=!1,t&&t.event)return t.event.preventDefault(),!1},removeValue:function(){this.userData={},this.$store.dispatch("clearContext",{self:this}).then(()=>{this.$store.dispatch("setValueComplex",{self:this,profileComponet:this.profileCompoent,template:this.activeTemplate,structure:this.structure,parentStructure:this.parentStructureObj}).then(()=>{this.checkForUserData(),setTimeout(()=>{document.getElementById(this.assignedId).focus()},0)})})},doubleDeleteCheck:function(t){if(t&&t.key&&"Backspace"===t.key)this.doubleDelete?this.removeValue():this.doubleDelete=!0;else if("ArrowUp"!=t.key&&"ArrowDown"!=t.key&&"Tab"!=t.key)return t.preventDefault(),!1},toggleSelectedDetails:function(){this.displaySelectedDetails?(this.displaySelectedDetails=!1,setTimeout(()=>{document.getElementById(this.assignedId).focus()},0)):this.displaySelectedDetails=!0},checkForUserData:function(){let t,e;this.displayLabel=null,this.displayType=null,this.displayGuid=null,this.isMini?(t=U["a"].returnUserValues(this.activeProfileMini,this.profileName,this.profileCompoent,this.structure.propertyURI),e=U["a"].returnRootPropertyURI(this.activeProfileMini,this.profileCompoent,this.structure.propertyURI)):(t=U["a"].returnUserValues(this.activeProfile,this.profileName,this.profileCompoent,this.structure.propertyURI),e=U["a"].returnRootPropertyURI(this.activeProfile,this.profileCompoent,this.structure.propertyURI)),t["http://www.w3.org/2000/01/rdf-schema#label"]||t["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"]||t["http://id.loc.gov/ontologies/bibframe/code"]?(t["http://www.w3.org/2000/01/rdf-schema#label"]?this.displayLabel=t["http://www.w3.org/2000/01/rdf-schema#label"][0]["http://www.w3.org/2000/01/rdf-schema#label"]:t["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"]?this.displayLabel=t["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"][0]["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"]:t["http://www.w3.org/1999/02/22-rdf-syntax-ns#value"]?this.displayLabel=t["http://www.w3.org/1999/02/22-rdf-syntax-ns#value"][0]["http://www.w3.org/1999/02/22-rdf-syntax-ns#value"]:t["http://id.loc.gov/ontologies/bibframe/code"]&&(this.displayLabel=t["http://id.loc.gov/ontologies/bibframe/code"][0]["http://id.loc.gov/ontologies/bibframe/code"]),t["@type"]&&(this.displayType=t["@type"]),t["@context"]?this.displayContext=t["@context"]:this.displayContext={contextValue:!0,uri:t["@id"]?t["@id"]:null,title:this.displayLabel,nodeMap:{}}):this.parentStructureObj&&this.parentStructureObj.propertyURI&&t[this.parentStructureObj.propertyURI]?(Array.isArray(t[this.parentStructureObj.propertyURI])&&(t[this.parentStructureObj.propertyURI][0]["http://www.w3.org/2000/01/rdf-schema#label"]?(this.displayLabel=t[this.parentStructureObj.propertyURI][0]["http://www.w3.org/2000/01/rdf-schema#label"][0]["http://www.w3.org/2000/01/rdf-schema#label"],this.displayGuid=t[this.parentStructureObj.propertyURI][0]["@guid"],t[this.parentStructureObj.propertyURI][0]["@context"]?this.displayContext=t[this.parentStructureObj.propertyURI][0]["@context"]:this.displayContext={contextValue:!0,uri:t[this.parentStructureObj.propertyURI][0]["@id"]?t[this.parentStructureObj.propertyURI][0]["@id"]:null,title:this.displayLabel,nodeMap:{}}):t[this.parentStructureObj.propertyURI][0]["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"]?(this.displayLabel=t[this.parentStructureObj.propertyURI][0]["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"][0]["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"],this.displayGuid=t[this.parentStructureObj.propertyURI][0]["@guid"],t[this.parentStructureObj.propertyURI][0]["@context"]?this.displayContext=t[this.parentStructureObj.propertyURI][0]["@context"]:this.displayContext={contextValue:!0,uri:t[this.parentStructureObj.propertyURI][0]["@id"]?t[this.parentStructureObj.propertyURI][0]["@id"]:null,title:this.displayLabel,nodeMap:{}}):t[this.parentStructureObj.propertyURI][0]["http://www.w3.org/1999/02/22-rdf-syntax-ns#value"]?(this.displayLabel=t[this.parentStructureObj.propertyURI][0]["http://www.w3.org/1999/02/22-rdf-syntax-ns#value"][0]["http://www.w3.org/1999/02/22-rdf-syntax-ns#value"],this.displayGuid=t[this.parentStructureObj.propertyURI][0]["@guid"],t[this.parentStructureObj.propertyURI][0]["@context"]?this.displayContext=t[this.parentStructureObj.propertyURI][0]["@context"]:this.displayContext={contextValue:!0,uri:t[this.parentStructureObj.propertyURI][0]["@id"]?t[this.parentStructureObj.propertyURI][0]["@id"]:null,title:this.displayLabel,nodeMap:{}}):t[this.parentStructureObj.propertyURI][0]["http://id.loc.gov/ontologies/bibframe/code"]&&(this.displayLabel=t[this.parentStructureObj.propertyURI][0]["http://id.loc.gov/ontologies/bibframe/code"][0]["http://id.loc.gov/ontologies/bibframe/code"],this.displayGuid=t[this.parentStructureObj.propertyURI][0]["@guid"],t[this.parentStructureObj.propertyURI][0]["@context"]?this.displayContext=t[this.parentStructureObj.propertyURI][0]["@context"]:this.displayContext={contextValue:!0,uri:t[this.parentStructureObj.propertyURI][0]["@id"]?t[this.parentStructureObj.propertyURI][0]["@id"]:null,title:this.displayLabel,nodeMap:{}})),t[this.parentStructureObj.propertyURI]&&t[this.parentStructureObj.propertyURI].length>0&&(this.displayType=t[this.parentStructureObj.propertyURI][0]["@type"]),this.displayLabel||t[this.parentStructureObj.propertyURI][0]&&t[this.parentStructureObj.propertyURI][0]["@id"]&&(this.displayLabel=t[this.parentStructureObj.propertyURI][0]["@id"],this.displayContext={contextValue:!0,uri:t[this.parentStructureObj.propertyURI][0]["@id"],title:this.displayLabel,nodeMap:{}})):t["@root"]&&t["@root"]==e?(t["http://www.w3.org/2000/01/rdf-schema#label"]?this.displayLabel=t["http://www.w3.org/2000/01/rdf-schema#label"][0]["http://www.w3.org/2000/01/rdf-schema#label"]:t["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"]?this.displayLabel=t["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"][0]["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"]:t["http://www.w3.org/1999/02/22-rdf-syntax-ns#value"]?this.displayLabel=t["http://www.w3.org/1999/02/22-rdf-syntax-ns#value"][0]["http://www.w3.org/1999/02/22-rdf-syntax-ns#value"]:t["http://id.loc.gov/ontologies/bibframe/code"]&&(this.displayLabel=t["http://id.loc.gov/ontologies/bibframe/code"][0]["http://id.loc.gov/ontologies/bibframe/code"]),t["@type"]&&(this.displayType=t["@type"]),this.displayLabel||t["@id"]&&(this.displayLabel=t["@id"]),t["@context"]?this.displayContext=t["@context"]:this.displayContext={contextValue:!0,uri:t["@id"]?t["@id"]:null,title:this.displayLabel,nodeMap:{}}):(console.warn("---------------------------------------------"),console.warn("Dont know how to extract the userValue for this complexLookup"),console.warn(t),
1console.warn(this.structure),console.warn("---------------------------------------------"))},activate:function(t){return"ArrowDown"===t.key||"ArrowUp"===t.key||"ArrowRight"===t.key||"ArrowLeft"===t.key||"PageUp"===t.key||"PageDown"===t.key||"Tab"===t.key||"Control"===t.key||"Meta"===t.key||"Alt"===t.key||"Shift"===t.key||"CapsLock"===t.key||"="===t.key||"Backspace"===t.key||"Home"===t.key||""==t.target.value.trim()||(this.displayModal=!0,this.initalSearchState=!0,console.log("here",this.displayModal),window.setTimeout(()=>{console.log("here",this.displayModal)},1e3),this.searchValue=t.target.value,this.$store.dispatch("clearContext",{self:this}),this.$store.dispatch("clearLookupValuesComplex",{self:this}).then(()=>{""!=this.searchValue&&this.search()}),t.preventDefault(),setTimeout(()=>{document.getElementById(this.assignedId+"search")&&(console.log("focus:",document.getElementById(this.assignedId+"search")),document.getElementById(this.assignedId+"search").focus())},0),this.$store.dispatch("disableMacroNav",{self:this}),this.$nextTick(()=>{this.$refs.EditSubjectEditor&&(this.$refs.EditSubjectEditor.$refs.subjectInput.focus(),this.$refs.EditSubjectEditor.loadUserValue(this.searchValue),this.$refs.EditSubjectEditor.checkToolBarHeight())}),t.target.value=""),!1},focused:function(t){this.$store.dispatch("setActiveInput",{self:this,id:t.target.id,profileCompoent:this.profileCompoent,profileName:this.profileName}).then(()=>{n["a"].focusSidebars()})},closeModal:function(t){t&&t.target&&t.target.classList.contains("close")&&(this.displayModal=!1),this.$store.dispatch("enableMacroNav",{self:this}),this.lowResMode=!1,this.displayModal=!1,this.displayPreCoordinated=!1,this.precoordinated=[],this.prec,t&&t.event&&t.event.preventDefault(),this.focusCurrentInput()},openEditor:function(){this.$store.dispatch("setActiveInput",{self:this,id:this.assignedId,profileCompoent:this.profileCompoent,profileName:this.profileName}).then(()=>{}),this.$store.dispatch("disableMacroNav",{self:this}),this.displayModal=!0,this.useSubjectEditor()?this.$nextTick(()=>{this.$refs.EditSubjectEditor&&(this.$refs.EditSubjectEditor.$refs.subjectInput.focus(),this.$refs.EditSubjectEditor.loadUserValue(this.activeProfile.rt[this.activeProfileName].pt[this.profileCompoent].userValue),this.$refs.EditSubjectEditor.checkToolBarHeight())}):(console.log("this.displayLabel",this.displayLabel),console.log("this.displayLabelDreferenced",this.displayLabelDreferenced),this.displayLabelDreferenced&&this.displayLabel.startsWith("http")?this.searchValue=this.displayLabelDreferenced:this.searchValue=this.displayLabel,this.initalSearchState=!0,this.search(),this.$nextTick(()=>{document.getElementById(this.assignedId+"search").focus()}))},lowResModeActivate:function(){this.lowResMode=!0},subjectAdded:function(t){this.$store.dispatch("setValueSubject",{self:this,profileComponet:this.profileCompoent,subjectComponents:t}).then(()=>{this.componentKey++,this.displayModal=!1,this.checkForUserData(),this.$emit("updated",null),this.validated=!1,this.validateHeading(),setTimeout(()=>{document.getElementById(this.assignedId).focus(),this.$store.dispatch("enableMacroNav",{self:this})},0)})},selectChange:function(t){t||(t={target:document.getElementById(this.assignedId+"select")}),window.clearTimeout(this.selectNavTimeout),this.selectNavTimeout=window.setTimeout(()=>{t.target.options.forEach(t=>{if(t.selected){if(this.$store.dispatch("clearContext",{self:this}),!t.value){let e={contextValue:!0,source:[],type:"Literal Value",variant:[],uri:null,title:t.dataset.label,contributor:[],date:null,genreForm:null,nodeMap:{}
1,precoordinated:!1,literal:!0};return this.$store.dispatch("setContextManually",{self:this,context:e}),!1}this.contextRequestInProgress=!0,this.$store.dispatch("fetchContext",{self:this,searchPayload:t.value}).then(()=>{this.contextRequestInProgress=!1})}})},300)},selectNav:function(t){return 0==t.target.selectedIndex&&"ArrowUp"===t.key?(document.getElementById(this.assignedId+"search").focus(),t.preventDefault(),!1):t.target.selectedIndex==t.target.options.length-1&&"ArrowDown"===t.key?(t.preventDefault(),!1):(console.log(t.key),"1"!==t.key&&"!"!==t.key||1!=this.displayPreCoordinated||!0!==t.ctrlKey||1!=t.shiftKey?"2"!==t.key&&"@"!==t.key||1!=this.displayPreCoordinated||!0!==t.ctrlKey||1!=t.shiftKey?"3"!==t.key&&"#"!==t.key||1!=this.displayPreCoordinated||!0!==t.ctrlKey||1!=t.shiftKey?"4"!==t.key&&"$"!==t.key||1!=this.displayPreCoordinated||!0!==t.ctrlKey||1!=t.shiftKey?"5"!==t.key&&"%"!==t.key||1!=this.displayPreCoordinated||!0!==t.ctrlKey||1!=t.shiftKey?("Enter"===t.key&&t.shiftKey&&this.add(),void(this.selectLastIndex=t.target.selectedIndex)):(this.precoordinatedRemoveLast(),t.preventDefault(),!1):(this.precoordinatedAddSubdivision("GenreForm"),t.preventDefault(),!1):(this.precoordinatedAddSubdivision("Temporal"),t.preventDefault(),!1):(this.precoordinatedAddSubdivision("Geographic"),t.preventDefault(),!1):(this.precoordinatedAddSubdivision("Topic"),t.preventDefault(),!1))},switchTypes:function(t,e){if(!0===e&&(t={key:"ArrowRight",target:t.target.parentNode.querySelector("input")},t.target.parentNode.querySelector("input").focus()),"ArrowRight"===t.key){let t=this.modalSelectOptionsLabels.indexOf(this.modeSelect);t+1>this.modalSelectOptionsLabels.length-1&&(t=-1),this.modeSelect=this.modalSelectOptionsLabels[t+1],this.search()}else{if("ArrowLeft"!==t.key)return"ArrowDown"===t.key?(document.getElementById(this.assignedId+"search").focus(),t.preventDefault(),!1):(t.preventDefault(),!1);{let t=this.modalSelectOptionsLabels.indexOf(this.modeSelect);0==t&&(t=this.modalSelectOptionsLabels.length),this.modeSelect=this.modalSelectOptionsLabels[t-1],this.search()}}},searchNav:function(t){return"ArrowUp"===t.key?(document.getElementById(this.assignedId+"switch").focus(),t.preventDefault(),!1):"ArrowDown"===t.key?(document.getElementById(this.assignedId+"select").firstChild&&(document.getElementById(this.assignedId+"select").focus(),document.getElementById(this.assignedId+"select").firstChild.selected=!0,this.selectChange()),t.preventDefault(),!1):void 0},search:function(t){if(t){if(this.searchValue=t.target.value,"ArrowUp"===t.key)return!1;if("ArrowDown"===t.key)return!1}if(this.searchValue||(this.searchValue=""),""==this.searchValue.trim())return!1;if(this.searchValue.length<3){let t=3;if(this.modalSelectOptions.forEach(e=>{e.minCharBeforeSearch&&e.minCharBeforeSearch<t&&(t=e.minCharBeforeSearch)}),this.searchValue.length<t)return!1}window.clearTimeout(this.searchTimeout);let e={processor:null,url:[],searchValue:this.searchValue};this.modalSelectOptions.forEach(t=>{t.label==this.modeSelect&&(e.processor=t.processor,e.url.push(t.urls.replace("<QUERY>",this.searchValue)))}),this.searchTimeout=window.setTimeout(()=>{console.log("searching",e),this.$store.dispatch("fetchLookupValuesComplex",{self:this,searchPayload:e}).then(()=>{this.initalSearchState=!1})},400)},add:function(){if(this.precoordinated.length>0){let t=this.precoordinated.map(t=>t.label).join("--"),e={contextValue:!0,source:[],type:"ComplexSubject",variant:[],uri:null,title:t,contributor:[],date:null,genreForm:null,nodeMap:{}
1,precoordinated:this.precoordinated};this.$store.dispatch("setContextManually",{self:this,context:e}).then(()=>{this.$store.dispatch("setValueComplex",{self:this,profileComponet:this.profileCompoent,template:this.activeTemplate,structure:this.structure,parentStructure:this.parentStructureObj}).then(()=>{this.componentKey++,this.displayModal=!1,this.$store.dispatch("enableMacroNav",{self:this}),this.checkForUserData(),this.validated=!1,this.validateHeading(),setTimeout(()=>{document.getElementById(this.assignedId).focus()},0)})})}else{if(0==Object.keys(this.contextData).length)return!1;this.$store.dispatch("setValueComplex",{self:this,profileComponet:this.profileCompoent,template:this.activeTemplate,structure:this.structure,parentStructure:this.parentStructureObj}).then(()=>{this.componentKey++,this.displayModal=!1,this.checkForUserData(),this.validated=!1,this.validateHeading(),this.$store.dispatch("enableMacroNav",{self:this}),this.editLabelDereferenceKey=Date.now(),setTimeout(()=>{document.getElementById(this.assignedId).focus()},0)})}}}},V=N,j=(i("f3ea"),Object(m["a"])(V,P,D,!1,null,"0f54d934",null)),$=j.exports;const K=i("82fd");var F={name:"CompactEditMainComponent",components:{CompactEditLiteralComponent:b,CompactEditSimpleLookupComponent:L,CompactEditTemplateRefComponent:M,CompactEditComplexLookupComponent:$},props:{structure:Object,parentStructure:Array,parentStructureObj:Object,nested:Boolean,isMini:Boolean,profileCompoent:String,profileName:String,activeTemplate:Object,parentURI:String,ptGuid:String,dynamic:String,rowIdx:Number,resourceIdx:Number,componentIdx:Number,setNavAfterClick:{type:Function}},data:function(){return{labels:T["a"],displayDebug:!1,useKey:K.generate(),lookupType:c["a"].lookupConfig}},methods:{prettifyXml:n["a"].prettifyXml,forceUpdate:function(){},showDupeRemove:function(){let t=["http://id.loc.gov/ontologies/bibframe/hasInstance","http://id.loc.gov/ontologies/bibframe/instanceOf","http://id.loc.gov/ontologies/bibframe/hasItem"];return!(t.indexOf(this.structure.propertyURI)>-1)},hasDynamicTemplate:function(){return this.structure.valueConstraint.valueTemplateRefs.filter(t=>t.startsWith("dynamic:")).length>0},toggleDebug:function(){this.displayDebug?this.displayDebug=!1:this.displayDebug=!0},duplicateProperty:function(){this.$store.dispatch("duplicateProperty",{self:this,id:this.profileCompoent,profile:this.profileName}).then(()=>{})},removeProperty:function(){const t=window.confirm("Are you sure you want to remove the property?");if(!t)return!1;this.$store.dispatch("removeProperty",{self:this,id:this.profileCompoent,profile:this.profileName}).then(()=>{})},returnLookupType(t){if("http://id.loc.gov/ontologies/bibframe/hasInstance"==t.propertyURI)return"meta";if("http://id.loc.gov/ontologies/bibframe/instanceOf"==t.propertyURI)return"hide";if("http://id.loc.gov/ontologies/bibframe/hasItem"==t.propertyURI)return"hide";let e="simple";return 0==t.valueConstraint.useValuesFrom.length?null:(t.valueConstraint.useValuesFrom.forEach(t=>{this.lookupType[t]&&"complex"==this.lookupType[t].type&&(e="complex")}),e)}}},B=F,H=(i("bf52"),Object(m["a"])(B,a,o,!1,null,"bc46210c",null));e["default"]=H.exports},c770:function(t,e,i){},ca8e:function(t){t.exports=JSON.parse('{"KeyB":[{"shiftKey":false,"combo":"Ctrl+e | b","code":"KeyB","codeEscape":"́","combining":true,"nick":"Acute","unicode":"0301","name":"Acute / Combining Acute Accent (Oxia)"},{"shiftKey":true,"combo":"Ctrl+e | Shift + b","code":"KeyB","codeEscape":"²","combining":false,"nick":"Superscript 2","unicode":"00B2","name":false}],"Digit5":[{"shiftKey":false,"combo":"Ctrl+e | 5","code":"Digit5","codeEscape":"æ","combining":false,"nick":"ae Digraph","unicode":"00E6","name":"ae Digraph (Lowercase)  / Latin Small Ligature ae"},{"shiftKey":true,"combo":"Ctrl+e | Shift + 5","code":"Digit5","codeEscape":"Æ","combining":false,"nick":"AE Digraph","unicode":"00C6","name":"AE Digraph (Uppercase) / Latin Capital Ligature AE"}],"Period":[{"shiftKey":false,"combo":"Ctrl+e | .","code":"Period","codeEscape":"ʼ","combining":false,"nick":"Alif","unicode":"02BC","name":"Alif / Modifier Letter Right Half Ring"}],"Digit0":[{"shiftKey":false,"combo":"Ctrl+e | 0","code":"Digit0","codeEscape":"ʻ","combining":false,"nick":"Ayn","unicode":"02BB","name":"Ayn / Modifier Letter Turned Comma"},{"shiftKey":true,"combo":"Ctrl+e | Shift + 0","code":"Digit0","codeEscape":"♭","combining":false,"nick":"Musical flat","unicode":"266D","name":"Music Flat Sign"}],"KeyF":[{"shiftKey":false,"combo":"Ctrl+e | f","code":"KeyF","codeEscape":"̆","combining":true,"nick":"Breve","unicode":"0306","name":"Breve / Comb
1ining Breve (Vrachy)"},{"shiftKey":true,"combo":"Ctrl+e | Shift + f","code":"KeyF","codeEscape":"⁶","combining":false,"nick":"Superscript 6","unicode":"2076","name":false}],"Digit9":[{"shiftKey":false,"combo":"Ctrl+e | 9","code":"Digit9","codeEscape":"£","combining":false,"nick":"British pound","unicode":"00A3","name":"British Pound / Pound Sign"},{"shiftKey":true,"combo":"Ctrl+e | Shift + 9","code":"Digit9","codeEscape":"·","combining":false,"nick":"Dot at midline","unicode":"00B7","name":"Middle Dot"}],"KeyO":[{"shiftKey":false,"combo":"Ctrl+e | o","code":"KeyO","codeEscape":"̐","combining":true,"nick":"Candrabindu","unicode":"0310","name":"Candrabindu / Combining Candrabindu"}],"KeyP":[{"shiftKey":false,"combo":"Ctrl+e | p","code":"KeyP","codeEscape":"̧","combining":true,"nick":"Cedilla","unicode":"0327","name":"Cedilla / Combining Cedilla"},{"shiftKey":true,"combo":"Ctrl+e | Shift + p","code":"KeyP","codeEscape":"₀","combining":false,"nick":"Subscript 0","unicode":"2080","name":false}],"KeyJ":[{"shiftKey":false,"combo":"Ctrl+e | j","code":"KeyJ","codeEscape":"̊","combining":true,"nick":"Angstrom","unicode":"030A","name":"Circle Abov Angstrom / Combining Ring Above"},{"shiftKey":true,"combo":"Ctrl+e | Shift + j","code":"KeyJ","codeEscape":"⁺","combining":false,"nick":"Superscript +","unicode":"207a","name":"Superscript + (plus)"}],"KeyT":[{"shiftKey":false,"combo":"Ctrl+e | t","code":"KeyT","codeEscape":"̥","combining":true,"nick":"Circle below","unicode":"0325","name":"Circle Below / Combining Ring Below"},{"shiftKey":true,"combo":"Ctrl+e | Shift + t","code":"KeyT","codeEscape":"₄","combining":false,"nick":"Subscript 4","unicode":"2084","name":false}],"KeyC":[{"shiftKey":false,"combo":"Ctrl+e | c","code":"KeyC","codeEscape":"̂","combining":true,"nick":"Circumflex","unicode":"0302","name":"Circumflex / Combining Circumflex Accent"},{"shiftKey":true,"combo":"Ctrl+e | Shift + c","code":"KeyC","codeEscape":"³","combining":false,"nick":"Superscript 3","unicode":"00B3","name":false}],"Digit6":[{"shiftKey":true,"combo":"Ctrl+e | Shift + 6","code":"Digit6","codeEscape":"©","combining":false,"nick":"Copyright","unicode":"00A9","name":"Copyright Sign"},{"shiftKey":false,"combo":"Ctrl+e | 6","code":"Digit6","codeEscape":"œ","combining":false,"nick":"oe digraph","unicode":"0153","name":"oe Digraph (Lowercase) / Latin Small Ligature oe"}],"Digit3":[{"shiftKey":false,"combo":"Ctrl+e | 3","code":"Digit3","codeEscape":"đ","combining":false,"nick":"d with crossbar","unicode":"0111","name":"d With Crossbar (Lowercase) / Latin Small Letter D With Stroke"},{"shiftKey":true,"combo":"Ctrl+e | Shift + 3","code":"Digit3","codeEscape":"Đ","combining":false,"nick":"D with crossbar","unicode":"0110","name":"D With Crossbar (Uppercase) / Latin Capital Letter D With Stroke"}],"KeyN":[{"shiftKey":true,"combo":"Ctrl+e | Shift + n","code":"KeyN","codeEscape":"°","combining":false,"nick":"Degree","unicode":"00B0","name":"Degree sign"},{"shiftKey":false,"combo":"Ctrl+e | n","code":"KeyN","codeEscape":"̋","combining":true,"nick":"Double acute","unicode":"030B","name":"Double Acute / Combining Double Acute Accent"}],"KeyR":[{"shiftKey":false,"combo":"Ctrl+e | r","code":"KeyR","codeEscape":"̣","combining":true,"nick":"Dot below","unicode":"0323","name":"Dot Below / Combining Dot Below"},{"shiftKey":true,"combo":"Ctrl+e | Shift + r","code":"KeyR","codeEscape":"₂","combining":false,"nick":"Subscript 2","unicode":"2082","name":false}],"KeyS":[{"shiftKey":false,"combo":"Ctrl+e | s","code":"KeyS","codeEscape":"̤","combining":true,"nick":"Double dot below","unicode":"0324","name":"Double Dot Below / Combining Diaeresis Below"},{"shiftKey":true,"combo":"Ctrl+e | Shift + s","code":"KeyS","codeEscape":"₃","combining":false,"nick":"Subscript 3","unicode":"2083","name":false}],"KeyZ":[{"shiftKey":false,"combo":"Ctrl+e | z","code":"KeyZ","codeEscape":"︢","combining":false,"nick":"Double tilde first half","unicode":"FE22","name":"Double Tilde First Half (Use Diacritic Mode"},{"shiftKey":true,"combo":"Ctrl+e | Shift + z","code":"KeyZ","codeEscape":"₊","combining":false,"nick":"Subscript +","unicode":"208a","name":"Subscript + (plus)"}],"BracketLeft":[{"shiftKey":true,"combo":"Ctrl+e | Shift + [","code":"BracketLeft","codeEscape":"︣","combining":false,"nick":"Double tilde second half","unicode":"FE23","name":"Double Tilde Second Half (Use Diacritic Mode"},{"shiftKey":false,"combo":"Ctrl+e | [","code":"BracketLeft","codeEscape":"₋","combining":false,"nick":"Subscript -","unicode":"208b","name":"Subscript - (minus)"}],"KeyU":[{"shiftKey":false,"combo":"Ctrl+e | u","code":"KeyU","codeEscape":"̳","combining":true,"nick":"Double underscore","unicode":"0333","name":"Double Underscore / Comb
1ining Double Low Line"},{"shiftKey":true,"combo":"Ctrl+e | Shift + u","code":"KeyU","codeEscape":"₅","combining":false,"nick":"Subscript 5","unicode":"2085","name":false}],"Semicolon":[{"shiftKey":true,"combo":"Ctrl+e | Shift + ;","code":"Semicolon","codeEscape":"ð","combining":false,"nick":"Eth","unicode":"00F0","name":"Eth (Lowercase) / Latin Small Letter Eth (Icelandic)"},{"shiftKey":false,"combo":"Ctrl+e | ;","code":"Semicolon","codeEscape":"€","combining":false,"nick":"Euro","unicode":"20AC","name":false}],"KeyA":[{"shiftKey":false,"combo":"Ctrl+e | a","code":"KeyA","codeEscape":"̀","combining":true,"nick":"Grave","unicode":"0300","name":"Grave / Combining Grave Accent (Varia)"},{"shiftKey":true,"combo":"Ctrl+e | Shift + a","code":"KeyA","codeEscape":"¹","combining":false,"nick":"Superscript 1","unicode":"00B9","name":false}],"KeyI":[{"shiftKey":false,"combo":"Ctrl+e | i","code":"KeyI","codeEscape":"̌","combining":true,"nick":"Hachek","unicode":"030C","name":"Hacek / Combining Caron"},{"shiftKey":true,"combo":"Ctrl+e | Shift + i","code":"KeyI","codeEscape":"⁹","combining":false,"nick":"Superscript 9","unicode":"2079","name":false}],"Digit7":[{"shiftKey":false,"combo":"Ctrl+e | 7","code":"Digit7","codeEscape":"″","combining":false,"nick":"Hard Sign","unicode":"2033","name":""},{"shiftKey":true,"combo":"Ctrl+e | Shift + 7","code":"Digit7","codeEscape":"Œ","combining":false,"nick":"OE digraph","unicode":"0152","name":"OE Digraph (Uppercase) / Latin Capital Ligature OE"}],"KeyM":[{"shiftKey":false,"combo":"Ctrl+e | m","code":"KeyM","codeEscape":"̕","combining":true,"nick":"High comma off center","unicode":"0315","name":"High Comma Off Center / Combining Comma Above Right"},{"shiftKey":true,"combo":"Ctrl+e | Shift + m","code":"KeyM","codeEscape":"⁾","combining":false,"nick":"Superscript )","unicode":"207e","name":"Superscript )  (right paren)"}],"Backquote":[{"shiftKey":true,"combo":"Ctrl+e | Shift + `","code":"Backquote","codeEscape":"̓","combining":true,"nick":"High comma centered","unicode":"0313","name":"High Comma Centered / Combining Comma Above (Psili)"},{"shiftKey":false,"combo":"Ctrl+e | `","code":"Backquote","codeEscape":"̉","combining":true,"nick":"Pseudo question mark","unicode":"0309","name":"Pseudo Question Mark / Combining Hook Above"}],"BracketRight":[{"shiftKey":true,"combo":"Ctrl+e | Shift + }","code":"BracketRight","codeEscape":"¡","combining":false,"nick":"Inverted Exclmation","unicode":"00A1","name":false},{"shiftKey":false,"combo":"Ctrl+e | ]","code":"BracketRight","codeEscape":"₎","combining":false,"nick":"Subscript )","unicode":"208e","name":"Subscript )  (right paren)"}],"Backslash":[{"shiftKey":true,"combo":"Ctrl+e | Shift + |","code":"Backslash","codeEscape":"¿","combining":false,"nick":"Inverted Question Mark","unicode":"00BF","name":false},{"shiftKey":false,"combo":"Ctrl+e | \\\\","code":"Backslash","codeEscape":"₍","combining":false,"nick":"Subscript (","unicode":"208d","name":"Subscript (  (left paren)"}],"KeyW":[{"shiftKey":false,"combo":"Ctrl+e | w","code":"KeyW","codeEscape":"̦","combining":true,"nick":"Hook left","unicode":"0326","name":"Left Hook (Comma Below) / Combining Comma Below"},{"shiftKey":true,"combo":"Ctrl+e | Shift + w","code":"KeyW","codeEscape":"₇","combining":false,"nick":"Subscript 7","unicode":"2087","name":false}],"KeyK":[{"shiftKey":false,"combo":"Ctrl+e | k","code":"KeyK","codeEscape":"︠","combining":true,"nick":"Ligature left","unicode":"FE20","name":"Ligature First Half (Use Diacritic Mode"},{"shiftKey":true,"combo":"Ctrl+e | Shift + k","code":"KeyK","codeEscape":"⁻","combining":false,"nick":"Supercript -","unicode":"207b","name":"Superscript - (minus)"}],"KeyL":[{"shiftKey":false,"combo":"Ctrl+e | l","code":"KeyL","codeEscape":"︡","combining":true,"nick":"Ligature right","unicode":"FE21","name":"Ligature Second Half (Use Diacritic Mode"},{"shiftKey":true,"combo":"Ctrl+e | Shift + l","code":"KeyL","codeEscape":"⁽","combining":false,"nick":"Superscript (","unicode":"207d","name":"Superscript (  (left paren)"}],"KeyE":[{"shiftKey":false,"combo":"Ctrl+e | e","code":"KeyE","codeEscape":"̄","combining":true,"nick":"Macron","unicode":"0304","name":"Macron / Combining Macron"},{"shiftKey":true,"combo":"Ctrl+e | Shift + e","code":"KeyE","codeEscape":"⁵","combining":false,"nick":"Superscript 5","unicode":"2075","name":false}],"Minus":[{"shiftKey":true,"combo":"Ctrl+e | Shift + -","code":"Minus","codeEscape":"♯","combining":false,"nick":"Musical sharp","unicode":"266F","name":"Musical sharp sign"},{"shiftKey":false,"combo":"Ctrl+e | -","code":"Minus","codeEscape":"Ư","combining":false,"nick":"U hook","unicode":"01AF","name":"U-Hook (Uppercase) / Latin Capital Letter U With Horn"}],"Comma":[{"shiftKey":true,"combo":"Ctrl+e | Shift + ,","code":"Comma","codeEscape":"ơ","combining":false,"nick":"o hook","unicode":"01A1","name":"o-Hook (Lowercase)  / Latin Small Letter O With Horn"},{"shiftKey":false,"combo":"Ctrl+e | ,","code":"Comma","codeEscape":"Ơ","combining":false,"nick":"O hook","unicode":"01A0","name":"O-Hook (Uppercase) / Latin Capital Letter O With Horn"}],"Equal":[{"shiftKey":true,"combo":"Ctrl+e | Shift + =","code":"Equal","codeEscape":"±","combining":false,"nick":"Plus or minus","unicode":"00B1","name":"Plus Or Minus / Plus-Minus Sign"},{"shiftKey":false,"combo":"Ctrl+e | =","code":"Equal","codeEscape":"ư","combining":false,"nick":"u hook","unicode":"01B0","name":"u-Hook (Lowercase) / Latin Small Letter U With Horn"}],"Digit1":[{"shiftKey":false,"combo":"Ctrl+e | 1","code":"Digit1","codeEscape":"ł","combining":false,"nick":"Polish l","unicode":"0142","name":"Polish L (Lowercase) / Latin Small Letter L With Stroke"},{"shiftKey":true,"combo":"Ctrl+e | Shift + 1","code":"Digit1","codeEscape":"Ł","combining":false,"nick":"Polish L","unicode":"0141","name":"Polish L (Uppercase) / Latin Capital Letter L With Stroke"}],"KeyX":[{"shiftKey":false,"combo":"Ctrl+e | x","code":"KeyX","codeEscape":"̜","combining":true,"nick":"Right cedilla","unicode":"031C","
1name":"Right Cedilla / Combining Left Half Ring Below"},{"shiftKey":true,"combo":"Ctrl+e | Shift + x","code":"KeyX","codeEscape":"₈","combining":false,"nick":"Subscript 8","unicode":"2088","name":false}],"KeyQ":[{"shiftKey":false,"combo":"Ctrl+e | q","code":"KeyQ","codeEscape":"̨","combining":true,"nick":"Hook right","unicode":"0328","name":"Right Hook Ogonek / Combining Ogonek"},{"shiftKey":true,"combo":"Ctrl+e | Shift + q","code":"KeyQ","codeEscape":"₁","combining":false,"nick":"Subscript 1","unicode":"2081","name":false}],"Digit2":[{"shiftKey":false,"combo":"Ctrl+e | 2","code":"Digit2","codeEscape":"ø","combining":false,"nick":"Scandinavian o","unicode":"00F8","name":"Scandinavian o (Lowercase) / Latin Small Letter O With Stroke"},{"shiftKey":true,"combo":"Ctrl+e | Shift + 2","code":"Digit2","codeEscape":"⁰","combining":false,"nick":"Superscript 0","unicode":"2070","name":false}],"Quote":[{"shiftKey":true,"combo":"Ctrl+e | Shift + \'","code":"Quote","codeEscape":"Ø","combining":false,"nick":"Scandinavian O","unicode":"00D8","name":"Scandinavian O (Uppercase) / Latin Capital Letter O With Stroke"},{"shiftKey":false,"combo":"Ctrl+e | \'","code":"Quote","codeEscape":"ʹ","combining":false,"nick":"Myagkii znak","unicode":"02B9","name":"Soft Sign/Prime/ Miagkii znak / Modifier Letter Prime"}],"Space":[{"shiftKey":false,"combo":"Ctrl+e | [space]","code":"Space","codeEscape":"ℓ","combining":false,"nick":"Script Small L","unicode":"2113","name":false}],"KeyV":[{"shiftKey":true,"combo":"Ctrl+e | Shift + v","code":"KeyV","codeEscape":"₆","combining":false,"nick":"Subscript 6","unicode":"2086","name":false},{"shiftKey":false,"combo":"Ctrl+e | v","code":"KeyV","codeEscape":"̲","combining":true,"nick":"Underscore","unicode":"0332","name":"Underscore / Combining Low Line"}],"KeyY":[{"shiftKey":true,"combo":"Ctrl+e | Shift + y","code":"KeyY","codeEscape":"₉","combining":false,"nick":"Subscript 9","unicode":"2089","name":false},{"shiftKey":false,"combo":"Ctrl+e | y","code":"KeyY","codeEscape":"̮","combining":true,"nick":"Upadhmaniya","unicode":"032E","name":"Upadhmaniya / Combining Breve Below"}],"KeyG":[{"shiftKey":false,"combo":"Ctrl+e | g","code":"KeyG","codeEscape":"̇","combining":true,"nick":"Dot above","unicode":"0307","name":"Superior Dot / Combining Dot Above"},{"shiftKey":true,"combo":"Ctrl+e | Shift + g","code":"KeyG","codeEscape":"⁷","combining":false,"nick":"Superscript 7","unicode":"2077","name":false}],"KeyD":[{"shiftKey":true,"combo":"Ctrl+e | Shift + d","code":"KeyD","codeEscape":"⁴","combining":false,"nick":"Superscript 4","unicode":"2074","name":false},{"shiftKey":false,"combo":"Ctrl+e | d","code":"KeyD","codeEscape":"̃","combining":true,"nick":"Tilde","unicode":"0303","name":"Tilde / Combining Tilde"}],"KeyH":[{"shiftKey":true,"combo":"Ctrl+e | Shift + h","code":"KeyH","codeEscape":"⁸","combining":false,"nick":"Superscript 8","unicode":"2078","name":false},{"shiftKey":false,"combo":"Ctrl+e | h","code":"KeyH","codeEscape":"̈","combining":false,"nick":"Umlaut","unicode":"0308","name":false}],"Digit4":[{"shiftKey":false,"combo":"Ctrl+e | 4","code":"Digit4","codeEscape":"Þ","combining":false,"nick":"Icelandic Thorn","unicode":"00DE","name":"Thorn"},{"shiftKey":true,"combo":"Ctrl+e | Shift + 4","code":"Digit4","codeEscape":"þ","combining":false,"nick":"Icelandic thorn","unicode":"00FE","name":"thorn"}],"Digit8":[{"shiftKey":false,"combo":"Ctrl+e | 8","code":"Digit8","codeEscape":"ı","combining":false,"nick":"Turkish i (Lowercase)","unicode":"0131","name":"Turkish i (Lowercase)  / Latin Small Letter Dotless i"}]}')},cc66:function(t,e,i){},cf7a:function(t,e,i){"use strict";var a=i("761b"),o=i.n(a);o.a},cf93:function(t,e,i){"use strict";var a=i("7b94"),o=i.n(a);o.a},d572:function(t,e,i){"use strict";var a=i("fea3"),o=i.n(a);o.a},d5b0:function(t,e,i){"use strict";var a=i("1804"),o=i.n(a);o.a},d5fc:function(t,e,i){"use strict";var a=i("c770"),o=i.n(a);o.a},d837:function(t,e,i){"use strict";var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("span",{staticClass:"trigger-open"},[t._v(t._s(t.displayLabel))])},o=[],r=(i("5319"),{name:"EditLabelDereference",components:{},props:{URI:String},data:function(){return{displayLabel:this.URI}},created:function(){if(this.URI.startsWith("http://")||this.URI.startsWith("https://"))if(this.URI.includes("id.loc.gov"))if(this.URI.includes("/resources/instances/")||this.URI.includes("/resources/works/")||this.URI.includes("/resources/hubs/")||this.URI.includes("/vocabulary/")){this.URI.endsWith("/")&&(this.URI=this.URI.slice(0,-1));let t=this.URI+".nt";t=t.replace("http://","https://");let e=sessionStorage.getItem(t);if(e)this.displayLabel=e;else{let e=this;fetch(t,{method:"HEAD"}).then((function(i){let a=i.headers.get("x-preflabel");i.headers.get("x-preflabel-encoded")&&(a=decodeURIComponent(i.headers.get("x-preflabel-encoded"))),a&&(e.displayLabel=a,sessionStorage.setItem(t,a))})).catch((function(){}))}}else"http://id.loc.gov/authorities/subjects"==this.URI&&(this.displayLabel="Library of Congress subject headings");else this.displayLabel=this.URI;else this.displayLabel=this.URI}}),s=r,l=i("2877"),n=Object(l["a"])(s,a,o,!1,null,null,null);e["a"]=n.exports}
1,dbd1:function(t,e,i){},dc11:function(t,e,i){},dd73:function(t,e,i){"use strict";var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:["literal-editor-container"]},[i("div",{staticStyle:{display:"flex"},attrs:{id:"literal-editor-layout"}},[i("div",{staticStyle:{flex:"4"}},[i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.inputValue,expression:"inputValue"}],ref:"textarea",attrs:{dir:"auto",id:"literal-editor-textarea"},domProps:{value:t.inputValue},on:{input:[function(e){e.target.composing||(t.inputValue=e.target.value)},t.literalChange]}})]),i("div",{staticStyle:{flex:"1"}},[i("div",{staticStyle:{height:"100%","overflow-y":"scroll","border-bottom":"solid 1px lightgray"}},[i("div",{staticStyle:{"font-weight":"bold","background-color":"white"}},[t._v("Custom Diacritics")]),t._l(t.diacriticData,(function(e,a){return i("div",{key:e.keycode+"_"+a,staticClass:"diacritic-key",on:{click:function(i){return t.insertDiacritic(e.letter)}}},[i("span",{staticStyle:{"font-size":"1.5em",width:"1em","text-align":"center",display:"inline-block",border:"solid 1px darkgray"}},[t._v(t._s(e.letter))]),i("span",{staticStyle:{"padding-left":"0.5em"}},[t._v(t._s(e.desc))])])})),i("div",{staticStyle:{"font-weight":"bold","background-color":"white"}},[t._v("Combining Diacritics")]),t._l(t.combiningDiacritics,(function(e){return i("div",{key:e.titlt,staticClass:"diacritic-key",on:{click:function(i){return t.insertDiacritic(e.symbol)}}},[i("span",{staticStyle:{"font-size":"1.5em",width:"1em","text-align":"center",display:"inline-block",border:"solid 1px darkgray"}},[t._v(t._s(e.symbol))]),i("span",{staticStyle:{"padding-left":"0.5em"}},[t._v(t._s(e.title))])])}))],2)])]),i("div",{staticStyle:{display:"flex",padding:"5px"}},[i("div",{staticStyle:{flex:"1","background-color":"#fffff0db","border-radius":"1em","text-align":"center","min-height":"100px"}},[i("div",[t._v("ScriptShifter Romanization")]),i("select",{ref:"scriptShifterSelected",staticStyle:{"margin-left":"1em","margin-top":"1em"},on:{change:function(e){return t.scriptShiftChange(e)}}},t._l(Object.keys(t.supportedScriptShifter),(function(e){return i("option",{key:e,domProps:{selected:e==t.scriptShifterDefault,value:e}},[t._v(t._s(t.supportedScriptShifter[e].name))])})),0),i("button",{on:{click:function(e){return t.scriptShift()}}},[t._v("Romanize")])]),i("div",{staticStyle:{flex:"1","background-color":"#ffe4e161","border-radius":"1em","text-align":"center","min-height":"100px"}},[i("div",[t._v("Toolbox")]),i("button",{staticClass:"simptip-position-top convert-case-button",attrs:{"data-tooltip":"Sentence Case"},on:{click:function(e){return t.caseConvertSentenceCase()}}},[t._v("Sentence")]),i("button",{staticClass:"simptip-position-top convert-case-button",attrs:{"data-tooltip":"Capitalize Case"},on:{click:function(e){return t.caseConvertCapitalize()}}},[t._v("Capitalize")]),i("button",{staticClass:"simptip-position-top convert-case-button",attrs:{"data-tooltip":"Title Case"},on:{click:function(e){return t.caseConvertTitleCase()}}},[t._v("Title")])]),i("div",{staticStyle:{flex:"1","text-align":"center","padding-top":"2em"}},[i("button",{staticStyle:{"font-size":"1.25em","margin-right":"1em"},on:{click:t.closeEditor}},[t._v("Cancel")]),i("button",{staticStyle:{"font-size":"1.25em"},on:{click:t.updateFromEditor}},[t._v("Save")])])])])},o=[],r=(i("5319"),i("ddb0"),i("2f62")),s=i("1a1e"),l={name:"EditLiteralEditor",components:{},props:{initalValue:String},data:function(){return{inputValue:"",changeTimeout:null,diacriticData:null,scriptShifterDefault:!1,activeLanguages:[],langs:[],combiningDiacritics:[{symbol:"̀",title:"Grave Accent"},{symbol:"́",title:"Acute Accent"},{symbol:"̂",title:"Circumflex Accent"},{symbol:"̃",title:"Tilde"},{symbol:"̄",title:"Macron"},{symbol:"̅",title:"Overline"},{symbol:"̆",title:"Breve"},{symbol:"̇",title:"Dot Above"},{symbol:"̈",title:"Diaeresis"},{symbol:"̉",title:"Hook Above"},{symbol:"̊",title:"Ring Above"},{symbol:"̋",title:"Double Acute Accent"},{symbol:"̌",title:"Caron"},{symbol:"̍",title:"Vertical Line Above"},{symbol:"̎",title:"Double Vertical Line Above"},{symbol:"̏",title:"Double Grave Accent"},{symbol:"̐",title:"Candrabindu"},{symbol:"̑",title:"Inverted Breve"},{symbol:"̒",title:"Turned Comma Above"},{symbol:"̓",title:"Comma Above"},{symbol:"̔",title:"Reversed Comma Above"},{symbol:"̕",title:"Comma Above Right"},{symbol:"̖",title:"Grave Accent Below"},{symbol:"̗",title:"Acute Accent Below"},{symbol:"̘",title:"Left Tack Below"},{symbol:"̙",title:"Right Tack Below"},{symbol:"̚",title:"Left Angle Above"},{symbol:"̛",title:"Horn"},{symbol:"̜",title:"Left Half Ring Below"},{symbol:"̝",title:"Up Tack Below"},{symbol:"̞",title:"Down Tack Below"},{symbol:"̟",title:"Plus Sign Below"},{symbol:"̠",title:"Minus Sign Below"},{symbol:"̡",title:"Palatalized Hook Below"},{symbol:"̢",title:"Retroflex Hook Below"},{symbol:"̣",title:"Dot Below"},{symbol:"̤",title:"Diaeresis Below"},{symbol:"̥",title:"Ring Below"},{symbol:"̦",title:"Comma Below"},{symbol:"̧",title:"Cedilla"},{symbol:"̨",title:"Ogonek"},{symbol:"̩",title:"Vertical Line Below"}
1,{symbol:"̪",title:"Bridge Below"},{symbol:"̫",title:"Inverted Double Arch Below"},{symbol:"̬",title:"Caron Below"},{symbol:"̭",title:"Circumflex Accent Below"},{symbol:"̮",title:"Breve Below"},{symbol:"̯",title:"Inverted Breve Below"},{symbol:"̰",title:"Tilde Below"},{symbol:"̱",title:"Macron Below"},{symbol:"̲",title:"Low Line"},{symbol:"̳",title:"Double Low Line"},{symbol:"̴",title:"Tilde Overlay"},{symbol:"̵",title:"Short Stroke Overlay"},{symbol:"̶",title:"Long Stroke Overlay"},{symbol:"̷",title:"Short Solidus Overlay"},{symbol:"̸",title:"Long Solidus Overlay"},{symbol:"̹",title:"Right Half Ring Below"},{symbol:"̺",title:"Inverted Bridge Below"},{symbol:"̻",title:"Square Below"},{symbol:"̼",title:"Seagull Below"},{symbol:"̽",title:"X Above"},{symbol:"̾",title:"Vertical Tilde"},{symbol:"̿",title:"Double Overline"},{symbol:"̀",title:"Grave Tone Mark"},{symbol:"́",title:"Acute Tone Mark"},{symbol:"͂",title:"Greek Perispomeni"},{symbol:"̓",title:"Greek Koronis"},{symbol:"̈́",title:"Greek Dialytika Tonos"},{symbol:"ͅ",title:"Greek Ypogegrammeni"},{symbol:"͆",title:"Bridge Above"},{symbol:"͇",title:"Equals Sign Below"},{symbol:"͈",title:"Double Vertical Line Below"},{symbol:"͉",title:"Left Angle Below"},{symbol:"͊",title:"Not Tilde Above"},{symbol:"͋",title:"Homothetic Above"},{symbol:"͌",title:"Almost Equal To Above"},{symbol:"͍",title:"Left Right Arrow Below"},{symbol:"͎",title:"Upwards Arrow Below"},{symbol:"͏",title:"Grapheme Joiner"},{symbol:"͐",title:"Right Arrowhead Above"},{symbol:"͑",title:"Left Half Ring Above"},{symbol:"͒",title:"Fermata"},{symbol:"͓",title:"X Below"},{symbol:"͔",title:"Left Arrowhead Below"},{symbol:"͕",title:"Right Arrowhead Below"},{symbol:"͖",title:"Right Arrowhead and Up Arrowhead Below"},{symbol:"͗",title:"Right Half Ring Above"},{symbol:"͘",title:"Dot Above Right"},{symbol:"͙",title:"Asterisk Below"},{symbol:"͚",title:"Double Ring Below"},{symbol:"͛",title:"Zigzag Above"},{symbol:"͜",title:"Double Breve Below"},{symbol:"͝",title:"Double Breve"},{symbol:"͞",title:"Double Macron"},{symbol:"͟",title:"Double Macron Below"},{symbol:"͠",title:"Double Tilde"},{symbol:"͡",title:"Double Inverted Breve"},{symbol:"͢",title:"Double Rightwards Arrow Below"},{symbol:"ͣ",title:"Latin Small Letter A"},{symbol:"ͤ",title:"Latin Small Letter E"},{symbol:"ͥ",title:"Latin Small Letter I"},{symbol:"ͦ",title:"Latin Small Letter O"},{symbol:"ͧ",title:"Latin Small Letter U"},{symbol:"ͨ",title:"Latin Small Letter C"},{symbol:"ͩ",title:"Latin Small Letter D"},{symbol:"ͪ",title:"Latin Small Letter H"},{symbol:"ͫ",title:"Latin Small Letter M"},{symbol:"ͬ",title:"Latin Small Letter R"},{symbol:"ͭ",title:"Latin Small Letter T"},{symbol:"ͮ",title:"Latin Small Letter V"},{symbol:"ͯ",title:"Latin Small Letter X"}],nonLatinRegex:/[^\u0000-\u024F\u1E00-\u1EFF\u2C60-\u2C7F\uA720-\uA7FF]/g,isNonLatin:!1}},computed:Object(r["b"])({profilesLoaded:"profilesLoaded",activeProfile:"activeProfile",idWorkSearchResults:"idWorkSearchResults",rtLookup:"rtLookup",profiles:"profiles",contextData:"contextData",supportedRomanizations:"supportedRomanizations",supportedScriptShifter:"supportedScriptShifter"}),methods:{caseConvertSentenceCase:function(){this.$refs.textarea.value=this.$refs.textarea.value.toLowerCase().replace(/\.\s+([a-z])[^\.]|^(\s*[a-z])[^\.]/g,t=>t.replace(/([a-z])/,t=>t.toUpperCase()))},caseConvertCapitalize:function(){this.$refs.textarea.value=this.$refs.textarea.value.toLowerCase().split(" ").map(t=>t.charAt(0).toUpperCase()+t.substring(1)).join(" ")},caseConvertTitleCase:function(){let t=["and","as","at","but","by","for","from","if","in","into","like","near","that","nor","of","off","on","once","onto","or","over","past","so","than","that","till","to","up","upon","with","when","yet"],e=[];for(let i of this.$refs.textarea.value.toLowerCase().split(" ")){let a=i.replace(/[^\w\s\']|_/g,"").replace(/\s+/g," ");-1==t.indexOf(a)?(i=i.charAt(0).toUpperCase()+i.slice(1),e.push(i)):e.push(i)}this.$refs.textarea.value=e.join(" ")},loadDataFromInput:function(t){this.inputValue=t,this.literalChange(null,0)},closeEditor:function(){this.$emit("closeEditor",!0)},updateFromEditor:function(){this.$emit("updateFromEditor",this.inputValue.replaceAll("\n"," "))},insertDiacritic:function(t){let e=this.$refs.textarea.selectionStart;this.inputValue=this.inputValue.substring(0,e)+t+this.inputValue.substring(e)},scriptShiftChange:function(t){localStorage.setItem("bfeScriptShifterDefault",t.target.value),this.scriptShifterDefault=t.target.value},scriptShift:async function(){let t=s["a"].returnUrls().scriptshifter+"trans",e=await fetch(t,{method:"POST",headers:{Accept:"application/json, text/plain, */*","Content-Type":"application/json"},body:JSON.stringify({lang:this.$refs.scriptShifterSelected.value,text:this.$refs.textarea.value,capitalize:"no_change",t_dir:"s2r"})}),i=await e.json();if(200!==e.status)return alert(i),!1;this.inputValue=this.inputValue+"\n"+i.output},romanize:async function(t){if("string"!==typeof t){let e=t.target.value;t.target.value="Manual Select",t=e}let e=await fetch(s["a"].returnUrls().utilLang+"romanize",{method:"POST",headers:{Accept:"application/json, text/plain, */*","Content-Type":"application/json"},body:JSON.stringify({value:this.inputValue,type:t})}).then(t=>t.json());this.inputValue=this.inputValue+"\n"+e.value},literalChange:async function(t,e){e||(e=500),window.clearTimeout(this.changeTimeout),this.changeTimeout=window.setTimeout(async()=>{this.activeLanguages=[],this.isNonLatin=this.nonLatinRegex.test(this.inputValue);let t=await fetch(s["a"].returnUrls().utilLang+"lang",{method:"POST",headers:{Accept:"application/json, text/plain, */*","Content-Type":"application/json"},body:JSON.stringify({value:this.inputValue})}).then(t=>t.json());this.activeLanguages=JSON.parse(JSON.stringify(t))},e)},test:async function(){}},created:async function(){let t=localStorage.getItem("bfeDiacritics");t&&(this.diacriticData=JSON.parse(t)),null!==localStorage.getItem("bfeScriptShifterDefault")&&(this.scriptShifterDefault=localStorage.getItem("bfeScriptShifterDefault"))},mounted:function(){}},n=l,c=(i("87dc"),i("2877")),d=Object(c["a"])(n,a,o,!1,null,"0cf1efc6",null);e["a"]=d.exports}
1,dd89:function(t,e,i){"use strict";i("5319"),i("ddb0");var a=i("1a1e"),o=i("adac"),r=i("44e1"),s=i("9068"),l=i("4360");const n=i("82fd"),c=n(),d=n("0123456789");var u=i("6821");const p=t=>t.split("").reduce((t,e)=>(t<<5)-t+e.charCodeAt(0)|0,0),h={profileSource:{},rtLookup:{},profiles:{},startingPoints:{},startingPointData:{},fetchProfiles:async function(t){t=t||a["a"].returnUrls().profiles;try{let e=await fetch(t),i=await e.json();return i}catch(e){console.error(e)}},fetchStartingPoints:async function(t){t=t||a["a"].returnUrls().starting;try{let e=await fetch(t),i=await e.json();return i}catch(e){console.error(e)}},buildProfiles:async function(){this.profileSource=await this.fetchProfiles(),this.startingPointData=await this.fetchStartingPoints(),this.startingPointData[0]?this.startingPointData[0].json.push({menuGroup:"Hub",menuItems:[{label:"Hub",type:["http://id.loc.gov/ontologies/bibframe/Hub"],useResourceTemplates:["lc:RT:bf2:Hub:Hub"]}]}):this.startingPointData.json&&this.startingPointData.json.push({menuGroup:"Hub",menuItems:[{label:"Hub",type:["http://id.loc.gov/ontologies/bibframe/Hub"],useResourceTemplates:["lc:RT:bf2:Hub:Hub"]}]});for(let e of this.profileSource){if("lc:profile:bf2:Agents:Attributes"==e.json.Profile.id)for(let t of e.json.Profile.resourceTemplates)["lc:RT:bf2:Agent:Person","lc:RT:bf2:Agent:Family","lc:RT:bf2:Agent:CorporateBody","lc:RT:bf2:Agent:Conference","lc:RT:bf2:Agent:Jurisdiction"].indexOf(t.id)>-1&&(t.propertyTemplates=[t.propertyTemplates[0]]);e.json.Profile.resourceTemplates=e.json.Profile.resourceTemplates.filter(t=>{if(t.propertyTemplates=t.propertyTemplates.filter(t=>(!t.propertyLabel||!t.propertyLabel.startsWith("Input RDA relationship designator ter")&&!t.propertyLabel.startsWith("Input Geographic Coverage (if not on list)"))&&"http://id.loc.gov/ontologies/bibframe/adminMetadata"!=t.propertyURI),t)return!0});for(let t of e.json.Profile.resourceTemplates){if(a["a"].profileHacks.profileParseFixLowerCaseContribution.enabled&&"lc:RT:bf2:Agents:contribution"===t.id&&(t.id="lc:RT:bf2:Agents:Contribution"),"lc:RT:bf2:Components"==t.id)for(let e of t.propertyTemplates)e.valueConstraint.valueTemplateRefs=e.valueConstraint.valueTemplateRefs.filter(t=>{if("lc:RT:bf2:Topic:madsTopic"==t)return!0});if("lc:RT:bf2:Topic:Place:Components"==t.id)for(let e of t.propertyTemplates)e.valueConstraint.valueTemplateRefs=e.valueConstraint.valueTemplateRefs.filter(t=>{if("lc:RT:bf2:Topic:madsGeogHeading"==t)return!0});if("lc:RT:bf2:Topic:Childrens:Components"==t.id)for(let e of t.propertyTemplates)e.valueConstraint.valueTemplateRefs=e.valueConstraint.valueTemplateRefs.filter(t=>{if("lc:RT:bf2:Topic:Childrens:Topic"==t)return!0});if("lc:RT:bf2:Brief:Work"==t.id&&(t.propertyTemplates=[{mandatory:"false",propertyLabel:"Lookup",propertyURI:"http://id.loc.gov/ontologies/bibframe/Work",repeatable:"true",resourceTemplates:[],type:"lookup",valueConstraint:{defaults:[],useValuesFrom:["https://preprod-8230.id.loc.gov/resources/works"],valueDataType:{dataTypeURI:""},valueTemplateRefs:[]}}]),"lc:RT:bf2:GPORelWorkBrief"==t.id&&(t.propertyTemplates=[{mandatory:"false",propertyLabel:"Lookup",propertyURI:"http://id.loc.gov/ontologies/bibframe/Work",repeatable:"true",resourceTemplates:[],type:"lookup",valueConstraint:{defaults:[],useValuesFrom:["https://preprod-8295.id.loc.gov/resources/works"],valueDataType:{dataTypeURI:""},valueTemplateRefs:[]}}]),"lc:RT:bf2:Brief:Instance"==t.id&&(t.propertyTemplates=[{mandatory:"false",propertyLabel:"Lookup",propertyURI:"http://id.loc.gov/ontologies/bibframe/Instance",repeatable:"true",resourceTemplates:[],type:"lookup",valueConstraint:{defaults:[],useValuesFrom:["https://preprod-8230.id.loc.gov/resources/instances"],valueDataType:{dataTypeURI:""},valueTemplateRefs:[]}}]),t.id.includes(":Agent"))for(let e of t.propertyTemplates)e.valueConstraint.useValuesFrom.indexOf("http://preprod.id.loc.gov/authorities/names")>-1&&-1==e.valueConstraint.useValuesFrom.indexOf("https://www.wikidata.org/w/api.php")&&e.valueConstraint.useValuesFrom.push("https://www.wikidata.org/w/api.php");for(let e of t.propertyTemplates)a["a"].profileHacks.profileParseFixPropertyURIWhenUpperCase.enabled&&("http://id.loc.gov/ontologies/bibframe/Role"==e.propertyURI?e.propertyURI="http://id.loc.gov/ontologies/bibframe/role":"http://id.loc.gov/ontologies/bibframe/Frequency"==e.propertyURI?e.propertyURI="http://id.loc.gov/ontologies/bibframe/frequency":"http://id.loc.gov/ontologies/bibframe/ProductionMethod"==e.propertyURI?e.propertyURI="http://id.loc.gov/ontologies/bibframe/productionMethod":"http://id.loc.gov/ontologies/bibframe/GrooveCharacteristic"==e.propertyURI?e.propertyURI="http://id.loc.gov/ontologies/bibframe/soundCharacteristic":"http://id.loc.gov/ontologies/bibframe/MusicNotation"==e.propertyURI?e.propertyURI="http://id.loc.gov/ontologies/bibframe/notation":"http://id.loc.gov/ontologies/bflc/Relation"==e.propertyURI?e.propertyURI="http://id.loc.gov/ontologies/bflc/relation":"http://id.loc.gov/ontologies/bibframe/Scale"==e.propertyURI?e.propertyURI="http://id.loc.gov/ontologies/bibframe/scale":"http://id.loc.gov/ontologies/bibframe/Frequency"==e.propertyURI?e.propertyURI="http://id.loc.gov/ontologies/bibframe/frequency":"http://id.loc.gov/ontologies/bibframe/Place"==e.propertyURI?e.propertyURI="http://id.loc.gov/ontologies/bibframe/place":"http://id.loc.gov/ontologies/bibframe/Illustration"==e.propertyURI?e.propertyURI="http://id.loc.gov/ontologies/bibframe/illustrativeContent":"http://id.loc.gov/ontologies/bibframe/PlaybackChannels"==e.propertyURI||"http://id.loc.gov/ontologies/bibframe/RecordingMethod"==e.propertyURI?e.propertyURI="http://id.loc.gov/ontologies/bibframe/soundCharacteristic":"http://id.loc.gov/ontologies/bibframe/BroadcastStandard"==e.propertyURI?e.propertyURI="http://id.loc.gov/ontologies/bibframe/videoCharacteristic":"http://id.loc.gov/ontologies/bibframe/ColorContent"==e.propertyURI||"http://id.loc.gov/ontologies/bibframe/ColorContent"==e.propertyURI?e.propertyURI="http://id.loc.gov/ontologies/bibframe/colorContent":"http://id.loc.gov/ontologies/bibframe/EncodingFormat"==e.propertyURI||"http://id.loc.gov/ontologies/bibframe/FileType"==e.propertyURI?e.propertyURI="http://id.loc.gov/ontologies/bibframe/digitalCharacteristic":"http://id.loc.gov/ontologies/bibframe/IntendedAudience"==e.propertyURI?e.propertyURI="http://id.loc.gov/ontologies/bibframe/intendedAudience":"http://id.loc.gov/ontologies/bibframe/PresentationFormat"==e.propertyURI?e.propertyURI="http://id.loc.gov/ontologies/bibframe/projectionCharacteristic":"http://id.loc.gov/ontologies/bibframe/Language"==e.propertyURI?e.propertyURI="http://id.loc.gov/ontologies/bibframe/language":"http://id.loc.gov/ontologies/bibframe/SupplementaryContent"==e.propertyURI&&(e.propertyURI="http://id.loc.gov/ontologies/bibframe/supplementaryContent"))}}this.profileSource.forEach(t=>{t.json&&t.json.Profile&&(this.profiles[t.json.Profile.id]={rtOrder:[],rt:{},id:t.json.Profile.id},t.json.Profile.resourceTemplates&&t.json.Profile.resourceTemplates.forEac
1h(e=>{this.profiles[t.json.Profile.id].rtOrder.push(e.id),this.profiles[t.json.Profile.id].rt[e.id]={ptOrder:[],pt:{}},e.propertyTemplates&&e.propertyTemplates.forEach(i=>{i.parent=t.json.Profile.id+e.id+t.id,i.parentId=e.id,i.userValue={"@root":i.propertyURI},i.valueConstraint.valueTemplateRefs=i.valueConstraint.valueTemplateRefs.filter(t=>t.length>0),i["@guid"]=n.generate(),i.canBeHidden=!1,"literal-lang"===i.type&&(this.profiles[t.json.Profile.id].rt[e.id].hasLiteralLangFields=!0);let a=i.propertyURI+"|"+(i.propertyLabel?i.propertyLabel:"plabel");this.profiles[t.json.Profile.id].rt[e.id].ptOrder.push(a),this.profiles[t.json.Profile.id].rt[e.id].pt[a]=i})})),t.json&&t.json.Profile&&t.json.Profile.resourceTemplates&&t.json.Profile.resourceTemplates.forEach(t=>{this.rtLookup[t.id]=t})}),this.profiles=JSON.parse(JSON.stringify(this.profiles));let t={};for(let e of Object.keys(this.profiles))this.profiles[e].rtOrder.forEach(i=>{t[i]=this.profiles[e].rt[i]});Array.isArray(this.startingPointData)&&(this.startingPointData=this.startingPointData[0]),"production"!=a["a"].returnUrls().env&&(this.startingPointData.json.splice(2,0,{menuGroup:"GPO Monograph",menuItems:[{label:"Instance",type:["http://id.loc.gov/ontologies/bibframe/Instance"],useResourceTemplates:["lc:RT:bf2:GPOMono:Instance"]},{label:"Work",type:["http://id.loc.gov/ontologies/bibframe/Work"],useResourceTemplates:["lc:RT:bf2:GPOMono:Work"]}]}),this.startingPointData.json.splice(3,0,{menuGroup:"GPO Serial",menuItems:[{label:"Instance",type:["http://id.loc.gov/ontologies/bibframe/Instance"],useResourceTemplates:["lc:RT:bf2:GPOSerial:Instance"]},{label:"Work",type:["http://id.loc.gov/ontologies/bibframe/Work"],useResourceTemplates:["lc:RT:bf2:GPOSerial:Work"]}]})),this.startingPointData.json.forEach(e=>{this.startingPoints[e.menuGroup]={name:e.menuGroup,work:null,instance:null,item:null},e.menuItems.forEach(t=>{t.type.indexOf("http://id.loc.gov/ontologies/bibframe/Instance")>-1&&(this.startingPoints[e.menuGroup].instance=t.useResourceTemplates[0]),t.type.indexOf("http://id.loc.gov/ontologies/bibframe/Work")>-1&&(this.startingPoints[e.menuGroup].work=t.useResourceTemplates[0]),t.type.indexOf("http://id.loc.gov/ontologies/bibframe/Item")>-1&&(this.startingPoints[e.menuGroup].item=t.useResourceTemplates[0]),t.type.indexOf("http://id.loc.gov/ontologies/bibframe/Hub")>-1&&(this.startingPoints[e.menuGroup].hub=t.useResourceTemplates[0])}),this.profiles[e.menuGroup]={id:e.menuGroup,rt:{},rtOrder:[]},this.startingPoints[e.menuGroup].hub&&(this.profiles[e.menuGroup].rt[this.startingPoints[e.menuGroup].hub]=t[this.startingPoints[e.menuGroup].hub],this.profiles[e.menuGroup].rtOrder.push(this.startingPoints[e.menuGroup].hub)),this.startingPoints[e.menuGroup].work&&(this.profiles[e.menuGroup].rt[this.startingPoints[e.menuGroup].work]=t[this.startingPoints[e.menuGroup].work],this.profiles[e.menuGroup].rtOrder.push(this.startingPoints[e.menuGroup].work)),this.startingPoints[e.menuGroup].instance&&(this.profiles[e.menuGroup].rt[this.startingPoints[e.menuGroup].instance]=t[this.startingPoints[e.menuGroup].instance],this.profiles[e.menuGroup].rtOrder.push(this.startingPoints[e.menuGroup].instance)),this.startingPoints[e.menuGroup].hub&&this.startingPoints[e.menuGroup].work&&this.startingPoints[e.menuGroup].instance&&(this.profiles[e.menuGroup].rtOrder=[],this.profiles[e.menuGroup].rtOrder.push(this.startingPoints[e.menuGroup].hub),this.profiles[e.menuGroup].rtOrder.push(this.startingPoints[e.menuGroup].work),this.profiles[e.menuGroup].rtOrder.push(this.startingPoints[e.menuGroup].instance))});for(let e in this.profiles){this.profiles[e].hashRts={},this.profiles[e].hashPts={};for(let t in this.profiles[e].rt)if(this.profiles[e].rt[t]&&(this.profiles[e].hashRts[t]=this.hashRt(this.profiles[e].rt[t])),this.profiles[e].rt[t]&&this.profiles[e].rt[t].pt)for(let i in this.profiles[e].rt[t].pt){let a=t+"|"+this.profiles[e].rt[t].pt[i].propertyURI;this.profiles[e].rt[t].pt[i].valueConstraint&&this.profiles[e].rt[t].pt[i].valueConstraint.valueDataType&&this.profiles[e].rt[t].pt[i].valueConstraint.valueDataType.dataTypeURI&&""!=this.profiles[e].rt[t].pt[i].valueConstraint.valueDataType.dataTypeURI.trim()&&(a=a+"|"+this.profiles[e].rt[t].pt[i].valueConstraint.valueDataType.dataTypeURI);let o=JSON.parse(JSON.stringify(this.profiles[e].rt[t].pt[i]));delete o["@guid"],this.profiles[e].hashPts[a]=p(JSON.stringify(o))}}return{profiles:this.profiles,lookup:this.rtLookup,startingPoints:this.startingPoints}},hashRt:function(t){t=JSON.parse(JSON.stringify(t));for(let e in t.pt)delete t.pt[e]["@guid"];return p(JSON.stringify(t))},isUriALiteral:function(t){return console.log(t),a["a"].isLiteral.map(t=>t.toLowerCase()).indexOf(t.toLowerCase())>-1},populateDefaultValuesIntoUserValues:async function(t,e){for(let i in t.rt)if(!e||t.rt[
1i].isNew){delete t.rt[i].isNew;for(let e in t.rt[i].pt){if(e=t.rt[i].pt[e],e.valueConstraint.defaults&&e.valueConstraint.defaults.length>0){e.userValue[e.propertyURI]=[{}];let t=e.userValue[e.propertyURI][0],a=await s["a"].suggestType(e.propertyURI,i);this.isUriALiteral(a)||(t["@type"]=a),e.userValue["@guid"]=n.generate(),e.propertyURI==e.userValue["@root"]?(e.valueConstraint.defaults[0].defaultLiteral&&(t["http://www.w3.org/2000/01/rdf-schema#label"]=[{"@guid":n.generate(),"http://www.w3.org/2000/01/rdf-schema#label":e.valueConstraint.defaults[0].defaultLiteral}]),e.valueConstraint.defaults[0].defaultURI&&(t["@id"]=e.valueConstraint.defaults[0].defaultURI)):(e.valueConstraint.defaults[0].defaultLiteral&&(t[e.propertyURI]=[{"@guid":n.generate(),"http://www.w3.org/2000/01/rdf-schema#label":[{"http://www.w3.org/2000/01/rdf-schema#label":e.valueConstraint.defaults[0].defaultLiteral,"@guid":n.generate()}]}]),e.valueConstraint.defaults[0].defaultURI&&(t[e.propertyURI]["@id"]=e.valueConstraint.defaults[0].defaultURI,e.valueConstraint.valueDataType&&e.valueConstraint.valueDataType.dataTypeURI&&(t[e.propertyURI]["@type"]=e.valueConstraint.valueDataType.dataTypeURI)))}if(e.valueConstraint.valueTemplateRefs&&e.valueConstraint.valueTemplateRefs.length>0&&this.rtLookup[e.valueConstraint.valueTemplateRefs[0]])for(let t of this.rtLookup[e.valueConstraint.valueTemplateRefs[0]].propertyTemplates)if(t.valueConstraint.defaults&&t.valueConstraint.defaults.length>0){e.userValue[e.propertyURI]||(e.userValue[e.propertyURI]=[{}]);let a=e.userValue[e.propertyURI][0],o=await s["a"].suggestType(e.propertyURI,i);this.isUriALiteral(o)||(a["@type"]=o),t.propertyURI==e.userValue["@root"]?(t.valueConstraint.defaults[0].defaultLiteral&&(a["http://www.w3.org/2000/01/rdf-schema#label"]=[{"@guid":n.generate(),"http://www.w3.org/2000/01/rdf-schema#label":t.valueConstraint.defaults[0].defaultLiteral}]),t.valueConstraint.defaults[0].defaultURI&&(a["@id"]=t.valueConstraint.defaults[0].defaultURI)):(t.valueConstraint.defaults[0].defaultLiteral&&(a[t.propertyURI]=[{"@guid":n.generate(),"http://www.w3.org/2000/01/rdf-schema#label":[{"http://www.w3.org/2000/01/rdf-schema#label":t.valueConstraint.defaults[0].defaultLiteral,"@guid":n.generate()}]}]),t.valueConstraint.defaults[0].defaultURI&&a[t.propertyURI]&&a[t.propertyURI][0]&&(a[t.propertyURI][0]["@id"]=t.valueConstraint.defaults[0].defaultURI,t.valueConstraint.valueDataType&&t.valueConstraint.valueDataType.dataTypeURI&&(a[t.propertyURI][0]["@type"]=t.valueConstraint.valueDataType.dataTypeURI)))}}}return t},duplicateProperty:function(t,e,i,a){console.log(t,"|",e,"|",i,"|",a);let o=i.rt[e].ptOrder.indexOf(t),r=t+"|"+ +new Date;if(i.rt[e].ptOrder.splice(o+1,0,r),i.rt[e].pt[r]=JSON.parse(JSON.stringify(i.rt[e].pt[t])),a){l["a"].state.activeUndoLog.push("Duplicated property "+s["a"].namespaceUri(i.rt[e].pt[t].propertyURI)),i.rt[e].pt[r].userValue["@guid"]=n.generate();for(let t in i.rt[e].pt[r].userValue)if(Array.isArray(i.rt[e].pt[r].userValue[t]))for(let a of i.rt[e].pt[r].userValue[t]){a["@guid"]&&(a["@guid"]=n.generate());for(let t in a)if(Array.isArray(a[t]))for(let e of a[t])e["@guid"]&&(e["@guid"]=n.generate())}console.log(i.rt[e].pt[r].userValue)}else{l["a"].state.activeUndoLog.push("Added another property "+s["a"].namespaceUri(i.rt[e].pt[t].propertyURI)),i.rt[e].pt[r].userValue={"@guid":n.generate(),"@root":i.rt[e].pt[r].propertyURI};let a,o=i.rt[e].pt[t].propertyURI,c=i.rt[e].pt[r].propertyURI,d=e;if(l["a"].state.rtLookup[d]||d.includes("-")&&(d=d.split("-")[0]),l["a"].state.rtLookup[d]&&(a=l["a"].state.rtLookup[d].propertyTemplates.filter(t=>t.propertyURI===o),a.length>0&&(a=a[0])),a&&a.valueConstraint.defaults.length>0){i.rt[e].pt[r].userValue[c]||(i.rt[e].pt[r].userValue[c]=[{}]);let t=i.rt[e].pt[r].userValue[c][0];a.valueConstraint.defaults[0].defaultLiteral&&(console.log(i.rt[e].pt[r]),t["http://www.w3.org/2000/01/rdf-schema#label"]=[{"@guid":n.generate(),"http://www.w3.org/2000/01/rdf-schema#label":a.valueConstraint.defaults[0].defaultLiteral}]),a.valueConstraint.defaults[0].defaultURI&&(t["@id"]=a.valueConstraint.defaults[0].defaultURI)}else if(a&&a.valueConstraint.valueTemplateRefs.length>0){i.rt[e].pt[r].userValue[c]||(i.rt[e].pt[r].userValue[c]=[{}]);let t=i.rt[e].pt[r].userValue[c][0],o=a.valueConstraint.valueTemplateRefs[0];for(let e of l["a"].state.rtLookup[o].propertyTemplates)if(e.valueConstraint.defaults.length>0){let i=e.valueConstraint.defaults[0];i.defaultLiteral&&(t[e.propertyURI]=[{"@guid":n.generate(),"http://www.w3.org/2000/01/rdf-schema#label":[{"http://www.w3.org/2000/01/rdf-schema#label":i.defaultLiteral,"@guid":n.generate()}]}]),i.defaultURI&&t[e.propertyURI][0]&&(t[e.propertyURI][0]["@id"]=i.defaultURI,e.valueConstraint.valueDataType&&e.valueConstraint.valueDataType.dataTypeURI&&(t[e.propertyURI][0]["@type"]=e.valueConstraint.valueDataType.dataTypeURI))}}i.rt[e].pt[r].userValue[c]&&i.rt[e].pt[r].userValue[c][0]&&0===Object.keys(i.rt[e].pt[r].userValue[c][0]).length&&delete i.rt[e].pt[r].userValue[c]}return i.rt[e].pt[r]["@guid"]=n.generate(),i.rt[e].pt[r].xmlSource="",setTimeout(()=>
1{document.getElementById(e+"|"+r)&&(document.getElementById(e+"|"+r).style.backgroundColor="yellow",document.getElementById(e+"|"+r).scrollIntoView({behavior:"smooth",block:"center"}),setTimeout(()=>{document.getElementById(e+"|"+r).style.removeProperty("background-color")},500))},0),i},removeProperty:function(t,e,i){let a=i.rt[e].ptOrder.indexOf(t);l["a"].state.activeUndoLog.push("Removed property "+s["a"].namespaceUri(i.rt[e].pt[t].propertyURI));let o=0;for(let r of Object.keys(i.rt[e].pt))i.rt[e].pt[r].propertyURI==i.rt[e].pt[t].propertyURI&&i.rt[e].pt[r].propertyLabel==i.rt[e].pt[t].propertyLabel&&o++;if(1==o){let o=JSON.parse(JSON.stringify(i.rt[e].pt[t]));i.rt[e].ptOrder.splice(a,1),delete i.rt[e].pt[t],o.deleted=!0,i.rt[e].ptOrder.push(t),i.rt[e].pt[t]=o}else i.rt[e].ptOrder.splice(a,1),delete i.rt[e].pt[t];return i},restoreProperty:function(t,e,i){let a=i.rt[e].ptOrder.indexOf(t);l["a"].state.activeUndoLog.push("Restored property "+s["a"].namespaceUri(i.rt[e].pt[t].propertyURI));let o=JSON.parse(JSON.stringify(i.rt[e].pt[t]));return i.rt[e].ptOrder.splice(a,1),delete i.rt[e].pt[t],delete o.deleted,i.rt[e].ptOrder.push(t),i.rt[e].pt[t]=o,i},sendToInstance:function(t,e,i){l["a"].state.activeUndoLog.push("Transfered property "+s["a"].namespaceUri(i.rt[t.profile].pt[t.componet].propertyURI));let a=JSON.parse(JSON.stringify(t.data));return delete i.rt[t.profile].pt[t.componet],i.rt[t.profile].ptOrder.splice(i.rt[t.profile].ptOrder.indexOf(t.componet),1),a.parent=a.parent.replaceAll(t.profile,e),a.parentId=e.profile,"http://id.loc.gov/ontologies/bflc/PrimaryContribution"===a.userValue["@type"]&&(a.userValue["@type"]="http://id.loc.gov/ontologies/bibframe/Contribution"),i.rt[e].ptOrder.indexOf(t.componet)>-1&&(t.componet=t.componet+n.generate()),i.rt[e].ptOrder.unshift(t.componet),i.rt[e].pt[t.componet]=a,i},refTemplateChange:function(t,e,i,a,o,r,s,c){if(t.rt[a].pt[e]){t.rt[a].pt[e].activeType=c.resourceURI;let o=t.rt[a].pt[e].propertyURI;console.log("baseURI",o),console.log("baseURI",o),console.log("nextRef.resourceURI",c.resourceURI),t.rt[a].pt[e].userValue[o]||(t.rt[a].pt[e].userValue[o]=[{}]);let d=t.rt[a].pt[e].userValue[o][0];d["@id"]&&delete d["@id"],console.log("NEW userValue",d),i==t.rt[a].pt[e].propertyURI?d["@type"]=c.resourceURI:d[i]&&d[i][0]&&d[i][0]["@type"]&&(d[i][0]["@type"]=c.resourceURI),t.rt[a].pt[e].refTemplateUserValueKeys||(t.rt[a].pt[e].refTemplateUserValueKeys={}),t.rt[a].pt[e].refTemplateUserValueKeys[s.id]||(t.rt[a].pt[e].refTemplateUserValueKeys[s.id]=[]);for(let i in t.rt[a].pt[e].userValue)i.startsWith("@")||t.rt[a].pt[e].refTemplateUserValueKeys[s.id].push(i);let u=c.propertyTemplates.map(t=>t.propertyURI);r.includes(":Work")||r.includes(":Instance")||r.includes(":Item")||this.rtLookup[r]&&(u=u.concat(this.rtLookup[r].propertyTemplates.map(t=>t.propertyURI))),t.rt[a].pt[e].refTemplateUserValue||(t.rt[a].pt[e].refTemplateUserValue={});for(let i in d)i.startsWith("@")||-1==u.indexOf(i)&&(t.rt[a].pt[e].refTemplateUserValue[i]=JSON.parse(JSON.stringify(d[i])),delete d[i]);for(let i of u)t.rt[a].pt[e].refTemplateUserValue[i]&&("http://id.loc.gov/ontologies/bibframe/assigner"!=i&&(d[i]=JSON.parse(JSON.stringify(t.rt[a].pt[e].refTemplateUserValue[i]))),delete t.rt[a].pt[e].refTemplateUserValue[i]);for(let t of l["a"].state.rtLookup[c.id].propertyTemplates)t.valueConstraint.defaults&&t.valueConstraint.defaults.length>0&&(d[t.propertyURI]&&(d[t.propertyURI]=[]),t.valueConstraint.defaults[0].defaultLiteral&&("http://www.w3.org/2000/01/rdf-schema#label"===t.propertyURI?d[t.propertyURI]=[{"http://www.w3.org/2000/01/rdf-schema#label":t.valueConstraint.defaults[0].defaultLiteral,"@guid":n.generate()}]:d[t.propertyURI]=[{"@guid":n.generate(),"http://www.w3.org/2000/01/rdf-schema#label":[{"http://www.w3.org/2000/01/rdf-schema#label":t.valueConstraint.defaults[0].defaultLiteral,"@guid":n.generate()}]}]),t.valueConstraint.defaults[0].defaultURI&&""!=t.valueConstraint.defaults[0].defaultURI.trim()&&(d[t.propertyURI][0]["@id"]=t.valueConstraint.defaults[0].defaultURI,t.valueConstraint.valueDataType&&t.valueConstraint.valueDataType.dataTypeURI&&(d[t.propertyURI][0]["@type"]=t.valueConstraint.valueDataType.dataTypeURI)))}return t}
1,removeValuebyURI:function(t,e,i,a){let o=!1;for(let r in t.rt){for(let a in t.rt[r].pt)if(t.rt[r].pt[a]["@guid"]==e){let e=t.rt[r].pt[a].propertyURI,n=t.rt[r].pt[a].userValue,c=n[e].filter(t=>t["@id"]&&t["@id"]!=i);if(c.length<n[e].length&&(o=!0,n[e]=c),0==n[e].length&&delete n[e],o){l["a"].state.activeUndoLog.push("Removed lookup value from "+s["a"].namespaceUri(e));break}}if(o)break}return t},removeValueSimple:function(t,e,i,a,o){console.log("idGuid",i),console.log("labelGuid",a);for(let r in t.rt)for(let n in t.rt[r].pt)if(t.rt[r].pt[n]["@guid"]==e){let e=!1,c=t.rt[r].pt[n].userValue,d=o.filter(t=>"http://www.w3.org/2002/07/owl#sameAs"!=t.propertyURI).length;if(4==d){let t=o[0].propertyURI,r=o[1].propertyURI,s=o[2].propertyURI,l=o[3].propertyURI,n=c[t][0][r][0][s][0][l].filter(t=>t["@guid"]&&t["@guid"]!=i&&t["@guid"]!=a);n.length<c[t][0][r][0][s][0][l].length&&(e=!0,c[t][0][r][0][s][0][l]=n),0==c[t][0][r][0][s][0][l].length&&delete c[t][0][r][0][s][0][l],0==Object.keys(c[t][0][r][0][s][0]).filter(t=>"@guid"!=t&&"@id"!=t&&"@type"!=t&&"@flags"!=t).length&&c[t][0][r][0][s].pop()}if(3==d){let t=o[0].propertyURI,r=o[1].propertyURI,s=o[2].propertyURI,l=c[t][0][r][0][s].filter(t=>t["@guid"]&&t["@guid"]!=i&&t["@guid"]!=a);l.length<c[t][0][r][0][s].length&&(e=!0,c[t][0][r][0][s]=l),0==c[t][0][r][0][s].length&&delete c[t][0][r][0][s],0==Object.keys(c[t][0][r][0]).filter(t=>"@guid"!=t&&"@id"!=t&&"@type"!=t&&"@flags"!=t).length&&c[t][0][r].pop()}
1if(2==d){let t=o[0].propertyURI,r=o[1].propertyURI,s=c[t][0][r].filter(t=>t["@guid"]&&t["@guid"]!=i&&t["@guid"]!=a);s.length<c[t][0][r].length&&(e=!0,c[t][0][r]=s),0==c[t][0][r].length&&delete c[t][0][r],0==Object.keys(c[t][0]).filter(t=>"@guid"!=t&&"@id"!=t&&"@type"!=t&&"@flags"!=t).length&&c[t].pop()}if(1==d){let t=o[0].propertyURI,r=c[t].filter(t=>t["@guid"]&&t["@guid"]!=i&&t["@guid"]!=a);r.length<c[t].length&&(e=!0,c[t]=r),0==c[t].length&&delete c[t]}if(e){l["a"].state.activeUndoLog.push("Removed lookup value from "+s["a"].namespaceUri(t.rt[r].pt[n].propertyURI));break}}return t},setValueSimple:async function(t,e,i,a,o){let r={newData:{}};console.log("-------------Adding DATA---------------"),console.log("currentState",t),console.log("ptGuid",e),console.log("propertyPath",o),console.log("valueURI",i),console.log("valueLabel",a);for(let c in t.rt)for(let d in t.rt[c].pt)if(t.rt[c].pt[d]["@guid"]==e){let e,u=t.rt[c].pt[d].userValue,p=u,h=null;for(let i of o){if("http://www.w3.org/2002/07/owl#sameAs"==i.propertyURI)continue;p[i.propertyURI]||(p[i.propertyURI]=[]),console.log("p.propertyURI",i.propertyURI),e=await this.suggestTypeImproved(i.propertyURI,t.rt[c].pt[d]),console.log("thisLevelType frist",e),e||(e=await s["a"].suggestType(i.propertyURI,c)),console.log("thisLevelType",e,this.isUriALiteral(e));let a={"@guid":n.generate()};this.isUriALiteral(e)||(a["@type"]=e,console.log("thisLevel",a)),console.log("currentUserValuePos[p.propertyURI]",p[i.propertyURI]),0==p[i.propertyURI].length&&(console.log("puhing"),p[i.propertyURI].push(a)),h=p[i.propertyURI],p=p[i.propertyURI][0]}if(p["@id"]||p["http://www.w3.org/2000/01/rdf-schema#label"]){let t={"@guid":n.generate()};this.isUriALiteral(e)||(t["@type"]=e),a&&(t["http://www.w3.org/2000/01/rdf-schema#label"]=[{"@guid":n.generate(),"http://www.w3.org/2000/01/rdf-schema#label":a}]),i&&(t["@id"]=i),h.push(t),r.newData={guid:t["@guid"],valueLabel:a,valueURI:i}}else a&&(p["http://www.w3.org/2000/01/rdf-schema#label"]=[{"@guid":n.generate(),"http://www.w3.org/2000/01/rdf-schema#label":a}]),i&&(p["@id"]=i),r.newData={guid:p["@guid"],valueLabel:a,valueURI:i};l["a"].state.activeUndoLog.push(`Added lookup value ${a} to ${s["a"].namespaceUri(o[o.length-1].propertyURI)}`),console.log("userValue =",u)}return r.currentState=t,r},setValueLiteral:async function(t,e,i,a,o){let r={newGuid:null};for(let l in t.rt)for(let c in t.rt[l].pt)if(t.rt[l].pt[c]["@guid"]==e){let e=t.rt[l].pt[c].userValue;if(i)if(1===o.length){let t=o[0].propertyURI;if(e[t])for(let o of e[t])if(o[t]&&o["@guid"]===i){o[t]=a;break}}else if(2===o.length){let t=o[0].propertyURI,r=o[1].propertyURI;if(e[t]&&e[t][0]&&e[t][0][r]){let o=e[t][0][r].filter(t=>t["@guid"]===i);o&&o[0]&&(o[0][r]=a)}}else if(3===o.length){let t=o[0].propertyURI,r=o[1].propertyURI,s=o[2].propertyURI;if(e[t]&&e[t][0]&&e[t][0][r]&&e[t][0][r][0]&&e[t][0][r][0][s]){let o=e[t][0][r][0][s].filter(t=>t["@guid"]===i);o&&o[0]&&(o[0][s]=a)}}else if(4===o.length){let t=o[0].propertyURI,r=o[1].propertyURI,s=o[2].propertyURI,l=o[3].propertyURI;if(e[t]&&e[t][0]&&e[t][0][r]&&e[t][0][r][0]&&e[t][0][r][0][s]&&e[t][0][r][0][s][0]&&e[t][0][r][0][s][0][l]){let o=e[t][0][r][0][s][0][l].filter(t=>t["@guid"]===i);o&&o[0]&&(o[0][l]=a)}}else console.error("Error trying to update literal value but cannot find guid");else if(0==o.length)console.error("Something is wrong with propertyPath, reading zero levels, no place to set data.");else if(1===o.length){let t=o[0].propertyURI,i={"@guid":n.generate()};i[t]=a,e[t]||(e[t]=[]),e[t].push(i),r.newGuid=i["@guid"]}else if(o.length>=2){let i=o[0].propertyURI,d=o[1].propertyURI,u=await this.suggestTypeImproved(i,t.rt[l].pt[c]);u||(u=await s["a"].suggestType(i,l));let p={"@guid":n.generate(),"@type":u};e[i]?0===e[i].length?e[i].push(p):e[i].length>1&&console.error(i,"has more than one blank node of the same type?"):e[i]=[p];let h=await this.suggestTypeImproved(d,t.rt[l].pt[c]);h||(h=await s["a"].suggestType(d,l));let f={"@guid":n.generate(),"@type":h};if(2===o.length&&(f[d]=a,r.newGuid=f["@guid"]),this.isUriALiteral(h)&&delete f["@type"],e[i][0][d]||(e[i][0][d]=[]),e[i][0][d].push(f),o.length>=3){let u=o[2].propertyURI,p=await this.suggestTypeImproved(u,t.rt[l].pt[c]);p||(p=await s["a"].suggestType(u,l));let h={"@guid":n.generate(),"@type":p};if(this.isUriALiteral(p)&&delete h["@type"],e[i][0][d][0][u]||(e[i][0][d][0][u]=[]),e[i][0][d][0][u].push(h),3===o.length&&(r.newGuid=h["@guid"],h[u]=a),o.length>=4){let p=o[3].propertyURI,h=await this.suggestTypeImproved(p,t.rt[l].pt[c]);h||(h=await s["a"].suggestType(p,l));let f={"@guid":n.generate(),"@type":h};this.isUriALiteral(h)&&delete f["@type"],4===o.length&&(r.newGuid=f["@guid"],f[p]=a),e[i][0][d][0][u][0][p]||(e[i][0][d][0][u][0][p]=[]),e[i][0][d][0][u][0][p].push(f)}}}else console.error("Error trying to write to the correct literal level");break}let c=o[o.length-1].propertyURI;return l["a"].state.activeUndoLog=l["a"].state.activeUndoLog.filter(t=>!t.includes(s["a"].namespaceUri(c))),l["a"].state.activeUndoLog.push(`Changed literal value "${a}" on ${s["a"].namespaceUri(c)}`),r.currentState=t,r},reorderSubjects:function(t,e){for(let i of t.rtOrder)if(i.includes(":Work")){let a=0;
1for(let e of t.rt[i].ptOrder){if(e.includes("http://id.loc.gov/ontologies/bibframe/subject"))break;a++}let o=t.rt[i].ptOrder.filter(t=>!t.includes("http://id.loc.gov/ontologies/bibframe/subject")),r=e.map(t=>t.pt);o.splice(a,0,...r),t.rt[i].ptOrder=o}return t},returnSubjectList:function(t){let e=[];for(let i of t.rtOrder)if(i.includes(":Work"))for(let a of t.rt[i].ptOrder)if(a.includes("id.loc.gov/ontologies/bibframe/subject")){let o="!Unkown Subject Label!",r="",s=t.rt[i].pt[a].userValue;if(s["http://id.loc.gov/ontologies/bibframe/subject"]&&s["http://id.loc.gov/ontologies/bibframe/subject"][0]){if(s=s["http://id.loc.gov/ontologies/bibframe/subject"][0],s["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"]&&s["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"][0]&&s["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"][0]["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"]&&(o=s["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"][0]["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"]),s["http://www.w3.org/2000/01/rdf-schema#label"]&&s["http://www.w3.org/2000/01/rdf-schema#label"][0]&&s["http://www.w3.org/2000/01/rdf-schema#label"][0]["http://www.w3.org/2000/01/rdf-schema#label"]&&(o=s["http://www.w3.org/2000/01/rdf-schema#label"][0]["http://www.w3.org/2000/01/rdf-schema#label"]),s["http://id.loc.gov/ontologies/bibframe/source"]&&s["http://id.loc.gov/ontologies/bibframe/source"][0]&&s["http://id.loc.gov/ontologies/bibframe/source"][0]){let t=s["http://id.loc.gov/ontologies/bibframe/source"][0];t["@id"]&&"http://id.loc.gov/authorities/subjects"==t["@id"]&&(r="lcsh"),t["@id"]&&"http://id.loc.gov/vocabulary/subjectSchemes/fast"==t["@id"]&&(r="fast")}e.push({guid:t.rt[i].pt[a]["@guid"],source:r,label:o,pt:a})}}return e},setValueSubject:async function(t,e,i,a,o){if(t.rt[i].pt[e]){let r,c={},d=c;for(let t of o){if("http://www.w3.org/2002/07/owl#sameAs"==t.propertyURI)break;if("http://www.loc.gov/mads/rdf/v1#componentList"==t.propertyURI)break;d[t.propertyURI]||(d[t.propertyURI]=[]),r=await s["a"].suggestType(t.propertyURI);let e={"@guid":n.generate()};this.isUriALiteral(r)||(e["@type"]=r),0==d[t.propertyURI].length&&d[t.propertyURI].push(e),d=d[t.propertyURI][0]}if(t.rt[i].pt[e].userValue["http://id.loc.gov/ontologies/bibframe/subject"]&&t.rt[i].pt[e].userValue["http://id.loc.gov/ontologies/bibframe/subject"][0]&&t.rt[i].pt[e].userValue["http://id.loc.gov/ontologies/bibframe/subject"][0]["http://id.loc.gov/ontologies/bibframe/source"]&&t.rt[i].pt[e].userValue["http://id.loc.gov/ontologies/bibframe/subject"][0]["http://id.loc.gov/ontologies/bibframe/source"][0]&&(c["http://id.loc.gov/ontologies/bibframe/subject"][0]["http://id.loc.gov/ontologies/bibframe/source"]=JSON.parse(JSON.stringify(t.rt[i].pt[e].userValue["http://id.loc.gov/ontologies/bibframe/subject"][0]["http://id.loc.gov/ontologies/bibframe/source"]))),t.rt[i].pt[e].userValue["@root"]&&(c["@root"]=JSON.parse(JSON.stringify(t.rt[i].pt[e].userValue["@root"]))),t.rt[i].pt[e].userValue["@guid"]&&(c["@guid"]=JSON.parse(JSON.stringify(t.rt[i].pt[e].userValue["@guid"]))),d["http://www.loc.gov/mads/rdf/v1#isMemberOfMADSScheme"]=[{"@guid":n.generate(),"@id":"http://id.loc.gov/authorities/subjects"}],1==a.length)d["@id"]=a[0].uri,d["@type"]=a[0].type.replace("madsrdf:","http://www.loc.gov/mads/rdf/v1#"),d["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"]=[{"@guid":n.generate(),"http://www.loc.gov/mads/rdf/v1#authoritativeLabel":a[0].label}],d["http://www.w3.org/2000/01/rdf-schema#label"]=[{"@guid":n.generate(),"http://www.w3.org/2000/01/rdf-schema#label":a[0].label}],l["a"].state.activeUndoLog.push("Added subject heading "+a[0].label);else if(a.length>1){let t=a.map(t=>t.label).join("--");l["a"].state.activeUndoLog.push("Added subject heading "+t),d["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"]=[{"@guid":n.generate(),"http://www.loc.gov/mads/rdf/v1#authoritativeLabel":t}],d["http://www.w3.org/2000/01/rdf-schema#label"]=[{"@guid":n.generate(),"http://www.w3.org/2000/01/rdf-schema#label":t}],d["http://www.loc.gov/mads/rdf/v1#componentList"]=[];for(let e of a){let t={"@guid":n.generate(),"@type":e.type.replace("madsrdf:","http://www.loc.gov/mads/rdf/v1#"),"http://www.loc.gov/mads/rdf/v1#authoritativeLabel":[{"@guid":n.generate(),"http://www.loc.gov/mads/rdf/v1#authoritativeLabel":e.label}]};e.uri&&(t["@id"]=e.uri),d["http://www.loc.gov/mads/rdf/v1#componentList"].push(t)}}t.rt[i].pt[e].userValue=c}return t}
1,setValueComplex:async function(t,e,i,a,o,r,c,d,u){if(!d&&"http://id.loc.gov/ontologies/bibframe/Work"==c.propertyURI)return alert("You cannot change the existing URI of this work."),t;if(!a)return console.warn("setValueComplex no activeProfileName"),t;if("object"===typeof r&&0==Object.keys(r).length){if(t.rt[a].pt[e]){let i=!1;u.length>=4&&!i&&t.rt[a].pt[e].userValue[u[0].propertyURI]&&t.rt[a].pt[e].userValue[u[0].propertyURI][0]&&t.rt[a].pt[e].userValue[u[0].propertyURI][0][u[1].propertyURI]&&t.rt[a].pt[e].userValue[u[0].propertyURI][0][u[1].propertyURI][0]&&t.rt[a].pt[e].userValue[u[0].propertyURI][0][u[1].propertyURI][0][u[2].propertyURI]&&t.rt[a].pt[e].userValue[u[0].propertyURI][0][u[1].propertyURI][0][u[2].propertyURI][0]&&t.rt[a].pt[e].userValue[u[0].propertyURI][0][u[1].propertyURI][0][u[2].propertyURI][0][u[3].propertyURI]&&(delete t.rt[a].pt[e].userValue[u[0].propertyURI][0][u[1].propertyURI][0][u[2].propertyURI][0][u[3].propertyURI],i=!0),u.length>=3&&!i&&t.rt[a].pt[e].userValue[u[0].propertyURI]&&t.rt[a].pt[e].userValue[u[0].propertyURI][0]&&t.rt[a].pt[e].userValue[u[0].propertyURI][0][u[1].propertyURI]&&t.rt[a].pt[e].userValue[u[0].propertyURI][0][u[1].propertyURI][0]&&t.rt[a].pt[e].userValue[u[0].propertyURI][0][u[1].propertyURI][u[2].propertyURI]&&(delete t.rt[a].pt[e].userValue[u[0].propertyURI][0][u[1].propertyURI][u[2].propertyURI],i=!0),u.length>=2&&!i&&t.rt[a].pt[e].userValue[u[0].propertyURI]&&t.rt[a].pt[e].userValue[u[0].propertyURI][0]&&t.rt[a].pt[e].userValue[u[0].propertyURI][0][u[1].propertyURI]&&(delete t.rt[a].pt[e].userValue[u[0].propertyURI][0][u[1].propertyURI],i=!0)}let i=d?d.propertyURI:c.propertyURI;return l["a"].state.activeUndoLog.push("Removed lookup value from "+s["a"].namespaceUri(i)),t}if(t.rt[a].pt[e]){let o,l=t.rt[a].pt[e].userValue,p=l;for(let i of u){if(console.log("on p",i),"http://www.w3.org/2002/07/owl#sameAs"==i.propertyURI)break;p[i.propertyURI]||(p[i.propertyURI]=[]),o=await this.suggestTypeImproved(i.propertyURI,t.rt[a].pt[e]),o||(o=await s["a"].suggestType(i.propertyURI,a));let r={"@guid":n.generate()};this.isUriALiteral(o)||(r["@type"]=o),0==p[i.propertyURI].length&&p[i.propertyURI].push(r),p=p[i.propertyURI][0]}if("http://www.w3.org/2000/01/rdf-schema#Literal"!==o&&(t.rt[a].pt[e].valueConstraint&&t.rt[a].pt[e].valueConstraint.valueDataType&&t.rt[a].pt[e].valueConstraint.valueDataType.dataTypeURI&&(p["@type"]=t.rt[a].pt[e].valueConstraint.valueDataType.dataTypeURI),d&&d.valueConstraint&&d.valueConstraint.valueDataType&&d.valueConstraint.valueDataType.dataTypeURI&&""!=d.valueConstraint.valueDataType.dataTypeURI.trim()?p["@type"]=d.valueConstraint.valueDataType.dataTypeURI:c&&c.valueConstraint.valueDataType&&c.valueConstraint.valueDataType.dataTypeURI&&""!=c.valueConstraint.valueDataType.dataTypeURI.trim()&&(p["@type"]=c.valueConstraint.valueDataType.dataTypeURI)),t.rt[a].pt[e].valueConstraint&&t.rt[a].pt[e].valueConstraint.valueTemplateRefs&&t.rt[a].pt[e].valueConstraint.valueTemplateRefs.length>1&&(t.rt[a].pt[e].activeType||(t.rt[a].pt[e].activeType=this.rtLookup[t.rt[a].pt[e].valueConstraint.valueTemplateRefs[0]].resourceURI),p["@type"]=t.rt[a].pt[e].activeType),"http://www.w3.org/2002/07/owl#sameAs"==i&&r.contextValue&&(r.typeFull||"Literal Value"!=r.type||(c&&"http://id.loc.gov/ontologies/bibframe/agent"==c.propertyURI||d&&"http://id.loc.gov/ontologies/bibframe/agent"==d.propertyURI)&&(r.typeFull="http://id.loc.gov/ontologies/bibframe/Agent"),p["@type"]=r.typeFull),p["@type"]||(p["@type"]=await s["a"].suggestType(t.rt[a].pt[e].propertyURI,a)),p["@id"]=r.uri,p["http://www.w3.org/2000/01/rdf-schema#label"]=[{"http://www.w3.org/2000/01/rdf-schema#label":r.title,"@guid":n.generate()}],r.precoordinated){t.rt[a].pt[e].userValue["http://www.loc.gov/mads/rdf/v1#componentList"]=[];for(let i of r.precoordinated)t.rt[a].pt[e].userValue["http://www.loc.gov/mads/rdf/v1#componentList"].push({"http://www.w3.org/2000/01/rdf-schema#label":[{"http://www.w3.org/2000/01/rdf-schema#label":i.label}],"@type":i.typeFull,"@id":i.uri})}}return t},rebuildHubURI:function(t){for(let e in t.rt)if(e.endsWith(":Hub")){let i=null,a=null;for(let o in t.rt[e].pt)"http://id.loc.gov/ontologies/bfsimple/prefTitle"===t.rt[e].pt[o].propertyURI&&t.rt[e].pt[o].userValue&&t.rt[e].pt[o].userValue["http://id.loc.gov/ontologies/bfsimple/prefTitle"]&&t.rt[e].pt[o].userValue["http://id.loc.gov/ontologies/bfsimple/prefTitle"][0]&&t.rt[e].pt[o].userValue["http://id.loc.gov/ontologies/bfsimple/prefTitle"][0]["http://id.loc.gov/ontologies/bfsimple/prefTitle"]&&(i=t.rt[e].pt[o].userValue["http://id.loc.gov/ontologies/bfsimple/prefTitle"][0]["http://id.loc.gov/ontologies/bfsimple/prefTitle"]),"http://id.loc.gov/ontologies/bibframe/contribution"===t.rt[e].pt[o].propertyURI&&"http://id.loc.gov/ontologies/bflc/PrimaryContribution"===t.rt[e].pt[o].valueConstraint.valueDataType.dataTypeURI&&t.rt[e].pt[o].userValue&&t.rt[e].pt[o].userValue["http://id.loc.gov/ontologies/bibframe/agent"]&&t.rt[e].pt[o].userValue["http://id.loc.gov/ontologies/bibframe/agent"][0]&&t.rt[e].pt[o].userValue["http://id.loc.gov/ontologies/bibframe/agent"][0]["http://www.w3.org/2000/01/rdf-schema#label"]&&t.rt[e].pt[o].userValue["http://id.loc.gov/ontologies/bibframe/agent"][0]["http://www.w3.org/2000/01/rdf-schema#label"][0]&&t.rt[e].pt[o].userValue["http://id.loc.gov/ontologies/bibframe/agent"][0]["http://www.w3.org/2000/01/rdf-schema#label"][0]["http://www.w3.org/2000/01/rdf-schema#label"]&&(a=t.rt[e].pt[o].userValue["http://id.loc.gov/ontologies/bibframe/agent"][0]["http://www.w3.org/2000/01/rdf-schema#label"][0]["http://www.w3.org/2000/01/rdf-schema#label"]);if(i&&a){let o=this.returnAap(a,i),r=u(o),s=`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20,32)}`;t.rt[e].URI="http://id.loc.gov/resources/hubs/"+s}}return t},returnLiterals:function(t){let e={};for(let i in t.rt){e[i]||(e[i]=[]);for(let o in t.rt[i].pt){let r=t.rt[i].pt[o];if(["http://id.loc.gov/ontologies/bibframe/adminMetadata","http://id.loc.gov/ontologies/bibframe/identifiedBy","http://id.loc.gov/ontologies/bibframe/classification","http://id.loc.gov/ontologies/bibframe/seriesEnumeration","http://id.loc.gov/ontologies/bibframe/source","http://id.loc.gov/ontologies/bibframe/subject"].indexOf(r.propertyURI)>-1)continue;let s=r.userValue;r.userValue[r.propertyURI]&&r.userValue[r.propertyURI][0]&&(s=r.userValue[r.propertyURI][0]);
1for(let t in s)if(!(a["a"].literalLangOptions.ignorePtURIs.indexOf(t)>-1)){if("@id"===t)break;if(!t.startsWith("@"))if("string"===typeof s[t])e[i].push({rt:i,ptGuid:r["@guid"],ptLabel:r.propertyLabel,ptURI:r.propertyURI,userValueGuid:s["@guid"],propertyPath:[r.propertyURI,t],guid:s["@guid"],language:s["@language"]?s["@language"]:null,value:s[t]});else if(Array.isArray(s[t]))for(let o of s[t])for(let l in o)if(!(a["a"].literalLangOptions.ignorePtURIs.indexOf(l)>-1)){if("@id"===l)break;if(!l.startsWith("@"))if("string"===typeof o[l])e[i].push({rt:i,ptGuid:r["@guid"],ptLabel:r.propertyLabel,ptURI:r.propertyURI,userValueGuid:s["@guid"],propertyPath:[r.propertyURI,t,l],guid:o["@guid"],language:o["@language"]?o["@language"]:null,value:o[l]});else if(Array.isArray(o[l]))for(let n of o[l])for(let o in n)if(!(a["a"].literalLangOptions.ignorePtURIs.indexOf(o)>-1)){if("@id"===o)break;if(!o.startsWith("@"))if("string"===typeof n[o])e[i].push({rt:i,ptGuid:r["@guid"],ptLabel:r.propertyLabel,ptURI:r.propertyURI,userValueGuid:s["@guid"],propertyPath:[r.propertyURI,t,l,o],guid:n["@guid"],language:n["@language"]?n["@language"]:null,value:n[o]}),console.log("Found string! 3",n[o]);else if(Array.isArray(n[o])){console.log("lelvel 3!",n[o]);for(let c of n[o])for(let n in c)if(!(a["a"].literalLangOptions.ignorePtURIs.indexOf(n)>-1)){if("@id"===n)break;n.startsWith("@")||("string"===typeof c[n]?(console.log("Found string! 4",c[n]),e[i].push({rt:i,ptGuid:r["@guid"],ptLabel:r.propertyLabel,ptURI:r.propertyURI,userValueGuid:s["@guid"],propertyPath:[r.propertyURI,t,l,o,n],guid:c["@guid"],language:c["@language"]?c["@language"]:null,value:c[n]})):Array.isArray(c[n])&&console.warn("Trying to find literals, we're at level 4 and there are more levels, too deep hierachy",c[n]))}}}}}}}for(let i in e)e[i]=e[i].filter(t=>!/^\d+$/.test(t.value.trim())),e[i]=e[i].filter(t=>!/\d+\s+pages/.test(t.value.trim()));return e},setLangLiterals:function(t,e,i){for(let a in t.rt)for(let o in t.rt[a].pt){let r=t.rt[a].pt[o];if(r["@guid"]==e.ptGuid){console.log("Cjaging lang here:",r),console.log(i);let t=r.userValue;for(let a of e.propertyPath){console.log("Looking at",a);let o=!1;if(t[a]&&Array.isArray(t[a]))for(let n of t[a])n["@guid"]==e.guid?(n["@language"]===i?(l["a"].state.activeUndoLog.push(`Removing ${n["@language"]} language for ${s["a"].namespaceUri(r.propertyURI)}`),delete n["@language"]):(n["@language"]=i,l["a"].state.activeUndoLog.push(`Setting ${n["@language"]} language for ${s["a"].namespaceUri(r.propertyURI)}`)),o=!0):t=n;if(o)break}}}return t},returnAap:function(t,e){if(!t||!e)return!1;let i=`${t}${e}`;return i=i.trim(),i.endsWith(";")&&(i=i.slice(0,-1)),i=i.toLowerCase(),i=i.replace(/\s/g,""),i=i.replace(/[.,-]/g,""),i},returnUserValues:function(t,e,i,a,o){console.log(t,e,i,a,o);let r=!1;if(t.rt[e]&&t.rt[e].pt[i]){let a=t.rt[e].pt[i].userValue,s=a;for(let t of o){if("http://www.w3.org/2002/07/owl#sameAs"==t.propertyURI)break;if("http://www.loc.gov/mads/rdf/v1#componentList"==t.propertyURI)break;if(!s[t.propertyURI]||!s[t.propertyURI][0])break;s=s[t.propertyURI][0]}r=s}else console.warn("Trying to reference rt",e,"and pt",i,"but one or both not found.");return r},returnGuid:function(t,e,i){let a=!1;return Object.keys(t.rt).forEach(i=>{t.rt[i].pt[e]&&(a=t.rt[i].pt[e]["@guid"])}),a},returnRootPropertyURI:function(t,e,i){let a=!1;return Object.keys(t.rt).forEach(i=>{t.rt[i].pt[e]&&(a=t.rt[i].pt[e].propertyURI)}),a},suggestType:function(t,e){if(e){if(console.log("!!!!!!!!!!!!"),console.log(e),console.log(h.rtLookup[e]),console.log(h.rtLookup),h.rtLookup[e])for(let i of h.rtLookup[e].propertyTemplates)if(i.propertyURI==t&&i.valueConstraint.valueDataType&&i.valueConstraint.valueDataType.dataTypeURI)return i.valueConstraint.valueDataType.dataTypeURI}else for(let i in this.rtLookup)for(let e of h.rtLookup[i].propertyTemplates)if(e.propertyURI==t&&e.valueConstraint.valueDataType&&e.valueConstraint.valueDataType.dataTypeURI)return e.valueConstraint.valueDataType.dataTypeURI;return!1},suggestTypeImproved:async function(t,e){if(t==e.propertyURI&&e.valueConstraint&&e.valueConstraint.valueDataType&&e.valueConstraint.valueDataType.dataTypeURI&&""!=e.valueConstraint.valueDataType.dataTypeURI.trim())return e.valueConstraint.valueDataType.dataTypeURI.trim();if(e&&e.valueConstraint&&e.valueConstraint&&e.valueConstraint.valueTemplateRefs&&e.valueConstraint.valueTemplateRefs.length>0){let i=[];for(let o of e.valueConstraint.valueTemplateRefs)if(h.rtLookup[o])for(let e of h.rtLookup[o].propertyTemplates)e.propertyURI==t&&e.valueConstraint&&e.valueConstraint.valueDataType&&e.valueConstraint.valueDataType.dataTypeURI&&""!=e.valueConstraint.valueDataType.dataTypeURI.trim()&&i.push(e.valueConstraint.valueDataType.dataTypeURI.trim());else console.warn("Did not find the requested template name",o);if(console.log("possibleTypes1",i),i=[...new Set(i)],1==i.length)return i[0];let a=!1;if(e.userValue[e.propertyURI]&&e.userValue[e.propertyURI]&&e.userValue[e.propertyURI][0]&&e.userValue[e.propertyURI][0]["@type"]||(a=!0),a&&e&&e.valueConstraint&&e.valueConstraint&&e.valueConstraint.valueTemplateRefs&&e.valueConstraint.valueTemplateRefs.length>0){let t=e.valueConstraint.valueTemplateRefs[0];if(h.rtLookup[t])return h.rtLookup[t].resourceURI;console.warn("Did not find the requested template name",t)}}return!1}
1,suggestURI:function(t,e,i){if("bf:Item"===e)for(let a in t.rt)if(t.rt[a].URI==i){let e=t.rt[a].URI.replace("/instances/","/items/"),i=0;for(let a in t.rt)a.includes(":Item")&&i++;let o=String(i).padStart(4,"0");return e=e+"-"+o,e}if("bf:Instance"===e){let e=i.replace("/works/","/instances/"),a=0;for(let i in t.rt)i.includes(":Instance")&&(a++,t.rt.URI);return 0==a?e:e+"-"+String(a).padStart(4,"0")}},addItem:async function(t,e){let i,a;e.startsWith("http")||(e=t.rt[e].URI);for(let l in t.rt)if(l.includes(":Work"))for(let t in this.profiles)if(this.profiles[t].rtOrder.indexOf(l)>-1){if(i=this.profiles[t].rtOrder.filter(t=>t.includes(":Item"))[0],!i)continue;a=JSON.parse(JSON.stringify(this.profiles[t].rt[i]));break}let o=0,r=Object.keys(t.rt).filter(t=>t.includes(":Item"));o=r.length;for(let l of r)if(l.includes("-")){let t=parseInt(l.split("-")[1]);t>r.length&&(o=t)}o++;let s=i+"-"+o;a.isNew=!0,t.rt[s]=a,t.rtOrder.push(s),t.rt[s].URI=this.suggestURI(t,"bf:Item",e),t.rt[s].itemOf=e;for(let l in t.rt[s].pt)t.rt[s].pt[l]["@guid"]=n.generate();for(let l in t.rt)if(l.includes(":Instance")&&t.rt.URI==e)for(let e in t.rt[l].pt)"http://id.loc.gov/ontologies/bibframe/hasItem"==t.rt[l].pt[e].propertyURI&&(t.rt[l].pt[e].userValue["bf:hasItem"]||(t.rt[l].pt[e].userValue["bf:hasItem"]={URI:t.rt[s].URI,label:null}));let c={mandatory:!1,propertyLabel:"Admin Metadata",propertyURI:"http://id.loc.gov/ontologies/bibframe/adminMetadata",repeatable:!1,resourceTemplates:[],"@guid":n.generate(),type:"resource",userValue:{"@root":"http://id.loc.gov/ontologies/bibframe/adminMetadata","http://id.loc.gov/ontologies/bibframe/adminMetadata":[{"@type":"http://id.loc.gov/ontologies/bibframe/AdminMetadata","http://id.loc.gov/ontologies/bflc/catalogerId":[{"@guid":n.generate(),"http://id.loc.gov/ontologies/bflc/catalogerId":l["a"].state.catInitials}]}]},valueConstraint:{defaults:[],useValuesFrom:[],valueDataType:{},valueTemplateRefs:this.returnAdminMedataToUse(s)}},d="http://id.loc.gov/ontologies/bibframe/adminMetadata|Admin Metadata";return t.rt[s].pt[d]=JSON.parse(JSON.stringify(c)),t.rt[s].ptOrder.push(d),t=await this.populateDefaultValuesIntoUserValues(t,!0),t},deleteItem:function(t,e){for(let i in t.rt)if(t.rt[i].URI&&t.rt[i].URI==e){let e=[];e.push(i);for(let i of e)delete t.rt[i],t.rtOrder.splice(t.rtOrder.indexOf(i),1)}return t},duplicateItem:function(t,e){for(let i in t.rt)if(t.rt[i].URI&&t.rt[i].URI==e){let e=t.rt[i].itemOf,a=Object.keys(t.rt).filter(t=>t.includes(":Item")).length;i.includes("-")&&(a=parseInt(i.split("-")[1])),a++;let o=i.split("-")[0]+"-"+a;t.rt[o]=JSON.parse(JSON.stringify(t.rt[i]));for(let i in t.rt[o].pt)t.rt[o].pt[i]["@guid"]=n.generate();t.rtOrder.splice(t.rtOrder.indexOf(i),0,o),t.rt[o].URI=this.suggestURI(t,"bf:Item",e)}return t},deleteInstance:function(t,e){for(let i in t.rt)if(t.rt[i].URI&&t.rt[i].URI==e){let a=[];for(let i in t.rt)i.includes(":Item")&&t.rt[i].itemOf&&t.rt[i].itemOf==e&&a.push(i);a.push(i);for(let e of a)delete t.rt[e],t.rtOrder.splice(t.rtOrder.indexOf(e),1)}return t},addInstance:async function(t){let e,i,a;for(let l in t.rt)if(l.includes(":Work")){a=t.rt[l].URI;for(let t in this.profiles)this.profiles[t].rtOrder.indexOf(l)>-1&&(e=this.profiles[t].rtOrder.filter(t=>t.includes(":Instance"))[0],i=JSON.parse(JSON.stringify(this.profiles[t].rt[e])))}let o=0,r=Object.keys(t.rt).filter(t=>t.includes(":Instance"));for(let l of r)if(l.includes("-")){let t=parseInt(l.split("-")[1]);t>r.length&&(o=t)}o++;let s=e+"-"+o;i.isNew=!0,t.rt[s]=i,t.rtOrder.push(s);for(let l in t.rt[s].pt)t.rt[s].pt[l]["@guid"]=n.generate();t.rt[s].URI=this.suggestURI(t,"bf:Instance",a),t.rt[s].instanceOf=a;let c={mandatory:!1,propertyLabel:"Admin Metadata",propertyURI:"http://id.loc.gov/ontologies/bibframe/adminMetadata",repeatable:!1,resourceTemplates:[],"@guid":n.generate(),type:"resource",userValue:{"@root":"http://id.loc.gov/ontologies/bibframe/adminMetadata","http://id.loc.gov/ontologies/bibframe/adminMetadata":[{"@type":"http://id.loc.gov/ontologies/bibframe/AdminMetadata","http://id.loc.gov/ontologies/bflc/catalogerId":[{"@guid":n.generate(),"http://id.loc.gov/ontologies/bflc/catalogerId":l["a"].state.catInitials}],"http://id.loc.gov/ontologies/bibframe/identifiedBy":[{"@guid":n.generate(),"@type":"http://id.loc.gov/ontologies/bibframe/Local","http://www.w3.org/1999/02/22-rdf-syntax-ns#value":[{"@guid":n.generate(),"http://www.w3.org/1999/02/22-rdf-syntax-ns#value":t.rt[s].URI.split("/")[t.rt[s].URI.split("/").length-1]}]}]}]},valueConstraint:{defaults:[],useValuesFrom:[],valueDataType:{},valueTemplateRefs:this.returnAdminMedataToUse(s)}},d="http://id.loc.gov/ontologies/bibframe/adminMetadata|Admin Metadata";return t.rt[s].pt[d]=JSON.parse(JSON.stringify(c)),t.rt[s].ptOrder.push(d),t=
1await this.populateDefaultValuesIntoUserValues(t,!0),t},cloneInstance:function(t,e){for(let i in t.rt)if(t.rt[i].URI&&t.rt[i].URI==e){let a=t.rt[i].instanceOf,o=Object.keys(t.rt).filter(t=>t.includes(":Instance")).length;i.includes("-")&&(o=parseInt(i.split("-")[1])),o++;let r=i.split("-")[0]+"-"+o;t.rt[r]=JSON.parse(JSON.stringify(t.rt[i])),t.rtOrder.splice(t.rtOrder.indexOf(i),0,r);for(let e in t.rt[r].pt)t.rt[r].pt[e]["@guid"]=n.generate();t.rt[r].URI=this.suggestURI(t,"bf:Instance",a);for(let e in t.rt[r].pt)"http://id.loc.gov/ontologies/bibframe/adminMetadata"==t.rt[r].pt[e].propertyURI&&(t.rt[r].pt[e].userValue["http://id.loc.gov/ontologies/bibframe/adminMetadata"]||(t.rt[r].pt[e].userValue["http://id.loc.gov/ontologies/bibframe/adminMetadata"]=[{}]),t.rt[r].pt[e].userValue["http://id.loc.gov/ontologies/bibframe/adminMetadata"][0]["http://id.loc.gov/ontologies/bflc/catalogerId"]=[{"@guid":n.generate(),"http://id.loc.gov/ontologies/bflc/catalogerId":l["a"].state.catInitials}],t.rt[r].pt[e].userValue["http://id.loc.gov/ontologies/bibframe/adminMetadata"][0]["http://id.loc.gov/ontologies/bibframe/identifiedBy"]=[{"@guid":n.generate(),"@TEST":"HELLO","@type":"http://id.loc.gov/ontologies/bibframe/Local","http://www.w3.org/1999/02/22-rdf-syntax-ns#value":[{"@guid":n.generate(),"http://www.w3.org/1999/02/22-rdf-syntax-ns#value":t.rt[r].URI.split("/")[t.rt[r].URI.split("/").length-1]}]}]);for(let e in t.rt[r].pt)"http://id.loc.gov/ontologies/bibframe/hasItem"==t.rt[r].pt[e].propertyURI&&(t.rt[r].pt[e].userValue={});let s=[];for(let i in t.rt)i.includes(":Item")&&t.rt[i].itemOf&&t.rt[i].itemOf==e&&s.push(i);s.push(i);for(let e of s)delete t.rt[e],t.rtOrder.splice(t.rtOrder.indexOf(e),1)}return t},loadRecordFromBackend:async function(t){let e=await o["a"].loadSavedRecord(t),i=h.returnMetaFromSavedXML(e);r["a"].parse(i.xml);let a=null;if(this.profiles[i.profile]?a=JSON.parse(JSON.stringify(this.profiles[i.profile])):alert("Cannot find that profile:",i.profile),r["a"].hasItem>0){let t,e=i.rts.filter(t=>t.includes(":Instance"));if(e.length>0&&(t=e[0].replace(":Instance",":Item")),!t){let e=i.rts.filter(t=>t.includes(":Work"));e.length>0&&(t=e[0].replace(":Work",":Item"))}for(let i=0;i<r["a"].hasItem;i++)for(let e in this.profiles)for(let o in this.profiles[e].rt)if(o==t){let r=JSON.parse(JSON.stringify(this.profiles[e].rt[o]));a.rtOrder.push(t+"-"+i),a.rt[t+"-"+i]=r}}a.log||(a.log=[]),a.log.push({action:"loadInstanceFromSave",from:i.eid}),a.procInfo=i.procInfo,a.eId=i.eid,a.user=i.user,a.status=i.status;let s=await r["a"].transform(a);return s=this.reorderRTOrder(s),s},reorderRTOrder:function(t){let e={};for(let o of t.rtOrder)o.includes(":Item")&&(t.rt[o]&&t.rt[o].itemOf?e[o]=t.rt[o].itemOf:console.warn("Cannot find the itemOf of this item",o));let i=[],a=null;for(let o of t.rtOrder)if(o.includes(":Work")&&(a=o),o.includes(":Instance")){i.push(o);let a=t.rt[o].URI;for(let t in e)e[t]==a&&i.push(t)}a&&i.unshift(a);for(let o of t.rtOrder)-1===i.indexOf(o)&&(o.includes(":Hub")?i.unshift(o):i.push(o));return t.rtOrder=JSON.parse(JSON.stringify(i)),t},returnMetaFromSavedXML:function(t){let e=new DOMParser;t=e.parseFromString(t,"text/xml");let i=t.getElementsByTagName("void:DatasetDescription")[0],a=[];for(let c of i.getElementsByTagName("lclocal:rtsused"))a.push(c.innerHTML);let o=null;for(let c of i.getElementsByTagName("lclocal:eid"))o=c.innerHTML;let r=null;for(let c of i.getElementsByTagName("lclocal:status"))r=c.innerHTML;let s=null;for(let c of i.getElementsByTagName("lclocal:typeid"))s=c.innerHTML;let l=null;for(let c of i.getElementsByTagName("lclocal:procinfo"))l=c.innerHTML;let n=null;for(let c of i.getElementsByTagName("lclocal:user"))n=c.innerHTML;return i.remove(),t=(new XMLSerializer).serializeToString(t),{rts:a,xml:t,eid:o,status:r,profile:s,procInfo:l,user:n}},returnDiagramMiniMap:function(t){let e=!1,i=!1,a=[],o=0,r=0,s=0;for(let l of Object.keys(t.rt))t.rt[l].instanceOf&&(a.push({type:"Instance",URI:t.rt[l].URI,rt:l,counter:r,jumpTo:t.rt[l].ptOrder[1],details:t.rt[l].pt[t.rt[l].ptOrder[1]],items:[]}),r++),l.includes(":Work")&&(e={type:"Work",URI:t.rt[l].URI,rt:l,counter:o,jumpTo:t.rt[l].ptOrder[1],details:t.rt[l].pt[t.rt[l].ptOrder[1]],instances:[]},o++),l.endsWith(":Hub")&&(i={type:"Hub",URI:t.rt[l].URI,rt:l,counter:0,jumpTo:t.rt[l].ptOrder[1],details:t.rt[l].pt[t.rt[l].ptOrder[1]]});for(let l of a){l.parent=e.URI;let i=l.URI;
1for(let e of Object.keys(t.rt))t.rt[e].itemOf&&t.rt[e].itemOf==i&&l.items.push({type:"Item",parent:i,URI:t.rt[e].URI,rt:e,counter:s,jumpTo:t.rt[e].ptOrder[1],details:t.rt[e].pt[t.rt[e].ptOrder[1]]})}return e&&(e.instances=a),e&&i&&(i.work=e,i.instances=a),i||e},returnAdminMedataToUse:function(t){return t.includes(":GPO")?["lc:RT:bf2:GPOMono:AdminMetadata"]:["lc:RT:bf2:AdminMetadata:BFDB"]},userTemplatesValidate:function(t){if(!l["a"].state.profiles)return t;if(l["a"].state.profiles&&0==Object.keys(l["a"].state.profiles).length)return t;if(!t)return t;let e={};for(let i in l["a"].state.profiles)for(let t in l["a"].state.profiles[i].hashRts)e[t]=l["a"].state.profiles[i].hashRts[t];console.log("hashes",e);for(let i of t){let t=JSON.parse(i.profile);console.log(t);for(let a in t.hashRts){let o=a.split("-")[0];console.log("hash rtOrginal",o,e[o]),console.log("hash rt",a,t.hashRts[a]),e[o]!=t.hashRts[a]&&(i.invalid=!0)}}return t},loadNewTemplate(t,e,i){let a;"undefined"===typeof e&&(e=!1),a=i||JSON.parse(JSON.stringify(l["a"].state.profiles[t]));let o=[],r=[];for(let l of a.rtOrder)l.includes(":Work")||l.includes(":Item")||l.includes(":Instance")||l.includes(":Hub")?r.push(l):o.push(l);for(let l of o)delete a.rt[l];if(a.rtOrder=r,a.log||(a.log=[]),a.log.push({action:"createWorkInstance"}),a.procInfo="create work",!a.eId){let t="e"+d.new();t=t.substring(0,8),a.eId=t}a.user||(a.user=this.catInitials),a.status||(a.status="unposted");let s=null,u=c.toUUID(c.new());for(let l in a.rt){let t=null;l.endsWith(":Work")?(t="http://id.loc.gov/resources/works/"+u,s=t):t=l.endsWith(":Instance")?"http://id.loc.gov/resources/instances/"+u:l.endsWith(":Item")?"http://id.loc.gov/resources/items/"+c.toUUID(c.new()):l.endsWith(":Hub")?"http://id.loc.gov/resources/hubs/"+c.toUUID(c.new()):"http://id.loc.gov/resources/unknown/"+c.toUUID(c.new()),a.rt[l].URI=t;for(let e in a.rt[l].pt)"http://id.loc.gov/ontologies/bibframe/Work"==a.rt[l].pt[e].propertyURI&&(a.rt[l].pt[e].userValue={"@root":"http://id.loc.gov/ontologies/bibframe/Work","@guid":n.generate(),"@id":t})}for(let l in a.rt)l.includes(":Work")||(l.includes(":Instance")?a.rt[l].instanceOf=s:l.includes(":Item"));if(e)for(let l in a.rt){let t={mandatory:!1,propertyLabel:"Admin Metadata",propertyURI:"http://id.loc.gov/ontologies/bibframe/adminMetadata",repeatable:!1,resourceTemplates:[],"@guid":n.generate(),type:"resource",userValue:{"@root":"http://id.loc.gov/ontologies/bibframe/adminMetadata","http://id.loc.gov/ontologies/bibframe/adminMetadata":[{"@type":"http://id.loc.gov/ontologies/bibframe/AdminMetadata","@guid":n.generate(),"http://id.loc.gov/ontologies/bflc/catalogerId":[{"@guid":n.generate(),"http://id.loc.gov/ontologies/bflc/catalogerId":e}]}]},valueConstraint:{defaults:[],useValuesFrom:[],valueDataType:{},valueTemplateRefs:[l.includes(":GPO")?"lc:RT:bf2:GPOMono:AdminMetadata":"lc:RT:bf2:AdminMetadata:BFDB"]}},i="http://id.loc.gov/ontologies/bibframe/adminMetadata|Admin Metadata";a.rt[l].pt[i]?(console.log("Admin already exists for ",l,"chahhing userid"),a.rt[l].pt[i].userValue["http://id.loc.gov/ontologies/bibframe/adminMetadata"][0]["http://id.loc.gov/ontologies/bflc/catalogerId"]&&(a.rt[l].pt[i].userValue["http://id.loc.gov/ontologies/bibframe/adminMetadata"][0]["http://id.loc.gov/ontologies/bflc/catalogerId"]=[{"@guid":n.generate(),"http://id.loc.gov/ontologies/bflc/catalogerId":e}])):(console.log("Admin does not exists for ",l,"adding it"),a.rt[l].ptOrder.push(i),a.rt[l].pt[i]=JSON.parse(JSON.stringify(t)))}return a},prepareTemplate:async function(t,e){console.log(e),console.log(t),t=JSON.parse(JSON.stringify(t));let i={},o={};for(let a in l["a"].state.profiles)for(let t in l["a"].state.profiles[a].hashRts)i[t]=l["a"].state.profiles[a].hashRts[t],o[t]=l["a"].state.profiles[a].hashPts;delete t.eId,delete t.log,delete t.procInfo,delete t.status;for(let a in t.rt){delete t.rt[a].URI,delete t.rt[a].instanceOf,delete t.rt[a].propertyLoadRatio,delete t.rt[a].propertyLoadReport,delete t.rt[a].unusedXml,delete t.rt[a].status;let e=a.split("-")[0];t.hashRts[e]=i[e];for(let i in o[e])t.hashPts[i]=o[e][i]}let r={id:t.templateId?t.templateId:u(t.user+(new Date).toLocaleStr
1ing()),profile:JSON.stringify(t),user:t.user,label:t.templateLabel,basedOnProfile:Object.keys(t.rt),timestamp:parseInt(Date.now()/1e3)};e&&t.templateId&&(r.id=u(t.user+(new Date).toLocaleString()));let s=a["a"].returnUrls().util,n=s+"templates/";console.log("savedTemplate",r);const c=await fetch(n,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(r)});if(!c.ok){const t=await JSON.stringify(c.json());alert("Could not save template"+t)}}};e["a"]=h},de77:function(t,e,i){},e6fa:function(t,e,i){"use strict";var a=i("b642"),o=i.n(a);o.a},ef45:function(t,e,i){"use strict";var a=i("05d2"),o=i.n(a);o.a},f03c:function(t,e,i){"use strict";var a=i("1d4c"),o=i.n(a);o.a},f3ea:function(t,e,i){"use strict";var a=i("90ed"),o=i.n(a);o.a},f7e4:function(t,e,i){"use strict";var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticStyle:{position:"relative"}},[i("div",{staticStyle:{position:"absolute",right:"2em",top:"0.25em","z-index":"100"}},[i("button",{staticClass:"subjectEditorModeButtons simptip-position-left",staticStyle:{"margin-right":"1em","background-color":"black",height:"2em",display:"inline-flex"},attrs:{"data-tooltip":"Build LCSH headings using a lookup list"},on:{click:function(e){return t.editorModeSwitch("build")}}},[i("svg",{attrs:{fill:"#F2F2F2",width:"20px",height:"20px",version:"1.1",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"}},[i("g",[i("path",{attrs:{d:"m45.898 79.102h-38c-0.80078 0-1.5 0.69922-1.5 1.5v15.398c0 0.80078 0.69922 1.5 1.5 1.5h38c0.80078 0 1.5-0.69922 1.5-1.5v-15.398c-0.097657-0.80078-0.69922-1.5-1.5-1.5z"}}),i("path",{attrs:{d:"m92.199 79.102h-38c-0.80078 0-1.5 0.69922-1.5 1.5v15.398c0 0.80078 0.69922 1.5 1.5 1.5h38c0.80078 0 1.5-0.69922 1.5-1.5v-15.398c0-0.80078-0.69922-1.5-1.5-1.5z"}}),i("path",{attrs:{d:"m92.199 31.602h-38c-0.80078 0-1.5 0.69922-1.5 1.5v15.5c0 0.80078 0.69922 1.5 1.5 1.5h38c0.80078 0 1.5-0.69922 1.5-1.5v-15.5c0-0.90234-0.69922-1.5-1.5-1.5z"}}),i("path",{attrs:{d:"m7.8008 73.699h14.398c0.80078 0 1.5-0.69922 1.5-1.5v-15.398c0-0.80078-0.69922-1.5-1.5-1.5h-14.398c-0.80078 0-1.5 0.69922-1.5 1.5v15.5c0 0.80078 0.69922 1.3984 1.5 1.3984z"}}),i("path",{attrs:{d:"m30.5 73.699h39.102c0.80078 0 1.5-0.69922 1.5-1.5v-15.398c0-0.80078-0.69922-1.5-1.5-1.5h-39.102c-0.80078 0-1.5 0.69922-1.5 1.5v15.5c0 0.80078 0.69922 1.3984 1.5 1.3984z"}}),i("path",{attrs:{d:"m92.199 55.301h-14.398c-0.80078 0-1.5 0.69922-1.5 1.5v15.5c0 0.80078 0.69922 1.5 1.5 1.5h14.398c0.80078 0 1.5-0.69922 1.5-1.5v-15.5c0-0.80078-0.69922-1.5-1.5-1.5z"}}),i("path",{attrs:{d:"m24.199 26.199v15.199l-2.1016-2.1016c-0.80078-0.80078-2.1016-0.80078-3 0-0.80078 0.80078-0.80078 2.1016 0 3l5.6016 5.6016c0.39844 0.39844 0.89844 0.60156 1.5 0.60156 0.5 0 1.1016-0.19922 1.5-0.60156l5.6016-5.6016c0.80078-0.80078 0.80078-2.1016 0-3-0.80078-0.80078-2.1016-0.80078-3 0l-2.1016 2.1016v-15.199z"}}),i("path",{attrs:{d:"m7.8008 20.898h38c0.80078 0 1.5-0.69922 1.5-1.5v-15.398c0-0.80078-0.69922-1.5-1.5-1.5h-38c-0.80078 0-1.5 0.69922-1.5 1.5v15.5c0 0.69922 0.69922 1.3984 1.5 1.3984z"}})])]),i("span",{class:[{subjectEditorModeTextEnabled:"build"===t.subjectEditorMode}]},[t._v("Build Mode")])]),i("button",{staticClass:"subjectEditorModeButtons simptip-position-left",staticStyle:{"background-color":"black",height:"2em",display:"inline-flex"},attrs:{"data-tooltip":"Build LCSH headings by entering a MARC encoded string"},on:{click:function(e){return t.editorModeSwitch("link")}}},[i("svg",{attrs:{fill:"#F2F2F2",width:"20px",height:"20px",version:"1.1",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"}},[i("g",{attrs:{"fill-rule":"evenodd"}},[i("path",{attrs:{d:"m45.867 41.266-4.6016 4.6016c-4.6211-2.6719-10.633-2.0312-14.586 1.9219l-16.891 16.891c-4.7188 4.7188-4.7188 12.367 0 17.086l8.4453 8.4453c4.7188 4.7188 12.367 4.7188 17.086 0l16.891-16.891c3.9531-3.9531 4.5938-9.9648 1.9219-14.586l4.6016-4.6016c4.6211 2.6719 10.633 2.0312 14.586-1.9219l16.891-16.891c4.7188-4.7188 4.7188-12.367 0-17.086l-8.4453-8.4453c-4.7188-4.7188-12.367-4.7188-17.086 0l-16.891 16.891c-3.9531 3.9531-4.5938 9.9648-1.9219 14.586zm-6.6211 23.512-12.469 12.473-4.0273-4.0273 12.473-12.469zm6.7305-14.777 4.0234 4.0234 4.0234-4.0234-4.0234-4.0234zm31.273-23.223-12.473 12.469-4.0234-4.0234 12.469-12.473z"}}),i("path",{attrs:{d:"m23.484 27.902 4.418 4.418c1.2227 1.2227 3.1992 1.2227 4.4219 0 1.2188-1.2188 1.2188-3.1992 0-4.418l-4.4219-4.418c-1.2188-1.2227-3.1992-1.2227-4.418 0-1.2188 1.2188-1.2188 3.1992 0 4.418z"}}),i("path",{attrs:{d:"m76.516 72.098-4.418-4.418c-1.2188-1.2227-3.1992-1.2227-4.418 0-1.2227 1.2188-1.2227 3.1992 0 4.418l4.418 4.418c1.2188 1.2227 3.1992 1.2227 4.418 0 1.2227-1.2188 1.2227-3.1992 0-4.418z"}}),i("path",{attrs:{d:"m38.086 17.605 1.6172 6.0352c0.44531 1.668 2.1602 2.6562 3.8281 2.2109 1.6641-0.44531 2.6562-2.1602 2.207-3.8281l-1.6172-6.0352c-0.44531-1.668-2.1602-2.6562-3.8281-2.2109-1.6641 0.44531-2.6562 2.1602-2.207 3.8281z"}}),i("path",{attrs:{d:"m61.914 82.395-1.6172-6.0352c-0.44531-1.668-2.1602-2.6562-3.8281-2.2109-1.6641 0.44531-2.6562 2.1602-2.207 3.8281l1.61
172 6.0352c0.44531 1.668 2.1602 2.6562 3.8242 2.2109 1.668-0.44531 2.6562-2.1602 2.2109-3.8281z"}}),i("path",{attrs:{d:"m15.988 44.121 6.0352 1.6172c1.668 0.44531 3.3828-0.54297 3.8281-2.2109 0.44531-1.6641-0.54297-3.3789-2.2109-3.8242l-6.0352-1.6172c-1.668-0.44922-3.3828 0.54297-3.8281 2.207-0.44531 1.668 0.54297 3.3828 2.2109 3.8281z"}}),i("path",{attrs:{d:"m84.012 55.879-6.0352-1.6172c-1.668-0.44531-3.3828 0.54297-3.8281 2.2109-0.44922 1.6641 0.54297 3.3789 2.207 3.8242l6.0391 1.6172c1.6641 0.44922 3.3789-0.54297 3.8281-2.207 0.44531-1.668-0.54297-3.3828-2.2109-3.8281z"}})])]),i("span",{class:[{subjectEditorModeTextEnabled:"link"===t.subjectEditorMode}]},[t._v("Link Mode")])])]),"build"==t.subjectEditorMode?[i("div",{class:["subject-editor-container",{"subject-editor-container-lowres":t.lowResMode}]},[i("div",{class:["subject-editor-container-left",{"subject-editor-container-left-lowres":t.lowResMode}]},[i("div",{staticStyle:{position:"absolute",top:"0"},attrs:{id:"search-in-holder"}},[i("span",[t._v("Search In:")]),i("button",{class:["simptip-position-bottom",{active:"LCSHNAF"===t.searchMode}],attrs:{"data-tooltip":"Shortcut: CTRL+ALT+1"},on:{click:function(e){return t.searchModeSwitch("LCSHNAF")}}},[t._v("LCSH/NAF")]),i("button",{class:["simptip-position-bottom",{active:"GEO"===t.searchMode}],attrs:{"data-tooltip":"Shortcut: CTRL+ALT+2"},on:{click:function(e){return t.searchModeSwitch("GEO")}}},[t._v("Indirect Geo")]),i("button",{class:["simptip-position-bottom",{active:"WORKS"===t.searchMode}],attrs:{"data-tooltip":"Shortcut: CTRL+ALT+3"},on:{click:function(e){return t.searchModeSwitch("WORKS")}}},[t._v("Works")]),i("button",{class:["simptip-position-bottom",{active:"HUBS"===t.searchMode}],attrs:{"data-tooltip":"Shortcut: CTRL+ALT+4"},on:{click:function(e){return t.searchModeSwitch("HUBS")}}},[t._v("Hubs")])]),i("div",{staticStyle:{flex:"1","align-self":"flex-end"}},[!1!==t.activeSearch?i("div",[t._v(t._s(t.activeSearch))]):t._e(),null!==t.searchResults?i("div",[t.searchResults.names.length>0?i("div",[t._l(t.searchResults.names,(function(e,a){return i("div",{key:e.ur
1i,class:["fake-option",{unselected:t.pickPostion!=-1*(t.searchResults.names.length-a),selected:t.pickPostion==-1*(t.searchResults.names.length-a),picked:t.pickLookup[-1*(t.searchResults.names.length-a)]&&t.pickLookup[-1*(t.searchResults.names.length-a)].picked}],attrs:{"data-id":-1*(t.searchResults.names.length-a)},on:{click:function(e){t.selectContext(-1*(t.searchResults.names.length-a))},mouseover:function(e){t.loadContext(-1*(t.searchResults.names.length-a))}}},[e.suggestLabel.length>41?i("span",[t._v(t._s(e.suggestLabel.substring(0,41))+"...")]):i("span",[t._v(t._s(e.suggestLabel))]),i("span",[t._v(" [LCNAF]")])])})),i("hr")],2):t._e(),t.searchResults.subjectsComplex.length>0?i("div",[t._l(t.searchResults.subjectsComplex,(function(e,a){return i("div",{key:e.uri,class:["fake-option",{unselected:t.pickPostion!=a,selected:t.pickPostion==a,picked:t.pickLookup[a]&&t.pickLookup[a].picked}],attrs:{"data-id":a},on:{click:function(e){return t.selectContext(a)},mouseover:function(e){return t.loadContext(a)}}},[t._v(t._s(e.suggestLabel)),i("span")])})),i("hr")],2):t._e(),t.searchResults.subjectsSimple.length>0?i("div",t._l(t.searchResults.subjectsSimple,(function(e,a){return i("div",{key:e.ur
1i,class:["fake-option",{unselected:t.pickPostion!=t.searchResults.subjectsComplex.length+a,selected:t.pickPostion==t.searchResults.subjectsComplex.length+a,picked:t.pickLookup[t.searchResults.subjectsComplex.length+a]&&t.pickLookup[t.searchResults.subjectsComplex.length+a].picked,"literal-option":e.literal}],attrs:{"data-id":t.searchResults.subjectsComplex.length+a},on:{click:function(e){return t.selectContext(t.searchResults.subjectsComplex.length+a)},mouseover:function(e){return t.loadContext(t.searchResults.subjectsComplex.length+a)}}},[t._v(t._s(e.suggestLabel)),e.literal?i("span",[t._v(t._s(e.label))]):t._e(),t._v(" "),e.literal?i("span",[t._v("[Literal]")]):t._e()])})),0):t._e()]):t._e()]),i("div",{class:["subject-editor-container-right",{"subject-editor-container-right-lowres":t.lowResMode}]},[t.contextRequestInProgress?i("div",{staticStyle:{"font-weight":"bold"}},[t._v("Retrieving data...")]):t._e(),Object.keys(t.contextData).length>0?i("div",{staticClass:"modal-context",style:{}},[i("h3",[i("span",{staticClass:"modal-context-icon simptip-position-top",attrs:{"data-tooltip":"Type: "+t.contextData.type},domProps:{innerHTML:t._s(t.returnAuthIcon(t.contextData.type))}}),t._v(t._s(t.contextData.title))]),i("div",{staticClass:"modal-context-data-title"},[t._v(t._s(t.contextData.type))]),i("a",{staticStyle:{color:"#2c3e50"},attrs:{href:t.contextData.uri,target:"_blank"}},[t._v("view on id.loc.gov")]),t.contextData.variant&&t.contextData.variant.length>0?i("div",[i("div",{staticClass:"modal-context-data-title"},[t._v("Variants:")]),i("ul",t._l(t.contextData.variant,(function(e,a){return i("li",{key:"var"+a,staticClass:"modal-context-data-li"},[t._v(t._s(e))])})),0)]):t._e(),t._l(Object.keys(t.contextData.nodeMap),(function(e){return i("div",{key:e},[i("div",{staticClass:"modal-context-data-title"},[t._v(t._s(e)+":")]),i("ul",t._l(t.contextData.nodeMap[e],(function(e){return i("li",{key:e,staticClass:"modal-context-data-li"},[t._v(t._s(e))])})),0)])})),t.contextData.source&&t.contextData.source.length>0?i("div",[i("div",{staticClass:"modal-context-data-title"},[t._v("Sources:")]),i("ul",t._l(t.contextData.source,(function(e){return i("li",{key:e,staticClass:"modal-context-data-li"},[t._v(t._s(e))])})),0)]):t._e()],2):t._e()])]),i("div",{},[i("div",{staticClass:"component-container-fake-input"},[i("div",{staticStyle:{display:"flex"}},[i("div",{staticStyle:{flex:"1",position:"relative"}},[i("form",{staticStyle:{height:"3em"},attrs:{autocomplete:"off"}},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.subjectString,expression:"subjectString"}],ref:"subjectInput",staticClass:"input-single-subject subject-input",attrs:{placeholder:"Enter Subject Headings Here",autocomplete:"off",type:"text"},domProps:{value:t.subjectString},on:{keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.preventDefault(),t.navInput(e))},t.navInput],input:[function(e){e.target.composing||(t.subjectString=e.target.value)},t.subjectStringChanged],keyup:t.navString,click:t.navStringClick}})]),t._l(t.components,(function(e,a){return i("div",{key:a,ref:"cBackground"+a,refInFor:!0,class:["color-holder",{"color-holder-okay":null!==e.uri||e.literal},{"color-holder-type-okay":null!==e.type||!1===t.showTypes}]},[t._v(" "+t._s(e.label)+" ")])}))],2)])]),i("div",{ref:"toolbar",staticStyle:{display:"flex"}},[i("div",{staticStyle:{flex:"2"}},[t.showTypes?i("ol",{class:["type-list-ol",{"type-list-ol-lowres":t.lowResMode}]},t._l(t.activeTypes,(function(e){return i("li",{key:e.value,class:["type-item",{"type-item-selected":e.selected}],on:{click:function(i){return t.setTypeClick(i,e.value)}}},[t._v(t._s(e.label))])})),0):t._e()]),i("div",{staticStyle:{flex:"1"}},[t.lowResMode?i("button",{class:[{"add-button-lowres":t.lowResMode}],staticStyle:{float:"right",margin:"0.6em","background-color":"white",border:"solid 1px rgb(42,42,42)",color:"rgb(42,42,42)"},on:{click:t.closeEditor}},[t._v("Close")]):t._e(),1==t.okayToAdd?i("button",{class:[{"add-button-lowres":t.lowResMode}],staticStyle:{float:"right",margin:"0.6em"},on:{click:t.add}},[t._v("Add [SHIFT+Enter]")]):0==t.okayToAdd&&0==t.subjectString.length?
1i("button",{class:[{"add-button-lowres":t.lowResMode}],staticStyle:{float:"right",margin:"0.6em",display:"none"},attrs:{disabled:""}},[t._v("Can't Add")]):0==t.okayToAdd?i("button",{class:[{"add-button-lowres":t.lowResMode}],staticStyle:{float:"right",margin:"0.6em"},attrs:{disabled:""}},[t._v("Can't Add")]):t._e()])])])])]:[i("div",{staticStyle:{padding:"5px"}},[i("div",{staticClass:"component-container-fake-input",staticStyle:{"margin-top":"2em"}},[i("div",{staticStyle:{display:"flex"}},[i("div",{staticStyle:{flex:"1",position:"relative"}},[i("form",{staticStyle:{height:"3em"},attrs:{autocomplete:"off"}},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.linkModeString,expression:"linkModeString"}],ref:"subjectInput",staticClass:"input-single-subject subject-input",attrs:{placeholder:"Enter MARC encoded LCSH value",autocomplete:"off",type:"text"},domProps:{value:t.linkModeString},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.preventDefault(),t.linkModeTextChange(e))},input:function(e){e.target.composing||(t.linkModeString=e.target.value)}}})])])])]),t.linkModeSearching?t._e():i("ul",[!1===t.linkModeResults?i("li",[t._v("Enter MARC subject string above (with $ signs for subdivdion seperation) and press enter key")]):t._e()]),t.linkModeSearching?t._e():i("ol",[!1!==t.linkModeResults?[t.linkModeResults.resultType&&"COMPLEX"==t.linkModeResults.resultType?[i("li",[i("span",{class:{"link-mode-good-heading":t.linkModeResults.hit.uri,"link-mode-bad-heading":!t.linkModeResults.hit.uri}},[t._v(" "+t._s(t.linkModeResults.hit.label)+" ")]),t.linkModeResults.hit.heading&&t.linkModeResults.hit.heading.subdivision?i("span",{staticClass:"link-mode-subdivision"},[t._v("(subdivision)")]):t._e(),t.linkModeResults.hit.uri?i("a",{staticClass:"link-mode-good-heading-alink",attrs:{target:"_blank",href:t.linkModeResults.hit.uri}},[t._v(t._s(t.linkModeResults.hit.uri.split("/")[t.linkModeResults.hit.uri.split("/").length-1]))]):t._e()])]:t._l(t.linkModeResults.hit,(function(e,a){return i("li",{key:a},[i("span",{class:{"link-mode-good-heading":e.uri,"link-mode-bad-heading":!e.uri}},[t._v(" "+t._s(e.label)+" ")]),e.heading&&e.heading.subdivision?i("span",{staticClass:"link-mode-subdivision"},[t._v("(subdivision)")]):t._e(),e.uri?i("a",{staticClass:"link-mode-good-heading-alink",attrs:{target:"_blank",href:e.uri}},[t._v(t._s(e.uri.split("/")[e.uri.split("/").length-1]))]):t._e()])}))]:t._e()],2),t.linkModeResults&&t.linkModeResults.resultType&&"ERROR"==t.linkModeResults.resultType?i("span",{staticStyle:{color:"darkred"}},[t._v(t._s(t.linkModeResults.msg))]):t._e(),i("div",{staticStyle:{display:"flex"}},[i("div",{staticStyle:{flex:"2"}},[t.linkModeSearching?i("h1",[i("span",{attrs:{id:"loading-icon"}},[t._v("⟳")]),t._v(" Working...")]):t._e(),!1===t.linkModeSearching?i("button",{staticStyle:{"margin-right":"1em","margin-left":"2em"},on:{click:function(e){return t.linkModeTextChange({key:"Enter",shiftKey:!1})}}},[t._v("Link Components [Enter]")]):t._e(),!1!==t.linkModeResults?i("button",{on:{click:t.addLinkMode}},[t._v("Add Heading [SHIFT+Enter]")]):t._e()]),i("div",{staticStyle:{flex:"1"}},[i("button",{staticStyle:{float:"right","margin-right":"1em"},on:{click:t.closeEditor}},[t._v("Close")])])])])]],2)},o=[],r=(i("5319"),i("ddb0"),i("2f62")),s=i("8ad1"),l=i("adac");const n=(t,e)=>{let i=null;return(...a)=>{window.clearTimeout(i),i=window.setTimeout(()=>{t.apply(null,a)},e)}};var c={name:"TestSubject",components:{},data:function(){return{subjectString:"",components:[],lookup:{},searchResults:null,activeSearch:!1,pickPostion:0,pickLookup:{},activeComponent:null,oldActiveComponent:null,activeComponentIndex:0,oldActiveComponentIndex:99,contextRequestInProgress:!1,componetLookup:{},localContextCache:{},nextInputIsTypeSelection:!1,typeLookup:{},okayToAdd:!1,lowResMode:!1,searchMode:"LCSHNAF",linkModeString:"",linkModeResults:!1,linkModeSearching:!1,showTypes:!1,activeTypes:{"madsrdf:Topic":{label:"Topic / Heading ($a $x)",value:"madsrdf:Topic",selected:!1},"madsrdf:GenreForm":{label:"Genre ($v)",value:"madsrdf:GenreForm",selected:!1},"madsrdf:Geographic":{label:"Geographic ($z)",value:"madsrdf:Geographic",selected:!1},"madsrdf:Temporal":{label:"Chronological ($y)",value:"madsrdf:Temporal",selected:!1}}}},computed:Object(r["b"])({profilesLoaded:"profilesLoaded",activeProfile:"activeProfile",idWorkSearchResults:"idWorkSearchResults",rtLookup:"rtLookup",profiles:"profiles",idXML:"idXML",subjectEditorMode:"subjectEditorMode",contextData:"contextData"}),methods:{returnAuthIcon:s["a"].returnAuthIcon,linkModeTextChange:async function(t){return this.$refs.subjectInput.focus(),"Enter"===t.key&&!1===t.shiftKey?(console.log("Starting search"),this.linkModeResults=!1,this.linkModeSearching=!0,this.linkModeResults=await l["a"].subjectLinkModeResolveLCSH(this.linkModeString),this.linkModeSearching=!1,console.log(this.linkModeResults)):"Enter"===t.key&&!0===t.shiftKey&&this.addLinkMode(),t.preventDefault&&t.preventDefault(),!1},editorModeSwitch:function(t){this.$store.dispatch("subjectEditorMode",{self:this,mode:t}),this.$nextTick(()=>{this.$refs.subjectInput.focus()})},searchModeSwitch:function(t){this.searchMode=t,this.activeComponent&&this.activeComponent.label&&this.searchApis(this.activeComponent.label,this.subjectString,this),this.$refs.subjectInput.focus()},searchApis:n(async(t,e,i)=>{i.searchResults=null,i.x="Seaching...",i.pickPostion=0,t=t.trim().normalize(),e=e.trim().normalize();let a=window.setInterval(()=>{i.activeSearch=(i.activeSearch?i.activeSearch:"")+"."},100),o=window.setTimeout(()=>{window.clearInterval(a),i.activeSearch=!1},1e4);t=t.replaceAll("‑","-"),e=e.replaceAll("‑","-"),i.searchResults=await l["a"].subjectSearch(t,e,i.searchMode);for(let r of i.searchResults.names)r.labelOrginal=r.label,r.label=r.label.replaceAll("-","‑");for(let r of i.searchResults.subjectsComplex)r.labelOrginal=r.label,r.complex=!0,r.label=r.label.replaceAll("-","‑");for(let r of i.searchResults.subjectsSimple)r.suggestLabel&&r.suggestLabel.includes("(DEPRECATED")&&(r.suggestLabel=r.suggestLabel.split("(DEPRECATED")[0]+"(DEPRECATED)");for(let r of i.searchResults.hierarchicalGeographic)r.suggestLabel&&r.suggestLabel.includes(" (USE ")&&(r.suggestLabel=r.label);if("WORKS"==i.searchMode||"HUBS"==i.searchMode){for(let t of i.searchResults.subjectsSimple)t.suggestLabel&&t.suggestLabel.includes(" (USE ")&&(t.suggestLabel=t.label);for(let t of i.searchResults.subjectsComplex)t.suggestLabel&&t.suggestLabel.includes(" (USE ")&&(t.suggestLabel=t.label)}for(let r of i.searchResults.hierarchicalGeographic)r.labelOrginal=r.label,r.hierarchicalGeographic=!0,r.label=r.label.replaceAll("-","‑");i.searchResults.hierarchicalGeographic.length>0&&0==i.searchResults.subjectsComplex.length&&(i.searchResults.subjectsComplex=i.searchResults.hierarchicalGeographic),i.pickLookup={},i.pickPostion=i.searchResults.subjectsSimple.length+i.searchResults.subjectsComplex.length-1;for(let r in i.searchResults.subjectsComplex)i.pickLookup[r]=i.searchResults.subjectsComplex[r];for(let r in i.searchResults.subjectsSimple)i.pickLookup[parseInt(r)+parseInt(i.searchResults.subjectsComplex.length)]=i.searchResults.subjectsSimple[r];for(let r in i.searchResults.names)i.pickLookup[-1*(i.searchResults.names.length-r)]=i.searchResults.names[r];for(let r in i.pickLookup)if(i.pickLookup[r].picked=!1,t.toLowerCase()==i.pickLookup[r].label.toLowerCase()&&!i.pickLookup[r].literal)if(i.pickLookup[r].label.replaceAll("‑","-")==i.activeComponent.label.replaceAll("‑","-")&&i.activeComponent.uri)i.activeComponent.uri==i.pickLookup[r].uri&&
1(console.log("that.activeComponent",i.activeComponent),i.pickPostion=r,i.pickLookup[r].picked=!0,i.selectContext());else{if(i.subjectString.replaceAll("‑","-")!=e.replaceAll("‑","-"))break;if(i.pickLookup[r].label!=i.activeComponent.label)break;i.pickPostion=r,i.pickLookup[r].picked=!0,i.selectContext()}i.$store.dispatch("clearContext",{self:i}),i.pickLookup[i.pickPostion]&&!i.pickLookup[i.pickPostion].literal&&(i.contextRequestInProgress=!0,i.$store.dispatch("fetchContext",{self:i,searchPayload:i.pickLookup[i.pickPostion].uri}).then(()=>{i.contextRequestInProgress=!1,i.contextData&&(i.localContextCache[i.contextData.uri]=JSON.parse(JSON.stringify(i.contextData)))})),window.clearInterval(a),window.clearTimeout(o),i.activeSearch=!1,i.$nextTick(()=>{i.checkToolBarHeight();let t=1e3;for(let e of document.getElementsByClassName("fake-option"))e.offsetHeight<t&&0!=e.offsetHeight&&(t=e.offsetHeight);for(let e of document.getElementsByClassName("fake-option"))if(e.offsetHeight>t){let i=1.25;while(e.offsetHeight>t)if(i-=.01,e.style.fontSize=i+"em",i<=.01){e.style.fontSize="1.25em";break}}})},500),navStringClick:function(t){t.key="ArrowLeft",this.navString(t)},navString:function(t){if("ArrowLeft"==t.key||"ArrowRight"==t.key){t.target||(t={target:this.$refs.subjectInput});for(let e of this.components)if(t.target.selectionStart>=e.posStart&&t.target.selectionStart<=e.posEnd+1){this.activeComponent=e,this.activeComponentIndex=e.id;break}this.oldActiveComponentIndex!=this.activeComponentIndex?(this.updateAvctiveTypeSelected(),this.subjectStringChanged(t),this.oldActiveComponentIndex=this.activeComponentIndex):null===this.activeComponent.uri&&(this.updateAvctiveTypeSelected(),this.subjectStringChanged(t))}},loadContext:function(t){if(this.pickPostion=t,this.$store.dispatch("clearContext",{self:this}),this.pickLookup[this.pickPostion].literal)return!1;this.contextRequestInProgress=!0,this.$store.dispatch("fetchContext",{self:this,searchPayload:this.pickLookup[this.pickPostion].uri}).then(()=>{this.contextData&&(this.localContextCache[this.contextData.uri]=JSON.parse(JSON.stringify(this.contextData))),this.contextRequestInProgress=!1})},selectContext:function(t){if(t&&(this.pickPostion=t),this.pickLookup[this.pickPostion].complex){this.subjectString=this.pickLookup[this.pickPostion].label,this.activeComponentIndex=0,this.componetLookup={},this.componetLookup[this.activeComponentIndex]={},this.componetLookup[this.activeComponentIndex][this.pickLookup[this.pickPostion].label]=this.pickLookup[this.pickPostion];for(let t in this.pickLookup)this.pickLookup[t].picked=!1;this.typeLookup[this.activeComponentIndex]="madsrdf:Topic",this.pickLookup[this.pickPostion].picked=!0,this.subjectStringChanged(),this.$refs.subjectInput.focus()}else{console.log("1",JSON.parse(JSON.stringify(this.componetLookup)));let t=this.subjectString.split("--");t[this.activeComponentIndex]=this.pickLookup[this.pickPostion].label.replaceAll("-","‑"),this.subjectString=t.join("--"),this.componetLookup[this.activeComponentIndex]||(this.componetLookup[this.activeComponentIndex]={}),this.componetLookup[this.activeComponentIndex][this.pickLookup[this.pickPostion].label.replaceAll("-","‑")]=this.pickLookup[this.pickPostion];for(let e in this.pickLookup)this.pickLookup[e].picked=!1;this.pickLookup[this.pickPostion].picked=!0,console.log("2",JSON.parse(JSON.stringify(this.componetLookup))),this.subjectStringChanged()}},navInput:function(t){if("ArrowUp"==t.key)return parseInt(this.pickPostion)<=-1*this.searchResults.names.length||(this.loadContext(parseInt(this.pickPostion)-1),t.preventDefault()),!1;if("ArrowDown"==t.key)return parseInt(this.pickPostion)>=this.searchResults.subjectsSimple.length-1+this.searchResults.subjectsComplex.length||(this.loadContext(parseInt(this.pickPostion)+1),t.preventDefault()),!1;if("Enter"==t.key){if(t.shiftKey)return void this.add();this.selectContext()}else if(t.ctrlKey&&"1"==t.key)this.searchModeSwitch("LCSHNAF");else if(t.ctrlKey&&"2"==t.key)this.searchModeSwitch("GEO");else if(t.ctrlKey&&"3"==t.key)this.searchModeSwitch("WORKS");else if("GEO"==this.searchMode&&"-"==t.key){if(this.components.length>0){let t=this.components[this.components.length-1];if(console.log(t),t.uri)return!0;
1if("-"==this.subjectString.slice(-1))return!0}let e=t.target.selectionStart,i=t.target.selectionEnd;return console.log(this.subjectString.substring(0,e),"|",this.subjectString.substring(i,this.subjectString.length)),this.subjectString=this.subjectString.substring(0,e)+"‑"+this.subjectString.substring(i,this.subjectString.length),this.subjectString=this.subjectString.trim(),this.$nextTick(()=>{console.log(e,i),t.target.setSelectionRange(e+1,i+1)}),this.subjectStringChanged(),t.preventDefault(),!1}},updateAvctiveTypeSelected:function(){for(let t in this.activeTypes)this.activeTypes[t].selected=!1;this.activeComponent&&this.activeComponent.type&&this.activeTypes[this.activeComponent.type]&&(this.activeTypes[this.activeComponent.type].selected=!0)},setTypeClick:function(t,e){this.typeLookup[this.activeComponentIndex]=e,this.subjectStringChanged(),this.$refs.subjectInput.focus()},renderHintBoxes:function(){this.$nextTick(()=>{let t=0;for(let e of this.components)this.$refs["cBackground"+e.id]&&this.$refs["cBackground"+e.id][0]&&(this.$refs["cBackground"+e.id][0].style.left=t+"px",t=t+this.$refs["cBackground"+e.id][0].offsetWidth+11)})},validateOkayToAdd:function(){this.okayToAdd=!1;let t=!0,e=!0;for(let i of this.components)i.uri||i.literal||(t=!1),i.type||(e=!1);t&&e&&(this.okayToAdd=!0),t&&!e&&1==this.components.length&&(this.okayToAdd=!0)},subjectStringChanged:async function(t){if(t&&"$"===t.data)return this.nextInputIsTypeSelection=!0,!1;t&&this.nextInputIsTypeSelection?("a"!==t.data.toLowerCase()&&"x"!==t.data.toLowerCase()||(this.typeLookup[this.activeComponentIndex]="madsrdf:Topic",this.subjectString=this.subjectString.replace("$"+t.data,"")),"v"===t.data.toLowerCase()&&(this.typeLookup[this.activeComponentIndex]="madsrdf:GenreForm",this.subjectString=this.subjectString.replace("$"+t.data,"")),"z"===t.data.toLowerCase()&&(this.typeLookup[this.activeComponentIndex]="madsrdf:Geographic",this.subjectString=this.subjectString.replace("$"+t.data,"")),"y"===t.data.toLowerCase()&&(this.typeLookup[this.activeComponentIndex]="madsrdf:Temporal",this.subjectString=this.subjectString.replace("$"+t.data,"")),this.nextInputIsTypeSelection=!1,this.subjectStringChanged()):t&&(this.searchResults=null),this.showTypes=!0,0==this.subjectString.length&&(this.activeComponent=null,this.activeComponentIndex=0,this.componetLookup={},this.typeLookup={});let e=this.subjectString.split("--");this.components=[];let i=0,a=0;for(let o of e){let t=null,e=null,r=null;this.componetLookup[i]&&this.componetLookup[i][o]&&(t=this.componetLookup[i][o].uri,r=this.componetLookup[i][o].literal),this.typeLookup[i]&&(e=this.typeLookup[i]),this.components.push({label:o,uri:t,id:i,type:e,complex:o.includes("‑"),literal:r,posStart:a,posEnd:a+o.length-1}),a=a+o.length+2,this.renderHintBoxes(),i++}if(t){for(let o of this.components)if(t.target.selectionStart>=o.posStart&&t.target.selectionStart<=o.posEnd+1){this.activeComponent=o,this.activeComponentIndex=o.id,""==o.label.trim()||o.label.endsWith("-")?(/[0-9]{4}\??-/.test(o.label)||/,\s[0-9]{4}-/.test(o.label))&&this.searchApis(o.label,t.target.value,this):this.searchApis(o.label,t.target.value,this);break}}else this.activeComponent=this.components[this.activeComponentIndex];this.updateAvctiveTypeSelected(),1==this.components.length&&this.components[0].complex&&(this.showTypes=!1),this.validateOkayToAdd(),this.$nextTick(()=>{this.checkToolBarHeight(),window.setTimeout(()=>{for(let t of this.components)this.localContextCache[t.uri]&&(this.localContextCache[t.uri].nodeMap&&this.localContextCache[t.uri].nodeMap["MADS Collection"]&&this.localContextCache[t.uri].nodeMap["MADS Collection"].includes("GeographicSubdivisions")&&(t.type="madsrdf:Geographic"),"GenreForm"===this.localContextCache[t.uri].type&&(t.type="madsrdf:GenreForm"),"Temporal"===this.localContextCache[t.uri].type&&(t.type="madsrdf:Temporal"),"Geographic"===this.localContextCache[t.uri].type&&(t.type="madsrdf:Geographic"),"Topic"===this.localContextCache[t.uri].type&&(t.type="madsrdf:Topic"));this.components[0].type="madsrdf:Topic",this.updateAvctiveTypeSelected(),this.validateOkayToAdd()},100)})},addLinkMode:function(){let t=[];if(console.log(this.linkModeResults),this.linkModeResults)if(this.linkModeResults.resultType&&"COMPLEX"===this.linkModeResults.resultType)t.push({complex:!0,id:0,label:this.linkModeResults.hit.label,literal:!1,posEnd:0,posStart:0,type:"madsrdf:Topic",uri:this.linkModeResults.hit.uri});else for(const[e,i]of this.linkModeResults.hit.entries())t.push({complex:!1,id:e,label:i.label,literal:i.literal,posEnd:0,posStart:0,type:i.heading.rdfType.replace("http://www.loc.gov/mads/rdf/v1#","madsrdf:"),uri:i.uri});console.log("sendResults",t),this.$emit("subjectAdded",t),console.log("ADDDD")},add:function(){console.log("this.components",this.components);for(let t of this.components)t.label=t.label.replaceAll("‑","-"),t.uri&&t.uri.includes("id.loc.gov/authorities/names/")&&this.localContextCache&&this.localContextCache[t.ur
1i]&&(t.type=this.localContextCache[t.uri].typeFull.replace("http://www.loc.gov/mads/rdf/v1#","madsrdf:"));console.log(this.localContextCache),console.log(this.components),this.$emit("subjectAdded",this.components)},closeEditor:function(){this.$emit("closeEditor",!0)},checkToolBarHeight:function(){this.$refs.toolbar&&this.$refs.toolbar.getBoundingClientRect().bottom>window.innerHeight&&(this.lowResMode=!0,this.$emit("lowResModeActivate",!0))},loadUserValue:function(t){if(this.components=[],this.lookup={},this.searchResults=null,this.activeSearch=!1,this.pickPostion=0,this.pickLookup={},this.activeComponent=null,this.oldActiveComponent=null,this.activeComponentIndex=0,this.oldActiveComponentIndex=99,this.contextRequestInProgress=!1,this.componetLookup={},this.nextInputIsTypeSelection=!1,this.typeLookup={},this.okayToAdd=!1,this.showTypes=!1,!t)return;if("string"==typeof t)return"."==t.slice(-1)&&(t=t.slice(0,-1)),this.subjectString=t,this.linkModeString=t,void this.$nextTick(()=>{this.navString({key:"ArrowRight"})});t["http://id.loc.gov/ontologies/bibframe/subject"]&&t["http://id.loc.gov/ontologies/bibframe/subject"][0]&&(t=t["http://id.loc.gov/ontologies/bibframe/subject"][0]);let e=null,i="";if(t["http://www.loc.gov/mads/rdf/v1#componentList"]){let a=[],o=[];t["http://www.w3.org/2000/01/rdf-schema#label"]?t["http://www.w3.org/2000/01/rdf-schema#label"].length>0&&(a=t["http://www.w3.org/2000/01/rdf-schema#label"][0]["http://www.w3.org/2000/01/rdf-schema#label"].split("--"),e=t["http://www.w3.org/2000/01/rdf-schema#label"][0]["http://www.w3.org/2000/01/rdf-schema#label"]):t["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"]&&t["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"].length>0&&(a=t["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"][0]["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"].split("--"),e=t["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"][0]["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"]);let r=0,s=0;console.log("userValue['http://www.loc.gov/mads/rdf/v1#componentList']",t["http://www.loc.gov/mads/rdf/v1#componentList"]);for(let e of t["http://www.loc.gov/mads/rdf/v1#componentList"]){let t="",l=null,n=null,c="",d=!1;e["@id"]&&(l=e["@id"]),e["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"]&&e["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"].length>0?e["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"][0]["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"]&&(t=e["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"][0]["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"]):e["http://www.w3.org/2000/01/rdf-schema#label"]&&e["http://www.w3.org/2000/01/rdf-schema#label"].length>0&&e["http://www.w3.org/2000/01/rdf-schema#label"][0]["http://www.w3.org/2000/01/rdf-schema#label"]&&(t=e["http://www.w3.org/2000/01/rdf-schema#label"][0]["http://www.w3.org/2000/01/rdf-schema#label"]),e["@type"]&&("http://www.loc.gov/mads/rdf/v1#Geographic"==e["@type"]&&(n="madsrdf:Geographic",c="z"),"http://www.loc.gov/mads/rdf/v1#Topic"==e["@type"]&&(n="madsrdf:Topic",c="a",r>0&&(c="x")),"http://www.loc.gov/mads/rdf/v1#GenreForm"==e["@type"]&&(n="madsrdf:GenreForm",c="v"),"http://www.loc.gov/mads/rdf/v1#Temporal"==e["@type"]&&(n="madsrdf:Temporal",c="y")),""==t&&a[r]&&(t=a[r]),i=i+"$"+c+t;let u={label:t,uri:l,id:r,type:n,complex:t.includes("‑"),literal:d,posStart:s,posEnd:s+t.length-1};o.push(t),this.components.push(u),this.componetLookup[r]||(this.componetLookup[r]={}),n&&(this.typeLookup[r]=n),this.componetLookup[r][t]=u,s=s+t.length+2,r++}e=o.join("--")}else t["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"]?e=t["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"][0]["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"]:t["http://www.w3.org/2000/01/rdf-schema#label"]&&(e=t["http://www.w3.org/2000/01/rdf-schema#label"][0]["http://www.w3.org/2000/01/rdf-schema#label"]),"."==e.slice(-1)&&(e=e.slice(0,-1)),i="$a"+e;console.log("linkModeValue",i),this.linkModeString=i,this.subjectString=e,this.$nextTick(()=>{this.navString({key:"ArrowRight"})})}},created:function(){this.loadUserValue()},mounted:function(){}},d=c,u=(i("19b4"),i("2877")),p=Object(u["a"])(d,a,o,!1,null,null,null);e["a"]=p.exports}
1,fa61:function(t,e,i){},fea3:function(t,e,i){}});
2//# sourceMappingURL=app.3bdb16ad.js.map

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.