import{G as e,Gt as t,H as n,Lt as r,Nt as i,Rt as a,ft as o,q as s}from"./content_renderer-DOj8g78V.js";import{F as c,U as l,a as u}from"./i18n-BaLR3UdQ.js";import{t as d}from"./server-BXh06Wz_.js";import{nt as f}from"./hooks-ClTXKdUl.js";import{t as p}from"./note_autocomplete-BT55HtG6.js";import{i as m}from"./experimental_features-cVhuQmAy.js";import{t as h}from"./attribute_autocomplete-BWAlHWwK.js";var g=`
<div class="attr-detail tn-tool-dialog">
    <style>
        .attr-detail {
            display: block;
            background-color: var(--accented-background-color);
            border: 1px solid var(--main-border-color);
            border-radius: 4px;
            z-index: 1000;
            padding: 15px;
            position: absolute;
            width: 500px;
            max-height: 600px;
            overflow: auto;
            box-shadow: 10px 10px 93px -25px black;
            contain: none;
        }

        .attr-help td {
            color: var(--muted-text-color);
            padding: 5px;
        }

        .related-notes-list {
            padding-inline-start: 20px;
            margin-top: 10px;
            margin-bottom: 10px;
        }

        .attr-edit-table {
            width: 100%;
        }

        .attr-edit-table th {
            text-align: start;
        }

        .attr-edit-table td input[not(type="checkbox")] {
            width: 100%;
        }

        .attr-edit-table td input[type="checkbox"] {
            display: inline-block;
        }

        .close-attr-detail-button {
            font-size: x-large;
            cursor: pointer;
            position: relative;
            top: -2px;
        }

        .attr-save-delete-button-container {
            display: flex;
            margin-top: 15px;
        }

        .attr-detail input[readonly] {
            background-color: var(--accented-background-color) !important;
        }

        .attr-edit-table td {
            padding: 4px 0;
        }
    </style>

    <div style="display: flex; justify-content: space-between; align-items: start; margin-bottom: 8px;">
        <h5 class="attr-detail-title">${u(`attribute_detail.attr_detail_title`)}</h5>

        <button class="close-attr-detail-button icon-action bx bx-x" title="${u(`attribute_detail.close_button_title`)}"></button>
    </div>

    <div class="attr-is-owned-by">${u(`attribute_detail.attr_is_owned_by`)}</div>

    <table class="attr-edit-table">
        <tr title="${u(`attribute_detail.attr_name_title`)}">
            <th>${u(`attribute_detail.name`)}</th>
            <td><input type="text" class="attr-input-name form-control" /></td>
        </tr>
        <tr class="attr-help"></tr>
        <tr class="attr-row-value">
            <th>${u(`attribute_detail.value`)}</th>
            <td><input type="text" class="attr-input-value form-control" /></td>
        </tr>
        <tr class="attr-row-target-note">
            <th title="${u(`attribute_detail.target_note_title`)}">${u(`attribute_detail.target_note`)}</th>
            <td>
                <div class="input-group">
                    <input type="text" class="attr-input-target-note form-control" />
                </div>
            </td>
        </tr>
        <tr class="attr-row-promoted"
            title="${u(`attribute_detail.promoted_title`)}">
            <th></th>
            <td>
                <label class="tn-checkbox">
                    <input type="checkbox" class="attr-input-promoted" />
                    ${u(`attribute_detail.promoted`)}
                </label>
            </td>
        </tr>
        <tr class="attr-row-promoted-alias">
            <th title="${u(`attribute_detail.promoted_alias_title`)}">${u(`attribute_detail.promoted_alias`)}</th>
            <td>
                <div class="input-group">
                    <input type="text" class="attr-input-promoted-alias form-control" />
                </div>
            </td>
        </tr>
        <tr class="attr-row-multiplicity">
            <th title="${u(`attribute_detail.multiplicity_title`)}">${u(`attribute_detail.multiplicity`)}</th>
            <td>
                <select class="attr-input-multiplicity form-control">
                  <option value="single">${u(`attribute_detail.single_value`)}</option>
                  <option value="multi">${u(`attribute_detail.multi_value`)}</option>
                </select>
            </td>
        </tr>
        <tr class="attr-row-label-type">
            <th title="${u(`attribute_detail.label_type_title`)}">${u(`attribute_detail.label_type`)}</th>
            <td>
                <select class="attr-input-label-type form-control">
                  <option value="text">${u(`attribute_detail.text`)}</option>
                  <option value="textarea">${u(`attribute_detail.textarea`)}</option>
                  <option value="number">${u(`attribute_detail.number`)}</option>
                  <option value="boolean">${u(`attribute_detail.boolean`)}</option>
                  <option value="date">${u(`attribute_detail.date`)}</option>
                  <option value="datetime">${u(`attribute_detail.date_time`)}</option>
                  <option value="time">${u(`attribute_detail.time`)}</option>
                  <option value="url">${u(`attribute_detail.url`)}</option>
                  <option value="color">${u(`attribute_detail.color_type`)}</option>
                </select>
            </td>
        </tr>
        <tr class="attr-row-number-precision">
            <th title="${u(`attribute_detail.precision_title`)}">${u(`attribute_detail.precision`)}</th>
            <td>
                <div class="input-group">
                    <input type="number" class="form-control attr-input-number-precision" style="text-align: end">
                    <span class="input-group-text">${u(`attribute_detail.digits`)}</span>
                </div>
            </td>
        </tr>
        <tr class="attr-row-inverse-relation">
            <th title="${u(`attribute_detail.inverse_relation_title`)}">${u(`attribute_detail.inverse_relation`)}</th>
            <td>
                <div class="input-group">
                    <input type="text" class="attr-input-inverse-relation form-control" />
                </div>
            </td>
        </tr>
        <tr title="${u(`attribute_detail.inheritable_title`)}">
            <th></th>
            <td>
                <label class="tn-checkbox">
                    <input type="checkbox" class="attr-input-inheritable" />
                    ${u(`attribute_detail.inheritable`)}
                </label>
            </td>
        </tr>
    </table>

    <div class="attr-save-delete-button-container">
        <button class="btn btn-primary btn-sm attr-save-changes-and-close-button"
            style="flex-grow: 1; margin-inline-end: 20px">
            ${u(`attribute_detail.save_and_close`)}</button>

        <button class="btn btn-secondary btn-sm attr-delete-button">
            ${u(`attribute_detail.delete`)}</button>
    </div>

    <div class="related-notes-container">
        <br/>

        <h5 class="related-notes-tile">${u(`attribute_detail.related_notes_title`)}</h5>

        <ul class="related-notes-list"></ul>

        <div class="related-notes-more-notes">${u(`attribute_detail.more_notes`)}</div>
    </div>
</div>`,_=10,v={label:u(`attribute_detail.label`),"label-definition":u(`attribute_detail.label_definition`),relation:u(`attribute_detail.relation`),"relation-definition":u(`attribute_detail.relation_definition`)},y={label:{disableVersioning:u(`attribute_detail.disable_versioning`),calendarRoot:u(`attribute_detail.calendar_root`),archived:u(`attribute_detail.archived`),excludeFromExport:u(`attribute_detail.exclude_from_export`),run:u(`attribute_detail.run`),runOnInstance:u(`attribute_detail.run_on_instance`),runAtHour:u(`attribute_detail.run_at_hour`),disableInclusion:u(`attribute_detail.disable_inclusion`),sorted:u(`attribute_detail.sorted`),sortDirection:u(`attribute_detail.sort_direction`),sortFoldersFirst:u(`attribute_detail.sort_folders_first`),top:u(`attribute_detail.top`),hidePromotedAttributes:u(`attribute_detail.hide_promoted_attributes`),readOnly:u(`attribute_detail.read_only`),autoReadOnlyDisabled:u(`attribute_detail.auto_read_only_disabled`),appCss:u(`attribute_detail.app_css`),appTheme:u(`attribute_detail.app_theme`),appThemeBase:u(`attribute_detail.app_theme_base`),cssClass:u(`attribute_detail.css_class`),iconClass:u(`attribute_detail.icon_class`),pageSize:u(`attribute_detail.page_size`),customRequestHandler:{description:u(`attribute_detail.custom_request_handler`),helpPage:`J5Ex1ZrMbyJ6`},customResourceProvider:{description:u(`attribute_detail.custom_resource_provider`),helpPage:`J5Ex1ZrMbyJ6`},widget:u(`attribute_detail.widget`),workspace:u(`attribute_detail.workspace`),workspaceIconClass:u(`attribute_detail.workspace_icon_class`),workspaceTabBackgroundColor:u(`attribute_detail.workspace_tab_background_color`),workspaceCalendarRoot:u(`attribute_detail.workspace_calendar_root`),workspaceTemplate:u(`attribute_detail.workspace_template`),searchHome:u(`attribute_detail.search_home`),workspaceSearchHome:u(`attribute_detail.workspace_search_home`),inbox:u(`attribute_detail.inbox`),workspaceInbox:u(`attribute_detail.workspace_inbox`),sqlConsoleHome:u(`attribute_detail.sql_console_home`),bookmarkFolder:u(`attribute_detail.bookmark_folder`),shareHiddenFromTree:u(`attribute_detail.share_hidden_from_tree`),shareExternalLink:u(`attribute_detail.share_external_link`),shareAlias:u(`attribute_detail.share_alias`),shareOmitDefaultCss:u(`attribute_detail.share_omit_default_css`),shareRoot:u(`attribute_detail.share_root`),shareDescription:u(`attribute_detail.share_description`),shareRaw:u(`attribute_detail.share_raw`),shareDisallowRobotIndexing:u(`attribute_detail.share_disallow_robot_indexing`),shareCredentials:u(`attribute_detail.share_credentials`),shareIndex:u(`attribute_detail.share_index`),displayRelations:u(`attribute_detail.display_relations`),hideRelations:u(`attribute_detail.hide_relations`),titleTemplate:u(`attribute_detail.title_template`),template:u(`attribute_detail.template`),toc:u(`attribute_detail.toc`),color:u(`attribute_detail.color`),keyboardShortcut:u(`attribute_detail.keyboard_shortcut`),keepCurrentHoisting:u(`attribute_detail.keep_current_hoisting`),executeButton:u(`attribute_detail.execute_button`),executeDescription:u(`attribute_detail.execute_description`),excludeFromNoteMap:u(`attribute_detail.exclude_from_note_map`),newNotesOnTop:u(`attribute_detail.new_notes_on_top`),hideHighlightWidget:u(`attribute_detail.hide_highlight_widget`),printLandscape:u(`attribute_detail.print_landscape`),printPageSize:u(`attribute_detail.print_page_size`),printScale:u(`attribute_detail.print_scale`),printMargins:u(`attribute_detail.print_margins`)},relation:{runOnNoteCreation:u(`attribute_detail.run_on_note_creation`),runOnChildNoteCreation:u(`attribute_detail.run_on_child_note_creation`),runOnNoteTitleChange:u(`attribute_detail.run_on_note_title_change`),runOnNoteContentChange:u(`attribute_detail.run_on_note_content_change`),runOnNoteChange:u(`attribute_detail.run_on_note_change`),runOnNoteDeletion:u(`attribute_detail.run_on_note_deletion`),runOnBranchCreation:u(`attribute_detail.run_on_branch_creation`),runOnBranchChange:u(`attribute_detail.run_on_branch_change`),runOnBranchDeletion:u(`attribute_detail.run_on_branch_deletion`),runOnAttributeCreation:u(`attribute_detail.run_on_attribute_creation`),runOnAttributeChange:u(`attribute_detail.run_on_attribute_change`),template:u(`attribute_detail.relation_template`),inherit:u(`attribute_detail.inherit`),renderNote:u(`attribute_detail.render_note`),widget:u(`attribute_detail.widget_relation`),shareCss:u(`attribute_detail.share_css`),shareJs:u(`attribute_detail.share_js`),shareTemplate:u(`attribute_detail.share_template`),shareFavicon:u(`attribute_detail.share_favicon`)}},b=m(`new-layout`),x=class extends f{$title;$inputName;$inputValue;$rowPromoted;$inputPromoted;$inputPromotedAlias;$inputMultiplicity;$inputInverseRelation;$inputLabelType;$inputTargetNote;$inputNumberPrecision;$inputInheritable;$rowValue;$rowMultiplicity;$rowLabelType;$rowNumberPrecision;$rowInverseRelation;$rowTargetNote;$rowPromotedAlias;$attrIsOwnedBy;$attrSaveDeleteButtonContainer;$closeAttrDetailButton;$saveAndCloseButton;$deleteButton;$relatedNotesContainer;$relatedNotesTitle;$relatedNotesList;$relatedNotesMoreNotes;$attrHelp;$statusBar;relatedNotesSpacedUpdate;attribute;allAttributes;attrType;async refresh(){this.hide()}doRender(){this.relatedNotesSpacedUpdate=new s(async()=>this.updateRelatedNotes(),1e3),this.$widget=$(g),t.bindElShortcut(this.$widget,`ctrl+return`,()=>this.saveAndClose()),t.bindElShortcut(this.$widget,`esc`,()=>this.cancelAndClose()),this.$title=this.$widget.find(`.attr-detail-title`),this.$inputName=this.$widget.find(`.attr-input-name`),this.$inputName.on(`input`,e=>{e.originalEvent?.isComposing||this.userEditedAttribute()}),this.$inputName.on(`change`,()=>this.userEditedAttribute()),this.$inputName.on(`autocomplete:closed`,()=>this.userEditedAttribute()),this.$inputName.on(`focus`,()=>{h.initAttributeNameAutocomplete({$el:this.$inputName,attributeType:()=>[`relation`,`relation-definition`].includes(this.attrType||``)?`relation`:`label`,open:!0})}),this.$rowValue=this.$widget.find(`.attr-row-value`),this.$inputValue=this.$widget.find(`.attr-input-value`),this.$inputValue.on(`input`,e=>{e.originalEvent?.isComposing||this.userEditedAttribute()}),this.$inputValue.on(`change`,()=>this.userEditedAttribute()),this.$inputValue.on(`autocomplete:closed`,()=>this.userEditedAttribute()),this.$inputValue.on(`focus`,()=>{h.initLabelValueAutocomplete({$el:this.$inputValue,open:!0,nameCallback:()=>String(this.$inputName.val())})}),this.$rowPromoted=this.$widget.find(`.attr-row-promoted`),this.$inputPromoted=this.$widget.find(`.attr-input-promoted`),this.$inputPromoted.on(`change`,()=>this.userEditedAttribute()),this.$rowPromotedAlias=this.$widget.find(`.attr-row-promoted-alias`),this.$inputPromotedAlias=this.$widget.find(`.attr-input-promoted-alias`),this.$inputPromotedAlias.on(`change`,()=>this.userEditedAttribute()),this.$rowMultiplicity=this.$widget.find(`.attr-row-multiplicity`),this.$inputMultiplicity=this.$widget.find(`.attr-input-multiplicity`),this.$inputMultiplicity.on(`change`,()=>this.userEditedAttribute()),this.$rowLabelType=this.$widget.find(`.attr-row-label-type`),this.$inputLabelType=this.$widget.find(`.attr-input-label-type`),this.$inputLabelType.on(`change`,()=>this.userEditedAttribute()),this.$rowNumberPrecision=this.$widget.find(`.attr-row-number-precision`),this.$inputNumberPrecision=this.$widget.find(`.attr-input-number-precision`),this.$inputNumberPrecision.on(`change`,()=>this.userEditedAttribute()),this.$rowInverseRelation=this.$widget.find(`.attr-row-inverse-relation`),this.$inputInverseRelation=this.$widget.find(`.attr-input-inverse-relation`),this.$inputInverseRelation.on(`input`,e=>{e.originalEvent?.isComposing||this.userEditedAttribute()}),this.$rowTargetNote=this.$widget.find(`.attr-row-target-note`),this.$inputTargetNote=this.$widget.find(`.attr-input-target-note`),p.initNoteAutocomplete(this.$inputTargetNote,{allowCreatingNotes:!0}).on(`autocomplete:noteselected`,(e,t,n)=>{if(!t.notePath)return!1;let r=t.notePath.split(`/`);this.attribute.value=r[r.length-1],this.triggerCommand(`updateAttributeList`,{attributes:this.allAttributes??[]}),this.updateRelatedNotes()}),this.$inputInheritable=this.$widget.find(`.attr-input-inheritable`),this.$inputInheritable.on(`change`,()=>this.userEditedAttribute()),this.$closeAttrDetailButton=this.$widget.find(`.close-attr-detail-button`),this.$closeAttrDetailButton.on(`click`,()=>this.cancelAndClose()),this.$attrIsOwnedBy=this.$widget.find(`.attr-is-owned-by`),this.$attrSaveDeleteButtonContainer=this.$widget.find(`.attr-save-delete-button-container`),this.$saveAndCloseButton=this.$widget.find(`.attr-save-changes-and-close-button`),this.$saveAndCloseButton.on(`click`,()=>this.saveAndClose()),this.$deleteButton=this.$widget.find(`.attr-delete-button`),this.$deleteButton.on(`click`,async()=>{await this.triggerCommand(`updateAttributeList`,{attributes:(this.allAttributes||[]).filter(e=>e!==this.attribute)}),await this.triggerCommand(`saveAttributes`),this.hide()}),this.$attrHelp=this.$widget.find(`.attr-help`),this.$relatedNotesContainer=this.$widget.find(`.related-notes-container`),this.$relatedNotesTitle=this.$relatedNotesContainer.find(`.related-notes-tile`),this.$relatedNotesList=this.$relatedNotesContainer.find(`.related-notes-list`),this.$relatedNotesMoreNotes=this.$relatedNotesContainer.find(`.related-notes-more-notes`),$(window).on(`mousedown`,e=>{!$(e.target).closest(this.$widget[0]).length&&!$(e.target).closest(`.algolia-autocomplete`).length&&!$(e.target).closest(`#context-menu-container`).length&&this.hide()})}async showAttributeDetail({allAttributes:e,attribute:t,isOwned:r,x:s,y:c,focus:l,hideMultiplicity:d}){if(!t){this.hide();return}a(),this.attrType=this.getAttrType(t);let f=this.attrType===`label-definition`?t.name.substr(6):this.attrType===`relation-definition`?t.name.substr(9):t.name,p=this.attrType?.endsWith(`-definition`)?i.parse(t.value||``):{};this.attrType&&this.$title.text(v[this.attrType]),this.allAttributes=e,this.attribute=t,this.updateRelatedNotes(),this.$attrSaveDeleteButtonContainer.toggle(!!r),r?this.$attrIsOwnedBy.hide():t.noteId&&this.$attrIsOwnedBy.show().empty().append(t.type===`label`?`Label`:`Relation`).append(` ${u(`attribute_detail.is_owned_by_note`)} `).append(await o.createLink(t.noteId));let m=()=>r?void 0:`true`;if(this.$inputName.val(f).attr(`readonly`,m),this.$rowValue.toggle(this.attrType===`label`),this.$rowTargetNote.toggle(this.attrType===`relation`),this.$rowPromoted.toggle([`label-definition`,`relation-definition`].includes(this.attrType||``)),this.$inputPromoted.prop(`checked`,!!p.isPromoted).attr(`disabled`,m),this.$rowPromotedAlias.toggle(!!p.isPromoted),this.$inputPromotedAlias.val(p.promotedAlias||``).attr(`disabled`,m),this.$rowMultiplicity.toggle([`label-definition`,`relation-definition`].includes(this.attrType||``)&&!d),this.$inputMultiplicity.val(p.multiplicity||``).attr(`disabled`,m),this.$rowLabelType.toggle(this.attrType===`label-definition`),this.$inputLabelType.val(p.labelType||``).attr(`disabled`,m),this.$rowNumberPrecision.toggle(this.attrType===`label-definition`&&p.labelType===`number`),this.$inputNumberPrecision.val(p.numberPrecision||``).attr(`disabled`,m),this.$rowInverseRelation.toggle(this.attrType===`relation-definition`),this.$inputInverseRelation.val(p.inverseRelation||``).attr(`disabled`,m),t.type===`label`)this.$inputValue.val(t.value||``).attr(`readonly`,m);else if(t.type===`relation`&&(this.$inputTargetNote.attr(`readonly`,m).val(``).setSelectedNotePath(``),t.value)){let e=await n.getNote(t.value);e&&this.$inputTargetNote.val(e?e.title:``).setSelectedNotePath(t.value)}this.$inputInheritable.prop(`checked`,!!t.isInheritable).attr(`disabled`,m),this.updateHelp(),this.toggleInt(!0);let h=this.parent?.$widget?.offset()||{top:0,left:0},g=this.getDetailPosition(s,h),_=this.$widget.outerHeight(),y=$(window).height();if(!g||!_||!y){console.warn(`Can't position popup, is it attached?`);return}if(b){this.$statusBar||=$(document.body).find(`.component.status-bar`);let e=this.$statusBar.outerHeight()??0,t=document.body.clientHeight-e;this.$widget.css(`left`,h.left+(typeof g.left==`number`?g.left:0)).css(`top`,`unset`).css(`bottom`,e??0).css(`max-height`,t)}else this.$widget.css(`left`,g.left).css(`right`,g.right).css(`top`,c-h.top+70).css(`max-height`,_+c>y-50?y-c-50:1e4);l===`name`&&this.$inputName.trigger(`focus`).trigger(`select`)}getDetailPosition(e,t){let n=this.$widget.outerWidth();if(!n)return null;let r=e-t.left-n/2,i=``;return r<0?r=10:r+n>n-10&&(r=``,i=10),{left:r,right:i}}async saveAndClose(){await this.triggerCommand(`saveAttributes`),this.hide(),r()}async cancelAndClose(){await this.triggerCommand(`reloadAttributes`),this.hide(),r()}userEditedAttribute(){this.updateAttributeInEditor(),this.updateHelp(),this.relatedNotesSpacedUpdate.scheduleUpdate()}updateHelp(){let e=String(this.$inputName.val());if(this.attrType&&this.attrType in y&&e&&e in y[this.attrType]){let t=y[this.attrType][e],n=typeof t==`string`?t:t.description,r=typeof t==`string`?void 0:t.helpPage,i=$(`<td colspan=2>`).append($(`<strong>`).text(e)).append(` - `).append(n);if(r){let e=$(`<button class="icon-action bx bx-help-circle" type="button" style="margin-left: 5px; vertical-align: middle;" />`);e.on(`click`,()=>c(r)),i.append(e)}this.$attrHelp.empty().append(i).show()}else this.$attrHelp.empty().hide()}async updateRelatedNotes(){let{results:t,count:r}=await d.post(`search-related`,this.attribute);for(let e of t)e.noteId=e.notePathArray[e.notePathArray.length-1];if(t=t.filter(({noteId:e})=>e!==this.noteId),t.length===0)this.$relatedNotesContainer.hide();else{this.$relatedNotesContainer.show(),this.$relatedNotesTitle.text(u(`attribute_detail.other_notes_with_name`,{attributeType:this.attribute.type,attributeName:this.attribute.name})),this.$relatedNotesList.empty();let i=t.length<=_?t:t.slice(0,_),a=await n.getNotes(i.map(e=>e.noteId)),s=e.tabManager.getActiveContext()?.hoistedNoteId;for(let e of a){let t=e.getBestNotePathString(s),n=await o.createLink(t,{showNotePath:!0});this.$relatedNotesList.append($(`<li>`).append(n))}t.length>_?this.$relatedNotesMoreNotes.show().text(u(`attribute_detail.and_more`,{count:r-_})):this.$relatedNotesMoreNotes.hide()}}getAttrType(e){if(e.type===`label`)return e.name.startsWith(`label:`)?`label-definition`:e.name.startsWith(`relation:`)?`relation-definition`:`label`;if(e.type===`relation`)return`relation`;this.$title.text(``)}updateAttributeInEditor(){let e=String(this.$inputName.val());l.isValidAttributeName(e)||(e=l.filterAttributeName(e),this.$inputName.val(e)),this.attrType===`label-definition`?e=`label:${e}`:this.attrType===`relation-definition`&&(e=`relation:${e}`),this.attribute.name=e,this.attribute.isInheritable=this.$inputInheritable.is(`:checked`),this.attrType?.endsWith(`-definition`)?this.attribute.value=this.buildDefinitionValue():this.attrType===`relation`?this.attribute.value=this.$inputTargetNote.getSelectedNoteId()||``:this.attribute.value=String(this.$inputValue.val()),this.triggerCommand(`updateAttributeList`,{attributes:this.allAttributes??[]})}buildDefinitionValue(){let e=[];if(this.$inputPromoted.is(`:checked`)&&(e.push(`promoted`),this.$inputPromotedAlias.val()!==``&&e.push(`alias=${this.$inputPromotedAlias.val()}`)),e.push(this.$inputMultiplicity.val()),this.attrType===`label-definition`)e.push(this.$inputLabelType.val()),this.$inputLabelType.val()===`number`&&this.$inputNumberPrecision.val()!==``&&e.push(`precision=${this.$inputNumberPrecision.val()}`);else if(this.attrType===`relation-definition`&&String(this.$inputInverseRelation.val())?.trim().length>0){let t=this.$inputInverseRelation.val();e.push(`inverse=${l.filterAttributeName(String(t))}`)}return this.$rowNumberPrecision.toggle(this.attrType===`label-definition`&&this.$inputLabelType.val()===`number`),this.$rowPromotedAlias.toggle(this.$inputPromoted.is(`:checked`)),e.join(`,`)}hide(){this.toggleInt(!1)}createLink(e){return $(`<a>`,{href:`#root/${e}`,class:`reference-link`})}async noteSwitched(){this.hide()}};export{x as t};