"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _rdflib = require("rdflib");
var _solidUi = require("solid-ui");
var _profile = require("./profile.dom");
/**
 * Profile Editing App Pane
 *
 * Unlike view panes, this is available any place whatever the real subject,
 * and allows the user to edit their own profile.
 *
 * Usage: paneRegistry.register('profile/profilePane')
 * or standalone script adding onto existing mashlib.
 */
/* babel-plugin-inline-import './profileFormText.ttl' */
var profileFormText = "# 20210404a\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 foaf: <http://xmlns.com/foaf/0.1/>.\n@prefix owl: <http://www.w3.org/2002/07/owl#>.\n@prefix solid: <http://www.w3.org/ns/solid/terms#>.\n@prefix ui: <http://www.w3.org/ns/ui#>.\n@prefix schema: <http://schema.org/>.\n@prefix vcard: <http://www.w3.org/2006/vcard/ns#>.\n\n@prefix org: <http://www.w3.org/ns/org#>.\n@prefix esco: <http://data.europa.eu/esco/model#>.\n@prefix wd: <http://www.wikidata.org/entity/>.\n@prefix wdt: <http://www.wikidata.org/prop/direct/>.\n\n@prefix : <#>.\n\n:this\n    <http://purl.org/dc/elements/1.1/title> \"Profile form\" ;\n    a ui:Form ;\n    # ui:part :backgroundColor, :highlightColor;\n    ui:parts (\n      :styleGroup\n      :nicknameField\n      :pronounsForm\n      :LanguagesPrompt :LanguagesForm\n      :CVGroup\n      :SkillsPrompt :SkillsForm\n      ).\n\n:styleGroup a ui:Group; ui:weight 0; ui:parts ( :styleHeading :backgroundColor :highlightColor ).\n    :styleHeading a ui:Heading; ui:contents \"The style of your public profile.\".\n    :backgroundColor a ui:ColorField; ui:property solid:profileBackgroundColor;\n      ui:label \"Background color\"; ui:default \"#ffffff\".\n    :highlightColor a ui:ColorField; ui:property solid:profileHighlightColor;\n      ui:label \"Highlight color\"; ui:default \"#000000\".\n\n# Nickname\n\n:nicknameField a ui:SingleLineTextField; ui:size 12; ui:property foaf:nick;\n      ui:label \"Short name for chats, etc.\"@en, \"nom court\"@fr.\n\n # Pronouns\n\n :pronounsForm a ui:Group; ui:weight 0; ui:parts ( :pronounsPrompt :subjectPronounForm :objectPronounForm :relativePronounForm) .\n\n    :pronounsPrompt a ui:Comment; ui:contents  \"What are your pronouns?\" .\n\n    :subjectPronounForm a ui:SingleLineTextField; ui:property solid:preferredSubjectPronoun;\n        ui:size 10; ui:label \"he/she/they...\" .\n    :objectPronounForm a ui:SingleLineTextField; ui:property solid:preferredObjectPronoun;\n        ui:size 10; ui:label \"him/her/them...\" .\n    :relativePronounForm a ui:SingleLineTextField; ui:property solid:preferredRelativePronoun;\n        ui:size 10; ui:label \"his/hers/theirs...\" .\n\n  # Curriculum Vitae: membership of organizations\n\n  :CVHeading a ui:Heading; ui:contents \"Public Curriculum Vitae\".\n  :CVPrompt a ui:Comment; ui:contents  \"What organizations have you been involved with?\" .\n\n    :CVGroup a ui:Group; ui:weight 1; ui:parts ( :CVHeading :CVPrompt :involvementWithOrganizationsForm ).\n\n\n  solid:Role a rdfs:Class; owl:oneOf ( solid:CurrentRole solid:FormerRole solid:FutureRole ). # Future Role too?\n\n  org:member owl:inverse [ ui:label \"involvement with company, org etc\" ]. # timelimited involvement\n\n  :involvementWithOrganizationsForm a ui:Multiple;\n      ui:label \"Involvement with Organization\";\n      ui:property org:member; ui:reverse true; # link back from role to member\n      ui:ordered false; # Allow user to order CV secions rather than force date order? No.\n      ui:part :RoleMembershipForm.\n\n# This is a big important form for one of a series of roles in the list.\n\n  :RoleMembershipForm a ui:Group; ui:weight 3; ui:parts ( :MembershipFormHeading :roleNameField\n        :escoOccupationField :orgField :RoleClassifier :RoleDatesForm :RoleDescriptionForm).\n\n     :MembershipFormHeading a ui:Heading; ui:contents \"Details of this role\"@en, \"D\xE9tailes de ce r\xF4le\"@fr .\n\n     :orgField a ui:Choice; ui:label \"Organization\"@en, \"Organization\"@fr;\n          ui:canMintNew true; ui:use :OrganizationCreationForm ;\n          ui:property org:organization;\n          ui:from vcard:Organization .\n     :roleNameField a ui:SingleLineTextField; ui:property vcard:role; ui:size 60 .\n\n    :escoOccupationField a ui:AutocompleteField;\n          ui:label \"occupation\"; ui:size 60;\n          ui:property org:role;\n          ui:dataSource :ESCO_Occupation_DataSource;\n           ui:targetClass schema:Occupation .\n\n         :ESCO_Occupation_DataSource a ui:DataSource;\n            schema:name \"ESCO\";\n            ui:targetClass schema:Occupation ;\n            schema:logo <https://ec.europa.eu/esco/portal/static_resource2/images/logo/logo_en.gif>;\n            ui:searchByNameURI \"https://ec.europa.eu/esco/api/search?language=$(language)&type=occupation&text=$(name)\".\n\n     :instituteIdentityField a ui:AutocompleteField; ui:label \"in wikidata\";\n          ui:size 60;\n          ui:property solid:publicId; ui:dataSource :WikidataOnOrganizations.\n\n     :WikidataOnOrganizations a ui:DataSource ;\n       schema:name \"Wikidata\";\n       ui:endpoint \"https://query.wikidata.org/sparql\" ;\n       ui:targetClass  <http://www.wikidata.org/entity/Q43229>; # Use if nothing else\n       ui:searchByNameQuery \"\"\"SELECT ?subject ?name\n       WHERE {\n         ?klass wdt:P279* $(targetClass) .\n         ?subject wdt:P31 ?klass .\n         ?subject rdfs:label ?name.\n         FILTER regex(?name, \"$(name)\", \"i\")\n       } LIMIT $(limit) \"\"\" .\n\n      :WikidataOnOrganizations ui:classMap\n       [ ui:internalClass schema:Corporation; ui:externalClass <http://www.wikidata.org/entity/Q6881511>], #Enterprise is for-profit\n       [ ui:internalClass schema:EducationalOrganization; ui:externalClass <http://www.wikidata.org/entity/Q178706>], #insitution\n       [ ui:internalClass schema:ResearchOrganization; ui:externalClass <http://www.wikidata.org/entity/Q31855>], # reearch insitutie\n       [ ui:internalClass schema:GovernmentOrganization; ui:externalClass <http://www.wikidata.org/entity/Q327333>], #government agency\n       [ ui:internalClass schema:MedicalOrganization; ui:externalClass <http://www.wikidata.org/entity/Q4287745>],\n       [ ui:internalClass schema:MusicGroup; ui:externalClass <http://www.wikidata.org/entity/Q32178211>], #music organization\n       [ ui:internalClass schema:NGO; ui:externalClass <http://www.wikidata.org/entity/Q163740>], #nonprofit organization @@\n       [ ui:internalClass schema:Occupation; ui:externalClass <http://www.wikidata.org/entity/Q28640>], # superclass: Profession\n       [ ui:internalClass schema:Organization; ui:externalClass <http://www.wikidata.org/entity/Q43229>], # Superclass; Organization\n       [ ui:internalClass schema:Project; ui:externalClass <http://www.wikidata.org/entity/Q170584>],\n       [ ui:internalClass schema:SportsOrganization; ui:externalClass <http://www.wikidata.org/entity/Q4438121>] .\n\n\n# eposodes in one's career - Roles\n\nsolid:Role owl:disjointUnionOf ( solid:PastRole solid:CurrentRole solid:FutureRole ) .\nsolid:PastRole a rdfs:Class; rdfs:label \"former role\"@en, \"ancien r\xF4le\"@fr, \"vergangene Rolle\"@de, \"rol anterior\"@es .\nsolid:CurrentRole a rdfs:Class; rdfs:label \"current role\"@en, \"r\xF4le actuel\"@fr, \"momentane Rolle\"@de , \"rol actual\"@es .\nsolid:FutureRole a rdfs:Class; rdfs:label \"future role\"@en, \"r\xF4le \xE0 venir\"@fr, \"zuk\xFCnftige Rolle\"@de, \"rol futuro\"@es .\n\n:RoleDatesGroup a ui:Group; ui:weight 0; ui:parts ( :RoleClassifier :RoleDatesForm ) .\n  :RoleClassifier a ui:Classifier; ui:label \"What sort of role?\"@en;\n      ui:category solid:Role .\n\n  :RoleDatesForm a ui:Options; ui:dependingOn rdf:type; ui:case\n     [ ui:for solid:PastRole; ui:use :TwoDateForm ],\n     [ ui:for solid:CurrentRole; ui:use :StartDateForm ],\n     [ ui:for solid:FutureRole; ui:use :StartDateForm ].\n\n      :StartDateForm a ui:DateField; ui:label \"start\"@en,\"d\xE9but\"@fr;\n          ui:property schema:startDate .\n      :TwoDateForm a ui:Group; ui:weight 0; ui:parts ( :StartDateForm :EndDateForm ) .\n      :EndDateForm a ui:DateField; ui:label \"end\"@en,\"fin\"@fr;\n          ui:property schema:endDate .\n\n:RoleDescriptionForm a ui:MultiLineTextField; ui:property schema:description;\n  ui:label \"Describe your role\" .\n\n# Organizations\n\n vcard:Organization ui:creationForm :OrganizationCreationForm  .\n\n# Ontology data to drive the classifier\n\nsolid:InterestingOrganization owl:disjointUnionOf  (\n# Airline - a Corporation\n# Consortium - a Corporation or a NGO\n schema:Corporation\n schema:EducationalOrganization\n schema:ResearchOrganization  # Proposed. https://github.com/schemaorg/schemaorg/issues/2877\n# FundingScheme - eh?\n schema:GovernmentOrganization\n# LibrarySystem\n# LocalBusiness - Corporation\n# MedicalOrganization - a Corporation or a NGO\n schema:NGO\n # NewsMediaOrganization - a Corporation or a NGO\nschema:PerformingGroup # a band\nschema:Project # like Solid\nschema:SportsOrganization # a Team\nsolid:OtherOrganization\n ) .\n\n# This until the schema.org ontology adopts it\nschema:ResearchOrganization a rdfs:Class; rdfs:label \"Research Organization\"@en, \"Organization de Recherche\"@fr ,\n   \"organizaci\xF3n de investigaci\xF3n\"@es, \"\u0645\u0646\u0638\u0645\u0629 \u0627\u0644\u0628\u062D\u062B\"@ar, \"\u0905\u0928\u0941\u0938\u0902\u0927\u093E\u0928 \u0938\u0902\u0917\u0920\u0928\"@hi, \"Forschungsorganisation\"@de, \"shirika la utafiti\"@sw .\n\n  :OrganizationCreationForm a ui:Form; schema:name \"Form for editing an organization using public data\" ;\n    ui:parts ( :OrgClassifier :OrgSwitch   :OrganizationNameField :homePageURIField  ) .\n\n\n :OrgClassifier a ui:Classifier; ui:label \"What sort of organization?\"@en;\n    ui:category solid:InterestingOrganization .\n\n  :OrganizationNameField\n      a ui:SingleLineTextField ;\n      ui:label \"Organization Name\";\n      ui:maxLength \"200\" ;\n      ui:property schema:name ;\n      ui:size    80 .\n\n   :homePageURIField a ui:NamedNodeURIField; ui:size 80;\n      ui:label \"Home page URI\"@en;\n      ui:property  schema:uri . # @@ ??\n\n    :initituteTypeField a ui:Classifier;\n    ui:label \"What sort of organization\";\n    ui:category solid:InterestingOrganization .\n\n#  Depending on the type of org, chose a different form\n\n :OrgSwitch a ui:Options; ui:dependingOn rdf:type;\n   ui:case\n   [ ui:for schema:Corporation; ui:use :CorporationForm ],\n   [ ui:for schema:GovernmentOrganization; ui:use :GovernmentOrganizationForm ],\n   [ ui:for schema:PerformingGroup; ui:use :PerformingGroupForm ],\n   [ ui:for schema:Project; ui:use :ProjectForm ],\n   [ ui:for schema:NGO; ui:use :NGOForm ],\n   [ ui:for schema:EducationalOrganization; ui:use :EducationalOrganizationForm ],\n   [ ui:for schema:ResearchOrganization; ui:use :ResearchOrganizationForm ],\n   [ ui:for :SportsOrganization; ui:use :SportsOrganizationForm ],\n   [ ui:for solid:OtherOrganization; ui:use :OtherOrganizationForm ].\n\n\n  :CorporationForm a ui:Group; ui:weight 0; ui:parts ( :CorporationPrompt :CorporationAutocomplete ) .\n\n      :CorporationPrompt a ui:Comment; ui:contents \"Which corporation?\".\n\n      :CorporationAutocomplete a ui:AutocompleteField;\n      a ui:AutocompleteField; ui:label \"Corporation in wikidata\";\n           ui:size 60;\n           ui:targetClass  <http://www.wikidata.org/entity/Q6881511>; # Enterprise\n           ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n      :WikidataInstancesByName a ui:DataSource ;\n        schema:name \"Wikidata instances by name\";\n        ui:endpoint \"https://query.wikidata.org/sparql\" ;\n        ui:searchByNameQuery \"\"\"SELECT ?subject ?name\n        WHERE {\n          ?klass wdt:P279* $(targetClass) .\n          ?subject wdt:P31 ?klass .\n          ?subject rdfs:label ?name.\n          FILTER regex(?name, \"$(name)\", \"i\")\n        } LIMIT $(limit) \"\"\" ;\n\n        # Note this form of the query is very experimental\n        ui:searchByName [   ui:construct { ?subject schema:name ?name } ;\n                            ui:where { ?klass wdt:P279 ?targetClass .\n                                       ?subject wdt:P31 ?klass; rdfs:label ?name .\n                                     };\n                        ].\n\n  :GovernmentOrganizationForm a ui:Group; ui:weight 0; ui:parts ( :GovernmentOrganizationPrompt :GovernmentOrganizationAutocomplete ) .\n\n      :GovernmentOrganizationPrompt a ui:Comment; ui:contents \"Which GovernmentOrganization?\".\n\n      :GovernmentOrganizationAutocomplete\n      a ui:AutocompleteField; ui:label \"GovernmentOrganization in wikidata\";\n           ui:size 60;\n           ui:targetClass  <http://www.wikidata.org/entity/Q327333>; # GovernmentOrganization\n           ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n    :EducationalOrganizationForm a ui:Group; ui:weight 1; ui:parts ( :EducationalOrganizationPrompt :EducationalOrganizationAutocomplete ) .\n\n        :EducationalOrganizationPrompt a ui:Comment; ui:contents \"Which Educational Organization?\".\n\n        :EducationalOrganizationAutocomplete\n        a ui:AutocompleteField; ui:label \"Educational Organization in wikidata\";\n             ui:size 60;\n             ui:targetClass  <http://www.wikidata.org/entity/Q2385804>; # EducationalOrganization\n             ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n\n    :ResearchOrganizationForm a ui:Group; ui:weight 0; ui:parts ( :ResearchOrganizationPrompt :ResearchOrganizationAutocomplete ) .\n\n        :ResearchOrganizationPrompt a ui:Comment; ui:contents \"Which Research Organization?\".\n\n        :ResearchOrganizationAutocomplete\n        a ui:AutocompleteField; ui:label \"Research Insitute in wikidata\";\n             ui:size 60;\n             ui:targetClass  <http://www.wikidata.org/entity/Q31855>; # research institute\n             ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n\n  :NGOForm a ui:Group; ui:weight 0; ui:parts ( :NGOPrompt :NGOAutocomplete ) .\n\n      :NGOPrompt a ui:Comment; ui:contents \"Which NGO?\".\n\n      :NGOAutocomplete\n      a ui:AutocompleteField; ui:label \"NGO in wikidata\";\n           ui:size 60;\n           ui:targetClass  <http://www.wikidata.org/entity/Q163740>; # Non-profit org\n           ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n  :PerformingGroupForm a ui:Group; ui:weight 0; ui:parts ( :PerformingGroupPrompt :PerformingGroupAutocomplete ) .\n\n      :PerformingGroupPrompt a ui:Comment; ui:contents \"Which PerformingGroup?\".\n\n      :PerformingGroupAutocomplete\n      a ui:AutocompleteField; ui:label \"PerformingGroup in wikidata\";\n           ui:size 60;\n           ui:targetClass  <http://www.wikidata.org/entity/Q32178211>; # Music Org\n           ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n\n  :ProjectForm a ui:Group; ui:weight 0; ui:parts ( :ProjectPrompt :ProjectAutocomplete ) . #  :ProjectAutocomplete - no: supress, as not in WD\n\n      :ProjectPrompt a ui:Comment; ui:contents \"Which Project?\".\n\n      :ProjectAutocomplete\n      a ui:AutocompleteField; ui:label \"Project in wikidata\";\n           ui:size 60;\n           ui:targetClass  <http://www.wikidata.org/entity/Q170584>; # Project\n           ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n  :SportsOrganizationForm a ui:Group; ui:weight 0; ui:parts ( :SportsOrganizationPrompt :SportsOrganizationAutocomplete ) .\n\n      :SportsOrganizationPrompt a ui:Comment; ui:contents \"Which Sports Organization?\".\n\n      :SportsOrganizationAutocomplete\n      a ui:AutocompleteField; ui:label \"SportsOrganization in wikidata\";\n           ui:size 60;\n           ui:targetClass  <http://www.wikidata.org/entity/Q4438121>; # SportsOrganization\n           ui:property solid:publicId; ui:dataSource :WikidataInstancesByName.\n\n   :OtherOrganizationForm a ui:Group; ui:weight 0; ui:parts ( :OrganizationNameField :homePageURIField ) .\n\n  #################### Skills\n\n  :SkillsPrompt a ui:Comment; ui:contents  \"Skills?\" .\n\n  :SkillsForm a ui:Multiple;\n      ui:label \"Skills\";\n      ui:property schema:skills;\n      ui:ordered false; # Allow reader to order skills\n      ui:part :SkillForm.\n\n  :SkillForm a ui:Group; ui:weight 1; ui:parts ( :escoSkillField ).\n\n        # :skillNameField a ui:SingleLineTextField; ui:property vcard:role; ui:size 30 .\n\n        :escoSkillField a ui:AutocompleteField;\n              ui:label \"skill\"; ui:size 30;\n              ui:property solid:publicId;\n              ui:dataSource :ESCO_Skill_DataSource;\n               ui:targetClass schema:Skill .\n\n        :ESCO_Skill_DataSource a ui:DataSource;\n           schema:name \"ESCO Skill\";\n           ui:targetClass esco:Skill ;\n           schema:logo <https://ec.europa.eu/esco/portal/static_resource2/images/logo/logo_en.gif>;\n           ui:searchByNameURI \"https://ec.europa.eu/esco/api/search?language=$(language)&limit=$(limit)&type=skill&text=$(name)\".\n\n# Language\n\n:LanguagesPrompt a ui:Comment; ui:contents  \"Languages?\" .\n\n:LanguagesForm a ui:Multiple;\n    ui:label \"Languages\";\n    ui:property schema:knowsLanguage; # @@@\n    ui:ordered true; # Allow user to order languages most important first.\n    ui:part :LanguageForm.\n\n:LanguageForm a ui:Group; ui:weight 1; ui:parts ( :WikidataLanguageField ).\n\n    :WikidataLanguageField a ui:AutocompleteField;\n          ui:label \"Language\"; ui:size 30;\n          ui:property solid:publicId; # @@\n          ui:dataSource :WikidataLanguageDataSource;\n           ui:targetClass schema:Language .\n\n    :WikidataLanguageDataSource\n        schema:name \"Wikidata languages\";\n        ui:endpoint \"https://query.wikidata.org/sparql\" ;\n        ui:objectURIBase <https://www.w3.org/ns/iana/language-code/>;\n        # Add this to any literal string returned as ?subject\n\n         ui:searchByNameQuery \"\"\"SELECT ?item ?subject ?name\nWHERE\n{ ?item wdt:P305 ?subject .\n  OPTIONAL {?item rdfs:label ?name}\n  OPTIONAL {?item wdt:P1705 ?name}\n  FILTER regex(?name, \"$(name)\", \"i\")\n  FILTER regex(?subject, \"^..$\", \"i\")\n}\"\"\" .\n # Note we restrict code to two-letter codes with the second regex, so as to limit the deluge of languages\n # Hope there are not any important ones which have three-letter codes.\n # Omitted: SERVICE wikibase:label { bd:serviceParam wikibase:language \"$(languages)\". }\n\n\n# ENDS\n";
var highlightColor = _solidUi.style.highlightColor || '#7C4DFF';
var editProfileView = {
  global: true,
  icon: _solidUi.icons.iconBase + 'noun_492246.svg',
  name: 'editProfile',
  label: function label() {
    return null;
  },
  render: function render(subject, context) {
    var dom = context.dom;
    var store = context.session.store;
    function complainIfBad(ok, mess) {
      if (ok) return;
      div.appendChild(_solidUi.widgets.errorMessageBlock(dom, mess, '#fee'));
    }
    function renderProfileForm(div, subject) {
      var preferencesForm = (0, _rdflib.sym)('https://solidos.github.io/solid-panes/dashboard/profileStyle.ttl#this');
      var preferencesFormDoc = preferencesForm.doc();
      if (!store.holds(undefined, undefined, undefined, preferencesFormDoc)) {
        // If not loaded already
        (0, _rdflib.parse)(profileFormText, store, preferencesFormDoc.uri, 'text/turtle', function () {
          return null;
        }); // Load form directly
      }
      _solidUi.widgets.appendForm(dom, div, {}, subject, preferencesForm, editableProfile, complainIfBad);
    } // renderProfileForm

    var div = dom.createElement('div');
    var editableProfile;
    div.setAttribute('style', "border: 0.3em solid ".concat(highlightColor, "; border-radius: 0.5em; padding: 0.7em; margin-top:0.7em;"));
    var table = div.appendChild(dom.createElement('table'));
    // const top = table.appendChild(dom.createElement('tr'))
    var main = table.appendChild(dom.createElement('tr'));
    var bottom = table.appendChild(dom.createElement('tr'));
    var statusArea = bottom.appendChild(dom.createElement('div'));
    statusArea.setAttribute('style', 'padding: 0.7em;');
    function comment(str) {
      var p = main.appendChild(dom.createElement('p'));
      p.setAttribute('style', 'padding: 1em;');
      p.textContent = str;
      return p;
    }
    function heading(str) {
      var h = main.appendChild(dom.createElement('h3'));
      h.setAttribute('style', 'color:' + highlightColor + ';');
      h.textContent = str;
      return h;
    }
    var profileContext = {
      dom: dom,
      div: main,
      statusArea: statusArea,
      me: null
    };
    _solidUi.login.ensureLoadedProfile(profileContext).then(function (theContext) {
      var me = theContext.me;
      heading('Edit your public profile');
      var profile = me.doc();
      if (!store.updater) {
        throw new Error('Store has no updater');
      }
      if (store.any(me, _solidUi.ns.solid('editableProfile'))) {
        editableProfile = store.any(me, _solidUi.ns.solid('editableProfile'));
      } else if (store.updater.editable(profile.uri, store)) {
        editableProfile = profile;
      } else {
        statusArea.appendChild(_solidUi.widgets.errorMessageBlock(dom, "\u26A0\uFE0F Your profile ".concat(profile, " is not editable, so we cannot do much here."), 'straw'));
        return;
      }
      comment("Everything you put here will be public.\n        There will be other places to record private things.");
      heading('Your contact information');
      main.appendChild((0, _profile.paneDiv)(context, me, 'contact'));
      heading('People you know who have WebIDs');
      comment("This is your public social network.\n        Only put people here to whom you are happy to be publicly connected.\n        (You can always keep private track of friends and family in your contacts.)");

      // TODO: would be useful to explain what it means to "drag people"
      //       what is it that is being dragged?
      //       is there a way to search for people (or things to drag) on this page?
      if (editableProfile) {
        comment('Drag people onto the target below to add people.');
      }
      _solidUi.widgets.attachmentList(dom, me, main, {
        doc: profile,
        modify: !!editableProfile,
        predicate: _solidUi.ns.foaf('knows'),
        noun: 'friend'
      });
      heading('Communities you participate in');
      comment("These are organizations and projects (etc) whose stuff you share");

      // TODO: would be useful to explain what it means to "drag organizations"
      //       what is it that is being dragged?
      //       is there a way to search for people (or things to drag) on this page?
      //  Also provide a way of using cut and paste
      if (editableProfile) {
        comment('Drag organizations onto the target below to add organizations.');
      }
      _solidUi.widgets.attachmentList(dom, me, main, {
        doc: profile,
        modify: !!editableProfile,
        predicate: _solidUi.ns.solid('community'),
        noun: 'community'
      });

      // heading('The style of your public profile') headings are in form now
      renderProfileForm(main, me);
      heading('Thank you for filling your profile.');
    })["catch"](function (error) {
      statusArea.appendChild(_solidUi.widgets.errorMessageBlock(dom, error, '#fee'));
    });
    return div;
  }
};
var _default = exports["default"] = editProfileView;
//# sourceMappingURL=editProfile.view.js.map