"use strict";(self.webpackChunk_aidoop_aidoop_r=self.webpackChunk_aidoop_aidoop_r||[]).push([[9928],{81925:(e,r,t)=>{var a=t(9201),o=t(94430),i=t(15494);class n extends((0,i.N)(i.z)(o.oi)){static get styles(){return[o.iv`
        .tabs {
          display: flex;
        }
        .tab {
          background-color: var(--secondary-background-color);
          margin-top: var(--margin-default);
          padding: var(--padding-narrow) var(--padding-wide) 0 var(--padding-wide);
          border-radius: 9px 9px 0 0;
          border-right: 1px solid rgba(0, 0, 0, 0.4);
          text-transform: capitalize;
          color: var(--theme-white-color);
          opacity: 0.7;
          cursor: pointer;
          white-space: nowrap;
        }
        .tab[activate] {
          background-color: var(--primary-color);
          box-shadow: 2px -2px 2px 0px rgba(0, 0, 0, 0.15);
          opacity: 1;
          font-weight: bold;
        }
        .tab[disabledTab] {
          pointer-events: none;
        }
        .tab span,
        .tab span[activate] {
          font-weight: normal;
          font-size: var(--fontsize-default);
        }

        @media screen and (max-width: 480px) {
          .tab {
            margin-top: var(--margin-narrow);
            padding: var(--padding-narrow) var(--padding-default);
            text-align: center;
          }
          .tab[disabledTab] {
            pointer-events: none;
          }
          .tab span,
          .tab span[activate] {
            font-size: var(--fontsize-default);
            margin-top: -4px;
          }
        }
      `]}static get properties(){return{data:Object,currentTabKey:String,disabledKey:Object}}render(){const e=this.data||{},r=Object.keys(e),t=this.currentTabKey||r[0];return o.dy`
      ${r?.length>1?o.dy`
            <div class="tabs">
              ${r.map(((r,a)=>{const i=e[r];return o.dy`
                  <div
                    class="tab"
                    ?activate="${r===t}"
                    ?disabledTab="${!!Object.keys(this.disabledKey||{}).includes(r)&&!this.disabledKey[r]}"
                    @click="${()=>this.currentTabKey=r}"
                  >
                    ${r} ${i?.length>0?o.dy`<span>(${i.length})</span>`:""}
                  </div>
                `}))}
            </div>
          `:""}
    `}updated(e){e.has("currentTabKey")&&this.dispatchEvent(new CustomEvent("tabChanged",{detail:{currentTabKey:this.currentTabKey},bubbles:!0,composed:!0,cancelable:!0}))}}customElements.define("quick-find-tabs",n);t(77198);class d extends o.oi{static get styles(){return[o.iv`
        .nav-bar {
          background-color: var(--theme-white-color);
          border: 1px solid var(--primary-color);
          border-radius: 0 var(--border-radius) var(--border-radius) var(--border-radius);
          margin: 0 0 var(--margin-wide) 0;
          padding: var(--padding-narrow);
          transition: opacity ease-in-out 0.3s;
          opacity: 100%;
          color: var(--secondary-color);
          font-size: var(--fontsize-default);
        }
        .nav-bar[scrolling] {
          opacity: 100%;
          transition: opacity ease-in-out 0.3s;
        }
        .nav-bar * {
          vertical-align: middle;
        }
        mwc-icon {
          --mdc-icon-size: 14px;
          padding-left: var(--padding-narrow);
          position: relative;
          margin-top: -2px;
        }
        .nav-bar span {
          border-right: var(--border-dark-color);
          border-width: 0 1px;
          padding: 0 var(--padding-default) 0 var(--padding-narrow);
          opacity: 0.8;
          color: var(--secondary-color);
          font-size: var(--fontsize-small);
        }
        .nav-bar span[activate] {
          font-weight: bold;
          cursor: pointer;
          color: var(--secondary-text-color);
          font-size: var(--fontsize-default);
        }

        @media screen and (max-width: 480px) {
          :host {
            width: 25px;
          }
          .nav-bar {
            position: absolute;
            right: 25px;
            z-index: 100;

            background-color: rgba(var(--primary-color-rgb), 0.2);
            border: none;
            border-radius: 15px;
            margin-top: initial;
            padding: var(--padding-narrow) 0;
            opacity: 0%;
            text-align: center;
          }
          .nav-bar span {
            display: block;
            border: none;
            margin: auto;
            padding: 2px var(--padding-narrow) 0 var(--padding-narrow);
            font-size: 12px;
          }
        }
      `]}static get properties(){return{scrolling:Boolean,indexes:Array,activeIndexes:Array}}constructor(){super(),this.indexes=[...Array(26).fill(65).map(((e,r)=>String.fromCharCode(e+=r))),"#"]}render(){const e=this.activeIndexes||[],r=Boolean(this.scrolling),t=this.scrollable;return o.dy`
      ${t?o.dy`<div class="nav-bar" ?scrolling=${r}>
            <mwc-icon>anchor</mwc-icon> <label>Quick Find :</label>
            ${this.indexes.map((r=>{const t=e.indexOf(r)>=0;return o.dy` <span
                ?activate="${t}"
                class="nav-cursor"
                @click=${e=>{t&&this.onclickNavCursor(r)}}
                >${r}</span
              >`}))}
          </div>`:""}
    `}onclickNavCursor(e){this.dispatchEvent(new CustomEvent("navigateTo",{detail:e,composed:!0}))}}customElements.define("quick-find-scroll",d);class s extends o.oi{static get styles(){return[a.Ix,o.iv`
        :host {
          display: flex;
          flex: 1;
          flex-direction: column;
          overflow: hidden;
          max-width: var(--content-container-max-width);
        }
        .list-container {
          flex: 1;

          display: flex;
          flex-direction: column;
          background-color: var(--theme-white-color);
          border-radius: 0 var(--border-radius) var(--border-radius) var(--border-radius);
          border: var(--border-dark-color);
          border-width: 0 1px 1px 1px;
          box-shadow: var(--box-shadow);
          overflow: auto;
        }
        ul {
          margin: 0;
          padding: 0;
          flex: 1;
          list-style: none;
        }
        li {
          border-bottom: var(--border-dark-color);
          margin-bottom: -1px;
          color: var(--secondary-color);
        }
        li:nth-child(even) {
          background-color: rgba(0, 0, 0, 0.025);
        }
        li:hover {
          background-color: rgba(var(--primary-color-rgb), 0.2);
        }
        li div {
          font: bold 16px var(--theme-font);
        }
        li div.header {
          padding: var(--padding-default) var(--padding-wide);
        }
        [opened] {
          border-left: 4px solid var(--google-green-300);
          border-bottom: 3px solid rgba(0, 0, 0, 0.1);
        }
        [opened] .header {
          background-color: var(--primary-color);
          box-shadow: var(--box-shadow);
          color: var(--theme-white-color);
        }
        [opened] .header::after {
          display: block;
          margin-bottom: -16px;
          position: relative;
          margin-top: 9px;
          content: '';
          width: 0px;
          height: 0px;
          border-left: 7px solid transparent;
          border-right: 7px solid transparent;
          border-top: 7px solid var(--primary-color);
        }
        li span {
          display: block;
          opacity: 0.9;
          font: normal 14px/18px var(--theme-font);
        }
        .header mwc-icon {
          --mdc-icon-size: var(--fontsize-default);
          margin-right: var(--padding-narrow);
        }
        @media screen and (max-width: 480px) {
          .list-container {
            border-radius: 0 var(--border-radius) var(--border-radius) var(--border-radius);
            border-width: 0 1px 1px 1px;
          }
        }
      `]}static get properties(){return{data:Object,nameField:String,currentTabKey:String,list:Array,contentRenderer:Object,floatingDelay:Number,currentOpenedItemIdx:Number,scrollable:Boolean,headerRenderer:Function}}constructor(){super(),this.nameField="name",this.floatingDelay=1,this.headerRenderer=e=>o.dy`${e.name}<span>${e.description}</span>`}render(){const e=this.nameField,r=this.data||{},t=r[this.currentTabKey]?this.currentTabKey:Object.keys(r)[0];let a=this.data[t];a=this.sortByNameField(a);const i=this.currentOpenedItemIdx,n=this.computeActiveIndexes(a,e),d=this.scrollable;return o.dy`
      <quick-find-tabs
        .currentTabKey="${t}"
        .data="${r}"
        @tabChanged="${e=>{this.currentOpenedItemIdx=null,this.currentTabKey=e.detail.currentTabKey}}"
      ></quick-find-tabs>

      <quick-find-scroll
        @navigateTo="${this.navigateTo}"
        .scrollable="${d}"
        .activeIndexes="${n}"
      ></quick-find-scroll>

      <div class="list-container" @scroll=${this.onscroll.bind(this)}>
        <ul>
          ${a?.length?o.dy`
                ${a.map(((e,r)=>{const t=i===r;return o.dy`
                    <li
                      class="list-item"
                      ?opened="${t}"
                      .item="${e}"
                      @click="${()=>{this.currentOpenedItemIdx===r?this.currentOpenedItemIdx=-1:this.currentOpenedItemIdx=r}}"
                    >
                      <div class="header">
                        ${t&&"function"==typeof this.openHeaderRenderer?this.openHeaderRenderer(e):this.headerRenderer(e)}
                      </div>

                      ${t&&"function"==typeof this.contentRenderer?o.dy`<div @click="${e=>e.stopPropagation()}">
                            ${this.contentRenderer(e,this.currentTabKey)}
                          </div>`:""}
                    </li>
                  `}))}
              `:""}
        </ul>
      </div>
    `}get listItems(){return Array.from(this.renderRoot.querySelectorAll(".list-container li.list-item"))}get quickFindScroll(){return this.renderRoot.querySelector("quick-find-scroll")}async updated(e){(e.has("data")||e.has("currentTabKey"))&&(await this.updateComplete,this.scrollable=this.computeScrollable())}computeActiveIndexes(e,r){return Array.from(new Set(e?.map((e=>e[r][0].toUpperCase()))))}computeScrollable(){const e=this.renderRoot.querySelector("ul");return e.clientHeight<e.scrollHeight}navigateTo(e){const r=this.nameField,t=e.detail.toLowerCase(),a=this.sortByNameField(this.data[this.currentTabKey]).findIndex((e=>0===e[r].toLowerCase().indexOf(t))),o=this.renderRoot.querySelector(`ul :nth-child(${a+1})`);o?.scrollIntoView()}onscroll(){this.quickFindScroll.scrolling||(this.quickFindScroll.scrolling=!0),null!==this.timer&&clearTimeout(this.timer),this.timer=setTimeout((()=>{this.quickFindScroll.scrolling=!1}),1e3*this.floatingDelay)}sortByNameField(e){const r=this.nameField;return e?.sort(((e,t)=>e[r]>t[r]?1:e[r]<t[r]?-1:0))}close(){this.currentOpenedItemIdx=-1}openByKey(e,r="id"){this.currentOpenedItemIdx=this.listItems.findIndex((t=>t.item[r]===e))}}customElements.define("quick-find-list",s);class l extends o.oi{static get styles(){return[a.Ix,o.iv`
        :host {
          display: flex;
          flex: 1;
          flex-direction: column;
          overflow: hidden;
          max-width: var(--content-container-max-width);
        }
        .content-container {
          flex: 1;
          display: flex;
          flex-direction: column;
          background-color: var(--theme-white-color);
          border-radius: 0 var(--border-radius) var(--border-radius) var(--border-radius);
          border: var(--border-dark-color);
          border-width: 0 1px 1px 1px;
          box-shadow: var(--box-shadow);
          overflow: auto;
        }
        @media screen and (max-width: 480px) {
          .content-container {
            border-radius: 0 var(--border-radius) var(--border-radius) var(--border-radius);
            border-width: 0 1px 1px 1px;
          }
        }
      `]}static get properties(){return{data:Object,currentTabKey:String,contentRenderer:Object,item:Object,disabledKey:Object}}render(){const e=this.data||{},r=e[this.currentTabKey]?this.currentTabKey:Object.keys(e)[0];let t=this.data[r];const a=this.disabledKey;return o.dy`
      <quick-find-tabs
        .currentTabKey="${r}"
        .data="${e}"
        .disabledKey="${a}"
        @tabChanged="${e=>{this.currentTabKey=e.detail.currentTabKey}}"
      ></quick-find-tabs>
      <div class="content-container">
        ${"function"==typeof this.contentRenderer?o.dy` <div>${this.contentRenderer(t,this.currentTabKey||r)}</div> `:""}
      </div>
    `}async updated(e){(e.has("data")||e.has("currentTabKey"))&&await this.updateComplete}}customElements.define("quick-find-content",l)},79928:(e,r,t)=>{t.r(r);var a=t(94430),o=t(80692);const i={name:"NOAPI",method:"get",path:"",description:""};class n extends a.oi{static get styles(){return[a.iv`
        :host {
          display: flex;
          flex-direction: column;
          overflow: auto;
          background-color: var(--theme-white-color);
          padding: var(--padding-wide);
          font: normal 15px var(--theme-font);
          color: var(--secondary-color);
        }

        :host > * {
          box-sizing: border-box;
          width: 100%;
          margin: var(--margin-narrow) 0;
        }

        label {
          font: bold 16px var(--theme-font);
          color: var(--secondary-text-color);
        }

        label:first-child {
          margin-top: 0 !important;
        }

        input[type='text'] {
          min-width: 400px;
        }

        pre {
          background-color: #f1f1f1;
          padding: var(--padding-default);
          white-space: pre-wrap;
          word-wrap: break-word;
        }

        hr {
          border-style: dashed;
          margin: var(--margin-wide) 0 !important;
          opacity: 0.2;
        }

        input,
        textarea {
          border: var(--border-dark-color);
          border-radius: var(--border-radius);
          margin: var(--input-margin);
          padding: var(--input-padding);
          font: var(--input-font);
        }

        input:focus,
        textarea:focus {
          outline: none;
        }

        table {
          width: 100%;
          border-collapse: collapse;
        }
        th,
        td {
          border: var(--border-dark-color);
          padding: var(--padding-default);
        }
        th {
          width: 20%;
          background-color: var(--main-section-background-color);
        }
        td > * {
          box-sizing: border-box;
          width: 100%;
          margin: 0;
          padding: var(--padding-narrow);
        }

        form > * {
          box-sizing: border-box;
          width: 100%;
          margin: 0;
          padding: var(--padding-narrow);
        }

        [note] {
          background-color: #f1f1f1;
          padding: var(--padding-default);
          border-left: 5px solid rgba(0, 0, 0, 0.2);
          --mdc-icon-size: 18px;
          color: var(--secondary-background-color);
        }
        [note] mwc-icon {
          margin-right: 5px;
          vertical-align: middle;
        }

        [button-primary] {
          background-color: var(--button-primary-background-color);
          border: var(--button-border);
          border-radius: var(--button-border-radius);
          margin: var(--margin-default) 0 0 0;
          padding: var(--button-padding);
          color: var(--button-primary-color);
          font: var(--button-primary-font);
          text-transform: var(--button-text-transform);
          text-decoration: none;
        }

        [button-primary]:hover {
          background-color: var(--button-primary-active-background-color);
          box-shadow: var(--button-active-box-shadow);
        }
        @media screen and (max-width: 480px) {
          input[type='text'] {
            min-width: 70%;
          }
        }
      `]}static get properties(){return{version:String,api:Object,result:String,method:String}}render(){const e=this.api||i,r=this.result||"",t=this.action||"",o=this.queryParams||"",n=Array.from(e.path.matchAll(/:\w+/g)).map((e=>e[0]));return a.dy`
      <label>URL</label>
      <p>This API lets you do the following with the resource.</p>
      <pre><strong>${e.method.toUpperCase()}</strong> ${location.protocol}//${location.host}${t}${o}</pre>

      <hr />

      <label>path params</label>
      <p>
        ${n&&n.length>0?"You should set following path parameters":"No parameters required"}
      </p>
      <div @change=${e=>this.requestUpdate()} pathparams>
        <table>
          ${n&&n.length>0?n.map((e=>a.dy`
                  <tr>
                    <th>${e}</th>
                    <td><input type="text" name=${e.substr(1)} /></td>
                  </tr>
                `)):a.dy`<div note><mwc-icon>content_paste</mwc-icon>no parameter</div>`}
        </table>
      </div>

      <hr />

      <label>authorization bearer token</label>
      <p>authorization bearer token hint</p>
      <textarea @change=${e=>this.requestUpdate()} token rows="4"></textarea>

      <hr />

      ${"get"==e.method?a.dy`
            <label>query parameters</label>
            <p>
              ${e.parameters&&e.parameters.length>0?"You should set following query parameters":"No query parameters required"}
            </p>
          `:"form-data"==e.body||"x-www-form-urlencoded"==e.body?a.dy`
            <label>form parameters</label>
            <p>
              ${e.parameters&&e.parameters.length>0?"You should set following query parameters":"No form parameters required"}
            </p>
          `:"raw"==e.body?a.dy`
            <label>body</label>
            <p>You can set body in JSON format</p>
          `:"binary"==e.body?a.dy`
            <label>attachment</label>
            <p>attachment description..</p>
          `:a.dy``}

      <form parameters @submit=${e=>this.onSubmit(e)}>
        ${"get"==e.method||"form-data"==e.body||"x-www-form-urlencoded"==e.body?a.dy`
              <table @change=${e=>this.requestUpdate()}>
                ${e.parameters&&e.parameters.length>0?e.parameters.map((e=>a.dy`
                        <tr>
                          <th>${e.name}</th>
                          <td><input type="text" name=${e.name} /></td>
                        </tr>
                      `)):a.dy`<div note><mwc-icon>content_paste</mwc-icon>no parameter</div>`}
              </table>
            `:"raw"==e.body?a.dy` <textarea name="body" token rows="4"></textarea> `:"binary"==e.body?a.dy` <input type="file" id="body" name="body" accept="*/*" /> `:a.dy``}
        <input type="submit" value="Submit" button-primary />
      </form>

      <hr />

      <label>Result</label>
      <pre><code>${r?JSON.stringify(r,null,2):""}</code></pre>
    `}get token(){return this.renderRoot.querySelector("textarea[token]")?.value||""}get action(){const e=Array.from(this.renderRoot.querySelectorAll("[pathparams] input")).map((e=>({name:e.getAttribute("name"),value:e.value})));var r=`/api/${this.version}/${this.api?.path}`;for(let t of e)r=r.replace(":"+t.name,t.value);return r}get queryParams(){if("get"!==this.api?.method)return;const e=this.renderRoot.querySelector("form[parameters]");if(e){const r=new URLSearchParams(new FormData(e)).toString();if(r)return"?"+r}}async onSubmit(e){e.stopPropagation(),e.preventDefault(),this.result="";const r=(this.api?.method||"get").toUpperCase();var t=this.action,a={method:r,headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:"bearer "+this.token},referrer:"no-referrer",redirect:"follow",cache:"no-cache",mode:"cors"};const o=this.renderRoot.querySelector("form[parameters]");if("POST"==r||"PUT"==r){const e={};for(const r of new FormData(o))e[r[0]]=r[1];let r=this.api?.body;a.body="raw"===r||"binary"===r?e.body:JSON.stringify(e)}else t+=this.queryParams||"";const i=await fetch(t,a);if(i.ok)this.result=await i.json();else{const e=i.status,r=await i.text();this.result=`Response: ${e} - ${r}`}}}window.customElements.define("api-tester",n);var d=t(9201);t(81925);class s extends a.oi{static get properties(){return{apis:Array,version:String,openedItemIdxs:Array}}static get styles(){return[d.Ix,a.iv`
        :host {
          display: flex;
          flex: 1;
          flex-direction: column;
          overflow: hidden;
          max-width: var(--content-container-max-width);
        }
        div[tester] {
          flex: 1;
          display: flex;
          background-color: var(--theme-white-color);
          border-radius: var(--border-radius);
          border: var(--border-dark-color);
          box-shadow: var(--box-shadow);
          overflow: hidden;
        }
        api-tester {
          flex: 1;
          margin-left: -1px;
        }
        @media screen and (max-width: 480px) {
          api-navigator {
            position: absolute;
            right: 25px;
            z-index: 100;
          }
        }
      `]}get appNavigator(){return this.renderRoot.querySelector("api-navigator")}render(){const e={api:this.apis||[]};return a.dy`
      <quick-find-list
        .data="${e}"
        .contentRenderer="${(e,r)=>a.dy`
          <api-tester .api=${e} .version=${this.version}> </api-tester>
        `}"
      ></quick-find-list>
    `}constructor(){super(),this.openedItemIdxs=[]}isSpecialCharacter(e){return!/^\w/.test(e)}}window.customElements.define("api-list",s);class l extends o.B4{static get styles(){return[a.iv`
        :host {
          display: flex;
          flex-direction: column;
          background-color: var(--main-section-background-color);
          padding: var(--padding-wide);
          overflow: auto;
        }
        h2 {
          margin: var(--title-margin);
          font: var(--title-font);
          color: var(--title-text-color);
        }
        h2 strong {
          color: var(--primary-color);
          font-size: 1.1em;
        }
        [page-description] {
          margin: var(--margin-narrow) 0;
          font: var(--page-description-font);
        }

        div[header] {
          display: flex;
          flex-direction: row;
          margin-bottom: var(--margin-narrow);
          max-width: var(--content-container-max-width);
        }
        [headline] {
          flex: 1;
        }
        [version] {
          width: 200px;
          text-align: right;
          font: normal 14px var(--theme-font);
          color: var(--secondary-color);
        }
        [version] select {
          margin: var(--input-margin);
          padding: var(--padding-narrow);
          border: var(--border-dark-color);
          border-radius: var(--border-radius);
          font: normal 16px var(--theme-font);
        }

        div[tester] {
          flex: 1;
          display: flex;
          flex-direction: row;
          background-color: var(--theme-white-color);
          border-radius: var(--border-radius);
          box-shadow: var(--box-shadow);
          overflow: auto;
        }

        api-tester {
          flex: 1;
          margin-left: -1px;
        }

        ul {
          height: 100%;
          overflow: auto;
          margin: 0;
          padding: 0;
          list-style: none;
        }

        li {
          padding: var(--padding-default) var(--padding-wide);
          border: var(--border-dark-color);
          margin-bottom: -1px;
          font: bold 16px var(--theme-font);
          color: var(--secondary-color);
        }

        li[active] {
          background-color: var(--primary-color);
          box-shadow: var(--box-shadow);
          padding: var(--padding-default) var(--padding-wide);
          color: var(--theme-white-color);
        }
        li span {
          display: block;
          padding-top: var(--padding-narrow);
          opacity: 0.7;
          font: normal 14px var(--theme-font);
        }

        select {
          background-color: var(--theme-white-color);
        }

        @media screen and (max-width: 480px) {
          :host {
            padding: var(--padding-default);
          }
          div[header] {
            flex-direction: column;
          }
          [version] * {
            vertical-align: middle;
          }
          [version] {
            display: flex;
            flex: 1;
            width: 100%;
            text-align: left;
          }
          [version] label {
            padding-top: 10px;
          }
          [version] select {
            flex: 1;
            margin-left: var(--margin-narrow);
          }
        }
      `]}static get properties(){return{api:Object}}render(){this.api||this.APIS[0];return a.dy`
      <div header>
        <div headline>
          <h2>API for <strong>${this.context.apiCategory}</strong></h2>
          <p page-description>${this.context.description}</p>
        </div>

        <div version>
          <label for="version">API version</label>
          <select @change=${e=>this.requestUpdate()} version id="version">
            <option value="unstable">unstable</option>
            <option value="1">1</option>
            <option value="2">2</option>
          </select>
        </div>
      </div>

      <api-list .apis=${this.APIS} .version=${this.version}></api-list>
    `}get APIS(){return[]}get version(){return this.renderRoot.querySelector("select[version]")?.value||"unstable"}}const c=[{name:"scenario",path:"scenario/:id",method:"get",parameters:[],description:"get scenario information"},{name:"scenarios",path:"scenario",method:"get",parameters:[{name:"page"},{name:"limit"}],description:"get scenario information"}];window.customElements.define("api-sandbox",class extends l{constructor(){super()}get APIS(){return c}get context(){return{title:"API Sandbox",apiCategory:"Integration",description:"Scenario control, connection control, ..."}}})}}]);