@openremote/or-log-viewer 1.8.0-snapshot.20250723094757 → 1.8.0-snapshot.20250725070921

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.
package/lib/index.d.ts CHANGED
@@ -20,7 +20,7 @@ declare const OrLogViewer_base: (new (...args: any[]) => {
20
20
  _i18nextJustInitialized: boolean;
21
21
  connectedCallback(): void;
22
22
  disconnectedCallback(): void;
23
- shouldUpdate(changedProps: import("lit").PropertyValueMap<any> | Map<PropertyKey, unknown>): any;
23
+ shouldUpdate(changedProps: PropertyValues): any;
24
24
  initCallback: (options: import("i18next").InitOptions) => void;
25
25
  langChangedCallback: () => void;
26
26
  readonly isConnected: boolean;
package/lib/index.js CHANGED
@@ -1,7 +1,7 @@
1
- var OrLogViewer_1,__decorate=this&&this.__decorate||function(t,e,i,o){var r,a=arguments.length,s=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,o);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(s=(a<3?r(s):a>3?r(e,i,s):r(e,i))||s);return a>3&&s&&Object.defineProperty(e,i,s),s},__awaiter=this&&this.__awaiter||function(t,e,i,o){return new(i||(i=Promise))((function(r,a){function s(t){try{l(o.next(t))}catch(t){a(t)}}function n(t){try{l(o.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,n)}l((o=o.apply(t,e||[])).next())}))};import{css,html,LitElement,unsafeCSS}from"lit";import{customElement,property,query}from"lit/decorators.js";import i18next from"i18next";import{translate}from"@openremote/or-translate";import*as Model from"@openremote/model";import manager,{DefaultColor2,DefaultColor3,DefaultColor4,DefaultColor5,Util}from"@openremote/core";import"@openremote/or-mwc-components/or-mwc-input";import"@openremote/or-components/or-panel";import"@openremote/or-translate";import{InputType}from"@openremote/or-mwc-components/or-mwc-input";import moment from"moment";import"@openremote/or-mwc-components/or-mwc-menu";import{getContentWithMenuTemplate}from"@openremote/or-mwc-components/or-mwc-menu";import{showSnackbar}from"@openremote/or-mwc-components/or-mwc-snackbar";import{when}from"lit/directives/when.js";const linkParser=require("http-link-header"),tableStyle=require("@material/data-table/dist/mdc.data-table.css"),style=css`
1
+ var OrLogViewer_1,__decorate=this&&this.__decorate||function(e,t,i,o){var a,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(s=(r<3?a(s):r>3?a(t,i,s):a(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},__awaiter=this&&this.__awaiter||function(e,t,i,o){return new(i||(i=Promise))(function(a,r){function s(e){try{n(o.next(e))}catch(e){r(e)}}function l(e){try{n(o.throw(e))}catch(e){r(e)}}function n(e){var t;e.done?a(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(s,l)}n((o=o.apply(e,t||[])).next())})};import{css as e,html as t,LitElement as i,unsafeCSS as o}from"lit";import{customElement as a,property as r,query as s}from"lit/decorators.js";import l from"i18next";import{translate as n}from"@openremote/or-translate";import*as c from"@openremote/model";import d,{DefaultColor2 as h,DefaultColor3 as p,DefaultColor4 as g,DefaultColor5 as m,Util as _}from"@openremote/core";import"@openremote/or-mwc-components/or-mwc-input";import"@openremote/or-components/or-panel";import"@openremote/or-translate";import{InputType as u}from"@openremote/or-mwc-components/or-mwc-input";import v from"moment";import"@openremote/or-mwc-components/or-mwc-menu";import{getContentWithMenuTemplate as w}from"@openremote/or-mwc-components/or-mwc-menu";import{showSnackbar as b}from"@openremote/or-mwc-components/or-mwc-snackbar";import{when as f}from"lit/directives/when.js";let linkParser=require("http-link-header"),tableStyle=require("@material/data-table/dist/mdc.data-table.css"),style=e`
2
2
  :host {
3
- --internal-or-log-viewer-background-color: var(--or-log-viewer-background-color, var(--or-app-color2, ${unsafeCSS(DefaultColor2)}));
4
- --internal-or-log-viewer-text-color: var(--or-log-viewer-text-color, var(--or-app-color3, ${unsafeCSS(DefaultColor3)}));
3
+ --internal-or-log-viewer-background-color: var(--or-log-viewer-background-color, var(--or-app-color2, ${o(h)}));
4
+ --internal-or-log-viewer-text-color: var(--or-log-viewer-text-color, var(--or-app-color3, ${o(p)}));
5
5
  --internal-or-log-viewer-controls-margin: var(--or-log-viewer-controls-margin, 0);
6
6
 
7
7
  display: block;
@@ -111,71 +111,71 @@ var OrLogViewer_1,__decorate=this&&this.__decorate||function(t,e,i,o){var r,a=ar
111
111
  }
112
112
 
113
113
  .copy-button {
114
- --or-mwc-input-color: var(--or-app-color5, ${unsafeCSS(DefaultColor5)});
114
+ --or-mwc-input-color: var(--or-app-color5, ${o(m)});
115
115
  }
116
116
 
117
117
  .copy-button:hover {
118
- --or-mwc-input-color: var(--or-app-color4, ${unsafeCSS(DefaultColor4)});
118
+ --or-mwc-input-color: var(--or-app-color4, ${o(g)});
119
119
  }
120
- `;let OrLogViewer=OrLogViewer_1=class extends(translate(i18next)(LitElement)){constructor(){super(...arguments),this.live=!1,this._loading=!1,this._currentPage=1}static get styles(){return[css`${unsafeCSS(tableStyle)}`,style]}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this._cleanup(),this._unsubscribeEvents()}shouldUpdate(t){return(t.has("level")||t.has("interval")||t.has("timestamp")||t.has("limit")||t.has("categories")||t.has("filter")||t.has("live"))&&(this.live||(this._pageCount=void 0,this._currentPage=1,this._data=void 0)),this.interval||(this.interval=OrLogViewer_1.DEFAULT_INTERVAL),this.categories||this.config&&this.config.initialCategories&&(this.categories=[...this.config.initialCategories]),void 0===this.filter&&this.config&&this.config.initialFilter&&(this.filter=this.config.initialFilter),this.level||(this.config&&this.config.initialLevel?this.level=this.config.initialLevel:this.level=OrLogViewer_1.DEFAULT_LEVEL),this.live||this.timestamp||(this.timestamp=new Date),this._data||this.live||this._loadData(),t.has("live")&&(this.live?this._subscribeEvents():this._unsubscribeEvents()),super.shouldUpdate(t)}render(){const t=this._loading,e=this.live,i=this.config&&this.config.hideCategories,o=this.config&&this.config.hideFilter,r=this.config&&this.config.hideLevel;return html`
120
+ `,OrLogViewer=OrLogViewer_1=class extends n(l)(i){constructor(){super(...arguments),this.live=!1,this._loading=!1,this._currentPage=1}static get styles(){return[e`${o(tableStyle)}`,style]}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this._cleanup(),this._unsubscribeEvents()}shouldUpdate(e){return(e.has("level")||e.has("interval")||e.has("timestamp")||e.has("limit")||e.has("categories")||e.has("filter")||e.has("live"))&&!this.live&&(this._pageCount=void 0,this._currentPage=1,this._data=void 0),this.interval||(this.interval=OrLogViewer_1.DEFAULT_INTERVAL),!this.categories&&this.config&&this.config.initialCategories&&(this.categories=[...this.config.initialCategories]),void 0===this.filter&&this.config&&this.config.initialFilter&&(this.filter=this.config.initialFilter),this.level||(this.config&&this.config.initialLevel?this.level=this.config.initialLevel:this.level=OrLogViewer_1.DEFAULT_LEVEL),this.live||this.timestamp||(this.timestamp=new Date),this._data||this.live||this._loadData(),e.has("live")&&(this.live?this._subscribeEvents():this._unsubscribeEvents()),super.shouldUpdate(e)}render(){let e=this._loading,i=this.live,o=this.config&&this.config.hideCategories,a=this.config&&this.config.hideFilter,r=this.config&&this.config.hideLevel;return t`
121
121
  <div id="container">
122
122
  <div id="controls">
123
123
  <div id="log-controls">
124
- ${i?"":getContentWithMenuTemplate(html`<or-mwc-input .type=${InputType.BUTTON} raised ?disabled="${t}" .label="${i18next.t("categories")}" icontrailing="chevron-down"></or-mwc-input>`,this._getCategoryMenuItems(),this.categories,(t=>this._onCategoriesChanged(t)),(()=>this._onCategoriesClosed()),!0)}
125
- <or-mwc-input ?hidden="${o}" .type="${InputType.TEXT}" outlined ?disabled="${t}" icontrailing="magnify" .label="${i18next.t("subCategoryFilters")}" .value="${this.filter}" @or-mwc-input-changed="${t=>this._onFilterChanged(t.detail.value)}"></or-mwc-input>
126
- <or-mwc-input ?hidden="${r}" .type="${InputType.SELECT}" id="level-select" ?disabled="${t}" .label="${i18next.t("level")}" @or-mwc-input-changed="${t=>this._onLevelChanged(t.detail.value)}" .value="${this.level}" .options="${this._getLevelOptions()}"></or-mwc-input>
127
- <or-mwc-input .type="${InputType.SELECT}" id="limit-select" ?disabled="${t}" .label="${i18next.t("limit")}" @or-mwc-input-changed="${t=>this._onLimitChanged(t.detail.value)}" .value="${""+this.getLimit()}" .options="${this._getLimitOptions()}"></or-mwc-input>
124
+ ${o?"":w(t`<or-mwc-input .type=${u.BUTTON} raised ?disabled="${e}" .label="${l.t("categories")}" icontrailing="chevron-down"></or-mwc-input>`,this._getCategoryMenuItems(),this.categories,e=>this._onCategoriesChanged(e),()=>this._onCategoriesClosed(),!0)}
125
+ <or-mwc-input ?hidden="${a}" .type="${u.TEXT}" outlined ?disabled="${e}" icontrailing="magnify" .label="${l.t("subCategoryFilters")}" .value="${this.filter}" @or-mwc-input-changed="${e=>this._onFilterChanged(e.detail.value)}"></or-mwc-input>
126
+ <or-mwc-input ?hidden="${r}" .type="${u.SELECT}" id="level-select" ?disabled="${e}" .label="${l.t("level")}" @or-mwc-input-changed="${e=>this._onLevelChanged(e.detail.value)}" .value="${this.level}" .options="${this._getLevelOptions()}"></or-mwc-input>
127
+ <or-mwc-input .type="${u.SELECT}" id="limit-select" ?disabled="${e}" .label="${l.t("limit")}" @or-mwc-input-changed="${e=>this._onLimitChanged(e.detail.value)}" .value="${""+this.getLimit()}" .options="${this._getLimitOptions()}"></or-mwc-input>
128
128
  </div>
129
- <div id="page-controls" ?hidden="${e||!this._pageCount||!this._data||0===this._data.length}">
130
- <or-mwc-input class="button" .type="${InputType.BUTTON}" ?disabled="${t||e||1===this._currentPage}" icon="chevron-left" @or-mwc-input-changed="${()=>this._updatePage(!1)}"></or-mwc-input>
129
+ <div id="page-controls" ?hidden="${i||!this._pageCount||!this._data||0===this._data.length}">
130
+ <or-mwc-input class="button" .type="${u.BUTTON}" ?disabled="${e||i||1===this._currentPage}" icon="chevron-left" @or-mwc-input-changed="${()=>this._updatePage(!1)}"></or-mwc-input>
131
131
  <span>${this._currentPage}</span><or-translate value="of"></or-translate><span>${this._pageCount}</span>
132
- <or-mwc-input class="button" .type="${InputType.BUTTON}" ?disabled="${t||e||this._currentPage===this._pageCount||this._data&&this._data.length<this.getLimit()}" icon="chevron-right" @or-mwc-input-changed="${()=>this._updatePage(!0)}"></or-mwc-input>
132
+ <or-mwc-input class="button" .type="${u.BUTTON}" ?disabled="${e||i||this._currentPage===this._pageCount||this._data&&this._data.length<this.getLimit()}" icon="chevron-right" @or-mwc-input-changed="${()=>this._updatePage(!0)}"></or-mwc-input>
133
133
  </div>
134
134
  <div id="time-controls">
135
- <or-mwc-input id="live-button" .type="${InputType.CHECKBOX}" ?disabled="${t}" .label="${i18next.t("live")}" @or-mwc-input-changed="${t=>this._onLiveChanged(t.detail.value)}" .value="${this.live}"></or-mwc-input>
136
- <or-mwc-input .type="${InputType.SELECT}" id="period-select" ?disabled="${t||e}" .label="${i18next.t("period")}" @or-mwc-input-changed="${t=>this.interval=t.detail.value}" .value="${this.interval}" .options="${this._getIntervalOptions()}"></or-mwc-input>
135
+ <or-mwc-input id="live-button" .type="${u.CHECKBOX}" ?disabled="${e}" .label="${l.t("live")}" @or-mwc-input-changed="${e=>this._onLiveChanged(e.detail.value)}" .value="${this.live}"></or-mwc-input>
136
+ <or-mwc-input .type="${u.SELECT}" id="period-select" ?disabled="${e||i}" .label="${l.t("period")}" @or-mwc-input-changed="${e=>this.interval=e.detail.value}" .value="${this.interval}" .options="${this._getIntervalOptions()}"></or-mwc-input>
137
137
  <div id="ending-controls">
138
- <or-mwc-input class="button" .type="${InputType.BUTTON}" ?disabled="${t||e}" icon="chevron-left" @or-mwc-input-changed="${()=>this.timestamp=this._calculateTimestamp(this.timestamp,!1)}"></or-mwc-input>
139
- <or-mwc-input id="ending-date" .type="${InputType.DATETIME}" ?disabled="${t||e}" label="${i18next.t("ending")}" .value="${this.timestamp}" @or-mwc-input-changed="${t=>this.timestamp=this._calculateTimestamp(moment(t.detail.value).toDate())}"></or-mwc-input>
140
- <or-mwc-input class="button" .type="${InputType.BUTTON}" ?disabled="${t||e}" icon="chevron-right" @or-mwc-input-changed="${()=>this.timestamp=this._calculateTimestamp(this.timestamp,!0)}"></or-mwc-input>
141
- <or-mwc-input class="button" .type="${InputType.BUTTON}" ?disabled="${t||e}" icon="chevron-double-right" @or-mwc-input-changed="${()=>this.timestamp=this._calculateTimestamp(new Date)}"></or-mwc-input>
138
+ <or-mwc-input class="button" .type="${u.BUTTON}" ?disabled="${e||i}" icon="chevron-left" @or-mwc-input-changed="${()=>this.timestamp=this._calculateTimestamp(this.timestamp,!1)}"></or-mwc-input>
139
+ <or-mwc-input id="ending-date" .type="${u.DATETIME}" ?disabled="${e||i}" label="${l.t("ending")}" .value="${this.timestamp}" @or-mwc-input-changed="${e=>this.timestamp=this._calculateTimestamp(v(e.detail.value).toDate())}"></or-mwc-input>
140
+ <or-mwc-input class="button" .type="${u.BUTTON}" ?disabled="${e||i}" icon="chevron-right" @or-mwc-input-changed="${()=>this.timestamp=this._calculateTimestamp(this.timestamp,!0)}"></or-mwc-input>
141
+ <or-mwc-input class="button" .type="${u.BUTTON}" ?disabled="${e||i}" icon="chevron-double-right" @or-mwc-input-changed="${()=>this.timestamp=this._calculateTimestamp(new Date)}"></or-mwc-input>
142
142
  </div>
143
143
  </div>
144
144
  </div>
145
145
 
146
- ${t?html`<div id="msg">${i18next.t("loading")}</div>`:html`<div id="table-container">
146
+ ${e?t`<div id="msg">${l.t("loading")}</div>`:t`<div id="table-container">
147
147
  ${this._data?this._getTable():""}
148
148
  </div>`}
149
149
  </div>
150
- `}_getLimitOptions(){return["25","50","100","200"]}_getLevelOptions(){return Object.keys(Model.SyslogLevel).map((t=>[t,i18next.t(t.toLocaleLowerCase())]))}_getCategoryMenuItems(){return(this.config&&this.config.allowedCategories?this.config.allowedCategories:Object.keys(Model.SyslogCategory)).map((t=>({text:i18next.t("logCategory."+t,{defaultValue:Util.capitaliseFirstLetter(t.toLowerCase().replace(/_/g," "))}),value:t})))}getLimit(){return this.limit||OrLogViewer_1.DEFAULT_LIMIT}_onCategoriesChanged(t){this._pendingCategories=t}_onCategoriesClosed(){this._pendingCategories&&(this.categories=[...this._pendingCategories],this.categories&&this.live&&(this._data=this._data.filter((t=>this.categories.find((e=>e===t.category))))),this._pendingCategories=void 0)}_onLiveChanged(t){this.live=t,t&&(this._data=[],this._pageCount=void 0,this._currentPage=1)}_onLimitChanged(t){if(!t)return void(this.limit=void 0);this.limit=parseInt(t);const e=this.getLimit();this.live&&this._data.length>e&&this._data.splice(e-1)}_onFilterChanged(t){if(this.filter=t,this.filter&&this.live){const t=this.filter.split(";");this._data=this._data.filter((e=>t.find((t=>t===e.subCategory))))}}_onLevelChanged(t){this.level=t,this.level&&this.live&&(this._data=this._data.filter((t=>this._eventMatchesLevel(t))))}_getTable(){return html`
150
+ `}_getLimitOptions(){return["25","50","100","200"]}_getLevelOptions(){return Object.keys(c.SyslogLevel).map(e=>[e,l.t(e.toLocaleLowerCase())])}_getCategoryMenuItems(){return(this.config&&this.config.allowedCategories?this.config.allowedCategories:Object.keys(c.SyslogCategory)).map(e=>({text:l.t("logCategory."+e,{defaultValue:_.capitaliseFirstLetter(e.toLowerCase().replace(/_/g," "))}),value:e}))}getLimit(){return this.limit||OrLogViewer_1.DEFAULT_LIMIT}_onCategoriesChanged(e){this._pendingCategories=e}_onCategoriesClosed(){this._pendingCategories&&(this.categories=[...this._pendingCategories],this.categories&&this.live&&(this._data=this._data.filter(e=>this.categories.find(t=>t===e.category))),this._pendingCategories=void 0)}_onLiveChanged(e){this.live=e,e&&(this._data=[],this._pageCount=void 0,this._currentPage=1)}_onLimitChanged(e){if(!e){this.limit=void 0;return}this.limit=parseInt(e);let t=this.getLimit();this.live&&this._data.length>t&&this._data.splice(t-1)}_onFilterChanged(e){if(this.filter=e,this.filter&&this.live){let e=this.filter.split(";");this._data=this._data.filter(t=>e.find(e=>e===t.subCategory))}}_onLevelChanged(e){this.level=e,this.level&&this.live&&(this._data=this._data.filter(e=>this._eventMatchesLevel(e)))}_getTable(){return t`
151
151
  <div id="table" class="mdc-data-table">
152
152
  <table class="mdc-data-table__table" aria-label="logs list">
153
153
  <thead>
154
154
  <tr class="mdc-data-table__header-row">
155
- <th style="width: 180px" class="mdc-data-table__header-cell" role="columnheader" scope="col">${i18next.t("timestamp")}</th>
156
- <th style="width: 80px" class="mdc-data-table__header-cell" role="columnheader" scope="col">${i18next.t("level")}</th>
157
- <th style="width: 130px" class="mdc-data-table__header-cell" role="columnheader" scope="col">${i18next.t("category")}</th>
158
- <th style="width: 180px" class="mdc-data-table__header-cell" role="columnheader" scope="col">${i18next.t("subCategory")}</th>
159
- <th style="width: 100%; min-width: 300px;" class="mdc-data-table__header-cell" role="columnheader" scope="col">${i18next.t("message")}</th>
155
+ <th style="width: 180px" class="mdc-data-table__header-cell" role="columnheader" scope="col">${l.t("timestamp")}</th>
156
+ <th style="width: 80px" class="mdc-data-table__header-cell" role="columnheader" scope="col">${l.t("level")}</th>
157
+ <th style="width: 130px" class="mdc-data-table__header-cell" role="columnheader" scope="col">${l.t("category")}</th>
158
+ <th style="width: 180px" class="mdc-data-table__header-cell" role="columnheader" scope="col">${l.t("subCategory")}</th>
159
+ <th style="width: 100%; min-width: 300px;" class="mdc-data-table__header-cell" role="columnheader" scope="col">${l.t("message")}</th>
160
160
  <th style="width: 80px;" class="mdc-data-table__header-cell" role="columnheader" scope="col"></th>
161
161
  </tr>
162
162
  </thead>
163
163
  <tbody class="mdc-data-table__content">
164
- ${this._data.map((t=>html`
164
+ ${this._data.map(e=>t`
165
165
  <tr class="mdc-data-table__row">
166
- <td class="mdc-data-table__cell">${moment(t.timestamp).format(OrLogViewer_1.DEFAULT_TIMESTAMP_FORMAT)}</td>
167
- <td class="mdc-data-table__cell">${i18next.t(t.level)}</td>
168
- <td class="mdc-data-table__cell">${i18next.t(t.category)}</td>
169
- <td class="mdc-data-table__cell">${i18next.t(t.subCategory)}</td>
170
- <td class="mdc-data-table__cell">${t.message}</td>
166
+ <td class="mdc-data-table__cell">${v(e.timestamp).format(OrLogViewer_1.DEFAULT_TIMESTAMP_FORMAT)}</td>
167
+ <td class="mdc-data-table__cell">${l.t(e.level)}</td>
168
+ <td class="mdc-data-table__cell">${l.t(e.category)}</td>
169
+ <td class="mdc-data-table__cell">${l.t(e.subCategory)}</td>
170
+ <td class="mdc-data-table__cell">${e.message}</td>
171
171
  <td class="mdc-data-table__cell icon-cell">
172
- ${when(window.isSecureContext,(()=>html`
173
- <or-mwc-input type="${InputType.BUTTON}" class="copy-button" icon="content-copy" @or-mwc-input-changed=${()=>this._copyRow(t)}></or-mwc-input>
174
- `))}
172
+ ${f(window.isSecureContext,()=>t`
173
+ <or-mwc-input type="${u.BUTTON}" class="copy-button" icon="content-copy" @or-mwc-input-changed=${()=>this._copyRow(e)}></or-mwc-input>
174
+ `)}
175
175
  </td>
176
176
  </tr>
177
- `))}
177
+ `)}
178
178
  </tbody>
179
179
  </table>
180
180
  </div>
181
- `}_copyRow(t){return __awaiter(this,void 0,void 0,(function*(){try{const e=t.message||"";yield navigator.clipboard.writeText(e),showSnackbar(void 0,i18next.t("copiedToClipboard"))}catch(t){console.error("Failed to copy:",t)}}))}_getIntervalOptions(){return["HOUR","DAY","WEEK","MONTH","YEAR"].map((t=>[t,i18next.t(t.toLowerCase())]))}_loadData(){return __awaiter(this,void 0,void 0,(function*(){if(this._loading)return;this._loading=!0;const t=yield manager.rest.api.SyslogResource.getEvents({level:this.level,per_page:this.getLimit(),page:this._currentPage,from:this._getFrom(),to:this.timestamp?this.timestamp.getTime():void 0,category:this.categories,subCategory:this.filter?this.filter.split(";"):void 0});this._loading=!1,200===t.status&&(this._data=t.data,this._pageCount=this._getPageCount(t))}))}_getPageCount(t){const e=t.headers.link;if(e){let t=linkParser.parse(e).rel("last");if(Array.isArray(t)&&t.length>0&&(t=t[0]),t&&t.uri){const e=new URL(t.uri);return parseInt(Util.getQueryParameters(e.search).page)}}}_updatePage(t){this._pageCount&&(t?this._currentPage<this._pageCount&&(this._data=void 0,this._currentPage++):this._currentPage>1&&(this._data=void 0,this._currentPage--))}_subscribeEvents(){return __awaiter(this,void 0,void 0,(function*(){manager.events&&(this._eventSubscriptionId=yield manager.events.subscribe({eventType:"syslog"},(t=>this._onEvent(t))))}))}_unsubscribeEvents(){this._eventSubscriptionId&&(manager.events.unsubscribe(this._eventSubscriptionId),this._eventSubscriptionId=void 0)}_getFrom(){if(this.timestamp&&this.interval)return this._calculateTimestamp(this.timestamp,!1).getTime()}_calculateTimestamp(t,e){if(!this.interval)return;const i=moment(t);if(void 0!==e)switch(this.interval){case"HOUR":i.add(e?1:-1,"hour");break;case"DAY":i.add(e?1:-1,"day");break;case"WEEK":i.add(e?1:-1,"week");break;case"MONTH":i.add(e?1:-1,"month");break;case"YEAR":i.add(e?1:-1,"year")}return i.toDate()}_onEvent(t){if(this.categories&&!this.categories.find((e=>e===t.category)))return;if(this.filter&&!this.filter.split(";").find((e=>e===t.subCategory)))return;if(!this._eventMatchesLevel(t))return;const e=this.getLimit();this._data.length===e-1&&this._data.pop(),this._data.splice(0,0,t),this._refresh&&window.clearTimeout(this._refresh),this._refresh=window.setTimeout((()=>this.requestUpdate("_data")),2e3)}_eventMatchesLevel(t){return!this.level||"INFO"===this.level||"WARN"===this.level&&("WARN"===t.level||"ERROR"===t.level)||"ERROR"===this.level&&"ERROR"===t.level}_cleanup(){this._table&&(this._table.destroy(),this._table=void 0),this._refresh&&window.clearTimeout(this._refresh)}};OrLogViewer.DEFAULT_TIMESTAMP_FORMAT="L HH:mm:ss",OrLogViewer.DEFAULT_LIMIT=50,OrLogViewer.DEFAULT_LEVEL="INFO",OrLogViewer.DEFAULT_INTERVAL="HOUR",__decorate([property({type:String})],OrLogViewer.prototype,"interval",void 0),__decorate([property({type:Number})],OrLogViewer.prototype,"timestamp",void 0),__decorate([property({type:Number})],OrLogViewer.prototype,"limit",void 0),__decorate([property({type:Array})],OrLogViewer.prototype,"categories",void 0),__decorate([property({type:String})],OrLogViewer.prototype,"filter",void 0),__decorate([property({type:String})],OrLogViewer.prototype,"level",void 0),__decorate([property({type:Boolean})],OrLogViewer.prototype,"live",void 0),__decorate([property({type:Object})],OrLogViewer.prototype,"config",void 0),__decorate([property()],OrLogViewer.prototype,"_loading",void 0),__decorate([property()],OrLogViewer.prototype,"_data",void 0),__decorate([query("#table")],OrLogViewer.prototype,"_tableElem",void 0),OrLogViewer=OrLogViewer_1=__decorate([customElement("or-log-viewer")],OrLogViewer);export{OrLogViewer};
181
+ `}_copyRow(e){return __awaiter(this,void 0,void 0,function*(){try{let t=e.message||"";yield navigator.clipboard.writeText(t),b(void 0,l.t("copiedToClipboard"))}catch(e){console.error("Failed to copy:",e)}})}_getIntervalOptions(){return["HOUR","DAY","WEEK","MONTH","YEAR"].map(e=>[e,l.t(e.toLowerCase())])}_loadData(){return __awaiter(this,void 0,void 0,function*(){if(this._loading)return;this._loading=!0;let e=yield d.rest.api.SyslogResource.getEvents({level:this.level,per_page:this.getLimit(),page:this._currentPage,from:this._getFrom(),to:this.timestamp?this.timestamp.getTime():void 0,category:this.categories,subCategory:this.filter?this.filter.split(";"):void 0});this._loading=!1,200===e.status&&(this._data=e.data,this._pageCount=this._getPageCount(e))})}_getPageCount(e){let t=e.headers.link;if(t){let e=linkParser.parse(t).rel("last");if(Array.isArray(e)&&e.length>0&&(e=e[0]),e&&e.uri){let t=new URL(e.uri);return parseInt(_.getQueryParameters(t.search).page)}}}_updatePage(e){this._pageCount&&(e?this._currentPage<this._pageCount&&(this._data=void 0,this._currentPage++):this._currentPage>1&&(this._data=void 0,this._currentPage--))}_subscribeEvents(){return __awaiter(this,void 0,void 0,function*(){d.events&&(this._eventSubscriptionId=yield d.events.subscribe({eventType:"syslog"},e=>this._onEvent(e)))})}_unsubscribeEvents(){this._eventSubscriptionId&&(d.events.unsubscribe(this._eventSubscriptionId),this._eventSubscriptionId=void 0)}_getFrom(){if(this.timestamp&&this.interval)return this._calculateTimestamp(this.timestamp,!1).getTime()}_calculateTimestamp(e,t){if(!this.interval)return;let i=v(e);if(void 0!==t)switch(this.interval){case"HOUR":i.add(t?1:-1,"hour");break;case"DAY":i.add(t?1:-1,"day");break;case"WEEK":i.add(t?1:-1,"week");break;case"MONTH":i.add(t?1:-1,"month");break;case"YEAR":i.add(t?1:-1,"year")}return i.toDate()}_onEvent(e){if(this.categories&&!this.categories.find(t=>t===e.category)||this.filter&&!this.filter.split(";").find(t=>t===e.subCategory)||!this._eventMatchesLevel(e))return;let t=this.getLimit();this._data.length===t-1&&this._data.pop(),this._data.splice(0,0,e),this._refresh&&window.clearTimeout(this._refresh),this._refresh=window.setTimeout(()=>this.requestUpdate("_data"),2e3)}_eventMatchesLevel(e){return!this.level||"INFO"===this.level||"WARN"===this.level&&("WARN"===e.level||"ERROR"===e.level)||"ERROR"===this.level&&"ERROR"===e.level}_cleanup(){this._table&&(this._table.destroy(),this._table=void 0),this._refresh&&window.clearTimeout(this._refresh)}};OrLogViewer.DEFAULT_TIMESTAMP_FORMAT="L HH:mm:ss",OrLogViewer.DEFAULT_LIMIT=50,OrLogViewer.DEFAULT_LEVEL="INFO",OrLogViewer.DEFAULT_INTERVAL="HOUR",__decorate([r({type:String})],OrLogViewer.prototype,"interval",void 0),__decorate([r({type:Number})],OrLogViewer.prototype,"timestamp",void 0),__decorate([r({type:Number})],OrLogViewer.prototype,"limit",void 0),__decorate([r({type:Array})],OrLogViewer.prototype,"categories",void 0),__decorate([r({type:String})],OrLogViewer.prototype,"filter",void 0),__decorate([r({type:String})],OrLogViewer.prototype,"level",void 0),__decorate([r({type:Boolean})],OrLogViewer.prototype,"live",void 0),__decorate([r({type:Object})],OrLogViewer.prototype,"config",void 0),__decorate([r()],OrLogViewer.prototype,"_loading",void 0),__decorate([r()],OrLogViewer.prototype,"_data",void 0),__decorate([s("#table")],OrLogViewer.prototype,"_tableElem",void 0),OrLogViewer=OrLogViewer_1=__decorate([a("or-log-viewer")],OrLogViewer);export{OrLogViewer};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openremote/or-log-viewer",
3
- "version": "1.8.0-snapshot.20250723094757",
3
+ "version": "1.8.0-snapshot.20250725070921",
4
4
  "description": "OpenRemote syslog viewer",
5
5
  "customElements": "custom-elements.json",
6
6
  "main": "dist/umd/index.bundle.js",
@@ -13,21 +13,21 @@
13
13
  "scripts": {
14
14
  "analyze": "npx cem analyze --config ../custom-elements-manifest.config.mjs",
15
15
  "test": "echo \"No tests\" && exit 0",
16
- "prepack": "npx webpack"
16
+ "prepack": "npx rspack"
17
17
  },
18
18
  "author": "OpenRemote",
19
19
  "license": "AGPL-3.0-or-later",
20
20
  "dependencies": {
21
21
  "@material/data-table": "^9.0.0",
22
- "@openremote/core": "1.8.0-snapshot.20250723094757",
23
- "@openremote/or-mwc-components": "1.8.0-snapshot.20250723094757",
22
+ "@openremote/core": "1.8.0-snapshot.20250725070921",
23
+ "@openremote/or-mwc-components": "1.8.0-snapshot.20250725070921",
24
24
  "http-link-header": "^1.1.3",
25
25
  "lit": "^2.0.2",
26
26
  "moment": "^2.29.4",
27
27
  "url": "^0.11.0"
28
28
  },
29
29
  "devDependencies": {
30
- "@openremote/util": "1.8.0-snapshot.20250723094757"
30
+ "@openremote/util": "1.8.0-snapshot.20250725070921"
31
31
  },
32
32
  "publishConfig": {
33
33
  "access": "public"
@@ -1,140 +0,0 @@
1
- /*! *****************************************************************************
2
- Copyright (c) Microsoft Corporation.
3
-
4
- Permission to use, copy, modify, and/or distribute this software for any
5
- purpose with or without fee is hereby granted.
6
-
7
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
- PERFORMANCE OF THIS SOFTWARE.
14
- ***************************************************************************** */
15
-
16
- /**
17
- * @license
18
- * Copyright 2016 Google Inc.
19
- *
20
- * Permission is hereby granted, free of charge, to any person obtaining a copy
21
- * of this software and associated documentation files (the "Software"), to deal
22
- * in the Software without restriction, including without limitation the rights
23
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
24
- * copies of the Software, and to permit persons to whom the Software is
25
- * furnished to do so, subject to the following conditions:
26
- *
27
- * The above copyright notice and this permission notice shall be included in
28
- * all copies or substantial portions of the Software.
29
- *
30
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
31
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
32
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
33
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
34
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
35
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
36
- * THE SOFTWARE.
37
- */
38
-
39
- /**
40
- * @license
41
- * Copyright 2017 Google LLC
42
- * SPDX-License-Identifier: BSD-3-Clause
43
- */
44
-
45
- /**
46
- * @license
47
- * Copyright 2018 Google Inc.
48
- *
49
- * Permission is hereby granted, free of charge, to any person obtaining a copy
50
- * of this software and associated documentation files (the "Software"), to deal
51
- * in the Software without restriction, including without limitation the rights
52
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
53
- * copies of the Software, and to permit persons to whom the Software is
54
- * furnished to do so, subject to the following conditions:
55
- *
56
- * The above copyright notice and this permission notice shall be included in
57
- * all copies or substantial portions of the Software.
58
- *
59
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
60
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
61
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
62
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
63
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
64
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
65
- * THE SOFTWARE.
66
- */
67
-
68
- /**
69
- * @license
70
- * Copyright 2018 Google LLC
71
- * SPDX-License-Identifier: BSD-3-Clause
72
- */
73
-
74
- /**
75
- * @license
76
- * Copyright 2019 Google Inc.
77
- *
78
- * Permission is hereby granted, free of charge, to any person obtaining a copy
79
- * of this software and associated documentation files (the "Software"), to deal
80
- * in the Software without restriction, including without limitation the rights
81
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
82
- * copies of the Software, and to permit persons to whom the Software is
83
- * furnished to do so, subject to the following conditions:
84
- *
85
- * The above copyright notice and this permission notice shall be included in
86
- * all copies or substantial portions of the Software.
87
- *
88
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
89
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
90
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
91
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
92
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
93
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
94
- * THE SOFTWARE.
95
- */
96
-
97
- /**
98
- * @license
99
- * Copyright 2019 Google LLC
100
- * SPDX-License-Identifier: BSD-3-Clause
101
- */
102
-
103
- /**
104
- * @license
105
- * Copyright 2020 Google Inc.
106
- *
107
- * Permission is hereby granted, free of charge, to any person obtaining a copy
108
- * of this software and associated documentation files (the "Software"), to deal
109
- * in the Software without restriction, including without limitation the rights
110
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
111
- * copies of the Software, and to permit persons to whom the Software is
112
- * furnished to do so, subject to the following conditions:
113
- *
114
- * The above copyright notice and this permission notice shall be included in
115
- * all copies or substantial portions of the Software.
116
- *
117
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
118
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
119
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
120
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
121
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
122
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
123
- * THE SOFTWARE.
124
- */
125
-
126
- /**
127
- * @license
128
- * Copyright 2020 Google LLC
129
- * SPDX-License-Identifier: BSD-3-Clause
130
- */
131
-
132
- /**
133
- * @license
134
- * Copyright 2021 Google LLC
135
- * SPDX-License-Identifier: BSD-3-Clause
136
- */
137
-
138
- //! moment.js
139
-
140
- //! moment.js locale configuration
@@ -1,136 +0,0 @@
1
- /*! *****************************************************************************
2
- Copyright (c) Microsoft Corporation.
3
-
4
- Permission to use, copy, modify, and/or distribute this software for any
5
- purpose with or without fee is hereby granted.
6
-
7
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
- PERFORMANCE OF THIS SOFTWARE.
14
- ***************************************************************************** */
15
-
16
- /**
17
- * @license
18
- * Copyright 2016 Google Inc.
19
- *
20
- * Permission is hereby granted, free of charge, to any person obtaining a copy
21
- * of this software and associated documentation files (the "Software"), to deal
22
- * in the Software without restriction, including without limitation the rights
23
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
24
- * copies of the Software, and to permit persons to whom the Software is
25
- * furnished to do so, subject to the following conditions:
26
- *
27
- * The above copyright notice and this permission notice shall be included in
28
- * all copies or substantial portions of the Software.
29
- *
30
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
31
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
32
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
33
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
34
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
35
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
36
- * THE SOFTWARE.
37
- */
38
-
39
- /**
40
- * @license
41
- * Copyright 2017 Google LLC
42
- * SPDX-License-Identifier: BSD-3-Clause
43
- */
44
-
45
- /**
46
- * @license
47
- * Copyright 2018 Google Inc.
48
- *
49
- * Permission is hereby granted, free of charge, to any person obtaining a copy
50
- * of this software and associated documentation files (the "Software"), to deal
51
- * in the Software without restriction, including without limitation the rights
52
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
53
- * copies of the Software, and to permit persons to whom the Software is
54
- * furnished to do so, subject to the following conditions:
55
- *
56
- * The above copyright notice and this permission notice shall be included in
57
- * all copies or substantial portions of the Software.
58
- *
59
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
60
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
61
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
62
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
63
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
64
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
65
- * THE SOFTWARE.
66
- */
67
-
68
- /**
69
- * @license
70
- * Copyright 2018 Google LLC
71
- * SPDX-License-Identifier: BSD-3-Clause
72
- */
73
-
74
- /**
75
- * @license
76
- * Copyright 2019 Google Inc.
77
- *
78
- * Permission is hereby granted, free of charge, to any person obtaining a copy
79
- * of this software and associated documentation files (the "Software"), to deal
80
- * in the Software without restriction, including without limitation the rights
81
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
82
- * copies of the Software, and to permit persons to whom the Software is
83
- * furnished to do so, subject to the following conditions:
84
- *
85
- * The above copyright notice and this permission notice shall be included in
86
- * all copies or substantial portions of the Software.
87
- *
88
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
89
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
90
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
91
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
92
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
93
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
94
- * THE SOFTWARE.
95
- */
96
-
97
- /**
98
- * @license
99
- * Copyright 2019 Google LLC
100
- * SPDX-License-Identifier: BSD-3-Clause
101
- */
102
-
103
- /**
104
- * @license
105
- * Copyright 2020 Google Inc.
106
- *
107
- * Permission is hereby granted, free of charge, to any person obtaining a copy
108
- * of this software and associated documentation files (the "Software"), to deal
109
- * in the Software without restriction, including without limitation the rights
110
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
111
- * copies of the Software, and to permit persons to whom the Software is
112
- * furnished to do so, subject to the following conditions:
113
- *
114
- * The above copyright notice and this permission notice shall be included in
115
- * all copies or substantial portions of the Software.
116
- *
117
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
118
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
119
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
120
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
121
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
122
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
123
- * THE SOFTWARE.
124
- */
125
-
126
- /**
127
- * @license
128
- * Copyright 2020 Google LLC
129
- * SPDX-License-Identifier: BSD-3-Clause
130
- */
131
-
132
- /**
133
- * @license
134
- * Copyright 2021 Google LLC
135
- * SPDX-License-Identifier: BSD-3-Clause
136
- */