solid-shim 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ "use strict";(this.webpackChunkMashlib=this.webpackChunkMashlib||[]).push([[103],{8362(t,e,n){n.r(e),n.d(e,{default:()=>d});var i=n(3383),a=n(9676);const r=i.ns,o={card:"\n font-family: sans-serif;\n display: flex;\n flex-wrap: wrap;\n border-radius: 4px;\n flex-direction: column;\n justify-content: center;\n padding: 1em;\n box-shadow: 0 1px 5px rgba(0,0,0,0.2);\n transition: all .25s ease-in-out;\n max-width: 632px;\n ",content:"\n font-size: larger;\n margin: 0.5em 0;\n ",date:"\n color: rgba(0, 0, 0, 0.6);\n margin: 0.5em 0;\n ",attribution:"\n display: flex;\n align-items: center;\n font-weight: bold;\n ",attributionLink:"\n color: black;\n text-decoration: none;\n ",attributionImage:"\n margin-right: 5px;\n width: 47px;\n height: 47px;\n border-radius: 5px;\n object-fit: cover;\n "};function s(t){if(!t)return null;const e=t.toLocaleDateString(void 0,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"});return`${function(t){const e=Math.floor((new Date-t)/1e3),n=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"week",seconds:604800},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60}];for(const t of n){const n=Math.floor(e/t.seconds);if(n>=1)return`${n} ${t.label}${n>1?"s":""} ago`}return"just now"}(t)} · ${e}`}function u(t,e){const n=t.anyValue(e,r.as("image"));return n?t.anyValue((0,a.sym)(n),r.as("url"))||null:t.anyValue(e,r.foaf("img"))||t.anyValue(e,r.vcard("hasPhoto"))||null}function l(t,e){const n=t.any(e,r.as("attributedTo"));if(!n||!n.uri)return{type:"none"};if(function(t,e){const n=t.findTypeURIs(e);return n[r.as("Person").uri]||n[r.foaf("Person").uri]||n[r.vcard("Individual").uri]||n[r.schema("Person").uri]}(t,n)){const e=t.anyValue(n,r.as("name"))||t.anyValue(n,r.foaf("name"))||t.anyValue(n,r.vcard("fn"))||t.anyValue(n,r.schema("name"))||"";return{type:"person",webId:n.uri,name:e,imageSrc:u(t,n)}}return{type:"link",uri:n.uri}}function c(t,e){const n=t.createElement("div");n.setAttribute("style",o.card),n.appendChild(function(t,e){const n=t.createElement("div");if(n.setAttribute("style",o.attribution),"none"===e.type)return n;if("link"===e.type){const i=t.createElement("a");return i.setAttribute("href",e.uri),i.setAttribute("style",o.attributionLink),i.textContent=e.uri,n.appendChild(i),n}if("person"===e.type){if(e.imageSrc){const i=t.createElement("img");i.setAttribute("src",e.imageSrc),i.setAttribute("alt",e.name),i.setAttribute("style",o.attributionImage),n.appendChild(i)}const i=t.createElement("a");i.setAttribute("href",e.webId),i.setAttribute("style",o.attributionLink),i.textContent=e.name||e.webId,i.addEventListener("mouseover",()=>{i.style.textDecoration="underline"}),i.addEventListener("mouseout",()=>{i.style.textDecoration="none"}),n.appendChild(i)}return n}(t,e.attribution));const i=t.createElement("p");if(i.setAttribute("style",o.content),i.textContent=e.content,n.appendChild(i),e.published){const i=t.createElement("p");i.setAttribute("style",o.date),i.textContent=s(e.published),n.appendChild(i)}return n}const d={icon:i.icons.iconBase+"noun_15695.svg",name:"activitystreams",label:function(t,e){return e.session.store.findTypeURIs(t)[r.as("Note").uri]?"Note":null},render:function(t,e){const n=e.dom,i=e.session.store,o=n.createElement("div"),s=function(t,e){const n=t.any(e,r.as("content")),i=t.any(e,r.as("published"));return n?{content:n.value,published:i?new Date(i.value):null,attribution:l(t,e)}:null}(i,t);if(!s){const t=n.createElement("p");return t.textContent="Unable to read note content.",o.appendChild(t),o}if(o.appendChild(c(n,s)),"link"===s.attribution.type){const e=(0,a.sym)(s.attribution.uri);i.fetcher.load(e).then(()=>{const e=l(i,t);"person"===e.type&&(s.attribution=e,o.innerHTML="",o.appendChild(c(n,s)))}).catch(()=>{})}return o}}}}]);
2
+ //# sourceMappingURL=103.mashlib.min.js.map
@@ -0,0 +1,2 @@
1
+ (this.webpackChunkMashlib=this.webpackChunkMashlib||[]).push([[140],{8100(e){e.exports&&(e.exports=function(e,t){if(void 0===s)var s=t.dom;var n=s.querySelectorAll(e),i={init:function(e,t){this.counter=0,this.el=e,this.$items=e.querySelectorAll("figure"),this.numItems=this.$items.length,(t=t||{}).auto=t.auto||!1,this.opts={auto:void 0!==t.auto&&t.auto,speed:void 0===t.auto.speed?1500:t.auto.speed,pauseOnHover:void 0!==t.auto.pauseOnHover&&t.auto.pauseOnHover,fullScreen:void 0!==t.fullScreen&&t.fullScreen,swipe:void 0!==t.swipe&&t.swipe},this.$items[0].classList.add("bss-show"),this.injectControls(e),this.addEventListeners(e),this.opts.auto&&this.autoCycle(this.el,this.opts.speed,this.opts.pauseOnHover),this.opts.fullScreen&&this.addFullScreen(this.el),this.opts.swipe&&this.addSwipe(this.el)},showCurrent:function(e){this.counter=e>0?this.counter+1===this.numItems?0:this.counter+1:this.counter-1<0?this.numItems-1:this.counter-1,[].forEach.call(this.$items,function(e){e.classList.remove("bss-show")}),this.$items[this.counter].classList.add("bss-show")},injectControls:function(e){var t=s.createElement("span"),n=s.createElement("span"),i=s.createDocumentFragment();t.classList.add("bss-prev"),n.classList.add("bss-next"),t.innerHTML="&laquo;",n.innerHTML="&raquo;",i.appendChild(t),i.appendChild(n),e.appendChild(i)},addEventListeners:function(e){var t=this;e.querySelector(".bss-next").addEventListener("click",function(){t.showCurrent(1)},!1),e.querySelector(".bss-prev").addEventListener("click",function(){t.showCurrent(-1)},!1),e.onkeydown=function(e){37===(e=e||window.event).keyCode?t.showCurrent(-1):39===e.keyCode&&t.showCurrent(1)}},autoCycle:function(e,t,s){var n=this,i=window.setInterval(function(){n.showCurrent(1)},t);s&&(e.addEventListener("mouseover",function(){i=clearInterval(i)},!1),e.addEventListener("mouseout",function(){i=window.setInterval(function(){n.showCurrent(1)},t)},!1))},addFullScreen:function(e){var t=this,n=s.createElement("span");n.classList.add("bss-fullscreen"),e.appendChild(n),e.querySelector(".bss-fullscreen").addEventListener("click",function(){t.toggleFullScreen(e)},!1)},addSwipe:function(e){var t=this,s=new Hammer(e);s.on("swiperight",function(e){t.showCurrent(-1)}),s.on("swipeleft",function(e){t.showCurrent(1)})},toggleFullScreen:function(e){s.fullscreenElement||s.mozFullScreenElement||s.webkitFullscreenElement||s.msFullscreenElement?s.exitFullscreen?s.exitFullscreen():s.msExitFullscreen?s.msExitFullscreen():s.mozCancelFullScreen?s.mozCancelFullScreen():s.webkitExitFullscreen&&s.webkitExitFullscreen():s.documentElement.requestFullscreen?e.requestFullscreen():s.documentElement.msRequestFullscreen?e.msRequestFullscreen():s.documentElement.mozRequestFullScreen?e.mozRequestFullScreen():s.documentElement.webkitRequestFullscreen&&e.webkitRequestFullscreen(e.ALLOW_KEYBOARD_INPUT)}};[].forEach.call(n,function(e){Object.create(i).init(e,t)})})},9698(e,t,s){"use strict";s.r(t),s.d(t,{slideshowPane:()=>r});var n=s(3383),i=s(8100),o=s.n(i);const l=n.ns,r={icon:n.icons.iconBase+"noun_138712.svg",name:"slideshow",audience:[l.solid("PowerUser")],label:function(e,t){const s=t.session.store,i=n.ns,o=s.findTypeURIs(e);if(o[i.ldp("Container").uri]||o[i.ldp("BasicContainer").uri]){const t=s.each(e,i.ldp("contains"));let o=0;return t.forEach(function(e){n.widgets.isImage(e)&&o++}),o>0?"Slideshow":null}return null},render:function(e,t){const s=t.dom;n.widgets.addStyleSheet(s,"https://leemark.github.io/better-simple-slideshow/css/simple-slideshow-styles.css");const i=t.session.store,l=n.ns,r=s.createElement("div");r.setAttribute("class","bss-slides");const c=i.findTypeURIs(e);let u;(c[l.ldp("BasicContainer").uri]||c[l.ldp("Container").uri])&&(u=l.ldp("contains"));const a=i.each(e,u);a.sort();for(let e=0;e<a.length;e++){if(!n.widgets.isImage(a[e]))continue;const t=r.appendChild(s.createElement("figure")),o=t.appendChild(s.createElement("img"));i.fetcher._fetch(a[e].uri).then(function(e){return e.blob()}).then(function(e){const t=URL.createObjectURL(e);o.setAttribute("src",t)}),o.setAttribute("width","100%"),t.appendChild(s.createElement("figcaption"))}const d={dom:s};return setTimeout(function(){o()(".bss-slides",d)},1e3),r}}}}]);
2
+ //# sourceMappingURL=140.mashlib.min.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";(this.webpackChunkMashlib=this.webpackChunkMashlib||[]).push([[156],{3320(t,e,n){n.r(e),n.d(e,{default:()=>s});var i=n(3383),r=n(9676),o=n(3581);const a=i.ns,s={icon:i.icons.iconBase+"noun_106746.svg",name:"transaction",audience:[a.solid("PowerUser")],label:function(t,e){const n=e.session.store,r=n.findTypeURIs(t);return r["http://www.w3.org/2000/10/swap/pim/qif#Transaction"]?"$$":n.any(t,i.ns.qu("amount"))?"$$$":r["http://www.w3.org/ns/pim/trip#Trip"]?"Trip $":null},render:function(t,e){const n=e.dom,s=e.session.store,l=s.fetcher,c=o.A("http://www.w3.org/2000/10/swap/pim/qif#"),d=o.A("http://www.w3.org/ns/pim/trip#"),p=n.createElement("div");p.setAttribute("class","transactionPane");const u=function(t){return function(t,e){void 0===e&&(e="color: grey");const i=n.createElement("pre");i.setAttribute("style",e),p.appendChild(i),i.appendChild(n.createTextNode(t))}(t,"color: #100; background-color: #fee")},h=s.statementsMatching(t),f=s.statementsMatching(void 0,void 0,t),m=s.findTypeURIs(t),g={},y=function(t){g[t.uri]=!0},w=function(t){if(void 0===t)return"";const e=""+t;return e.indexOf(".")>=0?e.split(".")[0]+"."+(e.split(".")[1]+"00").slice(0,2):e+".00"},b=function(t,e){const i=n.createElement("td");return 0+t===0&&e||(i.textContent=w(t)),i.setAttribute("style","width: 6em; text-align: right; "),i},C=function(t){const e=n.createElement("th");return e.textContent=t,e.setAttribute("style","text-align: right; "),e},v=function(t,e){const n=s.any(t,a.qu("date")),i=s.any(e,a.qu("date"));if(void 0!==n&&void 0!==i){if(n.value<i.value)return-1;if(n.value>i.value)return 1}return t.uri<e.uri?-1:t.uri>e.uri?1:0},E=function(t,n,i,r,o){n.expanded?(n.parentNode.removeChild(n.expanded),n.expanded=!1):function(t,n,i,r,o){const a=n.parentNode.children;if(o)for(let t=a.length-1;t>=0;t--)a[t].expanded&&(a[t].parentNode.removeChild(a[t].expanded),a[t].expanded=!1);const s=t.createElement("tr"),l=s.appendChild(t.createElement("td"));l.setAttribute("style","width: 98%; padding: 1em; border: 0.1em solid grey;");const c=n.children.length;n.nextSibling?n.parentNode.insertBefore(s,n.nextSibling):n.parentNode.appendChild(s),n.expanded=s,l.setAttribute("colspan",""+c),l.appendChild(function(t,e,n){const i=t.session.paneRegistry.byName(n).render(e,t);return i.setAttribute("style","border: 0.1em solid green;"),i}(e,i,r))}(t,n,i,r,o)};if(m["http://www.w3.org/2000/10/swap/pim/qif#Transaction"]||s.any(t,a.qu("toAccount"))){y(a.rdf("type"));const o=s.any(t,i.ns.qu("toAccount"));!function(t){let e="padding: 0.5em 1.5em 1em 1.5em; ";if(t){const n=s.any(t,i.ns.ui("backgroundColor"));n&&(e+="background-color: "+n.value+"; ")}p.setAttribute("style",e)}(o),o||u("(Error: There is no bank account known for this transaction <"+t.uri+">,\n -- every transaction needs one.)");let m=null;const w=s.any(t,i.ns.qu("accordingTo"));void 0===w?u("(Error: There is no back link to the original data source foir this transaction <"+t.uri+">,\nso I can't tell how to annotate it.)"):(m=void 0!==w?s.any(w,i.ns.qu("annotationStore")):null,void 0===m&&u("(There is no annotation document for this statement\n<"+w.uri+">,\nso you cannot classify this transaction.)"));const b=n.createElement("div");b.setAttribute("style","float:right"),p.appendChild(b);const C=function(e,r){y(e);const o=s.any(t,e);if(!o)return;const a=n.createElement("a");a.setAttribute("href",o.uri),a.setAttribute("style","float:right"),b.appendChild(a).textContent=r||i.utils.label(o),b.appendChild(n.createElement("br"))};C(i.ns.qu("toAccount")),C(i.ns.qu("accordingTo"),"Statement"),C(d("trip"));const v=n.createElement("table");p.appendChild(v);const E=["date","payee","amount","in_USD","currency"].map(c).map(function(e){y(e);const n=s.any(t,e),r=n?i.utils.labelForXML(n):"";return'<tr><td style="text-align: right; padding-right: 0.6em">'+i.utils.labelForXML(e)+'</td><td style="font-weight: bold;">'+r+"</td></tr>"}).join("\n");v.innerHTML=E;const x=function(t,e){t||u("Sorry, failed to save your change:\n"+e)};m&&s.fetcher.nowOrWhenFetched(m.uri,t,function(o,c){o||u("Cannot load store "+m+" "+c);const w=s.any(m,a.qu("calendarYear")),b=function(){p.insertBefore(i.widgets.makeSelectForNestedCategory(n,s,t,i.ns.qu("Classified"),m,x),v.nextSibling)};s.any(void 0,a.rdfs("subClassOf"),a.qu.Classified)?b():w?l.load(w).then(function(t){l.load(s.each(w,a.rdfs("seeAlso"))).then(function(){b()}).catch(function(t){console.log("Error loading background data: "+t)})}).catch(function(t){console.log("Error loading calendarYear: "+t)}):console.log("Can't get categories, because no calendarYear"),p.appendChild(i.widgets.makeDescription(n,s,t,i.ns.rdfs("comment"),m,x));let C=s.statementsMatching(void 0,d("trip"),void 0,m).map(function(t){return t.object});const E=s.each(void 0,i.ns.rdf("type"),d("Trip"));C=C.concat(E).sort();C=function(t,e,n,i){const r=e.map(function(e){let i=t.any(e,n);return i=i?i.value:"9999-12-31",[i,e]});return r.sort(),i&&r.reverse(),r.map(function(t){return t[1]})}(s,C,i.ns.cal("dtstart"),!0),C.length>1&&p.appendChild(i.widgets.makeSelectForOptions(n,s,t,d("trip"),C,{multiple:!1,nullLabel:"-- what trip? --",mint:"New Trip *",mintClass:d("Trip"),mintStatementsFun:function(t){const e=[];return e.push(r.st(t,i.ns.rdf("type"),d("Trip"),t.doc())),e}},m,x)),p.appendChild(n.createElement("br"));const q=e.getOutliner(n);y(a.rdfs("comment")),i.widgets.attachmentList(n,t,p),y(a.wf("attachment")),p.appendChild(n.createElement("tr")).setAttribute("style","height: 1em"),q.appendPropertyTRs(p,h,!1,function(t,e){return!(t.uri in g)}),q.appendPropertyTRs(p,f,!0,function(t,e){return!(t.uri in g)})})}else if(m["http://www.w3.org/ns/pim/trip#Trip"]){const e=function(){const e={},r={},o={},l=s.each(void 0,d("trip"),t),c=l.map(function(t){return t.doc()});s.fetcher.load(c).then(function(){l.forEach(function(t){const n=s.the(t,a.qu("date")),l=n?(""+n.value).slice(0,4):"????";let c=s.the(t,a.rdf("type"));if(c||(c=i.ns.qu("ErrorNoType")),c&&c.uri){const n=c.uri;r[l]||(r[l]=0),o[l]||(o[l]={}),e[n]||(e[n]=0),o[l][n]||(o[l][n]=0);const a=s.any(t,i.ns.qu("in_USD"));if(a||u("@@ No amount in USD: "+a+" for "+t),a){const t=parseFloat(a.value);e[n]+=t,o[l][n]+=t,r[l]+=t}}});const c=[];let d=0;const h=[];let f;for(const t in o)Object.prototype.hasOwnProperty.call(o,t)&&h.push(t);h.sort();const m=h.length;let g;const y=p.appendChild(n.createElement("table"));if(y.setAttribute("style","font-size: 120%; margin-left:auto; margin-right:1em; margin-top: 1em; border: 0.05em solid gray; padding: 1em;"),m>1){const t=y.appendChild(n.createElement("tr"));for(t.appendChild(C("")),f=0;f<m;f++)t.appendChild(C(h[f]));t.appendChild(C("total"))}for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(c.push(t),d+=e[t]);let x,q,T;c.sort();for(let t=0;t<c.length;t++){const r=s.sym(c[t]);if(x=y.appendChild(n.createElement("tr")),q=x.appendChild(n.createElement("td")),q.textContent=i.utils.label(r),m>1)for(f=0;f<m;f++)T=o[h[f]][c[t]],g=x.appendChild(b(T,!0));x.appendChild(b(e[c[t]],!0))}if(c.length>1){if(x=y.appendChild(n.createElement("tr")),x.appendChild(C("total")),m>1)for(f=0;f<m;f++)T=r[h[f]],g=x.appendChild(b(T?w(T):""));g=x.appendChild(b(d)),g.setAttribute("style","font-weight: bold; text-align: right;")}const A=function(t,e,n){const r=t.createElement("table");r.setAttribute("style","padding-left: 0.5em; padding-right: 0.5em; font-size: 9pt; width: 85%;");const o=function(t,e){const n=t.createElement("tr"),r=s.any(e,a.qu("toAccount"));!function(t,e){let n="'padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.1em;";if(e){const t=s.any(e,i.ns.ui("backgroundColor"));t&&(n+="background-color: "+t.value+"; ")}t.setAttribute("style",n)}(n,r);const o=n.appendChild(t.createElement("td")),l=s.any(e,a.qu("date"));o.textContent=l?l.value.slice(0,10):"???",o.setAttribute("style","width: 7em;");const c=n.appendChild(t.createElement("td"));c.setAttribute("style","width: 36em;");const d=s.any(e,a.qu("payee"));c.textContent=d?d.value:"???";const p=c.appendChild(t.createElement("a"));p.textContent=" ➜",p.setAttribute("href",e.uri);const u=n.appendChild(t.createElement("td")),h=s.any(e,a.qu("in_USD"));return u.textContent=h?w(h.value):"???",u.setAttribute("style","width: 6em; text-align: right; "),n.addEventListener("click",function(i){E(t,n,e,"transaction",!i.shiftKey)},!1),n},l=n?e.filter(n):e.slice();l.sort(v);for(let e=0;e<l.length;e++)r.appendChild(o(t,l[e]));return r}(n,l);A.setAttribute("style","margin-left:auto; margin-right:1em; margin-top: 1em; border: padding: 1em;"),p.appendChild(A),i.widgets.attachmentList(n,t,p)}).catch(function(t){u("Error loading transactions: "+t)})};e()}return p}}},4347(t,e,n){n.r(e),n.d(e,{default:()=>o});var i=n(3383);const r=i.ns,o={icon:i.icons.iconBase+"noun_142708.svg",name:"period",audience:[r.solid("PowerUser")],label:function(t,e){return e.session.store.findTypeURIs(t)["http://www.w3.org/2000/10/swap/pim/qif#Period"]?"period":null},render:function(t,e){const n=e.dom,r=e.session.store,o=i.ns,a=n.createElement("div");a.setAttribute("class","periodPane");const s=function(t,e){e||(e="color: grey;");const i=n.createElement("pre");i.setAttribute("style",e),a.appendChild(i),i.appendChild(n.createTextNode(t))},l=function(t){return s("✓ "+t,"color: #010; background-color: #efe")},c=function(t){return s(t,"color: #100; background-color: #fee")},d=function(){const s=r.any(t,o.cal("dtstart"));void 0===s&&c("(Error: There is no start date known for this period <"+t.uri+">,\n -- every period needs one.)");const d=r.any(t,o.cal("dtend"));void 0===d&&c("(Error: There is no end date known for this period <"+t.uri+">,\n -- every period needs one.)");const p={};var u;u=o.rdf("type"),p[u.uri]=!0;const h=function(t){return!!((e=r.any(t,o.qu("date")))&&e>=s&&e<d);var e},f=function(t,e){const n=r.any(t,o.qu("date")),i=r.any(e,o.qu("date"));if(void 0!==n&&void 0!==i){if(n.value<i.value)return-1;if(n.value>i.value)return 1}return t.uri<e.uri?-1:t.uri>e.uri?1:0};a.appendChild(n.createElement("h2")).textContent="Period "+s.value.slice(0,10)+" - "+d.value.slice(0,10);const m=function(t,n,i,r,o){n.expanded?(n.parentNode.removeChild(n.expanded),n.expanded=!1):function(t,n,i,r,o){const a=n.parentNode.children;if(o)for(let t=a.length-1;t>=0;t--)a[t].expanded&&(a[t].parentNode.removeChild(a[t].expanded),a[t].expanded=!1);const s=t.createElement("tr"),l=s.appendChild(t.createElement("td"));l.setAttribute("style","width: 98%; padding: 1em; border: 0.1em solid grey;");const c=n.children.length;n.nextSibling?n.parentNode.insertBefore(s,n.nextSibling):n.parentNode.appendChild(s),n.expanded=s,l.setAttribute("colspan",""+c),l.appendChild(function(t,e,n){const i=t.session.paneRegistry.byName(n).render(e,t);return i.setAttribute("style","border: 0.1em solid green;"),i}(e,i,r))}(t,n,i,r,o)},g=function(t,e){const n=t.createElement("table");n.setAttribute("style","margin-left: 100; font-size: 9pt; width: 85%;");const a=function(t,e){const n=t.createElement("tr"),a=r.any(e,o.qu("toAccount"));!function(t,e){let n="margin-left: 8em; padding-left: 5em;";if(e){const t=r.any(e,i.ns.ui("backgroundColor"));t&&(n+="background-color: "+t.value+"; ")}t.setAttribute("style",n)}(n,a);const s=n.appendChild(t.createElement("td")),l=r.any(e,o.qu("date"));s.textContent=l?l.value.slice(0,10):"???",s.setAttribute("style","width: 7em;");const c=n.appendChild(t.createElement("td"));c.setAttribute("style","width: 36em;");const d=r.any(e,o.qu("payee"));c.textContent=d?d.value:"???";const p=c.appendChild(t.createElement("a"));p.textContent=" ➜",p.setAttribute("href",e.uri);const u=n.appendChild(t.createElement("td")),h=r.any(e,o.qu("in_USD"));return u.textContent=h?function(t){const e=""+t;return e.indexOf(".")>=0?e.split(".")[0]+"."+(e.split(".")[1]+"00").slice(0,2):e+".00"}(h.value):"???",u.setAttribute("style","width: 6em; text-align: right; "),n.addEventListener("click",function(i){m(t,n,e,"transaction",!i.shiftKey)},!1),n},s=e.filter(h);s.sort(f);for(let e=0;e<s.length;e++)n.appendChild(a(t,s[e]));return n},y={"http://www.w3.org/2000/10/swap/pim/qif#Transaction":!0,"http://www.w3.org/2000/10/swap/pim/qif#Unclassified":!0,"http://www.w3.org/2000/10/swap/pim/qif#UnclassifiedOutgoing":!0,"http://www.w3.org/2000/10/swap/pim/qif#UnclassifiedIncome":!0},w=r.findMemberURIs(o.qu("Transaction")),b=[],C=[];let v,E,x,q;for(const t in w)if(Object.prototype.hasOwnProperty.call(w,t)){E=r.sym(t);const e=r.each(E,o.rdf("type"));let n=!1;for(let t=0;t<e.length;t++){void 0===y[e[t].uri]&&(n=!0)}n||(v=r.any(E,o.qu("in_USD")),void 0===v&&(v=r.any(E,o.qu("amount"))),v&&(""+v.value).indexOf("-")>=0?C.push(r.sym(t)):b.push(r.sym(t)))}b.length?(x=g(n,b),q=x.children.length,a.appendChild(n.createElement("h3")).textContent="Unclassified Income"+(q<4?"":" ("+q+")"),a.appendChild(x)):l("No unclassified income"),C.length?(x=g(n,C),q=x.children.length,a.appendChild(n.createElement("h3")).textContent="Unclassified Outgoings"+(q<4?"":" ("+q+")"),a.appendChild(x)):l("No unclassified outgoings ");const T=function(t,e){const s=function(t){const e=r.findSubClassesNT(o.qu("Transaction"));for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&n.slice(1,-1).split("#")[1]===t)return r.sym(n.slice(1,-1));return null}(t);let l;const d=[];let p=0;if(!s)return c("Error: No category correspnding to "+t),null;const u=r.each(void 0,o.rdf("type"),s);for(let t=0;t<u.length;t++)r.any(u[t],e)||d.push(u[t]);return d.length&&(l=g(n,d),p=l.children.length,a.appendChild(n.createElement("h3")).textContent=i.utils.label(s)+" with no "+i.utils.label(e)+(p<4?"":" ("+p+")"),a.appendChild(l)),p};0===T("Reimbursables",o.trip("trip"))&&l("Reimbursables all have trips"),0===T("Other_Inc_Speaking",o.trip("trip"))&&l("Speaking income all has trips")};if(r.findTypeURIs(t)["http://www.w3.org/2000/10/swap/pim/qif#Period"]){const e=r.each(t,o.rdfs("seeAlso"));console.log("Loading before render: "+e.length),r.fetcher.load(e).then(function(){d()})}return a}}},4962(t,e,n){n.r(e),n.d(e,{default:()=>l});var i=n(3383),r=n(9676),o=n(3581),a=n(6046);const s=i.ns,l={icon:i.icons.iconBase+"noun_62007.svg",name:"travel expenses",audience:[s.solid("PowerUser")],label:function(t,e){const n=e.session.store,r=n.findTypeURIs(t);return i.ns.qu("Transaction")in n.findSuperClassesNT(t)?"by Trip":r["http://www.w3.org/ns/pim/trip#Trip"]?"Trip $":null},render:function(t,e){const n=e.dom,s=e.store,l=i.ns,c=o.A("http://www.w3.org/2002/12/cal/ical#"),d=o.A("http://www.w3.org/ns/pim/trip#"),p=n.createElement("div");p.setAttribute("class","transactionPane"),p.innerHTML="<h2>Trip transactions</h2>";const u=function(t,e){void 0===e&&(e="color: grey");const i=n.createElement("pre");i.setAttribute("style",e),p.appendChild(i),i.appendChild(n.createTextNode(t))},h=s.findTypeURIs(t),f=function(t,e){const o=new a.X(i.utils.label(t)),c={};["date","transaction","comment","type","in_USD"].forEach(function(t){o.vars.push(c[t]=r.variable(t))}),o.pat.add(c.transaction,d("trip"),t);const p=s.formula();p.add(c.transaction,l.rdf("type"),c.type),o.pat.optional.push(p),o.pat.add(c.transaction,i.ns.qu("date"),c.date),p.add(c.transaction,l.rdfs("comment"),c.comment),o.pat.optional.push(p),o.pat.add(c.transaction,i.ns.qu("in_USD"),c.in_USD);const h=i.table(n,{query:o,onDone:function(){const e={},n=s.each(void 0,d("trip"),t);n.forEach(function(t){let n=s.the(t,l.rdf("type"));if(n||(n=i.ns.qu("ErrorNoType")),n&&n.uri){const r=n.uri;e[r]||(e[r]=0);const o=s.any(t,i.ns.qu("in_USD"));o||u(" @@ No amount in USD: "+o+" for "+t),o&&(e[r]=e[r]+parseFloat(o.value))}});let r="",o=0,a=0;for(const t in e)r+=i.utils.label(s.sym(t))+": "+e[t]+"; ",o++,a+=e[t];u("Totals of "+n.length+" transactions: "+r,""),o>1&&u("Overall net: "+a,"text-treatment: bold;")}});e.appendChild(h)};if(i.ns.qu("Transaction")in s.findSuperClassesNT(t)){const e=s.each(void 0,l.rdf("type"),t),n=[],r=[];for(let t=0;t<e.length;t++){const o=e[t],a=s.any(o,d("trip"));if(a){o in r||(r[a]={total:0,transactions:[]});const t=s.any(o,i.ns.qu("in_USD"));t&&(r[a].total+=t);const e=s.any(o,i.ns.qu("date"));r[a.toNT()].transactions.push([e,o])}else n.push(o)}const o=[];for(const t in r){const e=s.fromNT(t);o.push([s.any(e,c("dtstart")),e])}o.sort();for(let t=0;t<o.length;t++){f(o[t][1],p)}}else h["http://www.w3.org/ns/pim/trip#Trip"]&&f(t,p);return p}}}}]);
2
+ //# sourceMappingURL=156.mashlib.min.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";(this.webpackChunkMashlib=this.webpackChunkMashlib||[]).push([[172],{1564(e,n,t){t.r(n),t.d(n,{default:()=>o});var r=t(3383);const o={icon:r.icons.iconBase+"noun_688606.svg",name:"tabbed",audience:[r.ns.solid("PowerUser")],label:(e,n)=>{const t=n.session.store.findTypeURIs(e);return r.ns.meeting("Cluster").uri in t?"Tabbed":null},render:(e,n)=>{const t=n.dom,o=n.session.store,i=t.createElement("div");return(async()=>{if(!o.fetcher)throw new Error("Store has no fetcher");await o.fetcher.load(e),i.appendChild(r.tabs.tabWidget({dom:t,subject:e,predicate:o.any(e,r.ns.meeting("predicate"))||r.ns.meeting("toolList"),ordered:!0,orientation:o.anyValue(e,r.ns.meeting("orientation"))||"0",renderMain:(e,t)=>{e.innerHTML="";const r=e.appendChild(n.dom.createElement("table"));n.getOutliner(n.dom).GotoSubject(t,!0,null,!1,void 0,r)},renderTab:(t,i)=>{const s=o.the(e,r.ns.meeting("predicate"));t.appendChild(r.widgets.personTR(n.dom,s,i,{}))},backgroundColor:o.anyValue(e,r.ns.ui("backgroundColor"))||"#ddddcc"}))})(),i}}}}]);
2
+ //# sourceMappingURL=172.mashlib.min.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";(this.webpackChunkMashlib=this.webpackChunkMashlib||[]).push([[196],{834(n,s,e){e.r(s),e.d(s,{default:()=>i});var r=e(3383);const i={icon:r.icons.iconBase+"padlock-timbl.svg",name:"sharing",label:(n,s)=>{const e=s.session.store.findTypeURIs(n);return e[r.ns.ldp("Resource").uri]||e[r.ns.ldp("Container").uri]||e[r.ns.ldp("BasicContainer").uri]?"Sharing":null},render:(n,s)=>{const e=s.dom,i=s.session.store,o=function(){const s=i.findTypeURIs(n);if(s[r.ns.ldp("BasicContainer").uri]||s[r.ns.ldp("Container").uri])return"folder";return"file"}(),t=e.createElement("div");return t.classList.add("sharingPane"),r.aclControl.preventBrowserDropEvents(e),t.appendChild(r.aclControl.ACLControlBox5(n,s,o,i)),t}}}}]);
2
+ //# sourceMappingURL=196.mashlib.min.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";(this.webpackChunkMashlib=this.webpackChunkMashlib||[]).push([[21],{3426(e,n,t){t.r(n),t.d(n,{default:()=>s});var i=t(2404),a=t(3383);const s={icon:a.icons.iconBase+"noun_547570.svg",global:!0,name:"home",label:function(){return"home"},render:function(e,n){const t=n.dom,s=t.createElement("div"),o=i.authn.currentUser();return async function(){const e={div:s,dom:t,statusArea:s,me:o};s.appendChild(t.createElement("h4")).textContent="Create new thing somewhere";const i={div:s.appendChild(t.createElement("div")),dom:t,statusArea:s,me:o},r=await a.login.filterAvailablePanes(n.session.paneRegistry.list);a.create.newThingUI(i,n,r),a.login.registrationList(e,{}).then(function(){})}(),s}}}}]);
2
+ //# sourceMappingURL=21.mashlib.min.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";(this.webpackChunkMashlib=this.webpackChunkMashlib||[]).push([[236],{3082(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.findChat=i,t.getChat=async function(e,t=!0){const{me:n,chatContainer:l,exists:d}=await i(e);if(d)return new r.NamedNode(l.value+s.longChatPane.CHAT_LOCATION_IN_CONTAINER);if(t){const t=await async function(e,t){const n=await s.longChatPane.mintNew({session:{store:o.store}},{me:t,newBase:e.value});return n.newInstance}(l,n);return await async function(e,t){await o.store.fetcher.load(e.doc());const n=o.store.any(e,a.ns.ldp("inbox"),void 0,e.doc());if(!n)throw new Error(`Invitee inbox not found! ${e.value}`);const r=`\n<> a <http://www.w3.org/ns/pim/meeting#LongChatInvite> ;\n${a.ns.rdf("seeAlso")} <${t.value}> . \n `,s=await o.store.fetcher.webOperation("POST",n.value,{data:r,contentType:"text/turtle"});if(!s.headers.get("location"))throw new Error(`Invite sending returned a ${s.status}`)}(e,t),await async function(e,t,n){await o.store.fetcher.load(e);const a=o.store.any(e,new r.NamedNode("http://www.iana.org/assignments/link-relations/acl"));if(!a)throw new Error("Chat ACL doc not found!");const s=`\n@prefix acl: <http://www.w3.org/ns/auth/acl#>.\n<#owner>\n a acl:Authorization;\n acl:agent <${t.value}>;\n acl:accessTo <.>;\n acl:default <.>;\n acl:mode\n acl:Read, acl:Write, acl:Control.\n<#invitee>\n a acl:Authorization;\n acl:agent <${n.value}>;\n acl:accessTo <.>;\n acl:default <.>;\n acl:mode\n acl:Read, acl:Append.\n`;await o.store.fetcher.webOperation("PUT",a.value,{data:s,contentType:"text/turtle"})}(l,n,e),await async function(e,t){const n=o.store.any(t,a.ns.solid("privateTypeIndex"));if(!n)throw new Error("Private type index not found!");await o.store.fetcher.load(n);const s=a.widgets.newThing(n),i=[(0,r.st)(s,a.ns.rdf("type"),a.ns.solid("TypeRegistration"),n.doc()),(0,r.st)(s,a.ns.solid("forClass"),a.ns.meeting("LongChat"),n.doc()),(0,r.st)(s,a.ns.solid("instance"),e,n.doc())];await new Promise((e,t)=>{o.store.updater.update([],i,function(n,a,o){a?e():t(new Error(o))})})}(t,n),t}throw new Error("Chat does not exist and createIfMissing is false")};var a=n(3383),o=n(2404),r=n(9676),s=n(8055);async function i(e){const t=await async function(){const e=o.authn.currentUser();if(null===e)throw new Error("Current user not found! Not logged in?");return await o.store.fetcher.load(e.doc()),e}(),n=await async function(e){const t=o.store.any(e,a.ns.space("storage"),void 0,e.doc());if(!t)throw new Error("Current user pod root not found!");return t}(t),i=function(e,t){const n=new URL(`IndividualChats/${new URL(e.value).host}/`,t.value).toString();return new r.NamedNode(n)}(e,n);let l=!0;try{await o.store.fetcher.load(new r.NamedNode(i.value+s.longChatPane.CHAT_LOCATION_IN_CONTAINER))}catch(e){l=!1}return{me:t,chatContainer:i,exists:l}}},6303(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.shortChatPane=void 0;var a=n(2404),o=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,a=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var o,r,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=t?a:n){if(o.has(e))return o.get(e);o.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((r=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(r.get||r.set)?o(s,t,r):s[t]=e[t]);return s}(e,t)}(n(3383));const r=o.ns;t.shortChatPane={icon:o.icons.iconBase+"noun_346319.svg",name:"chat",audience:[r.solid("PowerUser")],label:function(e,t){const n=t.session.store,a=n.each(e,r.wf("message")).length;return a>0?"Chat ("+a+")":n.holds(e,r.rdf("type"),r.meeting("Chat"))?"Meeting chat":n.holds(void 0,r.rdf("type"),r.foaf("ChatChannel"),e)?"IRC log":null},mintClass:r.meeting("Chat"),mintNew:function(e,t){if(!confirm("short Chat is deprecated in favor of long Chat.\nEmbedded chat for comments and existing short Chats will work.\nYou can report any issues at https://github.com/SolidOS/chat-pane ?\n\nDo you really want to create a new deprecated short Chat?"))return;const n=e.session.store,a=n.updater;if(t.me&&!t.me.uri)throw new Error("chat mintNew: Invalid userid "+t.me);const o=t.newInstance=t.newInstance||n.sym(t.newBase+"index.ttl#this"),s=o.doc();return n.add(o,r.rdf("type"),r.meeting("Chat"),s),n.add(o,r.dc("title"),"Chat",s),n.add(o,r.dc("created"),new Date,s),t.me&&n.add(o,r.dc("author"),t.me,s),new Promise(function(e,o){a.put(s,n.statementsMatching(void 0,void 0,void 0,s),"text/turtle",function(n,a,r){a?e(t):o(new Error("FAILED to save new tool at: "+n+" : "+r))})})},render:function(e,t){const n=t.session.store,s=t.dom,i=s.createElement("div");i.setAttribute("class","chatPane");const l={};let d;if(n.holds(e,r.rdf("type"),r.meeting("Chat")))d=e.doc();else if(n.any(e,o.ns.wf("message")))d=a.store.any(e,o.ns.wf("message")).doc();else if(n.holds(void 0,r.rdf("type"),r.foaf("ChatChannel"),e)||n.holds(e,r.rdf("type"),r.foaf("ChatChannel"))){const t=function(){const e=new $rdf.Query("IRC log entries"),t=[];return["chan","msg","date","list","pred","creator","content"].forEach(function(n){e.vars.push(t[n]=$rdf.variable(n))}),e.pat.add(t.chan,r.foaf("chatEventList"),t.list),e.pat.add(t.list,t.pred,t.msg),e.pat.add(t.msg,r.dc("date"),t.date),e.pat.add(t.msg,r.dc("creator"),t.creator),e.pat.add(t.msg,r.dc("description"),t.content),e};d=e.doc(),l.query=t()}else!function(e,t){const n=s.createElement("pre");n.setAttribute("style","background-color: "+t||0),i.appendChild(n),n.appendChild(s.createTextNode(e))}("Unknown chat type");return i.appendChild(o.messageArea(s,n,e,d,l)),n.updater.addDownstreamChangeListener(d,function(){o.widgets.refreshTree(i)}),i}}},7052(e,t,n){Object.defineProperty(t,"longChatPane",{enumerable:!0,get:function(){return o.longChatPane}}),Object.defineProperty(t,"shortChatPane",{enumerable:!0,get:function(){return a.shortChatPane}});var a=n(6303),o=n(8055),r=n(3082)},8055(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.longChatPane=void 0;var a=n(2404),o=s(n(3383)),r=s(n(9676));function s(e,t){if("function"==typeof WeakMap)var n=new WeakMap,a=new WeakMap;return(s=function(e,t){if(!t&&e&&e.__esModule)return e;var o,r,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=t?a:n){if(o.has(e))return o.get(e);o.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((r=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(r.get||r.set)?o(s,t,r):s[t]=e[t]);return s})(e,t)}const i=o.ns,l=i.meeting("LongChat"),d="index.ttl#this",c=o.style.sidebarComponentStyle||" padding: 0.5em; width: 100%;",h=o.style.sidebarStyle||"overflow-x: auto; overflow-y: auto; border-radius: 1em; border: 0.1em solid white;";t.longChatPane={CHAT_LOCATION_IN_CONTAINER:d,icon:o.icons.iconBase+"noun_1689339.svg",name:"long chat",label:function(e,t){const n=t.session.store;return n.holds(e,i.rdf("type"),i.meeting("LongChat"))?"Chat channnel":n.holds(e,i.rdf("type"),i.sioc("Thread"))?"Thread":n.any(e,i.sioc("content"))&&n.any(e,i.dct("created"))?"message":null},mintClass:l,mintNew:function(e,t){const n=e.session.store,a=n.updater;if(t.me&&!t.me.uri)throw new Error("chat mintNew: Invalid userid "+t.me);const o=t.newInstance=t.newInstance||n.sym(t.newBase+d),r=o.doc();n.add(o,i.rdf("type"),i.meeting("LongChat"),r),n.add(o,i.dc("title"),"Chat channel",r),n.add(o,i.dc("created"),new Date,r),t.me&&n.add(o,i.dc("author"),t.me,r);const s=(e,t,n)=>`\n @prefix : <#>.\n @prefix acl: <http://www.w3.org/ns/auth/acl#>.\n @prefix foaf: <http://xmlns.com/foaf/0.1/>.\n @prefix lon: <./${t}>.\n\n :ControlReadWrite\n a acl:Authorization;\n acl:accessTo lon:;\n acl:agent <${e.uri}>;\n acl:default lon:;\n acl:mode acl:Control, acl:Read, acl:Write.\n :Read\n a acl:Authorization;\n acl:accessTo lon:;\n acl:agentClass foaf:Agent;\n acl:default lon:;\n acl:mode acl:Read.\n :Read${n}\n a acl:Authorization;\n acl:accessTo lon:;\n acl:agentClass acl:AuthenticatedAgent;\n acl:default lon:;\n acl:mode acl:Read, acl:${n}.`;return new Promise(function(e,o){a.put(r,n.statementsMatching(void 0,void 0,void 0,r),"text/turtle",function(n,a,r){a?e(t):o(new Error("FAILED to save new chat channel at: "+n+" : "+r))}).then(e=>new Promise((e,a)=>{t.me&&(n.fetcher.webOperation("PUT",t.newBase+".acl",{data:s(t.me,"","Append"),contentType:"text/turtle"}),n.fetcher.webOperation("PUT",t.newBase+"index.ttl.acl",{data:s(t.me,"index.ttl","Write"),contentType:"text/turtle"})),e(t)}))})},render:function(e,t,n){const s=t.dom,d=t.session.store,u=d.sym("https://solid.github.io/solid-panes/longCharPane/preferencesForm.ttl#this"),p=u.doc();d.holds(void 0,void 0,void 0,p)||r.parse('\n @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.\n @prefix solid: <http://www.w3.org/ns/solid/terms#>.\n @prefix ui: <http://www.w3.org/ns/ui#>.\n @prefix : <#>.\n\n :this\n <http://purl.org/dc/elements/1.1/title> "Chat preferences" ;\n a ui:Form ;\n ui:parts ( :colorizeByAuthor :expandImagesInline :newestFirst :inlineImageHeightEms\n :shiftEnterSendsMessage :authorDateOnLeft :showDeletedMessages).\n\n :colorizeByAuthor a ui:TristateField; ui:property solid:colorizeByAuthor;\n ui:label "Color user input by user".\n\n :expandImagesInline a ui:TristateField; ui:property solid:expandImagesInline;\n ui:label "Expand image URLs inline".\n\n :newestFirst a ui:TristateField; ui:property solid:newestFirst;\n ui:label "Newest messages at the top".\n\n :inlineImageHeightEms a ui:IntegerField; ui:property solid:inlineImageHeightEms;\n ui:label "Inline image height (lines)".\n\n :shiftEnterSendsMessage a ui:TristateField; ui:property solid:shiftEnterSendsMessage;\n ui:label "Shift-Enter sends message".\n\n :authorDateOnLeft a ui:TristateField; ui:property solid:authorDateOnLeft;\n ui:label "Author & date of message on left".\n\n :showDeletedMessages a ui:TristateField; ui:property solid:showDeletedMessages;\n ui:label "Show placeholders for deleted messages".\n',d,p.uri,"text/turtle");const f=d.statementsMatching(null,i.ui.property,null,p).map(e=>e.object);function m(e){const n=o.widgets.button(t.dom,o.icons.iconBase+"noun_1180156.svg","close",function(){e.parentNode.removeChild(e)});return n.style.float="right",n.style.margin="0.7em",delete n.style.backgroundColor,n}function g(e,n){const r=s.createElement("div"),i=a.authn.currentUser(),l={div:r,dom:s,noun:n,statusArea:r,me:i,refreshTarget:e},d=[t.session.paneRegistry.byName("chat")];return o.create.newThingUI(l,t,d),r}let w,y=null;let C=e,v=null,b=null;if(d.holds(e,i.rdf("type"),i.meeting("LongChat")))console.log("@@@ Chat channnel");else if(d.holds(e,i.rdf("type"),i.sioc("Thread"))){console.log("Thread is subject "+e.uri),b=e;const t=d.the(null,i.sioc("has_reply"),b,b.doc());if(!t)throw new Error("Thread has no root message "+b);if(C=d.any(null,i.wf("message"),t),!C)throw new Error("Thread root has no link to chatChannel")}else if(d.any(e,i.sioc("content"))&&d.any(e,i.dct("created"))&&(console.log("message is subject "+e.uri),v=e,C=d.any(null,i.wf("message"),v),!C))throw new Error("Message has no link to chatChannel");const E=s.createElement("div"),T="20cm",x=E.appendChild(s.createElement("table"));x.style.maxHeight='12"';const I=x.appendChild(s.createElement("tr")),P=I.appendChild(s.createElement("td")),A=I.appendChild(s.createElement("td")),O=I.appendChild(s.createElement("td")),_=I.appendChild(s.createElement("td")),N=x.appendChild(s.createElement("tr"));P.style=h,P.style.paddingRight="1em",O.style=h,O.style.paddingLeft="1em",_.style=h,_.style.paddingLeft="1em",N.appendChild(s.createElement("td"));const L=N.appendChild(s.createElement("td"));N.appendChild(s.createElement("td"));const M=o.widgets.button(s,o.icons.iconBase+"noun_339237.svg","participants ...");L.appendChild(M),M.addEventListener("click",function(e){if(!w){w=s.createElement("div"),w.style=c,w.style.maxHeight=T,w.appendChild(m(w));const e=a.authn.currentUser();e||alert("Should be logeed in for partipants panel"),o.pad.manageParticipation(s,w,C.doc(),C,e,{})}P.contains(w)?(w.parentNode.removeChild(w),w=null):P.appendChild(w)});const k=o.widgets.button(s,o.icons.iconBase+"noun_1689339.svg","List of other chats ...");L.appendChild(k),k.addEventListener("click",async function(e){y||(y=s.createElement("div"),y.style=c,y.style.maxHeight=T,y.appendChild(m(y)),y.appendChild(await async function(e,t){const n=s.createElement("div"),a={dom:s,div:n,noun:t};return await o.login.registrationList(a,{public:!0,private:!0,type:e}),n.appendChild(g(n,t)),n}(i.meeting("LongChat"),"chat"))),P.contains(y)?y.parentNode.removeChild(y):P.appendChild(y)});let R=null;const F=o.widgets.button(s,o.icons.iconBase+"noun_344563.svg","Setting ...");L.appendChild(F),F.style.float="right",F.addEventListener("click",async function(e){R||(R=await async function(e){const{dom:t,noun:n}=e,r=t.createElement("div");r.appendChild(m(r)),r.style=c,r.style.minWidth="25em",r.style.maxHeight=T;const s=r.appendChild(t.createElement("table")),i=s.appendChild(t.createElement("tr")),h=s.appendChild(t.createElement("tr")),p=a.authn.currentUser();return p&&(await o.login.registrationControl({noun:n,me:p,statusArea:h,dom:t,div:i},C,l),console.log("Registration control finsished."),r.appendChild(o.preferences.renderPreferencesForm(C,l,u,{noun:n,me:p,statusArea:h,div:r,dom:t,kb:d}))),r}({dom:s,noun:"chat room"})),_.contains(R)?(R.parentNode.removeChild(R),R=null):_.appendChild(R)}),E.setAttribute("class","chatPane");const D={infinite:!0},B={noun:"chat room",div:E,dom:s};async function j(e,t){console.log("@@@@ showThread thread "+e);const n={};n.thread=e,n.includeRemoveButton=!0,n.authorDateOnLeft=t.authorDateOnLeft,n.newestFirst=t.newestFirst,O.innerHTML="",console.log("Options for showThread message Area",n);const a=await o.infiniteMessageArea(s,d,C,n);a.style.resize="both",a.style.overflow="auto",a.style.maxHeight=T,O.appendChild(a)}return B.me=a.authn.currentUser(),async function(){let e;try{e=await o.preferences.getPreferencesForClass(C,l,f,B)}catch(e){o.widgets.complain(B,e)}for(const t in e)D[t.split("#")[1]]=e[t];v&&(D.selectedMessage=v),n.solo&&(D.solo=!0),b?D.thread=b:D.showThread=j;const t=await o.infiniteMessageArea(s,d,C,D);t.style.resize="both",t.style.overflow="auto",t.style.maxHeight=T,A.appendChild(t)}().then(console.log("async - chat pane built")),E}}}}]);
2
+ //# sourceMappingURL=236.mashlib.min.js.map
@@ -0,0 +1,2 @@
1
+ (this.webpackChunkMashlib=this.webpackChunkMashlib||[]).push([[289],{7418(e,t,n){var i;i=(e,t,n)=>(()=>{"use strict";var i={264:e=>{e.exports=t},426:t=>{t.exports=e},663:e=>{e.exports=n}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return i[e](n,n.exports,a),n.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};a.r(s),a.d(s,{default:()=>p});var r=a(426),l=a(264),d=a(663);const{typeIndex:c}=d.solidLogicSingleton,{loadTypeIndexesFor:u}=c,m=r.ns,p={icon:r.icons.iconBase+"noun_66617.svg",name:"meeting",audience:[m.solid("PowerUser")],label:function(e,t){const n=t.session.store,i=r.ns;return n.holds(e,i.rdf("type"),i.meeting("Meeting"))?"Meeting":null},mintClass:r.ns.meeting("Meeting"),mintNew:function(e,t){return new Promise(function(n,i){const o=e.session.store,a=r.ns;t.newInstance=t.newInstance||o.sym(t.newBase+"index.ttl#this");const s=t.newInstance,c=s.doc(),u=d.authn.currentUser();u&&o.add(s,a.dc("author"),u,c),o.add(s,a.rdf("type"),a.meeting("Meeting"),c),o.add(s,a.dc("created"),new Date,c),o.add(s,a.ui("backgroundColor"),new l.Literal("#ddddcc",void 0,a.xsd("color")),c);const m=new l.Collection;o.add(s,a.meeting("toolList"),m,c),m.elements.push(s),o.updater.put(c,o.statementsMatching(void 0,void 0,void 0,c),"text/turtle",function(e,o,a){o?n(t):i(new Error("Error writing meeting configuration: "+a))})})},render:function(e,t){const n=t.dom,i=t.session.store,o=r.ns,a=i.updater,s=this,c=function(e,t){console.log(e);const i=n.createElement("pre");i.setAttribute("style","background-color: "+t||0),f.appendChild(i),i.appendChild(n.createTextNode(e))},m=function(e,t){e||c(t)},p=e,g=e.doc(),h=e.dir().uri,f=n.createElement("div"),b=f.appendChild(n.createElement("table"));b.style="width: 100%; height: 100%; margin:0;";const w=b.appendChild(n.createElement("tr"));w.appendChild(n.createElement("div"));const y=b.appendChild(n.createElement("tr")),v=b.appendChild(n.createElement("td")).appendChild(n.createElement("table")).appendChild(n.createElement("tr"));w.setAttribute("style","height: 2em;");let C=null;const x=function(){a.put(g,i.statementsMatching(void 0,void 0,void 0,g),"text/turtle",function(e,t,n){t?(K.refresh(),z()):c(n="FAILED to save new thing at: "+g+" : "+n)})},k=function(e,t,n){const s=t.doc();n&&i.add(p,n,t,s),i.add(t,o.meeting("parentMeeting"),p,s),a.put(s,i.statementsMatching(void 0,void 0,void 0,s),"text/turtle",function(e,n,i){n?x():c("FAILED to save new tool at: "+t+" : "+i)})},T=function(e,t,n,a){t&&i.add(p,t,e,g);const s=r.widgets.newThing(g);return n&&i.add(s,o.rdfs("label"),n,g),a&&i.add(s,o.meeting("icon"),i.sym(a),g),i.add(s,o.rdf("type"),o.meeting("Tool"),g),i.add(s,o.meeting("target"),e,g),i.the(p,o.meeting("toolList")).elements.push(s),s};function A(e){const t=/https:\/\/www\.google\..*\/maps\//,n="https://www.google.com/maps/embed/v1/",i=e.uri;if(!i.match(t))return e;if(i.startsWith(n))return e;const o=i.replace(t,n)+"&key=AIzaSyB8aaT6bY9tcLCmc2oPCkdUYLmTOWM8R54";return console.log("Converted Google Map URI! "+o),l.sym(o)}const E=function(n){Promise.all(n.map(function(n){return function(n){return new Promise(function(a){console.log("Dropped on thing "+n);const s=n.uri;if(s.startsWith("http:")&&s.indexOf("#")<0)return function(n){const a=o.wf("attachment");i.add(e,a,n,e.doc()),_({icon:"noun_160581.svg",limit:1,shareTab:!0},{newInstance:e,pane:t.session.paneRegistry.byName("link"),predicate:o.meeting("attachmentTool"),tabTitle:"Links",view:"link",noIndexHTML:!0})}(n),a(n);i.fetcher.nowOrWhenFetched(n,function(e,t){function d(e){e=A(e),console.log("make web page attachement tab "+e);const t=T(e,r.ns.wf("attachment"),r.utils.label(e),null);return i.add(t,r.ns.meeting("view"),"iframe",g),a(e)}if(e){const e=n,t=i.findTypeURIs(e);for(const e in t)console.log(" drop object type includes: "+e);if(o.vcard("Individual").uri in t||o.foaf("Person").uri in t||o.foaf("Agent").uri in t)return function(e){const t=i.any(e,o.foaf("preferredURI")),n=t?i.sym(t):e,a=i.any(p,o.meeting("attendeeGroup")),s=function(e,t){const n=[l.st(t,r.ns.vcard("hasMember"),e,t.doc())],a=i.any(e,o.vcard("fn"))||i.any(e,o.foaf("name"));a&&n.push(l.st(e,r.ns.vcard("fn"),a,t.doc())),i.fetcher.nowOrWhenFetched(t.doc(),void 0,function(o,a){o?i.updater.update([],n,function(t,n,i){m(n,i),n&&console.log("Addded to particpants OK: "+e)}):c("Can't read group to add person"+t)})};a?s(n,a):I().then(function(e){const t=e.newInstance;s(n,t),i.fetcher.putBack(g,{contentType:"text/turtle"}).then(function(e){console.log("Particiants Group created: "+t)})}).catch(function(e){c(e)})}(n),a(n);if(s.startsWith("https:")&&s.indexOf("#")<0){const e=i.fetcher.getHeader(n,"x-frame-options");let t=!0;if(e)for(let n=0;n<e.length;n++)console.log("x-frame-options: "+e[n]),e[n].indexOf("sameorigin")<0&&(t=!1),e[n].indexOf("deny")<0&&(t=!1);if(t)return function(e){const t=T(e,r.ns.wf("attachment"),r.utils.label(e),null);i.add(t,r.ns.meeting("view"),"iframe",g)}(n=A(n)),a(n)}return console.log("Default: assume web page attachement "+n),d(n)}return console.log("Error looking up dropped thing, will just add it anyway. "+n+": "+t),d(n)})})}(l.sym(n))})).then(function(e){x()})},F=function(e){r.widgets.uploadFiles(i.fetcher,e,p.dir().uri+"Files",p.dir().uri+"Pictures",function(e,t){e.type.startsWith("image/")?M("Files"):L("Pictures")})},M=function(e){return _({icon:"noun_598334.svg",limit:1,shareTab:!0},{newInstance:i.sym(p.dir().uri+e+"/"),pane:t.session.paneRegistry.byName("folder"),predicate:o.meeting("pictures"),shareTab:!0,tabTitle:e,view:"slideshow",noIndexHTML:!0})},L=function(e){return _({icon:"noun_681601.svg",limit:1,shareTab:!0},{newInstance:i.sym(p.dir().uri+"Files/"),pane:t.session.paneRegistry.byName("folder"),predicate:o.meeting("materialsFolder"),tabTitle:"Materials",noIndexHTML:!0})},I=function(){return _({icon:"noun_339237.svg",limit:1,shareTab:!0},{newInstance:i.sym(p.dir().uri+"Attendees/index.ttl#this"),pane:t.session.paneRegistry.byName("contact"),predicate:o.meeting("attendeeGroup"),tabTitle:"Attendees",instanceClass:o.vcard("Group"),instanceName:r.utils.label(e)+" attendees",noIndexHTML:!0})};function _(e,n){return new Promise(function(i,o){const a=t.session.store;if(!n.useExisting){const t=a.any(p,n.predicate);if(t){if(e.limit&&1===e.limit&&!e.shareTab)return c("Already have "+t+" as "+r.utils.label(n.predicate)),c("Cant have two"),i(null);if(e.shareTab)return console.log("Using existing "+t+" as "+r.utils.label(n.predicate)),i({me:C,newInstance:t,instanceClass:n.instanceClass})}}C||n.me||o(new Error("Username not defined for new tool")),n.me=n.me||C,n.newInstance=n.useExisting||n.newInstance||a.sym(n.newBase+"index.ttl#this"),n.pane.mintNew(t,n).then(function(e){const t=T(e.newInstance,e.predicate,e.tabTitle,e.pane.icon);e.view&&a.add(t,r.ns.meeting("view"),e.view,g),x(),a.fetcher.putBack(g,{contentType:"text/turtle"}).then(function(t){i(e)}).catch(function(e){o(e)})}).catch(function(e){c(e),o(e)})})}const P=function(){const e=r.login.selectWorkspace(n,{noun:"meeting"},function(i,o){s.mintNew(t,{newBase:o}).then(function(t){const i=t.newInstance;D.removeChild(e);const o=D.appendChild(n.createElement("p"));o.setAttribute("style","font-size: 140%;"),o.innerHTML="Your <a target='_blank' href='"+i.uri+"'><b>new meeting</b></a> is ready to be set up. <br/><br/><a target='_blank' href='"+i.uri+"'>Go to your new meeting.</a>"}).catch(function(t){D.removeChild(e),D.appendChild(r.widgets.errorMessageBlock(n,t))})});D.appendChild(e)},N=[{icon:"noun_339237.svg",maker:function(e){const n=h+"Group/",i=t.session.store;let a=i.any(p,o.meeting("particpants"));a||(a=l.sym(n+"index.ttl#this")),console.log("Participant group: "+a);const s=T(a,o.meeting("particpants"),"Particpants",r.icons.iconBase+"noun_339237.svg");i.add(s,r.ns.meeting("view"),"peoplePicker",g),x()},hint:"Make a group of people",limit:1},{icon:"noun_346777.svg",maker:function(e){return _(e,{useExisting:p,pane:t.session.paneRegistry.byName("schedule"),view:"schedule",tabTitle:"Schedule poll",noIndexHTML:!0})},hint:"Make a poll to schedule the meeting"},{icon:"noun_48218.svg",maker:function(e){},limit:1,hint:"Add an agenda list",disabled:!0},{icon:"noun_79217.svg",maker:function(e){return _(e,{newBase:h+"SharedNotes/",predicate:r.ns.meeting("sharedNotes"),tabTitle:"Shared Notes",pane:t.session.paneRegistry.byName("pad")})},hint:"Add a shared notepad"},{icon:"noun_346319.svg",maker:function(e){const n=h+"Chat/",i=t.session.store;if(i.holds(p,o.meeting("chat")))return void console.log("Ignored - already have chat");const a=i.sym(n+"chat.ttl");i.add(a,o.rdf("type"),o.meeting("Chat"),a),T(a,o.meeting("chat"),"Chat",r.icons.iconBase+"noun_346319.svg"),k(0,a,o.meeting("chat"))},limit:1,hint:"Add a chat channel for the meeting"},{icon:"noun_17020.svg",maker:function(e){const n=h+"Actions/",i=t.session.store;if(i.holds(p,o.meeting("actions")))return void console.log("Ignored - already have actions");const a=i.sym(n+"config.ttl"),s=i.sym(n+"config.ttl#this"),l=i.sym(n+"state.ttl");i.add(s,o.dc("title"),(i.anyValue(p,o.cal("summary"))||"Meeting ")+" actions",a),i.add(s,o.wf("issueClass"),o.wf("Task"),a),i.add(s,o.wf("initialState"),o.wf("Open"),a),i.add(s,o.wf("stateStore"),l,a),i.add(s,o.wf("assigneeClass"),o.foaf("Person"),a),i.add(s,o.rdf("type"),o.wf("Tracker"),a),i.add(s,o.rdf("type"),o.wf("Tracker"),a),T(s,o.meeting("actions"),"Actions",r.icons.iconBase+"noun_17020.svg"),k(0,s,o.meeting("actions"))},limit:1,hint:"Add a list of action items"},{icon:"noun_260227.svg",maker:function(e){const n=t.session.store,i=l.sym("https://meet.jit.si/"+r.utils.genUuid());if(n.holds(p,o.meeting("videoCallPage")))return void console.log("Ignored - already have a videoCallPage");n.add(i,o.rdf("type"),o.meeting("VideoCallPage"),g);const a=T(i,o.meeting("videoCallPage"),"Video call",r.icons.iconBase+"noun_260227.svg");n.add(a,o.meeting("view"),"iframe",g),x()},limit:1,hint:"Add a video call for the meeting"},{icon:"noun_25830.svg",maker:function(e){r.widgets.askName(n,i,D,o.log("uri"),r.ns.rdf("Resource")).then(function(e){if(!e)return z();const n=t.session.store,i=r.ns,o=n.sym(e),a=T(o,i.wf("attachment"),r.utils.label(o),null);n.add(a,i.meeting("view"),"iframe",g),x()}).catch(function(e){c("Error making new sub-meeting: "+e)})},hint:"Attach meeting materials",disabled:!1},{icon:"noun_123691.svg",maker:function(e){const n=t.session.store,i=r.ns,o=p.dir();if(e.limit&&1===e.limit&&n.holds(p,i.wf("sharingControl")))return void c("Ignored - already have "+r.utils.label(Y.predicate));const a=T(o,i.wf("sharingControl"),"Sharing",r.icons.iconBase+"noun_123691.svg");n.add(a,i.meeting("view"),"sharing",g),x()},limit:1,hint:"Control Sharing",disabled:!1},{icon:"noun_66617.svg",maker:function(e){r.widgets.askName(n,i,D,o.foaf("name"),r.ns.meeting("Meeting")).then(function(n){if(!n)return z();const i=encodeURIComponent(n),o={newBase:h+i+"/",predicate:r.ns.meeting("subMeeting"),tabTitle:n,pane:t.session.paneRegistry.byName("meeting")};return _(e,o)}).catch(function(e){c("Error making new sub-meeting: "+e)})},hint:"Make a sub meeting",disabled:!1}],S=l.sym("https://solid.github.io/solid-panes/meeting/meetingDetailsForm.ttl#settings");l.parse('@prefix : <http://www.w3.org/ns/ui#> .\n@prefix f: <#> .\n@prefix dc: <http://purl.org/dc/elements/1.1/>.\n@prefix cal: <http://www.w3.org/2002/12/cal/ical#>.\n@prefix meeting: <http://www.w3.org/ns/pim/meeting#>.\n@prefix ns: <http://www.w3.org/2006/vcard/ns#> .\n@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.\n@prefix te: <http://purl.org/dc/terms/> .\n@prefix dc: <http://purl.org/dc/elements/1.1/>.\n@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.\n@prefix ui: <http://www.w3.org/ns/ui#>.\n\n f:main a :Form;\n cal:summary "Meeting Details";\n :part f:titleField, f:locationField, f:startField,\n f:endField, f:eventComment, f:colorField .\n\n f:titleField a :SingleLineTextField;\n :maxLength 256;\n :property cal:summary;\n :label "Name of meeting";\n :size 80 .\n\n f:locationField a :SingleLineTextField;\n :maxLength 128;\n :property cal:location;\n :size 40 .\n\n f:startField a :DateField;\n :label "Start";\n :property cal:dtstart .\n\n f:endField a :DateField;\n :label "End";\n :property cal:dtend .\n\n f:colorField a :ColorField;\n :label "Tab color";\n # :default "#ddddcc"^^xsd:color;\n :property ui:backgroundColor .\n\n f:eventComment\n a ui:MultiLineTextField;\n # ui:maxLength\n # "1048";\n # ui:size\n # "40".\n ui:property\n cal:comment.\n\n###################################################\n\nf:settings a :Form;\n dc:title "Tab settings";\n :part f:labelField, f:targetField, f:viewField.\n\n f:labelField a :SingleLineTextField;\n :maxLength 128;\n :property rdfs:label;\n :label "Label on tab";\n :size 40 .\n\n f:targetField a :NamedNodeURIField;\n :maxLength 1024; # Longer?\n :property meeting:target;\n :label "URL of resource";\n :size 80 .\n\n f:colorField2 a :ColorField;\n :label "Tab color";\n # :default "#ddddcc"^^xsd:color;\n :property ui:backgroundColor .\n\n f:viewField a :SingleLineTextField;\n :maxLength 128;\n :property meeting:view;\n :label "View mode (experts only)";\n :size 40 .\n\n#\n',i,S.doc().uri,"text/turtle");const B="padding: 1em; width: 3em; height: 3em;",R=v.appendChild(n.createElement("td")),D=v.appendChild(n.createElement("td")),O=R.appendChild(n.createElement("img"));let U=!1;O.setAttribute("src",r.icons.iconBase+"noun_19460_green.svg"),O.setAttribute("style",B+"opacity: 50%;"),O.setAttribute("title","Add another tool to the meeting");const G=function(e){U=!U,O.setAttribute("style",B+(U?"background-color: yellow;":"")),H(U?"":"display: none;")};let j;d.authn.checkUser().then(e=>{if(e)return C=e,O.addEventListener("click",G),void O.setAttribute("style",B);j=r.login.loginStatusBox(n,e=>{e?(C=i.sym(e),D.removeChild(j),O.addEventListener("click",G),O.setAttribute("style",B)):(console.log("(Logged out)"),C=null)}),j.setAttribute("style","margin: 0.5em 1em;"),D.appendChild(j)});const W=[];for(let e=0;e<N.length;e++)(function(){const t=N[e],i=R.appendChild(n.createElement("img"));i.setAttribute("src",r.icons.iconBase+t.icon),i.setAttribute("style",B+"display: none;"),W.push(i),i.tool=t;const o=t.maker;t.disabled||i.addEventListener("click",function(e){V(i),o(t)})})();const H=function(e){for(let t=0;t<W.length;t++){let n=B+e;N[t].disabled&&(n+="opacity: 0.3;"),W[t].setAttribute("style",n)}},z=function(){H("display: none;"),O.setAttribute("style",B)},V=function(e){H("display: none;"),e.setAttribute("style",B+"background-color: yellow;")},Y={dom:n};Y.predicate=o.meeting("toolList"),Y.subject=e,Y.ordered=!0,Y.orientation=1,Y.renderMain=function(e,a){let s,m=null,h=null;e.innerHTML="";const f=function(t,n){t||(e.textContent=""+n)},b=function(){e.appendChild(n.createElement("h3")).textContent="Details of meeting";const t=l.sym("https://solid.github.io/solid-panes/meeting/meetingDetailsForm.ttl#main");r.widgets.appendForm(document,e,{},p,t,p.doc(),f),e.appendChild(function(){const e=n.createElement("div"),t=e.appendChild(n.createElement("p"));return t.setAttribute("style","margin: 0em; padding:3em; color: #888;"),t.textContent="Tip: Drag URL-bar icons of web pages into the tab bar on the left to add new meeting materials.",e}()),C=d.authn.currentUser(),C&&i.add(p,o.dc("author"),C,g);const a={noun:"meeting",me:C,statusArea:e,div:e,dom:n};r.login.registrationControl(a,p,o.meeting("Meeting")).then(function(e){console.log("Registration control finsished.")}),r.pad.manageParticipation(n,e,g,p,C,{});const s="height: 2em; width: 2em; margin:0.5em;",c=e.appendChild(n.createElement("div")),u=c.appendChild(n.createElement("img"));u.setAttribute("src",r.icons.iconBase+"noun_145978.svg"),u.setAttribute("title","Make a fresh new meeting"),u.addEventListener("click",P),u.setAttribute("style",s);const m=c.appendChild(n.createElement("a"));m.setAttribute("href","https://github.com/solid/solid-panes"),m.setAttribute("target","_blank");const h=m.appendChild(n.createElement("img"));h.setAttribute("src",r.icons.iconBase+"noun_368567.svg"),h.setAttribute("title","Fork me on github"),h.setAttribute("style",s+"opacity: 50%;")};if(i.holds(a,o.rdf("type"),o.meeting("Tool"))){const g=i.any(a,o.meeting("target"));if(g.sameTerm(p)&&!i.any(a,o.meeting("view")))b();else{let f=i.any(a,o.meeting("view"));f=f?f.value:null,"details"===f?b():"peoplePicker"===f?function(){const t={div:e,dom:n};e.appendChild(n.createElement("h4")).textContent="Meeting Participants";const a=function(e){const t=[l.st(p,o.meeting("particpantGroup"),e,p.doc())];i.updater.update([],t,function(t,n,i){n?h=e:c("Cant save participants group: "+i)})};h=i.any(p,o.meeting("particpantGroup")),d.authn.checkUser().then(e=>{e&&u(i.sym(e)).then(function(){const e={defaultNewGroupName:"Meeting Participants",selectedGroup:h};new r.widgets.PeoplePicker(t.div,t.index.private[0],a,e).render()})})}():"iframe"===f?function(t){const i=e.appendChild(n.createElement("iframe"));i.setAttribute("src",t.uri),i.setAttribute("style","border: none; margin: 0; padding: 0; height: 100%; width: 100%;"),i.setAttribute("allow","microphone camera"),i.setAttribute("name","disable-x-frame-options"),e.style.padding=0}(g):(m=f?t.session.paneRegistry.byName(f):null,s=e.appendChild(n.createElement("table")),s.style.width="100%",t.getOutliner(n).GotoSubject(g,!0,m,!1,void 0,s))}}else a.sameTerm(p)?b():(!a.sameTerm(a.doc())||i.holds(a,r.ns.rdf("type"),r.ns.meeting("Chat"))||i.holds(a,r.ns.rdf("type"),r.ns.meeting("PaneView")))&&(s=e.appendChild(n.createElement("table")),t.getOutliner(n).GotoSubject(a,!0,void 0,!1,void 0,s))},Y.renderTab=function(e,t){if(i.holds(t,o.rdf("type"),o.meeting("Tool"))){const a=i.any(t,o.meeting("target"));let s=i.any(t,o.rdfs("label"));s=s?s.value:r.utils.label(a);const l=e.appendChild(n.createElement("div"));l.textContent=s,l.setAttribute("style","margin-left: 0.7em");const d=i.any(t,o.meeting("icon"));if(d){const t=e.appendChild(n.createElement("table")).appendChild(n.createElement("tr")),i=t.appendChild(n.createElement("td")),o=t.appendChild(n.createElement("td")),a=i.appendChild(n.createElement("img"));a.setAttribute("src",d.uri),a.setAttribute("style","width: 1.5em; height: 1.5em;"),a.setAttribute("title",s),o.appendChild(l)}else e.appendChild(l)}else e.textContent=r.utils.label(t)},Y.renderTabSettings=function(e,t){if(e.innerHTML="",e.style+="border-color: #eed;",e.appendChild(n.createElement("h3")).textContent="Adjust this tab",i.holds(t,o.rdf("type"),o.meeting("Tool"))){const a=l.sym("https://solid.github.io/solid-panes/meeting/meetingDetailsForm.ttl#settings");r.widgets.appendForm(document,e,{},t,a,p.doc(),m),r.widgets.deleteButtonWithCheck(n,e,"tab",function(){const e=i.the(p,o.meeting("toolList"));for(let n=0;n<e.elements.length;n++)if(e.elements[n].sameTerm(t)){e.elements.splice(n,1);break}const n=i.any(t,o.meeting("target")),a=i.statementsMatching(t).concat(i.statementsMatching(void 0,void 0,t)).concat(i.statementsMatching(p,void 0,n));i.remove(a),x()}).setAttribute("style","width: 1.5em; height: 1.5em;")}else e.appendChild(n.createElement("h4")).textContent="(No adjustments available)"},Y.backgroundColor=i.anyValue(e,o.ui("backgroundColor"))||"#ddddcc";const K=y.appendChild(r.tabs.tabWidget(Y));return r.aclControl.preventBrowserDropEvents(n),r.widgets.makeDropTarget(K.tabContainer,E,F),r.widgets.makeDropTarget(R,E,F),f}};return s})(),e.exports=i(n(3383),n(9676),n(2404))}}]);
2
+ //# sourceMappingURL=289.mashlib.min.js.map
@@ -0,0 +1 @@
1
+ (this.webpackChunkMashlib=this.webpackChunkMashlib||[]).push([[315],{8466(){}}]);
@@ -0,0 +1,2 @@
1
+ "use strict";(this.webpackChunkMashlib=this.webpackChunkMashlib||[]).push([[321],{1074(e,t,n){n.r(t),n.d(t,{default:()=>l});var a=n(3383),o=n(2404),r=n(9676),d=n(4940),i=n(5108),s=n(3581),c=n(480);const l={icon:a.icons.iconBase+"noun_79217.svg",name:"pad",audience:[a.ns.solid("PowerUser")],label:function(e,t){return t.session.store.findTypeURIs(e)["http://www.w3.org/ns/pim/pad#Notepad"]?"pad":null},mintClass:a.ns.pad("Notepad"),mintNew:function(e,t){const n=e.session.store,o=n.updater;if(t.me&&!t.me.uri)throw new Error("notepad mintNew: Invalid userid");const r=t.newInstance=t.newInstance||n.sym(t.newBase+"index.ttl#this"),d=r.doc();n.add(r,a.ns.rdf("type"),a.ns.pad("Notepad"),d),n.add(r,a.ns.dc("title"),"Shared Notes",d),n.add(r,a.ns.dc("created"),new Date,d),t.me&&n.add(r,a.ns.dc("author"),t.me,d);const i=n.sym(r.uri+"_line0");return n.add(r,a.ns.pad("next"),i,d),n.add(i,a.ns.pad("next"),r,d),n.add(i,a.ns.dc("author"),t.me,d),n.add(i,a.ns.sioc("content"),"",d),new Promise(function(e,a){o?o.put(d,n.statementsMatching(void 0,void 0,void 0,d),"text/turtle",function(n,o,r){o?e(t):a(new Error("FAILED to save new tool at: "+n+" : "+r))}):a(new Error("Have no updater"))})},render:function(e,t,n){const l=t.dom,p=t.session.store,u=function(e,t){e||D.appendChild(a.widgets.errorMessageBlock(l,t,"pink"))},h=function(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e},m=function(e,t,n){const o=(0,r.graph)(),d=(0,s.A)("http://www.w3.org/ns/auth/acl#");let i=o.sym(t+"#a1");const l=o.sym(t),p=o.sym(e);return o.add(i,a.ns.rdf("type"),d("Authorization"),l),o.add(i,d("accessTo"),p,l),o.add(i,d("agent"),b,l),o.add(i,d("mode"),d("Read"),l),o.add(i,d("mode"),d("Write"),l),o.add(i,d("mode"),d("Control"),l),i=o.sym(t+"#a2"),o.add(i,a.ns.rdf("type"),d("Authorization"),l),o.add(i,d("accessTo"),p,l),o.add(i,d("agentClass"),a.ns.foaf("Agent"),l),o.add(i,d("mode"),d("Read"),l),n&&o.add(i,d("mode"),d("Write"),l),(0,c.A)(l,o,t,"text/turtle")},f=function(e,t,n){const a=p.any((0,r.sym)(e),(0,r.sym)("http://www.iana.org/assignments/link-relations/acl"));if(!A)throw new Error("Have no fetcher");if(a){const o=m(e,a.uri,t);return A.webOperation("PUT",a.uri,{data:o,contentType:"text/turtle"}).then(()=>n(!0)).catch(e=>{n(!1,e.message)})}return A.load(e).catch(e=>{n(!1,"Getting headers for ACL: "+e)}).then(()=>{const n=p.any((0,r.sym)(e),(0,r.sym)("http://www.iana.org/assignments/link-relations/acl"));if(!n)throw new Error("No Link rel=ACL header for "+e);const a=m(e,n.uri,t);return A.webOperation("PUT",n.uri,{data:a,contentType:"text/turtle"})}).then(()=>n(!0)).catch(e=>{n(!1,e.message)})},w=function(e,t,n){const o=h(t);o.appendChild(a.login.newAppInstance(l,{noun:"notepad"},(e,t)=>E(new i.A(e||t)))),o.appendChild(l.createElement("hr"));o.appendChild(l.createElement("p")).textContent="Where would you like to store the data for the "+n+"? Give the URL of the directory where you would like the data stored.";const r=o.appendChild(l.createElement("input"));r.setAttribute("type","text"),r.size=80,r.label="base URL",r.autocomplete="on",o.appendChild(l.createElement("br"));const d=o.appendChild(l.createElement("button"));d.textContent="Start new "+n+" at this URI",d.addEventListener("click",function(t){let n=r.value;"/"!==n.slice(-1)&&(n+="/"),C(e,n)})},E=function(e){let t=p.any(e,a.ns.space("uriPrefix"));t=t?t.value:e.uri.split("#")[0],"/"!==t.slice(-1)&&(d.A.error(g+": No / at end of uriPrefix "+t),t+="/");const n=new Date;t+=g+"/id"+n.getTime()+"/",C(x,t)},C=function(e,t){const n=(0,r.sym)(e.uri.split("#")[0]),d=p.sym(t+"pad.ttl"),i=p.sym(t+"index.html"),s=[{local:"index.html",contentType:"text/html"}],c=p.sym(d.uri+"#thisPad"),h=[];let m;for(m=0;m<s.length;m++){const e=function(e){h.push(function(){const a=t+e.local;console.log("Copying "+n+e.local+" to "+a);if(!p.fetcher)throw new Error("Store has no fetcher");p.fetcher.webCopy(n+e.local,t+e.local,e.contentType).then(()=>o.authn.checkUser()).then(e=>{b=e,f(a,!1,function(e,t){e?h.shift()():(u(e,"FAILED to set ACL "+a+" : "+t),console.log("FAILED to set ACL "+a+" : "+t))})}).catch(t=>{console.log("FAILED to copy "+n+e.local+" : "+t.message),u(!1,"FAILED to copy "+n+e.local+" : "+t.message)})})};e(s[m])}h.push(function(){if(p.add(c,a.ns.rdf("type"),L("Notepad"),d),p.add(c,a.ns.dc("created"),new Date,d),b&&p.add(c,a.ns.dc("author"),b,d),p.add(c,L("next"),c,d),p.add(c,a.ns.space("inspiration"),e,I),p.add(c,a.ns.space("inspiration"),e,d),!v)throw new Error("Have no updater");v.put(d,p.statementsMatching(void 0,void 0,void 0,d),"text/turtle",function(e,t,n){t?h.shift()():(u(t,"FAILED to save new notepad at: "+d.uri+" : "+n),console.log("FAILED to save new notepad at: "+d.uri+" : "+n))})}),h.push(function(){f(d.uri,!0,function(e,t){u(e,"Failed to set Read-Write ACL on pad data file: "+t),e&&h.shift()()})}),h.push(function(){const e=D.appendChild(l.createElement("p"));e.setAttribute("style","font-size: 140%;"),e.innerHTML="Your <a href='"+i.uri+"'><b>new notepad</b></a> is ready. <br/><br/><a href='"+i.uri+"'>Go to new pad</a>"}),h.shift()()},y=function(t){console.log("showResults()"),b=o.authn.currentUser(),o.authn.checkUser().then(e=>{b=e});const r=p.any(e,a.ns.dc("title"))||p.any(e,a.ns.vcard("fn"));n.solo&&"undefined"!=typeof window&&r&&(window.document.title=r.value),W.exists=t,k=a.pad.notepad(l,I,e,b,W),U.appendChild(k);const d=p.any(e,a.ns.meeting("parentMeeting"))||e;if(a.pad.manageParticipation(l,M,I,d,b,W),!p.updater)throw new Error("Store has no updater");p.updater.setRefreshHandler(I,k.reloadAndSync)},g="app-pad.timbl.com",A=p.fetcher,v=p.updater;let b;const L=(0,s.A)("http://www.w3.org/ns/pim/pad#"),x=e,I=e.doc();let k;const D=l.createElement("div"),F=D.appendChild(l.createElement("table"));F.setAttribute("style","background-color: white; min-width: 94%; margin-right:3% margin-left: 3%; min-height: 13em;");const T=F.appendChild(l.createElement("tr"));T.appendChild(l.createElement("td")),T.appendChild(l.createElement("td")),T.appendChild(l.createElement("td"));const U=F.appendChild(l.createElement("tr")).appendChild(l.createElement("td"));U.setAttribute("colspan","3");const N=F.appendChild(l.createElement("tr")),R=N.appendChild(l.createElement("td")),M=N.appendChild(l.createElement("td")),P=N.appendChild(l.createElement("td")),H=F.appendChild(l.createElement("tr")).appendChild(l.createElement("div")),S=F.appendChild(l.createElement("tr")).appendChild(l.createElement("div")),z=F.appendChild(l.createElement("tr"));z.setAttribute("class","naviMenu"),z.appendChild(l.createElement("td")),z.appendChild(l.createElement("td")),z.appendChild(l.createElement("td"));const W={statusArea:H,timingArea:R};return function(){if(!A)throw new Error("Have no fetcher");A.nowOrWhenFetched(I.uri,void 0,function(t,n,o){if(t)h(U),p.holds(e,a.ns.rdf("type"),a.ns.wf("TemplateInstance"))&&w(e,U,"pad"),y(!0),P.appendChild(function(){const t=D.appendChild(l.createElement("button"));return t.textContent="Start another pad",t.addEventListener("click",function(){return w(e,S,"pad")}),t}());else if(404===o.status){if(console.log("Initializing results file "+I),!v)throw new Error("Have no updater");v.put(I,[],"text/turtle",function(e,t,n){t?(h(U),y(!1)):(u(t,"FAILED to create results file at: "+I.uri+" : "+n),console.log("FAILED to craete results file at: "+I.uri+" : "+n))})}else u(t,"FAILED to read results file: "+n)})}(),D}}}}]);
2
+ //# sourceMappingURL=321.mashlib.min.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";(this.webpackChunkMashlib=this.webpackChunkMashlib||[]).push([[322],{459(e,n,t){Object.defineProperty(n,"__esModule",{value:!0}),n.renderAutoComplete=async function(e,n,t){function s(e,n){console.log("Auto complete: finish! "+e),t(e,n)}async function i(e,t){if(n.acceptButton)return n.acceptButton.disabled=!1,O.value=t,v=t,C=e,console.log("Auto complete: name: "+t),void console.log("Auto complete: waiting for accept "+e);s(e,t)}async function l(e){O.value===v?s(C,v):n.acceptButton.disabled=!0}function d(e,n){const t=e.split(" ");for(let e=0;e<t.length;e++){const r=t[e];if(n.toLowerCase().indexOf(r)<0)return!1}return!0}function c(){for(;T.children.length>1&&T.lastChild;)T.removeChild(T.lastChild)}async function p(){if(h)return void console.log(`Ignoring "${O.value}" because of lock `);h=!0;const t=await(0,a.getPreferredLanguages)(),s=O.value.trim().toLowerCase();if(s.length<4)c(),f=!1,y=20;else{if(m&&g&&s.startsWith(g))return function(e){let n=0,t=null,o="";for(let r=T.children.length-1;r>0;r--){const a=T.children[r];d(e,a.textContent)?(n+=1,t=a.getAttribute("subject"),o=a.textContent,a.style.display="",a.style.color="blue"):a.style.display="none"}1===n&&t&&(console.log(` auto complete elimination: "${e}" -> "${o}"`),i(r.store.sym(t),o))}(s),void(h=!1);let l;try{l=await(0,a.queryPublicDataByName)(s,u,n.queryParams)}catch(n){return function(n){const t=T.appendChild(e.createElement("tr"));console.log(n),t.appendChild(o.widgets.errorMessageBlock(e,n,"pink")),o.style.setStyle(t,"autocompleteRowStyle"),t.style.padding="1em"}("Error querying db of organizations: "+n),void(h=!1)}f=!0;const p=l.length<a.AUTOCOMPLETE_LIMIT;g=p?s:null,c();const w=(0,a.filterByLanguage)(l,t);p&&w.length<=40&&(y=w.length),m=p&&w.length<=y,console.log(` Filter:"${s}" bindings: ${l.length}, slimmed to ${w.length}; rows: ${y}, Enough? ${p}, All displayed? ${m}`),w.slice(0,y).forEach(n=>{const t=T.appendChild(e.createElement("tr"));o.style.setStyle(t,"autocompleteRowStyle");const a=n.subject.value,s=n.name?.value;t.setAttribute("style","padding: 0.3em;"),t.setAttribute("subject",a),t.style.color=m?"#080":"#000",t.textContent=s||"",t.addEventListener("click",async e=>{console.log(" click row textContent: "+t.textContent),console.log(" click name: "+s),i(r.store.sym(a),s||"")})})}h=!1}const u=n.class;n.acceptButton&&n.acceptButton.addEventListener("click",l,!1);n.cancelButton;let f=!1;const w=null;let h=!1,m=!1;var g=null,y=20;const b=e.createElement("div");var v=null,C=null,T=b.appendChild(e.createElement("table"));T.setAttribute("style","max-width: 30em; margin: 0.5em;");const P=T.appendChild(e.createElement("tr"));o.style.setStyle(P,"autocompleteRowStyle");const O=P.appendChild(e.createElement("td")).appendChild(e.createElement("input"));O.setAttribute("type","text");const D=o.style.searchInputStyle||"border: 0.1em solid #444; border-radius: 0.5em; width: 100%; font-size: 100%; padding: 0.1em 0.6em";return O.setAttribute("style",D),O.addEventListener("keyup",function(e){13===e.keyCode&&l(e)},!1),O.addEventListener("input",async function(e){w&&clearTimeout(w);setTimeout(p,300)}),b};var r=t(2404),o=t(3383),a=t(9436)},1450(e,n,t){Object.defineProperty(n,"__esModule",{value:!0}),n.loadTurtleText=f,n.renderIndividual=async function(e,n,t,d){function w(t){console.log(t),n.appendChild(r.widgets.errorMessageBlock(e,t,"pink"))}function h(){n.appendChild(e.createElement("div")).setAttribute("style","height: 1em")}const m=p.findTypeURIs(t),g=!(!m[c.vcard("Organization").uri]&&!m[c.schema("Organization").uri]),y=p.updater.editable(t.doc().uri,p),b=p.sym("https://solid.github.io/solid-panes/contact/individualForm.ttl#form1");f(p,b,'# This turtle file defined the forms usied in the contacts management\n#\n# Indivduals and orgs are in one file as they both\n# share some forms (address etc) and also interact (roles)\n\n# Now hand-edited, was originally made using form editor.\n# Forms documentaion: https://solid.github.io/solid-ui/Documentation/forms-intro.html\n\n@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.\n@prefix dct: <http://purl.org/dc/terms/>.\n@prefix foaf: <http://xmlns.com/foaf/0.1/>.\n@prefix owl: <http://www.w3.org/2002/07/owl#>.\n@prefix prov: <http://www.w3.org/ns/prov#>.\n@prefix ui: <http://www.w3.org/ns/ui#>.\n@prefix schema: <http://schema.org/>.\n@prefix solid: <http://www.w3.org/ns/solid/terms#>.\n@prefix vcard: <http://www.w3.org/2006/vcard/ns#>.\n@prefix : <#>.\n\n# Ontology additions or interpretations needed for the form to work well\n\n# The ontology file doesn\'t make them disjoint. This makes the selector be a choice.\nvcard:TelephoneType owl:disjointUnionOf ( vcard:Cell vcard:Home vcard:Work) .\nvcard:Type owl:disjointUnionOf (vcard:Home vcard:Work) . # for email\n\n# Better field labels\nvcard:Cell ui:label "mobile"@en . # app will imake nitial caps if nec\nvcard:hasAddress ui:label "address"@en .\nvcard:bday ui:label "born"@en.\nvcard:hasEmail ui:label "email"@en .\nvcard:hasTelephone ui:label "phone"@en .\nvcard:note ui:label "notes"@en .\n\n\n\n# Ontology data to drive a top classifier\n\nfoaf:Agent owl:disjointUnionOf (\n vcard:Individual\n # @@ schema:robot @@ schem:SoftwareApplication, n0:Agent, n0:Person,\n prov:SoftwareAgent\n # vcard:Group a group of agents is not (currently) an agent itself.\n # You can\'t get a decision out of it so it can\'t own a bank account\n vcard:Organization\n).\n\n\n# Ontology data to drive the classifier\n\nsolid:InterestingOrganization owl:disjointUnionOf (\n# Airline - a Corpration\n# Consortium - a Corporation or a NGO\n schema:Corporation\n schema:EducationalOrganization\n schema:ResearchOrganization\n# FundingScheme - eh?\n schema:GovernmentOrganization\n# LibrarySystem\n# LocalBusiness - Corporation\n schema:MedicalOrganization\n schema:NGO\n # NewsMediaOrganization - a Corporation or a NGO\n schema:MusicGroup # e.g. a band\n schema:Project # like Solid\n schema:SportsOrganization # a Team\n ) .\n\n#########################################################\n# The forms themselves\n\nfoaf:Agent ui:creationForm :AgentForm .\n\n:AgentForm a ui:Form; schema:name "Form for editing a agent" ;\n ui:parts ( :AgentClassifier :AgentOptions ) .\n\n :AgentClassifier a ui:Classifier; ui:label "What sort of agent?"@en;\n ui:category foaf:Agent .\n\n:AgentOptions a ui:Options; ui:dependingon rdf:type;\n ui:case [ ui:for vcard:Individual; ui:use :form1 ],\n [ ui:for vcard:Organization; ui:use :orgDetailsForm ],\n [ ui:for prov:SoftwareAgent; ui:use :robotDetailsForm ] .\n\n# Robots\n\n:robotDetailsForm a ui:Form; ui:parts ( ) . # @@@@\n\n# Individual-specific form\n\nvcard:Individual\n ui:creationForm :form1 .\n\n# The addressComment, etc., fields with a comment before each type of field\n# were originally partly because the labels on the fields were clumsy like "hasAddress".\n# This is fixed by adding the ui:label to the properties above, so let\'s try\n# removing the little micro-headings\n\n# For org:\n:orgDetailsForm a ui:Form ; dct:title "Contact details for an organozation";\n ui:parts (\n :OrgClassifier\n\n :fullNameField\n :addresses\n :eMails\n :telephones\n :noteField ) .\n# For individual:\n:form1\n dct:title "Contact Details for a person" ;\n a ui:Form ;\n ui:part\n :fullNameField, :roleField, :orgNameField,\n # :addressesComment,\n :addresses,\n # :emailComment,\n :eMails,\n# :telephoneComment,\n :telephones,\n# :noteComment,\n :noteField ;\n ui:parts (\n :fullNameField :roleField :orgNameField\n # :addressesComment\n :addresses\n # :emailComment\n :eMails\n # :telephoneComment\n :telephones :birthdayField\n # :noteComment\n :noteField ) .\n\n :fullNameField\n a ui:SingleLineTextField ;\n ui:label "Name";\n ui:maxLength "128" ;\n ui:property vcard:fn ;\n ui:size "40" .\n\n :roleField\n a ui:SingleLineTextField ;\n ui:suppressEmptyUneditable true;\n ui:maxLength "128" ;\n ui:property vcard:role ;\n ui:size "40" .\n\n :orgNameField\n a ui:SingleLineTextField ;\n ui:suppressEmptyUneditable true;\n ui:maxLength "128" ;\n ui:property vcard:organization-name ;\n ui:size "40" .\n\n\n:addressesComment\n a ui:Comment ;\n ui:suppressIfUneditable true;\n ui:contents "Address" .\n\n\n:addresses\n dct:title "Address details" ;\n a ui:Multiple ;\n ui:part :oneAddress ;\n ui:property vcard:hasAddress .\n\n:oneAddress\n a ui:Group ;\n ui:parts ( :id1409437207443 :id1409437292400 :id1409437421996 :id1409437467649 :id1409437569420 ). # :id1409437646712\n\n:id1409437207443\n a ui:SingleLineTextField ;\n ui:maxLength "128" ;\n ui:property vcard:street-address ;\n ui:size "40" .\n\n:id1409437292400\n a ui:SingleLineTextField ;\n ui:maxLength "128" ;\n ui:property vcard:locality ;\n ui:size "40" .\n\n:id1409437421996\n a ui:SingleLineTextField ;\n ui:maxLength "25" ;\n ui:property vcard:postal-code ;\n ui:size "25" .\n\n:id1409437467649\n a ui:SingleLineTextField ;\n ui:maxLength "128" ;\n ui:property vcard:region ;\n ui:size "40" .\n\n:id1409437569420\n a ui:SingleLineTextField ;\n ui:maxLength "128" ;\n ui:property vcard:country-name ;\n ui:size "40" .\n\n:id1409437646712\n a ui:Classifier ;\n ui:from rdf:Class ;\n ui:property rdf:type .\n\n\n##############################\n\n:emailComment\n a ui:Comment ;\n ui:suppressIfUneditable true;\n\n ui:contents "Email" .\n\n\n:eMails\n a ui:Multiple ;\n ui:part :oneEMail ;\n ui:property vcard:hasEmail .\n\n:oneEMail\n a ui:Group ; # hint: side by side is good\n ui:part :emailValue, :emailType ;\n ui:parts ( :emailType :emailValue ).\n\n:emailValue\n a ui:EmailField ; ui:label "email";\n ui:property vcard:value ;\n ui:size "50" .\n\n:emailType\n a ui:Classifier ;\n ui:canMintNew "0" ;\n ui:category vcard:Type ;\n ui:from vcard:Type ;\n ui:property rdf:type .\n\n\n##############################\n\n:telephoneComment\n a ui:Comment ;\n ui:suppressIfUneditable true;\n ui:contents "Phones" .\n\n\n:telephones\n a ui:Multiple ;\n ui:part :onetelephone ;\n ui:property vcard:hasTelephone .\n\n:onetelephone\n a ui:Group ;\n ui:part :telephoneValue, :telephoneType ;\n ui:parts ( :telephoneType :telephoneValue ).\n\n:telephoneValue\n a ui:PhoneField ;\n ui:property vcard:value ;\n ui:size "50" .\n\n:telephoneType\n a ui:Classifier ;\n ui:canMintNew "0" ;\n ui:category vcard:TelephoneType ;\n ui:from vcard:Type ;\n ui:property rdf:type .\n\n##############################\n\n:birthdayField\n a ui:DateField;\n ui:label "Born";\n ui:suppressEmptyUneditable true;\n ui:property vcard:bday .\n\n##############################\n\n:noteComment\n a ui:Comment ;\n ui:suppressIfUneditable true;\n ui:contents "General Notes" .\n\n:noteField\n a ui:MultiLineTextField ;\n ui:suppressEmptyUneditable true;\n\n ui:property vcard:note .\n\n\n############ organization forms\n\n:OrganinizatioCreationForm a ui:Form; schema:name "Form for editing contact details of an organization" ;\n ui:parts ( :OrgClassifier :homePageURIField ) .\n\n\n:OrgClassifier a ui:Classifier; ui:label "What sort of organization?"@en;\n ui:category solid:InterestingOrganization .\n\n\n:instituteNameField\n a ui:SingleLineTextField ;\n ui:label "Intitute Name";\n ui:maxLength "200" ;\n ui:property schema:name ;\n ui:size "80" .\n\n :homePageURIField a ui:NamedNodeURIField;\n ui:property schema:url . # @@ ??\n\n :initituteTypeField a ui:Classifier;\n ui:label "What sort of organization";\n ui:category solid:InterestingOrganization .\n');const v=p.sym("https://solid.github.io/solid-panes/contact/individualForm.ttl#orgDetailsForm"),C=r.ns.vcard("Type").doc();p.holds(void 0,void 0,void 0,C)||l.parse('@prefix : <http://www.w3.org/2006/vcard/ns#> .\n@prefix owl: <http://www.w3.org/2002/07/owl#> .\n@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .\n@prefix xml: <http://www.w3.org/XML/1998/namespace> .\n@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .\n\n:Acquaintance a owl:Class ;\n rdfs:label "Acquaintance"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Agent a owl:Class ;\n rdfs:label "Agent"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:BBS a owl:Class ;\n rdfs:label "BBS"@en ;\n rdfs:comment "This class is deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :TelephoneType ;\n owl:deprecated true .\n\n:Car a owl:Class ;\n rdfs:label "Car"@en ;\n rdfs:comment "This class is deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :TelephoneType ;\n owl:deprecated true .\n\n:Cell a owl:Class ;\n rdfs:label "Cell"@en ;\n rdfs:comment "Also called mobile telephone"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :TelephoneType .\n\n:Child a owl:Class ;\n rdfs:label "Child"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Colleague a owl:Class ;\n rdfs:label "Colleague"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Contact a owl:Class ;\n rdfs:label "Contact"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Coresident a owl:Class ;\n rdfs:label "Coresident"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Coworker a owl:Class ;\n rdfs:label "Coworker"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Crush a owl:Class ;\n rdfs:label "Crush"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Date a owl:Class ;\n rdfs:label "Date"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Dom a owl:Class ;\n rdfs:label "Dom"@en ;\n rdfs:comment "This class is deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Type ;\n owl:deprecated true .\n\n:Emergency a owl:Class ;\n rdfs:label "Emergency"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Fax a owl:Class ;\n rdfs:label "Fax"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :TelephoneType .\n\n:Female a owl:Class ;\n rdfs:label "Female"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Gender .\n\n:Friend a owl:Class ;\n rdfs:label "Friend"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Home a owl:Class ;\n rdfs:label "Home"@en ;\n rdfs:comment "This implies that the property is related to an individual\'s personal life"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Type .\n\n:ISDN a owl:Class ;\n rdfs:label "ISDN"@en ;\n rdfs:comment "This class is deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Type ;\n owl:deprecated true .\n\n:Internet a owl:Class ;\n rdfs:label "Internet"@en ;\n rdfs:comment "This class is deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Type ;\n owl:deprecated true .\n\n:Intl a owl:Class ;\n rdfs:label "Intl"@en ;\n rdfs:comment "This class is deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Type ;\n owl:deprecated true .\n\n:Kin a owl:Class ;\n rdfs:label "Kin"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Label a owl:Class ;\n rdfs:label "Label"@en ;\n rdfs:comment "This class is deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Type ;\n owl:deprecated true .\n\n:Male a owl:Class ;\n rdfs:label "Male"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Gender .\n\n:Me a owl:Class ;\n rdfs:label "Me"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Met a owl:Class ;\n rdfs:label "Met"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Modem a owl:Class ;\n rdfs:label "Modem"@en ;\n rdfs:comment "This class is deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :TelephoneType ;\n owl:deprecated true .\n\n:Msg a owl:Class ;\n rdfs:label "Msg"@en ;\n rdfs:comment "This class is deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :TelephoneType ;\n owl:deprecated true .\n\n:Muse a owl:Class ;\n rdfs:label "Muse"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Neighbor a owl:Class ;\n rdfs:label "Neighbor"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:None a owl:Class ;\n rdfs:label "None"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Gender .\n\n:Other a owl:Class ;\n rdfs:label "Other"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Gender .\n\n:PCS a owl:Class ;\n rdfs:label "PCS"@en ;\n rdfs:comment "This class is deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :TelephoneType ;\n owl:deprecated true .\n\n:Pager a owl:Class ;\n rdfs:label "Pager"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :TelephoneType .\n\n:Parcel a owl:Class ;\n rdfs:label "Parcel"@en ;\n rdfs:comment "This class is deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Type ;\n owl:deprecated true .\n\n:Parent a owl:Class ;\n rdfs:label "Parent"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Postal a owl:Class ;\n rdfs:label "Postal"@en ;\n rdfs:comment "This class is deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Type ;\n owl:deprecated true .\n\n:Pref a owl:Class ;\n rdfs:label "Pref"@en ;\n rdfs:comment "This class is deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Type ;\n owl:deprecated true .\n\n:Sibling a owl:Class ;\n rdfs:label "Sibling"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Spouse a owl:Class ;\n rdfs:label "Spouse"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Sweetheart a owl:Class ;\n rdfs:label "Sweetheart"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :RelatedType .\n\n:Tel a owl:Class ;\n rdfs:label "Tel"@en ;\n rdfs:comment "This class is deprecated. Use the hasTelephone object property."@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:deprecated true .\n\n:Text a owl:Class ;\n rdfs:label "Text"@en ;\n rdfs:comment "Also called sms telephone"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :TelephoneType .\n\n:TextPhone a owl:Class ;\n rdfs:label "Text phone"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :TelephoneType .\n\n:Unknown a owl:Class ;\n rdfs:label "Unknown"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Gender .\n\n:Video a owl:Class ;\n rdfs:label "Video"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :TelephoneType .\n\n:Voice a owl:Class ;\n rdfs:label "Voice"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :TelephoneType .\n\n:Work a owl:Class ;\n rdfs:label "Work"@en ;\n rdfs:comment "This implies that the property is related to an individual\'s work place"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Type .\n\n:X400 a owl:Class ;\n rdfs:label "X400"@en ;\n rdfs:comment "This class is deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Type ;\n owl:deprecated true .\n\n:adr a owl:ObjectProperty ;\n rdfs:label "address"@en ;\n rdfs:comment "This object property has been mapped"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentProperty :hasAddress .\n\n:agent a owl:ObjectProperty ;\n rdfs:label "agent"@en ;\n rdfs:comment "This object property has been deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:deprecated true .\n\n:anniversary a owl:DatatypeProperty ;\n rdfs:label "anniversary"@en ;\n rdfs:comment "The date of marriage, or equivalent, of the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range [ a rdfs:Datatype ;\n owl:unionOf ( xsd:dateTime xsd:gYear ) ] .\n\n:bday a owl:DatatypeProperty ;\n rdfs:label "birth date"@en ;\n rdfs:comment "To specify the birth date of the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range [ a rdfs:Datatype ;\n owl:unionOf ( xsd:dateTime xsd:dateTimeStamp xsd:gYear ) ] .\n\n:category a owl:DatatypeProperty ;\n rdfs:label "category"@en ;\n rdfs:comment "The category information about the object, also known as tags"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:class a owl:DatatypeProperty ;\n rdfs:label "class"@en ;\n rdfs:comment "This data property has been deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:deprecated true .\n\n:email a owl:ObjectProperty ;\n rdfs:label "email"@en ;\n rdfs:comment "This object property has been mapped"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentProperty :hasEmail .\n\n:extended-address a owl:DatatypeProperty ;\n rdfs:label "extended address"@en ;\n rdfs:comment "This data property has been deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:deprecated true .\n\n:geo a owl:ObjectProperty ;\n rdfs:label "geo"@en ;\n rdfs:comment "This object property has been mapped"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentProperty :hasGeo .\n\n:hasAdditionalName a owl:ObjectProperty ;\n rdfs:label "has additional name"@en ;\n rdfs:comment "Used to support property parameters for the additional name data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasCalendarBusy a owl:ObjectProperty ;\n rdfs:label "has calendar busy"@en ;\n rdfs:comment "To specify the busy time associated with the object. (Was called FBURL in RFC6350)"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasCalendarLink a owl:ObjectProperty ;\n rdfs:label "has calendar link"@en ;\n rdfs:comment "To specify the calendar associated with the object. (Was called CALURI in RFC6350)"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasCalendarRequest a owl:ObjectProperty ;\n rdfs:label "has calendar request"@en ;\n rdfs:comment "To specify the calendar user address to which a scheduling request be sent for the object. (Was called CALADRURI in RFC6350)"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasCategory a owl:ObjectProperty ;\n rdfs:label "has category"@en ;\n rdfs:comment "Used to support property parameters for the category data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasCountryName a owl:ObjectProperty ;\n rdfs:label "has country name"@en ;\n rdfs:comment "Used to support property parameters for the country name data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasFN a owl:ObjectProperty ;\n rdfs:label "has formatted name"@en ;\n rdfs:comment "Used to support property parameters for the formatted name data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasFamilyName a owl:ObjectProperty ;\n rdfs:label "has family name"@en ;\n rdfs:comment "Used to support property parameters for the family name data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasGender a owl:ObjectProperty ;\n rdfs:label "has gender"@en ;\n rdfs:comment "To specify the sex or gender identity of the object. URIs are recommended to enable interoperable sex and gender codes to be used."@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasGivenName a owl:ObjectProperty ;\n rdfs:label "has given name"@en ;\n rdfs:comment "Used to support property parameters for the given name data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasHonorificPrefix a owl:ObjectProperty ;\n rdfs:label "has honorific prefix"@en ;\n rdfs:comment "Used to support property parameters for the honorific prefix data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasHonorificSuffix a owl:ObjectProperty ;\n rdfs:label "has honorific suffix"@en ;\n rdfs:comment "Used to support property parameters for the honorific suffix data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasInstantMessage a owl:ObjectProperty ;\n rdfs:label "has messaging"@en ;\n rdfs:comment "To specify the instant messaging and presence protocol communications with the object. (Was called IMPP in RFC6350)"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasLanguage a owl:ObjectProperty ;\n rdfs:label "has language"@en ;\n rdfs:comment "Used to support property parameters for the language data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasLocality a owl:ObjectProperty ;\n rdfs:label "has locality"@en ;\n rdfs:comment "Used to support property parameters for the locality data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasNickname a owl:ObjectProperty ;\n rdfs:label "has nickname"@en ;\n rdfs:comment "Used to support property parameters for the nickname data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:seeAlso :nickname .\n\n:hasNote a owl:ObjectProperty ;\n rdfs:label "has note"@en ;\n rdfs:comment "Used to support property parameters for the note data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasOrganizationName a owl:ObjectProperty ;\n rdfs:label "has organization name"@en ;\n rdfs:comment "Used to support property parameters for the organization name data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasOrganizationUnit a owl:ObjectProperty ;\n rdfs:label "has organization unit name"@en ;\n rdfs:comment "Used to support property parameters for the organization unit name data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasPostalCode a owl:ObjectProperty ;\n rdfs:label "has postal code"@en ;\n rdfs:comment "Used to support property parameters for the postal code data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasRegion a owl:ObjectProperty ;\n rdfs:label "has region"@en ;\n rdfs:comment "Used to support property parameters for the region data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasRelated a owl:ObjectProperty ;\n rdfs:label "has related"@en ;\n rdfs:comment "To specify a relationship between another entity and the entity represented by this object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasRole a owl:ObjectProperty ;\n rdfs:label "has role"@en ;\n rdfs:comment "Used to support property parameters for the role data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasSource a owl:ObjectProperty ;\n rdfs:label "has source"@en ;\n rdfs:comment "To identify the source of directory information of the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasStreetAddress a owl:ObjectProperty ;\n rdfs:label "has street address"@en ;\n rdfs:comment "Used to support property parameters for the street address data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasTitle a owl:ObjectProperty ;\n rdfs:label "has title"@en ;\n rdfs:comment "Used to support property parameters for the title data property"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasUID a owl:ObjectProperty ;\n rdfs:label "has uid"@en ;\n rdfs:comment "To specify a value that represents a globally unique identifier corresponding to the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasValue a owl:ObjectProperty ;\n rdfs:label "has value"@en ;\n rdfs:comment "Used to indicate the resource value of an object property that requires property parameters"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:label a owl:DatatypeProperty ;\n rdfs:label "label"@en ;\n rdfs:comment "This data property has been deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:deprecated true .\n\n:language a owl:DatatypeProperty ;\n rdfs:label "language"@en ;\n rdfs:comment "To specify the language that may be used for contacting the object. May also be used as a property parameter."@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:latitude a owl:DatatypeProperty ;\n rdfs:label "latitude"@en ;\n rdfs:comment "This data property has been deprecated. See hasGeo"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:deprecated true .\n\n:longitude a owl:DatatypeProperty ;\n rdfs:label "longitude"@en ;\n rdfs:comment "This data property has been deprecated. See hasGeo"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:deprecated true .\n\n:mailer a owl:DatatypeProperty ;\n rdfs:label "mailer"@en ;\n rdfs:comment "This data property has been deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:deprecated true .\n\n:note a owl:DatatypeProperty ;\n rdfs:label "note"@en ;\n rdfs:comment "A note associated with the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:org a owl:ObjectProperty ;\n rdfs:label "organization"@en ;\n rdfs:comment "This object property has been mapped. Use the organization-name data property."@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentProperty :organization-name .\n\n:organization-unit a owl:DatatypeProperty ;\n rdfs:label "organizational unit name"@en ;\n rdfs:comment "To specify the organizational unit name associated with the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string ;\n rdfs:subPropertyOf :organization-name .\n\n:post-office-box a owl:DatatypeProperty ;\n rdfs:label "post office box"@en ;\n rdfs:comment "This data property has been deprecated"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:deprecated true .\n\n:prodid a owl:DatatypeProperty ;\n rdfs:label "product id"@en ;\n rdfs:comment "To specify the identifier for the product that created the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:rev a owl:DatatypeProperty ;\n rdfs:label "revision"@en ;\n rdfs:comment "To specify revision information about the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:dateTime .\n\n:role a owl:DatatypeProperty ;\n rdfs:label "role"@en ;\n rdfs:comment "To specify the function or part played in a particular situation by the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:sort-string a owl:DatatypeProperty ;\n rdfs:label "sort as"@en ;\n rdfs:comment "To specify the string to be used for national-language-specific sorting. Used as a property parameter only."@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:title a owl:DatatypeProperty ;\n rdfs:label "title"@en ;\n rdfs:comment "To specify the position or job of the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:tz a owl:DatatypeProperty ;\n rdfs:label "time zone"@en ;\n rdfs:comment "To indicate time zone information that is specific to the object. May also be used as a property parameter."@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:value a owl:DatatypeProperty ;\n rdfs:label "value"@en ;\n rdfs:comment "Used to indicate the literal value of a data property that requires property parameters"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:Address a owl:Class ;\n rdfs:label "Address"@en ;\n rdfs:comment "To specify the components of the delivery address for the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentClass [ a owl:Class ;\n owl:unionOf ( [ a owl:Class ;\n owl:intersectionOf ( [ a owl:Restriction ;\n owl:onProperty :country-name ;\n owl:someValuesFrom xsd:string ] [ a owl:Restriction ;\n owl:maxCardinality "1"^^xsd:nonNegativeInteger ;\n owl:onProperty :country-name ] ) ] [ a owl:Class ;\n owl:intersectionOf ( [ a owl:Restriction ;\n owl:onProperty :locality ;\n owl:someValuesFrom xsd:string ] [ a owl:Restriction ;\n owl:maxCardinality "1"^^xsd:nonNegativeInteger ;\n owl:onProperty :locality ] ) ] [ a owl:Class ;\n owl:intersectionOf ( [ a owl:Restriction ;\n owl:onProperty :postal-code ;\n owl:someValuesFrom xsd:string ] [ a owl:Restriction ;\n owl:maxCardinality "1"^^xsd:nonNegativeInteger ;\n owl:onProperty :postal-code ] ) ] [ a owl:Class ;\n owl:intersectionOf ( [ a owl:Restriction ;\n owl:onProperty :region ;\n owl:someValuesFrom xsd:string ] [ a owl:Restriction ;\n owl:maxCardinality "1"^^xsd:nonNegativeInteger ;\n owl:onProperty :region ] ) ] [ a owl:Class ;\n owl:intersectionOf ( [ a owl:Restriction ;\n owl:onProperty :street-address ;\n owl:someValuesFrom xsd:string ] [ a owl:Restriction ;\n owl:maxCardinality "1"^^xsd:nonNegativeInteger ;\n owl:onProperty :street-address ] ) ] ) ] .\n\n:Email a owl:Class ;\n rdfs:label "Email"@en ;\n rdfs:comment "To specify the electronic mail address for communication with the object the vCard represents. Use the hasEmail object property."@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:deprecated true .\n\n:Group a owl:Class ;\n rdfs:label "Group"@en ;\n rdfs:comment "Object representing a group of persons or entities. A group object will usually contain hasMember properties to specify the members of the group."@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Kind ;\n owl:disjointWith :Individual,\n :Location,\n :Organization ;\n owl:equivalentClass [ a owl:Class ;\n owl:intersectionOf ( [ a owl:Restriction ;\n owl:onProperty :hasMember ;\n owl:someValuesFrom :Kind ] [ a owl:Restriction ;\n owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ;\n owl:onClass :Kind ;\n owl:onProperty :hasMember ] ) ] .\n\n:Individual a owl:Class ;\n rdfs:label "Individual"@en ;\n rdfs:comment "An object representing a single person or entity"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Kind ;\n owl:disjointWith :Location,\n :Organization .\n\n:Name a owl:Class ;\n rdfs:label "Name"@en ;\n rdfs:comment "To specify the components of the name of the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentClass [ a owl:Class ;\n owl:unionOf ( [ a owl:Class ;\n owl:intersectionOf ( [ a owl:Restriction ;\n owl:onProperty :additional-name ;\n owl:someValuesFrom xsd:string ] [ a owl:Restriction ;\n owl:minCardinality "0"^^xsd:nonNegativeInteger ;\n owl:onProperty :additional-name ] ) ] [ a owl:Class ;\n owl:intersectionOf ( [ a owl:Restriction ;\n owl:onProperty :family-name ;\n owl:someValuesFrom xsd:string ] [ a owl:Restriction ;\n owl:maxCardinality "1"^^xsd:nonNegativeInteger ;\n owl:onProperty :family-name ] ) ] [ a owl:Class ;\n owl:intersectionOf ( [ a owl:Restriction ;\n owl:onProperty :given-name ;\n owl:someValuesFrom xsd:string ] [ a owl:Restriction ;\n owl:maxCardinality "1"^^xsd:nonNegativeInteger ;\n owl:onProperty :given-name ] ) ] [ a owl:Class ;\n owl:intersectionOf ( [ a owl:Restriction ;\n owl:onProperty :honorific-prefix ;\n owl:someValuesFrom xsd:string ] [ a owl:Restriction ;\n owl:minCardinality "0"^^xsd:nonNegativeInteger ;\n owl:onProperty :honorific-prefix ] ) ] [ a owl:Class ;\n owl:intersectionOf ( [ a owl:Restriction ;\n owl:onProperty :honorific-suffix ;\n owl:someValuesFrom xsd:string ] [ a owl:Restriction ;\n owl:minCardinality "0"^^xsd:nonNegativeInteger ;\n owl:onProperty :honorific-suffix ] ) ] ) ] .\n\n:VCard a owl:Class ;\n rdfs:label "VCard"@en ;\n rdfs:comment "The vCard class is equivalent to the new Kind class, which is the parent for the four explicit types of vCards (Individual, Organization, Location, Group)"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentClass :Kind .\n\n:fn a owl:DatatypeProperty ;\n rdfs:label "formatted name"@en ;\n rdfs:comment "The formatted text corresponding to the name of the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:hasAddress a owl:ObjectProperty ;\n rdfs:label "has address"@en ;\n rdfs:comment "To specify the components of the delivery address for the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range :Address .\n\n:hasEmail a owl:ObjectProperty ;\n rdfs:label "has email"@en ;\n rdfs:comment "To specify the electronic mail address for communication with the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range :Email .\n\n:hasGeo a owl:ObjectProperty ;\n rdfs:label "has geo"@en ;\n rdfs:comment "To specify information related to the global positioning of the object. May also be used as a property parameter."@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:hasKey a owl:ObjectProperty ;\n rdfs:label "has key"@en ;\n rdfs:comment "To specify a public key or authentication certificate associated with the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentProperty :key .\n\n:hasLogo a owl:ObjectProperty ;\n rdfs:label "has logo"@en ;\n rdfs:comment "To specify a graphic image of a logo associated with the object "@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentProperty :logo .\n\n:hasName a owl:ObjectProperty ;\n rdfs:label "has name"@en ;\n rdfs:comment "To specify the components of the name of the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range :Name ;\n owl:equivalentProperty :n .\n\n:hasPhoto a owl:ObjectProperty ;\n rdfs:label "has photo"@en ;\n rdfs:comment "To specify an image or photograph information that annotates some aspect of the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentProperty :photo .\n\n:hasSound a owl:ObjectProperty ;\n rdfs:label "has sound"@en ;\n rdfs:comment "To specify a digital sound content information that annotates some aspect of the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentProperty :sound .\n\n:hasTelephone a owl:ObjectProperty ;\n rdfs:label "has telephone"@en ;\n rdfs:comment "To specify the telephone number for telephony communication with the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentProperty :tel .\n\n:hasURL a owl:ObjectProperty ;\n rdfs:label "has url"@en ;\n rdfs:comment "To specify a uniform resource locator associated with the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentProperty :url .\n\n:key a owl:ObjectProperty ;\n rdfs:label "key"@en ;\n rdfs:comment "This object property has been mapped"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentProperty :hasKey .\n\n:logo a owl:ObjectProperty ;\n rdfs:label "logo"@en ;\n rdfs:comment "This object property has been mapped"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentProperty :hasLogo .\n\n:n a owl:ObjectProperty ;\n rdfs:label "name"@en ;\n rdfs:comment "This object property has been mapped"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentProperty :hasName .\n\n:nickname a owl:DatatypeProperty ;\n rdfs:label "nickname"@en ;\n rdfs:comment "The nick name associated with the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:photo a owl:ObjectProperty ;\n rdfs:label "photo"@en ;\n rdfs:comment "This object property has been mapped"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentProperty :hasPhoto .\n\n:sound a owl:ObjectProperty ;\n rdfs:label "sound"@en ;\n rdfs:comment "This object property has been mapped"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentProperty :hasSound .\n\n:tel a owl:ObjectProperty ;\n rdfs:label "telephone"@en ;\n rdfs:comment "This object property has been mapped"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentProperty :hasTelephone .\n\n:url a owl:ObjectProperty ;\n rdfs:label "url"@en ;\n rdfs:comment "This object property has been mapped"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentProperty :hasURL .\n\n:Location a owl:Class ;\n rdfs:label "Location"@en ;\n rdfs:comment "An object representing a named geographical place"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Kind ;\n owl:disjointWith :Organization .\n\n:additional-name a owl:DatatypeProperty ;\n rdfs:label "additional name"@en ;\n rdfs:comment "The additional name associated with the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:country-name a owl:DatatypeProperty ;\n rdfs:label "country name"@en ;\n rdfs:comment "The country name associated with the address of the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:family-name a owl:DatatypeProperty ;\n rdfs:label "family name"@en ;\n rdfs:comment "The family name associated with the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:given-name a owl:DatatypeProperty ;\n rdfs:label "given name"@en ;\n rdfs:comment "The given name associated with the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:hasMember a owl:ObjectProperty ;\n rdfs:label "has member"@en ;\n rdfs:comment "To include a member in the group this object represents. (This property can only be used by Group individuals)"@en ;\n rdfs:domain :Group ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range :Kind .\n\n:honorific-prefix a owl:DatatypeProperty ;\n rdfs:label "honorific prefix"@en ;\n rdfs:comment "The honorific prefix of the name associated with the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:honorific-suffix a owl:DatatypeProperty ;\n rdfs:label "honorific suffix"@en ;\n rdfs:comment "The honorific suffix of the name associated with the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:locality a owl:DatatypeProperty ;\n rdfs:label "locality"@en ;\n rdfs:comment "The locality (e.g. city or town) associated with the address of the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:organization-name a owl:DatatypeProperty ;\n rdfs:label "organization name"@en ;\n rdfs:comment "To specify the organizational name associated with the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:postal-code a owl:DatatypeProperty ;\n rdfs:label "postal code"@en ;\n rdfs:comment "The postal code associated with the address of the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:region a owl:DatatypeProperty ;\n rdfs:label "region"@en ;\n rdfs:comment "The region (e.g. state or province) associated with the address of the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:street-address a owl:DatatypeProperty ;\n rdfs:label "street address"@en ;\n rdfs:comment "The street address associated with the address of the object"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:range xsd:string .\n\n:Organization a owl:Class ;\n rdfs:label "Organization"@en ;\n rdfs:comment """An object representing an organization. An organization is a single entity, and might represent a business or government, a department or division within a business or government, a club, an association, or the like.\n"""@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n rdfs:subClassOf :Kind .\n\n:Gender a owl:Class ;\n rdfs:label "Gender"@en ;\n rdfs:comment "Used for gender codes. The URI of the gender code must be used as the value for Gender."@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:Kind a owl:Class ;\n rdfs:label "Kind"@en ;\n rdfs:comment "The parent class for all objects"@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> ;\n owl:equivalentClass [ a owl:Restriction ;\n owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ;\n owl:onDataRange xsd:string ;\n owl:onProperty :fn ],\n :VCard .\n\n:Type a owl:Class ;\n rdfs:label "Type"@en ;\n rdfs:comment "Used for type codes. The URI of the type code must be used as the value for Type."@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:TelephoneType a owl:Class ;\n rdfs:label "Phone"@en ;\n rdfs:comment "Used for telephone type codes. The URI of the telephone type code must be used as the value for the Telephone Type."@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n:RelatedType a owl:Class ;\n rdfs:label "Relation Type"@en ;\n rdfs:comment "Used for relation type codes. The URI of the relation type code must be used as the value for the Relation Type."@en ;\n rdfs:isDefinedBy <http://www.w3.org/2006/vcard/ns> .\n\n<http://www.w3.org/2006/vcard/ns> a owl:Ontology ;\n rdfs:label "Ontology for vCard"@en ;\n rdfs:comment "Ontology for vCard based on RFC6350"@en ;\n owl:versionInfo "Final"@en .\n\n\n',p,C.uri,"text/turtle");try{await p.fetcher.load(t.doc())}catch(e){w("Error: Failed to load contact card: "+e)}n.style=u.paneDivStyle||"padding: 0.5em 1.5em 1em 1.5em;",o.authn.checkUser(),n.appendChild((0,a.renderMugshotGallery)(e,t));const T=g?v:b;r.widgets.appendForm(e,n,{},t,T,t.doc(),function(e,n){e||w("Error: "+n)}),h(),n.appendChild(await(0,i.renderGroupMemberships)(t,d)),h(),r.widgets.attachmentList(e,t,n,{modify:y}),h(),g?n.appendChild(await(0,s.renderPublicIdControl)(t,d)):n.appendChild(await(0,s.renderWebIdControl)(t,d))};var r=d(t(3383)),o=t(2404),a=t(2714),s=t(7241),i=t(7801),l=d(t(9676));function d(e,n){if("function"==typeof WeakMap)var t=new WeakMap,r=new WeakMap;return(d=function(e,n){if(!n&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=n?r:t){if(o.has(e))return o.get(e);o.set(e,s)}for(const n in e)"default"!==n&&{}.hasOwnProperty.call(e,n)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,n))&&(a.get||a.set)?o(s,n,a):s[n]=e[n]);return s})(e,n)}const c=r.ns,p=o.store,u=r.style;function f(e,n,t){const r=n.doc();e.holds(void 0,void 0,void 0,r)||l.parse(t,e,r.uri,"text/turtle")}},2322(e,n,t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.getSameAs=f;var r=t(2404),o=t(8539),a=function(e,n){if("function"==typeof WeakMap)var t=new WeakMap,r=new WeakMap;return function(e,n){if(!n&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=n?r:t){if(o.has(e))return o.get(e);o.set(e,s)}for(const n in e)"default"!==n&&{}.hasOwnProperty.call(e,n)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,n))&&(a.get||a.set)?o(s,n,a):s[n]=e[n]);return s}(e,n)}(t(3383)),s=t(8250),i=t(1450),l=t(7324),d=t(7801);const c=a.ns,p=a.utils,u=a.style;n.default={icon:a.icons.iconBase+"noun_99101.svg",name:"contact",label:function(e,n){const t=n.session.store.findTypeURIs(e);return t[c.vcard("Individual").uri]?"Contact":t[c.vcard("Organization").uri]?"contact":t[c.foaf("Person").uri]||t[c.schema("Person").uri]?"Person":t[c.vcard("Group").uri]?"Group":t[c.vcard("AddressBook").uri]?"Address book":null},mintClass:a.ns.vcard("AddressBook"),mintNew:s.mintNewAddressBook,render:function(e,n,t={}){const s=this;function w(e){console.log("contactsPane: "+e),b.appendChild(a.widgets.errorMessageBlock(g,e,"pink"))}function h(e,n){e||w("Error: "+n)}function m(e){return a.login.newAppInstance(g,{noun:"address book",appPathSegment:"contactorator.timbl.com"},function(n,t){s.clone(e,t,{me:v,div:b,dom:g})})}const g=n.dom,y=n.session.store,b=g.createElement("div"),v=r.authn.currentUser();return a.aclControl.preventBrowserDropEvents(g),b.setAttribute("class","contactPane"),async function(){a.aclControl.preventBrowserDropEvents(g);const s=y.findTypeURIs(e);let v=r.authn.currentUser();const C={target:e,me:v,noun:"address book",div:b,dom:g};function T(e,s,i){y.fetcher.load(e).then(function(s){!function(e,s,i){const C=p.label(c.vcard("AddressBook"));let T=e[0];const P=y.any(T,c.vcard("groupIndex"));let O={},D={};const E=i.foreignGroup||T;let k=y.any(E,c.dc("title"))||y.any(E,c.vcard("fn"));t.solo&&k&&"undefined"!=typeof document&&(document.title=k.value);function x(e){if(e)return e;let n;for(const e in O){n=y.sym(e);const t=y.any(void 0,c.vcard("includesGroup"),n);if(t)return t}throw new Error("findBookFromGroups: Cant find address book which this group is part of")}function B(e){const n=y.any(e,c.vcard("fn"))||y.any(e,c.foaf("name"))||y.any(e,c.vcard("organization-name"));return n?n.value:"???"}function M(e){const n=le.value.trim().toLowerCase();if(0===n.length)return!0;const t=n.split(" ");for(let n=0;n<t.length;n++){const r=t[n];if(e.toLowerCase().indexOf(r)<0)return!1}return!0}function j(e){de.innerHTML="loading...",D={},D[e.uri]=!0,A();const n=T?F(e):e;y.fetcher.nowOrWhenFetched(n.doc(),void 0,function(t,r){if(de.innerHTML="",!t)return h(t,"Can't load card: "+n+": "+r);de.appendChild(N(g,n,"contact")),de.appendChild(g.createElement("br")),de.appendChild(a.widgets.linkIcon(g,n));const o=a.widgets.deleteButtonWithCheck(g,de,"contact",async function(){const n=e.dir(),t=y.any(e,c.vcard("fn"));if(confirm("Delete contact "+t+" completely?? "+n)){console.log("Deleting a contact "+t),await _();const r=y.any(T,c.vcard("nameEmailIndex"));await y.fetcher.load(r);const o=(0,d.groupMembership)(e);let a=[];o.forEach(n=>{f(y,e,n.doc()).forEach(e=>{1===f(y,e,n.doc()).length&&(a=a.concat(y.statementsMatching(n,c.vcard("hasMember"),e,n.doc())))})}),await y.updater.updateMany(a),await S(e),await U(y,n),q(),de.innerHTML="Contact Data Deleted."}});o.style="height: 2em;"})}function A(e){let n=0,t=null;for(let e=0;e<oe.children.length;e++){const r=oe.children[e],o=M(B(r.subject));o&&(n++,t=r),r.setAttribute("style",o?D[r.subject.uri]?"background-color: #cce;":"":"display: none;")}if(1===n&&e){j(t.subject)}}function L(e,n,t){function r(n,r){r.setAttribute("style","background-color: #ffe;"),y.fetcher.nowOrWhenFetched(n.doc(),void 0,function(s,i){if(!s){const e="Can't load group file: "+n+": "+i;return a.push(e),h(s,e)}r.setAttribute("style","background-color: #cce;"),e[n.uri]=!0,G(),q(),o-=1,o||t&&t(0===a.length,a)})}let o=n.children.length;var a=[];for(let e=0;e<n.children.length;e++){const t=n.children[e];r(t.subject,t)}}async function _(){await y.fetcher.load(P);const e=T?y.each(T,c.vcard("includesGroup"),null,P):[];return await y.fetcher.load(e),e}function I(){let n=[];return i.foreignGroup&&n.push(["",y.any(i.foreignGroup,c.vcard("fn")),i.foreignGroup]),T&&(e.forEach(function(e){const t=(e?y.each(e,c.vcard("includesGroup"),null,P):[]).map(function(n){return[e,y.any(n,c.vcard("fn")),n]});n=n.concat(t)}),n.sort()),n.map(e=>e[2])}function N(e,t,r){const o=n.session.paneRegistry.byName(r).render(t,n);return o.setAttribute("style","border: 0.1em solid #444; border-radius: 0.5em"),o}function R(e,n){let t=B(e),r=B(n);if(t&&r){if(t=t.toLowerCase(),r=r.toLowerCase(),t>r)return 1;if(t<r)return-1}return e.uri>n.uri?1:e.uri<n.uri?-1:0}async function S(e){console.log("deleteThingAndDoc: "+e);const n=y.statementsMatching(e).concat(y.statementsMatching(void 0,void 0,e));try{await y.updater.updateMany(n),console.log("Deleting resoure "+e.doc()),await y.fetcher.delete(e.doc()),console.log("Delete thing "+e+": complete.")}catch(n){w("Error deleting thing "+e+": "+n)}}function U(e,n){return new Promise(function(t){e.fetcher.load(n).then(function(){const r=e.each(n,c.ldp("contains")).map(n=>{if(e.holds(n,c.rdf("type"),c.ldp("BasicContainer")))return U(e,n);if(console.log("deleteRecirsive file: "+n),!confirm(" Really DELETE File "+n))throw new Error("User aborted delete file");return e.fetcher.webOperation("DELETE",n.uri)});if(console.log("deleteRecirsive folder: "+n),!confirm(" Really DELETE folder "+n))throw new Error("User aborted delete file");r.push(e.fetcher.webOperation("DELETE",n.uri)),Promise.all(r).then(e=>{t()})})})}function F(e,n){const t=y.allAliases(e),r=T.dir().uri;for(let e=0;e<t.length;e++)if(t[e].uri.slice(0,r.length)===r)return t[e];throw new Error("No local URI for "+e)}function q(){function e(e,n){e.addEventListener("click",function(e){e.preventDefault(),j(n)})}let n=[];Object.keys(O).map(e=>y.sym(e)).forEach(e=>{O[e.value]&&(n=n.concat((0,o.groupMembers)(y,e)))}),n.sort(R);for(let e=0;e<n.length-1;)n[e].uri===n[e+1].uri?n.splice(e,1):e++;function t(n){const t=g.createElement("tr"),r=t.appendChild(g.createElement("td"));r.setAttribute("style",ce),t.subject=n;const o=B(n);return r.textContent=o,t.subject=n,a.widgets.makeDraggable(t,n),e(t,n),t}Z.textContent=n.length>5?n.length+" contacts":"contact",p.syncTableToArrayReOrdered(oe,n,t),A()}function z(e,n){for(let t=0;t<e.children.length;t++){const r=e.children[t];r.subject&&r.setAttribute("style",n[r.subject.uri]?"background-color: #cce;":"")}}function G(){return z(te,O)}function $(){function e(e){async function t(n){n.forEach(function(n){console.log("Dropped on group: "+n);const t=y.sym(n);try{(0,o.addPersonToGroup)(t,e)}catch(e){w(e)}q()})}function r(t){t.preventDefault();const r=y.sym(e.uri.split("#")[0]);t.metaKey||(O={}),O[e.uri]=!O[e.uri],G(),oe.innerHTML="",y.fetcher.nowOrWhenFetched(r.uri,void 0,function(o,s){if(!o)return h(o,"Can't load group file: "+r+": "+s);if(q(),!t.metaKey){de.innerHTML="";let t=!1;const r=a.aclControl.ACLControlBox5(e,n,"group",y,function(e,n,t){e||(t&&t.status&&403===t.status?de.innerHTML="No control access.":de.innerHTML="Failed to load access control: "+n)}),o=de.appendChild(g.createElement("button"));o.style.cssText="padding: 1em; margin: 1em";const s=o.appendChild(g.createElement("img"));s.style.cssText="width: 1.5em; height: 1.5em",s.setAttribute("src",a.icons.iconBase+"noun_123691.svg"),o.addEventListener("click",function(){t=!t,t?de.appendChild(r):de.removeChild(r)})}})}const s=y.any(e,c.vcard("fn")),i=g.createElement("tr");return i.subject=e,a.widgets.makeDraggable(i,e),i.setAttribute("style",ce),i.textContent=s,a.widgets.makeDropTarget(i,t),a.widgets.deleteButtonWithCheck(g,i,"group "+s,async function(){await S(e),$()}),i.addEventListener("click",r,!0),i}const t=I();p.syncTableToArrayReOrdered(te,t,e),G()}async function W(){const e=await _(),{del:n,ins:t}=await(0,o.getDataModelIssues)(e);n.length&&confirm(`Groups data model need to be updated? (${n.length})`)&&(await y.updater.updateMany(n,t),alert("Update done"))}async function Q(e){de.innerHTML="";const t=y.any(T,c.vcard("groupIndex"));try{await y.fetcher.load(t)}catch(e){console.log("Error: Group index NOT loaded:"+e+"\n")}console.log(" Group index has been loaded\n");const r=await a.widgets.askName(g,y,de,a.ns.foaf("name"),c.vcard("Group"),"group");if(!r)return;let s;try{s=await(0,o.saveNewGroup)(T,r)}catch(e){return console.log("Error: can't save new group:"+e),void(de.innerHTML="Failed to save group"+e)}O={},O[s.uri]=!0,$(),de.innerHTML="",de.appendChild(a.aclControl.ACLControlBox5(s.doc(),n,"group",y,function(e,n){e||(de.innerHTML="Group sharing setup failed: "+n)}))}async function H(e){de.innerHTML="";const n=x(T);try{await y.fetcher.load(n)}catch(e){throw new Error("Book won't load:"+n)}const t=y.any(n,c.vcard("nameEmailIndex"));if(!t)throw new Error("Wot no nameEmailIndex?");await y.fetcher.load(t);const r=await a.widgets.askName(g,y,de,a.ns.foaf("name"),e);if(!r)return;let s;de.innerHTML="indexing...",T=x(T);try{s=await(0,o.saveNewContact)(T,r,O,e)}catch(e){const n="Error: can't save new contact: "+e;console.log(n),alert(n)}D={},D[s.uri]=!0,q(),de.innerHTML="",de.appendChild(N(g,s,"contact"))}k=k?k.value:C;const V=g.createElement("table");V.setAttribute("style","border-collapse: collapse; margin-right: 0; max-height: 9in;"),b.appendChild(V);const K=V.appendChild(g.createElement("tr")),J=V.appendChild(g.createElement("tr")),Y=V.appendChild(g.createElement("tr")),X=K.appendChild(g.createElement("td")),Z=K.appendChild(g.createElement("td")),ee=K.appendChild(g.createElement("td")),ne=J.appendChild(g.createElement("td")),te=ne.appendChild(g.createElement("table")),re=J.appendChild(g.createElement("td")),oe=re.appendChild(g.createElement("table")),ae=Y.appendChild(g.createElement("td")),se=Y.appendChild(g.createElement("td")),ie=Y.appendChild(g.createElement("td"));ee.appendChild(g.createElement("div"));const le=ee.appendChild(g.createElement("input"));le.setAttribute("type","text"),le.style=u.searchInputStyle||"border: 0.1em solid #444; border-radius: 0.5em; width: 100%; font-size: 100%; padding: 0.1em 0.6em",le.addEventListener("input",function(e){A(!0)});const de=J.appendChild(g.createElement("td"));de.setAttribute("style","margin: 0;");const ce="padding: 0.1em;";function pe(e){const n=e?"":"display: none;";X.setAttribute("style","min-width: 10em; padding-bottom 0.2em;"+n);const t="padding: 0.1em;";ne.setAttribute("style",t+n),ae.setAttribute("style",t+n)}X.textContent="groups",X.setAttribute("style","min-width: 10em; padding-bottom 0.2em;"),pe(!0),i.foreignGroup&&(O[i.foreignGroup.uri]=!0);if(T){const e=X.appendChild(g.createElement("button"));e.textContent="All";const n="margin-left: 1em; font-size: 100%;";e.setAttribute("style",n),e.addEventListener("click",function(t){e.state=e.state?0:1,oe.innerHTML="",e.state?(e.setAttribute("style",n+"background-color: #ff8;"),L(O,te,function(t,r){if(!t)return w(r);e.setAttribute("style",n+"background-color: black; color: white"),G()})):(e.setAttribute("style",n+"background-color: #cfc;"),O={},G())}),y.fetcher.nowOrWhenFetched(P.uri,T,function(e,n){if(!e)return console.log("Cannot load group index: "+n);$(),q()})}else $(),q(),console.log("No book, only one group -> hide list of groups"),pe(!1);Z.textContent="name",Z.setAttribute("style","min-width: 18em;"),re.setAttribute("style","overflow:scroll;");const ue=g.createElement("button"),fe=g.createElement("div");ue.setAttribute("type","button"),v||ue.setAttribute("disabled","true");r.authn.checkUser().then(e=>{e&&(v=e,ue.removeAttribute("disabled"))}),fe.appendChild(ue),ue.innerHTML="New Contact",se.appendChild(fe),ue.addEventListener("click",async e=>H(c.vcard("Individual")),!1);const we=g.createElement("button"),he=g.createElement("div");we.setAttribute("type","button"),v||we.setAttribute("disabled","true");if(r.authn.checkUser().then(e=>{e&&(v=e,we.removeAttribute("disabled"))}),he.appendChild(we),we.innerHTML="New Organization",se.appendChild(he),we.addEventListener("click",async e=>H(c.vcard("Organization")),!1),T){const e=ae.appendChild(g.createElement("button"));e.setAttribute("type","button"),e.innerHTML="New Group",e.addEventListener("click",Q,!1);const t=ie.appendChild(g.createElement("button"));t.setAttribute("type","button"),t.innerHTML="Tools",t.addEventListener("click",function(e){de.innerHTML="",de.appendChild((0,l.toolsPane)(L,O,te,T,n,v))})}ie.appendChild(m(T)),b.appendChild(g.createElement("hr")),W().then(()=>{console.log("async checkDataModel done.")})}(e,0,i)}).catch(function(e){w(e)})}s[c.vcard("Individual").uri]||s[c.foaf("Person").uri]||s[c.schema("Person").uri]||s[c.vcard("Organization").uri]||s[c.schema("Organization").uri]?(0,i.renderIndividual)(g,b,e,n).then(()=>console.log("(individual rendered)")):s[c.vcard("Group").uri]?a.login.findAppInstances(C,c.vcard("AddressBook")).then(function(n){const t=n.instances,r={foreignGroup:e};t.length>0?T(t,0,r):T([],0,r)}).catch(function(e){a.widgets.complain(C,e)}):s[c.vcard("AddressBook").uri]?T([e],0,{}):console.log("Error: Contact pane: No evidence that "+e+" is anything to do with contacts.");v=r.authn.currentUser(),v||(console.log("(You do not have your Web Id set. Sign in or sign up to make changes.)"),a.login.ensureLoadedProfile(C).then(e=>{console.log("Logged in as "+e.me),v=e.me},e=>{b.appendChild(a.widgets.errorMessageBlock(e))}));"undefined"!=typeof document&&document.location&&"http://localhost"===(""+document.location).slice(0,16)&&(v=y.any(e,a.ns.acl("owner")),console.log("Assuming user is "+v));return b}().then(()=>console.log("contactsPane Rendered "+e),e=>w(""+e)),b}};function f(e,n,t){return e.each(n,c.owl("sameAs"),null,t).concat(e.each(null,c.owl("sameAs"),n,t))}},2714(e,n,t){Object.defineProperty(n,"__esModule",{value:!0}),n.renderMugshotGallery=function(e,n){function t(n){console.log(n),v.appendChild(o.widgets.errorMessageBlock(e,n,"pink"))}async function r(e,n,t){const r=[i.st(e,d.vcard("hasPhoto"),n,e.doc())];try{t?await p.updater.update(r,[]):await p.updater.update([],r)}catch(e){const t=" Write back image link FAIL "+n+", Error: "+e;console.log(t),alert(t)}}function l(e){p.fetcher.nowOrWhenFetched(e.doc(),function(t,r){if(t){const t=p.findTypeURIs(e);for(const e in t)console.log(" drop object type includes: "+e);console.log("Default: assume web page "+e),p.add(n,d.wf("attachment"),e,n.doc())}else console.log("Error looking up dropped thing "+e+": "+r)})}function u(e,r,o){const a=s.default.extension(r);let i,l;r!==s.default.lookup(e)&&(e+="_."+a,console.log("MIME TYPE MISMATCH -- adding extension: "+e));const c=r.startsWith("image");let u,f;for(c?(i="image_",l=d.vcard("hasPhoto")):(i="attachment_",l=d.wf("attachment")),u=0;f=p.sym(n.dir().uri+e),p.holds(n,d.vcard("hasPhoto"),f);u++)e=i+u+"."+a;console.log("Putting "+o.byteLength+" bytes of "+r+" to "+f),p.fetcher.webOperation("PUT",f.uri,{data:o,contentType:r}).then(function(e){e.ok?(console.log(" Upload: put OK: "+f),p.add(n,l,f,n.doc()),p.fetcher.putBack(n.doc(),{contentType:"text/turtle"}).then(function(e){c&&C.refresh()},function(e){console.log(" Write back image link FAIL "+f+", Error: "+e)})):t("Error uploading "+f+":"+e.status)})}async function f(e){for(const n of e){let e=i.sym(n);if(console.log("Dropped on mugshot thing "+e),n.startsWith("http")&&n.indexOf("#")<0){n.startsWith("http:")&&(e=i.sym("https:"+n.slice(5)));const r={withCredentials:!1,credentials:"omit"};let o;try{o=await p.fetcher.webOperation("GET",e.uri,r)}catch(n){return t(`Gallery: fetch error trying to read picture ${e} data: ${n}`),void l(e)}const a=o.headers.get("Content-Type");let s=e.uri.split("/").slice(-1)[0];s=s.split("?")[0];const d=await o.arrayBuffer();return o.ok?void u(s,a,d):(alert("Cant download, so will link image. "+e+":"+o.status),void l(e))}alert("Not a web document URI, cannot copy as picture: "+e),l(e)}}function w(e){for(let n=0;n<e.length;n++){const t=e[n];console.log(" contacts: Filename: "+t.name+", type: "+(t.type||"n/a")+" size: "+t.size+" bytes, last modified: "+(t.lastModifiedDate?t.lastModifiedDate.toLocaleDateString():"n/a"));const r=new FileReader;r.onload=function(e){return function(n){const t=n.target.result;console.log(" File read byteLength : "+t.byteLength);u(encodeURIComponent(e.name),e.type,t)}}(t),r.readAsArrayBuffer(t)}}function h(n){const t=e.createElement("img");return t.setAttribute("style","max-height: 10em; border-radius: 1em; margin: 0.7em;"),o.widgets.makeDropTarget(t,f,w),n&&(a.store.fetcher._fetch(n.uri).then(function(e){return e.blob()}).then(function(e){const n=URL.createObjectURL(e);t.setAttribute("src",n)}),o.widgets.makeDraggable(t,n)),t}function m(){let e=p.each(n,d.vcard("hasPhoto"));e.sort(),e=e.slice(0,5),0===e.length?(C.innerHTML="",b&&C.appendChild(T)):c.syncTableToArray(C,e,h)}function g(){return p.sym(n.dir().uri+"Image_"+Date.now()+".png")}async function y(e){e&&(await r(n,e),m())}const b=p.updater.editable(n.doc().uri,p),v=e.createElement("div"),C=v.appendChild(e.createElement("div")),T=h();o.widgets.setImage(T,n),m(),C.refresh=m,b&&v.appendChild(function(){const t=e.createElement("table"),a=t.appendChild(e.createElement("tr")),s=a.appendChild(e.createElement("td")),i=a.appendChild(e.createElement("td")),l=a.appendChild(e.createElement("td"));s.appendChild(o.media.cameraButton(e,p,g,y));try{i.appendChild(o.widgets.fileUploadButtonDiv(e,w))}catch(e){console.log("ignore fileUploadButtonDiv error for now",e)}return l.appendChild(function(){const t=o.widgets.button(e,o.icons.iconBase+"noun_925021.svg","Drag here to delete");return o.widgets.makeDropTarget(t,async function(e){const t=p.each(n,d.vcard("hasPhoto")).map(e=>e.uri);for(const o of e){if(!t.includes(o))return void alert("Only drop images in this contact onto this trash can.");if(confirm(`Permanently DELETE image ${o} completely?`)){console.log("Unlinking image file "+o),await r(n,p.sym(o),!0);try{console.log("Deleting image file "+o),await p.fetcher.webOperation("DELETE",o)}catch(e){alert("Unable to delete picture! "+e)}}}m()},null),t}()),t}());return v};var r,o=l(t(3383)),a=t(2404),s=(r=t(6049))&&r.__esModule?r:{default:r},i=l(t(9676));function l(e,n){if("function"==typeof WeakMap)var t=new WeakMap,r=new WeakMap;return(l=function(e,n){if(!n&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=n?r:t){if(o.has(e))return o.get(e);o.set(e,s)}for(const n in e)"default"!==n&&{}.hasOwnProperty.call(e,n)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,n))&&(a.get||a.set)?o(s,n,a):s[n]=e[n]);return s})(e,n)}const d=o.ns,c=o.utils,p=a.store},6452(e,n,t){Object.defineProperty(n,"__esModule",{value:!0}),n.renderAutocompleteControl=async function(e,n,t,c){async function p(e,t){const r=e.uri;return u(),c(n,r)}function u(){y&&(b.removeChild(y),y=null)}const f=t.queryParameters||s.wikidataParameters,w=o.widgets.continueButton(e),h=o.widgets.cancelButton(e,u),m=t.class,g={queryParams:f,class:m,acceptButton:w,cancelButton:h};var y=null;(t=t||{}).editable=i.updater.editable(n.doc().uri,i);const b=e.createElement("div");if(b.setAttribute("style","display: flex; flex-flow: wrap;"),t.editable){b.style.width="100%";const s=b.appendChild(o.widgets.button(e,l,t.idNoun,async function(t){const a=await o.widgets.askName(e,r.store,b,o.ns.vcard("url"),null,"Solid ID");if(a)return c(n,a)}));o.widgets.makeDropTarget(s,async function(e){for(const t of e)await c(n,t)},null),t.dbLookup&&b.appendChild(o.widgets.button(e,d,t.idNoun,async function(n){y?(b.removeChild(y),y=null):((y=e.createElement("div")).setAttribute("style","display: flex; flex-flow: wrap;"),y.appendChild(await(0,a.renderAutoComplete)(e,g,p)),y.appendChild(w),y.appendChild(h),b.appendChild(y))}))}return b};var r=t(2404),o=t(3383),a=t(459),s=t(9436);const i=r.store,l=o.icons.iconBase+"noun_34653_green.svg",d=o.icons.iconBase+"noun_Search_875351.svg"},7241(e,n,t){Object.defineProperty(n,"__esModule",{value:!0}),n.addWebIDToContacts=v,n.getPersonas=P,n.getSameAs=T,n.isOrganization=D,n.removeWebIDFromContacts=C,n.renderIdControl=k,n.renderNamedPane=E,n.renderPublicIdControl=async function(e,n){let t=u.sym("http://www.wikidata.org/wiki/Q43229"),r="Organization";for(const n in w)u.holds(e,d.rdf("type"),d.schema(n),e.doc())&&(t=u.sym(w[n]),r=n,console.log(` renderPublicIdControl bingo: ${n} -> ${t}`));const o={longPrompt:`If you know the ${g} of this ${r}, you can do more stuff with it.\n To record its ${g}, drag it onto the plus, or click the magnifyinng glass\n to search for it in WikiData.`,idNoun:g,urlType:d.vcard("PublicId"),dbLookup:!0,class:t,queryParams:h};return k(e,n,o)},n.renderWebIdControl=async function(e,n){const t={longPrompt:`If you know someone's ${m}, you can do more stuff with them.\n To record their ${m}, drag it onto the plus, or click the plus\n to enter it by hand.`,idNoun:m,urlType:d.vcard("WebID")};return k(e,n,t)},n.vcardWebIDs=O;var r=l(t(3383)),o=t(2404),a=t(8539),s=t(6452),i=l(t(9676));function l(e,n){if("function"==typeof WeakMap)var t=new WeakMap,r=new WeakMap;return(l=function(e,n){if(!n&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=n?r:t){if(o.has(e))return o.get(e);o.set(e,s)}for(const n in e)"default"!==n&&{}.hasOwnProperty.call(e,n)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,n))&&(a.get||a.set)?o(s,n,a):s[n]=e[n]);return s})(e,n)}const d=r.ns,c=r.widgets,p=r.utils,u=o.store,f=r.style,w=c.publicData.wikidataClasses,h=c.publicData.wikidataParameters,m="Solid ID",g="In public data",y=r.icons.iconBase+"noun_1369241.svg",b=r.icons.iconBase+"noun_1369237.svg";async function v(e,n,t,r){try{new URL(n)}catch(e){throw new Error(`${m}: ${n} is not a valid url.`)}console.log(`Adding to ${e} a ${m}: ${n}.`);const o=r.bnode(),s=[i.st(e,d.vcard("url"),o,e.doc()),i.st(o,d.rdf("type"),t,e.doc()),i.st(o,d.vcard("value"),n,e.doc())],l=r.each(null,d.vcard("hasMember"),e);let c=[];l.forEach(t=>{c=c.concat(r.statementsMatching(t,d.vcard("hasMember"),e,t.doc())),s.push(i.st(t,d.vcard("hasMember"),r.sym(n),t.doc())),s.push(i.st(r.sym(n),d.owl("sameAs"),e,t.doc()))});try{await(0,a.updateMany)(c,s)}catch(e){throw new Error(`Could not create webId ${m}: ${n}.`)}}async function C(e,n,t,r){console.log(`Removing from ${e} their ${m}: ${n}.`);const o=r.each(e,d.vcard("url"),null,e.doc()).filter(n=>r.holds(n,d.rdf("type"),t,e.doc())).filter(t=>r.holds(t,d.vcard("value"),n,e.doc()));if(!o.length)throw new Error(`Person ${e} does not have ${m} ${n}.`);const s=o[0],l=[i.st(e,d.vcard("url"),s,e.doc()),i.st(s,d.rdf("type"),t,e.doc()),i.st(s,d.vcard("value"),n,e.doc())];await r.updater.update(l,[]);const c=r.each(null,d.vcard("hasMember"),r.sym(n));let p=[];const u=[];c.forEach(async t=>{p=p.concat(r.statementsMatching(r.sym(n),d.owl("sameAs"),e,t.doc())),u.push(i.st(t,d.vcard("hasMember"),e,t.doc())),r.statementsMatching(r.sym(n),d.owl("sameAs"),null,t.doc()).length<2&&(p=p.concat(r.statementsMatching(t,d.vcard("hasMember"),r.sym(n),t.doc())))}),await(0,a.updateMany)(p,u)}function T(e,n,t){const r=new Set,o=new Set([n.uri]);for(;o.size;){const n=Array.from(o)[0];if(o.delete(n),r.has(n))continue;r.add(n);const a=e.sym(n);e.each(a,d.owl("sameAs"),null,t).concat(e.each(null,d.owl("sameAs"),a,t)).forEach(e=>{console.log(" OWL sameAs found "+e),o.add(e.uri)}),e.each(a,d.schema("sameAs"),null,t).concat(e.each(null,d.schema("sameAs"),a,t)).forEach(e=>{console.log(" Schema sameAs found "+e),o.add(e.uri)})}return r.delete(n.uri),Array.from(r).map(n=>e.sym(n))}function P(e,n){const t=O(e,n).concat(T(e,n,n.doc())),r=[...new Set(t.map(e=>e.value))].map(n=>e.sym(n));return r.sort(),r.filter(e=>!e.sameTerm(n)),r}function O(e,n,t){return e.each(n,d.vcard("url"),null,n.doc()).filter(r=>e.holds(r,d.rdf("type"),t,n.doc())).map(t=>e.any(t,d.vcard("value"),null,n.doc())).filter(e=>!!e)}function D(e){const n=e.doc();return u.holds(e,d.rdf("type"),d.vcard("Organization"),n)||u.holds(e,d.rdf("type"),d.schema("Organization"),n)}function E(e,n,t,r){const o=r.session.paneRegistry.byName(t).render(n,r);return o.setAttribute("style","border: 0.1em solid #444; border-radius: 0.5em"),o}async function k(e,n,t){async function o(){const s=P(u,e);console.log("WebId personas: "+e+" -> "+s.map(e=>e.uri).join(",\n ")),m.style.display=s.length?"none":"",p.syncTableToArrayReOrdered(g,s,s=>function(a,s,l){const p=a.createElement("div");p.style.width="100%";const u=p.appendChild(a.createElement("table"));u.style.width="100%";const f=u.appendChild(function(n){const s=new i.Literal(n.uri),u=t.urlType.sameTerm(d.vcard("WebID")),f={deleteFunction:t.editable?async function(){try{await C(e,s,t.urlType,l)}catch(n){p.appendChild(c.errorMessageBlock(a,`Error removing Id ${s} from ${e}: ${n}`))}await o()}:null,draggable:!0};u&&(f.title=n.uri.split("/")[2],f.image=c.faviconOrDefault(a,n.site()));const w=c.personTR(a,r.ns.foaf("knows"),n,f);return u&&(w.children[1].textConent=f.title,w.style.backgroundColor="#ffe6ff"),w.style.padding="0.2em",w}(s));f.style.width="100%";const w=u.appendChild(a.createElement("tr")).appendChild(a.createElement("td"));let h;w.setAttribute("colspan",3);let m=!0;const g=f.children[2].appendChild(c.button(a,y,"View",function(e){m=!m,h.style.visibility=m?"visible":"collapse",g.children[0].src=m?b:y}));g.style.float="right",delete g.style.backgroundColor,delete g.style.border;const v=(D(e)||D(s),"profile");return c.publicData.loadPublicDataThing(l,e,s).then(e=>{try{h=E(0,s,v,n),console.log("main: ",h),h.style.width="100%",console.log("renderIdControl: main element: ",h),w.appendChild(h)}catch(e){h=c.errorMessageBlock(a,`Problem displaying persona ${s}: ${e}`),w.appendChild(h)}},e=>{h=c.errorMessageBlock(a,`Error loading persona ${s}: ${e}`),w.appendChild(h)}),p}(a,s,u))}const{dom:a}=n;(t=t||{}).editable=u.updater.editable(e.doc().uri,u);const l=a.createElement("div");if(l.style="border-radius:0.3em; border: 0.1em solid #888;",0===P(u,e).length&&!t.editable)return l.style.display="none",l;const w=l.appendChild(a.createElement("h4"));w.textContent=t.idNoun,w.style=f.formHeadingStyle,w.style.color=f.highlightColor;const m=l.appendChild(a.createElement("p"));m.style=f.commentStyle,m.textContent=t.longPrompt;l.appendChild(a.createElement("table")).style.width="100%",t.editable&&(t.manualURIEntry=!0,t.queryParams=t.queryParams||h,l.appendChild(await(0,s.renderAutocompleteControl)(a,e,t,async function(e,n){try{await v(e,n,t.urlType,u)}catch(t){l.appendChild(c.errorMessageBlock(a,`Error adding Id ${n} to ${e}: ${t}`))}await o()})));const g=l.appendChild(a.createElement("div"));return await o(),l}},7324(e,n,t){Object.defineProperty(n,"__esModule",{value:!0}),n.toolsPane=function(e,n,t,s,i,l){const d=i.dom,c=o.store,p=r.ns,u=p.vcard,f="font-size: 100%; margin: 0.8em; padding:0.5em;",w=d.createElement("div"),h=w.appendChild(d.createElement("table"));h.setAttribute("style","font-size:120%; margin: 1em; border: 0.1em #ccc ;");const m=h.appendChild(d.createElement("tr"));m.textContent=r.utils.label(s)+" - tools",m.setAttribute("style","min-width: 20em; padding: 1em; font-size: 150%; border-bottom: 0.1em solid red; margin-bottom: 2em;");const g=h.appendChild(d.createElement("tr")).appendChild(d.createElement("div"));g.setAttribute("style","padding: 2em;");const y=h.appendChild(d.createElement("tr")),b=y.appendChild(d.createElement("table"));h.appendChild(d.createElement("tr"));const v={target:s,me:l,noun:"address book",div:w,dom:d,statusRegion:g};function C(e){console.log(e),g.appendChild(r.widgets.errorMessageBlock(d,e,"pink"))}return async function(){b.appendChild(r.aclControl.ACLControlBox5(s.dir(),i,"book",c,function(e,n){e||(b.innerHTML="ACL control box Failed: "+n)}));try{await r.login.registrationControl(v,s,p.vcard("AddressBook"))}catch(e){r.widgets.complain(v,"registrationControl: "+e)}console.log("Registration control finished.");const l=y.appendChild(d.createElement("pre"));function h(e){console.log(e),l.textContent+=e+"\n"}function m(){h(c.each(void 0,u("inAddressBook"),s).length+" cards loaded. ");let e=c.each(s,u("includesGroup"));const t=new Set(e.map(e=>e.uri));e=[...t].map(e=>c.sym(e)),h(e.length+" total groups. ");const r=[];for(const e in n)r.push(e);h(r.length+" selected groups. ")}async function g(e){T.setAttribute("style","background-color: #ffc;");const n=c.any(s,p.vcard("nameEmailIndex"));try{await c.fetcher.load(n)}catch(e){T.setAttribute("style","background-color: #fcc;"),h("Error: People index has NOT been loaded"+e+"\n")}T.setAttribute("style","background-color: #cfc;"),h(" People index has been loaded\n")}const T=w.appendChild(d.createElement("button"));T.textContent="Load main index",T.style.cssText=f,T.addEventListener("click",g);const P=w.appendChild(d.createElement("button"));P.textContent="Statistics",P.style.cssText=f,P.addEventListener("click",m);const O=w.appendChild(d.createElement("button"));async function D(e){function t(e){r.acl.fixIndividualCardACL(e,h,function(n,t){h(n?"Success for "+r.utils.label(e):"Failure for "+r.utils.label(e)+": "+t)})}const o=[];for(const e in n)o.push(e);for(let e=0;e<o.length;e++){const n=c.sym(o[e]),s=(0,a.groupMembers)(c,n);h(r.utils.label(n)+": "+s.length+" members");for(let e=0;e<s.length;e++){const n=s[e];h(r.utils.label(n)),t(n)}}}O.textContent="Check individual card access of selected groups",O.style.cssText=f,O.addEventListener("click",D);const E=w.appendChild(d.createElement("button"));async function k(e){const n=await x(e);if(0===n.length)return void h("No groupless cards found.");const t=await(0,a.saveNewGroup)(e,"ZSortThese");if(confirm(`Add the ${n.length} cards without groups to a ZSortThese group?`))for(const e of n)h(" adding "+e),await(0,a.addPersonToGroup)(e,t);h("People moved to group.")}async function x(e){const n=c.any(e,p.vcard("groupIndex")),t=c.any(e,p.vcard("nameEmailIndex"));try{await c.fetcher.load([t,n]);const r=c.each(e,p.vcard("includesGroup"));await c.fetcher.load(r)}catch(e){C("Error loading stuff:"+e)}const o={},s=[];let i=c.each(e,u("includesGroup"));const l=new Set(i.map(e=>e.uri));i=[...l].map(e=>c.sym(e)),h(i.length+" total groups. ");for(let e=0;e<i.length;e++){const n=i[e],t=(0,a.groupMembers)(c,n);h(r.utils.label(n)+": "+t.length+" members");for(let e=0;e<t.length;e++)c.allAliases(t[e]).forEach(function(e){o[e.uri]=n})}const d=c.each(void 0,u("inAddressBook"),e);h(d.length+" total cards");for(let e=0;e<d.length;e++)o[d[e].uri]||(s.push(d[e]),h(" groupless "+r.utils.label(d[e])));return h(s.length+" groupless cards."),s}E.textContent="Find duplicate cards",E.style.cssText=f,E.addEventListener("click",function(e){const n={};n.book=s,n.nameEmailIndex=c.any(s,p.vcard("nameEmailIndex")),h("Loading name index..."),o.store.fetcher.nowOrWhenFetched(n.nameEmailIndex,void 0,function(e,t){function r(e){return new Promise(function(t){c.fetcher.load(e).then(function(r){h(" Nameless check "+e);const o={};function a(e){return c.statementsMatching(null,null,null,e.doc()).filter(function(e){return!o[e.predicate.uri]})}o[p.vcard("hasUID").uri]=!0,o[p.dc("created").uri]=!0,o[p.dc("modified").uri]=!0;const s=a(e);if(!s.length)return h(" Zero length "+e),n.nameLessZeroData.push(e),t(!1);const i=new $rdf.Serializer(c).setBase(e.doc().uri).statementsToN3(s),l=n.nameLessIndex[i];if(l){h(" Matches with "+l);const r=c.each(null,p.vcard("hasMember"),e),o=c.each(null,p.vcard("hasMember"),l);for(let a=0;a<r.length;a++){let s=!1;for(let e=0;e<o.length;e++)o[e].sameTerm(r[a])&&(s=!0);if(!s)return h("This one groups: "+r),h("Other one groups: "+o),h("Cant skip this one because it has a group, "+r[a]+", which the other does not."),n.nameOnlyDuplicatesGroupDiff.push(e),t(!1)}console.log("Group check done -- exact duplicate: "+e)}else h("First nameless like: "+e.doc()),h("___________________________________________"),h(i),h("___________________________________________"),n.nameLessIndex[i]=e,n.namelessUniques.push(e);t(!0)}).catch(function(r){h("Cant load a nameless card!: "+r),n.nameOnlyErrors.push(e),t(!1)})})}function o(){return n.namelessToCheck=n.namelessToCheck||n.nameless.slice(),h("Nameless check left: "+n.namelessToCheck.length),new Promise(function(e){const t=n.namelessToCheck.shift();if(!t){if(h("namelessUniques: "+n.namelessUniques.length),h("namelessUniques: "+n.namelessUniques),n.namelessUniques.length>0&&confirm("Add all "+n.namelessUniques.length+" nameless cards to the rescued set?")){n.uniques=n.uniques.concat(n.namelessUniques);for(let e=0;e<n.namelessUniques.length;e++)n.uniqueSet[n.namelessUniques[e].uri]=!0}return e(!0)}r(t).then(function(e){h(" Nameless check returns "+e),o()})})}function i(){return new Promise(function(e){h("Groups loaded");for(let e=0;e<n.uniques.length;e++)n.uniquesSet[n.uniques[e].uri]=!0;n.groupMembers=[],c.each(null,p.vcard("hasMember")).forEach(e=>{n.groupMembers=n.groupMembers.concat((0,a.groupMembers)(c,e))}),h(" Naive group members "+n.groupMembers.length),n.groupMemberSet=[];for(let e=0;e<n.groupMembers.length;e++)n.groupMemberSet[n.groupMembers[e].uri]=n.groupMembers[e];n.groupMembers2=[];for(const e in n.groupMemberSet)n.groupMembers2.push(n.groupMemberSet[e]);if(h(" Compact group members "+n.groupMembers2.length),$rdf.keepThisCodeForLaterButDisableFerossConstantConditionPolice){for(let e=0;e<n.groupMembers.length;e++){const t=n.groupMembers[e];n.uniquesSet[t.uri]||(h(" Not in uniques: "+t),n.groupProblems.push(t),n.duplicateSet[t.uri]?h(" ** IN duplicates alas:"+t):h(" **** WTF?"))}h("Problem cards: "+n.groupProblems.length)}e(!0)})}function l(){return new Promise(function(e){let t,r,o;for(n.cards=c.each(void 0,u("inAddressBook"),n.book),h(n.cards.length+" total cards"),t=0;t<n.cards.length;t++)if(r=n.cards[t],o=c.anyValue(r,p.vcard("fn")),o)if(n.definitive[o]===r);else if(n.definitive[o]){n.duplicates.length;n.duplicates.push(r)}else n.definitive[o]=r;else n.nameless.push(r);n.duplicateSet=[];for(let e=0;e<n.duplicates.length;e++)n.duplicateSet[n.duplicates[e].uri]=n.duplicates[e];n.namelessSet=[];for(let e=0;e<n.nameless.length;e++)n.namelessSet[n.nameless[e].uri]=n.nameless[e];n.uniques=[],n.uniqueSet=[];for(let e=0;e<n.cards.length;e++){const t=n.cards[e].uri;n.duplicateSet[t]||n.namelessSet[t]||(n.uniques.push(n.cards[e]),n.uniqueSet[t]=n.cards[e])}h("Uniques: "+n.uniques.length),h(n.nameless.length+" nameless cards."),h(n.duplicates.length+" name-duplicate cards, leaving "+(n.cards.length-n.duplicates.length)),e(!0)})}function d(){let e;return Promise.resolve().then(()=>{e=c.sym(n.book.dir().uri+"clean-people.ttl");let t=[];for(let e=0;e<n.uniques.length;e++)t=t.concat(c.connectedStatements(n.uniques[e],n.nameEmailIndex));const r=new $rdf.Serializer(c).setBase(n.nameEmailIndex.uri);h("Serializing index of uniques...");const o=r.statementsToN3(t);return c.fetcher.webOperation("PUT",e,{data:o,contentType:"text/turtle"})}).then(function(){return h("Done uniques log "+e),!0}).catch(function(e){h("Error saving uniques: "+e)})}function f(e){let t;return Promise.resolve().then(()=>{const r=e.uri.replace("/Group/","/NewGroup/");t=c.sym(r);let o=[];for(let t=0;t<n.uniques.length;t++)o=o.concat(c.connectedStatements(n.uniques[t],e.doc()));const a=new $rdf.Serializer(c).setBase(e.uri);h(" Regenerating group of uniques..."+t);const s=a.statementsToN3(o);return c.fetcher.webOperation("PUT",t,{data:s,contentType:"text/turtle"})}).then(()=>(h(" Done uniques group "+t),!0)).catch(e=>{h("Error saving : "+e)})}function w(){return h("Saving ALL GROUPS"),Promise.all(n.groupObjects.map(f))}h("Loaded name index."),n.cards=[],n.duplicates=[],n.definitive=[],n.nameless=[],n.exactDuplicates=[],n.nameOnlyDuplicates=[],n.uniquesSet=[],n.groupProblems=[],n.nameDupLog=c.sym(s.dir().uri+"dedup-nameDupLog.ttl"),n.exactDupLog=c.sym(s.dir().uri+"dedup-exactDupLog.ttl"),n.nameOnlyErrors=[],n.nameLessZeroData=[],n.nameLessIndex=[],n.namelessUniques=[],n.nameOnlyDuplicatesGroupDiff=[];const m=function(){let e=[];if(n.book){[n.book].forEach(function(n){const t=(n?c.each(n,p.vcard("includesGroup")):[]).map(function(e){return[n,c.any(e,p.vcard("fn")),e]});e=e.concat(t)}),e.sort()}return e},g=m();n.groupObjects=g.map(e=>e[2]),h("Loading "+n.groupObjects.length+" groups... "),c.fetcher.load(n.groupObjects).then(l).then(i).then(o).then(()=>new Promise(function(e,n){confirm("Write new clean versions?")?e(!0):n(new Error("User cancelled writing clean versions"))})).then(d).then(w).then(function(){h("Done!")})})});const B=w.appendChild(d.createElement("button"));B.style.cssText=f,B.textContent="Find individuals with no group",B.addEventListener("click",function(r){h("Loading groups..."),e(n,t,async function(e,n){if(!e)return void h("Load all groups: failed: "+n);const t=c.any(s,p.vcard("nameEmailIndex"));try{await c.fetcher.load(t)}catch(e){C(e)}h("Loaded groups and name index."),x(s),h("Groupless list finished..")})});const M=w.appendChild(d.createElement("button"));async function j(e){async function n(e){let n=[],t=[];e.forEach(e=>{let r=c.statementsMatching(null,p.owl("sameAs"),null,e.doc()).map(e=>e.subject);const o=new Set(r.map(e=>e.uri));r=[...o].map(e=>c.sym(e)),r.forEach(r=>{if(!c.each(r,p.vcard("fn"),null,e.doc()).length){n=n.concat(c.statementsMatching(r,p.owl("sameAs"),null,e.doc()).concat(c.statementsMatching(void 0,void 0,r,e.doc())));c.each(r,p.owl("sameAs"),null,e.doc()).forEach(n=>{t=t.concat($rdf.st(n,p.owl("sameAs"),r,e.doc())).concat($rdf.st(e,p.vcard("hasMember"),n,e.doc()))})}})}),n.length&&confirm("Groups can be updated to old data model ?")?(await c.updater.updateMany(n,t),alert("Update done")):n.length||alert("Nothing to update.\nAll Groups already use the old data model.")}let t=c.each(e,u("includesGroup"));const r=new Set(t.map(e=>e.uri));t=[...r].map(e=>c.sym(e)),n(t)}M.style.cssText=f,M.textContent="Put all individuals with no group in a new group",M.addEventListener("click",e=>k(s));const A=w.appendChild(d.createElement("button"));A.style.cssText=f,A.textContent="Revert groups to old data model",A.addEventListener("click",e=>j(s))}(),w};var r=function(e,n){if("function"==typeof WeakMap)var t=new WeakMap,r=new WeakMap;return function(e,n){if(!n&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=n?r:t){if(o.has(e))return o.get(e);o.set(e,s)}for(const n in e)"default"!==n&&{}.hasOwnProperty.call(e,n)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,n))&&(a.get||a.set)?o(s,n,a):s[n]=e[n]);return s}(e,n)}(t(3383)),o=t(2404),a=t(8539)},7801(e,n,t){Object.defineProperty(n,"__esModule",{value:!0}),n.groupMembership=l,n.renderGroupMemberships=async function(e,n){function t(n){const t={deleteFunction:function(){!async function(n,t){const s=c.any(n,a.vcard("fn")),i=c.any(t,a.vcard("fn")),l=c.each(null,a.owl("sameAs"),n,t.doc());let u=[];l.forEach(e=>{c.statementsMatching(e,a.owl("sameAs"),n,t.doc())&&(u=u.concat(e))});let f=n;if(u.length>0&&(f=u[0]),c.each(null,a.vcard("hasMember"),f).length<2)return void alert("Must be a member of at least one group. Add to another group first.");if(confirm("Remove "+s+" from group "+i+"?")){let n=c.statementsMatching(e,void 0,void 0,t.doc()).concat(c.statementsMatching(void 0,void 0,e,t.doc()));u.forEach(e=>{c.statementsMatching(e,a.owl("sameAs"),void 0,t.doc()).length<2&&(n=n.concat(c.statementsMatching(void 0,void 0,e,t.doc())))}),c.updater.update(n,[],function(e,n,o){if(!n){const e="Error removing member from group "+t+": "+o;p.parentNode.appendChild(r.widgets.errorMessageBlock(d,e,"pink"))}}),console.log("Removed "+s+" from group "+i),c.fetcher.unload(t.doc()),await c.fetcher.load(t.doc()),o()}}(e,n)},noun:"membership"};return r.widgets.personTR(d,null,n,t)}function o(){s.syncTableToArray(p,l(e),t)}async function i(e=null){if(!e&&!(e=c.any(void 0,a.vcard("includesGroup"))))return;const n=c.any(e,a.vcard("groupIndex")),t=e?c.each(e,a.vcard("includesGroup"),null,n):[];await c.fetcher.load(t)}const{dom:d}=n,c=n.session.store,p=d.createElement("table");return await i(),p.refresh=o,o(),p};var r=function(e,n){if("function"==typeof WeakMap)var t=new WeakMap,r=new WeakMap;return function(e,n){if(!n&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=n?r:t){if(o.has(e))return o.get(e);o.set(e,s)}for(const n in e)"default"!==n&&{}.hasOwnProperty.call(e,n)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,n))&&(a.get||a.set)?o(s,n,a):s[n]=e[n]);return s}(e,n)}(t(3383)),o=t(2404);const a=r.ns,s=r.utils,i=o.store;function l(e){let n=i.statementsMatching(null,a.owl("sameAs"),e).map(e=>e.why).concat(i.each(null,a.vcard("hasMember"),e));const t=new Set(n.map(e=>e.uri));return n=[...t].map(e=>i.sym(e)),n}},8250(e,n,t){Object.defineProperty(n,"__esModule",{value:!0}),n.mintNewAddressBook=function(e,n){return new Promise(function(t,o){r.login.ensureLoadedProfile(n).then(n=>{console.log("Logged in as "+n.me);const s=n.me,l=n.dom,d=n.div,c=e.session.store,p=r.ns,u=n.newBase||n.newInstance.dir().uri;if((n.instanceClass||p.vcard("AddressBook")).sameTerm(p.vcard("Group"))){const e=n.newInstance||c.sym(n.newBase+"index.ttl#this"),r=e.doc();return c.add(e,p.rdf("type"),p.vcard("Group"),r),c.add(e,p.vcard("fn"),n.instanceName||"untitled group",r),void c.fetcher.putBack(r,{contentType:"text/turtle"}).then(function(e){t(n)}).catch(function(e){o(new Error("Error creating document for new group "+e))})}function f(e){d.appendChild(r.widgets.errorMessageBlock(l,e,"pink"))}let w='@prefix vcard: <http://www.w3.org/2006/vcard/ns#>.\n @prefix ab: <http://www.w3.org/ns/pim/ab#>.\n @prefix dc: <http://purl.org/dc/elements/1.1/>.\n @prefix xsd: <http://www.w3.org/2001/XMLSchema#>.\n\n <#this> a vcard:AddressBook;\n dc:title "New address Book";\n vcard:nameEmailIndex <people.ttl>;\n vcard:groupIndex <groups.ttl>.\n';w+="<#this> <http://www.w3.org/ns/auth/acl#owner> <"+s.uri+">.\n\n";const h=c.sym(u+"index.ttl#this"),m=[{to:"index.ttl",content:w,contentType:"text/turtle"},{to:"groups.ttl",content:"",contentType:"text/turtle"},{to:"people.ttl",content:"",contentType:"text/turtle"},{to:"",existing:!0,aclOptions:{defaultForNew:!0}}];!function e(){function r(n,t){if(!t)return f("Error writing new file "+p.to),o(new Error("Error writing new file "+p.to));i(w,s,g).then(()=>e()).catch(e=>{const n="Error setting access permissions for "+p.to+" : "+e.message;return f(n),o(new Error(n))})}if(0===m.length)!function(e,r){console.log(`New ${r} created at ${e}`);const o=d.appendChild(l.createElement("p"));o.setAttribute("style","font-size: 140%;"),o.innerHTML="Your <a href='"+e.uri+"'><b>new "+r+"</b></a> is ready. <br/><br/><a href='"+e.uri+"'>Go to new "+r+"</a>";const a=Object.assign({newInstance:e},n);t(a)}(h,"address book");else{var p=m.shift();console.log("Creating new file "+p.to+" in new instance ");var w=a.uri.join(p.to,u),g=p.aclOptions||{};"content"in p?c.fetcher.webOperation("PUT",w,{data:p.content,saveMetadata:!0,contentType:p.contentType}).then(()=>r(0,!0)):"existing"in p?r(0,!0):o(new Error("copy not expected buiding new app!!"))}}()},e=>{n.div.appendChild(r.widgets.errorMessageBlock(e))})})};var r=s(t(3383)),o=t(2404),a=s(t(9676));function s(e,n){if("function"==typeof WeakMap)var t=new WeakMap,r=new WeakMap;return(s=function(e,n){if(!n&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=n?r:t){if(o.has(e))return o.get(e);o.set(e,s)}for(const n in e)"default"!==n&&{}.hasOwnProperty.call(e,n)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,n))&&(a.get||a.set)?o(s,n,a):s[n]=e[n]);return s})(e,n)}const{setACLUserPublic:i}=o.solidLogicSingleton.acl},8539(e,n,t){Object.defineProperty(n,"__esModule",{value:!0}),n.addPersonToGroup=async function(e,n){const t=[e.doc(),n.doc()];try{await c.fetcher.load(t)}catch(e){throw new Error("addPersonToGroup: "+e)}const r=c.findTypeURIs(e);if(!(l.vcard("Individual").uri in r)&&!(l.vcard("Organization").uri in r))return alert(`Can't add ${e} to a group: it has to be an individual or another group.`);const a=c.any(e,l.vcard("fn")),i=c.any(n,l.vcard("fn"));if(!a)return alert("No vcard name known for "+e);if(c.holds(e,l.vcard("fn"),null,n.doc()))return alert("ALREADY added "+a+" to group "+i);if(!confirm("Add "+a+" to group "+i+"?"))return;const d=[o.st(e,l.vcard("fn"),a,n.doc())],u=(0,s.getPersonas)(c,e).map(e=>e.value);u.length?u.forEach(t=>{d.push(o.st(c.sym(t),l.owl("sameAs"),e,n.doc())),d.push(o.st(n,l.vcard("hasMember"),c.sym(t),n.doc()))}):d.push(o.st(n,l.vcard("hasMember"),e,n.doc()));try{await p.update([],d),c.fetcher.unload(n.doc()),await c.fetcher.load(n.doc())}catch(e){throw new Error(`Error adding ${a} to group ${i}:`+e)}return e},n.getDataModelIssues=async function(e){const n=[],t=[];return e.forEach(e=>{c.each(e,l.vcard("hasMember"),null,e.doc()).forEach(r=>{const a=w(c,r,e.doc());if(a.length&&f(e,r))for(const s of a)if(!f(e,s)){n.push(o.st(e,l.vcard("hasMember"),r,e.doc())),t.push(o.st(e,l.vcard("hasMember"),s,e.doc()));break}})}),{del:n,ins:t}},n.getSameAs=w,n.groupMembers=function(e,n){const t=e.each(n,l.vcard("hasMember"),null,n.doc());let r=[];t.forEach(t=>{r=e.any(t,l.vcard("fn"),null,n.doc())?r.concat(t):r.concat(e.each(t,l.owl("sameAs"),null,n.doc()))});const o=new Set(r.map(e=>e.uri));return r=[...o].map(n=>e.sym(n)),r},n.isLocal=f,n.sanitizeToAlpha=u,n.saveNewContact=async function(e,n,t,r){await c.fetcher.load(e.doc());const a=c.any(e,l.vcard("nameEmailIndex")),s=d.genUuid(),i=c.sym(e.dir().uri+"Person/"+s+"/index.ttl#this"),u=i.doc(),f=[o.st(i,l.vcard("inAddressBook"),e,a),o.st(i,l.vcard("fn"),n,a),o.st(i,l.vcard("fn"),n,u),o.st(i,l.rdf("type"),r,u),o.st(u,l.dct("created"),new Date,u)];for(const e in t){const t=c.sym(e),r=t.doc();f.push(o.st(t,l.vcard("hasMember"),i,r),o.st(i,l.vcard("fn"),n,r))}try{await p.updateMany([],f)}catch(e){throw console.error("Error: can't update "+i+" as new contact:"+e),new Error("Updating new contact: "+e)}return i},n.saveNewGroup=async function(e,n){await c.fetcher.load(e.doc());const t=c.any(e,l.vcard("groupIndex")),r=u(n),a=c.sym(e.dir().uri+"Group/"+r+".ttl#this"),s=a.doc();try{await c.fetcher.load(t)}catch(e){throw new Error("Error loading group index!"+t.uri+": "+e)}if(c.holds(e,l.vcard("includesGroup"),a,t))return a;const i=[o.st(e,l.vcard("includesGroup"),a,t),o.st(a,l.rdf("type"),l.vcard("Group"),t),o.st(a,l.vcard("fn"),n,t)];try{await p.update([],i)}catch(e){throw new Error("Could not update group index "+e)}const d=[o.st(e,l.vcard("includesGroup"),a,s),o.st(a,l.rdf("type"),l.vcard("Group"),s),o.st(a,l.vcard("fn"),n,s)];try{await p.update([],d)}catch(e){throw new Error("Could not update group file: "+e)}return a},n.updateMany=async function(e,n=[]){const t=e.concat(n).map(e=>e.why),r=[];t.forEach(e=>{r.find(n=>n.equals(e))||r.push(e)});const o=r.map(t=>c.updater.update(e.filter(e=>e.why.sameTerm(t)),n.filter(e=>e.why.sameTerm(t))));return Promise.all(o)};var r=i(t(3383)),o=i(t(9676)),a=t(2404),s=t(7241);function i(e,n){if("function"==typeof WeakMap)var t=new WeakMap,r=new WeakMap;return(i=function(e,n){if(!n&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=n?r:t){if(o.has(e))return o.get(e);o.set(e,s)}for(const n in e)"default"!==n&&{}.hasOwnProperty.call(e,n)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,n))&&(a.get||a.set)?o(s,n,a):s[n]=e[n]);return s})(e,n)}const l=r.ns,d=r.utils,c=a.store,p=c.updater;function u(e){return e.replace(/\W/gu,"_").replace(/_+/g,"_")}function f(e,n){const t=e.dir().dir().dir();return n.uri&&n.uri.startsWith(t.uri)}function w(e,n,t){return e.each(n,l.owl("sameAs"),null,t).concat(e.each(null,l.owl("sameAs"),n,t))}},9436(e,n,t){Object.defineProperty(n,"__esModule",{value:!0}),n.escoParameters=n.dbpediaParameters=n.AUTOCOMPLETE_LIMIT=void 0,n.filterByLanguage=function(e,n){const t={};e.forEach(e=>{const n=e.subject.value;t[n]=t[n]||[],t[n].push(e)});const r=n;r.reverse();const o=[];for(const e in t){const n=t[e].map(e=>[r.indexOf(e.name?.["xml:lang"]||""),e]);n.sort(),n.reverse(),o.push(n[0][1])}return console.log(` Filter by language: ${e.length} -> ${o.length}`),o},n.getDbpediaDetails=m,n.getPreferredLanguages=async function(){return["fr","en","de","it"]},n.getWikidataDetails=h,n.getWikidataDetailsOld=async function(e,n,t){const r='select distinct * where {\n optional { $(subject) wdt:P31 ?class } # instance of\n optional { $(subject) wdt:P154 ?logo }\n optional { $(subject) wdt:P158 ?sealImage }\n# optional { $(subject) wdt:P159 ?headquartersLocation }\n\noptional { $(subject) wdt:P17 ?country }\noptional { $(subject) wdt:P18 ?image }\noptional { $(subject) wdt:P1813 ?shortName }\n\noptional { $(subject) wdt:P355 ?subsidiary }\n# SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en,de,it" }\n}'.replace(i,t.uri),o=await f(r,d);u(e,t,o,t.doc())},n.getWikidataLocation=async function(e,n,t){const r='select distinct * where {\n\n $(subject) wdt:P276 ?location .\n\n optional { ?location wdt:P2044 ?elevation }\n optional { ?location wdt:P131 ?region }\n optional { ?location wdt:P625 ?coordinates }\noptional { ?location wdt:P17 ?country }\n\n# SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en,de,it" }\n}'.replace(i,t.uri);console.log(" location query sparql:"+r);const o=await f(r,d);console.log(" location query bindings:",o),u(e,t,o,t.doc())},n.loadFromBindings=u,n.loadPublicDataThing=async function(e,n,t){if(t.uri.startsWith("https://dbpedia.org/resource/"))return m(e,n,t);if(!t.uri.match(/^https?:\/\/www\.wikidata\.org\/entity\/.*/)){const n=t.uri.startsWith("http:")?e.sym("https:"+t.uri.slice(5)):t;return e.fetcher.load(n,{credentials:"omit",headers:{Accept:"text/turtle"}})}await h(e,n,t)},n.predMap=void 0,n.queryESCODataByName=async function(e,n,t){if(!t.searchByNameURI)throw new Error("Query target searchByNameURI is required for ESCO queries");const r=t.searchByNameURI.replace("$(name)",e).replace("$(limit)",""+s).replace("$(class)",n.uri);console.log("Querying ESCO data - uri: "+r);const a=(await o.store.fetcher.webOperation("GET",r,{credentials:"omit",headers:{Accept:"application/json"}})).responseText;if(!a)throw new Error("No response text from ESCO query "+r);if(console.log(" Query result text"+a.slice(0,500)+"..."),0===a.length)throw new Error("Wot no text back from ESCO query "+r);const i=JSON.parse(a);console.log(" Query result JSON"+JSON.stringify(i,null,4).slice(0,500)+"...");const l=i._embedded.results;return l.map(e=>({name:{value:e.title,type:"literal"},uri:{type:"IRI",value:e.uri}}))},n.queryPublicDataByName=async function(e,n,t){const r=t.searchByNameQuery.replace("$(name)",e).replace("$(limit)",""+s).replace("$(class)",n.uri);return console.log("Querying public data - sparql: "+r),f(r,t)},n.queryPublicDataConstruct=w,n.queryPublicDataSelect=f,n.wikidataParameters=n.wikidataClasses=n.wikidataClassMap=void 0;var r=t(9676),o=t(2404),a=t(3383);const s=n.AUTOCOMPLETE_LIMIT=3e3,i=/\$\(subject\)/g;n.wikidataClasses={Corporation:"http://www.wikidata.org/entity/Q6881511",EducationalOrganization:"http://www.wikidata.org/entity/Q178706",GovernmentOrganization:"http://www.wikidata.org/entity/Q327333",MedicalOrganization:"http://www.wikidata.org/entity/Q4287745",MusicGroup:"http://www.wikidata.org/entity/Q32178211",NGO:"http://www.wikidata.org/entity/Q163740",Occupation:"http://www.wikidata.org/entity/Q28640",Project:"http://www.wikidata.org/entity/Q170584",SportsOrganization:"http://www.wikidata.org/entity/Q4438121"};n.escoParameters={label:"ESCO",logo:"https://ec.europa.eu/esco/portal/static_resource2/images/logo/logo_en.gif",searchByNameQuery:void 0,searchByNameURI:"https://ec.europa.eu/esco/api/search?language=$(language)&type=occupation&text=$(name)",endpoint:void 0,class:{}};const l=n.dbpediaParameters={label:"DBPedia",logo:"https://upload.wikimedia.org/wikipedia/commons/thumb/7/73/DBpediaLogo.svg/263px-DBpediaLogo.svg.png",searchByNameQuery:'select distinct ?subject, ?name where {\n ?subject a $(class); rdfs:label ?name\n FILTER regex(?name, "$(name)", "i")\n } LIMIT $(limit)',endpoint:"https://dbpedia.org/sparql/",class:{AcademicInsitution:"http://umbel.org/umbel/rc/EducationalOrganization"}},d=n.wikidataParameters={label:"WikiData",logo:"https://www.wikimedia.org/static/images/project-logos/wikidatawiki.png",endpoint:"https://query.wikidata.org/sparql",class:{AcademicInsitution:"http://www.wikidata.org/entity/Q4671277",Enterprise:"http://www.wikidata.org/entity/Q6881511",Business:"http://www.wikidata.org/entity/Q4830453",NGO:"http://www.wikidata.org/entity/Q79913",CharitableOrganization:"http://www.wikidata.org/entity/Q708676",Insitute:"http://www.wikidata.org/entity/Q1664720"},searchByNameQuery:'SELECT ?subject ?name\n WHERE {\n ?klass wdt:P279* $(class) .\n ?subject wdt:P31 ?klass .\n ?subject rdfs:label ?name.\n FILTER regex(?name, "$(name)", "i")\n } LIMIT $(limit) ',insitituteDetailsQuery:'CONSTRUCT\n{ wd:Q49108 schema:name ?itemLabel;\n schema:logo ?logo;\n schema:logo ?sealImage;\n schema:subOrganization ?subsidiary .\n ?subsidiary schema:name ?subsidiaryLabel .\n}\nWHERE\n{\n wd:Q49108 # rdfs:label ?itemLabel ;\n wdt:P154 ?logo;\n wdt:P158 ?sealImage ;\n wdt:P355 ?subsidiary .\n # ?subsidiary rdfs:label ?subsidiaryLabel .\n\n SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE], fr". }\n}'};var c=n.wikidataClassMap={"http://www.wikidata.org/entity/Q15936437":a.ns.schema("CollegeOrUniversity"),"http://www.wikidata.org/entity/Q1664720":a.ns.schema("EducationalOrganization"),"http://www.wikidata.org/entity/Q43229":a.ns.schema("Organization"),"http://www.wikidata.org/entity/Q3918":a.ns.schema("CollegeOrUniversity"),"http://www.wikidata.org/entity/Q170584":a.ns.schema("Project"),"http://www.wikidata.org/entity/Q327333":a.ns.schema("GovernmentOrganization"),"http://www.wikidata.org/entity/Q2221906":a.ns.schema("Place")},p=n.predMap={class:a.ns.rdf("type"),sealImage:a.ns.schema("logo"),shortName:a.ns.foaf("nick"),subsidiary:a.ns.schema("subOrganization")};function u(e,n,t,o){const s={};console.log(`loadFromBindings: subject: ${n}`),console.log(` doc: ${o}`),t.forEach(e=>{for(const n in e){const t=e[n],r=JSON.stringify(t);s[n]=s[n]||new Set,s[n].add(r)}});for(const t in s){const i=s[t];console.log(` results ${t} -> ${i}`),i.forEach(s=>{const i=JSON.parse(s),{type:l,value:d}=i;let u;if("uri"===l)u=e.sym(d);else{if("literal"!==l)throw new Error(`loadFromBindings: unexpected type: ${l}`);u=new r.Literal(d,i.language,i.datatype)}if("type"===t)c[d]?u=c[d]:console.warn("Unmapped Wikidata Class: "+d);else if("coordinates"===t){console.log(" @@@ hey a point: "+d);const t=/.*\(([-0-9\.-]*) ([-0-9\.-]*)\)/.exec(d);if(t){const s=a.ns.xsd("float"),i=new r.Literal(t[1],null,s),l=new r.Literal(t[2],null,s);e.add(n,a.ns.schema("longitude"),l,o),e.add(n,a.ns.schema("latitude"),i,o)}}else if(p[t]){const r=p[t]||a.ns.schema(t);e.add(n,r,u,o),console.log(` public data ${r} ${u}.`)}})}}async function f(e,n){if(!n.endpoint)throw new Error("Query target endpoint is required");const t=new URL(n.endpoint);t.searchParams.append("query",e);const r=t.href;console.log(" queryPublicDataSelect uri: "+r);const a=(await o.store.fetcher.webOperation("GET",r,{credentials:"omit",headers:{Accept:"application/json"}})).responseText;if(a&&0!==a.length){const e=JSON.parse(a);console.log(" Query result JSON"+JSON.stringify(e,null,4).slice(0,100)+"...");return e.results.bindings}throw new Error("Wot no text back from query "+r)}async function w(e,n,t){if(console.log("queryPublicDataConstruct: sparql:",e),!t.endpoint)throw new Error("Query target endpoint is required");const a=new URL(t.endpoint);a.searchParams.append("query",e);const s=a.href;console.log(" queryPublicDataConstruct uri: "+s);const i=(await o.store.fetcher.webOperation("GET",s,{credentials:"omit",headers:{Accept:"text/turtle"}})).responseText,l=i&&i.length>500?i.slice(0,200)+" ... "+i.slice(-200):i;if(console.log(" queryPublicDataConstruct result text:"+l),!i||0===i.length)throw new Error("queryPublicDataConstruct: No text back from construct query:"+s);(0,r.parse)(i,o.store,n.uri,"text/turtle")}async function h(e,n,t){const r='prefix vcard: <http://www.w3.org/2006/vcard/ns#>\nCONSTRUCT\n{ wd:Q49108 vcard:fn ?itemLabel.\nwd:Q49108 rdf:type ?klass. ?klass rdfs:label ?klassLabel; rdfs:comment ?klassDescription .\nwd:Q49108 schema:logo ?logo;\n schema:image ?image;\n schema:logo ?sealImage;\n schema:subOrganization ?subsidiary .\n ?subsidiary rdfs:label ?subsidiaryLabel .\n ?supersidiary schema:subOrganization wd:Q49108 .\n ?supersidiary rdfs:label ?supersidiaryLabel .\n wd:Q49108 schema:location ?location .\n ?location schema:elevation ?elevation .\n ?location wdt:P131 ?region . ?region rdfs:label ?regionLabel .\n ?location wdt:P625 ?coordinates .\n ?location schema:country ?country . ?country rdfs:label ?countryLabel .\n}\nWHERE\n{ optional {wd:Q49108 rdfs:label ?itemLabel} .\n optional {wd:Q49108 wdt:P154 ?logo .}\n optional {wd:Q49108 wdt:P31 ?klass .}\n optional {wd:Q49108 wdt:P158 ?sealImage .}\n optional {wd:Q49108 wdt:P18 ?image .}\n\n optional { wd:Q49108 wdt:P355 ?subsidiary . }\n optional { ?supersidiary wdt:P355 wd:Q49108. }\n\n optional { wd:Q49108 wdt:P276 ?location .\n\n optional { ?location schema:eleveation ?elevation }\n optional { ?location wdt:P131 ?region }\n optional { ?location wdt:P625 ?coordinates }\n optional { ?location wdt:P17 ?country }\n }\n SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en,de,it". }\n}\n'.replace(/wd:Q49108/g,t.value);await w(r,t,d),console.log("getWikidataDetails: loaded.",t)}async function m(e,n,t){const r=`select distinct ?city, ?state, ?country, ?homepage, ?logo, ?lat, ?long, WHERE {\n OPTIONAL { <${t}> <http://dbpedia.org/ontology/city> ?city }\n OPTIONAL { ${t} <http://dbpedia.org/ontology/state> ?state }\n OPTIONAL { ${t} <http://dbpedia.org/ontology/country> ?country }\n OPTIONAL { ${t} foaf:homepage ?homepage }\n OPTIONAL { ${t} foaf:lat ?lat; foaf:long ?long }\n OPTIONAL { ${t} <http://dbpedia.org/ontology/country> ?country }\n }`;return(await f(r,l)).map(e=>{const n=e.subject.value,t=e.name?.value;return{uri:n,name:t}})}}}]);
2
+ //# sourceMappingURL=322.mashlib.min.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";(this.webpackChunkMashlib=this.webpackChunkMashlib||[]).push([[348],{646(t,e,n){n.r(e),n.d(e,{default:()=>s});var r=n(3383),o=n(4011);const i=r.ns,s={icon:r.icons.iconBase+"noun_534313.svg",name:"audio",label:function(t,e){const n=e.session.store.findTypeURIs(t),r=o.mediaTypeClass("audio/*").uri.split("*")[0];for(const t in n)if(t.startsWith(r))return"Play audio";return null},render:function(t,e){const n=e.session.store,r=e.dom,o=!1,s=!0,c=!0,l=!1,a=function(t){const e=t.lastIndexOf(".");if(e<0)return t;return e<t.lastIndexOf("/")?t:t.slice(0,e)},u=function(t){const e=t.uri.split("/").slice(-3),n=function(t){try{return decodeURIComponent(t)}catch(e){return t}};b.textContent=n(e[0]),y.textContent=n(e[1]),v.textContent=n(a(e[2]))},d=function(t,e){return new Promise(function(r){if(e=e||0,!s)return r(null);const o=n.any(void 0,i.ldp("contains"),t)||t.dir();if(!o)return r(null);n.fetcher.load(o).then(function(s){const a=n.each(o,i.ldp("contains"));let u;a.sort();for(let s=0;s<a.length;s++)if(t.uri===a[s].uri){if(u=(s+1)%a.length,0!==u)return r(a[u]);if(!c)return r(l?a[u]:null);if(1===e||!c)return r(null);d(o,e+1).then(function(t){t&&n.fetcher.load(t).then(function(e){const o=n.each(t,i.ldp("contains"));return 0===o.length?r(null):(o.sort(),console.log("New Album: "+t),r(o[0]))})})}})})},h=function(t){const e=n.sym(t.target.getAttribute("src"));if(!s)return;const r=function(e){const o=e;d(o).then(function(e){e?!function(t){const e=n.any(void 0,i.ldp("contains"),t);if(!e)return!1;const r=n.each(e,i.ldp("contains"));if(r.length<2)return!1;const o=t.uri;for(let t=0;t<r.length;t++){const e=r[t].uri;if(o.length>e.length&&o.startsWith(a(e)))return!0;if(o.endsWith(".m4a")&&e.endsWith(".mp3")&&a(o)===a(e))return!0}return!1}(e)?(console.log("Moving on to "+e),u(e),w.appendChild(p(e,!0)),w.removeChild(t.target)):(console.log("Ignoring redundant "+e),r(e)):console.log("No successor to "+o)})};r(e)},p=function(t,e){const o=r.createElement("audio");return o.setAttribute("controls","yes"),n.fetcher._fetch(t.uri).then(function(t){return t.blob()}).then(function(t){const e=URL.createObjectURL(t);o.setAttribute("src",e)}),e&&o.setAttribute("autoplay","autoplay"),o.addEventListener("ended",h,!1),o},f=r.createElement("div"),m=f.appendChild(r.createElement("table")),g="padding: 0.3em; color:white; background-color: black;",b=m.appendChild(r.createElement("tr"));b.style.cssText=g;const y=m.appendChild(r.createElement("tr"));y.style.cssText=g;const v=m.appendChild(r.createElement("tr"));v.style.cssText=g;const w=m.appendChild(r.createElement("tr"));return u(t),w.appendChild(p(t,o)),!n.holds(void 0,i.ldp("contains"),t)&&t.dir()&&n.fetcher.load(t.dir()),f}}},1744(t,e,n){n.r(e),n.d(e,{imagePane:()=>o});var r=n(3383);const o={icon:r.icons.originalIconBase+"tango/22-image-x-generic.png",name:"image",label:function(t,e){const n=e.session.store;if(!n.anyStatementMatching(t,r.ns.rdf("type"),n.sym("http://purl.org/dc/terms/Image")))return null;return function(t,e,n){const r=t.fetcher.getHeader(e,"content-type");if(r)for(let t=0;t<r.length;t++)for(let e=0;e<n.length;e++)if(r[t].indexOf(n[e])>=0)return!0;return!1}(n,t,["application/pdf"])?null:"view"},render:function(t,e){const n=e.dom,r=e.session.store,o=n.createElement("div");o.setAttribute("class","imageView");const i=n.createElement("IMG");r.fetcher._fetch(t.uri).then(function(t){return t.blob()}).then(function(t){const e=URL.createObjectURL(t);i.setAttribute("src",e)}),i.setAttribute("style","max-width: 100%; max-height: 100%;");const s=n.createElement("TR");return s.appendChild(i),o.appendChild(s),o}}},3810(t,e,n){n.r(e),n.d(e,{default:()=>i});var r=n(3383),o=n(4011);const i={icon:r.icons.iconBase+"noun_1619.svg",name:"video",label:function(t,e){const n=e.session.store.findTypeURIs(t),r=o.mediaTypeClass("video/*").uri.split("*")[0];for(const t in n)if(t.startsWith(r))return"Play video";return null},render:function(t,e){const n=e.session.store,r=e.dom,o=r.createElement("div"),i=o.appendChild(r.createElement("video"));return i.setAttribute("controls","yes"),n.fetcher._fetch(t.uri).then(function(t){return t.blob()}).then(function(t){const e=URL.createObjectURL(t);i.setAttribute("src",e)}),i.setAttribute("width","100%"),o}}},7752(t,e,n){n.r(e),n.d(e,{default:()=>s});var r=n(3383),o=n(9676);const i=r.ns,s={icon:r.icons.iconBase+"noun_1619.svg",name:"playlistSlot",audience:[i.solid("PowerUser")],label:function(t,e){const n=e.session.store;return n.anyStatementMatching(t,r.ns.rdf("type"),n.sym("http://purl.org/ontology/pbo/core#PlaylistSlot"))?"playlist slot":null},render:function(t,e){const n=e.dom;const i=function(t,e){if(!e)return t;const o=n.createElement("a");return o.setAttribute("href",e),o.appendChild(t),o.addEventListener("click",r.widgets.openHrefInOutlineMode,!0),o},s=function(t){return n.createTextNode(t)},c=e.session.store,l=c.any(t,o.sym("http://purl.org/ontology/pbo/core#playlist_item"));let a=c.any(t,o.sym("http://purl.org/ontology/olo/core#index")),u=l.uri;const d=function(t){if(!t)return{html5:!0};const e=t.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-_%]+)/i),n=t.match(/\/\/(?:www\.)?vimeo.com\/([0-9a-z\-_]+)/i),r=t.match(/\/\/(?:www\.)?dai.ly\/([0-9a-z\-_]+)/i),o=t.match(/\/\/(?:www\.)?(?:vk\.com|vkontakte\.ru)\/(?:video_ext\.php\?)(.*)/i);return e?{youtube:e}:n?{vimeo:n}:r?{dailymotion:r}:o?{vk:o}:void 0}(u),h=n.createElement("div");let p,f;if(d&&d.youtube?(u=u.replace("watch?v=","embed/"),h.setAttribute("class","imageView"),p=n.createElement("IFRAME"),p.setAttribute("src",u),p.setAttribute("width",560),p.setAttribute("height",315),p.setAttribute("frameborder",0),p.setAttribute("style","max-width: 850px; max-height: 100%;"),p.setAttribute("allowfullscreen","true")):(h.setAttribute("class","imageView"),p=n.createElement("IMG"),p.setAttribute("src",l.value),p.setAttribute("width",560),p.setAttribute("height",315),p.setAttribute("style","max-width: 560; max-height: 315;")),a){const e=c.statementsMatching(null,o.sym("http://purl.org/ontology/olo/core#index")),r=[];for(let t=0;t<e.length;t++)e[t]&&r.push(parseInt(e[t].object.value,10));a=parseInt(a.value,10),f=n.createElement("div");const l=r[(r.indexOf(a)-1+r.length)%r.length],u=r[(r.indexOf(a)+1+r.length)%r.length],d=i(s("<<"),t.uri.split("#")[0]+"#"+l);f.appendChild(d);const h=n.createElement("span");h.innerHTML=" Playlist slot : "+a+" ",f.appendChild(h);const p=i(s(">>"),t.uri.split("#")[0]+"#"+u);f.appendChild(p)}const m=n.createElement("TR");return m.appendChild(p),f&&m.appendChild(f),h.appendChild(m),h}}}}]);
2
+ //# sourceMappingURL=348.mashlib.min.js.map
@@ -0,0 +1,2 @@
1
+ (this.webpackChunkMashlib=this.webpackChunkMashlib||[]).push([[315,371],{2914(e,t,n){const i=n(9676),s=n(3383),r=n(6049);e.exports={icon:s.icons.iconBase+"noun_109873.svg",name:"source",label:function(e,t){const n=t.session.store.findTypeURIs(e),s=i.Util.mediaTypeClass("text/*").uri.split("*")[0];for(const e in n){if(e.startsWith(s))return"Source";if(e.includes("xml"))return"XML Source";if(e.includes("json"))return"JSON Source";if(e.includes("javascript"))return"Javascript Source"}return null},mintNew:function(e,t){const n=e.session.store;let i=t.newInstance;if(!i){let e=t.newBase;e.endsWith("/")&&(e=e.slice(0,-1),t.newBase=e),i=n.sym(e),t.newInstance=i}const s=r.lookup(i.uri);if(!s||!(s.startsWith("text")||s.includes("xml")||s.includes("json")||s.includes("javascript"))){const e="A new text file has to have an file extension like .txt .ttl .json etc.";throw alert(e),new Error(e)}function l(e){let t="\n";return e.includes("json")?t="{}\n":e.includes("rdf+xml")&&(t='<rdf:RDF\n xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">\n\n</rdf:RDF>'),t}return new Promise(function(e,r){n.fetcher.webOperation("PUT",i.uri,{data:l(s),contentType:s}).then(function(n){console.log("New text file created: "+i.uri),t.newInstance=i,e(t)},e=>{alert("Cant make new file: "+e),r(e)})})},render:function(e,t){const n=t.dom,r=t.session.store,l=r.fetcher;let o,a,c,d=!0,u=!1,p=!1;const h=n.createElement("div");h.setAttribute("class","sourcePane");const f=h.appendChild(n.createElement("table")),y=f.appendChild(n.createElement("tr")),m=f.appendChild(n.createElement("tr")),g=f.appendChild(n.createElement("tr"));g.setAttribute("style","text-align: right;");const v=y.appendChild(n.createElement("textarea"));v.setAttribute("style","font-family: monospace; font-size: 100%; min-width:60em; margin: 1em 0.2em 1em 0.2em; padding: 1em; border: 0.1em solid #888; border-radius: 0.5em;");const w=g.appendChild(function(e){return s.widgets.button(e,void 0,"Compact",M,{needsBorder:!0})}(n)),b=g.appendChild(s.widgets.cancelButton(n)),x=g.appendChild(s.widgets.continueButton(n)),k=g.appendChild(function(e){return s.widgets.button(e,s.icons.iconBase+"noun_253504.svg","Edit")}(n));function E(){p||(u=!1,k.style.visibility=e.uri.endsWith("/")?"collapse":"visible",v.style.color="#888",b.style.visibility="visible",x.style.visibility="collapse",w.style="visibility: visible; width: 100px; padding: 10.2px; transform: translate(0, -30%)",N[o.split(";")]||(w.style.visibility="collapse"),v.setAttribute("readonly","true"))}function C(e){!p&&u&&(v.style.color="green",b.style.visibility="visible",x.style.visibility="visible",k.style.visibility="collapse",w.style.visibility="collapse",v.removeAttribute("readonly"))}const T={"text/n3":!0,"text/turtle":!0,"application/rdf+xml":!0,"application/xhtml+xml":!0,"text/html":!0,"application/json":!0,"application/ld+json":!0};function j(e,t){if(null!=e){-1===t.characterInFile&&t.lineNo&&(t.lineNo+=1);const n=(t.lineNo?e.value.split("\n",t.lineNo).join("\n").length:0)+t.characterInFile;if(e.createTextRange){const t=e.createTextRange();t.move("character",n),t.select()}else e.focus(),e.selectionStart&&e.setSelectionRange(n,n)}}function B(e,t){if(!e.ok){let i="HTTP error on "+t+"! Status: "+e.status;console.log(i),412===e.status&&(i="Error: File changed by someone else"),m.appendChild(s.widgets.errorMessageBlock(n,i))}return e.ok}const N={"text/n3":!0,"text/turtle":!0,"application/ld+json":!0};function M(t){if(N[o])try{i.parse(v.value,r,e.uri,o);Promise.resolve(i.serialize(r.sym(e.uri),r,e.uri,o)).then(e=>{v.value=e}),b.style.visibility="visible"}catch(e){m.appendChild(s.widgets.errorMessageBlock(n,e))}}function I(t){if(t.headers&&t.headers.get("content-type"))o=t.headers.get("content-type").split(";")[0],a=t.headers.get("allow"),c=t.headers.get("etag");else{r.each(null,r.sym("http://www.w3.org/2007/ont/link#requestedURI"),e.uri).forEach(e=>{const t=r.any(e,r.sym("http://www.w3.org/2007/ont/link#response"));t&&"NamedNode"===t.termType&&(o=r.anyValue(t,s.ns.httph("content-type")),a=r.anyValue(t,s.ns.httph("allow")),c=r.anyValue(t,s.ns.httph("etag")),c||console.log("sourcePane: No eTag on GET"))})}}function S(t){l.webOperation("GET",e.uri).then(function(e){if(!B(e,"GET"))return;const t=e.responseText;if(void 0===t){const e="source pane: No text in response object!!";return void m.appendChild(s.widgets.errorMessageBlock(n,e))}if(v.rows=t.split("\n").length+2,v.cols=80,v.value=t,I(e),!o)return d=!0,p=!0,void m.appendChild(s.widgets.errorMessageBlock(n,"Error: No content-type available!"));E(),a?d=a.indexOf("PUT")<0:(console.log("@@@@@@@@@@ No Allow: header from this server"),d=!1),v.readonly=d}).catch(e=>{h.appendChild(s.widgets.errorMessageBlock(n,"Error reading file: "+e))})}return v.addEventListener("keyup",C),w.addEventListener("click",M),k.addEventListener("click",function(){p||(u=!0,v.style.color="black",b.style.visibility="visible",x.style.visibility="collapse",k.style.visibility="collapse",w.style.visibility="collapse",v.removeAttribute("readonly"))}),b.addEventListener("click",S),x.addEventListener("click",async function(t){const a=v.value;if(!function(t,o,a){if(!T[o])return!0;let c;if("text/html"===o&&([t,o,c]=function(e){let t="",n="";const i=e.split("</script");if(i&&i.length)for(let e of i){e="<script"+e.split("<script")[1]+"<\/script>";const i=["text/turtle","text/n3","application/ld+json","application/rdf+xml"].find(t=>e.includes(`type="${t}"`));if(i){n=e.replace(/^<script(.*?)>/gm,"").replace(/<\/script>$/gm,""),t=i;break}}return[n,t,0]}(t),!o))return!0;try{if(m.innerHTML="","application/json"===o)return JSON.parse(t);try{r.removeDocument(e)}catch(e){if(!e.message.includes("Statement to be removed is not on store"))throw e;console.log(e)}return delete l.requested[e.value],"application/ld+json"===o?(JSON.parse(t),i.parse(t,r,a.uri,o,(e,r)=>{if(e)throw e;const l=i.serialize(a,r,a.uri,o);if(t.includes("@id")&&!l.includes("@id")){const e=new Error("Invalid jsonld : predicate do not expand to an absolute IRI");return m.appendChild(s.widgets.errorMessageBlock(n,e)),!1}return!0})):i.parse(t,r,a.uri,o),!0}catch(e){m.appendChild(s.widgets.errorMessageBlock(n,e));for(let t=e;t=t.cause;t)t.characterInFile&&j(v,t);return!1}}(a,o,e))return C(),void(v.style.color="red");const d={data:a,contentType:o};c&&(d.headers={"if-match":c});try{if(!B(await l.webOperation("PUT",e.uri,d),"PUT"))return;try{const t=await l.webOperation("HEAD",e.uri);if(!B(t,"HEAD"))return;I(t),E()}catch(e){throw e}}catch(e){h.appendChild(s.widgets.errorMessageBlock(n,"Error saving back: "+e))}}),S(),h}}},8466(){}}]);
2
+ //# sourceMappingURL=371.mashlib.min.js.map